diff --git a/.github/workflows/publishToNPM.yml b/.github/workflows/publishToNPM.yml new file mode 100644 index 000000000..0a8610464 --- /dev/null +++ b/.github/workflows/publishToNPM.yml @@ -0,0 +1,92 @@ +name: Publish TypeScript SDK to npm (OIDC) + +on: + workflow_dispatch: + inputs: + tag: + description: 'NPM tag for the release (e.g., latest, beta, alpha, next)' + required: false + default: 'latest' + type: string + +permissions: + id-token: write + contents: read + +jobs: + publish: + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v3 + with: + fetch-depth: 0 + + - uses: actions/setup-node@v3 + with: + node-version: '20.19.4' + registry-url: 'https://registry.npmjs.org' + + - name: Update npm for OIDC support + run: npm install -g npm@latest + + - name: Extract version from package.json + id: version + working-directory: sdks/typescript + run: | + VERSION=$(node -p "require('./package.json').version") + echo "version=$VERSION" >> $GITHUB_OUTPUT + echo "Version: $VERSION" + + - name: Check if version exists on npm + id: npm-check + run: | + VERSION="${{ steps.version.outputs.version }}" + EXISTING=$(npm view @thoughtspot/rest-api-sdk@${VERSION} version 2>/dev/null || echo 'not_found') + if [ "$EXISTING" = "$VERSION" ]; then + echo "exists=true" >> $GITHUB_OUTPUT + echo "Version $VERSION already exists on npm - skipping publish" + else + echo "exists=false" >> $GITHUB_OUTPUT + fi + + - name: Install dependencies + if: steps.npm-check.outputs.exists == 'false' + working-directory: sdks/typescript + run: npm install + + - name: Build TypeScript SDK + if: steps.npm-check.outputs.exists == 'false' + working-directory: sdks/typescript + run: npm run build + + - name: Get Branch Name + id: branch_name + run: echo "::set-output name=BRANCH_NAME::$(git branch --show-current)" + + - name: Publish to npm with OIDC + if: steps.npm-check.outputs.exists == 'false' + working-directory: sdks/typescript + run: | + BRANCH_NAME="${{ steps.branch_name.outputs.BRANCH_NAME }}" + NPM_TAG=$(echo "${{ github.event.inputs.tag }}" | tr '[:upper:]' '[:lower:]') + if [ "$BRANCH_NAME" = "release" ]; then + echo "publish prod with tag: $NPM_TAG" + npm publish --tag $NPM_TAG + elif [ "$NPM_TAG" = "latest" ]; then + echo "Error: 'latest' tag can only be used when publishing from the release branch" + echo "Current branch: $BRANCH_NAME" + exit 1 + else + CURRENT_VERSION=$(node -p "require('./package.json').version") + if [[ "$CURRENT_VERSION" =~ ^[0-9]+\.[0-9]+\.[0-9]+$ ]]; then + echo "Error: Stable versions (X.Y.Z) can only be published from the release branch" + echo "Current version: $CURRENT_VERSION" + echo "Current branch: $BRANCH_NAME" + echo "Please use a pre-release version (e.g., X.Y.Z-beta.1, X.Y.Z-alpha.0) for non-release branches" + exit 1 + fi + echo "Publishing from $BRANCH_NAME branch with tag: $NPM_TAG" + npm publish --tag $NPM_TAG + echo "Published @thoughtspot/rest-api-sdk@${{ steps.version.outputs.version }} to tag $NPM_TAG" + fi diff --git a/.github/workflows/sonar.yml b/.github/workflows/sonar.yml new file mode 100644 index 000000000..b46103167 --- /dev/null +++ b/.github/workflows/sonar.yml @@ -0,0 +1,28 @@ +name: Sonar Scan + +on: + push: + branches: + - main + pull_request: + types: [opened, synchronize, reopened] + +jobs: + build: + name: Sonar + runs-on: self-hosted + steps: + - uses: actions/checkout@v2 + with: + fetch-depth: 0 # Shallow clones should be disabled for a better relevancy of analysis + - uses: sonarsource/sonarqube-scan-action@master + env: + SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} + SONAR_HOST_URL: ${{ secrets.SONAR_HOST_URL }} + with: + args: > + -Dsonar.projectKey=${{ secrets.SONAR_PROJECTKEY }} + - uses: sonarsource/sonarqube-quality-gate-action@master + env: + SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} + SONAR_HOST_URL: ${{ secrets.SONAR_HOST_URL }} diff --git a/CODEOWNERS b/CODEOWNERS new file mode 100644 index 000000000..30ef90e42 --- /dev/null +++ b/CODEOWNERS @@ -0,0 +1 @@ +* @thoughtspot/tse-code-reviewers \ No newline at end of file diff --git a/DotNet/LICENSE b/DotNet/LICENSE deleted file mode 100644 index c571aa529..000000000 --- a/DotNet/LICENSE +++ /dev/null @@ -1,28 +0,0 @@ -License: -======== -The MIT License (MIT) -http://opensource.org/licenses/MIT - -Copyright (c) 2014 - 2022 APIMATIC Limited - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. - -Trade Mark: -========== -APIMATIC is a trade mark for APIMATIC Limited \ No newline at end of file diff --git a/DotNet/README.md b/DotNet/README.md deleted file mode 100644 index 44638e7f4..000000000 --- a/DotNet/README.md +++ /dev/null @@ -1,72 +0,0 @@ - -# Getting Started with ThoughtSpot Public REST API - -## Install the Package - -If you are building with .NET CLI tools then you can also use the following command: - -```bash -dotnet add package thoughtspot.rest.api.sdk --version 1.13.1 -``` - -## Test the SDK - -The generated SDK also contain one or more Tests, which are contained in the Tests project. In order to invoke these test cases, you will need `NUnit 3.0 Test Adapter Extension` for Visual Studio. Once the SDK is complied, the test cases should appear in the Test Explorer window. Here, you can click `Run All` to execute these test cases. - -## Initialize the API Client - -**_Note:_** Documentation for the client can be found [here.](doc/client.md) - -The following parameters are configurable for the API Client: - -| Parameter | Type | Description | -| --- | --- | --- | -| `BaseUrl` | `string` | *Default*: `"https://localhost:443"` | -| `Environment` | Environment | The API environment.
**Default: `Environment.Production`** | -| `Timeout` | `TimeSpan` | Http client timeout.
*Default*: `TimeSpan.FromSeconds(100)` | -| `AccessToken` | `string` | The OAuth 2.0 Access Token to use for API requests. | - -The API client can be initialized as follows: - -```csharp -ThoughtSpotPublicRESTAPI.Standard.ThoughtSpotPublicRESTAPIClient client = new ThoughtSpotPublicRESTAPI.Standard.ThoughtSpotPublicRESTAPIClient.Builder() - .AccessToken("AccessToken") - .Environment(ThoughtSpotPublicRESTAPI.Standard.Environment.Production) - .BaseUrl("https://localhost:443") - .HttpClientConfig(config => config.NumberOfRetries(0)) - .Build(); -``` - -## Authorization - -This API uses `OAuth 2 Bearer token`. - -## List of APIs - -* [User](doc/controllers/user.md) -* [Group](doc/controllers/group.md) -* [Metadata](doc/controllers/metadata.md) -* [Database](doc/controllers/database.md) -* [Connection](doc/controllers/connection.md) -* [Data](doc/controllers/data.md) -* [Logs](doc/controllers/logs.md) -* [Custom Actions](doc/controllers/custom-actions.md) -* [Security](doc/controllers/security.md) -* [Org](doc/controllers/org.md) -* [Session](doc/controllers/session.md) -* [Admin](doc/controllers/admin.md) -* [Report](doc/controllers/report.md) -* [Materialization](doc/controllers/materialization.md) - -## Classes Documentation - -* [Utility Classes](doc/utility-classes.md) -* [HttpRequest](doc/http-request.md) -* [HttpResponse](doc/http-response.md) -* [HttpStringResponse](doc/http-string-response.md) -* [HttpContext](doc/http-context.md) -* [HttpClientConfiguration](doc/http-client-configuration.md) -* [HttpClientConfiguration Builder](doc/http-client-configuration-builder.md) -* [IAuthManager](doc/i-auth-manager.md) -* [ApiException](doc/api-exception.md) - diff --git a/DotNet/ThoughtSpotPublicRESTAPI.Standard/Authentication/BearerAuthManager.cs b/DotNet/ThoughtSpotPublicRESTAPI.Standard/Authentication/BearerAuthManager.cs deleted file mode 100644 index 3cc9e02aa..000000000 --- a/DotNet/ThoughtSpotPublicRESTAPI.Standard/Authentication/BearerAuthManager.cs +++ /dev/null @@ -1,62 +0,0 @@ -// -// Copyright (c) APIMatic. All rights reserved. -// -namespace ThoughtSpotPublicRESTAPI.Standard.Authentication -{ -using System; -using System.Collections.Generic; -using System.Threading.Tasks; -using ThoughtSpotPublicRESTAPI.Standard.Http.Request; - -/// -/// BearerAuthManager. -/// -internal class BearerAuthManager : IBearerAuthCredentials, IAuthManager -{ - /// - /// Initializes a new instance of the class. - /// - /// accessToken. - public BearerAuthManager(string accessToken) - { - this.AccessToken = accessToken; - } - - /// - /// Gets string value for accessToken. - /// - public string AccessToken { get; } - - /// - /// Check if credentials match. - /// - /// The string value for credentials. - /// True if credentials matched. - public bool Equals(string accessToken) - { - return accessToken.Equals(this.AccessToken); - } - - /// - /// Adds authentication to the given HttpRequest. - /// - /// Http Request. - /// Returns the httpRequest after adding authentication. - public HttpRequest Apply(HttpRequest httpRequest) - { - httpRequest.Headers["Authorization"] = "Bearer " + this.AccessToken; - return httpRequest; - } - - /// - /// Adds authentication to the given HttpRequest. - /// - /// Http Request. - /// Returns the httpRequest after adding authentication. - public Task ApplyAsync(HttpRequest httpRequest) - { - httpRequest.Headers["Authorization"] = "Bearer " + this.AccessToken; - return Task.FromResult(httpRequest); - } - } -} \ No newline at end of file diff --git a/DotNet/ThoughtSpotPublicRESTAPI.Standard/Authentication/IAuthManager.cs b/DotNet/ThoughtSpotPublicRESTAPI.Standard/Authentication/IAuthManager.cs deleted file mode 100644 index 9ec7bec53..000000000 --- a/DotNet/ThoughtSpotPublicRESTAPI.Standard/Authentication/IAuthManager.cs +++ /dev/null @@ -1,28 +0,0 @@ -// -// Copyright (c) APIMatic. All rights reserved. -// -namespace ThoughtSpotPublicRESTAPI.Standard.Authentication -{ - using System.Threading.Tasks; - using ThoughtSpotPublicRESTAPI.Standard.Http.Request; - - /// - /// IAuthManager adds the authenticaion layer to the http calls. - /// - internal interface IAuthManager - { - /// - /// Add authentication information to the HTTP Request. - /// - /// The http request object on which authentication will be applied. - /// HttpRequest. - HttpRequest Apply(HttpRequest httpRequest); - - /// - /// Asynchronously add authentication information to the HTTP Request. - /// - /// The http request object on which authentication will be applied. - /// A representing the asynchronous operation. - Task ApplyAsync(HttpRequest httpRequest); - } -} diff --git a/DotNet/ThoughtSpotPublicRESTAPI.Standard/Authentication/IBearerAuthCredentials.cs b/DotNet/ThoughtSpotPublicRESTAPI.Standard/Authentication/IBearerAuthCredentials.cs deleted file mode 100644 index 949289df7..000000000 --- a/DotNet/ThoughtSpotPublicRESTAPI.Standard/Authentication/IBearerAuthCredentials.cs +++ /dev/null @@ -1,22 +0,0 @@ -// -// Copyright (c) APIMatic. All rights reserved. -// -namespace ThoughtSpotPublicRESTAPI.Standard.Authentication -{ - using System; - - public interface IBearerAuthCredentials - { - /// - /// Gets string value for accessToken. - /// - string AccessToken { get; } - - /// - /// Returns true if credentials matched. - /// - /// The string value for credentials. - /// True if credentials matched. - bool Equals(string accessToken); - } -} \ No newline at end of file diff --git a/DotNet/ThoughtSpotPublicRESTAPI.Standard/Controllers/AdminController.cs b/DotNet/ThoughtSpotPublicRESTAPI.Standard/Controllers/AdminController.cs deleted file mode 100644 index 28c515b4a..000000000 --- a/DotNet/ThoughtSpotPublicRESTAPI.Standard/Controllers/AdminController.cs +++ /dev/null @@ -1,513 +0,0 @@ -// -// Copyright (c) APIMatic. All rights reserved. -// -namespace ThoughtSpotPublicRESTAPI.Standard.Controllers -{ - using System; - using System.Collections.Generic; - using System.Dynamic; - using System.Globalization; - using System.IO; - using System.Linq; - using System.Text; - using System.Threading; - using System.Threading.Tasks; - using Newtonsoft.Json.Converters; - using ThoughtSpotPublicRESTAPI.Standard; - using ThoughtSpotPublicRESTAPI.Standard.Authentication; - using ThoughtSpotPublicRESTAPI.Standard.Exceptions; - using ThoughtSpotPublicRESTAPI.Standard.Http.Client; - using ThoughtSpotPublicRESTAPI.Standard.Http.Request; - using ThoughtSpotPublicRESTAPI.Standard.Http.Request.Configuration; - using ThoughtSpotPublicRESTAPI.Standard.Http.Response; - using ThoughtSpotPublicRESTAPI.Standard.Utilities; - - /// - /// AdminController. - /// - public class AdminController : BaseController - { - /// - /// Initializes a new instance of the class. - /// - /// config instance. - /// httpClient. - /// authManager. - /// httpCallBack. - internal AdminController(IConfiguration config, IHttpClient httpClient, IDictionary authManagers, HttpCallBack httpCallBack = null) - : base(config, httpClient, authManagers, httpCallBack) - { - } - - /// - /// To update the Thoughtspot cluster configuration, use this endpoint. - /// - /// Required parameter: Example: . - /// Returns the bool response from the API call. - public bool RestapiV2UpdateClusterConfig( - Models.TspublicRestV2AdminConfigurationUpdateRequest body) - { - Task t = this.RestapiV2UpdateClusterConfigAsync(body); - ApiHelper.RunTaskSynchronously(t); - return t.Result; - } - - /// - /// To update the Thoughtspot cluster configuration, use this endpoint. - /// - /// Required parameter: Example: . - /// cancellationToken. - /// Returns the bool response from the API call. - public async Task RestapiV2UpdateClusterConfigAsync( - Models.TspublicRestV2AdminConfigurationUpdateRequest body, - CancellationToken cancellationToken = default) - { - // validating required parameters. - if (body == null) - { - throw new ArgumentNullException("body", "The parameter \"body\" is a required parameter and cannot be null."); - } - - // the base uri for api requests. - string baseUri = this.Config.GetBaseUri(); - - // prepare query string for API call. - StringBuilder queryBuilder = new StringBuilder(baseUri); - queryBuilder.Append("/tspublic/rest/v2/admin/configuration/update"); - - // append request with appropriate headers and parameters - var headers = new Dictionary() - { - { "user-agent", this.UserAgent }, - { "Content-Type", "application/json" }, - }; - - // append body params. - var bodyText = ApiHelper.JsonSerialize(body); - - // prepare the API call request to fetch the response. - HttpRequest httpRequest = this.GetClientInstance().PutBody(queryBuilder.ToString(), headers, bodyText); - - if (this.HttpCallBack != null) - { - this.HttpCallBack.OnBeforeHttpRequestEventHandler(this.GetClientInstance(), httpRequest); - } - - httpRequest = await this.AuthManagers["global"].ApplyAsync(httpRequest).ConfigureAwait(false); - - // invoke request and get response. - HttpStringResponse response = await this.GetClientInstance().ExecuteAsStringAsync(httpRequest, cancellationToken: cancellationToken).ConfigureAwait(false); - HttpContext context = new HttpContext(httpRequest, response); - if (this.HttpCallBack != null) - { - this.HttpCallBack.OnAfterHttpResponseEventHandler(this.GetClientInstance(), response); - } - - if (response.StatusCode == 500) - { - throw new ErrorResponseException("Operation failed", context); - } - - // handle errors defined at the API level. - this.ValidateResponse(response, context); - - return bool.Parse(response.Body); - } - - /// - /// To reset the password of a ThoughtSpot user account, use this endpoint. . - /// It is mandatory to use Authorization header with token of a user with admin access to successfully run this endpoint. . - /// At least one of User Id or username is mandatory. When both are given, then user id will be considered. - /// - /// Required parameter: Example: . - /// Returns the bool response from the API call. - public bool RestapiV2ResetUserPassword( - Models.TspublicRestV2AdminResetpasswordRequest body) - { - Task t = this.RestapiV2ResetUserPasswordAsync(body); - ApiHelper.RunTaskSynchronously(t); - return t.Result; - } - - /// - /// To reset the password of a ThoughtSpot user account, use this endpoint. . - /// It is mandatory to use Authorization header with token of a user with admin access to successfully run this endpoint. . - /// At least one of User Id or username is mandatory. When both are given, then user id will be considered. - /// - /// Required parameter: Example: . - /// cancellationToken. - /// Returns the bool response from the API call. - public async Task RestapiV2ResetUserPasswordAsync( - Models.TspublicRestV2AdminResetpasswordRequest body, - CancellationToken cancellationToken = default) - { - // validating required parameters. - if (body == null) - { - throw new ArgumentNullException("body", "The parameter \"body\" is a required parameter and cannot be null."); - } - - // the base uri for api requests. - string baseUri = this.Config.GetBaseUri(); - - // prepare query string for API call. - StringBuilder queryBuilder = new StringBuilder(baseUri); - queryBuilder.Append("/tspublic/rest/v2/admin/resetpassword"); - - // append request with appropriate headers and parameters - var headers = new Dictionary() - { - { "user-agent", this.UserAgent }, - { "Content-Type", "application/json" }, - }; - - // append body params. - var bodyText = ApiHelper.JsonSerialize(body); - - // prepare the API call request to fetch the response. - HttpRequest httpRequest = this.GetClientInstance().PutBody(queryBuilder.ToString(), headers, bodyText); - - if (this.HttpCallBack != null) - { - this.HttpCallBack.OnBeforeHttpRequestEventHandler(this.GetClientInstance(), httpRequest); - } - - httpRequest = await this.AuthManagers["global"].ApplyAsync(httpRequest).ConfigureAwait(false); - - // invoke request and get response. - HttpStringResponse response = await this.GetClientInstance().ExecuteAsStringAsync(httpRequest, cancellationToken: cancellationToken).ConfigureAwait(false); - HttpContext context = new HttpContext(httpRequest, response); - if (this.HttpCallBack != null) - { - this.HttpCallBack.OnAfterHttpResponseEventHandler(this.GetClientInstance(), response); - } - - if (response.StatusCode == 500) - { - throw new ErrorResponseException("Operation failed", context); - } - - // handle errors defined at the API level. - this.ValidateResponse(response, context); - - return bool.Parse(response.Body); - } - - /// - /// To programmatically synchronize user accounts and user groups from external system with ThoughtSpot, use this endpoint. . - /// The payload takes principals containing all users and groups present in the external system. . - /// The users and user groups in Thoughtspot get updated for any matching inputs. . - /// Any user and user group present in the input, but not present in the cluster, gets created in cluster. . - /// n You can optionally choose to delete the user and groups from the cluster, that are not present in the input. - /// - /// Required parameter: Example: . - /// Returns the Models.AdminsyncPrincipalResponse response from the API call. - public Models.AdminsyncPrincipalResponse RestapiV2SyncPrincipal( - Models.TspublicRestV2AdminSyncprincipalRequest body) - { - Task t = this.RestapiV2SyncPrincipalAsync(body); - ApiHelper.RunTaskSynchronously(t); - return t.Result; - } - - /// - /// To programmatically synchronize user accounts and user groups from external system with ThoughtSpot, use this endpoint. . - /// The payload takes principals containing all users and groups present in the external system. . - /// The users and user groups in Thoughtspot get updated for any matching inputs. . - /// Any user and user group present in the input, but not present in the cluster, gets created in cluster. . - /// n You can optionally choose to delete the user and groups from the cluster, that are not present in the input. - /// - /// Required parameter: Example: . - /// cancellationToken. - /// Returns the Models.AdminsyncPrincipalResponse response from the API call. - public async Task RestapiV2SyncPrincipalAsync( - Models.TspublicRestV2AdminSyncprincipalRequest body, - CancellationToken cancellationToken = default) - { - // validating required parameters. - if (body == null) - { - throw new ArgumentNullException("body", "The parameter \"body\" is a required parameter and cannot be null."); - } - - // the base uri for api requests. - string baseUri = this.Config.GetBaseUri(); - - // prepare query string for API call. - StringBuilder queryBuilder = new StringBuilder(baseUri); - queryBuilder.Append("/tspublic/rest/v2/admin/syncprincipal"); - - // append request with appropriate headers and parameters - var headers = new Dictionary() - { - { "user-agent", this.UserAgent }, - { "accept", "application/json" }, - { "Content-Type", "application/json" }, - }; - - // append body params. - var bodyText = ApiHelper.JsonSerialize(body); - - // prepare the API call request to fetch the response. - HttpRequest httpRequest = this.GetClientInstance().PutBody(queryBuilder.ToString(), headers, bodyText); - - if (this.HttpCallBack != null) - { - this.HttpCallBack.OnBeforeHttpRequestEventHandler(this.GetClientInstance(), httpRequest); - } - - httpRequest = await this.AuthManagers["global"].ApplyAsync(httpRequest).ConfigureAwait(false); - - // invoke request and get response. - HttpStringResponse response = await this.GetClientInstance().ExecuteAsStringAsync(httpRequest, cancellationToken: cancellationToken).ConfigureAwait(false); - HttpContext context = new HttpContext(httpRequest, response); - if (this.HttpCallBack != null) - { - this.HttpCallBack.OnAfterHttpResponseEventHandler(this.GetClientInstance(), response); - } - - if (response.StatusCode == 500) - { - throw new ErrorResponseException("Operation failed", context); - } - - // handle errors defined at the API level. - this.ValidateResponse(response, context); - - return ApiHelper.JsonDeserialize(response.Body); - } - - /// - /// To programmatically change the owner of one or several objects from one user account to another, use this endpoint. . - /// You might want to transfer ownership of objects owned by a user to another active user, when the account is removed from the ThoughtSpot application. - /// - /// Required parameter: Example: . - /// Returns the bool response from the API call. - public bool RestapiV2ChangeAuthorOfObjects( - Models.TspublicRestV2AdminChangeauthorRequest body) - { - Task t = this.RestapiV2ChangeAuthorOfObjectsAsync(body); - ApiHelper.RunTaskSynchronously(t); - return t.Result; - } - - /// - /// To programmatically change the owner of one or several objects from one user account to another, use this endpoint. . - /// You might want to transfer ownership of objects owned by a user to another active user, when the account is removed from the ThoughtSpot application. - /// - /// Required parameter: Example: . - /// cancellationToken. - /// Returns the bool response from the API call. - public async Task RestapiV2ChangeAuthorOfObjectsAsync( - Models.TspublicRestV2AdminChangeauthorRequest body, - CancellationToken cancellationToken = default) - { - // validating required parameters. - if (body == null) - { - throw new ArgumentNullException("body", "The parameter \"body\" is a required parameter and cannot be null."); - } - - // the base uri for api requests. - string baseUri = this.Config.GetBaseUri(); - - // prepare query string for API call. - StringBuilder queryBuilder = new StringBuilder(baseUri); - queryBuilder.Append("/tspublic/rest/v2/admin/changeauthor"); - - // append request with appropriate headers and parameters - var headers = new Dictionary() - { - { "user-agent", this.UserAgent }, - { "Content-Type", "application/json" }, - }; - - // append body params. - var bodyText = ApiHelper.JsonSerialize(body); - - // prepare the API call request to fetch the response. - HttpRequest httpRequest = this.GetClientInstance().PutBody(queryBuilder.ToString(), headers, bodyText); - - if (this.HttpCallBack != null) - { - this.HttpCallBack.OnBeforeHttpRequestEventHandler(this.GetClientInstance(), httpRequest); - } - - httpRequest = await this.AuthManagers["global"].ApplyAsync(httpRequest).ConfigureAwait(false); - - // invoke request and get response. - HttpStringResponse response = await this.GetClientInstance().ExecuteAsStringAsync(httpRequest, cancellationToken: cancellationToken).ConfigureAwait(false); - HttpContext context = new HttpContext(httpRequest, response); - if (this.HttpCallBack != null) - { - this.HttpCallBack.OnAfterHttpResponseEventHandler(this.GetClientInstance(), response); - } - - if (response.StatusCode == 500) - { - throw new ErrorResponseException("Operation failed", context); - } - - // handle errors defined at the API level. - this.ValidateResponse(response, context); - - return bool.Parse(response.Body); - } - - /// - /// To programmatically assign an author to one or several objects, use this endpoint. . - /// Provide either user name or id as input. When both are given user id will be considered. . - /// Requires administration privilege. - /// - /// Required parameter: Example: . - /// Returns the bool response from the API call. - public bool RestapiV2AssignAuthorToObjects( - Models.TspublicRestV2AdminAssignauthorRequest body) - { - Task t = this.RestapiV2AssignAuthorToObjectsAsync(body); - ApiHelper.RunTaskSynchronously(t); - return t.Result; - } - - /// - /// To programmatically assign an author to one or several objects, use this endpoint. . - /// Provide either user name or id as input. When both are given user id will be considered. . - /// Requires administration privilege. - /// - /// Required parameter: Example: . - /// cancellationToken. - /// Returns the bool response from the API call. - public async Task RestapiV2AssignAuthorToObjectsAsync( - Models.TspublicRestV2AdminAssignauthorRequest body, - CancellationToken cancellationToken = default) - { - // validating required parameters. - if (body == null) - { - throw new ArgumentNullException("body", "The parameter \"body\" is a required parameter and cannot be null."); - } - - // the base uri for api requests. - string baseUri = this.Config.GetBaseUri(); - - // prepare query string for API call. - StringBuilder queryBuilder = new StringBuilder(baseUri); - queryBuilder.Append("/tspublic/rest/v2/admin/assignauthor"); - - // append request with appropriate headers and parameters - var headers = new Dictionary() - { - { "user-agent", this.UserAgent }, - { "Content-Type", "application/json" }, - }; - - // append body params. - var bodyText = ApiHelper.JsonSerialize(body); - - // prepare the API call request to fetch the response. - HttpRequest httpRequest = this.GetClientInstance().PutBody(queryBuilder.ToString(), headers, bodyText); - - if (this.HttpCallBack != null) - { - this.HttpCallBack.OnBeforeHttpRequestEventHandler(this.GetClientInstance(), httpRequest); - } - - httpRequest = await this.AuthManagers["global"].ApplyAsync(httpRequest).ConfigureAwait(false); - - // invoke request and get response. - HttpStringResponse response = await this.GetClientInstance().ExecuteAsStringAsync(httpRequest, cancellationToken: cancellationToken).ConfigureAwait(false); - HttpContext context = new HttpContext(httpRequest, response); - if (this.HttpCallBack != null) - { - this.HttpCallBack.OnAfterHttpResponseEventHandler(this.GetClientInstance(), response); - } - - if (response.StatusCode == 500) - { - throw new ErrorResponseException("Operation failed", context); - } - - // handle errors defined at the API level. - this.ValidateResponse(response, context); - - return bool.Parse(response.Body); - } - - /// - /// To logout one or more users from logged in session, use this endpoint. If no input is provided then all logged in users are force logged out. . - /// Requires administration privilege. - /// - /// Required parameter: Example: . - /// Returns the bool response from the API call. - public bool RestapiV2ForceLogoutUsers( - Models.TspublicRestV2AdminForcelogoutRequest body) - { - Task t = this.RestapiV2ForceLogoutUsersAsync(body); - ApiHelper.RunTaskSynchronously(t); - return t.Result; - } - - /// - /// To logout one or more users from logged in session, use this endpoint. If no input is provided then all logged in users are force logged out. . - /// Requires administration privilege. - /// - /// Required parameter: Example: . - /// cancellationToken. - /// Returns the bool response from the API call. - public async Task RestapiV2ForceLogoutUsersAsync( - Models.TspublicRestV2AdminForcelogoutRequest body, - CancellationToken cancellationToken = default) - { - // validating required parameters. - if (body == null) - { - throw new ArgumentNullException("body", "The parameter \"body\" is a required parameter and cannot be null."); - } - - // the base uri for api requests. - string baseUri = this.Config.GetBaseUri(); - - // prepare query string for API call. - StringBuilder queryBuilder = new StringBuilder(baseUri); - queryBuilder.Append("/tspublic/rest/v2/admin/forcelogout"); - - // append request with appropriate headers and parameters - var headers = new Dictionary() - { - { "user-agent", this.UserAgent }, - { "Content-Type", "application/json" }, - }; - - // append body params. - var bodyText = ApiHelper.JsonSerialize(body); - - // prepare the API call request to fetch the response. - HttpRequest httpRequest = this.GetClientInstance().PostBody(queryBuilder.ToString(), headers, bodyText); - - if (this.HttpCallBack != null) - { - this.HttpCallBack.OnBeforeHttpRequestEventHandler(this.GetClientInstance(), httpRequest); - } - - httpRequest = await this.AuthManagers["global"].ApplyAsync(httpRequest).ConfigureAwait(false); - - // invoke request and get response. - HttpStringResponse response = await this.GetClientInstance().ExecuteAsStringAsync(httpRequest, cancellationToken: cancellationToken).ConfigureAwait(false); - HttpContext context = new HttpContext(httpRequest, response); - if (this.HttpCallBack != null) - { - this.HttpCallBack.OnAfterHttpResponseEventHandler(this.GetClientInstance(), response); - } - - if (response.StatusCode == 500) - { - throw new ErrorResponseException("Operation failed", context); - } - - // handle errors defined at the API level. - this.ValidateResponse(response, context); - - return bool.Parse(response.Body); - } - } -} \ No newline at end of file diff --git a/DotNet/ThoughtSpotPublicRESTAPI.Standard/Controllers/BaseController.cs b/DotNet/ThoughtSpotPublicRESTAPI.Standard/Controllers/BaseController.cs deleted file mode 100644 index cc7ecc5c0..000000000 --- a/DotNet/ThoughtSpotPublicRESTAPI.Standard/Controllers/BaseController.cs +++ /dev/null @@ -1,137 +0,0 @@ -// -// Copyright (c) APIMatic. All rights reserved. -// -namespace ThoughtSpotPublicRESTAPI.Standard.Controllers -{ - using System; - using System.Collections.Generic; - using System.Text; - using ThoughtSpotPublicRESTAPI.Standard; - using ThoughtSpotPublicRESTAPI.Standard.Authentication; - using ThoughtSpotPublicRESTAPI.Standard.Exceptions; - using ThoughtSpotPublicRESTAPI.Standard.Http.Client; - using ThoughtSpotPublicRESTAPI.Standard.Http.Response; - using ThoughtSpotPublicRESTAPI.Standard.Utilities; - - /// - /// The base class for all controller classes. - /// - public class BaseController - { - /// - /// HttpClient instance. - /// - private readonly IHttpClient httpClient; - private string internalUserAgent = string.Empty; - - - /// - /// Initializes a new instance of the class. - /// - /// Configuration for the API. - /// HTTP callback to catch before/after HTTP request/response events. - /// HttpClient for the API. - /// AuthManagers for the API. - internal BaseController( - IConfiguration config, - IHttpClient httpClient, - IDictionary authManagers, - HttpCallBack httpCallBack = null) - { - this.Config = config; - this.httpClient = httpClient; - this.AuthManagers = authManagers; - this.HttpCallBack = httpCallBack; - this.UpdateUserAgent(); - } - - /// - /// Gets AuthManager instance. - /// - internal IDictionary AuthManagers { get; } - - /// - /// Gets HttpCallBack instance. - /// - internal HttpCallBack HttpCallBack { get; } - - /// - /// Gets array deserialization format. - /// - protected ArrayDeserialization ArrayDeserializationFormat => ArrayDeserialization.Plain; - - /// - /// Gets configuration instance. - /// - protected IConfiguration Config { get; } - - /// - /// Gets User-Agent header value. - /// - protected string UserAgent => internalUserAgent; - - /// - /// Create JSON-encoded multipart content from input. - /// - /// input object. - /// Headers dictionary. - /// MultipartContent. - internal static MultipartContent CreateJsonEncodedMultipartContent(object input, Dictionary> headers) - { - if (input == null) - { - return null; - } - return new MultipartByteArrayContent(Encoding.ASCII.GetBytes(ApiHelper.JsonSerialize(input)), headers); - } - - /// - /// Create binary multipart content from file. - /// - /// FileStreamInfo object. - /// Headers dictionary. - /// MultipartContent. - internal static MultipartContent CreateFileMultipartContent(FileStreamInfo input, Dictionary> headers = null) - { - if (input == null) - { - return null; - } - if (headers == null) - { - return new MultipartFileContent(input); - } - return new MultipartFileContent(input, headers); - } - - /// - /// Get default HTTP client instance. - /// - /// IHttpClient. - internal IHttpClient GetClientInstance() - { - return this.httpClient; - } - - /// - /// Validates the response against HTTP errors defined at the API level. - /// - /// The response recieved. - /// Context of the request and the recieved response. - protected void ValidateResponse(HttpResponse response, HttpContext context) - { - // [200, 208] = HTTP OK - if ((response.StatusCode < 200) || (response.StatusCode > 208)) - { - throw new ApiException(@"HTTP Response Not OK", context); - } - } - /// - /// Adds runtime information to the placeholders in User-Agent. - /// - private void UpdateUserAgent() - { - internalUserAgent = "RestAPI V2 SDK"; - } - } -} \ No newline at end of file diff --git a/DotNet/ThoughtSpotPublicRESTAPI.Standard/Controllers/ConnectionController.cs b/DotNet/ThoughtSpotPublicRESTAPI.Standard/Controllers/ConnectionController.cs deleted file mode 100644 index 6918c96a6..000000000 --- a/DotNet/ThoughtSpotPublicRESTAPI.Standard/Controllers/ConnectionController.cs +++ /dev/null @@ -1,828 +0,0 @@ -// -// Copyright (c) APIMatic. All rights reserved. -// -namespace ThoughtSpotPublicRESTAPI.Standard.Controllers -{ - using System; - using System.Collections.Generic; - using System.Dynamic; - using System.Globalization; - using System.IO; - using System.Linq; - using System.Text; - using System.Threading; - using System.Threading.Tasks; - using Newtonsoft.Json.Converters; - using ThoughtSpotPublicRESTAPI.Standard; - using ThoughtSpotPublicRESTAPI.Standard.Authentication; - using ThoughtSpotPublicRESTAPI.Standard.Exceptions; - using ThoughtSpotPublicRESTAPI.Standard.Http.Client; - using ThoughtSpotPublicRESTAPI.Standard.Http.Request; - using ThoughtSpotPublicRESTAPI.Standard.Http.Request.Configuration; - using ThoughtSpotPublicRESTAPI.Standard.Http.Response; - using ThoughtSpotPublicRESTAPI.Standard.Utilities; - - /// - /// ConnectionController. - /// - public class ConnectionController : BaseController - { - /// - /// Initializes a new instance of the class. - /// - /// config instance. - /// httpClient. - /// authManager. - /// httpCallBack. - internal ConnectionController(IConfiguration config, IHttpClient httpClient, IDictionary authManagers, HttpCallBack httpCallBack = null) - : base(config, httpClient, authManagers, httpCallBack) - { - } - - /// - /// To get the details of a specific connection use this endpoint. - /// - /// Required parameter: The GUID of the connection to query. - /// Returns the Models.ConnectionResponse response from the API call. - public Models.ConnectionResponse RestapiV2GetConnection( - string id) - { - Task t = this.RestapiV2GetConnectionAsync(id); - ApiHelper.RunTaskSynchronously(t); - return t.Result; - } - - /// - /// To get the details of a specific connection use this endpoint. - /// - /// Required parameter: The GUID of the connection to query. - /// cancellationToken. - /// Returns the Models.ConnectionResponse response from the API call. - public async Task RestapiV2GetConnectionAsync( - string id, - CancellationToken cancellationToken = default) - { - // validating required parameters. - if (id == null) - { - throw new ArgumentNullException("id", "The parameter \"id\" is a required parameter and cannot be null."); - } - - // the base uri for api requests. - string baseUri = this.Config.GetBaseUri(); - - // prepare query string for API call. - StringBuilder queryBuilder = new StringBuilder(baseUri); - queryBuilder.Append("/tspublic/rest/v2/connection"); - - // prepare specfied query parameters. - var queryParams = new Dictionary() - { - { "id", id }, - }; - - // append request with appropriate headers and parameters - var headers = new Dictionary() - { - { "user-agent", this.UserAgent }, - { "accept", "application/json" }, - }; - - // prepare the API call request to fetch the response. - HttpRequest httpRequest = this.GetClientInstance().Get(queryBuilder.ToString(), headers, queryParameters: queryParams); - - if (this.HttpCallBack != null) - { - this.HttpCallBack.OnBeforeHttpRequestEventHandler(this.GetClientInstance(), httpRequest); - } - - httpRequest = await this.AuthManagers["global"].ApplyAsync(httpRequest).ConfigureAwait(false); - - // invoke request and get response. - HttpStringResponse response = await this.GetClientInstance().ExecuteAsStringAsync(httpRequest, cancellationToken: cancellationToken).ConfigureAwait(false); - HttpContext context = new HttpContext(httpRequest, response); - if (this.HttpCallBack != null) - { - this.HttpCallBack.OnAfterHttpResponseEventHandler(this.GetClientInstance(), response); - } - - if (response.StatusCode == 500) - { - throw new ErrorResponseException("Operation failed", context); - } - - // handle errors defined at the API level. - this.ValidateResponse(response, context); - - return ApiHelper.JsonDeserialize(response.Body); - } - - /// - /// To get the list of databases for a connection, use this endpoint. . - /// The response will include databases from the data platform corresponding to the connection id provided. - /// - /// Required parameter: The GUID of the connection. - /// Returns the List of string response from the API call. - public List RestapiV2GetConnectionDatabase( - string id) - { - Task> t = this.RestapiV2GetConnectionDatabaseAsync(id); - ApiHelper.RunTaskSynchronously(t); - return t.Result; - } - - /// - /// To get the list of databases for a connection, use this endpoint. . - /// The response will include databases from the data platform corresponding to the connection id provided. - /// - /// Required parameter: The GUID of the connection. - /// cancellationToken. - /// Returns the List of string response from the API call. - public async Task> RestapiV2GetConnectionDatabaseAsync( - string id, - CancellationToken cancellationToken = default) - { - // validating required parameters. - if (id == null) - { - throw new ArgumentNullException("id", "The parameter \"id\" is a required parameter and cannot be null."); - } - - // the base uri for api requests. - string baseUri = this.Config.GetBaseUri(); - - // prepare query string for API call. - StringBuilder queryBuilder = new StringBuilder(baseUri); - queryBuilder.Append("/tspublic/rest/v2/connection/database"); - - // prepare specfied query parameters. - var queryParams = new Dictionary() - { - { "id", id }, - }; - - // append request with appropriate headers and parameters - var headers = new Dictionary() - { - { "user-agent", this.UserAgent }, - { "accept", "application/json" }, - }; - - // prepare the API call request to fetch the response. - HttpRequest httpRequest = this.GetClientInstance().Get(queryBuilder.ToString(), headers, queryParameters: queryParams); - - if (this.HttpCallBack != null) - { - this.HttpCallBack.OnBeforeHttpRequestEventHandler(this.GetClientInstance(), httpRequest); - } - - httpRequest = await this.AuthManagers["global"].ApplyAsync(httpRequest).ConfigureAwait(false); - - // invoke request and get response. - HttpStringResponse response = await this.GetClientInstance().ExecuteAsStringAsync(httpRequest, cancellationToken: cancellationToken).ConfigureAwait(false); - HttpContext context = new HttpContext(httpRequest, response); - if (this.HttpCallBack != null) - { - this.HttpCallBack.OnAfterHttpResponseEventHandler(this.GetClientInstance(), response); - } - - if (response.StatusCode == 500) - { - throw new ErrorResponseException("Operation failed", context); - } - - // handle errors defined at the API level. - this.ValidateResponse(response, context); - - return ApiHelper.JsonDeserialize>(response.Body); - } - - /// - /// To programmatically create a connection in the ThoughtSpot system use this API endpoint. - /// Using this API, you can create a connection and assign groups. - /// To create a connection, you require admin connection privileges. - /// All connections created in the ThoughtSpot system are added to ALL_GROUP. - /// - /// Required parameter: Example: . - /// Returns the Models.CreateConnectionResponse response from the API call. - public Models.CreateConnectionResponse RestapiV2CreateConnection( - Models.TspublicRestV2ConnectionCreateRequest body) - { - Task t = this.RestapiV2CreateConnectionAsync(body); - ApiHelper.RunTaskSynchronously(t); - return t.Result; - } - - /// - /// To programmatically create a connection in the ThoughtSpot system use this API endpoint. - /// Using this API, you can create a connection and assign groups. - /// To create a connection, you require admin connection privileges. - /// All connections created in the ThoughtSpot system are added to ALL_GROUP. - /// - /// Required parameter: Example: . - /// cancellationToken. - /// Returns the Models.CreateConnectionResponse response from the API call. - public async Task RestapiV2CreateConnectionAsync( - Models.TspublicRestV2ConnectionCreateRequest body, - CancellationToken cancellationToken = default) - { - // validating required parameters. - if (body == null) - { - throw new ArgumentNullException("body", "The parameter \"body\" is a required parameter and cannot be null."); - } - - // the base uri for api requests. - string baseUri = this.Config.GetBaseUri(); - - // prepare query string for API call. - StringBuilder queryBuilder = new StringBuilder(baseUri); - queryBuilder.Append("/tspublic/rest/v2/connection/create"); - - // append request with appropriate headers and parameters - var headers = new Dictionary() - { - { "user-agent", this.UserAgent }, - { "accept", "application/json" }, - { "Content-Type", "application/json" }, - }; - - // append body params. - var bodyText = ApiHelper.JsonSerialize(body); - - // prepare the API call request to fetch the response. - HttpRequest httpRequest = this.GetClientInstance().PostBody(queryBuilder.ToString(), headers, bodyText); - - if (this.HttpCallBack != null) - { - this.HttpCallBack.OnBeforeHttpRequestEventHandler(this.GetClientInstance(), httpRequest); - } - - httpRequest = await this.AuthManagers["global"].ApplyAsync(httpRequest).ConfigureAwait(false); - - // invoke request and get response. - HttpStringResponse response = await this.GetClientInstance().ExecuteAsStringAsync(httpRequest, cancellationToken: cancellationToken).ConfigureAwait(false); - HttpContext context = new HttpContext(httpRequest, response); - if (this.HttpCallBack != null) - { - this.HttpCallBack.OnAfterHttpResponseEventHandler(this.GetClientInstance(), response); - } - - if (response.StatusCode == 500) - { - throw new ErrorResponseException("Operation failed", context); - } - - // handle errors defined at the API level. - this.ValidateResponse(response, context); - - return ApiHelper.JsonDeserialize(response.Body); - } - - /// - /// You can use this endpoint to programmatically modify an existing connection. - /// To modify a connection, you require admin connection privileges. - /// At least one of Connection Id or connectionname is mandatory. When both are given, then connection id will be considered and connectionname will be updated. - /// - /// Required parameter: Example: . - /// Returns the bool response from the API call. - public bool RestapiV2UpdateConnection( - Models.TspublicRestV2ConnectionUpdateRequest body) - { - Task t = this.RestapiV2UpdateConnectionAsync(body); - ApiHelper.RunTaskSynchronously(t); - return t.Result; - } - - /// - /// You can use this endpoint to programmatically modify an existing connection. - /// To modify a connection, you require admin connection privileges. - /// At least one of Connection Id or connectionname is mandatory. When both are given, then connection id will be considered and connectionname will be updated. - /// - /// Required parameter: Example: . - /// cancellationToken. - /// Returns the bool response from the API call. - public async Task RestapiV2UpdateConnectionAsync( - Models.TspublicRestV2ConnectionUpdateRequest body, - CancellationToken cancellationToken = default) - { - // validating required parameters. - if (body == null) - { - throw new ArgumentNullException("body", "The parameter \"body\" is a required parameter and cannot be null."); - } - - // the base uri for api requests. - string baseUri = this.Config.GetBaseUri(); - - // prepare query string for API call. - StringBuilder queryBuilder = new StringBuilder(baseUri); - queryBuilder.Append("/tspublic/rest/v2/connection/update"); - - // append request with appropriate headers and parameters - var headers = new Dictionary() - { - { "user-agent", this.UserAgent }, - { "Content-Type", "application/json" }, - }; - - // append body params. - var bodyText = ApiHelper.JsonSerialize(body); - - // prepare the API call request to fetch the response. - HttpRequest httpRequest = this.GetClientInstance().PutBody(queryBuilder.ToString(), headers, bodyText); - - if (this.HttpCallBack != null) - { - this.HttpCallBack.OnBeforeHttpRequestEventHandler(this.GetClientInstance(), httpRequest); - } - - httpRequest = await this.AuthManagers["global"].ApplyAsync(httpRequest).ConfigureAwait(false); - - // invoke request and get response. - HttpStringResponse response = await this.GetClientInstance().ExecuteAsStringAsync(httpRequest, cancellationToken: cancellationToken).ConfigureAwait(false); - HttpContext context = new HttpContext(httpRequest, response); - if (this.HttpCallBack != null) - { - this.HttpCallBack.OnAfterHttpResponseEventHandler(this.GetClientInstance(), response); - } - - if (response.StatusCode == 500) - { - throw new ErrorResponseException("Operation failed", context); - } - - // handle errors defined at the API level. - this.ValidateResponse(response, context); - - return bool.Parse(response.Body); - } - - /// - /// To remove a connection from the ThoughtSpot system, use this endpoint. - /// - /// Required parameter: A JSON array of GUIDs of the connection. - /// Returns the bool response from the API call. - public bool RestapiV2DeleteConnection( - List id) - { - Task t = this.RestapiV2DeleteConnectionAsync(id); - ApiHelper.RunTaskSynchronously(t); - return t.Result; - } - - /// - /// To remove a connection from the ThoughtSpot system, use this endpoint. - /// - /// Required parameter: A JSON array of GUIDs of the connection. - /// cancellationToken. - /// Returns the bool response from the API call. - public async Task RestapiV2DeleteConnectionAsync( - List id, - CancellationToken cancellationToken = default) - { - // validating required parameters. - if (id == null) - { - throw new ArgumentNullException("id", "The parameter \"id\" is a required parameter and cannot be null."); - } - - // the base uri for api requests. - string baseUri = this.Config.GetBaseUri(); - - // prepare query string for API call. - StringBuilder queryBuilder = new StringBuilder(baseUri); - queryBuilder.Append("/tspublic/rest/v2/connection/delete"); - - // prepare specfied query parameters. - var queryParams = new Dictionary() - { - { "id", id }, - }; - - // append request with appropriate headers and parameters - var headers = new Dictionary() - { - { "user-agent", this.UserAgent }, - }; - - // prepare the API call request to fetch the response. - HttpRequest httpRequest = this.GetClientInstance().Delete(queryBuilder.ToString(), headers, null, queryParameters: queryParams); - - if (this.HttpCallBack != null) - { - this.HttpCallBack.OnBeforeHttpRequestEventHandler(this.GetClientInstance(), httpRequest); - } - - httpRequest = await this.AuthManagers["global"].ApplyAsync(httpRequest).ConfigureAwait(false); - - // invoke request and get response. - HttpStringResponse response = await this.GetClientInstance().ExecuteAsStringAsync(httpRequest, cancellationToken: cancellationToken).ConfigureAwait(false); - HttpContext context = new HttpContext(httpRequest, response); - if (this.HttpCallBack != null) - { - this.HttpCallBack.OnAfterHttpResponseEventHandler(this.GetClientInstance(), response); - } - - if (response.StatusCode == 500) - { - throw new ErrorResponseException("Operation failed", context); - } - - // handle errors defined at the API level. - this.ValidateResponse(response, context); - - return bool.Parse(response.Body); - } - - /// - /// To programmatically add table to an existing connection use this endpoint. - /// When you assign groups to a connection, the connection inherits the privileges assigned to those groups. - /// At least one of Connection Id or connectionname is mandatory. When both are given, then connection id will be considered. - /// - /// Required parameter: Example: . - /// Returns the bool response from the API call. - public bool RestapiV2AddTableToConnection( - Models.TspublicRestV2ConnectionAddtableRequest body) - { - Task t = this.RestapiV2AddTableToConnectionAsync(body); - ApiHelper.RunTaskSynchronously(t); - return t.Result; - } - - /// - /// To programmatically add table to an existing connection use this endpoint. - /// When you assign groups to a connection, the connection inherits the privileges assigned to those groups. - /// At least one of Connection Id or connectionname is mandatory. When both are given, then connection id will be considered. - /// - /// Required parameter: Example: . - /// cancellationToken. - /// Returns the bool response from the API call. - public async Task RestapiV2AddTableToConnectionAsync( - Models.TspublicRestV2ConnectionAddtableRequest body, - CancellationToken cancellationToken = default) - { - // validating required parameters. - if (body == null) - { - throw new ArgumentNullException("body", "The parameter \"body\" is a required parameter and cannot be null."); - } - - // the base uri for api requests. - string baseUri = this.Config.GetBaseUri(); - - // prepare query string for API call. - StringBuilder queryBuilder = new StringBuilder(baseUri); - queryBuilder.Append("/tspublic/rest/v2/connection/addtable"); - - // append request with appropriate headers and parameters - var headers = new Dictionary() - { - { "user-agent", this.UserAgent }, - { "Content-Type", "application/json" }, - }; - - // append body params. - var bodyText = ApiHelper.JsonSerialize(body); - - // prepare the API call request to fetch the response. - HttpRequest httpRequest = this.GetClientInstance().PutBody(queryBuilder.ToString(), headers, bodyText); - - if (this.HttpCallBack != null) - { - this.HttpCallBack.OnBeforeHttpRequestEventHandler(this.GetClientInstance(), httpRequest); - } - - httpRequest = await this.AuthManagers["global"].ApplyAsync(httpRequest).ConfigureAwait(false); - - // invoke request and get response. - HttpStringResponse response = await this.GetClientInstance().ExecuteAsStringAsync(httpRequest, cancellationToken: cancellationToken).ConfigureAwait(false); - HttpContext context = new HttpContext(httpRequest, response); - if (this.HttpCallBack != null) - { - this.HttpCallBack.OnAfterHttpResponseEventHandler(this.GetClientInstance(), response); - } - - if (response.StatusCode == 500) - { - throw new ErrorResponseException("Operation failed", context); - } - - // handle errors defined at the API level. - this.ValidateResponse(response, context); - - return bool.Parse(response.Body); - } - - /// - /// To programmatically remove a table from a connection use API endpoint. - /// The API removes only the connection association. It does not delete the connection or group from the Thoughtspot system. - /// At least one of id or name of connection is required. When both are given connection id will be considered. - /// - /// Required parameter: Example: . - /// Returns the bool response from the API call. - public bool RestapiV2RemoveTableFromConnection( - Models.TspublicRestV2ConnectionRemovetableRequest body) - { - Task t = this.RestapiV2RemoveTableFromConnectionAsync(body); - ApiHelper.RunTaskSynchronously(t); - return t.Result; - } - - /// - /// To programmatically remove a table from a connection use API endpoint. - /// The API removes only the connection association. It does not delete the connection or group from the Thoughtspot system. - /// At least one of id or name of connection is required. When both are given connection id will be considered. - /// - /// Required parameter: Example: . - /// cancellationToken. - /// Returns the bool response from the API call. - public async Task RestapiV2RemoveTableFromConnectionAsync( - Models.TspublicRestV2ConnectionRemovetableRequest body, - CancellationToken cancellationToken = default) - { - // validating required parameters. - if (body == null) - { - throw new ArgumentNullException("body", "The parameter \"body\" is a required parameter and cannot be null."); - } - - // the base uri for api requests. - string baseUri = this.Config.GetBaseUri(); - - // prepare query string for API call. - StringBuilder queryBuilder = new StringBuilder(baseUri); - queryBuilder.Append("/tspublic/rest/v2/connection/removetable"); - - // append request with appropriate headers and parameters - var headers = new Dictionary() - { - { "user-agent", this.UserAgent }, - { "Content-Type", "application/json" }, - }; - - // append body params. - var bodyText = ApiHelper.JsonSerialize(body); - - // prepare the API call request to fetch the response. - HttpRequest httpRequest = this.GetClientInstance().PutBody(queryBuilder.ToString(), headers, bodyText); - - if (this.HttpCallBack != null) - { - this.HttpCallBack.OnBeforeHttpRequestEventHandler(this.GetClientInstance(), httpRequest); - } - - httpRequest = await this.AuthManagers["global"].ApplyAsync(httpRequest).ConfigureAwait(false); - - // invoke request and get response. - HttpStringResponse response = await this.GetClientInstance().ExecuteAsStringAsync(httpRequest, cancellationToken: cancellationToken).ConfigureAwait(false); - HttpContext context = new HttpContext(httpRequest, response); - if (this.HttpCallBack != null) - { - this.HttpCallBack.OnAfterHttpResponseEventHandler(this.GetClientInstance(), response); - } - - if (response.StatusCode == 500) - { - throw new ErrorResponseException("Operation failed", context); - } - - // handle errors defined at the API level. - this.ValidateResponse(response, context); - - return bool.Parse(response.Body); - } - - /// - /// To get the details of a specific connection or all connections in the ThoughtSpot system use this end point. - /// - /// Required parameter: Example: . - /// Returns the List of Models.ConnectionResponse response from the API call. - public List RestapiV2SearchConnection( - Models.TspublicRestV2ConnectionSearchRequest body) - { - Task> t = this.RestapiV2SearchConnectionAsync(body); - ApiHelper.RunTaskSynchronously(t); - return t.Result; - } - - /// - /// To get the details of a specific connection or all connections in the ThoughtSpot system use this end point. - /// - /// Required parameter: Example: . - /// cancellationToken. - /// Returns the List of Models.ConnectionResponse response from the API call. - public async Task> RestapiV2SearchConnectionAsync( - Models.TspublicRestV2ConnectionSearchRequest body, - CancellationToken cancellationToken = default) - { - // validating required parameters. - if (body == null) - { - throw new ArgumentNullException("body", "The parameter \"body\" is a required parameter and cannot be null."); - } - - // the base uri for api requests. - string baseUri = this.Config.GetBaseUri(); - - // prepare query string for API call. - StringBuilder queryBuilder = new StringBuilder(baseUri); - queryBuilder.Append("/tspublic/rest/v2/connection/search"); - - // append request with appropriate headers and parameters - var headers = new Dictionary() - { - { "user-agent", this.UserAgent }, - { "accept", "application/json" }, - { "Content-Type", "application/json" }, - }; - - // append body params. - var bodyText = ApiHelper.JsonSerialize(body); - - // prepare the API call request to fetch the response. - HttpRequest httpRequest = this.GetClientInstance().PostBody(queryBuilder.ToString(), headers, bodyText); - - if (this.HttpCallBack != null) - { - this.HttpCallBack.OnBeforeHttpRequestEventHandler(this.GetClientInstance(), httpRequest); - } - - httpRequest = await this.AuthManagers["global"].ApplyAsync(httpRequest).ConfigureAwait(false); - - // invoke request and get response. - HttpStringResponse response = await this.GetClientInstance().ExecuteAsStringAsync(httpRequest, cancellationToken: cancellationToken).ConfigureAwait(false); - HttpContext context = new HttpContext(httpRequest, response); - if (this.HttpCallBack != null) - { - this.HttpCallBack.OnAfterHttpResponseEventHandler(this.GetClientInstance(), response); - } - - if (response.StatusCode == 500) - { - throw new ErrorResponseException("Operation failed", context); - } - - // handle errors defined at the API level. - this.ValidateResponse(response, context); - - return ApiHelper.JsonDeserialize>(response.Body); - } - - /// - /// To get the details of tables from a connection, use this endpoint. . - /// You can get the details of tables in the data platform for the connection id provided. - /// - /// Required parameter: Example: . - /// Returns the Models.ConnectionTableResponse response from the API call. - public Models.ConnectionTableResponse RestapiV2GetConnectionTables( - Models.TspublicRestV2ConnectionTableRequest body) - { - Task t = this.RestapiV2GetConnectionTablesAsync(body); - ApiHelper.RunTaskSynchronously(t); - return t.Result; - } - - /// - /// To get the details of tables from a connection, use this endpoint. . - /// You can get the details of tables in the data platform for the connection id provided. - /// - /// Required parameter: Example: . - /// cancellationToken. - /// Returns the Models.ConnectionTableResponse response from the API call. - public async Task RestapiV2GetConnectionTablesAsync( - Models.TspublicRestV2ConnectionTableRequest body, - CancellationToken cancellationToken = default) - { - // validating required parameters. - if (body == null) - { - throw new ArgumentNullException("body", "The parameter \"body\" is a required parameter and cannot be null."); - } - - // the base uri for api requests. - string baseUri = this.Config.GetBaseUri(); - - // prepare query string for API call. - StringBuilder queryBuilder = new StringBuilder(baseUri); - queryBuilder.Append("/tspublic/rest/v2/connection/table"); - - // append request with appropriate headers and parameters - var headers = new Dictionary() - { - { "user-agent", this.UserAgent }, - { "accept", "application/json" }, - { "Content-Type", "application/json" }, - }; - - // append body params. - var bodyText = ApiHelper.JsonSerialize(body); - - // prepare the API call request to fetch the response. - HttpRequest httpRequest = this.GetClientInstance().PostBody(queryBuilder.ToString(), headers, bodyText); - - if (this.HttpCallBack != null) - { - this.HttpCallBack.OnBeforeHttpRequestEventHandler(this.GetClientInstance(), httpRequest); - } - - httpRequest = await this.AuthManagers["global"].ApplyAsync(httpRequest).ConfigureAwait(false); - - // invoke request and get response. - HttpStringResponse response = await this.GetClientInstance().ExecuteAsStringAsync(httpRequest, cancellationToken: cancellationToken).ConfigureAwait(false); - HttpContext context = new HttpContext(httpRequest, response); - if (this.HttpCallBack != null) - { - this.HttpCallBack.OnAfterHttpResponseEventHandler(this.GetClientInstance(), response); - } - - if (response.StatusCode == 500) - { - throw new ErrorResponseException("Operation failed", context); - } - - // handle errors defined at the API level. - this.ValidateResponse(response, context); - - return ApiHelper.JsonDeserialize(response.Body); - } - - /// - /// To get the details of columns in a table associated to a connection, use this endpoint. . - /// You can get the columns of any table available in the data platform for the connection id provided. - /// - /// Required parameter: Example: . - /// Returns the Models.ConnectionTableColumnsResponse response from the API call. - public Models.ConnectionTableColumnsResponse RestapiV2GetConnectionTableColumns( - Models.TspublicRestV2ConnectionTablecoloumnRequest body) - { - Task t = this.RestapiV2GetConnectionTableColumnsAsync(body); - ApiHelper.RunTaskSynchronously(t); - return t.Result; - } - - /// - /// To get the details of columns in a table associated to a connection, use this endpoint. . - /// You can get the columns of any table available in the data platform for the connection id provided. - /// - /// Required parameter: Example: . - /// cancellationToken. - /// Returns the Models.ConnectionTableColumnsResponse response from the API call. - public async Task RestapiV2GetConnectionTableColumnsAsync( - Models.TspublicRestV2ConnectionTablecoloumnRequest body, - CancellationToken cancellationToken = default) - { - // validating required parameters. - if (body == null) - { - throw new ArgumentNullException("body", "The parameter \"body\" is a required parameter and cannot be null."); - } - - // the base uri for api requests. - string baseUri = this.Config.GetBaseUri(); - - // prepare query string for API call. - StringBuilder queryBuilder = new StringBuilder(baseUri); - queryBuilder.Append("/tspublic/rest/v2/connection/tablecoloumn"); - - // append request with appropriate headers and parameters - var headers = new Dictionary() - { - { "user-agent", this.UserAgent }, - { "accept", "application/json" }, - { "Content-Type", "application/json" }, - }; - - // append body params. - var bodyText = ApiHelper.JsonSerialize(body); - - // prepare the API call request to fetch the response. - HttpRequest httpRequest = this.GetClientInstance().PostBody(queryBuilder.ToString(), headers, bodyText); - - if (this.HttpCallBack != null) - { - this.HttpCallBack.OnBeforeHttpRequestEventHandler(this.GetClientInstance(), httpRequest); - } - - httpRequest = await this.AuthManagers["global"].ApplyAsync(httpRequest).ConfigureAwait(false); - - // invoke request and get response. - HttpStringResponse response = await this.GetClientInstance().ExecuteAsStringAsync(httpRequest, cancellationToken: cancellationToken).ConfigureAwait(false); - HttpContext context = new HttpContext(httpRequest, response); - if (this.HttpCallBack != null) - { - this.HttpCallBack.OnAfterHttpResponseEventHandler(this.GetClientInstance(), response); - } - - if (response.StatusCode == 500) - { - throw new ErrorResponseException("Operation failed", context); - } - - // handle errors defined at the API level. - this.ValidateResponse(response, context); - - return ApiHelper.JsonDeserialize(response.Body); - } - } -} \ No newline at end of file diff --git a/DotNet/ThoughtSpotPublicRESTAPI.Standard/Controllers/CustomActionsController.cs b/DotNet/ThoughtSpotPublicRESTAPI.Standard/Controllers/CustomActionsController.cs deleted file mode 100644 index 3ec797ccd..000000000 --- a/DotNet/ThoughtSpotPublicRESTAPI.Standard/Controllers/CustomActionsController.cs +++ /dev/null @@ -1,668 +0,0 @@ -// -// Copyright (c) APIMatic. All rights reserved. -// -namespace ThoughtSpotPublicRESTAPI.Standard.Controllers -{ - using System; - using System.Collections.Generic; - using System.Dynamic; - using System.Globalization; - using System.IO; - using System.Linq; - using System.Text; - using System.Threading; - using System.Threading.Tasks; - using Newtonsoft.Json.Converters; - using ThoughtSpotPublicRESTAPI.Standard; - using ThoughtSpotPublicRESTAPI.Standard.Authentication; - using ThoughtSpotPublicRESTAPI.Standard.Exceptions; - using ThoughtSpotPublicRESTAPI.Standard.Http.Client; - using ThoughtSpotPublicRESTAPI.Standard.Http.Request; - using ThoughtSpotPublicRESTAPI.Standard.Http.Request.Configuration; - using ThoughtSpotPublicRESTAPI.Standard.Http.Response; - using ThoughtSpotPublicRESTAPI.Standard.Utilities; - - /// - /// CustomActionsController. - /// - public class CustomActionsController : BaseController - { - /// - /// Initializes a new instance of the class. - /// - /// config instance. - /// httpClient. - /// authManager. - /// httpCallBack. - internal CustomActionsController(IConfiguration config, IHttpClient httpClient, IDictionary authManagers, HttpCallBack httpCallBack = null) - : base(config, httpClient, authManagers, httpCallBack) - { - } - - /// - /// To get details of a specific custom action configured in the ThoughtSpot system, use this endpoint. - /// - /// Required parameter: GUID of the custom action. - /// Returns the object response from the API call. - public object RestapiV2GetCustomAction( - string id) - { - Task t = this.RestapiV2GetCustomActionAsync(id); - ApiHelper.RunTaskSynchronously(t); - return t.Result; - } - - /// - /// To get details of a specific custom action configured in the ThoughtSpot system, use this endpoint. - /// - /// Required parameter: GUID of the custom action. - /// cancellationToken. - /// Returns the object response from the API call. - public async Task RestapiV2GetCustomActionAsync( - string id, - CancellationToken cancellationToken = default) - { - // validating required parameters. - if (id == null) - { - throw new ArgumentNullException("id", "The parameter \"id\" is a required parameter and cannot be null."); - } - - // the base uri for api requests. - string baseUri = this.Config.GetBaseUri(); - - // prepare query string for API call. - StringBuilder queryBuilder = new StringBuilder(baseUri); - queryBuilder.Append("/tspublic/rest/v2/customaction"); - - // prepare specfied query parameters. - var queryParams = new Dictionary() - { - { "id", id }, - }; - - // append request with appropriate headers and parameters - var headers = new Dictionary() - { - { "user-agent", this.UserAgent }, - { "accept", "application/json" }, - }; - - // prepare the API call request to fetch the response. - HttpRequest httpRequest = this.GetClientInstance().Get(queryBuilder.ToString(), headers, queryParameters: queryParams); - - if (this.HttpCallBack != null) - { - this.HttpCallBack.OnBeforeHttpRequestEventHandler(this.GetClientInstance(), httpRequest); - } - - httpRequest = await this.AuthManagers["global"].ApplyAsync(httpRequest).ConfigureAwait(false); - - // invoke request and get response. - HttpStringResponse response = await this.GetClientInstance().ExecuteAsStringAsync(httpRequest, cancellationToken: cancellationToken).ConfigureAwait(false); - HttpContext context = new HttpContext(httpRequest, response); - if (this.HttpCallBack != null) - { - this.HttpCallBack.OnAfterHttpResponseEventHandler(this.GetClientInstance(), response); - } - - if (response.StatusCode == 500) - { - throw new ErrorResponseException("Operation failed", context); - } - - // handle errors defined at the API level. - this.ValidateResponse(response, context); - - return response.Body; - } - - /// - /// To search custom actions available on a ThoughtSpot instance, use this endpoint. - /// - /// Required parameter: Example: . - /// Returns the object response from the API call. - public object RestapiV2SearchCustomAction( - Models.TspublicRestV2CustomactionSearchRequest body) - { - Task t = this.RestapiV2SearchCustomActionAsync(body); - ApiHelper.RunTaskSynchronously(t); - return t.Result; - } - - /// - /// To search custom actions available on a ThoughtSpot instance, use this endpoint. - /// - /// Required parameter: Example: . - /// cancellationToken. - /// Returns the object response from the API call. - public async Task RestapiV2SearchCustomActionAsync( - Models.TspublicRestV2CustomactionSearchRequest body, - CancellationToken cancellationToken = default) - { - // validating required parameters. - if (body == null) - { - throw new ArgumentNullException("body", "The parameter \"body\" is a required parameter and cannot be null."); - } - - // the base uri for api requests. - string baseUri = this.Config.GetBaseUri(); - - // prepare query string for API call. - StringBuilder queryBuilder = new StringBuilder(baseUri); - queryBuilder.Append("/tspublic/rest/v2/customaction/search"); - - // append request with appropriate headers and parameters - var headers = new Dictionary() - { - { "user-agent", this.UserAgent }, - { "accept", "application/json" }, - { "Content-Type", "application/json" }, - }; - - // append body params. - var bodyText = ApiHelper.JsonSerialize(body); - - // prepare the API call request to fetch the response. - HttpRequest httpRequest = this.GetClientInstance().PostBody(queryBuilder.ToString(), headers, bodyText); - - if (this.HttpCallBack != null) - { - this.HttpCallBack.OnBeforeHttpRequestEventHandler(this.GetClientInstance(), httpRequest); - } - - httpRequest = await this.AuthManagers["global"].ApplyAsync(httpRequest).ConfigureAwait(false); - - // invoke request and get response. - HttpStringResponse response = await this.GetClientInstance().ExecuteAsStringAsync(httpRequest, cancellationToken: cancellationToken).ConfigureAwait(false); - HttpContext context = new HttpContext(httpRequest, response); - if (this.HttpCallBack != null) - { - this.HttpCallBack.OnAfterHttpResponseEventHandler(this.GetClientInstance(), response); - } - - if (response.StatusCode == 500) - { - throw new ErrorResponseException("Operation failed", context); - } - - // handle errors defined at the API level. - this.ValidateResponse(response, context); - - return response.Body; - } - - /// - /// ThoughtSpot supports associating custom actions to Liveboards, answers, and worksheets. To get the details of the ThoughtSpot objects associated with a custom action, use this endpoint. - /// - /// Required parameter: GUID of the custom action. - /// Returns the object response from the API call. - public object RestapiV2GetCustomActionAssociation( - string id) - { - Task t = this.RestapiV2GetCustomActionAssociationAsync(id); - ApiHelper.RunTaskSynchronously(t); - return t.Result; - } - - /// - /// ThoughtSpot supports associating custom actions to Liveboards, answers, and worksheets. To get the details of the ThoughtSpot objects associated with a custom action, use this endpoint. - /// - /// Required parameter: GUID of the custom action. - /// cancellationToken. - /// Returns the object response from the API call. - public async Task RestapiV2GetCustomActionAssociationAsync( - string id, - CancellationToken cancellationToken = default) - { - // validating required parameters. - if (id == null) - { - throw new ArgumentNullException("id", "The parameter \"id\" is a required parameter and cannot be null."); - } - - // the base uri for api requests. - string baseUri = this.Config.GetBaseUri(); - - // prepare query string for API call. - StringBuilder queryBuilder = new StringBuilder(baseUri); - queryBuilder.Append("/tspublic/rest/v2/customaction/association"); - - // prepare specfied query parameters. - var queryParams = new Dictionary() - { - { "id", id }, - }; - - // append request with appropriate headers and parameters - var headers = new Dictionary() - { - { "user-agent", this.UserAgent }, - { "accept", "application/json" }, - }; - - // prepare the API call request to fetch the response. - HttpRequest httpRequest = this.GetClientInstance().Get(queryBuilder.ToString(), headers, queryParameters: queryParams); - - if (this.HttpCallBack != null) - { - this.HttpCallBack.OnBeforeHttpRequestEventHandler(this.GetClientInstance(), httpRequest); - } - - httpRequest = await this.AuthManagers["global"].ApplyAsync(httpRequest).ConfigureAwait(false); - - // invoke request and get response. - HttpStringResponse response = await this.GetClientInstance().ExecuteAsStringAsync(httpRequest, cancellationToken: cancellationToken).ConfigureAwait(false); - HttpContext context = new HttpContext(httpRequest, response); - if (this.HttpCallBack != null) - { - this.HttpCallBack.OnAfterHttpResponseEventHandler(this.GetClientInstance(), response); - } - - if (response.StatusCode == 500) - { - throw new ErrorResponseException("Operation failed", context); - } - - // handle errors defined at the API level. - this.ValidateResponse(response, context); - - return response.Body; - } - - /// - /// To programmatically create custom actions on ThoughtSpot clusters that support embedding configuration, use this endpoint. - /// - /// Required parameter: Example: . - /// Returns the object response from the API call. - public object RestapiV2CreateCustomAction( - Models.TspublicRestV2CustomactionCreateRequest body) - { - Task t = this.RestapiV2CreateCustomActionAsync(body); - ApiHelper.RunTaskSynchronously(t); - return t.Result; - } - - /// - /// To programmatically create custom actions on ThoughtSpot clusters that support embedding configuration, use this endpoint. - /// - /// Required parameter: Example: . - /// cancellationToken. - /// Returns the object response from the API call. - public async Task RestapiV2CreateCustomActionAsync( - Models.TspublicRestV2CustomactionCreateRequest body, - CancellationToken cancellationToken = default) - { - // validating required parameters. - if (body == null) - { - throw new ArgumentNullException("body", "The parameter \"body\" is a required parameter and cannot be null."); - } - - // the base uri for api requests. - string baseUri = this.Config.GetBaseUri(); - - // prepare query string for API call. - StringBuilder queryBuilder = new StringBuilder(baseUri); - queryBuilder.Append("/tspublic/rest/v2/customaction/create"); - - // append request with appropriate headers and parameters - var headers = new Dictionary() - { - { "user-agent", this.UserAgent }, - { "accept", "application/json" }, - { "Content-Type", "application/json" }, - }; - - // append body params. - var bodyText = ApiHelper.JsonSerialize(body); - - // prepare the API call request to fetch the response. - HttpRequest httpRequest = this.GetClientInstance().PostBody(queryBuilder.ToString(), headers, bodyText); - - if (this.HttpCallBack != null) - { - this.HttpCallBack.OnBeforeHttpRequestEventHandler(this.GetClientInstance(), httpRequest); - } - - httpRequest = await this.AuthManagers["global"].ApplyAsync(httpRequest).ConfigureAwait(false); - - // invoke request and get response. - HttpStringResponse response = await this.GetClientInstance().ExecuteAsStringAsync(httpRequest, cancellationToken: cancellationToken).ConfigureAwait(false); - HttpContext context = new HttpContext(httpRequest, response); - if (this.HttpCallBack != null) - { - this.HttpCallBack.OnAfterHttpResponseEventHandler(this.GetClientInstance(), response); - } - - if (response.StatusCode == 500) - { - throw new ErrorResponseException("Operation failed", context); - } - - // handle errors defined at the API level. - this.ValidateResponse(response, context); - - return response.Body; - } - - /// - /// To programmatically edit an existing custom action, use this endpoint. - /// - /// Required parameter: Example: . - /// Returns the object response from the API call. - public object RestapiV2UpdateCustomAction( - Models.TspublicRestV2CustomactionUpdateRequest body) - { - Task t = this.RestapiV2UpdateCustomActionAsync(body); - ApiHelper.RunTaskSynchronously(t); - return t.Result; - } - - /// - /// To programmatically edit an existing custom action, use this endpoint. - /// - /// Required parameter: Example: . - /// cancellationToken. - /// Returns the object response from the API call. - public async Task RestapiV2UpdateCustomActionAsync( - Models.TspublicRestV2CustomactionUpdateRequest body, - CancellationToken cancellationToken = default) - { - // validating required parameters. - if (body == null) - { - throw new ArgumentNullException("body", "The parameter \"body\" is a required parameter and cannot be null."); - } - - // the base uri for api requests. - string baseUri = this.Config.GetBaseUri(); - - // prepare query string for API call. - StringBuilder queryBuilder = new StringBuilder(baseUri); - queryBuilder.Append("/tspublic/rest/v2/customaction/update"); - - // append request with appropriate headers and parameters - var headers = new Dictionary() - { - { "user-agent", this.UserAgent }, - { "accept", "application/json" }, - { "Content-Type", "application/json" }, - }; - - // append body params. - var bodyText = ApiHelper.JsonSerialize(body); - - // prepare the API call request to fetch the response. - HttpRequest httpRequest = this.GetClientInstance().PutBody(queryBuilder.ToString(), headers, bodyText); - - if (this.HttpCallBack != null) - { - this.HttpCallBack.OnBeforeHttpRequestEventHandler(this.GetClientInstance(), httpRequest); - } - - httpRequest = await this.AuthManagers["global"].ApplyAsync(httpRequest).ConfigureAwait(false); - - // invoke request and get response. - HttpStringResponse response = await this.GetClientInstance().ExecuteAsStringAsync(httpRequest, cancellationToken: cancellationToken).ConfigureAwait(false); - HttpContext context = new HttpContext(httpRequest, response); - if (this.HttpCallBack != null) - { - this.HttpCallBack.OnAfterHttpResponseEventHandler(this.GetClientInstance(), response); - } - - if (response.StatusCode == 500) - { - throw new ErrorResponseException("Operation failed", context); - } - - // handle errors defined at the API level. - this.ValidateResponse(response, context); - - return response.Body; - } - - /// - /// To programmatically delete a custom action, use this endpoint. - /// - /// Required parameter: GUID of the custom action. - /// Returns the object response from the API call. - public object RestapiV2DeleteCustomAction( - string id) - { - Task t = this.RestapiV2DeleteCustomActionAsync(id); - ApiHelper.RunTaskSynchronously(t); - return t.Result; - } - - /// - /// To programmatically delete a custom action, use this endpoint. - /// - /// Required parameter: GUID of the custom action. - /// cancellationToken. - /// Returns the object response from the API call. - public async Task RestapiV2DeleteCustomActionAsync( - string id, - CancellationToken cancellationToken = default) - { - // validating required parameters. - if (id == null) - { - throw new ArgumentNullException("id", "The parameter \"id\" is a required parameter and cannot be null."); - } - - // the base uri for api requests. - string baseUri = this.Config.GetBaseUri(); - - // prepare query string for API call. - StringBuilder queryBuilder = new StringBuilder(baseUri); - queryBuilder.Append("/tspublic/rest/v2/customaction/delete"); - - // prepare specfied query parameters. - var queryParams = new Dictionary() - { - { "id", id }, - }; - - // append request with appropriate headers and parameters - var headers = new Dictionary() - { - { "user-agent", this.UserAgent }, - { "accept", "application/json" }, - }; - - // prepare the API call request to fetch the response. - HttpRequest httpRequest = this.GetClientInstance().Delete(queryBuilder.ToString(), headers, null, queryParameters: queryParams); - - if (this.HttpCallBack != null) - { - this.HttpCallBack.OnBeforeHttpRequestEventHandler(this.GetClientInstance(), httpRequest); - } - - httpRequest = await this.AuthManagers["global"].ApplyAsync(httpRequest).ConfigureAwait(false); - - // invoke request and get response. - HttpStringResponse response = await this.GetClientInstance().ExecuteAsStringAsync(httpRequest, cancellationToken: cancellationToken).ConfigureAwait(false); - HttpContext context = new HttpContext(httpRequest, response); - if (this.HttpCallBack != null) - { - this.HttpCallBack.OnAfterHttpResponseEventHandler(this.GetClientInstance(), response); - } - - if (response.StatusCode == 500) - { - throw new ErrorResponseException("Operation failed", context); - } - - // handle errors defined at the API level. - this.ValidateResponse(response, context); - - return response.Body; - } - - /// - /// To programmatically associate a custom action to a ThoughtSpot object, use this endpoint. - /// - /// Required parameter: Example: . - /// Returns the object response from the API call. - public object RestapiV2UpdateCustomActionAssociation( - Models.TspublicRestV2CustomactionAssociationUpdateRequest body) - { - Task t = this.RestapiV2UpdateCustomActionAssociationAsync(body); - ApiHelper.RunTaskSynchronously(t); - return t.Result; - } - - /// - /// To programmatically associate a custom action to a ThoughtSpot object, use this endpoint. - /// - /// Required parameter: Example: . - /// cancellationToken. - /// Returns the object response from the API call. - public async Task RestapiV2UpdateCustomActionAssociationAsync( - Models.TspublicRestV2CustomactionAssociationUpdateRequest body, - CancellationToken cancellationToken = default) - { - // validating required parameters. - if (body == null) - { - throw new ArgumentNullException("body", "The parameter \"body\" is a required parameter and cannot be null."); - } - - // the base uri for api requests. - string baseUri = this.Config.GetBaseUri(); - - // prepare query string for API call. - StringBuilder queryBuilder = new StringBuilder(baseUri); - queryBuilder.Append("/tspublic/rest/v2/customaction/association/update"); - - // append request with appropriate headers and parameters - var headers = new Dictionary() - { - { "user-agent", this.UserAgent }, - { "accept", "application/json" }, - { "Content-Type", "application/json" }, - }; - - // append body params. - var bodyText = ApiHelper.JsonSerialize(body); - - // prepare the API call request to fetch the response. - HttpRequest httpRequest = this.GetClientInstance().PutBody(queryBuilder.ToString(), headers, bodyText); - - if (this.HttpCallBack != null) - { - this.HttpCallBack.OnBeforeHttpRequestEventHandler(this.GetClientInstance(), httpRequest); - } - - httpRequest = await this.AuthManagers["global"].ApplyAsync(httpRequest).ConfigureAwait(false); - - // invoke request and get response. - HttpStringResponse response = await this.GetClientInstance().ExecuteAsStringAsync(httpRequest, cancellationToken: cancellationToken).ConfigureAwait(false); - HttpContext context = new HttpContext(httpRequest, response); - if (this.HttpCallBack != null) - { - this.HttpCallBack.OnAfterHttpResponseEventHandler(this.GetClientInstance(), response); - } - - if (response.StatusCode == 500) - { - throw new ErrorResponseException("Operation failed", context); - } - - // handle errors defined at the API level. - this.ValidateResponse(response, context); - - return response.Body; - } - - /// - /// To remove custom action associations to ThoughtSpot objects, use this endpoint. - /// - /// Required parameter: GUID of the custom action. - /// Required parameter: A JSON map of the attributes with association of the action to ThoughtSpot object ID Example: {"id":"0dbd5b3a-84c1-4407-9803-cf07d67e6fcf","name":"My worksheet action","version":"v2","type":"URL","detail":{"link":"https://unpkg.com","function":"my-worksheet-action","authSelect":"NONE","authToken":"","encodeUser":"","apiKey":"X-API-KEY","apiValue":"","additionalUrlHeaders":"{}"},"actionAssociationMap":{"WORKSHEET":{"2b9d083a-275c-4984-9cfe-90b036affa17":{"enabled":"true","context":"PRIMARY"}}},"context":"NONE","availability":[ ],"userGroupList":["d0326b56-ef23-4c8a-8327-a30e99bcc72b"]}. - /// Returns the object response from the API call. - public object RestapiV2DeleteCustomActionAssociation( - string id, - string association) - { - Task t = this.RestapiV2DeleteCustomActionAssociationAsync(id, association); - ApiHelper.RunTaskSynchronously(t); - return t.Result; - } - - /// - /// To remove custom action associations to ThoughtSpot objects, use this endpoint. - /// - /// Required parameter: GUID of the custom action. - /// Required parameter: A JSON map of the attributes with association of the action to ThoughtSpot object ID Example: {"id":"0dbd5b3a-84c1-4407-9803-cf07d67e6fcf","name":"My worksheet action","version":"v2","type":"URL","detail":{"link":"https://unpkg.com","function":"my-worksheet-action","authSelect":"NONE","authToken":"","encodeUser":"","apiKey":"X-API-KEY","apiValue":"","additionalUrlHeaders":"{}"},"actionAssociationMap":{"WORKSHEET":{"2b9d083a-275c-4984-9cfe-90b036affa17":{"enabled":"true","context":"PRIMARY"}}},"context":"NONE","availability":[ ],"userGroupList":["d0326b56-ef23-4c8a-8327-a30e99bcc72b"]}. - /// cancellationToken. - /// Returns the object response from the API call. - public async Task RestapiV2DeleteCustomActionAssociationAsync( - string id, - string association, - CancellationToken cancellationToken = default) - { - // validating required parameters. - if (id == null) - { - throw new ArgumentNullException("id", "The parameter \"id\" is a required parameter and cannot be null."); - } - - if (association == null) - { - throw new ArgumentNullException("association", "The parameter \"association\" is a required parameter and cannot be null."); - } - - // the base uri for api requests. - string baseUri = this.Config.GetBaseUri(); - - // prepare query string for API call. - StringBuilder queryBuilder = new StringBuilder(baseUri); - queryBuilder.Append("/tspublic/rest/v2/customactions/association/delete"); - - // prepare specfied query parameters. - var queryParams = new Dictionary() - { - { "id", id }, - { "association", association }, - }; - - // append request with appropriate headers and parameters - var headers = new Dictionary() - { - { "user-agent", this.UserAgent }, - { "accept", "application/json" }, - }; - - // prepare the API call request to fetch the response. - HttpRequest httpRequest = this.GetClientInstance().Delete(queryBuilder.ToString(), headers, null, queryParameters: queryParams); - - if (this.HttpCallBack != null) - { - this.HttpCallBack.OnBeforeHttpRequestEventHandler(this.GetClientInstance(), httpRequest); - } - - httpRequest = await this.AuthManagers["global"].ApplyAsync(httpRequest).ConfigureAwait(false); - - // invoke request and get response. - HttpStringResponse response = await this.GetClientInstance().ExecuteAsStringAsync(httpRequest, cancellationToken: cancellationToken).ConfigureAwait(false); - HttpContext context = new HttpContext(httpRequest, response); - if (this.HttpCallBack != null) - { - this.HttpCallBack.OnAfterHttpResponseEventHandler(this.GetClientInstance(), response); - } - - if (response.StatusCode == 500) - { - throw new ErrorResponseException("Operation failed", context); - } - - // handle errors defined at the API level. - this.ValidateResponse(response, context); - - return response.Body; - } - } -} \ No newline at end of file diff --git a/DotNet/ThoughtSpotPublicRESTAPI.Standard/Controllers/DataController.cs b/DotNet/ThoughtSpotPublicRESTAPI.Standard/Controllers/DataController.cs deleted file mode 100644 index 46b0a18a7..000000000 --- a/DotNet/ThoughtSpotPublicRESTAPI.Standard/Controllers/DataController.cs +++ /dev/null @@ -1,431 +0,0 @@ -// -// Copyright (c) APIMatic. All rights reserved. -// -namespace ThoughtSpotPublicRESTAPI.Standard.Controllers -{ - using System; - using System.Collections.Generic; - using System.Dynamic; - using System.Globalization; - using System.IO; - using System.Linq; - using System.Text; - using System.Threading; - using System.Threading.Tasks; - using Newtonsoft.Json.Converters; - using ThoughtSpotPublicRESTAPI.Standard; - using ThoughtSpotPublicRESTAPI.Standard.Authentication; - using ThoughtSpotPublicRESTAPI.Standard.Exceptions; - using ThoughtSpotPublicRESTAPI.Standard.Http.Client; - using ThoughtSpotPublicRESTAPI.Standard.Http.Request; - using ThoughtSpotPublicRESTAPI.Standard.Http.Request.Configuration; - using ThoughtSpotPublicRESTAPI.Standard.Http.Response; - using ThoughtSpotPublicRESTAPI.Standard.Utilities; - - /// - /// DataController. - /// - public class DataController : BaseController - { - /// - /// Initializes a new instance of the class. - /// - /// config instance. - /// httpClient. - /// authManager. - /// httpCallBack. - internal DataController(IConfiguration config, IHttpClient httpClient, IDictionary authManagers, HttpCallBack httpCallBack = null) - : base(config, httpClient, authManagers, httpCallBack) - { - } - - /// - /// To programmatically retrieve data from ThoughtSpot using search query string, use this endpoint. - /// - /// Required parameter: Example: . - /// Returns the object response from the API call. - public object RestapiV2SearchQueryData( - Models.TspublicRestV2DataSearchRequest body) - { - Task t = this.RestapiV2SearchQueryDataAsync(body); - ApiHelper.RunTaskSynchronously(t); - return t.Result; - } - - /// - /// To programmatically retrieve data from ThoughtSpot using search query string, use this endpoint. - /// - /// Required parameter: Example: . - /// cancellationToken. - /// Returns the object response from the API call. - public async Task RestapiV2SearchQueryDataAsync( - Models.TspublicRestV2DataSearchRequest body, - CancellationToken cancellationToken = default) - { - // validating required parameters. - if (body == null) - { - throw new ArgumentNullException("body", "The parameter \"body\" is a required parameter and cannot be null."); - } - - // the base uri for api requests. - string baseUri = this.Config.GetBaseUri(); - - // prepare query string for API call. - StringBuilder queryBuilder = new StringBuilder(baseUri); - queryBuilder.Append("/tspublic/rest/v2/data/search"); - - // append request with appropriate headers and parameters - var headers = new Dictionary() - { - { "user-agent", this.UserAgent }, - { "accept", "application/json" }, - { "Content-Type", "application/json" }, - }; - - // append body params. - var bodyText = ApiHelper.JsonSerialize(body); - - // prepare the API call request to fetch the response. - HttpRequest httpRequest = this.GetClientInstance().PostBody(queryBuilder.ToString(), headers, bodyText); - - if (this.HttpCallBack != null) - { - this.HttpCallBack.OnBeforeHttpRequestEventHandler(this.GetClientInstance(), httpRequest); - } - - httpRequest = await this.AuthManagers["global"].ApplyAsync(httpRequest).ConfigureAwait(false); - - // invoke request and get response. - HttpStringResponse response = await this.GetClientInstance().ExecuteAsStringAsync(httpRequest, cancellationToken: cancellationToken).ConfigureAwait(false); - HttpContext context = new HttpContext(httpRequest, response); - if (this.HttpCallBack != null) - { - this.HttpCallBack.OnAfterHttpResponseEventHandler(this.GetClientInstance(), response); - } - - if (response.StatusCode == 500) - { - throw new ErrorResponseException("Operation failed", context); - } - - // handle errors defined at the API level. - this.ValidateResponse(response, context); - - return response.Body; - } - - /// - /// To retrieve data related to a Liveboard or visualization from the ThoughtSpot system, you can use this endpoint. - /// - /// Required parameter: Example: . - /// Returns the object response from the API call. - public object RestapiV2LiveboardData( - Models.TspublicRestV2DataLiveboardRequest body) - { - Task t = this.RestapiV2LiveboardDataAsync(body); - ApiHelper.RunTaskSynchronously(t); - return t.Result; - } - - /// - /// To retrieve data related to a Liveboard or visualization from the ThoughtSpot system, you can use this endpoint. - /// - /// Required parameter: Example: . - /// cancellationToken. - /// Returns the object response from the API call. - public async Task RestapiV2LiveboardDataAsync( - Models.TspublicRestV2DataLiveboardRequest body, - CancellationToken cancellationToken = default) - { - // validating required parameters. - if (body == null) - { - throw new ArgumentNullException("body", "The parameter \"body\" is a required parameter and cannot be null."); - } - - // the base uri for api requests. - string baseUri = this.Config.GetBaseUri(); - - // prepare query string for API call. - StringBuilder queryBuilder = new StringBuilder(baseUri); - queryBuilder.Append("/tspublic/rest/v2/data/liveboard"); - - // append request with appropriate headers and parameters - var headers = new Dictionary() - { - { "user-agent", this.UserAgent }, - { "accept", "application/json" }, - { "Content-Type", "application/json" }, - }; - - // append body params. - var bodyText = ApiHelper.JsonSerialize(body); - - // prepare the API call request to fetch the response. - HttpRequest httpRequest = this.GetClientInstance().PostBody(queryBuilder.ToString(), headers, bodyText); - - if (this.HttpCallBack != null) - { - this.HttpCallBack.OnBeforeHttpRequestEventHandler(this.GetClientInstance(), httpRequest); - } - - httpRequest = await this.AuthManagers["global"].ApplyAsync(httpRequest).ConfigureAwait(false); - - // invoke request and get response. - HttpStringResponse response = await this.GetClientInstance().ExecuteAsStringAsync(httpRequest, cancellationToken: cancellationToken).ConfigureAwait(false); - HttpContext context = new HttpContext(httpRequest, response); - if (this.HttpCallBack != null) - { - this.HttpCallBack.OnAfterHttpResponseEventHandler(this.GetClientInstance(), response); - } - - if (response.StatusCode == 500) - { - throw new ErrorResponseException("Operation failed", context); - } - - // handle errors defined at the API level. - this.ValidateResponse(response, context); - - return response.Body; - } - - /// - /// To retrieve data related to a Answer from the ThoughtSpot system, you can use this endpoint. - /// - /// Required parameter: Example: . - /// Returns the object response from the API call. - public object RestapiV2AnswerData( - Models.TspublicRestV2DataAnswerRequest body) - { - Task t = this.RestapiV2AnswerDataAsync(body); - ApiHelper.RunTaskSynchronously(t); - return t.Result; - } - - /// - /// To retrieve data related to a Answer from the ThoughtSpot system, you can use this endpoint. - /// - /// Required parameter: Example: . - /// cancellationToken. - /// Returns the object response from the API call. - public async Task RestapiV2AnswerDataAsync( - Models.TspublicRestV2DataAnswerRequest body, - CancellationToken cancellationToken = default) - { - // validating required parameters. - if (body == null) - { - throw new ArgumentNullException("body", "The parameter \"body\" is a required parameter and cannot be null."); - } - - // the base uri for api requests. - string baseUri = this.Config.GetBaseUri(); - - // prepare query string for API call. - StringBuilder queryBuilder = new StringBuilder(baseUri); - queryBuilder.Append("/tspublic/rest/v2/data/answer"); - - // append request with appropriate headers and parameters - var headers = new Dictionary() - { - { "user-agent", this.UserAgent }, - { "accept", "application/json" }, - { "Content-Type", "application/json" }, - }; - - // append body params. - var bodyText = ApiHelper.JsonSerialize(body); - - // prepare the API call request to fetch the response. - HttpRequest httpRequest = this.GetClientInstance().PostBody(queryBuilder.ToString(), headers, bodyText); - - if (this.HttpCallBack != null) - { - this.HttpCallBack.OnBeforeHttpRequestEventHandler(this.GetClientInstance(), httpRequest); - } - - httpRequest = await this.AuthManagers["global"].ApplyAsync(httpRequest).ConfigureAwait(false); - - // invoke request and get response. - HttpStringResponse response = await this.GetClientInstance().ExecuteAsStringAsync(httpRequest, cancellationToken: cancellationToken).ConfigureAwait(false); - HttpContext context = new HttpContext(httpRequest, response); - if (this.HttpCallBack != null) - { - this.HttpCallBack.OnAfterHttpResponseEventHandler(this.GetClientInstance(), response); - } - - if (response.StatusCode == 500) - { - throw new ErrorResponseException("Operation failed", context); - } - - // handle errors defined at the API level. - this.ValidateResponse(response, context); - - return response.Body; - } - - /// - /// To retrieve the query SQL related to an Answer that is run on the data platform, you can use this endpoint. - /// - /// Required parameter: The GUID of the Answer. - /// Returns the Models.AnswerQueryResponse response from the API call. - public Models.AnswerQueryResponse RestapiV2AnswerQuerySql( - string id) - { - Task t = this.RestapiV2AnswerQuerySqlAsync(id); - ApiHelper.RunTaskSynchronously(t); - return t.Result; - } - - /// - /// To retrieve the query SQL related to an Answer that is run on the data platform, you can use this endpoint. - /// - /// Required parameter: The GUID of the Answer. - /// cancellationToken. - /// Returns the Models.AnswerQueryResponse response from the API call. - public async Task RestapiV2AnswerQuerySqlAsync( - string id, - CancellationToken cancellationToken = default) - { - // validating required parameters. - if (id == null) - { - throw new ArgumentNullException("id", "The parameter \"id\" is a required parameter and cannot be null."); - } - - // the base uri for api requests. - string baseUri = this.Config.GetBaseUri(); - - // prepare query string for API call. - StringBuilder queryBuilder = new StringBuilder(baseUri); - queryBuilder.Append("/tspublic/rest/v2/data/answer/querysql"); - - // prepare specfied query parameters. - var queryParams = new Dictionary() - { - { "id", id }, - }; - - // append request with appropriate headers and parameters - var headers = new Dictionary() - { - { "user-agent", this.UserAgent }, - { "accept", "application/json" }, - }; - - // prepare the API call request to fetch the response. - HttpRequest httpRequest = this.GetClientInstance().Get(queryBuilder.ToString(), headers, queryParameters: queryParams); - - if (this.HttpCallBack != null) - { - this.HttpCallBack.OnBeforeHttpRequestEventHandler(this.GetClientInstance(), httpRequest); - } - - httpRequest = await this.AuthManagers["global"].ApplyAsync(httpRequest).ConfigureAwait(false); - - // invoke request and get response. - HttpStringResponse response = await this.GetClientInstance().ExecuteAsStringAsync(httpRequest, cancellationToken: cancellationToken).ConfigureAwait(false); - HttpContext context = new HttpContext(httpRequest, response); - if (this.HttpCallBack != null) - { - this.HttpCallBack.OnAfterHttpResponseEventHandler(this.GetClientInstance(), response); - } - - if (response.StatusCode == 500) - { - throw new ErrorResponseException("Operation failed", context); - } - - // handle errors defined at the API level. - this.ValidateResponse(response, context); - - return ApiHelper.JsonDeserialize(response.Body); - } - - /// - /// To retrieve the query SQL related to a Visualization in a Liveboard that is run on the data platform, you can use this endpoint. - /// - /// Required parameter: The GUID of the Answer. - /// Optional parameter: A JSON array of GUIDs of the visualizations in the Liveboard.. - /// Returns the Models.LiveboardQueryResponse response from the API call. - public Models.LiveboardQueryResponse RestapiV2LiveboardQuerySql( - string id, - List vizId = null) - { - Task t = this.RestapiV2LiveboardQuerySqlAsync(id, vizId); - ApiHelper.RunTaskSynchronously(t); - return t.Result; - } - - /// - /// To retrieve the query SQL related to a Visualization in a Liveboard that is run on the data platform, you can use this endpoint. - /// - /// Required parameter: The GUID of the Answer. - /// Optional parameter: A JSON array of GUIDs of the visualizations in the Liveboard.. - /// cancellationToken. - /// Returns the Models.LiveboardQueryResponse response from the API call. - public async Task RestapiV2LiveboardQuerySqlAsync( - string id, - List vizId = null, - CancellationToken cancellationToken = default) - { - // validating required parameters. - if (id == null) - { - throw new ArgumentNullException("id", "The parameter \"id\" is a required parameter and cannot be null."); - } - - // the base uri for api requests. - string baseUri = this.Config.GetBaseUri(); - - // prepare query string for API call. - StringBuilder queryBuilder = new StringBuilder(baseUri); - queryBuilder.Append("/tspublic/rest/v2/data/liveboard/querysql"); - - // prepare specfied query parameters. - var queryParams = new Dictionary() - { - { "id", id }, - { "vizId", vizId }, - }; - - // append request with appropriate headers and parameters - var headers = new Dictionary() - { - { "user-agent", this.UserAgent }, - { "accept", "application/json" }, - }; - - // prepare the API call request to fetch the response. - HttpRequest httpRequest = this.GetClientInstance().Get(queryBuilder.ToString(), headers, queryParameters: queryParams); - - if (this.HttpCallBack != null) - { - this.HttpCallBack.OnBeforeHttpRequestEventHandler(this.GetClientInstance(), httpRequest); - } - - httpRequest = await this.AuthManagers["global"].ApplyAsync(httpRequest).ConfigureAwait(false); - - // invoke request and get response. - HttpStringResponse response = await this.GetClientInstance().ExecuteAsStringAsync(httpRequest, cancellationToken: cancellationToken).ConfigureAwait(false); - HttpContext context = new HttpContext(httpRequest, response); - if (this.HttpCallBack != null) - { - this.HttpCallBack.OnAfterHttpResponseEventHandler(this.GetClientInstance(), response); - } - - if (response.StatusCode == 500) - { - throw new ErrorResponseException("Operation failed", context); - } - - // handle errors defined at the API level. - this.ValidateResponse(response, context); - - return ApiHelper.JsonDeserialize(response.Body); - } - } -} \ No newline at end of file diff --git a/DotNet/ThoughtSpotPublicRESTAPI.Standard/Controllers/DatabaseController.cs b/DotNet/ThoughtSpotPublicRESTAPI.Standard/Controllers/DatabaseController.cs deleted file mode 100644 index afdfb1946..000000000 --- a/DotNet/ThoughtSpotPublicRESTAPI.Standard/Controllers/DatabaseController.cs +++ /dev/null @@ -1,455 +0,0 @@ -// -// Copyright (c) APIMatic. All rights reserved. -// -namespace ThoughtSpotPublicRESTAPI.Standard.Controllers -{ - using System; - using System.Collections.Generic; - using System.Dynamic; - using System.Globalization; - using System.IO; - using System.Linq; - using System.Text; - using System.Threading; - using System.Threading.Tasks; - using Newtonsoft.Json.Converters; - using ThoughtSpotPublicRESTAPI.Standard; - using ThoughtSpotPublicRESTAPI.Standard.Authentication; - using ThoughtSpotPublicRESTAPI.Standard.Exceptions; - using ThoughtSpotPublicRESTAPI.Standard.Http.Client; - using ThoughtSpotPublicRESTAPI.Standard.Http.Request; - using ThoughtSpotPublicRESTAPI.Standard.Http.Request.Configuration; - using ThoughtSpotPublicRESTAPI.Standard.Http.Response; - using ThoughtSpotPublicRESTAPI.Standard.Utilities; - - /// - /// DatabaseController. - /// - public class DatabaseController : BaseController - { - /// - /// Initializes a new instance of the class. - /// - /// config instance. - /// httpClient. - /// authManager. - /// httpCallBack. - internal DatabaseController(IConfiguration config, IHttpClient httpClient, IDictionary authManagers, HttpCallBack httpCallBack = null) - : base(config, httpClient, authManagers, httpCallBack) - { - } - - /// - /// To list all the schemas in a database in Falcon, use this endpoint. - /// - /// Required parameter: Name of the Falcon database. - /// Returns the List of string response from the API call. - public List RestapiV2GetSchemas( - string database) - { - Task> t = this.RestapiV2GetSchemasAsync(database); - ApiHelper.RunTaskSynchronously(t); - return t.Result; - } - - /// - /// To list all the schemas in a database in Falcon, use this endpoint. - /// - /// Required parameter: Name of the Falcon database. - /// cancellationToken. - /// Returns the List of string response from the API call. - public async Task> RestapiV2GetSchemasAsync( - string database, - CancellationToken cancellationToken = default) - { - // validating required parameters. - if (database == null) - { - throw new ArgumentNullException("database", "The parameter \"database\" is a required parameter and cannot be null."); - } - - // the base uri for api requests. - string baseUri = this.Config.GetBaseUri(); - - // prepare query string for API call. - StringBuilder queryBuilder = new StringBuilder(baseUri); - queryBuilder.Append("/tspublic/rest/v2/database/schema"); - - // prepare specfied query parameters. - var queryParams = new Dictionary() - { - { "database", database }, - }; - - // append request with appropriate headers and parameters - var headers = new Dictionary() - { - { "user-agent", this.UserAgent }, - { "accept", "application/json" }, - }; - - // prepare the API call request to fetch the response. - HttpRequest httpRequest = this.GetClientInstance().Get(queryBuilder.ToString(), headers, queryParameters: queryParams); - - if (this.HttpCallBack != null) - { - this.HttpCallBack.OnBeforeHttpRequestEventHandler(this.GetClientInstance(), httpRequest); - } - - httpRequest = await this.AuthManagers["global"].ApplyAsync(httpRequest).ConfigureAwait(false); - - // invoke request and get response. - HttpStringResponse response = await this.GetClientInstance().ExecuteAsStringAsync(httpRequest, cancellationToken: cancellationToken).ConfigureAwait(false); - HttpContext context = new HttpContext(httpRequest, response); - if (this.HttpCallBack != null) - { - this.HttpCallBack.OnAfterHttpResponseEventHandler(this.GetClientInstance(), response); - } - - if (response.StatusCode == 500) - { - throw new ErrorResponseException("Operation failed", context); - } - - // handle errors defined at the API level. - this.ValidateResponse(response, context); - - return ApiHelper.JsonDeserialize>(response.Body); - } - - /// - /// To list all the tables in a schema of a database in Falcon, use this endpoint. - /// - /// Required parameter: Name of the Falcon database. - /// Required parameter: Name of the schema in Falcon database. - /// Returns the List of string response from the API call. - public List RestapiV2GetTables( - string database, - string schema) - { - Task> t = this.RestapiV2GetTablesAsync(database, schema); - ApiHelper.RunTaskSynchronously(t); - return t.Result; - } - - /// - /// To list all the tables in a schema of a database in Falcon, use this endpoint. - /// - /// Required parameter: Name of the Falcon database. - /// Required parameter: Name of the schema in Falcon database. - /// cancellationToken. - /// Returns the List of string response from the API call. - public async Task> RestapiV2GetTablesAsync( - string database, - string schema, - CancellationToken cancellationToken = default) - { - // validating required parameters. - if (database == null) - { - throw new ArgumentNullException("database", "The parameter \"database\" is a required parameter and cannot be null."); - } - - if (schema == null) - { - throw new ArgumentNullException("schema", "The parameter \"schema\" is a required parameter and cannot be null."); - } - - // the base uri for api requests. - string baseUri = this.Config.GetBaseUri(); - - // prepare query string for API call. - StringBuilder queryBuilder = new StringBuilder(baseUri); - queryBuilder.Append("/tspublic/rest/v2/database/table"); - - // prepare specfied query parameters. - var queryParams = new Dictionary() - { - { "database", database }, - { "schema", schema }, - }; - - // append request with appropriate headers and parameters - var headers = new Dictionary() - { - { "user-agent", this.UserAgent }, - { "accept", "application/json" }, - }; - - // prepare the API call request to fetch the response. - HttpRequest httpRequest = this.GetClientInstance().Get(queryBuilder.ToString(), headers, queryParameters: queryParams); - - if (this.HttpCallBack != null) - { - this.HttpCallBack.OnBeforeHttpRequestEventHandler(this.GetClientInstance(), httpRequest); - } - - httpRequest = await this.AuthManagers["global"].ApplyAsync(httpRequest).ConfigureAwait(false); - - // invoke request and get response. - HttpStringResponse response = await this.GetClientInstance().ExecuteAsStringAsync(httpRequest, cancellationToken: cancellationToken).ConfigureAwait(false); - HttpContext context = new HttpContext(httpRequest, response); - if (this.HttpCallBack != null) - { - this.HttpCallBack.OnAfterHttpResponseEventHandler(this.GetClientInstance(), response); - } - - if (response.StatusCode == 500) - { - throw new ErrorResponseException("Operation failed", context); - } - - // handle errors defined at the API level. - this.ValidateResponse(response, context); - - return ApiHelper.JsonDeserialize>(response.Body); - } - - /// - /// Note: This endpoint is applicable only for on-prem deployments. . - /// To provide details of a table in a schema of a database in Falcon, use this endpoint. - /// - /// Required parameter: Name of the Falcon database. - /// Required parameter: Name of the table in Falcon database. - /// Optional parameter: Name of the schema in Falcon database. - /// Returns the object response from the API call. - public object RestapiV2GetTableDetails( - string database, - string table, - string schema = null) - { - Task t = this.RestapiV2GetTableDetailsAsync(database, table, schema); - ApiHelper.RunTaskSynchronously(t); - return t.Result; - } - - /// - /// Note: This endpoint is applicable only for on-prem deployments. . - /// To provide details of a table in a schema of a database in Falcon, use this endpoint. - /// - /// Required parameter: Name of the Falcon database. - /// Required parameter: Name of the table in Falcon database. - /// Optional parameter: Name of the schema in Falcon database. - /// cancellationToken. - /// Returns the object response from the API call. - public async Task RestapiV2GetTableDetailsAsync( - string database, - string table, - string schema = null, - CancellationToken cancellationToken = default) - { - // validating required parameters. - if (database == null) - { - throw new ArgumentNullException("database", "The parameter \"database\" is a required parameter and cannot be null."); - } - - if (table == null) - { - throw new ArgumentNullException("table", "The parameter \"table\" is a required parameter and cannot be null."); - } - - // the base uri for api requests. - string baseUri = this.Config.GetBaseUri(); - - // prepare query string for API call. - StringBuilder queryBuilder = new StringBuilder(baseUri); - queryBuilder.Append("/tspublic/rest/v2/database/table/detail"); - - // prepare specfied query parameters. - var queryParams = new Dictionary() - { - { "database", database }, - { "table", table }, - { "schema", schema }, - }; - - // append request with appropriate headers and parameters - var headers = new Dictionary() - { - { "user-agent", this.UserAgent }, - { "accept", "application/json" }, - }; - - // prepare the API call request to fetch the response. - HttpRequest httpRequest = this.GetClientInstance().Get(queryBuilder.ToString(), headers, queryParameters: queryParams); - - if (this.HttpCallBack != null) - { - this.HttpCallBack.OnBeforeHttpRequestEventHandler(this.GetClientInstance(), httpRequest); - } - - httpRequest = await this.AuthManagers["global"].ApplyAsync(httpRequest).ConfigureAwait(false); - - // invoke request and get response. - HttpStringResponse response = await this.GetClientInstance().ExecuteAsStringAsync(httpRequest, cancellationToken: cancellationToken).ConfigureAwait(false); - HttpContext context = new HttpContext(httpRequest, response); - if (this.HttpCallBack != null) - { - this.HttpCallBack.OnAfterHttpResponseEventHandler(this.GetClientInstance(), response); - } - - if (response.StatusCode == 500) - { - throw new ErrorResponseException("Operation failed", context); - } - - // handle errors defined at the API level. - this.ValidateResponse(response, context); - - return response.Body; - } - - /// - /// To create a table in Falcon, use this endpoint. - /// - /// Required parameter: Example: . - /// Returns the Models.CreateTableResponse response from the API call. - public Models.CreateTableResponse RestapiV2CreateTable( - Models.TspublicRestV2DatabaseTableCreateRequest body) - { - Task t = this.RestapiV2CreateTableAsync(body); - ApiHelper.RunTaskSynchronously(t); - return t.Result; - } - - /// - /// To create a table in Falcon, use this endpoint. - /// - /// Required parameter: Example: . - /// cancellationToken. - /// Returns the Models.CreateTableResponse response from the API call. - public async Task RestapiV2CreateTableAsync( - Models.TspublicRestV2DatabaseTableCreateRequest body, - CancellationToken cancellationToken = default) - { - // validating required parameters. - if (body == null) - { - throw new ArgumentNullException("body", "The parameter \"body\" is a required parameter and cannot be null."); - } - - // the base uri for api requests. - string baseUri = this.Config.GetBaseUri(); - - // prepare query string for API call. - StringBuilder queryBuilder = new StringBuilder(baseUri); - queryBuilder.Append("/tspublic/rest/v2/database/table/create"); - - // append request with appropriate headers and parameters - var headers = new Dictionary() - { - { "user-agent", this.UserAgent }, - { "accept", "application/json" }, - { "Content-Type", "application/json" }, - }; - - // append body params. - var bodyText = ApiHelper.JsonSerialize(body); - - // prepare the API call request to fetch the response. - HttpRequest httpRequest = this.GetClientInstance().PostBody(queryBuilder.ToString(), headers, bodyText); - - if (this.HttpCallBack != null) - { - this.HttpCallBack.OnBeforeHttpRequestEventHandler(this.GetClientInstance(), httpRequest); - } - - httpRequest = await this.AuthManagers["global"].ApplyAsync(httpRequest).ConfigureAwait(false); - - // invoke request and get response. - HttpStringResponse response = await this.GetClientInstance().ExecuteAsStringAsync(httpRequest, cancellationToken: cancellationToken).ConfigureAwait(false); - HttpContext context = new HttpContext(httpRequest, response); - if (this.HttpCallBack != null) - { - this.HttpCallBack.OnAfterHttpResponseEventHandler(this.GetClientInstance(), response); - } - - if (response.StatusCode == 500) - { - throw new ErrorResponseException("Operation failed", context); - } - - // handle errors defined at the API level. - this.ValidateResponse(response, context); - - return ApiHelper.JsonDeserialize(response.Body); - } - - /// - /// To run a TQL statement in Falcon, use this endpoint. You can run only following type of statements - Table DDL alter and Table rows update and delete. - /// - /// Required parameter: Example: . - /// Returns the object response from the API call. - public object RestapiV2RunQuery( - Models.TspublicRestV2DatabaseTableRunqueryRequest body) - { - Task t = this.RestapiV2RunQueryAsync(body); - ApiHelper.RunTaskSynchronously(t); - return t.Result; - } - - /// - /// To run a TQL statement in Falcon, use this endpoint. You can run only following type of statements - Table DDL alter and Table rows update and delete. - /// - /// Required parameter: Example: . - /// cancellationToken. - /// Returns the object response from the API call. - public async Task RestapiV2RunQueryAsync( - Models.TspublicRestV2DatabaseTableRunqueryRequest body, - CancellationToken cancellationToken = default) - { - // validating required parameters. - if (body == null) - { - throw new ArgumentNullException("body", "The parameter \"body\" is a required parameter and cannot be null."); - } - - // the base uri for api requests. - string baseUri = this.Config.GetBaseUri(); - - // prepare query string for API call. - StringBuilder queryBuilder = new StringBuilder(baseUri); - queryBuilder.Append("/tspublic/rest/v2/database/table/runquery"); - - // append request with appropriate headers and parameters - var headers = new Dictionary() - { - { "user-agent", this.UserAgent }, - { "accept", "application/json" }, - { "Content-Type", "application/json" }, - }; - - // append body params. - var bodyText = ApiHelper.JsonSerialize(body); - - // prepare the API call request to fetch the response. - HttpRequest httpRequest = this.GetClientInstance().PostBody(queryBuilder.ToString(), headers, bodyText); - - if (this.HttpCallBack != null) - { - this.HttpCallBack.OnBeforeHttpRequestEventHandler(this.GetClientInstance(), httpRequest); - } - - httpRequest = await this.AuthManagers["global"].ApplyAsync(httpRequest).ConfigureAwait(false); - - // invoke request and get response. - HttpStringResponse response = await this.GetClientInstance().ExecuteAsStringAsync(httpRequest, cancellationToken: cancellationToken).ConfigureAwait(false); - HttpContext context = new HttpContext(httpRequest, response); - if (this.HttpCallBack != null) - { - this.HttpCallBack.OnAfterHttpResponseEventHandler(this.GetClientInstance(), response); - } - - if (response.StatusCode == 500) - { - throw new ErrorResponseException("Operation failed", context); - } - - // handle errors defined at the API level. - this.ValidateResponse(response, context); - - return ApiHelper.JsonDeserialize(response.Body); - } - } -} \ No newline at end of file diff --git a/DotNet/ThoughtSpotPublicRESTAPI.Standard/Controllers/GroupController.cs b/DotNet/ThoughtSpotPublicRESTAPI.Standard/Controllers/GroupController.cs deleted file mode 100644 index e40849a1b..000000000 --- a/DotNet/ThoughtSpotPublicRESTAPI.Standard/Controllers/GroupController.cs +++ /dev/null @@ -1,882 +0,0 @@ -// -// Copyright (c) APIMatic. All rights reserved. -// -namespace ThoughtSpotPublicRESTAPI.Standard.Controllers -{ - using System; - using System.Collections.Generic; - using System.Dynamic; - using System.Globalization; - using System.IO; - using System.Linq; - using System.Text; - using System.Threading; - using System.Threading.Tasks; - using Newtonsoft.Json.Converters; - using ThoughtSpotPublicRESTAPI.Standard; - using ThoughtSpotPublicRESTAPI.Standard.Authentication; - using ThoughtSpotPublicRESTAPI.Standard.Exceptions; - using ThoughtSpotPublicRESTAPI.Standard.Http.Client; - using ThoughtSpotPublicRESTAPI.Standard.Http.Request; - using ThoughtSpotPublicRESTAPI.Standard.Http.Request.Configuration; - using ThoughtSpotPublicRESTAPI.Standard.Http.Response; - using ThoughtSpotPublicRESTAPI.Standard.Utilities; - - /// - /// GroupController. - /// - public class GroupController : BaseController - { - /// - /// Initializes a new instance of the class. - /// - /// config instance. - /// httpClient. - /// authManager. - /// httpCallBack. - internal GroupController(IConfiguration config, IHttpClient httpClient, IDictionary authManagers, HttpCallBack httpCallBack = null) - : base(config, httpClient, authManagers, httpCallBack) - { - } - - /// - /// To get the details of a specific group by name or id, use this endpoint. - /// At Least one value needed. When both are given id will be considered to fetch user information. - /// - /// Optional parameter: Name of the group. - /// Optional parameter: The GUID of the group to query.. - /// Returns the Models.GroupResponse response from the API call. - public Models.GroupResponse RestapiV2GetGroup( - string name = null, - string id = null) - { - Task t = this.RestapiV2GetGroupAsync(name, id); - ApiHelper.RunTaskSynchronously(t); - return t.Result; - } - - /// - /// To get the details of a specific group by name or id, use this endpoint. - /// At Least one value needed. When both are given id will be considered to fetch user information. - /// - /// Optional parameter: Name of the group. - /// Optional parameter: The GUID of the group to query.. - /// cancellationToken. - /// Returns the Models.GroupResponse response from the API call. - public async Task RestapiV2GetGroupAsync( - string name = null, - string id = null, - CancellationToken cancellationToken = default) - { - // the base uri for api requests. - string baseUri = this.Config.GetBaseUri(); - - // prepare query string for API call. - StringBuilder queryBuilder = new StringBuilder(baseUri); - queryBuilder.Append("/tspublic/rest/v2/group"); - - // prepare specfied query parameters. - var queryParams = new Dictionary() - { - { "name", name }, - { "id", id }, - }; - - // append request with appropriate headers and parameters - var headers = new Dictionary() - { - { "user-agent", this.UserAgent }, - { "accept", "application/json" }, - }; - - // prepare the API call request to fetch the response. - HttpRequest httpRequest = this.GetClientInstance().Get(queryBuilder.ToString(), headers, queryParameters: queryParams); - - if (this.HttpCallBack != null) - { - this.HttpCallBack.OnBeforeHttpRequestEventHandler(this.GetClientInstance(), httpRequest); - } - - httpRequest = await this.AuthManagers["global"].ApplyAsync(httpRequest).ConfigureAwait(false); - - // invoke request and get response. - HttpStringResponse response = await this.GetClientInstance().ExecuteAsStringAsync(httpRequest, cancellationToken: cancellationToken).ConfigureAwait(false); - HttpContext context = new HttpContext(httpRequest, response); - if (this.HttpCallBack != null) - { - this.HttpCallBack.OnAfterHttpResponseEventHandler(this.GetClientInstance(), response); - } - - if (response.StatusCode == 500) - { - throw new ErrorResponseException("Operation failed", context); - } - - // handle errors defined at the API level. - this.ValidateResponse(response, context); - - return ApiHelper.JsonDeserialize(response.Body); - } - - /// - /// To programmatically create a group in the ThoughtSpot system, use this API endpoint. Using this API, you can create a group and assign privileges and users. For ease of user management and access control, ThoughtSpot administrators can create groups and assign privileges to these groups. The privileges determine the actions that the users belonging to a group are allowed to do. ThoughtSpot also has a default group called ALL_GROUP. When you create new group in ThoughtSpot, they are automatically added to ALL_GROUP. You cannot delete the ALL_GROUP or remove members from it. - /// - /// Required parameter: Example: . - /// Returns the Models.GroupResponse response from the API call. - public Models.GroupResponse RestapiV2CreateGroup( - Models.TspublicRestV2GroupCreateRequest body) - { - Task t = this.RestapiV2CreateGroupAsync(body); - ApiHelper.RunTaskSynchronously(t); - return t.Result; - } - - /// - /// To programmatically create a group in the ThoughtSpot system, use this API endpoint. Using this API, you can create a group and assign privileges and users. For ease of user management and access control, ThoughtSpot administrators can create groups and assign privileges to these groups. The privileges determine the actions that the users belonging to a group are allowed to do. ThoughtSpot also has a default group called ALL_GROUP. When you create new group in ThoughtSpot, they are automatically added to ALL_GROUP. You cannot delete the ALL_GROUP or remove members from it. - /// - /// Required parameter: Example: . - /// cancellationToken. - /// Returns the Models.GroupResponse response from the API call. - public async Task RestapiV2CreateGroupAsync( - Models.TspublicRestV2GroupCreateRequest body, - CancellationToken cancellationToken = default) - { - // validating required parameters. - if (body == null) - { - throw new ArgumentNullException("body", "The parameter \"body\" is a required parameter and cannot be null."); - } - - // the base uri for api requests. - string baseUri = this.Config.GetBaseUri(); - - // prepare query string for API call. - StringBuilder queryBuilder = new StringBuilder(baseUri); - queryBuilder.Append("/tspublic/rest/v2/group/create"); - - // append request with appropriate headers and parameters - var headers = new Dictionary() - { - { "user-agent", this.UserAgent }, - { "accept", "application/json" }, - { "Content-Type", "application/json" }, - }; - - // append body params. - var bodyText = ApiHelper.JsonSerialize(body); - - // prepare the API call request to fetch the response. - HttpRequest httpRequest = this.GetClientInstance().PostBody(queryBuilder.ToString(), headers, bodyText); - - if (this.HttpCallBack != null) - { - this.HttpCallBack.OnBeforeHttpRequestEventHandler(this.GetClientInstance(), httpRequest); - } - - httpRequest = await this.AuthManagers["global"].ApplyAsync(httpRequest).ConfigureAwait(false); - - // invoke request and get response. - HttpStringResponse response = await this.GetClientInstance().ExecuteAsStringAsync(httpRequest, cancellationToken: cancellationToken).ConfigureAwait(false); - HttpContext context = new HttpContext(httpRequest, response); - if (this.HttpCallBack != null) - { - this.HttpCallBack.OnAfterHttpResponseEventHandler(this.GetClientInstance(), response); - } - - if (response.StatusCode == 500) - { - throw new ErrorResponseException("Operation failed", context); - } - - // handle errors defined at the API level. - this.ValidateResponse(response, context); - - return ApiHelper.JsonDeserialize(response.Body); - } - - /// - /// You can use this endpoint to programmatically modify an existing user account. - /// To modify a user, you require admin user privileges. - /// At least one of User Id or username is mandatory. When both are given, then user id will be considered and username will be updated. - /// - /// Required parameter: Example: . - /// Returns the bool response from the API call. - public bool RestapiV2UpdateGroup( - Models.TspublicRestV2GroupUpdateRequest body) - { - Task t = this.RestapiV2UpdateGroupAsync(body); - ApiHelper.RunTaskSynchronously(t); - return t.Result; - } - - /// - /// You can use this endpoint to programmatically modify an existing user account. - /// To modify a user, you require admin user privileges. - /// At least one of User Id or username is mandatory. When both are given, then user id will be considered and username will be updated. - /// - /// Required parameter: Example: . - /// cancellationToken. - /// Returns the bool response from the API call. - public async Task RestapiV2UpdateGroupAsync( - Models.TspublicRestV2GroupUpdateRequest body, - CancellationToken cancellationToken = default) - { - // validating required parameters. - if (body == null) - { - throw new ArgumentNullException("body", "The parameter \"body\" is a required parameter and cannot be null."); - } - - // the base uri for api requests. - string baseUri = this.Config.GetBaseUri(); - - // prepare query string for API call. - StringBuilder queryBuilder = new StringBuilder(baseUri); - queryBuilder.Append("/tspublic/rest/v2/group/update"); - - // append request with appropriate headers and parameters - var headers = new Dictionary() - { - { "user-agent", this.UserAgent }, - { "Content-Type", "application/json" }, - }; - - // append body params. - var bodyText = ApiHelper.JsonSerialize(body); - - // prepare the API call request to fetch the response. - HttpRequest httpRequest = this.GetClientInstance().PutBody(queryBuilder.ToString(), headers, bodyText); - - if (this.HttpCallBack != null) - { - this.HttpCallBack.OnBeforeHttpRequestEventHandler(this.GetClientInstance(), httpRequest); - } - - httpRequest = await this.AuthManagers["global"].ApplyAsync(httpRequest).ConfigureAwait(false); - - // invoke request and get response. - HttpStringResponse response = await this.GetClientInstance().ExecuteAsStringAsync(httpRequest, cancellationToken: cancellationToken).ConfigureAwait(false); - HttpContext context = new HttpContext(httpRequest, response); - if (this.HttpCallBack != null) - { - this.HttpCallBack.OnAfterHttpResponseEventHandler(this.GetClientInstance(), response); - } - - if (response.StatusCode == 500) - { - throw new ErrorResponseException("Operation failed", context); - } - - // handle errors defined at the API level. - this.ValidateResponse(response, context); - - return bool.Parse(response.Body); - } - - /// - /// To remove a group from the ThoughtSpot system, send a DELETE request to this endpoint. At Least one value needed. When both are given user id will be considered to fetch user information. - /// - /// Optional parameter: Name of the group.. - /// Optional parameter: The GUID of the group. - /// Returns the bool response from the API call. - public bool RestapiV2DeleteGroup( - string name = null, - string id = null) - { - Task t = this.RestapiV2DeleteGroupAsync(name, id); - ApiHelper.RunTaskSynchronously(t); - return t.Result; - } - - /// - /// To remove a group from the ThoughtSpot system, send a DELETE request to this endpoint. At Least one value needed. When both are given user id will be considered to fetch user information. - /// - /// Optional parameter: Name of the group.. - /// Optional parameter: The GUID of the group. - /// cancellationToken. - /// Returns the bool response from the API call. - public async Task RestapiV2DeleteGroupAsync( - string name = null, - string id = null, - CancellationToken cancellationToken = default) - { - // the base uri for api requests. - string baseUri = this.Config.GetBaseUri(); - - // prepare query string for API call. - StringBuilder queryBuilder = new StringBuilder(baseUri); - queryBuilder.Append("/tspublic/rest/v2/group/delete"); - - // prepare specfied query parameters. - var queryParams = new Dictionary() - { - { "name", name }, - { "id", id }, - }; - - // append request with appropriate headers and parameters - var headers = new Dictionary() - { - { "user-agent", this.UserAgent }, - }; - - // prepare the API call request to fetch the response. - HttpRequest httpRequest = this.GetClientInstance().Delete(queryBuilder.ToString(), headers, null, queryParameters: queryParams); - - if (this.HttpCallBack != null) - { - this.HttpCallBack.OnBeforeHttpRequestEventHandler(this.GetClientInstance(), httpRequest); - } - - httpRequest = await this.AuthManagers["global"].ApplyAsync(httpRequest).ConfigureAwait(false); - - // invoke request and get response. - HttpStringResponse response = await this.GetClientInstance().ExecuteAsStringAsync(httpRequest, cancellationToken: cancellationToken).ConfigureAwait(false); - HttpContext context = new HttpContext(httpRequest, response); - if (this.HttpCallBack != null) - { - this.HttpCallBack.OnAfterHttpResponseEventHandler(this.GetClientInstance(), response); - } - - if (response.StatusCode == 500) - { - throw new ErrorResponseException("Operation failed", context); - } - - // handle errors defined at the API level. - this.ValidateResponse(response, context); - - return bool.Parse(response.Body); - } - - /// - /// To programmatically add privileges to an existing group, use API endpoint. - /// When you assign privileges to a group, all the users under to this group inherits the privileges assigned to that group. - /// At least one of id or name of group is required. When both are given user id will be considered. - /// - /// Required parameter: Example: . - /// Returns the bool response from the API call. - public bool RestapiV2AddPrivilegesToGroup( - Models.TspublicRestV2GroupAddprivilegeRequest body) - { - Task t = this.RestapiV2AddPrivilegesToGroupAsync(body); - ApiHelper.RunTaskSynchronously(t); - return t.Result; - } - - /// - /// To programmatically add privileges to an existing group, use API endpoint. - /// When you assign privileges to a group, all the users under to this group inherits the privileges assigned to that group. - /// At least one of id or name of group is required. When both are given user id will be considered. - /// - /// Required parameter: Example: . - /// cancellationToken. - /// Returns the bool response from the API call. - public async Task RestapiV2AddPrivilegesToGroupAsync( - Models.TspublicRestV2GroupAddprivilegeRequest body, - CancellationToken cancellationToken = default) - { - // validating required parameters. - if (body == null) - { - throw new ArgumentNullException("body", "The parameter \"body\" is a required parameter and cannot be null."); - } - - // the base uri for api requests. - string baseUri = this.Config.GetBaseUri(); - - // prepare query string for API call. - StringBuilder queryBuilder = new StringBuilder(baseUri); - queryBuilder.Append("/tspublic/rest/v2/group/addprivilege"); - - // append request with appropriate headers and parameters - var headers = new Dictionary() - { - { "user-agent", this.UserAgent }, - { "Content-Type", "application/json" }, - }; - - // append body params. - var bodyText = ApiHelper.JsonSerialize(body); - - // prepare the API call request to fetch the response. - HttpRequest httpRequest = this.GetClientInstance().PutBody(queryBuilder.ToString(), headers, bodyText); - - if (this.HttpCallBack != null) - { - this.HttpCallBack.OnBeforeHttpRequestEventHandler(this.GetClientInstance(), httpRequest); - } - - httpRequest = await this.AuthManagers["global"].ApplyAsync(httpRequest).ConfigureAwait(false); - - // invoke request and get response. - HttpStringResponse response = await this.GetClientInstance().ExecuteAsStringAsync(httpRequest, cancellationToken: cancellationToken).ConfigureAwait(false); - HttpContext context = new HttpContext(httpRequest, response); - if (this.HttpCallBack != null) - { - this.HttpCallBack.OnAfterHttpResponseEventHandler(this.GetClientInstance(), response); - } - - if (response.StatusCode == 500) - { - throw new ErrorResponseException("Operation failed", context); - } - - // handle errors defined at the API level. - this.ValidateResponse(response, context); - - return bool.Parse(response.Body); - } - - /// - /// To programmatically remove privileges from a group, use API endpoint. The API removes only the privilege association. It does not delete the privilege or group from the Thoughtspot system. At least one of id or name of group is required. When both are given user id will be considered. - /// - /// Required parameter: Example: . - /// Returns the bool response from the API call. - public bool RestapiV2RemovePrivilegesFromGroup( - Models.TspublicRestV2GroupRemoveprivilegeRequest body) - { - Task t = this.RestapiV2RemovePrivilegesFromGroupAsync(body); - ApiHelper.RunTaskSynchronously(t); - return t.Result; - } - - /// - /// To programmatically remove privileges from a group, use API endpoint. The API removes only the privilege association. It does not delete the privilege or group from the Thoughtspot system. At least one of id or name of group is required. When both are given user id will be considered. - /// - /// Required parameter: Example: . - /// cancellationToken. - /// Returns the bool response from the API call. - public async Task RestapiV2RemovePrivilegesFromGroupAsync( - Models.TspublicRestV2GroupRemoveprivilegeRequest body, - CancellationToken cancellationToken = default) - { - // validating required parameters. - if (body == null) - { - throw new ArgumentNullException("body", "The parameter \"body\" is a required parameter and cannot be null."); - } - - // the base uri for api requests. - string baseUri = this.Config.GetBaseUri(); - - // prepare query string for API call. - StringBuilder queryBuilder = new StringBuilder(baseUri); - queryBuilder.Append("/tspublic/rest/v2/group/removeprivilege"); - - // append request with appropriate headers and parameters - var headers = new Dictionary() - { - { "user-agent", this.UserAgent }, - { "Content-Type", "application/json" }, - }; - - // append body params. - var bodyText = ApiHelper.JsonSerialize(body); - - // prepare the API call request to fetch the response. - HttpRequest httpRequest = this.GetClientInstance().PutBody(queryBuilder.ToString(), headers, bodyText); - - if (this.HttpCallBack != null) - { - this.HttpCallBack.OnBeforeHttpRequestEventHandler(this.GetClientInstance(), httpRequest); - } - - httpRequest = await this.AuthManagers["global"].ApplyAsync(httpRequest).ConfigureAwait(false); - - // invoke request and get response. - HttpStringResponse response = await this.GetClientInstance().ExecuteAsStringAsync(httpRequest, cancellationToken: cancellationToken).ConfigureAwait(false); - HttpContext context = new HttpContext(httpRequest, response); - if (this.HttpCallBack != null) - { - this.HttpCallBack.OnAfterHttpResponseEventHandler(this.GetClientInstance(), response); - } - - if (response.StatusCode == 500) - { - throw new ErrorResponseException("Operation failed", context); - } - - // handle errors defined at the API level. - this.ValidateResponse(response, context); - - return bool.Parse(response.Body); - } - - /// - /// To programmatically add existing ThoughtSpot users to a group, use this API endpoint. When you assign users to a group, the users inherits the privileges assigned to that group. At least one of id or name of the group is required. When both are given user id will be considered. - /// - /// Required parameter: Example: . - /// Returns the bool response from the API call. - public bool RestapiV2AddUsersToGroup( - Models.TspublicRestV2GroupAdduserRequest body) - { - Task t = this.RestapiV2AddUsersToGroupAsync(body); - ApiHelper.RunTaskSynchronously(t); - return t.Result; - } - - /// - /// To programmatically add existing ThoughtSpot users to a group, use this API endpoint. When you assign users to a group, the users inherits the privileges assigned to that group. At least one of id or name of the group is required. When both are given user id will be considered. - /// - /// Required parameter: Example: . - /// cancellationToken. - /// Returns the bool response from the API call. - public async Task RestapiV2AddUsersToGroupAsync( - Models.TspublicRestV2GroupAdduserRequest body, - CancellationToken cancellationToken = default) - { - // validating required parameters. - if (body == null) - { - throw new ArgumentNullException("body", "The parameter \"body\" is a required parameter and cannot be null."); - } - - // the base uri for api requests. - string baseUri = this.Config.GetBaseUri(); - - // prepare query string for API call. - StringBuilder queryBuilder = new StringBuilder(baseUri); - queryBuilder.Append("/tspublic/rest/v2/group/adduser"); - - // append request with appropriate headers and parameters - var headers = new Dictionary() - { - { "user-agent", this.UserAgent }, - { "Content-Type", "application/json" }, - }; - - // append body params. - var bodyText = ApiHelper.JsonSerialize(body); - - // prepare the API call request to fetch the response. - HttpRequest httpRequest = this.GetClientInstance().PutBody(queryBuilder.ToString(), headers, bodyText); - - if (this.HttpCallBack != null) - { - this.HttpCallBack.OnBeforeHttpRequestEventHandler(this.GetClientInstance(), httpRequest); - } - - httpRequest = await this.AuthManagers["global"].ApplyAsync(httpRequest).ConfigureAwait(false); - - // invoke request and get response. - HttpStringResponse response = await this.GetClientInstance().ExecuteAsStringAsync(httpRequest, cancellationToken: cancellationToken).ConfigureAwait(false); - HttpContext context = new HttpContext(httpRequest, response); - if (this.HttpCallBack != null) - { - this.HttpCallBack.OnAfterHttpResponseEventHandler(this.GetClientInstance(), response); - } - - if (response.StatusCode == 500) - { - throw new ErrorResponseException("Operation failed", context); - } - - // handle errors defined at the API level. - this.ValidateResponse(response, context); - - return bool.Parse(response.Body); - } - - /// - /// To programmatically remove users from a group, use API endpoint.The API removes only the user association. It does not delete the users or group from the Thoughtspot system. At least one of id or name of group is required. When both are given user id will be considered. - /// - /// Required parameter: Example: . - /// Returns the bool response from the API call. - public bool RestapiV2RemoveUsersFromGroup( - Models.TspublicRestV2GroupRemoveuserRequest body) - { - Task t = this.RestapiV2RemoveUsersFromGroupAsync(body); - ApiHelper.RunTaskSynchronously(t); - return t.Result; - } - - /// - /// To programmatically remove users from a group, use API endpoint.The API removes only the user association. It does not delete the users or group from the Thoughtspot system. At least one of id or name of group is required. When both are given user id will be considered. - /// - /// Required parameter: Example: . - /// cancellationToken. - /// Returns the bool response from the API call. - public async Task RestapiV2RemoveUsersFromGroupAsync( - Models.TspublicRestV2GroupRemoveuserRequest body, - CancellationToken cancellationToken = default) - { - // validating required parameters. - if (body == null) - { - throw new ArgumentNullException("body", "The parameter \"body\" is a required parameter and cannot be null."); - } - - // the base uri for api requests. - string baseUri = this.Config.GetBaseUri(); - - // prepare query string for API call. - StringBuilder queryBuilder = new StringBuilder(baseUri); - queryBuilder.Append("/tspublic/rest/v2/group/removeuser"); - - // append request with appropriate headers and parameters - var headers = new Dictionary() - { - { "user-agent", this.UserAgent }, - { "Content-Type", "application/json" }, - }; - - // append body params. - var bodyText = ApiHelper.JsonSerialize(body); - - // prepare the API call request to fetch the response. - HttpRequest httpRequest = this.GetClientInstance().PutBody(queryBuilder.ToString(), headers, bodyText); - - if (this.HttpCallBack != null) - { - this.HttpCallBack.OnBeforeHttpRequestEventHandler(this.GetClientInstance(), httpRequest); - } - - httpRequest = await this.AuthManagers["global"].ApplyAsync(httpRequest).ConfigureAwait(false); - - // invoke request and get response. - HttpStringResponse response = await this.GetClientInstance().ExecuteAsStringAsync(httpRequest, cancellationToken: cancellationToken).ConfigureAwait(false); - HttpContext context = new HttpContext(httpRequest, response); - if (this.HttpCallBack != null) - { - this.HttpCallBack.OnAfterHttpResponseEventHandler(this.GetClientInstance(), response); - } - - if (response.StatusCode == 500) - { - throw new ErrorResponseException("Operation failed", context); - } - - // handle errors defined at the API level. - this.ValidateResponse(response, context); - - return bool.Parse(response.Body); - } - - /// - /// To programmatically add existing groups to a group, use API endpoint. When you assign groups to a group, the group inherits the privileges assigned to those groups. At least one of id or name of group is required. When both are given user id will be considered. - /// - /// Required parameter: Example: . - /// Returns the bool response from the API call. - public bool RestapiV2AddGroupsToGroup( - Models.TspublicRestV2GroupAddgroupRequest body) - { - Task t = this.RestapiV2AddGroupsToGroupAsync(body); - ApiHelper.RunTaskSynchronously(t); - return t.Result; - } - - /// - /// To programmatically add existing groups to a group, use API endpoint. When you assign groups to a group, the group inherits the privileges assigned to those groups. At least one of id or name of group is required. When both are given user id will be considered. - /// - /// Required parameter: Example: . - /// cancellationToken. - /// Returns the bool response from the API call. - public async Task RestapiV2AddGroupsToGroupAsync( - Models.TspublicRestV2GroupAddgroupRequest body, - CancellationToken cancellationToken = default) - { - // validating required parameters. - if (body == null) - { - throw new ArgumentNullException("body", "The parameter \"body\" is a required parameter and cannot be null."); - } - - // the base uri for api requests. - string baseUri = this.Config.GetBaseUri(); - - // prepare query string for API call. - StringBuilder queryBuilder = new StringBuilder(baseUri); - queryBuilder.Append("/tspublic/rest/v2/group/addgroup"); - - // append request with appropriate headers and parameters - var headers = new Dictionary() - { - { "user-agent", this.UserAgent }, - { "Content-Type", "application/json" }, - }; - - // append body params. - var bodyText = ApiHelper.JsonSerialize(body); - - // prepare the API call request to fetch the response. - HttpRequest httpRequest = this.GetClientInstance().PutBody(queryBuilder.ToString(), headers, bodyText); - - if (this.HttpCallBack != null) - { - this.HttpCallBack.OnBeforeHttpRequestEventHandler(this.GetClientInstance(), httpRequest); - } - - httpRequest = await this.AuthManagers["global"].ApplyAsync(httpRequest).ConfigureAwait(false); - - // invoke request and get response. - HttpStringResponse response = await this.GetClientInstance().ExecuteAsStringAsync(httpRequest, cancellationToken: cancellationToken).ConfigureAwait(false); - HttpContext context = new HttpContext(httpRequest, response); - if (this.HttpCallBack != null) - { - this.HttpCallBack.OnAfterHttpResponseEventHandler(this.GetClientInstance(), response); - } - - if (response.StatusCode == 500) - { - throw new ErrorResponseException("Operation failed", context); - } - - // handle errors defined at the API level. - this.ValidateResponse(response, context); - - return bool.Parse(response.Body); - } - - /// - /// To programmatically remove groups from a group, use API endpoint.The API removes only the group association. It does not delete the group from the Thoughtspot system. At least one of id or name of group is required. When both are given user id will be considered. - /// - /// Required parameter: Example: . - /// Returns the bool response from the API call. - public bool RestapiV2RemoveGroupsFromGroup( - Models.TspublicRestV2GroupRemovegroupRequest body) - { - Task t = this.RestapiV2RemoveGroupsFromGroupAsync(body); - ApiHelper.RunTaskSynchronously(t); - return t.Result; - } - - /// - /// To programmatically remove groups from a group, use API endpoint.The API removes only the group association. It does not delete the group from the Thoughtspot system. At least one of id or name of group is required. When both are given user id will be considered. - /// - /// Required parameter: Example: . - /// cancellationToken. - /// Returns the bool response from the API call. - public async Task RestapiV2RemoveGroupsFromGroupAsync( - Models.TspublicRestV2GroupRemovegroupRequest body, - CancellationToken cancellationToken = default) - { - // validating required parameters. - if (body == null) - { - throw new ArgumentNullException("body", "The parameter \"body\" is a required parameter and cannot be null."); - } - - // the base uri for api requests. - string baseUri = this.Config.GetBaseUri(); - - // prepare query string for API call. - StringBuilder queryBuilder = new StringBuilder(baseUri); - queryBuilder.Append("/tspublic/rest/v2/group/removegroup"); - - // append request with appropriate headers and parameters - var headers = new Dictionary() - { - { "user-agent", this.UserAgent }, - { "Content-Type", "application/json" }, - }; - - // append body params. - var bodyText = ApiHelper.JsonSerialize(body); - - // prepare the API call request to fetch the response. - HttpRequest httpRequest = this.GetClientInstance().PutBody(queryBuilder.ToString(), headers, bodyText); - - if (this.HttpCallBack != null) - { - this.HttpCallBack.OnBeforeHttpRequestEventHandler(this.GetClientInstance(), httpRequest); - } - - httpRequest = await this.AuthManagers["global"].ApplyAsync(httpRequest).ConfigureAwait(false); - - // invoke request and get response. - HttpStringResponse response = await this.GetClientInstance().ExecuteAsStringAsync(httpRequest, cancellationToken: cancellationToken).ConfigureAwait(false); - HttpContext context = new HttpContext(httpRequest, response); - if (this.HttpCallBack != null) - { - this.HttpCallBack.OnAfterHttpResponseEventHandler(this.GetClientInstance(), response); - } - - if (response.StatusCode == 500) - { - throw new ErrorResponseException("Operation failed", context); - } - - // handle errors defined at the API level. - this.ValidateResponse(response, context); - - return bool.Parse(response.Body); - } - - /// - /// To get the details of a specific group account or all groups in the ThoughtSpot system, use this end point. - /// - /// Required parameter: Example: . - /// Returns the object response from the API call. - public object RestapiV2SearchGroups( - Models.TspublicRestV2GroupSearchRequest body) - { - Task t = this.RestapiV2SearchGroupsAsync(body); - ApiHelper.RunTaskSynchronously(t); - return t.Result; - } - - /// - /// To get the details of a specific group account or all groups in the ThoughtSpot system, use this end point. - /// - /// Required parameter: Example: . - /// cancellationToken. - /// Returns the object response from the API call. - public async Task RestapiV2SearchGroupsAsync( - Models.TspublicRestV2GroupSearchRequest body, - CancellationToken cancellationToken = default) - { - // validating required parameters. - if (body == null) - { - throw new ArgumentNullException("body", "The parameter \"body\" is a required parameter and cannot be null."); - } - - // the base uri for api requests. - string baseUri = this.Config.GetBaseUri(); - - // prepare query string for API call. - StringBuilder queryBuilder = new StringBuilder(baseUri); - queryBuilder.Append("/tspublic/rest/v2/group/search"); - - // append request with appropriate headers and parameters - var headers = new Dictionary() - { - { "user-agent", this.UserAgent }, - { "accept", "application/json" }, - { "Content-Type", "application/json" }, - }; - - // append body params. - var bodyText = ApiHelper.JsonSerialize(body); - - // prepare the API call request to fetch the response. - HttpRequest httpRequest = this.GetClientInstance().PostBody(queryBuilder.ToString(), headers, bodyText); - - if (this.HttpCallBack != null) - { - this.HttpCallBack.OnBeforeHttpRequestEventHandler(this.GetClientInstance(), httpRequest); - } - - httpRequest = await this.AuthManagers["global"].ApplyAsync(httpRequest).ConfigureAwait(false); - - // invoke request and get response. - HttpStringResponse response = await this.GetClientInstance().ExecuteAsStringAsync(httpRequest, cancellationToken: cancellationToken).ConfigureAwait(false); - HttpContext context = new HttpContext(httpRequest, response); - if (this.HttpCallBack != null) - { - this.HttpCallBack.OnAfterHttpResponseEventHandler(this.GetClientInstance(), response); - } - - if (response.StatusCode == 500) - { - throw new ErrorResponseException("Operation failed", context); - } - - // handle errors defined at the API level. - this.ValidateResponse(response, context); - - return response.Body; - } - } -} \ No newline at end of file diff --git a/DotNet/ThoughtSpotPublicRESTAPI.Standard/Controllers/LogsController.cs b/DotNet/ThoughtSpotPublicRESTAPI.Standard/Controllers/LogsController.cs deleted file mode 100644 index 64294795a..000000000 --- a/DotNet/ThoughtSpotPublicRESTAPI.Standard/Controllers/LogsController.cs +++ /dev/null @@ -1,132 +0,0 @@ -// -// Copyright (c) APIMatic. All rights reserved. -// -namespace ThoughtSpotPublicRESTAPI.Standard.Controllers -{ - using System; - using System.Collections.Generic; - using System.Dynamic; - using System.Globalization; - using System.IO; - using System.Linq; - using System.Text; - using System.Threading; - using System.Threading.Tasks; - using Newtonsoft.Json.Converters; - using ThoughtSpotPublicRESTAPI.Standard; - using ThoughtSpotPublicRESTAPI.Standard.Authentication; - using ThoughtSpotPublicRESTAPI.Standard.Exceptions; - using ThoughtSpotPublicRESTAPI.Standard.Http.Client; - using ThoughtSpotPublicRESTAPI.Standard.Http.Request; - using ThoughtSpotPublicRESTAPI.Standard.Http.Request.Configuration; - using ThoughtSpotPublicRESTAPI.Standard.Http.Response; - using ThoughtSpotPublicRESTAPI.Standard.Utilities; - - /// - /// LogsController. - /// - public class LogsController : BaseController - { - /// - /// Initializes a new instance of the class. - /// - /// config instance. - /// httpClient. - /// authManager. - /// httpCallBack. - internal LogsController(IConfiguration config, IHttpClient httpClient, IDictionary authManagers, HttpCallBack httpCallBack = null) - : base(config, httpClient, authManagers, httpCallBack) - { - } - - /// - /// Note: This endpoint is applicable only for SAAS deployments. . - /// The ThoughtSpot log streaming service API allows you to programmatically get a security audit event log from the ThoughtSpot system. . - /// To use this API, make sure you have admin user privileges. . - /// ThoughtSpot cloud deployments allow you to collect security audit events and send them to your Security information and event management (SIEM) application in real-time. . - /// These events can help your security operations personnel to detect potential security threats or compromised user accounts in your organization. - /// - /// Required parameter: Type of the log. - /// Optional parameter: The EPOCH time in milliseconds to set the start time for streaming logs. Example: To set the timestamp as June 1, 2021 8 am, specify 1622534400000.. - /// Optional parameter: The EPOCH time in milliseconds to set the end time for streaming logs. Example: To set the timestamp as July 1, 2021, 8 am, specify 1625126400000.. - /// Returns the Models.LogsResponse response from the API call. - public Models.LogsResponse RestapiV2GetLogEvents( - Models.TopicEnum topic, - string fromEpoch = null, - string toEpoch = null) - { - Task t = this.RestapiV2GetLogEventsAsync(topic, fromEpoch, toEpoch); - ApiHelper.RunTaskSynchronously(t); - return t.Result; - } - - /// - /// Note: This endpoint is applicable only for SAAS deployments. . - /// The ThoughtSpot log streaming service API allows you to programmatically get a security audit event log from the ThoughtSpot system. . - /// To use this API, make sure you have admin user privileges. . - /// ThoughtSpot cloud deployments allow you to collect security audit events and send them to your Security information and event management (SIEM) application in real-time. . - /// These events can help your security operations personnel to detect potential security threats or compromised user accounts in your organization. - /// - /// Required parameter: Type of the log. - /// Optional parameter: The EPOCH time in milliseconds to set the start time for streaming logs. Example: To set the timestamp as June 1, 2021 8 am, specify 1622534400000.. - /// Optional parameter: The EPOCH time in milliseconds to set the end time for streaming logs. Example: To set the timestamp as July 1, 2021, 8 am, specify 1625126400000.. - /// cancellationToken. - /// Returns the Models.LogsResponse response from the API call. - public async Task RestapiV2GetLogEventsAsync( - Models.TopicEnum topic, - string fromEpoch = null, - string toEpoch = null, - CancellationToken cancellationToken = default) - { - // the base uri for api requests. - string baseUri = this.Config.GetBaseUri(); - - // prepare query string for API call. - StringBuilder queryBuilder = new StringBuilder(baseUri); - queryBuilder.Append("/tspublic/rest/v2/logs/events"); - - // prepare specfied query parameters. - var queryParams = new Dictionary() - { - { "topic", ApiHelper.JsonSerialize(topic).Trim('\"') }, - { "fromEpoch", fromEpoch }, - { "toEpoch", toEpoch }, - }; - - // append request with appropriate headers and parameters - var headers = new Dictionary() - { - { "user-agent", this.UserAgent }, - { "accept", "application/json" }, - }; - - // prepare the API call request to fetch the response. - HttpRequest httpRequest = this.GetClientInstance().Get(queryBuilder.ToString(), headers, queryParameters: queryParams); - - if (this.HttpCallBack != null) - { - this.HttpCallBack.OnBeforeHttpRequestEventHandler(this.GetClientInstance(), httpRequest); - } - - httpRequest = await this.AuthManagers["global"].ApplyAsync(httpRequest).ConfigureAwait(false); - - // invoke request and get response. - HttpStringResponse response = await this.GetClientInstance().ExecuteAsStringAsync(httpRequest, cancellationToken: cancellationToken).ConfigureAwait(false); - HttpContext context = new HttpContext(httpRequest, response); - if (this.HttpCallBack != null) - { - this.HttpCallBack.OnAfterHttpResponseEventHandler(this.GetClientInstance(), response); - } - - if (response.StatusCode == 500) - { - throw new ErrorResponseException("Operation failed", context); - } - - // handle errors defined at the API level. - this.ValidateResponse(response, context); - - return ApiHelper.JsonDeserialize(response.Body); - } - } -} \ No newline at end of file diff --git a/DotNet/ThoughtSpotPublicRESTAPI.Standard/Controllers/MaterializationController.cs b/DotNet/ThoughtSpotPublicRESTAPI.Standard/Controllers/MaterializationController.cs deleted file mode 100644 index f6be82008..000000000 --- a/DotNet/ThoughtSpotPublicRESTAPI.Standard/Controllers/MaterializationController.cs +++ /dev/null @@ -1,118 +0,0 @@ -// -// Copyright (c) APIMatic. All rights reserved. -// -namespace ThoughtSpotPublicRESTAPI.Standard.Controllers -{ - using System; - using System.Collections.Generic; - using System.Dynamic; - using System.Globalization; - using System.IO; - using System.Linq; - using System.Text; - using System.Threading; - using System.Threading.Tasks; - using Newtonsoft.Json.Converters; - using ThoughtSpotPublicRESTAPI.Standard; - using ThoughtSpotPublicRESTAPI.Standard.Authentication; - using ThoughtSpotPublicRESTAPI.Standard.Exceptions; - using ThoughtSpotPublicRESTAPI.Standard.Http.Client; - using ThoughtSpotPublicRESTAPI.Standard.Http.Request; - using ThoughtSpotPublicRESTAPI.Standard.Http.Request.Configuration; - using ThoughtSpotPublicRESTAPI.Standard.Http.Response; - using ThoughtSpotPublicRESTAPI.Standard.Utilities; - - /// - /// MaterializationController. - /// - public class MaterializationController : BaseController - { - /// - /// Initializes a new instance of the class. - /// - /// config instance. - /// httpClient. - /// authManager. - /// httpCallBack. - internal MaterializationController(IConfiguration config, IHttpClient httpClient, IDictionary authManagers, HttpCallBack httpCallBack = null) - : base(config, httpClient, authManagers, httpCallBack) - { - } - - /// - /// Use this endpoint to refresh data in the materialized view by running the query associated with it. - /// - /// Required parameter: Example: . - /// Returns the object response from the API call. - public object RestapiV2RefreshMaterializedView( - Models.TspublicRestV2MaterializationRefreshviewRequest body) - { - Task t = this.RestapiV2RefreshMaterializedViewAsync(body); - ApiHelper.RunTaskSynchronously(t); - return t.Result; - } - - /// - /// Use this endpoint to refresh data in the materialized view by running the query associated with it. - /// - /// Required parameter: Example: . - /// cancellationToken. - /// Returns the object response from the API call. - public async Task RestapiV2RefreshMaterializedViewAsync( - Models.TspublicRestV2MaterializationRefreshviewRequest body, - CancellationToken cancellationToken = default) - { - // validating required parameters. - if (body == null) - { - throw new ArgumentNullException("body", "The parameter \"body\" is a required parameter and cannot be null."); - } - - // the base uri for api requests. - string baseUri = this.Config.GetBaseUri(); - - // prepare query string for API call. - StringBuilder queryBuilder = new StringBuilder(baseUri); - queryBuilder.Append("/tspublic/rest/v2/materialization/refreshview"); - - // append request with appropriate headers and parameters - var headers = new Dictionary() - { - { "user-agent", this.UserAgent }, - { "accept", "application/json" }, - { "Content-Type", "application/json" }, - }; - - // append body params. - var bodyText = ApiHelper.JsonSerialize(body); - - // prepare the API call request to fetch the response. - HttpRequest httpRequest = this.GetClientInstance().PutBody(queryBuilder.ToString(), headers, bodyText); - - if (this.HttpCallBack != null) - { - this.HttpCallBack.OnBeforeHttpRequestEventHandler(this.GetClientInstance(), httpRequest); - } - - httpRequest = await this.AuthManagers["global"].ApplyAsync(httpRequest).ConfigureAwait(false); - - // invoke request and get response. - HttpStringResponse response = await this.GetClientInstance().ExecuteAsStringAsync(httpRequest, cancellationToken: cancellationToken).ConfigureAwait(false); - HttpContext context = new HttpContext(httpRequest, response); - if (this.HttpCallBack != null) - { - this.HttpCallBack.OnAfterHttpResponseEventHandler(this.GetClientInstance(), response); - } - - if (response.StatusCode == 500) - { - throw new ErrorResponseException("Operation failed", context); - } - - // handle errors defined at the API level. - this.ValidateResponse(response, context); - - return response.Body; - } - } -} \ No newline at end of file diff --git a/DotNet/ThoughtSpotPublicRESTAPI.Standard/Controllers/MetadataController.cs b/DotNet/ThoughtSpotPublicRESTAPI.Standard/Controllers/MetadataController.cs deleted file mode 100644 index c771d5591..000000000 --- a/DotNet/ThoughtSpotPublicRESTAPI.Standard/Controllers/MetadataController.cs +++ /dev/null @@ -1,1584 +0,0 @@ -// -// Copyright (c) APIMatic. All rights reserved. -// -namespace ThoughtSpotPublicRESTAPI.Standard.Controllers -{ - using System; - using System.Collections.Generic; - using System.Dynamic; - using System.Globalization; - using System.IO; - using System.Linq; - using System.Text; - using System.Threading; - using System.Threading.Tasks; - using Newtonsoft.Json.Converters; - using ThoughtSpotPublicRESTAPI.Standard; - using ThoughtSpotPublicRESTAPI.Standard.Authentication; - using ThoughtSpotPublicRESTAPI.Standard.Exceptions; - using ThoughtSpotPublicRESTAPI.Standard.Http.Client; - using ThoughtSpotPublicRESTAPI.Standard.Http.Request; - using ThoughtSpotPublicRESTAPI.Standard.Http.Request.Configuration; - using ThoughtSpotPublicRESTAPI.Standard.Http.Response; - using ThoughtSpotPublicRESTAPI.Standard.Utilities; - - /// - /// MetadataController. - /// - public class MetadataController : BaseController - { - /// - /// Initializes a new instance of the class. - /// - /// config instance. - /// httpClient. - /// authManager. - /// httpCallBack. - internal MetadataController(IConfiguration config, IHttpClient httpClient, IDictionary authManagers, HttpCallBack httpCallBack = null) - : base(config, httpClient, authManagers, httpCallBack) - { - } - - /// - /// To get details of a specific tag, use this endpoint. At least one of id or name of tag is required. When both are given, then id will be considered. - /// - /// Optional parameter: Name of the tag. - /// Optional parameter: The GUID of the tag. - /// Returns the Models.MetadataTagResponse response from the API call. - public Models.MetadataTagResponse RestapiV2GetTag( - string name = null, - string id = null) - { - Task t = this.RestapiV2GetTagAsync(name, id); - ApiHelper.RunTaskSynchronously(t); - return t.Result; - } - - /// - /// To get details of a specific tag, use this endpoint. At least one of id or name of tag is required. When both are given, then id will be considered. - /// - /// Optional parameter: Name of the tag. - /// Optional parameter: The GUID of the tag. - /// cancellationToken. - /// Returns the Models.MetadataTagResponse response from the API call. - public async Task RestapiV2GetTagAsync( - string name = null, - string id = null, - CancellationToken cancellationToken = default) - { - // the base uri for api requests. - string baseUri = this.Config.GetBaseUri(); - - // prepare query string for API call. - StringBuilder queryBuilder = new StringBuilder(baseUri); - queryBuilder.Append("/tspublic/rest/v2/metadata/tag"); - - // prepare specfied query parameters. - var queryParams = new Dictionary() - { - { "name", name }, - { "id", id }, - }; - - // append request with appropriate headers and parameters - var headers = new Dictionary() - { - { "user-agent", this.UserAgent }, - { "accept", "application/json" }, - }; - - // prepare the API call request to fetch the response. - HttpRequest httpRequest = this.GetClientInstance().Get(queryBuilder.ToString(), headers, queryParameters: queryParams); - - if (this.HttpCallBack != null) - { - this.HttpCallBack.OnBeforeHttpRequestEventHandler(this.GetClientInstance(), httpRequest); - } - - httpRequest = await this.AuthManagers["global"].ApplyAsync(httpRequest).ConfigureAwait(false); - - // invoke request and get response. - HttpStringResponse response = await this.GetClientInstance().ExecuteAsStringAsync(httpRequest, cancellationToken: cancellationToken).ConfigureAwait(false); - HttpContext context = new HttpContext(httpRequest, response); - if (this.HttpCallBack != null) - { - this.HttpCallBack.OnAfterHttpResponseEventHandler(this.GetClientInstance(), response); - } - - if (response.StatusCode == 500) - { - throw new ErrorResponseException("Operation failed", context); - } - - // handle errors defined at the API level. - this.ValidateResponse(response, context); - - return ApiHelper.JsonDeserialize(response.Body); - } - - /// - /// To get the name and id of liveboard that is set as a home liveboard for a user, use this endpoint. At least one of user id or username is required. When both are given, then id will be considered. - /// - /// Optional parameter: Name of the tag. - /// Optional parameter: The GUID of the tag. - /// Returns the Models.HomeLiveboardResponse response from the API call. - public Models.HomeLiveboardResponse RestapiV2GetHomeLiveboard( - string userName = null, - string userId = null) - { - Task t = this.RestapiV2GetHomeLiveboardAsync(userName, userId); - ApiHelper.RunTaskSynchronously(t); - return t.Result; - } - - /// - /// To get the name and id of liveboard that is set as a home liveboard for a user, use this endpoint. At least one of user id or username is required. When both are given, then id will be considered. - /// - /// Optional parameter: Name of the tag. - /// Optional parameter: The GUID of the tag. - /// cancellationToken. - /// Returns the Models.HomeLiveboardResponse response from the API call. - public async Task RestapiV2GetHomeLiveboardAsync( - string userName = null, - string userId = null, - CancellationToken cancellationToken = default) - { - // the base uri for api requests. - string baseUri = this.Config.GetBaseUri(); - - // prepare query string for API call. - StringBuilder queryBuilder = new StringBuilder(baseUri); - queryBuilder.Append("/tspublic/rest/v2/metadata/homeliveboard"); - - // prepare specfied query parameters. - var queryParams = new Dictionary() - { - { "userName", userName }, - { "userId", userId }, - }; - - // append request with appropriate headers and parameters - var headers = new Dictionary() - { - { "user-agent", this.UserAgent }, - { "accept", "application/json" }, - }; - - // prepare the API call request to fetch the response. - HttpRequest httpRequest = this.GetClientInstance().Get(queryBuilder.ToString(), headers, queryParameters: queryParams); - - if (this.HttpCallBack != null) - { - this.HttpCallBack.OnBeforeHttpRequestEventHandler(this.GetClientInstance(), httpRequest); - } - - httpRequest = await this.AuthManagers["global"].ApplyAsync(httpRequest).ConfigureAwait(false); - - // invoke request and get response. - HttpStringResponse response = await this.GetClientInstance().ExecuteAsStringAsync(httpRequest, cancellationToken: cancellationToken).ConfigureAwait(false); - HttpContext context = new HttpContext(httpRequest, response); - if (this.HttpCallBack != null) - { - this.HttpCallBack.OnAfterHttpResponseEventHandler(this.GetClientInstance(), response); - } - - if (response.StatusCode == 500) - { - throw new ErrorResponseException("Operation failed", context); - } - - // handle errors defined at the API level. - this.ValidateResponse(response, context); - - return ApiHelper.JsonDeserialize(response.Body); - } - - /// - /// To get header details for metadata objects, use this endpoint. You can provide as input selective fields to get the data for. - /// - /// Required parameter: Example: . - /// Returns the object response from the API call. - public object RestapiV2SearchObjectHeader( - Models.TspublicRestV2MetadataHeaderSearchRequest body) - { - Task t = this.RestapiV2SearchObjectHeaderAsync(body); - ApiHelper.RunTaskSynchronously(t); - return t.Result; - } - - /// - /// To get header details for metadata objects, use this endpoint. You can provide as input selective fields to get the data for. - /// - /// Required parameter: Example: . - /// cancellationToken. - /// Returns the object response from the API call. - public async Task RestapiV2SearchObjectHeaderAsync( - Models.TspublicRestV2MetadataHeaderSearchRequest body, - CancellationToken cancellationToken = default) - { - // validating required parameters. - if (body == null) - { - throw new ArgumentNullException("body", "The parameter \"body\" is a required parameter and cannot be null."); - } - - // the base uri for api requests. - string baseUri = this.Config.GetBaseUri(); - - // prepare query string for API call. - StringBuilder queryBuilder = new StringBuilder(baseUri); - queryBuilder.Append("/tspublic/rest/v2/metadata/header/search"); - - // append request with appropriate headers and parameters - var headers = new Dictionary() - { - { "user-agent", this.UserAgent }, - { "accept", "application/json" }, - { "Content-Type", "application/json" }, - }; - - // append body params. - var bodyText = ApiHelper.JsonSerialize(body); - - // prepare the API call request to fetch the response. - HttpRequest httpRequest = this.GetClientInstance().PostBody(queryBuilder.ToString(), headers, bodyText); - - if (this.HttpCallBack != null) - { - this.HttpCallBack.OnBeforeHttpRequestEventHandler(this.GetClientInstance(), httpRequest); - } - - httpRequest = await this.AuthManagers["global"].ApplyAsync(httpRequest).ConfigureAwait(false); - - // invoke request and get response. - HttpStringResponse response = await this.GetClientInstance().ExecuteAsStringAsync(httpRequest, cancellationToken: cancellationToken).ConfigureAwait(false); - HttpContext context = new HttpContext(httpRequest, response); - if (this.HttpCallBack != null) - { - this.HttpCallBack.OnAfterHttpResponseEventHandler(this.GetClientInstance(), response); - } - - if (response.StatusCode == 500) - { - throw new ErrorResponseException("Operation failed", context); - } - - // handle errors defined at the API level. - this.ValidateResponse(response, context); - - return response.Body; - } - - /// - /// Use this endpoint to get header details of visualization charts for a given liveboard or answer. At least one of id or name of liveboard or answer is required. When both are given, then id will be considered. - /// - /// Required parameter: The GUID of the liveboard or answer. - /// Returns the object response from the API call. - public object RestapiV2GetObjectVisualizationHeader( - string id) - { - Task t = this.RestapiV2GetObjectVisualizationHeaderAsync(id); - ApiHelper.RunTaskSynchronously(t); - return t.Result; - } - - /// - /// Use this endpoint to get header details of visualization charts for a given liveboard or answer. At least one of id or name of liveboard or answer is required. When both are given, then id will be considered. - /// - /// Required parameter: The GUID of the liveboard or answer. - /// cancellationToken. - /// Returns the object response from the API call. - public async Task RestapiV2GetObjectVisualizationHeaderAsync( - string id, - CancellationToken cancellationToken = default) - { - // validating required parameters. - if (id == null) - { - throw new ArgumentNullException("id", "The parameter \"id\" is a required parameter and cannot be null."); - } - - // the base uri for api requests. - string baseUri = this.Config.GetBaseUri(); - - // prepare query string for API call. - StringBuilder queryBuilder = new StringBuilder(baseUri); - queryBuilder.Append("/tspublic/rest/v2/metadata/vizheader"); - - // prepare specfied query parameters. - var queryParams = new Dictionary() - { - { "id", id }, - }; - - // append request with appropriate headers and parameters - var headers = new Dictionary() - { - { "user-agent", this.UserAgent }, - { "accept", "application/json" }, - }; - - // prepare the API call request to fetch the response. - HttpRequest httpRequest = this.GetClientInstance().Get(queryBuilder.ToString(), headers, queryParameters: queryParams); - - if (this.HttpCallBack != null) - { - this.HttpCallBack.OnBeforeHttpRequestEventHandler(this.GetClientInstance(), httpRequest); - } - - httpRequest = await this.AuthManagers["global"].ApplyAsync(httpRequest).ConfigureAwait(false); - - // invoke request and get response. - HttpStringResponse response = await this.GetClientInstance().ExecuteAsStringAsync(httpRequest, cancellationToken: cancellationToken).ConfigureAwait(false); - HttpContext context = new HttpContext(httpRequest, response); - if (this.HttpCallBack != null) - { - this.HttpCallBack.OnAfterHttpResponseEventHandler(this.GetClientInstance(), response); - } - - if (response.StatusCode == 500) - { - throw new ErrorResponseException("Operation failed", context); - } - - // handle errors defined at the API level. - this.ValidateResponse(response, context); - - return ApiHelper.JsonDeserialize(response.Body); - } - - /// - /// Use this endpoint to get full details of metadata objects. - /// - /// Required parameter: Type of the metadata object being searched.. - /// Required parameter: A JSON array of GUIDs of the objects.. - /// Returns the object response from the API call. - public object RestapiV2GetObjectDetail( - Models.Type4Enum type, - List id) - { - Task t = this.RestapiV2GetObjectDetailAsync(type, id); - ApiHelper.RunTaskSynchronously(t); - return t.Result; - } - - /// - /// Use this endpoint to get full details of metadata objects. - /// - /// Required parameter: Type of the metadata object being searched.. - /// Required parameter: A JSON array of GUIDs of the objects.. - /// cancellationToken. - /// Returns the object response from the API call. - public async Task RestapiV2GetObjectDetailAsync( - Models.Type4Enum type, - List id, - CancellationToken cancellationToken = default) - { - // validating required parameters. - if (id == null) - { - throw new ArgumentNullException("id", "The parameter \"id\" is a required parameter and cannot be null."); - } - - // the base uri for api requests. - string baseUri = this.Config.GetBaseUri(); - - // prepare query string for API call. - StringBuilder queryBuilder = new StringBuilder(baseUri); - queryBuilder.Append("/tspublic/rest/v2/metadata/detail"); - - // prepare specfied query parameters. - var queryParams = new Dictionary() - { - { "type", ApiHelper.JsonSerialize(type).Trim('\"') }, - { "id", id }, - }; - - // append request with appropriate headers and parameters - var headers = new Dictionary() - { - { "user-agent", this.UserAgent }, - { "accept", "application/json" }, - }; - - // prepare the API call request to fetch the response. - HttpRequest httpRequest = this.GetClientInstance().Get(queryBuilder.ToString(), headers, queryParameters: queryParams); - - if (this.HttpCallBack != null) - { - this.HttpCallBack.OnBeforeHttpRequestEventHandler(this.GetClientInstance(), httpRequest); - } - - httpRequest = await this.AuthManagers["global"].ApplyAsync(httpRequest).ConfigureAwait(false); - - // invoke request and get response. - HttpStringResponse response = await this.GetClientInstance().ExecuteAsStringAsync(httpRequest, cancellationToken: cancellationToken).ConfigureAwait(false); - HttpContext context = new HttpContext(httpRequest, response); - if (this.HttpCallBack != null) - { - this.HttpCallBack.OnAfterHttpResponseEventHandler(this.GetClientInstance(), response); - } - - if (response.StatusCode == 500) - { - throw new ErrorResponseException("Operation failed", context); - } - - // handle errors defined at the API level. - this.ValidateResponse(response, context); - - return response.Body; - } - - /// - /// To get header detail of a metadata object, use this endpoint. You can provide as input selective fields to get the data for. - /// - /// Required parameter: Type of the metadata object being searched.. - /// Required parameter: GUID of the metadata object. - /// Optional parameter: Array of header field names that need to be included in the header response. - /// Returns the object response from the API call. - public object RestapiV2GetObjectHeader( - Models.Type5Enum type, - string id, - List outputFields = null) - { - Task t = this.RestapiV2GetObjectHeaderAsync(type, id, outputFields); - ApiHelper.RunTaskSynchronously(t); - return t.Result; - } - - /// - /// To get header detail of a metadata object, use this endpoint. You can provide as input selective fields to get the data for. - /// - /// Required parameter: Type of the metadata object being searched.. - /// Required parameter: GUID of the metadata object. - /// Optional parameter: Array of header field names that need to be included in the header response. - /// cancellationToken. - /// Returns the object response from the API call. - public async Task RestapiV2GetObjectHeaderAsync( - Models.Type5Enum type, - string id, - List outputFields = null, - CancellationToken cancellationToken = default) - { - // validating required parameters. - if (id == null) - { - throw new ArgumentNullException("id", "The parameter \"id\" is a required parameter and cannot be null."); - } - - // the base uri for api requests. - string baseUri = this.Config.GetBaseUri(); - - // prepare query string for API call. - StringBuilder queryBuilder = new StringBuilder(baseUri); - queryBuilder.Append("/tspublic/rest/v2/metadata/header"); - - // prepare specfied query parameters. - var queryParams = new Dictionary() - { - { "type", ApiHelper.JsonSerialize(type).Trim('\"') }, - { "id", id }, - { "outputFields", outputFields }, - }; - - // append request with appropriate headers and parameters - var headers = new Dictionary() - { - { "user-agent", this.UserAgent }, - { "accept", "application/json" }, - }; - - // prepare the API call request to fetch the response. - HttpRequest httpRequest = this.GetClientInstance().Get(queryBuilder.ToString(), headers, queryParameters: queryParams); - - if (this.HttpCallBack != null) - { - this.HttpCallBack.OnBeforeHttpRequestEventHandler(this.GetClientInstance(), httpRequest); - } - - httpRequest = await this.AuthManagers["global"].ApplyAsync(httpRequest).ConfigureAwait(false); - - // invoke request and get response. - HttpStringResponse response = await this.GetClientInstance().ExecuteAsStringAsync(httpRequest, cancellationToken: cancellationToken).ConfigureAwait(false); - HttpContext context = new HttpContext(httpRequest, response); - if (this.HttpCallBack != null) - { - this.HttpCallBack.OnAfterHttpResponseEventHandler(this.GetClientInstance(), response); - } - - if (response.StatusCode == 500) - { - throw new ErrorResponseException("Operation failed", context); - } - - // handle errors defined at the API level. - this.ValidateResponse(response, context); - - return response.Body; - } - - /// - /// Use this endpoint to get full details of metadata objects. - /// - /// Required parameter: Example: . - /// Returns the object response from the API call. - public object RestapiV2SearchObjectDetail( - Models.TspublicRestV2MetadataDetailSearchRequest body) - { - Task t = this.RestapiV2SearchObjectDetailAsync(body); - ApiHelper.RunTaskSynchronously(t); - return t.Result; - } - - /// - /// Use this endpoint to get full details of metadata objects. - /// - /// Required parameter: Example: . - /// cancellationToken. - /// Returns the object response from the API call. - public async Task RestapiV2SearchObjectDetailAsync( - Models.TspublicRestV2MetadataDetailSearchRequest body, - CancellationToken cancellationToken = default) - { - // validating required parameters. - if (body == null) - { - throw new ArgumentNullException("body", "The parameter \"body\" is a required parameter and cannot be null."); - } - - // the base uri for api requests. - string baseUri = this.Config.GetBaseUri(); - - // prepare query string for API call. - StringBuilder queryBuilder = new StringBuilder(baseUri); - queryBuilder.Append("/tspublic/rest/v2/metadata/detail/search"); - - // append request with appropriate headers and parameters - var headers = new Dictionary() - { - { "user-agent", this.UserAgent }, - { "accept", "application/json" }, - { "Content-Type", "application/json" }, - }; - - // append body params. - var bodyText = ApiHelper.JsonSerialize(body); - - // prepare the API call request to fetch the response. - HttpRequest httpRequest = this.GetClientInstance().PostBody(queryBuilder.ToString(), headers, bodyText); - - if (this.HttpCallBack != null) - { - this.HttpCallBack.OnBeforeHttpRequestEventHandler(this.GetClientInstance(), httpRequest); - } - - httpRequest = await this.AuthManagers["global"].ApplyAsync(httpRequest).ConfigureAwait(false); - - // invoke request and get response. - HttpStringResponse response = await this.GetClientInstance().ExecuteAsStringAsync(httpRequest, cancellationToken: cancellationToken).ConfigureAwait(false); - HttpContext context = new HttpContext(httpRequest, response); - if (this.HttpCallBack != null) - { - this.HttpCallBack.OnAfterHttpResponseEventHandler(this.GetClientInstance(), response); - } - - if (response.StatusCode == 500) - { - throw new ErrorResponseException("Operation failed", context); - } - - // handle errors defined at the API level. - this.ValidateResponse(response, context); - - return response.Body; - } - - /// - /// To programmatically create tags, use this endpoint. - /// - /// Required parameter: Example: . - /// Returns the Models.MetadataTagResponse response from the API call. - public Models.MetadataTagResponse RestapiV2CreateTag( - Models.TspublicRestV2MetadataTagCreateRequest body) - { - Task t = this.RestapiV2CreateTagAsync(body); - ApiHelper.RunTaskSynchronously(t); - return t.Result; - } - - /// - /// To programmatically create tags, use this endpoint. - /// - /// Required parameter: Example: . - /// cancellationToken. - /// Returns the Models.MetadataTagResponse response from the API call. - public async Task RestapiV2CreateTagAsync( - Models.TspublicRestV2MetadataTagCreateRequest body, - CancellationToken cancellationToken = default) - { - // validating required parameters. - if (body == null) - { - throw new ArgumentNullException("body", "The parameter \"body\" is a required parameter and cannot be null."); - } - - // the base uri for api requests. - string baseUri = this.Config.GetBaseUri(); - - // prepare query string for API call. - StringBuilder queryBuilder = new StringBuilder(baseUri); - queryBuilder.Append("/tspublic/rest/v2/metadata/tag/create"); - - // append request with appropriate headers and parameters - var headers = new Dictionary() - { - { "user-agent", this.UserAgent }, - { "accept", "application/json" }, - { "Content-Type", "application/json" }, - }; - - // append body params. - var bodyText = ApiHelper.JsonSerialize(body); - - // prepare the API call request to fetch the response. - HttpRequest httpRequest = this.GetClientInstance().PostBody(queryBuilder.ToString(), headers, bodyText); - - if (this.HttpCallBack != null) - { - this.HttpCallBack.OnBeforeHttpRequestEventHandler(this.GetClientInstance(), httpRequest); - } - - httpRequest = await this.AuthManagers["global"].ApplyAsync(httpRequest).ConfigureAwait(false); - - // invoke request and get response. - HttpStringResponse response = await this.GetClientInstance().ExecuteAsStringAsync(httpRequest, cancellationToken: cancellationToken).ConfigureAwait(false); - HttpContext context = new HttpContext(httpRequest, response); - if (this.HttpCallBack != null) - { - this.HttpCallBack.OnAfterHttpResponseEventHandler(this.GetClientInstance(), response); - } - - if (response.StatusCode == 500) - { - throw new ErrorResponseException("Operation failed", context); - } - - // handle errors defined at the API level. - this.ValidateResponse(response, context); - - return ApiHelper.JsonDeserialize(response.Body); - } - - /// - /// To programmatically update tags, use this endpoint. At least one of id or name of tag is required. When both are given, then id will be considered. - /// - /// Required parameter: Example: . - /// Returns the bool response from the API call. - public bool RestapiV2UpdateTag( - Models.TspublicRestV2MetadataTagUpdateRequest body) - { - Task t = this.RestapiV2UpdateTagAsync(body); - ApiHelper.RunTaskSynchronously(t); - return t.Result; - } - - /// - /// To programmatically update tags, use this endpoint. At least one of id or name of tag is required. When both are given, then id will be considered. - /// - /// Required parameter: Example: . - /// cancellationToken. - /// Returns the bool response from the API call. - public async Task RestapiV2UpdateTagAsync( - Models.TspublicRestV2MetadataTagUpdateRequest body, - CancellationToken cancellationToken = default) - { - // validating required parameters. - if (body == null) - { - throw new ArgumentNullException("body", "The parameter \"body\" is a required parameter and cannot be null."); - } - - // the base uri for api requests. - string baseUri = this.Config.GetBaseUri(); - - // prepare query string for API call. - StringBuilder queryBuilder = new StringBuilder(baseUri); - queryBuilder.Append("/tspublic/rest/v2/metadata/tag/update"); - - // append request with appropriate headers and parameters - var headers = new Dictionary() - { - { "user-agent", this.UserAgent }, - { "Content-Type", "application/json" }, - }; - - // append body params. - var bodyText = ApiHelper.JsonSerialize(body); - - // prepare the API call request to fetch the response. - HttpRequest httpRequest = this.GetClientInstance().PutBody(queryBuilder.ToString(), headers, bodyText); - - if (this.HttpCallBack != null) - { - this.HttpCallBack.OnBeforeHttpRequestEventHandler(this.GetClientInstance(), httpRequest); - } - - httpRequest = await this.AuthManagers["global"].ApplyAsync(httpRequest).ConfigureAwait(false); - - // invoke request and get response. - HttpStringResponse response = await this.GetClientInstance().ExecuteAsStringAsync(httpRequest, cancellationToken: cancellationToken).ConfigureAwait(false); - HttpContext context = new HttpContext(httpRequest, response); - if (this.HttpCallBack != null) - { - this.HttpCallBack.OnAfterHttpResponseEventHandler(this.GetClientInstance(), response); - } - - if (response.StatusCode == 500) - { - throw new ErrorResponseException("Operation failed", context); - } - - // handle errors defined at the API level. - this.ValidateResponse(response, context); - - return bool.Parse(response.Body); - } - - /// - /// To programmatically delete tags, use this endpoint. At least one of id or name of tag is required. When both are given, then id will be considered. - /// - /// Optional parameter: Name of the tag. - /// Optional parameter: The GUID of the tag. - /// Returns the bool response from the API call. - public bool RestapiV2DeleteTag( - string name = null, - string id = null) - { - Task t = this.RestapiV2DeleteTagAsync(name, id); - ApiHelper.RunTaskSynchronously(t); - return t.Result; - } - - /// - /// To programmatically delete tags, use this endpoint. At least one of id or name of tag is required. When both are given, then id will be considered. - /// - /// Optional parameter: Name of the tag. - /// Optional parameter: The GUID of the tag. - /// cancellationToken. - /// Returns the bool response from the API call. - public async Task RestapiV2DeleteTagAsync( - string name = null, - string id = null, - CancellationToken cancellationToken = default) - { - // the base uri for api requests. - string baseUri = this.Config.GetBaseUri(); - - // prepare query string for API call. - StringBuilder queryBuilder = new StringBuilder(baseUri); - queryBuilder.Append("/tspublic/rest/v2/metadata/tag/delete"); - - // prepare specfied query parameters. - var queryParams = new Dictionary() - { - { "name", name }, - { "id", id }, - }; - - // append request with appropriate headers and parameters - var headers = new Dictionary() - { - { "user-agent", this.UserAgent }, - }; - - // prepare the API call request to fetch the response. - HttpRequest httpRequest = this.GetClientInstance().Delete(queryBuilder.ToString(), headers, null, queryParameters: queryParams); - - if (this.HttpCallBack != null) - { - this.HttpCallBack.OnBeforeHttpRequestEventHandler(this.GetClientInstance(), httpRequest); - } - - httpRequest = await this.AuthManagers["global"].ApplyAsync(httpRequest).ConfigureAwait(false); - - // invoke request and get response. - HttpStringResponse response = await this.GetClientInstance().ExecuteAsStringAsync(httpRequest, cancellationToken: cancellationToken).ConfigureAwait(false); - HttpContext context = new HttpContext(httpRequest, response); - if (this.HttpCallBack != null) - { - this.HttpCallBack.OnAfterHttpResponseEventHandler(this.GetClientInstance(), response); - } - - if (response.StatusCode == 500) - { - throw new ErrorResponseException("Operation failed", context); - } - - // handle errors defined at the API level. - this.ValidateResponse(response, context); - - return bool.Parse(response.Body); - } - - /// - /// To programmatically assign tags to a metadata object, such as a liveboard, search answer, table, worksheet, or view, use this endpoint. At least one of id or name of tag is required. When both are given, then id will be considered. - /// - /// Required parameter: Example: . - /// Returns the bool response from the API call. - public bool RestapiV2AssignTag( - Models.TspublicRestV2MetadataTagAssignRequest body) - { - Task t = this.RestapiV2AssignTagAsync(body); - ApiHelper.RunTaskSynchronously(t); - return t.Result; - } - - /// - /// To programmatically assign tags to a metadata object, such as a liveboard, search answer, table, worksheet, or view, use this endpoint. At least one of id or name of tag is required. When both are given, then id will be considered. - /// - /// Required parameter: Example: . - /// cancellationToken. - /// Returns the bool response from the API call. - public async Task RestapiV2AssignTagAsync( - Models.TspublicRestV2MetadataTagAssignRequest body, - CancellationToken cancellationToken = default) - { - // validating required parameters. - if (body == null) - { - throw new ArgumentNullException("body", "The parameter \"body\" is a required parameter and cannot be null."); - } - - // the base uri for api requests. - string baseUri = this.Config.GetBaseUri(); - - // prepare query string for API call. - StringBuilder queryBuilder = new StringBuilder(baseUri); - queryBuilder.Append("/tspublic/rest/v2/metadata/tag/assign"); - - // append request with appropriate headers and parameters - var headers = new Dictionary() - { - { "user-agent", this.UserAgent }, - { "Content-Type", "application/json" }, - }; - - // append body params. - var bodyText = ApiHelper.JsonSerialize(body); - - // prepare the API call request to fetch the response. - HttpRequest httpRequest = this.GetClientInstance().PutBody(queryBuilder.ToString(), headers, bodyText); - - if (this.HttpCallBack != null) - { - this.HttpCallBack.OnBeforeHttpRequestEventHandler(this.GetClientInstance(), httpRequest); - } - - httpRequest = await this.AuthManagers["global"].ApplyAsync(httpRequest).ConfigureAwait(false); - - // invoke request and get response. - HttpStringResponse response = await this.GetClientInstance().ExecuteAsStringAsync(httpRequest, cancellationToken: cancellationToken).ConfigureAwait(false); - HttpContext context = new HttpContext(httpRequest, response); - if (this.HttpCallBack != null) - { - this.HttpCallBack.OnAfterHttpResponseEventHandler(this.GetClientInstance(), response); - } - - if (response.StatusCode == 500) - { - throw new ErrorResponseException("Operation failed", context); - } - - // handle errors defined at the API level. - this.ValidateResponse(response, context); - - return bool.Parse(response.Body); - } - - /// - /// To programmatically unassign tags to a metadata object, such as a liveboard, search answer, table, worksheet, or view, use this endpoint. At least one of id or name of tag is required. When both are given, then id will be considered. - /// - /// Required parameter: Example: . - /// Returns the bool response from the API call. - public bool RestapiV2UnassignTag( - Models.TspublicRestV2MetadataTagUnassignRequest body) - { - Task t = this.RestapiV2UnassignTagAsync(body); - ApiHelper.RunTaskSynchronously(t); - return t.Result; - } - - /// - /// To programmatically unassign tags to a metadata object, such as a liveboard, search answer, table, worksheet, or view, use this endpoint. At least one of id or name of tag is required. When both are given, then id will be considered. - /// - /// Required parameter: Example: . - /// cancellationToken. - /// Returns the bool response from the API call. - public async Task RestapiV2UnassignTagAsync( - Models.TspublicRestV2MetadataTagUnassignRequest body, - CancellationToken cancellationToken = default) - { - // validating required parameters. - if (body == null) - { - throw new ArgumentNullException("body", "The parameter \"body\" is a required parameter and cannot be null."); - } - - // the base uri for api requests. - string baseUri = this.Config.GetBaseUri(); - - // prepare query string for API call. - StringBuilder queryBuilder = new StringBuilder(baseUri); - queryBuilder.Append("/tspublic/rest/v2/metadata/tag/unassign"); - - // append request with appropriate headers and parameters - var headers = new Dictionary() - { - { "user-agent", this.UserAgent }, - { "Content-Type", "application/json" }, - }; - - // append body params. - var bodyText = ApiHelper.JsonSerialize(body); - - // prepare the API call request to fetch the response. - HttpRequest httpRequest = this.GetClientInstance().PutBody(queryBuilder.ToString(), headers, bodyText); - - if (this.HttpCallBack != null) - { - this.HttpCallBack.OnBeforeHttpRequestEventHandler(this.GetClientInstance(), httpRequest); - } - - httpRequest = await this.AuthManagers["global"].ApplyAsync(httpRequest).ConfigureAwait(false); - - // invoke request and get response. - HttpStringResponse response = await this.GetClientInstance().ExecuteAsStringAsync(httpRequest, cancellationToken: cancellationToken).ConfigureAwait(false); - HttpContext context = new HttpContext(httpRequest, response); - if (this.HttpCallBack != null) - { - this.HttpCallBack.OnAfterHttpResponseEventHandler(this.GetClientInstance(), response); - } - - if (response.StatusCode == 500) - { - throw new ErrorResponseException("Operation failed", context); - } - - // handle errors defined at the API level. - this.ValidateResponse(response, context); - - return bool.Parse(response.Body); - } - - /// - /// To programmatically assign objects to favorites for a given user account, use this endpoint. At least one of user id or username is required. When both are given, then id will be considered. - /// - /// Required parameter: Example: . - /// Returns the bool response from the API call. - public bool RestapiV2AssignFavorite( - Models.TspublicRestV2MetadataFavoriteAssignRequest body) - { - Task t = this.RestapiV2AssignFavoriteAsync(body); - ApiHelper.RunTaskSynchronously(t); - return t.Result; - } - - /// - /// To programmatically assign objects to favorites for a given user account, use this endpoint. At least one of user id or username is required. When both are given, then id will be considered. - /// - /// Required parameter: Example: . - /// cancellationToken. - /// Returns the bool response from the API call. - public async Task RestapiV2AssignFavoriteAsync( - Models.TspublicRestV2MetadataFavoriteAssignRequest body, - CancellationToken cancellationToken = default) - { - // validating required parameters. - if (body == null) - { - throw new ArgumentNullException("body", "The parameter \"body\" is a required parameter and cannot be null."); - } - - // the base uri for api requests. - string baseUri = this.Config.GetBaseUri(); - - // prepare query string for API call. - StringBuilder queryBuilder = new StringBuilder(baseUri); - queryBuilder.Append("/tspublic/rest/v2/metadata/favorite/assign"); - - // append request with appropriate headers and parameters - var headers = new Dictionary() - { - { "user-agent", this.UserAgent }, - { "Content-Type", "application/json" }, - }; - - // append body params. - var bodyText = ApiHelper.JsonSerialize(body); - - // prepare the API call request to fetch the response. - HttpRequest httpRequest = this.GetClientInstance().PutBody(queryBuilder.ToString(), headers, bodyText); - - if (this.HttpCallBack != null) - { - this.HttpCallBack.OnBeforeHttpRequestEventHandler(this.GetClientInstance(), httpRequest); - } - - httpRequest = await this.AuthManagers["global"].ApplyAsync(httpRequest).ConfigureAwait(false); - - // invoke request and get response. - HttpStringResponse response = await this.GetClientInstance().ExecuteAsStringAsync(httpRequest, cancellationToken: cancellationToken).ConfigureAwait(false); - HttpContext context = new HttpContext(httpRequest, response); - if (this.HttpCallBack != null) - { - this.HttpCallBack.OnAfterHttpResponseEventHandler(this.GetClientInstance(), response); - } - - if (response.StatusCode == 500) - { - throw new ErrorResponseException("Operation failed", context); - } - - // handle errors defined at the API level. - this.ValidateResponse(response, context); - - return bool.Parse(response.Body); - } - - /// - /// To programmatically unassign objects to favorites for a given user account, use this endpoint. At least one of user id or username is required. When both are given, then id will be considered. - /// - /// Required parameter: Example: . - /// Returns the bool response from the API call. - public bool RestapiV2UnassignFavorite( - Models.TspublicRestV2MetadataFavoriteUnassignRequest body) - { - Task t = this.RestapiV2UnassignFavoriteAsync(body); - ApiHelper.RunTaskSynchronously(t); - return t.Result; - } - - /// - /// To programmatically unassign objects to favorites for a given user account, use this endpoint. At least one of user id or username is required. When both are given, then id will be considered. - /// - /// Required parameter: Example: . - /// cancellationToken. - /// Returns the bool response from the API call. - public async Task RestapiV2UnassignFavoriteAsync( - Models.TspublicRestV2MetadataFavoriteUnassignRequest body, - CancellationToken cancellationToken = default) - { - // validating required parameters. - if (body == null) - { - throw new ArgumentNullException("body", "The parameter \"body\" is a required parameter and cannot be null."); - } - - // the base uri for api requests. - string baseUri = this.Config.GetBaseUri(); - - // prepare query string for API call. - StringBuilder queryBuilder = new StringBuilder(baseUri); - queryBuilder.Append("/tspublic/rest/v2/metadata/favorite/unassign"); - - // append request with appropriate headers and parameters - var headers = new Dictionary() - { - { "user-agent", this.UserAgent }, - { "Content-Type", "application/json" }, - }; - - // append body params. - var bodyText = ApiHelper.JsonSerialize(body); - - // prepare the API call request to fetch the response. - HttpRequest httpRequest = this.GetClientInstance().PutBody(queryBuilder.ToString(), headers, bodyText); - - if (this.HttpCallBack != null) - { - this.HttpCallBack.OnBeforeHttpRequestEventHandler(this.GetClientInstance(), httpRequest); - } - - httpRequest = await this.AuthManagers["global"].ApplyAsync(httpRequest).ConfigureAwait(false); - - // invoke request and get response. - HttpStringResponse response = await this.GetClientInstance().ExecuteAsStringAsync(httpRequest, cancellationToken: cancellationToken).ConfigureAwait(false); - HttpContext context = new HttpContext(httpRequest, response); - if (this.HttpCallBack != null) - { - this.HttpCallBack.OnAfterHttpResponseEventHandler(this.GetClientInstance(), response); - } - - if (response.StatusCode == 500) - { - throw new ErrorResponseException("Operation failed", context); - } - - // handle errors defined at the API level. - this.ValidateResponse(response, context); - - return bool.Parse(response.Body); - } - - /// - /// To assign a specific liveboard as a home liveboard for a user, use this endpoint. At least one of user id or username is required. When both are given, then id will be considered. - /// - /// Required parameter: Example: . - /// Returns the bool response from the API call. - public bool RestapiV2AssignHomeLiveboard( - Models.TspublicRestV2MetadataHomeliveboardAssignRequest body) - { - Task t = this.RestapiV2AssignHomeLiveboardAsync(body); - ApiHelper.RunTaskSynchronously(t); - return t.Result; - } - - /// - /// To assign a specific liveboard as a home liveboard for a user, use this endpoint. At least one of user id or username is required. When both are given, then id will be considered. - /// - /// Required parameter: Example: . - /// cancellationToken. - /// Returns the bool response from the API call. - public async Task RestapiV2AssignHomeLiveboardAsync( - Models.TspublicRestV2MetadataHomeliveboardAssignRequest body, - CancellationToken cancellationToken = default) - { - // validating required parameters. - if (body == null) - { - throw new ArgumentNullException("body", "The parameter \"body\" is a required parameter and cannot be null."); - } - - // the base uri for api requests. - string baseUri = this.Config.GetBaseUri(); - - // prepare query string for API call. - StringBuilder queryBuilder = new StringBuilder(baseUri); - queryBuilder.Append("/tspublic/rest/v2/metadata/homeliveboard/assign"); - - // append request with appropriate headers and parameters - var headers = new Dictionary() - { - { "user-agent", this.UserAgent }, - { "Content-Type", "application/json" }, - }; - - // append body params. - var bodyText = ApiHelper.JsonSerialize(body); - - // prepare the API call request to fetch the response. - HttpRequest httpRequest = this.GetClientInstance().PutBody(queryBuilder.ToString(), headers, bodyText); - - if (this.HttpCallBack != null) - { - this.HttpCallBack.OnBeforeHttpRequestEventHandler(this.GetClientInstance(), httpRequest); - } - - httpRequest = await this.AuthManagers["global"].ApplyAsync(httpRequest).ConfigureAwait(false); - - // invoke request and get response. - HttpStringResponse response = await this.GetClientInstance().ExecuteAsStringAsync(httpRequest, cancellationToken: cancellationToken).ConfigureAwait(false); - HttpContext context = new HttpContext(httpRequest, response); - if (this.HttpCallBack != null) - { - this.HttpCallBack.OnAfterHttpResponseEventHandler(this.GetClientInstance(), response); - } - - if (response.StatusCode == 500) - { - throw new ErrorResponseException("Operation failed", context); - } - - // handle errors defined at the API level. - this.ValidateResponse(response, context); - - return bool.Parse(response.Body); - } - - /// - /// To unassign the home liveboard set for a user, use this endpoint. At least one of user id or username is required. When both are given, then id will be considered. - /// - /// Required parameter: Example: . - /// Returns the bool response from the API call. - public bool RestapiV2UnassignHomeLiveboard( - Models.TspublicRestV2MetadataHomeliveboardUnassignRequest body) - { - Task t = this.RestapiV2UnassignHomeLiveboardAsync(body); - ApiHelper.RunTaskSynchronously(t); - return t.Result; - } - - /// - /// To unassign the home liveboard set for a user, use this endpoint. At least one of user id or username is required. When both are given, then id will be considered. - /// - /// Required parameter: Example: . - /// cancellationToken. - /// Returns the bool response from the API call. - public async Task RestapiV2UnassignHomeLiveboardAsync( - Models.TspublicRestV2MetadataHomeliveboardUnassignRequest body, - CancellationToken cancellationToken = default) - { - // validating required parameters. - if (body == null) - { - throw new ArgumentNullException("body", "The parameter \"body\" is a required parameter and cannot be null."); - } - - // the base uri for api requests. - string baseUri = this.Config.GetBaseUri(); - - // prepare query string for API call. - StringBuilder queryBuilder = new StringBuilder(baseUri); - queryBuilder.Append("/tspublic/rest/v2/metadata/homeliveboard/unassign"); - - // append request with appropriate headers and parameters - var headers = new Dictionary() - { - { "user-agent", this.UserAgent }, - { "Content-Type", "application/json" }, - }; - - // append body params. - var bodyText = ApiHelper.JsonSerialize(body); - - // prepare the API call request to fetch the response. - HttpRequest httpRequest = this.GetClientInstance().PutBody(queryBuilder.ToString(), headers, bodyText); - - if (this.HttpCallBack != null) - { - this.HttpCallBack.OnBeforeHttpRequestEventHandler(this.GetClientInstance(), httpRequest); - } - - httpRequest = await this.AuthManagers["global"].ApplyAsync(httpRequest).ConfigureAwait(false); - - // invoke request and get response. - HttpStringResponse response = await this.GetClientInstance().ExecuteAsStringAsync(httpRequest, cancellationToken: cancellationToken).ConfigureAwait(false); - HttpContext context = new HttpContext(httpRequest, response); - if (this.HttpCallBack != null) - { - this.HttpCallBack.OnAfterHttpResponseEventHandler(this.GetClientInstance(), response); - } - - if (response.StatusCode == 500) - { - throw new ErrorResponseException("Operation failed", context); - } - - // handle errors defined at the API level. - this.ValidateResponse(response, context); - - return bool.Parse(response.Body); - } - - /// - /// To export ThoughtSpot objects represented in ThoughtSpot Modeling Language (TML), use this endpoint. - /// - /// Required parameter: Example: . - /// Returns the object response from the API call. - public object RestapiV2ExportObjectTML( - Models.TspublicRestV2MetadataTmlExportRequest body) - { - Task t = this.RestapiV2ExportObjectTMLAsync(body); - ApiHelper.RunTaskSynchronously(t); - return t.Result; - } - - /// - /// To export ThoughtSpot objects represented in ThoughtSpot Modeling Language (TML), use this endpoint. - /// - /// Required parameter: Example: . - /// cancellationToken. - /// Returns the object response from the API call. - public async Task RestapiV2ExportObjectTMLAsync( - Models.TspublicRestV2MetadataTmlExportRequest body, - CancellationToken cancellationToken = default) - { - // validating required parameters. - if (body == null) - { - throw new ArgumentNullException("body", "The parameter \"body\" is a required parameter and cannot be null."); - } - - // the base uri for api requests. - string baseUri = this.Config.GetBaseUri(); - - // prepare query string for API call. - StringBuilder queryBuilder = new StringBuilder(baseUri); - queryBuilder.Append("/tspublic/rest/v2/metadata/tml/export"); - - // append request with appropriate headers and parameters - var headers = new Dictionary() - { - { "user-agent", this.UserAgent }, - { "accept", "application/json" }, - { "Content-Type", "application/json" }, - }; - - // append body params. - var bodyText = ApiHelper.JsonSerialize(body); - - // prepare the API call request to fetch the response. - HttpRequest httpRequest = this.GetClientInstance().PostBody(queryBuilder.ToString(), headers, bodyText); - - if (this.HttpCallBack != null) - { - this.HttpCallBack.OnBeforeHttpRequestEventHandler(this.GetClientInstance(), httpRequest); - } - - httpRequest = await this.AuthManagers["global"].ApplyAsync(httpRequest).ConfigureAwait(false); - - // invoke request and get response. - HttpStringResponse response = await this.GetClientInstance().ExecuteAsStringAsync(httpRequest, cancellationToken: cancellationToken).ConfigureAwait(false); - HttpContext context = new HttpContext(httpRequest, response); - if (this.HttpCallBack != null) - { - this.HttpCallBack.OnAfterHttpResponseEventHandler(this.GetClientInstance(), response); - } - - if (response.StatusCode == 500) - { - throw new ErrorResponseException("Operation failed", context); - } - - // handle errors defined at the API level. - this.ValidateResponse(response, context); - - return response.Body; - } - - /// - /// To import ThoughtSpot objects represented in ThoughtSpot Modeling Language (TML), use this endpoint. - /// - /// Required parameter: Example: . - /// Returns the object response from the API call. - public object RestapiV2ImportObjectTML( - Models.TspublicRestV2MetadataTmlImportRequest body) - { - Task t = this.RestapiV2ImportObjectTMLAsync(body); - ApiHelper.RunTaskSynchronously(t); - return t.Result; - } - - /// - /// To import ThoughtSpot objects represented in ThoughtSpot Modeling Language (TML), use this endpoint. - /// - /// Required parameter: Example: . - /// cancellationToken. - /// Returns the object response from the API call. - public async Task RestapiV2ImportObjectTMLAsync( - Models.TspublicRestV2MetadataTmlImportRequest body, - CancellationToken cancellationToken = default) - { - // validating required parameters. - if (body == null) - { - throw new ArgumentNullException("body", "The parameter \"body\" is a required parameter and cannot be null."); - } - - // the base uri for api requests. - string baseUri = this.Config.GetBaseUri(); - - // prepare query string for API call. - StringBuilder queryBuilder = new StringBuilder(baseUri); - queryBuilder.Append("/tspublic/rest/v2/metadata/tml/import"); - - // append request with appropriate headers and parameters - var headers = new Dictionary() - { - { "user-agent", this.UserAgent }, - { "accept", "application/json" }, - { "Content-Type", "application/json" }, - }; - - // append body params. - var bodyText = ApiHelper.JsonSerialize(body); - - // prepare the API call request to fetch the response. - HttpRequest httpRequest = this.GetClientInstance().PostBody(queryBuilder.ToString(), headers, bodyText); - - if (this.HttpCallBack != null) - { - this.HttpCallBack.OnBeforeHttpRequestEventHandler(this.GetClientInstance(), httpRequest); - } - - httpRequest = await this.AuthManagers["global"].ApplyAsync(httpRequest).ConfigureAwait(false); - - // invoke request and get response. - HttpStringResponse response = await this.GetClientInstance().ExecuteAsStringAsync(httpRequest, cancellationToken: cancellationToken).ConfigureAwait(false); - HttpContext context = new HttpContext(httpRequest, response); - if (this.HttpCallBack != null) - { - this.HttpCallBack.OnAfterHttpResponseEventHandler(this.GetClientInstance(), response); - } - - if (response.StatusCode == 500) - { - throw new ErrorResponseException("Operation failed", context); - } - - // handle errors defined at the API level. - this.ValidateResponse(response, context); - - return response.Body; - } - - /// - /// Use this endpoint to delete the metadata objects. - /// - /// Required parameter: Type of the metadata object being searched. - /// Required parameter: A JSON array of GUIDs of the objects. - /// Returns the bool response from the API call. - public bool RestapiV2DeleteObject( - Models.Type4Enum type, - List id) - { - Task t = this.RestapiV2DeleteObjectAsync(type, id); - ApiHelper.RunTaskSynchronously(t); - return t.Result; - } - - /// - /// Use this endpoint to delete the metadata objects. - /// - /// Required parameter: Type of the metadata object being searched. - /// Required parameter: A JSON array of GUIDs of the objects. - /// cancellationToken. - /// Returns the bool response from the API call. - public async Task RestapiV2DeleteObjectAsync( - Models.Type4Enum type, - List id, - CancellationToken cancellationToken = default) - { - // validating required parameters. - if (id == null) - { - throw new ArgumentNullException("id", "The parameter \"id\" is a required parameter and cannot be null."); - } - - // the base uri for api requests. - string baseUri = this.Config.GetBaseUri(); - - // prepare query string for API call. - StringBuilder queryBuilder = new StringBuilder(baseUri); - queryBuilder.Append("/tspublic/rest/v2/metadata/delete"); - - // prepare specfied query parameters. - var queryParams = new Dictionary() - { - { "type", ApiHelper.JsonSerialize(type).Trim('\"') }, - { "id", id }, - }; - - // append request with appropriate headers and parameters - var headers = new Dictionary() - { - { "user-agent", this.UserAgent }, - }; - - // prepare the API call request to fetch the response. - HttpRequest httpRequest = this.GetClientInstance().Delete(queryBuilder.ToString(), headers, null, queryParameters: queryParams); - - if (this.HttpCallBack != null) - { - this.HttpCallBack.OnBeforeHttpRequestEventHandler(this.GetClientInstance(), httpRequest); - } - - httpRequest = await this.AuthManagers["global"].ApplyAsync(httpRequest).ConfigureAwait(false); - - // invoke request and get response. - HttpStringResponse response = await this.GetClientInstance().ExecuteAsStringAsync(httpRequest, cancellationToken: cancellationToken).ConfigureAwait(false); - HttpContext context = new HttpContext(httpRequest, response); - if (this.HttpCallBack != null) - { - this.HttpCallBack.OnAfterHttpResponseEventHandler(this.GetClientInstance(), response); - } - - if (response.StatusCode == 500) - { - throw new ErrorResponseException("Operation failed", context); - } - - // handle errors defined at the API level. - this.ValidateResponse(response, context); - - return bool.Parse(response.Body); - } - - /// - /// To query the details of dependent objects and associate objects as dependents, you can use this API. Dependency is defined as relation between referenced and referencing objects. A referencing object is said to have a dependency on a referenced object, if the referenced object cannot be deleted without first deleting the referencing object. For example, consider a worksheet 'W1' that has a derived logical column 'C1' that has a reference to a base logical column 'C2'. This can be shown diagramatically as: W1-->C1-->C2. W1 has a dependency on C2 i.e. W1 is a referencing object and C2 is a referenced object. It is not possible to delete C2 without first deleting W1 because deletion of C2 will be prevented by the relationship between W1's column C1 and C2. Similarly C1 is said to have a dependency on C2 i.e. C1 is a referencing object and C2 is a referenced object. It is not possible to delete C2 without first deleting C1. - /// - /// Required parameter: Example: . - /// Returns the object response from the API call. - public object RestapiV2GetObjectDependency( - Models.TspublicRestV2MetadataDependencyRequest body) - { - Task t = this.RestapiV2GetObjectDependencyAsync(body); - ApiHelper.RunTaskSynchronously(t); - return t.Result; - } - - /// - /// To query the details of dependent objects and associate objects as dependents, you can use this API. Dependency is defined as relation between referenced and referencing objects. A referencing object is said to have a dependency on a referenced object, if the referenced object cannot be deleted without first deleting the referencing object. For example, consider a worksheet 'W1' that has a derived logical column 'C1' that has a reference to a base logical column 'C2'. This can be shown diagramatically as: W1-->C1-->C2. W1 has a dependency on C2 i.e. W1 is a referencing object and C2 is a referenced object. It is not possible to delete C2 without first deleting W1 because deletion of C2 will be prevented by the relationship between W1's column C1 and C2. Similarly C1 is said to have a dependency on C2 i.e. C1 is a referencing object and C2 is a referenced object. It is not possible to delete C2 without first deleting C1. - /// - /// Required parameter: Example: . - /// cancellationToken. - /// Returns the object response from the API call. - public async Task RestapiV2GetObjectDependencyAsync( - Models.TspublicRestV2MetadataDependencyRequest body, - CancellationToken cancellationToken = default) - { - // validating required parameters. - if (body == null) - { - throw new ArgumentNullException("body", "The parameter \"body\" is a required parameter and cannot be null."); - } - - // the base uri for api requests. - string baseUri = this.Config.GetBaseUri(); - - // prepare query string for API call. - StringBuilder queryBuilder = new StringBuilder(baseUri); - queryBuilder.Append("/tspublic/rest/v2/metadata/dependency"); - - // append request with appropriate headers and parameters - var headers = new Dictionary() - { - { "user-agent", this.UserAgent }, - { "accept", "application/json" }, - { "Content-Type", "application/json" }, - }; - - // append body params. - var bodyText = ApiHelper.JsonSerialize(body); - - // prepare the API call request to fetch the response. - HttpRequest httpRequest = this.GetClientInstance().PostBody(queryBuilder.ToString(), headers, bodyText); - - if (this.HttpCallBack != null) - { - this.HttpCallBack.OnBeforeHttpRequestEventHandler(this.GetClientInstance(), httpRequest); - } - - httpRequest = await this.AuthManagers["global"].ApplyAsync(httpRequest).ConfigureAwait(false); - - // invoke request and get response. - HttpStringResponse response = await this.GetClientInstance().ExecuteAsStringAsync(httpRequest, cancellationToken: cancellationToken).ConfigureAwait(false); - HttpContext context = new HttpContext(httpRequest, response); - if (this.HttpCallBack != null) - { - this.HttpCallBack.OnAfterHttpResponseEventHandler(this.GetClientInstance(), response); - } - - if (response.StatusCode == 500) - { - throw new ErrorResponseException("Operation failed", context); - } - - // handle errors defined at the API level. - this.ValidateResponse(response, context); - - return response.Body; - } - } -} \ No newline at end of file diff --git a/DotNet/ThoughtSpotPublicRESTAPI.Standard/Controllers/OrgController.cs b/DotNet/ThoughtSpotPublicRESTAPI.Standard/Controllers/OrgController.cs deleted file mode 100644 index 4cb607cab..000000000 --- a/DotNet/ThoughtSpotPublicRESTAPI.Standard/Controllers/OrgController.cs +++ /dev/null @@ -1,441 +0,0 @@ -// -// Copyright (c) APIMatic. All rights reserved. -// -namespace ThoughtSpotPublicRESTAPI.Standard.Controllers -{ - using System; - using System.Collections.Generic; - using System.Dynamic; - using System.Globalization; - using System.IO; - using System.Linq; - using System.Text; - using System.Threading; - using System.Threading.Tasks; - using Newtonsoft.Json.Converters; - using ThoughtSpotPublicRESTAPI.Standard; - using ThoughtSpotPublicRESTAPI.Standard.Authentication; - using ThoughtSpotPublicRESTAPI.Standard.Exceptions; - using ThoughtSpotPublicRESTAPI.Standard.Http.Client; - using ThoughtSpotPublicRESTAPI.Standard.Http.Request; - using ThoughtSpotPublicRESTAPI.Standard.Http.Request.Configuration; - using ThoughtSpotPublicRESTAPI.Standard.Http.Response; - using ThoughtSpotPublicRESTAPI.Standard.Utilities; - - /// - /// OrgController. - /// - public class OrgController : BaseController - { - /// - /// Initializes a new instance of the class. - /// - /// config instance. - /// httpClient. - /// authManager. - /// httpCallBack. - internal OrgController(IConfiguration config, IHttpClient httpClient, IDictionary authManagers, HttpCallBack httpCallBack = null) - : base(config, httpClient, authManagers, httpCallBack) - { - } - - /// - /// To get the details of a specific organization by name or id, use this endpoint. . - /// At least one value needed. When both are given,then id will be considered to fetch organization information. . - /// Requires Administration privilege for tenant. - /// - /// Optional parameter: Name of the organization.. - /// Optional parameter: The ID of the organization.. - /// Returns the Models.OrgsResponse response from the API call. - public Models.OrgsResponse RestapiV2GetOrg( - string name = null, - int? id = null) - { - Task t = this.RestapiV2GetOrgAsync(name, id); - ApiHelper.RunTaskSynchronously(t); - return t.Result; - } - - /// - /// To get the details of a specific organization by name or id, use this endpoint. . - /// At least one value needed. When both are given,then id will be considered to fetch organization information. . - /// Requires Administration privilege for tenant. - /// - /// Optional parameter: Name of the organization.. - /// Optional parameter: The ID of the organization.. - /// cancellationToken. - /// Returns the Models.OrgsResponse response from the API call. - public async Task RestapiV2GetOrgAsync( - string name = null, - int? id = null, - CancellationToken cancellationToken = default) - { - // the base uri for api requests. - string baseUri = this.Config.GetBaseUri(); - - // prepare query string for API call. - StringBuilder queryBuilder = new StringBuilder(baseUri); - queryBuilder.Append("/tspublic/rest/v2/org"); - - // prepare specfied query parameters. - var queryParams = new Dictionary() - { - { "name", name }, - { "id", id }, - }; - - // append request with appropriate headers and parameters - var headers = new Dictionary() - { - { "user-agent", this.UserAgent }, - { "accept", "application/json" }, - }; - - // prepare the API call request to fetch the response. - HttpRequest httpRequest = this.GetClientInstance().Get(queryBuilder.ToString(), headers, queryParameters: queryParams); - - if (this.HttpCallBack != null) - { - this.HttpCallBack.OnBeforeHttpRequestEventHandler(this.GetClientInstance(), httpRequest); - } - - httpRequest = await this.AuthManagers["global"].ApplyAsync(httpRequest).ConfigureAwait(false); - - // invoke request and get response. - HttpStringResponse response = await this.GetClientInstance().ExecuteAsStringAsync(httpRequest, cancellationToken: cancellationToken).ConfigureAwait(false); - HttpContext context = new HttpContext(httpRequest, response); - if (this.HttpCallBack != null) - { - this.HttpCallBack.OnAfterHttpResponseEventHandler(this.GetClientInstance(), response); - } - - if (response.StatusCode == 500) - { - throw new ErrorResponseException("Operation failed", context); - } - - // handle errors defined at the API level. - this.ValidateResponse(response, context); - - return ApiHelper.JsonDeserialize(response.Body); - } - - /// - /// To programmatically create an organization in the ThoughtSpot system, use this API endpoint. . - /// Requires Administration privilege for tenant. - /// - /// Required parameter: Example: . - /// Returns the Models.OrgsResponse response from the API call. - public Models.OrgsResponse RestapiV2CreateOrg( - Models.TspublicRestV2OrgCreateRequest body) - { - Task t = this.RestapiV2CreateOrgAsync(body); - ApiHelper.RunTaskSynchronously(t); - return t.Result; - } - - /// - /// To programmatically create an organization in the ThoughtSpot system, use this API endpoint. . - /// Requires Administration privilege for tenant. - /// - /// Required parameter: Example: . - /// cancellationToken. - /// Returns the Models.OrgsResponse response from the API call. - public async Task RestapiV2CreateOrgAsync( - Models.TspublicRestV2OrgCreateRequest body, - CancellationToken cancellationToken = default) - { - // validating required parameters. - if (body == null) - { - throw new ArgumentNullException("body", "The parameter \"body\" is a required parameter and cannot be null."); - } - - // the base uri for api requests. - string baseUri = this.Config.GetBaseUri(); - - // prepare query string for API call. - StringBuilder queryBuilder = new StringBuilder(baseUri); - queryBuilder.Append("/tspublic/rest/v2/org/create"); - - // append request with appropriate headers and parameters - var headers = new Dictionary() - { - { "user-agent", this.UserAgent }, - { "accept", "application/json" }, - { "Content-Type", "application/json" }, - }; - - // append body params. - var bodyText = ApiHelper.JsonSerialize(body); - - // prepare the API call request to fetch the response. - HttpRequest httpRequest = this.GetClientInstance().PostBody(queryBuilder.ToString(), headers, bodyText); - - if (this.HttpCallBack != null) - { - this.HttpCallBack.OnBeforeHttpRequestEventHandler(this.GetClientInstance(), httpRequest); - } - - httpRequest = await this.AuthManagers["global"].ApplyAsync(httpRequest).ConfigureAwait(false); - - // invoke request and get response. - HttpStringResponse response = await this.GetClientInstance().ExecuteAsStringAsync(httpRequest, cancellationToken: cancellationToken).ConfigureAwait(false); - HttpContext context = new HttpContext(httpRequest, response); - if (this.HttpCallBack != null) - { - this.HttpCallBack.OnAfterHttpResponseEventHandler(this.GetClientInstance(), response); - } - - if (response.StatusCode == 500) - { - throw new ErrorResponseException("Operation failed", context); - } - - // handle errors defined at the API level. - this.ValidateResponse(response, context); - - return ApiHelper.JsonDeserialize(response.Body); - } - - /// - /// You can use this endpoint to programmatically modify an existing org. . - /// Provide name or id of the organization to update the properties. When both id and name are given, then id will be considered and name of the organization will be updated. . - /// Requires Administration privilege for tenant. - /// - /// Required parameter: Example: . - /// Returns the Models.OrgsResponse response from the API call. - public Models.OrgsResponse RestapiV2UpdateOrg( - Models.TspublicRestV2OrgUpdateRequest body) - { - Task t = this.RestapiV2UpdateOrgAsync(body); - ApiHelper.RunTaskSynchronously(t); - return t.Result; - } - - /// - /// You can use this endpoint to programmatically modify an existing org. . - /// Provide name or id of the organization to update the properties. When both id and name are given, then id will be considered and name of the organization will be updated. . - /// Requires Administration privilege for tenant. - /// - /// Required parameter: Example: . - /// cancellationToken. - /// Returns the Models.OrgsResponse response from the API call. - public async Task RestapiV2UpdateOrgAsync( - Models.TspublicRestV2OrgUpdateRequest body, - CancellationToken cancellationToken = default) - { - // validating required parameters. - if (body == null) - { - throw new ArgumentNullException("body", "The parameter \"body\" is a required parameter and cannot be null."); - } - - // the base uri for api requests. - string baseUri = this.Config.GetBaseUri(); - - // prepare query string for API call. - StringBuilder queryBuilder = new StringBuilder(baseUri); - queryBuilder.Append("/tspublic/rest/v2/org/update"); - - // append request with appropriate headers and parameters - var headers = new Dictionary() - { - { "user-agent", this.UserAgent }, - { "accept", "application/json" }, - { "Content-Type", "application/json" }, - }; - - // append body params. - var bodyText = ApiHelper.JsonSerialize(body); - - // prepare the API call request to fetch the response. - HttpRequest httpRequest = this.GetClientInstance().PutBody(queryBuilder.ToString(), headers, bodyText); - - if (this.HttpCallBack != null) - { - this.HttpCallBack.OnBeforeHttpRequestEventHandler(this.GetClientInstance(), httpRequest); - } - - httpRequest = await this.AuthManagers["global"].ApplyAsync(httpRequest).ConfigureAwait(false); - - // invoke request and get response. - HttpStringResponse response = await this.GetClientInstance().ExecuteAsStringAsync(httpRequest, cancellationToken: cancellationToken).ConfigureAwait(false); - HttpContext context = new HttpContext(httpRequest, response); - if (this.HttpCallBack != null) - { - this.HttpCallBack.OnAfterHttpResponseEventHandler(this.GetClientInstance(), response); - } - - if (response.StatusCode == 500) - { - throw new ErrorResponseException("Operation failed", context); - } - - // handle errors defined at the API level. - this.ValidateResponse(response, context); - - return ApiHelper.JsonDeserialize(response.Body); - } - - /// - /// To remove an organization from the ThoughtSpot system, send a DELETE request to this endpoint. . - /// At least one value is needed. When both id and name are given, then id will be considered. . - /// Requires Administration privilege for tenant. - /// - /// Optional parameter: Name of the organization.. - /// Optional parameter: The ID of the organization.. - /// Returns the bool response from the API call. - public bool RestapiV2DeleteOrg( - string name = null, - int? id = null) - { - Task t = this.RestapiV2DeleteOrgAsync(name, id); - ApiHelper.RunTaskSynchronously(t); - return t.Result; - } - - /// - /// To remove an organization from the ThoughtSpot system, send a DELETE request to this endpoint. . - /// At least one value is needed. When both id and name are given, then id will be considered. . - /// Requires Administration privilege for tenant. - /// - /// Optional parameter: Name of the organization.. - /// Optional parameter: The ID of the organization.. - /// cancellationToken. - /// Returns the bool response from the API call. - public async Task RestapiV2DeleteOrgAsync( - string name = null, - int? id = null, - CancellationToken cancellationToken = default) - { - // the base uri for api requests. - string baseUri = this.Config.GetBaseUri(); - - // prepare query string for API call. - StringBuilder queryBuilder = new StringBuilder(baseUri); - queryBuilder.Append("/tspublic/rest/v2/org/delete"); - - // prepare specfied query parameters. - var queryParams = new Dictionary() - { - { "name", name }, - { "id", id }, - }; - - // append request with appropriate headers and parameters - var headers = new Dictionary() - { - { "user-agent", this.UserAgent }, - }; - - // prepare the API call request to fetch the response. - HttpRequest httpRequest = this.GetClientInstance().Delete(queryBuilder.ToString(), headers, null, queryParameters: queryParams); - - if (this.HttpCallBack != null) - { - this.HttpCallBack.OnBeforeHttpRequestEventHandler(this.GetClientInstance(), httpRequest); - } - - httpRequest = await this.AuthManagers["global"].ApplyAsync(httpRequest).ConfigureAwait(false); - - // invoke request and get response. - HttpStringResponse response = await this.GetClientInstance().ExecuteAsStringAsync(httpRequest, cancellationToken: cancellationToken).ConfigureAwait(false); - HttpContext context = new HttpContext(httpRequest, response); - if (this.HttpCallBack != null) - { - this.HttpCallBack.OnAfterHttpResponseEventHandler(this.GetClientInstance(), response); - } - - if (response.StatusCode == 500) - { - throw new ErrorResponseException("Operation failed", context); - } - - // handle errors defined at the API level. - this.ValidateResponse(response, context); - - return bool.Parse(response.Body); - } - - /// - /// To get the details of a specific organization or all organizations in the ThoughtSpot system use this end point. . - /// If no input is provided, then all organizations are included in the response. . - /// Requires Administration privilege for tenant. - /// - /// Required parameter: Example: . - /// Returns the List of Models.OrgsResponse response from the API call. - public List RestapiV2SearchOrgs( - Models.TspublicRestV2OrgSearchRequest body) - { - Task> t = this.RestapiV2SearchOrgsAsync(body); - ApiHelper.RunTaskSynchronously(t); - return t.Result; - } - - /// - /// To get the details of a specific organization or all organizations in the ThoughtSpot system use this end point. . - /// If no input is provided, then all organizations are included in the response. . - /// Requires Administration privilege for tenant. - /// - /// Required parameter: Example: . - /// cancellationToken. - /// Returns the List of Models.OrgsResponse response from the API call. - public async Task> RestapiV2SearchOrgsAsync( - Models.TspublicRestV2OrgSearchRequest body, - CancellationToken cancellationToken = default) - { - // validating required parameters. - if (body == null) - { - throw new ArgumentNullException("body", "The parameter \"body\" is a required parameter and cannot be null."); - } - - // the base uri for api requests. - string baseUri = this.Config.GetBaseUri(); - - // prepare query string for API call. - StringBuilder queryBuilder = new StringBuilder(baseUri); - queryBuilder.Append("/tspublic/rest/v2/org/search"); - - // append request with appropriate headers and parameters - var headers = new Dictionary() - { - { "user-agent", this.UserAgent }, - { "accept", "application/json" }, - { "Content-Type", "application/json" }, - }; - - // append body params. - var bodyText = ApiHelper.JsonSerialize(body); - - // prepare the API call request to fetch the response. - HttpRequest httpRequest = this.GetClientInstance().PostBody(queryBuilder.ToString(), headers, bodyText); - - if (this.HttpCallBack != null) - { - this.HttpCallBack.OnBeforeHttpRequestEventHandler(this.GetClientInstance(), httpRequest); - } - - httpRequest = await this.AuthManagers["global"].ApplyAsync(httpRequest).ConfigureAwait(false); - - // invoke request and get response. - HttpStringResponse response = await this.GetClientInstance().ExecuteAsStringAsync(httpRequest, cancellationToken: cancellationToken).ConfigureAwait(false); - HttpContext context = new HttpContext(httpRequest, response); - if (this.HttpCallBack != null) - { - this.HttpCallBack.OnAfterHttpResponseEventHandler(this.GetClientInstance(), response); - } - - if (response.StatusCode == 500) - { - throw new ErrorResponseException("Operation failed", context); - } - - // handle errors defined at the API level. - this.ValidateResponse(response, context); - - return ApiHelper.JsonDeserialize>(response.Body); - } - } -} \ No newline at end of file diff --git a/DotNet/ThoughtSpotPublicRESTAPI.Standard/Controllers/ReportController.cs b/DotNet/ThoughtSpotPublicRESTAPI.Standard/Controllers/ReportController.cs deleted file mode 100644 index a98855bd0..000000000 --- a/DotNet/ThoughtSpotPublicRESTAPI.Standard/Controllers/ReportController.cs +++ /dev/null @@ -1,229 +0,0 @@ -// -// Copyright (c) APIMatic. All rights reserved. -// -namespace ThoughtSpotPublicRESTAPI.Standard.Controllers -{ - using System; - using System.Collections.Generic; - using System.Dynamic; - using System.Globalization; - using System.IO; - using System.Linq; - using System.Text; - using System.Threading; - using System.Threading.Tasks; - using Newtonsoft.Json.Converters; - using ThoughtSpotPublicRESTAPI.Standard; - using ThoughtSpotPublicRESTAPI.Standard.Authentication; - using ThoughtSpotPublicRESTAPI.Standard.Exceptions; - using ThoughtSpotPublicRESTAPI.Standard.Http.Client; - using ThoughtSpotPublicRESTAPI.Standard.Http.Request; - using ThoughtSpotPublicRESTAPI.Standard.Http.Request.Configuration; - using ThoughtSpotPublicRESTAPI.Standard.Http.Response; - using ThoughtSpotPublicRESTAPI.Standard.Utilities; - - /// - /// ReportController. - /// - public class ReportController : BaseController - { - /// - /// Initializes a new instance of the class. - /// - /// config instance. - /// httpClient. - /// authManager. - /// httpCallBack. - internal ReportController(IConfiguration config, IHttpClient httpClient, IDictionary authManagers, HttpCallBack httpCallBack = null) - : base(config, httpClient, authManagers, httpCallBack) - { - } - - /// - /// To programmatically download Answer data as a file, use this endpoint. . - /// The PDF will download data in the tabular format even if Answer is saved as chart. - /// - /// Required parameter: GUID of the Answer to download.. - /// Required parameter: Type of file to be generated.. - /// Returns the object response from the API call. - public object RestapiV2AnswerReport( - string id, - Models.Type16Enum type) - { - Task t = this.RestapiV2AnswerReportAsync(id, type); - ApiHelper.RunTaskSynchronously(t); - return t.Result; - } - - /// - /// To programmatically download Answer data as a file, use this endpoint. . - /// The PDF will download data in the tabular format even if Answer is saved as chart. - /// - /// Required parameter: GUID of the Answer to download.. - /// Required parameter: Type of file to be generated.. - /// cancellationToken. - /// Returns the object response from the API call. - public async Task RestapiV2AnswerReportAsync( - string id, - Models.Type16Enum type, - CancellationToken cancellationToken = default) - { - // validating required parameters. - if (id == null) - { - throw new ArgumentNullException("id", "The parameter \"id\" is a required parameter and cannot be null."); - } - - // the base uri for api requests. - string baseUri = this.Config.GetBaseUri(); - - // prepare query string for API call. - StringBuilder queryBuilder = new StringBuilder(baseUri); - queryBuilder.Append("/tspublic/rest/v2/report/answer"); - - // prepare specfied query parameters. - var queryParams = new Dictionary() - { - { "id", id }, - { "type", ApiHelper.JsonSerialize(type).Trim('\"') }, - }; - - // append request with appropriate headers and parameters - var headers = new Dictionary() - { - { "user-agent", this.UserAgent }, - { "accept", "application/json" }, - }; - - // prepare the API call request to fetch the response. - HttpRequest httpRequest = this.GetClientInstance().Get(queryBuilder.ToString(), headers, queryParameters: queryParams); - - if (this.HttpCallBack != null) - { - this.HttpCallBack.OnBeforeHttpRequestEventHandler(this.GetClientInstance(), httpRequest); - } - - httpRequest = await this.AuthManagers["global"].ApplyAsync(httpRequest).ConfigureAwait(false); - - // invoke request and get response. - HttpStringResponse response = await this.GetClientInstance().ExecuteAsStringAsync(httpRequest, cancellationToken: cancellationToken).ConfigureAwait(false); - HttpContext context = new HttpContext(httpRequest, response); - if (this.HttpCallBack != null) - { - this.HttpCallBack.OnAfterHttpResponseEventHandler(this.GetClientInstance(), response); - } - - if (response.StatusCode == 500) - { - throw new ErrorResponseException("Operation failed", context); - } - - // handle errors defined at the API level. - this.ValidateResponse(response, context); - - return response.Body; - } - - /// - /// To programmatically download Liveboard data or specific Visualization data from Liveboard as a file, use this endpoint. - /// - /// Required parameter: Type of file to be generated. Valid values: CSV/XLSX/PDF/PNG.. - /// Optional parameter: GUID of the Liveboard to download. This field is considered only when no input is provided for transientContent field.. - /// Optional parameter: JSON Array of GUIDs of the visualizations in the Liveboard to be included in the downloaded file. For CSV, XLSX and PNG file download, visualization id is mandatory. CSV and XLSX is valid only for visualization of type table and PNG is valid for charts. Only one value will be accepted for these formats. If multiple values are provided then first value in the array will be considered.. - /// Optional parameter: If you have embedded ThoughtSpot in your host application, and you want to download Liveboards with unsaved changes as a file, pass the transient content from the browser fetch request, using the getExportRequestForCurrentPinboard method. For more information, see https://developers.thoughtspot.com/docs/?pageid=liveboard-export-api#transient-pinboard.. - /// Optional parameter: If you have embedded ThoughtSpot in your host application, and you want to download Liveboards with unsaved changes as a file, pass the transient content from the browser fetch request, using the getExportRequestForCurrentPinboard method. For more information, see https://developers.thoughtspot.com/docs/?pageid=liveboard-export-api#transient-pinboard .. - /// Optional parameter: JSON object which provides columns to sort the data at the time of data retrieval. Example: {"sortCol1":"region","asc1":true,"sortCol2":"date"} For more information, see https://developers.thoughtspot.com/docs/?pageid=runtime-filters. - /// Optional parameter: Additional options that are applicable for PDF type.. - /// Returns the object response from the API call. - public object RestapiV2LiveboardReport( - Models.Type16Enum type, - string id = null, - List vizId = null, - string transientContent = null, - string runtimeFilter = null, - string runtimeSort = null, - Models.PdfOptionsInput pdfOptions = null) - { - Task t = this.RestapiV2LiveboardReportAsync(type, id, vizId, transientContent, runtimeFilter, runtimeSort, pdfOptions); - ApiHelper.RunTaskSynchronously(t); - return t.Result; - } - - /// - /// To programmatically download Liveboard data or specific Visualization data from Liveboard as a file, use this endpoint. - /// - /// Required parameter: Type of file to be generated. Valid values: CSV/XLSX/PDF/PNG.. - /// Optional parameter: GUID of the Liveboard to download. This field is considered only when no input is provided for transientContent field.. - /// Optional parameter: JSON Array of GUIDs of the visualizations in the Liveboard to be included in the downloaded file. For CSV, XLSX and PNG file download, visualization id is mandatory. CSV and XLSX is valid only for visualization of type table and PNG is valid for charts. Only one value will be accepted for these formats. If multiple values are provided then first value in the array will be considered.. - /// Optional parameter: If you have embedded ThoughtSpot in your host application, and you want to download Liveboards with unsaved changes as a file, pass the transient content from the browser fetch request, using the getExportRequestForCurrentPinboard method. For more information, see https://developers.thoughtspot.com/docs/?pageid=liveboard-export-api#transient-pinboard.. - /// Optional parameter: If you have embedded ThoughtSpot in your host application, and you want to download Liveboards with unsaved changes as a file, pass the transient content from the browser fetch request, using the getExportRequestForCurrentPinboard method. For more information, see https://developers.thoughtspot.com/docs/?pageid=liveboard-export-api#transient-pinboard .. - /// Optional parameter: JSON object which provides columns to sort the data at the time of data retrieval. Example: {"sortCol1":"region","asc1":true,"sortCol2":"date"} For more information, see https://developers.thoughtspot.com/docs/?pageid=runtime-filters. - /// Optional parameter: Additional options that are applicable for PDF type.. - /// cancellationToken. - /// Returns the object response from the API call. - public async Task RestapiV2LiveboardReportAsync( - Models.Type16Enum type, - string id = null, - List vizId = null, - string transientContent = null, - string runtimeFilter = null, - string runtimeSort = null, - Models.PdfOptionsInput pdfOptions = null, - CancellationToken cancellationToken = default) - { - // the base uri for api requests. - string baseUri = this.Config.GetBaseUri(); - - // prepare query string for API call. - StringBuilder queryBuilder = new StringBuilder(baseUri); - queryBuilder.Append("/tspublic/rest/v2/report/liveboard"); - - // prepare specfied query parameters. - var queryParams = new Dictionary() - { - { "type", ApiHelper.JsonSerialize(type).Trim('\"') }, - { "id", id }, - { "vizId", vizId }, - { "transientContent", transientContent }, - { "runtimeFilter", runtimeFilter }, - { "runtimeSort", runtimeSort }, - { "pdfOptions", pdfOptions }, - }; - - // append request with appropriate headers and parameters - var headers = new Dictionary() - { - { "user-agent", this.UserAgent }, - { "accept", "application/json" }, - }; - - // prepare the API call request to fetch the response. - HttpRequest httpRequest = this.GetClientInstance().Get(queryBuilder.ToString(), headers, queryParameters: queryParams); - - if (this.HttpCallBack != null) - { - this.HttpCallBack.OnBeforeHttpRequestEventHandler(this.GetClientInstance(), httpRequest); - } - - httpRequest = await this.AuthManagers["global"].ApplyAsync(httpRequest).ConfigureAwait(false); - - // invoke request and get response. - HttpStringResponse response = await this.GetClientInstance().ExecuteAsStringAsync(httpRequest, cancellationToken: cancellationToken).ConfigureAwait(false); - HttpContext context = new HttpContext(httpRequest, response); - if (this.HttpCallBack != null) - { - this.HttpCallBack.OnAfterHttpResponseEventHandler(this.GetClientInstance(), response); - } - - if (response.StatusCode == 500) - { - throw new ErrorResponseException("Operation failed", context); - } - - // handle errors defined at the API level. - this.ValidateResponse(response, context); - - return response.Body; - } - } -} \ No newline at end of file diff --git a/DotNet/ThoughtSpotPublicRESTAPI.Standard/Controllers/SecurityController.cs b/DotNet/ThoughtSpotPublicRESTAPI.Standard/Controllers/SecurityController.cs deleted file mode 100644 index f2ce6967a..000000000 --- a/DotNet/ThoughtSpotPublicRESTAPI.Standard/Controllers/SecurityController.cs +++ /dev/null @@ -1,533 +0,0 @@ -// -// Copyright (c) APIMatic. All rights reserved. -// -namespace ThoughtSpotPublicRESTAPI.Standard.Controllers -{ - using System; - using System.Collections.Generic; - using System.Dynamic; - using System.Globalization; - using System.IO; - using System.Linq; - using System.Text; - using System.Threading; - using System.Threading.Tasks; - using Newtonsoft.Json.Converters; - using ThoughtSpotPublicRESTAPI.Standard; - using ThoughtSpotPublicRESTAPI.Standard.Authentication; - using ThoughtSpotPublicRESTAPI.Standard.Exceptions; - using ThoughtSpotPublicRESTAPI.Standard.Http.Client; - using ThoughtSpotPublicRESTAPI.Standard.Http.Request; - using ThoughtSpotPublicRESTAPI.Standard.Http.Request.Configuration; - using ThoughtSpotPublicRESTAPI.Standard.Http.Response; - using ThoughtSpotPublicRESTAPI.Standard.Utilities; - - /// - /// SecurityController. - /// - public class SecurityController : BaseController - { - /// - /// Initializes a new instance of the class. - /// - /// config instance. - /// httpClient. - /// authManager. - /// httpCallBack. - internal SecurityController(IConfiguration config, IHttpClient httpClient, IDictionary authManagers, HttpCallBack httpCallBack = null) - : base(config, httpClient, authManagers, httpCallBack) - { - } - - /// - /// To list the permissions for user and user groups on an object, use this endpoint. The response will include only those users and groups with have either VIEW OR MODIFY permission. . - /// You can optionally see the permission on the dependent objects as well by enabling includeDependent field. - /// - /// Required parameter: GUID of the metadata object for which the permission needs to be obtained.. - /// Required parameter: Type of metadata object. Valid values: Liveboard|Answer|DataObject|Column. - /// Optional parameter: When this field is set to true, the API returns the permission details for the dependent objects for the the object included in the request. - /// Returns the Models.SecurityPermissionResponse response from the API call. - public Models.SecurityPermissionResponse RestapiV2GetPermissionOnObject( - string id, - Models.Type7Enum type, - bool? includeDependent = null) - { - Task t = this.RestapiV2GetPermissionOnObjectAsync(id, type, includeDependent); - ApiHelper.RunTaskSynchronously(t); - return t.Result; - } - - /// - /// To list the permissions for user and user groups on an object, use this endpoint. The response will include only those users and groups with have either VIEW OR MODIFY permission. . - /// You can optionally see the permission on the dependent objects as well by enabling includeDependent field. - /// - /// Required parameter: GUID of the metadata object for which the permission needs to be obtained.. - /// Required parameter: Type of metadata object. Valid values: Liveboard|Answer|DataObject|Column. - /// Optional parameter: When this field is set to true, the API returns the permission details for the dependent objects for the the object included in the request. - /// cancellationToken. - /// Returns the Models.SecurityPermissionResponse response from the API call. - public async Task RestapiV2GetPermissionOnObjectAsync( - string id, - Models.Type7Enum type, - bool? includeDependent = null, - CancellationToken cancellationToken = default) - { - // validating required parameters. - if (id == null) - { - throw new ArgumentNullException("id", "The parameter \"id\" is a required parameter and cannot be null."); - } - - // the base uri for api requests. - string baseUri = this.Config.GetBaseUri(); - - // prepare query string for API call. - StringBuilder queryBuilder = new StringBuilder(baseUri); - queryBuilder.Append("/tspublic/rest/v2/security/permission/tsobject"); - - // prepare specfied query parameters. - var queryParams = new Dictionary() - { - { "id", id }, - { "type", ApiHelper.JsonSerialize(type).Trim('\"') }, - { "includeDependent", includeDependent }, - }; - - // append request with appropriate headers and parameters - var headers = new Dictionary() - { - { "user-agent", this.UserAgent }, - { "accept", "application/json" }, - }; - - // prepare the API call request to fetch the response. - HttpRequest httpRequest = this.GetClientInstance().Get(queryBuilder.ToString(), headers, queryParameters: queryParams); - - if (this.HttpCallBack != null) - { - this.HttpCallBack.OnBeforeHttpRequestEventHandler(this.GetClientInstance(), httpRequest); - } - - httpRequest = await this.AuthManagers["global"].ApplyAsync(httpRequest).ConfigureAwait(false); - - // invoke request and get response. - HttpStringResponse response = await this.GetClientInstance().ExecuteAsStringAsync(httpRequest, cancellationToken: cancellationToken).ConfigureAwait(false); - HttpContext context = new HttpContext(httpRequest, response); - if (this.HttpCallBack != null) - { - this.HttpCallBack.OnAfterHttpResponseEventHandler(this.GetClientInstance(), response); - } - - if (response.StatusCode == 500) - { - throw new ErrorResponseException("Operation failed", context); - } - - // handle errors defined at the API level. - this.ValidateResponse(response, context); - - return ApiHelper.JsonDeserialize(response.Body); - } - - /// - /// Use this endpoint to list the objects on which a user or user group has permission. The response will include only those objects on which the user or user group has either VIEW OR MODIFY permission. . - /// Requires administration privilege. - /// - /// Optional parameter: GUID of the user or user group for which the object permission needs to be obtained. - /// Optional parameter: Name of the ser or user group for which the object permission needs to be obtained. - /// Returns the Models.PrincipalSearchResponse response from the API call. - public Models.PrincipalSearchResponse RestapiV2GetPermissionForPrincipal( - string id = null, - string name = null) - { - Task t = this.RestapiV2GetPermissionForPrincipalAsync(id, name); - ApiHelper.RunTaskSynchronously(t); - return t.Result; - } - - /// - /// Use this endpoint to list the objects on which a user or user group has permission. The response will include only those objects on which the user or user group has either VIEW OR MODIFY permission. . - /// Requires administration privilege. - /// - /// Optional parameter: GUID of the user or user group for which the object permission needs to be obtained. - /// Optional parameter: Name of the ser or user group for which the object permission needs to be obtained. - /// cancellationToken. - /// Returns the Models.PrincipalSearchResponse response from the API call. - public async Task RestapiV2GetPermissionForPrincipalAsync( - string id = null, - string name = null, - CancellationToken cancellationToken = default) - { - // the base uri for api requests. - string baseUri = this.Config.GetBaseUri(); - - // prepare query string for API call. - StringBuilder queryBuilder = new StringBuilder(baseUri); - queryBuilder.Append("/tspublic/rest/v2/security/permission/principal"); - - // prepare specfied query parameters. - var queryParams = new Dictionary() - { - { "id", id }, - { "name", name }, - }; - - // append request with appropriate headers and parameters - var headers = new Dictionary() - { - { "user-agent", this.UserAgent }, - { "accept", "application/json" }, - }; - - // prepare the API call request to fetch the response. - HttpRequest httpRequest = this.GetClientInstance().Get(queryBuilder.ToString(), headers, queryParameters: queryParams); - - if (this.HttpCallBack != null) - { - this.HttpCallBack.OnBeforeHttpRequestEventHandler(this.GetClientInstance(), httpRequest); - } - - httpRequest = await this.AuthManagers["global"].ApplyAsync(httpRequest).ConfigureAwait(false); - - // invoke request and get response. - HttpStringResponse response = await this.GetClientInstance().ExecuteAsStringAsync(httpRequest, cancellationToken: cancellationToken).ConfigureAwait(false); - HttpContext context = new HttpContext(httpRequest, response); - if (this.HttpCallBack != null) - { - this.HttpCallBack.OnAfterHttpResponseEventHandler(this.GetClientInstance(), response); - } - - if (response.StatusCode == 500) - { - throw new ErrorResponseException("Operation failed", context); - } - - // handle errors defined at the API level. - this.ValidateResponse(response, context); - - return ApiHelper.JsonDeserialize(response.Body); - } - - /// - /// To programmatically share ThoughtSpot objects with another user or user group, use this endpoint. . - /// When you share an object like a Liveboard or visualization, a notification with a live link is sent to the user. When the users access this object, they can view the last saved version of the object. - /// - /// Required parameter: Example: . - /// Returns the bool response from the API call. - public bool RestapiV2ShareObject( - Models.TspublicRestV2SecurityShareTsobjectRequest body) - { - Task t = this.RestapiV2ShareObjectAsync(body); - ApiHelper.RunTaskSynchronously(t); - return t.Result; - } - - /// - /// To programmatically share ThoughtSpot objects with another user or user group, use this endpoint. . - /// When you share an object like a Liveboard or visualization, a notification with a live link is sent to the user. When the users access this object, they can view the last saved version of the object. - /// - /// Required parameter: Example: . - /// cancellationToken. - /// Returns the bool response from the API call. - public async Task RestapiV2ShareObjectAsync( - Models.TspublicRestV2SecurityShareTsobjectRequest body, - CancellationToken cancellationToken = default) - { - // validating required parameters. - if (body == null) - { - throw new ArgumentNullException("body", "The parameter \"body\" is a required parameter and cannot be null."); - } - - // the base uri for api requests. - string baseUri = this.Config.GetBaseUri(); - - // prepare query string for API call. - StringBuilder queryBuilder = new StringBuilder(baseUri); - queryBuilder.Append("/tspublic/rest/v2/security/share/tsobject"); - - // append request with appropriate headers and parameters - var headers = new Dictionary() - { - { "user-agent", this.UserAgent }, - { "Content-Type", "application/json" }, - }; - - // append body params. - var bodyText = ApiHelper.JsonSerialize(body); - - // prepare the API call request to fetch the response. - HttpRequest httpRequest = this.GetClientInstance().PostBody(queryBuilder.ToString(), headers, bodyText); - - if (this.HttpCallBack != null) - { - this.HttpCallBack.OnBeforeHttpRequestEventHandler(this.GetClientInstance(), httpRequest); - } - - httpRequest = await this.AuthManagers["global"].ApplyAsync(httpRequest).ConfigureAwait(false); - - // invoke request and get response. - HttpStringResponse response = await this.GetClientInstance().ExecuteAsStringAsync(httpRequest, cancellationToken: cancellationToken).ConfigureAwait(false); - HttpContext context = new HttpContext(httpRequest, response); - if (this.HttpCallBack != null) - { - this.HttpCallBack.OnAfterHttpResponseEventHandler(this.GetClientInstance(), response); - } - - if (response.StatusCode == 500) - { - throw new ErrorResponseException("Operation failed", context); - } - - // handle errors defined at the API level. - this.ValidateResponse(response, context); - - return bool.Parse(response.Body); - } - - /// - /// If you want to share a specific visualization from a Liveboard with another user or user group, then use this endpoint. . - /// Requires privilege to share the visualization. - /// - /// Required parameter: Example: . - /// Returns the bool response from the API call. - public bool RestapiV2ShareVisualization( - Models.TspublicRestV2SecurityShareVisualizationRequest body) - { - Task t = this.RestapiV2ShareVisualizationAsync(body); - ApiHelper.RunTaskSynchronously(t); - return t.Result; - } - - /// - /// If you want to share a specific visualization from a Liveboard with another user or user group, then use this endpoint. . - /// Requires privilege to share the visualization. - /// - /// Required parameter: Example: . - /// cancellationToken. - /// Returns the bool response from the API call. - public async Task RestapiV2ShareVisualizationAsync( - Models.TspublicRestV2SecurityShareVisualizationRequest body, - CancellationToken cancellationToken = default) - { - // validating required parameters. - if (body == null) - { - throw new ArgumentNullException("body", "The parameter \"body\" is a required parameter and cannot be null."); - } - - // the base uri for api requests. - string baseUri = this.Config.GetBaseUri(); - - // prepare query string for API call. - StringBuilder queryBuilder = new StringBuilder(baseUri); - queryBuilder.Append("/tspublic/rest/v2/security/share/visualization"); - - // append request with appropriate headers and parameters - var headers = new Dictionary() - { - { "user-agent", this.UserAgent }, - { "Content-Type", "application/json" }, - }; - - // append body params. - var bodyText = ApiHelper.JsonSerialize(body); - - // prepare the API call request to fetch the response. - HttpRequest httpRequest = this.GetClientInstance().PostBody(queryBuilder.ToString(), headers, bodyText); - - if (this.HttpCallBack != null) - { - this.HttpCallBack.OnBeforeHttpRequestEventHandler(this.GetClientInstance(), httpRequest); - } - - httpRequest = await this.AuthManagers["global"].ApplyAsync(httpRequest).ConfigureAwait(false); - - // invoke request and get response. - HttpStringResponse response = await this.GetClientInstance().ExecuteAsStringAsync(httpRequest, cancellationToken: cancellationToken).ConfigureAwait(false); - HttpContext context = new HttpContext(httpRequest, response); - if (this.HttpCallBack != null) - { - this.HttpCallBack.OnAfterHttpResponseEventHandler(this.GetClientInstance(), response); - } - - if (response.StatusCode == 500) - { - throw new ErrorResponseException("Operation failed", context); - } - - // handle errors defined at the API level. - this.ValidateResponse(response, context); - - return bool.Parse(response.Body); - } - - /// - /// To list the permissions for user and user groups on a list of objects, use this endpoint. The response will include only those users and groups with have either VIEW OR MODIFY permission. . - /// You can either provide list of object ids or type of objects to list the permissions for. One of these inputs is mandatory. If both are provided then only object ids will be considred. . - /// You can optionally provide users or user groups for which the persmission needs to be displayed. . - /// You can optionally see the permission on the dependent objects as well by enabling includeDependent field. . - /// Requires administration privilege. - /// - /// Required parameter: Example: . - /// Returns the List of Models.SecurityPermissionResponse response from the API call. - public List RestapiV2SearchPermissionOnObjects( - Models.TspublicRestV2SecurityPermissionTsobjectSearchRequest body) - { - Task> t = this.RestapiV2SearchPermissionOnObjectsAsync(body); - ApiHelper.RunTaskSynchronously(t); - return t.Result; - } - - /// - /// To list the permissions for user and user groups on a list of objects, use this endpoint. The response will include only those users and groups with have either VIEW OR MODIFY permission. . - /// You can either provide list of object ids or type of objects to list the permissions for. One of these inputs is mandatory. If both are provided then only object ids will be considred. . - /// You can optionally provide users or user groups for which the persmission needs to be displayed. . - /// You can optionally see the permission on the dependent objects as well by enabling includeDependent field. . - /// Requires administration privilege. - /// - /// Required parameter: Example: . - /// cancellationToken. - /// Returns the List of Models.SecurityPermissionResponse response from the API call. - public async Task> RestapiV2SearchPermissionOnObjectsAsync( - Models.TspublicRestV2SecurityPermissionTsobjectSearchRequest body, - CancellationToken cancellationToken = default) - { - // validating required parameters. - if (body == null) - { - throw new ArgumentNullException("body", "The parameter \"body\" is a required parameter and cannot be null."); - } - - // the base uri for api requests. - string baseUri = this.Config.GetBaseUri(); - - // prepare query string for API call. - StringBuilder queryBuilder = new StringBuilder(baseUri); - queryBuilder.Append("/tspublic/rest/v2/security/permission/tsobject/search"); - - // append request with appropriate headers and parameters - var headers = new Dictionary() - { - { "user-agent", this.UserAgent }, - { "accept", "application/json" }, - { "Content-Type", "application/json" }, - }; - - // append body params. - var bodyText = ApiHelper.JsonSerialize(body); - - // prepare the API call request to fetch the response. - HttpRequest httpRequest = this.GetClientInstance().PostBody(queryBuilder.ToString(), headers, bodyText); - - if (this.HttpCallBack != null) - { - this.HttpCallBack.OnBeforeHttpRequestEventHandler(this.GetClientInstance(), httpRequest); - } - - httpRequest = await this.AuthManagers["global"].ApplyAsync(httpRequest).ConfigureAwait(false); - - // invoke request and get response. - HttpStringResponse response = await this.GetClientInstance().ExecuteAsStringAsync(httpRequest, cancellationToken: cancellationToken).ConfigureAwait(false); - HttpContext context = new HttpContext(httpRequest, response); - if (this.HttpCallBack != null) - { - this.HttpCallBack.OnAfterHttpResponseEventHandler(this.GetClientInstance(), response); - } - - if (response.StatusCode == 500) - { - throw new ErrorResponseException("Operation failed", context); - } - - // handle errors defined at the API level. - this.ValidateResponse(response, context); - - return ApiHelper.JsonDeserialize>(response.Body); - } - - /// - /// To list the permissions for user and user groups on a list of objects, use this endpoint. The response will include only those users and groups with have either VIEW OR MODIFY permission. . - /// You can either provide list of object ids or type of objects to list the permissions for. One of these inputs is mandatory. If both are provided then only object ids will be considred. . - /// You can optionally provide users or user groups for which the persmission needs to be displayed. . - /// You can optionally see the permission on the dependent objects as well by enabling includeDependent field. . - /// Requires administration privilege. - /// - /// Required parameter: Example: . - /// Returns the List of Models.PrincipalSearchResponse response from the API call. - public List RestapiV2SearchPermissionForPrincipals( - Models.TspublicRestV2SecurityPermissionPrincipalSearchRequest body) - { - Task> t = this.RestapiV2SearchPermissionForPrincipalsAsync(body); - ApiHelper.RunTaskSynchronously(t); - return t.Result; - } - - /// - /// To list the permissions for user and user groups on a list of objects, use this endpoint. The response will include only those users and groups with have either VIEW OR MODIFY permission. . - /// You can either provide list of object ids or type of objects to list the permissions for. One of these inputs is mandatory. If both are provided then only object ids will be considred. . - /// You can optionally provide users or user groups for which the persmission needs to be displayed. . - /// You can optionally see the permission on the dependent objects as well by enabling includeDependent field. . - /// Requires administration privilege. - /// - /// Required parameter: Example: . - /// cancellationToken. - /// Returns the List of Models.PrincipalSearchResponse response from the API call. - public async Task> RestapiV2SearchPermissionForPrincipalsAsync( - Models.TspublicRestV2SecurityPermissionPrincipalSearchRequest body, - CancellationToken cancellationToken = default) - { - // validating required parameters. - if (body == null) - { - throw new ArgumentNullException("body", "The parameter \"body\" is a required parameter and cannot be null."); - } - - // the base uri for api requests. - string baseUri = this.Config.GetBaseUri(); - - // prepare query string for API call. - StringBuilder queryBuilder = new StringBuilder(baseUri); - queryBuilder.Append("/tspublic/rest/v2/security/permission/principal/search"); - - // append request with appropriate headers and parameters - var headers = new Dictionary() - { - { "user-agent", this.UserAgent }, - { "accept", "application/json" }, - { "Content-Type", "application/json" }, - }; - - // append body params. - var bodyText = ApiHelper.JsonSerialize(body); - - // prepare the API call request to fetch the response. - HttpRequest httpRequest = this.GetClientInstance().PostBody(queryBuilder.ToString(), headers, bodyText); - - if (this.HttpCallBack != null) - { - this.HttpCallBack.OnBeforeHttpRequestEventHandler(this.GetClientInstance(), httpRequest); - } - - httpRequest = await this.AuthManagers["global"].ApplyAsync(httpRequest).ConfigureAwait(false); - - // invoke request and get response. - HttpStringResponse response = await this.GetClientInstance().ExecuteAsStringAsync(httpRequest, cancellationToken: cancellationToken).ConfigureAwait(false); - HttpContext context = new HttpContext(httpRequest, response); - if (this.HttpCallBack != null) - { - this.HttpCallBack.OnAfterHttpResponseEventHandler(this.GetClientInstance(), response); - } - - if (response.StatusCode == 500) - { - throw new ErrorResponseException("Operation failed", context); - } - - // handle errors defined at the API level. - this.ValidateResponse(response, context); - - return ApiHelper.JsonDeserialize>(response.Body); - } - } -} \ No newline at end of file diff --git a/DotNet/ThoughtSpotPublicRESTAPI.Standard/Controllers/SessionController.cs b/DotNet/ThoughtSpotPublicRESTAPI.Standard/Controllers/SessionController.cs deleted file mode 100644 index 70398df17..000000000 --- a/DotNet/ThoughtSpotPublicRESTAPI.Standard/Controllers/SessionController.cs +++ /dev/null @@ -1,254 +0,0 @@ -// -// Copyright (c) APIMatic. All rights reserved. -// -namespace ThoughtSpotPublicRESTAPI.Standard.Controllers -{ - using System; - using System.Collections.Generic; - using System.Dynamic; - using System.Globalization; - using System.IO; - using System.Linq; - using System.Text; - using System.Threading; - using System.Threading.Tasks; - using Newtonsoft.Json.Converters; - using ThoughtSpotPublicRESTAPI.Standard; - using ThoughtSpotPublicRESTAPI.Standard.Authentication; - using ThoughtSpotPublicRESTAPI.Standard.Exceptions; - using ThoughtSpotPublicRESTAPI.Standard.Http.Client; - using ThoughtSpotPublicRESTAPI.Standard.Http.Request; - using ThoughtSpotPublicRESTAPI.Standard.Http.Request.Configuration; - using ThoughtSpotPublicRESTAPI.Standard.Http.Response; - using ThoughtSpotPublicRESTAPI.Standard.Utilities; - - /// - /// SessionController. - /// - public class SessionController : BaseController - { - /// - /// Initializes a new instance of the class. - /// - /// config instance. - /// httpClient. - /// authManager. - /// httpCallBack. - internal SessionController(IConfiguration config, IHttpClient httpClient, IDictionary authManagers, HttpCallBack httpCallBack = null) - : base(config, httpClient, authManagers, httpCallBack) - { - } - - /// - /// You can programmatically create login session for a user in ThoughtSpot using this endpoint. . - /// You can create session by either providing userName and password as inputs in this request body or by including "Authorization" header with the token generated through the endpoint /tspublic/rest/v2/session/gettoken. . - /// userName and password input is given precedence over "Authorization" header, when both are included in the request. - /// - /// Optional parameter: Username of the user account. - /// Optional parameter: The password of the user account. - /// Optional parameter: A flag to remember the user session. When set to true, sets a session cookie that persists in subsequent API calls.. - /// Returns the Models.SessionLoginResponse response from the API call. - public Models.SessionLoginResponse RestapiV2Login( - string userName = null, - string password = null, - bool? rememberMe = null) - { - Task t = this.RestapiV2LoginAsync(userName, password, rememberMe); - ApiHelper.RunTaskSynchronously(t); - return t.Result; - } - - /// - /// You can programmatically create login session for a user in ThoughtSpot using this endpoint. . - /// You can create session by either providing userName and password as inputs in this request body or by including "Authorization" header with the token generated through the endpoint /tspublic/rest/v2/session/gettoken. . - /// userName and password input is given precedence over "Authorization" header, when both are included in the request. - /// - /// Optional parameter: Username of the user account. - /// Optional parameter: The password of the user account. - /// Optional parameter: A flag to remember the user session. When set to true, sets a session cookie that persists in subsequent API calls.. - /// cancellationToken. - /// Returns the Models.SessionLoginResponse response from the API call. - public async Task RestapiV2LoginAsync( - string userName = null, - string password = null, - bool? rememberMe = null, - CancellationToken cancellationToken = default) - { - // the base uri for api requests. - string baseUri = this.Config.GetBaseUri(); - - // prepare query string for API call. - StringBuilder queryBuilder = new StringBuilder(baseUri); - queryBuilder.Append("/tspublic/rest/v2/session/login"); - - // prepare specfied query parameters. - var queryParams = new Dictionary() - { - { "userName", userName }, - { "password", password }, - { "rememberMe", rememberMe }, - }; - - // append request with appropriate headers and parameters - var headers = new Dictionary() - { - { "user-agent", this.UserAgent }, - { "accept", "application/json" }, - }; - - // prepare the API call request to fetch the response. - HttpRequest httpRequest = this.GetClientInstance().Get(queryBuilder.ToString(), headers, queryParameters: queryParams); - - if (this.HttpCallBack != null) - { - this.HttpCallBack.OnBeforeHttpRequestEventHandler(this.GetClientInstance(), httpRequest); - } - - httpRequest = await this.AuthManagers["global"].ApplyAsync(httpRequest).ConfigureAwait(false); - - // invoke request and get response. - HttpStringResponse response = await this.GetClientInstance().ExecuteAsStringAsync(httpRequest, cancellationToken: cancellationToken).ConfigureAwait(false); - HttpContext context = new HttpContext(httpRequest, response); - if (this.HttpCallBack != null) - { - this.HttpCallBack.OnAfterHttpResponseEventHandler(this.GetClientInstance(), response); - } - - if (response.StatusCode == 500) - { - throw new ErrorResponseException("Operation failed", context); - } - - // handle errors defined at the API level. - this.ValidateResponse(response, context); - - return ApiHelper.JsonDeserialize(response.Body); - } - - /// - /// To programmatically create session token for a user in ThoughtSpot, use this endpoint. . - /// You can generate the token for a user by providing password or secret key from the cluster. . - /// You need to enable trusted authentication to generate secret key. To generate secret key, follow below steps. . - /// 1. Click the Develop tab. . - /// 2. Under Customizations, click Settings. . - /// 3. To enable trusted authentication, turn on the toggle. . - /// 4. A secret_key for trusted authentication is generated. . - /// 5. Click the clipboard icon to copy the token. . - /// . - /// Password is given precedence over secretKey input, when both are included in the request. - /// - /// Required parameter: Username of the user account. - /// Optional parameter: The password of the user account. - /// Optional parameter: The secret key string provided by the ThoughtSpot application server. ThoughtSpot generates this secret key when you enable trusted authentication.. - /// Optional parameter: User access privilege. FULL - Creates a session with full access. REPORT_BOOK_VIEW - Allow view access to the specified visualizations.. - /// Optional parameter: GUID of the ThoughtSpot object. If you have set the accessLevel attribute to REPORT_BOOK_VIEW, specify the GUID of the Liveboard or visualization object.. - /// Optional parameter: Duration in seconds after which the token expires. - /// Optional parameter: Id of the organization to be associated with the user login. If no input is provided then last logged in organization will be considered. - /// Returns the Models.SessionLoginResponse response from the API call. - public Models.SessionLoginResponse RestapiV2GetToken( - string userName, - string password = null, - string secretKey = null, - Models.AccessLevelEnum? accessLevel = null, - string tsObjectId = null, - string tokenExpiryDuration = null, - string orgId = null) - { - Task t = this.RestapiV2GetTokenAsync(userName, password, secretKey, accessLevel, tsObjectId, tokenExpiryDuration, orgId); - ApiHelper.RunTaskSynchronously(t); - return t.Result; - } - - /// - /// To programmatically create session token for a user in ThoughtSpot, use this endpoint. . - /// You can generate the token for a user by providing password or secret key from the cluster. . - /// You need to enable trusted authentication to generate secret key. To generate secret key, follow below steps. . - /// 1. Click the Develop tab. . - /// 2. Under Customizations, click Settings. . - /// 3. To enable trusted authentication, turn on the toggle. . - /// 4. A secret_key for trusted authentication is generated. . - /// 5. Click the clipboard icon to copy the token. . - /// . - /// Password is given precedence over secretKey input, when both are included in the request. - /// - /// Required parameter: Username of the user account. - /// Optional parameter: The password of the user account. - /// Optional parameter: The secret key string provided by the ThoughtSpot application server. ThoughtSpot generates this secret key when you enable trusted authentication.. - /// Optional parameter: User access privilege. FULL - Creates a session with full access. REPORT_BOOK_VIEW - Allow view access to the specified visualizations.. - /// Optional parameter: GUID of the ThoughtSpot object. If you have set the accessLevel attribute to REPORT_BOOK_VIEW, specify the GUID of the Liveboard or visualization object.. - /// Optional parameter: Duration in seconds after which the token expires. - /// Optional parameter: Id of the organization to be associated with the user login. If no input is provided then last logged in organization will be considered. - /// cancellationToken. - /// Returns the Models.SessionLoginResponse response from the API call. - public async Task RestapiV2GetTokenAsync( - string userName, - string password = null, - string secretKey = null, - Models.AccessLevelEnum? accessLevel = null, - string tsObjectId = null, - string tokenExpiryDuration = null, - string orgId = null, - CancellationToken cancellationToken = default) - { - // validating required parameters. - if (userName == null) - { - throw new ArgumentNullException("userName", "The parameter \"userName\" is a required parameter and cannot be null."); - } - - // the base uri for api requests. - string baseUri = this.Config.GetBaseUri(); - - // prepare query string for API call. - StringBuilder queryBuilder = new StringBuilder(baseUri); - queryBuilder.Append("/tspublic/rest/v2/session/gettoken"); - - // prepare specfied query parameters. - var queryParams = new Dictionary() - { - { "userName", userName }, - { "password", password }, - { "secretKey", secretKey }, - { "accessLevel", (accessLevel.HasValue) ? ApiHelper.JsonSerialize(accessLevel.Value).Trim('\"') : null }, - { "tsObjectId", tsObjectId }, - { "tokenExpiryDuration", tokenExpiryDuration }, - { "orgId", orgId }, - }; - - // append request with appropriate headers and parameters - var headers = new Dictionary() - { - { "user-agent", this.UserAgent }, - { "accept", "application/json" }, - }; - - // prepare the API call request to fetch the response. - HttpRequest httpRequest = this.GetClientInstance().Get(queryBuilder.ToString(), headers, queryParameters: queryParams); - - if (this.HttpCallBack != null) - { - this.HttpCallBack.OnBeforeHttpRequestEventHandler(this.GetClientInstance(), httpRequest); - } - - httpRequest = await this.AuthManagers["global"].ApplyAsync(httpRequest).ConfigureAwait(false); - - // invoke request and get response. - HttpStringResponse response = await this.GetClientInstance().ExecuteAsStringAsync(httpRequest, cancellationToken: cancellationToken).ConfigureAwait(false); - HttpContext context = new HttpContext(httpRequest, response); - if (this.HttpCallBack != null) - { - this.HttpCallBack.OnAfterHttpResponseEventHandler(this.GetClientInstance(), response); - } - - if (response.StatusCode == 500) - { - throw new ErrorResponseException("Operation failed", context); - } - - // handle errors defined at the API level. - this.ValidateResponse(response, context); - - return ApiHelper.JsonDeserialize(response.Body); - } - } -} \ No newline at end of file diff --git a/DotNet/ThoughtSpotPublicRESTAPI.Standard/Controllers/UserController.cs b/DotNet/ThoughtSpotPublicRESTAPI.Standard/Controllers/UserController.cs deleted file mode 100644 index 3e581bdde..000000000 --- a/DotNet/ThoughtSpotPublicRESTAPI.Standard/Controllers/UserController.cs +++ /dev/null @@ -1,816 +0,0 @@ -// -// Copyright (c) APIMatic. All rights reserved. -// -namespace ThoughtSpotPublicRESTAPI.Standard.Controllers -{ - using System; - using System.Collections.Generic; - using System.Dynamic; - using System.Globalization; - using System.IO; - using System.Linq; - using System.Text; - using System.Threading; - using System.Threading.Tasks; - using Newtonsoft.Json.Converters; - using ThoughtSpotPublicRESTAPI.Standard; - using ThoughtSpotPublicRESTAPI.Standard.Authentication; - using ThoughtSpotPublicRESTAPI.Standard.Exceptions; - using ThoughtSpotPublicRESTAPI.Standard.Http.Client; - using ThoughtSpotPublicRESTAPI.Standard.Http.Request; - using ThoughtSpotPublicRESTAPI.Standard.Http.Request.Configuration; - using ThoughtSpotPublicRESTAPI.Standard.Http.Response; - using ThoughtSpotPublicRESTAPI.Standard.Utilities; - - /// - /// UserController. - /// - public class UserController : BaseController - { - /// - /// Initializes a new instance of the class. - /// - /// config instance. - /// httpClient. - /// authManager. - /// httpCallBack. - internal UserController(IConfiguration config, IHttpClient httpClient, IDictionary authManagers, HttpCallBack httpCallBack = null) - : base(config, httpClient, authManagers, httpCallBack) - { - } - - /// - /// To get the details of a specific user account by username or user id, use this endpoint. At Least one value is needed. When both are given, user id will be considered to fetch user information. - /// - /// Optional parameter: Username of the user that you want to query.. - /// Optional parameter: The GUID of the user account to query. - /// Returns the Models.UserResponse response from the API call. - public Models.UserResponse RestapiV2GetUser( - string name = null, - string id = null) - { - Task t = this.RestapiV2GetUserAsync(name, id); - ApiHelper.RunTaskSynchronously(t); - return t.Result; - } - - /// - /// To get the details of a specific user account by username or user id, use this endpoint. At Least one value is needed. When both are given, user id will be considered to fetch user information. - /// - /// Optional parameter: Username of the user that you want to query.. - /// Optional parameter: The GUID of the user account to query. - /// cancellationToken. - /// Returns the Models.UserResponse response from the API call. - public async Task RestapiV2GetUserAsync( - string name = null, - string id = null, - CancellationToken cancellationToken = default) - { - // the base uri for api requests. - string baseUri = this.Config.GetBaseUri(); - - // prepare query string for API call. - StringBuilder queryBuilder = new StringBuilder(baseUri); - queryBuilder.Append("/tspublic/rest/v2/user"); - - // prepare specfied query parameters. - var queryParams = new Dictionary() - { - { "name", name }, - { "id", id }, - }; - - // append request with appropriate headers and parameters - var headers = new Dictionary() - { - { "user-agent", this.UserAgent }, - { "accept", "application/json" }, - }; - - // prepare the API call request to fetch the response. - HttpRequest httpRequest = this.GetClientInstance().Get(queryBuilder.ToString(), headers, queryParameters: queryParams); - - if (this.HttpCallBack != null) - { - this.HttpCallBack.OnBeforeHttpRequestEventHandler(this.GetClientInstance(), httpRequest); - } - - httpRequest = await this.AuthManagers["global"].ApplyAsync(httpRequest).ConfigureAwait(false); - - // invoke request and get response. - HttpStringResponse response = await this.GetClientInstance().ExecuteAsStringAsync(httpRequest, cancellationToken: cancellationToken).ConfigureAwait(false); - HttpContext context = new HttpContext(httpRequest, response); - if (this.HttpCallBack != null) - { - this.HttpCallBack.OnAfterHttpResponseEventHandler(this.GetClientInstance(), response); - } - - if (response.StatusCode == 500) - { - throw new ErrorResponseException("Operation failed", context); - } - - // handle errors defined at the API level. - this.ValidateResponse(response, context); - - return ApiHelper.JsonDeserialize(response.Body); - } - - /// - /// To programmatically create a user account in the ThoughtSpot system use this API endpoint. Using this API, you can create a user and assign groups. - /// To create a user, you require admin user privileges. - /// All users created in the ThoughtSpot system are added to ALL_GROUP. - /// - /// Required parameter: Name of the user. The username string must be unique.. - /// Required parameter: A unique display name string for the user account, usually their first and last name. - /// Required parameter: Password for the user account.. - /// Optional parameter: Visibility of the user. The visibility attribute is set to DEFAULT when creating a user. The DEFAULT attribute makes a user visible to other users and user groups, and this allows them to share objects. - /// Optional parameter: Email of the user account. - /// Optional parameter: Array of org identifiers. If no value is provided then user will be created in the organization associated with the login session.. - /// Optional parameter: Array of objects of groups that the user belong to.. - /// Optional parameter: Status of user account. acitve or inactive.. - /// Optional parameter: User preference for receiving email notifications when another ThoughtSpot user shares answers or pinboards.. - /// Optional parameter: The user preference for revisiting the onboarding experience.. - /// Optional parameter: ThoughtSpot provides an interactive guided walkthrough to onboard new users. The onboarding experience leads users through a set of actions to help users get started and accomplish their tasks quickly. The users can turn off the Onboarding experience and access it again when they need assistance with the ThoughtSpot UI.. - /// Optional parameter: Type of user. LOCAL_USER indicates that the user is created locally in the ThoughtSpot system.. - /// Returns the Models.UserResponse response from the API call. - public Models.UserResponse RestapiV2CreateUser( - string name, - string displayName, - string password, - Models.VisibilityEnum? visibility = null, - string mail = null, - List orgIds = null, - List groups = null, - Models.StateEnum? state = null, - bool? notifyOnShare = null, - bool? showWalkMe = null, - bool? analystOnboardingComplete = null, - Models.Type8Enum? type = null) - { - Task t = this.RestapiV2CreateUserAsync(name, displayName, password, visibility, mail, orgIds, groups, state, notifyOnShare, showWalkMe, analystOnboardingComplete, type); - ApiHelper.RunTaskSynchronously(t); - return t.Result; - } - - /// - /// To programmatically create a user account in the ThoughtSpot system use this API endpoint. Using this API, you can create a user and assign groups. - /// To create a user, you require admin user privileges. - /// All users created in the ThoughtSpot system are added to ALL_GROUP. - /// - /// Required parameter: Name of the user. The username string must be unique.. - /// Required parameter: A unique display name string for the user account, usually their first and last name. - /// Required parameter: Password for the user account.. - /// Optional parameter: Visibility of the user. The visibility attribute is set to DEFAULT when creating a user. The DEFAULT attribute makes a user visible to other users and user groups, and this allows them to share objects. - /// Optional parameter: Email of the user account. - /// Optional parameter: Array of org identifiers. If no value is provided then user will be created in the organization associated with the login session.. - /// Optional parameter: Array of objects of groups that the user belong to.. - /// Optional parameter: Status of user account. acitve or inactive.. - /// Optional parameter: User preference for receiving email notifications when another ThoughtSpot user shares answers or pinboards.. - /// Optional parameter: The user preference for revisiting the onboarding experience.. - /// Optional parameter: ThoughtSpot provides an interactive guided walkthrough to onboard new users. The onboarding experience leads users through a set of actions to help users get started and accomplish their tasks quickly. The users can turn off the Onboarding experience and access it again when they need assistance with the ThoughtSpot UI.. - /// Optional parameter: Type of user. LOCAL_USER indicates that the user is created locally in the ThoughtSpot system.. - /// cancellationToken. - /// Returns the Models.UserResponse response from the API call. - public async Task RestapiV2CreateUserAsync( - string name, - string displayName, - string password, - Models.VisibilityEnum? visibility = null, - string mail = null, - List orgIds = null, - List groups = null, - Models.StateEnum? state = null, - bool? notifyOnShare = null, - bool? showWalkMe = null, - bool? analystOnboardingComplete = null, - Models.Type8Enum? type = null, - CancellationToken cancellationToken = default) - { - // validating required parameters. - if (name == null) - { - throw new ArgumentNullException("name", "The parameter \"name\" is a required parameter and cannot be null."); - } - - if (displayName == null) - { - throw new ArgumentNullException("displayName", "The parameter \"displayName\" is a required parameter and cannot be null."); - } - - if (password == null) - { - throw new ArgumentNullException("password", "The parameter \"password\" is a required parameter and cannot be null."); - } - - // the base uri for api requests. - string baseUri = this.Config.GetBaseUri(); - - // prepare query string for API call. - StringBuilder queryBuilder = new StringBuilder(baseUri); - queryBuilder.Append("/tspublic/rest/v2/user/create"); - - // prepare specfied query parameters. - var queryParams = new Dictionary() - { - { "name", name }, - { "displayName", displayName }, - { "password", password }, - { "visibility", (visibility.HasValue) ? ApiHelper.JsonSerialize(visibility.Value).Trim('\"') : null }, - { "mail", mail }, - { "orgIds", orgIds }, - { "groups", groups }, - { "state", (state.HasValue) ? ApiHelper.JsonSerialize(state.Value).Trim('\"') : null }, - { "notifyOnShare", notifyOnShare }, - { "showWalkMe", showWalkMe }, - { "analystOnboardingComplete", analystOnboardingComplete }, - { "type", (type.HasValue) ? ApiHelper.JsonSerialize(type.Value).Trim('\"') : null }, - }; - - // append request with appropriate headers and parameters - var headers = new Dictionary() - { - { "user-agent", this.UserAgent }, - { "accept", "application/json" }, - }; - - // prepare the API call request to fetch the response. - HttpRequest httpRequest = this.GetClientInstance().Get(queryBuilder.ToString(), headers, queryParameters: queryParams); - - if (this.HttpCallBack != null) - { - this.HttpCallBack.OnBeforeHttpRequestEventHandler(this.GetClientInstance(), httpRequest); - } - - httpRequest = await this.AuthManagers["global"].ApplyAsync(httpRequest).ConfigureAwait(false); - - // invoke request and get response. - HttpStringResponse response = await this.GetClientInstance().ExecuteAsStringAsync(httpRequest, cancellationToken: cancellationToken).ConfigureAwait(false); - HttpContext context = new HttpContext(httpRequest, response); - if (this.HttpCallBack != null) - { - this.HttpCallBack.OnAfterHttpResponseEventHandler(this.GetClientInstance(), response); - } - - if (response.StatusCode == 500) - { - throw new ErrorResponseException("Operation failed", context); - } - - // handle errors defined at the API level. - this.ValidateResponse(response, context); - - return ApiHelper.JsonDeserialize(response.Body); - } - - /// - /// You can use this endpoint to programmatically modify an existing user account. To modify a user, you require admin user privileges. - /// At least one of User Id or username is mandatory. When both are given, then user id will be considered and username will be updated. - /// - /// Required parameter: Example: . - /// Returns the bool response from the API call. - public bool RestapiV2UpdateUser( - Models.TspublicRestV2UserUpdateRequest body) - { - Task t = this.RestapiV2UpdateUserAsync(body); - ApiHelper.RunTaskSynchronously(t); - return t.Result; - } - - /// - /// You can use this endpoint to programmatically modify an existing user account. To modify a user, you require admin user privileges. - /// At least one of User Id or username is mandatory. When both are given, then user id will be considered and username will be updated. - /// - /// Required parameter: Example: . - /// cancellationToken. - /// Returns the bool response from the API call. - public async Task RestapiV2UpdateUserAsync( - Models.TspublicRestV2UserUpdateRequest body, - CancellationToken cancellationToken = default) - { - // validating required parameters. - if (body == null) - { - throw new ArgumentNullException("body", "The parameter \"body\" is a required parameter and cannot be null."); - } - - // the base uri for api requests. - string baseUri = this.Config.GetBaseUri(); - - // prepare query string for API call. - StringBuilder queryBuilder = new StringBuilder(baseUri); - queryBuilder.Append("/tspublic/rest/v2/user/update"); - - // append request with appropriate headers and parameters - var headers = new Dictionary() - { - { "user-agent", this.UserAgent }, - { "Content-Type", "application/json" }, - }; - - // append body params. - var bodyText = ApiHelper.JsonSerialize(body); - - // prepare the API call request to fetch the response. - HttpRequest httpRequest = this.GetClientInstance().PutBody(queryBuilder.ToString(), headers, bodyText); - - if (this.HttpCallBack != null) - { - this.HttpCallBack.OnBeforeHttpRequestEventHandler(this.GetClientInstance(), httpRequest); - } - - httpRequest = await this.AuthManagers["global"].ApplyAsync(httpRequest).ConfigureAwait(false); - - // invoke request and get response. - HttpStringResponse response = await this.GetClientInstance().ExecuteAsStringAsync(httpRequest, cancellationToken: cancellationToken).ConfigureAwait(false); - HttpContext context = new HttpContext(httpRequest, response); - if (this.HttpCallBack != null) - { - this.HttpCallBack.OnAfterHttpResponseEventHandler(this.GetClientInstance(), response); - } - - if (response.StatusCode == 500) - { - throw new ErrorResponseException("Operation failed", context); - } - - // handle errors defined at the API level. - this.ValidateResponse(response, context); - - return bool.Parse(response.Body); - } - - /// - /// To remove a user from the ThoughtSpot system, use this endpoint. - /// At Least one value needed. When both are given user id will be considered to delete user. - /// - /// Optional parameter: Username of the user that you want to query.. - /// Optional parameter: The GUID of the user account to query. - /// Optional parameter: Unique identifier of the organization from which the user would be deleted. If no value is provided then user will be deleted from the organization associated with the login session.. - /// Returns the bool response from the API call. - public bool RestapiV2DeleteUser( - string name = null, - string id = null, - int? orgId = null) - { - Task t = this.RestapiV2DeleteUserAsync(name, id, orgId); - ApiHelper.RunTaskSynchronously(t); - return t.Result; - } - - /// - /// To remove a user from the ThoughtSpot system, use this endpoint. - /// At Least one value needed. When both are given user id will be considered to delete user. - /// - /// Optional parameter: Username of the user that you want to query.. - /// Optional parameter: The GUID of the user account to query. - /// Optional parameter: Unique identifier of the organization from which the user would be deleted. If no value is provided then user will be deleted from the organization associated with the login session.. - /// cancellationToken. - /// Returns the bool response from the API call. - public async Task RestapiV2DeleteUserAsync( - string name = null, - string id = null, - int? orgId = null, - CancellationToken cancellationToken = default) - { - // the base uri for api requests. - string baseUri = this.Config.GetBaseUri(); - - // prepare query string for API call. - StringBuilder queryBuilder = new StringBuilder(baseUri); - queryBuilder.Append("/tspublic/rest/v2/user/delete"); - - // prepare specfied query parameters. - var queryParams = new Dictionary() - { - { "name", name }, - { "id", id }, - { "orgId", orgId }, - }; - - // append request with appropriate headers and parameters - var headers = new Dictionary() - { - { "user-agent", this.UserAgent }, - }; - - // prepare the API call request to fetch the response. - HttpRequest httpRequest = this.GetClientInstance().Delete(queryBuilder.ToString(), headers, null, queryParameters: queryParams); - - if (this.HttpCallBack != null) - { - this.HttpCallBack.OnBeforeHttpRequestEventHandler(this.GetClientInstance(), httpRequest); - } - - httpRequest = await this.AuthManagers["global"].ApplyAsync(httpRequest).ConfigureAwait(false); - - // invoke request and get response. - HttpStringResponse response = await this.GetClientInstance().ExecuteAsStringAsync(httpRequest, cancellationToken: cancellationToken).ConfigureAwait(false); - HttpContext context = new HttpContext(httpRequest, response); - if (this.HttpCallBack != null) - { - this.HttpCallBack.OnAfterHttpResponseEventHandler(this.GetClientInstance(), response); - } - - if (response.StatusCode == 500) - { - throw new ErrorResponseException("Operation failed", context); - } - - // handle errors defined at the API level. - this.ValidateResponse(response, context); - - return bool.Parse(response.Body); - } - - /// - /// To programmatically add groups to an existing ThoughtSpot user use this endpoint. - /// When you assign groups to a user, the user inherits the privileges assigned to those groups. - /// At least one of User Id or username is mandatory. When both are given, then user id will be considered. - /// - /// Required parameter: Example: . - /// Returns the bool response from the API call. - public bool RestapiV2AddUserToGroups( - Models.TspublicRestV2UserAddgroupRequest body) - { - Task t = this.RestapiV2AddUserToGroupsAsync(body); - ApiHelper.RunTaskSynchronously(t); - return t.Result; - } - - /// - /// To programmatically add groups to an existing ThoughtSpot user use this endpoint. - /// When you assign groups to a user, the user inherits the privileges assigned to those groups. - /// At least one of User Id or username is mandatory. When both are given, then user id will be considered. - /// - /// Required parameter: Example: . - /// cancellationToken. - /// Returns the bool response from the API call. - public async Task RestapiV2AddUserToGroupsAsync( - Models.TspublicRestV2UserAddgroupRequest body, - CancellationToken cancellationToken = default) - { - // validating required parameters. - if (body == null) - { - throw new ArgumentNullException("body", "The parameter \"body\" is a required parameter and cannot be null."); - } - - // the base uri for api requests. - string baseUri = this.Config.GetBaseUri(); - - // prepare query string for API call. - StringBuilder queryBuilder = new StringBuilder(baseUri); - queryBuilder.Append("/tspublic/rest/v2/user/addgroup"); - - // append request with appropriate headers and parameters - var headers = new Dictionary() - { - { "user-agent", this.UserAgent }, - { "Content-Type", "application/json" }, - }; - - // append body params. - var bodyText = ApiHelper.JsonSerialize(body); - - // prepare the API call request to fetch the response. - HttpRequest httpRequest = this.GetClientInstance().PutBody(queryBuilder.ToString(), headers, bodyText); - - if (this.HttpCallBack != null) - { - this.HttpCallBack.OnBeforeHttpRequestEventHandler(this.GetClientInstance(), httpRequest); - } - - httpRequest = await this.AuthManagers["global"].ApplyAsync(httpRequest).ConfigureAwait(false); - - // invoke request and get response. - HttpStringResponse response = await this.GetClientInstance().ExecuteAsStringAsync(httpRequest, cancellationToken: cancellationToken).ConfigureAwait(false); - HttpContext context = new HttpContext(httpRequest, response); - if (this.HttpCallBack != null) - { - this.HttpCallBack.OnAfterHttpResponseEventHandler(this.GetClientInstance(), response); - } - - if (response.StatusCode == 500) - { - throw new ErrorResponseException("Operation failed", context); - } - - // handle errors defined at the API level. - this.ValidateResponse(response, context); - - return bool.Parse(response.Body); - } - - /// - /// To programmatically remove groups from an existing ThoughtSpot user, use this API endpoint. - /// The API removes only the user association. It does not delete the user or group from the Thoughtspot system. - /// At least one of User Id or username is mandatory. When both are given, then user id will be considered. - /// - /// Required parameter: Example: . - /// Returns the bool response from the API call. - public bool RestapiV2RemoveUserFromGroups( - Models.TspublicRestV2UserRemovegroupRequest body) - { - Task t = this.RestapiV2RemoveUserFromGroupsAsync(body); - ApiHelper.RunTaskSynchronously(t); - return t.Result; - } - - /// - /// To programmatically remove groups from an existing ThoughtSpot user, use this API endpoint. - /// The API removes only the user association. It does not delete the user or group from the Thoughtspot system. - /// At least one of User Id or username is mandatory. When both are given, then user id will be considered. - /// - /// Required parameter: Example: . - /// cancellationToken. - /// Returns the bool response from the API call. - public async Task RestapiV2RemoveUserFromGroupsAsync( - Models.TspublicRestV2UserRemovegroupRequest body, - CancellationToken cancellationToken = default) - { - // validating required parameters. - if (body == null) - { - throw new ArgumentNullException("body", "The parameter \"body\" is a required parameter and cannot be null."); - } - - // the base uri for api requests. - string baseUri = this.Config.GetBaseUri(); - - // prepare query string for API call. - StringBuilder queryBuilder = new StringBuilder(baseUri); - queryBuilder.Append("/tspublic/rest/v2/user/removegroup"); - - // append request with appropriate headers and parameters - var headers = new Dictionary() - { - { "user-agent", this.UserAgent }, - { "Content-Type", "application/json" }, - }; - - // append body params. - var bodyText = ApiHelper.JsonSerialize(body); - - // prepare the API call request to fetch the response. - HttpRequest httpRequest = this.GetClientInstance().PutBody(queryBuilder.ToString(), headers, bodyText); - - if (this.HttpCallBack != null) - { - this.HttpCallBack.OnBeforeHttpRequestEventHandler(this.GetClientInstance(), httpRequest); - } - - httpRequest = await this.AuthManagers["global"].ApplyAsync(httpRequest).ConfigureAwait(false); - - // invoke request and get response. - HttpStringResponse response = await this.GetClientInstance().ExecuteAsStringAsync(httpRequest, cancellationToken: cancellationToken).ConfigureAwait(false); - HttpContext context = new HttpContext(httpRequest, response); - if (this.HttpCallBack != null) - { - this.HttpCallBack.OnAfterHttpResponseEventHandler(this.GetClientInstance(), response); - } - - if (response.StatusCode == 500) - { - throw new ErrorResponseException("Operation failed", context); - } - - // handle errors defined at the API level. - this.ValidateResponse(response, context); - - return bool.Parse(response.Body); - } - - /// - /// To get the details of a specific user account or all users in the ThoughtSpot system use this end point. - /// - /// Required parameter: Example: . - /// Returns the object response from the API call. - public object RestapiV2SearchUsers( - Models.TspublicRestV2UserSearchRequest body) - { - Task t = this.RestapiV2SearchUsersAsync(body); - ApiHelper.RunTaskSynchronously(t); - return t.Result; - } - - /// - /// To get the details of a specific user account or all users in the ThoughtSpot system use this end point. - /// - /// Required parameter: Example: . - /// cancellationToken. - /// Returns the object response from the API call. - public async Task RestapiV2SearchUsersAsync( - Models.TspublicRestV2UserSearchRequest body, - CancellationToken cancellationToken = default) - { - // validating required parameters. - if (body == null) - { - throw new ArgumentNullException("body", "The parameter \"body\" is a required parameter and cannot be null."); - } - - // the base uri for api requests. - string baseUri = this.Config.GetBaseUri(); - - // prepare query string for API call. - StringBuilder queryBuilder = new StringBuilder(baseUri); - queryBuilder.Append("/tspublic/rest/v2/user/search"); - - // append request with appropriate headers and parameters - var headers = new Dictionary() - { - { "user-agent", this.UserAgent }, - { "accept", "application/json" }, - { "Content-Type", "application/json" }, - }; - - // append body params. - var bodyText = ApiHelper.JsonSerialize(body); - - // prepare the API call request to fetch the response. - HttpRequest httpRequest = this.GetClientInstance().PostBody(queryBuilder.ToString(), headers, bodyText); - - if (this.HttpCallBack != null) - { - this.HttpCallBack.OnBeforeHttpRequestEventHandler(this.GetClientInstance(), httpRequest); - } - - httpRequest = await this.AuthManagers["global"].ApplyAsync(httpRequest).ConfigureAwait(false); - - // invoke request and get response. - HttpStringResponse response = await this.GetClientInstance().ExecuteAsStringAsync(httpRequest, cancellationToken: cancellationToken).ConfigureAwait(false); - HttpContext context = new HttpContext(httpRequest, response); - if (this.HttpCallBack != null) - { - this.HttpCallBack.OnAfterHttpResponseEventHandler(this.GetClientInstance(), response); - } - - if (response.StatusCode == 500) - { - throw new ErrorResponseException("Operation failed", context); - } - - // handle errors defined at the API level. - this.ValidateResponse(response, context); - - return response.Body; - } - - /// - /// To change the password of a ThoughtSpot user account, use this endpoint. . - /// At least one of id or name of user is required. When both are given user id will be considered. - /// - /// Required parameter: Example: . - /// Returns the bool response from the API call. - public bool RestapiV2ChangePasswordOfUser( - Models.TspublicRestV2UserChangepasswordRequest body) - { - Task t = this.RestapiV2ChangePasswordOfUserAsync(body); - ApiHelper.RunTaskSynchronously(t); - return t.Result; - } - - /// - /// To change the password of a ThoughtSpot user account, use this endpoint. . - /// At least one of id or name of user is required. When both are given user id will be considered. - /// - /// Required parameter: Example: . - /// cancellationToken. - /// Returns the bool response from the API call. - public async Task RestapiV2ChangePasswordOfUserAsync( - Models.TspublicRestV2UserChangepasswordRequest body, - CancellationToken cancellationToken = default) - { - // validating required parameters. - if (body == null) - { - throw new ArgumentNullException("body", "The parameter \"body\" is a required parameter and cannot be null."); - } - - // the base uri for api requests. - string baseUri = this.Config.GetBaseUri(); - - // prepare query string for API call. - StringBuilder queryBuilder = new StringBuilder(baseUri); - queryBuilder.Append("/tspublic/rest/v2/user/changepassword"); - - // append request with appropriate headers and parameters - var headers = new Dictionary() - { - { "user-agent", this.UserAgent }, - { "Content-Type", "application/json" }, - }; - - // append body params. - var bodyText = ApiHelper.JsonSerialize(body); - - // prepare the API call request to fetch the response. - HttpRequest httpRequest = this.GetClientInstance().PutBody(queryBuilder.ToString(), headers, bodyText); - - if (this.HttpCallBack != null) - { - this.HttpCallBack.OnBeforeHttpRequestEventHandler(this.GetClientInstance(), httpRequest); - } - - httpRequest = await this.AuthManagers["global"].ApplyAsync(httpRequest).ConfigureAwait(false); - - // invoke request and get response. - HttpStringResponse response = await this.GetClientInstance().ExecuteAsStringAsync(httpRequest, cancellationToken: cancellationToken).ConfigureAwait(false); - HttpContext context = new HttpContext(httpRequest, response); - if (this.HttpCallBack != null) - { - this.HttpCallBack.OnAfterHttpResponseEventHandler(this.GetClientInstance(), response); - } - - if (response.StatusCode == 500) - { - throw new ErrorResponseException("Operation failed", context); - } - - // handle errors defined at the API level. - this.ValidateResponse(response, context); - - return bool.Parse(response.Body); - } - - /// - /// To programmatically add existing ThoughtSpot users to an organization, use this API endpoint. . - /// At least one of id or name of the organization is required. When both are given, then organization id will be considered. . - /// Requires Administration access for the organization to which users need to be added. - /// - /// Required parameter: Example: . - /// Returns the bool response from the API call. - public bool RestapiV2AddUserToOrgs( - Models.TspublicRestV2UserAddorgRequest body) - { - Task t = this.RestapiV2AddUserToOrgsAsync(body); - ApiHelper.RunTaskSynchronously(t); - return t.Result; - } - - /// - /// To programmatically add existing ThoughtSpot users to an organization, use this API endpoint. . - /// At least one of id or name of the organization is required. When both are given, then organization id will be considered. . - /// Requires Administration access for the organization to which users need to be added. - /// - /// Required parameter: Example: . - /// cancellationToken. - /// Returns the bool response from the API call. - public async Task RestapiV2AddUserToOrgsAsync( - Models.TspublicRestV2UserAddorgRequest body, - CancellationToken cancellationToken = default) - { - // validating required parameters. - if (body == null) - { - throw new ArgumentNullException("body", "The parameter \"body\" is a required parameter and cannot be null."); - } - - // the base uri for api requests. - string baseUri = this.Config.GetBaseUri(); - - // prepare query string for API call. - StringBuilder queryBuilder = new StringBuilder(baseUri); - queryBuilder.Append("/tspublic/rest/v2/user/addorg"); - - // append request with appropriate headers and parameters - var headers = new Dictionary() - { - { "user-agent", this.UserAgent }, - { "Content-Type", "application/json" }, - }; - - // append body params. - var bodyText = ApiHelper.JsonSerialize(body); - - // prepare the API call request to fetch the response. - HttpRequest httpRequest = this.GetClientInstance().PutBody(queryBuilder.ToString(), headers, bodyText); - - if (this.HttpCallBack != null) - { - this.HttpCallBack.OnBeforeHttpRequestEventHandler(this.GetClientInstance(), httpRequest); - } - - httpRequest = await this.AuthManagers["global"].ApplyAsync(httpRequest).ConfigureAwait(false); - - // invoke request and get response. - HttpStringResponse response = await this.GetClientInstance().ExecuteAsStringAsync(httpRequest, cancellationToken: cancellationToken).ConfigureAwait(false); - HttpContext context = new HttpContext(httpRequest, response); - if (this.HttpCallBack != null) - { - this.HttpCallBack.OnAfterHttpResponseEventHandler(this.GetClientInstance(), response); - } - - if (response.StatusCode == 500) - { - throw new ErrorResponseException("Operation failed", context); - } - - // handle errors defined at the API level. - this.ValidateResponse(response, context); - - return bool.Parse(response.Body); - } - } -} \ No newline at end of file diff --git a/DotNet/ThoughtSpotPublicRESTAPI.Standard/Environment.cs b/DotNet/ThoughtSpotPublicRESTAPI.Standard/Environment.cs deleted file mode 100644 index 06f6b4d36..000000000 --- a/DotNet/ThoughtSpotPublicRESTAPI.Standard/Environment.cs +++ /dev/null @@ -1,21 +0,0 @@ -// -// Copyright (c) APIMatic. All rights reserved. -// -namespace ThoughtSpotPublicRESTAPI.Standard -{ - using System.Runtime.Serialization; - using Newtonsoft.Json; - using Newtonsoft.Json.Converters; - /// - /// Available environments. - /// - [JsonConverter(typeof(StringEnumConverter))] - public enum Environment - { - /// - /// Production. - /// - [EnumMember(Value = "production")] - Production, - } -} diff --git a/DotNet/ThoughtSpotPublicRESTAPI.Standard/Exceptions/ApiException.cs b/DotNet/ThoughtSpotPublicRESTAPI.Standard/Exceptions/ApiException.cs deleted file mode 100644 index f0699e9b0..000000000 --- a/DotNet/ThoughtSpotPublicRESTAPI.Standard/Exceptions/ApiException.cs +++ /dev/null @@ -1,78 +0,0 @@ -// -// Copyright (c) APIMatic. All rights reserved. -// -namespace ThoughtSpotPublicRESTAPI.Standard.Exceptions -{ - using System; - using System.Collections.Generic; - using System.IO; - using System.Text; - using Newtonsoft.Json; - using Newtonsoft.Json.Linq; - using ThoughtSpotPublicRESTAPI.Standard.Http.Client; - using ThoughtSpotPublicRESTAPI.Standard.Utilities; - - /// - /// This is the base class for all exceptions that represent an error response - /// from the server. - /// - [JsonObject] - public class ApiException : Exception - { - /// - /// Initializes a new instance of the class. - /// - /// The reason for throwing exception. - /// The HTTP context that encapsulates request and response objects. - public ApiException(string reason, HttpContext context = null) - : base(reason) - { - this.HttpContext = context; - - // If a derived exception class is used, then perform deserialization of response body. - if ((context == null) || (context.Response == null) - || (context.Response.RawBody == null) - || (!context.Response.RawBody.CanRead)) - { - return; - } - - using (var reader = new StreamReader(context.Response.RawBody)) - { - string responseBody = reader.ReadToEnd(); - if (!string.IsNullOrWhiteSpace(responseBody)) - { - try - { - JObject body = JObject.Parse(responseBody); - - if (!this.GetType().Name.Equals("ApiException", StringComparison.OrdinalIgnoreCase)) - { - JsonConvert.PopulateObject(responseBody, this); - } - } - catch (JsonReaderException) - { - // Ignore deserialization and IO issues to prevent exception being thrown when this exception - // instance is being constructed. - } - } - } - } - - /// - /// Gets the HTTP response code from the API request. - /// - [JsonIgnore] - public int ResponseCode - { - get { return this.HttpContext != null ? this.HttpContext.Response.StatusCode : -1; } - } - - /// - /// Gets or sets the HttpContext for the request and response. - /// - [JsonIgnore] - public HttpContext HttpContext { get; internal set; } - } -} \ No newline at end of file diff --git a/DotNet/ThoughtSpotPublicRESTAPI.Standard/Exceptions/ErrorResponseException.cs b/DotNet/ThoughtSpotPublicRESTAPI.Standard/Exceptions/ErrorResponseException.cs deleted file mode 100644 index 1e8886be3..000000000 --- a/DotNet/ThoughtSpotPublicRESTAPI.Standard/Exceptions/ErrorResponseException.cs +++ /dev/null @@ -1,41 +0,0 @@ -// -// Copyright (c) APIMatic. All rights reserved. -// -namespace ThoughtSpotPublicRESTAPI.Standard.Exceptions -{ - using System; - using System.Collections.Generic; - using System.ComponentModel; - using System.IO; - using System.Linq; - using System.Text; - using System.Threading.Tasks; - using Newtonsoft.Json; - using Newtonsoft.Json.Converters; - using ThoughtSpotPublicRESTAPI.Standard; - using ThoughtSpotPublicRESTAPI.Standard.Http.Client; - using ThoughtSpotPublicRESTAPI.Standard.Models; - using ThoughtSpotPublicRESTAPI.Standard.Utilities; - - /// - /// ErrorResponseException. - /// - public class ErrorResponseException : ApiException - { - /// - /// Initializes a new instance of the class. - /// - /// The reason for throwing exception. - /// The HTTP context that encapsulates request and response objects. - public ErrorResponseException(string reason, HttpContext context) - : base(reason, context) - { - } - - /// - /// Gets or sets Error. - /// - [JsonProperty("error", NullValueHandling = NullValueHandling.Ignore)] - public object Error { get; set; } - } -} \ No newline at end of file diff --git a/DotNet/ThoughtSpotPublicRESTAPI.Standard/Http/Client/FileStreamInfo.cs b/DotNet/ThoughtSpotPublicRESTAPI.Standard/Http/Client/FileStreamInfo.cs deleted file mode 100644 index faa38e039..000000000 --- a/DotNet/ThoughtSpotPublicRESTAPI.Standard/Http/Client/FileStreamInfo.cs +++ /dev/null @@ -1,42 +0,0 @@ -// -// Copyright (c) APIMatic. All rights reserved. -// -namespace ThoughtSpotPublicRESTAPI.Standard.Http.Client -{ - using System; - using System.IO; - - /// - /// An DTO class to capture information for file uploads. - /// - public class FileStreamInfo - { - /// - /// Initializes a new instance of the class. - /// - /// The stream object with read access to the file data. - /// Optional file name associated with the stream. - /// Optional file content type associated with the stream. - public FileStreamInfo(Stream stream, string fileName = null, string contentType = null) - { - this.FileStream = stream; - this.FileName = fileName; - this.ContentType = contentType; - } - - /// - /// Gets the stream object with read access to the file data. - /// - public Stream FileStream { get; } - - /// - /// Gets name of the file associated with the stream. - /// - public string FileName { get; } - - /// - /// Gets content type of the file associated with the stream. - /// - public string ContentType { get; } - } -} diff --git a/DotNet/ThoughtSpotPublicRESTAPI.Standard/Http/Client/HttpCallBack.cs b/DotNet/ThoughtSpotPublicRESTAPI.Standard/Http/Client/HttpCallBack.cs deleted file mode 100644 index 8b5076a76..000000000 --- a/DotNet/ThoughtSpotPublicRESTAPI.Standard/Http/Client/HttpCallBack.cs +++ /dev/null @@ -1,44 +0,0 @@ -// -// Copyright (c) APIMatic. All rights reserved. -// -namespace ThoughtSpotPublicRESTAPI.Standard.Http.Client -{ - using ThoughtSpotPublicRESTAPI.Standard.Http.Request; - using ThoughtSpotPublicRESTAPI.Standard.Http.Response; - - /// - /// HttpCallBack. - /// - internal sealed class HttpCallBack - { - /// - /// Gets http request. - /// - public HttpRequest Request { get; private set; } - - /// - /// Gets http response. - /// - public HttpResponse Response { get; private set; } - - /// - /// BeforeHttpRequestEventHandler. - /// - /// Http Client. - /// Http Request. - public void OnBeforeHttpRequestEventHandler(IHttpClient source, HttpRequest request) - { - this.Request = request; - } - - /// - /// AfterHttpResponseEventHandler. - /// - /// Http Client. - /// Http Response. - public void OnAfterHttpResponseEventHandler(IHttpClient source, HttpResponse response) - { - this.Response = response; - } - } -} \ No newline at end of file diff --git a/DotNet/ThoughtSpotPublicRESTAPI.Standard/Http/Client/HttpClientConfiguration.cs b/DotNet/ThoughtSpotPublicRESTAPI.Standard/Http/Client/HttpClientConfiguration.cs deleted file mode 100644 index c32d9554d..000000000 --- a/DotNet/ThoughtSpotPublicRESTAPI.Standard/Http/Client/HttpClientConfiguration.cs +++ /dev/null @@ -1,274 +0,0 @@ -// -// Copyright (c) APIMatic. All rights reserved. -// -namespace ThoughtSpotPublicRESTAPI.Standard.Http.Client -{ - using System; - using System.Collections.Generic; - using System.Collections.Immutable; - using System.Linq; - using System.Net.Http; - - /// - /// HttpClientConfiguration represents the current state of the Http Client. - /// - public class HttpClientConfiguration : IHttpClientConfiguration - { - /// - /// Initializes a new instance of the - /// class. - /// - private HttpClientConfiguration( - TimeSpan timeout, - bool skipSslCertVerification, - int numberOfRetries, - int backoffFactor, - double retryInterval, - TimeSpan maximumRetryWaitTime, - IList statusCodesToRetry, - IList requestMethodsToRetry, - HttpClient httpClientInstance, - bool overrideHttpClientConfiguration) - { - this.Timeout = timeout; - this.SkipSslCertVerification = skipSslCertVerification; - this.NumberOfRetries = numberOfRetries; - this.BackoffFactor = backoffFactor; - this.RetryInterval = retryInterval; - this.MaximumRetryWaitTime = maximumRetryWaitTime; - this.StatusCodesToRetry = statusCodesToRetry; - this.RequestMethodsToRetry = requestMethodsToRetry; - this.HttpClientInstance = httpClientInstance; - this.OverrideHttpClientConfiguration = overrideHttpClientConfiguration; - } - - /// - /// Gets Http client timeout. - /// - public TimeSpan Timeout { get; } - - /// - /// Gets Whether to skip verification of SSL certificates. - /// - public bool SkipSslCertVerification { get; } - - /// - /// Gets Number of times the request is retried. - /// - public int NumberOfRetries { get; } - - /// - /// Gets Exponential backoff factor for duration between retry calls. - /// - public int BackoffFactor { get; } - - /// - /// Gets The time interval between the endpoint calls. - /// - public double RetryInterval { get; } - - /// - /// Gets The maximum retry wait time. - /// - public TimeSpan MaximumRetryWaitTime { get; } - - /// - /// Gets List of Http status codes to invoke retry. - /// - public IList StatusCodesToRetry { get; } - - /// - /// Gets List of Http request methods to invoke retry. - /// - public IList RequestMethodsToRetry { get; } - - /// - /// Gets HttpClient instance used to make the HTTP calls - /// - public HttpClient HttpClientInstance { get; } - - /// - /// Gets Boolean which allows the SDK to override http client instance's settings used for features like retries, timeouts etc. - /// - public bool OverrideHttpClientConfiguration { get; } - - /// - public override string ToString() - { - return "HttpClientConfiguration: " + - $"{this.Timeout} , " + - $"{this.SkipSslCertVerification} , " + - $"{this.NumberOfRetries} , " + - $"{this.BackoffFactor} , " + - $"{this.RetryInterval} , " + - $"{this.MaximumRetryWaitTime} , " + - $"{this.StatusCodesToRetry} , " + - $"{this.RequestMethodsToRetry} , " + - $"{this.HttpClientInstance} , " + - $"{this.OverrideHttpClientConfiguration} "; - } - - /// - /// Creates an object of the HttpClientConfiguration using the values provided for the builder. - /// - /// Builder. - public Builder ToBuilder() - { - Builder builder = new Builder() - .Timeout(this.Timeout) - .SkipSslCertVerification(this.SkipSslCertVerification) - .NumberOfRetries(this.NumberOfRetries) - .BackoffFactor(this.BackoffFactor) - .RetryInterval(this.RetryInterval) - .MaximumRetryWaitTime(this.MaximumRetryWaitTime) - .StatusCodesToRetry(this.StatusCodesToRetry) - .RequestMethodsToRetry(this.RequestMethodsToRetry) - .HttpClientInstance(this.HttpClientInstance, this.OverrideHttpClientConfiguration); - - return builder; - } - - /// - /// Builder class. - /// - public class Builder - { - private TimeSpan timeout = TimeSpan.FromSeconds(100); - private bool skipSslCertVerification = true; - private int numberOfRetries = 0; - private int backoffFactor = 2; - private double retryInterval = 1; - private TimeSpan maximumRetryWaitTime = TimeSpan.FromSeconds(0); - private IList statusCodesToRetry = new List - { - 408, 413, 429, 500, 502, 503, 504, 521, 522, 524, 408, 413, 429, 500, 502, 503, 504, 521, 522, 524 - }.ToImmutableList(); - private IList requestMethodsToRetry = new List - { - "GET", "PUT", "GET", "PUT" - }.Select(val => new HttpMethod(val)).ToImmutableList(); - private HttpClient httpClientInstance = new HttpClient(); - private bool overrideHttpClientConfiguration = true; - - /// - /// Sets the Timeout. - /// - /// Timeout. - /// Builder. - public Builder Timeout(TimeSpan timeout) - { - this.timeout = timeout.TotalSeconds <= 0 ? TimeSpan.FromSeconds(100) : timeout; - return this; - } - - /// - /// Sets SkipSslCertVerification. - /// - /// SkipSslCertVerification. - /// Builder. - public Builder SkipSslCertVerification(bool skipSslCertVerification) - { - this.skipSslCertVerification = skipSslCertVerification; - return this; - } - - /// - /// Sets the NumberOfRetries. - /// - /// NumberOfRetries. - /// Builder. - public Builder NumberOfRetries(int numberOfRetries) - { - this.numberOfRetries = numberOfRetries < 0 ? 0 : numberOfRetries; - return this; - } - - /// - /// Sets the BackoffFactor. - /// - /// BackoffFactor. - /// Builder. - public Builder BackoffFactor(int backoffFactor) - { - this.backoffFactor = backoffFactor < 1 ? 2 : backoffFactor; - return this; - } - - /// - /// Sets the RetryInterval. - /// - /// RetryInterval. - /// Builder. - public Builder RetryInterval(double retryInterval) - { - this.retryInterval = retryInterval < 0 ? 1 : retryInterval; - return this; - } - - /// - /// Sets the MaximumRetryWaitTime. - /// - /// MaximumRetryWaitTime. - /// Builder. - public Builder MaximumRetryWaitTime(TimeSpan maximumRetryWaitTime) - { - this.maximumRetryWaitTime = maximumRetryWaitTime.TotalSeconds < 0 ? TimeSpan.FromSeconds(0) : maximumRetryWaitTime; - return this; - } - - /// - /// Sets the StatusCodesToRetry. - /// - /// StatusCodesToRetry. - /// Builder. - public Builder StatusCodesToRetry(IList statusCodesToRetry) - { - this.statusCodesToRetry = statusCodesToRetry ?? new List().ToImmutableList(); - return this; - } - - /// - /// Sets the RequestMethodsToRetry. - /// - /// RequestMethodsToRetry. - /// Builder. - public Builder RequestMethodsToRetry(IList requestMethodsToRetry) - { - this.requestMethodsToRetry = requestMethodsToRetry ?? new List().ToImmutableList(); - return this; - } - - /// - /// Sets the HttpClientInstance. - /// - /// HttpClientInstance. - /// OverrideHttpClientConfiguration. - /// Builder. - public Builder HttpClientInstance(HttpClient httpClientInstance, bool overrideHttpClientConfiguration = true) - { - this.httpClientInstance = httpClientInstance ?? new HttpClient(); - this.overrideHttpClientConfiguration = overrideHttpClientConfiguration; - return this; - } - - /// - /// Creates an object of the HttpClientConfiguration using the values provided for the builder. - /// - /// HttpClientConfiguration. - public HttpClientConfiguration Build() - { - return new HttpClientConfiguration( - this.timeout, - this.skipSslCertVerification, - this.numberOfRetries, - this.backoffFactor, - this.retryInterval, - this.maximumRetryWaitTime, - this.statusCodesToRetry, - this.requestMethodsToRetry, - this.httpClientInstance, - this.overrideHttpClientConfiguration); - } - } - } -} diff --git a/DotNet/ThoughtSpotPublicRESTAPI.Standard/Http/Client/HttpClientWrapper.cs b/DotNet/ThoughtSpotPublicRESTAPI.Standard/Http/Client/HttpClientWrapper.cs deleted file mode 100644 index 18358bb0e..000000000 --- a/DotNet/ThoughtSpotPublicRESTAPI.Standard/Http/Client/HttpClientWrapper.cs +++ /dev/null @@ -1,671 +0,0 @@ -// -// Copyright (c) APIMatic. All rights reserved. -// -namespace ThoughtSpotPublicRESTAPI.Standard.Http.Client -{ - using System; - using System.Collections.Generic; - using System.Collections.Immutable; - using System.IO; - using System.Linq; - using System.Net; - using System.Net.Http; - using System.Net.Http.Headers; - using System.Text; - using System.Threading; - using System.Threading.Tasks; - using Polly; - using Polly.Retry; - using Polly.Timeout; - using Polly.Wrap; - using ThoughtSpotPublicRESTAPI.Standard.Http.Request; - using ThoughtSpotPublicRESTAPI.Standard.Http.Request.Configuration; - using ThoughtSpotPublicRESTAPI.Standard.Http.Response; - using ThoughtSpotPublicRESTAPI.Standard.Utilities; - - /// - /// HttpClientWrapper. - /// - internal sealed class HttpClientWrapper : IHttpClient - { - private static char parameterSeparator = '&'; - private readonly int numberOfRetries; - private readonly int backoffFactor; - private readonly double retryInterval; - private readonly TimeSpan maximumRetryWaitTime; - private ArrayDeserialization arrayDeserializationFormat = ArrayDeserialization.Plain; - private HttpClient client; - private IList statusCodesToRetry; - private IList requestMethodsToRetry; - private bool overrideHttpClientConfiguration; - - /// - /// Initializes a new instance of the class. - /// - /// HttpClientConfiguration object. - public HttpClientWrapper(HttpClientConfiguration httpClientConfig) - { - this.client = httpClientConfig.HttpClientInstance; - this.overrideHttpClientConfiguration = httpClientConfig.OverrideHttpClientConfiguration; - - if (overrideHttpClientConfiguration) - { - this.statusCodesToRetry = httpClientConfig.StatusCodesToRetry - .Where(val => Enum.IsDefined(typeof(HttpStatusCode), val)) - .Select(val => (HttpStatusCode)val).ToImmutableList(); - - this.requestMethodsToRetry = httpClientConfig.RequestMethodsToRetry - .Select(method => new HttpMethod(method.ToString())).ToList(); - - this.numberOfRetries = httpClientConfig.NumberOfRetries; - this.backoffFactor = httpClientConfig.BackoffFactor; - this.retryInterval = httpClientConfig.RetryInterval; - this.maximumRetryWaitTime = httpClientConfig.MaximumRetryWaitTime; - this.client.Timeout = httpClientConfig.Timeout; - } - - if(httpClientConfig.SkipSslCertVerification) - { - var httpClientHandler = new HttpClientHandler - { - ServerCertificateCustomValidationCallback = (message, cert, chain, errors) => { return true; } - }; - - this.client = new HttpClient(httpClientHandler, disposeHandler: true); - } - } - - /// - /// OnBeforeHttpRequestEvent. - /// - public event OnBeforeHttpRequestEventHandler OnBeforeHttpRequestEvent; - - /// - /// OnAfterHttpResponseEvent. - /// - public event OnAfterHttpResponseEventHandler OnAfterHttpResponseEvent; - - /// - /// Executes the http request. - /// - /// Http request. - /// The for request. - /// HttpStringResponse. - public HttpStringResponse ExecuteAsString(HttpRequest request, RetryConfiguration retryConfiguration = null) - { - Task t = this.ExecuteAsStringAsync(request, retryConfiguration); - ApiHelper.RunTaskSynchronously(t); - return t.Result; - } - - /// - /// Executes the http request asynchronously. - /// - /// Http request. - /// cancellationToken. - /// The for request. - /// Returns the HttpStringResponse. - public async Task ExecuteAsStringAsync( - HttpRequest request, - RetryConfiguration retryConfiguration = null, - CancellationToken cancellationToken = default) - { - // raise the on before request event. - this.RaiseOnBeforeHttpRequestEvent(request); - - HttpResponseMessage responseMessage; - - if (overrideHttpClientConfiguration) - { - responseMessage = await this.GetCombinedPolicy(retryConfiguration).ExecuteAsync( - async (cancellation) => await this.HttpResponseMessage(request, cancellation).ConfigureAwait(false), cancellationToken) - .ConfigureAwait(false); - } - else - { - responseMessage = await this.HttpResponseMessage(request, cancellationToken).ConfigureAwait(false); - } - - int statusCode = (int)responseMessage.StatusCode; - var headers = GetCombinedResponseHeaders(responseMessage); - Stream rawBody = await responseMessage.Content.ReadAsStreamAsync().ConfigureAwait(false); - string body = await responseMessage.Content.ReadAsStringAsync().ConfigureAwait(false); - - var response = new HttpStringResponse(statusCode, headers, rawBody, body); - - // raise the on after response event. - this.RaiseOnAfterHttpResponseEvent(response); - - return response; - } - - /// - /// Executes the http request. - /// - /// Http request. - /// The for request. - /// HttpResponse. - public HttpResponse ExecuteAsBinary(HttpRequest request, RetryConfiguration retryConfiguration = null) - { - Task t = this.ExecuteAsBinaryAsync(request, retryConfiguration); - ApiHelper.RunTaskSynchronously(t); - return t.Result; - } - - /// - /// Executes the http request asynchronously. - /// - /// Http request. - /// cancellationToken. - /// The for request. - /// HttpResponse. - public async Task ExecuteAsBinaryAsync( - HttpRequest request, - RetryConfiguration retryConfiguration = null, - CancellationToken cancellationToken = default) - { - // raise the on before request event. - this.RaiseOnBeforeHttpRequestEvent(request); - - HttpResponseMessage responseMessage; - - if (overrideHttpClientConfiguration) - { - responseMessage = await this.GetCombinedPolicy(retryConfiguration).ExecuteAsync( - async (cancellation) => await this.HttpResponseMessage(request, cancellation).ConfigureAwait(false), cancellationToken) - .ConfigureAwait(false); - } - else - { - responseMessage = await this.HttpResponseMessage(request, cancellationToken).ConfigureAwait(false); - } - - int statusCode = (int)responseMessage.StatusCode; - var headers = GetCombinedResponseHeaders(responseMessage); - Stream rawBody = await responseMessage.Content.ReadAsStreamAsync().ConfigureAwait(false); - - HttpResponse response = new HttpResponse(statusCode, headers, rawBody); - - // raise the on after response event. - this.RaiseOnAfterHttpResponseEvent(response); - - return response; - } - - /// - /// Get http request. - /// - /// queryUrl. - /// headers. - /// queryParameters. - /// username. - /// password. - /// HttpRequest. - public HttpRequest Get( - string queryUrl, - Dictionary headers, - Dictionary queryParameters = null, - string username = null, - string password = null) - { - return new HttpRequest(HttpMethod.Get, queryUrl, headers, username, password, queryParameters: queryParameters); - } - - /// - /// Get http request. - /// - /// queryUrl. - /// HttpRequest. - public HttpRequest Get(string queryUrl) - { - return new HttpRequest(HttpMethod.Get, queryUrl); - } - - /// - /// Post http request. - /// - /// queryUrl. - /// HttpRequest. - public HttpRequest Post(string queryUrl) - { - return new HttpRequest(HttpMethod.Post, queryUrl); - } - - /// - /// Put http request. - /// - /// queryUrl. - /// HttpRequest. - public HttpRequest Put(string queryUrl) - { - return new HttpRequest(HttpMethod.Put, queryUrl); - } - - /// - /// Delete http request. - /// - /// queryUrl. - /// HttpRequest. - public HttpRequest Delete(string queryUrl) - { - return new HttpRequest(HttpMethod.Delete, queryUrl); - } - - /// - /// Patch http request. - /// - /// queryUrl. - /// HttpRequest. - public HttpRequest Patch(string queryUrl) - { - return new HttpRequest(new HttpMethod("PATCH"), queryUrl); - } - - /// - /// Post http request. - /// - /// queryUrl. - /// headers. - /// formParameters. - /// queryParameters. - /// username. - /// password. - /// HttpRequest. - public HttpRequest Post( - string queryUrl, - Dictionary headers, - List> formParameters, - Dictionary queryParameters = null, - string username = null, - string password = null) - { - return new HttpRequest(HttpMethod.Post, queryUrl, headers, formParameters, username, password, queryParameters: queryParameters); - } - - /// - /// Post http request. - /// - /// queryUrl. - /// headers. - /// body. - /// queryParameters. - /// username. - /// password. - /// HttpRequest. - public HttpRequest PostBody( - string queryUrl, - Dictionary headers, - object body, - Dictionary queryParameters = null, - string username = null, - string password = null) - { - return new HttpRequest(HttpMethod.Post, queryUrl, headers, body, username, password, queryParameters: queryParameters); - } - - /// - /// Put http request. - /// - /// queryUrl. - /// headers. - /// formParameters. - /// queryParameters. - /// username. - /// password. - /// HttpRequest. - public HttpRequest Put( - string queryUrl, - Dictionary headers, - List> formParameters, - Dictionary queryParameters = null, - string username = null, - string password = null) - { - return new HttpRequest(HttpMethod.Put, queryUrl, headers, formParameters, username, password, queryParameters: queryParameters); - } - - /// - /// Put http request. - /// - /// queryUrl. - /// headers. - /// body. - /// queryParameters. - /// username. - /// password. - /// HttpRequest. - public HttpRequest PutBody( - string queryUrl, - Dictionary headers, - object body, - Dictionary queryParameters = null, - string username = null, - string password = null) - { - return new HttpRequest(HttpMethod.Put, queryUrl, headers, body, username, password, queryParameters: queryParameters); - } - - /// - /// Patch http request. - /// - /// queryUrl. - /// headers. - /// formParameters. - /// queryParameters. - /// username. - /// password. - /// HttpRequest. - public HttpRequest Patch( - string queryUrl, - Dictionary headers, - List> formParameters, - Dictionary queryParameters = null, - string username = null, - string password = null) - { - return new HttpRequest(new HttpMethod("PATCH"), queryUrl, headers, formParameters, username, password, queryParameters: queryParameters); - } - - /// - /// Patch http request. - /// - /// queryUrl. - /// headers. - /// body. - /// queryParameters. - /// username. - /// password. - /// HttpRequest. - public HttpRequest PatchBody( - string queryUrl, - Dictionary headers, - object body, - Dictionary queryParameters = null, - string username = null, - string password = null) - { - return new HttpRequest(new HttpMethod("PATCH"), queryUrl, headers, body, username, password, queryParameters: queryParameters); - } - - /// - /// Delete http request. - /// - /// queryUrl. - /// headers. - /// formParameters. - /// queryParameters. - /// username. - /// password. - /// HttpRequest. - public HttpRequest Delete( - string queryUrl, - Dictionary headers, - List> formParameters, - Dictionary queryParameters = null, - string username = null, - string password = null) - { - return new HttpRequest(HttpMethod.Delete, queryUrl, headers, formParameters, username, password, queryParameters: queryParameters); - } - - /// - /// Delete http request. - /// - /// queryUrl. - /// headers. - /// body. - /// queryParameters. - /// username. - /// password. - /// HttpRequest. - public HttpRequest DeleteBody( - string queryUrl, - Dictionary headers, - object body, - Dictionary queryParameters = null, - string username = null, - string password = null) - { - return new HttpRequest(HttpMethod.Delete, queryUrl, headers, body, username, password, queryParameters: queryParameters); - } - - private static Dictionary GetCombinedResponseHeaders(HttpResponseMessage responseMessage) - { - var headers = responseMessage.Headers.ToDictionary(l => l.Key, k => k.Value.First()); - if (responseMessage.Content != null) - { - foreach (var contentHeader in responseMessage.Content.Headers) - { - if (headers.ContainsKey(contentHeader.Key)) - { - continue; - } - - headers.Add(contentHeader.Key, contentHeader.Value.First()); - } - } - - return headers; - } - - private void RaiseOnBeforeHttpRequestEvent(HttpRequest request) - { - if ((this.OnBeforeHttpRequestEvent != null) && (request != null)) - { - this.OnBeforeHttpRequestEvent(this, request); - } - } - - private void RaiseOnAfterHttpResponseEvent(HttpResponse response) - { - if ((this.OnAfterHttpResponseEvent != null) && (response != null)) - { - this.OnAfterHttpResponseEvent(this, response); - } - } - - private async Task HttpResponseMessage( - HttpRequest request, - CancellationToken cancellationToken) - { - var queryBuilder = new StringBuilder(request.QueryUrl); - - if (request.QueryParameters != null) - { - ApiHelper.AppendUrlWithQueryParameters(queryBuilder, request.QueryParameters, this.arrayDeserializationFormat, parameterSeparator); - } - - // validate and preprocess url. - string queryUrl = ApiHelper.CleanUrl(queryBuilder); - - HttpRequestMessage requestMessage = new HttpRequestMessage - { - RequestUri = new Uri(queryUrl), - Method = request.HttpMethod, - }; - - if (request.Headers != null) - { - foreach (var headers in request.Headers) - { - requestMessage.Headers.TryAddWithoutValidation(headers.Key, headers.Value); - } - } - - if (!string.IsNullOrEmpty(request.Username)) - { - var byteArray = Encoding.UTF8.GetBytes(request.Username + ":" + request.Password); - requestMessage.Headers.Authorization = new AuthenticationHeaderValue( - "Basic", - Convert.ToBase64String(byteArray)); - } - - if (request.HttpMethod.Equals(HttpMethod.Delete) || request.HttpMethod.Equals(HttpMethod.Post) || request.HttpMethod.Equals(HttpMethod.Put) || request.HttpMethod.Equals(new HttpMethod("PATCH"))) - { - bool multipartRequest = request.FormParameters != null && - (request.FormParameters.Any(f => f.Value is MultipartContent) || - request.FormParameters.Any(f => f.Value is FileStreamInfo)); - - if (request.Body != null) - { - string contentType = request.Headers.Where(p => p.Key.Equals("content-type", StringComparison.InvariantCultureIgnoreCase)) - .Select(x => x.Value) - .FirstOrDefault(); - - if (request.Body is FileStreamInfo file) - { - file.FileStream.Position = 0; - requestMessage.Content = new StreamContent(file.FileStream); - if (!string.IsNullOrWhiteSpace(file.ContentType)) - { - requestMessage.Content.Headers.ContentType = new MediaTypeHeaderValue(file.ContentType); - } - else if (!string.IsNullOrEmpty(contentType)) - { - requestMessage.Content.Headers.ContentType = new MediaTypeHeaderValue(contentType); - } - else - { - requestMessage.Content.Headers.ContentType = new MediaTypeHeaderValue("application/octet-stream"); - } - } - else if (!string.IsNullOrEmpty(contentType) && contentType.Equals("application/json; charset=utf-8", StringComparison.OrdinalIgnoreCase)) - { - requestMessage.Content = new StringContent((string)request.Body ?? string.Empty, Encoding.UTF8, "application/json"); - } - else if (!string.IsNullOrEmpty(contentType)) - { - byte[] bytes = null; - - if (request.Body is Stream) - { - Stream s = (Stream)request.Body; - s.Position = 0; - using (BinaryReader br = new BinaryReader(s)) - { - bytes = br.ReadBytes((int)s.Length); - } - } - else if (request.Body is byte[]) - { - bytes = (byte[])request.Body; - } - else - { - bytes = Encoding.UTF8.GetBytes((string)request.Body); - } - - requestMessage.Content = new ByteArrayContent(bytes ?? Array.Empty()); - - try - { - requestMessage.Content.Headers.ContentType = MediaTypeHeaderValue.Parse(contentType); - } - catch (Exception) - { - requestMessage.Content.Headers.TryAddWithoutValidation("content-type", contentType); - } - } - else - { - requestMessage.Content = new StringContent(request.Body.ToString() ?? string.Empty, Encoding.UTF8, "text/plain"); - } - } - else if (multipartRequest) - { - MultipartFormDataContent formContent = new MultipartFormDataContent(); - - foreach (var param in request.FormParameters) - { - if (param.Value is FileStreamInfo fileParam) - { - var fileContent = new MultipartFileContent(fileParam); - fileContent.Rewind(); - formContent.Add(fileContent.ToHttpContent(param.Key)); - } - else if (param.Value is MultipartContent wrapperObject) - { - wrapperObject.Rewind(); - formContent.Add(wrapperObject.ToHttpContent(param.Key)); - } - else - { - formContent.Add(new StringContent(param.Value.ToString()), param.Key); - } - } - - requestMessage.Content = formContent; - } - else if (request.FormParameters != null) - { - var parameters = new List>(); - foreach (var param in request.FormParameters) - { - parameters.Add(new KeyValuePair(param.Key, param.Value.ToString())); - } - - requestMessage.Content = new FormUrlEncodedContent(parameters); - } - } - - return await this.client.SendAsync(requestMessage, cancellationToken).ConfigureAwait(false); - } - - private bool ShouldRetry(HttpResponseMessage response, RetryConfiguration retryConfiguration) - { - bool isWhiteListedMethod = this.requestMethodsToRetry.Contains(response.RequestMessage.Method); - - return retryConfiguration.RetryOption.IsRetryAllowed(isWhiteListedMethod) && - (this.statusCodesToRetry.Contains(response.StatusCode) || response?.Headers?.RetryAfter != null); - } - - private TimeSpan GetServerWaitDuration(DelegateResult response) - { - var retryAfter = response?.Result?.Headers?.RetryAfter; - if (retryAfter == null) - { - return TimeSpan.Zero; - } - - return retryAfter.Date.HasValue - ? retryAfter.Date.Value - DateTime.UtcNow - : retryAfter.Delta.GetValueOrDefault(TimeSpan.Zero); - } - - private AsyncRetryPolicy GetRetryPolicy(RetryConfiguration retryConfiguration) - { - return Policy.HandleResult(response => this.ShouldRetry(response, retryConfiguration)) - .Or() - .Or() - .WaitAndRetryAsync( - retryCount: this.numberOfRetries, - sleepDurationProvider: (retryAttempt, result, context) => - TimeSpan.FromMilliseconds(Math.Max(this.GetExponentialWaitTime(retryAttempt), this.GetServerWaitDuration(result).TotalMilliseconds)), - onRetryAsync: async (result, timespan, retryAttempt, context) => await Task.CompletedTask); - } - - private AsyncTimeoutPolicy GetTimeoutPolicy() - { - return this.maximumRetryWaitTime.TotalSeconds == 0 - ? Policy.TimeoutAsync(Timeout.InfiniteTimeSpan) - : Policy.TimeoutAsync(this.maximumRetryWaitTime); - } - - private AsyncPolicyWrap GetCombinedPolicy(RetryConfiguration retryConfiguration = null) - { - if (retryConfiguration == null) - { - retryConfiguration = DefaultRetryConfiguration.RetryConfiguration; - } - - return this.GetTimeoutPolicy().WrapAsync(this.GetRetryPolicy(retryConfiguration)); - } - - private double GetExponentialWaitTime(int retryAttempt) - { - double noise = new Random().NextDouble() * 100; - return (1000 * this.retryInterval * Math.Pow(this.backoffFactor, retryAttempt - 1)) + noise; - - } - } -} diff --git a/DotNet/ThoughtSpotPublicRESTAPI.Standard/Http/Client/HttpContext.cs b/DotNet/ThoughtSpotPublicRESTAPI.Standard/Http/Client/HttpContext.cs deleted file mode 100644 index ee7e13478..000000000 --- a/DotNet/ThoughtSpotPublicRESTAPI.Standard/Http/Client/HttpContext.cs +++ /dev/null @@ -1,42 +0,0 @@ -// -// Copyright (c) APIMatic. All rights reserved. -// -namespace ThoughtSpotPublicRESTAPI.Standard.Http.Client -{ - using ThoughtSpotPublicRESTAPI.Standard.Http.Request; - using ThoughtSpotPublicRESTAPI.Standard.Http.Response; - - /// - /// Represents the contextual information of HTTP request and response. - /// - public sealed class HttpContext - { - /// - /// Initializes a new instance of the class. - /// - /// The http request in the current context. - /// The http response in the current context. - public HttpContext(HttpRequest request, HttpResponse response) - { - this.Request = request; - this.Response = response; - } - - /// - /// Gets the http request in the current context. - /// - public HttpRequest Request { get; } - - /// - /// Gets the http response in the current context. - /// - public HttpResponse Response { get; } - - /// - public override string ToString() - { - return $" Request = {this.Request}, " + - $" Response = {this.Response}"; - } - } -} diff --git a/DotNet/ThoughtSpotPublicRESTAPI.Standard/Http/Client/HttpEventHandlers.cs b/DotNet/ThoughtSpotPublicRESTAPI.Standard/Http/Client/HttpEventHandlers.cs deleted file mode 100644 index cd89ca56b..000000000 --- a/DotNet/ThoughtSpotPublicRESTAPI.Standard/Http/Client/HttpEventHandlers.cs +++ /dev/null @@ -1,26 +0,0 @@ -// -// Copyright (c) APIMatic. All rights reserved. -// -namespace ThoughtSpotPublicRESTAPI.Standard.Http.Client -{ - using ThoughtSpotPublicRESTAPI.Standard.Http.Request; - using ThoughtSpotPublicRESTAPI.Standard.Http.Response; - - /// - /// Delegate to handle the event on before http request. This event is raised before any - /// network call is made, and can be used for logging, request modification, appending - /// additional headers etc. - /// - /// The source HttpClient that is going to make the network call. - /// The underlying HttpRequest being sent over the network. - internal delegate void OnBeforeHttpRequestEventHandler(IHttpClient source, HttpRequest request); - - /// - /// Delegate to handle the event on after http response. This event is raised after any - /// network response is recieved, and can be used for logging, response modification, extracting - /// additional information etc. - /// - /// The source HttpClient that recieved the response from the network call. - /// The underlying HttpResponse recieved from the network. - internal delegate void OnAfterHttpResponseEventHandler(IHttpClient source, HttpResponse response); -} diff --git a/DotNet/ThoughtSpotPublicRESTAPI.Standard/Http/Client/IHttpClient.cs b/DotNet/ThoughtSpotPublicRESTAPI.Standard/Http/Client/IHttpClient.cs deleted file mode 100644 index e876dce0c..000000000 --- a/DotNet/ThoughtSpotPublicRESTAPI.Standard/Http/Client/IHttpClient.cs +++ /dev/null @@ -1,263 +0,0 @@ -// -// Copyright (c) APIMatic. All rights reserved. -// -namespace ThoughtSpotPublicRESTAPI.Standard.Http.Client -{ - using System; - using System.Collections.Generic; - using System.Threading; - using System.Threading.Tasks; - using ThoughtSpotPublicRESTAPI.Standard.Http.Request; - using ThoughtSpotPublicRESTAPI.Standard.Http.Request.Configuration; - using ThoughtSpotPublicRESTAPI.Standard.Http.Response; - - /// - /// IHttpClient. - /// - internal interface IHttpClient - { - /// - /// Event raised before an Http request is sent over the network - /// This event can be used for logging, request modification, appending - /// additional headers etc. - /// - event OnBeforeHttpRequestEventHandler OnBeforeHttpRequestEvent; - - /// - /// Event raised after an Http response is recieved from the network. - /// This event can be used for logging, response modification, extracting - /// additional information etc. - /// - event OnAfterHttpResponseEventHandler OnAfterHttpResponseEvent; - - /// - /// Execute a given HttpRequest to get string response back. - /// - /// The given HttpRequest to execute. - /// The for request. - /// HttpResponse containing raw information. - HttpStringResponse ExecuteAsString(HttpRequest request, RetryConfiguration retryConfiguration = null); - - /// - /// Execute a given HttpRequest to get binary response back. - /// - /// The given HttpRequest to execute. - /// The for request. - /// HttpResponse containing raw information. - HttpResponse ExecuteAsBinary(HttpRequest request, RetryConfiguration retryConfiguration = null); - - /// - /// Execute a given HttpRequest to get async string response back. - /// - /// The given HttpRequest to execute. - /// CancellationToken. - /// The for request. - /// HttpResponse containing raw information. - Task ExecuteAsStringAsync(HttpRequest request, RetryConfiguration retryConfiguration = null, CancellationToken cancellationToken = default); - - /// - /// Execute a given HttpRequest to get async binary response back. - /// - /// The given HttpRequest to execute. - /// CancellationToken. - /// The for request. - /// HttpResponse containing raw information. - Task ExecuteAsBinaryAsync(HttpRequest request, RetryConfiguration retryConfiguration = null, CancellationToken cancellationToken = default); - - /// - /// Create a simple HTTP GET request given the URL. - /// - /// Url the request should be sent to. - /// HttpRequest initialised with the url specified. - HttpRequest Get(string queryUrl); - - /// - /// Create a simple HTTP POST request given the URL. - /// - /// Url the request should be sent to. - /// HttpRequest initialised with the url specified. - HttpRequest Post(string queryUrl); - - /// - /// Create a simple HTTP PUT request given the URL. - /// - /// Url the request should be sent to. - /// HttpRequest initialised with the url specified. - HttpRequest Put(string queryUrl); - - /// - /// Create a simple HTTP DELETE request given the URL. - /// - /// Url the request should be sent to. - /// HttpRequest initialised with the url specified. - HttpRequest Delete(string queryUrl); - - /// - /// Create a simple HTTP PATCH request given the URL. - /// - /// Url the request should be sent to. - /// HttpRequest initialised with the url specified. - HttpRequest Patch(string queryUrl); - - /// - /// Create a simple HTTP GET request given relavent parameters. - /// - /// Url the request should be sent to. - /// HTTP headers that should be included. - /// Query parameters to be included. - /// Basic Auth username. - /// Basic Auth password. - /// HttpRequest initialised with the http parameters specified. - HttpRequest Get( - string queryUrl, - Dictionary headers, - Dictionary queryParameters = null, - string username = null, - string password = null); - - /// - /// Create a simple HTTP POST request given relavent parameters. - /// - /// Url the request should be sent to. - /// HTTP headers that should be included. - /// Form parameters to be included. - /// Query parameters to be included. - /// Basic Auth username. - /// Basic Auth password. - /// HttpRequest initialised with the http parameters specified. - HttpRequest Post( - string queryUrl, - Dictionary headers, - List> formParameters, - Dictionary queryParameters = null, - string username = null, - string password = null); - - /// - /// Create a simple HTTP POST with a body request given relavent parameters. - /// - /// Url the request should be sent to. - /// HTTP headers that should be included. - /// The body/payload of the response. - /// Query parameters to be included. - /// Basic Auth username. - /// Basic Auth password. - /// HttpRequest initialised with the http parameters specified. - HttpRequest PostBody( - string queryUrl, - Dictionary headers, - object body, - Dictionary queryParameters = null, - string username = null, - string password = null); - - /// - /// Create a simple HTTP PUT request given relavent parameters. - /// - /// Url the request should be sent to. - /// HTTP headers that should be included. - /// Form parameters to be included. - /// Query parameters to be included. - /// Basic Auth username. - /// Basic Auth password. - /// HttpRequest initialised with the http parameters specified. - HttpRequest Put( - string queryUrl, - Dictionary headers, - List> formParameters, - Dictionary queryParameters = null, - string username = null, - string password = null); - - /// - /// Create a simple HTTP PUT with a body request given relavent parameters. - /// - /// Url the request should be sent to. - /// HTTP headers that should be included. - /// The body/payload of the response. - /// Query parameters to be included. - /// Basic Auth username. - /// Basic Auth password. - /// HttpRequest initialised with the http parameters specified. - HttpRequest PutBody( - string queryUrl, - Dictionary headers, - object body, - Dictionary queryParameters = null, - string username = null, - string password = null); - - /// - /// Create a simple HTTP PATCH request given relavent parameters. - /// - /// Url the request should be sent to. - /// HTTP headers that should be included. - /// Form parameters to be included. - /// Query parameters to be included. - /// Basic Auth username. - /// Basic Auth password. - /// HttpRequest initialised with the http parameters specified. - HttpRequest Patch( - string queryUrl, - Dictionary headers, - List> formParameters, - Dictionary queryParameters = null, - string username = null, - string password = null); - - /// - /// Create a simple HTTP Patch with a body request given relavent parameters. - /// - /// Url the request should be sent to. - /// HTTP headers that should be included. - /// The body/payload of the response. - /// Query parameters to be included. - /// Basic Auth username. - /// Basic Auth password. - /// HttpRequest initialised with the http parameters specified. - HttpRequest PatchBody( - string queryUrl, - Dictionary headers, - object body, - Dictionary queryParameters = null, - string username = null, - string password = null); - - /// - /// Create a simple HTTP DELETE request given relavent parameters. - /// - /// Url the request should be sent to. - /// HTTP headers that should be included. - /// Form parameters to be included. - /// Query parameters to be included. - /// Basic Auth username. - /// Basic Auth password. - /// HttpRequest initialised with the http parameters specified. - HttpRequest Delete( - string queryUrl, - Dictionary headers, - List> formParameters, - Dictionary queryParameters = null, - string username = null, - string password = null); - - /// - /// Create a simple HTTP Delete with a body request given relavent parameters. - /// - /// Url the request should be sent to. - /// HTTP headers that should be included. - /// The body/payload of the response. - /// Query parameters to be included. - /// Basic Auth username. - /// Basic Auth password. - /// HttpRequest initialised with the http parameters specified. - HttpRequest DeleteBody( - string queryUrl, - Dictionary headers, - object body, - Dictionary queryParameters = null, - string username = null, - string password = null); - } -} \ No newline at end of file diff --git a/DotNet/ThoughtSpotPublicRESTAPI.Standard/Http/Client/IHttpClientConfiguration.cs b/DotNet/ThoughtSpotPublicRESTAPI.Standard/Http/Client/IHttpClientConfiguration.cs deleted file mode 100644 index 9eee6c97f..000000000 --- a/DotNet/ThoughtSpotPublicRESTAPI.Standard/Http/Client/IHttpClientConfiguration.cs +++ /dev/null @@ -1,65 +0,0 @@ -// -// Copyright (c) APIMatic. All rights reserved. -// -namespace ThoughtSpotPublicRESTAPI.Standard.Http.Client -{ - using System; - using System.Collections.Generic; - using System.Net.Http; - - /// - /// Represents the current state of the Http Client. - /// - public interface IHttpClientConfiguration - { - /// - /// Http client timeout. - /// - TimeSpan Timeout { get; } - - /// - /// Whether to skip verification of SSL certificates. - /// - bool SkipSslCertVerification { get; } - - /// - /// Number of times the request is retried. - /// - int NumberOfRetries { get; } - - /// - /// Exponential backoff factor for duration between retry calls. - /// - int BackoffFactor { get; } - - /// - /// The time interval between the endpoint calls. - /// - double RetryInterval { get; } - - /// - /// The maximum retry wait time. - /// - TimeSpan MaximumRetryWaitTime { get; } - - /// - /// List of Http status codes to invoke retry. - /// - IList StatusCodesToRetry { get; } - - /// - /// List of Http request methods to invoke retry. - /// - IList RequestMethodsToRetry { get; } - - /// - /// HttpClient instance used to make the HTTP calls - /// - HttpClient HttpClientInstance { get; } - - /// - /// Boolean which allows the SDK to override http client instance's settings used for features like retries, timeouts etc. - /// - bool OverrideHttpClientConfiguration { get; } - } -} diff --git a/DotNet/ThoughtSpotPublicRESTAPI.Standard/Http/Client/MultipartByteArrayContent.cs b/DotNet/ThoughtSpotPublicRESTAPI.Standard/Http/Client/MultipartByteArrayContent.cs deleted file mode 100644 index 394737aec..000000000 --- a/DotNet/ThoughtSpotPublicRESTAPI.Standard/Http/Client/MultipartByteArrayContent.cs +++ /dev/null @@ -1,59 +0,0 @@ -// -// Copyright (c) APIMatic. All rights reserved. -// -namespace ThoughtSpotPublicRESTAPI.Standard.Http.Client -{ - using System.Collections.Generic; - using System.Net.Http; - - /// - /// MultipartByteArrayContent. - /// - internal class MultipartByteArrayContent : MultipartContent - { - /// - /// Initializes a new instance of the class. - /// - /// byteArray. - public MultipartByteArrayContent(byte[] byteArray) - { - this.ByteArray = byteArray; - } - - /// - /// Initializes a new instance of the class. - /// - /// byteArray. - /// headers. - public MultipartByteArrayContent(byte[] byteArray, IReadOnlyDictionary> headers) - : base(headers) - { - this.ByteArray = byteArray; - } - - /// - /// Gets byte array. - /// - public byte[] ByteArray { get; } - - /// - /// Rewind the stream. - /// - public override void Rewind() - { - } - - /// - /// ToHttpContent. - /// - /// contentDispositionName . - /// HttpContent. - public override HttpContent ToHttpContent(string contentDispositionName) - { - var byteArrayContent = new ByteArrayContent(this.ByteArray); - this.SetHeaders(contentDispositionName, byteArrayContent.Headers); - - return byteArrayContent; - } - } -} diff --git a/DotNet/ThoughtSpotPublicRESTAPI.Standard/Http/Client/MultipartContent.cs b/DotNet/ThoughtSpotPublicRESTAPI.Standard/Http/Client/MultipartContent.cs deleted file mode 100644 index 9b2162831..000000000 --- a/DotNet/ThoughtSpotPublicRESTAPI.Standard/Http/Client/MultipartContent.cs +++ /dev/null @@ -1,97 +0,0 @@ -// -// Copyright (c) APIMatic. All rights reserved. -// -namespace ThoughtSpotPublicRESTAPI.Standard.Http.Client -{ - using System; - using System.Collections.Generic; - using System.Linq; - using System.Net.Http; - using System.Net.Http.Headers; - using ThoughtSpotPublicRESTAPI.Standard.Utilities; - - /// - /// MultipartContent. - /// - internal abstract class MultipartContent - { - /// - /// Initializes a new instance of the class. - /// - public MultipartContent() - { - this.Headers = new Dictionary>(); - } - - /// - /// Initializes a new instance of the class. - /// - /// headers. - public MultipartContent( - IReadOnlyDictionary> headers) - { - this.Headers = headers; - } - - /// - /// Gets headers. - /// - public IReadOnlyDictionary> Headers { get; } - - /// - /// Rewind the stream. - /// - public abstract void Rewind(); - - /// - /// ToHttpContent. - /// - /// contentDispositionName. - /// HttpContent. - public abstract HttpContent ToHttpContent(string contentDispositionName); - - /// - /// SetHeaders. - /// - /// contentDispositionName. - /// headers. - protected virtual void SetHeaders( - string contentDispositionName, - HttpContentHeaders headers) - { - if (this.Headers.ContainsKey("content-type")) - { - bool isContentTypeValid = MediaTypeHeaderValue.TryParse(this.Headers["content-type"].FirstOrDefault(), out var parsedContentType); - - if (isContentTypeValid) - { - headers.ContentType = parsedContentType; - } - } - - headers.ContentDisposition = new ContentDispositionHeaderValue("form-data") - { - Name = contentDispositionName, - }; - - var headersList = this.Headers.Where(kv => !this.IsReservedHeader(kv.Key)); - - foreach (var header in headersList) - { - headers.TryAddWithoutValidation(header.Key, header.Value); - } - } - - /// - /// IsReservedHeader. - /// - /// key. - /// boolean. - protected bool IsReservedHeader(string key) - { - return key.Equals("content-type", StringComparison.OrdinalIgnoreCase) || - key.Equals("content-disposition", StringComparison.OrdinalIgnoreCase); - } - } -} diff --git a/DotNet/ThoughtSpotPublicRESTAPI.Standard/Http/Client/MultipartFileContent.cs b/DotNet/ThoughtSpotPublicRESTAPI.Standard/Http/Client/MultipartFileContent.cs deleted file mode 100644 index 08f65028b..000000000 --- a/DotNet/ThoughtSpotPublicRESTAPI.Standard/Http/Client/MultipartFileContent.cs +++ /dev/null @@ -1,92 +0,0 @@ -// -// Copyright (c) APIMatic. All rights reserved. -// -namespace ThoughtSpotPublicRESTAPI.Standard.Http.Client -{ - using System.Collections.Generic; - using System.Net.Http; - using System.Net.Http.Headers; - using ThoughtSpotPublicRESTAPI.Standard.Utilities; - - /// - /// MultipartFileContent. - /// - internal class MultipartFileContent : MultipartContent - { - /// - /// Initializes a new instance of the class. - /// - /// file. - public MultipartFileContent(FileStreamInfo file) - { - this.File = file; - } - - /// - /// Initializes a new instance of the class. - /// - /// file. - /// headers. - public MultipartFileContent( - FileStreamInfo file, - IReadOnlyDictionary> headers) - : base(headers) - { - this.File = file; - } - - /// - /// Gets file. - /// - public FileStreamInfo File { get; } - - /// - /// Rewind the stream. - /// - public override void Rewind() - { - this.File.FileStream.Position = 0; - } - - /// - /// ToHttpContent. - /// - /// contentDispositionName. - /// HttpContent. - public override HttpContent ToHttpContent(string contentDispositionName) - { - var streamContent = new StreamContent(this.File.FileStream); - this.SetHeaders(contentDispositionName, streamContent.Headers); - - return streamContent; - } - - /// - /// SetHeaders. - /// - /// contentDispositionName. - /// headers. - protected override void SetHeaders( - string contentDispositionName, - HttpContentHeaders headers) - { - base.SetHeaders(contentDispositionName, headers); - - headers.ContentDisposition = new ContentDispositionHeaderValue("form-data") - { - Name = contentDispositionName, - FileName = string.IsNullOrWhiteSpace(this.File.FileName) ? "file" : this.File.FileName, - }; - - if (!string.IsNullOrEmpty(this.File.ContentType)) - { - headers.ContentType = new MediaTypeHeaderValue(this.File.ContentType); - } - else if (!this.Headers.ContainsKey("content-type")) - { - headers.ContentType = new MediaTypeHeaderValue("application/octet-stream"); - } - } - } -} diff --git a/DotNet/ThoughtSpotPublicRESTAPI.Standard/Http/Request/Configuration/RetryConfiguration.cs b/DotNet/ThoughtSpotPublicRESTAPI.Standard/Http/Request/Configuration/RetryConfiguration.cs deleted file mode 100644 index 116590ec6..000000000 --- a/DotNet/ThoughtSpotPublicRESTAPI.Standard/Http/Request/Configuration/RetryConfiguration.cs +++ /dev/null @@ -1,87 +0,0 @@ -// -// Copyright (c) APIMatic. All rights reserved. -// -namespace ThoughtSpotPublicRESTAPI.Standard.Http.Request.Configuration -{ - /// - /// Holds configurations for a particular HTTP request. - /// - internal class RetryConfiguration - { - /// - /// The option to override HTTP method whitelist configuration for the request in retries. - /// - public RetryOption RetryOption { get; } - - /// - /// Default constructor. - /// - /// The option to override retry configurations for a particular request. - private RetryConfiguration(RetryOption retryOption) - { - this.RetryOption = retryOption; - } - - public override string ToString() - { - return "RetryConfiguration [retryOption=" + RetryOption + "]"; - } - - /// - /// Class to build instances of . - /// - public class Builder - { - private RetryOption retryOption = Configuration.RetryOption.Default; - - /// - /// The option to override retry configurations for a particular request. - /// - /// The RetryOption to set. - /// - public Builder RetryOption(RetryOption retryOption) - { - this.retryOption = retryOption; - return this; - } - - /// - /// Builds a new RetryConfiguration object using the set fields. - /// - /// - public RetryConfiguration Build() - { - return new RetryConfiguration(retryOption); - } - } - } - - /// - /// Holds default for HTTP requests. - /// - internal sealed class DefaultRetryConfiguration - { - /// - /// The default instance of for the retries in request. - /// - private static readonly RetryConfiguration retryConfiguration = new RetryConfiguration.Builder().Build(); - - /// - /// Static constructor. - /// - static DefaultRetryConfiguration() - { - } - - /// - /// Returns default . - /// - public static RetryConfiguration RetryConfiguration - { - get - { - return retryConfiguration; - } - } - } -} diff --git a/DotNet/ThoughtSpotPublicRESTAPI.Standard/Http/Request/Configuration/RetryOption.cs b/DotNet/ThoughtSpotPublicRESTAPI.Standard/Http/Request/Configuration/RetryOption.cs deleted file mode 100644 index 09948ee0d..000000000 --- a/DotNet/ThoughtSpotPublicRESTAPI.Standard/Http/Request/Configuration/RetryOption.cs +++ /dev/null @@ -1,53 +0,0 @@ -// -// Copyright (c) APIMatic. All rights reserved. -// -namespace ThoughtSpotPublicRESTAPI.Standard.Http.Request.Configuration -{ - - /// - /// Retry options enumeration for HTTP request. - /// - internal enum RetryOption - { - /// - /// To retry request, ignoring httpMethods whitelist. - /// - EnableForHttpMethod, - - /// - /// To disable retries for the request. - /// - Disable, - - /// - /// To use global httpMethods whitelist to determine if request needs retrying. - /// - Default - } - - /// - /// RetryOption enumeration extention class. - /// - internal static class RetryOptionExtensions - { - /// - /// Determines whether retrying for the request is allowed or not. - /// - /// Enum to run the validation on. - /// Flag if the global list of HTTP method contains the request method. - /// True if retrying for the request is allowed. - public static bool IsRetryAllowed(this RetryOption retryOption, bool isWhitelistedRequestMethod) - { - switch (retryOption) - { - case RetryOption.EnableForHttpMethod: - return true; - case RetryOption.Disable: - return false; - case RetryOption.Default: - return isWhitelistedRequestMethod; - } - return isWhitelistedRequestMethod; - } - } -} diff --git a/DotNet/ThoughtSpotPublicRESTAPI.Standard/Http/Request/HttpRequest.cs b/DotNet/ThoughtSpotPublicRESTAPI.Standard/Http/Request/HttpRequest.cs deleted file mode 100644 index 0e0c2fdff..000000000 --- a/DotNet/ThoughtSpotPublicRESTAPI.Standard/Http/Request/HttpRequest.cs +++ /dev/null @@ -1,187 +0,0 @@ -// -// Copyright (c) APIMatic. All rights reserved. -// -namespace ThoughtSpotPublicRESTAPI.Standard.Http.Request -{ - using System; - using System.Collections.Generic; - using System.Linq; - using System.Net.Http; - using ThoughtSpotPublicRESTAPI.Standard.Utilities; - - /// - /// HttpRequest stores necessary information about the http request. - /// - public sealed class HttpRequest - { - /// - /// Initializes a new instance of the class. - /// - /// Http verb to use for the http request. - /// The query url for the http request. - public HttpRequest(HttpMethod method, string queryUrl) - { - this.HttpMethod = method; - this.QueryUrl = queryUrl; - } - - /// - /// Initializes a new instance of the class. - /// - /// Http verb to use for the http request. - /// The query url for the http request. - /// Headers to send with the request. - /// Basic auth username. - /// Basic auth password. - /// QueryParameters. - public HttpRequest( - HttpMethod method, - string queryUrl, - Dictionary headers, - string username, - string password, - Dictionary queryParameters = null) - : this(method, queryUrl) - { - this.QueryParameters = queryParameters; - this.Headers = headers; - this.Username = username; - this.Password = password; - } - - /// - /// Initializes a new instance of the class. - /// - /// Http verb to use for the http request. - /// The query url for the http request. - /// Headers to send with the request. - /// The string to use as raw body of the http request. - /// Basic auth username. - /// Basic auth password. - /// QueryParameters. - public HttpRequest( - HttpMethod method, - string queryUrl, - Dictionary headers, - object body, - string username, - string password, - Dictionary queryParameters = null) - : this(method, queryUrl, headers, username, password, queryParameters: queryParameters) - { - this.Body = body; - } - - /// - /// Initializes a new instance of the class. - /// - /// Http verb to use for the http request. - /// The query url for the http request. - /// Headers to send with the request. - /// Form parameters collection for the request. - /// Basic auth username. - /// Basic auth password. - /// QueryParameters. - public HttpRequest( - HttpMethod method, - string queryUrl, - Dictionary headers, - List> formParameters, - string username, - string password, - Dictionary queryParameters = null) - : this(method, queryUrl, headers, username, password, queryParameters: queryParameters) - { - this.FormParameters = formParameters; - } - - /// - /// Gets the HTTP verb to use for this request. - /// - public HttpMethod HttpMethod { get; } - - /// - /// Gets the query url for the http request. - /// - public string QueryUrl { get; } - - /// - /// Gets the query parameters collection for the current http request. - /// - public Dictionary QueryParameters { get; private set; } - - /// - /// Gets the headers collection for the current http request. - /// - public Dictionary Headers { get; private set; } - - /// - /// Gets the form parameters for the current http request. - /// - public List> FormParameters { get; } - - /// - /// Gets the optional raw string to send as request body. - /// - public object Body { get; } - - /// - /// Gets the optional username for Basic Auth. - /// - public string Username { get; } - - /// - /// Gets the optional password for Basic Auth. - /// - public string Password { get; } - - /// - /// Concatenate values from a Dictionary to this object. - /// - /// headersToAdd. - /// Dictionary. - public Dictionary AddHeaders(Dictionary headersToAdd) - { - if (this.Headers == null) - { - this.Headers = new Dictionary(headersToAdd); - } - else - { - this.Headers = this.Headers.Concat(headersToAdd).ToDictionary(x => x.Key, x => x.Value); - } - - return this.Headers; - } - - /// - /// Concatenate values from a Dictionary to query parameters dictionary. - /// - /// queryParamaters. - public void AddQueryParameters(Dictionary queryParamaters) - { - if (this.QueryParameters == null) - { - this.QueryParameters = new Dictionary(queryParamaters); - } - else - { - this.QueryParameters = this.QueryParameters.Concat(queryParamaters).ToDictionary(x => x.Key, x => x.Value); - } - } - - /// - public override string ToString() - { - return $" HttpMethod = {this.HttpMethod}, " + - $" QueryUrl = {this.QueryUrl}, " + - $" QueryParameters = {ApiHelper.JsonSerialize(this.QueryParameters)}, " + - $" Headers = {ApiHelper.JsonSerialize(this.Headers)}, " + - $" FormParameters = {ApiHelper.JsonSerialize(this.FormParameters)}, " + - $" Body = {this.Body}, " + - $" Username = {this.Username}, " + - $" Password = {this.Password}"; - } - } -} diff --git a/DotNet/ThoughtSpotPublicRESTAPI.Standard/Http/Response/HttpResponse.cs b/DotNet/ThoughtSpotPublicRESTAPI.Standard/Http/Response/HttpResponse.cs deleted file mode 100644 index 1e5e3a655..000000000 --- a/DotNet/ThoughtSpotPublicRESTAPI.Standard/Http/Response/HttpResponse.cs +++ /dev/null @@ -1,52 +0,0 @@ -// -// Copyright (c) APIMatic. All rights reserved. -// -namespace ThoughtSpotPublicRESTAPI.Standard.Http.Response -{ - using System; - using System.Collections.Generic; - using System.IO; - using ThoughtSpotPublicRESTAPI.Standard.Utilities; - - /// - /// HttpResponse stores necessary information about the http response. - /// - public class HttpResponse - { - /// - /// Initializes a new instance of the class. - /// - /// statusCode. - /// headers. - /// rawBody. - public HttpResponse(int statusCode, Dictionary headers, Stream rawBody) - { - this.StatusCode = statusCode; - this.Headers = headers; - this.RawBody = rawBody; - } - - /// - /// Gets the HTTP Status code of the http response. - /// - public int StatusCode { get; } - - /// - /// Gets the headers of the http response. - /// - public Dictionary Headers { get; } - - /// - /// Gets the stream of the body. - /// - public Stream RawBody { get; } - - /// - public override string ToString() - { - return $" StatusCode = {this.StatusCode}, " + - $" Headers = {ApiHelper.JsonSerialize(this.Headers)}, " + - $" RawBody = {this.RawBody}"; - } - } -} diff --git a/DotNet/ThoughtSpotPublicRESTAPI.Standard/Http/Response/HttpStringResponse.cs b/DotNet/ThoughtSpotPublicRESTAPI.Standard/Http/Response/HttpStringResponse.cs deleted file mode 100644 index adefd83da..000000000 --- a/DotNet/ThoughtSpotPublicRESTAPI.Standard/Http/Response/HttpStringResponse.cs +++ /dev/null @@ -1,41 +0,0 @@ -// -// Copyright (c) APIMatic. All rights reserved. -// -namespace ThoughtSpotPublicRESTAPI.Standard.Http.Response -{ - using System; - using System.Collections.Generic; - using System.IO; - using ThoughtSpotPublicRESTAPI.Standard.Utilities; - - /// - /// HttpStringResponse inherits from HttpResponse and has additional property - /// of string body. - /// - public sealed class HttpStringResponse : HttpResponse - { - /// - /// Initializes a new instance of the class. - /// - /// statusCode. - /// headers. - /// rawBody. - /// body. - public HttpStringResponse(int statusCode, Dictionary headers, Stream rawBody, string body) : base(statusCode, headers, rawBody) - { - this.Body = body; - } - - /// - /// Gets the raw string body of the http response. - /// - public string Body { get; } - - /// - public override string ToString() - { - return $"Body = {this.Body}" + - $"{base.ToString()}: "; - } - } -} \ No newline at end of file diff --git a/DotNet/ThoughtSpotPublicRESTAPI.Standard/IConfiguration.cs b/DotNet/ThoughtSpotPublicRESTAPI.Standard/IConfiguration.cs deleted file mode 100644 index 432fbe156..000000000 --- a/DotNet/ThoughtSpotPublicRESTAPI.Standard/IConfiguration.cs +++ /dev/null @@ -1,38 +0,0 @@ -// -// Copyright (c) APIMatic. All rights reserved. -// -namespace ThoughtSpotPublicRESTAPI.Standard -{ - using System; - using System.Net; - using ThoughtSpotPublicRESTAPI.Standard.Authentication; - using ThoughtSpotPublicRESTAPI.Standard.Models; - - /// - /// IConfiguration. - /// - public interface IConfiguration - { - /// - /// Gets Current API environment. - /// - Environment Environment { get; } - - /// - /// Gets BaseUrl value. - /// - string BaseUrl { get; } - - /// - /// Gets the OAuth 2.0 Access Token. - /// - string AccessToken { get; } - - /// - /// Gets the URL for a particular alias in the current environment and appends it with template parameters. - /// - /// Default value:DEFAULT. - /// Returns the baseurl. - string GetBaseUri(Server alias = Server.Default); - } -} \ No newline at end of file diff --git a/DotNet/ThoughtSpotPublicRESTAPI.Standard/Models/AccessEnum.cs b/DotNet/ThoughtSpotPublicRESTAPI.Standard/Models/AccessEnum.cs deleted file mode 100644 index 005a074ff..000000000 --- a/DotNet/ThoughtSpotPublicRESTAPI.Standard/Models/AccessEnum.cs +++ /dev/null @@ -1,33 +0,0 @@ -// -// Copyright (c) APIMatic. All rights reserved. -// -namespace ThoughtSpotPublicRESTAPI.Standard.Models -{ - using System; - using System.Collections.Generic; - using System.Linq; - using System.Runtime.Serialization; - using Newtonsoft.Json; - using Newtonsoft.Json.Converters; - using ThoughtSpotPublicRESTAPI.Standard; - using ThoughtSpotPublicRESTAPI.Standard.Utilities; - - /// - /// AccessEnum. - /// - [JsonConverter(typeof(StringEnumConverter))] - public enum AccessEnum - { - /// - /// READONLY. - /// - [EnumMember(Value = "READ_ONLY")] - READONLY, - - /// - /// MODIFY. - /// - [EnumMember(Value = "MODIFY")] - MODIFY - } -} \ No newline at end of file diff --git a/DotNet/ThoughtSpotPublicRESTAPI.Standard/Models/AccessLevelEnum.cs b/DotNet/ThoughtSpotPublicRESTAPI.Standard/Models/AccessLevelEnum.cs deleted file mode 100644 index 1eb1eebbb..000000000 --- a/DotNet/ThoughtSpotPublicRESTAPI.Standard/Models/AccessLevelEnum.cs +++ /dev/null @@ -1,33 +0,0 @@ -// -// Copyright (c) APIMatic. All rights reserved. -// -namespace ThoughtSpotPublicRESTAPI.Standard.Models -{ - using System; - using System.Collections.Generic; - using System.Linq; - using System.Runtime.Serialization; - using Newtonsoft.Json; - using Newtonsoft.Json.Converters; - using ThoughtSpotPublicRESTAPI.Standard; - using ThoughtSpotPublicRESTAPI.Standard.Utilities; - - /// - /// AccessLevelEnum. - /// - [JsonConverter(typeof(StringEnumConverter))] - public enum AccessLevelEnum - { - /// - /// FULL. - /// - [EnumMember(Value = "FULL")] - FULL, - - /// - /// REPORTBOOKVIEW. - /// - [EnumMember(Value = "REPORT_BOOK_VIEW")] - REPORTBOOKVIEW - } -} \ No newline at end of file diff --git a/DotNet/ThoughtSpotPublicRESTAPI.Standard/Models/AccessLevelInput.cs b/DotNet/ThoughtSpotPublicRESTAPI.Standard/Models/AccessLevelInput.cs deleted file mode 100644 index 7b14aa349..000000000 --- a/DotNet/ThoughtSpotPublicRESTAPI.Standard/Models/AccessLevelInput.cs +++ /dev/null @@ -1,116 +0,0 @@ -// -// Copyright (c) APIMatic. All rights reserved. -// -namespace ThoughtSpotPublicRESTAPI.Standard.Models -{ - using System; - using System.Collections.Generic; - using System.ComponentModel; - using System.IO; - using System.Linq; - using System.Text; - using System.Threading.Tasks; - using Newtonsoft.Json; - using Newtonsoft.Json.Converters; - using ThoughtSpotPublicRESTAPI.Standard; - using ThoughtSpotPublicRESTAPI.Standard.Utilities; - - /// - /// AccessLevelInput. - /// - public class AccessLevelInput - { - /// - /// Initializes a new instance of the class. - /// - public AccessLevelInput() - { - } - - /// - /// Initializes a new instance of the class. - /// - /// name. - /// id. - /// type. - /// access. - public AccessLevelInput( - string name = null, - string id = null, - Models.Type1Enum? type = null, - Models.AccessEnum? access = null) - { - this.Name = name; - this.Id = id; - this.Type = type; - this.Access = access; - } - - /// - /// Username or name of the user group - /// - [JsonProperty("name", NullValueHandling = NullValueHandling.Ignore)] - public string Name { get; set; } - - /// - /// GUID of the user or user group - /// - [JsonProperty("id", NullValueHandling = NullValueHandling.Ignore)] - public string Id { get; set; } - - /// - /// Type of access detail provided - /// - [JsonProperty("type", ItemConverterType = typeof(StringEnumConverter), NullValueHandling = NullValueHandling.Ignore)] - public Models.Type1Enum? Type { get; set; } - - /// - /// Minimum access level that the specified user or user group has. If no input is provided then minimum access of READ_ONLY will be considered. - /// - [JsonProperty("access", ItemConverterType = typeof(StringEnumConverter), NullValueHandling = NullValueHandling.Ignore)] - public Models.AccessEnum? Access { get; set; } - - /// - public override string ToString() - { - var toStringOutput = new List(); - - this.ToString(toStringOutput); - - return $"AccessLevelInput : ({string.Join(", ", toStringOutput)})"; - } - - /// - public override bool Equals(object obj) - { - if (obj == null) - { - return false; - } - - if (obj == this) - { - return true; - } - - return obj is AccessLevelInput other && - ((this.Name == null && other.Name == null) || (this.Name?.Equals(other.Name) == true)) && - ((this.Id == null && other.Id == null) || (this.Id?.Equals(other.Id) == true)) && - ((this.Type == null && other.Type == null) || (this.Type?.Equals(other.Type) == true)) && - ((this.Access == null && other.Access == null) || (this.Access?.Equals(other.Access) == true)); - } - - - /// - /// ToString overload. - /// - /// List of strings. - protected void ToString(List toStringOutput) - { - toStringOutput.Add($"this.Name = {(this.Name == null ? "null" : this.Name == string.Empty ? "" : this.Name)}"); - toStringOutput.Add($"this.Id = {(this.Id == null ? "null" : this.Id == string.Empty ? "" : this.Id)}"); - toStringOutput.Add($"this.Type = {(this.Type == null ? "null" : this.Type.ToString())}"); - toStringOutput.Add($"this.Access = {(this.Access == null ? "null" : this.Access.ToString())}"); - } - } -} \ No newline at end of file diff --git a/DotNet/ThoughtSpotPublicRESTAPI.Standard/Models/AddTableInput.cs b/DotNet/ThoughtSpotPublicRESTAPI.Standard/Models/AddTableInput.cs deleted file mode 100644 index 0b48693ff..000000000 --- a/DotNet/ThoughtSpotPublicRESTAPI.Standard/Models/AddTableInput.cs +++ /dev/null @@ -1,116 +0,0 @@ -// -// Copyright (c) APIMatic. All rights reserved. -// -namespace ThoughtSpotPublicRESTAPI.Standard.Models -{ - using System; - using System.Collections.Generic; - using System.ComponentModel; - using System.IO; - using System.Linq; - using System.Text; - using System.Threading.Tasks; - using Newtonsoft.Json; - using Newtonsoft.Json.Converters; - using ThoughtSpotPublicRESTAPI.Standard; - using ThoughtSpotPublicRESTAPI.Standard.Utilities; - - /// - /// AddTableInput. - /// - public class AddTableInput - { - /// - /// Initializes a new instance of the class. - /// - public AddTableInput() - { - } - - /// - /// Initializes a new instance of the class. - /// - /// name. - /// dbName. - /// schemaName. - /// columns. - public AddTableInput( - string name, - string dbName, - string schemaName, - List columns) - { - this.Name = name; - this.DbName = dbName; - this.SchemaName = schemaName; - this.Columns = columns; - } - - /// - /// Name of the table - /// - [JsonProperty("name")] - public string Name { get; set; } - - /// - /// Name of the database in the data platform - /// - [JsonProperty("dbName")] - public string DbName { get; set; } - - /// - /// Name of the schema in the database - /// - [JsonProperty("schemaName")] - public string SchemaName { get; set; } - - /// - /// A JSON array of column details - /// - [JsonProperty("columns")] - public List Columns { get; set; } - - /// - public override string ToString() - { - var toStringOutput = new List(); - - this.ToString(toStringOutput); - - return $"AddTableInput : ({string.Join(", ", toStringOutput)})"; - } - - /// - public override bool Equals(object obj) - { - if (obj == null) - { - return false; - } - - if (obj == this) - { - return true; - } - - return obj is AddTableInput other && - ((this.Name == null && other.Name == null) || (this.Name?.Equals(other.Name) == true)) && - ((this.DbName == null && other.DbName == null) || (this.DbName?.Equals(other.DbName) == true)) && - ((this.SchemaName == null && other.SchemaName == null) || (this.SchemaName?.Equals(other.SchemaName) == true)) && - ((this.Columns == null && other.Columns == null) || (this.Columns?.Equals(other.Columns) == true)); - } - - - /// - /// ToString overload. - /// - /// List of strings. - protected void ToString(List toStringOutput) - { - toStringOutput.Add($"this.Name = {(this.Name == null ? "null" : this.Name == string.Empty ? "" : this.Name)}"); - toStringOutput.Add($"this.DbName = {(this.DbName == null ? "null" : this.DbName == string.Empty ? "" : this.DbName)}"); - toStringOutput.Add($"this.SchemaName = {(this.SchemaName == null ? "null" : this.SchemaName == string.Empty ? "" : this.SchemaName)}"); - toStringOutput.Add($"this.Columns = {(this.Columns == null ? "null" : $"[{string.Join(", ", this.Columns)} ]")}"); - } - } -} \ No newline at end of file diff --git a/DotNet/ThoughtSpotPublicRESTAPI.Standard/Models/AdminsyncPrincipalResponse.cs b/DotNet/ThoughtSpotPublicRESTAPI.Standard/Models/AdminsyncPrincipalResponse.cs deleted file mode 100644 index 01965556f..000000000 --- a/DotNet/ThoughtSpotPublicRESTAPI.Standard/Models/AdminsyncPrincipalResponse.cs +++ /dev/null @@ -1,138 +0,0 @@ -// -// Copyright (c) APIMatic. All rights reserved. -// -namespace ThoughtSpotPublicRESTAPI.Standard.Models -{ - using System; - using System.Collections.Generic; - using System.ComponentModel; - using System.IO; - using System.Linq; - using System.Text; - using System.Threading.Tasks; - using Newtonsoft.Json; - using Newtonsoft.Json.Converters; - using ThoughtSpotPublicRESTAPI.Standard; - using ThoughtSpotPublicRESTAPI.Standard.Utilities; - - /// - /// AdminsyncPrincipalResponse. - /// - public class AdminsyncPrincipalResponse - { - /// - /// Initializes a new instance of the class. - /// - public AdminsyncPrincipalResponse() - { - } - - /// - /// Initializes a new instance of the class. - /// - /// usersAdded. - /// usersDeleted. - /// usersUpdated. - /// groupsAdded. - /// groupsDeleted. - /// groupsUpdated. - public AdminsyncPrincipalResponse( - List usersAdded = null, - List usersDeleted = null, - List usersUpdated = null, - List groupsAdded = null, - List groupsDeleted = null, - List groupsUpdated = null) - { - this.UsersAdded = usersAdded; - this.UsersDeleted = usersDeleted; - this.UsersUpdated = usersUpdated; - this.GroupsAdded = groupsAdded; - this.GroupsDeleted = groupsDeleted; - this.GroupsUpdated = groupsUpdated; - } - - /// - /// Username of list of users added - /// - [JsonProperty("usersAdded", NullValueHandling = NullValueHandling.Ignore)] - public List UsersAdded { get; set; } - - /// - /// Username of list of users deleted - /// - [JsonProperty("usersDeleted", NullValueHandling = NullValueHandling.Ignore)] - public List UsersDeleted { get; set; } - - /// - /// Username of list of users updated - /// - [JsonProperty("usersUpdated", NullValueHandling = NullValueHandling.Ignore)] - public List UsersUpdated { get; set; } - - /// - /// Group name of list of groups added - /// - [JsonProperty("groupsAdded", NullValueHandling = NullValueHandling.Ignore)] - public List GroupsAdded { get; set; } - - /// - /// Group name of list of groups deleted - /// - [JsonProperty("groupsDeleted", NullValueHandling = NullValueHandling.Ignore)] - public List GroupsDeleted { get; set; } - - /// - /// Group name of list of groups updated - /// - [JsonProperty("groupsUpdated", NullValueHandling = NullValueHandling.Ignore)] - public List GroupsUpdated { get; set; } - - /// - public override string ToString() - { - var toStringOutput = new List(); - - this.ToString(toStringOutput); - - return $"AdminsyncPrincipalResponse : ({string.Join(", ", toStringOutput)})"; - } - - /// - public override bool Equals(object obj) - { - if (obj == null) - { - return false; - } - - if (obj == this) - { - return true; - } - - return obj is AdminsyncPrincipalResponse other && - ((this.UsersAdded == null && other.UsersAdded == null) || (this.UsersAdded?.Equals(other.UsersAdded) == true)) && - ((this.UsersDeleted == null && other.UsersDeleted == null) || (this.UsersDeleted?.Equals(other.UsersDeleted) == true)) && - ((this.UsersUpdated == null && other.UsersUpdated == null) || (this.UsersUpdated?.Equals(other.UsersUpdated) == true)) && - ((this.GroupsAdded == null && other.GroupsAdded == null) || (this.GroupsAdded?.Equals(other.GroupsAdded) == true)) && - ((this.GroupsDeleted == null && other.GroupsDeleted == null) || (this.GroupsDeleted?.Equals(other.GroupsDeleted) == true)) && - ((this.GroupsUpdated == null && other.GroupsUpdated == null) || (this.GroupsUpdated?.Equals(other.GroupsUpdated) == true)); - } - - - /// - /// ToString overload. - /// - /// List of strings. - protected void ToString(List toStringOutput) - { - toStringOutput.Add($"this.UsersAdded = {(this.UsersAdded == null ? "null" : $"[{string.Join(", ", this.UsersAdded)} ]")}"); - toStringOutput.Add($"this.UsersDeleted = {(this.UsersDeleted == null ? "null" : $"[{string.Join(", ", this.UsersDeleted)} ]")}"); - toStringOutput.Add($"this.UsersUpdated = {(this.UsersUpdated == null ? "null" : $"[{string.Join(", ", this.UsersUpdated)} ]")}"); - toStringOutput.Add($"this.GroupsAdded = {(this.GroupsAdded == null ? "null" : $"[{string.Join(", ", this.GroupsAdded)} ]")}"); - toStringOutput.Add($"this.GroupsDeleted = {(this.GroupsDeleted == null ? "null" : $"[{string.Join(", ", this.GroupsDeleted)} ]")}"); - toStringOutput.Add($"this.GroupsUpdated = {(this.GroupsUpdated == null ? "null" : $"[{string.Join(", ", this.GroupsUpdated)} ]")}"); - } - } -} \ No newline at end of file diff --git a/DotNet/ThoughtSpotPublicRESTAPI.Standard/Models/AnswerQueryResponse.cs b/DotNet/ThoughtSpotPublicRESTAPI.Standard/Models/AnswerQueryResponse.cs deleted file mode 100644 index 4e4e343b4..000000000 --- a/DotNet/ThoughtSpotPublicRESTAPI.Standard/Models/AnswerQueryResponse.cs +++ /dev/null @@ -1,105 +0,0 @@ -// -// Copyright (c) APIMatic. All rights reserved. -// -namespace ThoughtSpotPublicRESTAPI.Standard.Models -{ - using System; - using System.Collections.Generic; - using System.ComponentModel; - using System.IO; - using System.Linq; - using System.Text; - using System.Threading.Tasks; - using Newtonsoft.Json; - using Newtonsoft.Json.Converters; - using ThoughtSpotPublicRESTAPI.Standard; - using ThoughtSpotPublicRESTAPI.Standard.Utilities; - - /// - /// AnswerQueryResponse. - /// - public class AnswerQueryResponse - { - /// - /// Initializes a new instance of the class. - /// - public AnswerQueryResponse() - { - } - - /// - /// Initializes a new instance of the class. - /// - /// name. - /// id. - /// querySql. - public AnswerQueryResponse( - string name = null, - string id = null, - string querySql = null) - { - this.Name = name; - this.Id = id; - this.QuerySql = querySql; - } - - /// - /// The name of the saved Answer - /// - [JsonProperty("name", NullValueHandling = NullValueHandling.Ignore)] - public string Name { get; set; } - - /// - /// The GUID of the saved Answer - /// - [JsonProperty("id", NullValueHandling = NullValueHandling.Ignore)] - public string Id { get; set; } - - /// - /// SQL query associated with the saved Answer - /// - [JsonProperty("querySql", NullValueHandling = NullValueHandling.Ignore)] - public string QuerySql { get; set; } - - /// - public override string ToString() - { - var toStringOutput = new List(); - - this.ToString(toStringOutput); - - return $"AnswerQueryResponse : ({string.Join(", ", toStringOutput)})"; - } - - /// - public override bool Equals(object obj) - { - if (obj == null) - { - return false; - } - - if (obj == this) - { - return true; - } - - return obj is AnswerQueryResponse other && - ((this.Name == null && other.Name == null) || (this.Name?.Equals(other.Name) == true)) && - ((this.Id == null && other.Id == null) || (this.Id?.Equals(other.Id) == true)) && - ((this.QuerySql == null && other.QuerySql == null) || (this.QuerySql?.Equals(other.QuerySql) == true)); - } - - - /// - /// ToString overload. - /// - /// List of strings. - protected void ToString(List toStringOutput) - { - toStringOutput.Add($"this.Name = {(this.Name == null ? "null" : this.Name == string.Empty ? "" : this.Name)}"); - toStringOutput.Add($"this.Id = {(this.Id == null ? "null" : this.Id == string.Empty ? "" : this.Id)}"); - toStringOutput.Add($"this.QuerySql = {(this.QuerySql == null ? "null" : this.QuerySql == string.Empty ? "" : this.QuerySql)}"); - } - } -} \ No newline at end of file diff --git a/DotNet/ThoughtSpotPublicRESTAPI.Standard/Models/ClientState.cs b/DotNet/ThoughtSpotPublicRESTAPI.Standard/Models/ClientState.cs deleted file mode 100644 index 684c8f3be..000000000 --- a/DotNet/ThoughtSpotPublicRESTAPI.Standard/Models/ClientState.cs +++ /dev/null @@ -1,83 +0,0 @@ -// -// Copyright (c) APIMatic. All rights reserved. -// -namespace ThoughtSpotPublicRESTAPI.Standard.Models -{ - using System; - using System.Collections.Generic; - using System.ComponentModel; - using System.IO; - using System.Linq; - using System.Text; - using System.Threading.Tasks; - using Newtonsoft.Json; - using Newtonsoft.Json.Converters; - using ThoughtSpotPublicRESTAPI.Standard; - using ThoughtSpotPublicRESTAPI.Standard.Utilities; - - /// - /// ClientState. - /// - public class ClientState - { - /// - /// Initializes a new instance of the class. - /// - public ClientState() - { - } - - /// - /// Initializes a new instance of the class. - /// - /// color. - public ClientState( - string color = null) - { - this.Color = color; - } - - /// - /// Color assigned to the tag - /// - [JsonProperty("color", NullValueHandling = NullValueHandling.Ignore)] - public string Color { get; set; } - - /// - public override string ToString() - { - var toStringOutput = new List(); - - this.ToString(toStringOutput); - - return $"ClientState : ({string.Join(", ", toStringOutput)})"; - } - - /// - public override bool Equals(object obj) - { - if (obj == null) - { - return false; - } - - if (obj == this) - { - return true; - } - - return obj is ClientState other && - ((this.Color == null && other.Color == null) || (this.Color?.Equals(other.Color) == true)); - } - - - /// - /// ToString overload. - /// - /// List of strings. - protected void ToString(List toStringOutput) - { - toStringOutput.Add($"this.Color = {(this.Color == null ? "null" : this.Color == string.Empty ? "" : this.Color)}"); - } - } -} \ No newline at end of file diff --git a/DotNet/ThoughtSpotPublicRESTAPI.Standard/Models/ColumnsInput.cs b/DotNet/ThoughtSpotPublicRESTAPI.Standard/Models/ColumnsInput.cs deleted file mode 100644 index 5a84b0512..000000000 --- a/DotNet/ThoughtSpotPublicRESTAPI.Standard/Models/ColumnsInput.cs +++ /dev/null @@ -1,94 +0,0 @@ -// -// Copyright (c) APIMatic. All rights reserved. -// -namespace ThoughtSpotPublicRESTAPI.Standard.Models -{ - using System; - using System.Collections.Generic; - using System.ComponentModel; - using System.IO; - using System.Linq; - using System.Text; - using System.Threading.Tasks; - using Newtonsoft.Json; - using Newtonsoft.Json.Converters; - using ThoughtSpotPublicRESTAPI.Standard; - using ThoughtSpotPublicRESTAPI.Standard.Utilities; - - /// - /// ColumnsInput. - /// - public class ColumnsInput - { - /// - /// Initializes a new instance of the class. - /// - public ColumnsInput() - { - } - - /// - /// Initializes a new instance of the class. - /// - /// name. - /// dataType. - public ColumnsInput( - string name, - string dataType) - { - this.Name = name; - this.DataType = dataType; - } - - /// - /// Name of the column - /// - [JsonProperty("name")] - public string Name { get; set; } - - /// - /// Datatype of the column - /// - [JsonProperty("dataType")] - public string DataType { get; set; } - - /// - public override string ToString() - { - var toStringOutput = new List(); - - this.ToString(toStringOutput); - - return $"ColumnsInput : ({string.Join(", ", toStringOutput)})"; - } - - /// - public override bool Equals(object obj) - { - if (obj == null) - { - return false; - } - - if (obj == this) - { - return true; - } - - return obj is ColumnsInput other && - ((this.Name == null && other.Name == null) || (this.Name?.Equals(other.Name) == true)) && - ((this.DataType == null && other.DataType == null) || (this.DataType?.Equals(other.DataType) == true)); - } - - - /// - /// ToString overload. - /// - /// List of strings. - protected void ToString(List toStringOutput) - { - toStringOutput.Add($"this.Name = {(this.Name == null ? "null" : this.Name == string.Empty ? "" : this.Name)}"); - toStringOutput.Add($"this.DataType = {(this.DataType == null ? "null" : this.DataType == string.Empty ? "" : this.DataType)}"); - } - } -} \ No newline at end of file diff --git a/DotNet/ThoughtSpotPublicRESTAPI.Standard/Models/ConnectionColumn.cs b/DotNet/ThoughtSpotPublicRESTAPI.Standard/Models/ConnectionColumn.cs deleted file mode 100644 index 727121203..000000000 --- a/DotNet/ThoughtSpotPublicRESTAPI.Standard/Models/ConnectionColumn.cs +++ /dev/null @@ -1,105 +0,0 @@ -// -// Copyright (c) APIMatic. All rights reserved. -// -namespace ThoughtSpotPublicRESTAPI.Standard.Models -{ - using System; - using System.Collections.Generic; - using System.ComponentModel; - using System.IO; - using System.Linq; - using System.Text; - using System.Threading.Tasks; - using Newtonsoft.Json; - using Newtonsoft.Json.Converters; - using ThoughtSpotPublicRESTAPI.Standard; - using ThoughtSpotPublicRESTAPI.Standard.Utilities; - - /// - /// ConnectionColumn. - /// - public class ConnectionColumn - { - /// - /// Initializes a new instance of the class. - /// - public ConnectionColumn() - { - } - - /// - /// Initializes a new instance of the class. - /// - /// name. - /// type. - /// column. - public ConnectionColumn( - string name = null, - string type = null, - List column = null) - { - this.Name = name; - this.Type = type; - this.Column = column; - } - - /// - /// Name of the table - /// - [JsonProperty("name", NullValueHandling = NullValueHandling.Ignore)] - public string Name { get; set; } - - /// - /// Type of the Table - /// - [JsonProperty("type", NullValueHandling = NullValueHandling.Ignore)] - public string Type { get; set; } - - /// - /// List of columns in the table - /// - [JsonProperty("column", NullValueHandling = NullValueHandling.Ignore)] - public List Column { get; set; } - - /// - public override string ToString() - { - var toStringOutput = new List(); - - this.ToString(toStringOutput); - - return $"ConnectionColumn : ({string.Join(", ", toStringOutput)})"; - } - - /// - public override bool Equals(object obj) - { - if (obj == null) - { - return false; - } - - if (obj == this) - { - return true; - } - - return obj is ConnectionColumn other && - ((this.Name == null && other.Name == null) || (this.Name?.Equals(other.Name) == true)) && - ((this.Type == null && other.Type == null) || (this.Type?.Equals(other.Type) == true)) && - ((this.Column == null && other.Column == null) || (this.Column?.Equals(other.Column) == true)); - } - - - /// - /// ToString overload. - /// - /// List of strings. - protected void ToString(List toStringOutput) - { - toStringOutput.Add($"this.Name = {(this.Name == null ? "null" : this.Name == string.Empty ? "" : this.Name)}"); - toStringOutput.Add($"this.Type = {(this.Type == null ? "null" : this.Type == string.Empty ? "" : this.Type)}"); - toStringOutput.Add($"this.Column = {(this.Column == null ? "null" : $"[{string.Join(", ", this.Column)} ]")}"); - } - } -} \ No newline at end of file diff --git a/DotNet/ThoughtSpotPublicRESTAPI.Standard/Models/ConnectionColumnsShema.cs b/DotNet/ThoughtSpotPublicRESTAPI.Standard/Models/ConnectionColumnsShema.cs deleted file mode 100644 index 06e487914..000000000 --- a/DotNet/ThoughtSpotPublicRESTAPI.Standard/Models/ConnectionColumnsShema.cs +++ /dev/null @@ -1,116 +0,0 @@ -// -// Copyright (c) APIMatic. All rights reserved. -// -namespace ThoughtSpotPublicRESTAPI.Standard.Models -{ - using System; - using System.Collections.Generic; - using System.ComponentModel; - using System.IO; - using System.Linq; - using System.Text; - using System.Threading.Tasks; - using Newtonsoft.Json; - using Newtonsoft.Json.Converters; - using ThoughtSpotPublicRESTAPI.Standard; - using ThoughtSpotPublicRESTAPI.Standard.Utilities; - - /// - /// ConnectionColumnsShema. - /// - public class ConnectionColumnsShema - { - /// - /// Initializes a new instance of the class. - /// - public ConnectionColumnsShema() - { - } - - /// - /// Initializes a new instance of the class. - /// - /// name. - /// dbName. - /// schemaName. - /// columns. - public ConnectionColumnsShema( - string name = null, - string dbName = null, - string schemaName = null, - List columns = null) - { - this.Name = name; - this.DbName = dbName; - this.SchemaName = schemaName; - this.Columns = columns; - } - - /// - /// Name of the table - /// - [JsonProperty("name", NullValueHandling = NullValueHandling.Ignore)] - public string Name { get; set; } - - /// - /// Name of the database - /// - [JsonProperty("dbName", NullValueHandling = NullValueHandling.Ignore)] - public string DbName { get; set; } - - /// - /// Name of the schema - /// - [JsonProperty("schemaName", NullValueHandling = NullValueHandling.Ignore)] - public string SchemaName { get; set; } - - /// - /// List of columns in the table - /// - [JsonProperty("columns", NullValueHandling = NullValueHandling.Ignore)] - public List Columns { get; set; } - - /// - public override string ToString() - { - var toStringOutput = new List(); - - this.ToString(toStringOutput); - - return $"ConnectionColumnsShema : ({string.Join(", ", toStringOutput)})"; - } - - /// - public override bool Equals(object obj) - { - if (obj == null) - { - return false; - } - - if (obj == this) - { - return true; - } - - return obj is ConnectionColumnsShema other && - ((this.Name == null && other.Name == null) || (this.Name?.Equals(other.Name) == true)) && - ((this.DbName == null && other.DbName == null) || (this.DbName?.Equals(other.DbName) == true)) && - ((this.SchemaName == null && other.SchemaName == null) || (this.SchemaName?.Equals(other.SchemaName) == true)) && - ((this.Columns == null && other.Columns == null) || (this.Columns?.Equals(other.Columns) == true)); - } - - - /// - /// ToString overload. - /// - /// List of strings. - protected void ToString(List toStringOutput) - { - toStringOutput.Add($"this.Name = {(this.Name == null ? "null" : this.Name == string.Empty ? "" : this.Name)}"); - toStringOutput.Add($"this.DbName = {(this.DbName == null ? "null" : this.DbName == string.Empty ? "" : this.DbName)}"); - toStringOutput.Add($"this.SchemaName = {(this.SchemaName == null ? "null" : this.SchemaName == string.Empty ? "" : this.SchemaName)}"); - toStringOutput.Add($"this.Columns = {(this.Columns == null ? "null" : $"[{string.Join(", ", this.Columns)} ]")}"); - } - } -} \ No newline at end of file diff --git a/DotNet/ThoughtSpotPublicRESTAPI.Standard/Models/ConnectionDatabaseType.cs b/DotNet/ThoughtSpotPublicRESTAPI.Standard/Models/ConnectionDatabaseType.cs deleted file mode 100644 index 8251bec8f..000000000 --- a/DotNet/ThoughtSpotPublicRESTAPI.Standard/Models/ConnectionDatabaseType.cs +++ /dev/null @@ -1,94 +0,0 @@ -// -// Copyright (c) APIMatic. All rights reserved. -// -namespace ThoughtSpotPublicRESTAPI.Standard.Models -{ - using System; - using System.Collections.Generic; - using System.ComponentModel; - using System.IO; - using System.Linq; - using System.Text; - using System.Threading.Tasks; - using Newtonsoft.Json; - using Newtonsoft.Json.Converters; - using ThoughtSpotPublicRESTAPI.Standard; - using ThoughtSpotPublicRESTAPI.Standard.Utilities; - - /// - /// ConnectionDatabaseType. - /// - public class ConnectionDatabaseType - { - /// - /// Initializes a new instance of the class. - /// - public ConnectionDatabaseType() - { - } - - /// - /// Initializes a new instance of the class. - /// - /// name. - /// schema. - public ConnectionDatabaseType( - string name = null, - List schema = null) - { - this.Name = name; - this.Schema = schema; - } - - /// - /// Name of the database - /// - [JsonProperty("name", NullValueHandling = NullValueHandling.Ignore)] - public string Name { get; set; } - - /// - /// List of schemas - /// - [JsonProperty("schema", NullValueHandling = NullValueHandling.Ignore)] - public List Schema { get; set; } - - /// - public override string ToString() - { - var toStringOutput = new List(); - - this.ToString(toStringOutput); - - return $"ConnectionDatabaseType : ({string.Join(", ", toStringOutput)})"; - } - - /// - public override bool Equals(object obj) - { - if (obj == null) - { - return false; - } - - if (obj == this) - { - return true; - } - - return obj is ConnectionDatabaseType other && - ((this.Name == null && other.Name == null) || (this.Name?.Equals(other.Name) == true)) && - ((this.Schema == null && other.Schema == null) || (this.Schema?.Equals(other.Schema) == true)); - } - - - /// - /// ToString overload. - /// - /// List of strings. - protected void ToString(List toStringOutput) - { - toStringOutput.Add($"this.Name = {(this.Name == null ? "null" : this.Name == string.Empty ? "" : this.Name)}"); - toStringOutput.Add($"this.Schema = {(this.Schema == null ? "null" : $"[{string.Join(", ", this.Schema)} ]")}"); - } - } -} \ No newline at end of file diff --git a/DotNet/ThoughtSpotPublicRESTAPI.Standard/Models/ConnectionResponse.cs b/DotNet/ThoughtSpotPublicRESTAPI.Standard/Models/ConnectionResponse.cs deleted file mode 100644 index fa9a4b722..000000000 --- a/DotNet/ThoughtSpotPublicRESTAPI.Standard/Models/ConnectionResponse.cs +++ /dev/null @@ -1,303 +0,0 @@ -// -// Copyright (c) APIMatic. All rights reserved. -// -namespace ThoughtSpotPublicRESTAPI.Standard.Models -{ - using System; - using System.Collections.Generic; - using System.ComponentModel; - using System.IO; - using System.Linq; - using System.Text; - using System.Threading.Tasks; - using Newtonsoft.Json; - using Newtonsoft.Json.Converters; - using ThoughtSpotPublicRESTAPI.Standard; - using ThoughtSpotPublicRESTAPI.Standard.Utilities; - - /// - /// ConnectionResponse. - /// - public class ConnectionResponse - { - /// - /// Initializes a new instance of the class. - /// - public ConnectionResponse() - { - } - - /// - /// Initializes a new instance of the class. - /// - /// name. - /// description. - /// type. - /// id. - /// scheduled. - /// connectionType. - /// configuration. - /// isExternal. - /// isDeprecated. - /// isDeleted. - /// isHidden. - /// complete. - /// indexVersion. - /// generationNum. - /// created. - /// modified. - /// author. - /// modifiedBy. - /// owner. - /// tags. - /// tables. - public ConnectionResponse( - string name = null, - string description = null, - string type = null, - string id = null, - bool? scheduled = null, - string connectionType = null, - string configuration = null, - bool? isExternal = null, - bool? isDeprecated = null, - bool? isDeleted = null, - bool? isHidden = null, - bool? complete = null, - double? indexVersion = null, - double? generationNum = null, - string created = null, - string modified = null, - Models.UserNameAndID author = null, - Models.UserNameAndID modifiedBy = null, - Models.UserNameAndID owner = null, - List tags = null, - List tables = null) - { - this.Name = name; - this.Description = description; - this.Type = type; - this.Id = id; - this.Scheduled = scheduled; - this.ConnectionType = connectionType; - this.Configuration = configuration; - this.IsExternal = isExternal; - this.IsDeprecated = isDeprecated; - this.IsDeleted = isDeleted; - this.IsHidden = isHidden; - this.Complete = complete; - this.IndexVersion = indexVersion; - this.GenerationNum = generationNum; - this.Created = created; - this.Modified = modified; - this.Author = author; - this.ModifiedBy = modifiedBy; - this.Owner = owner; - this.Tags = tags; - this.Tables = tables; - } - - /// - /// Name of the connection - /// - [JsonProperty("name", NullValueHandling = NullValueHandling.Ignore)] - public string Name { get; set; } - - /// - /// Description associated with the connection - /// - [JsonProperty("description", NullValueHandling = NullValueHandling.Ignore)] - public string Description { get; set; } - - /// - /// Type of the connection. The database associated with this type can be obtained from the response returned by the /tspublic/rest/v2/connection/types API endpoint. - /// - [JsonProperty("type", NullValueHandling = NullValueHandling.Ignore)] - public string Type { get; set; } - - /// - /// GUID of the connection - /// - [JsonProperty("id", NullValueHandling = NullValueHandling.Ignore)] - public string Id { get; set; } - - /// - /// Indicates if the data sync is scheduled for this connection - /// - [JsonProperty("scheduled", NullValueHandling = NullValueHandling.Ignore)] - public bool? Scheduled { get; set; } - - /// - /// Gets or sets ConnectionType. - /// - [JsonProperty("connectionType", NullValueHandling = NullValueHandling.Ignore)] - public string ConnectionType { get; set; } - - /// - /// Configuration properties of the connection - /// - [JsonProperty("configuration", NullValueHandling = NullValueHandling.Ignore)] - public string Configuration { get; set; } - - /// - /// Gets or sets IsExternal. - /// - [JsonProperty("isExternal", NullValueHandling = NullValueHandling.Ignore)] - public bool? IsExternal { get; set; } - - /// - /// Indicates if the connection is deprecated - /// - [JsonProperty("isDeprecated", NullValueHandling = NullValueHandling.Ignore)] - public bool? IsDeprecated { get; set; } - - /// - /// Indicates if the connection is deleted - /// - [JsonProperty("isDeleted", NullValueHandling = NullValueHandling.Ignore)] - public bool? IsDeleted { get; set; } - - /// - /// Indicates if the connection is hideen - /// - [JsonProperty("isHidden", NullValueHandling = NullValueHandling.Ignore)] - public bool? IsHidden { get; set; } - - /// - /// Indicates if the all the properties of connection is provided - /// - [JsonProperty("complete", NullValueHandling = NullValueHandling.Ignore)] - public bool? Complete { get; set; } - - /// - /// Gets or sets IndexVersion. - /// - [JsonProperty("indexVersion", NullValueHandling = NullValueHandling.Ignore)] - public double? IndexVersion { get; set; } - - /// - /// Gets or sets GenerationNum. - /// - [JsonProperty("generationNum", NullValueHandling = NullValueHandling.Ignore)] - public double? GenerationNum { get; set; } - - /// - /// Date and time when the connection was created - /// - [JsonProperty("created", NullValueHandling = NullValueHandling.Ignore)] - public string Created { get; set; } - - /// - /// Date and time of last modification of the connection - /// - [JsonProperty("modified", NullValueHandling = NullValueHandling.Ignore)] - public string Modified { get; set; } - - /// - /// Gets or sets Author. - /// - [JsonProperty("author", NullValueHandling = NullValueHandling.Ignore)] - public Models.UserNameAndID Author { get; set; } - - /// - /// Gets or sets ModifiedBy. - /// - [JsonProperty("modifiedBy", NullValueHandling = NullValueHandling.Ignore)] - public Models.UserNameAndID ModifiedBy { get; set; } - - /// - /// Gets or sets Owner. - /// - [JsonProperty("owner", NullValueHandling = NullValueHandling.Ignore)] - public Models.UserNameAndID Owner { get; set; } - - /// - /// List of tags assigned to the connection - /// - [JsonProperty("tags", NullValueHandling = NullValueHandling.Ignore)] - public List Tags { get; set; } - - /// - /// List of tables linked to this connection - /// - [JsonProperty("tables", NullValueHandling = NullValueHandling.Ignore)] - public List Tables { get; set; } - - /// - public override string ToString() - { - var toStringOutput = new List(); - - this.ToString(toStringOutput); - - return $"ConnectionResponse : ({string.Join(", ", toStringOutput)})"; - } - - /// - public override bool Equals(object obj) - { - if (obj == null) - { - return false; - } - - if (obj == this) - { - return true; - } - - return obj is ConnectionResponse other && - ((this.Name == null && other.Name == null) || (this.Name?.Equals(other.Name) == true)) && - ((this.Description == null && other.Description == null) || (this.Description?.Equals(other.Description) == true)) && - ((this.Type == null && other.Type == null) || (this.Type?.Equals(other.Type) == true)) && - ((this.Id == null && other.Id == null) || (this.Id?.Equals(other.Id) == true)) && - ((this.Scheduled == null && other.Scheduled == null) || (this.Scheduled?.Equals(other.Scheduled) == true)) && - ((this.ConnectionType == null && other.ConnectionType == null) || (this.ConnectionType?.Equals(other.ConnectionType) == true)) && - ((this.Configuration == null && other.Configuration == null) || (this.Configuration?.Equals(other.Configuration) == true)) && - ((this.IsExternal == null && other.IsExternal == null) || (this.IsExternal?.Equals(other.IsExternal) == true)) && - ((this.IsDeprecated == null && other.IsDeprecated == null) || (this.IsDeprecated?.Equals(other.IsDeprecated) == true)) && - ((this.IsDeleted == null && other.IsDeleted == null) || (this.IsDeleted?.Equals(other.IsDeleted) == true)) && - ((this.IsHidden == null && other.IsHidden == null) || (this.IsHidden?.Equals(other.IsHidden) == true)) && - ((this.Complete == null && other.Complete == null) || (this.Complete?.Equals(other.Complete) == true)) && - ((this.IndexVersion == null && other.IndexVersion == null) || (this.IndexVersion?.Equals(other.IndexVersion) == true)) && - ((this.GenerationNum == null && other.GenerationNum == null) || (this.GenerationNum?.Equals(other.GenerationNum) == true)) && - ((this.Created == null && other.Created == null) || (this.Created?.Equals(other.Created) == true)) && - ((this.Modified == null && other.Modified == null) || (this.Modified?.Equals(other.Modified) == true)) && - ((this.Author == null && other.Author == null) || (this.Author?.Equals(other.Author) == true)) && - ((this.ModifiedBy == null && other.ModifiedBy == null) || (this.ModifiedBy?.Equals(other.ModifiedBy) == true)) && - ((this.Owner == null && other.Owner == null) || (this.Owner?.Equals(other.Owner) == true)) && - ((this.Tags == null && other.Tags == null) || (this.Tags?.Equals(other.Tags) == true)) && - ((this.Tables == null && other.Tables == null) || (this.Tables?.Equals(other.Tables) == true)); - } - - - /// - /// ToString overload. - /// - /// List of strings. - protected void ToString(List toStringOutput) - { - toStringOutput.Add($"this.Name = {(this.Name == null ? "null" : this.Name == string.Empty ? "" : this.Name)}"); - toStringOutput.Add($"this.Description = {(this.Description == null ? "null" : this.Description == string.Empty ? "" : this.Description)}"); - toStringOutput.Add($"this.Type = {(this.Type == null ? "null" : this.Type == string.Empty ? "" : this.Type)}"); - toStringOutput.Add($"this.Id = {(this.Id == null ? "null" : this.Id == string.Empty ? "" : this.Id)}"); - toStringOutput.Add($"this.Scheduled = {(this.Scheduled == null ? "null" : this.Scheduled.ToString())}"); - toStringOutput.Add($"this.ConnectionType = {(this.ConnectionType == null ? "null" : this.ConnectionType == string.Empty ? "" : this.ConnectionType)}"); - toStringOutput.Add($"this.Configuration = {(this.Configuration == null ? "null" : this.Configuration == string.Empty ? "" : this.Configuration)}"); - toStringOutput.Add($"this.IsExternal = {(this.IsExternal == null ? "null" : this.IsExternal.ToString())}"); - toStringOutput.Add($"this.IsDeprecated = {(this.IsDeprecated == null ? "null" : this.IsDeprecated.ToString())}"); - toStringOutput.Add($"this.IsDeleted = {(this.IsDeleted == null ? "null" : this.IsDeleted.ToString())}"); - toStringOutput.Add($"this.IsHidden = {(this.IsHidden == null ? "null" : this.IsHidden.ToString())}"); - toStringOutput.Add($"this.Complete = {(this.Complete == null ? "null" : this.Complete.ToString())}"); - toStringOutput.Add($"this.IndexVersion = {(this.IndexVersion == null ? "null" : this.IndexVersion.ToString())}"); - toStringOutput.Add($"this.GenerationNum = {(this.GenerationNum == null ? "null" : this.GenerationNum.ToString())}"); - toStringOutput.Add($"this.Created = {(this.Created == null ? "null" : this.Created == string.Empty ? "" : this.Created)}"); - toStringOutput.Add($"this.Modified = {(this.Modified == null ? "null" : this.Modified == string.Empty ? "" : this.Modified)}"); - toStringOutput.Add($"this.Author = {(this.Author == null ? "null" : this.Author.ToString())}"); - toStringOutput.Add($"this.ModifiedBy = {(this.ModifiedBy == null ? "null" : this.ModifiedBy.ToString())}"); - toStringOutput.Add($"this.Owner = {(this.Owner == null ? "null" : this.Owner.ToString())}"); - toStringOutput.Add($"this.Tags = {(this.Tags == null ? "null" : $"[{string.Join(", ", this.Tags)} ]")}"); - toStringOutput.Add($"this.Tables = {(this.Tables == null ? "null" : $"[{string.Join(", ", this.Tables)} ]")}"); - } - } -} \ No newline at end of file diff --git a/DotNet/ThoughtSpotPublicRESTAPI.Standard/Models/ConnectionTableColumnsInput.cs b/DotNet/ThoughtSpotPublicRESTAPI.Standard/Models/ConnectionTableColumnsInput.cs deleted file mode 100644 index d93c01b3e..000000000 --- a/DotNet/ThoughtSpotPublicRESTAPI.Standard/Models/ConnectionTableColumnsInput.cs +++ /dev/null @@ -1,105 +0,0 @@ -// -// Copyright (c) APIMatic. All rights reserved. -// -namespace ThoughtSpotPublicRESTAPI.Standard.Models -{ - using System; - using System.Collections.Generic; - using System.ComponentModel; - using System.IO; - using System.Linq; - using System.Text; - using System.Threading.Tasks; - using Newtonsoft.Json; - using Newtonsoft.Json.Converters; - using ThoughtSpotPublicRESTAPI.Standard; - using ThoughtSpotPublicRESTAPI.Standard.Utilities; - - /// - /// ConnectionTableColumnsInput. - /// - public class ConnectionTableColumnsInput - { - /// - /// Initializes a new instance of the class. - /// - public ConnectionTableColumnsInput() - { - } - - /// - /// Initializes a new instance of the class. - /// - /// dbName. - /// schemaName. - /// name. - public ConnectionTableColumnsInput( - string dbName, - string schemaName, - string name) - { - this.DbName = dbName; - this.SchemaName = schemaName; - this.Name = name; - } - - /// - /// Name of the database - /// - [JsonProperty("dbName")] - public string DbName { get; set; } - - /// - /// Name of the schema - /// - [JsonProperty("schemaName")] - public string SchemaName { get; set; } - - /// - /// Name of the table - /// - [JsonProperty("name")] - public string Name { get; set; } - - /// - public override string ToString() - { - var toStringOutput = new List(); - - this.ToString(toStringOutput); - - return $"ConnectionTableColumnsInput : ({string.Join(", ", toStringOutput)})"; - } - - /// - public override bool Equals(object obj) - { - if (obj == null) - { - return false; - } - - if (obj == this) - { - return true; - } - - return obj is ConnectionTableColumnsInput other && - ((this.DbName == null && other.DbName == null) || (this.DbName?.Equals(other.DbName) == true)) && - ((this.SchemaName == null && other.SchemaName == null) || (this.SchemaName?.Equals(other.SchemaName) == true)) && - ((this.Name == null && other.Name == null) || (this.Name?.Equals(other.Name) == true)); - } - - - /// - /// ToString overload. - /// - /// List of strings. - protected void ToString(List toStringOutput) - { - toStringOutput.Add($"this.DbName = {(this.DbName == null ? "null" : this.DbName == string.Empty ? "" : this.DbName)}"); - toStringOutput.Add($"this.SchemaName = {(this.SchemaName == null ? "null" : this.SchemaName == string.Empty ? "" : this.SchemaName)}"); - toStringOutput.Add($"this.Name = {(this.Name == null ? "null" : this.Name == string.Empty ? "" : this.Name)}"); - } - } -} \ No newline at end of file diff --git a/DotNet/ThoughtSpotPublicRESTAPI.Standard/Models/ConnectionTableColumnsResponse.cs b/DotNet/ThoughtSpotPublicRESTAPI.Standard/Models/ConnectionTableColumnsResponse.cs deleted file mode 100644 index d501e434c..000000000 --- a/DotNet/ThoughtSpotPublicRESTAPI.Standard/Models/ConnectionTableColumnsResponse.cs +++ /dev/null @@ -1,94 +0,0 @@ -// -// Copyright (c) APIMatic. All rights reserved. -// -namespace ThoughtSpotPublicRESTAPI.Standard.Models -{ - using System; - using System.Collections.Generic; - using System.ComponentModel; - using System.IO; - using System.Linq; - using System.Text; - using System.Threading.Tasks; - using Newtonsoft.Json; - using Newtonsoft.Json.Converters; - using ThoughtSpotPublicRESTAPI.Standard; - using ThoughtSpotPublicRESTAPI.Standard.Utilities; - - /// - /// ConnectionTableColumnsResponse. - /// - public class ConnectionTableColumnsResponse - { - /// - /// Initializes a new instance of the class. - /// - public ConnectionTableColumnsResponse() - { - } - - /// - /// Initializes a new instance of the class. - /// - /// id. - /// table. - public ConnectionTableColumnsResponse( - string id = null, - List table = null) - { - this.Id = id; - this.Table = table; - } - - /// - /// Connection id - /// - [JsonProperty("id", NullValueHandling = NullValueHandling.Ignore)] - public string Id { get; set; } - - /// - /// List of table details - /// - [JsonProperty("table", NullValueHandling = NullValueHandling.Ignore)] - public List Table { get; set; } - - /// - public override string ToString() - { - var toStringOutput = new List(); - - this.ToString(toStringOutput); - - return $"ConnectionTableColumnsResponse : ({string.Join(", ", toStringOutput)})"; - } - - /// - public override bool Equals(object obj) - { - if (obj == null) - { - return false; - } - - if (obj == this) - { - return true; - } - - return obj is ConnectionTableColumnsResponse other && - ((this.Id == null && other.Id == null) || (this.Id?.Equals(other.Id) == true)) && - ((this.Table == null && other.Table == null) || (this.Table?.Equals(other.Table) == true)); - } - - - /// - /// ToString overload. - /// - /// List of strings. - protected void ToString(List toStringOutput) - { - toStringOutput.Add($"this.Id = {(this.Id == null ? "null" : this.Id == string.Empty ? "" : this.Id)}"); - toStringOutput.Add($"this.Table = {(this.Table == null ? "null" : $"[{string.Join(", ", this.Table)} ]")}"); - } - } -} \ No newline at end of file diff --git a/DotNet/ThoughtSpotPublicRESTAPI.Standard/Models/ConnectionTableResponse.cs b/DotNet/ThoughtSpotPublicRESTAPI.Standard/Models/ConnectionTableResponse.cs deleted file mode 100644 index 7d0bf5d85..000000000 --- a/DotNet/ThoughtSpotPublicRESTAPI.Standard/Models/ConnectionTableResponse.cs +++ /dev/null @@ -1,94 +0,0 @@ -// -// Copyright (c) APIMatic. All rights reserved. -// -namespace ThoughtSpotPublicRESTAPI.Standard.Models -{ - using System; - using System.Collections.Generic; - using System.ComponentModel; - using System.IO; - using System.Linq; - using System.Text; - using System.Threading.Tasks; - using Newtonsoft.Json; - using Newtonsoft.Json.Converters; - using ThoughtSpotPublicRESTAPI.Standard; - using ThoughtSpotPublicRESTAPI.Standard.Utilities; - - /// - /// ConnectionTableResponse. - /// - public class ConnectionTableResponse - { - /// - /// Initializes a new instance of the class. - /// - public ConnectionTableResponse() - { - } - - /// - /// Initializes a new instance of the class. - /// - /// id. - /// database. - public ConnectionTableResponse( - string id = null, - List database = null) - { - this.Id = id; - this.Database = database; - } - - /// - /// Connection id - /// - [JsonProperty("id", NullValueHandling = NullValueHandling.Ignore)] - public string Id { get; set; } - - /// - /// List of databases - /// - [JsonProperty("database", NullValueHandling = NullValueHandling.Ignore)] - public List Database { get; set; } - - /// - public override string ToString() - { - var toStringOutput = new List(); - - this.ToString(toStringOutput); - - return $"ConnectionTableResponse : ({string.Join(", ", toStringOutput)})"; - } - - /// - public override bool Equals(object obj) - { - if (obj == null) - { - return false; - } - - if (obj == this) - { - return true; - } - - return obj is ConnectionTableResponse other && - ((this.Id == null && other.Id == null) || (this.Id?.Equals(other.Id) == true)) && - ((this.Database == null && other.Database == null) || (this.Database?.Equals(other.Database) == true)); - } - - - /// - /// ToString overload. - /// - /// List of strings. - protected void ToString(List toStringOutput) - { - toStringOutput.Add($"this.Id = {(this.Id == null ? "null" : this.Id == string.Empty ? "" : this.Id)}"); - toStringOutput.Add($"this.Database = {(this.Database == null ? "null" : $"[{string.Join(", ", this.Database)} ]")}"); - } - } -} \ No newline at end of file diff --git a/DotNet/ThoughtSpotPublicRESTAPI.Standard/Models/ConnectionTableSchema.cs b/DotNet/ThoughtSpotPublicRESTAPI.Standard/Models/ConnectionTableSchema.cs deleted file mode 100644 index 01858ca00..000000000 --- a/DotNet/ThoughtSpotPublicRESTAPI.Standard/Models/ConnectionTableSchema.cs +++ /dev/null @@ -1,94 +0,0 @@ -// -// Copyright (c) APIMatic. All rights reserved. -// -namespace ThoughtSpotPublicRESTAPI.Standard.Models -{ - using System; - using System.Collections.Generic; - using System.ComponentModel; - using System.IO; - using System.Linq; - using System.Text; - using System.Threading.Tasks; - using Newtonsoft.Json; - using Newtonsoft.Json.Converters; - using ThoughtSpotPublicRESTAPI.Standard; - using ThoughtSpotPublicRESTAPI.Standard.Utilities; - - /// - /// ConnectionTableSchema. - /// - public class ConnectionTableSchema - { - /// - /// Initializes a new instance of the class. - /// - public ConnectionTableSchema() - { - } - - /// - /// Initializes a new instance of the class. - /// - /// name. - /// table. - public ConnectionTableSchema( - string name = null, - List table = null) - { - this.Name = name; - this.Table = table; - } - - /// - /// Name of the schema - /// - [JsonProperty("name", NullValueHandling = NullValueHandling.Ignore)] - public string Name { get; set; } - - /// - /// List of table details - /// - [JsonProperty("table", NullValueHandling = NullValueHandling.Ignore)] - public List Table { get; set; } - - /// - public override string ToString() - { - var toStringOutput = new List(); - - this.ToString(toStringOutput); - - return $"ConnectionTableSchema : ({string.Join(", ", toStringOutput)})"; - } - - /// - public override bool Equals(object obj) - { - if (obj == null) - { - return false; - } - - if (obj == this) - { - return true; - } - - return obj is ConnectionTableSchema other && - ((this.Name == null && other.Name == null) || (this.Name?.Equals(other.Name) == true)) && - ((this.Table == null && other.Table == null) || (this.Table?.Equals(other.Table) == true)); - } - - - /// - /// ToString overload. - /// - /// List of strings. - protected void ToString(List toStringOutput) - { - toStringOutput.Add($"this.Name = {(this.Name == null ? "null" : this.Name == string.Empty ? "" : this.Name)}"); - toStringOutput.Add($"this.Table = {(this.Table == null ? "null" : $"[{string.Join(", ", this.Table)} ]")}"); - } - } -} \ No newline at end of file diff --git a/DotNet/ThoughtSpotPublicRESTAPI.Standard/Models/CreateConnectionResponse.cs b/DotNet/ThoughtSpotPublicRESTAPI.Standard/Models/CreateConnectionResponse.cs deleted file mode 100644 index 71a17b8d4..000000000 --- a/DotNet/ThoughtSpotPublicRESTAPI.Standard/Models/CreateConnectionResponse.cs +++ /dev/null @@ -1,303 +0,0 @@ -// -// Copyright (c) APIMatic. All rights reserved. -// -namespace ThoughtSpotPublicRESTAPI.Standard.Models -{ - using System; - using System.Collections.Generic; - using System.ComponentModel; - using System.IO; - using System.Linq; - using System.Text; - using System.Threading.Tasks; - using Newtonsoft.Json; - using Newtonsoft.Json.Converters; - using ThoughtSpotPublicRESTAPI.Standard; - using ThoughtSpotPublicRESTAPI.Standard.Utilities; - - /// - /// CreateConnectionResponse. - /// - public class CreateConnectionResponse - { - /// - /// Initializes a new instance of the class. - /// - public CreateConnectionResponse() - { - } - - /// - /// Initializes a new instance of the class. - /// - /// name. - /// description. - /// type. - /// id. - /// scheduled. - /// connectionType. - /// configuration. - /// isExternal. - /// isDeprecated. - /// isDeleted. - /// isHidden. - /// complete. - /// indexVersion. - /// generationNum. - /// created. - /// modified. - /// author. - /// modifiedBy. - /// owner. - /// tags. - /// tables. - public CreateConnectionResponse( - string name = null, - string description = null, - string type = null, - string id = null, - bool? scheduled = null, - string connectionType = null, - string configuration = null, - bool? isExternal = null, - bool? isDeprecated = null, - bool? isDeleted = null, - bool? isHidden = null, - bool? complete = null, - double? indexVersion = null, - double? generationNum = null, - string created = null, - string modified = null, - Models.UserNameAndID author = null, - Models.UserNameAndID modifiedBy = null, - Models.UserNameAndID owner = null, - List tags = null, - List tables = null) - { - this.Name = name; - this.Description = description; - this.Type = type; - this.Id = id; - this.Scheduled = scheduled; - this.ConnectionType = connectionType; - this.Configuration = configuration; - this.IsExternal = isExternal; - this.IsDeprecated = isDeprecated; - this.IsDeleted = isDeleted; - this.IsHidden = isHidden; - this.Complete = complete; - this.IndexVersion = indexVersion; - this.GenerationNum = generationNum; - this.Created = created; - this.Modified = modified; - this.Author = author; - this.ModifiedBy = modifiedBy; - this.Owner = owner; - this.Tags = tags; - this.Tables = tables; - } - - /// - /// Name of the connection - /// - [JsonProperty("name", NullValueHandling = NullValueHandling.Ignore)] - public string Name { get; set; } - - /// - /// Description associated with the connection - /// - [JsonProperty("description", NullValueHandling = NullValueHandling.Ignore)] - public string Description { get; set; } - - /// - /// Type of the connection. The database associated with this type can be obtained from the response returned by the /tspublic/rest/v2/connection/types API endpoint. - /// - [JsonProperty("type", NullValueHandling = NullValueHandling.Ignore)] - public string Type { get; set; } - - /// - /// GUID of the connection - /// - [JsonProperty("id", NullValueHandling = NullValueHandling.Ignore)] - public string Id { get; set; } - - /// - /// Indicates if the data sync is scheduled for this connection - /// - [JsonProperty("scheduled", NullValueHandling = NullValueHandling.Ignore)] - public bool? Scheduled { get; set; } - - /// - /// Gets or sets ConnectionType. - /// - [JsonProperty("connectionType", NullValueHandling = NullValueHandling.Ignore)] - public string ConnectionType { get; set; } - - /// - /// Configuration properties of the connection - /// - [JsonProperty("configuration", NullValueHandling = NullValueHandling.Ignore)] - public string Configuration { get; set; } - - /// - /// Gets or sets IsExternal. - /// - [JsonProperty("isExternal", NullValueHandling = NullValueHandling.Ignore)] - public bool? IsExternal { get; set; } - - /// - /// Indicates if the connection is deprecated - /// - [JsonProperty("isDeprecated", NullValueHandling = NullValueHandling.Ignore)] - public bool? IsDeprecated { get; set; } - - /// - /// Indicates if the connection is deleted - /// - [JsonProperty("isDeleted", NullValueHandling = NullValueHandling.Ignore)] - public bool? IsDeleted { get; set; } - - /// - /// Indicates if the connection is hideen - /// - [JsonProperty("isHidden", NullValueHandling = NullValueHandling.Ignore)] - public bool? IsHidden { get; set; } - - /// - /// Indicates if the all the properties of connection is provided - /// - [JsonProperty("complete", NullValueHandling = NullValueHandling.Ignore)] - public bool? Complete { get; set; } - - /// - /// Gets or sets IndexVersion. - /// - [JsonProperty("indexVersion", NullValueHandling = NullValueHandling.Ignore)] - public double? IndexVersion { get; set; } - - /// - /// Gets or sets GenerationNum. - /// - [JsonProperty("generationNum", NullValueHandling = NullValueHandling.Ignore)] - public double? GenerationNum { get; set; } - - /// - /// Date and time when user account was created - /// - [JsonProperty("created", NullValueHandling = NullValueHandling.Ignore)] - public string Created { get; set; } - - /// - /// Date and time of last modification of user account - /// - [JsonProperty("modified", NullValueHandling = NullValueHandling.Ignore)] - public string Modified { get; set; } - - /// - /// Gets or sets Author. - /// - [JsonProperty("author", NullValueHandling = NullValueHandling.Ignore)] - public Models.UserNameAndID Author { get; set; } - - /// - /// Gets or sets ModifiedBy. - /// - [JsonProperty("modifiedBy", NullValueHandling = NullValueHandling.Ignore)] - public Models.UserNameAndID ModifiedBy { get; set; } - - /// - /// Gets or sets Owner. - /// - [JsonProperty("owner", NullValueHandling = NullValueHandling.Ignore)] - public Models.UserNameAndID Owner { get; set; } - - /// - /// List of tags assigned to the connection - /// - [JsonProperty("tags", NullValueHandling = NullValueHandling.Ignore)] - public List Tags { get; set; } - - /// - /// List of tables linked to this connection and details of the columns in the table - /// - [JsonProperty("tables", NullValueHandling = NullValueHandling.Ignore)] - public List Tables { get; set; } - - /// - public override string ToString() - { - var toStringOutput = new List(); - - this.ToString(toStringOutput); - - return $"CreateConnectionResponse : ({string.Join(", ", toStringOutput)})"; - } - - /// - public override bool Equals(object obj) - { - if (obj == null) - { - return false; - } - - if (obj == this) - { - return true; - } - - return obj is CreateConnectionResponse other && - ((this.Name == null && other.Name == null) || (this.Name?.Equals(other.Name) == true)) && - ((this.Description == null && other.Description == null) || (this.Description?.Equals(other.Description) == true)) && - ((this.Type == null && other.Type == null) || (this.Type?.Equals(other.Type) == true)) && - ((this.Id == null && other.Id == null) || (this.Id?.Equals(other.Id) == true)) && - ((this.Scheduled == null && other.Scheduled == null) || (this.Scheduled?.Equals(other.Scheduled) == true)) && - ((this.ConnectionType == null && other.ConnectionType == null) || (this.ConnectionType?.Equals(other.ConnectionType) == true)) && - ((this.Configuration == null && other.Configuration == null) || (this.Configuration?.Equals(other.Configuration) == true)) && - ((this.IsExternal == null && other.IsExternal == null) || (this.IsExternal?.Equals(other.IsExternal) == true)) && - ((this.IsDeprecated == null && other.IsDeprecated == null) || (this.IsDeprecated?.Equals(other.IsDeprecated) == true)) && - ((this.IsDeleted == null && other.IsDeleted == null) || (this.IsDeleted?.Equals(other.IsDeleted) == true)) && - ((this.IsHidden == null && other.IsHidden == null) || (this.IsHidden?.Equals(other.IsHidden) == true)) && - ((this.Complete == null && other.Complete == null) || (this.Complete?.Equals(other.Complete) == true)) && - ((this.IndexVersion == null && other.IndexVersion == null) || (this.IndexVersion?.Equals(other.IndexVersion) == true)) && - ((this.GenerationNum == null && other.GenerationNum == null) || (this.GenerationNum?.Equals(other.GenerationNum) == true)) && - ((this.Created == null && other.Created == null) || (this.Created?.Equals(other.Created) == true)) && - ((this.Modified == null && other.Modified == null) || (this.Modified?.Equals(other.Modified) == true)) && - ((this.Author == null && other.Author == null) || (this.Author?.Equals(other.Author) == true)) && - ((this.ModifiedBy == null && other.ModifiedBy == null) || (this.ModifiedBy?.Equals(other.ModifiedBy) == true)) && - ((this.Owner == null && other.Owner == null) || (this.Owner?.Equals(other.Owner) == true)) && - ((this.Tags == null && other.Tags == null) || (this.Tags?.Equals(other.Tags) == true)) && - ((this.Tables == null && other.Tables == null) || (this.Tables?.Equals(other.Tables) == true)); - } - - - /// - /// ToString overload. - /// - /// List of strings. - protected void ToString(List toStringOutput) - { - toStringOutput.Add($"this.Name = {(this.Name == null ? "null" : this.Name == string.Empty ? "" : this.Name)}"); - toStringOutput.Add($"this.Description = {(this.Description == null ? "null" : this.Description == string.Empty ? "" : this.Description)}"); - toStringOutput.Add($"this.Type = {(this.Type == null ? "null" : this.Type == string.Empty ? "" : this.Type)}"); - toStringOutput.Add($"this.Id = {(this.Id == null ? "null" : this.Id == string.Empty ? "" : this.Id)}"); - toStringOutput.Add($"this.Scheduled = {(this.Scheduled == null ? "null" : this.Scheduled.ToString())}"); - toStringOutput.Add($"this.ConnectionType = {(this.ConnectionType == null ? "null" : this.ConnectionType == string.Empty ? "" : this.ConnectionType)}"); - toStringOutput.Add($"this.Configuration = {(this.Configuration == null ? "null" : this.Configuration == string.Empty ? "" : this.Configuration)}"); - toStringOutput.Add($"this.IsExternal = {(this.IsExternal == null ? "null" : this.IsExternal.ToString())}"); - toStringOutput.Add($"this.IsDeprecated = {(this.IsDeprecated == null ? "null" : this.IsDeprecated.ToString())}"); - toStringOutput.Add($"this.IsDeleted = {(this.IsDeleted == null ? "null" : this.IsDeleted.ToString())}"); - toStringOutput.Add($"this.IsHidden = {(this.IsHidden == null ? "null" : this.IsHidden.ToString())}"); - toStringOutput.Add($"this.Complete = {(this.Complete == null ? "null" : this.Complete.ToString())}"); - toStringOutput.Add($"this.IndexVersion = {(this.IndexVersion == null ? "null" : this.IndexVersion.ToString())}"); - toStringOutput.Add($"this.GenerationNum = {(this.GenerationNum == null ? "null" : this.GenerationNum.ToString())}"); - toStringOutput.Add($"this.Created = {(this.Created == null ? "null" : this.Created == string.Empty ? "" : this.Created)}"); - toStringOutput.Add($"this.Modified = {(this.Modified == null ? "null" : this.Modified == string.Empty ? "" : this.Modified)}"); - toStringOutput.Add($"this.Author = {(this.Author == null ? "null" : this.Author.ToString())}"); - toStringOutput.Add($"this.ModifiedBy = {(this.ModifiedBy == null ? "null" : this.ModifiedBy.ToString())}"); - toStringOutput.Add($"this.Owner = {(this.Owner == null ? "null" : this.Owner.ToString())}"); - toStringOutput.Add($"this.Tags = {(this.Tags == null ? "null" : $"[{string.Join(", ", this.Tags)} ]")}"); - toStringOutput.Add($"this.Tables = {(this.Tables == null ? "null" : $"[{string.Join(", ", this.Tables)} ]")}"); - } - } -} \ No newline at end of file diff --git a/DotNet/ThoughtSpotPublicRESTAPI.Standard/Models/CreateTableResponse.cs b/DotNet/ThoughtSpotPublicRESTAPI.Standard/Models/CreateTableResponse.cs deleted file mode 100644 index 476ce6365..000000000 --- a/DotNet/ThoughtSpotPublicRESTAPI.Standard/Models/CreateTableResponse.cs +++ /dev/null @@ -1,94 +0,0 @@ -// -// Copyright (c) APIMatic. All rights reserved. -// -namespace ThoughtSpotPublicRESTAPI.Standard.Models -{ - using System; - using System.Collections.Generic; - using System.ComponentModel; - using System.IO; - using System.Linq; - using System.Text; - using System.Threading.Tasks; - using Newtonsoft.Json; - using Newtonsoft.Json.Converters; - using ThoughtSpotPublicRESTAPI.Standard; - using ThoughtSpotPublicRESTAPI.Standard.Utilities; - - /// - /// CreateTableResponse. - /// - public class CreateTableResponse - { - /// - /// Initializes a new instance of the class. - /// - public CreateTableResponse() - { - } - - /// - /// Initializes a new instance of the class. - /// - /// logicalTableHeader. - /// physicalTableId. - public CreateTableResponse( - Models.LogicalTableHeader logicalTableHeader = null, - string physicalTableId = null) - { - this.LogicalTableHeader = logicalTableHeader; - this.PhysicalTableId = physicalTableId; - } - - /// - /// Gets or sets LogicalTableHeader. - /// - [JsonProperty("logicalTableHeader", NullValueHandling = NullValueHandling.Ignore)] - public Models.LogicalTableHeader LogicalTableHeader { get; set; } - - /// - /// Gets or sets PhysicalTableId. - /// - [JsonProperty("physicalTableId", NullValueHandling = NullValueHandling.Ignore)] - public string PhysicalTableId { get; set; } - - /// - public override string ToString() - { - var toStringOutput = new List(); - - this.ToString(toStringOutput); - - return $"CreateTableResponse : ({string.Join(", ", toStringOutput)})"; - } - - /// - public override bool Equals(object obj) - { - if (obj == null) - { - return false; - } - - if (obj == this) - { - return true; - } - - return obj is CreateTableResponse other && - ((this.LogicalTableHeader == null && other.LogicalTableHeader == null) || (this.LogicalTableHeader?.Equals(other.LogicalTableHeader) == true)) && - ((this.PhysicalTableId == null && other.PhysicalTableId == null) || (this.PhysicalTableId?.Equals(other.PhysicalTableId) == true)); - } - - - /// - /// ToString overload. - /// - /// List of strings. - protected void ToString(List toStringOutput) - { - toStringOutput.Add($"this.LogicalTableHeader = {(this.LogicalTableHeader == null ? "null" : this.LogicalTableHeader.ToString())}"); - toStringOutput.Add($"this.PhysicalTableId = {(this.PhysicalTableId == null ? "null" : this.PhysicalTableId == string.Empty ? "" : this.PhysicalTableId)}"); - } - } -} \ No newline at end of file diff --git a/DotNet/ThoughtSpotPublicRESTAPI.Standard/Models/DependentPermission.cs b/DotNet/ThoughtSpotPublicRESTAPI.Standard/Models/DependentPermission.cs deleted file mode 100644 index e09dab623..000000000 --- a/DotNet/ThoughtSpotPublicRESTAPI.Standard/Models/DependentPermission.cs +++ /dev/null @@ -1,138 +0,0 @@ -// -// Copyright (c) APIMatic. All rights reserved. -// -namespace ThoughtSpotPublicRESTAPI.Standard.Models -{ - using System; - using System.Collections.Generic; - using System.ComponentModel; - using System.IO; - using System.Linq; - using System.Text; - using System.Threading.Tasks; - using Newtonsoft.Json; - using Newtonsoft.Json.Converters; - using ThoughtSpotPublicRESTAPI.Standard; - using ThoughtSpotPublicRESTAPI.Standard.Utilities; - - /// - /// DependentPermission. - /// - public class DependentPermission - { - /// - /// Initializes a new instance of the class. - /// - public DependentPermission() - { - } - - /// - /// Initializes a new instance of the class. - /// - /// id. - /// name. - /// type. - /// permission. - /// sharedPermission. - /// groupPermission. - public DependentPermission( - string id = null, - string name = null, - string type = null, - string permission = null, - string sharedPermission = null, - List groupPermission = null) - { - this.Id = id; - this.Name = name; - this.Type = type; - this.Permission = permission; - this.SharedPermission = sharedPermission; - this.GroupPermission = groupPermission; - } - - /// - /// GUID of the object - /// - [JsonProperty("id", NullValueHandling = NullValueHandling.Ignore)] - public string Id { get; set; } - - /// - /// Name of the object - /// - [JsonProperty("name", NullValueHandling = NullValueHandling.Ignore)] - public string Name { get; set; } - - /// - /// Indicates the type of the object - /// - [JsonProperty("type", NullValueHandling = NullValueHandling.Ignore)] - public string Type { get; set; } - - /// - /// Indicates the permission which user or user group has on the object - /// - [JsonProperty("permission", NullValueHandling = NullValueHandling.Ignore)] - public string Permission { get; set; } - - /// - /// Indicates the permission which user or user group has on the object through sharing of the object with this user or user group - /// - [JsonProperty("sharedPermission", NullValueHandling = NullValueHandling.Ignore)] - public string SharedPermission { get; set; } - - /// - /// An array of object with details of permission on the user groups to which the user or user group belongs - /// - [JsonProperty("groupPermission", NullValueHandling = NullValueHandling.Ignore)] - public List GroupPermission { get; set; } - - /// - public override string ToString() - { - var toStringOutput = new List(); - - this.ToString(toStringOutput); - - return $"DependentPermission : ({string.Join(", ", toStringOutput)})"; - } - - /// - public override bool Equals(object obj) - { - if (obj == null) - { - return false; - } - - if (obj == this) - { - return true; - } - - return obj is DependentPermission other && - ((this.Id == null && other.Id == null) || (this.Id?.Equals(other.Id) == true)) && - ((this.Name == null && other.Name == null) || (this.Name?.Equals(other.Name) == true)) && - ((this.Type == null && other.Type == null) || (this.Type?.Equals(other.Type) == true)) && - ((this.Permission == null && other.Permission == null) || (this.Permission?.Equals(other.Permission) == true)) && - ((this.SharedPermission == null && other.SharedPermission == null) || (this.SharedPermission?.Equals(other.SharedPermission) == true)) && - ((this.GroupPermission == null && other.GroupPermission == null) || (this.GroupPermission?.Equals(other.GroupPermission) == true)); - } - - - /// - /// ToString overload. - /// - /// List of strings. - protected void ToString(List toStringOutput) - { - toStringOutput.Add($"this.Id = {(this.Id == null ? "null" : this.Id == string.Empty ? "" : this.Id)}"); - toStringOutput.Add($"this.Name = {(this.Name == null ? "null" : this.Name == string.Empty ? "" : this.Name)}"); - toStringOutput.Add($"this.Type = {(this.Type == null ? "null" : this.Type == string.Empty ? "" : this.Type)}"); - toStringOutput.Add($"this.Permission = {(this.Permission == null ? "null" : this.Permission == string.Empty ? "" : this.Permission)}"); - toStringOutput.Add($"this.SharedPermission = {(this.SharedPermission == null ? "null" : this.SharedPermission == string.Empty ? "" : this.SharedPermission)}"); - toStringOutput.Add($"this.GroupPermission = {(this.GroupPermission == null ? "null" : $"[{string.Join(", ", this.GroupPermission)} ]")}"); - } - } -} \ No newline at end of file diff --git a/DotNet/ThoughtSpotPublicRESTAPI.Standard/Models/FormatType3Enum.cs b/DotNet/ThoughtSpotPublicRESTAPI.Standard/Models/FormatType3Enum.cs deleted file mode 100644 index e2dd8be66..000000000 --- a/DotNet/ThoughtSpotPublicRESTAPI.Standard/Models/FormatType3Enum.cs +++ /dev/null @@ -1,33 +0,0 @@ -// -// Copyright (c) APIMatic. All rights reserved. -// -namespace ThoughtSpotPublicRESTAPI.Standard.Models -{ - using System; - using System.Collections.Generic; - using System.Linq; - using System.Runtime.Serialization; - using Newtonsoft.Json; - using Newtonsoft.Json.Converters; - using ThoughtSpotPublicRESTAPI.Standard; - using ThoughtSpotPublicRESTAPI.Standard.Utilities; - - /// - /// FormatType3Enum. - /// - [JsonConverter(typeof(StringEnumConverter))] - public enum FormatType3Enum - { - /// - /// YAML. - /// - [EnumMember(Value = "YAML")] - YAML, - - /// - /// JSON. - /// - [EnumMember(Value = "JSON")] - JSON - } -} \ No newline at end of file diff --git a/DotNet/ThoughtSpotPublicRESTAPI.Standard/Models/FormatTypeEnum.cs b/DotNet/ThoughtSpotPublicRESTAPI.Standard/Models/FormatTypeEnum.cs deleted file mode 100644 index f839fb016..000000000 --- a/DotNet/ThoughtSpotPublicRESTAPI.Standard/Models/FormatTypeEnum.cs +++ /dev/null @@ -1,33 +0,0 @@ -// -// Copyright (c) APIMatic. All rights reserved. -// -namespace ThoughtSpotPublicRESTAPI.Standard.Models -{ - using System; - using System.Collections.Generic; - using System.Linq; - using System.Runtime.Serialization; - using Newtonsoft.Json; - using Newtonsoft.Json.Converters; - using ThoughtSpotPublicRESTAPI.Standard; - using ThoughtSpotPublicRESTAPI.Standard.Utilities; - - /// - /// FormatTypeEnum. - /// - [JsonConverter(typeof(StringEnumConverter))] - public enum FormatTypeEnum - { - /// - /// COMPACT. - /// - [EnumMember(Value = "COMPACT")] - COMPACT, - - /// - /// FULL. - /// - [EnumMember(Value = "FULL")] - FULL - } -} \ No newline at end of file diff --git a/DotNet/ThoughtSpotPublicRESTAPI.Standard/Models/FromUserNameAndIDInput.cs b/DotNet/ThoughtSpotPublicRESTAPI.Standard/Models/FromUserNameAndIDInput.cs deleted file mode 100644 index 3c5cbe451..000000000 --- a/DotNet/ThoughtSpotPublicRESTAPI.Standard/Models/FromUserNameAndIDInput.cs +++ /dev/null @@ -1,94 +0,0 @@ -// -// Copyright (c) APIMatic. All rights reserved. -// -namespace ThoughtSpotPublicRESTAPI.Standard.Models -{ - using System; - using System.Collections.Generic; - using System.ComponentModel; - using System.IO; - using System.Linq; - using System.Text; - using System.Threading.Tasks; - using Newtonsoft.Json; - using Newtonsoft.Json.Converters; - using ThoughtSpotPublicRESTAPI.Standard; - using ThoughtSpotPublicRESTAPI.Standard.Utilities; - - /// - /// FromUserNameAndIDInput. - /// - public class FromUserNameAndIDInput - { - /// - /// Initializes a new instance of the class. - /// - public FromUserNameAndIDInput() - { - } - - /// - /// Initializes a new instance of the class. - /// - /// name. - /// id. - public FromUserNameAndIDInput( - string name = null, - string id = null) - { - this.Name = name; - this.Id = id; - } - - /// - /// Username of the user - /// - [JsonProperty("name", NullValueHandling = NullValueHandling.Ignore)] - public string Name { get; set; } - - /// - /// GUID of the user - /// - [JsonProperty("id", NullValueHandling = NullValueHandling.Ignore)] - public string Id { get; set; } - - /// - public override string ToString() - { - var toStringOutput = new List(); - - this.ToString(toStringOutput); - - return $"FromUserNameAndIDInput : ({string.Join(", ", toStringOutput)})"; - } - - /// - public override bool Equals(object obj) - { - if (obj == null) - { - return false; - } - - if (obj == this) - { - return true; - } - - return obj is FromUserNameAndIDInput other && - ((this.Name == null && other.Name == null) || (this.Name?.Equals(other.Name) == true)) && - ((this.Id == null && other.Id == null) || (this.Id?.Equals(other.Id) == true)); - } - - - /// - /// ToString overload. - /// - /// List of strings. - protected void ToString(List toStringOutput) - { - toStringOutput.Add($"this.Name = {(this.Name == null ? "null" : this.Name == string.Empty ? "" : this.Name)}"); - toStringOutput.Add($"this.Id = {(this.Id == null ? "null" : this.Id == string.Empty ? "" : this.Id)}"); - } - } -} \ No newline at end of file diff --git a/DotNet/ThoughtSpotPublicRESTAPI.Standard/Models/GroupNameAndID.cs b/DotNet/ThoughtSpotPublicRESTAPI.Standard/Models/GroupNameAndID.cs deleted file mode 100644 index ee230a4ce..000000000 --- a/DotNet/ThoughtSpotPublicRESTAPI.Standard/Models/GroupNameAndID.cs +++ /dev/null @@ -1,94 +0,0 @@ -// -// Copyright (c) APIMatic. All rights reserved. -// -namespace ThoughtSpotPublicRESTAPI.Standard.Models -{ - using System; - using System.Collections.Generic; - using System.ComponentModel; - using System.IO; - using System.Linq; - using System.Text; - using System.Threading.Tasks; - using Newtonsoft.Json; - using Newtonsoft.Json.Converters; - using ThoughtSpotPublicRESTAPI.Standard; - using ThoughtSpotPublicRESTAPI.Standard.Utilities; - - /// - /// GroupNameAndID. - /// - public class GroupNameAndID - { - /// - /// Initializes a new instance of the class. - /// - public GroupNameAndID() - { - } - - /// - /// Initializes a new instance of the class. - /// - /// name. - /// id. - public GroupNameAndID( - string name = null, - string id = null) - { - this.Name = name; - this.Id = id; - } - - /// - /// Name of the group - /// - [JsonProperty("name", NullValueHandling = NullValueHandling.Ignore)] - public string Name { get; set; } - - /// - /// GUID of the group - /// - [JsonProperty("id", NullValueHandling = NullValueHandling.Ignore)] - public string Id { get; set; } - - /// - public override string ToString() - { - var toStringOutput = new List(); - - this.ToString(toStringOutput); - - return $"GroupNameAndID : ({string.Join(", ", toStringOutput)})"; - } - - /// - public override bool Equals(object obj) - { - if (obj == null) - { - return false; - } - - if (obj == this) - { - return true; - } - - return obj is GroupNameAndID other && - ((this.Name == null && other.Name == null) || (this.Name?.Equals(other.Name) == true)) && - ((this.Id == null && other.Id == null) || (this.Id?.Equals(other.Id) == true)); - } - - - /// - /// ToString overload. - /// - /// List of strings. - protected void ToString(List toStringOutput) - { - toStringOutput.Add($"this.Name = {(this.Name == null ? "null" : this.Name == string.Empty ? "" : this.Name)}"); - toStringOutput.Add($"this.Id = {(this.Id == null ? "null" : this.Id == string.Empty ? "" : this.Id)}"); - } - } -} \ No newline at end of file diff --git a/DotNet/ThoughtSpotPublicRESTAPI.Standard/Models/GroupNameAndIDInput.cs b/DotNet/ThoughtSpotPublicRESTAPI.Standard/Models/GroupNameAndIDInput.cs deleted file mode 100644 index ea979eaff..000000000 --- a/DotNet/ThoughtSpotPublicRESTAPI.Standard/Models/GroupNameAndIDInput.cs +++ /dev/null @@ -1,94 +0,0 @@ -// -// Copyright (c) APIMatic. All rights reserved. -// -namespace ThoughtSpotPublicRESTAPI.Standard.Models -{ - using System; - using System.Collections.Generic; - using System.ComponentModel; - using System.IO; - using System.Linq; - using System.Text; - using System.Threading.Tasks; - using Newtonsoft.Json; - using Newtonsoft.Json.Converters; - using ThoughtSpotPublicRESTAPI.Standard; - using ThoughtSpotPublicRESTAPI.Standard.Utilities; - - /// - /// GroupNameAndIDInput. - /// - public class GroupNameAndIDInput - { - /// - /// Initializes a new instance of the class. - /// - public GroupNameAndIDInput() - { - } - - /// - /// Initializes a new instance of the class. - /// - /// name. - /// id. - public GroupNameAndIDInput( - string name = null, - string id = null) - { - this.Name = name; - this.Id = id; - } - - /// - /// Name of the group - /// - [JsonProperty("name", NullValueHandling = NullValueHandling.Ignore)] - public string Name { get; set; } - - /// - /// GUID of the group - /// - [JsonProperty("id", NullValueHandling = NullValueHandling.Ignore)] - public string Id { get; set; } - - /// - public override string ToString() - { - var toStringOutput = new List(); - - this.ToString(toStringOutput); - - return $"GroupNameAndIDInput : ({string.Join(", ", toStringOutput)})"; - } - - /// - public override bool Equals(object obj) - { - if (obj == null) - { - return false; - } - - if (obj == this) - { - return true; - } - - return obj is GroupNameAndIDInput other && - ((this.Name == null && other.Name == null) || (this.Name?.Equals(other.Name) == true)) && - ((this.Id == null && other.Id == null) || (this.Id?.Equals(other.Id) == true)); - } - - - /// - /// ToString overload. - /// - /// List of strings. - protected void ToString(List toStringOutput) - { - toStringOutput.Add($"this.Name = {(this.Name == null ? "null" : this.Name == string.Empty ? "" : this.Name)}"); - toStringOutput.Add($"this.Id = {(this.Id == null ? "null" : this.Id == string.Empty ? "" : this.Id)}"); - } - } -} \ No newline at end of file diff --git a/DotNet/ThoughtSpotPublicRESTAPI.Standard/Models/GroupPermission.cs b/DotNet/ThoughtSpotPublicRESTAPI.Standard/Models/GroupPermission.cs deleted file mode 100644 index 7c2db0047..000000000 --- a/DotNet/ThoughtSpotPublicRESTAPI.Standard/Models/GroupPermission.cs +++ /dev/null @@ -1,105 +0,0 @@ -// -// Copyright (c) APIMatic. All rights reserved. -// -namespace ThoughtSpotPublicRESTAPI.Standard.Models -{ - using System; - using System.Collections.Generic; - using System.ComponentModel; - using System.IO; - using System.Linq; - using System.Text; - using System.Threading.Tasks; - using Newtonsoft.Json; - using Newtonsoft.Json.Converters; - using ThoughtSpotPublicRESTAPI.Standard; - using ThoughtSpotPublicRESTAPI.Standard.Utilities; - - /// - /// GroupPermission. - /// - public class GroupPermission - { - /// - /// Initializes a new instance of the class. - /// - public GroupPermission() - { - } - - /// - /// Initializes a new instance of the class. - /// - /// id. - /// name. - /// permission. - public GroupPermission( - string id = null, - string name = null, - string permission = null) - { - this.Id = id; - this.Name = name; - this.Permission = permission; - } - - /// - /// GUID of the user group - /// - [JsonProperty("id", NullValueHandling = NullValueHandling.Ignore)] - public string Id { get; set; } - - /// - /// Name of the user group - /// - [JsonProperty("name", NullValueHandling = NullValueHandling.Ignore)] - public string Name { get; set; } - - /// - /// Indicates the permission which user group has on the object - /// - [JsonProperty("permission", NullValueHandling = NullValueHandling.Ignore)] - public string Permission { get; set; } - - /// - public override string ToString() - { - var toStringOutput = new List(); - - this.ToString(toStringOutput); - - return $"GroupPermission : ({string.Join(", ", toStringOutput)})"; - } - - /// - public override bool Equals(object obj) - { - if (obj == null) - { - return false; - } - - if (obj == this) - { - return true; - } - - return obj is GroupPermission other && - ((this.Id == null && other.Id == null) || (this.Id?.Equals(other.Id) == true)) && - ((this.Name == null && other.Name == null) || (this.Name?.Equals(other.Name) == true)) && - ((this.Permission == null && other.Permission == null) || (this.Permission?.Equals(other.Permission) == true)); - } - - - /// - /// ToString overload. - /// - /// List of strings. - protected void ToString(List toStringOutput) - { - toStringOutput.Add($"this.Id = {(this.Id == null ? "null" : this.Id == string.Empty ? "" : this.Id)}"); - toStringOutput.Add($"this.Name = {(this.Name == null ? "null" : this.Name == string.Empty ? "" : this.Name)}"); - toStringOutput.Add($"this.Permission = {(this.Permission == null ? "null" : this.Permission == string.Empty ? "" : this.Permission)}"); - } - } -} \ No newline at end of file diff --git a/DotNet/ThoughtSpotPublicRESTAPI.Standard/Models/GroupResponse.cs b/DotNet/ThoughtSpotPublicRESTAPI.Standard/Models/GroupResponse.cs deleted file mode 100644 index 4083fdee5..000000000 --- a/DotNet/ThoughtSpotPublicRESTAPI.Standard/Models/GroupResponse.cs +++ /dev/null @@ -1,402 +0,0 @@ -// -// Copyright (c) APIMatic. All rights reserved. -// -namespace ThoughtSpotPublicRESTAPI.Standard.Models -{ - using System; - using System.Collections.Generic; - using System.ComponentModel; - using System.IO; - using System.Linq; - using System.Text; - using System.Threading.Tasks; - using Newtonsoft.Json; - using Newtonsoft.Json.Converters; - using ThoughtSpotPublicRESTAPI.Standard; - using ThoughtSpotPublicRESTAPI.Standard.Utilities; - - /// - /// GroupResponse. - /// - public class GroupResponse - { - /// - /// Initializes a new instance of the class. - /// - public GroupResponse() - { - } - - /// - /// Initializes a new instance of the class. - /// - /// name. - /// displayName. - /// id. - /// visibility. - /// description. - /// privileges. - /// orgs. - /// groups. - /// users. - /// assignedLiveboards. - /// userGroupContent. - /// tags. - /// isDeleted. - /// isHidden. - /// isExternal. - /// isDeprecated. - /// complete. - /// isSystemPrincipal. - /// type. - /// parenttype. - /// groupIdx. - /// metadataVersion. - /// tenantId. - /// indexVersion. - /// generationNum. - /// created. - /// modified. - /// author. - /// modifiedBy. - /// owner. - public GroupResponse( - string name = null, - string displayName = null, - string id = null, - string visibility = null, - string description = null, - List privileges = null, - List orgs = null, - List groups = null, - List users = null, - List assignedLiveboards = null, - object userGroupContent = null, - List tags = null, - bool? isDeleted = null, - bool? isHidden = null, - bool? isExternal = null, - bool? isDeprecated = null, - bool? complete = null, - bool? isSystemPrincipal = null, - string type = null, - string parenttype = null, - int? groupIdx = null, - int? metadataVersion = null, - string tenantId = null, - double? indexVersion = null, - double? generationNum = null, - double? created = null, - double? modified = null, - Models.UserNameAndID author = null, - Models.UserNameAndID modifiedBy = null, - Models.UserNameAndID owner = null) - { - this.Name = name; - this.DisplayName = displayName; - this.Id = id; - this.Visibility = visibility; - this.Description = description; - this.Privileges = privileges; - this.Orgs = orgs; - this.Groups = groups; - this.Users = users; - this.AssignedLiveboards = assignedLiveboards; - this.UserGroupContent = userGroupContent; - this.Tags = tags; - this.IsDeleted = isDeleted; - this.IsHidden = isHidden; - this.IsExternal = isExternal; - this.IsDeprecated = isDeprecated; - this.Complete = complete; - this.IsSystemPrincipal = isSystemPrincipal; - this.Type = type; - this.Parenttype = parenttype; - this.GroupIdx = groupIdx; - this.MetadataVersion = metadataVersion; - this.TenantId = tenantId; - this.IndexVersion = indexVersion; - this.GenerationNum = generationNum; - this.Created = created; - this.Modified = modified; - this.Author = author; - this.ModifiedBy = modifiedBy; - this.Owner = owner; - } - - /// - /// Name of the group - /// - [JsonProperty("name", NullValueHandling = NullValueHandling.Ignore)] - public string Name { get; set; } - - /// - /// A unique display name string for the user group - /// - [JsonProperty("displayName", NullValueHandling = NullValueHandling.Ignore)] - public string DisplayName { get; set; } - - /// - /// GUID of the group - /// - [JsonProperty("id", NullValueHandling = NullValueHandling.Ignore)] - public string Id { get; set; } - - /// - /// Visibility of the group - /// - [JsonProperty("visibility", NullValueHandling = NullValueHandling.Ignore)] - public string Visibility { get; set; } - - /// - /// Description of the group - /// - [JsonProperty("description", NullValueHandling = NullValueHandling.Ignore)] - public string Description { get; set; } - - /// - /// Privileges assigned to the group - /// - [JsonProperty("privileges", NullValueHandling = NullValueHandling.Ignore)] - public List Privileges { get; set; } - - /// - /// The organizations that user belongs to - /// - [JsonProperty("orgs", NullValueHandling = NullValueHandling.Ignore)] - public List Orgs { get; set; } - - /// - /// Name of the group to which is added - /// - [JsonProperty("groups", NullValueHandling = NullValueHandling.Ignore)] - public List Groups { get; set; } - - /// - /// User Group Information by Id or Name. - /// - [JsonProperty("users", NullValueHandling = NullValueHandling.Ignore)] - public List Users { get; set; } - - /// - /// Liveboards assigned to the group - /// - [JsonProperty("assignedLiveboards", NullValueHandling = NullValueHandling.Ignore)] - public List AssignedLiveboards { get; set; } - - /// - /// Gets or sets UserGroupContent. - /// - [JsonProperty("userGroupContent", NullValueHandling = NullValueHandling.Ignore)] - public object UserGroupContent { get; set; } - - /// - /// Tags assigned to the group - /// - [JsonProperty("tags", NullValueHandling = NullValueHandling.Ignore)] - public List Tags { get; set; } - - /// - /// Indicates if the group is deleted - /// - [JsonProperty("isDeleted", NullValueHandling = NullValueHandling.Ignore)] - public bool? IsDeleted { get; set; } - - /// - /// Indicates if the group is hidden - /// - [JsonProperty("isHidden", NullValueHandling = NullValueHandling.Ignore)] - public bool? IsHidden { get; set; } - - /// - /// Indicates if the group is from external system - /// - [JsonProperty("isExternal", NullValueHandling = NullValueHandling.Ignore)] - public bool? IsExternal { get; set; } - - /// - /// Gets or sets IsDeprecated. - /// - [JsonProperty("isDeprecated", NullValueHandling = NullValueHandling.Ignore)] - public bool? IsDeprecated { get; set; } - - /// - /// Indicates if the all the properties of group is provided - /// - [JsonProperty("complete", NullValueHandling = NullValueHandling.Ignore)] - public bool? Complete { get; set; } - - /// - /// Indicates if the group is system principal - /// - [JsonProperty("isSystemPrincipal", NullValueHandling = NullValueHandling.Ignore)] - public bool? IsSystemPrincipal { get; set; } - - /// - /// Indicates the type of group - /// - [JsonProperty("type", NullValueHandling = NullValueHandling.Ignore)] - public string Type { get; set; } - - /// - /// Indicates the type of parent object - /// - [JsonProperty("parenttype", NullValueHandling = NullValueHandling.Ignore)] - public string Parenttype { get; set; } - - /// - /// Gets or sets GroupIdx. - /// - [JsonProperty("groupIdx", NullValueHandling = NullValueHandling.Ignore)] - public int? GroupIdx { get; set; } - - /// - /// Gets or sets MetadataVersion. - /// - [JsonProperty("metadataVersion", NullValueHandling = NullValueHandling.Ignore)] - public int? MetadataVersion { get; set; } - - /// - /// Tenant id associated with the group - /// - [JsonProperty("tenantId", NullValueHandling = NullValueHandling.Ignore)] - public string TenantId { get; set; } - - /// - /// Gets or sets IndexVersion. - /// - [JsonProperty("indexVersion", NullValueHandling = NullValueHandling.Ignore)] - public double? IndexVersion { get; set; } - - /// - /// Gets or sets GenerationNum. - /// - [JsonProperty("generationNum", NullValueHandling = NullValueHandling.Ignore)] - public double? GenerationNum { get; set; } - - /// - /// Date and time when group was created - /// - [JsonProperty("created", NullValueHandling = NullValueHandling.Ignore)] - public double? Created { get; set; } - - /// - /// Date and time of last modification of the group - /// - [JsonProperty("modified", NullValueHandling = NullValueHandling.Ignore)] - public double? Modified { get; set; } - - /// - /// Gets or sets Author. - /// - [JsonProperty("author", NullValueHandling = NullValueHandling.Ignore)] - public Models.UserNameAndID Author { get; set; } - - /// - /// Gets or sets ModifiedBy. - /// - [JsonProperty("modifiedBy", NullValueHandling = NullValueHandling.Ignore)] - public Models.UserNameAndID ModifiedBy { get; set; } - - /// - /// Gets or sets Owner. - /// - [JsonProperty("owner", NullValueHandling = NullValueHandling.Ignore)] - public Models.UserNameAndID Owner { get; set; } - - /// - public override string ToString() - { - var toStringOutput = new List(); - - this.ToString(toStringOutput); - - return $"GroupResponse : ({string.Join(", ", toStringOutput)})"; - } - - /// - public override bool Equals(object obj) - { - if (obj == null) - { - return false; - } - - if (obj == this) - { - return true; - } - - return obj is GroupResponse other && - ((this.Name == null && other.Name == null) || (this.Name?.Equals(other.Name) == true)) && - ((this.DisplayName == null && other.DisplayName == null) || (this.DisplayName?.Equals(other.DisplayName) == true)) && - ((this.Id == null && other.Id == null) || (this.Id?.Equals(other.Id) == true)) && - ((this.Visibility == null && other.Visibility == null) || (this.Visibility?.Equals(other.Visibility) == true)) && - ((this.Description == null && other.Description == null) || (this.Description?.Equals(other.Description) == true)) && - ((this.Privileges == null && other.Privileges == null) || (this.Privileges?.Equals(other.Privileges) == true)) && - ((this.Orgs == null && other.Orgs == null) || (this.Orgs?.Equals(other.Orgs) == true)) && - ((this.Groups == null && other.Groups == null) || (this.Groups?.Equals(other.Groups) == true)) && - ((this.Users == null && other.Users == null) || (this.Users?.Equals(other.Users) == true)) && - ((this.AssignedLiveboards == null && other.AssignedLiveboards == null) || (this.AssignedLiveboards?.Equals(other.AssignedLiveboards) == true)) && - ((this.UserGroupContent == null && other.UserGroupContent == null) || (this.UserGroupContent?.Equals(other.UserGroupContent) == true)) && - ((this.Tags == null && other.Tags == null) || (this.Tags?.Equals(other.Tags) == true)) && - ((this.IsDeleted == null && other.IsDeleted == null) || (this.IsDeleted?.Equals(other.IsDeleted) == true)) && - ((this.IsHidden == null && other.IsHidden == null) || (this.IsHidden?.Equals(other.IsHidden) == true)) && - ((this.IsExternal == null && other.IsExternal == null) || (this.IsExternal?.Equals(other.IsExternal) == true)) && - ((this.IsDeprecated == null && other.IsDeprecated == null) || (this.IsDeprecated?.Equals(other.IsDeprecated) == true)) && - ((this.Complete == null && other.Complete == null) || (this.Complete?.Equals(other.Complete) == true)) && - ((this.IsSystemPrincipal == null && other.IsSystemPrincipal == null) || (this.IsSystemPrincipal?.Equals(other.IsSystemPrincipal) == true)) && - ((this.Type == null && other.Type == null) || (this.Type?.Equals(other.Type) == true)) && - ((this.Parenttype == null && other.Parenttype == null) || (this.Parenttype?.Equals(other.Parenttype) == true)) && - ((this.GroupIdx == null && other.GroupIdx == null) || (this.GroupIdx?.Equals(other.GroupIdx) == true)) && - ((this.MetadataVersion == null && other.MetadataVersion == null) || (this.MetadataVersion?.Equals(other.MetadataVersion) == true)) && - ((this.TenantId == null && other.TenantId == null) || (this.TenantId?.Equals(other.TenantId) == true)) && - ((this.IndexVersion == null && other.IndexVersion == null) || (this.IndexVersion?.Equals(other.IndexVersion) == true)) && - ((this.GenerationNum == null && other.GenerationNum == null) || (this.GenerationNum?.Equals(other.GenerationNum) == true)) && - ((this.Created == null && other.Created == null) || (this.Created?.Equals(other.Created) == true)) && - ((this.Modified == null && other.Modified == null) || (this.Modified?.Equals(other.Modified) == true)) && - ((this.Author == null && other.Author == null) || (this.Author?.Equals(other.Author) == true)) && - ((this.ModifiedBy == null && other.ModifiedBy == null) || (this.ModifiedBy?.Equals(other.ModifiedBy) == true)) && - ((this.Owner == null && other.Owner == null) || (this.Owner?.Equals(other.Owner) == true)); - } - - - /// - /// ToString overload. - /// - /// List of strings. - protected void ToString(List toStringOutput) - { - toStringOutput.Add($"this.Name = {(this.Name == null ? "null" : this.Name == string.Empty ? "" : this.Name)}"); - toStringOutput.Add($"this.DisplayName = {(this.DisplayName == null ? "null" : this.DisplayName == string.Empty ? "" : this.DisplayName)}"); - toStringOutput.Add($"this.Id = {(this.Id == null ? "null" : this.Id == string.Empty ? "" : this.Id)}"); - toStringOutput.Add($"this.Visibility = {(this.Visibility == null ? "null" : this.Visibility == string.Empty ? "" : this.Visibility)}"); - toStringOutput.Add($"this.Description = {(this.Description == null ? "null" : this.Description == string.Empty ? "" : this.Description)}"); - toStringOutput.Add($"this.Privileges = {(this.Privileges == null ? "null" : $"[{string.Join(", ", this.Privileges)} ]")}"); - toStringOutput.Add($"this.Orgs = {(this.Orgs == null ? "null" : $"[{string.Join(", ", this.Orgs)} ]")}"); - toStringOutput.Add($"this.Groups = {(this.Groups == null ? "null" : $"[{string.Join(", ", this.Groups)} ]")}"); - toStringOutput.Add($"this.Users = {(this.Users == null ? "null" : $"[{string.Join(", ", this.Users)} ]")}"); - toStringOutput.Add($"this.AssignedLiveboards = {(this.AssignedLiveboards == null ? "null" : $"[{string.Join(", ", this.AssignedLiveboards)} ]")}"); - toStringOutput.Add($"UserGroupContent = {(this.UserGroupContent == null ? "null" : this.UserGroupContent.ToString())}"); - toStringOutput.Add($"this.Tags = {(this.Tags == null ? "null" : $"[{string.Join(", ", this.Tags)} ]")}"); - toStringOutput.Add($"this.IsDeleted = {(this.IsDeleted == null ? "null" : this.IsDeleted.ToString())}"); - toStringOutput.Add($"this.IsHidden = {(this.IsHidden == null ? "null" : this.IsHidden.ToString())}"); - toStringOutput.Add($"this.IsExternal = {(this.IsExternal == null ? "null" : this.IsExternal.ToString())}"); - toStringOutput.Add($"this.IsDeprecated = {(this.IsDeprecated == null ? "null" : this.IsDeprecated.ToString())}"); - toStringOutput.Add($"this.Complete = {(this.Complete == null ? "null" : this.Complete.ToString())}"); - toStringOutput.Add($"this.IsSystemPrincipal = {(this.IsSystemPrincipal == null ? "null" : this.IsSystemPrincipal.ToString())}"); - toStringOutput.Add($"this.Type = {(this.Type == null ? "null" : this.Type == string.Empty ? "" : this.Type)}"); - toStringOutput.Add($"this.Parenttype = {(this.Parenttype == null ? "null" : this.Parenttype == string.Empty ? "" : this.Parenttype)}"); - toStringOutput.Add($"this.GroupIdx = {(this.GroupIdx == null ? "null" : this.GroupIdx.ToString())}"); - toStringOutput.Add($"this.MetadataVersion = {(this.MetadataVersion == null ? "null" : this.MetadataVersion.ToString())}"); - toStringOutput.Add($"this.TenantId = {(this.TenantId == null ? "null" : this.TenantId == string.Empty ? "" : this.TenantId)}"); - toStringOutput.Add($"this.IndexVersion = {(this.IndexVersion == null ? "null" : this.IndexVersion.ToString())}"); - toStringOutput.Add($"this.GenerationNum = {(this.GenerationNum == null ? "null" : this.GenerationNum.ToString())}"); - toStringOutput.Add($"this.Created = {(this.Created == null ? "null" : this.Created.ToString())}"); - toStringOutput.Add($"this.Modified = {(this.Modified == null ? "null" : this.Modified.ToString())}"); - toStringOutput.Add($"this.Author = {(this.Author == null ? "null" : this.Author.ToString())}"); - toStringOutput.Add($"this.ModifiedBy = {(this.ModifiedBy == null ? "null" : this.ModifiedBy.ToString())}"); - toStringOutput.Add($"this.Owner = {(this.Owner == null ? "null" : this.Owner.ToString())}"); - } - } -} \ No newline at end of file diff --git a/DotNet/ThoughtSpotPublicRESTAPI.Standard/Models/HomeLiveboardResponse.cs b/DotNet/ThoughtSpotPublicRESTAPI.Standard/Models/HomeLiveboardResponse.cs deleted file mode 100644 index 190c46629..000000000 --- a/DotNet/ThoughtSpotPublicRESTAPI.Standard/Models/HomeLiveboardResponse.cs +++ /dev/null @@ -1,116 +0,0 @@ -// -// Copyright (c) APIMatic. All rights reserved. -// -namespace ThoughtSpotPublicRESTAPI.Standard.Models -{ - using System; - using System.Collections.Generic; - using System.ComponentModel; - using System.IO; - using System.Linq; - using System.Text; - using System.Threading.Tasks; - using Newtonsoft.Json; - using Newtonsoft.Json.Converters; - using ThoughtSpotPublicRESTAPI.Standard; - using ThoughtSpotPublicRESTAPI.Standard.Utilities; - - /// - /// HomeLiveboardResponse. - /// - public class HomeLiveboardResponse - { - /// - /// Initializes a new instance of the class. - /// - public HomeLiveboardResponse() - { - } - - /// - /// Initializes a new instance of the class. - /// - /// userName. - /// userId. - /// liveboardName. - /// liveboardId. - public HomeLiveboardResponse( - string userName = null, - string userId = null, - string liveboardName = null, - string liveboardId = null) - { - this.UserName = userName; - this.UserId = userId; - this.LiveboardName = liveboardName; - this.LiveboardId = liveboardId; - } - - /// - /// Name of the user - /// - [JsonProperty("userName", NullValueHandling = NullValueHandling.Ignore)] - public string UserName { get; set; } - - /// - /// The GUID of the user - /// - [JsonProperty("userId", NullValueHandling = NullValueHandling.Ignore)] - public string UserId { get; set; } - - /// - /// Name of the liveboard - /// - [JsonProperty("liveboardName", NullValueHandling = NullValueHandling.Ignore)] - public string LiveboardName { get; set; } - - /// - /// The GUID of the liveboard - /// - [JsonProperty("liveboardId", NullValueHandling = NullValueHandling.Ignore)] - public string LiveboardId { get; set; } - - /// - public override string ToString() - { - var toStringOutput = new List(); - - this.ToString(toStringOutput); - - return $"HomeLiveboardResponse : ({string.Join(", ", toStringOutput)})"; - } - - /// - public override bool Equals(object obj) - { - if (obj == null) - { - return false; - } - - if (obj == this) - { - return true; - } - - return obj is HomeLiveboardResponse other && - ((this.UserName == null && other.UserName == null) || (this.UserName?.Equals(other.UserName) == true)) && - ((this.UserId == null && other.UserId == null) || (this.UserId?.Equals(other.UserId) == true)) && - ((this.LiveboardName == null && other.LiveboardName == null) || (this.LiveboardName?.Equals(other.LiveboardName) == true)) && - ((this.LiveboardId == null && other.LiveboardId == null) || (this.LiveboardId?.Equals(other.LiveboardId) == true)); - } - - - /// - /// ToString overload. - /// - /// List of strings. - protected void ToString(List toStringOutput) - { - toStringOutput.Add($"this.UserName = {(this.UserName == null ? "null" : this.UserName == string.Empty ? "" : this.UserName)}"); - toStringOutput.Add($"this.UserId = {(this.UserId == null ? "null" : this.UserId == string.Empty ? "" : this.UserId)}"); - toStringOutput.Add($"this.LiveboardName = {(this.LiveboardName == null ? "null" : this.LiveboardName == string.Empty ? "" : this.LiveboardName)}"); - toStringOutput.Add($"this.LiveboardId = {(this.LiveboardId == null ? "null" : this.LiveboardId == string.Empty ? "" : this.LiveboardId)}"); - } - } -} \ No newline at end of file diff --git a/DotNet/ThoughtSpotPublicRESTAPI.Standard/Models/ImportPolicyEnum.cs b/DotNet/ThoughtSpotPublicRESTAPI.Standard/Models/ImportPolicyEnum.cs deleted file mode 100644 index 3e4de669d..000000000 --- a/DotNet/ThoughtSpotPublicRESTAPI.Standard/Models/ImportPolicyEnum.cs +++ /dev/null @@ -1,39 +0,0 @@ -// -// Copyright (c) APIMatic. All rights reserved. -// -namespace ThoughtSpotPublicRESTAPI.Standard.Models -{ - using System; - using System.Collections.Generic; - using System.Linq; - using System.Runtime.Serialization; - using Newtonsoft.Json; - using Newtonsoft.Json.Converters; - using ThoughtSpotPublicRESTAPI.Standard; - using ThoughtSpotPublicRESTAPI.Standard.Utilities; - - /// - /// ImportPolicyEnum. - /// - [JsonConverter(typeof(StringEnumConverter))] - public enum ImportPolicyEnum - { - /// - /// PARTIAL. - /// - [EnumMember(Value = "PARTIAL")] - PARTIAL, - - /// - /// ALLORNONE. - /// - [EnumMember(Value = "ALL_OR_NONE")] - ALLORNONE, - - /// - /// VALIDATEONLY. - /// - [EnumMember(Value = "VALIDATE_ONLY")] - VALIDATEONLY - } -} \ No newline at end of file diff --git a/DotNet/ThoughtSpotPublicRESTAPI.Standard/Models/LiveboardNameAndID.cs b/DotNet/ThoughtSpotPublicRESTAPI.Standard/Models/LiveboardNameAndID.cs deleted file mode 100644 index a90ffa80c..000000000 --- a/DotNet/ThoughtSpotPublicRESTAPI.Standard/Models/LiveboardNameAndID.cs +++ /dev/null @@ -1,94 +0,0 @@ -// -// Copyright (c) APIMatic. All rights reserved. -// -namespace ThoughtSpotPublicRESTAPI.Standard.Models -{ - using System; - using System.Collections.Generic; - using System.ComponentModel; - using System.IO; - using System.Linq; - using System.Text; - using System.Threading.Tasks; - using Newtonsoft.Json; - using Newtonsoft.Json.Converters; - using ThoughtSpotPublicRESTAPI.Standard; - using ThoughtSpotPublicRESTAPI.Standard.Utilities; - - /// - /// LiveboardNameAndID. - /// - public class LiveboardNameAndID - { - /// - /// Initializes a new instance of the class. - /// - public LiveboardNameAndID() - { - } - - /// - /// Initializes a new instance of the class. - /// - /// name. - /// id. - public LiveboardNameAndID( - string name = null, - string id = null) - { - this.Name = name; - this.Id = id; - } - - /// - /// Name of the liveboard - /// - [JsonProperty("name", NullValueHandling = NullValueHandling.Ignore)] - public string Name { get; set; } - - /// - /// GUID of the liveboard - /// - [JsonProperty("id", NullValueHandling = NullValueHandling.Ignore)] - public string Id { get; set; } - - /// - public override string ToString() - { - var toStringOutput = new List(); - - this.ToString(toStringOutput); - - return $"LiveboardNameAndID : ({string.Join(", ", toStringOutput)})"; - } - - /// - public override bool Equals(object obj) - { - if (obj == null) - { - return false; - } - - if (obj == this) - { - return true; - } - - return obj is LiveboardNameAndID other && - ((this.Name == null && other.Name == null) || (this.Name?.Equals(other.Name) == true)) && - ((this.Id == null && other.Id == null) || (this.Id?.Equals(other.Id) == true)); - } - - - /// - /// ToString overload. - /// - /// List of strings. - protected void ToString(List toStringOutput) - { - toStringOutput.Add($"this.Name = {(this.Name == null ? "null" : this.Name == string.Empty ? "" : this.Name)}"); - toStringOutput.Add($"this.Id = {(this.Id == null ? "null" : this.Id == string.Empty ? "" : this.Id)}"); - } - } -} \ No newline at end of file diff --git a/DotNet/ThoughtSpotPublicRESTAPI.Standard/Models/LiveboardQueryResponse.cs b/DotNet/ThoughtSpotPublicRESTAPI.Standard/Models/LiveboardQueryResponse.cs deleted file mode 100644 index d940b4e2b..000000000 --- a/DotNet/ThoughtSpotPublicRESTAPI.Standard/Models/LiveboardQueryResponse.cs +++ /dev/null @@ -1,105 +0,0 @@ -// -// Copyright (c) APIMatic. All rights reserved. -// -namespace ThoughtSpotPublicRESTAPI.Standard.Models -{ - using System; - using System.Collections.Generic; - using System.ComponentModel; - using System.IO; - using System.Linq; - using System.Text; - using System.Threading.Tasks; - using Newtonsoft.Json; - using Newtonsoft.Json.Converters; - using ThoughtSpotPublicRESTAPI.Standard; - using ThoughtSpotPublicRESTAPI.Standard.Utilities; - - /// - /// LiveboardQueryResponse. - /// - public class LiveboardQueryResponse - { - /// - /// Initializes a new instance of the class. - /// - public LiveboardQueryResponse() - { - } - - /// - /// Initializes a new instance of the class. - /// - /// name. - /// id. - /// viz. - public LiveboardQueryResponse( - string name = null, - string id = null, - List viz = null) - { - this.Name = name; - this.Id = id; - this.Viz = viz; - } - - /// - /// The name of the Liveboard - /// - [JsonProperty("name", NullValueHandling = NullValueHandling.Ignore)] - public string Name { get; set; } - - /// - /// The GUID of the Liveboard - /// - [JsonProperty("id", NullValueHandling = NullValueHandling.Ignore)] - public string Id { get; set; } - - /// - /// SQL query associated with the saved Answer - /// - [JsonProperty("viz", NullValueHandling = NullValueHandling.Ignore)] - public List Viz { get; set; } - - /// - public override string ToString() - { - var toStringOutput = new List(); - - this.ToString(toStringOutput); - - return $"LiveboardQueryResponse : ({string.Join(", ", toStringOutput)})"; - } - - /// - public override bool Equals(object obj) - { - if (obj == null) - { - return false; - } - - if (obj == this) - { - return true; - } - - return obj is LiveboardQueryResponse other && - ((this.Name == null && other.Name == null) || (this.Name?.Equals(other.Name) == true)) && - ((this.Id == null && other.Id == null) || (this.Id?.Equals(other.Id) == true)) && - ((this.Viz == null && other.Viz == null) || (this.Viz?.Equals(other.Viz) == true)); - } - - - /// - /// ToString overload. - /// - /// List of strings. - protected void ToString(List toStringOutput) - { - toStringOutput.Add($"this.Name = {(this.Name == null ? "null" : this.Name == string.Empty ? "" : this.Name)}"); - toStringOutput.Add($"this.Id = {(this.Id == null ? "null" : this.Id == string.Empty ? "" : this.Id)}"); - toStringOutput.Add($"this.Viz = {(this.Viz == null ? "null" : $"[{string.Join(", ", this.Viz)} ]")}"); - } - } -} \ No newline at end of file diff --git a/DotNet/ThoughtSpotPublicRESTAPI.Standard/Models/LogicalTableHeader.cs b/DotNet/ThoughtSpotPublicRESTAPI.Standard/Models/LogicalTableHeader.cs deleted file mode 100644 index d4ad7e35a..000000000 --- a/DotNet/ThoughtSpotPublicRESTAPI.Standard/Models/LogicalTableHeader.cs +++ /dev/null @@ -1,248 +0,0 @@ -// -// Copyright (c) APIMatic. All rights reserved. -// -namespace ThoughtSpotPublicRESTAPI.Standard.Models -{ - using System; - using System.Collections.Generic; - using System.ComponentModel; - using System.IO; - using System.Linq; - using System.Text; - using System.Threading.Tasks; - using Newtonsoft.Json; - using Newtonsoft.Json.Converters; - using ThoughtSpotPublicRESTAPI.Standard; - using ThoughtSpotPublicRESTAPI.Standard.Utilities; - - /// - /// LogicalTableHeader. - /// - public class LogicalTableHeader - { - /// - /// Initializes a new instance of the class. - /// - public LogicalTableHeader() - { - } - - /// - /// Initializes a new instance of the class. - /// - /// id. - /// name. - /// author. - /// authorName. - /// authorDisplayName. - /// created. - /// modified. - /// modifiedBy. - /// generationNum. - /// owner. - /// deleted. - /// hidden. - /// database. - /// schema. - /// type. - /// subType. - public LogicalTableHeader( - string id = null, - string name = null, - string author = null, - string authorName = null, - string authorDisplayName = null, - double? created = null, - double? modified = null, - string modifiedBy = null, - int? generationNum = null, - string owner = null, - bool? deleted = null, - bool? hidden = null, - string database = null, - string schema = null, - string type = null, - string subType = null) - { - this.Id = id; - this.Name = name; - this.Author = author; - this.AuthorName = authorName; - this.AuthorDisplayName = authorDisplayName; - this.Created = created; - this.Modified = modified; - this.ModifiedBy = modifiedBy; - this.GenerationNum = generationNum; - this.Owner = owner; - this.Deleted = deleted; - this.Hidden = hidden; - this.Database = database; - this.Schema = schema; - this.Type = type; - this.SubType = subType; - } - - /// - /// Gets or sets Id. - /// - [JsonProperty("id", NullValueHandling = NullValueHandling.Ignore)] - public string Id { get; set; } - - /// - /// Gets or sets Name. - /// - [JsonProperty("name", NullValueHandling = NullValueHandling.Ignore)] - public string Name { get; set; } - - /// - /// Gets or sets Author. - /// - [JsonProperty("author", NullValueHandling = NullValueHandling.Ignore)] - public string Author { get; set; } - - /// - /// Gets or sets AuthorName. - /// - [JsonProperty("authorName", NullValueHandling = NullValueHandling.Ignore)] - public string AuthorName { get; set; } - - /// - /// Gets or sets AuthorDisplayName. - /// - [JsonProperty("authorDisplayName", NullValueHandling = NullValueHandling.Ignore)] - public string AuthorDisplayName { get; set; } - - /// - /// Gets or sets Created. - /// - [JsonProperty("created", NullValueHandling = NullValueHandling.Ignore)] - public double? Created { get; set; } - - /// - /// Gets or sets Modified. - /// - [JsonProperty("modified", NullValueHandling = NullValueHandling.Ignore)] - public double? Modified { get; set; } - - /// - /// Gets or sets ModifiedBy. - /// - [JsonProperty("modifiedBy", NullValueHandling = NullValueHandling.Ignore)] - public string ModifiedBy { get; set; } - - /// - /// Gets or sets GenerationNum. - /// - [JsonProperty("generationNum", NullValueHandling = NullValueHandling.Ignore)] - public int? GenerationNum { get; set; } - - /// - /// Gets or sets Owner. - /// - [JsonProperty("owner", NullValueHandling = NullValueHandling.Ignore)] - public string Owner { get; set; } - - /// - /// Gets or sets Deleted. - /// - [JsonProperty("deleted", NullValueHandling = NullValueHandling.Ignore)] - public bool? Deleted { get; set; } - - /// - /// Gets or sets Hidden. - /// - [JsonProperty("hidden", NullValueHandling = NullValueHandling.Ignore)] - public bool? Hidden { get; set; } - - /// - /// Gets or sets Database. - /// - [JsonProperty("database", NullValueHandling = NullValueHandling.Ignore)] - public string Database { get; set; } - - /// - /// Gets or sets Schema. - /// - [JsonProperty("schema", NullValueHandling = NullValueHandling.Ignore)] - public string Schema { get; set; } - - /// - /// Gets or sets Type. - /// - [JsonProperty("type", NullValueHandling = NullValueHandling.Ignore)] - public string Type { get; set; } - - /// - /// Gets or sets SubType. - /// - [JsonProperty("subType", NullValueHandling = NullValueHandling.Ignore)] - public string SubType { get; set; } - - /// - public override string ToString() - { - var toStringOutput = new List(); - - this.ToString(toStringOutput); - - return $"LogicalTableHeader : ({string.Join(", ", toStringOutput)})"; - } - - /// - public override bool Equals(object obj) - { - if (obj == null) - { - return false; - } - - if (obj == this) - { - return true; - } - - return obj is LogicalTableHeader other && - ((this.Id == null && other.Id == null) || (this.Id?.Equals(other.Id) == true)) && - ((this.Name == null && other.Name == null) || (this.Name?.Equals(other.Name) == true)) && - ((this.Author == null && other.Author == null) || (this.Author?.Equals(other.Author) == true)) && - ((this.AuthorName == null && other.AuthorName == null) || (this.AuthorName?.Equals(other.AuthorName) == true)) && - ((this.AuthorDisplayName == null && other.AuthorDisplayName == null) || (this.AuthorDisplayName?.Equals(other.AuthorDisplayName) == true)) && - ((this.Created == null && other.Created == null) || (this.Created?.Equals(other.Created) == true)) && - ((this.Modified == null && other.Modified == null) || (this.Modified?.Equals(other.Modified) == true)) && - ((this.ModifiedBy == null && other.ModifiedBy == null) || (this.ModifiedBy?.Equals(other.ModifiedBy) == true)) && - ((this.GenerationNum == null && other.GenerationNum == null) || (this.GenerationNum?.Equals(other.GenerationNum) == true)) && - ((this.Owner == null && other.Owner == null) || (this.Owner?.Equals(other.Owner) == true)) && - ((this.Deleted == null && other.Deleted == null) || (this.Deleted?.Equals(other.Deleted) == true)) && - ((this.Hidden == null && other.Hidden == null) || (this.Hidden?.Equals(other.Hidden) == true)) && - ((this.Database == null && other.Database == null) || (this.Database?.Equals(other.Database) == true)) && - ((this.Schema == null && other.Schema == null) || (this.Schema?.Equals(other.Schema) == true)) && - ((this.Type == null && other.Type == null) || (this.Type?.Equals(other.Type) == true)) && - ((this.SubType == null && other.SubType == null) || (this.SubType?.Equals(other.SubType) == true)); - } - - - /// - /// ToString overload. - /// - /// List of strings. - protected void ToString(List toStringOutput) - { - toStringOutput.Add($"this.Id = {(this.Id == null ? "null" : this.Id == string.Empty ? "" : this.Id)}"); - toStringOutput.Add($"this.Name = {(this.Name == null ? "null" : this.Name == string.Empty ? "" : this.Name)}"); - toStringOutput.Add($"this.Author = {(this.Author == null ? "null" : this.Author == string.Empty ? "" : this.Author)}"); - toStringOutput.Add($"this.AuthorName = {(this.AuthorName == null ? "null" : this.AuthorName == string.Empty ? "" : this.AuthorName)}"); - toStringOutput.Add($"this.AuthorDisplayName = {(this.AuthorDisplayName == null ? "null" : this.AuthorDisplayName == string.Empty ? "" : this.AuthorDisplayName)}"); - toStringOutput.Add($"this.Created = {(this.Created == null ? "null" : this.Created.ToString())}"); - toStringOutput.Add($"this.Modified = {(this.Modified == null ? "null" : this.Modified.ToString())}"); - toStringOutput.Add($"this.ModifiedBy = {(this.ModifiedBy == null ? "null" : this.ModifiedBy == string.Empty ? "" : this.ModifiedBy)}"); - toStringOutput.Add($"this.GenerationNum = {(this.GenerationNum == null ? "null" : this.GenerationNum.ToString())}"); - toStringOutput.Add($"this.Owner = {(this.Owner == null ? "null" : this.Owner == string.Empty ? "" : this.Owner)}"); - toStringOutput.Add($"this.Deleted = {(this.Deleted == null ? "null" : this.Deleted.ToString())}"); - toStringOutput.Add($"this.Hidden = {(this.Hidden == null ? "null" : this.Hidden.ToString())}"); - toStringOutput.Add($"this.Database = {(this.Database == null ? "null" : this.Database == string.Empty ? "" : this.Database)}"); - toStringOutput.Add($"this.Schema = {(this.Schema == null ? "null" : this.Schema == string.Empty ? "" : this.Schema)}"); - toStringOutput.Add($"this.Type = {(this.Type == null ? "null" : this.Type == string.Empty ? "" : this.Type)}"); - toStringOutput.Add($"this.SubType = {(this.SubType == null ? "null" : this.SubType == string.Empty ? "" : this.SubType)}"); - } - } -} \ No newline at end of file diff --git a/DotNet/ThoughtSpotPublicRESTAPI.Standard/Models/LogsResponse.cs b/DotNet/ThoughtSpotPublicRESTAPI.Standard/Models/LogsResponse.cs deleted file mode 100644 index ac4b733cd..000000000 --- a/DotNet/ThoughtSpotPublicRESTAPI.Standard/Models/LogsResponse.cs +++ /dev/null @@ -1,94 +0,0 @@ -// -// Copyright (c) APIMatic. All rights reserved. -// -namespace ThoughtSpotPublicRESTAPI.Standard.Models -{ - using System; - using System.Collections.Generic; - using System.ComponentModel; - using System.IO; - using System.Linq; - using System.Text; - using System.Threading.Tasks; - using Newtonsoft.Json; - using Newtonsoft.Json.Converters; - using ThoughtSpotPublicRESTAPI.Standard; - using ThoughtSpotPublicRESTAPI.Standard.Utilities; - - /// - /// LogsResponse. - /// - public class LogsResponse - { - /// - /// Initializes a new instance of the class. - /// - public LogsResponse() - { - } - - /// - /// Initializes a new instance of the class. - /// - /// date. - /// log. - public LogsResponse( - string date = null, - string log = null) - { - this.Date = date; - this.Log = log; - } - - /// - /// Date and time for the event in the log - /// - [JsonProperty("date", NullValueHandling = NullValueHandling.Ignore)] - public string Date { get; set; } - - /// - /// Logged event at the time specified in JSON format. This includes, Event ID, A unique description of the event, for example, User login failed, Timestamp, User ID of the person initiating the event and IP address of the ThoughtSpot instance. - /// - [JsonProperty("log", NullValueHandling = NullValueHandling.Ignore)] - public string Log { get; set; } - - /// - public override string ToString() - { - var toStringOutput = new List(); - - this.ToString(toStringOutput); - - return $"LogsResponse : ({string.Join(", ", toStringOutput)})"; - } - - /// - public override bool Equals(object obj) - { - if (obj == null) - { - return false; - } - - if (obj == this) - { - return true; - } - - return obj is LogsResponse other && - ((this.Date == null && other.Date == null) || (this.Date?.Equals(other.Date) == true)) && - ((this.Log == null && other.Log == null) || (this.Log?.Equals(other.Log) == true)); - } - - - /// - /// ToString overload. - /// - /// List of strings. - protected void ToString(List toStringOutput) - { - toStringOutput.Add($"this.Date = {(this.Date == null ? "null" : this.Date == string.Empty ? "" : this.Date)}"); - toStringOutput.Add($"this.Log = {(this.Log == null ? "null" : this.Log == string.Empty ? "" : this.Log)}"); - } - } -} \ No newline at end of file diff --git a/DotNet/ThoughtSpotPublicRESTAPI.Standard/Models/MetadataTagResponse.cs b/DotNet/ThoughtSpotPublicRESTAPI.Standard/Models/MetadataTagResponse.cs deleted file mode 100644 index cfaee6b08..000000000 --- a/DotNet/ThoughtSpotPublicRESTAPI.Standard/Models/MetadataTagResponse.cs +++ /dev/null @@ -1,226 +0,0 @@ -// -// Copyright (c) APIMatic. All rights reserved. -// -namespace ThoughtSpotPublicRESTAPI.Standard.Models -{ - using System; - using System.Collections.Generic; - using System.ComponentModel; - using System.IO; - using System.Linq; - using System.Text; - using System.Threading.Tasks; - using Newtonsoft.Json; - using Newtonsoft.Json.Converters; - using ThoughtSpotPublicRESTAPI.Standard; - using ThoughtSpotPublicRESTAPI.Standard.Utilities; - - /// - /// MetadataTagResponse. - /// - public class MetadataTagResponse - { - /// - /// Initializes a new instance of the class. - /// - public MetadataTagResponse() - { - } - - /// - /// Initializes a new instance of the class. - /// - /// name. - /// id. - /// clientState. - /// indexVersion. - /// generationNum. - /// isDeleted. - /// isHidden. - /// isExternal. - /// isDeprecated. - /// created. - /// modified. - /// modifiedBy. - /// author. - /// owner. - public MetadataTagResponse( - string name = null, - string id = null, - Models.ClientState clientState = null, - double? indexVersion = null, - double? generationNum = null, - bool? isDeleted = null, - bool? isHidden = null, - bool? isExternal = null, - bool? isDeprecated = null, - double? created = null, - double? modified = null, - Models.TagNameAndID modifiedBy = null, - Models.TagNameAndID author = null, - Models.TagNameAndID owner = null) - { - this.Name = name; - this.Id = id; - this.ClientState = clientState; - this.IndexVersion = indexVersion; - this.GenerationNum = generationNum; - this.IsDeleted = isDeleted; - this.IsHidden = isHidden; - this.IsExternal = isExternal; - this.IsDeprecated = isDeprecated; - this.Created = created; - this.Modified = modified; - this.ModifiedBy = modifiedBy; - this.Author = author; - this.Owner = owner; - } - - /// - /// Name of the tag - /// - [JsonProperty("name", NullValueHandling = NullValueHandling.Ignore)] - public string Name { get; set; } - - /// - /// GUID of the tag - /// - [JsonProperty("id", NullValueHandling = NullValueHandling.Ignore)] - public string Id { get; set; } - - /// - /// Gets or sets ClientState. - /// - [JsonProperty("clientState", NullValueHandling = NullValueHandling.Ignore)] - public Models.ClientState ClientState { get; set; } - - /// - /// Gets or sets IndexVersion. - /// - [JsonProperty("indexVersion", NullValueHandling = NullValueHandling.Ignore)] - public double? IndexVersion { get; set; } - - /// - /// Gets or sets GenerationNum. - /// - [JsonProperty("generationNum", NullValueHandling = NullValueHandling.Ignore)] - public double? GenerationNum { get; set; } - - /// - /// Indicates if the tag is deleted - /// - [JsonProperty("isDeleted", NullValueHandling = NullValueHandling.Ignore)] - public bool? IsDeleted { get; set; } - - /// - /// Indicates if the tag is hidden - /// - [JsonProperty("isHidden", NullValueHandling = NullValueHandling.Ignore)] - public bool? IsHidden { get; set; } - - /// - /// Indicates if the tag is from external system - /// - [JsonProperty("isExternal", NullValueHandling = NullValueHandling.Ignore)] - public bool? IsExternal { get; set; } - - /// - /// Gets or sets IsDeprecated. - /// - [JsonProperty("isDeprecated", NullValueHandling = NullValueHandling.Ignore)] - public bool? IsDeprecated { get; set; } - - /// - /// Date and time when group was created - /// - [JsonProperty("created", NullValueHandling = NullValueHandling.Ignore)] - public double? Created { get; set; } - - /// - /// Date and time of last modification of the group - /// - [JsonProperty("modified", NullValueHandling = NullValueHandling.Ignore)] - public double? Modified { get; set; } - - /// - /// Gets or sets ModifiedBy. - /// - [JsonProperty("modifiedBy", NullValueHandling = NullValueHandling.Ignore)] - public Models.TagNameAndID ModifiedBy { get; set; } - - /// - /// Gets or sets Author. - /// - [JsonProperty("author", NullValueHandling = NullValueHandling.Ignore)] - public Models.TagNameAndID Author { get; set; } - - /// - /// Gets or sets Owner. - /// - [JsonProperty("owner", NullValueHandling = NullValueHandling.Ignore)] - public Models.TagNameAndID Owner { get; set; } - - /// - public override string ToString() - { - var toStringOutput = new List(); - - this.ToString(toStringOutput); - - return $"MetadataTagResponse : ({string.Join(", ", toStringOutput)})"; - } - - /// - public override bool Equals(object obj) - { - if (obj == null) - { - return false; - } - - if (obj == this) - { - return true; - } - - return obj is MetadataTagResponse other && - ((this.Name == null && other.Name == null) || (this.Name?.Equals(other.Name) == true)) && - ((this.Id == null && other.Id == null) || (this.Id?.Equals(other.Id) == true)) && - ((this.ClientState == null && other.ClientState == null) || (this.ClientState?.Equals(other.ClientState) == true)) && - ((this.IndexVersion == null && other.IndexVersion == null) || (this.IndexVersion?.Equals(other.IndexVersion) == true)) && - ((this.GenerationNum == null && other.GenerationNum == null) || (this.GenerationNum?.Equals(other.GenerationNum) == true)) && - ((this.IsDeleted == null && other.IsDeleted == null) || (this.IsDeleted?.Equals(other.IsDeleted) == true)) && - ((this.IsHidden == null && other.IsHidden == null) || (this.IsHidden?.Equals(other.IsHidden) == true)) && - ((this.IsExternal == null && other.IsExternal == null) || (this.IsExternal?.Equals(other.IsExternal) == true)) && - ((this.IsDeprecated == null && other.IsDeprecated == null) || (this.IsDeprecated?.Equals(other.IsDeprecated) == true)) && - ((this.Created == null && other.Created == null) || (this.Created?.Equals(other.Created) == true)) && - ((this.Modified == null && other.Modified == null) || (this.Modified?.Equals(other.Modified) == true)) && - ((this.ModifiedBy == null && other.ModifiedBy == null) || (this.ModifiedBy?.Equals(other.ModifiedBy) == true)) && - ((this.Author == null && other.Author == null) || (this.Author?.Equals(other.Author) == true)) && - ((this.Owner == null && other.Owner == null) || (this.Owner?.Equals(other.Owner) == true)); - } - - - /// - /// ToString overload. - /// - /// List of strings. - protected void ToString(List toStringOutput) - { - toStringOutput.Add($"this.Name = {(this.Name == null ? "null" : this.Name == string.Empty ? "" : this.Name)}"); - toStringOutput.Add($"this.Id = {(this.Id == null ? "null" : this.Id == string.Empty ? "" : this.Id)}"); - toStringOutput.Add($"this.ClientState = {(this.ClientState == null ? "null" : this.ClientState.ToString())}"); - toStringOutput.Add($"this.IndexVersion = {(this.IndexVersion == null ? "null" : this.IndexVersion.ToString())}"); - toStringOutput.Add($"this.GenerationNum = {(this.GenerationNum == null ? "null" : this.GenerationNum.ToString())}"); - toStringOutput.Add($"this.IsDeleted = {(this.IsDeleted == null ? "null" : this.IsDeleted.ToString())}"); - toStringOutput.Add($"this.IsHidden = {(this.IsHidden == null ? "null" : this.IsHidden.ToString())}"); - toStringOutput.Add($"this.IsExternal = {(this.IsExternal == null ? "null" : this.IsExternal.ToString())}"); - toStringOutput.Add($"this.IsDeprecated = {(this.IsDeprecated == null ? "null" : this.IsDeprecated.ToString())}"); - toStringOutput.Add($"this.Created = {(this.Created == null ? "null" : this.Created.ToString())}"); - toStringOutput.Add($"this.Modified = {(this.Modified == null ? "null" : this.Modified.ToString())}"); - toStringOutput.Add($"this.ModifiedBy = {(this.ModifiedBy == null ? "null" : this.ModifiedBy.ToString())}"); - toStringOutput.Add($"this.Author = {(this.Author == null ? "null" : this.Author.ToString())}"); - toStringOutput.Add($"this.Owner = {(this.Owner == null ? "null" : this.Owner.ToString())}"); - } - } -} \ No newline at end of file diff --git a/DotNet/ThoughtSpotPublicRESTAPI.Standard/Models/NameAndIdInput.cs b/DotNet/ThoughtSpotPublicRESTAPI.Standard/Models/NameAndIdInput.cs deleted file mode 100644 index 18adf266c..000000000 --- a/DotNet/ThoughtSpotPublicRESTAPI.Standard/Models/NameAndIdInput.cs +++ /dev/null @@ -1,94 +0,0 @@ -// -// Copyright (c) APIMatic. All rights reserved. -// -namespace ThoughtSpotPublicRESTAPI.Standard.Models -{ - using System; - using System.Collections.Generic; - using System.ComponentModel; - using System.IO; - using System.Linq; - using System.Text; - using System.Threading.Tasks; - using Newtonsoft.Json; - using Newtonsoft.Json.Converters; - using ThoughtSpotPublicRESTAPI.Standard; - using ThoughtSpotPublicRESTAPI.Standard.Utilities; - - /// - /// NameAndIdInput. - /// - public class NameAndIdInput - { - /// - /// Initializes a new instance of the class. - /// - public NameAndIdInput() - { - } - - /// - /// Initializes a new instance of the class. - /// - /// name. - /// id. - public NameAndIdInput( - string name = null, - string id = null) - { - this.Name = name; - this.Id = id; - } - - /// - /// Name of the user - /// - [JsonProperty("name", NullValueHandling = NullValueHandling.Ignore)] - public string Name { get; set; } - - /// - /// GUID of the user - /// - [JsonProperty("id", NullValueHandling = NullValueHandling.Ignore)] - public string Id { get; set; } - - /// - public override string ToString() - { - var toStringOutput = new List(); - - this.ToString(toStringOutput); - - return $"NameAndIdInput : ({string.Join(", ", toStringOutput)})"; - } - - /// - public override bool Equals(object obj) - { - if (obj == null) - { - return false; - } - - if (obj == this) - { - return true; - } - - return obj is NameAndIdInput other && - ((this.Name == null && other.Name == null) || (this.Name?.Equals(other.Name) == true)) && - ((this.Id == null && other.Id == null) || (this.Id?.Equals(other.Id) == true)); - } - - - /// - /// ToString overload. - /// - /// List of strings. - protected void ToString(List toStringOutput) - { - toStringOutput.Add($"this.Name = {(this.Name == null ? "null" : this.Name == string.Empty ? "" : this.Name)}"); - toStringOutput.Add($"this.Id = {(this.Id == null ? "null" : this.Id == string.Empty ? "" : this.Id)}"); - } - } -} \ No newline at end of file diff --git a/DotNet/ThoughtSpotPublicRESTAPI.Standard/Models/OrgType.cs b/DotNet/ThoughtSpotPublicRESTAPI.Standard/Models/OrgType.cs deleted file mode 100644 index 901bc1707..000000000 --- a/DotNet/ThoughtSpotPublicRESTAPI.Standard/Models/OrgType.cs +++ /dev/null @@ -1,94 +0,0 @@ -// -// Copyright (c) APIMatic. All rights reserved. -// -namespace ThoughtSpotPublicRESTAPI.Standard.Models -{ - using System; - using System.Collections.Generic; - using System.ComponentModel; - using System.IO; - using System.Linq; - using System.Text; - using System.Threading.Tasks; - using Newtonsoft.Json; - using Newtonsoft.Json.Converters; - using ThoughtSpotPublicRESTAPI.Standard; - using ThoughtSpotPublicRESTAPI.Standard.Utilities; - - /// - /// OrgType. - /// - public class OrgType - { - /// - /// Initializes a new instance of the class. - /// - public OrgType() - { - } - - /// - /// Initializes a new instance of the class. - /// - /// name. - /// id. - public OrgType( - string name = null, - int? id = null) - { - this.Name = name; - this.Id = id; - } - - /// - /// Name of the organization - /// - [JsonProperty("name", NullValueHandling = NullValueHandling.Ignore)] - public string Name { get; set; } - - /// - /// Id of the organization - /// - [JsonProperty("id", NullValueHandling = NullValueHandling.Ignore)] - public int? Id { get; set; } - - /// - public override string ToString() - { - var toStringOutput = new List(); - - this.ToString(toStringOutput); - - return $"OrgType : ({string.Join(", ", toStringOutput)})"; - } - - /// - public override bool Equals(object obj) - { - if (obj == null) - { - return false; - } - - if (obj == this) - { - return true; - } - - return obj is OrgType other && - ((this.Name == null && other.Name == null) || (this.Name?.Equals(other.Name) == true)) && - ((this.Id == null && other.Id == null) || (this.Id?.Equals(other.Id) == true)); - } - - - /// - /// ToString overload. - /// - /// List of strings. - protected void ToString(List toStringOutput) - { - toStringOutput.Add($"this.Name = {(this.Name == null ? "null" : this.Name == string.Empty ? "" : this.Name)}"); - toStringOutput.Add($"this.Id = {(this.Id == null ? "null" : this.Id.ToString())}"); - } - } -} \ No newline at end of file diff --git a/DotNet/ThoughtSpotPublicRESTAPI.Standard/Models/OrgsResponse.cs b/DotNet/ThoughtSpotPublicRESTAPI.Standard/Models/OrgsResponse.cs deleted file mode 100644 index 4f2cbf889..000000000 --- a/DotNet/ThoughtSpotPublicRESTAPI.Standard/Models/OrgsResponse.cs +++ /dev/null @@ -1,138 +0,0 @@ -// -// Copyright (c) APIMatic. All rights reserved. -// -namespace ThoughtSpotPublicRESTAPI.Standard.Models -{ - using System; - using System.Collections.Generic; - using System.ComponentModel; - using System.IO; - using System.Linq; - using System.Text; - using System.Threading.Tasks; - using Newtonsoft.Json; - using Newtonsoft.Json.Converters; - using ThoughtSpotPublicRESTAPI.Standard; - using ThoughtSpotPublicRESTAPI.Standard.Utilities; - - /// - /// OrgsResponse. - /// - public class OrgsResponse - { - /// - /// Initializes a new instance of the class. - /// - public OrgsResponse() - { - } - - /// - /// Initializes a new instance of the class. - /// - /// orgId. - /// orgName. - /// description. - /// allGroupUserId. - /// defaultAdminUserGroupId. - /// active. - public OrgsResponse( - int? orgId = null, - string orgName = null, - string description = null, - string allGroupUserId = null, - string defaultAdminUserGroupId = null, - bool? active = null) - { - this.OrgId = orgId; - this.OrgName = orgName; - this.Description = description; - this.AllGroupUserId = allGroupUserId; - this.DefaultAdminUserGroupId = defaultAdminUserGroupId; - this.Active = active; - } - - /// - /// ID of the organization searched for - /// - [JsonProperty("orgId", NullValueHandling = NullValueHandling.Ignore)] - public int? OrgId { get; set; } - - /// - /// Name of the organization searched for - /// - [JsonProperty("orgName", NullValueHandling = NullValueHandling.Ignore)] - public string OrgName { get; set; } - - /// - /// Description associated with the organization - /// - [JsonProperty("description", NullValueHandling = NullValueHandling.Ignore)] - public string Description { get; set; } - - /// - /// GUID of the ALL group in the organization - /// - [JsonProperty("allGroupUserId", NullValueHandling = NullValueHandling.Ignore)] - public string AllGroupUserId { get; set; } - - /// - /// GUID of the admin group in the organization - /// - [JsonProperty("defaultAdminUserGroupId", NullValueHandling = NullValueHandling.Ignore)] - public string DefaultAdminUserGroupId { get; set; } - - /// - /// Indicates if the organization is active or not - /// - [JsonProperty("active", NullValueHandling = NullValueHandling.Ignore)] - public bool? Active { get; set; } - - /// - public override string ToString() - { - var toStringOutput = new List(); - - this.ToString(toStringOutput); - - return $"OrgsResponse : ({string.Join(", ", toStringOutput)})"; - } - - /// - public override bool Equals(object obj) - { - if (obj == null) - { - return false; - } - - if (obj == this) - { - return true; - } - - return obj is OrgsResponse other && - ((this.OrgId == null && other.OrgId == null) || (this.OrgId?.Equals(other.OrgId) == true)) && - ((this.OrgName == null && other.OrgName == null) || (this.OrgName?.Equals(other.OrgName) == true)) && - ((this.Description == null && other.Description == null) || (this.Description?.Equals(other.Description) == true)) && - ((this.AllGroupUserId == null && other.AllGroupUserId == null) || (this.AllGroupUserId?.Equals(other.AllGroupUserId) == true)) && - ((this.DefaultAdminUserGroupId == null && other.DefaultAdminUserGroupId == null) || (this.DefaultAdminUserGroupId?.Equals(other.DefaultAdminUserGroupId) == true)) && - ((this.Active == null && other.Active == null) || (this.Active?.Equals(other.Active) == true)); - } - - - /// - /// ToString overload. - /// - /// List of strings. - protected void ToString(List toStringOutput) - { - toStringOutput.Add($"this.OrgId = {(this.OrgId == null ? "null" : this.OrgId.ToString())}"); - toStringOutput.Add($"this.OrgName = {(this.OrgName == null ? "null" : this.OrgName == string.Empty ? "" : this.OrgName)}"); - toStringOutput.Add($"this.Description = {(this.Description == null ? "null" : this.Description == string.Empty ? "" : this.Description)}"); - toStringOutput.Add($"this.AllGroupUserId = {(this.AllGroupUserId == null ? "null" : this.AllGroupUserId == string.Empty ? "" : this.AllGroupUserId)}"); - toStringOutput.Add($"this.DefaultAdminUserGroupId = {(this.DefaultAdminUserGroupId == null ? "null" : this.DefaultAdminUserGroupId == string.Empty ? "" : this.DefaultAdminUserGroupId)}"); - toStringOutput.Add($"this.Active = {(this.Active == null ? "null" : this.Active.ToString())}"); - } - } -} \ No newline at end of file diff --git a/DotNet/ThoughtSpotPublicRESTAPI.Standard/Models/OrientationEnum.cs b/DotNet/ThoughtSpotPublicRESTAPI.Standard/Models/OrientationEnum.cs deleted file mode 100644 index 23ce243b4..000000000 --- a/DotNet/ThoughtSpotPublicRESTAPI.Standard/Models/OrientationEnum.cs +++ /dev/null @@ -1,33 +0,0 @@ -// -// Copyright (c) APIMatic. All rights reserved. -// -namespace ThoughtSpotPublicRESTAPI.Standard.Models -{ - using System; - using System.Collections.Generic; - using System.Linq; - using System.Runtime.Serialization; - using Newtonsoft.Json; - using Newtonsoft.Json.Converters; - using ThoughtSpotPublicRESTAPI.Standard; - using ThoughtSpotPublicRESTAPI.Standard.Utilities; - - /// - /// OrientationEnum. - /// - [JsonConverter(typeof(StringEnumConverter))] - public enum OrientationEnum - { - /// - /// PORTRAIT. - /// - [EnumMember(Value = "PORTRAIT")] - PORTRAIT, - - /// - /// LANDSCAPE. - /// - [EnumMember(Value = "LANDSCAPE")] - LANDSCAPE - } -} \ No newline at end of file diff --git a/DotNet/ThoughtSpotPublicRESTAPI.Standard/Models/PdfOptionsInput.cs b/DotNet/ThoughtSpotPublicRESTAPI.Standard/Models/PdfOptionsInput.cs deleted file mode 100644 index 6c9c56281..000000000 --- a/DotNet/ThoughtSpotPublicRESTAPI.Standard/Models/PdfOptionsInput.cs +++ /dev/null @@ -1,150 +0,0 @@ -// -// Copyright (c) APIMatic. All rights reserved. -// -namespace ThoughtSpotPublicRESTAPI.Standard.Models -{ - using System; - using System.Collections.Generic; - using System.ComponentModel; - using System.IO; - using System.Linq; - using System.Text; - using System.Threading.Tasks; - using Newtonsoft.Json; - using Newtonsoft.Json.Converters; - using ThoughtSpotPublicRESTAPI.Standard; - using ThoughtSpotPublicRESTAPI.Standard.Utilities; - - /// - /// PdfOptionsInput. - /// - public class PdfOptionsInput - { - /// - /// Initializes a new instance of the class. - /// - public PdfOptionsInput() - { - } - - /// - /// Initializes a new instance of the class. - /// - /// orientation. - /// truncateTables. - /// includeLogo. - /// footerText. - /// includePageNumber. - /// includeCoverPage. - /// includeFilterPage. - public PdfOptionsInput( - Models.OrientationEnum? orientation = null, - bool? truncateTables = null, - bool? includeLogo = null, - string footerText = null, - bool? includePageNumber = null, - bool? includeCoverPage = null, - bool? includeFilterPage = null) - { - this.Orientation = orientation; - this.TruncateTables = truncateTables; - this.IncludeLogo = includeLogo; - this.FooterText = footerText; - this.IncludePageNumber = includePageNumber; - this.IncludeCoverPage = includeCoverPage; - this.IncludeFilterPage = includeFilterPage; - } - - /// - /// Page orientation for the PDF. Default: PORTRAIT - /// - [JsonProperty("orientation", ItemConverterType = typeof(StringEnumConverter), NullValueHandling = NullValueHandling.Ignore)] - public Models.OrientationEnum? Orientation { get; set; } - - /// - /// When set to true, only the first page of the tables is displayed in the file. - /// This setting is applicable only when generating report for specific visualization ids. Default: false - /// - [JsonProperty("truncateTables", NullValueHandling = NullValueHandling.Ignore)] - public bool? TruncateTables { get; set; } - - /// - /// Include customized wide logo if available in the footer. Default: true - /// - [JsonProperty("includeLogo", NullValueHandling = NullValueHandling.Ignore)] - public bool? IncludeLogo { get; set; } - - /// - /// Footer text to include in the footer of each page of the PDF. - /// - [JsonProperty("footerText", NullValueHandling = NullValueHandling.Ignore)] - public string FooterText { get; set; } - - /// - /// When set to true, the page number is included in the footer of each page. Default: true - /// - [JsonProperty("includePageNumber", NullValueHandling = NullValueHandling.Ignore)] - public bool? IncludePageNumber { get; set; } - - /// - /// When set to true, a cover page with the Liveboard title is added in the PDF. Default: true - /// - [JsonProperty("includeCoverPage", NullValueHandling = NullValueHandling.Ignore)] - public bool? IncludeCoverPage { get; set; } - - /// - /// When set to true, a second page with a list of all applied filters is added in the PDF. Default: true - /// - [JsonProperty("includeFilterPage", NullValueHandling = NullValueHandling.Ignore)] - public bool? IncludeFilterPage { get; set; } - - /// - public override string ToString() - { - var toStringOutput = new List(); - - this.ToString(toStringOutput); - - return $"PdfOptionsInput : ({string.Join(", ", toStringOutput)})"; - } - - /// - public override bool Equals(object obj) - { - if (obj == null) - { - return false; - } - - if (obj == this) - { - return true; - } - - return obj is PdfOptionsInput other && - ((this.Orientation == null && other.Orientation == null) || (this.Orientation?.Equals(other.Orientation) == true)) && - ((this.TruncateTables == null && other.TruncateTables == null) || (this.TruncateTables?.Equals(other.TruncateTables) == true)) && - ((this.IncludeLogo == null && other.IncludeLogo == null) || (this.IncludeLogo?.Equals(other.IncludeLogo) == true)) && - ((this.FooterText == null && other.FooterText == null) || (this.FooterText?.Equals(other.FooterText) == true)) && - ((this.IncludePageNumber == null && other.IncludePageNumber == null) || (this.IncludePageNumber?.Equals(other.IncludePageNumber) == true)) && - ((this.IncludeCoverPage == null && other.IncludeCoverPage == null) || (this.IncludeCoverPage?.Equals(other.IncludeCoverPage) == true)) && - ((this.IncludeFilterPage == null && other.IncludeFilterPage == null) || (this.IncludeFilterPage?.Equals(other.IncludeFilterPage) == true)); - } - - - /// - /// ToString overload. - /// - /// List of strings. - protected void ToString(List toStringOutput) - { - toStringOutput.Add($"this.Orientation = {(this.Orientation == null ? "null" : this.Orientation.ToString())}"); - toStringOutput.Add($"this.TruncateTables = {(this.TruncateTables == null ? "null" : this.TruncateTables.ToString())}"); - toStringOutput.Add($"this.IncludeLogo = {(this.IncludeLogo == null ? "null" : this.IncludeLogo.ToString())}"); - toStringOutput.Add($"this.FooterText = {(this.FooterText == null ? "null" : this.FooterText == string.Empty ? "" : this.FooterText)}"); - toStringOutput.Add($"this.IncludePageNumber = {(this.IncludePageNumber == null ? "null" : this.IncludePageNumber.ToString())}"); - toStringOutput.Add($"this.IncludeCoverPage = {(this.IncludeCoverPage == null ? "null" : this.IncludeCoverPage.ToString())}"); - toStringOutput.Add($"this.IncludeFilterPage = {(this.IncludeFilterPage == null ? "null" : this.IncludeFilterPage.ToString())}"); - } - } -} \ No newline at end of file diff --git a/DotNet/ThoughtSpotPublicRESTAPI.Standard/Models/PermissionsTypeSearch.cs b/DotNet/ThoughtSpotPublicRESTAPI.Standard/Models/PermissionsTypeSearch.cs deleted file mode 100644 index 08591acb8..000000000 --- a/DotNet/ThoughtSpotPublicRESTAPI.Standard/Models/PermissionsTypeSearch.cs +++ /dev/null @@ -1,94 +0,0 @@ -// -// Copyright (c) APIMatic. All rights reserved. -// -namespace ThoughtSpotPublicRESTAPI.Standard.Models -{ - using System; - using System.Collections.Generic; - using System.ComponentModel; - using System.IO; - using System.Linq; - using System.Text; - using System.Threading.Tasks; - using Newtonsoft.Json; - using Newtonsoft.Json.Converters; - using ThoughtSpotPublicRESTAPI.Standard; - using ThoughtSpotPublicRESTAPI.Standard.Utilities; - - /// - /// PermissionsTypeSearch. - /// - public class PermissionsTypeSearch - { - /// - /// Initializes a new instance of the class. - /// - public PermissionsTypeSearch() - { - } - - /// - /// Initializes a new instance of the class. - /// - /// type. - /// tsObject. - public PermissionsTypeSearch( - string type = null, - List tsObject = null) - { - this.Type = type; - this.TsObject = tsObject; - } - - /// - /// Indicates the type of the object - /// - [JsonProperty("type", NullValueHandling = NullValueHandling.Ignore)] - public string Type { get; set; } - - /// - /// An array of objects of type mentioned in type field - /// - [JsonProperty("tsObject", NullValueHandling = NullValueHandling.Ignore)] - public List TsObject { get; set; } - - /// - public override string ToString() - { - var toStringOutput = new List(); - - this.ToString(toStringOutput); - - return $"PermissionsTypeSearch : ({string.Join(", ", toStringOutput)})"; - } - - /// - public override bool Equals(object obj) - { - if (obj == null) - { - return false; - } - - if (obj == this) - { - return true; - } - - return obj is PermissionsTypeSearch other && - ((this.Type == null && other.Type == null) || (this.Type?.Equals(other.Type) == true)) && - ((this.TsObject == null && other.TsObject == null) || (this.TsObject?.Equals(other.TsObject) == true)); - } - - - /// - /// ToString overload. - /// - /// List of strings. - protected void ToString(List toStringOutput) - { - toStringOutput.Add($"this.Type = {(this.Type == null ? "null" : this.Type == string.Empty ? "" : this.Type)}"); - toStringOutput.Add($"this.TsObject = {(this.TsObject == null ? "null" : $"[{string.Join(", ", this.TsObject)} ]")}"); - } - } -} \ No newline at end of file diff --git a/DotNet/ThoughtSpotPublicRESTAPI.Standard/Models/PinboardDetails.cs b/DotNet/ThoughtSpotPublicRESTAPI.Standard/Models/PinboardDetails.cs deleted file mode 100644 index 6c771c7ba..000000000 --- a/DotNet/ThoughtSpotPublicRESTAPI.Standard/Models/PinboardDetails.cs +++ /dev/null @@ -1,116 +0,0 @@ -// -// Copyright (c) APIMatic. All rights reserved. -// -namespace ThoughtSpotPublicRESTAPI.Standard.Models -{ - using System; - using System.Collections.Generic; - using System.ComponentModel; - using System.IO; - using System.Linq; - using System.Text; - using System.Threading.Tasks; - using Newtonsoft.Json; - using Newtonsoft.Json.Converters; - using ThoughtSpotPublicRESTAPI.Standard; - using ThoughtSpotPublicRESTAPI.Standard.Utilities; - - /// - /// PinboardDetails. - /// - public class PinboardDetails - { - /// - /// Initializes a new instance of the class. - /// - public PinboardDetails() - { - } - - /// - /// Initializes a new instance of the class. - /// - /// pinboardId. - /// pinboardName. - /// tabId. - /// tabName. - public PinboardDetails( - string pinboardId = null, - string pinboardName = null, - string tabId = null, - string tabName = null) - { - this.PinboardId = pinboardId; - this.PinboardName = pinboardName; - this.TabId = tabId; - this.TabName = tabName; - } - - /// - /// pinboard id of recently pinned pinboard - /// - [JsonProperty("pinboardId", NullValueHandling = NullValueHandling.Ignore)] - public string PinboardId { get; set; } - - /// - /// pinboard name of recently pinned pinboard - /// - [JsonProperty("pinboardName", NullValueHandling = NullValueHandling.Ignore)] - public string PinboardName { get; set; } - - /// - /// tab id of recently pinned tab - /// - [JsonProperty("tabId", NullValueHandling = NullValueHandling.Ignore)] - public string TabId { get; set; } - - /// - /// tab name of recently pinned tab - /// - [JsonProperty("tabName", NullValueHandling = NullValueHandling.Ignore)] - public string TabName { get; set; } - - /// - public override string ToString() - { - var toStringOutput = new List(); - - this.ToString(toStringOutput); - - return $"PinboardDetails : ({string.Join(", ", toStringOutput)})"; - } - - /// - public override bool Equals(object obj) - { - if (obj == null) - { - return false; - } - - if (obj == this) - { - return true; - } - - return obj is PinboardDetails other && - ((this.PinboardId == null && other.PinboardId == null) || (this.PinboardId?.Equals(other.PinboardId) == true)) && - ((this.PinboardName == null && other.PinboardName == null) || (this.PinboardName?.Equals(other.PinboardName) == true)) && - ((this.TabId == null && other.TabId == null) || (this.TabId?.Equals(other.TabId) == true)) && - ((this.TabName == null && other.TabName == null) || (this.TabName?.Equals(other.TabName) == true)); - } - - - /// - /// ToString overload. - /// - /// List of strings. - protected void ToString(List toStringOutput) - { - toStringOutput.Add($"this.PinboardId = {(this.PinboardId == null ? "null" : this.PinboardId == string.Empty ? "" : this.PinboardId)}"); - toStringOutput.Add($"this.PinboardName = {(this.PinboardName == null ? "null" : this.PinboardName == string.Empty ? "" : this.PinboardName)}"); - toStringOutput.Add($"this.TabId = {(this.TabId == null ? "null" : this.TabId == string.Empty ? "" : this.TabId)}"); - toStringOutput.Add($"this.TabName = {(this.TabName == null ? "null" : this.TabName == string.Empty ? "" : this.TabName)}"); - } - } -} \ No newline at end of file diff --git a/DotNet/ThoughtSpotPublicRESTAPI.Standard/Models/PrincipalSearchResponse.cs b/DotNet/ThoughtSpotPublicRESTAPI.Standard/Models/PrincipalSearchResponse.cs deleted file mode 100644 index 4a9fd1533..000000000 --- a/DotNet/ThoughtSpotPublicRESTAPI.Standard/Models/PrincipalSearchResponse.cs +++ /dev/null @@ -1,116 +0,0 @@ -// -// Copyright (c) APIMatic. All rights reserved. -// -namespace ThoughtSpotPublicRESTAPI.Standard.Models -{ - using System; - using System.Collections.Generic; - using System.ComponentModel; - using System.IO; - using System.Linq; - using System.Text; - using System.Threading.Tasks; - using Newtonsoft.Json; - using Newtonsoft.Json.Converters; - using ThoughtSpotPublicRESTAPI.Standard; - using ThoughtSpotPublicRESTAPI.Standard.Utilities; - - /// - /// PrincipalSearchResponse. - /// - public class PrincipalSearchResponse - { - /// - /// Initializes a new instance of the class. - /// - public PrincipalSearchResponse() - { - } - - /// - /// Initializes a new instance of the class. - /// - /// id. - /// name. - /// type. - /// permissions. - public PrincipalSearchResponse( - string id = null, - string name = null, - string type = null, - List permissions = null) - { - this.Id = id; - this.Name = name; - this.Type = type; - this.Permissions = permissions; - } - - /// - /// GUID of the user or user group - /// - [JsonProperty("id", NullValueHandling = NullValueHandling.Ignore)] - public string Id { get; set; } - - /// - /// Name of the user or user group - /// - [JsonProperty("name", NullValueHandling = NullValueHandling.Ignore)] - public string Name { get; set; } - - /// - /// Indicates the type of principal - /// - [JsonProperty("type", NullValueHandling = NullValueHandling.Ignore)] - public string Type { get; set; } - - /// - /// Indicates the permission which user or user group has on the object - /// - [JsonProperty("permissions", NullValueHandling = NullValueHandling.Ignore)] - public List Permissions { get; set; } - - /// - public override string ToString() - { - var toStringOutput = new List(); - - this.ToString(toStringOutput); - - return $"PrincipalSearchResponse : ({string.Join(", ", toStringOutput)})"; - } - - /// - public override bool Equals(object obj) - { - if (obj == null) - { - return false; - } - - if (obj == this) - { - return true; - } - - return obj is PrincipalSearchResponse other && - ((this.Id == null && other.Id == null) || (this.Id?.Equals(other.Id) == true)) && - ((this.Name == null && other.Name == null) || (this.Name?.Equals(other.Name) == true)) && - ((this.Type == null && other.Type == null) || (this.Type?.Equals(other.Type) == true)) && - ((this.Permissions == null && other.Permissions == null) || (this.Permissions?.Equals(other.Permissions) == true)); - } - - - /// - /// ToString overload. - /// - /// List of strings. - protected void ToString(List toStringOutput) - { - toStringOutput.Add($"this.Id = {(this.Id == null ? "null" : this.Id == string.Empty ? "" : this.Id)}"); - toStringOutput.Add($"this.Name = {(this.Name == null ? "null" : this.Name == string.Empty ? "" : this.Name)}"); - toStringOutput.Add($"this.Type = {(this.Type == null ? "null" : this.Type == string.Empty ? "" : this.Type)}"); - toStringOutput.Add($"this.Permissions = {(this.Permissions == null ? "null" : $"[{string.Join(", ", this.Permissions)} ]")}"); - } - } -} \ No newline at end of file diff --git a/DotNet/ThoughtSpotPublicRESTAPI.Standard/Models/PrivilegeEnum.cs b/DotNet/ThoughtSpotPublicRESTAPI.Standard/Models/PrivilegeEnum.cs deleted file mode 100644 index c7f5279b6..000000000 --- a/DotNet/ThoughtSpotPublicRESTAPI.Standard/Models/PrivilegeEnum.cs +++ /dev/null @@ -1,135 +0,0 @@ -// -// Copyright (c) APIMatic. All rights reserved. -// -namespace ThoughtSpotPublicRESTAPI.Standard.Models -{ - using System; - using System.Collections.Generic; - using System.Linq; - using System.Runtime.Serialization; - using Newtonsoft.Json; - using Newtonsoft.Json.Converters; - using ThoughtSpotPublicRESTAPI.Standard; - using ThoughtSpotPublicRESTAPI.Standard.Utilities; - - /// - /// PrivilegeEnum. - /// - [JsonConverter(typeof(StringEnumConverter))] - public enum PrivilegeEnum - { - /// - /// RANALYSIS. - /// - [EnumMember(Value = "RANALYSIS")] - RANALYSIS, - - /// - /// DATAMANAGEMENT. - /// - [EnumMember(Value = "DATAMANAGEMENT")] - DATAMANAGEMENT, - - /// - /// APPLICATIONADMINISTRATION. - /// - [EnumMember(Value = "APPLICATION_ADMINISTRATION")] - APPLICATIONADMINISTRATION, - - /// - /// USERADMINISTRATION. - /// - [EnumMember(Value = "USER_ADMINISTRATION")] - USERADMINISTRATION, - - /// - /// SYSTEMMANAGEMENT. - /// - [EnumMember(Value = "SYSTEMMANAGEMENT")] - SYSTEMMANAGEMENT, - - /// - /// SYSTEMINFOADMINISTRATION. - /// - [EnumMember(Value = "SYSTEM_INFO_ADMINISTRATION")] - SYSTEMINFOADMINISTRATION, - - /// - /// AUTHORING. - /// - [EnumMember(Value = "AUTHORING")] - AUTHORING, - - /// - /// BACKUPADMINISTRATION. - /// - [EnumMember(Value = "BACKUP_ADMINISTRATION")] - BACKUPADMINISTRATION, - - /// - /// SHAREWITHALL. - /// - [EnumMember(Value = "SHAREWITHALL")] - SHAREWITHALL, - - /// - /// DEVELOPER. - /// - [EnumMember(Value = "DEVELOPER")] - DEVELOPER, - - /// - /// JOBSCHEDULING. - /// - [EnumMember(Value = "JOBSCHEDULING")] - JOBSCHEDULING, - - /// - /// GROUPADMINISTRATION. - /// - [EnumMember(Value = "GROUP_ADMINISTRATION")] - GROUPADMINISTRATION, - - /// - /// BYPASSRLS. - /// - [EnumMember(Value = "BYPASSRLS")] - BYPASSRLS, - - /// - /// EXPERIMENTALFEATUREPRIVILEGE. - /// - [EnumMember(Value = "EXPERIMENTALFEATUREPRIVILEGE")] - EXPERIMENTALFEATUREPRIVILEGE, - - /// - /// A3ANALYSIS. - /// - [EnumMember(Value = "A3ANALYSIS")] - A3ANALYSIS, - - /// - /// USERDATAUPLOADING. - /// - [EnumMember(Value = "USERDATAUPLOADING")] - USERDATAUPLOADING, - - /// - /// DATADOWNLOADING. - /// - [EnumMember(Value = "DATADOWNLOADING")] - DATADOWNLOADING, - - /// - /// DISABLEPINBOARDCREATION. - /// - [EnumMember(Value = "DISABLE_PINBOARD_CREATION")] - DISABLEPINBOARDCREATION, - - /// - /// ADMINISTRATION. - /// - [EnumMember(Value = "ADMINISTRATION")] - ADMINISTRATION - } -} \ No newline at end of file diff --git a/DotNet/ThoughtSpotPublicRESTAPI.Standard/Models/SecuirityDependents.cs b/DotNet/ThoughtSpotPublicRESTAPI.Standard/Models/SecuirityDependents.cs deleted file mode 100644 index 8aa1c0964..000000000 --- a/DotNet/ThoughtSpotPublicRESTAPI.Standard/Models/SecuirityDependents.cs +++ /dev/null @@ -1,138 +0,0 @@ -// -// Copyright (c) APIMatic. All rights reserved. -// -namespace ThoughtSpotPublicRESTAPI.Standard.Models -{ - using System; - using System.Collections.Generic; - using System.ComponentModel; - using System.IO; - using System.Linq; - using System.Text; - using System.Threading.Tasks; - using Newtonsoft.Json; - using Newtonsoft.Json.Converters; - using ThoughtSpotPublicRESTAPI.Standard; - using ThoughtSpotPublicRESTAPI.Standard.Utilities; - - /// - /// SecuirityDependents. - /// - public class SecuirityDependents - { - /// - /// Initializes a new instance of the class. - /// - public SecuirityDependents() - { - } - - /// - /// Initializes a new instance of the class. - /// - /// id. - /// name. - /// type. - /// owner. - /// author. - /// permissions. - public SecuirityDependents( - string id = null, - string name = null, - string type = null, - string owner = null, - Models.UserNameAndID author = null, - List permissions = null) - { - this.Id = id; - this.Name = name; - this.Type = type; - this.Owner = owner; - this.Author = author; - this.Permissions = permissions; - } - - /// - /// GUID of the object - /// - [JsonProperty("id", NullValueHandling = NullValueHandling.Ignore)] - public string Id { get; set; } - - /// - /// Name of the object - /// - [JsonProperty("name", NullValueHandling = NullValueHandling.Ignore)] - public string Name { get; set; } - - /// - /// Indicates the type of the object - /// - [JsonProperty("type", NullValueHandling = NullValueHandling.Ignore)] - public string Type { get; set; } - - /// - /// Owner of the object - /// - [JsonProperty("owner", NullValueHandling = NullValueHandling.Ignore)] - public string Owner { get; set; } - - /// - /// Gets or sets Author. - /// - [JsonProperty("author", NullValueHandling = NullValueHandling.Ignore)] - public Models.UserNameAndID Author { get; set; } - - /// - /// Gets or sets Permissions. - /// - [JsonProperty("permissions", NullValueHandling = NullValueHandling.Ignore)] - public List Permissions { get; set; } - - /// - public override string ToString() - { - var toStringOutput = new List(); - - this.ToString(toStringOutput); - - return $"SecuirityDependents : ({string.Join(", ", toStringOutput)})"; - } - - /// - public override bool Equals(object obj) - { - if (obj == null) - { - return false; - } - - if (obj == this) - { - return true; - } - - return obj is SecuirityDependents other && - ((this.Id == null && other.Id == null) || (this.Id?.Equals(other.Id) == true)) && - ((this.Name == null && other.Name == null) || (this.Name?.Equals(other.Name) == true)) && - ((this.Type == null && other.Type == null) || (this.Type?.Equals(other.Type) == true)) && - ((this.Owner == null && other.Owner == null) || (this.Owner?.Equals(other.Owner) == true)) && - ((this.Author == null && other.Author == null) || (this.Author?.Equals(other.Author) == true)) && - ((this.Permissions == null && other.Permissions == null) || (this.Permissions?.Equals(other.Permissions) == true)); - } - - - /// - /// ToString overload. - /// - /// List of strings. - protected void ToString(List toStringOutput) - { - toStringOutput.Add($"this.Id = {(this.Id == null ? "null" : this.Id == string.Empty ? "" : this.Id)}"); - toStringOutput.Add($"this.Name = {(this.Name == null ? "null" : this.Name == string.Empty ? "" : this.Name)}"); - toStringOutput.Add($"this.Type = {(this.Type == null ? "null" : this.Type == string.Empty ? "" : this.Type)}"); - toStringOutput.Add($"this.Owner = {(this.Owner == null ? "null" : this.Owner == string.Empty ? "" : this.Owner)}"); - toStringOutput.Add($"this.Author = {(this.Author == null ? "null" : this.Author.ToString())}"); - toStringOutput.Add($"this.Permissions = {(this.Permissions == null ? "null" : $"[{string.Join(", ", this.Permissions)} ]")}"); - } - } -} \ No newline at end of file diff --git a/DotNet/ThoughtSpotPublicRESTAPI.Standard/Models/SecurityPermission.cs b/DotNet/ThoughtSpotPublicRESTAPI.Standard/Models/SecurityPermission.cs deleted file mode 100644 index 56fdfc7aa..000000000 --- a/DotNet/ThoughtSpotPublicRESTAPI.Standard/Models/SecurityPermission.cs +++ /dev/null @@ -1,138 +0,0 @@ -// -// Copyright (c) APIMatic. All rights reserved. -// -namespace ThoughtSpotPublicRESTAPI.Standard.Models -{ - using System; - using System.Collections.Generic; - using System.ComponentModel; - using System.IO; - using System.Linq; - using System.Text; - using System.Threading.Tasks; - using Newtonsoft.Json; - using Newtonsoft.Json.Converters; - using ThoughtSpotPublicRESTAPI.Standard; - using ThoughtSpotPublicRESTAPI.Standard.Utilities; - - /// - /// SecurityPermission. - /// - public class SecurityPermission - { - /// - /// Initializes a new instance of the class. - /// - public SecurityPermission() - { - } - - /// - /// Initializes a new instance of the class. - /// - /// id. - /// name. - /// type. - /// permission. - /// sharedPermission. - /// groupPermission. - public SecurityPermission( - string id = null, - string name = null, - string type = null, - string permission = null, - string sharedPermission = null, - List groupPermission = null) - { - this.Id = id; - this.Name = name; - this.Type = type; - this.Permission = permission; - this.SharedPermission = sharedPermission; - this.GroupPermission = groupPermission; - } - - /// - /// GUID of the user or user group - /// - [JsonProperty("id", NullValueHandling = NullValueHandling.Ignore)] - public string Id { get; set; } - - /// - /// Name of the user or user group - /// - [JsonProperty("name", NullValueHandling = NullValueHandling.Ignore)] - public string Name { get; set; } - - /// - /// Indicates the type of principal - /// - [JsonProperty("type", NullValueHandling = NullValueHandling.Ignore)] - public string Type { get; set; } - - /// - /// Indicates the permission which user or user group has on the object - /// - [JsonProperty("permission", NullValueHandling = NullValueHandling.Ignore)] - public string Permission { get; set; } - - /// - /// Indicates the permission which user or user group has on the object through sharing of the object with this user or user group - /// - [JsonProperty("sharedPermission", NullValueHandling = NullValueHandling.Ignore)] - public string SharedPermission { get; set; } - - /// - /// An array of object with details of permission on the user groups to which the user or user group belongs - /// - [JsonProperty("groupPermission", NullValueHandling = NullValueHandling.Ignore)] - public List GroupPermission { get; set; } - - /// - public override string ToString() - { - var toStringOutput = new List(); - - this.ToString(toStringOutput); - - return $"SecurityPermission : ({string.Join(", ", toStringOutput)})"; - } - - /// - public override bool Equals(object obj) - { - if (obj == null) - { - return false; - } - - if (obj == this) - { - return true; - } - - return obj is SecurityPermission other && - ((this.Id == null && other.Id == null) || (this.Id?.Equals(other.Id) == true)) && - ((this.Name == null && other.Name == null) || (this.Name?.Equals(other.Name) == true)) && - ((this.Type == null && other.Type == null) || (this.Type?.Equals(other.Type) == true)) && - ((this.Permission == null && other.Permission == null) || (this.Permission?.Equals(other.Permission) == true)) && - ((this.SharedPermission == null && other.SharedPermission == null) || (this.SharedPermission?.Equals(other.SharedPermission) == true)) && - ((this.GroupPermission == null && other.GroupPermission == null) || (this.GroupPermission?.Equals(other.GroupPermission) == true)); - } - - - /// - /// ToString overload. - /// - /// List of strings. - protected void ToString(List toStringOutput) - { - toStringOutput.Add($"this.Id = {(this.Id == null ? "null" : this.Id == string.Empty ? "" : this.Id)}"); - toStringOutput.Add($"this.Name = {(this.Name == null ? "null" : this.Name == string.Empty ? "" : this.Name)}"); - toStringOutput.Add($"this.Type = {(this.Type == null ? "null" : this.Type == string.Empty ? "" : this.Type)}"); - toStringOutput.Add($"this.Permission = {(this.Permission == null ? "null" : this.Permission == string.Empty ? "" : this.Permission)}"); - toStringOutput.Add($"this.SharedPermission = {(this.SharedPermission == null ? "null" : this.SharedPermission == string.Empty ? "" : this.SharedPermission)}"); - toStringOutput.Add($"this.GroupPermission = {(this.GroupPermission == null ? "null" : $"[{string.Join(", ", this.GroupPermission)} ]")}"); - } - } -} \ No newline at end of file diff --git a/DotNet/ThoughtSpotPublicRESTAPI.Standard/Models/SecurityPermissionResponse.cs b/DotNet/ThoughtSpotPublicRESTAPI.Standard/Models/SecurityPermissionResponse.cs deleted file mode 100644 index cc7cc3cd5..000000000 --- a/DotNet/ThoughtSpotPublicRESTAPI.Standard/Models/SecurityPermissionResponse.cs +++ /dev/null @@ -1,149 +0,0 @@ -// -// Copyright (c) APIMatic. All rights reserved. -// -namespace ThoughtSpotPublicRESTAPI.Standard.Models -{ - using System; - using System.Collections.Generic; - using System.ComponentModel; - using System.IO; - using System.Linq; - using System.Text; - using System.Threading.Tasks; - using Newtonsoft.Json; - using Newtonsoft.Json.Converters; - using ThoughtSpotPublicRESTAPI.Standard; - using ThoughtSpotPublicRESTAPI.Standard.Utilities; - - /// - /// SecurityPermissionResponse. - /// - public class SecurityPermissionResponse - { - /// - /// Initializes a new instance of the class. - /// - public SecurityPermissionResponse() - { - } - - /// - /// Initializes a new instance of the class. - /// - /// id. - /// name. - /// type. - /// owner. - /// author. - /// permissions. - /// dependents. - public SecurityPermissionResponse( - string id = null, - string name = null, - string type = null, - string owner = null, - Models.UserNameAndID author = null, - List permissions = null, - List dependents = null) - { - this.Id = id; - this.Name = name; - this.Type = type; - this.Owner = owner; - this.Author = author; - this.Permissions = permissions; - this.Dependents = dependents; - } - - /// - /// GUID of the object - /// - [JsonProperty("id", NullValueHandling = NullValueHandling.Ignore)] - public string Id { get; set; } - - /// - /// Name of the object - /// - [JsonProperty("name", NullValueHandling = NullValueHandling.Ignore)] - public string Name { get; set; } - - /// - /// Indicates the type of the object - /// - [JsonProperty("type", NullValueHandling = NullValueHandling.Ignore)] - public string Type { get; set; } - - /// - /// GUID of the owner of the object - /// - [JsonProperty("owner", NullValueHandling = NullValueHandling.Ignore)] - public string Owner { get; set; } - - /// - /// Gets or sets Author. - /// - [JsonProperty("author", NullValueHandling = NullValueHandling.Ignore)] - public Models.UserNameAndID Author { get; set; } - - /// - /// An array of object with details of permission on users and user groups - /// - [JsonProperty("permissions", NullValueHandling = NullValueHandling.Ignore)] - public List Permissions { get; set; } - - /// - /// The objects on which the primary object is dependent on - /// - [JsonProperty("dependents", NullValueHandling = NullValueHandling.Ignore)] - public List Dependents { get; set; } - - /// - public override string ToString() - { - var toStringOutput = new List(); - - this.ToString(toStringOutput); - - return $"SecurityPermissionResponse : ({string.Join(", ", toStringOutput)})"; - } - - /// - public override bool Equals(object obj) - { - if (obj == null) - { - return false; - } - - if (obj == this) - { - return true; - } - - return obj is SecurityPermissionResponse other && - ((this.Id == null && other.Id == null) || (this.Id?.Equals(other.Id) == true)) && - ((this.Name == null && other.Name == null) || (this.Name?.Equals(other.Name) == true)) && - ((this.Type == null && other.Type == null) || (this.Type?.Equals(other.Type) == true)) && - ((this.Owner == null && other.Owner == null) || (this.Owner?.Equals(other.Owner) == true)) && - ((this.Author == null && other.Author == null) || (this.Author?.Equals(other.Author) == true)) && - ((this.Permissions == null && other.Permissions == null) || (this.Permissions?.Equals(other.Permissions) == true)) && - ((this.Dependents == null && other.Dependents == null) || (this.Dependents?.Equals(other.Dependents) == true)); - } - - - /// - /// ToString overload. - /// - /// List of strings. - protected void ToString(List toStringOutput) - { - toStringOutput.Add($"this.Id = {(this.Id == null ? "null" : this.Id == string.Empty ? "" : this.Id)}"); - toStringOutput.Add($"this.Name = {(this.Name == null ? "null" : this.Name == string.Empty ? "" : this.Name)}"); - toStringOutput.Add($"this.Type = {(this.Type == null ? "null" : this.Type == string.Empty ? "" : this.Type)}"); - toStringOutput.Add($"this.Owner = {(this.Owner == null ? "null" : this.Owner == string.Empty ? "" : this.Owner)}"); - toStringOutput.Add($"this.Author = {(this.Author == null ? "null" : this.Author.ToString())}"); - toStringOutput.Add($"this.Permissions = {(this.Permissions == null ? "null" : $"[{string.Join(", ", this.Permissions)} ]")}"); - toStringOutput.Add($"this.Dependents = {(this.Dependents == null ? "null" : $"[{string.Join(", ", this.Dependents)} ]")}"); - } - } -} \ No newline at end of file diff --git a/DotNet/ThoughtSpotPublicRESTAPI.Standard/Models/SessionLoginResponse.cs b/DotNet/ThoughtSpotPublicRESTAPI.Standard/Models/SessionLoginResponse.cs deleted file mode 100644 index 79b91736e..000000000 --- a/DotNet/ThoughtSpotPublicRESTAPI.Standard/Models/SessionLoginResponse.cs +++ /dev/null @@ -1,127 +0,0 @@ -// -// Copyright (c) APIMatic. All rights reserved. -// -namespace ThoughtSpotPublicRESTAPI.Standard.Models -{ - using System; - using System.Collections.Generic; - using System.ComponentModel; - using System.IO; - using System.Linq; - using System.Text; - using System.Threading.Tasks; - using Newtonsoft.Json; - using Newtonsoft.Json.Converters; - using ThoughtSpotPublicRESTAPI.Standard; - using ThoughtSpotPublicRESTAPI.Standard.Utilities; - - /// - /// SessionLoginResponse. - /// - public class SessionLoginResponse - { - /// - /// Initializes a new instance of the class. - /// - public SessionLoginResponse() - { - } - - /// - /// Initializes a new instance of the class. - /// - /// userName. - /// token. - /// tokenCreatedTime. - /// tokenExpiryDuration. - /// tokenType. - public SessionLoginResponse( - string userName = null, - string token = null, - string tokenCreatedTime = null, - string tokenExpiryDuration = null, - string tokenType = null) - { - this.UserName = userName; - this.Token = token; - this.TokenCreatedTime = tokenCreatedTime; - this.TokenExpiryDuration = tokenExpiryDuration; - this.TokenType = tokenType; - } - - /// - /// Username of the user account for which token is generated - /// - [JsonProperty("userName", NullValueHandling = NullValueHandling.Ignore)] - public string UserName { get; set; } - - /// - /// Bearer token generated. This will be blank when token type is Cookie - /// - [JsonProperty("token", NullValueHandling = NullValueHandling.Ignore)] - public string Token { get; set; } - - /// - /// Date and time at which the token is generated - /// - [JsonProperty("tokenCreatedTime", NullValueHandling = NullValueHandling.Ignore)] - public string TokenCreatedTime { get; set; } - - /// - /// Duration in seconds after which the token expires - /// - [JsonProperty("tokenExpiryDuration", NullValueHandling = NullValueHandling.Ignore)] - public string TokenExpiryDuration { get; set; } - - /// - /// Type of token generated - /// - [JsonProperty("tokenType", NullValueHandling = NullValueHandling.Ignore)] - public string TokenType { get; set; } - - /// - public override string ToString() - { - var toStringOutput = new List(); - - this.ToString(toStringOutput); - - return $"SessionLoginResponse : ({string.Join(", ", toStringOutput)})"; - } - - /// - public override bool Equals(object obj) - { - if (obj == null) - { - return false; - } - - if (obj == this) - { - return true; - } - - return obj is SessionLoginResponse other && - ((this.UserName == null && other.UserName == null) || (this.UserName?.Equals(other.UserName) == true)) && - ((this.Token == null && other.Token == null) || (this.Token?.Equals(other.Token) == true)) && - ((this.TokenCreatedTime == null && other.TokenCreatedTime == null) || (this.TokenCreatedTime?.Equals(other.TokenCreatedTime) == true)) && - ((this.TokenExpiryDuration == null && other.TokenExpiryDuration == null) || (this.TokenExpiryDuration?.Equals(other.TokenExpiryDuration) == true)) && - ((this.TokenType == null && other.TokenType == null) || (this.TokenType?.Equals(other.TokenType) == true)); - } - - - /// - /// ToString overload. - /// - /// List of strings. - protected void ToString(List toStringOutput) - { - toStringOutput.Add($"this.UserName = {(this.UserName == null ? "null" : this.UserName == string.Empty ? "" : this.UserName)}"); - toStringOutput.Add($"this.Token = {(this.Token == null ? "null" : this.Token == string.Empty ? "" : this.Token)}"); - toStringOutput.Add($"this.TokenCreatedTime = {(this.TokenCreatedTime == null ? "null" : this.TokenCreatedTime == string.Empty ? "" : this.TokenCreatedTime)}"); - toStringOutput.Add($"this.TokenExpiryDuration = {(this.TokenExpiryDuration == null ? "null" : this.TokenExpiryDuration == string.Empty ? "" : this.TokenExpiryDuration)}"); - toStringOutput.Add($"this.TokenType = {(this.TokenType == null ? "null" : this.TokenType == string.Empty ? "" : this.TokenType)}"); - } - } -} \ No newline at end of file diff --git a/DotNet/ThoughtSpotPublicRESTAPI.Standard/Models/SortBy1Enum.cs b/DotNet/ThoughtSpotPublicRESTAPI.Standard/Models/SortBy1Enum.cs deleted file mode 100644 index 66b0291c0..000000000 --- a/DotNet/ThoughtSpotPublicRESTAPI.Standard/Models/SortBy1Enum.cs +++ /dev/null @@ -1,93 +0,0 @@ -// -// Copyright (c) APIMatic. All rights reserved. -// -namespace ThoughtSpotPublicRESTAPI.Standard.Models -{ - using System; - using System.Collections.Generic; - using System.Linq; - using System.Runtime.Serialization; - using Newtonsoft.Json; - using Newtonsoft.Json.Converters; - using ThoughtSpotPublicRESTAPI.Standard; - using ThoughtSpotPublicRESTAPI.Standard.Utilities; - - /// - /// SortBy1Enum. - /// - [JsonConverter(typeof(StringEnumConverter))] - public enum SortBy1Enum - { - /// - /// DEFAULT. - /// - [EnumMember(Value = "DEFAULT")] - DEFAULT, - - /// - /// NAME. - /// - [EnumMember(Value = "NAME")] - NAME, - - /// - /// DISPLAYNAME. - /// - [EnumMember(Value = "DISPLAY_NAME")] - DISPLAYNAME, - - /// - /// AUTHOR. - /// - [EnumMember(Value = "AUTHOR")] - AUTHOR, - - /// - /// CREATED. - /// - [EnumMember(Value = "CREATED")] - CREATED, - - /// - /// MODIFIED. - /// - [EnumMember(Value = "MODIFIED")] - MODIFIED, - - /// - /// LASTACCESSED. - /// - [EnumMember(Value = "LAST_ACCESSED")] - LASTACCESSED, - - /// - /// SYNCED. - /// - [EnumMember(Value = "SYNCED")] - SYNCED, - - /// - /// VIEWS. - /// - [EnumMember(Value = "VIEWS")] - VIEWS, - - /// - /// NONE. - /// - [EnumMember(Value = "NONE")] - NONE, - - /// - /// USERSTATE. - /// - [EnumMember(Value = "USER_STATE")] - USERSTATE, - - /// - /// ROWCOUNT. - /// - [EnumMember(Value = "ROW_COUNT")] - ROWCOUNT - } -} \ No newline at end of file diff --git a/DotNet/ThoughtSpotPublicRESTAPI.Standard/Models/SortByEnum.cs b/DotNet/ThoughtSpotPublicRESTAPI.Standard/Models/SortByEnum.cs deleted file mode 100644 index b26535d8d..000000000 --- a/DotNet/ThoughtSpotPublicRESTAPI.Standard/Models/SortByEnum.cs +++ /dev/null @@ -1,93 +0,0 @@ -// -// Copyright (c) APIMatic. All rights reserved. -// -namespace ThoughtSpotPublicRESTAPI.Standard.Models -{ - using System; - using System.Collections.Generic; - using System.Linq; - using System.Runtime.Serialization; - using Newtonsoft.Json; - using Newtonsoft.Json.Converters; - using ThoughtSpotPublicRESTAPI.Standard; - using ThoughtSpotPublicRESTAPI.Standard.Utilities; - - /// - /// SortByEnum. - /// - [JsonConverter(typeof(StringEnumConverter))] - public enum SortByEnum - { - /// - /// DEFAULT. - /// - [EnumMember(Value = "DEFAULT")] - DEFAULT, - - /// - /// NAME. - /// - [EnumMember(Value = "NAME")] - NAME, - - /// - /// DISPLAYNAME. - /// - [EnumMember(Value = "DISPLAY_NAME")] - DISPLAYNAME, - - /// - /// AUTHOR. - /// - [EnumMember(Value = "AUTHOR")] - AUTHOR, - - /// - /// CREATED. - /// - [EnumMember(Value = "CREATED")] - CREATED, - - /// - /// MODIFIED. - /// - [EnumMember(Value = "MODIFIED")] - MODIFIED, - - /// - /// LASTACCESSED. - /// - [EnumMember(Value = "LAST_ACCESSED")] - LASTACCESSED, - - /// - /// SYNCED. - /// - [EnumMember(Value = "SYNCED")] - SYNCED, - - /// - /// VIEWS. - /// - [EnumMember(Value = "VIEWS")] - VIEWS, - - /// - /// NONE. - /// - [EnumMember(Value = "NONE")] - NONE, - - /// - /// USERSTATE. - /// - [EnumMember(Value = "USER_STATE")] - USERSTATE, - - /// - /// ROWCOUNT. - /// - [EnumMember(Value = "ROW_COUNT")] - ROWCOUNT - } -} \ No newline at end of file diff --git a/DotNet/ThoughtSpotPublicRESTAPI.Standard/Models/SortOrder1Enum.cs b/DotNet/ThoughtSpotPublicRESTAPI.Standard/Models/SortOrder1Enum.cs deleted file mode 100644 index 546a3d802..000000000 --- a/DotNet/ThoughtSpotPublicRESTAPI.Standard/Models/SortOrder1Enum.cs +++ /dev/null @@ -1,39 +0,0 @@ -// -// Copyright (c) APIMatic. All rights reserved. -// -namespace ThoughtSpotPublicRESTAPI.Standard.Models -{ - using System; - using System.Collections.Generic; - using System.Linq; - using System.Runtime.Serialization; - using Newtonsoft.Json; - using Newtonsoft.Json.Converters; - using ThoughtSpotPublicRESTAPI.Standard; - using ThoughtSpotPublicRESTAPI.Standard.Utilities; - - /// - /// SortOrder1Enum. - /// - [JsonConverter(typeof(StringEnumConverter))] - public enum SortOrder1Enum - { - /// - /// DEFAULT. - /// - [EnumMember(Value = "DEFAULT")] - DEFAULT, - - /// - /// ASC. - /// - [EnumMember(Value = "ASC")] - ASC, - - /// - /// DESC. - /// - [EnumMember(Value = "DESC")] - DESC - } -} \ No newline at end of file diff --git a/DotNet/ThoughtSpotPublicRESTAPI.Standard/Models/SortOrderEnum.cs b/DotNet/ThoughtSpotPublicRESTAPI.Standard/Models/SortOrderEnum.cs deleted file mode 100644 index 0312c9c92..000000000 --- a/DotNet/ThoughtSpotPublicRESTAPI.Standard/Models/SortOrderEnum.cs +++ /dev/null @@ -1,39 +0,0 @@ -// -// Copyright (c) APIMatic. All rights reserved. -// -namespace ThoughtSpotPublicRESTAPI.Standard.Models -{ - using System; - using System.Collections.Generic; - using System.Linq; - using System.Runtime.Serialization; - using Newtonsoft.Json; - using Newtonsoft.Json.Converters; - using ThoughtSpotPublicRESTAPI.Standard; - using ThoughtSpotPublicRESTAPI.Standard.Utilities; - - /// - /// SortOrderEnum. - /// - [JsonConverter(typeof(StringEnumConverter))] - public enum SortOrderEnum - { - /// - /// DEFAULT. - /// - [EnumMember(Value = "DEFAULT")] - DEFAULT, - - /// - /// ASC. - /// - [EnumMember(Value = "ASC")] - ASC, - - /// - /// DESC. - /// - [EnumMember(Value = "DESC")] - DESC - } -} \ No newline at end of file diff --git a/DotNet/ThoughtSpotPublicRESTAPI.Standard/Models/State1Enum.cs b/DotNet/ThoughtSpotPublicRESTAPI.Standard/Models/State1Enum.cs deleted file mode 100644 index 12cd28f38..000000000 --- a/DotNet/ThoughtSpotPublicRESTAPI.Standard/Models/State1Enum.cs +++ /dev/null @@ -1,51 +0,0 @@ -// -// Copyright (c) APIMatic. All rights reserved. -// -namespace ThoughtSpotPublicRESTAPI.Standard.Models -{ - using System; - using System.Collections.Generic; - using System.Linq; - using System.Runtime.Serialization; - using Newtonsoft.Json; - using Newtonsoft.Json.Converters; - using ThoughtSpotPublicRESTAPI.Standard; - using ThoughtSpotPublicRESTAPI.Standard.Utilities; - - /// - /// State1Enum. - /// - [JsonConverter(typeof(StringEnumConverter))] - public enum State1Enum - { - /// - /// ACTIVE. - /// - [EnumMember(Value = "ACTIVE")] - ACTIVE, - - /// - /// INACTIVE. - /// - [EnumMember(Value = "INACTIVE")] - INACTIVE, - - /// - /// EXPIRED. - /// - [EnumMember(Value = "EXPIRED")] - EXPIRED, - - /// - /// LOCKED. - /// - [EnumMember(Value = "LOCKED")] - LOCKED, - - /// - /// PENDING. - /// - [EnumMember(Value = "PENDING")] - PENDING - } -} \ No newline at end of file diff --git a/DotNet/ThoughtSpotPublicRESTAPI.Standard/Models/StateEnum.cs b/DotNet/ThoughtSpotPublicRESTAPI.Standard/Models/StateEnum.cs deleted file mode 100644 index 987ddf4d2..000000000 --- a/DotNet/ThoughtSpotPublicRESTAPI.Standard/Models/StateEnum.cs +++ /dev/null @@ -1,51 +0,0 @@ -// -// Copyright (c) APIMatic. All rights reserved. -// -namespace ThoughtSpotPublicRESTAPI.Standard.Models -{ - using System; - using System.Collections.Generic; - using System.Linq; - using System.Runtime.Serialization; - using Newtonsoft.Json; - using Newtonsoft.Json.Converters; - using ThoughtSpotPublicRESTAPI.Standard; - using ThoughtSpotPublicRESTAPI.Standard.Utilities; - - /// - /// StateEnum. - /// - [JsonConverter(typeof(StringEnumConverter))] - public enum StateEnum - { - /// - /// ACTIVE. - /// - [EnumMember(Value = "ACTIVE")] - ACTIVE, - - /// - /// INACTIVE. - /// - [EnumMember(Value = "INACTIVE")] - INACTIVE, - - /// - /// EXPIRED. - /// - [EnumMember(Value = "EXPIRED")] - EXPIRED, - - /// - /// LOCKED. - /// - [EnumMember(Value = "LOCKED")] - LOCKED, - - /// - /// PENDING. - /// - [EnumMember(Value = "PENDING")] - PENDING - } -} \ No newline at end of file diff --git a/DotNet/ThoughtSpotPublicRESTAPI.Standard/Models/TableColumns.cs b/DotNet/ThoughtSpotPublicRESTAPI.Standard/Models/TableColumns.cs deleted file mode 100644 index 660cbf411..000000000 --- a/DotNet/ThoughtSpotPublicRESTAPI.Standard/Models/TableColumns.cs +++ /dev/null @@ -1,94 +0,0 @@ -// -// Copyright (c) APIMatic. All rights reserved. -// -namespace ThoughtSpotPublicRESTAPI.Standard.Models -{ - using System; - using System.Collections.Generic; - using System.ComponentModel; - using System.IO; - using System.Linq; - using System.Text; - using System.Threading.Tasks; - using Newtonsoft.Json; - using Newtonsoft.Json.Converters; - using ThoughtSpotPublicRESTAPI.Standard; - using ThoughtSpotPublicRESTAPI.Standard.Utilities; - - /// - /// TableColumns. - /// - public class TableColumns - { - /// - /// Initializes a new instance of the class. - /// - public TableColumns() - { - } - - /// - /// Initializes a new instance of the class. - /// - /// name. - /// dataType. - public TableColumns( - string name = null, - string dataType = null) - { - this.Name = name; - this.DataType = dataType; - } - - /// - /// Name of the column - /// - [JsonProperty("name", NullValueHandling = NullValueHandling.Ignore)] - public string Name { get; set; } - - /// - /// Datatype of the column - /// - [JsonProperty("dataType", NullValueHandling = NullValueHandling.Ignore)] - public string DataType { get; set; } - - /// - public override string ToString() - { - var toStringOutput = new List(); - - this.ToString(toStringOutput); - - return $"TableColumns : ({string.Join(", ", toStringOutput)})"; - } - - /// - public override bool Equals(object obj) - { - if (obj == null) - { - return false; - } - - if (obj == this) - { - return true; - } - - return obj is TableColumns other && - ((this.Name == null && other.Name == null) || (this.Name?.Equals(other.Name) == true)) && - ((this.DataType == null && other.DataType == null) || (this.DataType?.Equals(other.DataType) == true)); - } - - - /// - /// ToString overload. - /// - /// List of strings. - protected void ToString(List toStringOutput) - { - toStringOutput.Add($"this.Name = {(this.Name == null ? "null" : this.Name == string.Empty ? "" : this.Name)}"); - toStringOutput.Add($"this.DataType = {(this.DataType == null ? "null" : this.DataType == string.Empty ? "" : this.DataType)}"); - } - } -} \ No newline at end of file diff --git a/DotNet/ThoughtSpotPublicRESTAPI.Standard/Models/TableInput.cs b/DotNet/ThoughtSpotPublicRESTAPI.Standard/Models/TableInput.cs deleted file mode 100644 index c567e173b..000000000 --- a/DotNet/ThoughtSpotPublicRESTAPI.Standard/Models/TableInput.cs +++ /dev/null @@ -1,94 +0,0 @@ -// -// Copyright (c) APIMatic. All rights reserved. -// -namespace ThoughtSpotPublicRESTAPI.Standard.Models -{ - using System; - using System.Collections.Generic; - using System.ComponentModel; - using System.IO; - using System.Linq; - using System.Text; - using System.Threading.Tasks; - using Newtonsoft.Json; - using Newtonsoft.Json.Converters; - using ThoughtSpotPublicRESTAPI.Standard; - using ThoughtSpotPublicRESTAPI.Standard.Utilities; - - /// - /// TableInput. - /// - public class TableInput - { - /// - /// Initializes a new instance of the class. - /// - public TableInput() - { - } - - /// - /// Initializes a new instance of the class. - /// - /// name. - /// id. - public TableInput( - string name = null, - string id = null) - { - this.Name = name; - this.Id = id; - } - - /// - /// Name of the table - /// - [JsonProperty("name", NullValueHandling = NullValueHandling.Ignore)] - public string Name { get; set; } - - /// - /// GUID of the Table - /// - [JsonProperty("id", NullValueHandling = NullValueHandling.Ignore)] - public string Id { get; set; } - - /// - public override string ToString() - { - var toStringOutput = new List(); - - this.ToString(toStringOutput); - - return $"TableInput : ({string.Join(", ", toStringOutput)})"; - } - - /// - public override bool Equals(object obj) - { - if (obj == null) - { - return false; - } - - if (obj == this) - { - return true; - } - - return obj is TableInput other && - ((this.Name == null && other.Name == null) || (this.Name?.Equals(other.Name) == true)) && - ((this.Id == null && other.Id == null) || (this.Id?.Equals(other.Id) == true)); - } - - - /// - /// ToString overload. - /// - /// List of strings. - protected void ToString(List toStringOutput) - { - toStringOutput.Add($"this.Name = {(this.Name == null ? "null" : this.Name == string.Empty ? "" : this.Name)}"); - toStringOutput.Add($"this.Id = {(this.Id == null ? "null" : this.Id == string.Empty ? "" : this.Id)}"); - } - } -} \ No newline at end of file diff --git a/DotNet/ThoughtSpotPublicRESTAPI.Standard/Models/TableList.cs b/DotNet/ThoughtSpotPublicRESTAPI.Standard/Models/TableList.cs deleted file mode 100644 index 0121dbdc1..000000000 --- a/DotNet/ThoughtSpotPublicRESTAPI.Standard/Models/TableList.cs +++ /dev/null @@ -1,259 +0,0 @@ -// -// Copyright (c) APIMatic. All rights reserved. -// -namespace ThoughtSpotPublicRESTAPI.Standard.Models -{ - using System; - using System.Collections.Generic; - using System.ComponentModel; - using System.IO; - using System.Linq; - using System.Text; - using System.Threading.Tasks; - using Newtonsoft.Json; - using Newtonsoft.Json.Converters; - using ThoughtSpotPublicRESTAPI.Standard; - using ThoughtSpotPublicRESTAPI.Standard.Utilities; - - /// - /// TableList. - /// - public class TableList - { - /// - /// Initializes a new instance of the class. - /// - public TableList() - { - } - - /// - /// Initializes a new instance of the class. - /// - /// name. - /// type. - /// id. - /// databaseStripe. - /// schemaStripe. - /// isExternal. - /// isDeprecated. - /// isDeleted. - /// isHidden. - /// indexVersion. - /// generationNum. - /// created. - /// modified. - /// author. - /// modifiedBy. - /// owner. - /// tags. - public TableList( - string name = null, - string type = null, - string id = null, - string databaseStripe = null, - string schemaStripe = null, - bool? isExternal = null, - bool? isDeprecated = null, - bool? isDeleted = null, - bool? isHidden = null, - double? indexVersion = null, - double? generationNum = null, - string created = null, - string modified = null, - Models.UserNameAndID author = null, - Models.UserNameAndID modifiedBy = null, - Models.UserNameAndID owner = null, - List tags = null) - { - this.Name = name; - this.Type = type; - this.Id = id; - this.DatabaseStripe = databaseStripe; - this.SchemaStripe = schemaStripe; - this.IsExternal = isExternal; - this.IsDeprecated = isDeprecated; - this.IsDeleted = isDeleted; - this.IsHidden = isHidden; - this.IndexVersion = indexVersion; - this.GenerationNum = generationNum; - this.Created = created; - this.Modified = modified; - this.Author = author; - this.ModifiedBy = modifiedBy; - this.Owner = owner; - this.Tags = tags; - } - - /// - /// Name of the table - /// - [JsonProperty("name", NullValueHandling = NullValueHandling.Ignore)] - public string Name { get; set; } - - /// - /// Type of the table - /// - [JsonProperty("type", NullValueHandling = NullValueHandling.Ignore)] - public string Type { get; set; } - - /// - /// GUID of the table - /// - [JsonProperty("id", NullValueHandling = NullValueHandling.Ignore)] - public string Id { get; set; } - - /// - /// Name of the database to which the table belongs - /// - [JsonProperty("databaseStripe", NullValueHandling = NullValueHandling.Ignore)] - public string DatabaseStripe { get; set; } - - /// - /// Name of the schema to which the table belongs - /// - [JsonProperty("schemaStripe", NullValueHandling = NullValueHandling.Ignore)] - public string SchemaStripe { get; set; } - - /// - /// Gets or sets IsExternal. - /// - [JsonProperty("isExternal", NullValueHandling = NullValueHandling.Ignore)] - public bool? IsExternal { get; set; } - - /// - /// Indicates if the table is deprecated - /// - [JsonProperty("isDeprecated", NullValueHandling = NullValueHandling.Ignore)] - public bool? IsDeprecated { get; set; } - - /// - /// Indicates if the table is deleted - /// - [JsonProperty("isDeleted", NullValueHandling = NullValueHandling.Ignore)] - public bool? IsDeleted { get; set; } - - /// - /// Indicates if the table is hideen - /// - [JsonProperty("isHidden", NullValueHandling = NullValueHandling.Ignore)] - public bool? IsHidden { get; set; } - - /// - /// Gets or sets IndexVersion. - /// - [JsonProperty("indexVersion", NullValueHandling = NullValueHandling.Ignore)] - public double? IndexVersion { get; set; } - - /// - /// Gets or sets GenerationNum. - /// - [JsonProperty("generationNum", NullValueHandling = NullValueHandling.Ignore)] - public double? GenerationNum { get; set; } - - /// - /// Date and time when the table was created - /// - [JsonProperty("created", NullValueHandling = NullValueHandling.Ignore)] - public string Created { get; set; } - - /// - /// Date and time of last modification of the table - /// - [JsonProperty("modified", NullValueHandling = NullValueHandling.Ignore)] - public string Modified { get; set; } - - /// - /// Gets or sets Author. - /// - [JsonProperty("author", NullValueHandling = NullValueHandling.Ignore)] - public Models.UserNameAndID Author { get; set; } - - /// - /// Gets or sets ModifiedBy. - /// - [JsonProperty("modifiedBy", NullValueHandling = NullValueHandling.Ignore)] - public Models.UserNameAndID ModifiedBy { get; set; } - - /// - /// Gets or sets Owner. - /// - [JsonProperty("owner", NullValueHandling = NullValueHandling.Ignore)] - public Models.UserNameAndID Owner { get; set; } - - /// - /// List of tags assigned to the table - /// - [JsonProperty("tags", NullValueHandling = NullValueHandling.Ignore)] - public List Tags { get; set; } - - /// - public override string ToString() - { - var toStringOutput = new List(); - - this.ToString(toStringOutput); - - return $"TableList : ({string.Join(", ", toStringOutput)})"; - } - - /// - public override bool Equals(object obj) - { - if (obj == null) - { - return false; - } - - if (obj == this) - { - return true; - } - - return obj is TableList other && - ((this.Name == null && other.Name == null) || (this.Name?.Equals(other.Name) == true)) && - ((this.Type == null && other.Type == null) || (this.Type?.Equals(other.Type) == true)) && - ((this.Id == null && other.Id == null) || (this.Id?.Equals(other.Id) == true)) && - ((this.DatabaseStripe == null && other.DatabaseStripe == null) || (this.DatabaseStripe?.Equals(other.DatabaseStripe) == true)) && - ((this.SchemaStripe == null && other.SchemaStripe == null) || (this.SchemaStripe?.Equals(other.SchemaStripe) == true)) && - ((this.IsExternal == null && other.IsExternal == null) || (this.IsExternal?.Equals(other.IsExternal) == true)) && - ((this.IsDeprecated == null && other.IsDeprecated == null) || (this.IsDeprecated?.Equals(other.IsDeprecated) == true)) && - ((this.IsDeleted == null && other.IsDeleted == null) || (this.IsDeleted?.Equals(other.IsDeleted) == true)) && - ((this.IsHidden == null && other.IsHidden == null) || (this.IsHidden?.Equals(other.IsHidden) == true)) && - ((this.IndexVersion == null && other.IndexVersion == null) || (this.IndexVersion?.Equals(other.IndexVersion) == true)) && - ((this.GenerationNum == null && other.GenerationNum == null) || (this.GenerationNum?.Equals(other.GenerationNum) == true)) && - ((this.Created == null && other.Created == null) || (this.Created?.Equals(other.Created) == true)) && - ((this.Modified == null && other.Modified == null) || (this.Modified?.Equals(other.Modified) == true)) && - ((this.Author == null && other.Author == null) || (this.Author?.Equals(other.Author) == true)) && - ((this.ModifiedBy == null && other.ModifiedBy == null) || (this.ModifiedBy?.Equals(other.ModifiedBy) == true)) && - ((this.Owner == null && other.Owner == null) || (this.Owner?.Equals(other.Owner) == true)) && - ((this.Tags == null && other.Tags == null) || (this.Tags?.Equals(other.Tags) == true)); - } - - - /// - /// ToString overload. - /// - /// List of strings. - protected void ToString(List toStringOutput) - { - toStringOutput.Add($"this.Name = {(this.Name == null ? "null" : this.Name == string.Empty ? "" : this.Name)}"); - toStringOutput.Add($"this.Type = {(this.Type == null ? "null" : this.Type == string.Empty ? "" : this.Type)}"); - toStringOutput.Add($"this.Id = {(this.Id == null ? "null" : this.Id == string.Empty ? "" : this.Id)}"); - toStringOutput.Add($"this.DatabaseStripe = {(this.DatabaseStripe == null ? "null" : this.DatabaseStripe == string.Empty ? "" : this.DatabaseStripe)}"); - toStringOutput.Add($"this.SchemaStripe = {(this.SchemaStripe == null ? "null" : this.SchemaStripe == string.Empty ? "" : this.SchemaStripe)}"); - toStringOutput.Add($"this.IsExternal = {(this.IsExternal == null ? "null" : this.IsExternal.ToString())}"); - toStringOutput.Add($"this.IsDeprecated = {(this.IsDeprecated == null ? "null" : this.IsDeprecated.ToString())}"); - toStringOutput.Add($"this.IsDeleted = {(this.IsDeleted == null ? "null" : this.IsDeleted.ToString())}"); - toStringOutput.Add($"this.IsHidden = {(this.IsHidden == null ? "null" : this.IsHidden.ToString())}"); - toStringOutput.Add($"this.IndexVersion = {(this.IndexVersion == null ? "null" : this.IndexVersion.ToString())}"); - toStringOutput.Add($"this.GenerationNum = {(this.GenerationNum == null ? "null" : this.GenerationNum.ToString())}"); - toStringOutput.Add($"this.Created = {(this.Created == null ? "null" : this.Created == string.Empty ? "" : this.Created)}"); - toStringOutput.Add($"this.Modified = {(this.Modified == null ? "null" : this.Modified == string.Empty ? "" : this.Modified)}"); - toStringOutput.Add($"this.Author = {(this.Author == null ? "null" : this.Author.ToString())}"); - toStringOutput.Add($"this.ModifiedBy = {(this.ModifiedBy == null ? "null" : this.ModifiedBy.ToString())}"); - toStringOutput.Add($"this.Owner = {(this.Owner == null ? "null" : this.Owner.ToString())}"); - toStringOutput.Add($"this.Tags = {(this.Tags == null ? "null" : $"[{string.Join(", ", this.Tags)} ]")}"); - } - } -} \ No newline at end of file diff --git a/DotNet/ThoughtSpotPublicRESTAPI.Standard/Models/TagNameAndID.cs b/DotNet/ThoughtSpotPublicRESTAPI.Standard/Models/TagNameAndID.cs deleted file mode 100644 index 5aaaa7f29..000000000 --- a/DotNet/ThoughtSpotPublicRESTAPI.Standard/Models/TagNameAndID.cs +++ /dev/null @@ -1,94 +0,0 @@ -// -// Copyright (c) APIMatic. All rights reserved. -// -namespace ThoughtSpotPublicRESTAPI.Standard.Models -{ - using System; - using System.Collections.Generic; - using System.ComponentModel; - using System.IO; - using System.Linq; - using System.Text; - using System.Threading.Tasks; - using Newtonsoft.Json; - using Newtonsoft.Json.Converters; - using ThoughtSpotPublicRESTAPI.Standard; - using ThoughtSpotPublicRESTAPI.Standard.Utilities; - - /// - /// TagNameAndID. - /// - public class TagNameAndID - { - /// - /// Initializes a new instance of the class. - /// - public TagNameAndID() - { - } - - /// - /// Initializes a new instance of the class. - /// - /// name. - /// id. - public TagNameAndID( - string name = null, - string id = null) - { - this.Name = name; - this.Id = id; - } - - /// - /// Name of the group to which group is added - /// - [JsonProperty("name", NullValueHandling = NullValueHandling.Ignore)] - public string Name { get; set; } - - /// - /// GUID of the group to which group is added - /// - [JsonProperty("id", NullValueHandling = NullValueHandling.Ignore)] - public string Id { get; set; } - - /// - public override string ToString() - { - var toStringOutput = new List(); - - this.ToString(toStringOutput); - - return $"TagNameAndID : ({string.Join(", ", toStringOutput)})"; - } - - /// - public override bool Equals(object obj) - { - if (obj == null) - { - return false; - } - - if (obj == this) - { - return true; - } - - return obj is TagNameAndID other && - ((this.Name == null && other.Name == null) || (this.Name?.Equals(other.Name) == true)) && - ((this.Id == null && other.Id == null) || (this.Id?.Equals(other.Id) == true)); - } - - - /// - /// ToString overload. - /// - /// List of strings. - protected void ToString(List toStringOutput) - { - toStringOutput.Add($"this.Name = {(this.Name == null ? "null" : this.Name == string.Empty ? "" : this.Name)}"); - toStringOutput.Add($"this.Id = {(this.Id == null ? "null" : this.Id == string.Empty ? "" : this.Id)}"); - } - } -} \ No newline at end of file diff --git a/DotNet/ThoughtSpotPublicRESTAPI.Standard/Models/TagNameAndIdInput.cs b/DotNet/ThoughtSpotPublicRESTAPI.Standard/Models/TagNameAndIdInput.cs deleted file mode 100644 index 694dd841f..000000000 --- a/DotNet/ThoughtSpotPublicRESTAPI.Standard/Models/TagNameAndIdInput.cs +++ /dev/null @@ -1,94 +0,0 @@ -// -// Copyright (c) APIMatic. All rights reserved. -// -namespace ThoughtSpotPublicRESTAPI.Standard.Models -{ - using System; - using System.Collections.Generic; - using System.ComponentModel; - using System.IO; - using System.Linq; - using System.Text; - using System.Threading.Tasks; - using Newtonsoft.Json; - using Newtonsoft.Json.Converters; - using ThoughtSpotPublicRESTAPI.Standard; - using ThoughtSpotPublicRESTAPI.Standard.Utilities; - - /// - /// TagNameAndIdInput. - /// - public class TagNameAndIdInput - { - /// - /// Initializes a new instance of the class. - /// - public TagNameAndIdInput() - { - } - - /// - /// Initializes a new instance of the class. - /// - /// name. - /// id. - public TagNameAndIdInput( - string name = null, - string id = null) - { - this.Name = name; - this.Id = id; - } - - /// - /// Name of the tags - /// - [JsonProperty("name", NullValueHandling = NullValueHandling.Ignore)] - public string Name { get; set; } - - /// - /// GUID of the tags - /// - [JsonProperty("id", NullValueHandling = NullValueHandling.Ignore)] - public string Id { get; set; } - - /// - public override string ToString() - { - var toStringOutput = new List(); - - this.ToString(toStringOutput); - - return $"TagNameAndIdInput : ({string.Join(", ", toStringOutput)})"; - } - - /// - public override bool Equals(object obj) - { - if (obj == null) - { - return false; - } - - if (obj == this) - { - return true; - } - - return obj is TagNameAndIdInput other && - ((this.Name == null && other.Name == null) || (this.Name?.Equals(other.Name) == true)) && - ((this.Id == null && other.Id == null) || (this.Id?.Equals(other.Id) == true)); - } - - - /// - /// ToString overload. - /// - /// List of strings. - protected void ToString(List toStringOutput) - { - toStringOutput.Add($"this.Name = {(this.Name == null ? "null" : this.Name == string.Empty ? "" : this.Name)}"); - toStringOutput.Add($"this.Id = {(this.Id == null ? "null" : this.Id == string.Empty ? "" : this.Id)}"); - } - } -} \ No newline at end of file diff --git a/DotNet/ThoughtSpotPublicRESTAPI.Standard/Models/ToUserNameAndIDInput.cs b/DotNet/ThoughtSpotPublicRESTAPI.Standard/Models/ToUserNameAndIDInput.cs deleted file mode 100644 index cb76ff013..000000000 --- a/DotNet/ThoughtSpotPublicRESTAPI.Standard/Models/ToUserNameAndIDInput.cs +++ /dev/null @@ -1,94 +0,0 @@ -// -// Copyright (c) APIMatic. All rights reserved. -// -namespace ThoughtSpotPublicRESTAPI.Standard.Models -{ - using System; - using System.Collections.Generic; - using System.ComponentModel; - using System.IO; - using System.Linq; - using System.Text; - using System.Threading.Tasks; - using Newtonsoft.Json; - using Newtonsoft.Json.Converters; - using ThoughtSpotPublicRESTAPI.Standard; - using ThoughtSpotPublicRESTAPI.Standard.Utilities; - - /// - /// ToUserNameAndIDInput. - /// - public class ToUserNameAndIDInput - { - /// - /// Initializes a new instance of the class. - /// - public ToUserNameAndIDInput() - { - } - - /// - /// Initializes a new instance of the class. - /// - /// name. - /// id. - public ToUserNameAndIDInput( - string name = null, - string id = null) - { - this.Name = name; - this.Id = id; - } - - /// - /// Username of the user - /// - [JsonProperty("name", NullValueHandling = NullValueHandling.Ignore)] - public string Name { get; set; } - - /// - /// GUID of the user - /// - [JsonProperty("id", NullValueHandling = NullValueHandling.Ignore)] - public string Id { get; set; } - - /// - public override string ToString() - { - var toStringOutput = new List(); - - this.ToString(toStringOutput); - - return $"ToUserNameAndIDInput : ({string.Join(", ", toStringOutput)})"; - } - - /// - public override bool Equals(object obj) - { - if (obj == null) - { - return false; - } - - if (obj == this) - { - return true; - } - - return obj is ToUserNameAndIDInput other && - ((this.Name == null && other.Name == null) || (this.Name?.Equals(other.Name) == true)) && - ((this.Id == null && other.Id == null) || (this.Id?.Equals(other.Id) == true)); - } - - - /// - /// ToString overload. - /// - /// List of strings. - protected void ToString(List toStringOutput) - { - toStringOutput.Add($"this.Name = {(this.Name == null ? "null" : this.Name == string.Empty ? "" : this.Name)}"); - toStringOutput.Add($"this.Id = {(this.Id == null ? "null" : this.Id == string.Empty ? "" : this.Id)}"); - } - } -} \ No newline at end of file diff --git a/DotNet/ThoughtSpotPublicRESTAPI.Standard/Models/TopicEnum.cs b/DotNet/ThoughtSpotPublicRESTAPI.Standard/Models/TopicEnum.cs deleted file mode 100644 index 8250aac33..000000000 --- a/DotNet/ThoughtSpotPublicRESTAPI.Standard/Models/TopicEnum.cs +++ /dev/null @@ -1,27 +0,0 @@ -// -// Copyright (c) APIMatic. All rights reserved. -// -namespace ThoughtSpotPublicRESTAPI.Standard.Models -{ - using System; - using System.Collections.Generic; - using System.Linq; - using System.Runtime.Serialization; - using Newtonsoft.Json; - using Newtonsoft.Json.Converters; - using ThoughtSpotPublicRESTAPI.Standard; - using ThoughtSpotPublicRESTAPI.Standard.Utilities; - - /// - /// TopicEnum. - /// - [JsonConverter(typeof(StringEnumConverter))] - public enum TopicEnum - { - /// - /// SecurityLogs. - /// - [EnumMember(Value = "security_logs")] - SecurityLogs - } -} \ No newline at end of file diff --git a/DotNet/ThoughtSpotPublicRESTAPI.Standard/Models/TsObjectInput.cs b/DotNet/ThoughtSpotPublicRESTAPI.Standard/Models/TsObjectInput.cs deleted file mode 100644 index 8fc657ecd..000000000 --- a/DotNet/ThoughtSpotPublicRESTAPI.Standard/Models/TsObjectInput.cs +++ /dev/null @@ -1,94 +0,0 @@ -// -// Copyright (c) APIMatic. All rights reserved. -// -namespace ThoughtSpotPublicRESTAPI.Standard.Models -{ - using System; - using System.Collections.Generic; - using System.ComponentModel; - using System.IO; - using System.Linq; - using System.Text; - using System.Threading.Tasks; - using Newtonsoft.Json; - using Newtonsoft.Json.Converters; - using ThoughtSpotPublicRESTAPI.Standard; - using ThoughtSpotPublicRESTAPI.Standard.Utilities; - - /// - /// TsObjectInput. - /// - public class TsObjectInput - { - /// - /// Initializes a new instance of the class. - /// - public TsObjectInput() - { - } - - /// - /// Initializes a new instance of the class. - /// - /// id. - /// type. - public TsObjectInput( - string id, - Models.TypeEnum type) - { - this.Id = id; - this.Type = type; - } - - /// - /// GUID of the metadata object - /// - [JsonProperty("id")] - public string Id { get; set; } - - /// - /// Type of the metadata object - /// - [JsonProperty("type", ItemConverterType = typeof(StringEnumConverter))] - public Models.TypeEnum Type { get; set; } - - /// - public override string ToString() - { - var toStringOutput = new List(); - - this.ToString(toStringOutput); - - return $"TsObjectInput : ({string.Join(", ", toStringOutput)})"; - } - - /// - public override bool Equals(object obj) - { - if (obj == null) - { - return false; - } - - if (obj == this) - { - return true; - } - - return obj is TsObjectInput other && - ((this.Id == null && other.Id == null) || (this.Id?.Equals(other.Id) == true)) && - this.Type.Equals(other.Type); - } - - - /// - /// ToString overload. - /// - /// List of strings. - protected void ToString(List toStringOutput) - { - toStringOutput.Add($"this.Id = {(this.Id == null ? "null" : this.Id == string.Empty ? "" : this.Id)}"); - toStringOutput.Add($"this.Type = {this.Type}"); - } - } -} \ No newline at end of file diff --git a/DotNet/ThoughtSpotPublicRESTAPI.Standard/Models/TsObjectSearchInput.cs b/DotNet/ThoughtSpotPublicRESTAPI.Standard/Models/TsObjectSearchInput.cs deleted file mode 100644 index cf2bfa5a8..000000000 --- a/DotNet/ThoughtSpotPublicRESTAPI.Standard/Models/TsObjectSearchInput.cs +++ /dev/null @@ -1,94 +0,0 @@ -// -// Copyright (c) APIMatic. All rights reserved. -// -namespace ThoughtSpotPublicRESTAPI.Standard.Models -{ - using System; - using System.Collections.Generic; - using System.ComponentModel; - using System.IO; - using System.Linq; - using System.Text; - using System.Threading.Tasks; - using Newtonsoft.Json; - using Newtonsoft.Json.Converters; - using ThoughtSpotPublicRESTAPI.Standard; - using ThoughtSpotPublicRESTAPI.Standard.Utilities; - - /// - /// TsObjectSearchInput. - /// - public class TsObjectSearchInput - { - /// - /// Initializes a new instance of the class. - /// - public TsObjectSearchInput() - { - } - - /// - /// Initializes a new instance of the class. - /// - /// type. - /// id. - public TsObjectSearchInput( - Models.Type2Enum type, - List id) - { - this.Type = type; - this.Id = id; - } - - /// - /// Type of the metadata objec - /// - [JsonProperty("type", ItemConverterType = typeof(StringEnumConverter))] - public Models.Type2Enum Type { get; set; } - - /// - /// A JSON Array of GUIDs of the metadata object - /// - [JsonProperty("id")] - public List Id { get; set; } - - /// - public override string ToString() - { - var toStringOutput = new List(); - - this.ToString(toStringOutput); - - return $"TsObjectSearchInput : ({string.Join(", ", toStringOutput)})"; - } - - /// - public override bool Equals(object obj) - { - if (obj == null) - { - return false; - } - - if (obj == this) - { - return true; - } - - return obj is TsObjectSearchInput other && - this.Type.Equals(other.Type) && - ((this.Id == null && other.Id == null) || (this.Id?.Equals(other.Id) == true)); - } - - - /// - /// ToString overload. - /// - /// List of strings. - protected void ToString(List toStringOutput) - { - toStringOutput.Add($"this.Type = {this.Type}"); - toStringOutput.Add($"this.Id = {(this.Id == null ? "null" : $"[{string.Join(", ", this.Id)} ]")}"); - } - } -} \ No newline at end of file diff --git a/DotNet/ThoughtSpotPublicRESTAPI.Standard/Models/TsObjectTypeSerach.cs b/DotNet/ThoughtSpotPublicRESTAPI.Standard/Models/TsObjectTypeSerach.cs deleted file mode 100644 index f3bc612c4..000000000 --- a/DotNet/ThoughtSpotPublicRESTAPI.Standard/Models/TsObjectTypeSerach.cs +++ /dev/null @@ -1,149 +0,0 @@ -// -// Copyright (c) APIMatic. All rights reserved. -// -namespace ThoughtSpotPublicRESTAPI.Standard.Models -{ - using System; - using System.Collections.Generic; - using System.ComponentModel; - using System.IO; - using System.Linq; - using System.Text; - using System.Threading.Tasks; - using Newtonsoft.Json; - using Newtonsoft.Json.Converters; - using ThoughtSpotPublicRESTAPI.Standard; - using ThoughtSpotPublicRESTAPI.Standard.Utilities; - - /// - /// TsObjectTypeSerach. - /// - public class TsObjectTypeSerach - { - /// - /// Initializes a new instance of the class. - /// - public TsObjectTypeSerach() - { - } - - /// - /// Initializes a new instance of the class. - /// - /// id. - /// name. - /// owner. - /// author. - /// permission. - /// sharedPermission. - /// groupPermission. - public TsObjectTypeSerach( - string id = null, - string name = null, - string owner = null, - Models.UserNameAndID author = null, - string permission = null, - string sharedPermission = null, - List groupPermission = null) - { - this.Id = id; - this.Name = name; - this.Owner = owner; - this.Author = author; - this.Permission = permission; - this.SharedPermission = sharedPermission; - this.GroupPermission = groupPermission; - } - - /// - /// GUID of the object - /// - [JsonProperty("id", NullValueHandling = NullValueHandling.Ignore)] - public string Id { get; set; } - - /// - /// Name of the object - /// - [JsonProperty("name", NullValueHandling = NullValueHandling.Ignore)] - public string Name { get; set; } - - /// - /// Owner of the object - /// - [JsonProperty("owner", NullValueHandling = NullValueHandling.Ignore)] - public string Owner { get; set; } - - /// - /// Gets or sets Author. - /// - [JsonProperty("author", NullValueHandling = NullValueHandling.Ignore)] - public Models.UserNameAndID Author { get; set; } - - /// - /// Indicates the permission which user or user group has on the object - /// - [JsonProperty("permission", NullValueHandling = NullValueHandling.Ignore)] - public string Permission { get; set; } - - /// - /// Indicates the permission which user or user group has on the object through sharing of the object with the user or user group - /// - [JsonProperty("sharedPermission", NullValueHandling = NullValueHandling.Ignore)] - public string SharedPermission { get; set; } - - /// - /// An array of object with details of permission on the user groups to which the user or user group belongs - /// - [JsonProperty("groupPermission", NullValueHandling = NullValueHandling.Ignore)] - public List GroupPermission { get; set; } - - /// - public override string ToString() - { - var toStringOutput = new List(); - - this.ToString(toStringOutput); - - return $"TsObjectTypeSerach : ({string.Join(", ", toStringOutput)})"; - } - - /// - public override bool Equals(object obj) - { - if (obj == null) - { - return false; - } - - if (obj == this) - { - return true; - } - - return obj is TsObjectTypeSerach other && - ((this.Id == null && other.Id == null) || (this.Id?.Equals(other.Id) == true)) && - ((this.Name == null && other.Name == null) || (this.Name?.Equals(other.Name) == true)) && - ((this.Owner == null && other.Owner == null) || (this.Owner?.Equals(other.Owner) == true)) && - ((this.Author == null && other.Author == null) || (this.Author?.Equals(other.Author) == true)) && - ((this.Permission == null && other.Permission == null) || (this.Permission?.Equals(other.Permission) == true)) && - ((this.SharedPermission == null && other.SharedPermission == null) || (this.SharedPermission?.Equals(other.SharedPermission) == true)) && - ((this.GroupPermission == null && other.GroupPermission == null) || (this.GroupPermission?.Equals(other.GroupPermission) == true)); - } - - - /// - /// ToString overload. - /// - /// List of strings. - protected void ToString(List toStringOutput) - { - toStringOutput.Add($"this.Id = {(this.Id == null ? "null" : this.Id == string.Empty ? "" : this.Id)}"); - toStringOutput.Add($"this.Name = {(this.Name == null ? "null" : this.Name == string.Empty ? "" : this.Name)}"); - toStringOutput.Add($"this.Owner = {(this.Owner == null ? "null" : this.Owner == string.Empty ? "" : this.Owner)}"); - toStringOutput.Add($"this.Author = {(this.Author == null ? "null" : this.Author.ToString())}"); - toStringOutput.Add($"this.Permission = {(this.Permission == null ? "null" : this.Permission == string.Empty ? "" : this.Permission)}"); - toStringOutput.Add($"this.SharedPermission = {(this.SharedPermission == null ? "null" : this.SharedPermission == string.Empty ? "" : this.SharedPermission)}"); - toStringOutput.Add($"this.GroupPermission = {(this.GroupPermission == null ? "null" : $"[{string.Join(", ", this.GroupPermission)} ]")}"); - } - } -} \ No newline at end of file diff --git a/DotNet/ThoughtSpotPublicRESTAPI.Standard/Models/TspublicRestV2AdminAssignauthorRequest.cs b/DotNet/ThoughtSpotPublicRESTAPI.Standard/Models/TspublicRestV2AdminAssignauthorRequest.cs deleted file mode 100644 index 0b431c2bd..000000000 --- a/DotNet/ThoughtSpotPublicRESTAPI.Standard/Models/TspublicRestV2AdminAssignauthorRequest.cs +++ /dev/null @@ -1,105 +0,0 @@ -// -// Copyright (c) APIMatic. All rights reserved. -// -namespace ThoughtSpotPublicRESTAPI.Standard.Models -{ - using System; - using System.Collections.Generic; - using System.ComponentModel; - using System.IO; - using System.Linq; - using System.Text; - using System.Threading.Tasks; - using Newtonsoft.Json; - using Newtonsoft.Json.Converters; - using ThoughtSpotPublicRESTAPI.Standard; - using ThoughtSpotPublicRESTAPI.Standard.Utilities; - - /// - /// TspublicRestV2AdminAssignauthorRequest. - /// - public class TspublicRestV2AdminAssignauthorRequest - { - /// - /// Initializes a new instance of the class. - /// - public TspublicRestV2AdminAssignauthorRequest() - { - } - - /// - /// Initializes a new instance of the class. - /// - /// tsObjectId. - /// name. - /// id. - public TspublicRestV2AdminAssignauthorRequest( - List tsObjectId, - string name = null, - string id = null) - { - this.TsObjectId = tsObjectId; - this.Name = name; - this.Id = id; - } - - /// - /// A JSON array of GUIDs of the metadata objects. - /// - [JsonProperty("tsObjectId")] - public List TsObjectId { get; set; } - - /// - /// User name of the user account - /// - [JsonProperty("name", NullValueHandling = NullValueHandling.Ignore)] - public string Name { get; set; } - - /// - /// The GUID of the user account - /// - [JsonProperty("id", NullValueHandling = NullValueHandling.Ignore)] - public string Id { get; set; } - - /// - public override string ToString() - { - var toStringOutput = new List(); - - this.ToString(toStringOutput); - - return $"TspublicRestV2AdminAssignauthorRequest : ({string.Join(", ", toStringOutput)})"; - } - - /// - public override bool Equals(object obj) - { - if (obj == null) - { - return false; - } - - if (obj == this) - { - return true; - } - - return obj is TspublicRestV2AdminAssignauthorRequest other && - ((this.TsObjectId == null && other.TsObjectId == null) || (this.TsObjectId?.Equals(other.TsObjectId) == true)) && - ((this.Name == null && other.Name == null) || (this.Name?.Equals(other.Name) == true)) && - ((this.Id == null && other.Id == null) || (this.Id?.Equals(other.Id) == true)); - } - - - /// - /// ToString overload. - /// - /// List of strings. - protected void ToString(List toStringOutput) - { - toStringOutput.Add($"this.TsObjectId = {(this.TsObjectId == null ? "null" : $"[{string.Join(", ", this.TsObjectId)} ]")}"); - toStringOutput.Add($"this.Name = {(this.Name == null ? "null" : this.Name == string.Empty ? "" : this.Name)}"); - toStringOutput.Add($"this.Id = {(this.Id == null ? "null" : this.Id == string.Empty ? "" : this.Id)}"); - } - } -} \ No newline at end of file diff --git a/DotNet/ThoughtSpotPublicRESTAPI.Standard/Models/TspublicRestV2AdminChangeauthorRequest.cs b/DotNet/ThoughtSpotPublicRESTAPI.Standard/Models/TspublicRestV2AdminChangeauthorRequest.cs deleted file mode 100644 index 6381d8142..000000000 --- a/DotNet/ThoughtSpotPublicRESTAPI.Standard/Models/TspublicRestV2AdminChangeauthorRequest.cs +++ /dev/null @@ -1,109 +0,0 @@ -// -// Copyright (c) APIMatic. All rights reserved. -// -namespace ThoughtSpotPublicRESTAPI.Standard.Models -{ - using System; - using System.Collections.Generic; - using System.ComponentModel; - using System.IO; - using System.Linq; - using System.Text; - using System.Threading.Tasks; - using Newtonsoft.Json; - using Newtonsoft.Json.Converters; - using ThoughtSpotPublicRESTAPI.Standard; - using ThoughtSpotPublicRESTAPI.Standard.Utilities; - - /// - /// TspublicRestV2AdminChangeauthorRequest. - /// - public class TspublicRestV2AdminChangeauthorRequest - { - /// - /// Initializes a new instance of the class. - /// - public TspublicRestV2AdminChangeauthorRequest() - { - } - - /// - /// Initializes a new instance of the class. - /// - /// tsObjectId. - /// fromUser. - /// toUser. - public TspublicRestV2AdminChangeauthorRequest( - List tsObjectId, - Models.FromUserNameAndIDInput fromUser, - Models.ToUserNameAndIDInput toUser) - { - this.TsObjectId = tsObjectId; - this.FromUser = fromUser; - this.ToUser = toUser; - } - - /// - /// A JSON array of GUIDs of the metadata objects. - /// To change owner of all the objects owned by a user, provide single input as ALL. - /// If multiple object ids along with ALL is provided as input, then ALL will be considered. - /// - [JsonProperty("tsObjectId")] - public List TsObjectId { get; set; } - - /// - /// A JSON object of name or GUIDs of the current owner of the objects. When both are given then id is considered. - /// If a list of object ids are provided as input for TsObjectId, then only for those ids that have owner as the value provided in fromUser, the owner will be changed. - /// Provide either name or id as input. When both are given user id will be considered. - /// - [JsonProperty("fromUser")] - public Models.FromUserNameAndIDInput FromUser { get; set; } - - /// - /// A JSON object of name or GUIDs of the new owner for the objects. When both are given then id is considered. - /// - [JsonProperty("toUser")] - public Models.ToUserNameAndIDInput ToUser { get; set; } - - /// - public override string ToString() - { - var toStringOutput = new List(); - - this.ToString(toStringOutput); - - return $"TspublicRestV2AdminChangeauthorRequest : ({string.Join(", ", toStringOutput)})"; - } - - /// - public override bool Equals(object obj) - { - if (obj == null) - { - return false; - } - - if (obj == this) - { - return true; - } - - return obj is TspublicRestV2AdminChangeauthorRequest other && - ((this.TsObjectId == null && other.TsObjectId == null) || (this.TsObjectId?.Equals(other.TsObjectId) == true)) && - ((this.FromUser == null && other.FromUser == null) || (this.FromUser?.Equals(other.FromUser) == true)) && - ((this.ToUser == null && other.ToUser == null) || (this.ToUser?.Equals(other.ToUser) == true)); - } - - - /// - /// ToString overload. - /// - /// List of strings. - protected void ToString(List toStringOutput) - { - toStringOutput.Add($"this.TsObjectId = {(this.TsObjectId == null ? "null" : $"[{string.Join(", ", this.TsObjectId)} ]")}"); - toStringOutput.Add($"this.FromUser = {(this.FromUser == null ? "null" : this.FromUser.ToString())}"); - toStringOutput.Add($"this.ToUser = {(this.ToUser == null ? "null" : this.ToUser.ToString())}"); - } - } -} \ No newline at end of file diff --git a/DotNet/ThoughtSpotPublicRESTAPI.Standard/Models/TspublicRestV2AdminConfigurationUpdateRequest.cs b/DotNet/ThoughtSpotPublicRESTAPI.Standard/Models/TspublicRestV2AdminConfigurationUpdateRequest.cs deleted file mode 100644 index 3f92558de..000000000 --- a/DotNet/ThoughtSpotPublicRESTAPI.Standard/Models/TspublicRestV2AdminConfigurationUpdateRequest.cs +++ /dev/null @@ -1,84 +0,0 @@ -// -// Copyright (c) APIMatic. All rights reserved. -// -namespace ThoughtSpotPublicRESTAPI.Standard.Models -{ - using System; - using System.Collections.Generic; - using System.ComponentModel; - using System.IO; - using System.Linq; - using System.Text; - using System.Threading.Tasks; - using Newtonsoft.Json; - using Newtonsoft.Json.Converters; - using ThoughtSpotPublicRESTAPI.Standard; - using ThoughtSpotPublicRESTAPI.Standard.Utilities; - - /// - /// TspublicRestV2AdminConfigurationUpdateRequest. - /// - public class TspublicRestV2AdminConfigurationUpdateRequest - { - /// - /// Initializes a new instance of the class. - /// - public TspublicRestV2AdminConfigurationUpdateRequest() - { - } - - /// - /// Initializes a new instance of the class. - /// - /// configuration. - public TspublicRestV2AdminConfigurationUpdateRequest( - string configuration = null) - { - this.Configuration = configuration; - } - - /// - /// A JSON file with the key-value pair of configuration attributes to be updated. - /// Example: {"defaultChartDataSize": 5000} - /// - [JsonProperty("configuration", NullValueHandling = NullValueHandling.Ignore)] - public string Configuration { get; set; } - - /// - public override string ToString() - { - var toStringOutput = new List(); - - this.ToString(toStringOutput); - - return $"TspublicRestV2AdminConfigurationUpdateRequest : ({string.Join(", ", toStringOutput)})"; - } - - /// - public override bool Equals(object obj) - { - if (obj == null) - { - return false; - } - - if (obj == this) - { - return true; - } - - return obj is TspublicRestV2AdminConfigurationUpdateRequest other && - ((this.Configuration == null && other.Configuration == null) || (this.Configuration?.Equals(other.Configuration) == true)); - } - - - /// - /// ToString overload. - /// - /// List of strings. - protected void ToString(List toStringOutput) - { - toStringOutput.Add($"this.Configuration = {(this.Configuration == null ? "null" : this.Configuration == string.Empty ? "" : this.Configuration)}"); - } - } -} \ No newline at end of file diff --git a/DotNet/ThoughtSpotPublicRESTAPI.Standard/Models/TspublicRestV2AdminForcelogoutRequest.cs b/DotNet/ThoughtSpotPublicRESTAPI.Standard/Models/TspublicRestV2AdminForcelogoutRequest.cs deleted file mode 100644 index 8c9ab477e..000000000 --- a/DotNet/ThoughtSpotPublicRESTAPI.Standard/Models/TspublicRestV2AdminForcelogoutRequest.cs +++ /dev/null @@ -1,83 +0,0 @@ -// -// Copyright (c) APIMatic. All rights reserved. -// -namespace ThoughtSpotPublicRESTAPI.Standard.Models -{ - using System; - using System.Collections.Generic; - using System.ComponentModel; - using System.IO; - using System.Linq; - using System.Text; - using System.Threading.Tasks; - using Newtonsoft.Json; - using Newtonsoft.Json.Converters; - using ThoughtSpotPublicRESTAPI.Standard; - using ThoughtSpotPublicRESTAPI.Standard.Utilities; - - /// - /// TspublicRestV2AdminForcelogoutRequest. - /// - public class TspublicRestV2AdminForcelogoutRequest - { - /// - /// Initializes a new instance of the class. - /// - public TspublicRestV2AdminForcelogoutRequest() - { - } - - /// - /// Initializes a new instance of the class. - /// - /// user. - public TspublicRestV2AdminForcelogoutRequest( - List user = null) - { - this.User = user; - } - - /// - /// A JSON array of name of users or GUIDs of groups or both. When both are given then id is considered. - /// - [JsonProperty("user", NullValueHandling = NullValueHandling.Ignore)] - public List User { get; set; } - - /// - public override string ToString() - { - var toStringOutput = new List(); - - this.ToString(toStringOutput); - - return $"TspublicRestV2AdminForcelogoutRequest : ({string.Join(", ", toStringOutput)})"; - } - - /// - public override bool Equals(object obj) - { - if (obj == null) - { - return false; - } - - if (obj == this) - { - return true; - } - - return obj is TspublicRestV2AdminForcelogoutRequest other && - ((this.User == null && other.User == null) || (this.User?.Equals(other.User) == true)); - } - - - /// - /// ToString overload. - /// - /// List of strings. - protected void ToString(List toStringOutput) - { - toStringOutput.Add($"this.User = {(this.User == null ? "null" : $"[{string.Join(", ", this.User)} ]")}"); - } - } -} \ No newline at end of file diff --git a/DotNet/ThoughtSpotPublicRESTAPI.Standard/Models/TspublicRestV2AdminResetpasswordRequest.cs b/DotNet/ThoughtSpotPublicRESTAPI.Standard/Models/TspublicRestV2AdminResetpasswordRequest.cs deleted file mode 100644 index 926b4df40..000000000 --- a/DotNet/ThoughtSpotPublicRESTAPI.Standard/Models/TspublicRestV2AdminResetpasswordRequest.cs +++ /dev/null @@ -1,105 +0,0 @@ -// -// Copyright (c) APIMatic. All rights reserved. -// -namespace ThoughtSpotPublicRESTAPI.Standard.Models -{ - using System; - using System.Collections.Generic; - using System.ComponentModel; - using System.IO; - using System.Linq; - using System.Text; - using System.Threading.Tasks; - using Newtonsoft.Json; - using Newtonsoft.Json.Converters; - using ThoughtSpotPublicRESTAPI.Standard; - using ThoughtSpotPublicRESTAPI.Standard.Utilities; - - /// - /// TspublicRestV2AdminResetpasswordRequest. - /// - public class TspublicRestV2AdminResetpasswordRequest - { - /// - /// Initializes a new instance of the class. - /// - public TspublicRestV2AdminResetpasswordRequest() - { - } - - /// - /// Initializes a new instance of the class. - /// - /// newPassword. - /// name. - /// id. - public TspublicRestV2AdminResetpasswordRequest( - string newPassword, - string name = null, - string id = null) - { - this.Name = name; - this.Id = id; - this.NewPassword = newPassword; - } - - /// - /// User name of the user account - /// - [JsonProperty("name", NullValueHandling = NullValueHandling.Ignore)] - public string Name { get; set; } - - /// - /// The GUID of the user account to query. - /// - [JsonProperty("id", NullValueHandling = NullValueHandling.Ignore)] - public string Id { get; set; } - - /// - /// A new password for the user. - /// - [JsonProperty("newPassword")] - public string NewPassword { get; set; } - - /// - public override string ToString() - { - var toStringOutput = new List(); - - this.ToString(toStringOutput); - - return $"TspublicRestV2AdminResetpasswordRequest : ({string.Join(", ", toStringOutput)})"; - } - - /// - public override bool Equals(object obj) - { - if (obj == null) - { - return false; - } - - if (obj == this) - { - return true; - } - - return obj is TspublicRestV2AdminResetpasswordRequest other && - ((this.Name == null && other.Name == null) || (this.Name?.Equals(other.Name) == true)) && - ((this.Id == null && other.Id == null) || (this.Id?.Equals(other.Id) == true)) && - ((this.NewPassword == null && other.NewPassword == null) || (this.NewPassword?.Equals(other.NewPassword) == true)); - } - - - /// - /// ToString overload. - /// - /// List of strings. - protected void ToString(List toStringOutput) - { - toStringOutput.Add($"this.Name = {(this.Name == null ? "null" : this.Name == string.Empty ? "" : this.Name)}"); - toStringOutput.Add($"this.Id = {(this.Id == null ? "null" : this.Id == string.Empty ? "" : this.Id)}"); - toStringOutput.Add($"this.NewPassword = {(this.NewPassword == null ? "null" : this.NewPassword == string.Empty ? "" : this.NewPassword)}"); - } - } -} \ No newline at end of file diff --git a/DotNet/ThoughtSpotPublicRESTAPI.Standard/Models/TspublicRestV2AdminSyncprincipalRequest.cs b/DotNet/ThoughtSpotPublicRESTAPI.Standard/Models/TspublicRestV2AdminSyncprincipalRequest.cs deleted file mode 100644 index 6717b6253..000000000 --- a/DotNet/ThoughtSpotPublicRESTAPI.Standard/Models/TspublicRestV2AdminSyncprincipalRequest.cs +++ /dev/null @@ -1,141 +0,0 @@ -// -// Copyright (c) APIMatic. All rights reserved. -// -namespace ThoughtSpotPublicRESTAPI.Standard.Models -{ - using System; - using System.Collections.Generic; - using System.ComponentModel; - using System.IO; - using System.Linq; - using System.Text; - using System.Threading.Tasks; - using Newtonsoft.Json; - using Newtonsoft.Json.Converters; - using ThoughtSpotPublicRESTAPI.Standard; - using ThoughtSpotPublicRESTAPI.Standard.Utilities; - - /// - /// TspublicRestV2AdminSyncprincipalRequest. - /// - public class TspublicRestV2AdminSyncprincipalRequest - { - /// - /// Initializes a new instance of the class. - /// - public TspublicRestV2AdminSyncprincipalRequest() - { - } - - /// - /// Initializes a new instance of the class. - /// - /// principalObject. - /// updateModified. - /// deleteRemoved. - /// newUserPassword. - public TspublicRestV2AdminSyncprincipalRequest( - object principalObject, - bool? updateModified = false, - bool? deleteRemoved = false, - string newUserPassword = null) - { - this.PrincipalObject = principalObject; - this.UpdateModified = updateModified; - this.DeleteRemoved = deleteRemoved; - this.NewUserPassword = newUserPassword; - } - - /// - /// A JSON array of principal objects containing all users and groups present in the external system. - /// Example: - /// { - /// "name": "Customer Success", - /// "displayName": "Customer Success", - /// "description": "CS", - /// "created": 1568926267025, - /// "modified": 1568926982242, - /// "principalTypeEnum": "LOCAL_GROUP", - /// "groupNames": [], - /// "visibility": "DEFAULT" - /// }, - /// { - /// "name": "test", - /// "displayName": "test one", - /// "created": 1587573621279, - /// "modified": 1587573621674, - /// "mail": "test2@test.com", - /// "principalTypeEnum": "LOCAL_USER", - /// "groupNames": [ "Administrator", "All" ], - /// "visibility": "DEFAULT" - /// } - /// You can leave the created and modified dates blank for new users. - /// You can specify if the principal is a user (LOCAL_USER) or user group (LOCAL_GROUP) in the principalTypeEnum keyword. - /// Set visibility to NON_SHARABLE, if you do not want the user to be able to share ThoughtSpot objects with other users in this group. - /// - [JsonProperty("principalObject")] - public object PrincipalObject { get; set; } - - /// - /// Specifies whether to apply the changes to users and groups already in the cluster based on the principal object list input. - /// - [JsonProperty("updateModified", NullValueHandling = NullValueHandling.Ignore)] - public bool? UpdateModified { get; set; } - - /// - /// Specifies whether to delete the users and groups already in the cluster if not present in the principal object list input. - /// - [JsonProperty("deleteRemoved", NullValueHandling = NullValueHandling.Ignore)] - public bool? DeleteRemoved { get; set; } - - /// - /// Assign a password for new users added during the sync operation. - /// All new users added will have this password. It is mandatory to provide value for this field if new users are included in the input list. - /// - [JsonProperty("newUserPassword", NullValueHandling = NullValueHandling.Ignore)] - public string NewUserPassword { get; set; } - - /// - public override string ToString() - { - var toStringOutput = new List(); - - this.ToString(toStringOutput); - - return $"TspublicRestV2AdminSyncprincipalRequest : ({string.Join(", ", toStringOutput)})"; - } - - /// - public override bool Equals(object obj) - { - if (obj == null) - { - return false; - } - - if (obj == this) - { - return true; - } - - return obj is TspublicRestV2AdminSyncprincipalRequest other && - ((this.PrincipalObject == null && other.PrincipalObject == null) || (this.PrincipalObject?.Equals(other.PrincipalObject) == true)) && - ((this.UpdateModified == null && other.UpdateModified == null) || (this.UpdateModified?.Equals(other.UpdateModified) == true)) && - ((this.DeleteRemoved == null && other.DeleteRemoved == null) || (this.DeleteRemoved?.Equals(other.DeleteRemoved) == true)) && - ((this.NewUserPassword == null && other.NewUserPassword == null) || (this.NewUserPassword?.Equals(other.NewUserPassword) == true)); - } - - - /// - /// ToString overload. - /// - /// List of strings. - protected void ToString(List toStringOutput) - { - toStringOutput.Add($"PrincipalObject = {(this.PrincipalObject == null ? "null" : this.PrincipalObject.ToString())}"); - toStringOutput.Add($"this.UpdateModified = {(this.UpdateModified == null ? "null" : this.UpdateModified.ToString())}"); - toStringOutput.Add($"this.DeleteRemoved = {(this.DeleteRemoved == null ? "null" : this.DeleteRemoved.ToString())}"); - toStringOutput.Add($"this.NewUserPassword = {(this.NewUserPassword == null ? "null" : this.NewUserPassword == string.Empty ? "" : this.NewUserPassword)}"); - } - } -} \ No newline at end of file diff --git a/DotNet/ThoughtSpotPublicRESTAPI.Standard/Models/TspublicRestV2ConnectionAddtableRequest.cs b/DotNet/ThoughtSpotPublicRESTAPI.Standard/Models/TspublicRestV2ConnectionAddtableRequest.cs deleted file mode 100644 index 63a46cbf0..000000000 --- a/DotNet/ThoughtSpotPublicRESTAPI.Standard/Models/TspublicRestV2ConnectionAddtableRequest.cs +++ /dev/null @@ -1,94 +0,0 @@ -// -// Copyright (c) APIMatic. All rights reserved. -// -namespace ThoughtSpotPublicRESTAPI.Standard.Models -{ - using System; - using System.Collections.Generic; - using System.ComponentModel; - using System.IO; - using System.Linq; - using System.Text; - using System.Threading.Tasks; - using Newtonsoft.Json; - using Newtonsoft.Json.Converters; - using ThoughtSpotPublicRESTAPI.Standard; - using ThoughtSpotPublicRESTAPI.Standard.Utilities; - - /// - /// TspublicRestV2ConnectionAddtableRequest. - /// - public class TspublicRestV2ConnectionAddtableRequest - { - /// - /// Initializes a new instance of the class. - /// - public TspublicRestV2ConnectionAddtableRequest() - { - } - - /// - /// Initializes a new instance of the class. - /// - /// id. - /// table. - public TspublicRestV2ConnectionAddtableRequest( - string id, - List table) - { - this.Id = id; - this.Table = table; - } - - /// - /// GUID of the connection - /// - [JsonProperty("id")] - public string Id { get; set; } - - /// - /// A JSON array of table details - /// - [JsonProperty("table")] - public List Table { get; set; } - - /// - public override string ToString() - { - var toStringOutput = new List(); - - this.ToString(toStringOutput); - - return $"TspublicRestV2ConnectionAddtableRequest : ({string.Join(", ", toStringOutput)})"; - } - - /// - public override bool Equals(object obj) - { - if (obj == null) - { - return false; - } - - if (obj == this) - { - return true; - } - - return obj is TspublicRestV2ConnectionAddtableRequest other && - ((this.Id == null && other.Id == null) || (this.Id?.Equals(other.Id) == true)) && - ((this.Table == null && other.Table == null) || (this.Table?.Equals(other.Table) == true)); - } - - - /// - /// ToString overload. - /// - /// List of strings. - protected void ToString(List toStringOutput) - { - toStringOutput.Add($"this.Id = {(this.Id == null ? "null" : this.Id == string.Empty ? "" : this.Id)}"); - toStringOutput.Add($"this.Table = {(this.Table == null ? "null" : $"[{string.Join(", ", this.Table)} ]")}"); - } - } -} \ No newline at end of file diff --git a/DotNet/ThoughtSpotPublicRESTAPI.Standard/Models/TspublicRestV2ConnectionCreateRequest.cs b/DotNet/ThoughtSpotPublicRESTAPI.Standard/Models/TspublicRestV2ConnectionCreateRequest.cs deleted file mode 100644 index 7b36a22b2..000000000 --- a/DotNet/ThoughtSpotPublicRESTAPI.Standard/Models/TspublicRestV2ConnectionCreateRequest.cs +++ /dev/null @@ -1,116 +0,0 @@ -// -// Copyright (c) APIMatic. All rights reserved. -// -namespace ThoughtSpotPublicRESTAPI.Standard.Models -{ - using System; - using System.Collections.Generic; - using System.ComponentModel; - using System.IO; - using System.Linq; - using System.Text; - using System.Threading.Tasks; - using Newtonsoft.Json; - using Newtonsoft.Json.Converters; - using ThoughtSpotPublicRESTAPI.Standard; - using ThoughtSpotPublicRESTAPI.Standard.Utilities; - - /// - /// TspublicRestV2ConnectionCreateRequest. - /// - public class TspublicRestV2ConnectionCreateRequest - { - /// - /// Initializes a new instance of the class. - /// - public TspublicRestV2ConnectionCreateRequest() - { - } - - /// - /// Initializes a new instance of the class. - /// - /// type. - /// name. - /// configuration. - /// description. - public TspublicRestV2ConnectionCreateRequest( - Models.Type14Enum type, - string name, - string configuration, - string description = null) - { - this.Type = type; - this.Name = name; - this.Description = description; - this.Configuration = configuration; - } - - /// - /// Type of the data connection. - /// - [JsonProperty("type", ItemConverterType = typeof(StringEnumConverter))] - public Models.Type14Enum Type { get; set; } - - /// - /// Name of the connection - /// - [JsonProperty("name")] - public string Name { get; set; } - - /// - /// A short description of the connection. - /// - [JsonProperty("description", NullValueHandling = NullValueHandling.Ignore)] - public string Description { get; set; } - - /// - /// A JSON object of the connection metadata. The metadata must include configuration attributes required to create the connection. - /// - [JsonProperty("configuration")] - public string Configuration { get; set; } - - /// - public override string ToString() - { - var toStringOutput = new List(); - - this.ToString(toStringOutput); - - return $"TspublicRestV2ConnectionCreateRequest : ({string.Join(", ", toStringOutput)})"; - } - - /// - public override bool Equals(object obj) - { - if (obj == null) - { - return false; - } - - if (obj == this) - { - return true; - } - - return obj is TspublicRestV2ConnectionCreateRequest other && - this.Type.Equals(other.Type) && - ((this.Name == null && other.Name == null) || (this.Name?.Equals(other.Name) == true)) && - ((this.Description == null && other.Description == null) || (this.Description?.Equals(other.Description) == true)) && - ((this.Configuration == null && other.Configuration == null) || (this.Configuration?.Equals(other.Configuration) == true)); - } - - - /// - /// ToString overload. - /// - /// List of strings. - protected void ToString(List toStringOutput) - { - toStringOutput.Add($"this.Type = {this.Type}"); - toStringOutput.Add($"this.Name = {(this.Name == null ? "null" : this.Name == string.Empty ? "" : this.Name)}"); - toStringOutput.Add($"this.Description = {(this.Description == null ? "null" : this.Description == string.Empty ? "" : this.Description)}"); - toStringOutput.Add($"this.Configuration = {(this.Configuration == null ? "null" : this.Configuration == string.Empty ? "" : this.Configuration)}"); - } - } -} \ No newline at end of file diff --git a/DotNet/ThoughtSpotPublicRESTAPI.Standard/Models/TspublicRestV2ConnectionRemovetableRequest.cs b/DotNet/ThoughtSpotPublicRESTAPI.Standard/Models/TspublicRestV2ConnectionRemovetableRequest.cs deleted file mode 100644 index e8aa10aee..000000000 --- a/DotNet/ThoughtSpotPublicRESTAPI.Standard/Models/TspublicRestV2ConnectionRemovetableRequest.cs +++ /dev/null @@ -1,94 +0,0 @@ -// -// Copyright (c) APIMatic. All rights reserved. -// -namespace ThoughtSpotPublicRESTAPI.Standard.Models -{ - using System; - using System.Collections.Generic; - using System.ComponentModel; - using System.IO; - using System.Linq; - using System.Text; - using System.Threading.Tasks; - using Newtonsoft.Json; - using Newtonsoft.Json.Converters; - using ThoughtSpotPublicRESTAPI.Standard; - using ThoughtSpotPublicRESTAPI.Standard.Utilities; - - /// - /// TspublicRestV2ConnectionRemovetableRequest. - /// - public class TspublicRestV2ConnectionRemovetableRequest - { - /// - /// Initializes a new instance of the class. - /// - public TspublicRestV2ConnectionRemovetableRequest() - { - } - - /// - /// Initializes a new instance of the class. - /// - /// id. - /// table. - public TspublicRestV2ConnectionRemovetableRequest( - string id, - List table) - { - this.Id = id; - this.Table = table; - } - - /// - /// GUID of the connection - /// - [JsonProperty("id")] - public string Id { get; set; } - - /// - /// A JSON array of name or GUIDs of the table or both. At least one input is required. Provide either table name or id. When both are given then id is considered - /// - [JsonProperty("table")] - public List Table { get; set; } - - /// - public override string ToString() - { - var toStringOutput = new List(); - - this.ToString(toStringOutput); - - return $"TspublicRestV2ConnectionRemovetableRequest : ({string.Join(", ", toStringOutput)})"; - } - - /// - public override bool Equals(object obj) - { - if (obj == null) - { - return false; - } - - if (obj == this) - { - return true; - } - - return obj is TspublicRestV2ConnectionRemovetableRequest other && - ((this.Id == null && other.Id == null) || (this.Id?.Equals(other.Id) == true)) && - ((this.Table == null && other.Table == null) || (this.Table?.Equals(other.Table) == true)); - } - - - /// - /// ToString overload. - /// - /// List of strings. - protected void ToString(List toStringOutput) - { - toStringOutput.Add($"this.Id = {(this.Id == null ? "null" : this.Id == string.Empty ? "" : this.Id)}"); - toStringOutput.Add($"this.Table = {(this.Table == null ? "null" : $"[{string.Join(", ", this.Table)} ]")}"); - } - } -} \ No newline at end of file diff --git a/DotNet/ThoughtSpotPublicRESTAPI.Standard/Models/TspublicRestV2ConnectionSearchRequest.cs b/DotNet/ThoughtSpotPublicRESTAPI.Standard/Models/TspublicRestV2ConnectionSearchRequest.cs deleted file mode 100644 index e074bfdea..000000000 --- a/DotNet/ThoughtSpotPublicRESTAPI.Standard/Models/TspublicRestV2ConnectionSearchRequest.cs +++ /dev/null @@ -1,182 +0,0 @@ -// -// Copyright (c) APIMatic. All rights reserved. -// -namespace ThoughtSpotPublicRESTAPI.Standard.Models -{ - using System; - using System.Collections.Generic; - using System.ComponentModel; - using System.IO; - using System.Linq; - using System.Text; - using System.Threading.Tasks; - using Newtonsoft.Json; - using Newtonsoft.Json.Converters; - using ThoughtSpotPublicRESTAPI.Standard; - using ThoughtSpotPublicRESTAPI.Standard.Utilities; - - /// - /// TspublicRestV2ConnectionSearchRequest. - /// - public class TspublicRestV2ConnectionSearchRequest - { - /// - /// Initializes a new instance of the class. - /// - public TspublicRestV2ConnectionSearchRequest() - { - } - - /// - /// Initializes a new instance of the class. - /// - /// type. - /// offset. - /// batchNumber. - /// batchSize. - /// sortBy. - /// sortOrder. - /// namePattern. - /// fetchId. - /// skipId. - /// tag. - public TspublicRestV2ConnectionSearchRequest( - Models.Type15Enum type, - int? offset = 0, - int? batchNumber = -1, - int? batchSize = -1, - Models.SortBy1Enum? sortBy = Models.SortBy1Enum.DEFAULT, - Models.SortOrder1Enum? sortOrder = null, - string namePattern = null, - List fetchId = null, - List skipId = null, - List tag = null) - { - this.Offset = offset; - this.BatchNumber = batchNumber; - this.BatchSize = batchSize; - this.SortBy = sortBy; - this.SortOrder = sortOrder; - this.Type = type; - this.NamePattern = namePattern; - this.FetchId = fetchId; - this.SkipId = skipId; - this.Tag = tag; - } - - /// - /// The offset point, starting from where the records should be included in the response. If no input is provided then offset starts from 0 - /// - [JsonProperty("offset", NullValueHandling = NullValueHandling.Ignore)] - public int? Offset { get; set; } - - /// - /// An alternate way to set offset for the starting point of the response. Offset field should be kept blank to use the value from this field. Offset value will be calculated as (batchNumber - 1) * batchSize. It is mandatory to provide a value for batchSize with batchNumber. Example: Assume response has 100 records. Now, batchNumber is set as 2 and batchSize as 10, then offset value will be 10. So, 10 records starting from 11th record will be considered. - /// - [JsonProperty("batchNumber", NullValueHandling = NullValueHandling.Ignore)] - public int? BatchNumber { get; set; } - - /// - /// The number of records that should be included in the response starting from offset position. If no input is provided, then all records starting from the value provided in offset is included in the response. - /// - [JsonProperty("batchSize", NullValueHandling = NullValueHandling.Ignore)] - public int? BatchSize { get; set; } - - /// - /// Field based on which the re.sponse needs to be ordered. Valid values - /// - [JsonProperty("sortBy", ItemConverterType = typeof(StringEnumConverter), NullValueHandling = NullValueHandling.Ignore)] - public Models.SortBy1Enum? SortBy { get; set; } - - /// - /// Order in which sortBy should be applied. Valid values - /// - [JsonProperty("sortOrder", ItemConverterType = typeof(StringEnumConverter), NullValueHandling = NullValueHandling.Ignore)] - public Models.SortOrder1Enum? SortOrder { get; set; } - - /// - /// Type of the connect being searched. Valid values: SNOWFLAKE|AMAZON_REDSHIFT|GOOGLE_BIGQUERY|AZURE_SYNAPSE|TERADATA|STARBURST|SAP_HANA|ORACLE_ADW|DATABRICKS|DENODO - /// - [JsonProperty("type", ItemConverterType = typeof(StringEnumConverter))] - public Models.Type15Enum Type { get; set; } - - /// - /// A pattern to match the name of the connection. This parameter supports matching case-insensitive strings. For a wildcard match, use %. - /// - [JsonProperty("namePattern", NullValueHandling = NullValueHandling.Ignore)] - public string NamePattern { get; set; } - - /// - /// A JSON array containing the GUIDs of the connections that you want to fetch. - /// - [JsonProperty("fetchId", NullValueHandling = NullValueHandling.Ignore)] - public List FetchId { get; set; } - - /// - /// A JSON array containing the GUIDs of the connections that you want to skip. - /// - [JsonProperty("skipId", NullValueHandling = NullValueHandling.Ignore)] - public List SkipId { get; set; } - - /// - /// A JSON array of name or GUID of tags or both. When both are given then id is considered - /// - [JsonProperty("tag", NullValueHandling = NullValueHandling.Ignore)] - public List Tag { get; set; } - - /// - public override string ToString() - { - var toStringOutput = new List(); - - this.ToString(toStringOutput); - - return $"TspublicRestV2ConnectionSearchRequest : ({string.Join(", ", toStringOutput)})"; - } - - /// - public override bool Equals(object obj) - { - if (obj == null) - { - return false; - } - - if (obj == this) - { - return true; - } - - return obj is TspublicRestV2ConnectionSearchRequest other && - ((this.Offset == null && other.Offset == null) || (this.Offset?.Equals(other.Offset) == true)) && - ((this.BatchNumber == null && other.BatchNumber == null) || (this.BatchNumber?.Equals(other.BatchNumber) == true)) && - ((this.BatchSize == null && other.BatchSize == null) || (this.BatchSize?.Equals(other.BatchSize) == true)) && - ((this.SortBy == null && other.SortBy == null) || (this.SortBy?.Equals(other.SortBy) == true)) && - ((this.SortOrder == null && other.SortOrder == null) || (this.SortOrder?.Equals(other.SortOrder) == true)) && - this.Type.Equals(other.Type) && - ((this.NamePattern == null && other.NamePattern == null) || (this.NamePattern?.Equals(other.NamePattern) == true)) && - ((this.FetchId == null && other.FetchId == null) || (this.FetchId?.Equals(other.FetchId) == true)) && - ((this.SkipId == null && other.SkipId == null) || (this.SkipId?.Equals(other.SkipId) == true)) && - ((this.Tag == null && other.Tag == null) || (this.Tag?.Equals(other.Tag) == true)); - } - - - /// - /// ToString overload. - /// - /// List of strings. - protected void ToString(List toStringOutput) - { - toStringOutput.Add($"this.Offset = {(this.Offset == null ? "null" : this.Offset.ToString())}"); - toStringOutput.Add($"this.BatchNumber = {(this.BatchNumber == null ? "null" : this.BatchNumber.ToString())}"); - toStringOutput.Add($"this.BatchSize = {(this.BatchSize == null ? "null" : this.BatchSize.ToString())}"); - toStringOutput.Add($"this.SortBy = {(this.SortBy == null ? "null" : this.SortBy.ToString())}"); - toStringOutput.Add($"this.SortOrder = {(this.SortOrder == null ? "null" : this.SortOrder.ToString())}"); - toStringOutput.Add($"this.Type = {this.Type}"); - toStringOutput.Add($"this.NamePattern = {(this.NamePattern == null ? "null" : this.NamePattern == string.Empty ? "" : this.NamePattern)}"); - toStringOutput.Add($"this.FetchId = {(this.FetchId == null ? "null" : $"[{string.Join(", ", this.FetchId)} ]")}"); - toStringOutput.Add($"this.SkipId = {(this.SkipId == null ? "null" : $"[{string.Join(", ", this.SkipId)} ]")}"); - toStringOutput.Add($"this.Tag = {(this.Tag == null ? "null" : $"[{string.Join(", ", this.Tag)} ]")}"); - } - } -} \ No newline at end of file diff --git a/DotNet/ThoughtSpotPublicRESTAPI.Standard/Models/TspublicRestV2ConnectionTableRequest.cs b/DotNet/ThoughtSpotPublicRESTAPI.Standard/Models/TspublicRestV2ConnectionTableRequest.cs deleted file mode 100644 index 6263f4a79..000000000 --- a/DotNet/ThoughtSpotPublicRESTAPI.Standard/Models/TspublicRestV2ConnectionTableRequest.cs +++ /dev/null @@ -1,109 +0,0 @@ -// -// Copyright (c) APIMatic. All rights reserved. -// -namespace ThoughtSpotPublicRESTAPI.Standard.Models -{ - using System; - using System.Collections.Generic; - using System.ComponentModel; - using System.IO; - using System.Linq; - using System.Text; - using System.Threading.Tasks; - using Newtonsoft.Json; - using Newtonsoft.Json.Converters; - using ThoughtSpotPublicRESTAPI.Standard; - using ThoughtSpotPublicRESTAPI.Standard.Utilities; - - /// - /// TspublicRestV2ConnectionTableRequest. - /// - public class TspublicRestV2ConnectionTableRequest - { - /// - /// Initializes a new instance of the class. - /// - public TspublicRestV2ConnectionTableRequest() - { - } - - /// - /// Initializes a new instance of the class. - /// - /// id. - /// configuration. - /// includeColumn. - public TspublicRestV2ConnectionTableRequest( - string id, - string configuration = null, - bool? includeColumn = true) - { - this.Id = id; - this.Configuration = configuration; - this.IncludeColumn = includeColumn; - } - - /// - /// The GUID of the connection - /// - [JsonProperty("id")] - public string Id { get; set; } - - /// - /// A JSON object of the connection metadata. If this field is left empty, then the configuration saved in the connection is considered. - /// To get the tables based on a different configuration, include required attributes in the connection configuration JSON. - /// Example: - /// Get tables from Snowflake with a different user account than specified in the connection: {"user":"test_user","password":"test_pwd","role":"test_role"} - /// Get tables from Redshift for different database than specified in the connection: {"database":"test_db"} - /// - [JsonProperty("configuration", NullValueHandling = NullValueHandling.Ignore)] - public string Configuration { get; set; } - - /// - /// When set to true, the response will include column level details as well - /// - [JsonProperty("includeColumn", NullValueHandling = NullValueHandling.Ignore)] - public bool? IncludeColumn { get; set; } - - /// - public override string ToString() - { - var toStringOutput = new List(); - - this.ToString(toStringOutput); - - return $"TspublicRestV2ConnectionTableRequest : ({string.Join(", ", toStringOutput)})"; - } - - /// - public override bool Equals(object obj) - { - if (obj == null) - { - return false; - } - - if (obj == this) - { - return true; - } - - return obj is TspublicRestV2ConnectionTableRequest other && - ((this.Id == null && other.Id == null) || (this.Id?.Equals(other.Id) == true)) && - ((this.Configuration == null && other.Configuration == null) || (this.Configuration?.Equals(other.Configuration) == true)) && - ((this.IncludeColumn == null && other.IncludeColumn == null) || (this.IncludeColumn?.Equals(other.IncludeColumn) == true)); - } - - - /// - /// ToString overload. - /// - /// List of strings. - protected void ToString(List toStringOutput) - { - toStringOutput.Add($"this.Id = {(this.Id == null ? "null" : this.Id == string.Empty ? "" : this.Id)}"); - toStringOutput.Add($"this.Configuration = {(this.Configuration == null ? "null" : this.Configuration == string.Empty ? "" : this.Configuration)}"); - toStringOutput.Add($"this.IncludeColumn = {(this.IncludeColumn == null ? "null" : this.IncludeColumn.ToString())}"); - } - } -} \ No newline at end of file diff --git a/DotNet/ThoughtSpotPublicRESTAPI.Standard/Models/TspublicRestV2ConnectionTablecoloumnRequest.cs b/DotNet/ThoughtSpotPublicRESTAPI.Standard/Models/TspublicRestV2ConnectionTablecoloumnRequest.cs deleted file mode 100644 index 65031cafc..000000000 --- a/DotNet/ThoughtSpotPublicRESTAPI.Standard/Models/TspublicRestV2ConnectionTablecoloumnRequest.cs +++ /dev/null @@ -1,109 +0,0 @@ -// -// Copyright (c) APIMatic. All rights reserved. -// -namespace ThoughtSpotPublicRESTAPI.Standard.Models -{ - using System; - using System.Collections.Generic; - using System.ComponentModel; - using System.IO; - using System.Linq; - using System.Text; - using System.Threading.Tasks; - using Newtonsoft.Json; - using Newtonsoft.Json.Converters; - using ThoughtSpotPublicRESTAPI.Standard; - using ThoughtSpotPublicRESTAPI.Standard.Utilities; - - /// - /// TspublicRestV2ConnectionTablecoloumnRequest. - /// - public class TspublicRestV2ConnectionTablecoloumnRequest - { - /// - /// Initializes a new instance of the class. - /// - public TspublicRestV2ConnectionTablecoloumnRequest() - { - } - - /// - /// Initializes a new instance of the class. - /// - /// id. - /// table. - /// configuration. - public TspublicRestV2ConnectionTablecoloumnRequest( - string id, - List table, - string configuration = null) - { - this.Id = id; - this.Configuration = configuration; - this.Table = table; - } - - /// - /// The GUID of the connection - /// - [JsonProperty("id")] - public string Id { get; set; } - - /// - /// A JSON object of the connection metadata. If this field is left empty, then the configuration saved in the connection is considered. - /// To get the tables based on a different configuration, include required attributes in the connection configuration JSON. - /// Example: - /// Get tables from Snowflake with a different user account than specified in the connection: {"user":"test_user","password":"test_pwd","role":"test_role"} - /// Get tables from Redshift for different database than specified in the connection: {"database":"test_db"} - /// - [JsonProperty("configuration", NullValueHandling = NullValueHandling.Ignore)] - public string Configuration { get; set; } - - /// - /// List of table details - /// - [JsonProperty("table")] - public List Table { get; set; } - - /// - public override string ToString() - { - var toStringOutput = new List(); - - this.ToString(toStringOutput); - - return $"TspublicRestV2ConnectionTablecoloumnRequest : ({string.Join(", ", toStringOutput)})"; - } - - /// - public override bool Equals(object obj) - { - if (obj == null) - { - return false; - } - - if (obj == this) - { - return true; - } - - return obj is TspublicRestV2ConnectionTablecoloumnRequest other && - ((this.Id == null && other.Id == null) || (this.Id?.Equals(other.Id) == true)) && - ((this.Configuration == null && other.Configuration == null) || (this.Configuration?.Equals(other.Configuration) == true)) && - ((this.Table == null && other.Table == null) || (this.Table?.Equals(other.Table) == true)); - } - - - /// - /// ToString overload. - /// - /// List of strings. - protected void ToString(List toStringOutput) - { - toStringOutput.Add($"this.Id = {(this.Id == null ? "null" : this.Id == string.Empty ? "" : this.Id)}"); - toStringOutput.Add($"this.Configuration = {(this.Configuration == null ? "null" : this.Configuration == string.Empty ? "" : this.Configuration)}"); - toStringOutput.Add($"this.Table = {(this.Table == null ? "null" : $"[{string.Join(", ", this.Table)} ]")}"); - } - } -} \ No newline at end of file diff --git a/DotNet/ThoughtSpotPublicRESTAPI.Standard/Models/TspublicRestV2ConnectionUpdateRequest.cs b/DotNet/ThoughtSpotPublicRESTAPI.Standard/Models/TspublicRestV2ConnectionUpdateRequest.cs deleted file mode 100644 index 5687681ca..000000000 --- a/DotNet/ThoughtSpotPublicRESTAPI.Standard/Models/TspublicRestV2ConnectionUpdateRequest.cs +++ /dev/null @@ -1,116 +0,0 @@ -// -// Copyright (c) APIMatic. All rights reserved. -// -namespace ThoughtSpotPublicRESTAPI.Standard.Models -{ - using System; - using System.Collections.Generic; - using System.ComponentModel; - using System.IO; - using System.Linq; - using System.Text; - using System.Threading.Tasks; - using Newtonsoft.Json; - using Newtonsoft.Json.Converters; - using ThoughtSpotPublicRESTAPI.Standard; - using ThoughtSpotPublicRESTAPI.Standard.Utilities; - - /// - /// TspublicRestV2ConnectionUpdateRequest. - /// - public class TspublicRestV2ConnectionUpdateRequest - { - /// - /// Initializes a new instance of the class. - /// - public TspublicRestV2ConnectionUpdateRequest() - { - } - - /// - /// Initializes a new instance of the class. - /// - /// id. - /// configuration. - /// name. - /// description. - public TspublicRestV2ConnectionUpdateRequest( - string id, - string configuration, - string name = null, - string description = null) - { - this.Id = id; - this.Name = name; - this.Description = description; - this.Configuration = configuration; - } - - /// - /// GUID of the connection - /// - [JsonProperty("id")] - public string Id { get; set; } - - /// - /// The text to update the name of the connection. - /// - [JsonProperty("name", NullValueHandling = NullValueHandling.Ignore)] - public string Name { get; set; } - - /// - /// The text to update the description of the connection. - /// - [JsonProperty("description", NullValueHandling = NullValueHandling.Ignore)] - public string Description { get; set; } - - /// - /// A JSON object of the connection metadata. Include all the configuration attributes with original value along with the changes required to any attribute. - /// - [JsonProperty("configuration")] - public string Configuration { get; set; } - - /// - public override string ToString() - { - var toStringOutput = new List(); - - this.ToString(toStringOutput); - - return $"TspublicRestV2ConnectionUpdateRequest : ({string.Join(", ", toStringOutput)})"; - } - - /// - public override bool Equals(object obj) - { - if (obj == null) - { - return false; - } - - if (obj == this) - { - return true; - } - - return obj is TspublicRestV2ConnectionUpdateRequest other && - ((this.Id == null && other.Id == null) || (this.Id?.Equals(other.Id) == true)) && - ((this.Name == null && other.Name == null) || (this.Name?.Equals(other.Name) == true)) && - ((this.Description == null && other.Description == null) || (this.Description?.Equals(other.Description) == true)) && - ((this.Configuration == null && other.Configuration == null) || (this.Configuration?.Equals(other.Configuration) == true)); - } - - - /// - /// ToString overload. - /// - /// List of strings. - protected void ToString(List toStringOutput) - { - toStringOutput.Add($"this.Id = {(this.Id == null ? "null" : this.Id == string.Empty ? "" : this.Id)}"); - toStringOutput.Add($"this.Name = {(this.Name == null ? "null" : this.Name == string.Empty ? "" : this.Name)}"); - toStringOutput.Add($"this.Description = {(this.Description == null ? "null" : this.Description == string.Empty ? "" : this.Description)}"); - toStringOutput.Add($"this.Configuration = {(this.Configuration == null ? "null" : this.Configuration == string.Empty ? "" : this.Configuration)}"); - } - } -} \ No newline at end of file diff --git a/DotNet/ThoughtSpotPublicRESTAPI.Standard/Models/TspublicRestV2CustomactionAssociationUpdateRequest.cs b/DotNet/ThoughtSpotPublicRESTAPI.Standard/Models/TspublicRestV2CustomactionAssociationUpdateRequest.cs deleted file mode 100644 index 5bf0346e7..000000000 --- a/DotNet/ThoughtSpotPublicRESTAPI.Standard/Models/TspublicRestV2CustomactionAssociationUpdateRequest.cs +++ /dev/null @@ -1,96 +0,0 @@ -// -// Copyright (c) APIMatic. All rights reserved. -// -namespace ThoughtSpotPublicRESTAPI.Standard.Models -{ - using System; - using System.Collections.Generic; - using System.ComponentModel; - using System.IO; - using System.Linq; - using System.Text; - using System.Threading.Tasks; - using Newtonsoft.Json; - using Newtonsoft.Json.Converters; - using ThoughtSpotPublicRESTAPI.Standard; - using ThoughtSpotPublicRESTAPI.Standard.Utilities; - - /// - /// TspublicRestV2CustomactionAssociationUpdateRequest. - /// - public class TspublicRestV2CustomactionAssociationUpdateRequest - { - /// - /// Initializes a new instance of the class. - /// - public TspublicRestV2CustomactionAssociationUpdateRequest() - { - } - - /// - /// Initializes a new instance of the class. - /// - /// id. - /// association. - public TspublicRestV2CustomactionAssociationUpdateRequest( - string id, - string association) - { - this.Id = id; - this.Association = association; - } - - /// - /// GUID of the custom action - /// - [JsonProperty("id")] - public string Id { get; set; } - - /// - /// A JSON map of the attributes with association of the action to ThoughtSpot object ID - /// Example: - /// {"id":"0dbd5b3a-84c1-4407-9803-cf07d67e6fcf","name":"My worksheet action","version":"v2","type":"URL","detail":{"link":"https://unpkg.com","function":"my-worksheet-action","authSelect":"NONE","authToken":"","encodeUser":"","apiKey":"X-API-KEY","apiValue":"","additionalUrlHeaders":"{}"},"actionAssociationMap":{"WORKSHEET":{"2b9d083a-275c-4984-9cfe-90b036affa17":{"enabled":"true","context":"PRIMARY"}}},"context":"NONE","availability":[ ],"userGroupList":["d0326b56-ef23-4c8a-8327-a30e99bcc72b"]} - /// - [JsonProperty("association")] - public string Association { get; set; } - - /// - public override string ToString() - { - var toStringOutput = new List(); - - this.ToString(toStringOutput); - - return $"TspublicRestV2CustomactionAssociationUpdateRequest : ({string.Join(", ", toStringOutput)})"; - } - - /// - public override bool Equals(object obj) - { - if (obj == null) - { - return false; - } - - if (obj == this) - { - return true; - } - - return obj is TspublicRestV2CustomactionAssociationUpdateRequest other && - ((this.Id == null && other.Id == null) || (this.Id?.Equals(other.Id) == true)) && - ((this.Association == null && other.Association == null) || (this.Association?.Equals(other.Association) == true)); - } - - - /// - /// ToString overload. - /// - /// List of strings. - protected void ToString(List toStringOutput) - { - toStringOutput.Add($"this.Id = {(this.Id == null ? "null" : this.Id == string.Empty ? "" : this.Id)}"); - toStringOutput.Add($"this.Association = {(this.Association == null ? "null" : this.Association == string.Empty ? "" : this.Association)}"); - } - } -} \ No newline at end of file diff --git a/DotNet/ThoughtSpotPublicRESTAPI.Standard/Models/TspublicRestV2CustomactionCreateRequest.cs b/DotNet/ThoughtSpotPublicRESTAPI.Standard/Models/TspublicRestV2CustomactionCreateRequest.cs deleted file mode 100644 index cf2cc753a..000000000 --- a/DotNet/ThoughtSpotPublicRESTAPI.Standard/Models/TspublicRestV2CustomactionCreateRequest.cs +++ /dev/null @@ -1,85 +0,0 @@ -// -// Copyright (c) APIMatic. All rights reserved. -// -namespace ThoughtSpotPublicRESTAPI.Standard.Models -{ - using System; - using System.Collections.Generic; - using System.ComponentModel; - using System.IO; - using System.Linq; - using System.Text; - using System.Threading.Tasks; - using Newtonsoft.Json; - using Newtonsoft.Json.Converters; - using ThoughtSpotPublicRESTAPI.Standard; - using ThoughtSpotPublicRESTAPI.Standard.Utilities; - - /// - /// TspublicRestV2CustomactionCreateRequest. - /// - public class TspublicRestV2CustomactionCreateRequest - { - /// - /// Initializes a new instance of the class. - /// - public TspublicRestV2CustomactionCreateRequest() - { - } - - /// - /// Initializes a new instance of the class. - /// - /// configuration. - public TspublicRestV2CustomactionCreateRequest( - string configuration) - { - this.Configuration = configuration; - } - - /// - /// A JSON object with the key-value pair of configuration attributes - /// Example: - /// {"id":"3f7eac93-cce1-4ffc-b7a8-429353edbc6b","name":"unpkg test","version":"v2","type":"URL","detail":{"link":"https://unpkg.com ","function":"unpkg-test","authSelect":"BEARER","authToken":"asdfasadf3q4534534","encodeUser":"","apiKey":"X-API-KEY","apiValue":"","additionalUrlHeaders":"{\\"url_header1\\":{\\"id\\":\\"6a82908c-9328-40ff-b347-65adeda12f57\\",\\"key\\":\\"key1\\",\\"value\\":\\"value1\\"}}"},"actionAssociationMap":{"ANSWER":{"e4079d3f-ae71-4b0a-a70a-f17ecaf157a5":{"enabled":"true","context":"MENU"}}},"context":"NONE","availability":["GLOBAL"],"userGroupList":["d0326b56-ef23-4c8a-8327-a30e99bcc72b"]} - /// - [JsonProperty("configuration")] - public string Configuration { get; set; } - - /// - public override string ToString() - { - var toStringOutput = new List(); - - this.ToString(toStringOutput); - - return $"TspublicRestV2CustomactionCreateRequest : ({string.Join(", ", toStringOutput)})"; - } - - /// - public override bool Equals(object obj) - { - if (obj == null) - { - return false; - } - - if (obj == this) - { - return true; - } - - return obj is TspublicRestV2CustomactionCreateRequest other && - ((this.Configuration == null && other.Configuration == null) || (this.Configuration?.Equals(other.Configuration) == true)); - } - - - /// - /// ToString overload. - /// - /// List of strings. - protected void ToString(List toStringOutput) - { - toStringOutput.Add($"this.Configuration = {(this.Configuration == null ? "null" : this.Configuration == string.Empty ? "" : this.Configuration)}"); - } - } -} \ No newline at end of file diff --git a/DotNet/ThoughtSpotPublicRESTAPI.Standard/Models/TspublicRestV2CustomactionSearchRequest.cs b/DotNet/ThoughtSpotPublicRESTAPI.Standard/Models/TspublicRestV2CustomactionSearchRequest.cs deleted file mode 100644 index b565d4276..000000000 --- a/DotNet/ThoughtSpotPublicRESTAPI.Standard/Models/TspublicRestV2CustomactionSearchRequest.cs +++ /dev/null @@ -1,84 +0,0 @@ -// -// Copyright (c) APIMatic. All rights reserved. -// -namespace ThoughtSpotPublicRESTAPI.Standard.Models -{ - using System; - using System.Collections.Generic; - using System.ComponentModel; - using System.IO; - using System.Linq; - using System.Text; - using System.Threading.Tasks; - using Newtonsoft.Json; - using Newtonsoft.Json.Converters; - using ThoughtSpotPublicRESTAPI.Standard; - using ThoughtSpotPublicRESTAPI.Standard.Utilities; - - /// - /// TspublicRestV2CustomactionSearchRequest. - /// - public class TspublicRestV2CustomactionSearchRequest - { - /// - /// Initializes a new instance of the class. - /// - public TspublicRestV2CustomactionSearchRequest() - { - } - - /// - /// Initializes a new instance of the class. - /// - /// tag. - public TspublicRestV2CustomactionSearchRequest( - List tag = null) - { - this.Tag = tag; - } - - /// - /// A JSON array of tag GUIDs. - /// If tags are applied to worksheets, search answers, or Liveboard visualizations, and custom actions are associated to these objects, you can use this parameter to filter the custom action data by tags. - /// - [JsonProperty("tag", NullValueHandling = NullValueHandling.Ignore)] - public List Tag { get; set; } - - /// - public override string ToString() - { - var toStringOutput = new List(); - - this.ToString(toStringOutput); - - return $"TspublicRestV2CustomactionSearchRequest : ({string.Join(", ", toStringOutput)})"; - } - - /// - public override bool Equals(object obj) - { - if (obj == null) - { - return false; - } - - if (obj == this) - { - return true; - } - - return obj is TspublicRestV2CustomactionSearchRequest other && - ((this.Tag == null && other.Tag == null) || (this.Tag?.Equals(other.Tag) == true)); - } - - - /// - /// ToString overload. - /// - /// List of strings. - protected void ToString(List toStringOutput) - { - toStringOutput.Add($"this.Tag = {(this.Tag == null ? "null" : $"[{string.Join(", ", this.Tag)} ]")}"); - } - } -} \ No newline at end of file diff --git a/DotNet/ThoughtSpotPublicRESTAPI.Standard/Models/TspublicRestV2CustomactionUpdateRequest.cs b/DotNet/ThoughtSpotPublicRESTAPI.Standard/Models/TspublicRestV2CustomactionUpdateRequest.cs deleted file mode 100644 index 8e084675f..000000000 --- a/DotNet/ThoughtSpotPublicRESTAPI.Standard/Models/TspublicRestV2CustomactionUpdateRequest.cs +++ /dev/null @@ -1,96 +0,0 @@ -// -// Copyright (c) APIMatic. All rights reserved. -// -namespace ThoughtSpotPublicRESTAPI.Standard.Models -{ - using System; - using System.Collections.Generic; - using System.ComponentModel; - using System.IO; - using System.Linq; - using System.Text; - using System.Threading.Tasks; - using Newtonsoft.Json; - using Newtonsoft.Json.Converters; - using ThoughtSpotPublicRESTAPI.Standard; - using ThoughtSpotPublicRESTAPI.Standard.Utilities; - - /// - /// TspublicRestV2CustomactionUpdateRequest. - /// - public class TspublicRestV2CustomactionUpdateRequest - { - /// - /// Initializes a new instance of the class. - /// - public TspublicRestV2CustomactionUpdateRequest() - { - } - - /// - /// Initializes a new instance of the class. - /// - /// id. - /// configuration. - public TspublicRestV2CustomactionUpdateRequest( - string id, - string configuration) - { - this.Id = id; - this.Configuration = configuration; - } - - /// - /// GUID of the custom action - /// - [JsonProperty("id")] - public string Id { get; set; } - - /// - /// A JSON object with the key-value pair of configuration attributes - /// Example: - /// {"id":"3f7eac93-cce1-4ffc-b7a8-429353edbc6b","name":"unpkg test","version":"v2","type":"URL","detail":{"link":"https://unpkg.com ","function":"unpkg-test","authSelect":"BEARER","authToken":"asdfasadf3q4534534","encodeUser":"","apiKey":"X-API-KEY","apiValue":"","additionalUrlHeaders":"{\\"url_header1\\":{\\"id\\":\\"6a82908c-9328-40ff-b347-65adeda12f57\\",\\"key\\":\\"key1\\",\\"value\\":\\"value1\\"}}"},"actionAssociationMap":{"ANSWER":{"e4079d3f-ae71-4b0a-a70a-f17ecaf157a5":{"enabled":"true","context":"MENU"}}},"context":"NONE","availability":["GLOBAL"],"userGroupList":["d0326b56-ef23-4c8a-8327-a30e99bcc72b"]} - /// - [JsonProperty("configuration")] - public string Configuration { get; set; } - - /// - public override string ToString() - { - var toStringOutput = new List(); - - this.ToString(toStringOutput); - - return $"TspublicRestV2CustomactionUpdateRequest : ({string.Join(", ", toStringOutput)})"; - } - - /// - public override bool Equals(object obj) - { - if (obj == null) - { - return false; - } - - if (obj == this) - { - return true; - } - - return obj is TspublicRestV2CustomactionUpdateRequest other && - ((this.Id == null && other.Id == null) || (this.Id?.Equals(other.Id) == true)) && - ((this.Configuration == null && other.Configuration == null) || (this.Configuration?.Equals(other.Configuration) == true)); - } - - - /// - /// ToString overload. - /// - /// List of strings. - protected void ToString(List toStringOutput) - { - toStringOutput.Add($"this.Id = {(this.Id == null ? "null" : this.Id == string.Empty ? "" : this.Id)}"); - toStringOutput.Add($"this.Configuration = {(this.Configuration == null ? "null" : this.Configuration == string.Empty ? "" : this.Configuration)}"); - } - } -} \ No newline at end of file diff --git a/DotNet/ThoughtSpotPublicRESTAPI.Standard/Models/TspublicRestV2DataAnswerRequest.cs b/DotNet/ThoughtSpotPublicRESTAPI.Standard/Models/TspublicRestV2DataAnswerRequest.cs deleted file mode 100644 index e503222a3..000000000 --- a/DotNet/ThoughtSpotPublicRESTAPI.Standard/Models/TspublicRestV2DataAnswerRequest.cs +++ /dev/null @@ -1,136 +0,0 @@ -// -// Copyright (c) APIMatic. All rights reserved. -// -namespace ThoughtSpotPublicRESTAPI.Standard.Models -{ - using System; - using System.Collections.Generic; - using System.ComponentModel; - using System.IO; - using System.Linq; - using System.Text; - using System.Threading.Tasks; - using Newtonsoft.Json; - using Newtonsoft.Json.Converters; - using ThoughtSpotPublicRESTAPI.Standard; - using ThoughtSpotPublicRESTAPI.Standard.Utilities; - - /// - /// TspublicRestV2DataAnswerRequest. - /// - public class TspublicRestV2DataAnswerRequest - { - /// - /// Initializes a new instance of the class. - /// - public TspublicRestV2DataAnswerRequest() - { - } - - /// - /// Initializes a new instance of the class. - /// - /// id. - /// offset. - /// batchNumber. - /// batchSize. - /// formatType. - public TspublicRestV2DataAnswerRequest( - string id, - int? offset = 0, - int? batchNumber = -1, - int? batchSize = -1, - Models.FormatTypeEnum? formatType = Models.FormatTypeEnum.COMPACT) - { - this.Offset = offset; - this.BatchNumber = batchNumber; - this.BatchSize = batchSize; - this.Id = id; - this.FormatType = formatType; - } - - /// - /// The offset point, starting from where the records should be included in the response. - /// If no input is provided then offset starts from 0. - /// - [JsonProperty("offset", NullValueHandling = NullValueHandling.Ignore)] - public int? Offset { get; set; } - - /// - /// An alternate way to set offset for the starting point of the response. - /// The value in offset field will not be considered if batchNumber field has value greater than 0. - /// Offset value will be calculated as (batchNumber - 1) * batchSize. - /// It is mandatory to provide a value for batchSize with batchNumber. - /// Example: - /// Assume response has 100 records. Now, batchNumber is set as 2 and batchSize as 10, then offset value will be 10. So, 10 records starting from 11th record will be considered. - /// - [JsonProperty("batchNumber", NullValueHandling = NullValueHandling.Ignore)] - public int? BatchNumber { get; set; } - - /// - /// The number of records that should be included in the response starting from offset position. - /// If no input is provided, then all records starting from the value provided in offset is included in the response - /// - [JsonProperty("batchSize", NullValueHandling = NullValueHandling.Ignore)] - public int? BatchSize { get; set; } - - /// - /// The GUID of the Answer - /// - [JsonProperty("id")] - public string Id { get; set; } - - /// - /// The format of the data in the response. - /// FULL: The response comes in "column":"value" format. - /// COMPACT: The response includes only the value of the columns. - /// - [JsonProperty("formatType", ItemConverterType = typeof(StringEnumConverter), NullValueHandling = NullValueHandling.Ignore)] - public Models.FormatTypeEnum? FormatType { get; set; } - - /// - public override string ToString() - { - var toStringOutput = new List(); - - this.ToString(toStringOutput); - - return $"TspublicRestV2DataAnswerRequest : ({string.Join(", ", toStringOutput)})"; - } - - /// - public override bool Equals(object obj) - { - if (obj == null) - { - return false; - } - - if (obj == this) - { - return true; - } - - return obj is TspublicRestV2DataAnswerRequest other && - ((this.Offset == null && other.Offset == null) || (this.Offset?.Equals(other.Offset) == true)) && - ((this.BatchNumber == null && other.BatchNumber == null) || (this.BatchNumber?.Equals(other.BatchNumber) == true)) && - ((this.BatchSize == null && other.BatchSize == null) || (this.BatchSize?.Equals(other.BatchSize) == true)) && - ((this.Id == null && other.Id == null) || (this.Id?.Equals(other.Id) == true)) && - ((this.FormatType == null && other.FormatType == null) || (this.FormatType?.Equals(other.FormatType) == true)); - } - - - /// - /// ToString overload. - /// - /// List of strings. - protected void ToString(List toStringOutput) - { - toStringOutput.Add($"this.Offset = {(this.Offset == null ? "null" : this.Offset.ToString())}"); - toStringOutput.Add($"this.BatchNumber = {(this.BatchNumber == null ? "null" : this.BatchNumber.ToString())}"); - toStringOutput.Add($"this.BatchSize = {(this.BatchSize == null ? "null" : this.BatchSize.ToString())}"); - toStringOutput.Add($"this.Id = {(this.Id == null ? "null" : this.Id == string.Empty ? "" : this.Id)}"); - toStringOutput.Add($"this.FormatType = {(this.FormatType == null ? "null" : this.FormatType.ToString())}"); - } - } -} \ No newline at end of file diff --git a/DotNet/ThoughtSpotPublicRESTAPI.Standard/Models/TspublicRestV2DataLiveboardRequest.cs b/DotNet/ThoughtSpotPublicRESTAPI.Standard/Models/TspublicRestV2DataLiveboardRequest.cs deleted file mode 100644 index 4f57cce02..000000000 --- a/DotNet/ThoughtSpotPublicRESTAPI.Standard/Models/TspublicRestV2DataLiveboardRequest.cs +++ /dev/null @@ -1,184 +0,0 @@ -// -// Copyright (c) APIMatic. All rights reserved. -// -namespace ThoughtSpotPublicRESTAPI.Standard.Models -{ - using System; - using System.Collections.Generic; - using System.ComponentModel; - using System.IO; - using System.Linq; - using System.Text; - using System.Threading.Tasks; - using Newtonsoft.Json; - using Newtonsoft.Json.Converters; - using ThoughtSpotPublicRESTAPI.Standard; - using ThoughtSpotPublicRESTAPI.Standard.Utilities; - - /// - /// TspublicRestV2DataLiveboardRequest. - /// - public class TspublicRestV2DataLiveboardRequest - { - /// - /// Initializes a new instance of the class. - /// - public TspublicRestV2DataLiveboardRequest() - { - } - - /// - /// Initializes a new instance of the class. - /// - /// offset. - /// batchNumber. - /// batchSize. - /// id. - /// transientContent. - /// vizId. - /// runtimeFilter. - /// runtimeSort. - /// formatType. - public TspublicRestV2DataLiveboardRequest( - int? offset = 0, - int? batchNumber = -1, - int? batchSize = -1, - string id = null, - string transientContent = null, - List vizId = null, - string runtimeFilter = null, - string runtimeSort = null, - Models.FormatTypeEnum? formatType = Models.FormatTypeEnum.COMPACT) - { - this.Offset = offset; - this.BatchNumber = batchNumber; - this.BatchSize = batchSize; - this.Id = id; - this.TransientContent = transientContent; - this.VizId = vizId; - this.RuntimeFilter = runtimeFilter; - this.RuntimeSort = runtimeSort; - this.FormatType = formatType; - } - - /// - /// The offset point, starting from where the records should be included in the response. - /// If no input is provided then offset starts from 0. - /// - [JsonProperty("offset", NullValueHandling = NullValueHandling.Ignore)] - public int? Offset { get; set; } - - /// - /// An alternate way to set offset for the starting point of the response. - /// The value in offset field will not be considered if batchNumber field has value greater than 0. - /// Offset value will be calculated as (batchNumber - 1) * batchSize. - /// It is mandatory to provide a value for batchSize with batchNumber. - /// Example: - /// Assume response has 100 records. Now, batchNumber is set as 2 and batchSize as 10, then offset value will be 10. So, 10 records starting from 11th record will be considered. - /// - [JsonProperty("batchNumber", NullValueHandling = NullValueHandling.Ignore)] - public int? BatchNumber { get; set; } - - /// - /// The number of records that should be included in the response starting from offset position. - /// If no input is provided, then all records starting from the value provided in offset is included in the response - /// - [JsonProperty("batchSize", NullValueHandling = NullValueHandling.Ignore)] - public int? BatchSize { get; set; } - - /// - /// The GUID of the Liveboard - /// - [JsonProperty("id", NullValueHandling = NullValueHandling.Ignore)] - public string Id { get; set; } - - /// - /// If you have embedded ThoughtSpot in your host application, and you want to download Liveboard data with unsaved changes then, pass the transient content from the browser fetch request, using the getExportRequestForCurrentPinboard method. For more information, see https://developers.thoughtspot.com/docs/?pageid=liveboard-export-api#transient-pinboard . If value for this field is provided, then id will not be considered. - /// - [JsonProperty("transientContent", NullValueHandling = NullValueHandling.Ignore)] - public string TransientContent { get; set; } - - /// - /// A JSON array of GUIDs of the visualizations in the Liveboard. - /// - [JsonProperty("vizId", NullValueHandling = NullValueHandling.Ignore)] - public List VizId { get; set; } - - /// - /// JSON object which contains filter condition to filter the data at the time of data retrieval. - /// Example: {"col1":"region","op1":"EQ","val1":"northeast","col2":"date","op2":"BET","val2":["1625126400000","1625126400000"]} - /// For more information, see https://developers.thoughtspot.com/docs/?pageid=runtime-filters - /// - [JsonProperty("runtimeFilter", NullValueHandling = NullValueHandling.Ignore)] - public string RuntimeFilter { get; set; } - - /// - /// JSON object which provides columns to sort the data at the time of data retrieval. - /// Example: {"sortCol1":"region","asc1":true,"sortCol2":"date"} - /// For more information, see https://developers.thoughtspot.com/docs/?pageid=runtime-filters. - /// - [JsonProperty("runtimeSort", NullValueHandling = NullValueHandling.Ignore)] - public string RuntimeSort { get; set; } - - /// - /// The format of the data in the response. - /// FULL: The response comes in "column":"value" format. - /// COMPACT: The response includes only the value of the columns. - /// - [JsonProperty("formatType", ItemConverterType = typeof(StringEnumConverter), NullValueHandling = NullValueHandling.Ignore)] - public Models.FormatTypeEnum? FormatType { get; set; } - - /// - public override string ToString() - { - var toStringOutput = new List(); - - this.ToString(toStringOutput); - - return $"TspublicRestV2DataLiveboardRequest : ({string.Join(", ", toStringOutput)})"; - } - - /// - public override bool Equals(object obj) - { - if (obj == null) - { - return false; - } - - if (obj == this) - { - return true; - } - - return obj is TspublicRestV2DataLiveboardRequest other && - ((this.Offset == null && other.Offset == null) || (this.Offset?.Equals(other.Offset) == true)) && - ((this.BatchNumber == null && other.BatchNumber == null) || (this.BatchNumber?.Equals(other.BatchNumber) == true)) && - ((this.BatchSize == null && other.BatchSize == null) || (this.BatchSize?.Equals(other.BatchSize) == true)) && - ((this.Id == null && other.Id == null) || (this.Id?.Equals(other.Id) == true)) && - ((this.TransientContent == null && other.TransientContent == null) || (this.TransientContent?.Equals(other.TransientContent) == true)) && - ((this.VizId == null && other.VizId == null) || (this.VizId?.Equals(other.VizId) == true)) && - ((this.RuntimeFilter == null && other.RuntimeFilter == null) || (this.RuntimeFilter?.Equals(other.RuntimeFilter) == true)) && - ((this.RuntimeSort == null && other.RuntimeSort == null) || (this.RuntimeSort?.Equals(other.RuntimeSort) == true)) && - ((this.FormatType == null && other.FormatType == null) || (this.FormatType?.Equals(other.FormatType) == true)); - } - - - /// - /// ToString overload. - /// - /// List of strings. - protected void ToString(List toStringOutput) - { - toStringOutput.Add($"this.Offset = {(this.Offset == null ? "null" : this.Offset.ToString())}"); - toStringOutput.Add($"this.BatchNumber = {(this.BatchNumber == null ? "null" : this.BatchNumber.ToString())}"); - toStringOutput.Add($"this.BatchSize = {(this.BatchSize == null ? "null" : this.BatchSize.ToString())}"); - toStringOutput.Add($"this.Id = {(this.Id == null ? "null" : this.Id == string.Empty ? "" : this.Id)}"); - toStringOutput.Add($"this.TransientContent = {(this.TransientContent == null ? "null" : this.TransientContent == string.Empty ? "" : this.TransientContent)}"); - toStringOutput.Add($"this.VizId = {(this.VizId == null ? "null" : $"[{string.Join(", ", this.VizId)} ]")}"); - toStringOutput.Add($"this.RuntimeFilter = {(this.RuntimeFilter == null ? "null" : this.RuntimeFilter == string.Empty ? "" : this.RuntimeFilter)}"); - toStringOutput.Add($"this.RuntimeSort = {(this.RuntimeSort == null ? "null" : this.RuntimeSort == string.Empty ? "" : this.RuntimeSort)}"); - toStringOutput.Add($"this.FormatType = {(this.FormatType == null ? "null" : this.FormatType.ToString())}"); - } - } -} \ No newline at end of file diff --git a/DotNet/ThoughtSpotPublicRESTAPI.Standard/Models/TspublicRestV2DataSearchRequest.cs b/DotNet/ThoughtSpotPublicRESTAPI.Standard/Models/TspublicRestV2DataSearchRequest.cs deleted file mode 100644 index 6790f365e..000000000 --- a/DotNet/ThoughtSpotPublicRESTAPI.Standard/Models/TspublicRestV2DataSearchRequest.cs +++ /dev/null @@ -1,147 +0,0 @@ -// -// Copyright (c) APIMatic. All rights reserved. -// -namespace ThoughtSpotPublicRESTAPI.Standard.Models -{ - using System; - using System.Collections.Generic; - using System.ComponentModel; - using System.IO; - using System.Linq; - using System.Text; - using System.Threading.Tasks; - using Newtonsoft.Json; - using Newtonsoft.Json.Converters; - using ThoughtSpotPublicRESTAPI.Standard; - using ThoughtSpotPublicRESTAPI.Standard.Utilities; - - /// - /// TspublicRestV2DataSearchRequest. - /// - public class TspublicRestV2DataSearchRequest - { - /// - /// Initializes a new instance of the class. - /// - public TspublicRestV2DataSearchRequest() - { - } - - /// - /// Initializes a new instance of the class. - /// - /// queryString. - /// dataObjectId. - /// offset. - /// batchNumber. - /// batchSize. - /// formatType. - public TspublicRestV2DataSearchRequest( - string queryString, - string dataObjectId, - int? offset = -1, - int? batchNumber = -1, - int? batchSize = -1, - Models.FormatTypeEnum? formatType = Models.FormatTypeEnum.COMPACT) - { - this.Offset = offset; - this.BatchNumber = batchNumber; - this.BatchSize = batchSize; - this.QueryString = queryString; - this.DataObjectId = dataObjectId; - this.FormatType = formatType; - } - - /// - /// The offset point, starting from where the records should be included in the response. - /// If no input is provided then offset starts from 0. - /// - [JsonProperty("offset", NullValueHandling = NullValueHandling.Ignore)] - public int? Offset { get; set; } - - /// - /// An alternate way to set offset for the starting point of the response. - /// The value in offset field will not be considered if batchNumber field has value greater than 0. - /// Offset value will be calculated as (batchNumber - 1) * batchSize. - /// It is mandatory to provide a value for batchSize with batchNumber. - /// Example: - /// Assume response has 100 records. Now, batchNumber is set as 2 and batchSize as 10, then offset value will be 10. So, 10 records starting from 11th record will be considered. - /// - [JsonProperty("batchNumber", NullValueHandling = NullValueHandling.Ignore)] - public int? BatchNumber { get; set; } - - /// - /// The number of records that should be included in the response starting from offset position. - /// If no input is provided, then all records starting from the value provided in offset is included in the response - /// - [JsonProperty("batchSize", NullValueHandling = NullValueHandling.Ignore)] - public int? BatchSize { get; set; } - - /// - /// The data search query string. Example: [revenue] > 1000 [ship mode] = 'air' - /// - [JsonProperty("queryString")] - public string QueryString { get; set; } - - /// - /// The GUID of the data object, either a worksheet, a view, or a table. - /// - [JsonProperty("dataObjectId")] - public string DataObjectId { get; set; } - - /// - /// The format of the data in the response. - /// FULL: The response comes in "column":"value" format. - /// COMPACT: The response includes only the value of the columns. - /// - [JsonProperty("formatType", ItemConverterType = typeof(StringEnumConverter), NullValueHandling = NullValueHandling.Ignore)] - public Models.FormatTypeEnum? FormatType { get; set; } - - /// - public override string ToString() - { - var toStringOutput = new List(); - - this.ToString(toStringOutput); - - return $"TspublicRestV2DataSearchRequest : ({string.Join(", ", toStringOutput)})"; - } - - /// - public override bool Equals(object obj) - { - if (obj == null) - { - return false; - } - - if (obj == this) - { - return true; - } - - return obj is TspublicRestV2DataSearchRequest other && - ((this.Offset == null && other.Offset == null) || (this.Offset?.Equals(other.Offset) == true)) && - ((this.BatchNumber == null && other.BatchNumber == null) || (this.BatchNumber?.Equals(other.BatchNumber) == true)) && - ((this.BatchSize == null && other.BatchSize == null) || (this.BatchSize?.Equals(other.BatchSize) == true)) && - ((this.QueryString == null && other.QueryString == null) || (this.QueryString?.Equals(other.QueryString) == true)) && - ((this.DataObjectId == null && other.DataObjectId == null) || (this.DataObjectId?.Equals(other.DataObjectId) == true)) && - ((this.FormatType == null && other.FormatType == null) || (this.FormatType?.Equals(other.FormatType) == true)); - } - - - /// - /// ToString overload. - /// - /// List of strings. - protected void ToString(List toStringOutput) - { - toStringOutput.Add($"this.Offset = {(this.Offset == null ? "null" : this.Offset.ToString())}"); - toStringOutput.Add($"this.BatchNumber = {(this.BatchNumber == null ? "null" : this.BatchNumber.ToString())}"); - toStringOutput.Add($"this.BatchSize = {(this.BatchSize == null ? "null" : this.BatchSize.ToString())}"); - toStringOutput.Add($"this.QueryString = {(this.QueryString == null ? "null" : this.QueryString == string.Empty ? "" : this.QueryString)}"); - toStringOutput.Add($"this.DataObjectId = {(this.DataObjectId == null ? "null" : this.DataObjectId == string.Empty ? "" : this.DataObjectId)}"); - toStringOutput.Add($"this.FormatType = {(this.FormatType == null ? "null" : this.FormatType.ToString())}"); - } - } -} \ No newline at end of file diff --git a/DotNet/ThoughtSpotPublicRESTAPI.Standard/Models/TspublicRestV2DatabaseTableCreateRequest.cs b/DotNet/ThoughtSpotPublicRESTAPI.Standard/Models/TspublicRestV2DatabaseTableCreateRequest.cs deleted file mode 100644 index 8a667345c..000000000 --- a/DotNet/ThoughtSpotPublicRESTAPI.Standard/Models/TspublicRestV2DatabaseTableCreateRequest.cs +++ /dev/null @@ -1,94 +0,0 @@ -// -// Copyright (c) APIMatic. All rights reserved. -// -namespace ThoughtSpotPublicRESTAPI.Standard.Models -{ - using System; - using System.Collections.Generic; - using System.ComponentModel; - using System.IO; - using System.Linq; - using System.Text; - using System.Threading.Tasks; - using Newtonsoft.Json; - using Newtonsoft.Json.Converters; - using ThoughtSpotPublicRESTAPI.Standard; - using ThoughtSpotPublicRESTAPI.Standard.Utilities; - - /// - /// TspublicRestV2DatabaseTableCreateRequest. - /// - public class TspublicRestV2DatabaseTableCreateRequest - { - /// - /// Initializes a new instance of the class. - /// - public TspublicRestV2DatabaseTableCreateRequest() - { - } - - /// - /// Initializes a new instance of the class. - /// - /// createDatabase. - /// schema. - public TspublicRestV2DatabaseTableCreateRequest( - bool? createDatabase = true, - string schema = null) - { - this.CreateDatabase = createDatabase; - this.Schema = schema; - } - - /// - /// Flag to indicate if the database and schema should be created if they do not exist in Falcon. (Valid values: True/False) - /// - [JsonProperty("createDatabase", NullValueHandling = NullValueHandling.Ignore)] - public bool? CreateDatabase { get; set; } - - /// - /// DDL of the table to be created. Example: {"database":{"name":"test_db"},"schema":{"name":"test_schema"},"table":{"id":{"name":"test_table"},"primary_key":[{"name":"test_pk"}],"column":[{"id":{"name":"test_pk"},"size":0,"data_type":"TYPE_INT32"},{"id":{"name":"test_col1"},"size":0,"data_type":"TYPE_FLOAT"},{"id":{"name":"test_col2"},"data_type":"TYPE_INT64","datetime":"TYPE_DATE"}{"id":{"name":"test_col3"},"size":10,"data_type":"TYPE_VAR_CHAR"}]}} - /// - [JsonProperty("schema", NullValueHandling = NullValueHandling.Ignore)] - public string Schema { get; set; } - - /// - public override string ToString() - { - var toStringOutput = new List(); - - this.ToString(toStringOutput); - - return $"TspublicRestV2DatabaseTableCreateRequest : ({string.Join(", ", toStringOutput)})"; - } - - /// - public override bool Equals(object obj) - { - if (obj == null) - { - return false; - } - - if (obj == this) - { - return true; - } - - return obj is TspublicRestV2DatabaseTableCreateRequest other && - ((this.CreateDatabase == null && other.CreateDatabase == null) || (this.CreateDatabase?.Equals(other.CreateDatabase) == true)) && - ((this.Schema == null && other.Schema == null) || (this.Schema?.Equals(other.Schema) == true)); - } - - - /// - /// ToString overload. - /// - /// List of strings. - protected void ToString(List toStringOutput) - { - toStringOutput.Add($"this.CreateDatabase = {(this.CreateDatabase == null ? "null" : this.CreateDatabase.ToString())}"); - toStringOutput.Add($"this.Schema = {(this.Schema == null ? "null" : this.Schema == string.Empty ? "" : this.Schema)}"); - } - } -} \ No newline at end of file diff --git a/DotNet/ThoughtSpotPublicRESTAPI.Standard/Models/TspublicRestV2DatabaseTableRunqueryRequest.cs b/DotNet/ThoughtSpotPublicRESTAPI.Standard/Models/TspublicRestV2DatabaseTableRunqueryRequest.cs deleted file mode 100644 index 5d1f31222..000000000 --- a/DotNet/ThoughtSpotPublicRESTAPI.Standard/Models/TspublicRestV2DatabaseTableRunqueryRequest.cs +++ /dev/null @@ -1,83 +0,0 @@ -// -// Copyright (c) APIMatic. All rights reserved. -// -namespace ThoughtSpotPublicRESTAPI.Standard.Models -{ - using System; - using System.Collections.Generic; - using System.ComponentModel; - using System.IO; - using System.Linq; - using System.Text; - using System.Threading.Tasks; - using Newtonsoft.Json; - using Newtonsoft.Json.Converters; - using ThoughtSpotPublicRESTAPI.Standard; - using ThoughtSpotPublicRESTAPI.Standard.Utilities; - - /// - /// TspublicRestV2DatabaseTableRunqueryRequest. - /// - public class TspublicRestV2DatabaseTableRunqueryRequest - { - /// - /// Initializes a new instance of the class. - /// - public TspublicRestV2DatabaseTableRunqueryRequest() - { - } - - /// - /// Initializes a new instance of the class. - /// - /// statement. - public TspublicRestV2DatabaseTableRunqueryRequest( - List statement) - { - this.Statement = statement; - } - - /// - /// A JSON array of TQL statements separated by semi-colon (;). Each TQL statement should end with semi-colon (;). The TQL operations that can be run through this API are restricted to create database and schema, alter table, delete and update table rows. If a TQL statement fails, then the subsequent statements in the array are not run. Example: ["alter table test_db.test_schema.test_table drop contraint primary key;";"alter table test_db.test_schema.test_table add column test_col4 varchar(10) DEFAULT '';"] - /// - [JsonProperty("statement")] - public List Statement { get; set; } - - /// - public override string ToString() - { - var toStringOutput = new List(); - - this.ToString(toStringOutput); - - return $"TspublicRestV2DatabaseTableRunqueryRequest : ({string.Join(", ", toStringOutput)})"; - } - - /// - public override bool Equals(object obj) - { - if (obj == null) - { - return false; - } - - if (obj == this) - { - return true; - } - - return obj is TspublicRestV2DatabaseTableRunqueryRequest other && - ((this.Statement == null && other.Statement == null) || (this.Statement?.Equals(other.Statement) == true)); - } - - - /// - /// ToString overload. - /// - /// List of strings. - protected void ToString(List toStringOutput) - { - toStringOutput.Add($"this.Statement = {(this.Statement == null ? "null" : $"[{string.Join(", ", this.Statement)} ]")}"); - } - } -} \ No newline at end of file diff --git a/DotNet/ThoughtSpotPublicRESTAPI.Standard/Models/TspublicRestV2GroupAddgroupRequest.cs b/DotNet/ThoughtSpotPublicRESTAPI.Standard/Models/TspublicRestV2GroupAddgroupRequest.cs deleted file mode 100644 index eaa07c8b1..000000000 --- a/DotNet/ThoughtSpotPublicRESTAPI.Standard/Models/TspublicRestV2GroupAddgroupRequest.cs +++ /dev/null @@ -1,105 +0,0 @@ -// -// Copyright (c) APIMatic. All rights reserved. -// -namespace ThoughtSpotPublicRESTAPI.Standard.Models -{ - using System; - using System.Collections.Generic; - using System.ComponentModel; - using System.IO; - using System.Linq; - using System.Text; - using System.Threading.Tasks; - using Newtonsoft.Json; - using Newtonsoft.Json.Converters; - using ThoughtSpotPublicRESTAPI.Standard; - using ThoughtSpotPublicRESTAPI.Standard.Utilities; - - /// - /// TspublicRestV2GroupAddgroupRequest. - /// - public class TspublicRestV2GroupAddgroupRequest - { - /// - /// Initializes a new instance of the class. - /// - public TspublicRestV2GroupAddgroupRequest() - { - } - - /// - /// Initializes a new instance of the class. - /// - /// groups. - /// name. - /// id. - public TspublicRestV2GroupAddgroupRequest( - List groups, - string name = null, - string id = null) - { - this.Name = name; - this.Id = id; - this.Groups = groups; - } - - /// - /// Name of the group - /// - [JsonProperty("name", NullValueHandling = NullValueHandling.Ignore)] - public string Name { get; set; } - - /// - /// The GUID of the group to query. - /// - [JsonProperty("id", NullValueHandling = NullValueHandling.Ignore)] - public string Id { get; set; } - - /// - /// Array of objects of groups that the user belong to. - /// - [JsonProperty("groups")] - public List Groups { get; set; } - - /// - public override string ToString() - { - var toStringOutput = new List(); - - this.ToString(toStringOutput); - - return $"TspublicRestV2GroupAddgroupRequest : ({string.Join(", ", toStringOutput)})"; - } - - /// - public override bool Equals(object obj) - { - if (obj == null) - { - return false; - } - - if (obj == this) - { - return true; - } - - return obj is TspublicRestV2GroupAddgroupRequest other && - ((this.Name == null && other.Name == null) || (this.Name?.Equals(other.Name) == true)) && - ((this.Id == null && other.Id == null) || (this.Id?.Equals(other.Id) == true)) && - ((this.Groups == null && other.Groups == null) || (this.Groups?.Equals(other.Groups) == true)); - } - - - /// - /// ToString overload. - /// - /// List of strings. - protected void ToString(List toStringOutput) - { - toStringOutput.Add($"this.Name = {(this.Name == null ? "null" : this.Name == string.Empty ? "" : this.Name)}"); - toStringOutput.Add($"this.Id = {(this.Id == null ? "null" : this.Id == string.Empty ? "" : this.Id)}"); - toStringOutput.Add($"this.Groups = {(this.Groups == null ? "null" : $"[{string.Join(", ", this.Groups)} ]")}"); - } - } -} \ No newline at end of file diff --git a/DotNet/ThoughtSpotPublicRESTAPI.Standard/Models/TspublicRestV2GroupAddprivilegeRequest.cs b/DotNet/ThoughtSpotPublicRESTAPI.Standard/Models/TspublicRestV2GroupAddprivilegeRequest.cs deleted file mode 100644 index 6a5a59fa6..000000000 --- a/DotNet/ThoughtSpotPublicRESTAPI.Standard/Models/TspublicRestV2GroupAddprivilegeRequest.cs +++ /dev/null @@ -1,105 +0,0 @@ -// -// Copyright (c) APIMatic. All rights reserved. -// -namespace ThoughtSpotPublicRESTAPI.Standard.Models -{ - using System; - using System.Collections.Generic; - using System.ComponentModel; - using System.IO; - using System.Linq; - using System.Text; - using System.Threading.Tasks; - using Newtonsoft.Json; - using Newtonsoft.Json.Converters; - using ThoughtSpotPublicRESTAPI.Standard; - using ThoughtSpotPublicRESTAPI.Standard.Utilities; - - /// - /// TspublicRestV2GroupAddprivilegeRequest. - /// - public class TspublicRestV2GroupAddprivilegeRequest - { - /// - /// Initializes a new instance of the class. - /// - public TspublicRestV2GroupAddprivilegeRequest() - { - } - - /// - /// Initializes a new instance of the class. - /// - /// name. - /// id. - /// privileges. - public TspublicRestV2GroupAddprivilegeRequest( - string name = null, - string id = null, - List privileges = null) - { - this.Name = name; - this.Id = id; - this.Privileges = privileges; - } - - /// - /// Name of the group - /// - [JsonProperty("name", NullValueHandling = NullValueHandling.Ignore)] - public string Name { get; set; } - - /// - /// The GUID of the group to query. - /// - [JsonProperty("id", NullValueHandling = NullValueHandling.Ignore)] - public string Id { get; set; } - - /// - /// A JSON array of name of users or GUIDs of users or both. When both are given then id is considered - /// - [JsonProperty("privileges", ItemConverterType = typeof(StringEnumConverter), NullValueHandling = NullValueHandling.Ignore)] - public List Privileges { get; set; } - - /// - public override string ToString() - { - var toStringOutput = new List(); - - this.ToString(toStringOutput); - - return $"TspublicRestV2GroupAddprivilegeRequest : ({string.Join(", ", toStringOutput)})"; - } - - /// - public override bool Equals(object obj) - { - if (obj == null) - { - return false; - } - - if (obj == this) - { - return true; - } - - return obj is TspublicRestV2GroupAddprivilegeRequest other && - ((this.Name == null && other.Name == null) || (this.Name?.Equals(other.Name) == true)) && - ((this.Id == null && other.Id == null) || (this.Id?.Equals(other.Id) == true)) && - ((this.Privileges == null && other.Privileges == null) || (this.Privileges?.Equals(other.Privileges) == true)); - } - - - /// - /// ToString overload. - /// - /// List of strings. - protected void ToString(List toStringOutput) - { - toStringOutput.Add($"this.Name = {(this.Name == null ? "null" : this.Name == string.Empty ? "" : this.Name)}"); - toStringOutput.Add($"this.Id = {(this.Id == null ? "null" : this.Id == string.Empty ? "" : this.Id)}"); - toStringOutput.Add($"this.Privileges = {(this.Privileges == null ? "null" : $"[{string.Join(", ", this.Privileges)} ]")}"); - } - } -} \ No newline at end of file diff --git a/DotNet/ThoughtSpotPublicRESTAPI.Standard/Models/TspublicRestV2GroupAdduserRequest.cs b/DotNet/ThoughtSpotPublicRESTAPI.Standard/Models/TspublicRestV2GroupAdduserRequest.cs deleted file mode 100644 index 7377e7902..000000000 --- a/DotNet/ThoughtSpotPublicRESTAPI.Standard/Models/TspublicRestV2GroupAdduserRequest.cs +++ /dev/null @@ -1,105 +0,0 @@ -// -// Copyright (c) APIMatic. All rights reserved. -// -namespace ThoughtSpotPublicRESTAPI.Standard.Models -{ - using System; - using System.Collections.Generic; - using System.ComponentModel; - using System.IO; - using System.Linq; - using System.Text; - using System.Threading.Tasks; - using Newtonsoft.Json; - using Newtonsoft.Json.Converters; - using ThoughtSpotPublicRESTAPI.Standard; - using ThoughtSpotPublicRESTAPI.Standard.Utilities; - - /// - /// TspublicRestV2GroupAdduserRequest. - /// - public class TspublicRestV2GroupAdduserRequest - { - /// - /// Initializes a new instance of the class. - /// - public TspublicRestV2GroupAdduserRequest() - { - } - - /// - /// Initializes a new instance of the class. - /// - /// users. - /// name. - /// id. - public TspublicRestV2GroupAdduserRequest( - List users, - string name = null, - string id = null) - { - this.Name = name; - this.Id = id; - this.Users = users; - } - - /// - /// Name of the group - /// - [JsonProperty("name", NullValueHandling = NullValueHandling.Ignore)] - public string Name { get; set; } - - /// - /// The GUID of the group to query. - /// - [JsonProperty("id", NullValueHandling = NullValueHandling.Ignore)] - public string Id { get; set; } - - /// - /// Array of user name that you want to update in user group. - /// - [JsonProperty("users")] - public List Users { get; set; } - - /// - public override string ToString() - { - var toStringOutput = new List(); - - this.ToString(toStringOutput); - - return $"TspublicRestV2GroupAdduserRequest : ({string.Join(", ", toStringOutput)})"; - } - - /// - public override bool Equals(object obj) - { - if (obj == null) - { - return false; - } - - if (obj == this) - { - return true; - } - - return obj is TspublicRestV2GroupAdduserRequest other && - ((this.Name == null && other.Name == null) || (this.Name?.Equals(other.Name) == true)) && - ((this.Id == null && other.Id == null) || (this.Id?.Equals(other.Id) == true)) && - ((this.Users == null && other.Users == null) || (this.Users?.Equals(other.Users) == true)); - } - - - /// - /// ToString overload. - /// - /// List of strings. - protected void ToString(List toStringOutput) - { - toStringOutput.Add($"this.Name = {(this.Name == null ? "null" : this.Name == string.Empty ? "" : this.Name)}"); - toStringOutput.Add($"this.Id = {(this.Id == null ? "null" : this.Id == string.Empty ? "" : this.Id)}"); - toStringOutput.Add($"this.Users = {(this.Users == null ? "null" : $"[{string.Join(", ", this.Users)} ]")}"); - } - } -} \ No newline at end of file diff --git a/DotNet/ThoughtSpotPublicRESTAPI.Standard/Models/TspublicRestV2GroupCreateRequest.cs b/DotNet/ThoughtSpotPublicRESTAPI.Standard/Models/TspublicRestV2GroupCreateRequest.cs deleted file mode 100644 index 08308c10c..000000000 --- a/DotNet/ThoughtSpotPublicRESTAPI.Standard/Models/TspublicRestV2GroupCreateRequest.cs +++ /dev/null @@ -1,171 +0,0 @@ -// -// Copyright (c) APIMatic. All rights reserved. -// -namespace ThoughtSpotPublicRESTAPI.Standard.Models -{ - using System; - using System.Collections.Generic; - using System.ComponentModel; - using System.IO; - using System.Linq; - using System.Text; - using System.Threading.Tasks; - using Newtonsoft.Json; - using Newtonsoft.Json.Converters; - using ThoughtSpotPublicRESTAPI.Standard; - using ThoughtSpotPublicRESTAPI.Standard.Utilities; - - /// - /// TspublicRestV2GroupCreateRequest. - /// - public class TspublicRestV2GroupCreateRequest - { - /// - /// Initializes a new instance of the class. - /// - public TspublicRestV2GroupCreateRequest() - { - } - - /// - /// Initializes a new instance of the class. - /// - /// name. - /// displayName. - /// visibility. - /// description. - /// privileges. - /// orgId. - /// groups. - /// users. - /// type. - public TspublicRestV2GroupCreateRequest( - string name, - string displayName, - Models.Visibility2Enum? visibility = Models.Visibility2Enum.DEFAULT, - string description = null, - List privileges = null, - int? orgId = null, - List groups = null, - List users = null, - Models.Type10Enum? type = Models.Type10Enum.LOCALGROUP) - { - this.Name = name; - this.DisplayName = displayName; - this.Visibility = visibility; - this.Description = description; - this.Privileges = privileges; - this.OrgId = orgId; - this.Groups = groups; - this.Users = users; - this.Type = type; - } - - /// - /// Name of the user group. The group name string must be unique. - /// - [JsonProperty("name")] - public string Name { get; set; } - - /// - /// A unique display name string for the user group, for example, Developer group. - /// - [JsonProperty("displayName")] - public string DisplayName { get; set; } - - /// - /// Visibility of the user group. The visibility attribute is set to DEFAULT. The DEFAULT attribute makes the user group visible for other user groups and allows them to share objects. - /// - [JsonProperty("visibility", ItemConverterType = typeof(StringEnumConverter), NullValueHandling = NullValueHandling.Ignore)] - public Models.Visibility2Enum? Visibility { get; set; } - - /// - /// Description text for the group. - /// - [JsonProperty("description", NullValueHandling = NullValueHandling.Ignore)] - public string Description { get; set; } - - /// - /// A JSON array of privileges assigned to the group - /// - [JsonProperty("privileges", ItemConverterType = typeof(StringEnumConverter), NullValueHandling = NullValueHandling.Ignore)] - public List Privileges { get; set; } - - /// - /// Unique identifier of the organization. If no value is provided then group will be created in the organization associated with the login session. - /// - [JsonProperty("orgId", NullValueHandling = NullValueHandling.Ignore)] - public int? OrgId { get; set; } - - /// - /// Array of objects of groups that the group belong to. - /// - [JsonProperty("groups", NullValueHandling = NullValueHandling.Ignore)] - public List Groups { get; set; } - - /// - /// Array of names of user names that the group belong to. - /// - [JsonProperty("users", NullValueHandling = NullValueHandling.Ignore)] - public List Users { get; set; } - - /// - /// Type of user group. LOCAL_GROUP indicates that the user is created locally in the ThoughtSpot system. - /// - [JsonProperty("type", ItemConverterType = typeof(StringEnumConverter), NullValueHandling = NullValueHandling.Ignore)] - public Models.Type10Enum? Type { get; set; } - - /// - public override string ToString() - { - var toStringOutput = new List(); - - this.ToString(toStringOutput); - - return $"TspublicRestV2GroupCreateRequest : ({string.Join(", ", toStringOutput)})"; - } - - /// - public override bool Equals(object obj) - { - if (obj == null) - { - return false; - } - - if (obj == this) - { - return true; - } - - return obj is TspublicRestV2GroupCreateRequest other && - ((this.Name == null && other.Name == null) || (this.Name?.Equals(other.Name) == true)) && - ((this.DisplayName == null && other.DisplayName == null) || (this.DisplayName?.Equals(other.DisplayName) == true)) && - ((this.Visibility == null && other.Visibility == null) || (this.Visibility?.Equals(other.Visibility) == true)) && - ((this.Description == null && other.Description == null) || (this.Description?.Equals(other.Description) == true)) && - ((this.Privileges == null && other.Privileges == null) || (this.Privileges?.Equals(other.Privileges) == true)) && - ((this.OrgId == null && other.OrgId == null) || (this.OrgId?.Equals(other.OrgId) == true)) && - ((this.Groups == null && other.Groups == null) || (this.Groups?.Equals(other.Groups) == true)) && - ((this.Users == null && other.Users == null) || (this.Users?.Equals(other.Users) == true)) && - ((this.Type == null && other.Type == null) || (this.Type?.Equals(other.Type) == true)); - } - - - /// - /// ToString overload. - /// - /// List of strings. - protected void ToString(List toStringOutput) - { - toStringOutput.Add($"this.Name = {(this.Name == null ? "null" : this.Name == string.Empty ? "" : this.Name)}"); - toStringOutput.Add($"this.DisplayName = {(this.DisplayName == null ? "null" : this.DisplayName == string.Empty ? "" : this.DisplayName)}"); - toStringOutput.Add($"this.Visibility = {(this.Visibility == null ? "null" : this.Visibility.ToString())}"); - toStringOutput.Add($"this.Description = {(this.Description == null ? "null" : this.Description == string.Empty ? "" : this.Description)}"); - toStringOutput.Add($"this.Privileges = {(this.Privileges == null ? "null" : $"[{string.Join(", ", this.Privileges)} ]")}"); - toStringOutput.Add($"this.OrgId = {(this.OrgId == null ? "null" : this.OrgId.ToString())}"); - toStringOutput.Add($"this.Groups = {(this.Groups == null ? "null" : $"[{string.Join(", ", this.Groups)} ]")}"); - toStringOutput.Add($"this.Users = {(this.Users == null ? "null" : $"[{string.Join(", ", this.Users)} ]")}"); - toStringOutput.Add($"this.Type = {(this.Type == null ? "null" : this.Type.ToString())}"); - } - } -} \ No newline at end of file diff --git a/DotNet/ThoughtSpotPublicRESTAPI.Standard/Models/TspublicRestV2GroupRemovegroupRequest.cs b/DotNet/ThoughtSpotPublicRESTAPI.Standard/Models/TspublicRestV2GroupRemovegroupRequest.cs deleted file mode 100644 index 5d7a2783f..000000000 --- a/DotNet/ThoughtSpotPublicRESTAPI.Standard/Models/TspublicRestV2GroupRemovegroupRequest.cs +++ /dev/null @@ -1,105 +0,0 @@ -// -// Copyright (c) APIMatic. All rights reserved. -// -namespace ThoughtSpotPublicRESTAPI.Standard.Models -{ - using System; - using System.Collections.Generic; - using System.ComponentModel; - using System.IO; - using System.Linq; - using System.Text; - using System.Threading.Tasks; - using Newtonsoft.Json; - using Newtonsoft.Json.Converters; - using ThoughtSpotPublicRESTAPI.Standard; - using ThoughtSpotPublicRESTAPI.Standard.Utilities; - - /// - /// TspublicRestV2GroupRemovegroupRequest. - /// - public class TspublicRestV2GroupRemovegroupRequest - { - /// - /// Initializes a new instance of the class. - /// - public TspublicRestV2GroupRemovegroupRequest() - { - } - - /// - /// Initializes a new instance of the class. - /// - /// groups. - /// name. - /// id. - public TspublicRestV2GroupRemovegroupRequest( - List groups, - string name = null, - string id = null) - { - this.Name = name; - this.Id = id; - this.Groups = groups; - } - - /// - /// Name of the group - /// - [JsonProperty("name", NullValueHandling = NullValueHandling.Ignore)] - public string Name { get; set; } - - /// - /// The GUID of the group to query. - /// - [JsonProperty("id", NullValueHandling = NullValueHandling.Ignore)] - public string Id { get; set; } - - /// - /// Array of objects of groups that the user belong to. - /// - [JsonProperty("groups")] - public List Groups { get; set; } - - /// - public override string ToString() - { - var toStringOutput = new List(); - - this.ToString(toStringOutput); - - return $"TspublicRestV2GroupRemovegroupRequest : ({string.Join(", ", toStringOutput)})"; - } - - /// - public override bool Equals(object obj) - { - if (obj == null) - { - return false; - } - - if (obj == this) - { - return true; - } - - return obj is TspublicRestV2GroupRemovegroupRequest other && - ((this.Name == null && other.Name == null) || (this.Name?.Equals(other.Name) == true)) && - ((this.Id == null && other.Id == null) || (this.Id?.Equals(other.Id) == true)) && - ((this.Groups == null && other.Groups == null) || (this.Groups?.Equals(other.Groups) == true)); - } - - - /// - /// ToString overload. - /// - /// List of strings. - protected void ToString(List toStringOutput) - { - toStringOutput.Add($"this.Name = {(this.Name == null ? "null" : this.Name == string.Empty ? "" : this.Name)}"); - toStringOutput.Add($"this.Id = {(this.Id == null ? "null" : this.Id == string.Empty ? "" : this.Id)}"); - toStringOutput.Add($"this.Groups = {(this.Groups == null ? "null" : $"[{string.Join(", ", this.Groups)} ]")}"); - } - } -} \ No newline at end of file diff --git a/DotNet/ThoughtSpotPublicRESTAPI.Standard/Models/TspublicRestV2GroupRemoveprivilegeRequest.cs b/DotNet/ThoughtSpotPublicRESTAPI.Standard/Models/TspublicRestV2GroupRemoveprivilegeRequest.cs deleted file mode 100644 index e6df2f19d..000000000 --- a/DotNet/ThoughtSpotPublicRESTAPI.Standard/Models/TspublicRestV2GroupRemoveprivilegeRequest.cs +++ /dev/null @@ -1,105 +0,0 @@ -// -// Copyright (c) APIMatic. All rights reserved. -// -namespace ThoughtSpotPublicRESTAPI.Standard.Models -{ - using System; - using System.Collections.Generic; - using System.ComponentModel; - using System.IO; - using System.Linq; - using System.Text; - using System.Threading.Tasks; - using Newtonsoft.Json; - using Newtonsoft.Json.Converters; - using ThoughtSpotPublicRESTAPI.Standard; - using ThoughtSpotPublicRESTAPI.Standard.Utilities; - - /// - /// TspublicRestV2GroupRemoveprivilegeRequest. - /// - public class TspublicRestV2GroupRemoveprivilegeRequest - { - /// - /// Initializes a new instance of the class. - /// - public TspublicRestV2GroupRemoveprivilegeRequest() - { - } - - /// - /// Initializes a new instance of the class. - /// - /// name. - /// id. - /// privileges. - public TspublicRestV2GroupRemoveprivilegeRequest( - string name = null, - string id = null, - List privileges = null) - { - this.Name = name; - this.Id = id; - this.Privileges = privileges; - } - - /// - /// Name of the group - /// - [JsonProperty("name", NullValueHandling = NullValueHandling.Ignore)] - public string Name { get; set; } - - /// - /// The GUID of the group to query. - /// - [JsonProperty("id", NullValueHandling = NullValueHandling.Ignore)] - public string Id { get; set; } - - /// - /// A JSON array of name of users or GUIDs of users or both. When both are given then id is considered - /// - [JsonProperty("privileges", ItemConverterType = typeof(StringEnumConverter), NullValueHandling = NullValueHandling.Ignore)] - public List Privileges { get; set; } - - /// - public override string ToString() - { - var toStringOutput = new List(); - - this.ToString(toStringOutput); - - return $"TspublicRestV2GroupRemoveprivilegeRequest : ({string.Join(", ", toStringOutput)})"; - } - - /// - public override bool Equals(object obj) - { - if (obj == null) - { - return false; - } - - if (obj == this) - { - return true; - } - - return obj is TspublicRestV2GroupRemoveprivilegeRequest other && - ((this.Name == null && other.Name == null) || (this.Name?.Equals(other.Name) == true)) && - ((this.Id == null && other.Id == null) || (this.Id?.Equals(other.Id) == true)) && - ((this.Privileges == null && other.Privileges == null) || (this.Privileges?.Equals(other.Privileges) == true)); - } - - - /// - /// ToString overload. - /// - /// List of strings. - protected void ToString(List toStringOutput) - { - toStringOutput.Add($"this.Name = {(this.Name == null ? "null" : this.Name == string.Empty ? "" : this.Name)}"); - toStringOutput.Add($"this.Id = {(this.Id == null ? "null" : this.Id == string.Empty ? "" : this.Id)}"); - toStringOutput.Add($"this.Privileges = {(this.Privileges == null ? "null" : $"[{string.Join(", ", this.Privileges)} ]")}"); - } - } -} \ No newline at end of file diff --git a/DotNet/ThoughtSpotPublicRESTAPI.Standard/Models/TspublicRestV2GroupRemoveuserRequest.cs b/DotNet/ThoughtSpotPublicRESTAPI.Standard/Models/TspublicRestV2GroupRemoveuserRequest.cs deleted file mode 100644 index 4c4533a03..000000000 --- a/DotNet/ThoughtSpotPublicRESTAPI.Standard/Models/TspublicRestV2GroupRemoveuserRequest.cs +++ /dev/null @@ -1,105 +0,0 @@ -// -// Copyright (c) APIMatic. All rights reserved. -// -namespace ThoughtSpotPublicRESTAPI.Standard.Models -{ - using System; - using System.Collections.Generic; - using System.ComponentModel; - using System.IO; - using System.Linq; - using System.Text; - using System.Threading.Tasks; - using Newtonsoft.Json; - using Newtonsoft.Json.Converters; - using ThoughtSpotPublicRESTAPI.Standard; - using ThoughtSpotPublicRESTAPI.Standard.Utilities; - - /// - /// TspublicRestV2GroupRemoveuserRequest. - /// - public class TspublicRestV2GroupRemoveuserRequest - { - /// - /// Initializes a new instance of the class. - /// - public TspublicRestV2GroupRemoveuserRequest() - { - } - - /// - /// Initializes a new instance of the class. - /// - /// users. - /// name. - /// id. - public TspublicRestV2GroupRemoveuserRequest( - List users, - string name = null, - string id = null) - { - this.Name = name; - this.Id = id; - this.Users = users; - } - - /// - /// Name of the group - /// - [JsonProperty("name", NullValueHandling = NullValueHandling.Ignore)] - public string Name { get; set; } - - /// - /// The GUID of the group to query. - /// - [JsonProperty("id", NullValueHandling = NullValueHandling.Ignore)] - public string Id { get; set; } - - /// - /// Array of user name that you want to delete from user group. - /// - [JsonProperty("users")] - public List Users { get; set; } - - /// - public override string ToString() - { - var toStringOutput = new List(); - - this.ToString(toStringOutput); - - return $"TspublicRestV2GroupRemoveuserRequest : ({string.Join(", ", toStringOutput)})"; - } - - /// - public override bool Equals(object obj) - { - if (obj == null) - { - return false; - } - - if (obj == this) - { - return true; - } - - return obj is TspublicRestV2GroupRemoveuserRequest other && - ((this.Name == null && other.Name == null) || (this.Name?.Equals(other.Name) == true)) && - ((this.Id == null && other.Id == null) || (this.Id?.Equals(other.Id) == true)) && - ((this.Users == null && other.Users == null) || (this.Users?.Equals(other.Users) == true)); - } - - - /// - /// ToString overload. - /// - /// List of strings. - protected void ToString(List toStringOutput) - { - toStringOutput.Add($"this.Name = {(this.Name == null ? "null" : this.Name == string.Empty ? "" : this.Name)}"); - toStringOutput.Add($"this.Id = {(this.Id == null ? "null" : this.Id == string.Empty ? "" : this.Id)}"); - toStringOutput.Add($"this.Users = {(this.Users == null ? "null" : $"[{string.Join(", ", this.Users)} ]")}"); - } - } -} \ No newline at end of file diff --git a/DotNet/ThoughtSpotPublicRESTAPI.Standard/Models/TspublicRestV2GroupSearchRequest.cs b/DotNet/ThoughtSpotPublicRESTAPI.Standard/Models/TspublicRestV2GroupSearchRequest.cs deleted file mode 100644 index be1d0ab74..000000000 --- a/DotNet/ThoughtSpotPublicRESTAPI.Standard/Models/TspublicRestV2GroupSearchRequest.cs +++ /dev/null @@ -1,182 +0,0 @@ -// -// Copyright (c) APIMatic. All rights reserved. -// -namespace ThoughtSpotPublicRESTAPI.Standard.Models -{ - using System; - using System.Collections.Generic; - using System.ComponentModel; - using System.IO; - using System.Linq; - using System.Text; - using System.Threading.Tasks; - using Newtonsoft.Json; - using Newtonsoft.Json.Converters; - using ThoughtSpotPublicRESTAPI.Standard; - using ThoughtSpotPublicRESTAPI.Standard.Utilities; - - /// - /// TspublicRestV2GroupSearchRequest. - /// - public class TspublicRestV2GroupSearchRequest - { - /// - /// Initializes a new instance of the class. - /// - public TspublicRestV2GroupSearchRequest() - { - } - - /// - /// Initializes a new instance of the class. - /// - /// outputFields. - /// name. - /// id. - /// displayName. - /// visibility. - /// description. - /// privileges. - /// groups. - /// users. - /// type. - public TspublicRestV2GroupSearchRequest( - List outputFields = null, - string name = null, - string id = null, - string displayName = null, - string visibility = null, - string description = null, - List privileges = null, - List groups = null, - List users = null, - string type = null) - { - this.OutputFields = outputFields; - this.Name = name; - this.Id = id; - this.DisplayName = displayName; - this.Visibility = visibility; - this.Description = description; - this.Privileges = privileges; - this.Groups = groups; - this.Users = users; - this.Type = type; - } - - /// - /// Array of field names that need to be included in the response - /// - [JsonProperty("outputFields", NullValueHandling = NullValueHandling.Ignore)] - public List OutputFields { get; set; } - - /// - /// Name of the user group - /// - [JsonProperty("name", NullValueHandling = NullValueHandling.Ignore)] - public string Name { get; set; } - - /// - /// GUID of the group to update - /// - [JsonProperty("id", NullValueHandling = NullValueHandling.Ignore)] - public string Id { get; set; } - - /// - /// A unique display name string for the user group, for example, Developer group. - /// - [JsonProperty("displayName", NullValueHandling = NullValueHandling.Ignore)] - public string DisplayName { get; set; } - - /// - /// Visibility of the user group. The visibility attribute is set to DEFAULT. The DEFAULT attribute makes the user group visible for other user groups and allows them to share objects. - /// - [JsonProperty("visibility", NullValueHandling = NullValueHandling.Ignore)] - public string Visibility { get; set; } - - /// - /// Description text for the group. - /// - [JsonProperty("description", NullValueHandling = NullValueHandling.Ignore)] - public string Description { get; set; } - - /// - /// A JSON array of privileges assigned to the group - /// - [JsonProperty("privileges", ItemConverterType = typeof(StringEnumConverter), NullValueHandling = NullValueHandling.Ignore)] - public List Privileges { get; set; } - - /// - /// Array of objects of groups that the user belong to. - /// - [JsonProperty("groups", NullValueHandling = NullValueHandling.Ignore)] - public List Groups { get; set; } - - /// - /// Array of user name that associated with group. - /// - [JsonProperty("users", NullValueHandling = NullValueHandling.Ignore)] - public List Users { get; set; } - - /// - /// Type of user group. LOCAL_GROUP indicates that the user is created locally in the ThoughtSpot system. - /// - [JsonProperty("type", NullValueHandling = NullValueHandling.Ignore)] - public string Type { get; set; } - - /// - public override string ToString() - { - var toStringOutput = new List(); - - this.ToString(toStringOutput); - - return $"TspublicRestV2GroupSearchRequest : ({string.Join(", ", toStringOutput)})"; - } - - /// - public override bool Equals(object obj) - { - if (obj == null) - { - return false; - } - - if (obj == this) - { - return true; - } - - return obj is TspublicRestV2GroupSearchRequest other && - ((this.OutputFields == null && other.OutputFields == null) || (this.OutputFields?.Equals(other.OutputFields) == true)) && - ((this.Name == null && other.Name == null) || (this.Name?.Equals(other.Name) == true)) && - ((this.Id == null && other.Id == null) || (this.Id?.Equals(other.Id) == true)) && - ((this.DisplayName == null && other.DisplayName == null) || (this.DisplayName?.Equals(other.DisplayName) == true)) && - ((this.Visibility == null && other.Visibility == null) || (this.Visibility?.Equals(other.Visibility) == true)) && - ((this.Description == null && other.Description == null) || (this.Description?.Equals(other.Description) == true)) && - ((this.Privileges == null && other.Privileges == null) || (this.Privileges?.Equals(other.Privileges) == true)) && - ((this.Groups == null && other.Groups == null) || (this.Groups?.Equals(other.Groups) == true)) && - ((this.Users == null && other.Users == null) || (this.Users?.Equals(other.Users) == true)) && - ((this.Type == null && other.Type == null) || (this.Type?.Equals(other.Type) == true)); - } - - - /// - /// ToString overload. - /// - /// List of strings. - protected void ToString(List toStringOutput) - { - toStringOutput.Add($"this.OutputFields = {(this.OutputFields == null ? "null" : $"[{string.Join(", ", this.OutputFields)} ]")}"); - toStringOutput.Add($"this.Name = {(this.Name == null ? "null" : this.Name == string.Empty ? "" : this.Name)}"); - toStringOutput.Add($"this.Id = {(this.Id == null ? "null" : this.Id == string.Empty ? "" : this.Id)}"); - toStringOutput.Add($"this.DisplayName = {(this.DisplayName == null ? "null" : this.DisplayName == string.Empty ? "" : this.DisplayName)}"); - toStringOutput.Add($"this.Visibility = {(this.Visibility == null ? "null" : this.Visibility == string.Empty ? "" : this.Visibility)}"); - toStringOutput.Add($"this.Description = {(this.Description == null ? "null" : this.Description == string.Empty ? "" : this.Description)}"); - toStringOutput.Add($"this.Privileges = {(this.Privileges == null ? "null" : $"[{string.Join(", ", this.Privileges)} ]")}"); - toStringOutput.Add($"this.Groups = {(this.Groups == null ? "null" : $"[{string.Join(", ", this.Groups)} ]")}"); - toStringOutput.Add($"this.Users = {(this.Users == null ? "null" : $"[{string.Join(", ", this.Users)} ]")}"); - toStringOutput.Add($"this.Type = {(this.Type == null ? "null" : this.Type == string.Empty ? "" : this.Type)}"); - } - } -} \ No newline at end of file diff --git a/DotNet/ThoughtSpotPublicRESTAPI.Standard/Models/TspublicRestV2GroupUpdateRequest.cs b/DotNet/ThoughtSpotPublicRESTAPI.Standard/Models/TspublicRestV2GroupUpdateRequest.cs deleted file mode 100644 index 94336235c..000000000 --- a/DotNet/ThoughtSpotPublicRESTAPI.Standard/Models/TspublicRestV2GroupUpdateRequest.cs +++ /dev/null @@ -1,182 +0,0 @@ -// -// Copyright (c) APIMatic. All rights reserved. -// -namespace ThoughtSpotPublicRESTAPI.Standard.Models -{ - using System; - using System.Collections.Generic; - using System.ComponentModel; - using System.IO; - using System.Linq; - using System.Text; - using System.Threading.Tasks; - using Newtonsoft.Json; - using Newtonsoft.Json.Converters; - using ThoughtSpotPublicRESTAPI.Standard; - using ThoughtSpotPublicRESTAPI.Standard.Utilities; - - /// - /// TspublicRestV2GroupUpdateRequest. - /// - public class TspublicRestV2GroupUpdateRequest - { - /// - /// Initializes a new instance of the class. - /// - public TspublicRestV2GroupUpdateRequest() - { - } - - /// - /// Initializes a new instance of the class. - /// - /// name. - /// id. - /// displayName. - /// visibility. - /// description. - /// privileges. - /// groups. - /// users. - /// assignedLiveboards. - /// type. - public TspublicRestV2GroupUpdateRequest( - string name = null, - string id = null, - string displayName = null, - Models.Visibility2Enum? visibility = Models.Visibility2Enum.DEFAULT, - string description = null, - List privileges = null, - List groups = null, - List users = null, - List assignedLiveboards = null, - Models.Type10Enum? type = Models.Type10Enum.LOCALGROUP) - { - this.Name = name; - this.Id = id; - this.DisplayName = displayName; - this.Visibility = visibility; - this.Description = description; - this.Privileges = privileges; - this.Groups = groups; - this.Users = users; - this.AssignedLiveboards = assignedLiveboards; - this.Type = type; - } - - /// - /// Name of the user group. The group name string must be unique. - /// - [JsonProperty("name", NullValueHandling = NullValueHandling.Ignore)] - public string Name { get; set; } - - /// - /// he GUID of the user account to query. - /// - [JsonProperty("id", NullValueHandling = NullValueHandling.Ignore)] - public string Id { get; set; } - - /// - /// A unique display name string for the user group, for example, Developer group. - /// - [JsonProperty("displayName", NullValueHandling = NullValueHandling.Ignore)] - public string DisplayName { get; set; } - - /// - /// Visibility of the user group. The visibility attribute is set to DEFAULT. The DEFAULT attribute makes the user group visible for other user groups and allows them to share objects. - /// - [JsonProperty("visibility", ItemConverterType = typeof(StringEnumConverter), NullValueHandling = NullValueHandling.Ignore)] - public Models.Visibility2Enum? Visibility { get; set; } - - /// - /// Description text for the group. - /// - [JsonProperty("description", NullValueHandling = NullValueHandling.Ignore)] - public string Description { get; set; } - - /// - /// A JSON array of privileges assigned to the group - /// - [JsonProperty("privileges", ItemConverterType = typeof(StringEnumConverter), NullValueHandling = NullValueHandling.Ignore)] - public List Privileges { get; set; } - - /// - /// Array of objects of groups that the user belong to. - /// - [JsonProperty("groups", NullValueHandling = NullValueHandling.Ignore)] - public List Groups { get; set; } - - /// - /// Array of object, A JSON array of name of users of users. - /// - [JsonProperty("users", NullValueHandling = NullValueHandling.Ignore)] - public List Users { get; set; } - - /// - /// Array of string. An array of liveboard ids to be assigned to the group. - /// - [JsonProperty("assignedLiveboards", NullValueHandling = NullValueHandling.Ignore)] - public List AssignedLiveboards { get; set; } - - /// - /// Type of user group. LOCAL_GROUP indicates that the user is created locally in the ThoughtSpot system. - /// - [JsonProperty("type", ItemConverterType = typeof(StringEnumConverter), NullValueHandling = NullValueHandling.Ignore)] - public Models.Type10Enum? Type { get; set; } - - /// - public override string ToString() - { - var toStringOutput = new List(); - - this.ToString(toStringOutput); - - return $"TspublicRestV2GroupUpdateRequest : ({string.Join(", ", toStringOutput)})"; - } - - /// - public override bool Equals(object obj) - { - if (obj == null) - { - return false; - } - - if (obj == this) - { - return true; - } - - return obj is TspublicRestV2GroupUpdateRequest other && - ((this.Name == null && other.Name == null) || (this.Name?.Equals(other.Name) == true)) && - ((this.Id == null && other.Id == null) || (this.Id?.Equals(other.Id) == true)) && - ((this.DisplayName == null && other.DisplayName == null) || (this.DisplayName?.Equals(other.DisplayName) == true)) && - ((this.Visibility == null && other.Visibility == null) || (this.Visibility?.Equals(other.Visibility) == true)) && - ((this.Description == null && other.Description == null) || (this.Description?.Equals(other.Description) == true)) && - ((this.Privileges == null && other.Privileges == null) || (this.Privileges?.Equals(other.Privileges) == true)) && - ((this.Groups == null && other.Groups == null) || (this.Groups?.Equals(other.Groups) == true)) && - ((this.Users == null && other.Users == null) || (this.Users?.Equals(other.Users) == true)) && - ((this.AssignedLiveboards == null && other.AssignedLiveboards == null) || (this.AssignedLiveboards?.Equals(other.AssignedLiveboards) == true)) && - ((this.Type == null && other.Type == null) || (this.Type?.Equals(other.Type) == true)); - } - - - /// - /// ToString overload. - /// - /// List of strings. - protected void ToString(List toStringOutput) - { - toStringOutput.Add($"this.Name = {(this.Name == null ? "null" : this.Name == string.Empty ? "" : this.Name)}"); - toStringOutput.Add($"this.Id = {(this.Id == null ? "null" : this.Id == string.Empty ? "" : this.Id)}"); - toStringOutput.Add($"this.DisplayName = {(this.DisplayName == null ? "null" : this.DisplayName == string.Empty ? "" : this.DisplayName)}"); - toStringOutput.Add($"this.Visibility = {(this.Visibility == null ? "null" : this.Visibility.ToString())}"); - toStringOutput.Add($"this.Description = {(this.Description == null ? "null" : this.Description == string.Empty ? "" : this.Description)}"); - toStringOutput.Add($"this.Privileges = {(this.Privileges == null ? "null" : $"[{string.Join(", ", this.Privileges)} ]")}"); - toStringOutput.Add($"this.Groups = {(this.Groups == null ? "null" : $"[{string.Join(", ", this.Groups)} ]")}"); - toStringOutput.Add($"this.Users = {(this.Users == null ? "null" : $"[{string.Join(", ", this.Users)} ]")}"); - toStringOutput.Add($"this.AssignedLiveboards = {(this.AssignedLiveboards == null ? "null" : $"[{string.Join(", ", this.AssignedLiveboards)} ]")}"); - toStringOutput.Add($"this.Type = {(this.Type == null ? "null" : this.Type.ToString())}"); - } - } -} \ No newline at end of file diff --git a/DotNet/ThoughtSpotPublicRESTAPI.Standard/Models/TspublicRestV2MaterializationRefreshviewRequest.cs b/DotNet/ThoughtSpotPublicRESTAPI.Standard/Models/TspublicRestV2MaterializationRefreshviewRequest.cs deleted file mode 100644 index 7fcf81217..000000000 --- a/DotNet/ThoughtSpotPublicRESTAPI.Standard/Models/TspublicRestV2MaterializationRefreshviewRequest.cs +++ /dev/null @@ -1,83 +0,0 @@ -// -// Copyright (c) APIMatic. All rights reserved. -// -namespace ThoughtSpotPublicRESTAPI.Standard.Models -{ - using System; - using System.Collections.Generic; - using System.ComponentModel; - using System.IO; - using System.Linq; - using System.Text; - using System.Threading.Tasks; - using Newtonsoft.Json; - using Newtonsoft.Json.Converters; - using ThoughtSpotPublicRESTAPI.Standard; - using ThoughtSpotPublicRESTAPI.Standard.Utilities; - - /// - /// TspublicRestV2MaterializationRefreshviewRequest. - /// - public class TspublicRestV2MaterializationRefreshviewRequest - { - /// - /// Initializes a new instance of the class. - /// - public TspublicRestV2MaterializationRefreshviewRequest() - { - } - - /// - /// Initializes a new instance of the class. - /// - /// id. - public TspublicRestV2MaterializationRefreshviewRequest( - string id) - { - this.Id = id; - } - - /// - /// GUID of metadata object - /// - [JsonProperty("id")] - public string Id { get; set; } - - /// - public override string ToString() - { - var toStringOutput = new List(); - - this.ToString(toStringOutput); - - return $"TspublicRestV2MaterializationRefreshviewRequest : ({string.Join(", ", toStringOutput)})"; - } - - /// - public override bool Equals(object obj) - { - if (obj == null) - { - return false; - } - - if (obj == this) - { - return true; - } - - return obj is TspublicRestV2MaterializationRefreshviewRequest other && - ((this.Id == null && other.Id == null) || (this.Id?.Equals(other.Id) == true)); - } - - - /// - /// ToString overload. - /// - /// List of strings. - protected void ToString(List toStringOutput) - { - toStringOutput.Add($"this.Id = {(this.Id == null ? "null" : this.Id == string.Empty ? "" : this.Id)}"); - } - } -} \ No newline at end of file diff --git a/DotNet/ThoughtSpotPublicRESTAPI.Standard/Models/TspublicRestV2MetadataDependencyRequest.cs b/DotNet/ThoughtSpotPublicRESTAPI.Standard/Models/TspublicRestV2MetadataDependencyRequest.cs deleted file mode 100644 index 6e29cebba..000000000 --- a/DotNet/ThoughtSpotPublicRESTAPI.Standard/Models/TspublicRestV2MetadataDependencyRequest.cs +++ /dev/null @@ -1,105 +0,0 @@ -// -// Copyright (c) APIMatic. All rights reserved. -// -namespace ThoughtSpotPublicRESTAPI.Standard.Models -{ - using System; - using System.Collections.Generic; - using System.ComponentModel; - using System.IO; - using System.Linq; - using System.Text; - using System.Threading.Tasks; - using Newtonsoft.Json; - using Newtonsoft.Json.Converters; - using ThoughtSpotPublicRESTAPI.Standard; - using ThoughtSpotPublicRESTAPI.Standard.Utilities; - - /// - /// TspublicRestV2MetadataDependencyRequest. - /// - public class TspublicRestV2MetadataDependencyRequest - { - /// - /// Initializes a new instance of the class. - /// - public TspublicRestV2MetadataDependencyRequest() - { - } - - /// - /// Initializes a new instance of the class. - /// - /// type. - /// id. - /// batchSize. - public TspublicRestV2MetadataDependencyRequest( - Models.Type13Enum type, - List id, - int? batchSize = -1) - { - this.Type = type; - this.Id = id; - this.BatchSize = batchSize; - } - - /// - /// Type of the data object - /// - [JsonProperty("type", ItemConverterType = typeof(StringEnumConverter))] - public Models.Type13Enum Type { get; set; } - - /// - /// A JSON array of GUIDs of the objects - /// - [JsonProperty("id")] - public List Id { get; set; } - - /// - /// The maximum number of batches to fetch in a query. If this attribute is not defined, the value specified in the cluster configuration is used. To get the list of all dependent objects in a single query, define the batch size attribute as -1 - /// - [JsonProperty("batchSize", NullValueHandling = NullValueHandling.Ignore)] - public int? BatchSize { get; set; } - - /// - public override string ToString() - { - var toStringOutput = new List(); - - this.ToString(toStringOutput); - - return $"TspublicRestV2MetadataDependencyRequest : ({string.Join(", ", toStringOutput)})"; - } - - /// - public override bool Equals(object obj) - { - if (obj == null) - { - return false; - } - - if (obj == this) - { - return true; - } - - return obj is TspublicRestV2MetadataDependencyRequest other && - this.Type.Equals(other.Type) && - ((this.Id == null && other.Id == null) || (this.Id?.Equals(other.Id) == true)) && - ((this.BatchSize == null && other.BatchSize == null) || (this.BatchSize?.Equals(other.BatchSize) == true)); - } - - - /// - /// ToString overload. - /// - /// List of strings. - protected void ToString(List toStringOutput) - { - toStringOutput.Add($"this.Type = {this.Type}"); - toStringOutput.Add($"this.Id = {(this.Id == null ? "null" : $"[{string.Join(", ", this.Id)} ]")}"); - toStringOutput.Add($"this.BatchSize = {(this.BatchSize == null ? "null" : this.BatchSize.ToString())}"); - } - } -} \ No newline at end of file diff --git a/DotNet/ThoughtSpotPublicRESTAPI.Standard/Models/TspublicRestV2MetadataDetailSearchRequest.cs b/DotNet/ThoughtSpotPublicRESTAPI.Standard/Models/TspublicRestV2MetadataDetailSearchRequest.cs deleted file mode 100644 index 020170f6a..000000000 --- a/DotNet/ThoughtSpotPublicRESTAPI.Standard/Models/TspublicRestV2MetadataDetailSearchRequest.cs +++ /dev/null @@ -1,127 +0,0 @@ -// -// Copyright (c) APIMatic. All rights reserved. -// -namespace ThoughtSpotPublicRESTAPI.Standard.Models -{ - using System; - using System.Collections.Generic; - using System.ComponentModel; - using System.IO; - using System.Linq; - using System.Text; - using System.Threading.Tasks; - using Newtonsoft.Json; - using Newtonsoft.Json.Converters; - using ThoughtSpotPublicRESTAPI.Standard; - using ThoughtSpotPublicRESTAPI.Standard.Utilities; - - /// - /// TspublicRestV2MetadataDetailSearchRequest. - /// - public class TspublicRestV2MetadataDetailSearchRequest - { - /// - /// Initializes a new instance of the class. - /// - public TspublicRestV2MetadataDetailSearchRequest() - { - } - - /// - /// Initializes a new instance of the class. - /// - /// type. - /// id. - /// showHidden. - /// dropQuestionDetails. - /// version. - public TspublicRestV2MetadataDetailSearchRequest( - Models.Type6Enum type, - List id, - bool? showHidden = false, - bool? dropQuestionDetails = false, - string version = null) - { - this.Type = type; - this.Id = id; - this.ShowHidden = showHidden; - this.DropQuestionDetails = dropQuestionDetails; - this.Version = version; - } - - /// - /// Type of the metadata object being searched. - /// - [JsonProperty("type", ItemConverterType = typeof(StringEnumConverter))] - public Models.Type6Enum Type { get; set; } - - /// - /// A JSON array of GUIDs of the objects. - /// - [JsonProperty("id")] - public List Id { get; set; } - - /// - /// When set to true, returns details of the hidden objects, such as a column in a worksheet or a table. - /// - [JsonProperty("showHidden", NullValueHandling = NullValueHandling.Ignore)] - public bool? ShowHidden { get; set; } - - /// - /// When set to true, the search assist data associated with a worksheet is not included in the API response. This attribute is applicable only for DATAOBJECT data type. - /// - [JsonProperty("dropQuestionDetails", NullValueHandling = NullValueHandling.Ignore)] - public bool? DropQuestionDetails { get; set; } - - /// - /// Specify the version to retrieve the objects from. By default, the API returns metadata for all versions of the object. - /// - [JsonProperty("version", NullValueHandling = NullValueHandling.Ignore)] - public string Version { get; set; } - - /// - public override string ToString() - { - var toStringOutput = new List(); - - this.ToString(toStringOutput); - - return $"TspublicRestV2MetadataDetailSearchRequest : ({string.Join(", ", toStringOutput)})"; - } - - /// - public override bool Equals(object obj) - { - if (obj == null) - { - return false; - } - - if (obj == this) - { - return true; - } - - return obj is TspublicRestV2MetadataDetailSearchRequest other && - this.Type.Equals(other.Type) && - ((this.Id == null && other.Id == null) || (this.Id?.Equals(other.Id) == true)) && - ((this.ShowHidden == null && other.ShowHidden == null) || (this.ShowHidden?.Equals(other.ShowHidden) == true)) && - ((this.DropQuestionDetails == null && other.DropQuestionDetails == null) || (this.DropQuestionDetails?.Equals(other.DropQuestionDetails) == true)) && - ((this.Version == null && other.Version == null) || (this.Version?.Equals(other.Version) == true)); - } - - - /// - /// ToString overload. - /// - /// List of strings. - protected void ToString(List toStringOutput) - { - toStringOutput.Add($"this.Type = {this.Type}"); - toStringOutput.Add($"this.Id = {(this.Id == null ? "null" : $"[{string.Join(", ", this.Id)} ]")}"); - toStringOutput.Add($"this.ShowHidden = {(this.ShowHidden == null ? "null" : this.ShowHidden.ToString())}"); - toStringOutput.Add($"this.DropQuestionDetails = {(this.DropQuestionDetails == null ? "null" : this.DropQuestionDetails.ToString())}"); - toStringOutput.Add($"this.Version = {(this.Version == null ? "null" : this.Version == string.Empty ? "" : this.Version)}"); - } - } -} \ No newline at end of file diff --git a/DotNet/ThoughtSpotPublicRESTAPI.Standard/Models/TspublicRestV2MetadataFavoriteAssignRequest.cs b/DotNet/ThoughtSpotPublicRESTAPI.Standard/Models/TspublicRestV2MetadataFavoriteAssignRequest.cs deleted file mode 100644 index 8b4ccb23b..000000000 --- a/DotNet/ThoughtSpotPublicRESTAPI.Standard/Models/TspublicRestV2MetadataFavoriteAssignRequest.cs +++ /dev/null @@ -1,105 +0,0 @@ -// -// Copyright (c) APIMatic. All rights reserved. -// -namespace ThoughtSpotPublicRESTAPI.Standard.Models -{ - using System; - using System.Collections.Generic; - using System.ComponentModel; - using System.IO; - using System.Linq; - using System.Text; - using System.Threading.Tasks; - using Newtonsoft.Json; - using Newtonsoft.Json.Converters; - using ThoughtSpotPublicRESTAPI.Standard; - using ThoughtSpotPublicRESTAPI.Standard.Utilities; - - /// - /// TspublicRestV2MetadataFavoriteAssignRequest. - /// - public class TspublicRestV2MetadataFavoriteAssignRequest - { - /// - /// Initializes a new instance of the class. - /// - public TspublicRestV2MetadataFavoriteAssignRequest() - { - } - - /// - /// Initializes a new instance of the class. - /// - /// tsObject. - /// userName. - /// userId. - public TspublicRestV2MetadataFavoriteAssignRequest( - List tsObject, - string userName = null, - string userId = null) - { - this.UserName = userName; - this.UserId = userId; - this.TsObject = tsObject; - } - - /// - /// Name of the user - /// - [JsonProperty("userName", NullValueHandling = NullValueHandling.Ignore)] - public string UserName { get; set; } - - /// - /// The GUID of the user - /// - [JsonProperty("userId", NullValueHandling = NullValueHandling.Ignore)] - public string UserId { get; set; } - - /// - /// A JSON Array of GUIDs and type of metadata object. - /// - [JsonProperty("tsObject")] - public List TsObject { get; set; } - - /// - public override string ToString() - { - var toStringOutput = new List(); - - this.ToString(toStringOutput); - - return $"TspublicRestV2MetadataFavoriteAssignRequest : ({string.Join(", ", toStringOutput)})"; - } - - /// - public override bool Equals(object obj) - { - if (obj == null) - { - return false; - } - - if (obj == this) - { - return true; - } - - return obj is TspublicRestV2MetadataFavoriteAssignRequest other && - ((this.UserName == null && other.UserName == null) || (this.UserName?.Equals(other.UserName) == true)) && - ((this.UserId == null && other.UserId == null) || (this.UserId?.Equals(other.UserId) == true)) && - ((this.TsObject == null && other.TsObject == null) || (this.TsObject?.Equals(other.TsObject) == true)); - } - - - /// - /// ToString overload. - /// - /// List of strings. - protected void ToString(List toStringOutput) - { - toStringOutput.Add($"this.UserName = {(this.UserName == null ? "null" : this.UserName == string.Empty ? "" : this.UserName)}"); - toStringOutput.Add($"this.UserId = {(this.UserId == null ? "null" : this.UserId == string.Empty ? "" : this.UserId)}"); - toStringOutput.Add($"this.TsObject = {(this.TsObject == null ? "null" : $"[{string.Join(", ", this.TsObject)} ]")}"); - } - } -} \ No newline at end of file diff --git a/DotNet/ThoughtSpotPublicRESTAPI.Standard/Models/TspublicRestV2MetadataFavoriteUnassignRequest.cs b/DotNet/ThoughtSpotPublicRESTAPI.Standard/Models/TspublicRestV2MetadataFavoriteUnassignRequest.cs deleted file mode 100644 index 7017b6a39..000000000 --- a/DotNet/ThoughtSpotPublicRESTAPI.Standard/Models/TspublicRestV2MetadataFavoriteUnassignRequest.cs +++ /dev/null @@ -1,105 +0,0 @@ -// -// Copyright (c) APIMatic. All rights reserved. -// -namespace ThoughtSpotPublicRESTAPI.Standard.Models -{ - using System; - using System.Collections.Generic; - using System.ComponentModel; - using System.IO; - using System.Linq; - using System.Text; - using System.Threading.Tasks; - using Newtonsoft.Json; - using Newtonsoft.Json.Converters; - using ThoughtSpotPublicRESTAPI.Standard; - using ThoughtSpotPublicRESTAPI.Standard.Utilities; - - /// - /// TspublicRestV2MetadataFavoriteUnassignRequest. - /// - public class TspublicRestV2MetadataFavoriteUnassignRequest - { - /// - /// Initializes a new instance of the class. - /// - public TspublicRestV2MetadataFavoriteUnassignRequest() - { - } - - /// - /// Initializes a new instance of the class. - /// - /// tsObject. - /// userName. - /// userId. - public TspublicRestV2MetadataFavoriteUnassignRequest( - List tsObject, - string userName = null, - string userId = null) - { - this.UserName = userName; - this.UserId = userId; - this.TsObject = tsObject; - } - - /// - /// Name of the user - /// - [JsonProperty("userName", NullValueHandling = NullValueHandling.Ignore)] - public string UserName { get; set; } - - /// - /// The GUID of the user - /// - [JsonProperty("userId", NullValueHandling = NullValueHandling.Ignore)] - public string UserId { get; set; } - - /// - /// A JSON Array of GUIDs and type of metadata object. - /// - [JsonProperty("tsObject")] - public List TsObject { get; set; } - - /// - public override string ToString() - { - var toStringOutput = new List(); - - this.ToString(toStringOutput); - - return $"TspublicRestV2MetadataFavoriteUnassignRequest : ({string.Join(", ", toStringOutput)})"; - } - - /// - public override bool Equals(object obj) - { - if (obj == null) - { - return false; - } - - if (obj == this) - { - return true; - } - - return obj is TspublicRestV2MetadataFavoriteUnassignRequest other && - ((this.UserName == null && other.UserName == null) || (this.UserName?.Equals(other.UserName) == true)) && - ((this.UserId == null && other.UserId == null) || (this.UserId?.Equals(other.UserId) == true)) && - ((this.TsObject == null && other.TsObject == null) || (this.TsObject?.Equals(other.TsObject) == true)); - } - - - /// - /// ToString overload. - /// - /// List of strings. - protected void ToString(List toStringOutput) - { - toStringOutput.Add($"this.UserName = {(this.UserName == null ? "null" : this.UserName == string.Empty ? "" : this.UserName)}"); - toStringOutput.Add($"this.UserId = {(this.UserId == null ? "null" : this.UserId == string.Empty ? "" : this.UserId)}"); - toStringOutput.Add($"this.TsObject = {(this.TsObject == null ? "null" : $"[{string.Join(", ", this.TsObject)} ]")}"); - } - } -} \ No newline at end of file diff --git a/DotNet/ThoughtSpotPublicRESTAPI.Standard/Models/TspublicRestV2MetadataHeaderSearchRequest.cs b/DotNet/ThoughtSpotPublicRESTAPI.Standard/Models/TspublicRestV2MetadataHeaderSearchRequest.cs deleted file mode 100644 index 0f715144f..000000000 --- a/DotNet/ThoughtSpotPublicRESTAPI.Standard/Models/TspublicRestV2MetadataHeaderSearchRequest.cs +++ /dev/null @@ -1,269 +0,0 @@ -// -// Copyright (c) APIMatic. All rights reserved. -// -namespace ThoughtSpotPublicRESTAPI.Standard.Models -{ - using System; - using System.Collections.Generic; - using System.ComponentModel; - using System.IO; - using System.Linq; - using System.Text; - using System.Threading.Tasks; - using Newtonsoft.Json; - using Newtonsoft.Json.Converters; - using ThoughtSpotPublicRESTAPI.Standard; - using ThoughtSpotPublicRESTAPI.Standard.Utilities; - - /// - /// TspublicRestV2MetadataHeaderSearchRequest. - /// - public class TspublicRestV2MetadataHeaderSearchRequest - { - /// - /// Initializes a new instance of the class. - /// - public TspublicRestV2MetadataHeaderSearchRequest() - { - } - - /// - /// Initializes a new instance of the class. - /// - /// type. - /// outputFields. - /// offset. - /// batchNumber. - /// batchSize. - /// sortBy. - /// sortOrder. - /// namePattern. - /// fetchId. - /// skipId. - /// showHidden. - /// autoCreated. - /// accessLevel. - /// tag. - /// favoriteFor. - /// author. - /// lastModifiedBy. - public TspublicRestV2MetadataHeaderSearchRequest( - Models.Type3Enum type, - List outputFields = null, - int? offset = 0, - int? batchNumber = null, - int? batchSize = -1, - Models.SortByEnum? sortBy = Models.SortByEnum.DEFAULT, - Models.SortOrderEnum? sortOrder = Models.SortOrderEnum.DEFAULT, - string namePattern = null, - List fetchId = null, - List skipId = null, - bool? showHidden = false, - bool? autoCreated = null, - List accessLevel = null, - List tag = null, - List favoriteFor = null, - List author = null, - List lastModifiedBy = null) - { - this.OutputFields = outputFields; - this.Offset = offset; - this.BatchNumber = batchNumber; - this.BatchSize = batchSize; - this.SortBy = sortBy; - this.SortOrder = sortOrder; - this.Type = type; - this.NamePattern = namePattern; - this.FetchId = fetchId; - this.SkipId = skipId; - this.ShowHidden = showHidden; - this.AutoCreated = autoCreated; - this.AccessLevel = accessLevel; - this.Tag = tag; - this.FavoriteFor = favoriteFor; - this.Author = author; - this.LastModifiedBy = lastModifiedBy; - } - - /// - /// Array of header field names that need to be included in the header response - /// - [JsonProperty("outputFields", NullValueHandling = NullValueHandling.Ignore)] - public List OutputFields { get; set; } - - /// - /// The batch offset, starting from where the records should be included in the response. If no input is provided then offset starts from 0. Default: 0 - /// - [JsonProperty("offset", NullValueHandling = NullValueHandling.Ignore)] - public int? Offset { get; set; } - - /// - /// An alternate way to set offset for the starting point of the response. - /// The value in offset field will not be considered if batchNumber field has value greater than 0. - /// Offset value will be calculated as (batchNumber - 1) * batchSize. - /// It is mandatory to provide a value for batchSize with batchNumber. - /// Example: - /// Assume response has 100 records. Now, batchNumber is set as 2 and batchSize as 10, then offset value will be 10. So, 10 records starting from 11th record will be considered. - /// - [JsonProperty("batchNumber", NullValueHandling = NullValueHandling.Ignore)] - public int? BatchNumber { get; set; } - - /// - /// The number of records that should be included in the response starting from offset position. If no input is provided then first page is included in the response. - /// - [JsonProperty("batchSize", NullValueHandling = NullValueHandling.Ignore)] - public int? BatchSize { get; set; } - - /// - /// Field based on which the response needs to be ordered. - /// - [JsonProperty("sortBy", ItemConverterType = typeof(StringEnumConverter), NullValueHandling = NullValueHandling.Ignore)] - public Models.SortByEnum? SortBy { get; set; } - - /// - /// Order in which sortBy should be applied. - /// - [JsonProperty("sortOrder", ItemConverterType = typeof(StringEnumConverter), NullValueHandling = NullValueHandling.Ignore)] - public Models.SortOrderEnum? SortOrder { get; set; } - - /// - /// Type of the metadata object being searched. - /// - [JsonProperty("type", ItemConverterType = typeof(StringEnumConverter))] - public Models.Type3Enum Type { get; set; } - - /// - /// A pattern to match the name of the metadata object. This parameter supports matching case-insensitive strings. For a wildcard match, use %. - /// - [JsonProperty("namePattern", NullValueHandling = NullValueHandling.Ignore)] - public string NamePattern { get; set; } - - /// - /// A JSON array containing the GUIDs of the metadata objects that you want to fetch. - /// - [JsonProperty("fetchId", NullValueHandling = NullValueHandling.Ignore)] - public List FetchId { get; set; } - - /// - /// A JSON array containing the GUIDs of the metadata objects that you want to skip. - /// - [JsonProperty("skipId", NullValueHandling = NullValueHandling.Ignore)] - public List SkipId { get; set; } - - /// - /// When set to true, returns details of the hidden objects, such as a column in a worksheet or a table. - /// - [JsonProperty("showHidden", NullValueHandling = NullValueHandling.Ignore)] - public bool? ShowHidden { get; set; } - - /// - /// A flag to indicate whether to list only the auto created objects. When no value is provided as input then all objects are returned. - /// - [JsonProperty("autoCreated", NullValueHandling = NullValueHandling.Ignore)] - public bool? AutoCreated { get; set; } - - /// - /// A JSON array of objects with user details for which the metadata objects should be considered from the repository - /// If you specify ID or name of user and set the type parameter to USER, the API returns metadata objects associated with the user - /// If you specify ID or name of user group and set the type parameter to USER_GROUP, the API returns metadata objects for all the users mapped to the specified user group. - /// If the id or name parameter is not defined, but the type attribute is set to USER or USER_GROUP, then the API will not return and response. - /// If no input is provided for any field for this object, then the API returns headers for all users. - /// If both name and id is provided, then id will be considered. - /// - [JsonProperty("accessLevel", NullValueHandling = NullValueHandling.Ignore)] - public List AccessLevel { get; set; } - - /// - /// A JSON array of name or GUID of tags or both. When both are given then id is considered. - /// - [JsonProperty("tag", NullValueHandling = NullValueHandling.Ignore)] - public List Tag { get; set; } - - /// - /// A JSON array of name or GUID of the user or both for whom the object is assigned as favorite. When both are given then id is considered. - /// - [JsonProperty("favoriteFor", NullValueHandling = NullValueHandling.Ignore)] - public List FavoriteFor { get; set; } - - /// - /// A JSON array of name or GUID of the user or both who created the object. When both are given then id is considered - /// - [JsonProperty("author", NullValueHandling = NullValueHandling.Ignore)] - public List Author { get; set; } - - /// - /// A JSON array of name or GUID of the user or both who last modified the object. When both are given then id is considered. - /// - [JsonProperty("lastModifiedBy", NullValueHandling = NullValueHandling.Ignore)] - public List LastModifiedBy { get; set; } - - /// - public override string ToString() - { - var toStringOutput = new List(); - - this.ToString(toStringOutput); - - return $"TspublicRestV2MetadataHeaderSearchRequest : ({string.Join(", ", toStringOutput)})"; - } - - /// - public override bool Equals(object obj) - { - if (obj == null) - { - return false; - } - - if (obj == this) - { - return true; - } - - return obj is TspublicRestV2MetadataHeaderSearchRequest other && - ((this.OutputFields == null && other.OutputFields == null) || (this.OutputFields?.Equals(other.OutputFields) == true)) && - ((this.Offset == null && other.Offset == null) || (this.Offset?.Equals(other.Offset) == true)) && - ((this.BatchNumber == null && other.BatchNumber == null) || (this.BatchNumber?.Equals(other.BatchNumber) == true)) && - ((this.BatchSize == null && other.BatchSize == null) || (this.BatchSize?.Equals(other.BatchSize) == true)) && - ((this.SortBy == null && other.SortBy == null) || (this.SortBy?.Equals(other.SortBy) == true)) && - ((this.SortOrder == null && other.SortOrder == null) || (this.SortOrder?.Equals(other.SortOrder) == true)) && - this.Type.Equals(other.Type) && - ((this.NamePattern == null && other.NamePattern == null) || (this.NamePattern?.Equals(other.NamePattern) == true)) && - ((this.FetchId == null && other.FetchId == null) || (this.FetchId?.Equals(other.FetchId) == true)) && - ((this.SkipId == null && other.SkipId == null) || (this.SkipId?.Equals(other.SkipId) == true)) && - ((this.ShowHidden == null && other.ShowHidden == null) || (this.ShowHidden?.Equals(other.ShowHidden) == true)) && - ((this.AutoCreated == null && other.AutoCreated == null) || (this.AutoCreated?.Equals(other.AutoCreated) == true)) && - ((this.AccessLevel == null && other.AccessLevel == null) || (this.AccessLevel?.Equals(other.AccessLevel) == true)) && - ((this.Tag == null && other.Tag == null) || (this.Tag?.Equals(other.Tag) == true)) && - ((this.FavoriteFor == null && other.FavoriteFor == null) || (this.FavoriteFor?.Equals(other.FavoriteFor) == true)) && - ((this.Author == null && other.Author == null) || (this.Author?.Equals(other.Author) == true)) && - ((this.LastModifiedBy == null && other.LastModifiedBy == null) || (this.LastModifiedBy?.Equals(other.LastModifiedBy) == true)); - } - - - /// - /// ToString overload. - /// - /// List of strings. - protected void ToString(List toStringOutput) - { - toStringOutput.Add($"this.OutputFields = {(this.OutputFields == null ? "null" : $"[{string.Join(", ", this.OutputFields)} ]")}"); - toStringOutput.Add($"this.Offset = {(this.Offset == null ? "null" : this.Offset.ToString())}"); - toStringOutput.Add($"this.BatchNumber = {(this.BatchNumber == null ? "null" : this.BatchNumber.ToString())}"); - toStringOutput.Add($"this.BatchSize = {(this.BatchSize == null ? "null" : this.BatchSize.ToString())}"); - toStringOutput.Add($"this.SortBy = {(this.SortBy == null ? "null" : this.SortBy.ToString())}"); - toStringOutput.Add($"this.SortOrder = {(this.SortOrder == null ? "null" : this.SortOrder.ToString())}"); - toStringOutput.Add($"this.Type = {this.Type}"); - toStringOutput.Add($"this.NamePattern = {(this.NamePattern == null ? "null" : this.NamePattern == string.Empty ? "" : this.NamePattern)}"); - toStringOutput.Add($"this.FetchId = {(this.FetchId == null ? "null" : $"[{string.Join(", ", this.FetchId)} ]")}"); - toStringOutput.Add($"this.SkipId = {(this.SkipId == null ? "null" : $"[{string.Join(", ", this.SkipId)} ]")}"); - toStringOutput.Add($"this.ShowHidden = {(this.ShowHidden == null ? "null" : this.ShowHidden.ToString())}"); - toStringOutput.Add($"this.AutoCreated = {(this.AutoCreated == null ? "null" : this.AutoCreated.ToString())}"); - toStringOutput.Add($"this.AccessLevel = {(this.AccessLevel == null ? "null" : $"[{string.Join(", ", this.AccessLevel)} ]")}"); - toStringOutput.Add($"this.Tag = {(this.Tag == null ? "null" : $"[{string.Join(", ", this.Tag)} ]")}"); - toStringOutput.Add($"this.FavoriteFor = {(this.FavoriteFor == null ? "null" : $"[{string.Join(", ", this.FavoriteFor)} ]")}"); - toStringOutput.Add($"this.Author = {(this.Author == null ? "null" : $"[{string.Join(", ", this.Author)} ]")}"); - toStringOutput.Add($"this.LastModifiedBy = {(this.LastModifiedBy == null ? "null" : $"[{string.Join(", ", this.LastModifiedBy)} ]")}"); - } - } -} \ No newline at end of file diff --git a/DotNet/ThoughtSpotPublicRESTAPI.Standard/Models/TspublicRestV2MetadataHomeliveboardAssignRequest.cs b/DotNet/ThoughtSpotPublicRESTAPI.Standard/Models/TspublicRestV2MetadataHomeliveboardAssignRequest.cs deleted file mode 100644 index f4c38d090..000000000 --- a/DotNet/ThoughtSpotPublicRESTAPI.Standard/Models/TspublicRestV2MetadataHomeliveboardAssignRequest.cs +++ /dev/null @@ -1,105 +0,0 @@ -// -// Copyright (c) APIMatic. All rights reserved. -// -namespace ThoughtSpotPublicRESTAPI.Standard.Models -{ - using System; - using System.Collections.Generic; - using System.ComponentModel; - using System.IO; - using System.Linq; - using System.Text; - using System.Threading.Tasks; - using Newtonsoft.Json; - using Newtonsoft.Json.Converters; - using ThoughtSpotPublicRESTAPI.Standard; - using ThoughtSpotPublicRESTAPI.Standard.Utilities; - - /// - /// TspublicRestV2MetadataHomeliveboardAssignRequest. - /// - public class TspublicRestV2MetadataHomeliveboardAssignRequest - { - /// - /// Initializes a new instance of the class. - /// - public TspublicRestV2MetadataHomeliveboardAssignRequest() - { - } - - /// - /// Initializes a new instance of the class. - /// - /// userName. - /// userId. - /// liveboardId. - public TspublicRestV2MetadataHomeliveboardAssignRequest( - string userName = null, - string userId = null, - string liveboardId = null) - { - this.UserName = userName; - this.UserId = userId; - this.LiveboardId = liveboardId; - } - - /// - /// Name of the user - /// - [JsonProperty("userName", NullValueHandling = NullValueHandling.Ignore)] - public string UserName { get; set; } - - /// - /// The GUID of the user - /// - [JsonProperty("userId", NullValueHandling = NullValueHandling.Ignore)] - public string UserId { get; set; } - - /// - /// The GUID of the liveboard - /// - [JsonProperty("liveboardId", NullValueHandling = NullValueHandling.Ignore)] - public string LiveboardId { get; set; } - - /// - public override string ToString() - { - var toStringOutput = new List(); - - this.ToString(toStringOutput); - - return $"TspublicRestV2MetadataHomeliveboardAssignRequest : ({string.Join(", ", toStringOutput)})"; - } - - /// - public override bool Equals(object obj) - { - if (obj == null) - { - return false; - } - - if (obj == this) - { - return true; - } - - return obj is TspublicRestV2MetadataHomeliveboardAssignRequest other && - ((this.UserName == null && other.UserName == null) || (this.UserName?.Equals(other.UserName) == true)) && - ((this.UserId == null && other.UserId == null) || (this.UserId?.Equals(other.UserId) == true)) && - ((this.LiveboardId == null && other.LiveboardId == null) || (this.LiveboardId?.Equals(other.LiveboardId) == true)); - } - - - /// - /// ToString overload. - /// - /// List of strings. - protected void ToString(List toStringOutput) - { - toStringOutput.Add($"this.UserName = {(this.UserName == null ? "null" : this.UserName == string.Empty ? "" : this.UserName)}"); - toStringOutput.Add($"this.UserId = {(this.UserId == null ? "null" : this.UserId == string.Empty ? "" : this.UserId)}"); - toStringOutput.Add($"this.LiveboardId = {(this.LiveboardId == null ? "null" : this.LiveboardId == string.Empty ? "" : this.LiveboardId)}"); - } - } -} \ No newline at end of file diff --git a/DotNet/ThoughtSpotPublicRESTAPI.Standard/Models/TspublicRestV2MetadataHomeliveboardUnassignRequest.cs b/DotNet/ThoughtSpotPublicRESTAPI.Standard/Models/TspublicRestV2MetadataHomeliveboardUnassignRequest.cs deleted file mode 100644 index 7d78c06ad..000000000 --- a/DotNet/ThoughtSpotPublicRESTAPI.Standard/Models/TspublicRestV2MetadataHomeliveboardUnassignRequest.cs +++ /dev/null @@ -1,94 +0,0 @@ -// -// Copyright (c) APIMatic. All rights reserved. -// -namespace ThoughtSpotPublicRESTAPI.Standard.Models -{ - using System; - using System.Collections.Generic; - using System.ComponentModel; - using System.IO; - using System.Linq; - using System.Text; - using System.Threading.Tasks; - using Newtonsoft.Json; - using Newtonsoft.Json.Converters; - using ThoughtSpotPublicRESTAPI.Standard; - using ThoughtSpotPublicRESTAPI.Standard.Utilities; - - /// - /// TspublicRestV2MetadataHomeliveboardUnassignRequest. - /// - public class TspublicRestV2MetadataHomeliveboardUnassignRequest - { - /// - /// Initializes a new instance of the class. - /// - public TspublicRestV2MetadataHomeliveboardUnassignRequest() - { - } - - /// - /// Initializes a new instance of the class. - /// - /// userName. - /// userId. - public TspublicRestV2MetadataHomeliveboardUnassignRequest( - string userName = null, - string userId = null) - { - this.UserName = userName; - this.UserId = userId; - } - - /// - /// Name of the user - /// - [JsonProperty("userName", NullValueHandling = NullValueHandling.Ignore)] - public string UserName { get; set; } - - /// - /// The GUID of the user - /// - [JsonProperty("userId", NullValueHandling = NullValueHandling.Ignore)] - public string UserId { get; set; } - - /// - public override string ToString() - { - var toStringOutput = new List(); - - this.ToString(toStringOutput); - - return $"TspublicRestV2MetadataHomeliveboardUnassignRequest : ({string.Join(", ", toStringOutput)})"; - } - - /// - public override bool Equals(object obj) - { - if (obj == null) - { - return false; - } - - if (obj == this) - { - return true; - } - - return obj is TspublicRestV2MetadataHomeliveboardUnassignRequest other && - ((this.UserName == null && other.UserName == null) || (this.UserName?.Equals(other.UserName) == true)) && - ((this.UserId == null && other.UserId == null) || (this.UserId?.Equals(other.UserId) == true)); - } - - - /// - /// ToString overload. - /// - /// List of strings. - protected void ToString(List toStringOutput) - { - toStringOutput.Add($"this.UserName = {(this.UserName == null ? "null" : this.UserName == string.Empty ? "" : this.UserName)}"); - toStringOutput.Add($"this.UserId = {(this.UserId == null ? "null" : this.UserId == string.Empty ? "" : this.UserId)}"); - } - } -} \ No newline at end of file diff --git a/DotNet/ThoughtSpotPublicRESTAPI.Standard/Models/TspublicRestV2MetadataTagAssignRequest.cs b/DotNet/ThoughtSpotPublicRESTAPI.Standard/Models/TspublicRestV2MetadataTagAssignRequest.cs deleted file mode 100644 index 71d76ea2a..000000000 --- a/DotNet/ThoughtSpotPublicRESTAPI.Standard/Models/TspublicRestV2MetadataTagAssignRequest.cs +++ /dev/null @@ -1,105 +0,0 @@ -// -// Copyright (c) APIMatic. All rights reserved. -// -namespace ThoughtSpotPublicRESTAPI.Standard.Models -{ - using System; - using System.Collections.Generic; - using System.ComponentModel; - using System.IO; - using System.Linq; - using System.Text; - using System.Threading.Tasks; - using Newtonsoft.Json; - using Newtonsoft.Json.Converters; - using ThoughtSpotPublicRESTAPI.Standard; - using ThoughtSpotPublicRESTAPI.Standard.Utilities; - - /// - /// TspublicRestV2MetadataTagAssignRequest. - /// - public class TspublicRestV2MetadataTagAssignRequest - { - /// - /// Initializes a new instance of the class. - /// - public TspublicRestV2MetadataTagAssignRequest() - { - } - - /// - /// Initializes a new instance of the class. - /// - /// tsObject. - /// name. - /// id. - public TspublicRestV2MetadataTagAssignRequest( - List tsObject, - string name = null, - string id = null) - { - this.Name = name; - this.Id = id; - this.TsObject = tsObject; - } - - /// - /// Name of the tag - /// - [JsonProperty("name", NullValueHandling = NullValueHandling.Ignore)] - public string Name { get; set; } - - /// - /// The GUID of the tag - /// - [JsonProperty("id", NullValueHandling = NullValueHandling.Ignore)] - public string Id { get; set; } - - /// - /// A JSON Array of GUIDs and type of metadata object. - /// - [JsonProperty("tsObject")] - public List TsObject { get; set; } - - /// - public override string ToString() - { - var toStringOutput = new List(); - - this.ToString(toStringOutput); - - return $"TspublicRestV2MetadataTagAssignRequest : ({string.Join(", ", toStringOutput)})"; - } - - /// - public override bool Equals(object obj) - { - if (obj == null) - { - return false; - } - - if (obj == this) - { - return true; - } - - return obj is TspublicRestV2MetadataTagAssignRequest other && - ((this.Name == null && other.Name == null) || (this.Name?.Equals(other.Name) == true)) && - ((this.Id == null && other.Id == null) || (this.Id?.Equals(other.Id) == true)) && - ((this.TsObject == null && other.TsObject == null) || (this.TsObject?.Equals(other.TsObject) == true)); - } - - - /// - /// ToString overload. - /// - /// List of strings. - protected void ToString(List toStringOutput) - { - toStringOutput.Add($"this.Name = {(this.Name == null ? "null" : this.Name == string.Empty ? "" : this.Name)}"); - toStringOutput.Add($"this.Id = {(this.Id == null ? "null" : this.Id == string.Empty ? "" : this.Id)}"); - toStringOutput.Add($"this.TsObject = {(this.TsObject == null ? "null" : $"[{string.Join(", ", this.TsObject)} ]")}"); - } - } -} \ No newline at end of file diff --git a/DotNet/ThoughtSpotPublicRESTAPI.Standard/Models/TspublicRestV2MetadataTagCreateRequest.cs b/DotNet/ThoughtSpotPublicRESTAPI.Standard/Models/TspublicRestV2MetadataTagCreateRequest.cs deleted file mode 100644 index e63ede02b..000000000 --- a/DotNet/ThoughtSpotPublicRESTAPI.Standard/Models/TspublicRestV2MetadataTagCreateRequest.cs +++ /dev/null @@ -1,94 +0,0 @@ -// -// Copyright (c) APIMatic. All rights reserved. -// -namespace ThoughtSpotPublicRESTAPI.Standard.Models -{ - using System; - using System.Collections.Generic; - using System.ComponentModel; - using System.IO; - using System.Linq; - using System.Text; - using System.Threading.Tasks; - using Newtonsoft.Json; - using Newtonsoft.Json.Converters; - using ThoughtSpotPublicRESTAPI.Standard; - using ThoughtSpotPublicRESTAPI.Standard.Utilities; - - /// - /// TspublicRestV2MetadataTagCreateRequest. - /// - public class TspublicRestV2MetadataTagCreateRequest - { - /// - /// Initializes a new instance of the class. - /// - public TspublicRestV2MetadataTagCreateRequest() - { - } - - /// - /// Initializes a new instance of the class. - /// - /// name. - /// color. - public TspublicRestV2MetadataTagCreateRequest( - string name, - string color = null) - { - this.Name = name; - this.Color = color; - } - - /// - /// Name of the tag - /// - [JsonProperty("name")] - public string Name { get; set; } - - /// - /// Hex color code to be assigned to the tag - /// - [JsonProperty("color", NullValueHandling = NullValueHandling.Ignore)] - public string Color { get; set; } - - /// - public override string ToString() - { - var toStringOutput = new List(); - - this.ToString(toStringOutput); - - return $"TspublicRestV2MetadataTagCreateRequest : ({string.Join(", ", toStringOutput)})"; - } - - /// - public override bool Equals(object obj) - { - if (obj == null) - { - return false; - } - - if (obj == this) - { - return true; - } - - return obj is TspublicRestV2MetadataTagCreateRequest other && - ((this.Name == null && other.Name == null) || (this.Name?.Equals(other.Name) == true)) && - ((this.Color == null && other.Color == null) || (this.Color?.Equals(other.Color) == true)); - } - - - /// - /// ToString overload. - /// - /// List of strings. - protected void ToString(List toStringOutput) - { - toStringOutput.Add($"this.Name = {(this.Name == null ? "null" : this.Name == string.Empty ? "" : this.Name)}"); - toStringOutput.Add($"this.Color = {(this.Color == null ? "null" : this.Color == string.Empty ? "" : this.Color)}"); - } - } -} \ No newline at end of file diff --git a/DotNet/ThoughtSpotPublicRESTAPI.Standard/Models/TspublicRestV2MetadataTagUnassignRequest.cs b/DotNet/ThoughtSpotPublicRESTAPI.Standard/Models/TspublicRestV2MetadataTagUnassignRequest.cs deleted file mode 100644 index 43d168f8c..000000000 --- a/DotNet/ThoughtSpotPublicRESTAPI.Standard/Models/TspublicRestV2MetadataTagUnassignRequest.cs +++ /dev/null @@ -1,105 +0,0 @@ -// -// Copyright (c) APIMatic. All rights reserved. -// -namespace ThoughtSpotPublicRESTAPI.Standard.Models -{ - using System; - using System.Collections.Generic; - using System.ComponentModel; - using System.IO; - using System.Linq; - using System.Text; - using System.Threading.Tasks; - using Newtonsoft.Json; - using Newtonsoft.Json.Converters; - using ThoughtSpotPublicRESTAPI.Standard; - using ThoughtSpotPublicRESTAPI.Standard.Utilities; - - /// - /// TspublicRestV2MetadataTagUnassignRequest. - /// - public class TspublicRestV2MetadataTagUnassignRequest - { - /// - /// Initializes a new instance of the class. - /// - public TspublicRestV2MetadataTagUnassignRequest() - { - } - - /// - /// Initializes a new instance of the class. - /// - /// tsObject. - /// name. - /// id. - public TspublicRestV2MetadataTagUnassignRequest( - List tsObject, - string name = null, - string id = null) - { - this.Name = name; - this.Id = id; - this.TsObject = tsObject; - } - - /// - /// Name of the tag - /// - [JsonProperty("name", NullValueHandling = NullValueHandling.Ignore)] - public string Name { get; set; } - - /// - /// The GUID of the tag - /// - [JsonProperty("id", NullValueHandling = NullValueHandling.Ignore)] - public string Id { get; set; } - - /// - /// A JSON Array of GUIDs and type of metadata object. - /// - [JsonProperty("tsObject")] - public List TsObject { get; set; } - - /// - public override string ToString() - { - var toStringOutput = new List(); - - this.ToString(toStringOutput); - - return $"TspublicRestV2MetadataTagUnassignRequest : ({string.Join(", ", toStringOutput)})"; - } - - /// - public override bool Equals(object obj) - { - if (obj == null) - { - return false; - } - - if (obj == this) - { - return true; - } - - return obj is TspublicRestV2MetadataTagUnassignRequest other && - ((this.Name == null && other.Name == null) || (this.Name?.Equals(other.Name) == true)) && - ((this.Id == null && other.Id == null) || (this.Id?.Equals(other.Id) == true)) && - ((this.TsObject == null && other.TsObject == null) || (this.TsObject?.Equals(other.TsObject) == true)); - } - - - /// - /// ToString overload. - /// - /// List of strings. - protected void ToString(List toStringOutput) - { - toStringOutput.Add($"this.Name = {(this.Name == null ? "null" : this.Name == string.Empty ? "" : this.Name)}"); - toStringOutput.Add($"this.Id = {(this.Id == null ? "null" : this.Id == string.Empty ? "" : this.Id)}"); - toStringOutput.Add($"this.TsObject = {(this.TsObject == null ? "null" : $"[{string.Join(", ", this.TsObject)} ]")}"); - } - } -} \ No newline at end of file diff --git a/DotNet/ThoughtSpotPublicRESTAPI.Standard/Models/TspublicRestV2MetadataTagUpdateRequest.cs b/DotNet/ThoughtSpotPublicRESTAPI.Standard/Models/TspublicRestV2MetadataTagUpdateRequest.cs deleted file mode 100644 index 8a4fdc4e6..000000000 --- a/DotNet/ThoughtSpotPublicRESTAPI.Standard/Models/TspublicRestV2MetadataTagUpdateRequest.cs +++ /dev/null @@ -1,105 +0,0 @@ -// -// Copyright (c) APIMatic. All rights reserved. -// -namespace ThoughtSpotPublicRESTAPI.Standard.Models -{ - using System; - using System.Collections.Generic; - using System.ComponentModel; - using System.IO; - using System.Linq; - using System.Text; - using System.Threading.Tasks; - using Newtonsoft.Json; - using Newtonsoft.Json.Converters; - using ThoughtSpotPublicRESTAPI.Standard; - using ThoughtSpotPublicRESTAPI.Standard.Utilities; - - /// - /// TspublicRestV2MetadataTagUpdateRequest. - /// - public class TspublicRestV2MetadataTagUpdateRequest - { - /// - /// Initializes a new instance of the class. - /// - public TspublicRestV2MetadataTagUpdateRequest() - { - } - - /// - /// Initializes a new instance of the class. - /// - /// name. - /// id. - /// color. - public TspublicRestV2MetadataTagUpdateRequest( - string name = null, - string id = null, - string color = null) - { - this.Name = name; - this.Id = id; - this.Color = color; - } - - /// - /// Name of the tag - /// - [JsonProperty("name", NullValueHandling = NullValueHandling.Ignore)] - public string Name { get; set; } - - /// - /// The GUID of the tag - /// - [JsonProperty("id", NullValueHandling = NullValueHandling.Ignore)] - public string Id { get; set; } - - /// - /// Hex color code to be assigned to the tag - /// - [JsonProperty("color", NullValueHandling = NullValueHandling.Ignore)] - public string Color { get; set; } - - /// - public override string ToString() - { - var toStringOutput = new List(); - - this.ToString(toStringOutput); - - return $"TspublicRestV2MetadataTagUpdateRequest : ({string.Join(", ", toStringOutput)})"; - } - - /// - public override bool Equals(object obj) - { - if (obj == null) - { - return false; - } - - if (obj == this) - { - return true; - } - - return obj is TspublicRestV2MetadataTagUpdateRequest other && - ((this.Name == null && other.Name == null) || (this.Name?.Equals(other.Name) == true)) && - ((this.Id == null && other.Id == null) || (this.Id?.Equals(other.Id) == true)) && - ((this.Color == null && other.Color == null) || (this.Color?.Equals(other.Color) == true)); - } - - - /// - /// ToString overload. - /// - /// List of strings. - protected void ToString(List toStringOutput) - { - toStringOutput.Add($"this.Name = {(this.Name == null ? "null" : this.Name == string.Empty ? "" : this.Name)}"); - toStringOutput.Add($"this.Id = {(this.Id == null ? "null" : this.Id == string.Empty ? "" : this.Id)}"); - toStringOutput.Add($"this.Color = {(this.Color == null ? "null" : this.Color == string.Empty ? "" : this.Color)}"); - } - } -} \ No newline at end of file diff --git a/DotNet/ThoughtSpotPublicRESTAPI.Standard/Models/TspublicRestV2MetadataTmlExportRequest.cs b/DotNet/ThoughtSpotPublicRESTAPI.Standard/Models/TspublicRestV2MetadataTmlExportRequest.cs deleted file mode 100644 index 837aa7002..000000000 --- a/DotNet/ThoughtSpotPublicRESTAPI.Standard/Models/TspublicRestV2MetadataTmlExportRequest.cs +++ /dev/null @@ -1,105 +0,0 @@ -// -// Copyright (c) APIMatic. All rights reserved. -// -namespace ThoughtSpotPublicRESTAPI.Standard.Models -{ - using System; - using System.Collections.Generic; - using System.ComponentModel; - using System.IO; - using System.Linq; - using System.Text; - using System.Threading.Tasks; - using Newtonsoft.Json; - using Newtonsoft.Json.Converters; - using ThoughtSpotPublicRESTAPI.Standard; - using ThoughtSpotPublicRESTAPI.Standard.Utilities; - - /// - /// TspublicRestV2MetadataTmlExportRequest. - /// - public class TspublicRestV2MetadataTmlExportRequest - { - /// - /// Initializes a new instance of the class. - /// - public TspublicRestV2MetadataTmlExportRequest() - { - } - - /// - /// Initializes a new instance of the class. - /// - /// id. - /// formatType. - /// exportAssociated. - public TspublicRestV2MetadataTmlExportRequest( - List id, - Models.FormatType3Enum? formatType = Models.FormatType3Enum.YAML, - bool? exportAssociated = false) - { - this.Id = id; - this.FormatType = formatType; - this.ExportAssociated = exportAssociated; - } - - /// - /// A JSON array of GUIDs of the objects. - /// - [JsonProperty("id")] - public List Id { get; set; } - - /// - /// The format in which to export the objects - /// - [JsonProperty("formatType", ItemConverterType = typeof(StringEnumConverter), NullValueHandling = NullValueHandling.Ignore)] - public Models.FormatType3Enum? FormatType { get; set; } - - /// - /// Specifies if you would like to export the associated objects. To export the objects associated with the objects specified in id, set the value to true. When set to true, the API exports any underlying worksheets, tables, or views for a given object. By default, the API does not export these underlying objects - /// - [JsonProperty("exportAssociated", NullValueHandling = NullValueHandling.Ignore)] - public bool? ExportAssociated { get; set; } - - /// - public override string ToString() - { - var toStringOutput = new List(); - - this.ToString(toStringOutput); - - return $"TspublicRestV2MetadataTmlExportRequest : ({string.Join(", ", toStringOutput)})"; - } - - /// - public override bool Equals(object obj) - { - if (obj == null) - { - return false; - } - - if (obj == this) - { - return true; - } - - return obj is TspublicRestV2MetadataTmlExportRequest other && - ((this.Id == null && other.Id == null) || (this.Id?.Equals(other.Id) == true)) && - ((this.FormatType == null && other.FormatType == null) || (this.FormatType?.Equals(other.FormatType) == true)) && - ((this.ExportAssociated == null && other.ExportAssociated == null) || (this.ExportAssociated?.Equals(other.ExportAssociated) == true)); - } - - - /// - /// ToString overload. - /// - /// List of strings. - protected void ToString(List toStringOutput) - { - toStringOutput.Add($"this.Id = {(this.Id == null ? "null" : $"[{string.Join(", ", this.Id)} ]")}"); - toStringOutput.Add($"this.FormatType = {(this.FormatType == null ? "null" : this.FormatType.ToString())}"); - toStringOutput.Add($"this.ExportAssociated = {(this.ExportAssociated == null ? "null" : this.ExportAssociated.ToString())}"); - } - } -} \ No newline at end of file diff --git a/DotNet/ThoughtSpotPublicRESTAPI.Standard/Models/TspublicRestV2MetadataTmlImportRequest.cs b/DotNet/ThoughtSpotPublicRESTAPI.Standard/Models/TspublicRestV2MetadataTmlImportRequest.cs deleted file mode 100644 index 3332406ba..000000000 --- a/DotNet/ThoughtSpotPublicRESTAPI.Standard/Models/TspublicRestV2MetadataTmlImportRequest.cs +++ /dev/null @@ -1,111 +0,0 @@ -// -// Copyright (c) APIMatic. All rights reserved. -// -namespace ThoughtSpotPublicRESTAPI.Standard.Models -{ - using System; - using System.Collections.Generic; - using System.ComponentModel; - using System.IO; - using System.Linq; - using System.Text; - using System.Threading.Tasks; - using Newtonsoft.Json; - using Newtonsoft.Json.Converters; - using ThoughtSpotPublicRESTAPI.Standard; - using ThoughtSpotPublicRESTAPI.Standard.Utilities; - - /// - /// TspublicRestV2MetadataTmlImportRequest. - /// - public class TspublicRestV2MetadataTmlImportRequest - { - /// - /// Initializes a new instance of the class. - /// - public TspublicRestV2MetadataTmlImportRequest() - { - } - - /// - /// Initializes a new instance of the class. - /// - /// objectTML. - /// importPolicy. - /// forceCreate. - public TspublicRestV2MetadataTmlImportRequest( - List objectTML, - Models.ImportPolicyEnum? importPolicy = Models.ImportPolicyEnum.PARTIAL, - bool? forceCreate = false) - { - this.ObjectTML = objectTML; - this.ImportPolicy = importPolicy; - this.ForceCreate = forceCreate; - } - - /// - /// A string array of TML objects to upload, in YAML or JSON format. - /// If TML is in YAML format, then use escape characters for quotes and new line characters. - /// Example TML: - /// guid: 6d2c1c9b-a407-409c-8c0c-819aeb51350f\ntable:\n name: TESTINT\n db: SUPPLYCHAIN_MAIN\n schema: PUBLIC\n db_table: TESTINT\n connection:\n name: SnowflakeConnection\n columns:\n - name: C1\n db_column_name: C1\n properties:\n column_type: MEASURE\n aggregation: SUM\n index_type: DONT_INDEX\n db_column_properties:\n data_type: INT64\n - /// If TML is in JSON format, then use escape characters for quotes. - /// Example TML: - /// {\\"guid\\": \\"6d2c1c9b-a407-409c-8c0c-819aeb51350f\\", \\"table\\": { \\"name\\": \\"TESTINT\\", \\"db\\": \\"SUPPLYCHAIN_MAIN\\", \\"schema\\": \\"PUBLIC\\", \\"db_table\\": \\"TESTINT\\", \\"connection\\": { \\"name\\": \\"SnowflakeConnection\\" }, \\"columns\\": [ { \\"name\\": \\"C1\\", \\"db_column_name\\": \\"C1\\", \\"properties\\": { \\"column_type\\": \\"MEASURE\\", \\"aggregation\\": \\"SUM\\", \\"index_type\\": \\"DONT_INDEX\\" }, \\"db_column_properties\\": { \\"data_type\\": \\"INT64\\" } } ] } }', - /// - [JsonProperty("objectTML")] - public List ObjectTML { get; set; } - - /// - /// Policy to follow during import - /// - [JsonProperty("importPolicy", ItemConverterType = typeof(StringEnumConverter), NullValueHandling = NullValueHandling.Ignore)] - public Models.ImportPolicyEnum? ImportPolicy { get; set; } - - /// - /// Specifies if you are updating or creating objects. To create new objects, specify true. By default, ThoughtSpot updates existing objects that have the same GUID as the objects you are importing. When set to true, the GUID property in the imported TML is replaced on the server, and the response headers will include the id_guid property with the GUID of the new object. The new object will be assigned a new GUID, even if the imported TML file included a guid value. Thus, there is no need to include the guid in the TML file if you are using forceCreate=true. - /// - [JsonProperty("forceCreate", NullValueHandling = NullValueHandling.Ignore)] - public bool? ForceCreate { get; set; } - - /// - public override string ToString() - { - var toStringOutput = new List(); - - this.ToString(toStringOutput); - - return $"TspublicRestV2MetadataTmlImportRequest : ({string.Join(", ", toStringOutput)})"; - } - - /// - public override bool Equals(object obj) - { - if (obj == null) - { - return false; - } - - if (obj == this) - { - return true; - } - - return obj is TspublicRestV2MetadataTmlImportRequest other && - ((this.ObjectTML == null && other.ObjectTML == null) || (this.ObjectTML?.Equals(other.ObjectTML) == true)) && - ((this.ImportPolicy == null && other.ImportPolicy == null) || (this.ImportPolicy?.Equals(other.ImportPolicy) == true)) && - ((this.ForceCreate == null && other.ForceCreate == null) || (this.ForceCreate?.Equals(other.ForceCreate) == true)); - } - - - /// - /// ToString overload. - /// - /// List of strings. - protected void ToString(List toStringOutput) - { - toStringOutput.Add($"this.ObjectTML = {(this.ObjectTML == null ? "null" : $"[{string.Join(", ", this.ObjectTML)} ]")}"); - toStringOutput.Add($"this.ImportPolicy = {(this.ImportPolicy == null ? "null" : this.ImportPolicy.ToString())}"); - toStringOutput.Add($"this.ForceCreate = {(this.ForceCreate == null ? "null" : this.ForceCreate.ToString())}"); - } - } -} \ No newline at end of file diff --git a/DotNet/ThoughtSpotPublicRESTAPI.Standard/Models/TspublicRestV2OrgCreateRequest.cs b/DotNet/ThoughtSpotPublicRESTAPI.Standard/Models/TspublicRestV2OrgCreateRequest.cs deleted file mode 100644 index dad4e15b9..000000000 --- a/DotNet/ThoughtSpotPublicRESTAPI.Standard/Models/TspublicRestV2OrgCreateRequest.cs +++ /dev/null @@ -1,94 +0,0 @@ -// -// Copyright (c) APIMatic. All rights reserved. -// -namespace ThoughtSpotPublicRESTAPI.Standard.Models -{ - using System; - using System.Collections.Generic; - using System.ComponentModel; - using System.IO; - using System.Linq; - using System.Text; - using System.Threading.Tasks; - using Newtonsoft.Json; - using Newtonsoft.Json.Converters; - using ThoughtSpotPublicRESTAPI.Standard; - using ThoughtSpotPublicRESTAPI.Standard.Utilities; - - /// - /// TspublicRestV2OrgCreateRequest. - /// - public class TspublicRestV2OrgCreateRequest - { - /// - /// Initializes a new instance of the class. - /// - public TspublicRestV2OrgCreateRequest() - { - } - - /// - /// Initializes a new instance of the class. - /// - /// name. - /// description. - public TspublicRestV2OrgCreateRequest( - string name, - string description = null) - { - this.Name = name; - this.Description = description; - } - - /// - /// Name of the organization. - /// - [JsonProperty("name")] - public string Name { get; set; } - - /// - /// Description text for the organization. - /// - [JsonProperty("description", NullValueHandling = NullValueHandling.Ignore)] - public string Description { get; set; } - - /// - public override string ToString() - { - var toStringOutput = new List(); - - this.ToString(toStringOutput); - - return $"TspublicRestV2OrgCreateRequest : ({string.Join(", ", toStringOutput)})"; - } - - /// - public override bool Equals(object obj) - { - if (obj == null) - { - return false; - } - - if (obj == this) - { - return true; - } - - return obj is TspublicRestV2OrgCreateRequest other && - ((this.Name == null && other.Name == null) || (this.Name?.Equals(other.Name) == true)) && - ((this.Description == null && other.Description == null) || (this.Description?.Equals(other.Description) == true)); - } - - - /// - /// ToString overload. - /// - /// List of strings. - protected void ToString(List toStringOutput) - { - toStringOutput.Add($"this.Name = {(this.Name == null ? "null" : this.Name == string.Empty ? "" : this.Name)}"); - toStringOutput.Add($"this.Description = {(this.Description == null ? "null" : this.Description == string.Empty ? "" : this.Description)}"); - } - } -} \ No newline at end of file diff --git a/DotNet/ThoughtSpotPublicRESTAPI.Standard/Models/TspublicRestV2OrgSearchRequest.cs b/DotNet/ThoughtSpotPublicRESTAPI.Standard/Models/TspublicRestV2OrgSearchRequest.cs deleted file mode 100644 index fa4863d60..000000000 --- a/DotNet/ThoughtSpotPublicRESTAPI.Standard/Models/TspublicRestV2OrgSearchRequest.cs +++ /dev/null @@ -1,105 +0,0 @@ -// -// Copyright (c) APIMatic. All rights reserved. -// -namespace ThoughtSpotPublicRESTAPI.Standard.Models -{ - using System; - using System.Collections.Generic; - using System.ComponentModel; - using System.IO; - using System.Linq; - using System.Text; - using System.Threading.Tasks; - using Newtonsoft.Json; - using Newtonsoft.Json.Converters; - using ThoughtSpotPublicRESTAPI.Standard; - using ThoughtSpotPublicRESTAPI.Standard.Utilities; - - /// - /// TspublicRestV2OrgSearchRequest. - /// - public class TspublicRestV2OrgSearchRequest - { - /// - /// Initializes a new instance of the class. - /// - public TspublicRestV2OrgSearchRequest() - { - } - - /// - /// Initializes a new instance of the class. - /// - /// name. - /// id. - /// showDeleted. - public TspublicRestV2OrgSearchRequest( - string name = null, - int? id = null, - bool? showDeleted = false) - { - this.Name = name; - this.Id = id; - this.ShowDeleted = showDeleted; - } - - /// - /// Name of the organization. - /// - [JsonProperty("name", NullValueHandling = NullValueHandling.Ignore)] - public string Name { get; set; } - - /// - /// The ID of the organization. - /// - [JsonProperty("id", NullValueHandling = NullValueHandling.Ignore)] - public int? Id { get; set; } - - /// - /// When set to true, the response will include the details of deleted organization also. - /// - [JsonProperty("showDeleted", NullValueHandling = NullValueHandling.Ignore)] - public bool? ShowDeleted { get; set; } - - /// - public override string ToString() - { - var toStringOutput = new List(); - - this.ToString(toStringOutput); - - return $"TspublicRestV2OrgSearchRequest : ({string.Join(", ", toStringOutput)})"; - } - - /// - public override bool Equals(object obj) - { - if (obj == null) - { - return false; - } - - if (obj == this) - { - return true; - } - - return obj is TspublicRestV2OrgSearchRequest other && - ((this.Name == null && other.Name == null) || (this.Name?.Equals(other.Name) == true)) && - ((this.Id == null && other.Id == null) || (this.Id?.Equals(other.Id) == true)) && - ((this.ShowDeleted == null && other.ShowDeleted == null) || (this.ShowDeleted?.Equals(other.ShowDeleted) == true)); - } - - - /// - /// ToString overload. - /// - /// List of strings. - protected void ToString(List toStringOutput) - { - toStringOutput.Add($"this.Name = {(this.Name == null ? "null" : this.Name == string.Empty ? "" : this.Name)}"); - toStringOutput.Add($"this.Id = {(this.Id == null ? "null" : this.Id.ToString())}"); - toStringOutput.Add($"this.ShowDeleted = {(this.ShowDeleted == null ? "null" : this.ShowDeleted.ToString())}"); - } - } -} \ No newline at end of file diff --git a/DotNet/ThoughtSpotPublicRESTAPI.Standard/Models/TspublicRestV2OrgUpdateRequest.cs b/DotNet/ThoughtSpotPublicRESTAPI.Standard/Models/TspublicRestV2OrgUpdateRequest.cs deleted file mode 100644 index 0a9845f25..000000000 --- a/DotNet/ThoughtSpotPublicRESTAPI.Standard/Models/TspublicRestV2OrgUpdateRequest.cs +++ /dev/null @@ -1,116 +0,0 @@ -// -// Copyright (c) APIMatic. All rights reserved. -// -namespace ThoughtSpotPublicRESTAPI.Standard.Models -{ - using System; - using System.Collections.Generic; - using System.ComponentModel; - using System.IO; - using System.Linq; - using System.Text; - using System.Threading.Tasks; - using Newtonsoft.Json; - using Newtonsoft.Json.Converters; - using ThoughtSpotPublicRESTAPI.Standard; - using ThoughtSpotPublicRESTAPI.Standard.Utilities; - - /// - /// TspublicRestV2OrgUpdateRequest. - /// - public class TspublicRestV2OrgUpdateRequest - { - /// - /// Initializes a new instance of the class. - /// - public TspublicRestV2OrgUpdateRequest() - { - } - - /// - /// Initializes a new instance of the class. - /// - /// name. - /// id. - /// description. - /// active. - public TspublicRestV2OrgUpdateRequest( - string name = null, - int? id = null, - string description = null, - bool? active = null) - { - this.Name = name; - this.Id = id; - this.Description = description; - this.Active = active; - } - - /// - /// Name of the organization. - /// - [JsonProperty("name", NullValueHandling = NullValueHandling.Ignore)] - public string Name { get; set; } - - /// - /// The ID of the organization. - /// - [JsonProperty("id", NullValueHandling = NullValueHandling.Ignore)] - public int? Id { get; set; } - - /// - /// Description text for the organization. - /// - [JsonProperty("description", NullValueHandling = NullValueHandling.Ignore)] - public string Description { get; set; } - - /// - /// Status of the organization. - /// - [JsonProperty("active", NullValueHandling = NullValueHandling.Ignore)] - public bool? Active { get; set; } - - /// - public override string ToString() - { - var toStringOutput = new List(); - - this.ToString(toStringOutput); - - return $"TspublicRestV2OrgUpdateRequest : ({string.Join(", ", toStringOutput)})"; - } - - /// - public override bool Equals(object obj) - { - if (obj == null) - { - return false; - } - - if (obj == this) - { - return true; - } - - return obj is TspublicRestV2OrgUpdateRequest other && - ((this.Name == null && other.Name == null) || (this.Name?.Equals(other.Name) == true)) && - ((this.Id == null && other.Id == null) || (this.Id?.Equals(other.Id) == true)) && - ((this.Description == null && other.Description == null) || (this.Description?.Equals(other.Description) == true)) && - ((this.Active == null && other.Active == null) || (this.Active?.Equals(other.Active) == true)); - } - - - /// - /// ToString overload. - /// - /// List of strings. - protected void ToString(List toStringOutput) - { - toStringOutput.Add($"this.Name = {(this.Name == null ? "null" : this.Name == string.Empty ? "" : this.Name)}"); - toStringOutput.Add($"this.Id = {(this.Id == null ? "null" : this.Id.ToString())}"); - toStringOutput.Add($"this.Description = {(this.Description == null ? "null" : this.Description == string.Empty ? "" : this.Description)}"); - toStringOutput.Add($"this.Active = {(this.Active == null ? "null" : this.Active.ToString())}"); - } - } -} \ No newline at end of file diff --git a/DotNet/ThoughtSpotPublicRESTAPI.Standard/Models/TspublicRestV2SecurityPermissionPrincipalSearchRequest.cs b/DotNet/ThoughtSpotPublicRESTAPI.Standard/Models/TspublicRestV2SecurityPermissionPrincipalSearchRequest.cs deleted file mode 100644 index 7d8541bfc..000000000 --- a/DotNet/ThoughtSpotPublicRESTAPI.Standard/Models/TspublicRestV2SecurityPermissionPrincipalSearchRequest.cs +++ /dev/null @@ -1,94 +0,0 @@ -// -// Copyright (c) APIMatic. All rights reserved. -// -namespace ThoughtSpotPublicRESTAPI.Standard.Models -{ - using System; - using System.Collections.Generic; - using System.ComponentModel; - using System.IO; - using System.Linq; - using System.Text; - using System.Threading.Tasks; - using Newtonsoft.Json; - using Newtonsoft.Json.Converters; - using ThoughtSpotPublicRESTAPI.Standard; - using ThoughtSpotPublicRESTAPI.Standard.Utilities; - - /// - /// TspublicRestV2SecurityPermissionPrincipalSearchRequest. - /// - public class TspublicRestV2SecurityPermissionPrincipalSearchRequest - { - /// - /// Initializes a new instance of the class. - /// - public TspublicRestV2SecurityPermissionPrincipalSearchRequest() - { - } - - /// - /// Initializes a new instance of the class. - /// - /// principal. - /// tsObject. - public TspublicRestV2SecurityPermissionPrincipalSearchRequest( - List principal, - List tsObject = null) - { - this.Principal = principal; - this.TsObject = tsObject; - } - - /// - /// A JSON array of principal names or GUIDs to be included in the request. When both are given then id is considered. - /// - [JsonProperty("principal")] - public List Principal { get; set; } - - /// - /// A JSON Array of GUIDs and type of metadata object. - /// - [JsonProperty("tsObject", NullValueHandling = NullValueHandling.Ignore)] - public List TsObject { get; set; } - - /// - public override string ToString() - { - var toStringOutput = new List(); - - this.ToString(toStringOutput); - - return $"TspublicRestV2SecurityPermissionPrincipalSearchRequest : ({string.Join(", ", toStringOutput)})"; - } - - /// - public override bool Equals(object obj) - { - if (obj == null) - { - return false; - } - - if (obj == this) - { - return true; - } - - return obj is TspublicRestV2SecurityPermissionPrincipalSearchRequest other && - ((this.Principal == null && other.Principal == null) || (this.Principal?.Equals(other.Principal) == true)) && - ((this.TsObject == null && other.TsObject == null) || (this.TsObject?.Equals(other.TsObject) == true)); - } - - - /// - /// ToString overload. - /// - /// List of strings. - protected void ToString(List toStringOutput) - { - toStringOutput.Add($"this.Principal = {(this.Principal == null ? "null" : $"[{string.Join(", ", this.Principal)} ]")}"); - toStringOutput.Add($"this.TsObject = {(this.TsObject == null ? "null" : $"[{string.Join(", ", this.TsObject)} ]")}"); - } - } -} \ No newline at end of file diff --git a/DotNet/ThoughtSpotPublicRESTAPI.Standard/Models/TspublicRestV2SecurityPermissionTsobjectSearchRequest.cs b/DotNet/ThoughtSpotPublicRESTAPI.Standard/Models/TspublicRestV2SecurityPermissionTsobjectSearchRequest.cs deleted file mode 100644 index 9e9a260a5..000000000 --- a/DotNet/ThoughtSpotPublicRESTAPI.Standard/Models/TspublicRestV2SecurityPermissionTsobjectSearchRequest.cs +++ /dev/null @@ -1,105 +0,0 @@ -// -// Copyright (c) APIMatic. All rights reserved. -// -namespace ThoughtSpotPublicRESTAPI.Standard.Models -{ - using System; - using System.Collections.Generic; - using System.ComponentModel; - using System.IO; - using System.Linq; - using System.Text; - using System.Threading.Tasks; - using Newtonsoft.Json; - using Newtonsoft.Json.Converters; - using ThoughtSpotPublicRESTAPI.Standard; - using ThoughtSpotPublicRESTAPI.Standard.Utilities; - - /// - /// TspublicRestV2SecurityPermissionTsobjectSearchRequest. - /// - public class TspublicRestV2SecurityPermissionTsobjectSearchRequest - { - /// - /// Initializes a new instance of the class. - /// - public TspublicRestV2SecurityPermissionTsobjectSearchRequest() - { - } - - /// - /// Initializes a new instance of the class. - /// - /// tsObject. - /// principal. - /// includeDependent. - public TspublicRestV2SecurityPermissionTsobjectSearchRequest( - List tsObject, - List principal = null, - bool? includeDependent = false) - { - this.TsObject = tsObject; - this.Principal = principal; - this.IncludeDependent = includeDependent; - } - - /// - /// A JSON Array of GUIDs and type of metadata object. - /// - [JsonProperty("tsObject")] - public List TsObject { get; set; } - - /// - /// A JSON array of principal names or GUIDs. When both are given then id is considered. - /// - [JsonProperty("principal", NullValueHandling = NullValueHandling.Ignore)] - public List Principal { get; set; } - - /// - /// When this field is set to true, the API response includes the permission details for the dependent objects. - /// - [JsonProperty("includeDependent", NullValueHandling = NullValueHandling.Ignore)] - public bool? IncludeDependent { get; set; } - - /// - public override string ToString() - { - var toStringOutput = new List(); - - this.ToString(toStringOutput); - - return $"TspublicRestV2SecurityPermissionTsobjectSearchRequest : ({string.Join(", ", toStringOutput)})"; - } - - /// - public override bool Equals(object obj) - { - if (obj == null) - { - return false; - } - - if (obj == this) - { - return true; - } - - return obj is TspublicRestV2SecurityPermissionTsobjectSearchRequest other && - ((this.TsObject == null && other.TsObject == null) || (this.TsObject?.Equals(other.TsObject) == true)) && - ((this.Principal == null && other.Principal == null) || (this.Principal?.Equals(other.Principal) == true)) && - ((this.IncludeDependent == null && other.IncludeDependent == null) || (this.IncludeDependent?.Equals(other.IncludeDependent) == true)); - } - - - /// - /// ToString overload. - /// - /// List of strings. - protected void ToString(List toStringOutput) - { - toStringOutput.Add($"this.TsObject = {(this.TsObject == null ? "null" : $"[{string.Join(", ", this.TsObject)} ]")}"); - toStringOutput.Add($"this.Principal = {(this.Principal == null ? "null" : $"[{string.Join(", ", this.Principal)} ]")}"); - toStringOutput.Add($"this.IncludeDependent = {(this.IncludeDependent == null ? "null" : this.IncludeDependent.ToString())}"); - } - } -} \ No newline at end of file diff --git a/DotNet/ThoughtSpotPublicRESTAPI.Standard/Models/TspublicRestV2SecurityShareTsobjectRequest.cs b/DotNet/ThoughtSpotPublicRESTAPI.Standard/Models/TspublicRestV2SecurityShareTsobjectRequest.cs deleted file mode 100644 index 2eb28fd05..000000000 --- a/DotNet/ThoughtSpotPublicRESTAPI.Standard/Models/TspublicRestV2SecurityShareTsobjectRequest.cs +++ /dev/null @@ -1,152 +0,0 @@ -// -// Copyright (c) APIMatic. All rights reserved. -// -namespace ThoughtSpotPublicRESTAPI.Standard.Models -{ - using System; - using System.Collections.Generic; - using System.ComponentModel; - using System.IO; - using System.Linq; - using System.Text; - using System.Threading.Tasks; - using Newtonsoft.Json; - using Newtonsoft.Json.Converters; - using ThoughtSpotPublicRESTAPI.Standard; - using ThoughtSpotPublicRESTAPI.Standard.Utilities; - - /// - /// TspublicRestV2SecurityShareTsobjectRequest. - /// - public class TspublicRestV2SecurityShareTsobjectRequest - { - /// - /// Initializes a new instance of the class. - /// - public TspublicRestV2SecurityShareTsobjectRequest() - { - } - - /// - /// Initializes a new instance of the class. - /// - /// type. - /// id. - /// permission. - /// emailId. - /// notify. - /// message. - /// includeCustomEmbedUrl. - public TspublicRestV2SecurityShareTsobjectRequest( - Models.Type18Enum type, - List id, - string permission, - List emailId = null, - bool? notify = true, - string message = null, - bool? includeCustomEmbedUrl = false) - { - this.Type = type; - this.Id = id; - this.Permission = permission; - this.EmailId = emailId; - this.Notify = notify; - this.Message = message; - this.IncludeCustomEmbedUrl = includeCustomEmbedUrl; - } - - /// - /// Type of metadata object. Valid values: Liveboard|Answer|DataObject|Column - /// - [JsonProperty("type", ItemConverterType = typeof(StringEnumConverter))] - public Models.Type18Enum Type { get; set; } - - /// - /// A JSON array of the GUIDs of the objects to be shared - /// - [JsonProperty("id")] - public List Id { get; set; } - - /// - /// A JSON object with GUIDs of user and user group, and the type of access privilge. - /// You can provide READ_ONLY or MODIFY access to the objects. With READ_ONLY access, the user or user group can view the shared object, whereas MODIFY access enables users to modify the object. - /// To remove access to a shared object, you can set the shareMode in the permission string to NO_ACCESS. Example: - /// {"permissions": {"e7040a64-7ff1-4ab9-a1b0-f1acac596866": {"shareMode": "READ_ONLY"}, "f7b8f511-317c-485d-8131-26cf084ef47b": {"shareMode": "MODIFY"}, "7a9a6715-e154-431b-baaf-7b58246c13dd":{"shareMode":"NO_ACCESS"}}} - /// - [JsonProperty("permission")] - public string Permission { get; set; } - - /// - /// The email addresses that should ne notified when the objects are shared. - /// - [JsonProperty("emailId", NullValueHandling = NullValueHandling.Ignore)] - public List EmailId { get; set; } - - /// - /// When set to true, a notification is sent to the users after an object is shared. - /// - [JsonProperty("notify", NullValueHandling = NullValueHandling.Ignore)] - public bool? Notify { get; set; } - - /// - /// The message text to send in the notification email. - /// - [JsonProperty("message", NullValueHandling = NullValueHandling.Ignore)] - public string Message { get; set; } - - /// - /// When set to true, ThoughtSpot sends a link with the host application context to allow users to access the shared object from their ThoughtSpot embedded instance. - /// - [JsonProperty("includeCustomEmbedUrl", NullValueHandling = NullValueHandling.Ignore)] - public bool? IncludeCustomEmbedUrl { get; set; } - - /// - public override string ToString() - { - var toStringOutput = new List(); - - this.ToString(toStringOutput); - - return $"TspublicRestV2SecurityShareTsobjectRequest : ({string.Join(", ", toStringOutput)})"; - } - - /// - public override bool Equals(object obj) - { - if (obj == null) - { - return false; - } - - if (obj == this) - { - return true; - } - - return obj is TspublicRestV2SecurityShareTsobjectRequest other && - this.Type.Equals(other.Type) && - ((this.Id == null && other.Id == null) || (this.Id?.Equals(other.Id) == true)) && - ((this.Permission == null && other.Permission == null) || (this.Permission?.Equals(other.Permission) == true)) && - ((this.EmailId == null && other.EmailId == null) || (this.EmailId?.Equals(other.EmailId) == true)) && - ((this.Notify == null && other.Notify == null) || (this.Notify?.Equals(other.Notify) == true)) && - ((this.Message == null && other.Message == null) || (this.Message?.Equals(other.Message) == true)) && - ((this.IncludeCustomEmbedUrl == null && other.IncludeCustomEmbedUrl == null) || (this.IncludeCustomEmbedUrl?.Equals(other.IncludeCustomEmbedUrl) == true)); - } - - - /// - /// ToString overload. - /// - /// List of strings. - protected void ToString(List toStringOutput) - { - toStringOutput.Add($"this.Type = {this.Type}"); - toStringOutput.Add($"this.Id = {(this.Id == null ? "null" : $"[{string.Join(", ", this.Id)} ]")}"); - toStringOutput.Add($"this.Permission = {(this.Permission == null ? "null" : this.Permission == string.Empty ? "" : this.Permission)}"); - toStringOutput.Add($"this.EmailId = {(this.EmailId == null ? "null" : $"[{string.Join(", ", this.EmailId)} ]")}"); - toStringOutput.Add($"this.Notify = {(this.Notify == null ? "null" : this.Notify.ToString())}"); - toStringOutput.Add($"this.Message = {(this.Message == null ? "null" : this.Message == string.Empty ? "" : this.Message)}"); - toStringOutput.Add($"this.IncludeCustomEmbedUrl = {(this.IncludeCustomEmbedUrl == null ? "null" : this.IncludeCustomEmbedUrl.ToString())}"); - } - } -} \ No newline at end of file diff --git a/DotNet/ThoughtSpotPublicRESTAPI.Standard/Models/TspublicRestV2SecurityShareVisualizationRequest.cs b/DotNet/ThoughtSpotPublicRESTAPI.Standard/Models/TspublicRestV2SecurityShareVisualizationRequest.cs deleted file mode 100644 index 7895ef6ff..000000000 --- a/DotNet/ThoughtSpotPublicRESTAPI.Standard/Models/TspublicRestV2SecurityShareVisualizationRequest.cs +++ /dev/null @@ -1,149 +0,0 @@ -// -// Copyright (c) APIMatic. All rights reserved. -// -namespace ThoughtSpotPublicRESTAPI.Standard.Models -{ - using System; - using System.Collections.Generic; - using System.ComponentModel; - using System.IO; - using System.Linq; - using System.Text; - using System.Threading.Tasks; - using Newtonsoft.Json; - using Newtonsoft.Json.Converters; - using ThoughtSpotPublicRESTAPI.Standard; - using ThoughtSpotPublicRESTAPI.Standard.Utilities; - - /// - /// TspublicRestV2SecurityShareVisualizationRequest. - /// - public class TspublicRestV2SecurityShareVisualizationRequest - { - /// - /// Initializes a new instance of the class. - /// - public TspublicRestV2SecurityShareVisualizationRequest() - { - } - - /// - /// Initializes a new instance of the class. - /// - /// id. - /// vizId. - /// principalId. - /// emailId. - /// notify. - /// message. - /// includeCustomEmbedUrl. - public TspublicRestV2SecurityShareVisualizationRequest( - string id, - string vizId, - List principalId, - List emailId = null, - bool? notify = true, - string message = null, - bool? includeCustomEmbedUrl = false) - { - this.Id = id; - this.VizId = vizId; - this.PrincipalId = principalId; - this.EmailId = emailId; - this.Notify = notify; - this.Message = message; - this.IncludeCustomEmbedUrl = includeCustomEmbedUrl; - } - - /// - /// A JSON array of the GUIDs of the objects to be shared - /// - [JsonProperty("id")] - public string Id { get; set; } - - /// - /// The GUID of visualization - /// - [JsonProperty("vizId")] - public string VizId { get; set; } - - /// - /// The GUID of the users and user groups with which you want to share the visualization - /// - [JsonProperty("principalId")] - public List PrincipalId { get; set; } - - /// - /// The email addresses that should ne notified when the objects are shared - /// - [JsonProperty("emailId", NullValueHandling = NullValueHandling.Ignore)] - public List EmailId { get; set; } - - /// - /// When set to true, a notification is sent to the users after an object is shared. - /// - [JsonProperty("notify", NullValueHandling = NullValueHandling.Ignore)] - public bool? Notify { get; set; } - - /// - /// The message text to send in the notification email. - /// - [JsonProperty("message", NullValueHandling = NullValueHandling.Ignore)] - public string Message { get; set; } - - /// - /// When set to true, ThoughtSpot sends a link with the host application context to allow users to access the shared object from their ThoughtSpot embedded instance. - /// - [JsonProperty("includeCustomEmbedUrl", NullValueHandling = NullValueHandling.Ignore)] - public bool? IncludeCustomEmbedUrl { get; set; } - - /// - public override string ToString() - { - var toStringOutput = new List(); - - this.ToString(toStringOutput); - - return $"TspublicRestV2SecurityShareVisualizationRequest : ({string.Join(", ", toStringOutput)})"; - } - - /// - public override bool Equals(object obj) - { - if (obj == null) - { - return false; - } - - if (obj == this) - { - return true; - } - - return obj is TspublicRestV2SecurityShareVisualizationRequest other && - ((this.Id == null && other.Id == null) || (this.Id?.Equals(other.Id) == true)) && - ((this.VizId == null && other.VizId == null) || (this.VizId?.Equals(other.VizId) == true)) && - ((this.PrincipalId == null && other.PrincipalId == null) || (this.PrincipalId?.Equals(other.PrincipalId) == true)) && - ((this.EmailId == null && other.EmailId == null) || (this.EmailId?.Equals(other.EmailId) == true)) && - ((this.Notify == null && other.Notify == null) || (this.Notify?.Equals(other.Notify) == true)) && - ((this.Message == null && other.Message == null) || (this.Message?.Equals(other.Message) == true)) && - ((this.IncludeCustomEmbedUrl == null && other.IncludeCustomEmbedUrl == null) || (this.IncludeCustomEmbedUrl?.Equals(other.IncludeCustomEmbedUrl) == true)); - } - - - /// - /// ToString overload. - /// - /// List of strings. - protected void ToString(List toStringOutput) - { - toStringOutput.Add($"this.Id = {(this.Id == null ? "null" : this.Id == string.Empty ? "" : this.Id)}"); - toStringOutput.Add($"this.VizId = {(this.VizId == null ? "null" : this.VizId == string.Empty ? "" : this.VizId)}"); - toStringOutput.Add($"this.PrincipalId = {(this.PrincipalId == null ? "null" : $"[{string.Join(", ", this.PrincipalId)} ]")}"); - toStringOutput.Add($"this.EmailId = {(this.EmailId == null ? "null" : $"[{string.Join(", ", this.EmailId)} ]")}"); - toStringOutput.Add($"this.Notify = {(this.Notify == null ? "null" : this.Notify.ToString())}"); - toStringOutput.Add($"this.Message = {(this.Message == null ? "null" : this.Message == string.Empty ? "" : this.Message)}"); - toStringOutput.Add($"this.IncludeCustomEmbedUrl = {(this.IncludeCustomEmbedUrl == null ? "null" : this.IncludeCustomEmbedUrl.ToString())}"); - } - } -} \ No newline at end of file diff --git a/DotNet/ThoughtSpotPublicRESTAPI.Standard/Models/TspublicRestV2UserAddgroupRequest.cs b/DotNet/ThoughtSpotPublicRESTAPI.Standard/Models/TspublicRestV2UserAddgroupRequest.cs deleted file mode 100644 index bc6248bf1..000000000 --- a/DotNet/ThoughtSpotPublicRESTAPI.Standard/Models/TspublicRestV2UserAddgroupRequest.cs +++ /dev/null @@ -1,105 +0,0 @@ -// -// Copyright (c) APIMatic. All rights reserved. -// -namespace ThoughtSpotPublicRESTAPI.Standard.Models -{ - using System; - using System.Collections.Generic; - using System.ComponentModel; - using System.IO; - using System.Linq; - using System.Text; - using System.Threading.Tasks; - using Newtonsoft.Json; - using Newtonsoft.Json.Converters; - using ThoughtSpotPublicRESTAPI.Standard; - using ThoughtSpotPublicRESTAPI.Standard.Utilities; - - /// - /// TspublicRestV2UserAddgroupRequest. - /// - public class TspublicRestV2UserAddgroupRequest - { - /// - /// Initializes a new instance of the class. - /// - public TspublicRestV2UserAddgroupRequest() - { - } - - /// - /// Initializes a new instance of the class. - /// - /// groups. - /// name. - /// id. - public TspublicRestV2UserAddgroupRequest( - List groups, - string name = null, - string id = null) - { - this.Name = name; - this.Id = id; - this.Groups = groups; - } - - /// - /// User name of the user account - /// - [JsonProperty("name", NullValueHandling = NullValueHandling.Ignore)] - public string Name { get; set; } - - /// - /// The GUID of the user account - /// - [JsonProperty("id", NullValueHandling = NullValueHandling.Ignore)] - public string Id { get; set; } - - /// - /// Array of objects of groups that the user belong to. - /// - [JsonProperty("groups")] - public List Groups { get; set; } - - /// - public override string ToString() - { - var toStringOutput = new List(); - - this.ToString(toStringOutput); - - return $"TspublicRestV2UserAddgroupRequest : ({string.Join(", ", toStringOutput)})"; - } - - /// - public override bool Equals(object obj) - { - if (obj == null) - { - return false; - } - - if (obj == this) - { - return true; - } - - return obj is TspublicRestV2UserAddgroupRequest other && - ((this.Name == null && other.Name == null) || (this.Name?.Equals(other.Name) == true)) && - ((this.Id == null && other.Id == null) || (this.Id?.Equals(other.Id) == true)) && - ((this.Groups == null && other.Groups == null) || (this.Groups?.Equals(other.Groups) == true)); - } - - - /// - /// ToString overload. - /// - /// List of strings. - protected void ToString(List toStringOutput) - { - toStringOutput.Add($"this.Name = {(this.Name == null ? "null" : this.Name == string.Empty ? "" : this.Name)}"); - toStringOutput.Add($"this.Id = {(this.Id == null ? "null" : this.Id == string.Empty ? "" : this.Id)}"); - toStringOutput.Add($"this.Groups = {(this.Groups == null ? "null" : $"[{string.Join(", ", this.Groups)} ]")}"); - } - } -} \ No newline at end of file diff --git a/DotNet/ThoughtSpotPublicRESTAPI.Standard/Models/TspublicRestV2UserAddorgRequest.cs b/DotNet/ThoughtSpotPublicRESTAPI.Standard/Models/TspublicRestV2UserAddorgRequest.cs deleted file mode 100644 index c4415e6f5..000000000 --- a/DotNet/ThoughtSpotPublicRESTAPI.Standard/Models/TspublicRestV2UserAddorgRequest.cs +++ /dev/null @@ -1,94 +0,0 @@ -// -// Copyright (c) APIMatic. All rights reserved. -// -namespace ThoughtSpotPublicRESTAPI.Standard.Models -{ - using System; - using System.Collections.Generic; - using System.ComponentModel; - using System.IO; - using System.Linq; - using System.Text; - using System.Threading.Tasks; - using Newtonsoft.Json; - using Newtonsoft.Json.Converters; - using ThoughtSpotPublicRESTAPI.Standard; - using ThoughtSpotPublicRESTAPI.Standard.Utilities; - - /// - /// TspublicRestV2UserAddorgRequest. - /// - public class TspublicRestV2UserAddorgRequest - { - /// - /// Initializes a new instance of the class. - /// - public TspublicRestV2UserAddorgRequest() - { - } - - /// - /// Initializes a new instance of the class. - /// - /// users. - /// orgId. - public TspublicRestV2UserAddorgRequest( - List users, - int? orgId = null) - { - this.OrgId = orgId; - this.Users = users; - } - - /// - /// The ID of the organization. - /// - [JsonProperty("orgId", NullValueHandling = NullValueHandling.Ignore)] - public int? OrgId { get; set; } - - /// - /// Array of objects. A JSON array of name of users or GUIDs of users or both. When both are given then id is considered - /// - [JsonProperty("users")] - public List Users { get; set; } - - /// - public override string ToString() - { - var toStringOutput = new List(); - - this.ToString(toStringOutput); - - return $"TspublicRestV2UserAddorgRequest : ({string.Join(", ", toStringOutput)})"; - } - - /// - public override bool Equals(object obj) - { - if (obj == null) - { - return false; - } - - if (obj == this) - { - return true; - } - - return obj is TspublicRestV2UserAddorgRequest other && - ((this.OrgId == null && other.OrgId == null) || (this.OrgId?.Equals(other.OrgId) == true)) && - ((this.Users == null && other.Users == null) || (this.Users?.Equals(other.Users) == true)); - } - - - /// - /// ToString overload. - /// - /// List of strings. - protected void ToString(List toStringOutput) - { - toStringOutput.Add($"this.OrgId = {(this.OrgId == null ? "null" : this.OrgId.ToString())}"); - toStringOutput.Add($"this.Users = {(this.Users == null ? "null" : $"[{string.Join(", ", this.Users)} ]")}"); - } - } -} \ No newline at end of file diff --git a/DotNet/ThoughtSpotPublicRESTAPI.Standard/Models/TspublicRestV2UserChangepasswordRequest.cs b/DotNet/ThoughtSpotPublicRESTAPI.Standard/Models/TspublicRestV2UserChangepasswordRequest.cs deleted file mode 100644 index 56797cd57..000000000 --- a/DotNet/ThoughtSpotPublicRESTAPI.Standard/Models/TspublicRestV2UserChangepasswordRequest.cs +++ /dev/null @@ -1,116 +0,0 @@ -// -// Copyright (c) APIMatic. All rights reserved. -// -namespace ThoughtSpotPublicRESTAPI.Standard.Models -{ - using System; - using System.Collections.Generic; - using System.ComponentModel; - using System.IO; - using System.Linq; - using System.Text; - using System.Threading.Tasks; - using Newtonsoft.Json; - using Newtonsoft.Json.Converters; - using ThoughtSpotPublicRESTAPI.Standard; - using ThoughtSpotPublicRESTAPI.Standard.Utilities; - - /// - /// TspublicRestV2UserChangepasswordRequest. - /// - public class TspublicRestV2UserChangepasswordRequest - { - /// - /// Initializes a new instance of the class. - /// - public TspublicRestV2UserChangepasswordRequest() - { - } - - /// - /// Initializes a new instance of the class. - /// - /// currentPassword. - /// newPassword. - /// name. - /// id. - public TspublicRestV2UserChangepasswordRequest( - string currentPassword, - string newPassword, - string name = null, - string id = null) - { - this.Name = name; - this.Id = id; - this.CurrentPassword = currentPassword; - this.NewPassword = newPassword; - } - - /// - /// User name of the user account. - /// - [JsonProperty("name", NullValueHandling = NullValueHandling.Ignore)] - public string Name { get; set; } - - /// - /// The GUID of the user account to query. - /// - [JsonProperty("id", NullValueHandling = NullValueHandling.Ignore)] - public string Id { get; set; } - - /// - /// The current password of the user. - /// - [JsonProperty("currentPassword")] - public string CurrentPassword { get; set; } - - /// - /// A new password for the user. - /// - [JsonProperty("newPassword")] - public string NewPassword { get; set; } - - /// - public override string ToString() - { - var toStringOutput = new List(); - - this.ToString(toStringOutput); - - return $"TspublicRestV2UserChangepasswordRequest : ({string.Join(", ", toStringOutput)})"; - } - - /// - public override bool Equals(object obj) - { - if (obj == null) - { - return false; - } - - if (obj == this) - { - return true; - } - - return obj is TspublicRestV2UserChangepasswordRequest other && - ((this.Name == null && other.Name == null) || (this.Name?.Equals(other.Name) == true)) && - ((this.Id == null && other.Id == null) || (this.Id?.Equals(other.Id) == true)) && - ((this.CurrentPassword == null && other.CurrentPassword == null) || (this.CurrentPassword?.Equals(other.CurrentPassword) == true)) && - ((this.NewPassword == null && other.NewPassword == null) || (this.NewPassword?.Equals(other.NewPassword) == true)); - } - - - /// - /// ToString overload. - /// - /// List of strings. - protected void ToString(List toStringOutput) - { - toStringOutput.Add($"this.Name = {(this.Name == null ? "null" : this.Name == string.Empty ? "" : this.Name)}"); - toStringOutput.Add($"this.Id = {(this.Id == null ? "null" : this.Id == string.Empty ? "" : this.Id)}"); - toStringOutput.Add($"this.CurrentPassword = {(this.CurrentPassword == null ? "null" : this.CurrentPassword == string.Empty ? "" : this.CurrentPassword)}"); - toStringOutput.Add($"this.NewPassword = {(this.NewPassword == null ? "null" : this.NewPassword == string.Empty ? "" : this.NewPassword)}"); - } - } -} \ No newline at end of file diff --git a/DotNet/ThoughtSpotPublicRESTAPI.Standard/Models/TspublicRestV2UserRemovegroupRequest.cs b/DotNet/ThoughtSpotPublicRESTAPI.Standard/Models/TspublicRestV2UserRemovegroupRequest.cs deleted file mode 100644 index f15d7d77d..000000000 --- a/DotNet/ThoughtSpotPublicRESTAPI.Standard/Models/TspublicRestV2UserRemovegroupRequest.cs +++ /dev/null @@ -1,105 +0,0 @@ -// -// Copyright (c) APIMatic. All rights reserved. -// -namespace ThoughtSpotPublicRESTAPI.Standard.Models -{ - using System; - using System.Collections.Generic; - using System.ComponentModel; - using System.IO; - using System.Linq; - using System.Text; - using System.Threading.Tasks; - using Newtonsoft.Json; - using Newtonsoft.Json.Converters; - using ThoughtSpotPublicRESTAPI.Standard; - using ThoughtSpotPublicRESTAPI.Standard.Utilities; - - /// - /// TspublicRestV2UserRemovegroupRequest. - /// - public class TspublicRestV2UserRemovegroupRequest - { - /// - /// Initializes a new instance of the class. - /// - public TspublicRestV2UserRemovegroupRequest() - { - } - - /// - /// Initializes a new instance of the class. - /// - /// groups. - /// name. - /// id. - public TspublicRestV2UserRemovegroupRequest( - List groups, - string name = null, - string id = null) - { - this.Name = name; - this.Id = id; - this.Groups = groups; - } - - /// - /// User name of the user account - /// - [JsonProperty("name", NullValueHandling = NullValueHandling.Ignore)] - public string Name { get; set; } - - /// - /// The GUID of the user account - /// - [JsonProperty("id", NullValueHandling = NullValueHandling.Ignore)] - public string Id { get; set; } - - /// - /// Array of objects of groups that the user belong to. - /// - [JsonProperty("groups")] - public List Groups { get; set; } - - /// - public override string ToString() - { - var toStringOutput = new List(); - - this.ToString(toStringOutput); - - return $"TspublicRestV2UserRemovegroupRequest : ({string.Join(", ", toStringOutput)})"; - } - - /// - public override bool Equals(object obj) - { - if (obj == null) - { - return false; - } - - if (obj == this) - { - return true; - } - - return obj is TspublicRestV2UserRemovegroupRequest other && - ((this.Name == null && other.Name == null) || (this.Name?.Equals(other.Name) == true)) && - ((this.Id == null && other.Id == null) || (this.Id?.Equals(other.Id) == true)) && - ((this.Groups == null && other.Groups == null) || (this.Groups?.Equals(other.Groups) == true)); - } - - - /// - /// ToString overload. - /// - /// List of strings. - protected void ToString(List toStringOutput) - { - toStringOutput.Add($"this.Name = {(this.Name == null ? "null" : this.Name == string.Empty ? "" : this.Name)}"); - toStringOutput.Add($"this.Id = {(this.Id == null ? "null" : this.Id == string.Empty ? "" : this.Id)}"); - toStringOutput.Add($"this.Groups = {(this.Groups == null ? "null" : $"[{string.Join(", ", this.Groups)} ]")}"); - } - } -} \ No newline at end of file diff --git a/DotNet/ThoughtSpotPublicRESTAPI.Standard/Models/TspublicRestV2UserSearchRequest.cs b/DotNet/ThoughtSpotPublicRESTAPI.Standard/Models/TspublicRestV2UserSearchRequest.cs deleted file mode 100644 index 7b0084e51..000000000 --- a/DotNet/ThoughtSpotPublicRESTAPI.Standard/Models/TspublicRestV2UserSearchRequest.cs +++ /dev/null @@ -1,215 +0,0 @@ -// -// Copyright (c) APIMatic. All rights reserved. -// -namespace ThoughtSpotPublicRESTAPI.Standard.Models -{ - using System; - using System.Collections.Generic; - using System.ComponentModel; - using System.IO; - using System.Linq; - using System.Text; - using System.Threading.Tasks; - using Newtonsoft.Json; - using Newtonsoft.Json.Converters; - using ThoughtSpotPublicRESTAPI.Standard; - using ThoughtSpotPublicRESTAPI.Standard.Utilities; - - /// - /// TspublicRestV2UserSearchRequest. - /// - public class TspublicRestV2UserSearchRequest - { - /// - /// Initializes a new instance of the class. - /// - public TspublicRestV2UserSearchRequest() - { - } - - /// - /// Initializes a new instance of the class. - /// - /// outputFields. - /// name. - /// id. - /// displayName. - /// visibility. - /// mail. - /// groups. - /// privileges. - /// state. - /// notifyOnShare. - /// showWalkMe. - /// analystOnboardingComplete. - /// type. - public TspublicRestV2UserSearchRequest( - List outputFields = null, - string name = null, - string id = null, - string displayName = null, - string visibility = null, - string mail = null, - List groups = null, - List privileges = null, - string state = null, - bool? notifyOnShare = null, - bool? showWalkMe = null, - bool? analystOnboardingComplete = null, - string type = null) - { - this.OutputFields = outputFields; - this.Name = name; - this.Id = id; - this.DisplayName = displayName; - this.Visibility = visibility; - this.Mail = mail; - this.Groups = groups; - this.Privileges = privileges; - this.State = state; - this.NotifyOnShare = notifyOnShare; - this.ShowWalkMe = showWalkMe; - this.AnalystOnboardingComplete = analystOnboardingComplete; - this.Type = type; - } - - /// - /// Array of field names that need to be included in the response - /// - [JsonProperty("outputFields", NullValueHandling = NullValueHandling.Ignore)] - public List OutputFields { get; set; } - - /// - /// User name of the user account - /// - [JsonProperty("name", NullValueHandling = NullValueHandling.Ignore)] - public string Name { get; set; } - - /// - /// The GUID of the user account - /// - [JsonProperty("id", NullValueHandling = NullValueHandling.Ignore)] - public string Id { get; set; } - - /// - /// A unique display name string for the user, usually their first and last name. - /// - [JsonProperty("displayName", NullValueHandling = NullValueHandling.Ignore)] - public string DisplayName { get; set; } - - /// - /// Visibility of the user account. The visibility attribute is set to DEFAULT when creating a user. The DEFAULT attribute makes a user visible to other users and user groups, and thus allows them to share objects. - /// - [JsonProperty("visibility", NullValueHandling = NullValueHandling.Ignore)] - public string Visibility { get; set; } - - /// - /// email of the user. - /// - [JsonProperty("mail", NullValueHandling = NullValueHandling.Ignore)] - public string Mail { get; set; } - - /// - /// Array of objects of groups that the user belong to. - /// - [JsonProperty("groups", NullValueHandling = NullValueHandling.Ignore)] - public List Groups { get; set; } - - /// - /// Privileges assigned to user account - /// - [JsonProperty("privileges", ItemConverterType = typeof(StringEnumConverter), NullValueHandling = NullValueHandling.Ignore)] - public List Privileges { get; set; } - - /// - /// Status of user account. acitve or inactive. - /// - [JsonProperty("state", NullValueHandling = NullValueHandling.Ignore)] - public string State { get; set; } - - /// - /// User preference for receiving email notifications when another ThoughtSpot user shares answers or pinboards. - /// - [JsonProperty("notifyOnShare", NullValueHandling = NullValueHandling.Ignore)] - public bool? NotifyOnShare { get; set; } - - /// - /// The user preference for revisiting the onboarding experience. - /// - [JsonProperty("showWalkMe", NullValueHandling = NullValueHandling.Ignore)] - public bool? ShowWalkMe { get; set; } - - /// - /// ThoughtSpot provides an interactive guided walkthrough to onboard new users. The onboarding experience leads users through a set of actions to help users get started and accomplish their tasks quickly. The users can turn off the Onboarding experience and access it again when they need assistance with the ThoughtSpot UI. - /// - [JsonProperty("analystOnboardingComplete", NullValueHandling = NullValueHandling.Ignore)] - public bool? AnalystOnboardingComplete { get; set; } - - /// - /// Type of user. LOCAL_USER indicates that the user is created locally in the ThoughtSpot system. - /// - [JsonProperty("type", NullValueHandling = NullValueHandling.Ignore)] - public string Type { get; set; } - - /// - public override string ToString() - { - var toStringOutput = new List(); - - this.ToString(toStringOutput); - - return $"TspublicRestV2UserSearchRequest : ({string.Join(", ", toStringOutput)})"; - } - - /// - public override bool Equals(object obj) - { - if (obj == null) - { - return false; - } - - if (obj == this) - { - return true; - } - - return obj is TspublicRestV2UserSearchRequest other && - ((this.OutputFields == null && other.OutputFields == null) || (this.OutputFields?.Equals(other.OutputFields) == true)) && - ((this.Name == null && other.Name == null) || (this.Name?.Equals(other.Name) == true)) && - ((this.Id == null && other.Id == null) || (this.Id?.Equals(other.Id) == true)) && - ((this.DisplayName == null && other.DisplayName == null) || (this.DisplayName?.Equals(other.DisplayName) == true)) && - ((this.Visibility == null && other.Visibility == null) || (this.Visibility?.Equals(other.Visibility) == true)) && - ((this.Mail == null && other.Mail == null) || (this.Mail?.Equals(other.Mail) == true)) && - ((this.Groups == null && other.Groups == null) || (this.Groups?.Equals(other.Groups) == true)) && - ((this.Privileges == null && other.Privileges == null) || (this.Privileges?.Equals(other.Privileges) == true)) && - ((this.State == null && other.State == null) || (this.State?.Equals(other.State) == true)) && - ((this.NotifyOnShare == null && other.NotifyOnShare == null) || (this.NotifyOnShare?.Equals(other.NotifyOnShare) == true)) && - ((this.ShowWalkMe == null && other.ShowWalkMe == null) || (this.ShowWalkMe?.Equals(other.ShowWalkMe) == true)) && - ((this.AnalystOnboardingComplete == null && other.AnalystOnboardingComplete == null) || (this.AnalystOnboardingComplete?.Equals(other.AnalystOnboardingComplete) == true)) && - ((this.Type == null && other.Type == null) || (this.Type?.Equals(other.Type) == true)); - } - - - /// - /// ToString overload. - /// - /// List of strings. - protected void ToString(List toStringOutput) - { - toStringOutput.Add($"this.OutputFields = {(this.OutputFields == null ? "null" : $"[{string.Join(", ", this.OutputFields)} ]")}"); - toStringOutput.Add($"this.Name = {(this.Name == null ? "null" : this.Name == string.Empty ? "" : this.Name)}"); - toStringOutput.Add($"this.Id = {(this.Id == null ? "null" : this.Id == string.Empty ? "" : this.Id)}"); - toStringOutput.Add($"this.DisplayName = {(this.DisplayName == null ? "null" : this.DisplayName == string.Empty ? "" : this.DisplayName)}"); - toStringOutput.Add($"this.Visibility = {(this.Visibility == null ? "null" : this.Visibility == string.Empty ? "" : this.Visibility)}"); - toStringOutput.Add($"this.Mail = {(this.Mail == null ? "null" : this.Mail == string.Empty ? "" : this.Mail)}"); - toStringOutput.Add($"this.Groups = {(this.Groups == null ? "null" : $"[{string.Join(", ", this.Groups)} ]")}"); - toStringOutput.Add($"this.Privileges = {(this.Privileges == null ? "null" : $"[{string.Join(", ", this.Privileges)} ]")}"); - toStringOutput.Add($"this.State = {(this.State == null ? "null" : this.State == string.Empty ? "" : this.State)}"); - toStringOutput.Add($"this.NotifyOnShare = {(this.NotifyOnShare == null ? "null" : this.NotifyOnShare.ToString())}"); - toStringOutput.Add($"this.ShowWalkMe = {(this.ShowWalkMe == null ? "null" : this.ShowWalkMe.ToString())}"); - toStringOutput.Add($"this.AnalystOnboardingComplete = {(this.AnalystOnboardingComplete == null ? "null" : this.AnalystOnboardingComplete.ToString())}"); - toStringOutput.Add($"this.Type = {(this.Type == null ? "null" : this.Type == string.Empty ? "" : this.Type)}"); - } - } -} \ No newline at end of file diff --git a/DotNet/ThoughtSpotPublicRESTAPI.Standard/Models/TspublicRestV2UserUpdateRequest.cs b/DotNet/ThoughtSpotPublicRESTAPI.Standard/Models/TspublicRestV2UserUpdateRequest.cs deleted file mode 100644 index ce7381120..000000000 --- a/DotNet/ThoughtSpotPublicRESTAPI.Standard/Models/TspublicRestV2UserUpdateRequest.cs +++ /dev/null @@ -1,193 +0,0 @@ -// -// Copyright (c) APIMatic. All rights reserved. -// -namespace ThoughtSpotPublicRESTAPI.Standard.Models -{ - using System; - using System.Collections.Generic; - using System.ComponentModel; - using System.IO; - using System.Linq; - using System.Text; - using System.Threading.Tasks; - using Newtonsoft.Json; - using Newtonsoft.Json.Converters; - using ThoughtSpotPublicRESTAPI.Standard; - using ThoughtSpotPublicRESTAPI.Standard.Utilities; - - /// - /// TspublicRestV2UserUpdateRequest. - /// - public class TspublicRestV2UserUpdateRequest - { - /// - /// Initializes a new instance of the class. - /// - public TspublicRestV2UserUpdateRequest() - { - } - - /// - /// Initializes a new instance of the class. - /// - /// name. - /// id. - /// displayName. - /// visibility. - /// mail. - /// state. - /// notifyOnShare. - /// showWalkMe. - /// analystOnboardingComplete. - /// type. - /// groups. - public TspublicRestV2UserUpdateRequest( - string name = null, - string id = null, - string displayName = null, - Models.Visibility1Enum? visibility = Models.Visibility1Enum.DEFAULT, - string mail = null, - Models.State1Enum? state = Models.State1Enum.ACTIVE, - bool? notifyOnShare = true, - bool? showWalkMe = true, - bool? analystOnboardingComplete = false, - Models.Type9Enum? type = Models.Type9Enum.LOCALUSER, - List groups = null) - { - this.Name = name; - this.Id = id; - this.DisplayName = displayName; - this.Visibility = visibility; - this.Mail = mail; - this.State = state; - this.NotifyOnShare = notifyOnShare; - this.ShowWalkMe = showWalkMe; - this.AnalystOnboardingComplete = analystOnboardingComplete; - this.Type = type; - this.Groups = groups; - } - - /// - /// Name of the user. The username string must be unique. - /// - [JsonProperty("name", NullValueHandling = NullValueHandling.Ignore)] - public string Name { get; set; } - - /// - /// The GUID of the user account to query - /// - [JsonProperty("id", NullValueHandling = NullValueHandling.Ignore)] - public string Id { get; set; } - - /// - /// A unique display name string for the user, usually their first and last name. - /// - [JsonProperty("displayName", NullValueHandling = NullValueHandling.Ignore)] - public string DisplayName { get; set; } - - /// - /// Visibility of the user account. The visibility attribute is set to DEFAULT when creating a user. The DEFAULT attribute makes a user visible to other users and user groups, and thus allows them to share objects. - /// - [JsonProperty("visibility", ItemConverterType = typeof(StringEnumConverter), NullValueHandling = NullValueHandling.Ignore)] - public Models.Visibility1Enum? Visibility { get; set; } - - /// - /// email of the user. - /// - [JsonProperty("mail", NullValueHandling = NullValueHandling.Ignore)] - public string Mail { get; set; } - - /// - /// Status of user account. acitve or inactive. - /// - [JsonProperty("state", ItemConverterType = typeof(StringEnumConverter), NullValueHandling = NullValueHandling.Ignore)] - public Models.State1Enum? State { get; set; } - - /// - /// User preference for receiving email notifications when another ThoughtSpot user shares answers or pinboards. - /// - [JsonProperty("notifyOnShare", NullValueHandling = NullValueHandling.Ignore)] - public bool? NotifyOnShare { get; set; } - - /// - /// The user preference for revisiting the onboarding experience. - /// - [JsonProperty("showWalkMe", NullValueHandling = NullValueHandling.Ignore)] - public bool? ShowWalkMe { get; set; } - - /// - /// ThoughtSpot provides an interactive guided walkthrough to onboard new users. The onboarding experience leads users through a set of actions to help users get started and accomplish their tasks quickly. The users can turn off the Onboarding experience and access it again when they need assistance with the ThoughtSpot UI. - /// - [JsonProperty("analystOnboardingComplete", NullValueHandling = NullValueHandling.Ignore)] - public bool? AnalystOnboardingComplete { get; set; } - - /// - /// Type of user. LOCAL_USER indicates that the user is created locally in the ThoughtSpot system. - /// - [JsonProperty("type", ItemConverterType = typeof(StringEnumConverter), NullValueHandling = NullValueHandling.Ignore)] - public Models.Type9Enum? Type { get; set; } - - /// - /// Array of objects of groups that the user belong to. - /// - [JsonProperty("groups", NullValueHandling = NullValueHandling.Ignore)] - public List Groups { get; set; } - - /// - public override string ToString() - { - var toStringOutput = new List(); - - this.ToString(toStringOutput); - - return $"TspublicRestV2UserUpdateRequest : ({string.Join(", ", toStringOutput)})"; - } - - /// - public override bool Equals(object obj) - { - if (obj == null) - { - return false; - } - - if (obj == this) - { - return true; - } - - return obj is TspublicRestV2UserUpdateRequest other && - ((this.Name == null && other.Name == null) || (this.Name?.Equals(other.Name) == true)) && - ((this.Id == null && other.Id == null) || (this.Id?.Equals(other.Id) == true)) && - ((this.DisplayName == null && other.DisplayName == null) || (this.DisplayName?.Equals(other.DisplayName) == true)) && - ((this.Visibility == null && other.Visibility == null) || (this.Visibility?.Equals(other.Visibility) == true)) && - ((this.Mail == null && other.Mail == null) || (this.Mail?.Equals(other.Mail) == true)) && - ((this.State == null && other.State == null) || (this.State?.Equals(other.State) == true)) && - ((this.NotifyOnShare == null && other.NotifyOnShare == null) || (this.NotifyOnShare?.Equals(other.NotifyOnShare) == true)) && - ((this.ShowWalkMe == null && other.ShowWalkMe == null) || (this.ShowWalkMe?.Equals(other.ShowWalkMe) == true)) && - ((this.AnalystOnboardingComplete == null && other.AnalystOnboardingComplete == null) || (this.AnalystOnboardingComplete?.Equals(other.AnalystOnboardingComplete) == true)) && - ((this.Type == null && other.Type == null) || (this.Type?.Equals(other.Type) == true)) && - ((this.Groups == null && other.Groups == null) || (this.Groups?.Equals(other.Groups) == true)); - } - - - /// - /// ToString overload. - /// - /// List of strings. - protected void ToString(List toStringOutput) - { - toStringOutput.Add($"this.Name = {(this.Name == null ? "null" : this.Name == string.Empty ? "" : this.Name)}"); - toStringOutput.Add($"this.Id = {(this.Id == null ? "null" : this.Id == string.Empty ? "" : this.Id)}"); - toStringOutput.Add($"this.DisplayName = {(this.DisplayName == null ? "null" : this.DisplayName == string.Empty ? "" : this.DisplayName)}"); - toStringOutput.Add($"this.Visibility = {(this.Visibility == null ? "null" : this.Visibility.ToString())}"); - toStringOutput.Add($"this.Mail = {(this.Mail == null ? "null" : this.Mail == string.Empty ? "" : this.Mail)}"); - toStringOutput.Add($"this.State = {(this.State == null ? "null" : this.State.ToString())}"); - toStringOutput.Add($"this.NotifyOnShare = {(this.NotifyOnShare == null ? "null" : this.NotifyOnShare.ToString())}"); - toStringOutput.Add($"this.ShowWalkMe = {(this.ShowWalkMe == null ? "null" : this.ShowWalkMe.ToString())}"); - toStringOutput.Add($"this.AnalystOnboardingComplete = {(this.AnalystOnboardingComplete == null ? "null" : this.AnalystOnboardingComplete.ToString())}"); - toStringOutput.Add($"this.Type = {(this.Type == null ? "null" : this.Type.ToString())}"); - toStringOutput.Add($"this.Groups = {(this.Groups == null ? "null" : $"[{string.Join(", ", this.Groups)} ]")}"); - } - } -} \ No newline at end of file diff --git a/DotNet/ThoughtSpotPublicRESTAPI.Standard/Models/Type10Enum.cs b/DotNet/ThoughtSpotPublicRESTAPI.Standard/Models/Type10Enum.cs deleted file mode 100644 index 65a643f17..000000000 --- a/DotNet/ThoughtSpotPublicRESTAPI.Standard/Models/Type10Enum.cs +++ /dev/null @@ -1,33 +0,0 @@ -// -// Copyright (c) APIMatic. All rights reserved. -// -namespace ThoughtSpotPublicRESTAPI.Standard.Models -{ - using System; - using System.Collections.Generic; - using System.Linq; - using System.Runtime.Serialization; - using Newtonsoft.Json; - using Newtonsoft.Json.Converters; - using ThoughtSpotPublicRESTAPI.Standard; - using ThoughtSpotPublicRESTAPI.Standard.Utilities; - - /// - /// Type10Enum. - /// - [JsonConverter(typeof(StringEnumConverter))] - public enum Type10Enum - { - /// - /// LOCALGROUP. - /// - [EnumMember(Value = "LOCAL_GROUP")] - LOCALGROUP, - - /// - /// TENANTGROUP. - /// - [EnumMember(Value = "TENANT_GROUP")] - TENANTGROUP - } -} \ No newline at end of file diff --git a/DotNet/ThoughtSpotPublicRESTAPI.Standard/Models/Type13Enum.cs b/DotNet/ThoughtSpotPublicRESTAPI.Standard/Models/Type13Enum.cs deleted file mode 100644 index 8d558a797..000000000 --- a/DotNet/ThoughtSpotPublicRESTAPI.Standard/Models/Type13Enum.cs +++ /dev/null @@ -1,45 +0,0 @@ -// -// Copyright (c) APIMatic. All rights reserved. -// -namespace ThoughtSpotPublicRESTAPI.Standard.Models -{ - using System; - using System.Collections.Generic; - using System.Linq; - using System.Runtime.Serialization; - using Newtonsoft.Json; - using Newtonsoft.Json.Converters; - using ThoughtSpotPublicRESTAPI.Standard; - using ThoughtSpotPublicRESTAPI.Standard.Utilities; - - /// - /// Type13Enum. - /// - [JsonConverter(typeof(StringEnumConverter))] - public enum Type13Enum - { - /// - /// LIVEBOARD. - /// - [EnumMember(Value = "LIVEBOARD")] - LIVEBOARD, - - /// - /// DATAOBJECT. - /// - [EnumMember(Value = "DATAOBJECT")] - DATAOBJECT, - - /// - /// COLUMN. - /// - [EnumMember(Value = "COLUMN")] - COLUMN, - - /// - /// JOIN. - /// - [EnumMember(Value = "JOIN")] - JOIN - } -} \ No newline at end of file diff --git a/DotNet/ThoughtSpotPublicRESTAPI.Standard/Models/Type14Enum.cs b/DotNet/ThoughtSpotPublicRESTAPI.Standard/Models/Type14Enum.cs deleted file mode 100644 index 9b0b1a76c..000000000 --- a/DotNet/ThoughtSpotPublicRESTAPI.Standard/Models/Type14Enum.cs +++ /dev/null @@ -1,87 +0,0 @@ -// -// Copyright (c) APIMatic. All rights reserved. -// -namespace ThoughtSpotPublicRESTAPI.Standard.Models -{ - using System; - using System.Collections.Generic; - using System.Linq; - using System.Runtime.Serialization; - using Newtonsoft.Json; - using Newtonsoft.Json.Converters; - using ThoughtSpotPublicRESTAPI.Standard; - using ThoughtSpotPublicRESTAPI.Standard.Utilities; - - /// - /// Type14Enum. - /// - [JsonConverter(typeof(StringEnumConverter))] - public enum Type14Enum - { - /// - /// SNOWFLAKE. - /// - [EnumMember(Value = "SNOWFLAKE")] - SNOWFLAKE, - - /// - /// AMAZONREDSHIFT. - /// - [EnumMember(Value = "AMAZON_REDSHIFT")] - AMAZONREDSHIFT, - - /// - /// GOOGLEBIGQUERY. - /// - [EnumMember(Value = "GOOGLE_BIGQUERY")] - GOOGLEBIGQUERY, - - /// - /// AZURESYNAPSE. - /// - [EnumMember(Value = "AZURE_SYNAPSE")] - AZURESYNAPSE, - - /// - /// TERADATA. - /// - [EnumMember(Value = "TERADATA")] - TERADATA, - - /// - /// STARBURST. - /// - [EnumMember(Value = "STARBURST")] - STARBURST, - - /// - /// SAPHANA. - /// - [EnumMember(Value = "SAP_HANA")] - SAPHANA, - - /// - /// ORACLEADW. - /// - [EnumMember(Value = "ORACLE_ADW")] - ORACLEADW, - - /// - /// DATABRICKS. - /// - [EnumMember(Value = "DATABRICKS")] - DATABRICKS, - - /// - /// DENODO. - /// - [EnumMember(Value = "DENODO")] - DENODO, - - /// - /// DREMIO. - /// - [EnumMember(Value = "DREMIO")] - DREMIO - } -} \ No newline at end of file diff --git a/DotNet/ThoughtSpotPublicRESTAPI.Standard/Models/Type15Enum.cs b/DotNet/ThoughtSpotPublicRESTAPI.Standard/Models/Type15Enum.cs deleted file mode 100644 index 0849606d9..000000000 --- a/DotNet/ThoughtSpotPublicRESTAPI.Standard/Models/Type15Enum.cs +++ /dev/null @@ -1,87 +0,0 @@ -// -// Copyright (c) APIMatic. All rights reserved. -// -namespace ThoughtSpotPublicRESTAPI.Standard.Models -{ - using System; - using System.Collections.Generic; - using System.Linq; - using System.Runtime.Serialization; - using Newtonsoft.Json; - using Newtonsoft.Json.Converters; - using ThoughtSpotPublicRESTAPI.Standard; - using ThoughtSpotPublicRESTAPI.Standard.Utilities; - - /// - /// Type15Enum. - /// - [JsonConverter(typeof(StringEnumConverter))] - public enum Type15Enum - { - /// - /// SNOWFLAKE. - /// - [EnumMember(Value = "SNOWFLAKE")] - SNOWFLAKE, - - /// - /// AMAZONREDSHIFT. - /// - [EnumMember(Value = "AMAZON_REDSHIFT")] - AMAZONREDSHIFT, - - /// - /// GOOGLEBIGQUERY. - /// - [EnumMember(Value = "GOOGLE_BIGQUERY")] - GOOGLEBIGQUERY, - - /// - /// AZURESYNAPSE. - /// - [EnumMember(Value = "AZURE_SYNAPSE")] - AZURESYNAPSE, - - /// - /// TERADATA. - /// - [EnumMember(Value = "TERADATA")] - TERADATA, - - /// - /// STARBURST. - /// - [EnumMember(Value = "STARBURST")] - STARBURST, - - /// - /// SAPHANA. - /// - [EnumMember(Value = "SAP_HANA")] - SAPHANA, - - /// - /// ORACLEADW. - /// - [EnumMember(Value = "ORACLE_ADW")] - ORACLEADW, - - /// - /// DATABRICKS. - /// - [EnumMember(Value = "DATABRICKS")] - DATABRICKS, - - /// - /// DENODO. - /// - [EnumMember(Value = "DENODO")] - DENODO, - - /// - /// DREMIO. - /// - [EnumMember(Value = "DREMIO")] - DREMIO - } -} \ No newline at end of file diff --git a/DotNet/ThoughtSpotPublicRESTAPI.Standard/Models/Type16Enum.cs b/DotNet/ThoughtSpotPublicRESTAPI.Standard/Models/Type16Enum.cs deleted file mode 100644 index ef9569a06..000000000 --- a/DotNet/ThoughtSpotPublicRESTAPI.Standard/Models/Type16Enum.cs +++ /dev/null @@ -1,45 +0,0 @@ -// -// Copyright (c) APIMatic. All rights reserved. -// -namespace ThoughtSpotPublicRESTAPI.Standard.Models -{ - using System; - using System.Collections.Generic; - using System.Linq; - using System.Runtime.Serialization; - using Newtonsoft.Json; - using Newtonsoft.Json.Converters; - using ThoughtSpotPublicRESTAPI.Standard; - using ThoughtSpotPublicRESTAPI.Standard.Utilities; - - /// - /// Type16Enum. - /// - [JsonConverter(typeof(StringEnumConverter))] - public enum Type16Enum - { - /// - /// CSV. - /// - [EnumMember(Value = "CSV")] - CSV, - - /// - /// XLSX. - /// - [EnumMember(Value = "XLSX")] - XLSX, - - /// - /// PDF. - /// - [EnumMember(Value = "PDF")] - PDF, - - /// - /// PNG. - /// - [EnumMember(Value = "PNG")] - PNG - } -} \ No newline at end of file diff --git a/DotNet/ThoughtSpotPublicRESTAPI.Standard/Models/Type18Enum.cs b/DotNet/ThoughtSpotPublicRESTAPI.Standard/Models/Type18Enum.cs deleted file mode 100644 index 7c93d88ac..000000000 --- a/DotNet/ThoughtSpotPublicRESTAPI.Standard/Models/Type18Enum.cs +++ /dev/null @@ -1,45 +0,0 @@ -// -// Copyright (c) APIMatic. All rights reserved. -// -namespace ThoughtSpotPublicRESTAPI.Standard.Models -{ - using System; - using System.Collections.Generic; - using System.Linq; - using System.Runtime.Serialization; - using Newtonsoft.Json; - using Newtonsoft.Json.Converters; - using ThoughtSpotPublicRESTAPI.Standard; - using ThoughtSpotPublicRESTAPI.Standard.Utilities; - - /// - /// Type18Enum. - /// - [JsonConverter(typeof(StringEnumConverter))] - public enum Type18Enum - { - /// - /// LIVEBOARD. - /// - [EnumMember(Value = "LIVEBOARD")] - LIVEBOARD, - - /// - /// ANSWER. - /// - [EnumMember(Value = "ANSWER")] - ANSWER, - - /// - /// DATAOBJECT. - /// - [EnumMember(Value = "DATAOBJECT")] - DATAOBJECT, - - /// - /// COLUMN. - /// - [EnumMember(Value = "COLUMN")] - COLUMN - } -} \ No newline at end of file diff --git a/DotNet/ThoughtSpotPublicRESTAPI.Standard/Models/Type1Enum.cs b/DotNet/ThoughtSpotPublicRESTAPI.Standard/Models/Type1Enum.cs deleted file mode 100644 index 419853dfd..000000000 --- a/DotNet/ThoughtSpotPublicRESTAPI.Standard/Models/Type1Enum.cs +++ /dev/null @@ -1,33 +0,0 @@ -// -// Copyright (c) APIMatic. All rights reserved. -// -namespace ThoughtSpotPublicRESTAPI.Standard.Models -{ - using System; - using System.Collections.Generic; - using System.Linq; - using System.Runtime.Serialization; - using Newtonsoft.Json; - using Newtonsoft.Json.Converters; - using ThoughtSpotPublicRESTAPI.Standard; - using ThoughtSpotPublicRESTAPI.Standard.Utilities; - - /// - /// Type1Enum. - /// - [JsonConverter(typeof(StringEnumConverter))] - public enum Type1Enum - { - /// - /// USER. - /// - [EnumMember(Value = "USER")] - USER, - - /// - /// USERGROUP. - /// - [EnumMember(Value = "USER_GROUP")] - USERGROUP - } -} \ No newline at end of file diff --git a/DotNet/ThoughtSpotPublicRESTAPI.Standard/Models/Type2Enum.cs b/DotNet/ThoughtSpotPublicRESTAPI.Standard/Models/Type2Enum.cs deleted file mode 100644 index 00c760c9b..000000000 --- a/DotNet/ThoughtSpotPublicRESTAPI.Standard/Models/Type2Enum.cs +++ /dev/null @@ -1,45 +0,0 @@ -// -// Copyright (c) APIMatic. All rights reserved. -// -namespace ThoughtSpotPublicRESTAPI.Standard.Models -{ - using System; - using System.Collections.Generic; - using System.Linq; - using System.Runtime.Serialization; - using Newtonsoft.Json; - using Newtonsoft.Json.Converters; - using ThoughtSpotPublicRESTAPI.Standard; - using ThoughtSpotPublicRESTAPI.Standard.Utilities; - - /// - /// Type2Enum. - /// - [JsonConverter(typeof(StringEnumConverter))] - public enum Type2Enum - { - /// - /// LIVEBOARD. - /// - [EnumMember(Value = "LIVEBOARD")] - LIVEBOARD, - - /// - /// ANSWER. - /// - [EnumMember(Value = "ANSWER")] - ANSWER, - - /// - /// DATAOBJECT. - /// - [EnumMember(Value = "DATAOBJECT")] - DATAOBJECT, - - /// - /// COLUMN. - /// - [EnumMember(Value = "COLUMN")] - COLUMN - } -} \ No newline at end of file diff --git a/DotNet/ThoughtSpotPublicRESTAPI.Standard/Models/Type3Enum.cs b/DotNet/ThoughtSpotPublicRESTAPI.Standard/Models/Type3Enum.cs deleted file mode 100644 index 5d2d7b4d2..000000000 --- a/DotNet/ThoughtSpotPublicRESTAPI.Standard/Models/Type3Enum.cs +++ /dev/null @@ -1,135 +0,0 @@ -// -// Copyright (c) APIMatic. All rights reserved. -// -namespace ThoughtSpotPublicRESTAPI.Standard.Models -{ - using System; - using System.Collections.Generic; - using System.Linq; - using System.Runtime.Serialization; - using Newtonsoft.Json; - using Newtonsoft.Json.Converters; - using ThoughtSpotPublicRESTAPI.Standard; - using ThoughtSpotPublicRESTAPI.Standard.Utilities; - - /// - /// Type3Enum. - /// - [JsonConverter(typeof(StringEnumConverter))] - public enum Type3Enum - { - /// - /// ANSWER. - /// - [EnumMember(Value = "ANSWER")] - ANSWER, - - /// - /// LIVEBOARD. - /// - [EnumMember(Value = "LIVEBOARD")] - LIVEBOARD, - - /// - /// DATAOBJECTALL. - /// - [EnumMember(Value = "DATAOBJECT_ALL")] - DATAOBJECTALL, - - /// - /// DATAOBJECTWORKSHEET. - /// - [EnumMember(Value = "DATAOBJECT_WORKSHEET")] - DATAOBJECTWORKSHEET, - - /// - /// DATAOBJECTTABLE. - /// - [EnumMember(Value = "DATAOBJECT_TABLE")] - DATAOBJECTTABLE, - - /// - /// DATAOBJECTUSERDEFINED. - /// - [EnumMember(Value = "DATAOBJECT_USER_DEFINED")] - DATAOBJECTUSERDEFINED, - - /// - /// DATAOBJECTVIEW. - /// - [EnumMember(Value = "DATAOBJECT_VIEW")] - DATAOBJECTVIEW, - - /// - /// DATAOBJECTCALENDARTABLE. - /// - [EnumMember(Value = "DATAOBJECT_CALENDAR_TABLE")] - DATAOBJECTCALENDARTABLE, - - /// - /// COLUMNALL. - /// - [EnumMember(Value = "COLUMN_ALL")] - COLUMNALL, - - /// - /// COLUMNWORKSHEET. - /// - [EnumMember(Value = "COLUMN_WORKSHEET")] - COLUMNWORKSHEET, - - /// - /// COLUMNTABLE. - /// - [EnumMember(Value = "COLUMN_TABLE")] - COLUMNTABLE, - - /// - /// COLUMNUSERDEFINED. - /// - [EnumMember(Value = "COLUMN_USER_DEFINED")] - COLUMNUSERDEFINED, - - /// - /// COLUMNVIEW. - /// - [EnumMember(Value = "COLUMN_VIEW")] - COLUMNVIEW, - - /// - /// COLUMNCALENDARTABLE. - /// - [EnumMember(Value = "COLUMN_CALENDAR_TABLE")] - COLUMNCALENDARTABLE, - - /// - /// JOIN. - /// - [EnumMember(Value = "JOIN")] - JOIN, - - /// - /// CONNECTION. - /// - [EnumMember(Value = "CONNECTION")] - CONNECTION, - - /// - /// TAG. - /// - [EnumMember(Value = "TAG")] - TAG, - - /// - /// USER. - /// - [EnumMember(Value = "USER")] - USER, - - /// - /// USERGROUP. - /// - [EnumMember(Value = "USER_GROUP")] - USERGROUP - } -} \ No newline at end of file diff --git a/DotNet/ThoughtSpotPublicRESTAPI.Standard/Models/Type4Enum.cs b/DotNet/ThoughtSpotPublicRESTAPI.Standard/Models/Type4Enum.cs deleted file mode 100644 index 581a6ff45..000000000 --- a/DotNet/ThoughtSpotPublicRESTAPI.Standard/Models/Type4Enum.cs +++ /dev/null @@ -1,75 +0,0 @@ -// -// Copyright (c) APIMatic. All rights reserved. -// -namespace ThoughtSpotPublicRESTAPI.Standard.Models -{ - using System; - using System.Collections.Generic; - using System.Linq; - using System.Runtime.Serialization; - using Newtonsoft.Json; - using Newtonsoft.Json.Converters; - using ThoughtSpotPublicRESTAPI.Standard; - using ThoughtSpotPublicRESTAPI.Standard.Utilities; - - /// - /// Type4Enum. - /// - [JsonConverter(typeof(StringEnumConverter))] - public enum Type4Enum - { - /// - /// ANSWER. - /// - [EnumMember(Value = "ANSWER")] - ANSWER, - - /// - /// LIVEBOARD. - /// - [EnumMember(Value = "LIVEBOARD")] - LIVEBOARD, - - /// - /// DATAOBJECT. - /// - [EnumMember(Value = "DATAOBJECT")] - DATAOBJECT, - - /// - /// COLUMN. - /// - [EnumMember(Value = "COLUMN")] - COLUMN, - - /// - /// JOIN. - /// - [EnumMember(Value = "JOIN")] - JOIN, - - /// - /// CONNECTION. - /// - [EnumMember(Value = "CONNECTION")] - CONNECTION, - - /// - /// TAG. - /// - [EnumMember(Value = "TAG")] - TAG, - - /// - /// USER. - /// - [EnumMember(Value = "USER")] - USER, - - /// - /// USERGROUP. - /// - [EnumMember(Value = "USER_GROUP")] - USERGROUP - } -} \ No newline at end of file diff --git a/DotNet/ThoughtSpotPublicRESTAPI.Standard/Models/Type5Enum.cs b/DotNet/ThoughtSpotPublicRESTAPI.Standard/Models/Type5Enum.cs deleted file mode 100644 index af09c6f4e..000000000 --- a/DotNet/ThoughtSpotPublicRESTAPI.Standard/Models/Type5Enum.cs +++ /dev/null @@ -1,135 +0,0 @@ -// -// Copyright (c) APIMatic. All rights reserved. -// -namespace ThoughtSpotPublicRESTAPI.Standard.Models -{ - using System; - using System.Collections.Generic; - using System.Linq; - using System.Runtime.Serialization; - using Newtonsoft.Json; - using Newtonsoft.Json.Converters; - using ThoughtSpotPublicRESTAPI.Standard; - using ThoughtSpotPublicRESTAPI.Standard.Utilities; - - /// - /// Type5Enum. - /// - [JsonConverter(typeof(StringEnumConverter))] - public enum Type5Enum - { - /// - /// ANSWER. - /// - [EnumMember(Value = "ANSWER")] - ANSWER, - - /// - /// LIVEBOARD. - /// - [EnumMember(Value = "LIVEBOARD")] - LIVEBOARD, - - /// - /// DATAOBJECTALL. - /// - [EnumMember(Value = "DATAOBJECT_ALL")] - DATAOBJECTALL, - - /// - /// DATAOBJECTWORKSHEET. - /// - [EnumMember(Value = "DATAOBJECT_WORKSHEET")] - DATAOBJECTWORKSHEET, - - /// - /// DATAOBJECTTABLE. - /// - [EnumMember(Value = "DATAOBJECT_TABLE")] - DATAOBJECTTABLE, - - /// - /// DATAOBJECTUSERDEFINED. - /// - [EnumMember(Value = "DATAOBJECT_USER_DEFINED")] - DATAOBJECTUSERDEFINED, - - /// - /// DATAOBJECTVIEW. - /// - [EnumMember(Value = "DATAOBJECT_VIEW")] - DATAOBJECTVIEW, - - /// - /// DATAOBJECTCALENDARTABLE. - /// - [EnumMember(Value = "DATAOBJECT_CALENDAR_TABLE")] - DATAOBJECTCALENDARTABLE, - - /// - /// COLUMNALL. - /// - [EnumMember(Value = "COLUMN_ALL")] - COLUMNALL, - - /// - /// COLUMNWORKSHEET. - /// - [EnumMember(Value = "COLUMN_WORKSHEET")] - COLUMNWORKSHEET, - - /// - /// COLUMNTABLE. - /// - [EnumMember(Value = "COLUMN_TABLE")] - COLUMNTABLE, - - /// - /// COLUMNUSERDEFINED. - /// - [EnumMember(Value = "COLUMN_USER_DEFINED")] - COLUMNUSERDEFINED, - - /// - /// COLUMNVIEW. - /// - [EnumMember(Value = "COLUMN_VIEW")] - COLUMNVIEW, - - /// - /// COLUMNCALENDARTABLE. - /// - [EnumMember(Value = "COLUMN_CALENDAR_TABLE")] - COLUMNCALENDARTABLE, - - /// - /// JOIN. - /// - [EnumMember(Value = "JOIN")] - JOIN, - - /// - /// CONNECTION. - /// - [EnumMember(Value = "CONNECTION")] - CONNECTION, - - /// - /// TAG. - /// - [EnumMember(Value = "TAG")] - TAG, - - /// - /// USER. - /// - [EnumMember(Value = "USER")] - USER, - - /// - /// USERGROUP. - /// - [EnumMember(Value = "USER_GROUP")] - USERGROUP - } -} \ No newline at end of file diff --git a/DotNet/ThoughtSpotPublicRESTAPI.Standard/Models/Type6Enum.cs b/DotNet/ThoughtSpotPublicRESTAPI.Standard/Models/Type6Enum.cs deleted file mode 100644 index ab84d18fe..000000000 --- a/DotNet/ThoughtSpotPublicRESTAPI.Standard/Models/Type6Enum.cs +++ /dev/null @@ -1,75 +0,0 @@ -// -// Copyright (c) APIMatic. All rights reserved. -// -namespace ThoughtSpotPublicRESTAPI.Standard.Models -{ - using System; - using System.Collections.Generic; - using System.Linq; - using System.Runtime.Serialization; - using Newtonsoft.Json; - using Newtonsoft.Json.Converters; - using ThoughtSpotPublicRESTAPI.Standard; - using ThoughtSpotPublicRESTAPI.Standard.Utilities; - - /// - /// Type6Enum. - /// - [JsonConverter(typeof(StringEnumConverter))] - public enum Type6Enum - { - /// - /// ANSWER. - /// - [EnumMember(Value = "ANSWER")] - ANSWER, - - /// - /// LIVEBOARD. - /// - [EnumMember(Value = "LIVEBOARD")] - LIVEBOARD, - - /// - /// DATAOBJECT. - /// - [EnumMember(Value = "DATAOBJECT")] - DATAOBJECT, - - /// - /// COLUMN. - /// - [EnumMember(Value = "COLUMN")] - COLUMN, - - /// - /// JOIN. - /// - [EnumMember(Value = "JOIN")] - JOIN, - - /// - /// CONNECTION. - /// - [EnumMember(Value = "CONNECTION")] - CONNECTION, - - /// - /// TAG. - /// - [EnumMember(Value = "TAG")] - TAG, - - /// - /// USER. - /// - [EnumMember(Value = "USER")] - USER, - - /// - /// USERGROUP. - /// - [EnumMember(Value = "USER_GROUP")] - USERGROUP - } -} \ No newline at end of file diff --git a/DotNet/ThoughtSpotPublicRESTAPI.Standard/Models/Type7Enum.cs b/DotNet/ThoughtSpotPublicRESTAPI.Standard/Models/Type7Enum.cs deleted file mode 100644 index 5efb3cec8..000000000 --- a/DotNet/ThoughtSpotPublicRESTAPI.Standard/Models/Type7Enum.cs +++ /dev/null @@ -1,45 +0,0 @@ -// -// Copyright (c) APIMatic. All rights reserved. -// -namespace ThoughtSpotPublicRESTAPI.Standard.Models -{ - using System; - using System.Collections.Generic; - using System.Linq; - using System.Runtime.Serialization; - using Newtonsoft.Json; - using Newtonsoft.Json.Converters; - using ThoughtSpotPublicRESTAPI.Standard; - using ThoughtSpotPublicRESTAPI.Standard.Utilities; - - /// - /// Type7Enum. - /// - [JsonConverter(typeof(StringEnumConverter))] - public enum Type7Enum - { - /// - /// LIVEBOARD. - /// - [EnumMember(Value = "LIVEBOARD")] - LIVEBOARD, - - /// - /// ANSWER. - /// - [EnumMember(Value = "ANSWER")] - ANSWER, - - /// - /// DATAOBJECT. - /// - [EnumMember(Value = "DATAOBJECT")] - DATAOBJECT, - - /// - /// COLUMN. - /// - [EnumMember(Value = "COLUMN")] - COLUMN - } -} \ No newline at end of file diff --git a/DotNet/ThoughtSpotPublicRESTAPI.Standard/Models/Type8Enum.cs b/DotNet/ThoughtSpotPublicRESTAPI.Standard/Models/Type8Enum.cs deleted file mode 100644 index 55f9aaeb5..000000000 --- a/DotNet/ThoughtSpotPublicRESTAPI.Standard/Models/Type8Enum.cs +++ /dev/null @@ -1,51 +0,0 @@ -// -// Copyright (c) APIMatic. All rights reserved. -// -namespace ThoughtSpotPublicRESTAPI.Standard.Models -{ - using System; - using System.Collections.Generic; - using System.Linq; - using System.Runtime.Serialization; - using Newtonsoft.Json; - using Newtonsoft.Json.Converters; - using ThoughtSpotPublicRESTAPI.Standard; - using ThoughtSpotPublicRESTAPI.Standard.Utilities; - - /// - /// Type8Enum. - /// - [JsonConverter(typeof(StringEnumConverter))] - public enum Type8Enum - { - /// - /// UNKNOWN. - /// - [EnumMember(Value = "UNKNOWN")] - UNKNOWN, - - /// - /// LDAPUSER. - /// - [EnumMember(Value = "LDAP_USER")] - LDAPUSER, - - /// - /// SAMLUSER. - /// - [EnumMember(Value = "SAML_USER")] - SAMLUSER, - - /// - /// OIDCUSER. - /// - [EnumMember(Value = "OIDC_USER")] - OIDCUSER, - - /// - /// LOCALUSER. - /// - [EnumMember(Value = "LOCAL_USER")] - LOCALUSER - } -} \ No newline at end of file diff --git a/DotNet/ThoughtSpotPublicRESTAPI.Standard/Models/Type9Enum.cs b/DotNet/ThoughtSpotPublicRESTAPI.Standard/Models/Type9Enum.cs deleted file mode 100644 index fb92a2735..000000000 --- a/DotNet/ThoughtSpotPublicRESTAPI.Standard/Models/Type9Enum.cs +++ /dev/null @@ -1,51 +0,0 @@ -// -// Copyright (c) APIMatic. All rights reserved. -// -namespace ThoughtSpotPublicRESTAPI.Standard.Models -{ - using System; - using System.Collections.Generic; - using System.Linq; - using System.Runtime.Serialization; - using Newtonsoft.Json; - using Newtonsoft.Json.Converters; - using ThoughtSpotPublicRESTAPI.Standard; - using ThoughtSpotPublicRESTAPI.Standard.Utilities; - - /// - /// Type9Enum. - /// - [JsonConverter(typeof(StringEnumConverter))] - public enum Type9Enum - { - /// - /// UNKNOWN. - /// - [EnumMember(Value = "UNKNOWN")] - UNKNOWN, - - /// - /// LDAPUSER. - /// - [EnumMember(Value = "LDAP_USER")] - LDAPUSER, - - /// - /// SAMLUSER. - /// - [EnumMember(Value = "SAML_USER")] - SAMLUSER, - - /// - /// OIDCUSER. - /// - [EnumMember(Value = "OIDC_USER")] - OIDCUSER, - - /// - /// LOCALUSER. - /// - [EnumMember(Value = "LOCAL_USER")] - LOCALUSER - } -} \ No newline at end of file diff --git a/DotNet/ThoughtSpotPublicRESTAPI.Standard/Models/TypeEnum.cs b/DotNet/ThoughtSpotPublicRESTAPI.Standard/Models/TypeEnum.cs deleted file mode 100644 index 464a6d61b..000000000 --- a/DotNet/ThoughtSpotPublicRESTAPI.Standard/Models/TypeEnum.cs +++ /dev/null @@ -1,45 +0,0 @@ -// -// Copyright (c) APIMatic. All rights reserved. -// -namespace ThoughtSpotPublicRESTAPI.Standard.Models -{ - using System; - using System.Collections.Generic; - using System.Linq; - using System.Runtime.Serialization; - using Newtonsoft.Json; - using Newtonsoft.Json.Converters; - using ThoughtSpotPublicRESTAPI.Standard; - using ThoughtSpotPublicRESTAPI.Standard.Utilities; - - /// - /// TypeEnum. - /// - [JsonConverter(typeof(StringEnumConverter))] - public enum TypeEnum - { - /// - /// ANSWER. - /// - [EnumMember(Value = "ANSWER")] - ANSWER, - - /// - /// LIVEBOARD. - /// - [EnumMember(Value = "LIVEBOARD")] - LIVEBOARD, - - /// - /// DATAOBJECT. - /// - [EnumMember(Value = "DATAOBJECT")] - DATAOBJECT, - - /// - /// CONNECTION. - /// - [EnumMember(Value = "CONNECTION")] - CONNECTION - } -} \ No newline at end of file diff --git a/DotNet/ThoughtSpotPublicRESTAPI.Standard/Models/UserNameAndID.cs b/DotNet/ThoughtSpotPublicRESTAPI.Standard/Models/UserNameAndID.cs deleted file mode 100644 index 5f288bec7..000000000 --- a/DotNet/ThoughtSpotPublicRESTAPI.Standard/Models/UserNameAndID.cs +++ /dev/null @@ -1,94 +0,0 @@ -// -// Copyright (c) APIMatic. All rights reserved. -// -namespace ThoughtSpotPublicRESTAPI.Standard.Models -{ - using System; - using System.Collections.Generic; - using System.ComponentModel; - using System.IO; - using System.Linq; - using System.Text; - using System.Threading.Tasks; - using Newtonsoft.Json; - using Newtonsoft.Json.Converters; - using ThoughtSpotPublicRESTAPI.Standard; - using ThoughtSpotPublicRESTAPI.Standard.Utilities; - - /// - /// UserNameAndID. - /// - public class UserNameAndID - { - /// - /// Initializes a new instance of the class. - /// - public UserNameAndID() - { - } - - /// - /// Initializes a new instance of the class. - /// - /// name. - /// id. - public UserNameAndID( - string name = null, - string id = null) - { - this.Name = name; - this.Id = id; - } - - /// - /// Username of the user - /// - [JsonProperty("name", NullValueHandling = NullValueHandling.Ignore)] - public string Name { get; set; } - - /// - /// GUID of the user - /// - [JsonProperty("id", NullValueHandling = NullValueHandling.Ignore)] - public string Id { get; set; } - - /// - public override string ToString() - { - var toStringOutput = new List(); - - this.ToString(toStringOutput); - - return $"UserNameAndID : ({string.Join(", ", toStringOutput)})"; - } - - /// - public override bool Equals(object obj) - { - if (obj == null) - { - return false; - } - - if (obj == this) - { - return true; - } - - return obj is UserNameAndID other && - ((this.Name == null && other.Name == null) || (this.Name?.Equals(other.Name) == true)) && - ((this.Id == null && other.Id == null) || (this.Id?.Equals(other.Id) == true)); - } - - - /// - /// ToString overload. - /// - /// List of strings. - protected void ToString(List toStringOutput) - { - toStringOutput.Add($"this.Name = {(this.Name == null ? "null" : this.Name == string.Empty ? "" : this.Name)}"); - toStringOutput.Add($"this.Id = {(this.Id == null ? "null" : this.Id == string.Empty ? "" : this.Id)}"); - } - } -} \ No newline at end of file diff --git a/DotNet/ThoughtSpotPublicRESTAPI.Standard/Models/UserNameAndIDInput.cs b/DotNet/ThoughtSpotPublicRESTAPI.Standard/Models/UserNameAndIDInput.cs deleted file mode 100644 index ce85f64e6..000000000 --- a/DotNet/ThoughtSpotPublicRESTAPI.Standard/Models/UserNameAndIDInput.cs +++ /dev/null @@ -1,94 +0,0 @@ -// -// Copyright (c) APIMatic. All rights reserved. -// -namespace ThoughtSpotPublicRESTAPI.Standard.Models -{ - using System; - using System.Collections.Generic; - using System.ComponentModel; - using System.IO; - using System.Linq; - using System.Text; - using System.Threading.Tasks; - using Newtonsoft.Json; - using Newtonsoft.Json.Converters; - using ThoughtSpotPublicRESTAPI.Standard; - using ThoughtSpotPublicRESTAPI.Standard.Utilities; - - /// - /// UserNameAndIDInput. - /// - public class UserNameAndIDInput - { - /// - /// Initializes a new instance of the class. - /// - public UserNameAndIDInput() - { - } - - /// - /// Initializes a new instance of the class. - /// - /// name. - /// id. - public UserNameAndIDInput( - string name = null, - string id = null) - { - this.Name = name; - this.Id = id; - } - - /// - /// Username of the user - /// - [JsonProperty("name", NullValueHandling = NullValueHandling.Ignore)] - public string Name { get; set; } - - /// - /// GUID of the user - /// - [JsonProperty("id", NullValueHandling = NullValueHandling.Ignore)] - public string Id { get; set; } - - /// - public override string ToString() - { - var toStringOutput = new List(); - - this.ToString(toStringOutput); - - return $"UserNameAndIDInput : ({string.Join(", ", toStringOutput)})"; - } - - /// - public override bool Equals(object obj) - { - if (obj == null) - { - return false; - } - - if (obj == this) - { - return true; - } - - return obj is UserNameAndIDInput other && - ((this.Name == null && other.Name == null) || (this.Name?.Equals(other.Name) == true)) && - ((this.Id == null && other.Id == null) || (this.Id?.Equals(other.Id) == true)); - } - - - /// - /// ToString overload. - /// - /// List of strings. - protected void ToString(List toStringOutput) - { - toStringOutput.Add($"this.Name = {(this.Name == null ? "null" : this.Name == string.Empty ? "" : this.Name)}"); - toStringOutput.Add($"this.Id = {(this.Id == null ? "null" : this.Id == string.Empty ? "" : this.Id)}"); - } - } -} \ No newline at end of file diff --git a/DotNet/ThoughtSpotPublicRESTAPI.Standard/Models/UserResponse.cs b/DotNet/ThoughtSpotPublicRESTAPI.Standard/Models/UserResponse.cs deleted file mode 100644 index e4e09a3d4..000000000 --- a/DotNet/ThoughtSpotPublicRESTAPI.Standard/Models/UserResponse.cs +++ /dev/null @@ -1,425 +0,0 @@ -// -// Copyright (c) APIMatic. All rights reserved. -// -namespace ThoughtSpotPublicRESTAPI.Standard.Models -{ - using System; - using System.Collections.Generic; - using System.ComponentModel; - using System.IO; - using System.Linq; - using System.Text; - using System.Threading.Tasks; - using Newtonsoft.Json; - using Newtonsoft.Json.Converters; - using ThoughtSpotPublicRESTAPI.Standard; - using ThoughtSpotPublicRESTAPI.Standard.Utilities; - - /// - /// UserResponse. - /// - public class UserResponse - { - /// - /// Initializes a new instance of the class. - /// - public UserResponse() - { - } - - /// - /// Initializes a new instance of the class. - /// - /// name. - /// displayName. - /// id. - /// visibility. - /// mail. - /// groups. - /// privileges. - /// orgs. - /// tags. - /// state. - /// notifyOnShare. - /// showWalkMe. - /// analystOnboardingComplete. - /// firstLogin. - /// welcomeEmailSent. - /// isDeleted. - /// isHidden. - /// isExternal. - /// isDeprecated. - /// complete. - /// isSuperUser. - /// isSystemPrincipal. - /// type. - /// parenttype. - /// tenantId. - /// indexVersion. - /// generationNum. - /// created. - /// modified. - /// author. - /// modifiedBy. - /// owner. - public UserResponse( - string name = null, - string displayName = null, - string id = null, - string visibility = null, - string mail = null, - List groups = null, - List privileges = null, - List orgs = null, - List tags = null, - string state = null, - bool? notifyOnShare = null, - bool? showWalkMe = null, - bool? analystOnboardingComplete = null, - int? firstLogin = null, - bool? welcomeEmailSent = null, - bool? isDeleted = null, - bool? isHidden = null, - bool? isExternal = null, - bool? isDeprecated = null, - bool? complete = null, - bool? isSuperUser = null, - bool? isSystemPrincipal = null, - string type = null, - string parenttype = null, - string tenantId = null, - double? indexVersion = null, - double? generationNum = null, - double? created = null, - double? modified = null, - Models.UserNameAndID author = null, - Models.UserNameAndID modifiedBy = null, - Models.UserNameAndID owner = null) - { - this.Name = name; - this.DisplayName = displayName; - this.Id = id; - this.Visibility = visibility; - this.Mail = mail; - this.Groups = groups; - this.Privileges = privileges; - this.Orgs = orgs; - this.Tags = tags; - this.State = state; - this.NotifyOnShare = notifyOnShare; - this.ShowWalkMe = showWalkMe; - this.AnalystOnboardingComplete = analystOnboardingComplete; - this.FirstLogin = firstLogin; - this.WelcomeEmailSent = welcomeEmailSent; - this.IsDeleted = isDeleted; - this.IsHidden = isHidden; - this.IsExternal = isExternal; - this.IsDeprecated = isDeprecated; - this.Complete = complete; - this.IsSuperUser = isSuperUser; - this.IsSystemPrincipal = isSystemPrincipal; - this.Type = type; - this.Parenttype = parenttype; - this.TenantId = tenantId; - this.IndexVersion = indexVersion; - this.GenerationNum = generationNum; - this.Created = created; - this.Modified = modified; - this.Author = author; - this.ModifiedBy = modifiedBy; - this.Owner = owner; - } - - /// - /// Username of the user account - /// - [JsonProperty("name", NullValueHandling = NullValueHandling.Ignore)] - public string Name { get; set; } - - /// - /// Display name of the user account - /// - [JsonProperty("displayName", NullValueHandling = NullValueHandling.Ignore)] - public string DisplayName { get; set; } - - /// - /// GUID of the user account - /// - [JsonProperty("id", NullValueHandling = NullValueHandling.Ignore)] - public string Id { get; set; } - - /// - /// Visibility of the user account - /// - [JsonProperty("visibility", NullValueHandling = NullValueHandling.Ignore)] - public string Visibility { get; set; } - - /// - /// Email of the user account - /// - [JsonProperty("mail", NullValueHandling = NullValueHandling.Ignore)] - public string Mail { get; set; } - - /// - /// Name of the group to which user account is added - /// - [JsonProperty("groups", NullValueHandling = NullValueHandling.Ignore)] - public List Groups { get; set; } - - /// - /// Privileges assigned to user account - /// - [JsonProperty("privileges", NullValueHandling = NullValueHandling.Ignore)] - public List Privileges { get; set; } - - /// - /// The organizations that user belongs to - /// - [JsonProperty("orgs", NullValueHandling = NullValueHandling.Ignore)] - public List Orgs { get; set; } - - /// - /// Tags assigned to the user - /// - [JsonProperty("tags", NullValueHandling = NullValueHandling.Ignore)] - public List Tags { get; set; } - - /// - /// Indicates if the user account is active or inactive - /// - [JsonProperty("state", NullValueHandling = NullValueHandling.Ignore)] - public string State { get; set; } - - /// - /// Indicates if the email should be sent when object is shared with the user - /// - [JsonProperty("notifyOnShare", NullValueHandling = NullValueHandling.Ignore)] - public bool? NotifyOnShare { get; set; } - - /// - /// Indicates if the walk me should be shown when logging in - /// - [JsonProperty("showWalkMe", NullValueHandling = NullValueHandling.Ignore)] - public bool? ShowWalkMe { get; set; } - - /// - /// Indicates if the onboarding is completed for the user - /// - [JsonProperty("analystOnboardingComplete", NullValueHandling = NullValueHandling.Ignore)] - public bool? AnalystOnboardingComplete { get; set; } - - /// - /// Indicates if the use is logging in for the first time - /// - [JsonProperty("firstLogin", NullValueHandling = NullValueHandling.Ignore)] - public int? FirstLogin { get; set; } - - /// - /// Indicates if the welcome email is sent to email associated with the user account - /// - [JsonProperty("welcomeEmailSent", NullValueHandling = NullValueHandling.Ignore)] - public bool? WelcomeEmailSent { get; set; } - - /// - /// Indicates if the user account is deleted - /// - [JsonProperty("isDeleted", NullValueHandling = NullValueHandling.Ignore)] - public bool? IsDeleted { get; set; } - - /// - /// Indicates if the user account is hidden - /// - [JsonProperty("isHidden", NullValueHandling = NullValueHandling.Ignore)] - public bool? IsHidden { get; set; } - - /// - /// Indicates if the user account is from external system - /// isDeprecated - /// - [JsonProperty("isExternal", NullValueHandling = NullValueHandling.Ignore)] - public bool? IsExternal { get; set; } - - /// - /// Gets or sets IsDeprecated. - /// - [JsonProperty("isDeprecated", NullValueHandling = NullValueHandling.Ignore)] - public bool? IsDeprecated { get; set; } - - /// - /// Indicates if the all the properties of user account is provided - /// - [JsonProperty("complete", NullValueHandling = NullValueHandling.Ignore)] - public bool? Complete { get; set; } - - /// - /// Indicates if the user account is super user - /// - [JsonProperty("isSuperUser", NullValueHandling = NullValueHandling.Ignore)] - public bool? IsSuperUser { get; set; } - - /// - /// Indicates if the user account is system principal - /// - [JsonProperty("isSystemPrincipal", NullValueHandling = NullValueHandling.Ignore)] - public bool? IsSystemPrincipal { get; set; } - - /// - /// Indicates the type of user account - /// - [JsonProperty("type", NullValueHandling = NullValueHandling.Ignore)] - public string Type { get; set; } - - /// - /// Indicates the type of parent object - /// - [JsonProperty("parenttype", NullValueHandling = NullValueHandling.Ignore)] - public string Parenttype { get; set; } - - /// - /// Tenant id associated with the user account - /// - [JsonProperty("tenantId", NullValueHandling = NullValueHandling.Ignore)] - public string TenantId { get; set; } - - /// - /// Gets or sets IndexVersion. - /// - [JsonProperty("indexVersion", NullValueHandling = NullValueHandling.Ignore)] - public double? IndexVersion { get; set; } - - /// - /// Gets or sets GenerationNum. - /// - [JsonProperty("generationNum", NullValueHandling = NullValueHandling.Ignore)] - public double? GenerationNum { get; set; } - - /// - /// Date and time when user account was created - /// - [JsonProperty("created", NullValueHandling = NullValueHandling.Ignore)] - public double? Created { get; set; } - - /// - /// Date and time of last modification of user account - /// - [JsonProperty("modified", NullValueHandling = NullValueHandling.Ignore)] - public double? Modified { get; set; } - - /// - /// Gets or sets Author. - /// - [JsonProperty("author", NullValueHandling = NullValueHandling.Ignore)] - public Models.UserNameAndID Author { get; set; } - - /// - /// Gets or sets ModifiedBy. - /// - [JsonProperty("modifiedBy", NullValueHandling = NullValueHandling.Ignore)] - public Models.UserNameAndID ModifiedBy { get; set; } - - /// - /// Gets or sets Owner. - /// - [JsonProperty("owner", NullValueHandling = NullValueHandling.Ignore)] - public Models.UserNameAndID Owner { get; set; } - - /// - public override string ToString() - { - var toStringOutput = new List(); - - this.ToString(toStringOutput); - - return $"UserResponse : ({string.Join(", ", toStringOutput)})"; - } - - /// - public override bool Equals(object obj) - { - if (obj == null) - { - return false; - } - - if (obj == this) - { - return true; - } - - return obj is UserResponse other && - ((this.Name == null && other.Name == null) || (this.Name?.Equals(other.Name) == true)) && - ((this.DisplayName == null && other.DisplayName == null) || (this.DisplayName?.Equals(other.DisplayName) == true)) && - ((this.Id == null && other.Id == null) || (this.Id?.Equals(other.Id) == true)) && - ((this.Visibility == null && other.Visibility == null) || (this.Visibility?.Equals(other.Visibility) == true)) && - ((this.Mail == null && other.Mail == null) || (this.Mail?.Equals(other.Mail) == true)) && - ((this.Groups == null && other.Groups == null) || (this.Groups?.Equals(other.Groups) == true)) && - ((this.Privileges == null && other.Privileges == null) || (this.Privileges?.Equals(other.Privileges) == true)) && - ((this.Orgs == null && other.Orgs == null) || (this.Orgs?.Equals(other.Orgs) == true)) && - ((this.Tags == null && other.Tags == null) || (this.Tags?.Equals(other.Tags) == true)) && - ((this.State == null && other.State == null) || (this.State?.Equals(other.State) == true)) && - ((this.NotifyOnShare == null && other.NotifyOnShare == null) || (this.NotifyOnShare?.Equals(other.NotifyOnShare) == true)) && - ((this.ShowWalkMe == null && other.ShowWalkMe == null) || (this.ShowWalkMe?.Equals(other.ShowWalkMe) == true)) && - ((this.AnalystOnboardingComplete == null && other.AnalystOnboardingComplete == null) || (this.AnalystOnboardingComplete?.Equals(other.AnalystOnboardingComplete) == true)) && - ((this.FirstLogin == null && other.FirstLogin == null) || (this.FirstLogin?.Equals(other.FirstLogin) == true)) && - ((this.WelcomeEmailSent == null && other.WelcomeEmailSent == null) || (this.WelcomeEmailSent?.Equals(other.WelcomeEmailSent) == true)) && - ((this.IsDeleted == null && other.IsDeleted == null) || (this.IsDeleted?.Equals(other.IsDeleted) == true)) && - ((this.IsHidden == null && other.IsHidden == null) || (this.IsHidden?.Equals(other.IsHidden) == true)) && - ((this.IsExternal == null && other.IsExternal == null) || (this.IsExternal?.Equals(other.IsExternal) == true)) && - ((this.IsDeprecated == null && other.IsDeprecated == null) || (this.IsDeprecated?.Equals(other.IsDeprecated) == true)) && - ((this.Complete == null && other.Complete == null) || (this.Complete?.Equals(other.Complete) == true)) && - ((this.IsSuperUser == null && other.IsSuperUser == null) || (this.IsSuperUser?.Equals(other.IsSuperUser) == true)) && - ((this.IsSystemPrincipal == null && other.IsSystemPrincipal == null) || (this.IsSystemPrincipal?.Equals(other.IsSystemPrincipal) == true)) && - ((this.Type == null && other.Type == null) || (this.Type?.Equals(other.Type) == true)) && - ((this.Parenttype == null && other.Parenttype == null) || (this.Parenttype?.Equals(other.Parenttype) == true)) && - ((this.TenantId == null && other.TenantId == null) || (this.TenantId?.Equals(other.TenantId) == true)) && - ((this.IndexVersion == null && other.IndexVersion == null) || (this.IndexVersion?.Equals(other.IndexVersion) == true)) && - ((this.GenerationNum == null && other.GenerationNum == null) || (this.GenerationNum?.Equals(other.GenerationNum) == true)) && - ((this.Created == null && other.Created == null) || (this.Created?.Equals(other.Created) == true)) && - ((this.Modified == null && other.Modified == null) || (this.Modified?.Equals(other.Modified) == true)) && - ((this.Author == null && other.Author == null) || (this.Author?.Equals(other.Author) == true)) && - ((this.ModifiedBy == null && other.ModifiedBy == null) || (this.ModifiedBy?.Equals(other.ModifiedBy) == true)) && - ((this.Owner == null && other.Owner == null) || (this.Owner?.Equals(other.Owner) == true)); - } - - - /// - /// ToString overload. - /// - /// List of strings. - protected void ToString(List toStringOutput) - { - toStringOutput.Add($"this.Name = {(this.Name == null ? "null" : this.Name == string.Empty ? "" : this.Name)}"); - toStringOutput.Add($"this.DisplayName = {(this.DisplayName == null ? "null" : this.DisplayName == string.Empty ? "" : this.DisplayName)}"); - toStringOutput.Add($"this.Id = {(this.Id == null ? "null" : this.Id == string.Empty ? "" : this.Id)}"); - toStringOutput.Add($"this.Visibility = {(this.Visibility == null ? "null" : this.Visibility == string.Empty ? "" : this.Visibility)}"); - toStringOutput.Add($"this.Mail = {(this.Mail == null ? "null" : this.Mail == string.Empty ? "" : this.Mail)}"); - toStringOutput.Add($"this.Groups = {(this.Groups == null ? "null" : $"[{string.Join(", ", this.Groups)} ]")}"); - toStringOutput.Add($"this.Privileges = {(this.Privileges == null ? "null" : $"[{string.Join(", ", this.Privileges)} ]")}"); - toStringOutput.Add($"this.Orgs = {(this.Orgs == null ? "null" : $"[{string.Join(", ", this.Orgs)} ]")}"); - toStringOutput.Add($"this.Tags = {(this.Tags == null ? "null" : $"[{string.Join(", ", this.Tags)} ]")}"); - toStringOutput.Add($"this.State = {(this.State == null ? "null" : this.State == string.Empty ? "" : this.State)}"); - toStringOutput.Add($"this.NotifyOnShare = {(this.NotifyOnShare == null ? "null" : this.NotifyOnShare.ToString())}"); - toStringOutput.Add($"this.ShowWalkMe = {(this.ShowWalkMe == null ? "null" : this.ShowWalkMe.ToString())}"); - toStringOutput.Add($"this.AnalystOnboardingComplete = {(this.AnalystOnboardingComplete == null ? "null" : this.AnalystOnboardingComplete.ToString())}"); - toStringOutput.Add($"this.FirstLogin = {(this.FirstLogin == null ? "null" : this.FirstLogin.ToString())}"); - toStringOutput.Add($"this.WelcomeEmailSent = {(this.WelcomeEmailSent == null ? "null" : this.WelcomeEmailSent.ToString())}"); - toStringOutput.Add($"this.IsDeleted = {(this.IsDeleted == null ? "null" : this.IsDeleted.ToString())}"); - toStringOutput.Add($"this.IsHidden = {(this.IsHidden == null ? "null" : this.IsHidden.ToString())}"); - toStringOutput.Add($"this.IsExternal = {(this.IsExternal == null ? "null" : this.IsExternal.ToString())}"); - toStringOutput.Add($"this.IsDeprecated = {(this.IsDeprecated == null ? "null" : this.IsDeprecated.ToString())}"); - toStringOutput.Add($"this.Complete = {(this.Complete == null ? "null" : this.Complete.ToString())}"); - toStringOutput.Add($"this.IsSuperUser = {(this.IsSuperUser == null ? "null" : this.IsSuperUser.ToString())}"); - toStringOutput.Add($"this.IsSystemPrincipal = {(this.IsSystemPrincipal == null ? "null" : this.IsSystemPrincipal.ToString())}"); - toStringOutput.Add($"this.Type = {(this.Type == null ? "null" : this.Type == string.Empty ? "" : this.Type)}"); - toStringOutput.Add($"this.Parenttype = {(this.Parenttype == null ? "null" : this.Parenttype == string.Empty ? "" : this.Parenttype)}"); - toStringOutput.Add($"this.TenantId = {(this.TenantId == null ? "null" : this.TenantId == string.Empty ? "" : this.TenantId)}"); - toStringOutput.Add($"this.IndexVersion = {(this.IndexVersion == null ? "null" : this.IndexVersion.ToString())}"); - toStringOutput.Add($"this.GenerationNum = {(this.GenerationNum == null ? "null" : this.GenerationNum.ToString())}"); - toStringOutput.Add($"this.Created = {(this.Created == null ? "null" : this.Created.ToString())}"); - toStringOutput.Add($"this.Modified = {(this.Modified == null ? "null" : this.Modified.ToString())}"); - toStringOutput.Add($"this.Author = {(this.Author == null ? "null" : this.Author.ToString())}"); - toStringOutput.Add($"this.ModifiedBy = {(this.ModifiedBy == null ? "null" : this.ModifiedBy.ToString())}"); - toStringOutput.Add($"this.Owner = {(this.Owner == null ? "null" : this.Owner.ToString())}"); - } - } -} \ No newline at end of file diff --git a/DotNet/ThoughtSpotPublicRESTAPI.Standard/Models/Visibility1Enum.cs b/DotNet/ThoughtSpotPublicRESTAPI.Standard/Models/Visibility1Enum.cs deleted file mode 100644 index b1f29a522..000000000 --- a/DotNet/ThoughtSpotPublicRESTAPI.Standard/Models/Visibility1Enum.cs +++ /dev/null @@ -1,39 +0,0 @@ -// -// Copyright (c) APIMatic. All rights reserved. -// -namespace ThoughtSpotPublicRESTAPI.Standard.Models -{ - using System; - using System.Collections.Generic; - using System.Linq; - using System.Runtime.Serialization; - using Newtonsoft.Json; - using Newtonsoft.Json.Converters; - using ThoughtSpotPublicRESTAPI.Standard; - using ThoughtSpotPublicRESTAPI.Standard.Utilities; - - /// - /// Visibility1Enum. - /// - [JsonConverter(typeof(StringEnumConverter))] - public enum Visibility1Enum - { - /// - /// DEFAULT. - /// - [EnumMember(Value = "DEFAULT")] - DEFAULT, - - /// - /// NONSHARABLE. - /// - [EnumMember(Value = "NON_SHARABLE")] - NONSHARABLE, - - /// - /// SHARABLE. - /// - [EnumMember(Value = "SHARABLE")] - SHARABLE - } -} \ No newline at end of file diff --git a/DotNet/ThoughtSpotPublicRESTAPI.Standard/Models/Visibility2Enum.cs b/DotNet/ThoughtSpotPublicRESTAPI.Standard/Models/Visibility2Enum.cs deleted file mode 100644 index 14e438cc1..000000000 --- a/DotNet/ThoughtSpotPublicRESTAPI.Standard/Models/Visibility2Enum.cs +++ /dev/null @@ -1,39 +0,0 @@ -// -// Copyright (c) APIMatic. All rights reserved. -// -namespace ThoughtSpotPublicRESTAPI.Standard.Models -{ - using System; - using System.Collections.Generic; - using System.Linq; - using System.Runtime.Serialization; - using Newtonsoft.Json; - using Newtonsoft.Json.Converters; - using ThoughtSpotPublicRESTAPI.Standard; - using ThoughtSpotPublicRESTAPI.Standard.Utilities; - - /// - /// Visibility2Enum. - /// - [JsonConverter(typeof(StringEnumConverter))] - public enum Visibility2Enum - { - /// - /// DEFAULT. - /// - [EnumMember(Value = "DEFAULT")] - DEFAULT, - - /// - /// NONSHARABLE. - /// - [EnumMember(Value = "NON_SHARABLE")] - NONSHARABLE, - - /// - /// SHARABLE. - /// - [EnumMember(Value = "SHARABLE")] - SHARABLE - } -} \ No newline at end of file diff --git a/DotNet/ThoughtSpotPublicRESTAPI.Standard/Models/VisibilityEnum.cs b/DotNet/ThoughtSpotPublicRESTAPI.Standard/Models/VisibilityEnum.cs deleted file mode 100644 index 901c6db47..000000000 --- a/DotNet/ThoughtSpotPublicRESTAPI.Standard/Models/VisibilityEnum.cs +++ /dev/null @@ -1,39 +0,0 @@ -// -// Copyright (c) APIMatic. All rights reserved. -// -namespace ThoughtSpotPublicRESTAPI.Standard.Models -{ - using System; - using System.Collections.Generic; - using System.Linq; - using System.Runtime.Serialization; - using Newtonsoft.Json; - using Newtonsoft.Json.Converters; - using ThoughtSpotPublicRESTAPI.Standard; - using ThoughtSpotPublicRESTAPI.Standard.Utilities; - - /// - /// VisibilityEnum. - /// - [JsonConverter(typeof(StringEnumConverter))] - public enum VisibilityEnum - { - /// - /// DEFAULT. - /// - [EnumMember(Value = "DEFAULT")] - DEFAULT, - - /// - /// NONSHARABLE. - /// - [EnumMember(Value = "NON_SHARABLE")] - NONSHARABLE, - - /// - /// SHARABLE. - /// - [EnumMember(Value = "SHARABLE")] - SHARABLE - } -} \ No newline at end of file diff --git a/DotNet/ThoughtSpotPublicRESTAPI.Standard/Models/VizType.cs b/DotNet/ThoughtSpotPublicRESTAPI.Standard/Models/VizType.cs deleted file mode 100644 index 4d14a084a..000000000 --- a/DotNet/ThoughtSpotPublicRESTAPI.Standard/Models/VizType.cs +++ /dev/null @@ -1,105 +0,0 @@ -// -// Copyright (c) APIMatic. All rights reserved. -// -namespace ThoughtSpotPublicRESTAPI.Standard.Models -{ - using System; - using System.Collections.Generic; - using System.ComponentModel; - using System.IO; - using System.Linq; - using System.Text; - using System.Threading.Tasks; - using Newtonsoft.Json; - using Newtonsoft.Json.Converters; - using ThoughtSpotPublicRESTAPI.Standard; - using ThoughtSpotPublicRESTAPI.Standard.Utilities; - - /// - /// VizType. - /// - public class VizType - { - /// - /// Initializes a new instance of the class. - /// - public VizType() - { - } - - /// - /// Initializes a new instance of the class. - /// - /// name. - /// id. - /// querySql. - public VizType( - string name = null, - string id = null, - string querySql = null) - { - this.Name = name; - this.Id = id; - this.QuerySql = querySql; - } - - /// - /// The name of the visualization - /// - [JsonProperty("name", NullValueHandling = NullValueHandling.Ignore)] - public string Name { get; set; } - - /// - /// The GUID of the visualization - /// - [JsonProperty("id", NullValueHandling = NullValueHandling.Ignore)] - public string Id { get; set; } - - /// - /// SQL query associated with the visualization - /// - [JsonProperty("querySql", NullValueHandling = NullValueHandling.Ignore)] - public string QuerySql { get; set; } - - /// - public override string ToString() - { - var toStringOutput = new List(); - - this.ToString(toStringOutput); - - return $"VizType : ({string.Join(", ", toStringOutput)})"; - } - - /// - public override bool Equals(object obj) - { - if (obj == null) - { - return false; - } - - if (obj == this) - { - return true; - } - - return obj is VizType other && - ((this.Name == null && other.Name == null) || (this.Name?.Equals(other.Name) == true)) && - ((this.Id == null && other.Id == null) || (this.Id?.Equals(other.Id) == true)) && - ((this.QuerySql == null && other.QuerySql == null) || (this.QuerySql?.Equals(other.QuerySql) == true)); - } - - - /// - /// ToString overload. - /// - /// List of strings. - protected void ToString(List toStringOutput) - { - toStringOutput.Add($"this.Name = {(this.Name == null ? "null" : this.Name == string.Empty ? "" : this.Name)}"); - toStringOutput.Add($"this.Id = {(this.Id == null ? "null" : this.Id == string.Empty ? "" : this.Id)}"); - toStringOutput.Add($"this.QuerySql = {(this.QuerySql == null ? "null" : this.QuerySql == string.Empty ? "" : this.QuerySql)}"); - } - } -} \ No newline at end of file diff --git a/DotNet/ThoughtSpotPublicRESTAPI.Standard/Server.cs b/DotNet/ThoughtSpotPublicRESTAPI.Standard/Server.cs deleted file mode 100644 index b6ecf45e0..000000000 --- a/DotNet/ThoughtSpotPublicRESTAPI.Standard/Server.cs +++ /dev/null @@ -1,16 +0,0 @@ -// -// Copyright (c) APIMatic. All rights reserved. -// -namespace ThoughtSpotPublicRESTAPI.Standard -{ - /// - /// Available servers. - /// - public enum Server - { - /// - /// Default. - /// - Default, - } -} diff --git a/DotNet/ThoughtSpotPublicRESTAPI.Standard/ThoughtSpotPublicRESTAPI.Standard.csproj b/DotNet/ThoughtSpotPublicRESTAPI.Standard/ThoughtSpotPublicRESTAPI.Standard.csproj deleted file mode 100644 index 397eb2cd1..000000000 --- a/DotNet/ThoughtSpotPublicRESTAPI.Standard/ThoughtSpotPublicRESTAPI.Standard.csproj +++ /dev/null @@ -1,39 +0,0 @@ - - - - - - netstandard2.0 - thoughtspot.rest.api.sdk - 1.13.1.0 - - - ThoughtSpotPublicRESTAPI.Standard - Copyright © 2019 - 1.13.1.0 - 1.13.1.0 - .NET client library for the ThoughtSpot Public REST API - 7.3 - true - thoughtspot.rest.api.sdk - README.md - LICENSE - - - - - - - - - <_Parameter1>ThoughtSpotPublicRESTAPI.Tests - - - - - - diff --git a/DotNet/ThoughtSpotPublicRESTAPI.Standard/ThoughtSpotPublicRESTAPIClient.cs b/DotNet/ThoughtSpotPublicRESTAPI.Standard/ThoughtSpotPublicRESTAPIClient.cs deleted file mode 100644 index 230f42b6d..000000000 --- a/DotNet/ThoughtSpotPublicRESTAPI.Standard/ThoughtSpotPublicRESTAPIClient.cs +++ /dev/null @@ -1,422 +0,0 @@ -// -// Copyright (c) APIMatic. All rights reserved. -// -namespace ThoughtSpotPublicRESTAPI.Standard -{ - using System; - using System.Collections.Generic; - using System.Linq; - using System.Net; - using System.Text; - using ThoughtSpotPublicRESTAPI.Standard.Authentication; - using ThoughtSpotPublicRESTAPI.Standard.Controllers; - using ThoughtSpotPublicRESTAPI.Standard.Http.Client; - using ThoughtSpotPublicRESTAPI.Standard.Utilities; - - /// - /// The gateway for the SDK. This class acts as a factory for Controller and - /// holds the configuration of the SDK. - /// - public sealed class ThoughtSpotPublicRESTAPIClient : IConfiguration - { - // A map of environments and their corresponding servers/baseurls - private static readonly Dictionary> EnvironmentsMap = - new Dictionary> - { - { - Environment.Production, new Dictionary - { - { Server.Default, "{base-url}" }, - } - }, - }; - - private readonly IDictionary authManagers; - private readonly IHttpClient httpClient; - private readonly HttpCallBack httpCallBack; - private readonly BearerAuthManager bearerAuthManager; - - private readonly Lazy user; - private readonly Lazy mGroup; - private readonly Lazy metadata; - private readonly Lazy database; - private readonly Lazy connection; - private readonly Lazy data; - private readonly Lazy logs; - private readonly Lazy customActions; - private readonly Lazy security; - private readonly Lazy org; - private readonly Lazy session; - private readonly Lazy admin; - private readonly Lazy report; - private readonly Lazy materialization; - - private ThoughtSpotPublicRESTAPIClient( - Environment environment, - string baseUrl, - string accessToken, - IDictionary authManagers, - IHttpClient httpClient, - HttpCallBack httpCallBack, - IHttpClientConfiguration httpClientConfiguration) - { - this.Environment = environment; - this.BaseUrl = baseUrl; - this.httpCallBack = httpCallBack; - this.httpClient = httpClient; - this.authManagers = (authManagers == null) ? new Dictionary() : new Dictionary(authManagers); - this.HttpClientConfiguration = httpClientConfiguration; - - this.user = new Lazy( - () => new UserController(this, this.httpClient, this.authManagers, this.httpCallBack)); - this.mGroup = new Lazy( - () => new GroupController(this, this.httpClient, this.authManagers, this.httpCallBack)); - this.metadata = new Lazy( - () => new MetadataController(this, this.httpClient, this.authManagers, this.httpCallBack)); - this.database = new Lazy( - () => new DatabaseController(this, this.httpClient, this.authManagers, this.httpCallBack)); - this.connection = new Lazy( - () => new ConnectionController(this, this.httpClient, this.authManagers, this.httpCallBack)); - this.data = new Lazy( - () => new DataController(this, this.httpClient, this.authManagers, this.httpCallBack)); - this.logs = new Lazy( - () => new LogsController(this, this.httpClient, this.authManagers, this.httpCallBack)); - this.customActions = new Lazy( - () => new CustomActionsController(this, this.httpClient, this.authManagers, this.httpCallBack)); - this.security = new Lazy( - () => new SecurityController(this, this.httpClient, this.authManagers, this.httpCallBack)); - this.org = new Lazy( - () => new OrgController(this, this.httpClient, this.authManagers, this.httpCallBack)); - this.session = new Lazy( - () => new SessionController(this, this.httpClient, this.authManagers, this.httpCallBack)); - this.admin = new Lazy( - () => new AdminController(this, this.httpClient, this.authManagers, this.httpCallBack)); - this.report = new Lazy( - () => new ReportController(this, this.httpClient, this.authManagers, this.httpCallBack)); - this.materialization = new Lazy( - () => new MaterializationController(this, this.httpClient, this.authManagers, this.httpCallBack)); - - if (this.authManagers.ContainsKey("global")) - { - this.bearerAuthManager = (BearerAuthManager)this.authManagers["global"]; - } - - if (!this.authManagers.ContainsKey("global") - || !this.BearerAuthCredentials.Equals(accessToken)) - { - this.bearerAuthManager = new BearerAuthManager(accessToken); - this.authManagers["global"] = this.bearerAuthManager; - } - } - - /// - /// Gets UserController controller. - /// - public UserController UserController => this.user.Value; - - /// - /// Gets GroupController controller. - /// - public GroupController GroupController => this.mGroup.Value; - - /// - /// Gets MetadataController controller. - /// - public MetadataController MetadataController => this.metadata.Value; - - /// - /// Gets DatabaseController controller. - /// - public DatabaseController DatabaseController => this.database.Value; - - /// - /// Gets ConnectionController controller. - /// - public ConnectionController ConnectionController => this.connection.Value; - - /// - /// Gets DataController controller. - /// - public DataController DataController => this.data.Value; - - /// - /// Gets LogsController controller. - /// - public LogsController LogsController => this.logs.Value; - - /// - /// Gets CustomActionsController controller. - /// - public CustomActionsController CustomActionsController => this.customActions.Value; - - /// - /// Gets SecurityController controller. - /// - public SecurityController SecurityController => this.security.Value; - - /// - /// Gets OrgController controller. - /// - public OrgController OrgController => this.org.Value; - - /// - /// Gets SessionController controller. - /// - public SessionController SessionController => this.session.Value; - - /// - /// Gets AdminController controller. - /// - public AdminController AdminController => this.admin.Value; - - /// - /// Gets ReportController controller. - /// - public ReportController ReportController => this.report.Value; - - /// - /// Gets MaterializationController controller. - /// - public MaterializationController MaterializationController => this.materialization.Value; - - /// - /// Gets the configuration of the Http Client associated with this client. - /// - public IHttpClientConfiguration HttpClientConfiguration { get; } - - /// - /// Gets Environment. - /// Current API environment. - /// - public Environment Environment { get; } - - /// - /// Gets BaseUrl. - /// BaseUrl value. - /// - public string BaseUrl { get; } - - /// - /// Gets auth managers. - /// - internal IDictionary AuthManagers => this.authManagers; - - /// - /// Gets http client. - /// - internal IHttpClient HttpClient => this.httpClient; - - /// - /// Gets http callback. - /// - internal HttpCallBack HttpCallBack => this.httpCallBack; - - /// - /// Gets the credentials to use with BearerAuth. - /// - private IBearerAuthCredentials BearerAuthCredentials => this.bearerAuthManager; - - /// - /// Gets the access token to use with OAuth 2 authentication. - /// - public string AccessToken => this.BearerAuthCredentials.AccessToken; - - /// - /// Gets the URL for a particular alias in the current environment and appends - /// it with template parameters. - /// - /// Default value:DEFAULT. - /// Returns the baseurl. - public string GetBaseUri(Server alias = Server.Default) - { - StringBuilder url = new StringBuilder(EnvironmentsMap[this.Environment][alias]); - ApiHelper.AppendUrlWithTemplateParameters(url, this.GetBaseUriParameters()); - - return url.ToString(); - } - - /// - /// Creates an object of the ThoughtSpotPublicRESTAPIClient using the values provided for the builder. - /// - /// Builder. - public Builder ToBuilder() - { - Builder builder = new Builder() - .Environment(this.Environment) - .BaseUrl(this.BaseUrl) - .AccessToken(this.BearerAuthCredentials.AccessToken) - .HttpCallBack(this.httpCallBack) - .HttpClient(this.httpClient) - .AuthManagers(this.authManagers) - .HttpClientConfig(config => config.Build()); - - return builder; - } - - /// - public override string ToString() - { - return - $"Environment = {this.Environment}, " + - $"BaseUrl = {this.BaseUrl}, " + - $"HttpClientConfiguration = {this.HttpClientConfiguration}, "; - } - - /// - /// Creates the client using builder. - /// - /// ThoughtSpotPublicRESTAPIClient. - internal static ThoughtSpotPublicRESTAPIClient CreateFromEnvironment() - { - var builder = new Builder(); - - string environment = System.Environment.GetEnvironmentVariable("THOUGHT_SPOT_PUBLIC_RESTAPI_STANDARD_ENVIRONMENT"); - string baseUrl = System.Environment.GetEnvironmentVariable("THOUGHT_SPOT_PUBLIC_RESTAPI_STANDARD_BASE_URL"); - string accessToken = System.Environment.GetEnvironmentVariable("THOUGHT_SPOT_PUBLIC_RESTAPI_STANDARD_ACCESS_TOKEN"); - - if (environment != null) - { - builder.Environment(ApiHelper.JsonDeserialize($"\"{environment}\"")); - } - - if (baseUrl != null) - { - builder.BaseUrl(baseUrl); - } - - if (accessToken != null) - { - builder.AccessToken(accessToken); - } - - return builder.Build(); - } - - /// - /// Makes a list of the BaseURL parameters. - /// - /// Returns the parameters list. - private List> GetBaseUriParameters() - { - List> kvpList = new List>() - { - new KeyValuePair("base-url", this.BaseUrl), - }; - return kvpList; - } - - /// - /// Builder class. - /// - public class Builder - { - private Environment environment = ThoughtSpotPublicRESTAPI.Standard.Environment.Production; - private string baseUrl = "https://localhost:443"; - private string accessToken = ""; - private IDictionary authManagers = new Dictionary(); - private HttpClientConfiguration.Builder httpClientConfig = new HttpClientConfiguration.Builder(); - private IHttpClient httpClient; - private HttpCallBack httpCallBack; - - /// - /// Sets credentials for BearerAuth. - /// - /// AccessToken. - /// Builder. - public Builder AccessToken(string accessToken) - { - this.accessToken = accessToken ?? throw new ArgumentNullException(nameof(accessToken)); - return this; - } - - /// - /// Sets Environment. - /// - /// Environment. - /// Builder. - public Builder Environment(Environment environment) - { - this.environment = environment; - return this; - } - - /// - /// Sets BaseUrl. - /// - /// BaseUrl. - /// Builder. - public Builder BaseUrl(string baseUrl) - { - this.baseUrl = baseUrl ?? throw new ArgumentNullException(nameof(baseUrl)); - return this; - } - - /// - /// Sets HttpClientConfig. - /// - /// Action. - /// Builder. - public Builder HttpClientConfig(Action action) - { - if (action is null) - { - throw new ArgumentNullException(nameof(action)); - } - - action(this.httpClientConfig); - return this; - } - - /// - /// Sets the IHttpClient for the Builder. - /// - /// http client. - /// Builder. - internal Builder HttpClient(IHttpClient httpClient) - { - this.httpClient = httpClient ?? throw new ArgumentNullException(nameof(httpClient)); - return this; - } - - /// - /// Sets the authentication managers for the Builder. - /// - /// auth managers. - /// Builder. - internal Builder AuthManagers(IDictionary authManagers) - { - this.authManagers = authManagers ?? throw new ArgumentNullException(nameof(authManagers)); - return this; - } - - /// - /// Sets the HttpCallBack for the Builder. - /// - /// http callback. - /// Builder. - internal Builder HttpCallBack(HttpCallBack httpCallBack) - { - this.httpCallBack = httpCallBack; - return this; - } - - /// - /// Creates an object of the ThoughtSpotPublicRESTAPIClient using the values provided for the builder. - /// - /// ThoughtSpotPublicRESTAPIClient. - public ThoughtSpotPublicRESTAPIClient Build() - { - this.httpClient = new HttpClientWrapper(this.httpClientConfig.Build()); - - return new ThoughtSpotPublicRESTAPIClient( - this.environment, - this.baseUrl, - this.accessToken, - this.authManagers, - this.httpClient, - this.httpCallBack, - this.httpClientConfig.Build()); - } - } - } -} diff --git a/DotNet/ThoughtSpotPublicRESTAPI.Standard/Utilities/ApiHelper.cs b/DotNet/ThoughtSpotPublicRESTAPI.Standard/Utilities/ApiHelper.cs deleted file mode 100644 index 4d87a3cff..000000000 --- a/DotNet/ThoughtSpotPublicRESTAPI.Standard/Utilities/ApiHelper.cs +++ /dev/null @@ -1,654 +0,0 @@ -// -// Copyright (c) APIMatic. All rights reserved. -// -namespace ThoughtSpotPublicRESTAPI.Standard.Utilities -{ - using System; - using System.Collections; - using System.Collections.Generic; - using System.Globalization; - using System.IO; - using System.Linq; - using System.Reflection; - using System.Text; - using System.Text.RegularExpressions; - using System.Threading.Tasks; - using Newtonsoft.Json; - using Newtonsoft.Json.Converters; - using Newtonsoft.Json.Linq; - - /// - /// ApiHelper class contains a bunch of helper methods. - /// - public static class ApiHelper - { - /// - /// DateTime format to use for parsing and converting dates. - /// - private static readonly string DateTimeFormat = "yyyy'-'MM'-'dd'T'HH':'mm':'ss.FFFFFFFK"; - - /// - /// JSON Serialization of a given object. - /// - /// The object to serialize into JSON. - /// The converter to use for date time conversion. - /// The serialized Json string representation of the given object. - public static string JsonSerialize(object obj, JsonConverter converter = null) - { - if (obj == null) - { - return null; - } - - var settings = new JsonSerializerSettings() - { - MaxDepth = 128 - }; - - if (converter == null) - { - settings.Converters.Add(new IsoDateTimeConverter()); - } - else - { - settings.Converters.Add(converter); - } - - return JsonConvert.SerializeObject(obj, Formatting.None, settings); - } - - /// - /// JSON Deserialization of the given json string. - /// - /// The json string to deserialize. - /// The converter to use for date time conversion. - /// The type of the object to desialize into. - /// The deserialized object. - public static T JsonDeserialize(string json, JsonConverter converter = null) - { - if (string.IsNullOrWhiteSpace(json)) - { - return default; - } - - if (converter == null) - { - return JsonConvert.DeserializeObject(json, new IsoDateTimeConverter()); - } - else - { - return JsonConvert.DeserializeObject(json, converter); - } - } - - /// - /// Replaces template parameters in the given url. - /// - /// The queryBuilder to replace the template parameters. - /// The parameters to replace in the url. - public static void AppendUrlWithTemplateParameters(StringBuilder queryBuilder, IEnumerable> parameters) - { - // perform parameter validation - if (queryBuilder == null) - { - throw new ArgumentNullException("queryBuilder"); - } - - if (parameters == null) - { - return; - } - - // iterate and replace parameters - foreach (KeyValuePair pair in parameters) - { - string replaceValue = string.Empty; - - // load element value as string - if (pair.Value == null) - { - replaceValue = string.Empty; - } - else if (pair.Value is ICollection) - { - replaceValue = FlattenCollection(pair.Value as ICollection, ArrayDeserialization.None, '/', false); - } - else if (pair.Value is DateTime) - { - replaceValue = ((DateTime)pair.Value).ToString(DateTimeFormat); - } - else if (pair.Value is DateTimeOffset) - { - replaceValue = ((DateTimeOffset)pair.Value).ToString(DateTimeFormat); - } - else - { - replaceValue = pair.Value.ToString(); - } - - replaceValue = Uri.EscapeUriString(replaceValue); - - // find the template parameter and replace it with its value - queryBuilder.Replace(string.Format("{{{0}}}", pair.Key), replaceValue); - } - } - - /// - /// Appends the given set of parameters to the given query string. - /// - /// The queryBuilder to append the parameters. - /// The parameters to append. - /// arrayDeserializationFormat. - /// separator. - public static void AppendUrlWithQueryParameters(StringBuilder queryBuilder, IEnumerable> parameters, ArrayDeserialization arrayDeserializationFormat = ArrayDeserialization.UnIndexed, char separator = '&') - { - // perform parameter validation - if (queryBuilder == null) - { - throw new ArgumentNullException("queryBuilder"); - } - - if (parameters == null) - { - return; - } - - // does the query string already has parameters - bool hasParams = IndexOf(queryBuilder, "?") > 0; - var processedParameters = ProcessQueryParamsForCustomTypes(parameters); - - // iterate and append parameters - foreach (KeyValuePair pair in processedParameters) - { - // if already has parameters, use the & to append new parameters - queryBuilder.Append(hasParams ? '&' : '?'); - - // indicate that now the query has some params - hasParams = true; - - string paramKeyValPair; - - // load element value as string - if (pair.Value is ICollection) - { - paramKeyValPair = FlattenCollection(pair.Value as ICollection, arrayDeserializationFormat, separator, true, Uri.EscapeDataString(pair.Key)); - } - else if (pair.Value is DateTime) - { - paramKeyValPair = string.Format("{0}={1}", Uri.EscapeDataString(pair.Key), ((DateTime)pair.Value).ToString(DateTimeFormat)); - } - else if (pair.Value is DateTimeOffset) - { - paramKeyValPair = string.Format("{0}={1}", Uri.EscapeDataString(pair.Key), ((DateTimeOffset)pair.Value).ToString(DateTimeFormat)); - } - else - { - paramKeyValPair = string.Format("{0}={1}", Uri.EscapeDataString(pair.Key), Uri.EscapeDataString(pair.Value.ToString())); - } - - // append keyval pair for current parameter - queryBuilder.Append(paramKeyValPair); - } - } - - /// - /// Validates and processes the given query Url to clean empty slashes. - /// - /// The given query Url to process. - /// Clean Url as string. - public static string CleanUrl(StringBuilder queryBuilder) - { - // convert to immutable string - string url = queryBuilder.ToString(); - - // ensure that the urls are absolute - Match match = Regex.Match(url, "^https?://[^/]+"); - if (!match.Success) - { - throw new ArgumentException("Invalid Url format."); - } - - // remove redundant forward slashes - int index = url.IndexOf('?'); - string protocol = match.Value; - string query = url.Substring(protocol.Length, (index == -1 ? url.Length : index) - protocol.Length); - query = Regex.Replace(query, "//+", "/"); - string parameters = index == -1 ? string.Empty : url.Substring(index); - - // return process url - return string.Concat(protocol, query, parameters); - } - - /// - /// Prepares parameters for serialization as a form encoded string by flattening complex Types such as Collections and Models to a list of KeyValuePairs, where each value is a string representation of the original Type. - /// - /// name. - /// value. - /// keys. - /// propInfo. - /// arrayDeserializationFormat. - /// List of KeyValuePairs. - public static List> PrepareFormFieldsFromObject(string name, object value, List> keys = null, PropertyInfo propInfo = null, ArrayDeserialization arrayDeserializationFormat = ArrayDeserialization.UnIndexed) - { - keys = keys ?? new List>(); - - if (value == null) - { - return keys; - } - else if (value is Stream) - { - keys.Add(new KeyValuePair(name, value)); - return keys; - } - else if (value is JObject) - { - var valueAccept = value as JObject; - foreach (var property in valueAccept.Properties()) - { - string pKey = property.Name; - object pValue = property.Value; - var fullSubName = name + '[' + pKey + ']'; - PrepareFormFieldsFromObject(fullSubName, pValue, keys, propInfo, arrayDeserializationFormat); - } - } - else if (value is IList) - { - var enumerator = ((IEnumerable)value).GetEnumerator(); - - var hasNested = false; - while (enumerator.MoveNext()) - { - var subValue = enumerator.Current; - if (subValue != null && (subValue is JObject || subValue is IList || subValue is IDictionary || !subValue.GetType().Namespace.StartsWith("System"))) - { - hasNested = true; - break; - } - } - - int i = 0; - enumerator.Reset(); - while (enumerator.MoveNext()) - { - var fullSubName = name + '[' + i + ']'; - if (!hasNested && arrayDeserializationFormat == ArrayDeserialization.UnIndexed) - { - fullSubName = name + "[]"; - } - else if (!hasNested && arrayDeserializationFormat == ArrayDeserialization.Plain) - { - fullSubName = name; - } - - var subValue = enumerator.Current; - if (subValue == null) - { - continue; - } - - PrepareFormFieldsFromObject(fullSubName, subValue, keys, propInfo, arrayDeserializationFormat); - i++; - } - } - else if (value is JToken) - { - keys.Add(new KeyValuePair(name, value.ToString())); - } - else if (value is Enum) - { - var enumValue = JsonSerialize(value).Trim('\"'); - keys.Add(new KeyValuePair(name, enumValue)); - } - else if (value is IDictionary) - { - var obj = (IDictionary)value; - foreach (var sName in obj.Keys) - { - var subName = sName.ToString(); - var subValue = obj[subName]; - string fullSubName = string.IsNullOrWhiteSpace(name) ? subName : name + '[' + subName + ']'; - PrepareFormFieldsFromObject(fullSubName, subValue, keys, propInfo, arrayDeserializationFormat); - } - } - else if (!value.GetType().Namespace.StartsWith("System")) - { - // Custom object Iterate through its properties -#if NETSTANDARD1_3 - var enumerator = value.GetType().GetRuntimeProperties().GetEnumerator(); -#else - var enumerator = value.GetType().GetProperties().GetEnumerator();; -#endif - PropertyInfo pInfo = null; - var t = new JsonPropertyAttribute().GetType(); - while (enumerator.MoveNext()) - { - pInfo = enumerator.Current as PropertyInfo; - - var jsonProperty = (JsonPropertyAttribute)pInfo.GetCustomAttributes(t, true).FirstOrDefault(); - var subName = (jsonProperty != null) ? jsonProperty.PropertyName : pInfo.Name; - string fullSubName = string.IsNullOrWhiteSpace(name) ? subName : name + '[' + subName + ']'; - var subValue = pInfo.GetValue(value, null); - PrepareFormFieldsFromObject(fullSubName, subValue, keys, pInfo, arrayDeserializationFormat); - } - } - else if (value is DateTime) - { - string convertedValue = null; -#if NETSTANDARD1_3 - IEnumerable pInfo = null; -#else - object[] pInfo = null; -#endif - if (propInfo != null) - { - pInfo = propInfo.GetCustomAttributes(true); - } - - if (pInfo != null) - { - foreach (object attr in pInfo) - { - JsonConverterAttribute converterAttr = attr as JsonConverterAttribute; - if (converterAttr != null) - { - convertedValue = JsonSerialize(value, (JsonConverter)Activator.CreateInstance(converterAttr.ConverterType, converterAttr.ConverterParameters)).Replace("\"", string.Empty); - } - } - } - - keys.Add(new KeyValuePair(name, convertedValue ?? ((DateTime)value).ToString(DateTimeFormat))); - } - else - { - keys.Add(new KeyValuePair(name, value)); - } - - return keys; - } - - /// - /// Add/update entries with the new dictionary. - /// - /// first dictionary. - /// second dictionary. - public static void Add(this Dictionary dictionary, Dictionary dictionary2) - { - foreach (var kvp in dictionary2) - { - dictionary[kvp.Key] = kvp.Value; - } - } - - /// - /// Runs asynchronous tasks synchronously and throws the first caught exception. - /// - /// The task to be run synchronously. - public static void RunTaskSynchronously(Task t) - { - try - { - t.Wait(); - } - catch (AggregateException e) - { - if (e.InnerExceptions.Count > 0) - { - throw e.InnerExceptions[0]; - } - else - { - throw; - } - } - } - - /// - /// Creates a deep clone of an object by serializing it into a json string - /// and then deserializing back into an object. - /// - /// The type of the obj parameter as well as the return object. - /// The object to clone. - /// Template. - internal static T DeepCloneObject(T obj) - { - return JsonDeserialize(JsonSerialize(obj)); - } - - /// - /// StringBuilder extension method to implement IndexOf functionality. - /// This does a StringComparison.Ordinal kind of comparison. - /// - /// The string builder to find the index in. - /// The string to locate in the string builder. - /// The index of string inside the string builder. - private static int IndexOf(StringBuilder stringBuilder, string strCheck) - { - if (stringBuilder == null) - { - throw new ArgumentNullException("stringBuilder"); - } - - if (strCheck == null) - { - return 0; - } - - // iterate over the input - for (int inputCounter = 0; inputCounter < stringBuilder.Length; inputCounter++) - { - int matchCounter; - - // attempt to locate a potential match - for (matchCounter = 0; - (matchCounter < strCheck.Length) - && (inputCounter + matchCounter < stringBuilder.Length) - && (stringBuilder[inputCounter + matchCounter] == strCheck[matchCounter]); - matchCounter++) - { - } - - // verify the match - if (matchCounter == strCheck.Length) - { - return inputCounter; - } - } - - return -1; - } - - /// - /// Used for flattening a collection of objects into a string. - /// - /// Array of elements to flatten. - /// Format string to use for array flattening. - /// Separator to use for string concat. - /// Representative string made up of array elements. - private static string FlattenCollection( - ICollection array, - ArrayDeserialization fmt, - char separator, - bool urlEncode, - string key = "") - { - StringBuilder builder = new StringBuilder(); - - string format = string.Empty; - if (fmt == ArrayDeserialization.UnIndexed) - { - format = string.Format("{0}[]={{0}}{{1}}", key); - } - else if (fmt == ArrayDeserialization.Indexed) - { - format = string.Format("{0}[{{2}}]={{0}}{{1}}", key); - } - else if (fmt == ArrayDeserialization.Plain) - { - format = string.Format("{0}={{0}}{{1}}", key); - } - else if (fmt == ArrayDeserialization.Csv || fmt == ArrayDeserialization.Psv || fmt == ArrayDeserialization.Tsv) - { - builder.Append(string.Format("{0}=", key)); - format = "{0}{1}"; - } - else - { - format = "{0}{1}"; - } - - // append all elements in the array into a string - int index = 0; - foreach (object element in array) - { - builder.AppendFormat(format, GetElementValue(element, urlEncode), separator, index++); - } - - // remove the last separator, if appended - if ((builder.Length > 1) && (builder[builder.Length - 1] == separator)) - { - builder.Length -= 1; - } - - return builder.ToString(); - } - - private static string GetElementValue(object element, bool urlEncode) - { - string elemValue = null; - - // replace null values with empty string to maintain index order - if (element == null) - { - elemValue = string.Empty; - } - else if (element is DateTime) - { - elemValue = ((DateTime)element).ToString(DateTimeFormat); - } - else if (element is DateTimeOffset) - { - elemValue = ((DateTimeOffset)element).ToString(DateTimeFormat); - } - else - { - elemValue = element.ToString(); - } - - if (urlEncode) - { - elemValue = Uri.EscapeDataString(elemValue); - } - - return elemValue; - } - - /// - /// Apply appropriate serialization to query parameters. - /// - /// Parameters. - /// List of processed query parameters. - private static List> ProcessQueryParamsForCustomTypes(IEnumerable> parameters) - { - var processedParameters = new List>(); - - foreach (var kvp in parameters) - { - // ignore null values - if (kvp.Value == null) - { - continue; - } - - if (kvp.Value.GetType().Namespace.StartsWith("System")) - { - if (kvp.Value is IList) - { - var list = kvp.Value as IList; - - if (list?.Count != 0) - { - var item = list[0]; - - if (item.GetType().Namespace.StartsWith("System")) - { - // List of scalar type - processedParameters.Add(kvp); - } - else - { - // List of custom type - var innerList = PrepareFormFieldsFromObject(kvp.Key, kvp.Value, arrayDeserializationFormat: ArrayDeserialization.Indexed); - innerList = ApplySerializationFormatToScalarArrays(innerList); - processedParameters.AddRange(innerList); - } - } - } - else - { - // Scalar type - processedParameters.Add(kvp); - } - } - else - { - // Custom type - var list = PrepareFormFieldsFromObject(kvp.Key, kvp.Value, arrayDeserializationFormat: ArrayDeserialization.Indexed); - list = ApplySerializationFormatToScalarArrays(list); - processedParameters.AddRange(list); - } - } - - return processedParameters; - } - - /// - /// Apply serialization to scalar arrays in custom objects. - /// - /// Parameters. - /// List of processed query parameters. - private static List> ApplySerializationFormatToScalarArrays(IEnumerable> parameters) - { - var processedParams = new List>(); - var unprocessedParams = parameters.Where(x => IsScalarValuesArray(x.Key) != true); - - // Extract scalar arrays and group them by key - var arraysGroupedByKey = parameters - .Where(x => IsScalarValuesArray(x.Key) == true) - .Select(x => - { - return new KeyValuePair( - x.Key.Substring(0, x.Key.LastIndexOf('[')), - x.Value); - }) - .GroupBy(x => x.Key); - - foreach (var group in arraysGroupedByKey) - { - var key = group.Key; - var values = new List(); - foreach (var aaa in group) - { - values.Add(aaa.Value); - } - - processedParams.Add(new KeyValuePair(key, values)); - } - - processedParams.AddRange(unprocessedParams); - - return processedParams; - } - - /// - /// Checks if the provided string is part of a scalar array - /// - /// Input string. - /// True or False - private static bool IsScalarValuesArray(string input) - { - var regex = new Regex("\\[\\d+\\]$", RegexOptions.IgnoreCase); - return regex.IsMatch(input); - } - } -} diff --git a/DotNet/ThoughtSpotPublicRESTAPI.Standard/Utilities/ArrayDeserialization.cs b/DotNet/ThoughtSpotPublicRESTAPI.Standard/Utilities/ArrayDeserialization.cs deleted file mode 100644 index 84156ed07..000000000 --- a/DotNet/ThoughtSpotPublicRESTAPI.Standard/Utilities/ArrayDeserialization.cs +++ /dev/null @@ -1,48 +0,0 @@ -// -// Copyright (c) APIMatic. All rights reserved. -// -namespace ThoughtSpotPublicRESTAPI.Standard.Utilities -{ - using Newtonsoft.Json.Converters; - - /// - /// This enumeration has ArrayDeserialization format. - /// - public enum ArrayDeserialization - { - /// - /// Example: variableName[0] = value1 - /// - Indexed = 0, - - /// - /// Example: variableName[] = value1 - /// - UnIndexed = 1, - - /// - /// Example: variableName = value1, variableName = value 2 - /// - Plain = 2, - - /// - /// Example: variableName = value1,value2 - /// - Csv = 3, - - /// - /// Example: variableName = value1\tvalue2 - /// - Tsv = 4, - - /// - /// Example: variableName = value1|value2 - /// - Psv = 5, - - /// - /// Example: Ignore format - /// - None = 6, - } -} \ No newline at end of file diff --git a/DotNet/ThoughtSpotPublicRESTAPI.Tests/ControllerTestBase.cs b/DotNet/ThoughtSpotPublicRESTAPI.Tests/ControllerTestBase.cs deleted file mode 100644 index 7064c4dad..000000000 --- a/DotNet/ThoughtSpotPublicRESTAPI.Tests/ControllerTestBase.cs +++ /dev/null @@ -1,51 +0,0 @@ -// -// Copyright (c) APIMatic. All rights reserved. -// -namespace ThoughtSpotPublicRESTAPI.Tests -{ - using System; - using System.Collections.Generic; - using System.Linq; - using System.Text; - using System.Threading.Tasks; - using NUnit.Framework; - using ThoughtSpotPublicRESTAPI.Standard; - using ThoughtSpotPublicRESTAPI.Standard.Http.Client; - using ThoughtSpotPublicRESTAPI.Standard.Models; - using ThoughtSpotPublicRESTAPI.Tests.Helpers; - - /// - /// ControllerTestBase Class. - /// - [TestFixture] - public class ControllerTestBase - { - /// - /// Assert precision. - /// - protected const double AssertPrecision = 0.1; - - /// - /// Gets HttpCallBackHandler. - /// - internal HttpCallBack HttpCallBackHandler { get; private set; } - - /// - /// Gets ThoughtSpotPublicRESTAPIClient Client. - /// - protected ThoughtSpotPublicRESTAPIClient Client { get; private set; } - - /// - /// Set up the client. - /// - [OneTimeSetUp] - public void SetUp() - { - ThoughtSpotPublicRESTAPIClient config = ThoughtSpotPublicRESTAPIClient.CreateFromEnvironment(); - this.HttpCallBackHandler = new HttpCallBack(); - this.Client = config.ToBuilder() - .HttpCallBack(this.HttpCallBackHandler) - .Build(); - } - } -} \ No newline at end of file diff --git a/DotNet/ThoughtSpotPublicRESTAPI.Tests/GroupControllerTest.cs b/DotNet/ThoughtSpotPublicRESTAPI.Tests/GroupControllerTest.cs deleted file mode 100644 index eb8bbc09c..000000000 --- a/DotNet/ThoughtSpotPublicRESTAPI.Tests/GroupControllerTest.cs +++ /dev/null @@ -1,112 +0,0 @@ -// -// Copyright (c) APIMatic. All rights reserved. -// -namespace ThoughtSpotPublicRESTAPI.Tests -{ - using System; - using System.Collections.Generic; - using System.Globalization; - using System.IO; - using System.Threading.Tasks; - using Newtonsoft.Json.Converters; - using NUnit.Framework; - using ThoughtSpotPublicRESTAPI.Standard; - using ThoughtSpotPublicRESTAPI.Standard.Controllers; - using ThoughtSpotPublicRESTAPI.Standard.Exceptions; - using ThoughtSpotPublicRESTAPI.Standard.Http.Client; - using ThoughtSpotPublicRESTAPI.Standard.Http.Response; - using ThoughtSpotPublicRESTAPI.Standard.Utilities; - using ThoughtSpotPublicRESTAPI.Tests.Helpers; - - /// - /// GroupControllerTest. - /// - [TestFixture] - public class GroupControllerTest : ControllerTestBase - { - /// - /// Controller instance (for all tests). - /// - private GroupController controller; - - /// - /// Setup test class. - /// - [OneTimeSetUp] - public void SetUpDerived() - { - this.controller = this.Client.GroupController; - } - - /// - /// To get the details of a specific group by name or id, use this endpoint. - ///At Least one value needed. When both are given id will be considered to fetch user information.. - /// - /// A representing the asynchronous unit test. - [Test] - public async Task TestTestRestapiV2GetGroup() - { - // Parameters for the API call - string name = null; - string id = null; - - // Perform API call - Standard.Models.GroupResponse result = null; - try - { - result = await this.controller.RestapiV2GetGroupAsync(name, id); - } - catch (ApiException) - { - } - - // Test response code - Assert.AreEqual(200, this.HttpCallBackHandler.Response.StatusCode, "Status should be 200"); - - // Test headers - Dictionary headers = new Dictionary(); - headers.Add("Content-Type", "application/json"); - - Assert.IsTrue( - TestHelper.AreHeadersProperSubsetOf ( - headers, - this.HttpCallBackHandler.Response.Headers), - "Headers should match"); - } - - /// - /// To remove a group from the ThoughtSpot system, send a DELETE request to this endpoint. At Least one value needed. When both are given user id will be considered to fetch user information.. - /// - /// A representing the asynchronous unit test. - [Test] - public async Task TestTestRestapiV2DeleteGroup() - { - // Parameters for the API call - string name = null; - string id = null; - - // Perform API call - bool result = false; - try - { - result = await this.controller.RestapiV2DeleteGroupAsync(name, id); - } - catch (ApiException) - { - } - - // Test response code - Assert.AreEqual(200, this.HttpCallBackHandler.Response.StatusCode, "Status should be 200"); - - // Test headers - Dictionary headers = new Dictionary(); - headers.Add("Content-Type", "application/json"); - - Assert.IsTrue( - TestHelper.AreHeadersProperSubsetOf ( - headers, - this.HttpCallBackHandler.Response.Headers), - "Headers should match"); - } - } -} \ No newline at end of file diff --git a/DotNet/ThoughtSpotPublicRESTAPI.Tests/Helpers/HttpCallBackEventsHandler.cs b/DotNet/ThoughtSpotPublicRESTAPI.Tests/Helpers/HttpCallBackEventsHandler.cs deleted file mode 100644 index 0e10e82cd..000000000 --- a/DotNet/ThoughtSpotPublicRESTAPI.Tests/Helpers/HttpCallBackEventsHandler.cs +++ /dev/null @@ -1,45 +0,0 @@ -// -// Copyright (c) APIMatic. All rights reserved. -// -namespace ThoughtSpotPublicRESTAPI.Tests.Helpers -{ - using ThoughtSpotPublicRESTAPI.Standard.Http.Client; - using ThoughtSpotPublicRESTAPI.Standard.Http.Request; - using ThoughtSpotPublicRESTAPI.Standard.Http.Response; - - /// - /// HttpCallBackEventsHandler Class. - /// - public class HttpCallBackEventsHandler - { - /// - /// Gets Http Request. - /// - public HttpRequest Request { get; private set; } - - /// - /// Gets Http Response. - /// - public HttpResponse Response { get; private set; } - - /// - /// OnBeforeHttpRequestEventHandler. - /// - /// IHttpClient object. - /// Http request object. - internal void OnBeforeHttpRequestEventHandler(IHttpClient source, HttpRequest request) - { - this.Request = request; - } - - /// - /// OnAfterHttpResponseEventHandler. - /// - /// IHttpClient object. - /// Http response object. - internal void OnAfterHttpResponseEventHandler(IHttpClient source, HttpResponse response) - { - this.Response = response; - } - } -} diff --git a/DotNet/ThoughtSpotPublicRESTAPI.Tests/Helpers/TestHelper.cs b/DotNet/ThoughtSpotPublicRESTAPI.Tests/Helpers/TestHelper.cs deleted file mode 100644 index 005b1eb24..000000000 --- a/DotNet/ThoughtSpotPublicRESTAPI.Tests/Helpers/TestHelper.cs +++ /dev/null @@ -1,539 +0,0 @@ -// -// Copyright (c) APIMatic. All rights reserved. -// -namespace ThoughtSpotPublicRESTAPI.Tests.Helpers -{ - using System; - using System.Collections; - using System.Collections.Generic; - using System.IO; - using System.Security.Cryptography; - using System.Text; - using Newtonsoft.Json.Linq; - using ThoughtSpotPublicRESTAPI.Standard; - using ThoughtSpotPublicRESTAPI.Standard.Http.Client; - using ThoughtSpotPublicRESTAPI.Standard.Http.Request; - using ThoughtSpotPublicRESTAPI.Standard.Http.Response; - using ThoughtSpotPublicRESTAPI.Standard.Utilities; - - /// - /// TestHelper Class. - /// - public static class TestHelper - { - /// - /// Check if left array of objects is a subset of right array. - /// - /// Left array as a JSON string. - /// Right array as a JSON string. - /// Check primitive values for equality?. - /// Are extra elements allowed in right array?. - /// Should elements in right be compared in order to left?. - /// True if it is a subset. - public static bool IsArrayOfJsonObjectsProperSubsetOf( - string leftObject, - string rightObject, - bool checkValues, - bool allowExtra, - bool isOrdered) - { - // Deserialize left and right objects from their respective strings - JArray left = ApiHelper.JsonDeserialize(leftObject); - JArray right = ApiHelper.JsonDeserialize(rightObject); - - return IsArrayOfJsonObjectsProperSubsetOf(left, right, checkValues, allowExtra, isOrdered); - } - - /// - /// Check if left array of objects is a subset of right array. - /// - /// Left array. - /// Right array. - /// Check primitive values for equality?. - /// Are extra elements allowed in right array?. - /// Should elements in right be compared in order to left?. - /// True if it is a subset. - public static bool IsArrayOfJsonObjectsProperSubsetOf( - JArray leftList, - JArray rightList, - bool checkValues, - bool allowExtra, - bool isOrdered) - { - // Return false if size different and checking was strict - if ((!allowExtra) && (rightList.Count != leftList.Count)) - { - return false; - } - - // Create list iterators - var leftIter = leftList.GetEnumerator(); - var rightIter = rightList.GetEnumerator(); - - // Iterate left list and check if each value is present in the right list - while (leftIter.MoveNext()) - { - var leftTree = leftIter.Current; - bool found = false; - - // restart right iterator if ordered comparision is not required - if (!isOrdered) - { - rightIter = rightList.GetEnumerator(); - } - - while (rightIter.MoveNext()) - { - if (IsProperSubsetOf((JObject)leftTree, (JObject)rightIter.Current, checkValues, allowExtra, isOrdered)) - { - found = true; - break; - } - } - - if (!found) - { - return false; - } - } - - return true; - } - - /// - /// Check whether the a list (as JSON string) is a subset of another list (as JSON string). - /// - /// Expected List. - /// List to check. - /// Are extras allowed in the list to check?. - /// Should checking be in order?. - /// True if it is a subset. - public static bool IsListProperSubsetOf( - string leftListJson, - string rightListJson, - bool allowExtra, - bool isOrdered) - { - // Deserialize left and right lists from their respective strings - JArray left = ApiHelper.JsonDeserialize(leftListJson); - JArray right = ApiHelper.JsonDeserialize(rightListJson); - - return IsListProperSubsetOf(left, right, allowExtra, isOrdered); - } - - /// - /// Check whether the a list is a subset of another list. - /// - /// Expected List. - /// List to check. - /// Are extras allowed in the list to check?. - /// Should checking be in order?. - /// True if it is a subset. - public static bool IsListProperSubsetOf( - JArray leftList, - JArray rightList, - bool allowExtra, - bool isOrdered) - { - if (isOrdered) - { - if ((!allowExtra) && (rightList.Count != leftList.Count)) - { - return false; - } - else if (rightList.Count < leftList.Count) - { - return false; - } - - int rIndex = 0, lIndex = 0; - while (rIndex < rightList.Count) - { - if (rightList[rIndex].ToString() == leftList[lIndex].ToString()) - { - lIndex++; - } - - rIndex++; - } - - return lIndex == leftList.Count; - } - else - { - if ((!allowExtra) && (rightList.Count != leftList.Count)) - { - return false; - } - - HashSet rHashSet = new HashSet(rightList); - - return rHashSet.IsSupersetOf(leftList); - } - } - - /// - /// Recursively check whether the left headers map is a proper subset of the right headers map. - /// - /// Left headers map. - /// Right headers map. - /// True if it is a subset. - public static bool AreHeadersProperSubsetOf( - Dictionary leftDict, - Dictionary rightDict) - { - Dictionary leftDictInv = new Dictionary(leftDict, StringComparer.CurrentCultureIgnoreCase); - Dictionary rightDictInv = new Dictionary(rightDict, StringComparer.CurrentCultureIgnoreCase); - - foreach (var leftKey in leftDictInv.Keys) - { - if (!leftDictInv.ContainsKey(leftKey)) - { - return false; - } - - if (leftDictInv[leftKey] == null) - { - continue; - } - - if (!leftDictInv[leftKey].Equals(rightDictInv[leftKey])) - { - return false; - } - } - - return true; - } - - /// - /// Compare the input stream to file byte-by-byte. - /// - /// First input. - /// Second input. - /// True if stream contains the same content as the file. - public static bool IsSameAsFile(string file, Stream input) - { - return IsSameInputStream(GetFile(file).FileStream, input); - } - - /// - /// Compare two input streams. - /// - /// First stream. - /// Second stream. - /// True if streams contain the same content. - public static bool IsSameInputStream(Stream input1, Stream input2) - { - if (input1 == input2) - { - return true; - } - - int ch = input1.ReadByte(); - while (ch != -1) - { - int ch2 = input2.ReadByte(); - if (ch != ch2) - { - return false; - } - - ch = input1.ReadByte(); - } - - // should reach end of stream - bool input2Finished = input2.ReadByte() == -1; - - try - { - input1.Dispose(); - } - catch - { - } - - try - { - input2.Dispose(); - } - catch - { - } - - return input2Finished; - } - - /// - /// Downloads a given url and return a path to its local version. - /// Files are cached.Second call for the same URL will return cached version. - /// - /// URL to download. - /// Absolute path to the local downloaded version of file. - public static FileStreamInfo GetFile(string url) - { - string originalFileName = Path.GetFileName(url); - string filename = "sdk_tests" + ToSHA1(url) + ".tmp"; - string tmpPath = Path.GetTempPath(); - string filePath = Path.Combine(tmpPath, filename); - FileInfo fileInfo = new FileInfo(filePath); - FileStream fileStream = null; - - // if file does not exist locally, download it - if (!fileInfo.Exists) - { - var httpClientConfiguration = new HttpClientConfiguration.Builder().Build(); - IHttpClient client = new HttpClientWrapper(httpClientConfiguration); - HttpRequest req = client.Get(url); - HttpResponse resp = client.ExecuteAsBinary(req); - fileStream = System.IO.File.Create(filePath); - byte[] buffer = new byte[2048]; - int len = resp.RawBody.Read(buffer, 0, 2048); - - while (len > 0) - { - fileStream.Write(buffer, 0, len); - len = resp.RawBody.Read(buffer, 0, 2048); - } - - fileStream.Position = 0; - } - else - { - fileStream = System.IO.File.OpenRead(filePath); - } - - return new FileStreamInfo(fileStream, originalFileName); - } - - /// - /// Get SHA1 hash of a string. - /// - /// The string to convert. - /// SHA1 hash. - public static string ToSHA1(string convertme) - { - byte[] bytes = Encoding.UTF8.GetBytes(convertme); - using (var sha1 = SHA1.Create()) - { - byte[] hashBytes = sha1.ComputeHash(bytes); - return ByteArrayToHexString(hashBytes); - } - } - - /// - /// Convert byte array to the hexadecimal representation in string. - /// - /// Byte array to convert. - /// Hex representation in string. - public static string ByteArrayToHexString(byte[] bytes) - { - var sb = new StringBuilder(); - foreach (byte b in bytes) - { - var hex = b.ToString("x2"); - sb.Append(hex); - } - - return sb.ToString(); - } - - /// - /// Checks if the left items set is the superset of right items set. - /// - /// Type of items. - /// Left items set. - /// Right items set. - /// True if the left has all items of right. - public static bool IsSuperSetOf(this IEnumerable left, IEnumerable right) - { - HashSet lHashSet = new HashSet(left); - return lHashSet.IsSupersetOf(right); - } - - /// - /// Checks if the left items ordered set is the ordered superset of right items ordered set. - /// - /// Type of items. - /// Left items set. - /// Right items set. - /// Should the size of left and right be equal as well. - /// True if the left has all items of right in the same order. - public static bool IsOrderedSupersetOf(this IEnumerable left, IEnumerable right, bool checkSize = false) - { - var lItr = left.GetEnumerator(); - var rItr = right.GetEnumerator(); - - while (lItr.MoveNext()) - { - T lCurrent = lItr.Current; - - // right list ended prematurely - if (!rItr.MoveNext()) - { - return false; - } - - T rCurrent = rItr.Current; - - if (!lCurrent.Equals(rCurrent)) - { - return false; - } - } - - // left and right should also of the same size - if (checkSize) - { - // right items should have been exhaustively read? - if (rItr.MoveNext()) - { - return false; - } - } - - return true; - } - - /// - /// Recursively check whether the left JSON object is a proper subset of the right JSON object. - /// - /// Left JSON object as string. - /// rightObject Right JSON object as string. - /// Check primitive values for equality?. - /// Are extra elements allowed in right array?. - /// Should elements in right be compared in order to left?. - /// True, if the given object is a proper subset of other other. - internal static bool IsJsonObjectProperSubsetOf( - string leftObject, - string rightObject, - bool checkValues, - bool allowExtra, - bool isOrdered) - { - return IsProperSubsetOf( - ApiHelper.JsonDeserialize(leftObject), - ApiHelper.JsonDeserialize(rightObject), - checkValues, - allowExtra, - isOrdered); - } - - /// - /// Convert an InputStream to a string (utility function). - /// - /// The input stream to read. - /// string read from the stream. - internal static string ConvertStreamToString(Stream inStream) - { - using (StreamReader reader = new StreamReader(inStream)) - { - var str = reader.ReadToEnd(); - return str; - } - } - - /// - /// Recursively check whether the leftTree is a proper subset of the right tree. - /// - /// Left tree. - /// Right tree. - /// Check primitive values for equality?. - /// Are extra elements allowed in right array?. - /// Should elements in right be compared in order to left?. - /// Boolean. - private static bool IsProperSubsetOf( - JObject leftTree, - JObject rightTree, - bool checkValues, - bool allowExtra, - bool isOrdered) - { - foreach (var property in leftTree.Properties()) - { - // Check if key exists - if (rightTree.Property(property.Name) == null) - { - return false; - } - - object leftVal = property.Value; - object rightVal = rightTree.Property(property.Name).Value; - - if (leftVal is JObject) - { - // If left value is tree, right value should be be tree too - if (rightVal is JObject) - { - if (!IsProperSubsetOf( - (JObject)leftVal, - (JObject)rightVal, - checkValues, - allowExtra, - isOrdered)) - { - return false; - } - } - else - { - return false; - } - } - else - { - // Value comparison if checkValues - if (checkValues) - { - // If left value is a primitive, check if it equals right value - if (leftVal == null) - { - if (rightVal != null) - { - return false; - } - } - else if (leftVal is JArray) - { - if (!(rightVal is JArray)) - { - return false; - } - - // is array of objects - if (((JArray)leftVal).First is JObject) - { - if (!IsArrayOfJsonObjectsProperSubsetOf( - (JArray)leftVal, - (JArray)rightVal, - checkValues, - allowExtra, - isOrdered)) - { - return false; - } - } - else - { - if (!IsListProperSubsetOf( - (JArray)leftVal, - (JArray)rightVal, - allowExtra, - isOrdered)) - { - return false; - } - } - } - else if (!leftVal.Equals(rightVal)) - { - return false; - } - } - } - } - - return true; - } - } -} \ No newline at end of file diff --git a/DotNet/ThoughtSpotPublicRESTAPI.Tests/MetadataControllerTest.cs b/DotNet/ThoughtSpotPublicRESTAPI.Tests/MetadataControllerTest.cs deleted file mode 100644 index 208ee2287..000000000 --- a/DotNet/ThoughtSpotPublicRESTAPI.Tests/MetadataControllerTest.cs +++ /dev/null @@ -1,146 +0,0 @@ -// -// Copyright (c) APIMatic. All rights reserved. -// -namespace ThoughtSpotPublicRESTAPI.Tests -{ - using System; - using System.Collections.Generic; - using System.Globalization; - using System.IO; - using System.Threading.Tasks; - using Newtonsoft.Json.Converters; - using NUnit.Framework; - using ThoughtSpotPublicRESTAPI.Standard; - using ThoughtSpotPublicRESTAPI.Standard.Controllers; - using ThoughtSpotPublicRESTAPI.Standard.Exceptions; - using ThoughtSpotPublicRESTAPI.Standard.Http.Client; - using ThoughtSpotPublicRESTAPI.Standard.Http.Response; - using ThoughtSpotPublicRESTAPI.Standard.Utilities; - using ThoughtSpotPublicRESTAPI.Tests.Helpers; - - /// - /// MetadataControllerTest. - /// - [TestFixture] - public class MetadataControllerTest : ControllerTestBase - { - /// - /// Controller instance (for all tests). - /// - private MetadataController controller; - - /// - /// Setup test class. - /// - [OneTimeSetUp] - public void SetUpDerived() - { - this.controller = this.Client.MetadataController; - } - - /// - /// To get details of a specific tag, use this endpoint. At least one of id or name of tag is required. When both are given, then id will be considered.. - /// - /// A representing the asynchronous unit test. - [Test] - public async Task TestTestRestapiV2GetTag() - { - // Parameters for the API call - string name = null; - string id = null; - - // Perform API call - Standard.Models.MetadataTagResponse result = null; - try - { - result = await this.controller.RestapiV2GetTagAsync(name, id); - } - catch (ApiException) - { - } - - // Test response code - Assert.AreEqual(200, this.HttpCallBackHandler.Response.StatusCode, "Status should be 200"); - - // Test headers - Dictionary headers = new Dictionary(); - headers.Add("Content-Type", "application/json"); - - Assert.IsTrue( - TestHelper.AreHeadersProperSubsetOf ( - headers, - this.HttpCallBackHandler.Response.Headers), - "Headers should match"); - } - - /// - /// To get the name and id of liveboard that is set as a home liveboard for a user, use this endpoint. At least one of user id or username is required. When both are given, then id will be considered.. - /// - /// A representing the asynchronous unit test. - [Test] - public async Task TestTestRestapiV2GetHomeLiveboard() - { - // Parameters for the API call - string userName = null; - string userId = null; - - // Perform API call - Standard.Models.HomeLiveboardResponse result = null; - try - { - result = await this.controller.RestapiV2GetHomeLiveboardAsync(userName, userId); - } - catch (ApiException) - { - } - - // Test response code - Assert.AreEqual(200, this.HttpCallBackHandler.Response.StatusCode, "Status should be 200"); - - // Test headers - Dictionary headers = new Dictionary(); - headers.Add("Content-Type", "application/json"); - - Assert.IsTrue( - TestHelper.AreHeadersProperSubsetOf ( - headers, - this.HttpCallBackHandler.Response.Headers), - "Headers should match"); - } - - /// - /// To programmatically delete tags, use this endpoint. At least one of id or name of tag is required. When both are given, then id will be considered.. - /// - /// A representing the asynchronous unit test. - [Test] - public async Task TestTestRestapiV2DeleteTag() - { - // Parameters for the API call - string name = null; - string id = null; - - // Perform API call - bool result = false; - try - { - result = await this.controller.RestapiV2DeleteTagAsync(name, id); - } - catch (ApiException) - { - } - - // Test response code - Assert.AreEqual(200, this.HttpCallBackHandler.Response.StatusCode, "Status should be 200"); - - // Test headers - Dictionary headers = new Dictionary(); - headers.Add("Content-Type", "application/json"); - - Assert.IsTrue( - TestHelper.AreHeadersProperSubsetOf ( - headers, - this.HttpCallBackHandler.Response.Headers), - "Headers should match"); - } - } -} \ No newline at end of file diff --git a/DotNet/ThoughtSpotPublicRESTAPI.Tests/OrgControllerTest.cs b/DotNet/ThoughtSpotPublicRESTAPI.Tests/OrgControllerTest.cs deleted file mode 100644 index 19ad920b4..000000000 --- a/DotNet/ThoughtSpotPublicRESTAPI.Tests/OrgControllerTest.cs +++ /dev/null @@ -1,119 +0,0 @@ -// -// Copyright (c) APIMatic. All rights reserved. -// -namespace ThoughtSpotPublicRESTAPI.Tests -{ - using System; - using System.Collections.Generic; - using System.Globalization; - using System.IO; - using System.Threading.Tasks; - using Newtonsoft.Json.Converters; - using NUnit.Framework; - using ThoughtSpotPublicRESTAPI.Standard; - using ThoughtSpotPublicRESTAPI.Standard.Controllers; - using ThoughtSpotPublicRESTAPI.Standard.Exceptions; - using ThoughtSpotPublicRESTAPI.Standard.Http.Client; - using ThoughtSpotPublicRESTAPI.Standard.Http.Response; - using ThoughtSpotPublicRESTAPI.Standard.Utilities; - using ThoughtSpotPublicRESTAPI.Tests.Helpers; - - /// - /// OrgControllerTest. - /// - [TestFixture] - public class OrgControllerTest : ControllerTestBase - { - /// - /// Controller instance (for all tests). - /// - private OrgController controller; - - /// - /// Setup test class. - /// - [OneTimeSetUp] - public void SetUpDerived() - { - this.controller = this.Client.OrgController; - } - - /// - /// To get the details of a specific organization by name or id, use this endpoint. - /// - ///At least one value needed. When both are given,then id will be considered to fetch organization information. - /// - ///Requires Administration privilege for tenant.. - /// - /// A representing the asynchronous unit test. - [Test] - public async Task TestTestRestapiV2GetOrg() - { - // Parameters for the API call - string name = null; - int? id = null; - - // Perform API call - Standard.Models.OrgsResponse result = null; - try - { - result = await this.controller.RestapiV2GetOrgAsync(name, id); - } - catch (ApiException) - { - } - - // Test response code - Assert.AreEqual(200, this.HttpCallBackHandler.Response.StatusCode, "Status should be 200"); - - // Test headers - Dictionary headers = new Dictionary(); - headers.Add("Content-Type", "application/json"); - - Assert.IsTrue( - TestHelper.AreHeadersProperSubsetOf ( - headers, - this.HttpCallBackHandler.Response.Headers), - "Headers should match"); - } - - /// - /// To remove an organization from the ThoughtSpot system, send a DELETE request to this endpoint. - /// - ///At least one value is needed. When both id and name are given, then id will be considered. - /// - ///Requires Administration privilege for tenant.. - /// - /// A representing the asynchronous unit test. - [Test] - public async Task TestTestRestapiV2DeleteOrg() - { - // Parameters for the API call - string name = null; - int? id = null; - - // Perform API call - bool result = false; - try - { - result = await this.controller.RestapiV2DeleteOrgAsync(name, id); - } - catch (ApiException) - { - } - - // Test response code - Assert.AreEqual(200, this.HttpCallBackHandler.Response.StatusCode, "Status should be 200"); - - // Test headers - Dictionary headers = new Dictionary(); - headers.Add("Content-Type", "application/json"); - - Assert.IsTrue( - TestHelper.AreHeadersProperSubsetOf ( - headers, - this.HttpCallBackHandler.Response.Headers), - "Headers should match"); - } - } -} \ No newline at end of file diff --git a/DotNet/ThoughtSpotPublicRESTAPI.Tests/Properties/AssemblyInfo.cs b/DotNet/ThoughtSpotPublicRESTAPI.Tests/Properties/AssemblyInfo.cs deleted file mode 100644 index 2104422b0..000000000 --- a/DotNet/ThoughtSpotPublicRESTAPI.Tests/Properties/AssemblyInfo.cs +++ /dev/null @@ -1,32 +0,0 @@ -// -// Copyright (c) APIMatic. All rights reserved. -// - -using System.Reflection; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; - -// General Information about an assembly is controlled through the following -// set of attributes. Change these attribute values to modify the information -// associated with an assembly. -[assembly: AssemblyTitle("ThoughtSpotPublicRESTAPI.Tests")] -[assembly: AssemblyDescription("Automatically generated using APIMatic")] -[assembly: AssemblyConfiguration("")] -[assembly: AssemblyCompany("")] -[assembly: AssemblyProduct("ThoughtSpotPublicRESTAPI.Tests")] -[assembly: AssemblyCopyright("Copyright © 2016")] -[assembly: AssemblyTrademark("")] -[assembly: AssemblyCulture("")] - -// Version information for an assembly consists of the following four values: -// -// Major Version -// Minor Version -// Build Number -// Revision -// -// You can specify all the values or you can default the Build and Revision Numbers -// by using the '*' as shown below: -// [assembly: AssemblyVersion("1.0.*")] -[assembly: AssemblyVersion("2.0.0.0")] -[assembly: AssemblyFileVersion("2.0.0.0")] diff --git a/DotNet/ThoughtSpotPublicRESTAPI.Tests/SecurityControllerTest.cs b/DotNet/ThoughtSpotPublicRESTAPI.Tests/SecurityControllerTest.cs deleted file mode 100644 index 0a464540f..000000000 --- a/DotNet/ThoughtSpotPublicRESTAPI.Tests/SecurityControllerTest.cs +++ /dev/null @@ -1,78 +0,0 @@ -// -// Copyright (c) APIMatic. All rights reserved. -// -namespace ThoughtSpotPublicRESTAPI.Tests -{ - using System; - using System.Collections.Generic; - using System.Globalization; - using System.IO; - using System.Threading.Tasks; - using Newtonsoft.Json.Converters; - using NUnit.Framework; - using ThoughtSpotPublicRESTAPI.Standard; - using ThoughtSpotPublicRESTAPI.Standard.Controllers; - using ThoughtSpotPublicRESTAPI.Standard.Exceptions; - using ThoughtSpotPublicRESTAPI.Standard.Http.Client; - using ThoughtSpotPublicRESTAPI.Standard.Http.Response; - using ThoughtSpotPublicRESTAPI.Standard.Utilities; - using ThoughtSpotPublicRESTAPI.Tests.Helpers; - - /// - /// SecurityControllerTest. - /// - [TestFixture] - public class SecurityControllerTest : ControllerTestBase - { - /// - /// Controller instance (for all tests). - /// - private SecurityController controller; - - /// - /// Setup test class. - /// - [OneTimeSetUp] - public void SetUpDerived() - { - this.controller = this.Client.SecurityController; - } - - /// - /// Use this endpoint to list the objects on which a user or user group has permission. The response will include only those objects on which the user or user group has either VIEW OR MODIFY permission. - /// - ///Requires administration privilege. - /// - /// A representing the asynchronous unit test. - [Test] - public async Task TestTestRestapiV2GetPermissionForPrincipal() - { - // Parameters for the API call - string id = null; - string name = null; - - // Perform API call - Standard.Models.PrincipalSearchResponse result = null; - try - { - result = await this.controller.RestapiV2GetPermissionForPrincipalAsync(id, name); - } - catch (ApiException) - { - } - - // Test response code - Assert.AreEqual(200, this.HttpCallBackHandler.Response.StatusCode, "Status should be 200"); - - // Test headers - Dictionary headers = new Dictionary(); - headers.Add("Content-Type", "application/json"); - - Assert.IsTrue( - TestHelper.AreHeadersProperSubsetOf ( - headers, - this.HttpCallBackHandler.Response.Headers), - "Headers should match"); - } - } -} \ No newline at end of file diff --git a/DotNet/ThoughtSpotPublicRESTAPI.Tests/SessionControllerTest.cs b/DotNet/ThoughtSpotPublicRESTAPI.Tests/SessionControllerTest.cs deleted file mode 100644 index fc2c44a2a..000000000 --- a/DotNet/ThoughtSpotPublicRESTAPI.Tests/SessionControllerTest.cs +++ /dev/null @@ -1,81 +0,0 @@ -// -// Copyright (c) APIMatic. All rights reserved. -// -namespace ThoughtSpotPublicRESTAPI.Tests -{ - using System; - using System.Collections.Generic; - using System.Globalization; - using System.IO; - using System.Threading.Tasks; - using Newtonsoft.Json.Converters; - using NUnit.Framework; - using ThoughtSpotPublicRESTAPI.Standard; - using ThoughtSpotPublicRESTAPI.Standard.Controllers; - using ThoughtSpotPublicRESTAPI.Standard.Exceptions; - using ThoughtSpotPublicRESTAPI.Standard.Http.Client; - using ThoughtSpotPublicRESTAPI.Standard.Http.Response; - using ThoughtSpotPublicRESTAPI.Standard.Utilities; - using ThoughtSpotPublicRESTAPI.Tests.Helpers; - - /// - /// SessionControllerTest. - /// - [TestFixture] - public class SessionControllerTest : ControllerTestBase - { - /// - /// Controller instance (for all tests). - /// - private SessionController controller; - - /// - /// Setup test class. - /// - [OneTimeSetUp] - public void SetUpDerived() - { - this.controller = this.Client.SessionController; - } - - /// - /// You can programmatically create login session for a user in ThoughtSpot using this endpoint. - /// - ///You can create session by either providing userName and password as inputs in this request body or by including "Authorization" header with the token generated through the endpoint /tspublic/rest/v2/session/gettoken. - /// - ///userName and password input is given precedence over "Authorization" header, when both are included in the request.. - /// - /// A representing the asynchronous unit test. - [Test] - public async Task TestTestRestapiV2Login() - { - // Parameters for the API call - string userName = null; - string password = null; - bool? rememberMe = null; - - // Perform API call - Standard.Models.SessionLoginResponse result = null; - try - { - result = await this.controller.RestapiV2LoginAsync(userName, password, rememberMe); - } - catch (ApiException) - { - } - - // Test response code - Assert.AreEqual(200, this.HttpCallBackHandler.Response.StatusCode, "Status should be 200"); - - // Test headers - Dictionary headers = new Dictionary(); - headers.Add("Content-Type", "application/json"); - - Assert.IsTrue( - TestHelper.AreHeadersProperSubsetOf ( - headers, - this.HttpCallBackHandler.Response.Headers), - "Headers should match"); - } - } -} \ No newline at end of file diff --git a/DotNet/ThoughtSpotPublicRESTAPI.Tests/ThoughtSpotPublicRESTAPI.Tests.csproj b/DotNet/ThoughtSpotPublicRESTAPI.Tests/ThoughtSpotPublicRESTAPI.Tests.csproj deleted file mode 100644 index 485ec496f..000000000 --- a/DotNet/ThoughtSpotPublicRESTAPI.Tests/ThoughtSpotPublicRESTAPI.Tests.csproj +++ /dev/null @@ -1,29 +0,0 @@ - - - - - - netcoreapp3.1 - false - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/DotNet/ThoughtSpotPublicRESTAPI.Tests/UserControllerTest.cs b/DotNet/ThoughtSpotPublicRESTAPI.Tests/UserControllerTest.cs deleted file mode 100644 index d3cdb7efb..000000000 --- a/DotNet/ThoughtSpotPublicRESTAPI.Tests/UserControllerTest.cs +++ /dev/null @@ -1,113 +0,0 @@ -// -// Copyright (c) APIMatic. All rights reserved. -// -namespace ThoughtSpotPublicRESTAPI.Tests -{ - using System; - using System.Collections.Generic; - using System.Globalization; - using System.IO; - using System.Threading.Tasks; - using Newtonsoft.Json.Converters; - using NUnit.Framework; - using ThoughtSpotPublicRESTAPI.Standard; - using ThoughtSpotPublicRESTAPI.Standard.Controllers; - using ThoughtSpotPublicRESTAPI.Standard.Exceptions; - using ThoughtSpotPublicRESTAPI.Standard.Http.Client; - using ThoughtSpotPublicRESTAPI.Standard.Http.Response; - using ThoughtSpotPublicRESTAPI.Standard.Utilities; - using ThoughtSpotPublicRESTAPI.Tests.Helpers; - - /// - /// UserControllerTest. - /// - [TestFixture] - public class UserControllerTest : ControllerTestBase - { - /// - /// Controller instance (for all tests). - /// - private UserController controller; - - /// - /// Setup test class. - /// - [OneTimeSetUp] - public void SetUpDerived() - { - this.controller = this.Client.UserController; - } - - /// - /// To get the details of a specific user account by username or user id, use this endpoint. At Least one value is needed. When both are given, user id will be considered to fetch user information. - /// - /// A representing the asynchronous unit test. - [Test] - public async Task TestTestRestapiV2GetUser() - { - // Parameters for the API call - string name = null; - string id = null; - - // Perform API call - Standard.Models.UserResponse result = null; - try - { - result = await this.controller.RestapiV2GetUserAsync(name, id); - } - catch (ApiException) - { - } - - // Test response code - Assert.AreEqual(200, this.HttpCallBackHandler.Response.StatusCode, "Status should be 200"); - - // Test headers - Dictionary headers = new Dictionary(); - headers.Add("Content-Type", "application/json"); - - Assert.IsTrue( - TestHelper.AreHeadersProperSubsetOf ( - headers, - this.HttpCallBackHandler.Response.Headers), - "Headers should match"); - } - - /// - /// To remove a user from the ThoughtSpot system, use this endpoint. - ///At Least one value needed. When both are given user id will be considered to delete user.. - /// - /// A representing the asynchronous unit test. - [Test] - public async Task TestTestRestapiV2DeleteUser() - { - // Parameters for the API call - string name = null; - string id = null; - int? orgId = null; - - // Perform API call - bool result = false; - try - { - result = await this.controller.RestapiV2DeleteUserAsync(name, id, orgId); - } - catch (ApiException) - { - } - - // Test response code - Assert.AreEqual(200, this.HttpCallBackHandler.Response.StatusCode, "Status should be 200"); - - // Test headers - Dictionary headers = new Dictionary(); - headers.Add("Content-Type", "application/json"); - - Assert.IsTrue( - TestHelper.AreHeadersProperSubsetOf ( - headers, - this.HttpCallBackHandler.Response.Headers), - "Headers should match"); - } - } -} \ No newline at end of file diff --git a/DotNet/ThoughtSpotPublicRESTAPI.sln b/DotNet/ThoughtSpotPublicRESTAPI.sln deleted file mode 100644 index cf560b250..000000000 --- a/DotNet/ThoughtSpotPublicRESTAPI.sln +++ /dev/null @@ -1,27 +0,0 @@ -Microsoft Visual Studio Solution File, Format Version 12.00 -# Visual Studio 15 -VisualStudioVersion = 15.0.26430.14 -MinimumVisualStudioVersion = 10.0.40219.1 -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ThoughtSpotPublicRESTAPI.Standard", "ThoughtSpotPublicRESTAPI.Standard/ThoughtSpotPublicRESTAPI.Standard.csproj", "{319244ae-9be0-4914-bb42-24389c601424}" -EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ThoughtSpotPublicRESTAPI.Tests", "ThoughtSpotPublicRESTAPI.Tests/ThoughtSpotPublicRESTAPI.Tests.csproj", "{12992bf9-07b2-4f8c-8269-9841b0e236a7}" -EndProject -Global - GlobalSection(SolutionConfigurationPlatforms) = preSolution - Debug|Any CPU = Debug|Any CPU - Release|Any CPU = Release|Any CPU - EndGlobalSection - GlobalSection(ProjectConfigurationPlatforms) = postSolution - {319244ae-9be0-4914-bb42-24389c601424}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {319244ae-9be0-4914-bb42-24389c601424}.Debug|Any CPU.Build.0 = Debug|Any CPU - {319244ae-9be0-4914-bb42-24389c601424}.Release|Any CPU.ActiveCfg = Release|Any CPU - {319244ae-9be0-4914-bb42-24389c601424}.Release|Any CPU.Build.0 = Release|Any CPU - {12992bf9-07b2-4f8c-8269-9841b0e236a7}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {12992bf9-07b2-4f8c-8269-9841b0e236a7}.Debug|Any CPU.Build.0 = Debug|Any CPU - {12992bf9-07b2-4f8c-8269-9841b0e236a7}.Release|Any CPU.ActiveCfg = Release|Any CPU - {12992bf9-07b2-4f8c-8269-9841b0e236a7}.Release|Any CPU.Build.0 = Release|Any CPU - EndGlobalSection - GlobalSection(SolutionProperties) = preSolution - HideSolutionNode = FALSE - EndGlobalSection -EndGlobal diff --git a/DotNet/doc/api-exception.md b/DotNet/doc/api-exception.md deleted file mode 100644 index e44b802b7..000000000 --- a/DotNet/doc/api-exception.md +++ /dev/null @@ -1,18 +0,0 @@ - -# ApiException Class - -This is the base class for all exceptions that represent an error response from the server. - -## Properties - -| Name | Description | Type | -| --- | --- | --- | -| ResponseCode | Gets the HTTP response code from the API request. | `int` | -| HttpContext | Gets or sets the HttpContext for the request and response. | `HttpContext` | - -## Constructors - -| Name | Description | -| --- | --- | -| `ApiException(string reason, HttpContext context = null)` | Initializes a new instance of the class. | - diff --git a/DotNet/doc/client.md b/DotNet/doc/client.md deleted file mode 100644 index ef18530f4..000000000 --- a/DotNet/doc/client.md +++ /dev/null @@ -1,77 +0,0 @@ - -# Client Class Documentation - -The following parameters are configurable for the API Client: - -| Parameter | Type | Description | -| --- | --- | --- | -| `BaseUrl` | `string` | *Default*: `"https://localhost:443"` | -| `Environment` | Environment | The API environment.
**Default: `Environment.Production`** | -| `Timeout` | `TimeSpan` | Http client timeout.
*Default*: `TimeSpan.FromSeconds(100)` | -| `AccessToken` | `string` | The OAuth 2.0 Access Token to use for API requests. | - -The API client can be initialized as follows: - -```csharp -ThoughtSpotPublicRESTAPI.Standard.ThoughtSpotPublicRESTAPIClient client = new ThoughtSpotPublicRESTAPI.Standard.ThoughtSpotPublicRESTAPIClient.Builder() - .AccessToken("AccessToken") - .Environment(ThoughtSpotPublicRESTAPI.Standard.Environment.Production) - .BaseUrl("https://localhost:443") - .HttpClientConfig(config => config.NumberOfRetries(0)) - .Build(); -``` - -## ThoughtSpot Public REST APIClient Class - -The gateway for the SDK. This class acts as a factory for the Controllers and also holds the configuration of the SDK. - -### Controllers - -| Name | Description | -| --- | --- | -| UserController | Gets UserController controller. | -| GroupController | Gets GroupController controller. | -| MetadataController | Gets MetadataController controller. | -| DatabaseController | Gets DatabaseController controller. | -| ConnectionController | Gets ConnectionController controller. | -| DataController | Gets DataController controller. | -| LogsController | Gets LogsController controller. | -| CustomActionsController | Gets CustomActionsController controller. | -| SecurityController | Gets SecurityController controller. | -| OrgController | Gets OrgController controller. | -| SessionController | Gets SessionController controller. | -| AdminController | Gets AdminController controller. | -| ReportController | Gets ReportController controller. | -| MaterializationController | Gets MaterializationController controller. | - -### Properties - -| Name | Description | Type | -| --- | --- | --- | -| HttpClientConfiguration | Gets the configuration of the Http Client associated with this client. | `IHttpClientConfiguration` | -| Timeout | Http client timeout. | `TimeSpan` | -| Environment | Current API environment. | `Environment` | -| BaseUrl | BaseUrl value. | `string` | -| AccessTokenCredentials | Gets the access token to use with OAuth 2 authentication. | `IAccessTokenCredentials` | - -### Methods - -| Name | Description | Return Type | -| --- | --- | --- | -| `GetBaseUri(Server alias = Server.Default)` | Gets the URL for a particular alias in the current environment and appends it with template parameters. | `string` | -| `ToBuilder()` | Creates an object of the ThoughtSpot Public REST APIClient using the values provided for the builder. | `Builder` | - -## ThoughtSpot Public REST APIClient Builder Class - -Class to build instances of ThoughtSpot Public REST APIClient. - -### Methods - -| Name | Description | Return Type | -| --- | --- | --- | -| `HttpClientConfiguration(Action action)` | Gets the configuration of the Http Client associated with this client. | `Builder` | -| `Timeout(TimeSpan timeout)` | Http client timeout. | `Builder` | -| `Environment(Environment environment)` | Current API environment. | `Builder` | -| `BaseUrl(string baseUrl)` | BaseUrl value. | `Builder` | -| `AccessTokenCredentials(IAccessTokenCredentials accessTokenCredentials)` | Gets the access token to use with OAuth 2 authentication. | `Builder` | - diff --git a/DotNet/doc/controllers/admin.md b/DotNet/doc/controllers/admin.md deleted file mode 100644 index 8b1b94ce3..000000000 --- a/DotNet/doc/controllers/admin.md +++ /dev/null @@ -1,275 +0,0 @@ -# Admin - -```csharp -AdminController adminController = client.AdminController; -``` - -## Class Name - -`AdminController` - -## Methods - -* [Restapi V2 Update Cluster Config](../../doc/controllers/admin.md#restapi-v2-update-cluster-config) -* [Restapi V2 Reset User Password](../../doc/controllers/admin.md#restapi-v2-reset-user-password) -* [Restapi V2 Sync Principal](../../doc/controllers/admin.md#restapi-v2-sync-principal) -* [Restapi V2 Change Author of Objects](../../doc/controllers/admin.md#restapi-v2-change-author-of-objects) -* [Restapi V2 Assign Author to Objects](../../doc/controllers/admin.md#restapi-v2-assign-author-to-objects) -* [Restapi V2 Force Logout Users](../../doc/controllers/admin.md#restapi-v2-force-logout-users) - - -# Restapi V2 Update Cluster Config - -To update the Thoughtspot cluster configuration, use this endpoint. - -```csharp -RestapiV2UpdateClusterConfigAsync( - Models.TspublicRestV2AdminConfigurationUpdateRequest body) -``` - -## Parameters - -| Parameter | Type | Tags | Description | -| --- | --- | --- | --- | -| `body` | [`Models.TspublicRestV2AdminConfigurationUpdateRequest`](../../doc/models/tspublic-rest-v2-admin-configuration-update-request.md) | Body, Required | - | - -## Response Type - -`Task` - -## Example Usage - -```csharp -var body = new TspublicRestV2AdminConfigurationUpdateRequest(); - -try -{ - bool? result = await adminController.RestapiV2UpdateClusterConfigAsync(body); -} -catch (ApiException e){}; -``` - -## Errors - -| HTTP Status Code | Error Description | Exception Class | -| --- | --- | --- | -| 500 | Operation failed | [`ErrorResponseException`](../../doc/models/error-response-exception.md) | - - -# Restapi V2 Reset User Password - -To reset the password of a ThoughtSpot user account, use this endpoint. - -It is mandatory to use Authorization header with token of a user with admin access to successfully run this endpoint. - -At least one of User Id or username is mandatory. When both are given, then user id will be considered. - -```csharp -RestapiV2ResetUserPasswordAsync( - Models.TspublicRestV2AdminResetpasswordRequest body) -``` - -## Parameters - -| Parameter | Type | Tags | Description | -| --- | --- | --- | --- | -| `body` | [`Models.TspublicRestV2AdminResetpasswordRequest`](../../doc/models/tspublic-rest-v2-admin-resetpassword-request.md) | Body, Required | - | - -## Response Type - -`Task` - -## Example Usage - -```csharp -var body = new TspublicRestV2AdminResetpasswordRequest(); -body.NewPassword = "newPassword0"; - -try -{ - bool? result = await adminController.RestapiV2ResetUserPasswordAsync(body); -} -catch (ApiException e){}; -``` - -## Errors - -| HTTP Status Code | Error Description | Exception Class | -| --- | --- | --- | -| 500 | Operation failed | [`ErrorResponseException`](../../doc/models/error-response-exception.md) | - - -# Restapi V2 Sync Principal - -To programmatically synchronize user accounts and user groups from external system with ThoughtSpot, use this endpoint. - -The payload takes principals containing all users and groups present in the external system. - -The users and user groups in Thoughtspot get updated for any matching inputs. - -Any user and user group present in the input, but not present in the cluster, gets created in cluster. -n You can optionally choose to delete the user and groups from the cluster, that are not present in the input. - -```csharp -RestapiV2SyncPrincipalAsync( - Models.TspublicRestV2AdminSyncprincipalRequest body) -``` - -## Parameters - -| Parameter | Type | Tags | Description | -| --- | --- | --- | --- | -| `body` | [`Models.TspublicRestV2AdminSyncprincipalRequest`](../../doc/models/tspublic-rest-v2-admin-syncprincipal-request.md) | Body, Required | - | - -## Response Type - -[`Task`](../../doc/models/adminsync-principal-response.md) - -## Example Usage - -```csharp -var body = new TspublicRestV2AdminSyncprincipalRequest(); -body.PrincipalObject = new object(); -body.PrincipalObject.Add(ApiHelper.JsonDeserialize("{\"key1\":\"val1\",\"key2\":\"val2\"}")); - -try -{ - AdminsyncPrincipalResponse result = await adminController.RestapiV2SyncPrincipalAsync(body); -} -catch (ApiException e){}; -``` - -## Errors - -| HTTP Status Code | Error Description | Exception Class | -| --- | --- | --- | -| 500 | Operation failed | [`ErrorResponseException`](../../doc/models/error-response-exception.md) | - - -# Restapi V2 Change Author of Objects - -To programmatically change the owner of one or several objects from one user account to another, use this endpoint. - -You might want to transfer ownership of objects owned by a user to another active user, when the account is removed from the ThoughtSpot application. - -```csharp -RestapiV2ChangeAuthorOfObjectsAsync( - Models.TspublicRestV2AdminChangeauthorRequest body) -``` - -## Parameters - -| Parameter | Type | Tags | Description | -| --- | --- | --- | --- | -| `body` | [`Models.TspublicRestV2AdminChangeauthorRequest`](../../doc/models/tspublic-rest-v2-admin-changeauthor-request.md) | Body, Required | - | - -## Response Type - -`Task` - -## Example Usage - -```csharp -var body = new TspublicRestV2AdminChangeauthorRequest(); -body.TsObjectId = new List(); -body.TsObjectId.Add("tsObjectId7"); -body.FromUser = new FromUserNameAndIDInput(); -body.ToUser = new ToUserNameAndIDInput(); - -try -{ - bool? result = await adminController.RestapiV2ChangeAuthorOfObjectsAsync(body); -} -catch (ApiException e){}; -``` - -## Errors - -| HTTP Status Code | Error Description | Exception Class | -| --- | --- | --- | -| 500 | Operation failed | [`ErrorResponseException`](../../doc/models/error-response-exception.md) | - - -# Restapi V2 Assign Author to Objects - -To programmatically assign an author to one or several objects, use this endpoint. - -Provide either user name or id as input. When both are given user id will be considered. - -Requires administration privilege. - -```csharp -RestapiV2AssignAuthorToObjectsAsync( - Models.TspublicRestV2AdminAssignauthorRequest body) -``` - -## Parameters - -| Parameter | Type | Tags | Description | -| --- | --- | --- | --- | -| `body` | [`Models.TspublicRestV2AdminAssignauthorRequest`](../../doc/models/tspublic-rest-v2-admin-assignauthor-request.md) | Body, Required | - | - -## Response Type - -`Task` - -## Example Usage - -```csharp -var body = new TspublicRestV2AdminAssignauthorRequest(); -body.TsObjectId = new List(); -body.TsObjectId.Add("tsObjectId7"); - -try -{ - bool? result = await adminController.RestapiV2AssignAuthorToObjectsAsync(body); -} -catch (ApiException e){}; -``` - -## Errors - -| HTTP Status Code | Error Description | Exception Class | -| --- | --- | --- | -| 500 | Operation failed | [`ErrorResponseException`](../../doc/models/error-response-exception.md) | - - -# Restapi V2 Force Logout Users - -To logout one or more users from logged in session, use this endpoint. If no input is provided then all logged in users are force logged out. - -Requires administration privilege - -```csharp -RestapiV2ForceLogoutUsersAsync( - Models.TspublicRestV2AdminForcelogoutRequest body) -``` - -## Parameters - -| Parameter | Type | Tags | Description | -| --- | --- | --- | --- | -| `body` | [`Models.TspublicRestV2AdminForcelogoutRequest`](../../doc/models/tspublic-rest-v2-admin-forcelogout-request.md) | Body, Required | - | - -## Response Type - -`Task` - -## Example Usage - -```csharp -var body = new TspublicRestV2AdminForcelogoutRequest(); - -try -{ - bool? result = await adminController.RestapiV2ForceLogoutUsersAsync(body); -} -catch (ApiException e){}; -``` - -## Errors - -| HTTP Status Code | Error Description | Exception Class | -| --- | --- | --- | -| 500 | Operation failed | [`ErrorResponseException`](../../doc/models/error-response-exception.md) | - diff --git a/DotNet/doc/controllers/connection.md b/DotNet/doc/controllers/connection.md deleted file mode 100644 index 0e739c745..000000000 --- a/DotNet/doc/controllers/connection.md +++ /dev/null @@ -1,516 +0,0 @@ -# Connection - -```csharp -ConnectionController connectionController = client.ConnectionController; -``` - -## Class Name - -`ConnectionController` - -## Methods - -* [Restapi V2 Get Connection](../../doc/controllers/connection.md#restapi-v2-get-connection) -* [Restapi V2 Get Connection Database](../../doc/controllers/connection.md#restapi-v2-get-connection-database) -* [Restapi V2 Create Connection](../../doc/controllers/connection.md#restapi-v2-create-connection) -* [Restapi V2 Update Connection](../../doc/controllers/connection.md#restapi-v2-update-connection) -* [Restapi V2 Delete Connection](../../doc/controllers/connection.md#restapi-v2-delete-connection) -* [Restapi V2 Add Table to Connection](../../doc/controllers/connection.md#restapi-v2-add-table-to-connection) -* [Restapi V2 Remove Table From Connection](../../doc/controllers/connection.md#restapi-v2-remove-table-from-connection) -* [Restapi V2 Search Connection](../../doc/controllers/connection.md#restapi-v2-search-connection) -* [Restapi V2 Get Connection Tables](../../doc/controllers/connection.md#restapi-v2-get-connection-tables) -* [Restapi V2 Get Connection Table Columns](../../doc/controllers/connection.md#restapi-v2-get-connection-table-columns) - - -# Restapi V2 Get Connection - -To get the details of a specific connection use this endpoint - -```csharp -RestapiV2GetConnectionAsync( - string id) -``` - -## Parameters - -| Parameter | Type | Tags | Description | -| --- | --- | --- | --- | -| `id` | `string` | Query, Required | The GUID of the connection to query | - -## Response Type - -[`Task`](../../doc/models/connection-response.md) - -## Example Usage - -```csharp -string id = "id0"; - -try -{ - ConnectionResponse result = await connectionController.RestapiV2GetConnectionAsync(id); -} -catch (ApiException e){}; -``` - -## Errors - -| HTTP Status Code | Error Description | Exception Class | -| --- | --- | --- | -| 500 | Operation failed | [`ErrorResponseException`](../../doc/models/error-response-exception.md) | - - -# Restapi V2 Get Connection Database - -To get the list of databases for a connection, use this endpoint. - -The response will include databases from the data platform corresponding to the connection id provided. - -```csharp -RestapiV2GetConnectionDatabaseAsync( - string id) -``` - -## Parameters - -| Parameter | Type | Tags | Description | -| --- | --- | --- | --- | -| `id` | `string` | Query, Required | The GUID of the connection | - -## Response Type - -`Task>` - -## Example Usage - -```csharp -string id = "id0"; - -try -{ - List result = await connectionController.RestapiV2GetConnectionDatabaseAsync(id); -} -catch (ApiException e){}; -``` - -## Errors - -| HTTP Status Code | Error Description | Exception Class | -| --- | --- | --- | -| 500 | Operation failed | [`ErrorResponseException`](../../doc/models/error-response-exception.md) | - - -# Restapi V2 Create Connection - -To programmatically create a connection in the ThoughtSpot system use this API endpoint. -Using this API, you can create a connection and assign groups. -To create a connection, you require admin connection privileges. -All connections created in the ThoughtSpot system are added to ALL_GROUP - -```csharp -RestapiV2CreateConnectionAsync( - Models.TspublicRestV2ConnectionCreateRequest body) -``` - -## Parameters - -| Parameter | Type | Tags | Description | -| --- | --- | --- | --- | -| `body` | [`Models.TspublicRestV2ConnectionCreateRequest`](../../doc/models/tspublic-rest-v2-connection-create-request.md) | Body, Required | - | - -## Response Type - -[`Task`](../../doc/models/create-connection-response.md) - -## Example Usage - -```csharp -var body = new TspublicRestV2ConnectionCreateRequest(); -body.Type = Type14Enum.ORACLEADW; -body.Name = "name6"; -body.Configuration = "configuration0"; - -try -{ - CreateConnectionResponse result = await connectionController.RestapiV2CreateConnectionAsync(body); -} -catch (ApiException e){}; -``` - -## Errors - -| HTTP Status Code | Error Description | Exception Class | -| --- | --- | --- | -| 500 | Operation failed | [`ErrorResponseException`](../../doc/models/error-response-exception.md) | - - -# Restapi V2 Update Connection - -You can use this endpoint to programmatically modify an existing connection -To modify a connection, you require admin connection privileges. -At least one of Connection Id or connectionname is mandatory. When both are given, then connection id will be considered and connectionname will be updated - -```csharp -RestapiV2UpdateConnectionAsync( - Models.TspublicRestV2ConnectionUpdateRequest body) -``` - -## Parameters - -| Parameter | Type | Tags | Description | -| --- | --- | --- | --- | -| `body` | [`Models.TspublicRestV2ConnectionUpdateRequest`](../../doc/models/tspublic-rest-v2-connection-update-request.md) | Body, Required | - | - -## Response Type - -`Task` - -## Example Usage - -```csharp -var body = new TspublicRestV2ConnectionUpdateRequest(); -body.Id = "id6"; -body.Configuration = "configuration0"; - -try -{ - bool? result = await connectionController.RestapiV2UpdateConnectionAsync(body); -} -catch (ApiException e){}; -``` - -## Errors - -| HTTP Status Code | Error Description | Exception Class | -| --- | --- | --- | -| 500 | Operation failed | [`ErrorResponseException`](../../doc/models/error-response-exception.md) | - - -# Restapi V2 Delete Connection - -To remove a connection from the ThoughtSpot system, use this endpoint. - -```csharp -RestapiV2DeleteConnectionAsync( - List id) -``` - -## Parameters - -| Parameter | Type | Tags | Description | -| --- | --- | --- | --- | -| `id` | `List` | Query, Required | A JSON array of GUIDs of the connection | - -## Response Type - -`Task` - -## Example Usage - -```csharp -var id = new List(); -id.Add("id0"); - -try -{ - bool? result = await connectionController.RestapiV2DeleteConnectionAsync(id); -} -catch (ApiException e){}; -``` - -## Errors - -| HTTP Status Code | Error Description | Exception Class | -| --- | --- | --- | -| 500 | Operation failed | [`ErrorResponseException`](../../doc/models/error-response-exception.md) | - - -# Restapi V2 Add Table to Connection - -To programmatically add table to an existing connection use this endpoint. -When you assign groups to a connection, the connection inherits the privileges assigned to those groups. -At least one of Connection Id or connectionname is mandatory. When both are given, then connection id will be considered. - -```csharp -RestapiV2AddTableToConnectionAsync( - Models.TspublicRestV2ConnectionAddtableRequest body) -``` - -## Parameters - -| Parameter | Type | Tags | Description | -| --- | --- | --- | --- | -| `body` | [`Models.TspublicRestV2ConnectionAddtableRequest`](../../doc/models/tspublic-rest-v2-connection-addtable-request.md) | Body, Required | - | - -## Response Type - -`Task` - -## Example Usage - -```csharp -var body = new TspublicRestV2ConnectionAddtableRequest(); -body.Id = "id6"; -body.Table = new List(); - -var bodyTable0 = new AddTableInput(); -bodyTable0.Name = "name0"; -bodyTable0.DbName = "dbName8"; -bodyTable0.SchemaName = "schemaName4"; -bodyTable0.Columns = new List(); - -var bodyTable0Columns0 = new ColumnsInput(); -bodyTable0Columns0.Name = "name0"; -bodyTable0Columns0.DataType = "dataType2"; -bodyTable0.Columns.Add(bodyTable0Columns0); - -var bodyTable0Columns1 = new ColumnsInput(); -bodyTable0Columns1.Name = "name1"; -bodyTable0Columns1.DataType = "dataType3"; -bodyTable0.Columns.Add(bodyTable0Columns1); - -body.Table.Add(bodyTable0); - -var bodyTable1 = new AddTableInput(); -bodyTable1.Name = "name1"; -bodyTable1.DbName = "dbName9"; -bodyTable1.SchemaName = "schemaName5"; -bodyTable1.Columns = new List(); - -var bodyTable1Columns0 = new ColumnsInput(); -bodyTable1Columns0.Name = "name9"; -bodyTable1Columns0.DataType = "dataType1"; -bodyTable1.Columns.Add(bodyTable1Columns0); - -body.Table.Add(bodyTable1); - -var bodyTable2 = new AddTableInput(); -bodyTable2.Name = "name2"; -bodyTable2.DbName = "dbName0"; -bodyTable2.SchemaName = "schemaName6"; -bodyTable2.Columns = new List(); - -var bodyTable2Columns0 = new ColumnsInput(); -bodyTable2Columns0.Name = "name8"; -bodyTable2Columns0.DataType = "dataType0"; -bodyTable2.Columns.Add(bodyTable2Columns0); - -var bodyTable2Columns1 = new ColumnsInput(); -bodyTable2Columns1.Name = "name9"; -bodyTable2Columns1.DataType = "dataType1"; -bodyTable2.Columns.Add(bodyTable2Columns1); - -var bodyTable2Columns2 = new ColumnsInput(); -bodyTable2Columns2.Name = "name0"; -bodyTable2Columns2.DataType = "dataType2"; -bodyTable2.Columns.Add(bodyTable2Columns2); - -body.Table.Add(bodyTable2); - - -try -{ - bool? result = await connectionController.RestapiV2AddTableToConnectionAsync(body); -} -catch (ApiException e){}; -``` - -## Errors - -| HTTP Status Code | Error Description | Exception Class | -| --- | --- | --- | -| 500 | Operation failed | [`ErrorResponseException`](../../doc/models/error-response-exception.md) | - - -# Restapi V2 Remove Table From Connection - -To programmatically remove a table from a connection use API endpoint. -The API removes only the connection association. It does not delete the connection or group from the Thoughtspot system. -At least one of id or name of connection is required. When both are given connection id will be considered. - -```csharp -RestapiV2RemoveTableFromConnectionAsync( - Models.TspublicRestV2ConnectionRemovetableRequest body) -``` - -## Parameters - -| Parameter | Type | Tags | Description | -| --- | --- | --- | --- | -| `body` | [`Models.TspublicRestV2ConnectionRemovetableRequest`](../../doc/models/tspublic-rest-v2-connection-removetable-request.md) | Body, Required | - | - -## Response Type - -`Task` - -## Example Usage - -```csharp -var body = new TspublicRestV2ConnectionRemovetableRequest(); -body.Id = "id6"; -body.Table = new List(); - -var bodyTable0 = new TableInput(); -body.Table.Add(bodyTable0); - -var bodyTable1 = new TableInput(); -body.Table.Add(bodyTable1); - -var bodyTable2 = new TableInput(); -body.Table.Add(bodyTable2); - - -try -{ - bool? result = await connectionController.RestapiV2RemoveTableFromConnectionAsync(body); -} -catch (ApiException e){}; -``` - -## Errors - -| HTTP Status Code | Error Description | Exception Class | -| --- | --- | --- | -| 500 | Operation failed | [`ErrorResponseException`](../../doc/models/error-response-exception.md) | - - -# Restapi V2 Search Connection - -To get the details of a specific connection or all connections in the ThoughtSpot system use this end point. - -```csharp -RestapiV2SearchConnectionAsync( - Models.TspublicRestV2ConnectionSearchRequest body) -``` - -## Parameters - -| Parameter | Type | Tags | Description | -| --- | --- | --- | --- | -| `body` | [`Models.TspublicRestV2ConnectionSearchRequest`](../../doc/models/tspublic-rest-v2-connection-search-request.md) | Body, Required | - | - -## Response Type - -[`Task>`](../../doc/models/connection-response.md) - -## Example Usage - -```csharp -var body = new TspublicRestV2ConnectionSearchRequest(); -body.Type = Type15Enum.ORACLEADW; - -try -{ - List result = await connectionController.RestapiV2SearchConnectionAsync(body); -} -catch (ApiException e){}; -``` - -## Errors - -| HTTP Status Code | Error Description | Exception Class | -| --- | --- | --- | -| 500 | Operation failed | [`ErrorResponseException`](../../doc/models/error-response-exception.md) | - - -# Restapi V2 Get Connection Tables - -To get the details of tables from a connection, use this endpoint. - -You can get the details of tables in the data platform for the connection id provided. - -```csharp -RestapiV2GetConnectionTablesAsync( - Models.TspublicRestV2ConnectionTableRequest body) -``` - -## Parameters - -| Parameter | Type | Tags | Description | -| --- | --- | --- | --- | -| `body` | [`Models.TspublicRestV2ConnectionTableRequest`](../../doc/models/tspublic-rest-v2-connection-table-request.md) | Body, Required | - | - -## Response Type - -[`Task`](../../doc/models/connection-table-response.md) - -## Example Usage - -```csharp -var body = new TspublicRestV2ConnectionTableRequest(); -body.Id = "id6"; - -try -{ - ConnectionTableResponse result = await connectionController.RestapiV2GetConnectionTablesAsync(body); -} -catch (ApiException e){}; -``` - -## Errors - -| HTTP Status Code | Error Description | Exception Class | -| --- | --- | --- | -| 500 | Operation failed | [`ErrorResponseException`](../../doc/models/error-response-exception.md) | - - -# Restapi V2 Get Connection Table Columns - -To get the details of columns in a table associated to a connection, use this endpoint. - -You can get the columns of any table available in the data platform for the connection id provided. - -```csharp -RestapiV2GetConnectionTableColumnsAsync( - Models.TspublicRestV2ConnectionTablecoloumnRequest body) -``` - -## Parameters - -| Parameter | Type | Tags | Description | -| --- | --- | --- | --- | -| `body` | [`Models.TspublicRestV2ConnectionTablecoloumnRequest`](../../doc/models/tspublic-rest-v2-connection-tablecoloumn-request.md) | Body, Required | - | - -## Response Type - -[`Task`](../../doc/models/connection-table-columns-response.md) - -## Example Usage - -```csharp -var body = new TspublicRestV2ConnectionTablecoloumnRequest(); -body.Id = "id6"; -body.Table = new List(); - -var bodyTable0 = new ConnectionTableColumnsInput(); -bodyTable0.DbName = "dbName8"; -bodyTable0.SchemaName = "schemaName4"; -bodyTable0.Name = "name0"; -body.Table.Add(bodyTable0); - -var bodyTable1 = new ConnectionTableColumnsInput(); -bodyTable1.DbName = "dbName9"; -bodyTable1.SchemaName = "schemaName5"; -bodyTable1.Name = "name1"; -body.Table.Add(bodyTable1); - -var bodyTable2 = new ConnectionTableColumnsInput(); -bodyTable2.DbName = "dbName0"; -bodyTable2.SchemaName = "schemaName6"; -bodyTable2.Name = "name2"; -body.Table.Add(bodyTable2); - - -try -{ - ConnectionTableColumnsResponse result = await connectionController.RestapiV2GetConnectionTableColumnsAsync(body); -} -catch (ApiException e){}; -``` - -## Errors - -| HTTP Status Code | Error Description | Exception Class | -| --- | --- | --- | -| 500 | Operation failed | [`ErrorResponseException`](../../doc/models/error-response-exception.md) | - diff --git a/DotNet/doc/controllers/custom-actions.md b/DotNet/doc/controllers/custom-actions.md deleted file mode 100644 index 2a39b0b26..000000000 --- a/DotNet/doc/controllers/custom-actions.md +++ /dev/null @@ -1,333 +0,0 @@ -# Custom Actions - -```csharp -CustomActionsController customActionsController = client.CustomActionsController; -``` - -## Class Name - -`CustomActionsController` - -## Methods - -* [Restapi V2 Get Custom Action](../../doc/controllers/custom-actions.md#restapi-v2-get-custom-action) -* [Restapi V2 Search Custom Action](../../doc/controllers/custom-actions.md#restapi-v2-search-custom-action) -* [Restapi V2 Get Custom Action Association](../../doc/controllers/custom-actions.md#restapi-v2-get-custom-action-association) -* [Restapi V2 Create Custom Action](../../doc/controllers/custom-actions.md#restapi-v2-create-custom-action) -* [Restapi V2 Update Custom Action](../../doc/controllers/custom-actions.md#restapi-v2-update-custom-action) -* [Restapi V2 Delete Custom Action](../../doc/controllers/custom-actions.md#restapi-v2-delete-custom-action) -* [Restapi V2 Update Custom Action Association](../../doc/controllers/custom-actions.md#restapi-v2-update-custom-action-association) -* [Restapi V2 Delete Custom Action Association](../../doc/controllers/custom-actions.md#restapi-v2-delete-custom-action-association) - - -# Restapi V2 Get Custom Action - -To get details of a specific custom action configured in the ThoughtSpot system, use this endpoint - -```csharp -RestapiV2GetCustomActionAsync( - string id) -``` - -## Parameters - -| Parameter | Type | Tags | Description | -| --- | --- | --- | --- | -| `id` | `string` | Query, Required | GUID of the custom action | - -## Response Type - -`Task` - -## Example Usage - -```csharp -string id = "id0"; - -try -{ - object result = await customActionsController.RestapiV2GetCustomActionAsync(id); -} -catch (ApiException e){}; -``` - -## Errors - -| HTTP Status Code | Error Description | Exception Class | -| --- | --- | --- | -| 500 | Operation failed | [`ErrorResponseException`](../../doc/models/error-response-exception.md) | - - -# Restapi V2 Search Custom Action - -To search custom actions available on a ThoughtSpot instance, use this endpoint - -```csharp -RestapiV2SearchCustomActionAsync( - Models.TspublicRestV2CustomactionSearchRequest body) -``` - -## Parameters - -| Parameter | Type | Tags | Description | -| --- | --- | --- | --- | -| `body` | [`Models.TspublicRestV2CustomactionSearchRequest`](../../doc/models/tspublic-rest-v2-customaction-search-request.md) | Body, Required | - | - -## Response Type - -`Task` - -## Example Usage - -```csharp -var body = new TspublicRestV2CustomactionSearchRequest(); - -try -{ - object result = await customActionsController.RestapiV2SearchCustomActionAsync(body); -} -catch (ApiException e){}; -``` - -## Errors - -| HTTP Status Code | Error Description | Exception Class | -| --- | --- | --- | -| 500 | Operation failed | [`ErrorResponseException`](../../doc/models/error-response-exception.md) | - - -# Restapi V2 Get Custom Action Association - -ThoughtSpot supports associating custom actions to Liveboards, answers, and worksheets. To get the details of the ThoughtSpot objects associated with a custom action, use this endpoint. - -```csharp -RestapiV2GetCustomActionAssociationAsync( - string id) -``` - -## Parameters - -| Parameter | Type | Tags | Description | -| --- | --- | --- | --- | -| `id` | `string` | Query, Required | GUID of the custom action | - -## Response Type - -`Task` - -## Example Usage - -```csharp -string id = "id0"; - -try -{ - object result = await customActionsController.RestapiV2GetCustomActionAssociationAsync(id); -} -catch (ApiException e){}; -``` - -## Errors - -| HTTP Status Code | Error Description | Exception Class | -| --- | --- | --- | -| 500 | Operation failed | [`ErrorResponseException`](../../doc/models/error-response-exception.md) | - - -# Restapi V2 Create Custom Action - -To programmatically create custom actions on ThoughtSpot clusters that support embedding configuration, use this endpoint - -```csharp -RestapiV2CreateCustomActionAsync( - Models.TspublicRestV2CustomactionCreateRequest body) -``` - -## Parameters - -| Parameter | Type | Tags | Description | -| --- | --- | --- | --- | -| `body` | [`Models.TspublicRestV2CustomactionCreateRequest`](../../doc/models/tspublic-rest-v2-customaction-create-request.md) | Body, Required | - | - -## Response Type - -`Task` - -## Example Usage - -```csharp -var body = new TspublicRestV2CustomactionCreateRequest(); -body.Configuration = "configuration0"; - -try -{ - object result = await customActionsController.RestapiV2CreateCustomActionAsync(body); -} -catch (ApiException e){}; -``` - -## Errors - -| HTTP Status Code | Error Description | Exception Class | -| --- | --- | --- | -| 500 | Operation failed | [`ErrorResponseException`](../../doc/models/error-response-exception.md) | - - -# Restapi V2 Update Custom Action - -To programmatically edit an existing custom action, use this endpoint - -```csharp -RestapiV2UpdateCustomActionAsync( - Models.TspublicRestV2CustomactionUpdateRequest body) -``` - -## Parameters - -| Parameter | Type | Tags | Description | -| --- | --- | --- | --- | -| `body` | [`Models.TspublicRestV2CustomactionUpdateRequest`](../../doc/models/tspublic-rest-v2-customaction-update-request.md) | Body, Required | - | - -## Response Type - -`Task` - -## Example Usage - -```csharp -var body = new TspublicRestV2CustomactionUpdateRequest(); -body.Id = "id6"; -body.Configuration = "configuration0"; - -try -{ - object result = await customActionsController.RestapiV2UpdateCustomActionAsync(body); -} -catch (ApiException e){}; -``` - -## Errors - -| HTTP Status Code | Error Description | Exception Class | -| --- | --- | --- | -| 500 | Operation failed | [`ErrorResponseException`](../../doc/models/error-response-exception.md) | - - -# Restapi V2 Delete Custom Action - -To programmatically delete a custom action, use this endpoint - -```csharp -RestapiV2DeleteCustomActionAsync( - string id) -``` - -## Parameters - -| Parameter | Type | Tags | Description | -| --- | --- | --- | --- | -| `id` | `string` | Query, Required | GUID of the custom action | - -## Response Type - -`Task` - -## Example Usage - -```csharp -string id = "id0"; - -try -{ - object result = await customActionsController.RestapiV2DeleteCustomActionAsync(id); -} -catch (ApiException e){}; -``` - -## Errors - -| HTTP Status Code | Error Description | Exception Class | -| --- | --- | --- | -| 500 | Operation failed | [`ErrorResponseException`](../../doc/models/error-response-exception.md) | - - -# Restapi V2 Update Custom Action Association - -To programmatically associate a custom action to a ThoughtSpot object, use this endpoint - -```csharp -RestapiV2UpdateCustomActionAssociationAsync( - Models.TspublicRestV2CustomactionAssociationUpdateRequest body) -``` - -## Parameters - -| Parameter | Type | Tags | Description | -| --- | --- | --- | --- | -| `body` | [`Models.TspublicRestV2CustomactionAssociationUpdateRequest`](../../doc/models/tspublic-rest-v2-customaction-association-update-request.md) | Body, Required | - | - -## Response Type - -`Task` - -## Example Usage - -```csharp -var body = new TspublicRestV2CustomactionAssociationUpdateRequest(); -body.Id = "id6"; -body.Association = "association6"; - -try -{ - object result = await customActionsController.RestapiV2UpdateCustomActionAssociationAsync(body); -} -catch (ApiException e){}; -``` - -## Errors - -| HTTP Status Code | Error Description | Exception Class | -| --- | --- | --- | -| 500 | Operation failed | [`ErrorResponseException`](../../doc/models/error-response-exception.md) | - - -# Restapi V2 Delete Custom Action Association - -To remove custom action associations to ThoughtSpot objects, use this endpoint - -```csharp -RestapiV2DeleteCustomActionAssociationAsync( - string id, - string association) -``` - -## Parameters - -| Parameter | Type | Tags | Description | -| --- | --- | --- | --- | -| `id` | `string` | Query, Required | GUID of the custom action | -| `association` | `string` | Query, Required | A JSON map of the attributes with association of the action to ThoughtSpot object ID

Example:

{"id":"0dbd5b3a-84c1-4407-9803-cf07d67e6fcf","name":"My worksheet action","version":"v2","type":"URL","detail":{"link":"https://unpkg.com","function":"my-worksheet-action","authSelect":"NONE","authToken":"","encodeUser":"","apiKey":"X-API-KEY","apiValue":"","additionalUrlHeaders":"{}"},"actionAssociationMap":{"WORKSHEET":{"2b9d083a-275c-4984-9cfe-90b036affa17":{"enabled":"true","context":"PRIMARY"}}},"context":"NONE","availability":[ ],"userGroupList":["d0326b56-ef23-4c8a-8327-a30e99bcc72b"]} | - -## Response Type - -`Task` - -## Example Usage - -```csharp -string id = "id0"; -string association = "association0"; - -try -{ - object result = await customActionsController.RestapiV2DeleteCustomActionAssociationAsync(id, association); -} -catch (ApiException e){}; -``` - -## Errors - -| HTTP Status Code | Error Description | Exception Class | -| --- | --- | --- | -| 500 | Operation failed | [`ErrorResponseException`](../../doc/models/error-response-exception.md) | - diff --git a/DotNet/doc/controllers/data.md b/DotNet/doc/controllers/data.md deleted file mode 100644 index 8b91dbf47..000000000 --- a/DotNet/doc/controllers/data.md +++ /dev/null @@ -1,213 +0,0 @@ -# Data - -```csharp -DataController dataController = client.DataController; -``` - -## Class Name - -`DataController` - -## Methods - -* [Restapi V2 Search Query Data](../../doc/controllers/data.md#restapi-v2-search-query-data) -* [Restapi V2 Liveboard Data](../../doc/controllers/data.md#restapi-v2-liveboard-data) -* [Restapi V2 Answer Data](../../doc/controllers/data.md#restapi-v2-answer-data) -* [Restapi V2 Answer Query Sql](../../doc/controllers/data.md#restapi-v2-answer-query-sql) -* [Restapi V2 Liveboard Query Sql](../../doc/controllers/data.md#restapi-v2-liveboard-query-sql) - - -# Restapi V2 Search Query Data - -To programmatically retrieve data from ThoughtSpot using search query string, use this endpoint - -```csharp -RestapiV2SearchQueryDataAsync( - Models.TspublicRestV2DataSearchRequest body) -``` - -## Parameters - -| Parameter | Type | Tags | Description | -| --- | --- | --- | --- | -| `body` | [`Models.TspublicRestV2DataSearchRequest`](../../doc/models/tspublic-rest-v2-data-search-request.md) | Body, Required | - | - -## Response Type - -`Task` - -## Example Usage - -```csharp -var body = new TspublicRestV2DataSearchRequest(); -body.QueryString = "queryString0"; -body.DataObjectId = "dataObjectId6"; - -try -{ - object result = await dataController.RestapiV2SearchQueryDataAsync(body); -} -catch (ApiException e){}; -``` - -## Errors - -| HTTP Status Code | Error Description | Exception Class | -| --- | --- | --- | -| 500 | Operation failed | [`ErrorResponseException`](../../doc/models/error-response-exception.md) | - - -# Restapi V2 Liveboard Data - -To retrieve data related to a Liveboard or visualization from the ThoughtSpot system, you can use this endpoint - -```csharp -RestapiV2LiveboardDataAsync( - Models.TspublicRestV2DataLiveboardRequest body) -``` - -## Parameters - -| Parameter | Type | Tags | Description | -| --- | --- | --- | --- | -| `body` | [`Models.TspublicRestV2DataLiveboardRequest`](../../doc/models/tspublic-rest-v2-data-liveboard-request.md) | Body, Required | - | - -## Response Type - -`Task` - -## Example Usage - -```csharp -var body = new TspublicRestV2DataLiveboardRequest(); - -try -{ - object result = await dataController.RestapiV2LiveboardDataAsync(body); -} -catch (ApiException e){}; -``` - -## Errors - -| HTTP Status Code | Error Description | Exception Class | -| --- | --- | --- | -| 500 | Operation failed | [`ErrorResponseException`](../../doc/models/error-response-exception.md) | - - -# Restapi V2 Answer Data - -To retrieve data related to a Answer from the ThoughtSpot system, you can use this endpoint - -```csharp -RestapiV2AnswerDataAsync( - Models.TspublicRestV2DataAnswerRequest body) -``` - -## Parameters - -| Parameter | Type | Tags | Description | -| --- | --- | --- | --- | -| `body` | [`Models.TspublicRestV2DataAnswerRequest`](../../doc/models/tspublic-rest-v2-data-answer-request.md) | Body, Required | - | - -## Response Type - -`Task` - -## Example Usage - -```csharp -var body = new TspublicRestV2DataAnswerRequest(); -body.Id = "id6"; - -try -{ - object result = await dataController.RestapiV2AnswerDataAsync(body); -} -catch (ApiException e){}; -``` - -## Errors - -| HTTP Status Code | Error Description | Exception Class | -| --- | --- | --- | -| 500 | Operation failed | [`ErrorResponseException`](../../doc/models/error-response-exception.md) | - - -# Restapi V2 Answer Query Sql - -To retrieve the query SQL related to an Answer that is run on the data platform, you can use this endpoint - -```csharp -RestapiV2AnswerQuerySqlAsync( - string id) -``` - -## Parameters - -| Parameter | Type | Tags | Description | -| --- | --- | --- | --- | -| `id` | `string` | Query, Required | The GUID of the Answer | - -## Response Type - -[`Task`](../../doc/models/answer-query-response.md) - -## Example Usage - -```csharp -string id = "id0"; - -try -{ - AnswerQueryResponse result = await dataController.RestapiV2AnswerQuerySqlAsync(id); -} -catch (ApiException e){}; -``` - -## Errors - -| HTTP Status Code | Error Description | Exception Class | -| --- | --- | --- | -| 500 | Operation failed | [`ErrorResponseException`](../../doc/models/error-response-exception.md) | - - -# Restapi V2 Liveboard Query Sql - -To retrieve the query SQL related to a Visualization in a Liveboard that is run on the data platform, you can use this endpoint - -```csharp -RestapiV2LiveboardQuerySqlAsync( - string id, - List vizId = null) -``` - -## Parameters - -| Parameter | Type | Tags | Description | -| --- | --- | --- | --- | -| `id` | `string` | Query, Required | The GUID of the Answer | -| `vizId` | `List` | Query, Optional | A JSON array of GUIDs of the visualizations in the Liveboard. | - -## Response Type - -[`Task`](../../doc/models/liveboard-query-response.md) - -## Example Usage - -```csharp -string id = "id0"; - -try -{ - LiveboardQueryResponse result = await dataController.RestapiV2LiveboardQuerySqlAsync(id, null); -} -catch (ApiException e){}; -``` - -## Errors - -| HTTP Status Code | Error Description | Exception Class | -| --- | --- | --- | -| 500 | Operation failed | [`ErrorResponseException`](../../doc/models/error-response-exception.md) | - diff --git a/DotNet/doc/controllers/database.md b/DotNet/doc/controllers/database.md deleted file mode 100644 index 996fb88fc..000000000 --- a/DotNet/doc/controllers/database.md +++ /dev/null @@ -1,221 +0,0 @@ -# Database - -```csharp -DatabaseController databaseController = client.DatabaseController; -``` - -## Class Name - -`DatabaseController` - -## Methods - -* [Restapi V2 Get Schemas](../../doc/controllers/database.md#restapi-v2-get-schemas) -* [Restapi V2 Get Tables](../../doc/controllers/database.md#restapi-v2-get-tables) -* [Restapi V2 Get Table Details](../../doc/controllers/database.md#restapi-v2-get-table-details) -* [Restapi V2 Create Table](../../doc/controllers/database.md#restapi-v2-create-table) -* [Restapi V2 Run Query](../../doc/controllers/database.md#restapi-v2-run-query) - - -# Restapi V2 Get Schemas - -To list all the schemas in a database in Falcon, use this endpoint. - -```csharp -RestapiV2GetSchemasAsync( - string database) -``` - -## Parameters - -| Parameter | Type | Tags | Description | -| --- | --- | --- | --- | -| `database` | `string` | Query, Required | Name of the Falcon database | - -## Response Type - -`Task>` - -## Example Usage - -```csharp -string database = "database0"; - -try -{ - List result = await databaseController.RestapiV2GetSchemasAsync(database); -} -catch (ApiException e){}; -``` - -## Errors - -| HTTP Status Code | Error Description | Exception Class | -| --- | --- | --- | -| 500 | Operation failed | [`ErrorResponseException`](../../doc/models/error-response-exception.md) | - - -# Restapi V2 Get Tables - -To list all the tables in a schema of a database in Falcon, use this endpoint. - -```csharp -RestapiV2GetTablesAsync( - string database, - string schema) -``` - -## Parameters - -| Parameter | Type | Tags | Description | -| --- | --- | --- | --- | -| `database` | `string` | Query, Required | Name of the Falcon database | -| `schema` | `string` | Query, Required | Name of the schema in Falcon database | - -## Response Type - -`Task>` - -## Example Usage - -```csharp -string database = "database0"; -string schema = "schema2"; - -try -{ - List result = await databaseController.RestapiV2GetTablesAsync(database, schema); -} -catch (ApiException e){}; -``` - -## Errors - -| HTTP Status Code | Error Description | Exception Class | -| --- | --- | --- | -| 500 | Operation failed | [`ErrorResponseException`](../../doc/models/error-response-exception.md) | - - -# Restapi V2 Get Table Details - -Note: This endpoint is applicable only for on-prem deployments. - -To provide details of a table in a schema of a database in Falcon, use this endpoint. - -```csharp -RestapiV2GetTableDetailsAsync( - string database, - string table, - string schema = null) -``` - -## Parameters - -| Parameter | Type | Tags | Description | -| --- | --- | --- | --- | -| `database` | `string` | Query, Required | Name of the Falcon database | -| `table` | `string` | Query, Required | Name of the table in Falcon database | -| `schema` | `string` | Query, Optional | Name of the schema in Falcon database | - -## Response Type - -`Task` - -## Example Usage - -```csharp -string database = "database0"; -string table = "table2"; - -try -{ - object result = await databaseController.RestapiV2GetTableDetailsAsync(database, table, null); -} -catch (ApiException e){}; -``` - -## Errors - -| HTTP Status Code | Error Description | Exception Class | -| --- | --- | --- | -| 500 | Operation failed | [`ErrorResponseException`](../../doc/models/error-response-exception.md) | - - -# Restapi V2 Create Table - -To create a table in Falcon, use this endpoint. - -```csharp -RestapiV2CreateTableAsync( - Models.TspublicRestV2DatabaseTableCreateRequest body) -``` - -## Parameters - -| Parameter | Type | Tags | Description | -| --- | --- | --- | --- | -| `body` | [`Models.TspublicRestV2DatabaseTableCreateRequest`](../../doc/models/tspublic-rest-v2-database-table-create-request.md) | Body, Required | - | - -## Response Type - -[`Task`](../../doc/models/create-table-response.md) - -## Example Usage - -```csharp -var body = new TspublicRestV2DatabaseTableCreateRequest(); - -try -{ - CreateTableResponse result = await databaseController.RestapiV2CreateTableAsync(body); -} -catch (ApiException e){}; -``` - -## Errors - -| HTTP Status Code | Error Description | Exception Class | -| --- | --- | --- | -| 500 | Operation failed | [`ErrorResponseException`](../../doc/models/error-response-exception.md) | - - -# Restapi V2 Run Query - -To run a TQL statement in Falcon, use this endpoint. You can run only following type of statements - Table DDL alter and Table rows update and delete. - -```csharp -RestapiV2RunQueryAsync( - Models.TspublicRestV2DatabaseTableRunqueryRequest body) -``` - -## Parameters - -| Parameter | Type | Tags | Description | -| --- | --- | --- | --- | -| `body` | [`Models.TspublicRestV2DatabaseTableRunqueryRequest`](../../doc/models/tspublic-rest-v2-database-table-runquery-request.md) | Body, Required | - | - -## Response Type - -`Task` - -## Example Usage - -```csharp -var body = new TspublicRestV2DatabaseTableRunqueryRequest(); -body.Statement = new List(); -body.Statement.Add("statement6"); -body.Statement.Add("statement7"); - -try -{ - object result = await databaseController.RestapiV2RunQueryAsync(body); -} -catch (ApiException e){}; -``` - -## Errors - -| HTTP Status Code | Error Description | Exception Class | -| --- | --- | --- | -| 500 | Operation failed | [`ErrorResponseException`](../../doc/models/error-response-exception.md) | - diff --git a/DotNet/doc/controllers/group.md b/DotNet/doc/controllers/group.md deleted file mode 100644 index 838c0fecd..000000000 --- a/DotNet/doc/controllers/group.md +++ /dev/null @@ -1,469 +0,0 @@ -# Group - -```csharp -GroupController groupController = client.GroupController; -``` - -## Class Name - -`GroupController` - -## Methods - -* [Restapi V2 Get Group](../../doc/controllers/group.md#restapi-v2-get-group) -* [Restapi V2 Create Group](../../doc/controllers/group.md#restapi-v2-create-group) -* [Restapi V2 Update Group](../../doc/controllers/group.md#restapi-v2-update-group) -* [Restapi V2 Delete Group](../../doc/controllers/group.md#restapi-v2-delete-group) -* [Restapi V2 Add Privileges to Group](../../doc/controllers/group.md#restapi-v2-add-privileges-to-group) -* [Restapi V2 Remove Privileges From Group](../../doc/controllers/group.md#restapi-v2-remove-privileges-from-group) -* [Restapi V2 Add Users to Group](../../doc/controllers/group.md#restapi-v2-add-users-to-group) -* [Restapi V2 Remove Users From Group](../../doc/controllers/group.md#restapi-v2-remove-users-from-group) -* [Restapi V2 Add Groups to Group](../../doc/controllers/group.md#restapi-v2-add-groups-to-group) -* [Restapi V2 Remove Groups From Group](../../doc/controllers/group.md#restapi-v2-remove-groups-from-group) -* [Restapi V2 Search Groups](../../doc/controllers/group.md#restapi-v2-search-groups) - - -# Restapi V2 Get Group - -To get the details of a specific group by name or id, use this endpoint. -At Least one value needed. When both are given id will be considered to fetch user information. - -```csharp -RestapiV2GetGroupAsync( - string name = null, - string id = null) -``` - -## Parameters - -| Parameter | Type | Tags | Description | -| --- | --- | --- | --- | -| `name` | `string` | Query, Optional | Name of the group | -| `id` | `string` | Query, Optional | The GUID of the group to query. | - -## Response Type - -[`Task`](../../doc/models/group-response.md) - -## Example Usage - -```csharp -try -{ - GroupResponse result = await groupController.RestapiV2GetGroupAsync(null, null); -} -catch (ApiException e){}; -``` - -## Errors - -| HTTP Status Code | Error Description | Exception Class | -| --- | --- | --- | -| 500 | Operation failed | [`ErrorResponseException`](../../doc/models/error-response-exception.md) | - - -# Restapi V2 Create Group - -To programmatically create a group in the ThoughtSpot system, use this API endpoint. Using this API, you can create a group and assign privileges and users. For ease of user management and access control, ThoughtSpot administrators can create groups and assign privileges to these groups. The privileges determine the actions that the users belonging to a group are allowed to do. ThoughtSpot also has a default group called ALL_GROUP. When you create new group in ThoughtSpot, they are automatically added to ALL_GROUP. You cannot delete the ALL_GROUP or remove members from it. - -```csharp -RestapiV2CreateGroupAsync( - Models.TspublicRestV2GroupCreateRequest body) -``` - -## Parameters - -| Parameter | Type | Tags | Description | -| --- | --- | --- | --- | -| `body` | [`Models.TspublicRestV2GroupCreateRequest`](../../doc/models/tspublic-rest-v2-group-create-request.md) | Body, Required | - | - -## Response Type - -[`Task`](../../doc/models/group-response.md) - -## Example Usage - -```csharp -var body = new TspublicRestV2GroupCreateRequest(); -body.Name = "name6"; -body.DisplayName = "displayName6"; - -try -{ - GroupResponse result = await groupController.RestapiV2CreateGroupAsync(body); -} -catch (ApiException e){}; -``` - -## Errors - -| HTTP Status Code | Error Description | Exception Class | -| --- | --- | --- | -| 500 | Operation failed | [`ErrorResponseException`](../../doc/models/error-response-exception.md) | - - -# Restapi V2 Update Group - -You can use this endpoint to programmatically modify an existing user account. -To modify a user, you require admin user privileges. -At least one of User Id or username is mandatory. When both are given, then user id will be considered and username will be updated - -```csharp -RestapiV2UpdateGroupAsync( - Models.TspublicRestV2GroupUpdateRequest body) -``` - -## Parameters - -| Parameter | Type | Tags | Description | -| --- | --- | --- | --- | -| `body` | [`Models.TspublicRestV2GroupUpdateRequest`](../../doc/models/tspublic-rest-v2-group-update-request.md) | Body, Required | - | - -## Response Type - -`Task` - -## Example Usage - -```csharp -var body = new TspublicRestV2GroupUpdateRequest(); - -try -{ - bool? result = await groupController.RestapiV2UpdateGroupAsync(body); -} -catch (ApiException e){}; -``` - -## Errors - -| HTTP Status Code | Error Description | Exception Class | -| --- | --- | --- | -| 500 | Operation failed | [`ErrorResponseException`](../../doc/models/error-response-exception.md) | - - -# Restapi V2 Delete Group - -To remove a group from the ThoughtSpot system, send a DELETE request to this endpoint. At Least one value needed. When both are given user id will be considered to fetch user information. - -```csharp -RestapiV2DeleteGroupAsync( - string name = null, - string id = null) -``` - -## Parameters - -| Parameter | Type | Tags | Description | -| --- | --- | --- | --- | -| `name` | `string` | Query, Optional | Name of the group. | -| `id` | `string` | Query, Optional | The GUID of the group | - -## Response Type - -`Task` - -## Example Usage - -```csharp -try -{ - bool? result = await groupController.RestapiV2DeleteGroupAsync(null, null); -} -catch (ApiException e){}; -``` - -## Errors - -| HTTP Status Code | Error Description | Exception Class | -| --- | --- | --- | -| 500 | Operation failed | [`ErrorResponseException`](../../doc/models/error-response-exception.md) | - - -# Restapi V2 Add Privileges to Group - -To programmatically add privileges to an existing group, use API endpoint. -When you assign privileges to a group, all the users under to this group inherits the privileges assigned to that group. -At least one of id or name of group is required. When both are given user id will be considered. - -```csharp -RestapiV2AddPrivilegesToGroupAsync( - Models.TspublicRestV2GroupAddprivilegeRequest body) -``` - -## Parameters - -| Parameter | Type | Tags | Description | -| --- | --- | --- | --- | -| `body` | [`Models.TspublicRestV2GroupAddprivilegeRequest`](../../doc/models/tspublic-rest-v2-group-addprivilege-request.md) | Body, Required | - | - -## Response Type - -`Task` - -## Example Usage - -```csharp -var body = new TspublicRestV2GroupAddprivilegeRequest(); - -try -{ - bool? result = await groupController.RestapiV2AddPrivilegesToGroupAsync(body); -} -catch (ApiException e){}; -``` - -## Errors - -| HTTP Status Code | Error Description | Exception Class | -| --- | --- | --- | -| 500 | Operation failed | [`ErrorResponseException`](../../doc/models/error-response-exception.md) | - - -# Restapi V2 Remove Privileges From Group - -To programmatically remove privileges from a group, use API endpoint. The API removes only the privilege association. It does not delete the privilege or group from the Thoughtspot system. At least one of id or name of group is required. When both are given user id will be considered. - -```csharp -RestapiV2RemovePrivilegesFromGroupAsync( - Models.TspublicRestV2GroupRemoveprivilegeRequest body) -``` - -## Parameters - -| Parameter | Type | Tags | Description | -| --- | --- | --- | --- | -| `body` | [`Models.TspublicRestV2GroupRemoveprivilegeRequest`](../../doc/models/tspublic-rest-v2-group-removeprivilege-request.md) | Body, Required | - | - -## Response Type - -`Task` - -## Example Usage - -```csharp -var body = new TspublicRestV2GroupRemoveprivilegeRequest(); - -try -{ - bool? result = await groupController.RestapiV2RemovePrivilegesFromGroupAsync(body); -} -catch (ApiException e){}; -``` - -## Errors - -| HTTP Status Code | Error Description | Exception Class | -| --- | --- | --- | -| 500 | Operation failed | [`ErrorResponseException`](../../doc/models/error-response-exception.md) | - - -# Restapi V2 Add Users to Group - -To programmatically add existing ThoughtSpot users to a group, use this API endpoint. When you assign users to a group, the users inherits the privileges assigned to that group. At least one of id or name of the group is required. When both are given user id will be considered. - -```csharp -RestapiV2AddUsersToGroupAsync( - Models.TspublicRestV2GroupAdduserRequest body) -``` - -## Parameters - -| Parameter | Type | Tags | Description | -| --- | --- | --- | --- | -| `body` | [`Models.TspublicRestV2GroupAdduserRequest`](../../doc/models/tspublic-rest-v2-group-adduser-request.md) | Body, Required | - | - -## Response Type - -`Task` - -## Example Usage - -```csharp -var body = new TspublicRestV2GroupAdduserRequest(); -body.Users = new List(); - -var bodyUsers0 = new UserNameAndIDInput(); -body.Users.Add(bodyUsers0); - - -try -{ - bool? result = await groupController.RestapiV2AddUsersToGroupAsync(body); -} -catch (ApiException e){}; -``` - -## Errors - -| HTTP Status Code | Error Description | Exception Class | -| --- | --- | --- | -| 500 | Operation failed | [`ErrorResponseException`](../../doc/models/error-response-exception.md) | - - -# Restapi V2 Remove Users From Group - -To programmatically remove users from a group, use API endpoint.The API removes only the user association. It does not delete the users or group from the Thoughtspot system. At least one of id or name of group is required. When both are given user id will be considered. - -```csharp -RestapiV2RemoveUsersFromGroupAsync( - Models.TspublicRestV2GroupRemoveuserRequest body) -``` - -## Parameters - -| Parameter | Type | Tags | Description | -| --- | --- | --- | --- | -| `body` | [`Models.TspublicRestV2GroupRemoveuserRequest`](../../doc/models/tspublic-rest-v2-group-removeuser-request.md) | Body, Required | - | - -## Response Type - -`Task` - -## Example Usage - -```csharp -var body = new TspublicRestV2GroupRemoveuserRequest(); -body.Users = new List(); - -var bodyUsers0 = new UserNameAndIDInput(); -body.Users.Add(bodyUsers0); - - -try -{ - bool? result = await groupController.RestapiV2RemoveUsersFromGroupAsync(body); -} -catch (ApiException e){}; -``` - -## Errors - -| HTTP Status Code | Error Description | Exception Class | -| --- | --- | --- | -| 500 | Operation failed | [`ErrorResponseException`](../../doc/models/error-response-exception.md) | - - -# Restapi V2 Add Groups to Group - -To programmatically add existing groups to a group, use API endpoint. When you assign groups to a group, the group inherits the privileges assigned to those groups. At least one of id or name of group is required. When both are given user id will be considered. - -```csharp -RestapiV2AddGroupsToGroupAsync( - Models.TspublicRestV2GroupAddgroupRequest body) -``` - -## Parameters - -| Parameter | Type | Tags | Description | -| --- | --- | --- | --- | -| `body` | [`Models.TspublicRestV2GroupAddgroupRequest`](../../doc/models/tspublic-rest-v2-group-addgroup-request.md) | Body, Required | - | - -## Response Type - -`Task` - -## Example Usage - -```csharp -var body = new TspublicRestV2GroupAddgroupRequest(); -body.Groups = new List(); - -var bodyGroups0 = new GroupNameAndIDInput(); -body.Groups.Add(bodyGroups0); - - -try -{ - bool? result = await groupController.RestapiV2AddGroupsToGroupAsync(body); -} -catch (ApiException e){}; -``` - -## Errors - -| HTTP Status Code | Error Description | Exception Class | -| --- | --- | --- | -| 500 | Operation failed | [`ErrorResponseException`](../../doc/models/error-response-exception.md) | - - -# Restapi V2 Remove Groups From Group - -To programmatically remove groups from a group, use API endpoint.The API removes only the group association. It does not delete the group from the Thoughtspot system. At least one of id or name of group is required. When both are given user id will be considered. - -```csharp -RestapiV2RemoveGroupsFromGroupAsync( - Models.TspublicRestV2GroupRemovegroupRequest body) -``` - -## Parameters - -| Parameter | Type | Tags | Description | -| --- | --- | --- | --- | -| `body` | [`Models.TspublicRestV2GroupRemovegroupRequest`](../../doc/models/tspublic-rest-v2-group-removegroup-request.md) | Body, Required | - | - -## Response Type - -`Task` - -## Example Usage - -```csharp -var body = new TspublicRestV2GroupRemovegroupRequest(); -body.Groups = new List(); - -var bodyGroups0 = new GroupNameAndIDInput(); -body.Groups.Add(bodyGroups0); - - -try -{ - bool? result = await groupController.RestapiV2RemoveGroupsFromGroupAsync(body); -} -catch (ApiException e){}; -``` - -## Errors - -| HTTP Status Code | Error Description | Exception Class | -| --- | --- | --- | -| 500 | Operation failed | [`ErrorResponseException`](../../doc/models/error-response-exception.md) | - - -# Restapi V2 Search Groups - -To get the details of a specific group account or all groups in the ThoughtSpot system, use this end point. - -```csharp -RestapiV2SearchGroupsAsync( - Models.TspublicRestV2GroupSearchRequest body) -``` - -## Parameters - -| Parameter | Type | Tags | Description | -| --- | --- | --- | --- | -| `body` | [`Models.TspublicRestV2GroupSearchRequest`](../../doc/models/tspublic-rest-v2-group-search-request.md) | Body, Required | - | - -## Response Type - -`Task` - -## Example Usage - -```csharp -var body = new TspublicRestV2GroupSearchRequest(); - -try -{ - object result = await groupController.RestapiV2SearchGroupsAsync(body); -} -catch (ApiException e){}; -``` - -## Errors - -| HTTP Status Code | Error Description | Exception Class | -| --- | --- | --- | -| 500 | Operation failed | [`ErrorResponseException`](../../doc/models/error-response-exception.md) | - diff --git a/DotNet/doc/controllers/logs.md b/DotNet/doc/controllers/logs.md deleted file mode 100644 index be04d5ba8..000000000 --- a/DotNet/doc/controllers/logs.md +++ /dev/null @@ -1,60 +0,0 @@ -# Logs - -```csharp -LogsController logsController = client.LogsController; -``` - -## Class Name - -`LogsController` - - -# Restapi V2 Get Log Events - -Note: This endpoint is applicable only for SAAS deployments. - -The ThoughtSpot log streaming service API allows you to programmatically get a security audit event log from the ThoughtSpot system. - -To use this API, make sure you have admin user privileges. - -ThoughtSpot cloud deployments allow you to collect security audit events and send them to your Security information and event management (SIEM) application in real-time. - -These events can help your security operations personnel to detect potential security threats or compromised user accounts in your organization. - -```csharp -RestapiV2GetLogEventsAsync( - Models.TopicEnum topic, - string fromEpoch = null, - string toEpoch = null) -``` - -## Parameters - -| Parameter | Type | Tags | Description | -| --- | --- | --- | --- | -| `topic` | [`Models.TopicEnum`](../../doc/models/topic-enum.md) | Query, Required | Type of the log | -| `fromEpoch` | `string` | Query, Optional | The EPOCH time in milliseconds to set the start time for streaming logs.

Example: To set the timestamp as June 1, 2021 8 am, specify 1622534400000. | -| `toEpoch` | `string` | Query, Optional | The EPOCH time in milliseconds to set the end time for streaming logs.

Example: To set the timestamp as July 1, 2021, 8 am, specify 1625126400000. | - -## Response Type - -[`Task`](../../doc/models/logs-response.md) - -## Example Usage - -```csharp -TopicEnum topic = TopicEnum.SecurityLogs; - -try -{ - LogsResponse result = await logsController.RestapiV2GetLogEventsAsync(topic, null, null); -} -catch (ApiException e){}; -``` - -## Errors - -| HTTP Status Code | Error Description | Exception Class | -| --- | --- | --- | -| 500 | Operation failed | [`ErrorResponseException`](../../doc/models/error-response-exception.md) | - diff --git a/DotNet/doc/controllers/materialization.md b/DotNet/doc/controllers/materialization.md deleted file mode 100644 index 0868fd440..000000000 --- a/DotNet/doc/controllers/materialization.md +++ /dev/null @@ -1,49 +0,0 @@ -# Materialization - -```csharp -MaterializationController materializationController = client.MaterializationController; -``` - -## Class Name - -`MaterializationController` - - -# Restapi V2 Refresh Materialized View - -Use this endpoint to refresh data in the materialized view by running the query associated with it - -```csharp -RestapiV2RefreshMaterializedViewAsync( - Models.TspublicRestV2MaterializationRefreshviewRequest body) -``` - -## Parameters - -| Parameter | Type | Tags | Description | -| --- | --- | --- | --- | -| `body` | [`Models.TspublicRestV2MaterializationRefreshviewRequest`](../../doc/models/tspublic-rest-v2-materialization-refreshview-request.md) | Body, Required | - | - -## Response Type - -`Task` - -## Example Usage - -```csharp -var body = new TspublicRestV2MaterializationRefreshviewRequest(); -body.Id = "id6"; - -try -{ - object result = await materializationController.RestapiV2RefreshMaterializedViewAsync(body); -} -catch (ApiException e){}; -``` - -## Errors - -| HTTP Status Code | Error Description | Exception Class | -| --- | --- | --- | -| 500 | Operation failed | [`ErrorResponseException`](../../doc/models/error-response-exception.md) | - diff --git a/DotNet/doc/controllers/metadata.md b/DotNet/doc/controllers/metadata.md deleted file mode 100644 index 7c7d57eb6..000000000 --- a/DotNet/doc/controllers/metadata.md +++ /dev/null @@ -1,890 +0,0 @@ -# Metadata - -```csharp -MetadataController metadataController = client.MetadataController; -``` - -## Class Name - -`MetadataController` - -## Methods - -* [Restapi V2 Get Tag](../../doc/controllers/metadata.md#restapi-v2-get-tag) -* [Restapi V2 Get Home Liveboard](../../doc/controllers/metadata.md#restapi-v2-get-home-liveboard) -* [Restapi V2 Search Object Header](../../doc/controllers/metadata.md#restapi-v2-search-object-header) -* [Restapi V2 Get Object Visualization Header](../../doc/controllers/metadata.md#restapi-v2-get-object-visualization-header) -* [Restapi V2 Get Object Detail](../../doc/controllers/metadata.md#restapi-v2-get-object-detail) -* [Restapi V2 Get Object Header](../../doc/controllers/metadata.md#restapi-v2-get-object-header) -* [Restapi V2 Search Object Detail](../../doc/controllers/metadata.md#restapi-v2-search-object-detail) -* [Restapi V2 Create Tag](../../doc/controllers/metadata.md#restapi-v2-create-tag) -* [Restapi V2 Update Tag](../../doc/controllers/metadata.md#restapi-v2-update-tag) -* [Restapi V2 Delete Tag](../../doc/controllers/metadata.md#restapi-v2-delete-tag) -* [Restapi V2 Assign Tag](../../doc/controllers/metadata.md#restapi-v2-assign-tag) -* [Restapi V2 Unassign Tag](../../doc/controllers/metadata.md#restapi-v2-unassign-tag) -* [Restapi V2 Assign Favorite](../../doc/controllers/metadata.md#restapi-v2-assign-favorite) -* [Restapi V2 Unassign Favorite](../../doc/controllers/metadata.md#restapi-v2-unassign-favorite) -* [Restapi V2 Assign Home Liveboard](../../doc/controllers/metadata.md#restapi-v2-assign-home-liveboard) -* [Restapi V2 Unassign Home Liveboard](../../doc/controllers/metadata.md#restapi-v2-unassign-home-liveboard) -* [Restapi V2 Export Object TML](../../doc/controllers/metadata.md#restapi-v2-export-object-tml) -* [Restapi V2 Import Object TML](../../doc/controllers/metadata.md#restapi-v2-import-object-tml) -* [Restapi V2 Delete Object](../../doc/controllers/metadata.md#restapi-v2-delete-object) -* [Restapi V2 Get Object Dependency](../../doc/controllers/metadata.md#restapi-v2-get-object-dependency) - - -# Restapi V2 Get Tag - -To get details of a specific tag, use this endpoint. At least one of id or name of tag is required. When both are given, then id will be considered. - -```csharp -RestapiV2GetTagAsync( - string name = null, - string id = null) -``` - -## Parameters - -| Parameter | Type | Tags | Description | -| --- | --- | --- | --- | -| `name` | `string` | Query, Optional | Name of the tag | -| `id` | `string` | Query, Optional | The GUID of the tag | - -## Response Type - -[`Task`](../../doc/models/metadata-tag-response.md) - -## Example Usage - -```csharp -try -{ - MetadataTagResponse result = await metadataController.RestapiV2GetTagAsync(null, null); -} -catch (ApiException e){}; -``` - -## Errors - -| HTTP Status Code | Error Description | Exception Class | -| --- | --- | --- | -| 500 | Operation failed | [`ErrorResponseException`](../../doc/models/error-response-exception.md) | - - -# Restapi V2 Get Home Liveboard - -To get the name and id of liveboard that is set as a home liveboard for a user, use this endpoint. At least one of user id or username is required. When both are given, then id will be considered. - -```csharp -RestapiV2GetHomeLiveboardAsync( - string userName = null, - string userId = null) -``` - -## Parameters - -| Parameter | Type | Tags | Description | -| --- | --- | --- | --- | -| `userName` | `string` | Query, Optional | Name of the tag | -| `userId` | `string` | Query, Optional | The GUID of the tag | - -## Response Type - -[`Task`](../../doc/models/home-liveboard-response.md) - -## Example Usage - -```csharp -try -{ - HomeLiveboardResponse result = await metadataController.RestapiV2GetHomeLiveboardAsync(null, null); -} -catch (ApiException e){}; -``` - -## Errors - -| HTTP Status Code | Error Description | Exception Class | -| --- | --- | --- | -| 500 | Operation failed | [`ErrorResponseException`](../../doc/models/error-response-exception.md) | - - -# Restapi V2 Search Object Header - -To get header details for metadata objects, use this endpoint. You can provide as input selective fields to get the data for. - -```csharp -RestapiV2SearchObjectHeaderAsync( - Models.TspublicRestV2MetadataHeaderSearchRequest body) -``` - -## Parameters - -| Parameter | Type | Tags | Description | -| --- | --- | --- | --- | -| `body` | [`Models.TspublicRestV2MetadataHeaderSearchRequest`](../../doc/models/tspublic-rest-v2-metadata-header-search-request.md) | Body, Required | - | - -## Response Type - -`Task` - -## Example Usage - -```csharp -var body = new TspublicRestV2MetadataHeaderSearchRequest(); -body.Type = Type3Enum.USER; - -try -{ - object result = await metadataController.RestapiV2SearchObjectHeaderAsync(body); -} -catch (ApiException e){}; -``` - -## Errors - -| HTTP Status Code | Error Description | Exception Class | -| --- | --- | --- | -| 500 | Operation failed | [`ErrorResponseException`](../../doc/models/error-response-exception.md) | - - -# Restapi V2 Get Object Visualization Header - -Use this endpoint to get header details of visualization charts for a given liveboard or answer. At least one of id or name of liveboard or answer is required. When both are given, then id will be considered. - -```csharp -RestapiV2GetObjectVisualizationHeaderAsync( - string id) -``` - -## Parameters - -| Parameter | Type | Tags | Description | -| --- | --- | --- | --- | -| `id` | `string` | Query, Required | The GUID of the liveboard or answer | - -## Response Type - -`Task` - -## Example Usage - -```csharp -string id = "id0"; - -try -{ - object result = await metadataController.RestapiV2GetObjectVisualizationHeaderAsync(id); -} -catch (ApiException e){}; -``` - -## Errors - -| HTTP Status Code | Error Description | Exception Class | -| --- | --- | --- | -| 500 | Operation failed | [`ErrorResponseException`](../../doc/models/error-response-exception.md) | - - -# Restapi V2 Get Object Detail - -Use this endpoint to get full details of metadata objects - -```csharp -RestapiV2GetObjectDetailAsync( - Models.Type4Enum type, - List id) -``` - -## Parameters - -| Parameter | Type | Tags | Description | -| --- | --- | --- | --- | -| `type` | [`Models.Type4Enum`](../../doc/models/type-4-enum.md) | Query, Required | Type of the metadata object being searched. | -| `id` | `List` | Query, Required | A JSON array of GUIDs of the objects. | - -## Response Type - -`Task` - -## Example Usage - -```csharp -Type4Enum type = Type4Enum.DATAOBJECT; -var id = new List(); -id.Add("id0"); - -try -{ - object result = await metadataController.RestapiV2GetObjectDetailAsync(type, id); -} -catch (ApiException e){}; -``` - -## Errors - -| HTTP Status Code | Error Description | Exception Class | -| --- | --- | --- | -| 500 | Operation failed | [`ErrorResponseException`](../../doc/models/error-response-exception.md) | - - -# Restapi V2 Get Object Header - -To get header detail of a metadata object, use this endpoint. You can provide as input selective fields to get the data for. - -```csharp -RestapiV2GetObjectHeaderAsync( - Models.Type5Enum type, - string id, - List outputFields = null) -``` - -## Parameters - -| Parameter | Type | Tags | Description | -| --- | --- | --- | --- | -| `type` | [`Models.Type5Enum`](../../doc/models/type-5-enum.md) | Query, Required | Type of the metadata object being searched. | -| `id` | `string` | Query, Required | GUID of the metadata object | -| `outputFields` | `List` | Query, Optional | Array of header field names that need to be included in the header response | - -## Response Type - -`Task` - -## Example Usage - -```csharp -Type5Enum type = Type5Enum.COLUMNALL; -string id = "id0"; - -try -{ - object result = await metadataController.RestapiV2GetObjectHeaderAsync(type, id, null); -} -catch (ApiException e){}; -``` - -## Errors - -| HTTP Status Code | Error Description | Exception Class | -| --- | --- | --- | -| 500 | Operation failed | [`ErrorResponseException`](../../doc/models/error-response-exception.md) | - - -# Restapi V2 Search Object Detail - -Use this endpoint to get full details of metadata objects - -```csharp -RestapiV2SearchObjectDetailAsync( - Models.TspublicRestV2MetadataDetailSearchRequest body) -``` - -## Parameters - -| Parameter | Type | Tags | Description | -| --- | --- | --- | --- | -| `body` | [`Models.TspublicRestV2MetadataDetailSearchRequest`](../../doc/models/tspublic-rest-v2-metadata-detail-search-request.md) | Body, Required | - | - -## Response Type - -`Task` - -## Example Usage - -```csharp -var body = new TspublicRestV2MetadataDetailSearchRequest(); -body.Type = Type6Enum.USER; -body.Id = new List(); -body.Id.Add("id6"); -body.Id.Add("id7"); - -try -{ - object result = await metadataController.RestapiV2SearchObjectDetailAsync(body); -} -catch (ApiException e){}; -``` - -## Errors - -| HTTP Status Code | Error Description | Exception Class | -| --- | --- | --- | -| 500 | Operation failed | [`ErrorResponseException`](../../doc/models/error-response-exception.md) | - - -# Restapi V2 Create Tag - -To programmatically create tags, use this endpoint - -```csharp -RestapiV2CreateTagAsync( - Models.TspublicRestV2MetadataTagCreateRequest body) -``` - -## Parameters - -| Parameter | Type | Tags | Description | -| --- | --- | --- | --- | -| `body` | [`Models.TspublicRestV2MetadataTagCreateRequest`](../../doc/models/tspublic-rest-v2-metadata-tag-create-request.md) | Body, Required | - | - -## Response Type - -[`Task`](../../doc/models/metadata-tag-response.md) - -## Example Usage - -```csharp -var body = new TspublicRestV2MetadataTagCreateRequest(); -body.Name = "name6"; - -try -{ - MetadataTagResponse result = await metadataController.RestapiV2CreateTagAsync(body); -} -catch (ApiException e){}; -``` - -## Errors - -| HTTP Status Code | Error Description | Exception Class | -| --- | --- | --- | -| 500 | Operation failed | [`ErrorResponseException`](../../doc/models/error-response-exception.md) | - - -# Restapi V2 Update Tag - -To programmatically update tags, use this endpoint. At least one of id or name of tag is required. When both are given, then id will be considered. - -```csharp -RestapiV2UpdateTagAsync( - Models.TspublicRestV2MetadataTagUpdateRequest body) -``` - -## Parameters - -| Parameter | Type | Tags | Description | -| --- | --- | --- | --- | -| `body` | [`Models.TspublicRestV2MetadataTagUpdateRequest`](../../doc/models/tspublic-rest-v2-metadata-tag-update-request.md) | Body, Required | - | - -## Response Type - -`Task` - -## Example Usage - -```csharp -var body = new TspublicRestV2MetadataTagUpdateRequest(); - -try -{ - bool? result = await metadataController.RestapiV2UpdateTagAsync(body); -} -catch (ApiException e){}; -``` - -## Errors - -| HTTP Status Code | Error Description | Exception Class | -| --- | --- | --- | -| 500 | Operation failed | [`ErrorResponseException`](../../doc/models/error-response-exception.md) | - - -# Restapi V2 Delete Tag - -To programmatically delete tags, use this endpoint. At least one of id or name of tag is required. When both are given, then id will be considered. - -```csharp -RestapiV2DeleteTagAsync( - string name = null, - string id = null) -``` - -## Parameters - -| Parameter | Type | Tags | Description | -| --- | --- | --- | --- | -| `name` | `string` | Query, Optional | Name of the tag | -| `id` | `string` | Query, Optional | The GUID of the tag | - -## Response Type - -`Task` - -## Example Usage - -```csharp -try -{ - bool? result = await metadataController.RestapiV2DeleteTagAsync(null, null); -} -catch (ApiException e){}; -``` - -## Errors - -| HTTP Status Code | Error Description | Exception Class | -| --- | --- | --- | -| 500 | Operation failed | [`ErrorResponseException`](../../doc/models/error-response-exception.md) | - - -# Restapi V2 Assign Tag - -To programmatically assign tags to a metadata object, such as a liveboard, search answer, table, worksheet, or view, use this endpoint. At least one of id or name of tag is required. When both are given, then id will be considered. - -```csharp -RestapiV2AssignTagAsync( - Models.TspublicRestV2MetadataTagAssignRequest body) -``` - -## Parameters - -| Parameter | Type | Tags | Description | -| --- | --- | --- | --- | -| `body` | [`Models.TspublicRestV2MetadataTagAssignRequest`](../../doc/models/tspublic-rest-v2-metadata-tag-assign-request.md) | Body, Required | - | - -## Response Type - -`Task` - -## Example Usage - -```csharp -var body = new TspublicRestV2MetadataTagAssignRequest(); -body.TsObject = new List(); - -var bodyTsObject0 = new TsObjectInput(); -bodyTsObject0.Id = "id8"; -bodyTsObject0.Type = TypeEnum.DATAOBJECT; -body.TsObject.Add(bodyTsObject0); - -var bodyTsObject1 = new TsObjectInput(); -bodyTsObject1.Id = "id9"; -bodyTsObject1.Type = TypeEnum.CONNECTION; -body.TsObject.Add(bodyTsObject1); - -var bodyTsObject2 = new TsObjectInput(); -bodyTsObject2.Id = "id0"; -bodyTsObject2.Type = TypeEnum.ANSWER; -body.TsObject.Add(bodyTsObject2); - - -try -{ - bool? result = await metadataController.RestapiV2AssignTagAsync(body); -} -catch (ApiException e){}; -``` - -## Errors - -| HTTP Status Code | Error Description | Exception Class | -| --- | --- | --- | -| 500 | Operation failed | [`ErrorResponseException`](../../doc/models/error-response-exception.md) | - - -# Restapi V2 Unassign Tag - -To programmatically unassign tags to a metadata object, such as a liveboard, search answer, table, worksheet, or view, use this endpoint. At least one of id or name of tag is required. When both are given, then id will be considered. - -```csharp -RestapiV2UnassignTagAsync( - Models.TspublicRestV2MetadataTagUnassignRequest body) -``` - -## Parameters - -| Parameter | Type | Tags | Description | -| --- | --- | --- | --- | -| `body` | [`Models.TspublicRestV2MetadataTagUnassignRequest`](../../doc/models/tspublic-rest-v2-metadata-tag-unassign-request.md) | Body, Required | - | - -## Response Type - -`Task` - -## Example Usage - -```csharp -var body = new TspublicRestV2MetadataTagUnassignRequest(); -body.TsObject = new List(); - -var bodyTsObject0 = new TsObjectInput(); -bodyTsObject0.Id = "id8"; -bodyTsObject0.Type = TypeEnum.DATAOBJECT; -body.TsObject.Add(bodyTsObject0); - -var bodyTsObject1 = new TsObjectInput(); -bodyTsObject1.Id = "id9"; -bodyTsObject1.Type = TypeEnum.CONNECTION; -body.TsObject.Add(bodyTsObject1); - -var bodyTsObject2 = new TsObjectInput(); -bodyTsObject2.Id = "id0"; -bodyTsObject2.Type = TypeEnum.ANSWER; -body.TsObject.Add(bodyTsObject2); - - -try -{ - bool? result = await metadataController.RestapiV2UnassignTagAsync(body); -} -catch (ApiException e){}; -``` - -## Errors - -| HTTP Status Code | Error Description | Exception Class | -| --- | --- | --- | -| 500 | Operation failed | [`ErrorResponseException`](../../doc/models/error-response-exception.md) | - - -# Restapi V2 Assign Favorite - -To programmatically assign objects to favorites for a given user account, use this endpoint. At least one of user id or username is required. When both are given, then id will be considered. - -```csharp -RestapiV2AssignFavoriteAsync( - Models.TspublicRestV2MetadataFavoriteAssignRequest body) -``` - -## Parameters - -| Parameter | Type | Tags | Description | -| --- | --- | --- | --- | -| `body` | [`Models.TspublicRestV2MetadataFavoriteAssignRequest`](../../doc/models/tspublic-rest-v2-metadata-favorite-assign-request.md) | Body, Required | - | - -## Response Type - -`Task` - -## Example Usage - -```csharp -var body = new TspublicRestV2MetadataFavoriteAssignRequest(); -body.TsObject = new List(); - -var bodyTsObject0 = new TsObjectInput(); -bodyTsObject0.Id = "id8"; -bodyTsObject0.Type = TypeEnum.DATAOBJECT; -body.TsObject.Add(bodyTsObject0); - -var bodyTsObject1 = new TsObjectInput(); -bodyTsObject1.Id = "id9"; -bodyTsObject1.Type = TypeEnum.CONNECTION; -body.TsObject.Add(bodyTsObject1); - -var bodyTsObject2 = new TsObjectInput(); -bodyTsObject2.Id = "id0"; -bodyTsObject2.Type = TypeEnum.ANSWER; -body.TsObject.Add(bodyTsObject2); - - -try -{ - bool? result = await metadataController.RestapiV2AssignFavoriteAsync(body); -} -catch (ApiException e){}; -``` - -## Errors - -| HTTP Status Code | Error Description | Exception Class | -| --- | --- | --- | -| 500 | Operation failed | [`ErrorResponseException`](../../doc/models/error-response-exception.md) | - - -# Restapi V2 Unassign Favorite - -To programmatically unassign objects to favorites for a given user account, use this endpoint. At least one of user id or username is required. When both are given, then id will be considered. - -```csharp -RestapiV2UnassignFavoriteAsync( - Models.TspublicRestV2MetadataFavoriteUnassignRequest body) -``` - -## Parameters - -| Parameter | Type | Tags | Description | -| --- | --- | --- | --- | -| `body` | [`Models.TspublicRestV2MetadataFavoriteUnassignRequest`](../../doc/models/tspublic-rest-v2-metadata-favorite-unassign-request.md) | Body, Required | - | - -## Response Type - -`Task` - -## Example Usage - -```csharp -var body = new TspublicRestV2MetadataFavoriteUnassignRequest(); -body.TsObject = new List(); - -var bodyTsObject0 = new TsObjectInput(); -bodyTsObject0.Id = "id8"; -bodyTsObject0.Type = TypeEnum.DATAOBJECT; -body.TsObject.Add(bodyTsObject0); - -var bodyTsObject1 = new TsObjectInput(); -bodyTsObject1.Id = "id9"; -bodyTsObject1.Type = TypeEnum.CONNECTION; -body.TsObject.Add(bodyTsObject1); - -var bodyTsObject2 = new TsObjectInput(); -bodyTsObject2.Id = "id0"; -bodyTsObject2.Type = TypeEnum.ANSWER; -body.TsObject.Add(bodyTsObject2); - - -try -{ - bool? result = await metadataController.RestapiV2UnassignFavoriteAsync(body); -} -catch (ApiException e){}; -``` - -## Errors - -| HTTP Status Code | Error Description | Exception Class | -| --- | --- | --- | -| 500 | Operation failed | [`ErrorResponseException`](../../doc/models/error-response-exception.md) | - - -# Restapi V2 Assign Home Liveboard - -To assign a specific liveboard as a home liveboard for a user, use this endpoint. At least one of user id or username is required. When both are given, then id will be considered. - -```csharp -RestapiV2AssignHomeLiveboardAsync( - Models.TspublicRestV2MetadataHomeliveboardAssignRequest body) -``` - -## Parameters - -| Parameter | Type | Tags | Description | -| --- | --- | --- | --- | -| `body` | [`Models.TspublicRestV2MetadataHomeliveboardAssignRequest`](../../doc/models/tspublic-rest-v2-metadata-homeliveboard-assign-request.md) | Body, Required | - | - -## Response Type - -`Task` - -## Example Usage - -```csharp -var body = new TspublicRestV2MetadataHomeliveboardAssignRequest(); - -try -{ - bool? result = await metadataController.RestapiV2AssignHomeLiveboardAsync(body); -} -catch (ApiException e){}; -``` - -## Errors - -| HTTP Status Code | Error Description | Exception Class | -| --- | --- | --- | -| 500 | Operation failed | [`ErrorResponseException`](../../doc/models/error-response-exception.md) | - - -# Restapi V2 Unassign Home Liveboard - -To unassign the home liveboard set for a user, use this endpoint. At least one of user id or username is required. When both are given, then id will be considered. - -```csharp -RestapiV2UnassignHomeLiveboardAsync( - Models.TspublicRestV2MetadataHomeliveboardUnassignRequest body) -``` - -## Parameters - -| Parameter | Type | Tags | Description | -| --- | --- | --- | --- | -| `body` | [`Models.TspublicRestV2MetadataHomeliveboardUnassignRequest`](../../doc/models/tspublic-rest-v2-metadata-homeliveboard-unassign-request.md) | Body, Required | - | - -## Response Type - -`Task` - -## Example Usage - -```csharp -var body = new TspublicRestV2MetadataHomeliveboardUnassignRequest(); - -try -{ - bool? result = await metadataController.RestapiV2UnassignHomeLiveboardAsync(body); -} -catch (ApiException e){}; -``` - -## Errors - -| HTTP Status Code | Error Description | Exception Class | -| --- | --- | --- | -| 500 | Operation failed | [`ErrorResponseException`](../../doc/models/error-response-exception.md) | - - -# Restapi V2 Export Object TML - -To export ThoughtSpot objects represented in ThoughtSpot Modeling Language (TML), use this endpoint - -```csharp -RestapiV2ExportObjectTMLAsync( - Models.TspublicRestV2MetadataTmlExportRequest body) -``` - -## Parameters - -| Parameter | Type | Tags | Description | -| --- | --- | --- | --- | -| `body` | [`Models.TspublicRestV2MetadataTmlExportRequest`](../../doc/models/tspublic-rest-v2-metadata-tml-export-request.md) | Body, Required | - | - -## Response Type - -`Task` - -## Example Usage - -```csharp -var body = new TspublicRestV2MetadataTmlExportRequest(); -body.Id = new List(); -body.Id.Add("id6"); -body.Id.Add("id7"); - -try -{ - object result = await metadataController.RestapiV2ExportObjectTMLAsync(body); -} -catch (ApiException e){}; -``` - -## Errors - -| HTTP Status Code | Error Description | Exception Class | -| --- | --- | --- | -| 500 | Operation failed | [`ErrorResponseException`](../../doc/models/error-response-exception.md) | - - -# Restapi V2 Import Object TML - -To import ThoughtSpot objects represented in ThoughtSpot Modeling Language (TML), use this endpoint - -```csharp -RestapiV2ImportObjectTMLAsync( - Models.TspublicRestV2MetadataTmlImportRequest body) -``` - -## Parameters - -| Parameter | Type | Tags | Description | -| --- | --- | --- | --- | -| `body` | [`Models.TspublicRestV2MetadataTmlImportRequest`](../../doc/models/tspublic-rest-v2-metadata-tml-import-request.md) | Body, Required | - | - -## Response Type - -`Task` - -## Example Usage - -```csharp -var body = new TspublicRestV2MetadataTmlImportRequest(); -body.ObjectTML = new List(); -body.ObjectTML.Add("objectTML5"); -body.ObjectTML.Add("objectTML6"); - -try -{ - object result = await metadataController.RestapiV2ImportObjectTMLAsync(body); -} -catch (ApiException e){}; -``` - -## Errors - -| HTTP Status Code | Error Description | Exception Class | -| --- | --- | --- | -| 500 | Operation failed | [`ErrorResponseException`](../../doc/models/error-response-exception.md) | - - -# Restapi V2 Delete Object - -Use this endpoint to delete the metadata objects - -```csharp -RestapiV2DeleteObjectAsync( - Models.Type4Enum type, - List id) -``` - -## Parameters - -| Parameter | Type | Tags | Description | -| --- | --- | --- | --- | -| `type` | [`Models.Type4Enum`](../../doc/models/type-4-enum.md) | Query, Required | Type of the metadata object being searched | -| `id` | `List` | Query, Required | A JSON array of GUIDs of the objects | - -## Response Type - -`Task` - -## Example Usage - -```csharp -Type4Enum type = Type4Enum.DATAOBJECT; -var id = new List(); -id.Add("id0"); - -try -{ - bool? result = await metadataController.RestapiV2DeleteObjectAsync(type, id); -} -catch (ApiException e){}; -``` - -## Errors - -| HTTP Status Code | Error Description | Exception Class | -| --- | --- | --- | -| 500 | Operation failed | [`ErrorResponseException`](../../doc/models/error-response-exception.md) | - - -# Restapi V2 Get Object Dependency - -To query the details of dependent objects and associate objects as dependents, you can use this API. Dependency is defined as relation between referenced and referencing objects. A referencing object is said to have a dependency on a referenced object, if the referenced object cannot be deleted without first deleting the referencing object. For example, consider a worksheet 'W1' that has a derived logical column 'C1' that has a reference to a base logical column 'C2'. This can be shown diagramatically as: W1-->C1-->C2. W1 has a dependency on C2 i.e. W1 is a referencing object and C2 is a referenced object. It is not possible to delete C2 without first deleting W1 because deletion of C2 will be prevented by the relationship between W1's column C1 and C2. Similarly C1 is said to have a dependency on C2 i.e. C1 is a referencing object and C2 is a referenced object. It is not possible to delete C2 without first deleting C1 - -```csharp -RestapiV2GetObjectDependencyAsync( - Models.TspublicRestV2MetadataDependencyRequest body) -``` - -## Parameters - -| Parameter | Type | Tags | Description | -| --- | --- | --- | --- | -| `body` | [`Models.TspublicRestV2MetadataDependencyRequest`](../../doc/models/tspublic-rest-v2-metadata-dependency-request.md) | Body, Required | - | - -## Response Type - -`Task` - -## Example Usage - -```csharp -var body = new TspublicRestV2MetadataDependencyRequest(); -body.Type = Type13Enum.COLUMN; -body.Id = new List(); -body.Id.Add("id6"); -body.Id.Add("id7"); - -try -{ - object result = await metadataController.RestapiV2GetObjectDependencyAsync(body); -} -catch (ApiException e){}; -``` - -## Errors - -| HTTP Status Code | Error Description | Exception Class | -| --- | --- | --- | -| 500 | Operation failed | [`ErrorResponseException`](../../doc/models/error-response-exception.md) | - diff --git a/DotNet/doc/controllers/org.md b/DotNet/doc/controllers/org.md deleted file mode 100644 index 57eb235ed..000000000 --- a/DotNet/doc/controllers/org.md +++ /dev/null @@ -1,227 +0,0 @@ -# Org - -```csharp -OrgController orgController = client.OrgController; -``` - -## Class Name - -`OrgController` - -## Methods - -* [Restapi V2 Get Org](../../doc/controllers/org.md#restapi-v2-get-org) -* [Restapi V2 Create Org](../../doc/controllers/org.md#restapi-v2-create-org) -* [Restapi V2 Update Org](../../doc/controllers/org.md#restapi-v2-update-org) -* [Restapi V2 Delete Org](../../doc/controllers/org.md#restapi-v2-delete-org) -* [Restapi V2 Search Orgs](../../doc/controllers/org.md#restapi-v2-search-orgs) - - -# Restapi V2 Get Org - -To get the details of a specific organization by name or id, use this endpoint. - -At least one value needed. When both are given,then id will be considered to fetch organization information. - -Requires Administration privilege for tenant. - -```csharp -RestapiV2GetOrgAsync( - string name = null, - int? id = null) -``` - -## Parameters - -| Parameter | Type | Tags | Description | -| --- | --- | --- | --- | -| `name` | `string` | Query, Optional | Name of the organization. | -| `id` | `int?` | Query, Optional | The ID of the organization. | - -## Response Type - -[`Task`](../../doc/models/orgs-response.md) - -## Example Usage - -```csharp -try -{ - OrgsResponse result = await orgController.RestapiV2GetOrgAsync(null, null); -} -catch (ApiException e){}; -``` - -## Errors - -| HTTP Status Code | Error Description | Exception Class | -| --- | --- | --- | -| 500 | Operation failed | [`ErrorResponseException`](../../doc/models/error-response-exception.md) | - - -# Restapi V2 Create Org - -To programmatically create an organization in the ThoughtSpot system, use this API endpoint. - -Requires Administration privilege for tenant. - -```csharp -RestapiV2CreateOrgAsync( - Models.TspublicRestV2OrgCreateRequest body) -``` - -## Parameters - -| Parameter | Type | Tags | Description | -| --- | --- | --- | --- | -| `body` | [`Models.TspublicRestV2OrgCreateRequest`](../../doc/models/tspublic-rest-v2-org-create-request.md) | Body, Required | - | - -## Response Type - -[`Task`](../../doc/models/orgs-response.md) - -## Example Usage - -```csharp -var body = new TspublicRestV2OrgCreateRequest(); -body.Name = "name6"; - -try -{ - OrgsResponse result = await orgController.RestapiV2CreateOrgAsync(body); -} -catch (ApiException e){}; -``` - -## Errors - -| HTTP Status Code | Error Description | Exception Class | -| --- | --- | --- | -| 500 | Operation failed | [`ErrorResponseException`](../../doc/models/error-response-exception.md) | - - -# Restapi V2 Update Org - -You can use this endpoint to programmatically modify an existing org. - -Provide name or id of the organization to update the properties. When both id and name are given, then id will be considered and name of the organization will be updated. - -Requires Administration privilege for tenant. - -```csharp -RestapiV2UpdateOrgAsync( - Models.TspublicRestV2OrgUpdateRequest body) -``` - -## Parameters - -| Parameter | Type | Tags | Description | -| --- | --- | --- | --- | -| `body` | [`Models.TspublicRestV2OrgUpdateRequest`](../../doc/models/tspublic-rest-v2-org-update-request.md) | Body, Required | - | - -## Response Type - -[`Task`](../../doc/models/orgs-response.md) - -## Example Usage - -```csharp -var body = new TspublicRestV2OrgUpdateRequest(); - -try -{ - OrgsResponse result = await orgController.RestapiV2UpdateOrgAsync(body); -} -catch (ApiException e){}; -``` - -## Errors - -| HTTP Status Code | Error Description | Exception Class | -| --- | --- | --- | -| 500 | Operation failed | [`ErrorResponseException`](../../doc/models/error-response-exception.md) | - - -# Restapi V2 Delete Org - -To remove an organization from the ThoughtSpot system, send a DELETE request to this endpoint. - -At least one value is needed. When both id and name are given, then id will be considered. - -Requires Administration privilege for tenant. - -```csharp -RestapiV2DeleteOrgAsync( - string name = null, - int? id = null) -``` - -## Parameters - -| Parameter | Type | Tags | Description | -| --- | --- | --- | --- | -| `name` | `string` | Query, Optional | Name of the organization. | -| `id` | `int?` | Query, Optional | The ID of the organization. | - -## Response Type - -`Task` - -## Example Usage - -```csharp -try -{ - bool? result = await orgController.RestapiV2DeleteOrgAsync(null, null); -} -catch (ApiException e){}; -``` - -## Errors - -| HTTP Status Code | Error Description | Exception Class | -| --- | --- | --- | -| 500 | Operation failed | [`ErrorResponseException`](../../doc/models/error-response-exception.md) | - - -# Restapi V2 Search Orgs - -To get the details of a specific organization or all organizations in the ThoughtSpot system use this end point. - -If no input is provided, then all organizations are included in the response. - -Requires Administration privilege for tenant. - -```csharp -RestapiV2SearchOrgsAsync( - Models.TspublicRestV2OrgSearchRequest body) -``` - -## Parameters - -| Parameter | Type | Tags | Description | -| --- | --- | --- | --- | -| `body` | [`Models.TspublicRestV2OrgSearchRequest`](../../doc/models/tspublic-rest-v2-org-search-request.md) | Body, Required | - | - -## Response Type - -[`Task>`](../../doc/models/orgs-response.md) - -## Example Usage - -```csharp -var body = new TspublicRestV2OrgSearchRequest(); - -try -{ - List result = await orgController.RestapiV2SearchOrgsAsync(body); -} -catch (ApiException e){}; -``` - -## Errors - -| HTTP Status Code | Error Description | Exception Class | -| --- | --- | --- | -| 500 | Operation failed | [`ErrorResponseException`](../../doc/models/error-response-exception.md) | - diff --git a/DotNet/doc/controllers/report.md b/DotNet/doc/controllers/report.md deleted file mode 100644 index d27794a7b..000000000 --- a/DotNet/doc/controllers/report.md +++ /dev/null @@ -1,108 +0,0 @@ -# Report - -```csharp -ReportController reportController = client.ReportController; -``` - -## Class Name - -`ReportController` - -## Methods - -* [Restapi V2 Answer Report](../../doc/controllers/report.md#restapi-v2-answer-report) -* [Restapi V2 Liveboard Report](../../doc/controllers/report.md#restapi-v2-liveboard-report) - - -# Restapi V2 Answer Report - -To programmatically download Answer data as a file, use this endpoint. - -The PDF will download data in the tabular format even if Answer is saved as chart. - -```csharp -RestapiV2AnswerReportAsync( - string id, - Models.Type16Enum type) -``` - -## Parameters - -| Parameter | Type | Tags | Description | -| --- | --- | --- | --- | -| `id` | `string` | Query, Required | GUID of the Answer to download. | -| `type` | [`Models.Type16Enum`](../../doc/models/type-16-enum.md) | Query, Required | Type of file to be generated. | - -## Response Type - -`Task` - -## Example Usage - -```csharp -string id = "id0"; -Type16Enum type = Type16Enum.PDF; - -try -{ - object result = await reportController.RestapiV2AnswerReportAsync(id, type); -} -catch (ApiException e){}; -``` - -## Errors - -| HTTP Status Code | Error Description | Exception Class | -| --- | --- | --- | -| 500 | Operation failed | [`ErrorResponseException`](../../doc/models/error-response-exception.md) | - - -# Restapi V2 Liveboard Report - -To programmatically download Liveboard data or specific Visualization data from Liveboard as a file, use this endpoint - -```csharp -RestapiV2LiveboardReportAsync( - Models.Type16Enum type, - string id = null, - List vizId = null, - string transientContent = null, - string runtimeFilter = null, - string runtimeSort = null, - Models.PdfOptionsInput pdfOptions = null) -``` - -## Parameters - -| Parameter | Type | Tags | Description | -| --- | --- | --- | --- | -| `type` | [`Models.Type16Enum`](../../doc/models/type-16-enum.md) | Query, Required | Type of file to be generated. Valid values: CSV/XLSX/PDF/PNG. | -| `id` | `string` | Query, Optional | GUID of the Liveboard to download.

This field is considered only when no input is provided for transientContent field. | -| `vizId` | `List` | Query, Optional | JSON Array of GUIDs of the visualizations in the Liveboard to be included in the downloaded file.

For CSV, XLSX and PNG file download, visualization id is mandatory. CSV and XLSX is valid only for visualization of type table and PNG is valid for charts.

Only one value will be accepted for these formats. If multiple values are provided then first value in the array will be considered. | -| `transientContent` | `string` | Query, Optional | If you have embedded ThoughtSpot in your host application, and you want to download Liveboards with unsaved changes as a file, pass the transient content from the browser fetch request, using the getExportRequestForCurrentPinboard method. For more information, see https://developers.thoughtspot.com/docs/?pageid=liveboard-export-api#transient-pinboard. | -| `runtimeFilter` | `string` | Query, Optional | If you have embedded ThoughtSpot in your host application, and you want to download Liveboards with unsaved changes as a file, pass the transient content from the browser fetch request, using the getExportRequestForCurrentPinboard method. For more information, see https://developers.thoughtspot.com/docs/?pageid=liveboard-export-api#transient-pinboard . | -| `runtimeSort` | `string` | Query, Optional | JSON object which provides columns to sort the data at the time of data retrieval.

Example: {"sortCol1":"region","asc1":true,"sortCol2":"date"}

For more information, see https://developers.thoughtspot.com/docs/?pageid=runtime-filters | -| `pdfOptions` | [`Models.PdfOptionsInput`](../../doc/models/pdf-options-input.md) | Query, Optional | Additional options that are applicable for PDF type. | - -## Response Type - -`Task` - -## Example Usage - -```csharp -Type16Enum type = Type16Enum.PDF; - -try -{ - object result = await reportController.RestapiV2LiveboardReportAsync(type, null, null, null, null, null, null); -} -catch (ApiException e){}; -``` - -## Errors - -| HTTP Status Code | Error Description | Exception Class | -| --- | --- | --- | -| 500 | Operation failed | [`ErrorResponseException`](../../doc/models/error-response-exception.md) | - diff --git a/DotNet/doc/controllers/security.md b/DotNet/doc/controllers/security.md deleted file mode 100644 index 640aad983..000000000 --- a/DotNet/doc/controllers/security.md +++ /dev/null @@ -1,314 +0,0 @@ -# Security - -```csharp -SecurityController securityController = client.SecurityController; -``` - -## Class Name - -`SecurityController` - -## Methods - -* [Restapi V2 Get Permission on Object](../../doc/controllers/security.md#restapi-v2-get-permission-on-object) -* [Restapi V2 Get Permission for Principal](../../doc/controllers/security.md#restapi-v2-get-permission-for-principal) -* [Restapi V2 Share Object](../../doc/controllers/security.md#restapi-v2-share-object) -* [Restapi V2 Share Visualization](../../doc/controllers/security.md#restapi-v2-share-visualization) -* [Restapi V2 Search Permission on Objects](../../doc/controllers/security.md#restapi-v2-search-permission-on-objects) -* [Restapi V2 Search Permission for Principals](../../doc/controllers/security.md#restapi-v2-search-permission-for-principals) - - -# Restapi V2 Get Permission on Object - -To list the permissions for user and user groups on an object, use this endpoint. The response will include only those users and groups with have either VIEW OR MODIFY permission. - -You can optionally see the permission on the dependent objects as well by enabling includeDependent field. - -```csharp -RestapiV2GetPermissionOnObjectAsync( - string id, - Models.Type7Enum type, - bool? includeDependent = null) -``` - -## Parameters - -| Parameter | Type | Tags | Description | -| --- | --- | --- | --- | -| `id` | `string` | Query, Required | GUID of the metadata object for which the permission needs to be obtained. | -| `type` | [`Models.Type7Enum`](../../doc/models/type-7-enum.md) | Query, Required | Type of metadata object. Valid values: Liveboard\|Answer\|DataObject\|Column | -| `includeDependent` | `bool?` | Query, Optional | When this field is set to true, the API returns the permission details for the dependent objects for the the object included in the request | - -## Response Type - -[`Task`](../../doc/models/security-permission-response.md) - -## Example Usage - -```csharp -string id = "id0"; -Type7Enum type = Type7Enum.DATAOBJECT; - -try -{ - SecurityPermissionResponse result = await securityController.RestapiV2GetPermissionOnObjectAsync(id, type, null); -} -catch (ApiException e){}; -``` - -## Errors - -| HTTP Status Code | Error Description | Exception Class | -| --- | --- | --- | -| 500 | Operation failed | [`ErrorResponseException`](../../doc/models/error-response-exception.md) | - - -# Restapi V2 Get Permission for Principal - -Use this endpoint to list the objects on which a user or user group has permission. The response will include only those objects on which the user or user group has either VIEW OR MODIFY permission. - -Requires administration privilege - -```csharp -RestapiV2GetPermissionForPrincipalAsync( - string id = null, - string name = null) -``` - -## Parameters - -| Parameter | Type | Tags | Description | -| --- | --- | --- | --- | -| `id` | `string` | Query, Optional | GUID of the user or user group for which the object permission needs to be obtained | -| `name` | `string` | Query, Optional | Name of the ser or user group for which the object permission needs to be obtained | - -## Response Type - -[`Task`](../../doc/models/principal-search-response.md) - -## Example Usage - -```csharp -try -{ - PrincipalSearchResponse result = await securityController.RestapiV2GetPermissionForPrincipalAsync(null, null); -} -catch (ApiException e){}; -``` - -## Errors - -| HTTP Status Code | Error Description | Exception Class | -| --- | --- | --- | -| 500 | Operation failed | [`ErrorResponseException`](../../doc/models/error-response-exception.md) | - - -# Restapi V2 Share Object - -To programmatically share ThoughtSpot objects with another user or user group, use this endpoint. - -When you share an object like a Liveboard or visualization, a notification with a live link is sent to the user. When the users access this object, they can view the last saved version of the object. - -```csharp -RestapiV2ShareObjectAsync( - Models.TspublicRestV2SecurityShareTsobjectRequest body) -``` - -## Parameters - -| Parameter | Type | Tags | Description | -| --- | --- | --- | --- | -| `body` | [`Models.TspublicRestV2SecurityShareTsobjectRequest`](../../doc/models/tspublic-rest-v2-security-share-tsobject-request.md) | Body, Required | - | - -## Response Type - -`Task` - -## Example Usage - -```csharp -var body = new TspublicRestV2SecurityShareTsobjectRequest(); -body.Type = Type18Enum.DATAOBJECT; -body.Id = new List(); -body.Id.Add("id6"); -body.Id.Add("id7"); -body.Permission = "permission8"; - -try -{ - bool? result = await securityController.RestapiV2ShareObjectAsync(body); -} -catch (ApiException e){}; -``` - -## Errors - -| HTTP Status Code | Error Description | Exception Class | -| --- | --- | --- | -| 500 | Operation failed | [`ErrorResponseException`](../../doc/models/error-response-exception.md) | - - -# Restapi V2 Share Visualization - -If you want to share a specific visualization from a Liveboard with another user or user group, then use this endpoint. - -Requires privilege to share the visualization - -```csharp -RestapiV2ShareVisualizationAsync( - Models.TspublicRestV2SecurityShareVisualizationRequest body) -``` - -## Parameters - -| Parameter | Type | Tags | Description | -| --- | --- | --- | --- | -| `body` | [`Models.TspublicRestV2SecurityShareVisualizationRequest`](../../doc/models/tspublic-rest-v2-security-share-visualization-request.md) | Body, Required | - | - -## Response Type - -`Task` - -## Example Usage - -```csharp -var body = new TspublicRestV2SecurityShareVisualizationRequest(); -body.Id = "id6"; -body.VizId = "vizId4"; -body.PrincipalId = new List(); -body.PrincipalId.Add("principalId2"); -body.PrincipalId.Add("principalId3"); - -try -{ - bool? result = await securityController.RestapiV2ShareVisualizationAsync(body); -} -catch (ApiException e){}; -``` - -## Errors - -| HTTP Status Code | Error Description | Exception Class | -| --- | --- | --- | -| 500 | Operation failed | [`ErrorResponseException`](../../doc/models/error-response-exception.md) | - - -# Restapi V2 Search Permission on Objects - -To list the permissions for user and user groups on a list of objects, use this endpoint. The response will include only those users and groups with have either VIEW OR MODIFY permission. - -You can either provide list of object ids or type of objects to list the permissions for. One of these inputs is mandatory. If both are provided then only object ids will be considred. - -You can optionally provide users or user groups for which the persmission needs to be displayed. - -You can optionally see the permission on the dependent objects as well by enabling includeDependent field. - -Requires administration privilege - -```csharp -RestapiV2SearchPermissionOnObjectsAsync( - Models.TspublicRestV2SecurityPermissionTsobjectSearchRequest body) -``` - -## Parameters - -| Parameter | Type | Tags | Description | -| --- | --- | --- | --- | -| `body` | [`Models.TspublicRestV2SecurityPermissionTsobjectSearchRequest`](../../doc/models/tspublic-rest-v2-security-permission-tsobject-search-request.md) | Body, Required | - | - -## Response Type - -[`Task>`](../../doc/models/security-permission-response.md) - -## Example Usage - -```csharp -var body = new TspublicRestV2SecurityPermissionTsobjectSearchRequest(); -body.TsObject = new List(); - -var bodyTsObject0 = new TsObjectSearchInput(); -bodyTsObject0.Type = Type2Enum.DATAOBJECT; -bodyTsObject0.Id = new List(); -bodyTsObject0.Id.Add("id8"); -bodyTsObject0.Id.Add("id9"); -body.TsObject.Add(bodyTsObject0); - -var bodyTsObject1 = new TsObjectSearchInput(); -bodyTsObject1.Type = Type2Enum.COLUMN; -bodyTsObject1.Id = new List(); -bodyTsObject1.Id.Add("id9"); -bodyTsObject1.Id.Add("id0"); -bodyTsObject1.Id.Add("id1"); -body.TsObject.Add(bodyTsObject1); - -var bodyTsObject2 = new TsObjectSearchInput(); -bodyTsObject2.Type = Type2Enum.LIVEBOARD; -bodyTsObject2.Id = new List(); -bodyTsObject2.Id.Add("id0"); -body.TsObject.Add(bodyTsObject2); - - -try -{ - List result = await securityController.RestapiV2SearchPermissionOnObjectsAsync(body); -} -catch (ApiException e){}; -``` - -## Errors - -| HTTP Status Code | Error Description | Exception Class | -| --- | --- | --- | -| 500 | Operation failed | [`ErrorResponseException`](../../doc/models/error-response-exception.md) | - - -# Restapi V2 Search Permission for Principals - -To list the permissions for user and user groups on a list of objects, use this endpoint. The response will include only those users and groups with have either VIEW OR MODIFY permission. - -You can either provide list of object ids or type of objects to list the permissions for. One of these inputs is mandatory. If both are provided then only object ids will be considred. - -You can optionally provide users or user groups for which the persmission needs to be displayed. - -You can optionally see the permission on the dependent objects as well by enabling includeDependent field. - -Requires administration privilege - -```csharp -RestapiV2SearchPermissionForPrincipalsAsync( - Models.TspublicRestV2SecurityPermissionPrincipalSearchRequest body) -``` - -## Parameters - -| Parameter | Type | Tags | Description | -| --- | --- | --- | --- | -| `body` | [`Models.TspublicRestV2SecurityPermissionPrincipalSearchRequest`](../../doc/models/tspublic-rest-v2-security-permission-principal-search-request.md) | Body, Required | - | - -## Response Type - -[`Task>`](../../doc/models/principal-search-response.md) - -## Example Usage - -```csharp -var body = new TspublicRestV2SecurityPermissionPrincipalSearchRequest(); -body.Principal = new List(); - -var bodyPrincipal0 = new UserNameAndIDInput(); -body.Principal.Add(bodyPrincipal0); - - -try -{ - List result = await securityController.RestapiV2SearchPermissionForPrincipalsAsync(body); -} -catch (ApiException e){}; -``` - -## Errors - -| HTTP Status Code | Error Description | Exception Class | -| --- | --- | --- | -| 500 | Operation failed | [`ErrorResponseException`](../../doc/models/error-response-exception.md) | - diff --git a/DotNet/doc/controllers/session.md b/DotNet/doc/controllers/session.md deleted file mode 100644 index a0bed82d2..000000000 --- a/DotNet/doc/controllers/session.md +++ /dev/null @@ -1,125 +0,0 @@ -# Session - -```csharp -SessionController sessionController = client.SessionController; -``` - -## Class Name - -`SessionController` - -## Methods - -* [Restapi V2 Login](../../doc/controllers/session.md#restapi-v2-login) -* [Restapi V2 Get Token](../../doc/controllers/session.md#restapi-v2-get-token) - - -# Restapi V2 Login - -You can programmatically create login session for a user in ThoughtSpot using this endpoint. - -You can create session by either providing userName and password as inputs in this request body or by including "Authorization" header with the token generated through the endpoint /tspublic/rest/v2/session/gettoken. - -userName and password input is given precedence over "Authorization" header, when both are included in the request. - -```csharp -RestapiV2LoginAsync( - string userName = null, - string password = null, - bool? rememberMe = null) -``` - -## Parameters - -| Parameter | Type | Tags | Description | -| --- | --- | --- | --- | -| `userName` | `string` | Query, Optional | Username of the user account | -| `password` | `string` | Query, Optional | The password of the user account | -| `rememberMe` | `bool?` | Query, Optional | A flag to remember the user session. When set to true, sets a session cookie that persists in subsequent API calls. | - -## Response Type - -[`Task`](../../doc/models/session-login-response.md) - -## Example Usage - -```csharp -try -{ - SessionLoginResponse result = await sessionController.RestapiV2LoginAsync(null, null, null); -} -catch (ApiException e){}; -``` - -## Errors - -| HTTP Status Code | Error Description | Exception Class | -| --- | --- | --- | -| 500 | Operation failed | [`ErrorResponseException`](../../doc/models/error-response-exception.md) | - - -# Restapi V2 Get Token - -To programmatically create session token for a user in ThoughtSpot, use this endpoint. - -You can generate the token for a user by providing password or secret key from the cluster. - -You need to enable trusted authentication to generate secret key. To generate secret key, follow below steps. - -1. Click the Develop tab. - -2. Under Customizations, click Settings. - -3. To enable trusted authentication, turn on the toggle. - -4. A secret_key for trusted authentication is generated. - -5. Click the clipboard icon to copy the token. - -Password is given precedence over secretKey input, when both are included in the request. - -```csharp -RestapiV2GetTokenAsync( - string userName, - string password = null, - string secretKey = null, - Models.AccessLevelEnum? accessLevel = null, - string tsObjectId = null, - string tokenExpiryDuration = null, - string orgId = null) -``` - -## Parameters - -| Parameter | Type | Tags | Description | -| --- | --- | --- | --- | -| `userName` | `string` | Query, Required | Username of the user account | -| `password` | `string` | Query, Optional | The password of the user account | -| `secretKey` | `string` | Query, Optional | The secret key string provided by the ThoughtSpot application server. ThoughtSpot generates this secret key when you enable trusted authentication. | -| `accessLevel` | [`Models.AccessLevelEnum?`](../../doc/models/access-level-enum.md) | Query, Optional | User access privilege.

FULL - Creates a session with full access.

REPORT_BOOK_VIEW - Allow view access to the specified visualizations. | -| `tsObjectId` | `string` | Query, Optional | GUID of the ThoughtSpot object. If you have set the accessLevel attribute to REPORT_BOOK_VIEW, specify the GUID of the Liveboard or visualization object. | -| `tokenExpiryDuration` | `string` | Query, Optional | Duration in seconds after which the token expires | -| `orgId` | `string` | Query, Optional | Id of the organization to be associated with the user login. If no input is provided then last logged in organization will be considered | - -## Response Type - -[`Task`](../../doc/models/session-login-response.md) - -## Example Usage - -```csharp -string userName = "userName2"; - -try -{ - SessionLoginResponse result = await sessionController.RestapiV2GetTokenAsync(userName, null, null, null, null, null, null); -} -catch (ApiException e){}; -``` - -## Errors - -| HTTP Status Code | Error Description | Exception Class | -| --- | --- | --- | -| 500 | Operation failed | [`ErrorResponseException`](../../doc/models/error-response-exception.md) | - diff --git a/DotNet/doc/controllers/user.md b/DotNet/doc/controllers/user.md deleted file mode 100644 index 2bc201f78..000000000 --- a/DotNet/doc/controllers/user.md +++ /dev/null @@ -1,421 +0,0 @@ -# User - -```csharp -UserController userController = client.UserController; -``` - -## Class Name - -`UserController` - -## Methods - -* [Restapi V2 Get User](../../doc/controllers/user.md#restapi-v2-get-user) -* [Restapi V2 Create User](../../doc/controllers/user.md#restapi-v2-create-user) -* [Restapi V2 Update User](../../doc/controllers/user.md#restapi-v2-update-user) -* [Restapi V2 Delete User](../../doc/controllers/user.md#restapi-v2-delete-user) -* [Restapi V2 Add User to Groups](../../doc/controllers/user.md#restapi-v2-add-user-to-groups) -* [Restapi V2 Remove User From Groups](../../doc/controllers/user.md#restapi-v2-remove-user-from-groups) -* [Restapi V2 Search Users](../../doc/controllers/user.md#restapi-v2-search-users) -* [Restapi V2 Change Password of User](../../doc/controllers/user.md#restapi-v2-change-password-of-user) -* [Restapi V2 Add User to Orgs](../../doc/controllers/user.md#restapi-v2-add-user-to-orgs) - - -# Restapi V2 Get User - -To get the details of a specific user account by username or user id, use this endpoint. At Least one value is needed. When both are given, user id will be considered to fetch user information - -```csharp -RestapiV2GetUserAsync( - string name = null, - string id = null) -``` - -## Parameters - -| Parameter | Type | Tags | Description | -| --- | --- | --- | --- | -| `name` | `string` | Query, Optional | Username of the user that you want to query. | -| `id` | `string` | Query, Optional | The GUID of the user account to query | - -## Response Type - -[`Task`](../../doc/models/user-response.md) - -## Example Usage - -```csharp -try -{ - UserResponse result = await userController.RestapiV2GetUserAsync(null, null); -} -catch (ApiException e){}; -``` - -## Errors - -| HTTP Status Code | Error Description | Exception Class | -| --- | --- | --- | -| 500 | Operation failed | [`ErrorResponseException`](../../doc/models/error-response-exception.md) | - - -# Restapi V2 Create User - -To programmatically create a user account in the ThoughtSpot system use this API endpoint. Using this API, you can create a user and assign groups. -To create a user, you require admin user privileges. -All users created in the ThoughtSpot system are added to ALL_GROUP - -```csharp -RestapiV2CreateUserAsync( - string name, - string displayName, - string password, - Models.VisibilityEnum? visibility = null, - string mail = null, - List orgIds = null, - List groups = null, - Models.StateEnum? state = null, - bool? notifyOnShare = null, - bool? showWalkMe = null, - bool? analystOnboardingComplete = null, - Models.Type8Enum? type = null) -``` - -## Parameters - -| Parameter | Type | Tags | Description | -| --- | --- | --- | --- | -| `name` | `string` | Query, Required | Name of the user. The username string must be unique. | -| `displayName` | `string` | Query, Required | A unique display name string for the user account, usually their first and last name | -| `password` | `string` | Query, Required | Password for the user account. | -| `visibility` | [`Models.VisibilityEnum?`](../../doc/models/visibility-enum.md) | Query, Optional | Visibility of the user. The visibility attribute is set to DEFAULT when creating a user. The DEFAULT attribute makes a user visible to other users and user groups, and this allows them to share objects | -| `mail` | `string` | Query, Optional | Email of the user account | -| `orgIds` | `List` | Query, Optional | Array of org identifiers. If no value is provided then user will be created in the organization associated with the login session. | -| `groups` | [`List`](../../doc/models/group-name-and-id-input.md) | Query, Optional | Array of objects of groups that the user belong to. | -| `state` | [`Models.StateEnum?`](../../doc/models/state-enum.md) | Query, Optional | Status of user account. acitve or inactive. | -| `notifyOnShare` | `bool?` | Query, Optional | User preference for receiving email notifications when another ThoughtSpot user shares answers or pinboards. | -| `showWalkMe` | `bool?` | Query, Optional | The user preference for revisiting the onboarding experience. | -| `analystOnboardingComplete` | `bool?` | Query, Optional | ThoughtSpot provides an interactive guided walkthrough to onboard new users. The onboarding experience leads users through a set of actions to help users get started and accomplish their tasks quickly. The users can turn off the Onboarding experience and access it again when they need assistance with the ThoughtSpot UI. | -| `type` | [`Models.Type8Enum?`](../../doc/models/type-8-enum.md) | Query, Optional | Type of user. LOCAL_USER indicates that the user is created locally in the ThoughtSpot system. | - -## Response Type - -[`Task`](../../doc/models/user-response.md) - -## Example Usage - -```csharp -string name = "name0"; -string displayName = "displayName2"; -string password = "password4"; - -try -{ - UserResponse result = await userController.RestapiV2CreateUserAsync(name, displayName, password, null, null, null, null, null, null, null, null, null); -} -catch (ApiException e){}; -``` - -## Errors - -| HTTP Status Code | Error Description | Exception Class | -| --- | --- | --- | -| 500 | Operation failed | [`ErrorResponseException`](../../doc/models/error-response-exception.md) | - - -# Restapi V2 Update User - -You can use this endpoint to programmatically modify an existing user account. To modify a user, you require admin user privileges. -At least one of User Id or username is mandatory. When both are given, then user id will be considered and username will be updated - -```csharp -RestapiV2UpdateUserAsync( - Models.TspublicRestV2UserUpdateRequest body) -``` - -## Parameters - -| Parameter | Type | Tags | Description | -| --- | --- | --- | --- | -| `body` | [`Models.TspublicRestV2UserUpdateRequest`](../../doc/models/tspublic-rest-v2-user-update-request.md) | Body, Required | - | - -## Response Type - -`Task` - -## Example Usage - -```csharp -var body = new TspublicRestV2UserUpdateRequest(); - -try -{ - bool? result = await userController.RestapiV2UpdateUserAsync(body); -} -catch (ApiException e){}; -``` - -## Errors - -| HTTP Status Code | Error Description | Exception Class | -| --- | --- | --- | -| 500 | Operation failed | [`ErrorResponseException`](../../doc/models/error-response-exception.md) | - - -# Restapi V2 Delete User - -To remove a user from the ThoughtSpot system, use this endpoint. -At Least one value needed. When both are given user id will be considered to delete user. - -```csharp -RestapiV2DeleteUserAsync( - string name = null, - string id = null, - int? orgId = null) -``` - -## Parameters - -| Parameter | Type | Tags | Description | -| --- | --- | --- | --- | -| `name` | `string` | Query, Optional | Username of the user that you want to query. | -| `id` | `string` | Query, Optional | The GUID of the user account to query | -| `orgId` | `int?` | Query, Optional | Unique identifier of the organization from which the user would be deleted. If no value is provided then user will be deleted from the organization associated with the login session. | - -## Response Type - -`Task` - -## Example Usage - -```csharp -try -{ - bool? result = await userController.RestapiV2DeleteUserAsync(null, null, null); -} -catch (ApiException e){}; -``` - -## Errors - -| HTTP Status Code | Error Description | Exception Class | -| --- | --- | --- | -| 500 | Operation failed | [`ErrorResponseException`](../../doc/models/error-response-exception.md) | - - -# Restapi V2 Add User to Groups - -To programmatically add groups to an existing ThoughtSpot user use this endpoint. -When you assign groups to a user, the user inherits the privileges assigned to those groups. -At least one of User Id or username is mandatory. When both are given, then user id will be considered. - -```csharp -RestapiV2AddUserToGroupsAsync( - Models.TspublicRestV2UserAddgroupRequest body) -``` - -## Parameters - -| Parameter | Type | Tags | Description | -| --- | --- | --- | --- | -| `body` | [`Models.TspublicRestV2UserAddgroupRequest`](../../doc/models/tspublic-rest-v2-user-addgroup-request.md) | Body, Required | - | - -## Response Type - -`Task` - -## Example Usage - -```csharp -var body = new TspublicRestV2UserAddgroupRequest(); -body.Groups = new List(); - -var bodyGroups0 = new GroupNameAndIDInput(); -body.Groups.Add(bodyGroups0); - - -try -{ - bool? result = await userController.RestapiV2AddUserToGroupsAsync(body); -} -catch (ApiException e){}; -``` - -## Errors - -| HTTP Status Code | Error Description | Exception Class | -| --- | --- | --- | -| 500 | Operation failed | [`ErrorResponseException`](../../doc/models/error-response-exception.md) | - - -# Restapi V2 Remove User From Groups - -To programmatically remove groups from an existing ThoughtSpot user, use this API endpoint. -The API removes only the user association. It does not delete the user or group from the Thoughtspot system -At least one of User Id or username is mandatory. When both are given, then user id will be considered. - -```csharp -RestapiV2RemoveUserFromGroupsAsync( - Models.TspublicRestV2UserRemovegroupRequest body) -``` - -## Parameters - -| Parameter | Type | Tags | Description | -| --- | --- | --- | --- | -| `body` | [`Models.TspublicRestV2UserRemovegroupRequest`](../../doc/models/tspublic-rest-v2-user-removegroup-request.md) | Body, Required | - | - -## Response Type - -`Task` - -## Example Usage - -```csharp -var body = new TspublicRestV2UserRemovegroupRequest(); -body.Groups = new List(); - -var bodyGroups0 = new GroupNameAndIDInput(); -body.Groups.Add(bodyGroups0); - - -try -{ - bool? result = await userController.RestapiV2RemoveUserFromGroupsAsync(body); -} -catch (ApiException e){}; -``` - -## Errors - -| HTTP Status Code | Error Description | Exception Class | -| --- | --- | --- | -| 500 | Operation failed | [`ErrorResponseException`](../../doc/models/error-response-exception.md) | - - -# Restapi V2 Search Users - -To get the details of a specific user account or all users in the ThoughtSpot system use this end point. - -```csharp -RestapiV2SearchUsersAsync( - Models.TspublicRestV2UserSearchRequest body) -``` - -## Parameters - -| Parameter | Type | Tags | Description | -| --- | --- | --- | --- | -| `body` | [`Models.TspublicRestV2UserSearchRequest`](../../doc/models/tspublic-rest-v2-user-search-request.md) | Body, Required | - | - -## Response Type - -`Task` - -## Example Usage - -```csharp -var body = new TspublicRestV2UserSearchRequest(); - -try -{ - object result = await userController.RestapiV2SearchUsersAsync(body); -} -catch (ApiException e){}; -``` - -## Errors - -| HTTP Status Code | Error Description | Exception Class | -| --- | --- | --- | -| 500 | Operation failed | [`ErrorResponseException`](../../doc/models/error-response-exception.md) | - - -# Restapi V2 Change Password of User - -To change the password of a ThoughtSpot user account, use this endpoint. - -At least one of id or name of user is required. When both are given user id will be considered. - -```csharp -RestapiV2ChangePasswordOfUserAsync( - Models.TspublicRestV2UserChangepasswordRequest body) -``` - -## Parameters - -| Parameter | Type | Tags | Description | -| --- | --- | --- | --- | -| `body` | [`Models.TspublicRestV2UserChangepasswordRequest`](../../doc/models/tspublic-rest-v2-user-changepassword-request.md) | Body, Required | - | - -## Response Type - -`Task` - -## Example Usage - -```csharp -var body = new TspublicRestV2UserChangepasswordRequest(); -body.CurrentPassword = "currentPassword0"; -body.NewPassword = "newPassword0"; - -try -{ - bool? result = await userController.RestapiV2ChangePasswordOfUserAsync(body); -} -catch (ApiException e){}; -``` - -## Errors - -| HTTP Status Code | Error Description | Exception Class | -| --- | --- | --- | -| 500 | Operation failed | [`ErrorResponseException`](../../doc/models/error-response-exception.md) | - - -# Restapi V2 Add User to Orgs - -To programmatically add existing ThoughtSpot users to an organization, use this API endpoint. - -At least one of id or name of the organization is required. When both are given, then organization id will be considered. - -Requires Administration access for the organization to which users need to be added. - -```csharp -RestapiV2AddUserToOrgsAsync( - Models.TspublicRestV2UserAddorgRequest body) -``` - -## Parameters - -| Parameter | Type | Tags | Description | -| --- | --- | --- | --- | -| `body` | [`Models.TspublicRestV2UserAddorgRequest`](../../doc/models/tspublic-rest-v2-user-addorg-request.md) | Body, Required | - | - -## Response Type - -`Task` - -## Example Usage - -```csharp -var body = new TspublicRestV2UserAddorgRequest(); -body.Users = new List(); - -var bodyUsers0 = new UserNameAndIDInput(); -body.Users.Add(bodyUsers0); - - -try -{ - bool? result = await userController.RestapiV2AddUserToOrgsAsync(body); -} -catch (ApiException e){}; -``` - -## Errors - -| HTTP Status Code | Error Description | Exception Class | -| --- | --- | --- | -| 500 | Operation failed | [`ErrorResponseException`](../../doc/models/error-response-exception.md) | - diff --git a/DotNet/doc/http-client-configuration-builder.md b/DotNet/doc/http-client-configuration-builder.md deleted file mode 100644 index 5919d33b4..000000000 --- a/DotNet/doc/http-client-configuration-builder.md +++ /dev/null @@ -1,19 +0,0 @@ - -# HttpClientConfiguration Builder Class - -Class to build instances of HttpClientConfiguration. - -## Methods - -| Name | Description | Return Type | -| --- | --- | --- | -| `Timeout(TimeSpan timeout)` | Http client timeout. | `Builder` | -| `SkipSslCertVerification(bool skipSslCertVerification)` | Whether to skip verification of SSL certificates. | `Builder` | -| `NumberOfRetries(int numberOfRetries)` | Number of times the request is retried. | `Builder` | -| `BackoffFactor(int backoffFactor)` | Exponential backoff factor for duration between retry calls. | `Builder` | -| `RetryInterval(double retryInterval)` | The time interval between the endpoint calls. | `Builder` | -| `MaximumRetryWaitTime(TimeSpan maximumRetryWaitTime)` | The maximum retry wait time. | `Builder` | -| `StatusCodesToRetry(IList statusCodesToRetry)` | List of Http status codes to invoke retry. | `Builder` | -| `RequestMethodsToRetry(IList requestMethodsToRetry)` | List of Http request methods to invoke retry. | `Builder` | -| `Build()` | Builds a new HttpClientConfiguration object using the set fields. | `HttpClientConfiguration` | - diff --git a/DotNet/doc/http-client-configuration.md b/DotNet/doc/http-client-configuration.md deleted file mode 100644 index 24d1b198d..000000000 --- a/DotNet/doc/http-client-configuration.md +++ /dev/null @@ -1,26 +0,0 @@ - -# HttpClientConfiguration Class - -HttpClientConfiguration represents the current state of the Http Client. - -## Properties - -| Name | Description | Type | -| --- | --- | --- | -| Timeout | Http client timeout. | `TimeSpan` | -| SkipSslCertVerification | Whether to skip verification of SSL certificates. | `bool` | -| NumberOfRetries | Number of times the request is retried. | `int` | -| BackoffFactor | Exponential backoff factor for duration between retry calls. | `int` | -| RetryInterval | The time interval between the endpoint calls. | `double` | -| MaximumRetryWaitTime | The maximum retry wait time. | `TimeSpan` | -| StatusCodesToRetry | List of Http status codes to invoke retry. | `IList` | -| RequestMethodsToRetry | List of Http request methods to invoke retry. | `IList` | -| HttpClientInstance | HttpClient instance used to make the HTTP calls | `HttpClient` | -| OverrideHttpClientConfiguration | Boolean which allows the SDK to override http client instance's settings used for features like retries, timeouts etc. | `bool` | - -## Methods - -| Name | Description | Return Type | -| --- | --- | --- | -| `ToBuilder()` | Creates an object of the HttpClientConfiguration using the values provided for the builder. | `Builder` | - diff --git a/DotNet/doc/http-context.md b/DotNet/doc/http-context.md deleted file mode 100644 index 8d1611e41..000000000 --- a/DotNet/doc/http-context.md +++ /dev/null @@ -1,18 +0,0 @@ - -# HttpContext Class - -Represents the contextual information of HTTP request and response. - -## Properties - -| Name | Description | Type | -| --- | --- | --- | -| Request | Gets the http request in the current context. | `HttpRequest` | -| Response | Gets the http response in the current context. | `HttpResponse` | - -## Constructors - -| Name | Description | -| --- | --- | -| `HttpContext(HttpRequest request, HttpResponse response)` | Initializes a new instance of the class. | - diff --git a/DotNet/doc/http-request.md b/DotNet/doc/http-request.md deleted file mode 100644 index 3cda0c9b2..000000000 --- a/DotNet/doc/http-request.md +++ /dev/null @@ -1,29 +0,0 @@ - -# HttpRequest Class - -HttpResponse stores necessary information about the http response. - -## Properties - -| Name | Description | Type | -| --- | --- | --- | -| StatusCode | Gets the HTTP Status code of the http response. | `int` | -| Headers | Gets the headers of the http response. | `Dictionary` | -| RawBody | Gets the stream of the body. | `Stream` | - -## Constructors - -| Name | Description | -| --- | --- | -| `HttpRequest(HttpMethod method, string queryUrl)` | Constructor to initialize the http request object. | -| `HttpRequest(HttpMethod method, string queryUrl, Dictionary headers, string username, string password, Dictionary queryParameters = null)` | Constructor to initialize the http request with headers and optional Basic auth params. | -| `HttpRequest(HttpMethod method, string queryUrl, Dictionary headers, object body, string username, string password, Dictionary queryParameters = null)` | Constructor to initialize the http request with headers, body and optional Basic auth params. | -| `HttpRequest(HttpMethod method, string queryUrl, Dictionary headers, List> formParameters, string username, string password, Dictionary queryParameters = null)` | Constructor to initialize the http request with headers, form parameters and optional Basic auth params. | - -## Methods - -| Name | Description | Return Type | -| --- | --- | --- | -| `AddHeaders(Dictionary HeadersToAdd)` | Concatenate values from a Dictionary to this object. | `Dictionary` | -| `AddQueryParameters(Dictionary queryParamaters)` | Concatenate values from a Dictionary to query parameters dictionary. | `void` | - diff --git a/DotNet/doc/http-response.md b/DotNet/doc/http-response.md deleted file mode 100644 index 5d54c4aa9..000000000 --- a/DotNet/doc/http-response.md +++ /dev/null @@ -1,19 +0,0 @@ - -# HttpResponse Class - -HttpResponse stores necessary information about the http response. - -## Properties - -| Name | Description | Type | -| --- | --- | --- | -| StatusCode | Gets the HTTP Status code of the http response. | `int` | -| Headers | Gets the headers of the http response. | `Dictionary` | -| RawBody | Gets the stream of the body. | `Stream` | - -## Constructors - -| Name | Description | -| --- | --- | -| `HttpResponse(int statusCode, Dictionary headers, Stream rawBody)` | Initializes a new instance of the class. | - diff --git a/DotNet/doc/http-string-response.md b/DotNet/doc/http-string-response.md deleted file mode 100644 index 7e82f647d..000000000 --- a/DotNet/doc/http-string-response.md +++ /dev/null @@ -1,19 +0,0 @@ - -# HttpStringResponse Class - -HttpStringResponse inherits from HttpResponse and has additional property of string body. - -## Properties - -| Name | Description | Type | -| --- | --- | --- | -| StatusCode | Gets the HTTP Status code of the http response. | `int` | -| Headers | Gets the headers of the http response. | `Dictionary` | -| Body | Gets the raw string body of the http response. | `string` | - -## Constructors - -| Name | Description | -| --- | --- | -| `HttpStringResponse(int statusCode, Dictionary headers, Stream rawBody, string body) : base(statusCode, headers, rawBody)` | Initializes a new instance of the class. | - diff --git a/DotNet/doc/i-auth-manager.md b/DotNet/doc/i-auth-manager.md deleted file mode 100644 index 80705d6c0..000000000 --- a/DotNet/doc/i-auth-manager.md +++ /dev/null @@ -1,12 +0,0 @@ - -# IAuthManager Class - -IAuthManager adds the authenticaion layer to the http calls. - -## Methods - -| Name | Description | Return Type | -| --- | --- | --- | -| `Apply(HttpRequest httpRequest)` | Add authentication information to the HTTP Request. | `HttpRequest` | -| `ApplyAsync(HttpRequest httpRequest)` | Asynchronously add authentication information to the HTTP Request. | `Task` | - diff --git a/DotNet/doc/models/access-enum.md b/DotNet/doc/models/access-enum.md deleted file mode 100644 index 73237e74b..000000000 --- a/DotNet/doc/models/access-enum.md +++ /dev/null @@ -1,16 +0,0 @@ - -# Access Enum - -Minimum access level that the specified user or user group has. If no input is provided then minimum access of READ_ONLY will be considered. - -## Enumeration - -`AccessEnum` - -## Fields - -| Name | -| --- | -| `READONLY` | -| `MODIFY` | - diff --git a/DotNet/doc/models/access-level-enum.md b/DotNet/doc/models/access-level-enum.md deleted file mode 100644 index 983e89e4f..000000000 --- a/DotNet/doc/models/access-level-enum.md +++ /dev/null @@ -1,14 +0,0 @@ - -# Access Level Enum - -## Enumeration - -`AccessLevelEnum` - -## Fields - -| Name | -| --- | -| `FULL` | -| `REPORTBOOKVIEW` | - diff --git a/DotNet/doc/models/access-level-input.md b/DotNet/doc/models/access-level-input.md deleted file mode 100644 index 1b8cbd93b..000000000 --- a/DotNet/doc/models/access-level-input.md +++ /dev/null @@ -1,27 +0,0 @@ - -# Access Level Input - -## Structure - -`AccessLevelInput` - -## Fields - -| Name | Type | Tags | Description | -| --- | --- | --- | --- | -| `Name` | `string` | Optional | Username or name of the user group | -| `Id` | `string` | Optional | GUID of the user or user group | -| `Type` | [`Models.Type1Enum?`](../../doc/models/type-1-enum.md) | Optional | Type of access detail provided | -| `Access` | [`Models.AccessEnum?`](../../doc/models/access-enum.md) | Optional | Minimum access level that the specified user or user group has. If no input is provided then minimum access of READ_ONLY will be considered. | - -## Example (as JSON) - -```json -{ - "name": null, - "id": null, - "type": null, - "access": null -} -``` - diff --git a/DotNet/doc/models/add-table-input.md b/DotNet/doc/models/add-table-input.md deleted file mode 100644 index a9a53d6b6..000000000 --- a/DotNet/doc/models/add-table-input.md +++ /dev/null @@ -1,32 +0,0 @@ - -# Add Table Input - -## Structure - -`AddTableInput` - -## Fields - -| Name | Type | Tags | Description | -| --- | --- | --- | --- | -| `Name` | `string` | Required | Name of the table | -| `DbName` | `string` | Required | Name of the database in the data platform | -| `SchemaName` | `string` | Required | Name of the schema in the database | -| `Columns` | [`List`](../../doc/models/columns-input.md) | Required | A JSON array of column details | - -## Example (as JSON) - -```json -{ - "name": "name0", - "dbName": "dbName8", - "schemaName": "schemaName4", - "columns": [ - { - "name": "name0", - "dataType": "dataType2" - } - ] -} -``` - diff --git a/DotNet/doc/models/adminsync-principal-response.md b/DotNet/doc/models/adminsync-principal-response.md deleted file mode 100644 index 7faf83c94..000000000 --- a/DotNet/doc/models/adminsync-principal-response.md +++ /dev/null @@ -1,31 +0,0 @@ - -# Adminsync Principal Response - -## Structure - -`AdminsyncPrincipalResponse` - -## Fields - -| Name | Type | Tags | Description | -| --- | --- | --- | --- | -| `UsersAdded` | `List` | Optional | Username of list of users added | -| `UsersDeleted` | `List` | Optional | Username of list of users deleted | -| `UsersUpdated` | `List` | Optional | Username of list of users updated | -| `GroupsAdded` | `List` | Optional | Group name of list of groups added | -| `GroupsDeleted` | `List` | Optional | Group name of list of groups deleted | -| `GroupsUpdated` | `List` | Optional | Group name of list of groups updated | - -## Example (as JSON) - -```json -{ - "usersAdded": null, - "usersDeleted": null, - "usersUpdated": null, - "groupsAdded": null, - "groupsDeleted": null, - "groupsUpdated": null -} -``` - diff --git a/DotNet/doc/models/answer-query-response.md b/DotNet/doc/models/answer-query-response.md deleted file mode 100644 index d12c1f717..000000000 --- a/DotNet/doc/models/answer-query-response.md +++ /dev/null @@ -1,25 +0,0 @@ - -# Answer Query Response - -## Structure - -`AnswerQueryResponse` - -## Fields - -| Name | Type | Tags | Description | -| --- | --- | --- | --- | -| `Name` | `string` | Optional | The name of the saved Answer | -| `Id` | `string` | Optional | The GUID of the saved Answer | -| `QuerySql` | `string` | Optional | SQL query associated with the saved Answer | - -## Example (as JSON) - -```json -{ - "name": null, - "id": null, - "querySql": null -} -``` - diff --git a/DotNet/doc/models/client-state.md b/DotNet/doc/models/client-state.md deleted file mode 100644 index 1c48428cd..000000000 --- a/DotNet/doc/models/client-state.md +++ /dev/null @@ -1,21 +0,0 @@ - -# Client State - -## Structure - -`ClientState` - -## Fields - -| Name | Type | Tags | Description | -| --- | --- | --- | --- | -| `Color` | `string` | Optional | Color assigned to the tag | - -## Example (as JSON) - -```json -{ - "color": null -} -``` - diff --git a/DotNet/doc/models/columns-input.md b/DotNet/doc/models/columns-input.md deleted file mode 100644 index 6afbb7538..000000000 --- a/DotNet/doc/models/columns-input.md +++ /dev/null @@ -1,23 +0,0 @@ - -# Columns Input - -## Structure - -`ColumnsInput` - -## Fields - -| Name | Type | Tags | Description | -| --- | --- | --- | --- | -| `Name` | `string` | Required | Name of the column | -| `DataType` | `string` | Required | Datatype of the column | - -## Example (as JSON) - -```json -{ - "name": "name0", - "dataType": "dataType2" -} -``` - diff --git a/DotNet/doc/models/connection-column.md b/DotNet/doc/models/connection-column.md deleted file mode 100644 index c87faae7c..000000000 --- a/DotNet/doc/models/connection-column.md +++ /dev/null @@ -1,25 +0,0 @@ - -# Connection Column - -## Structure - -`ConnectionColumn` - -## Fields - -| Name | Type | Tags | Description | -| --- | --- | --- | --- | -| `Name` | `string` | Optional | Name of the table | -| `Type` | `string` | Optional | Type of the Table | -| `Column` | [`List`](../../doc/models/table-columns.md) | Optional | List of columns in the table | - -## Example (as JSON) - -```json -{ - "name": null, - "type": null, - "column": null -} -``` - diff --git a/DotNet/doc/models/connection-columns-shema.md b/DotNet/doc/models/connection-columns-shema.md deleted file mode 100644 index f00de3fd2..000000000 --- a/DotNet/doc/models/connection-columns-shema.md +++ /dev/null @@ -1,27 +0,0 @@ - -# Connection Columns Shema - -## Structure - -`ConnectionColumnsShema` - -## Fields - -| Name | Type | Tags | Description | -| --- | --- | --- | --- | -| `Name` | `string` | Optional | Name of the table | -| `DbName` | `string` | Optional | Name of the database | -| `SchemaName` | `string` | Optional | Name of the schema | -| `Columns` | [`List`](../../doc/models/table-columns.md) | Optional | List of columns in the table | - -## Example (as JSON) - -```json -{ - "name": null, - "dbName": null, - "schemaName": null, - "columns": null -} -``` - diff --git a/DotNet/doc/models/connection-database-type.md b/DotNet/doc/models/connection-database-type.md deleted file mode 100644 index 3afa92b4a..000000000 --- a/DotNet/doc/models/connection-database-type.md +++ /dev/null @@ -1,23 +0,0 @@ - -# Connection Database Type - -## Structure - -`ConnectionDatabaseType` - -## Fields - -| Name | Type | Tags | Description | -| --- | --- | --- | --- | -| `Name` | `string` | Optional | Name of the database | -| `Schema` | [`List`](../../doc/models/connection-table-schema.md) | Optional | List of schemas | - -## Example (as JSON) - -```json -{ - "name": null, - "schema": null -} -``` - diff --git a/DotNet/doc/models/connection-response.md b/DotNet/doc/models/connection-response.md deleted file mode 100644 index b9e55e4fe..000000000 --- a/DotNet/doc/models/connection-response.md +++ /dev/null @@ -1,61 +0,0 @@ - -# Connection Response - -## Structure - -`ConnectionResponse` - -## Fields - -| Name | Type | Tags | Description | -| --- | --- | --- | --- | -| `Name` | `string` | Optional | Name of the connection | -| `Description` | `string` | Optional | Description associated with the connection | -| `Type` | `string` | Optional | Type of the connection. The database associated with this type can be obtained from the response returned by the /tspublic/rest/v2/connection/types API endpoint. | -| `Id` | `string` | Optional | GUID of the connection | -| `Scheduled` | `bool?` | Optional | Indicates if the data sync is scheduled for this connection | -| `ConnectionType` | `string` | Optional | - | -| `Configuration` | `string` | Optional | Configuration properties of the connection | -| `IsExternal` | `bool?` | Optional | - | -| `IsDeprecated` | `bool?` | Optional | Indicates if the connection is deprecated | -| `IsDeleted` | `bool?` | Optional | Indicates if the connection is deleted | -| `IsHidden` | `bool?` | Optional | Indicates if the connection is hideen | -| `Complete` | `bool?` | Optional | Indicates if the all the properties of connection is provided | -| `IndexVersion` | `double?` | Optional | - | -| `GenerationNum` | `double?` | Optional | - | -| `Created` | `string` | Optional | Date and time when the connection was created | -| `Modified` | `string` | Optional | Date and time of last modification of the connection | -| `Author` | [`Models.UserNameAndID`](../../doc/models/user-name-and-id.md) | Optional | - | -| `ModifiedBy` | [`Models.UserNameAndID`](../../doc/models/user-name-and-id.md) | Optional | - | -| `Owner` | [`Models.UserNameAndID`](../../doc/models/user-name-and-id.md) | Optional | - | -| `Tags` | `List` | Optional | List of tags assigned to the connection | -| `Tables` | [`List`](../../doc/models/table-list.md) | Optional | List of tables linked to this connection | - -## Example (as JSON) - -```json -{ - "name": null, - "description": null, - "type": null, - "id": null, - "scheduled": null, - "connectionType": null, - "configuration": null, - "isExternal": null, - "isDeprecated": null, - "isDeleted": null, - "isHidden": null, - "complete": null, - "indexVersion": null, - "generationNum": null, - "created": null, - "modified": null, - "author": null, - "modifiedBy": null, - "owner": null, - "tags": null, - "tables": null -} -``` - diff --git a/DotNet/doc/models/connection-table-columns-input.md b/DotNet/doc/models/connection-table-columns-input.md deleted file mode 100644 index 28c49986a..000000000 --- a/DotNet/doc/models/connection-table-columns-input.md +++ /dev/null @@ -1,25 +0,0 @@ - -# Connection Table Columns Input - -## Structure - -`ConnectionTableColumnsInput` - -## Fields - -| Name | Type | Tags | Description | -| --- | --- | --- | --- | -| `DbName` | `string` | Required | Name of the database | -| `SchemaName` | `string` | Required | Name of the schema | -| `Name` | `string` | Required | Name of the table | - -## Example (as JSON) - -```json -{ - "dbName": "dbName8", - "schemaName": "schemaName4", - "name": "name0" -} -``` - diff --git a/DotNet/doc/models/connection-table-columns-response.md b/DotNet/doc/models/connection-table-columns-response.md deleted file mode 100644 index f206e3829..000000000 --- a/DotNet/doc/models/connection-table-columns-response.md +++ /dev/null @@ -1,23 +0,0 @@ - -# Connection Table Columns Response - -## Structure - -`ConnectionTableColumnsResponse` - -## Fields - -| Name | Type | Tags | Description | -| --- | --- | --- | --- | -| `Id` | `string` | Optional | Connection id | -| `Table` | [`List`](../../doc/models/connection-columns-shema.md) | Optional | List of table details | - -## Example (as JSON) - -```json -{ - "id": null, - "table": null -} -``` - diff --git a/DotNet/doc/models/connection-table-response.md b/DotNet/doc/models/connection-table-response.md deleted file mode 100644 index d5d208d2b..000000000 --- a/DotNet/doc/models/connection-table-response.md +++ /dev/null @@ -1,23 +0,0 @@ - -# Connection Table Response - -## Structure - -`ConnectionTableResponse` - -## Fields - -| Name | Type | Tags | Description | -| --- | --- | --- | --- | -| `Id` | `string` | Optional | Connection id | -| `Database` | [`List`](../../doc/models/connection-database-type.md) | Optional | List of databases | - -## Example (as JSON) - -```json -{ - "id": null, - "database": null -} -``` - diff --git a/DotNet/doc/models/connection-table-schema.md b/DotNet/doc/models/connection-table-schema.md deleted file mode 100644 index 7c8595351..000000000 --- a/DotNet/doc/models/connection-table-schema.md +++ /dev/null @@ -1,23 +0,0 @@ - -# Connection Table Schema - -## Structure - -`ConnectionTableSchema` - -## Fields - -| Name | Type | Tags | Description | -| --- | --- | --- | --- | -| `Name` | `string` | Optional | Name of the schema | -| `Table` | [`List`](../../doc/models/connection-column.md) | Optional | List of table details | - -## Example (as JSON) - -```json -{ - "name": null, - "table": null -} -``` - diff --git a/DotNet/doc/models/create-connection-response.md b/DotNet/doc/models/create-connection-response.md deleted file mode 100644 index bffa08ffd..000000000 --- a/DotNet/doc/models/create-connection-response.md +++ /dev/null @@ -1,61 +0,0 @@ - -# Create Connection Response - -## Structure - -`CreateConnectionResponse` - -## Fields - -| Name | Type | Tags | Description | -| --- | --- | --- | --- | -| `Name` | `string` | Optional | Name of the connection | -| `Description` | `string` | Optional | Description associated with the connection | -| `Type` | `string` | Optional | Type of the connection. The database associated with this type can be obtained from the response returned by the /tspublic/rest/v2/connection/types API endpoint. | -| `Id` | `string` | Optional | GUID of the connection | -| `Scheduled` | `bool?` | Optional | Indicates if the data sync is scheduled for this connection | -| `ConnectionType` | `string` | Optional | - | -| `Configuration` | `string` | Optional | Configuration properties of the connection | -| `IsExternal` | `bool?` | Optional | - | -| `IsDeprecated` | `bool?` | Optional | Indicates if the connection is deprecated | -| `IsDeleted` | `bool?` | Optional | Indicates if the connection is deleted | -| `IsHidden` | `bool?` | Optional | Indicates if the connection is hideen | -| `Complete` | `bool?` | Optional | Indicates if the all the properties of connection is provided | -| `IndexVersion` | `double?` | Optional | - | -| `GenerationNum` | `double?` | Optional | - | -| `Created` | `string` | Optional | Date and time when user account was created | -| `Modified` | `string` | Optional | Date and time of last modification of user account | -| `Author` | [`Models.UserNameAndID`](../../doc/models/user-name-and-id.md) | Optional | - | -| `ModifiedBy` | [`Models.UserNameAndID`](../../doc/models/user-name-and-id.md) | Optional | - | -| `Owner` | [`Models.UserNameAndID`](../../doc/models/user-name-and-id.md) | Optional | - | -| `Tags` | `List` | Optional | List of tags assigned to the connection | -| `Tables` | `List` | Optional | List of tables linked to this connection and details of the columns in the table | - -## Example (as JSON) - -```json -{ - "name": null, - "description": null, - "type": null, - "id": null, - "scheduled": null, - "connectionType": null, - "configuration": null, - "isExternal": null, - "isDeprecated": null, - "isDeleted": null, - "isHidden": null, - "complete": null, - "indexVersion": null, - "generationNum": null, - "created": null, - "modified": null, - "author": null, - "modifiedBy": null, - "owner": null, - "tags": null, - "tables": null -} -``` - diff --git a/DotNet/doc/models/create-table-response.md b/DotNet/doc/models/create-table-response.md deleted file mode 100644 index bbf1394fe..000000000 --- a/DotNet/doc/models/create-table-response.md +++ /dev/null @@ -1,23 +0,0 @@ - -# Create Table Response - -## Structure - -`CreateTableResponse` - -## Fields - -| Name | Type | Tags | Description | -| --- | --- | --- | --- | -| `LogicalTableHeader` | [`Models.LogicalTableHeader`](../../doc/models/logical-table-header.md) | Optional | - | -| `PhysicalTableId` | `string` | Optional | - | - -## Example (as JSON) - -```json -{ - "logicalTableHeader": null, - "physicalTableId": null -} -``` - diff --git a/DotNet/doc/models/dependent-permission.md b/DotNet/doc/models/dependent-permission.md deleted file mode 100644 index 7f2292117..000000000 --- a/DotNet/doc/models/dependent-permission.md +++ /dev/null @@ -1,31 +0,0 @@ - -# Dependent Permission - -## Structure - -`DependentPermission` - -## Fields - -| Name | Type | Tags | Description | -| --- | --- | --- | --- | -| `Id` | `string` | Optional | GUID of the object | -| `Name` | `string` | Optional | Name of the object | -| `Type` | `string` | Optional | Indicates the type of the object | -| `Permission` | `string` | Optional | Indicates the permission which user or user group has on the object | -| `SharedPermission` | `string` | Optional | Indicates the permission which user or user group has on the object through sharing of the object with this user or user group | -| `GroupPermission` | [`List`](../../doc/models/group-permission.md) | Optional | An array of object with details of permission on the user groups to which the user or user group belongs | - -## Example (as JSON) - -```json -{ - "id": null, - "name": null, - "type": null, - "permission": null, - "sharedPermission": null, - "groupPermission": null -} -``` - diff --git a/DotNet/doc/models/error-response-exception.md b/DotNet/doc/models/error-response-exception.md deleted file mode 100644 index d3f195f56..000000000 --- a/DotNet/doc/models/error-response-exception.md +++ /dev/null @@ -1,21 +0,0 @@ - -# Error Response Exception - -## Structure - -`ErrorResponseException` - -## Fields - -| Name | Type | Tags | Description | -| --- | --- | --- | --- | -| `Error` | `object` | Optional | - | - -## Example (as JSON) - -```json -{ - "error": null -} -``` - diff --git a/DotNet/doc/models/format-type-3-enum.md b/DotNet/doc/models/format-type-3-enum.md deleted file mode 100644 index eda7010b5..000000000 --- a/DotNet/doc/models/format-type-3-enum.md +++ /dev/null @@ -1,16 +0,0 @@ - -# Format Type 3 Enum - -The format in which to export the objects - -## Enumeration - -`FormatType3Enum` - -## Fields - -| Name | -| --- | -| `YAML` | -| `JSON` | - diff --git a/DotNet/doc/models/format-type-enum.md b/DotNet/doc/models/format-type-enum.md deleted file mode 100644 index 5d0d34595..000000000 --- a/DotNet/doc/models/format-type-enum.md +++ /dev/null @@ -1,20 +0,0 @@ - -# Format Type Enum - -The format of the data in the response. - -FULL: The response comes in "column":"value" format. - -COMPACT: The response includes only the value of the columns. - -## Enumeration - -`FormatTypeEnum` - -## Fields - -| Name | -| --- | -| `COMPACT` | -| `FULL` | - diff --git a/DotNet/doc/models/from-user-name-and-id-input.md b/DotNet/doc/models/from-user-name-and-id-input.md deleted file mode 100644 index 6b47dbcf0..000000000 --- a/DotNet/doc/models/from-user-name-and-id-input.md +++ /dev/null @@ -1,29 +0,0 @@ - -# From User Name and ID Input - -A JSON object of name or GUIDs of the current owner of the objects. When both are given then id is considered. - -If a list of object ids are provided as input for TsObjectId, then only for those ids that have owner as the value provided in fromUser, the owner will be changed. - -Provide either name or id as input. When both are given user id will be considered. - -## Structure - -`FromUserNameAndIDInput` - -## Fields - -| Name | Type | Tags | Description | -| --- | --- | --- | --- | -| `Name` | `string` | Optional | Username of the user | -| `Id` | `string` | Optional | GUID of the user | - -## Example (as JSON) - -```json -{ - "name": null, - "id": null -} -``` - diff --git a/DotNet/doc/models/group-name-and-id-input.md b/DotNet/doc/models/group-name-and-id-input.md deleted file mode 100644 index 02563635c..000000000 --- a/DotNet/doc/models/group-name-and-id-input.md +++ /dev/null @@ -1,23 +0,0 @@ - -# Group Name and ID Input - -## Structure - -`GroupNameAndIDInput` - -## Fields - -| Name | Type | Tags | Description | -| --- | --- | --- | --- | -| `Name` | `string` | Optional | Name of the group | -| `Id` | `string` | Optional | GUID of the group | - -## Example (as JSON) - -```json -{ - "name": null, - "id": null -} -``` - diff --git a/DotNet/doc/models/group-name-and-id.md b/DotNet/doc/models/group-name-and-id.md deleted file mode 100644 index 946d81f72..000000000 --- a/DotNet/doc/models/group-name-and-id.md +++ /dev/null @@ -1,23 +0,0 @@ - -# Group Name and ID - -## Structure - -`GroupNameAndID` - -## Fields - -| Name | Type | Tags | Description | -| --- | --- | --- | --- | -| `Name` | `string` | Optional | Name of the group | -| `Id` | `string` | Optional | GUID of the group | - -## Example (as JSON) - -```json -{ - "name": null, - "id": null -} -``` - diff --git a/DotNet/doc/models/group-permission.md b/DotNet/doc/models/group-permission.md deleted file mode 100644 index 7adaa8b6e..000000000 --- a/DotNet/doc/models/group-permission.md +++ /dev/null @@ -1,25 +0,0 @@ - -# Group Permission - -## Structure - -`GroupPermission` - -## Fields - -| Name | Type | Tags | Description | -| --- | --- | --- | --- | -| `Id` | `string` | Optional | GUID of the user group | -| `Name` | `string` | Optional | Name of the user group | -| `Permission` | `string` | Optional | Indicates the permission which user group has on the object | - -## Example (as JSON) - -```json -{ - "id": null, - "name": null, - "permission": null -} -``` - diff --git a/DotNet/doc/models/group-response.md b/DotNet/doc/models/group-response.md deleted file mode 100644 index e3ddaf974..000000000 --- a/DotNet/doc/models/group-response.md +++ /dev/null @@ -1,79 +0,0 @@ - -# Group Response - -## Structure - -`GroupResponse` - -## Fields - -| Name | Type | Tags | Description | -| --- | --- | --- | --- | -| `Name` | `string` | Optional | Name of the group | -| `DisplayName` | `string` | Optional | A unique display name string for the user group | -| `Id` | `string` | Optional | GUID of the group | -| `Visibility` | `string` | Optional | Visibility of the group | -| `Description` | `string` | Optional | Description of the group | -| `Privileges` | `List` | Optional | Privileges assigned to the group | -| `Orgs` | [`List`](../../doc/models/org-type.md) | Optional | The organizations that user belongs to | -| `Groups` | [`List`](../../doc/models/group-name-and-id.md) | Optional | Name of the group to which is added | -| `Users` | [`List`](../../doc/models/user-name-and-id.md) | Optional | User Group Information by Id or Name. | -| `AssignedLiveboards` | [`List`](../../doc/models/liveboard-name-and-id.md) | Optional | Liveboards assigned to the group | -| `UserGroupContent` | `object` | Optional | - | -| `Tags` | `List` | Optional | Tags assigned to the group | -| `IsDeleted` | `bool?` | Optional | Indicates if the group is deleted | -| `IsHidden` | `bool?` | Optional | Indicates if the group is hidden | -| `IsExternal` | `bool?` | Optional | Indicates if the group is from external system | -| `IsDeprecated` | `bool?` | Optional | - | -| `Complete` | `bool?` | Optional | Indicates if the all the properties of group is provided | -| `IsSystemPrincipal` | `bool?` | Optional | Indicates if the group is system principal | -| `Type` | `string` | Optional | Indicates the type of group | -| `Parenttype` | `string` | Optional | Indicates the type of parent object | -| `GroupIdx` | `int?` | Optional | - | -| `MetadataVersion` | `int?` | Optional | - | -| `TenantId` | `string` | Optional | Tenant id associated with the group | -| `IndexVersion` | `double?` | Optional | - | -| `GenerationNum` | `double?` | Optional | - | -| `Created` | `double?` | Optional | Date and time when group was created | -| `Modified` | `double?` | Optional | Date and time of last modification of the group | -| `Author` | [`Models.UserNameAndID`](../../doc/models/user-name-and-id.md) | Optional | - | -| `ModifiedBy` | [`Models.UserNameAndID`](../../doc/models/user-name-and-id.md) | Optional | - | -| `Owner` | [`Models.UserNameAndID`](../../doc/models/user-name-and-id.md) | Optional | - | - -## Example (as JSON) - -```json -{ - "name": null, - "displayName": null, - "id": null, - "visibility": null, - "description": null, - "privileges": null, - "orgs": null, - "groups": null, - "users": null, - "assignedLiveboards": null, - "userGroupContent": null, - "tags": null, - "isDeleted": null, - "isHidden": null, - "isExternal": null, - "isDeprecated": null, - "complete": null, - "isSystemPrincipal": null, - "type": null, - "parenttype": null, - "groupIdx": null, - "metadataVersion": null, - "tenantId": null, - "indexVersion": null, - "generationNum": null, - "created": null, - "modified": null, - "author": null, - "modifiedBy": null, - "owner": null -} -``` - diff --git a/DotNet/doc/models/home-liveboard-response.md b/DotNet/doc/models/home-liveboard-response.md deleted file mode 100644 index fa570c5d2..000000000 --- a/DotNet/doc/models/home-liveboard-response.md +++ /dev/null @@ -1,27 +0,0 @@ - -# Home Liveboard Response - -## Structure - -`HomeLiveboardResponse` - -## Fields - -| Name | Type | Tags | Description | -| --- | --- | --- | --- | -| `UserName` | `string` | Optional | Name of the user | -| `UserId` | `string` | Optional | The GUID of the user | -| `LiveboardName` | `string` | Optional | Name of the liveboard | -| `LiveboardId` | `string` | Optional | The GUID of the liveboard | - -## Example (as JSON) - -```json -{ - "userName": null, - "userId": null, - "liveboardName": null, - "liveboardId": null -} -``` - diff --git a/DotNet/doc/models/import-policy-enum.md b/DotNet/doc/models/import-policy-enum.md deleted file mode 100644 index 74a7195e1..000000000 --- a/DotNet/doc/models/import-policy-enum.md +++ /dev/null @@ -1,17 +0,0 @@ - -# Import Policy Enum - -Policy to follow during import - -## Enumeration - -`ImportPolicyEnum` - -## Fields - -| Name | -| --- | -| `PARTIAL` | -| `ALLORNONE` | -| `VALIDATEONLY` | - diff --git a/DotNet/doc/models/liveboard-name-and-id.md b/DotNet/doc/models/liveboard-name-and-id.md deleted file mode 100644 index 80b5d377e..000000000 --- a/DotNet/doc/models/liveboard-name-and-id.md +++ /dev/null @@ -1,23 +0,0 @@ - -# Liveboard Name and ID - -## Structure - -`LiveboardNameAndID` - -## Fields - -| Name | Type | Tags | Description | -| --- | --- | --- | --- | -| `Name` | `string` | Optional | Name of the liveboard | -| `Id` | `string` | Optional | GUID of the liveboard | - -## Example (as JSON) - -```json -{ - "name": null, - "id": null -} -``` - diff --git a/DotNet/doc/models/liveboard-query-response.md b/DotNet/doc/models/liveboard-query-response.md deleted file mode 100644 index 8b9e276e6..000000000 --- a/DotNet/doc/models/liveboard-query-response.md +++ /dev/null @@ -1,25 +0,0 @@ - -# Liveboard Query Response - -## Structure - -`LiveboardQueryResponse` - -## Fields - -| Name | Type | Tags | Description | -| --- | --- | --- | --- | -| `Name` | `string` | Optional | The name of the Liveboard | -| `Id` | `string` | Optional | The GUID of the Liveboard | -| `Viz` | [`List`](../../doc/models/viz-type.md) | Optional | SQL query associated with the saved Answer | - -## Example (as JSON) - -```json -{ - "name": null, - "id": null, - "viz": null -} -``` - diff --git a/DotNet/doc/models/logical-table-header.md b/DotNet/doc/models/logical-table-header.md deleted file mode 100644 index cd29717bb..000000000 --- a/DotNet/doc/models/logical-table-header.md +++ /dev/null @@ -1,51 +0,0 @@ - -# Logical Table Header - -## Structure - -`LogicalTableHeader` - -## Fields - -| Name | Type | Tags | Description | -| --- | --- | --- | --- | -| `Id` | `string` | Optional | - | -| `Name` | `string` | Optional | - | -| `Author` | `string` | Optional | - | -| `AuthorName` | `string` | Optional | - | -| `AuthorDisplayName` | `string` | Optional | - | -| `Created` | `double?` | Optional | - | -| `Modified` | `double?` | Optional | - | -| `ModifiedBy` | `string` | Optional | - | -| `GenerationNum` | `int?` | Optional | - | -| `Owner` | `string` | Optional | - | -| `Deleted` | `bool?` | Optional | - | -| `Hidden` | `bool?` | Optional | - | -| `Database` | `string` | Optional | - | -| `Schema` | `string` | Optional | - | -| `Type` | `string` | Optional | - | -| `SubType` | `string` | Optional | - | - -## Example (as JSON) - -```json -{ - "id": null, - "name": null, - "author": null, - "authorName": null, - "authorDisplayName": null, - "created": null, - "modified": null, - "modifiedBy": null, - "generationNum": null, - "owner": null, - "deleted": null, - "hidden": null, - "database": null, - "schema": null, - "type": null, - "subType": null -} -``` - diff --git a/DotNet/doc/models/logs-response.md b/DotNet/doc/models/logs-response.md deleted file mode 100644 index 9acd67de6..000000000 --- a/DotNet/doc/models/logs-response.md +++ /dev/null @@ -1,23 +0,0 @@ - -# Logs Response - -## Structure - -`LogsResponse` - -## Fields - -| Name | Type | Tags | Description | -| --- | --- | --- | --- | -| `Date` | `string` | Optional | Date and time for the event in the log | -| `Log` | `string` | Optional | Logged event at the time specified in JSON format. This includes, Event ID, A unique description of the event, for example, User login failed, Timestamp, User ID of the person initiating the event and IP address of the ThoughtSpot instance. | - -## Example (as JSON) - -```json -{ - "date": null, - "log": null -} -``` - diff --git a/DotNet/doc/models/metadata-tag-response.md b/DotNet/doc/models/metadata-tag-response.md deleted file mode 100644 index 276242df5..000000000 --- a/DotNet/doc/models/metadata-tag-response.md +++ /dev/null @@ -1,47 +0,0 @@ - -# Metadata Tag Response - -## Structure - -`MetadataTagResponse` - -## Fields - -| Name | Type | Tags | Description | -| --- | --- | --- | --- | -| `Name` | `string` | Optional | Name of the tag | -| `Id` | `string` | Optional | GUID of the tag | -| `ClientState` | [`Models.ClientState`](../../doc/models/client-state.md) | Optional | - | -| `IndexVersion` | `double?` | Optional | - | -| `GenerationNum` | `double?` | Optional | - | -| `IsDeleted` | `bool?` | Optional | Indicates if the tag is deleted | -| `IsHidden` | `bool?` | Optional | Indicates if the tag is hidden | -| `IsExternal` | `bool?` | Optional | Indicates if the tag is from external system | -| `IsDeprecated` | `bool?` | Optional | - | -| `Created` | `double?` | Optional | Date and time when group was created | -| `Modified` | `double?` | Optional | Date and time of last modification of the group | -| `ModifiedBy` | [`Models.TagNameAndID`](../../doc/models/tag-name-and-id.md) | Optional | - | -| `Author` | [`Models.TagNameAndID`](../../doc/models/tag-name-and-id.md) | Optional | - | -| `Owner` | [`Models.TagNameAndID`](../../doc/models/tag-name-and-id.md) | Optional | - | - -## Example (as JSON) - -```json -{ - "name": null, - "id": null, - "clientState": null, - "indexVersion": null, - "generationNum": null, - "isDeleted": null, - "isHidden": null, - "isExternal": null, - "isDeprecated": null, - "created": null, - "modified": null, - "modifiedBy": null, - "author": null, - "owner": null -} -``` - diff --git a/DotNet/doc/models/name-and-id-input.md b/DotNet/doc/models/name-and-id-input.md deleted file mode 100644 index 93bb357eb..000000000 --- a/DotNet/doc/models/name-and-id-input.md +++ /dev/null @@ -1,23 +0,0 @@ - -# Name and Id Input - -## Structure - -`NameAndIdInput` - -## Fields - -| Name | Type | Tags | Description | -| --- | --- | --- | --- | -| `Name` | `string` | Optional | Name of the user | -| `Id` | `string` | Optional | GUID of the user | - -## Example (as JSON) - -```json -{ - "name": null, - "id": null -} -``` - diff --git a/DotNet/doc/models/org-type.md b/DotNet/doc/models/org-type.md deleted file mode 100644 index a22b0604c..000000000 --- a/DotNet/doc/models/org-type.md +++ /dev/null @@ -1,23 +0,0 @@ - -# Org Type - -## Structure - -`OrgType` - -## Fields - -| Name | Type | Tags | Description | -| --- | --- | --- | --- | -| `Name` | `string` | Optional | Name of the organization | -| `Id` | `int?` | Optional | Id of the organization | - -## Example (as JSON) - -```json -{ - "name": null, - "id": null -} -``` - diff --git a/DotNet/doc/models/orgs-response.md b/DotNet/doc/models/orgs-response.md deleted file mode 100644 index b4f8bad8e..000000000 --- a/DotNet/doc/models/orgs-response.md +++ /dev/null @@ -1,31 +0,0 @@ - -# Orgs Response - -## Structure - -`OrgsResponse` - -## Fields - -| Name | Type | Tags | Description | -| --- | --- | --- | --- | -| `OrgId` | `int?` | Optional | ID of the organization searched for | -| `OrgName` | `string` | Optional | Name of the organization searched for | -| `Description` | `string` | Optional | Description associated with the organization | -| `AllGroupUserId` | `string` | Optional | GUID of the ALL group in the organization | -| `DefaultAdminUserGroupId` | `string` | Optional | GUID of the admin group in the organization | -| `Active` | `bool?` | Optional | Indicates if the organization is active or not | - -## Example (as JSON) - -```json -{ - "orgId": null, - "orgName": null, - "description": null, - "allGroupUserId": null, - "defaultAdminUserGroupId": null, - "active": null -} -``` - diff --git a/DotNet/doc/models/orientation-enum.md b/DotNet/doc/models/orientation-enum.md deleted file mode 100644 index e297ba16e..000000000 --- a/DotNet/doc/models/orientation-enum.md +++ /dev/null @@ -1,16 +0,0 @@ - -# Orientation Enum - -Page orientation for the PDF. Default: PORTRAIT - -## Enumeration - -`OrientationEnum` - -## Fields - -| Name | -| --- | -| `PORTRAIT` | -| `LANDSCAPE` | - diff --git a/DotNet/doc/models/pdf-options-input.md b/DotNet/doc/models/pdf-options-input.md deleted file mode 100644 index 75a0fa412..000000000 --- a/DotNet/doc/models/pdf-options-input.md +++ /dev/null @@ -1,33 +0,0 @@ - -# Pdf Options Input - -## Structure - -`PdfOptionsInput` - -## Fields - -| Name | Type | Tags | Description | -| --- | --- | --- | --- | -| `Orientation` | [`Models.OrientationEnum?`](../../doc/models/orientation-enum.md) | Optional | Page orientation for the PDF. Default: PORTRAIT | -| `TruncateTables` | `bool?` | Optional | When set to true, only the first page of the tables is displayed in the file.

This setting is applicable only when generating report for specific visualization ids. Default: false | -| `IncludeLogo` | `bool?` | Optional | Include customized wide logo if available in the footer. Default: true | -| `FooterText` | `string` | Optional | Footer text to include in the footer of each page of the PDF. | -| `IncludePageNumber` | `bool?` | Optional | When set to true, the page number is included in the footer of each page. Default: true | -| `IncludeCoverPage` | `bool?` | Optional | When set to true, a cover page with the Liveboard title is added in the PDF. Default: true | -| `IncludeFilterPage` | `bool?` | Optional | When set to true, a second page with a list of all applied filters is added in the PDF. Default: true | - -## Example (as JSON) - -```json -{ - "orientation": null, - "truncateTables": null, - "includeLogo": null, - "footerText": null, - "includePageNumber": null, - "includeCoverPage": null, - "includeFilterPage": null -} -``` - diff --git a/DotNet/doc/models/permissions-type-search.md b/DotNet/doc/models/permissions-type-search.md deleted file mode 100644 index b54ffc0d6..000000000 --- a/DotNet/doc/models/permissions-type-search.md +++ /dev/null @@ -1,23 +0,0 @@ - -# Permissions Type Search - -## Structure - -`PermissionsTypeSearch` - -## Fields - -| Name | Type | Tags | Description | -| --- | --- | --- | --- | -| `Type` | `string` | Optional | Indicates the type of the object | -| `TsObject` | [`List`](../../doc/models/ts-object-type-serach.md) | Optional | An array of objects of type mentioned in type field | - -## Example (as JSON) - -```json -{ - "type": null, - "tsObject": null -} -``` - diff --git a/DotNet/doc/models/pinboard-details.md b/DotNet/doc/models/pinboard-details.md deleted file mode 100644 index eb6768d6d..000000000 --- a/DotNet/doc/models/pinboard-details.md +++ /dev/null @@ -1,27 +0,0 @@ - -# Pinboard Details - -## Structure - -`PinboardDetails` - -## Fields - -| Name | Type | Tags | Description | -| --- | --- | --- | --- | -| `PinboardId` | `string` | Optional | pinboard id of recently pinned pinboard | -| `PinboardName` | `string` | Optional | pinboard name of recently pinned pinboard | -| `TabId` | `string` | Optional | tab id of recently pinned tab | -| `TabName` | `string` | Optional | tab name of recently pinned tab | - -## Example (as JSON) - -```json -{ - "pinboardId": null, - "pinboardName": null, - "tabId": null, - "tabName": null -} -``` - diff --git a/DotNet/doc/models/principal-search-response.md b/DotNet/doc/models/principal-search-response.md deleted file mode 100644 index 38db17d72..000000000 --- a/DotNet/doc/models/principal-search-response.md +++ /dev/null @@ -1,27 +0,0 @@ - -# Principal Search Response - -## Structure - -`PrincipalSearchResponse` - -## Fields - -| Name | Type | Tags | Description | -| --- | --- | --- | --- | -| `Id` | `string` | Optional | GUID of the user or user group | -| `Name` | `string` | Optional | Name of the user or user group | -| `Type` | `string` | Optional | Indicates the type of principal | -| `Permissions` | [`List`](../../doc/models/permissions-type-search.md) | Optional | Indicates the permission which user or user group has on the object | - -## Example (as JSON) - -```json -{ - "id": null, - "name": null, - "type": null, - "permissions": null -} -``` - diff --git a/DotNet/doc/models/privilege-enum.md b/DotNet/doc/models/privilege-enum.md deleted file mode 100644 index d49665569..000000000 --- a/DotNet/doc/models/privilege-enum.md +++ /dev/null @@ -1,31 +0,0 @@ - -# Privilege Enum - -## Enumeration - -`PrivilegeEnum` - -## Fields - -| Name | -| --- | -| `RANALYSIS` | -| `DATAMANAGEMENT` | -| `APPLICATIONADMINISTRATION` | -| `USERADMINISTRATION` | -| `SYSTEMMANAGEMENT` | -| `SYSTEMINFOADMINISTRATION` | -| `AUTHORING` | -| `BACKUPADMINISTRATION` | -| `SHAREWITHALL` | -| `DEVELOPER` | -| `JOBSCHEDULING` | -| `GROUPADMINISTRATION` | -| `BYPASSRLS` | -| `EXPERIMENTALFEATUREPRIVILEGE` | -| `A3ANALYSIS` | -| `USERDATAUPLOADING` | -| `DATADOWNLOADING` | -| `DISABLEPINBOARDCREATION` | -| `ADMINISTRATION` | - diff --git a/DotNet/doc/models/secuirity-dependents.md b/DotNet/doc/models/secuirity-dependents.md deleted file mode 100644 index af9309995..000000000 --- a/DotNet/doc/models/secuirity-dependents.md +++ /dev/null @@ -1,31 +0,0 @@ - -# Secuirity Dependents - -## Structure - -`SecuirityDependents` - -## Fields - -| Name | Type | Tags | Description | -| --- | --- | --- | --- | -| `Id` | `string` | Optional | GUID of the object | -| `Name` | `string` | Optional | Name of the object | -| `Type` | `string` | Optional | Indicates the type of the object | -| `Owner` | `string` | Optional | Owner of the object | -| `Author` | [`Models.UserNameAndID`](../../doc/models/user-name-and-id.md) | Optional | - | -| `Permissions` | [`List`](../../doc/models/dependent-permission.md) | Optional | - | - -## Example (as JSON) - -```json -{ - "id": null, - "name": null, - "type": null, - "owner": null, - "author": null, - "permissions": null -} -``` - diff --git a/DotNet/doc/models/security-permission-response.md b/DotNet/doc/models/security-permission-response.md deleted file mode 100644 index 4061ba5dd..000000000 --- a/DotNet/doc/models/security-permission-response.md +++ /dev/null @@ -1,33 +0,0 @@ - -# Security Permission Response - -## Structure - -`SecurityPermissionResponse` - -## Fields - -| Name | Type | Tags | Description | -| --- | --- | --- | --- | -| `Id` | `string` | Optional | GUID of the object | -| `Name` | `string` | Optional | Name of the object | -| `Type` | `string` | Optional | Indicates the type of the object | -| `Owner` | `string` | Optional | GUID of the owner of the object | -| `Author` | [`Models.UserNameAndID`](../../doc/models/user-name-and-id.md) | Optional | - | -| `Permissions` | [`List`](../../doc/models/security-permission.md) | Optional | An array of object with details of permission on users and user groups | -| `Dependents` | [`List`](../../doc/models/secuirity-dependents.md) | Optional | The objects on which the primary object is dependent on | - -## Example (as JSON) - -```json -{ - "id": null, - "name": null, - "type": null, - "owner": null, - "author": null, - "permissions": null, - "dependents": null -} -``` - diff --git a/DotNet/doc/models/security-permission.md b/DotNet/doc/models/security-permission.md deleted file mode 100644 index b50f2caae..000000000 --- a/DotNet/doc/models/security-permission.md +++ /dev/null @@ -1,31 +0,0 @@ - -# Security Permission - -## Structure - -`SecurityPermission` - -## Fields - -| Name | Type | Tags | Description | -| --- | --- | --- | --- | -| `Id` | `string` | Optional | GUID of the user or user group | -| `Name` | `string` | Optional | Name of the user or user group | -| `Type` | `string` | Optional | Indicates the type of principal | -| `Permission` | `string` | Optional | Indicates the permission which user or user group has on the object | -| `SharedPermission` | `string` | Optional | Indicates the permission which user or user group has on the object through sharing of the object with this user or user group | -| `GroupPermission` | [`List`](../../doc/models/group-permission.md) | Optional | An array of object with details of permission on the user groups to which the user or user group belongs | - -## Example (as JSON) - -```json -{ - "id": null, - "name": null, - "type": null, - "permission": null, - "sharedPermission": null, - "groupPermission": null -} -``` - diff --git a/DotNet/doc/models/session-login-response.md b/DotNet/doc/models/session-login-response.md deleted file mode 100644 index f2914ecac..000000000 --- a/DotNet/doc/models/session-login-response.md +++ /dev/null @@ -1,31 +0,0 @@ - -# Session Login Response - -Login response - -## Structure - -`SessionLoginResponse` - -## Fields - -| Name | Type | Tags | Description | -| --- | --- | --- | --- | -| `UserName` | `string` | Optional | Username of the user account for which token is generated | -| `Token` | `string` | Optional | Bearer token generated. This will be blank when token type is Cookie | -| `TokenCreatedTime` | `string` | Optional | Date and time at which the token is generated | -| `TokenExpiryDuration` | `string` | Optional | Duration in seconds after which the token expires | -| `TokenType` | `string` | Optional | Type of token generated | - -## Example (as JSON) - -```json -{ - "userName": null, - "token": null, - "tokenCreatedTime": null, - "tokenExpiryDuration": null, - "tokenType": null -} -``` - diff --git a/DotNet/doc/models/sort-by-1-enum.md b/DotNet/doc/models/sort-by-1-enum.md deleted file mode 100644 index a80270e7b..000000000 --- a/DotNet/doc/models/sort-by-1-enum.md +++ /dev/null @@ -1,26 +0,0 @@ - -# Sort by 1 Enum - -Field based on which the re.sponse needs to be ordered. Valid values - -## Enumeration - -`SortBy1Enum` - -## Fields - -| Name | -| --- | -| `DEFAULT` | -| `NAME` | -| `DISPLAYNAME` | -| `AUTHOR` | -| `CREATED` | -| `MODIFIED` | -| `LASTACCESSED` | -| `SYNCED` | -| `VIEWS` | -| `NONE` | -| `USERSTATE` | -| `ROWCOUNT` | - diff --git a/DotNet/doc/models/sort-by-enum.md b/DotNet/doc/models/sort-by-enum.md deleted file mode 100644 index 2b1a28b6f..000000000 --- a/DotNet/doc/models/sort-by-enum.md +++ /dev/null @@ -1,26 +0,0 @@ - -# Sort by Enum - -Field based on which the response needs to be ordered. - -## Enumeration - -`SortByEnum` - -## Fields - -| Name | -| --- | -| `DEFAULT` | -| `NAME` | -| `DISPLAYNAME` | -| `AUTHOR` | -| `CREATED` | -| `MODIFIED` | -| `LASTACCESSED` | -| `SYNCED` | -| `VIEWS` | -| `NONE` | -| `USERSTATE` | -| `ROWCOUNT` | - diff --git a/DotNet/doc/models/sort-order-1-enum.md b/DotNet/doc/models/sort-order-1-enum.md deleted file mode 100644 index 2ec76b355..000000000 --- a/DotNet/doc/models/sort-order-1-enum.md +++ /dev/null @@ -1,17 +0,0 @@ - -# Sort Order 1 Enum - -Order in which sortBy should be applied. Valid values - -## Enumeration - -`SortOrder1Enum` - -## Fields - -| Name | -| --- | -| `DEFAULT` | -| `ASC` | -| `DESC` | - diff --git a/DotNet/doc/models/sort-order-enum.md b/DotNet/doc/models/sort-order-enum.md deleted file mode 100644 index e448349b5..000000000 --- a/DotNet/doc/models/sort-order-enum.md +++ /dev/null @@ -1,17 +0,0 @@ - -# Sort Order Enum - -Order in which sortBy should be applied. - -## Enumeration - -`SortOrderEnum` - -## Fields - -| Name | -| --- | -| `DEFAULT` | -| `ASC` | -| `DESC` | - diff --git a/DotNet/doc/models/state-1-enum.md b/DotNet/doc/models/state-1-enum.md deleted file mode 100644 index 758fd0610..000000000 --- a/DotNet/doc/models/state-1-enum.md +++ /dev/null @@ -1,19 +0,0 @@ - -# State 1 Enum - -Status of user account. acitve or inactive. - -## Enumeration - -`State1Enum` - -## Fields - -| Name | -| --- | -| `ACTIVE` | -| `INACTIVE` | -| `EXPIRED` | -| `LOCKED` | -| `PENDING` | - diff --git a/DotNet/doc/models/state-enum.md b/DotNet/doc/models/state-enum.md deleted file mode 100644 index 94aa47712..000000000 --- a/DotNet/doc/models/state-enum.md +++ /dev/null @@ -1,17 +0,0 @@ - -# State Enum - -## Enumeration - -`StateEnum` - -## Fields - -| Name | -| --- | -| `ACTIVE` | -| `INACTIVE` | -| `EXPIRED` | -| `LOCKED` | -| `PENDING` | - diff --git a/DotNet/doc/models/table-columns.md b/DotNet/doc/models/table-columns.md deleted file mode 100644 index a2286c158..000000000 --- a/DotNet/doc/models/table-columns.md +++ /dev/null @@ -1,23 +0,0 @@ - -# Table Columns - -## Structure - -`TableColumns` - -## Fields - -| Name | Type | Tags | Description | -| --- | --- | --- | --- | -| `Name` | `string` | Optional | Name of the column | -| `DataType` | `string` | Optional | Datatype of the column | - -## Example (as JSON) - -```json -{ - "name": null, - "dataType": null -} -``` - diff --git a/DotNet/doc/models/table-input.md b/DotNet/doc/models/table-input.md deleted file mode 100644 index 0bac3bb31..000000000 --- a/DotNet/doc/models/table-input.md +++ /dev/null @@ -1,23 +0,0 @@ - -# Table Input - -## Structure - -`TableInput` - -## Fields - -| Name | Type | Tags | Description | -| --- | --- | --- | --- | -| `Name` | `string` | Optional | Name of the table | -| `Id` | `string` | Optional | GUID of the Table | - -## Example (as JSON) - -```json -{ - "name": null, - "id": null -} -``` - diff --git a/DotNet/doc/models/table-list.md b/DotNet/doc/models/table-list.md deleted file mode 100644 index 241ebe32e..000000000 --- a/DotNet/doc/models/table-list.md +++ /dev/null @@ -1,53 +0,0 @@ - -# Table List - -## Structure - -`TableList` - -## Fields - -| Name | Type | Tags | Description | -| --- | --- | --- | --- | -| `Name` | `string` | Optional | Name of the table | -| `Type` | `string` | Optional | Type of the table | -| `Id` | `string` | Optional | GUID of the table | -| `DatabaseStripe` | `string` | Optional | Name of the database to which the table belongs | -| `SchemaStripe` | `string` | Optional | Name of the schema to which the table belongs | -| `IsExternal` | `bool?` | Optional | - | -| `IsDeprecated` | `bool?` | Optional | Indicates if the table is deprecated | -| `IsDeleted` | `bool?` | Optional | Indicates if the table is deleted | -| `IsHidden` | `bool?` | Optional | Indicates if the table is hideen | -| `IndexVersion` | `double?` | Optional | - | -| `GenerationNum` | `double?` | Optional | - | -| `Created` | `string` | Optional | Date and time when the table was created | -| `Modified` | `string` | Optional | Date and time of last modification of the table | -| `Author` | [`Models.UserNameAndID`](../../doc/models/user-name-and-id.md) | Optional | - | -| `ModifiedBy` | [`Models.UserNameAndID`](../../doc/models/user-name-and-id.md) | Optional | - | -| `Owner` | [`Models.UserNameAndID`](../../doc/models/user-name-and-id.md) | Optional | - | -| `Tags` | `List` | Optional | List of tags assigned to the table | - -## Example (as JSON) - -```json -{ - "name": null, - "type": null, - "id": null, - "databaseStripe": null, - "schemaStripe": null, - "isExternal": null, - "isDeprecated": null, - "isDeleted": null, - "isHidden": null, - "indexVersion": null, - "generationNum": null, - "created": null, - "modified": null, - "author": null, - "modifiedBy": null, - "owner": null, - "tags": null -} -``` - diff --git a/DotNet/doc/models/tag-name-and-id-input.md b/DotNet/doc/models/tag-name-and-id-input.md deleted file mode 100644 index 9796e73c7..000000000 --- a/DotNet/doc/models/tag-name-and-id-input.md +++ /dev/null @@ -1,23 +0,0 @@ - -# Tag Name and Id Input - -## Structure - -`TagNameAndIdInput` - -## Fields - -| Name | Type | Tags | Description | -| --- | --- | --- | --- | -| `Name` | `string` | Optional | Name of the tags | -| `Id` | `string` | Optional | GUID of the tags | - -## Example (as JSON) - -```json -{ - "name": null, - "id": null -} -``` - diff --git a/DotNet/doc/models/tag-name-and-id.md b/DotNet/doc/models/tag-name-and-id.md deleted file mode 100644 index 1a957fda0..000000000 --- a/DotNet/doc/models/tag-name-and-id.md +++ /dev/null @@ -1,23 +0,0 @@ - -# Tag Name and ID - -## Structure - -`TagNameAndID` - -## Fields - -| Name | Type | Tags | Description | -| --- | --- | --- | --- | -| `Name` | `string` | Optional | Name of the group to which group is added | -| `Id` | `string` | Optional | GUID of the group to which group is added | - -## Example (as JSON) - -```json -{ - "name": null, - "id": null -} -``` - diff --git a/DotNet/doc/models/to-user-name-and-id-input.md b/DotNet/doc/models/to-user-name-and-id-input.md deleted file mode 100644 index 820421a3f..000000000 --- a/DotNet/doc/models/to-user-name-and-id-input.md +++ /dev/null @@ -1,25 +0,0 @@ - -# To User Name and ID Input - -A JSON object of name or GUIDs of the new owner for the objects. When both are given then id is considered. - -## Structure - -`ToUserNameAndIDInput` - -## Fields - -| Name | Type | Tags | Description | -| --- | --- | --- | --- | -| `Name` | `string` | Optional | Username of the user | -| `Id` | `string` | Optional | GUID of the user | - -## Example (as JSON) - -```json -{ - "name": null, - "id": null -} -``` - diff --git a/DotNet/doc/models/topic-enum.md b/DotNet/doc/models/topic-enum.md deleted file mode 100644 index 68b6d2721..000000000 --- a/DotNet/doc/models/topic-enum.md +++ /dev/null @@ -1,13 +0,0 @@ - -# Topic Enum - -## Enumeration - -`TopicEnum` - -## Fields - -| Name | -| --- | -| `SecurityLogs` | - diff --git a/DotNet/doc/models/ts-object-input.md b/DotNet/doc/models/ts-object-input.md deleted file mode 100644 index 6cad6e113..000000000 --- a/DotNet/doc/models/ts-object-input.md +++ /dev/null @@ -1,23 +0,0 @@ - -# Ts Object Input - -## Structure - -`TsObjectInput` - -## Fields - -| Name | Type | Tags | Description | -| --- | --- | --- | --- | -| `Id` | `string` | Required | GUID of the metadata object | -| `Type` | [`Models.TypeEnum`](../../doc/models/type-enum.md) | Required | Type of the metadata object | - -## Example (as JSON) - -```json -{ - "id": "id0", - "type": "DATAOBJECT" -} -``` - diff --git a/DotNet/doc/models/ts-object-search-input.md b/DotNet/doc/models/ts-object-search-input.md deleted file mode 100644 index 7fb543ce0..000000000 --- a/DotNet/doc/models/ts-object-search-input.md +++ /dev/null @@ -1,25 +0,0 @@ - -# Ts Object Search Input - -## Structure - -`TsObjectSearchInput` - -## Fields - -| Name | Type | Tags | Description | -| --- | --- | --- | --- | -| `Type` | [`Models.Type2Enum`](../../doc/models/type-2-enum.md) | Required | Type of the metadata objec | -| `Id` | `List` | Required | A JSON Array of GUIDs of the metadata object | - -## Example (as JSON) - -```json -{ - "type": "DATAOBJECT", - "id": [ - "id0" - ] -} -``` - diff --git a/DotNet/doc/models/ts-object-type-serach.md b/DotNet/doc/models/ts-object-type-serach.md deleted file mode 100644 index f89607914..000000000 --- a/DotNet/doc/models/ts-object-type-serach.md +++ /dev/null @@ -1,33 +0,0 @@ - -# Ts Object Type Serach - -## Structure - -`TsObjectTypeSerach` - -## Fields - -| Name | Type | Tags | Description | -| --- | --- | --- | --- | -| `Id` | `string` | Optional | GUID of the object | -| `Name` | `string` | Optional | Name of the object | -| `Owner` | `string` | Optional | Owner of the object | -| `Author` | [`Models.UserNameAndID`](../../doc/models/user-name-and-id.md) | Optional | - | -| `Permission` | `string` | Optional | Indicates the permission which user or user group has on the object | -| `SharedPermission` | `string` | Optional | Indicates the permission which user or user group has on the object through sharing of the object with the user or user group | -| `GroupPermission` | [`List`](../../doc/models/group-permission.md) | Optional | An array of object with details of permission on the user groups to which the user or user group belongs | - -## Example (as JSON) - -```json -{ - "id": null, - "name": null, - "owner": null, - "author": null, - "permission": null, - "sharedPermission": null, - "groupPermission": null -} -``` - diff --git a/DotNet/doc/models/tspublic-rest-v2-admin-assignauthor-request.md b/DotNet/doc/models/tspublic-rest-v2-admin-assignauthor-request.md deleted file mode 100644 index 272a7a6d3..000000000 --- a/DotNet/doc/models/tspublic-rest-v2-admin-assignauthor-request.md +++ /dev/null @@ -1,29 +0,0 @@ - -# Tspublic Rest V2 Admin Assignauthor Request - -## Structure - -`TspublicRestV2AdminAssignauthorRequest` - -## Fields - -| Name | Type | Tags | Description | -| --- | --- | --- | --- | -| `TsObjectId` | `List` | Required | A JSON array of GUIDs of the metadata objects. | -| `Name` | `string` | Optional | User name of the user account | -| `Id` | `string` | Optional | The GUID of the user account | - -## Example (as JSON) - -```json -{ - "tsObjectId": [ - "tsObjectId1", - "tsObjectId2", - "tsObjectId3" - ], - "name": null, - "id": null -} -``` - diff --git a/DotNet/doc/models/tspublic-rest-v2-admin-changeauthor-request.md b/DotNet/doc/models/tspublic-rest-v2-admin-changeauthor-request.md deleted file mode 100644 index d53394233..000000000 --- a/DotNet/doc/models/tspublic-rest-v2-admin-changeauthor-request.md +++ /dev/null @@ -1,35 +0,0 @@ - -# Tspublic Rest V2 Admin Changeauthor Request - -## Structure - -`TspublicRestV2AdminChangeauthorRequest` - -## Fields - -| Name | Type | Tags | Description | -| --- | --- | --- | --- | -| `TsObjectId` | `List` | Required | A JSON array of GUIDs of the metadata objects.

To change owner of all the objects owned by a user, provide single input as ALL.

If multiple object ids along with ALL is provided as input, then ALL will be considered. | -| `FromUser` | [`Models.FromUserNameAndIDInput`](../../doc/models/from-user-name-and-id-input.md) | Required | A JSON object of name or GUIDs of the current owner of the objects. When both are given then id is considered.

If a list of object ids are provided as input for TsObjectId, then only for those ids that have owner as the value provided in fromUser, the owner will be changed.

Provide either name or id as input. When both are given user id will be considered. | -| `ToUser` | [`Models.ToUserNameAndIDInput`](../../doc/models/to-user-name-and-id-input.md) | Required | A JSON object of name or GUIDs of the new owner for the objects. When both are given then id is considered. | - -## Example (as JSON) - -```json -{ - "tsObjectId": [ - "tsObjectId1", - "tsObjectId2", - "tsObjectId3" - ], - "fromUser": { - "name": null, - "id": null - }, - "toUser": { - "name": null, - "id": null - } -} -``` - diff --git a/DotNet/doc/models/tspublic-rest-v2-admin-configuration-update-request.md b/DotNet/doc/models/tspublic-rest-v2-admin-configuration-update-request.md deleted file mode 100644 index 22c761ac6..000000000 --- a/DotNet/doc/models/tspublic-rest-v2-admin-configuration-update-request.md +++ /dev/null @@ -1,21 +0,0 @@ - -# Tspublic Rest V2 Admin Configuration Update Request - -## Structure - -`TspublicRestV2AdminConfigurationUpdateRequest` - -## Fields - -| Name | Type | Tags | Description | -| --- | --- | --- | --- | -| `Configuration` | `string` | Optional | A JSON file with the key-value pair of configuration attributes to be updated.

Example: {"defaultChartDataSize": 5000} | - -## Example (as JSON) - -```json -{ - "configuration": null -} -``` - diff --git a/DotNet/doc/models/tspublic-rest-v2-admin-forcelogout-request.md b/DotNet/doc/models/tspublic-rest-v2-admin-forcelogout-request.md deleted file mode 100644 index 08b92e672..000000000 --- a/DotNet/doc/models/tspublic-rest-v2-admin-forcelogout-request.md +++ /dev/null @@ -1,21 +0,0 @@ - -# Tspublic Rest V2 Admin Forcelogout Request - -## Structure - -`TspublicRestV2AdminForcelogoutRequest` - -## Fields - -| Name | Type | Tags | Description | -| --- | --- | --- | --- | -| `User` | [`List`](../../doc/models/name-and-id-input.md) | Optional | A JSON array of name of users or GUIDs of groups or both. When both are given then id is considered. | - -## Example (as JSON) - -```json -{ - "user": null -} -``` - diff --git a/DotNet/doc/models/tspublic-rest-v2-admin-resetpassword-request.md b/DotNet/doc/models/tspublic-rest-v2-admin-resetpassword-request.md deleted file mode 100644 index f48b29ea8..000000000 --- a/DotNet/doc/models/tspublic-rest-v2-admin-resetpassword-request.md +++ /dev/null @@ -1,25 +0,0 @@ - -# Tspublic Rest V2 Admin Resetpassword Request - -## Structure - -`TspublicRestV2AdminResetpasswordRequest` - -## Fields - -| Name | Type | Tags | Description | -| --- | --- | --- | --- | -| `Name` | `string` | Optional | User name of the user account | -| `Id` | `string` | Optional | The GUID of the user account to query. | -| `NewPassword` | `string` | Required | A new password for the user. | - -## Example (as JSON) - -```json -{ - "name": null, - "id": null, - "newPassword": "newPassword6" -} -``` - diff --git a/DotNet/doc/models/tspublic-rest-v2-admin-syncprincipal-request.md b/DotNet/doc/models/tspublic-rest-v2-admin-syncprincipal-request.md deleted file mode 100644 index a3f3f01d7..000000000 --- a/DotNet/doc/models/tspublic-rest-v2-admin-syncprincipal-request.md +++ /dev/null @@ -1,40 +0,0 @@ - -# Tspublic Rest V2 Admin Syncprincipal Request - -## Structure - -`TspublicRestV2AdminSyncprincipalRequest` - -## Fields - -| Name | Type | Tags | Description | -| --- | --- | --- | --- | -| `PrincipalObject` | `object` | Required | A JSON array of principal objects containing all users and groups present in the external system.

Example:

{

"name": "Customer Success",

"displayName": "Customer Success",

"description": "CS",

"created": 1568926267025,

"modified": 1568926982242,

"principalTypeEnum": "LOCAL_GROUP",

"groupNames": [],

"visibility": "DEFAULT"

},

{

"name": "test",

"displayName": "test one",

"created": 1587573621279,

"modified": 1587573621674,

"mail": "test2@test.com",

"principalTypeEnum": "LOCAL_USER",

"groupNames": [ "Administrator", "All" ],

"visibility": "DEFAULT"

}

You can leave the created and modified dates blank for new users.

You can specify if the principal is a user (LOCAL_USER) or user group (LOCAL_GROUP) in the principalTypeEnum keyword.

Set visibility to NON_SHARABLE, if you do not want the user to be able to share ThoughtSpot objects with other users in this group. | -| `UpdateModified` | `bool?` | Optional | Specifies whether to apply the changes to users and groups already in the cluster based on the principal object list input.
**Default**: `false` | -| `DeleteRemoved` | `bool?` | Optional | Specifies whether to delete the users and groups already in the cluster if not present in the principal object list input.
**Default**: `false` | -| `NewUserPassword` | `string` | Optional | Assign a password for new users added during the sync operation.

All new users added will have this password. It is mandatory to provide value for this field if new users are included in the input list. | - -## Example (as JSON) - -```json -{ - "principalObject": [ - { - "key1": "val1", - "key2": "val2" - }, - { - "key1": "val1", - "key2": "val2" - }, - { - "key1": "val1", - "key2": "val2" - } - ], - "updateModified": null, - "deleteRemoved": null, - "newUserPassword": null -} -``` - diff --git a/DotNet/doc/models/tspublic-rest-v2-connection-addtable-request.md b/DotNet/doc/models/tspublic-rest-v2-connection-addtable-request.md deleted file mode 100644 index 167bd1277..000000000 --- a/DotNet/doc/models/tspublic-rest-v2-connection-addtable-request.md +++ /dev/null @@ -1,35 +0,0 @@ - -# Tspublic Rest V2 Connection Addtable Request - -## Structure - -`TspublicRestV2ConnectionAddtableRequest` - -## Fields - -| Name | Type | Tags | Description | -| --- | --- | --- | --- | -| `Id` | `string` | Required | GUID of the connection | -| `Table` | [`List`](../../doc/models/add-table-input.md) | Required | A JSON array of table details | - -## Example (as JSON) - -```json -{ - "id": "id0", - "table": [ - { - "name": "name6", - "dbName": "dbName4", - "schemaName": "schemaName0", - "columns": [ - { - "name": "name6", - "dataType": "dataType8" - } - ] - } - ] -} -``` - diff --git a/DotNet/doc/models/tspublic-rest-v2-connection-create-request.md b/DotNet/doc/models/tspublic-rest-v2-connection-create-request.md deleted file mode 100644 index c6d923301..000000000 --- a/DotNet/doc/models/tspublic-rest-v2-connection-create-request.md +++ /dev/null @@ -1,27 +0,0 @@ - -# Tspublic Rest V2 Connection Create Request - -## Structure - -`TspublicRestV2ConnectionCreateRequest` - -## Fields - -| Name | Type | Tags | Description | -| --- | --- | --- | --- | -| `Type` | [`Models.Type14Enum`](../../doc/models/type-14-enum.md) | Required | Type of the data connection. | -| `Name` | `string` | Required | Name of the connection | -| `Description` | `string` | Optional | A short description of the connection. | -| `Configuration` | `string` | Required | A JSON object of the connection metadata. The metadata must include configuration attributes required to create the connection. | - -## Example (as JSON) - -```json -{ - "type": "DENODO", - "name": "name0", - "description": null, - "configuration": "configuration6" -} -``` - diff --git a/DotNet/doc/models/tspublic-rest-v2-connection-removetable-request.md b/DotNet/doc/models/tspublic-rest-v2-connection-removetable-request.md deleted file mode 100644 index 11fda66c2..000000000 --- a/DotNet/doc/models/tspublic-rest-v2-connection-removetable-request.md +++ /dev/null @@ -1,28 +0,0 @@ - -# Tspublic Rest V2 Connection Removetable Request - -## Structure - -`TspublicRestV2ConnectionRemovetableRequest` - -## Fields - -| Name | Type | Tags | Description | -| --- | --- | --- | --- | -| `Id` | `string` | Required | GUID of the connection | -| `Table` | [`List`](../../doc/models/table-input.md) | Required | A JSON array of name or GUIDs of the table or both. At least one input is required. Provide either table name or id. When both are given then id is considered | - -## Example (as JSON) - -```json -{ - "id": "id0", - "table": [ - { - "name": null, - "id": null - } - ] -} -``` - diff --git a/DotNet/doc/models/tspublic-rest-v2-connection-search-request.md b/DotNet/doc/models/tspublic-rest-v2-connection-search-request.md deleted file mode 100644 index 05c8c16ef..000000000 --- a/DotNet/doc/models/tspublic-rest-v2-connection-search-request.md +++ /dev/null @@ -1,39 +0,0 @@ - -# Tspublic Rest V2 Connection Search Request - -## Structure - -`TspublicRestV2ConnectionSearchRequest` - -## Fields - -| Name | Type | Tags | Description | -| --- | --- | --- | --- | -| `Offset` | `int?` | Optional | The offset point, starting from where the records should be included in the response. If no input is provided then offset starts from 0
**Default**: `0` | -| `BatchNumber` | `int?` | Optional | An alternate way to set offset for the starting point of the response. Offset field should be kept blank to use the value from this field. Offset value will be calculated as (batchNumber - 1) * batchSize. It is mandatory to provide a value for batchSize with batchNumber. Example: Assume response has 100 records. Now, batchNumber is set as 2 and batchSize as 10, then offset value will be 10. So, 10 records starting from 11th record will be considered.
**Default**: `-1` | -| `BatchSize` | `int?` | Optional | The number of records that should be included in the response starting from offset position. If no input is provided, then all records starting from the value provided in offset is included in the response.
**Default**: `-1` | -| `SortBy` | [`Models.SortBy1Enum?`](../../doc/models/sort-by-1-enum.md) | Optional | Field based on which the re.sponse needs to be ordered. Valid values
**Default**: `SortBy1Enum.DEFAULT` | -| `SortOrder` | [`Models.SortOrder1Enum?`](../../doc/models/sort-order-1-enum.md) | Optional | Order in which sortBy should be applied. Valid values | -| `Type` | [`Models.Type15Enum`](../../doc/models/type-15-enum.md) | Required | Type of the connect being searched. Valid values: SNOWFLAKE\|AMAZON_REDSHIFT\|GOOGLE_BIGQUERY\|AZURE_SYNAPSE\|TERADATA\|STARBURST\|SAP_HANA\|ORACLE_ADW\|DATABRICKS\|DENODO | -| `NamePattern` | `string` | Optional | A pattern to match the name of the connection. This parameter supports matching case-insensitive strings. For a wildcard match, use %. | -| `FetchId` | `List` | Optional | A JSON array containing the GUIDs of the connections that you want to fetch. | -| `SkipId` | `List` | Optional | A JSON array containing the GUIDs of the connections that you want to skip. | -| `Tag` | [`List`](../../doc/models/tag-name-and-id-input.md) | Optional | A JSON array of name or GUID of tags or both. When both are given then id is considered | - -## Example (as JSON) - -```json -{ - "offset": null, - "batchNumber": null, - "batchSize": null, - "sortBy": null, - "sortOrder": null, - "type": "DENODO", - "namePattern": null, - "fetchId": null, - "skipId": null, - "tag": null -} -``` - diff --git a/DotNet/doc/models/tspublic-rest-v2-connection-table-request.md b/DotNet/doc/models/tspublic-rest-v2-connection-table-request.md deleted file mode 100644 index cb97d56f0..000000000 --- a/DotNet/doc/models/tspublic-rest-v2-connection-table-request.md +++ /dev/null @@ -1,25 +0,0 @@ - -# Tspublic Rest V2 Connection Table Request - -## Structure - -`TspublicRestV2ConnectionTableRequest` - -## Fields - -| Name | Type | Tags | Description | -| --- | --- | --- | --- | -| `Id` | `string` | Required | The GUID of the connection | -| `Configuration` | `string` | Optional | A JSON object of the connection metadata. If this field is left empty, then the configuration saved in the connection is considered.

To get the tables based on a different configuration, include required attributes in the connection configuration JSON.

Example:

Get tables from Snowflake with a different user account than specified in the connection: {"user":"test_user","password":"test_pwd","role":"test_role"}

Get tables from Redshift for different database than specified in the connection: {"database":"test_db"} | -| `IncludeColumn` | `bool?` | Optional | When set to true, the response will include column level details as well
**Default**: `true` | - -## Example (as JSON) - -```json -{ - "id": "id0", - "configuration": null, - "includeColumn": null -} -``` - diff --git a/DotNet/doc/models/tspublic-rest-v2-connection-tablecoloumn-request.md b/DotNet/doc/models/tspublic-rest-v2-connection-tablecoloumn-request.md deleted file mode 100644 index dec769365..000000000 --- a/DotNet/doc/models/tspublic-rest-v2-connection-tablecoloumn-request.md +++ /dev/null @@ -1,31 +0,0 @@ - -# Tspublic Rest V2 Connection Tablecoloumn Request - -## Structure - -`TspublicRestV2ConnectionTablecoloumnRequest` - -## Fields - -| Name | Type | Tags | Description | -| --- | --- | --- | --- | -| `Id` | `string` | Required | The GUID of the connection | -| `Configuration` | `string` | Optional | A JSON object of the connection metadata. If this field is left empty, then the configuration saved in the connection is considered.

To get the tables based on a different configuration, include required attributes in the connection configuration JSON.

Example:

Get tables from Snowflake with a different user account than specified in the connection: {"user":"test_user","password":"test_pwd","role":"test_role"}

Get tables from Redshift for different database than specified in the connection: {"database":"test_db"} | -| `Table` | [`List`](../../doc/models/connection-table-columns-input.md) | Required | List of table details | - -## Example (as JSON) - -```json -{ - "id": "id0", - "configuration": null, - "table": [ - { - "dbName": "dbName4", - "schemaName": "schemaName0", - "name": "name6" - } - ] -} -``` - diff --git a/DotNet/doc/models/tspublic-rest-v2-connection-update-request.md b/DotNet/doc/models/tspublic-rest-v2-connection-update-request.md deleted file mode 100644 index 9ac7c09ab..000000000 --- a/DotNet/doc/models/tspublic-rest-v2-connection-update-request.md +++ /dev/null @@ -1,27 +0,0 @@ - -# Tspublic Rest V2 Connection Update Request - -## Structure - -`TspublicRestV2ConnectionUpdateRequest` - -## Fields - -| Name | Type | Tags | Description | -| --- | --- | --- | --- | -| `Id` | `string` | Required | GUID of the connection | -| `Name` | `string` | Optional | The text to update the name of the connection. | -| `Description` | `string` | Optional | The text to update the description of the connection. | -| `Configuration` | `string` | Required | A JSON object of the connection metadata. Include all the configuration attributes with original value along with the changes required to any attribute. | - -## Example (as JSON) - -```json -{ - "id": "id0", - "name": null, - "description": null, - "configuration": "configuration6" -} -``` - diff --git a/DotNet/doc/models/tspublic-rest-v2-customaction-association-update-request.md b/DotNet/doc/models/tspublic-rest-v2-customaction-association-update-request.md deleted file mode 100644 index d9f5ad831..000000000 --- a/DotNet/doc/models/tspublic-rest-v2-customaction-association-update-request.md +++ /dev/null @@ -1,23 +0,0 @@ - -# Tspublic Rest V2 Customaction Association Update Request - -## Structure - -`TspublicRestV2CustomactionAssociationUpdateRequest` - -## Fields - -| Name | Type | Tags | Description | -| --- | --- | --- | --- | -| `Id` | `string` | Required | GUID of the custom action | -| `Association` | `string` | Required | A JSON map of the attributes with association of the action to ThoughtSpot object ID

Example:

{"id":"0dbd5b3a-84c1-4407-9803-cf07d67e6fcf","name":"My worksheet action","version":"v2","type":"URL","detail":{"link":"https://unpkg.com","function":"my-worksheet-action","authSelect":"NONE","authToken":"","encodeUser":"","apiKey":"X-API-KEY","apiValue":"","additionalUrlHeaders":"{}"},"actionAssociationMap":{"WORKSHEET":{"2b9d083a-275c-4984-9cfe-90b036affa17":{"enabled":"true","context":"PRIMARY"}}},"context":"NONE","availability":[ ],"userGroupList":["d0326b56-ef23-4c8a-8327-a30e99bcc72b"]} | - -## Example (as JSON) - -```json -{ - "id": "id0", - "association": "association0" -} -``` - diff --git a/DotNet/doc/models/tspublic-rest-v2-customaction-create-request.md b/DotNet/doc/models/tspublic-rest-v2-customaction-create-request.md deleted file mode 100644 index d6c73c1c1..000000000 --- a/DotNet/doc/models/tspublic-rest-v2-customaction-create-request.md +++ /dev/null @@ -1,21 +0,0 @@ - -# Tspublic Rest V2 Customaction Create Request - -## Structure - -`TspublicRestV2CustomactionCreateRequest` - -## Fields - -| Name | Type | Tags | Description | -| --- | --- | --- | --- | -| `Configuration` | `string` | Required | A JSON object with the key-value pair of configuration attributes

Example:

{"id":"3f7eac93-cce1-4ffc-b7a8-429353edbc6b","name":"unpkg test","version":"v2","type":"URL","detail":{"link":"https://unpkg.com ","function":"unpkg-test","authSelect":"BEARER","authToken":"asdfasadf3q4534534","encodeUser":"","apiKey":"X-API-KEY","apiValue":"","additionalUrlHeaders":"{\\"url_header1\\":{\\"id\\":\\"6a82908c-9328-40ff-b347-65adeda12f57\\",\\"key\\":\\"key1\\",\\"value\\":\\"value1\\"}}"},"actionAssociationMap":{"ANSWER":{"e4079d3f-ae71-4b0a-a70a-f17ecaf157a5":{"enabled":"true","context":"MENU"}}},"context":"NONE","availability":["GLOBAL"],"userGroupList":["d0326b56-ef23-4c8a-8327-a30e99bcc72b"]} | - -## Example (as JSON) - -```json -{ - "configuration": "configuration6" -} -``` - diff --git a/DotNet/doc/models/tspublic-rest-v2-customaction-search-request.md b/DotNet/doc/models/tspublic-rest-v2-customaction-search-request.md deleted file mode 100644 index 42601f4fd..000000000 --- a/DotNet/doc/models/tspublic-rest-v2-customaction-search-request.md +++ /dev/null @@ -1,21 +0,0 @@ - -# Tspublic Rest V2 Customaction Search Request - -## Structure - -`TspublicRestV2CustomactionSearchRequest` - -## Fields - -| Name | Type | Tags | Description | -| --- | --- | --- | --- | -| `Tag` | `List` | Optional | A JSON array of tag GUIDs.

If tags are applied to worksheets, search answers, or Liveboard visualizations, and custom actions are associated to these objects, you can use this parameter to filter the custom action data by tags. | - -## Example (as JSON) - -```json -{ - "tag": null -} -``` - diff --git a/DotNet/doc/models/tspublic-rest-v2-customaction-update-request.md b/DotNet/doc/models/tspublic-rest-v2-customaction-update-request.md deleted file mode 100644 index e34314445..000000000 --- a/DotNet/doc/models/tspublic-rest-v2-customaction-update-request.md +++ /dev/null @@ -1,23 +0,0 @@ - -# Tspublic Rest V2 Customaction Update Request - -## Structure - -`TspublicRestV2CustomactionUpdateRequest` - -## Fields - -| Name | Type | Tags | Description | -| --- | --- | --- | --- | -| `Id` | `string` | Required | GUID of the custom action | -| `Configuration` | `string` | Required | A JSON object with the key-value pair of configuration attributes

Example:

{"id":"3f7eac93-cce1-4ffc-b7a8-429353edbc6b","name":"unpkg test","version":"v2","type":"URL","detail":{"link":"https://unpkg.com ","function":"unpkg-test","authSelect":"BEARER","authToken":"asdfasadf3q4534534","encodeUser":"","apiKey":"X-API-KEY","apiValue":"","additionalUrlHeaders":"{\\"url_header1\\":{\\"id\\":\\"6a82908c-9328-40ff-b347-65adeda12f57\\",\\"key\\":\\"key1\\",\\"value\\":\\"value1\\"}}"},"actionAssociationMap":{"ANSWER":{"e4079d3f-ae71-4b0a-a70a-f17ecaf157a5":{"enabled":"true","context":"MENU"}}},"context":"NONE","availability":["GLOBAL"],"userGroupList":["d0326b56-ef23-4c8a-8327-a30e99bcc72b"]} | - -## Example (as JSON) - -```json -{ - "id": "id0", - "configuration": "configuration6" -} -``` - diff --git a/DotNet/doc/models/tspublic-rest-v2-data-answer-request.md b/DotNet/doc/models/tspublic-rest-v2-data-answer-request.md deleted file mode 100644 index 96b1a7b61..000000000 --- a/DotNet/doc/models/tspublic-rest-v2-data-answer-request.md +++ /dev/null @@ -1,29 +0,0 @@ - -# Tspublic Rest V2 Data Answer Request - -## Structure - -`TspublicRestV2DataAnswerRequest` - -## Fields - -| Name | Type | Tags | Description | -| --- | --- | --- | --- | -| `Offset` | `int?` | Optional | The offset point, starting from where the records should be included in the response.

If no input is provided then offset starts from 0.
**Default**: `0` | -| `BatchNumber` | `int?` | Optional | An alternate way to set offset for the starting point of the response.

The value in offset field will not be considered if batchNumber field has value greater than 0.

Offset value will be calculated as (batchNumber - 1) * batchSize.

It is mandatory to provide a value for batchSize with batchNumber.

Example:

Assume response has 100 records. Now, batchNumber is set as 2 and batchSize as 10, then offset value will be 10. So, 10 records starting from 11th record will be considered.
**Default**: `-1` | -| `BatchSize` | `int?` | Optional | The number of records that should be included in the response starting from offset position.

If no input is provided, then all records starting from the value provided in offset is included in the response
**Default**: `-1` | -| `Id` | `string` | Required | The GUID of the Answer | -| `FormatType` | [`Models.FormatTypeEnum?`](../../doc/models/format-type-enum.md) | Optional | The format of the data in the response.

FULL: The response comes in "column":"value" format.

COMPACT: The response includes only the value of the columns.
**Default**: `FormatTypeEnum.COMPACT` | - -## Example (as JSON) - -```json -{ - "offset": null, - "batchNumber": null, - "batchSize": null, - "id": "id0", - "formatType": null -} -``` - diff --git a/DotNet/doc/models/tspublic-rest-v2-data-liveboard-request.md b/DotNet/doc/models/tspublic-rest-v2-data-liveboard-request.md deleted file mode 100644 index 28cfd4998..000000000 --- a/DotNet/doc/models/tspublic-rest-v2-data-liveboard-request.md +++ /dev/null @@ -1,37 +0,0 @@ - -# Tspublic Rest V2 Data Liveboard Request - -## Structure - -`TspublicRestV2DataLiveboardRequest` - -## Fields - -| Name | Type | Tags | Description | -| --- | --- | --- | --- | -| `Offset` | `int?` | Optional | The offset point, starting from where the records should be included in the response.

If no input is provided then offset starts from 0.
**Default**: `0` | -| `BatchNumber` | `int?` | Optional | An alternate way to set offset for the starting point of the response.

The value in offset field will not be considered if batchNumber field has value greater than 0.

Offset value will be calculated as (batchNumber - 1) * batchSize.

It is mandatory to provide a value for batchSize with batchNumber.

Example:

Assume response has 100 records. Now, batchNumber is set as 2 and batchSize as 10, then offset value will be 10. So, 10 records starting from 11th record will be considered.
**Default**: `-1` | -| `BatchSize` | `int?` | Optional | The number of records that should be included in the response starting from offset position.

If no input is provided, then all records starting from the value provided in offset is included in the response
**Default**: `-1` | -| `Id` | `string` | Optional | The GUID of the Liveboard | -| `TransientContent` | `string` | Optional | If you have embedded ThoughtSpot in your host application, and you want to download Liveboard data with unsaved changes then, pass the transient content from the browser fetch request, using the getExportRequestForCurrentPinboard method. For more information, see https://developers.thoughtspot.com/docs/?pageid=liveboard-export-api#transient-pinboard . If value for this field is provided, then id will not be considered. | -| `VizId` | `List` | Optional | A JSON array of GUIDs of the visualizations in the Liveboard. | -| `RuntimeFilter` | `string` | Optional | JSON object which contains filter condition to filter the data at the time of data retrieval.

Example: {"col1":"region","op1":"EQ","val1":"northeast","col2":"date","op2":"BET","val2":["1625126400000","1625126400000"]}

For more information, see https://developers.thoughtspot.com/docs/?pageid=runtime-filters | -| `RuntimeSort` | `string` | Optional | JSON object which provides columns to sort the data at the time of data retrieval.

Example: {"sortCol1":"region","asc1":true,"sortCol2":"date"}

For more information, see https://developers.thoughtspot.com/docs/?pageid=runtime-filters. | -| `FormatType` | [`Models.FormatTypeEnum?`](../../doc/models/format-type-enum.md) | Optional | The format of the data in the response.

FULL: The response comes in "column":"value" format.

COMPACT: The response includes only the value of the columns.
**Default**: `FormatTypeEnum.COMPACT` | - -## Example (as JSON) - -```json -{ - "offset": null, - "batchNumber": null, - "batchSize": null, - "id": null, - "transientContent": null, - "vizId": null, - "runtimeFilter": null, - "runtimeSort": null, - "formatType": null -} -``` - diff --git a/DotNet/doc/models/tspublic-rest-v2-data-search-request.md b/DotNet/doc/models/tspublic-rest-v2-data-search-request.md deleted file mode 100644 index 044feaada..000000000 --- a/DotNet/doc/models/tspublic-rest-v2-data-search-request.md +++ /dev/null @@ -1,31 +0,0 @@ - -# Tspublic Rest V2 Data Search Request - -## Structure - -`TspublicRestV2DataSearchRequest` - -## Fields - -| Name | Type | Tags | Description | -| --- | --- | --- | --- | -| `Offset` | `int?` | Optional | The offset point, starting from where the records should be included in the response.

If no input is provided then offset starts from 0.
**Default**: `-1` | -| `BatchNumber` | `int?` | Optional | An alternate way to set offset for the starting point of the response.

The value in offset field will not be considered if batchNumber field has value greater than 0.

Offset value will be calculated as (batchNumber - 1) * batchSize.

It is mandatory to provide a value for batchSize with batchNumber.

Example:

Assume response has 100 records. Now, batchNumber is set as 2 and batchSize as 10, then offset value will be 10. So, 10 records starting from 11th record will be considered.
**Default**: `-1` | -| `BatchSize` | `int?` | Optional | The number of records that should be included in the response starting from offset position.

If no input is provided, then all records starting from the value provided in offset is included in the response
**Default**: `-1` | -| `QueryString` | `string` | Required | The data search query string. Example: [revenue] > 1000 [ship mode] = 'air' | -| `DataObjectId` | `string` | Required | The GUID of the data object, either a worksheet, a view, or a table. | -| `FormatType` | [`Models.FormatTypeEnum?`](../../doc/models/format-type-enum.md) | Optional | The format of the data in the response.

FULL: The response comes in "column":"value" format.

COMPACT: The response includes only the value of the columns.
**Default**: `FormatTypeEnum.COMPACT` | - -## Example (as JSON) - -```json -{ - "offset": null, - "batchNumber": null, - "batchSize": null, - "queryString": "queryString4", - "dataObjectId": "dataObjectId2", - "formatType": null -} -``` - diff --git a/DotNet/doc/models/tspublic-rest-v2-database-table-create-request.md b/DotNet/doc/models/tspublic-rest-v2-database-table-create-request.md deleted file mode 100644 index 7a8ae5afc..000000000 --- a/DotNet/doc/models/tspublic-rest-v2-database-table-create-request.md +++ /dev/null @@ -1,23 +0,0 @@ - -# Tspublic Rest V2 Database Table Create Request - -## Structure - -`TspublicRestV2DatabaseTableCreateRequest` - -## Fields - -| Name | Type | Tags | Description | -| --- | --- | --- | --- | -| `CreateDatabase` | `bool?` | Optional | Flag to indicate if the database and schema should be created if they do not exist in Falcon. (Valid values: True/False)
**Default**: `true` | -| `Schema` | `string` | Optional | DDL of the table to be created. Example: {"database":{"name":"test_db"},"schema":{"name":"test_schema"},"table":{"id":{"name":"test_table"},"primary_key":[{"name":"test_pk"}],"column":[{"id":{"name":"test_pk"},"size":0,"data_type":"TYPE_INT32"},{"id":{"name":"test_col1"},"size":0,"data_type":"TYPE_FLOAT"},{"id":{"name":"test_col2"},"data_type":"TYPE_INT64","datetime":"TYPE_DATE"}{"id":{"name":"test_col3"},"size":10,"data_type":"TYPE_VAR_CHAR"}]}} | - -## Example (as JSON) - -```json -{ - "createDatabase": null, - "schema": null -} -``` - diff --git a/DotNet/doc/models/tspublic-rest-v2-database-table-runquery-request.md b/DotNet/doc/models/tspublic-rest-v2-database-table-runquery-request.md deleted file mode 100644 index 562f3033d..000000000 --- a/DotNet/doc/models/tspublic-rest-v2-database-table-runquery-request.md +++ /dev/null @@ -1,23 +0,0 @@ - -# Tspublic Rest V2 Database Table Runquery Request - -## Structure - -`TspublicRestV2DatabaseTableRunqueryRequest` - -## Fields - -| Name | Type | Tags | Description | -| --- | --- | --- | --- | -| `Statement` | `List` | Required | A JSON array of TQL statements separated by semi-colon (;). Each TQL statement should end with semi-colon (;). The TQL operations that can be run through this API are restricted to create database and schema, alter table, delete and update table rows. If a TQL statement fails, then the subsequent statements in the array are not run. Example: ["alter table test_db.test_schema.test_table drop contraint primary key;";"alter table test_db.test_schema.test_table add column test_col4 varchar(10) DEFAULT '';"] | - -## Example (as JSON) - -```json -{ - "statement": [ - "statement0" - ] -} -``` - diff --git a/DotNet/doc/models/tspublic-rest-v2-group-addgroup-request.md b/DotNet/doc/models/tspublic-rest-v2-group-addgroup-request.md deleted file mode 100644 index a5d35adf0..000000000 --- a/DotNet/doc/models/tspublic-rest-v2-group-addgroup-request.md +++ /dev/null @@ -1,38 +0,0 @@ - -# Tspublic Rest V2 Group Addgroup Request - -## Structure - -`TspublicRestV2GroupAddgroupRequest` - -## Fields - -| Name | Type | Tags | Description | -| --- | --- | --- | --- | -| `Name` | `string` | Optional | Name of the group | -| `Id` | `string` | Optional | The GUID of the group to query. | -| `Groups` | [`List`](../../doc/models/group-name-and-id-input.md) | Required | Array of objects of groups that the user belong to. | - -## Example (as JSON) - -```json -{ - "name": null, - "id": null, - "groups": [ - { - "name": null, - "id": null - }, - { - "name": null, - "id": null - }, - { - "name": null, - "id": null - } - ] -} -``` - diff --git a/DotNet/doc/models/tspublic-rest-v2-group-addprivilege-request.md b/DotNet/doc/models/tspublic-rest-v2-group-addprivilege-request.md deleted file mode 100644 index 962a523b7..000000000 --- a/DotNet/doc/models/tspublic-rest-v2-group-addprivilege-request.md +++ /dev/null @@ -1,25 +0,0 @@ - -# Tspublic Rest V2 Group Addprivilege Request - -## Structure - -`TspublicRestV2GroupAddprivilegeRequest` - -## Fields - -| Name | Type | Tags | Description | -| --- | --- | --- | --- | -| `Name` | `string` | Optional | Name of the group | -| `Id` | `string` | Optional | The GUID of the group to query. | -| `Privileges` | [`List`](../../doc/models/privilege-enum.md) | Optional | A JSON array of name of users or GUIDs of users or both. When both are given then id is considered | - -## Example (as JSON) - -```json -{ - "name": null, - "id": null, - "privileges": null -} -``` - diff --git a/DotNet/doc/models/tspublic-rest-v2-group-adduser-request.md b/DotNet/doc/models/tspublic-rest-v2-group-adduser-request.md deleted file mode 100644 index ad08013ce..000000000 --- a/DotNet/doc/models/tspublic-rest-v2-group-adduser-request.md +++ /dev/null @@ -1,34 +0,0 @@ - -# Tspublic Rest V2 Group Adduser Request - -## Structure - -`TspublicRestV2GroupAdduserRequest` - -## Fields - -| Name | Type | Tags | Description | -| --- | --- | --- | --- | -| `Name` | `string` | Optional | Name of the group | -| `Id` | `string` | Optional | The GUID of the group to query. | -| `Users` | [`List`](../../doc/models/user-name-and-id-input.md) | Required | Array of user name that you want to update in user group. | - -## Example (as JSON) - -```json -{ - "name": null, - "id": null, - "users": [ - { - "name": null, - "id": null - }, - { - "name": null, - "id": null - } - ] -} -``` - diff --git a/DotNet/doc/models/tspublic-rest-v2-group-create-request.md b/DotNet/doc/models/tspublic-rest-v2-group-create-request.md deleted file mode 100644 index 73420bc23..000000000 --- a/DotNet/doc/models/tspublic-rest-v2-group-create-request.md +++ /dev/null @@ -1,37 +0,0 @@ - -# Tspublic Rest V2 Group Create Request - -## Structure - -`TspublicRestV2GroupCreateRequest` - -## Fields - -| Name | Type | Tags | Description | -| --- | --- | --- | --- | -| `Name` | `string` | Required | Name of the user group. The group name string must be unique. | -| `DisplayName` | `string` | Required | A unique display name string for the user group, for example, Developer group. | -| `Visibility` | [`Models.Visibility2Enum?`](../../doc/models/visibility-2-enum.md) | Optional | Visibility of the user group. The visibility attribute is set to DEFAULT. The DEFAULT attribute makes the user group visible for other user groups and allows them to share objects.
**Default**: `Visibility2Enum.DEFAULT` | -| `Description` | `string` | Optional | Description text for the group. | -| `Privileges` | [`List`](../../doc/models/privilege-enum.md) | Optional | A JSON array of privileges assigned to the group | -| `OrgId` | `int?` | Optional | Unique identifier of the organization. If no value is provided then group will be created in the organization associated with the login session. | -| `Groups` | [`List`](../../doc/models/group-name-and-id-input.md) | Optional | Array of objects of groups that the group belong to. | -| `Users` | [`List`](../../doc/models/user-name-and-id-input.md) | Optional | Array of names of user names that the group belong to. | -| `Type` | [`Models.Type10Enum?`](../../doc/models/type-10-enum.md) | Optional | Type of user group. LOCAL_GROUP indicates that the user is created locally in the ThoughtSpot system.
**Default**: `Type10Enum.LOCAL_GROUP` | - -## Example (as JSON) - -```json -{ - "name": "name0", - "displayName": "displayName2", - "visibility": null, - "description": null, - "privileges": null, - "orgId": null, - "groups": null, - "users": null, - "type": null -} -``` - diff --git a/DotNet/doc/models/tspublic-rest-v2-group-removegroup-request.md b/DotNet/doc/models/tspublic-rest-v2-group-removegroup-request.md deleted file mode 100644 index 451804c68..000000000 --- a/DotNet/doc/models/tspublic-rest-v2-group-removegroup-request.md +++ /dev/null @@ -1,38 +0,0 @@ - -# Tspublic Rest V2 Group Removegroup Request - -## Structure - -`TspublicRestV2GroupRemovegroupRequest` - -## Fields - -| Name | Type | Tags | Description | -| --- | --- | --- | --- | -| `Name` | `string` | Optional | Name of the group | -| `Id` | `string` | Optional | The GUID of the group to query. | -| `Groups` | [`List`](../../doc/models/group-name-and-id-input.md) | Required | Array of objects of groups that the user belong to. | - -## Example (as JSON) - -```json -{ - "name": null, - "id": null, - "groups": [ - { - "name": null, - "id": null - }, - { - "name": null, - "id": null - }, - { - "name": null, - "id": null - } - ] -} -``` - diff --git a/DotNet/doc/models/tspublic-rest-v2-group-removeprivilege-request.md b/DotNet/doc/models/tspublic-rest-v2-group-removeprivilege-request.md deleted file mode 100644 index 81160543a..000000000 --- a/DotNet/doc/models/tspublic-rest-v2-group-removeprivilege-request.md +++ /dev/null @@ -1,25 +0,0 @@ - -# Tspublic Rest V2 Group Removeprivilege Request - -## Structure - -`TspublicRestV2GroupRemoveprivilegeRequest` - -## Fields - -| Name | Type | Tags | Description | -| --- | --- | --- | --- | -| `Name` | `string` | Optional | Name of the group | -| `Id` | `string` | Optional | The GUID of the group to query. | -| `Privileges` | [`List`](../../doc/models/privilege-enum.md) | Optional | A JSON array of name of users or GUIDs of users or both. When both are given then id is considered | - -## Example (as JSON) - -```json -{ - "name": null, - "id": null, - "privileges": null -} -``` - diff --git a/DotNet/doc/models/tspublic-rest-v2-group-removeuser-request.md b/DotNet/doc/models/tspublic-rest-v2-group-removeuser-request.md deleted file mode 100644 index 9249faefe..000000000 --- a/DotNet/doc/models/tspublic-rest-v2-group-removeuser-request.md +++ /dev/null @@ -1,34 +0,0 @@ - -# Tspublic Rest V2 Group Removeuser Request - -## Structure - -`TspublicRestV2GroupRemoveuserRequest` - -## Fields - -| Name | Type | Tags | Description | -| --- | --- | --- | --- | -| `Name` | `string` | Optional | Name of the group | -| `Id` | `string` | Optional | The GUID of the group to query. | -| `Users` | [`List`](../../doc/models/user-name-and-id-input.md) | Required | Array of user name that you want to delete from user group. | - -## Example (as JSON) - -```json -{ - "name": null, - "id": null, - "users": [ - { - "name": null, - "id": null - }, - { - "name": null, - "id": null - } - ] -} -``` - diff --git a/DotNet/doc/models/tspublic-rest-v2-group-search-request.md b/DotNet/doc/models/tspublic-rest-v2-group-search-request.md deleted file mode 100644 index abea34226..000000000 --- a/DotNet/doc/models/tspublic-rest-v2-group-search-request.md +++ /dev/null @@ -1,39 +0,0 @@ - -# Tspublic Rest V2 Group Search Request - -## Structure - -`TspublicRestV2GroupSearchRequest` - -## Fields - -| Name | Type | Tags | Description | -| --- | --- | --- | --- | -| `OutputFields` | `List` | Optional | Array of field names that need to be included in the response | -| `Name` | `string` | Optional | Name of the user group | -| `Id` | `string` | Optional | GUID of the group to update | -| `DisplayName` | `string` | Optional | A unique display name string for the user group, for example, Developer group. | -| `Visibility` | `string` | Optional | Visibility of the user group. The visibility attribute is set to DEFAULT. The DEFAULT attribute makes the user group visible for other user groups and allows them to share objects. | -| `Description` | `string` | Optional | Description text for the group. | -| `Privileges` | [`List`](../../doc/models/privilege-enum.md) | Optional | A JSON array of privileges assigned to the group | -| `Groups` | [`List`](../../doc/models/group-name-and-id-input.md) | Optional | Array of objects of groups that the user belong to. | -| `Users` | [`List`](../../doc/models/user-name-and-id-input.md) | Optional | Array of user name that associated with group. | -| `Type` | `string` | Optional | Type of user group. LOCAL_GROUP indicates that the user is created locally in the ThoughtSpot system. | - -## Example (as JSON) - -```json -{ - "outputFields": null, - "name": null, - "id": null, - "displayName": null, - "visibility": null, - "description": null, - "privileges": null, - "groups": null, - "users": null, - "type": null -} -``` - diff --git a/DotNet/doc/models/tspublic-rest-v2-group-update-request.md b/DotNet/doc/models/tspublic-rest-v2-group-update-request.md deleted file mode 100644 index 5a836dc29..000000000 --- a/DotNet/doc/models/tspublic-rest-v2-group-update-request.md +++ /dev/null @@ -1,39 +0,0 @@ - -# Tspublic Rest V2 Group Update Request - -## Structure - -`TspublicRestV2GroupUpdateRequest` - -## Fields - -| Name | Type | Tags | Description | -| --- | --- | --- | --- | -| `Name` | `string` | Optional | Name of the user group. The group name string must be unique. | -| `Id` | `string` | Optional | he GUID of the user account to query. | -| `DisplayName` | `string` | Optional | A unique display name string for the user group, for example, Developer group. | -| `Visibility` | [`Models.Visibility2Enum?`](../../doc/models/visibility-2-enum.md) | Optional | Visibility of the user group. The visibility attribute is set to DEFAULT. The DEFAULT attribute makes the user group visible for other user groups and allows them to share objects.
**Default**: `Visibility2Enum.DEFAULT` | -| `Description` | `string` | Optional | Description text for the group. | -| `Privileges` | [`List`](../../doc/models/privilege-enum.md) | Optional | A JSON array of privileges assigned to the group | -| `Groups` | [`List`](../../doc/models/group-name-and-id-input.md) | Optional | Array of objects of groups that the user belong to. | -| `Users` | [`List`](../../doc/models/user-name-and-id-input.md) | Optional | Array of object, A JSON array of name of users of users. | -| `AssignedLiveboards` | `List` | Optional | Array of string. An array of liveboard ids to be assigned to the group. | -| `Type` | [`Models.Type10Enum?`](../../doc/models/type-10-enum.md) | Optional | Type of user group. LOCAL_GROUP indicates that the user is created locally in the ThoughtSpot system.
**Default**: `Type10Enum.LOCAL_GROUP` | - -## Example (as JSON) - -```json -{ - "name": null, - "id": null, - "displayName": null, - "visibility": null, - "description": null, - "privileges": null, - "groups": null, - "users": null, - "assignedLiveboards": null, - "type": null -} -``` - diff --git a/DotNet/doc/models/tspublic-rest-v2-materialization-refreshview-request.md b/DotNet/doc/models/tspublic-rest-v2-materialization-refreshview-request.md deleted file mode 100644 index 1612b5bfb..000000000 --- a/DotNet/doc/models/tspublic-rest-v2-materialization-refreshview-request.md +++ /dev/null @@ -1,21 +0,0 @@ - -# Tspublic Rest V2 Materialization Refreshview Request - -## Structure - -`TspublicRestV2MaterializationRefreshviewRequest` - -## Fields - -| Name | Type | Tags | Description | -| --- | --- | --- | --- | -| `Id` | `string` | Required | GUID of metadata object | - -## Example (as JSON) - -```json -{ - "id": "id0" -} -``` - diff --git a/DotNet/doc/models/tspublic-rest-v2-metadata-dependency-request.md b/DotNet/doc/models/tspublic-rest-v2-metadata-dependency-request.md deleted file mode 100644 index 99d7874c1..000000000 --- a/DotNet/doc/models/tspublic-rest-v2-metadata-dependency-request.md +++ /dev/null @@ -1,27 +0,0 @@ - -# Tspublic Rest V2 Metadata Dependency Request - -## Structure - -`TspublicRestV2MetadataDependencyRequest` - -## Fields - -| Name | Type | Tags | Description | -| --- | --- | --- | --- | -| `Type` | [`Models.Type13Enum`](../../doc/models/type-13-enum.md) | Required | Type of the data object | -| `Id` | `List` | Required | A JSON array of GUIDs of the objects | -| `BatchSize` | `int?` | Optional | The maximum number of batches to fetch in a query. If this attribute is not defined, the value specified in the cluster configuration is used. To get the list of all dependent objects in a single query, define the batch size attribute as -1
**Default**: `-1` | - -## Example (as JSON) - -```json -{ - "type": "COLUMN", - "id": [ - "id0" - ], - "batchSize": null -} -``` - diff --git a/DotNet/doc/models/tspublic-rest-v2-metadata-detail-search-request.md b/DotNet/doc/models/tspublic-rest-v2-metadata-detail-search-request.md deleted file mode 100644 index 683847544..000000000 --- a/DotNet/doc/models/tspublic-rest-v2-metadata-detail-search-request.md +++ /dev/null @@ -1,31 +0,0 @@ - -# Tspublic Rest V2 Metadata Detail Search Request - -## Structure - -`TspublicRestV2MetadataDetailSearchRequest` - -## Fields - -| Name | Type | Tags | Description | -| --- | --- | --- | --- | -| `Type` | [`Models.Type6Enum`](../../doc/models/type-6-enum.md) | Required | Type of the metadata object being searched. | -| `Id` | `List` | Required | A JSON array of GUIDs of the objects. | -| `ShowHidden` | `bool?` | Optional | When set to true, returns details of the hidden objects, such as a column in a worksheet or a table.
**Default**: `false` | -| `DropQuestionDetails` | `bool?` | Optional | When set to true, the search assist data associated with a worksheet is not included in the API response. This attribute is applicable only for DATAOBJECT data type.
**Default**: `false` | -| `Version` | `string` | Optional | Specify the version to retrieve the objects from. By default, the API returns metadata for all versions of the object. | - -## Example (as JSON) - -```json -{ - "type": "DATAOBJECT", - "id": [ - "id0" - ], - "showHidden": null, - "dropQuestionDetails": null, - "version": null -} -``` - diff --git a/DotNet/doc/models/tspublic-rest-v2-metadata-favorite-assign-request.md b/DotNet/doc/models/tspublic-rest-v2-metadata-favorite-assign-request.md deleted file mode 100644 index 3e5dfa071..000000000 --- a/DotNet/doc/models/tspublic-rest-v2-metadata-favorite-assign-request.md +++ /dev/null @@ -1,34 +0,0 @@ - -# Tspublic Rest V2 Metadata Favorite Assign Request - -## Structure - -`TspublicRestV2MetadataFavoriteAssignRequest` - -## Fields - -| Name | Type | Tags | Description | -| --- | --- | --- | --- | -| `UserName` | `string` | Optional | Name of the user | -| `UserId` | `string` | Optional | The GUID of the user | -| `TsObject` | [`List`](../../doc/models/ts-object-input.md) | Required | A JSON Array of GUIDs and type of metadata object. | - -## Example (as JSON) - -```json -{ - "userName": null, - "userId": null, - "tsObject": [ - { - "id": "id2", - "type": "DATAOBJECT" - }, - { - "id": "id3", - "type": "CONNECTION" - } - ] -} -``` - diff --git a/DotNet/doc/models/tspublic-rest-v2-metadata-favorite-unassign-request.md b/DotNet/doc/models/tspublic-rest-v2-metadata-favorite-unassign-request.md deleted file mode 100644 index 94d4bcf7d..000000000 --- a/DotNet/doc/models/tspublic-rest-v2-metadata-favorite-unassign-request.md +++ /dev/null @@ -1,34 +0,0 @@ - -# Tspublic Rest V2 Metadata Favorite Unassign Request - -## Structure - -`TspublicRestV2MetadataFavoriteUnassignRequest` - -## Fields - -| Name | Type | Tags | Description | -| --- | --- | --- | --- | -| `UserName` | `string` | Optional | Name of the user | -| `UserId` | `string` | Optional | The GUID of the user | -| `TsObject` | [`List`](../../doc/models/ts-object-input.md) | Required | A JSON Array of GUIDs and type of metadata object. | - -## Example (as JSON) - -```json -{ - "userName": null, - "userId": null, - "tsObject": [ - { - "id": "id2", - "type": "DATAOBJECT" - }, - { - "id": "id3", - "type": "CONNECTION" - } - ] -} -``` - diff --git a/DotNet/doc/models/tspublic-rest-v2-metadata-header-search-request.md b/DotNet/doc/models/tspublic-rest-v2-metadata-header-search-request.md deleted file mode 100644 index f05f92fce..000000000 --- a/DotNet/doc/models/tspublic-rest-v2-metadata-header-search-request.md +++ /dev/null @@ -1,53 +0,0 @@ - -# Tspublic Rest V2 Metadata Header Search Request - -## Structure - -`TspublicRestV2MetadataHeaderSearchRequest` - -## Fields - -| Name | Type | Tags | Description | -| --- | --- | --- | --- | -| `OutputFields` | `List` | Optional | Array of header field names that need to be included in the header response | -| `Offset` | `int?` | Optional | The batch offset, starting from where the records should be included in the response. If no input is provided then offset starts from 0. Default: 0
**Default**: `0` | -| `BatchNumber` | `int?` | Optional | An alternate way to set offset for the starting point of the response.

The value in offset field will not be considered if batchNumber field has value greater than 0.

Offset value will be calculated as (batchNumber - 1) * batchSize.

It is mandatory to provide a value for batchSize with batchNumber.

Example:

Assume response has 100 records. Now, batchNumber is set as 2 and batchSize as 10, then offset value will be 10. So, 10 records starting from 11th record will be considered. | -| `BatchSize` | `int?` | Optional | The number of records that should be included in the response starting from offset position. If no input is provided then first page is included in the response.
**Default**: `-1` | -| `SortBy` | [`Models.SortByEnum?`](../../doc/models/sort-by-enum.md) | Optional | Field based on which the response needs to be ordered.
**Default**: `SortByEnum.DEFAULT` | -| `SortOrder` | [`Models.SortOrderEnum?`](../../doc/models/sort-order-enum.md) | Optional | Order in which sortBy should be applied.
**Default**: `SortOrderEnum.DEFAULT` | -| `Type` | [`Models.Type3Enum`](../../doc/models/type-3-enum.md) | Required | Type of the metadata object being searched. | -| `NamePattern` | `string` | Optional | A pattern to match the name of the metadata object. This parameter supports matching case-insensitive strings. For a wildcard match, use %. | -| `FetchId` | `List` | Optional | A JSON array containing the GUIDs of the metadata objects that you want to fetch. | -| `SkipId` | `List` | Optional | A JSON array containing the GUIDs of the metadata objects that you want to skip. | -| `ShowHidden` | `bool?` | Optional | When set to true, returns details of the hidden objects, such as a column in a worksheet or a table.
**Default**: `false` | -| `AutoCreated` | `bool?` | Optional | A flag to indicate whether to list only the auto created objects. When no value is provided as input then all objects are returned. | -| `AccessLevel` | [`List`](../../doc/models/access-level-input.md) | Optional | A JSON array of objects with user details for which the metadata objects should be considered from the repository
If you specify ID or name of user and set the type parameter to USER, the API returns metadata objects associated with the user
If you specify ID or name of user group and set the type parameter to USER_GROUP, the API returns metadata objects for all the users mapped to the specified user group.
If the id or name parameter is not defined, but the type attribute is set to USER or USER_GROUP, then the API will not return and response.
If no input is provided for any field for this object, then the API returns headers for all users.
If both name and id is provided, then id will be considered. | -| `Tag` | [`List`](../../doc/models/tag-name-and-id-input.md) | Optional | A JSON array of name or GUID of tags or both. When both are given then id is considered. | -| `FavoriteFor` | [`List`](../../doc/models/name-and-id-input.md) | Optional | A JSON array of name or GUID of the user or both for whom the object is assigned as favorite. When both are given then id is considered. | -| `Author` | [`List`](../../doc/models/name-and-id-input.md) | Optional | A JSON array of name or GUID of the user or both who created the object. When both are given then id is considered | -| `LastModifiedBy` | [`List`](../../doc/models/name-and-id-input.md) | Optional | A JSON array of name or GUID of the user or both who last modified the object. When both are given then id is considered. | - -## Example (as JSON) - -```json -{ - "outputFields": null, - "offset": null, - "batchNumber": null, - "batchSize": null, - "sortBy": null, - "sortOrder": null, - "type": "COLUMN_ALL", - "namePattern": null, - "fetchId": null, - "skipId": null, - "showHidden": null, - "autoCreated": null, - "accessLevel": null, - "tag": null, - "favoriteFor": null, - "author": null, - "lastModifiedBy": null -} -``` - diff --git a/DotNet/doc/models/tspublic-rest-v2-metadata-homeliveboard-assign-request.md b/DotNet/doc/models/tspublic-rest-v2-metadata-homeliveboard-assign-request.md deleted file mode 100644 index 54d2f9ead..000000000 --- a/DotNet/doc/models/tspublic-rest-v2-metadata-homeliveboard-assign-request.md +++ /dev/null @@ -1,25 +0,0 @@ - -# Tspublic Rest V2 Metadata Homeliveboard Assign Request - -## Structure - -`TspublicRestV2MetadataHomeliveboardAssignRequest` - -## Fields - -| Name | Type | Tags | Description | -| --- | --- | --- | --- | -| `UserName` | `string` | Optional | Name of the user | -| `UserId` | `string` | Optional | The GUID of the user | -| `LiveboardId` | `string` | Optional | The GUID of the liveboard | - -## Example (as JSON) - -```json -{ - "userName": null, - "userId": null, - "liveboardId": null -} -``` - diff --git a/DotNet/doc/models/tspublic-rest-v2-metadata-homeliveboard-unassign-request.md b/DotNet/doc/models/tspublic-rest-v2-metadata-homeliveboard-unassign-request.md deleted file mode 100644 index fe4f8543f..000000000 --- a/DotNet/doc/models/tspublic-rest-v2-metadata-homeliveboard-unassign-request.md +++ /dev/null @@ -1,23 +0,0 @@ - -# Tspublic Rest V2 Metadata Homeliveboard Unassign Request - -## Structure - -`TspublicRestV2MetadataHomeliveboardUnassignRequest` - -## Fields - -| Name | Type | Tags | Description | -| --- | --- | --- | --- | -| `UserName` | `string` | Optional | Name of the user | -| `UserId` | `string` | Optional | The GUID of the user | - -## Example (as JSON) - -```json -{ - "userName": null, - "userId": null -} -``` - diff --git a/DotNet/doc/models/tspublic-rest-v2-metadata-tag-assign-request.md b/DotNet/doc/models/tspublic-rest-v2-metadata-tag-assign-request.md deleted file mode 100644 index 0c59a9389..000000000 --- a/DotNet/doc/models/tspublic-rest-v2-metadata-tag-assign-request.md +++ /dev/null @@ -1,34 +0,0 @@ - -# Tspublic Rest V2 Metadata Tag Assign Request - -## Structure - -`TspublicRestV2MetadataTagAssignRequest` - -## Fields - -| Name | Type | Tags | Description | -| --- | --- | --- | --- | -| `Name` | `string` | Optional | Name of the tag | -| `Id` | `string` | Optional | The GUID of the tag | -| `TsObject` | [`List`](../../doc/models/ts-object-input.md) | Required | A JSON Array of GUIDs and type of metadata object. | - -## Example (as JSON) - -```json -{ - "name": null, - "id": null, - "tsObject": [ - { - "id": "id2", - "type": "DATAOBJECT" - }, - { - "id": "id3", - "type": "CONNECTION" - } - ] -} -``` - diff --git a/DotNet/doc/models/tspublic-rest-v2-metadata-tag-create-request.md b/DotNet/doc/models/tspublic-rest-v2-metadata-tag-create-request.md deleted file mode 100644 index 63bcb7e6b..000000000 --- a/DotNet/doc/models/tspublic-rest-v2-metadata-tag-create-request.md +++ /dev/null @@ -1,23 +0,0 @@ - -# Tspublic Rest V2 Metadata Tag Create Request - -## Structure - -`TspublicRestV2MetadataTagCreateRequest` - -## Fields - -| Name | Type | Tags | Description | -| --- | --- | --- | --- | -| `Name` | `string` | Required | Name of the tag | -| `Color` | `string` | Optional | Hex color code to be assigned to the tag | - -## Example (as JSON) - -```json -{ - "name": "name0", - "color": null -} -``` - diff --git a/DotNet/doc/models/tspublic-rest-v2-metadata-tag-unassign-request.md b/DotNet/doc/models/tspublic-rest-v2-metadata-tag-unassign-request.md deleted file mode 100644 index 83beef040..000000000 --- a/DotNet/doc/models/tspublic-rest-v2-metadata-tag-unassign-request.md +++ /dev/null @@ -1,34 +0,0 @@ - -# Tspublic Rest V2 Metadata Tag Unassign Request - -## Structure - -`TspublicRestV2MetadataTagUnassignRequest` - -## Fields - -| Name | Type | Tags | Description | -| --- | --- | --- | --- | -| `Name` | `string` | Optional | Name of the tag | -| `Id` | `string` | Optional | The GUID of the tag | -| `TsObject` | [`List`](../../doc/models/ts-object-input.md) | Required | A JSON Array of GUIDs and type of metadata object. | - -## Example (as JSON) - -```json -{ - "name": null, - "id": null, - "tsObject": [ - { - "id": "id2", - "type": "DATAOBJECT" - }, - { - "id": "id3", - "type": "CONNECTION" - } - ] -} -``` - diff --git a/DotNet/doc/models/tspublic-rest-v2-metadata-tag-update-request.md b/DotNet/doc/models/tspublic-rest-v2-metadata-tag-update-request.md deleted file mode 100644 index 83102f511..000000000 --- a/DotNet/doc/models/tspublic-rest-v2-metadata-tag-update-request.md +++ /dev/null @@ -1,25 +0,0 @@ - -# Tspublic Rest V2 Metadata Tag Update Request - -## Structure - -`TspublicRestV2MetadataTagUpdateRequest` - -## Fields - -| Name | Type | Tags | Description | -| --- | --- | --- | --- | -| `Name` | `string` | Optional | Name of the tag | -| `Id` | `string` | Optional | The GUID of the tag | -| `Color` | `string` | Optional | Hex color code to be assigned to the tag | - -## Example (as JSON) - -```json -{ - "name": null, - "id": null, - "color": null -} -``` - diff --git a/DotNet/doc/models/tspublic-rest-v2-metadata-tml-export-request.md b/DotNet/doc/models/tspublic-rest-v2-metadata-tml-export-request.md deleted file mode 100644 index 73907ab2c..000000000 --- a/DotNet/doc/models/tspublic-rest-v2-metadata-tml-export-request.md +++ /dev/null @@ -1,27 +0,0 @@ - -# Tspublic Rest V2 Metadata Tml Export Request - -## Structure - -`TspublicRestV2MetadataTmlExportRequest` - -## Fields - -| Name | Type | Tags | Description | -| --- | --- | --- | --- | -| `Id` | `List` | Required | A JSON array of GUIDs of the objects. | -| `FormatType` | [`Models.FormatType3Enum?`](../../doc/models/format-type-3-enum.md) | Optional | The format in which to export the objects
**Default**: `FormatType3Enum.YAML` | -| `ExportAssociated` | `bool?` | Optional | Specifies if you would like to export the associated objects. To export the objects associated with the objects specified in id, set the value to true. When set to true, the API exports any underlying worksheets, tables, or views for a given object. By default, the API does not export these underlying objects
**Default**: `false` | - -## Example (as JSON) - -```json -{ - "id": [ - "id0" - ], - "formatType": null, - "exportAssociated": null -} -``` - diff --git a/DotNet/doc/models/tspublic-rest-v2-metadata-tml-import-request.md b/DotNet/doc/models/tspublic-rest-v2-metadata-tml-import-request.md deleted file mode 100644 index 8f1482ec3..000000000 --- a/DotNet/doc/models/tspublic-rest-v2-metadata-tml-import-request.md +++ /dev/null @@ -1,27 +0,0 @@ - -# Tspublic Rest V2 Metadata Tml Import Request - -## Structure - -`TspublicRestV2MetadataTmlImportRequest` - -## Fields - -| Name | Type | Tags | Description | -| --- | --- | --- | --- | -| `ObjectTML` | `List` | Required | A string array of TML objects to upload, in YAML or JSON format.

If TML is in YAML format, then use escape characters for quotes and new line characters.

Example TML:

guid: 6d2c1c9b-a407-409c-8c0c-819aeb51350f\ntable:\n name: TESTINT\n db: SUPPLYCHAIN_MAIN\n schema: PUBLIC\n db_table: TESTINT\n connection:\n name: SnowflakeConnection\n columns:\n - name: C1\n db_column_name: C1\n properties:\n column_type: MEASURE\n aggregation: SUM\n index_type: DONT_INDEX\n db_column_properties:\n data_type: INT64\n

If TML is in JSON format, then use escape characters for quotes.

Example TML:

{\\"guid\\": \\"6d2c1c9b-a407-409c-8c0c-819aeb51350f\\", \\"table\\": { \\"name\\": \\"TESTINT\\", \\"db\\": \\"SUPPLYCHAIN_MAIN\\", \\"schema\\": \\"PUBLIC\\", \\"db_table\\": \\"TESTINT\\", \\"connection\\": { \\"name\\": \\"SnowflakeConnection\\" }, \\"columns\\": [ { \\"name\\": \\"C1\\", \\"db_column_name\\": \\"C1\\", \\"properties\\": { \\"column_type\\": \\"MEASURE\\", \\"aggregation\\": \\"SUM\\", \\"index_type\\": \\"DONT_INDEX\\" }, \\"db_column_properties\\": { \\"data_type\\": \\"INT64\\" } } ] } }', | -| `ImportPolicy` | [`Models.ImportPolicyEnum?`](../../doc/models/import-policy-enum.md) | Optional | Policy to follow during import
**Default**: `ImportPolicyEnum.PARTIAL` | -| `ForceCreate` | `bool?` | Optional | Specifies if you are updating or creating objects. To create new objects, specify true. By default, ThoughtSpot updates existing objects that have the same GUID as the objects you are importing. When set to true, the GUID property in the imported TML is replaced on the server, and the response headers will include the id_guid property with the GUID of the new object. The new object will be assigned a new GUID, even if the imported TML file included a guid value. Thus, there is no need to include the guid in the TML file if you are using forceCreate=true.
**Default**: `false` | - -## Example (as JSON) - -```json -{ - "objectTML": [ - "objectTML7" - ], - "importPolicy": null, - "forceCreate": null -} -``` - diff --git a/DotNet/doc/models/tspublic-rest-v2-org-create-request.md b/DotNet/doc/models/tspublic-rest-v2-org-create-request.md deleted file mode 100644 index 359479dd0..000000000 --- a/DotNet/doc/models/tspublic-rest-v2-org-create-request.md +++ /dev/null @@ -1,23 +0,0 @@ - -# Tspublic Rest V2 Org Create Request - -## Structure - -`TspublicRestV2OrgCreateRequest` - -## Fields - -| Name | Type | Tags | Description | -| --- | --- | --- | --- | -| `Name` | `string` | Required | Name of the organization. | -| `Description` | `string` | Optional | Description text for the organization. | - -## Example (as JSON) - -```json -{ - "name": "name0", - "description": null -} -``` - diff --git a/DotNet/doc/models/tspublic-rest-v2-org-search-request.md b/DotNet/doc/models/tspublic-rest-v2-org-search-request.md deleted file mode 100644 index e7678e6b6..000000000 --- a/DotNet/doc/models/tspublic-rest-v2-org-search-request.md +++ /dev/null @@ -1,25 +0,0 @@ - -# Tspublic Rest V2 Org Search Request - -## Structure - -`TspublicRestV2OrgSearchRequest` - -## Fields - -| Name | Type | Tags | Description | -| --- | --- | --- | --- | -| `Name` | `string` | Optional | Name of the organization. | -| `Id` | `int?` | Optional | The ID of the organization. | -| `ShowDeleted` | `bool?` | Optional | When set to true, the response will include the details of deleted organization also.
**Default**: `false` | - -## Example (as JSON) - -```json -{ - "name": null, - "id": null, - "showDeleted": null -} -``` - diff --git a/DotNet/doc/models/tspublic-rest-v2-org-update-request.md b/DotNet/doc/models/tspublic-rest-v2-org-update-request.md deleted file mode 100644 index 4eba3ea92..000000000 --- a/DotNet/doc/models/tspublic-rest-v2-org-update-request.md +++ /dev/null @@ -1,27 +0,0 @@ - -# Tspublic Rest V2 Org Update Request - -## Structure - -`TspublicRestV2OrgUpdateRequest` - -## Fields - -| Name | Type | Tags | Description | -| --- | --- | --- | --- | -| `Name` | `string` | Optional | Name of the organization. | -| `Id` | `int?` | Optional | The ID of the organization. | -| `Description` | `string` | Optional | Description text for the organization. | -| `Active` | `bool?` | Optional | Status of the organization. | - -## Example (as JSON) - -```json -{ - "name": null, - "id": null, - "description": null, - "active": null -} -``` - diff --git a/DotNet/doc/models/tspublic-rest-v2-security-permission-principal-search-request.md b/DotNet/doc/models/tspublic-rest-v2-security-permission-principal-search-request.md deleted file mode 100644 index 5ff09d634..000000000 --- a/DotNet/doc/models/tspublic-rest-v2-security-permission-principal-search-request.md +++ /dev/null @@ -1,32 +0,0 @@ - -# Tspublic Rest V2 Security Permission Principal Search Request - -## Structure - -`TspublicRestV2SecurityPermissionPrincipalSearchRequest` - -## Fields - -| Name | Type | Tags | Description | -| --- | --- | --- | --- | -| `Principal` | [`List`](../../doc/models/user-name-and-id-input.md) | Required | A JSON array of principal names or GUIDs to be included in the request. When both are given then id is considered. | -| `TsObject` | [`List`](../../doc/models/ts-object-search-input.md) | Optional | A JSON Array of GUIDs and type of metadata object. | - -## Example (as JSON) - -```json -{ - "principal": [ - { - "name": null, - "id": null - }, - { - "name": null, - "id": null - } - ], - "tsObject": null -} -``` - diff --git a/DotNet/doc/models/tspublic-rest-v2-security-permission-tsobject-search-request.md b/DotNet/doc/models/tspublic-rest-v2-security-permission-tsobject-search-request.md deleted file mode 100644 index 34ab6c9fc..000000000 --- a/DotNet/doc/models/tspublic-rest-v2-security-permission-tsobject-search-request.md +++ /dev/null @@ -1,39 +0,0 @@ - -# Tspublic Rest V2 Security Permission Tsobject Search Request - -## Structure - -`TspublicRestV2SecurityPermissionTsobjectSearchRequest` - -## Fields - -| Name | Type | Tags | Description | -| --- | --- | --- | --- | -| `TsObject` | [`List`](../../doc/models/ts-object-search-input.md) | Required | A JSON Array of GUIDs and type of metadata object. | -| `Principal` | [`List`](../../doc/models/user-name-and-id-input.md) | Optional | A JSON array of principal names or GUIDs. When both are given then id is considered. | -| `IncludeDependent` | `bool?` | Optional | When this field is set to true, the API response includes the permission details for the dependent objects.
**Default**: `false` | - -## Example (as JSON) - -```json -{ - "tsObject": [ - { - "type": "DATAOBJECT", - "id": [ - "id2" - ] - }, - { - "type": "COLUMN", - "id": [ - "id3", - "id4" - ] - } - ], - "principal": null, - "includeDependent": null -} -``` - diff --git a/DotNet/doc/models/tspublic-rest-v2-security-share-tsobject-request.md b/DotNet/doc/models/tspublic-rest-v2-security-share-tsobject-request.md deleted file mode 100644 index fdf86d158..000000000 --- a/DotNet/doc/models/tspublic-rest-v2-security-share-tsobject-request.md +++ /dev/null @@ -1,35 +0,0 @@ - -# Tspublic Rest V2 Security Share Tsobject Request - -## Structure - -`TspublicRestV2SecurityShareTsobjectRequest` - -## Fields - -| Name | Type | Tags | Description | -| --- | --- | --- | --- | -| `Type` | [`Models.Type18Enum`](../../doc/models/type-18-enum.md) | Required | Type of metadata object. Valid values: Liveboard\|Answer\|DataObject\|Column | -| `Id` | `List` | Required | A JSON array of the GUIDs of the objects to be shared | -| `Permission` | `string` | Required | A JSON object with GUIDs of user and user group, and the type of access privilge.

You can provide READ_ONLY or MODIFY access to the objects. With READ_ONLY access, the user or user group can view the shared object, whereas MODIFY access enables users to modify the object.

To remove access to a shared object, you can set the shareMode in the permission string to NO_ACCESS. Example:

{"permissions": {"e7040a64-7ff1-4ab9-a1b0-f1acac596866": {"shareMode": "READ_ONLY"}, "f7b8f511-317c-485d-8131-26cf084ef47b": {"shareMode": "MODIFY"}, "7a9a6715-e154-431b-baaf-7b58246c13dd":{"shareMode":"NO_ACCESS"}}} | -| `EmailId` | `List` | Optional | The email addresses that should ne notified when the objects are shared. | -| `Notify` | `bool?` | Optional | When set to true, a notification is sent to the users after an object is shared.
**Default**: `true` | -| `Message` | `string` | Optional | The message text to send in the notification email. | -| `IncludeCustomEmbedUrl` | `bool?` | Optional | When set to true, ThoughtSpot sends a link with the host application context to allow users to access the shared object from their ThoughtSpot embedded instance.
**Default**: `false` | - -## Example (as JSON) - -```json -{ - "type": "DATAOBJECT", - "id": [ - "id0" - ], - "permission": "permission2", - "emailId": null, - "notify": null, - "message": null, - "includeCustomEmbedUrl": null -} -``` - diff --git a/DotNet/doc/models/tspublic-rest-v2-security-share-visualization-request.md b/DotNet/doc/models/tspublic-rest-v2-security-share-visualization-request.md deleted file mode 100644 index d6933ff60..000000000 --- a/DotNet/doc/models/tspublic-rest-v2-security-share-visualization-request.md +++ /dev/null @@ -1,37 +0,0 @@ - -# Tspublic Rest V2 Security Share Visualization Request - -## Structure - -`TspublicRestV2SecurityShareVisualizationRequest` - -## Fields - -| Name | Type | Tags | Description | -| --- | --- | --- | --- | -| `Id` | `string` | Required | A JSON array of the GUIDs of the objects to be shared | -| `VizId` | `string` | Required | The GUID of visualization | -| `PrincipalId` | `List` | Required | The GUID of the users and user groups with which you want to share the visualization | -| `EmailId` | `List` | Optional | The email addresses that should ne notified when the objects are shared | -| `Notify` | `bool?` | Optional | When set to true, a notification is sent to the users after an object is shared.
**Default**: `true` | -| `Message` | `string` | Optional | The message text to send in the notification email. | -| `IncludeCustomEmbedUrl` | `bool?` | Optional | When set to true, ThoughtSpot sends a link with the host application context to allow users to access the shared object from their ThoughtSpot embedded instance.
**Default**: `false` | - -## Example (as JSON) - -```json -{ - "id": "id0", - "vizId": "vizId2", - "principalId": [ - "principalId8", - "principalId9", - "principalId0" - ], - "emailId": null, - "notify": null, - "message": null, - "includeCustomEmbedUrl": null -} -``` - diff --git a/DotNet/doc/models/tspublic-rest-v2-user-addgroup-request.md b/DotNet/doc/models/tspublic-rest-v2-user-addgroup-request.md deleted file mode 100644 index 36fa45123..000000000 --- a/DotNet/doc/models/tspublic-rest-v2-user-addgroup-request.md +++ /dev/null @@ -1,38 +0,0 @@ - -# Tspublic Rest V2 User Addgroup Request - -## Structure - -`TspublicRestV2UserAddgroupRequest` - -## Fields - -| Name | Type | Tags | Description | -| --- | --- | --- | --- | -| `Name` | `string` | Optional | User name of the user account | -| `Id` | `string` | Optional | The GUID of the user account | -| `Groups` | [`List`](../../doc/models/group-name-and-id-input.md) | Required | Array of objects of groups that the user belong to. | - -## Example (as JSON) - -```json -{ - "name": null, - "id": null, - "groups": [ - { - "name": null, - "id": null - }, - { - "name": null, - "id": null - }, - { - "name": null, - "id": null - } - ] -} -``` - diff --git a/DotNet/doc/models/tspublic-rest-v2-user-addorg-request.md b/DotNet/doc/models/tspublic-rest-v2-user-addorg-request.md deleted file mode 100644 index 9393a4cd5..000000000 --- a/DotNet/doc/models/tspublic-rest-v2-user-addorg-request.md +++ /dev/null @@ -1,32 +0,0 @@ - -# Tspublic Rest V2 User Addorg Request - -## Structure - -`TspublicRestV2UserAddorgRequest` - -## Fields - -| Name | Type | Tags | Description | -| --- | --- | --- | --- | -| `OrgId` | `int?` | Optional | The ID of the organization. | -| `Users` | [`List`](../../doc/models/user-name-and-id-input.md) | Required | Array of objects. A JSON array of name of users or GUIDs of users or both. When both are given then id is considered | - -## Example (as JSON) - -```json -{ - "orgId": null, - "users": [ - { - "name": null, - "id": null - }, - { - "name": null, - "id": null - } - ] -} -``` - diff --git a/DotNet/doc/models/tspublic-rest-v2-user-changepassword-request.md b/DotNet/doc/models/tspublic-rest-v2-user-changepassword-request.md deleted file mode 100644 index edfb2f32f..000000000 --- a/DotNet/doc/models/tspublic-rest-v2-user-changepassword-request.md +++ /dev/null @@ -1,27 +0,0 @@ - -# Tspublic Rest V2 User Changepassword Request - -## Structure - -`TspublicRestV2UserChangepasswordRequest` - -## Fields - -| Name | Type | Tags | Description | -| --- | --- | --- | --- | -| `Name` | `string` | Optional | User name of the user account. | -| `Id` | `string` | Optional | The GUID of the user account to query. | -| `CurrentPassword` | `string` | Required | The current password of the user. | -| `NewPassword` | `string` | Required | A new password for the user. | - -## Example (as JSON) - -```json -{ - "name": null, - "id": null, - "currentPassword": "currentPassword6", - "newPassword": "newPassword6" -} -``` - diff --git a/DotNet/doc/models/tspublic-rest-v2-user-removegroup-request.md b/DotNet/doc/models/tspublic-rest-v2-user-removegroup-request.md deleted file mode 100644 index ec7449467..000000000 --- a/DotNet/doc/models/tspublic-rest-v2-user-removegroup-request.md +++ /dev/null @@ -1,38 +0,0 @@ - -# Tspublic Rest V2 User Removegroup Request - -## Structure - -`TspublicRestV2UserRemovegroupRequest` - -## Fields - -| Name | Type | Tags | Description | -| --- | --- | --- | --- | -| `Name` | `string` | Optional | User name of the user account | -| `Id` | `string` | Optional | The GUID of the user account | -| `Groups` | [`List`](../../doc/models/group-name-and-id-input.md) | Required | Array of objects of groups that the user belong to. | - -## Example (as JSON) - -```json -{ - "name": null, - "id": null, - "groups": [ - { - "name": null, - "id": null - }, - { - "name": null, - "id": null - }, - { - "name": null, - "id": null - } - ] -} -``` - diff --git a/DotNet/doc/models/tspublic-rest-v2-user-search-request.md b/DotNet/doc/models/tspublic-rest-v2-user-search-request.md deleted file mode 100644 index 834e9f054..000000000 --- a/DotNet/doc/models/tspublic-rest-v2-user-search-request.md +++ /dev/null @@ -1,45 +0,0 @@ - -# Tspublic Rest V2 User Search Request - -## Structure - -`TspublicRestV2UserSearchRequest` - -## Fields - -| Name | Type | Tags | Description | -| --- | --- | --- | --- | -| `OutputFields` | `List` | Optional | Array of field names that need to be included in the response | -| `Name` | `string` | Optional | User name of the user account | -| `Id` | `string` | Optional | The GUID of the user account | -| `DisplayName` | `string` | Optional | A unique display name string for the user, usually their first and last name. | -| `Visibility` | `string` | Optional | Visibility of the user account. The visibility attribute is set to DEFAULT when creating a user. The DEFAULT attribute makes a user visible to other users and user groups, and thus allows them to share objects. | -| `Mail` | `string` | Optional | email of the user. | -| `Groups` | [`List`](../../doc/models/group-name-and-id-input.md) | Optional | Array of objects of groups that the user belong to. | -| `Privileges` | [`List`](../../doc/models/privilege-enum.md) | Optional | Privileges assigned to user account | -| `State` | `string` | Optional | Status of user account. acitve or inactive. | -| `NotifyOnShare` | `bool?` | Optional | User preference for receiving email notifications when another ThoughtSpot user shares answers or pinboards. | -| `ShowWalkMe` | `bool?` | Optional | The user preference for revisiting the onboarding experience. | -| `AnalystOnboardingComplete` | `bool?` | Optional | ThoughtSpot provides an interactive guided walkthrough to onboard new users. The onboarding experience leads users through a set of actions to help users get started and accomplish their tasks quickly. The users can turn off the Onboarding experience and access it again when they need assistance with the ThoughtSpot UI. | -| `Type` | `string` | Optional | Type of user. LOCAL_USER indicates that the user is created locally in the ThoughtSpot system. | - -## Example (as JSON) - -```json -{ - "outputFields": null, - "name": null, - "id": null, - "displayName": null, - "visibility": null, - "mail": null, - "groups": null, - "privileges": null, - "state": null, - "notifyOnShare": null, - "showWalkMe": null, - "analystOnboardingComplete": null, - "type": null -} -``` - diff --git a/DotNet/doc/models/tspublic-rest-v2-user-update-request.md b/DotNet/doc/models/tspublic-rest-v2-user-update-request.md deleted file mode 100644 index 3fa15217d..000000000 --- a/DotNet/doc/models/tspublic-rest-v2-user-update-request.md +++ /dev/null @@ -1,41 +0,0 @@ - -# Tspublic Rest V2 User Update Request - -## Structure - -`TspublicRestV2UserUpdateRequest` - -## Fields - -| Name | Type | Tags | Description | -| --- | --- | --- | --- | -| `Name` | `string` | Optional | Name of the user. The username string must be unique. | -| `Id` | `string` | Optional | The GUID of the user account to query | -| `DisplayName` | `string` | Optional | A unique display name string for the user, usually their first and last name. | -| `Visibility` | [`Models.Visibility1Enum?`](../../doc/models/visibility-1-enum.md) | Optional | Visibility of the user account. The visibility attribute is set to DEFAULT when creating a user. The DEFAULT attribute makes a user visible to other users and user groups, and thus allows them to share objects.
**Default**: `Visibility1Enum.DEFAULT` | -| `Mail` | `string` | Optional | email of the user. | -| `State` | [`Models.State1Enum?`](../../doc/models/state-1-enum.md) | Optional | Status of user account. acitve or inactive.
**Default**: `State1Enum.ACTIVE` | -| `NotifyOnShare` | `bool?` | Optional | User preference for receiving email notifications when another ThoughtSpot user shares answers or pinboards.
**Default**: `true` | -| `ShowWalkMe` | `bool?` | Optional | The user preference for revisiting the onboarding experience.
**Default**: `true` | -| `AnalystOnboardingComplete` | `bool?` | Optional | ThoughtSpot provides an interactive guided walkthrough to onboard new users. The onboarding experience leads users through a set of actions to help users get started and accomplish their tasks quickly. The users can turn off the Onboarding experience and access it again when they need assistance with the ThoughtSpot UI.
**Default**: `false` | -| `Type` | [`Models.Type9Enum?`](../../doc/models/type-9-enum.md) | Optional | Type of user. LOCAL_USER indicates that the user is created locally in the ThoughtSpot system.
**Default**: `Type9Enum.LOCAL_USER` | -| `Groups` | [`List`](../../doc/models/group-name-and-id-input.md) | Optional | Array of objects of groups that the user belong to. | - -## Example (as JSON) - -```json -{ - "name": null, - "id": null, - "displayName": null, - "visibility": null, - "mail": null, - "state": null, - "notifyOnShare": null, - "showWalkMe": null, - "analystOnboardingComplete": null, - "type": null, - "groups": null -} -``` - diff --git a/DotNet/doc/models/type-1-enum.md b/DotNet/doc/models/type-1-enum.md deleted file mode 100644 index 36d78715a..000000000 --- a/DotNet/doc/models/type-1-enum.md +++ /dev/null @@ -1,16 +0,0 @@ - -# Type 1 Enum - -Type of access detail provided - -## Enumeration - -`Type1Enum` - -## Fields - -| Name | -| --- | -| `USER` | -| `USERGROUP` | - diff --git a/DotNet/doc/models/type-10-enum.md b/DotNet/doc/models/type-10-enum.md deleted file mode 100644 index 38cf726c8..000000000 --- a/DotNet/doc/models/type-10-enum.md +++ /dev/null @@ -1,16 +0,0 @@ - -# Type 10 Enum - -Type of user group. LOCAL_GROUP indicates that the user is created locally in the ThoughtSpot system. - -## Enumeration - -`Type10Enum` - -## Fields - -| Name | -| --- | -| `LOCALGROUP` | -| `TENANTGROUP` | - diff --git a/DotNet/doc/models/type-13-enum.md b/DotNet/doc/models/type-13-enum.md deleted file mode 100644 index f0293e6f2..000000000 --- a/DotNet/doc/models/type-13-enum.md +++ /dev/null @@ -1,18 +0,0 @@ - -# Type 13 Enum - -Type of the data object - -## Enumeration - -`Type13Enum` - -## Fields - -| Name | -| --- | -| `LIVEBOARD` | -| `DATAOBJECT` | -| `COLUMN` | -| `JOIN` | - diff --git a/DotNet/doc/models/type-14-enum.md b/DotNet/doc/models/type-14-enum.md deleted file mode 100644 index 759a8e288..000000000 --- a/DotNet/doc/models/type-14-enum.md +++ /dev/null @@ -1,25 +0,0 @@ - -# Type 14 Enum - -Type of the data connection. - -## Enumeration - -`Type14Enum` - -## Fields - -| Name | -| --- | -| `SNOWFLAKE` | -| `AMAZONREDSHIFT` | -| `GOOGLEBIGQUERY` | -| `AZURESYNAPSE` | -| `TERADATA` | -| `STARBURST` | -| `SAPHANA` | -| `ORACLEADW` | -| `DATABRICKS` | -| `DENODO` | -| `DREMIO` | - diff --git a/DotNet/doc/models/type-15-enum.md b/DotNet/doc/models/type-15-enum.md deleted file mode 100644 index 3107d27b0..000000000 --- a/DotNet/doc/models/type-15-enum.md +++ /dev/null @@ -1,25 +0,0 @@ - -# Type 15 Enum - -Type of the connect being searched. Valid values: SNOWFLAKE|AMAZON_REDSHIFT|GOOGLE_BIGQUERY|AZURE_SYNAPSE|TERADATA|STARBURST|SAP_HANA|ORACLE_ADW|DATABRICKS|DENODO - -## Enumeration - -`Type15Enum` - -## Fields - -| Name | -| --- | -| `SNOWFLAKE` | -| `AMAZONREDSHIFT` | -| `GOOGLEBIGQUERY` | -| `AZURESYNAPSE` | -| `TERADATA` | -| `STARBURST` | -| `SAPHANA` | -| `ORACLEADW` | -| `DATABRICKS` | -| `DENODO` | -| `DREMIO` | - diff --git a/DotNet/doc/models/type-16-enum.md b/DotNet/doc/models/type-16-enum.md deleted file mode 100644 index 90ae5c47c..000000000 --- a/DotNet/doc/models/type-16-enum.md +++ /dev/null @@ -1,16 +0,0 @@ - -# Type 16 Enum - -## Enumeration - -`Type16Enum` - -## Fields - -| Name | -| --- | -| `CSV` | -| `XLSX` | -| `PDF` | -| `PNG` | - diff --git a/DotNet/doc/models/type-18-enum.md b/DotNet/doc/models/type-18-enum.md deleted file mode 100644 index de04aeab8..000000000 --- a/DotNet/doc/models/type-18-enum.md +++ /dev/null @@ -1,18 +0,0 @@ - -# Type 18 Enum - -Type of metadata object. Valid values: Liveboard|Answer|DataObject|Column - -## Enumeration - -`Type18Enum` - -## Fields - -| Name | -| --- | -| `LIVEBOARD` | -| `ANSWER` | -| `DATAOBJECT` | -| `COLUMN` | - diff --git a/DotNet/doc/models/type-2-enum.md b/DotNet/doc/models/type-2-enum.md deleted file mode 100644 index 04624a9d7..000000000 --- a/DotNet/doc/models/type-2-enum.md +++ /dev/null @@ -1,18 +0,0 @@ - -# Type 2 Enum - -Type of the metadata objec - -## Enumeration - -`Type2Enum` - -## Fields - -| Name | -| --- | -| `LIVEBOARD` | -| `ANSWER` | -| `DATAOBJECT` | -| `COLUMN` | - diff --git a/DotNet/doc/models/type-3-enum.md b/DotNet/doc/models/type-3-enum.md deleted file mode 100644 index df8bc9646..000000000 --- a/DotNet/doc/models/type-3-enum.md +++ /dev/null @@ -1,33 +0,0 @@ - -# Type 3 Enum - -Type of the metadata object being searched. - -## Enumeration - -`Type3Enum` - -## Fields - -| Name | -| --- | -| `ANSWER` | -| `LIVEBOARD` | -| `DATAOBJECTALL` | -| `DATAOBJECTWORKSHEET` | -| `DATAOBJECTTABLE` | -| `DATAOBJECTUSERDEFINED` | -| `DATAOBJECTVIEW` | -| `DATAOBJECTCALENDARTABLE` | -| `COLUMNALL` | -| `COLUMNWORKSHEET` | -| `COLUMNTABLE` | -| `COLUMNUSERDEFINED` | -| `COLUMNVIEW` | -| `COLUMNCALENDARTABLE` | -| `JOIN` | -| `CONNECTION` | -| `TAG` | -| `USER` | -| `USERGROUP` | - diff --git a/DotNet/doc/models/type-4-enum.md b/DotNet/doc/models/type-4-enum.md deleted file mode 100644 index 2bc032891..000000000 --- a/DotNet/doc/models/type-4-enum.md +++ /dev/null @@ -1,21 +0,0 @@ - -# Type 4 Enum - -## Enumeration - -`Type4Enum` - -## Fields - -| Name | -| --- | -| `ANSWER` | -| `LIVEBOARD` | -| `DATAOBJECT` | -| `COLUMN` | -| `JOIN` | -| `CONNECTION` | -| `TAG` | -| `USER` | -| `USERGROUP` | - diff --git a/DotNet/doc/models/type-5-enum.md b/DotNet/doc/models/type-5-enum.md deleted file mode 100644 index 7a1dbcb1c..000000000 --- a/DotNet/doc/models/type-5-enum.md +++ /dev/null @@ -1,31 +0,0 @@ - -# Type 5 Enum - -## Enumeration - -`Type5Enum` - -## Fields - -| Name | -| --- | -| `ANSWER` | -| `LIVEBOARD` | -| `DATAOBJECTALL` | -| `DATAOBJECTWORKSHEET` | -| `DATAOBJECTTABLE` | -| `DATAOBJECTUSERDEFINED` | -| `DATAOBJECTVIEW` | -| `DATAOBJECTCALENDARTABLE` | -| `COLUMNALL` | -| `COLUMNWORKSHEET` | -| `COLUMNTABLE` | -| `COLUMNUSERDEFINED` | -| `COLUMNVIEW` | -| `COLUMNCALENDARTABLE` | -| `JOIN` | -| `CONNECTION` | -| `TAG` | -| `USER` | -| `USERGROUP` | - diff --git a/DotNet/doc/models/type-6-enum.md b/DotNet/doc/models/type-6-enum.md deleted file mode 100644 index b8a8298d3..000000000 --- a/DotNet/doc/models/type-6-enum.md +++ /dev/null @@ -1,23 +0,0 @@ - -# Type 6 Enum - -Type of the metadata object being searched. - -## Enumeration - -`Type6Enum` - -## Fields - -| Name | -| --- | -| `ANSWER` | -| `LIVEBOARD` | -| `DATAOBJECT` | -| `COLUMN` | -| `JOIN` | -| `CONNECTION` | -| `TAG` | -| `USER` | -| `USERGROUP` | - diff --git a/DotNet/doc/models/type-7-enum.md b/DotNet/doc/models/type-7-enum.md deleted file mode 100644 index b79c74487..000000000 --- a/DotNet/doc/models/type-7-enum.md +++ /dev/null @@ -1,16 +0,0 @@ - -# Type 7 Enum - -## Enumeration - -`Type7Enum` - -## Fields - -| Name | -| --- | -| `LIVEBOARD` | -| `ANSWER` | -| `DATAOBJECT` | -| `COLUMN` | - diff --git a/DotNet/doc/models/type-8-enum.md b/DotNet/doc/models/type-8-enum.md deleted file mode 100644 index 2880f43d9..000000000 --- a/DotNet/doc/models/type-8-enum.md +++ /dev/null @@ -1,17 +0,0 @@ - -# Type 8 Enum - -## Enumeration - -`Type8Enum` - -## Fields - -| Name | -| --- | -| `UNKNOWN` | -| `LDAPUSER` | -| `SAMLUSER` | -| `OIDCUSER` | -| `LOCALUSER` | - diff --git a/DotNet/doc/models/type-9-enum.md b/DotNet/doc/models/type-9-enum.md deleted file mode 100644 index 464ce808b..000000000 --- a/DotNet/doc/models/type-9-enum.md +++ /dev/null @@ -1,19 +0,0 @@ - -# Type 9 Enum - -Type of user. LOCAL_USER indicates that the user is created locally in the ThoughtSpot system. - -## Enumeration - -`Type9Enum` - -## Fields - -| Name | -| --- | -| `UNKNOWN` | -| `LDAPUSER` | -| `SAMLUSER` | -| `OIDCUSER` | -| `LOCALUSER` | - diff --git a/DotNet/doc/models/type-enum.md b/DotNet/doc/models/type-enum.md deleted file mode 100644 index 739ca7020..000000000 --- a/DotNet/doc/models/type-enum.md +++ /dev/null @@ -1,18 +0,0 @@ - -# Type Enum - -Type of the metadata object - -## Enumeration - -`TypeEnum` - -## Fields - -| Name | -| --- | -| `ANSWER` | -| `LIVEBOARD` | -| `DATAOBJECT` | -| `CONNECTION` | - diff --git a/DotNet/doc/models/user-name-and-id-input.md b/DotNet/doc/models/user-name-and-id-input.md deleted file mode 100644 index 8a7582970..000000000 --- a/DotNet/doc/models/user-name-and-id-input.md +++ /dev/null @@ -1,23 +0,0 @@ - -# User Name and ID Input - -## Structure - -`UserNameAndIDInput` - -## Fields - -| Name | Type | Tags | Description | -| --- | --- | --- | --- | -| `Name` | `string` | Optional | Username of the user | -| `Id` | `string` | Optional | GUID of the user | - -## Example (as JSON) - -```json -{ - "name": null, - "id": null -} -``` - diff --git a/DotNet/doc/models/user-name-and-id.md b/DotNet/doc/models/user-name-and-id.md deleted file mode 100644 index 7a6f60606..000000000 --- a/DotNet/doc/models/user-name-and-id.md +++ /dev/null @@ -1,23 +0,0 @@ - -# User Name and ID - -## Structure - -`UserNameAndID` - -## Fields - -| Name | Type | Tags | Description | -| --- | --- | --- | --- | -| `Name` | `string` | Optional | Username of the user | -| `Id` | `string` | Optional | GUID of the user | - -## Example (as JSON) - -```json -{ - "name": null, - "id": null -} -``` - diff --git a/DotNet/doc/models/user-response.md b/DotNet/doc/models/user-response.md deleted file mode 100644 index cd6654aa0..000000000 --- a/DotNet/doc/models/user-response.md +++ /dev/null @@ -1,83 +0,0 @@ - -# User Response - -## Structure - -`UserResponse` - -## Fields - -| Name | Type | Tags | Description | -| --- | --- | --- | --- | -| `Name` | `string` | Optional | Username of the user account | -| `DisplayName` | `string` | Optional | Display name of the user account | -| `Id` | `string` | Optional | GUID of the user account | -| `Visibility` | `string` | Optional | Visibility of the user account | -| `Mail` | `string` | Optional | Email of the user account | -| `Groups` | [`List`](../../doc/models/group-name-and-id.md) | Optional | Name of the group to which user account is added | -| `Privileges` | `List` | Optional | Privileges assigned to user account | -| `Orgs` | [`List`](../../doc/models/org-type.md) | Optional | The organizations that user belongs to | -| `Tags` | `List` | Optional | Tags assigned to the user | -| `State` | `string` | Optional | Indicates if the user account is active or inactive | -| `NotifyOnShare` | `bool?` | Optional | Indicates if the email should be sent when object is shared with the user | -| `ShowWalkMe` | `bool?` | Optional | Indicates if the walk me should be shown when logging in | -| `AnalystOnboardingComplete` | `bool?` | Optional | Indicates if the onboarding is completed for the user | -| `FirstLogin` | `int?` | Optional | Indicates if the use is logging in for the first time | -| `WelcomeEmailSent` | `bool?` | Optional | Indicates if the welcome email is sent to email associated with the user account | -| `IsDeleted` | `bool?` | Optional | Indicates if the user account is deleted | -| `IsHidden` | `bool?` | Optional | Indicates if the user account is hidden | -| `IsExternal` | `bool?` | Optional | Indicates if the user account is from external system
isDeprecated | -| `IsDeprecated` | `bool?` | Optional | - | -| `Complete` | `bool?` | Optional | Indicates if the all the properties of user account is provided | -| `IsSuperUser` | `bool?` | Optional | Indicates if the user account is super user | -| `IsSystemPrincipal` | `bool?` | Optional | Indicates if the user account is system principal | -| `Type` | `string` | Optional | Indicates the type of user account | -| `Parenttype` | `string` | Optional | Indicates the type of parent object | -| `TenantId` | `string` | Optional | Tenant id associated with the user account | -| `IndexVersion` | `double?` | Optional | - | -| `GenerationNum` | `double?` | Optional | - | -| `Created` | `double?` | Optional | Date and time when user account was created | -| `Modified` | `double?` | Optional | Date and time of last modification of user account | -| `Author` | [`Models.UserNameAndID`](../../doc/models/user-name-and-id.md) | Optional | - | -| `ModifiedBy` | [`Models.UserNameAndID`](../../doc/models/user-name-and-id.md) | Optional | - | -| `Owner` | [`Models.UserNameAndID`](../../doc/models/user-name-and-id.md) | Optional | - | - -## Example (as JSON) - -```json -{ - "name": null, - "displayName": null, - "id": null, - "visibility": null, - "mail": null, - "groups": null, - "privileges": null, - "orgs": null, - "tags": null, - "state": null, - "notifyOnShare": null, - "showWalkMe": null, - "analystOnboardingComplete": null, - "firstLogin": null, - "welcomeEmailSent": null, - "isDeleted": null, - "isHidden": null, - "isExternal": null, - "isDeprecated": null, - "complete": null, - "isSuperUser": null, - "isSystemPrincipal": null, - "type": null, - "parenttype": null, - "tenantId": null, - "indexVersion": null, - "generationNum": null, - "created": null, - "modified": null, - "author": null, - "modifiedBy": null, - "owner": null -} -``` - diff --git a/DotNet/doc/models/visibility-1-enum.md b/DotNet/doc/models/visibility-1-enum.md deleted file mode 100644 index db3b6f282..000000000 --- a/DotNet/doc/models/visibility-1-enum.md +++ /dev/null @@ -1,17 +0,0 @@ - -# Visibility 1 Enum - -Visibility of the user account. The visibility attribute is set to DEFAULT when creating a user. The DEFAULT attribute makes a user visible to other users and user groups, and thus allows them to share objects. - -## Enumeration - -`Visibility1Enum` - -## Fields - -| Name | -| --- | -| `DEFAULT` | -| `NONSHARABLE` | -| `SHARABLE` | - diff --git a/DotNet/doc/models/visibility-2-enum.md b/DotNet/doc/models/visibility-2-enum.md deleted file mode 100644 index a1cd4043b..000000000 --- a/DotNet/doc/models/visibility-2-enum.md +++ /dev/null @@ -1,17 +0,0 @@ - -# Visibility 2 Enum - -Visibility of the user group. The visibility attribute is set to DEFAULT. The DEFAULT attribute makes the user group visible for other user groups and allows them to share objects. - -## Enumeration - -`Visibility2Enum` - -## Fields - -| Name | -| --- | -| `DEFAULT` | -| `NONSHARABLE` | -| `SHARABLE` | - diff --git a/DotNet/doc/models/visibility-enum.md b/DotNet/doc/models/visibility-enum.md deleted file mode 100644 index c4e6f73b5..000000000 --- a/DotNet/doc/models/visibility-enum.md +++ /dev/null @@ -1,15 +0,0 @@ - -# Visibility Enum - -## Enumeration - -`VisibilityEnum` - -## Fields - -| Name | -| --- | -| `DEFAULT` | -| `NONSHARABLE` | -| `SHARABLE` | - diff --git a/DotNet/doc/models/viz-type.md b/DotNet/doc/models/viz-type.md deleted file mode 100644 index f436c1ad3..000000000 --- a/DotNet/doc/models/viz-type.md +++ /dev/null @@ -1,25 +0,0 @@ - -# Viz Type - -## Structure - -`VizType` - -## Fields - -| Name | Type | Tags | Description | -| --- | --- | --- | --- | -| `Name` | `string` | Optional | The name of the visualization | -| `Id` | `string` | Optional | The GUID of the visualization | -| `QuerySql` | `string` | Optional | SQL query associated with the visualization | - -## Example (as JSON) - -```json -{ - "name": null, - "id": null, - "querySql": null -} -``` - diff --git a/DotNet/doc/utility-classes.md b/DotNet/doc/utility-classes.md deleted file mode 100644 index b13cf83f5..000000000 --- a/DotNet/doc/utility-classes.md +++ /dev/null @@ -1,28 +0,0 @@ - -# Utility Classes Documentation - -## ApiHelper Class - -HttpRequest stores necessary information about the http request. - -### Properties - -| Name | Description | Type | -| --- | --- | --- | -| HttpMethod | The HTTP verb to use for this request. | `HttpMethod` | -| QueryUrl | The query url for the http request. | `string` | -| QueryParameters | Query parameters collection for the current http request. | `Dictionary` | -| Headers | Headers collection for the current http request. | `Dictionary` | -| FormParameters | Form parameters for the current http request. | `List>` | -| Body | Optional raw string to send as request body. | `object` | -| Username | Optional username for Basic Auth. | `string` | -| Password | Optional password for Basic Auth. | `string` | - -### Methods - -| Name | Description | Return Type | -| --- | --- | --- | -| `DeepCloneObject(T obj)` | Creates a deep clone of an object by serializing it into a json string and then deserializing back into an object. | `T` | -| `JsonSerialize(object obj, JsonConverter converter = null)` | JSON Serialization of a given object. | `string` | -| `JsonDeserialize(string json, JsonConverter converter = null)` | JSON Deserialization of the given json string. | `T` | - diff --git a/Java/.classpath b/Java/.classpath deleted file mode 100644 index 9aa18b799..000000000 --- a/Java/.classpath +++ /dev/null @@ -1,27 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/Java/.project b/Java/.project deleted file mode 100644 index 0bb7bc7a3..000000000 --- a/Java/.project +++ /dev/null @@ -1,28 +0,0 @@ - - - - ThoughtSpotPublicRESTAPILib - - - - - - org.eclipse.jdt.core.javabuilder - - - - - org.eclipse.m2e.core.maven2Builder - - - - - - org.eclipse.m2e.core.maven2Nature - org.eclipse.jdt.core.javanature - - diff --git a/Java/.settings/.org.eclipse.jdt.core.prefs b/Java/.settings/.org.eclipse.jdt.core.prefs deleted file mode 100644 index 30268d29b..000000000 --- a/Java/.settings/.org.eclipse.jdt.core.prefs +++ /dev/null @@ -1,5 +0,0 @@ -eclipse.preferences.version=1 -org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8 -org.eclipse.jdt.core.compiler.compliance=1.8 -org.eclipse.jdt.core.compiler.problem.forbiddenReference=warning -org.eclipse.jdt.core.compiler.source=1.8 \ No newline at end of file diff --git a/Java/.settings/.org.eclipse.m2e.core.prefs b/Java/.settings/.org.eclipse.m2e.core.prefs deleted file mode 100644 index 7e75fb4b3..000000000 --- a/Java/.settings/.org.eclipse.m2e.core.prefs +++ /dev/null @@ -1,4 +0,0 @@ -activeProfiles= -eclipse.preferences.version=1 -resolveWorkspaceProjects=true -version=1 \ No newline at end of file diff --git a/Java/LICENSE b/Java/LICENSE deleted file mode 100644 index c571aa529..000000000 --- a/Java/LICENSE +++ /dev/null @@ -1,28 +0,0 @@ -License: -======== -The MIT License (MIT) -http://opensource.org/licenses/MIT - -Copyright (c) 2014 - 2022 APIMATIC Limited - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. - -Trade Mark: -========== -APIMATIC is a trade mark for APIMATIC Limited \ No newline at end of file diff --git a/Java/README.md b/Java/README.md deleted file mode 100644 index 71c39384e..000000000 --- a/Java/README.md +++ /dev/null @@ -1,89 +0,0 @@ - -# Getting Started with ThoughtSpot Public REST API - -## Install the Package - -Install the SDK by adding the following dependency in your project's pom.xml file: - -```xml - - io.github.thoughtspot - rest-api-sdk-lib - 1.13.1 - -``` - -You can also view the package at: -https://mvnrepository.com/artifact/io.github.thoughtspot/rest-api-sdk-lib/1.13.1 - -## Test the SDK - -The generated code and the server can be tested using automatically generated test cases. -JUnit is used as the testing framework and test runner. - -In Eclipse, for running the tests do the following: - -1. Select the project ThoughtSpotPublicRESTAPILib from the package explorer. -2. Select `Run -> Run as -> JUnit Test` or use `Alt + Shift + X` followed by `T` to run the Tests. - -## Initialize the API Client - -**_Note:_** Documentation for the client can be found [here.](doc/client.md) - -The following parameters are configurable for the API Client: - -| Parameter | Type | Description | -| --- | --- | --- | -| `baseUrl` | `String` | *Default*: `"https://localhost:443"` | -| `environment` | Environment | The API environment.
**Default: `Environment.PRODUCTION`** | -| `httpClientConfig` | `ReadonlyHttpClientConfiguration` | Http Client Configuration instance. | -| `accessToken` | `String` | The OAuth 2.0 Access Token to use for API requests. | - -The API client can be initialized as follows: - -```java -ThoughtSpotPublicRESTAPIClient client = new ThoughtSpotPublicRESTAPIClient.Builder() - .httpClientConfig(configBuilder -> configBuilder - .timeout(0)) - .accessToken("AccessToken") - .environment(Environment.PRODUCTION) - .baseUrl("https://localhost:443") - .build(); -``` - -## Authorization - -This API uses `OAuth 2 Bearer token`. - -## List of APIs - -* [User](doc/controllers/user.md) -* [Group](doc/controllers/group.md) -* [Metadata](doc/controllers/metadata.md) -* [Database](doc/controllers/database.md) -* [Connection](doc/controllers/connection.md) -* [Data](doc/controllers/data.md) -* [Logs](doc/controllers/logs.md) -* [Custom Actions](doc/controllers/custom-actions.md) -* [Security](doc/controllers/security.md) -* [Org](doc/controllers/org.md) -* [Session](doc/controllers/session.md) -* [Admin](doc/controllers/admin.md) -* [Report](doc/controllers/report.md) -* [Materialization](doc/controllers/materialization.md) - -## Classes Documentation - -* [Utility Classes](doc/utility-classes.md) -* [HttpRequest](doc/http-request.md) -* [HttpResponse](doc/http-response.md) -* [HttpStringResponse](doc/http-string-response.md) -* [HttpContext](doc/http-context.md) -* [HttpBodyRequest](doc/http-body-request.md) -* [HttpCallback Interface](doc/http-callback-interface.md) -* [Headers](doc/headers.md) -* [ApiException](doc/api-exception.md) -* [Configuration Interface](doc/configuration-interface.md) -* [HttpClientConfiguration](doc/http-client-configuration.md) -* [HttpClientConfiguration.Builder](doc/http-client-configuration-builder.md) - diff --git a/Java/doc/api-exception.md b/Java/doc/api-exception.md deleted file mode 100644 index 8ec1dee01..000000000 --- a/Java/doc/api-exception.md +++ /dev/null @@ -1,19 +0,0 @@ - -# ApiException Class - -This is the base class for all exceptions that represent an error response from the server. - -## Constructors - -| Name | Description | -| --- | --- | -| `ApiException(String reason)` | Initialization constructor. | -| `ApiException(String reason, HttpContext context)` | Initialization constructor. | - -## Methods - -| Name | Description | Return Type | -| --- | --- | --- | -| `getResponseCode()` | The HTTP response code from the API request | `int` | -| `getHeaders()` | The HTTP response body from the API request. | `Headers` | - diff --git a/Java/doc/client.md b/Java/doc/client.md deleted file mode 100644 index bebeb5dc1..000000000 --- a/Java/doc/client.md +++ /dev/null @@ -1,61 +0,0 @@ - -# Client Class Documentation - -The following parameters are configurable for the API Client: - -| Parameter | Type | Description | -| --- | --- | --- | -| `baseUrl` | `String` | *Default*: `"https://localhost:443"` | -| `environment` | Environment | The API environment.
**Default: `Environment.PRODUCTION`** | -| `httpClientConfig` | `ReadonlyHttpClientConfiguration` | Http Client Configuration instance. | -| `accessToken` | `String` | The OAuth 2.0 Access Token to use for API requests. | - -The API client can be initialized as follows: - -```java -ThoughtSpotPublicRESTAPIClient client = new ThoughtSpotPublicRESTAPIClient.Builder() - .httpClientConfig(configBuilder -> configBuilder - .timeout(0)) - .accessToken("AccessToken") - .environment(Environment.PRODUCTION) - .baseUrl("https://localhost:443") - .build(); -``` - -## ThoughtSpot Public REST APIClient Class - -The gateway for the SDK. This class acts as a factory for the Controllers and also holds the configuration of the SDK. - -### Controllers - -| Name | Description | Return Type | -| --- | --- | --- | -| `getUserController()` | Provides access to User controller. | `UserController` | -| `getGroupController()` | Provides access to Group controller. | `GroupController` | -| `getMetadataController()` | Provides access to Metadata controller. | `MetadataController` | -| `getDatabaseController()` | Provides access to Database controller. | `DatabaseController` | -| `getConnectionController()` | Provides access to Connection controller. | `ConnectionController` | -| `getDataController()` | Provides access to Data controller. | `DataController` | -| `getLogsController()` | Provides access to Logs controller. | `LogsController` | -| `getCustomActionsController()` | Provides access to CustomActions controller. | `CustomActionsController` | -| `getSecurityController()` | Provides access to Security controller. | `SecurityController` | -| `getOrgController()` | Provides access to Org controller. | `OrgController` | -| `getSessionController()` | Provides access to Session controller. | `SessionController` | -| `getAdminController()` | Provides access to Admin controller. | `AdminController` | -| `getReportController()` | Provides access to Report controller. | `ReportController` | -| `getMaterializationController()` | Provides access to Materialization controller. | `MaterializationController` | - -### Methods - -| Name | Description | Return Type | -| --- | --- | --- | -| `shutdown()` | Shutdown the underlying HttpClient instance. | `void` | -| `getEnvironment()` | Current API environment. | `Environment` | -| `getBaseUrl()` | baseUrl value. | `String` | -| `getHttpClient()` | The HTTP Client instance to use for making HTTP requests. | `HttpClient` | -| `getHttpClientConfig()` | Http Client Configuration instance. | `ReadonlyHttpClientConfiguration` | -| `getBearerAuthCredentials()` | The credentials to use with BearerAuth. | `BearerAuthCredentials` | -| `getAccessToken()` | OAuth 2.0 Access Token. | `String` | -| `getBaseUri(Server server)` | Get base URI by current environment | `String` | -| `getBaseUri()` | Get base URI by current environment | `String` | - diff --git a/Java/doc/configuration-interface.md b/Java/doc/configuration-interface.md deleted file mode 100644 index 520652808..000000000 --- a/Java/doc/configuration-interface.md +++ /dev/null @@ -1,16 +0,0 @@ - -# Configuration Interface - -This is the base class for all exceptions that represent an error response from the server. - -## Methods - -| Name | Description | Return Type | -| --- | --- | --- | -| `getEnvironment()` | Current API environment. | `Environment` | -| `getBaseUrl()` | baseUrl value. | `String` | -| `getHttpClientConfig()` | Http Client Configuration instance. | `ReadonlyHttpClientConfiguration` | -| `getAccessToken()` | OAuth 2.0 Access Token. | `String` | -| `getBaseUri(Server server)` | Get base URI by current environment. | `String` | -| `getBaseUri()` | Get base URI by current environment. | `String` | - diff --git a/Java/doc/controllers/admin.md b/Java/doc/controllers/admin.md deleted file mode 100644 index 6d572c9d0..000000000 --- a/Java/doc/controllers/admin.md +++ /dev/null @@ -1,281 +0,0 @@ -# Admin - -```java -AdminController adminController = client.getAdminController(); -``` - -## Class Name - -`AdminController` - -## Methods - -* [Restapi V2 Update Cluster Config](../../doc/controllers/admin.md#restapi-v2-update-cluster-config) -* [Restapi V2 Reset User Password](../../doc/controllers/admin.md#restapi-v2-reset-user-password) -* [Restapi V2 Sync Principal](../../doc/controllers/admin.md#restapi-v2-sync-principal) -* [Restapi V2 Change Author of Objects](../../doc/controllers/admin.md#restapi-v2-change-author-of-objects) -* [Restapi V2 Assign Author to Objects](../../doc/controllers/admin.md#restapi-v2-assign-author-to-objects) -* [Restapi V2 Force Logout Users](../../doc/controllers/admin.md#restapi-v2-force-logout-users) - - -# Restapi V2 Update Cluster Config - -To update the Thoughtspot cluster configuration, use this endpoint. - -```java -CompletableFuture restapiV2UpdateClusterConfigAsync( - final TspublicRestV2AdminConfigurationUpdateRequest body) -``` - -## Parameters - -| Parameter | Type | Tags | Description | -| --- | --- | --- | --- | -| `body` | [`TspublicRestV2AdminConfigurationUpdateRequest`](../../doc/models/tspublic-rest-v2-admin-configuration-update-request.md) | Body, Required | - | - -## Response Type - -`boolean` - -## Example Usage - -```java -TspublicRestV2AdminConfigurationUpdateRequest body = new TspublicRestV2AdminConfigurationUpdateRequest(); - -adminController.restapiV2UpdateClusterConfigAsync(body).thenAccept(result -> { - // TODO success callback handler -}).exceptionally(exception -> { - // TODO failure callback handler - return null; -}); -``` - -## Errors - -| HTTP Status Code | Error Description | Exception Class | -| --- | --- | --- | -| 500 | Operation failed | [`ErrorResponseException`](../../doc/models/error-response-exception.md) | - - -# Restapi V2 Reset User Password - -To reset the password of a ThoughtSpot user account, use this endpoint. - -It is mandatory to use Authorization header with token of a user with admin access to successfully run this endpoint. - -At least one of User Id or username is mandatory. When both are given, then user id will be considered. - -```java -CompletableFuture restapiV2ResetUserPasswordAsync( - final TspublicRestV2AdminResetpasswordRequest body) -``` - -## Parameters - -| Parameter | Type | Tags | Description | -| --- | --- | --- | --- | -| `body` | [`TspublicRestV2AdminResetpasswordRequest`](../../doc/models/tspublic-rest-v2-admin-resetpassword-request.md) | Body, Required | - | - -## Response Type - -`boolean` - -## Example Usage - -```java -TspublicRestV2AdminResetpasswordRequest body = new TspublicRestV2AdminResetpasswordRequest(); -body.setNewPassword("newPassword0"); - -adminController.restapiV2ResetUserPasswordAsync(body).thenAccept(result -> { - // TODO success callback handler -}).exceptionally(exception -> { - // TODO failure callback handler - return null; -}); -``` - -## Errors - -| HTTP Status Code | Error Description | Exception Class | -| --- | --- | --- | -| 500 | Operation failed | [`ErrorResponseException`](../../doc/models/error-response-exception.md) | - - -# Restapi V2 Sync Principal - -To programmatically synchronize user accounts and user groups from external system with ThoughtSpot, use this endpoint. - -The payload takes principals containing all users and groups present in the external system. - -The users and user groups in Thoughtspot get updated for any matching inputs. - -Any user and user group present in the input, but not present in the cluster, gets created in cluster. -n You can optionally choose to delete the user and groups from the cluster, that are not present in the input. - -```java -CompletableFuture restapiV2SyncPrincipalAsync( - final TspublicRestV2AdminSyncprincipalRequest body) -``` - -## Parameters - -| Parameter | Type | Tags | Description | -| --- | --- | --- | --- | -| `body` | [`TspublicRestV2AdminSyncprincipalRequest`](../../doc/models/tspublic-rest-v2-admin-syncprincipal-request.md) | Body, Required | - | - -## Response Type - -[`AdminsyncPrincipalResponse`](../../doc/models/adminsync-principal-response.md) - -## Example Usage - -```java -TspublicRestV2AdminSyncprincipalRequest body = new TspublicRestV2AdminSyncprincipalRequest(); -body.setPrincipalObject(new LinkedList<>()); -body.getPrincipalObject().add(localhost.ApiHelper.deserialize("{\"key1\":\"val1\",\"key2\":\"val2\"}")); - -adminController.restapiV2SyncPrincipalAsync(body).thenAccept(result -> { - // TODO success callback handler -}).exceptionally(exception -> { - // TODO failure callback handler - return null; -}); -``` - -## Errors - -| HTTP Status Code | Error Description | Exception Class | -| --- | --- | --- | -| 500 | Operation failed | [`ErrorResponseException`](../../doc/models/error-response-exception.md) | - - -# Restapi V2 Change Author of Objects - -To programmatically change the owner of one or several objects from one user account to another, use this endpoint. - -You might want to transfer ownership of objects owned by a user to another active user, when the account is removed from the ThoughtSpot application. - -```java -CompletableFuture restapiV2ChangeAuthorOfObjectsAsync( - final TspublicRestV2AdminChangeauthorRequest body) -``` - -## Parameters - -| Parameter | Type | Tags | Description | -| --- | --- | --- | --- | -| `body` | [`TspublicRestV2AdminChangeauthorRequest`](../../doc/models/tspublic-rest-v2-admin-changeauthor-request.md) | Body, Required | - | - -## Response Type - -`boolean` - -## Example Usage - -```java -TspublicRestV2AdminChangeauthorRequest body = new TspublicRestV2AdminChangeauthorRequest(); -body.setTsObjectId(new LinkedList<>()); -body.getTsObjectId().add("tsObjectId7"); -body.setFromUser(new FromUserNameAndIDInput()); -body.setToUser(new ToUserNameAndIDInput()); - -adminController.restapiV2ChangeAuthorOfObjectsAsync(body).thenAccept(result -> { - // TODO success callback handler -}).exceptionally(exception -> { - // TODO failure callback handler - return null; -}); -``` - -## Errors - -| HTTP Status Code | Error Description | Exception Class | -| --- | --- | --- | -| 500 | Operation failed | [`ErrorResponseException`](../../doc/models/error-response-exception.md) | - - -# Restapi V2 Assign Author to Objects - -To programmatically assign an author to one or several objects, use this endpoint. - -Provide either user name or id as input. When both are given user id will be considered. - -Requires administration privilege. - -```java -CompletableFuture restapiV2AssignAuthorToObjectsAsync( - final TspublicRestV2AdminAssignauthorRequest body) -``` - -## Parameters - -| Parameter | Type | Tags | Description | -| --- | --- | --- | --- | -| `body` | [`TspublicRestV2AdminAssignauthorRequest`](../../doc/models/tspublic-rest-v2-admin-assignauthor-request.md) | Body, Required | - | - -## Response Type - -`boolean` - -## Example Usage - -```java -TspublicRestV2AdminAssignauthorRequest body = new TspublicRestV2AdminAssignauthorRequest(); -body.setTsObjectId(new LinkedList<>()); -body.getTsObjectId().add("tsObjectId7"); - -adminController.restapiV2AssignAuthorToObjectsAsync(body).thenAccept(result -> { - // TODO success callback handler -}).exceptionally(exception -> { - // TODO failure callback handler - return null; -}); -``` - -## Errors - -| HTTP Status Code | Error Description | Exception Class | -| --- | --- | --- | -| 500 | Operation failed | [`ErrorResponseException`](../../doc/models/error-response-exception.md) | - - -# Restapi V2 Force Logout Users - -To logout one or more users from logged in session, use this endpoint. If no input is provided then all logged in users are force logged out. - -Requires administration privilege - -```java -CompletableFuture restapiV2ForceLogoutUsersAsync( - final TspublicRestV2AdminForcelogoutRequest body) -``` - -## Parameters - -| Parameter | Type | Tags | Description | -| --- | --- | --- | --- | -| `body` | [`TspublicRestV2AdminForcelogoutRequest`](../../doc/models/tspublic-rest-v2-admin-forcelogout-request.md) | Body, Required | - | - -## Response Type - -`boolean` - -## Example Usage - -```java -TspublicRestV2AdminForcelogoutRequest body = new TspublicRestV2AdminForcelogoutRequest(); - -adminController.restapiV2ForceLogoutUsersAsync(body).thenAccept(result -> { - // TODO success callback handler -}).exceptionally(exception -> { - // TODO failure callback handler - return null; -}); -``` - -## Errors - -| HTTP Status Code | Error Description | Exception Class | -| --- | --- | --- | -| 500 | Operation failed | [`ErrorResponseException`](../../doc/models/error-response-exception.md) | - diff --git a/Java/doc/controllers/connection.md b/Java/doc/controllers/connection.md deleted file mode 100644 index af2b4b2d4..000000000 --- a/Java/doc/controllers/connection.md +++ /dev/null @@ -1,526 +0,0 @@ -# Connection - -```java -ConnectionController connectionController = client.getConnectionController(); -``` - -## Class Name - -`ConnectionController` - -## Methods - -* [Restapi V2 Get Connection](../../doc/controllers/connection.md#restapi-v2-get-connection) -* [Restapi V2 Get Connection Database](../../doc/controllers/connection.md#restapi-v2-get-connection-database) -* [Restapi V2 Create Connection](../../doc/controllers/connection.md#restapi-v2-create-connection) -* [Restapi V2 Update Connection](../../doc/controllers/connection.md#restapi-v2-update-connection) -* [Restapi V2 Delete Connection](../../doc/controllers/connection.md#restapi-v2-delete-connection) -* [Restapi V2 Add Table to Connection](../../doc/controllers/connection.md#restapi-v2-add-table-to-connection) -* [Restapi V2 Remove Table From Connection](../../doc/controllers/connection.md#restapi-v2-remove-table-from-connection) -* [Restapi V2 Search Connection](../../doc/controllers/connection.md#restapi-v2-search-connection) -* [Restapi V2 Get Connection Tables](../../doc/controllers/connection.md#restapi-v2-get-connection-tables) -* [Restapi V2 Get Connection Table Columns](../../doc/controllers/connection.md#restapi-v2-get-connection-table-columns) - - -# Restapi V2 Get Connection - -To get the details of a specific connection use this endpoint - -```java -CompletableFuture restapiV2GetConnectionAsync( - final String id) -``` - -## Parameters - -| Parameter | Type | Tags | Description | -| --- | --- | --- | --- | -| `id` | `String` | Query, Required | The GUID of the connection to query | - -## Response Type - -[`ConnectionResponse`](../../doc/models/connection-response.md) - -## Example Usage - -```java -String id = "id0"; - -connectionController.restapiV2GetConnectionAsync(id).thenAccept(result -> { - // TODO success callback handler -}).exceptionally(exception -> { - // TODO failure callback handler - return null; -}); -``` - -## Errors - -| HTTP Status Code | Error Description | Exception Class | -| --- | --- | --- | -| 500 | Operation failed | [`ErrorResponseException`](../../doc/models/error-response-exception.md) | - - -# Restapi V2 Get Connection Database - -To get the list of databases for a connection, use this endpoint. - -The response will include databases from the data platform corresponding to the connection id provided. - -```java -CompletableFuture> restapiV2GetConnectionDatabaseAsync( - final String id) -``` - -## Parameters - -| Parameter | Type | Tags | Description | -| --- | --- | --- | --- | -| `id` | `String` | Query, Required | The GUID of the connection | - -## Response Type - -`List` - -## Example Usage - -```java -String id = "id0"; - -connectionController.restapiV2GetConnectionDatabaseAsync(id).thenAccept(result -> { - // TODO success callback handler -}).exceptionally(exception -> { - // TODO failure callback handler - return null; -}); -``` - -## Errors - -| HTTP Status Code | Error Description | Exception Class | -| --- | --- | --- | -| 500 | Operation failed | [`ErrorResponseException`](../../doc/models/error-response-exception.md) | - - -# Restapi V2 Create Connection - -To programmatically create a connection in the ThoughtSpot system use this API endpoint. -Using this API, you can create a connection and assign groups. -To create a connection, you require admin connection privileges. -All connections created in the ThoughtSpot system are added to ALL_GROUP - -```java -CompletableFuture restapiV2CreateConnectionAsync( - final TspublicRestV2ConnectionCreateRequest body) -``` - -## Parameters - -| Parameter | Type | Tags | Description | -| --- | --- | --- | --- | -| `body` | [`TspublicRestV2ConnectionCreateRequest`](../../doc/models/tspublic-rest-v2-connection-create-request.md) | Body, Required | - | - -## Response Type - -[`CreateConnectionResponse`](../../doc/models/create-connection-response.md) - -## Example Usage - -```java -TspublicRestV2ConnectionCreateRequest body = new TspublicRestV2ConnectionCreateRequest(); -body.setType(Type14Enum.ORACLE_ADW); -body.setName("name6"); -body.setConfiguration("configuration0"); - -connectionController.restapiV2CreateConnectionAsync(body).thenAccept(result -> { - // TODO success callback handler -}).exceptionally(exception -> { - // TODO failure callback handler - return null; -}); -``` - -## Errors - -| HTTP Status Code | Error Description | Exception Class | -| --- | --- | --- | -| 500 | Operation failed | [`ErrorResponseException`](../../doc/models/error-response-exception.md) | - - -# Restapi V2 Update Connection - -You can use this endpoint to programmatically modify an existing connection -To modify a connection, you require admin connection privileges. -At least one of Connection Id or connectionname is mandatory. When both are given, then connection id will be considered and connectionname will be updated - -```java -CompletableFuture restapiV2UpdateConnectionAsync( - final TspublicRestV2ConnectionUpdateRequest body) -``` - -## Parameters - -| Parameter | Type | Tags | Description | -| --- | --- | --- | --- | -| `body` | [`TspublicRestV2ConnectionUpdateRequest`](../../doc/models/tspublic-rest-v2-connection-update-request.md) | Body, Required | - | - -## Response Type - -`boolean` - -## Example Usage - -```java -TspublicRestV2ConnectionUpdateRequest body = new TspublicRestV2ConnectionUpdateRequest(); -body.setId("id6"); -body.setConfiguration("configuration0"); - -connectionController.restapiV2UpdateConnectionAsync(body).thenAccept(result -> { - // TODO success callback handler -}).exceptionally(exception -> { - // TODO failure callback handler - return null; -}); -``` - -## Errors - -| HTTP Status Code | Error Description | Exception Class | -| --- | --- | --- | -| 500 | Operation failed | [`ErrorResponseException`](../../doc/models/error-response-exception.md) | - - -# Restapi V2 Delete Connection - -To remove a connection from the ThoughtSpot system, use this endpoint. - -```java -CompletableFuture restapiV2DeleteConnectionAsync( - final List id) -``` - -## Parameters - -| Parameter | Type | Tags | Description | -| --- | --- | --- | --- | -| `id` | `List` | Query, Required | A JSON array of GUIDs of the connection | - -## Response Type - -`boolean` - -## Example Usage - -```java -List id = new LinkedList<>(); -id.add("id0"); - -connectionController.restapiV2DeleteConnectionAsync(id).thenAccept(result -> { - // TODO success callback handler -}).exceptionally(exception -> { - // TODO failure callback handler - return null; -}); -``` - -## Errors - -| HTTP Status Code | Error Description | Exception Class | -| --- | --- | --- | -| 500 | Operation failed | [`ErrorResponseException`](../../doc/models/error-response-exception.md) | - - -# Restapi V2 Add Table to Connection - -To programmatically add table to an existing connection use this endpoint. -When you assign groups to a connection, the connection inherits the privileges assigned to those groups. -At least one of Connection Id or connectionname is mandatory. When both are given, then connection id will be considered. - -```java -CompletableFuture restapiV2AddTableToConnectionAsync( - final TspublicRestV2ConnectionAddtableRequest body) -``` - -## Parameters - -| Parameter | Type | Tags | Description | -| --- | --- | --- | --- | -| `body` | [`TspublicRestV2ConnectionAddtableRequest`](../../doc/models/tspublic-rest-v2-connection-addtable-request.md) | Body, Required | - | - -## Response Type - -`boolean` - -## Example Usage - -```java -TspublicRestV2ConnectionAddtableRequest body = new TspublicRestV2ConnectionAddtableRequest(); -body.setId("id6"); -body.setTable(new LinkedList<>()); - -AddTableInput bodyTable0 = new AddTableInput(); -bodyTable0.setName("name0"); -bodyTable0.setDbName("dbName8"); -bodyTable0.setSchemaName("schemaName4"); -bodyTable0.setColumns(new LinkedList<>()); - -ColumnsInput bodyTable0Columns0 = new ColumnsInput(); -bodyTable0Columns0.setName("name0"); -bodyTable0Columns0.setDataType("dataType2"); -bodyTable0.getColumns().add(bodyTable0Columns0); - -ColumnsInput bodyTable0Columns1 = new ColumnsInput(); -bodyTable0Columns1.setName("name1"); -bodyTable0Columns1.setDataType("dataType3"); -bodyTable0.getColumns().add(bodyTable0Columns1); - -body.getTable().add(bodyTable0); - -AddTableInput bodyTable1 = new AddTableInput(); -bodyTable1.setName("name1"); -bodyTable1.setDbName("dbName9"); -bodyTable1.setSchemaName("schemaName5"); -bodyTable1.setColumns(new LinkedList<>()); - -ColumnsInput bodyTable1Columns0 = new ColumnsInput(); -bodyTable1Columns0.setName("name9"); -bodyTable1Columns0.setDataType("dataType1"); -bodyTable1.getColumns().add(bodyTable1Columns0); - -body.getTable().add(bodyTable1); - -AddTableInput bodyTable2 = new AddTableInput(); -bodyTable2.setName("name2"); -bodyTable2.setDbName("dbName0"); -bodyTable2.setSchemaName("schemaName6"); -bodyTable2.setColumns(new LinkedList<>()); - -ColumnsInput bodyTable2Columns0 = new ColumnsInput(); -bodyTable2Columns0.setName("name8"); -bodyTable2Columns0.setDataType("dataType0"); -bodyTable2.getColumns().add(bodyTable2Columns0); - -ColumnsInput bodyTable2Columns1 = new ColumnsInput(); -bodyTable2Columns1.setName("name9"); -bodyTable2Columns1.setDataType("dataType1"); -bodyTable2.getColumns().add(bodyTable2Columns1); - -ColumnsInput bodyTable2Columns2 = new ColumnsInput(); -bodyTable2Columns2.setName("name0"); -bodyTable2Columns2.setDataType("dataType2"); -bodyTable2.getColumns().add(bodyTable2Columns2); - -body.getTable().add(bodyTable2); - - -connectionController.restapiV2AddTableToConnectionAsync(body).thenAccept(result -> { - // TODO success callback handler -}).exceptionally(exception -> { - // TODO failure callback handler - return null; -}); -``` - -## Errors - -| HTTP Status Code | Error Description | Exception Class | -| --- | --- | --- | -| 500 | Operation failed | [`ErrorResponseException`](../../doc/models/error-response-exception.md) | - - -# Restapi V2 Remove Table From Connection - -To programmatically remove a table from a connection use API endpoint. -The API removes only the connection association. It does not delete the connection or group from the Thoughtspot system. -At least one of id or name of connection is required. When both are given connection id will be considered. - -```java -CompletableFuture restapiV2RemoveTableFromConnectionAsync( - final TspublicRestV2ConnectionRemovetableRequest body) -``` - -## Parameters - -| Parameter | Type | Tags | Description | -| --- | --- | --- | --- | -| `body` | [`TspublicRestV2ConnectionRemovetableRequest`](../../doc/models/tspublic-rest-v2-connection-removetable-request.md) | Body, Required | - | - -## Response Type - -`boolean` - -## Example Usage - -```java -TspublicRestV2ConnectionRemovetableRequest body = new TspublicRestV2ConnectionRemovetableRequest(); -body.setId("id6"); -body.setTable(new LinkedList<>()); - -TableInput bodyTable0 = new TableInput(); -body.getTable().add(bodyTable0); - -TableInput bodyTable1 = new TableInput(); -body.getTable().add(bodyTable1); - -TableInput bodyTable2 = new TableInput(); -body.getTable().add(bodyTable2); - - -connectionController.restapiV2RemoveTableFromConnectionAsync(body).thenAccept(result -> { - // TODO success callback handler -}).exceptionally(exception -> { - // TODO failure callback handler - return null; -}); -``` - -## Errors - -| HTTP Status Code | Error Description | Exception Class | -| --- | --- | --- | -| 500 | Operation failed | [`ErrorResponseException`](../../doc/models/error-response-exception.md) | - - -# Restapi V2 Search Connection - -To get the details of a specific connection or all connections in the ThoughtSpot system use this end point. - -```java -CompletableFuture> restapiV2SearchConnectionAsync( - final TspublicRestV2ConnectionSearchRequest body) -``` - -## Parameters - -| Parameter | Type | Tags | Description | -| --- | --- | --- | --- | -| `body` | [`TspublicRestV2ConnectionSearchRequest`](../../doc/models/tspublic-rest-v2-connection-search-request.md) | Body, Required | - | - -## Response Type - -[`List`](../../doc/models/connection-response.md) - -## Example Usage - -```java -TspublicRestV2ConnectionSearchRequest body = new TspublicRestV2ConnectionSearchRequest(); -body.setType(Type15Enum.ORACLE_ADW); - -connectionController.restapiV2SearchConnectionAsync(body).thenAccept(result -> { - // TODO success callback handler -}).exceptionally(exception -> { - // TODO failure callback handler - return null; -}); -``` - -## Errors - -| HTTP Status Code | Error Description | Exception Class | -| --- | --- | --- | -| 500 | Operation failed | [`ErrorResponseException`](../../doc/models/error-response-exception.md) | - - -# Restapi V2 Get Connection Tables - -To get the details of tables from a connection, use this endpoint. - -You can get the details of tables in the data platform for the connection id provided. - -```java -CompletableFuture restapiV2GetConnectionTablesAsync( - final TspublicRestV2ConnectionTableRequest body) -``` - -## Parameters - -| Parameter | Type | Tags | Description | -| --- | --- | --- | --- | -| `body` | [`TspublicRestV2ConnectionTableRequest`](../../doc/models/tspublic-rest-v2-connection-table-request.md) | Body, Required | - | - -## Response Type - -[`ConnectionTableResponse`](../../doc/models/connection-table-response.md) - -## Example Usage - -```java -TspublicRestV2ConnectionTableRequest body = new TspublicRestV2ConnectionTableRequest(); -body.setId("id6"); - -connectionController.restapiV2GetConnectionTablesAsync(body).thenAccept(result -> { - // TODO success callback handler -}).exceptionally(exception -> { - // TODO failure callback handler - return null; -}); -``` - -## Errors - -| HTTP Status Code | Error Description | Exception Class | -| --- | --- | --- | -| 500 | Operation failed | [`ErrorResponseException`](../../doc/models/error-response-exception.md) | - - -# Restapi V2 Get Connection Table Columns - -To get the details of columns in a table associated to a connection, use this endpoint. - -You can get the columns of any table available in the data platform for the connection id provided. - -```java -CompletableFuture restapiV2GetConnectionTableColumnsAsync( - final TspublicRestV2ConnectionTablecoloumnRequest body) -``` - -## Parameters - -| Parameter | Type | Tags | Description | -| --- | --- | --- | --- | -| `body` | [`TspublicRestV2ConnectionTablecoloumnRequest`](../../doc/models/tspublic-rest-v2-connection-tablecoloumn-request.md) | Body, Required | - | - -## Response Type - -[`ConnectionTableColumnsResponse`](../../doc/models/connection-table-columns-response.md) - -## Example Usage - -```java -TspublicRestV2ConnectionTablecoloumnRequest body = new TspublicRestV2ConnectionTablecoloumnRequest(); -body.setId("id6"); -body.setTable(new LinkedList<>()); - -ConnectionTableColumnsInput bodyTable0 = new ConnectionTableColumnsInput(); -bodyTable0.setDbName("dbName8"); -bodyTable0.setSchemaName("schemaName4"); -bodyTable0.setName("name0"); -body.getTable().add(bodyTable0); - -ConnectionTableColumnsInput bodyTable1 = new ConnectionTableColumnsInput(); -bodyTable1.setDbName("dbName9"); -bodyTable1.setSchemaName("schemaName5"); -bodyTable1.setName("name1"); -body.getTable().add(bodyTable1); - -ConnectionTableColumnsInput bodyTable2 = new ConnectionTableColumnsInput(); -bodyTable2.setDbName("dbName0"); -bodyTable2.setSchemaName("schemaName6"); -bodyTable2.setName("name2"); -body.getTable().add(bodyTable2); - - -connectionController.restapiV2GetConnectionTableColumnsAsync(body).thenAccept(result -> { - // TODO success callback handler -}).exceptionally(exception -> { - // TODO failure callback handler - return null; -}); -``` - -## Errors - -| HTTP Status Code | Error Description | Exception Class | -| --- | --- | --- | -| 500 | Operation failed | [`ErrorResponseException`](../../doc/models/error-response-exception.md) | - diff --git a/Java/doc/controllers/custom-actions.md b/Java/doc/controllers/custom-actions.md deleted file mode 100644 index 461594eb7..000000000 --- a/Java/doc/controllers/custom-actions.md +++ /dev/null @@ -1,341 +0,0 @@ -# Custom Actions - -```java -CustomActionsController customActionsController = client.getCustomActionsController(); -``` - -## Class Name - -`CustomActionsController` - -## Methods - -* [Restapi V2 Get Custom Action](../../doc/controllers/custom-actions.md#restapi-v2-get-custom-action) -* [Restapi V2 Search Custom Action](../../doc/controllers/custom-actions.md#restapi-v2-search-custom-action) -* [Restapi V2 Get Custom Action Association](../../doc/controllers/custom-actions.md#restapi-v2-get-custom-action-association) -* [Restapi V2 Create Custom Action](../../doc/controllers/custom-actions.md#restapi-v2-create-custom-action) -* [Restapi V2 Update Custom Action](../../doc/controllers/custom-actions.md#restapi-v2-update-custom-action) -* [Restapi V2 Delete Custom Action](../../doc/controllers/custom-actions.md#restapi-v2-delete-custom-action) -* [Restapi V2 Update Custom Action Association](../../doc/controllers/custom-actions.md#restapi-v2-update-custom-action-association) -* [Restapi V2 Delete Custom Action Association](../../doc/controllers/custom-actions.md#restapi-v2-delete-custom-action-association) - - -# Restapi V2 Get Custom Action - -To get details of a specific custom action configured in the ThoughtSpot system, use this endpoint - -```java -CompletableFuture restapiV2GetCustomActionAsync( - final String id) -``` - -## Parameters - -| Parameter | Type | Tags | Description | -| --- | --- | --- | --- | -| `id` | `String` | Query, Required | GUID of the custom action | - -## Response Type - -`Object` - -## Example Usage - -```java -String id = "id0"; - -customActionsController.restapiV2GetCustomActionAsync(id).thenAccept(result -> { - // TODO success callback handler -}).exceptionally(exception -> { - // TODO failure callback handler - return null; -}); -``` - -## Errors - -| HTTP Status Code | Error Description | Exception Class | -| --- | --- | --- | -| 500 | Operation failed | [`ErrorResponseException`](../../doc/models/error-response-exception.md) | - - -# Restapi V2 Search Custom Action - -To search custom actions available on a ThoughtSpot instance, use this endpoint - -```java -CompletableFuture restapiV2SearchCustomActionAsync( - final TspublicRestV2CustomactionSearchRequest body) -``` - -## Parameters - -| Parameter | Type | Tags | Description | -| --- | --- | --- | --- | -| `body` | [`TspublicRestV2CustomactionSearchRequest`](../../doc/models/tspublic-rest-v2-customaction-search-request.md) | Body, Required | - | - -## Response Type - -`Object` - -## Example Usage - -```java -TspublicRestV2CustomactionSearchRequest body = new TspublicRestV2CustomactionSearchRequest(); - -customActionsController.restapiV2SearchCustomActionAsync(body).thenAccept(result -> { - // TODO success callback handler -}).exceptionally(exception -> { - // TODO failure callback handler - return null; -}); -``` - -## Errors - -| HTTP Status Code | Error Description | Exception Class | -| --- | --- | --- | -| 500 | Operation failed | [`ErrorResponseException`](../../doc/models/error-response-exception.md) | - - -# Restapi V2 Get Custom Action Association - -ThoughtSpot supports associating custom actions to Liveboards, answers, and worksheets. To get the details of the ThoughtSpot objects associated with a custom action, use this endpoint. - -```java -CompletableFuture restapiV2GetCustomActionAssociationAsync( - final String id) -``` - -## Parameters - -| Parameter | Type | Tags | Description | -| --- | --- | --- | --- | -| `id` | `String` | Query, Required | GUID of the custom action | - -## Response Type - -`Object` - -## Example Usage - -```java -String id = "id0"; - -customActionsController.restapiV2GetCustomActionAssociationAsync(id).thenAccept(result -> { - // TODO success callback handler -}).exceptionally(exception -> { - // TODO failure callback handler - return null; -}); -``` - -## Errors - -| HTTP Status Code | Error Description | Exception Class | -| --- | --- | --- | -| 500 | Operation failed | [`ErrorResponseException`](../../doc/models/error-response-exception.md) | - - -# Restapi V2 Create Custom Action - -To programmatically create custom actions on ThoughtSpot clusters that support embedding configuration, use this endpoint - -```java -CompletableFuture restapiV2CreateCustomActionAsync( - final TspublicRestV2CustomactionCreateRequest body) -``` - -## Parameters - -| Parameter | Type | Tags | Description | -| --- | --- | --- | --- | -| `body` | [`TspublicRestV2CustomactionCreateRequest`](../../doc/models/tspublic-rest-v2-customaction-create-request.md) | Body, Required | - | - -## Response Type - -`Object` - -## Example Usage - -```java -TspublicRestV2CustomactionCreateRequest body = new TspublicRestV2CustomactionCreateRequest(); -body.setConfiguration("configuration0"); - -customActionsController.restapiV2CreateCustomActionAsync(body).thenAccept(result -> { - // TODO success callback handler -}).exceptionally(exception -> { - // TODO failure callback handler - return null; -}); -``` - -## Errors - -| HTTP Status Code | Error Description | Exception Class | -| --- | --- | --- | -| 500 | Operation failed | [`ErrorResponseException`](../../doc/models/error-response-exception.md) | - - -# Restapi V2 Update Custom Action - -To programmatically edit an existing custom action, use this endpoint - -```java -CompletableFuture restapiV2UpdateCustomActionAsync( - final TspublicRestV2CustomactionUpdateRequest body) -``` - -## Parameters - -| Parameter | Type | Tags | Description | -| --- | --- | --- | --- | -| `body` | [`TspublicRestV2CustomactionUpdateRequest`](../../doc/models/tspublic-rest-v2-customaction-update-request.md) | Body, Required | - | - -## Response Type - -`Object` - -## Example Usage - -```java -TspublicRestV2CustomactionUpdateRequest body = new TspublicRestV2CustomactionUpdateRequest(); -body.setId("id6"); -body.setConfiguration("configuration0"); - -customActionsController.restapiV2UpdateCustomActionAsync(body).thenAccept(result -> { - // TODO success callback handler -}).exceptionally(exception -> { - // TODO failure callback handler - return null; -}); -``` - -## Errors - -| HTTP Status Code | Error Description | Exception Class | -| --- | --- | --- | -| 500 | Operation failed | [`ErrorResponseException`](../../doc/models/error-response-exception.md) | - - -# Restapi V2 Delete Custom Action - -To programmatically delete a custom action, use this endpoint - -```java -CompletableFuture restapiV2DeleteCustomActionAsync( - final String id) -``` - -## Parameters - -| Parameter | Type | Tags | Description | -| --- | --- | --- | --- | -| `id` | `String` | Query, Required | GUID of the custom action | - -## Response Type - -`Object` - -## Example Usage - -```java -String id = "id0"; - -customActionsController.restapiV2DeleteCustomActionAsync(id).thenAccept(result -> { - // TODO success callback handler -}).exceptionally(exception -> { - // TODO failure callback handler - return null; -}); -``` - -## Errors - -| HTTP Status Code | Error Description | Exception Class | -| --- | --- | --- | -| 500 | Operation failed | [`ErrorResponseException`](../../doc/models/error-response-exception.md) | - - -# Restapi V2 Update Custom Action Association - -To programmatically associate a custom action to a ThoughtSpot object, use this endpoint - -```java -CompletableFuture restapiV2UpdateCustomActionAssociationAsync( - final TspublicRestV2CustomactionAssociationUpdateRequest body) -``` - -## Parameters - -| Parameter | Type | Tags | Description | -| --- | --- | --- | --- | -| `body` | [`TspublicRestV2CustomactionAssociationUpdateRequest`](../../doc/models/tspublic-rest-v2-customaction-association-update-request.md) | Body, Required | - | - -## Response Type - -`Object` - -## Example Usage - -```java -TspublicRestV2CustomactionAssociationUpdateRequest body = new TspublicRestV2CustomactionAssociationUpdateRequest(); -body.setId("id6"); -body.setAssociation("association6"); - -customActionsController.restapiV2UpdateCustomActionAssociationAsync(body).thenAccept(result -> { - // TODO success callback handler -}).exceptionally(exception -> { - // TODO failure callback handler - return null; -}); -``` - -## Errors - -| HTTP Status Code | Error Description | Exception Class | -| --- | --- | --- | -| 500 | Operation failed | [`ErrorResponseException`](../../doc/models/error-response-exception.md) | - - -# Restapi V2 Delete Custom Action Association - -To remove custom action associations to ThoughtSpot objects, use this endpoint - -```java -CompletableFuture restapiV2DeleteCustomActionAssociationAsync( - final String id, - final String association) -``` - -## Parameters - -| Parameter | Type | Tags | Description | -| --- | --- | --- | --- | -| `id` | `String` | Query, Required | GUID of the custom action | -| `association` | `String` | Query, Required | A JSON map of the attributes with association of the action to ThoughtSpot object ID

Example:

{"id":"0dbd5b3a-84c1-4407-9803-cf07d67e6fcf","name":"My worksheet action","version":"v2","type":"URL","detail":{"link":"https://unpkg.com","function":"my-worksheet-action","authSelect":"NONE","authToken":"","encodeUser":"","apiKey":"X-API-KEY","apiValue":"","additionalUrlHeaders":"{}"},"actionAssociationMap":{"WORKSHEET":{"2b9d083a-275c-4984-9cfe-90b036affa17":{"enabled":"true","context":"PRIMARY"}}},"context":"NONE","availability":[ ],"userGroupList":["d0326b56-ef23-4c8a-8327-a30e99bcc72b"]} | - -## Response Type - -`Object` - -## Example Usage - -```java -String id = "id0"; -String association = "association0"; - -customActionsController.restapiV2DeleteCustomActionAssociationAsync(id, association).thenAccept(result -> { - // TODO success callback handler -}).exceptionally(exception -> { - // TODO failure callback handler - return null; -}); -``` - -## Errors - -| HTTP Status Code | Error Description | Exception Class | -| --- | --- | --- | -| 500 | Operation failed | [`ErrorResponseException`](../../doc/models/error-response-exception.md) | - diff --git a/Java/doc/controllers/data.md b/Java/doc/controllers/data.md deleted file mode 100644 index b5b15f4f8..000000000 --- a/Java/doc/controllers/data.md +++ /dev/null @@ -1,218 +0,0 @@ -# Data - -```java -DataController dataController = client.getDataController(); -``` - -## Class Name - -`DataController` - -## Methods - -* [Restapi V2 Search Query Data](../../doc/controllers/data.md#restapi-v2-search-query-data) -* [Restapi V2 Liveboard Data](../../doc/controllers/data.md#restapi-v2-liveboard-data) -* [Restapi V2 Answer Data](../../doc/controllers/data.md#restapi-v2-answer-data) -* [Restapi V2 Answer Query Sql](../../doc/controllers/data.md#restapi-v2-answer-query-sql) -* [Restapi V2 Liveboard Query Sql](../../doc/controllers/data.md#restapi-v2-liveboard-query-sql) - - -# Restapi V2 Search Query Data - -To programmatically retrieve data from ThoughtSpot using search query string, use this endpoint - -```java -CompletableFuture restapiV2SearchQueryDataAsync( - final TspublicRestV2DataSearchRequest body) -``` - -## Parameters - -| Parameter | Type | Tags | Description | -| --- | --- | --- | --- | -| `body` | [`TspublicRestV2DataSearchRequest`](../../doc/models/tspublic-rest-v2-data-search-request.md) | Body, Required | - | - -## Response Type - -`Object` - -## Example Usage - -```java -TspublicRestV2DataSearchRequest body = new TspublicRestV2DataSearchRequest(); -body.setQueryString("queryString0"); -body.setDataObjectId("dataObjectId6"); - -dataController.restapiV2SearchQueryDataAsync(body).thenAccept(result -> { - // TODO success callback handler -}).exceptionally(exception -> { - // TODO failure callback handler - return null; -}); -``` - -## Errors - -| HTTP Status Code | Error Description | Exception Class | -| --- | --- | --- | -| 500 | Operation failed | [`ErrorResponseException`](../../doc/models/error-response-exception.md) | - - -# Restapi V2 Liveboard Data - -To retrieve data related to a Liveboard or visualization from the ThoughtSpot system, you can use this endpoint - -```java -CompletableFuture restapiV2LiveboardDataAsync( - final TspublicRestV2DataLiveboardRequest body) -``` - -## Parameters - -| Parameter | Type | Tags | Description | -| --- | --- | --- | --- | -| `body` | [`TspublicRestV2DataLiveboardRequest`](../../doc/models/tspublic-rest-v2-data-liveboard-request.md) | Body, Required | - | - -## Response Type - -`Object` - -## Example Usage - -```java -TspublicRestV2DataLiveboardRequest body = new TspublicRestV2DataLiveboardRequest(); - -dataController.restapiV2LiveboardDataAsync(body).thenAccept(result -> { - // TODO success callback handler -}).exceptionally(exception -> { - // TODO failure callback handler - return null; -}); -``` - -## Errors - -| HTTP Status Code | Error Description | Exception Class | -| --- | --- | --- | -| 500 | Operation failed | [`ErrorResponseException`](../../doc/models/error-response-exception.md) | - - -# Restapi V2 Answer Data - -To retrieve data related to a Answer from the ThoughtSpot system, you can use this endpoint - -```java -CompletableFuture restapiV2AnswerDataAsync( - final TspublicRestV2DataAnswerRequest body) -``` - -## Parameters - -| Parameter | Type | Tags | Description | -| --- | --- | --- | --- | -| `body` | [`TspublicRestV2DataAnswerRequest`](../../doc/models/tspublic-rest-v2-data-answer-request.md) | Body, Required | - | - -## Response Type - -`Object` - -## Example Usage - -```java -TspublicRestV2DataAnswerRequest body = new TspublicRestV2DataAnswerRequest(); -body.setId("id6"); - -dataController.restapiV2AnswerDataAsync(body).thenAccept(result -> { - // TODO success callback handler -}).exceptionally(exception -> { - // TODO failure callback handler - return null; -}); -``` - -## Errors - -| HTTP Status Code | Error Description | Exception Class | -| --- | --- | --- | -| 500 | Operation failed | [`ErrorResponseException`](../../doc/models/error-response-exception.md) | - - -# Restapi V2 Answer Query Sql - -To retrieve the query SQL related to an Answer that is run on the data platform, you can use this endpoint - -```java -CompletableFuture restapiV2AnswerQuerySqlAsync( - final String id) -``` - -## Parameters - -| Parameter | Type | Tags | Description | -| --- | --- | --- | --- | -| `id` | `String` | Query, Required | The GUID of the Answer | - -## Response Type - -[`AnswerQueryResponse`](../../doc/models/answer-query-response.md) - -## Example Usage - -```java -String id = "id0"; - -dataController.restapiV2AnswerQuerySqlAsync(id).thenAccept(result -> { - // TODO success callback handler -}).exceptionally(exception -> { - // TODO failure callback handler - return null; -}); -``` - -## Errors - -| HTTP Status Code | Error Description | Exception Class | -| --- | --- | --- | -| 500 | Operation failed | [`ErrorResponseException`](../../doc/models/error-response-exception.md) | - - -# Restapi V2 Liveboard Query Sql - -To retrieve the query SQL related to a Visualization in a Liveboard that is run on the data platform, you can use this endpoint - -```java -CompletableFuture restapiV2LiveboardQuerySqlAsync( - final String id, - final List vizId) -``` - -## Parameters - -| Parameter | Type | Tags | Description | -| --- | --- | --- | --- | -| `id` | `String` | Query, Required | The GUID of the Answer | -| `vizId` | `List` | Query, Optional | A JSON array of GUIDs of the visualizations in the Liveboard. | - -## Response Type - -[`LiveboardQueryResponse`](../../doc/models/liveboard-query-response.md) - -## Example Usage - -```java -String id = "id0"; - -dataController.restapiV2LiveboardQuerySqlAsync(id, null).thenAccept(result -> { - // TODO success callback handler -}).exceptionally(exception -> { - // TODO failure callback handler - return null; -}); -``` - -## Errors - -| HTTP Status Code | Error Description | Exception Class | -| --- | --- | --- | -| 500 | Operation failed | [`ErrorResponseException`](../../doc/models/error-response-exception.md) | - diff --git a/Java/doc/controllers/database.md b/Java/doc/controllers/database.md deleted file mode 100644 index 587526109..000000000 --- a/Java/doc/controllers/database.md +++ /dev/null @@ -1,226 +0,0 @@ -# Database - -```java -DatabaseController databaseController = client.getDatabaseController(); -``` - -## Class Name - -`DatabaseController` - -## Methods - -* [Restapi V2 Get Schemas](../../doc/controllers/database.md#restapi-v2-get-schemas) -* [Restapi V2 Get Tables](../../doc/controllers/database.md#restapi-v2-get-tables) -* [Restapi V2 Get Table Details](../../doc/controllers/database.md#restapi-v2-get-table-details) -* [Restapi V2 Create Table](../../doc/controllers/database.md#restapi-v2-create-table) -* [Restapi V2 Run Query](../../doc/controllers/database.md#restapi-v2-run-query) - - -# Restapi V2 Get Schemas - -To list all the schemas in a database in Falcon, use this endpoint. - -```java -CompletableFuture> restapiV2GetSchemasAsync( - final String database) -``` - -## Parameters - -| Parameter | Type | Tags | Description | -| --- | --- | --- | --- | -| `database` | `String` | Query, Required | Name of the Falcon database | - -## Response Type - -`List` - -## Example Usage - -```java -String database = "database0"; - -databaseController.restapiV2GetSchemasAsync(database).thenAccept(result -> { - // TODO success callback handler -}).exceptionally(exception -> { - // TODO failure callback handler - return null; -}); -``` - -## Errors - -| HTTP Status Code | Error Description | Exception Class | -| --- | --- | --- | -| 500 | Operation failed | [`ErrorResponseException`](../../doc/models/error-response-exception.md) | - - -# Restapi V2 Get Tables - -To list all the tables in a schema of a database in Falcon, use this endpoint. - -```java -CompletableFuture> restapiV2GetTablesAsync( - final String database, - final String schema) -``` - -## Parameters - -| Parameter | Type | Tags | Description | -| --- | --- | --- | --- | -| `database` | `String` | Query, Required | Name of the Falcon database | -| `schema` | `String` | Query, Required | Name of the schema in Falcon database | - -## Response Type - -`List` - -## Example Usage - -```java -String database = "database0"; -String schema = "schema2"; - -databaseController.restapiV2GetTablesAsync(database, schema).thenAccept(result -> { - // TODO success callback handler -}).exceptionally(exception -> { - // TODO failure callback handler - return null; -}); -``` - -## Errors - -| HTTP Status Code | Error Description | Exception Class | -| --- | --- | --- | -| 500 | Operation failed | [`ErrorResponseException`](../../doc/models/error-response-exception.md) | - - -# Restapi V2 Get Table Details - -Note: This endpoint is applicable only for on-prem deployments. - -To provide details of a table in a schema of a database in Falcon, use this endpoint. - -```java -CompletableFuture restapiV2GetTableDetailsAsync( - final String database, - final String table, - final String schema) -``` - -## Parameters - -| Parameter | Type | Tags | Description | -| --- | --- | --- | --- | -| `database` | `String` | Query, Required | Name of the Falcon database | -| `table` | `String` | Query, Required | Name of the table in Falcon database | -| `schema` | `String` | Query, Optional | Name of the schema in Falcon database | - -## Response Type - -`Object` - -## Example Usage - -```java -String database = "database0"; -String table = "table2"; - -databaseController.restapiV2GetTableDetailsAsync(database, table, null).thenAccept(result -> { - // TODO success callback handler -}).exceptionally(exception -> { - // TODO failure callback handler - return null; -}); -``` - -## Errors - -| HTTP Status Code | Error Description | Exception Class | -| --- | --- | --- | -| 500 | Operation failed | [`ErrorResponseException`](../../doc/models/error-response-exception.md) | - - -# Restapi V2 Create Table - -To create a table in Falcon, use this endpoint. - -```java -CompletableFuture restapiV2CreateTableAsync( - final TspublicRestV2DatabaseTableCreateRequest body) -``` - -## Parameters - -| Parameter | Type | Tags | Description | -| --- | --- | --- | --- | -| `body` | [`TspublicRestV2DatabaseTableCreateRequest`](../../doc/models/tspublic-rest-v2-database-table-create-request.md) | Body, Required | - | - -## Response Type - -[`CreateTableResponse`](../../doc/models/create-table-response.md) - -## Example Usage - -```java -TspublicRestV2DatabaseTableCreateRequest body = new TspublicRestV2DatabaseTableCreateRequest(); - -databaseController.restapiV2CreateTableAsync(body).thenAccept(result -> { - // TODO success callback handler -}).exceptionally(exception -> { - // TODO failure callback handler - return null; -}); -``` - -## Errors - -| HTTP Status Code | Error Description | Exception Class | -| --- | --- | --- | -| 500 | Operation failed | [`ErrorResponseException`](../../doc/models/error-response-exception.md) | - - -# Restapi V2 Run Query - -To run a TQL statement in Falcon, use this endpoint. You can run only following type of statements - Table DDL alter and Table rows update and delete. - -```java -CompletableFuture> restapiV2RunQueryAsync( - final TspublicRestV2DatabaseTableRunqueryRequest body) -``` - -## Parameters - -| Parameter | Type | Tags | Description | -| --- | --- | --- | --- | -| `body` | [`TspublicRestV2DatabaseTableRunqueryRequest`](../../doc/models/tspublic-rest-v2-database-table-runquery-request.md) | Body, Required | - | - -## Response Type - -`List` - -## Example Usage - -```java -TspublicRestV2DatabaseTableRunqueryRequest body = new TspublicRestV2DatabaseTableRunqueryRequest(); -body.setStatement(new LinkedList<>()); -body.getStatement().add("statement6"); -body.getStatement().add("statement7"); - -databaseController.restapiV2RunQueryAsync(body).thenAccept(result -> { - // TODO success callback handler -}).exceptionally(exception -> { - // TODO failure callback handler - return null; -}); -``` - -## Errors - -| HTTP Status Code | Error Description | Exception Class | -| --- | --- | --- | -| 500 | Operation failed | [`ErrorResponseException`](../../doc/models/error-response-exception.md) | - diff --git a/Java/doc/controllers/group.md b/Java/doc/controllers/group.md deleted file mode 100644 index db4057af7..000000000 --- a/Java/doc/controllers/group.md +++ /dev/null @@ -1,480 +0,0 @@ -# Group - -```java -GroupController groupController = client.getGroupController(); -``` - -## Class Name - -`GroupController` - -## Methods - -* [Restapi V2 Get Group](../../doc/controllers/group.md#restapi-v2-get-group) -* [Restapi V2 Create Group](../../doc/controllers/group.md#restapi-v2-create-group) -* [Restapi V2 Update Group](../../doc/controllers/group.md#restapi-v2-update-group) -* [Restapi V2 Delete Group](../../doc/controllers/group.md#restapi-v2-delete-group) -* [Restapi V2 Add Privileges to Group](../../doc/controllers/group.md#restapi-v2-add-privileges-to-group) -* [Restapi V2 Remove Privileges From Group](../../doc/controllers/group.md#restapi-v2-remove-privileges-from-group) -* [Restapi V2 Add Users to Group](../../doc/controllers/group.md#restapi-v2-add-users-to-group) -* [Restapi V2 Remove Users From Group](../../doc/controllers/group.md#restapi-v2-remove-users-from-group) -* [Restapi V2 Add Groups to Group](../../doc/controllers/group.md#restapi-v2-add-groups-to-group) -* [Restapi V2 Remove Groups From Group](../../doc/controllers/group.md#restapi-v2-remove-groups-from-group) -* [Restapi V2 Search Groups](../../doc/controllers/group.md#restapi-v2-search-groups) - - -# Restapi V2 Get Group - -To get the details of a specific group by name or id, use this endpoint. -At Least one value needed. When both are given id will be considered to fetch user information. - -```java -CompletableFuture restapiV2GetGroupAsync( - final String name, - final String id) -``` - -## Parameters - -| Parameter | Type | Tags | Description | -| --- | --- | --- | --- | -| `name` | `String` | Query, Optional | Name of the group | -| `id` | `String` | Query, Optional | The GUID of the group to query. | - -## Response Type - -[`GroupResponse`](../../doc/models/group-response.md) - -## Example Usage - -```java -groupController.restapiV2GetGroupAsync(null, null).thenAccept(result -> { - // TODO success callback handler -}).exceptionally(exception -> { - // TODO failure callback handler - return null; -}); -``` - -## Errors - -| HTTP Status Code | Error Description | Exception Class | -| --- | --- | --- | -| 500 | Operation failed | [`ErrorResponseException`](../../doc/models/error-response-exception.md) | - - -# Restapi V2 Create Group - -To programmatically create a group in the ThoughtSpot system, use this API endpoint. Using this API, you can create a group and assign privileges and users. For ease of user management and access control, ThoughtSpot administrators can create groups and assign privileges to these groups. The privileges determine the actions that the users belonging to a group are allowed to do. ThoughtSpot also has a default group called ALL_GROUP. When you create new group in ThoughtSpot, they are automatically added to ALL_GROUP. You cannot delete the ALL_GROUP or remove members from it. - -```java -CompletableFuture restapiV2CreateGroupAsync( - final TspublicRestV2GroupCreateRequest body) -``` - -## Parameters - -| Parameter | Type | Tags | Description | -| --- | --- | --- | --- | -| `body` | [`TspublicRestV2GroupCreateRequest`](../../doc/models/tspublic-rest-v2-group-create-request.md) | Body, Required | - | - -## Response Type - -[`GroupResponse`](../../doc/models/group-response.md) - -## Example Usage - -```java -TspublicRestV2GroupCreateRequest body = new TspublicRestV2GroupCreateRequest(); -body.setName("name6"); -body.setDisplayName("displayName6"); - -groupController.restapiV2CreateGroupAsync(body).thenAccept(result -> { - // TODO success callback handler -}).exceptionally(exception -> { - // TODO failure callback handler - return null; -}); -``` - -## Errors - -| HTTP Status Code | Error Description | Exception Class | -| --- | --- | --- | -| 500 | Operation failed | [`ErrorResponseException`](../../doc/models/error-response-exception.md) | - - -# Restapi V2 Update Group - -You can use this endpoint to programmatically modify an existing user account. -To modify a user, you require admin user privileges. -At least one of User Id or username is mandatory. When both are given, then user id will be considered and username will be updated - -```java -CompletableFuture restapiV2UpdateGroupAsync( - final TspublicRestV2GroupUpdateRequest body) -``` - -## Parameters - -| Parameter | Type | Tags | Description | -| --- | --- | --- | --- | -| `body` | [`TspublicRestV2GroupUpdateRequest`](../../doc/models/tspublic-rest-v2-group-update-request.md) | Body, Required | - | - -## Response Type - -`boolean` - -## Example Usage - -```java -TspublicRestV2GroupUpdateRequest body = new TspublicRestV2GroupUpdateRequest(); - -groupController.restapiV2UpdateGroupAsync(body).thenAccept(result -> { - // TODO success callback handler -}).exceptionally(exception -> { - // TODO failure callback handler - return null; -}); -``` - -## Errors - -| HTTP Status Code | Error Description | Exception Class | -| --- | --- | --- | -| 500 | Operation failed | [`ErrorResponseException`](../../doc/models/error-response-exception.md) | - - -# Restapi V2 Delete Group - -To remove a group from the ThoughtSpot system, send a DELETE request to this endpoint. At Least one value needed. When both are given user id will be considered to fetch user information. - -```java -CompletableFuture restapiV2DeleteGroupAsync( - final String name, - final String id) -``` - -## Parameters - -| Parameter | Type | Tags | Description | -| --- | --- | --- | --- | -| `name` | `String` | Query, Optional | Name of the group. | -| `id` | `String` | Query, Optional | The GUID of the group | - -## Response Type - -`boolean` - -## Example Usage - -```java -groupController.restapiV2DeleteGroupAsync(null, null).thenAccept(result -> { - // TODO success callback handler -}).exceptionally(exception -> { - // TODO failure callback handler - return null; -}); -``` - -## Errors - -| HTTP Status Code | Error Description | Exception Class | -| --- | --- | --- | -| 500 | Operation failed | [`ErrorResponseException`](../../doc/models/error-response-exception.md) | - - -# Restapi V2 Add Privileges to Group - -To programmatically add privileges to an existing group, use API endpoint. -When you assign privileges to a group, all the users under to this group inherits the privileges assigned to that group. -At least one of id or name of group is required. When both are given user id will be considered. - -```java -CompletableFuture restapiV2AddPrivilegesToGroupAsync( - final TspublicRestV2GroupAddprivilegeRequest body) -``` - -## Parameters - -| Parameter | Type | Tags | Description | -| --- | --- | --- | --- | -| `body` | [`TspublicRestV2GroupAddprivilegeRequest`](../../doc/models/tspublic-rest-v2-group-addprivilege-request.md) | Body, Required | - | - -## Response Type - -`boolean` - -## Example Usage - -```java -TspublicRestV2GroupAddprivilegeRequest body = new TspublicRestV2GroupAddprivilegeRequest(); - -groupController.restapiV2AddPrivilegesToGroupAsync(body).thenAccept(result -> { - // TODO success callback handler -}).exceptionally(exception -> { - // TODO failure callback handler - return null; -}); -``` - -## Errors - -| HTTP Status Code | Error Description | Exception Class | -| --- | --- | --- | -| 500 | Operation failed | [`ErrorResponseException`](../../doc/models/error-response-exception.md) | - - -# Restapi V2 Remove Privileges From Group - -To programmatically remove privileges from a group, use API endpoint. The API removes only the privilege association. It does not delete the privilege or group from the Thoughtspot system. At least one of id or name of group is required. When both are given user id will be considered. - -```java -CompletableFuture restapiV2RemovePrivilegesFromGroupAsync( - final TspublicRestV2GroupRemoveprivilegeRequest body) -``` - -## Parameters - -| Parameter | Type | Tags | Description | -| --- | --- | --- | --- | -| `body` | [`TspublicRestV2GroupRemoveprivilegeRequest`](../../doc/models/tspublic-rest-v2-group-removeprivilege-request.md) | Body, Required | - | - -## Response Type - -`boolean` - -## Example Usage - -```java -TspublicRestV2GroupRemoveprivilegeRequest body = new TspublicRestV2GroupRemoveprivilegeRequest(); - -groupController.restapiV2RemovePrivilegesFromGroupAsync(body).thenAccept(result -> { - // TODO success callback handler -}).exceptionally(exception -> { - // TODO failure callback handler - return null; -}); -``` - -## Errors - -| HTTP Status Code | Error Description | Exception Class | -| --- | --- | --- | -| 500 | Operation failed | [`ErrorResponseException`](../../doc/models/error-response-exception.md) | - - -# Restapi V2 Add Users to Group - -To programmatically add existing ThoughtSpot users to a group, use this API endpoint. When you assign users to a group, the users inherits the privileges assigned to that group. At least one of id or name of the group is required. When both are given user id will be considered. - -```java -CompletableFuture restapiV2AddUsersToGroupAsync( - final TspublicRestV2GroupAdduserRequest body) -``` - -## Parameters - -| Parameter | Type | Tags | Description | -| --- | --- | --- | --- | -| `body` | [`TspublicRestV2GroupAdduserRequest`](../../doc/models/tspublic-rest-v2-group-adduser-request.md) | Body, Required | - | - -## Response Type - -`boolean` - -## Example Usage - -```java -TspublicRestV2GroupAdduserRequest body = new TspublicRestV2GroupAdduserRequest(); -body.setUsers(new LinkedList<>()); - -UserNameAndIDInput bodyUsers0 = new UserNameAndIDInput(); -body.getUsers().add(bodyUsers0); - - -groupController.restapiV2AddUsersToGroupAsync(body).thenAccept(result -> { - // TODO success callback handler -}).exceptionally(exception -> { - // TODO failure callback handler - return null; -}); -``` - -## Errors - -| HTTP Status Code | Error Description | Exception Class | -| --- | --- | --- | -| 500 | Operation failed | [`ErrorResponseException`](../../doc/models/error-response-exception.md) | - - -# Restapi V2 Remove Users From Group - -To programmatically remove users from a group, use API endpoint.The API removes only the user association. It does not delete the users or group from the Thoughtspot system. At least one of id or name of group is required. When both are given user id will be considered. - -```java -CompletableFuture restapiV2RemoveUsersFromGroupAsync( - final TspublicRestV2GroupRemoveuserRequest body) -``` - -## Parameters - -| Parameter | Type | Tags | Description | -| --- | --- | --- | --- | -| `body` | [`TspublicRestV2GroupRemoveuserRequest`](../../doc/models/tspublic-rest-v2-group-removeuser-request.md) | Body, Required | - | - -## Response Type - -`boolean` - -## Example Usage - -```java -TspublicRestV2GroupRemoveuserRequest body = new TspublicRestV2GroupRemoveuserRequest(); -body.setUsers(new LinkedList<>()); - -UserNameAndIDInput bodyUsers0 = new UserNameAndIDInput(); -body.getUsers().add(bodyUsers0); - - -groupController.restapiV2RemoveUsersFromGroupAsync(body).thenAccept(result -> { - // TODO success callback handler -}).exceptionally(exception -> { - // TODO failure callback handler - return null; -}); -``` - -## Errors - -| HTTP Status Code | Error Description | Exception Class | -| --- | --- | --- | -| 500 | Operation failed | [`ErrorResponseException`](../../doc/models/error-response-exception.md) | - - -# Restapi V2 Add Groups to Group - -To programmatically add existing groups to a group, use API endpoint. When you assign groups to a group, the group inherits the privileges assigned to those groups. At least one of id or name of group is required. When both are given user id will be considered. - -```java -CompletableFuture restapiV2AddGroupsToGroupAsync( - final TspublicRestV2GroupAddgroupRequest body) -``` - -## Parameters - -| Parameter | Type | Tags | Description | -| --- | --- | --- | --- | -| `body` | [`TspublicRestV2GroupAddgroupRequest`](../../doc/models/tspublic-rest-v2-group-addgroup-request.md) | Body, Required | - | - -## Response Type - -`boolean` - -## Example Usage - -```java -TspublicRestV2GroupAddgroupRequest body = new TspublicRestV2GroupAddgroupRequest(); -body.setGroups(new LinkedList<>()); - -GroupNameAndIDInput bodyGroups0 = new GroupNameAndIDInput(); -body.getGroups().add(bodyGroups0); - - -groupController.restapiV2AddGroupsToGroupAsync(body).thenAccept(result -> { - // TODO success callback handler -}).exceptionally(exception -> { - // TODO failure callback handler - return null; -}); -``` - -## Errors - -| HTTP Status Code | Error Description | Exception Class | -| --- | --- | --- | -| 500 | Operation failed | [`ErrorResponseException`](../../doc/models/error-response-exception.md) | - - -# Restapi V2 Remove Groups From Group - -To programmatically remove groups from a group, use API endpoint.The API removes only the group association. It does not delete the group from the Thoughtspot system. At least one of id or name of group is required. When both are given user id will be considered. - -```java -CompletableFuture restapiV2RemoveGroupsFromGroupAsync( - final TspublicRestV2GroupRemovegroupRequest body) -``` - -## Parameters - -| Parameter | Type | Tags | Description | -| --- | --- | --- | --- | -| `body` | [`TspublicRestV2GroupRemovegroupRequest`](../../doc/models/tspublic-rest-v2-group-removegroup-request.md) | Body, Required | - | - -## Response Type - -`boolean` - -## Example Usage - -```java -TspublicRestV2GroupRemovegroupRequest body = new TspublicRestV2GroupRemovegroupRequest(); -body.setGroups(new LinkedList<>()); - -GroupNameAndIDInput bodyGroups0 = new GroupNameAndIDInput(); -body.getGroups().add(bodyGroups0); - - -groupController.restapiV2RemoveGroupsFromGroupAsync(body).thenAccept(result -> { - // TODO success callback handler -}).exceptionally(exception -> { - // TODO failure callback handler - return null; -}); -``` - -## Errors - -| HTTP Status Code | Error Description | Exception Class | -| --- | --- | --- | -| 500 | Operation failed | [`ErrorResponseException`](../../doc/models/error-response-exception.md) | - - -# Restapi V2 Search Groups - -To get the details of a specific group account or all groups in the ThoughtSpot system, use this end point. - -```java -CompletableFuture restapiV2SearchGroupsAsync( - final TspublicRestV2GroupSearchRequest body) -``` - -## Parameters - -| Parameter | Type | Tags | Description | -| --- | --- | --- | --- | -| `body` | [`TspublicRestV2GroupSearchRequest`](../../doc/models/tspublic-rest-v2-group-search-request.md) | Body, Required | - | - -## Response Type - -`Object` - -## Example Usage - -```java -TspublicRestV2GroupSearchRequest body = new TspublicRestV2GroupSearchRequest(); - -groupController.restapiV2SearchGroupsAsync(body).thenAccept(result -> { - // TODO success callback handler -}).exceptionally(exception -> { - // TODO failure callback handler - return null; -}); -``` - -## Errors - -| HTTP Status Code | Error Description | Exception Class | -| --- | --- | --- | -| 500 | Operation failed | [`ErrorResponseException`](../../doc/models/error-response-exception.md) | - diff --git a/Java/doc/controllers/logs.md b/Java/doc/controllers/logs.md deleted file mode 100644 index 903d6765b..000000000 --- a/Java/doc/controllers/logs.md +++ /dev/null @@ -1,61 +0,0 @@ -# Logs - -```java -LogsController logsController = client.getLogsController(); -``` - -## Class Name - -`LogsController` - - -# Restapi V2 Get Log Events - -Note: This endpoint is applicable only for SAAS deployments. - -The ThoughtSpot log streaming service API allows you to programmatically get a security audit event log from the ThoughtSpot system. - -To use this API, make sure you have admin user privileges. - -ThoughtSpot cloud deployments allow you to collect security audit events and send them to your Security information and event management (SIEM) application in real-time. - -These events can help your security operations personnel to detect potential security threats or compromised user accounts in your organization. - -```java -CompletableFuture restapiV2GetLogEventsAsync( - final TopicEnum topic, - final String fromEpoch, - final String toEpoch) -``` - -## Parameters - -| Parameter | Type | Tags | Description | -| --- | --- | --- | --- | -| `topic` | [`TopicEnum`](../../doc/models/topic-enum.md) | Query, Required | Type of the log | -| `fromEpoch` | `String` | Query, Optional | The EPOCH time in milliseconds to set the start time for streaming logs.

Example: To set the timestamp as June 1, 2021 8 am, specify 1622534400000. | -| `toEpoch` | `String` | Query, Optional | The EPOCH time in milliseconds to set the end time for streaming logs.

Example: To set the timestamp as July 1, 2021, 8 am, specify 1625126400000. | - -## Response Type - -[`LogsResponse`](../../doc/models/logs-response.md) - -## Example Usage - -```java -TopicEnum topic = TopicEnum.SECURITY_LOGS; - -logsController.restapiV2GetLogEventsAsync(topic, null, null).thenAccept(result -> { - // TODO success callback handler -}).exceptionally(exception -> { - // TODO failure callback handler - return null; -}); -``` - -## Errors - -| HTTP Status Code | Error Description | Exception Class | -| --- | --- | --- | -| 500 | Operation failed | [`ErrorResponseException`](../../doc/models/error-response-exception.md) | - diff --git a/Java/doc/controllers/materialization.md b/Java/doc/controllers/materialization.md deleted file mode 100644 index c74291e6a..000000000 --- a/Java/doc/controllers/materialization.md +++ /dev/null @@ -1,50 +0,0 @@ -# Materialization - -```java -MaterializationController materializationController = client.getMaterializationController(); -``` - -## Class Name - -`MaterializationController` - - -# Restapi V2 Refresh Materialized View - -Use this endpoint to refresh data in the materialized view by running the query associated with it - -```java -CompletableFuture restapiV2RefreshMaterializedViewAsync( - final TspublicRestV2MaterializationRefreshviewRequest body) -``` - -## Parameters - -| Parameter | Type | Tags | Description | -| --- | --- | --- | --- | -| `body` | [`TspublicRestV2MaterializationRefreshviewRequest`](../../doc/models/tspublic-rest-v2-materialization-refreshview-request.md) | Body, Required | - | - -## Response Type - -`Object` - -## Example Usage - -```java -TspublicRestV2MaterializationRefreshviewRequest body = new TspublicRestV2MaterializationRefreshviewRequest(); -body.setId("id6"); - -materializationController.restapiV2RefreshMaterializedViewAsync(body).thenAccept(result -> { - // TODO success callback handler -}).exceptionally(exception -> { - // TODO failure callback handler - return null; -}); -``` - -## Errors - -| HTTP Status Code | Error Description | Exception Class | -| --- | --- | --- | -| 500 | Operation failed | [`ErrorResponseException`](../../doc/models/error-response-exception.md) | - diff --git a/Java/doc/controllers/metadata.md b/Java/doc/controllers/metadata.md deleted file mode 100644 index c60622da7..000000000 --- a/Java/doc/controllers/metadata.md +++ /dev/null @@ -1,910 +0,0 @@ -# Metadata - -```java -MetadataController metadataController = client.getMetadataController(); -``` - -## Class Name - -`MetadataController` - -## Methods - -* [Restapi V2 Get Tag](../../doc/controllers/metadata.md#restapi-v2-get-tag) -* [Restapi V2 Get Home Liveboard](../../doc/controllers/metadata.md#restapi-v2-get-home-liveboard) -* [Restapi V2 Search Object Header](../../doc/controllers/metadata.md#restapi-v2-search-object-header) -* [Restapi V2 Get Object Visualization Header](../../doc/controllers/metadata.md#restapi-v2-get-object-visualization-header) -* [Restapi V2 Get Object Detail](../../doc/controllers/metadata.md#restapi-v2-get-object-detail) -* [Restapi V2 Get Object Header](../../doc/controllers/metadata.md#restapi-v2-get-object-header) -* [Restapi V2 Search Object Detail](../../doc/controllers/metadata.md#restapi-v2-search-object-detail) -* [Restapi V2 Create Tag](../../doc/controllers/metadata.md#restapi-v2-create-tag) -* [Restapi V2 Update Tag](../../doc/controllers/metadata.md#restapi-v2-update-tag) -* [Restapi V2 Delete Tag](../../doc/controllers/metadata.md#restapi-v2-delete-tag) -* [Restapi V2 Assign Tag](../../doc/controllers/metadata.md#restapi-v2-assign-tag) -* [Restapi V2 Unassign Tag](../../doc/controllers/metadata.md#restapi-v2-unassign-tag) -* [Restapi V2 Assign Favorite](../../doc/controllers/metadata.md#restapi-v2-assign-favorite) -* [Restapi V2 Unassign Favorite](../../doc/controllers/metadata.md#restapi-v2-unassign-favorite) -* [Restapi V2 Assign Home Liveboard](../../doc/controllers/metadata.md#restapi-v2-assign-home-liveboard) -* [Restapi V2 Unassign Home Liveboard](../../doc/controllers/metadata.md#restapi-v2-unassign-home-liveboard) -* [Restapi V2 Export Object TML](../../doc/controllers/metadata.md#restapi-v2-export-object-tml) -* [Restapi V2 Import Object TML](../../doc/controllers/metadata.md#restapi-v2-import-object-tml) -* [Restapi V2 Delete Object](../../doc/controllers/metadata.md#restapi-v2-delete-object) -* [Restapi V2 Get Object Dependency](../../doc/controllers/metadata.md#restapi-v2-get-object-dependency) - - -# Restapi V2 Get Tag - -To get details of a specific tag, use this endpoint. At least one of id or name of tag is required. When both are given, then id will be considered. - -```java -CompletableFuture restapiV2GetTagAsync( - final String name, - final String id) -``` - -## Parameters - -| Parameter | Type | Tags | Description | -| --- | --- | --- | --- | -| `name` | `String` | Query, Optional | Name of the tag | -| `id` | `String` | Query, Optional | The GUID of the tag | - -## Response Type - -[`MetadataTagResponse`](../../doc/models/metadata-tag-response.md) - -## Example Usage - -```java -metadataController.restapiV2GetTagAsync(null, null).thenAccept(result -> { - // TODO success callback handler -}).exceptionally(exception -> { - // TODO failure callback handler - return null; -}); -``` - -## Errors - -| HTTP Status Code | Error Description | Exception Class | -| --- | --- | --- | -| 500 | Operation failed | [`ErrorResponseException`](../../doc/models/error-response-exception.md) | - - -# Restapi V2 Get Home Liveboard - -To get the name and id of liveboard that is set as a home liveboard for a user, use this endpoint. At least one of user id or username is required. When both are given, then id will be considered. - -```java -CompletableFuture restapiV2GetHomeLiveboardAsync( - final String userName, - final String userId) -``` - -## Parameters - -| Parameter | Type | Tags | Description | -| --- | --- | --- | --- | -| `userName` | `String` | Query, Optional | Name of the tag | -| `userId` | `String` | Query, Optional | The GUID of the tag | - -## Response Type - -[`HomeLiveboardResponse`](../../doc/models/home-liveboard-response.md) - -## Example Usage - -```java -metadataController.restapiV2GetHomeLiveboardAsync(null, null).thenAccept(result -> { - // TODO success callback handler -}).exceptionally(exception -> { - // TODO failure callback handler - return null; -}); -``` - -## Errors - -| HTTP Status Code | Error Description | Exception Class | -| --- | --- | --- | -| 500 | Operation failed | [`ErrorResponseException`](../../doc/models/error-response-exception.md) | - - -# Restapi V2 Search Object Header - -To get header details for metadata objects, use this endpoint. You can provide as input selective fields to get the data for. - -```java -CompletableFuture restapiV2SearchObjectHeaderAsync( - final TspublicRestV2MetadataHeaderSearchRequest body) -``` - -## Parameters - -| Parameter | Type | Tags | Description | -| --- | --- | --- | --- | -| `body` | [`TspublicRestV2MetadataHeaderSearchRequest`](../../doc/models/tspublic-rest-v2-metadata-header-search-request.md) | Body, Required | - | - -## Response Type - -`Object` - -## Example Usage - -```java -TspublicRestV2MetadataHeaderSearchRequest body = new TspublicRestV2MetadataHeaderSearchRequest(); -body.setType(Type3Enum.USER); - -metadataController.restapiV2SearchObjectHeaderAsync(body).thenAccept(result -> { - // TODO success callback handler -}).exceptionally(exception -> { - // TODO failure callback handler - return null; -}); -``` - -## Errors - -| HTTP Status Code | Error Description | Exception Class | -| --- | --- | --- | -| 500 | Operation failed | [`ErrorResponseException`](../../doc/models/error-response-exception.md) | - - -# Restapi V2 Get Object Visualization Header - -Use this endpoint to get header details of visualization charts for a given liveboard or answer. At least one of id or name of liveboard or answer is required. When both are given, then id will be considered. - -```java -CompletableFuture> restapiV2GetObjectVisualizationHeaderAsync( - final String id) -``` - -## Parameters - -| Parameter | Type | Tags | Description | -| --- | --- | --- | --- | -| `id` | `String` | Query, Required | The GUID of the liveboard or answer | - -## Response Type - -`List` - -## Example Usage - -```java -String id = "id0"; - -metadataController.restapiV2GetObjectVisualizationHeaderAsync(id).thenAccept(result -> { - // TODO success callback handler -}).exceptionally(exception -> { - // TODO failure callback handler - return null; -}); -``` - -## Errors - -| HTTP Status Code | Error Description | Exception Class | -| --- | --- | --- | -| 500 | Operation failed | [`ErrorResponseException`](../../doc/models/error-response-exception.md) | - - -# Restapi V2 Get Object Detail - -Use this endpoint to get full details of metadata objects - -```java -CompletableFuture restapiV2GetObjectDetailAsync( - final Type4Enum type, - final List id) -``` - -## Parameters - -| Parameter | Type | Tags | Description | -| --- | --- | --- | --- | -| `type` | [`Type4Enum`](../../doc/models/type-4-enum.md) | Query, Required | Type of the metadata object being searched. | -| `id` | `List` | Query, Required | A JSON array of GUIDs of the objects. | - -## Response Type - -`Object` - -## Example Usage - -```java -Type4Enum type = Type4Enum.DATAOBJECT; -List id = new LinkedList<>(); -id.add("id0"); - -metadataController.restapiV2GetObjectDetailAsync(type, id).thenAccept(result -> { - // TODO success callback handler -}).exceptionally(exception -> { - // TODO failure callback handler - return null; -}); -``` - -## Errors - -| HTTP Status Code | Error Description | Exception Class | -| --- | --- | --- | -| 500 | Operation failed | [`ErrorResponseException`](../../doc/models/error-response-exception.md) | - - -# Restapi V2 Get Object Header - -To get header detail of a metadata object, use this endpoint. You can provide as input selective fields to get the data for. - -```java -CompletableFuture restapiV2GetObjectHeaderAsync( - final Type5Enum type, - final String id, - final List outputFields) -``` - -## Parameters - -| Parameter | Type | Tags | Description | -| --- | --- | --- | --- | -| `type` | [`Type5Enum`](../../doc/models/type-5-enum.md) | Query, Required | Type of the metadata object being searched. | -| `id` | `String` | Query, Required | GUID of the metadata object | -| `outputFields` | `List` | Query, Optional | Array of header field names that need to be included in the header response | - -## Response Type - -`Object` - -## Example Usage - -```java -Type5Enum type = Type5Enum.COLUMN_ALL; -String id = "id0"; - -metadataController.restapiV2GetObjectHeaderAsync(type, id, null).thenAccept(result -> { - // TODO success callback handler -}).exceptionally(exception -> { - // TODO failure callback handler - return null; -}); -``` - -## Errors - -| HTTP Status Code | Error Description | Exception Class | -| --- | --- | --- | -| 500 | Operation failed | [`ErrorResponseException`](../../doc/models/error-response-exception.md) | - - -# Restapi V2 Search Object Detail - -Use this endpoint to get full details of metadata objects - -```java -CompletableFuture restapiV2SearchObjectDetailAsync( - final TspublicRestV2MetadataDetailSearchRequest body) -``` - -## Parameters - -| Parameter | Type | Tags | Description | -| --- | --- | --- | --- | -| `body` | [`TspublicRestV2MetadataDetailSearchRequest`](../../doc/models/tspublic-rest-v2-metadata-detail-search-request.md) | Body, Required | - | - -## Response Type - -`Object` - -## Example Usage - -```java -TspublicRestV2MetadataDetailSearchRequest body = new TspublicRestV2MetadataDetailSearchRequest(); -body.setType(Type6Enum.USER); -body.setId(new LinkedList<>()); -body.getId().add("id6"); -body.getId().add("id7"); - -metadataController.restapiV2SearchObjectDetailAsync(body).thenAccept(result -> { - // TODO success callback handler -}).exceptionally(exception -> { - // TODO failure callback handler - return null; -}); -``` - -## Errors - -| HTTP Status Code | Error Description | Exception Class | -| --- | --- | --- | -| 500 | Operation failed | [`ErrorResponseException`](../../doc/models/error-response-exception.md) | - - -# Restapi V2 Create Tag - -To programmatically create tags, use this endpoint - -```java -CompletableFuture restapiV2CreateTagAsync( - final TspublicRestV2MetadataTagCreateRequest body) -``` - -## Parameters - -| Parameter | Type | Tags | Description | -| --- | --- | --- | --- | -| `body` | [`TspublicRestV2MetadataTagCreateRequest`](../../doc/models/tspublic-rest-v2-metadata-tag-create-request.md) | Body, Required | - | - -## Response Type - -[`MetadataTagResponse`](../../doc/models/metadata-tag-response.md) - -## Example Usage - -```java -TspublicRestV2MetadataTagCreateRequest body = new TspublicRestV2MetadataTagCreateRequest(); -body.setName("name6"); - -metadataController.restapiV2CreateTagAsync(body).thenAccept(result -> { - // TODO success callback handler -}).exceptionally(exception -> { - // TODO failure callback handler - return null; -}); -``` - -## Errors - -| HTTP Status Code | Error Description | Exception Class | -| --- | --- | --- | -| 500 | Operation failed | [`ErrorResponseException`](../../doc/models/error-response-exception.md) | - - -# Restapi V2 Update Tag - -To programmatically update tags, use this endpoint. At least one of id or name of tag is required. When both are given, then id will be considered. - -```java -CompletableFuture restapiV2UpdateTagAsync( - final TspublicRestV2MetadataTagUpdateRequest body) -``` - -## Parameters - -| Parameter | Type | Tags | Description | -| --- | --- | --- | --- | -| `body` | [`TspublicRestV2MetadataTagUpdateRequest`](../../doc/models/tspublic-rest-v2-metadata-tag-update-request.md) | Body, Required | - | - -## Response Type - -`boolean` - -## Example Usage - -```java -TspublicRestV2MetadataTagUpdateRequest body = new TspublicRestV2MetadataTagUpdateRequest(); - -metadataController.restapiV2UpdateTagAsync(body).thenAccept(result -> { - // TODO success callback handler -}).exceptionally(exception -> { - // TODO failure callback handler - return null; -}); -``` - -## Errors - -| HTTP Status Code | Error Description | Exception Class | -| --- | --- | --- | -| 500 | Operation failed | [`ErrorResponseException`](../../doc/models/error-response-exception.md) | - - -# Restapi V2 Delete Tag - -To programmatically delete tags, use this endpoint. At least one of id or name of tag is required. When both are given, then id will be considered. - -```java -CompletableFuture restapiV2DeleteTagAsync( - final String name, - final String id) -``` - -## Parameters - -| Parameter | Type | Tags | Description | -| --- | --- | --- | --- | -| `name` | `String` | Query, Optional | Name of the tag | -| `id` | `String` | Query, Optional | The GUID of the tag | - -## Response Type - -`boolean` - -## Example Usage - -```java -metadataController.restapiV2DeleteTagAsync(null, null).thenAccept(result -> { - // TODO success callback handler -}).exceptionally(exception -> { - // TODO failure callback handler - return null; -}); -``` - -## Errors - -| HTTP Status Code | Error Description | Exception Class | -| --- | --- | --- | -| 500 | Operation failed | [`ErrorResponseException`](../../doc/models/error-response-exception.md) | - - -# Restapi V2 Assign Tag - -To programmatically assign tags to a metadata object, such as a liveboard, search answer, table, worksheet, or view, use this endpoint. At least one of id or name of tag is required. When both are given, then id will be considered. - -```java -CompletableFuture restapiV2AssignTagAsync( - final TspublicRestV2MetadataTagAssignRequest body) -``` - -## Parameters - -| Parameter | Type | Tags | Description | -| --- | --- | --- | --- | -| `body` | [`TspublicRestV2MetadataTagAssignRequest`](../../doc/models/tspublic-rest-v2-metadata-tag-assign-request.md) | Body, Required | - | - -## Response Type - -`boolean` - -## Example Usage - -```java -TspublicRestV2MetadataTagAssignRequest body = new TspublicRestV2MetadataTagAssignRequest(); -body.setTsObject(new LinkedList<>()); - -TsObjectInput bodyTsObject0 = new TsObjectInput(); -bodyTsObject0.setId("id8"); -bodyTsObject0.setType(TypeEnum.DATAOBJECT); -body.getTsObject().add(bodyTsObject0); - -TsObjectInput bodyTsObject1 = new TsObjectInput(); -bodyTsObject1.setId("id9"); -bodyTsObject1.setType(TypeEnum.CONNECTION); -body.getTsObject().add(bodyTsObject1); - -TsObjectInput bodyTsObject2 = new TsObjectInput(); -bodyTsObject2.setId("id0"); -bodyTsObject2.setType(TypeEnum.ANSWER); -body.getTsObject().add(bodyTsObject2); - - -metadataController.restapiV2AssignTagAsync(body).thenAccept(result -> { - // TODO success callback handler -}).exceptionally(exception -> { - // TODO failure callback handler - return null; -}); -``` - -## Errors - -| HTTP Status Code | Error Description | Exception Class | -| --- | --- | --- | -| 500 | Operation failed | [`ErrorResponseException`](../../doc/models/error-response-exception.md) | - - -# Restapi V2 Unassign Tag - -To programmatically unassign tags to a metadata object, such as a liveboard, search answer, table, worksheet, or view, use this endpoint. At least one of id or name of tag is required. When both are given, then id will be considered. - -```java -CompletableFuture restapiV2UnassignTagAsync( - final TspublicRestV2MetadataTagUnassignRequest body) -``` - -## Parameters - -| Parameter | Type | Tags | Description | -| --- | --- | --- | --- | -| `body` | [`TspublicRestV2MetadataTagUnassignRequest`](../../doc/models/tspublic-rest-v2-metadata-tag-unassign-request.md) | Body, Required | - | - -## Response Type - -`boolean` - -## Example Usage - -```java -TspublicRestV2MetadataTagUnassignRequest body = new TspublicRestV2MetadataTagUnassignRequest(); -body.setTsObject(new LinkedList<>()); - -TsObjectInput bodyTsObject0 = new TsObjectInput(); -bodyTsObject0.setId("id8"); -bodyTsObject0.setType(TypeEnum.DATAOBJECT); -body.getTsObject().add(bodyTsObject0); - -TsObjectInput bodyTsObject1 = new TsObjectInput(); -bodyTsObject1.setId("id9"); -bodyTsObject1.setType(TypeEnum.CONNECTION); -body.getTsObject().add(bodyTsObject1); - -TsObjectInput bodyTsObject2 = new TsObjectInput(); -bodyTsObject2.setId("id0"); -bodyTsObject2.setType(TypeEnum.ANSWER); -body.getTsObject().add(bodyTsObject2); - - -metadataController.restapiV2UnassignTagAsync(body).thenAccept(result -> { - // TODO success callback handler -}).exceptionally(exception -> { - // TODO failure callback handler - return null; -}); -``` - -## Errors - -| HTTP Status Code | Error Description | Exception Class | -| --- | --- | --- | -| 500 | Operation failed | [`ErrorResponseException`](../../doc/models/error-response-exception.md) | - - -# Restapi V2 Assign Favorite - -To programmatically assign objects to favorites for a given user account, use this endpoint. At least one of user id or username is required. When both are given, then id will be considered. - -```java -CompletableFuture restapiV2AssignFavoriteAsync( - final TspublicRestV2MetadataFavoriteAssignRequest body) -``` - -## Parameters - -| Parameter | Type | Tags | Description | -| --- | --- | --- | --- | -| `body` | [`TspublicRestV2MetadataFavoriteAssignRequest`](../../doc/models/tspublic-rest-v2-metadata-favorite-assign-request.md) | Body, Required | - | - -## Response Type - -`boolean` - -## Example Usage - -```java -TspublicRestV2MetadataFavoriteAssignRequest body = new TspublicRestV2MetadataFavoriteAssignRequest(); -body.setTsObject(new LinkedList<>()); - -TsObjectInput bodyTsObject0 = new TsObjectInput(); -bodyTsObject0.setId("id8"); -bodyTsObject0.setType(TypeEnum.DATAOBJECT); -body.getTsObject().add(bodyTsObject0); - -TsObjectInput bodyTsObject1 = new TsObjectInput(); -bodyTsObject1.setId("id9"); -bodyTsObject1.setType(TypeEnum.CONNECTION); -body.getTsObject().add(bodyTsObject1); - -TsObjectInput bodyTsObject2 = new TsObjectInput(); -bodyTsObject2.setId("id0"); -bodyTsObject2.setType(TypeEnum.ANSWER); -body.getTsObject().add(bodyTsObject2); - - -metadataController.restapiV2AssignFavoriteAsync(body).thenAccept(result -> { - // TODO success callback handler -}).exceptionally(exception -> { - // TODO failure callback handler - return null; -}); -``` - -## Errors - -| HTTP Status Code | Error Description | Exception Class | -| --- | --- | --- | -| 500 | Operation failed | [`ErrorResponseException`](../../doc/models/error-response-exception.md) | - - -# Restapi V2 Unassign Favorite - -To programmatically unassign objects to favorites for a given user account, use this endpoint. At least one of user id or username is required. When both are given, then id will be considered. - -```java -CompletableFuture restapiV2UnassignFavoriteAsync( - final TspublicRestV2MetadataFavoriteUnassignRequest body) -``` - -## Parameters - -| Parameter | Type | Tags | Description | -| --- | --- | --- | --- | -| `body` | [`TspublicRestV2MetadataFavoriteUnassignRequest`](../../doc/models/tspublic-rest-v2-metadata-favorite-unassign-request.md) | Body, Required | - | - -## Response Type - -`boolean` - -## Example Usage - -```java -TspublicRestV2MetadataFavoriteUnassignRequest body = new TspublicRestV2MetadataFavoriteUnassignRequest(); -body.setTsObject(new LinkedList<>()); - -TsObjectInput bodyTsObject0 = new TsObjectInput(); -bodyTsObject0.setId("id8"); -bodyTsObject0.setType(TypeEnum.DATAOBJECT); -body.getTsObject().add(bodyTsObject0); - -TsObjectInput bodyTsObject1 = new TsObjectInput(); -bodyTsObject1.setId("id9"); -bodyTsObject1.setType(TypeEnum.CONNECTION); -body.getTsObject().add(bodyTsObject1); - -TsObjectInput bodyTsObject2 = new TsObjectInput(); -bodyTsObject2.setId("id0"); -bodyTsObject2.setType(TypeEnum.ANSWER); -body.getTsObject().add(bodyTsObject2); - - -metadataController.restapiV2UnassignFavoriteAsync(body).thenAccept(result -> { - // TODO success callback handler -}).exceptionally(exception -> { - // TODO failure callback handler - return null; -}); -``` - -## Errors - -| HTTP Status Code | Error Description | Exception Class | -| --- | --- | --- | -| 500 | Operation failed | [`ErrorResponseException`](../../doc/models/error-response-exception.md) | - - -# Restapi V2 Assign Home Liveboard - -To assign a specific liveboard as a home liveboard for a user, use this endpoint. At least one of user id or username is required. When both are given, then id will be considered. - -```java -CompletableFuture restapiV2AssignHomeLiveboardAsync( - final TspublicRestV2MetadataHomeliveboardAssignRequest body) -``` - -## Parameters - -| Parameter | Type | Tags | Description | -| --- | --- | --- | --- | -| `body` | [`TspublicRestV2MetadataHomeliveboardAssignRequest`](../../doc/models/tspublic-rest-v2-metadata-homeliveboard-assign-request.md) | Body, Required | - | - -## Response Type - -`boolean` - -## Example Usage - -```java -TspublicRestV2MetadataHomeliveboardAssignRequest body = new TspublicRestV2MetadataHomeliveboardAssignRequest(); - -metadataController.restapiV2AssignHomeLiveboardAsync(body).thenAccept(result -> { - // TODO success callback handler -}).exceptionally(exception -> { - // TODO failure callback handler - return null; -}); -``` - -## Errors - -| HTTP Status Code | Error Description | Exception Class | -| --- | --- | --- | -| 500 | Operation failed | [`ErrorResponseException`](../../doc/models/error-response-exception.md) | - - -# Restapi V2 Unassign Home Liveboard - -To unassign the home liveboard set for a user, use this endpoint. At least one of user id or username is required. When both are given, then id will be considered. - -```java -CompletableFuture restapiV2UnassignHomeLiveboardAsync( - final TspublicRestV2MetadataHomeliveboardUnassignRequest body) -``` - -## Parameters - -| Parameter | Type | Tags | Description | -| --- | --- | --- | --- | -| `body` | [`TspublicRestV2MetadataHomeliveboardUnassignRequest`](../../doc/models/tspublic-rest-v2-metadata-homeliveboard-unassign-request.md) | Body, Required | - | - -## Response Type - -`boolean` - -## Example Usage - -```java -TspublicRestV2MetadataHomeliveboardUnassignRequest body = new TspublicRestV2MetadataHomeliveboardUnassignRequest(); - -metadataController.restapiV2UnassignHomeLiveboardAsync(body).thenAccept(result -> { - // TODO success callback handler -}).exceptionally(exception -> { - // TODO failure callback handler - return null; -}); -``` - -## Errors - -| HTTP Status Code | Error Description | Exception Class | -| --- | --- | --- | -| 500 | Operation failed | [`ErrorResponseException`](../../doc/models/error-response-exception.md) | - - -# Restapi V2 Export Object TML - -To export ThoughtSpot objects represented in ThoughtSpot Modeling Language (TML), use this endpoint - -```java -CompletableFuture restapiV2ExportObjectTMLAsync( - final TspublicRestV2MetadataTmlExportRequest body) -``` - -## Parameters - -| Parameter | Type | Tags | Description | -| --- | --- | --- | --- | -| `body` | [`TspublicRestV2MetadataTmlExportRequest`](../../doc/models/tspublic-rest-v2-metadata-tml-export-request.md) | Body, Required | - | - -## Response Type - -`Object` - -## Example Usage - -```java -TspublicRestV2MetadataTmlExportRequest body = new TspublicRestV2MetadataTmlExportRequest(); -body.setId(new LinkedList<>()); -body.getId().add("id6"); -body.getId().add("id7"); - -metadataController.restapiV2ExportObjectTMLAsync(body).thenAccept(result -> { - // TODO success callback handler -}).exceptionally(exception -> { - // TODO failure callback handler - return null; -}); -``` - -## Errors - -| HTTP Status Code | Error Description | Exception Class | -| --- | --- | --- | -| 500 | Operation failed | [`ErrorResponseException`](../../doc/models/error-response-exception.md) | - - -# Restapi V2 Import Object TML - -To import ThoughtSpot objects represented in ThoughtSpot Modeling Language (TML), use this endpoint - -```java -CompletableFuture restapiV2ImportObjectTMLAsync( - final TspublicRestV2MetadataTmlImportRequest body) -``` - -## Parameters - -| Parameter | Type | Tags | Description | -| --- | --- | --- | --- | -| `body` | [`TspublicRestV2MetadataTmlImportRequest`](../../doc/models/tspublic-rest-v2-metadata-tml-import-request.md) | Body, Required | - | - -## Response Type - -`Object` - -## Example Usage - -```java -TspublicRestV2MetadataTmlImportRequest body = new TspublicRestV2MetadataTmlImportRequest(); -body.setObjectTML(new LinkedList<>()); -body.getObjectTML().add("objectTML5"); -body.getObjectTML().add("objectTML6"); - -metadataController.restapiV2ImportObjectTMLAsync(body).thenAccept(result -> { - // TODO success callback handler -}).exceptionally(exception -> { - // TODO failure callback handler - return null; -}); -``` - -## Errors - -| HTTP Status Code | Error Description | Exception Class | -| --- | --- | --- | -| 500 | Operation failed | [`ErrorResponseException`](../../doc/models/error-response-exception.md) | - - -# Restapi V2 Delete Object - -Use this endpoint to delete the metadata objects - -```java -CompletableFuture restapiV2DeleteObjectAsync( - final Type4Enum type, - final List id) -``` - -## Parameters - -| Parameter | Type | Tags | Description | -| --- | --- | --- | --- | -| `type` | [`Type4Enum`](../../doc/models/type-4-enum.md) | Query, Required | Type of the metadata object being searched | -| `id` | `List` | Query, Required | A JSON array of GUIDs of the objects | - -## Response Type - -`boolean` - -## Example Usage - -```java -Type4Enum type = Type4Enum.DATAOBJECT; -List id = new LinkedList<>(); -id.add("id0"); - -metadataController.restapiV2DeleteObjectAsync(type, id).thenAccept(result -> { - // TODO success callback handler -}).exceptionally(exception -> { - // TODO failure callback handler - return null; -}); -``` - -## Errors - -| HTTP Status Code | Error Description | Exception Class | -| --- | --- | --- | -| 500 | Operation failed | [`ErrorResponseException`](../../doc/models/error-response-exception.md) | - - -# Restapi V2 Get Object Dependency - -To query the details of dependent objects and associate objects as dependents, you can use this API. Dependency is defined as relation between referenced and referencing objects. A referencing object is said to have a dependency on a referenced object, if the referenced object cannot be deleted without first deleting the referencing object. For example, consider a worksheet 'W1' that has a derived logical column 'C1' that has a reference to a base logical column 'C2'. This can be shown diagramatically as: W1-->C1-->C2. W1 has a dependency on C2 i.e. W1 is a referencing object and C2 is a referenced object. It is not possible to delete C2 without first deleting W1 because deletion of C2 will be prevented by the relationship between W1's column C1 and C2. Similarly C1 is said to have a dependency on C2 i.e. C1 is a referencing object and C2 is a referenced object. It is not possible to delete C2 without first deleting C1 - -```java -CompletableFuture restapiV2GetObjectDependencyAsync( - final TspublicRestV2MetadataDependencyRequest body) -``` - -## Parameters - -| Parameter | Type | Tags | Description | -| --- | --- | --- | --- | -| `body` | [`TspublicRestV2MetadataDependencyRequest`](../../doc/models/tspublic-rest-v2-metadata-dependency-request.md) | Body, Required | - | - -## Response Type - -`Object` - -## Example Usage - -```java -TspublicRestV2MetadataDependencyRequest body = new TspublicRestV2MetadataDependencyRequest(); -body.setType(Type13Enum.COLUMN); -body.setId(new LinkedList<>()); -body.getId().add("id6"); -body.getId().add("id7"); - -metadataController.restapiV2GetObjectDependencyAsync(body).thenAccept(result -> { - // TODO success callback handler -}).exceptionally(exception -> { - // TODO failure callback handler - return null; -}); -``` - -## Errors - -| HTTP Status Code | Error Description | Exception Class | -| --- | --- | --- | -| 500 | Operation failed | [`ErrorResponseException`](../../doc/models/error-response-exception.md) | - diff --git a/Java/doc/controllers/org.md b/Java/doc/controllers/org.md deleted file mode 100644 index 76c18069e..000000000 --- a/Java/doc/controllers/org.md +++ /dev/null @@ -1,232 +0,0 @@ -# Org - -```java -OrgController orgController = client.getOrgController(); -``` - -## Class Name - -`OrgController` - -## Methods - -* [Restapi V2 Get Org](../../doc/controllers/org.md#restapi-v2-get-org) -* [Restapi V2 Create Org](../../doc/controllers/org.md#restapi-v2-create-org) -* [Restapi V2 Update Org](../../doc/controllers/org.md#restapi-v2-update-org) -* [Restapi V2 Delete Org](../../doc/controllers/org.md#restapi-v2-delete-org) -* [Restapi V2 Search Orgs](../../doc/controllers/org.md#restapi-v2-search-orgs) - - -# Restapi V2 Get Org - -To get the details of a specific organization by name or id, use this endpoint. - -At least one value needed. When both are given,then id will be considered to fetch organization information. - -Requires Administration privilege for tenant. - -```java -CompletableFuture restapiV2GetOrgAsync( - final String name, - final Integer id) -``` - -## Parameters - -| Parameter | Type | Tags | Description | -| --- | --- | --- | --- | -| `name` | `String` | Query, Optional | Name of the organization. | -| `id` | `Integer` | Query, Optional | The ID of the organization. | - -## Response Type - -[`OrgsResponse`](../../doc/models/orgs-response.md) - -## Example Usage - -```java -orgController.restapiV2GetOrgAsync(null, null).thenAccept(result -> { - // TODO success callback handler -}).exceptionally(exception -> { - // TODO failure callback handler - return null; -}); -``` - -## Errors - -| HTTP Status Code | Error Description | Exception Class | -| --- | --- | --- | -| 500 | Operation failed | [`ErrorResponseException`](../../doc/models/error-response-exception.md) | - - -# Restapi V2 Create Org - -To programmatically create an organization in the ThoughtSpot system, use this API endpoint. - -Requires Administration privilege for tenant. - -```java -CompletableFuture restapiV2CreateOrgAsync( - final TspublicRestV2OrgCreateRequest body) -``` - -## Parameters - -| Parameter | Type | Tags | Description | -| --- | --- | --- | --- | -| `body` | [`TspublicRestV2OrgCreateRequest`](../../doc/models/tspublic-rest-v2-org-create-request.md) | Body, Required | - | - -## Response Type - -[`OrgsResponse`](../../doc/models/orgs-response.md) - -## Example Usage - -```java -TspublicRestV2OrgCreateRequest body = new TspublicRestV2OrgCreateRequest(); -body.setName("name6"); - -orgController.restapiV2CreateOrgAsync(body).thenAccept(result -> { - // TODO success callback handler -}).exceptionally(exception -> { - // TODO failure callback handler - return null; -}); -``` - -## Errors - -| HTTP Status Code | Error Description | Exception Class | -| --- | --- | --- | -| 500 | Operation failed | [`ErrorResponseException`](../../doc/models/error-response-exception.md) | - - -# Restapi V2 Update Org - -You can use this endpoint to programmatically modify an existing org. - -Provide name or id of the organization to update the properties. When both id and name are given, then id will be considered and name of the organization will be updated. - -Requires Administration privilege for tenant. - -```java -CompletableFuture restapiV2UpdateOrgAsync( - final TspublicRestV2OrgUpdateRequest body) -``` - -## Parameters - -| Parameter | Type | Tags | Description | -| --- | --- | --- | --- | -| `body` | [`TspublicRestV2OrgUpdateRequest`](../../doc/models/tspublic-rest-v2-org-update-request.md) | Body, Required | - | - -## Response Type - -[`OrgsResponse`](../../doc/models/orgs-response.md) - -## Example Usage - -```java -TspublicRestV2OrgUpdateRequest body = new TspublicRestV2OrgUpdateRequest(); - -orgController.restapiV2UpdateOrgAsync(body).thenAccept(result -> { - // TODO success callback handler -}).exceptionally(exception -> { - // TODO failure callback handler - return null; -}); -``` - -## Errors - -| HTTP Status Code | Error Description | Exception Class | -| --- | --- | --- | -| 500 | Operation failed | [`ErrorResponseException`](../../doc/models/error-response-exception.md) | - - -# Restapi V2 Delete Org - -To remove an organization from the ThoughtSpot system, send a DELETE request to this endpoint. - -At least one value is needed. When both id and name are given, then id will be considered. - -Requires Administration privilege for tenant. - -```java -CompletableFuture restapiV2DeleteOrgAsync( - final String name, - final Integer id) -``` - -## Parameters - -| Parameter | Type | Tags | Description | -| --- | --- | --- | --- | -| `name` | `String` | Query, Optional | Name of the organization. | -| `id` | `Integer` | Query, Optional | The ID of the organization. | - -## Response Type - -`boolean` - -## Example Usage - -```java -orgController.restapiV2DeleteOrgAsync(null, null).thenAccept(result -> { - // TODO success callback handler -}).exceptionally(exception -> { - // TODO failure callback handler - return null; -}); -``` - -## Errors - -| HTTP Status Code | Error Description | Exception Class | -| --- | --- | --- | -| 500 | Operation failed | [`ErrorResponseException`](../../doc/models/error-response-exception.md) | - - -# Restapi V2 Search Orgs - -To get the details of a specific organization or all organizations in the ThoughtSpot system use this end point. - -If no input is provided, then all organizations are included in the response. - -Requires Administration privilege for tenant. - -```java -CompletableFuture> restapiV2SearchOrgsAsync( - final TspublicRestV2OrgSearchRequest body) -``` - -## Parameters - -| Parameter | Type | Tags | Description | -| --- | --- | --- | --- | -| `body` | [`TspublicRestV2OrgSearchRequest`](../../doc/models/tspublic-rest-v2-org-search-request.md) | Body, Required | - | - -## Response Type - -[`List`](../../doc/models/orgs-response.md) - -## Example Usage - -```java -TspublicRestV2OrgSearchRequest body = new TspublicRestV2OrgSearchRequest(); - -orgController.restapiV2SearchOrgsAsync(body).thenAccept(result -> { - // TODO success callback handler -}).exceptionally(exception -> { - // TODO failure callback handler - return null; -}); -``` - -## Errors - -| HTTP Status Code | Error Description | Exception Class | -| --- | --- | --- | -| 500 | Operation failed | [`ErrorResponseException`](../../doc/models/error-response-exception.md) | - diff --git a/Java/doc/controllers/report.md b/Java/doc/controllers/report.md deleted file mode 100644 index f6caf0e5a..000000000 --- a/Java/doc/controllers/report.md +++ /dev/null @@ -1,110 +0,0 @@ -# Report - -```java -ReportController reportController = client.getReportController(); -``` - -## Class Name - -`ReportController` - -## Methods - -* [Restapi V2 Answer Report](../../doc/controllers/report.md#restapi-v2-answer-report) -* [Restapi V2 Liveboard Report](../../doc/controllers/report.md#restapi-v2-liveboard-report) - - -# Restapi V2 Answer Report - -To programmatically download Answer data as a file, use this endpoint. - -The PDF will download data in the tabular format even if Answer is saved as chart. - -```java -CompletableFuture restapiV2AnswerReportAsync( - final String id, - final Type16Enum type) -``` - -## Parameters - -| Parameter | Type | Tags | Description | -| --- | --- | --- | --- | -| `id` | `String` | Query, Required | GUID of the Answer to download. | -| `type` | [`Type16Enum`](../../doc/models/type-16-enum.md) | Query, Required | Type of file to be generated. | - -## Response Type - -`Object` - -## Example Usage - -```java -String id = "id0"; -Type16Enum type = Type16Enum.PDF; - -reportController.restapiV2AnswerReportAsync(id, type).thenAccept(result -> { - // TODO success callback handler -}).exceptionally(exception -> { - // TODO failure callback handler - return null; -}); -``` - -## Errors - -| HTTP Status Code | Error Description | Exception Class | -| --- | --- | --- | -| 500 | Operation failed | [`ErrorResponseException`](../../doc/models/error-response-exception.md) | - - -# Restapi V2 Liveboard Report - -To programmatically download Liveboard data or specific Visualization data from Liveboard as a file, use this endpoint - -```java -CompletableFuture restapiV2LiveboardReportAsync( - final Type16Enum type, - final String id, - final List vizId, - final String transientContent, - final String runtimeFilter, - final String runtimeSort, - final PdfOptionsInput pdfOptions) -``` - -## Parameters - -| Parameter | Type | Tags | Description | -| --- | --- | --- | --- | -| `type` | [`Type16Enum`](../../doc/models/type-16-enum.md) | Query, Required | Type of file to be generated. Valid values: CSV/XLSX/PDF/PNG. | -| `id` | `String` | Query, Optional | GUID of the Liveboard to download.

This field is considered only when no input is provided for transientContent field. | -| `vizId` | `List` | Query, Optional | JSON Array of GUIDs of the visualizations in the Liveboard to be included in the downloaded file.

For CSV, XLSX and PNG file download, visualization id is mandatory. CSV and XLSX is valid only for visualization of type table and PNG is valid for charts.

Only one value will be accepted for these formats. If multiple values are provided then first value in the array will be considered. | -| `transientContent` | `String` | Query, Optional | If you have embedded ThoughtSpot in your host application, and you want to download Liveboards with unsaved changes as a file, pass the transient content from the browser fetch request, using the getExportRequestForCurrentPinboard method. For more information, see https://developers.thoughtspot.com/docs/?pageid=liveboard-export-api#transient-pinboard. | -| `runtimeFilter` | `String` | Query, Optional | If you have embedded ThoughtSpot in your host application, and you want to download Liveboards with unsaved changes as a file, pass the transient content from the browser fetch request, using the getExportRequestForCurrentPinboard method. For more information, see https://developers.thoughtspot.com/docs/?pageid=liveboard-export-api#transient-pinboard . | -| `runtimeSort` | `String` | Query, Optional | JSON object which provides columns to sort the data at the time of data retrieval.

Example: {"sortCol1":"region","asc1":true,"sortCol2":"date"}

For more information, see https://developers.thoughtspot.com/docs/?pageid=runtime-filters | -| `pdfOptions` | [`PdfOptionsInput`](../../doc/models/pdf-options-input.md) | Query, Optional | Additional options that are applicable for PDF type. | - -## Response Type - -`Object` - -## Example Usage - -```java -Type16Enum type = Type16Enum.PDF; - -reportController.restapiV2LiveboardReportAsync(type, null, null, null, null, null, null).thenAccept(result -> { - // TODO success callback handler -}).exceptionally(exception -> { - // TODO failure callback handler - return null; -}); -``` - -## Errors - -| HTTP Status Code | Error Description | Exception Class | -| --- | --- | --- | -| 500 | Operation failed | [`ErrorResponseException`](../../doc/models/error-response-exception.md) | - diff --git a/Java/doc/controllers/security.md b/Java/doc/controllers/security.md deleted file mode 100644 index 00748b3bd..000000000 --- a/Java/doc/controllers/security.md +++ /dev/null @@ -1,320 +0,0 @@ -# Security - -```java -SecurityController securityController = client.getSecurityController(); -``` - -## Class Name - -`SecurityController` - -## Methods - -* [Restapi V2 Get Permission on Object](../../doc/controllers/security.md#restapi-v2-get-permission-on-object) -* [Restapi V2 Get Permission for Principal](../../doc/controllers/security.md#restapi-v2-get-permission-for-principal) -* [Restapi V2 Share Object](../../doc/controllers/security.md#restapi-v2-share-object) -* [Restapi V2 Share Visualization](../../doc/controllers/security.md#restapi-v2-share-visualization) -* [Restapi V2 Search Permission on Objects](../../doc/controllers/security.md#restapi-v2-search-permission-on-objects) -* [Restapi V2 Search Permission for Principals](../../doc/controllers/security.md#restapi-v2-search-permission-for-principals) - - -# Restapi V2 Get Permission on Object - -To list the permissions for user and user groups on an object, use this endpoint. The response will include only those users and groups with have either VIEW OR MODIFY permission. - -You can optionally see the permission on the dependent objects as well by enabling includeDependent field. - -```java -CompletableFuture restapiV2GetPermissionOnObjectAsync( - final String id, - final Type7Enum type, - final Boolean includeDependent) -``` - -## Parameters - -| Parameter | Type | Tags | Description | -| --- | --- | --- | --- | -| `id` | `String` | Query, Required | GUID of the metadata object for which the permission needs to be obtained. | -| `type` | [`Type7Enum`](../../doc/models/type-7-enum.md) | Query, Required | Type of metadata object. Valid values: Liveboard\|Answer\|DataObject\|Column | -| `includeDependent` | `Boolean` | Query, Optional | When this field is set to true, the API returns the permission details for the dependent objects for the the object included in the request | - -## Response Type - -[`SecurityPermissionResponse`](../../doc/models/security-permission-response.md) - -## Example Usage - -```java -String id = "id0"; -Type7Enum type = Type7Enum.DATAOBJECT; - -securityController.restapiV2GetPermissionOnObjectAsync(id, type, null).thenAccept(result -> { - // TODO success callback handler -}).exceptionally(exception -> { - // TODO failure callback handler - return null; -}); -``` - -## Errors - -| HTTP Status Code | Error Description | Exception Class | -| --- | --- | --- | -| 500 | Operation failed | [`ErrorResponseException`](../../doc/models/error-response-exception.md) | - - -# Restapi V2 Get Permission for Principal - -Use this endpoint to list the objects on which a user or user group has permission. The response will include only those objects on which the user or user group has either VIEW OR MODIFY permission. - -Requires administration privilege - -```java -CompletableFuture restapiV2GetPermissionForPrincipalAsync( - final String id, - final String name) -``` - -## Parameters - -| Parameter | Type | Tags | Description | -| --- | --- | --- | --- | -| `id` | `String` | Query, Optional | GUID of the user or user group for which the object permission needs to be obtained | -| `name` | `String` | Query, Optional | Name of the ser or user group for which the object permission needs to be obtained | - -## Response Type - -[`PrincipalSearchResponse`](../../doc/models/principal-search-response.md) - -## Example Usage - -```java -securityController.restapiV2GetPermissionForPrincipalAsync(null, null).thenAccept(result -> { - // TODO success callback handler -}).exceptionally(exception -> { - // TODO failure callback handler - return null; -}); -``` - -## Errors - -| HTTP Status Code | Error Description | Exception Class | -| --- | --- | --- | -| 500 | Operation failed | [`ErrorResponseException`](../../doc/models/error-response-exception.md) | - - -# Restapi V2 Share Object - -To programmatically share ThoughtSpot objects with another user or user group, use this endpoint. - -When you share an object like a Liveboard or visualization, a notification with a live link is sent to the user. When the users access this object, they can view the last saved version of the object. - -```java -CompletableFuture restapiV2ShareObjectAsync( - final TspublicRestV2SecurityShareTsobjectRequest body) -``` - -## Parameters - -| Parameter | Type | Tags | Description | -| --- | --- | --- | --- | -| `body` | [`TspublicRestV2SecurityShareTsobjectRequest`](../../doc/models/tspublic-rest-v2-security-share-tsobject-request.md) | Body, Required | - | - -## Response Type - -`boolean` - -## Example Usage - -```java -TspublicRestV2SecurityShareTsobjectRequest body = new TspublicRestV2SecurityShareTsobjectRequest(); -body.setType(Type18Enum.DATAOBJECT); -body.setId(new LinkedList<>()); -body.getId().add("id6"); -body.getId().add("id7"); -body.setPermission("permission8"); - -securityController.restapiV2ShareObjectAsync(body).thenAccept(result -> { - // TODO success callback handler -}).exceptionally(exception -> { - // TODO failure callback handler - return null; -}); -``` - -## Errors - -| HTTP Status Code | Error Description | Exception Class | -| --- | --- | --- | -| 500 | Operation failed | [`ErrorResponseException`](../../doc/models/error-response-exception.md) | - - -# Restapi V2 Share Visualization - -If you want to share a specific visualization from a Liveboard with another user or user group, then use this endpoint. - -Requires privilege to share the visualization - -```java -CompletableFuture restapiV2ShareVisualizationAsync( - final TspublicRestV2SecurityShareVisualizationRequest body) -``` - -## Parameters - -| Parameter | Type | Tags | Description | -| --- | --- | --- | --- | -| `body` | [`TspublicRestV2SecurityShareVisualizationRequest`](../../doc/models/tspublic-rest-v2-security-share-visualization-request.md) | Body, Required | - | - -## Response Type - -`boolean` - -## Example Usage - -```java -TspublicRestV2SecurityShareVisualizationRequest body = new TspublicRestV2SecurityShareVisualizationRequest(); -body.setId("id6"); -body.setVizId("vizId4"); -body.setPrincipalId(new LinkedList<>()); -body.getPrincipalId().add("principalId2"); -body.getPrincipalId().add("principalId3"); - -securityController.restapiV2ShareVisualizationAsync(body).thenAccept(result -> { - // TODO success callback handler -}).exceptionally(exception -> { - // TODO failure callback handler - return null; -}); -``` - -## Errors - -| HTTP Status Code | Error Description | Exception Class | -| --- | --- | --- | -| 500 | Operation failed | [`ErrorResponseException`](../../doc/models/error-response-exception.md) | - - -# Restapi V2 Search Permission on Objects - -To list the permissions for user and user groups on a list of objects, use this endpoint. The response will include only those users and groups with have either VIEW OR MODIFY permission. - -You can either provide list of object ids or type of objects to list the permissions for. One of these inputs is mandatory. If both are provided then only object ids will be considred. - -You can optionally provide users or user groups for which the persmission needs to be displayed. - -You can optionally see the permission on the dependent objects as well by enabling includeDependent field. - -Requires administration privilege - -```java -CompletableFuture> restapiV2SearchPermissionOnObjectsAsync( - final TspublicRestV2SecurityPermissionTsobjectSearchRequest body) -``` - -## Parameters - -| Parameter | Type | Tags | Description | -| --- | --- | --- | --- | -| `body` | [`TspublicRestV2SecurityPermissionTsobjectSearchRequest`](../../doc/models/tspublic-rest-v2-security-permission-tsobject-search-request.md) | Body, Required | - | - -## Response Type - -[`List`](../../doc/models/security-permission-response.md) - -## Example Usage - -```java -TspublicRestV2SecurityPermissionTsobjectSearchRequest body = new TspublicRestV2SecurityPermissionTsobjectSearchRequest(); -body.setTsObject(new LinkedList<>()); - -TsObjectSearchInput bodyTsObject0 = new TsObjectSearchInput(); -bodyTsObject0.setType(Type2Enum.DATAOBJECT); -bodyTsObject0.setId(new LinkedList<>()); -bodyTsObject0.getId().add("id8"); -bodyTsObject0.getId().add("id9"); -body.getTsObject().add(bodyTsObject0); - -TsObjectSearchInput bodyTsObject1 = new TsObjectSearchInput(); -bodyTsObject1.setType(Type2Enum.COLUMN); -bodyTsObject1.setId(new LinkedList<>()); -bodyTsObject1.getId().add("id9"); -bodyTsObject1.getId().add("id0"); -bodyTsObject1.getId().add("id1"); -body.getTsObject().add(bodyTsObject1); - -TsObjectSearchInput bodyTsObject2 = new TsObjectSearchInput(); -bodyTsObject2.setType(Type2Enum.LIVEBOARD); -bodyTsObject2.setId(new LinkedList<>()); -bodyTsObject2.getId().add("id0"); -body.getTsObject().add(bodyTsObject2); - - -securityController.restapiV2SearchPermissionOnObjectsAsync(body).thenAccept(result -> { - // TODO success callback handler -}).exceptionally(exception -> { - // TODO failure callback handler - return null; -}); -``` - -## Errors - -| HTTP Status Code | Error Description | Exception Class | -| --- | --- | --- | -| 500 | Operation failed | [`ErrorResponseException`](../../doc/models/error-response-exception.md) | - - -# Restapi V2 Search Permission for Principals - -To list the permissions for user and user groups on a list of objects, use this endpoint. The response will include only those users and groups with have either VIEW OR MODIFY permission. - -You can either provide list of object ids or type of objects to list the permissions for. One of these inputs is mandatory. If both are provided then only object ids will be considred. - -You can optionally provide users or user groups for which the persmission needs to be displayed. - -You can optionally see the permission on the dependent objects as well by enabling includeDependent field. - -Requires administration privilege - -```java -CompletableFuture> restapiV2SearchPermissionForPrincipalsAsync( - final TspublicRestV2SecurityPermissionPrincipalSearchRequest body) -``` - -## Parameters - -| Parameter | Type | Tags | Description | -| --- | --- | --- | --- | -| `body` | [`TspublicRestV2SecurityPermissionPrincipalSearchRequest`](../../doc/models/tspublic-rest-v2-security-permission-principal-search-request.md) | Body, Required | - | - -## Response Type - -[`List`](../../doc/models/principal-search-response.md) - -## Example Usage - -```java -TspublicRestV2SecurityPermissionPrincipalSearchRequest body = new TspublicRestV2SecurityPermissionPrincipalSearchRequest(); -body.setPrincipal(new LinkedList<>()); - -UserNameAndIDInput bodyPrincipal0 = new UserNameAndIDInput(); -body.getPrincipal().add(bodyPrincipal0); - - -securityController.restapiV2SearchPermissionForPrincipalsAsync(body).thenAccept(result -> { - // TODO success callback handler -}).exceptionally(exception -> { - // TODO failure callback handler - return null; -}); -``` - -## Errors - -| HTTP Status Code | Error Description | Exception Class | -| --- | --- | --- | -| 500 | Operation failed | [`ErrorResponseException`](../../doc/models/error-response-exception.md) | - diff --git a/Java/doc/controllers/session.md b/Java/doc/controllers/session.md deleted file mode 100644 index e78320786..000000000 --- a/Java/doc/controllers/session.md +++ /dev/null @@ -1,127 +0,0 @@ -# Session - -```java -SessionController sessionController = client.getSessionController(); -``` - -## Class Name - -`SessionController` - -## Methods - -* [Restapi V2 Login](../../doc/controllers/session.md#restapi-v2-login) -* [Restapi V2 Get Token](../../doc/controllers/session.md#restapi-v2-get-token) - - -# Restapi V2 Login - -You can programmatically create login session for a user in ThoughtSpot using this endpoint. - -You can create session by either providing userName and password as inputs in this request body or by including "Authorization" header with the token generated through the endpoint /tspublic/rest/v2/session/gettoken. - -userName and password input is given precedence over "Authorization" header, when both are included in the request. - -```java -CompletableFuture restapiV2LoginAsync( - final String userName, - final String password, - final Boolean rememberMe) -``` - -## Parameters - -| Parameter | Type | Tags | Description | -| --- | --- | --- | --- | -| `userName` | `String` | Query, Optional | Username of the user account | -| `password` | `String` | Query, Optional | The password of the user account | -| `rememberMe` | `Boolean` | Query, Optional | A flag to remember the user session. When set to true, sets a session cookie that persists in subsequent API calls. | - -## Response Type - -[`SessionLoginResponse`](../../doc/models/session-login-response.md) - -## Example Usage - -```java -sessionController.restapiV2LoginAsync(null, null, null).thenAccept(result -> { - // TODO success callback handler -}).exceptionally(exception -> { - // TODO failure callback handler - return null; -}); -``` - -## Errors - -| HTTP Status Code | Error Description | Exception Class | -| --- | --- | --- | -| 500 | Operation failed | [`ErrorResponseException`](../../doc/models/error-response-exception.md) | - - -# Restapi V2 Get Token - -To programmatically create session token for a user in ThoughtSpot, use this endpoint. - -You can generate the token for a user by providing password or secret key from the cluster. - -You need to enable trusted authentication to generate secret key. To generate secret key, follow below steps. - -1. Click the Develop tab. - -2. Under Customizations, click Settings. - -3. To enable trusted authentication, turn on the toggle. - -4. A secret_key for trusted authentication is generated. - -5. Click the clipboard icon to copy the token. - -Password is given precedence over secretKey input, when both are included in the request. - -```java -CompletableFuture restapiV2GetTokenAsync( - final String userName, - final String password, - final String secretKey, - final AccessLevelEnum accessLevel, - final String tsObjectId, - final String tokenExpiryDuration, - final String orgId) -``` - -## Parameters - -| Parameter | Type | Tags | Description | -| --- | --- | --- | --- | -| `userName` | `String` | Query, Required | Username of the user account | -| `password` | `String` | Query, Optional | The password of the user account | -| `secretKey` | `String` | Query, Optional | The secret key string provided by the ThoughtSpot application server. ThoughtSpot generates this secret key when you enable trusted authentication. | -| `accessLevel` | [`AccessLevelEnum`](../../doc/models/access-level-enum.md) | Query, Optional | User access privilege.

FULL - Creates a session with full access.

REPORT_BOOK_VIEW - Allow view access to the specified visualizations. | -| `tsObjectId` | `String` | Query, Optional | GUID of the ThoughtSpot object. If you have set the accessLevel attribute to REPORT_BOOK_VIEW, specify the GUID of the Liveboard or visualization object. | -| `tokenExpiryDuration` | `String` | Query, Optional | Duration in seconds after which the token expires | -| `orgId` | `String` | Query, Optional | Id of the organization to be associated with the user login. If no input is provided then last logged in organization will be considered | - -## Response Type - -[`SessionLoginResponse`](../../doc/models/session-login-response.md) - -## Example Usage - -```java -String userName = "userName2"; - -sessionController.restapiV2GetTokenAsync(userName, null, null, null, null, null, null).thenAccept(result -> { - // TODO success callback handler -}).exceptionally(exception -> { - // TODO failure callback handler - return null; -}); -``` - -## Errors - -| HTTP Status Code | Error Description | Exception Class | -| --- | --- | --- | -| 500 | Operation failed | [`ErrorResponseException`](../../doc/models/error-response-exception.md) | - diff --git a/Java/doc/controllers/user.md b/Java/doc/controllers/user.md deleted file mode 100644 index 7a7b06a19..000000000 --- a/Java/doc/controllers/user.md +++ /dev/null @@ -1,430 +0,0 @@ -# User - -```java -UserController userController = client.getUserController(); -``` - -## Class Name - -`UserController` - -## Methods - -* [Restapi V2 Get User](../../doc/controllers/user.md#restapi-v2-get-user) -* [Restapi V2 Create User](../../doc/controllers/user.md#restapi-v2-create-user) -* [Restapi V2 Update User](../../doc/controllers/user.md#restapi-v2-update-user) -* [Restapi V2 Delete User](../../doc/controllers/user.md#restapi-v2-delete-user) -* [Restapi V2 Add User to Groups](../../doc/controllers/user.md#restapi-v2-add-user-to-groups) -* [Restapi V2 Remove User From Groups](../../doc/controllers/user.md#restapi-v2-remove-user-from-groups) -* [Restapi V2 Search Users](../../doc/controllers/user.md#restapi-v2-search-users) -* [Restapi V2 Change Password of User](../../doc/controllers/user.md#restapi-v2-change-password-of-user) -* [Restapi V2 Add User to Orgs](../../doc/controllers/user.md#restapi-v2-add-user-to-orgs) - - -# Restapi V2 Get User - -To get the details of a specific user account by username or user id, use this endpoint. At Least one value is needed. When both are given, user id will be considered to fetch user information - -```java -CompletableFuture restapiV2GetUserAsync( - final String name, - final String id) -``` - -## Parameters - -| Parameter | Type | Tags | Description | -| --- | --- | --- | --- | -| `name` | `String` | Query, Optional | Username of the user that you want to query. | -| `id` | `String` | Query, Optional | The GUID of the user account to query | - -## Response Type - -[`UserResponse`](../../doc/models/user-response.md) - -## Example Usage - -```java -userController.restapiV2GetUserAsync(null, null).thenAccept(result -> { - // TODO success callback handler -}).exceptionally(exception -> { - // TODO failure callback handler - return null; -}); -``` - -## Errors - -| HTTP Status Code | Error Description | Exception Class | -| --- | --- | --- | -| 500 | Operation failed | [`ErrorResponseException`](../../doc/models/error-response-exception.md) | - - -# Restapi V2 Create User - -To programmatically create a user account in the ThoughtSpot system use this API endpoint. Using this API, you can create a user and assign groups. -To create a user, you require admin user privileges. -All users created in the ThoughtSpot system are added to ALL_GROUP - -```java -CompletableFuture restapiV2CreateUserAsync( - final String name, - final String displayName, - final String password, - final VisibilityEnum visibility, - final String mail, - final List orgIds, - final List groups, - final StateEnum state, - final Boolean notifyOnShare, - final Boolean showWalkMe, - final Boolean analystOnboardingComplete, - final Type8Enum type) -``` - -## Parameters - -| Parameter | Type | Tags | Description | -| --- | --- | --- | --- | -| `name` | `String` | Query, Required | Name of the user. The username string must be unique. | -| `displayName` | `String` | Query, Required | A unique display name string for the user account, usually their first and last name | -| `password` | `String` | Query, Required | Password for the user account. | -| `visibility` | [`VisibilityEnum`](../../doc/models/visibility-enum.md) | Query, Optional | Visibility of the user. The visibility attribute is set to DEFAULT when creating a user. The DEFAULT attribute makes a user visible to other users and user groups, and this allows them to share objects | -| `mail` | `String` | Query, Optional | Email of the user account | -| `orgIds` | `List` | Query, Optional | Array of org identifiers. If no value is provided then user will be created in the organization associated with the login session. | -| `groups` | [`List`](../../doc/models/group-name-and-id-input.md) | Query, Optional | Array of objects of groups that the user belong to. | -| `state` | [`StateEnum`](../../doc/models/state-enum.md) | Query, Optional | Status of user account. acitve or inactive. | -| `notifyOnShare` | `Boolean` | Query, Optional | User preference for receiving email notifications when another ThoughtSpot user shares answers or pinboards. | -| `showWalkMe` | `Boolean` | Query, Optional | The user preference for revisiting the onboarding experience. | -| `analystOnboardingComplete` | `Boolean` | Query, Optional | ThoughtSpot provides an interactive guided walkthrough to onboard new users. The onboarding experience leads users through a set of actions to help users get started and accomplish their tasks quickly. The users can turn off the Onboarding experience and access it again when they need assistance with the ThoughtSpot UI. | -| `type` | [`Type8Enum`](../../doc/models/type-8-enum.md) | Query, Optional | Type of user. LOCAL_USER indicates that the user is created locally in the ThoughtSpot system. | - -## Response Type - -[`UserResponse`](../../doc/models/user-response.md) - -## Example Usage - -```java -String name = "name0"; -String displayName = "displayName2"; -String password = "password4"; - -userController.restapiV2CreateUserAsync(name, displayName, password, null, null, null, null, null, null, null, null, null).thenAccept(result -> { - // TODO success callback handler -}).exceptionally(exception -> { - // TODO failure callback handler - return null; -}); -``` - -## Errors - -| HTTP Status Code | Error Description | Exception Class | -| --- | --- | --- | -| 500 | Operation failed | [`ErrorResponseException`](../../doc/models/error-response-exception.md) | - - -# Restapi V2 Update User - -You can use this endpoint to programmatically modify an existing user account. To modify a user, you require admin user privileges. -At least one of User Id or username is mandatory. When both are given, then user id will be considered and username will be updated - -```java -CompletableFuture restapiV2UpdateUserAsync( - final TspublicRestV2UserUpdateRequest body) -``` - -## Parameters - -| Parameter | Type | Tags | Description | -| --- | --- | --- | --- | -| `body` | [`TspublicRestV2UserUpdateRequest`](../../doc/models/tspublic-rest-v2-user-update-request.md) | Body, Required | - | - -## Response Type - -`boolean` - -## Example Usage - -```java -TspublicRestV2UserUpdateRequest body = new TspublicRestV2UserUpdateRequest(); - -userController.restapiV2UpdateUserAsync(body).thenAccept(result -> { - // TODO success callback handler -}).exceptionally(exception -> { - // TODO failure callback handler - return null; -}); -``` - -## Errors - -| HTTP Status Code | Error Description | Exception Class | -| --- | --- | --- | -| 500 | Operation failed | [`ErrorResponseException`](../../doc/models/error-response-exception.md) | - - -# Restapi V2 Delete User - -To remove a user from the ThoughtSpot system, use this endpoint. -At Least one value needed. When both are given user id will be considered to delete user. - -```java -CompletableFuture restapiV2DeleteUserAsync( - final String name, - final String id, - final Integer orgId) -``` - -## Parameters - -| Parameter | Type | Tags | Description | -| --- | --- | --- | --- | -| `name` | `String` | Query, Optional | Username of the user that you want to query. | -| `id` | `String` | Query, Optional | The GUID of the user account to query | -| `orgId` | `Integer` | Query, Optional | Unique identifier of the organization from which the user would be deleted. If no value is provided then user will be deleted from the organization associated with the login session. | - -## Response Type - -`boolean` - -## Example Usage - -```java -userController.restapiV2DeleteUserAsync(null, null, null).thenAccept(result -> { - // TODO success callback handler -}).exceptionally(exception -> { - // TODO failure callback handler - return null; -}); -``` - -## Errors - -| HTTP Status Code | Error Description | Exception Class | -| --- | --- | --- | -| 500 | Operation failed | [`ErrorResponseException`](../../doc/models/error-response-exception.md) | - - -# Restapi V2 Add User to Groups - -To programmatically add groups to an existing ThoughtSpot user use this endpoint. -When you assign groups to a user, the user inherits the privileges assigned to those groups. -At least one of User Id or username is mandatory. When both are given, then user id will be considered. - -```java -CompletableFuture restapiV2AddUserToGroupsAsync( - final TspublicRestV2UserAddgroupRequest body) -``` - -## Parameters - -| Parameter | Type | Tags | Description | -| --- | --- | --- | --- | -| `body` | [`TspublicRestV2UserAddgroupRequest`](../../doc/models/tspublic-rest-v2-user-addgroup-request.md) | Body, Required | - | - -## Response Type - -`boolean` - -## Example Usage - -```java -TspublicRestV2UserAddgroupRequest body = new TspublicRestV2UserAddgroupRequest(); -body.setGroups(new LinkedList<>()); - -GroupNameAndIDInput bodyGroups0 = new GroupNameAndIDInput(); -body.getGroups().add(bodyGroups0); - - -userController.restapiV2AddUserToGroupsAsync(body).thenAccept(result -> { - // TODO success callback handler -}).exceptionally(exception -> { - // TODO failure callback handler - return null; -}); -``` - -## Errors - -| HTTP Status Code | Error Description | Exception Class | -| --- | --- | --- | -| 500 | Operation failed | [`ErrorResponseException`](../../doc/models/error-response-exception.md) | - - -# Restapi V2 Remove User From Groups - -To programmatically remove groups from an existing ThoughtSpot user, use this API endpoint. -The API removes only the user association. It does not delete the user or group from the Thoughtspot system -At least one of User Id or username is mandatory. When both are given, then user id will be considered. - -```java -CompletableFuture restapiV2RemoveUserFromGroupsAsync( - final TspublicRestV2UserRemovegroupRequest body) -``` - -## Parameters - -| Parameter | Type | Tags | Description | -| --- | --- | --- | --- | -| `body` | [`TspublicRestV2UserRemovegroupRequest`](../../doc/models/tspublic-rest-v2-user-removegroup-request.md) | Body, Required | - | - -## Response Type - -`boolean` - -## Example Usage - -```java -TspublicRestV2UserRemovegroupRequest body = new TspublicRestV2UserRemovegroupRequest(); -body.setGroups(new LinkedList<>()); - -GroupNameAndIDInput bodyGroups0 = new GroupNameAndIDInput(); -body.getGroups().add(bodyGroups0); - - -userController.restapiV2RemoveUserFromGroupsAsync(body).thenAccept(result -> { - // TODO success callback handler -}).exceptionally(exception -> { - // TODO failure callback handler - return null; -}); -``` - -## Errors - -| HTTP Status Code | Error Description | Exception Class | -| --- | --- | --- | -| 500 | Operation failed | [`ErrorResponseException`](../../doc/models/error-response-exception.md) | - - -# Restapi V2 Search Users - -To get the details of a specific user account or all users in the ThoughtSpot system use this end point. - -```java -CompletableFuture restapiV2SearchUsersAsync( - final TspublicRestV2UserSearchRequest body) -``` - -## Parameters - -| Parameter | Type | Tags | Description | -| --- | --- | --- | --- | -| `body` | [`TspublicRestV2UserSearchRequest`](../../doc/models/tspublic-rest-v2-user-search-request.md) | Body, Required | - | - -## Response Type - -`Object` - -## Example Usage - -```java -TspublicRestV2UserSearchRequest body = new TspublicRestV2UserSearchRequest(); - -userController.restapiV2SearchUsersAsync(body).thenAccept(result -> { - // TODO success callback handler -}).exceptionally(exception -> { - // TODO failure callback handler - return null; -}); -``` - -## Errors - -| HTTP Status Code | Error Description | Exception Class | -| --- | --- | --- | -| 500 | Operation failed | [`ErrorResponseException`](../../doc/models/error-response-exception.md) | - - -# Restapi V2 Change Password of User - -To change the password of a ThoughtSpot user account, use this endpoint. - -At least one of id or name of user is required. When both are given user id will be considered. - -```java -CompletableFuture restapiV2ChangePasswordOfUserAsync( - final TspublicRestV2UserChangepasswordRequest body) -``` - -## Parameters - -| Parameter | Type | Tags | Description | -| --- | --- | --- | --- | -| `body` | [`TspublicRestV2UserChangepasswordRequest`](../../doc/models/tspublic-rest-v2-user-changepassword-request.md) | Body, Required | - | - -## Response Type - -`boolean` - -## Example Usage - -```java -TspublicRestV2UserChangepasswordRequest body = new TspublicRestV2UserChangepasswordRequest(); -body.setCurrentPassword("currentPassword0"); -body.setNewPassword("newPassword0"); - -userController.restapiV2ChangePasswordOfUserAsync(body).thenAccept(result -> { - // TODO success callback handler -}).exceptionally(exception -> { - // TODO failure callback handler - return null; -}); -``` - -## Errors - -| HTTP Status Code | Error Description | Exception Class | -| --- | --- | --- | -| 500 | Operation failed | [`ErrorResponseException`](../../doc/models/error-response-exception.md) | - - -# Restapi V2 Add User to Orgs - -To programmatically add existing ThoughtSpot users to an organization, use this API endpoint. - -At least one of id or name of the organization is required. When both are given, then organization id will be considered. - -Requires Administration access for the organization to which users need to be added. - -```java -CompletableFuture restapiV2AddUserToOrgsAsync( - final TspublicRestV2UserAddorgRequest body) -``` - -## Parameters - -| Parameter | Type | Tags | Description | -| --- | --- | --- | --- | -| `body` | [`TspublicRestV2UserAddorgRequest`](../../doc/models/tspublic-rest-v2-user-addorg-request.md) | Body, Required | - | - -## Response Type - -`boolean` - -## Example Usage - -```java -TspublicRestV2UserAddorgRequest body = new TspublicRestV2UserAddorgRequest(); -body.setUsers(new LinkedList<>()); - -UserNameAndIDInput bodyUsers0 = new UserNameAndIDInput(); -body.getUsers().add(bodyUsers0); - - -userController.restapiV2AddUserToOrgsAsync(body).thenAccept(result -> { - // TODO success callback handler -}).exceptionally(exception -> { - // TODO failure callback handler - return null; -}); -``` - -## Errors - -| HTTP Status Code | Error Description | Exception Class | -| --- | --- | --- | -| 500 | Operation failed | [`ErrorResponseException`](../../doc/models/error-response-exception.md) | - diff --git a/Java/doc/headers.md b/Java/doc/headers.md deleted file mode 100644 index 31bd258ae..000000000 --- a/Java/doc/headers.md +++ /dev/null @@ -1,31 +0,0 @@ - -# Headers Class - -Class for creating and managing HTTP Headers. - -## Constructors - -| Name | Description | -| --- | --- | -| `Headers()` | Default constructor. | -| `Headers(Map> headers)` | Constructor that creates a new instance using a given Map. | -| `Headers(Headers h)` | Copy Constructor. | - -## Methods - -| Name | Description | Return Type | -| --- | --- | --- | -| `has(String headerName)` | Use to check if the given name is present in headers. | `boolean` | -| `names()` | Returns a Set containing all header names. | `Set` | -| `value(String headerName)` | Returns the first value associated with a given header name, or null if the header name is not found. | `String` | -| `values(String headerName)` | Returns a List of all values associated with a given header name, or null if the header name is not found. | `List` | -| `asSimpleMap()` | Returns a Map of the headers, giving only one value for each header name. | `Map` | -| `asMultimap()` | Returns a simulated MultiMap of the headers. | `Map>` | -| `cloneHeaderMap(Map> headerMap)` | Clones a header map. | `Map>` | -| `add(String headerName, String value)` | Adds a value for a header name to this object. | `void` | -| `add(String headerName, List values)` | Adds a List of values for a header name to this object. | `void` | -| `addAllFromMap(Map headers)` | Adds values from a Map to this object. | `void` | -| `addAllFromMultiMap(Map> headers)` | Adds values from a simulated Multi-Map to this object. | `void` | -| `addAll(Headers headers)` | Adds all the entries in a Headers object to this object. | `void` | -| `remove(String headerName)` | Removes the mapping for a header name if it is present. | `List` | - diff --git a/Java/doc/http-body-request.md b/Java/doc/http-body-request.md deleted file mode 100644 index 7baef6143..000000000 --- a/Java/doc/http-body-request.md +++ /dev/null @@ -1,17 +0,0 @@ - -# HttpBodyRequest Class - -HTTP Request with an explicit body. - -## Constructors - -| Name | Description | -| --- | --- | -| `HttpBodyRequest(HttpMethod method, StringBuilder queryUrlBuilder, Headers headers, Map queryParams, Object body)` | Create a request with explicit body. | - -## Methods - -| Name | Description | Return Type | -| --- | --- | --- | -| `getBody()` | Body for the http request. | `Object` | - diff --git a/Java/doc/http-callback-interface.md b/Java/doc/http-callback-interface.md deleted file mode 100644 index 3768edfcc..000000000 --- a/Java/doc/http-callback-interface.md +++ /dev/null @@ -1,12 +0,0 @@ - -# HttpCallback Interface - -Callback to be called before and after the HTTP call for an endpoint is made. - -## Methods - -| Name | Description | Return Type | -| --- | --- | --- | -| `onBeforeRequest(HttpRequest request)` | Callback called just before the HTTP request is sent. | `void` | -| `onAfterResponse(HttpContext context)` | Callback called just after the HTTP response is received. | `void` | - diff --git a/Java/doc/http-client-configuration-builder.md b/Java/doc/http-client-configuration-builder.md deleted file mode 100644 index beeff1671..000000000 --- a/Java/doc/http-client-configuration-builder.md +++ /dev/null @@ -1,28 +0,0 @@ - -# HttpClientConfiguration.Builder Class - -Class to build instances of {@link HttpClientConfiguration}. - -## Constructors - -| Name | Description | -| --- | --- | -| `Builder()` | Default Constructor to initiate builder with default properties. | - -## Methods - -| Name | Description | Return Type | -| --- | --- | --- | -| `timeout(long timeout)` | Sets the timeout in seconds to use for making http requests. | `Builder` | -| `isSkipSslCertVerification(boolean isSkipSslCertVerification)` | Sets allow or prevent skipping ssl certificate verification. | `Builder` | -| `numberOfRetries(int numberOfRetries)` | Sets the number of retries to make. | `Builder` | -| `backOffFactor(int backOffFactor)` | Sets to use in calculation of wait time for next request in case of failure. | `Builder` | -| `retryInterval(long retryInterval)` | Sets to use in calculation of wait time for next request in case of failure. | `Builder` | -| `httpStatusCodesToRetry(Set httpStatusCodesToRetry)` | Sets http status codes to retry against. | `Builder` | -| `httpMethodsToRetry(Set httpMethodsToRetry)` | Sets http methods to retry against. | `Builder` | -| `maximumRetryWaitTime(long maximumRetryWaitTime)` | Sets the maximum wait time for overall retrying requests. | `Builder` | -| `shouldRetryOnTimeout(boolean shouldRetryOnTimeout)` | Sets whether to retry on request timeout. | `Builder` | -| `httpClientInstance(okhttp3.OkHttpClient httpClientInstance)` | Sets the okhttpclient instance used to make the http calls. | `Builder` | -| `httpClientInstance(okhttp3.OkHttpClient httpClientInstance, boolean overrideHttpClientConfigurations)` | Sets the okhttpclient instance used to make the http calls and an option to Allow the SDK to override HTTP client instance's settings used for features like retries, timeouts etc. | `Builder` | -| `build()` | Builds a new HttpClientConfiguration object using the set fields. | `HttpClientConfiguration` | - diff --git a/Java/doc/http-client-configuration.md b/Java/doc/http-client-configuration.md deleted file mode 100644 index d8399498c..000000000 --- a/Java/doc/http-client-configuration.md +++ /dev/null @@ -1,23 +0,0 @@ - -# HttpClientConfiguration Class - -Class for holding http client configuration. - -## Methods - -| Name | Description | Return Type | -| --- | --- | --- | -| `getTimeout()` | The timeout in seconds to use for making HTTP requests. | `long` | -| `isSkipSslCertVerification()` | Allow or prevent skipping SSL certificate verification. | `boolean` | -| `getNumberOfRetries()` | The number of retries to make. | `int` | -| `getBackOffFactor()` | To use in calculation of wait time for next request in case of failure. | `int` | -| `getRetryInterval()` | To use in calculation of wait time for next request in case of failure. | `long` | -| `getHttpStatusCodesToRetry()` | Http status codes to retry against. | `Set` | -| `getHttpMethodsToRetry()` | Http methods to retry against. | `Set` | -| `getMaximumRetryWaitTime()` | The maximum wait time for overall retrying requests. | `long` | -| `shouldRetryOnTimeout()` | Whether to retry on request timeout. | `boolean` | -| `getHttpClientInstance()` | The OkHttpClient instance used to make the HTTP calls. | `okhttp3.OkHttpClient` | -| `shouldOverrideHttpClientConfigurations()` | Allow the SDK to override HTTP client instance's settings used for features like retries, timeouts etc. | `boolean` | -| `toString()` | Converts this HttpClientConfiguration into string format. | `String` | -| `newBuilder()` | Builds a new {@link HttpClientConfiguration.Builder} object. Creates the instance with the current state. | `HttpClientConfiguration.Builder` | - diff --git a/Java/doc/http-context.md b/Java/doc/http-context.md deleted file mode 100644 index 277de0abe..000000000 --- a/Java/doc/http-context.md +++ /dev/null @@ -1,18 +0,0 @@ - -# HttpContext Class - -Class to wrap the request sent to the server and the response received from the server. - -## Constructors - -| Name | Description | -| --- | --- | -| `HttpContext(HttpRequest request, HttpResponse response)` | Constructor for HttpContext. | - -## Methods - -| Name | Description | Return Type | -| --- | --- | --- | -| `getRequest()` | Getter for the Http Request. | `HttpRequest` | -| `getHttpContext()` | Getter for the Http Response. | `HttpContext` | - diff --git a/Java/doc/http-request.md b/Java/doc/http-request.md deleted file mode 100644 index 91c3a17d1..000000000 --- a/Java/doc/http-request.md +++ /dev/null @@ -1,22 +0,0 @@ - -# HttpRequest Class - -Class for creating and managing HTTP Requests. - -## Constructors - -| Name | Description | -| --- | --- | -| `HttpRequest(HttpMethod method, StringBuilder queryUrlBuilder, Headers headers, Map queryParameters, List< SimpleEntry < String, Object >> parameters)` | Initializes a simple http request. | - -## Methods - -| Name | Description | Return Type | -| --- | --- | --- | -| `getHttpMethod()` | HttpMethod for the http request. | `HttpMethod` | -| `getHeaders()` | Headers for the http request. | `Headers` | -| `getQueryUrl()` | Query url for the http request. | `String` | -| `getParameters()` | Parameters for the http request. | `List>` | -| `getQueryParameters()` | Query parameters for the http request. | `Map` | -| `addQueryParameter(String key, Object value)` | Add Query parameter in http request. | `void` | - diff --git a/Java/doc/http-response.md b/Java/doc/http-response.md deleted file mode 100644 index ccc7266bc..000000000 --- a/Java/doc/http-response.md +++ /dev/null @@ -1,19 +0,0 @@ - -# HttpResponse Class - -Class to hold HTTP Response. - -## Constructors - -| Name | Description | -| --- | --- | -| `HttpResponse(int code, Headers headers, InputStream rawBody)` | Constructor for HttpResponse. | - -## Methods - -| Name | Description | Return Type | -| --- | --- | --- | -| `getStatusCode()` | HTTP Status code of the http response.. | `int` | -| `getHeaders()` | Headers of the http response. | `Headers` | -| `getRawBody()` | Raw body of the http response. | `InputStream` | - diff --git a/Java/doc/http-string-response.md b/Java/doc/http-string-response.md deleted file mode 100644 index 850a88fe3..000000000 --- a/Java/doc/http-string-response.md +++ /dev/null @@ -1,19 +0,0 @@ - -# HttpStringResponse Class - -Class to hold response body as string. - -## Constructors - -| Name | Description | -| --- | --- | -| `HttpStringResponse(int code, Headers headers, InputStream rawBody, String body)` | Constructor for HttpStringResponse. | - -## Methods - -| Name | Description | Return Type | -| --- | --- | --- | -| `getStatusCode()` | HTTP Status code of the http response. | `int` | -| `getHeaders()` | Headers of the http response. | `Headers` | -| `getBody()` | String body of the http response. | `String` | - diff --git a/Java/doc/models/access-enum.md b/Java/doc/models/access-enum.md deleted file mode 100644 index 5e72af5dc..000000000 --- a/Java/doc/models/access-enum.md +++ /dev/null @@ -1,16 +0,0 @@ - -# Access Enum - -Minimum access level that the specified user or user group has. If no input is provided then minimum access of READ_ONLY will be considered. - -## Enumeration - -`AccessEnum` - -## Fields - -| Name | -| --- | -| `READONLY` | -| `MODIFY` | - diff --git a/Java/doc/models/access-level-enum.md b/Java/doc/models/access-level-enum.md deleted file mode 100644 index 3f79aed15..000000000 --- a/Java/doc/models/access-level-enum.md +++ /dev/null @@ -1,14 +0,0 @@ - -# Access Level Enum - -## Enumeration - -`AccessLevelEnum` - -## Fields - -| Name | -| --- | -| `FULL` | -| `REPORTBOOKVIEW` | - diff --git a/Java/doc/models/access-level-input.md b/Java/doc/models/access-level-input.md deleted file mode 100644 index b4a614065..000000000 --- a/Java/doc/models/access-level-input.md +++ /dev/null @@ -1,27 +0,0 @@ - -# Access Level Input - -## Structure - -`AccessLevelInput` - -## Fields - -| Name | Type | Tags | Description | Getter | Setter | -| --- | --- | --- | --- | --- | --- | -| `Name` | `String` | Optional | Username or name of the user group | String getName() | setName(String name) | -| `Id` | `String` | Optional | GUID of the user or user group | String getId() | setId(String id) | -| `Type` | [`Type1Enum`](../../doc/models/type-1-enum.md) | Optional | Type of access detail provided | Type1Enum getType() | setType(Type1Enum type) | -| `Access` | [`AccessEnum`](../../doc/models/access-enum.md) | Optional | Minimum access level that the specified user or user group has. If no input is provided then minimum access of READ_ONLY will be considered. | AccessEnum getAccess() | setAccess(AccessEnum access) | - -## Example (as JSON) - -```json -{ - "name": null, - "id": null, - "type": null, - "access": null -} -``` - diff --git a/Java/doc/models/add-table-input.md b/Java/doc/models/add-table-input.md deleted file mode 100644 index 088421fc7..000000000 --- a/Java/doc/models/add-table-input.md +++ /dev/null @@ -1,32 +0,0 @@ - -# Add Table Input - -## Structure - -`AddTableInput` - -## Fields - -| Name | Type | Tags | Description | Getter | Setter | -| --- | --- | --- | --- | --- | --- | -| `Name` | `String` | Required | Name of the table | String getName() | setName(String name) | -| `DbName` | `String` | Required | Name of the database in the data platform | String getDbName() | setDbName(String dbName) | -| `SchemaName` | `String` | Required | Name of the schema in the database | String getSchemaName() | setSchemaName(String schemaName) | -| `Columns` | [`List`](../../doc/models/columns-input.md) | Required | A JSON array of column details | List getColumns() | setColumns(List columns) | - -## Example (as JSON) - -```json -{ - "name": "name0", - "dbName": "dbName8", - "schemaName": "schemaName4", - "columns": [ - { - "name": "name0", - "dataType": "dataType2" - } - ] -} -``` - diff --git a/Java/doc/models/adminsync-principal-response.md b/Java/doc/models/adminsync-principal-response.md deleted file mode 100644 index 40105ced0..000000000 --- a/Java/doc/models/adminsync-principal-response.md +++ /dev/null @@ -1,31 +0,0 @@ - -# Adminsync Principal Response - -## Structure - -`AdminsyncPrincipalResponse` - -## Fields - -| Name | Type | Tags | Description | Getter | Setter | -| --- | --- | --- | --- | --- | --- | -| `UsersAdded` | `List` | Optional | Username of list of users added | List getUsersAdded() | setUsersAdded(List usersAdded) | -| `UsersDeleted` | `List` | Optional | Username of list of users deleted | List getUsersDeleted() | setUsersDeleted(List usersDeleted) | -| `UsersUpdated` | `List` | Optional | Username of list of users updated | List getUsersUpdated() | setUsersUpdated(List usersUpdated) | -| `GroupsAdded` | `List` | Optional | Group name of list of groups added | List getGroupsAdded() | setGroupsAdded(List groupsAdded) | -| `GroupsDeleted` | `List` | Optional | Group name of list of groups deleted | List getGroupsDeleted() | setGroupsDeleted(List groupsDeleted) | -| `GroupsUpdated` | `List` | Optional | Group name of list of groups updated | List getGroupsUpdated() | setGroupsUpdated(List groupsUpdated) | - -## Example (as JSON) - -```json -{ - "usersAdded": null, - "usersDeleted": null, - "usersUpdated": null, - "groupsAdded": null, - "groupsDeleted": null, - "groupsUpdated": null -} -``` - diff --git a/Java/doc/models/answer-query-response.md b/Java/doc/models/answer-query-response.md deleted file mode 100644 index 23b1b4ef6..000000000 --- a/Java/doc/models/answer-query-response.md +++ /dev/null @@ -1,25 +0,0 @@ - -# Answer Query Response - -## Structure - -`AnswerQueryResponse` - -## Fields - -| Name | Type | Tags | Description | Getter | Setter | -| --- | --- | --- | --- | --- | --- | -| `Name` | `String` | Optional | The name of the saved Answer | String getName() | setName(String name) | -| `Id` | `String` | Optional | The GUID of the saved Answer | String getId() | setId(String id) | -| `QuerySql` | `String` | Optional | SQL query associated with the saved Answer | String getQuerySql() | setQuerySql(String querySql) | - -## Example (as JSON) - -```json -{ - "name": null, - "id": null, - "querySql": null -} -``` - diff --git a/Java/doc/models/client-state.md b/Java/doc/models/client-state.md deleted file mode 100644 index b3af2b585..000000000 --- a/Java/doc/models/client-state.md +++ /dev/null @@ -1,21 +0,0 @@ - -# Client State - -## Structure - -`ClientState` - -## Fields - -| Name | Type | Tags | Description | Getter | Setter | -| --- | --- | --- | --- | --- | --- | -| `Color` | `String` | Optional | Color assigned to the tag | String getColor() | setColor(String color) | - -## Example (as JSON) - -```json -{ - "color": null -} -``` - diff --git a/Java/doc/models/columns-input.md b/Java/doc/models/columns-input.md deleted file mode 100644 index 5ef28a089..000000000 --- a/Java/doc/models/columns-input.md +++ /dev/null @@ -1,23 +0,0 @@ - -# Columns Input - -## Structure - -`ColumnsInput` - -## Fields - -| Name | Type | Tags | Description | Getter | Setter | -| --- | --- | --- | --- | --- | --- | -| `Name` | `String` | Required | Name of the column | String getName() | setName(String name) | -| `DataType` | `String` | Required | Datatype of the column | String getDataType() | setDataType(String dataType) | - -## Example (as JSON) - -```json -{ - "name": "name0", - "dataType": "dataType2" -} -``` - diff --git a/Java/doc/models/connection-column.md b/Java/doc/models/connection-column.md deleted file mode 100644 index cb8188c8e..000000000 --- a/Java/doc/models/connection-column.md +++ /dev/null @@ -1,25 +0,0 @@ - -# Connection Column - -## Structure - -`ConnectionColumn` - -## Fields - -| Name | Type | Tags | Description | Getter | Setter | -| --- | --- | --- | --- | --- | --- | -| `Name` | `String` | Optional | Name of the table | String getName() | setName(String name) | -| `Type` | `String` | Optional | Type of the Table | String getType() | setType(String type) | -| `Column` | [`List`](../../doc/models/table-columns.md) | Optional | List of columns in the table | List getColumn() | setColumn(List column) | - -## Example (as JSON) - -```json -{ - "name": null, - "type": null, - "column": null -} -``` - diff --git a/Java/doc/models/connection-columns-shema.md b/Java/doc/models/connection-columns-shema.md deleted file mode 100644 index 2e159689a..000000000 --- a/Java/doc/models/connection-columns-shema.md +++ /dev/null @@ -1,27 +0,0 @@ - -# Connection Columns Shema - -## Structure - -`ConnectionColumnsShema` - -## Fields - -| Name | Type | Tags | Description | Getter | Setter | -| --- | --- | --- | --- | --- | --- | -| `Name` | `String` | Optional | Name of the table | String getName() | setName(String name) | -| `DbName` | `String` | Optional | Name of the database | String getDbName() | setDbName(String dbName) | -| `SchemaName` | `String` | Optional | Name of the schema | String getSchemaName() | setSchemaName(String schemaName) | -| `Columns` | [`List`](../../doc/models/table-columns.md) | Optional | List of columns in the table | List getColumns() | setColumns(List columns) | - -## Example (as JSON) - -```json -{ - "name": null, - "dbName": null, - "schemaName": null, - "columns": null -} -``` - diff --git a/Java/doc/models/connection-database-type.md b/Java/doc/models/connection-database-type.md deleted file mode 100644 index 2ceb8a0df..000000000 --- a/Java/doc/models/connection-database-type.md +++ /dev/null @@ -1,23 +0,0 @@ - -# Connection Database Type - -## Structure - -`ConnectionDatabaseType` - -## Fields - -| Name | Type | Tags | Description | Getter | Setter | -| --- | --- | --- | --- | --- | --- | -| `Name` | `String` | Optional | Name of the database | String getName() | setName(String name) | -| `Schema` | [`List`](../../doc/models/connection-table-schema.md) | Optional | List of schemas | List getSchema() | setSchema(List schema) | - -## Example (as JSON) - -```json -{ - "name": null, - "schema": null -} -``` - diff --git a/Java/doc/models/connection-response.md b/Java/doc/models/connection-response.md deleted file mode 100644 index 427fa1ed6..000000000 --- a/Java/doc/models/connection-response.md +++ /dev/null @@ -1,61 +0,0 @@ - -# Connection Response - -## Structure - -`ConnectionResponse` - -## Fields - -| Name | Type | Tags | Description | Getter | Setter | -| --- | --- | --- | --- | --- | --- | -| `Name` | `String` | Optional | Name of the connection | String getName() | setName(String name) | -| `Description` | `String` | Optional | Description associated with the connection | String getDescription() | setDescription(String description) | -| `Type` | `String` | Optional | Type of the connection. The database associated with this type can be obtained from the response returned by the /tspublic/rest/v2/connection/types API endpoint. | String getType() | setType(String type) | -| `Id` | `String` | Optional | GUID of the connection | String getId() | setId(String id) | -| `Scheduled` | `Boolean` | Optional | Indicates if the data sync is scheduled for this connection | Boolean getScheduled() | setScheduled(Boolean scheduled) | -| `ConnectionType` | `String` | Optional | - | String getConnectionType() | setConnectionType(String connectionType) | -| `Configuration` | `String` | Optional | Configuration properties of the connection | String getConfiguration() | setConfiguration(String configuration) | -| `IsExternal` | `Boolean` | Optional | - | Boolean getIsExternal() | setIsExternal(Boolean isExternal) | -| `IsDeprecated` | `Boolean` | Optional | Indicates if the connection is deprecated | Boolean getIsDeprecated() | setIsDeprecated(Boolean isDeprecated) | -| `IsDeleted` | `Boolean` | Optional | Indicates if the connection is deleted | Boolean getIsDeleted() | setIsDeleted(Boolean isDeleted) | -| `IsHidden` | `Boolean` | Optional | Indicates if the connection is hideen | Boolean getIsHidden() | setIsHidden(Boolean isHidden) | -| `Complete` | `Boolean` | Optional | Indicates if the all the properties of connection is provided | Boolean getComplete() | setComplete(Boolean complete) | -| `IndexVersion` | `Double` | Optional | - | Double getIndexVersion() | setIndexVersion(Double indexVersion) | -| `GenerationNum` | `Double` | Optional | - | Double getGenerationNum() | setGenerationNum(Double generationNum) | -| `Created` | `String` | Optional | Date and time when the connection was created | String getCreated() | setCreated(String created) | -| `Modified` | `String` | Optional | Date and time of last modification of the connection | String getModified() | setModified(String modified) | -| `Author` | [`UserNameAndID`](../../doc/models/user-name-and-id.md) | Optional | - | UserNameAndID getAuthor() | setAuthor(UserNameAndID author) | -| `ModifiedBy` | [`UserNameAndID`](../../doc/models/user-name-and-id.md) | Optional | - | UserNameAndID getModifiedBy() | setModifiedBy(UserNameAndID modifiedBy) | -| `Owner` | [`UserNameAndID`](../../doc/models/user-name-and-id.md) | Optional | - | UserNameAndID getOwner() | setOwner(UserNameAndID owner) | -| `Tags` | `List` | Optional | List of tags assigned to the connection | List getTags() | setTags(List tags) | -| `Tables` | [`List`](../../doc/models/table-list.md) | Optional | List of tables linked to this connection | List getTables() | setTables(List tables) | - -## Example (as JSON) - -```json -{ - "name": null, - "description": null, - "type": null, - "id": null, - "scheduled": null, - "connectionType": null, - "configuration": null, - "isExternal": null, - "isDeprecated": null, - "isDeleted": null, - "isHidden": null, - "complete": null, - "indexVersion": null, - "generationNum": null, - "created": null, - "modified": null, - "author": null, - "modifiedBy": null, - "owner": null, - "tags": null, - "tables": null -} -``` - diff --git a/Java/doc/models/connection-table-columns-input.md b/Java/doc/models/connection-table-columns-input.md deleted file mode 100644 index 2351b2883..000000000 --- a/Java/doc/models/connection-table-columns-input.md +++ /dev/null @@ -1,25 +0,0 @@ - -# Connection Table Columns Input - -## Structure - -`ConnectionTableColumnsInput` - -## Fields - -| Name | Type | Tags | Description | Getter | Setter | -| --- | --- | --- | --- | --- | --- | -| `DbName` | `String` | Required | Name of the database | String getDbName() | setDbName(String dbName) | -| `SchemaName` | `String` | Required | Name of the schema | String getSchemaName() | setSchemaName(String schemaName) | -| `Name` | `String` | Required | Name of the table | String getName() | setName(String name) | - -## Example (as JSON) - -```json -{ - "dbName": "dbName8", - "schemaName": "schemaName4", - "name": "name0" -} -``` - diff --git a/Java/doc/models/connection-table-columns-response.md b/Java/doc/models/connection-table-columns-response.md deleted file mode 100644 index 1eea0507d..000000000 --- a/Java/doc/models/connection-table-columns-response.md +++ /dev/null @@ -1,23 +0,0 @@ - -# Connection Table Columns Response - -## Structure - -`ConnectionTableColumnsResponse` - -## Fields - -| Name | Type | Tags | Description | Getter | Setter | -| --- | --- | --- | --- | --- | --- | -| `Id` | `String` | Optional | Connection id | String getId() | setId(String id) | -| `Table` | [`List`](../../doc/models/connection-columns-shema.md) | Optional | List of table details | List getTable() | setTable(List table) | - -## Example (as JSON) - -```json -{ - "id": null, - "table": null -} -``` - diff --git a/Java/doc/models/connection-table-response.md b/Java/doc/models/connection-table-response.md deleted file mode 100644 index ba20ddbfb..000000000 --- a/Java/doc/models/connection-table-response.md +++ /dev/null @@ -1,23 +0,0 @@ - -# Connection Table Response - -## Structure - -`ConnectionTableResponse` - -## Fields - -| Name | Type | Tags | Description | Getter | Setter | -| --- | --- | --- | --- | --- | --- | -| `Id` | `String` | Optional | Connection id | String getId() | setId(String id) | -| `Database` | [`List`](../../doc/models/connection-database-type.md) | Optional | List of databases | List getDatabase() | setDatabase(List database) | - -## Example (as JSON) - -```json -{ - "id": null, - "database": null -} -``` - diff --git a/Java/doc/models/connection-table-schema.md b/Java/doc/models/connection-table-schema.md deleted file mode 100644 index 71f56188a..000000000 --- a/Java/doc/models/connection-table-schema.md +++ /dev/null @@ -1,23 +0,0 @@ - -# Connection Table Schema - -## Structure - -`ConnectionTableSchema` - -## Fields - -| Name | Type | Tags | Description | Getter | Setter | -| --- | --- | --- | --- | --- | --- | -| `Name` | `String` | Optional | Name of the schema | String getName() | setName(String name) | -| `Table` | [`List`](../../doc/models/connection-column.md) | Optional | List of table details | List getTable() | setTable(List table) | - -## Example (as JSON) - -```json -{ - "name": null, - "table": null -} -``` - diff --git a/Java/doc/models/create-connection-response.md b/Java/doc/models/create-connection-response.md deleted file mode 100644 index cfa2c28bf..000000000 --- a/Java/doc/models/create-connection-response.md +++ /dev/null @@ -1,61 +0,0 @@ - -# Create Connection Response - -## Structure - -`CreateConnectionResponse` - -## Fields - -| Name | Type | Tags | Description | Getter | Setter | -| --- | --- | --- | --- | --- | --- | -| `Name` | `String` | Optional | Name of the connection | String getName() | setName(String name) | -| `Description` | `String` | Optional | Description associated with the connection | String getDescription() | setDescription(String description) | -| `Type` | `String` | Optional | Type of the connection. The database associated with this type can be obtained from the response returned by the /tspublic/rest/v2/connection/types API endpoint. | String getType() | setType(String type) | -| `Id` | `String` | Optional | GUID of the connection | String getId() | setId(String id) | -| `Scheduled` | `Boolean` | Optional | Indicates if the data sync is scheduled for this connection | Boolean getScheduled() | setScheduled(Boolean scheduled) | -| `ConnectionType` | `String` | Optional | - | String getConnectionType() | setConnectionType(String connectionType) | -| `Configuration` | `String` | Optional | Configuration properties of the connection | String getConfiguration() | setConfiguration(String configuration) | -| `IsExternal` | `Boolean` | Optional | - | Boolean getIsExternal() | setIsExternal(Boolean isExternal) | -| `IsDeprecated` | `Boolean` | Optional | Indicates if the connection is deprecated | Boolean getIsDeprecated() | setIsDeprecated(Boolean isDeprecated) | -| `IsDeleted` | `Boolean` | Optional | Indicates if the connection is deleted | Boolean getIsDeleted() | setIsDeleted(Boolean isDeleted) | -| `IsHidden` | `Boolean` | Optional | Indicates if the connection is hideen | Boolean getIsHidden() | setIsHidden(Boolean isHidden) | -| `Complete` | `Boolean` | Optional | Indicates if the all the properties of connection is provided | Boolean getComplete() | setComplete(Boolean complete) | -| `IndexVersion` | `Double` | Optional | - | Double getIndexVersion() | setIndexVersion(Double indexVersion) | -| `GenerationNum` | `Double` | Optional | - | Double getGenerationNum() | setGenerationNum(Double generationNum) | -| `Created` | `String` | Optional | Date and time when user account was created | String getCreated() | setCreated(String created) | -| `Modified` | `String` | Optional | Date and time of last modification of user account | String getModified() | setModified(String modified) | -| `Author` | [`UserNameAndID`](../../doc/models/user-name-and-id.md) | Optional | - | UserNameAndID getAuthor() | setAuthor(UserNameAndID author) | -| `ModifiedBy` | [`UserNameAndID`](../../doc/models/user-name-and-id.md) | Optional | - | UserNameAndID getModifiedBy() | setModifiedBy(UserNameAndID modifiedBy) | -| `Owner` | [`UserNameAndID`](../../doc/models/user-name-and-id.md) | Optional | - | UserNameAndID getOwner() | setOwner(UserNameAndID owner) | -| `Tags` | `List` | Optional | List of tags assigned to the connection | List getTags() | setTags(List tags) | -| `Tables` | `List` | Optional | List of tables linked to this connection and details of the columns in the table | List getTables() | setTables(List tables) | - -## Example (as JSON) - -```json -{ - "name": null, - "description": null, - "type": null, - "id": null, - "scheduled": null, - "connectionType": null, - "configuration": null, - "isExternal": null, - "isDeprecated": null, - "isDeleted": null, - "isHidden": null, - "complete": null, - "indexVersion": null, - "generationNum": null, - "created": null, - "modified": null, - "author": null, - "modifiedBy": null, - "owner": null, - "tags": null, - "tables": null -} -``` - diff --git a/Java/doc/models/create-table-response.md b/Java/doc/models/create-table-response.md deleted file mode 100644 index 948399f59..000000000 --- a/Java/doc/models/create-table-response.md +++ /dev/null @@ -1,23 +0,0 @@ - -# Create Table Response - -## Structure - -`CreateTableResponse` - -## Fields - -| Name | Type | Tags | Description | Getter | Setter | -| --- | --- | --- | --- | --- | --- | -| `LogicalTableHeader` | [`LogicalTableHeader`](../../doc/models/logical-table-header.md) | Optional | - | LogicalTableHeader getLogicalTableHeader() | setLogicalTableHeader(LogicalTableHeader logicalTableHeader) | -| `PhysicalTableId` | `String` | Optional | - | String getPhysicalTableId() | setPhysicalTableId(String physicalTableId) | - -## Example (as JSON) - -```json -{ - "logicalTableHeader": null, - "physicalTableId": null -} -``` - diff --git a/Java/doc/models/dependent-permission.md b/Java/doc/models/dependent-permission.md deleted file mode 100644 index 27a228e91..000000000 --- a/Java/doc/models/dependent-permission.md +++ /dev/null @@ -1,31 +0,0 @@ - -# Dependent Permission - -## Structure - -`DependentPermission` - -## Fields - -| Name | Type | Tags | Description | Getter | Setter | -| --- | --- | --- | --- | --- | --- | -| `Id` | `String` | Optional | GUID of the object | String getId() | setId(String id) | -| `Name` | `String` | Optional | Name of the object | String getName() | setName(String name) | -| `Type` | `String` | Optional | Indicates the type of the object | String getType() | setType(String type) | -| `Permission` | `String` | Optional | Indicates the permission which user or user group has on the object | String getPermission() | setPermission(String permission) | -| `SharedPermission` | `String` | Optional | Indicates the permission which user or user group has on the object through sharing of the object with this user or user group | String getSharedPermission() | setSharedPermission(String sharedPermission) | -| `GroupPermission` | [`List`](../../doc/models/group-permission.md) | Optional | An array of object with details of permission on the user groups to which the user or user group belongs | List getGroupPermission() | setGroupPermission(List groupPermission) | - -## Example (as JSON) - -```json -{ - "id": null, - "name": null, - "type": null, - "permission": null, - "sharedPermission": null, - "groupPermission": null -} -``` - diff --git a/Java/doc/models/error-response-exception.md b/Java/doc/models/error-response-exception.md deleted file mode 100644 index 1644cee16..000000000 --- a/Java/doc/models/error-response-exception.md +++ /dev/null @@ -1,21 +0,0 @@ - -# Error Response Exception - -## Structure - -`ErrorResponseException` - -## Fields - -| Name | Type | Tags | Description | Getter | Setter | -| --- | --- | --- | --- | --- | --- | -| `Error` | `Object` | Optional | - | Object getError() | setError(Object error) | - -## Example (as JSON) - -```json -{ - "error": null -} -``` - diff --git a/Java/doc/models/format-type-3-enum.md b/Java/doc/models/format-type-3-enum.md deleted file mode 100644 index 8b2285822..000000000 --- a/Java/doc/models/format-type-3-enum.md +++ /dev/null @@ -1,16 +0,0 @@ - -# Format Type 3 Enum - -The format in which to export the objects - -## Enumeration - -`FormatType3Enum` - -## Fields - -| Name | -| --- | -| `YAML` | -| `JSON` | - diff --git a/Java/doc/models/format-type-enum.md b/Java/doc/models/format-type-enum.md deleted file mode 100644 index 7d7d7e249..000000000 --- a/Java/doc/models/format-type-enum.md +++ /dev/null @@ -1,20 +0,0 @@ - -# Format Type Enum - -The format of the data in the response. - -FULL: The response comes in "column":"value" format. - -COMPACT: The response includes only the value of the columns. - -## Enumeration - -`FormatTypeEnum` - -## Fields - -| Name | -| --- | -| `COMPACT` | -| `FULL` | - diff --git a/Java/doc/models/from-user-name-and-id-input.md b/Java/doc/models/from-user-name-and-id-input.md deleted file mode 100644 index 3d2d97330..000000000 --- a/Java/doc/models/from-user-name-and-id-input.md +++ /dev/null @@ -1,29 +0,0 @@ - -# From User Name and ID Input - -A JSON object of name or GUIDs of the current owner of the objects. When both are given then id is considered. - -If a list of object ids are provided as input for TsObjectId, then only for those ids that have owner as the value provided in fromUser, the owner will be changed. - -Provide either name or id as input. When both are given user id will be considered. - -## Structure - -`FromUserNameAndIDInput` - -## Fields - -| Name | Type | Tags | Description | Getter | Setter | -| --- | --- | --- | --- | --- | --- | -| `Name` | `String` | Optional | Username of the user | String getName() | setName(String name) | -| `Id` | `String` | Optional | GUID of the user | String getId() | setId(String id) | - -## Example (as JSON) - -```json -{ - "name": null, - "id": null -} -``` - diff --git a/Java/doc/models/group-name-and-id-input.md b/Java/doc/models/group-name-and-id-input.md deleted file mode 100644 index 8a0bc14e5..000000000 --- a/Java/doc/models/group-name-and-id-input.md +++ /dev/null @@ -1,23 +0,0 @@ - -# Group Name and ID Input - -## Structure - -`GroupNameAndIDInput` - -## Fields - -| Name | Type | Tags | Description | Getter | Setter | -| --- | --- | --- | --- | --- | --- | -| `Name` | `String` | Optional | Name of the group | String getName() | setName(String name) | -| `Id` | `String` | Optional | GUID of the group | String getId() | setId(String id) | - -## Example (as JSON) - -```json -{ - "name": null, - "id": null -} -``` - diff --git a/Java/doc/models/group-name-and-id.md b/Java/doc/models/group-name-and-id.md deleted file mode 100644 index cfc92f6b4..000000000 --- a/Java/doc/models/group-name-and-id.md +++ /dev/null @@ -1,23 +0,0 @@ - -# Group Name and ID - -## Structure - -`GroupNameAndID` - -## Fields - -| Name | Type | Tags | Description | Getter | Setter | -| --- | --- | --- | --- | --- | --- | -| `Name` | `String` | Optional | Name of the group | String getName() | setName(String name) | -| `Id` | `String` | Optional | GUID of the group | String getId() | setId(String id) | - -## Example (as JSON) - -```json -{ - "name": null, - "id": null -} -``` - diff --git a/Java/doc/models/group-permission.md b/Java/doc/models/group-permission.md deleted file mode 100644 index f0268bcb5..000000000 --- a/Java/doc/models/group-permission.md +++ /dev/null @@ -1,25 +0,0 @@ - -# Group Permission - -## Structure - -`GroupPermission` - -## Fields - -| Name | Type | Tags | Description | Getter | Setter | -| --- | --- | --- | --- | --- | --- | -| `Id` | `String` | Optional | GUID of the user group | String getId() | setId(String id) | -| `Name` | `String` | Optional | Name of the user group | String getName() | setName(String name) | -| `Permission` | `String` | Optional | Indicates the permission which user group has on the object | String getPermission() | setPermission(String permission) | - -## Example (as JSON) - -```json -{ - "id": null, - "name": null, - "permission": null -} -``` - diff --git a/Java/doc/models/group-response.md b/Java/doc/models/group-response.md deleted file mode 100644 index 0f4c77347..000000000 --- a/Java/doc/models/group-response.md +++ /dev/null @@ -1,79 +0,0 @@ - -# Group Response - -## Structure - -`GroupResponse` - -## Fields - -| Name | Type | Tags | Description | Getter | Setter | -| --- | --- | --- | --- | --- | --- | -| `Name` | `String` | Optional | Name of the group | String getName() | setName(String name) | -| `DisplayName` | `String` | Optional | A unique display name string for the user group | String getDisplayName() | setDisplayName(String displayName) | -| `Id` | `String` | Optional | GUID of the group | String getId() | setId(String id) | -| `Visibility` | `String` | Optional | Visibility of the group | String getVisibility() | setVisibility(String visibility) | -| `Description` | `String` | Optional | Description of the group | String getDescription() | setDescription(String description) | -| `Privileges` | `List` | Optional | Privileges assigned to the group | List getPrivileges() | setPrivileges(List privileges) | -| `Orgs` | [`List`](../../doc/models/org-type.md) | Optional | The organizations that user belongs to | List getOrgs() | setOrgs(List orgs) | -| `Groups` | [`List`](../../doc/models/group-name-and-id.md) | Optional | Name of the group to which is added | List getGroups() | setGroups(List groups) | -| `Users` | [`List`](../../doc/models/user-name-and-id.md) | Optional | User Group Information by Id or Name. | List getUsers() | setUsers(List users) | -| `AssignedLiveboards` | [`List`](../../doc/models/liveboard-name-and-id.md) | Optional | Liveboards assigned to the group | List getAssignedLiveboards() | setAssignedLiveboards(List assignedLiveboards) | -| `UserGroupContent` | `Object` | Optional | - | Object getUserGroupContent() | setUserGroupContent(Object userGroupContent) | -| `Tags` | `List` | Optional | Tags assigned to the group | List getTags() | setTags(List tags) | -| `IsDeleted` | `Boolean` | Optional | Indicates if the group is deleted | Boolean getIsDeleted() | setIsDeleted(Boolean isDeleted) | -| `IsHidden` | `Boolean` | Optional | Indicates if the group is hidden | Boolean getIsHidden() | setIsHidden(Boolean isHidden) | -| `IsExternal` | `Boolean` | Optional | Indicates if the group is from external system | Boolean getIsExternal() | setIsExternal(Boolean isExternal) | -| `IsDeprecated` | `Boolean` | Optional | - | Boolean getIsDeprecated() | setIsDeprecated(Boolean isDeprecated) | -| `Complete` | `Boolean` | Optional | Indicates if the all the properties of group is provided | Boolean getComplete() | setComplete(Boolean complete) | -| `IsSystemPrincipal` | `Boolean` | Optional | Indicates if the group is system principal | Boolean getIsSystemPrincipal() | setIsSystemPrincipal(Boolean isSystemPrincipal) | -| `Type` | `String` | Optional | Indicates the type of group | String getType() | setType(String type) | -| `Parenttype` | `String` | Optional | Indicates the type of parent object | String getParenttype() | setParenttype(String parenttype) | -| `GroupIdx` | `Integer` | Optional | - | Integer getGroupIdx() | setGroupIdx(Integer groupIdx) | -| `MetadataVersion` | `Integer` | Optional | - | Integer getMetadataVersion() | setMetadataVersion(Integer metadataVersion) | -| `TenantId` | `String` | Optional | Tenant id associated with the group | String getTenantId() | setTenantId(String tenantId) | -| `IndexVersion` | `Double` | Optional | - | Double getIndexVersion() | setIndexVersion(Double indexVersion) | -| `GenerationNum` | `Double` | Optional | - | Double getGenerationNum() | setGenerationNum(Double generationNum) | -| `Created` | `Double` | Optional | Date and time when group was created | Double getCreated() | setCreated(Double created) | -| `Modified` | `Double` | Optional | Date and time of last modification of the group | Double getModified() | setModified(Double modified) | -| `Author` | [`UserNameAndID`](../../doc/models/user-name-and-id.md) | Optional | - | UserNameAndID getAuthor() | setAuthor(UserNameAndID author) | -| `ModifiedBy` | [`UserNameAndID`](../../doc/models/user-name-and-id.md) | Optional | - | UserNameAndID getModifiedBy() | setModifiedBy(UserNameAndID modifiedBy) | -| `Owner` | [`UserNameAndID`](../../doc/models/user-name-and-id.md) | Optional | - | UserNameAndID getOwner() | setOwner(UserNameAndID owner) | - -## Example (as JSON) - -```json -{ - "name": null, - "displayName": null, - "id": null, - "visibility": null, - "description": null, - "privileges": null, - "orgs": null, - "groups": null, - "users": null, - "assignedLiveboards": null, - "userGroupContent": null, - "tags": null, - "isDeleted": null, - "isHidden": null, - "isExternal": null, - "isDeprecated": null, - "complete": null, - "isSystemPrincipal": null, - "type": null, - "parenttype": null, - "groupIdx": null, - "metadataVersion": null, - "tenantId": null, - "indexVersion": null, - "generationNum": null, - "created": null, - "modified": null, - "author": null, - "modifiedBy": null, - "owner": null -} -``` - diff --git a/Java/doc/models/home-liveboard-response.md b/Java/doc/models/home-liveboard-response.md deleted file mode 100644 index 8a59e3c87..000000000 --- a/Java/doc/models/home-liveboard-response.md +++ /dev/null @@ -1,27 +0,0 @@ - -# Home Liveboard Response - -## Structure - -`HomeLiveboardResponse` - -## Fields - -| Name | Type | Tags | Description | Getter | Setter | -| --- | --- | --- | --- | --- | --- | -| `UserName` | `String` | Optional | Name of the user | String getUserName() | setUserName(String userName) | -| `UserId` | `String` | Optional | The GUID of the user | String getUserId() | setUserId(String userId) | -| `LiveboardName` | `String` | Optional | Name of the liveboard | String getLiveboardName() | setLiveboardName(String liveboardName) | -| `LiveboardId` | `String` | Optional | The GUID of the liveboard | String getLiveboardId() | setLiveboardId(String liveboardId) | - -## Example (as JSON) - -```json -{ - "userName": null, - "userId": null, - "liveboardName": null, - "liveboardId": null -} -``` - diff --git a/Java/doc/models/import-policy-enum.md b/Java/doc/models/import-policy-enum.md deleted file mode 100644 index fa26e3d17..000000000 --- a/Java/doc/models/import-policy-enum.md +++ /dev/null @@ -1,17 +0,0 @@ - -# Import Policy Enum - -Policy to follow during import - -## Enumeration - -`ImportPolicyEnum` - -## Fields - -| Name | -| --- | -| `PARTIAL` | -| `ALLORNONE` | -| `VALIDATEONLY` | - diff --git a/Java/doc/models/liveboard-name-and-id.md b/Java/doc/models/liveboard-name-and-id.md deleted file mode 100644 index da2aedde8..000000000 --- a/Java/doc/models/liveboard-name-and-id.md +++ /dev/null @@ -1,23 +0,0 @@ - -# Liveboard Name and ID - -## Structure - -`LiveboardNameAndID` - -## Fields - -| Name | Type | Tags | Description | Getter | Setter | -| --- | --- | --- | --- | --- | --- | -| `Name` | `String` | Optional | Name of the liveboard | String getName() | setName(String name) | -| `Id` | `String` | Optional | GUID of the liveboard | String getId() | setId(String id) | - -## Example (as JSON) - -```json -{ - "name": null, - "id": null -} -``` - diff --git a/Java/doc/models/liveboard-query-response.md b/Java/doc/models/liveboard-query-response.md deleted file mode 100644 index 5d8d5b5ad..000000000 --- a/Java/doc/models/liveboard-query-response.md +++ /dev/null @@ -1,25 +0,0 @@ - -# Liveboard Query Response - -## Structure - -`LiveboardQueryResponse` - -## Fields - -| Name | Type | Tags | Description | Getter | Setter | -| --- | --- | --- | --- | --- | --- | -| `Name` | `String` | Optional | The name of the Liveboard | String getName() | setName(String name) | -| `Id` | `String` | Optional | The GUID of the Liveboard | String getId() | setId(String id) | -| `Viz` | [`List`](../../doc/models/viz-type.md) | Optional | SQL query associated with the saved Answer | List getViz() | setViz(List viz) | - -## Example (as JSON) - -```json -{ - "name": null, - "id": null, - "viz": null -} -``` - diff --git a/Java/doc/models/logical-table-header.md b/Java/doc/models/logical-table-header.md deleted file mode 100644 index 6829f12f4..000000000 --- a/Java/doc/models/logical-table-header.md +++ /dev/null @@ -1,51 +0,0 @@ - -# Logical Table Header - -## Structure - -`LogicalTableHeader` - -## Fields - -| Name | Type | Tags | Description | Getter | Setter | -| --- | --- | --- | --- | --- | --- | -| `Id` | `String` | Optional | - | String getId() | setId(String id) | -| `Name` | `String` | Optional | - | String getName() | setName(String name) | -| `Author` | `String` | Optional | - | String getAuthor() | setAuthor(String author) | -| `AuthorName` | `String` | Optional | - | String getAuthorName() | setAuthorName(String authorName) | -| `AuthorDisplayName` | `String` | Optional | - | String getAuthorDisplayName() | setAuthorDisplayName(String authorDisplayName) | -| `Created` | `Double` | Optional | - | Double getCreated() | setCreated(Double created) | -| `Modified` | `Double` | Optional | - | Double getModified() | setModified(Double modified) | -| `ModifiedBy` | `String` | Optional | - | String getModifiedBy() | setModifiedBy(String modifiedBy) | -| `GenerationNum` | `Integer` | Optional | - | Integer getGenerationNum() | setGenerationNum(Integer generationNum) | -| `Owner` | `String` | Optional | - | String getOwner() | setOwner(String owner) | -| `Deleted` | `Boolean` | Optional | - | Boolean getDeleted() | setDeleted(Boolean deleted) | -| `Hidden` | `Boolean` | Optional | - | Boolean getHidden() | setHidden(Boolean hidden) | -| `Database` | `String` | Optional | - | String getDatabase() | setDatabase(String database) | -| `Schema` | `String` | Optional | - | String getSchema() | setSchema(String schema) | -| `Type` | `String` | Optional | - | String getType() | setType(String type) | -| `SubType` | `String` | Optional | - | String getSubType() | setSubType(String subType) | - -## Example (as JSON) - -```json -{ - "id": null, - "name": null, - "author": null, - "authorName": null, - "authorDisplayName": null, - "created": null, - "modified": null, - "modifiedBy": null, - "generationNum": null, - "owner": null, - "deleted": null, - "hidden": null, - "database": null, - "schema": null, - "type": null, - "subType": null -} -``` - diff --git a/Java/doc/models/logs-response.md b/Java/doc/models/logs-response.md deleted file mode 100644 index f13aa7153..000000000 --- a/Java/doc/models/logs-response.md +++ /dev/null @@ -1,23 +0,0 @@ - -# Logs Response - -## Structure - -`LogsResponse` - -## Fields - -| Name | Type | Tags | Description | Getter | Setter | -| --- | --- | --- | --- | --- | --- | -| `Date` | `String` | Optional | Date and time for the event in the log | String getDate() | setDate(String date) | -| `Log` | `String` | Optional | Logged event at the time specified in JSON format. This includes, Event ID, A unique description of the event, for example, User login failed, Timestamp, User ID of the person initiating the event and IP address of the ThoughtSpot instance. | String getLog() | setLog(String log) | - -## Example (as JSON) - -```json -{ - "date": null, - "log": null -} -``` - diff --git a/Java/doc/models/metadata-tag-response.md b/Java/doc/models/metadata-tag-response.md deleted file mode 100644 index b53793939..000000000 --- a/Java/doc/models/metadata-tag-response.md +++ /dev/null @@ -1,47 +0,0 @@ - -# Metadata Tag Response - -## Structure - -`MetadataTagResponse` - -## Fields - -| Name | Type | Tags | Description | Getter | Setter | -| --- | --- | --- | --- | --- | --- | -| `Name` | `String` | Optional | Name of the tag | String getName() | setName(String name) | -| `Id` | `String` | Optional | GUID of the tag | String getId() | setId(String id) | -| `ClientState` | [`ClientState`](../../doc/models/client-state.md) | Optional | - | ClientState getClientState() | setClientState(ClientState clientState) | -| `IndexVersion` | `Double` | Optional | - | Double getIndexVersion() | setIndexVersion(Double indexVersion) | -| `GenerationNum` | `Double` | Optional | - | Double getGenerationNum() | setGenerationNum(Double generationNum) | -| `IsDeleted` | `Boolean` | Optional | Indicates if the tag is deleted | Boolean getIsDeleted() | setIsDeleted(Boolean isDeleted) | -| `IsHidden` | `Boolean` | Optional | Indicates if the tag is hidden | Boolean getIsHidden() | setIsHidden(Boolean isHidden) | -| `IsExternal` | `Boolean` | Optional | Indicates if the tag is from external system | Boolean getIsExternal() | setIsExternal(Boolean isExternal) | -| `IsDeprecated` | `Boolean` | Optional | - | Boolean getIsDeprecated() | setIsDeprecated(Boolean isDeprecated) | -| `Created` | `Double` | Optional | Date and time when group was created | Double getCreated() | setCreated(Double created) | -| `Modified` | `Double` | Optional | Date and time of last modification of the group | Double getModified() | setModified(Double modified) | -| `ModifiedBy` | [`TagNameAndID`](../../doc/models/tag-name-and-id.md) | Optional | - | TagNameAndID getModifiedBy() | setModifiedBy(TagNameAndID modifiedBy) | -| `Author` | [`TagNameAndID`](../../doc/models/tag-name-and-id.md) | Optional | - | TagNameAndID getAuthor() | setAuthor(TagNameAndID author) | -| `Owner` | [`TagNameAndID`](../../doc/models/tag-name-and-id.md) | Optional | - | TagNameAndID getOwner() | setOwner(TagNameAndID owner) | - -## Example (as JSON) - -```json -{ - "name": null, - "id": null, - "clientState": null, - "indexVersion": null, - "generationNum": null, - "isDeleted": null, - "isHidden": null, - "isExternal": null, - "isDeprecated": null, - "created": null, - "modified": null, - "modifiedBy": null, - "author": null, - "owner": null -} -``` - diff --git a/Java/doc/models/name-and-id-input.md b/Java/doc/models/name-and-id-input.md deleted file mode 100644 index 8ffc5b16f..000000000 --- a/Java/doc/models/name-and-id-input.md +++ /dev/null @@ -1,23 +0,0 @@ - -# Name and Id Input - -## Structure - -`NameAndIdInput` - -## Fields - -| Name | Type | Tags | Description | Getter | Setter | -| --- | --- | --- | --- | --- | --- | -| `Name` | `String` | Optional | Name of the user | String getName() | setName(String name) | -| `Id` | `String` | Optional | GUID of the user | String getId() | setId(String id) | - -## Example (as JSON) - -```json -{ - "name": null, - "id": null -} -``` - diff --git a/Java/doc/models/org-type.md b/Java/doc/models/org-type.md deleted file mode 100644 index 5e5cd8e15..000000000 --- a/Java/doc/models/org-type.md +++ /dev/null @@ -1,23 +0,0 @@ - -# Org Type - -## Structure - -`OrgType` - -## Fields - -| Name | Type | Tags | Description | Getter | Setter | -| --- | --- | --- | --- | --- | --- | -| `Name` | `String` | Optional | Name of the organization | String getName() | setName(String name) | -| `Id` | `Integer` | Optional | Id of the organization | Integer getId() | setId(Integer id) | - -## Example (as JSON) - -```json -{ - "name": null, - "id": null -} -``` - diff --git a/Java/doc/models/orgs-response.md b/Java/doc/models/orgs-response.md deleted file mode 100644 index ebfc1c65e..000000000 --- a/Java/doc/models/orgs-response.md +++ /dev/null @@ -1,31 +0,0 @@ - -# Orgs Response - -## Structure - -`OrgsResponse` - -## Fields - -| Name | Type | Tags | Description | Getter | Setter | -| --- | --- | --- | --- | --- | --- | -| `OrgId` | `Integer` | Optional | ID of the organization searched for | Integer getOrgId() | setOrgId(Integer orgId) | -| `OrgName` | `String` | Optional | Name of the organization searched for | String getOrgName() | setOrgName(String orgName) | -| `Description` | `String` | Optional | Description associated with the organization | String getDescription() | setDescription(String description) | -| `AllGroupUserId` | `String` | Optional | GUID of the ALL group in the organization | String getAllGroupUserId() | setAllGroupUserId(String allGroupUserId) | -| `DefaultAdminUserGroupId` | `String` | Optional | GUID of the admin group in the organization | String getDefaultAdminUserGroupId() | setDefaultAdminUserGroupId(String defaultAdminUserGroupId) | -| `Active` | `Boolean` | Optional | Indicates if the organization is active or not | Boolean getActive() | setActive(Boolean active) | - -## Example (as JSON) - -```json -{ - "orgId": null, - "orgName": null, - "description": null, - "allGroupUserId": null, - "defaultAdminUserGroupId": null, - "active": null -} -``` - diff --git a/Java/doc/models/orientation-enum.md b/Java/doc/models/orientation-enum.md deleted file mode 100644 index 361feb0ee..000000000 --- a/Java/doc/models/orientation-enum.md +++ /dev/null @@ -1,16 +0,0 @@ - -# Orientation Enum - -Page orientation for the PDF. Default: PORTRAIT - -## Enumeration - -`OrientationEnum` - -## Fields - -| Name | -| --- | -| `PORTRAIT` | -| `LANDSCAPE` | - diff --git a/Java/doc/models/pdf-options-input.md b/Java/doc/models/pdf-options-input.md deleted file mode 100644 index 5a1352760..000000000 --- a/Java/doc/models/pdf-options-input.md +++ /dev/null @@ -1,33 +0,0 @@ - -# Pdf Options Input - -## Structure - -`PdfOptionsInput` - -## Fields - -| Name | Type | Tags | Description | Getter | Setter | -| --- | --- | --- | --- | --- | --- | -| `Orientation` | [`OrientationEnum`](../../doc/models/orientation-enum.md) | Optional | Page orientation for the PDF. Default: PORTRAIT | OrientationEnum getOrientation() | setOrientation(OrientationEnum orientation) | -| `TruncateTables` | `Boolean` | Optional | When set to true, only the first page of the tables is displayed in the file.

This setting is applicable only when generating report for specific visualization ids. Default: false | Boolean getTruncateTables() | setTruncateTables(Boolean truncateTables) | -| `IncludeLogo` | `Boolean` | Optional | Include customized wide logo if available in the footer. Default: true | Boolean getIncludeLogo() | setIncludeLogo(Boolean includeLogo) | -| `FooterText` | `String` | Optional | Footer text to include in the footer of each page of the PDF. | String getFooterText() | setFooterText(String footerText) | -| `IncludePageNumber` | `Boolean` | Optional | When set to true, the page number is included in the footer of each page. Default: true | Boolean getIncludePageNumber() | setIncludePageNumber(Boolean includePageNumber) | -| `IncludeCoverPage` | `Boolean` | Optional | When set to true, a cover page with the Liveboard title is added in the PDF. Default: true | Boolean getIncludeCoverPage() | setIncludeCoverPage(Boolean includeCoverPage) | -| `IncludeFilterPage` | `Boolean` | Optional | When set to true, a second page with a list of all applied filters is added in the PDF. Default: true | Boolean getIncludeFilterPage() | setIncludeFilterPage(Boolean includeFilterPage) | - -## Example (as JSON) - -```json -{ - "orientation": null, - "truncateTables": null, - "includeLogo": null, - "footerText": null, - "includePageNumber": null, - "includeCoverPage": null, - "includeFilterPage": null -} -``` - diff --git a/Java/doc/models/permissions-type-search.md b/Java/doc/models/permissions-type-search.md deleted file mode 100644 index 1ceb431f9..000000000 --- a/Java/doc/models/permissions-type-search.md +++ /dev/null @@ -1,23 +0,0 @@ - -# Permissions Type Search - -## Structure - -`PermissionsTypeSearch` - -## Fields - -| Name | Type | Tags | Description | Getter | Setter | -| --- | --- | --- | --- | --- | --- | -| `Type` | `String` | Optional | Indicates the type of the object | String getType() | setType(String type) | -| `TsObject` | [`List`](../../doc/models/ts-object-type-serach.md) | Optional | An array of objects of type mentioned in type field | List getTsObject() | setTsObject(List tsObject) | - -## Example (as JSON) - -```json -{ - "type": null, - "tsObject": null -} -``` - diff --git a/Java/doc/models/pinboard-details.md b/Java/doc/models/pinboard-details.md deleted file mode 100644 index 75258657c..000000000 --- a/Java/doc/models/pinboard-details.md +++ /dev/null @@ -1,27 +0,0 @@ - -# Pinboard Details - -## Structure - -`PinboardDetails` - -## Fields - -| Name | Type | Tags | Description | Getter | Setter | -| --- | --- | --- | --- | --- | --- | -| `PinboardId` | `String` | Optional | pinboard id of recently pinned pinboard | String getPinboardId() | setPinboardId(String pinboardId) | -| `PinboardName` | `String` | Optional | pinboard name of recently pinned pinboard | String getPinboardName() | setPinboardName(String pinboardName) | -| `TabId` | `String` | Optional | tab id of recently pinned tab | String getTabId() | setTabId(String tabId) | -| `TabName` | `String` | Optional | tab name of recently pinned tab | String getTabName() | setTabName(String tabName) | - -## Example (as JSON) - -```json -{ - "pinboardId": null, - "pinboardName": null, - "tabId": null, - "tabName": null -} -``` - diff --git a/Java/doc/models/principal-search-response.md b/Java/doc/models/principal-search-response.md deleted file mode 100644 index 447f767b8..000000000 --- a/Java/doc/models/principal-search-response.md +++ /dev/null @@ -1,27 +0,0 @@ - -# Principal Search Response - -## Structure - -`PrincipalSearchResponse` - -## Fields - -| Name | Type | Tags | Description | Getter | Setter | -| --- | --- | --- | --- | --- | --- | -| `Id` | `String` | Optional | GUID of the user or user group | String getId() | setId(String id) | -| `Name` | `String` | Optional | Name of the user or user group | String getName() | setName(String name) | -| `Type` | `String` | Optional | Indicates the type of principal | String getType() | setType(String type) | -| `Permissions` | [`List`](../../doc/models/permissions-type-search.md) | Optional | Indicates the permission which user or user group has on the object | List getPermissions() | setPermissions(List permissions) | - -## Example (as JSON) - -```json -{ - "id": null, - "name": null, - "type": null, - "permissions": null -} -``` - diff --git a/Java/doc/models/privilege-enum.md b/Java/doc/models/privilege-enum.md deleted file mode 100644 index 7fc258dd8..000000000 --- a/Java/doc/models/privilege-enum.md +++ /dev/null @@ -1,31 +0,0 @@ - -# Privilege Enum - -## Enumeration - -`PrivilegeEnum` - -## Fields - -| Name | -| --- | -| `RANALYSIS` | -| `DATAMANAGEMENT` | -| `APPLICATIONADMINISTRATION` | -| `USERADMINISTRATION` | -| `SYSTEMMANAGEMENT` | -| `SYSTEMINFOADMINISTRATION` | -| `AUTHORING` | -| `BACKUPADMINISTRATION` | -| `SHAREWITHALL` | -| `DEVELOPER` | -| `JOBSCHEDULING` | -| `GROUPADMINISTRATION` | -| `BYPASSRLS` | -| `EXPERIMENTALFEATUREPRIVILEGE` | -| `A3ANALYSIS` | -| `USERDATAUPLOADING` | -| `DATADOWNLOADING` | -| `DISABLEPINBOARDCREATION` | -| `ADMINISTRATION` | - diff --git a/Java/doc/models/secuirity-dependents.md b/Java/doc/models/secuirity-dependents.md deleted file mode 100644 index e8a7b8db8..000000000 --- a/Java/doc/models/secuirity-dependents.md +++ /dev/null @@ -1,31 +0,0 @@ - -# Secuirity Dependents - -## Structure - -`SecuirityDependents` - -## Fields - -| Name | Type | Tags | Description | Getter | Setter | -| --- | --- | --- | --- | --- | --- | -| `Id` | `String` | Optional | GUID of the object | String getId() | setId(String id) | -| `Name` | `String` | Optional | Name of the object | String getName() | setName(String name) | -| `Type` | `String` | Optional | Indicates the type of the object | String getType() | setType(String type) | -| `Owner` | `String` | Optional | Owner of the object | String getOwner() | setOwner(String owner) | -| `Author` | [`UserNameAndID`](../../doc/models/user-name-and-id.md) | Optional | - | UserNameAndID getAuthor() | setAuthor(UserNameAndID author) | -| `Permissions` | [`List`](../../doc/models/dependent-permission.md) | Optional | - | List getPermissions() | setPermissions(List permissions) | - -## Example (as JSON) - -```json -{ - "id": null, - "name": null, - "type": null, - "owner": null, - "author": null, - "permissions": null -} -``` - diff --git a/Java/doc/models/security-permission-response.md b/Java/doc/models/security-permission-response.md deleted file mode 100644 index b19323f11..000000000 --- a/Java/doc/models/security-permission-response.md +++ /dev/null @@ -1,33 +0,0 @@ - -# Security Permission Response - -## Structure - -`SecurityPermissionResponse` - -## Fields - -| Name | Type | Tags | Description | Getter | Setter | -| --- | --- | --- | --- | --- | --- | -| `Id` | `String` | Optional | GUID of the object | String getId() | setId(String id) | -| `Name` | `String` | Optional | Name of the object | String getName() | setName(String name) | -| `Type` | `String` | Optional | Indicates the type of the object | String getType() | setType(String type) | -| `Owner` | `String` | Optional | GUID of the owner of the object | String getOwner() | setOwner(String owner) | -| `Author` | [`UserNameAndID`](../../doc/models/user-name-and-id.md) | Optional | - | UserNameAndID getAuthor() | setAuthor(UserNameAndID author) | -| `Permissions` | [`List`](../../doc/models/security-permission.md) | Optional | An array of object with details of permission on users and user groups | List getPermissions() | setPermissions(List permissions) | -| `Dependents` | [`List`](../../doc/models/secuirity-dependents.md) | Optional | The objects on which the primary object is dependent on | List getDependents() | setDependents(List dependents) | - -## Example (as JSON) - -```json -{ - "id": null, - "name": null, - "type": null, - "owner": null, - "author": null, - "permissions": null, - "dependents": null -} -``` - diff --git a/Java/doc/models/security-permission.md b/Java/doc/models/security-permission.md deleted file mode 100644 index 5a24a8715..000000000 --- a/Java/doc/models/security-permission.md +++ /dev/null @@ -1,31 +0,0 @@ - -# Security Permission - -## Structure - -`SecurityPermission` - -## Fields - -| Name | Type | Tags | Description | Getter | Setter | -| --- | --- | --- | --- | --- | --- | -| `Id` | `String` | Optional | GUID of the user or user group | String getId() | setId(String id) | -| `Name` | `String` | Optional | Name of the user or user group | String getName() | setName(String name) | -| `Type` | `String` | Optional | Indicates the type of principal | String getType() | setType(String type) | -| `Permission` | `String` | Optional | Indicates the permission which user or user group has on the object | String getPermission() | setPermission(String permission) | -| `SharedPermission` | `String` | Optional | Indicates the permission which user or user group has on the object through sharing of the object with this user or user group | String getSharedPermission() | setSharedPermission(String sharedPermission) | -| `GroupPermission` | [`List`](../../doc/models/group-permission.md) | Optional | An array of object with details of permission on the user groups to which the user or user group belongs | List getGroupPermission() | setGroupPermission(List groupPermission) | - -## Example (as JSON) - -```json -{ - "id": null, - "name": null, - "type": null, - "permission": null, - "sharedPermission": null, - "groupPermission": null -} -``` - diff --git a/Java/doc/models/session-login-response.md b/Java/doc/models/session-login-response.md deleted file mode 100644 index 8f3e3a705..000000000 --- a/Java/doc/models/session-login-response.md +++ /dev/null @@ -1,31 +0,0 @@ - -# Session Login Response - -Login response - -## Structure - -`SessionLoginResponse` - -## Fields - -| Name | Type | Tags | Description | Getter | Setter | -| --- | --- | --- | --- | --- | --- | -| `UserName` | `String` | Optional | Username of the user account for which token is generated | String getUserName() | setUserName(String userName) | -| `Token` | `String` | Optional | Bearer token generated. This will be blank when token type is Cookie | String getToken() | setToken(String token) | -| `TokenCreatedTime` | `String` | Optional | Date and time at which the token is generated | String getTokenCreatedTime() | setTokenCreatedTime(String tokenCreatedTime) | -| `TokenExpiryDuration` | `String` | Optional | Duration in seconds after which the token expires | String getTokenExpiryDuration() | setTokenExpiryDuration(String tokenExpiryDuration) | -| `TokenType` | `String` | Optional | Type of token generated | String getTokenType() | setTokenType(String tokenType) | - -## Example (as JSON) - -```json -{ - "userName": null, - "token": null, - "tokenCreatedTime": null, - "tokenExpiryDuration": null, - "tokenType": null -} -``` - diff --git a/Java/doc/models/sort-by-1-enum.md b/Java/doc/models/sort-by-1-enum.md deleted file mode 100644 index 2e494455d..000000000 --- a/Java/doc/models/sort-by-1-enum.md +++ /dev/null @@ -1,26 +0,0 @@ - -# Sort by 1 Enum - -Field based on which the re.sponse needs to be ordered. Valid values - -## Enumeration - -`SortBy1Enum` - -## Fields - -| Name | -| --- | -| `DEFAULT` | -| `NAME` | -| `DISPLAYNAME` | -| `AUTHOR` | -| `CREATED` | -| `MODIFIED` | -| `LASTACCESSED` | -| `SYNCED` | -| `VIEWS` | -| `NONE` | -| `USERSTATE` | -| `ROWCOUNT` | - diff --git a/Java/doc/models/sort-by-enum.md b/Java/doc/models/sort-by-enum.md deleted file mode 100644 index bb7335051..000000000 --- a/Java/doc/models/sort-by-enum.md +++ /dev/null @@ -1,26 +0,0 @@ - -# Sort by Enum - -Field based on which the response needs to be ordered. - -## Enumeration - -`SortByEnum` - -## Fields - -| Name | -| --- | -| `DEFAULT` | -| `NAME` | -| `DISPLAYNAME` | -| `AUTHOR` | -| `CREATED` | -| `MODIFIED` | -| `LASTACCESSED` | -| `SYNCED` | -| `VIEWS` | -| `NONE` | -| `USERSTATE` | -| `ROWCOUNT` | - diff --git a/Java/doc/models/sort-order-1-enum.md b/Java/doc/models/sort-order-1-enum.md deleted file mode 100644 index 123cd4b67..000000000 --- a/Java/doc/models/sort-order-1-enum.md +++ /dev/null @@ -1,17 +0,0 @@ - -# Sort Order 1 Enum - -Order in which sortBy should be applied. Valid values - -## Enumeration - -`SortOrder1Enum` - -## Fields - -| Name | -| --- | -| `DEFAULT` | -| `ASC` | -| `DESC` | - diff --git a/Java/doc/models/sort-order-enum.md b/Java/doc/models/sort-order-enum.md deleted file mode 100644 index 2e3885d85..000000000 --- a/Java/doc/models/sort-order-enum.md +++ /dev/null @@ -1,17 +0,0 @@ - -# Sort Order Enum - -Order in which sortBy should be applied. - -## Enumeration - -`SortOrderEnum` - -## Fields - -| Name | -| --- | -| `DEFAULT` | -| `ASC` | -| `DESC` | - diff --git a/Java/doc/models/state-1-enum.md b/Java/doc/models/state-1-enum.md deleted file mode 100644 index 33cec645b..000000000 --- a/Java/doc/models/state-1-enum.md +++ /dev/null @@ -1,19 +0,0 @@ - -# State 1 Enum - -Status of user account. acitve or inactive. - -## Enumeration - -`State1Enum` - -## Fields - -| Name | -| --- | -| `ACTIVE` | -| `INACTIVE` | -| `EXPIRED` | -| `LOCKED` | -| `PENDING` | - diff --git a/Java/doc/models/state-enum.md b/Java/doc/models/state-enum.md deleted file mode 100644 index 8448d4860..000000000 --- a/Java/doc/models/state-enum.md +++ /dev/null @@ -1,17 +0,0 @@ - -# State Enum - -## Enumeration - -`StateEnum` - -## Fields - -| Name | -| --- | -| `ACTIVE` | -| `INACTIVE` | -| `EXPIRED` | -| `LOCKED` | -| `PENDING` | - diff --git a/Java/doc/models/table-columns.md b/Java/doc/models/table-columns.md deleted file mode 100644 index 8a87d8ec2..000000000 --- a/Java/doc/models/table-columns.md +++ /dev/null @@ -1,23 +0,0 @@ - -# Table Columns - -## Structure - -`TableColumns` - -## Fields - -| Name | Type | Tags | Description | Getter | Setter | -| --- | --- | --- | --- | --- | --- | -| `Name` | `String` | Optional | Name of the column | String getName() | setName(String name) | -| `DataType` | `String` | Optional | Datatype of the column | String getDataType() | setDataType(String dataType) | - -## Example (as JSON) - -```json -{ - "name": null, - "dataType": null -} -``` - diff --git a/Java/doc/models/table-input.md b/Java/doc/models/table-input.md deleted file mode 100644 index 8b2c334b0..000000000 --- a/Java/doc/models/table-input.md +++ /dev/null @@ -1,23 +0,0 @@ - -# Table Input - -## Structure - -`TableInput` - -## Fields - -| Name | Type | Tags | Description | Getter | Setter | -| --- | --- | --- | --- | --- | --- | -| `Name` | `String` | Optional | Name of the table | String getName() | setName(String name) | -| `Id` | `String` | Optional | GUID of the Table | String getId() | setId(String id) | - -## Example (as JSON) - -```json -{ - "name": null, - "id": null -} -``` - diff --git a/Java/doc/models/table-list.md b/Java/doc/models/table-list.md deleted file mode 100644 index 17881382d..000000000 --- a/Java/doc/models/table-list.md +++ /dev/null @@ -1,53 +0,0 @@ - -# Table List - -## Structure - -`TableList` - -## Fields - -| Name | Type | Tags | Description | Getter | Setter | -| --- | --- | --- | --- | --- | --- | -| `Name` | `String` | Optional | Name of the table | String getName() | setName(String name) | -| `Type` | `String` | Optional | Type of the table | String getType() | setType(String type) | -| `Id` | `String` | Optional | GUID of the table | String getId() | setId(String id) | -| `DatabaseStripe` | `String` | Optional | Name of the database to which the table belongs | String getDatabaseStripe() | setDatabaseStripe(String databaseStripe) | -| `SchemaStripe` | `String` | Optional | Name of the schema to which the table belongs | String getSchemaStripe() | setSchemaStripe(String schemaStripe) | -| `IsExternal` | `Boolean` | Optional | - | Boolean getIsExternal() | setIsExternal(Boolean isExternal) | -| `IsDeprecated` | `Boolean` | Optional | Indicates if the table is deprecated | Boolean getIsDeprecated() | setIsDeprecated(Boolean isDeprecated) | -| `IsDeleted` | `Boolean` | Optional | Indicates if the table is deleted | Boolean getIsDeleted() | setIsDeleted(Boolean isDeleted) | -| `IsHidden` | `Boolean` | Optional | Indicates if the table is hideen | Boolean getIsHidden() | setIsHidden(Boolean isHidden) | -| `IndexVersion` | `Double` | Optional | - | Double getIndexVersion() | setIndexVersion(Double indexVersion) | -| `GenerationNum` | `Double` | Optional | - | Double getGenerationNum() | setGenerationNum(Double generationNum) | -| `Created` | `String` | Optional | Date and time when the table was created | String getCreated() | setCreated(String created) | -| `Modified` | `String` | Optional | Date and time of last modification of the table | String getModified() | setModified(String modified) | -| `Author` | [`UserNameAndID`](../../doc/models/user-name-and-id.md) | Optional | - | UserNameAndID getAuthor() | setAuthor(UserNameAndID author) | -| `ModifiedBy` | [`UserNameAndID`](../../doc/models/user-name-and-id.md) | Optional | - | UserNameAndID getModifiedBy() | setModifiedBy(UserNameAndID modifiedBy) | -| `Owner` | [`UserNameAndID`](../../doc/models/user-name-and-id.md) | Optional | - | UserNameAndID getOwner() | setOwner(UserNameAndID owner) | -| `Tags` | `List` | Optional | List of tags assigned to the table | List getTags() | setTags(List tags) | - -## Example (as JSON) - -```json -{ - "name": null, - "type": null, - "id": null, - "databaseStripe": null, - "schemaStripe": null, - "isExternal": null, - "isDeprecated": null, - "isDeleted": null, - "isHidden": null, - "indexVersion": null, - "generationNum": null, - "created": null, - "modified": null, - "author": null, - "modifiedBy": null, - "owner": null, - "tags": null -} -``` - diff --git a/Java/doc/models/tag-name-and-id-input.md b/Java/doc/models/tag-name-and-id-input.md deleted file mode 100644 index f03c5a425..000000000 --- a/Java/doc/models/tag-name-and-id-input.md +++ /dev/null @@ -1,23 +0,0 @@ - -# Tag Name and Id Input - -## Structure - -`TagNameAndIdInput` - -## Fields - -| Name | Type | Tags | Description | Getter | Setter | -| --- | --- | --- | --- | --- | --- | -| `Name` | `String` | Optional | Name of the tags | String getName() | setName(String name) | -| `Id` | `String` | Optional | GUID of the tags | String getId() | setId(String id) | - -## Example (as JSON) - -```json -{ - "name": null, - "id": null -} -``` - diff --git a/Java/doc/models/tag-name-and-id.md b/Java/doc/models/tag-name-and-id.md deleted file mode 100644 index cc63ad223..000000000 --- a/Java/doc/models/tag-name-and-id.md +++ /dev/null @@ -1,23 +0,0 @@ - -# Tag Name and ID - -## Structure - -`TagNameAndID` - -## Fields - -| Name | Type | Tags | Description | Getter | Setter | -| --- | --- | --- | --- | --- | --- | -| `Name` | `String` | Optional | Name of the group to which group is added | String getName() | setName(String name) | -| `Id` | `String` | Optional | GUID of the group to which group is added | String getId() | setId(String id) | - -## Example (as JSON) - -```json -{ - "name": null, - "id": null -} -``` - diff --git a/Java/doc/models/to-user-name-and-id-input.md b/Java/doc/models/to-user-name-and-id-input.md deleted file mode 100644 index b88cb9c2a..000000000 --- a/Java/doc/models/to-user-name-and-id-input.md +++ /dev/null @@ -1,25 +0,0 @@ - -# To User Name and ID Input - -A JSON object of name or GUIDs of the new owner for the objects. When both are given then id is considered. - -## Structure - -`ToUserNameAndIDInput` - -## Fields - -| Name | Type | Tags | Description | Getter | Setter | -| --- | --- | --- | --- | --- | --- | -| `Name` | `String` | Optional | Username of the user | String getName() | setName(String name) | -| `Id` | `String` | Optional | GUID of the user | String getId() | setId(String id) | - -## Example (as JSON) - -```json -{ - "name": null, - "id": null -} -``` - diff --git a/Java/doc/models/topic-enum.md b/Java/doc/models/topic-enum.md deleted file mode 100644 index 660921349..000000000 --- a/Java/doc/models/topic-enum.md +++ /dev/null @@ -1,13 +0,0 @@ - -# Topic Enum - -## Enumeration - -`TopicEnum` - -## Fields - -| Name | -| --- | -| `SecurityLogs` | - diff --git a/Java/doc/models/ts-object-input.md b/Java/doc/models/ts-object-input.md deleted file mode 100644 index 3275aff34..000000000 --- a/Java/doc/models/ts-object-input.md +++ /dev/null @@ -1,23 +0,0 @@ - -# Ts Object Input - -## Structure - -`TsObjectInput` - -## Fields - -| Name | Type | Tags | Description | Getter | Setter | -| --- | --- | --- | --- | --- | --- | -| `Id` | `String` | Required | GUID of the metadata object | String getId() | setId(String id) | -| `Type` | [`TypeEnum`](../../doc/models/type-enum.md) | Required | Type of the metadata object | TypeEnum getType() | setType(TypeEnum type) | - -## Example (as JSON) - -```json -{ - "id": "id0", - "type": "DATAOBJECT" -} -``` - diff --git a/Java/doc/models/ts-object-search-input.md b/Java/doc/models/ts-object-search-input.md deleted file mode 100644 index 405a030f0..000000000 --- a/Java/doc/models/ts-object-search-input.md +++ /dev/null @@ -1,25 +0,0 @@ - -# Ts Object Search Input - -## Structure - -`TsObjectSearchInput` - -## Fields - -| Name | Type | Tags | Description | Getter | Setter | -| --- | --- | --- | --- | --- | --- | -| `Type` | [`Type2Enum`](../../doc/models/type-2-enum.md) | Required | Type of the metadata objec | Type2Enum getType() | setType(Type2Enum type) | -| `Id` | `List` | Required | A JSON Array of GUIDs of the metadata object | List getId() | setId(List id) | - -## Example (as JSON) - -```json -{ - "type": "DATAOBJECT", - "id": [ - "id0" - ] -} -``` - diff --git a/Java/doc/models/ts-object-type-serach.md b/Java/doc/models/ts-object-type-serach.md deleted file mode 100644 index 970d7cddd..000000000 --- a/Java/doc/models/ts-object-type-serach.md +++ /dev/null @@ -1,33 +0,0 @@ - -# Ts Object Type Serach - -## Structure - -`TsObjectTypeSerach` - -## Fields - -| Name | Type | Tags | Description | Getter | Setter | -| --- | --- | --- | --- | --- | --- | -| `Id` | `String` | Optional | GUID of the object | String getId() | setId(String id) | -| `Name` | `String` | Optional | Name of the object | String getName() | setName(String name) | -| `Owner` | `String` | Optional | Owner of the object | String getOwner() | setOwner(String owner) | -| `Author` | [`UserNameAndID`](../../doc/models/user-name-and-id.md) | Optional | - | UserNameAndID getAuthor() | setAuthor(UserNameAndID author) | -| `Permission` | `String` | Optional | Indicates the permission which user or user group has on the object | String getPermission() | setPermission(String permission) | -| `SharedPermission` | `String` | Optional | Indicates the permission which user or user group has on the object through sharing of the object with the user or user group | String getSharedPermission() | setSharedPermission(String sharedPermission) | -| `GroupPermission` | [`List`](../../doc/models/group-permission.md) | Optional | An array of object with details of permission on the user groups to which the user or user group belongs | List getGroupPermission() | setGroupPermission(List groupPermission) | - -## Example (as JSON) - -```json -{ - "id": null, - "name": null, - "owner": null, - "author": null, - "permission": null, - "sharedPermission": null, - "groupPermission": null -} -``` - diff --git a/Java/doc/models/tspublic-rest-v2-admin-assignauthor-request.md b/Java/doc/models/tspublic-rest-v2-admin-assignauthor-request.md deleted file mode 100644 index 8974bd6e2..000000000 --- a/Java/doc/models/tspublic-rest-v2-admin-assignauthor-request.md +++ /dev/null @@ -1,29 +0,0 @@ - -# Tspublic Rest V2 Admin Assignauthor Request - -## Structure - -`TspublicRestV2AdminAssignauthorRequest` - -## Fields - -| Name | Type | Tags | Description | Getter | Setter | -| --- | --- | --- | --- | --- | --- | -| `TsObjectId` | `List` | Required | A JSON array of GUIDs of the metadata objects. | List getTsObjectId() | setTsObjectId(List tsObjectId) | -| `Name` | `String` | Optional | User name of the user account | String getName() | setName(String name) | -| `Id` | `String` | Optional | The GUID of the user account | String getId() | setId(String id) | - -## Example (as JSON) - -```json -{ - "tsObjectId": [ - "tsObjectId1", - "tsObjectId2", - "tsObjectId3" - ], - "name": null, - "id": null -} -``` - diff --git a/Java/doc/models/tspublic-rest-v2-admin-changeauthor-request.md b/Java/doc/models/tspublic-rest-v2-admin-changeauthor-request.md deleted file mode 100644 index c96b63ced..000000000 --- a/Java/doc/models/tspublic-rest-v2-admin-changeauthor-request.md +++ /dev/null @@ -1,35 +0,0 @@ - -# Tspublic Rest V2 Admin Changeauthor Request - -## Structure - -`TspublicRestV2AdminChangeauthorRequest` - -## Fields - -| Name | Type | Tags | Description | Getter | Setter | -| --- | --- | --- | --- | --- | --- | -| `TsObjectId` | `List` | Required | A JSON array of GUIDs of the metadata objects.

To change owner of all the objects owned by a user, provide single input as ALL.

If multiple object ids along with ALL is provided as input, then ALL will be considered. | List getTsObjectId() | setTsObjectId(List tsObjectId) | -| `FromUser` | [`FromUserNameAndIDInput`](../../doc/models/from-user-name-and-id-input.md) | Required | A JSON object of name or GUIDs of the current owner of the objects. When both are given then id is considered.

If a list of object ids are provided as input for TsObjectId, then only for those ids that have owner as the value provided in fromUser, the owner will be changed.

Provide either name or id as input. When both are given user id will be considered. | FromUserNameAndIDInput getFromUser() | setFromUser(FromUserNameAndIDInput fromUser) | -| `ToUser` | [`ToUserNameAndIDInput`](../../doc/models/to-user-name-and-id-input.md) | Required | A JSON object of name or GUIDs of the new owner for the objects. When both are given then id is considered. | ToUserNameAndIDInput getToUser() | setToUser(ToUserNameAndIDInput toUser) | - -## Example (as JSON) - -```json -{ - "tsObjectId": [ - "tsObjectId1", - "tsObjectId2", - "tsObjectId3" - ], - "fromUser": { - "name": null, - "id": null - }, - "toUser": { - "name": null, - "id": null - } -} -``` - diff --git a/Java/doc/models/tspublic-rest-v2-admin-configuration-update-request.md b/Java/doc/models/tspublic-rest-v2-admin-configuration-update-request.md deleted file mode 100644 index cf149c718..000000000 --- a/Java/doc/models/tspublic-rest-v2-admin-configuration-update-request.md +++ /dev/null @@ -1,21 +0,0 @@ - -# Tspublic Rest V2 Admin Configuration Update Request - -## Structure - -`TspublicRestV2AdminConfigurationUpdateRequest` - -## Fields - -| Name | Type | Tags | Description | Getter | Setter | -| --- | --- | --- | --- | --- | --- | -| `Configuration` | `String` | Optional | A JSON file with the key-value pair of configuration attributes to be updated.

Example: {"defaultChartDataSize": 5000} | String getConfiguration() | setConfiguration(String configuration) | - -## Example (as JSON) - -```json -{ - "configuration": null -} -``` - diff --git a/Java/doc/models/tspublic-rest-v2-admin-forcelogout-request.md b/Java/doc/models/tspublic-rest-v2-admin-forcelogout-request.md deleted file mode 100644 index 8c40fea0e..000000000 --- a/Java/doc/models/tspublic-rest-v2-admin-forcelogout-request.md +++ /dev/null @@ -1,21 +0,0 @@ - -# Tspublic Rest V2 Admin Forcelogout Request - -## Structure - -`TspublicRestV2AdminForcelogoutRequest` - -## Fields - -| Name | Type | Tags | Description | Getter | Setter | -| --- | --- | --- | --- | --- | --- | -| `User` | [`List`](../../doc/models/name-and-id-input.md) | Optional | A JSON array of name of users or GUIDs of groups or both. When both are given then id is considered. | List getUser() | setUser(List user) | - -## Example (as JSON) - -```json -{ - "user": null -} -``` - diff --git a/Java/doc/models/tspublic-rest-v2-admin-resetpassword-request.md b/Java/doc/models/tspublic-rest-v2-admin-resetpassword-request.md deleted file mode 100644 index 4e6dc883c..000000000 --- a/Java/doc/models/tspublic-rest-v2-admin-resetpassword-request.md +++ /dev/null @@ -1,25 +0,0 @@ - -# Tspublic Rest V2 Admin Resetpassword Request - -## Structure - -`TspublicRestV2AdminResetpasswordRequest` - -## Fields - -| Name | Type | Tags | Description | Getter | Setter | -| --- | --- | --- | --- | --- | --- | -| `Name` | `String` | Optional | User name of the user account | String getName() | setName(String name) | -| `Id` | `String` | Optional | The GUID of the user account to query. | String getId() | setId(String id) | -| `NewPassword` | `String` | Required | A new password for the user. | String getNewPassword() | setNewPassword(String newPassword) | - -## Example (as JSON) - -```json -{ - "name": null, - "id": null, - "newPassword": "newPassword6" -} -``` - diff --git a/Java/doc/models/tspublic-rest-v2-admin-syncprincipal-request.md b/Java/doc/models/tspublic-rest-v2-admin-syncprincipal-request.md deleted file mode 100644 index f665f54d6..000000000 --- a/Java/doc/models/tspublic-rest-v2-admin-syncprincipal-request.md +++ /dev/null @@ -1,40 +0,0 @@ - -# Tspublic Rest V2 Admin Syncprincipal Request - -## Structure - -`TspublicRestV2AdminSyncprincipalRequest` - -## Fields - -| Name | Type | Tags | Description | Getter | Setter | -| --- | --- | --- | --- | --- | --- | -| `PrincipalObject` | `List` | Required | A JSON array of principal objects containing all users and groups present in the external system.

Example:

{

"name": "Customer Success",

"displayName": "Customer Success",

"description": "CS",

"created": 1568926267025,

"modified": 1568926982242,

"principalTypeEnum": "LOCAL_GROUP",

"groupNames": [],

"visibility": "DEFAULT"

},

{

"name": "test",

"displayName": "test one",

"created": 1587573621279,

"modified": 1587573621674,

"mail": "test2@test.com",

"principalTypeEnum": "LOCAL_USER",

"groupNames": [ "Administrator", "All" ],

"visibility": "DEFAULT"

}

You can leave the created and modified dates blank for new users.

You can specify if the principal is a user (LOCAL_USER) or user group (LOCAL_GROUP) in the principalTypeEnum keyword.

Set visibility to NON_SHARABLE, if you do not want the user to be able to share ThoughtSpot objects with other users in this group. | List getPrincipalObject() | setPrincipalObject(List principalObject) | -| `UpdateModified` | `Boolean` | Optional | Specifies whether to apply the changes to users and groups already in the cluster based on the principal object list input.
**Default**: `false` | Boolean getUpdateModified() | setUpdateModified(Boolean updateModified) | -| `DeleteRemoved` | `Boolean` | Optional | Specifies whether to delete the users and groups already in the cluster if not present in the principal object list input.
**Default**: `false` | Boolean getDeleteRemoved() | setDeleteRemoved(Boolean deleteRemoved) | -| `NewUserPassword` | `String` | Optional | Assign a password for new users added during the sync operation.

All new users added will have this password. It is mandatory to provide value for this field if new users are included in the input list. | String getNewUserPassword() | setNewUserPassword(String newUserPassword) | - -## Example (as JSON) - -```json -{ - "principalObject": [ - { - "key1": "val1", - "key2": "val2" - }, - { - "key1": "val1", - "key2": "val2" - }, - { - "key1": "val1", - "key2": "val2" - } - ], - "updateModified": null, - "deleteRemoved": null, - "newUserPassword": null -} -``` - diff --git a/Java/doc/models/tspublic-rest-v2-connection-addtable-request.md b/Java/doc/models/tspublic-rest-v2-connection-addtable-request.md deleted file mode 100644 index f5635b6bb..000000000 --- a/Java/doc/models/tspublic-rest-v2-connection-addtable-request.md +++ /dev/null @@ -1,35 +0,0 @@ - -# Tspublic Rest V2 Connection Addtable Request - -## Structure - -`TspublicRestV2ConnectionAddtableRequest` - -## Fields - -| Name | Type | Tags | Description | Getter | Setter | -| --- | --- | --- | --- | --- | --- | -| `Id` | `String` | Required | GUID of the connection | String getId() | setId(String id) | -| `Table` | [`List`](../../doc/models/add-table-input.md) | Required | A JSON array of table details | List getTable() | setTable(List table) | - -## Example (as JSON) - -```json -{ - "id": "id0", - "table": [ - { - "name": "name6", - "dbName": "dbName4", - "schemaName": "schemaName0", - "columns": [ - { - "name": "name6", - "dataType": "dataType8" - } - ] - } - ] -} -``` - diff --git a/Java/doc/models/tspublic-rest-v2-connection-create-request.md b/Java/doc/models/tspublic-rest-v2-connection-create-request.md deleted file mode 100644 index d39d7d5b0..000000000 --- a/Java/doc/models/tspublic-rest-v2-connection-create-request.md +++ /dev/null @@ -1,27 +0,0 @@ - -# Tspublic Rest V2 Connection Create Request - -## Structure - -`TspublicRestV2ConnectionCreateRequest` - -## Fields - -| Name | Type | Tags | Description | Getter | Setter | -| --- | --- | --- | --- | --- | --- | -| `Type` | [`Type14Enum`](../../doc/models/type-14-enum.md) | Required | Type of the data connection. | Type14Enum getType() | setType(Type14Enum type) | -| `Name` | `String` | Required | Name of the connection | String getName() | setName(String name) | -| `Description` | `String` | Optional | A short description of the connection. | String getDescription() | setDescription(String description) | -| `Configuration` | `String` | Required | A JSON object of the connection metadata. The metadata must include configuration attributes required to create the connection. | String getConfiguration() | setConfiguration(String configuration) | - -## Example (as JSON) - -```json -{ - "type": "DENODO", - "name": "name0", - "description": null, - "configuration": "configuration6" -} -``` - diff --git a/Java/doc/models/tspublic-rest-v2-connection-removetable-request.md b/Java/doc/models/tspublic-rest-v2-connection-removetable-request.md deleted file mode 100644 index f64f3ddaf..000000000 --- a/Java/doc/models/tspublic-rest-v2-connection-removetable-request.md +++ /dev/null @@ -1,28 +0,0 @@ - -# Tspublic Rest V2 Connection Removetable Request - -## Structure - -`TspublicRestV2ConnectionRemovetableRequest` - -## Fields - -| Name | Type | Tags | Description | Getter | Setter | -| --- | --- | --- | --- | --- | --- | -| `Id` | `String` | Required | GUID of the connection | String getId() | setId(String id) | -| `Table` | [`List`](../../doc/models/table-input.md) | Required | A JSON array of name or GUIDs of the table or both. At least one input is required. Provide either table name or id. When both are given then id is considered | List getTable() | setTable(List table) | - -## Example (as JSON) - -```json -{ - "id": "id0", - "table": [ - { - "name": null, - "id": null - } - ] -} -``` - diff --git a/Java/doc/models/tspublic-rest-v2-connection-search-request.md b/Java/doc/models/tspublic-rest-v2-connection-search-request.md deleted file mode 100644 index 651c135f5..000000000 --- a/Java/doc/models/tspublic-rest-v2-connection-search-request.md +++ /dev/null @@ -1,39 +0,0 @@ - -# Tspublic Rest V2 Connection Search Request - -## Structure - -`TspublicRestV2ConnectionSearchRequest` - -## Fields - -| Name | Type | Tags | Description | Getter | Setter | -| --- | --- | --- | --- | --- | --- | -| `Offset` | `Integer` | Optional | The offset point, starting from where the records should be included in the response. If no input is provided then offset starts from 0
**Default**: `0` | Integer getOffset() | setOffset(Integer offset) | -| `BatchNumber` | `Integer` | Optional | An alternate way to set offset for the starting point of the response. Offset field should be kept blank to use the value from this field. Offset value will be calculated as (batchNumber - 1) * batchSize. It is mandatory to provide a value for batchSize with batchNumber. Example: Assume response has 100 records. Now, batchNumber is set as 2 and batchSize as 10, then offset value will be 10. So, 10 records starting from 11th record will be considered.
**Default**: `-1` | Integer getBatchNumber() | setBatchNumber(Integer batchNumber) | -| `BatchSize` | `Integer` | Optional | The number of records that should be included in the response starting from offset position. If no input is provided, then all records starting from the value provided in offset is included in the response.
**Default**: `-1` | Integer getBatchSize() | setBatchSize(Integer batchSize) | -| `SortBy` | [`SortBy1Enum`](../../doc/models/sort-by-1-enum.md) | Optional | Field based on which the re.sponse needs to be ordered. Valid values
**Default**: `SortBy1Enum.DEFAULT` | SortBy1Enum getSortBy() | setSortBy(SortBy1Enum sortBy) | -| `SortOrder` | [`SortOrder1Enum`](../../doc/models/sort-order-1-enum.md) | Optional | Order in which sortBy should be applied. Valid values | SortOrder1Enum getSortOrder() | setSortOrder(SortOrder1Enum sortOrder) | -| `Type` | [`Type15Enum`](../../doc/models/type-15-enum.md) | Required | Type of the connect being searched. Valid values: SNOWFLAKE\|AMAZON_REDSHIFT\|GOOGLE_BIGQUERY\|AZURE_SYNAPSE\|TERADATA\|STARBURST\|SAP_HANA\|ORACLE_ADW\|DATABRICKS\|DENODO | Type15Enum getType() | setType(Type15Enum type) | -| `NamePattern` | `String` | Optional | A pattern to match the name of the connection. This parameter supports matching case-insensitive strings. For a wildcard match, use %. | String getNamePattern() | setNamePattern(String namePattern) | -| `FetchId` | `List` | Optional | A JSON array containing the GUIDs of the connections that you want to fetch. | List getFetchId() | setFetchId(List fetchId) | -| `SkipId` | `List` | Optional | A JSON array containing the GUIDs of the connections that you want to skip. | List getSkipId() | setSkipId(List skipId) | -| `Tag` | [`List`](../../doc/models/tag-name-and-id-input.md) | Optional | A JSON array of name or GUID of tags or both. When both are given then id is considered | List getTag() | setTag(List tag) | - -## Example (as JSON) - -```json -{ - "offset": null, - "batchNumber": null, - "batchSize": null, - "sortBy": null, - "sortOrder": null, - "type": "DENODO", - "namePattern": null, - "fetchId": null, - "skipId": null, - "tag": null -} -``` - diff --git a/Java/doc/models/tspublic-rest-v2-connection-table-request.md b/Java/doc/models/tspublic-rest-v2-connection-table-request.md deleted file mode 100644 index 587b08716..000000000 --- a/Java/doc/models/tspublic-rest-v2-connection-table-request.md +++ /dev/null @@ -1,25 +0,0 @@ - -# Tspublic Rest V2 Connection Table Request - -## Structure - -`TspublicRestV2ConnectionTableRequest` - -## Fields - -| Name | Type | Tags | Description | Getter | Setter | -| --- | --- | --- | --- | --- | --- | -| `Id` | `String` | Required | The GUID of the connection | String getId() | setId(String id) | -| `Configuration` | `String` | Optional | A JSON object of the connection metadata. If this field is left empty, then the configuration saved in the connection is considered.

To get the tables based on a different configuration, include required attributes in the connection configuration JSON.

Example:

Get tables from Snowflake with a different user account than specified in the connection: {"user":"test_user","password":"test_pwd","role":"test_role"}

Get tables from Redshift for different database than specified in the connection: {"database":"test_db"} | String getConfiguration() | setConfiguration(String configuration) | -| `IncludeColumn` | `Boolean` | Optional | When set to true, the response will include column level details as well
**Default**: `true` | Boolean getIncludeColumn() | setIncludeColumn(Boolean includeColumn) | - -## Example (as JSON) - -```json -{ - "id": "id0", - "configuration": null, - "includeColumn": null -} -``` - diff --git a/Java/doc/models/tspublic-rest-v2-connection-tablecoloumn-request.md b/Java/doc/models/tspublic-rest-v2-connection-tablecoloumn-request.md deleted file mode 100644 index a704449b2..000000000 --- a/Java/doc/models/tspublic-rest-v2-connection-tablecoloumn-request.md +++ /dev/null @@ -1,31 +0,0 @@ - -# Tspublic Rest V2 Connection Tablecoloumn Request - -## Structure - -`TspublicRestV2ConnectionTablecoloumnRequest` - -## Fields - -| Name | Type | Tags | Description | Getter | Setter | -| --- | --- | --- | --- | --- | --- | -| `Id` | `String` | Required | The GUID of the connection | String getId() | setId(String id) | -| `Configuration` | `String` | Optional | A JSON object of the connection metadata. If this field is left empty, then the configuration saved in the connection is considered.

To get the tables based on a different configuration, include required attributes in the connection configuration JSON.

Example:

Get tables from Snowflake with a different user account than specified in the connection: {"user":"test_user","password":"test_pwd","role":"test_role"}

Get tables from Redshift for different database than specified in the connection: {"database":"test_db"} | String getConfiguration() | setConfiguration(String configuration) | -| `Table` | [`List`](../../doc/models/connection-table-columns-input.md) | Required | List of table details | List getTable() | setTable(List table) | - -## Example (as JSON) - -```json -{ - "id": "id0", - "configuration": null, - "table": [ - { - "dbName": "dbName4", - "schemaName": "schemaName0", - "name": "name6" - } - ] -} -``` - diff --git a/Java/doc/models/tspublic-rest-v2-connection-update-request.md b/Java/doc/models/tspublic-rest-v2-connection-update-request.md deleted file mode 100644 index 6c5d725ee..000000000 --- a/Java/doc/models/tspublic-rest-v2-connection-update-request.md +++ /dev/null @@ -1,27 +0,0 @@ - -# Tspublic Rest V2 Connection Update Request - -## Structure - -`TspublicRestV2ConnectionUpdateRequest` - -## Fields - -| Name | Type | Tags | Description | Getter | Setter | -| --- | --- | --- | --- | --- | --- | -| `Id` | `String` | Required | GUID of the connection | String getId() | setId(String id) | -| `Name` | `String` | Optional | The text to update the name of the connection. | String getName() | setName(String name) | -| `Description` | `String` | Optional | The text to update the description of the connection. | String getDescription() | setDescription(String description) | -| `Configuration` | `String` | Required | A JSON object of the connection metadata. Include all the configuration attributes with original value along with the changes required to any attribute. | String getConfiguration() | setConfiguration(String configuration) | - -## Example (as JSON) - -```json -{ - "id": "id0", - "name": null, - "description": null, - "configuration": "configuration6" -} -``` - diff --git a/Java/doc/models/tspublic-rest-v2-customaction-association-update-request.md b/Java/doc/models/tspublic-rest-v2-customaction-association-update-request.md deleted file mode 100644 index 657039d56..000000000 --- a/Java/doc/models/tspublic-rest-v2-customaction-association-update-request.md +++ /dev/null @@ -1,23 +0,0 @@ - -# Tspublic Rest V2 Customaction Association Update Request - -## Structure - -`TspublicRestV2CustomactionAssociationUpdateRequest` - -## Fields - -| Name | Type | Tags | Description | Getter | Setter | -| --- | --- | --- | --- | --- | --- | -| `Id` | `String` | Required | GUID of the custom action | String getId() | setId(String id) | -| `Association` | `String` | Required | A JSON map of the attributes with association of the action to ThoughtSpot object ID

Example:

{"id":"0dbd5b3a-84c1-4407-9803-cf07d67e6fcf","name":"My worksheet action","version":"v2","type":"URL","detail":{"link":"https://unpkg.com","function":"my-worksheet-action","authSelect":"NONE","authToken":"","encodeUser":"","apiKey":"X-API-KEY","apiValue":"","additionalUrlHeaders":"{}"},"actionAssociationMap":{"WORKSHEET":{"2b9d083a-275c-4984-9cfe-90b036affa17":{"enabled":"true","context":"PRIMARY"}}},"context":"NONE","availability":[ ],"userGroupList":["d0326b56-ef23-4c8a-8327-a30e99bcc72b"]} | String getAssociation() | setAssociation(String association) | - -## Example (as JSON) - -```json -{ - "id": "id0", - "association": "association0" -} -``` - diff --git a/Java/doc/models/tspublic-rest-v2-customaction-create-request.md b/Java/doc/models/tspublic-rest-v2-customaction-create-request.md deleted file mode 100644 index acb3a7e7b..000000000 --- a/Java/doc/models/tspublic-rest-v2-customaction-create-request.md +++ /dev/null @@ -1,21 +0,0 @@ - -# Tspublic Rest V2 Customaction Create Request - -## Structure - -`TspublicRestV2CustomactionCreateRequest` - -## Fields - -| Name | Type | Tags | Description | Getter | Setter | -| --- | --- | --- | --- | --- | --- | -| `Configuration` | `String` | Required | A JSON object with the key-value pair of configuration attributes

Example:

{"id":"3f7eac93-cce1-4ffc-b7a8-429353edbc6b","name":"unpkg test","version":"v2","type":"URL","detail":{"link":"https://unpkg.com ","function":"unpkg-test","authSelect":"BEARER","authToken":"asdfasadf3q4534534","encodeUser":"","apiKey":"X-API-KEY","apiValue":"","additionalUrlHeaders":"{\\"url_header1\\":{\\"id\\":\\"6a82908c-9328-40ff-b347-65adeda12f57\\",\\"key\\":\\"key1\\",\\"value\\":\\"value1\\"}}"},"actionAssociationMap":{"ANSWER":{"e4079d3f-ae71-4b0a-a70a-f17ecaf157a5":{"enabled":"true","context":"MENU"}}},"context":"NONE","availability":["GLOBAL"],"userGroupList":["d0326b56-ef23-4c8a-8327-a30e99bcc72b"]} | String getConfiguration() | setConfiguration(String configuration) | - -## Example (as JSON) - -```json -{ - "configuration": "configuration6" -} -``` - diff --git a/Java/doc/models/tspublic-rest-v2-customaction-search-request.md b/Java/doc/models/tspublic-rest-v2-customaction-search-request.md deleted file mode 100644 index f5eead22d..000000000 --- a/Java/doc/models/tspublic-rest-v2-customaction-search-request.md +++ /dev/null @@ -1,21 +0,0 @@ - -# Tspublic Rest V2 Customaction Search Request - -## Structure - -`TspublicRestV2CustomactionSearchRequest` - -## Fields - -| Name | Type | Tags | Description | Getter | Setter | -| --- | --- | --- | --- | --- | --- | -| `Tag` | `List` | Optional | A JSON array of tag GUIDs.

If tags are applied to worksheets, search answers, or Liveboard visualizations, and custom actions are associated to these objects, you can use this parameter to filter the custom action data by tags. | List getTag() | setTag(List tag) | - -## Example (as JSON) - -```json -{ - "tag": null -} -``` - diff --git a/Java/doc/models/tspublic-rest-v2-customaction-update-request.md b/Java/doc/models/tspublic-rest-v2-customaction-update-request.md deleted file mode 100644 index d99f136c1..000000000 --- a/Java/doc/models/tspublic-rest-v2-customaction-update-request.md +++ /dev/null @@ -1,23 +0,0 @@ - -# Tspublic Rest V2 Customaction Update Request - -## Structure - -`TspublicRestV2CustomactionUpdateRequest` - -## Fields - -| Name | Type | Tags | Description | Getter | Setter | -| --- | --- | --- | --- | --- | --- | -| `Id` | `String` | Required | GUID of the custom action | String getId() | setId(String id) | -| `Configuration` | `String` | Required | A JSON object with the key-value pair of configuration attributes

Example:

{"id":"3f7eac93-cce1-4ffc-b7a8-429353edbc6b","name":"unpkg test","version":"v2","type":"URL","detail":{"link":"https://unpkg.com ","function":"unpkg-test","authSelect":"BEARER","authToken":"asdfasadf3q4534534","encodeUser":"","apiKey":"X-API-KEY","apiValue":"","additionalUrlHeaders":"{\\"url_header1\\":{\\"id\\":\\"6a82908c-9328-40ff-b347-65adeda12f57\\",\\"key\\":\\"key1\\",\\"value\\":\\"value1\\"}}"},"actionAssociationMap":{"ANSWER":{"e4079d3f-ae71-4b0a-a70a-f17ecaf157a5":{"enabled":"true","context":"MENU"}}},"context":"NONE","availability":["GLOBAL"],"userGroupList":["d0326b56-ef23-4c8a-8327-a30e99bcc72b"]} | String getConfiguration() | setConfiguration(String configuration) | - -## Example (as JSON) - -```json -{ - "id": "id0", - "configuration": "configuration6" -} -``` - diff --git a/Java/doc/models/tspublic-rest-v2-data-answer-request.md b/Java/doc/models/tspublic-rest-v2-data-answer-request.md deleted file mode 100644 index 63254f0c5..000000000 --- a/Java/doc/models/tspublic-rest-v2-data-answer-request.md +++ /dev/null @@ -1,29 +0,0 @@ - -# Tspublic Rest V2 Data Answer Request - -## Structure - -`TspublicRestV2DataAnswerRequest` - -## Fields - -| Name | Type | Tags | Description | Getter | Setter | -| --- | --- | --- | --- | --- | --- | -| `Offset` | `Integer` | Optional | The offset point, starting from where the records should be included in the response.

If no input is provided then offset starts from 0.
**Default**: `0` | Integer getOffset() | setOffset(Integer offset) | -| `BatchNumber` | `Integer` | Optional | An alternate way to set offset for the starting point of the response.

The value in offset field will not be considered if batchNumber field has value greater than 0.

Offset value will be calculated as (batchNumber - 1) * batchSize.

It is mandatory to provide a value for batchSize with batchNumber.

Example:

Assume response has 100 records. Now, batchNumber is set as 2 and batchSize as 10, then offset value will be 10. So, 10 records starting from 11th record will be considered.
**Default**: `-1` | Integer getBatchNumber() | setBatchNumber(Integer batchNumber) | -| `BatchSize` | `Integer` | Optional | The number of records that should be included in the response starting from offset position.

If no input is provided, then all records starting from the value provided in offset is included in the response
**Default**: `-1` | Integer getBatchSize() | setBatchSize(Integer batchSize) | -| `Id` | `String` | Required | The GUID of the Answer | String getId() | setId(String id) | -| `FormatType` | [`FormatTypeEnum`](../../doc/models/format-type-enum.md) | Optional | The format of the data in the response.

FULL: The response comes in "column":"value" format.

COMPACT: The response includes only the value of the columns.
**Default**: `FormatTypeEnum.COMPACT` | FormatTypeEnum getFormatType() | setFormatType(FormatTypeEnum formatType) | - -## Example (as JSON) - -```json -{ - "offset": null, - "batchNumber": null, - "batchSize": null, - "id": "id0", - "formatType": null -} -``` - diff --git a/Java/doc/models/tspublic-rest-v2-data-liveboard-request.md b/Java/doc/models/tspublic-rest-v2-data-liveboard-request.md deleted file mode 100644 index a15f617f6..000000000 --- a/Java/doc/models/tspublic-rest-v2-data-liveboard-request.md +++ /dev/null @@ -1,37 +0,0 @@ - -# Tspublic Rest V2 Data Liveboard Request - -## Structure - -`TspublicRestV2DataLiveboardRequest` - -## Fields - -| Name | Type | Tags | Description | Getter | Setter | -| --- | --- | --- | --- | --- | --- | -| `Offset` | `Integer` | Optional | The offset point, starting from where the records should be included in the response.

If no input is provided then offset starts from 0.
**Default**: `0` | Integer getOffset() | setOffset(Integer offset) | -| `BatchNumber` | `Integer` | Optional | An alternate way to set offset for the starting point of the response.

The value in offset field will not be considered if batchNumber field has value greater than 0.

Offset value will be calculated as (batchNumber - 1) * batchSize.

It is mandatory to provide a value for batchSize with batchNumber.

Example:

Assume response has 100 records. Now, batchNumber is set as 2 and batchSize as 10, then offset value will be 10. So, 10 records starting from 11th record will be considered.
**Default**: `-1` | Integer getBatchNumber() | setBatchNumber(Integer batchNumber) | -| `BatchSize` | `Integer` | Optional | The number of records that should be included in the response starting from offset position.

If no input is provided, then all records starting from the value provided in offset is included in the response
**Default**: `-1` | Integer getBatchSize() | setBatchSize(Integer batchSize) | -| `Id` | `String` | Optional | The GUID of the Liveboard | String getId() | setId(String id) | -| `TransientContent` | `String` | Optional | If you have embedded ThoughtSpot in your host application, and you want to download Liveboard data with unsaved changes then, pass the transient content from the browser fetch request, using the getExportRequestForCurrentPinboard method. For more information, see https://developers.thoughtspot.com/docs/?pageid=liveboard-export-api#transient-pinboard . If value for this field is provided, then id will not be considered. | String getTransientContent() | setTransientContent(String transientContent) | -| `VizId` | `List` | Optional | A JSON array of GUIDs of the visualizations in the Liveboard. | List getVizId() | setVizId(List vizId) | -| `RuntimeFilter` | `String` | Optional | JSON object which contains filter condition to filter the data at the time of data retrieval.

Example: {"col1":"region","op1":"EQ","val1":"northeast","col2":"date","op2":"BET","val2":["1625126400000","1625126400000"]}

For more information, see https://developers.thoughtspot.com/docs/?pageid=runtime-filters | String getRuntimeFilter() | setRuntimeFilter(String runtimeFilter) | -| `RuntimeSort` | `String` | Optional | JSON object which provides columns to sort the data at the time of data retrieval.

Example: {"sortCol1":"region","asc1":true,"sortCol2":"date"}

For more information, see https://developers.thoughtspot.com/docs/?pageid=runtime-filters. | String getRuntimeSort() | setRuntimeSort(String runtimeSort) | -| `FormatType` | [`FormatTypeEnum`](../../doc/models/format-type-enum.md) | Optional | The format of the data in the response.

FULL: The response comes in "column":"value" format.

COMPACT: The response includes only the value of the columns.
**Default**: `FormatTypeEnum.COMPACT` | FormatTypeEnum getFormatType() | setFormatType(FormatTypeEnum formatType) | - -## Example (as JSON) - -```json -{ - "offset": null, - "batchNumber": null, - "batchSize": null, - "id": null, - "transientContent": null, - "vizId": null, - "runtimeFilter": null, - "runtimeSort": null, - "formatType": null -} -``` - diff --git a/Java/doc/models/tspublic-rest-v2-data-search-request.md b/Java/doc/models/tspublic-rest-v2-data-search-request.md deleted file mode 100644 index 15b37f828..000000000 --- a/Java/doc/models/tspublic-rest-v2-data-search-request.md +++ /dev/null @@ -1,31 +0,0 @@ - -# Tspublic Rest V2 Data Search Request - -## Structure - -`TspublicRestV2DataSearchRequest` - -## Fields - -| Name | Type | Tags | Description | Getter | Setter | -| --- | --- | --- | --- | --- | --- | -| `Offset` | `Integer` | Optional | The offset point, starting from where the records should be included in the response.

If no input is provided then offset starts from 0.
**Default**: `-1` | Integer getOffset() | setOffset(Integer offset) | -| `BatchNumber` | `Integer` | Optional | An alternate way to set offset for the starting point of the response.

The value in offset field will not be considered if batchNumber field has value greater than 0.

Offset value will be calculated as (batchNumber - 1) * batchSize.

It is mandatory to provide a value for batchSize with batchNumber.

Example:

Assume response has 100 records. Now, batchNumber is set as 2 and batchSize as 10, then offset value will be 10. So, 10 records starting from 11th record will be considered.
**Default**: `-1` | Integer getBatchNumber() | setBatchNumber(Integer batchNumber) | -| `BatchSize` | `Integer` | Optional | The number of records that should be included in the response starting from offset position.

If no input is provided, then all records starting from the value provided in offset is included in the response
**Default**: `-1` | Integer getBatchSize() | setBatchSize(Integer batchSize) | -| `QueryString` | `String` | Required | The data search query string. Example: [revenue] > 1000 [ship mode] = 'air' | String getQueryString() | setQueryString(String queryString) | -| `DataObjectId` | `String` | Required | The GUID of the data object, either a worksheet, a view, or a table. | String getDataObjectId() | setDataObjectId(String dataObjectId) | -| `FormatType` | [`FormatTypeEnum`](../../doc/models/format-type-enum.md) | Optional | The format of the data in the response.

FULL: The response comes in "column":"value" format.

COMPACT: The response includes only the value of the columns.
**Default**: `FormatTypeEnum.COMPACT` | FormatTypeEnum getFormatType() | setFormatType(FormatTypeEnum formatType) | - -## Example (as JSON) - -```json -{ - "offset": null, - "batchNumber": null, - "batchSize": null, - "queryString": "queryString4", - "dataObjectId": "dataObjectId2", - "formatType": null -} -``` - diff --git a/Java/doc/models/tspublic-rest-v2-database-table-create-request.md b/Java/doc/models/tspublic-rest-v2-database-table-create-request.md deleted file mode 100644 index d28183b6d..000000000 --- a/Java/doc/models/tspublic-rest-v2-database-table-create-request.md +++ /dev/null @@ -1,23 +0,0 @@ - -# Tspublic Rest V2 Database Table Create Request - -## Structure - -`TspublicRestV2DatabaseTableCreateRequest` - -## Fields - -| Name | Type | Tags | Description | Getter | Setter | -| --- | --- | --- | --- | --- | --- | -| `CreateDatabase` | `Boolean` | Optional | Flag to indicate if the database and schema should be created if they do not exist in Falcon. (Valid values: True/False)
**Default**: `true` | Boolean getCreateDatabase() | setCreateDatabase(Boolean createDatabase) | -| `Schema` | `String` | Optional | DDL of the table to be created. Example: {"database":{"name":"test_db"},"schema":{"name":"test_schema"},"table":{"id":{"name":"test_table"},"primary_key":[{"name":"test_pk"}],"column":[{"id":{"name":"test_pk"},"size":0,"data_type":"TYPE_INT32"},{"id":{"name":"test_col1"},"size":0,"data_type":"TYPE_FLOAT"},{"id":{"name":"test_col2"},"data_type":"TYPE_INT64","datetime":"TYPE_DATE"}{"id":{"name":"test_col3"},"size":10,"data_type":"TYPE_VAR_CHAR"}]}} | String getSchema() | setSchema(String schema) | - -## Example (as JSON) - -```json -{ - "createDatabase": null, - "schema": null -} -``` - diff --git a/Java/doc/models/tspublic-rest-v2-database-table-runquery-request.md b/Java/doc/models/tspublic-rest-v2-database-table-runquery-request.md deleted file mode 100644 index b3e8b892e..000000000 --- a/Java/doc/models/tspublic-rest-v2-database-table-runquery-request.md +++ /dev/null @@ -1,23 +0,0 @@ - -# Tspublic Rest V2 Database Table Runquery Request - -## Structure - -`TspublicRestV2DatabaseTableRunqueryRequest` - -## Fields - -| Name | Type | Tags | Description | Getter | Setter | -| --- | --- | --- | --- | --- | --- | -| `Statement` | `List` | Required | A JSON array of TQL statements separated by semi-colon (;). Each TQL statement should end with semi-colon (;). The TQL operations that can be run through this API are restricted to create database and schema, alter table, delete and update table rows. If a TQL statement fails, then the subsequent statements in the array are not run. Example: ["alter table test_db.test_schema.test_table drop contraint primary key;";"alter table test_db.test_schema.test_table add column test_col4 varchar(10) DEFAULT '';"] | List getStatement() | setStatement(List statement) | - -## Example (as JSON) - -```json -{ - "statement": [ - "statement0" - ] -} -``` - diff --git a/Java/doc/models/tspublic-rest-v2-group-addgroup-request.md b/Java/doc/models/tspublic-rest-v2-group-addgroup-request.md deleted file mode 100644 index 753a92f3b..000000000 --- a/Java/doc/models/tspublic-rest-v2-group-addgroup-request.md +++ /dev/null @@ -1,38 +0,0 @@ - -# Tspublic Rest V2 Group Addgroup Request - -## Structure - -`TspublicRestV2GroupAddgroupRequest` - -## Fields - -| Name | Type | Tags | Description | Getter | Setter | -| --- | --- | --- | --- | --- | --- | -| `Name` | `String` | Optional | Name of the group | String getName() | setName(String name) | -| `Id` | `String` | Optional | The GUID of the group to query. | String getId() | setId(String id) | -| `Groups` | [`List`](../../doc/models/group-name-and-id-input.md) | Required | Array of objects of groups that the user belong to. | List getGroups() | setGroups(List groups) | - -## Example (as JSON) - -```json -{ - "name": null, - "id": null, - "groups": [ - { - "name": null, - "id": null - }, - { - "name": null, - "id": null - }, - { - "name": null, - "id": null - } - ] -} -``` - diff --git a/Java/doc/models/tspublic-rest-v2-group-addprivilege-request.md b/Java/doc/models/tspublic-rest-v2-group-addprivilege-request.md deleted file mode 100644 index bab39b3ee..000000000 --- a/Java/doc/models/tspublic-rest-v2-group-addprivilege-request.md +++ /dev/null @@ -1,25 +0,0 @@ - -# Tspublic Rest V2 Group Addprivilege Request - -## Structure - -`TspublicRestV2GroupAddprivilegeRequest` - -## Fields - -| Name | Type | Tags | Description | Getter | Setter | -| --- | --- | --- | --- | --- | --- | -| `Name` | `String` | Optional | Name of the group | String getName() | setName(String name) | -| `Id` | `String` | Optional | The GUID of the group to query. | String getId() | setId(String id) | -| `Privileges` | [`List`](../../doc/models/privilege-enum.md) | Optional | A JSON array of name of users or GUIDs of users or both. When both are given then id is considered | List getPrivileges() | setPrivileges(List privileges) | - -## Example (as JSON) - -```json -{ - "name": null, - "id": null, - "privileges": null -} -``` - diff --git a/Java/doc/models/tspublic-rest-v2-group-adduser-request.md b/Java/doc/models/tspublic-rest-v2-group-adduser-request.md deleted file mode 100644 index faa4924a8..000000000 --- a/Java/doc/models/tspublic-rest-v2-group-adduser-request.md +++ /dev/null @@ -1,34 +0,0 @@ - -# Tspublic Rest V2 Group Adduser Request - -## Structure - -`TspublicRestV2GroupAdduserRequest` - -## Fields - -| Name | Type | Tags | Description | Getter | Setter | -| --- | --- | --- | --- | --- | --- | -| `Name` | `String` | Optional | Name of the group | String getName() | setName(String name) | -| `Id` | `String` | Optional | The GUID of the group to query. | String getId() | setId(String id) | -| `Users` | [`List`](../../doc/models/user-name-and-id-input.md) | Required | Array of user name that you want to update in user group. | List getUsers() | setUsers(List users) | - -## Example (as JSON) - -```json -{ - "name": null, - "id": null, - "users": [ - { - "name": null, - "id": null - }, - { - "name": null, - "id": null - } - ] -} -``` - diff --git a/Java/doc/models/tspublic-rest-v2-group-create-request.md b/Java/doc/models/tspublic-rest-v2-group-create-request.md deleted file mode 100644 index 4fd4aca00..000000000 --- a/Java/doc/models/tspublic-rest-v2-group-create-request.md +++ /dev/null @@ -1,37 +0,0 @@ - -# Tspublic Rest V2 Group Create Request - -## Structure - -`TspublicRestV2GroupCreateRequest` - -## Fields - -| Name | Type | Tags | Description | Getter | Setter | -| --- | --- | --- | --- | --- | --- | -| `Name` | `String` | Required | Name of the user group. The group name string must be unique. | String getName() | setName(String name) | -| `DisplayName` | `String` | Required | A unique display name string for the user group, for example, Developer group. | String getDisplayName() | setDisplayName(String displayName) | -| `Visibility` | [`Visibility2Enum`](../../doc/models/visibility-2-enum.md) | Optional | Visibility of the user group. The visibility attribute is set to DEFAULT. The DEFAULT attribute makes the user group visible for other user groups and allows them to share objects.
**Default**: `Visibility2Enum.DEFAULT` | Visibility2Enum getVisibility() | setVisibility(Visibility2Enum visibility) | -| `Description` | `String` | Optional | Description text for the group. | String getDescription() | setDescription(String description) | -| `Privileges` | [`List`](../../doc/models/privilege-enum.md) | Optional | A JSON array of privileges assigned to the group | List getPrivileges() | setPrivileges(List privileges) | -| `OrgId` | `Integer` | Optional | Unique identifier of the organization. If no value is provided then group will be created in the organization associated with the login session. | Integer getOrgId() | setOrgId(Integer orgId) | -| `Groups` | [`List`](../../doc/models/group-name-and-id-input.md) | Optional | Array of objects of groups that the group belong to. | List getGroups() | setGroups(List groups) | -| `Users` | [`List`](../../doc/models/user-name-and-id-input.md) | Optional | Array of names of user names that the group belong to. | List getUsers() | setUsers(List users) | -| `Type` | [`Type10Enum`](../../doc/models/type-10-enum.md) | Optional | Type of user group. LOCAL_GROUP indicates that the user is created locally in the ThoughtSpot system.
**Default**: `Type10Enum.LOCAL_GROUP` | Type10Enum getType() | setType(Type10Enum type) | - -## Example (as JSON) - -```json -{ - "name": "name0", - "displayName": "displayName2", - "visibility": null, - "description": null, - "privileges": null, - "orgId": null, - "groups": null, - "users": null, - "type": null -} -``` - diff --git a/Java/doc/models/tspublic-rest-v2-group-removegroup-request.md b/Java/doc/models/tspublic-rest-v2-group-removegroup-request.md deleted file mode 100644 index 9e8329469..000000000 --- a/Java/doc/models/tspublic-rest-v2-group-removegroup-request.md +++ /dev/null @@ -1,38 +0,0 @@ - -# Tspublic Rest V2 Group Removegroup Request - -## Structure - -`TspublicRestV2GroupRemovegroupRequest` - -## Fields - -| Name | Type | Tags | Description | Getter | Setter | -| --- | --- | --- | --- | --- | --- | -| `Name` | `String` | Optional | Name of the group | String getName() | setName(String name) | -| `Id` | `String` | Optional | The GUID of the group to query. | String getId() | setId(String id) | -| `Groups` | [`List`](../../doc/models/group-name-and-id-input.md) | Required | Array of objects of groups that the user belong to. | List getGroups() | setGroups(List groups) | - -## Example (as JSON) - -```json -{ - "name": null, - "id": null, - "groups": [ - { - "name": null, - "id": null - }, - { - "name": null, - "id": null - }, - { - "name": null, - "id": null - } - ] -} -``` - diff --git a/Java/doc/models/tspublic-rest-v2-group-removeprivilege-request.md b/Java/doc/models/tspublic-rest-v2-group-removeprivilege-request.md deleted file mode 100644 index 40152112b..000000000 --- a/Java/doc/models/tspublic-rest-v2-group-removeprivilege-request.md +++ /dev/null @@ -1,25 +0,0 @@ - -# Tspublic Rest V2 Group Removeprivilege Request - -## Structure - -`TspublicRestV2GroupRemoveprivilegeRequest` - -## Fields - -| Name | Type | Tags | Description | Getter | Setter | -| --- | --- | --- | --- | --- | --- | -| `Name` | `String` | Optional | Name of the group | String getName() | setName(String name) | -| `Id` | `String` | Optional | The GUID of the group to query. | String getId() | setId(String id) | -| `Privileges` | [`List`](../../doc/models/privilege-enum.md) | Optional | A JSON array of name of users or GUIDs of users or both. When both are given then id is considered | List getPrivileges() | setPrivileges(List privileges) | - -## Example (as JSON) - -```json -{ - "name": null, - "id": null, - "privileges": null -} -``` - diff --git a/Java/doc/models/tspublic-rest-v2-group-removeuser-request.md b/Java/doc/models/tspublic-rest-v2-group-removeuser-request.md deleted file mode 100644 index c2298c45c..000000000 --- a/Java/doc/models/tspublic-rest-v2-group-removeuser-request.md +++ /dev/null @@ -1,34 +0,0 @@ - -# Tspublic Rest V2 Group Removeuser Request - -## Structure - -`TspublicRestV2GroupRemoveuserRequest` - -## Fields - -| Name | Type | Tags | Description | Getter | Setter | -| --- | --- | --- | --- | --- | --- | -| `Name` | `String` | Optional | Name of the group | String getName() | setName(String name) | -| `Id` | `String` | Optional | The GUID of the group to query. | String getId() | setId(String id) | -| `Users` | [`List`](../../doc/models/user-name-and-id-input.md) | Required | Array of user name that you want to delete from user group. | List getUsers() | setUsers(List users) | - -## Example (as JSON) - -```json -{ - "name": null, - "id": null, - "users": [ - { - "name": null, - "id": null - }, - { - "name": null, - "id": null - } - ] -} -``` - diff --git a/Java/doc/models/tspublic-rest-v2-group-search-request.md b/Java/doc/models/tspublic-rest-v2-group-search-request.md deleted file mode 100644 index cc18f48db..000000000 --- a/Java/doc/models/tspublic-rest-v2-group-search-request.md +++ /dev/null @@ -1,39 +0,0 @@ - -# Tspublic Rest V2 Group Search Request - -## Structure - -`TspublicRestV2GroupSearchRequest` - -## Fields - -| Name | Type | Tags | Description | Getter | Setter | -| --- | --- | --- | --- | --- | --- | -| `OutputFields` | `List` | Optional | Array of field names that need to be included in the response | List getOutputFields() | setOutputFields(List outputFields) | -| `Name` | `String` | Optional | Name of the user group | String getName() | setName(String name) | -| `Id` | `String` | Optional | GUID of the group to update | String getId() | setId(String id) | -| `DisplayName` | `String` | Optional | A unique display name string for the user group, for example, Developer group. | String getDisplayName() | setDisplayName(String displayName) | -| `Visibility` | `String` | Optional | Visibility of the user group. The visibility attribute is set to DEFAULT. The DEFAULT attribute makes the user group visible for other user groups and allows them to share objects. | String getVisibility() | setVisibility(String visibility) | -| `Description` | `String` | Optional | Description text for the group. | String getDescription() | setDescription(String description) | -| `Privileges` | [`List`](../../doc/models/privilege-enum.md) | Optional | A JSON array of privileges assigned to the group | List getPrivileges() | setPrivileges(List privileges) | -| `Groups` | [`List`](../../doc/models/group-name-and-id-input.md) | Optional | Array of objects of groups that the user belong to. | List getGroups() | setGroups(List groups) | -| `Users` | [`List`](../../doc/models/user-name-and-id-input.md) | Optional | Array of user name that associated with group. | List getUsers() | setUsers(List users) | -| `Type` | `String` | Optional | Type of user group. LOCAL_GROUP indicates that the user is created locally in the ThoughtSpot system. | String getType() | setType(String type) | - -## Example (as JSON) - -```json -{ - "outputFields": null, - "name": null, - "id": null, - "displayName": null, - "visibility": null, - "description": null, - "privileges": null, - "groups": null, - "users": null, - "type": null -} -``` - diff --git a/Java/doc/models/tspublic-rest-v2-group-update-request.md b/Java/doc/models/tspublic-rest-v2-group-update-request.md deleted file mode 100644 index 1326b86b1..000000000 --- a/Java/doc/models/tspublic-rest-v2-group-update-request.md +++ /dev/null @@ -1,39 +0,0 @@ - -# Tspublic Rest V2 Group Update Request - -## Structure - -`TspublicRestV2GroupUpdateRequest` - -## Fields - -| Name | Type | Tags | Description | Getter | Setter | -| --- | --- | --- | --- | --- | --- | -| `Name` | `String` | Optional | Name of the user group. The group name string must be unique. | String getName() | setName(String name) | -| `Id` | `String` | Optional | he GUID of the user account to query. | String getId() | setId(String id) | -| `DisplayName` | `String` | Optional | A unique display name string for the user group, for example, Developer group. | String getDisplayName() | setDisplayName(String displayName) | -| `Visibility` | [`Visibility2Enum`](../../doc/models/visibility-2-enum.md) | Optional | Visibility of the user group. The visibility attribute is set to DEFAULT. The DEFAULT attribute makes the user group visible for other user groups and allows them to share objects.
**Default**: `Visibility2Enum.DEFAULT` | Visibility2Enum getVisibility() | setVisibility(Visibility2Enum visibility) | -| `Description` | `String` | Optional | Description text for the group. | String getDescription() | setDescription(String description) | -| `Privileges` | [`List`](../../doc/models/privilege-enum.md) | Optional | A JSON array of privileges assigned to the group | List getPrivileges() | setPrivileges(List privileges) | -| `Groups` | [`List`](../../doc/models/group-name-and-id-input.md) | Optional | Array of objects of groups that the user belong to. | List getGroups() | setGroups(List groups) | -| `Users` | [`List`](../../doc/models/user-name-and-id-input.md) | Optional | Array of object, A JSON array of name of users of users. | List getUsers() | setUsers(List users) | -| `AssignedLiveboards` | `List` | Optional | Array of string. An array of liveboard ids to be assigned to the group. | List getAssignedLiveboards() | setAssignedLiveboards(List assignedLiveboards) | -| `Type` | [`Type10Enum`](../../doc/models/type-10-enum.md) | Optional | Type of user group. LOCAL_GROUP indicates that the user is created locally in the ThoughtSpot system.
**Default**: `Type10Enum.LOCAL_GROUP` | Type10Enum getType() | setType(Type10Enum type) | - -## Example (as JSON) - -```json -{ - "name": null, - "id": null, - "displayName": null, - "visibility": null, - "description": null, - "privileges": null, - "groups": null, - "users": null, - "assignedLiveboards": null, - "type": null -} -``` - diff --git a/Java/doc/models/tspublic-rest-v2-materialization-refreshview-request.md b/Java/doc/models/tspublic-rest-v2-materialization-refreshview-request.md deleted file mode 100644 index cf89b8c06..000000000 --- a/Java/doc/models/tspublic-rest-v2-materialization-refreshview-request.md +++ /dev/null @@ -1,21 +0,0 @@ - -# Tspublic Rest V2 Materialization Refreshview Request - -## Structure - -`TspublicRestV2MaterializationRefreshviewRequest` - -## Fields - -| Name | Type | Tags | Description | Getter | Setter | -| --- | --- | --- | --- | --- | --- | -| `Id` | `String` | Required | GUID of metadata object | String getId() | setId(String id) | - -## Example (as JSON) - -```json -{ - "id": "id0" -} -``` - diff --git a/Java/doc/models/tspublic-rest-v2-metadata-dependency-request.md b/Java/doc/models/tspublic-rest-v2-metadata-dependency-request.md deleted file mode 100644 index e8fe03619..000000000 --- a/Java/doc/models/tspublic-rest-v2-metadata-dependency-request.md +++ /dev/null @@ -1,27 +0,0 @@ - -# Tspublic Rest V2 Metadata Dependency Request - -## Structure - -`TspublicRestV2MetadataDependencyRequest` - -## Fields - -| Name | Type | Tags | Description | Getter | Setter | -| --- | --- | --- | --- | --- | --- | -| `Type` | [`Type13Enum`](../../doc/models/type-13-enum.md) | Required | Type of the data object | Type13Enum getType() | setType(Type13Enum type) | -| `Id` | `List` | Required | A JSON array of GUIDs of the objects | List getId() | setId(List id) | -| `BatchSize` | `Integer` | Optional | The maximum number of batches to fetch in a query. If this attribute is not defined, the value specified in the cluster configuration is used. To get the list of all dependent objects in a single query, define the batch size attribute as -1
**Default**: `-1` | Integer getBatchSize() | setBatchSize(Integer batchSize) | - -## Example (as JSON) - -```json -{ - "type": "COLUMN", - "id": [ - "id0" - ], - "batchSize": null -} -``` - diff --git a/Java/doc/models/tspublic-rest-v2-metadata-detail-search-request.md b/Java/doc/models/tspublic-rest-v2-metadata-detail-search-request.md deleted file mode 100644 index 4f04c1384..000000000 --- a/Java/doc/models/tspublic-rest-v2-metadata-detail-search-request.md +++ /dev/null @@ -1,31 +0,0 @@ - -# Tspublic Rest V2 Metadata Detail Search Request - -## Structure - -`TspublicRestV2MetadataDetailSearchRequest` - -## Fields - -| Name | Type | Tags | Description | Getter | Setter | -| --- | --- | --- | --- | --- | --- | -| `Type` | [`Type6Enum`](../../doc/models/type-6-enum.md) | Required | Type of the metadata object being searched. | Type6Enum getType() | setType(Type6Enum type) | -| `Id` | `List` | Required | A JSON array of GUIDs of the objects. | List getId() | setId(List id) | -| `ShowHidden` | `Boolean` | Optional | When set to true, returns details of the hidden objects, such as a column in a worksheet or a table.
**Default**: `false` | Boolean getShowHidden() | setShowHidden(Boolean showHidden) | -| `DropQuestionDetails` | `Boolean` | Optional | When set to true, the search assist data associated with a worksheet is not included in the API response. This attribute is applicable only for DATAOBJECT data type.
**Default**: `false` | Boolean getDropQuestionDetails() | setDropQuestionDetails(Boolean dropQuestionDetails) | -| `Version` | `String` | Optional | Specify the version to retrieve the objects from. By default, the API returns metadata for all versions of the object. | String getVersion() | setVersion(String version) | - -## Example (as JSON) - -```json -{ - "type": "DATAOBJECT", - "id": [ - "id0" - ], - "showHidden": null, - "dropQuestionDetails": null, - "version": null -} -``` - diff --git a/Java/doc/models/tspublic-rest-v2-metadata-favorite-assign-request.md b/Java/doc/models/tspublic-rest-v2-metadata-favorite-assign-request.md deleted file mode 100644 index 240411891..000000000 --- a/Java/doc/models/tspublic-rest-v2-metadata-favorite-assign-request.md +++ /dev/null @@ -1,34 +0,0 @@ - -# Tspublic Rest V2 Metadata Favorite Assign Request - -## Structure - -`TspublicRestV2MetadataFavoriteAssignRequest` - -## Fields - -| Name | Type | Tags | Description | Getter | Setter | -| --- | --- | --- | --- | --- | --- | -| `UserName` | `String` | Optional | Name of the user | String getUserName() | setUserName(String userName) | -| `UserId` | `String` | Optional | The GUID of the user | String getUserId() | setUserId(String userId) | -| `TsObject` | [`List`](../../doc/models/ts-object-input.md) | Required | A JSON Array of GUIDs and type of metadata object. | List getTsObject() | setTsObject(List tsObject) | - -## Example (as JSON) - -```json -{ - "userName": null, - "userId": null, - "tsObject": [ - { - "id": "id2", - "type": "DATAOBJECT" - }, - { - "id": "id3", - "type": "CONNECTION" - } - ] -} -``` - diff --git a/Java/doc/models/tspublic-rest-v2-metadata-favorite-unassign-request.md b/Java/doc/models/tspublic-rest-v2-metadata-favorite-unassign-request.md deleted file mode 100644 index 7b0524d32..000000000 --- a/Java/doc/models/tspublic-rest-v2-metadata-favorite-unassign-request.md +++ /dev/null @@ -1,34 +0,0 @@ - -# Tspublic Rest V2 Metadata Favorite Unassign Request - -## Structure - -`TspublicRestV2MetadataFavoriteUnassignRequest` - -## Fields - -| Name | Type | Tags | Description | Getter | Setter | -| --- | --- | --- | --- | --- | --- | -| `UserName` | `String` | Optional | Name of the user | String getUserName() | setUserName(String userName) | -| `UserId` | `String` | Optional | The GUID of the user | String getUserId() | setUserId(String userId) | -| `TsObject` | [`List`](../../doc/models/ts-object-input.md) | Required | A JSON Array of GUIDs and type of metadata object. | List getTsObject() | setTsObject(List tsObject) | - -## Example (as JSON) - -```json -{ - "userName": null, - "userId": null, - "tsObject": [ - { - "id": "id2", - "type": "DATAOBJECT" - }, - { - "id": "id3", - "type": "CONNECTION" - } - ] -} -``` - diff --git a/Java/doc/models/tspublic-rest-v2-metadata-header-search-request.md b/Java/doc/models/tspublic-rest-v2-metadata-header-search-request.md deleted file mode 100644 index d2eedc2e3..000000000 --- a/Java/doc/models/tspublic-rest-v2-metadata-header-search-request.md +++ /dev/null @@ -1,53 +0,0 @@ - -# Tspublic Rest V2 Metadata Header Search Request - -## Structure - -`TspublicRestV2MetadataHeaderSearchRequest` - -## Fields - -| Name | Type | Tags | Description | Getter | Setter | -| --- | --- | --- | --- | --- | --- | -| `OutputFields` | `List` | Optional | Array of header field names that need to be included in the header response | List getOutputFields() | setOutputFields(List outputFields) | -| `Offset` | `Integer` | Optional | The batch offset, starting from where the records should be included in the response. If no input is provided then offset starts from 0. Default: 0
**Default**: `0` | Integer getOffset() | setOffset(Integer offset) | -| `BatchNumber` | `Integer` | Optional | An alternate way to set offset for the starting point of the response.

The value in offset field will not be considered if batchNumber field has value greater than 0.

Offset value will be calculated as (batchNumber - 1) * batchSize.

It is mandatory to provide a value for batchSize with batchNumber.

Example:

Assume response has 100 records. Now, batchNumber is set as 2 and batchSize as 10, then offset value will be 10. So, 10 records starting from 11th record will be considered. | Integer getBatchNumber() | setBatchNumber(Integer batchNumber) | -| `BatchSize` | `Integer` | Optional | The number of records that should be included in the response starting from offset position. If no input is provided then first page is included in the response.
**Default**: `-1` | Integer getBatchSize() | setBatchSize(Integer batchSize) | -| `SortBy` | [`SortByEnum`](../../doc/models/sort-by-enum.md) | Optional | Field based on which the response needs to be ordered.
**Default**: `SortByEnum.DEFAULT` | SortByEnum getSortBy() | setSortBy(SortByEnum sortBy) | -| `SortOrder` | [`SortOrderEnum`](../../doc/models/sort-order-enum.md) | Optional | Order in which sortBy should be applied.
**Default**: `SortOrderEnum.DEFAULT` | SortOrderEnum getSortOrder() | setSortOrder(SortOrderEnum sortOrder) | -| `Type` | [`Type3Enum`](../../doc/models/type-3-enum.md) | Required | Type of the metadata object being searched. | Type3Enum getType() | setType(Type3Enum type) | -| `NamePattern` | `String` | Optional | A pattern to match the name of the metadata object. This parameter supports matching case-insensitive strings. For a wildcard match, use %. | String getNamePattern() | setNamePattern(String namePattern) | -| `FetchId` | `List` | Optional | A JSON array containing the GUIDs of the metadata objects that you want to fetch. | List getFetchId() | setFetchId(List fetchId) | -| `SkipId` | `List` | Optional | A JSON array containing the GUIDs of the metadata objects that you want to skip. | List getSkipId() | setSkipId(List skipId) | -| `ShowHidden` | `Boolean` | Optional | When set to true, returns details of the hidden objects, such as a column in a worksheet or a table.
**Default**: `false` | Boolean getShowHidden() | setShowHidden(Boolean showHidden) | -| `AutoCreated` | `Boolean` | Optional | A flag to indicate whether to list only the auto created objects. When no value is provided as input then all objects are returned. | Boolean getAutoCreated() | setAutoCreated(Boolean autoCreated) | -| `AccessLevel` | [`List`](../../doc/models/access-level-input.md) | Optional | A JSON array of objects with user details for which the metadata objects should be considered from the repository
If you specify ID or name of user and set the type parameter to USER, the API returns metadata objects associated with the user
If you specify ID or name of user group and set the type parameter to USER_GROUP, the API returns metadata objects for all the users mapped to the specified user group.
If the id or name parameter is not defined, but the type attribute is set to USER or USER_GROUP, then the API will not return and response.
If no input is provided for any field for this object, then the API returns headers for all users.
If both name and id is provided, then id will be considered. | List getAccessLevel() | setAccessLevel(List accessLevel) | -| `Tag` | [`List`](../../doc/models/tag-name-and-id-input.md) | Optional | A JSON array of name or GUID of tags or both. When both are given then id is considered. | List getTag() | setTag(List tag) | -| `FavoriteFor` | [`List`](../../doc/models/name-and-id-input.md) | Optional | A JSON array of name or GUID of the user or both for whom the object is assigned as favorite. When both are given then id is considered. | List getFavoriteFor() | setFavoriteFor(List favoriteFor) | -| `Author` | [`List`](../../doc/models/name-and-id-input.md) | Optional | A JSON array of name or GUID of the user or both who created the object. When both are given then id is considered | List getAuthor() | setAuthor(List author) | -| `LastModifiedBy` | [`List`](../../doc/models/name-and-id-input.md) | Optional | A JSON array of name or GUID of the user or both who last modified the object. When both are given then id is considered. | List getLastModifiedBy() | setLastModifiedBy(List lastModifiedBy) | - -## Example (as JSON) - -```json -{ - "outputFields": null, - "offset": null, - "batchNumber": null, - "batchSize": null, - "sortBy": null, - "sortOrder": null, - "type": "COLUMN_ALL", - "namePattern": null, - "fetchId": null, - "skipId": null, - "showHidden": null, - "autoCreated": null, - "accessLevel": null, - "tag": null, - "favoriteFor": null, - "author": null, - "lastModifiedBy": null -} -``` - diff --git a/Java/doc/models/tspublic-rest-v2-metadata-homeliveboard-assign-request.md b/Java/doc/models/tspublic-rest-v2-metadata-homeliveboard-assign-request.md deleted file mode 100644 index 6edb8c37b..000000000 --- a/Java/doc/models/tspublic-rest-v2-metadata-homeliveboard-assign-request.md +++ /dev/null @@ -1,25 +0,0 @@ - -# Tspublic Rest V2 Metadata Homeliveboard Assign Request - -## Structure - -`TspublicRestV2MetadataHomeliveboardAssignRequest` - -## Fields - -| Name | Type | Tags | Description | Getter | Setter | -| --- | --- | --- | --- | --- | --- | -| `UserName` | `String` | Optional | Name of the user | String getUserName() | setUserName(String userName) | -| `UserId` | `String` | Optional | The GUID of the user | String getUserId() | setUserId(String userId) | -| `LiveboardId` | `String` | Optional | The GUID of the liveboard | String getLiveboardId() | setLiveboardId(String liveboardId) | - -## Example (as JSON) - -```json -{ - "userName": null, - "userId": null, - "liveboardId": null -} -``` - diff --git a/Java/doc/models/tspublic-rest-v2-metadata-homeliveboard-unassign-request.md b/Java/doc/models/tspublic-rest-v2-metadata-homeliveboard-unassign-request.md deleted file mode 100644 index f7e93d3c6..000000000 --- a/Java/doc/models/tspublic-rest-v2-metadata-homeliveboard-unassign-request.md +++ /dev/null @@ -1,23 +0,0 @@ - -# Tspublic Rest V2 Metadata Homeliveboard Unassign Request - -## Structure - -`TspublicRestV2MetadataHomeliveboardUnassignRequest` - -## Fields - -| Name | Type | Tags | Description | Getter | Setter | -| --- | --- | --- | --- | --- | --- | -| `UserName` | `String` | Optional | Name of the user | String getUserName() | setUserName(String userName) | -| `UserId` | `String` | Optional | The GUID of the user | String getUserId() | setUserId(String userId) | - -## Example (as JSON) - -```json -{ - "userName": null, - "userId": null -} -``` - diff --git a/Java/doc/models/tspublic-rest-v2-metadata-tag-assign-request.md b/Java/doc/models/tspublic-rest-v2-metadata-tag-assign-request.md deleted file mode 100644 index 859695831..000000000 --- a/Java/doc/models/tspublic-rest-v2-metadata-tag-assign-request.md +++ /dev/null @@ -1,34 +0,0 @@ - -# Tspublic Rest V2 Metadata Tag Assign Request - -## Structure - -`TspublicRestV2MetadataTagAssignRequest` - -## Fields - -| Name | Type | Tags | Description | Getter | Setter | -| --- | --- | --- | --- | --- | --- | -| `Name` | `String` | Optional | Name of the tag | String getName() | setName(String name) | -| `Id` | `String` | Optional | The GUID of the tag | String getId() | setId(String id) | -| `TsObject` | [`List`](../../doc/models/ts-object-input.md) | Required | A JSON Array of GUIDs and type of metadata object. | List getTsObject() | setTsObject(List tsObject) | - -## Example (as JSON) - -```json -{ - "name": null, - "id": null, - "tsObject": [ - { - "id": "id2", - "type": "DATAOBJECT" - }, - { - "id": "id3", - "type": "CONNECTION" - } - ] -} -``` - diff --git a/Java/doc/models/tspublic-rest-v2-metadata-tag-create-request.md b/Java/doc/models/tspublic-rest-v2-metadata-tag-create-request.md deleted file mode 100644 index 2c20532cf..000000000 --- a/Java/doc/models/tspublic-rest-v2-metadata-tag-create-request.md +++ /dev/null @@ -1,23 +0,0 @@ - -# Tspublic Rest V2 Metadata Tag Create Request - -## Structure - -`TspublicRestV2MetadataTagCreateRequest` - -## Fields - -| Name | Type | Tags | Description | Getter | Setter | -| --- | --- | --- | --- | --- | --- | -| `Name` | `String` | Required | Name of the tag | String getName() | setName(String name) | -| `Color` | `String` | Optional | Hex color code to be assigned to the tag | String getColor() | setColor(String color) | - -## Example (as JSON) - -```json -{ - "name": "name0", - "color": null -} -``` - diff --git a/Java/doc/models/tspublic-rest-v2-metadata-tag-unassign-request.md b/Java/doc/models/tspublic-rest-v2-metadata-tag-unassign-request.md deleted file mode 100644 index b1c1552d1..000000000 --- a/Java/doc/models/tspublic-rest-v2-metadata-tag-unassign-request.md +++ /dev/null @@ -1,34 +0,0 @@ - -# Tspublic Rest V2 Metadata Tag Unassign Request - -## Structure - -`TspublicRestV2MetadataTagUnassignRequest` - -## Fields - -| Name | Type | Tags | Description | Getter | Setter | -| --- | --- | --- | --- | --- | --- | -| `Name` | `String` | Optional | Name of the tag | String getName() | setName(String name) | -| `Id` | `String` | Optional | The GUID of the tag | String getId() | setId(String id) | -| `TsObject` | [`List`](../../doc/models/ts-object-input.md) | Required | A JSON Array of GUIDs and type of metadata object. | List getTsObject() | setTsObject(List tsObject) | - -## Example (as JSON) - -```json -{ - "name": null, - "id": null, - "tsObject": [ - { - "id": "id2", - "type": "DATAOBJECT" - }, - { - "id": "id3", - "type": "CONNECTION" - } - ] -} -``` - diff --git a/Java/doc/models/tspublic-rest-v2-metadata-tag-update-request.md b/Java/doc/models/tspublic-rest-v2-metadata-tag-update-request.md deleted file mode 100644 index 7532d78b4..000000000 --- a/Java/doc/models/tspublic-rest-v2-metadata-tag-update-request.md +++ /dev/null @@ -1,25 +0,0 @@ - -# Tspublic Rest V2 Metadata Tag Update Request - -## Structure - -`TspublicRestV2MetadataTagUpdateRequest` - -## Fields - -| Name | Type | Tags | Description | Getter | Setter | -| --- | --- | --- | --- | --- | --- | -| `Name` | `String` | Optional | Name of the tag | String getName() | setName(String name) | -| `Id` | `String` | Optional | The GUID of the tag | String getId() | setId(String id) | -| `Color` | `String` | Optional | Hex color code to be assigned to the tag | String getColor() | setColor(String color) | - -## Example (as JSON) - -```json -{ - "name": null, - "id": null, - "color": null -} -``` - diff --git a/Java/doc/models/tspublic-rest-v2-metadata-tml-export-request.md b/Java/doc/models/tspublic-rest-v2-metadata-tml-export-request.md deleted file mode 100644 index 9fd965eab..000000000 --- a/Java/doc/models/tspublic-rest-v2-metadata-tml-export-request.md +++ /dev/null @@ -1,27 +0,0 @@ - -# Tspublic Rest V2 Metadata Tml Export Request - -## Structure - -`TspublicRestV2MetadataTmlExportRequest` - -## Fields - -| Name | Type | Tags | Description | Getter | Setter | -| --- | --- | --- | --- | --- | --- | -| `Id` | `List` | Required | A JSON array of GUIDs of the objects. | List getId() | setId(List id) | -| `FormatType` | [`FormatType3Enum`](../../doc/models/format-type-3-enum.md) | Optional | The format in which to export the objects
**Default**: `FormatType3Enum.YAML` | FormatType3Enum getFormatType() | setFormatType(FormatType3Enum formatType) | -| `ExportAssociated` | `Boolean` | Optional | Specifies if you would like to export the associated objects. To export the objects associated with the objects specified in id, set the value to true. When set to true, the API exports any underlying worksheets, tables, or views for a given object. By default, the API does not export these underlying objects
**Default**: `false` | Boolean getExportAssociated() | setExportAssociated(Boolean exportAssociated) | - -## Example (as JSON) - -```json -{ - "id": [ - "id0" - ], - "formatType": null, - "exportAssociated": null -} -``` - diff --git a/Java/doc/models/tspublic-rest-v2-metadata-tml-import-request.md b/Java/doc/models/tspublic-rest-v2-metadata-tml-import-request.md deleted file mode 100644 index 9a82c3ba1..000000000 --- a/Java/doc/models/tspublic-rest-v2-metadata-tml-import-request.md +++ /dev/null @@ -1,27 +0,0 @@ - -# Tspublic Rest V2 Metadata Tml Import Request - -## Structure - -`TspublicRestV2MetadataTmlImportRequest` - -## Fields - -| Name | Type | Tags | Description | Getter | Setter | -| --- | --- | --- | --- | --- | --- | -| `ObjectTML` | `List` | Required | A string array of TML objects to upload, in YAML or JSON format.

If TML is in YAML format, then use escape characters for quotes and new line characters.

Example TML:

guid: 6d2c1c9b-a407-409c-8c0c-819aeb51350f\ntable:\n name: TESTINT\n db: SUPPLYCHAIN_MAIN\n schema: PUBLIC\n db_table: TESTINT\n connection:\n name: SnowflakeConnection\n columns:\n - name: C1\n db_column_name: C1\n properties:\n column_type: MEASURE\n aggregation: SUM\n index_type: DONT_INDEX\n db_column_properties:\n data_type: INT64\n

If TML is in JSON format, then use escape characters for quotes.

Example TML:

{\\"guid\\": \\"6d2c1c9b-a407-409c-8c0c-819aeb51350f\\", \\"table\\": { \\"name\\": \\"TESTINT\\", \\"db\\": \\"SUPPLYCHAIN_MAIN\\", \\"schema\\": \\"PUBLIC\\", \\"db_table\\": \\"TESTINT\\", \\"connection\\": { \\"name\\": \\"SnowflakeConnection\\" }, \\"columns\\": [ { \\"name\\": \\"C1\\", \\"db_column_name\\": \\"C1\\", \\"properties\\": { \\"column_type\\": \\"MEASURE\\", \\"aggregation\\": \\"SUM\\", \\"index_type\\": \\"DONT_INDEX\\" }, \\"db_column_properties\\": { \\"data_type\\": \\"INT64\\" } } ] } }', | List getObjectTML() | setObjectTML(List objectTML) | -| `ImportPolicy` | [`ImportPolicyEnum`](../../doc/models/import-policy-enum.md) | Optional | Policy to follow during import
**Default**: `ImportPolicyEnum.PARTIAL` | ImportPolicyEnum getImportPolicy() | setImportPolicy(ImportPolicyEnum importPolicy) | -| `ForceCreate` | `Boolean` | Optional | Specifies if you are updating or creating objects. To create new objects, specify true. By default, ThoughtSpot updates existing objects that have the same GUID as the objects you are importing. When set to true, the GUID property in the imported TML is replaced on the server, and the response headers will include the id_guid property with the GUID of the new object. The new object will be assigned a new GUID, even if the imported TML file included a guid value. Thus, there is no need to include the guid in the TML file if you are using forceCreate=true.
**Default**: `false` | Boolean getForceCreate() | setForceCreate(Boolean forceCreate) | - -## Example (as JSON) - -```json -{ - "objectTML": [ - "objectTML7" - ], - "importPolicy": null, - "forceCreate": null -} -``` - diff --git a/Java/doc/models/tspublic-rest-v2-org-create-request.md b/Java/doc/models/tspublic-rest-v2-org-create-request.md deleted file mode 100644 index e170aa331..000000000 --- a/Java/doc/models/tspublic-rest-v2-org-create-request.md +++ /dev/null @@ -1,23 +0,0 @@ - -# Tspublic Rest V2 Org Create Request - -## Structure - -`TspublicRestV2OrgCreateRequest` - -## Fields - -| Name | Type | Tags | Description | Getter | Setter | -| --- | --- | --- | --- | --- | --- | -| `Name` | `String` | Required | Name of the organization. | String getName() | setName(String name) | -| `Description` | `String` | Optional | Description text for the organization. | String getDescription() | setDescription(String description) | - -## Example (as JSON) - -```json -{ - "name": "name0", - "description": null -} -``` - diff --git a/Java/doc/models/tspublic-rest-v2-org-search-request.md b/Java/doc/models/tspublic-rest-v2-org-search-request.md deleted file mode 100644 index a60d64492..000000000 --- a/Java/doc/models/tspublic-rest-v2-org-search-request.md +++ /dev/null @@ -1,25 +0,0 @@ - -# Tspublic Rest V2 Org Search Request - -## Structure - -`TspublicRestV2OrgSearchRequest` - -## Fields - -| Name | Type | Tags | Description | Getter | Setter | -| --- | --- | --- | --- | --- | --- | -| `Name` | `String` | Optional | Name of the organization. | String getName() | setName(String name) | -| `Id` | `Integer` | Optional | The ID of the organization. | Integer getId() | setId(Integer id) | -| `ShowDeleted` | `Boolean` | Optional | When set to true, the response will include the details of deleted organization also.
**Default**: `false` | Boolean getShowDeleted() | setShowDeleted(Boolean showDeleted) | - -## Example (as JSON) - -```json -{ - "name": null, - "id": null, - "showDeleted": null -} -``` - diff --git a/Java/doc/models/tspublic-rest-v2-org-update-request.md b/Java/doc/models/tspublic-rest-v2-org-update-request.md deleted file mode 100644 index 2b7cc3464..000000000 --- a/Java/doc/models/tspublic-rest-v2-org-update-request.md +++ /dev/null @@ -1,27 +0,0 @@ - -# Tspublic Rest V2 Org Update Request - -## Structure - -`TspublicRestV2OrgUpdateRequest` - -## Fields - -| Name | Type | Tags | Description | Getter | Setter | -| --- | --- | --- | --- | --- | --- | -| `Name` | `String` | Optional | Name of the organization. | String getName() | setName(String name) | -| `Id` | `Integer` | Optional | The ID of the organization. | Integer getId() | setId(Integer id) | -| `Description` | `String` | Optional | Description text for the organization. | String getDescription() | setDescription(String description) | -| `Active` | `Boolean` | Optional | Status of the organization. | Boolean getActive() | setActive(Boolean active) | - -## Example (as JSON) - -```json -{ - "name": null, - "id": null, - "description": null, - "active": null -} -``` - diff --git a/Java/doc/models/tspublic-rest-v2-security-permission-principal-search-request.md b/Java/doc/models/tspublic-rest-v2-security-permission-principal-search-request.md deleted file mode 100644 index f7a38c760..000000000 --- a/Java/doc/models/tspublic-rest-v2-security-permission-principal-search-request.md +++ /dev/null @@ -1,32 +0,0 @@ - -# Tspublic Rest V2 Security Permission Principal Search Request - -## Structure - -`TspublicRestV2SecurityPermissionPrincipalSearchRequest` - -## Fields - -| Name | Type | Tags | Description | Getter | Setter | -| --- | --- | --- | --- | --- | --- | -| `Principal` | [`List`](../../doc/models/user-name-and-id-input.md) | Required | A JSON array of principal names or GUIDs to be included in the request. When both are given then id is considered. | List getPrincipal() | setPrincipal(List principal) | -| `TsObject` | [`List`](../../doc/models/ts-object-search-input.md) | Optional | A JSON Array of GUIDs and type of metadata object. | List getTsObject() | setTsObject(List tsObject) | - -## Example (as JSON) - -```json -{ - "principal": [ - { - "name": null, - "id": null - }, - { - "name": null, - "id": null - } - ], - "tsObject": null -} -``` - diff --git a/Java/doc/models/tspublic-rest-v2-security-permission-tsobject-search-request.md b/Java/doc/models/tspublic-rest-v2-security-permission-tsobject-search-request.md deleted file mode 100644 index 15912f72f..000000000 --- a/Java/doc/models/tspublic-rest-v2-security-permission-tsobject-search-request.md +++ /dev/null @@ -1,39 +0,0 @@ - -# Tspublic Rest V2 Security Permission Tsobject Search Request - -## Structure - -`TspublicRestV2SecurityPermissionTsobjectSearchRequest` - -## Fields - -| Name | Type | Tags | Description | Getter | Setter | -| --- | --- | --- | --- | --- | --- | -| `TsObject` | [`List`](../../doc/models/ts-object-search-input.md) | Required | A JSON Array of GUIDs and type of metadata object. | List getTsObject() | setTsObject(List tsObject) | -| `Principal` | [`List`](../../doc/models/user-name-and-id-input.md) | Optional | A JSON array of principal names or GUIDs. When both are given then id is considered. | List getPrincipal() | setPrincipal(List principal) | -| `IncludeDependent` | `Boolean` | Optional | When this field is set to true, the API response includes the permission details for the dependent objects.
**Default**: `false` | Boolean getIncludeDependent() | setIncludeDependent(Boolean includeDependent) | - -## Example (as JSON) - -```json -{ - "tsObject": [ - { - "type": "DATAOBJECT", - "id": [ - "id2" - ] - }, - { - "type": "COLUMN", - "id": [ - "id3", - "id4" - ] - } - ], - "principal": null, - "includeDependent": null -} -``` - diff --git a/Java/doc/models/tspublic-rest-v2-security-share-tsobject-request.md b/Java/doc/models/tspublic-rest-v2-security-share-tsobject-request.md deleted file mode 100644 index 370d254f8..000000000 --- a/Java/doc/models/tspublic-rest-v2-security-share-tsobject-request.md +++ /dev/null @@ -1,35 +0,0 @@ - -# Tspublic Rest V2 Security Share Tsobject Request - -## Structure - -`TspublicRestV2SecurityShareTsobjectRequest` - -## Fields - -| Name | Type | Tags | Description | Getter | Setter | -| --- | --- | --- | --- | --- | --- | -| `Type` | [`Type18Enum`](../../doc/models/type-18-enum.md) | Required | Type of metadata object. Valid values: Liveboard\|Answer\|DataObject\|Column | Type18Enum getType() | setType(Type18Enum type) | -| `Id` | `List` | Required | A JSON array of the GUIDs of the objects to be shared | List getId() | setId(List id) | -| `Permission` | `String` | Required | A JSON object with GUIDs of user and user group, and the type of access privilge.

You can provide READ_ONLY or MODIFY access to the objects. With READ_ONLY access, the user or user group can view the shared object, whereas MODIFY access enables users to modify the object.

To remove access to a shared object, you can set the shareMode in the permission string to NO_ACCESS. Example:

{"permissions": {"e7040a64-7ff1-4ab9-a1b0-f1acac596866": {"shareMode": "READ_ONLY"}, "f7b8f511-317c-485d-8131-26cf084ef47b": {"shareMode": "MODIFY"}, "7a9a6715-e154-431b-baaf-7b58246c13dd":{"shareMode":"NO_ACCESS"}}} | String getPermission() | setPermission(String permission) | -| `EmailId` | `List` | Optional | The email addresses that should ne notified when the objects are shared. | List getEmailId() | setEmailId(List emailId) | -| `Notify` | `Boolean` | Optional | When set to true, a notification is sent to the users after an object is shared.
**Default**: `true` | Boolean getNotify() | setNotify(Boolean notify) | -| `Message` | `String` | Optional | The message text to send in the notification email. | String getMessage() | setMessage(String message) | -| `IncludeCustomEmbedUrl` | `Boolean` | Optional | When set to true, ThoughtSpot sends a link with the host application context to allow users to access the shared object from their ThoughtSpot embedded instance.
**Default**: `false` | Boolean getIncludeCustomEmbedUrl() | setIncludeCustomEmbedUrl(Boolean includeCustomEmbedUrl) | - -## Example (as JSON) - -```json -{ - "type": "DATAOBJECT", - "id": [ - "id0" - ], - "permission": "permission2", - "emailId": null, - "notify": null, - "message": null, - "includeCustomEmbedUrl": null -} -``` - diff --git a/Java/doc/models/tspublic-rest-v2-security-share-visualization-request.md b/Java/doc/models/tspublic-rest-v2-security-share-visualization-request.md deleted file mode 100644 index c64f2411b..000000000 --- a/Java/doc/models/tspublic-rest-v2-security-share-visualization-request.md +++ /dev/null @@ -1,37 +0,0 @@ - -# Tspublic Rest V2 Security Share Visualization Request - -## Structure - -`TspublicRestV2SecurityShareVisualizationRequest` - -## Fields - -| Name | Type | Tags | Description | Getter | Setter | -| --- | --- | --- | --- | --- | --- | -| `Id` | `String` | Required | A JSON array of the GUIDs of the objects to be shared | String getId() | setId(String id) | -| `VizId` | `String` | Required | The GUID of visualization | String getVizId() | setVizId(String vizId) | -| `PrincipalId` | `List` | Required | The GUID of the users and user groups with which you want to share the visualization | List getPrincipalId() | setPrincipalId(List principalId) | -| `EmailId` | `List` | Optional | The email addresses that should ne notified when the objects are shared | List getEmailId() | setEmailId(List emailId) | -| `Notify` | `Boolean` | Optional | When set to true, a notification is sent to the users after an object is shared.
**Default**: `true` | Boolean getNotify() | setNotify(Boolean notify) | -| `Message` | `String` | Optional | The message text to send in the notification email. | String getMessage() | setMessage(String message) | -| `IncludeCustomEmbedUrl` | `Boolean` | Optional | When set to true, ThoughtSpot sends a link with the host application context to allow users to access the shared object from their ThoughtSpot embedded instance.
**Default**: `false` | Boolean getIncludeCustomEmbedUrl() | setIncludeCustomEmbedUrl(Boolean includeCustomEmbedUrl) | - -## Example (as JSON) - -```json -{ - "id": "id0", - "vizId": "vizId2", - "principalId": [ - "principalId8", - "principalId9", - "principalId0" - ], - "emailId": null, - "notify": null, - "message": null, - "includeCustomEmbedUrl": null -} -``` - diff --git a/Java/doc/models/tspublic-rest-v2-user-addgroup-request.md b/Java/doc/models/tspublic-rest-v2-user-addgroup-request.md deleted file mode 100644 index c0a9ed9f1..000000000 --- a/Java/doc/models/tspublic-rest-v2-user-addgroup-request.md +++ /dev/null @@ -1,38 +0,0 @@ - -# Tspublic Rest V2 User Addgroup Request - -## Structure - -`TspublicRestV2UserAddgroupRequest` - -## Fields - -| Name | Type | Tags | Description | Getter | Setter | -| --- | --- | --- | --- | --- | --- | -| `Name` | `String` | Optional | User name of the user account | String getName() | setName(String name) | -| `Id` | `String` | Optional | The GUID of the user account | String getId() | setId(String id) | -| `Groups` | [`List`](../../doc/models/group-name-and-id-input.md) | Required | Array of objects of groups that the user belong to. | List getGroups() | setGroups(List groups) | - -## Example (as JSON) - -```json -{ - "name": null, - "id": null, - "groups": [ - { - "name": null, - "id": null - }, - { - "name": null, - "id": null - }, - { - "name": null, - "id": null - } - ] -} -``` - diff --git a/Java/doc/models/tspublic-rest-v2-user-addorg-request.md b/Java/doc/models/tspublic-rest-v2-user-addorg-request.md deleted file mode 100644 index ba3bd6843..000000000 --- a/Java/doc/models/tspublic-rest-v2-user-addorg-request.md +++ /dev/null @@ -1,32 +0,0 @@ - -# Tspublic Rest V2 User Addorg Request - -## Structure - -`TspublicRestV2UserAddorgRequest` - -## Fields - -| Name | Type | Tags | Description | Getter | Setter | -| --- | --- | --- | --- | --- | --- | -| `OrgId` | `Integer` | Optional | The ID of the organization. | Integer getOrgId() | setOrgId(Integer orgId) | -| `Users` | [`List`](../../doc/models/user-name-and-id-input.md) | Required | Array of objects. A JSON array of name of users or GUIDs of users or both. When both are given then id is considered | List getUsers() | setUsers(List users) | - -## Example (as JSON) - -```json -{ - "orgId": null, - "users": [ - { - "name": null, - "id": null - }, - { - "name": null, - "id": null - } - ] -} -``` - diff --git a/Java/doc/models/tspublic-rest-v2-user-changepassword-request.md b/Java/doc/models/tspublic-rest-v2-user-changepassword-request.md deleted file mode 100644 index 2d125de38..000000000 --- a/Java/doc/models/tspublic-rest-v2-user-changepassword-request.md +++ /dev/null @@ -1,27 +0,0 @@ - -# Tspublic Rest V2 User Changepassword Request - -## Structure - -`TspublicRestV2UserChangepasswordRequest` - -## Fields - -| Name | Type | Tags | Description | Getter | Setter | -| --- | --- | --- | --- | --- | --- | -| `Name` | `String` | Optional | User name of the user account. | String getName() | setName(String name) | -| `Id` | `String` | Optional | The GUID of the user account to query. | String getId() | setId(String id) | -| `CurrentPassword` | `String` | Required | The current password of the user. | String getCurrentPassword() | setCurrentPassword(String currentPassword) | -| `NewPassword` | `String` | Required | A new password for the user. | String getNewPassword() | setNewPassword(String newPassword) | - -## Example (as JSON) - -```json -{ - "name": null, - "id": null, - "currentPassword": "currentPassword6", - "newPassword": "newPassword6" -} -``` - diff --git a/Java/doc/models/tspublic-rest-v2-user-removegroup-request.md b/Java/doc/models/tspublic-rest-v2-user-removegroup-request.md deleted file mode 100644 index 52aa9be54..000000000 --- a/Java/doc/models/tspublic-rest-v2-user-removegroup-request.md +++ /dev/null @@ -1,38 +0,0 @@ - -# Tspublic Rest V2 User Removegroup Request - -## Structure - -`TspublicRestV2UserRemovegroupRequest` - -## Fields - -| Name | Type | Tags | Description | Getter | Setter | -| --- | --- | --- | --- | --- | --- | -| `Name` | `String` | Optional | User name of the user account | String getName() | setName(String name) | -| `Id` | `String` | Optional | The GUID of the user account | String getId() | setId(String id) | -| `Groups` | [`List`](../../doc/models/group-name-and-id-input.md) | Required | Array of objects of groups that the user belong to. | List getGroups() | setGroups(List groups) | - -## Example (as JSON) - -```json -{ - "name": null, - "id": null, - "groups": [ - { - "name": null, - "id": null - }, - { - "name": null, - "id": null - }, - { - "name": null, - "id": null - } - ] -} -``` - diff --git a/Java/doc/models/tspublic-rest-v2-user-search-request.md b/Java/doc/models/tspublic-rest-v2-user-search-request.md deleted file mode 100644 index f8970b2f7..000000000 --- a/Java/doc/models/tspublic-rest-v2-user-search-request.md +++ /dev/null @@ -1,45 +0,0 @@ - -# Tspublic Rest V2 User Search Request - -## Structure - -`TspublicRestV2UserSearchRequest` - -## Fields - -| Name | Type | Tags | Description | Getter | Setter | -| --- | --- | --- | --- | --- | --- | -| `OutputFields` | `List` | Optional | Array of field names that need to be included in the response | List getOutputFields() | setOutputFields(List outputFields) | -| `Name` | `String` | Optional | User name of the user account | String getName() | setName(String name) | -| `Id` | `String` | Optional | The GUID of the user account | String getId() | setId(String id) | -| `DisplayName` | `String` | Optional | A unique display name string for the user, usually their first and last name. | String getDisplayName() | setDisplayName(String displayName) | -| `Visibility` | `String` | Optional | Visibility of the user account. The visibility attribute is set to DEFAULT when creating a user. The DEFAULT attribute makes a user visible to other users and user groups, and thus allows them to share objects. | String getVisibility() | setVisibility(String visibility) | -| `Mail` | `String` | Optional | email of the user. | String getMail() | setMail(String mail) | -| `Groups` | [`List`](../../doc/models/group-name-and-id-input.md) | Optional | Array of objects of groups that the user belong to. | List getGroups() | setGroups(List groups) | -| `Privileges` | [`List`](../../doc/models/privilege-enum.md) | Optional | Privileges assigned to user account | List getPrivileges() | setPrivileges(List privileges) | -| `State` | `String` | Optional | Status of user account. acitve or inactive. | String getState() | setState(String state) | -| `NotifyOnShare` | `Boolean` | Optional | User preference for receiving email notifications when another ThoughtSpot user shares answers or pinboards. | Boolean getNotifyOnShare() | setNotifyOnShare(Boolean notifyOnShare) | -| `ShowWalkMe` | `Boolean` | Optional | The user preference for revisiting the onboarding experience. | Boolean getShowWalkMe() | setShowWalkMe(Boolean showWalkMe) | -| `AnalystOnboardingComplete` | `Boolean` | Optional | ThoughtSpot provides an interactive guided walkthrough to onboard new users. The onboarding experience leads users through a set of actions to help users get started and accomplish their tasks quickly. The users can turn off the Onboarding experience and access it again when they need assistance with the ThoughtSpot UI. | Boolean getAnalystOnboardingComplete() | setAnalystOnboardingComplete(Boolean analystOnboardingComplete) | -| `Type` | `String` | Optional | Type of user. LOCAL_USER indicates that the user is created locally in the ThoughtSpot system. | String getType() | setType(String type) | - -## Example (as JSON) - -```json -{ - "outputFields": null, - "name": null, - "id": null, - "displayName": null, - "visibility": null, - "mail": null, - "groups": null, - "privileges": null, - "state": null, - "notifyOnShare": null, - "showWalkMe": null, - "analystOnboardingComplete": null, - "type": null -} -``` - diff --git a/Java/doc/models/tspublic-rest-v2-user-update-request.md b/Java/doc/models/tspublic-rest-v2-user-update-request.md deleted file mode 100644 index 274bcd978..000000000 --- a/Java/doc/models/tspublic-rest-v2-user-update-request.md +++ /dev/null @@ -1,41 +0,0 @@ - -# Tspublic Rest V2 User Update Request - -## Structure - -`TspublicRestV2UserUpdateRequest` - -## Fields - -| Name | Type | Tags | Description | Getter | Setter | -| --- | --- | --- | --- | --- | --- | -| `Name` | `String` | Optional | Name of the user. The username string must be unique. | String getName() | setName(String name) | -| `Id` | `String` | Optional | The GUID of the user account to query | String getId() | setId(String id) | -| `DisplayName` | `String` | Optional | A unique display name string for the user, usually their first and last name. | String getDisplayName() | setDisplayName(String displayName) | -| `Visibility` | [`Visibility1Enum`](../../doc/models/visibility-1-enum.md) | Optional | Visibility of the user account. The visibility attribute is set to DEFAULT when creating a user. The DEFAULT attribute makes a user visible to other users and user groups, and thus allows them to share objects.
**Default**: `Visibility1Enum.DEFAULT` | Visibility1Enum getVisibility() | setVisibility(Visibility1Enum visibility) | -| `Mail` | `String` | Optional | email of the user. | String getMail() | setMail(String mail) | -| `State` | [`State1Enum`](../../doc/models/state-1-enum.md) | Optional | Status of user account. acitve or inactive.
**Default**: `State1Enum.ACTIVE` | State1Enum getState() | setState(State1Enum state) | -| `NotifyOnShare` | `Boolean` | Optional | User preference for receiving email notifications when another ThoughtSpot user shares answers or pinboards.
**Default**: `true` | Boolean getNotifyOnShare() | setNotifyOnShare(Boolean notifyOnShare) | -| `ShowWalkMe` | `Boolean` | Optional | The user preference for revisiting the onboarding experience.
**Default**: `true` | Boolean getShowWalkMe() | setShowWalkMe(Boolean showWalkMe) | -| `AnalystOnboardingComplete` | `Boolean` | Optional | ThoughtSpot provides an interactive guided walkthrough to onboard new users. The onboarding experience leads users through a set of actions to help users get started and accomplish their tasks quickly. The users can turn off the Onboarding experience and access it again when they need assistance with the ThoughtSpot UI.
**Default**: `false` | Boolean getAnalystOnboardingComplete() | setAnalystOnboardingComplete(Boolean analystOnboardingComplete) | -| `Type` | [`Type9Enum`](../../doc/models/type-9-enum.md) | Optional | Type of user. LOCAL_USER indicates that the user is created locally in the ThoughtSpot system.
**Default**: `Type9Enum.LOCAL_USER` | Type9Enum getType() | setType(Type9Enum type) | -| `Groups` | [`List`](../../doc/models/group-name-and-id-input.md) | Optional | Array of objects of groups that the user belong to. | List getGroups() | setGroups(List groups) | - -## Example (as JSON) - -```json -{ - "name": null, - "id": null, - "displayName": null, - "visibility": null, - "mail": null, - "state": null, - "notifyOnShare": null, - "showWalkMe": null, - "analystOnboardingComplete": null, - "type": null, - "groups": null -} -``` - diff --git a/Java/doc/models/type-1-enum.md b/Java/doc/models/type-1-enum.md deleted file mode 100644 index f471cbce5..000000000 --- a/Java/doc/models/type-1-enum.md +++ /dev/null @@ -1,16 +0,0 @@ - -# Type 1 Enum - -Type of access detail provided - -## Enumeration - -`Type1Enum` - -## Fields - -| Name | -| --- | -| `USER` | -| `USERGROUP` | - diff --git a/Java/doc/models/type-10-enum.md b/Java/doc/models/type-10-enum.md deleted file mode 100644 index cbf707b80..000000000 --- a/Java/doc/models/type-10-enum.md +++ /dev/null @@ -1,16 +0,0 @@ - -# Type 10 Enum - -Type of user group. LOCAL_GROUP indicates that the user is created locally in the ThoughtSpot system. - -## Enumeration - -`Type10Enum` - -## Fields - -| Name | -| --- | -| `LOCALGROUP` | -| `TENANTGROUP` | - diff --git a/Java/doc/models/type-13-enum.md b/Java/doc/models/type-13-enum.md deleted file mode 100644 index 1912ab366..000000000 --- a/Java/doc/models/type-13-enum.md +++ /dev/null @@ -1,18 +0,0 @@ - -# Type 13 Enum - -Type of the data object - -## Enumeration - -`Type13Enum` - -## Fields - -| Name | -| --- | -| `LIVEBOARD` | -| `DATAOBJECT` | -| `COLUMN` | -| `JOIN` | - diff --git a/Java/doc/models/type-14-enum.md b/Java/doc/models/type-14-enum.md deleted file mode 100644 index 61db9fbcc..000000000 --- a/Java/doc/models/type-14-enum.md +++ /dev/null @@ -1,25 +0,0 @@ - -# Type 14 Enum - -Type of the data connection. - -## Enumeration - -`Type14Enum` - -## Fields - -| Name | -| --- | -| `SNOWFLAKE` | -| `AMAZONREDSHIFT` | -| `GOOGLEBIGQUERY` | -| `AZURESYNAPSE` | -| `TERADATA` | -| `STARBURST` | -| `SAPHANA` | -| `ORACLEADW` | -| `DATABRICKS` | -| `DENODO` | -| `DREMIO` | - diff --git a/Java/doc/models/type-15-enum.md b/Java/doc/models/type-15-enum.md deleted file mode 100644 index 9c461e414..000000000 --- a/Java/doc/models/type-15-enum.md +++ /dev/null @@ -1,25 +0,0 @@ - -# Type 15 Enum - -Type of the connect being searched. Valid values: SNOWFLAKE|AMAZON_REDSHIFT|GOOGLE_BIGQUERY|AZURE_SYNAPSE|TERADATA|STARBURST|SAP_HANA|ORACLE_ADW|DATABRICKS|DENODO - -## Enumeration - -`Type15Enum` - -## Fields - -| Name | -| --- | -| `SNOWFLAKE` | -| `AMAZONREDSHIFT` | -| `GOOGLEBIGQUERY` | -| `AZURESYNAPSE` | -| `TERADATA` | -| `STARBURST` | -| `SAPHANA` | -| `ORACLEADW` | -| `DATABRICKS` | -| `DENODO` | -| `DREMIO` | - diff --git a/Java/doc/models/type-16-enum.md b/Java/doc/models/type-16-enum.md deleted file mode 100644 index 136de4cf8..000000000 --- a/Java/doc/models/type-16-enum.md +++ /dev/null @@ -1,16 +0,0 @@ - -# Type 16 Enum - -## Enumeration - -`Type16Enum` - -## Fields - -| Name | -| --- | -| `CSV` | -| `XLSX` | -| `PDF` | -| `PNG` | - diff --git a/Java/doc/models/type-18-enum.md b/Java/doc/models/type-18-enum.md deleted file mode 100644 index aa9d5da11..000000000 --- a/Java/doc/models/type-18-enum.md +++ /dev/null @@ -1,18 +0,0 @@ - -# Type 18 Enum - -Type of metadata object. Valid values: Liveboard|Answer|DataObject|Column - -## Enumeration - -`Type18Enum` - -## Fields - -| Name | -| --- | -| `LIVEBOARD` | -| `ANSWER` | -| `DATAOBJECT` | -| `COLUMN` | - diff --git a/Java/doc/models/type-2-enum.md b/Java/doc/models/type-2-enum.md deleted file mode 100644 index b541e8352..000000000 --- a/Java/doc/models/type-2-enum.md +++ /dev/null @@ -1,18 +0,0 @@ - -# Type 2 Enum - -Type of the metadata objec - -## Enumeration - -`Type2Enum` - -## Fields - -| Name | -| --- | -| `LIVEBOARD` | -| `ANSWER` | -| `DATAOBJECT` | -| `COLUMN` | - diff --git a/Java/doc/models/type-3-enum.md b/Java/doc/models/type-3-enum.md deleted file mode 100644 index 6d0e8ed43..000000000 --- a/Java/doc/models/type-3-enum.md +++ /dev/null @@ -1,33 +0,0 @@ - -# Type 3 Enum - -Type of the metadata object being searched. - -## Enumeration - -`Type3Enum` - -## Fields - -| Name | -| --- | -| `ANSWER` | -| `LIVEBOARD` | -| `DATAOBJECTALL` | -| `DATAOBJECTWORKSHEET` | -| `DATAOBJECTTABLE` | -| `DATAOBJECTUSERDEFINED` | -| `DATAOBJECTVIEW` | -| `DATAOBJECTCALENDARTABLE` | -| `COLUMNALL` | -| `COLUMNWORKSHEET` | -| `COLUMNTABLE` | -| `COLUMNUSERDEFINED` | -| `COLUMNVIEW` | -| `COLUMNCALENDARTABLE` | -| `JOIN` | -| `CONNECTION` | -| `TAG` | -| `USER` | -| `USERGROUP` | - diff --git a/Java/doc/models/type-4-enum.md b/Java/doc/models/type-4-enum.md deleted file mode 100644 index bc1bc7d2a..000000000 --- a/Java/doc/models/type-4-enum.md +++ /dev/null @@ -1,21 +0,0 @@ - -# Type 4 Enum - -## Enumeration - -`Type4Enum` - -## Fields - -| Name | -| --- | -| `ANSWER` | -| `LIVEBOARD` | -| `DATAOBJECT` | -| `COLUMN` | -| `JOIN` | -| `CONNECTION` | -| `TAG` | -| `USER` | -| `USERGROUP` | - diff --git a/Java/doc/models/type-5-enum.md b/Java/doc/models/type-5-enum.md deleted file mode 100644 index 3cfcf3935..000000000 --- a/Java/doc/models/type-5-enum.md +++ /dev/null @@ -1,31 +0,0 @@ - -# Type 5 Enum - -## Enumeration - -`Type5Enum` - -## Fields - -| Name | -| --- | -| `ANSWER` | -| `LIVEBOARD` | -| `DATAOBJECTALL` | -| `DATAOBJECTWORKSHEET` | -| `DATAOBJECTTABLE` | -| `DATAOBJECTUSERDEFINED` | -| `DATAOBJECTVIEW` | -| `DATAOBJECTCALENDARTABLE` | -| `COLUMNALL` | -| `COLUMNWORKSHEET` | -| `COLUMNTABLE` | -| `COLUMNUSERDEFINED` | -| `COLUMNVIEW` | -| `COLUMNCALENDARTABLE` | -| `JOIN` | -| `CONNECTION` | -| `TAG` | -| `USER` | -| `USERGROUP` | - diff --git a/Java/doc/models/type-6-enum.md b/Java/doc/models/type-6-enum.md deleted file mode 100644 index ba06eecc3..000000000 --- a/Java/doc/models/type-6-enum.md +++ /dev/null @@ -1,23 +0,0 @@ - -# Type 6 Enum - -Type of the metadata object being searched. - -## Enumeration - -`Type6Enum` - -## Fields - -| Name | -| --- | -| `ANSWER` | -| `LIVEBOARD` | -| `DATAOBJECT` | -| `COLUMN` | -| `JOIN` | -| `CONNECTION` | -| `TAG` | -| `USER` | -| `USERGROUP` | - diff --git a/Java/doc/models/type-7-enum.md b/Java/doc/models/type-7-enum.md deleted file mode 100644 index 6faa098f0..000000000 --- a/Java/doc/models/type-7-enum.md +++ /dev/null @@ -1,16 +0,0 @@ - -# Type 7 Enum - -## Enumeration - -`Type7Enum` - -## Fields - -| Name | -| --- | -| `LIVEBOARD` | -| `ANSWER` | -| `DATAOBJECT` | -| `COLUMN` | - diff --git a/Java/doc/models/type-8-enum.md b/Java/doc/models/type-8-enum.md deleted file mode 100644 index 8587164cd..000000000 --- a/Java/doc/models/type-8-enum.md +++ /dev/null @@ -1,17 +0,0 @@ - -# Type 8 Enum - -## Enumeration - -`Type8Enum` - -## Fields - -| Name | -| --- | -| `UNKNOWN` | -| `LDAPUSER` | -| `SAMLUSER` | -| `OIDCUSER` | -| `LOCALUSER` | - diff --git a/Java/doc/models/type-9-enum.md b/Java/doc/models/type-9-enum.md deleted file mode 100644 index 64cc8e53d..000000000 --- a/Java/doc/models/type-9-enum.md +++ /dev/null @@ -1,19 +0,0 @@ - -# Type 9 Enum - -Type of user. LOCAL_USER indicates that the user is created locally in the ThoughtSpot system. - -## Enumeration - -`Type9Enum` - -## Fields - -| Name | -| --- | -| `UNKNOWN` | -| `LDAPUSER` | -| `SAMLUSER` | -| `OIDCUSER` | -| `LOCALUSER` | - diff --git a/Java/doc/models/type-enum.md b/Java/doc/models/type-enum.md deleted file mode 100644 index ecf2ffb92..000000000 --- a/Java/doc/models/type-enum.md +++ /dev/null @@ -1,18 +0,0 @@ - -# Type Enum - -Type of the metadata object - -## Enumeration - -`TypeEnum` - -## Fields - -| Name | -| --- | -| `ANSWER` | -| `LIVEBOARD` | -| `DATAOBJECT` | -| `CONNECTION` | - diff --git a/Java/doc/models/user-name-and-id-input.md b/Java/doc/models/user-name-and-id-input.md deleted file mode 100644 index 15e4b9a11..000000000 --- a/Java/doc/models/user-name-and-id-input.md +++ /dev/null @@ -1,23 +0,0 @@ - -# User Name and ID Input - -## Structure - -`UserNameAndIDInput` - -## Fields - -| Name | Type | Tags | Description | Getter | Setter | -| --- | --- | --- | --- | --- | --- | -| `Name` | `String` | Optional | Username of the user | String getName() | setName(String name) | -| `Id` | `String` | Optional | GUID of the user | String getId() | setId(String id) | - -## Example (as JSON) - -```json -{ - "name": null, - "id": null -} -``` - diff --git a/Java/doc/models/user-name-and-id.md b/Java/doc/models/user-name-and-id.md deleted file mode 100644 index 25aa07d35..000000000 --- a/Java/doc/models/user-name-and-id.md +++ /dev/null @@ -1,23 +0,0 @@ - -# User Name and ID - -## Structure - -`UserNameAndID` - -## Fields - -| Name | Type | Tags | Description | Getter | Setter | -| --- | --- | --- | --- | --- | --- | -| `Name` | `String` | Optional | Username of the user | String getName() | setName(String name) | -| `Id` | `String` | Optional | GUID of the user | String getId() | setId(String id) | - -## Example (as JSON) - -```json -{ - "name": null, - "id": null -} -``` - diff --git a/Java/doc/models/user-response.md b/Java/doc/models/user-response.md deleted file mode 100644 index 76c3c6476..000000000 --- a/Java/doc/models/user-response.md +++ /dev/null @@ -1,83 +0,0 @@ - -# User Response - -## Structure - -`UserResponse` - -## Fields - -| Name | Type | Tags | Description | Getter | Setter | -| --- | --- | --- | --- | --- | --- | -| `Name` | `String` | Optional | Username of the user account | String getName() | setName(String name) | -| `DisplayName` | `String` | Optional | Display name of the user account | String getDisplayName() | setDisplayName(String displayName) | -| `Id` | `String` | Optional | GUID of the user account | String getId() | setId(String id) | -| `Visibility` | `String` | Optional | Visibility of the user account | String getVisibility() | setVisibility(String visibility) | -| `Mail` | `String` | Optional | Email of the user account | String getMail() | setMail(String mail) | -| `Groups` | [`List`](../../doc/models/group-name-and-id.md) | Optional | Name of the group to which user account is added | List getGroups() | setGroups(List groups) | -| `Privileges` | `List` | Optional | Privileges assigned to user account | List getPrivileges() | setPrivileges(List privileges) | -| `Orgs` | [`List`](../../doc/models/org-type.md) | Optional | The organizations that user belongs to | List getOrgs() | setOrgs(List orgs) | -| `Tags` | `List` | Optional | Tags assigned to the user | List getTags() | setTags(List tags) | -| `State` | `String` | Optional | Indicates if the user account is active or inactive | String getState() | setState(String state) | -| `NotifyOnShare` | `Boolean` | Optional | Indicates if the email should be sent when object is shared with the user | Boolean getNotifyOnShare() | setNotifyOnShare(Boolean notifyOnShare) | -| `ShowWalkMe` | `Boolean` | Optional | Indicates if the walk me should be shown when logging in | Boolean getShowWalkMe() | setShowWalkMe(Boolean showWalkMe) | -| `AnalystOnboardingComplete` | `Boolean` | Optional | Indicates if the onboarding is completed for the user | Boolean getAnalystOnboardingComplete() | setAnalystOnboardingComplete(Boolean analystOnboardingComplete) | -| `FirstLogin` | `Integer` | Optional | Indicates if the use is logging in for the first time | Integer getFirstLogin() | setFirstLogin(Integer firstLogin) | -| `WelcomeEmailSent` | `Boolean` | Optional | Indicates if the welcome email is sent to email associated with the user account | Boolean getWelcomeEmailSent() | setWelcomeEmailSent(Boolean welcomeEmailSent) | -| `IsDeleted` | `Boolean` | Optional | Indicates if the user account is deleted | Boolean getIsDeleted() | setIsDeleted(Boolean isDeleted) | -| `IsHidden` | `Boolean` | Optional | Indicates if the user account is hidden | Boolean getIsHidden() | setIsHidden(Boolean isHidden) | -| `IsExternal` | `Boolean` | Optional | Indicates if the user account is from external system
isDeprecated | Boolean getIsExternal() | setIsExternal(Boolean isExternal) | -| `IsDeprecated` | `Boolean` | Optional | - | Boolean getIsDeprecated() | setIsDeprecated(Boolean isDeprecated) | -| `Complete` | `Boolean` | Optional | Indicates if the all the properties of user account is provided | Boolean getComplete() | setComplete(Boolean complete) | -| `IsSuperUser` | `Boolean` | Optional | Indicates if the user account is super user | Boolean getIsSuperUser() | setIsSuperUser(Boolean isSuperUser) | -| `IsSystemPrincipal` | `Boolean` | Optional | Indicates if the user account is system principal | Boolean getIsSystemPrincipal() | setIsSystemPrincipal(Boolean isSystemPrincipal) | -| `Type` | `String` | Optional | Indicates the type of user account | String getType() | setType(String type) | -| `Parenttype` | `String` | Optional | Indicates the type of parent object | String getParenttype() | setParenttype(String parenttype) | -| `TenantId` | `String` | Optional | Tenant id associated with the user account | String getTenantId() | setTenantId(String tenantId) | -| `IndexVersion` | `Double` | Optional | - | Double getIndexVersion() | setIndexVersion(Double indexVersion) | -| `GenerationNum` | `Double` | Optional | - | Double getGenerationNum() | setGenerationNum(Double generationNum) | -| `Created` | `Double` | Optional | Date and time when user account was created | Double getCreated() | setCreated(Double created) | -| `Modified` | `Double` | Optional | Date and time of last modification of user account | Double getModified() | setModified(Double modified) | -| `Author` | [`UserNameAndID`](../../doc/models/user-name-and-id.md) | Optional | - | UserNameAndID getAuthor() | setAuthor(UserNameAndID author) | -| `ModifiedBy` | [`UserNameAndID`](../../doc/models/user-name-and-id.md) | Optional | - | UserNameAndID getModifiedBy() | setModifiedBy(UserNameAndID modifiedBy) | -| `Owner` | [`UserNameAndID`](../../doc/models/user-name-and-id.md) | Optional | - | UserNameAndID getOwner() | setOwner(UserNameAndID owner) | - -## Example (as JSON) - -```json -{ - "name": null, - "displayName": null, - "id": null, - "visibility": null, - "mail": null, - "groups": null, - "privileges": null, - "orgs": null, - "tags": null, - "state": null, - "notifyOnShare": null, - "showWalkMe": null, - "analystOnboardingComplete": null, - "firstLogin": null, - "welcomeEmailSent": null, - "isDeleted": null, - "isHidden": null, - "isExternal": null, - "isDeprecated": null, - "complete": null, - "isSuperUser": null, - "isSystemPrincipal": null, - "type": null, - "parenttype": null, - "tenantId": null, - "indexVersion": null, - "generationNum": null, - "created": null, - "modified": null, - "author": null, - "modifiedBy": null, - "owner": null -} -``` - diff --git a/Java/doc/models/visibility-1-enum.md b/Java/doc/models/visibility-1-enum.md deleted file mode 100644 index eed90ca3f..000000000 --- a/Java/doc/models/visibility-1-enum.md +++ /dev/null @@ -1,17 +0,0 @@ - -# Visibility 1 Enum - -Visibility of the user account. The visibility attribute is set to DEFAULT when creating a user. The DEFAULT attribute makes a user visible to other users and user groups, and thus allows them to share objects. - -## Enumeration - -`Visibility1Enum` - -## Fields - -| Name | -| --- | -| `DEFAULT` | -| `NONSHARABLE` | -| `SHARABLE` | - diff --git a/Java/doc/models/visibility-2-enum.md b/Java/doc/models/visibility-2-enum.md deleted file mode 100644 index 07580f89c..000000000 --- a/Java/doc/models/visibility-2-enum.md +++ /dev/null @@ -1,17 +0,0 @@ - -# Visibility 2 Enum - -Visibility of the user group. The visibility attribute is set to DEFAULT. The DEFAULT attribute makes the user group visible for other user groups and allows them to share objects. - -## Enumeration - -`Visibility2Enum` - -## Fields - -| Name | -| --- | -| `DEFAULT` | -| `NONSHARABLE` | -| `SHARABLE` | - diff --git a/Java/doc/models/visibility-enum.md b/Java/doc/models/visibility-enum.md deleted file mode 100644 index 41cfe88e3..000000000 --- a/Java/doc/models/visibility-enum.md +++ /dev/null @@ -1,15 +0,0 @@ - -# Visibility Enum - -## Enumeration - -`VisibilityEnum` - -## Fields - -| Name | -| --- | -| `DEFAULT` | -| `NONSHARABLE` | -| `SHARABLE` | - diff --git a/Java/doc/models/viz-type.md b/Java/doc/models/viz-type.md deleted file mode 100644 index d7bf67231..000000000 --- a/Java/doc/models/viz-type.md +++ /dev/null @@ -1,25 +0,0 @@ - -# Viz Type - -## Structure - -`VizType` - -## Fields - -| Name | Type | Tags | Description | Getter | Setter | -| --- | --- | --- | --- | --- | --- | -| `Name` | `String` | Optional | The name of the visualization | String getName() | setName(String name) | -| `Id` | `String` | Optional | The GUID of the visualization | String getId() | setId(String id) | -| `QuerySql` | `String` | Optional | SQL query associated with the visualization | String getQuerySql() | setQuerySql(String querySql) | - -## Example (as JSON) - -```json -{ - "name": null, - "id": null, - "querySql": null -} -``` - diff --git a/Java/doc/utility-classes.md b/Java/doc/utility-classes.md deleted file mode 100644 index 773736b45..000000000 --- a/Java/doc/utility-classes.md +++ /dev/null @@ -1,42 +0,0 @@ - -# Utility Classes Documentation - -## ApiHelper Class - -This is a Helper class with commonly used utilities for the SDK. - -### Fields - -| Name | Description | Type | -| --- | --- | --- | -| mapper | Deserialization of Json data. | `ObjectMapper` | - -### Methods - -| Name | Description | Return Type | -| --- | --- | --- | -| `serialize(Object obj)` | Json Serialization of a given object. | `String` | -| `deserialize(String json)` | Json deserialization of the given Json string. | `LinkedHashMap` | -| `deserialize(String json, Class clazz)` | Json deserialization of the given Json string. | ` T` | -| `deserialize(String json, TypeReference typeReference)` | JSON Deserialization of the given json string. | ` T` | -| `deserializeArray(String json, Class classArray)` | JSON Deserialization of the given json string. | ` List` | - -## FileWrapper Class - -Class to wrap file and contentType to be sent as part of a HTTP request. - -### Constructors - -| Name | Description | -| --- | --- | -| `FileWrapper(File file)` | Initialization constructor. | -| `FileWrapper(File file, String contentType)` | Initialization constructor. | - -### Methods - -| Name | Description | Return Type | -| --- | --- | --- | -| `getFile()` | File instance. | `File` | -| `getContentType()` | Content type of the file. | `String` | - - diff --git a/Java/pom.xml b/Java/pom.xml deleted file mode 100644 index 3ab6d8ef5..000000000 --- a/Java/pom.xml +++ /dev/null @@ -1,119 +0,0 @@ - - - 4.0.0 - - io.github.thoughtspot - rest-api-sdk-lib - 1.13.1 - jar - - ThoughtSpotPublicRESTAPILib - - - - - - org.eclipse.m2e - lifecycle-mapping - 1.0.0 - - - - - - org.apache.maven.plugins - maven-enforcer-plugin - [2.0.0,) - - enforce - - - - - true - - - - - - - - - - - - org.codehaus.mojo - versions-maven-plugin - 2.5 - - file://${project.basedir}/version-rules.xml - - - - org.apache.maven.plugins - maven-enforcer-plugin - 3.0.0-M2 - - - enforce-versions - - enforce - - - true - - - 1.8 - - - - - - - - maven-assembly-plugin - - - jar-with-dependencies - - false - - - - - - - 1.8 - 1.8 - UTF-8 - - - - - io.apimatic - core-interfaces - [0.1, 0.2) - - - io.apimatic - core - [0.2, 0.3) - - - io.apimatic - okhttp-client-adapter - [0.1, 0.2) - - - junit - junit - 4.13.1 - test - - - \ No newline at end of file diff --git a/Java/src/main/java/localhost/ApiHelper.java b/Java/src/main/java/localhost/ApiHelper.java deleted file mode 100644 index f2b984e2a..000000000 --- a/Java/src/main/java/localhost/ApiHelper.java +++ /dev/null @@ -1,16 +0,0 @@ -/* - * ThoughtSpotPublicRESTAPILib - * - * This file was automatically generated by APIMATIC v3.0 ( https://www.apimatic.io ). - */ - -package localhost; - -import io.apimatic.core.utilities.CoreHelper; - -/** - * This is a Helper class with commonly used utilities for the SDK. - */ -public class ApiHelper extends CoreHelper { - -} \ No newline at end of file diff --git a/Java/src/main/java/localhost/BearerAuthCredentials.java b/Java/src/main/java/localhost/BearerAuthCredentials.java deleted file mode 100644 index 5a0195a8f..000000000 --- a/Java/src/main/java/localhost/BearerAuthCredentials.java +++ /dev/null @@ -1,26 +0,0 @@ -/* - * ThoughtSpotPublicRESTAPILib - * - * This file was automatically generated by APIMATIC v3.0 ( https://www.apimatic.io ). - */ - -package localhost; - -/** - * Interface to access authentication credentials. - */ -public interface BearerAuthCredentials { - - /** - * String value for accessToken. - * @return accessToken - */ - String getAccessToken(); - - /** - * Checks if provided credentials matched with existing ones. - * @param accessToken String value for credentials. - * @return true if credentials matched. - */ - boolean equals(String accessToken); -} \ No newline at end of file diff --git a/Java/src/main/java/localhost/BearerAuthManager.java b/Java/src/main/java/localhost/BearerAuthManager.java deleted file mode 100644 index 4f92c6ec2..000000000 --- a/Java/src/main/java/localhost/BearerAuthManager.java +++ /dev/null @@ -1,55 +0,0 @@ -/* - * ThoughtSpotPublicRESTAPILib - * - * This file was automatically generated by APIMATIC v3.0 ( https://www.apimatic.io ). - */ - -package localhost; - -import io.apimatic.core.authentication.HeaderAuth; -import java.util.Collections; - -/** - * Utility class for authorization and token management. - */ -public class BearerAuthManager extends HeaderAuth implements BearerAuthCredentials { - - private String accessToken; - - /** - * Constructor. - * @param accessToken String value for accessToken. - */ - public BearerAuthManager(String accessToken) { - super(Collections.singletonMap("Authorization", - "Bearer " + accessToken)); - this.accessToken = accessToken; - } - - /** - * String value for accessToken. - * @return accessToken - */ - public String getAccessToken() { - return accessToken; - } - - /** - * Checks if provided credentials matched with existing ones. - * @param accessToken String value for credentials. - * @return true if credentials matched. - */ - public boolean equals(String accessToken) { - return accessToken.equals(getAccessToken()); - } - - /** - * Converts this BearerAuthManager into string format. - * @return String representation of this class - */ - @Override - public String toString() { - return "BearerAuthManager [" + "accessToken=" + accessToken + "]"; - } - -} \ No newline at end of file diff --git a/Java/src/main/java/localhost/CompatibilityFactoryImpl.java b/Java/src/main/java/localhost/CompatibilityFactoryImpl.java deleted file mode 100644 index 01716263b..000000000 --- a/Java/src/main/java/localhost/CompatibilityFactoryImpl.java +++ /dev/null @@ -1,88 +0,0 @@ -/* - * ThoughtSpotPublicRESTAPILib - * - * This file was automatically generated by APIMATIC v3.0 ( https://www.apimatic.io ). - */ - -package localhost; - -import io.apimatic.coreinterfaces.compatibility.CompatibilityFactory; -import io.apimatic.coreinterfaces.http.Context; -import io.apimatic.coreinterfaces.http.HttpHeaders; -import io.apimatic.coreinterfaces.http.Method; -import io.apimatic.coreinterfaces.http.request.Request; -import io.apimatic.coreinterfaces.http.response.ApiResponseType; -import io.apimatic.coreinterfaces.http.response.DynamicType; -import io.apimatic.coreinterfaces.http.response.Response; -import java.io.InputStream; -import java.util.AbstractMap.SimpleEntry; -import java.util.List; -import java.util.Map; -import localhost.http.Headers; -import localhost.http.client.HttpContext; -import localhost.http.request.HttpBodyRequest; -import localhost.http.request.HttpMethod; -import localhost.http.request.HttpRequest; -import localhost.http.response.HttpResponse; -import localhost.http.response.HttpStringResponse; - -public class CompatibilityFactoryImpl implements CompatibilityFactory { - - @Override - public Context createHttpContext(Request request, Response response) { - return new HttpContext((HttpRequest) request, (HttpResponse) response); - } - - @Override - public Request createHttpRequest(Method httpMethod, - StringBuilder queryUrlBuilder, HttpHeaders headers, Map queryParameters, - List> formParameters) { - return new HttpRequest(HttpMethod.valueOf(httpMethod.toString()), queryUrlBuilder, - (Headers) headers, queryParameters, formParameters); - } - - @Override - public Request createHttpRequest(Method httpMethod, - StringBuilder queryUrlBuilder, HttpHeaders headers, Map queryParameters, - Object body) { - return new HttpBodyRequest(HttpMethod.valueOf(httpMethod.toString()), queryUrlBuilder, - (Headers) headers, queryParameters, body); - } - - @Override - public Response createHttpResponse(int code, HttpHeaders headers, InputStream rawBody) { - return new HttpResponse(code, (Headers) headers, rawBody); - } - - @Override - public Response createHttpResponse(int code, HttpHeaders headers, InputStream rawBody, - String body) { - return new HttpStringResponse(code, (Headers) headers, rawBody, body); - } - - @Override - public HttpHeaders createHttpHeaders(Map> headers) { - return new Headers(headers); - } - - @Override - public HttpHeaders createHttpHeaders(HttpHeaders headers) { - return new Headers((Headers) headers); - } - - @Override - public HttpHeaders createHttpHeaders() { - return new Headers(); - } - - @Override - public DynamicType createDynamicResponse(Response httpResponse) { - return null; - } - - @Override - public ApiResponseType createApiResponse(int statusCode, HttpHeaders headers, T result) { - return null; - } - -} \ No newline at end of file diff --git a/Java/src/main/java/localhost/Configuration.java b/Java/src/main/java/localhost/Configuration.java deleted file mode 100644 index 84f46dab6..000000000 --- a/Java/src/main/java/localhost/Configuration.java +++ /dev/null @@ -1,58 +0,0 @@ -/* - * ThoughtSpotPublicRESTAPILib - * - * This file was automatically generated by APIMATIC v3.0 ( https://www.apimatic.io ). - */ - -package localhost; - -import localhost.http.client.ReadonlyHttpClientConfiguration; - -/** - * Configuration Interface for the library. - */ -public interface Configuration { - - /** - * Current API environment. - * @return a copy of environment - */ - Environment getEnvironment(); - - /** - * baseUrl value. - * @return a copy of baseUrl - */ - String getBaseUrl(); - - /** - * Http Client Configuration instance. - * @return a copy of httpClientConfig - */ - ReadonlyHttpClientConfiguration getHttpClientConfig(); - - /** - * The timeout to use for making HTTP requests. The timeout to use for making HTTP requests. - * @return a copy of timeout - */ - long timeout(); - - /** - * OAuth 2.0 Access Token. - * @return accessToken - */ - String getAccessToken(); - - /** - * Get base URI by current environment. - * @param server Server for which to get the base URI - * @return Processed base URI - */ - String getBaseUri(Server server); - - /** - * Get base URI by current environment. - * @return Processed base URI - */ - String getBaseUri(); -} diff --git a/Java/src/main/java/localhost/Environment.java b/Java/src/main/java/localhost/Environment.java deleted file mode 100644 index d6f2fce0a..000000000 --- a/Java/src/main/java/localhost/Environment.java +++ /dev/null @@ -1,71 +0,0 @@ -/* - * ThoughtSpotPublicRESTAPILib - * - * This file was automatically generated by APIMATIC v3.0 ( https://www.apimatic.io ). - */ - -package localhost; - -import java.util.ArrayList; -import java.util.List; -import java.util.TreeMap; - -/** - * Environment to be used. - */ -public enum Environment { - PRODUCTION; - - - private static TreeMap valueMap = new TreeMap<>(); - private String value; - - static { - PRODUCTION.value = "production"; - - valueMap.put("production", PRODUCTION); - } - - /** - * Returns the enum member associated with the given string value. - * @param toConvert String value to get enum member. - * @return The enum member against the given string value. - */ - @com.fasterxml.jackson.annotation.JsonCreator - public static Environment fromString(String toConvert) { - return valueMap.get(toConvert); - } - - /** - * Returns the string value associated with the enum member. - * @return The string value against enum member. - */ - @com.fasterxml.jackson.annotation.JsonValue - public String value() { - return value; - } - - /** - * Get string representation of this enum. - */ - @Override - public String toString() { - return value.toString(); - } - - /** - * Convert list of Environment values to list of string values. - * @param toConvert The list of Environment values to convert. - * @return List of representative string values. - */ - public static List toValue(List toConvert) { - if (toConvert == null) { - return null; - } - List convertedValues = new ArrayList<>(); - for (Environment enumValue : toConvert) { - convertedValues.add(enumValue.value); - } - return convertedValues; - } -} \ No newline at end of file diff --git a/Java/src/main/java/localhost/Server.java b/Java/src/main/java/localhost/Server.java deleted file mode 100644 index b9541eb4b..000000000 --- a/Java/src/main/java/localhost/Server.java +++ /dev/null @@ -1,71 +0,0 @@ -/* - * ThoughtSpotPublicRESTAPILib - * - * This file was automatically generated by APIMATIC v3.0 ( https://www.apimatic.io ). - */ - -package localhost; - -import java.util.ArrayList; -import java.util.List; -import java.util.TreeMap; - -/** - * Server to be used. - */ -public enum Server { - ENUM_DEFAULT; - - - private static TreeMap valueMap = new TreeMap<>(); - private String value; - - static { - ENUM_DEFAULT.value = "default"; - - valueMap.put("default", ENUM_DEFAULT); - } - - /** - * Returns the enum member associated with the given string value. - * @param toConvert String value to get enum member. - * @return The enum member against the given string value. - */ - @com.fasterxml.jackson.annotation.JsonCreator - public static Server fromString(String toConvert) { - return valueMap.get(toConvert); - } - - /** - * Returns the string value associated with the enum member. - * @return The string value against enum member. - */ - @com.fasterxml.jackson.annotation.JsonValue - public String value() { - return value; - } - - /** - * Get string representation of this enum. - */ - @Override - public String toString() { - return value.toString(); - } - - /** - * Convert list of Server values to list of string values. - * @param toConvert The list of Server values to convert. - * @return List of representative string values. - */ - public static List toValue(List toConvert) { - if (toConvert == null) { - return null; - } - List convertedValues = new ArrayList<>(); - for (Server enumValue : toConvert) { - convertedValues.add(enumValue.value); - } - return convertedValues; - } -} \ No newline at end of file diff --git a/Java/src/main/java/localhost/ThoughtSpotPublicRESTAPIClient.java b/Java/src/main/java/localhost/ThoughtSpotPublicRESTAPIClient.java deleted file mode 100644 index 3f551aff3..000000000 --- a/Java/src/main/java/localhost/ThoughtSpotPublicRESTAPIClient.java +++ /dev/null @@ -1,495 +0,0 @@ -/* - * ThoughtSpotPublicRESTAPILib - * - * This file was automatically generated by APIMATIC v3.0 ( https://www.apimatic.io ). - */ - -package localhost; - -import io.apimatic.core.GlobalConfiguration; -import io.apimatic.coreinterfaces.authentication.Authentication; -import io.apimatic.coreinterfaces.compatibility.CompatibilityFactory; -import io.apimatic.coreinterfaces.http.HttpClient; -import io.apimatic.okhttpclient.adapter.OkClient; -import java.util.AbstractMap.SimpleEntry; -import java.util.HashMap; -import java.util.Map; -import java.util.function.Consumer; -import localhost.controllers.AdminController; -import localhost.controllers.ConnectionController; -import localhost.controllers.CustomActionsController; -import localhost.controllers.DataController; -import localhost.controllers.DatabaseController; -import localhost.controllers.GroupController; -import localhost.controllers.LogsController; -import localhost.controllers.MaterializationController; -import localhost.controllers.MetadataController; -import localhost.controllers.OrgController; -import localhost.controllers.ReportController; -import localhost.controllers.SecurityController; -import localhost.controllers.SessionController; -import localhost.controllers.UserController; -import localhost.http.client.HttpCallback; -import localhost.http.client.HttpClientConfiguration; -import localhost.http.client.ReadonlyHttpClientConfiguration; - -/** - * Gateway class for the library. - * This class acts as a factory for Controllers. - * It holds the state of the SDK. - */ -public final class ThoughtSpotPublicRESTAPIClient implements Configuration { - - /** - * Private store for controllers. - */ - private UserController user; - private GroupController group; - private MetadataController metadata; - private DatabaseController database; - private ConnectionController connection; - private DataController data; - private LogsController logs; - private CustomActionsController customActions; - private SecurityController security; - private OrgController org; - private SessionController session; - private AdminController admin; - private ReportController report; - private MaterializationController materialization; - - private static final CompatibilityFactory compatibilityFactory = new CompatibilityFactoryImpl(); - - private static String userAgent = "RestAPI V2 SDK"; - - /** - * Current API environment. - */ - private final Environment environment; - - /** - * baseUrl value. - */ - private final String baseUrl; - - /** - * The HTTP Client instance to use for making HTTP requests. - */ - private final HttpClient httpClient; - - /** - * Http Client Configuration instance. - */ - private final ReadonlyHttpClientConfiguration httpClientConfig; - - /** - * BearerAuthManager. - */ - private BearerAuthManager bearerAuthManager; - - /** - * Map of authentication Managers. - */ - private Map authentications; - - - /** - * Callback to be called before and after the HTTP call for an endpoint is made. - */ - private final HttpCallback httpCallback; - - private ThoughtSpotPublicRESTAPIClient(Environment environment, String baseUrl, - HttpClient httpClient, ReadonlyHttpClientConfiguration httpClientConfig, - String accessToken, Map authentications, - HttpCallback httpCallback) { - this.environment = environment; - this.baseUrl = baseUrl; - this.httpClient = httpClient; - this.httpClientConfig = httpClientConfig; - this.httpCallback = httpCallback; - this.authentications = - (authentications == null) ? new HashMap<>() : new HashMap<>(authentications); - if (this.authentications.containsKey("global")) { - this.bearerAuthManager = (BearerAuthManager) this.authentications.get("global"); - } - - if (!this.authentications.containsKey("global") - || !getBearerAuthCredentials().equals(accessToken)) { - this.bearerAuthManager = new BearerAuthManager(accessToken); - this.authentications.put("global", bearerAuthManager); - } - - GlobalConfiguration globalConfig = new GlobalConfiguration.Builder() - .authentication(this.authentications).compatibilityFactory(compatibilityFactory) - .httpClient(httpClient).baseUri(server -> getBaseUri(server)) - .callback(httpCallback) - .userAgent(userAgent) - .build(); - user = new UserController(globalConfig); - group = new GroupController(globalConfig); - metadata = new MetadataController(globalConfig); - database = new DatabaseController(globalConfig); - connection = new ConnectionController(globalConfig); - data = new DataController(globalConfig); - logs = new LogsController(globalConfig); - customActions = new CustomActionsController(globalConfig); - security = new SecurityController(globalConfig); - org = new OrgController(globalConfig); - session = new SessionController(globalConfig); - admin = new AdminController(globalConfig); - report = new ReportController(globalConfig); - materialization = new MaterializationController(globalConfig); - } - - /** - * Shutdown the underlying HttpClient instance. - */ - public static void shutdown() { - OkClient.shutdown(); - } - - /** - * Get the instance of UserController. - * @return user - */ - public UserController getUserController() { - return user; - } - - /** - * Get the instance of GroupController. - * @return group - */ - public GroupController getGroupController() { - return group; - } - - /** - * Get the instance of MetadataController. - * @return metadata - */ - public MetadataController getMetadataController() { - return metadata; - } - - /** - * Get the instance of DatabaseController. - * @return database - */ - public DatabaseController getDatabaseController() { - return database; - } - - /** - * Get the instance of ConnectionController. - * @return connection - */ - public ConnectionController getConnectionController() { - return connection; - } - - /** - * Get the instance of DataController. - * @return data - */ - public DataController getDataController() { - return data; - } - - /** - * Get the instance of LogsController. - * @return logs - */ - public LogsController getLogsController() { - return logs; - } - - /** - * Get the instance of CustomActionsController. - * @return customActions - */ - public CustomActionsController getCustomActionsController() { - return customActions; - } - - /** - * Get the instance of SecurityController. - * @return security - */ - public SecurityController getSecurityController() { - return security; - } - - /** - * Get the instance of OrgController. - * @return org - */ - public OrgController getOrgController() { - return org; - } - - /** - * Get the instance of SessionController. - * @return session - */ - public SessionController getSessionController() { - return session; - } - - /** - * Get the instance of AdminController. - * @return admin - */ - public AdminController getAdminController() { - return admin; - } - - /** - * Get the instance of ReportController. - * @return report - */ - public ReportController getReportController() { - return report; - } - - /** - * Get the instance of MaterializationController. - * @return materialization - */ - public MaterializationController getMaterializationController() { - return materialization; - } - - /** - * Current API environment. - * @return environment - */ - public Environment getEnvironment() { - return environment; - } - - /** - * baseUrl value. - * @return baseUrl - */ - public String getBaseUrl() { - return baseUrl; - } - - /** - * The HTTP Client instance to use for making HTTP requests. - * @return httpClient - */ - private HttpClient getHttpClient() { - return httpClient; - } - - /** - * Http Client Configuration instance. - * @return httpClientConfig - */ - public ReadonlyHttpClientConfiguration getHttpClientConfig() { - return httpClientConfig; - } - - /** - * The credentials to use with BearerAuth. - * @return bearerAuthCredentials - */ - private BearerAuthCredentials getBearerAuthCredentials() { - return bearerAuthManager; - } - - /** - * OAuth 2.0 Access Token. - * @return accessToken - */ - public String getAccessToken() { - return getBearerAuthCredentials().getAccessToken(); - } - /** - * The timeout to use for making HTTP requests. - * @deprecated This method will be removed in a future version. Use - * {@link #getHttpClientConfig()} instead. - * - * @return timeout - */ - @Deprecated - public long timeout() { - return httpClientConfig.getTimeout(); - } - - /** - * Get base URI by current environment. - * @param server Server for which to get the base URI - * @return Processed base URI - */ - public String getBaseUri(Server server) { - Map> parameters = new HashMap<>(); - parameters.put("base-url", - new SimpleEntry(this.baseUrl, false)); - StringBuilder baseUrl = new StringBuilder(environmentMapper(environment, server)); - ApiHelper.appendUrlWithTemplateParameters(baseUrl, parameters); - return baseUrl.toString(); - } - - /** - * Get base URI by current environment. - * @return Processed base URI - */ - public String getBaseUri() { - return getBaseUri(Server.ENUM_DEFAULT); - } - - - /** - * Get base URI by current environment. - * - * @param server string for which to get the base URI - * @return Processed base URI - */ - public String getBaseUri(String server) { - return getBaseUri(Server.fromString(server)); - } - - - /** - * Base URLs by environment and server aliases. - * @param environment Environment for which to get the base URI - * @param server Server for which to get the base URI - * @return base URL - */ - private static String environmentMapper(Environment environment, Server server) { - if (environment.equals(Environment.PRODUCTION)) { - if (server.equals(Server.ENUM_DEFAULT)) { - return "{base-url}"; - } - } - return "{base-url}"; - } - - /** - * Converts this ThoughtSpotPublicRESTAPIClient into string format. - * @return String representation of this class - */ - @Override - public String toString() { - return "ThoughtSpotPublicRESTAPIClient [" + "environment=" + environment + ", baseUrl=" - + baseUrl + ", httpClientConfig=" + httpClientConfig + ", authentications=" - + authentications + "]"; - } - - /** - * Builds a new {@link ThoughtSpotPublicRESTAPIClient.Builder} object. - * Creates the instance with the state of the current client. - * @return a new {@link ThoughtSpotPublicRESTAPIClient.Builder} object - */ - public Builder newBuilder() { - Builder builder = new Builder(); - builder.environment = getEnvironment(); - builder.baseUrl = getBaseUrl(); - builder.httpClient = getHttpClient(); - builder.accessToken = getBearerAuthCredentials().getAccessToken(); - builder.authentications = authentications; - builder.httpCallback = httpCallback; - builder.httpClientConfig(configBldr -> configBldr = - ((HttpClientConfiguration) httpClientConfig).newBuilder()); - return builder; - } - - /** - * Class to build instances of {@link ThoughtSpotPublicRESTAPIClient}. - */ - public static class Builder { - - private Environment environment = Environment.PRODUCTION; - private String baseUrl = "https://localhost:443"; - private HttpClient httpClient; - private String accessToken = ""; - private Map authentications = null; - private HttpCallback httpCallback = null; - private HttpClientConfiguration.Builder httpClientConfigBuilder = - new HttpClientConfiguration.Builder(); - - - /** - * Credentials setter for BearerAuth. - * @param accessToken String value for accessToken. - * @return Builder - */ - public Builder accessToken(String accessToken) { - if (accessToken == null) { - throw new NullPointerException("AccessToken cannot be null."); - } - this.accessToken = accessToken; - return this; - } - - /** - * Current API environment. - * @param environment The environment for client. - * @return Builder - */ - public Builder environment(Environment environment) { - this.environment = environment; - return this; - } - - /** - * baseUrl value. - * @param baseUrl The baseUrl for client. - * @return Builder - */ - public Builder baseUrl(String baseUrl) { - this.baseUrl = baseUrl; - return this; - } - - /** - * The timeout to use for making HTTP requests. - * @deprecated This method will be removed in a future version. Use - * {@link #httpClientConfig(Consumer) httpClientConfig} instead. - * @param timeout must be greater then 0. - * @return Builder - */ - @Deprecated - public Builder timeout(long timeout) { - this.httpClientConfigBuilder.timeout(timeout); - return this; - } - - /** - * HttpCallback. - * @param httpCallback Callback to be called before and after the HTTP call. - * @return Builder - */ - public Builder httpCallback(HttpCallback httpCallback) { - this.httpCallback = httpCallback; - return this; - } - - /** - * Setter for the Builder of httpClientConfiguration, takes in an operation to be performed - * on the builder instance of HTTP client configuration. - * - * @param action Consumer for the builder of httpClientConfiguration. - * @return Builder - */ - public Builder httpClientConfig(Consumer action) { - action.accept(httpClientConfigBuilder); - return this; - } - - /** - * Builds a new ThoughtSpotPublicRESTAPIClient object using the set fields. - * @return ThoughtSpotPublicRESTAPIClient - */ - public ThoughtSpotPublicRESTAPIClient build() { - HttpClientConfiguration httpClientConfig = httpClientConfigBuilder.build(); - httpClient = new OkClient(httpClientConfig.getConfiguration(), compatibilityFactory); - - return new ThoughtSpotPublicRESTAPIClient(environment, baseUrl, httpClient, - httpClientConfig, accessToken, authentications, httpCallback); - } - } -} \ No newline at end of file diff --git a/Java/src/main/java/localhost/controllers/AdminController.java b/Java/src/main/java/localhost/controllers/AdminController.java deleted file mode 100644 index cc26fe5da..000000000 --- a/Java/src/main/java/localhost/controllers/AdminController.java +++ /dev/null @@ -1,405 +0,0 @@ -/* - * ThoughtSpotPublicRESTAPILib - * - * This file was automatically generated by APIMATIC v3.0 ( https://www.apimatic.io ). - */ - -package localhost.controllers; - -import com.fasterxml.jackson.core.JsonProcessingException; -import io.apimatic.core.ApiCall; -import io.apimatic.core.ErrorCase; -import io.apimatic.core.GlobalConfiguration; -import io.apimatic.coreinterfaces.http.request.ArraySerializationFormat; -import java.io.IOException; -import java.util.concurrent.CompletableFuture; -import java.util.concurrent.CompletionException; -import localhost.ApiHelper; -import localhost.Server; -import localhost.exceptions.ApiException; -import localhost.exceptions.ErrorResponseException; -import localhost.http.request.HttpMethod; -import localhost.models.AdminsyncPrincipalResponse; -import localhost.models.TspublicRestV2AdminAssignauthorRequest; -import localhost.models.TspublicRestV2AdminChangeauthorRequest; -import localhost.models.TspublicRestV2AdminConfigurationUpdateRequest; -import localhost.models.TspublicRestV2AdminForcelogoutRequest; -import localhost.models.TspublicRestV2AdminResetpasswordRequest; -import localhost.models.TspublicRestV2AdminSyncprincipalRequest; - -/** - * This class lists all the endpoints of the groups. - */ -public final class AdminController extends BaseController { - - /** - * Initializes the controller. - * @param globalConfig Configurations added in client. - */ - public AdminController(GlobalConfiguration globalConfig) { - super(globalConfig); - } - - /** - * To update the Thoughtspot cluster configuration, use this endpoint. - * @param body Required parameter: Example: - * @return Returns the Boolean response from the API call - * @throws ApiException Represents error response from the server. - * @throws IOException Signals that an I/O exception of some sort has occurred. - */ - public Boolean restapiV2UpdateClusterConfig( - final TspublicRestV2AdminConfigurationUpdateRequest body) throws ApiException, IOException { - return prepareRestapiV2UpdateClusterConfigRequest(body).execute(); - } - - /** - * To update the Thoughtspot cluster configuration, use this endpoint. - * @param body Required parameter: Example: - * @return Returns the Boolean response from the API call - */ - public CompletableFuture restapiV2UpdateClusterConfigAsync( - final TspublicRestV2AdminConfigurationUpdateRequest body) { - try { - return prepareRestapiV2UpdateClusterConfigRequest(body).executeAsync(); - } catch (Exception e) { - throw new CompletionException(e); - } - } - - /** - * Builds the ApiCall object for restapiV2UpdateClusterConfig. - */ - private ApiCall prepareRestapiV2UpdateClusterConfigRequest( - final TspublicRestV2AdminConfigurationUpdateRequest body) throws JsonProcessingException, IOException { - return new ApiCall.Builder() - .globalConfig(getGlobalConfiguration()) - .requestBuilder(requestBuilder -> requestBuilder - .server(Server.ENUM_DEFAULT.value()) - .path("/tspublic/rest/v2/admin/configuration/update") - .bodyParam(param -> param.value(body)) - .bodySerializer(() -> ApiHelper.serialize(body)) - .headerParam(param -> param.key("Content-Type") - .value("application/json").isRequired(false)) - .authenticationKey(BaseController.AUTHENTICATION_KEY) - .httpMethod(HttpMethod.PUT)) - .responseHandler(responseHandler -> responseHandler - .deserializer( - response -> Boolean.parseBoolean(response)) - .nullify404(false) - .localErrorCase("500", - ErrorCase.create("Operation failed", - (reason, context) -> new ErrorResponseException(reason, context))) - .globalErrorCase(GLOBAL_ERROR_CASES)) - .endpointConfiguration(param -> param - .arraySerializationFormat(ArraySerializationFormat.PLAIN -)) - .build(); - } - - /** - * To reset the password of a ThoughtSpot user account, use this endpoint. It is mandatory to - * use Authorization header with token of a user with admin access to successfully run this - * endpoint. At least one of User Id or username is mandatory. When both are given, then user id - * will be considered. - * @param body Required parameter: Example: - * @return Returns the Boolean response from the API call - * @throws ApiException Represents error response from the server. - * @throws IOException Signals that an I/O exception of some sort has occurred. - */ - public Boolean restapiV2ResetUserPassword( - final TspublicRestV2AdminResetpasswordRequest body) throws ApiException, IOException { - return prepareRestapiV2ResetUserPasswordRequest(body).execute(); - } - - /** - * To reset the password of a ThoughtSpot user account, use this endpoint. It is mandatory to - * use Authorization header with token of a user with admin access to successfully run this - * endpoint. At least one of User Id or username is mandatory. When both are given, then user id - * will be considered. - * @param body Required parameter: Example: - * @return Returns the Boolean response from the API call - */ - public CompletableFuture restapiV2ResetUserPasswordAsync( - final TspublicRestV2AdminResetpasswordRequest body) { - try { - return prepareRestapiV2ResetUserPasswordRequest(body).executeAsync(); - } catch (Exception e) { - throw new CompletionException(e); - } - } - - /** - * Builds the ApiCall object for restapiV2ResetUserPassword. - */ - private ApiCall prepareRestapiV2ResetUserPasswordRequest( - final TspublicRestV2AdminResetpasswordRequest body) throws JsonProcessingException, IOException { - return new ApiCall.Builder() - .globalConfig(getGlobalConfiguration()) - .requestBuilder(requestBuilder -> requestBuilder - .server(Server.ENUM_DEFAULT.value()) - .path("/tspublic/rest/v2/admin/resetpassword") - .bodyParam(param -> param.value(body)) - .bodySerializer(() -> ApiHelper.serialize(body)) - .headerParam(param -> param.key("Content-Type") - .value("application/json").isRequired(false)) - .authenticationKey(BaseController.AUTHENTICATION_KEY) - .httpMethod(HttpMethod.PUT)) - .responseHandler(responseHandler -> responseHandler - .deserializer( - response -> Boolean.parseBoolean(response)) - .nullify404(false) - .localErrorCase("500", - ErrorCase.create("Operation failed", - (reason, context) -> new ErrorResponseException(reason, context))) - .globalErrorCase(GLOBAL_ERROR_CASES)) - .endpointConfiguration(param -> param - .arraySerializationFormat(ArraySerializationFormat.PLAIN -)) - .build(); - } - - /** - * To programmatically synchronize user accounts and user groups from external system with - * ThoughtSpot, use this endpoint. The payload takes principals containing all users and groups - * present in the external system. The users and user groups in Thoughtspot get updated for any - * matching inputs. Any user and user group present in the input, but not present in the - * cluster, gets created in cluster. n You can optionally choose to delete the user and groups - * from the cluster, that are not present in the input. - * @param body Required parameter: Example: - * @return Returns the AdminsyncPrincipalResponse response from the API call - * @throws ApiException Represents error response from the server. - * @throws IOException Signals that an I/O exception of some sort has occurred. - */ - public AdminsyncPrincipalResponse restapiV2SyncPrincipal( - final TspublicRestV2AdminSyncprincipalRequest body) throws ApiException, IOException { - return prepareRestapiV2SyncPrincipalRequest(body).execute(); - } - - /** - * To programmatically synchronize user accounts and user groups from external system with - * ThoughtSpot, use this endpoint. The payload takes principals containing all users and groups - * present in the external system. The users and user groups in Thoughtspot get updated for any - * matching inputs. Any user and user group present in the input, but not present in the - * cluster, gets created in cluster. n You can optionally choose to delete the user and groups - * from the cluster, that are not present in the input. - * @param body Required parameter: Example: - * @return Returns the AdminsyncPrincipalResponse response from the API call - */ - public CompletableFuture restapiV2SyncPrincipalAsync( - final TspublicRestV2AdminSyncprincipalRequest body) { - try { - return prepareRestapiV2SyncPrincipalRequest(body).executeAsync(); - } catch (Exception e) { - throw new CompletionException(e); - } - } - - /** - * Builds the ApiCall object for restapiV2SyncPrincipal. - */ - private ApiCall prepareRestapiV2SyncPrincipalRequest( - final TspublicRestV2AdminSyncprincipalRequest body) throws JsonProcessingException, IOException { - return new ApiCall.Builder() - .globalConfig(getGlobalConfiguration()) - .requestBuilder(requestBuilder -> requestBuilder - .server(Server.ENUM_DEFAULT.value()) - .path("/tspublic/rest/v2/admin/syncprincipal") - .bodyParam(param -> param.value(body)) - .bodySerializer(() -> ApiHelper.serialize(body)) - .headerParam(param -> param.key("Content-Type") - .value("application/json").isRequired(false)) - .headerParam(param -> param.key("accept").value("application/json")) - .authenticationKey(BaseController.AUTHENTICATION_KEY) - .httpMethod(HttpMethod.PUT)) - .responseHandler(responseHandler -> responseHandler - .deserializer( - response -> ApiHelper.deserialize(response, AdminsyncPrincipalResponse.class)) - .nullify404(false) - .localErrorCase("500", - ErrorCase.create("Operation failed", - (reason, context) -> new ErrorResponseException(reason, context))) - .globalErrorCase(GLOBAL_ERROR_CASES)) - .endpointConfiguration(param -> param - .arraySerializationFormat(ArraySerializationFormat.PLAIN -)) - .build(); - } - - /** - * To programmatically change the owner of one or several objects from one user account to - * another, use this endpoint. You might want to transfer ownership of objects owned by a user - * to another active user, when the account is removed from the ThoughtSpot application. - * @param body Required parameter: Example: - * @return Returns the Boolean response from the API call - * @throws ApiException Represents error response from the server. - * @throws IOException Signals that an I/O exception of some sort has occurred. - */ - public Boolean restapiV2ChangeAuthorOfObjects( - final TspublicRestV2AdminChangeauthorRequest body) throws ApiException, IOException { - return prepareRestapiV2ChangeAuthorOfObjectsRequest(body).execute(); - } - - /** - * To programmatically change the owner of one or several objects from one user account to - * another, use this endpoint. You might want to transfer ownership of objects owned by a user - * to another active user, when the account is removed from the ThoughtSpot application. - * @param body Required parameter: Example: - * @return Returns the Boolean response from the API call - */ - public CompletableFuture restapiV2ChangeAuthorOfObjectsAsync( - final TspublicRestV2AdminChangeauthorRequest body) { - try { - return prepareRestapiV2ChangeAuthorOfObjectsRequest(body).executeAsync(); - } catch (Exception e) { - throw new CompletionException(e); - } - } - - /** - * Builds the ApiCall object for restapiV2ChangeAuthorOfObjects. - */ - private ApiCall prepareRestapiV2ChangeAuthorOfObjectsRequest( - final TspublicRestV2AdminChangeauthorRequest body) throws JsonProcessingException, IOException { - return new ApiCall.Builder() - .globalConfig(getGlobalConfiguration()) - .requestBuilder(requestBuilder -> requestBuilder - .server(Server.ENUM_DEFAULT.value()) - .path("/tspublic/rest/v2/admin/changeauthor") - .bodyParam(param -> param.value(body)) - .bodySerializer(() -> ApiHelper.serialize(body)) - .headerParam(param -> param.key("Content-Type") - .value("application/json").isRequired(false)) - .authenticationKey(BaseController.AUTHENTICATION_KEY) - .httpMethod(HttpMethod.PUT)) - .responseHandler(responseHandler -> responseHandler - .deserializer( - response -> Boolean.parseBoolean(response)) - .nullify404(false) - .localErrorCase("500", - ErrorCase.create("Operation failed", - (reason, context) -> new ErrorResponseException(reason, context))) - .globalErrorCase(GLOBAL_ERROR_CASES)) - .endpointConfiguration(param -> param - .arraySerializationFormat(ArraySerializationFormat.PLAIN -)) - .build(); - } - - /** - * To programmatically assign an author to one or several objects, use this endpoint. Provide - * either user name or id as input. When both are given user id will be considered. Requires - * administration privilege. - * @param body Required parameter: Example: - * @return Returns the Boolean response from the API call - * @throws ApiException Represents error response from the server. - * @throws IOException Signals that an I/O exception of some sort has occurred. - */ - public Boolean restapiV2AssignAuthorToObjects( - final TspublicRestV2AdminAssignauthorRequest body) throws ApiException, IOException { - return prepareRestapiV2AssignAuthorToObjectsRequest(body).execute(); - } - - /** - * To programmatically assign an author to one or several objects, use this endpoint. Provide - * either user name or id as input. When both are given user id will be considered. Requires - * administration privilege. - * @param body Required parameter: Example: - * @return Returns the Boolean response from the API call - */ - public CompletableFuture restapiV2AssignAuthorToObjectsAsync( - final TspublicRestV2AdminAssignauthorRequest body) { - try { - return prepareRestapiV2AssignAuthorToObjectsRequest(body).executeAsync(); - } catch (Exception e) { - throw new CompletionException(e); - } - } - - /** - * Builds the ApiCall object for restapiV2AssignAuthorToObjects. - */ - private ApiCall prepareRestapiV2AssignAuthorToObjectsRequest( - final TspublicRestV2AdminAssignauthorRequest body) throws JsonProcessingException, IOException { - return new ApiCall.Builder() - .globalConfig(getGlobalConfiguration()) - .requestBuilder(requestBuilder -> requestBuilder - .server(Server.ENUM_DEFAULT.value()) - .path("/tspublic/rest/v2/admin/assignauthor") - .bodyParam(param -> param.value(body)) - .bodySerializer(() -> ApiHelper.serialize(body)) - .headerParam(param -> param.key("Content-Type") - .value("application/json").isRequired(false)) - .authenticationKey(BaseController.AUTHENTICATION_KEY) - .httpMethod(HttpMethod.PUT)) - .responseHandler(responseHandler -> responseHandler - .deserializer( - response -> Boolean.parseBoolean(response)) - .nullify404(false) - .localErrorCase("500", - ErrorCase.create("Operation failed", - (reason, context) -> new ErrorResponseException(reason, context))) - .globalErrorCase(GLOBAL_ERROR_CASES)) - .endpointConfiguration(param -> param - .arraySerializationFormat(ArraySerializationFormat.PLAIN -)) - .build(); - } - - /** - * To logout one or more users from logged in session, use this endpoint. If no input is - * provided then all logged in users are force logged out. Requires administration privilege. - * @param body Required parameter: Example: - * @return Returns the Boolean response from the API call - * @throws ApiException Represents error response from the server. - * @throws IOException Signals that an I/O exception of some sort has occurred. - */ - public Boolean restapiV2ForceLogoutUsers( - final TspublicRestV2AdminForcelogoutRequest body) throws ApiException, IOException { - return prepareRestapiV2ForceLogoutUsersRequest(body).execute(); - } - - /** - * To logout one or more users from logged in session, use this endpoint. If no input is - * provided then all logged in users are force logged out. Requires administration privilege. - * @param body Required parameter: Example: - * @return Returns the Boolean response from the API call - */ - public CompletableFuture restapiV2ForceLogoutUsersAsync( - final TspublicRestV2AdminForcelogoutRequest body) { - try { - return prepareRestapiV2ForceLogoutUsersRequest(body).executeAsync(); - } catch (Exception e) { - throw new CompletionException(e); - } - } - - /** - * Builds the ApiCall object for restapiV2ForceLogoutUsers. - */ - private ApiCall prepareRestapiV2ForceLogoutUsersRequest( - final TspublicRestV2AdminForcelogoutRequest body) throws JsonProcessingException, IOException { - return new ApiCall.Builder() - .globalConfig(getGlobalConfiguration()) - .requestBuilder(requestBuilder -> requestBuilder - .server(Server.ENUM_DEFAULT.value()) - .path("/tspublic/rest/v2/admin/forcelogout") - .bodyParam(param -> param.value(body)) - .bodySerializer(() -> ApiHelper.serialize(body)) - .headerParam(param -> param.key("Content-Type") - .value("application/json").isRequired(false)) - .authenticationKey(BaseController.AUTHENTICATION_KEY) - .httpMethod(HttpMethod.POST)) - .responseHandler(responseHandler -> responseHandler - .deserializer( - response -> Boolean.parseBoolean(response)) - .nullify404(false) - .localErrorCase("500", - ErrorCase.create("Operation failed", - (reason, context) -> new ErrorResponseException(reason, context))) - .globalErrorCase(GLOBAL_ERROR_CASES)) - .endpointConfiguration(param -> param - .arraySerializationFormat(ArraySerializationFormat.PLAIN -)) - .build(); - } -} \ No newline at end of file diff --git a/Java/src/main/java/localhost/controllers/BaseController.java b/Java/src/main/java/localhost/controllers/BaseController.java deleted file mode 100644 index ecda9472f..000000000 --- a/Java/src/main/java/localhost/controllers/BaseController.java +++ /dev/null @@ -1,57 +0,0 @@ -/* - * ThoughtSpotPublicRESTAPILib - * - * This file was automatically generated by APIMATIC v3.0 ( https://www.apimatic.io ). - */ - -package localhost.controllers; - -import io.apimatic.core.ErrorCase; -import io.apimatic.core.GlobalConfiguration; -import io.apimatic.coreinterfaces.http.HttpClient; -import java.util.HashMap; -import java.util.Map; -import localhost.exceptions.ApiException; -import localhost.http.client.HttpCallback; - -/** - * Base class for all Controllers. - */ -public abstract class BaseController { - protected final static String AUTHENTICATION_KEY = "global"; - protected static final Map> GLOBAL_ERROR_CASES = - new HashMap>(); - private GlobalConfiguration globalConfig; - static { - GLOBAL_ERROR_CASES.put(ErrorCase.DEFAULT, ErrorCase.create("HTTP Response Not OK", - (reason, context) -> new ApiException(reason, context))); - } - - protected BaseController(GlobalConfiguration globalConfig) { - this.globalConfig = globalConfig; - } - - /** - * Get httpCallback associated with this controller. - * @return HttpCallback - */ - public HttpCallback getHttpCallback() { - return (HttpCallback) globalConfig.getHttpCallback(); - } - - /** - * Shared instance of the Http client. - * @return The shared instance of the http client - */ - public HttpClient getClientInstance() { - return globalConfig.getHttpClient(); - } - - /** - * Instance of the Global Configuration - * @return The instance of the global configuration - */ - protected GlobalConfiguration getGlobalConfiguration() { - return globalConfig; - } -} diff --git a/Java/src/main/java/localhost/controllers/ConnectionController.java b/Java/src/main/java/localhost/controllers/ConnectionController.java deleted file mode 100644 index 4748eb850..000000000 --- a/Java/src/main/java/localhost/controllers/ConnectionController.java +++ /dev/null @@ -1,643 +0,0 @@ -/* - * ThoughtSpotPublicRESTAPILib - * - * This file was automatically generated by APIMATIC v3.0 ( https://www.apimatic.io ). - */ - -package localhost.controllers; - -import com.fasterxml.jackson.core.JsonProcessingException; -import io.apimatic.core.ApiCall; -import io.apimatic.core.ErrorCase; -import io.apimatic.core.GlobalConfiguration; -import io.apimatic.coreinterfaces.http.request.ArraySerializationFormat; -import java.io.IOException; -import java.util.List; -import java.util.concurrent.CompletableFuture; -import java.util.concurrent.CompletionException; -import localhost.ApiHelper; -import localhost.Server; -import localhost.exceptions.ApiException; -import localhost.exceptions.ErrorResponseException; -import localhost.http.request.HttpMethod; -import localhost.models.ConnectionResponse; -import localhost.models.ConnectionTableColumnsResponse; -import localhost.models.ConnectionTableResponse; -import localhost.models.CreateConnectionResponse; -import localhost.models.TspublicRestV2ConnectionAddtableRequest; -import localhost.models.TspublicRestV2ConnectionCreateRequest; -import localhost.models.TspublicRestV2ConnectionRemovetableRequest; -import localhost.models.TspublicRestV2ConnectionSearchRequest; -import localhost.models.TspublicRestV2ConnectionTableRequest; -import localhost.models.TspublicRestV2ConnectionTablecoloumnRequest; -import localhost.models.TspublicRestV2ConnectionUpdateRequest; - -/** - * This class lists all the endpoints of the groups. - */ -public final class ConnectionController extends BaseController { - - /** - * Initializes the controller. - * @param globalConfig Configurations added in client. - */ - public ConnectionController(GlobalConfiguration globalConfig) { - super(globalConfig); - } - - /** - * To get the details of a specific connection use this endpoint. - * @param id Required parameter: The GUID of the connection to query - * @return Returns the ConnectionResponse response from the API call - * @throws ApiException Represents error response from the server. - * @throws IOException Signals that an I/O exception of some sort has occurred. - */ - public ConnectionResponse restapiV2GetConnection( - final String id) throws ApiException, IOException { - return prepareRestapiV2GetConnectionRequest(id).execute(); - } - - /** - * To get the details of a specific connection use this endpoint. - * @param id Required parameter: The GUID of the connection to query - * @return Returns the ConnectionResponse response from the API call - */ - public CompletableFuture restapiV2GetConnectionAsync( - final String id) { - try { - return prepareRestapiV2GetConnectionRequest(id).executeAsync(); - } catch (Exception e) { - throw new CompletionException(e); - } - } - - /** - * Builds the ApiCall object for restapiV2GetConnection. - */ - private ApiCall prepareRestapiV2GetConnectionRequest( - final String id) throws IOException { - return new ApiCall.Builder() - .globalConfig(getGlobalConfiguration()) - .requestBuilder(requestBuilder -> requestBuilder - .server(Server.ENUM_DEFAULT.value()) - .path("/tspublic/rest/v2/connection") - .queryParam(param -> param.key("id") - .value(id)) - .headerParam(param -> param.key("accept").value("application/json")) - .authenticationKey(BaseController.AUTHENTICATION_KEY) - .httpMethod(HttpMethod.GET)) - .responseHandler(responseHandler -> responseHandler - .deserializer( - response -> ApiHelper.deserialize(response, ConnectionResponse.class)) - .nullify404(false) - .localErrorCase("500", - ErrorCase.create("Operation failed", - (reason, context) -> new ErrorResponseException(reason, context))) - .globalErrorCase(GLOBAL_ERROR_CASES)) - .endpointConfiguration(param -> param - .arraySerializationFormat(ArraySerializationFormat.PLAIN -)) - .build(); - } - - /** - * To get the list of databases for a connection, use this endpoint. The response will include - * databases from the data platform corresponding to the connection id provided. - * @param id Required parameter: The GUID of the connection - * @return Returns the List of String response from the API call - * @throws ApiException Represents error response from the server. - * @throws IOException Signals that an I/O exception of some sort has occurred. - */ - public List restapiV2GetConnectionDatabase( - final String id) throws ApiException, IOException { - return prepareRestapiV2GetConnectionDatabaseRequest(id).execute(); - } - - /** - * To get the list of databases for a connection, use this endpoint. The response will include - * databases from the data platform corresponding to the connection id provided. - * @param id Required parameter: The GUID of the connection - * @return Returns the List of String response from the API call - */ - public CompletableFuture> restapiV2GetConnectionDatabaseAsync( - final String id) { - try { - return prepareRestapiV2GetConnectionDatabaseRequest(id).executeAsync(); - } catch (Exception e) { - throw new CompletionException(e); - } - } - - /** - * Builds the ApiCall object for restapiV2GetConnectionDatabase. - */ - private ApiCall, ApiException> prepareRestapiV2GetConnectionDatabaseRequest( - final String id) throws IOException { - return new ApiCall.Builder, ApiException>() - .globalConfig(getGlobalConfiguration()) - .requestBuilder(requestBuilder -> requestBuilder - .server(Server.ENUM_DEFAULT.value()) - .path("/tspublic/rest/v2/connection/database") - .queryParam(param -> param.key("id") - .value(id)) - .headerParam(param -> param.key("accept").value("application/json")) - .authenticationKey(BaseController.AUTHENTICATION_KEY) - .httpMethod(HttpMethod.GET)) - .responseHandler(responseHandler -> responseHandler - .deserializer( - response -> ApiHelper.deserializeArray(response, - String[].class)) - .nullify404(false) - .localErrorCase("500", - ErrorCase.create("Operation failed", - (reason, context) -> new ErrorResponseException(reason, context))) - .globalErrorCase(GLOBAL_ERROR_CASES)) - .endpointConfiguration(param -> param - .arraySerializationFormat(ArraySerializationFormat.PLAIN -)) - .build(); - } - - /** - * To programmatically create a connection in the ThoughtSpot system use this API endpoint. - * Using this API, you can create a connection and assign groups. To create a connection, you - * require admin connection privileges. All connections created in the ThoughtSpot system are - * added to ALL_GROUP. - * @param body Required parameter: Example: - * @return Returns the CreateConnectionResponse response from the API call - * @throws ApiException Represents error response from the server. - * @throws IOException Signals that an I/O exception of some sort has occurred. - */ - public CreateConnectionResponse restapiV2CreateConnection( - final TspublicRestV2ConnectionCreateRequest body) throws ApiException, IOException { - return prepareRestapiV2CreateConnectionRequest(body).execute(); - } - - /** - * To programmatically create a connection in the ThoughtSpot system use this API endpoint. - * Using this API, you can create a connection and assign groups. To create a connection, you - * require admin connection privileges. All connections created in the ThoughtSpot system are - * added to ALL_GROUP. - * @param body Required parameter: Example: - * @return Returns the CreateConnectionResponse response from the API call - */ - public CompletableFuture restapiV2CreateConnectionAsync( - final TspublicRestV2ConnectionCreateRequest body) { - try { - return prepareRestapiV2CreateConnectionRequest(body).executeAsync(); - } catch (Exception e) { - throw new CompletionException(e); - } - } - - /** - * Builds the ApiCall object for restapiV2CreateConnection. - */ - private ApiCall prepareRestapiV2CreateConnectionRequest( - final TspublicRestV2ConnectionCreateRequest body) throws JsonProcessingException, IOException { - return new ApiCall.Builder() - .globalConfig(getGlobalConfiguration()) - .requestBuilder(requestBuilder -> requestBuilder - .server(Server.ENUM_DEFAULT.value()) - .path("/tspublic/rest/v2/connection/create") - .bodyParam(param -> param.value(body)) - .bodySerializer(() -> ApiHelper.serialize(body)) - .headerParam(param -> param.key("Content-Type") - .value("application/json").isRequired(false)) - .headerParam(param -> param.key("accept").value("application/json")) - .authenticationKey(BaseController.AUTHENTICATION_KEY) - .httpMethod(HttpMethod.POST)) - .responseHandler(responseHandler -> responseHandler - .deserializer( - response -> ApiHelper.deserialize(response, CreateConnectionResponse.class)) - .nullify404(false) - .localErrorCase("500", - ErrorCase.create("Operation failed", - (reason, context) -> new ErrorResponseException(reason, context))) - .globalErrorCase(GLOBAL_ERROR_CASES)) - .endpointConfiguration(param -> param - .arraySerializationFormat(ArraySerializationFormat.PLAIN -)) - .build(); - } - - /** - * You can use this endpoint to programmatically modify an existing connection To modify a - * connection, you require admin connection privileges. At least one of Connection Id or - * connectionname is mandatory. When both are given, then connection id will be considered and - * connectionname will be updated. - * @param body Required parameter: Example: - * @return Returns the Boolean response from the API call - * @throws ApiException Represents error response from the server. - * @throws IOException Signals that an I/O exception of some sort has occurred. - */ - public Boolean restapiV2UpdateConnection( - final TspublicRestV2ConnectionUpdateRequest body) throws ApiException, IOException { - return prepareRestapiV2UpdateConnectionRequest(body).execute(); - } - - /** - * You can use this endpoint to programmatically modify an existing connection To modify a - * connection, you require admin connection privileges. At least one of Connection Id or - * connectionname is mandatory. When both are given, then connection id will be considered and - * connectionname will be updated. - * @param body Required parameter: Example: - * @return Returns the Boolean response from the API call - */ - public CompletableFuture restapiV2UpdateConnectionAsync( - final TspublicRestV2ConnectionUpdateRequest body) { - try { - return prepareRestapiV2UpdateConnectionRequest(body).executeAsync(); - } catch (Exception e) { - throw new CompletionException(e); - } - } - - /** - * Builds the ApiCall object for restapiV2UpdateConnection. - */ - private ApiCall prepareRestapiV2UpdateConnectionRequest( - final TspublicRestV2ConnectionUpdateRequest body) throws JsonProcessingException, IOException { - return new ApiCall.Builder() - .globalConfig(getGlobalConfiguration()) - .requestBuilder(requestBuilder -> requestBuilder - .server(Server.ENUM_DEFAULT.value()) - .path("/tspublic/rest/v2/connection/update") - .bodyParam(param -> param.value(body)) - .bodySerializer(() -> ApiHelper.serialize(body)) - .headerParam(param -> param.key("Content-Type") - .value("application/json").isRequired(false)) - .authenticationKey(BaseController.AUTHENTICATION_KEY) - .httpMethod(HttpMethod.PUT)) - .responseHandler(responseHandler -> responseHandler - .deserializer( - response -> Boolean.parseBoolean(response)) - .nullify404(false) - .localErrorCase("500", - ErrorCase.create("Operation failed", - (reason, context) -> new ErrorResponseException(reason, context))) - .globalErrorCase(GLOBAL_ERROR_CASES)) - .endpointConfiguration(param -> param - .arraySerializationFormat(ArraySerializationFormat.PLAIN -)) - .build(); - } - - /** - * To remove a connection from the ThoughtSpot system, use this endpoint. - * @param id Required parameter: A JSON array of GUIDs of the connection - * @return Returns the Boolean response from the API call - * @throws ApiException Represents error response from the server. - * @throws IOException Signals that an I/O exception of some sort has occurred. - */ - public Boolean restapiV2DeleteConnection( - final List id) throws ApiException, IOException { - return prepareRestapiV2DeleteConnectionRequest(id).execute(); - } - - /** - * To remove a connection from the ThoughtSpot system, use this endpoint. - * @param id Required parameter: A JSON array of GUIDs of the connection - * @return Returns the Boolean response from the API call - */ - public CompletableFuture restapiV2DeleteConnectionAsync( - final List id) { - try { - return prepareRestapiV2DeleteConnectionRequest(id).executeAsync(); - } catch (Exception e) { - throw new CompletionException(e); - } - } - - /** - * Builds the ApiCall object for restapiV2DeleteConnection. - */ - private ApiCall prepareRestapiV2DeleteConnectionRequest( - final List id) throws IOException { - return new ApiCall.Builder() - .globalConfig(getGlobalConfiguration()) - .requestBuilder(requestBuilder -> requestBuilder - .server(Server.ENUM_DEFAULT.value()) - .path("/tspublic/rest/v2/connection/delete") - .queryParam(param -> param.key("id") - .value(id)) - .authenticationKey(BaseController.AUTHENTICATION_KEY) - .httpMethod(HttpMethod.DELETE)) - .responseHandler(responseHandler -> responseHandler - .deserializer( - response -> Boolean.parseBoolean(response)) - .nullify404(false) - .localErrorCase("500", - ErrorCase.create("Operation failed", - (reason, context) -> new ErrorResponseException(reason, context))) - .globalErrorCase(GLOBAL_ERROR_CASES)) - .endpointConfiguration(param -> param - .arraySerializationFormat(ArraySerializationFormat.PLAIN -)) - .build(); - } - - /** - * To programmatically add table to an existing connection use this endpoint. When you assign - * groups to a connection, the connection inherits the privileges assigned to those groups. At - * least one of Connection Id or connectionname is mandatory. When both are given, then - * connection id will be considered. - * @param body Required parameter: Example: - * @return Returns the Boolean response from the API call - * @throws ApiException Represents error response from the server. - * @throws IOException Signals that an I/O exception of some sort has occurred. - */ - public Boolean restapiV2AddTableToConnection( - final TspublicRestV2ConnectionAddtableRequest body) throws ApiException, IOException { - return prepareRestapiV2AddTableToConnectionRequest(body).execute(); - } - - /** - * To programmatically add table to an existing connection use this endpoint. When you assign - * groups to a connection, the connection inherits the privileges assigned to those groups. At - * least one of Connection Id or connectionname is mandatory. When both are given, then - * connection id will be considered. - * @param body Required parameter: Example: - * @return Returns the Boolean response from the API call - */ - public CompletableFuture restapiV2AddTableToConnectionAsync( - final TspublicRestV2ConnectionAddtableRequest body) { - try { - return prepareRestapiV2AddTableToConnectionRequest(body).executeAsync(); - } catch (Exception e) { - throw new CompletionException(e); - } - } - - /** - * Builds the ApiCall object for restapiV2AddTableToConnection. - */ - private ApiCall prepareRestapiV2AddTableToConnectionRequest( - final TspublicRestV2ConnectionAddtableRequest body) throws JsonProcessingException, IOException { - return new ApiCall.Builder() - .globalConfig(getGlobalConfiguration()) - .requestBuilder(requestBuilder -> requestBuilder - .server(Server.ENUM_DEFAULT.value()) - .path("/tspublic/rest/v2/connection/addtable") - .bodyParam(param -> param.value(body)) - .bodySerializer(() -> ApiHelper.serialize(body)) - .headerParam(param -> param.key("Content-Type") - .value("application/json").isRequired(false)) - .authenticationKey(BaseController.AUTHENTICATION_KEY) - .httpMethod(HttpMethod.PUT)) - .responseHandler(responseHandler -> responseHandler - .deserializer( - response -> Boolean.parseBoolean(response)) - .nullify404(false) - .localErrorCase("500", - ErrorCase.create("Operation failed", - (reason, context) -> new ErrorResponseException(reason, context))) - .globalErrorCase(GLOBAL_ERROR_CASES)) - .endpointConfiguration(param -> param - .arraySerializationFormat(ArraySerializationFormat.PLAIN -)) - .build(); - } - - /** - * To programmatically remove a table from a connection use API endpoint. The API removes only - * the connection association. It does not delete the connection or group from the Thoughtspot - * system. At least one of id or name of connection is required. When both are given connection - * id will be considered. - * @param body Required parameter: Example: - * @return Returns the Boolean response from the API call - * @throws ApiException Represents error response from the server. - * @throws IOException Signals that an I/O exception of some sort has occurred. - */ - public Boolean restapiV2RemoveTableFromConnection( - final TspublicRestV2ConnectionRemovetableRequest body) throws ApiException, IOException { - return prepareRestapiV2RemoveTableFromConnectionRequest(body).execute(); - } - - /** - * To programmatically remove a table from a connection use API endpoint. The API removes only - * the connection association. It does not delete the connection or group from the Thoughtspot - * system. At least one of id or name of connection is required. When both are given connection - * id will be considered. - * @param body Required parameter: Example: - * @return Returns the Boolean response from the API call - */ - public CompletableFuture restapiV2RemoveTableFromConnectionAsync( - final TspublicRestV2ConnectionRemovetableRequest body) { - try { - return prepareRestapiV2RemoveTableFromConnectionRequest(body).executeAsync(); - } catch (Exception e) { - throw new CompletionException(e); - } - } - - /** - * Builds the ApiCall object for restapiV2RemoveTableFromConnection. - */ - private ApiCall prepareRestapiV2RemoveTableFromConnectionRequest( - final TspublicRestV2ConnectionRemovetableRequest body) throws JsonProcessingException, IOException { - return new ApiCall.Builder() - .globalConfig(getGlobalConfiguration()) - .requestBuilder(requestBuilder -> requestBuilder - .server(Server.ENUM_DEFAULT.value()) - .path("/tspublic/rest/v2/connection/removetable") - .bodyParam(param -> param.value(body)) - .bodySerializer(() -> ApiHelper.serialize(body)) - .headerParam(param -> param.key("Content-Type") - .value("application/json").isRequired(false)) - .authenticationKey(BaseController.AUTHENTICATION_KEY) - .httpMethod(HttpMethod.PUT)) - .responseHandler(responseHandler -> responseHandler - .deserializer( - response -> Boolean.parseBoolean(response)) - .nullify404(false) - .localErrorCase("500", - ErrorCase.create("Operation failed", - (reason, context) -> new ErrorResponseException(reason, context))) - .globalErrorCase(GLOBAL_ERROR_CASES)) - .endpointConfiguration(param -> param - .arraySerializationFormat(ArraySerializationFormat.PLAIN -)) - .build(); - } - - /** - * To get the details of a specific connection or all connections in the ThoughtSpot system use - * this end point. - * @param body Required parameter: Example: - * @return Returns the List of ConnectionResponse response from the API call - * @throws ApiException Represents error response from the server. - * @throws IOException Signals that an I/O exception of some sort has occurred. - */ - public List restapiV2SearchConnection( - final TspublicRestV2ConnectionSearchRequest body) throws ApiException, IOException { - return prepareRestapiV2SearchConnectionRequest(body).execute(); - } - - /** - * To get the details of a specific connection or all connections in the ThoughtSpot system use - * this end point. - * @param body Required parameter: Example: - * @return Returns the List of ConnectionResponse response from the API call - */ - public CompletableFuture> restapiV2SearchConnectionAsync( - final TspublicRestV2ConnectionSearchRequest body) { - try { - return prepareRestapiV2SearchConnectionRequest(body).executeAsync(); - } catch (Exception e) { - throw new CompletionException(e); - } - } - - /** - * Builds the ApiCall object for restapiV2SearchConnection. - */ - private ApiCall, ApiException> prepareRestapiV2SearchConnectionRequest( - final TspublicRestV2ConnectionSearchRequest body) throws JsonProcessingException, IOException { - return new ApiCall.Builder, ApiException>() - .globalConfig(getGlobalConfiguration()) - .requestBuilder(requestBuilder -> requestBuilder - .server(Server.ENUM_DEFAULT.value()) - .path("/tspublic/rest/v2/connection/search") - .bodyParam(param -> param.value(body)) - .bodySerializer(() -> ApiHelper.serialize(body)) - .headerParam(param -> param.key("Content-Type") - .value("application/json").isRequired(false)) - .headerParam(param -> param.key("accept").value("application/json")) - .authenticationKey(BaseController.AUTHENTICATION_KEY) - .httpMethod(HttpMethod.POST)) - .responseHandler(responseHandler -> responseHandler - .deserializer( - response -> ApiHelper.deserializeArray(response, - ConnectionResponse[].class)) - .nullify404(false) - .localErrorCase("500", - ErrorCase.create("Operation failed", - (reason, context) -> new ErrorResponseException(reason, context))) - .globalErrorCase(GLOBAL_ERROR_CASES)) - .endpointConfiguration(param -> param - .arraySerializationFormat(ArraySerializationFormat.PLAIN -)) - .build(); - } - - /** - * To get the details of tables from a connection, use this endpoint. You can get the details of - * tables in the data platform for the connection id provided. - * @param body Required parameter: Example: - * @return Returns the ConnectionTableResponse response from the API call - * @throws ApiException Represents error response from the server. - * @throws IOException Signals that an I/O exception of some sort has occurred. - */ - public ConnectionTableResponse restapiV2GetConnectionTables( - final TspublicRestV2ConnectionTableRequest body) throws ApiException, IOException { - return prepareRestapiV2GetConnectionTablesRequest(body).execute(); - } - - /** - * To get the details of tables from a connection, use this endpoint. You can get the details of - * tables in the data platform for the connection id provided. - * @param body Required parameter: Example: - * @return Returns the ConnectionTableResponse response from the API call - */ - public CompletableFuture restapiV2GetConnectionTablesAsync( - final TspublicRestV2ConnectionTableRequest body) { - try { - return prepareRestapiV2GetConnectionTablesRequest(body).executeAsync(); - } catch (Exception e) { - throw new CompletionException(e); - } - } - - /** - * Builds the ApiCall object for restapiV2GetConnectionTables. - */ - private ApiCall prepareRestapiV2GetConnectionTablesRequest( - final TspublicRestV2ConnectionTableRequest body) throws JsonProcessingException, IOException { - return new ApiCall.Builder() - .globalConfig(getGlobalConfiguration()) - .requestBuilder(requestBuilder -> requestBuilder - .server(Server.ENUM_DEFAULT.value()) - .path("/tspublic/rest/v2/connection/table") - .bodyParam(param -> param.value(body)) - .bodySerializer(() -> ApiHelper.serialize(body)) - .headerParam(param -> param.key("Content-Type") - .value("application/json").isRequired(false)) - .headerParam(param -> param.key("accept").value("application/json")) - .authenticationKey(BaseController.AUTHENTICATION_KEY) - .httpMethod(HttpMethod.POST)) - .responseHandler(responseHandler -> responseHandler - .deserializer( - response -> ApiHelper.deserialize(response, ConnectionTableResponse.class)) - .nullify404(false) - .localErrorCase("500", - ErrorCase.create("Operation failed", - (reason, context) -> new ErrorResponseException(reason, context))) - .globalErrorCase(GLOBAL_ERROR_CASES)) - .endpointConfiguration(param -> param - .arraySerializationFormat(ArraySerializationFormat.PLAIN -)) - .build(); - } - - /** - * To get the details of columns in a table associated to a connection, use this endpoint. You - * can get the columns of any table available in the data platform for the connection id - * provided. - * @param body Required parameter: Example: - * @return Returns the ConnectionTableColumnsResponse response from the API call - * @throws ApiException Represents error response from the server. - * @throws IOException Signals that an I/O exception of some sort has occurred. - */ - public ConnectionTableColumnsResponse restapiV2GetConnectionTableColumns( - final TspublicRestV2ConnectionTablecoloumnRequest body) throws ApiException, IOException { - return prepareRestapiV2GetConnectionTableColumnsRequest(body).execute(); - } - - /** - * To get the details of columns in a table associated to a connection, use this endpoint. You - * can get the columns of any table available in the data platform for the connection id - * provided. - * @param body Required parameter: Example: - * @return Returns the ConnectionTableColumnsResponse response from the API call - */ - public CompletableFuture restapiV2GetConnectionTableColumnsAsync( - final TspublicRestV2ConnectionTablecoloumnRequest body) { - try { - return prepareRestapiV2GetConnectionTableColumnsRequest(body).executeAsync(); - } catch (Exception e) { - throw new CompletionException(e); - } - } - - /** - * Builds the ApiCall object for restapiV2GetConnectionTableColumns. - */ - private ApiCall prepareRestapiV2GetConnectionTableColumnsRequest( - final TspublicRestV2ConnectionTablecoloumnRequest body) throws JsonProcessingException, IOException { - return new ApiCall.Builder() - .globalConfig(getGlobalConfiguration()) - .requestBuilder(requestBuilder -> requestBuilder - .server(Server.ENUM_DEFAULT.value()) - .path("/tspublic/rest/v2/connection/tablecoloumn") - .bodyParam(param -> param.value(body)) - .bodySerializer(() -> ApiHelper.serialize(body)) - .headerParam(param -> param.key("Content-Type") - .value("application/json").isRequired(false)) - .headerParam(param -> param.key("accept").value("application/json")) - .authenticationKey(BaseController.AUTHENTICATION_KEY) - .httpMethod(HttpMethod.POST)) - .responseHandler(responseHandler -> responseHandler - .deserializer( - response -> ApiHelper.deserialize(response, ConnectionTableColumnsResponse.class)) - .nullify404(false) - .localErrorCase("500", - ErrorCase.create("Operation failed", - (reason, context) -> new ErrorResponseException(reason, context))) - .globalErrorCase(GLOBAL_ERROR_CASES)) - .endpointConfiguration(param -> param - .arraySerializationFormat(ArraySerializationFormat.PLAIN -)) - .build(); - } -} \ No newline at end of file diff --git a/Java/src/main/java/localhost/controllers/CustomActionsController.java b/Java/src/main/java/localhost/controllers/CustomActionsController.java deleted file mode 100644 index 29d7612e0..000000000 --- a/Java/src/main/java/localhost/controllers/CustomActionsController.java +++ /dev/null @@ -1,510 +0,0 @@ -/* - * ThoughtSpotPublicRESTAPILib - * - * This file was automatically generated by APIMATIC v3.0 ( https://www.apimatic.io ). - */ - -package localhost.controllers; - -import com.fasterxml.jackson.core.JsonProcessingException; -import io.apimatic.core.ApiCall; -import io.apimatic.core.ErrorCase; -import io.apimatic.core.GlobalConfiguration; -import io.apimatic.coreinterfaces.http.request.ArraySerializationFormat; -import java.io.IOException; -import java.util.concurrent.CompletableFuture; -import java.util.concurrent.CompletionException; -import localhost.ApiHelper; -import localhost.Server; -import localhost.exceptions.ApiException; -import localhost.exceptions.ErrorResponseException; -import localhost.http.request.HttpMethod; -import localhost.models.TspublicRestV2CustomactionAssociationUpdateRequest; -import localhost.models.TspublicRestV2CustomactionCreateRequest; -import localhost.models.TspublicRestV2CustomactionSearchRequest; -import localhost.models.TspublicRestV2CustomactionUpdateRequest; - -/** - * This class lists all the endpoints of the groups. - */ -public final class CustomActionsController extends BaseController { - - /** - * Initializes the controller. - * @param globalConfig Configurations added in client. - */ - public CustomActionsController(GlobalConfiguration globalConfig) { - super(globalConfig); - } - - /** - * To get details of a specific custom action configured in the ThoughtSpot system, use this - * endpoint. - * @param id Required parameter: GUID of the custom action - * @return Returns the Object response from the API call - * @throws ApiException Represents error response from the server. - * @throws IOException Signals that an I/O exception of some sort has occurred. - */ - public Object restapiV2GetCustomAction( - final String id) throws ApiException, IOException { - return prepareRestapiV2GetCustomActionRequest(id).execute(); - } - - /** - * To get details of a specific custom action configured in the ThoughtSpot system, use this - * endpoint. - * @param id Required parameter: GUID of the custom action - * @return Returns the Object response from the API call - */ - public CompletableFuture restapiV2GetCustomActionAsync( - final String id) { - try { - return prepareRestapiV2GetCustomActionRequest(id).executeAsync(); - } catch (Exception e) { - throw new CompletionException(e); - } - } - - /** - * Builds the ApiCall object for restapiV2GetCustomAction. - */ - private ApiCall prepareRestapiV2GetCustomActionRequest( - final String id) throws IOException { - return new ApiCall.Builder() - .globalConfig(getGlobalConfiguration()) - .requestBuilder(requestBuilder -> requestBuilder - .server(Server.ENUM_DEFAULT.value()) - .path("/tspublic/rest/v2/customaction") - .queryParam(param -> param.key("id") - .value(id)) - .headerParam(param -> param.key("accept").value("application/json")) - .authenticationKey(BaseController.AUTHENTICATION_KEY) - .httpMethod(HttpMethod.GET)) - .responseHandler(responseHandler -> responseHandler - .deserializer( - response -> response) - .nullify404(false) - .localErrorCase("500", - ErrorCase.create("Operation failed", - (reason, context) -> new ErrorResponseException(reason, context))) - .globalErrorCase(GLOBAL_ERROR_CASES)) - .endpointConfiguration(param -> param - .arraySerializationFormat(ArraySerializationFormat.PLAIN -)) - .build(); - } - - /** - * To search custom actions available on a ThoughtSpot instance, use this endpoint. - * @param body Required parameter: Example: - * @return Returns the Object response from the API call - * @throws ApiException Represents error response from the server. - * @throws IOException Signals that an I/O exception of some sort has occurred. - */ - public Object restapiV2SearchCustomAction( - final TspublicRestV2CustomactionSearchRequest body) throws ApiException, IOException { - return prepareRestapiV2SearchCustomActionRequest(body).execute(); - } - - /** - * To search custom actions available on a ThoughtSpot instance, use this endpoint. - * @param body Required parameter: Example: - * @return Returns the Object response from the API call - */ - public CompletableFuture restapiV2SearchCustomActionAsync( - final TspublicRestV2CustomactionSearchRequest body) { - try { - return prepareRestapiV2SearchCustomActionRequest(body).executeAsync(); - } catch (Exception e) { - throw new CompletionException(e); - } - } - - /** - * Builds the ApiCall object for restapiV2SearchCustomAction. - */ - private ApiCall prepareRestapiV2SearchCustomActionRequest( - final TspublicRestV2CustomactionSearchRequest body) throws JsonProcessingException, IOException { - return new ApiCall.Builder() - .globalConfig(getGlobalConfiguration()) - .requestBuilder(requestBuilder -> requestBuilder - .server(Server.ENUM_DEFAULT.value()) - .path("/tspublic/rest/v2/customaction/search") - .bodyParam(param -> param.value(body)) - .bodySerializer(() -> ApiHelper.serialize(body)) - .headerParam(param -> param.key("Content-Type") - .value("application/json").isRequired(false)) - .headerParam(param -> param.key("accept").value("application/json")) - .authenticationKey(BaseController.AUTHENTICATION_KEY) - .httpMethod(HttpMethod.POST)) - .responseHandler(responseHandler -> responseHandler - .deserializer( - response -> response) - .nullify404(false) - .localErrorCase("500", - ErrorCase.create("Operation failed", - (reason, context) -> new ErrorResponseException(reason, context))) - .globalErrorCase(GLOBAL_ERROR_CASES)) - .endpointConfiguration(param -> param - .arraySerializationFormat(ArraySerializationFormat.PLAIN -)) - .build(); - } - - /** - * ThoughtSpot supports associating custom actions to Liveboards, answers, and worksheets. To - * get the details of the ThoughtSpot objects associated with a custom action, use this - * endpoint. - * @param id Required parameter: GUID of the custom action - * @return Returns the Object response from the API call - * @throws ApiException Represents error response from the server. - * @throws IOException Signals that an I/O exception of some sort has occurred. - */ - public Object restapiV2GetCustomActionAssociation( - final String id) throws ApiException, IOException { - return prepareRestapiV2GetCustomActionAssociationRequest(id).execute(); - } - - /** - * ThoughtSpot supports associating custom actions to Liveboards, answers, and worksheets. To - * get the details of the ThoughtSpot objects associated with a custom action, use this - * endpoint. - * @param id Required parameter: GUID of the custom action - * @return Returns the Object response from the API call - */ - public CompletableFuture restapiV2GetCustomActionAssociationAsync( - final String id) { - try { - return prepareRestapiV2GetCustomActionAssociationRequest(id).executeAsync(); - } catch (Exception e) { - throw new CompletionException(e); - } - } - - /** - * Builds the ApiCall object for restapiV2GetCustomActionAssociation. - */ - private ApiCall prepareRestapiV2GetCustomActionAssociationRequest( - final String id) throws IOException { - return new ApiCall.Builder() - .globalConfig(getGlobalConfiguration()) - .requestBuilder(requestBuilder -> requestBuilder - .server(Server.ENUM_DEFAULT.value()) - .path("/tspublic/rest/v2/customaction/association") - .queryParam(param -> param.key("id") - .value(id)) - .headerParam(param -> param.key("accept").value("application/json")) - .authenticationKey(BaseController.AUTHENTICATION_KEY) - .httpMethod(HttpMethod.GET)) - .responseHandler(responseHandler -> responseHandler - .deserializer( - response -> response) - .nullify404(false) - .localErrorCase("500", - ErrorCase.create("Operation failed", - (reason, context) -> new ErrorResponseException(reason, context))) - .globalErrorCase(GLOBAL_ERROR_CASES)) - .endpointConfiguration(param -> param - .arraySerializationFormat(ArraySerializationFormat.PLAIN -)) - .build(); - } - - /** - * To programmatically create custom actions on ThoughtSpot clusters that support embedding - * configuration, use this endpoint. - * @param body Required parameter: Example: - * @return Returns the Object response from the API call - * @throws ApiException Represents error response from the server. - * @throws IOException Signals that an I/O exception of some sort has occurred. - */ - public Object restapiV2CreateCustomAction( - final TspublicRestV2CustomactionCreateRequest body) throws ApiException, IOException { - return prepareRestapiV2CreateCustomActionRequest(body).execute(); - } - - /** - * To programmatically create custom actions on ThoughtSpot clusters that support embedding - * configuration, use this endpoint. - * @param body Required parameter: Example: - * @return Returns the Object response from the API call - */ - public CompletableFuture restapiV2CreateCustomActionAsync( - final TspublicRestV2CustomactionCreateRequest body) { - try { - return prepareRestapiV2CreateCustomActionRequest(body).executeAsync(); - } catch (Exception e) { - throw new CompletionException(e); - } - } - - /** - * Builds the ApiCall object for restapiV2CreateCustomAction. - */ - private ApiCall prepareRestapiV2CreateCustomActionRequest( - final TspublicRestV2CustomactionCreateRequest body) throws JsonProcessingException, IOException { - return new ApiCall.Builder() - .globalConfig(getGlobalConfiguration()) - .requestBuilder(requestBuilder -> requestBuilder - .server(Server.ENUM_DEFAULT.value()) - .path("/tspublic/rest/v2/customaction/create") - .bodyParam(param -> param.value(body)) - .bodySerializer(() -> ApiHelper.serialize(body)) - .headerParam(param -> param.key("Content-Type") - .value("application/json").isRequired(false)) - .headerParam(param -> param.key("accept").value("application/json")) - .authenticationKey(BaseController.AUTHENTICATION_KEY) - .httpMethod(HttpMethod.POST)) - .responseHandler(responseHandler -> responseHandler - .deserializer( - response -> response) - .nullify404(false) - .localErrorCase("500", - ErrorCase.create("Operation failed", - (reason, context) -> new ErrorResponseException(reason, context))) - .globalErrorCase(GLOBAL_ERROR_CASES)) - .endpointConfiguration(param -> param - .arraySerializationFormat(ArraySerializationFormat.PLAIN -)) - .build(); - } - - /** - * To programmatically edit an existing custom action, use this endpoint. - * @param body Required parameter: Example: - * @return Returns the Object response from the API call - * @throws ApiException Represents error response from the server. - * @throws IOException Signals that an I/O exception of some sort has occurred. - */ - public Object restapiV2UpdateCustomAction( - final TspublicRestV2CustomactionUpdateRequest body) throws ApiException, IOException { - return prepareRestapiV2UpdateCustomActionRequest(body).execute(); - } - - /** - * To programmatically edit an existing custom action, use this endpoint. - * @param body Required parameter: Example: - * @return Returns the Object response from the API call - */ - public CompletableFuture restapiV2UpdateCustomActionAsync( - final TspublicRestV2CustomactionUpdateRequest body) { - try { - return prepareRestapiV2UpdateCustomActionRequest(body).executeAsync(); - } catch (Exception e) { - throw new CompletionException(e); - } - } - - /** - * Builds the ApiCall object for restapiV2UpdateCustomAction. - */ - private ApiCall prepareRestapiV2UpdateCustomActionRequest( - final TspublicRestV2CustomactionUpdateRequest body) throws JsonProcessingException, IOException { - return new ApiCall.Builder() - .globalConfig(getGlobalConfiguration()) - .requestBuilder(requestBuilder -> requestBuilder - .server(Server.ENUM_DEFAULT.value()) - .path("/tspublic/rest/v2/customaction/update") - .bodyParam(param -> param.value(body)) - .bodySerializer(() -> ApiHelper.serialize(body)) - .headerParam(param -> param.key("Content-Type") - .value("application/json").isRequired(false)) - .headerParam(param -> param.key("accept").value("application/json")) - .authenticationKey(BaseController.AUTHENTICATION_KEY) - .httpMethod(HttpMethod.PUT)) - .responseHandler(responseHandler -> responseHandler - .deserializer( - response -> response) - .nullify404(false) - .localErrorCase("500", - ErrorCase.create("Operation failed", - (reason, context) -> new ErrorResponseException(reason, context))) - .globalErrorCase(GLOBAL_ERROR_CASES)) - .endpointConfiguration(param -> param - .arraySerializationFormat(ArraySerializationFormat.PLAIN -)) - .build(); - } - - /** - * To programmatically delete a custom action, use this endpoint. - * @param id Required parameter: GUID of the custom action - * @return Returns the Object response from the API call - * @throws ApiException Represents error response from the server. - * @throws IOException Signals that an I/O exception of some sort has occurred. - */ - public Object restapiV2DeleteCustomAction( - final String id) throws ApiException, IOException { - return prepareRestapiV2DeleteCustomActionRequest(id).execute(); - } - - /** - * To programmatically delete a custom action, use this endpoint. - * @param id Required parameter: GUID of the custom action - * @return Returns the Object response from the API call - */ - public CompletableFuture restapiV2DeleteCustomActionAsync( - final String id) { - try { - return prepareRestapiV2DeleteCustomActionRequest(id).executeAsync(); - } catch (Exception e) { - throw new CompletionException(e); - } - } - - /** - * Builds the ApiCall object for restapiV2DeleteCustomAction. - */ - private ApiCall prepareRestapiV2DeleteCustomActionRequest( - final String id) throws IOException { - return new ApiCall.Builder() - .globalConfig(getGlobalConfiguration()) - .requestBuilder(requestBuilder -> requestBuilder - .server(Server.ENUM_DEFAULT.value()) - .path("/tspublic/rest/v2/customaction/delete") - .queryParam(param -> param.key("id") - .value(id)) - .headerParam(param -> param.key("accept").value("application/json")) - .authenticationKey(BaseController.AUTHENTICATION_KEY) - .httpMethod(HttpMethod.DELETE)) - .responseHandler(responseHandler -> responseHandler - .deserializer( - response -> response) - .nullify404(false) - .localErrorCase("500", - ErrorCase.create("Operation failed", - (reason, context) -> new ErrorResponseException(reason, context))) - .globalErrorCase(GLOBAL_ERROR_CASES)) - .endpointConfiguration(param -> param - .arraySerializationFormat(ArraySerializationFormat.PLAIN -)) - .build(); - } - - /** - * To programmatically associate a custom action to a ThoughtSpot object, use this endpoint. - * @param body Required parameter: Example: - * @return Returns the Object response from the API call - * @throws ApiException Represents error response from the server. - * @throws IOException Signals that an I/O exception of some sort has occurred. - */ - public Object restapiV2UpdateCustomActionAssociation( - final TspublicRestV2CustomactionAssociationUpdateRequest body) throws ApiException, IOException { - return prepareRestapiV2UpdateCustomActionAssociationRequest(body).execute(); - } - - /** - * To programmatically associate a custom action to a ThoughtSpot object, use this endpoint. - * @param body Required parameter: Example: - * @return Returns the Object response from the API call - */ - public CompletableFuture restapiV2UpdateCustomActionAssociationAsync( - final TspublicRestV2CustomactionAssociationUpdateRequest body) { - try { - return prepareRestapiV2UpdateCustomActionAssociationRequest(body).executeAsync(); - } catch (Exception e) { - throw new CompletionException(e); - } - } - - /** - * Builds the ApiCall object for restapiV2UpdateCustomActionAssociation. - */ - private ApiCall prepareRestapiV2UpdateCustomActionAssociationRequest( - final TspublicRestV2CustomactionAssociationUpdateRequest body) throws JsonProcessingException, IOException { - return new ApiCall.Builder() - .globalConfig(getGlobalConfiguration()) - .requestBuilder(requestBuilder -> requestBuilder - .server(Server.ENUM_DEFAULT.value()) - .path("/tspublic/rest/v2/customaction/association/update") - .bodyParam(param -> param.value(body)) - .bodySerializer(() -> ApiHelper.serialize(body)) - .headerParam(param -> param.key("Content-Type") - .value("application/json").isRequired(false)) - .headerParam(param -> param.key("accept").value("application/json")) - .authenticationKey(BaseController.AUTHENTICATION_KEY) - .httpMethod(HttpMethod.PUT)) - .responseHandler(responseHandler -> responseHandler - .deserializer( - response -> response) - .nullify404(false) - .localErrorCase("500", - ErrorCase.create("Operation failed", - (reason, context) -> new ErrorResponseException(reason, context))) - .globalErrorCase(GLOBAL_ERROR_CASES)) - .endpointConfiguration(param -> param - .arraySerializationFormat(ArraySerializationFormat.PLAIN -)) - .build(); - } - - /** - * To remove custom action associations to ThoughtSpot objects, use this endpoint. - * @param id Required parameter: GUID of the custom action - * @param association Required parameter: A JSON map of the attributes with association of the - * action to ThoughtSpot object ID Example: - * {"id":"0dbd5b3a-84c1-4407-9803-cf07d67e6fcf","name":"My worksheet - * action","version":"v2","type":"URL","detail":{"link":"https://unpkg.com","function":"my-worksheet-action","authSelect":"NONE","authToken":"","encodeUser":"","apiKey":"X-API-KEY","apiValue":"","additionalUrlHeaders":"{}"},"actionAssociationMap":{"WORKSHEET":{"2b9d083a-275c-4984-9cfe-90b036affa17":{"enabled":"true","context":"PRIMARY"}}},"context":"NONE","availability":[ - * ],"userGroupList":["d0326b56-ef23-4c8a-8327-a30e99bcc72b"]} - * @return Returns the Object response from the API call - * @throws ApiException Represents error response from the server. - * @throws IOException Signals that an I/O exception of some sort has occurred. - */ - public Object restapiV2DeleteCustomActionAssociation( - final String id, - final String association) throws ApiException, IOException { - return prepareRestapiV2DeleteCustomActionAssociationRequest(id, association).execute(); - } - - /** - * To remove custom action associations to ThoughtSpot objects, use this endpoint. - * @param id Required parameter: GUID of the custom action - * @param association Required parameter: A JSON map of the attributes with association of the - * action to ThoughtSpot object ID Example: - * {"id":"0dbd5b3a-84c1-4407-9803-cf07d67e6fcf","name":"My worksheet - * action","version":"v2","type":"URL","detail":{"link":"https://unpkg.com","function":"my-worksheet-action","authSelect":"NONE","authToken":"","encodeUser":"","apiKey":"X-API-KEY","apiValue":"","additionalUrlHeaders":"{}"},"actionAssociationMap":{"WORKSHEET":{"2b9d083a-275c-4984-9cfe-90b036affa17":{"enabled":"true","context":"PRIMARY"}}},"context":"NONE","availability":[ - * ],"userGroupList":["d0326b56-ef23-4c8a-8327-a30e99bcc72b"]} - * @return Returns the Object response from the API call - */ - public CompletableFuture restapiV2DeleteCustomActionAssociationAsync( - final String id, - final String association) { - try { - return prepareRestapiV2DeleteCustomActionAssociationRequest(id, association).executeAsync(); - } catch (Exception e) { - throw new CompletionException(e); - } - } - - /** - * Builds the ApiCall object for restapiV2DeleteCustomActionAssociation. - */ - private ApiCall prepareRestapiV2DeleteCustomActionAssociationRequest( - final String id, - final String association) throws IOException { - return new ApiCall.Builder() - .globalConfig(getGlobalConfiguration()) - .requestBuilder(requestBuilder -> requestBuilder - .server(Server.ENUM_DEFAULT.value()) - .path("/tspublic/rest/v2/customactions/association/delete") - .queryParam(param -> param.key("id") - .value(id)) - .queryParam(param -> param.key("association") - .value(association)) - .headerParam(param -> param.key("accept").value("application/json")) - .authenticationKey(BaseController.AUTHENTICATION_KEY) - .httpMethod(HttpMethod.DELETE)) - .responseHandler(responseHandler -> responseHandler - .deserializer( - response -> response) - .nullify404(false) - .localErrorCase("500", - ErrorCase.create("Operation failed", - (reason, context) -> new ErrorResponseException(reason, context))) - .globalErrorCase(GLOBAL_ERROR_CASES)) - .endpointConfiguration(param -> param - .arraySerializationFormat(ArraySerializationFormat.PLAIN -)) - .build(); - } -} \ No newline at end of file diff --git a/Java/src/main/java/localhost/controllers/DataController.java b/Java/src/main/java/localhost/controllers/DataController.java deleted file mode 100644 index 1f84ba43d..000000000 --- a/Java/src/main/java/localhost/controllers/DataController.java +++ /dev/null @@ -1,339 +0,0 @@ -/* - * ThoughtSpotPublicRESTAPILib - * - * This file was automatically generated by APIMATIC v3.0 ( https://www.apimatic.io ). - */ - -package localhost.controllers; - -import com.fasterxml.jackson.core.JsonProcessingException; -import io.apimatic.core.ApiCall; -import io.apimatic.core.ErrorCase; -import io.apimatic.core.GlobalConfiguration; -import io.apimatic.coreinterfaces.http.request.ArraySerializationFormat; -import java.io.IOException; -import java.util.List; -import java.util.concurrent.CompletableFuture; -import java.util.concurrent.CompletionException; -import localhost.ApiHelper; -import localhost.Server; -import localhost.exceptions.ApiException; -import localhost.exceptions.ErrorResponseException; -import localhost.http.request.HttpMethod; -import localhost.models.AnswerQueryResponse; -import localhost.models.LiveboardQueryResponse; -import localhost.models.TspublicRestV2DataAnswerRequest; -import localhost.models.TspublicRestV2DataLiveboardRequest; -import localhost.models.TspublicRestV2DataSearchRequest; - -/** - * This class lists all the endpoints of the groups. - */ -public final class DataController extends BaseController { - - /** - * Initializes the controller. - * @param globalConfig Configurations added in client. - */ - public DataController(GlobalConfiguration globalConfig) { - super(globalConfig); - } - - /** - * To programmatically retrieve data from ThoughtSpot using search query string, use this - * endpoint. - * @param body Required parameter: Example: - * @return Returns the Object response from the API call - * @throws ApiException Represents error response from the server. - * @throws IOException Signals that an I/O exception of some sort has occurred. - */ - public Object restapiV2SearchQueryData( - final TspublicRestV2DataSearchRequest body) throws ApiException, IOException { - return prepareRestapiV2SearchQueryDataRequest(body).execute(); - } - - /** - * To programmatically retrieve data from ThoughtSpot using search query string, use this - * endpoint. - * @param body Required parameter: Example: - * @return Returns the Object response from the API call - */ - public CompletableFuture restapiV2SearchQueryDataAsync( - final TspublicRestV2DataSearchRequest body) { - try { - return prepareRestapiV2SearchQueryDataRequest(body).executeAsync(); - } catch (Exception e) { - throw new CompletionException(e); - } - } - - /** - * Builds the ApiCall object for restapiV2SearchQueryData. - */ - private ApiCall prepareRestapiV2SearchQueryDataRequest( - final TspublicRestV2DataSearchRequest body) throws JsonProcessingException, IOException { - return new ApiCall.Builder() - .globalConfig(getGlobalConfiguration()) - .requestBuilder(requestBuilder -> requestBuilder - .server(Server.ENUM_DEFAULT.value()) - .path("/tspublic/rest/v2/data/search") - .bodyParam(param -> param.value(body)) - .bodySerializer(() -> ApiHelper.serialize(body)) - .headerParam(param -> param.key("Content-Type") - .value("application/json").isRequired(false)) - .headerParam(param -> param.key("accept").value("application/json")) - .authenticationKey(BaseController.AUTHENTICATION_KEY) - .httpMethod(HttpMethod.POST)) - .responseHandler(responseHandler -> responseHandler - .deserializer( - response -> response) - .nullify404(false) - .localErrorCase("500", - ErrorCase.create("Operation failed", - (reason, context) -> new ErrorResponseException(reason, context))) - .globalErrorCase(GLOBAL_ERROR_CASES)) - .endpointConfiguration(param -> param - .arraySerializationFormat(ArraySerializationFormat.PLAIN -)) - .build(); - } - - /** - * To retrieve data related to a Liveboard or visualization from the ThoughtSpot system, you can - * use this endpoint. - * @param body Required parameter: Example: - * @return Returns the Object response from the API call - * @throws ApiException Represents error response from the server. - * @throws IOException Signals that an I/O exception of some sort has occurred. - */ - public Object restapiV2LiveboardData( - final TspublicRestV2DataLiveboardRequest body) throws ApiException, IOException { - return prepareRestapiV2LiveboardDataRequest(body).execute(); - } - - /** - * To retrieve data related to a Liveboard or visualization from the ThoughtSpot system, you can - * use this endpoint. - * @param body Required parameter: Example: - * @return Returns the Object response from the API call - */ - public CompletableFuture restapiV2LiveboardDataAsync( - final TspublicRestV2DataLiveboardRequest body) { - try { - return prepareRestapiV2LiveboardDataRequest(body).executeAsync(); - } catch (Exception e) { - throw new CompletionException(e); - } - } - - /** - * Builds the ApiCall object for restapiV2LiveboardData. - */ - private ApiCall prepareRestapiV2LiveboardDataRequest( - final TspublicRestV2DataLiveboardRequest body) throws JsonProcessingException, IOException { - return new ApiCall.Builder() - .globalConfig(getGlobalConfiguration()) - .requestBuilder(requestBuilder -> requestBuilder - .server(Server.ENUM_DEFAULT.value()) - .path("/tspublic/rest/v2/data/liveboard") - .bodyParam(param -> param.value(body)) - .bodySerializer(() -> ApiHelper.serialize(body)) - .headerParam(param -> param.key("Content-Type") - .value("application/json").isRequired(false)) - .headerParam(param -> param.key("accept").value("application/json")) - .authenticationKey(BaseController.AUTHENTICATION_KEY) - .httpMethod(HttpMethod.POST)) - .responseHandler(responseHandler -> responseHandler - .deserializer( - response -> response) - .nullify404(false) - .localErrorCase("500", - ErrorCase.create("Operation failed", - (reason, context) -> new ErrorResponseException(reason, context))) - .globalErrorCase(GLOBAL_ERROR_CASES)) - .endpointConfiguration(param -> param - .arraySerializationFormat(ArraySerializationFormat.PLAIN -)) - .build(); - } - - /** - * To retrieve data related to a Answer from the ThoughtSpot system, you can use this endpoint. - * @param body Required parameter: Example: - * @return Returns the Object response from the API call - * @throws ApiException Represents error response from the server. - * @throws IOException Signals that an I/O exception of some sort has occurred. - */ - public Object restapiV2AnswerData( - final TspublicRestV2DataAnswerRequest body) throws ApiException, IOException { - return prepareRestapiV2AnswerDataRequest(body).execute(); - } - - /** - * To retrieve data related to a Answer from the ThoughtSpot system, you can use this endpoint. - * @param body Required parameter: Example: - * @return Returns the Object response from the API call - */ - public CompletableFuture restapiV2AnswerDataAsync( - final TspublicRestV2DataAnswerRequest body) { - try { - return prepareRestapiV2AnswerDataRequest(body).executeAsync(); - } catch (Exception e) { - throw new CompletionException(e); - } - } - - /** - * Builds the ApiCall object for restapiV2AnswerData. - */ - private ApiCall prepareRestapiV2AnswerDataRequest( - final TspublicRestV2DataAnswerRequest body) throws JsonProcessingException, IOException { - return new ApiCall.Builder() - .globalConfig(getGlobalConfiguration()) - .requestBuilder(requestBuilder -> requestBuilder - .server(Server.ENUM_DEFAULT.value()) - .path("/tspublic/rest/v2/data/answer") - .bodyParam(param -> param.value(body)) - .bodySerializer(() -> ApiHelper.serialize(body)) - .headerParam(param -> param.key("Content-Type") - .value("application/json").isRequired(false)) - .headerParam(param -> param.key("accept").value("application/json")) - .authenticationKey(BaseController.AUTHENTICATION_KEY) - .httpMethod(HttpMethod.POST)) - .responseHandler(responseHandler -> responseHandler - .deserializer( - response -> response) - .nullify404(false) - .localErrorCase("500", - ErrorCase.create("Operation failed", - (reason, context) -> new ErrorResponseException(reason, context))) - .globalErrorCase(GLOBAL_ERROR_CASES)) - .endpointConfiguration(param -> param - .arraySerializationFormat(ArraySerializationFormat.PLAIN -)) - .build(); - } - - /** - * To retrieve the query SQL related to an Answer that is run on the data platform, you can use - * this endpoint. - * @param id Required parameter: The GUID of the Answer - * @return Returns the AnswerQueryResponse response from the API call - * @throws ApiException Represents error response from the server. - * @throws IOException Signals that an I/O exception of some sort has occurred. - */ - public AnswerQueryResponse restapiV2AnswerQuerySql( - final String id) throws ApiException, IOException { - return prepareRestapiV2AnswerQuerySqlRequest(id).execute(); - } - - /** - * To retrieve the query SQL related to an Answer that is run on the data platform, you can use - * this endpoint. - * @param id Required parameter: The GUID of the Answer - * @return Returns the AnswerQueryResponse response from the API call - */ - public CompletableFuture restapiV2AnswerQuerySqlAsync( - final String id) { - try { - return prepareRestapiV2AnswerQuerySqlRequest(id).executeAsync(); - } catch (Exception e) { - throw new CompletionException(e); - } - } - - /** - * Builds the ApiCall object for restapiV2AnswerQuerySql. - */ - private ApiCall prepareRestapiV2AnswerQuerySqlRequest( - final String id) throws IOException { - return new ApiCall.Builder() - .globalConfig(getGlobalConfiguration()) - .requestBuilder(requestBuilder -> requestBuilder - .server(Server.ENUM_DEFAULT.value()) - .path("/tspublic/rest/v2/data/answer/querysql") - .queryParam(param -> param.key("id") - .value(id)) - .headerParam(param -> param.key("accept").value("application/json")) - .authenticationKey(BaseController.AUTHENTICATION_KEY) - .httpMethod(HttpMethod.GET)) - .responseHandler(responseHandler -> responseHandler - .deserializer( - response -> ApiHelper.deserialize(response, AnswerQueryResponse.class)) - .nullify404(false) - .localErrorCase("500", - ErrorCase.create("Operation failed", - (reason, context) -> new ErrorResponseException(reason, context))) - .globalErrorCase(GLOBAL_ERROR_CASES)) - .endpointConfiguration(param -> param - .arraySerializationFormat(ArraySerializationFormat.PLAIN -)) - .build(); - } - - /** - * To retrieve the query SQL related to a Visualization in a Liveboard that is run on the data - * platform, you can use this endpoint. - * @param id Required parameter: The GUID of the Answer - * @param vizId Optional parameter: A JSON array of GUIDs of the visualizations in the - * Liveboard. - * @return Returns the LiveboardQueryResponse response from the API call - * @throws ApiException Represents error response from the server. - * @throws IOException Signals that an I/O exception of some sort has occurred. - */ - public LiveboardQueryResponse restapiV2LiveboardQuerySql( - final String id, - final List vizId) throws ApiException, IOException { - return prepareRestapiV2LiveboardQuerySqlRequest(id, vizId).execute(); - } - - /** - * To retrieve the query SQL related to a Visualization in a Liveboard that is run on the data - * platform, you can use this endpoint. - * @param id Required parameter: The GUID of the Answer - * @param vizId Optional parameter: A JSON array of GUIDs of the visualizations in the - * Liveboard. - * @return Returns the LiveboardQueryResponse response from the API call - */ - public CompletableFuture restapiV2LiveboardQuerySqlAsync( - final String id, - final List vizId) { - try { - return prepareRestapiV2LiveboardQuerySqlRequest(id, vizId).executeAsync(); - } catch (Exception e) { - throw new CompletionException(e); - } - } - - /** - * Builds the ApiCall object for restapiV2LiveboardQuerySql. - */ - private ApiCall prepareRestapiV2LiveboardQuerySqlRequest( - final String id, - final List vizId) throws IOException { - return new ApiCall.Builder() - .globalConfig(getGlobalConfiguration()) - .requestBuilder(requestBuilder -> requestBuilder - .server(Server.ENUM_DEFAULT.value()) - .path("/tspublic/rest/v2/data/liveboard/querysql") - .queryParam(param -> param.key("id") - .value(id)) - .queryParam(param -> param.key("vizId") - .value(vizId).isRequired(false)) - .headerParam(param -> param.key("accept").value("application/json")) - .authenticationKey(BaseController.AUTHENTICATION_KEY) - .httpMethod(HttpMethod.GET)) - .responseHandler(responseHandler -> responseHandler - .deserializer( - response -> ApiHelper.deserialize(response, LiveboardQueryResponse.class)) - .nullify404(false) - .localErrorCase("500", - ErrorCase.create("Operation failed", - (reason, context) -> new ErrorResponseException(reason, context))) - .globalErrorCase(GLOBAL_ERROR_CASES)) - .endpointConfiguration(param -> param - .arraySerializationFormat(ArraySerializationFormat.PLAIN -)) - .build(); - } -} \ No newline at end of file diff --git a/Java/src/main/java/localhost/controllers/DatabaseController.java b/Java/src/main/java/localhost/controllers/DatabaseController.java deleted file mode 100644 index 2d55dbf07..000000000 --- a/Java/src/main/java/localhost/controllers/DatabaseController.java +++ /dev/null @@ -1,346 +0,0 @@ -/* - * ThoughtSpotPublicRESTAPILib - * - * This file was automatically generated by APIMATIC v3.0 ( https://www.apimatic.io ). - */ - -package localhost.controllers; - -import com.fasterxml.jackson.core.JsonProcessingException; -import io.apimatic.core.ApiCall; -import io.apimatic.core.ErrorCase; -import io.apimatic.core.GlobalConfiguration; -import io.apimatic.coreinterfaces.http.request.ArraySerializationFormat; -import java.io.IOException; -import java.util.List; -import java.util.concurrent.CompletableFuture; -import java.util.concurrent.CompletionException; -import localhost.ApiHelper; -import localhost.Server; -import localhost.exceptions.ApiException; -import localhost.exceptions.ErrorResponseException; -import localhost.http.request.HttpMethod; -import localhost.models.CreateTableResponse; -import localhost.models.TspublicRestV2DatabaseTableCreateRequest; -import localhost.models.TspublicRestV2DatabaseTableRunqueryRequest; - -/** - * This class lists all the endpoints of the groups. - */ -public final class DatabaseController extends BaseController { - - /** - * Initializes the controller. - * @param globalConfig Configurations added in client. - */ - public DatabaseController(GlobalConfiguration globalConfig) { - super(globalConfig); - } - - /** - * To list all the schemas in a database in Falcon, use this endpoint. - * @param database Required parameter: Name of the Falcon database - * @return Returns the List of String response from the API call - * @throws ApiException Represents error response from the server. - * @throws IOException Signals that an I/O exception of some sort has occurred. - */ - public List restapiV2GetSchemas( - final String database) throws ApiException, IOException { - return prepareRestapiV2GetSchemasRequest(database).execute(); - } - - /** - * To list all the schemas in a database in Falcon, use this endpoint. - * @param database Required parameter: Name of the Falcon database - * @return Returns the List of String response from the API call - */ - public CompletableFuture> restapiV2GetSchemasAsync( - final String database) { - try { - return prepareRestapiV2GetSchemasRequest(database).executeAsync(); - } catch (Exception e) { - throw new CompletionException(e); - } - } - - /** - * Builds the ApiCall object for restapiV2GetSchemas. - */ - private ApiCall, ApiException> prepareRestapiV2GetSchemasRequest( - final String database) throws IOException { - return new ApiCall.Builder, ApiException>() - .globalConfig(getGlobalConfiguration()) - .requestBuilder(requestBuilder -> requestBuilder - .server(Server.ENUM_DEFAULT.value()) - .path("/tspublic/rest/v2/database/schema") - .queryParam(param -> param.key("database") - .value(database)) - .headerParam(param -> param.key("accept").value("application/json")) - .authenticationKey(BaseController.AUTHENTICATION_KEY) - .httpMethod(HttpMethod.GET)) - .responseHandler(responseHandler -> responseHandler - .deserializer( - response -> ApiHelper.deserializeArray(response, - String[].class)) - .nullify404(false) - .localErrorCase("500", - ErrorCase.create("Operation failed", - (reason, context) -> new ErrorResponseException(reason, context))) - .globalErrorCase(GLOBAL_ERROR_CASES)) - .endpointConfiguration(param -> param - .arraySerializationFormat(ArraySerializationFormat.PLAIN -)) - .build(); - } - - /** - * To list all the tables in a schema of a database in Falcon, use this endpoint. - * @param database Required parameter: Name of the Falcon database - * @param schema Required parameter: Name of the schema in Falcon database - * @return Returns the List of String response from the API call - * @throws ApiException Represents error response from the server. - * @throws IOException Signals that an I/O exception of some sort has occurred. - */ - public List restapiV2GetTables( - final String database, - final String schema) throws ApiException, IOException { - return prepareRestapiV2GetTablesRequest(database, schema).execute(); - } - - /** - * To list all the tables in a schema of a database in Falcon, use this endpoint. - * @param database Required parameter: Name of the Falcon database - * @param schema Required parameter: Name of the schema in Falcon database - * @return Returns the List of String response from the API call - */ - public CompletableFuture> restapiV2GetTablesAsync( - final String database, - final String schema) { - try { - return prepareRestapiV2GetTablesRequest(database, schema).executeAsync(); - } catch (Exception e) { - throw new CompletionException(e); - } - } - - /** - * Builds the ApiCall object for restapiV2GetTables. - */ - private ApiCall, ApiException> prepareRestapiV2GetTablesRequest( - final String database, - final String schema) throws IOException { - return new ApiCall.Builder, ApiException>() - .globalConfig(getGlobalConfiguration()) - .requestBuilder(requestBuilder -> requestBuilder - .server(Server.ENUM_DEFAULT.value()) - .path("/tspublic/rest/v2/database/table") - .queryParam(param -> param.key("database") - .value(database)) - .queryParam(param -> param.key("schema") - .value(schema)) - .headerParam(param -> param.key("accept").value("application/json")) - .authenticationKey(BaseController.AUTHENTICATION_KEY) - .httpMethod(HttpMethod.GET)) - .responseHandler(responseHandler -> responseHandler - .deserializer( - response -> ApiHelper.deserializeArray(response, - String[].class)) - .nullify404(false) - .localErrorCase("500", - ErrorCase.create("Operation failed", - (reason, context) -> new ErrorResponseException(reason, context))) - .globalErrorCase(GLOBAL_ERROR_CASES)) - .endpointConfiguration(param -> param - .arraySerializationFormat(ArraySerializationFormat.PLAIN -)) - .build(); - } - - /** - * Note: This endpoint is applicable only for on-prem deployments. To provide details of a table - * in a schema of a database in Falcon, use this endpoint. - * @param database Required parameter: Name of the Falcon database - * @param table Required parameter: Name of the table in Falcon database - * @param schema Optional parameter: Name of the schema in Falcon database - * @return Returns the Object response from the API call - * @throws ApiException Represents error response from the server. - * @throws IOException Signals that an I/O exception of some sort has occurred. - */ - public Object restapiV2GetTableDetails( - final String database, - final String table, - final String schema) throws ApiException, IOException { - return prepareRestapiV2GetTableDetailsRequest(database, table, schema).execute(); - } - - /** - * Note: This endpoint is applicable only for on-prem deployments. To provide details of a table - * in a schema of a database in Falcon, use this endpoint. - * @param database Required parameter: Name of the Falcon database - * @param table Required parameter: Name of the table in Falcon database - * @param schema Optional parameter: Name of the schema in Falcon database - * @return Returns the Object response from the API call - */ - public CompletableFuture restapiV2GetTableDetailsAsync( - final String database, - final String table, - final String schema) { - try { - return prepareRestapiV2GetTableDetailsRequest(database, table, schema).executeAsync(); - } catch (Exception e) { - throw new CompletionException(e); - } - } - - /** - * Builds the ApiCall object for restapiV2GetTableDetails. - */ - private ApiCall prepareRestapiV2GetTableDetailsRequest( - final String database, - final String table, - final String schema) throws IOException { - return new ApiCall.Builder() - .globalConfig(getGlobalConfiguration()) - .requestBuilder(requestBuilder -> requestBuilder - .server(Server.ENUM_DEFAULT.value()) - .path("/tspublic/rest/v2/database/table/detail") - .queryParam(param -> param.key("database") - .value(database)) - .queryParam(param -> param.key("table") - .value(table)) - .queryParam(param -> param.key("schema") - .value(schema).isRequired(false)) - .headerParam(param -> param.key("accept").value("application/json")) - .authenticationKey(BaseController.AUTHENTICATION_KEY) - .httpMethod(HttpMethod.GET)) - .responseHandler(responseHandler -> responseHandler - .deserializer( - response -> response) - .nullify404(false) - .localErrorCase("500", - ErrorCase.create("Operation failed", - (reason, context) -> new ErrorResponseException(reason, context))) - .globalErrorCase(GLOBAL_ERROR_CASES)) - .endpointConfiguration(param -> param - .arraySerializationFormat(ArraySerializationFormat.PLAIN -)) - .build(); - } - - /** - * To create a table in Falcon, use this endpoint. - * @param body Required parameter: Example: - * @return Returns the CreateTableResponse response from the API call - * @throws ApiException Represents error response from the server. - * @throws IOException Signals that an I/O exception of some sort has occurred. - */ - public CreateTableResponse restapiV2CreateTable( - final TspublicRestV2DatabaseTableCreateRequest body) throws ApiException, IOException { - return prepareRestapiV2CreateTableRequest(body).execute(); - } - - /** - * To create a table in Falcon, use this endpoint. - * @param body Required parameter: Example: - * @return Returns the CreateTableResponse response from the API call - */ - public CompletableFuture restapiV2CreateTableAsync( - final TspublicRestV2DatabaseTableCreateRequest body) { - try { - return prepareRestapiV2CreateTableRequest(body).executeAsync(); - } catch (Exception e) { - throw new CompletionException(e); - } - } - - /** - * Builds the ApiCall object for restapiV2CreateTable. - */ - private ApiCall prepareRestapiV2CreateTableRequest( - final TspublicRestV2DatabaseTableCreateRequest body) throws JsonProcessingException, IOException { - return new ApiCall.Builder() - .globalConfig(getGlobalConfiguration()) - .requestBuilder(requestBuilder -> requestBuilder - .server(Server.ENUM_DEFAULT.value()) - .path("/tspublic/rest/v2/database/table/create") - .bodyParam(param -> param.value(body)) - .bodySerializer(() -> ApiHelper.serialize(body)) - .headerParam(param -> param.key("Content-Type") - .value("application/json").isRequired(false)) - .headerParam(param -> param.key("accept").value("application/json")) - .authenticationKey(BaseController.AUTHENTICATION_KEY) - .httpMethod(HttpMethod.POST)) - .responseHandler(responseHandler -> responseHandler - .deserializer( - response -> ApiHelper.deserialize(response, CreateTableResponse.class)) - .nullify404(false) - .localErrorCase("500", - ErrorCase.create("Operation failed", - (reason, context) -> new ErrorResponseException(reason, context))) - .globalErrorCase(GLOBAL_ERROR_CASES)) - .endpointConfiguration(param -> param - .arraySerializationFormat(ArraySerializationFormat.PLAIN -)) - .build(); - } - - /** - * To run a TQL statement in Falcon, use this endpoint. You can run only following type of - * statements - Table DDL alter and Table rows update and delete. - * @param body Required parameter: Example: - * @return Returns the List of Object response from the API call - * @throws ApiException Represents error response from the server. - * @throws IOException Signals that an I/O exception of some sort has occurred. - */ - public List restapiV2RunQuery( - final TspublicRestV2DatabaseTableRunqueryRequest body) throws ApiException, IOException { - return prepareRestapiV2RunQueryRequest(body).execute(); - } - - /** - * To run a TQL statement in Falcon, use this endpoint. You can run only following type of - * statements - Table DDL alter and Table rows update and delete. - * @param body Required parameter: Example: - * @return Returns the List of Object response from the API call - */ - public CompletableFuture> restapiV2RunQueryAsync( - final TspublicRestV2DatabaseTableRunqueryRequest body) { - try { - return prepareRestapiV2RunQueryRequest(body).executeAsync(); - } catch (Exception e) { - throw new CompletionException(e); - } - } - - /** - * Builds the ApiCall object for restapiV2RunQuery. - */ - private ApiCall, ApiException> prepareRestapiV2RunQueryRequest( - final TspublicRestV2DatabaseTableRunqueryRequest body) throws JsonProcessingException, IOException { - return new ApiCall.Builder, ApiException>() - .globalConfig(getGlobalConfiguration()) - .requestBuilder(requestBuilder -> requestBuilder - .server(Server.ENUM_DEFAULT.value()) - .path("/tspublic/rest/v2/database/table/runquery") - .bodyParam(param -> param.value(body)) - .bodySerializer(() -> ApiHelper.serialize(body)) - .headerParam(param -> param.key("Content-Type") - .value("application/json").isRequired(false)) - .headerParam(param -> param.key("accept").value("application/json")) - .authenticationKey(BaseController.AUTHENTICATION_KEY) - .httpMethod(HttpMethod.POST)) - .responseHandler(responseHandler -> responseHandler - .deserializer( - response -> ApiHelper.deserializeArray(response, - Object[].class)) - .nullify404(false) - .localErrorCase("500", - ErrorCase.create("Operation failed", - (reason, context) -> new ErrorResponseException(reason, context))) - .globalErrorCase(GLOBAL_ERROR_CASES)) - .endpointConfiguration(param -> param - .arraySerializationFormat(ArraySerializationFormat.PLAIN -)) - .build(); - } -} \ No newline at end of file diff --git a/Java/src/main/java/localhost/controllers/GroupController.java b/Java/src/main/java/localhost/controllers/GroupController.java deleted file mode 100644 index 89d2bd88b..000000000 --- a/Java/src/main/java/localhost/controllers/GroupController.java +++ /dev/null @@ -1,728 +0,0 @@ -/* - * ThoughtSpotPublicRESTAPILib - * - * This file was automatically generated by APIMATIC v3.0 ( https://www.apimatic.io ). - */ - -package localhost.controllers; - -import com.fasterxml.jackson.core.JsonProcessingException; -import io.apimatic.core.ApiCall; -import io.apimatic.core.ErrorCase; -import io.apimatic.core.GlobalConfiguration; -import io.apimatic.coreinterfaces.http.request.ArraySerializationFormat; -import java.io.IOException; -import java.util.concurrent.CompletableFuture; -import java.util.concurrent.CompletionException; -import localhost.ApiHelper; -import localhost.Server; -import localhost.exceptions.ApiException; -import localhost.exceptions.ErrorResponseException; -import localhost.http.request.HttpMethod; -import localhost.models.GroupResponse; -import localhost.models.TspublicRestV2GroupAddgroupRequest; -import localhost.models.TspublicRestV2GroupAddprivilegeRequest; -import localhost.models.TspublicRestV2GroupAdduserRequest; -import localhost.models.TspublicRestV2GroupCreateRequest; -import localhost.models.TspublicRestV2GroupRemovegroupRequest; -import localhost.models.TspublicRestV2GroupRemoveprivilegeRequest; -import localhost.models.TspublicRestV2GroupRemoveuserRequest; -import localhost.models.TspublicRestV2GroupSearchRequest; -import localhost.models.TspublicRestV2GroupUpdateRequest; - -/** - * This class lists all the endpoints of the groups. - */ -public final class GroupController extends BaseController { - - /** - * Initializes the controller. - * @param globalConfig Configurations added in client. - */ - public GroupController(GlobalConfiguration globalConfig) { - super(globalConfig); - } - - /** - * To get the details of a specific group by name or id, use this endpoint. At Least one value - * needed. When both are given id will be considered to fetch user information. - * @param name Optional parameter: Name of the group - * @param id Optional parameter: The GUID of the group to query. - * @return Returns the GroupResponse response from the API call - * @throws ApiException Represents error response from the server. - * @throws IOException Signals that an I/O exception of some sort has occurred. - */ - public GroupResponse restapiV2GetGroup( - final String name, - final String id) throws ApiException, IOException { - return prepareRestapiV2GetGroupRequest(name, id).execute(); - } - - /** - * To get the details of a specific group by name or id, use this endpoint. At Least one value - * needed. When both are given id will be considered to fetch user information. - * @param name Optional parameter: Name of the group - * @param id Optional parameter: The GUID of the group to query. - * @return Returns the GroupResponse response from the API call - */ - public CompletableFuture restapiV2GetGroupAsync( - final String name, - final String id) { - try { - return prepareRestapiV2GetGroupRequest(name, id).executeAsync(); - } catch (Exception e) { - throw new CompletionException(e); - } - } - - /** - * Builds the ApiCall object for restapiV2GetGroup. - */ - private ApiCall prepareRestapiV2GetGroupRequest( - final String name, - final String id) throws IOException { - return new ApiCall.Builder() - .globalConfig(getGlobalConfiguration()) - .requestBuilder(requestBuilder -> requestBuilder - .server(Server.ENUM_DEFAULT.value()) - .path("/tspublic/rest/v2/group") - .queryParam(param -> param.key("name") - .value(name).isRequired(false)) - .queryParam(param -> param.key("id") - .value(id).isRequired(false)) - .headerParam(param -> param.key("accept").value("application/json")) - .authenticationKey(BaseController.AUTHENTICATION_KEY) - .httpMethod(HttpMethod.GET)) - .responseHandler(responseHandler -> responseHandler - .deserializer( - response -> ApiHelper.deserialize(response, GroupResponse.class)) - .nullify404(false) - .localErrorCase("500", - ErrorCase.create("Operation failed", - (reason, context) -> new ErrorResponseException(reason, context))) - .globalErrorCase(GLOBAL_ERROR_CASES)) - .endpointConfiguration(param -> param - .arraySerializationFormat(ArraySerializationFormat.PLAIN -)) - .build(); - } - - /** - * To programmatically create a group in the ThoughtSpot system, use this API endpoint. Using - * this API, you can create a group and assign privileges and users. For ease of user management - * and access control, ThoughtSpot administrators can create groups and assign privileges to - * these groups. The privileges determine the actions that the users belonging to a group are - * allowed to do. ThoughtSpot also has a default group called ALL_GROUP. When you create new - * group in ThoughtSpot, they are automatically added to ALL_GROUP. You cannot delete the - * ALL_GROUP or remove members from it. - * @param body Required parameter: Example: - * @return Returns the GroupResponse response from the API call - * @throws ApiException Represents error response from the server. - * @throws IOException Signals that an I/O exception of some sort has occurred. - */ - public GroupResponse restapiV2CreateGroup( - final TspublicRestV2GroupCreateRequest body) throws ApiException, IOException { - return prepareRestapiV2CreateGroupRequest(body).execute(); - } - - /** - * To programmatically create a group in the ThoughtSpot system, use this API endpoint. Using - * this API, you can create a group and assign privileges and users. For ease of user management - * and access control, ThoughtSpot administrators can create groups and assign privileges to - * these groups. The privileges determine the actions that the users belonging to a group are - * allowed to do. ThoughtSpot also has a default group called ALL_GROUP. When you create new - * group in ThoughtSpot, they are automatically added to ALL_GROUP. You cannot delete the - * ALL_GROUP or remove members from it. - * @param body Required parameter: Example: - * @return Returns the GroupResponse response from the API call - */ - public CompletableFuture restapiV2CreateGroupAsync( - final TspublicRestV2GroupCreateRequest body) { - try { - return prepareRestapiV2CreateGroupRequest(body).executeAsync(); - } catch (Exception e) { - throw new CompletionException(e); - } - } - - /** - * Builds the ApiCall object for restapiV2CreateGroup. - */ - private ApiCall prepareRestapiV2CreateGroupRequest( - final TspublicRestV2GroupCreateRequest body) throws JsonProcessingException, IOException { - return new ApiCall.Builder() - .globalConfig(getGlobalConfiguration()) - .requestBuilder(requestBuilder -> requestBuilder - .server(Server.ENUM_DEFAULT.value()) - .path("/tspublic/rest/v2/group/create") - .bodyParam(param -> param.value(body)) - .bodySerializer(() -> ApiHelper.serialize(body)) - .headerParam(param -> param.key("Content-Type") - .value("application/json").isRequired(false)) - .headerParam(param -> param.key("accept").value("application/json")) - .authenticationKey(BaseController.AUTHENTICATION_KEY) - .httpMethod(HttpMethod.POST)) - .responseHandler(responseHandler -> responseHandler - .deserializer( - response -> ApiHelper.deserialize(response, GroupResponse.class)) - .nullify404(false) - .localErrorCase("500", - ErrorCase.create("Operation failed", - (reason, context) -> new ErrorResponseException(reason, context))) - .globalErrorCase(GLOBAL_ERROR_CASES)) - .endpointConfiguration(param -> param - .arraySerializationFormat(ArraySerializationFormat.PLAIN -)) - .build(); - } - - /** - * You can use this endpoint to programmatically modify an existing user account. To modify a - * user, you require admin user privileges. At least one of User Id or username is mandatory. - * When both are given, then user id will be considered and username will be updated. - * @param body Required parameter: Example: - * @return Returns the Boolean response from the API call - * @throws ApiException Represents error response from the server. - * @throws IOException Signals that an I/O exception of some sort has occurred. - */ - public Boolean restapiV2UpdateGroup( - final TspublicRestV2GroupUpdateRequest body) throws ApiException, IOException { - return prepareRestapiV2UpdateGroupRequest(body).execute(); - } - - /** - * You can use this endpoint to programmatically modify an existing user account. To modify a - * user, you require admin user privileges. At least one of User Id or username is mandatory. - * When both are given, then user id will be considered and username will be updated. - * @param body Required parameter: Example: - * @return Returns the Boolean response from the API call - */ - public CompletableFuture restapiV2UpdateGroupAsync( - final TspublicRestV2GroupUpdateRequest body) { - try { - return prepareRestapiV2UpdateGroupRequest(body).executeAsync(); - } catch (Exception e) { - throw new CompletionException(e); - } - } - - /** - * Builds the ApiCall object for restapiV2UpdateGroup. - */ - private ApiCall prepareRestapiV2UpdateGroupRequest( - final TspublicRestV2GroupUpdateRequest body) throws JsonProcessingException, IOException { - return new ApiCall.Builder() - .globalConfig(getGlobalConfiguration()) - .requestBuilder(requestBuilder -> requestBuilder - .server(Server.ENUM_DEFAULT.value()) - .path("/tspublic/rest/v2/group/update") - .bodyParam(param -> param.value(body)) - .bodySerializer(() -> ApiHelper.serialize(body)) - .headerParam(param -> param.key("Content-Type") - .value("application/json").isRequired(false)) - .authenticationKey(BaseController.AUTHENTICATION_KEY) - .httpMethod(HttpMethod.PUT)) - .responseHandler(responseHandler -> responseHandler - .deserializer( - response -> Boolean.parseBoolean(response)) - .nullify404(false) - .localErrorCase("500", - ErrorCase.create("Operation failed", - (reason, context) -> new ErrorResponseException(reason, context))) - .globalErrorCase(GLOBAL_ERROR_CASES)) - .endpointConfiguration(param -> param - .arraySerializationFormat(ArraySerializationFormat.PLAIN -)) - .build(); - } - - /** - * To remove a group from the ThoughtSpot system, send a DELETE request to this endpoint. At - * Least one value needed. When both are given user id will be considered to fetch user - * information. - * @param name Optional parameter: Name of the group. - * @param id Optional parameter: The GUID of the group - * @return Returns the Boolean response from the API call - * @throws ApiException Represents error response from the server. - * @throws IOException Signals that an I/O exception of some sort has occurred. - */ - public Boolean restapiV2DeleteGroup( - final String name, - final String id) throws ApiException, IOException { - return prepareRestapiV2DeleteGroupRequest(name, id).execute(); - } - - /** - * To remove a group from the ThoughtSpot system, send a DELETE request to this endpoint. At - * Least one value needed. When both are given user id will be considered to fetch user - * information. - * @param name Optional parameter: Name of the group. - * @param id Optional parameter: The GUID of the group - * @return Returns the Boolean response from the API call - */ - public CompletableFuture restapiV2DeleteGroupAsync( - final String name, - final String id) { - try { - return prepareRestapiV2DeleteGroupRequest(name, id).executeAsync(); - } catch (Exception e) { - throw new CompletionException(e); - } - } - - /** - * Builds the ApiCall object for restapiV2DeleteGroup. - */ - private ApiCall prepareRestapiV2DeleteGroupRequest( - final String name, - final String id) throws IOException { - return new ApiCall.Builder() - .globalConfig(getGlobalConfiguration()) - .requestBuilder(requestBuilder -> requestBuilder - .server(Server.ENUM_DEFAULT.value()) - .path("/tspublic/rest/v2/group/delete") - .queryParam(param -> param.key("name") - .value(name).isRequired(false)) - .queryParam(param -> param.key("id") - .value(id).isRequired(false)) - .authenticationKey(BaseController.AUTHENTICATION_KEY) - .httpMethod(HttpMethod.DELETE)) - .responseHandler(responseHandler -> responseHandler - .deserializer( - response -> Boolean.parseBoolean(response)) - .nullify404(false) - .localErrorCase("500", - ErrorCase.create("Operation failed", - (reason, context) -> new ErrorResponseException(reason, context))) - .globalErrorCase(GLOBAL_ERROR_CASES)) - .endpointConfiguration(param -> param - .arraySerializationFormat(ArraySerializationFormat.PLAIN -)) - .build(); - } - - /** - * To programmatically add privileges to an existing group, use API endpoint. When you assign - * privileges to a group, all the users under to this group inherits the privileges assigned to - * that group. At least one of id or name of group is required. When both are given user id will - * be considered. - * @param body Required parameter: Example: - * @return Returns the Boolean response from the API call - * @throws ApiException Represents error response from the server. - * @throws IOException Signals that an I/O exception of some sort has occurred. - */ - public Boolean restapiV2AddPrivilegesToGroup( - final TspublicRestV2GroupAddprivilegeRequest body) throws ApiException, IOException { - return prepareRestapiV2AddPrivilegesToGroupRequest(body).execute(); - } - - /** - * To programmatically add privileges to an existing group, use API endpoint. When you assign - * privileges to a group, all the users under to this group inherits the privileges assigned to - * that group. At least one of id or name of group is required. When both are given user id will - * be considered. - * @param body Required parameter: Example: - * @return Returns the Boolean response from the API call - */ - public CompletableFuture restapiV2AddPrivilegesToGroupAsync( - final TspublicRestV2GroupAddprivilegeRequest body) { - try { - return prepareRestapiV2AddPrivilegesToGroupRequest(body).executeAsync(); - } catch (Exception e) { - throw new CompletionException(e); - } - } - - /** - * Builds the ApiCall object for restapiV2AddPrivilegesToGroup. - */ - private ApiCall prepareRestapiV2AddPrivilegesToGroupRequest( - final TspublicRestV2GroupAddprivilegeRequest body) throws JsonProcessingException, IOException { - return new ApiCall.Builder() - .globalConfig(getGlobalConfiguration()) - .requestBuilder(requestBuilder -> requestBuilder - .server(Server.ENUM_DEFAULT.value()) - .path("/tspublic/rest/v2/group/addprivilege") - .bodyParam(param -> param.value(body)) - .bodySerializer(() -> ApiHelper.serialize(body)) - .headerParam(param -> param.key("Content-Type") - .value("application/json").isRequired(false)) - .authenticationKey(BaseController.AUTHENTICATION_KEY) - .httpMethod(HttpMethod.PUT)) - .responseHandler(responseHandler -> responseHandler - .deserializer( - response -> Boolean.parseBoolean(response)) - .nullify404(false) - .localErrorCase("500", - ErrorCase.create("Operation failed", - (reason, context) -> new ErrorResponseException(reason, context))) - .globalErrorCase(GLOBAL_ERROR_CASES)) - .endpointConfiguration(param -> param - .arraySerializationFormat(ArraySerializationFormat.PLAIN -)) - .build(); - } - - /** - * To programmatically remove privileges from a group, use API endpoint. The API removes only - * the privilege association. It does not delete the privilege or group from the Thoughtspot - * system. At least one of id or name of group is required. When both are given user id will be - * considered. - * @param body Required parameter: Example: - * @return Returns the Boolean response from the API call - * @throws ApiException Represents error response from the server. - * @throws IOException Signals that an I/O exception of some sort has occurred. - */ - public Boolean restapiV2RemovePrivilegesFromGroup( - final TspublicRestV2GroupRemoveprivilegeRequest body) throws ApiException, IOException { - return prepareRestapiV2RemovePrivilegesFromGroupRequest(body).execute(); - } - - /** - * To programmatically remove privileges from a group, use API endpoint. The API removes only - * the privilege association. It does not delete the privilege or group from the Thoughtspot - * system. At least one of id or name of group is required. When both are given user id will be - * considered. - * @param body Required parameter: Example: - * @return Returns the Boolean response from the API call - */ - public CompletableFuture restapiV2RemovePrivilegesFromGroupAsync( - final TspublicRestV2GroupRemoveprivilegeRequest body) { - try { - return prepareRestapiV2RemovePrivilegesFromGroupRequest(body).executeAsync(); - } catch (Exception e) { - throw new CompletionException(e); - } - } - - /** - * Builds the ApiCall object for restapiV2RemovePrivilegesFromGroup. - */ - private ApiCall prepareRestapiV2RemovePrivilegesFromGroupRequest( - final TspublicRestV2GroupRemoveprivilegeRequest body) throws JsonProcessingException, IOException { - return new ApiCall.Builder() - .globalConfig(getGlobalConfiguration()) - .requestBuilder(requestBuilder -> requestBuilder - .server(Server.ENUM_DEFAULT.value()) - .path("/tspublic/rest/v2/group/removeprivilege") - .bodyParam(param -> param.value(body)) - .bodySerializer(() -> ApiHelper.serialize(body)) - .headerParam(param -> param.key("Content-Type") - .value("application/json").isRequired(false)) - .authenticationKey(BaseController.AUTHENTICATION_KEY) - .httpMethod(HttpMethod.PUT)) - .responseHandler(responseHandler -> responseHandler - .deserializer( - response -> Boolean.parseBoolean(response)) - .nullify404(false) - .localErrorCase("500", - ErrorCase.create("Operation failed", - (reason, context) -> new ErrorResponseException(reason, context))) - .globalErrorCase(GLOBAL_ERROR_CASES)) - .endpointConfiguration(param -> param - .arraySerializationFormat(ArraySerializationFormat.PLAIN -)) - .build(); - } - - /** - * To programmatically add existing ThoughtSpot users to a group, use this API endpoint. When - * you assign users to a group, the users inherits the privileges assigned to that group. At - * least one of id or name of the group is required. When both are given user id will be - * considered. - * @param body Required parameter: Example: - * @return Returns the Boolean response from the API call - * @throws ApiException Represents error response from the server. - * @throws IOException Signals that an I/O exception of some sort has occurred. - */ - public Boolean restapiV2AddUsersToGroup( - final TspublicRestV2GroupAdduserRequest body) throws ApiException, IOException { - return prepareRestapiV2AddUsersToGroupRequest(body).execute(); - } - - /** - * To programmatically add existing ThoughtSpot users to a group, use this API endpoint. When - * you assign users to a group, the users inherits the privileges assigned to that group. At - * least one of id or name of the group is required. When both are given user id will be - * considered. - * @param body Required parameter: Example: - * @return Returns the Boolean response from the API call - */ - public CompletableFuture restapiV2AddUsersToGroupAsync( - final TspublicRestV2GroupAdduserRequest body) { - try { - return prepareRestapiV2AddUsersToGroupRequest(body).executeAsync(); - } catch (Exception e) { - throw new CompletionException(e); - } - } - - /** - * Builds the ApiCall object for restapiV2AddUsersToGroup. - */ - private ApiCall prepareRestapiV2AddUsersToGroupRequest( - final TspublicRestV2GroupAdduserRequest body) throws JsonProcessingException, IOException { - return new ApiCall.Builder() - .globalConfig(getGlobalConfiguration()) - .requestBuilder(requestBuilder -> requestBuilder - .server(Server.ENUM_DEFAULT.value()) - .path("/tspublic/rest/v2/group/adduser") - .bodyParam(param -> param.value(body)) - .bodySerializer(() -> ApiHelper.serialize(body)) - .headerParam(param -> param.key("Content-Type") - .value("application/json").isRequired(false)) - .authenticationKey(BaseController.AUTHENTICATION_KEY) - .httpMethod(HttpMethod.PUT)) - .responseHandler(responseHandler -> responseHandler - .deserializer( - response -> Boolean.parseBoolean(response)) - .nullify404(false) - .localErrorCase("500", - ErrorCase.create("Operation failed", - (reason, context) -> new ErrorResponseException(reason, context))) - .globalErrorCase(GLOBAL_ERROR_CASES)) - .endpointConfiguration(param -> param - .arraySerializationFormat(ArraySerializationFormat.PLAIN -)) - .build(); - } - - /** - * To programmatically remove users from a group, use API endpoint.The API removes only the user - * association. It does not delete the users or group from the Thoughtspot system. At least one - * of id or name of group is required. When both are given user id will be considered. - * @param body Required parameter: Example: - * @return Returns the Boolean response from the API call - * @throws ApiException Represents error response from the server. - * @throws IOException Signals that an I/O exception of some sort has occurred. - */ - public Boolean restapiV2RemoveUsersFromGroup( - final TspublicRestV2GroupRemoveuserRequest body) throws ApiException, IOException { - return prepareRestapiV2RemoveUsersFromGroupRequest(body).execute(); - } - - /** - * To programmatically remove users from a group, use API endpoint.The API removes only the user - * association. It does not delete the users or group from the Thoughtspot system. At least one - * of id or name of group is required. When both are given user id will be considered. - * @param body Required parameter: Example: - * @return Returns the Boolean response from the API call - */ - public CompletableFuture restapiV2RemoveUsersFromGroupAsync( - final TspublicRestV2GroupRemoveuserRequest body) { - try { - return prepareRestapiV2RemoveUsersFromGroupRequest(body).executeAsync(); - } catch (Exception e) { - throw new CompletionException(e); - } - } - - /** - * Builds the ApiCall object for restapiV2RemoveUsersFromGroup. - */ - private ApiCall prepareRestapiV2RemoveUsersFromGroupRequest( - final TspublicRestV2GroupRemoveuserRequest body) throws JsonProcessingException, IOException { - return new ApiCall.Builder() - .globalConfig(getGlobalConfiguration()) - .requestBuilder(requestBuilder -> requestBuilder - .server(Server.ENUM_DEFAULT.value()) - .path("/tspublic/rest/v2/group/removeuser") - .bodyParam(param -> param.value(body)) - .bodySerializer(() -> ApiHelper.serialize(body)) - .headerParam(param -> param.key("Content-Type") - .value("application/json").isRequired(false)) - .authenticationKey(BaseController.AUTHENTICATION_KEY) - .httpMethod(HttpMethod.PUT)) - .responseHandler(responseHandler -> responseHandler - .deserializer( - response -> Boolean.parseBoolean(response)) - .nullify404(false) - .localErrorCase("500", - ErrorCase.create("Operation failed", - (reason, context) -> new ErrorResponseException(reason, context))) - .globalErrorCase(GLOBAL_ERROR_CASES)) - .endpointConfiguration(param -> param - .arraySerializationFormat(ArraySerializationFormat.PLAIN -)) - .build(); - } - - /** - * To programmatically add existing groups to a group, use API endpoint. When you assign groups - * to a group, the group inherits the privileges assigned to those groups. At least one of id or - * name of group is required. When both are given user id will be considered. - * @param body Required parameter: Example: - * @return Returns the Boolean response from the API call - * @throws ApiException Represents error response from the server. - * @throws IOException Signals that an I/O exception of some sort has occurred. - */ - public Boolean restapiV2AddGroupsToGroup( - final TspublicRestV2GroupAddgroupRequest body) throws ApiException, IOException { - return prepareRestapiV2AddGroupsToGroupRequest(body).execute(); - } - - /** - * To programmatically add existing groups to a group, use API endpoint. When you assign groups - * to a group, the group inherits the privileges assigned to those groups. At least one of id or - * name of group is required. When both are given user id will be considered. - * @param body Required parameter: Example: - * @return Returns the Boolean response from the API call - */ - public CompletableFuture restapiV2AddGroupsToGroupAsync( - final TspublicRestV2GroupAddgroupRequest body) { - try { - return prepareRestapiV2AddGroupsToGroupRequest(body).executeAsync(); - } catch (Exception e) { - throw new CompletionException(e); - } - } - - /** - * Builds the ApiCall object for restapiV2AddGroupsToGroup. - */ - private ApiCall prepareRestapiV2AddGroupsToGroupRequest( - final TspublicRestV2GroupAddgroupRequest body) throws JsonProcessingException, IOException { - return new ApiCall.Builder() - .globalConfig(getGlobalConfiguration()) - .requestBuilder(requestBuilder -> requestBuilder - .server(Server.ENUM_DEFAULT.value()) - .path("/tspublic/rest/v2/group/addgroup") - .bodyParam(param -> param.value(body)) - .bodySerializer(() -> ApiHelper.serialize(body)) - .headerParam(param -> param.key("Content-Type") - .value("application/json").isRequired(false)) - .authenticationKey(BaseController.AUTHENTICATION_KEY) - .httpMethod(HttpMethod.PUT)) - .responseHandler(responseHandler -> responseHandler - .deserializer( - response -> Boolean.parseBoolean(response)) - .nullify404(false) - .localErrorCase("500", - ErrorCase.create("Operation failed", - (reason, context) -> new ErrorResponseException(reason, context))) - .globalErrorCase(GLOBAL_ERROR_CASES)) - .endpointConfiguration(param -> param - .arraySerializationFormat(ArraySerializationFormat.PLAIN -)) - .build(); - } - - /** - * To programmatically remove groups from a group, use API endpoint.The API removes only the - * group association. It does not delete the group from the Thoughtspot system. At least one of - * id or name of group is required. When both are given user id will be considered. - * @param body Required parameter: Example: - * @return Returns the Boolean response from the API call - * @throws ApiException Represents error response from the server. - * @throws IOException Signals that an I/O exception of some sort has occurred. - */ - public Boolean restapiV2RemoveGroupsFromGroup( - final TspublicRestV2GroupRemovegroupRequest body) throws ApiException, IOException { - return prepareRestapiV2RemoveGroupsFromGroupRequest(body).execute(); - } - - /** - * To programmatically remove groups from a group, use API endpoint.The API removes only the - * group association. It does not delete the group from the Thoughtspot system. At least one of - * id or name of group is required. When both are given user id will be considered. - * @param body Required parameter: Example: - * @return Returns the Boolean response from the API call - */ - public CompletableFuture restapiV2RemoveGroupsFromGroupAsync( - final TspublicRestV2GroupRemovegroupRequest body) { - try { - return prepareRestapiV2RemoveGroupsFromGroupRequest(body).executeAsync(); - } catch (Exception e) { - throw new CompletionException(e); - } - } - - /** - * Builds the ApiCall object for restapiV2RemoveGroupsFromGroup. - */ - private ApiCall prepareRestapiV2RemoveGroupsFromGroupRequest( - final TspublicRestV2GroupRemovegroupRequest body) throws JsonProcessingException, IOException { - return new ApiCall.Builder() - .globalConfig(getGlobalConfiguration()) - .requestBuilder(requestBuilder -> requestBuilder - .server(Server.ENUM_DEFAULT.value()) - .path("/tspublic/rest/v2/group/removegroup") - .bodyParam(param -> param.value(body)) - .bodySerializer(() -> ApiHelper.serialize(body)) - .headerParam(param -> param.key("Content-Type") - .value("application/json").isRequired(false)) - .authenticationKey(BaseController.AUTHENTICATION_KEY) - .httpMethod(HttpMethod.PUT)) - .responseHandler(responseHandler -> responseHandler - .deserializer( - response -> Boolean.parseBoolean(response)) - .nullify404(false) - .localErrorCase("500", - ErrorCase.create("Operation failed", - (reason, context) -> new ErrorResponseException(reason, context))) - .globalErrorCase(GLOBAL_ERROR_CASES)) - .endpointConfiguration(param -> param - .arraySerializationFormat(ArraySerializationFormat.PLAIN -)) - .build(); - } - - /** - * To get the details of a specific group account or all groups in the ThoughtSpot system, use - * this end point. - * @param body Required parameter: Example: - * @return Returns the Object response from the API call - * @throws ApiException Represents error response from the server. - * @throws IOException Signals that an I/O exception of some sort has occurred. - */ - public Object restapiV2SearchGroups( - final TspublicRestV2GroupSearchRequest body) throws ApiException, IOException { - return prepareRestapiV2SearchGroupsRequest(body).execute(); - } - - /** - * To get the details of a specific group account or all groups in the ThoughtSpot system, use - * this end point. - * @param body Required parameter: Example: - * @return Returns the Object response from the API call - */ - public CompletableFuture restapiV2SearchGroupsAsync( - final TspublicRestV2GroupSearchRequest body) { - try { - return prepareRestapiV2SearchGroupsRequest(body).executeAsync(); - } catch (Exception e) { - throw new CompletionException(e); - } - } - - /** - * Builds the ApiCall object for restapiV2SearchGroups. - */ - private ApiCall prepareRestapiV2SearchGroupsRequest( - final TspublicRestV2GroupSearchRequest body) throws JsonProcessingException, IOException { - return new ApiCall.Builder() - .globalConfig(getGlobalConfiguration()) - .requestBuilder(requestBuilder -> requestBuilder - .server(Server.ENUM_DEFAULT.value()) - .path("/tspublic/rest/v2/group/search") - .bodyParam(param -> param.value(body)) - .bodySerializer(() -> ApiHelper.serialize(body)) - .headerParam(param -> param.key("Content-Type") - .value("application/json").isRequired(false)) - .headerParam(param -> param.key("accept").value("application/json")) - .authenticationKey(BaseController.AUTHENTICATION_KEY) - .httpMethod(HttpMethod.POST)) - .responseHandler(responseHandler -> responseHandler - .deserializer( - response -> response) - .nullify404(false) - .localErrorCase("500", - ErrorCase.create("Operation failed", - (reason, context) -> new ErrorResponseException(reason, context))) - .globalErrorCase(GLOBAL_ERROR_CASES)) - .endpointConfiguration(param -> param - .arraySerializationFormat(ArraySerializationFormat.PLAIN -)) - .build(); - } -} \ No newline at end of file diff --git a/Java/src/main/java/localhost/controllers/LogsController.java b/Java/src/main/java/localhost/controllers/LogsController.java deleted file mode 100644 index 95812ed4e..000000000 --- a/Java/src/main/java/localhost/controllers/LogsController.java +++ /dev/null @@ -1,125 +0,0 @@ -/* - * ThoughtSpotPublicRESTAPILib - * - * This file was automatically generated by APIMATIC v3.0 ( https://www.apimatic.io ). - */ - -package localhost.controllers; - -import io.apimatic.core.ApiCall; -import io.apimatic.core.ErrorCase; -import io.apimatic.core.GlobalConfiguration; -import io.apimatic.coreinterfaces.http.request.ArraySerializationFormat; -import java.io.IOException; -import java.util.concurrent.CompletableFuture; -import java.util.concurrent.CompletionException; -import localhost.ApiHelper; -import localhost.Server; -import localhost.exceptions.ApiException; -import localhost.exceptions.ErrorResponseException; -import localhost.http.request.HttpMethod; -import localhost.models.LogsResponse; -import localhost.models.TopicEnum; - -/** - * This class lists all the endpoints of the groups. - */ -public final class LogsController extends BaseController { - - /** - * Initializes the controller. - * @param globalConfig Configurations added in client. - */ - public LogsController(GlobalConfiguration globalConfig) { - super(globalConfig); - } - - /** - * Note: This endpoint is applicable only for SAAS deployments. The ThoughtSpot log streaming - * service API allows you to programmatically get a security audit event log from the - * ThoughtSpot system. To use this API, make sure you have admin user privileges. ThoughtSpot - * cloud deployments allow you to collect security audit events and send them to your Security - * information and event management (SIEM) application in real-time. These events can help your - * security operations personnel to detect potential security threats or compromised user - * accounts in your organization. - * @param topic Required parameter: Type of the log - * @param fromEpoch Optional parameter: The EPOCH time in milliseconds to set the start time - * for streaming logs. Example: To set the timestamp as June 1, 2021 8 am, specify - * 1622534400000. - * @param toEpoch Optional parameter: The EPOCH time in milliseconds to set the end time for - * streaming logs. Example: To set the timestamp as July 1, 2021, 8 am, specify - * 1625126400000. - * @return Returns the LogsResponse response from the API call - * @throws ApiException Represents error response from the server. - * @throws IOException Signals that an I/O exception of some sort has occurred. - */ - public LogsResponse restapiV2GetLogEvents( - final TopicEnum topic, - final String fromEpoch, - final String toEpoch) throws ApiException, IOException { - return prepareRestapiV2GetLogEventsRequest(topic, fromEpoch, toEpoch).execute(); - } - - /** - * Note: This endpoint is applicable only for SAAS deployments. The ThoughtSpot log streaming - * service API allows you to programmatically get a security audit event log from the - * ThoughtSpot system. To use this API, make sure you have admin user privileges. ThoughtSpot - * cloud deployments allow you to collect security audit events and send them to your Security - * information and event management (SIEM) application in real-time. These events can help your - * security operations personnel to detect potential security threats or compromised user - * accounts in your organization. - * @param topic Required parameter: Type of the log - * @param fromEpoch Optional parameter: The EPOCH time in milliseconds to set the start time - * for streaming logs. Example: To set the timestamp as June 1, 2021 8 am, specify - * 1622534400000. - * @param toEpoch Optional parameter: The EPOCH time in milliseconds to set the end time for - * streaming logs. Example: To set the timestamp as July 1, 2021, 8 am, specify - * 1625126400000. - * @return Returns the LogsResponse response from the API call - */ - public CompletableFuture restapiV2GetLogEventsAsync( - final TopicEnum topic, - final String fromEpoch, - final String toEpoch) { - try { - return prepareRestapiV2GetLogEventsRequest(topic, fromEpoch, toEpoch).executeAsync(); - } catch (Exception e) { - throw new CompletionException(e); - } - } - - /** - * Builds the ApiCall object for restapiV2GetLogEvents. - */ - private ApiCall prepareRestapiV2GetLogEventsRequest( - final TopicEnum topic, - final String fromEpoch, - final String toEpoch) throws IOException { - return new ApiCall.Builder() - .globalConfig(getGlobalConfiguration()) - .requestBuilder(requestBuilder -> requestBuilder - .server(Server.ENUM_DEFAULT.value()) - .path("/tspublic/rest/v2/logs/events") - .queryParam(param -> param.key("topic") - .value((topic != null) ? topic.value() : null)) - .queryParam(param -> param.key("fromEpoch") - .value(fromEpoch).isRequired(false)) - .queryParam(param -> param.key("toEpoch") - .value(toEpoch).isRequired(false)) - .headerParam(param -> param.key("accept").value("application/json")) - .authenticationKey(BaseController.AUTHENTICATION_KEY) - .httpMethod(HttpMethod.GET)) - .responseHandler(responseHandler -> responseHandler - .deserializer( - response -> ApiHelper.deserialize(response, LogsResponse.class)) - .nullify404(false) - .localErrorCase("500", - ErrorCase.create("Operation failed", - (reason, context) -> new ErrorResponseException(reason, context))) - .globalErrorCase(GLOBAL_ERROR_CASES)) - .endpointConfiguration(param -> param - .arraySerializationFormat(ArraySerializationFormat.PLAIN -)) - .build(); - } -} \ No newline at end of file diff --git a/Java/src/main/java/localhost/controllers/MaterializationController.java b/Java/src/main/java/localhost/controllers/MaterializationController.java deleted file mode 100644 index 348375fe1..000000000 --- a/Java/src/main/java/localhost/controllers/MaterializationController.java +++ /dev/null @@ -1,95 +0,0 @@ -/* - * ThoughtSpotPublicRESTAPILib - * - * This file was automatically generated by APIMATIC v3.0 ( https://www.apimatic.io ). - */ - -package localhost.controllers; - -import com.fasterxml.jackson.core.JsonProcessingException; -import io.apimatic.core.ApiCall; -import io.apimatic.core.ErrorCase; -import io.apimatic.core.GlobalConfiguration; -import io.apimatic.coreinterfaces.http.request.ArraySerializationFormat; -import java.io.IOException; -import java.util.concurrent.CompletableFuture; -import java.util.concurrent.CompletionException; -import localhost.ApiHelper; -import localhost.Server; -import localhost.exceptions.ApiException; -import localhost.exceptions.ErrorResponseException; -import localhost.http.request.HttpMethod; -import localhost.models.TspublicRestV2MaterializationRefreshviewRequest; - -/** - * This class lists all the endpoints of the groups. - */ -public final class MaterializationController extends BaseController { - - /** - * Initializes the controller. - * @param globalConfig Configurations added in client. - */ - public MaterializationController(GlobalConfiguration globalConfig) { - super(globalConfig); - } - - /** - * Use this endpoint to refresh data in the materialized view by running the query associated - * with it. - * @param body Required parameter: Example: - * @return Returns the Object response from the API call - * @throws ApiException Represents error response from the server. - * @throws IOException Signals that an I/O exception of some sort has occurred. - */ - public Object restapiV2RefreshMaterializedView( - final TspublicRestV2MaterializationRefreshviewRequest body) throws ApiException, IOException { - return prepareRestapiV2RefreshMaterializedViewRequest(body).execute(); - } - - /** - * Use this endpoint to refresh data in the materialized view by running the query associated - * with it. - * @param body Required parameter: Example: - * @return Returns the Object response from the API call - */ - public CompletableFuture restapiV2RefreshMaterializedViewAsync( - final TspublicRestV2MaterializationRefreshviewRequest body) { - try { - return prepareRestapiV2RefreshMaterializedViewRequest(body).executeAsync(); - } catch (Exception e) { - throw new CompletionException(e); - } - } - - /** - * Builds the ApiCall object for restapiV2RefreshMaterializedView. - */ - private ApiCall prepareRestapiV2RefreshMaterializedViewRequest( - final TspublicRestV2MaterializationRefreshviewRequest body) throws JsonProcessingException, IOException { - return new ApiCall.Builder() - .globalConfig(getGlobalConfiguration()) - .requestBuilder(requestBuilder -> requestBuilder - .server(Server.ENUM_DEFAULT.value()) - .path("/tspublic/rest/v2/materialization/refreshview") - .bodyParam(param -> param.value(body)) - .bodySerializer(() -> ApiHelper.serialize(body)) - .headerParam(param -> param.key("Content-Type") - .value("application/json").isRequired(false)) - .headerParam(param -> param.key("accept").value("application/json")) - .authenticationKey(BaseController.AUTHENTICATION_KEY) - .httpMethod(HttpMethod.PUT)) - .responseHandler(responseHandler -> responseHandler - .deserializer( - response -> response) - .nullify404(false) - .localErrorCase("500", - ErrorCase.create("Operation failed", - (reason, context) -> new ErrorResponseException(reason, context))) - .globalErrorCase(GLOBAL_ERROR_CASES)) - .endpointConfiguration(param -> param - .arraySerializationFormat(ArraySerializationFormat.PLAIN -)) - .build(); - } -} \ No newline at end of file diff --git a/Java/src/main/java/localhost/controllers/MetadataController.java b/Java/src/main/java/localhost/controllers/MetadataController.java deleted file mode 100644 index a41126fa2..000000000 --- a/Java/src/main/java/localhost/controllers/MetadataController.java +++ /dev/null @@ -1,1284 +0,0 @@ -/* - * ThoughtSpotPublicRESTAPILib - * - * This file was automatically generated by APIMATIC v3.0 ( https://www.apimatic.io ). - */ - -package localhost.controllers; - -import com.fasterxml.jackson.core.JsonProcessingException; -import io.apimatic.core.ApiCall; -import io.apimatic.core.ErrorCase; -import io.apimatic.core.GlobalConfiguration; -import io.apimatic.coreinterfaces.http.request.ArraySerializationFormat; -import java.io.IOException; -import java.util.List; -import java.util.concurrent.CompletableFuture; -import java.util.concurrent.CompletionException; -import localhost.ApiHelper; -import localhost.Server; -import localhost.exceptions.ApiException; -import localhost.exceptions.ErrorResponseException; -import localhost.http.request.HttpMethod; -import localhost.models.HomeLiveboardResponse; -import localhost.models.MetadataTagResponse; -import localhost.models.TspublicRestV2MetadataDependencyRequest; -import localhost.models.TspublicRestV2MetadataDetailSearchRequest; -import localhost.models.TspublicRestV2MetadataFavoriteAssignRequest; -import localhost.models.TspublicRestV2MetadataFavoriteUnassignRequest; -import localhost.models.TspublicRestV2MetadataHeaderSearchRequest; -import localhost.models.TspublicRestV2MetadataHomeliveboardAssignRequest; -import localhost.models.TspublicRestV2MetadataHomeliveboardUnassignRequest; -import localhost.models.TspublicRestV2MetadataTagAssignRequest; -import localhost.models.TspublicRestV2MetadataTagCreateRequest; -import localhost.models.TspublicRestV2MetadataTagUnassignRequest; -import localhost.models.TspublicRestV2MetadataTagUpdateRequest; -import localhost.models.TspublicRestV2MetadataTmlExportRequest; -import localhost.models.TspublicRestV2MetadataTmlImportRequest; -import localhost.models.Type4Enum; -import localhost.models.Type5Enum; - -/** - * This class lists all the endpoints of the groups. - */ -public final class MetadataController extends BaseController { - - /** - * Initializes the controller. - * @param globalConfig Configurations added in client. - */ - public MetadataController(GlobalConfiguration globalConfig) { - super(globalConfig); - } - - /** - * To get details of a specific tag, use this endpoint. At least one of id or name of tag is - * required. When both are given, then id will be considered. - * @param name Optional parameter: Name of the tag - * @param id Optional parameter: The GUID of the tag - * @return Returns the MetadataTagResponse response from the API call - * @throws ApiException Represents error response from the server. - * @throws IOException Signals that an I/O exception of some sort has occurred. - */ - public MetadataTagResponse restapiV2GetTag( - final String name, - final String id) throws ApiException, IOException { - return prepareRestapiV2GetTagRequest(name, id).execute(); - } - - /** - * To get details of a specific tag, use this endpoint. At least one of id or name of tag is - * required. When both are given, then id will be considered. - * @param name Optional parameter: Name of the tag - * @param id Optional parameter: The GUID of the tag - * @return Returns the MetadataTagResponse response from the API call - */ - public CompletableFuture restapiV2GetTagAsync( - final String name, - final String id) { - try { - return prepareRestapiV2GetTagRequest(name, id).executeAsync(); - } catch (Exception e) { - throw new CompletionException(e); - } - } - - /** - * Builds the ApiCall object for restapiV2GetTag. - */ - private ApiCall prepareRestapiV2GetTagRequest( - final String name, - final String id) throws IOException { - return new ApiCall.Builder() - .globalConfig(getGlobalConfiguration()) - .requestBuilder(requestBuilder -> requestBuilder - .server(Server.ENUM_DEFAULT.value()) - .path("/tspublic/rest/v2/metadata/tag") - .queryParam(param -> param.key("name") - .value(name).isRequired(false)) - .queryParam(param -> param.key("id") - .value(id).isRequired(false)) - .headerParam(param -> param.key("accept").value("application/json")) - .authenticationKey(BaseController.AUTHENTICATION_KEY) - .httpMethod(HttpMethod.GET)) - .responseHandler(responseHandler -> responseHandler - .deserializer( - response -> ApiHelper.deserialize(response, MetadataTagResponse.class)) - .nullify404(false) - .localErrorCase("500", - ErrorCase.create("Operation failed", - (reason, context) -> new ErrorResponseException(reason, context))) - .globalErrorCase(GLOBAL_ERROR_CASES)) - .endpointConfiguration(param -> param - .arraySerializationFormat(ArraySerializationFormat.PLAIN -)) - .build(); - } - - /** - * To get the name and id of liveboard that is set as a home liveboard for a user, use this - * endpoint. At least one of user id or username is required. When both are given, then id will - * be considered. - * @param userName Optional parameter: Name of the tag - * @param userId Optional parameter: The GUID of the tag - * @return Returns the HomeLiveboardResponse response from the API call - * @throws ApiException Represents error response from the server. - * @throws IOException Signals that an I/O exception of some sort has occurred. - */ - public HomeLiveboardResponse restapiV2GetHomeLiveboard( - final String userName, - final String userId) throws ApiException, IOException { - return prepareRestapiV2GetHomeLiveboardRequest(userName, userId).execute(); - } - - /** - * To get the name and id of liveboard that is set as a home liveboard for a user, use this - * endpoint. At least one of user id or username is required. When both are given, then id will - * be considered. - * @param userName Optional parameter: Name of the tag - * @param userId Optional parameter: The GUID of the tag - * @return Returns the HomeLiveboardResponse response from the API call - */ - public CompletableFuture restapiV2GetHomeLiveboardAsync( - final String userName, - final String userId) { - try { - return prepareRestapiV2GetHomeLiveboardRequest(userName, userId).executeAsync(); - } catch (Exception e) { - throw new CompletionException(e); - } - } - - /** - * Builds the ApiCall object for restapiV2GetHomeLiveboard. - */ - private ApiCall prepareRestapiV2GetHomeLiveboardRequest( - final String userName, - final String userId) throws IOException { - return new ApiCall.Builder() - .globalConfig(getGlobalConfiguration()) - .requestBuilder(requestBuilder -> requestBuilder - .server(Server.ENUM_DEFAULT.value()) - .path("/tspublic/rest/v2/metadata/homeliveboard") - .queryParam(param -> param.key("userName") - .value(userName).isRequired(false)) - .queryParam(param -> param.key("userId") - .value(userId).isRequired(false)) - .headerParam(param -> param.key("accept").value("application/json")) - .authenticationKey(BaseController.AUTHENTICATION_KEY) - .httpMethod(HttpMethod.GET)) - .responseHandler(responseHandler -> responseHandler - .deserializer( - response -> ApiHelper.deserialize(response, HomeLiveboardResponse.class)) - .nullify404(false) - .localErrorCase("500", - ErrorCase.create("Operation failed", - (reason, context) -> new ErrorResponseException(reason, context))) - .globalErrorCase(GLOBAL_ERROR_CASES)) - .endpointConfiguration(param -> param - .arraySerializationFormat(ArraySerializationFormat.PLAIN -)) - .build(); - } - - /** - * To get header details for metadata objects, use this endpoint. You can provide as input - * selective fields to get the data for. - * @param body Required parameter: Example: - * @return Returns the Object response from the API call - * @throws ApiException Represents error response from the server. - * @throws IOException Signals that an I/O exception of some sort has occurred. - */ - public Object restapiV2SearchObjectHeader( - final TspublicRestV2MetadataHeaderSearchRequest body) throws ApiException, IOException { - return prepareRestapiV2SearchObjectHeaderRequest(body).execute(); - } - - /** - * To get header details for metadata objects, use this endpoint. You can provide as input - * selective fields to get the data for. - * @param body Required parameter: Example: - * @return Returns the Object response from the API call - */ - public CompletableFuture restapiV2SearchObjectHeaderAsync( - final TspublicRestV2MetadataHeaderSearchRequest body) { - try { - return prepareRestapiV2SearchObjectHeaderRequest(body).executeAsync(); - } catch (Exception e) { - throw new CompletionException(e); - } - } - - /** - * Builds the ApiCall object for restapiV2SearchObjectHeader. - */ - private ApiCall prepareRestapiV2SearchObjectHeaderRequest( - final TspublicRestV2MetadataHeaderSearchRequest body) throws JsonProcessingException, IOException { - return new ApiCall.Builder() - .globalConfig(getGlobalConfiguration()) - .requestBuilder(requestBuilder -> requestBuilder - .server(Server.ENUM_DEFAULT.value()) - .path("/tspublic/rest/v2/metadata/header/search") - .bodyParam(param -> param.value(body)) - .bodySerializer(() -> ApiHelper.serialize(body)) - .headerParam(param -> param.key("Content-Type") - .value("application/json").isRequired(false)) - .headerParam(param -> param.key("accept").value("application/json")) - .authenticationKey(BaseController.AUTHENTICATION_KEY) - .httpMethod(HttpMethod.POST)) - .responseHandler(responseHandler -> responseHandler - .deserializer( - response -> response) - .nullify404(false) - .localErrorCase("500", - ErrorCase.create("Operation failed", - (reason, context) -> new ErrorResponseException(reason, context))) - .globalErrorCase(GLOBAL_ERROR_CASES)) - .endpointConfiguration(param -> param - .arraySerializationFormat(ArraySerializationFormat.PLAIN -)) - .build(); - } - - /** - * Use this endpoint to get header details of visualization charts for a given liveboard or - * answer. At least one of id or name of liveboard or answer is required. When both are given, - * then id will be considered. - * @param id Required parameter: The GUID of the liveboard or answer - * @return Returns the List of Object response from the API call - * @throws ApiException Represents error response from the server. - * @throws IOException Signals that an I/O exception of some sort has occurred. - */ - public List restapiV2GetObjectVisualizationHeader( - final String id) throws ApiException, IOException { - return prepareRestapiV2GetObjectVisualizationHeaderRequest(id).execute(); - } - - /** - * Use this endpoint to get header details of visualization charts for a given liveboard or - * answer. At least one of id or name of liveboard or answer is required. When both are given, - * then id will be considered. - * @param id Required parameter: The GUID of the liveboard or answer - * @return Returns the List of Object response from the API call - */ - public CompletableFuture> restapiV2GetObjectVisualizationHeaderAsync( - final String id) { - try { - return prepareRestapiV2GetObjectVisualizationHeaderRequest(id).executeAsync(); - } catch (Exception e) { - throw new CompletionException(e); - } - } - - /** - * Builds the ApiCall object for restapiV2GetObjectVisualizationHeader. - */ - private ApiCall, ApiException> prepareRestapiV2GetObjectVisualizationHeaderRequest( - final String id) throws IOException { - return new ApiCall.Builder, ApiException>() - .globalConfig(getGlobalConfiguration()) - .requestBuilder(requestBuilder -> requestBuilder - .server(Server.ENUM_DEFAULT.value()) - .path("/tspublic/rest/v2/metadata/vizheader") - .queryParam(param -> param.key("id") - .value(id)) - .headerParam(param -> param.key("accept").value("application/json")) - .authenticationKey(BaseController.AUTHENTICATION_KEY) - .httpMethod(HttpMethod.GET)) - .responseHandler(responseHandler -> responseHandler - .deserializer( - response -> ApiHelper.deserializeArray(response, - Object[].class)) - .nullify404(false) - .localErrorCase("500", - ErrorCase.create("Operation failed", - (reason, context) -> new ErrorResponseException(reason, context))) - .globalErrorCase(GLOBAL_ERROR_CASES)) - .endpointConfiguration(param -> param - .arraySerializationFormat(ArraySerializationFormat.PLAIN -)) - .build(); - } - - /** - * Use this endpoint to get full details of metadata objects. - * @param type Required parameter: Type of the metadata object being searched. - * @param id Required parameter: A JSON array of GUIDs of the objects. - * @return Returns the Object response from the API call - * @throws ApiException Represents error response from the server. - * @throws IOException Signals that an I/O exception of some sort has occurred. - */ - public Object restapiV2GetObjectDetail( - final Type4Enum type, - final List id) throws ApiException, IOException { - return prepareRestapiV2GetObjectDetailRequest(type, id).execute(); - } - - /** - * Use this endpoint to get full details of metadata objects. - * @param type Required parameter: Type of the metadata object being searched. - * @param id Required parameter: A JSON array of GUIDs of the objects. - * @return Returns the Object response from the API call - */ - public CompletableFuture restapiV2GetObjectDetailAsync( - final Type4Enum type, - final List id) { - try { - return prepareRestapiV2GetObjectDetailRequest(type, id).executeAsync(); - } catch (Exception e) { - throw new CompletionException(e); - } - } - - /** - * Builds the ApiCall object for restapiV2GetObjectDetail. - */ - private ApiCall prepareRestapiV2GetObjectDetailRequest( - final Type4Enum type, - final List id) throws IOException { - return new ApiCall.Builder() - .globalConfig(getGlobalConfiguration()) - .requestBuilder(requestBuilder -> requestBuilder - .server(Server.ENUM_DEFAULT.value()) - .path("/tspublic/rest/v2/metadata/detail") - .queryParam(param -> param.key("type") - .value((type != null) ? type.value() : null)) - .queryParam(param -> param.key("id") - .value(id)) - .headerParam(param -> param.key("accept").value("application/json")) - .authenticationKey(BaseController.AUTHENTICATION_KEY) - .httpMethod(HttpMethod.GET)) - .responseHandler(responseHandler -> responseHandler - .deserializer( - response -> response) - .nullify404(false) - .localErrorCase("500", - ErrorCase.create("Operation failed", - (reason, context) -> new ErrorResponseException(reason, context))) - .globalErrorCase(GLOBAL_ERROR_CASES)) - .endpointConfiguration(param -> param - .arraySerializationFormat(ArraySerializationFormat.PLAIN -)) - .build(); - } - - /** - * To get header detail of a metadata object, use this endpoint. You can provide as input - * selective fields to get the data for. - * @param type Required parameter: Type of the metadata object being searched. - * @param id Required parameter: GUID of the metadata object - * @param outputFields Optional parameter: Array of header field names that need to be - * included in the header response - * @return Returns the Object response from the API call - * @throws ApiException Represents error response from the server. - * @throws IOException Signals that an I/O exception of some sort has occurred. - */ - public Object restapiV2GetObjectHeader( - final Type5Enum type, - final String id, - final List outputFields) throws ApiException, IOException { - return prepareRestapiV2GetObjectHeaderRequest(type, id, outputFields).execute(); - } - - /** - * To get header detail of a metadata object, use this endpoint. You can provide as input - * selective fields to get the data for. - * @param type Required parameter: Type of the metadata object being searched. - * @param id Required parameter: GUID of the metadata object - * @param outputFields Optional parameter: Array of header field names that need to be - * included in the header response - * @return Returns the Object response from the API call - */ - public CompletableFuture restapiV2GetObjectHeaderAsync( - final Type5Enum type, - final String id, - final List outputFields) { - try { - return prepareRestapiV2GetObjectHeaderRequest(type, id, outputFields).executeAsync(); - } catch (Exception e) { - throw new CompletionException(e); - } - } - - /** - * Builds the ApiCall object for restapiV2GetObjectHeader. - */ - private ApiCall prepareRestapiV2GetObjectHeaderRequest( - final Type5Enum type, - final String id, - final List outputFields) throws IOException { - return new ApiCall.Builder() - .globalConfig(getGlobalConfiguration()) - .requestBuilder(requestBuilder -> requestBuilder - .server(Server.ENUM_DEFAULT.value()) - .path("/tspublic/rest/v2/metadata/header") - .queryParam(param -> param.key("type") - .value((type != null) ? type.value() : null)) - .queryParam(param -> param.key("id") - .value(id)) - .queryParam(param -> param.key("outputFields") - .value(outputFields).isRequired(false)) - .headerParam(param -> param.key("accept").value("application/json")) - .authenticationKey(BaseController.AUTHENTICATION_KEY) - .httpMethod(HttpMethod.GET)) - .responseHandler(responseHandler -> responseHandler - .deserializer( - response -> response) - .nullify404(false) - .localErrorCase("500", - ErrorCase.create("Operation failed", - (reason, context) -> new ErrorResponseException(reason, context))) - .globalErrorCase(GLOBAL_ERROR_CASES)) - .endpointConfiguration(param -> param - .arraySerializationFormat(ArraySerializationFormat.PLAIN -)) - .build(); - } - - /** - * Use this endpoint to get full details of metadata objects. - * @param body Required parameter: Example: - * @return Returns the Object response from the API call - * @throws ApiException Represents error response from the server. - * @throws IOException Signals that an I/O exception of some sort has occurred. - */ - public Object restapiV2SearchObjectDetail( - final TspublicRestV2MetadataDetailSearchRequest body) throws ApiException, IOException { - return prepareRestapiV2SearchObjectDetailRequest(body).execute(); - } - - /** - * Use this endpoint to get full details of metadata objects. - * @param body Required parameter: Example: - * @return Returns the Object response from the API call - */ - public CompletableFuture restapiV2SearchObjectDetailAsync( - final TspublicRestV2MetadataDetailSearchRequest body) { - try { - return prepareRestapiV2SearchObjectDetailRequest(body).executeAsync(); - } catch (Exception e) { - throw new CompletionException(e); - } - } - - /** - * Builds the ApiCall object for restapiV2SearchObjectDetail. - */ - private ApiCall prepareRestapiV2SearchObjectDetailRequest( - final TspublicRestV2MetadataDetailSearchRequest body) throws JsonProcessingException, IOException { - return new ApiCall.Builder() - .globalConfig(getGlobalConfiguration()) - .requestBuilder(requestBuilder -> requestBuilder - .server(Server.ENUM_DEFAULT.value()) - .path("/tspublic/rest/v2/metadata/detail/search") - .bodyParam(param -> param.value(body)) - .bodySerializer(() -> ApiHelper.serialize(body)) - .headerParam(param -> param.key("Content-Type") - .value("application/json").isRequired(false)) - .headerParam(param -> param.key("accept").value("application/json")) - .authenticationKey(BaseController.AUTHENTICATION_KEY) - .httpMethod(HttpMethod.POST)) - .responseHandler(responseHandler -> responseHandler - .deserializer( - response -> response) - .nullify404(false) - .localErrorCase("500", - ErrorCase.create("Operation failed", - (reason, context) -> new ErrorResponseException(reason, context))) - .globalErrorCase(GLOBAL_ERROR_CASES)) - .endpointConfiguration(param -> param - .arraySerializationFormat(ArraySerializationFormat.PLAIN -)) - .build(); - } - - /** - * To programmatically create tags, use this endpoint. - * @param body Required parameter: Example: - * @return Returns the MetadataTagResponse response from the API call - * @throws ApiException Represents error response from the server. - * @throws IOException Signals that an I/O exception of some sort has occurred. - */ - public MetadataTagResponse restapiV2CreateTag( - final TspublicRestV2MetadataTagCreateRequest body) throws ApiException, IOException { - return prepareRestapiV2CreateTagRequest(body).execute(); - } - - /** - * To programmatically create tags, use this endpoint. - * @param body Required parameter: Example: - * @return Returns the MetadataTagResponse response from the API call - */ - public CompletableFuture restapiV2CreateTagAsync( - final TspublicRestV2MetadataTagCreateRequest body) { - try { - return prepareRestapiV2CreateTagRequest(body).executeAsync(); - } catch (Exception e) { - throw new CompletionException(e); - } - } - - /** - * Builds the ApiCall object for restapiV2CreateTag. - */ - private ApiCall prepareRestapiV2CreateTagRequest( - final TspublicRestV2MetadataTagCreateRequest body) throws JsonProcessingException, IOException { - return new ApiCall.Builder() - .globalConfig(getGlobalConfiguration()) - .requestBuilder(requestBuilder -> requestBuilder - .server(Server.ENUM_DEFAULT.value()) - .path("/tspublic/rest/v2/metadata/tag/create") - .bodyParam(param -> param.value(body)) - .bodySerializer(() -> ApiHelper.serialize(body)) - .headerParam(param -> param.key("Content-Type") - .value("application/json").isRequired(false)) - .headerParam(param -> param.key("accept").value("application/json")) - .authenticationKey(BaseController.AUTHENTICATION_KEY) - .httpMethod(HttpMethod.POST)) - .responseHandler(responseHandler -> responseHandler - .deserializer( - response -> ApiHelper.deserialize(response, MetadataTagResponse.class)) - .nullify404(false) - .localErrorCase("500", - ErrorCase.create("Operation failed", - (reason, context) -> new ErrorResponseException(reason, context))) - .globalErrorCase(GLOBAL_ERROR_CASES)) - .endpointConfiguration(param -> param - .arraySerializationFormat(ArraySerializationFormat.PLAIN -)) - .build(); - } - - /** - * To programmatically update tags, use this endpoint. At least one of id or name of tag is - * required. When both are given, then id will be considered. - * @param body Required parameter: Example: - * @return Returns the Boolean response from the API call - * @throws ApiException Represents error response from the server. - * @throws IOException Signals that an I/O exception of some sort has occurred. - */ - public Boolean restapiV2UpdateTag( - final TspublicRestV2MetadataTagUpdateRequest body) throws ApiException, IOException { - return prepareRestapiV2UpdateTagRequest(body).execute(); - } - - /** - * To programmatically update tags, use this endpoint. At least one of id or name of tag is - * required. When both are given, then id will be considered. - * @param body Required parameter: Example: - * @return Returns the Boolean response from the API call - */ - public CompletableFuture restapiV2UpdateTagAsync( - final TspublicRestV2MetadataTagUpdateRequest body) { - try { - return prepareRestapiV2UpdateTagRequest(body).executeAsync(); - } catch (Exception e) { - throw new CompletionException(e); - } - } - - /** - * Builds the ApiCall object for restapiV2UpdateTag. - */ - private ApiCall prepareRestapiV2UpdateTagRequest( - final TspublicRestV2MetadataTagUpdateRequest body) throws JsonProcessingException, IOException { - return new ApiCall.Builder() - .globalConfig(getGlobalConfiguration()) - .requestBuilder(requestBuilder -> requestBuilder - .server(Server.ENUM_DEFAULT.value()) - .path("/tspublic/rest/v2/metadata/tag/update") - .bodyParam(param -> param.value(body)) - .bodySerializer(() -> ApiHelper.serialize(body)) - .headerParam(param -> param.key("Content-Type") - .value("application/json").isRequired(false)) - .authenticationKey(BaseController.AUTHENTICATION_KEY) - .httpMethod(HttpMethod.PUT)) - .responseHandler(responseHandler -> responseHandler - .deserializer( - response -> Boolean.parseBoolean(response)) - .nullify404(false) - .localErrorCase("500", - ErrorCase.create("Operation failed", - (reason, context) -> new ErrorResponseException(reason, context))) - .globalErrorCase(GLOBAL_ERROR_CASES)) - .endpointConfiguration(param -> param - .arraySerializationFormat(ArraySerializationFormat.PLAIN -)) - .build(); - } - - /** - * To programmatically delete tags, use this endpoint. At least one of id or name of tag is - * required. When both are given, then id will be considered. - * @param name Optional parameter: Name of the tag - * @param id Optional parameter: The GUID of the tag - * @return Returns the Boolean response from the API call - * @throws ApiException Represents error response from the server. - * @throws IOException Signals that an I/O exception of some sort has occurred. - */ - public Boolean restapiV2DeleteTag( - final String name, - final String id) throws ApiException, IOException { - return prepareRestapiV2DeleteTagRequest(name, id).execute(); - } - - /** - * To programmatically delete tags, use this endpoint. At least one of id or name of tag is - * required. When both are given, then id will be considered. - * @param name Optional parameter: Name of the tag - * @param id Optional parameter: The GUID of the tag - * @return Returns the Boolean response from the API call - */ - public CompletableFuture restapiV2DeleteTagAsync( - final String name, - final String id) { - try { - return prepareRestapiV2DeleteTagRequest(name, id).executeAsync(); - } catch (Exception e) { - throw new CompletionException(e); - } - } - - /** - * Builds the ApiCall object for restapiV2DeleteTag. - */ - private ApiCall prepareRestapiV2DeleteTagRequest( - final String name, - final String id) throws IOException { - return new ApiCall.Builder() - .globalConfig(getGlobalConfiguration()) - .requestBuilder(requestBuilder -> requestBuilder - .server(Server.ENUM_DEFAULT.value()) - .path("/tspublic/rest/v2/metadata/tag/delete") - .queryParam(param -> param.key("name") - .value(name).isRequired(false)) - .queryParam(param -> param.key("id") - .value(id).isRequired(false)) - .authenticationKey(BaseController.AUTHENTICATION_KEY) - .httpMethod(HttpMethod.DELETE)) - .responseHandler(responseHandler -> responseHandler - .deserializer( - response -> Boolean.parseBoolean(response)) - .nullify404(false) - .localErrorCase("500", - ErrorCase.create("Operation failed", - (reason, context) -> new ErrorResponseException(reason, context))) - .globalErrorCase(GLOBAL_ERROR_CASES)) - .endpointConfiguration(param -> param - .arraySerializationFormat(ArraySerializationFormat.PLAIN -)) - .build(); - } - - /** - * To programmatically assign tags to a metadata object, such as a liveboard, search answer, - * table, worksheet, or view, use this endpoint. At least one of id or name of tag is required. - * When both are given, then id will be considered. - * @param body Required parameter: Example: - * @return Returns the Boolean response from the API call - * @throws ApiException Represents error response from the server. - * @throws IOException Signals that an I/O exception of some sort has occurred. - */ - public Boolean restapiV2AssignTag( - final TspublicRestV2MetadataTagAssignRequest body) throws ApiException, IOException { - return prepareRestapiV2AssignTagRequest(body).execute(); - } - - /** - * To programmatically assign tags to a metadata object, such as a liveboard, search answer, - * table, worksheet, or view, use this endpoint. At least one of id or name of tag is required. - * When both are given, then id will be considered. - * @param body Required parameter: Example: - * @return Returns the Boolean response from the API call - */ - public CompletableFuture restapiV2AssignTagAsync( - final TspublicRestV2MetadataTagAssignRequest body) { - try { - return prepareRestapiV2AssignTagRequest(body).executeAsync(); - } catch (Exception e) { - throw new CompletionException(e); - } - } - - /** - * Builds the ApiCall object for restapiV2AssignTag. - */ - private ApiCall prepareRestapiV2AssignTagRequest( - final TspublicRestV2MetadataTagAssignRequest body) throws JsonProcessingException, IOException { - return new ApiCall.Builder() - .globalConfig(getGlobalConfiguration()) - .requestBuilder(requestBuilder -> requestBuilder - .server(Server.ENUM_DEFAULT.value()) - .path("/tspublic/rest/v2/metadata/tag/assign") - .bodyParam(param -> param.value(body)) - .bodySerializer(() -> ApiHelper.serialize(body)) - .headerParam(param -> param.key("Content-Type") - .value("application/json").isRequired(false)) - .authenticationKey(BaseController.AUTHENTICATION_KEY) - .httpMethod(HttpMethod.PUT)) - .responseHandler(responseHandler -> responseHandler - .deserializer( - response -> Boolean.parseBoolean(response)) - .nullify404(false) - .localErrorCase("500", - ErrorCase.create("Operation failed", - (reason, context) -> new ErrorResponseException(reason, context))) - .globalErrorCase(GLOBAL_ERROR_CASES)) - .endpointConfiguration(param -> param - .arraySerializationFormat(ArraySerializationFormat.PLAIN -)) - .build(); - } - - /** - * To programmatically unassign tags to a metadata object, such as a liveboard, search answer, - * table, worksheet, or view, use this endpoint. At least one of id or name of tag is required. - * When both are given, then id will be considered. - * @param body Required parameter: Example: - * @return Returns the Boolean response from the API call - * @throws ApiException Represents error response from the server. - * @throws IOException Signals that an I/O exception of some sort has occurred. - */ - public Boolean restapiV2UnassignTag( - final TspublicRestV2MetadataTagUnassignRequest body) throws ApiException, IOException { - return prepareRestapiV2UnassignTagRequest(body).execute(); - } - - /** - * To programmatically unassign tags to a metadata object, such as a liveboard, search answer, - * table, worksheet, or view, use this endpoint. At least one of id or name of tag is required. - * When both are given, then id will be considered. - * @param body Required parameter: Example: - * @return Returns the Boolean response from the API call - */ - public CompletableFuture restapiV2UnassignTagAsync( - final TspublicRestV2MetadataTagUnassignRequest body) { - try { - return prepareRestapiV2UnassignTagRequest(body).executeAsync(); - } catch (Exception e) { - throw new CompletionException(e); - } - } - - /** - * Builds the ApiCall object for restapiV2UnassignTag. - */ - private ApiCall prepareRestapiV2UnassignTagRequest( - final TspublicRestV2MetadataTagUnassignRequest body) throws JsonProcessingException, IOException { - return new ApiCall.Builder() - .globalConfig(getGlobalConfiguration()) - .requestBuilder(requestBuilder -> requestBuilder - .server(Server.ENUM_DEFAULT.value()) - .path("/tspublic/rest/v2/metadata/tag/unassign") - .bodyParam(param -> param.value(body)) - .bodySerializer(() -> ApiHelper.serialize(body)) - .headerParam(param -> param.key("Content-Type") - .value("application/json").isRequired(false)) - .authenticationKey(BaseController.AUTHENTICATION_KEY) - .httpMethod(HttpMethod.PUT)) - .responseHandler(responseHandler -> responseHandler - .deserializer( - response -> Boolean.parseBoolean(response)) - .nullify404(false) - .localErrorCase("500", - ErrorCase.create("Operation failed", - (reason, context) -> new ErrorResponseException(reason, context))) - .globalErrorCase(GLOBAL_ERROR_CASES)) - .endpointConfiguration(param -> param - .arraySerializationFormat(ArraySerializationFormat.PLAIN -)) - .build(); - } - - /** - * To programmatically assign objects to favorites for a given user account, use this endpoint. - * At least one of user id or username is required. When both are given, then id will be - * considered. - * @param body Required parameter: Example: - * @return Returns the Boolean response from the API call - * @throws ApiException Represents error response from the server. - * @throws IOException Signals that an I/O exception of some sort has occurred. - */ - public Boolean restapiV2AssignFavorite( - final TspublicRestV2MetadataFavoriteAssignRequest body) throws ApiException, IOException { - return prepareRestapiV2AssignFavoriteRequest(body).execute(); - } - - /** - * To programmatically assign objects to favorites for a given user account, use this endpoint. - * At least one of user id or username is required. When both are given, then id will be - * considered. - * @param body Required parameter: Example: - * @return Returns the Boolean response from the API call - */ - public CompletableFuture restapiV2AssignFavoriteAsync( - final TspublicRestV2MetadataFavoriteAssignRequest body) { - try { - return prepareRestapiV2AssignFavoriteRequest(body).executeAsync(); - } catch (Exception e) { - throw new CompletionException(e); - } - } - - /** - * Builds the ApiCall object for restapiV2AssignFavorite. - */ - private ApiCall prepareRestapiV2AssignFavoriteRequest( - final TspublicRestV2MetadataFavoriteAssignRequest body) throws JsonProcessingException, IOException { - return new ApiCall.Builder() - .globalConfig(getGlobalConfiguration()) - .requestBuilder(requestBuilder -> requestBuilder - .server(Server.ENUM_DEFAULT.value()) - .path("/tspublic/rest/v2/metadata/favorite/assign") - .bodyParam(param -> param.value(body)) - .bodySerializer(() -> ApiHelper.serialize(body)) - .headerParam(param -> param.key("Content-Type") - .value("application/json").isRequired(false)) - .authenticationKey(BaseController.AUTHENTICATION_KEY) - .httpMethod(HttpMethod.PUT)) - .responseHandler(responseHandler -> responseHandler - .deserializer( - response -> Boolean.parseBoolean(response)) - .nullify404(false) - .localErrorCase("500", - ErrorCase.create("Operation failed", - (reason, context) -> new ErrorResponseException(reason, context))) - .globalErrorCase(GLOBAL_ERROR_CASES)) - .endpointConfiguration(param -> param - .arraySerializationFormat(ArraySerializationFormat.PLAIN -)) - .build(); - } - - /** - * To programmatically unassign objects to favorites for a given user account, use this - * endpoint. At least one of user id or username is required. When both are given, then id will - * be considered. - * @param body Required parameter: Example: - * @return Returns the Boolean response from the API call - * @throws ApiException Represents error response from the server. - * @throws IOException Signals that an I/O exception of some sort has occurred. - */ - public Boolean restapiV2UnassignFavorite( - final TspublicRestV2MetadataFavoriteUnassignRequest body) throws ApiException, IOException { - return prepareRestapiV2UnassignFavoriteRequest(body).execute(); - } - - /** - * To programmatically unassign objects to favorites for a given user account, use this - * endpoint. At least one of user id or username is required. When both are given, then id will - * be considered. - * @param body Required parameter: Example: - * @return Returns the Boolean response from the API call - */ - public CompletableFuture restapiV2UnassignFavoriteAsync( - final TspublicRestV2MetadataFavoriteUnassignRequest body) { - try { - return prepareRestapiV2UnassignFavoriteRequest(body).executeAsync(); - } catch (Exception e) { - throw new CompletionException(e); - } - } - - /** - * Builds the ApiCall object for restapiV2UnassignFavorite. - */ - private ApiCall prepareRestapiV2UnassignFavoriteRequest( - final TspublicRestV2MetadataFavoriteUnassignRequest body) throws JsonProcessingException, IOException { - return new ApiCall.Builder() - .globalConfig(getGlobalConfiguration()) - .requestBuilder(requestBuilder -> requestBuilder - .server(Server.ENUM_DEFAULT.value()) - .path("/tspublic/rest/v2/metadata/favorite/unassign") - .bodyParam(param -> param.value(body)) - .bodySerializer(() -> ApiHelper.serialize(body)) - .headerParam(param -> param.key("Content-Type") - .value("application/json").isRequired(false)) - .authenticationKey(BaseController.AUTHENTICATION_KEY) - .httpMethod(HttpMethod.PUT)) - .responseHandler(responseHandler -> responseHandler - .deserializer( - response -> Boolean.parseBoolean(response)) - .nullify404(false) - .localErrorCase("500", - ErrorCase.create("Operation failed", - (reason, context) -> new ErrorResponseException(reason, context))) - .globalErrorCase(GLOBAL_ERROR_CASES)) - .endpointConfiguration(param -> param - .arraySerializationFormat(ArraySerializationFormat.PLAIN -)) - .build(); - } - - /** - * To assign a specific liveboard as a home liveboard for a user, use this endpoint. At least - * one of user id or username is required. When both are given, then id will be considered. - * @param body Required parameter: Example: - * @return Returns the Boolean response from the API call - * @throws ApiException Represents error response from the server. - * @throws IOException Signals that an I/O exception of some sort has occurred. - */ - public Boolean restapiV2AssignHomeLiveboard( - final TspublicRestV2MetadataHomeliveboardAssignRequest body) throws ApiException, IOException { - return prepareRestapiV2AssignHomeLiveboardRequest(body).execute(); - } - - /** - * To assign a specific liveboard as a home liveboard for a user, use this endpoint. At least - * one of user id or username is required. When both are given, then id will be considered. - * @param body Required parameter: Example: - * @return Returns the Boolean response from the API call - */ - public CompletableFuture restapiV2AssignHomeLiveboardAsync( - final TspublicRestV2MetadataHomeliveboardAssignRequest body) { - try { - return prepareRestapiV2AssignHomeLiveboardRequest(body).executeAsync(); - } catch (Exception e) { - throw new CompletionException(e); - } - } - - /** - * Builds the ApiCall object for restapiV2AssignHomeLiveboard. - */ - private ApiCall prepareRestapiV2AssignHomeLiveboardRequest( - final TspublicRestV2MetadataHomeliveboardAssignRequest body) throws JsonProcessingException, IOException { - return new ApiCall.Builder() - .globalConfig(getGlobalConfiguration()) - .requestBuilder(requestBuilder -> requestBuilder - .server(Server.ENUM_DEFAULT.value()) - .path("/tspublic/rest/v2/metadata/homeliveboard/assign") - .bodyParam(param -> param.value(body)) - .bodySerializer(() -> ApiHelper.serialize(body)) - .headerParam(param -> param.key("Content-Type") - .value("application/json").isRequired(false)) - .authenticationKey(BaseController.AUTHENTICATION_KEY) - .httpMethod(HttpMethod.PUT)) - .responseHandler(responseHandler -> responseHandler - .deserializer( - response -> Boolean.parseBoolean(response)) - .nullify404(false) - .localErrorCase("500", - ErrorCase.create("Operation failed", - (reason, context) -> new ErrorResponseException(reason, context))) - .globalErrorCase(GLOBAL_ERROR_CASES)) - .endpointConfiguration(param -> param - .arraySerializationFormat(ArraySerializationFormat.PLAIN -)) - .build(); - } - - /** - * To unassign the home liveboard set for a user, use this endpoint. At least one of user id or - * username is required. When both are given, then id will be considered. - * @param body Required parameter: Example: - * @return Returns the Boolean response from the API call - * @throws ApiException Represents error response from the server. - * @throws IOException Signals that an I/O exception of some sort has occurred. - */ - public Boolean restapiV2UnassignHomeLiveboard( - final TspublicRestV2MetadataHomeliveboardUnassignRequest body) throws ApiException, IOException { - return prepareRestapiV2UnassignHomeLiveboardRequest(body).execute(); - } - - /** - * To unassign the home liveboard set for a user, use this endpoint. At least one of user id or - * username is required. When both are given, then id will be considered. - * @param body Required parameter: Example: - * @return Returns the Boolean response from the API call - */ - public CompletableFuture restapiV2UnassignHomeLiveboardAsync( - final TspublicRestV2MetadataHomeliveboardUnassignRequest body) { - try { - return prepareRestapiV2UnassignHomeLiveboardRequest(body).executeAsync(); - } catch (Exception e) { - throw new CompletionException(e); - } - } - - /** - * Builds the ApiCall object for restapiV2UnassignHomeLiveboard. - */ - private ApiCall prepareRestapiV2UnassignHomeLiveboardRequest( - final TspublicRestV2MetadataHomeliveboardUnassignRequest body) throws JsonProcessingException, IOException { - return new ApiCall.Builder() - .globalConfig(getGlobalConfiguration()) - .requestBuilder(requestBuilder -> requestBuilder - .server(Server.ENUM_DEFAULT.value()) - .path("/tspublic/rest/v2/metadata/homeliveboard/unassign") - .bodyParam(param -> param.value(body)) - .bodySerializer(() -> ApiHelper.serialize(body)) - .headerParam(param -> param.key("Content-Type") - .value("application/json").isRequired(false)) - .authenticationKey(BaseController.AUTHENTICATION_KEY) - .httpMethod(HttpMethod.PUT)) - .responseHandler(responseHandler -> responseHandler - .deserializer( - response -> Boolean.parseBoolean(response)) - .nullify404(false) - .localErrorCase("500", - ErrorCase.create("Operation failed", - (reason, context) -> new ErrorResponseException(reason, context))) - .globalErrorCase(GLOBAL_ERROR_CASES)) - .endpointConfiguration(param -> param - .arraySerializationFormat(ArraySerializationFormat.PLAIN -)) - .build(); - } - - /** - * To export ThoughtSpot objects represented in ThoughtSpot Modeling Language (TML), use this - * endpoint. - * @param body Required parameter: Example: - * @return Returns the Object response from the API call - * @throws ApiException Represents error response from the server. - * @throws IOException Signals that an I/O exception of some sort has occurred. - */ - public Object restapiV2ExportObjectTML( - final TspublicRestV2MetadataTmlExportRequest body) throws ApiException, IOException { - return prepareRestapiV2ExportObjectTMLRequest(body).execute(); - } - - /** - * To export ThoughtSpot objects represented in ThoughtSpot Modeling Language (TML), use this - * endpoint. - * @param body Required parameter: Example: - * @return Returns the Object response from the API call - */ - public CompletableFuture restapiV2ExportObjectTMLAsync( - final TspublicRestV2MetadataTmlExportRequest body) { - try { - return prepareRestapiV2ExportObjectTMLRequest(body).executeAsync(); - } catch (Exception e) { - throw new CompletionException(e); - } - } - - /** - * Builds the ApiCall object for restapiV2ExportObjectTML. - */ - private ApiCall prepareRestapiV2ExportObjectTMLRequest( - final TspublicRestV2MetadataTmlExportRequest body) throws JsonProcessingException, IOException { - return new ApiCall.Builder() - .globalConfig(getGlobalConfiguration()) - .requestBuilder(requestBuilder -> requestBuilder - .server(Server.ENUM_DEFAULT.value()) - .path("/tspublic/rest/v2/metadata/tml/export") - .bodyParam(param -> param.value(body)) - .bodySerializer(() -> ApiHelper.serialize(body)) - .headerParam(param -> param.key("Content-Type") - .value("application/json").isRequired(false)) - .headerParam(param -> param.key("accept").value("application/json")) - .authenticationKey(BaseController.AUTHENTICATION_KEY) - .httpMethod(HttpMethod.POST)) - .responseHandler(responseHandler -> responseHandler - .deserializer( - response -> response) - .nullify404(false) - .localErrorCase("500", - ErrorCase.create("Operation failed", - (reason, context) -> new ErrorResponseException(reason, context))) - .globalErrorCase(GLOBAL_ERROR_CASES)) - .endpointConfiguration(param -> param - .arraySerializationFormat(ArraySerializationFormat.PLAIN -)) - .build(); - } - - /** - * To import ThoughtSpot objects represented in ThoughtSpot Modeling Language (TML), use this - * endpoint. - * @param body Required parameter: Example: - * @return Returns the Object response from the API call - * @throws ApiException Represents error response from the server. - * @throws IOException Signals that an I/O exception of some sort has occurred. - */ - public Object restapiV2ImportObjectTML( - final TspublicRestV2MetadataTmlImportRequest body) throws ApiException, IOException { - return prepareRestapiV2ImportObjectTMLRequest(body).execute(); - } - - /** - * To import ThoughtSpot objects represented in ThoughtSpot Modeling Language (TML), use this - * endpoint. - * @param body Required parameter: Example: - * @return Returns the Object response from the API call - */ - public CompletableFuture restapiV2ImportObjectTMLAsync( - final TspublicRestV2MetadataTmlImportRequest body) { - try { - return prepareRestapiV2ImportObjectTMLRequest(body).executeAsync(); - } catch (Exception e) { - throw new CompletionException(e); - } - } - - /** - * Builds the ApiCall object for restapiV2ImportObjectTML. - */ - private ApiCall prepareRestapiV2ImportObjectTMLRequest( - final TspublicRestV2MetadataTmlImportRequest body) throws JsonProcessingException, IOException { - return new ApiCall.Builder() - .globalConfig(getGlobalConfiguration()) - .requestBuilder(requestBuilder -> requestBuilder - .server(Server.ENUM_DEFAULT.value()) - .path("/tspublic/rest/v2/metadata/tml/import") - .bodyParam(param -> param.value(body)) - .bodySerializer(() -> ApiHelper.serialize(body)) - .headerParam(param -> param.key("Content-Type") - .value("application/json").isRequired(false)) - .headerParam(param -> param.key("accept").value("application/json")) - .authenticationKey(BaseController.AUTHENTICATION_KEY) - .httpMethod(HttpMethod.POST)) - .responseHandler(responseHandler -> responseHandler - .deserializer( - response -> response) - .nullify404(false) - .localErrorCase("500", - ErrorCase.create("Operation failed", - (reason, context) -> new ErrorResponseException(reason, context))) - .globalErrorCase(GLOBAL_ERROR_CASES)) - .endpointConfiguration(param -> param - .arraySerializationFormat(ArraySerializationFormat.PLAIN -)) - .build(); - } - - /** - * Use this endpoint to delete the metadata objects. - * @param type Required parameter: Type of the metadata object being searched - * @param id Required parameter: A JSON array of GUIDs of the objects - * @return Returns the Boolean response from the API call - * @throws ApiException Represents error response from the server. - * @throws IOException Signals that an I/O exception of some sort has occurred. - */ - public Boolean restapiV2DeleteObject( - final Type4Enum type, - final List id) throws ApiException, IOException { - return prepareRestapiV2DeleteObjectRequest(type, id).execute(); - } - - /** - * Use this endpoint to delete the metadata objects. - * @param type Required parameter: Type of the metadata object being searched - * @param id Required parameter: A JSON array of GUIDs of the objects - * @return Returns the Boolean response from the API call - */ - public CompletableFuture restapiV2DeleteObjectAsync( - final Type4Enum type, - final List id) { - try { - return prepareRestapiV2DeleteObjectRequest(type, id).executeAsync(); - } catch (Exception e) { - throw new CompletionException(e); - } - } - - /** - * Builds the ApiCall object for restapiV2DeleteObject. - */ - private ApiCall prepareRestapiV2DeleteObjectRequest( - final Type4Enum type, - final List id) throws IOException { - return new ApiCall.Builder() - .globalConfig(getGlobalConfiguration()) - .requestBuilder(requestBuilder -> requestBuilder - .server(Server.ENUM_DEFAULT.value()) - .path("/tspublic/rest/v2/metadata/delete") - .queryParam(param -> param.key("type") - .value((type != null) ? type.value() : null)) - .queryParam(param -> param.key("id") - .value(id)) - .authenticationKey(BaseController.AUTHENTICATION_KEY) - .httpMethod(HttpMethod.DELETE)) - .responseHandler(responseHandler -> responseHandler - .deserializer( - response -> Boolean.parseBoolean(response)) - .nullify404(false) - .localErrorCase("500", - ErrorCase.create("Operation failed", - (reason, context) -> new ErrorResponseException(reason, context))) - .globalErrorCase(GLOBAL_ERROR_CASES)) - .endpointConfiguration(param -> param - .arraySerializationFormat(ArraySerializationFormat.PLAIN -)) - .build(); - } - - /** - * To query the details of dependent objects and associate objects as dependents, you can use - * this API. Dependency is defined as relation between referenced and referencing objects. A - * referencing object is said to have a dependency on a referenced object, if the referenced - * object cannot be deleted without first deleting the referencing object. For example, consider - * a worksheet 'W1' that has a derived logical column 'C1' that has a reference to a base - * logical column 'C2'. This can be shown diagramatically as: W1-->C1-->C2. W1 has a dependency - * on C2 i.e. W1 is a referencing object and C2 is a referenced object. It is not possible to - * delete C2 without first deleting W1 because deletion of C2 will be prevented by the - * relationship between W1's column C1 and C2. Similarly C1 is said to have a dependency on C2 - * i.e. C1 is a referencing object and C2 is a referenced object. It is not possible to delete - * C2 without first deleting C1. - * @param body Required parameter: Example: - * @return Returns the Object response from the API call - * @throws ApiException Represents error response from the server. - * @throws IOException Signals that an I/O exception of some sort has occurred. - */ - public Object restapiV2GetObjectDependency( - final TspublicRestV2MetadataDependencyRequest body) throws ApiException, IOException { - return prepareRestapiV2GetObjectDependencyRequest(body).execute(); - } - - /** - * To query the details of dependent objects and associate objects as dependents, you can use - * this API. Dependency is defined as relation between referenced and referencing objects. A - * referencing object is said to have a dependency on a referenced object, if the referenced - * object cannot be deleted without first deleting the referencing object. For example, consider - * a worksheet 'W1' that has a derived logical column 'C1' that has a reference to a base - * logical column 'C2'. This can be shown diagramatically as: W1-->C1-->C2. W1 has a dependency - * on C2 i.e. W1 is a referencing object and C2 is a referenced object. It is not possible to - * delete C2 without first deleting W1 because deletion of C2 will be prevented by the - * relationship between W1's column C1 and C2. Similarly C1 is said to have a dependency on C2 - * i.e. C1 is a referencing object and C2 is a referenced object. It is not possible to delete - * C2 without first deleting C1. - * @param body Required parameter: Example: - * @return Returns the Object response from the API call - */ - public CompletableFuture restapiV2GetObjectDependencyAsync( - final TspublicRestV2MetadataDependencyRequest body) { - try { - return prepareRestapiV2GetObjectDependencyRequest(body).executeAsync(); - } catch (Exception e) { - throw new CompletionException(e); - } - } - - /** - * Builds the ApiCall object for restapiV2GetObjectDependency. - */ - private ApiCall prepareRestapiV2GetObjectDependencyRequest( - final TspublicRestV2MetadataDependencyRequest body) throws JsonProcessingException, IOException { - return new ApiCall.Builder() - .globalConfig(getGlobalConfiguration()) - .requestBuilder(requestBuilder -> requestBuilder - .server(Server.ENUM_DEFAULT.value()) - .path("/tspublic/rest/v2/metadata/dependency") - .bodyParam(param -> param.value(body)) - .bodySerializer(() -> ApiHelper.serialize(body)) - .headerParam(param -> param.key("Content-Type") - .value("application/json").isRequired(false)) - .headerParam(param -> param.key("accept").value("application/json")) - .authenticationKey(BaseController.AUTHENTICATION_KEY) - .httpMethod(HttpMethod.POST)) - .responseHandler(responseHandler -> responseHandler - .deserializer( - response -> response) - .nullify404(false) - .localErrorCase("500", - ErrorCase.create("Operation failed", - (reason, context) -> new ErrorResponseException(reason, context))) - .globalErrorCase(GLOBAL_ERROR_CASES)) - .endpointConfiguration(param -> param - .arraySerializationFormat(ArraySerializationFormat.PLAIN -)) - .build(); - } -} \ No newline at end of file diff --git a/Java/src/main/java/localhost/controllers/OrgController.java b/Java/src/main/java/localhost/controllers/OrgController.java deleted file mode 100644 index c8b8af94d..000000000 --- a/Java/src/main/java/localhost/controllers/OrgController.java +++ /dev/null @@ -1,355 +0,0 @@ -/* - * ThoughtSpotPublicRESTAPILib - * - * This file was automatically generated by APIMATIC v3.0 ( https://www.apimatic.io ). - */ - -package localhost.controllers; - -import com.fasterxml.jackson.core.JsonProcessingException; -import io.apimatic.core.ApiCall; -import io.apimatic.core.ErrorCase; -import io.apimatic.core.GlobalConfiguration; -import io.apimatic.coreinterfaces.http.request.ArraySerializationFormat; -import java.io.IOException; -import java.util.List; -import java.util.concurrent.CompletableFuture; -import java.util.concurrent.CompletionException; -import localhost.ApiHelper; -import localhost.Server; -import localhost.exceptions.ApiException; -import localhost.exceptions.ErrorResponseException; -import localhost.http.request.HttpMethod; -import localhost.models.OrgsResponse; -import localhost.models.TspublicRestV2OrgCreateRequest; -import localhost.models.TspublicRestV2OrgSearchRequest; -import localhost.models.TspublicRestV2OrgUpdateRequest; - -/** - * This class lists all the endpoints of the groups. - */ -public final class OrgController extends BaseController { - - /** - * Initializes the controller. - * @param globalConfig Configurations added in client. - */ - public OrgController(GlobalConfiguration globalConfig) { - super(globalConfig); - } - - /** - * To get the details of a specific organization by name or id, use this endpoint. At least one - * value needed. When both are given,then id will be considered to fetch organization - * information. Requires Administration privilege for tenant. - * @param name Optional parameter: Name of the organization. - * @param id Optional parameter: The ID of the organization. - * @return Returns the OrgsResponse response from the API call - * @throws ApiException Represents error response from the server. - * @throws IOException Signals that an I/O exception of some sort has occurred. - */ - public OrgsResponse restapiV2GetOrg( - final String name, - final Integer id) throws ApiException, IOException { - return prepareRestapiV2GetOrgRequest(name, id).execute(); - } - - /** - * To get the details of a specific organization by name or id, use this endpoint. At least one - * value needed. When both are given,then id will be considered to fetch organization - * information. Requires Administration privilege for tenant. - * @param name Optional parameter: Name of the organization. - * @param id Optional parameter: The ID of the organization. - * @return Returns the OrgsResponse response from the API call - */ - public CompletableFuture restapiV2GetOrgAsync( - final String name, - final Integer id) { - try { - return prepareRestapiV2GetOrgRequest(name, id).executeAsync(); - } catch (Exception e) { - throw new CompletionException(e); - } - } - - /** - * Builds the ApiCall object for restapiV2GetOrg. - */ - private ApiCall prepareRestapiV2GetOrgRequest( - final String name, - final Integer id) throws IOException { - return new ApiCall.Builder() - .globalConfig(getGlobalConfiguration()) - .requestBuilder(requestBuilder -> requestBuilder - .server(Server.ENUM_DEFAULT.value()) - .path("/tspublic/rest/v2/org") - .queryParam(param -> param.key("name") - .value(name).isRequired(false)) - .queryParam(param -> param.key("id") - .value(id).isRequired(false)) - .headerParam(param -> param.key("accept").value("application/json")) - .authenticationKey(BaseController.AUTHENTICATION_KEY) - .httpMethod(HttpMethod.GET)) - .responseHandler(responseHandler -> responseHandler - .deserializer( - response -> ApiHelper.deserialize(response, OrgsResponse.class)) - .nullify404(false) - .localErrorCase("500", - ErrorCase.create("Operation failed", - (reason, context) -> new ErrorResponseException(reason, context))) - .globalErrorCase(GLOBAL_ERROR_CASES)) - .endpointConfiguration(param -> param - .arraySerializationFormat(ArraySerializationFormat.PLAIN -)) - .build(); - } - - /** - * To programmatically create an organization in the ThoughtSpot system, use this API endpoint. - * Requires Administration privilege for tenant. - * @param body Required parameter: Example: - * @return Returns the OrgsResponse response from the API call - * @throws ApiException Represents error response from the server. - * @throws IOException Signals that an I/O exception of some sort has occurred. - */ - public OrgsResponse restapiV2CreateOrg( - final TspublicRestV2OrgCreateRequest body) throws ApiException, IOException { - return prepareRestapiV2CreateOrgRequest(body).execute(); - } - - /** - * To programmatically create an organization in the ThoughtSpot system, use this API endpoint. - * Requires Administration privilege for tenant. - * @param body Required parameter: Example: - * @return Returns the OrgsResponse response from the API call - */ - public CompletableFuture restapiV2CreateOrgAsync( - final TspublicRestV2OrgCreateRequest body) { - try { - return prepareRestapiV2CreateOrgRequest(body).executeAsync(); - } catch (Exception e) { - throw new CompletionException(e); - } - } - - /** - * Builds the ApiCall object for restapiV2CreateOrg. - */ - private ApiCall prepareRestapiV2CreateOrgRequest( - final TspublicRestV2OrgCreateRequest body) throws JsonProcessingException, IOException { - return new ApiCall.Builder() - .globalConfig(getGlobalConfiguration()) - .requestBuilder(requestBuilder -> requestBuilder - .server(Server.ENUM_DEFAULT.value()) - .path("/tspublic/rest/v2/org/create") - .bodyParam(param -> param.value(body)) - .bodySerializer(() -> ApiHelper.serialize(body)) - .headerParam(param -> param.key("Content-Type") - .value("application/json").isRequired(false)) - .headerParam(param -> param.key("accept").value("application/json")) - .authenticationKey(BaseController.AUTHENTICATION_KEY) - .httpMethod(HttpMethod.POST)) - .responseHandler(responseHandler -> responseHandler - .deserializer( - response -> ApiHelper.deserialize(response, OrgsResponse.class)) - .nullify404(false) - .localErrorCase("500", - ErrorCase.create("Operation failed", - (reason, context) -> new ErrorResponseException(reason, context))) - .globalErrorCase(GLOBAL_ERROR_CASES)) - .endpointConfiguration(param -> param - .arraySerializationFormat(ArraySerializationFormat.PLAIN -)) - .build(); - } - - /** - * You can use this endpoint to programmatically modify an existing org. Provide name or id of - * the organization to update the properties. When both id and name are given, then id will be - * considered and name of the organization will be updated. Requires Administration privilege - * for tenant. - * @param body Required parameter: Example: - * @return Returns the OrgsResponse response from the API call - * @throws ApiException Represents error response from the server. - * @throws IOException Signals that an I/O exception of some sort has occurred. - */ - public OrgsResponse restapiV2UpdateOrg( - final TspublicRestV2OrgUpdateRequest body) throws ApiException, IOException { - return prepareRestapiV2UpdateOrgRequest(body).execute(); - } - - /** - * You can use this endpoint to programmatically modify an existing org. Provide name or id of - * the organization to update the properties. When both id and name are given, then id will be - * considered and name of the organization will be updated. Requires Administration privilege - * for tenant. - * @param body Required parameter: Example: - * @return Returns the OrgsResponse response from the API call - */ - public CompletableFuture restapiV2UpdateOrgAsync( - final TspublicRestV2OrgUpdateRequest body) { - try { - return prepareRestapiV2UpdateOrgRequest(body).executeAsync(); - } catch (Exception e) { - throw new CompletionException(e); - } - } - - /** - * Builds the ApiCall object for restapiV2UpdateOrg. - */ - private ApiCall prepareRestapiV2UpdateOrgRequest( - final TspublicRestV2OrgUpdateRequest body) throws JsonProcessingException, IOException { - return new ApiCall.Builder() - .globalConfig(getGlobalConfiguration()) - .requestBuilder(requestBuilder -> requestBuilder - .server(Server.ENUM_DEFAULT.value()) - .path("/tspublic/rest/v2/org/update") - .bodyParam(param -> param.value(body)) - .bodySerializer(() -> ApiHelper.serialize(body)) - .headerParam(param -> param.key("Content-Type") - .value("application/json").isRequired(false)) - .headerParam(param -> param.key("accept").value("application/json")) - .authenticationKey(BaseController.AUTHENTICATION_KEY) - .httpMethod(HttpMethod.PUT)) - .responseHandler(responseHandler -> responseHandler - .deserializer( - response -> ApiHelper.deserialize(response, OrgsResponse.class)) - .nullify404(false) - .localErrorCase("500", - ErrorCase.create("Operation failed", - (reason, context) -> new ErrorResponseException(reason, context))) - .globalErrorCase(GLOBAL_ERROR_CASES)) - .endpointConfiguration(param -> param - .arraySerializationFormat(ArraySerializationFormat.PLAIN -)) - .build(); - } - - /** - * To remove an organization from the ThoughtSpot system, send a DELETE request to this - * endpoint. At least one value is needed. When both id and name are given, then id will be - * considered. Requires Administration privilege for tenant. - * @param name Optional parameter: Name of the organization. - * @param id Optional parameter: The ID of the organization. - * @return Returns the Boolean response from the API call - * @throws ApiException Represents error response from the server. - * @throws IOException Signals that an I/O exception of some sort has occurred. - */ - public Boolean restapiV2DeleteOrg( - final String name, - final Integer id) throws ApiException, IOException { - return prepareRestapiV2DeleteOrgRequest(name, id).execute(); - } - - /** - * To remove an organization from the ThoughtSpot system, send a DELETE request to this - * endpoint. At least one value is needed. When both id and name are given, then id will be - * considered. Requires Administration privilege for tenant. - * @param name Optional parameter: Name of the organization. - * @param id Optional parameter: The ID of the organization. - * @return Returns the Boolean response from the API call - */ - public CompletableFuture restapiV2DeleteOrgAsync( - final String name, - final Integer id) { - try { - return prepareRestapiV2DeleteOrgRequest(name, id).executeAsync(); - } catch (Exception e) { - throw new CompletionException(e); - } - } - - /** - * Builds the ApiCall object for restapiV2DeleteOrg. - */ - private ApiCall prepareRestapiV2DeleteOrgRequest( - final String name, - final Integer id) throws IOException { - return new ApiCall.Builder() - .globalConfig(getGlobalConfiguration()) - .requestBuilder(requestBuilder -> requestBuilder - .server(Server.ENUM_DEFAULT.value()) - .path("/tspublic/rest/v2/org/delete") - .queryParam(param -> param.key("name") - .value(name).isRequired(false)) - .queryParam(param -> param.key("id") - .value(id).isRequired(false)) - .authenticationKey(BaseController.AUTHENTICATION_KEY) - .httpMethod(HttpMethod.DELETE)) - .responseHandler(responseHandler -> responseHandler - .deserializer( - response -> Boolean.parseBoolean(response)) - .nullify404(false) - .localErrorCase("500", - ErrorCase.create("Operation failed", - (reason, context) -> new ErrorResponseException(reason, context))) - .globalErrorCase(GLOBAL_ERROR_CASES)) - .endpointConfiguration(param -> param - .arraySerializationFormat(ArraySerializationFormat.PLAIN -)) - .build(); - } - - /** - * To get the details of a specific organization or all organizations in the ThoughtSpot system - * use this end point. If no input is provided, then all organizations are included in the - * response. Requires Administration privilege for tenant. - * @param body Required parameter: Example: - * @return Returns the List of OrgsResponse response from the API call - * @throws ApiException Represents error response from the server. - * @throws IOException Signals that an I/O exception of some sort has occurred. - */ - public List restapiV2SearchOrgs( - final TspublicRestV2OrgSearchRequest body) throws ApiException, IOException { - return prepareRestapiV2SearchOrgsRequest(body).execute(); - } - - /** - * To get the details of a specific organization or all organizations in the ThoughtSpot system - * use this end point. If no input is provided, then all organizations are included in the - * response. Requires Administration privilege for tenant. - * @param body Required parameter: Example: - * @return Returns the List of OrgsResponse response from the API call - */ - public CompletableFuture> restapiV2SearchOrgsAsync( - final TspublicRestV2OrgSearchRequest body) { - try { - return prepareRestapiV2SearchOrgsRequest(body).executeAsync(); - } catch (Exception e) { - throw new CompletionException(e); - } - } - - /** - * Builds the ApiCall object for restapiV2SearchOrgs. - */ - private ApiCall, ApiException> prepareRestapiV2SearchOrgsRequest( - final TspublicRestV2OrgSearchRequest body) throws JsonProcessingException, IOException { - return new ApiCall.Builder, ApiException>() - .globalConfig(getGlobalConfiguration()) - .requestBuilder(requestBuilder -> requestBuilder - .server(Server.ENUM_DEFAULT.value()) - .path("/tspublic/rest/v2/org/search") - .bodyParam(param -> param.value(body)) - .bodySerializer(() -> ApiHelper.serialize(body)) - .headerParam(param -> param.key("Content-Type") - .value("application/json").isRequired(false)) - .headerParam(param -> param.key("accept").value("application/json")) - .authenticationKey(BaseController.AUTHENTICATION_KEY) - .httpMethod(HttpMethod.POST)) - .responseHandler(responseHandler -> responseHandler - .deserializer( - response -> ApiHelper.deserializeArray(response, - OrgsResponse[].class)) - .nullify404(false) - .localErrorCase("500", - ErrorCase.create("Operation failed", - (reason, context) -> new ErrorResponseException(reason, context))) - .globalErrorCase(GLOBAL_ERROR_CASES)) - .endpointConfiguration(param -> param - .arraySerializationFormat(ArraySerializationFormat.PLAIN -)) - .build(); - } -} \ No newline at end of file diff --git a/Java/src/main/java/localhost/controllers/ReportController.java b/Java/src/main/java/localhost/controllers/ReportController.java deleted file mode 100644 index 9c622191a..000000000 --- a/Java/src/main/java/localhost/controllers/ReportController.java +++ /dev/null @@ -1,238 +0,0 @@ -/* - * ThoughtSpotPublicRESTAPILib - * - * This file was automatically generated by APIMATIC v3.0 ( https://www.apimatic.io ). - */ - -package localhost.controllers; - -import io.apimatic.core.ApiCall; -import io.apimatic.core.ErrorCase; -import io.apimatic.core.GlobalConfiguration; -import io.apimatic.coreinterfaces.http.request.ArraySerializationFormat; -import java.io.IOException; -import java.util.List; -import java.util.concurrent.CompletableFuture; -import java.util.concurrent.CompletionException; -import localhost.ApiHelper; -import localhost.Server; -import localhost.exceptions.ApiException; -import localhost.exceptions.ErrorResponseException; -import localhost.http.request.HttpMethod; -import localhost.models.PdfOptionsInput; -import localhost.models.Type16Enum; - -/** - * This class lists all the endpoints of the groups. - */ -public final class ReportController extends BaseController { - - /** - * Initializes the controller. - * @param globalConfig Configurations added in client. - */ - public ReportController(GlobalConfiguration globalConfig) { - super(globalConfig); - } - - /** - * To programmatically download Answer data as a file, use this endpoint. The PDF will download - * data in the tabular format even if Answer is saved as chart. - * @param id Required parameter: GUID of the Answer to download. - * @param type Required parameter: Type of file to be generated. - * @return Returns the Object response from the API call - * @throws ApiException Represents error response from the server. - * @throws IOException Signals that an I/O exception of some sort has occurred. - */ - public Object restapiV2AnswerReport( - final String id, - final Type16Enum type) throws ApiException, IOException { - return prepareRestapiV2AnswerReportRequest(id, type).execute(); - } - - /** - * To programmatically download Answer data as a file, use this endpoint. The PDF will download - * data in the tabular format even if Answer is saved as chart. - * @param id Required parameter: GUID of the Answer to download. - * @param type Required parameter: Type of file to be generated. - * @return Returns the Object response from the API call - */ - public CompletableFuture restapiV2AnswerReportAsync( - final String id, - final Type16Enum type) { - try { - return prepareRestapiV2AnswerReportRequest(id, type).executeAsync(); - } catch (Exception e) { - throw new CompletionException(e); - } - } - - /** - * Builds the ApiCall object for restapiV2AnswerReport. - */ - private ApiCall prepareRestapiV2AnswerReportRequest( - final String id, - final Type16Enum type) throws IOException { - return new ApiCall.Builder() - .globalConfig(getGlobalConfiguration()) - .requestBuilder(requestBuilder -> requestBuilder - .server(Server.ENUM_DEFAULT.value()) - .path("/tspublic/rest/v2/report/answer") - .queryParam(param -> param.key("id") - .value(id)) - .queryParam(param -> param.key("type") - .value((type != null) ? type.value() : null)) - .headerParam(param -> param.key("accept").value("application/json")) - .authenticationKey(BaseController.AUTHENTICATION_KEY) - .httpMethod(HttpMethod.GET)) - .responseHandler(responseHandler -> responseHandler - .deserializer( - response -> response) - .nullify404(false) - .localErrorCase("500", - ErrorCase.create("Operation failed", - (reason, context) -> new ErrorResponseException(reason, context))) - .globalErrorCase(GLOBAL_ERROR_CASES)) - .endpointConfiguration(param -> param - .arraySerializationFormat(ArraySerializationFormat.PLAIN -)) - .build(); - } - - /** - * To programmatically download Liveboard data or specific Visualization data from Liveboard as - * a file, use this endpoint. - * @param type Required parameter: Type of file to be generated. Valid values: - * CSV/XLSX/PDF/PNG. - * @param id Optional parameter: GUID of the Liveboard to download. This field is considered - * only when no input is provided for transientContent field. - * @param vizId Optional parameter: JSON Array of GUIDs of the visualizations in the Liveboard - * to be included in the downloaded file. For CSV, XLSX and PNG file download, - * visualization id is mandatory. CSV and XLSX is valid only for visualization of type - * table and PNG is valid for charts. Only one value will be accepted for these formats. - * If multiple values are provided then first value in the array will be considered. - * @param transientContent Optional parameter: If you have embedded ThoughtSpot in your host - * application, and you want to download Liveboards with unsaved changes as a file, pass - * the transient content from the browser fetch request, using the - * getExportRequestForCurrentPinboard method. For more information, see - * https://developers.thoughtspot.com/docs/?pageid=liveboard-export-api#transient-pinboard. - * @param runtimeFilter Optional parameter: If you have embedded ThoughtSpot in your host - * application, and you want to download Liveboards with unsaved changes as a file, pass - * the transient content from the browser fetch request, using the - * getExportRequestForCurrentPinboard method. For more information, see - * https://developers.thoughtspot.com/docs/?pageid=liveboard-export-api#transient-pinboard - * . - * @param runtimeSort Optional parameter: JSON object which provides columns to sort the data - * at the time of data retrieval. Example: - * {"sortCol1":"region","asc1":true,"sortCol2":"date"} For more information, see - * https://developers.thoughtspot.com/docs/?pageid=runtime-filters - * @param pdfOptions Optional parameter: Additional options that are applicable for PDF type. - * @return Returns the Object response from the API call - * @throws ApiException Represents error response from the server. - * @throws IOException Signals that an I/O exception of some sort has occurred. - */ - public Object restapiV2LiveboardReport( - final Type16Enum type, - final String id, - final List vizId, - final String transientContent, - final String runtimeFilter, - final String runtimeSort, - final PdfOptionsInput pdfOptions) throws ApiException, IOException { - return prepareRestapiV2LiveboardReportRequest(type, id, vizId, transientContent, - runtimeFilter, runtimeSort, pdfOptions).execute(); - } - - /** - * To programmatically download Liveboard data or specific Visualization data from Liveboard as - * a file, use this endpoint. - * @param type Required parameter: Type of file to be generated. Valid values: - * CSV/XLSX/PDF/PNG. - * @param id Optional parameter: GUID of the Liveboard to download. This field is considered - * only when no input is provided for transientContent field. - * @param vizId Optional parameter: JSON Array of GUIDs of the visualizations in the Liveboard - * to be included in the downloaded file. For CSV, XLSX and PNG file download, - * visualization id is mandatory. CSV and XLSX is valid only for visualization of type - * table and PNG is valid for charts. Only one value will be accepted for these formats. - * If multiple values are provided then first value in the array will be considered. - * @param transientContent Optional parameter: If you have embedded ThoughtSpot in your host - * application, and you want to download Liveboards with unsaved changes as a file, pass - * the transient content from the browser fetch request, using the - * getExportRequestForCurrentPinboard method. For more information, see - * https://developers.thoughtspot.com/docs/?pageid=liveboard-export-api#transient-pinboard. - * @param runtimeFilter Optional parameter: If you have embedded ThoughtSpot in your host - * application, and you want to download Liveboards with unsaved changes as a file, pass - * the transient content from the browser fetch request, using the - * getExportRequestForCurrentPinboard method. For more information, see - * https://developers.thoughtspot.com/docs/?pageid=liveboard-export-api#transient-pinboard - * . - * @param runtimeSort Optional parameter: JSON object which provides columns to sort the data - * at the time of data retrieval. Example: - * {"sortCol1":"region","asc1":true,"sortCol2":"date"} For more information, see - * https://developers.thoughtspot.com/docs/?pageid=runtime-filters - * @param pdfOptions Optional parameter: Additional options that are applicable for PDF type. - * @return Returns the Object response from the API call - */ - public CompletableFuture restapiV2LiveboardReportAsync( - final Type16Enum type, - final String id, - final List vizId, - final String transientContent, - final String runtimeFilter, - final String runtimeSort, - final PdfOptionsInput pdfOptions) { - try { - return prepareRestapiV2LiveboardReportRequest(type, id, vizId, transientContent, runtimeFilter, - runtimeSort, pdfOptions).executeAsync(); - } catch (Exception e) { - throw new CompletionException(e); - } - } - - /** - * Builds the ApiCall object for restapiV2LiveboardReport. - */ - private ApiCall prepareRestapiV2LiveboardReportRequest( - final Type16Enum type, - final String id, - final List vizId, - final String transientContent, - final String runtimeFilter, - final String runtimeSort, - final PdfOptionsInput pdfOptions) throws IOException { - return new ApiCall.Builder() - .globalConfig(getGlobalConfiguration()) - .requestBuilder(requestBuilder -> requestBuilder - .server(Server.ENUM_DEFAULT.value()) - .path("/tspublic/rest/v2/report/liveboard") - .queryParam(param -> param.key("type") - .value((type != null) ? type.value() : null)) - .queryParam(param -> param.key("id") - .value(id).isRequired(false)) - .queryParam(param -> param.key("vizId") - .value(vizId).isRequired(false)) - .queryParam(param -> param.key("transientContent") - .value(transientContent).isRequired(false)) - .queryParam(param -> param.key("runtimeFilter") - .value(runtimeFilter).isRequired(false)) - .queryParam(param -> param.key("runtimeSort") - .value(runtimeSort).isRequired(false)) - .queryParam(param -> param.key("pdfOptions") - .value(pdfOptions).isRequired(false)) - .headerParam(param -> param.key("accept").value("application/json")) - .authenticationKey(BaseController.AUTHENTICATION_KEY) - .httpMethod(HttpMethod.GET)) - .responseHandler(responseHandler -> responseHandler - .deserializer( - response -> response) - .nullify404(false) - .localErrorCase("500", - ErrorCase.create("Operation failed", - (reason, context) -> new ErrorResponseException(reason, context))) - .globalErrorCase(GLOBAL_ERROR_CASES)) - .endpointConfiguration(param -> param - .arraySerializationFormat(ArraySerializationFormat.PLAIN -)) - .build(); - } -} \ No newline at end of file diff --git a/Java/src/main/java/localhost/controllers/SecurityController.java b/Java/src/main/java/localhost/controllers/SecurityController.java deleted file mode 100644 index 33b00aea6..000000000 --- a/Java/src/main/java/localhost/controllers/SecurityController.java +++ /dev/null @@ -1,456 +0,0 @@ -/* - * ThoughtSpotPublicRESTAPILib - * - * This file was automatically generated by APIMATIC v3.0 ( https://www.apimatic.io ). - */ - -package localhost.controllers; - -import com.fasterxml.jackson.core.JsonProcessingException; -import io.apimatic.core.ApiCall; -import io.apimatic.core.ErrorCase; -import io.apimatic.core.GlobalConfiguration; -import io.apimatic.coreinterfaces.http.request.ArraySerializationFormat; -import java.io.IOException; -import java.util.List; -import java.util.concurrent.CompletableFuture; -import java.util.concurrent.CompletionException; -import localhost.ApiHelper; -import localhost.Server; -import localhost.exceptions.ApiException; -import localhost.exceptions.ErrorResponseException; -import localhost.http.request.HttpMethod; -import localhost.models.PrincipalSearchResponse; -import localhost.models.SecurityPermissionResponse; -import localhost.models.TspublicRestV2SecurityPermissionPrincipalSearchRequest; -import localhost.models.TspublicRestV2SecurityPermissionTsobjectSearchRequest; -import localhost.models.TspublicRestV2SecurityShareTsobjectRequest; -import localhost.models.TspublicRestV2SecurityShareVisualizationRequest; -import localhost.models.Type7Enum; - -/** - * This class lists all the endpoints of the groups. - */ -public final class SecurityController extends BaseController { - - /** - * Initializes the controller. - * @param globalConfig Configurations added in client. - */ - public SecurityController(GlobalConfiguration globalConfig) { - super(globalConfig); - } - - /** - * To list the permissions for user and user groups on an object, use this endpoint. The - * response will include only those users and groups with have either VIEW OR MODIFY permission. - * You can optionally see the permission on the dependent objects as well by enabling - * includeDependent field. - * @param id Required parameter: GUID of the metadata object for which the permission needs to - * be obtained. - * @param type Required parameter: Type of metadata object. Valid values: - * Liveboard|Answer|DataObject|Column - * @param includeDependent Optional parameter: When this field is set to true, the API returns - * the permission details for the dependent objects for the the object included in the - * request - * @return Returns the SecurityPermissionResponse response from the API call - * @throws ApiException Represents error response from the server. - * @throws IOException Signals that an I/O exception of some sort has occurred. - */ - public SecurityPermissionResponse restapiV2GetPermissionOnObject( - final String id, - final Type7Enum type, - final Boolean includeDependent) throws ApiException, IOException { - return prepareRestapiV2GetPermissionOnObjectRequest(id, type, includeDependent).execute(); - } - - /** - * To list the permissions for user and user groups on an object, use this endpoint. The - * response will include only those users and groups with have either VIEW OR MODIFY permission. - * You can optionally see the permission on the dependent objects as well by enabling - * includeDependent field. - * @param id Required parameter: GUID of the metadata object for which the permission needs to - * be obtained. - * @param type Required parameter: Type of metadata object. Valid values: - * Liveboard|Answer|DataObject|Column - * @param includeDependent Optional parameter: When this field is set to true, the API returns - * the permission details for the dependent objects for the the object included in the - * request - * @return Returns the SecurityPermissionResponse response from the API call - */ - public CompletableFuture restapiV2GetPermissionOnObjectAsync( - final String id, - final Type7Enum type, - final Boolean includeDependent) { - try { - return prepareRestapiV2GetPermissionOnObjectRequest(id, type, includeDependent).executeAsync(); - } catch (Exception e) { - throw new CompletionException(e); - } - } - - /** - * Builds the ApiCall object for restapiV2GetPermissionOnObject. - */ - private ApiCall prepareRestapiV2GetPermissionOnObjectRequest( - final String id, - final Type7Enum type, - final Boolean includeDependent) throws IOException { - return new ApiCall.Builder() - .globalConfig(getGlobalConfiguration()) - .requestBuilder(requestBuilder -> requestBuilder - .server(Server.ENUM_DEFAULT.value()) - .path("/tspublic/rest/v2/security/permission/tsobject") - .queryParam(param -> param.key("id") - .value(id)) - .queryParam(param -> param.key("type") - .value((type != null) ? type.value() : null)) - .queryParam(param -> param.key("includeDependent") - .value(includeDependent).isRequired(false)) - .headerParam(param -> param.key("accept").value("application/json")) - .authenticationKey(BaseController.AUTHENTICATION_KEY) - .httpMethod(HttpMethod.GET)) - .responseHandler(responseHandler -> responseHandler - .deserializer( - response -> ApiHelper.deserialize(response, SecurityPermissionResponse.class)) - .nullify404(false) - .localErrorCase("500", - ErrorCase.create("Operation failed", - (reason, context) -> new ErrorResponseException(reason, context))) - .globalErrorCase(GLOBAL_ERROR_CASES)) - .endpointConfiguration(param -> param - .arraySerializationFormat(ArraySerializationFormat.PLAIN -)) - .build(); - } - - /** - * Use this endpoint to list the objects on which a user or user group has permission. The - * response will include only those objects on which the user or user group has either VIEW OR - * MODIFY permission. Requires administration privilege. - * @param id Optional parameter: GUID of the user or user group for which the object - * permission needs to be obtained - * @param name Optional parameter: Name of the ser or user group for which the object - * permission needs to be obtained - * @return Returns the PrincipalSearchResponse response from the API call - * @throws ApiException Represents error response from the server. - * @throws IOException Signals that an I/O exception of some sort has occurred. - */ - public PrincipalSearchResponse restapiV2GetPermissionForPrincipal( - final String id, - final String name) throws ApiException, IOException { - return prepareRestapiV2GetPermissionForPrincipalRequest(id, name).execute(); - } - - /** - * Use this endpoint to list the objects on which a user or user group has permission. The - * response will include only those objects on which the user or user group has either VIEW OR - * MODIFY permission. Requires administration privilege. - * @param id Optional parameter: GUID of the user or user group for which the object - * permission needs to be obtained - * @param name Optional parameter: Name of the ser or user group for which the object - * permission needs to be obtained - * @return Returns the PrincipalSearchResponse response from the API call - */ - public CompletableFuture restapiV2GetPermissionForPrincipalAsync( - final String id, - final String name) { - try { - return prepareRestapiV2GetPermissionForPrincipalRequest(id, name).executeAsync(); - } catch (Exception e) { - throw new CompletionException(e); - } - } - - /** - * Builds the ApiCall object for restapiV2GetPermissionForPrincipal. - */ - private ApiCall prepareRestapiV2GetPermissionForPrincipalRequest( - final String id, - final String name) throws IOException { - return new ApiCall.Builder() - .globalConfig(getGlobalConfiguration()) - .requestBuilder(requestBuilder -> requestBuilder - .server(Server.ENUM_DEFAULT.value()) - .path("/tspublic/rest/v2/security/permission/principal") - .queryParam(param -> param.key("id") - .value(id).isRequired(false)) - .queryParam(param -> param.key("name") - .value(name).isRequired(false)) - .headerParam(param -> param.key("accept").value("application/json")) - .authenticationKey(BaseController.AUTHENTICATION_KEY) - .httpMethod(HttpMethod.GET)) - .responseHandler(responseHandler -> responseHandler - .deserializer( - response -> ApiHelper.deserialize(response, PrincipalSearchResponse.class)) - .nullify404(false) - .localErrorCase("500", - ErrorCase.create("Operation failed", - (reason, context) -> new ErrorResponseException(reason, context))) - .globalErrorCase(GLOBAL_ERROR_CASES)) - .endpointConfiguration(param -> param - .arraySerializationFormat(ArraySerializationFormat.PLAIN -)) - .build(); - } - - /** - * To programmatically share ThoughtSpot objects with another user or user group, use this - * endpoint. When you share an object like a Liveboard or visualization, a notification with a - * live link is sent to the user. When the users access this object, they can view the last - * saved version of the object. - * @param body Required parameter: Example: - * @return Returns the Boolean response from the API call - * @throws ApiException Represents error response from the server. - * @throws IOException Signals that an I/O exception of some sort has occurred. - */ - public Boolean restapiV2ShareObject( - final TspublicRestV2SecurityShareTsobjectRequest body) throws ApiException, IOException { - return prepareRestapiV2ShareObjectRequest(body).execute(); - } - - /** - * To programmatically share ThoughtSpot objects with another user or user group, use this - * endpoint. When you share an object like a Liveboard or visualization, a notification with a - * live link is sent to the user. When the users access this object, they can view the last - * saved version of the object. - * @param body Required parameter: Example: - * @return Returns the Boolean response from the API call - */ - public CompletableFuture restapiV2ShareObjectAsync( - final TspublicRestV2SecurityShareTsobjectRequest body) { - try { - return prepareRestapiV2ShareObjectRequest(body).executeAsync(); - } catch (Exception e) { - throw new CompletionException(e); - } - } - - /** - * Builds the ApiCall object for restapiV2ShareObject. - */ - private ApiCall prepareRestapiV2ShareObjectRequest( - final TspublicRestV2SecurityShareTsobjectRequest body) throws JsonProcessingException, IOException { - return new ApiCall.Builder() - .globalConfig(getGlobalConfiguration()) - .requestBuilder(requestBuilder -> requestBuilder - .server(Server.ENUM_DEFAULT.value()) - .path("/tspublic/rest/v2/security/share/tsobject") - .bodyParam(param -> param.value(body)) - .bodySerializer(() -> ApiHelper.serialize(body)) - .headerParam(param -> param.key("Content-Type") - .value("application/json").isRequired(false)) - .authenticationKey(BaseController.AUTHENTICATION_KEY) - .httpMethod(HttpMethod.POST)) - .responseHandler(responseHandler -> responseHandler - .deserializer( - response -> Boolean.parseBoolean(response)) - .nullify404(false) - .localErrorCase("500", - ErrorCase.create("Operation failed", - (reason, context) -> new ErrorResponseException(reason, context))) - .globalErrorCase(GLOBAL_ERROR_CASES)) - .endpointConfiguration(param -> param - .arraySerializationFormat(ArraySerializationFormat.PLAIN -)) - .build(); - } - - /** - * If you want to share a specific visualization from a Liveboard with another user or user - * group, then use this endpoint. Requires privilege to share the visualization. - * @param body Required parameter: Example: - * @return Returns the Boolean response from the API call - * @throws ApiException Represents error response from the server. - * @throws IOException Signals that an I/O exception of some sort has occurred. - */ - public Boolean restapiV2ShareVisualization( - final TspublicRestV2SecurityShareVisualizationRequest body) throws ApiException, IOException { - return prepareRestapiV2ShareVisualizationRequest(body).execute(); - } - - /** - * If you want to share a specific visualization from a Liveboard with another user or user - * group, then use this endpoint. Requires privilege to share the visualization. - * @param body Required parameter: Example: - * @return Returns the Boolean response from the API call - */ - public CompletableFuture restapiV2ShareVisualizationAsync( - final TspublicRestV2SecurityShareVisualizationRequest body) { - try { - return prepareRestapiV2ShareVisualizationRequest(body).executeAsync(); - } catch (Exception e) { - throw new CompletionException(e); - } - } - - /** - * Builds the ApiCall object for restapiV2ShareVisualization. - */ - private ApiCall prepareRestapiV2ShareVisualizationRequest( - final TspublicRestV2SecurityShareVisualizationRequest body) throws JsonProcessingException, IOException { - return new ApiCall.Builder() - .globalConfig(getGlobalConfiguration()) - .requestBuilder(requestBuilder -> requestBuilder - .server(Server.ENUM_DEFAULT.value()) - .path("/tspublic/rest/v2/security/share/visualization") - .bodyParam(param -> param.value(body)) - .bodySerializer(() -> ApiHelper.serialize(body)) - .headerParam(param -> param.key("Content-Type") - .value("application/json").isRequired(false)) - .authenticationKey(BaseController.AUTHENTICATION_KEY) - .httpMethod(HttpMethod.POST)) - .responseHandler(responseHandler -> responseHandler - .deserializer( - response -> Boolean.parseBoolean(response)) - .nullify404(false) - .localErrorCase("500", - ErrorCase.create("Operation failed", - (reason, context) -> new ErrorResponseException(reason, context))) - .globalErrorCase(GLOBAL_ERROR_CASES)) - .endpointConfiguration(param -> param - .arraySerializationFormat(ArraySerializationFormat.PLAIN -)) - .build(); - } - - /** - * To list the permissions for user and user groups on a list of objects, use this endpoint. The - * response will include only those users and groups with have either VIEW OR MODIFY permission. - * You can either provide list of object ids or type of objects to list the permissions for. One - * of these inputs is mandatory. If both are provided then only object ids will be considred. - * You can optionally provide users or user groups for which the persmission needs to be - * displayed. You can optionally see the permission on the dependent objects as well by enabling - * includeDependent field. Requires administration privilege. - * @param body Required parameter: Example: - * @return Returns the List of SecurityPermissionResponse response from the API call - * @throws ApiException Represents error response from the server. - * @throws IOException Signals that an I/O exception of some sort has occurred. - */ - public List restapiV2SearchPermissionOnObjects( - final TspublicRestV2SecurityPermissionTsobjectSearchRequest body) throws ApiException, IOException { - return prepareRestapiV2SearchPermissionOnObjectsRequest(body).execute(); - } - - /** - * To list the permissions for user and user groups on a list of objects, use this endpoint. The - * response will include only those users and groups with have either VIEW OR MODIFY permission. - * You can either provide list of object ids or type of objects to list the permissions for. One - * of these inputs is mandatory. If both are provided then only object ids will be considred. - * You can optionally provide users or user groups for which the persmission needs to be - * displayed. You can optionally see the permission on the dependent objects as well by enabling - * includeDependent field. Requires administration privilege. - * @param body Required parameter: Example: - * @return Returns the List of SecurityPermissionResponse response from the API call - */ - public CompletableFuture> restapiV2SearchPermissionOnObjectsAsync( - final TspublicRestV2SecurityPermissionTsobjectSearchRequest body) { - try { - return prepareRestapiV2SearchPermissionOnObjectsRequest(body).executeAsync(); - } catch (Exception e) { - throw new CompletionException(e); - } - } - - /** - * Builds the ApiCall object for restapiV2SearchPermissionOnObjects. - */ - private ApiCall, ApiException> prepareRestapiV2SearchPermissionOnObjectsRequest( - final TspublicRestV2SecurityPermissionTsobjectSearchRequest body) throws JsonProcessingException, IOException { - return new ApiCall.Builder, ApiException>() - .globalConfig(getGlobalConfiguration()) - .requestBuilder(requestBuilder -> requestBuilder - .server(Server.ENUM_DEFAULT.value()) - .path("/tspublic/rest/v2/security/permission/tsobject/search") - .bodyParam(param -> param.value(body)) - .bodySerializer(() -> ApiHelper.serialize(body)) - .headerParam(param -> param.key("Content-Type") - .value("application/json").isRequired(false)) - .headerParam(param -> param.key("accept").value("application/json")) - .authenticationKey(BaseController.AUTHENTICATION_KEY) - .httpMethod(HttpMethod.POST)) - .responseHandler(responseHandler -> responseHandler - .deserializer( - response -> ApiHelper.deserializeArray(response, - SecurityPermissionResponse[].class)) - .nullify404(false) - .localErrorCase("500", - ErrorCase.create("Operation failed", - (reason, context) -> new ErrorResponseException(reason, context))) - .globalErrorCase(GLOBAL_ERROR_CASES)) - .endpointConfiguration(param -> param - .arraySerializationFormat(ArraySerializationFormat.PLAIN -)) - .build(); - } - - /** - * To list the permissions for user and user groups on a list of objects, use this endpoint. The - * response will include only those users and groups with have either VIEW OR MODIFY permission. - * You can either provide list of object ids or type of objects to list the permissions for. One - * of these inputs is mandatory. If both are provided then only object ids will be considred. - * You can optionally provide users or user groups for which the persmission needs to be - * displayed. You can optionally see the permission on the dependent objects as well by enabling - * includeDependent field. Requires administration privilege. - * @param body Required parameter: Example: - * @return Returns the List of PrincipalSearchResponse response from the API call - * @throws ApiException Represents error response from the server. - * @throws IOException Signals that an I/O exception of some sort has occurred. - */ - public List restapiV2SearchPermissionForPrincipals( - final TspublicRestV2SecurityPermissionPrincipalSearchRequest body) throws ApiException, IOException { - return prepareRestapiV2SearchPermissionForPrincipalsRequest(body).execute(); - } - - /** - * To list the permissions for user and user groups on a list of objects, use this endpoint. The - * response will include only those users and groups with have either VIEW OR MODIFY permission. - * You can either provide list of object ids or type of objects to list the permissions for. One - * of these inputs is mandatory. If both are provided then only object ids will be considred. - * You can optionally provide users or user groups for which the persmission needs to be - * displayed. You can optionally see the permission on the dependent objects as well by enabling - * includeDependent field. Requires administration privilege. - * @param body Required parameter: Example: - * @return Returns the List of PrincipalSearchResponse response from the API call - */ - public CompletableFuture> restapiV2SearchPermissionForPrincipalsAsync( - final TspublicRestV2SecurityPermissionPrincipalSearchRequest body) { - try { - return prepareRestapiV2SearchPermissionForPrincipalsRequest(body).executeAsync(); - } catch (Exception e) { - throw new CompletionException(e); - } - } - - /** - * Builds the ApiCall object for restapiV2SearchPermissionForPrincipals. - */ - private ApiCall, ApiException> prepareRestapiV2SearchPermissionForPrincipalsRequest( - final TspublicRestV2SecurityPermissionPrincipalSearchRequest body) throws JsonProcessingException, IOException { - return new ApiCall.Builder, ApiException>() - .globalConfig(getGlobalConfiguration()) - .requestBuilder(requestBuilder -> requestBuilder - .server(Server.ENUM_DEFAULT.value()) - .path("/tspublic/rest/v2/security/permission/principal/search") - .bodyParam(param -> param.value(body)) - .bodySerializer(() -> ApiHelper.serialize(body)) - .headerParam(param -> param.key("Content-Type") - .value("application/json").isRequired(false)) - .headerParam(param -> param.key("accept").value("application/json")) - .authenticationKey(BaseController.AUTHENTICATION_KEY) - .httpMethod(HttpMethod.POST)) - .responseHandler(responseHandler -> responseHandler - .deserializer( - response -> ApiHelper.deserializeArray(response, - PrincipalSearchResponse[].class)) - .nullify404(false) - .localErrorCase("500", - ErrorCase.create("Operation failed", - (reason, context) -> new ErrorResponseException(reason, context))) - .globalErrorCase(GLOBAL_ERROR_CASES)) - .endpointConfiguration(param -> param - .arraySerializationFormat(ArraySerializationFormat.PLAIN -)) - .build(); - } -} \ No newline at end of file diff --git a/Java/src/main/java/localhost/controllers/SessionController.java b/Java/src/main/java/localhost/controllers/SessionController.java deleted file mode 100644 index 49a454a58..000000000 --- a/Java/src/main/java/localhost/controllers/SessionController.java +++ /dev/null @@ -1,240 +0,0 @@ -/* - * ThoughtSpotPublicRESTAPILib - * - * This file was automatically generated by APIMATIC v3.0 ( https://www.apimatic.io ). - */ - -package localhost.controllers; - -import io.apimatic.core.ApiCall; -import io.apimatic.core.ErrorCase; -import io.apimatic.core.GlobalConfiguration; -import io.apimatic.coreinterfaces.http.request.ArraySerializationFormat; -import java.io.IOException; -import java.util.concurrent.CompletableFuture; -import java.util.concurrent.CompletionException; -import localhost.ApiHelper; -import localhost.Server; -import localhost.exceptions.ApiException; -import localhost.exceptions.ErrorResponseException; -import localhost.http.request.HttpMethod; -import localhost.models.AccessLevelEnum; -import localhost.models.SessionLoginResponse; - -/** - * This class lists all the endpoints of the groups. - */ -public final class SessionController extends BaseController { - - /** - * Initializes the controller. - * @param globalConfig Configurations added in client. - */ - public SessionController(GlobalConfiguration globalConfig) { - super(globalConfig); - } - - /** - * You can programmatically create login session for a user in ThoughtSpot using this endpoint. - * You can create session by either providing userName and password as inputs in this request - * body or by including "Authorization" header with the token generated through the endpoint - * /tspublic/rest/v2/session/gettoken. userName and password input is given precedence over - * "Authorization" header, when both are included in the request. - * @param userName Optional parameter: Username of the user account - * @param password Optional parameter: The password of the user account - * @param rememberMe Optional parameter: A flag to remember the user session. When set to - * true, sets a session cookie that persists in subsequent API calls. - * @return Returns the SessionLoginResponse response from the API call - * @throws ApiException Represents error response from the server. - * @throws IOException Signals that an I/O exception of some sort has occurred. - */ - public SessionLoginResponse restapiV2Login( - final String userName, - final String password, - final Boolean rememberMe) throws ApiException, IOException { - return prepareRestapiV2LoginRequest(userName, password, rememberMe).execute(); - } - - /** - * You can programmatically create login session for a user in ThoughtSpot using this endpoint. - * You can create session by either providing userName and password as inputs in this request - * body or by including "Authorization" header with the token generated through the endpoint - * /tspublic/rest/v2/session/gettoken. userName and password input is given precedence over - * "Authorization" header, when both are included in the request. - * @param userName Optional parameter: Username of the user account - * @param password Optional parameter: The password of the user account - * @param rememberMe Optional parameter: A flag to remember the user session. When set to - * true, sets a session cookie that persists in subsequent API calls. - * @return Returns the SessionLoginResponse response from the API call - */ - public CompletableFuture restapiV2LoginAsync( - final String userName, - final String password, - final Boolean rememberMe) { - try { - return prepareRestapiV2LoginRequest(userName, password, rememberMe).executeAsync(); - } catch (Exception e) { - throw new CompletionException(e); - } - } - - /** - * Builds the ApiCall object for restapiV2Login. - */ - private ApiCall prepareRestapiV2LoginRequest( - final String userName, - final String password, - final Boolean rememberMe) throws IOException { - return new ApiCall.Builder() - .globalConfig(getGlobalConfiguration()) - .requestBuilder(requestBuilder -> requestBuilder - .server(Server.ENUM_DEFAULT.value()) - .path("/tspublic/rest/v2/session/login") - .queryParam(param -> param.key("userName") - .value(userName).isRequired(false)) - .queryParam(param -> param.key("password") - .value(password).isRequired(false)) - .queryParam(param -> param.key("rememberMe") - .value(rememberMe).isRequired(false)) - .headerParam(param -> param.key("accept").value("application/json")) - .authenticationKey(BaseController.AUTHENTICATION_KEY) - .httpMethod(HttpMethod.GET)) - .responseHandler(responseHandler -> responseHandler - .deserializer( - response -> ApiHelper.deserialize(response, SessionLoginResponse.class)) - .nullify404(false) - .localErrorCase("500", - ErrorCase.create("Operation failed", - (reason, context) -> new ErrorResponseException(reason, context))) - .globalErrorCase(GLOBAL_ERROR_CASES)) - .endpointConfiguration(param -> param - .arraySerializationFormat(ArraySerializationFormat.PLAIN -)) - .build(); - } - - /** - * To programmatically create session token for a user in ThoughtSpot, use this endpoint. You - * can generate the token for a user by providing password or secret key from the cluster. You - * need to enable trusted authentication to generate secret key. To generate secret key, follow - * below steps. 1. Click the Develop tab. 2. Under Customizations, click Settings. 3. To enable - * trusted authentication, turn on the toggle. 4. A secret_key for trusted authentication is - * generated. 5. Click the clipboard icon to copy the token. Password is given precedence over - * secretKey input, when both are included in the request. - * @param userName Required parameter: Username of the user account - * @param password Optional parameter: The password of the user account - * @param secretKey Optional parameter: The secret key string provided by the ThoughtSpot - * application server. ThoughtSpot generates this secret key when you enable trusted - * authentication. - * @param accessLevel Optional parameter: User access privilege. FULL - Creates a session with - * full access. REPORT_BOOK_VIEW - Allow view access to the specified visualizations. - * @param tsObjectId Optional parameter: GUID of the ThoughtSpot object. If you have set the - * accessLevel attribute to REPORT_BOOK_VIEW, specify the GUID of the Liveboard or - * visualization object. - * @param tokenExpiryDuration Optional parameter: Duration in seconds after which the token - * expires - * @param orgId Optional parameter: Id of the organization to be associated with the user - * login. If no input is provided then last logged in organization will be considered - * @return Returns the SessionLoginResponse response from the API call - * @throws ApiException Represents error response from the server. - * @throws IOException Signals that an I/O exception of some sort has occurred. - */ - public SessionLoginResponse restapiV2GetToken( - final String userName, - final String password, - final String secretKey, - final AccessLevelEnum accessLevel, - final String tsObjectId, - final String tokenExpiryDuration, - final String orgId) throws ApiException, IOException { - return prepareRestapiV2GetTokenRequest(userName, password, secretKey, accessLevel, - tsObjectId, tokenExpiryDuration, orgId).execute(); - } - - /** - * To programmatically create session token for a user in ThoughtSpot, use this endpoint. You - * can generate the token for a user by providing password or secret key from the cluster. You - * need to enable trusted authentication to generate secret key. To generate secret key, follow - * below steps. 1. Click the Develop tab. 2. Under Customizations, click Settings. 3. To enable - * trusted authentication, turn on the toggle. 4. A secret_key for trusted authentication is - * generated. 5. Click the clipboard icon to copy the token. Password is given precedence over - * secretKey input, when both are included in the request. - * @param userName Required parameter: Username of the user account - * @param password Optional parameter: The password of the user account - * @param secretKey Optional parameter: The secret key string provided by the ThoughtSpot - * application server. ThoughtSpot generates this secret key when you enable trusted - * authentication. - * @param accessLevel Optional parameter: User access privilege. FULL - Creates a session with - * full access. REPORT_BOOK_VIEW - Allow view access to the specified visualizations. - * @param tsObjectId Optional parameter: GUID of the ThoughtSpot object. If you have set the - * accessLevel attribute to REPORT_BOOK_VIEW, specify the GUID of the Liveboard or - * visualization object. - * @param tokenExpiryDuration Optional parameter: Duration in seconds after which the token - * expires - * @param orgId Optional parameter: Id of the organization to be associated with the user - * login. If no input is provided then last logged in organization will be considered - * @return Returns the SessionLoginResponse response from the API call - */ - public CompletableFuture restapiV2GetTokenAsync( - final String userName, - final String password, - final String secretKey, - final AccessLevelEnum accessLevel, - final String tsObjectId, - final String tokenExpiryDuration, - final String orgId) { - try { - return prepareRestapiV2GetTokenRequest(userName, password, secretKey, accessLevel, tsObjectId, - tokenExpiryDuration, orgId).executeAsync(); - } catch (Exception e) { - throw new CompletionException(e); - } - } - - /** - * Builds the ApiCall object for restapiV2GetToken. - */ - private ApiCall prepareRestapiV2GetTokenRequest( - final String userName, - final String password, - final String secretKey, - final AccessLevelEnum accessLevel, - final String tsObjectId, - final String tokenExpiryDuration, - final String orgId) throws IOException { - return new ApiCall.Builder() - .globalConfig(getGlobalConfiguration()) - .requestBuilder(requestBuilder -> requestBuilder - .server(Server.ENUM_DEFAULT.value()) - .path("/tspublic/rest/v2/session/gettoken") - .queryParam(param -> param.key("userName") - .value(userName)) - .queryParam(param -> param.key("password") - .value(password).isRequired(false)) - .queryParam(param -> param.key("secretKey") - .value(secretKey).isRequired(false)) - .queryParam(param -> param.key("accessLevel") - .value((accessLevel != null) ? accessLevel.value() : null).isRequired(false)) - .queryParam(param -> param.key("tsObjectId") - .value(tsObjectId).isRequired(false)) - .queryParam(param -> param.key("tokenExpiryDuration") - .value(tokenExpiryDuration).isRequired(false)) - .queryParam(param -> param.key("orgId") - .value(orgId).isRequired(false)) - .headerParam(param -> param.key("accept").value("application/json")) - .authenticationKey(BaseController.AUTHENTICATION_KEY) - .httpMethod(HttpMethod.GET)) - .responseHandler(responseHandler -> responseHandler - .deserializer( - response -> ApiHelper.deserialize(response, SessionLoginResponse.class)) - .nullify404(false) - .localErrorCase("500", - ErrorCase.create("Operation failed", - (reason, context) -> new ErrorResponseException(reason, context))) - .globalErrorCase(GLOBAL_ERROR_CASES)) - .endpointConfiguration(param -> param - .arraySerializationFormat(ArraySerializationFormat.PLAIN -)) - .build(); - } -} \ No newline at end of file diff --git a/Java/src/main/java/localhost/controllers/UserController.java b/Java/src/main/java/localhost/controllers/UserController.java deleted file mode 100644 index fb781c5eb..000000000 --- a/Java/src/main/java/localhost/controllers/UserController.java +++ /dev/null @@ -1,712 +0,0 @@ -/* - * ThoughtSpotPublicRESTAPILib - * - * This file was automatically generated by APIMATIC v3.0 ( https://www.apimatic.io ). - */ - -package localhost.controllers; - -import com.fasterxml.jackson.core.JsonProcessingException; -import io.apimatic.core.ApiCall; -import io.apimatic.core.ErrorCase; -import io.apimatic.core.GlobalConfiguration; -import io.apimatic.coreinterfaces.http.request.ArraySerializationFormat; -import java.io.IOException; -import java.util.List; -import java.util.concurrent.CompletableFuture; -import java.util.concurrent.CompletionException; -import localhost.ApiHelper; -import localhost.Server; -import localhost.exceptions.ApiException; -import localhost.exceptions.ErrorResponseException; -import localhost.http.request.HttpMethod; -import localhost.models.GroupNameAndIDInput; -import localhost.models.StateEnum; -import localhost.models.TspublicRestV2UserAddgroupRequest; -import localhost.models.TspublicRestV2UserAddorgRequest; -import localhost.models.TspublicRestV2UserChangepasswordRequest; -import localhost.models.TspublicRestV2UserRemovegroupRequest; -import localhost.models.TspublicRestV2UserSearchRequest; -import localhost.models.TspublicRestV2UserUpdateRequest; -import localhost.models.Type8Enum; -import localhost.models.UserResponse; -import localhost.models.VisibilityEnum; - -/** - * This class lists all the endpoints of the groups. - */ -public final class UserController extends BaseController { - - /** - * Initializes the controller. - * @param globalConfig Configurations added in client. - */ - public UserController(GlobalConfiguration globalConfig) { - super(globalConfig); - } - - /** - * To get the details of a specific user account by username or user id, use this endpoint. At - * Least one value is needed. When both are given, user id will be considered to fetch user - * information. - * @param name Optional parameter: Username of the user that you want to query. - * @param id Optional parameter: The GUID of the user account to query - * @return Returns the UserResponse response from the API call - * @throws ApiException Represents error response from the server. - * @throws IOException Signals that an I/O exception of some sort has occurred. - */ - public UserResponse restapiV2GetUser( - final String name, - final String id) throws ApiException, IOException { - return prepareRestapiV2GetUserRequest(name, id).execute(); - } - - /** - * To get the details of a specific user account by username or user id, use this endpoint. At - * Least one value is needed. When both are given, user id will be considered to fetch user - * information. - * @param name Optional parameter: Username of the user that you want to query. - * @param id Optional parameter: The GUID of the user account to query - * @return Returns the UserResponse response from the API call - */ - public CompletableFuture restapiV2GetUserAsync( - final String name, - final String id) { - try { - return prepareRestapiV2GetUserRequest(name, id).executeAsync(); - } catch (Exception e) { - throw new CompletionException(e); - } - } - - /** - * Builds the ApiCall object for restapiV2GetUser. - */ - private ApiCall prepareRestapiV2GetUserRequest( - final String name, - final String id) throws IOException { - return new ApiCall.Builder() - .globalConfig(getGlobalConfiguration()) - .requestBuilder(requestBuilder -> requestBuilder - .server(Server.ENUM_DEFAULT.value()) - .path("/tspublic/rest/v2/user") - .queryParam(param -> param.key("name") - .value(name).isRequired(false)) - .queryParam(param -> param.key("id") - .value(id).isRequired(false)) - .headerParam(param -> param.key("accept").value("application/json")) - .authenticationKey(BaseController.AUTHENTICATION_KEY) - .httpMethod(HttpMethod.GET)) - .responseHandler(responseHandler -> responseHandler - .deserializer( - response -> ApiHelper.deserialize(response, UserResponse.class)) - .nullify404(false) - .localErrorCase("500", - ErrorCase.create("Operation failed", - (reason, context) -> new ErrorResponseException(reason, context))) - .globalErrorCase(GLOBAL_ERROR_CASES)) - .endpointConfiguration(param -> param - .arraySerializationFormat(ArraySerializationFormat.PLAIN -)) - .build(); - } - - /** - * To programmatically create a user account in the ThoughtSpot system use this API endpoint. - * Using this API, you can create a user and assign groups. To create a user, you require admin - * user privileges. All users created in the ThoughtSpot system are added to ALL_GROUP. - * @param name Required parameter: Name of the user. The username string must be unique. - * @param displayName Required parameter: A unique display name string for the user account, - * usually their first and last name - * @param password Required parameter: Password for the user account. - * @param visibility Optional parameter: Visibility of the user. The visibility attribute is - * set to DEFAULT when creating a user. The DEFAULT attribute makes a user visible to - * other users and user groups, and this allows them to share objects - * @param mail Optional parameter: Email of the user account - * @param orgIds Optional parameter: Array of org identifiers. If no value is provided then - * user will be created in the organization associated with the login session. - * @param groups Optional parameter: Array of objects of groups that the user belong to. - * @param state Optional parameter: Status of user account. acitve or inactive. - * @param notifyOnShare Optional parameter: User preference for receiving email notifications - * when another ThoughtSpot user shares answers or pinboards. - * @param showWalkMe Optional parameter: The user preference for revisiting the onboarding - * experience. - * @param analystOnboardingComplete Optional parameter: ThoughtSpot provides an interactive - * guided walkthrough to onboard new users. The onboarding experience leads users - * through a set of actions to help users get started and accomplish their tasks - * quickly. The users can turn off the Onboarding experience and access it again when - * they need assistance with the ThoughtSpot UI. - * @param type Optional parameter: Type of user. LOCAL_USER indicates that the user is created - * locally in the ThoughtSpot system. - * @return Returns the UserResponse response from the API call - * @throws ApiException Represents error response from the server. - * @throws IOException Signals that an I/O exception of some sort has occurred. - */ - public UserResponse restapiV2CreateUser( - final String name, - final String displayName, - final String password, - final VisibilityEnum visibility, - final String mail, - final List orgIds, - final List groups, - final StateEnum state, - final Boolean notifyOnShare, - final Boolean showWalkMe, - final Boolean analystOnboardingComplete, - final Type8Enum type) throws ApiException, IOException { - return prepareRestapiV2CreateUserRequest(name, displayName, password, visibility, mail, - orgIds, groups, state, notifyOnShare, showWalkMe, analystOnboardingComplete, - type).execute(); - } - - /** - * To programmatically create a user account in the ThoughtSpot system use this API endpoint. - * Using this API, you can create a user and assign groups. To create a user, you require admin - * user privileges. All users created in the ThoughtSpot system are added to ALL_GROUP. - * @param name Required parameter: Name of the user. The username string must be unique. - * @param displayName Required parameter: A unique display name string for the user account, - * usually their first and last name - * @param password Required parameter: Password for the user account. - * @param visibility Optional parameter: Visibility of the user. The visibility attribute is - * set to DEFAULT when creating a user. The DEFAULT attribute makes a user visible to - * other users and user groups, and this allows them to share objects - * @param mail Optional parameter: Email of the user account - * @param orgIds Optional parameter: Array of org identifiers. If no value is provided then - * user will be created in the organization associated with the login session. - * @param groups Optional parameter: Array of objects of groups that the user belong to. - * @param state Optional parameter: Status of user account. acitve or inactive. - * @param notifyOnShare Optional parameter: User preference for receiving email notifications - * when another ThoughtSpot user shares answers or pinboards. - * @param showWalkMe Optional parameter: The user preference for revisiting the onboarding - * experience. - * @param analystOnboardingComplete Optional parameter: ThoughtSpot provides an interactive - * guided walkthrough to onboard new users. The onboarding experience leads users - * through a set of actions to help users get started and accomplish their tasks - * quickly. The users can turn off the Onboarding experience and access it again when - * they need assistance with the ThoughtSpot UI. - * @param type Optional parameter: Type of user. LOCAL_USER indicates that the user is created - * locally in the ThoughtSpot system. - * @return Returns the UserResponse response from the API call - */ - public CompletableFuture restapiV2CreateUserAsync( - final String name, - final String displayName, - final String password, - final VisibilityEnum visibility, - final String mail, - final List orgIds, - final List groups, - final StateEnum state, - final Boolean notifyOnShare, - final Boolean showWalkMe, - final Boolean analystOnboardingComplete, - final Type8Enum type) { - try { - return prepareRestapiV2CreateUserRequest(name, displayName, password, visibility, mail, orgIds, - groups, state, notifyOnShare, showWalkMe, analystOnboardingComplete, - type).executeAsync(); - } catch (Exception e) { - throw new CompletionException(e); - } - } - - /** - * Builds the ApiCall object for restapiV2CreateUser. - */ - private ApiCall prepareRestapiV2CreateUserRequest( - final String name, - final String displayName, - final String password, - final VisibilityEnum visibility, - final String mail, - final List orgIds, - final List groups, - final StateEnum state, - final Boolean notifyOnShare, - final Boolean showWalkMe, - final Boolean analystOnboardingComplete, - final Type8Enum type) throws IOException { - return new ApiCall.Builder() - .globalConfig(getGlobalConfiguration()) - .requestBuilder(requestBuilder -> requestBuilder - .server(Server.ENUM_DEFAULT.value()) - .path("/tspublic/rest/v2/user/create") - .queryParam(param -> param.key("name") - .value(name)) - .queryParam(param -> param.key("displayName") - .value(displayName)) - .queryParam(param -> param.key("password") - .value(password)) - .queryParam(param -> param.key("visibility") - .value((visibility != null) ? visibility.value() : null).isRequired(false)) - .queryParam(param -> param.key("mail") - .value(mail).isRequired(false)) - .queryParam(param -> param.key("orgIds") - .value(orgIds).isRequired(false)) - .queryParam(param -> param.key("groups") - .value(groups).isRequired(false)) - .queryParam(param -> param.key("state") - .value((state != null) ? state.value() : null).isRequired(false)) - .queryParam(param -> param.key("notifyOnShare") - .value(notifyOnShare).isRequired(false)) - .queryParam(param -> param.key("showWalkMe") - .value(showWalkMe).isRequired(false)) - .queryParam(param -> param.key("analystOnboardingComplete") - .value(analystOnboardingComplete).isRequired(false)) - .queryParam(param -> param.key("type") - .value((type != null) ? type.value() : null).isRequired(false)) - .headerParam(param -> param.key("accept").value("application/json")) - .authenticationKey(BaseController.AUTHENTICATION_KEY) - .httpMethod(HttpMethod.GET)) - .responseHandler(responseHandler -> responseHandler - .deserializer( - response -> ApiHelper.deserialize(response, UserResponse.class)) - .nullify404(false) - .localErrorCase("500", - ErrorCase.create("Operation failed", - (reason, context) -> new ErrorResponseException(reason, context))) - .globalErrorCase(GLOBAL_ERROR_CASES)) - .endpointConfiguration(param -> param - .arraySerializationFormat(ArraySerializationFormat.PLAIN -)) - .build(); - } - - /** - * You can use this endpoint to programmatically modify an existing user account. To modify a - * user, you require admin user privileges. At least one of User Id or username is mandatory. - * When both are given, then user id will be considered and username will be updated. - * @param body Required parameter: Example: - * @return Returns the Boolean response from the API call - * @throws ApiException Represents error response from the server. - * @throws IOException Signals that an I/O exception of some sort has occurred. - */ - public Boolean restapiV2UpdateUser( - final TspublicRestV2UserUpdateRequest body) throws ApiException, IOException { - return prepareRestapiV2UpdateUserRequest(body).execute(); - } - - /** - * You can use this endpoint to programmatically modify an existing user account. To modify a - * user, you require admin user privileges. At least one of User Id or username is mandatory. - * When both are given, then user id will be considered and username will be updated. - * @param body Required parameter: Example: - * @return Returns the Boolean response from the API call - */ - public CompletableFuture restapiV2UpdateUserAsync( - final TspublicRestV2UserUpdateRequest body) { - try { - return prepareRestapiV2UpdateUserRequest(body).executeAsync(); - } catch (Exception e) { - throw new CompletionException(e); - } - } - - /** - * Builds the ApiCall object for restapiV2UpdateUser. - */ - private ApiCall prepareRestapiV2UpdateUserRequest( - final TspublicRestV2UserUpdateRequest body) throws JsonProcessingException, IOException { - return new ApiCall.Builder() - .globalConfig(getGlobalConfiguration()) - .requestBuilder(requestBuilder -> requestBuilder - .server(Server.ENUM_DEFAULT.value()) - .path("/tspublic/rest/v2/user/update") - .bodyParam(param -> param.value(body)) - .bodySerializer(() -> ApiHelper.serialize(body)) - .headerParam(param -> param.key("Content-Type") - .value("application/json").isRequired(false)) - .authenticationKey(BaseController.AUTHENTICATION_KEY) - .httpMethod(HttpMethod.PUT)) - .responseHandler(responseHandler -> responseHandler - .deserializer( - response -> Boolean.parseBoolean(response)) - .nullify404(false) - .localErrorCase("500", - ErrorCase.create("Operation failed", - (reason, context) -> new ErrorResponseException(reason, context))) - .globalErrorCase(GLOBAL_ERROR_CASES)) - .endpointConfiguration(param -> param - .arraySerializationFormat(ArraySerializationFormat.PLAIN -)) - .build(); - } - - /** - * To remove a user from the ThoughtSpot system, use this endpoint. At Least one value needed. - * When both are given user id will be considered to delete user. - * @param name Optional parameter: Username of the user that you want to query. - * @param id Optional parameter: The GUID of the user account to query - * @param orgId Optional parameter: Unique identifier of the organization from which the user - * would be deleted. If no value is provided then user will be deleted from the - * organization associated with the login session. - * @return Returns the Boolean response from the API call - * @throws ApiException Represents error response from the server. - * @throws IOException Signals that an I/O exception of some sort has occurred. - */ - public Boolean restapiV2DeleteUser( - final String name, - final String id, - final Integer orgId) throws ApiException, IOException { - return prepareRestapiV2DeleteUserRequest(name, id, orgId).execute(); - } - - /** - * To remove a user from the ThoughtSpot system, use this endpoint. At Least one value needed. - * When both are given user id will be considered to delete user. - * @param name Optional parameter: Username of the user that you want to query. - * @param id Optional parameter: The GUID of the user account to query - * @param orgId Optional parameter: Unique identifier of the organization from which the user - * would be deleted. If no value is provided then user will be deleted from the - * organization associated with the login session. - * @return Returns the Boolean response from the API call - */ - public CompletableFuture restapiV2DeleteUserAsync( - final String name, - final String id, - final Integer orgId) { - try { - return prepareRestapiV2DeleteUserRequest(name, id, orgId).executeAsync(); - } catch (Exception e) { - throw new CompletionException(e); - } - } - - /** - * Builds the ApiCall object for restapiV2DeleteUser. - */ - private ApiCall prepareRestapiV2DeleteUserRequest( - final String name, - final String id, - final Integer orgId) throws IOException { - return new ApiCall.Builder() - .globalConfig(getGlobalConfiguration()) - .requestBuilder(requestBuilder -> requestBuilder - .server(Server.ENUM_DEFAULT.value()) - .path("/tspublic/rest/v2/user/delete") - .queryParam(param -> param.key("name") - .value(name).isRequired(false)) - .queryParam(param -> param.key("id") - .value(id).isRequired(false)) - .queryParam(param -> param.key("orgId") - .value(orgId).isRequired(false)) - .authenticationKey(BaseController.AUTHENTICATION_KEY) - .httpMethod(HttpMethod.DELETE)) - .responseHandler(responseHandler -> responseHandler - .deserializer( - response -> Boolean.parseBoolean(response)) - .nullify404(false) - .localErrorCase("500", - ErrorCase.create("Operation failed", - (reason, context) -> new ErrorResponseException(reason, context))) - .globalErrorCase(GLOBAL_ERROR_CASES)) - .endpointConfiguration(param -> param - .arraySerializationFormat(ArraySerializationFormat.PLAIN -)) - .build(); - } - - /** - * To programmatically add groups to an existing ThoughtSpot user use this endpoint. When you - * assign groups to a user, the user inherits the privileges assigned to those groups. At least - * one of User Id or username is mandatory. When both are given, then user id will be - * considered. - * @param body Required parameter: Example: - * @return Returns the Boolean response from the API call - * @throws ApiException Represents error response from the server. - * @throws IOException Signals that an I/O exception of some sort has occurred. - */ - public Boolean restapiV2AddUserToGroups( - final TspublicRestV2UserAddgroupRequest body) throws ApiException, IOException { - return prepareRestapiV2AddUserToGroupsRequest(body).execute(); - } - - /** - * To programmatically add groups to an existing ThoughtSpot user use this endpoint. When you - * assign groups to a user, the user inherits the privileges assigned to those groups. At least - * one of User Id or username is mandatory. When both are given, then user id will be - * considered. - * @param body Required parameter: Example: - * @return Returns the Boolean response from the API call - */ - public CompletableFuture restapiV2AddUserToGroupsAsync( - final TspublicRestV2UserAddgroupRequest body) { - try { - return prepareRestapiV2AddUserToGroupsRequest(body).executeAsync(); - } catch (Exception e) { - throw new CompletionException(e); - } - } - - /** - * Builds the ApiCall object for restapiV2AddUserToGroups. - */ - private ApiCall prepareRestapiV2AddUserToGroupsRequest( - final TspublicRestV2UserAddgroupRequest body) throws JsonProcessingException, IOException { - return new ApiCall.Builder() - .globalConfig(getGlobalConfiguration()) - .requestBuilder(requestBuilder -> requestBuilder - .server(Server.ENUM_DEFAULT.value()) - .path("/tspublic/rest/v2/user/addgroup") - .bodyParam(param -> param.value(body)) - .bodySerializer(() -> ApiHelper.serialize(body)) - .headerParam(param -> param.key("Content-Type") - .value("application/json").isRequired(false)) - .authenticationKey(BaseController.AUTHENTICATION_KEY) - .httpMethod(HttpMethod.PUT)) - .responseHandler(responseHandler -> responseHandler - .deserializer( - response -> Boolean.parseBoolean(response)) - .nullify404(false) - .localErrorCase("500", - ErrorCase.create("Operation failed", - (reason, context) -> new ErrorResponseException(reason, context))) - .globalErrorCase(GLOBAL_ERROR_CASES)) - .endpointConfiguration(param -> param - .arraySerializationFormat(ArraySerializationFormat.PLAIN -)) - .build(); - } - - /** - * To programmatically remove groups from an existing ThoughtSpot user, use this API endpoint. - * The API removes only the user association. It does not delete the user or group from the - * Thoughtspot system At least one of User Id or username is mandatory. When both are given, - * then user id will be considered. - * @param body Required parameter: Example: - * @return Returns the Boolean response from the API call - * @throws ApiException Represents error response from the server. - * @throws IOException Signals that an I/O exception of some sort has occurred. - */ - public Boolean restapiV2RemoveUserFromGroups( - final TspublicRestV2UserRemovegroupRequest body) throws ApiException, IOException { - return prepareRestapiV2RemoveUserFromGroupsRequest(body).execute(); - } - - /** - * To programmatically remove groups from an existing ThoughtSpot user, use this API endpoint. - * The API removes only the user association. It does not delete the user or group from the - * Thoughtspot system At least one of User Id or username is mandatory. When both are given, - * then user id will be considered. - * @param body Required parameter: Example: - * @return Returns the Boolean response from the API call - */ - public CompletableFuture restapiV2RemoveUserFromGroupsAsync( - final TspublicRestV2UserRemovegroupRequest body) { - try { - return prepareRestapiV2RemoveUserFromGroupsRequest(body).executeAsync(); - } catch (Exception e) { - throw new CompletionException(e); - } - } - - /** - * Builds the ApiCall object for restapiV2RemoveUserFromGroups. - */ - private ApiCall prepareRestapiV2RemoveUserFromGroupsRequest( - final TspublicRestV2UserRemovegroupRequest body) throws JsonProcessingException, IOException { - return new ApiCall.Builder() - .globalConfig(getGlobalConfiguration()) - .requestBuilder(requestBuilder -> requestBuilder - .server(Server.ENUM_DEFAULT.value()) - .path("/tspublic/rest/v2/user/removegroup") - .bodyParam(param -> param.value(body)) - .bodySerializer(() -> ApiHelper.serialize(body)) - .headerParam(param -> param.key("Content-Type") - .value("application/json").isRequired(false)) - .authenticationKey(BaseController.AUTHENTICATION_KEY) - .httpMethod(HttpMethod.PUT)) - .responseHandler(responseHandler -> responseHandler - .deserializer( - response -> Boolean.parseBoolean(response)) - .nullify404(false) - .localErrorCase("500", - ErrorCase.create("Operation failed", - (reason, context) -> new ErrorResponseException(reason, context))) - .globalErrorCase(GLOBAL_ERROR_CASES)) - .endpointConfiguration(param -> param - .arraySerializationFormat(ArraySerializationFormat.PLAIN -)) - .build(); - } - - /** - * To get the details of a specific user account or all users in the ThoughtSpot system use this - * end point. - * @param body Required parameter: Example: - * @return Returns the Object response from the API call - * @throws ApiException Represents error response from the server. - * @throws IOException Signals that an I/O exception of some sort has occurred. - */ - public Object restapiV2SearchUsers( - final TspublicRestV2UserSearchRequest body) throws ApiException, IOException { - return prepareRestapiV2SearchUsersRequest(body).execute(); - } - - /** - * To get the details of a specific user account or all users in the ThoughtSpot system use this - * end point. - * @param body Required parameter: Example: - * @return Returns the Object response from the API call - */ - public CompletableFuture restapiV2SearchUsersAsync( - final TspublicRestV2UserSearchRequest body) { - try { - return prepareRestapiV2SearchUsersRequest(body).executeAsync(); - } catch (Exception e) { - throw new CompletionException(e); - } - } - - /** - * Builds the ApiCall object for restapiV2SearchUsers. - */ - private ApiCall prepareRestapiV2SearchUsersRequest( - final TspublicRestV2UserSearchRequest body) throws JsonProcessingException, IOException { - return new ApiCall.Builder() - .globalConfig(getGlobalConfiguration()) - .requestBuilder(requestBuilder -> requestBuilder - .server(Server.ENUM_DEFAULT.value()) - .path("/tspublic/rest/v2/user/search") - .bodyParam(param -> param.value(body)) - .bodySerializer(() -> ApiHelper.serialize(body)) - .headerParam(param -> param.key("Content-Type") - .value("application/json").isRequired(false)) - .headerParam(param -> param.key("accept").value("application/json")) - .authenticationKey(BaseController.AUTHENTICATION_KEY) - .httpMethod(HttpMethod.POST)) - .responseHandler(responseHandler -> responseHandler - .deserializer( - response -> response) - .nullify404(false) - .localErrorCase("500", - ErrorCase.create("Operation failed", - (reason, context) -> new ErrorResponseException(reason, context))) - .globalErrorCase(GLOBAL_ERROR_CASES)) - .endpointConfiguration(param -> param - .arraySerializationFormat(ArraySerializationFormat.PLAIN -)) - .build(); - } - - /** - * To change the password of a ThoughtSpot user account, use this endpoint. At least one of id - * or name of user is required. When both are given user id will be considered. - * @param body Required parameter: Example: - * @return Returns the Boolean response from the API call - * @throws ApiException Represents error response from the server. - * @throws IOException Signals that an I/O exception of some sort has occurred. - */ - public Boolean restapiV2ChangePasswordOfUser( - final TspublicRestV2UserChangepasswordRequest body) throws ApiException, IOException { - return prepareRestapiV2ChangePasswordOfUserRequest(body).execute(); - } - - /** - * To change the password of a ThoughtSpot user account, use this endpoint. At least one of id - * or name of user is required. When both are given user id will be considered. - * @param body Required parameter: Example: - * @return Returns the Boolean response from the API call - */ - public CompletableFuture restapiV2ChangePasswordOfUserAsync( - final TspublicRestV2UserChangepasswordRequest body) { - try { - return prepareRestapiV2ChangePasswordOfUserRequest(body).executeAsync(); - } catch (Exception e) { - throw new CompletionException(e); - } - } - - /** - * Builds the ApiCall object for restapiV2ChangePasswordOfUser. - */ - private ApiCall prepareRestapiV2ChangePasswordOfUserRequest( - final TspublicRestV2UserChangepasswordRequest body) throws JsonProcessingException, IOException { - return new ApiCall.Builder() - .globalConfig(getGlobalConfiguration()) - .requestBuilder(requestBuilder -> requestBuilder - .server(Server.ENUM_DEFAULT.value()) - .path("/tspublic/rest/v2/user/changepassword") - .bodyParam(param -> param.value(body)) - .bodySerializer(() -> ApiHelper.serialize(body)) - .headerParam(param -> param.key("Content-Type") - .value("application/json").isRequired(false)) - .authenticationKey(BaseController.AUTHENTICATION_KEY) - .httpMethod(HttpMethod.PUT)) - .responseHandler(responseHandler -> responseHandler - .deserializer( - response -> Boolean.parseBoolean(response)) - .nullify404(false) - .localErrorCase("500", - ErrorCase.create("Operation failed", - (reason, context) -> new ErrorResponseException(reason, context))) - .globalErrorCase(GLOBAL_ERROR_CASES)) - .endpointConfiguration(param -> param - .arraySerializationFormat(ArraySerializationFormat.PLAIN -)) - .build(); - } - - /** - * To programmatically add existing ThoughtSpot users to an organization, use this API endpoint. - * At least one of id or name of the organization is required. When both are given, then - * organization id will be considered. Requires Administration access for the organization to - * which users need to be added. - * @param body Required parameter: Example: - * @return Returns the Boolean response from the API call - * @throws ApiException Represents error response from the server. - * @throws IOException Signals that an I/O exception of some sort has occurred. - */ - public Boolean restapiV2AddUserToOrgs( - final TspublicRestV2UserAddorgRequest body) throws ApiException, IOException { - return prepareRestapiV2AddUserToOrgsRequest(body).execute(); - } - - /** - * To programmatically add existing ThoughtSpot users to an organization, use this API endpoint. - * At least one of id or name of the organization is required. When both are given, then - * organization id will be considered. Requires Administration access for the organization to - * which users need to be added. - * @param body Required parameter: Example: - * @return Returns the Boolean response from the API call - */ - public CompletableFuture restapiV2AddUserToOrgsAsync( - final TspublicRestV2UserAddorgRequest body) { - try { - return prepareRestapiV2AddUserToOrgsRequest(body).executeAsync(); - } catch (Exception e) { - throw new CompletionException(e); - } - } - - /** - * Builds the ApiCall object for restapiV2AddUserToOrgs. - */ - private ApiCall prepareRestapiV2AddUserToOrgsRequest( - final TspublicRestV2UserAddorgRequest body) throws JsonProcessingException, IOException { - return new ApiCall.Builder() - .globalConfig(getGlobalConfiguration()) - .requestBuilder(requestBuilder -> requestBuilder - .server(Server.ENUM_DEFAULT.value()) - .path("/tspublic/rest/v2/user/addorg") - .bodyParam(param -> param.value(body)) - .bodySerializer(() -> ApiHelper.serialize(body)) - .headerParam(param -> param.key("Content-Type") - .value("application/json").isRequired(false)) - .authenticationKey(BaseController.AUTHENTICATION_KEY) - .httpMethod(HttpMethod.PUT)) - .responseHandler(responseHandler -> responseHandler - .deserializer( - response -> Boolean.parseBoolean(response)) - .nullify404(false) - .localErrorCase("500", - ErrorCase.create("Operation failed", - (reason, context) -> new ErrorResponseException(reason, context))) - .globalErrorCase(GLOBAL_ERROR_CASES)) - .endpointConfiguration(param -> param - .arraySerializationFormat(ArraySerializationFormat.PLAIN -)) - .build(); - } -} \ No newline at end of file diff --git a/Java/src/main/java/localhost/exceptions/ApiException.java b/Java/src/main/java/localhost/exceptions/ApiException.java deleted file mode 100644 index 63c1f56ed..000000000 --- a/Java/src/main/java/localhost/exceptions/ApiException.java +++ /dev/null @@ -1,38 +0,0 @@ -/* - * ThoughtSpotPublicRESTAPILib - * - * This file was automatically generated by APIMATIC v3.0 ( https://www.apimatic.io ). - */ - -package localhost.exceptions; - -import io.apimatic.core.types.CoreApiException; -import io.apimatic.coreinterfaces.http.Context; - -/** - * This is the base class for all exceptions that represent an error response from the server. - */ -public class ApiException extends CoreApiException { - //UID for serialization - private static final long serialVersionUID = 1L; - - //private fields - - /** - * Initialization constructor. - * @param reason The reason for throwing exception - */ - public ApiException(String reason) { - super(reason); - // TODO Auto-generated constructor stub - } - - /** - * Initialization constructor. - * @param reason The reason for throwing exception - * @param context The http context of the API exception - */ - public ApiException(String reason, Context context) { - super(reason, context); - } -} \ No newline at end of file diff --git a/Java/src/main/java/localhost/exceptions/ErrorResponseException.java b/Java/src/main/java/localhost/exceptions/ErrorResponseException.java deleted file mode 100644 index a4270195b..000000000 --- a/Java/src/main/java/localhost/exceptions/ErrorResponseException.java +++ /dev/null @@ -1,47 +0,0 @@ -/* - * ThoughtSpotPublicRESTAPILib - * - * This file was automatically generated by APIMATIC v3.0 ( https://www.apimatic.io ). - */ - -package localhost.exceptions; - -import com.fasterxml.jackson.annotation.JsonGetter; -import com.fasterxml.jackson.annotation.JsonSetter; -import io.apimatic.coreinterfaces.http.Context; - -/** - * This is a model class for ErrorResponseException type. - */ -public class ErrorResponseException extends ApiException { - private static final long serialVersionUID = -108367321895728840L; - private Object error; - - /** - * Initialization constructor. - * @param reason The reason for throwing exception - * @param context The context of the API exception - */ - public ErrorResponseException(String reason, Context context) { - super(reason, context); - } - - - /** - * Getter for Error. - * @return Returns the Object - */ - @JsonGetter("error") - public Object getError() { - return this.error; - } - - /** - * Setter for Error. - * @param error Value for Object - */ - @JsonSetter("error") - private void setError(Object error) { - this.error = error; - } -} diff --git a/Java/src/main/java/localhost/http/Headers.java b/Java/src/main/java/localhost/http/Headers.java deleted file mode 100644 index 67e8c81b6..000000000 --- a/Java/src/main/java/localhost/http/Headers.java +++ /dev/null @@ -1,243 +0,0 @@ -/* - * ThoughtSpotPublicRESTAPILib - * - * This file was automatically generated by APIMATIC v3.0 ( https://www.apimatic.io ). - */ - -package localhost.http; - -import java.util.ArrayList; -import java.util.List; -import java.util.Map; -import java.util.Set; -import java.util.TreeMap; -import io.apimatic.coreinterfaces.http.HttpHeaders; - -/** - * Class for creating and managing HTTP Headers. - */ -public class Headers implements HttpHeaders { - private Map> headers; - - /** - * Default constructor. - */ - public Headers() { - this.headers = new TreeMap<>(String.CASE_INSENSITIVE_ORDER); - } - - /** - * Constructor that creates a new instance using a given Map. - * @param headers The Map to use for creating an instance of this class. - */ - public Headers(Map> headers) { - this.headers = new TreeMap<>(String.CASE_INSENSITIVE_ORDER); - for (Map.Entry> kv : headers.entrySet()) { - add(kv.getKey(), kv.getValue()); - } - } - - /** - * Copy Constructor. - * @param h Headers Instance to be cloned. - */ - public Headers(Headers h) { - this.headers = cloneHeaderMap(h.headers); - } - - /** - * Use to check if the given name is present in headers. - * @param headerName String name for header to be checked. - * @return true if headerName is found, false otherwise. - */ - public boolean has(String headerName) { - return this.headers.containsKey(headerName); - } - - /** - * Returns a Set containing all header names. - * @return A Set containing all header names. - */ - public Set names() { - return headers.keySet(); - } - - /** - * Get the first value associated with a given header name, - * or null if the header name is not found. - * @param headerName The header name to find the associated value for. - * @return The first value associated with the given header name. - */ - public String value(String headerName) { - if (headers.containsKey(headerName)) { - return headers.get(headerName).get(0); - } - return null; - } - - /** - * Get a List of all values associated with a given header name, - * or null if the header name is not found. - * @param headerName The header name to find the associated values for. - * @return A List of values associated with the given header name. - */ - public List values(String headerName) { - if (headers.containsKey(headerName)) { - return headers.get(headerName); - } - return null; - } - - /** - * Returns a Map of the headers, giving only one value for each header name. - * @return A Map of header names and values. - */ - public Map asSimpleMap() { - Map copy = new TreeMap<>(String.CASE_INSENSITIVE_ORDER); - for (Map.Entry> kv : this.headers.entrySet()) { - if (kv.getValue() != null) { - copy.put(kv.getKey(), kv.getValue().get(0)); - } - } - - return copy; - } - - /** - * Returns a simulated MultiMap of the headers. - * @return A Map of header names and values. - */ - public Map> asMultimap() { - return cloneHeaderMap(this.headers); - } - - /** - * Clones a header map. - * @param headerMap A Map containing header names and values as Entry pairs. - * @return A Map of header names and values. - */ - private Map> cloneHeaderMap(Map> headerMap) { - Map> copy = new TreeMap<>(String.CASE_INSENSITIVE_ORDER); - for (Map.Entry> kv : headerMap.entrySet()) { - if (kv.getValue() != null) { - copy.put(kv.getKey(), kv.getValue()); - } - } - - return copy; - } - - /** - * Adds a value for a header name to this object, neither headerName nor value can be null. - * @param headerName The header name to add the value against. - * @param value The value to add. - */ - public void add(String headerName, String value) { - if (headerName == null || value == null) { - return; - } - - if (this.headers.containsKey(headerName)) { - this.headers.get(headerName).add(value); - } else { - List values = new ArrayList(); - values.add(value); - this.headers.put(headerName, values); - } - } - - /** - * Adds a List of values for a header name to this object, neither headerName nor values can be - * null. - * @param headerName The header name to add the values against. - * @param values The List of values to add. - */ - public void add(String headerName, List values) { - if (headerName == null || values == null) { - return; - } - - if (this.headers.containsKey(headerName)) { - for (String value : values) { - if (value != null) { - this.headers.get(headerName).add(value); - } - } - } else { - List copyOfValues = new ArrayList(); - for (String value : values) { - if (value != null) { - copyOfValues.add(value); - } - } - - if (!copyOfValues.isEmpty()) { - this.headers.put(headerName, copyOfValues); - } - } - } - - /** - * Adds a value for a header name to this object and returns the Headers instance. - * Neither headerName nor values can be null. - * @param headerName The header name to add the value against. - * @param value The value to add. - */ - public Headers createHeader(String headerName, String value) { - add(headerName, value); - return this; - } - - /** - * Adds values from a Map to this object. - * @param headers A Map containing header names and values as Entry pairs. - */ - public void addAllFromMap(Map headers) { - for (Map.Entry kv : headers.entrySet()) { - this.add(kv.getKey(), kv.getValue()); - } - } - - /** - * Adds values from a simulated Multi-Map to this object. - * @param headers A Map containing header names and values as Entry pairs. - */ - public void addAllFromMultiMap(Map> headers) { - for (Map.Entry> kv : headers.entrySet()) { - this.add(kv.getKey(), kv.getValue()); - } - } - - /** - * Adds all the entries in a Headers object to this object. - * @param headers The object whose values are to be added to this object. - */ - public void addAll(HttpHeaders headers) { - for (Map.Entry> kv : headers.asMultimap().entrySet()) { - this.add(kv.getKey(), kv.getValue()); - } - } - - /** - * Removes the mapping for a header name if it is present, - * and get the value to which this map previously associated the key, - * or null if the map contained no mapping for the key. - * @param headerName The header name to remove the associated values for - * @return A List of values associated with the given header name. - */ - public List remove(String headerName) { - if (headers.containsKey(headerName)) { - return headers.remove(headerName); - } - return null; - } - - /** - * Converts this Headers into string format. - * @return String representation of this class - */ - @Override - public String toString() { - return "Headers " + headers; - } -} \ No newline at end of file diff --git a/Java/src/main/java/localhost/http/client/HttpCallback.java b/Java/src/main/java/localhost/http/client/HttpCallback.java deleted file mode 100644 index d4b634be7..000000000 --- a/Java/src/main/java/localhost/http/client/HttpCallback.java +++ /dev/null @@ -1,16 +0,0 @@ -/* - * ThoughtSpotPublicRESTAPILib - * - * This file was automatically generated by APIMATIC v3.0 ( https://www.apimatic.io ). - */ - -package localhost.http.client; - -import io.apimatic.coreinterfaces.http.Callback; - -/** - * Callback to be called before and after the HTTP call for an endpoint is made. - */ -public interface HttpCallback extends Callback { - -} \ No newline at end of file diff --git a/Java/src/main/java/localhost/http/client/HttpClientConfiguration.java b/Java/src/main/java/localhost/http/client/HttpClientConfiguration.java deleted file mode 100644 index 6a62b64a3..000000000 --- a/Java/src/main/java/localhost/http/client/HttpClientConfiguration.java +++ /dev/null @@ -1,317 +0,0 @@ -/* - * ThoughtSpotPublicRESTAPILib - * - * This file was automatically generated by APIMATIC v3.0 ( https://www.apimatic.io ). - */ - -package localhost.http.client; - -import io.apimatic.core.configurations.http.client.CoreHttpClientConfiguration; -import io.apimatic.coreinterfaces.http.ClientConfiguration; -import io.apimatic.coreinterfaces.http.HttpMethodType; -import io.apimatic.coreinterfaces.http.Method; -import java.util.Set; -import java.util.stream.Collectors; -import java.util.stream.Stream; -import localhost.http.request.HttpMethod; - -/** - * Class to hold HTTP Client Configuration. - */ -public class HttpClientConfiguration implements ReadonlyHttpClientConfiguration { - - private final ClientConfiguration configuration; - - /** - * Default Constructor. - */ - private HttpClientConfiguration(CoreHttpClientConfiguration.Builder configurationBuilder) { - this.configuration = configurationBuilder.build(); - } - - /** - * The timeout in seconds to use for making HTTP requests. - * @return timeout - */ - public long getTimeout() { - return configuration.getTimeout(); - } - - /** - * Allow or prevent skipping SSL certificate verification. - * @return isSkipSslCertVerification - */ - public boolean isSkipSslCertVerification() { - return configuration.isSkipSslCertVerification(); - } - - /** - * The number of retries to make. - * @return numberOfRetries - */ - public int getNumberOfRetries() { - return configuration.getNumberOfRetries(); - } - - /** - * To use in calculation of wait time for next request in case of failure. - * @return backOffFactor - */ - public int getBackOffFactor() { - return configuration.getBackOffFactor(); - } - - /** - * To use in calculation of wait time for next request in case of failure. - * @return retryInterval - */ - public long getRetryInterval() { - return configuration.getRetryInterval(); - } - - /** - * Http status codes to retry against. - * @return httpStatusCodesToRetry - */ - public Set getHttpStatusCodesToRetry() { - return configuration.getHttpStatusCodesToRetry(); - } - - /** - * Http methods to retry against. - * @return httpMethodsToRetry - */ - public Set getHttpMethodsToRetry() { - if (configuration.getHttpMethodsToRetry() == null) { - return null; - } - return configuration.getHttpMethodsToRetry().stream() - .map(httpMethod -> HttpMethod.valueOf(httpMethod.toString())) - .collect(Collectors.toSet()); - } - - /** - * The maximum wait time for overall retrying requests. - * @return maximumRetryWaitTime - */ - public long getMaximumRetryWaitTime() { - return configuration.getMaximumRetryWaitTime(); - } - - /** - * Whether to retry on request timeout. - * @return shouldRetryOnTimeout - */ - public boolean shouldRetryOnTimeout() { - return configuration.shouldRetryOnTimeout(); - } - - /** - * The OkHttpClient instance used to make the HTTP calls. - * @return httpClientInstance - */ - public okhttp3.OkHttpClient getHttpClientInstance() { - return configuration.getHttpClientInstance(); - } - - /** - * Allow the SDK to override HTTP client instance's settings used for features like retries, - * timeouts etc. - * @return overrideHttpClientConfigurations - */ - public boolean shouldOverrideHttpClientConfigurations() { - return configuration.shouldOverrideHttpClientConfigurations(); - } - - /** - * Returns the ClientConfiguration instance. - * @return ClientConfiguration - */ - public ClientConfiguration getConfiguration() { - return this.configuration; - } - - /** - * Converts this HttpClientConfiguration into string format. - * @return String representation of this class - */ - @Override - public String toString() { - return "HttpClientConfiguration [" + "timeout=" + getTimeout() - + ", isSkipSslCertVerification=" + isSkipSslCertVerification() - + ", numberOfRetries=" + getNumberOfRetries() + ", backOffFactor=" - + getBackOffFactor() + ", retryInterval=" + getRetryInterval() - + ", httpStatusCodesToRetry=" + getHttpStatusCodesToRetry() - + ", httpMethodsToRetry=" + getHttpMethodsToRetry() + ", maximumRetryWaitTime=" - + getMaximumRetryWaitTime() + ", shouldRetryOnTimeout=" + shouldRetryOnTimeout() - + ", httpClientInstance=" + getHttpClientInstance() - + ", overrideHttpClientConfigurations=" + shouldOverrideHttpClientConfigurations() - + "]"; - } - - /** - * Builds a new {@link HttpClientConfiguration.Builder} object. Creates the instance with the - * current state. - * - * @return a new {@link HttpClientConfiguration.Builder} object - */ - public Builder newBuilder() { - return new Builder() - .timeout(getTimeout()) - .isSkipSslCertVerification(isSkipSslCertVerification()) - .numberOfRetries(getNumberOfRetries()) - .backOffFactor(getBackOffFactor()) - .retryInterval(getRetryInterval()) - .httpStatusCodesToRetry(getHttpStatusCodesToRetry()) - .httpMethodsToRetry(getHttpMethodsToRetry()) - .maximumRetryWaitTime(getMaximumRetryWaitTime()) - .shouldRetryOnTimeout(shouldRetryOnTimeout()) - .httpClientInstance(getHttpClientInstance(), shouldOverrideHttpClientConfigurations()); - } - - /** - * Class to build instances of {@link HttpClientConfiguration}. - */ - public static class Builder { - - private final CoreHttpClientConfiguration.Builder configurationBuilder = - new CoreHttpClientConfiguration.Builder(); - - /** - * Default Constructor to initiate builder with default properties. - */ - public Builder() { - // setting default values - configurationBuilder.httpStatusCodesToRetry(Stream.of(408, 413, 429, 500, 502, 503, 504, - 521, 522, 524, 408, 413, 429, 500, 502, 503, 504, 521, 522, 524).collect(Collectors.toSet())); - configurationBuilder.httpMethodsToRetry(Stream.of(Method.GET, Method.PUT, Method.GET, - Method.PUT).collect(Collectors.toSet())); - } - - /** - * The timeout in seconds to use for making HTTP requests. - * @param timeout The timeout to set. - * @return Builder - */ - public Builder timeout(long timeout) { - configurationBuilder.timeout(timeout); - return this; - } - - /** - * Allow or prevent skipping SSL certificate verification. - * @param isSkipSslCertVerification The isSkipSslCertVerification to set - * @return Builder - */ - public Builder isSkipSslCertVerification(boolean isSkipSslCertVerification) { - configurationBuilder.isSkipSslCertVerification(isSkipSslCertVerification); - return this; - } - - /** - * The number of retries to make. - * @param numberOfRetries The numberOfRetries to set. - * @return Builder - */ - public Builder numberOfRetries(int numberOfRetries) { - configurationBuilder.numberOfRetries(numberOfRetries); - return this; - } - - /** - * To use in calculation of wait time for next request in case of failure. - * @param backOffFactor The backOffFactor to set. - * @return Builder - */ - public Builder backOffFactor(int backOffFactor) { - configurationBuilder.backOffFactor(backOffFactor); - return this; - } - - /** - * To use in calculation of wait time for next request in case of failure. - * @param retryInterval The retryInterval to set. - * @return Builder - */ - public Builder retryInterval(long retryInterval) { - configurationBuilder.retryInterval(retryInterval); - return this; - } - - /** - * Http status codes to retry against. - * @param httpStatusCodesToRetry The httpStatusCodesToRetry to set. - * @return Builder - */ - public Builder httpStatusCodesToRetry(Set httpStatusCodesToRetry) { - configurationBuilder.httpStatusCodesToRetry(httpStatusCodesToRetry); - return this; - } - - /** - * Http methods to retry against. - * @param httpMethodsToRetry The httpMethodsToRetry to set. - * @return Builder - */ - public Builder httpMethodsToRetry(Set httpMethodsToRetry) { - Set convertedHttpMethodsToRetry = null; - if (httpMethodsToRetry != null) { - convertedHttpMethodsToRetry = httpMethodsToRetry.stream() - .map(httpMethod -> HttpMethodType.valueOf(httpMethod.toString())) - .collect(Collectors.toSet()); - } - configurationBuilder.httpMethodsToRetry(convertedHttpMethodsToRetry); - return this; - } - - /** - * The maximum wait time for overall retrying requests. - * @param maximumRetryWaitTime The maximumRetryWaitTime to set. - * @return Builder - */ - public Builder maximumRetryWaitTime(long maximumRetryWaitTime) { - configurationBuilder.maximumRetryWaitTime(maximumRetryWaitTime); - return this; - } - - /** - * Whether to retry on request timeout. - * @param shouldRetryOnTimeout The shouldRetryOnTimeout to set - * @return Builder - */ - public Builder shouldRetryOnTimeout(boolean shouldRetryOnTimeout) { - configurationBuilder.shouldRetryOnTimeout(shouldRetryOnTimeout); - return this; - } - - /** - * The OkHttpClient instance used to make the HTTP calls. - * @param httpClientInstance The httpClientInstance to set - * @return Builder - */ - public Builder httpClientInstance(okhttp3.OkHttpClient httpClientInstance) { - configurationBuilder.httpClientInstance(httpClientInstance); - return this; - } - - /** - * The OkHttpClient instance used to make the HTTP calls. - * @param httpClientInstance The httpClientInstance to set - * @param overrideHttpClientConfigurations The overrideHttpClientConfigurations to set - * @return Builder - */ - public Builder httpClientInstance(okhttp3.OkHttpClient httpClientInstance, - boolean overrideHttpClientConfigurations) { - configurationBuilder.httpClientInstance(httpClientInstance, overrideHttpClientConfigurations); - return this; - } - - /** - * Builds a new HttpClientConfiguration object using the set fields. - * @return {@link HttpClientConfiguration} - */ - public HttpClientConfiguration build() { - return new HttpClientConfiguration(configurationBuilder); - } - } -} \ No newline at end of file diff --git a/Java/src/main/java/localhost/http/client/HttpContext.java b/Java/src/main/java/localhost/http/client/HttpContext.java deleted file mode 100644 index b14b94997..000000000 --- a/Java/src/main/java/localhost/http/client/HttpContext.java +++ /dev/null @@ -1,54 +0,0 @@ -/* - * ThoughtSpotPublicRESTAPILib - * - * This file was automatically generated by APIMATIC v3.0 ( https://www.apimatic.io ). - */ - -package localhost.http.client; - -import io.apimatic.coreinterfaces.http.Context; -import localhost.http.request.HttpRequest; -import localhost.http.response.HttpResponse; - -/** - * Class to wrap the request sent to the server and the response received from the server. - */ -public class HttpContext implements Context { - private HttpRequest request; - private HttpResponse response; - - /** - * Initialization constructor. - * @param request Instance of HttpRequest. - * @param response Instance of HttpResponse. - */ - public HttpContext(HttpRequest request, HttpResponse response) { - this.request = request; - this.response = response; - } - - /** - * Getter for the Http Request. - * @return HttpRequest request. - */ - public HttpRequest getRequest() { - return request; - } - - /** - * Getter for the Http Response. - * @return HttpResponse response. - */ - public HttpResponse getResponse() { - return response; - } - - /** - * Converts this HttpContext into string format. - * @return String representation of this class - */ - @Override - public String toString() { - return "HttpContext [request=" + request + ", response=" + response + "]"; - } -} \ No newline at end of file diff --git a/Java/src/main/java/localhost/http/client/ReadonlyHttpClientConfiguration.java b/Java/src/main/java/localhost/http/client/ReadonlyHttpClientConfiguration.java deleted file mode 100644 index b12bfce7f..000000000 --- a/Java/src/main/java/localhost/http/client/ReadonlyHttpClientConfiguration.java +++ /dev/null @@ -1,84 +0,0 @@ -/* - * ThoughtSpotPublicRESTAPILib - * - * This file was automatically generated by APIMATIC v3.0 ( https://www.apimatic.io ). - */ - -package localhost.http.client; - -import java.util.Set; -import localhost.http.request.HttpMethod; - -/** - * Interface for holding HTTP Client Configuration. - */ -public interface ReadonlyHttpClientConfiguration { - - /** - * The timeout in seconds to use for making HTTP requests. - * @return a copy of timeout - */ - long getTimeout(); - - /** - * Allow or prevent skipping SSL certificate verification. - * @return a copy of isSkipSslCertVerification - */ - boolean isSkipSslCertVerification(); - - /** - * The number of retries to make. - * @return a copy of numberOfRetries - */ - int getNumberOfRetries(); - - /** - * To use in calculation of wait time for next request in case of failure. - * @return a copy of backOffFactor - */ - int getBackOffFactor(); - - /** - * To use in calculation of wait time for next request in case of failure. - * @return a copy of retryInterval - */ - long getRetryInterval(); - - /** - * Http status codes to retry against. - * @return a copy of httpStatusCodesToRetry - */ - Set getHttpStatusCodesToRetry(); - - /** - * Http methods to retry against. - * @return a copy of httpMethodsToRetry - */ - Set getHttpMethodsToRetry(); - - /** - * The maximum wait time for overall retrying requests. - * @return a copy of maximumRetryWaitTime - */ - long getMaximumRetryWaitTime(); - - /** - * Whether to retry on request timeout. - * @return a copy of shouldRetryOnTimeout - */ - boolean shouldRetryOnTimeout(); - - /** - * The OkHttpClient instance used to make the HTTP calls. - * @return a copy of httpClientInstance - */ - okhttp3.OkHttpClient getHttpClientInstance(); - - /** - * Allow the SDK to override HTTP client instance's settings used for features like retries, - * timeouts etc. - * @return a copy of overrideHttpClientConfigurations - */ - boolean shouldOverrideHttpClientConfigurations(); - -} \ No newline at end of file diff --git a/Java/src/main/java/localhost/http/request/HttpBodyRequest.java b/Java/src/main/java/localhost/http/request/HttpBodyRequest.java deleted file mode 100644 index 0f23c2e2d..000000000 --- a/Java/src/main/java/localhost/http/request/HttpBodyRequest.java +++ /dev/null @@ -1,40 +0,0 @@ -/* - * ThoughtSpotPublicRESTAPILib - * - * This file was automatically generated by APIMATIC v3.0 ( https://www.apimatic.io ). - */ - -package localhost.http.request; - -import java.util.Map; -import localhost.http.Headers; - -/** - * HTTP Request with an explicit body. - */ -public class HttpBodyRequest extends HttpRequest { - - /** - * Create a request with explicit body. - * @param method The HTTP method to use. Can be PUT, POST, DELETE and PATCH - * @param queryUrlBuilder The fully qualified absolute http url to create the HTTP Request. - * @param headers The key-value map of all http headers to be sent - * @param queryParams The query parameters in a key-value map - * @param body The object to be sent as body after serialization - */ - public HttpBodyRequest(HttpMethod method, StringBuilder queryUrlBuilder, Headers headers, - Map queryParams, Object body) { - super(method, queryUrlBuilder, headers, queryParams, body); - } - - /** - * Converts this HttpBodyRequest into string format. - * @return String representation of this class - */ - @Override - public String toString() { - return "HttpBodyRequest [httpMethod=" + getHttpMethod() - + ", headers=" + getHeaders() + ", queryUrlBuilder=" + getQueryUrl() - + ", queryParameters=" + getQueryParameters() + ", body=" + getBody() + "]"; - } -} diff --git a/Java/src/main/java/localhost/http/request/HttpMethod.java b/Java/src/main/java/localhost/http/request/HttpMethod.java deleted file mode 100644 index ba5c95536..000000000 --- a/Java/src/main/java/localhost/http/request/HttpMethod.java +++ /dev/null @@ -1,21 +0,0 @@ -/* - * ThoughtSpotPublicRESTAPILib - * - * This file was automatically generated by APIMATIC v3.0 ( https://www.apimatic.io ). - */ - -package localhost.http.request; - -import io.apimatic.coreinterfaces.http.Method; - -/** - * HTTP methods enumeration. - */ -public enum HttpMethod implements Method { - GET, - POST, - PUT, - PATCH, - DELETE, - HEAD -} diff --git a/Java/src/main/java/localhost/http/request/HttpRequest.java b/Java/src/main/java/localhost/http/request/HttpRequest.java deleted file mode 100644 index 21ee4ae01..000000000 --- a/Java/src/main/java/localhost/http/request/HttpRequest.java +++ /dev/null @@ -1,152 +0,0 @@ -/* - * ThoughtSpotPublicRESTAPILib - * - * This file was automatically generated by APIMATIC v3.0 ( https://www.apimatic.io ). - */ - -package localhost.http.request; - -import io.apimatic.coreinterfaces.http.request.ArraySerializationFormat; -import io.apimatic.coreinterfaces.http.request.Request; -import java.util.AbstractMap.SimpleEntry; -import java.util.HashMap; -import java.util.List; -import java.util.Map; -import localhost.ApiHelper; -import localhost.http.Headers; - -/** - * Class for creating and managing HTTP Requests. - */ -public class HttpRequest implements Request { - - /** - * Private store for properties. - */ - private HttpMethod httpMethod; - private Headers headers; - private StringBuilder queryUrlBuilder; - private List> parameters; - private Map queryParameters; - private Object body; - - /** - * Initializes a simple http request. - * @param method The HTTP method to use. Can be GET, HEAD, PUT, POST, DELETE and PATCH - * @param queryUrlBuilder The fully qualified absolute http url to create the HTTP Request. - * @param headers The key-value map of all http headers to be sent - * @param queryParameters The query parameters in a key-value map - * @param parameters The form data values in a key-value map - */ - public HttpRequest(HttpMethod method, StringBuilder queryUrlBuilder, Headers headers, - Map queryParameters, List> parameters) { - this.httpMethod = method; - this.queryUrlBuilder = queryUrlBuilder; - this.headers = headers; - this.queryParameters = queryParameters; - this.parameters = parameters; - } - - /** - * Initializes a simple http request. - * - * @param method The HTTP method to use. Can be GET, HEAD, PUT, POST, DELETE and PATCH - * @param queryUrlBuilder The fully qualified absolute http url to create the HTTP Request. - * @param headers The key-value map of all http headers to be sent - * @param queryParameters The query parameters in a key-value map - * @param body The object to be sent as body after serialization - */ - public HttpRequest(HttpMethod method, StringBuilder queryUrlBuilder, Headers headers, - Map queryParameters, Object body) { - this(method, queryUrlBuilder, headers, queryParameters, null); - this.body = body != null ? body : ""; - } - - /** - * HttpMethod for the http request. - * @return HttpMethod - */ - public HttpMethod getHttpMethod() { - return httpMethod; - } - - /** - * Headers for the http request. - * @return Headers - */ - public Headers getHeaders() { - return headers; - } - - /** - * Query url for the http request. - * @return String query url - */ - public String getQueryUrl() { - return queryUrlBuilder.toString(); - } - - /** - * Parameters for the http request. - * @return List of simple entries for form parameters - */ - public List> getParameters() { - return parameters; - } - - /** - * Query parameters for the http request. - * @return Map of queryParameters - */ - public Map getQueryParameters() { - return queryParameters; - } - - /** - * Body for the http request. - * - * @return Object body - */ - public Object getBody() { - return body; - } - - /** - * Add Query parameter in http request. - * @param key The key of query parameter to be added - * @param value The value for respective query parameter - */ - public void addQueryParameter(String key, Object value) { - if (key == null || key.isEmpty() || value == null) { - return; - } - if (queryParameters == null) { - queryParameters = new HashMap(); - } - queryParameters.put(key, value); - } - - /** - * Converts this HttpRequest into string format. - * @return String representation of this class - */ - @Override - public String toString() { - return "HttpRequest [httpMethod=" + httpMethod + ", headers=" + headers - + ", queryUrlBuilder=" + queryUrlBuilder + ", queryParameters=" + queryParameters - + ", parameters=" + parameters + "]"; - } - - @Override - public String getUrl(ArraySerializationFormat arraySerializationFormat) { - StringBuilder urlBuilder = new StringBuilder(getQueryUrl()); - - // set query parameters - ApiHelper.appendUrlWithQueryParameters(urlBuilder, getQueryParameters(), - arraySerializationFormat); - - // validate and preprocess url - return ApiHelper.cleanUrl(urlBuilder); - } - -} diff --git a/Java/src/main/java/localhost/http/response/HttpResponse.java b/Java/src/main/java/localhost/http/response/HttpResponse.java deleted file mode 100644 index 724f22afb..000000000 --- a/Java/src/main/java/localhost/http/response/HttpResponse.java +++ /dev/null @@ -1,116 +0,0 @@ -/* - * ThoughtSpotPublicRESTAPILib - * - * This file was automatically generated by APIMATIC v3.0 ( https://www.apimatic.io ). - */ - -package localhost.http.response; - -import io.apimatic.coreinterfaces.http.response.Response; -import java.io.BufferedReader; -import java.io.IOException; -import java.io.InputStream; -import java.io.InputStreamReader; -import java.util.stream.Collectors; -import localhost.http.Headers; - -/** - * Class to hold HTTP Response. - */ -public class HttpResponse implements Response { - - /** - * Private store for properties. - */ - private int statusCode; - private Headers headers; - private InputStream rawBody; - private String body; - - /** - * Initialization constructor. - * @param code The HTTP status code - * @param headers The HTTP headers read from response - * @param rawBody The raw data returned in the HTTP response - */ - public HttpResponse(int code, Headers headers, InputStream rawBody) { - this.statusCode = code; - this.headers = headers; - this.rawBody = rawBody; - } - - /** - * Initialization constructor. - * - * @param code The HTTP status code - * @param headers The HTTP headers read from response - * @param rawBody The raw data returned in the HTTP response - * @param body String response body - */ - public HttpResponse(int code, Headers headers, InputStream rawBody, String body) { - this(code, headers, rawBody); - this.body = body; - } - - /** - * HTTP Status code of the http response. - * @return Int status code - */ - public int getStatusCode() { - return statusCode; - } - - /** - * Headers of the http response. - * @return Headers - */ - public Headers getHeaders() { - return headers; - } - - /** - * Raw body of the http response. - * @return InputStream - */ - public InputStream getRawBody() { - return rawBody; - } - - /** - * String representation for raw body of the http response. - * @return String - */ - public String getRawBodyString() { - try { - if (rawBody == null || rawBody.available() == 0 || !rawBody.markSupported()) { - return null; - } - rawBody.mark(0); - String result = new BufferedReader(new InputStreamReader(rawBody)).lines() - .collect(Collectors.joining("\n")); - rawBody.reset(); - return result; - } catch (IOException e) { - return null; - } - } - - /** - * String body of the http response. - * - * @return String response body - */ - public String getBody() { - return body; - } - - /** - * Converts this HttpResponse into string format. - * @return String representation of this class - */ - @Override - public String toString() { - return "HttpResponse [statusCode=" + statusCode + ", headers=" + headers + ", rawBody=" - + getRawBodyString() + "]"; - } -} \ No newline at end of file diff --git a/Java/src/main/java/localhost/http/response/HttpStringResponse.java b/Java/src/main/java/localhost/http/response/HttpStringResponse.java deleted file mode 100644 index 85a41c96f..000000000 --- a/Java/src/main/java/localhost/http/response/HttpStringResponse.java +++ /dev/null @@ -1,37 +0,0 @@ -/* - * ThoughtSpotPublicRESTAPILib - * - * This file was automatically generated by APIMATIC v3.0 ( https://www.apimatic.io ). - */ - -package localhost.http.response; - -import java.io.InputStream; -import localhost.http.Headers; - -/** - * Class to hold response body as string. - */ -public class HttpStringResponse extends HttpResponse { - - /** - * Initialization constructor. - * @param code The HTTP status code - * @param headers The HTTP headers read from response - * @param rawBody The raw data returned in the HTTP response - * @param body String response body - */ - public HttpStringResponse(int code, Headers headers, InputStream rawBody, String body) { - super(code, headers, rawBody, body); - } - - /** - * Converts this HttpStringResponse into string format. - * @return String representation of this class - */ - @Override - public String toString() { - return "HttpStringResponse [statusCode=" + getStatusCode() + ", headers=" + getHeaders() - + ", body=" + getBody() + "]"; - } -} diff --git a/Java/src/main/java/localhost/models/AccessEnum.java b/Java/src/main/java/localhost/models/AccessEnum.java deleted file mode 100644 index c3386e78f..000000000 --- a/Java/src/main/java/localhost/models/AccessEnum.java +++ /dev/null @@ -1,75 +0,0 @@ -/* - * ThoughtSpotPublicRESTAPILib - * - * This file was automatically generated by APIMATIC v3.0 ( https://www.apimatic.io ). - */ - -package localhost.models; - -import java.util.ArrayList; -import java.util.List; -import java.util.TreeMap; - -/** - * AccessEnum to be used. - */ -public enum AccessEnum { - READ_ONLY, - - MODIFY; - - - private static TreeMap valueMap = new TreeMap<>(); - private String value; - - static { - READ_ONLY.value = "READ_ONLY"; - MODIFY.value = "MODIFY"; - - valueMap.put("READ_ONLY", READ_ONLY); - valueMap.put("MODIFY", MODIFY); - } - - /** - * Returns the enum member associated with the given string value. - * @param toConvert String value to get enum member. - * @return The enum member against the given string value. - */ - @com.fasterxml.jackson.annotation.JsonCreator - public static AccessEnum fromString(String toConvert) { - return valueMap.get(toConvert); - } - - /** - * Returns the string value associated with the enum member. - * @return The string value against enum member. - */ - @com.fasterxml.jackson.annotation.JsonValue - public String value() { - return value; - } - - /** - * Get string representation of this enum. - */ - @Override - public String toString() { - return value.toString(); - } - - /** - * Convert list of AccessEnum values to list of string values. - * @param toConvert The list of AccessEnum values to convert. - * @return List of representative string values. - */ - public static List toValue(List toConvert) { - if (toConvert == null) { - return null; - } - List convertedValues = new ArrayList<>(); - for (AccessEnum enumValue : toConvert) { - convertedValues.add(enumValue.value); - } - return convertedValues; - } -} \ No newline at end of file diff --git a/Java/src/main/java/localhost/models/AccessLevelEnum.java b/Java/src/main/java/localhost/models/AccessLevelEnum.java deleted file mode 100644 index a12f91962..000000000 --- a/Java/src/main/java/localhost/models/AccessLevelEnum.java +++ /dev/null @@ -1,75 +0,0 @@ -/* - * ThoughtSpotPublicRESTAPILib - * - * This file was automatically generated by APIMATIC v3.0 ( https://www.apimatic.io ). - */ - -package localhost.models; - -import java.util.ArrayList; -import java.util.List; -import java.util.TreeMap; - -/** - * AccessLevelEnum to be used. - */ -public enum AccessLevelEnum { - FULL, - - REPORT_BOOK_VIEW; - - - private static TreeMap valueMap = new TreeMap<>(); - private String value; - - static { - FULL.value = "FULL"; - REPORT_BOOK_VIEW.value = "REPORT_BOOK_VIEW"; - - valueMap.put("FULL", FULL); - valueMap.put("REPORT_BOOK_VIEW", REPORT_BOOK_VIEW); - } - - /** - * Returns the enum member associated with the given string value. - * @param toConvert String value to get enum member. - * @return The enum member against the given string value. - */ - @com.fasterxml.jackson.annotation.JsonCreator - public static AccessLevelEnum fromString(String toConvert) { - return valueMap.get(toConvert); - } - - /** - * Returns the string value associated with the enum member. - * @return The string value against enum member. - */ - @com.fasterxml.jackson.annotation.JsonValue - public String value() { - return value; - } - - /** - * Get string representation of this enum. - */ - @Override - public String toString() { - return value.toString(); - } - - /** - * Convert list of AccessLevelEnum values to list of string values. - * @param toConvert The list of AccessLevelEnum values to convert. - * @return List of representative string values. - */ - public static List toValue(List toConvert) { - if (toConvert == null) { - return null; - } - List convertedValues = new ArrayList<>(); - for (AccessLevelEnum enumValue : toConvert) { - convertedValues.add(enumValue.value); - } - return convertedValues; - } -} \ No newline at end of file diff --git a/Java/src/main/java/localhost/models/AccessLevelInput.java b/Java/src/main/java/localhost/models/AccessLevelInput.java deleted file mode 100644 index 71e8b242a..000000000 --- a/Java/src/main/java/localhost/models/AccessLevelInput.java +++ /dev/null @@ -1,216 +0,0 @@ -/* - * ThoughtSpotPublicRESTAPILib - * - * This file was automatically generated by APIMATIC v3.0 ( https://www.apimatic.io ). - */ - -package localhost.models; - -import com.fasterxml.jackson.annotation.JsonGetter; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonSetter; -import io.apimatic.core.types.BaseModel; - -/** - * This is a model class for AccessLevelInput type. - */ -public class AccessLevelInput { - private String name; - private String id; - private Type1Enum type; - private AccessEnum access; - - /** - * Default constructor. - */ - public AccessLevelInput() { - } - - /** - * Initialization constructor. - * @param name String value for name. - * @param id String value for id. - * @param type Type1Enum value for type. - * @param access AccessEnum value for access. - */ - public AccessLevelInput( - String name, - String id, - Type1Enum type, - AccessEnum access) { - this.name = name; - this.id = id; - this.type = type; - this.access = access; - } - - /** - * Getter for Name. - * Username or name of the user group - * @return Returns the String - */ - @JsonGetter("name") - @JsonInclude(JsonInclude.Include.NON_NULL) - public String getName() { - return name; - } - - /** - * Setter for Name. - * Username or name of the user group - * @param name Value for String - */ - @JsonSetter("name") - public void setName(String name) { - this.name = name; - } - - /** - * Getter for Id. - * GUID of the user or user group - * @return Returns the String - */ - @JsonGetter("id") - @JsonInclude(JsonInclude.Include.NON_NULL) - public String getId() { - return id; - } - - /** - * Setter for Id. - * GUID of the user or user group - * @param id Value for String - */ - @JsonSetter("id") - public void setId(String id) { - this.id = id; - } - - /** - * Getter for Type. - * Type of access detail provided - * @return Returns the Type1Enum - */ - @JsonGetter("type") - @JsonInclude(JsonInclude.Include.NON_NULL) - public Type1Enum getType() { - return type; - } - - /** - * Setter for Type. - * Type of access detail provided - * @param type Value for Type1Enum - */ - @JsonSetter("type") - public void setType(Type1Enum type) { - this.type = type; - } - - /** - * Getter for Access. - * Minimum access level that the specified user or user group has. If no input is provided then - * minimum access of READ_ONLY will be considered. - * @return Returns the AccessEnum - */ - @JsonGetter("access") - @JsonInclude(JsonInclude.Include.NON_NULL) - public AccessEnum getAccess() { - return access; - } - - /** - * Setter for Access. - * Minimum access level that the specified user or user group has. If no input is provided then - * minimum access of READ_ONLY will be considered. - * @param access Value for AccessEnum - */ - @JsonSetter("access") - public void setAccess(AccessEnum access) { - this.access = access; - } - - /** - * Converts this AccessLevelInput into string format. - * @return String representation of this class - */ - @Override - public String toString() { - return "AccessLevelInput [" + "name=" + name + ", id=" + id + ", type=" + type + ", access=" - + access + "]"; - } - - /** - * Builds a new {@link AccessLevelInput.Builder} object. - * Creates the instance with the state of the current model. - * @return a new {@link AccessLevelInput.Builder} object - */ - public Builder toBuilder() { - Builder builder = new Builder() - .name(getName()) - .id(getId()) - .type(getType()) - .access(getAccess()); - return builder; - } - - /** - * Class to build instances of {@link AccessLevelInput}. - */ - public static class Builder { - private String name; - private String id; - private Type1Enum type; - private AccessEnum access; - - - - /** - * Setter for name. - * @param name String value for name. - * @return Builder - */ - public Builder name(String name) { - this.name = name; - return this; - } - - /** - * Setter for id. - * @param id String value for id. - * @return Builder - */ - public Builder id(String id) { - this.id = id; - return this; - } - - /** - * Setter for type. - * @param type Type1Enum value for type. - * @return Builder - */ - public Builder type(Type1Enum type) { - this.type = type; - return this; - } - - /** - * Setter for access. - * @param access AccessEnum value for access. - * @return Builder - */ - public Builder access(AccessEnum access) { - this.access = access; - return this; - } - - /** - * Builds a new {@link AccessLevelInput} object using the set fields. - * @return {@link AccessLevelInput} - */ - public AccessLevelInput build() { - return new AccessLevelInput(name, id, type, access); - } - } -} diff --git a/Java/src/main/java/localhost/models/AddTableInput.java b/Java/src/main/java/localhost/models/AddTableInput.java deleted file mode 100644 index fcac05d37..000000000 --- a/Java/src/main/java/localhost/models/AddTableInput.java +++ /dev/null @@ -1,224 +0,0 @@ -/* - * ThoughtSpotPublicRESTAPILib - * - * This file was automatically generated by APIMATIC v3.0 ( https://www.apimatic.io ). - */ - -package localhost.models; - -import com.fasterxml.jackson.annotation.JsonGetter; -import com.fasterxml.jackson.annotation.JsonSetter; -import io.apimatic.core.types.BaseModel; -import java.util.List; - -/** - * This is a model class for AddTableInput type. - */ -public class AddTableInput { - private String name; - private String dbName; - private String schemaName; - private List columns; - - /** - * Default constructor. - */ - public AddTableInput() { - } - - /** - * Initialization constructor. - * @param name String value for name. - * @param dbName String value for dbName. - * @param schemaName String value for schemaName. - * @param columns List of ColumnsInput value for columns. - */ - public AddTableInput( - String name, - String dbName, - String schemaName, - List columns) { - this.name = name; - this.dbName = dbName; - this.schemaName = schemaName; - this.columns = columns; - } - - /** - * Getter for Name. - * Name of the table - * @return Returns the String - */ - @JsonGetter("name") - public String getName() { - return name; - } - - /** - * Setter for Name. - * Name of the table - * @param name Value for String - */ - @JsonSetter("name") - public void setName(String name) { - this.name = name; - } - - /** - * Getter for DbName. - * Name of the database in the data platform - * @return Returns the String - */ - @JsonGetter("dbName") - public String getDbName() { - return dbName; - } - - /** - * Setter for DbName. - * Name of the database in the data platform - * @param dbName Value for String - */ - @JsonSetter("dbName") - public void setDbName(String dbName) { - this.dbName = dbName; - } - - /** - * Getter for SchemaName. - * Name of the schema in the database - * @return Returns the String - */ - @JsonGetter("schemaName") - public String getSchemaName() { - return schemaName; - } - - /** - * Setter for SchemaName. - * Name of the schema in the database - * @param schemaName Value for String - */ - @JsonSetter("schemaName") - public void setSchemaName(String schemaName) { - this.schemaName = schemaName; - } - - /** - * Getter for Columns. - * A JSON array of column details - * @return Returns the List of ColumnsInput - */ - @JsonGetter("columns") - public List getColumns() { - return columns; - } - - /** - * Setter for Columns. - * A JSON array of column details - * @param columns Value for List of ColumnsInput - */ - @JsonSetter("columns") - public void setColumns(List columns) { - this.columns = columns; - } - - /** - * Converts this AddTableInput into string format. - * @return String representation of this class - */ - @Override - public String toString() { - return "AddTableInput [" + "name=" + name + ", dbName=" + dbName + ", schemaName=" - + schemaName + ", columns=" + columns + "]"; - } - - /** - * Builds a new {@link AddTableInput.Builder} object. - * Creates the instance with the state of the current model. - * @return a new {@link AddTableInput.Builder} object - */ - public Builder toBuilder() { - Builder builder = new Builder(name, dbName, schemaName, columns); - return builder; - } - - /** - * Class to build instances of {@link AddTableInput}. - */ - public static class Builder { - private String name; - private String dbName; - private String schemaName; - private List columns; - - /** - * Initialization constructor. - */ - public Builder() { - } - - /** - * Initialization constructor. - * @param name String value for name. - * @param dbName String value for dbName. - * @param schemaName String value for schemaName. - * @param columns List of ColumnsInput value for columns. - */ - public Builder(String name, String dbName, String schemaName, List columns) { - this.name = name; - this.dbName = dbName; - this.schemaName = schemaName; - this.columns = columns; - } - - /** - * Setter for name. - * @param name String value for name. - * @return Builder - */ - public Builder name(String name) { - this.name = name; - return this; - } - - /** - * Setter for dbName. - * @param dbName String value for dbName. - * @return Builder - */ - public Builder dbName(String dbName) { - this.dbName = dbName; - return this; - } - - /** - * Setter for schemaName. - * @param schemaName String value for schemaName. - * @return Builder - */ - public Builder schemaName(String schemaName) { - this.schemaName = schemaName; - return this; - } - - /** - * Setter for columns. - * @param columns List of ColumnsInput value for columns. - * @return Builder - */ - public Builder columns(List columns) { - this.columns = columns; - return this; - } - - /** - * Builds a new {@link AddTableInput} object using the set fields. - * @return {@link AddTableInput} - */ - public AddTableInput build() { - return new AddTableInput(name, dbName, schemaName, columns); - } - } -} diff --git a/Java/src/main/java/localhost/models/AdminsyncPrincipalResponse.java b/Java/src/main/java/localhost/models/AdminsyncPrincipalResponse.java deleted file mode 100644 index 158332bb0..000000000 --- a/Java/src/main/java/localhost/models/AdminsyncPrincipalResponse.java +++ /dev/null @@ -1,291 +0,0 @@ -/* - * ThoughtSpotPublicRESTAPILib - * - * This file was automatically generated by APIMATIC v3.0 ( https://www.apimatic.io ). - */ - -package localhost.models; - -import com.fasterxml.jackson.annotation.JsonGetter; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonSetter; -import io.apimatic.core.types.BaseModel; -import java.util.List; - -/** - * This is a model class for AdminsyncPrincipalResponse type. - */ -public class AdminsyncPrincipalResponse { - private List usersAdded; - private List usersDeleted; - private List usersUpdated; - private List groupsAdded; - private List groupsDeleted; - private List groupsUpdated; - - /** - * Default constructor. - */ - public AdminsyncPrincipalResponse() { - } - - /** - * Initialization constructor. - * @param usersAdded List of String value for usersAdded. - * @param usersDeleted List of String value for usersDeleted. - * @param usersUpdated List of String value for usersUpdated. - * @param groupsAdded List of String value for groupsAdded. - * @param groupsDeleted List of String value for groupsDeleted. - * @param groupsUpdated List of String value for groupsUpdated. - */ - public AdminsyncPrincipalResponse( - List usersAdded, - List usersDeleted, - List usersUpdated, - List groupsAdded, - List groupsDeleted, - List groupsUpdated) { - this.usersAdded = usersAdded; - this.usersDeleted = usersDeleted; - this.usersUpdated = usersUpdated; - this.groupsAdded = groupsAdded; - this.groupsDeleted = groupsDeleted; - this.groupsUpdated = groupsUpdated; - } - - /** - * Getter for UsersAdded. - * Username of list of users added - * @return Returns the List of String - */ - @JsonGetter("usersAdded") - @JsonInclude(JsonInclude.Include.NON_NULL) - public List getUsersAdded() { - return usersAdded; - } - - /** - * Setter for UsersAdded. - * Username of list of users added - * @param usersAdded Value for List of String - */ - @JsonSetter("usersAdded") - public void setUsersAdded(List usersAdded) { - this.usersAdded = usersAdded; - } - - /** - * Getter for UsersDeleted. - * Username of list of users deleted - * @return Returns the List of String - */ - @JsonGetter("usersDeleted") - @JsonInclude(JsonInclude.Include.NON_NULL) - public List getUsersDeleted() { - return usersDeleted; - } - - /** - * Setter for UsersDeleted. - * Username of list of users deleted - * @param usersDeleted Value for List of String - */ - @JsonSetter("usersDeleted") - public void setUsersDeleted(List usersDeleted) { - this.usersDeleted = usersDeleted; - } - - /** - * Getter for UsersUpdated. - * Username of list of users updated - * @return Returns the List of String - */ - @JsonGetter("usersUpdated") - @JsonInclude(JsonInclude.Include.NON_NULL) - public List getUsersUpdated() { - return usersUpdated; - } - - /** - * Setter for UsersUpdated. - * Username of list of users updated - * @param usersUpdated Value for List of String - */ - @JsonSetter("usersUpdated") - public void setUsersUpdated(List usersUpdated) { - this.usersUpdated = usersUpdated; - } - - /** - * Getter for GroupsAdded. - * Group name of list of groups added - * @return Returns the List of String - */ - @JsonGetter("groupsAdded") - @JsonInclude(JsonInclude.Include.NON_NULL) - public List getGroupsAdded() { - return groupsAdded; - } - - /** - * Setter for GroupsAdded. - * Group name of list of groups added - * @param groupsAdded Value for List of String - */ - @JsonSetter("groupsAdded") - public void setGroupsAdded(List groupsAdded) { - this.groupsAdded = groupsAdded; - } - - /** - * Getter for GroupsDeleted. - * Group name of list of groups deleted - * @return Returns the List of String - */ - @JsonGetter("groupsDeleted") - @JsonInclude(JsonInclude.Include.NON_NULL) - public List getGroupsDeleted() { - return groupsDeleted; - } - - /** - * Setter for GroupsDeleted. - * Group name of list of groups deleted - * @param groupsDeleted Value for List of String - */ - @JsonSetter("groupsDeleted") - public void setGroupsDeleted(List groupsDeleted) { - this.groupsDeleted = groupsDeleted; - } - - /** - * Getter for GroupsUpdated. - * Group name of list of groups updated - * @return Returns the List of String - */ - @JsonGetter("groupsUpdated") - @JsonInclude(JsonInclude.Include.NON_NULL) - public List getGroupsUpdated() { - return groupsUpdated; - } - - /** - * Setter for GroupsUpdated. - * Group name of list of groups updated - * @param groupsUpdated Value for List of String - */ - @JsonSetter("groupsUpdated") - public void setGroupsUpdated(List groupsUpdated) { - this.groupsUpdated = groupsUpdated; - } - - /** - * Converts this AdminsyncPrincipalResponse into string format. - * @return String representation of this class - */ - @Override - public String toString() { - return "AdminsyncPrincipalResponse [" + "usersAdded=" + usersAdded + ", usersDeleted=" - + usersDeleted + ", usersUpdated=" + usersUpdated + ", groupsAdded=" + groupsAdded - + ", groupsDeleted=" + groupsDeleted + ", groupsUpdated=" + groupsUpdated + "]"; - } - - /** - * Builds a new {@link AdminsyncPrincipalResponse.Builder} object. - * Creates the instance with the state of the current model. - * @return a new {@link AdminsyncPrincipalResponse.Builder} object - */ - public Builder toBuilder() { - Builder builder = new Builder() - .usersAdded(getUsersAdded()) - .usersDeleted(getUsersDeleted()) - .usersUpdated(getUsersUpdated()) - .groupsAdded(getGroupsAdded()) - .groupsDeleted(getGroupsDeleted()) - .groupsUpdated(getGroupsUpdated()); - return builder; - } - - /** - * Class to build instances of {@link AdminsyncPrincipalResponse}. - */ - public static class Builder { - private List usersAdded; - private List usersDeleted; - private List usersUpdated; - private List groupsAdded; - private List groupsDeleted; - private List groupsUpdated; - - - - /** - * Setter for usersAdded. - * @param usersAdded List of String value for usersAdded. - * @return Builder - */ - public Builder usersAdded(List usersAdded) { - this.usersAdded = usersAdded; - return this; - } - - /** - * Setter for usersDeleted. - * @param usersDeleted List of String value for usersDeleted. - * @return Builder - */ - public Builder usersDeleted(List usersDeleted) { - this.usersDeleted = usersDeleted; - return this; - } - - /** - * Setter for usersUpdated. - * @param usersUpdated List of String value for usersUpdated. - * @return Builder - */ - public Builder usersUpdated(List usersUpdated) { - this.usersUpdated = usersUpdated; - return this; - } - - /** - * Setter for groupsAdded. - * @param groupsAdded List of String value for groupsAdded. - * @return Builder - */ - public Builder groupsAdded(List groupsAdded) { - this.groupsAdded = groupsAdded; - return this; - } - - /** - * Setter for groupsDeleted. - * @param groupsDeleted List of String value for groupsDeleted. - * @return Builder - */ - public Builder groupsDeleted(List groupsDeleted) { - this.groupsDeleted = groupsDeleted; - return this; - } - - /** - * Setter for groupsUpdated. - * @param groupsUpdated List of String value for groupsUpdated. - * @return Builder - */ - public Builder groupsUpdated(List groupsUpdated) { - this.groupsUpdated = groupsUpdated; - return this; - } - - /** - * Builds a new {@link AdminsyncPrincipalResponse} object using the set fields. - * @return {@link AdminsyncPrincipalResponse} - */ - public AdminsyncPrincipalResponse build() { - return new AdminsyncPrincipalResponse(usersAdded, usersDeleted, usersUpdated, - groupsAdded, groupsDeleted, groupsUpdated); - } - } -} diff --git a/Java/src/main/java/localhost/models/AnswerQueryResponse.java b/Java/src/main/java/localhost/models/AnswerQueryResponse.java deleted file mode 100644 index 439ecf393..000000000 --- a/Java/src/main/java/localhost/models/AnswerQueryResponse.java +++ /dev/null @@ -1,177 +0,0 @@ -/* - * ThoughtSpotPublicRESTAPILib - * - * This file was automatically generated by APIMATIC v3.0 ( https://www.apimatic.io ). - */ - -package localhost.models; - -import com.fasterxml.jackson.annotation.JsonGetter; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonSetter; -import io.apimatic.core.types.BaseModel; - -/** - * This is a model class for AnswerQueryResponse type. - */ -public class AnswerQueryResponse { - private String name; - private String id; - private String querySql; - - /** - * Default constructor. - */ - public AnswerQueryResponse() { - } - - /** - * Initialization constructor. - * @param name String value for name. - * @param id String value for id. - * @param querySql String value for querySql. - */ - public AnswerQueryResponse( - String name, - String id, - String querySql) { - this.name = name; - this.id = id; - this.querySql = querySql; - } - - /** - * Getter for Name. - * The name of the saved Answer - * @return Returns the String - */ - @JsonGetter("name") - @JsonInclude(JsonInclude.Include.NON_NULL) - public String getName() { - return name; - } - - /** - * Setter for Name. - * The name of the saved Answer - * @param name Value for String - */ - @JsonSetter("name") - public void setName(String name) { - this.name = name; - } - - /** - * Getter for Id. - * The GUID of the saved Answer - * @return Returns the String - */ - @JsonGetter("id") - @JsonInclude(JsonInclude.Include.NON_NULL) - public String getId() { - return id; - } - - /** - * Setter for Id. - * The GUID of the saved Answer - * @param id Value for String - */ - @JsonSetter("id") - public void setId(String id) { - this.id = id; - } - - /** - * Getter for QuerySql. - * SQL query associated with the saved Answer - * @return Returns the String - */ - @JsonGetter("querySql") - @JsonInclude(JsonInclude.Include.NON_NULL) - public String getQuerySql() { - return querySql; - } - - /** - * Setter for QuerySql. - * SQL query associated with the saved Answer - * @param querySql Value for String - */ - @JsonSetter("querySql") - public void setQuerySql(String querySql) { - this.querySql = querySql; - } - - /** - * Converts this AnswerQueryResponse into string format. - * @return String representation of this class - */ - @Override - public String toString() { - return "AnswerQueryResponse [" + "name=" + name + ", id=" + id + ", querySql=" + querySql - + "]"; - } - - /** - * Builds a new {@link AnswerQueryResponse.Builder} object. - * Creates the instance with the state of the current model. - * @return a new {@link AnswerQueryResponse.Builder} object - */ - public Builder toBuilder() { - Builder builder = new Builder() - .name(getName()) - .id(getId()) - .querySql(getQuerySql()); - return builder; - } - - /** - * Class to build instances of {@link AnswerQueryResponse}. - */ - public static class Builder { - private String name; - private String id; - private String querySql; - - - - /** - * Setter for name. - * @param name String value for name. - * @return Builder - */ - public Builder name(String name) { - this.name = name; - return this; - } - - /** - * Setter for id. - * @param id String value for id. - * @return Builder - */ - public Builder id(String id) { - this.id = id; - return this; - } - - /** - * Setter for querySql. - * @param querySql String value for querySql. - * @return Builder - */ - public Builder querySql(String querySql) { - this.querySql = querySql; - return this; - } - - /** - * Builds a new {@link AnswerQueryResponse} object using the set fields. - * @return {@link AnswerQueryResponse} - */ - public AnswerQueryResponse build() { - return new AnswerQueryResponse(name, id, querySql); - } - } -} diff --git a/Java/src/main/java/localhost/models/ClientState.java b/Java/src/main/java/localhost/models/ClientState.java deleted file mode 100644 index 21ffaf485..000000000 --- a/Java/src/main/java/localhost/models/ClientState.java +++ /dev/null @@ -1,102 +0,0 @@ -/* - * ThoughtSpotPublicRESTAPILib - * - * This file was automatically generated by APIMATIC v3.0 ( https://www.apimatic.io ). - */ - -package localhost.models; - -import com.fasterxml.jackson.annotation.JsonGetter; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonSetter; -import io.apimatic.core.types.BaseModel; - -/** - * This is a model class for ClientState type. - */ -public class ClientState { - private String color; - - /** - * Default constructor. - */ - public ClientState() { - } - - /** - * Initialization constructor. - * @param color String value for color. - */ - public ClientState( - String color) { - this.color = color; - } - - /** - * Getter for Color. - * Color assigned to the tag - * @return Returns the String - */ - @JsonGetter("color") - @JsonInclude(JsonInclude.Include.NON_NULL) - public String getColor() { - return color; - } - - /** - * Setter for Color. - * Color assigned to the tag - * @param color Value for String - */ - @JsonSetter("color") - public void setColor(String color) { - this.color = color; - } - - /** - * Converts this ClientState into string format. - * @return String representation of this class - */ - @Override - public String toString() { - return "ClientState [" + "color=" + color + "]"; - } - - /** - * Builds a new {@link ClientState.Builder} object. - * Creates the instance with the state of the current model. - * @return a new {@link ClientState.Builder} object - */ - public Builder toBuilder() { - Builder builder = new Builder() - .color(getColor()); - return builder; - } - - /** - * Class to build instances of {@link ClientState}. - */ - public static class Builder { - private String color; - - - - /** - * Setter for color. - * @param color String value for color. - * @return Builder - */ - public Builder color(String color) { - this.color = color; - return this; - } - - /** - * Builds a new {@link ClientState} object using the set fields. - * @return {@link ClientState} - */ - public ClientState build() { - return new ClientState(color); - } - } -} diff --git a/Java/src/main/java/localhost/models/ColumnsInput.java b/Java/src/main/java/localhost/models/ColumnsInput.java deleted file mode 100644 index 208ad2c41..000000000 --- a/Java/src/main/java/localhost/models/ColumnsInput.java +++ /dev/null @@ -1,148 +0,0 @@ -/* - * ThoughtSpotPublicRESTAPILib - * - * This file was automatically generated by APIMATIC v3.0 ( https://www.apimatic.io ). - */ - -package localhost.models; - -import com.fasterxml.jackson.annotation.JsonGetter; -import com.fasterxml.jackson.annotation.JsonSetter; -import io.apimatic.core.types.BaseModel; - -/** - * This is a model class for ColumnsInput type. - */ -public class ColumnsInput { - private String name; - private String dataType; - - /** - * Default constructor. - */ - public ColumnsInput() { - } - - /** - * Initialization constructor. - * @param name String value for name. - * @param dataType String value for dataType. - */ - public ColumnsInput( - String name, - String dataType) { - this.name = name; - this.dataType = dataType; - } - - /** - * Getter for Name. - * Name of the column - * @return Returns the String - */ - @JsonGetter("name") - public String getName() { - return name; - } - - /** - * Setter for Name. - * Name of the column - * @param name Value for String - */ - @JsonSetter("name") - public void setName(String name) { - this.name = name; - } - - /** - * Getter for DataType. - * Datatype of the column - * @return Returns the String - */ - @JsonGetter("dataType") - public String getDataType() { - return dataType; - } - - /** - * Setter for DataType. - * Datatype of the column - * @param dataType Value for String - */ - @JsonSetter("dataType") - public void setDataType(String dataType) { - this.dataType = dataType; - } - - /** - * Converts this ColumnsInput into string format. - * @return String representation of this class - */ - @Override - public String toString() { - return "ColumnsInput [" + "name=" + name + ", dataType=" + dataType + "]"; - } - - /** - * Builds a new {@link ColumnsInput.Builder} object. - * Creates the instance with the state of the current model. - * @return a new {@link ColumnsInput.Builder} object - */ - public Builder toBuilder() { - Builder builder = new Builder(name, dataType); - return builder; - } - - /** - * Class to build instances of {@link ColumnsInput}. - */ - public static class Builder { - private String name; - private String dataType; - - /** - * Initialization constructor. - */ - public Builder() { - } - - /** - * Initialization constructor. - * @param name String value for name. - * @param dataType String value for dataType. - */ - public Builder(String name, String dataType) { - this.name = name; - this.dataType = dataType; - } - - /** - * Setter for name. - * @param name String value for name. - * @return Builder - */ - public Builder name(String name) { - this.name = name; - return this; - } - - /** - * Setter for dataType. - * @param dataType String value for dataType. - * @return Builder - */ - public Builder dataType(String dataType) { - this.dataType = dataType; - return this; - } - - /** - * Builds a new {@link ColumnsInput} object using the set fields. - * @return {@link ColumnsInput} - */ - public ColumnsInput build() { - return new ColumnsInput(name, dataType); - } - } -} diff --git a/Java/src/main/java/localhost/models/ConnectionColumn.java b/Java/src/main/java/localhost/models/ConnectionColumn.java deleted file mode 100644 index 616109cf3..000000000 --- a/Java/src/main/java/localhost/models/ConnectionColumn.java +++ /dev/null @@ -1,178 +0,0 @@ -/* - * ThoughtSpotPublicRESTAPILib - * - * This file was automatically generated by APIMATIC v3.0 ( https://www.apimatic.io ). - */ - -package localhost.models; - -import com.fasterxml.jackson.annotation.JsonGetter; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonSetter; -import io.apimatic.core.types.BaseModel; -import java.util.List; - -/** - * This is a model class for ConnectionColumn type. - */ -public class ConnectionColumn { - private String name; - private String type; - private List column; - - /** - * Default constructor. - */ - public ConnectionColumn() { - } - - /** - * Initialization constructor. - * @param name String value for name. - * @param type String value for type. - * @param column List of TableColumns value for column. - */ - public ConnectionColumn( - String name, - String type, - List column) { - this.name = name; - this.type = type; - this.column = column; - } - - /** - * Getter for Name. - * Name of the table - * @return Returns the String - */ - @JsonGetter("name") - @JsonInclude(JsonInclude.Include.NON_NULL) - public String getName() { - return name; - } - - /** - * Setter for Name. - * Name of the table - * @param name Value for String - */ - @JsonSetter("name") - public void setName(String name) { - this.name = name; - } - - /** - * Getter for Type. - * Type of the Table - * @return Returns the String - */ - @JsonGetter("type") - @JsonInclude(JsonInclude.Include.NON_NULL) - public String getType() { - return type; - } - - /** - * Setter for Type. - * Type of the Table - * @param type Value for String - */ - @JsonSetter("type") - public void setType(String type) { - this.type = type; - } - - /** - * Getter for Column. - * List of columns in the table - * @return Returns the List of TableColumns - */ - @JsonGetter("column") - @JsonInclude(JsonInclude.Include.NON_NULL) - public List getColumn() { - return column; - } - - /** - * Setter for Column. - * List of columns in the table - * @param column Value for List of TableColumns - */ - @JsonSetter("column") - public void setColumn(List column) { - this.column = column; - } - - /** - * Converts this ConnectionColumn into string format. - * @return String representation of this class - */ - @Override - public String toString() { - return "ConnectionColumn [" + "name=" + name + ", type=" + type + ", column=" + column - + "]"; - } - - /** - * Builds a new {@link ConnectionColumn.Builder} object. - * Creates the instance with the state of the current model. - * @return a new {@link ConnectionColumn.Builder} object - */ - public Builder toBuilder() { - Builder builder = new Builder() - .name(getName()) - .type(getType()) - .column(getColumn()); - return builder; - } - - /** - * Class to build instances of {@link ConnectionColumn}. - */ - public static class Builder { - private String name; - private String type; - private List column; - - - - /** - * Setter for name. - * @param name String value for name. - * @return Builder - */ - public Builder name(String name) { - this.name = name; - return this; - } - - /** - * Setter for type. - * @param type String value for type. - * @return Builder - */ - public Builder type(String type) { - this.type = type; - return this; - } - - /** - * Setter for column. - * @param column List of TableColumns value for column. - * @return Builder - */ - public Builder column(List column) { - this.column = column; - return this; - } - - /** - * Builds a new {@link ConnectionColumn} object using the set fields. - * @return {@link ConnectionColumn} - */ - public ConnectionColumn build() { - return new ConnectionColumn(name, type, column); - } - } -} diff --git a/Java/src/main/java/localhost/models/ConnectionColumnsShema.java b/Java/src/main/java/localhost/models/ConnectionColumnsShema.java deleted file mode 100644 index fcdef96c4..000000000 --- a/Java/src/main/java/localhost/models/ConnectionColumnsShema.java +++ /dev/null @@ -1,215 +0,0 @@ -/* - * ThoughtSpotPublicRESTAPILib - * - * This file was automatically generated by APIMATIC v3.0 ( https://www.apimatic.io ). - */ - -package localhost.models; - -import com.fasterxml.jackson.annotation.JsonGetter; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonSetter; -import io.apimatic.core.types.BaseModel; -import java.util.List; - -/** - * This is a model class for ConnectionColumnsShema type. - */ -public class ConnectionColumnsShema { - private String name; - private String dbName; - private String schemaName; - private List columns; - - /** - * Default constructor. - */ - public ConnectionColumnsShema() { - } - - /** - * Initialization constructor. - * @param name String value for name. - * @param dbName String value for dbName. - * @param schemaName String value for schemaName. - * @param columns List of TableColumns value for columns. - */ - public ConnectionColumnsShema( - String name, - String dbName, - String schemaName, - List columns) { - this.name = name; - this.dbName = dbName; - this.schemaName = schemaName; - this.columns = columns; - } - - /** - * Getter for Name. - * Name of the table - * @return Returns the String - */ - @JsonGetter("name") - @JsonInclude(JsonInclude.Include.NON_NULL) - public String getName() { - return name; - } - - /** - * Setter for Name. - * Name of the table - * @param name Value for String - */ - @JsonSetter("name") - public void setName(String name) { - this.name = name; - } - - /** - * Getter for DbName. - * Name of the database - * @return Returns the String - */ - @JsonGetter("dbName") - @JsonInclude(JsonInclude.Include.NON_NULL) - public String getDbName() { - return dbName; - } - - /** - * Setter for DbName. - * Name of the database - * @param dbName Value for String - */ - @JsonSetter("dbName") - public void setDbName(String dbName) { - this.dbName = dbName; - } - - /** - * Getter for SchemaName. - * Name of the schema - * @return Returns the String - */ - @JsonGetter("schemaName") - @JsonInclude(JsonInclude.Include.NON_NULL) - public String getSchemaName() { - return schemaName; - } - - /** - * Setter for SchemaName. - * Name of the schema - * @param schemaName Value for String - */ - @JsonSetter("schemaName") - public void setSchemaName(String schemaName) { - this.schemaName = schemaName; - } - - /** - * Getter for Columns. - * List of columns in the table - * @return Returns the List of TableColumns - */ - @JsonGetter("columns") - @JsonInclude(JsonInclude.Include.NON_NULL) - public List getColumns() { - return columns; - } - - /** - * Setter for Columns. - * List of columns in the table - * @param columns Value for List of TableColumns - */ - @JsonSetter("columns") - public void setColumns(List columns) { - this.columns = columns; - } - - /** - * Converts this ConnectionColumnsShema into string format. - * @return String representation of this class - */ - @Override - public String toString() { - return "ConnectionColumnsShema [" + "name=" + name + ", dbName=" + dbName + ", schemaName=" - + schemaName + ", columns=" + columns + "]"; - } - - /** - * Builds a new {@link ConnectionColumnsShema.Builder} object. - * Creates the instance with the state of the current model. - * @return a new {@link ConnectionColumnsShema.Builder} object - */ - public Builder toBuilder() { - Builder builder = new Builder() - .name(getName()) - .dbName(getDbName()) - .schemaName(getSchemaName()) - .columns(getColumns()); - return builder; - } - - /** - * Class to build instances of {@link ConnectionColumnsShema}. - */ - public static class Builder { - private String name; - private String dbName; - private String schemaName; - private List columns; - - - - /** - * Setter for name. - * @param name String value for name. - * @return Builder - */ - public Builder name(String name) { - this.name = name; - return this; - } - - /** - * Setter for dbName. - * @param dbName String value for dbName. - * @return Builder - */ - public Builder dbName(String dbName) { - this.dbName = dbName; - return this; - } - - /** - * Setter for schemaName. - * @param schemaName String value for schemaName. - * @return Builder - */ - public Builder schemaName(String schemaName) { - this.schemaName = schemaName; - return this; - } - - /** - * Setter for columns. - * @param columns List of TableColumns value for columns. - * @return Builder - */ - public Builder columns(List columns) { - this.columns = columns; - return this; - } - - /** - * Builds a new {@link ConnectionColumnsShema} object using the set fields. - * @return {@link ConnectionColumnsShema} - */ - public ConnectionColumnsShema build() { - return new ConnectionColumnsShema(name, dbName, schemaName, columns); - } - } -} diff --git a/Java/src/main/java/localhost/models/ConnectionDatabaseType.java b/Java/src/main/java/localhost/models/ConnectionDatabaseType.java deleted file mode 100644 index 8a2c96b3b..000000000 --- a/Java/src/main/java/localhost/models/ConnectionDatabaseType.java +++ /dev/null @@ -1,140 +0,0 @@ -/* - * ThoughtSpotPublicRESTAPILib - * - * This file was automatically generated by APIMATIC v3.0 ( https://www.apimatic.io ). - */ - -package localhost.models; - -import com.fasterxml.jackson.annotation.JsonGetter; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonSetter; -import io.apimatic.core.types.BaseModel; -import java.util.List; - -/** - * This is a model class for ConnectionDatabaseType type. - */ -public class ConnectionDatabaseType { - private String name; - private List schema; - - /** - * Default constructor. - */ - public ConnectionDatabaseType() { - } - - /** - * Initialization constructor. - * @param name String value for name. - * @param schema List of ConnectionTableSchema value for schema. - */ - public ConnectionDatabaseType( - String name, - List schema) { - this.name = name; - this.schema = schema; - } - - /** - * Getter for Name. - * Name of the database - * @return Returns the String - */ - @JsonGetter("name") - @JsonInclude(JsonInclude.Include.NON_NULL) - public String getName() { - return name; - } - - /** - * Setter for Name. - * Name of the database - * @param name Value for String - */ - @JsonSetter("name") - public void setName(String name) { - this.name = name; - } - - /** - * Getter for Schema. - * List of schemas - * @return Returns the List of ConnectionTableSchema - */ - @JsonGetter("schema") - @JsonInclude(JsonInclude.Include.NON_NULL) - public List getSchema() { - return schema; - } - - /** - * Setter for Schema. - * List of schemas - * @param schema Value for List of ConnectionTableSchema - */ - @JsonSetter("schema") - public void setSchema(List schema) { - this.schema = schema; - } - - /** - * Converts this ConnectionDatabaseType into string format. - * @return String representation of this class - */ - @Override - public String toString() { - return "ConnectionDatabaseType [" + "name=" + name + ", schema=" + schema + "]"; - } - - /** - * Builds a new {@link ConnectionDatabaseType.Builder} object. - * Creates the instance with the state of the current model. - * @return a new {@link ConnectionDatabaseType.Builder} object - */ - public Builder toBuilder() { - Builder builder = new Builder() - .name(getName()) - .schema(getSchema()); - return builder; - } - - /** - * Class to build instances of {@link ConnectionDatabaseType}. - */ - public static class Builder { - private String name; - private List schema; - - - - /** - * Setter for name. - * @param name String value for name. - * @return Builder - */ - public Builder name(String name) { - this.name = name; - return this; - } - - /** - * Setter for schema. - * @param schema List of ConnectionTableSchema value for schema. - * @return Builder - */ - public Builder schema(List schema) { - this.schema = schema; - return this; - } - - /** - * Builds a new {@link ConnectionDatabaseType} object using the set fields. - * @return {@link ConnectionDatabaseType} - */ - public ConnectionDatabaseType build() { - return new ConnectionDatabaseType(name, schema); - } - } -} diff --git a/Java/src/main/java/localhost/models/ConnectionResponse.java b/Java/src/main/java/localhost/models/ConnectionResponse.java deleted file mode 100644 index 925617f5b..000000000 --- a/Java/src/main/java/localhost/models/ConnectionResponse.java +++ /dev/null @@ -1,841 +0,0 @@ -/* - * ThoughtSpotPublicRESTAPILib - * - * This file was automatically generated by APIMATIC v3.0 ( https://www.apimatic.io ). - */ - -package localhost.models; - -import com.fasterxml.jackson.annotation.JsonGetter; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonSetter; -import io.apimatic.core.types.BaseModel; -import java.util.List; - -/** - * This is a model class for ConnectionResponse type. - */ -public class ConnectionResponse { - private String name; - private String description; - private String type; - private String id; - private Boolean scheduled; - private String connectionType; - private String configuration; - private Boolean isExternal; - private Boolean isDeprecated; - private Boolean isDeleted; - private Boolean isHidden; - private Boolean complete; - private Double indexVersion; - private Double generationNum; - private String created; - private String modified; - private UserNameAndID author; - private UserNameAndID modifiedBy; - private UserNameAndID owner; - private List tags; - private List tables; - - /** - * Default constructor. - */ - public ConnectionResponse() { - } - - /** - * Initialization constructor. - * @param name String value for name. - * @param description String value for description. - * @param type String value for type. - * @param id String value for id. - * @param scheduled Boolean value for scheduled. - * @param connectionType String value for connectionType. - * @param configuration String value for configuration. - * @param isExternal Boolean value for isExternal. - * @param isDeprecated Boolean value for isDeprecated. - * @param isDeleted Boolean value for isDeleted. - * @param isHidden Boolean value for isHidden. - * @param complete Boolean value for complete. - * @param indexVersion Double value for indexVersion. - * @param generationNum Double value for generationNum. - * @param created String value for created. - * @param modified String value for modified. - * @param author UserNameAndID value for author. - * @param modifiedBy UserNameAndID value for modifiedBy. - * @param owner UserNameAndID value for owner. - * @param tags List of String value for tags. - * @param tables List of TableList value for tables. - */ - public ConnectionResponse( - String name, - String description, - String type, - String id, - Boolean scheduled, - String connectionType, - String configuration, - Boolean isExternal, - Boolean isDeprecated, - Boolean isDeleted, - Boolean isHidden, - Boolean complete, - Double indexVersion, - Double generationNum, - String created, - String modified, - UserNameAndID author, - UserNameAndID modifiedBy, - UserNameAndID owner, - List tags, - List tables) { - this.name = name; - this.description = description; - this.type = type; - this.id = id; - this.scheduled = scheduled; - this.connectionType = connectionType; - this.configuration = configuration; - this.isExternal = isExternal; - this.isDeprecated = isDeprecated; - this.isDeleted = isDeleted; - this.isHidden = isHidden; - this.complete = complete; - this.indexVersion = indexVersion; - this.generationNum = generationNum; - this.created = created; - this.modified = modified; - this.author = author; - this.modifiedBy = modifiedBy; - this.owner = owner; - this.tags = tags; - this.tables = tables; - } - - /** - * Getter for Name. - * Name of the connection - * @return Returns the String - */ - @JsonGetter("name") - @JsonInclude(JsonInclude.Include.NON_NULL) - public String getName() { - return name; - } - - /** - * Setter for Name. - * Name of the connection - * @param name Value for String - */ - @JsonSetter("name") - public void setName(String name) { - this.name = name; - } - - /** - * Getter for Description. - * Description associated with the connection - * @return Returns the String - */ - @JsonGetter("description") - @JsonInclude(JsonInclude.Include.NON_NULL) - public String getDescription() { - return description; - } - - /** - * Setter for Description. - * Description associated with the connection - * @param description Value for String - */ - @JsonSetter("description") - public void setDescription(String description) { - this.description = description; - } - - /** - * Getter for Type. - * Type of the connection. The database associated with this type can be obtained from the - * response returned by the /tspublic/rest/v2/connection/types API endpoint. - * @return Returns the String - */ - @JsonGetter("type") - @JsonInclude(JsonInclude.Include.NON_NULL) - public String getType() { - return type; - } - - /** - * Setter for Type. - * Type of the connection. The database associated with this type can be obtained from the - * response returned by the /tspublic/rest/v2/connection/types API endpoint. - * @param type Value for String - */ - @JsonSetter("type") - public void setType(String type) { - this.type = type; - } - - /** - * Getter for Id. - * GUID of the connection - * @return Returns the String - */ - @JsonGetter("id") - @JsonInclude(JsonInclude.Include.NON_NULL) - public String getId() { - return id; - } - - /** - * Setter for Id. - * GUID of the connection - * @param id Value for String - */ - @JsonSetter("id") - public void setId(String id) { - this.id = id; - } - - /** - * Getter for Scheduled. - * Indicates if the data sync is scheduled for this connection - * @return Returns the Boolean - */ - @JsonGetter("scheduled") - @JsonInclude(JsonInclude.Include.NON_NULL) - public Boolean getScheduled() { - return scheduled; - } - - /** - * Setter for Scheduled. - * Indicates if the data sync is scheduled for this connection - * @param scheduled Value for Boolean - */ - @JsonSetter("scheduled") - public void setScheduled(Boolean scheduled) { - this.scheduled = scheduled; - } - - /** - * Getter for ConnectionType. - * @return Returns the String - */ - @JsonGetter("connectionType") - @JsonInclude(JsonInclude.Include.NON_NULL) - public String getConnectionType() { - return connectionType; - } - - /** - * Setter for ConnectionType. - * @param connectionType Value for String - */ - @JsonSetter("connectionType") - public void setConnectionType(String connectionType) { - this.connectionType = connectionType; - } - - /** - * Getter for Configuration. - * Configuration properties of the connection - * @return Returns the String - */ - @JsonGetter("configuration") - @JsonInclude(JsonInclude.Include.NON_NULL) - public String getConfiguration() { - return configuration; - } - - /** - * Setter for Configuration. - * Configuration properties of the connection - * @param configuration Value for String - */ - @JsonSetter("configuration") - public void setConfiguration(String configuration) { - this.configuration = configuration; - } - - /** - * Getter for IsExternal. - * @return Returns the Boolean - */ - @JsonGetter("isExternal") - @JsonInclude(JsonInclude.Include.NON_NULL) - public Boolean getIsExternal() { - return isExternal; - } - - /** - * Setter for IsExternal. - * @param isExternal Value for Boolean - */ - @JsonSetter("isExternal") - public void setIsExternal(Boolean isExternal) { - this.isExternal = isExternal; - } - - /** - * Getter for IsDeprecated. - * Indicates if the connection is deprecated - * @return Returns the Boolean - */ - @JsonGetter("isDeprecated") - @JsonInclude(JsonInclude.Include.NON_NULL) - public Boolean getIsDeprecated() { - return isDeprecated; - } - - /** - * Setter for IsDeprecated. - * Indicates if the connection is deprecated - * @param isDeprecated Value for Boolean - */ - @JsonSetter("isDeprecated") - public void setIsDeprecated(Boolean isDeprecated) { - this.isDeprecated = isDeprecated; - } - - /** - * Getter for IsDeleted. - * Indicates if the connection is deleted - * @return Returns the Boolean - */ - @JsonGetter("isDeleted") - @JsonInclude(JsonInclude.Include.NON_NULL) - public Boolean getIsDeleted() { - return isDeleted; - } - - /** - * Setter for IsDeleted. - * Indicates if the connection is deleted - * @param isDeleted Value for Boolean - */ - @JsonSetter("isDeleted") - public void setIsDeleted(Boolean isDeleted) { - this.isDeleted = isDeleted; - } - - /** - * Getter for IsHidden. - * Indicates if the connection is hideen - * @return Returns the Boolean - */ - @JsonGetter("isHidden") - @JsonInclude(JsonInclude.Include.NON_NULL) - public Boolean getIsHidden() { - return isHidden; - } - - /** - * Setter for IsHidden. - * Indicates if the connection is hideen - * @param isHidden Value for Boolean - */ - @JsonSetter("isHidden") - public void setIsHidden(Boolean isHidden) { - this.isHidden = isHidden; - } - - /** - * Getter for Complete. - * Indicates if the all the properties of connection is provided - * @return Returns the Boolean - */ - @JsonGetter("complete") - @JsonInclude(JsonInclude.Include.NON_NULL) - public Boolean getComplete() { - return complete; - } - - /** - * Setter for Complete. - * Indicates if the all the properties of connection is provided - * @param complete Value for Boolean - */ - @JsonSetter("complete") - public void setComplete(Boolean complete) { - this.complete = complete; - } - - /** - * Getter for IndexVersion. - * @return Returns the Double - */ - @JsonGetter("indexVersion") - @JsonInclude(JsonInclude.Include.NON_NULL) - public Double getIndexVersion() { - return indexVersion; - } - - /** - * Setter for IndexVersion. - * @param indexVersion Value for Double - */ - @JsonSetter("indexVersion") - public void setIndexVersion(Double indexVersion) { - this.indexVersion = indexVersion; - } - - /** - * Getter for GenerationNum. - * @return Returns the Double - */ - @JsonGetter("generationNum") - @JsonInclude(JsonInclude.Include.NON_NULL) - public Double getGenerationNum() { - return generationNum; - } - - /** - * Setter for GenerationNum. - * @param generationNum Value for Double - */ - @JsonSetter("generationNum") - public void setGenerationNum(Double generationNum) { - this.generationNum = generationNum; - } - - /** - * Getter for Created. - * Date and time when the connection was created - * @return Returns the String - */ - @JsonGetter("created") - @JsonInclude(JsonInclude.Include.NON_NULL) - public String getCreated() { - return created; - } - - /** - * Setter for Created. - * Date and time when the connection was created - * @param created Value for String - */ - @JsonSetter("created") - public void setCreated(String created) { - this.created = created; - } - - /** - * Getter for Modified. - * Date and time of last modification of the connection - * @return Returns the String - */ - @JsonGetter("modified") - @JsonInclude(JsonInclude.Include.NON_NULL) - public String getModified() { - return modified; - } - - /** - * Setter for Modified. - * Date and time of last modification of the connection - * @param modified Value for String - */ - @JsonSetter("modified") - public void setModified(String modified) { - this.modified = modified; - } - - /** - * Getter for Author. - * @return Returns the UserNameAndID - */ - @JsonGetter("author") - @JsonInclude(JsonInclude.Include.NON_NULL) - public UserNameAndID getAuthor() { - return author; - } - - /** - * Setter for Author. - * @param author Value for UserNameAndID - */ - @JsonSetter("author") - public void setAuthor(UserNameAndID author) { - this.author = author; - } - - /** - * Getter for ModifiedBy. - * @return Returns the UserNameAndID - */ - @JsonGetter("modifiedBy") - @JsonInclude(JsonInclude.Include.NON_NULL) - public UserNameAndID getModifiedBy() { - return modifiedBy; - } - - /** - * Setter for ModifiedBy. - * @param modifiedBy Value for UserNameAndID - */ - @JsonSetter("modifiedBy") - public void setModifiedBy(UserNameAndID modifiedBy) { - this.modifiedBy = modifiedBy; - } - - /** - * Getter for Owner. - * @return Returns the UserNameAndID - */ - @JsonGetter("owner") - @JsonInclude(JsonInclude.Include.NON_NULL) - public UserNameAndID getOwner() { - return owner; - } - - /** - * Setter for Owner. - * @param owner Value for UserNameAndID - */ - @JsonSetter("owner") - public void setOwner(UserNameAndID owner) { - this.owner = owner; - } - - /** - * Getter for Tags. - * List of tags assigned to the connection - * @return Returns the List of String - */ - @JsonGetter("tags") - @JsonInclude(JsonInclude.Include.NON_NULL) - public List getTags() { - return tags; - } - - /** - * Setter for Tags. - * List of tags assigned to the connection - * @param tags Value for List of String - */ - @JsonSetter("tags") - public void setTags(List tags) { - this.tags = tags; - } - - /** - * Getter for Tables. - * List of tables linked to this connection - * @return Returns the List of TableList - */ - @JsonGetter("tables") - @JsonInclude(JsonInclude.Include.NON_NULL) - public List getTables() { - return tables; - } - - /** - * Setter for Tables. - * List of tables linked to this connection - * @param tables Value for List of TableList - */ - @JsonSetter("tables") - public void setTables(List tables) { - this.tables = tables; - } - - /** - * Converts this ConnectionResponse into string format. - * @return String representation of this class - */ - @Override - public String toString() { - return "ConnectionResponse [" + "name=" + name + ", description=" + description + ", type=" - + type + ", id=" + id + ", scheduled=" + scheduled + ", connectionType=" - + connectionType + ", configuration=" + configuration + ", isExternal=" + isExternal - + ", isDeprecated=" + isDeprecated + ", isDeleted=" + isDeleted + ", isHidden=" - + isHidden + ", complete=" + complete + ", indexVersion=" + indexVersion - + ", generationNum=" + generationNum + ", created=" + created + ", modified=" - + modified + ", author=" + author + ", modifiedBy=" + modifiedBy + ", owner=" - + owner + ", tags=" + tags + ", tables=" + tables + "]"; - } - - /** - * Builds a new {@link ConnectionResponse.Builder} object. - * Creates the instance with the state of the current model. - * @return a new {@link ConnectionResponse.Builder} object - */ - public Builder toBuilder() { - Builder builder = new Builder() - .name(getName()) - .description(getDescription()) - .type(getType()) - .id(getId()) - .scheduled(getScheduled()) - .connectionType(getConnectionType()) - .configuration(getConfiguration()) - .isExternal(getIsExternal()) - .isDeprecated(getIsDeprecated()) - .isDeleted(getIsDeleted()) - .isHidden(getIsHidden()) - .complete(getComplete()) - .indexVersion(getIndexVersion()) - .generationNum(getGenerationNum()) - .created(getCreated()) - .modified(getModified()) - .author(getAuthor()) - .modifiedBy(getModifiedBy()) - .owner(getOwner()) - .tags(getTags()) - .tables(getTables()); - return builder; - } - - /** - * Class to build instances of {@link ConnectionResponse}. - */ - public static class Builder { - private String name; - private String description; - private String type; - private String id; - private Boolean scheduled; - private String connectionType; - private String configuration; - private Boolean isExternal; - private Boolean isDeprecated; - private Boolean isDeleted; - private Boolean isHidden; - private Boolean complete; - private Double indexVersion; - private Double generationNum; - private String created; - private String modified; - private UserNameAndID author; - private UserNameAndID modifiedBy; - private UserNameAndID owner; - private List tags; - private List tables; - - - - /** - * Setter for name. - * @param name String value for name. - * @return Builder - */ - public Builder name(String name) { - this.name = name; - return this; - } - - /** - * Setter for description. - * @param description String value for description. - * @return Builder - */ - public Builder description(String description) { - this.description = description; - return this; - } - - /** - * Setter for type. - * @param type String value for type. - * @return Builder - */ - public Builder type(String type) { - this.type = type; - return this; - } - - /** - * Setter for id. - * @param id String value for id. - * @return Builder - */ - public Builder id(String id) { - this.id = id; - return this; - } - - /** - * Setter for scheduled. - * @param scheduled Boolean value for scheduled. - * @return Builder - */ - public Builder scheduled(Boolean scheduled) { - this.scheduled = scheduled; - return this; - } - - /** - * Setter for connectionType. - * @param connectionType String value for connectionType. - * @return Builder - */ - public Builder connectionType(String connectionType) { - this.connectionType = connectionType; - return this; - } - - /** - * Setter for configuration. - * @param configuration String value for configuration. - * @return Builder - */ - public Builder configuration(String configuration) { - this.configuration = configuration; - return this; - } - - /** - * Setter for isExternal. - * @param isExternal Boolean value for isExternal. - * @return Builder - */ - public Builder isExternal(Boolean isExternal) { - this.isExternal = isExternal; - return this; - } - - /** - * Setter for isDeprecated. - * @param isDeprecated Boolean value for isDeprecated. - * @return Builder - */ - public Builder isDeprecated(Boolean isDeprecated) { - this.isDeprecated = isDeprecated; - return this; - } - - /** - * Setter for isDeleted. - * @param isDeleted Boolean value for isDeleted. - * @return Builder - */ - public Builder isDeleted(Boolean isDeleted) { - this.isDeleted = isDeleted; - return this; - } - - /** - * Setter for isHidden. - * @param isHidden Boolean value for isHidden. - * @return Builder - */ - public Builder isHidden(Boolean isHidden) { - this.isHidden = isHidden; - return this; - } - - /** - * Setter for complete. - * @param complete Boolean value for complete. - * @return Builder - */ - public Builder complete(Boolean complete) { - this.complete = complete; - return this; - } - - /** - * Setter for indexVersion. - * @param indexVersion Double value for indexVersion. - * @return Builder - */ - public Builder indexVersion(Double indexVersion) { - this.indexVersion = indexVersion; - return this; - } - - /** - * Setter for generationNum. - * @param generationNum Double value for generationNum. - * @return Builder - */ - public Builder generationNum(Double generationNum) { - this.generationNum = generationNum; - return this; - } - - /** - * Setter for created. - * @param created String value for created. - * @return Builder - */ - public Builder created(String created) { - this.created = created; - return this; - } - - /** - * Setter for modified. - * @param modified String value for modified. - * @return Builder - */ - public Builder modified(String modified) { - this.modified = modified; - return this; - } - - /** - * Setter for author. - * @param author UserNameAndID value for author. - * @return Builder - */ - public Builder author(UserNameAndID author) { - this.author = author; - return this; - } - - /** - * Setter for modifiedBy. - * @param modifiedBy UserNameAndID value for modifiedBy. - * @return Builder - */ - public Builder modifiedBy(UserNameAndID modifiedBy) { - this.modifiedBy = modifiedBy; - return this; - } - - /** - * Setter for owner. - * @param owner UserNameAndID value for owner. - * @return Builder - */ - public Builder owner(UserNameAndID owner) { - this.owner = owner; - return this; - } - - /** - * Setter for tags. - * @param tags List of String value for tags. - * @return Builder - */ - public Builder tags(List tags) { - this.tags = tags; - return this; - } - - /** - * Setter for tables. - * @param tables List of TableList value for tables. - * @return Builder - */ - public Builder tables(List tables) { - this.tables = tables; - return this; - } - - /** - * Builds a new {@link ConnectionResponse} object using the set fields. - * @return {@link ConnectionResponse} - */ - public ConnectionResponse build() { - return new ConnectionResponse(name, description, type, id, scheduled, connectionType, - configuration, isExternal, isDeprecated, isDeleted, isHidden, complete, - indexVersion, generationNum, created, modified, author, modifiedBy, owner, tags, - tables); - } - } -} diff --git a/Java/src/main/java/localhost/models/ConnectionTableColumnsInput.java b/Java/src/main/java/localhost/models/ConnectionTableColumnsInput.java deleted file mode 100644 index 236e4fa14..000000000 --- a/Java/src/main/java/localhost/models/ConnectionTableColumnsInput.java +++ /dev/null @@ -1,186 +0,0 @@ -/* - * ThoughtSpotPublicRESTAPILib - * - * This file was automatically generated by APIMATIC v3.0 ( https://www.apimatic.io ). - */ - -package localhost.models; - -import com.fasterxml.jackson.annotation.JsonGetter; -import com.fasterxml.jackson.annotation.JsonSetter; -import io.apimatic.core.types.BaseModel; - -/** - * This is a model class for ConnectionTableColumnsInput type. - */ -public class ConnectionTableColumnsInput { - private String dbName; - private String schemaName; - private String name; - - /** - * Default constructor. - */ - public ConnectionTableColumnsInput() { - } - - /** - * Initialization constructor. - * @param dbName String value for dbName. - * @param schemaName String value for schemaName. - * @param name String value for name. - */ - public ConnectionTableColumnsInput( - String dbName, - String schemaName, - String name) { - this.dbName = dbName; - this.schemaName = schemaName; - this.name = name; - } - - /** - * Getter for DbName. - * Name of the database - * @return Returns the String - */ - @JsonGetter("dbName") - public String getDbName() { - return dbName; - } - - /** - * Setter for DbName. - * Name of the database - * @param dbName Value for String - */ - @JsonSetter("dbName") - public void setDbName(String dbName) { - this.dbName = dbName; - } - - /** - * Getter for SchemaName. - * Name of the schema - * @return Returns the String - */ - @JsonGetter("schemaName") - public String getSchemaName() { - return schemaName; - } - - /** - * Setter for SchemaName. - * Name of the schema - * @param schemaName Value for String - */ - @JsonSetter("schemaName") - public void setSchemaName(String schemaName) { - this.schemaName = schemaName; - } - - /** - * Getter for Name. - * Name of the table - * @return Returns the String - */ - @JsonGetter("name") - public String getName() { - return name; - } - - /** - * Setter for Name. - * Name of the table - * @param name Value for String - */ - @JsonSetter("name") - public void setName(String name) { - this.name = name; - } - - /** - * Converts this ConnectionTableColumnsInput into string format. - * @return String representation of this class - */ - @Override - public String toString() { - return "ConnectionTableColumnsInput [" + "dbName=" + dbName + ", schemaName=" + schemaName - + ", name=" + name + "]"; - } - - /** - * Builds a new {@link ConnectionTableColumnsInput.Builder} object. - * Creates the instance with the state of the current model. - * @return a new {@link ConnectionTableColumnsInput.Builder} object - */ - public Builder toBuilder() { - Builder builder = new Builder(dbName, schemaName, name); - return builder; - } - - /** - * Class to build instances of {@link ConnectionTableColumnsInput}. - */ - public static class Builder { - private String dbName; - private String schemaName; - private String name; - - /** - * Initialization constructor. - */ - public Builder() { - } - - /** - * Initialization constructor. - * @param dbName String value for dbName. - * @param schemaName String value for schemaName. - * @param name String value for name. - */ - public Builder(String dbName, String schemaName, String name) { - this.dbName = dbName; - this.schemaName = schemaName; - this.name = name; - } - - /** - * Setter for dbName. - * @param dbName String value for dbName. - * @return Builder - */ - public Builder dbName(String dbName) { - this.dbName = dbName; - return this; - } - - /** - * Setter for schemaName. - * @param schemaName String value for schemaName. - * @return Builder - */ - public Builder schemaName(String schemaName) { - this.schemaName = schemaName; - return this; - } - - /** - * Setter for name. - * @param name String value for name. - * @return Builder - */ - public Builder name(String name) { - this.name = name; - return this; - } - - /** - * Builds a new {@link ConnectionTableColumnsInput} object using the set fields. - * @return {@link ConnectionTableColumnsInput} - */ - public ConnectionTableColumnsInput build() { - return new ConnectionTableColumnsInput(dbName, schemaName, name); - } - } -} diff --git a/Java/src/main/java/localhost/models/ConnectionTableColumnsResponse.java b/Java/src/main/java/localhost/models/ConnectionTableColumnsResponse.java deleted file mode 100644 index 1758eb482..000000000 --- a/Java/src/main/java/localhost/models/ConnectionTableColumnsResponse.java +++ /dev/null @@ -1,140 +0,0 @@ -/* - * ThoughtSpotPublicRESTAPILib - * - * This file was automatically generated by APIMATIC v3.0 ( https://www.apimatic.io ). - */ - -package localhost.models; - -import com.fasterxml.jackson.annotation.JsonGetter; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonSetter; -import io.apimatic.core.types.BaseModel; -import java.util.List; - -/** - * This is a model class for ConnectionTableColumnsResponse type. - */ -public class ConnectionTableColumnsResponse { - private String id; - private List table; - - /** - * Default constructor. - */ - public ConnectionTableColumnsResponse() { - } - - /** - * Initialization constructor. - * @param id String value for id. - * @param table List of ConnectionColumnsShema value for table. - */ - public ConnectionTableColumnsResponse( - String id, - List table) { - this.id = id; - this.table = table; - } - - /** - * Getter for Id. - * Connection id - * @return Returns the String - */ - @JsonGetter("id") - @JsonInclude(JsonInclude.Include.NON_NULL) - public String getId() { - return id; - } - - /** - * Setter for Id. - * Connection id - * @param id Value for String - */ - @JsonSetter("id") - public void setId(String id) { - this.id = id; - } - - /** - * Getter for Table. - * List of table details - * @return Returns the List of ConnectionColumnsShema - */ - @JsonGetter("table") - @JsonInclude(JsonInclude.Include.NON_NULL) - public List getTable() { - return table; - } - - /** - * Setter for Table. - * List of table details - * @param table Value for List of ConnectionColumnsShema - */ - @JsonSetter("table") - public void setTable(List table) { - this.table = table; - } - - /** - * Converts this ConnectionTableColumnsResponse into string format. - * @return String representation of this class - */ - @Override - public String toString() { - return "ConnectionTableColumnsResponse [" + "id=" + id + ", table=" + table + "]"; - } - - /** - * Builds a new {@link ConnectionTableColumnsResponse.Builder} object. - * Creates the instance with the state of the current model. - * @return a new {@link ConnectionTableColumnsResponse.Builder} object - */ - public Builder toBuilder() { - Builder builder = new Builder() - .id(getId()) - .table(getTable()); - return builder; - } - - /** - * Class to build instances of {@link ConnectionTableColumnsResponse}. - */ - public static class Builder { - private String id; - private List table; - - - - /** - * Setter for id. - * @param id String value for id. - * @return Builder - */ - public Builder id(String id) { - this.id = id; - return this; - } - - /** - * Setter for table. - * @param table List of ConnectionColumnsShema value for table. - * @return Builder - */ - public Builder table(List table) { - this.table = table; - return this; - } - - /** - * Builds a new {@link ConnectionTableColumnsResponse} object using the set fields. - * @return {@link ConnectionTableColumnsResponse} - */ - public ConnectionTableColumnsResponse build() { - return new ConnectionTableColumnsResponse(id, table); - } - } -} diff --git a/Java/src/main/java/localhost/models/ConnectionTableResponse.java b/Java/src/main/java/localhost/models/ConnectionTableResponse.java deleted file mode 100644 index 2bbf121d5..000000000 --- a/Java/src/main/java/localhost/models/ConnectionTableResponse.java +++ /dev/null @@ -1,140 +0,0 @@ -/* - * ThoughtSpotPublicRESTAPILib - * - * This file was automatically generated by APIMATIC v3.0 ( https://www.apimatic.io ). - */ - -package localhost.models; - -import com.fasterxml.jackson.annotation.JsonGetter; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonSetter; -import io.apimatic.core.types.BaseModel; -import java.util.List; - -/** - * This is a model class for ConnectionTableResponse type. - */ -public class ConnectionTableResponse { - private String id; - private List database; - - /** - * Default constructor. - */ - public ConnectionTableResponse() { - } - - /** - * Initialization constructor. - * @param id String value for id. - * @param database List of ConnectionDatabaseType value for database. - */ - public ConnectionTableResponse( - String id, - List database) { - this.id = id; - this.database = database; - } - - /** - * Getter for Id. - * Connection id - * @return Returns the String - */ - @JsonGetter("id") - @JsonInclude(JsonInclude.Include.NON_NULL) - public String getId() { - return id; - } - - /** - * Setter for Id. - * Connection id - * @param id Value for String - */ - @JsonSetter("id") - public void setId(String id) { - this.id = id; - } - - /** - * Getter for Database. - * List of databases - * @return Returns the List of ConnectionDatabaseType - */ - @JsonGetter("database") - @JsonInclude(JsonInclude.Include.NON_NULL) - public List getDatabase() { - return database; - } - - /** - * Setter for Database. - * List of databases - * @param database Value for List of ConnectionDatabaseType - */ - @JsonSetter("database") - public void setDatabase(List database) { - this.database = database; - } - - /** - * Converts this ConnectionTableResponse into string format. - * @return String representation of this class - */ - @Override - public String toString() { - return "ConnectionTableResponse [" + "id=" + id + ", database=" + database + "]"; - } - - /** - * Builds a new {@link ConnectionTableResponse.Builder} object. - * Creates the instance with the state of the current model. - * @return a new {@link ConnectionTableResponse.Builder} object - */ - public Builder toBuilder() { - Builder builder = new Builder() - .id(getId()) - .database(getDatabase()); - return builder; - } - - /** - * Class to build instances of {@link ConnectionTableResponse}. - */ - public static class Builder { - private String id; - private List database; - - - - /** - * Setter for id. - * @param id String value for id. - * @return Builder - */ - public Builder id(String id) { - this.id = id; - return this; - } - - /** - * Setter for database. - * @param database List of ConnectionDatabaseType value for database. - * @return Builder - */ - public Builder database(List database) { - this.database = database; - return this; - } - - /** - * Builds a new {@link ConnectionTableResponse} object using the set fields. - * @return {@link ConnectionTableResponse} - */ - public ConnectionTableResponse build() { - return new ConnectionTableResponse(id, database); - } - } -} diff --git a/Java/src/main/java/localhost/models/ConnectionTableSchema.java b/Java/src/main/java/localhost/models/ConnectionTableSchema.java deleted file mode 100644 index 75206bae2..000000000 --- a/Java/src/main/java/localhost/models/ConnectionTableSchema.java +++ /dev/null @@ -1,140 +0,0 @@ -/* - * ThoughtSpotPublicRESTAPILib - * - * This file was automatically generated by APIMATIC v3.0 ( https://www.apimatic.io ). - */ - -package localhost.models; - -import com.fasterxml.jackson.annotation.JsonGetter; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonSetter; -import io.apimatic.core.types.BaseModel; -import java.util.List; - -/** - * This is a model class for ConnectionTableSchema type. - */ -public class ConnectionTableSchema { - private String name; - private List table; - - /** - * Default constructor. - */ - public ConnectionTableSchema() { - } - - /** - * Initialization constructor. - * @param name String value for name. - * @param table List of ConnectionColumn value for table. - */ - public ConnectionTableSchema( - String name, - List table) { - this.name = name; - this.table = table; - } - - /** - * Getter for Name. - * Name of the schema - * @return Returns the String - */ - @JsonGetter("name") - @JsonInclude(JsonInclude.Include.NON_NULL) - public String getName() { - return name; - } - - /** - * Setter for Name. - * Name of the schema - * @param name Value for String - */ - @JsonSetter("name") - public void setName(String name) { - this.name = name; - } - - /** - * Getter for Table. - * List of table details - * @return Returns the List of ConnectionColumn - */ - @JsonGetter("table") - @JsonInclude(JsonInclude.Include.NON_NULL) - public List getTable() { - return table; - } - - /** - * Setter for Table. - * List of table details - * @param table Value for List of ConnectionColumn - */ - @JsonSetter("table") - public void setTable(List table) { - this.table = table; - } - - /** - * Converts this ConnectionTableSchema into string format. - * @return String representation of this class - */ - @Override - public String toString() { - return "ConnectionTableSchema [" + "name=" + name + ", table=" + table + "]"; - } - - /** - * Builds a new {@link ConnectionTableSchema.Builder} object. - * Creates the instance with the state of the current model. - * @return a new {@link ConnectionTableSchema.Builder} object - */ - public Builder toBuilder() { - Builder builder = new Builder() - .name(getName()) - .table(getTable()); - return builder; - } - - /** - * Class to build instances of {@link ConnectionTableSchema}. - */ - public static class Builder { - private String name; - private List table; - - - - /** - * Setter for name. - * @param name String value for name. - * @return Builder - */ - public Builder name(String name) { - this.name = name; - return this; - } - - /** - * Setter for table. - * @param table List of ConnectionColumn value for table. - * @return Builder - */ - public Builder table(List table) { - this.table = table; - return this; - } - - /** - * Builds a new {@link ConnectionTableSchema} object using the set fields. - * @return {@link ConnectionTableSchema} - */ - public ConnectionTableSchema build() { - return new ConnectionTableSchema(name, table); - } - } -} diff --git a/Java/src/main/java/localhost/models/CreateConnectionResponse.java b/Java/src/main/java/localhost/models/CreateConnectionResponse.java deleted file mode 100644 index d6eb7a463..000000000 --- a/Java/src/main/java/localhost/models/CreateConnectionResponse.java +++ /dev/null @@ -1,841 +0,0 @@ -/* - * ThoughtSpotPublicRESTAPILib - * - * This file was automatically generated by APIMATIC v3.0 ( https://www.apimatic.io ). - */ - -package localhost.models; - -import com.fasterxml.jackson.annotation.JsonGetter; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonSetter; -import io.apimatic.core.types.BaseModel; -import java.util.List; - -/** - * This is a model class for CreateConnectionResponse type. - */ -public class CreateConnectionResponse { - private String name; - private String description; - private String type; - private String id; - private Boolean scheduled; - private String connectionType; - private String configuration; - private Boolean isExternal; - private Boolean isDeprecated; - private Boolean isDeleted; - private Boolean isHidden; - private Boolean complete; - private Double indexVersion; - private Double generationNum; - private String created; - private String modified; - private UserNameAndID author; - private UserNameAndID modifiedBy; - private UserNameAndID owner; - private List tags; - private List tables; - - /** - * Default constructor. - */ - public CreateConnectionResponse() { - } - - /** - * Initialization constructor. - * @param name String value for name. - * @param description String value for description. - * @param type String value for type. - * @param id String value for id. - * @param scheduled Boolean value for scheduled. - * @param connectionType String value for connectionType. - * @param configuration String value for configuration. - * @param isExternal Boolean value for isExternal. - * @param isDeprecated Boolean value for isDeprecated. - * @param isDeleted Boolean value for isDeleted. - * @param isHidden Boolean value for isHidden. - * @param complete Boolean value for complete. - * @param indexVersion Double value for indexVersion. - * @param generationNum Double value for generationNum. - * @param created String value for created. - * @param modified String value for modified. - * @param author UserNameAndID value for author. - * @param modifiedBy UserNameAndID value for modifiedBy. - * @param owner UserNameAndID value for owner. - * @param tags List of String value for tags. - * @param tables List of String value for tables. - */ - public CreateConnectionResponse( - String name, - String description, - String type, - String id, - Boolean scheduled, - String connectionType, - String configuration, - Boolean isExternal, - Boolean isDeprecated, - Boolean isDeleted, - Boolean isHidden, - Boolean complete, - Double indexVersion, - Double generationNum, - String created, - String modified, - UserNameAndID author, - UserNameAndID modifiedBy, - UserNameAndID owner, - List tags, - List tables) { - this.name = name; - this.description = description; - this.type = type; - this.id = id; - this.scheduled = scheduled; - this.connectionType = connectionType; - this.configuration = configuration; - this.isExternal = isExternal; - this.isDeprecated = isDeprecated; - this.isDeleted = isDeleted; - this.isHidden = isHidden; - this.complete = complete; - this.indexVersion = indexVersion; - this.generationNum = generationNum; - this.created = created; - this.modified = modified; - this.author = author; - this.modifiedBy = modifiedBy; - this.owner = owner; - this.tags = tags; - this.tables = tables; - } - - /** - * Getter for Name. - * Name of the connection - * @return Returns the String - */ - @JsonGetter("name") - @JsonInclude(JsonInclude.Include.NON_NULL) - public String getName() { - return name; - } - - /** - * Setter for Name. - * Name of the connection - * @param name Value for String - */ - @JsonSetter("name") - public void setName(String name) { - this.name = name; - } - - /** - * Getter for Description. - * Description associated with the connection - * @return Returns the String - */ - @JsonGetter("description") - @JsonInclude(JsonInclude.Include.NON_NULL) - public String getDescription() { - return description; - } - - /** - * Setter for Description. - * Description associated with the connection - * @param description Value for String - */ - @JsonSetter("description") - public void setDescription(String description) { - this.description = description; - } - - /** - * Getter for Type. - * Type of the connection. The database associated with this type can be obtained from the - * response returned by the /tspublic/rest/v2/connection/types API endpoint. - * @return Returns the String - */ - @JsonGetter("type") - @JsonInclude(JsonInclude.Include.NON_NULL) - public String getType() { - return type; - } - - /** - * Setter for Type. - * Type of the connection. The database associated with this type can be obtained from the - * response returned by the /tspublic/rest/v2/connection/types API endpoint. - * @param type Value for String - */ - @JsonSetter("type") - public void setType(String type) { - this.type = type; - } - - /** - * Getter for Id. - * GUID of the connection - * @return Returns the String - */ - @JsonGetter("id") - @JsonInclude(JsonInclude.Include.NON_NULL) - public String getId() { - return id; - } - - /** - * Setter for Id. - * GUID of the connection - * @param id Value for String - */ - @JsonSetter("id") - public void setId(String id) { - this.id = id; - } - - /** - * Getter for Scheduled. - * Indicates if the data sync is scheduled for this connection - * @return Returns the Boolean - */ - @JsonGetter("scheduled") - @JsonInclude(JsonInclude.Include.NON_NULL) - public Boolean getScheduled() { - return scheduled; - } - - /** - * Setter for Scheduled. - * Indicates if the data sync is scheduled for this connection - * @param scheduled Value for Boolean - */ - @JsonSetter("scheduled") - public void setScheduled(Boolean scheduled) { - this.scheduled = scheduled; - } - - /** - * Getter for ConnectionType. - * @return Returns the String - */ - @JsonGetter("connectionType") - @JsonInclude(JsonInclude.Include.NON_NULL) - public String getConnectionType() { - return connectionType; - } - - /** - * Setter for ConnectionType. - * @param connectionType Value for String - */ - @JsonSetter("connectionType") - public void setConnectionType(String connectionType) { - this.connectionType = connectionType; - } - - /** - * Getter for Configuration. - * Configuration properties of the connection - * @return Returns the String - */ - @JsonGetter("configuration") - @JsonInclude(JsonInclude.Include.NON_NULL) - public String getConfiguration() { - return configuration; - } - - /** - * Setter for Configuration. - * Configuration properties of the connection - * @param configuration Value for String - */ - @JsonSetter("configuration") - public void setConfiguration(String configuration) { - this.configuration = configuration; - } - - /** - * Getter for IsExternal. - * @return Returns the Boolean - */ - @JsonGetter("isExternal") - @JsonInclude(JsonInclude.Include.NON_NULL) - public Boolean getIsExternal() { - return isExternal; - } - - /** - * Setter for IsExternal. - * @param isExternal Value for Boolean - */ - @JsonSetter("isExternal") - public void setIsExternal(Boolean isExternal) { - this.isExternal = isExternal; - } - - /** - * Getter for IsDeprecated. - * Indicates if the connection is deprecated - * @return Returns the Boolean - */ - @JsonGetter("isDeprecated") - @JsonInclude(JsonInclude.Include.NON_NULL) - public Boolean getIsDeprecated() { - return isDeprecated; - } - - /** - * Setter for IsDeprecated. - * Indicates if the connection is deprecated - * @param isDeprecated Value for Boolean - */ - @JsonSetter("isDeprecated") - public void setIsDeprecated(Boolean isDeprecated) { - this.isDeprecated = isDeprecated; - } - - /** - * Getter for IsDeleted. - * Indicates if the connection is deleted - * @return Returns the Boolean - */ - @JsonGetter("isDeleted") - @JsonInclude(JsonInclude.Include.NON_NULL) - public Boolean getIsDeleted() { - return isDeleted; - } - - /** - * Setter for IsDeleted. - * Indicates if the connection is deleted - * @param isDeleted Value for Boolean - */ - @JsonSetter("isDeleted") - public void setIsDeleted(Boolean isDeleted) { - this.isDeleted = isDeleted; - } - - /** - * Getter for IsHidden. - * Indicates if the connection is hideen - * @return Returns the Boolean - */ - @JsonGetter("isHidden") - @JsonInclude(JsonInclude.Include.NON_NULL) - public Boolean getIsHidden() { - return isHidden; - } - - /** - * Setter for IsHidden. - * Indicates if the connection is hideen - * @param isHidden Value for Boolean - */ - @JsonSetter("isHidden") - public void setIsHidden(Boolean isHidden) { - this.isHidden = isHidden; - } - - /** - * Getter for Complete. - * Indicates if the all the properties of connection is provided - * @return Returns the Boolean - */ - @JsonGetter("complete") - @JsonInclude(JsonInclude.Include.NON_NULL) - public Boolean getComplete() { - return complete; - } - - /** - * Setter for Complete. - * Indicates if the all the properties of connection is provided - * @param complete Value for Boolean - */ - @JsonSetter("complete") - public void setComplete(Boolean complete) { - this.complete = complete; - } - - /** - * Getter for IndexVersion. - * @return Returns the Double - */ - @JsonGetter("indexVersion") - @JsonInclude(JsonInclude.Include.NON_NULL) - public Double getIndexVersion() { - return indexVersion; - } - - /** - * Setter for IndexVersion. - * @param indexVersion Value for Double - */ - @JsonSetter("indexVersion") - public void setIndexVersion(Double indexVersion) { - this.indexVersion = indexVersion; - } - - /** - * Getter for GenerationNum. - * @return Returns the Double - */ - @JsonGetter("generationNum") - @JsonInclude(JsonInclude.Include.NON_NULL) - public Double getGenerationNum() { - return generationNum; - } - - /** - * Setter for GenerationNum. - * @param generationNum Value for Double - */ - @JsonSetter("generationNum") - public void setGenerationNum(Double generationNum) { - this.generationNum = generationNum; - } - - /** - * Getter for Created. - * Date and time when user account was created - * @return Returns the String - */ - @JsonGetter("created") - @JsonInclude(JsonInclude.Include.NON_NULL) - public String getCreated() { - return created; - } - - /** - * Setter for Created. - * Date and time when user account was created - * @param created Value for String - */ - @JsonSetter("created") - public void setCreated(String created) { - this.created = created; - } - - /** - * Getter for Modified. - * Date and time of last modification of user account - * @return Returns the String - */ - @JsonGetter("modified") - @JsonInclude(JsonInclude.Include.NON_NULL) - public String getModified() { - return modified; - } - - /** - * Setter for Modified. - * Date and time of last modification of user account - * @param modified Value for String - */ - @JsonSetter("modified") - public void setModified(String modified) { - this.modified = modified; - } - - /** - * Getter for Author. - * @return Returns the UserNameAndID - */ - @JsonGetter("author") - @JsonInclude(JsonInclude.Include.NON_NULL) - public UserNameAndID getAuthor() { - return author; - } - - /** - * Setter for Author. - * @param author Value for UserNameAndID - */ - @JsonSetter("author") - public void setAuthor(UserNameAndID author) { - this.author = author; - } - - /** - * Getter for ModifiedBy. - * @return Returns the UserNameAndID - */ - @JsonGetter("modifiedBy") - @JsonInclude(JsonInclude.Include.NON_NULL) - public UserNameAndID getModifiedBy() { - return modifiedBy; - } - - /** - * Setter for ModifiedBy. - * @param modifiedBy Value for UserNameAndID - */ - @JsonSetter("modifiedBy") - public void setModifiedBy(UserNameAndID modifiedBy) { - this.modifiedBy = modifiedBy; - } - - /** - * Getter for Owner. - * @return Returns the UserNameAndID - */ - @JsonGetter("owner") - @JsonInclude(JsonInclude.Include.NON_NULL) - public UserNameAndID getOwner() { - return owner; - } - - /** - * Setter for Owner. - * @param owner Value for UserNameAndID - */ - @JsonSetter("owner") - public void setOwner(UserNameAndID owner) { - this.owner = owner; - } - - /** - * Getter for Tags. - * List of tags assigned to the connection - * @return Returns the List of String - */ - @JsonGetter("tags") - @JsonInclude(JsonInclude.Include.NON_NULL) - public List getTags() { - return tags; - } - - /** - * Setter for Tags. - * List of tags assigned to the connection - * @param tags Value for List of String - */ - @JsonSetter("tags") - public void setTags(List tags) { - this.tags = tags; - } - - /** - * Getter for Tables. - * List of tables linked to this connection and details of the columns in the table - * @return Returns the List of String - */ - @JsonGetter("tables") - @JsonInclude(JsonInclude.Include.NON_NULL) - public List getTables() { - return tables; - } - - /** - * Setter for Tables. - * List of tables linked to this connection and details of the columns in the table - * @param tables Value for List of String - */ - @JsonSetter("tables") - public void setTables(List tables) { - this.tables = tables; - } - - /** - * Converts this CreateConnectionResponse into string format. - * @return String representation of this class - */ - @Override - public String toString() { - return "CreateConnectionResponse [" + "name=" + name + ", description=" + description - + ", type=" + type + ", id=" + id + ", scheduled=" + scheduled + ", connectionType=" - + connectionType + ", configuration=" + configuration + ", isExternal=" + isExternal - + ", isDeprecated=" + isDeprecated + ", isDeleted=" + isDeleted + ", isHidden=" - + isHidden + ", complete=" + complete + ", indexVersion=" + indexVersion - + ", generationNum=" + generationNum + ", created=" + created + ", modified=" - + modified + ", author=" + author + ", modifiedBy=" + modifiedBy + ", owner=" - + owner + ", tags=" + tags + ", tables=" + tables + "]"; - } - - /** - * Builds a new {@link CreateConnectionResponse.Builder} object. - * Creates the instance with the state of the current model. - * @return a new {@link CreateConnectionResponse.Builder} object - */ - public Builder toBuilder() { - Builder builder = new Builder() - .name(getName()) - .description(getDescription()) - .type(getType()) - .id(getId()) - .scheduled(getScheduled()) - .connectionType(getConnectionType()) - .configuration(getConfiguration()) - .isExternal(getIsExternal()) - .isDeprecated(getIsDeprecated()) - .isDeleted(getIsDeleted()) - .isHidden(getIsHidden()) - .complete(getComplete()) - .indexVersion(getIndexVersion()) - .generationNum(getGenerationNum()) - .created(getCreated()) - .modified(getModified()) - .author(getAuthor()) - .modifiedBy(getModifiedBy()) - .owner(getOwner()) - .tags(getTags()) - .tables(getTables()); - return builder; - } - - /** - * Class to build instances of {@link CreateConnectionResponse}. - */ - public static class Builder { - private String name; - private String description; - private String type; - private String id; - private Boolean scheduled; - private String connectionType; - private String configuration; - private Boolean isExternal; - private Boolean isDeprecated; - private Boolean isDeleted; - private Boolean isHidden; - private Boolean complete; - private Double indexVersion; - private Double generationNum; - private String created; - private String modified; - private UserNameAndID author; - private UserNameAndID modifiedBy; - private UserNameAndID owner; - private List tags; - private List tables; - - - - /** - * Setter for name. - * @param name String value for name. - * @return Builder - */ - public Builder name(String name) { - this.name = name; - return this; - } - - /** - * Setter for description. - * @param description String value for description. - * @return Builder - */ - public Builder description(String description) { - this.description = description; - return this; - } - - /** - * Setter for type. - * @param type String value for type. - * @return Builder - */ - public Builder type(String type) { - this.type = type; - return this; - } - - /** - * Setter for id. - * @param id String value for id. - * @return Builder - */ - public Builder id(String id) { - this.id = id; - return this; - } - - /** - * Setter for scheduled. - * @param scheduled Boolean value for scheduled. - * @return Builder - */ - public Builder scheduled(Boolean scheduled) { - this.scheduled = scheduled; - return this; - } - - /** - * Setter for connectionType. - * @param connectionType String value for connectionType. - * @return Builder - */ - public Builder connectionType(String connectionType) { - this.connectionType = connectionType; - return this; - } - - /** - * Setter for configuration. - * @param configuration String value for configuration. - * @return Builder - */ - public Builder configuration(String configuration) { - this.configuration = configuration; - return this; - } - - /** - * Setter for isExternal. - * @param isExternal Boolean value for isExternal. - * @return Builder - */ - public Builder isExternal(Boolean isExternal) { - this.isExternal = isExternal; - return this; - } - - /** - * Setter for isDeprecated. - * @param isDeprecated Boolean value for isDeprecated. - * @return Builder - */ - public Builder isDeprecated(Boolean isDeprecated) { - this.isDeprecated = isDeprecated; - return this; - } - - /** - * Setter for isDeleted. - * @param isDeleted Boolean value for isDeleted. - * @return Builder - */ - public Builder isDeleted(Boolean isDeleted) { - this.isDeleted = isDeleted; - return this; - } - - /** - * Setter for isHidden. - * @param isHidden Boolean value for isHidden. - * @return Builder - */ - public Builder isHidden(Boolean isHidden) { - this.isHidden = isHidden; - return this; - } - - /** - * Setter for complete. - * @param complete Boolean value for complete. - * @return Builder - */ - public Builder complete(Boolean complete) { - this.complete = complete; - return this; - } - - /** - * Setter for indexVersion. - * @param indexVersion Double value for indexVersion. - * @return Builder - */ - public Builder indexVersion(Double indexVersion) { - this.indexVersion = indexVersion; - return this; - } - - /** - * Setter for generationNum. - * @param generationNum Double value for generationNum. - * @return Builder - */ - public Builder generationNum(Double generationNum) { - this.generationNum = generationNum; - return this; - } - - /** - * Setter for created. - * @param created String value for created. - * @return Builder - */ - public Builder created(String created) { - this.created = created; - return this; - } - - /** - * Setter for modified. - * @param modified String value for modified. - * @return Builder - */ - public Builder modified(String modified) { - this.modified = modified; - return this; - } - - /** - * Setter for author. - * @param author UserNameAndID value for author. - * @return Builder - */ - public Builder author(UserNameAndID author) { - this.author = author; - return this; - } - - /** - * Setter for modifiedBy. - * @param modifiedBy UserNameAndID value for modifiedBy. - * @return Builder - */ - public Builder modifiedBy(UserNameAndID modifiedBy) { - this.modifiedBy = modifiedBy; - return this; - } - - /** - * Setter for owner. - * @param owner UserNameAndID value for owner. - * @return Builder - */ - public Builder owner(UserNameAndID owner) { - this.owner = owner; - return this; - } - - /** - * Setter for tags. - * @param tags List of String value for tags. - * @return Builder - */ - public Builder tags(List tags) { - this.tags = tags; - return this; - } - - /** - * Setter for tables. - * @param tables List of String value for tables. - * @return Builder - */ - public Builder tables(List tables) { - this.tables = tables; - return this; - } - - /** - * Builds a new {@link CreateConnectionResponse} object using the set fields. - * @return {@link CreateConnectionResponse} - */ - public CreateConnectionResponse build() { - return new CreateConnectionResponse(name, description, type, id, scheduled, - connectionType, configuration, isExternal, isDeprecated, isDeleted, isHidden, - complete, indexVersion, generationNum, created, modified, author, modifiedBy, - owner, tags, tables); - } - } -} diff --git a/Java/src/main/java/localhost/models/CreateTableResponse.java b/Java/src/main/java/localhost/models/CreateTableResponse.java deleted file mode 100644 index 436f144b2..000000000 --- a/Java/src/main/java/localhost/models/CreateTableResponse.java +++ /dev/null @@ -1,136 +0,0 @@ -/* - * ThoughtSpotPublicRESTAPILib - * - * This file was automatically generated by APIMATIC v3.0 ( https://www.apimatic.io ). - */ - -package localhost.models; - -import com.fasterxml.jackson.annotation.JsonGetter; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonSetter; -import io.apimatic.core.types.BaseModel; - -/** - * This is a model class for CreateTableResponse type. - */ -public class CreateTableResponse { - private LogicalTableHeader logicalTableHeader; - private String physicalTableId; - - /** - * Default constructor. - */ - public CreateTableResponse() { - } - - /** - * Initialization constructor. - * @param logicalTableHeader LogicalTableHeader value for logicalTableHeader. - * @param physicalTableId String value for physicalTableId. - */ - public CreateTableResponse( - LogicalTableHeader logicalTableHeader, - String physicalTableId) { - this.logicalTableHeader = logicalTableHeader; - this.physicalTableId = physicalTableId; - } - - /** - * Getter for LogicalTableHeader. - * @return Returns the LogicalTableHeader - */ - @JsonGetter("logicalTableHeader") - @JsonInclude(JsonInclude.Include.NON_NULL) - public LogicalTableHeader getLogicalTableHeader() { - return logicalTableHeader; - } - - /** - * Setter for LogicalTableHeader. - * @param logicalTableHeader Value for LogicalTableHeader - */ - @JsonSetter("logicalTableHeader") - public void setLogicalTableHeader(LogicalTableHeader logicalTableHeader) { - this.logicalTableHeader = logicalTableHeader; - } - - /** - * Getter for PhysicalTableId. - * @return Returns the String - */ - @JsonGetter("physicalTableId") - @JsonInclude(JsonInclude.Include.NON_NULL) - public String getPhysicalTableId() { - return physicalTableId; - } - - /** - * Setter for PhysicalTableId. - * @param physicalTableId Value for String - */ - @JsonSetter("physicalTableId") - public void setPhysicalTableId(String physicalTableId) { - this.physicalTableId = physicalTableId; - } - - /** - * Converts this CreateTableResponse into string format. - * @return String representation of this class - */ - @Override - public String toString() { - return "CreateTableResponse [" + "logicalTableHeader=" + logicalTableHeader - + ", physicalTableId=" + physicalTableId + "]"; - } - - /** - * Builds a new {@link CreateTableResponse.Builder} object. - * Creates the instance with the state of the current model. - * @return a new {@link CreateTableResponse.Builder} object - */ - public Builder toBuilder() { - Builder builder = new Builder() - .logicalTableHeader(getLogicalTableHeader()) - .physicalTableId(getPhysicalTableId()); - return builder; - } - - /** - * Class to build instances of {@link CreateTableResponse}. - */ - public static class Builder { - private LogicalTableHeader logicalTableHeader; - private String physicalTableId; - - - - /** - * Setter for logicalTableHeader. - * @param logicalTableHeader LogicalTableHeader value for logicalTableHeader. - * @return Builder - */ - public Builder logicalTableHeader(LogicalTableHeader logicalTableHeader) { - this.logicalTableHeader = logicalTableHeader; - return this; - } - - /** - * Setter for physicalTableId. - * @param physicalTableId String value for physicalTableId. - * @return Builder - */ - public Builder physicalTableId(String physicalTableId) { - this.physicalTableId = physicalTableId; - return this; - } - - /** - * Builds a new {@link CreateTableResponse} object using the set fields. - * @return {@link CreateTableResponse} - */ - public CreateTableResponse build() { - return new CreateTableResponse(logicalTableHeader, physicalTableId); - } - } -} diff --git a/Java/src/main/java/localhost/models/DependentPermission.java b/Java/src/main/java/localhost/models/DependentPermission.java deleted file mode 100644 index 3470f7eeb..000000000 --- a/Java/src/main/java/localhost/models/DependentPermission.java +++ /dev/null @@ -1,295 +0,0 @@ -/* - * ThoughtSpotPublicRESTAPILib - * - * This file was automatically generated by APIMATIC v3.0 ( https://www.apimatic.io ). - */ - -package localhost.models; - -import com.fasterxml.jackson.annotation.JsonGetter; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonSetter; -import io.apimatic.core.types.BaseModel; -import java.util.List; - -/** - * This is a model class for DependentPermission type. - */ -public class DependentPermission { - private String id; - private String name; - private String type; - private String permission; - private String sharedPermission; - private List groupPermission; - - /** - * Default constructor. - */ - public DependentPermission() { - } - - /** - * Initialization constructor. - * @param id String value for id. - * @param name String value for name. - * @param type String value for type. - * @param permission String value for permission. - * @param sharedPermission String value for sharedPermission. - * @param groupPermission List of GroupPermission value for groupPermission. - */ - public DependentPermission( - String id, - String name, - String type, - String permission, - String sharedPermission, - List groupPermission) { - this.id = id; - this.name = name; - this.type = type; - this.permission = permission; - this.sharedPermission = sharedPermission; - this.groupPermission = groupPermission; - } - - /** - * Getter for Id. - * GUID of the object - * @return Returns the String - */ - @JsonGetter("id") - @JsonInclude(JsonInclude.Include.NON_NULL) - public String getId() { - return id; - } - - /** - * Setter for Id. - * GUID of the object - * @param id Value for String - */ - @JsonSetter("id") - public void setId(String id) { - this.id = id; - } - - /** - * Getter for Name. - * Name of the object - * @return Returns the String - */ - @JsonGetter("name") - @JsonInclude(JsonInclude.Include.NON_NULL) - public String getName() { - return name; - } - - /** - * Setter for Name. - * Name of the object - * @param name Value for String - */ - @JsonSetter("name") - public void setName(String name) { - this.name = name; - } - - /** - * Getter for Type. - * Indicates the type of the object - * @return Returns the String - */ - @JsonGetter("type") - @JsonInclude(JsonInclude.Include.NON_NULL) - public String getType() { - return type; - } - - /** - * Setter for Type. - * Indicates the type of the object - * @param type Value for String - */ - @JsonSetter("type") - public void setType(String type) { - this.type = type; - } - - /** - * Getter for Permission. - * Indicates the permission which user or user group has on the object - * @return Returns the String - */ - @JsonGetter("permission") - @JsonInclude(JsonInclude.Include.NON_NULL) - public String getPermission() { - return permission; - } - - /** - * Setter for Permission. - * Indicates the permission which user or user group has on the object - * @param permission Value for String - */ - @JsonSetter("permission") - public void setPermission(String permission) { - this.permission = permission; - } - - /** - * Getter for SharedPermission. - * Indicates the permission which user or user group has on the object through sharing of the - * object with this user or user group - * @return Returns the String - */ - @JsonGetter("sharedPermission") - @JsonInclude(JsonInclude.Include.NON_NULL) - public String getSharedPermission() { - return sharedPermission; - } - - /** - * Setter for SharedPermission. - * Indicates the permission which user or user group has on the object through sharing of the - * object with this user or user group - * @param sharedPermission Value for String - */ - @JsonSetter("sharedPermission") - public void setSharedPermission(String sharedPermission) { - this.sharedPermission = sharedPermission; - } - - /** - * Getter for GroupPermission. - * An array of object with details of permission on the user groups to which the user or user - * group belongs - * @return Returns the List of GroupPermission - */ - @JsonGetter("groupPermission") - @JsonInclude(JsonInclude.Include.NON_NULL) - public List getGroupPermission() { - return groupPermission; - } - - /** - * Setter for GroupPermission. - * An array of object with details of permission on the user groups to which the user or user - * group belongs - * @param groupPermission Value for List of GroupPermission - */ - @JsonSetter("groupPermission") - public void setGroupPermission(List groupPermission) { - this.groupPermission = groupPermission; - } - - /** - * Converts this DependentPermission into string format. - * @return String representation of this class - */ - @Override - public String toString() { - return "DependentPermission [" + "id=" + id + ", name=" + name + ", type=" + type - + ", permission=" + permission + ", sharedPermission=" + sharedPermission - + ", groupPermission=" + groupPermission + "]"; - } - - /** - * Builds a new {@link DependentPermission.Builder} object. - * Creates the instance with the state of the current model. - * @return a new {@link DependentPermission.Builder} object - */ - public Builder toBuilder() { - Builder builder = new Builder() - .id(getId()) - .name(getName()) - .type(getType()) - .permission(getPermission()) - .sharedPermission(getSharedPermission()) - .groupPermission(getGroupPermission()); - return builder; - } - - /** - * Class to build instances of {@link DependentPermission}. - */ - public static class Builder { - private String id; - private String name; - private String type; - private String permission; - private String sharedPermission; - private List groupPermission; - - - - /** - * Setter for id. - * @param id String value for id. - * @return Builder - */ - public Builder id(String id) { - this.id = id; - return this; - } - - /** - * Setter for name. - * @param name String value for name. - * @return Builder - */ - public Builder name(String name) { - this.name = name; - return this; - } - - /** - * Setter for type. - * @param type String value for type. - * @return Builder - */ - public Builder type(String type) { - this.type = type; - return this; - } - - /** - * Setter for permission. - * @param permission String value for permission. - * @return Builder - */ - public Builder permission(String permission) { - this.permission = permission; - return this; - } - - /** - * Setter for sharedPermission. - * @param sharedPermission String value for sharedPermission. - * @return Builder - */ - public Builder sharedPermission(String sharedPermission) { - this.sharedPermission = sharedPermission; - return this; - } - - /** - * Setter for groupPermission. - * @param groupPermission List of GroupPermission value for groupPermission. - * @return Builder - */ - public Builder groupPermission(List groupPermission) { - this.groupPermission = groupPermission; - return this; - } - - /** - * Builds a new {@link DependentPermission} object using the set fields. - * @return {@link DependentPermission} - */ - public DependentPermission build() { - return new DependentPermission(id, name, type, permission, sharedPermission, - groupPermission); - } - } -} diff --git a/Java/src/main/java/localhost/models/FormatType3Enum.java b/Java/src/main/java/localhost/models/FormatType3Enum.java deleted file mode 100644 index ae09ba34a..000000000 --- a/Java/src/main/java/localhost/models/FormatType3Enum.java +++ /dev/null @@ -1,75 +0,0 @@ -/* - * ThoughtSpotPublicRESTAPILib - * - * This file was automatically generated by APIMATIC v3.0 ( https://www.apimatic.io ). - */ - -package localhost.models; - -import java.util.ArrayList; -import java.util.List; -import java.util.TreeMap; - -/** - * FormatType3Enum to be used. - */ -public enum FormatType3Enum { - YAML, - - JSON; - - - private static TreeMap valueMap = new TreeMap<>(); - private String value; - - static { - YAML.value = "YAML"; - JSON.value = "JSON"; - - valueMap.put("YAML", YAML); - valueMap.put("JSON", JSON); - } - - /** - * Returns the enum member associated with the given string value. - * @param toConvert String value to get enum member. - * @return The enum member against the given string value. - */ - @com.fasterxml.jackson.annotation.JsonCreator - public static FormatType3Enum fromString(String toConvert) { - return valueMap.get(toConvert); - } - - /** - * Returns the string value associated with the enum member. - * @return The string value against enum member. - */ - @com.fasterxml.jackson.annotation.JsonValue - public String value() { - return value; - } - - /** - * Get string representation of this enum. - */ - @Override - public String toString() { - return value.toString(); - } - - /** - * Convert list of FormatType3Enum values to list of string values. - * @param toConvert The list of FormatType3Enum values to convert. - * @return List of representative string values. - */ - public static List toValue(List toConvert) { - if (toConvert == null) { - return null; - } - List convertedValues = new ArrayList<>(); - for (FormatType3Enum enumValue : toConvert) { - convertedValues.add(enumValue.value); - } - return convertedValues; - } -} \ No newline at end of file diff --git a/Java/src/main/java/localhost/models/FormatTypeEnum.java b/Java/src/main/java/localhost/models/FormatTypeEnum.java deleted file mode 100644 index 31df6872a..000000000 --- a/Java/src/main/java/localhost/models/FormatTypeEnum.java +++ /dev/null @@ -1,75 +0,0 @@ -/* - * ThoughtSpotPublicRESTAPILib - * - * This file was automatically generated by APIMATIC v3.0 ( https://www.apimatic.io ). - */ - -package localhost.models; - -import java.util.ArrayList; -import java.util.List; -import java.util.TreeMap; - -/** - * FormatTypeEnum to be used. - */ -public enum FormatTypeEnum { - COMPACT, - - FULL; - - - private static TreeMap valueMap = new TreeMap<>(); - private String value; - - static { - COMPACT.value = "COMPACT"; - FULL.value = "FULL"; - - valueMap.put("COMPACT", COMPACT); - valueMap.put("FULL", FULL); - } - - /** - * Returns the enum member associated with the given string value. - * @param toConvert String value to get enum member. - * @return The enum member against the given string value. - */ - @com.fasterxml.jackson.annotation.JsonCreator - public static FormatTypeEnum fromString(String toConvert) { - return valueMap.get(toConvert); - } - - /** - * Returns the string value associated with the enum member. - * @return The string value against enum member. - */ - @com.fasterxml.jackson.annotation.JsonValue - public String value() { - return value; - } - - /** - * Get string representation of this enum. - */ - @Override - public String toString() { - return value.toString(); - } - - /** - * Convert list of FormatTypeEnum values to list of string values. - * @param toConvert The list of FormatTypeEnum values to convert. - * @return List of representative string values. - */ - public static List toValue(List toConvert) { - if (toConvert == null) { - return null; - } - List convertedValues = new ArrayList<>(); - for (FormatTypeEnum enumValue : toConvert) { - convertedValues.add(enumValue.value); - } - return convertedValues; - } -} \ No newline at end of file diff --git a/Java/src/main/java/localhost/models/FromUserNameAndIDInput.java b/Java/src/main/java/localhost/models/FromUserNameAndIDInput.java deleted file mode 100644 index dcddafadc..000000000 --- a/Java/src/main/java/localhost/models/FromUserNameAndIDInput.java +++ /dev/null @@ -1,139 +0,0 @@ -/* - * ThoughtSpotPublicRESTAPILib - * - * This file was automatically generated by APIMATIC v3.0 ( https://www.apimatic.io ). - */ - -package localhost.models; - -import com.fasterxml.jackson.annotation.JsonGetter; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonSetter; -import io.apimatic.core.types.BaseModel; - -/** - * This is a model class for FromUserNameAndIDInput type. - */ -public class FromUserNameAndIDInput { - private String name; - private String id; - - /** - * Default constructor. - */ - public FromUserNameAndIDInput() { - } - - /** - * Initialization constructor. - * @param name String value for name. - * @param id String value for id. - */ - public FromUserNameAndIDInput( - String name, - String id) { - this.name = name; - this.id = id; - } - - /** - * Getter for Name. - * Username of the user - * @return Returns the String - */ - @JsonGetter("name") - @JsonInclude(JsonInclude.Include.NON_NULL) - public String getName() { - return name; - } - - /** - * Setter for Name. - * Username of the user - * @param name Value for String - */ - @JsonSetter("name") - public void setName(String name) { - this.name = name; - } - - /** - * Getter for Id. - * GUID of the user - * @return Returns the String - */ - @JsonGetter("id") - @JsonInclude(JsonInclude.Include.NON_NULL) - public String getId() { - return id; - } - - /** - * Setter for Id. - * GUID of the user - * @param id Value for String - */ - @JsonSetter("id") - public void setId(String id) { - this.id = id; - } - - /** - * Converts this FromUserNameAndIDInput into string format. - * @return String representation of this class - */ - @Override - public String toString() { - return "FromUserNameAndIDInput [" + "name=" + name + ", id=" + id + "]"; - } - - /** - * Builds a new {@link FromUserNameAndIDInput.Builder} object. - * Creates the instance with the state of the current model. - * @return a new {@link FromUserNameAndIDInput.Builder} object - */ - public Builder toBuilder() { - Builder builder = new Builder() - .name(getName()) - .id(getId()); - return builder; - } - - /** - * Class to build instances of {@link FromUserNameAndIDInput}. - */ - public static class Builder { - private String name; - private String id; - - - - /** - * Setter for name. - * @param name String value for name. - * @return Builder - */ - public Builder name(String name) { - this.name = name; - return this; - } - - /** - * Setter for id. - * @param id String value for id. - * @return Builder - */ - public Builder id(String id) { - this.id = id; - return this; - } - - /** - * Builds a new {@link FromUserNameAndIDInput} object using the set fields. - * @return {@link FromUserNameAndIDInput} - */ - public FromUserNameAndIDInput build() { - return new FromUserNameAndIDInput(name, id); - } - } -} diff --git a/Java/src/main/java/localhost/models/GroupNameAndID.java b/Java/src/main/java/localhost/models/GroupNameAndID.java deleted file mode 100644 index 590e02641..000000000 --- a/Java/src/main/java/localhost/models/GroupNameAndID.java +++ /dev/null @@ -1,139 +0,0 @@ -/* - * ThoughtSpotPublicRESTAPILib - * - * This file was automatically generated by APIMATIC v3.0 ( https://www.apimatic.io ). - */ - -package localhost.models; - -import com.fasterxml.jackson.annotation.JsonGetter; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonSetter; -import io.apimatic.core.types.BaseModel; - -/** - * This is a model class for GroupNameAndID type. - */ -public class GroupNameAndID { - private String name; - private String id; - - /** - * Default constructor. - */ - public GroupNameAndID() { - } - - /** - * Initialization constructor. - * @param name String value for name. - * @param id String value for id. - */ - public GroupNameAndID( - String name, - String id) { - this.name = name; - this.id = id; - } - - /** - * Getter for Name. - * Name of the group - * @return Returns the String - */ - @JsonGetter("name") - @JsonInclude(JsonInclude.Include.NON_NULL) - public String getName() { - return name; - } - - /** - * Setter for Name. - * Name of the group - * @param name Value for String - */ - @JsonSetter("name") - public void setName(String name) { - this.name = name; - } - - /** - * Getter for Id. - * GUID of the group - * @return Returns the String - */ - @JsonGetter("id") - @JsonInclude(JsonInclude.Include.NON_NULL) - public String getId() { - return id; - } - - /** - * Setter for Id. - * GUID of the group - * @param id Value for String - */ - @JsonSetter("id") - public void setId(String id) { - this.id = id; - } - - /** - * Converts this GroupNameAndID into string format. - * @return String representation of this class - */ - @Override - public String toString() { - return "GroupNameAndID [" + "name=" + name + ", id=" + id + "]"; - } - - /** - * Builds a new {@link GroupNameAndID.Builder} object. - * Creates the instance with the state of the current model. - * @return a new {@link GroupNameAndID.Builder} object - */ - public Builder toBuilder() { - Builder builder = new Builder() - .name(getName()) - .id(getId()); - return builder; - } - - /** - * Class to build instances of {@link GroupNameAndID}. - */ - public static class Builder { - private String name; - private String id; - - - - /** - * Setter for name. - * @param name String value for name. - * @return Builder - */ - public Builder name(String name) { - this.name = name; - return this; - } - - /** - * Setter for id. - * @param id String value for id. - * @return Builder - */ - public Builder id(String id) { - this.id = id; - return this; - } - - /** - * Builds a new {@link GroupNameAndID} object using the set fields. - * @return {@link GroupNameAndID} - */ - public GroupNameAndID build() { - return new GroupNameAndID(name, id); - } - } -} diff --git a/Java/src/main/java/localhost/models/GroupNameAndIDInput.java b/Java/src/main/java/localhost/models/GroupNameAndIDInput.java deleted file mode 100644 index 63ee3ce0d..000000000 --- a/Java/src/main/java/localhost/models/GroupNameAndIDInput.java +++ /dev/null @@ -1,139 +0,0 @@ -/* - * ThoughtSpotPublicRESTAPILib - * - * This file was automatically generated by APIMATIC v3.0 ( https://www.apimatic.io ). - */ - -package localhost.models; - -import com.fasterxml.jackson.annotation.JsonGetter; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonSetter; -import io.apimatic.core.types.BaseModel; - -/** - * This is a model class for GroupNameAndIDInput type. - */ -public class GroupNameAndIDInput { - private String name; - private String id; - - /** - * Default constructor. - */ - public GroupNameAndIDInput() { - } - - /** - * Initialization constructor. - * @param name String value for name. - * @param id String value for id. - */ - public GroupNameAndIDInput( - String name, - String id) { - this.name = name; - this.id = id; - } - - /** - * Getter for Name. - * Name of the group - * @return Returns the String - */ - @JsonGetter("name") - @JsonInclude(JsonInclude.Include.NON_NULL) - public String getName() { - return name; - } - - /** - * Setter for Name. - * Name of the group - * @param name Value for String - */ - @JsonSetter("name") - public void setName(String name) { - this.name = name; - } - - /** - * Getter for Id. - * GUID of the group - * @return Returns the String - */ - @JsonGetter("id") - @JsonInclude(JsonInclude.Include.NON_NULL) - public String getId() { - return id; - } - - /** - * Setter for Id. - * GUID of the group - * @param id Value for String - */ - @JsonSetter("id") - public void setId(String id) { - this.id = id; - } - - /** - * Converts this GroupNameAndIDInput into string format. - * @return String representation of this class - */ - @Override - public String toString() { - return "GroupNameAndIDInput [" + "name=" + name + ", id=" + id + "]"; - } - - /** - * Builds a new {@link GroupNameAndIDInput.Builder} object. - * Creates the instance with the state of the current model. - * @return a new {@link GroupNameAndIDInput.Builder} object - */ - public Builder toBuilder() { - Builder builder = new Builder() - .name(getName()) - .id(getId()); - return builder; - } - - /** - * Class to build instances of {@link GroupNameAndIDInput}. - */ - public static class Builder { - private String name; - private String id; - - - - /** - * Setter for name. - * @param name String value for name. - * @return Builder - */ - public Builder name(String name) { - this.name = name; - return this; - } - - /** - * Setter for id. - * @param id String value for id. - * @return Builder - */ - public Builder id(String id) { - this.id = id; - return this; - } - - /** - * Builds a new {@link GroupNameAndIDInput} object using the set fields. - * @return {@link GroupNameAndIDInput} - */ - public GroupNameAndIDInput build() { - return new GroupNameAndIDInput(name, id); - } - } -} diff --git a/Java/src/main/java/localhost/models/GroupPermission.java b/Java/src/main/java/localhost/models/GroupPermission.java deleted file mode 100644 index 3e3f5a481..000000000 --- a/Java/src/main/java/localhost/models/GroupPermission.java +++ /dev/null @@ -1,177 +0,0 @@ -/* - * ThoughtSpotPublicRESTAPILib - * - * This file was automatically generated by APIMATIC v3.0 ( https://www.apimatic.io ). - */ - -package localhost.models; - -import com.fasterxml.jackson.annotation.JsonGetter; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonSetter; -import io.apimatic.core.types.BaseModel; - -/** - * This is a model class for GroupPermission type. - */ -public class GroupPermission { - private String id; - private String name; - private String permission; - - /** - * Default constructor. - */ - public GroupPermission() { - } - - /** - * Initialization constructor. - * @param id String value for id. - * @param name String value for name. - * @param permission String value for permission. - */ - public GroupPermission( - String id, - String name, - String permission) { - this.id = id; - this.name = name; - this.permission = permission; - } - - /** - * Getter for Id. - * GUID of the user group - * @return Returns the String - */ - @JsonGetter("id") - @JsonInclude(JsonInclude.Include.NON_NULL) - public String getId() { - return id; - } - - /** - * Setter for Id. - * GUID of the user group - * @param id Value for String - */ - @JsonSetter("id") - public void setId(String id) { - this.id = id; - } - - /** - * Getter for Name. - * Name of the user group - * @return Returns the String - */ - @JsonGetter("name") - @JsonInclude(JsonInclude.Include.NON_NULL) - public String getName() { - return name; - } - - /** - * Setter for Name. - * Name of the user group - * @param name Value for String - */ - @JsonSetter("name") - public void setName(String name) { - this.name = name; - } - - /** - * Getter for Permission. - * Indicates the permission which user group has on the object - * @return Returns the String - */ - @JsonGetter("permission") - @JsonInclude(JsonInclude.Include.NON_NULL) - public String getPermission() { - return permission; - } - - /** - * Setter for Permission. - * Indicates the permission which user group has on the object - * @param permission Value for String - */ - @JsonSetter("permission") - public void setPermission(String permission) { - this.permission = permission; - } - - /** - * Converts this GroupPermission into string format. - * @return String representation of this class - */ - @Override - public String toString() { - return "GroupPermission [" + "id=" + id + ", name=" + name + ", permission=" + permission - + "]"; - } - - /** - * Builds a new {@link GroupPermission.Builder} object. - * Creates the instance with the state of the current model. - * @return a new {@link GroupPermission.Builder} object - */ - public Builder toBuilder() { - Builder builder = new Builder() - .id(getId()) - .name(getName()) - .permission(getPermission()); - return builder; - } - - /** - * Class to build instances of {@link GroupPermission}. - */ - public static class Builder { - private String id; - private String name; - private String permission; - - - - /** - * Setter for id. - * @param id String value for id. - * @return Builder - */ - public Builder id(String id) { - this.id = id; - return this; - } - - /** - * Setter for name. - * @param name String value for name. - * @return Builder - */ - public Builder name(String name) { - this.name = name; - return this; - } - - /** - * Setter for permission. - * @param permission String value for permission. - * @return Builder - */ - public Builder permission(String permission) { - this.permission = permission; - return this; - } - - /** - * Builds a new {@link GroupPermission} object using the set fields. - * @return {@link GroupPermission} - */ - public GroupPermission build() { - return new GroupPermission(id, name, permission); - } - } -} diff --git a/Java/src/main/java/localhost/models/GroupResponse.java b/Java/src/main/java/localhost/models/GroupResponse.java deleted file mode 100644 index c2278dc08..000000000 --- a/Java/src/main/java/localhost/models/GroupResponse.java +++ /dev/null @@ -1,1173 +0,0 @@ -/* - * ThoughtSpotPublicRESTAPILib - * - * This file was automatically generated by APIMATIC v3.0 ( https://www.apimatic.io ). - */ - -package localhost.models; - -import com.fasterxml.jackson.annotation.JsonGetter; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonSetter; -import io.apimatic.core.types.BaseModel; -import java.util.List; - -/** - * This is a model class for GroupResponse type. - */ -public class GroupResponse { - private String name; - private String displayName; - private String id; - private String visibility; - private String description; - private List privileges; - private List orgs; - private List groups; - private List users; - private List assignedLiveboards; - private Object userGroupContent; - private List tags; - private Boolean isDeleted; - private Boolean isHidden; - private Boolean isExternal; - private Boolean isDeprecated; - private Boolean complete; - private Boolean isSystemPrincipal; - private String type; - private String parenttype; - private Integer groupIdx; - private Integer metadataVersion; - private String tenantId; - private Double indexVersion; - private Double generationNum; - private Double created; - private Double modified; - private UserNameAndID author; - private UserNameAndID modifiedBy; - private UserNameAndID owner; - - /** - * Default constructor. - */ - public GroupResponse() { - } - - /** - * Initialization constructor. - * @param name String value for name. - * @param displayName String value for displayName. - * @param id String value for id. - * @param visibility String value for visibility. - * @param description String value for description. - * @param privileges List of String value for privileges. - * @param orgs List of OrgType value for orgs. - * @param groups List of GroupNameAndID value for groups. - * @param users List of UserNameAndID value for users. - * @param assignedLiveboards List of LiveboardNameAndID value for assignedLiveboards. - * @param userGroupContent Object value for userGroupContent. - * @param tags List of String value for tags. - * @param isDeleted Boolean value for isDeleted. - * @param isHidden Boolean value for isHidden. - * @param isExternal Boolean value for isExternal. - * @param isDeprecated Boolean value for isDeprecated. - * @param complete Boolean value for complete. - * @param isSystemPrincipal Boolean value for isSystemPrincipal. - * @param type String value for type. - * @param parenttype String value for parenttype. - * @param groupIdx Integer value for groupIdx. - * @param metadataVersion Integer value for metadataVersion. - * @param tenantId String value for tenantId. - * @param indexVersion Double value for indexVersion. - * @param generationNum Double value for generationNum. - * @param created Double value for created. - * @param modified Double value for modified. - * @param author UserNameAndID value for author. - * @param modifiedBy UserNameAndID value for modifiedBy. - * @param owner UserNameAndID value for owner. - */ - public GroupResponse( - String name, - String displayName, - String id, - String visibility, - String description, - List privileges, - List orgs, - List groups, - List users, - List assignedLiveboards, - Object userGroupContent, - List tags, - Boolean isDeleted, - Boolean isHidden, - Boolean isExternal, - Boolean isDeprecated, - Boolean complete, - Boolean isSystemPrincipal, - String type, - String parenttype, - Integer groupIdx, - Integer metadataVersion, - String tenantId, - Double indexVersion, - Double generationNum, - Double created, - Double modified, - UserNameAndID author, - UserNameAndID modifiedBy, - UserNameAndID owner) { - this.name = name; - this.displayName = displayName; - this.id = id; - this.visibility = visibility; - this.description = description; - this.privileges = privileges; - this.orgs = orgs; - this.groups = groups; - this.users = users; - this.assignedLiveboards = assignedLiveboards; - this.userGroupContent = userGroupContent; - this.tags = tags; - this.isDeleted = isDeleted; - this.isHidden = isHidden; - this.isExternal = isExternal; - this.isDeprecated = isDeprecated; - this.complete = complete; - this.isSystemPrincipal = isSystemPrincipal; - this.type = type; - this.parenttype = parenttype; - this.groupIdx = groupIdx; - this.metadataVersion = metadataVersion; - this.tenantId = tenantId; - this.indexVersion = indexVersion; - this.generationNum = generationNum; - this.created = created; - this.modified = modified; - this.author = author; - this.modifiedBy = modifiedBy; - this.owner = owner; - } - - /** - * Getter for Name. - * Name of the group - * @return Returns the String - */ - @JsonGetter("name") - @JsonInclude(JsonInclude.Include.NON_NULL) - public String getName() { - return name; - } - - /** - * Setter for Name. - * Name of the group - * @param name Value for String - */ - @JsonSetter("name") - public void setName(String name) { - this.name = name; - } - - /** - * Getter for DisplayName. - * A unique display name string for the user group - * @return Returns the String - */ - @JsonGetter("displayName") - @JsonInclude(JsonInclude.Include.NON_NULL) - public String getDisplayName() { - return displayName; - } - - /** - * Setter for DisplayName. - * A unique display name string for the user group - * @param displayName Value for String - */ - @JsonSetter("displayName") - public void setDisplayName(String displayName) { - this.displayName = displayName; - } - - /** - * Getter for Id. - * GUID of the group - * @return Returns the String - */ - @JsonGetter("id") - @JsonInclude(JsonInclude.Include.NON_NULL) - public String getId() { - return id; - } - - /** - * Setter for Id. - * GUID of the group - * @param id Value for String - */ - @JsonSetter("id") - public void setId(String id) { - this.id = id; - } - - /** - * Getter for Visibility. - * Visibility of the group - * @return Returns the String - */ - @JsonGetter("visibility") - @JsonInclude(JsonInclude.Include.NON_NULL) - public String getVisibility() { - return visibility; - } - - /** - * Setter for Visibility. - * Visibility of the group - * @param visibility Value for String - */ - @JsonSetter("visibility") - public void setVisibility(String visibility) { - this.visibility = visibility; - } - - /** - * Getter for Description. - * Description of the group - * @return Returns the String - */ - @JsonGetter("description") - @JsonInclude(JsonInclude.Include.NON_NULL) - public String getDescription() { - return description; - } - - /** - * Setter for Description. - * Description of the group - * @param description Value for String - */ - @JsonSetter("description") - public void setDescription(String description) { - this.description = description; - } - - /** - * Getter for Privileges. - * Privileges assigned to the group - * @return Returns the List of String - */ - @JsonGetter("privileges") - @JsonInclude(JsonInclude.Include.NON_NULL) - public List getPrivileges() { - return privileges; - } - - /** - * Setter for Privileges. - * Privileges assigned to the group - * @param privileges Value for List of String - */ - @JsonSetter("privileges") - public void setPrivileges(List privileges) { - this.privileges = privileges; - } - - /** - * Getter for Orgs. - * The organizations that user belongs to - * @return Returns the List of OrgType - */ - @JsonGetter("orgs") - @JsonInclude(JsonInclude.Include.NON_NULL) - public List getOrgs() { - return orgs; - } - - /** - * Setter for Orgs. - * The organizations that user belongs to - * @param orgs Value for List of OrgType - */ - @JsonSetter("orgs") - public void setOrgs(List orgs) { - this.orgs = orgs; - } - - /** - * Getter for Groups. - * Name of the group to which is added - * @return Returns the List of GroupNameAndID - */ - @JsonGetter("groups") - @JsonInclude(JsonInclude.Include.NON_NULL) - public List getGroups() { - return groups; - } - - /** - * Setter for Groups. - * Name of the group to which is added - * @param groups Value for List of GroupNameAndID - */ - @JsonSetter("groups") - public void setGroups(List groups) { - this.groups = groups; - } - - /** - * Getter for Users. - * User Group Information by Id or Name. - * @return Returns the List of UserNameAndID - */ - @JsonGetter("users") - @JsonInclude(JsonInclude.Include.NON_NULL) - public List getUsers() { - return users; - } - - /** - * Setter for Users. - * User Group Information by Id or Name. - * @param users Value for List of UserNameAndID - */ - @JsonSetter("users") - public void setUsers(List users) { - this.users = users; - } - - /** - * Getter for AssignedLiveboards. - * Liveboards assigned to the group - * @return Returns the List of LiveboardNameAndID - */ - @JsonGetter("assignedLiveboards") - @JsonInclude(JsonInclude.Include.NON_NULL) - public List getAssignedLiveboards() { - return assignedLiveboards; - } - - /** - * Setter for AssignedLiveboards. - * Liveboards assigned to the group - * @param assignedLiveboards Value for List of LiveboardNameAndID - */ - @JsonSetter("assignedLiveboards") - public void setAssignedLiveboards(List assignedLiveboards) { - this.assignedLiveboards = assignedLiveboards; - } - - /** - * Getter for UserGroupContent. - * @return Returns the Object - */ - @JsonGetter("userGroupContent") - @JsonInclude(JsonInclude.Include.NON_NULL) - public Object getUserGroupContent() { - return userGroupContent; - } - - /** - * Setter for UserGroupContent. - * @param userGroupContent Value for Object - */ - @JsonSetter("userGroupContent") - public void setUserGroupContent(Object userGroupContent) { - this.userGroupContent = userGroupContent; - } - - /** - * Getter for Tags. - * Tags assigned to the group - * @return Returns the List of String - */ - @JsonGetter("tags") - @JsonInclude(JsonInclude.Include.NON_NULL) - public List getTags() { - return tags; - } - - /** - * Setter for Tags. - * Tags assigned to the group - * @param tags Value for List of String - */ - @JsonSetter("tags") - public void setTags(List tags) { - this.tags = tags; - } - - /** - * Getter for IsDeleted. - * Indicates if the group is deleted - * @return Returns the Boolean - */ - @JsonGetter("isDeleted") - @JsonInclude(JsonInclude.Include.NON_NULL) - public Boolean getIsDeleted() { - return isDeleted; - } - - /** - * Setter for IsDeleted. - * Indicates if the group is deleted - * @param isDeleted Value for Boolean - */ - @JsonSetter("isDeleted") - public void setIsDeleted(Boolean isDeleted) { - this.isDeleted = isDeleted; - } - - /** - * Getter for IsHidden. - * Indicates if the group is hidden - * @return Returns the Boolean - */ - @JsonGetter("isHidden") - @JsonInclude(JsonInclude.Include.NON_NULL) - public Boolean getIsHidden() { - return isHidden; - } - - /** - * Setter for IsHidden. - * Indicates if the group is hidden - * @param isHidden Value for Boolean - */ - @JsonSetter("isHidden") - public void setIsHidden(Boolean isHidden) { - this.isHidden = isHidden; - } - - /** - * Getter for IsExternal. - * Indicates if the group is from external system - * @return Returns the Boolean - */ - @JsonGetter("isExternal") - @JsonInclude(JsonInclude.Include.NON_NULL) - public Boolean getIsExternal() { - return isExternal; - } - - /** - * Setter for IsExternal. - * Indicates if the group is from external system - * @param isExternal Value for Boolean - */ - @JsonSetter("isExternal") - public void setIsExternal(Boolean isExternal) { - this.isExternal = isExternal; - } - - /** - * Getter for IsDeprecated. - * @return Returns the Boolean - */ - @JsonGetter("isDeprecated") - @JsonInclude(JsonInclude.Include.NON_NULL) - public Boolean getIsDeprecated() { - return isDeprecated; - } - - /** - * Setter for IsDeprecated. - * @param isDeprecated Value for Boolean - */ - @JsonSetter("isDeprecated") - public void setIsDeprecated(Boolean isDeprecated) { - this.isDeprecated = isDeprecated; - } - - /** - * Getter for Complete. - * Indicates if the all the properties of group is provided - * @return Returns the Boolean - */ - @JsonGetter("complete") - @JsonInclude(JsonInclude.Include.NON_NULL) - public Boolean getComplete() { - return complete; - } - - /** - * Setter for Complete. - * Indicates if the all the properties of group is provided - * @param complete Value for Boolean - */ - @JsonSetter("complete") - public void setComplete(Boolean complete) { - this.complete = complete; - } - - /** - * Getter for IsSystemPrincipal. - * Indicates if the group is system principal - * @return Returns the Boolean - */ - @JsonGetter("isSystemPrincipal") - @JsonInclude(JsonInclude.Include.NON_NULL) - public Boolean getIsSystemPrincipal() { - return isSystemPrincipal; - } - - /** - * Setter for IsSystemPrincipal. - * Indicates if the group is system principal - * @param isSystemPrincipal Value for Boolean - */ - @JsonSetter("isSystemPrincipal") - public void setIsSystemPrincipal(Boolean isSystemPrincipal) { - this.isSystemPrincipal = isSystemPrincipal; - } - - /** - * Getter for Type. - * Indicates the type of group - * @return Returns the String - */ - @JsonGetter("type") - @JsonInclude(JsonInclude.Include.NON_NULL) - public String getType() { - return type; - } - - /** - * Setter for Type. - * Indicates the type of group - * @param type Value for String - */ - @JsonSetter("type") - public void setType(String type) { - this.type = type; - } - - /** - * Getter for Parenttype. - * Indicates the type of parent object - * @return Returns the String - */ - @JsonGetter("parenttype") - @JsonInclude(JsonInclude.Include.NON_NULL) - public String getParenttype() { - return parenttype; - } - - /** - * Setter for Parenttype. - * Indicates the type of parent object - * @param parenttype Value for String - */ - @JsonSetter("parenttype") - public void setParenttype(String parenttype) { - this.parenttype = parenttype; - } - - /** - * Getter for GroupIdx. - * @return Returns the Integer - */ - @JsonGetter("groupIdx") - @JsonInclude(JsonInclude.Include.NON_NULL) - public Integer getGroupIdx() { - return groupIdx; - } - - /** - * Setter for GroupIdx. - * @param groupIdx Value for Integer - */ - @JsonSetter("groupIdx") - public void setGroupIdx(Integer groupIdx) { - this.groupIdx = groupIdx; - } - - /** - * Getter for MetadataVersion. - * @return Returns the Integer - */ - @JsonGetter("metadataVersion") - @JsonInclude(JsonInclude.Include.NON_NULL) - public Integer getMetadataVersion() { - return metadataVersion; - } - - /** - * Setter for MetadataVersion. - * @param metadataVersion Value for Integer - */ - @JsonSetter("metadataVersion") - public void setMetadataVersion(Integer metadataVersion) { - this.metadataVersion = metadataVersion; - } - - /** - * Getter for TenantId. - * Tenant id associated with the group - * @return Returns the String - */ - @JsonGetter("tenantId") - @JsonInclude(JsonInclude.Include.NON_NULL) - public String getTenantId() { - return tenantId; - } - - /** - * Setter for TenantId. - * Tenant id associated with the group - * @param tenantId Value for String - */ - @JsonSetter("tenantId") - public void setTenantId(String tenantId) { - this.tenantId = tenantId; - } - - /** - * Getter for IndexVersion. - * @return Returns the Double - */ - @JsonGetter("indexVersion") - @JsonInclude(JsonInclude.Include.NON_NULL) - public Double getIndexVersion() { - return indexVersion; - } - - /** - * Setter for IndexVersion. - * @param indexVersion Value for Double - */ - @JsonSetter("indexVersion") - public void setIndexVersion(Double indexVersion) { - this.indexVersion = indexVersion; - } - - /** - * Getter for GenerationNum. - * @return Returns the Double - */ - @JsonGetter("generationNum") - @JsonInclude(JsonInclude.Include.NON_NULL) - public Double getGenerationNum() { - return generationNum; - } - - /** - * Setter for GenerationNum. - * @param generationNum Value for Double - */ - @JsonSetter("generationNum") - public void setGenerationNum(Double generationNum) { - this.generationNum = generationNum; - } - - /** - * Getter for Created. - * Date and time when group was created - * @return Returns the Double - */ - @JsonGetter("created") - @JsonInclude(JsonInclude.Include.NON_NULL) - public Double getCreated() { - return created; - } - - /** - * Setter for Created. - * Date and time when group was created - * @param created Value for Double - */ - @JsonSetter("created") - public void setCreated(Double created) { - this.created = created; - } - - /** - * Getter for Modified. - * Date and time of last modification of the group - * @return Returns the Double - */ - @JsonGetter("modified") - @JsonInclude(JsonInclude.Include.NON_NULL) - public Double getModified() { - return modified; - } - - /** - * Setter for Modified. - * Date and time of last modification of the group - * @param modified Value for Double - */ - @JsonSetter("modified") - public void setModified(Double modified) { - this.modified = modified; - } - - /** - * Getter for Author. - * @return Returns the UserNameAndID - */ - @JsonGetter("author") - @JsonInclude(JsonInclude.Include.NON_NULL) - public UserNameAndID getAuthor() { - return author; - } - - /** - * Setter for Author. - * @param author Value for UserNameAndID - */ - @JsonSetter("author") - public void setAuthor(UserNameAndID author) { - this.author = author; - } - - /** - * Getter for ModifiedBy. - * @return Returns the UserNameAndID - */ - @JsonGetter("modifiedBy") - @JsonInclude(JsonInclude.Include.NON_NULL) - public UserNameAndID getModifiedBy() { - return modifiedBy; - } - - /** - * Setter for ModifiedBy. - * @param modifiedBy Value for UserNameAndID - */ - @JsonSetter("modifiedBy") - public void setModifiedBy(UserNameAndID modifiedBy) { - this.modifiedBy = modifiedBy; - } - - /** - * Getter for Owner. - * @return Returns the UserNameAndID - */ - @JsonGetter("owner") - @JsonInclude(JsonInclude.Include.NON_NULL) - public UserNameAndID getOwner() { - return owner; - } - - /** - * Setter for Owner. - * @param owner Value for UserNameAndID - */ - @JsonSetter("owner") - public void setOwner(UserNameAndID owner) { - this.owner = owner; - } - - /** - * Converts this GroupResponse into string format. - * @return String representation of this class - */ - @Override - public String toString() { - return "GroupResponse [" + "name=" + name + ", displayName=" + displayName + ", id=" + id - + ", visibility=" + visibility + ", description=" + description + ", privileges=" - + privileges + ", orgs=" + orgs + ", groups=" + groups + ", users=" + users - + ", assignedLiveboards=" + assignedLiveboards + ", userGroupContent=" - + userGroupContent + ", tags=" + tags + ", isDeleted=" + isDeleted + ", isHidden=" - + isHidden + ", isExternal=" + isExternal + ", isDeprecated=" + isDeprecated - + ", complete=" + complete + ", isSystemPrincipal=" + isSystemPrincipal + ", type=" - + type + ", parenttype=" + parenttype + ", groupIdx=" + groupIdx - + ", metadataVersion=" + metadataVersion + ", tenantId=" + tenantId - + ", indexVersion=" + indexVersion + ", generationNum=" + generationNum - + ", created=" + created + ", modified=" + modified + ", author=" + author - + ", modifiedBy=" + modifiedBy + ", owner=" + owner + "]"; - } - - /** - * Builds a new {@link GroupResponse.Builder} object. - * Creates the instance with the state of the current model. - * @return a new {@link GroupResponse.Builder} object - */ - public Builder toBuilder() { - Builder builder = new Builder() - .name(getName()) - .displayName(getDisplayName()) - .id(getId()) - .visibility(getVisibility()) - .description(getDescription()) - .privileges(getPrivileges()) - .orgs(getOrgs()) - .groups(getGroups()) - .users(getUsers()) - .assignedLiveboards(getAssignedLiveboards()) - .userGroupContent(getUserGroupContent()) - .tags(getTags()) - .isDeleted(getIsDeleted()) - .isHidden(getIsHidden()) - .isExternal(getIsExternal()) - .isDeprecated(getIsDeprecated()) - .complete(getComplete()) - .isSystemPrincipal(getIsSystemPrincipal()) - .type(getType()) - .parenttype(getParenttype()) - .groupIdx(getGroupIdx()) - .metadataVersion(getMetadataVersion()) - .tenantId(getTenantId()) - .indexVersion(getIndexVersion()) - .generationNum(getGenerationNum()) - .created(getCreated()) - .modified(getModified()) - .author(getAuthor()) - .modifiedBy(getModifiedBy()) - .owner(getOwner()); - return builder; - } - - /** - * Class to build instances of {@link GroupResponse}. - */ - public static class Builder { - private String name; - private String displayName; - private String id; - private String visibility; - private String description; - private List privileges; - private List orgs; - private List groups; - private List users; - private List assignedLiveboards; - private Object userGroupContent; - private List tags; - private Boolean isDeleted; - private Boolean isHidden; - private Boolean isExternal; - private Boolean isDeprecated; - private Boolean complete; - private Boolean isSystemPrincipal; - private String type; - private String parenttype; - private Integer groupIdx; - private Integer metadataVersion; - private String tenantId; - private Double indexVersion; - private Double generationNum; - private Double created; - private Double modified; - private UserNameAndID author; - private UserNameAndID modifiedBy; - private UserNameAndID owner; - - - - /** - * Setter for name. - * @param name String value for name. - * @return Builder - */ - public Builder name(String name) { - this.name = name; - return this; - } - - /** - * Setter for displayName. - * @param displayName String value for displayName. - * @return Builder - */ - public Builder displayName(String displayName) { - this.displayName = displayName; - return this; - } - - /** - * Setter for id. - * @param id String value for id. - * @return Builder - */ - public Builder id(String id) { - this.id = id; - return this; - } - - /** - * Setter for visibility. - * @param visibility String value for visibility. - * @return Builder - */ - public Builder visibility(String visibility) { - this.visibility = visibility; - return this; - } - - /** - * Setter for description. - * @param description String value for description. - * @return Builder - */ - public Builder description(String description) { - this.description = description; - return this; - } - - /** - * Setter for privileges. - * @param privileges List of String value for privileges. - * @return Builder - */ - public Builder privileges(List privileges) { - this.privileges = privileges; - return this; - } - - /** - * Setter for orgs. - * @param orgs List of OrgType value for orgs. - * @return Builder - */ - public Builder orgs(List orgs) { - this.orgs = orgs; - return this; - } - - /** - * Setter for groups. - * @param groups List of GroupNameAndID value for groups. - * @return Builder - */ - public Builder groups(List groups) { - this.groups = groups; - return this; - } - - /** - * Setter for users. - * @param users List of UserNameAndID value for users. - * @return Builder - */ - public Builder users(List users) { - this.users = users; - return this; - } - - /** - * Setter for assignedLiveboards. - * @param assignedLiveboards List of LiveboardNameAndID value for assignedLiveboards. - * @return Builder - */ - public Builder assignedLiveboards(List assignedLiveboards) { - this.assignedLiveboards = assignedLiveboards; - return this; - } - - /** - * Setter for userGroupContent. - * @param userGroupContent Object value for userGroupContent. - * @return Builder - */ - public Builder userGroupContent(Object userGroupContent) { - this.userGroupContent = userGroupContent; - return this; - } - - /** - * Setter for tags. - * @param tags List of String value for tags. - * @return Builder - */ - public Builder tags(List tags) { - this.tags = tags; - return this; - } - - /** - * Setter for isDeleted. - * @param isDeleted Boolean value for isDeleted. - * @return Builder - */ - public Builder isDeleted(Boolean isDeleted) { - this.isDeleted = isDeleted; - return this; - } - - /** - * Setter for isHidden. - * @param isHidden Boolean value for isHidden. - * @return Builder - */ - public Builder isHidden(Boolean isHidden) { - this.isHidden = isHidden; - return this; - } - - /** - * Setter for isExternal. - * @param isExternal Boolean value for isExternal. - * @return Builder - */ - public Builder isExternal(Boolean isExternal) { - this.isExternal = isExternal; - return this; - } - - /** - * Setter for isDeprecated. - * @param isDeprecated Boolean value for isDeprecated. - * @return Builder - */ - public Builder isDeprecated(Boolean isDeprecated) { - this.isDeprecated = isDeprecated; - return this; - } - - /** - * Setter for complete. - * @param complete Boolean value for complete. - * @return Builder - */ - public Builder complete(Boolean complete) { - this.complete = complete; - return this; - } - - /** - * Setter for isSystemPrincipal. - * @param isSystemPrincipal Boolean value for isSystemPrincipal. - * @return Builder - */ - public Builder isSystemPrincipal(Boolean isSystemPrincipal) { - this.isSystemPrincipal = isSystemPrincipal; - return this; - } - - /** - * Setter for type. - * @param type String value for type. - * @return Builder - */ - public Builder type(String type) { - this.type = type; - return this; - } - - /** - * Setter for parenttype. - * @param parenttype String value for parenttype. - * @return Builder - */ - public Builder parenttype(String parenttype) { - this.parenttype = parenttype; - return this; - } - - /** - * Setter for groupIdx. - * @param groupIdx Integer value for groupIdx. - * @return Builder - */ - public Builder groupIdx(Integer groupIdx) { - this.groupIdx = groupIdx; - return this; - } - - /** - * Setter for metadataVersion. - * @param metadataVersion Integer value for metadataVersion. - * @return Builder - */ - public Builder metadataVersion(Integer metadataVersion) { - this.metadataVersion = metadataVersion; - return this; - } - - /** - * Setter for tenantId. - * @param tenantId String value for tenantId. - * @return Builder - */ - public Builder tenantId(String tenantId) { - this.tenantId = tenantId; - return this; - } - - /** - * Setter for indexVersion. - * @param indexVersion Double value for indexVersion. - * @return Builder - */ - public Builder indexVersion(Double indexVersion) { - this.indexVersion = indexVersion; - return this; - } - - /** - * Setter for generationNum. - * @param generationNum Double value for generationNum. - * @return Builder - */ - public Builder generationNum(Double generationNum) { - this.generationNum = generationNum; - return this; - } - - /** - * Setter for created. - * @param created Double value for created. - * @return Builder - */ - public Builder created(Double created) { - this.created = created; - return this; - } - - /** - * Setter for modified. - * @param modified Double value for modified. - * @return Builder - */ - public Builder modified(Double modified) { - this.modified = modified; - return this; - } - - /** - * Setter for author. - * @param author UserNameAndID value for author. - * @return Builder - */ - public Builder author(UserNameAndID author) { - this.author = author; - return this; - } - - /** - * Setter for modifiedBy. - * @param modifiedBy UserNameAndID value for modifiedBy. - * @return Builder - */ - public Builder modifiedBy(UserNameAndID modifiedBy) { - this.modifiedBy = modifiedBy; - return this; - } - - /** - * Setter for owner. - * @param owner UserNameAndID value for owner. - * @return Builder - */ - public Builder owner(UserNameAndID owner) { - this.owner = owner; - return this; - } - - /** - * Builds a new {@link GroupResponse} object using the set fields. - * @return {@link GroupResponse} - */ - public GroupResponse build() { - return new GroupResponse(name, displayName, id, visibility, description, privileges, - orgs, groups, users, assignedLiveboards, userGroupContent, tags, isDeleted, - isHidden, isExternal, isDeprecated, complete, isSystemPrincipal, type, - parenttype, groupIdx, metadataVersion, tenantId, indexVersion, generationNum, - created, modified, author, modifiedBy, owner); - } - } -} diff --git a/Java/src/main/java/localhost/models/HomeLiveboardResponse.java b/Java/src/main/java/localhost/models/HomeLiveboardResponse.java deleted file mode 100644 index bea95d2b1..000000000 --- a/Java/src/main/java/localhost/models/HomeLiveboardResponse.java +++ /dev/null @@ -1,214 +0,0 @@ -/* - * ThoughtSpotPublicRESTAPILib - * - * This file was automatically generated by APIMATIC v3.0 ( https://www.apimatic.io ). - */ - -package localhost.models; - -import com.fasterxml.jackson.annotation.JsonGetter; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonSetter; -import io.apimatic.core.types.BaseModel; - -/** - * This is a model class for HomeLiveboardResponse type. - */ -public class HomeLiveboardResponse { - private String userName; - private String userId; - private String liveboardName; - private String liveboardId; - - /** - * Default constructor. - */ - public HomeLiveboardResponse() { - } - - /** - * Initialization constructor. - * @param userName String value for userName. - * @param userId String value for userId. - * @param liveboardName String value for liveboardName. - * @param liveboardId String value for liveboardId. - */ - public HomeLiveboardResponse( - String userName, - String userId, - String liveboardName, - String liveboardId) { - this.userName = userName; - this.userId = userId; - this.liveboardName = liveboardName; - this.liveboardId = liveboardId; - } - - /** - * Getter for UserName. - * Name of the user - * @return Returns the String - */ - @JsonGetter("userName") - @JsonInclude(JsonInclude.Include.NON_NULL) - public String getUserName() { - return userName; - } - - /** - * Setter for UserName. - * Name of the user - * @param userName Value for String - */ - @JsonSetter("userName") - public void setUserName(String userName) { - this.userName = userName; - } - - /** - * Getter for UserId. - * The GUID of the user - * @return Returns the String - */ - @JsonGetter("userId") - @JsonInclude(JsonInclude.Include.NON_NULL) - public String getUserId() { - return userId; - } - - /** - * Setter for UserId. - * The GUID of the user - * @param userId Value for String - */ - @JsonSetter("userId") - public void setUserId(String userId) { - this.userId = userId; - } - - /** - * Getter for LiveboardName. - * Name of the liveboard - * @return Returns the String - */ - @JsonGetter("liveboardName") - @JsonInclude(JsonInclude.Include.NON_NULL) - public String getLiveboardName() { - return liveboardName; - } - - /** - * Setter for LiveboardName. - * Name of the liveboard - * @param liveboardName Value for String - */ - @JsonSetter("liveboardName") - public void setLiveboardName(String liveboardName) { - this.liveboardName = liveboardName; - } - - /** - * Getter for LiveboardId. - * The GUID of the liveboard - * @return Returns the String - */ - @JsonGetter("liveboardId") - @JsonInclude(JsonInclude.Include.NON_NULL) - public String getLiveboardId() { - return liveboardId; - } - - /** - * Setter for LiveboardId. - * The GUID of the liveboard - * @param liveboardId Value for String - */ - @JsonSetter("liveboardId") - public void setLiveboardId(String liveboardId) { - this.liveboardId = liveboardId; - } - - /** - * Converts this HomeLiveboardResponse into string format. - * @return String representation of this class - */ - @Override - public String toString() { - return "HomeLiveboardResponse [" + "userName=" + userName + ", userId=" + userId - + ", liveboardName=" + liveboardName + ", liveboardId=" + liveboardId + "]"; - } - - /** - * Builds a new {@link HomeLiveboardResponse.Builder} object. - * Creates the instance with the state of the current model. - * @return a new {@link HomeLiveboardResponse.Builder} object - */ - public Builder toBuilder() { - Builder builder = new Builder() - .userName(getUserName()) - .userId(getUserId()) - .liveboardName(getLiveboardName()) - .liveboardId(getLiveboardId()); - return builder; - } - - /** - * Class to build instances of {@link HomeLiveboardResponse}. - */ - public static class Builder { - private String userName; - private String userId; - private String liveboardName; - private String liveboardId; - - - - /** - * Setter for userName. - * @param userName String value for userName. - * @return Builder - */ - public Builder userName(String userName) { - this.userName = userName; - return this; - } - - /** - * Setter for userId. - * @param userId String value for userId. - * @return Builder - */ - public Builder userId(String userId) { - this.userId = userId; - return this; - } - - /** - * Setter for liveboardName. - * @param liveboardName String value for liveboardName. - * @return Builder - */ - public Builder liveboardName(String liveboardName) { - this.liveboardName = liveboardName; - return this; - } - - /** - * Setter for liveboardId. - * @param liveboardId String value for liveboardId. - * @return Builder - */ - public Builder liveboardId(String liveboardId) { - this.liveboardId = liveboardId; - return this; - } - - /** - * Builds a new {@link HomeLiveboardResponse} object using the set fields. - * @return {@link HomeLiveboardResponse} - */ - public HomeLiveboardResponse build() { - return new HomeLiveboardResponse(userName, userId, liveboardName, liveboardId); - } - } -} diff --git a/Java/src/main/java/localhost/models/ImportPolicyEnum.java b/Java/src/main/java/localhost/models/ImportPolicyEnum.java deleted file mode 100644 index b9ce04484..000000000 --- a/Java/src/main/java/localhost/models/ImportPolicyEnum.java +++ /dev/null @@ -1,79 +0,0 @@ -/* - * ThoughtSpotPublicRESTAPILib - * - * This file was automatically generated by APIMATIC v3.0 ( https://www.apimatic.io ). - */ - -package localhost.models; - -import java.util.ArrayList; -import java.util.List; -import java.util.TreeMap; - -/** - * ImportPolicyEnum to be used. - */ -public enum ImportPolicyEnum { - PARTIAL, - - ALL_OR_NONE, - - VALIDATE_ONLY; - - - private static TreeMap valueMap = new TreeMap<>(); - private String value; - - static { - PARTIAL.value = "PARTIAL"; - ALL_OR_NONE.value = "ALL_OR_NONE"; - VALIDATE_ONLY.value = "VALIDATE_ONLY"; - - valueMap.put("PARTIAL", PARTIAL); - valueMap.put("ALL_OR_NONE", ALL_OR_NONE); - valueMap.put("VALIDATE_ONLY", VALIDATE_ONLY); - } - - /** - * Returns the enum member associated with the given string value. - * @param toConvert String value to get enum member. - * @return The enum member against the given string value. - */ - @com.fasterxml.jackson.annotation.JsonCreator - public static ImportPolicyEnum fromString(String toConvert) { - return valueMap.get(toConvert); - } - - /** - * Returns the string value associated with the enum member. - * @return The string value against enum member. - */ - @com.fasterxml.jackson.annotation.JsonValue - public String value() { - return value; - } - - /** - * Get string representation of this enum. - */ - @Override - public String toString() { - return value.toString(); - } - - /** - * Convert list of ImportPolicyEnum values to list of string values. - * @param toConvert The list of ImportPolicyEnum values to convert. - * @return List of representative string values. - */ - public static List toValue(List toConvert) { - if (toConvert == null) { - return null; - } - List convertedValues = new ArrayList<>(); - for (ImportPolicyEnum enumValue : toConvert) { - convertedValues.add(enumValue.value); - } - return convertedValues; - } -} \ No newline at end of file diff --git a/Java/src/main/java/localhost/models/LiveboardNameAndID.java b/Java/src/main/java/localhost/models/LiveboardNameAndID.java deleted file mode 100644 index 0e70d6fc6..000000000 --- a/Java/src/main/java/localhost/models/LiveboardNameAndID.java +++ /dev/null @@ -1,139 +0,0 @@ -/* - * ThoughtSpotPublicRESTAPILib - * - * This file was automatically generated by APIMATIC v3.0 ( https://www.apimatic.io ). - */ - -package localhost.models; - -import com.fasterxml.jackson.annotation.JsonGetter; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonSetter; -import io.apimatic.core.types.BaseModel; - -/** - * This is a model class for LiveboardNameAndID type. - */ -public class LiveboardNameAndID { - private String name; - private String id; - - /** - * Default constructor. - */ - public LiveboardNameAndID() { - } - - /** - * Initialization constructor. - * @param name String value for name. - * @param id String value for id. - */ - public LiveboardNameAndID( - String name, - String id) { - this.name = name; - this.id = id; - } - - /** - * Getter for Name. - * Name of the liveboard - * @return Returns the String - */ - @JsonGetter("name") - @JsonInclude(JsonInclude.Include.NON_NULL) - public String getName() { - return name; - } - - /** - * Setter for Name. - * Name of the liveboard - * @param name Value for String - */ - @JsonSetter("name") - public void setName(String name) { - this.name = name; - } - - /** - * Getter for Id. - * GUID of the liveboard - * @return Returns the String - */ - @JsonGetter("id") - @JsonInclude(JsonInclude.Include.NON_NULL) - public String getId() { - return id; - } - - /** - * Setter for Id. - * GUID of the liveboard - * @param id Value for String - */ - @JsonSetter("id") - public void setId(String id) { - this.id = id; - } - - /** - * Converts this LiveboardNameAndID into string format. - * @return String representation of this class - */ - @Override - public String toString() { - return "LiveboardNameAndID [" + "name=" + name + ", id=" + id + "]"; - } - - /** - * Builds a new {@link LiveboardNameAndID.Builder} object. - * Creates the instance with the state of the current model. - * @return a new {@link LiveboardNameAndID.Builder} object - */ - public Builder toBuilder() { - Builder builder = new Builder() - .name(getName()) - .id(getId()); - return builder; - } - - /** - * Class to build instances of {@link LiveboardNameAndID}. - */ - public static class Builder { - private String name; - private String id; - - - - /** - * Setter for name. - * @param name String value for name. - * @return Builder - */ - public Builder name(String name) { - this.name = name; - return this; - } - - /** - * Setter for id. - * @param id String value for id. - * @return Builder - */ - public Builder id(String id) { - this.id = id; - return this; - } - - /** - * Builds a new {@link LiveboardNameAndID} object using the set fields. - * @return {@link LiveboardNameAndID} - */ - public LiveboardNameAndID build() { - return new LiveboardNameAndID(name, id); - } - } -} diff --git a/Java/src/main/java/localhost/models/LiveboardQueryResponse.java b/Java/src/main/java/localhost/models/LiveboardQueryResponse.java deleted file mode 100644 index b0742f144..000000000 --- a/Java/src/main/java/localhost/models/LiveboardQueryResponse.java +++ /dev/null @@ -1,177 +0,0 @@ -/* - * ThoughtSpotPublicRESTAPILib - * - * This file was automatically generated by APIMATIC v3.0 ( https://www.apimatic.io ). - */ - -package localhost.models; - -import com.fasterxml.jackson.annotation.JsonGetter; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonSetter; -import io.apimatic.core.types.BaseModel; -import java.util.List; - -/** - * This is a model class for LiveboardQueryResponse type. - */ -public class LiveboardQueryResponse { - private String name; - private String id; - private List viz; - - /** - * Default constructor. - */ - public LiveboardQueryResponse() { - } - - /** - * Initialization constructor. - * @param name String value for name. - * @param id String value for id. - * @param viz List of VizType value for viz. - */ - public LiveboardQueryResponse( - String name, - String id, - List viz) { - this.name = name; - this.id = id; - this.viz = viz; - } - - /** - * Getter for Name. - * The name of the Liveboard - * @return Returns the String - */ - @JsonGetter("name") - @JsonInclude(JsonInclude.Include.NON_NULL) - public String getName() { - return name; - } - - /** - * Setter for Name. - * The name of the Liveboard - * @param name Value for String - */ - @JsonSetter("name") - public void setName(String name) { - this.name = name; - } - - /** - * Getter for Id. - * The GUID of the Liveboard - * @return Returns the String - */ - @JsonGetter("id") - @JsonInclude(JsonInclude.Include.NON_NULL) - public String getId() { - return id; - } - - /** - * Setter for Id. - * The GUID of the Liveboard - * @param id Value for String - */ - @JsonSetter("id") - public void setId(String id) { - this.id = id; - } - - /** - * Getter for Viz. - * SQL query associated with the saved Answer - * @return Returns the List of VizType - */ - @JsonGetter("viz") - @JsonInclude(JsonInclude.Include.NON_NULL) - public List getViz() { - return viz; - } - - /** - * Setter for Viz. - * SQL query associated with the saved Answer - * @param viz Value for List of VizType - */ - @JsonSetter("viz") - public void setViz(List viz) { - this.viz = viz; - } - - /** - * Converts this LiveboardQueryResponse into string format. - * @return String representation of this class - */ - @Override - public String toString() { - return "LiveboardQueryResponse [" + "name=" + name + ", id=" + id + ", viz=" + viz + "]"; - } - - /** - * Builds a new {@link LiveboardQueryResponse.Builder} object. - * Creates the instance with the state of the current model. - * @return a new {@link LiveboardQueryResponse.Builder} object - */ - public Builder toBuilder() { - Builder builder = new Builder() - .name(getName()) - .id(getId()) - .viz(getViz()); - return builder; - } - - /** - * Class to build instances of {@link LiveboardQueryResponse}. - */ - public static class Builder { - private String name; - private String id; - private List viz; - - - - /** - * Setter for name. - * @param name String value for name. - * @return Builder - */ - public Builder name(String name) { - this.name = name; - return this; - } - - /** - * Setter for id. - * @param id String value for id. - * @return Builder - */ - public Builder id(String id) { - this.id = id; - return this; - } - - /** - * Setter for viz. - * @param viz List of VizType value for viz. - * @return Builder - */ - public Builder viz(List viz) { - this.viz = viz; - return this; - } - - /** - * Builds a new {@link LiveboardQueryResponse} object using the set fields. - * @return {@link LiveboardQueryResponse} - */ - public LiveboardQueryResponse build() { - return new LiveboardQueryResponse(name, id, viz); - } - } -} diff --git a/Java/src/main/java/localhost/models/LogicalTableHeader.java b/Java/src/main/java/localhost/models/LogicalTableHeader.java deleted file mode 100644 index 8076c58df..000000000 --- a/Java/src/main/java/localhost/models/LogicalTableHeader.java +++ /dev/null @@ -1,632 +0,0 @@ -/* - * ThoughtSpotPublicRESTAPILib - * - * This file was automatically generated by APIMATIC v3.0 ( https://www.apimatic.io ). - */ - -package localhost.models; - -import com.fasterxml.jackson.annotation.JsonGetter; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonSetter; -import io.apimatic.core.types.BaseModel; - -/** - * This is a model class for LogicalTableHeader type. - */ -public class LogicalTableHeader { - private String id; - private String name; - private String author; - private String authorName; - private String authorDisplayName; - private Double created; - private Double modified; - private String modifiedBy; - private Integer generationNum; - private String owner; - private Boolean deleted; - private Boolean hidden; - private String database; - private String schema; - private String type; - private String subType; - - /** - * Default constructor. - */ - public LogicalTableHeader() { - } - - /** - * Initialization constructor. - * @param id String value for id. - * @param name String value for name. - * @param author String value for author. - * @param authorName String value for authorName. - * @param authorDisplayName String value for authorDisplayName. - * @param created Double value for created. - * @param modified Double value for modified. - * @param modifiedBy String value for modifiedBy. - * @param generationNum Integer value for generationNum. - * @param owner String value for owner. - * @param deleted Boolean value for deleted. - * @param hidden Boolean value for hidden. - * @param database String value for database. - * @param schema String value for schema. - * @param type String value for type. - * @param subType String value for subType. - */ - public LogicalTableHeader( - String id, - String name, - String author, - String authorName, - String authorDisplayName, - Double created, - Double modified, - String modifiedBy, - Integer generationNum, - String owner, - Boolean deleted, - Boolean hidden, - String database, - String schema, - String type, - String subType) { - this.id = id; - this.name = name; - this.author = author; - this.authorName = authorName; - this.authorDisplayName = authorDisplayName; - this.created = created; - this.modified = modified; - this.modifiedBy = modifiedBy; - this.generationNum = generationNum; - this.owner = owner; - this.deleted = deleted; - this.hidden = hidden; - this.database = database; - this.schema = schema; - this.type = type; - this.subType = subType; - } - - /** - * Getter for Id. - * @return Returns the String - */ - @JsonGetter("id") - @JsonInclude(JsonInclude.Include.NON_NULL) - public String getId() { - return id; - } - - /** - * Setter for Id. - * @param id Value for String - */ - @JsonSetter("id") - public void setId(String id) { - this.id = id; - } - - /** - * Getter for Name. - * @return Returns the String - */ - @JsonGetter("name") - @JsonInclude(JsonInclude.Include.NON_NULL) - public String getName() { - return name; - } - - /** - * Setter for Name. - * @param name Value for String - */ - @JsonSetter("name") - public void setName(String name) { - this.name = name; - } - - /** - * Getter for Author. - * @return Returns the String - */ - @JsonGetter("author") - @JsonInclude(JsonInclude.Include.NON_NULL) - public String getAuthor() { - return author; - } - - /** - * Setter for Author. - * @param author Value for String - */ - @JsonSetter("author") - public void setAuthor(String author) { - this.author = author; - } - - /** - * Getter for AuthorName. - * @return Returns the String - */ - @JsonGetter("authorName") - @JsonInclude(JsonInclude.Include.NON_NULL) - public String getAuthorName() { - return authorName; - } - - /** - * Setter for AuthorName. - * @param authorName Value for String - */ - @JsonSetter("authorName") - public void setAuthorName(String authorName) { - this.authorName = authorName; - } - - /** - * Getter for AuthorDisplayName. - * @return Returns the String - */ - @JsonGetter("authorDisplayName") - @JsonInclude(JsonInclude.Include.NON_NULL) - public String getAuthorDisplayName() { - return authorDisplayName; - } - - /** - * Setter for AuthorDisplayName. - * @param authorDisplayName Value for String - */ - @JsonSetter("authorDisplayName") - public void setAuthorDisplayName(String authorDisplayName) { - this.authorDisplayName = authorDisplayName; - } - - /** - * Getter for Created. - * @return Returns the Double - */ - @JsonGetter("created") - @JsonInclude(JsonInclude.Include.NON_NULL) - public Double getCreated() { - return created; - } - - /** - * Setter for Created. - * @param created Value for Double - */ - @JsonSetter("created") - public void setCreated(Double created) { - this.created = created; - } - - /** - * Getter for Modified. - * @return Returns the Double - */ - @JsonGetter("modified") - @JsonInclude(JsonInclude.Include.NON_NULL) - public Double getModified() { - return modified; - } - - /** - * Setter for Modified. - * @param modified Value for Double - */ - @JsonSetter("modified") - public void setModified(Double modified) { - this.modified = modified; - } - - /** - * Getter for ModifiedBy. - * @return Returns the String - */ - @JsonGetter("modifiedBy") - @JsonInclude(JsonInclude.Include.NON_NULL) - public String getModifiedBy() { - return modifiedBy; - } - - /** - * Setter for ModifiedBy. - * @param modifiedBy Value for String - */ - @JsonSetter("modifiedBy") - public void setModifiedBy(String modifiedBy) { - this.modifiedBy = modifiedBy; - } - - /** - * Getter for GenerationNum. - * @return Returns the Integer - */ - @JsonGetter("generationNum") - @JsonInclude(JsonInclude.Include.NON_NULL) - public Integer getGenerationNum() { - return generationNum; - } - - /** - * Setter for GenerationNum. - * @param generationNum Value for Integer - */ - @JsonSetter("generationNum") - public void setGenerationNum(Integer generationNum) { - this.generationNum = generationNum; - } - - /** - * Getter for Owner. - * @return Returns the String - */ - @JsonGetter("owner") - @JsonInclude(JsonInclude.Include.NON_NULL) - public String getOwner() { - return owner; - } - - /** - * Setter for Owner. - * @param owner Value for String - */ - @JsonSetter("owner") - public void setOwner(String owner) { - this.owner = owner; - } - - /** - * Getter for Deleted. - * @return Returns the Boolean - */ - @JsonGetter("deleted") - @JsonInclude(JsonInclude.Include.NON_NULL) - public Boolean getDeleted() { - return deleted; - } - - /** - * Setter for Deleted. - * @param deleted Value for Boolean - */ - @JsonSetter("deleted") - public void setDeleted(Boolean deleted) { - this.deleted = deleted; - } - - /** - * Getter for Hidden. - * @return Returns the Boolean - */ - @JsonGetter("hidden") - @JsonInclude(JsonInclude.Include.NON_NULL) - public Boolean getHidden() { - return hidden; - } - - /** - * Setter for Hidden. - * @param hidden Value for Boolean - */ - @JsonSetter("hidden") - public void setHidden(Boolean hidden) { - this.hidden = hidden; - } - - /** - * Getter for Database. - * @return Returns the String - */ - @JsonGetter("database") - @JsonInclude(JsonInclude.Include.NON_NULL) - public String getDatabase() { - return database; - } - - /** - * Setter for Database. - * @param database Value for String - */ - @JsonSetter("database") - public void setDatabase(String database) { - this.database = database; - } - - /** - * Getter for Schema. - * @return Returns the String - */ - @JsonGetter("schema") - @JsonInclude(JsonInclude.Include.NON_NULL) - public String getSchema() { - return schema; - } - - /** - * Setter for Schema. - * @param schema Value for String - */ - @JsonSetter("schema") - public void setSchema(String schema) { - this.schema = schema; - } - - /** - * Getter for Type. - * @return Returns the String - */ - @JsonGetter("type") - @JsonInclude(JsonInclude.Include.NON_NULL) - public String getType() { - return type; - } - - /** - * Setter for Type. - * @param type Value for String - */ - @JsonSetter("type") - public void setType(String type) { - this.type = type; - } - - /** - * Getter for SubType. - * @return Returns the String - */ - @JsonGetter("subType") - @JsonInclude(JsonInclude.Include.NON_NULL) - public String getSubType() { - return subType; - } - - /** - * Setter for SubType. - * @param subType Value for String - */ - @JsonSetter("subType") - public void setSubType(String subType) { - this.subType = subType; - } - - /** - * Converts this LogicalTableHeader into string format. - * @return String representation of this class - */ - @Override - public String toString() { - return "LogicalTableHeader [" + "id=" + id + ", name=" + name + ", author=" + author - + ", authorName=" + authorName + ", authorDisplayName=" + authorDisplayName - + ", created=" + created + ", modified=" + modified + ", modifiedBy=" + modifiedBy - + ", generationNum=" + generationNum + ", owner=" + owner + ", deleted=" + deleted - + ", hidden=" + hidden + ", database=" + database + ", schema=" + schema + ", type=" - + type + ", subType=" + subType + "]"; - } - - /** - * Builds a new {@link LogicalTableHeader.Builder} object. - * Creates the instance with the state of the current model. - * @return a new {@link LogicalTableHeader.Builder} object - */ - public Builder toBuilder() { - Builder builder = new Builder() - .id(getId()) - .name(getName()) - .author(getAuthor()) - .authorName(getAuthorName()) - .authorDisplayName(getAuthorDisplayName()) - .created(getCreated()) - .modified(getModified()) - .modifiedBy(getModifiedBy()) - .generationNum(getGenerationNum()) - .owner(getOwner()) - .deleted(getDeleted()) - .hidden(getHidden()) - .database(getDatabase()) - .schema(getSchema()) - .type(getType()) - .subType(getSubType()); - return builder; - } - - /** - * Class to build instances of {@link LogicalTableHeader}. - */ - public static class Builder { - private String id; - private String name; - private String author; - private String authorName; - private String authorDisplayName; - private Double created; - private Double modified; - private String modifiedBy; - private Integer generationNum; - private String owner; - private Boolean deleted; - private Boolean hidden; - private String database; - private String schema; - private String type; - private String subType; - - - - /** - * Setter for id. - * @param id String value for id. - * @return Builder - */ - public Builder id(String id) { - this.id = id; - return this; - } - - /** - * Setter for name. - * @param name String value for name. - * @return Builder - */ - public Builder name(String name) { - this.name = name; - return this; - } - - /** - * Setter for author. - * @param author String value for author. - * @return Builder - */ - public Builder author(String author) { - this.author = author; - return this; - } - - /** - * Setter for authorName. - * @param authorName String value for authorName. - * @return Builder - */ - public Builder authorName(String authorName) { - this.authorName = authorName; - return this; - } - - /** - * Setter for authorDisplayName. - * @param authorDisplayName String value for authorDisplayName. - * @return Builder - */ - public Builder authorDisplayName(String authorDisplayName) { - this.authorDisplayName = authorDisplayName; - return this; - } - - /** - * Setter for created. - * @param created Double value for created. - * @return Builder - */ - public Builder created(Double created) { - this.created = created; - return this; - } - - /** - * Setter for modified. - * @param modified Double value for modified. - * @return Builder - */ - public Builder modified(Double modified) { - this.modified = modified; - return this; - } - - /** - * Setter for modifiedBy. - * @param modifiedBy String value for modifiedBy. - * @return Builder - */ - public Builder modifiedBy(String modifiedBy) { - this.modifiedBy = modifiedBy; - return this; - } - - /** - * Setter for generationNum. - * @param generationNum Integer value for generationNum. - * @return Builder - */ - public Builder generationNum(Integer generationNum) { - this.generationNum = generationNum; - return this; - } - - /** - * Setter for owner. - * @param owner String value for owner. - * @return Builder - */ - public Builder owner(String owner) { - this.owner = owner; - return this; - } - - /** - * Setter for deleted. - * @param deleted Boolean value for deleted. - * @return Builder - */ - public Builder deleted(Boolean deleted) { - this.deleted = deleted; - return this; - } - - /** - * Setter for hidden. - * @param hidden Boolean value for hidden. - * @return Builder - */ - public Builder hidden(Boolean hidden) { - this.hidden = hidden; - return this; - } - - /** - * Setter for database. - * @param database String value for database. - * @return Builder - */ - public Builder database(String database) { - this.database = database; - return this; - } - - /** - * Setter for schema. - * @param schema String value for schema. - * @return Builder - */ - public Builder schema(String schema) { - this.schema = schema; - return this; - } - - /** - * Setter for type. - * @param type String value for type. - * @return Builder - */ - public Builder type(String type) { - this.type = type; - return this; - } - - /** - * Setter for subType. - * @param subType String value for subType. - * @return Builder - */ - public Builder subType(String subType) { - this.subType = subType; - return this; - } - - /** - * Builds a new {@link LogicalTableHeader} object using the set fields. - * @return {@link LogicalTableHeader} - */ - public LogicalTableHeader build() { - return new LogicalTableHeader(id, name, author, authorName, authorDisplayName, created, - modified, modifiedBy, generationNum, owner, deleted, hidden, database, schema, - type, subType); - } - } -} diff --git a/Java/src/main/java/localhost/models/LogsResponse.java b/Java/src/main/java/localhost/models/LogsResponse.java deleted file mode 100644 index 0ba6c8dd5..000000000 --- a/Java/src/main/java/localhost/models/LogsResponse.java +++ /dev/null @@ -1,143 +0,0 @@ -/* - * ThoughtSpotPublicRESTAPILib - * - * This file was automatically generated by APIMATIC v3.0 ( https://www.apimatic.io ). - */ - -package localhost.models; - -import com.fasterxml.jackson.annotation.JsonGetter; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonSetter; -import io.apimatic.core.types.BaseModel; - -/** - * This is a model class for LogsResponse type. - */ -public class LogsResponse { - private String date; - private String log; - - /** - * Default constructor. - */ - public LogsResponse() { - } - - /** - * Initialization constructor. - * @param date String value for date. - * @param log String value for log. - */ - public LogsResponse( - String date, - String log) { - this.date = date; - this.log = log; - } - - /** - * Getter for Date. - * Date and time for the event in the log - * @return Returns the String - */ - @JsonGetter("date") - @JsonInclude(JsonInclude.Include.NON_NULL) - public String getDate() { - return date; - } - - /** - * Setter for Date. - * Date and time for the event in the log - * @param date Value for String - */ - @JsonSetter("date") - public void setDate(String date) { - this.date = date; - } - - /** - * Getter for Log. - * Logged event at the time specified in JSON format. This includes, Event ID, A unique - * description of the event, for example, User login failed, Timestamp, User ID of the person - * initiating the event and IP address of the ThoughtSpot instance. - * @return Returns the String - */ - @JsonGetter("log") - @JsonInclude(JsonInclude.Include.NON_NULL) - public String getLog() { - return log; - } - - /** - * Setter for Log. - * Logged event at the time specified in JSON format. This includes, Event ID, A unique - * description of the event, for example, User login failed, Timestamp, User ID of the person - * initiating the event and IP address of the ThoughtSpot instance. - * @param log Value for String - */ - @JsonSetter("log") - public void setLog(String log) { - this.log = log; - } - - /** - * Converts this LogsResponse into string format. - * @return String representation of this class - */ - @Override - public String toString() { - return "LogsResponse [" + "date=" + date + ", log=" + log + "]"; - } - - /** - * Builds a new {@link LogsResponse.Builder} object. - * Creates the instance with the state of the current model. - * @return a new {@link LogsResponse.Builder} object - */ - public Builder toBuilder() { - Builder builder = new Builder() - .date(getDate()) - .log(getLog()); - return builder; - } - - /** - * Class to build instances of {@link LogsResponse}. - */ - public static class Builder { - private String date; - private String log; - - - - /** - * Setter for date. - * @param date String value for date. - * @return Builder - */ - public Builder date(String date) { - this.date = date; - return this; - } - - /** - * Setter for log. - * @param log String value for log. - * @return Builder - */ - public Builder log(String log) { - this.log = log; - return this; - } - - /** - * Builds a new {@link LogsResponse} object using the set fields. - * @return {@link LogsResponse} - */ - public LogsResponse build() { - return new LogsResponse(date, log); - } - } -} diff --git a/Java/src/main/java/localhost/models/MetadataTagResponse.java b/Java/src/main/java/localhost/models/MetadataTagResponse.java deleted file mode 100644 index 44f9fbef1..000000000 --- a/Java/src/main/java/localhost/models/MetadataTagResponse.java +++ /dev/null @@ -1,576 +0,0 @@ -/* - * ThoughtSpotPublicRESTAPILib - * - * This file was automatically generated by APIMATIC v3.0 ( https://www.apimatic.io ). - */ - -package localhost.models; - -import com.fasterxml.jackson.annotation.JsonGetter; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonSetter; -import io.apimatic.core.types.BaseModel; - -/** - * This is a model class for MetadataTagResponse type. - */ -public class MetadataTagResponse { - private String name; - private String id; - private ClientState clientState; - private Double indexVersion; - private Double generationNum; - private Boolean isDeleted; - private Boolean isHidden; - private Boolean isExternal; - private Boolean isDeprecated; - private Double created; - private Double modified; - private TagNameAndID modifiedBy; - private TagNameAndID author; - private TagNameAndID owner; - - /** - * Default constructor. - */ - public MetadataTagResponse() { - } - - /** - * Initialization constructor. - * @param name String value for name. - * @param id String value for id. - * @param clientState ClientState value for clientState. - * @param indexVersion Double value for indexVersion. - * @param generationNum Double value for generationNum. - * @param isDeleted Boolean value for isDeleted. - * @param isHidden Boolean value for isHidden. - * @param isExternal Boolean value for isExternal. - * @param isDeprecated Boolean value for isDeprecated. - * @param created Double value for created. - * @param modified Double value for modified. - * @param modifiedBy TagNameAndID value for modifiedBy. - * @param author TagNameAndID value for author. - * @param owner TagNameAndID value for owner. - */ - public MetadataTagResponse( - String name, - String id, - ClientState clientState, - Double indexVersion, - Double generationNum, - Boolean isDeleted, - Boolean isHidden, - Boolean isExternal, - Boolean isDeprecated, - Double created, - Double modified, - TagNameAndID modifiedBy, - TagNameAndID author, - TagNameAndID owner) { - this.name = name; - this.id = id; - this.clientState = clientState; - this.indexVersion = indexVersion; - this.generationNum = generationNum; - this.isDeleted = isDeleted; - this.isHidden = isHidden; - this.isExternal = isExternal; - this.isDeprecated = isDeprecated; - this.created = created; - this.modified = modified; - this.modifiedBy = modifiedBy; - this.author = author; - this.owner = owner; - } - - /** - * Getter for Name. - * Name of the tag - * @return Returns the String - */ - @JsonGetter("name") - @JsonInclude(JsonInclude.Include.NON_NULL) - public String getName() { - return name; - } - - /** - * Setter for Name. - * Name of the tag - * @param name Value for String - */ - @JsonSetter("name") - public void setName(String name) { - this.name = name; - } - - /** - * Getter for Id. - * GUID of the tag - * @return Returns the String - */ - @JsonGetter("id") - @JsonInclude(JsonInclude.Include.NON_NULL) - public String getId() { - return id; - } - - /** - * Setter for Id. - * GUID of the tag - * @param id Value for String - */ - @JsonSetter("id") - public void setId(String id) { - this.id = id; - } - - /** - * Getter for ClientState. - * @return Returns the ClientState - */ - @JsonGetter("clientState") - @JsonInclude(JsonInclude.Include.NON_NULL) - public ClientState getClientState() { - return clientState; - } - - /** - * Setter for ClientState. - * @param clientState Value for ClientState - */ - @JsonSetter("clientState") - public void setClientState(ClientState clientState) { - this.clientState = clientState; - } - - /** - * Getter for IndexVersion. - * @return Returns the Double - */ - @JsonGetter("indexVersion") - @JsonInclude(JsonInclude.Include.NON_NULL) - public Double getIndexVersion() { - return indexVersion; - } - - /** - * Setter for IndexVersion. - * @param indexVersion Value for Double - */ - @JsonSetter("indexVersion") - public void setIndexVersion(Double indexVersion) { - this.indexVersion = indexVersion; - } - - /** - * Getter for GenerationNum. - * @return Returns the Double - */ - @JsonGetter("generationNum") - @JsonInclude(JsonInclude.Include.NON_NULL) - public Double getGenerationNum() { - return generationNum; - } - - /** - * Setter for GenerationNum. - * @param generationNum Value for Double - */ - @JsonSetter("generationNum") - public void setGenerationNum(Double generationNum) { - this.generationNum = generationNum; - } - - /** - * Getter for IsDeleted. - * Indicates if the tag is deleted - * @return Returns the Boolean - */ - @JsonGetter("isDeleted") - @JsonInclude(JsonInclude.Include.NON_NULL) - public Boolean getIsDeleted() { - return isDeleted; - } - - /** - * Setter for IsDeleted. - * Indicates if the tag is deleted - * @param isDeleted Value for Boolean - */ - @JsonSetter("isDeleted") - public void setIsDeleted(Boolean isDeleted) { - this.isDeleted = isDeleted; - } - - /** - * Getter for IsHidden. - * Indicates if the tag is hidden - * @return Returns the Boolean - */ - @JsonGetter("isHidden") - @JsonInclude(JsonInclude.Include.NON_NULL) - public Boolean getIsHidden() { - return isHidden; - } - - /** - * Setter for IsHidden. - * Indicates if the tag is hidden - * @param isHidden Value for Boolean - */ - @JsonSetter("isHidden") - public void setIsHidden(Boolean isHidden) { - this.isHidden = isHidden; - } - - /** - * Getter for IsExternal. - * Indicates if the tag is from external system - * @return Returns the Boolean - */ - @JsonGetter("isExternal") - @JsonInclude(JsonInclude.Include.NON_NULL) - public Boolean getIsExternal() { - return isExternal; - } - - /** - * Setter for IsExternal. - * Indicates if the tag is from external system - * @param isExternal Value for Boolean - */ - @JsonSetter("isExternal") - public void setIsExternal(Boolean isExternal) { - this.isExternal = isExternal; - } - - /** - * Getter for IsDeprecated. - * @return Returns the Boolean - */ - @JsonGetter("isDeprecated") - @JsonInclude(JsonInclude.Include.NON_NULL) - public Boolean getIsDeprecated() { - return isDeprecated; - } - - /** - * Setter for IsDeprecated. - * @param isDeprecated Value for Boolean - */ - @JsonSetter("isDeprecated") - public void setIsDeprecated(Boolean isDeprecated) { - this.isDeprecated = isDeprecated; - } - - /** - * Getter for Created. - * Date and time when group was created - * @return Returns the Double - */ - @JsonGetter("created") - @JsonInclude(JsonInclude.Include.NON_NULL) - public Double getCreated() { - return created; - } - - /** - * Setter for Created. - * Date and time when group was created - * @param created Value for Double - */ - @JsonSetter("created") - public void setCreated(Double created) { - this.created = created; - } - - /** - * Getter for Modified. - * Date and time of last modification of the group - * @return Returns the Double - */ - @JsonGetter("modified") - @JsonInclude(JsonInclude.Include.NON_NULL) - public Double getModified() { - return modified; - } - - /** - * Setter for Modified. - * Date and time of last modification of the group - * @param modified Value for Double - */ - @JsonSetter("modified") - public void setModified(Double modified) { - this.modified = modified; - } - - /** - * Getter for ModifiedBy. - * @return Returns the TagNameAndID - */ - @JsonGetter("modifiedBy") - @JsonInclude(JsonInclude.Include.NON_NULL) - public TagNameAndID getModifiedBy() { - return modifiedBy; - } - - /** - * Setter for ModifiedBy. - * @param modifiedBy Value for TagNameAndID - */ - @JsonSetter("modifiedBy") - public void setModifiedBy(TagNameAndID modifiedBy) { - this.modifiedBy = modifiedBy; - } - - /** - * Getter for Author. - * @return Returns the TagNameAndID - */ - @JsonGetter("author") - @JsonInclude(JsonInclude.Include.NON_NULL) - public TagNameAndID getAuthor() { - return author; - } - - /** - * Setter for Author. - * @param author Value for TagNameAndID - */ - @JsonSetter("author") - public void setAuthor(TagNameAndID author) { - this.author = author; - } - - /** - * Getter for Owner. - * @return Returns the TagNameAndID - */ - @JsonGetter("owner") - @JsonInclude(JsonInclude.Include.NON_NULL) - public TagNameAndID getOwner() { - return owner; - } - - /** - * Setter for Owner. - * @param owner Value for TagNameAndID - */ - @JsonSetter("owner") - public void setOwner(TagNameAndID owner) { - this.owner = owner; - } - - /** - * Converts this MetadataTagResponse into string format. - * @return String representation of this class - */ - @Override - public String toString() { - return "MetadataTagResponse [" + "name=" + name + ", id=" + id + ", clientState=" - + clientState + ", indexVersion=" + indexVersion + ", generationNum=" - + generationNum + ", isDeleted=" + isDeleted + ", isHidden=" + isHidden - + ", isExternal=" + isExternal + ", isDeprecated=" + isDeprecated + ", created=" - + created + ", modified=" + modified + ", modifiedBy=" + modifiedBy + ", author=" - + author + ", owner=" + owner + "]"; - } - - /** - * Builds a new {@link MetadataTagResponse.Builder} object. - * Creates the instance with the state of the current model. - * @return a new {@link MetadataTagResponse.Builder} object - */ - public Builder toBuilder() { - Builder builder = new Builder() - .name(getName()) - .id(getId()) - .clientState(getClientState()) - .indexVersion(getIndexVersion()) - .generationNum(getGenerationNum()) - .isDeleted(getIsDeleted()) - .isHidden(getIsHidden()) - .isExternal(getIsExternal()) - .isDeprecated(getIsDeprecated()) - .created(getCreated()) - .modified(getModified()) - .modifiedBy(getModifiedBy()) - .author(getAuthor()) - .owner(getOwner()); - return builder; - } - - /** - * Class to build instances of {@link MetadataTagResponse}. - */ - public static class Builder { - private String name; - private String id; - private ClientState clientState; - private Double indexVersion; - private Double generationNum; - private Boolean isDeleted; - private Boolean isHidden; - private Boolean isExternal; - private Boolean isDeprecated; - private Double created; - private Double modified; - private TagNameAndID modifiedBy; - private TagNameAndID author; - private TagNameAndID owner; - - - - /** - * Setter for name. - * @param name String value for name. - * @return Builder - */ - public Builder name(String name) { - this.name = name; - return this; - } - - /** - * Setter for id. - * @param id String value for id. - * @return Builder - */ - public Builder id(String id) { - this.id = id; - return this; - } - - /** - * Setter for clientState. - * @param clientState ClientState value for clientState. - * @return Builder - */ - public Builder clientState(ClientState clientState) { - this.clientState = clientState; - return this; - } - - /** - * Setter for indexVersion. - * @param indexVersion Double value for indexVersion. - * @return Builder - */ - public Builder indexVersion(Double indexVersion) { - this.indexVersion = indexVersion; - return this; - } - - /** - * Setter for generationNum. - * @param generationNum Double value for generationNum. - * @return Builder - */ - public Builder generationNum(Double generationNum) { - this.generationNum = generationNum; - return this; - } - - /** - * Setter for isDeleted. - * @param isDeleted Boolean value for isDeleted. - * @return Builder - */ - public Builder isDeleted(Boolean isDeleted) { - this.isDeleted = isDeleted; - return this; - } - - /** - * Setter for isHidden. - * @param isHidden Boolean value for isHidden. - * @return Builder - */ - public Builder isHidden(Boolean isHidden) { - this.isHidden = isHidden; - return this; - } - - /** - * Setter for isExternal. - * @param isExternal Boolean value for isExternal. - * @return Builder - */ - public Builder isExternal(Boolean isExternal) { - this.isExternal = isExternal; - return this; - } - - /** - * Setter for isDeprecated. - * @param isDeprecated Boolean value for isDeprecated. - * @return Builder - */ - public Builder isDeprecated(Boolean isDeprecated) { - this.isDeprecated = isDeprecated; - return this; - } - - /** - * Setter for created. - * @param created Double value for created. - * @return Builder - */ - public Builder created(Double created) { - this.created = created; - return this; - } - - /** - * Setter for modified. - * @param modified Double value for modified. - * @return Builder - */ - public Builder modified(Double modified) { - this.modified = modified; - return this; - } - - /** - * Setter for modifiedBy. - * @param modifiedBy TagNameAndID value for modifiedBy. - * @return Builder - */ - public Builder modifiedBy(TagNameAndID modifiedBy) { - this.modifiedBy = modifiedBy; - return this; - } - - /** - * Setter for author. - * @param author TagNameAndID value for author. - * @return Builder - */ - public Builder author(TagNameAndID author) { - this.author = author; - return this; - } - - /** - * Setter for owner. - * @param owner TagNameAndID value for owner. - * @return Builder - */ - public Builder owner(TagNameAndID owner) { - this.owner = owner; - return this; - } - - /** - * Builds a new {@link MetadataTagResponse} object using the set fields. - * @return {@link MetadataTagResponse} - */ - public MetadataTagResponse build() { - return new MetadataTagResponse(name, id, clientState, indexVersion, generationNum, - isDeleted, isHidden, isExternal, isDeprecated, created, modified, modifiedBy, - author, owner); - } - } -} diff --git a/Java/src/main/java/localhost/models/NameAndIdInput.java b/Java/src/main/java/localhost/models/NameAndIdInput.java deleted file mode 100644 index d69e25708..000000000 --- a/Java/src/main/java/localhost/models/NameAndIdInput.java +++ /dev/null @@ -1,139 +0,0 @@ -/* - * ThoughtSpotPublicRESTAPILib - * - * This file was automatically generated by APIMATIC v3.0 ( https://www.apimatic.io ). - */ - -package localhost.models; - -import com.fasterxml.jackson.annotation.JsonGetter; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonSetter; -import io.apimatic.core.types.BaseModel; - -/** - * This is a model class for NameAndIdInput type. - */ -public class NameAndIdInput { - private String name; - private String id; - - /** - * Default constructor. - */ - public NameAndIdInput() { - } - - /** - * Initialization constructor. - * @param name String value for name. - * @param id String value for id. - */ - public NameAndIdInput( - String name, - String id) { - this.name = name; - this.id = id; - } - - /** - * Getter for Name. - * Name of the user - * @return Returns the String - */ - @JsonGetter("name") - @JsonInclude(JsonInclude.Include.NON_NULL) - public String getName() { - return name; - } - - /** - * Setter for Name. - * Name of the user - * @param name Value for String - */ - @JsonSetter("name") - public void setName(String name) { - this.name = name; - } - - /** - * Getter for Id. - * GUID of the user - * @return Returns the String - */ - @JsonGetter("id") - @JsonInclude(JsonInclude.Include.NON_NULL) - public String getId() { - return id; - } - - /** - * Setter for Id. - * GUID of the user - * @param id Value for String - */ - @JsonSetter("id") - public void setId(String id) { - this.id = id; - } - - /** - * Converts this NameAndIdInput into string format. - * @return String representation of this class - */ - @Override - public String toString() { - return "NameAndIdInput [" + "name=" + name + ", id=" + id + "]"; - } - - /** - * Builds a new {@link NameAndIdInput.Builder} object. - * Creates the instance with the state of the current model. - * @return a new {@link NameAndIdInput.Builder} object - */ - public Builder toBuilder() { - Builder builder = new Builder() - .name(getName()) - .id(getId()); - return builder; - } - - /** - * Class to build instances of {@link NameAndIdInput}. - */ - public static class Builder { - private String name; - private String id; - - - - /** - * Setter for name. - * @param name String value for name. - * @return Builder - */ - public Builder name(String name) { - this.name = name; - return this; - } - - /** - * Setter for id. - * @param id String value for id. - * @return Builder - */ - public Builder id(String id) { - this.id = id; - return this; - } - - /** - * Builds a new {@link NameAndIdInput} object using the set fields. - * @return {@link NameAndIdInput} - */ - public NameAndIdInput build() { - return new NameAndIdInput(name, id); - } - } -} diff --git a/Java/src/main/java/localhost/models/OrgType.java b/Java/src/main/java/localhost/models/OrgType.java deleted file mode 100644 index 4b2c7e392..000000000 --- a/Java/src/main/java/localhost/models/OrgType.java +++ /dev/null @@ -1,139 +0,0 @@ -/* - * ThoughtSpotPublicRESTAPILib - * - * This file was automatically generated by APIMATIC v3.0 ( https://www.apimatic.io ). - */ - -package localhost.models; - -import com.fasterxml.jackson.annotation.JsonGetter; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonSetter; -import io.apimatic.core.types.BaseModel; - -/** - * This is a model class for OrgType type. - */ -public class OrgType { - private String name; - private Integer id; - - /** - * Default constructor. - */ - public OrgType() { - } - - /** - * Initialization constructor. - * @param name String value for name. - * @param id Integer value for id. - */ - public OrgType( - String name, - Integer id) { - this.name = name; - this.id = id; - } - - /** - * Getter for Name. - * Name of the organization - * @return Returns the String - */ - @JsonGetter("name") - @JsonInclude(JsonInclude.Include.NON_NULL) - public String getName() { - return name; - } - - /** - * Setter for Name. - * Name of the organization - * @param name Value for String - */ - @JsonSetter("name") - public void setName(String name) { - this.name = name; - } - - /** - * Getter for Id. - * Id of the organization - * @return Returns the Integer - */ - @JsonGetter("id") - @JsonInclude(JsonInclude.Include.NON_NULL) - public Integer getId() { - return id; - } - - /** - * Setter for Id. - * Id of the organization - * @param id Value for Integer - */ - @JsonSetter("id") - public void setId(Integer id) { - this.id = id; - } - - /** - * Converts this OrgType into string format. - * @return String representation of this class - */ - @Override - public String toString() { - return "OrgType [" + "name=" + name + ", id=" + id + "]"; - } - - /** - * Builds a new {@link OrgType.Builder} object. - * Creates the instance with the state of the current model. - * @return a new {@link OrgType.Builder} object - */ - public Builder toBuilder() { - Builder builder = new Builder() - .name(getName()) - .id(getId()); - return builder; - } - - /** - * Class to build instances of {@link OrgType}. - */ - public static class Builder { - private String name; - private Integer id; - - - - /** - * Setter for name. - * @param name String value for name. - * @return Builder - */ - public Builder name(String name) { - this.name = name; - return this; - } - - /** - * Setter for id. - * @param id Integer value for id. - * @return Builder - */ - public Builder id(Integer id) { - this.id = id; - return this; - } - - /** - * Builds a new {@link OrgType} object using the set fields. - * @return {@link OrgType} - */ - public OrgType build() { - return new OrgType(name, id); - } - } -} diff --git a/Java/src/main/java/localhost/models/OrgsResponse.java b/Java/src/main/java/localhost/models/OrgsResponse.java deleted file mode 100644 index 68a75289f..000000000 --- a/Java/src/main/java/localhost/models/OrgsResponse.java +++ /dev/null @@ -1,290 +0,0 @@ -/* - * ThoughtSpotPublicRESTAPILib - * - * This file was automatically generated by APIMATIC v3.0 ( https://www.apimatic.io ). - */ - -package localhost.models; - -import com.fasterxml.jackson.annotation.JsonGetter; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonSetter; -import io.apimatic.core.types.BaseModel; - -/** - * This is a model class for OrgsResponse type. - */ -public class OrgsResponse { - private Integer orgId; - private String orgName; - private String description; - private String allGroupUserId; - private String defaultAdminUserGroupId; - private Boolean active; - - /** - * Default constructor. - */ - public OrgsResponse() { - } - - /** - * Initialization constructor. - * @param orgId Integer value for orgId. - * @param orgName String value for orgName. - * @param description String value for description. - * @param allGroupUserId String value for allGroupUserId. - * @param defaultAdminUserGroupId String value for defaultAdminUserGroupId. - * @param active Boolean value for active. - */ - public OrgsResponse( - Integer orgId, - String orgName, - String description, - String allGroupUserId, - String defaultAdminUserGroupId, - Boolean active) { - this.orgId = orgId; - this.orgName = orgName; - this.description = description; - this.allGroupUserId = allGroupUserId; - this.defaultAdminUserGroupId = defaultAdminUserGroupId; - this.active = active; - } - - /** - * Getter for OrgId. - * ID of the organization searched for - * @return Returns the Integer - */ - @JsonGetter("orgId") - @JsonInclude(JsonInclude.Include.NON_NULL) - public Integer getOrgId() { - return orgId; - } - - /** - * Setter for OrgId. - * ID of the organization searched for - * @param orgId Value for Integer - */ - @JsonSetter("orgId") - public void setOrgId(Integer orgId) { - this.orgId = orgId; - } - - /** - * Getter for OrgName. - * Name of the organization searched for - * @return Returns the String - */ - @JsonGetter("orgName") - @JsonInclude(JsonInclude.Include.NON_NULL) - public String getOrgName() { - return orgName; - } - - /** - * Setter for OrgName. - * Name of the organization searched for - * @param orgName Value for String - */ - @JsonSetter("orgName") - public void setOrgName(String orgName) { - this.orgName = orgName; - } - - /** - * Getter for Description. - * Description associated with the organization - * @return Returns the String - */ - @JsonGetter("description") - @JsonInclude(JsonInclude.Include.NON_NULL) - public String getDescription() { - return description; - } - - /** - * Setter for Description. - * Description associated with the organization - * @param description Value for String - */ - @JsonSetter("description") - public void setDescription(String description) { - this.description = description; - } - - /** - * Getter for AllGroupUserId. - * GUID of the ALL group in the organization - * @return Returns the String - */ - @JsonGetter("allGroupUserId") - @JsonInclude(JsonInclude.Include.NON_NULL) - public String getAllGroupUserId() { - return allGroupUserId; - } - - /** - * Setter for AllGroupUserId. - * GUID of the ALL group in the organization - * @param allGroupUserId Value for String - */ - @JsonSetter("allGroupUserId") - public void setAllGroupUserId(String allGroupUserId) { - this.allGroupUserId = allGroupUserId; - } - - /** - * Getter for DefaultAdminUserGroupId. - * GUID of the admin group in the organization - * @return Returns the String - */ - @JsonGetter("defaultAdminUserGroupId") - @JsonInclude(JsonInclude.Include.NON_NULL) - public String getDefaultAdminUserGroupId() { - return defaultAdminUserGroupId; - } - - /** - * Setter for DefaultAdminUserGroupId. - * GUID of the admin group in the organization - * @param defaultAdminUserGroupId Value for String - */ - @JsonSetter("defaultAdminUserGroupId") - public void setDefaultAdminUserGroupId(String defaultAdminUserGroupId) { - this.defaultAdminUserGroupId = defaultAdminUserGroupId; - } - - /** - * Getter for Active. - * Indicates if the organization is active or not - * @return Returns the Boolean - */ - @JsonGetter("active") - @JsonInclude(JsonInclude.Include.NON_NULL) - public Boolean getActive() { - return active; - } - - /** - * Setter for Active. - * Indicates if the organization is active or not - * @param active Value for Boolean - */ - @JsonSetter("active") - public void setActive(Boolean active) { - this.active = active; - } - - /** - * Converts this OrgsResponse into string format. - * @return String representation of this class - */ - @Override - public String toString() { - return "OrgsResponse [" + "orgId=" + orgId + ", orgName=" + orgName + ", description=" - + description + ", allGroupUserId=" + allGroupUserId + ", defaultAdminUserGroupId=" - + defaultAdminUserGroupId + ", active=" + active + "]"; - } - - /** - * Builds a new {@link OrgsResponse.Builder} object. - * Creates the instance with the state of the current model. - * @return a new {@link OrgsResponse.Builder} object - */ - public Builder toBuilder() { - Builder builder = new Builder() - .orgId(getOrgId()) - .orgName(getOrgName()) - .description(getDescription()) - .allGroupUserId(getAllGroupUserId()) - .defaultAdminUserGroupId(getDefaultAdminUserGroupId()) - .active(getActive()); - return builder; - } - - /** - * Class to build instances of {@link OrgsResponse}. - */ - public static class Builder { - private Integer orgId; - private String orgName; - private String description; - private String allGroupUserId; - private String defaultAdminUserGroupId; - private Boolean active; - - - - /** - * Setter for orgId. - * @param orgId Integer value for orgId. - * @return Builder - */ - public Builder orgId(Integer orgId) { - this.orgId = orgId; - return this; - } - - /** - * Setter for orgName. - * @param orgName String value for orgName. - * @return Builder - */ - public Builder orgName(String orgName) { - this.orgName = orgName; - return this; - } - - /** - * Setter for description. - * @param description String value for description. - * @return Builder - */ - public Builder description(String description) { - this.description = description; - return this; - } - - /** - * Setter for allGroupUserId. - * @param allGroupUserId String value for allGroupUserId. - * @return Builder - */ - public Builder allGroupUserId(String allGroupUserId) { - this.allGroupUserId = allGroupUserId; - return this; - } - - /** - * Setter for defaultAdminUserGroupId. - * @param defaultAdminUserGroupId String value for defaultAdminUserGroupId. - * @return Builder - */ - public Builder defaultAdminUserGroupId(String defaultAdminUserGroupId) { - this.defaultAdminUserGroupId = defaultAdminUserGroupId; - return this; - } - - /** - * Setter for active. - * @param active Boolean value for active. - * @return Builder - */ - public Builder active(Boolean active) { - this.active = active; - return this; - } - - /** - * Builds a new {@link OrgsResponse} object using the set fields. - * @return {@link OrgsResponse} - */ - public OrgsResponse build() { - return new OrgsResponse(orgId, orgName, description, allGroupUserId, - defaultAdminUserGroupId, active); - } - } -} diff --git a/Java/src/main/java/localhost/models/OrientationEnum.java b/Java/src/main/java/localhost/models/OrientationEnum.java deleted file mode 100644 index b9842e67c..000000000 --- a/Java/src/main/java/localhost/models/OrientationEnum.java +++ /dev/null @@ -1,75 +0,0 @@ -/* - * ThoughtSpotPublicRESTAPILib - * - * This file was automatically generated by APIMATIC v3.0 ( https://www.apimatic.io ). - */ - -package localhost.models; - -import java.util.ArrayList; -import java.util.List; -import java.util.TreeMap; - -/** - * OrientationEnum to be used. - */ -public enum OrientationEnum { - PORTRAIT, - - LANDSCAPE; - - - private static TreeMap valueMap = new TreeMap<>(); - private String value; - - static { - PORTRAIT.value = "PORTRAIT"; - LANDSCAPE.value = "LANDSCAPE"; - - valueMap.put("PORTRAIT", PORTRAIT); - valueMap.put("LANDSCAPE", LANDSCAPE); - } - - /** - * Returns the enum member associated with the given string value. - * @param toConvert String value to get enum member. - * @return The enum member against the given string value. - */ - @com.fasterxml.jackson.annotation.JsonCreator - public static OrientationEnum fromString(String toConvert) { - return valueMap.get(toConvert); - } - - /** - * Returns the string value associated with the enum member. - * @return The string value against enum member. - */ - @com.fasterxml.jackson.annotation.JsonValue - public String value() { - return value; - } - - /** - * Get string representation of this enum. - */ - @Override - public String toString() { - return value.toString(); - } - - /** - * Convert list of OrientationEnum values to list of string values. - * @param toConvert The list of OrientationEnum values to convert. - * @return List of representative string values. - */ - public static List toValue(List toConvert) { - if (toConvert == null) { - return null; - } - List convertedValues = new ArrayList<>(); - for (OrientationEnum enumValue : toConvert) { - convertedValues.add(enumValue.value); - } - return convertedValues; - } -} \ No newline at end of file diff --git a/Java/src/main/java/localhost/models/PdfOptionsInput.java b/Java/src/main/java/localhost/models/PdfOptionsInput.java deleted file mode 100644 index 203e7e661..000000000 --- a/Java/src/main/java/localhost/models/PdfOptionsInput.java +++ /dev/null @@ -1,332 +0,0 @@ -/* - * ThoughtSpotPublicRESTAPILib - * - * This file was automatically generated by APIMATIC v3.0 ( https://www.apimatic.io ). - */ - -package localhost.models; - -import com.fasterxml.jackson.annotation.JsonGetter; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonSetter; -import io.apimatic.core.types.BaseModel; - -/** - * This is a model class for PdfOptionsInput type. - */ -public class PdfOptionsInput { - private OrientationEnum orientation; - private Boolean truncateTables; - private Boolean includeLogo; - private String footerText; - private Boolean includePageNumber; - private Boolean includeCoverPage; - private Boolean includeFilterPage; - - /** - * Default constructor. - */ - public PdfOptionsInput() { - } - - /** - * Initialization constructor. - * @param orientation OrientationEnum value for orientation. - * @param truncateTables Boolean value for truncateTables. - * @param includeLogo Boolean value for includeLogo. - * @param footerText String value for footerText. - * @param includePageNumber Boolean value for includePageNumber. - * @param includeCoverPage Boolean value for includeCoverPage. - * @param includeFilterPage Boolean value for includeFilterPage. - */ - public PdfOptionsInput( - OrientationEnum orientation, - Boolean truncateTables, - Boolean includeLogo, - String footerText, - Boolean includePageNumber, - Boolean includeCoverPage, - Boolean includeFilterPage) { - this.orientation = orientation; - this.truncateTables = truncateTables; - this.includeLogo = includeLogo; - this.footerText = footerText; - this.includePageNumber = includePageNumber; - this.includeCoverPage = includeCoverPage; - this.includeFilterPage = includeFilterPage; - } - - /** - * Getter for Orientation. - * Page orientation for the PDF. Default: PORTRAIT - * @return Returns the OrientationEnum - */ - @JsonGetter("orientation") - @JsonInclude(JsonInclude.Include.NON_NULL) - public OrientationEnum getOrientation() { - return orientation; - } - - /** - * Setter for Orientation. - * Page orientation for the PDF. Default: PORTRAIT - * @param orientation Value for OrientationEnum - */ - @JsonSetter("orientation") - public void setOrientation(OrientationEnum orientation) { - this.orientation = orientation; - } - - /** - * Getter for TruncateTables. - * When set to true, only the first page of the tables is displayed in the file. This setting is - * applicable only when generating report for specific visualization ids. Default: false - * @return Returns the Boolean - */ - @JsonGetter("truncateTables") - @JsonInclude(JsonInclude.Include.NON_NULL) - public Boolean getTruncateTables() { - return truncateTables; - } - - /** - * Setter for TruncateTables. - * When set to true, only the first page of the tables is displayed in the file. This setting is - * applicable only when generating report for specific visualization ids. Default: false - * @param truncateTables Value for Boolean - */ - @JsonSetter("truncateTables") - public void setTruncateTables(Boolean truncateTables) { - this.truncateTables = truncateTables; - } - - /** - * Getter for IncludeLogo. - * Include customized wide logo if available in the footer. Default: true - * @return Returns the Boolean - */ - @JsonGetter("includeLogo") - @JsonInclude(JsonInclude.Include.NON_NULL) - public Boolean getIncludeLogo() { - return includeLogo; - } - - /** - * Setter for IncludeLogo. - * Include customized wide logo if available in the footer. Default: true - * @param includeLogo Value for Boolean - */ - @JsonSetter("includeLogo") - public void setIncludeLogo(Boolean includeLogo) { - this.includeLogo = includeLogo; - } - - /** - * Getter for FooterText. - * Footer text to include in the footer of each page of the PDF. - * @return Returns the String - */ - @JsonGetter("footerText") - @JsonInclude(JsonInclude.Include.NON_NULL) - public String getFooterText() { - return footerText; - } - - /** - * Setter for FooterText. - * Footer text to include in the footer of each page of the PDF. - * @param footerText Value for String - */ - @JsonSetter("footerText") - public void setFooterText(String footerText) { - this.footerText = footerText; - } - - /** - * Getter for IncludePageNumber. - * When set to true, the page number is included in the footer of each page. Default: true - * @return Returns the Boolean - */ - @JsonGetter("includePageNumber") - @JsonInclude(JsonInclude.Include.NON_NULL) - public Boolean getIncludePageNumber() { - return includePageNumber; - } - - /** - * Setter for IncludePageNumber. - * When set to true, the page number is included in the footer of each page. Default: true - * @param includePageNumber Value for Boolean - */ - @JsonSetter("includePageNumber") - public void setIncludePageNumber(Boolean includePageNumber) { - this.includePageNumber = includePageNumber; - } - - /** - * Getter for IncludeCoverPage. - * When set to true, a cover page with the Liveboard title is added in the PDF. Default: true - * @return Returns the Boolean - */ - @JsonGetter("includeCoverPage") - @JsonInclude(JsonInclude.Include.NON_NULL) - public Boolean getIncludeCoverPage() { - return includeCoverPage; - } - - /** - * Setter for IncludeCoverPage. - * When set to true, a cover page with the Liveboard title is added in the PDF. Default: true - * @param includeCoverPage Value for Boolean - */ - @JsonSetter("includeCoverPage") - public void setIncludeCoverPage(Boolean includeCoverPage) { - this.includeCoverPage = includeCoverPage; - } - - /** - * Getter for IncludeFilterPage. - * When set to true, a second page with a list of all applied filters is added in the PDF. - * Default: true - * @return Returns the Boolean - */ - @JsonGetter("includeFilterPage") - @JsonInclude(JsonInclude.Include.NON_NULL) - public Boolean getIncludeFilterPage() { - return includeFilterPage; - } - - /** - * Setter for IncludeFilterPage. - * When set to true, a second page with a list of all applied filters is added in the PDF. - * Default: true - * @param includeFilterPage Value for Boolean - */ - @JsonSetter("includeFilterPage") - public void setIncludeFilterPage(Boolean includeFilterPage) { - this.includeFilterPage = includeFilterPage; - } - - /** - * Converts this PdfOptionsInput into string format. - * @return String representation of this class - */ - @Override - public String toString() { - return "PdfOptionsInput [" + "orientation=" + orientation + ", truncateTables=" - + truncateTables + ", includeLogo=" + includeLogo + ", footerText=" + footerText - + ", includePageNumber=" + includePageNumber + ", includeCoverPage=" - + includeCoverPage + ", includeFilterPage=" + includeFilterPage + "]"; - } - - /** - * Builds a new {@link PdfOptionsInput.Builder} object. - * Creates the instance with the state of the current model. - * @return a new {@link PdfOptionsInput.Builder} object - */ - public Builder toBuilder() { - Builder builder = new Builder() - .orientation(getOrientation()) - .truncateTables(getTruncateTables()) - .includeLogo(getIncludeLogo()) - .footerText(getFooterText()) - .includePageNumber(getIncludePageNumber()) - .includeCoverPage(getIncludeCoverPage()) - .includeFilterPage(getIncludeFilterPage()); - return builder; - } - - /** - * Class to build instances of {@link PdfOptionsInput}. - */ - public static class Builder { - private OrientationEnum orientation; - private Boolean truncateTables; - private Boolean includeLogo; - private String footerText; - private Boolean includePageNumber; - private Boolean includeCoverPage; - private Boolean includeFilterPage; - - - - /** - * Setter for orientation. - * @param orientation OrientationEnum value for orientation. - * @return Builder - */ - public Builder orientation(OrientationEnum orientation) { - this.orientation = orientation; - return this; - } - - /** - * Setter for truncateTables. - * @param truncateTables Boolean value for truncateTables. - * @return Builder - */ - public Builder truncateTables(Boolean truncateTables) { - this.truncateTables = truncateTables; - return this; - } - - /** - * Setter for includeLogo. - * @param includeLogo Boolean value for includeLogo. - * @return Builder - */ - public Builder includeLogo(Boolean includeLogo) { - this.includeLogo = includeLogo; - return this; - } - - /** - * Setter for footerText. - * @param footerText String value for footerText. - * @return Builder - */ - public Builder footerText(String footerText) { - this.footerText = footerText; - return this; - } - - /** - * Setter for includePageNumber. - * @param includePageNumber Boolean value for includePageNumber. - * @return Builder - */ - public Builder includePageNumber(Boolean includePageNumber) { - this.includePageNumber = includePageNumber; - return this; - } - - /** - * Setter for includeCoverPage. - * @param includeCoverPage Boolean value for includeCoverPage. - * @return Builder - */ - public Builder includeCoverPage(Boolean includeCoverPage) { - this.includeCoverPage = includeCoverPage; - return this; - } - - /** - * Setter for includeFilterPage. - * @param includeFilterPage Boolean value for includeFilterPage. - * @return Builder - */ - public Builder includeFilterPage(Boolean includeFilterPage) { - this.includeFilterPage = includeFilterPage; - return this; - } - - /** - * Builds a new {@link PdfOptionsInput} object using the set fields. - * @return {@link PdfOptionsInput} - */ - public PdfOptionsInput build() { - return new PdfOptionsInput(orientation, truncateTables, includeLogo, footerText, - includePageNumber, includeCoverPage, includeFilterPage); - } - } -} diff --git a/Java/src/main/java/localhost/models/PermissionsTypeSearch.java b/Java/src/main/java/localhost/models/PermissionsTypeSearch.java deleted file mode 100644 index ef9cc34ce..000000000 --- a/Java/src/main/java/localhost/models/PermissionsTypeSearch.java +++ /dev/null @@ -1,140 +0,0 @@ -/* - * ThoughtSpotPublicRESTAPILib - * - * This file was automatically generated by APIMATIC v3.0 ( https://www.apimatic.io ). - */ - -package localhost.models; - -import com.fasterxml.jackson.annotation.JsonGetter; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonSetter; -import io.apimatic.core.types.BaseModel; -import java.util.List; - -/** - * This is a model class for PermissionsTypeSearch type. - */ -public class PermissionsTypeSearch { - private String type; - private List tsObject; - - /** - * Default constructor. - */ - public PermissionsTypeSearch() { - } - - /** - * Initialization constructor. - * @param type String value for type. - * @param tsObject List of TsObjectTypeSerach value for tsObject. - */ - public PermissionsTypeSearch( - String type, - List tsObject) { - this.type = type; - this.tsObject = tsObject; - } - - /** - * Getter for Type. - * Indicates the type of the object - * @return Returns the String - */ - @JsonGetter("type") - @JsonInclude(JsonInclude.Include.NON_NULL) - public String getType() { - return type; - } - - /** - * Setter for Type. - * Indicates the type of the object - * @param type Value for String - */ - @JsonSetter("type") - public void setType(String type) { - this.type = type; - } - - /** - * Getter for TsObject. - * An array of objects of type mentioned in type field - * @return Returns the List of TsObjectTypeSerach - */ - @JsonGetter("tsObject") - @JsonInclude(JsonInclude.Include.NON_NULL) - public List getTsObject() { - return tsObject; - } - - /** - * Setter for TsObject. - * An array of objects of type mentioned in type field - * @param tsObject Value for List of TsObjectTypeSerach - */ - @JsonSetter("tsObject") - public void setTsObject(List tsObject) { - this.tsObject = tsObject; - } - - /** - * Converts this PermissionsTypeSearch into string format. - * @return String representation of this class - */ - @Override - public String toString() { - return "PermissionsTypeSearch [" + "type=" + type + ", tsObject=" + tsObject + "]"; - } - - /** - * Builds a new {@link PermissionsTypeSearch.Builder} object. - * Creates the instance with the state of the current model. - * @return a new {@link PermissionsTypeSearch.Builder} object - */ - public Builder toBuilder() { - Builder builder = new Builder() - .type(getType()) - .tsObject(getTsObject()); - return builder; - } - - /** - * Class to build instances of {@link PermissionsTypeSearch}. - */ - public static class Builder { - private String type; - private List tsObject; - - - - /** - * Setter for type. - * @param type String value for type. - * @return Builder - */ - public Builder type(String type) { - this.type = type; - return this; - } - - /** - * Setter for tsObject. - * @param tsObject List of TsObjectTypeSerach value for tsObject. - * @return Builder - */ - public Builder tsObject(List tsObject) { - this.tsObject = tsObject; - return this; - } - - /** - * Builds a new {@link PermissionsTypeSearch} object using the set fields. - * @return {@link PermissionsTypeSearch} - */ - public PermissionsTypeSearch build() { - return new PermissionsTypeSearch(type, tsObject); - } - } -} diff --git a/Java/src/main/java/localhost/models/PinboardDetails.java b/Java/src/main/java/localhost/models/PinboardDetails.java deleted file mode 100644 index 6c7b895e5..000000000 --- a/Java/src/main/java/localhost/models/PinboardDetails.java +++ /dev/null @@ -1,214 +0,0 @@ -/* - * ThoughtSpotPublicRESTAPILib - * - * This file was automatically generated by APIMATIC v3.0 ( https://www.apimatic.io ). - */ - -package localhost.models; - -import com.fasterxml.jackson.annotation.JsonGetter; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonSetter; -import io.apimatic.core.types.BaseModel; - -/** - * This is a model class for PinboardDetails type. - */ -public class PinboardDetails { - private String pinboardId; - private String pinboardName; - private String tabId; - private String tabName; - - /** - * Default constructor. - */ - public PinboardDetails() { - } - - /** - * Initialization constructor. - * @param pinboardId String value for pinboardId. - * @param pinboardName String value for pinboardName. - * @param tabId String value for tabId. - * @param tabName String value for tabName. - */ - public PinboardDetails( - String pinboardId, - String pinboardName, - String tabId, - String tabName) { - this.pinboardId = pinboardId; - this.pinboardName = pinboardName; - this.tabId = tabId; - this.tabName = tabName; - } - - /** - * Getter for PinboardId. - * pinboard id of recently pinned pinboard - * @return Returns the String - */ - @JsonGetter("pinboardId") - @JsonInclude(JsonInclude.Include.NON_NULL) - public String getPinboardId() { - return pinboardId; - } - - /** - * Setter for PinboardId. - * pinboard id of recently pinned pinboard - * @param pinboardId Value for String - */ - @JsonSetter("pinboardId") - public void setPinboardId(String pinboardId) { - this.pinboardId = pinboardId; - } - - /** - * Getter for PinboardName. - * pinboard name of recently pinned pinboard - * @return Returns the String - */ - @JsonGetter("pinboardName") - @JsonInclude(JsonInclude.Include.NON_NULL) - public String getPinboardName() { - return pinboardName; - } - - /** - * Setter for PinboardName. - * pinboard name of recently pinned pinboard - * @param pinboardName Value for String - */ - @JsonSetter("pinboardName") - public void setPinboardName(String pinboardName) { - this.pinboardName = pinboardName; - } - - /** - * Getter for TabId. - * tab id of recently pinned tab - * @return Returns the String - */ - @JsonGetter("tabId") - @JsonInclude(JsonInclude.Include.NON_NULL) - public String getTabId() { - return tabId; - } - - /** - * Setter for TabId. - * tab id of recently pinned tab - * @param tabId Value for String - */ - @JsonSetter("tabId") - public void setTabId(String tabId) { - this.tabId = tabId; - } - - /** - * Getter for TabName. - * tab name of recently pinned tab - * @return Returns the String - */ - @JsonGetter("tabName") - @JsonInclude(JsonInclude.Include.NON_NULL) - public String getTabName() { - return tabName; - } - - /** - * Setter for TabName. - * tab name of recently pinned tab - * @param tabName Value for String - */ - @JsonSetter("tabName") - public void setTabName(String tabName) { - this.tabName = tabName; - } - - /** - * Converts this PinboardDetails into string format. - * @return String representation of this class - */ - @Override - public String toString() { - return "PinboardDetails [" + "pinboardId=" + pinboardId + ", pinboardName=" + pinboardName - + ", tabId=" + tabId + ", tabName=" + tabName + "]"; - } - - /** - * Builds a new {@link PinboardDetails.Builder} object. - * Creates the instance with the state of the current model. - * @return a new {@link PinboardDetails.Builder} object - */ - public Builder toBuilder() { - Builder builder = new Builder() - .pinboardId(getPinboardId()) - .pinboardName(getPinboardName()) - .tabId(getTabId()) - .tabName(getTabName()); - return builder; - } - - /** - * Class to build instances of {@link PinboardDetails}. - */ - public static class Builder { - private String pinboardId; - private String pinboardName; - private String tabId; - private String tabName; - - - - /** - * Setter for pinboardId. - * @param pinboardId String value for pinboardId. - * @return Builder - */ - public Builder pinboardId(String pinboardId) { - this.pinboardId = pinboardId; - return this; - } - - /** - * Setter for pinboardName. - * @param pinboardName String value for pinboardName. - * @return Builder - */ - public Builder pinboardName(String pinboardName) { - this.pinboardName = pinboardName; - return this; - } - - /** - * Setter for tabId. - * @param tabId String value for tabId. - * @return Builder - */ - public Builder tabId(String tabId) { - this.tabId = tabId; - return this; - } - - /** - * Setter for tabName. - * @param tabName String value for tabName. - * @return Builder - */ - public Builder tabName(String tabName) { - this.tabName = tabName; - return this; - } - - /** - * Builds a new {@link PinboardDetails} object using the set fields. - * @return {@link PinboardDetails} - */ - public PinboardDetails build() { - return new PinboardDetails(pinboardId, pinboardName, tabId, tabName); - } - } -} diff --git a/Java/src/main/java/localhost/models/PrincipalSearchResponse.java b/Java/src/main/java/localhost/models/PrincipalSearchResponse.java deleted file mode 100644 index 4f714ade4..000000000 --- a/Java/src/main/java/localhost/models/PrincipalSearchResponse.java +++ /dev/null @@ -1,215 +0,0 @@ -/* - * ThoughtSpotPublicRESTAPILib - * - * This file was automatically generated by APIMATIC v3.0 ( https://www.apimatic.io ). - */ - -package localhost.models; - -import com.fasterxml.jackson.annotation.JsonGetter; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonSetter; -import io.apimatic.core.types.BaseModel; -import java.util.List; - -/** - * This is a model class for PrincipalSearchResponse type. - */ -public class PrincipalSearchResponse { - private String id; - private String name; - private String type; - private List permissions; - - /** - * Default constructor. - */ - public PrincipalSearchResponse() { - } - - /** - * Initialization constructor. - * @param id String value for id. - * @param name String value for name. - * @param type String value for type. - * @param permissions List of PermissionsTypeSearch value for permissions. - */ - public PrincipalSearchResponse( - String id, - String name, - String type, - List permissions) { - this.id = id; - this.name = name; - this.type = type; - this.permissions = permissions; - } - - /** - * Getter for Id. - * GUID of the user or user group - * @return Returns the String - */ - @JsonGetter("id") - @JsonInclude(JsonInclude.Include.NON_NULL) - public String getId() { - return id; - } - - /** - * Setter for Id. - * GUID of the user or user group - * @param id Value for String - */ - @JsonSetter("id") - public void setId(String id) { - this.id = id; - } - - /** - * Getter for Name. - * Name of the user or user group - * @return Returns the String - */ - @JsonGetter("name") - @JsonInclude(JsonInclude.Include.NON_NULL) - public String getName() { - return name; - } - - /** - * Setter for Name. - * Name of the user or user group - * @param name Value for String - */ - @JsonSetter("name") - public void setName(String name) { - this.name = name; - } - - /** - * Getter for Type. - * Indicates the type of principal - * @return Returns the String - */ - @JsonGetter("type") - @JsonInclude(JsonInclude.Include.NON_NULL) - public String getType() { - return type; - } - - /** - * Setter for Type. - * Indicates the type of principal - * @param type Value for String - */ - @JsonSetter("type") - public void setType(String type) { - this.type = type; - } - - /** - * Getter for Permissions. - * Indicates the permission which user or user group has on the object - * @return Returns the List of PermissionsTypeSearch - */ - @JsonGetter("permissions") - @JsonInclude(JsonInclude.Include.NON_NULL) - public List getPermissions() { - return permissions; - } - - /** - * Setter for Permissions. - * Indicates the permission which user or user group has on the object - * @param permissions Value for List of PermissionsTypeSearch - */ - @JsonSetter("permissions") - public void setPermissions(List permissions) { - this.permissions = permissions; - } - - /** - * Converts this PrincipalSearchResponse into string format. - * @return String representation of this class - */ - @Override - public String toString() { - return "PrincipalSearchResponse [" + "id=" + id + ", name=" + name + ", type=" + type - + ", permissions=" + permissions + "]"; - } - - /** - * Builds a new {@link PrincipalSearchResponse.Builder} object. - * Creates the instance with the state of the current model. - * @return a new {@link PrincipalSearchResponse.Builder} object - */ - public Builder toBuilder() { - Builder builder = new Builder() - .id(getId()) - .name(getName()) - .type(getType()) - .permissions(getPermissions()); - return builder; - } - - /** - * Class to build instances of {@link PrincipalSearchResponse}. - */ - public static class Builder { - private String id; - private String name; - private String type; - private List permissions; - - - - /** - * Setter for id. - * @param id String value for id. - * @return Builder - */ - public Builder id(String id) { - this.id = id; - return this; - } - - /** - * Setter for name. - * @param name String value for name. - * @return Builder - */ - public Builder name(String name) { - this.name = name; - return this; - } - - /** - * Setter for type. - * @param type String value for type. - * @return Builder - */ - public Builder type(String type) { - this.type = type; - return this; - } - - /** - * Setter for permissions. - * @param permissions List of PermissionsTypeSearch value for permissions. - * @return Builder - */ - public Builder permissions(List permissions) { - this.permissions = permissions; - return this; - } - - /** - * Builds a new {@link PrincipalSearchResponse} object using the set fields. - * @return {@link PrincipalSearchResponse} - */ - public PrincipalSearchResponse build() { - return new PrincipalSearchResponse(id, name, type, permissions); - } - } -} diff --git a/Java/src/main/java/localhost/models/PrivilegeEnum.java b/Java/src/main/java/localhost/models/PrivilegeEnum.java deleted file mode 100644 index 4c9ec040e..000000000 --- a/Java/src/main/java/localhost/models/PrivilegeEnum.java +++ /dev/null @@ -1,143 +0,0 @@ -/* - * ThoughtSpotPublicRESTAPILib - * - * This file was automatically generated by APIMATIC v3.0 ( https://www.apimatic.io ). - */ - -package localhost.models; - -import java.util.ArrayList; -import java.util.List; -import java.util.TreeMap; - -/** - * PrivilegeEnum to be used. - */ -public enum PrivilegeEnum { - RANALYSIS, - - DATAMANAGEMENT, - - APPLICATION_ADMINISTRATION, - - USER_ADMINISTRATION, - - SYSTEMMANAGEMENT, - - SYSTEM_INFO_ADMINISTRATION, - - AUTHORING, - - BACKUP_ADMINISTRATION, - - SHAREWITHALL, - - DEVELOPER, - - JOBSCHEDULING, - - GROUP_ADMINISTRATION, - - BYPASSRLS, - - EXPERIMENTALFEATUREPRIVILEGE, - - A3ANALYSIS, - - USERDATAUPLOADING, - - DATADOWNLOADING, - - DISABLE_PINBOARD_CREATION, - - ADMINISTRATION; - - - private static TreeMap valueMap = new TreeMap<>(); - private String value; - - static { - RANALYSIS.value = "RANALYSIS"; - DATAMANAGEMENT.value = "DATAMANAGEMENT"; - APPLICATION_ADMINISTRATION.value = "APPLICATION_ADMINISTRATION"; - USER_ADMINISTRATION.value = "USER_ADMINISTRATION"; - SYSTEMMANAGEMENT.value = "SYSTEMMANAGEMENT"; - SYSTEM_INFO_ADMINISTRATION.value = "SYSTEM_INFO_ADMINISTRATION"; - AUTHORING.value = "AUTHORING"; - BACKUP_ADMINISTRATION.value = "BACKUP_ADMINISTRATION"; - SHAREWITHALL.value = "SHAREWITHALL"; - DEVELOPER.value = "DEVELOPER"; - JOBSCHEDULING.value = "JOBSCHEDULING"; - GROUP_ADMINISTRATION.value = "GROUP_ADMINISTRATION"; - BYPASSRLS.value = "BYPASSRLS"; - EXPERIMENTALFEATUREPRIVILEGE.value = "EXPERIMENTALFEATUREPRIVILEGE"; - A3ANALYSIS.value = "A3ANALYSIS"; - USERDATAUPLOADING.value = "USERDATAUPLOADING"; - DATADOWNLOADING.value = "DATADOWNLOADING"; - DISABLE_PINBOARD_CREATION.value = "DISABLE_PINBOARD_CREATION"; - ADMINISTRATION.value = "ADMINISTRATION"; - - valueMap.put("RANALYSIS", RANALYSIS); - valueMap.put("DATAMANAGEMENT", DATAMANAGEMENT); - valueMap.put("APPLICATION_ADMINISTRATION", APPLICATION_ADMINISTRATION); - valueMap.put("USER_ADMINISTRATION", USER_ADMINISTRATION); - valueMap.put("SYSTEMMANAGEMENT", SYSTEMMANAGEMENT); - valueMap.put("SYSTEM_INFO_ADMINISTRATION", SYSTEM_INFO_ADMINISTRATION); - valueMap.put("AUTHORING", AUTHORING); - valueMap.put("BACKUP_ADMINISTRATION", BACKUP_ADMINISTRATION); - valueMap.put("SHAREWITHALL", SHAREWITHALL); - valueMap.put("DEVELOPER", DEVELOPER); - valueMap.put("JOBSCHEDULING", JOBSCHEDULING); - valueMap.put("GROUP_ADMINISTRATION", GROUP_ADMINISTRATION); - valueMap.put("BYPASSRLS", BYPASSRLS); - valueMap.put("EXPERIMENTALFEATUREPRIVILEGE", EXPERIMENTALFEATUREPRIVILEGE); - valueMap.put("A3ANALYSIS", A3ANALYSIS); - valueMap.put("USERDATAUPLOADING", USERDATAUPLOADING); - valueMap.put("DATADOWNLOADING", DATADOWNLOADING); - valueMap.put("DISABLE_PINBOARD_CREATION", DISABLE_PINBOARD_CREATION); - valueMap.put("ADMINISTRATION", ADMINISTRATION); - } - - /** - * Returns the enum member associated with the given string value. - * @param toConvert String value to get enum member. - * @return The enum member against the given string value. - */ - @com.fasterxml.jackson.annotation.JsonCreator - public static PrivilegeEnum fromString(String toConvert) { - return valueMap.get(toConvert); - } - - /** - * Returns the string value associated with the enum member. - * @return The string value against enum member. - */ - @com.fasterxml.jackson.annotation.JsonValue - public String value() { - return value; - } - - /** - * Get string representation of this enum. - */ - @Override - public String toString() { - return value.toString(); - } - - /** - * Convert list of PrivilegeEnum values to list of string values. - * @param toConvert The list of PrivilegeEnum values to convert. - * @return List of representative string values. - */ - public static List toValue(List toConvert) { - if (toConvert == null) { - return null; - } - List convertedValues = new ArrayList<>(); - for (PrivilegeEnum enumValue : toConvert) { - convertedValues.add(enumValue.value); - } - return convertedValues; - } -} \ No newline at end of file diff --git a/Java/src/main/java/localhost/models/SecuirityDependents.java b/Java/src/main/java/localhost/models/SecuirityDependents.java deleted file mode 100644 index 25754d3b3..000000000 --- a/Java/src/main/java/localhost/models/SecuirityDependents.java +++ /dev/null @@ -1,285 +0,0 @@ -/* - * ThoughtSpotPublicRESTAPILib - * - * This file was automatically generated by APIMATIC v3.0 ( https://www.apimatic.io ). - */ - -package localhost.models; - -import com.fasterxml.jackson.annotation.JsonGetter; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonSetter; -import io.apimatic.core.types.BaseModel; -import java.util.List; - -/** - * This is a model class for SecuirityDependents type. - */ -public class SecuirityDependents { - private String id; - private String name; - private String type; - private String owner; - private UserNameAndID author; - private List permissions; - - /** - * Default constructor. - */ - public SecuirityDependents() { - } - - /** - * Initialization constructor. - * @param id String value for id. - * @param name String value for name. - * @param type String value for type. - * @param owner String value for owner. - * @param author UserNameAndID value for author. - * @param permissions List of DependentPermission value for permissions. - */ - public SecuirityDependents( - String id, - String name, - String type, - String owner, - UserNameAndID author, - List permissions) { - this.id = id; - this.name = name; - this.type = type; - this.owner = owner; - this.author = author; - this.permissions = permissions; - } - - /** - * Getter for Id. - * GUID of the object - * @return Returns the String - */ - @JsonGetter("id") - @JsonInclude(JsonInclude.Include.NON_NULL) - public String getId() { - return id; - } - - /** - * Setter for Id. - * GUID of the object - * @param id Value for String - */ - @JsonSetter("id") - public void setId(String id) { - this.id = id; - } - - /** - * Getter for Name. - * Name of the object - * @return Returns the String - */ - @JsonGetter("name") - @JsonInclude(JsonInclude.Include.NON_NULL) - public String getName() { - return name; - } - - /** - * Setter for Name. - * Name of the object - * @param name Value for String - */ - @JsonSetter("name") - public void setName(String name) { - this.name = name; - } - - /** - * Getter for Type. - * Indicates the type of the object - * @return Returns the String - */ - @JsonGetter("type") - @JsonInclude(JsonInclude.Include.NON_NULL) - public String getType() { - return type; - } - - /** - * Setter for Type. - * Indicates the type of the object - * @param type Value for String - */ - @JsonSetter("type") - public void setType(String type) { - this.type = type; - } - - /** - * Getter for Owner. - * Owner of the object - * @return Returns the String - */ - @JsonGetter("owner") - @JsonInclude(JsonInclude.Include.NON_NULL) - public String getOwner() { - return owner; - } - - /** - * Setter for Owner. - * Owner of the object - * @param owner Value for String - */ - @JsonSetter("owner") - public void setOwner(String owner) { - this.owner = owner; - } - - /** - * Getter for Author. - * @return Returns the UserNameAndID - */ - @JsonGetter("author") - @JsonInclude(JsonInclude.Include.NON_NULL) - public UserNameAndID getAuthor() { - return author; - } - - /** - * Setter for Author. - * @param author Value for UserNameAndID - */ - @JsonSetter("author") - public void setAuthor(UserNameAndID author) { - this.author = author; - } - - /** - * Getter for Permissions. - * @return Returns the List of DependentPermission - */ - @JsonGetter("permissions") - @JsonInclude(JsonInclude.Include.NON_NULL) - public List getPermissions() { - return permissions; - } - - /** - * Setter for Permissions. - * @param permissions Value for List of DependentPermission - */ - @JsonSetter("permissions") - public void setPermissions(List permissions) { - this.permissions = permissions; - } - - /** - * Converts this SecuirityDependents into string format. - * @return String representation of this class - */ - @Override - public String toString() { - return "SecuirityDependents [" + "id=" + id + ", name=" + name + ", type=" + type - + ", owner=" + owner + ", author=" + author + ", permissions=" + permissions + "]"; - } - - /** - * Builds a new {@link SecuirityDependents.Builder} object. - * Creates the instance with the state of the current model. - * @return a new {@link SecuirityDependents.Builder} object - */ - public Builder toBuilder() { - Builder builder = new Builder() - .id(getId()) - .name(getName()) - .type(getType()) - .owner(getOwner()) - .author(getAuthor()) - .permissions(getPermissions()); - return builder; - } - - /** - * Class to build instances of {@link SecuirityDependents}. - */ - public static class Builder { - private String id; - private String name; - private String type; - private String owner; - private UserNameAndID author; - private List permissions; - - - - /** - * Setter for id. - * @param id String value for id. - * @return Builder - */ - public Builder id(String id) { - this.id = id; - return this; - } - - /** - * Setter for name. - * @param name String value for name. - * @return Builder - */ - public Builder name(String name) { - this.name = name; - return this; - } - - /** - * Setter for type. - * @param type String value for type. - * @return Builder - */ - public Builder type(String type) { - this.type = type; - return this; - } - - /** - * Setter for owner. - * @param owner String value for owner. - * @return Builder - */ - public Builder owner(String owner) { - this.owner = owner; - return this; - } - - /** - * Setter for author. - * @param author UserNameAndID value for author. - * @return Builder - */ - public Builder author(UserNameAndID author) { - this.author = author; - return this; - } - - /** - * Setter for permissions. - * @param permissions List of DependentPermission value for permissions. - * @return Builder - */ - public Builder permissions(List permissions) { - this.permissions = permissions; - return this; - } - - /** - * Builds a new {@link SecuirityDependents} object using the set fields. - * @return {@link SecuirityDependents} - */ - public SecuirityDependents build() { - return new SecuirityDependents(id, name, type, owner, author, permissions); - } - } -} diff --git a/Java/src/main/java/localhost/models/SecurityPermission.java b/Java/src/main/java/localhost/models/SecurityPermission.java deleted file mode 100644 index 3eef38cee..000000000 --- a/Java/src/main/java/localhost/models/SecurityPermission.java +++ /dev/null @@ -1,295 +0,0 @@ -/* - * ThoughtSpotPublicRESTAPILib - * - * This file was automatically generated by APIMATIC v3.0 ( https://www.apimatic.io ). - */ - -package localhost.models; - -import com.fasterxml.jackson.annotation.JsonGetter; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonSetter; -import io.apimatic.core.types.BaseModel; -import java.util.List; - -/** - * This is a model class for SecurityPermission type. - */ -public class SecurityPermission { - private String id; - private String name; - private String type; - private String permission; - private String sharedPermission; - private List groupPermission; - - /** - * Default constructor. - */ - public SecurityPermission() { - } - - /** - * Initialization constructor. - * @param id String value for id. - * @param name String value for name. - * @param type String value for type. - * @param permission String value for permission. - * @param sharedPermission String value for sharedPermission. - * @param groupPermission List of GroupPermission value for groupPermission. - */ - public SecurityPermission( - String id, - String name, - String type, - String permission, - String sharedPermission, - List groupPermission) { - this.id = id; - this.name = name; - this.type = type; - this.permission = permission; - this.sharedPermission = sharedPermission; - this.groupPermission = groupPermission; - } - - /** - * Getter for Id. - * GUID of the user or user group - * @return Returns the String - */ - @JsonGetter("id") - @JsonInclude(JsonInclude.Include.NON_NULL) - public String getId() { - return id; - } - - /** - * Setter for Id. - * GUID of the user or user group - * @param id Value for String - */ - @JsonSetter("id") - public void setId(String id) { - this.id = id; - } - - /** - * Getter for Name. - * Name of the user or user group - * @return Returns the String - */ - @JsonGetter("name") - @JsonInclude(JsonInclude.Include.NON_NULL) - public String getName() { - return name; - } - - /** - * Setter for Name. - * Name of the user or user group - * @param name Value for String - */ - @JsonSetter("name") - public void setName(String name) { - this.name = name; - } - - /** - * Getter for Type. - * Indicates the type of principal - * @return Returns the String - */ - @JsonGetter("type") - @JsonInclude(JsonInclude.Include.NON_NULL) - public String getType() { - return type; - } - - /** - * Setter for Type. - * Indicates the type of principal - * @param type Value for String - */ - @JsonSetter("type") - public void setType(String type) { - this.type = type; - } - - /** - * Getter for Permission. - * Indicates the permission which user or user group has on the object - * @return Returns the String - */ - @JsonGetter("permission") - @JsonInclude(JsonInclude.Include.NON_NULL) - public String getPermission() { - return permission; - } - - /** - * Setter for Permission. - * Indicates the permission which user or user group has on the object - * @param permission Value for String - */ - @JsonSetter("permission") - public void setPermission(String permission) { - this.permission = permission; - } - - /** - * Getter for SharedPermission. - * Indicates the permission which user or user group has on the object through sharing of the - * object with this user or user group - * @return Returns the String - */ - @JsonGetter("sharedPermission") - @JsonInclude(JsonInclude.Include.NON_NULL) - public String getSharedPermission() { - return sharedPermission; - } - - /** - * Setter for SharedPermission. - * Indicates the permission which user or user group has on the object through sharing of the - * object with this user or user group - * @param sharedPermission Value for String - */ - @JsonSetter("sharedPermission") - public void setSharedPermission(String sharedPermission) { - this.sharedPermission = sharedPermission; - } - - /** - * Getter for GroupPermission. - * An array of object with details of permission on the user groups to which the user or user - * group belongs - * @return Returns the List of GroupPermission - */ - @JsonGetter("groupPermission") - @JsonInclude(JsonInclude.Include.NON_NULL) - public List getGroupPermission() { - return groupPermission; - } - - /** - * Setter for GroupPermission. - * An array of object with details of permission on the user groups to which the user or user - * group belongs - * @param groupPermission Value for List of GroupPermission - */ - @JsonSetter("groupPermission") - public void setGroupPermission(List groupPermission) { - this.groupPermission = groupPermission; - } - - /** - * Converts this SecurityPermission into string format. - * @return String representation of this class - */ - @Override - public String toString() { - return "SecurityPermission [" + "id=" + id + ", name=" + name + ", type=" + type - + ", permission=" + permission + ", sharedPermission=" + sharedPermission - + ", groupPermission=" + groupPermission + "]"; - } - - /** - * Builds a new {@link SecurityPermission.Builder} object. - * Creates the instance with the state of the current model. - * @return a new {@link SecurityPermission.Builder} object - */ - public Builder toBuilder() { - Builder builder = new Builder() - .id(getId()) - .name(getName()) - .type(getType()) - .permission(getPermission()) - .sharedPermission(getSharedPermission()) - .groupPermission(getGroupPermission()); - return builder; - } - - /** - * Class to build instances of {@link SecurityPermission}. - */ - public static class Builder { - private String id; - private String name; - private String type; - private String permission; - private String sharedPermission; - private List groupPermission; - - - - /** - * Setter for id. - * @param id String value for id. - * @return Builder - */ - public Builder id(String id) { - this.id = id; - return this; - } - - /** - * Setter for name. - * @param name String value for name. - * @return Builder - */ - public Builder name(String name) { - this.name = name; - return this; - } - - /** - * Setter for type. - * @param type String value for type. - * @return Builder - */ - public Builder type(String type) { - this.type = type; - return this; - } - - /** - * Setter for permission. - * @param permission String value for permission. - * @return Builder - */ - public Builder permission(String permission) { - this.permission = permission; - return this; - } - - /** - * Setter for sharedPermission. - * @param sharedPermission String value for sharedPermission. - * @return Builder - */ - public Builder sharedPermission(String sharedPermission) { - this.sharedPermission = sharedPermission; - return this; - } - - /** - * Setter for groupPermission. - * @param groupPermission List of GroupPermission value for groupPermission. - * @return Builder - */ - public Builder groupPermission(List groupPermission) { - this.groupPermission = groupPermission; - return this; - } - - /** - * Builds a new {@link SecurityPermission} object using the set fields. - * @return {@link SecurityPermission} - */ - public SecurityPermission build() { - return new SecurityPermission(id, name, type, permission, sharedPermission, - groupPermission); - } - } -} diff --git a/Java/src/main/java/localhost/models/SecurityPermissionResponse.java b/Java/src/main/java/localhost/models/SecurityPermissionResponse.java deleted file mode 100644 index 291c2a032..000000000 --- a/Java/src/main/java/localhost/models/SecurityPermissionResponse.java +++ /dev/null @@ -1,326 +0,0 @@ -/* - * ThoughtSpotPublicRESTAPILib - * - * This file was automatically generated by APIMATIC v3.0 ( https://www.apimatic.io ). - */ - -package localhost.models; - -import com.fasterxml.jackson.annotation.JsonGetter; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonSetter; -import io.apimatic.core.types.BaseModel; -import java.util.List; - -/** - * This is a model class for SecurityPermissionResponse type. - */ -public class SecurityPermissionResponse { - private String id; - private String name; - private String type; - private String owner; - private UserNameAndID author; - private List permissions; - private List dependents; - - /** - * Default constructor. - */ - public SecurityPermissionResponse() { - } - - /** - * Initialization constructor. - * @param id String value for id. - * @param name String value for name. - * @param type String value for type. - * @param owner String value for owner. - * @param author UserNameAndID value for author. - * @param permissions List of SecurityPermission value for permissions. - * @param dependents List of SecuirityDependents value for dependents. - */ - public SecurityPermissionResponse( - String id, - String name, - String type, - String owner, - UserNameAndID author, - List permissions, - List dependents) { - this.id = id; - this.name = name; - this.type = type; - this.owner = owner; - this.author = author; - this.permissions = permissions; - this.dependents = dependents; - } - - /** - * Getter for Id. - * GUID of the object - * @return Returns the String - */ - @JsonGetter("id") - @JsonInclude(JsonInclude.Include.NON_NULL) - public String getId() { - return id; - } - - /** - * Setter for Id. - * GUID of the object - * @param id Value for String - */ - @JsonSetter("id") - public void setId(String id) { - this.id = id; - } - - /** - * Getter for Name. - * Name of the object - * @return Returns the String - */ - @JsonGetter("name") - @JsonInclude(JsonInclude.Include.NON_NULL) - public String getName() { - return name; - } - - /** - * Setter for Name. - * Name of the object - * @param name Value for String - */ - @JsonSetter("name") - public void setName(String name) { - this.name = name; - } - - /** - * Getter for Type. - * Indicates the type of the object - * @return Returns the String - */ - @JsonGetter("type") - @JsonInclude(JsonInclude.Include.NON_NULL) - public String getType() { - return type; - } - - /** - * Setter for Type. - * Indicates the type of the object - * @param type Value for String - */ - @JsonSetter("type") - public void setType(String type) { - this.type = type; - } - - /** - * Getter for Owner. - * GUID of the owner of the object - * @return Returns the String - */ - @JsonGetter("owner") - @JsonInclude(JsonInclude.Include.NON_NULL) - public String getOwner() { - return owner; - } - - /** - * Setter for Owner. - * GUID of the owner of the object - * @param owner Value for String - */ - @JsonSetter("owner") - public void setOwner(String owner) { - this.owner = owner; - } - - /** - * Getter for Author. - * @return Returns the UserNameAndID - */ - @JsonGetter("author") - @JsonInclude(JsonInclude.Include.NON_NULL) - public UserNameAndID getAuthor() { - return author; - } - - /** - * Setter for Author. - * @param author Value for UserNameAndID - */ - @JsonSetter("author") - public void setAuthor(UserNameAndID author) { - this.author = author; - } - - /** - * Getter for Permissions. - * An array of object with details of permission on users and user groups - * @return Returns the List of SecurityPermission - */ - @JsonGetter("permissions") - @JsonInclude(JsonInclude.Include.NON_NULL) - public List getPermissions() { - return permissions; - } - - /** - * Setter for Permissions. - * An array of object with details of permission on users and user groups - * @param permissions Value for List of SecurityPermission - */ - @JsonSetter("permissions") - public void setPermissions(List permissions) { - this.permissions = permissions; - } - - /** - * Getter for Dependents. - * The objects on which the primary object is dependent on - * @return Returns the List of SecuirityDependents - */ - @JsonGetter("dependents") - @JsonInclude(JsonInclude.Include.NON_NULL) - public List getDependents() { - return dependents; - } - - /** - * Setter for Dependents. - * The objects on which the primary object is dependent on - * @param dependents Value for List of SecuirityDependents - */ - @JsonSetter("dependents") - public void setDependents(List dependents) { - this.dependents = dependents; - } - - /** - * Converts this SecurityPermissionResponse into string format. - * @return String representation of this class - */ - @Override - public String toString() { - return "SecurityPermissionResponse [" + "id=" + id + ", name=" + name + ", type=" + type - + ", owner=" + owner + ", author=" + author + ", permissions=" + permissions - + ", dependents=" + dependents + "]"; - } - - /** - * Builds a new {@link SecurityPermissionResponse.Builder} object. - * Creates the instance with the state of the current model. - * @return a new {@link SecurityPermissionResponse.Builder} object - */ - public Builder toBuilder() { - Builder builder = new Builder() - .id(getId()) - .name(getName()) - .type(getType()) - .owner(getOwner()) - .author(getAuthor()) - .permissions(getPermissions()) - .dependents(getDependents()); - return builder; - } - - /** - * Class to build instances of {@link SecurityPermissionResponse}. - */ - public static class Builder { - private String id; - private String name; - private String type; - private String owner; - private UserNameAndID author; - private List permissions; - private List dependents; - - - - /** - * Setter for id. - * @param id String value for id. - * @return Builder - */ - public Builder id(String id) { - this.id = id; - return this; - } - - /** - * Setter for name. - * @param name String value for name. - * @return Builder - */ - public Builder name(String name) { - this.name = name; - return this; - } - - /** - * Setter for type. - * @param type String value for type. - * @return Builder - */ - public Builder type(String type) { - this.type = type; - return this; - } - - /** - * Setter for owner. - * @param owner String value for owner. - * @return Builder - */ - public Builder owner(String owner) { - this.owner = owner; - return this; - } - - /** - * Setter for author. - * @param author UserNameAndID value for author. - * @return Builder - */ - public Builder author(UserNameAndID author) { - this.author = author; - return this; - } - - /** - * Setter for permissions. - * @param permissions List of SecurityPermission value for permissions. - * @return Builder - */ - public Builder permissions(List permissions) { - this.permissions = permissions; - return this; - } - - /** - * Setter for dependents. - * @param dependents List of SecuirityDependents value for dependents. - * @return Builder - */ - public Builder dependents(List dependents) { - this.dependents = dependents; - return this; - } - - /** - * Builds a new {@link SecurityPermissionResponse} object using the set fields. - * @return {@link SecurityPermissionResponse} - */ - public SecurityPermissionResponse build() { - return new SecurityPermissionResponse(id, name, type, owner, author, permissions, - dependents); - } - } -} diff --git a/Java/src/main/java/localhost/models/SessionLoginResponse.java b/Java/src/main/java/localhost/models/SessionLoginResponse.java deleted file mode 100644 index 08525f316..000000000 --- a/Java/src/main/java/localhost/models/SessionLoginResponse.java +++ /dev/null @@ -1,253 +0,0 @@ -/* - * ThoughtSpotPublicRESTAPILib - * - * This file was automatically generated by APIMATIC v3.0 ( https://www.apimatic.io ). - */ - -package localhost.models; - -import com.fasterxml.jackson.annotation.JsonGetter; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonSetter; -import io.apimatic.core.types.BaseModel; - -/** - * This is a model class for SessionLoginResponse type. - */ -public class SessionLoginResponse { - private String userName; - private String token; - private String tokenCreatedTime; - private String tokenExpiryDuration; - private String tokenType; - - /** - * Default constructor. - */ - public SessionLoginResponse() { - } - - /** - * Initialization constructor. - * @param userName String value for userName. - * @param token String value for token. - * @param tokenCreatedTime String value for tokenCreatedTime. - * @param tokenExpiryDuration String value for tokenExpiryDuration. - * @param tokenType String value for tokenType. - */ - public SessionLoginResponse( - String userName, - String token, - String tokenCreatedTime, - String tokenExpiryDuration, - String tokenType) { - this.userName = userName; - this.token = token; - this.tokenCreatedTime = tokenCreatedTime; - this.tokenExpiryDuration = tokenExpiryDuration; - this.tokenType = tokenType; - } - - /** - * Getter for UserName. - * Username of the user account for which token is generated - * @return Returns the String - */ - @JsonGetter("userName") - @JsonInclude(JsonInclude.Include.NON_NULL) - public String getUserName() { - return userName; - } - - /** - * Setter for UserName. - * Username of the user account for which token is generated - * @param userName Value for String - */ - @JsonSetter("userName") - public void setUserName(String userName) { - this.userName = userName; - } - - /** - * Getter for Token. - * Bearer token generated. This will be blank when token type is Cookie - * @return Returns the String - */ - @JsonGetter("token") - @JsonInclude(JsonInclude.Include.NON_NULL) - public String getToken() { - return token; - } - - /** - * Setter for Token. - * Bearer token generated. This will be blank when token type is Cookie - * @param token Value for String - */ - @JsonSetter("token") - public void setToken(String token) { - this.token = token; - } - - /** - * Getter for TokenCreatedTime. - * Date and time at which the token is generated - * @return Returns the String - */ - @JsonGetter("tokenCreatedTime") - @JsonInclude(JsonInclude.Include.NON_NULL) - public String getTokenCreatedTime() { - return tokenCreatedTime; - } - - /** - * Setter for TokenCreatedTime. - * Date and time at which the token is generated - * @param tokenCreatedTime Value for String - */ - @JsonSetter("tokenCreatedTime") - public void setTokenCreatedTime(String tokenCreatedTime) { - this.tokenCreatedTime = tokenCreatedTime; - } - - /** - * Getter for TokenExpiryDuration. - * Duration in seconds after which the token expires - * @return Returns the String - */ - @JsonGetter("tokenExpiryDuration") - @JsonInclude(JsonInclude.Include.NON_NULL) - public String getTokenExpiryDuration() { - return tokenExpiryDuration; - } - - /** - * Setter for TokenExpiryDuration. - * Duration in seconds after which the token expires - * @param tokenExpiryDuration Value for String - */ - @JsonSetter("tokenExpiryDuration") - public void setTokenExpiryDuration(String tokenExpiryDuration) { - this.tokenExpiryDuration = tokenExpiryDuration; - } - - /** - * Getter for TokenType. - * Type of token generated - * @return Returns the String - */ - @JsonGetter("tokenType") - @JsonInclude(JsonInclude.Include.NON_NULL) - public String getTokenType() { - return tokenType; - } - - /** - * Setter for TokenType. - * Type of token generated - * @param tokenType Value for String - */ - @JsonSetter("tokenType") - public void setTokenType(String tokenType) { - this.tokenType = tokenType; - } - - /** - * Converts this SessionLoginResponse into string format. - * @return String representation of this class - */ - @Override - public String toString() { - return "SessionLoginResponse [" + "userName=" + userName + ", token=" + token - + ", tokenCreatedTime=" + tokenCreatedTime + ", tokenExpiryDuration=" - + tokenExpiryDuration + ", tokenType=" + tokenType + "]"; - } - - /** - * Builds a new {@link SessionLoginResponse.Builder} object. - * Creates the instance with the state of the current model. - * @return a new {@link SessionLoginResponse.Builder} object - */ - public Builder toBuilder() { - Builder builder = new Builder() - .userName(getUserName()) - .token(getToken()) - .tokenCreatedTime(getTokenCreatedTime()) - .tokenExpiryDuration(getTokenExpiryDuration()) - .tokenType(getTokenType()); - return builder; - } - - /** - * Class to build instances of {@link SessionLoginResponse}. - */ - public static class Builder { - private String userName; - private String token; - private String tokenCreatedTime; - private String tokenExpiryDuration; - private String tokenType; - - - - /** - * Setter for userName. - * @param userName String value for userName. - * @return Builder - */ - public Builder userName(String userName) { - this.userName = userName; - return this; - } - - /** - * Setter for token. - * @param token String value for token. - * @return Builder - */ - public Builder token(String token) { - this.token = token; - return this; - } - - /** - * Setter for tokenCreatedTime. - * @param tokenCreatedTime String value for tokenCreatedTime. - * @return Builder - */ - public Builder tokenCreatedTime(String tokenCreatedTime) { - this.tokenCreatedTime = tokenCreatedTime; - return this; - } - - /** - * Setter for tokenExpiryDuration. - * @param tokenExpiryDuration String value for tokenExpiryDuration. - * @return Builder - */ - public Builder tokenExpiryDuration(String tokenExpiryDuration) { - this.tokenExpiryDuration = tokenExpiryDuration; - return this; - } - - /** - * Setter for tokenType. - * @param tokenType String value for tokenType. - * @return Builder - */ - public Builder tokenType(String tokenType) { - this.tokenType = tokenType; - return this; - } - - /** - * Builds a new {@link SessionLoginResponse} object using the set fields. - * @return {@link SessionLoginResponse} - */ - public SessionLoginResponse build() { - return new SessionLoginResponse(userName, token, tokenCreatedTime, tokenExpiryDuration, - tokenType); - } - } -} diff --git a/Java/src/main/java/localhost/models/SortBy1Enum.java b/Java/src/main/java/localhost/models/SortBy1Enum.java deleted file mode 100644 index 42f4056e0..000000000 --- a/Java/src/main/java/localhost/models/SortBy1Enum.java +++ /dev/null @@ -1,115 +0,0 @@ -/* - * ThoughtSpotPublicRESTAPILib - * - * This file was automatically generated by APIMATIC v3.0 ( https://www.apimatic.io ). - */ - -package localhost.models; - -import java.util.ArrayList; -import java.util.List; -import java.util.TreeMap; - -/** - * SortBy1Enum to be used. - */ -public enum SortBy1Enum { - DEFAULT, - - NAME, - - DISPLAY_NAME, - - AUTHOR, - - CREATED, - - MODIFIED, - - LAST_ACCESSED, - - SYNCED, - - VIEWS, - - NONE, - - USER_STATE, - - ROW_COUNT; - - - private static TreeMap valueMap = new TreeMap<>(); - private String value; - - static { - DEFAULT.value = "DEFAULT"; - NAME.value = "NAME"; - DISPLAY_NAME.value = "DISPLAY_NAME"; - AUTHOR.value = "AUTHOR"; - CREATED.value = "CREATED"; - MODIFIED.value = "MODIFIED"; - LAST_ACCESSED.value = "LAST_ACCESSED"; - SYNCED.value = "SYNCED"; - VIEWS.value = "VIEWS"; - NONE.value = "NONE"; - USER_STATE.value = "USER_STATE"; - ROW_COUNT.value = "ROW_COUNT"; - - valueMap.put("DEFAULT", DEFAULT); - valueMap.put("NAME", NAME); - valueMap.put("DISPLAY_NAME", DISPLAY_NAME); - valueMap.put("AUTHOR", AUTHOR); - valueMap.put("CREATED", CREATED); - valueMap.put("MODIFIED", MODIFIED); - valueMap.put("LAST_ACCESSED", LAST_ACCESSED); - valueMap.put("SYNCED", SYNCED); - valueMap.put("VIEWS", VIEWS); - valueMap.put("NONE", NONE); - valueMap.put("USER_STATE", USER_STATE); - valueMap.put("ROW_COUNT", ROW_COUNT); - } - - /** - * Returns the enum member associated with the given string value. - * @param toConvert String value to get enum member. - * @return The enum member against the given string value. - */ - @com.fasterxml.jackson.annotation.JsonCreator - public static SortBy1Enum fromString(String toConvert) { - return valueMap.get(toConvert); - } - - /** - * Returns the string value associated with the enum member. - * @return The string value against enum member. - */ - @com.fasterxml.jackson.annotation.JsonValue - public String value() { - return value; - } - - /** - * Get string representation of this enum. - */ - @Override - public String toString() { - return value.toString(); - } - - /** - * Convert list of SortBy1Enum values to list of string values. - * @param toConvert The list of SortBy1Enum values to convert. - * @return List of representative string values. - */ - public static List toValue(List toConvert) { - if (toConvert == null) { - return null; - } - List convertedValues = new ArrayList<>(); - for (SortBy1Enum enumValue : toConvert) { - convertedValues.add(enumValue.value); - } - return convertedValues; - } -} \ No newline at end of file diff --git a/Java/src/main/java/localhost/models/SortByEnum.java b/Java/src/main/java/localhost/models/SortByEnum.java deleted file mode 100644 index a6ea2e318..000000000 --- a/Java/src/main/java/localhost/models/SortByEnum.java +++ /dev/null @@ -1,115 +0,0 @@ -/* - * ThoughtSpotPublicRESTAPILib - * - * This file was automatically generated by APIMATIC v3.0 ( https://www.apimatic.io ). - */ - -package localhost.models; - -import java.util.ArrayList; -import java.util.List; -import java.util.TreeMap; - -/** - * SortByEnum to be used. - */ -public enum SortByEnum { - DEFAULT, - - NAME, - - DISPLAY_NAME, - - AUTHOR, - - CREATED, - - MODIFIED, - - LAST_ACCESSED, - - SYNCED, - - VIEWS, - - NONE, - - USER_STATE, - - ROW_COUNT; - - - private static TreeMap valueMap = new TreeMap<>(); - private String value; - - static { - DEFAULT.value = "DEFAULT"; - NAME.value = "NAME"; - DISPLAY_NAME.value = "DISPLAY_NAME"; - AUTHOR.value = "AUTHOR"; - CREATED.value = "CREATED"; - MODIFIED.value = "MODIFIED"; - LAST_ACCESSED.value = "LAST_ACCESSED"; - SYNCED.value = "SYNCED"; - VIEWS.value = "VIEWS"; - NONE.value = "NONE"; - USER_STATE.value = "USER_STATE"; - ROW_COUNT.value = "ROW_COUNT"; - - valueMap.put("DEFAULT", DEFAULT); - valueMap.put("NAME", NAME); - valueMap.put("DISPLAY_NAME", DISPLAY_NAME); - valueMap.put("AUTHOR", AUTHOR); - valueMap.put("CREATED", CREATED); - valueMap.put("MODIFIED", MODIFIED); - valueMap.put("LAST_ACCESSED", LAST_ACCESSED); - valueMap.put("SYNCED", SYNCED); - valueMap.put("VIEWS", VIEWS); - valueMap.put("NONE", NONE); - valueMap.put("USER_STATE", USER_STATE); - valueMap.put("ROW_COUNT", ROW_COUNT); - } - - /** - * Returns the enum member associated with the given string value. - * @param toConvert String value to get enum member. - * @return The enum member against the given string value. - */ - @com.fasterxml.jackson.annotation.JsonCreator - public static SortByEnum fromString(String toConvert) { - return valueMap.get(toConvert); - } - - /** - * Returns the string value associated with the enum member. - * @return The string value against enum member. - */ - @com.fasterxml.jackson.annotation.JsonValue - public String value() { - return value; - } - - /** - * Get string representation of this enum. - */ - @Override - public String toString() { - return value.toString(); - } - - /** - * Convert list of SortByEnum values to list of string values. - * @param toConvert The list of SortByEnum values to convert. - * @return List of representative string values. - */ - public static List toValue(List toConvert) { - if (toConvert == null) { - return null; - } - List convertedValues = new ArrayList<>(); - for (SortByEnum enumValue : toConvert) { - convertedValues.add(enumValue.value); - } - return convertedValues; - } -} \ No newline at end of file diff --git a/Java/src/main/java/localhost/models/SortOrder1Enum.java b/Java/src/main/java/localhost/models/SortOrder1Enum.java deleted file mode 100644 index 18fe9c1c4..000000000 --- a/Java/src/main/java/localhost/models/SortOrder1Enum.java +++ /dev/null @@ -1,79 +0,0 @@ -/* - * ThoughtSpotPublicRESTAPILib - * - * This file was automatically generated by APIMATIC v3.0 ( https://www.apimatic.io ). - */ - -package localhost.models; - -import java.util.ArrayList; -import java.util.List; -import java.util.TreeMap; - -/** - * SortOrder1Enum to be used. - */ -public enum SortOrder1Enum { - DEFAULT, - - ASC, - - DESC; - - - private static TreeMap valueMap = new TreeMap<>(); - private String value; - - static { - DEFAULT.value = "DEFAULT"; - ASC.value = "ASC"; - DESC.value = "DESC"; - - valueMap.put("DEFAULT", DEFAULT); - valueMap.put("ASC", ASC); - valueMap.put("DESC", DESC); - } - - /** - * Returns the enum member associated with the given string value. - * @param toConvert String value to get enum member. - * @return The enum member against the given string value. - */ - @com.fasterxml.jackson.annotation.JsonCreator - public static SortOrder1Enum fromString(String toConvert) { - return valueMap.get(toConvert); - } - - /** - * Returns the string value associated with the enum member. - * @return The string value against enum member. - */ - @com.fasterxml.jackson.annotation.JsonValue - public String value() { - return value; - } - - /** - * Get string representation of this enum. - */ - @Override - public String toString() { - return value.toString(); - } - - /** - * Convert list of SortOrder1Enum values to list of string values. - * @param toConvert The list of SortOrder1Enum values to convert. - * @return List of representative string values. - */ - public static List toValue(List toConvert) { - if (toConvert == null) { - return null; - } - List convertedValues = new ArrayList<>(); - for (SortOrder1Enum enumValue : toConvert) { - convertedValues.add(enumValue.value); - } - return convertedValues; - } -} \ No newline at end of file diff --git a/Java/src/main/java/localhost/models/SortOrderEnum.java b/Java/src/main/java/localhost/models/SortOrderEnum.java deleted file mode 100644 index f55b9989e..000000000 --- a/Java/src/main/java/localhost/models/SortOrderEnum.java +++ /dev/null @@ -1,79 +0,0 @@ -/* - * ThoughtSpotPublicRESTAPILib - * - * This file was automatically generated by APIMATIC v3.0 ( https://www.apimatic.io ). - */ - -package localhost.models; - -import java.util.ArrayList; -import java.util.List; -import java.util.TreeMap; - -/** - * SortOrderEnum to be used. - */ -public enum SortOrderEnum { - DEFAULT, - - ASC, - - DESC; - - - private static TreeMap valueMap = new TreeMap<>(); - private String value; - - static { - DEFAULT.value = "DEFAULT"; - ASC.value = "ASC"; - DESC.value = "DESC"; - - valueMap.put("DEFAULT", DEFAULT); - valueMap.put("ASC", ASC); - valueMap.put("DESC", DESC); - } - - /** - * Returns the enum member associated with the given string value. - * @param toConvert String value to get enum member. - * @return The enum member against the given string value. - */ - @com.fasterxml.jackson.annotation.JsonCreator - public static SortOrderEnum fromString(String toConvert) { - return valueMap.get(toConvert); - } - - /** - * Returns the string value associated with the enum member. - * @return The string value against enum member. - */ - @com.fasterxml.jackson.annotation.JsonValue - public String value() { - return value; - } - - /** - * Get string representation of this enum. - */ - @Override - public String toString() { - return value.toString(); - } - - /** - * Convert list of SortOrderEnum values to list of string values. - * @param toConvert The list of SortOrderEnum values to convert. - * @return List of representative string values. - */ - public static List toValue(List toConvert) { - if (toConvert == null) { - return null; - } - List convertedValues = new ArrayList<>(); - for (SortOrderEnum enumValue : toConvert) { - convertedValues.add(enumValue.value); - } - return convertedValues; - } -} \ No newline at end of file diff --git a/Java/src/main/java/localhost/models/State1Enum.java b/Java/src/main/java/localhost/models/State1Enum.java deleted file mode 100644 index ef7d23bdb..000000000 --- a/Java/src/main/java/localhost/models/State1Enum.java +++ /dev/null @@ -1,87 +0,0 @@ -/* - * ThoughtSpotPublicRESTAPILib - * - * This file was automatically generated by APIMATIC v3.0 ( https://www.apimatic.io ). - */ - -package localhost.models; - -import java.util.ArrayList; -import java.util.List; -import java.util.TreeMap; - -/** - * State1Enum to be used. - */ -public enum State1Enum { - ACTIVE, - - INACTIVE, - - EXPIRED, - - LOCKED, - - PENDING; - - - private static TreeMap valueMap = new TreeMap<>(); - private String value; - - static { - ACTIVE.value = "ACTIVE"; - INACTIVE.value = "INACTIVE"; - EXPIRED.value = "EXPIRED"; - LOCKED.value = "LOCKED"; - PENDING.value = "PENDING"; - - valueMap.put("ACTIVE", ACTIVE); - valueMap.put("INACTIVE", INACTIVE); - valueMap.put("EXPIRED", EXPIRED); - valueMap.put("LOCKED", LOCKED); - valueMap.put("PENDING", PENDING); - } - - /** - * Returns the enum member associated with the given string value. - * @param toConvert String value to get enum member. - * @return The enum member against the given string value. - */ - @com.fasterxml.jackson.annotation.JsonCreator - public static State1Enum fromString(String toConvert) { - return valueMap.get(toConvert); - } - - /** - * Returns the string value associated with the enum member. - * @return The string value against enum member. - */ - @com.fasterxml.jackson.annotation.JsonValue - public String value() { - return value; - } - - /** - * Get string representation of this enum. - */ - @Override - public String toString() { - return value.toString(); - } - - /** - * Convert list of State1Enum values to list of string values. - * @param toConvert The list of State1Enum values to convert. - * @return List of representative string values. - */ - public static List toValue(List toConvert) { - if (toConvert == null) { - return null; - } - List convertedValues = new ArrayList<>(); - for (State1Enum enumValue : toConvert) { - convertedValues.add(enumValue.value); - } - return convertedValues; - } -} \ No newline at end of file diff --git a/Java/src/main/java/localhost/models/StateEnum.java b/Java/src/main/java/localhost/models/StateEnum.java deleted file mode 100644 index ab8aa973e..000000000 --- a/Java/src/main/java/localhost/models/StateEnum.java +++ /dev/null @@ -1,87 +0,0 @@ -/* - * ThoughtSpotPublicRESTAPILib - * - * This file was automatically generated by APIMATIC v3.0 ( https://www.apimatic.io ). - */ - -package localhost.models; - -import java.util.ArrayList; -import java.util.List; -import java.util.TreeMap; - -/** - * StateEnum to be used. - */ -public enum StateEnum { - ACTIVE, - - INACTIVE, - - EXPIRED, - - LOCKED, - - PENDING; - - - private static TreeMap valueMap = new TreeMap<>(); - private String value; - - static { - ACTIVE.value = "ACTIVE"; - INACTIVE.value = "INACTIVE"; - EXPIRED.value = "EXPIRED"; - LOCKED.value = "LOCKED"; - PENDING.value = "PENDING"; - - valueMap.put("ACTIVE", ACTIVE); - valueMap.put("INACTIVE", INACTIVE); - valueMap.put("EXPIRED", EXPIRED); - valueMap.put("LOCKED", LOCKED); - valueMap.put("PENDING", PENDING); - } - - /** - * Returns the enum member associated with the given string value. - * @param toConvert String value to get enum member. - * @return The enum member against the given string value. - */ - @com.fasterxml.jackson.annotation.JsonCreator - public static StateEnum fromString(String toConvert) { - return valueMap.get(toConvert); - } - - /** - * Returns the string value associated with the enum member. - * @return The string value against enum member. - */ - @com.fasterxml.jackson.annotation.JsonValue - public String value() { - return value; - } - - /** - * Get string representation of this enum. - */ - @Override - public String toString() { - return value.toString(); - } - - /** - * Convert list of StateEnum values to list of string values. - * @param toConvert The list of StateEnum values to convert. - * @return List of representative string values. - */ - public static List toValue(List toConvert) { - if (toConvert == null) { - return null; - } - List convertedValues = new ArrayList<>(); - for (StateEnum enumValue : toConvert) { - convertedValues.add(enumValue.value); - } - return convertedValues; - } -} \ No newline at end of file diff --git a/Java/src/main/java/localhost/models/TableColumns.java b/Java/src/main/java/localhost/models/TableColumns.java deleted file mode 100644 index 1f5d85157..000000000 --- a/Java/src/main/java/localhost/models/TableColumns.java +++ /dev/null @@ -1,139 +0,0 @@ -/* - * ThoughtSpotPublicRESTAPILib - * - * This file was automatically generated by APIMATIC v3.0 ( https://www.apimatic.io ). - */ - -package localhost.models; - -import com.fasterxml.jackson.annotation.JsonGetter; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonSetter; -import io.apimatic.core.types.BaseModel; - -/** - * This is a model class for TableColumns type. - */ -public class TableColumns { - private String name; - private String dataType; - - /** - * Default constructor. - */ - public TableColumns() { - } - - /** - * Initialization constructor. - * @param name String value for name. - * @param dataType String value for dataType. - */ - public TableColumns( - String name, - String dataType) { - this.name = name; - this.dataType = dataType; - } - - /** - * Getter for Name. - * Name of the column - * @return Returns the String - */ - @JsonGetter("name") - @JsonInclude(JsonInclude.Include.NON_NULL) - public String getName() { - return name; - } - - /** - * Setter for Name. - * Name of the column - * @param name Value for String - */ - @JsonSetter("name") - public void setName(String name) { - this.name = name; - } - - /** - * Getter for DataType. - * Datatype of the column - * @return Returns the String - */ - @JsonGetter("dataType") - @JsonInclude(JsonInclude.Include.NON_NULL) - public String getDataType() { - return dataType; - } - - /** - * Setter for DataType. - * Datatype of the column - * @param dataType Value for String - */ - @JsonSetter("dataType") - public void setDataType(String dataType) { - this.dataType = dataType; - } - - /** - * Converts this TableColumns into string format. - * @return String representation of this class - */ - @Override - public String toString() { - return "TableColumns [" + "name=" + name + ", dataType=" + dataType + "]"; - } - - /** - * Builds a new {@link TableColumns.Builder} object. - * Creates the instance with the state of the current model. - * @return a new {@link TableColumns.Builder} object - */ - public Builder toBuilder() { - Builder builder = new Builder() - .name(getName()) - .dataType(getDataType()); - return builder; - } - - /** - * Class to build instances of {@link TableColumns}. - */ - public static class Builder { - private String name; - private String dataType; - - - - /** - * Setter for name. - * @param name String value for name. - * @return Builder - */ - public Builder name(String name) { - this.name = name; - return this; - } - - /** - * Setter for dataType. - * @param dataType String value for dataType. - * @return Builder - */ - public Builder dataType(String dataType) { - this.dataType = dataType; - return this; - } - - /** - * Builds a new {@link TableColumns} object using the set fields. - * @return {@link TableColumns} - */ - public TableColumns build() { - return new TableColumns(name, dataType); - } - } -} diff --git a/Java/src/main/java/localhost/models/TableInput.java b/Java/src/main/java/localhost/models/TableInput.java deleted file mode 100644 index 545b5829c..000000000 --- a/Java/src/main/java/localhost/models/TableInput.java +++ /dev/null @@ -1,139 +0,0 @@ -/* - * ThoughtSpotPublicRESTAPILib - * - * This file was automatically generated by APIMATIC v3.0 ( https://www.apimatic.io ). - */ - -package localhost.models; - -import com.fasterxml.jackson.annotation.JsonGetter; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonSetter; -import io.apimatic.core.types.BaseModel; - -/** - * This is a model class for TableInput type. - */ -public class TableInput { - private String name; - private String id; - - /** - * Default constructor. - */ - public TableInput() { - } - - /** - * Initialization constructor. - * @param name String value for name. - * @param id String value for id. - */ - public TableInput( - String name, - String id) { - this.name = name; - this.id = id; - } - - /** - * Getter for Name. - * Name of the table - * @return Returns the String - */ - @JsonGetter("name") - @JsonInclude(JsonInclude.Include.NON_NULL) - public String getName() { - return name; - } - - /** - * Setter for Name. - * Name of the table - * @param name Value for String - */ - @JsonSetter("name") - public void setName(String name) { - this.name = name; - } - - /** - * Getter for Id. - * GUID of the Table - * @return Returns the String - */ - @JsonGetter("id") - @JsonInclude(JsonInclude.Include.NON_NULL) - public String getId() { - return id; - } - - /** - * Setter for Id. - * GUID of the Table - * @param id Value for String - */ - @JsonSetter("id") - public void setId(String id) { - this.id = id; - } - - /** - * Converts this TableInput into string format. - * @return String representation of this class - */ - @Override - public String toString() { - return "TableInput [" + "name=" + name + ", id=" + id + "]"; - } - - /** - * Builds a new {@link TableInput.Builder} object. - * Creates the instance with the state of the current model. - * @return a new {@link TableInput.Builder} object - */ - public Builder toBuilder() { - Builder builder = new Builder() - .name(getName()) - .id(getId()); - return builder; - } - - /** - * Class to build instances of {@link TableInput}. - */ - public static class Builder { - private String name; - private String id; - - - - /** - * Setter for name. - * @param name String value for name. - * @return Builder - */ - public Builder name(String name) { - this.name = name; - return this; - } - - /** - * Setter for id. - * @param id String value for id. - * @return Builder - */ - public Builder id(String id) { - this.id = id; - return this; - } - - /** - * Builds a new {@link TableInput} object using the set fields. - * @return {@link TableInput} - */ - public TableInput build() { - return new TableInput(name, id); - } - } -} diff --git a/Java/src/main/java/localhost/models/TableList.java b/Java/src/main/java/localhost/models/TableList.java deleted file mode 100644 index c6df604b3..000000000 --- a/Java/src/main/java/localhost/models/TableList.java +++ /dev/null @@ -1,691 +0,0 @@ -/* - * ThoughtSpotPublicRESTAPILib - * - * This file was automatically generated by APIMATIC v3.0 ( https://www.apimatic.io ). - */ - -package localhost.models; - -import com.fasterxml.jackson.annotation.JsonGetter; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonSetter; -import io.apimatic.core.types.BaseModel; -import java.util.List; - -/** - * This is a model class for TableList type. - */ -public class TableList { - private String name; - private String type; - private String id; - private String databaseStripe; - private String schemaStripe; - private Boolean isExternal; - private Boolean isDeprecated; - private Boolean isDeleted; - private Boolean isHidden; - private Double indexVersion; - private Double generationNum; - private String created; - private String modified; - private UserNameAndID author; - private UserNameAndID modifiedBy; - private UserNameAndID owner; - private List tags; - - /** - * Default constructor. - */ - public TableList() { - } - - /** - * Initialization constructor. - * @param name String value for name. - * @param type String value for type. - * @param id String value for id. - * @param databaseStripe String value for databaseStripe. - * @param schemaStripe String value for schemaStripe. - * @param isExternal Boolean value for isExternal. - * @param isDeprecated Boolean value for isDeprecated. - * @param isDeleted Boolean value for isDeleted. - * @param isHidden Boolean value for isHidden. - * @param indexVersion Double value for indexVersion. - * @param generationNum Double value for generationNum. - * @param created String value for created. - * @param modified String value for modified. - * @param author UserNameAndID value for author. - * @param modifiedBy UserNameAndID value for modifiedBy. - * @param owner UserNameAndID value for owner. - * @param tags List of String value for tags. - */ - public TableList( - String name, - String type, - String id, - String databaseStripe, - String schemaStripe, - Boolean isExternal, - Boolean isDeprecated, - Boolean isDeleted, - Boolean isHidden, - Double indexVersion, - Double generationNum, - String created, - String modified, - UserNameAndID author, - UserNameAndID modifiedBy, - UserNameAndID owner, - List tags) { - this.name = name; - this.type = type; - this.id = id; - this.databaseStripe = databaseStripe; - this.schemaStripe = schemaStripe; - this.isExternal = isExternal; - this.isDeprecated = isDeprecated; - this.isDeleted = isDeleted; - this.isHidden = isHidden; - this.indexVersion = indexVersion; - this.generationNum = generationNum; - this.created = created; - this.modified = modified; - this.author = author; - this.modifiedBy = modifiedBy; - this.owner = owner; - this.tags = tags; - } - - /** - * Getter for Name. - * Name of the table - * @return Returns the String - */ - @JsonGetter("name") - @JsonInclude(JsonInclude.Include.NON_NULL) - public String getName() { - return name; - } - - /** - * Setter for Name. - * Name of the table - * @param name Value for String - */ - @JsonSetter("name") - public void setName(String name) { - this.name = name; - } - - /** - * Getter for Type. - * Type of the table - * @return Returns the String - */ - @JsonGetter("type") - @JsonInclude(JsonInclude.Include.NON_NULL) - public String getType() { - return type; - } - - /** - * Setter for Type. - * Type of the table - * @param type Value for String - */ - @JsonSetter("type") - public void setType(String type) { - this.type = type; - } - - /** - * Getter for Id. - * GUID of the table - * @return Returns the String - */ - @JsonGetter("id") - @JsonInclude(JsonInclude.Include.NON_NULL) - public String getId() { - return id; - } - - /** - * Setter for Id. - * GUID of the table - * @param id Value for String - */ - @JsonSetter("id") - public void setId(String id) { - this.id = id; - } - - /** - * Getter for DatabaseStripe. - * Name of the database to which the table belongs - * @return Returns the String - */ - @JsonGetter("databaseStripe") - @JsonInclude(JsonInclude.Include.NON_NULL) - public String getDatabaseStripe() { - return databaseStripe; - } - - /** - * Setter for DatabaseStripe. - * Name of the database to which the table belongs - * @param databaseStripe Value for String - */ - @JsonSetter("databaseStripe") - public void setDatabaseStripe(String databaseStripe) { - this.databaseStripe = databaseStripe; - } - - /** - * Getter for SchemaStripe. - * Name of the schema to which the table belongs - * @return Returns the String - */ - @JsonGetter("schemaStripe") - @JsonInclude(JsonInclude.Include.NON_NULL) - public String getSchemaStripe() { - return schemaStripe; - } - - /** - * Setter for SchemaStripe. - * Name of the schema to which the table belongs - * @param schemaStripe Value for String - */ - @JsonSetter("schemaStripe") - public void setSchemaStripe(String schemaStripe) { - this.schemaStripe = schemaStripe; - } - - /** - * Getter for IsExternal. - * @return Returns the Boolean - */ - @JsonGetter("isExternal") - @JsonInclude(JsonInclude.Include.NON_NULL) - public Boolean getIsExternal() { - return isExternal; - } - - /** - * Setter for IsExternal. - * @param isExternal Value for Boolean - */ - @JsonSetter("isExternal") - public void setIsExternal(Boolean isExternal) { - this.isExternal = isExternal; - } - - /** - * Getter for IsDeprecated. - * Indicates if the table is deprecated - * @return Returns the Boolean - */ - @JsonGetter("isDeprecated") - @JsonInclude(JsonInclude.Include.NON_NULL) - public Boolean getIsDeprecated() { - return isDeprecated; - } - - /** - * Setter for IsDeprecated. - * Indicates if the table is deprecated - * @param isDeprecated Value for Boolean - */ - @JsonSetter("isDeprecated") - public void setIsDeprecated(Boolean isDeprecated) { - this.isDeprecated = isDeprecated; - } - - /** - * Getter for IsDeleted. - * Indicates if the table is deleted - * @return Returns the Boolean - */ - @JsonGetter("isDeleted") - @JsonInclude(JsonInclude.Include.NON_NULL) - public Boolean getIsDeleted() { - return isDeleted; - } - - /** - * Setter for IsDeleted. - * Indicates if the table is deleted - * @param isDeleted Value for Boolean - */ - @JsonSetter("isDeleted") - public void setIsDeleted(Boolean isDeleted) { - this.isDeleted = isDeleted; - } - - /** - * Getter for IsHidden. - * Indicates if the table is hideen - * @return Returns the Boolean - */ - @JsonGetter("isHidden") - @JsonInclude(JsonInclude.Include.NON_NULL) - public Boolean getIsHidden() { - return isHidden; - } - - /** - * Setter for IsHidden. - * Indicates if the table is hideen - * @param isHidden Value for Boolean - */ - @JsonSetter("isHidden") - public void setIsHidden(Boolean isHidden) { - this.isHidden = isHidden; - } - - /** - * Getter for IndexVersion. - * @return Returns the Double - */ - @JsonGetter("indexVersion") - @JsonInclude(JsonInclude.Include.NON_NULL) - public Double getIndexVersion() { - return indexVersion; - } - - /** - * Setter for IndexVersion. - * @param indexVersion Value for Double - */ - @JsonSetter("indexVersion") - public void setIndexVersion(Double indexVersion) { - this.indexVersion = indexVersion; - } - - /** - * Getter for GenerationNum. - * @return Returns the Double - */ - @JsonGetter("generationNum") - @JsonInclude(JsonInclude.Include.NON_NULL) - public Double getGenerationNum() { - return generationNum; - } - - /** - * Setter for GenerationNum. - * @param generationNum Value for Double - */ - @JsonSetter("generationNum") - public void setGenerationNum(Double generationNum) { - this.generationNum = generationNum; - } - - /** - * Getter for Created. - * Date and time when the table was created - * @return Returns the String - */ - @JsonGetter("created") - @JsonInclude(JsonInclude.Include.NON_NULL) - public String getCreated() { - return created; - } - - /** - * Setter for Created. - * Date and time when the table was created - * @param created Value for String - */ - @JsonSetter("created") - public void setCreated(String created) { - this.created = created; - } - - /** - * Getter for Modified. - * Date and time of last modification of the table - * @return Returns the String - */ - @JsonGetter("modified") - @JsonInclude(JsonInclude.Include.NON_NULL) - public String getModified() { - return modified; - } - - /** - * Setter for Modified. - * Date and time of last modification of the table - * @param modified Value for String - */ - @JsonSetter("modified") - public void setModified(String modified) { - this.modified = modified; - } - - /** - * Getter for Author. - * @return Returns the UserNameAndID - */ - @JsonGetter("author") - @JsonInclude(JsonInclude.Include.NON_NULL) - public UserNameAndID getAuthor() { - return author; - } - - /** - * Setter for Author. - * @param author Value for UserNameAndID - */ - @JsonSetter("author") - public void setAuthor(UserNameAndID author) { - this.author = author; - } - - /** - * Getter for ModifiedBy. - * @return Returns the UserNameAndID - */ - @JsonGetter("modifiedBy") - @JsonInclude(JsonInclude.Include.NON_NULL) - public UserNameAndID getModifiedBy() { - return modifiedBy; - } - - /** - * Setter for ModifiedBy. - * @param modifiedBy Value for UserNameAndID - */ - @JsonSetter("modifiedBy") - public void setModifiedBy(UserNameAndID modifiedBy) { - this.modifiedBy = modifiedBy; - } - - /** - * Getter for Owner. - * @return Returns the UserNameAndID - */ - @JsonGetter("owner") - @JsonInclude(JsonInclude.Include.NON_NULL) - public UserNameAndID getOwner() { - return owner; - } - - /** - * Setter for Owner. - * @param owner Value for UserNameAndID - */ - @JsonSetter("owner") - public void setOwner(UserNameAndID owner) { - this.owner = owner; - } - - /** - * Getter for Tags. - * List of tags assigned to the table - * @return Returns the List of String - */ - @JsonGetter("tags") - @JsonInclude(JsonInclude.Include.NON_NULL) - public List getTags() { - return tags; - } - - /** - * Setter for Tags. - * List of tags assigned to the table - * @param tags Value for List of String - */ - @JsonSetter("tags") - public void setTags(List tags) { - this.tags = tags; - } - - /** - * Converts this TableList into string format. - * @return String representation of this class - */ - @Override - public String toString() { - return "TableList [" + "name=" + name + ", type=" + type + ", id=" + id - + ", databaseStripe=" + databaseStripe + ", schemaStripe=" + schemaStripe - + ", isExternal=" + isExternal + ", isDeprecated=" + isDeprecated + ", isDeleted=" - + isDeleted + ", isHidden=" + isHidden + ", indexVersion=" + indexVersion - + ", generationNum=" + generationNum + ", created=" + created + ", modified=" - + modified + ", author=" + author + ", modifiedBy=" + modifiedBy + ", owner=" - + owner + ", tags=" + tags + "]"; - } - - /** - * Builds a new {@link TableList.Builder} object. - * Creates the instance with the state of the current model. - * @return a new {@link TableList.Builder} object - */ - public Builder toBuilder() { - Builder builder = new Builder() - .name(getName()) - .type(getType()) - .id(getId()) - .databaseStripe(getDatabaseStripe()) - .schemaStripe(getSchemaStripe()) - .isExternal(getIsExternal()) - .isDeprecated(getIsDeprecated()) - .isDeleted(getIsDeleted()) - .isHidden(getIsHidden()) - .indexVersion(getIndexVersion()) - .generationNum(getGenerationNum()) - .created(getCreated()) - .modified(getModified()) - .author(getAuthor()) - .modifiedBy(getModifiedBy()) - .owner(getOwner()) - .tags(getTags()); - return builder; - } - - /** - * Class to build instances of {@link TableList}. - */ - public static class Builder { - private String name; - private String type; - private String id; - private String databaseStripe; - private String schemaStripe; - private Boolean isExternal; - private Boolean isDeprecated; - private Boolean isDeleted; - private Boolean isHidden; - private Double indexVersion; - private Double generationNum; - private String created; - private String modified; - private UserNameAndID author; - private UserNameAndID modifiedBy; - private UserNameAndID owner; - private List tags; - - - - /** - * Setter for name. - * @param name String value for name. - * @return Builder - */ - public Builder name(String name) { - this.name = name; - return this; - } - - /** - * Setter for type. - * @param type String value for type. - * @return Builder - */ - public Builder type(String type) { - this.type = type; - return this; - } - - /** - * Setter for id. - * @param id String value for id. - * @return Builder - */ - public Builder id(String id) { - this.id = id; - return this; - } - - /** - * Setter for databaseStripe. - * @param databaseStripe String value for databaseStripe. - * @return Builder - */ - public Builder databaseStripe(String databaseStripe) { - this.databaseStripe = databaseStripe; - return this; - } - - /** - * Setter for schemaStripe. - * @param schemaStripe String value for schemaStripe. - * @return Builder - */ - public Builder schemaStripe(String schemaStripe) { - this.schemaStripe = schemaStripe; - return this; - } - - /** - * Setter for isExternal. - * @param isExternal Boolean value for isExternal. - * @return Builder - */ - public Builder isExternal(Boolean isExternal) { - this.isExternal = isExternal; - return this; - } - - /** - * Setter for isDeprecated. - * @param isDeprecated Boolean value for isDeprecated. - * @return Builder - */ - public Builder isDeprecated(Boolean isDeprecated) { - this.isDeprecated = isDeprecated; - return this; - } - - /** - * Setter for isDeleted. - * @param isDeleted Boolean value for isDeleted. - * @return Builder - */ - public Builder isDeleted(Boolean isDeleted) { - this.isDeleted = isDeleted; - return this; - } - - /** - * Setter for isHidden. - * @param isHidden Boolean value for isHidden. - * @return Builder - */ - public Builder isHidden(Boolean isHidden) { - this.isHidden = isHidden; - return this; - } - - /** - * Setter for indexVersion. - * @param indexVersion Double value for indexVersion. - * @return Builder - */ - public Builder indexVersion(Double indexVersion) { - this.indexVersion = indexVersion; - return this; - } - - /** - * Setter for generationNum. - * @param generationNum Double value for generationNum. - * @return Builder - */ - public Builder generationNum(Double generationNum) { - this.generationNum = generationNum; - return this; - } - - /** - * Setter for created. - * @param created String value for created. - * @return Builder - */ - public Builder created(String created) { - this.created = created; - return this; - } - - /** - * Setter for modified. - * @param modified String value for modified. - * @return Builder - */ - public Builder modified(String modified) { - this.modified = modified; - return this; - } - - /** - * Setter for author. - * @param author UserNameAndID value for author. - * @return Builder - */ - public Builder author(UserNameAndID author) { - this.author = author; - return this; - } - - /** - * Setter for modifiedBy. - * @param modifiedBy UserNameAndID value for modifiedBy. - * @return Builder - */ - public Builder modifiedBy(UserNameAndID modifiedBy) { - this.modifiedBy = modifiedBy; - return this; - } - - /** - * Setter for owner. - * @param owner UserNameAndID value for owner. - * @return Builder - */ - public Builder owner(UserNameAndID owner) { - this.owner = owner; - return this; - } - - /** - * Setter for tags. - * @param tags List of String value for tags. - * @return Builder - */ - public Builder tags(List tags) { - this.tags = tags; - return this; - } - - /** - * Builds a new {@link TableList} object using the set fields. - * @return {@link TableList} - */ - public TableList build() { - return new TableList(name, type, id, databaseStripe, schemaStripe, isExternal, - isDeprecated, isDeleted, isHidden, indexVersion, generationNum, created, - modified, author, modifiedBy, owner, tags); - } - } -} diff --git a/Java/src/main/java/localhost/models/TagNameAndID.java b/Java/src/main/java/localhost/models/TagNameAndID.java deleted file mode 100644 index a264d86c2..000000000 --- a/Java/src/main/java/localhost/models/TagNameAndID.java +++ /dev/null @@ -1,139 +0,0 @@ -/* - * ThoughtSpotPublicRESTAPILib - * - * This file was automatically generated by APIMATIC v3.0 ( https://www.apimatic.io ). - */ - -package localhost.models; - -import com.fasterxml.jackson.annotation.JsonGetter; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonSetter; -import io.apimatic.core.types.BaseModel; - -/** - * This is a model class for TagNameAndID type. - */ -public class TagNameAndID { - private String name; - private String id; - - /** - * Default constructor. - */ - public TagNameAndID() { - } - - /** - * Initialization constructor. - * @param name String value for name. - * @param id String value for id. - */ - public TagNameAndID( - String name, - String id) { - this.name = name; - this.id = id; - } - - /** - * Getter for Name. - * Name of the group to which group is added - * @return Returns the String - */ - @JsonGetter("name") - @JsonInclude(JsonInclude.Include.NON_NULL) - public String getName() { - return name; - } - - /** - * Setter for Name. - * Name of the group to which group is added - * @param name Value for String - */ - @JsonSetter("name") - public void setName(String name) { - this.name = name; - } - - /** - * Getter for Id. - * GUID of the group to which group is added - * @return Returns the String - */ - @JsonGetter("id") - @JsonInclude(JsonInclude.Include.NON_NULL) - public String getId() { - return id; - } - - /** - * Setter for Id. - * GUID of the group to which group is added - * @param id Value for String - */ - @JsonSetter("id") - public void setId(String id) { - this.id = id; - } - - /** - * Converts this TagNameAndID into string format. - * @return String representation of this class - */ - @Override - public String toString() { - return "TagNameAndID [" + "name=" + name + ", id=" + id + "]"; - } - - /** - * Builds a new {@link TagNameAndID.Builder} object. - * Creates the instance with the state of the current model. - * @return a new {@link TagNameAndID.Builder} object - */ - public Builder toBuilder() { - Builder builder = new Builder() - .name(getName()) - .id(getId()); - return builder; - } - - /** - * Class to build instances of {@link TagNameAndID}. - */ - public static class Builder { - private String name; - private String id; - - - - /** - * Setter for name. - * @param name String value for name. - * @return Builder - */ - public Builder name(String name) { - this.name = name; - return this; - } - - /** - * Setter for id. - * @param id String value for id. - * @return Builder - */ - public Builder id(String id) { - this.id = id; - return this; - } - - /** - * Builds a new {@link TagNameAndID} object using the set fields. - * @return {@link TagNameAndID} - */ - public TagNameAndID build() { - return new TagNameAndID(name, id); - } - } -} diff --git a/Java/src/main/java/localhost/models/TagNameAndIdInput.java b/Java/src/main/java/localhost/models/TagNameAndIdInput.java deleted file mode 100644 index 2ebd65a5c..000000000 --- a/Java/src/main/java/localhost/models/TagNameAndIdInput.java +++ /dev/null @@ -1,139 +0,0 @@ -/* - * ThoughtSpotPublicRESTAPILib - * - * This file was automatically generated by APIMATIC v3.0 ( https://www.apimatic.io ). - */ - -package localhost.models; - -import com.fasterxml.jackson.annotation.JsonGetter; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonSetter; -import io.apimatic.core.types.BaseModel; - -/** - * This is a model class for TagNameAndIdInput type. - */ -public class TagNameAndIdInput { - private String name; - private String id; - - /** - * Default constructor. - */ - public TagNameAndIdInput() { - } - - /** - * Initialization constructor. - * @param name String value for name. - * @param id String value for id. - */ - public TagNameAndIdInput( - String name, - String id) { - this.name = name; - this.id = id; - } - - /** - * Getter for Name. - * Name of the tags - * @return Returns the String - */ - @JsonGetter("name") - @JsonInclude(JsonInclude.Include.NON_NULL) - public String getName() { - return name; - } - - /** - * Setter for Name. - * Name of the tags - * @param name Value for String - */ - @JsonSetter("name") - public void setName(String name) { - this.name = name; - } - - /** - * Getter for Id. - * GUID of the tags - * @return Returns the String - */ - @JsonGetter("id") - @JsonInclude(JsonInclude.Include.NON_NULL) - public String getId() { - return id; - } - - /** - * Setter for Id. - * GUID of the tags - * @param id Value for String - */ - @JsonSetter("id") - public void setId(String id) { - this.id = id; - } - - /** - * Converts this TagNameAndIdInput into string format. - * @return String representation of this class - */ - @Override - public String toString() { - return "TagNameAndIdInput [" + "name=" + name + ", id=" + id + "]"; - } - - /** - * Builds a new {@link TagNameAndIdInput.Builder} object. - * Creates the instance with the state of the current model. - * @return a new {@link TagNameAndIdInput.Builder} object - */ - public Builder toBuilder() { - Builder builder = new Builder() - .name(getName()) - .id(getId()); - return builder; - } - - /** - * Class to build instances of {@link TagNameAndIdInput}. - */ - public static class Builder { - private String name; - private String id; - - - - /** - * Setter for name. - * @param name String value for name. - * @return Builder - */ - public Builder name(String name) { - this.name = name; - return this; - } - - /** - * Setter for id. - * @param id String value for id. - * @return Builder - */ - public Builder id(String id) { - this.id = id; - return this; - } - - /** - * Builds a new {@link TagNameAndIdInput} object using the set fields. - * @return {@link TagNameAndIdInput} - */ - public TagNameAndIdInput build() { - return new TagNameAndIdInput(name, id); - } - } -} diff --git a/Java/src/main/java/localhost/models/ToUserNameAndIDInput.java b/Java/src/main/java/localhost/models/ToUserNameAndIDInput.java deleted file mode 100644 index bbf884f72..000000000 --- a/Java/src/main/java/localhost/models/ToUserNameAndIDInput.java +++ /dev/null @@ -1,139 +0,0 @@ -/* - * ThoughtSpotPublicRESTAPILib - * - * This file was automatically generated by APIMATIC v3.0 ( https://www.apimatic.io ). - */ - -package localhost.models; - -import com.fasterxml.jackson.annotation.JsonGetter; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonSetter; -import io.apimatic.core.types.BaseModel; - -/** - * This is a model class for ToUserNameAndIDInput type. - */ -public class ToUserNameAndIDInput { - private String name; - private String id; - - /** - * Default constructor. - */ - public ToUserNameAndIDInput() { - } - - /** - * Initialization constructor. - * @param name String value for name. - * @param id String value for id. - */ - public ToUserNameAndIDInput( - String name, - String id) { - this.name = name; - this.id = id; - } - - /** - * Getter for Name. - * Username of the user - * @return Returns the String - */ - @JsonGetter("name") - @JsonInclude(JsonInclude.Include.NON_NULL) - public String getName() { - return name; - } - - /** - * Setter for Name. - * Username of the user - * @param name Value for String - */ - @JsonSetter("name") - public void setName(String name) { - this.name = name; - } - - /** - * Getter for Id. - * GUID of the user - * @return Returns the String - */ - @JsonGetter("id") - @JsonInclude(JsonInclude.Include.NON_NULL) - public String getId() { - return id; - } - - /** - * Setter for Id. - * GUID of the user - * @param id Value for String - */ - @JsonSetter("id") - public void setId(String id) { - this.id = id; - } - - /** - * Converts this ToUserNameAndIDInput into string format. - * @return String representation of this class - */ - @Override - public String toString() { - return "ToUserNameAndIDInput [" + "name=" + name + ", id=" + id + "]"; - } - - /** - * Builds a new {@link ToUserNameAndIDInput.Builder} object. - * Creates the instance with the state of the current model. - * @return a new {@link ToUserNameAndIDInput.Builder} object - */ - public Builder toBuilder() { - Builder builder = new Builder() - .name(getName()) - .id(getId()); - return builder; - } - - /** - * Class to build instances of {@link ToUserNameAndIDInput}. - */ - public static class Builder { - private String name; - private String id; - - - - /** - * Setter for name. - * @param name String value for name. - * @return Builder - */ - public Builder name(String name) { - this.name = name; - return this; - } - - /** - * Setter for id. - * @param id String value for id. - * @return Builder - */ - public Builder id(String id) { - this.id = id; - return this; - } - - /** - * Builds a new {@link ToUserNameAndIDInput} object using the set fields. - * @return {@link ToUserNameAndIDInput} - */ - public ToUserNameAndIDInput build() { - return new ToUserNameAndIDInput(name, id); - } - } -} diff --git a/Java/src/main/java/localhost/models/TopicEnum.java b/Java/src/main/java/localhost/models/TopicEnum.java deleted file mode 100644 index 3f4d6cdb4..000000000 --- a/Java/src/main/java/localhost/models/TopicEnum.java +++ /dev/null @@ -1,71 +0,0 @@ -/* - * ThoughtSpotPublicRESTAPILib - * - * This file was automatically generated by APIMATIC v3.0 ( https://www.apimatic.io ). - */ - -package localhost.models; - -import java.util.ArrayList; -import java.util.List; -import java.util.TreeMap; - -/** - * TopicEnum to be used. - */ -public enum TopicEnum { - SECURITY_LOGS; - - - private static TreeMap valueMap = new TreeMap<>(); - private String value; - - static { - SECURITY_LOGS.value = "security_logs"; - - valueMap.put("security_logs", SECURITY_LOGS); - } - - /** - * Returns the enum member associated with the given string value. - * @param toConvert String value to get enum member. - * @return The enum member against the given string value. - */ - @com.fasterxml.jackson.annotation.JsonCreator - public static TopicEnum fromString(String toConvert) { - return valueMap.get(toConvert); - } - - /** - * Returns the string value associated with the enum member. - * @return The string value against enum member. - */ - @com.fasterxml.jackson.annotation.JsonValue - public String value() { - return value; - } - - /** - * Get string representation of this enum. - */ - @Override - public String toString() { - return value.toString(); - } - - /** - * Convert list of TopicEnum values to list of string values. - * @param toConvert The list of TopicEnum values to convert. - * @return List of representative string values. - */ - public static List toValue(List toConvert) { - if (toConvert == null) { - return null; - } - List convertedValues = new ArrayList<>(); - for (TopicEnum enumValue : toConvert) { - convertedValues.add(enumValue.value); - } - return convertedValues; - } -} \ No newline at end of file diff --git a/Java/src/main/java/localhost/models/TsObjectInput.java b/Java/src/main/java/localhost/models/TsObjectInput.java deleted file mode 100644 index 1ae14a7f9..000000000 --- a/Java/src/main/java/localhost/models/TsObjectInput.java +++ /dev/null @@ -1,148 +0,0 @@ -/* - * ThoughtSpotPublicRESTAPILib - * - * This file was automatically generated by APIMATIC v3.0 ( https://www.apimatic.io ). - */ - -package localhost.models; - -import com.fasterxml.jackson.annotation.JsonGetter; -import com.fasterxml.jackson.annotation.JsonSetter; -import io.apimatic.core.types.BaseModel; - -/** - * This is a model class for TsObjectInput type. - */ -public class TsObjectInput { - private String id; - private TypeEnum type; - - /** - * Default constructor. - */ - public TsObjectInput() { - } - - /** - * Initialization constructor. - * @param id String value for id. - * @param type TypeEnum value for type. - */ - public TsObjectInput( - String id, - TypeEnum type) { - this.id = id; - this.type = type; - } - - /** - * Getter for Id. - * GUID of the metadata object - * @return Returns the String - */ - @JsonGetter("id") - public String getId() { - return id; - } - - /** - * Setter for Id. - * GUID of the metadata object - * @param id Value for String - */ - @JsonSetter("id") - public void setId(String id) { - this.id = id; - } - - /** - * Getter for Type. - * Type of the metadata object - * @return Returns the TypeEnum - */ - @JsonGetter("type") - public TypeEnum getType() { - return type; - } - - /** - * Setter for Type. - * Type of the metadata object - * @param type Value for TypeEnum - */ - @JsonSetter("type") - public void setType(TypeEnum type) { - this.type = type; - } - - /** - * Converts this TsObjectInput into string format. - * @return String representation of this class - */ - @Override - public String toString() { - return "TsObjectInput [" + "id=" + id + ", type=" + type + "]"; - } - - /** - * Builds a new {@link TsObjectInput.Builder} object. - * Creates the instance with the state of the current model. - * @return a new {@link TsObjectInput.Builder} object - */ - public Builder toBuilder() { - Builder builder = new Builder(id, type); - return builder; - } - - /** - * Class to build instances of {@link TsObjectInput}. - */ - public static class Builder { - private String id; - private TypeEnum type; - - /** - * Initialization constructor. - */ - public Builder() { - } - - /** - * Initialization constructor. - * @param id String value for id. - * @param type TypeEnum value for type. - */ - public Builder(String id, TypeEnum type) { - this.id = id; - this.type = type; - } - - /** - * Setter for id. - * @param id String value for id. - * @return Builder - */ - public Builder id(String id) { - this.id = id; - return this; - } - - /** - * Setter for type. - * @param type TypeEnum value for type. - * @return Builder - */ - public Builder type(TypeEnum type) { - this.type = type; - return this; - } - - /** - * Builds a new {@link TsObjectInput} object using the set fields. - * @return {@link TsObjectInput} - */ - public TsObjectInput build() { - return new TsObjectInput(id, type); - } - } -} diff --git a/Java/src/main/java/localhost/models/TsObjectSearchInput.java b/Java/src/main/java/localhost/models/TsObjectSearchInput.java deleted file mode 100644 index ee59d3550..000000000 --- a/Java/src/main/java/localhost/models/TsObjectSearchInput.java +++ /dev/null @@ -1,149 +0,0 @@ -/* - * ThoughtSpotPublicRESTAPILib - * - * This file was automatically generated by APIMATIC v3.0 ( https://www.apimatic.io ). - */ - -package localhost.models; - -import com.fasterxml.jackson.annotation.JsonGetter; -import com.fasterxml.jackson.annotation.JsonSetter; -import io.apimatic.core.types.BaseModel; -import java.util.List; - -/** - * This is a model class for TsObjectSearchInput type. - */ -public class TsObjectSearchInput { - private Type2Enum type; - private List id; - - /** - * Default constructor. - */ - public TsObjectSearchInput() { - } - - /** - * Initialization constructor. - * @param type Type2Enum value for type. - * @param id List of String value for id. - */ - public TsObjectSearchInput( - Type2Enum type, - List id) { - this.type = type; - this.id = id; - } - - /** - * Getter for Type. - * Type of the metadata objec - * @return Returns the Type2Enum - */ - @JsonGetter("type") - public Type2Enum getType() { - return type; - } - - /** - * Setter for Type. - * Type of the metadata objec - * @param type Value for Type2Enum - */ - @JsonSetter("type") - public void setType(Type2Enum type) { - this.type = type; - } - - /** - * Getter for Id. - * A JSON Array of GUIDs of the metadata object - * @return Returns the List of String - */ - @JsonGetter("id") - public List getId() { - return id; - } - - /** - * Setter for Id. - * A JSON Array of GUIDs of the metadata object - * @param id Value for List of String - */ - @JsonSetter("id") - public void setId(List id) { - this.id = id; - } - - /** - * Converts this TsObjectSearchInput into string format. - * @return String representation of this class - */ - @Override - public String toString() { - return "TsObjectSearchInput [" + "type=" + type + ", id=" + id + "]"; - } - - /** - * Builds a new {@link TsObjectSearchInput.Builder} object. - * Creates the instance with the state of the current model. - * @return a new {@link TsObjectSearchInput.Builder} object - */ - public Builder toBuilder() { - Builder builder = new Builder(type, id); - return builder; - } - - /** - * Class to build instances of {@link TsObjectSearchInput}. - */ - public static class Builder { - private Type2Enum type; - private List id; - - /** - * Initialization constructor. - */ - public Builder() { - } - - /** - * Initialization constructor. - * @param type Type2Enum value for type. - * @param id List of String value for id. - */ - public Builder(Type2Enum type, List id) { - this.type = type; - this.id = id; - } - - /** - * Setter for type. - * @param type Type2Enum value for type. - * @return Builder - */ - public Builder type(Type2Enum type) { - this.type = type; - return this; - } - - /** - * Setter for id. - * @param id List of String value for id. - * @return Builder - */ - public Builder id(List id) { - this.id = id; - return this; - } - - /** - * Builds a new {@link TsObjectSearchInput} object using the set fields. - * @return {@link TsObjectSearchInput} - */ - public TsObjectSearchInput build() { - return new TsObjectSearchInput(type, id); - } - } -} diff --git a/Java/src/main/java/localhost/models/TsObjectTypeSerach.java b/Java/src/main/java/localhost/models/TsObjectTypeSerach.java deleted file mode 100644 index 3775b784c..000000000 --- a/Java/src/main/java/localhost/models/TsObjectTypeSerach.java +++ /dev/null @@ -1,330 +0,0 @@ -/* - * ThoughtSpotPublicRESTAPILib - * - * This file was automatically generated by APIMATIC v3.0 ( https://www.apimatic.io ). - */ - -package localhost.models; - -import com.fasterxml.jackson.annotation.JsonGetter; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonSetter; -import io.apimatic.core.types.BaseModel; -import java.util.List; - -/** - * This is a model class for TsObjectTypeSerach type. - */ -public class TsObjectTypeSerach { - private String id; - private String name; - private String owner; - private UserNameAndID author; - private String permission; - private String sharedPermission; - private List groupPermission; - - /** - * Default constructor. - */ - public TsObjectTypeSerach() { - } - - /** - * Initialization constructor. - * @param id String value for id. - * @param name String value for name. - * @param owner String value for owner. - * @param author UserNameAndID value for author. - * @param permission String value for permission. - * @param sharedPermission String value for sharedPermission. - * @param groupPermission List of GroupPermission value for groupPermission. - */ - public TsObjectTypeSerach( - String id, - String name, - String owner, - UserNameAndID author, - String permission, - String sharedPermission, - List groupPermission) { - this.id = id; - this.name = name; - this.owner = owner; - this.author = author; - this.permission = permission; - this.sharedPermission = sharedPermission; - this.groupPermission = groupPermission; - } - - /** - * Getter for Id. - * GUID of the object - * @return Returns the String - */ - @JsonGetter("id") - @JsonInclude(JsonInclude.Include.NON_NULL) - public String getId() { - return id; - } - - /** - * Setter for Id. - * GUID of the object - * @param id Value for String - */ - @JsonSetter("id") - public void setId(String id) { - this.id = id; - } - - /** - * Getter for Name. - * Name of the object - * @return Returns the String - */ - @JsonGetter("name") - @JsonInclude(JsonInclude.Include.NON_NULL) - public String getName() { - return name; - } - - /** - * Setter for Name. - * Name of the object - * @param name Value for String - */ - @JsonSetter("name") - public void setName(String name) { - this.name = name; - } - - /** - * Getter for Owner. - * Owner of the object - * @return Returns the String - */ - @JsonGetter("owner") - @JsonInclude(JsonInclude.Include.NON_NULL) - public String getOwner() { - return owner; - } - - /** - * Setter for Owner. - * Owner of the object - * @param owner Value for String - */ - @JsonSetter("owner") - public void setOwner(String owner) { - this.owner = owner; - } - - /** - * Getter for Author. - * @return Returns the UserNameAndID - */ - @JsonGetter("author") - @JsonInclude(JsonInclude.Include.NON_NULL) - public UserNameAndID getAuthor() { - return author; - } - - /** - * Setter for Author. - * @param author Value for UserNameAndID - */ - @JsonSetter("author") - public void setAuthor(UserNameAndID author) { - this.author = author; - } - - /** - * Getter for Permission. - * Indicates the permission which user or user group has on the object - * @return Returns the String - */ - @JsonGetter("permission") - @JsonInclude(JsonInclude.Include.NON_NULL) - public String getPermission() { - return permission; - } - - /** - * Setter for Permission. - * Indicates the permission which user or user group has on the object - * @param permission Value for String - */ - @JsonSetter("permission") - public void setPermission(String permission) { - this.permission = permission; - } - - /** - * Getter for SharedPermission. - * Indicates the permission which user or user group has on the object through sharing of the - * object with the user or user group - * @return Returns the String - */ - @JsonGetter("sharedPermission") - @JsonInclude(JsonInclude.Include.NON_NULL) - public String getSharedPermission() { - return sharedPermission; - } - - /** - * Setter for SharedPermission. - * Indicates the permission which user or user group has on the object through sharing of the - * object with the user or user group - * @param sharedPermission Value for String - */ - @JsonSetter("sharedPermission") - public void setSharedPermission(String sharedPermission) { - this.sharedPermission = sharedPermission; - } - - /** - * Getter for GroupPermission. - * An array of object with details of permission on the user groups to which the user or user - * group belongs - * @return Returns the List of GroupPermission - */ - @JsonGetter("groupPermission") - @JsonInclude(JsonInclude.Include.NON_NULL) - public List getGroupPermission() { - return groupPermission; - } - - /** - * Setter for GroupPermission. - * An array of object with details of permission on the user groups to which the user or user - * group belongs - * @param groupPermission Value for List of GroupPermission - */ - @JsonSetter("groupPermission") - public void setGroupPermission(List groupPermission) { - this.groupPermission = groupPermission; - } - - /** - * Converts this TsObjectTypeSerach into string format. - * @return String representation of this class - */ - @Override - public String toString() { - return "TsObjectTypeSerach [" + "id=" + id + ", name=" + name + ", owner=" + owner - + ", author=" + author + ", permission=" + permission + ", sharedPermission=" - + sharedPermission + ", groupPermission=" + groupPermission + "]"; - } - - /** - * Builds a new {@link TsObjectTypeSerach.Builder} object. - * Creates the instance with the state of the current model. - * @return a new {@link TsObjectTypeSerach.Builder} object - */ - public Builder toBuilder() { - Builder builder = new Builder() - .id(getId()) - .name(getName()) - .owner(getOwner()) - .author(getAuthor()) - .permission(getPermission()) - .sharedPermission(getSharedPermission()) - .groupPermission(getGroupPermission()); - return builder; - } - - /** - * Class to build instances of {@link TsObjectTypeSerach}. - */ - public static class Builder { - private String id; - private String name; - private String owner; - private UserNameAndID author; - private String permission; - private String sharedPermission; - private List groupPermission; - - - - /** - * Setter for id. - * @param id String value for id. - * @return Builder - */ - public Builder id(String id) { - this.id = id; - return this; - } - - /** - * Setter for name. - * @param name String value for name. - * @return Builder - */ - public Builder name(String name) { - this.name = name; - return this; - } - - /** - * Setter for owner. - * @param owner String value for owner. - * @return Builder - */ - public Builder owner(String owner) { - this.owner = owner; - return this; - } - - /** - * Setter for author. - * @param author UserNameAndID value for author. - * @return Builder - */ - public Builder author(UserNameAndID author) { - this.author = author; - return this; - } - - /** - * Setter for permission. - * @param permission String value for permission. - * @return Builder - */ - public Builder permission(String permission) { - this.permission = permission; - return this; - } - - /** - * Setter for sharedPermission. - * @param sharedPermission String value for sharedPermission. - * @return Builder - */ - public Builder sharedPermission(String sharedPermission) { - this.sharedPermission = sharedPermission; - return this; - } - - /** - * Setter for groupPermission. - * @param groupPermission List of GroupPermission value for groupPermission. - * @return Builder - */ - public Builder groupPermission(List groupPermission) { - this.groupPermission = groupPermission; - return this; - } - - /** - * Builds a new {@link TsObjectTypeSerach} object using the set fields. - * @return {@link TsObjectTypeSerach} - */ - public TsObjectTypeSerach build() { - return new TsObjectTypeSerach(id, name, owner, author, permission, sharedPermission, - groupPermission); - } - } -} diff --git a/Java/src/main/java/localhost/models/TspublicRestV2AdminAssignauthorRequest.java b/Java/src/main/java/localhost/models/TspublicRestV2AdminAssignauthorRequest.java deleted file mode 100644 index b2f4c616c..000000000 --- a/Java/src/main/java/localhost/models/TspublicRestV2AdminAssignauthorRequest.java +++ /dev/null @@ -1,188 +0,0 @@ -/* - * ThoughtSpotPublicRESTAPILib - * - * This file was automatically generated by APIMATIC v3.0 ( https://www.apimatic.io ). - */ - -package localhost.models; - -import com.fasterxml.jackson.annotation.JsonGetter; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonSetter; -import io.apimatic.core.types.BaseModel; -import java.util.List; - -/** - * This is a model class for TspublicRestV2AdminAssignauthorRequest type. - */ -public class TspublicRestV2AdminAssignauthorRequest { - private List tsObjectId; - private String name; - private String id; - - /** - * Default constructor. - */ - public TspublicRestV2AdminAssignauthorRequest() { - } - - /** - * Initialization constructor. - * @param tsObjectId List of String value for tsObjectId. - * @param name String value for name. - * @param id String value for id. - */ - public TspublicRestV2AdminAssignauthorRequest( - List tsObjectId, - String name, - String id) { - this.tsObjectId = tsObjectId; - this.name = name; - this.id = id; - } - - /** - * Getter for TsObjectId. - * A JSON array of GUIDs of the metadata objects. - * @return Returns the List of String - */ - @JsonGetter("tsObjectId") - public List getTsObjectId() { - return tsObjectId; - } - - /** - * Setter for TsObjectId. - * A JSON array of GUIDs of the metadata objects. - * @param tsObjectId Value for List of String - */ - @JsonSetter("tsObjectId") - public void setTsObjectId(List tsObjectId) { - this.tsObjectId = tsObjectId; - } - - /** - * Getter for Name. - * User name of the user account - * @return Returns the String - */ - @JsonGetter("name") - @JsonInclude(JsonInclude.Include.NON_NULL) - public String getName() { - return name; - } - - /** - * Setter for Name. - * User name of the user account - * @param name Value for String - */ - @JsonSetter("name") - public void setName(String name) { - this.name = name; - } - - /** - * Getter for Id. - * The GUID of the user account - * @return Returns the String - */ - @JsonGetter("id") - @JsonInclude(JsonInclude.Include.NON_NULL) - public String getId() { - return id; - } - - /** - * Setter for Id. - * The GUID of the user account - * @param id Value for String - */ - @JsonSetter("id") - public void setId(String id) { - this.id = id; - } - - /** - * Converts this TspublicRestV2AdminAssignauthorRequest into string format. - * @return String representation of this class - */ - @Override - public String toString() { - return "TspublicRestV2AdminAssignauthorRequest [" + "tsObjectId=" + tsObjectId + ", name=" - + name + ", id=" + id + "]"; - } - - /** - * Builds a new {@link TspublicRestV2AdminAssignauthorRequest.Builder} object. - * Creates the instance with the state of the current model. - * @return a new {@link TspublicRestV2AdminAssignauthorRequest.Builder} object - */ - public Builder toBuilder() { - Builder builder = new Builder(tsObjectId) - .name(getName()) - .id(getId()); - return builder; - } - - /** - * Class to build instances of {@link TspublicRestV2AdminAssignauthorRequest}. - */ - public static class Builder { - private List tsObjectId; - private String name; - private String id; - - /** - * Initialization constructor. - */ - public Builder() { - } - - /** - * Initialization constructor. - * @param tsObjectId List of String value for tsObjectId. - */ - public Builder(List tsObjectId) { - this.tsObjectId = tsObjectId; - } - - /** - * Setter for tsObjectId. - * @param tsObjectId List of String value for tsObjectId. - * @return Builder - */ - public Builder tsObjectId(List tsObjectId) { - this.tsObjectId = tsObjectId; - return this; - } - - /** - * Setter for name. - * @param name String value for name. - * @return Builder - */ - public Builder name(String name) { - this.name = name; - return this; - } - - /** - * Setter for id. - * @param id String value for id. - * @return Builder - */ - public Builder id(String id) { - this.id = id; - return this; - } - - /** - * Builds a new {@link TspublicRestV2AdminAssignauthorRequest} object using the set fields. - * @return {@link TspublicRestV2AdminAssignauthorRequest} - */ - public TspublicRestV2AdminAssignauthorRequest build() { - return new TspublicRestV2AdminAssignauthorRequest(tsObjectId, name, id); - } - } -} diff --git a/Java/src/main/java/localhost/models/TspublicRestV2AdminChangeauthorRequest.java b/Java/src/main/java/localhost/models/TspublicRestV2AdminChangeauthorRequest.java deleted file mode 100644 index 564c1ec9f..000000000 --- a/Java/src/main/java/localhost/models/TspublicRestV2AdminChangeauthorRequest.java +++ /dev/null @@ -1,200 +0,0 @@ -/* - * ThoughtSpotPublicRESTAPILib - * - * This file was automatically generated by APIMATIC v3.0 ( https://www.apimatic.io ). - */ - -package localhost.models; - -import com.fasterxml.jackson.annotation.JsonGetter; -import com.fasterxml.jackson.annotation.JsonSetter; -import io.apimatic.core.types.BaseModel; -import java.util.List; - -/** - * This is a model class for TspublicRestV2AdminChangeauthorRequest type. - */ -public class TspublicRestV2AdminChangeauthorRequest { - private List tsObjectId; - private FromUserNameAndIDInput fromUser; - private ToUserNameAndIDInput toUser; - - /** - * Default constructor. - */ - public TspublicRestV2AdminChangeauthorRequest() { - } - - /** - * Initialization constructor. - * @param tsObjectId List of String value for tsObjectId. - * @param fromUser FromUserNameAndIDInput value for fromUser. - * @param toUser ToUserNameAndIDInput value for toUser. - */ - public TspublicRestV2AdminChangeauthorRequest( - List tsObjectId, - FromUserNameAndIDInput fromUser, - ToUserNameAndIDInput toUser) { - this.tsObjectId = tsObjectId; - this.fromUser = fromUser; - this.toUser = toUser; - } - - /** - * Getter for TsObjectId. - * A JSON array of GUIDs of the metadata objects. To change owner of all the objects owned by a - * user, provide single input as ALL. If multiple object ids along with ALL is provided as - * input, then ALL will be considered. - * @return Returns the List of String - */ - @JsonGetter("tsObjectId") - public List getTsObjectId() { - return tsObjectId; - } - - /** - * Setter for TsObjectId. - * A JSON array of GUIDs of the metadata objects. To change owner of all the objects owned by a - * user, provide single input as ALL. If multiple object ids along with ALL is provided as - * input, then ALL will be considered. - * @param tsObjectId Value for List of String - */ - @JsonSetter("tsObjectId") - public void setTsObjectId(List tsObjectId) { - this.tsObjectId = tsObjectId; - } - - /** - * Getter for FromUser. - * A JSON object of name or GUIDs of the current owner of the objects. When both are given then - * id is considered. If a list of object ids are provided as input for TsObjectId, then only for - * those ids that have owner as the value provided in fromUser, the owner will be changed. - * Provide either name or id as input. When both are given user id will be considered. - * @return Returns the FromUserNameAndIDInput - */ - @JsonGetter("fromUser") - public FromUserNameAndIDInput getFromUser() { - return fromUser; - } - - /** - * Setter for FromUser. - * A JSON object of name or GUIDs of the current owner of the objects. When both are given then - * id is considered. If a list of object ids are provided as input for TsObjectId, then only for - * those ids that have owner as the value provided in fromUser, the owner will be changed. - * Provide either name or id as input. When both are given user id will be considered. - * @param fromUser Value for FromUserNameAndIDInput - */ - @JsonSetter("fromUser") - public void setFromUser(FromUserNameAndIDInput fromUser) { - this.fromUser = fromUser; - } - - /** - * Getter for ToUser. - * A JSON object of name or GUIDs of the new owner for the objects. When both are given then id - * is considered. - * @return Returns the ToUserNameAndIDInput - */ - @JsonGetter("toUser") - public ToUserNameAndIDInput getToUser() { - return toUser; - } - - /** - * Setter for ToUser. - * A JSON object of name or GUIDs of the new owner for the objects. When both are given then id - * is considered. - * @param toUser Value for ToUserNameAndIDInput - */ - @JsonSetter("toUser") - public void setToUser(ToUserNameAndIDInput toUser) { - this.toUser = toUser; - } - - /** - * Converts this TspublicRestV2AdminChangeauthorRequest into string format. - * @return String representation of this class - */ - @Override - public String toString() { - return "TspublicRestV2AdminChangeauthorRequest [" + "tsObjectId=" + tsObjectId - + ", fromUser=" + fromUser + ", toUser=" + toUser + "]"; - } - - /** - * Builds a new {@link TspublicRestV2AdminChangeauthorRequest.Builder} object. - * Creates the instance with the state of the current model. - * @return a new {@link TspublicRestV2AdminChangeauthorRequest.Builder} object - */ - public Builder toBuilder() { - Builder builder = new Builder(tsObjectId, fromUser, toUser); - return builder; - } - - /** - * Class to build instances of {@link TspublicRestV2AdminChangeauthorRequest}. - */ - public static class Builder { - private List tsObjectId; - private FromUserNameAndIDInput fromUser; - private ToUserNameAndIDInput toUser; - - /** - * Initialization constructor. - */ - public Builder() { - } - - /** - * Initialization constructor. - * @param tsObjectId List of String value for tsObjectId. - * @param fromUser FromUserNameAndIDInput value for fromUser. - * @param toUser ToUserNameAndIDInput value for toUser. - */ - public Builder(List tsObjectId, FromUserNameAndIDInput fromUser, - ToUserNameAndIDInput toUser) { - this.tsObjectId = tsObjectId; - this.fromUser = fromUser; - this.toUser = toUser; - } - - /** - * Setter for tsObjectId. - * @param tsObjectId List of String value for tsObjectId. - * @return Builder - */ - public Builder tsObjectId(List tsObjectId) { - this.tsObjectId = tsObjectId; - return this; - } - - /** - * Setter for fromUser. - * @param fromUser FromUserNameAndIDInput value for fromUser. - * @return Builder - */ - public Builder fromUser(FromUserNameAndIDInput fromUser) { - this.fromUser = fromUser; - return this; - } - - /** - * Setter for toUser. - * @param toUser ToUserNameAndIDInput value for toUser. - * @return Builder - */ - public Builder toUser(ToUserNameAndIDInput toUser) { - this.toUser = toUser; - return this; - } - - /** - * Builds a new {@link TspublicRestV2AdminChangeauthorRequest} object using the set fields. - * @return {@link TspublicRestV2AdminChangeauthorRequest} - */ - public TspublicRestV2AdminChangeauthorRequest build() { - return new TspublicRestV2AdminChangeauthorRequest(tsObjectId, fromUser, toUser); - } - } -} diff --git a/Java/src/main/java/localhost/models/TspublicRestV2AdminConfigurationUpdateRequest.java b/Java/src/main/java/localhost/models/TspublicRestV2AdminConfigurationUpdateRequest.java deleted file mode 100644 index ddb74c31b..000000000 --- a/Java/src/main/java/localhost/models/TspublicRestV2AdminConfigurationUpdateRequest.java +++ /dev/null @@ -1,106 +0,0 @@ -/* - * ThoughtSpotPublicRESTAPILib - * - * This file was automatically generated by APIMATIC v3.0 ( https://www.apimatic.io ). - */ - -package localhost.models; - -import com.fasterxml.jackson.annotation.JsonGetter; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonSetter; -import io.apimatic.core.types.BaseModel; - -/** - * This is a model class for TspublicRestV2AdminConfigurationUpdateRequest type. - */ -public class TspublicRestV2AdminConfigurationUpdateRequest { - private String configuration; - - /** - * Default constructor. - */ - public TspublicRestV2AdminConfigurationUpdateRequest() { - } - - /** - * Initialization constructor. - * @param configuration String value for configuration. - */ - public TspublicRestV2AdminConfigurationUpdateRequest( - String configuration) { - this.configuration = configuration; - } - - /** - * Getter for Configuration. - * A JSON file with the key-value pair of configuration attributes to be updated. Example: - * {"defaultChartDataSize": 5000} - * @return Returns the String - */ - @JsonGetter("configuration") - @JsonInclude(JsonInclude.Include.NON_NULL) - public String getConfiguration() { - return configuration; - } - - /** - * Setter for Configuration. - * A JSON file with the key-value pair of configuration attributes to be updated. Example: - * {"defaultChartDataSize": 5000} - * @param configuration Value for String - */ - @JsonSetter("configuration") - public void setConfiguration(String configuration) { - this.configuration = configuration; - } - - /** - * Converts this TspublicRestV2AdminConfigurationUpdateRequest into string format. - * @return String representation of this class - */ - @Override - public String toString() { - return "TspublicRestV2AdminConfigurationUpdateRequest [" + "configuration=" + configuration - + "]"; - } - - /** - * Builds a new {@link TspublicRestV2AdminConfigurationUpdateRequest.Builder} object. - * Creates the instance with the state of the current model. - * @return a new {@link TspublicRestV2AdminConfigurationUpdateRequest.Builder} object - */ - public Builder toBuilder() { - Builder builder = new Builder() - .configuration(getConfiguration()); - return builder; - } - - /** - * Class to build instances of {@link TspublicRestV2AdminConfigurationUpdateRequest}. - */ - public static class Builder { - private String configuration; - - - - /** - * Setter for configuration. - * @param configuration String value for configuration. - * @return Builder - */ - public Builder configuration(String configuration) { - this.configuration = configuration; - return this; - } - - /** - * Builds a new {@link TspublicRestV2AdminConfigurationUpdateRequest} object using the set - * fields. - * @return {@link TspublicRestV2AdminConfigurationUpdateRequest} - */ - public TspublicRestV2AdminConfigurationUpdateRequest build() { - return new TspublicRestV2AdminConfigurationUpdateRequest(configuration); - } - } -} diff --git a/Java/src/main/java/localhost/models/TspublicRestV2AdminForcelogoutRequest.java b/Java/src/main/java/localhost/models/TspublicRestV2AdminForcelogoutRequest.java deleted file mode 100644 index 29b921338..000000000 --- a/Java/src/main/java/localhost/models/TspublicRestV2AdminForcelogoutRequest.java +++ /dev/null @@ -1,105 +0,0 @@ -/* - * ThoughtSpotPublicRESTAPILib - * - * This file was automatically generated by APIMATIC v3.0 ( https://www.apimatic.io ). - */ - -package localhost.models; - -import com.fasterxml.jackson.annotation.JsonGetter; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonSetter; -import io.apimatic.core.types.BaseModel; -import java.util.List; - -/** - * This is a model class for TspublicRestV2AdminForcelogoutRequest type. - */ -public class TspublicRestV2AdminForcelogoutRequest { - private List user; - - /** - * Default constructor. - */ - public TspublicRestV2AdminForcelogoutRequest() { - } - - /** - * Initialization constructor. - * @param user List of NameAndIdInput value for user. - */ - public TspublicRestV2AdminForcelogoutRequest( - List user) { - this.user = user; - } - - /** - * Getter for User. - * A JSON array of name of users or GUIDs of groups or both. When both are given then id is - * considered. - * @return Returns the List of NameAndIdInput - */ - @JsonGetter("user") - @JsonInclude(JsonInclude.Include.NON_NULL) - public List getUser() { - return user; - } - - /** - * Setter for User. - * A JSON array of name of users or GUIDs of groups or both. When both are given then id is - * considered. - * @param user Value for List of NameAndIdInput - */ - @JsonSetter("user") - public void setUser(List user) { - this.user = user; - } - - /** - * Converts this TspublicRestV2AdminForcelogoutRequest into string format. - * @return String representation of this class - */ - @Override - public String toString() { - return "TspublicRestV2AdminForcelogoutRequest [" + "user=" + user + "]"; - } - - /** - * Builds a new {@link TspublicRestV2AdminForcelogoutRequest.Builder} object. - * Creates the instance with the state of the current model. - * @return a new {@link TspublicRestV2AdminForcelogoutRequest.Builder} object - */ - public Builder toBuilder() { - Builder builder = new Builder() - .user(getUser()); - return builder; - } - - /** - * Class to build instances of {@link TspublicRestV2AdminForcelogoutRequest}. - */ - public static class Builder { - private List user; - - - - /** - * Setter for user. - * @param user List of NameAndIdInput value for user. - * @return Builder - */ - public Builder user(List user) { - this.user = user; - return this; - } - - /** - * Builds a new {@link TspublicRestV2AdminForcelogoutRequest} object using the set fields. - * @return {@link TspublicRestV2AdminForcelogoutRequest} - */ - public TspublicRestV2AdminForcelogoutRequest build() { - return new TspublicRestV2AdminForcelogoutRequest(user); - } - } -} diff --git a/Java/src/main/java/localhost/models/TspublicRestV2AdminResetpasswordRequest.java b/Java/src/main/java/localhost/models/TspublicRestV2AdminResetpasswordRequest.java deleted file mode 100644 index e1f10f44b..000000000 --- a/Java/src/main/java/localhost/models/TspublicRestV2AdminResetpasswordRequest.java +++ /dev/null @@ -1,187 +0,0 @@ -/* - * ThoughtSpotPublicRESTAPILib - * - * This file was automatically generated by APIMATIC v3.0 ( https://www.apimatic.io ). - */ - -package localhost.models; - -import com.fasterxml.jackson.annotation.JsonGetter; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonSetter; -import io.apimatic.core.types.BaseModel; - -/** - * This is a model class for TspublicRestV2AdminResetpasswordRequest type. - */ -public class TspublicRestV2AdminResetpasswordRequest { - private String name; - private String id; - private String newPassword; - - /** - * Default constructor. - */ - public TspublicRestV2AdminResetpasswordRequest() { - } - - /** - * Initialization constructor. - * @param newPassword String value for newPassword. - * @param name String value for name. - * @param id String value for id. - */ - public TspublicRestV2AdminResetpasswordRequest( - String newPassword, - String name, - String id) { - this.name = name; - this.id = id; - this.newPassword = newPassword; - } - - /** - * Getter for Name. - * User name of the user account - * @return Returns the String - */ - @JsonGetter("name") - @JsonInclude(JsonInclude.Include.NON_NULL) - public String getName() { - return name; - } - - /** - * Setter for Name. - * User name of the user account - * @param name Value for String - */ - @JsonSetter("name") - public void setName(String name) { - this.name = name; - } - - /** - * Getter for Id. - * The GUID of the user account to query. - * @return Returns the String - */ - @JsonGetter("id") - @JsonInclude(JsonInclude.Include.NON_NULL) - public String getId() { - return id; - } - - /** - * Setter for Id. - * The GUID of the user account to query. - * @param id Value for String - */ - @JsonSetter("id") - public void setId(String id) { - this.id = id; - } - - /** - * Getter for NewPassword. - * A new password for the user. - * @return Returns the String - */ - @JsonGetter("newPassword") - public String getNewPassword() { - return newPassword; - } - - /** - * Setter for NewPassword. - * A new password for the user. - * @param newPassword Value for String - */ - @JsonSetter("newPassword") - public void setNewPassword(String newPassword) { - this.newPassword = newPassword; - } - - /** - * Converts this TspublicRestV2AdminResetpasswordRequest into string format. - * @return String representation of this class - */ - @Override - public String toString() { - return "TspublicRestV2AdminResetpasswordRequest [" + "newPassword=" + newPassword - + ", name=" + name + ", id=" + id + "]"; - } - - /** - * Builds a new {@link TspublicRestV2AdminResetpasswordRequest.Builder} object. - * Creates the instance with the state of the current model. - * @return a new {@link TspublicRestV2AdminResetpasswordRequest.Builder} object - */ - public Builder toBuilder() { - Builder builder = new Builder(newPassword) - .name(getName()) - .id(getId()); - return builder; - } - - /** - * Class to build instances of {@link TspublicRestV2AdminResetpasswordRequest}. - */ - public static class Builder { - private String newPassword; - private String name; - private String id; - - /** - * Initialization constructor. - */ - public Builder() { - } - - /** - * Initialization constructor. - * @param newPassword String value for newPassword. - */ - public Builder(String newPassword) { - this.newPassword = newPassword; - } - - /** - * Setter for newPassword. - * @param newPassword String value for newPassword. - * @return Builder - */ - public Builder newPassword(String newPassword) { - this.newPassword = newPassword; - return this; - } - - /** - * Setter for name. - * @param name String value for name. - * @return Builder - */ - public Builder name(String name) { - this.name = name; - return this; - } - - /** - * Setter for id. - * @param id String value for id. - * @return Builder - */ - public Builder id(String id) { - this.id = id; - return this; - } - - /** - * Builds a new {@link TspublicRestV2AdminResetpasswordRequest} object using the set fields. - * @return {@link TspublicRestV2AdminResetpasswordRequest} - */ - public TspublicRestV2AdminResetpasswordRequest build() { - return new TspublicRestV2AdminResetpasswordRequest(newPassword, name, id); - } - } -} diff --git a/Java/src/main/java/localhost/models/TspublicRestV2AdminSyncprincipalRequest.java b/Java/src/main/java/localhost/models/TspublicRestV2AdminSyncprincipalRequest.java deleted file mode 100644 index 1d2be6397..000000000 --- a/Java/src/main/java/localhost/models/TspublicRestV2AdminSyncprincipalRequest.java +++ /dev/null @@ -1,255 +0,0 @@ -/* - * ThoughtSpotPublicRESTAPILib - * - * This file was automatically generated by APIMATIC v3.0 ( https://www.apimatic.io ). - */ - -package localhost.models; - -import com.fasterxml.jackson.annotation.JsonGetter; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonSetter; -import io.apimatic.core.types.BaseModel; -import java.util.List; - -/** - * This is a model class for TspublicRestV2AdminSyncprincipalRequest type. - */ -public class TspublicRestV2AdminSyncprincipalRequest { - private List principalObject; - private Boolean updateModified; - private Boolean deleteRemoved; - private String newUserPassword; - - /** - * Default constructor. - */ - public TspublicRestV2AdminSyncprincipalRequest() { - updateModified = false; - deleteRemoved = false; - } - - /** - * Initialization constructor. - * @param principalObject List of Object value for principalObject. - * @param updateModified Boolean value for updateModified. - * @param deleteRemoved Boolean value for deleteRemoved. - * @param newUserPassword String value for newUserPassword. - */ - public TspublicRestV2AdminSyncprincipalRequest( - List principalObject, - Boolean updateModified, - Boolean deleteRemoved, - String newUserPassword) { - this.principalObject = principalObject; - this.updateModified = updateModified; - this.deleteRemoved = deleteRemoved; - this.newUserPassword = newUserPassword; - } - - /** - * Getter for PrincipalObject. - * A JSON array of principal objects containing all users and groups present in the external - * system. Example: { "name": "Customer Success", "displayName": "Customer Success", - * "description": "CS", "created": 1568926267025, "modified": 1568926982242, - * "principalTypeEnum": "LOCAL_GROUP", "groupNames": [], "visibility": "DEFAULT" }, { "name": - * "test", "displayName": "test one", "created": 1587573621279, "modified": 1587573621674, - * "mail": "test2@test.com", "principalTypeEnum": "LOCAL_USER", "groupNames": [ "Administrator", - * "All" ], "visibility": "DEFAULT" } You can leave the created and modified dates blank for new - * users. You can specify if the principal is a user (LOCAL_USER) or user group (LOCAL_GROUP) in - * the principalTypeEnum keyword. Set visibility to NON_SHARABLE, if you do not want the user to - * be able to share ThoughtSpot objects with other users in this group. - * @return Returns the List of Object - */ - @JsonGetter("principalObject") - public List getPrincipalObject() { - return principalObject; - } - - /** - * Setter for PrincipalObject. - * A JSON array of principal objects containing all users and groups present in the external - * system. Example: { "name": "Customer Success", "displayName": "Customer Success", - * "description": "CS", "created": 1568926267025, "modified": 1568926982242, - * "principalTypeEnum": "LOCAL_GROUP", "groupNames": [], "visibility": "DEFAULT" }, { "name": - * "test", "displayName": "test one", "created": 1587573621279, "modified": 1587573621674, - * "mail": "test2@test.com", "principalTypeEnum": "LOCAL_USER", "groupNames": [ "Administrator", - * "All" ], "visibility": "DEFAULT" } You can leave the created and modified dates blank for new - * users. You can specify if the principal is a user (LOCAL_USER) or user group (LOCAL_GROUP) in - * the principalTypeEnum keyword. Set visibility to NON_SHARABLE, if you do not want the user to - * be able to share ThoughtSpot objects with other users in this group. - * @param principalObject Value for List of Object - */ - @JsonSetter("principalObject") - public void setPrincipalObject(List principalObject) { - this.principalObject = principalObject; - } - - /** - * Getter for UpdateModified. - * Specifies whether to apply the changes to users and groups already in the cluster based on - * the principal object list input. - * @return Returns the Boolean - */ - @JsonGetter("updateModified") - @JsonInclude(JsonInclude.Include.NON_NULL) - public Boolean getUpdateModified() { - return updateModified; - } - - /** - * Setter for UpdateModified. - * Specifies whether to apply the changes to users and groups already in the cluster based on - * the principal object list input. - * @param updateModified Value for Boolean - */ - @JsonSetter("updateModified") - public void setUpdateModified(Boolean updateModified) { - this.updateModified = updateModified; - } - - /** - * Getter for DeleteRemoved. - * Specifies whether to delete the users and groups already in the cluster if not present in the - * principal object list input. - * @return Returns the Boolean - */ - @JsonGetter("deleteRemoved") - @JsonInclude(JsonInclude.Include.NON_NULL) - public Boolean getDeleteRemoved() { - return deleteRemoved; - } - - /** - * Setter for DeleteRemoved. - * Specifies whether to delete the users and groups already in the cluster if not present in the - * principal object list input. - * @param deleteRemoved Value for Boolean - */ - @JsonSetter("deleteRemoved") - public void setDeleteRemoved(Boolean deleteRemoved) { - this.deleteRemoved = deleteRemoved; - } - - /** - * Getter for NewUserPassword. - * Assign a password for new users added during the sync operation. All new users added will - * have this password. It is mandatory to provide value for this field if new users are included - * in the input list. - * @return Returns the String - */ - @JsonGetter("newUserPassword") - @JsonInclude(JsonInclude.Include.NON_NULL) - public String getNewUserPassword() { - return newUserPassword; - } - - /** - * Setter for NewUserPassword. - * Assign a password for new users added during the sync operation. All new users added will - * have this password. It is mandatory to provide value for this field if new users are included - * in the input list. - * @param newUserPassword Value for String - */ - @JsonSetter("newUserPassword") - public void setNewUserPassword(String newUserPassword) { - this.newUserPassword = newUserPassword; - } - - /** - * Converts this TspublicRestV2AdminSyncprincipalRequest into string format. - * @return String representation of this class - */ - @Override - public String toString() { - return "TspublicRestV2AdminSyncprincipalRequest [" + "principalObject=" + principalObject - + ", updateModified=" + updateModified + ", deleteRemoved=" + deleteRemoved - + ", newUserPassword=" + newUserPassword + "]"; - } - - /** - * Builds a new {@link TspublicRestV2AdminSyncprincipalRequest.Builder} object. - * Creates the instance with the state of the current model. - * @return a new {@link TspublicRestV2AdminSyncprincipalRequest.Builder} object - */ - public Builder toBuilder() { - Builder builder = new Builder(principalObject) - .updateModified(getUpdateModified()) - .deleteRemoved(getDeleteRemoved()) - .newUserPassword(getNewUserPassword()); - return builder; - } - - /** - * Class to build instances of {@link TspublicRestV2AdminSyncprincipalRequest}. - */ - public static class Builder { - private List principalObject; - private Boolean updateModified = false; - private Boolean deleteRemoved = false; - private String newUserPassword; - - /** - * Initialization constructor. - */ - public Builder() { - } - - /** - * Initialization constructor. - * @param principalObject List of Object value for principalObject. - */ - public Builder(List principalObject) { - this.principalObject = principalObject; - } - - /** - * Setter for principalObject. - * @param principalObject List of Object value for principalObject. - * @return Builder - */ - public Builder principalObject(List principalObject) { - this.principalObject = principalObject; - return this; - } - - /** - * Setter for updateModified. - * @param updateModified Boolean value for updateModified. - * @return Builder - */ - public Builder updateModified(Boolean updateModified) { - this.updateModified = updateModified; - return this; - } - - /** - * Setter for deleteRemoved. - * @param deleteRemoved Boolean value for deleteRemoved. - * @return Builder - */ - public Builder deleteRemoved(Boolean deleteRemoved) { - this.deleteRemoved = deleteRemoved; - return this; - } - - /** - * Setter for newUserPassword. - * @param newUserPassword String value for newUserPassword. - * @return Builder - */ - public Builder newUserPassword(String newUserPassword) { - this.newUserPassword = newUserPassword; - return this; - } - - /** - * Builds a new {@link TspublicRestV2AdminSyncprincipalRequest} object using the set fields. - * @return {@link TspublicRestV2AdminSyncprincipalRequest} - */ - public TspublicRestV2AdminSyncprincipalRequest build() { - return new TspublicRestV2AdminSyncprincipalRequest(principalObject, updateModified, - deleteRemoved, newUserPassword); - } - } -} diff --git a/Java/src/main/java/localhost/models/TspublicRestV2ConnectionAddtableRequest.java b/Java/src/main/java/localhost/models/TspublicRestV2ConnectionAddtableRequest.java deleted file mode 100644 index 2a1a90cb8..000000000 --- a/Java/src/main/java/localhost/models/TspublicRestV2ConnectionAddtableRequest.java +++ /dev/null @@ -1,149 +0,0 @@ -/* - * ThoughtSpotPublicRESTAPILib - * - * This file was automatically generated by APIMATIC v3.0 ( https://www.apimatic.io ). - */ - -package localhost.models; - -import com.fasterxml.jackson.annotation.JsonGetter; -import com.fasterxml.jackson.annotation.JsonSetter; -import io.apimatic.core.types.BaseModel; -import java.util.List; - -/** - * This is a model class for TspublicRestV2ConnectionAddtableRequest type. - */ -public class TspublicRestV2ConnectionAddtableRequest { - private String id; - private List table; - - /** - * Default constructor. - */ - public TspublicRestV2ConnectionAddtableRequest() { - } - - /** - * Initialization constructor. - * @param id String value for id. - * @param table List of AddTableInput value for table. - */ - public TspublicRestV2ConnectionAddtableRequest( - String id, - List table) { - this.id = id; - this.table = table; - } - - /** - * Getter for Id. - * GUID of the connection - * @return Returns the String - */ - @JsonGetter("id") - public String getId() { - return id; - } - - /** - * Setter for Id. - * GUID of the connection - * @param id Value for String - */ - @JsonSetter("id") - public void setId(String id) { - this.id = id; - } - - /** - * Getter for Table. - * A JSON array of table details - * @return Returns the List of AddTableInput - */ - @JsonGetter("table") - public List getTable() { - return table; - } - - /** - * Setter for Table. - * A JSON array of table details - * @param table Value for List of AddTableInput - */ - @JsonSetter("table") - public void setTable(List table) { - this.table = table; - } - - /** - * Converts this TspublicRestV2ConnectionAddtableRequest into string format. - * @return String representation of this class - */ - @Override - public String toString() { - return "TspublicRestV2ConnectionAddtableRequest [" + "id=" + id + ", table=" + table + "]"; - } - - /** - * Builds a new {@link TspublicRestV2ConnectionAddtableRequest.Builder} object. - * Creates the instance with the state of the current model. - * @return a new {@link TspublicRestV2ConnectionAddtableRequest.Builder} object - */ - public Builder toBuilder() { - Builder builder = new Builder(id, table); - return builder; - } - - /** - * Class to build instances of {@link TspublicRestV2ConnectionAddtableRequest}. - */ - public static class Builder { - private String id; - private List table; - - /** - * Initialization constructor. - */ - public Builder() { - } - - /** - * Initialization constructor. - * @param id String value for id. - * @param table List of AddTableInput value for table. - */ - public Builder(String id, List table) { - this.id = id; - this.table = table; - } - - /** - * Setter for id. - * @param id String value for id. - * @return Builder - */ - public Builder id(String id) { - this.id = id; - return this; - } - - /** - * Setter for table. - * @param table List of AddTableInput value for table. - * @return Builder - */ - public Builder table(List table) { - this.table = table; - return this; - } - - /** - * Builds a new {@link TspublicRestV2ConnectionAddtableRequest} object using the set fields. - * @return {@link TspublicRestV2ConnectionAddtableRequest} - */ - public TspublicRestV2ConnectionAddtableRequest build() { - return new TspublicRestV2ConnectionAddtableRequest(id, table); - } - } -} diff --git a/Java/src/main/java/localhost/models/TspublicRestV2ConnectionCreateRequest.java b/Java/src/main/java/localhost/models/TspublicRestV2ConnectionCreateRequest.java deleted file mode 100644 index 49e960732..000000000 --- a/Java/src/main/java/localhost/models/TspublicRestV2ConnectionCreateRequest.java +++ /dev/null @@ -1,227 +0,0 @@ -/* - * ThoughtSpotPublicRESTAPILib - * - * This file was automatically generated by APIMATIC v3.0 ( https://www.apimatic.io ). - */ - -package localhost.models; - -import com.fasterxml.jackson.annotation.JsonGetter; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonSetter; -import io.apimatic.core.types.BaseModel; - -/** - * This is a model class for TspublicRestV2ConnectionCreateRequest type. - */ -public class TspublicRestV2ConnectionCreateRequest { - private Type14Enum type; - private String name; - private String description; - private String configuration; - - /** - * Default constructor. - */ - public TspublicRestV2ConnectionCreateRequest() { - } - - /** - * Initialization constructor. - * @param type Type14Enum value for type. - * @param name String value for name. - * @param configuration String value for configuration. - * @param description String value for description. - */ - public TspublicRestV2ConnectionCreateRequest( - Type14Enum type, - String name, - String configuration, - String description) { - this.type = type; - this.name = name; - this.description = description; - this.configuration = configuration; - } - - /** - * Getter for Type. - * Type of the data connection. - * @return Returns the Type14Enum - */ - @JsonGetter("type") - public Type14Enum getType() { - return type; - } - - /** - * Setter for Type. - * Type of the data connection. - * @param type Value for Type14Enum - */ - @JsonSetter("type") - public void setType(Type14Enum type) { - this.type = type; - } - - /** - * Getter for Name. - * Name of the connection - * @return Returns the String - */ - @JsonGetter("name") - public String getName() { - return name; - } - - /** - * Setter for Name. - * Name of the connection - * @param name Value for String - */ - @JsonSetter("name") - public void setName(String name) { - this.name = name; - } - - /** - * Getter for Description. - * A short description of the connection. - * @return Returns the String - */ - @JsonGetter("description") - @JsonInclude(JsonInclude.Include.NON_NULL) - public String getDescription() { - return description; - } - - /** - * Setter for Description. - * A short description of the connection. - * @param description Value for String - */ - @JsonSetter("description") - public void setDescription(String description) { - this.description = description; - } - - /** - * Getter for Configuration. - * A JSON object of the connection metadata. The metadata must include configuration attributes - * required to create the connection. - * @return Returns the String - */ - @JsonGetter("configuration") - public String getConfiguration() { - return configuration; - } - - /** - * Setter for Configuration. - * A JSON object of the connection metadata. The metadata must include configuration attributes - * required to create the connection. - * @param configuration Value for String - */ - @JsonSetter("configuration") - public void setConfiguration(String configuration) { - this.configuration = configuration; - } - - /** - * Converts this TspublicRestV2ConnectionCreateRequest into string format. - * @return String representation of this class - */ - @Override - public String toString() { - return "TspublicRestV2ConnectionCreateRequest [" + "type=" + type + ", name=" + name - + ", configuration=" + configuration + ", description=" + description + "]"; - } - - /** - * Builds a new {@link TspublicRestV2ConnectionCreateRequest.Builder} object. - * Creates the instance with the state of the current model. - * @return a new {@link TspublicRestV2ConnectionCreateRequest.Builder} object - */ - public Builder toBuilder() { - Builder builder = new Builder(type, name, configuration) - .description(getDescription()); - return builder; - } - - /** - * Class to build instances of {@link TspublicRestV2ConnectionCreateRequest}. - */ - public static class Builder { - private Type14Enum type; - private String name; - private String configuration; - private String description; - - /** - * Initialization constructor. - */ - public Builder() { - } - - /** - * Initialization constructor. - * @param type Type14Enum value for type. - * @param name String value for name. - * @param configuration String value for configuration. - */ - public Builder(Type14Enum type, String name, String configuration) { - this.type = type; - this.name = name; - this.configuration = configuration; - } - - /** - * Setter for type. - * @param type Type14Enum value for type. - * @return Builder - */ - public Builder type(Type14Enum type) { - this.type = type; - return this; - } - - /** - * Setter for name. - * @param name String value for name. - * @return Builder - */ - public Builder name(String name) { - this.name = name; - return this; - } - - /** - * Setter for configuration. - * @param configuration String value for configuration. - * @return Builder - */ - public Builder configuration(String configuration) { - this.configuration = configuration; - return this; - } - - /** - * Setter for description. - * @param description String value for description. - * @return Builder - */ - public Builder description(String description) { - this.description = description; - return this; - } - - /** - * Builds a new {@link TspublicRestV2ConnectionCreateRequest} object using the set fields. - * @return {@link TspublicRestV2ConnectionCreateRequest} - */ - public TspublicRestV2ConnectionCreateRequest build() { - return new TspublicRestV2ConnectionCreateRequest(type, name, configuration, - description); - } - } -} diff --git a/Java/src/main/java/localhost/models/TspublicRestV2ConnectionRemovetableRequest.java b/Java/src/main/java/localhost/models/TspublicRestV2ConnectionRemovetableRequest.java deleted file mode 100644 index eeb13d587..000000000 --- a/Java/src/main/java/localhost/models/TspublicRestV2ConnectionRemovetableRequest.java +++ /dev/null @@ -1,153 +0,0 @@ -/* - * ThoughtSpotPublicRESTAPILib - * - * This file was automatically generated by APIMATIC v3.0 ( https://www.apimatic.io ). - */ - -package localhost.models; - -import com.fasterxml.jackson.annotation.JsonGetter; -import com.fasterxml.jackson.annotation.JsonSetter; -import io.apimatic.core.types.BaseModel; -import java.util.List; - -/** - * This is a model class for TspublicRestV2ConnectionRemovetableRequest type. - */ -public class TspublicRestV2ConnectionRemovetableRequest { - private String id; - private List table; - - /** - * Default constructor. - */ - public TspublicRestV2ConnectionRemovetableRequest() { - } - - /** - * Initialization constructor. - * @param id String value for id. - * @param table List of TableInput value for table. - */ - public TspublicRestV2ConnectionRemovetableRequest( - String id, - List table) { - this.id = id; - this.table = table; - } - - /** - * Getter for Id. - * GUID of the connection - * @return Returns the String - */ - @JsonGetter("id") - public String getId() { - return id; - } - - /** - * Setter for Id. - * GUID of the connection - * @param id Value for String - */ - @JsonSetter("id") - public void setId(String id) { - this.id = id; - } - - /** - * Getter for Table. - * A JSON array of name or GUIDs of the table or both. At least one input is required. Provide - * either table name or id. When both are given then id is considered - * @return Returns the List of TableInput - */ - @JsonGetter("table") - public List getTable() { - return table; - } - - /** - * Setter for Table. - * A JSON array of name or GUIDs of the table or both. At least one input is required. Provide - * either table name or id. When both are given then id is considered - * @param table Value for List of TableInput - */ - @JsonSetter("table") - public void setTable(List table) { - this.table = table; - } - - /** - * Converts this TspublicRestV2ConnectionRemovetableRequest into string format. - * @return String representation of this class - */ - @Override - public String toString() { - return "TspublicRestV2ConnectionRemovetableRequest [" + "id=" + id + ", table=" + table - + "]"; - } - - /** - * Builds a new {@link TspublicRestV2ConnectionRemovetableRequest.Builder} object. - * Creates the instance with the state of the current model. - * @return a new {@link TspublicRestV2ConnectionRemovetableRequest.Builder} object - */ - public Builder toBuilder() { - Builder builder = new Builder(id, table); - return builder; - } - - /** - * Class to build instances of {@link TspublicRestV2ConnectionRemovetableRequest}. - */ - public static class Builder { - private String id; - private List table; - - /** - * Initialization constructor. - */ - public Builder() { - } - - /** - * Initialization constructor. - * @param id String value for id. - * @param table List of TableInput value for table. - */ - public Builder(String id, List table) { - this.id = id; - this.table = table; - } - - /** - * Setter for id. - * @param id String value for id. - * @return Builder - */ - public Builder id(String id) { - this.id = id; - return this; - } - - /** - * Setter for table. - * @param table List of TableInput value for table. - * @return Builder - */ - public Builder table(List table) { - this.table = table; - return this; - } - - /** - * Builds a new {@link TspublicRestV2ConnectionRemovetableRequest} object using the set - * fields. - * @return {@link TspublicRestV2ConnectionRemovetableRequest} - */ - public TspublicRestV2ConnectionRemovetableRequest build() { - return new TspublicRestV2ConnectionRemovetableRequest(id, table); - } - } -} diff --git a/Java/src/main/java/localhost/models/TspublicRestV2ConnectionSearchRequest.java b/Java/src/main/java/localhost/models/TspublicRestV2ConnectionSearchRequest.java deleted file mode 100644 index 24070e61e..000000000 --- a/Java/src/main/java/localhost/models/TspublicRestV2ConnectionSearchRequest.java +++ /dev/null @@ -1,472 +0,0 @@ -/* - * ThoughtSpotPublicRESTAPILib - * - * This file was automatically generated by APIMATIC v3.0 ( https://www.apimatic.io ). - */ - -package localhost.models; - -import com.fasterxml.jackson.annotation.JsonGetter; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonSetter; -import io.apimatic.core.types.BaseModel; -import java.util.List; - -/** - * This is a model class for TspublicRestV2ConnectionSearchRequest type. - */ -public class TspublicRestV2ConnectionSearchRequest { - private Integer offset; - private Integer batchNumber; - private Integer batchSize; - private SortBy1Enum sortBy; - private SortOrder1Enum sortOrder; - private Type15Enum type; - private String namePattern; - private List fetchId; - private List skipId; - private List tag; - - /** - * Default constructor. - */ - public TspublicRestV2ConnectionSearchRequest() { - offset = 0; - batchNumber = -1; - batchSize = -1; - sortBy = SortBy1Enum.DEFAULT; - } - - /** - * Initialization constructor. - * @param type Type15Enum value for type. - * @param offset Integer value for offset. - * @param batchNumber Integer value for batchNumber. - * @param batchSize Integer value for batchSize. - * @param sortBy SortBy1Enum value for sortBy. - * @param sortOrder SortOrder1Enum value for sortOrder. - * @param namePattern String value for namePattern. - * @param fetchId List of String value for fetchId. - * @param skipId List of String value for skipId. - * @param tag List of TagNameAndIdInput value for tag. - */ - public TspublicRestV2ConnectionSearchRequest( - Type15Enum type, - Integer offset, - Integer batchNumber, - Integer batchSize, - SortBy1Enum sortBy, - SortOrder1Enum sortOrder, - String namePattern, - List fetchId, - List skipId, - List tag) { - this.offset = offset; - this.batchNumber = batchNumber; - this.batchSize = batchSize; - this.sortBy = sortBy; - this.sortOrder = sortOrder; - this.type = type; - this.namePattern = namePattern; - this.fetchId = fetchId; - this.skipId = skipId; - this.tag = tag; - } - - /** - * Getter for Offset. - * The offset point, starting from where the records should be included in the response. If no - * input is provided then offset starts from 0 - * @return Returns the Integer - */ - @JsonGetter("offset") - @JsonInclude(JsonInclude.Include.NON_NULL) - public Integer getOffset() { - return offset; - } - - /** - * Setter for Offset. - * The offset point, starting from where the records should be included in the response. If no - * input is provided then offset starts from 0 - * @param offset Value for Integer - */ - @JsonSetter("offset") - public void setOffset(Integer offset) { - this.offset = offset; - } - - /** - * Getter for BatchNumber. - * An alternate way to set offset for the starting point of the response. Offset field should be - * kept blank to use the value from this field. Offset value will be calculated as (batchNumber - * - 1) * batchSize. It is mandatory to provide a value for batchSize with batchNumber. Example: - * Assume response has 100 records. Now, batchNumber is set as 2 and batchSize as 10, then - * offset value will be 10. So, 10 records starting from 11th record will be considered. - * @return Returns the Integer - */ - @JsonGetter("batchNumber") - @JsonInclude(JsonInclude.Include.NON_NULL) - public Integer getBatchNumber() { - return batchNumber; - } - - /** - * Setter for BatchNumber. - * An alternate way to set offset for the starting point of the response. Offset field should be - * kept blank to use the value from this field. Offset value will be calculated as (batchNumber - * - 1) * batchSize. It is mandatory to provide a value for batchSize with batchNumber. Example: - * Assume response has 100 records. Now, batchNumber is set as 2 and batchSize as 10, then - * offset value will be 10. So, 10 records starting from 11th record will be considered. - * @param batchNumber Value for Integer - */ - @JsonSetter("batchNumber") - public void setBatchNumber(Integer batchNumber) { - this.batchNumber = batchNumber; - } - - /** - * Getter for BatchSize. - * The number of records that should be included in the response starting from offset position. - * If no input is provided, then all records starting from the value provided in offset is - * included in the response. - * @return Returns the Integer - */ - @JsonGetter("batchSize") - @JsonInclude(JsonInclude.Include.NON_NULL) - public Integer getBatchSize() { - return batchSize; - } - - /** - * Setter for BatchSize. - * The number of records that should be included in the response starting from offset position. - * If no input is provided, then all records starting from the value provided in offset is - * included in the response. - * @param batchSize Value for Integer - */ - @JsonSetter("batchSize") - public void setBatchSize(Integer batchSize) { - this.batchSize = batchSize; - } - - /** - * Getter for SortBy. - * Field based on which the re.sponse needs to be ordered. Valid values - * @return Returns the SortBy1Enum - */ - @JsonGetter("sortBy") - @JsonInclude(JsonInclude.Include.NON_NULL) - public SortBy1Enum getSortBy() { - return sortBy; - } - - /** - * Setter for SortBy. - * Field based on which the re.sponse needs to be ordered. Valid values - * @param sortBy Value for SortBy1Enum - */ - @JsonSetter("sortBy") - public void setSortBy(SortBy1Enum sortBy) { - this.sortBy = sortBy; - } - - /** - * Getter for SortOrder. - * Order in which sortBy should be applied. Valid values - * @return Returns the SortOrder1Enum - */ - @JsonGetter("sortOrder") - @JsonInclude(JsonInclude.Include.NON_NULL) - public SortOrder1Enum getSortOrder() { - return sortOrder; - } - - /** - * Setter for SortOrder. - * Order in which sortBy should be applied. Valid values - * @param sortOrder Value for SortOrder1Enum - */ - @JsonSetter("sortOrder") - public void setSortOrder(SortOrder1Enum sortOrder) { - this.sortOrder = sortOrder; - } - - /** - * Getter for Type. - * Type of the connect being searched. Valid values: - * SNOWFLAKE|AMAZON_REDSHIFT|GOOGLE_BIGQUERY|AZURE_SYNAPSE|TERADATA|STARBURST|SAP_HANA|ORACLE_ADW|DATABRICKS|DENODO - * @return Returns the Type15Enum - */ - @JsonGetter("type") - public Type15Enum getType() { - return type; - } - - /** - * Setter for Type. - * Type of the connect being searched. Valid values: - * SNOWFLAKE|AMAZON_REDSHIFT|GOOGLE_BIGQUERY|AZURE_SYNAPSE|TERADATA|STARBURST|SAP_HANA|ORACLE_ADW|DATABRICKS|DENODO - * @param type Value for Type15Enum - */ - @JsonSetter("type") - public void setType(Type15Enum type) { - this.type = type; - } - - /** - * Getter for NamePattern. - * A pattern to match the name of the connection. This parameter supports matching - * case-insensitive strings. For a wildcard match, use %. - * @return Returns the String - */ - @JsonGetter("namePattern") - @JsonInclude(JsonInclude.Include.NON_NULL) - public String getNamePattern() { - return namePattern; - } - - /** - * Setter for NamePattern. - * A pattern to match the name of the connection. This parameter supports matching - * case-insensitive strings. For a wildcard match, use %. - * @param namePattern Value for String - */ - @JsonSetter("namePattern") - public void setNamePattern(String namePattern) { - this.namePattern = namePattern; - } - - /** - * Getter for FetchId. - * A JSON array containing the GUIDs of the connections that you want to fetch. - * @return Returns the List of String - */ - @JsonGetter("fetchId") - @JsonInclude(JsonInclude.Include.NON_NULL) - public List getFetchId() { - return fetchId; - } - - /** - * Setter for FetchId. - * A JSON array containing the GUIDs of the connections that you want to fetch. - * @param fetchId Value for List of String - */ - @JsonSetter("fetchId") - public void setFetchId(List fetchId) { - this.fetchId = fetchId; - } - - /** - * Getter for SkipId. - * A JSON array containing the GUIDs of the connections that you want to skip. - * @return Returns the List of String - */ - @JsonGetter("skipId") - @JsonInclude(JsonInclude.Include.NON_NULL) - public List getSkipId() { - return skipId; - } - - /** - * Setter for SkipId. - * A JSON array containing the GUIDs of the connections that you want to skip. - * @param skipId Value for List of String - */ - @JsonSetter("skipId") - public void setSkipId(List skipId) { - this.skipId = skipId; - } - - /** - * Getter for Tag. - * A JSON array of name or GUID of tags or both. When both are given then id is considered - * @return Returns the List of TagNameAndIdInput - */ - @JsonGetter("tag") - @JsonInclude(JsonInclude.Include.NON_NULL) - public List getTag() { - return tag; - } - - /** - * Setter for Tag. - * A JSON array of name or GUID of tags or both. When both are given then id is considered - * @param tag Value for List of TagNameAndIdInput - */ - @JsonSetter("tag") - public void setTag(List tag) { - this.tag = tag; - } - - /** - * Converts this TspublicRestV2ConnectionSearchRequest into string format. - * @return String representation of this class - */ - @Override - public String toString() { - return "TspublicRestV2ConnectionSearchRequest [" + "type=" + type + ", offset=" + offset - + ", batchNumber=" + batchNumber + ", batchSize=" + batchSize + ", sortBy=" + sortBy - + ", sortOrder=" + sortOrder + ", namePattern=" + namePattern + ", fetchId=" - + fetchId + ", skipId=" + skipId + ", tag=" + tag + "]"; - } - - /** - * Builds a new {@link TspublicRestV2ConnectionSearchRequest.Builder} object. - * Creates the instance with the state of the current model. - * @return a new {@link TspublicRestV2ConnectionSearchRequest.Builder} object - */ - public Builder toBuilder() { - Builder builder = new Builder(type) - .offset(getOffset()) - .batchNumber(getBatchNumber()) - .batchSize(getBatchSize()) - .sortBy(getSortBy()) - .sortOrder(getSortOrder()) - .namePattern(getNamePattern()) - .fetchId(getFetchId()) - .skipId(getSkipId()) - .tag(getTag()); - return builder; - } - - /** - * Class to build instances of {@link TspublicRestV2ConnectionSearchRequest}. - */ - public static class Builder { - private Type15Enum type; - private Integer offset = 0; - private Integer batchNumber = -1; - private Integer batchSize = -1; - private SortBy1Enum sortBy = SortBy1Enum.DEFAULT; - private SortOrder1Enum sortOrder; - private String namePattern; - private List fetchId; - private List skipId; - private List tag; - - /** - * Initialization constructor. - */ - public Builder() { - } - - /** - * Initialization constructor. - * @param type Type15Enum value for type. - */ - public Builder(Type15Enum type) { - this.type = type; - } - - /** - * Setter for type. - * @param type Type15Enum value for type. - * @return Builder - */ - public Builder type(Type15Enum type) { - this.type = type; - return this; - } - - /** - * Setter for offset. - * @param offset Integer value for offset. - * @return Builder - */ - public Builder offset(Integer offset) { - this.offset = offset; - return this; - } - - /** - * Setter for batchNumber. - * @param batchNumber Integer value for batchNumber. - * @return Builder - */ - public Builder batchNumber(Integer batchNumber) { - this.batchNumber = batchNumber; - return this; - } - - /** - * Setter for batchSize. - * @param batchSize Integer value for batchSize. - * @return Builder - */ - public Builder batchSize(Integer batchSize) { - this.batchSize = batchSize; - return this; - } - - /** - * Setter for sortBy. - * @param sortBy SortBy1Enum value for sortBy. - * @return Builder - */ - public Builder sortBy(SortBy1Enum sortBy) { - this.sortBy = sortBy; - return this; - } - - /** - * Setter for sortOrder. - * @param sortOrder SortOrder1Enum value for sortOrder. - * @return Builder - */ - public Builder sortOrder(SortOrder1Enum sortOrder) { - this.sortOrder = sortOrder; - return this; - } - - /** - * Setter for namePattern. - * @param namePattern String value for namePattern. - * @return Builder - */ - public Builder namePattern(String namePattern) { - this.namePattern = namePattern; - return this; - } - - /** - * Setter for fetchId. - * @param fetchId List of String value for fetchId. - * @return Builder - */ - public Builder fetchId(List fetchId) { - this.fetchId = fetchId; - return this; - } - - /** - * Setter for skipId. - * @param skipId List of String value for skipId. - * @return Builder - */ - public Builder skipId(List skipId) { - this.skipId = skipId; - return this; - } - - /** - * Setter for tag. - * @param tag List of TagNameAndIdInput value for tag. - * @return Builder - */ - public Builder tag(List tag) { - this.tag = tag; - return this; - } - - /** - * Builds a new {@link TspublicRestV2ConnectionSearchRequest} object using the set fields. - * @return {@link TspublicRestV2ConnectionSearchRequest} - */ - public TspublicRestV2ConnectionSearchRequest build() { - return new TspublicRestV2ConnectionSearchRequest(type, offset, batchNumber, batchSize, - sortBy, sortOrder, namePattern, fetchId, skipId, tag); - } - } -} diff --git a/Java/src/main/java/localhost/models/TspublicRestV2ConnectionTableRequest.java b/Java/src/main/java/localhost/models/TspublicRestV2ConnectionTableRequest.java deleted file mode 100644 index 9bf1bec91..000000000 --- a/Java/src/main/java/localhost/models/TspublicRestV2ConnectionTableRequest.java +++ /dev/null @@ -1,198 +0,0 @@ -/* - * ThoughtSpotPublicRESTAPILib - * - * This file was automatically generated by APIMATIC v3.0 ( https://www.apimatic.io ). - */ - -package localhost.models; - -import com.fasterxml.jackson.annotation.JsonGetter; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonSetter; -import io.apimatic.core.types.BaseModel; - -/** - * This is a model class for TspublicRestV2ConnectionTableRequest type. - */ -public class TspublicRestV2ConnectionTableRequest { - private String id; - private String configuration; - private Boolean includeColumn; - - /** - * Default constructor. - */ - public TspublicRestV2ConnectionTableRequest() { - includeColumn = true; - } - - /** - * Initialization constructor. - * @param id String value for id. - * @param configuration String value for configuration. - * @param includeColumn Boolean value for includeColumn. - */ - public TspublicRestV2ConnectionTableRequest( - String id, - String configuration, - Boolean includeColumn) { - this.id = id; - this.configuration = configuration; - this.includeColumn = includeColumn; - } - - /** - * Getter for Id. - * The GUID of the connection - * @return Returns the String - */ - @JsonGetter("id") - public String getId() { - return id; - } - - /** - * Setter for Id. - * The GUID of the connection - * @param id Value for String - */ - @JsonSetter("id") - public void setId(String id) { - this.id = id; - } - - /** - * Getter for Configuration. - * A JSON object of the connection metadata. If this field is left empty, then the configuration - * saved in the connection is considered. To get the tables based on a different configuration, - * include required attributes in the connection configuration JSON. Example: Get tables from - * Snowflake with a different user account than specified in the connection: - * {"user":"test_user","password":"test_pwd","role":"test_role"} Get tables from Redshift for - * different database than specified in the connection: {"database":"test_db"} - * @return Returns the String - */ - @JsonGetter("configuration") - @JsonInclude(JsonInclude.Include.NON_NULL) - public String getConfiguration() { - return configuration; - } - - /** - * Setter for Configuration. - * A JSON object of the connection metadata. If this field is left empty, then the configuration - * saved in the connection is considered. To get the tables based on a different configuration, - * include required attributes in the connection configuration JSON. Example: Get tables from - * Snowflake with a different user account than specified in the connection: - * {"user":"test_user","password":"test_pwd","role":"test_role"} Get tables from Redshift for - * different database than specified in the connection: {"database":"test_db"} - * @param configuration Value for String - */ - @JsonSetter("configuration") - public void setConfiguration(String configuration) { - this.configuration = configuration; - } - - /** - * Getter for IncludeColumn. - * When set to true, the response will include column level details as well - * @return Returns the Boolean - */ - @JsonGetter("includeColumn") - @JsonInclude(JsonInclude.Include.NON_NULL) - public Boolean getIncludeColumn() { - return includeColumn; - } - - /** - * Setter for IncludeColumn. - * When set to true, the response will include column level details as well - * @param includeColumn Value for Boolean - */ - @JsonSetter("includeColumn") - public void setIncludeColumn(Boolean includeColumn) { - this.includeColumn = includeColumn; - } - - /** - * Converts this TspublicRestV2ConnectionTableRequest into string format. - * @return String representation of this class - */ - @Override - public String toString() { - return "TspublicRestV2ConnectionTableRequest [" + "id=" + id + ", configuration=" - + configuration + ", includeColumn=" + includeColumn + "]"; - } - - /** - * Builds a new {@link TspublicRestV2ConnectionTableRequest.Builder} object. - * Creates the instance with the state of the current model. - * @return a new {@link TspublicRestV2ConnectionTableRequest.Builder} object - */ - public Builder toBuilder() { - Builder builder = new Builder(id) - .configuration(getConfiguration()) - .includeColumn(getIncludeColumn()); - return builder; - } - - /** - * Class to build instances of {@link TspublicRestV2ConnectionTableRequest}. - */ - public static class Builder { - private String id; - private String configuration; - private Boolean includeColumn = true; - - /** - * Initialization constructor. - */ - public Builder() { - } - - /** - * Initialization constructor. - * @param id String value for id. - */ - public Builder(String id) { - this.id = id; - } - - /** - * Setter for id. - * @param id String value for id. - * @return Builder - */ - public Builder id(String id) { - this.id = id; - return this; - } - - /** - * Setter for configuration. - * @param configuration String value for configuration. - * @return Builder - */ - public Builder configuration(String configuration) { - this.configuration = configuration; - return this; - } - - /** - * Setter for includeColumn. - * @param includeColumn Boolean value for includeColumn. - * @return Builder - */ - public Builder includeColumn(Boolean includeColumn) { - this.includeColumn = includeColumn; - return this; - } - - /** - * Builds a new {@link TspublicRestV2ConnectionTableRequest} object using the set fields. - * @return {@link TspublicRestV2ConnectionTableRequest} - */ - public TspublicRestV2ConnectionTableRequest build() { - return new TspublicRestV2ConnectionTableRequest(id, configuration, includeColumn); - } - } -} diff --git a/Java/src/main/java/localhost/models/TspublicRestV2ConnectionTablecoloumnRequest.java b/Java/src/main/java/localhost/models/TspublicRestV2ConnectionTablecoloumnRequest.java deleted file mode 100644 index d87bb35f2..000000000 --- a/Java/src/main/java/localhost/models/TspublicRestV2ConnectionTablecoloumnRequest.java +++ /dev/null @@ -1,199 +0,0 @@ -/* - * ThoughtSpotPublicRESTAPILib - * - * This file was automatically generated by APIMATIC v3.0 ( https://www.apimatic.io ). - */ - -package localhost.models; - -import com.fasterxml.jackson.annotation.JsonGetter; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonSetter; -import io.apimatic.core.types.BaseModel; -import java.util.List; - -/** - * This is a model class for TspublicRestV2ConnectionTablecoloumnRequest type. - */ -public class TspublicRestV2ConnectionTablecoloumnRequest { - private String id; - private String configuration; - private List table; - - /** - * Default constructor. - */ - public TspublicRestV2ConnectionTablecoloumnRequest() { - } - - /** - * Initialization constructor. - * @param id String value for id. - * @param table List of ConnectionTableColumnsInput value for table. - * @param configuration String value for configuration. - */ - public TspublicRestV2ConnectionTablecoloumnRequest( - String id, - List table, - String configuration) { - this.id = id; - this.configuration = configuration; - this.table = table; - } - - /** - * Getter for Id. - * The GUID of the connection - * @return Returns the String - */ - @JsonGetter("id") - public String getId() { - return id; - } - - /** - * Setter for Id. - * The GUID of the connection - * @param id Value for String - */ - @JsonSetter("id") - public void setId(String id) { - this.id = id; - } - - /** - * Getter for Configuration. - * A JSON object of the connection metadata. If this field is left empty, then the configuration - * saved in the connection is considered. To get the tables based on a different configuration, - * include required attributes in the connection configuration JSON. Example: Get tables from - * Snowflake with a different user account than specified in the connection: - * {"user":"test_user","password":"test_pwd","role":"test_role"} Get tables from Redshift for - * different database than specified in the connection: {"database":"test_db"} - * @return Returns the String - */ - @JsonGetter("configuration") - @JsonInclude(JsonInclude.Include.NON_NULL) - public String getConfiguration() { - return configuration; - } - - /** - * Setter for Configuration. - * A JSON object of the connection metadata. If this field is left empty, then the configuration - * saved in the connection is considered. To get the tables based on a different configuration, - * include required attributes in the connection configuration JSON. Example: Get tables from - * Snowflake with a different user account than specified in the connection: - * {"user":"test_user","password":"test_pwd","role":"test_role"} Get tables from Redshift for - * different database than specified in the connection: {"database":"test_db"} - * @param configuration Value for String - */ - @JsonSetter("configuration") - public void setConfiguration(String configuration) { - this.configuration = configuration; - } - - /** - * Getter for Table. - * List of table details - * @return Returns the List of ConnectionTableColumnsInput - */ - @JsonGetter("table") - public List getTable() { - return table; - } - - /** - * Setter for Table. - * List of table details - * @param table Value for List of ConnectionTableColumnsInput - */ - @JsonSetter("table") - public void setTable(List table) { - this.table = table; - } - - /** - * Converts this TspublicRestV2ConnectionTablecoloumnRequest into string format. - * @return String representation of this class - */ - @Override - public String toString() { - return "TspublicRestV2ConnectionTablecoloumnRequest [" + "id=" + id + ", table=" + table - + ", configuration=" + configuration + "]"; - } - - /** - * Builds a new {@link TspublicRestV2ConnectionTablecoloumnRequest.Builder} object. - * Creates the instance with the state of the current model. - * @return a new {@link TspublicRestV2ConnectionTablecoloumnRequest.Builder} object - */ - public Builder toBuilder() { - Builder builder = new Builder(id, table) - .configuration(getConfiguration()); - return builder; - } - - /** - * Class to build instances of {@link TspublicRestV2ConnectionTablecoloumnRequest}. - */ - public static class Builder { - private String id; - private List table; - private String configuration; - - /** - * Initialization constructor. - */ - public Builder() { - } - - /** - * Initialization constructor. - * @param id String value for id. - * @param table List of ConnectionTableColumnsInput value for table. - */ - public Builder(String id, List table) { - this.id = id; - this.table = table; - } - - /** - * Setter for id. - * @param id String value for id. - * @return Builder - */ - public Builder id(String id) { - this.id = id; - return this; - } - - /** - * Setter for table. - * @param table List of ConnectionTableColumnsInput value for table. - * @return Builder - */ - public Builder table(List table) { - this.table = table; - return this; - } - - /** - * Setter for configuration. - * @param configuration String value for configuration. - * @return Builder - */ - public Builder configuration(String configuration) { - this.configuration = configuration; - return this; - } - - /** - * Builds a new {@link TspublicRestV2ConnectionTablecoloumnRequest} object using the set - * fields. - * @return {@link TspublicRestV2ConnectionTablecoloumnRequest} - */ - public TspublicRestV2ConnectionTablecoloumnRequest build() { - return new TspublicRestV2ConnectionTablecoloumnRequest(id, table, configuration); - } - } -} diff --git a/Java/src/main/java/localhost/models/TspublicRestV2ConnectionUpdateRequest.java b/Java/src/main/java/localhost/models/TspublicRestV2ConnectionUpdateRequest.java deleted file mode 100644 index 2bac8c528..000000000 --- a/Java/src/main/java/localhost/models/TspublicRestV2ConnectionUpdateRequest.java +++ /dev/null @@ -1,226 +0,0 @@ -/* - * ThoughtSpotPublicRESTAPILib - * - * This file was automatically generated by APIMATIC v3.0 ( https://www.apimatic.io ). - */ - -package localhost.models; - -import com.fasterxml.jackson.annotation.JsonGetter; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonSetter; -import io.apimatic.core.types.BaseModel; - -/** - * This is a model class for TspublicRestV2ConnectionUpdateRequest type. - */ -public class TspublicRestV2ConnectionUpdateRequest { - private String id; - private String name; - private String description; - private String configuration; - - /** - * Default constructor. - */ - public TspublicRestV2ConnectionUpdateRequest() { - } - - /** - * Initialization constructor. - * @param id String value for id. - * @param configuration String value for configuration. - * @param name String value for name. - * @param description String value for description. - */ - public TspublicRestV2ConnectionUpdateRequest( - String id, - String configuration, - String name, - String description) { - this.id = id; - this.name = name; - this.description = description; - this.configuration = configuration; - } - - /** - * Getter for Id. - * GUID of the connection - * @return Returns the String - */ - @JsonGetter("id") - public String getId() { - return id; - } - - /** - * Setter for Id. - * GUID of the connection - * @param id Value for String - */ - @JsonSetter("id") - public void setId(String id) { - this.id = id; - } - - /** - * Getter for Name. - * The text to update the name of the connection. - * @return Returns the String - */ - @JsonGetter("name") - @JsonInclude(JsonInclude.Include.NON_NULL) - public String getName() { - return name; - } - - /** - * Setter for Name. - * The text to update the name of the connection. - * @param name Value for String - */ - @JsonSetter("name") - public void setName(String name) { - this.name = name; - } - - /** - * Getter for Description. - * The text to update the description of the connection. - * @return Returns the String - */ - @JsonGetter("description") - @JsonInclude(JsonInclude.Include.NON_NULL) - public String getDescription() { - return description; - } - - /** - * Setter for Description. - * The text to update the description of the connection. - * @param description Value for String - */ - @JsonSetter("description") - public void setDescription(String description) { - this.description = description; - } - - /** - * Getter for Configuration. - * A JSON object of the connection metadata. Include all the configuration attributes with - * original value along with the changes required to any attribute. - * @return Returns the String - */ - @JsonGetter("configuration") - public String getConfiguration() { - return configuration; - } - - /** - * Setter for Configuration. - * A JSON object of the connection metadata. Include all the configuration attributes with - * original value along with the changes required to any attribute. - * @param configuration Value for String - */ - @JsonSetter("configuration") - public void setConfiguration(String configuration) { - this.configuration = configuration; - } - - /** - * Converts this TspublicRestV2ConnectionUpdateRequest into string format. - * @return String representation of this class - */ - @Override - public String toString() { - return "TspublicRestV2ConnectionUpdateRequest [" + "id=" + id + ", configuration=" - + configuration + ", name=" + name + ", description=" + description + "]"; - } - - /** - * Builds a new {@link TspublicRestV2ConnectionUpdateRequest.Builder} object. - * Creates the instance with the state of the current model. - * @return a new {@link TspublicRestV2ConnectionUpdateRequest.Builder} object - */ - public Builder toBuilder() { - Builder builder = new Builder(id, configuration) - .name(getName()) - .description(getDescription()); - return builder; - } - - /** - * Class to build instances of {@link TspublicRestV2ConnectionUpdateRequest}. - */ - public static class Builder { - private String id; - private String configuration; - private String name; - private String description; - - /** - * Initialization constructor. - */ - public Builder() { - } - - /** - * Initialization constructor. - * @param id String value for id. - * @param configuration String value for configuration. - */ - public Builder(String id, String configuration) { - this.id = id; - this.configuration = configuration; - } - - /** - * Setter for id. - * @param id String value for id. - * @return Builder - */ - public Builder id(String id) { - this.id = id; - return this; - } - - /** - * Setter for configuration. - * @param configuration String value for configuration. - * @return Builder - */ - public Builder configuration(String configuration) { - this.configuration = configuration; - return this; - } - - /** - * Setter for name. - * @param name String value for name. - * @return Builder - */ - public Builder name(String name) { - this.name = name; - return this; - } - - /** - * Setter for description. - * @param description String value for description. - * @return Builder - */ - public Builder description(String description) { - this.description = description; - return this; - } - - /** - * Builds a new {@link TspublicRestV2ConnectionUpdateRequest} object using the set fields. - * @return {@link TspublicRestV2ConnectionUpdateRequest} - */ - public TspublicRestV2ConnectionUpdateRequest build() { - return new TspublicRestV2ConnectionUpdateRequest(id, configuration, name, description); - } - } -} diff --git a/Java/src/main/java/localhost/models/TspublicRestV2CustomactionAssociationUpdateRequest.java b/Java/src/main/java/localhost/models/TspublicRestV2CustomactionAssociationUpdateRequest.java deleted file mode 100644 index 044af9c91..000000000 --- a/Java/src/main/java/localhost/models/TspublicRestV2CustomactionAssociationUpdateRequest.java +++ /dev/null @@ -1,156 +0,0 @@ -/* - * ThoughtSpotPublicRESTAPILib - * - * This file was automatically generated by APIMATIC v3.0 ( https://www.apimatic.io ). - */ - -package localhost.models; - -import com.fasterxml.jackson.annotation.JsonGetter; -import com.fasterxml.jackson.annotation.JsonSetter; -import io.apimatic.core.types.BaseModel; - -/** - * This is a model class for TspublicRestV2CustomactionAssociationUpdateRequest type. - */ -public class TspublicRestV2CustomactionAssociationUpdateRequest { - private String id; - private String association; - - /** - * Default constructor. - */ - public TspublicRestV2CustomactionAssociationUpdateRequest() { - } - - /** - * Initialization constructor. - * @param id String value for id. - * @param association String value for association. - */ - public TspublicRestV2CustomactionAssociationUpdateRequest( - String id, - String association) { - this.id = id; - this.association = association; - } - - /** - * Getter for Id. - * GUID of the custom action - * @return Returns the String - */ - @JsonGetter("id") - public String getId() { - return id; - } - - /** - * Setter for Id. - * GUID of the custom action - * @param id Value for String - */ - @JsonSetter("id") - public void setId(String id) { - this.id = id; - } - - /** - * Getter for Association. - * A JSON map of the attributes with association of the action to ThoughtSpot object ID Example: - * {"id":"0dbd5b3a-84c1-4407-9803-cf07d67e6fcf","name":"My worksheet - * action","version":"v2","type":"URL","detail":{"link":"https://unpkg.com","function":"my-worksheet-action","authSelect":"NONE","authToken":"","encodeUser":"","apiKey":"X-API-KEY","apiValue":"","additionalUrlHeaders":"{}"},"actionAssociationMap":{"WORKSHEET":{"2b9d083a-275c-4984-9cfe-90b036affa17":{"enabled":"true","context":"PRIMARY"}}},"context":"NONE","availability":[ - * ],"userGroupList":["d0326b56-ef23-4c8a-8327-a30e99bcc72b"]} - * @return Returns the String - */ - @JsonGetter("association") - public String getAssociation() { - return association; - } - - /** - * Setter for Association. - * A JSON map of the attributes with association of the action to ThoughtSpot object ID Example: - * {"id":"0dbd5b3a-84c1-4407-9803-cf07d67e6fcf","name":"My worksheet - * action","version":"v2","type":"URL","detail":{"link":"https://unpkg.com","function":"my-worksheet-action","authSelect":"NONE","authToken":"","encodeUser":"","apiKey":"X-API-KEY","apiValue":"","additionalUrlHeaders":"{}"},"actionAssociationMap":{"WORKSHEET":{"2b9d083a-275c-4984-9cfe-90b036affa17":{"enabled":"true","context":"PRIMARY"}}},"context":"NONE","availability":[ - * ],"userGroupList":["d0326b56-ef23-4c8a-8327-a30e99bcc72b"]} - * @param association Value for String - */ - @JsonSetter("association") - public void setAssociation(String association) { - this.association = association; - } - - /** - * Converts this TspublicRestV2CustomactionAssociationUpdateRequest into string format. - * @return String representation of this class - */ - @Override - public String toString() { - return "TspublicRestV2CustomactionAssociationUpdateRequest [" + "id=" + id - + ", association=" + association + "]"; - } - - /** - * Builds a new {@link TspublicRestV2CustomactionAssociationUpdateRequest.Builder} object. - * Creates the instance with the state of the current model. - * @return a new {@link TspublicRestV2CustomactionAssociationUpdateRequest.Builder} object - */ - public Builder toBuilder() { - Builder builder = new Builder(id, association); - return builder; - } - - /** - * Class to build instances of {@link TspublicRestV2CustomactionAssociationUpdateRequest}. - */ - public static class Builder { - private String id; - private String association; - - /** - * Initialization constructor. - */ - public Builder() { - } - - /** - * Initialization constructor. - * @param id String value for id. - * @param association String value for association. - */ - public Builder(String id, String association) { - this.id = id; - this.association = association; - } - - /** - * Setter for id. - * @param id String value for id. - * @return Builder - */ - public Builder id(String id) { - this.id = id; - return this; - } - - /** - * Setter for association. - * @param association String value for association. - * @return Builder - */ - public Builder association(String association) { - this.association = association; - return this; - } - - /** - * Builds a new {@link TspublicRestV2CustomactionAssociationUpdateRequest} object using the - * set fields. - * @return {@link TspublicRestV2CustomactionAssociationUpdateRequest} - */ - public TspublicRestV2CustomactionAssociationUpdateRequest build() { - return new TspublicRestV2CustomactionAssociationUpdateRequest(id, association); - } - } -} diff --git a/Java/src/main/java/localhost/models/TspublicRestV2CustomactionCreateRequest.java b/Java/src/main/java/localhost/models/TspublicRestV2CustomactionCreateRequest.java deleted file mode 100644 index 8e601e8c5..000000000 --- a/Java/src/main/java/localhost/models/TspublicRestV2CustomactionCreateRequest.java +++ /dev/null @@ -1,117 +0,0 @@ -/* - * ThoughtSpotPublicRESTAPILib - * - * This file was automatically generated by APIMATIC v3.0 ( https://www.apimatic.io ). - */ - -package localhost.models; - -import com.fasterxml.jackson.annotation.JsonGetter; -import com.fasterxml.jackson.annotation.JsonSetter; -import io.apimatic.core.types.BaseModel; - -/** - * This is a model class for TspublicRestV2CustomactionCreateRequest type. - */ -public class TspublicRestV2CustomactionCreateRequest { - private String configuration; - - /** - * Default constructor. - */ - public TspublicRestV2CustomactionCreateRequest() { - } - - /** - * Initialization constructor. - * @param configuration String value for configuration. - */ - public TspublicRestV2CustomactionCreateRequest( - String configuration) { - this.configuration = configuration; - } - - /** - * Getter for Configuration. - * A JSON object with the key-value pair of configuration attributes Example: - * {"id":"3f7eac93-cce1-4ffc-b7a8-429353edbc6b","name":"unpkg - * test","version":"v2","type":"URL","detail":{"link":"https://unpkg.com - * ","function":"unpkg-test","authSelect":"BEARER","authToken":"asdfasadf3q4534534","encodeUser":"","apiKey":"X-API-KEY","apiValue":"","additionalUrlHeaders":"{\\"url_header1\\":{\\"id\\":\\"6a82908c-9328-40ff-b347-65adeda12f57\\",\\"key\\":\\"key1\\",\\"value\\":\\"value1\\"}}"},"actionAssociationMap":{"ANSWER":{"e4079d3f-ae71-4b0a-a70a-f17ecaf157a5":{"enabled":"true","context":"MENU"}}},"context":"NONE","availability":["GLOBAL"],"userGroupList":["d0326b56-ef23-4c8a-8327-a30e99bcc72b"]} - * @return Returns the String - */ - @JsonGetter("configuration") - public String getConfiguration() { - return configuration; - } - - /** - * Setter for Configuration. - * A JSON object with the key-value pair of configuration attributes Example: - * {"id":"3f7eac93-cce1-4ffc-b7a8-429353edbc6b","name":"unpkg - * test","version":"v2","type":"URL","detail":{"link":"https://unpkg.com - * ","function":"unpkg-test","authSelect":"BEARER","authToken":"asdfasadf3q4534534","encodeUser":"","apiKey":"X-API-KEY","apiValue":"","additionalUrlHeaders":"{\\"url_header1\\":{\\"id\\":\\"6a82908c-9328-40ff-b347-65adeda12f57\\",\\"key\\":\\"key1\\",\\"value\\":\\"value1\\"}}"},"actionAssociationMap":{"ANSWER":{"e4079d3f-ae71-4b0a-a70a-f17ecaf157a5":{"enabled":"true","context":"MENU"}}},"context":"NONE","availability":["GLOBAL"],"userGroupList":["d0326b56-ef23-4c8a-8327-a30e99bcc72b"]} - * @param configuration Value for String - */ - @JsonSetter("configuration") - public void setConfiguration(String configuration) { - this.configuration = configuration; - } - - /** - * Converts this TspublicRestV2CustomactionCreateRequest into string format. - * @return String representation of this class - */ - @Override - public String toString() { - return "TspublicRestV2CustomactionCreateRequest [" + "configuration=" + configuration + "]"; - } - - /** - * Builds a new {@link TspublicRestV2CustomactionCreateRequest.Builder} object. - * Creates the instance with the state of the current model. - * @return a new {@link TspublicRestV2CustomactionCreateRequest.Builder} object - */ - public Builder toBuilder() { - Builder builder = new Builder(configuration); - return builder; - } - - /** - * Class to build instances of {@link TspublicRestV2CustomactionCreateRequest}. - */ - public static class Builder { - private String configuration; - - /** - * Initialization constructor. - */ - public Builder() { - } - - /** - * Initialization constructor. - * @param configuration String value for configuration. - */ - public Builder(String configuration) { - this.configuration = configuration; - } - - /** - * Setter for configuration. - * @param configuration String value for configuration. - * @return Builder - */ - public Builder configuration(String configuration) { - this.configuration = configuration; - return this; - } - - /** - * Builds a new {@link TspublicRestV2CustomactionCreateRequest} object using the set fields. - * @return {@link TspublicRestV2CustomactionCreateRequest} - */ - public TspublicRestV2CustomactionCreateRequest build() { - return new TspublicRestV2CustomactionCreateRequest(configuration); - } - } -} diff --git a/Java/src/main/java/localhost/models/TspublicRestV2CustomactionSearchRequest.java b/Java/src/main/java/localhost/models/TspublicRestV2CustomactionSearchRequest.java deleted file mode 100644 index f6cc933af..000000000 --- a/Java/src/main/java/localhost/models/TspublicRestV2CustomactionSearchRequest.java +++ /dev/null @@ -1,107 +0,0 @@ -/* - * ThoughtSpotPublicRESTAPILib - * - * This file was automatically generated by APIMATIC v3.0 ( https://www.apimatic.io ). - */ - -package localhost.models; - -import com.fasterxml.jackson.annotation.JsonGetter; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonSetter; -import io.apimatic.core.types.BaseModel; -import java.util.List; - -/** - * This is a model class for TspublicRestV2CustomactionSearchRequest type. - */ -public class TspublicRestV2CustomactionSearchRequest { - private List tag; - - /** - * Default constructor. - */ - public TspublicRestV2CustomactionSearchRequest() { - } - - /** - * Initialization constructor. - * @param tag List of String value for tag. - */ - public TspublicRestV2CustomactionSearchRequest( - List tag) { - this.tag = tag; - } - - /** - * Getter for Tag. - * A JSON array of tag GUIDs. If tags are applied to worksheets, search answers, or Liveboard - * visualizations, and custom actions are associated to these objects, you can use this - * parameter to filter the custom action data by tags. - * @return Returns the List of String - */ - @JsonGetter("tag") - @JsonInclude(JsonInclude.Include.NON_NULL) - public List getTag() { - return tag; - } - - /** - * Setter for Tag. - * A JSON array of tag GUIDs. If tags are applied to worksheets, search answers, or Liveboard - * visualizations, and custom actions are associated to these objects, you can use this - * parameter to filter the custom action data by tags. - * @param tag Value for List of String - */ - @JsonSetter("tag") - public void setTag(List tag) { - this.tag = tag; - } - - /** - * Converts this TspublicRestV2CustomactionSearchRequest into string format. - * @return String representation of this class - */ - @Override - public String toString() { - return "TspublicRestV2CustomactionSearchRequest [" + "tag=" + tag + "]"; - } - - /** - * Builds a new {@link TspublicRestV2CustomactionSearchRequest.Builder} object. - * Creates the instance with the state of the current model. - * @return a new {@link TspublicRestV2CustomactionSearchRequest.Builder} object - */ - public Builder toBuilder() { - Builder builder = new Builder() - .tag(getTag()); - return builder; - } - - /** - * Class to build instances of {@link TspublicRestV2CustomactionSearchRequest}. - */ - public static class Builder { - private List tag; - - - - /** - * Setter for tag. - * @param tag List of String value for tag. - * @return Builder - */ - public Builder tag(List tag) { - this.tag = tag; - return this; - } - - /** - * Builds a new {@link TspublicRestV2CustomactionSearchRequest} object using the set fields. - * @return {@link TspublicRestV2CustomactionSearchRequest} - */ - public TspublicRestV2CustomactionSearchRequest build() { - return new TspublicRestV2CustomactionSearchRequest(tag); - } - } -} diff --git a/Java/src/main/java/localhost/models/TspublicRestV2CustomactionUpdateRequest.java b/Java/src/main/java/localhost/models/TspublicRestV2CustomactionUpdateRequest.java deleted file mode 100644 index c119f7c61..000000000 --- a/Java/src/main/java/localhost/models/TspublicRestV2CustomactionUpdateRequest.java +++ /dev/null @@ -1,155 +0,0 @@ -/* - * ThoughtSpotPublicRESTAPILib - * - * This file was automatically generated by APIMATIC v3.0 ( https://www.apimatic.io ). - */ - -package localhost.models; - -import com.fasterxml.jackson.annotation.JsonGetter; -import com.fasterxml.jackson.annotation.JsonSetter; -import io.apimatic.core.types.BaseModel; - -/** - * This is a model class for TspublicRestV2CustomactionUpdateRequest type. - */ -public class TspublicRestV2CustomactionUpdateRequest { - private String id; - private String configuration; - - /** - * Default constructor. - */ - public TspublicRestV2CustomactionUpdateRequest() { - } - - /** - * Initialization constructor. - * @param id String value for id. - * @param configuration String value for configuration. - */ - public TspublicRestV2CustomactionUpdateRequest( - String id, - String configuration) { - this.id = id; - this.configuration = configuration; - } - - /** - * Getter for Id. - * GUID of the custom action - * @return Returns the String - */ - @JsonGetter("id") - public String getId() { - return id; - } - - /** - * Setter for Id. - * GUID of the custom action - * @param id Value for String - */ - @JsonSetter("id") - public void setId(String id) { - this.id = id; - } - - /** - * Getter for Configuration. - * A JSON object with the key-value pair of configuration attributes Example: - * {"id":"3f7eac93-cce1-4ffc-b7a8-429353edbc6b","name":"unpkg - * test","version":"v2","type":"URL","detail":{"link":"https://unpkg.com - * ","function":"unpkg-test","authSelect":"BEARER","authToken":"asdfasadf3q4534534","encodeUser":"","apiKey":"X-API-KEY","apiValue":"","additionalUrlHeaders":"{\\"url_header1\\":{\\"id\\":\\"6a82908c-9328-40ff-b347-65adeda12f57\\",\\"key\\":\\"key1\\",\\"value\\":\\"value1\\"}}"},"actionAssociationMap":{"ANSWER":{"e4079d3f-ae71-4b0a-a70a-f17ecaf157a5":{"enabled":"true","context":"MENU"}}},"context":"NONE","availability":["GLOBAL"],"userGroupList":["d0326b56-ef23-4c8a-8327-a30e99bcc72b"]} - * @return Returns the String - */ - @JsonGetter("configuration") - public String getConfiguration() { - return configuration; - } - - /** - * Setter for Configuration. - * A JSON object with the key-value pair of configuration attributes Example: - * {"id":"3f7eac93-cce1-4ffc-b7a8-429353edbc6b","name":"unpkg - * test","version":"v2","type":"URL","detail":{"link":"https://unpkg.com - * ","function":"unpkg-test","authSelect":"BEARER","authToken":"asdfasadf3q4534534","encodeUser":"","apiKey":"X-API-KEY","apiValue":"","additionalUrlHeaders":"{\\"url_header1\\":{\\"id\\":\\"6a82908c-9328-40ff-b347-65adeda12f57\\",\\"key\\":\\"key1\\",\\"value\\":\\"value1\\"}}"},"actionAssociationMap":{"ANSWER":{"e4079d3f-ae71-4b0a-a70a-f17ecaf157a5":{"enabled":"true","context":"MENU"}}},"context":"NONE","availability":["GLOBAL"],"userGroupList":["d0326b56-ef23-4c8a-8327-a30e99bcc72b"]} - * @param configuration Value for String - */ - @JsonSetter("configuration") - public void setConfiguration(String configuration) { - this.configuration = configuration; - } - - /** - * Converts this TspublicRestV2CustomactionUpdateRequest into string format. - * @return String representation of this class - */ - @Override - public String toString() { - return "TspublicRestV2CustomactionUpdateRequest [" + "id=" + id + ", configuration=" - + configuration + "]"; - } - - /** - * Builds a new {@link TspublicRestV2CustomactionUpdateRequest.Builder} object. - * Creates the instance with the state of the current model. - * @return a new {@link TspublicRestV2CustomactionUpdateRequest.Builder} object - */ - public Builder toBuilder() { - Builder builder = new Builder(id, configuration); - return builder; - } - - /** - * Class to build instances of {@link TspublicRestV2CustomactionUpdateRequest}. - */ - public static class Builder { - private String id; - private String configuration; - - /** - * Initialization constructor. - */ - public Builder() { - } - - /** - * Initialization constructor. - * @param id String value for id. - * @param configuration String value for configuration. - */ - public Builder(String id, String configuration) { - this.id = id; - this.configuration = configuration; - } - - /** - * Setter for id. - * @param id String value for id. - * @return Builder - */ - public Builder id(String id) { - this.id = id; - return this; - } - - /** - * Setter for configuration. - * @param configuration String value for configuration. - * @return Builder - */ - public Builder configuration(String configuration) { - this.configuration = configuration; - return this; - } - - /** - * Builds a new {@link TspublicRestV2CustomactionUpdateRequest} object using the set fields. - * @return {@link TspublicRestV2CustomactionUpdateRequest} - */ - public TspublicRestV2CustomactionUpdateRequest build() { - return new TspublicRestV2CustomactionUpdateRequest(id, configuration); - } - } -} diff --git a/Java/src/main/java/localhost/models/TspublicRestV2DataAnswerRequest.java b/Java/src/main/java/localhost/models/TspublicRestV2DataAnswerRequest.java deleted file mode 100644 index 89c3e96f0..000000000 --- a/Java/src/main/java/localhost/models/TspublicRestV2DataAnswerRequest.java +++ /dev/null @@ -1,285 +0,0 @@ -/* - * ThoughtSpotPublicRESTAPILib - * - * This file was automatically generated by APIMATIC v3.0 ( https://www.apimatic.io ). - */ - -package localhost.models; - -import com.fasterxml.jackson.annotation.JsonGetter; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonSetter; -import io.apimatic.core.types.BaseModel; - -/** - * This is a model class for TspublicRestV2DataAnswerRequest type. - */ -public class TspublicRestV2DataAnswerRequest { - private Integer offset; - private Integer batchNumber; - private Integer batchSize; - private String id; - private FormatTypeEnum formatType; - - /** - * Default constructor. - */ - public TspublicRestV2DataAnswerRequest() { - offset = 0; - batchNumber = -1; - batchSize = -1; - formatType = FormatTypeEnum.COMPACT; - } - - /** - * Initialization constructor. - * @param id String value for id. - * @param offset Integer value for offset. - * @param batchNumber Integer value for batchNumber. - * @param batchSize Integer value for batchSize. - * @param formatType FormatTypeEnum value for formatType. - */ - public TspublicRestV2DataAnswerRequest( - String id, - Integer offset, - Integer batchNumber, - Integer batchSize, - FormatTypeEnum formatType) { - this.offset = offset; - this.batchNumber = batchNumber; - this.batchSize = batchSize; - this.id = id; - this.formatType = formatType; - } - - /** - * Getter for Offset. - * The offset point, starting from where the records should be included in the response. If no - * input is provided then offset starts from 0. - * @return Returns the Integer - */ - @JsonGetter("offset") - @JsonInclude(JsonInclude.Include.NON_NULL) - public Integer getOffset() { - return offset; - } - - /** - * Setter for Offset. - * The offset point, starting from where the records should be included in the response. If no - * input is provided then offset starts from 0. - * @param offset Value for Integer - */ - @JsonSetter("offset") - public void setOffset(Integer offset) { - this.offset = offset; - } - - /** - * Getter for BatchNumber. - * An alternate way to set offset for the starting point of the response. The value in offset - * field will not be considered if batchNumber field has value greater than 0. Offset value will - * be calculated as (batchNumber - 1) * batchSize. It is mandatory to provide a value for - * batchSize with batchNumber. Example: Assume response has 100 records. Now, batchNumber is set - * as 2 and batchSize as 10, then offset value will be 10. So, 10 records starting from 11th - * record will be considered. - * @return Returns the Integer - */ - @JsonGetter("batchNumber") - @JsonInclude(JsonInclude.Include.NON_NULL) - public Integer getBatchNumber() { - return batchNumber; - } - - /** - * Setter for BatchNumber. - * An alternate way to set offset for the starting point of the response. The value in offset - * field will not be considered if batchNumber field has value greater than 0. Offset value will - * be calculated as (batchNumber - 1) * batchSize. It is mandatory to provide a value for - * batchSize with batchNumber. Example: Assume response has 100 records. Now, batchNumber is set - * as 2 and batchSize as 10, then offset value will be 10. So, 10 records starting from 11th - * record will be considered. - * @param batchNumber Value for Integer - */ - @JsonSetter("batchNumber") - public void setBatchNumber(Integer batchNumber) { - this.batchNumber = batchNumber; - } - - /** - * Getter for BatchSize. - * The number of records that should be included in the response starting from offset position. - * If no input is provided, then all records starting from the value provided in offset is - * included in the response - * @return Returns the Integer - */ - @JsonGetter("batchSize") - @JsonInclude(JsonInclude.Include.NON_NULL) - public Integer getBatchSize() { - return batchSize; - } - - /** - * Setter for BatchSize. - * The number of records that should be included in the response starting from offset position. - * If no input is provided, then all records starting from the value provided in offset is - * included in the response - * @param batchSize Value for Integer - */ - @JsonSetter("batchSize") - public void setBatchSize(Integer batchSize) { - this.batchSize = batchSize; - } - - /** - * Getter for Id. - * The GUID of the Answer - * @return Returns the String - */ - @JsonGetter("id") - public String getId() { - return id; - } - - /** - * Setter for Id. - * The GUID of the Answer - * @param id Value for String - */ - @JsonSetter("id") - public void setId(String id) { - this.id = id; - } - - /** - * Getter for FormatType. - * The format of the data in the response. FULL: The response comes in "column":"value" format. - * COMPACT: The response includes only the value of the columns. - * @return Returns the FormatTypeEnum - */ - @JsonGetter("formatType") - @JsonInclude(JsonInclude.Include.NON_NULL) - public FormatTypeEnum getFormatType() { - return formatType; - } - - /** - * Setter for FormatType. - * The format of the data in the response. FULL: The response comes in "column":"value" format. - * COMPACT: The response includes only the value of the columns. - * @param formatType Value for FormatTypeEnum - */ - @JsonSetter("formatType") - public void setFormatType(FormatTypeEnum formatType) { - this.formatType = formatType; - } - - /** - * Converts this TspublicRestV2DataAnswerRequest into string format. - * @return String representation of this class - */ - @Override - public String toString() { - return "TspublicRestV2DataAnswerRequest [" + "id=" + id + ", offset=" + offset - + ", batchNumber=" + batchNumber + ", batchSize=" + batchSize + ", formatType=" - + formatType + "]"; - } - - /** - * Builds a new {@link TspublicRestV2DataAnswerRequest.Builder} object. - * Creates the instance with the state of the current model. - * @return a new {@link TspublicRestV2DataAnswerRequest.Builder} object - */ - public Builder toBuilder() { - Builder builder = new Builder(id) - .offset(getOffset()) - .batchNumber(getBatchNumber()) - .batchSize(getBatchSize()) - .formatType(getFormatType()); - return builder; - } - - /** - * Class to build instances of {@link TspublicRestV2DataAnswerRequest}. - */ - public static class Builder { - private String id; - private Integer offset = 0; - private Integer batchNumber = -1; - private Integer batchSize = -1; - private FormatTypeEnum formatType = FormatTypeEnum.COMPACT; - - /** - * Initialization constructor. - */ - public Builder() { - } - - /** - * Initialization constructor. - * @param id String value for id. - */ - public Builder(String id) { - this.id = id; - } - - /** - * Setter for id. - * @param id String value for id. - * @return Builder - */ - public Builder id(String id) { - this.id = id; - return this; - } - - /** - * Setter for offset. - * @param offset Integer value for offset. - * @return Builder - */ - public Builder offset(Integer offset) { - this.offset = offset; - return this; - } - - /** - * Setter for batchNumber. - * @param batchNumber Integer value for batchNumber. - * @return Builder - */ - public Builder batchNumber(Integer batchNumber) { - this.batchNumber = batchNumber; - return this; - } - - /** - * Setter for batchSize. - * @param batchSize Integer value for batchSize. - * @return Builder - */ - public Builder batchSize(Integer batchSize) { - this.batchSize = batchSize; - return this; - } - - /** - * Setter for formatType. - * @param formatType FormatTypeEnum value for formatType. - * @return Builder - */ - public Builder formatType(FormatTypeEnum formatType) { - this.formatType = formatType; - return this; - } - - /** - * Builds a new {@link TspublicRestV2DataAnswerRequest} object using the set fields. - * @return {@link TspublicRestV2DataAnswerRequest} - */ - public TspublicRestV2DataAnswerRequest build() { - return new TspublicRestV2DataAnswerRequest(id, offset, batchNumber, batchSize, - formatType); - } - } -} diff --git a/Java/src/main/java/localhost/models/TspublicRestV2DataLiveboardRequest.java b/Java/src/main/java/localhost/models/TspublicRestV2DataLiveboardRequest.java deleted file mode 100644 index ce8c79ef1..000000000 --- a/Java/src/main/java/localhost/models/TspublicRestV2DataLiveboardRequest.java +++ /dev/null @@ -1,443 +0,0 @@ -/* - * ThoughtSpotPublicRESTAPILib - * - * This file was automatically generated by APIMATIC v3.0 ( https://www.apimatic.io ). - */ - -package localhost.models; - -import com.fasterxml.jackson.annotation.JsonGetter; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonSetter; -import io.apimatic.core.types.BaseModel; -import java.util.List; - -/** - * This is a model class for TspublicRestV2DataLiveboardRequest type. - */ -public class TspublicRestV2DataLiveboardRequest { - private Integer offset; - private Integer batchNumber; - private Integer batchSize; - private String id; - private String transientContent; - private List vizId; - private String runtimeFilter; - private String runtimeSort; - private FormatTypeEnum formatType; - - /** - * Default constructor. - */ - public TspublicRestV2DataLiveboardRequest() { - offset = 0; - batchNumber = -1; - batchSize = -1; - formatType = FormatTypeEnum.COMPACT; - } - - /** - * Initialization constructor. - * @param offset Integer value for offset. - * @param batchNumber Integer value for batchNumber. - * @param batchSize Integer value for batchSize. - * @param id String value for id. - * @param transientContent String value for transientContent. - * @param vizId List of String value for vizId. - * @param runtimeFilter String value for runtimeFilter. - * @param runtimeSort String value for runtimeSort. - * @param formatType FormatTypeEnum value for formatType. - */ - public TspublicRestV2DataLiveboardRequest( - Integer offset, - Integer batchNumber, - Integer batchSize, - String id, - String transientContent, - List vizId, - String runtimeFilter, - String runtimeSort, - FormatTypeEnum formatType) { - this.offset = offset; - this.batchNumber = batchNumber; - this.batchSize = batchSize; - this.id = id; - this.transientContent = transientContent; - this.vizId = vizId; - this.runtimeFilter = runtimeFilter; - this.runtimeSort = runtimeSort; - this.formatType = formatType; - } - - /** - * Getter for Offset. - * The offset point, starting from where the records should be included in the response. If no - * input is provided then offset starts from 0. - * @return Returns the Integer - */ - @JsonGetter("offset") - @JsonInclude(JsonInclude.Include.NON_NULL) - public Integer getOffset() { - return offset; - } - - /** - * Setter for Offset. - * The offset point, starting from where the records should be included in the response. If no - * input is provided then offset starts from 0. - * @param offset Value for Integer - */ - @JsonSetter("offset") - public void setOffset(Integer offset) { - this.offset = offset; - } - - /** - * Getter for BatchNumber. - * An alternate way to set offset for the starting point of the response. The value in offset - * field will not be considered if batchNumber field has value greater than 0. Offset value will - * be calculated as (batchNumber - 1) * batchSize. It is mandatory to provide a value for - * batchSize with batchNumber. Example: Assume response has 100 records. Now, batchNumber is set - * as 2 and batchSize as 10, then offset value will be 10. So, 10 records starting from 11th - * record will be considered. - * @return Returns the Integer - */ - @JsonGetter("batchNumber") - @JsonInclude(JsonInclude.Include.NON_NULL) - public Integer getBatchNumber() { - return batchNumber; - } - - /** - * Setter for BatchNumber. - * An alternate way to set offset for the starting point of the response. The value in offset - * field will not be considered if batchNumber field has value greater than 0. Offset value will - * be calculated as (batchNumber - 1) * batchSize. It is mandatory to provide a value for - * batchSize with batchNumber. Example: Assume response has 100 records. Now, batchNumber is set - * as 2 and batchSize as 10, then offset value will be 10. So, 10 records starting from 11th - * record will be considered. - * @param batchNumber Value for Integer - */ - @JsonSetter("batchNumber") - public void setBatchNumber(Integer batchNumber) { - this.batchNumber = batchNumber; - } - - /** - * Getter for BatchSize. - * The number of records that should be included in the response starting from offset position. - * If no input is provided, then all records starting from the value provided in offset is - * included in the response - * @return Returns the Integer - */ - @JsonGetter("batchSize") - @JsonInclude(JsonInclude.Include.NON_NULL) - public Integer getBatchSize() { - return batchSize; - } - - /** - * Setter for BatchSize. - * The number of records that should be included in the response starting from offset position. - * If no input is provided, then all records starting from the value provided in offset is - * included in the response - * @param batchSize Value for Integer - */ - @JsonSetter("batchSize") - public void setBatchSize(Integer batchSize) { - this.batchSize = batchSize; - } - - /** - * Getter for Id. - * The GUID of the Liveboard - * @return Returns the String - */ - @JsonGetter("id") - @JsonInclude(JsonInclude.Include.NON_NULL) - public String getId() { - return id; - } - - /** - * Setter for Id. - * The GUID of the Liveboard - * @param id Value for String - */ - @JsonSetter("id") - public void setId(String id) { - this.id = id; - } - - /** - * Getter for TransientContent. - * If you have embedded ThoughtSpot in your host application, and you want to download Liveboard - * data with unsaved changes then, pass the transient content from the browser fetch request, - * using the getExportRequestForCurrentPinboard method. For more information, see - * https://developers.thoughtspot.com/docs/?pageid=liveboard-export-api#transient-pinboard . If - * value for this field is provided, then id will not be considered. - * @return Returns the String - */ - @JsonGetter("transientContent") - @JsonInclude(JsonInclude.Include.NON_NULL) - public String getTransientContent() { - return transientContent; - } - - /** - * Setter for TransientContent. - * If you have embedded ThoughtSpot in your host application, and you want to download Liveboard - * data with unsaved changes then, pass the transient content from the browser fetch request, - * using the getExportRequestForCurrentPinboard method. For more information, see - * https://developers.thoughtspot.com/docs/?pageid=liveboard-export-api#transient-pinboard . If - * value for this field is provided, then id will not be considered. - * @param transientContent Value for String - */ - @JsonSetter("transientContent") - public void setTransientContent(String transientContent) { - this.transientContent = transientContent; - } - - /** - * Getter for VizId. - * A JSON array of GUIDs of the visualizations in the Liveboard. - * @return Returns the List of String - */ - @JsonGetter("vizId") - @JsonInclude(JsonInclude.Include.NON_NULL) - public List getVizId() { - return vizId; - } - - /** - * Setter for VizId. - * A JSON array of GUIDs of the visualizations in the Liveboard. - * @param vizId Value for List of String - */ - @JsonSetter("vizId") - public void setVizId(List vizId) { - this.vizId = vizId; - } - - /** - * Getter for RuntimeFilter. - * JSON object which contains filter condition to filter the data at the time of data retrieval. - * Example: - * {"col1":"region","op1":"EQ","val1":"northeast","col2":"date","op2":"BET","val2":["1625126400000","1625126400000"]} - * For more information, see https://developers.thoughtspot.com/docs/?pageid=runtime-filters - * @return Returns the String - */ - @JsonGetter("runtimeFilter") - @JsonInclude(JsonInclude.Include.NON_NULL) - public String getRuntimeFilter() { - return runtimeFilter; - } - - /** - * Setter for RuntimeFilter. - * JSON object which contains filter condition to filter the data at the time of data retrieval. - * Example: - * {"col1":"region","op1":"EQ","val1":"northeast","col2":"date","op2":"BET","val2":["1625126400000","1625126400000"]} - * For more information, see https://developers.thoughtspot.com/docs/?pageid=runtime-filters - * @param runtimeFilter Value for String - */ - @JsonSetter("runtimeFilter") - public void setRuntimeFilter(String runtimeFilter) { - this.runtimeFilter = runtimeFilter; - } - - /** - * Getter for RuntimeSort. - * JSON object which provides columns to sort the data at the time of data retrieval. Example: - * {"sortCol1":"region","asc1":true,"sortCol2":"date"} For more information, see - * https://developers.thoughtspot.com/docs/?pageid=runtime-filters. - * @return Returns the String - */ - @JsonGetter("runtimeSort") - @JsonInclude(JsonInclude.Include.NON_NULL) - public String getRuntimeSort() { - return runtimeSort; - } - - /** - * Setter for RuntimeSort. - * JSON object which provides columns to sort the data at the time of data retrieval. Example: - * {"sortCol1":"region","asc1":true,"sortCol2":"date"} For more information, see - * https://developers.thoughtspot.com/docs/?pageid=runtime-filters. - * @param runtimeSort Value for String - */ - @JsonSetter("runtimeSort") - public void setRuntimeSort(String runtimeSort) { - this.runtimeSort = runtimeSort; - } - - /** - * Getter for FormatType. - * The format of the data in the response. FULL: The response comes in "column":"value" format. - * COMPACT: The response includes only the value of the columns. - * @return Returns the FormatTypeEnum - */ - @JsonGetter("formatType") - @JsonInclude(JsonInclude.Include.NON_NULL) - public FormatTypeEnum getFormatType() { - return formatType; - } - - /** - * Setter for FormatType. - * The format of the data in the response. FULL: The response comes in "column":"value" format. - * COMPACT: The response includes only the value of the columns. - * @param formatType Value for FormatTypeEnum - */ - @JsonSetter("formatType") - public void setFormatType(FormatTypeEnum formatType) { - this.formatType = formatType; - } - - /** - * Converts this TspublicRestV2DataLiveboardRequest into string format. - * @return String representation of this class - */ - @Override - public String toString() { - return "TspublicRestV2DataLiveboardRequest [" + "offset=" + offset + ", batchNumber=" - + batchNumber + ", batchSize=" + batchSize + ", id=" + id + ", transientContent=" - + transientContent + ", vizId=" + vizId + ", runtimeFilter=" + runtimeFilter - + ", runtimeSort=" + runtimeSort + ", formatType=" + formatType + "]"; - } - - /** - * Builds a new {@link TspublicRestV2DataLiveboardRequest.Builder} object. - * Creates the instance with the state of the current model. - * @return a new {@link TspublicRestV2DataLiveboardRequest.Builder} object - */ - public Builder toBuilder() { - Builder builder = new Builder() - .offset(getOffset()) - .batchNumber(getBatchNumber()) - .batchSize(getBatchSize()) - .id(getId()) - .transientContent(getTransientContent()) - .vizId(getVizId()) - .runtimeFilter(getRuntimeFilter()) - .runtimeSort(getRuntimeSort()) - .formatType(getFormatType()); - return builder; - } - - /** - * Class to build instances of {@link TspublicRestV2DataLiveboardRequest}. - */ - public static class Builder { - private Integer offset = 0; - private Integer batchNumber = -1; - private Integer batchSize = -1; - private String id; - private String transientContent; - private List vizId; - private String runtimeFilter; - private String runtimeSort; - private FormatTypeEnum formatType = FormatTypeEnum.COMPACT; - - - - /** - * Setter for offset. - * @param offset Integer value for offset. - * @return Builder - */ - public Builder offset(Integer offset) { - this.offset = offset; - return this; - } - - /** - * Setter for batchNumber. - * @param batchNumber Integer value for batchNumber. - * @return Builder - */ - public Builder batchNumber(Integer batchNumber) { - this.batchNumber = batchNumber; - return this; - } - - /** - * Setter for batchSize. - * @param batchSize Integer value for batchSize. - * @return Builder - */ - public Builder batchSize(Integer batchSize) { - this.batchSize = batchSize; - return this; - } - - /** - * Setter for id. - * @param id String value for id. - * @return Builder - */ - public Builder id(String id) { - this.id = id; - return this; - } - - /** - * Setter for transientContent. - * @param transientContent String value for transientContent. - * @return Builder - */ - public Builder transientContent(String transientContent) { - this.transientContent = transientContent; - return this; - } - - /** - * Setter for vizId. - * @param vizId List of String value for vizId. - * @return Builder - */ - public Builder vizId(List vizId) { - this.vizId = vizId; - return this; - } - - /** - * Setter for runtimeFilter. - * @param runtimeFilter String value for runtimeFilter. - * @return Builder - */ - public Builder runtimeFilter(String runtimeFilter) { - this.runtimeFilter = runtimeFilter; - return this; - } - - /** - * Setter for runtimeSort. - * @param runtimeSort String value for runtimeSort. - * @return Builder - */ - public Builder runtimeSort(String runtimeSort) { - this.runtimeSort = runtimeSort; - return this; - } - - /** - * Setter for formatType. - * @param formatType FormatTypeEnum value for formatType. - * @return Builder - */ - public Builder formatType(FormatTypeEnum formatType) { - this.formatType = formatType; - return this; - } - - /** - * Builds a new {@link TspublicRestV2DataLiveboardRequest} object using the set fields. - * @return {@link TspublicRestV2DataLiveboardRequest} - */ - public TspublicRestV2DataLiveboardRequest build() { - return new TspublicRestV2DataLiveboardRequest(offset, batchNumber, batchSize, id, - transientContent, vizId, runtimeFilter, runtimeSort, formatType); - } - } -} diff --git a/Java/src/main/java/localhost/models/TspublicRestV2DataSearchRequest.java b/Java/src/main/java/localhost/models/TspublicRestV2DataSearchRequest.java deleted file mode 100644 index 892beb39a..000000000 --- a/Java/src/main/java/localhost/models/TspublicRestV2DataSearchRequest.java +++ /dev/null @@ -1,322 +0,0 @@ -/* - * ThoughtSpotPublicRESTAPILib - * - * This file was automatically generated by APIMATIC v3.0 ( https://www.apimatic.io ). - */ - -package localhost.models; - -import com.fasterxml.jackson.annotation.JsonGetter; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonSetter; -import io.apimatic.core.types.BaseModel; - -/** - * This is a model class for TspublicRestV2DataSearchRequest type. - */ -public class TspublicRestV2DataSearchRequest { - private Integer offset; - private Integer batchNumber; - private Integer batchSize; - private String queryString; - private String dataObjectId; - private FormatTypeEnum formatType; - - /** - * Default constructor. - */ - public TspublicRestV2DataSearchRequest() { - offset = -1; - batchNumber = -1; - batchSize = -1; - formatType = FormatTypeEnum.COMPACT; - } - - /** - * Initialization constructor. - * @param queryString String value for queryString. - * @param dataObjectId String value for dataObjectId. - * @param offset Integer value for offset. - * @param batchNumber Integer value for batchNumber. - * @param batchSize Integer value for batchSize. - * @param formatType FormatTypeEnum value for formatType. - */ - public TspublicRestV2DataSearchRequest( - String queryString, - String dataObjectId, - Integer offset, - Integer batchNumber, - Integer batchSize, - FormatTypeEnum formatType) { - this.offset = offset; - this.batchNumber = batchNumber; - this.batchSize = batchSize; - this.queryString = queryString; - this.dataObjectId = dataObjectId; - this.formatType = formatType; - } - - /** - * Getter for Offset. - * The offset point, starting from where the records should be included in the response. If no - * input is provided then offset starts from 0. - * @return Returns the Integer - */ - @JsonGetter("offset") - @JsonInclude(JsonInclude.Include.NON_NULL) - public Integer getOffset() { - return offset; - } - - /** - * Setter for Offset. - * The offset point, starting from where the records should be included in the response. If no - * input is provided then offset starts from 0. - * @param offset Value for Integer - */ - @JsonSetter("offset") - public void setOffset(Integer offset) { - this.offset = offset; - } - - /** - * Getter for BatchNumber. - * An alternate way to set offset for the starting point of the response. The value in offset - * field will not be considered if batchNumber field has value greater than 0. Offset value will - * be calculated as (batchNumber - 1) * batchSize. It is mandatory to provide a value for - * batchSize with batchNumber. Example: Assume response has 100 records. Now, batchNumber is set - * as 2 and batchSize as 10, then offset value will be 10. So, 10 records starting from 11th - * record will be considered. - * @return Returns the Integer - */ - @JsonGetter("batchNumber") - @JsonInclude(JsonInclude.Include.NON_NULL) - public Integer getBatchNumber() { - return batchNumber; - } - - /** - * Setter for BatchNumber. - * An alternate way to set offset for the starting point of the response. The value in offset - * field will not be considered if batchNumber field has value greater than 0. Offset value will - * be calculated as (batchNumber - 1) * batchSize. It is mandatory to provide a value for - * batchSize with batchNumber. Example: Assume response has 100 records. Now, batchNumber is set - * as 2 and batchSize as 10, then offset value will be 10. So, 10 records starting from 11th - * record will be considered. - * @param batchNumber Value for Integer - */ - @JsonSetter("batchNumber") - public void setBatchNumber(Integer batchNumber) { - this.batchNumber = batchNumber; - } - - /** - * Getter for BatchSize. - * The number of records that should be included in the response starting from offset position. - * If no input is provided, then all records starting from the value provided in offset is - * included in the response - * @return Returns the Integer - */ - @JsonGetter("batchSize") - @JsonInclude(JsonInclude.Include.NON_NULL) - public Integer getBatchSize() { - return batchSize; - } - - /** - * Setter for BatchSize. - * The number of records that should be included in the response starting from offset position. - * If no input is provided, then all records starting from the value provided in offset is - * included in the response - * @param batchSize Value for Integer - */ - @JsonSetter("batchSize") - public void setBatchSize(Integer batchSize) { - this.batchSize = batchSize; - } - - /** - * Getter for QueryString. - * The data search query string. Example: [revenue] > 1000 [ship mode] = 'air' - * @return Returns the String - */ - @JsonGetter("queryString") - public String getQueryString() { - return queryString; - } - - /** - * Setter for QueryString. - * The data search query string. Example: [revenue] > 1000 [ship mode] = 'air' - * @param queryString Value for String - */ - @JsonSetter("queryString") - public void setQueryString(String queryString) { - this.queryString = queryString; - } - - /** - * Getter for DataObjectId. - * The GUID of the data object, either a worksheet, a view, or a table. - * @return Returns the String - */ - @JsonGetter("dataObjectId") - public String getDataObjectId() { - return dataObjectId; - } - - /** - * Setter for DataObjectId. - * The GUID of the data object, either a worksheet, a view, or a table. - * @param dataObjectId Value for String - */ - @JsonSetter("dataObjectId") - public void setDataObjectId(String dataObjectId) { - this.dataObjectId = dataObjectId; - } - - /** - * Getter for FormatType. - * The format of the data in the response. FULL: The response comes in "column":"value" format. - * COMPACT: The response includes only the value of the columns. - * @return Returns the FormatTypeEnum - */ - @JsonGetter("formatType") - @JsonInclude(JsonInclude.Include.NON_NULL) - public FormatTypeEnum getFormatType() { - return formatType; - } - - /** - * Setter for FormatType. - * The format of the data in the response. FULL: The response comes in "column":"value" format. - * COMPACT: The response includes only the value of the columns. - * @param formatType Value for FormatTypeEnum - */ - @JsonSetter("formatType") - public void setFormatType(FormatTypeEnum formatType) { - this.formatType = formatType; - } - - /** - * Converts this TspublicRestV2DataSearchRequest into string format. - * @return String representation of this class - */ - @Override - public String toString() { - return "TspublicRestV2DataSearchRequest [" + "queryString=" + queryString - + ", dataObjectId=" + dataObjectId + ", offset=" + offset + ", batchNumber=" - + batchNumber + ", batchSize=" + batchSize + ", formatType=" + formatType + "]"; - } - - /** - * Builds a new {@link TspublicRestV2DataSearchRequest.Builder} object. - * Creates the instance with the state of the current model. - * @return a new {@link TspublicRestV2DataSearchRequest.Builder} object - */ - public Builder toBuilder() { - Builder builder = new Builder(queryString, dataObjectId) - .offset(getOffset()) - .batchNumber(getBatchNumber()) - .batchSize(getBatchSize()) - .formatType(getFormatType()); - return builder; - } - - /** - * Class to build instances of {@link TspublicRestV2DataSearchRequest}. - */ - public static class Builder { - private String queryString; - private String dataObjectId; - private Integer offset = -1; - private Integer batchNumber = -1; - private Integer batchSize = -1; - private FormatTypeEnum formatType = FormatTypeEnum.COMPACT; - - /** - * Initialization constructor. - */ - public Builder() { - } - - /** - * Initialization constructor. - * @param queryString String value for queryString. - * @param dataObjectId String value for dataObjectId. - */ - public Builder(String queryString, String dataObjectId) { - this.queryString = queryString; - this.dataObjectId = dataObjectId; - } - - /** - * Setter for queryString. - * @param queryString String value for queryString. - * @return Builder - */ - public Builder queryString(String queryString) { - this.queryString = queryString; - return this; - } - - /** - * Setter for dataObjectId. - * @param dataObjectId String value for dataObjectId. - * @return Builder - */ - public Builder dataObjectId(String dataObjectId) { - this.dataObjectId = dataObjectId; - return this; - } - - /** - * Setter for offset. - * @param offset Integer value for offset. - * @return Builder - */ - public Builder offset(Integer offset) { - this.offset = offset; - return this; - } - - /** - * Setter for batchNumber. - * @param batchNumber Integer value for batchNumber. - * @return Builder - */ - public Builder batchNumber(Integer batchNumber) { - this.batchNumber = batchNumber; - return this; - } - - /** - * Setter for batchSize. - * @param batchSize Integer value for batchSize. - * @return Builder - */ - public Builder batchSize(Integer batchSize) { - this.batchSize = batchSize; - return this; - } - - /** - * Setter for formatType. - * @param formatType FormatTypeEnum value for formatType. - * @return Builder - */ - public Builder formatType(FormatTypeEnum formatType) { - this.formatType = formatType; - return this; - } - - /** - * Builds a new {@link TspublicRestV2DataSearchRequest} object using the set fields. - * @return {@link TspublicRestV2DataSearchRequest} - */ - public TspublicRestV2DataSearchRequest build() { - return new TspublicRestV2DataSearchRequest(queryString, dataObjectId, offset, - batchNumber, batchSize, formatType); - } - } -} diff --git a/Java/src/main/java/localhost/models/TspublicRestV2DatabaseTableCreateRequest.java b/Java/src/main/java/localhost/models/TspublicRestV2DatabaseTableCreateRequest.java deleted file mode 100644 index 6703c42d4..000000000 --- a/Java/src/main/java/localhost/models/TspublicRestV2DatabaseTableCreateRequest.java +++ /dev/null @@ -1,146 +0,0 @@ -/* - * ThoughtSpotPublicRESTAPILib - * - * This file was automatically generated by APIMATIC v3.0 ( https://www.apimatic.io ). - */ - -package localhost.models; - -import com.fasterxml.jackson.annotation.JsonGetter; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonSetter; -import io.apimatic.core.types.BaseModel; - -/** - * This is a model class for TspublicRestV2DatabaseTableCreateRequest type. - */ -public class TspublicRestV2DatabaseTableCreateRequest { - private Boolean createDatabase; - private String schema; - - /** - * Default constructor. - */ - public TspublicRestV2DatabaseTableCreateRequest() { - createDatabase = true; - } - - /** - * Initialization constructor. - * @param createDatabase Boolean value for createDatabase. - * @param schema String value for schema. - */ - public TspublicRestV2DatabaseTableCreateRequest( - Boolean createDatabase, - String schema) { - this.createDatabase = createDatabase; - this.schema = schema; - } - - /** - * Getter for CreateDatabase. - * Flag to indicate if the database and schema should be created if they do not exist in Falcon. - * (Valid values: True/False) - * @return Returns the Boolean - */ - @JsonGetter("createDatabase") - @JsonInclude(JsonInclude.Include.NON_NULL) - public Boolean getCreateDatabase() { - return createDatabase; - } - - /** - * Setter for CreateDatabase. - * Flag to indicate if the database and schema should be created if they do not exist in Falcon. - * (Valid values: True/False) - * @param createDatabase Value for Boolean - */ - @JsonSetter("createDatabase") - public void setCreateDatabase(Boolean createDatabase) { - this.createDatabase = createDatabase; - } - - /** - * Getter for Schema. - * DDL of the table to be created. Example: - * {"database":{"name":"test_db"},"schema":{"name":"test_schema"},"table":{"id":{"name":"test_table"},"primary_key":[{"name":"test_pk"}],"column":[{"id":{"name":"test_pk"},"size":0,"data_type":"TYPE_INT32"},{"id":{"name":"test_col1"},"size":0,"data_type":"TYPE_FLOAT"},{"id":{"name":"test_col2"},"data_type":"TYPE_INT64","datetime":"TYPE_DATE"}{"id":{"name":"test_col3"},"size":10,"data_type":"TYPE_VAR_CHAR"}]}} - * @return Returns the String - */ - @JsonGetter("schema") - @JsonInclude(JsonInclude.Include.NON_NULL) - public String getSchema() { - return schema; - } - - /** - * Setter for Schema. - * DDL of the table to be created. Example: - * {"database":{"name":"test_db"},"schema":{"name":"test_schema"},"table":{"id":{"name":"test_table"},"primary_key":[{"name":"test_pk"}],"column":[{"id":{"name":"test_pk"},"size":0,"data_type":"TYPE_INT32"},{"id":{"name":"test_col1"},"size":0,"data_type":"TYPE_FLOAT"},{"id":{"name":"test_col2"},"data_type":"TYPE_INT64","datetime":"TYPE_DATE"}{"id":{"name":"test_col3"},"size":10,"data_type":"TYPE_VAR_CHAR"}]}} - * @param schema Value for String - */ - @JsonSetter("schema") - public void setSchema(String schema) { - this.schema = schema; - } - - /** - * Converts this TspublicRestV2DatabaseTableCreateRequest into string format. - * @return String representation of this class - */ - @Override - public String toString() { - return "TspublicRestV2DatabaseTableCreateRequest [" + "createDatabase=" + createDatabase - + ", schema=" + schema + "]"; - } - - /** - * Builds a new {@link TspublicRestV2DatabaseTableCreateRequest.Builder} object. - * Creates the instance with the state of the current model. - * @return a new {@link TspublicRestV2DatabaseTableCreateRequest.Builder} object - */ - public Builder toBuilder() { - Builder builder = new Builder() - .createDatabase(getCreateDatabase()) - .schema(getSchema()); - return builder; - } - - /** - * Class to build instances of {@link TspublicRestV2DatabaseTableCreateRequest}. - */ - public static class Builder { - private Boolean createDatabase = true; - private String schema; - - - - /** - * Setter for createDatabase. - * @param createDatabase Boolean value for createDatabase. - * @return Builder - */ - public Builder createDatabase(Boolean createDatabase) { - this.createDatabase = createDatabase; - return this; - } - - /** - * Setter for schema. - * @param schema String value for schema. - * @return Builder - */ - public Builder schema(String schema) { - this.schema = schema; - return this; - } - - /** - * Builds a new {@link TspublicRestV2DatabaseTableCreateRequest} object using the set - * fields. - * @return {@link TspublicRestV2DatabaseTableCreateRequest} - */ - public TspublicRestV2DatabaseTableCreateRequest build() { - return new TspublicRestV2DatabaseTableCreateRequest(createDatabase, schema); - } - } -} diff --git a/Java/src/main/java/localhost/models/TspublicRestV2DatabaseTableRunqueryRequest.java b/Java/src/main/java/localhost/models/TspublicRestV2DatabaseTableRunqueryRequest.java deleted file mode 100644 index 25635b388..000000000 --- a/Java/src/main/java/localhost/models/TspublicRestV2DatabaseTableRunqueryRequest.java +++ /dev/null @@ -1,123 +0,0 @@ -/* - * ThoughtSpotPublicRESTAPILib - * - * This file was automatically generated by APIMATIC v3.0 ( https://www.apimatic.io ). - */ - -package localhost.models; - -import com.fasterxml.jackson.annotation.JsonGetter; -import com.fasterxml.jackson.annotation.JsonSetter; -import io.apimatic.core.types.BaseModel; -import java.util.List; - -/** - * This is a model class for TspublicRestV2DatabaseTableRunqueryRequest type. - */ -public class TspublicRestV2DatabaseTableRunqueryRequest { - private List statement; - - /** - * Default constructor. - */ - public TspublicRestV2DatabaseTableRunqueryRequest() { - } - - /** - * Initialization constructor. - * @param statement List of String value for statement. - */ - public TspublicRestV2DatabaseTableRunqueryRequest( - List statement) { - this.statement = statement; - } - - /** - * Getter for Statement. - * A JSON array of TQL statements separated by semi-colon (;). Each TQL statement should end - * with semi-colon (;). The TQL operations that can be run through this API are restricted to - * create database and schema, alter table, delete and update table rows. If a TQL statement - * fails, then the subsequent statements in the array are not run. Example: ["alter table - * test_db.test_schema.test_table drop contraint primary key;";"alter table - * test_db.test_schema.test_table add column test_col4 varchar(10) DEFAULT '';"] - * @return Returns the List of String - */ - @JsonGetter("statement") - public List getStatement() { - return statement; - } - - /** - * Setter for Statement. - * A JSON array of TQL statements separated by semi-colon (;). Each TQL statement should end - * with semi-colon (;). The TQL operations that can be run through this API are restricted to - * create database and schema, alter table, delete and update table rows. If a TQL statement - * fails, then the subsequent statements in the array are not run. Example: ["alter table - * test_db.test_schema.test_table drop contraint primary key;";"alter table - * test_db.test_schema.test_table add column test_col4 varchar(10) DEFAULT '';"] - * @param statement Value for List of String - */ - @JsonSetter("statement") - public void setStatement(List statement) { - this.statement = statement; - } - - /** - * Converts this TspublicRestV2DatabaseTableRunqueryRequest into string format. - * @return String representation of this class - */ - @Override - public String toString() { - return "TspublicRestV2DatabaseTableRunqueryRequest [" + "statement=" + statement + "]"; - } - - /** - * Builds a new {@link TspublicRestV2DatabaseTableRunqueryRequest.Builder} object. - * Creates the instance with the state of the current model. - * @return a new {@link TspublicRestV2DatabaseTableRunqueryRequest.Builder} object - */ - public Builder toBuilder() { - Builder builder = new Builder(statement); - return builder; - } - - /** - * Class to build instances of {@link TspublicRestV2DatabaseTableRunqueryRequest}. - */ - public static class Builder { - private List statement; - - /** - * Initialization constructor. - */ - public Builder() { - } - - /** - * Initialization constructor. - * @param statement List of String value for statement. - */ - public Builder(List statement) { - this.statement = statement; - } - - /** - * Setter for statement. - * @param statement List of String value for statement. - * @return Builder - */ - public Builder statement(List statement) { - this.statement = statement; - return this; - } - - /** - * Builds a new {@link TspublicRestV2DatabaseTableRunqueryRequest} object using the set - * fields. - * @return {@link TspublicRestV2DatabaseTableRunqueryRequest} - */ - public TspublicRestV2DatabaseTableRunqueryRequest build() { - return new TspublicRestV2DatabaseTableRunqueryRequest(statement); - } - } -} diff --git a/Java/src/main/java/localhost/models/TspublicRestV2GroupAddgroupRequest.java b/Java/src/main/java/localhost/models/TspublicRestV2GroupAddgroupRequest.java deleted file mode 100644 index 7c3003a13..000000000 --- a/Java/src/main/java/localhost/models/TspublicRestV2GroupAddgroupRequest.java +++ /dev/null @@ -1,188 +0,0 @@ -/* - * ThoughtSpotPublicRESTAPILib - * - * This file was automatically generated by APIMATIC v3.0 ( https://www.apimatic.io ). - */ - -package localhost.models; - -import com.fasterxml.jackson.annotation.JsonGetter; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonSetter; -import io.apimatic.core.types.BaseModel; -import java.util.List; - -/** - * This is a model class for TspublicRestV2GroupAddgroupRequest type. - */ -public class TspublicRestV2GroupAddgroupRequest { - private String name; - private String id; - private List groups; - - /** - * Default constructor. - */ - public TspublicRestV2GroupAddgroupRequest() { - } - - /** - * Initialization constructor. - * @param groups List of GroupNameAndIDInput value for groups. - * @param name String value for name. - * @param id String value for id. - */ - public TspublicRestV2GroupAddgroupRequest( - List groups, - String name, - String id) { - this.name = name; - this.id = id; - this.groups = groups; - } - - /** - * Getter for Name. - * Name of the group - * @return Returns the String - */ - @JsonGetter("name") - @JsonInclude(JsonInclude.Include.NON_NULL) - public String getName() { - return name; - } - - /** - * Setter for Name. - * Name of the group - * @param name Value for String - */ - @JsonSetter("name") - public void setName(String name) { - this.name = name; - } - - /** - * Getter for Id. - * The GUID of the group to query. - * @return Returns the String - */ - @JsonGetter("id") - @JsonInclude(JsonInclude.Include.NON_NULL) - public String getId() { - return id; - } - - /** - * Setter for Id. - * The GUID of the group to query. - * @param id Value for String - */ - @JsonSetter("id") - public void setId(String id) { - this.id = id; - } - - /** - * Getter for Groups. - * Array of objects of groups that the user belong to. - * @return Returns the List of GroupNameAndIDInput - */ - @JsonGetter("groups") - public List getGroups() { - return groups; - } - - /** - * Setter for Groups. - * Array of objects of groups that the user belong to. - * @param groups Value for List of GroupNameAndIDInput - */ - @JsonSetter("groups") - public void setGroups(List groups) { - this.groups = groups; - } - - /** - * Converts this TspublicRestV2GroupAddgroupRequest into string format. - * @return String representation of this class - */ - @Override - public String toString() { - return "TspublicRestV2GroupAddgroupRequest [" + "groups=" + groups + ", name=" + name - + ", id=" + id + "]"; - } - - /** - * Builds a new {@link TspublicRestV2GroupAddgroupRequest.Builder} object. - * Creates the instance with the state of the current model. - * @return a new {@link TspublicRestV2GroupAddgroupRequest.Builder} object - */ - public Builder toBuilder() { - Builder builder = new Builder(groups) - .name(getName()) - .id(getId()); - return builder; - } - - /** - * Class to build instances of {@link TspublicRestV2GroupAddgroupRequest}. - */ - public static class Builder { - private List groups; - private String name; - private String id; - - /** - * Initialization constructor. - */ - public Builder() { - } - - /** - * Initialization constructor. - * @param groups List of GroupNameAndIDInput value for groups. - */ - public Builder(List groups) { - this.groups = groups; - } - - /** - * Setter for groups. - * @param groups List of GroupNameAndIDInput value for groups. - * @return Builder - */ - public Builder groups(List groups) { - this.groups = groups; - return this; - } - - /** - * Setter for name. - * @param name String value for name. - * @return Builder - */ - public Builder name(String name) { - this.name = name; - return this; - } - - /** - * Setter for id. - * @param id String value for id. - * @return Builder - */ - public Builder id(String id) { - this.id = id; - return this; - } - - /** - * Builds a new {@link TspublicRestV2GroupAddgroupRequest} object using the set fields. - * @return {@link TspublicRestV2GroupAddgroupRequest} - */ - public TspublicRestV2GroupAddgroupRequest build() { - return new TspublicRestV2GroupAddgroupRequest(groups, name, id); - } - } -} diff --git a/Java/src/main/java/localhost/models/TspublicRestV2GroupAddprivilegeRequest.java b/Java/src/main/java/localhost/models/TspublicRestV2GroupAddprivilegeRequest.java deleted file mode 100644 index 2786f74da..000000000 --- a/Java/src/main/java/localhost/models/TspublicRestV2GroupAddprivilegeRequest.java +++ /dev/null @@ -1,180 +0,0 @@ -/* - * ThoughtSpotPublicRESTAPILib - * - * This file was automatically generated by APIMATIC v3.0 ( https://www.apimatic.io ). - */ - -package localhost.models; - -import com.fasterxml.jackson.annotation.JsonGetter; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonSetter; -import io.apimatic.core.types.BaseModel; -import java.util.List; - -/** - * This is a model class for TspublicRestV2GroupAddprivilegeRequest type. - */ -public class TspublicRestV2GroupAddprivilegeRequest { - private String name; - private String id; - private List privileges; - - /** - * Default constructor. - */ - public TspublicRestV2GroupAddprivilegeRequest() { - } - - /** - * Initialization constructor. - * @param name String value for name. - * @param id String value for id. - * @param privileges List of PrivilegeEnum value for privileges. - */ - public TspublicRestV2GroupAddprivilegeRequest( - String name, - String id, - List privileges) { - this.name = name; - this.id = id; - this.privileges = privileges; - } - - /** - * Getter for Name. - * Name of the group - * @return Returns the String - */ - @JsonGetter("name") - @JsonInclude(JsonInclude.Include.NON_NULL) - public String getName() { - return name; - } - - /** - * Setter for Name. - * Name of the group - * @param name Value for String - */ - @JsonSetter("name") - public void setName(String name) { - this.name = name; - } - - /** - * Getter for Id. - * The GUID of the group to query. - * @return Returns the String - */ - @JsonGetter("id") - @JsonInclude(JsonInclude.Include.NON_NULL) - public String getId() { - return id; - } - - /** - * Setter for Id. - * The GUID of the group to query. - * @param id Value for String - */ - @JsonSetter("id") - public void setId(String id) { - this.id = id; - } - - /** - * Getter for Privileges. - * A JSON array of name of users or GUIDs of users or both. When both are given then id is - * considered - * @return Returns the List of PrivilegeEnum - */ - @JsonGetter("privileges") - @JsonInclude(JsonInclude.Include.NON_NULL) - public List getPrivileges() { - return privileges; - } - - /** - * Setter for Privileges. - * A JSON array of name of users or GUIDs of users or both. When both are given then id is - * considered - * @param privileges Value for List of PrivilegeEnum - */ - @JsonSetter("privileges") - public void setPrivileges(List privileges) { - this.privileges = privileges; - } - - /** - * Converts this TspublicRestV2GroupAddprivilegeRequest into string format. - * @return String representation of this class - */ - @Override - public String toString() { - return "TspublicRestV2GroupAddprivilegeRequest [" + "name=" + name + ", id=" + id - + ", privileges=" + privileges + "]"; - } - - /** - * Builds a new {@link TspublicRestV2GroupAddprivilegeRequest.Builder} object. - * Creates the instance with the state of the current model. - * @return a new {@link TspublicRestV2GroupAddprivilegeRequest.Builder} object - */ - public Builder toBuilder() { - Builder builder = new Builder() - .name(getName()) - .id(getId()) - .privileges(getPrivileges()); - return builder; - } - - /** - * Class to build instances of {@link TspublicRestV2GroupAddprivilegeRequest}. - */ - public static class Builder { - private String name; - private String id; - private List privileges; - - - - /** - * Setter for name. - * @param name String value for name. - * @return Builder - */ - public Builder name(String name) { - this.name = name; - return this; - } - - /** - * Setter for id. - * @param id String value for id. - * @return Builder - */ - public Builder id(String id) { - this.id = id; - return this; - } - - /** - * Setter for privileges. - * @param privileges List of PrivilegeEnum value for privileges. - * @return Builder - */ - public Builder privileges(List privileges) { - this.privileges = privileges; - return this; - } - - /** - * Builds a new {@link TspublicRestV2GroupAddprivilegeRequest} object using the set fields. - * @return {@link TspublicRestV2GroupAddprivilegeRequest} - */ - public TspublicRestV2GroupAddprivilegeRequest build() { - return new TspublicRestV2GroupAddprivilegeRequest(name, id, privileges); - } - } -} diff --git a/Java/src/main/java/localhost/models/TspublicRestV2GroupAdduserRequest.java b/Java/src/main/java/localhost/models/TspublicRestV2GroupAdduserRequest.java deleted file mode 100644 index c20765b4b..000000000 --- a/Java/src/main/java/localhost/models/TspublicRestV2GroupAdduserRequest.java +++ /dev/null @@ -1,188 +0,0 @@ -/* - * ThoughtSpotPublicRESTAPILib - * - * This file was automatically generated by APIMATIC v3.0 ( https://www.apimatic.io ). - */ - -package localhost.models; - -import com.fasterxml.jackson.annotation.JsonGetter; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonSetter; -import io.apimatic.core.types.BaseModel; -import java.util.List; - -/** - * This is a model class for TspublicRestV2GroupAdduserRequest type. - */ -public class TspublicRestV2GroupAdduserRequest { - private String name; - private String id; - private List users; - - /** - * Default constructor. - */ - public TspublicRestV2GroupAdduserRequest() { - } - - /** - * Initialization constructor. - * @param users List of UserNameAndIDInput value for users. - * @param name String value for name. - * @param id String value for id. - */ - public TspublicRestV2GroupAdduserRequest( - List users, - String name, - String id) { - this.name = name; - this.id = id; - this.users = users; - } - - /** - * Getter for Name. - * Name of the group - * @return Returns the String - */ - @JsonGetter("name") - @JsonInclude(JsonInclude.Include.NON_NULL) - public String getName() { - return name; - } - - /** - * Setter for Name. - * Name of the group - * @param name Value for String - */ - @JsonSetter("name") - public void setName(String name) { - this.name = name; - } - - /** - * Getter for Id. - * The GUID of the group to query. - * @return Returns the String - */ - @JsonGetter("id") - @JsonInclude(JsonInclude.Include.NON_NULL) - public String getId() { - return id; - } - - /** - * Setter for Id. - * The GUID of the group to query. - * @param id Value for String - */ - @JsonSetter("id") - public void setId(String id) { - this.id = id; - } - - /** - * Getter for Users. - * Array of user name that you want to update in user group. - * @return Returns the List of UserNameAndIDInput - */ - @JsonGetter("users") - public List getUsers() { - return users; - } - - /** - * Setter for Users. - * Array of user name that you want to update in user group. - * @param users Value for List of UserNameAndIDInput - */ - @JsonSetter("users") - public void setUsers(List users) { - this.users = users; - } - - /** - * Converts this TspublicRestV2GroupAdduserRequest into string format. - * @return String representation of this class - */ - @Override - public String toString() { - return "TspublicRestV2GroupAdduserRequest [" + "users=" + users + ", name=" + name + ", id=" - + id + "]"; - } - - /** - * Builds a new {@link TspublicRestV2GroupAdduserRequest.Builder} object. - * Creates the instance with the state of the current model. - * @return a new {@link TspublicRestV2GroupAdduserRequest.Builder} object - */ - public Builder toBuilder() { - Builder builder = new Builder(users) - .name(getName()) - .id(getId()); - return builder; - } - - /** - * Class to build instances of {@link TspublicRestV2GroupAdduserRequest}. - */ - public static class Builder { - private List users; - private String name; - private String id; - - /** - * Initialization constructor. - */ - public Builder() { - } - - /** - * Initialization constructor. - * @param users List of UserNameAndIDInput value for users. - */ - public Builder(List users) { - this.users = users; - } - - /** - * Setter for users. - * @param users List of UserNameAndIDInput value for users. - * @return Builder - */ - public Builder users(List users) { - this.users = users; - return this; - } - - /** - * Setter for name. - * @param name String value for name. - * @return Builder - */ - public Builder name(String name) { - this.name = name; - return this; - } - - /** - * Setter for id. - * @param id String value for id. - * @return Builder - */ - public Builder id(String id) { - this.id = id; - return this; - } - - /** - * Builds a new {@link TspublicRestV2GroupAdduserRequest} object using the set fields. - * @return {@link TspublicRestV2GroupAdduserRequest} - */ - public TspublicRestV2GroupAdduserRequest build() { - return new TspublicRestV2GroupAdduserRequest(users, name, id); - } - } -} diff --git a/Java/src/main/java/localhost/models/TspublicRestV2GroupCreateRequest.java b/Java/src/main/java/localhost/models/TspublicRestV2GroupCreateRequest.java deleted file mode 100644 index a02b3edc5..000000000 --- a/Java/src/main/java/localhost/models/TspublicRestV2GroupCreateRequest.java +++ /dev/null @@ -1,423 +0,0 @@ -/* - * ThoughtSpotPublicRESTAPILib - * - * This file was automatically generated by APIMATIC v3.0 ( https://www.apimatic.io ). - */ - -package localhost.models; - -import com.fasterxml.jackson.annotation.JsonGetter; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonSetter; -import io.apimatic.core.types.BaseModel; -import java.util.List; - -/** - * This is a model class for TspublicRestV2GroupCreateRequest type. - */ -public class TspublicRestV2GroupCreateRequest { - private String name; - private String displayName; - private Visibility2Enum visibility; - private String description; - private List privileges; - private Integer orgId; - private List groups; - private List users; - private Type10Enum type; - - /** - * Default constructor. - */ - public TspublicRestV2GroupCreateRequest() { - visibility = Visibility2Enum.DEFAULT; - type = Type10Enum.LOCAL_GROUP; - } - - /** - * Initialization constructor. - * @param name String value for name. - * @param displayName String value for displayName. - * @param visibility Visibility2Enum value for visibility. - * @param description String value for description. - * @param privileges List of PrivilegeEnum value for privileges. - * @param orgId Integer value for orgId. - * @param groups List of GroupNameAndIDInput value for groups. - * @param users List of UserNameAndIDInput value for users. - * @param type Type10Enum value for type. - */ - public TspublicRestV2GroupCreateRequest( - String name, - String displayName, - Visibility2Enum visibility, - String description, - List privileges, - Integer orgId, - List groups, - List users, - Type10Enum type) { - this.name = name; - this.displayName = displayName; - this.visibility = visibility; - this.description = description; - this.privileges = privileges; - this.orgId = orgId; - this.groups = groups; - this.users = users; - this.type = type; - } - - /** - * Getter for Name. - * Name of the user group. The group name string must be unique. - * @return Returns the String - */ - @JsonGetter("name") - public String getName() { - return name; - } - - /** - * Setter for Name. - * Name of the user group. The group name string must be unique. - * @param name Value for String - */ - @JsonSetter("name") - public void setName(String name) { - this.name = name; - } - - /** - * Getter for DisplayName. - * A unique display name string for the user group, for example, Developer group. - * @return Returns the String - */ - @JsonGetter("displayName") - public String getDisplayName() { - return displayName; - } - - /** - * Setter for DisplayName. - * A unique display name string for the user group, for example, Developer group. - * @param displayName Value for String - */ - @JsonSetter("displayName") - public void setDisplayName(String displayName) { - this.displayName = displayName; - } - - /** - * Getter for Visibility. - * Visibility of the user group. The visibility attribute is set to DEFAULT. The DEFAULT - * attribute makes the user group visible for other user groups and allows them to share - * objects. - * @return Returns the Visibility2Enum - */ - @JsonGetter("visibility") - @JsonInclude(JsonInclude.Include.NON_NULL) - public Visibility2Enum getVisibility() { - return visibility; - } - - /** - * Setter for Visibility. - * Visibility of the user group. The visibility attribute is set to DEFAULT. The DEFAULT - * attribute makes the user group visible for other user groups and allows them to share - * objects. - * @param visibility Value for Visibility2Enum - */ - @JsonSetter("visibility") - public void setVisibility(Visibility2Enum visibility) { - this.visibility = visibility; - } - - /** - * Getter for Description. - * Description text for the group. - * @return Returns the String - */ - @JsonGetter("description") - @JsonInclude(JsonInclude.Include.NON_NULL) - public String getDescription() { - return description; - } - - /** - * Setter for Description. - * Description text for the group. - * @param description Value for String - */ - @JsonSetter("description") - public void setDescription(String description) { - this.description = description; - } - - /** - * Getter for Privileges. - * A JSON array of privileges assigned to the group - * @return Returns the List of PrivilegeEnum - */ - @JsonGetter("privileges") - @JsonInclude(JsonInclude.Include.NON_NULL) - public List getPrivileges() { - return privileges; - } - - /** - * Setter for Privileges. - * A JSON array of privileges assigned to the group - * @param privileges Value for List of PrivilegeEnum - */ - @JsonSetter("privileges") - public void setPrivileges(List privileges) { - this.privileges = privileges; - } - - /** - * Getter for OrgId. - * Unique identifier of the organization. If no value is provided then group will be created in - * the organization associated with the login session. - * @return Returns the Integer - */ - @JsonGetter("orgId") - @JsonInclude(JsonInclude.Include.NON_NULL) - public Integer getOrgId() { - return orgId; - } - - /** - * Setter for OrgId. - * Unique identifier of the organization. If no value is provided then group will be created in - * the organization associated with the login session. - * @param orgId Value for Integer - */ - @JsonSetter("orgId") - public void setOrgId(Integer orgId) { - this.orgId = orgId; - } - - /** - * Getter for Groups. - * Array of objects of groups that the group belong to. - * @return Returns the List of GroupNameAndIDInput - */ - @JsonGetter("groups") - @JsonInclude(JsonInclude.Include.NON_NULL) - public List getGroups() { - return groups; - } - - /** - * Setter for Groups. - * Array of objects of groups that the group belong to. - * @param groups Value for List of GroupNameAndIDInput - */ - @JsonSetter("groups") - public void setGroups(List groups) { - this.groups = groups; - } - - /** - * Getter for Users. - * Array of names of user names that the group belong to. - * @return Returns the List of UserNameAndIDInput - */ - @JsonGetter("users") - @JsonInclude(JsonInclude.Include.NON_NULL) - public List getUsers() { - return users; - } - - /** - * Setter for Users. - * Array of names of user names that the group belong to. - * @param users Value for List of UserNameAndIDInput - */ - @JsonSetter("users") - public void setUsers(List users) { - this.users = users; - } - - /** - * Getter for Type. - * Type of user group. LOCAL_GROUP indicates that the user is created locally in the ThoughtSpot - * system. - * @return Returns the Type10Enum - */ - @JsonGetter("type") - @JsonInclude(JsonInclude.Include.NON_NULL) - public Type10Enum getType() { - return type; - } - - /** - * Setter for Type. - * Type of user group. LOCAL_GROUP indicates that the user is created locally in the ThoughtSpot - * system. - * @param type Value for Type10Enum - */ - @JsonSetter("type") - public void setType(Type10Enum type) { - this.type = type; - } - - /** - * Converts this TspublicRestV2GroupCreateRequest into string format. - * @return String representation of this class - */ - @Override - public String toString() { - return "TspublicRestV2GroupCreateRequest [" + "name=" + name + ", displayName=" - + displayName + ", visibility=" + visibility + ", description=" + description - + ", privileges=" + privileges + ", orgId=" + orgId + ", groups=" + groups - + ", users=" + users + ", type=" + type + "]"; - } - - /** - * Builds a new {@link TspublicRestV2GroupCreateRequest.Builder} object. - * Creates the instance with the state of the current model. - * @return a new {@link TspublicRestV2GroupCreateRequest.Builder} object - */ - public Builder toBuilder() { - Builder builder = new Builder(name, displayName) - .visibility(getVisibility()) - .description(getDescription()) - .privileges(getPrivileges()) - .orgId(getOrgId()) - .groups(getGroups()) - .users(getUsers()) - .type(getType()); - return builder; - } - - /** - * Class to build instances of {@link TspublicRestV2GroupCreateRequest}. - */ - public static class Builder { - private String name; - private String displayName; - private Visibility2Enum visibility = Visibility2Enum.DEFAULT; - private String description; - private List privileges; - private Integer orgId; - private List groups; - private List users; - private Type10Enum type = Type10Enum.LOCAL_GROUP; - - /** - * Initialization constructor. - */ - public Builder() { - } - - /** - * Initialization constructor. - * @param name String value for name. - * @param displayName String value for displayName. - */ - public Builder(String name, String displayName) { - this.name = name; - this.displayName = displayName; - } - - /** - * Setter for name. - * @param name String value for name. - * @return Builder - */ - public Builder name(String name) { - this.name = name; - return this; - } - - /** - * Setter for displayName. - * @param displayName String value for displayName. - * @return Builder - */ - public Builder displayName(String displayName) { - this.displayName = displayName; - return this; - } - - /** - * Setter for visibility. - * @param visibility Visibility2Enum value for visibility. - * @return Builder - */ - public Builder visibility(Visibility2Enum visibility) { - this.visibility = visibility; - return this; - } - - /** - * Setter for description. - * @param description String value for description. - * @return Builder - */ - public Builder description(String description) { - this.description = description; - return this; - } - - /** - * Setter for privileges. - * @param privileges List of PrivilegeEnum value for privileges. - * @return Builder - */ - public Builder privileges(List privileges) { - this.privileges = privileges; - return this; - } - - /** - * Setter for orgId. - * @param orgId Integer value for orgId. - * @return Builder - */ - public Builder orgId(Integer orgId) { - this.orgId = orgId; - return this; - } - - /** - * Setter for groups. - * @param groups List of GroupNameAndIDInput value for groups. - * @return Builder - */ - public Builder groups(List groups) { - this.groups = groups; - return this; - } - - /** - * Setter for users. - * @param users List of UserNameAndIDInput value for users. - * @return Builder - */ - public Builder users(List users) { - this.users = users; - return this; - } - - /** - * Setter for type. - * @param type Type10Enum value for type. - * @return Builder - */ - public Builder type(Type10Enum type) { - this.type = type; - return this; - } - - /** - * Builds a new {@link TspublicRestV2GroupCreateRequest} object using the set fields. - * @return {@link TspublicRestV2GroupCreateRequest} - */ - public TspublicRestV2GroupCreateRequest build() { - return new TspublicRestV2GroupCreateRequest(name, displayName, visibility, description, - privileges, orgId, groups, users, type); - } - } -} diff --git a/Java/src/main/java/localhost/models/TspublicRestV2GroupRemovegroupRequest.java b/Java/src/main/java/localhost/models/TspublicRestV2GroupRemovegroupRequest.java deleted file mode 100644 index 50e171223..000000000 --- a/Java/src/main/java/localhost/models/TspublicRestV2GroupRemovegroupRequest.java +++ /dev/null @@ -1,188 +0,0 @@ -/* - * ThoughtSpotPublicRESTAPILib - * - * This file was automatically generated by APIMATIC v3.0 ( https://www.apimatic.io ). - */ - -package localhost.models; - -import com.fasterxml.jackson.annotation.JsonGetter; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonSetter; -import io.apimatic.core.types.BaseModel; -import java.util.List; - -/** - * This is a model class for TspublicRestV2GroupRemovegroupRequest type. - */ -public class TspublicRestV2GroupRemovegroupRequest { - private String name; - private String id; - private List groups; - - /** - * Default constructor. - */ - public TspublicRestV2GroupRemovegroupRequest() { - } - - /** - * Initialization constructor. - * @param groups List of GroupNameAndIDInput value for groups. - * @param name String value for name. - * @param id String value for id. - */ - public TspublicRestV2GroupRemovegroupRequest( - List groups, - String name, - String id) { - this.name = name; - this.id = id; - this.groups = groups; - } - - /** - * Getter for Name. - * Name of the group - * @return Returns the String - */ - @JsonGetter("name") - @JsonInclude(JsonInclude.Include.NON_NULL) - public String getName() { - return name; - } - - /** - * Setter for Name. - * Name of the group - * @param name Value for String - */ - @JsonSetter("name") - public void setName(String name) { - this.name = name; - } - - /** - * Getter for Id. - * The GUID of the group to query. - * @return Returns the String - */ - @JsonGetter("id") - @JsonInclude(JsonInclude.Include.NON_NULL) - public String getId() { - return id; - } - - /** - * Setter for Id. - * The GUID of the group to query. - * @param id Value for String - */ - @JsonSetter("id") - public void setId(String id) { - this.id = id; - } - - /** - * Getter for Groups. - * Array of objects of groups that the user belong to. - * @return Returns the List of GroupNameAndIDInput - */ - @JsonGetter("groups") - public List getGroups() { - return groups; - } - - /** - * Setter for Groups. - * Array of objects of groups that the user belong to. - * @param groups Value for List of GroupNameAndIDInput - */ - @JsonSetter("groups") - public void setGroups(List groups) { - this.groups = groups; - } - - /** - * Converts this TspublicRestV2GroupRemovegroupRequest into string format. - * @return String representation of this class - */ - @Override - public String toString() { - return "TspublicRestV2GroupRemovegroupRequest [" + "groups=" + groups + ", name=" + name - + ", id=" + id + "]"; - } - - /** - * Builds a new {@link TspublicRestV2GroupRemovegroupRequest.Builder} object. - * Creates the instance with the state of the current model. - * @return a new {@link TspublicRestV2GroupRemovegroupRequest.Builder} object - */ - public Builder toBuilder() { - Builder builder = new Builder(groups) - .name(getName()) - .id(getId()); - return builder; - } - - /** - * Class to build instances of {@link TspublicRestV2GroupRemovegroupRequest}. - */ - public static class Builder { - private List groups; - private String name; - private String id; - - /** - * Initialization constructor. - */ - public Builder() { - } - - /** - * Initialization constructor. - * @param groups List of GroupNameAndIDInput value for groups. - */ - public Builder(List groups) { - this.groups = groups; - } - - /** - * Setter for groups. - * @param groups List of GroupNameAndIDInput value for groups. - * @return Builder - */ - public Builder groups(List groups) { - this.groups = groups; - return this; - } - - /** - * Setter for name. - * @param name String value for name. - * @return Builder - */ - public Builder name(String name) { - this.name = name; - return this; - } - - /** - * Setter for id. - * @param id String value for id. - * @return Builder - */ - public Builder id(String id) { - this.id = id; - return this; - } - - /** - * Builds a new {@link TspublicRestV2GroupRemovegroupRequest} object using the set fields. - * @return {@link TspublicRestV2GroupRemovegroupRequest} - */ - public TspublicRestV2GroupRemovegroupRequest build() { - return new TspublicRestV2GroupRemovegroupRequest(groups, name, id); - } - } -} diff --git a/Java/src/main/java/localhost/models/TspublicRestV2GroupRemoveprivilegeRequest.java b/Java/src/main/java/localhost/models/TspublicRestV2GroupRemoveprivilegeRequest.java deleted file mode 100644 index 7a1c321ac..000000000 --- a/Java/src/main/java/localhost/models/TspublicRestV2GroupRemoveprivilegeRequest.java +++ /dev/null @@ -1,181 +0,0 @@ -/* - * ThoughtSpotPublicRESTAPILib - * - * This file was automatically generated by APIMATIC v3.0 ( https://www.apimatic.io ). - */ - -package localhost.models; - -import com.fasterxml.jackson.annotation.JsonGetter; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonSetter; -import io.apimatic.core.types.BaseModel; -import java.util.List; - -/** - * This is a model class for TspublicRestV2GroupRemoveprivilegeRequest type. - */ -public class TspublicRestV2GroupRemoveprivilegeRequest { - private String name; - private String id; - private List privileges; - - /** - * Default constructor. - */ - public TspublicRestV2GroupRemoveprivilegeRequest() { - } - - /** - * Initialization constructor. - * @param name String value for name. - * @param id String value for id. - * @param privileges List of PrivilegeEnum value for privileges. - */ - public TspublicRestV2GroupRemoveprivilegeRequest( - String name, - String id, - List privileges) { - this.name = name; - this.id = id; - this.privileges = privileges; - } - - /** - * Getter for Name. - * Name of the group - * @return Returns the String - */ - @JsonGetter("name") - @JsonInclude(JsonInclude.Include.NON_NULL) - public String getName() { - return name; - } - - /** - * Setter for Name. - * Name of the group - * @param name Value for String - */ - @JsonSetter("name") - public void setName(String name) { - this.name = name; - } - - /** - * Getter for Id. - * The GUID of the group to query. - * @return Returns the String - */ - @JsonGetter("id") - @JsonInclude(JsonInclude.Include.NON_NULL) - public String getId() { - return id; - } - - /** - * Setter for Id. - * The GUID of the group to query. - * @param id Value for String - */ - @JsonSetter("id") - public void setId(String id) { - this.id = id; - } - - /** - * Getter for Privileges. - * A JSON array of name of users or GUIDs of users or both. When both are given then id is - * considered - * @return Returns the List of PrivilegeEnum - */ - @JsonGetter("privileges") - @JsonInclude(JsonInclude.Include.NON_NULL) - public List getPrivileges() { - return privileges; - } - - /** - * Setter for Privileges. - * A JSON array of name of users or GUIDs of users or both. When both are given then id is - * considered - * @param privileges Value for List of PrivilegeEnum - */ - @JsonSetter("privileges") - public void setPrivileges(List privileges) { - this.privileges = privileges; - } - - /** - * Converts this TspublicRestV2GroupRemoveprivilegeRequest into string format. - * @return String representation of this class - */ - @Override - public String toString() { - return "TspublicRestV2GroupRemoveprivilegeRequest [" + "name=" + name + ", id=" + id - + ", privileges=" + privileges + "]"; - } - - /** - * Builds a new {@link TspublicRestV2GroupRemoveprivilegeRequest.Builder} object. - * Creates the instance with the state of the current model. - * @return a new {@link TspublicRestV2GroupRemoveprivilegeRequest.Builder} object - */ - public Builder toBuilder() { - Builder builder = new Builder() - .name(getName()) - .id(getId()) - .privileges(getPrivileges()); - return builder; - } - - /** - * Class to build instances of {@link TspublicRestV2GroupRemoveprivilegeRequest}. - */ - public static class Builder { - private String name; - private String id; - private List privileges; - - - - /** - * Setter for name. - * @param name String value for name. - * @return Builder - */ - public Builder name(String name) { - this.name = name; - return this; - } - - /** - * Setter for id. - * @param id String value for id. - * @return Builder - */ - public Builder id(String id) { - this.id = id; - return this; - } - - /** - * Setter for privileges. - * @param privileges List of PrivilegeEnum value for privileges. - * @return Builder - */ - public Builder privileges(List privileges) { - this.privileges = privileges; - return this; - } - - /** - * Builds a new {@link TspublicRestV2GroupRemoveprivilegeRequest} object using the set - * fields. - * @return {@link TspublicRestV2GroupRemoveprivilegeRequest} - */ - public TspublicRestV2GroupRemoveprivilegeRequest build() { - return new TspublicRestV2GroupRemoveprivilegeRequest(name, id, privileges); - } - } -} diff --git a/Java/src/main/java/localhost/models/TspublicRestV2GroupRemoveuserRequest.java b/Java/src/main/java/localhost/models/TspublicRestV2GroupRemoveuserRequest.java deleted file mode 100644 index 9bf2a0609..000000000 --- a/Java/src/main/java/localhost/models/TspublicRestV2GroupRemoveuserRequest.java +++ /dev/null @@ -1,188 +0,0 @@ -/* - * ThoughtSpotPublicRESTAPILib - * - * This file was automatically generated by APIMATIC v3.0 ( https://www.apimatic.io ). - */ - -package localhost.models; - -import com.fasterxml.jackson.annotation.JsonGetter; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonSetter; -import io.apimatic.core.types.BaseModel; -import java.util.List; - -/** - * This is a model class for TspublicRestV2GroupRemoveuserRequest type. - */ -public class TspublicRestV2GroupRemoveuserRequest { - private String name; - private String id; - private List users; - - /** - * Default constructor. - */ - public TspublicRestV2GroupRemoveuserRequest() { - } - - /** - * Initialization constructor. - * @param users List of UserNameAndIDInput value for users. - * @param name String value for name. - * @param id String value for id. - */ - public TspublicRestV2GroupRemoveuserRequest( - List users, - String name, - String id) { - this.name = name; - this.id = id; - this.users = users; - } - - /** - * Getter for Name. - * Name of the group - * @return Returns the String - */ - @JsonGetter("name") - @JsonInclude(JsonInclude.Include.NON_NULL) - public String getName() { - return name; - } - - /** - * Setter for Name. - * Name of the group - * @param name Value for String - */ - @JsonSetter("name") - public void setName(String name) { - this.name = name; - } - - /** - * Getter for Id. - * The GUID of the group to query. - * @return Returns the String - */ - @JsonGetter("id") - @JsonInclude(JsonInclude.Include.NON_NULL) - public String getId() { - return id; - } - - /** - * Setter for Id. - * The GUID of the group to query. - * @param id Value for String - */ - @JsonSetter("id") - public void setId(String id) { - this.id = id; - } - - /** - * Getter for Users. - * Array of user name that you want to delete from user group. - * @return Returns the List of UserNameAndIDInput - */ - @JsonGetter("users") - public List getUsers() { - return users; - } - - /** - * Setter for Users. - * Array of user name that you want to delete from user group. - * @param users Value for List of UserNameAndIDInput - */ - @JsonSetter("users") - public void setUsers(List users) { - this.users = users; - } - - /** - * Converts this TspublicRestV2GroupRemoveuserRequest into string format. - * @return String representation of this class - */ - @Override - public String toString() { - return "TspublicRestV2GroupRemoveuserRequest [" + "users=" + users + ", name=" + name - + ", id=" + id + "]"; - } - - /** - * Builds a new {@link TspublicRestV2GroupRemoveuserRequest.Builder} object. - * Creates the instance with the state of the current model. - * @return a new {@link TspublicRestV2GroupRemoveuserRequest.Builder} object - */ - public Builder toBuilder() { - Builder builder = new Builder(users) - .name(getName()) - .id(getId()); - return builder; - } - - /** - * Class to build instances of {@link TspublicRestV2GroupRemoveuserRequest}. - */ - public static class Builder { - private List users; - private String name; - private String id; - - /** - * Initialization constructor. - */ - public Builder() { - } - - /** - * Initialization constructor. - * @param users List of UserNameAndIDInput value for users. - */ - public Builder(List users) { - this.users = users; - } - - /** - * Setter for users. - * @param users List of UserNameAndIDInput value for users. - * @return Builder - */ - public Builder users(List users) { - this.users = users; - return this; - } - - /** - * Setter for name. - * @param name String value for name. - * @return Builder - */ - public Builder name(String name) { - this.name = name; - return this; - } - - /** - * Setter for id. - * @param id String value for id. - * @return Builder - */ - public Builder id(String id) { - this.id = id; - return this; - } - - /** - * Builds a new {@link TspublicRestV2GroupRemoveuserRequest} object using the set fields. - * @return {@link TspublicRestV2GroupRemoveuserRequest} - */ - public TspublicRestV2GroupRemoveuserRequest build() { - return new TspublicRestV2GroupRemoveuserRequest(users, name, id); - } - } -} diff --git a/Java/src/main/java/localhost/models/TspublicRestV2GroupSearchRequest.java b/Java/src/main/java/localhost/models/TspublicRestV2GroupSearchRequest.java deleted file mode 100644 index a04f82bde..000000000 --- a/Java/src/main/java/localhost/models/TspublicRestV2GroupSearchRequest.java +++ /dev/null @@ -1,446 +0,0 @@ -/* - * ThoughtSpotPublicRESTAPILib - * - * This file was automatically generated by APIMATIC v3.0 ( https://www.apimatic.io ). - */ - -package localhost.models; - -import com.fasterxml.jackson.annotation.JsonGetter; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonSetter; -import io.apimatic.core.types.BaseModel; -import java.util.List; - -/** - * This is a model class for TspublicRestV2GroupSearchRequest type. - */ -public class TspublicRestV2GroupSearchRequest { - private List outputFields; - private String name; - private String id; - private String displayName; - private String visibility; - private String description; - private List privileges; - private List groups; - private List users; - private String type; - - /** - * Default constructor. - */ - public TspublicRestV2GroupSearchRequest() { - } - - /** - * Initialization constructor. - * @param outputFields List of String value for outputFields. - * @param name String value for name. - * @param id String value for id. - * @param displayName String value for displayName. - * @param visibility String value for visibility. - * @param description String value for description. - * @param privileges List of PrivilegeEnum value for privileges. - * @param groups List of GroupNameAndIDInput value for groups. - * @param users List of UserNameAndIDInput value for users. - * @param type String value for type. - */ - public TspublicRestV2GroupSearchRequest( - List outputFields, - String name, - String id, - String displayName, - String visibility, - String description, - List privileges, - List groups, - List users, - String type) { - this.outputFields = outputFields; - this.name = name; - this.id = id; - this.displayName = displayName; - this.visibility = visibility; - this.description = description; - this.privileges = privileges; - this.groups = groups; - this.users = users; - this.type = type; - } - - /** - * Getter for OutputFields. - * Array of field names that need to be included in the response - * @return Returns the List of String - */ - @JsonGetter("outputFields") - @JsonInclude(JsonInclude.Include.NON_NULL) - public List getOutputFields() { - return outputFields; - } - - /** - * Setter for OutputFields. - * Array of field names that need to be included in the response - * @param outputFields Value for List of String - */ - @JsonSetter("outputFields") - public void setOutputFields(List outputFields) { - this.outputFields = outputFields; - } - - /** - * Getter for Name. - * Name of the user group - * @return Returns the String - */ - @JsonGetter("name") - @JsonInclude(JsonInclude.Include.NON_NULL) - public String getName() { - return name; - } - - /** - * Setter for Name. - * Name of the user group - * @param name Value for String - */ - @JsonSetter("name") - public void setName(String name) { - this.name = name; - } - - /** - * Getter for Id. - * GUID of the group to update - * @return Returns the String - */ - @JsonGetter("id") - @JsonInclude(JsonInclude.Include.NON_NULL) - public String getId() { - return id; - } - - /** - * Setter for Id. - * GUID of the group to update - * @param id Value for String - */ - @JsonSetter("id") - public void setId(String id) { - this.id = id; - } - - /** - * Getter for DisplayName. - * A unique display name string for the user group, for example, Developer group. - * @return Returns the String - */ - @JsonGetter("displayName") - @JsonInclude(JsonInclude.Include.NON_NULL) - public String getDisplayName() { - return displayName; - } - - /** - * Setter for DisplayName. - * A unique display name string for the user group, for example, Developer group. - * @param displayName Value for String - */ - @JsonSetter("displayName") - public void setDisplayName(String displayName) { - this.displayName = displayName; - } - - /** - * Getter for Visibility. - * Visibility of the user group. The visibility attribute is set to DEFAULT. The DEFAULT - * attribute makes the user group visible for other user groups and allows them to share - * objects. - * @return Returns the String - */ - @JsonGetter("visibility") - @JsonInclude(JsonInclude.Include.NON_NULL) - public String getVisibility() { - return visibility; - } - - /** - * Setter for Visibility. - * Visibility of the user group. The visibility attribute is set to DEFAULT. The DEFAULT - * attribute makes the user group visible for other user groups and allows them to share - * objects. - * @param visibility Value for String - */ - @JsonSetter("visibility") - public void setVisibility(String visibility) { - this.visibility = visibility; - } - - /** - * Getter for Description. - * Description text for the group. - * @return Returns the String - */ - @JsonGetter("description") - @JsonInclude(JsonInclude.Include.NON_NULL) - public String getDescription() { - return description; - } - - /** - * Setter for Description. - * Description text for the group. - * @param description Value for String - */ - @JsonSetter("description") - public void setDescription(String description) { - this.description = description; - } - - /** - * Getter for Privileges. - * A JSON array of privileges assigned to the group - * @return Returns the List of PrivilegeEnum - */ - @JsonGetter("privileges") - @JsonInclude(JsonInclude.Include.NON_NULL) - public List getPrivileges() { - return privileges; - } - - /** - * Setter for Privileges. - * A JSON array of privileges assigned to the group - * @param privileges Value for List of PrivilegeEnum - */ - @JsonSetter("privileges") - public void setPrivileges(List privileges) { - this.privileges = privileges; - } - - /** - * Getter for Groups. - * Array of objects of groups that the user belong to. - * @return Returns the List of GroupNameAndIDInput - */ - @JsonGetter("groups") - @JsonInclude(JsonInclude.Include.NON_NULL) - public List getGroups() { - return groups; - } - - /** - * Setter for Groups. - * Array of objects of groups that the user belong to. - * @param groups Value for List of GroupNameAndIDInput - */ - @JsonSetter("groups") - public void setGroups(List groups) { - this.groups = groups; - } - - /** - * Getter for Users. - * Array of user name that associated with group. - * @return Returns the List of UserNameAndIDInput - */ - @JsonGetter("users") - @JsonInclude(JsonInclude.Include.NON_NULL) - public List getUsers() { - return users; - } - - /** - * Setter for Users. - * Array of user name that associated with group. - * @param users Value for List of UserNameAndIDInput - */ - @JsonSetter("users") - public void setUsers(List users) { - this.users = users; - } - - /** - * Getter for Type. - * Type of user group. LOCAL_GROUP indicates that the user is created locally in the ThoughtSpot - * system. - * @return Returns the String - */ - @JsonGetter("type") - @JsonInclude(JsonInclude.Include.NON_NULL) - public String getType() { - return type; - } - - /** - * Setter for Type. - * Type of user group. LOCAL_GROUP indicates that the user is created locally in the ThoughtSpot - * system. - * @param type Value for String - */ - @JsonSetter("type") - public void setType(String type) { - this.type = type; - } - - /** - * Converts this TspublicRestV2GroupSearchRequest into string format. - * @return String representation of this class - */ - @Override - public String toString() { - return "TspublicRestV2GroupSearchRequest [" + "outputFields=" + outputFields + ", name=" - + name + ", id=" + id + ", displayName=" + displayName + ", visibility=" - + visibility + ", description=" + description + ", privileges=" + privileges - + ", groups=" + groups + ", users=" + users + ", type=" + type + "]"; - } - - /** - * Builds a new {@link TspublicRestV2GroupSearchRequest.Builder} object. - * Creates the instance with the state of the current model. - * @return a new {@link TspublicRestV2GroupSearchRequest.Builder} object - */ - public Builder toBuilder() { - Builder builder = new Builder() - .outputFields(getOutputFields()) - .name(getName()) - .id(getId()) - .displayName(getDisplayName()) - .visibility(getVisibility()) - .description(getDescription()) - .privileges(getPrivileges()) - .groups(getGroups()) - .users(getUsers()) - .type(getType()); - return builder; - } - - /** - * Class to build instances of {@link TspublicRestV2GroupSearchRequest}. - */ - public static class Builder { - private List outputFields; - private String name; - private String id; - private String displayName; - private String visibility; - private String description; - private List privileges; - private List groups; - private List users; - private String type; - - - - /** - * Setter for outputFields. - * @param outputFields List of String value for outputFields. - * @return Builder - */ - public Builder outputFields(List outputFields) { - this.outputFields = outputFields; - return this; - } - - /** - * Setter for name. - * @param name String value for name. - * @return Builder - */ - public Builder name(String name) { - this.name = name; - return this; - } - - /** - * Setter for id. - * @param id String value for id. - * @return Builder - */ - public Builder id(String id) { - this.id = id; - return this; - } - - /** - * Setter for displayName. - * @param displayName String value for displayName. - * @return Builder - */ - public Builder displayName(String displayName) { - this.displayName = displayName; - return this; - } - - /** - * Setter for visibility. - * @param visibility String value for visibility. - * @return Builder - */ - public Builder visibility(String visibility) { - this.visibility = visibility; - return this; - } - - /** - * Setter for description. - * @param description String value for description. - * @return Builder - */ - public Builder description(String description) { - this.description = description; - return this; - } - - /** - * Setter for privileges. - * @param privileges List of PrivilegeEnum value for privileges. - * @return Builder - */ - public Builder privileges(List privileges) { - this.privileges = privileges; - return this; - } - - /** - * Setter for groups. - * @param groups List of GroupNameAndIDInput value for groups. - * @return Builder - */ - public Builder groups(List groups) { - this.groups = groups; - return this; - } - - /** - * Setter for users. - * @param users List of UserNameAndIDInput value for users. - * @return Builder - */ - public Builder users(List users) { - this.users = users; - return this; - } - - /** - * Setter for type. - * @param type String value for type. - * @return Builder - */ - public Builder type(String type) { - this.type = type; - return this; - } - - /** - * Builds a new {@link TspublicRestV2GroupSearchRequest} object using the set fields. - * @return {@link TspublicRestV2GroupSearchRequest} - */ - public TspublicRestV2GroupSearchRequest build() { - return new TspublicRestV2GroupSearchRequest(outputFields, name, id, displayName, - visibility, description, privileges, groups, users, type); - } - } -} diff --git a/Java/src/main/java/localhost/models/TspublicRestV2GroupUpdateRequest.java b/Java/src/main/java/localhost/models/TspublicRestV2GroupUpdateRequest.java deleted file mode 100644 index c012b42a1..000000000 --- a/Java/src/main/java/localhost/models/TspublicRestV2GroupUpdateRequest.java +++ /dev/null @@ -1,448 +0,0 @@ -/* - * ThoughtSpotPublicRESTAPILib - * - * This file was automatically generated by APIMATIC v3.0 ( https://www.apimatic.io ). - */ - -package localhost.models; - -import com.fasterxml.jackson.annotation.JsonGetter; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonSetter; -import io.apimatic.core.types.BaseModel; -import java.util.List; - -/** - * This is a model class for TspublicRestV2GroupUpdateRequest type. - */ -public class TspublicRestV2GroupUpdateRequest { - private String name; - private String id; - private String displayName; - private Visibility2Enum visibility; - private String description; - private List privileges; - private List groups; - private List users; - private List assignedLiveboards; - private Type10Enum type; - - /** - * Default constructor. - */ - public TspublicRestV2GroupUpdateRequest() { - visibility = Visibility2Enum.DEFAULT; - type = Type10Enum.LOCAL_GROUP; - } - - /** - * Initialization constructor. - * @param name String value for name. - * @param id String value for id. - * @param displayName String value for displayName. - * @param visibility Visibility2Enum value for visibility. - * @param description String value for description. - * @param privileges List of PrivilegeEnum value for privileges. - * @param groups List of GroupNameAndIDInput value for groups. - * @param users List of UserNameAndIDInput value for users. - * @param assignedLiveboards List of String value for assignedLiveboards. - * @param type Type10Enum value for type. - */ - public TspublicRestV2GroupUpdateRequest( - String name, - String id, - String displayName, - Visibility2Enum visibility, - String description, - List privileges, - List groups, - List users, - List assignedLiveboards, - Type10Enum type) { - this.name = name; - this.id = id; - this.displayName = displayName; - this.visibility = visibility; - this.description = description; - this.privileges = privileges; - this.groups = groups; - this.users = users; - this.assignedLiveboards = assignedLiveboards; - this.type = type; - } - - /** - * Getter for Name. - * Name of the user group. The group name string must be unique. - * @return Returns the String - */ - @JsonGetter("name") - @JsonInclude(JsonInclude.Include.NON_NULL) - public String getName() { - return name; - } - - /** - * Setter for Name. - * Name of the user group. The group name string must be unique. - * @param name Value for String - */ - @JsonSetter("name") - public void setName(String name) { - this.name = name; - } - - /** - * Getter for Id. - * he GUID of the user account to query. - * @return Returns the String - */ - @JsonGetter("id") - @JsonInclude(JsonInclude.Include.NON_NULL) - public String getId() { - return id; - } - - /** - * Setter for Id. - * he GUID of the user account to query. - * @param id Value for String - */ - @JsonSetter("id") - public void setId(String id) { - this.id = id; - } - - /** - * Getter for DisplayName. - * A unique display name string for the user group, for example, Developer group. - * @return Returns the String - */ - @JsonGetter("displayName") - @JsonInclude(JsonInclude.Include.NON_NULL) - public String getDisplayName() { - return displayName; - } - - /** - * Setter for DisplayName. - * A unique display name string for the user group, for example, Developer group. - * @param displayName Value for String - */ - @JsonSetter("displayName") - public void setDisplayName(String displayName) { - this.displayName = displayName; - } - - /** - * Getter for Visibility. - * Visibility of the user group. The visibility attribute is set to DEFAULT. The DEFAULT - * attribute makes the user group visible for other user groups and allows them to share - * objects. - * @return Returns the Visibility2Enum - */ - @JsonGetter("visibility") - @JsonInclude(JsonInclude.Include.NON_NULL) - public Visibility2Enum getVisibility() { - return visibility; - } - - /** - * Setter for Visibility. - * Visibility of the user group. The visibility attribute is set to DEFAULT. The DEFAULT - * attribute makes the user group visible for other user groups and allows them to share - * objects. - * @param visibility Value for Visibility2Enum - */ - @JsonSetter("visibility") - public void setVisibility(Visibility2Enum visibility) { - this.visibility = visibility; - } - - /** - * Getter for Description. - * Description text for the group. - * @return Returns the String - */ - @JsonGetter("description") - @JsonInclude(JsonInclude.Include.NON_NULL) - public String getDescription() { - return description; - } - - /** - * Setter for Description. - * Description text for the group. - * @param description Value for String - */ - @JsonSetter("description") - public void setDescription(String description) { - this.description = description; - } - - /** - * Getter for Privileges. - * A JSON array of privileges assigned to the group - * @return Returns the List of PrivilegeEnum - */ - @JsonGetter("privileges") - @JsonInclude(JsonInclude.Include.NON_NULL) - public List getPrivileges() { - return privileges; - } - - /** - * Setter for Privileges. - * A JSON array of privileges assigned to the group - * @param privileges Value for List of PrivilegeEnum - */ - @JsonSetter("privileges") - public void setPrivileges(List privileges) { - this.privileges = privileges; - } - - /** - * Getter for Groups. - * Array of objects of groups that the user belong to. - * @return Returns the List of GroupNameAndIDInput - */ - @JsonGetter("groups") - @JsonInclude(JsonInclude.Include.NON_NULL) - public List getGroups() { - return groups; - } - - /** - * Setter for Groups. - * Array of objects of groups that the user belong to. - * @param groups Value for List of GroupNameAndIDInput - */ - @JsonSetter("groups") - public void setGroups(List groups) { - this.groups = groups; - } - - /** - * Getter for Users. - * Array of object, A JSON array of name of users of users. - * @return Returns the List of UserNameAndIDInput - */ - @JsonGetter("users") - @JsonInclude(JsonInclude.Include.NON_NULL) - public List getUsers() { - return users; - } - - /** - * Setter for Users. - * Array of object, A JSON array of name of users of users. - * @param users Value for List of UserNameAndIDInput - */ - @JsonSetter("users") - public void setUsers(List users) { - this.users = users; - } - - /** - * Getter for AssignedLiveboards. - * Array of string. An array of liveboard ids to be assigned to the group. - * @return Returns the List of String - */ - @JsonGetter("assignedLiveboards") - @JsonInclude(JsonInclude.Include.NON_NULL) - public List getAssignedLiveboards() { - return assignedLiveboards; - } - - /** - * Setter for AssignedLiveboards. - * Array of string. An array of liveboard ids to be assigned to the group. - * @param assignedLiveboards Value for List of String - */ - @JsonSetter("assignedLiveboards") - public void setAssignedLiveboards(List assignedLiveboards) { - this.assignedLiveboards = assignedLiveboards; - } - - /** - * Getter for Type. - * Type of user group. LOCAL_GROUP indicates that the user is created locally in the ThoughtSpot - * system. - * @return Returns the Type10Enum - */ - @JsonGetter("type") - @JsonInclude(JsonInclude.Include.NON_NULL) - public Type10Enum getType() { - return type; - } - - /** - * Setter for Type. - * Type of user group. LOCAL_GROUP indicates that the user is created locally in the ThoughtSpot - * system. - * @param type Value for Type10Enum - */ - @JsonSetter("type") - public void setType(Type10Enum type) { - this.type = type; - } - - /** - * Converts this TspublicRestV2GroupUpdateRequest into string format. - * @return String representation of this class - */ - @Override - public String toString() { - return "TspublicRestV2GroupUpdateRequest [" + "name=" + name + ", id=" + id - + ", displayName=" + displayName + ", visibility=" + visibility + ", description=" - + description + ", privileges=" + privileges + ", groups=" + groups + ", users=" - + users + ", assignedLiveboards=" + assignedLiveboards + ", type=" + type + "]"; - } - - /** - * Builds a new {@link TspublicRestV2GroupUpdateRequest.Builder} object. - * Creates the instance with the state of the current model. - * @return a new {@link TspublicRestV2GroupUpdateRequest.Builder} object - */ - public Builder toBuilder() { - Builder builder = new Builder() - .name(getName()) - .id(getId()) - .displayName(getDisplayName()) - .visibility(getVisibility()) - .description(getDescription()) - .privileges(getPrivileges()) - .groups(getGroups()) - .users(getUsers()) - .assignedLiveboards(getAssignedLiveboards()) - .type(getType()); - return builder; - } - - /** - * Class to build instances of {@link TspublicRestV2GroupUpdateRequest}. - */ - public static class Builder { - private String name; - private String id; - private String displayName; - private Visibility2Enum visibility = Visibility2Enum.DEFAULT; - private String description; - private List privileges; - private List groups; - private List users; - private List assignedLiveboards; - private Type10Enum type = Type10Enum.LOCAL_GROUP; - - - - /** - * Setter for name. - * @param name String value for name. - * @return Builder - */ - public Builder name(String name) { - this.name = name; - return this; - } - - /** - * Setter for id. - * @param id String value for id. - * @return Builder - */ - public Builder id(String id) { - this.id = id; - return this; - } - - /** - * Setter for displayName. - * @param displayName String value for displayName. - * @return Builder - */ - public Builder displayName(String displayName) { - this.displayName = displayName; - return this; - } - - /** - * Setter for visibility. - * @param visibility Visibility2Enum value for visibility. - * @return Builder - */ - public Builder visibility(Visibility2Enum visibility) { - this.visibility = visibility; - return this; - } - - /** - * Setter for description. - * @param description String value for description. - * @return Builder - */ - public Builder description(String description) { - this.description = description; - return this; - } - - /** - * Setter for privileges. - * @param privileges List of PrivilegeEnum value for privileges. - * @return Builder - */ - public Builder privileges(List privileges) { - this.privileges = privileges; - return this; - } - - /** - * Setter for groups. - * @param groups List of GroupNameAndIDInput value for groups. - * @return Builder - */ - public Builder groups(List groups) { - this.groups = groups; - return this; - } - - /** - * Setter for users. - * @param users List of UserNameAndIDInput value for users. - * @return Builder - */ - public Builder users(List users) { - this.users = users; - return this; - } - - /** - * Setter for assignedLiveboards. - * @param assignedLiveboards List of String value for assignedLiveboards. - * @return Builder - */ - public Builder assignedLiveboards(List assignedLiveboards) { - this.assignedLiveboards = assignedLiveboards; - return this; - } - - /** - * Setter for type. - * @param type Type10Enum value for type. - * @return Builder - */ - public Builder type(Type10Enum type) { - this.type = type; - return this; - } - - /** - * Builds a new {@link TspublicRestV2GroupUpdateRequest} object using the set fields. - * @return {@link TspublicRestV2GroupUpdateRequest} - */ - public TspublicRestV2GroupUpdateRequest build() { - return new TspublicRestV2GroupUpdateRequest(name, id, displayName, visibility, - description, privileges, groups, users, assignedLiveboards, type); - } - } -} diff --git a/Java/src/main/java/localhost/models/TspublicRestV2MaterializationRefreshviewRequest.java b/Java/src/main/java/localhost/models/TspublicRestV2MaterializationRefreshviewRequest.java deleted file mode 100644 index 4bf3c6fd7..000000000 --- a/Java/src/main/java/localhost/models/TspublicRestV2MaterializationRefreshviewRequest.java +++ /dev/null @@ -1,112 +0,0 @@ -/* - * ThoughtSpotPublicRESTAPILib - * - * This file was automatically generated by APIMATIC v3.0 ( https://www.apimatic.io ). - */ - -package localhost.models; - -import com.fasterxml.jackson.annotation.JsonGetter; -import com.fasterxml.jackson.annotation.JsonSetter; -import io.apimatic.core.types.BaseModel; - -/** - * This is a model class for TspublicRestV2MaterializationRefreshviewRequest type. - */ -public class TspublicRestV2MaterializationRefreshviewRequest { - private String id; - - /** - * Default constructor. - */ - public TspublicRestV2MaterializationRefreshviewRequest() { - } - - /** - * Initialization constructor. - * @param id String value for id. - */ - public TspublicRestV2MaterializationRefreshviewRequest( - String id) { - this.id = id; - } - - /** - * Getter for Id. - * GUID of metadata object - * @return Returns the String - */ - @JsonGetter("id") - public String getId() { - return id; - } - - /** - * Setter for Id. - * GUID of metadata object - * @param id Value for String - */ - @JsonSetter("id") - public void setId(String id) { - this.id = id; - } - - /** - * Converts this TspublicRestV2MaterializationRefreshviewRequest into string format. - * @return String representation of this class - */ - @Override - public String toString() { - return "TspublicRestV2MaterializationRefreshviewRequest [" + "id=" + id + "]"; - } - - /** - * Builds a new {@link TspublicRestV2MaterializationRefreshviewRequest.Builder} object. - * Creates the instance with the state of the current model. - * @return a new {@link TspublicRestV2MaterializationRefreshviewRequest.Builder} object - */ - public Builder toBuilder() { - Builder builder = new Builder(id); - return builder; - } - - /** - * Class to build instances of {@link TspublicRestV2MaterializationRefreshviewRequest}. - */ - public static class Builder { - private String id; - - /** - * Initialization constructor. - */ - public Builder() { - } - - /** - * Initialization constructor. - * @param id String value for id. - */ - public Builder(String id) { - this.id = id; - } - - /** - * Setter for id. - * @param id String value for id. - * @return Builder - */ - public Builder id(String id) { - this.id = id; - return this; - } - - /** - * Builds a new {@link TspublicRestV2MaterializationRefreshviewRequest} object using the set - * fields. - * @return {@link TspublicRestV2MaterializationRefreshviewRequest} - */ - public TspublicRestV2MaterializationRefreshviewRequest build() { - return new TspublicRestV2MaterializationRefreshviewRequest(id); - } - } -} diff --git a/Java/src/main/java/localhost/models/TspublicRestV2MetadataDependencyRequest.java b/Java/src/main/java/localhost/models/TspublicRestV2MetadataDependencyRequest.java deleted file mode 100644 index f6e66e75e..000000000 --- a/Java/src/main/java/localhost/models/TspublicRestV2MetadataDependencyRequest.java +++ /dev/null @@ -1,193 +0,0 @@ -/* - * ThoughtSpotPublicRESTAPILib - * - * This file was automatically generated by APIMATIC v3.0 ( https://www.apimatic.io ). - */ - -package localhost.models; - -import com.fasterxml.jackson.annotation.JsonGetter; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonSetter; -import io.apimatic.core.types.BaseModel; -import java.util.List; - -/** - * This is a model class for TspublicRestV2MetadataDependencyRequest type. - */ -public class TspublicRestV2MetadataDependencyRequest { - private Type13Enum type; - private List id; - private Integer batchSize; - - /** - * Default constructor. - */ - public TspublicRestV2MetadataDependencyRequest() { - batchSize = -1; - } - - /** - * Initialization constructor. - * @param type Type13Enum value for type. - * @param id List of String value for id. - * @param batchSize Integer value for batchSize. - */ - public TspublicRestV2MetadataDependencyRequest( - Type13Enum type, - List id, - Integer batchSize) { - this.type = type; - this.id = id; - this.batchSize = batchSize; - } - - /** - * Getter for Type. - * Type of the data object - * @return Returns the Type13Enum - */ - @JsonGetter("type") - public Type13Enum getType() { - return type; - } - - /** - * Setter for Type. - * Type of the data object - * @param type Value for Type13Enum - */ - @JsonSetter("type") - public void setType(Type13Enum type) { - this.type = type; - } - - /** - * Getter for Id. - * A JSON array of GUIDs of the objects - * @return Returns the List of String - */ - @JsonGetter("id") - public List getId() { - return id; - } - - /** - * Setter for Id. - * A JSON array of GUIDs of the objects - * @param id Value for List of String - */ - @JsonSetter("id") - public void setId(List id) { - this.id = id; - } - - /** - * Getter for BatchSize. - * The maximum number of batches to fetch in a query. If this attribute is not defined, the - * value specified in the cluster configuration is used. To get the list of all dependent - * objects in a single query, define the batch size attribute as -1 - * @return Returns the Integer - */ - @JsonGetter("batchSize") - @JsonInclude(JsonInclude.Include.NON_NULL) - public Integer getBatchSize() { - return batchSize; - } - - /** - * Setter for BatchSize. - * The maximum number of batches to fetch in a query. If this attribute is not defined, the - * value specified in the cluster configuration is used. To get the list of all dependent - * objects in a single query, define the batch size attribute as -1 - * @param batchSize Value for Integer - */ - @JsonSetter("batchSize") - public void setBatchSize(Integer batchSize) { - this.batchSize = batchSize; - } - - /** - * Converts this TspublicRestV2MetadataDependencyRequest into string format. - * @return String representation of this class - */ - @Override - public String toString() { - return "TspublicRestV2MetadataDependencyRequest [" + "type=" + type + ", id=" + id - + ", batchSize=" + batchSize + "]"; - } - - /** - * Builds a new {@link TspublicRestV2MetadataDependencyRequest.Builder} object. - * Creates the instance with the state of the current model. - * @return a new {@link TspublicRestV2MetadataDependencyRequest.Builder} object - */ - public Builder toBuilder() { - Builder builder = new Builder(type, id) - .batchSize(getBatchSize()); - return builder; - } - - /** - * Class to build instances of {@link TspublicRestV2MetadataDependencyRequest}. - */ - public static class Builder { - private Type13Enum type; - private List id; - private Integer batchSize = -1; - - /** - * Initialization constructor. - */ - public Builder() { - } - - /** - * Initialization constructor. - * @param type Type13Enum value for type. - * @param id List of String value for id. - */ - public Builder(Type13Enum type, List id) { - this.type = type; - this.id = id; - } - - /** - * Setter for type. - * @param type Type13Enum value for type. - * @return Builder - */ - public Builder type(Type13Enum type) { - this.type = type; - return this; - } - - /** - * Setter for id. - * @param id List of String value for id. - * @return Builder - */ - public Builder id(List id) { - this.id = id; - return this; - } - - /** - * Setter for batchSize. - * @param batchSize Integer value for batchSize. - * @return Builder - */ - public Builder batchSize(Integer batchSize) { - this.batchSize = batchSize; - return this; - } - - /** - * Builds a new {@link TspublicRestV2MetadataDependencyRequest} object using the set fields. - * @return {@link TspublicRestV2MetadataDependencyRequest} - */ - public TspublicRestV2MetadataDependencyRequest build() { - return new TspublicRestV2MetadataDependencyRequest(type, id, batchSize); - } - } -} diff --git a/Java/src/main/java/localhost/models/TspublicRestV2MetadataDetailSearchRequest.java b/Java/src/main/java/localhost/models/TspublicRestV2MetadataDetailSearchRequest.java deleted file mode 100644 index f9837cb46..000000000 --- a/Java/src/main/java/localhost/models/TspublicRestV2MetadataDetailSearchRequest.java +++ /dev/null @@ -1,273 +0,0 @@ -/* - * ThoughtSpotPublicRESTAPILib - * - * This file was automatically generated by APIMATIC v3.0 ( https://www.apimatic.io ). - */ - -package localhost.models; - -import com.fasterxml.jackson.annotation.JsonGetter; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonSetter; -import io.apimatic.core.types.BaseModel; -import java.util.List; - -/** - * This is a model class for TspublicRestV2MetadataDetailSearchRequest type. - */ -public class TspublicRestV2MetadataDetailSearchRequest { - private Type6Enum type; - private List id; - private Boolean showHidden; - private Boolean dropQuestionDetails; - private String version; - - /** - * Default constructor. - */ - public TspublicRestV2MetadataDetailSearchRequest() { - showHidden = false; - dropQuestionDetails = false; - } - - /** - * Initialization constructor. - * @param type Type6Enum value for type. - * @param id List of String value for id. - * @param showHidden Boolean value for showHidden. - * @param dropQuestionDetails Boolean value for dropQuestionDetails. - * @param version String value for version. - */ - public TspublicRestV2MetadataDetailSearchRequest( - Type6Enum type, - List id, - Boolean showHidden, - Boolean dropQuestionDetails, - String version) { - this.type = type; - this.id = id; - this.showHidden = showHidden; - this.dropQuestionDetails = dropQuestionDetails; - this.version = version; - } - - /** - * Getter for Type. - * Type of the metadata object being searched. - * @return Returns the Type6Enum - */ - @JsonGetter("type") - public Type6Enum getType() { - return type; - } - - /** - * Setter for Type. - * Type of the metadata object being searched. - * @param type Value for Type6Enum - */ - @JsonSetter("type") - public void setType(Type6Enum type) { - this.type = type; - } - - /** - * Getter for Id. - * A JSON array of GUIDs of the objects. - * @return Returns the List of String - */ - @JsonGetter("id") - public List getId() { - return id; - } - - /** - * Setter for Id. - * A JSON array of GUIDs of the objects. - * @param id Value for List of String - */ - @JsonSetter("id") - public void setId(List id) { - this.id = id; - } - - /** - * Getter for ShowHidden. - * When set to true, returns details of the hidden objects, such as a column in a worksheet or a - * table. - * @return Returns the Boolean - */ - @JsonGetter("showHidden") - @JsonInclude(JsonInclude.Include.NON_NULL) - public Boolean getShowHidden() { - return showHidden; - } - - /** - * Setter for ShowHidden. - * When set to true, returns details of the hidden objects, such as a column in a worksheet or a - * table. - * @param showHidden Value for Boolean - */ - @JsonSetter("showHidden") - public void setShowHidden(Boolean showHidden) { - this.showHidden = showHidden; - } - - /** - * Getter for DropQuestionDetails. - * When set to true, the search assist data associated with a worksheet is not included in the - * API response. This attribute is applicable only for DATAOBJECT data type. - * @return Returns the Boolean - */ - @JsonGetter("dropQuestionDetails") - @JsonInclude(JsonInclude.Include.NON_NULL) - public Boolean getDropQuestionDetails() { - return dropQuestionDetails; - } - - /** - * Setter for DropQuestionDetails. - * When set to true, the search assist data associated with a worksheet is not included in the - * API response. This attribute is applicable only for DATAOBJECT data type. - * @param dropQuestionDetails Value for Boolean - */ - @JsonSetter("dropQuestionDetails") - public void setDropQuestionDetails(Boolean dropQuestionDetails) { - this.dropQuestionDetails = dropQuestionDetails; - } - - /** - * Getter for Version. - * Specify the version to retrieve the objects from. By default, the API returns metadata for - * all versions of the object. - * @return Returns the String - */ - @JsonGetter("version") - @JsonInclude(JsonInclude.Include.NON_NULL) - public String getVersion() { - return version; - } - - /** - * Setter for Version. - * Specify the version to retrieve the objects from. By default, the API returns metadata for - * all versions of the object. - * @param version Value for String - */ - @JsonSetter("version") - public void setVersion(String version) { - this.version = version; - } - - /** - * Converts this TspublicRestV2MetadataDetailSearchRequest into string format. - * @return String representation of this class - */ - @Override - public String toString() { - return "TspublicRestV2MetadataDetailSearchRequest [" + "type=" + type + ", id=" + id - + ", showHidden=" + showHidden + ", dropQuestionDetails=" + dropQuestionDetails - + ", version=" + version + "]"; - } - - /** - * Builds a new {@link TspublicRestV2MetadataDetailSearchRequest.Builder} object. - * Creates the instance with the state of the current model. - * @return a new {@link TspublicRestV2MetadataDetailSearchRequest.Builder} object - */ - public Builder toBuilder() { - Builder builder = new Builder(type, id) - .showHidden(getShowHidden()) - .dropQuestionDetails(getDropQuestionDetails()) - .version(getVersion()); - return builder; - } - - /** - * Class to build instances of {@link TspublicRestV2MetadataDetailSearchRequest}. - */ - public static class Builder { - private Type6Enum type; - private List id; - private Boolean showHidden = false; - private Boolean dropQuestionDetails = false; - private String version; - - /** - * Initialization constructor. - */ - public Builder() { - } - - /** - * Initialization constructor. - * @param type Type6Enum value for type. - * @param id List of String value for id. - */ - public Builder(Type6Enum type, List id) { - this.type = type; - this.id = id; - } - - /** - * Setter for type. - * @param type Type6Enum value for type. - * @return Builder - */ - public Builder type(Type6Enum type) { - this.type = type; - return this; - } - - /** - * Setter for id. - * @param id List of String value for id. - * @return Builder - */ - public Builder id(List id) { - this.id = id; - return this; - } - - /** - * Setter for showHidden. - * @param showHidden Boolean value for showHidden. - * @return Builder - */ - public Builder showHidden(Boolean showHidden) { - this.showHidden = showHidden; - return this; - } - - /** - * Setter for dropQuestionDetails. - * @param dropQuestionDetails Boolean value for dropQuestionDetails. - * @return Builder - */ - public Builder dropQuestionDetails(Boolean dropQuestionDetails) { - this.dropQuestionDetails = dropQuestionDetails; - return this; - } - - /** - * Setter for version. - * @param version String value for version. - * @return Builder - */ - public Builder version(String version) { - this.version = version; - return this; - } - - /** - * Builds a new {@link TspublicRestV2MetadataDetailSearchRequest} object using the set - * fields. - * @return {@link TspublicRestV2MetadataDetailSearchRequest} - */ - public TspublicRestV2MetadataDetailSearchRequest build() { - return new TspublicRestV2MetadataDetailSearchRequest(type, id, showHidden, - dropQuestionDetails, version); - } - } -} diff --git a/Java/src/main/java/localhost/models/TspublicRestV2MetadataFavoriteAssignRequest.java b/Java/src/main/java/localhost/models/TspublicRestV2MetadataFavoriteAssignRequest.java deleted file mode 100644 index bacdfa9a1..000000000 --- a/Java/src/main/java/localhost/models/TspublicRestV2MetadataFavoriteAssignRequest.java +++ /dev/null @@ -1,189 +0,0 @@ -/* - * ThoughtSpotPublicRESTAPILib - * - * This file was automatically generated by APIMATIC v3.0 ( https://www.apimatic.io ). - */ - -package localhost.models; - -import com.fasterxml.jackson.annotation.JsonGetter; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonSetter; -import io.apimatic.core.types.BaseModel; -import java.util.List; - -/** - * This is a model class for TspublicRestV2MetadataFavoriteAssignRequest type. - */ -public class TspublicRestV2MetadataFavoriteAssignRequest { - private String userName; - private String userId; - private List tsObject; - - /** - * Default constructor. - */ - public TspublicRestV2MetadataFavoriteAssignRequest() { - } - - /** - * Initialization constructor. - * @param tsObject List of TsObjectInput value for tsObject. - * @param userName String value for userName. - * @param userId String value for userId. - */ - public TspublicRestV2MetadataFavoriteAssignRequest( - List tsObject, - String userName, - String userId) { - this.userName = userName; - this.userId = userId; - this.tsObject = tsObject; - } - - /** - * Getter for UserName. - * Name of the user - * @return Returns the String - */ - @JsonGetter("userName") - @JsonInclude(JsonInclude.Include.NON_NULL) - public String getUserName() { - return userName; - } - - /** - * Setter for UserName. - * Name of the user - * @param userName Value for String - */ - @JsonSetter("userName") - public void setUserName(String userName) { - this.userName = userName; - } - - /** - * Getter for UserId. - * The GUID of the user - * @return Returns the String - */ - @JsonGetter("userId") - @JsonInclude(JsonInclude.Include.NON_NULL) - public String getUserId() { - return userId; - } - - /** - * Setter for UserId. - * The GUID of the user - * @param userId Value for String - */ - @JsonSetter("userId") - public void setUserId(String userId) { - this.userId = userId; - } - - /** - * Getter for TsObject. - * A JSON Array of GUIDs and type of metadata object. - * @return Returns the List of TsObjectInput - */ - @JsonGetter("tsObject") - public List getTsObject() { - return tsObject; - } - - /** - * Setter for TsObject. - * A JSON Array of GUIDs and type of metadata object. - * @param tsObject Value for List of TsObjectInput - */ - @JsonSetter("tsObject") - public void setTsObject(List tsObject) { - this.tsObject = tsObject; - } - - /** - * Converts this TspublicRestV2MetadataFavoriteAssignRequest into string format. - * @return String representation of this class - */ - @Override - public String toString() { - return "TspublicRestV2MetadataFavoriteAssignRequest [" + "tsObject=" + tsObject - + ", userName=" + userName + ", userId=" + userId + "]"; - } - - /** - * Builds a new {@link TspublicRestV2MetadataFavoriteAssignRequest.Builder} object. - * Creates the instance with the state of the current model. - * @return a new {@link TspublicRestV2MetadataFavoriteAssignRequest.Builder} object - */ - public Builder toBuilder() { - Builder builder = new Builder(tsObject) - .userName(getUserName()) - .userId(getUserId()); - return builder; - } - - /** - * Class to build instances of {@link TspublicRestV2MetadataFavoriteAssignRequest}. - */ - public static class Builder { - private List tsObject; - private String userName; - private String userId; - - /** - * Initialization constructor. - */ - public Builder() { - } - - /** - * Initialization constructor. - * @param tsObject List of TsObjectInput value for tsObject. - */ - public Builder(List tsObject) { - this.tsObject = tsObject; - } - - /** - * Setter for tsObject. - * @param tsObject List of TsObjectInput value for tsObject. - * @return Builder - */ - public Builder tsObject(List tsObject) { - this.tsObject = tsObject; - return this; - } - - /** - * Setter for userName. - * @param userName String value for userName. - * @return Builder - */ - public Builder userName(String userName) { - this.userName = userName; - return this; - } - - /** - * Setter for userId. - * @param userId String value for userId. - * @return Builder - */ - public Builder userId(String userId) { - this.userId = userId; - return this; - } - - /** - * Builds a new {@link TspublicRestV2MetadataFavoriteAssignRequest} object using the set - * fields. - * @return {@link TspublicRestV2MetadataFavoriteAssignRequest} - */ - public TspublicRestV2MetadataFavoriteAssignRequest build() { - return new TspublicRestV2MetadataFavoriteAssignRequest(tsObject, userName, userId); - } - } -} diff --git a/Java/src/main/java/localhost/models/TspublicRestV2MetadataFavoriteUnassignRequest.java b/Java/src/main/java/localhost/models/TspublicRestV2MetadataFavoriteUnassignRequest.java deleted file mode 100644 index c8bc35a81..000000000 --- a/Java/src/main/java/localhost/models/TspublicRestV2MetadataFavoriteUnassignRequest.java +++ /dev/null @@ -1,189 +0,0 @@ -/* - * ThoughtSpotPublicRESTAPILib - * - * This file was automatically generated by APIMATIC v3.0 ( https://www.apimatic.io ). - */ - -package localhost.models; - -import com.fasterxml.jackson.annotation.JsonGetter; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonSetter; -import io.apimatic.core.types.BaseModel; -import java.util.List; - -/** - * This is a model class for TspublicRestV2MetadataFavoriteUnassignRequest type. - */ -public class TspublicRestV2MetadataFavoriteUnassignRequest { - private String userName; - private String userId; - private List tsObject; - - /** - * Default constructor. - */ - public TspublicRestV2MetadataFavoriteUnassignRequest() { - } - - /** - * Initialization constructor. - * @param tsObject List of TsObjectInput value for tsObject. - * @param userName String value for userName. - * @param userId String value for userId. - */ - public TspublicRestV2MetadataFavoriteUnassignRequest( - List tsObject, - String userName, - String userId) { - this.userName = userName; - this.userId = userId; - this.tsObject = tsObject; - } - - /** - * Getter for UserName. - * Name of the user - * @return Returns the String - */ - @JsonGetter("userName") - @JsonInclude(JsonInclude.Include.NON_NULL) - public String getUserName() { - return userName; - } - - /** - * Setter for UserName. - * Name of the user - * @param userName Value for String - */ - @JsonSetter("userName") - public void setUserName(String userName) { - this.userName = userName; - } - - /** - * Getter for UserId. - * The GUID of the user - * @return Returns the String - */ - @JsonGetter("userId") - @JsonInclude(JsonInclude.Include.NON_NULL) - public String getUserId() { - return userId; - } - - /** - * Setter for UserId. - * The GUID of the user - * @param userId Value for String - */ - @JsonSetter("userId") - public void setUserId(String userId) { - this.userId = userId; - } - - /** - * Getter for TsObject. - * A JSON Array of GUIDs and type of metadata object. - * @return Returns the List of TsObjectInput - */ - @JsonGetter("tsObject") - public List getTsObject() { - return tsObject; - } - - /** - * Setter for TsObject. - * A JSON Array of GUIDs and type of metadata object. - * @param tsObject Value for List of TsObjectInput - */ - @JsonSetter("tsObject") - public void setTsObject(List tsObject) { - this.tsObject = tsObject; - } - - /** - * Converts this TspublicRestV2MetadataFavoriteUnassignRequest into string format. - * @return String representation of this class - */ - @Override - public String toString() { - return "TspublicRestV2MetadataFavoriteUnassignRequest [" + "tsObject=" + tsObject - + ", userName=" + userName + ", userId=" + userId + "]"; - } - - /** - * Builds a new {@link TspublicRestV2MetadataFavoriteUnassignRequest.Builder} object. - * Creates the instance with the state of the current model. - * @return a new {@link TspublicRestV2MetadataFavoriteUnassignRequest.Builder} object - */ - public Builder toBuilder() { - Builder builder = new Builder(tsObject) - .userName(getUserName()) - .userId(getUserId()); - return builder; - } - - /** - * Class to build instances of {@link TspublicRestV2MetadataFavoriteUnassignRequest}. - */ - public static class Builder { - private List tsObject; - private String userName; - private String userId; - - /** - * Initialization constructor. - */ - public Builder() { - } - - /** - * Initialization constructor. - * @param tsObject List of TsObjectInput value for tsObject. - */ - public Builder(List tsObject) { - this.tsObject = tsObject; - } - - /** - * Setter for tsObject. - * @param tsObject List of TsObjectInput value for tsObject. - * @return Builder - */ - public Builder tsObject(List tsObject) { - this.tsObject = tsObject; - return this; - } - - /** - * Setter for userName. - * @param userName String value for userName. - * @return Builder - */ - public Builder userName(String userName) { - this.userName = userName; - return this; - } - - /** - * Setter for userId. - * @param userId String value for userId. - * @return Builder - */ - public Builder userId(String userId) { - this.userId = userId; - return this; - } - - /** - * Builds a new {@link TspublicRestV2MetadataFavoriteUnassignRequest} object using the set - * fields. - * @return {@link TspublicRestV2MetadataFavoriteUnassignRequest} - */ - public TspublicRestV2MetadataFavoriteUnassignRequest build() { - return new TspublicRestV2MetadataFavoriteUnassignRequest(tsObject, userName, userId); - } - } -} diff --git a/Java/src/main/java/localhost/models/TspublicRestV2MetadataHeaderSearchRequest.java b/Java/src/main/java/localhost/models/TspublicRestV2MetadataHeaderSearchRequest.java deleted file mode 100644 index 819bae93e..000000000 --- a/Java/src/main/java/localhost/models/TspublicRestV2MetadataHeaderSearchRequest.java +++ /dev/null @@ -1,759 +0,0 @@ -/* - * ThoughtSpotPublicRESTAPILib - * - * This file was automatically generated by APIMATIC v3.0 ( https://www.apimatic.io ). - */ - -package localhost.models; - -import com.fasterxml.jackson.annotation.JsonGetter; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonSetter; -import io.apimatic.core.types.BaseModel; -import java.util.List; - -/** - * This is a model class for TspublicRestV2MetadataHeaderSearchRequest type. - */ -public class TspublicRestV2MetadataHeaderSearchRequest { - private List outputFields; - private Integer offset; - private Integer batchNumber; - private Integer batchSize; - private SortByEnum sortBy; - private SortOrderEnum sortOrder; - private Type3Enum type; - private String namePattern; - private List fetchId; - private List skipId; - private Boolean showHidden; - private Boolean autoCreated; - private List accessLevel; - private List tag; - private List favoriteFor; - private List author; - private List lastModifiedBy; - - /** - * Default constructor. - */ - public TspublicRestV2MetadataHeaderSearchRequest() { - offset = 0; - batchSize = -1; - sortBy = SortByEnum.DEFAULT; - sortOrder = SortOrderEnum.DEFAULT; - showHidden = false; - } - - /** - * Initialization constructor. - * @param type Type3Enum value for type. - * @param outputFields List of String value for outputFields. - * @param offset Integer value for offset. - * @param batchNumber Integer value for batchNumber. - * @param batchSize Integer value for batchSize. - * @param sortBy SortByEnum value for sortBy. - * @param sortOrder SortOrderEnum value for sortOrder. - * @param namePattern String value for namePattern. - * @param fetchId List of String value for fetchId. - * @param skipId List of String value for skipId. - * @param showHidden Boolean value for showHidden. - * @param autoCreated Boolean value for autoCreated. - * @param accessLevel List of AccessLevelInput value for accessLevel. - * @param tag List of TagNameAndIdInput value for tag. - * @param favoriteFor List of NameAndIdInput value for favoriteFor. - * @param author List of NameAndIdInput value for author. - * @param lastModifiedBy List of NameAndIdInput value for lastModifiedBy. - */ - public TspublicRestV2MetadataHeaderSearchRequest( - Type3Enum type, - List outputFields, - Integer offset, - Integer batchNumber, - Integer batchSize, - SortByEnum sortBy, - SortOrderEnum sortOrder, - String namePattern, - List fetchId, - List skipId, - Boolean showHidden, - Boolean autoCreated, - List accessLevel, - List tag, - List favoriteFor, - List author, - List lastModifiedBy) { - this.outputFields = outputFields; - this.offset = offset; - this.batchNumber = batchNumber; - this.batchSize = batchSize; - this.sortBy = sortBy; - this.sortOrder = sortOrder; - this.type = type; - this.namePattern = namePattern; - this.fetchId = fetchId; - this.skipId = skipId; - this.showHidden = showHidden; - this.autoCreated = autoCreated; - this.accessLevel = accessLevel; - this.tag = tag; - this.favoriteFor = favoriteFor; - this.author = author; - this.lastModifiedBy = lastModifiedBy; - } - - /** - * Getter for OutputFields. - * Array of header field names that need to be included in the header response - * @return Returns the List of String - */ - @JsonGetter("outputFields") - @JsonInclude(JsonInclude.Include.NON_NULL) - public List getOutputFields() { - return outputFields; - } - - /** - * Setter for OutputFields. - * Array of header field names that need to be included in the header response - * @param outputFields Value for List of String - */ - @JsonSetter("outputFields") - public void setOutputFields(List outputFields) { - this.outputFields = outputFields; - } - - /** - * Getter for Offset. - * The batch offset, starting from where the records should be included in the response. If no - * input is provided then offset starts from 0. Default: 0 - * @return Returns the Integer - */ - @JsonGetter("offset") - @JsonInclude(JsonInclude.Include.NON_NULL) - public Integer getOffset() { - return offset; - } - - /** - * Setter for Offset. - * The batch offset, starting from where the records should be included in the response. If no - * input is provided then offset starts from 0. Default: 0 - * @param offset Value for Integer - */ - @JsonSetter("offset") - public void setOffset(Integer offset) { - this.offset = offset; - } - - /** - * Getter for BatchNumber. - * An alternate way to set offset for the starting point of the response. The value in offset - * field will not be considered if batchNumber field has value greater than 0. Offset value will - * be calculated as (batchNumber - 1) * batchSize. It is mandatory to provide a value for - * batchSize with batchNumber. Example: Assume response has 100 records. Now, batchNumber is set - * as 2 and batchSize as 10, then offset value will be 10. So, 10 records starting from 11th - * record will be considered. - * @return Returns the Integer - */ - @JsonGetter("batchNumber") - @JsonInclude(JsonInclude.Include.NON_NULL) - public Integer getBatchNumber() { - return batchNumber; - } - - /** - * Setter for BatchNumber. - * An alternate way to set offset for the starting point of the response. The value in offset - * field will not be considered if batchNumber field has value greater than 0. Offset value will - * be calculated as (batchNumber - 1) * batchSize. It is mandatory to provide a value for - * batchSize with batchNumber. Example: Assume response has 100 records. Now, batchNumber is set - * as 2 and batchSize as 10, then offset value will be 10. So, 10 records starting from 11th - * record will be considered. - * @param batchNumber Value for Integer - */ - @JsonSetter("batchNumber") - public void setBatchNumber(Integer batchNumber) { - this.batchNumber = batchNumber; - } - - /** - * Getter for BatchSize. - * The number of records that should be included in the response starting from offset position. - * If no input is provided then first page is included in the response. - * @return Returns the Integer - */ - @JsonGetter("batchSize") - @JsonInclude(JsonInclude.Include.NON_NULL) - public Integer getBatchSize() { - return batchSize; - } - - /** - * Setter for BatchSize. - * The number of records that should be included in the response starting from offset position. - * If no input is provided then first page is included in the response. - * @param batchSize Value for Integer - */ - @JsonSetter("batchSize") - public void setBatchSize(Integer batchSize) { - this.batchSize = batchSize; - } - - /** - * Getter for SortBy. - * Field based on which the response needs to be ordered. - * @return Returns the SortByEnum - */ - @JsonGetter("sortBy") - @JsonInclude(JsonInclude.Include.NON_NULL) - public SortByEnum getSortBy() { - return sortBy; - } - - /** - * Setter for SortBy. - * Field based on which the response needs to be ordered. - * @param sortBy Value for SortByEnum - */ - @JsonSetter("sortBy") - public void setSortBy(SortByEnum sortBy) { - this.sortBy = sortBy; - } - - /** - * Getter for SortOrder. - * Order in which sortBy should be applied. - * @return Returns the SortOrderEnum - */ - @JsonGetter("sortOrder") - @JsonInclude(JsonInclude.Include.NON_NULL) - public SortOrderEnum getSortOrder() { - return sortOrder; - } - - /** - * Setter for SortOrder. - * Order in which sortBy should be applied. - * @param sortOrder Value for SortOrderEnum - */ - @JsonSetter("sortOrder") - public void setSortOrder(SortOrderEnum sortOrder) { - this.sortOrder = sortOrder; - } - - /** - * Getter for Type. - * Type of the metadata object being searched. - * @return Returns the Type3Enum - */ - @JsonGetter("type") - public Type3Enum getType() { - return type; - } - - /** - * Setter for Type. - * Type of the metadata object being searched. - * @param type Value for Type3Enum - */ - @JsonSetter("type") - public void setType(Type3Enum type) { - this.type = type; - } - - /** - * Getter for NamePattern. - * A pattern to match the name of the metadata object. This parameter supports matching - * case-insensitive strings. For a wildcard match, use %. - * @return Returns the String - */ - @JsonGetter("namePattern") - @JsonInclude(JsonInclude.Include.NON_NULL) - public String getNamePattern() { - return namePattern; - } - - /** - * Setter for NamePattern. - * A pattern to match the name of the metadata object. This parameter supports matching - * case-insensitive strings. For a wildcard match, use %. - * @param namePattern Value for String - */ - @JsonSetter("namePattern") - public void setNamePattern(String namePattern) { - this.namePattern = namePattern; - } - - /** - * Getter for FetchId. - * A JSON array containing the GUIDs of the metadata objects that you want to fetch. - * @return Returns the List of String - */ - @JsonGetter("fetchId") - @JsonInclude(JsonInclude.Include.NON_NULL) - public List getFetchId() { - return fetchId; - } - - /** - * Setter for FetchId. - * A JSON array containing the GUIDs of the metadata objects that you want to fetch. - * @param fetchId Value for List of String - */ - @JsonSetter("fetchId") - public void setFetchId(List fetchId) { - this.fetchId = fetchId; - } - - /** - * Getter for SkipId. - * A JSON array containing the GUIDs of the metadata objects that you want to skip. - * @return Returns the List of String - */ - @JsonGetter("skipId") - @JsonInclude(JsonInclude.Include.NON_NULL) - public List getSkipId() { - return skipId; - } - - /** - * Setter for SkipId. - * A JSON array containing the GUIDs of the metadata objects that you want to skip. - * @param skipId Value for List of String - */ - @JsonSetter("skipId") - public void setSkipId(List skipId) { - this.skipId = skipId; - } - - /** - * Getter for ShowHidden. - * When set to true, returns details of the hidden objects, such as a column in a worksheet or a - * table. - * @return Returns the Boolean - */ - @JsonGetter("showHidden") - @JsonInclude(JsonInclude.Include.NON_NULL) - public Boolean getShowHidden() { - return showHidden; - } - - /** - * Setter for ShowHidden. - * When set to true, returns details of the hidden objects, such as a column in a worksheet or a - * table. - * @param showHidden Value for Boolean - */ - @JsonSetter("showHidden") - public void setShowHidden(Boolean showHidden) { - this.showHidden = showHidden; - } - - /** - * Getter for AutoCreated. - * A flag to indicate whether to list only the auto created objects. When no value is provided - * as input then all objects are returned. - * @return Returns the Boolean - */ - @JsonGetter("autoCreated") - @JsonInclude(JsonInclude.Include.NON_NULL) - public Boolean getAutoCreated() { - return autoCreated; - } - - /** - * Setter for AutoCreated. - * A flag to indicate whether to list only the auto created objects. When no value is provided - * as input then all objects are returned. - * @param autoCreated Value for Boolean - */ - @JsonSetter("autoCreated") - public void setAutoCreated(Boolean autoCreated) { - this.autoCreated = autoCreated; - } - - /** - * Getter for AccessLevel. - * A JSON array of objects with user details for which the metadata objects should be considered - * from the repository If you specify ID or name of user and set the type parameter to USER, the - * API returns metadata objects associated with the user If you specify ID or name of user group - * and set the type parameter to USER_GROUP, the API returns metadata objects for all the users - * mapped to the specified user group. If the id or name parameter is not defined, but the type - * attribute is set to USER or USER_GROUP, then the API will not return and response. If no - * input is provided for any field for this object, then the API returns headers for all users. - * If both name and id is provided, then id will be considered. - * @return Returns the List of AccessLevelInput - */ - @JsonGetter("accessLevel") - @JsonInclude(JsonInclude.Include.NON_NULL) - public List getAccessLevel() { - return accessLevel; - } - - /** - * Setter for AccessLevel. - * A JSON array of objects with user details for which the metadata objects should be considered - * from the repository If you specify ID or name of user and set the type parameter to USER, the - * API returns metadata objects associated with the user If you specify ID or name of user group - * and set the type parameter to USER_GROUP, the API returns metadata objects for all the users - * mapped to the specified user group. If the id or name parameter is not defined, but the type - * attribute is set to USER or USER_GROUP, then the API will not return and response. If no - * input is provided for any field for this object, then the API returns headers for all users. - * If both name and id is provided, then id will be considered. - * @param accessLevel Value for List of AccessLevelInput - */ - @JsonSetter("accessLevel") - public void setAccessLevel(List accessLevel) { - this.accessLevel = accessLevel; - } - - /** - * Getter for Tag. - * A JSON array of name or GUID of tags or both. When both are given then id is considered. - * @return Returns the List of TagNameAndIdInput - */ - @JsonGetter("tag") - @JsonInclude(JsonInclude.Include.NON_NULL) - public List getTag() { - return tag; - } - - /** - * Setter for Tag. - * A JSON array of name or GUID of tags or both. When both are given then id is considered. - * @param tag Value for List of TagNameAndIdInput - */ - @JsonSetter("tag") - public void setTag(List tag) { - this.tag = tag; - } - - /** - * Getter for FavoriteFor. - * A JSON array of name or GUID of the user or both for whom the object is assigned as favorite. - * When both are given then id is considered. - * @return Returns the List of NameAndIdInput - */ - @JsonGetter("favoriteFor") - @JsonInclude(JsonInclude.Include.NON_NULL) - public List getFavoriteFor() { - return favoriteFor; - } - - /** - * Setter for FavoriteFor. - * A JSON array of name or GUID of the user or both for whom the object is assigned as favorite. - * When both are given then id is considered. - * @param favoriteFor Value for List of NameAndIdInput - */ - @JsonSetter("favoriteFor") - public void setFavoriteFor(List favoriteFor) { - this.favoriteFor = favoriteFor; - } - - /** - * Getter for Author. - * A JSON array of name or GUID of the user or both who created the object. When both are given - * then id is considered - * @return Returns the List of NameAndIdInput - */ - @JsonGetter("author") - @JsonInclude(JsonInclude.Include.NON_NULL) - public List getAuthor() { - return author; - } - - /** - * Setter for Author. - * A JSON array of name or GUID of the user or both who created the object. When both are given - * then id is considered - * @param author Value for List of NameAndIdInput - */ - @JsonSetter("author") - public void setAuthor(List author) { - this.author = author; - } - - /** - * Getter for LastModifiedBy. - * A JSON array of name or GUID of the user or both who last modified the object. When both are - * given then id is considered. - * @return Returns the List of NameAndIdInput - */ - @JsonGetter("lastModifiedBy") - @JsonInclude(JsonInclude.Include.NON_NULL) - public List getLastModifiedBy() { - return lastModifiedBy; - } - - /** - * Setter for LastModifiedBy. - * A JSON array of name or GUID of the user or both who last modified the object. When both are - * given then id is considered. - * @param lastModifiedBy Value for List of NameAndIdInput - */ - @JsonSetter("lastModifiedBy") - public void setLastModifiedBy(List lastModifiedBy) { - this.lastModifiedBy = lastModifiedBy; - } - - /** - * Converts this TspublicRestV2MetadataHeaderSearchRequest into string format. - * @return String representation of this class - */ - @Override - public String toString() { - return "TspublicRestV2MetadataHeaderSearchRequest [" + "type=" + type + ", outputFields=" - + outputFields + ", offset=" + offset + ", batchNumber=" + batchNumber - + ", batchSize=" + batchSize + ", sortBy=" + sortBy + ", sortOrder=" + sortOrder - + ", namePattern=" + namePattern + ", fetchId=" + fetchId + ", skipId=" + skipId - + ", showHidden=" + showHidden + ", autoCreated=" + autoCreated + ", accessLevel=" - + accessLevel + ", tag=" + tag + ", favoriteFor=" + favoriteFor + ", author=" - + author + ", lastModifiedBy=" + lastModifiedBy + "]"; - } - - /** - * Builds a new {@link TspublicRestV2MetadataHeaderSearchRequest.Builder} object. - * Creates the instance with the state of the current model. - * @return a new {@link TspublicRestV2MetadataHeaderSearchRequest.Builder} object - */ - public Builder toBuilder() { - Builder builder = new Builder(type) - .outputFields(getOutputFields()) - .offset(getOffset()) - .batchNumber(getBatchNumber()) - .batchSize(getBatchSize()) - .sortBy(getSortBy()) - .sortOrder(getSortOrder()) - .namePattern(getNamePattern()) - .fetchId(getFetchId()) - .skipId(getSkipId()) - .showHidden(getShowHidden()) - .autoCreated(getAutoCreated()) - .accessLevel(getAccessLevel()) - .tag(getTag()) - .favoriteFor(getFavoriteFor()) - .author(getAuthor()) - .lastModifiedBy(getLastModifiedBy()); - return builder; - } - - /** - * Class to build instances of {@link TspublicRestV2MetadataHeaderSearchRequest}. - */ - public static class Builder { - private Type3Enum type; - private List outputFields; - private Integer offset = 0; - private Integer batchNumber; - private Integer batchSize = -1; - private SortByEnum sortBy = SortByEnum.DEFAULT; - private SortOrderEnum sortOrder = SortOrderEnum.DEFAULT; - private String namePattern; - private List fetchId; - private List skipId; - private Boolean showHidden = false; - private Boolean autoCreated; - private List accessLevel; - private List tag; - private List favoriteFor; - private List author; - private List lastModifiedBy; - - /** - * Initialization constructor. - */ - public Builder() { - } - - /** - * Initialization constructor. - * @param type Type3Enum value for type. - */ - public Builder(Type3Enum type) { - this.type = type; - } - - /** - * Setter for type. - * @param type Type3Enum value for type. - * @return Builder - */ - public Builder type(Type3Enum type) { - this.type = type; - return this; - } - - /** - * Setter for outputFields. - * @param outputFields List of String value for outputFields. - * @return Builder - */ - public Builder outputFields(List outputFields) { - this.outputFields = outputFields; - return this; - } - - /** - * Setter for offset. - * @param offset Integer value for offset. - * @return Builder - */ - public Builder offset(Integer offset) { - this.offset = offset; - return this; - } - - /** - * Setter for batchNumber. - * @param batchNumber Integer value for batchNumber. - * @return Builder - */ - public Builder batchNumber(Integer batchNumber) { - this.batchNumber = batchNumber; - return this; - } - - /** - * Setter for batchSize. - * @param batchSize Integer value for batchSize. - * @return Builder - */ - public Builder batchSize(Integer batchSize) { - this.batchSize = batchSize; - return this; - } - - /** - * Setter for sortBy. - * @param sortBy SortByEnum value for sortBy. - * @return Builder - */ - public Builder sortBy(SortByEnum sortBy) { - this.sortBy = sortBy; - return this; - } - - /** - * Setter for sortOrder. - * @param sortOrder SortOrderEnum value for sortOrder. - * @return Builder - */ - public Builder sortOrder(SortOrderEnum sortOrder) { - this.sortOrder = sortOrder; - return this; - } - - /** - * Setter for namePattern. - * @param namePattern String value for namePattern. - * @return Builder - */ - public Builder namePattern(String namePattern) { - this.namePattern = namePattern; - return this; - } - - /** - * Setter for fetchId. - * @param fetchId List of String value for fetchId. - * @return Builder - */ - public Builder fetchId(List fetchId) { - this.fetchId = fetchId; - return this; - } - - /** - * Setter for skipId. - * @param skipId List of String value for skipId. - * @return Builder - */ - public Builder skipId(List skipId) { - this.skipId = skipId; - return this; - } - - /** - * Setter for showHidden. - * @param showHidden Boolean value for showHidden. - * @return Builder - */ - public Builder showHidden(Boolean showHidden) { - this.showHidden = showHidden; - return this; - } - - /** - * Setter for autoCreated. - * @param autoCreated Boolean value for autoCreated. - * @return Builder - */ - public Builder autoCreated(Boolean autoCreated) { - this.autoCreated = autoCreated; - return this; - } - - /** - * Setter for accessLevel. - * @param accessLevel List of AccessLevelInput value for accessLevel. - * @return Builder - */ - public Builder accessLevel(List accessLevel) { - this.accessLevel = accessLevel; - return this; - } - - /** - * Setter for tag. - * @param tag List of TagNameAndIdInput value for tag. - * @return Builder - */ - public Builder tag(List tag) { - this.tag = tag; - return this; - } - - /** - * Setter for favoriteFor. - * @param favoriteFor List of NameAndIdInput value for favoriteFor. - * @return Builder - */ - public Builder favoriteFor(List favoriteFor) { - this.favoriteFor = favoriteFor; - return this; - } - - /** - * Setter for author. - * @param author List of NameAndIdInput value for author. - * @return Builder - */ - public Builder author(List author) { - this.author = author; - return this; - } - - /** - * Setter for lastModifiedBy. - * @param lastModifiedBy List of NameAndIdInput value for lastModifiedBy. - * @return Builder - */ - public Builder lastModifiedBy(List lastModifiedBy) { - this.lastModifiedBy = lastModifiedBy; - return this; - } - - /** - * Builds a new {@link TspublicRestV2MetadataHeaderSearchRequest} object using the set - * fields. - * @return {@link TspublicRestV2MetadataHeaderSearchRequest} - */ - public TspublicRestV2MetadataHeaderSearchRequest build() { - return new TspublicRestV2MetadataHeaderSearchRequest(type, outputFields, offset, - batchNumber, batchSize, sortBy, sortOrder, namePattern, fetchId, skipId, - showHidden, autoCreated, accessLevel, tag, favoriteFor, author, lastModifiedBy); - } - } -} diff --git a/Java/src/main/java/localhost/models/TspublicRestV2MetadataHomeliveboardAssignRequest.java b/Java/src/main/java/localhost/models/TspublicRestV2MetadataHomeliveboardAssignRequest.java deleted file mode 100644 index 03639c4d0..000000000 --- a/Java/src/main/java/localhost/models/TspublicRestV2MetadataHomeliveboardAssignRequest.java +++ /dev/null @@ -1,179 +0,0 @@ -/* - * ThoughtSpotPublicRESTAPILib - * - * This file was automatically generated by APIMATIC v3.0 ( https://www.apimatic.io ). - */ - -package localhost.models; - -import com.fasterxml.jackson.annotation.JsonGetter; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonSetter; -import io.apimatic.core.types.BaseModel; - -/** - * This is a model class for TspublicRestV2MetadataHomeliveboardAssignRequest type. - */ -public class TspublicRestV2MetadataHomeliveboardAssignRequest { - private String userName; - private String userId; - private String liveboardId; - - /** - * Default constructor. - */ - public TspublicRestV2MetadataHomeliveboardAssignRequest() { - } - - /** - * Initialization constructor. - * @param userName String value for userName. - * @param userId String value for userId. - * @param liveboardId String value for liveboardId. - */ - public TspublicRestV2MetadataHomeliveboardAssignRequest( - String userName, - String userId, - String liveboardId) { - this.userName = userName; - this.userId = userId; - this.liveboardId = liveboardId; - } - - /** - * Getter for UserName. - * Name of the user - * @return Returns the String - */ - @JsonGetter("userName") - @JsonInclude(JsonInclude.Include.NON_NULL) - public String getUserName() { - return userName; - } - - /** - * Setter for UserName. - * Name of the user - * @param userName Value for String - */ - @JsonSetter("userName") - public void setUserName(String userName) { - this.userName = userName; - } - - /** - * Getter for UserId. - * The GUID of the user - * @return Returns the String - */ - @JsonGetter("userId") - @JsonInclude(JsonInclude.Include.NON_NULL) - public String getUserId() { - return userId; - } - - /** - * Setter for UserId. - * The GUID of the user - * @param userId Value for String - */ - @JsonSetter("userId") - public void setUserId(String userId) { - this.userId = userId; - } - - /** - * Getter for LiveboardId. - * The GUID of the liveboard - * @return Returns the String - */ - @JsonGetter("liveboardId") - @JsonInclude(JsonInclude.Include.NON_NULL) - public String getLiveboardId() { - return liveboardId; - } - - /** - * Setter for LiveboardId. - * The GUID of the liveboard - * @param liveboardId Value for String - */ - @JsonSetter("liveboardId") - public void setLiveboardId(String liveboardId) { - this.liveboardId = liveboardId; - } - - /** - * Converts this TspublicRestV2MetadataHomeliveboardAssignRequest into string format. - * @return String representation of this class - */ - @Override - public String toString() { - return "TspublicRestV2MetadataHomeliveboardAssignRequest [" + "userName=" + userName - + ", userId=" + userId + ", liveboardId=" + liveboardId + "]"; - } - - /** - * Builds a new {@link TspublicRestV2MetadataHomeliveboardAssignRequest.Builder} object. - * Creates the instance with the state of the current model. - * @return a new {@link TspublicRestV2MetadataHomeliveboardAssignRequest.Builder} object - */ - public Builder toBuilder() { - Builder builder = new Builder() - .userName(getUserName()) - .userId(getUserId()) - .liveboardId(getLiveboardId()); - return builder; - } - - /** - * Class to build instances of {@link TspublicRestV2MetadataHomeliveboardAssignRequest}. - */ - public static class Builder { - private String userName; - private String userId; - private String liveboardId; - - - - /** - * Setter for userName. - * @param userName String value for userName. - * @return Builder - */ - public Builder userName(String userName) { - this.userName = userName; - return this; - } - - /** - * Setter for userId. - * @param userId String value for userId. - * @return Builder - */ - public Builder userId(String userId) { - this.userId = userId; - return this; - } - - /** - * Setter for liveboardId. - * @param liveboardId String value for liveboardId. - * @return Builder - */ - public Builder liveboardId(String liveboardId) { - this.liveboardId = liveboardId; - return this; - } - - /** - * Builds a new {@link TspublicRestV2MetadataHomeliveboardAssignRequest} object using the - * set fields. - * @return {@link TspublicRestV2MetadataHomeliveboardAssignRequest} - */ - public TspublicRestV2MetadataHomeliveboardAssignRequest build() { - return new TspublicRestV2MetadataHomeliveboardAssignRequest(userName, userId, - liveboardId); - } - } -} diff --git a/Java/src/main/java/localhost/models/TspublicRestV2MetadataHomeliveboardUnassignRequest.java b/Java/src/main/java/localhost/models/TspublicRestV2MetadataHomeliveboardUnassignRequest.java deleted file mode 100644 index 3f0266f72..000000000 --- a/Java/src/main/java/localhost/models/TspublicRestV2MetadataHomeliveboardUnassignRequest.java +++ /dev/null @@ -1,141 +0,0 @@ -/* - * ThoughtSpotPublicRESTAPILib - * - * This file was automatically generated by APIMATIC v3.0 ( https://www.apimatic.io ). - */ - -package localhost.models; - -import com.fasterxml.jackson.annotation.JsonGetter; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonSetter; -import io.apimatic.core.types.BaseModel; - -/** - * This is a model class for TspublicRestV2MetadataHomeliveboardUnassignRequest type. - */ -public class TspublicRestV2MetadataHomeliveboardUnassignRequest { - private String userName; - private String userId; - - /** - * Default constructor. - */ - public TspublicRestV2MetadataHomeliveboardUnassignRequest() { - } - - /** - * Initialization constructor. - * @param userName String value for userName. - * @param userId String value for userId. - */ - public TspublicRestV2MetadataHomeliveboardUnassignRequest( - String userName, - String userId) { - this.userName = userName; - this.userId = userId; - } - - /** - * Getter for UserName. - * Name of the user - * @return Returns the String - */ - @JsonGetter("userName") - @JsonInclude(JsonInclude.Include.NON_NULL) - public String getUserName() { - return userName; - } - - /** - * Setter for UserName. - * Name of the user - * @param userName Value for String - */ - @JsonSetter("userName") - public void setUserName(String userName) { - this.userName = userName; - } - - /** - * Getter for UserId. - * The GUID of the user - * @return Returns the String - */ - @JsonGetter("userId") - @JsonInclude(JsonInclude.Include.NON_NULL) - public String getUserId() { - return userId; - } - - /** - * Setter for UserId. - * The GUID of the user - * @param userId Value for String - */ - @JsonSetter("userId") - public void setUserId(String userId) { - this.userId = userId; - } - - /** - * Converts this TspublicRestV2MetadataHomeliveboardUnassignRequest into string format. - * @return String representation of this class - */ - @Override - public String toString() { - return "TspublicRestV2MetadataHomeliveboardUnassignRequest [" + "userName=" + userName - + ", userId=" + userId + "]"; - } - - /** - * Builds a new {@link TspublicRestV2MetadataHomeliveboardUnassignRequest.Builder} object. - * Creates the instance with the state of the current model. - * @return a new {@link TspublicRestV2MetadataHomeliveboardUnassignRequest.Builder} object - */ - public Builder toBuilder() { - Builder builder = new Builder() - .userName(getUserName()) - .userId(getUserId()); - return builder; - } - - /** - * Class to build instances of {@link TspublicRestV2MetadataHomeliveboardUnassignRequest}. - */ - public static class Builder { - private String userName; - private String userId; - - - - /** - * Setter for userName. - * @param userName String value for userName. - * @return Builder - */ - public Builder userName(String userName) { - this.userName = userName; - return this; - } - - /** - * Setter for userId. - * @param userId String value for userId. - * @return Builder - */ - public Builder userId(String userId) { - this.userId = userId; - return this; - } - - /** - * Builds a new {@link TspublicRestV2MetadataHomeliveboardUnassignRequest} object using the - * set fields. - * @return {@link TspublicRestV2MetadataHomeliveboardUnassignRequest} - */ - public TspublicRestV2MetadataHomeliveboardUnassignRequest build() { - return new TspublicRestV2MetadataHomeliveboardUnassignRequest(userName, userId); - } - } -} diff --git a/Java/src/main/java/localhost/models/TspublicRestV2MetadataTagAssignRequest.java b/Java/src/main/java/localhost/models/TspublicRestV2MetadataTagAssignRequest.java deleted file mode 100644 index ad11951de..000000000 --- a/Java/src/main/java/localhost/models/TspublicRestV2MetadataTagAssignRequest.java +++ /dev/null @@ -1,188 +0,0 @@ -/* - * ThoughtSpotPublicRESTAPILib - * - * This file was automatically generated by APIMATIC v3.0 ( https://www.apimatic.io ). - */ - -package localhost.models; - -import com.fasterxml.jackson.annotation.JsonGetter; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonSetter; -import io.apimatic.core.types.BaseModel; -import java.util.List; - -/** - * This is a model class for TspublicRestV2MetadataTagAssignRequest type. - */ -public class TspublicRestV2MetadataTagAssignRequest { - private String name; - private String id; - private List tsObject; - - /** - * Default constructor. - */ - public TspublicRestV2MetadataTagAssignRequest() { - } - - /** - * Initialization constructor. - * @param tsObject List of TsObjectInput value for tsObject. - * @param name String value for name. - * @param id String value for id. - */ - public TspublicRestV2MetadataTagAssignRequest( - List tsObject, - String name, - String id) { - this.name = name; - this.id = id; - this.tsObject = tsObject; - } - - /** - * Getter for Name. - * Name of the tag - * @return Returns the String - */ - @JsonGetter("name") - @JsonInclude(JsonInclude.Include.NON_NULL) - public String getName() { - return name; - } - - /** - * Setter for Name. - * Name of the tag - * @param name Value for String - */ - @JsonSetter("name") - public void setName(String name) { - this.name = name; - } - - /** - * Getter for Id. - * The GUID of the tag - * @return Returns the String - */ - @JsonGetter("id") - @JsonInclude(JsonInclude.Include.NON_NULL) - public String getId() { - return id; - } - - /** - * Setter for Id. - * The GUID of the tag - * @param id Value for String - */ - @JsonSetter("id") - public void setId(String id) { - this.id = id; - } - - /** - * Getter for TsObject. - * A JSON Array of GUIDs and type of metadata object. - * @return Returns the List of TsObjectInput - */ - @JsonGetter("tsObject") - public List getTsObject() { - return tsObject; - } - - /** - * Setter for TsObject. - * A JSON Array of GUIDs and type of metadata object. - * @param tsObject Value for List of TsObjectInput - */ - @JsonSetter("tsObject") - public void setTsObject(List tsObject) { - this.tsObject = tsObject; - } - - /** - * Converts this TspublicRestV2MetadataTagAssignRequest into string format. - * @return String representation of this class - */ - @Override - public String toString() { - return "TspublicRestV2MetadataTagAssignRequest [" + "tsObject=" + tsObject + ", name=" - + name + ", id=" + id + "]"; - } - - /** - * Builds a new {@link TspublicRestV2MetadataTagAssignRequest.Builder} object. - * Creates the instance with the state of the current model. - * @return a new {@link TspublicRestV2MetadataTagAssignRequest.Builder} object - */ - public Builder toBuilder() { - Builder builder = new Builder(tsObject) - .name(getName()) - .id(getId()); - return builder; - } - - /** - * Class to build instances of {@link TspublicRestV2MetadataTagAssignRequest}. - */ - public static class Builder { - private List tsObject; - private String name; - private String id; - - /** - * Initialization constructor. - */ - public Builder() { - } - - /** - * Initialization constructor. - * @param tsObject List of TsObjectInput value for tsObject. - */ - public Builder(List tsObject) { - this.tsObject = tsObject; - } - - /** - * Setter for tsObject. - * @param tsObject List of TsObjectInput value for tsObject. - * @return Builder - */ - public Builder tsObject(List tsObject) { - this.tsObject = tsObject; - return this; - } - - /** - * Setter for name. - * @param name String value for name. - * @return Builder - */ - public Builder name(String name) { - this.name = name; - return this; - } - - /** - * Setter for id. - * @param id String value for id. - * @return Builder - */ - public Builder id(String id) { - this.id = id; - return this; - } - - /** - * Builds a new {@link TspublicRestV2MetadataTagAssignRequest} object using the set fields. - * @return {@link TspublicRestV2MetadataTagAssignRequest} - */ - public TspublicRestV2MetadataTagAssignRequest build() { - return new TspublicRestV2MetadataTagAssignRequest(tsObject, name, id); - } - } -} diff --git a/Java/src/main/java/localhost/models/TspublicRestV2MetadataTagCreateRequest.java b/Java/src/main/java/localhost/models/TspublicRestV2MetadataTagCreateRequest.java deleted file mode 100644 index cb1a15835..000000000 --- a/Java/src/main/java/localhost/models/TspublicRestV2MetadataTagCreateRequest.java +++ /dev/null @@ -1,150 +0,0 @@ -/* - * ThoughtSpotPublicRESTAPILib - * - * This file was automatically generated by APIMATIC v3.0 ( https://www.apimatic.io ). - */ - -package localhost.models; - -import com.fasterxml.jackson.annotation.JsonGetter; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonSetter; -import io.apimatic.core.types.BaseModel; - -/** - * This is a model class for TspublicRestV2MetadataTagCreateRequest type. - */ -public class TspublicRestV2MetadataTagCreateRequest { - private String name; - private String color; - - /** - * Default constructor. - */ - public TspublicRestV2MetadataTagCreateRequest() { - } - - /** - * Initialization constructor. - * @param name String value for name. - * @param color String value for color. - */ - public TspublicRestV2MetadataTagCreateRequest( - String name, - String color) { - this.name = name; - this.color = color; - } - - /** - * Getter for Name. - * Name of the tag - * @return Returns the String - */ - @JsonGetter("name") - public String getName() { - return name; - } - - /** - * Setter for Name. - * Name of the tag - * @param name Value for String - */ - @JsonSetter("name") - public void setName(String name) { - this.name = name; - } - - /** - * Getter for Color. - * Hex color code to be assigned to the tag - * @return Returns the String - */ - @JsonGetter("color") - @JsonInclude(JsonInclude.Include.NON_NULL) - public String getColor() { - return color; - } - - /** - * Setter for Color. - * Hex color code to be assigned to the tag - * @param color Value for String - */ - @JsonSetter("color") - public void setColor(String color) { - this.color = color; - } - - /** - * Converts this TspublicRestV2MetadataTagCreateRequest into string format. - * @return String representation of this class - */ - @Override - public String toString() { - return "TspublicRestV2MetadataTagCreateRequest [" + "name=" + name + ", color=" + color - + "]"; - } - - /** - * Builds a new {@link TspublicRestV2MetadataTagCreateRequest.Builder} object. - * Creates the instance with the state of the current model. - * @return a new {@link TspublicRestV2MetadataTagCreateRequest.Builder} object - */ - public Builder toBuilder() { - Builder builder = new Builder(name) - .color(getColor()); - return builder; - } - - /** - * Class to build instances of {@link TspublicRestV2MetadataTagCreateRequest}. - */ - public static class Builder { - private String name; - private String color; - - /** - * Initialization constructor. - */ - public Builder() { - } - - /** - * Initialization constructor. - * @param name String value for name. - */ - public Builder(String name) { - this.name = name; - } - - /** - * Setter for name. - * @param name String value for name. - * @return Builder - */ - public Builder name(String name) { - this.name = name; - return this; - } - - /** - * Setter for color. - * @param color String value for color. - * @return Builder - */ - public Builder color(String color) { - this.color = color; - return this; - } - - /** - * Builds a new {@link TspublicRestV2MetadataTagCreateRequest} object using the set fields. - * @return {@link TspublicRestV2MetadataTagCreateRequest} - */ - public TspublicRestV2MetadataTagCreateRequest build() { - return new TspublicRestV2MetadataTagCreateRequest(name, color); - } - } -} diff --git a/Java/src/main/java/localhost/models/TspublicRestV2MetadataTagUnassignRequest.java b/Java/src/main/java/localhost/models/TspublicRestV2MetadataTagUnassignRequest.java deleted file mode 100644 index 3abca62ae..000000000 --- a/Java/src/main/java/localhost/models/TspublicRestV2MetadataTagUnassignRequest.java +++ /dev/null @@ -1,189 +0,0 @@ -/* - * ThoughtSpotPublicRESTAPILib - * - * This file was automatically generated by APIMATIC v3.0 ( https://www.apimatic.io ). - */ - -package localhost.models; - -import com.fasterxml.jackson.annotation.JsonGetter; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonSetter; -import io.apimatic.core.types.BaseModel; -import java.util.List; - -/** - * This is a model class for TspublicRestV2MetadataTagUnassignRequest type. - */ -public class TspublicRestV2MetadataTagUnassignRequest { - private String name; - private String id; - private List tsObject; - - /** - * Default constructor. - */ - public TspublicRestV2MetadataTagUnassignRequest() { - } - - /** - * Initialization constructor. - * @param tsObject List of TsObjectInput value for tsObject. - * @param name String value for name. - * @param id String value for id. - */ - public TspublicRestV2MetadataTagUnassignRequest( - List tsObject, - String name, - String id) { - this.name = name; - this.id = id; - this.tsObject = tsObject; - } - - /** - * Getter for Name. - * Name of the tag - * @return Returns the String - */ - @JsonGetter("name") - @JsonInclude(JsonInclude.Include.NON_NULL) - public String getName() { - return name; - } - - /** - * Setter for Name. - * Name of the tag - * @param name Value for String - */ - @JsonSetter("name") - public void setName(String name) { - this.name = name; - } - - /** - * Getter for Id. - * The GUID of the tag - * @return Returns the String - */ - @JsonGetter("id") - @JsonInclude(JsonInclude.Include.NON_NULL) - public String getId() { - return id; - } - - /** - * Setter for Id. - * The GUID of the tag - * @param id Value for String - */ - @JsonSetter("id") - public void setId(String id) { - this.id = id; - } - - /** - * Getter for TsObject. - * A JSON Array of GUIDs and type of metadata object. - * @return Returns the List of TsObjectInput - */ - @JsonGetter("tsObject") - public List getTsObject() { - return tsObject; - } - - /** - * Setter for TsObject. - * A JSON Array of GUIDs and type of metadata object. - * @param tsObject Value for List of TsObjectInput - */ - @JsonSetter("tsObject") - public void setTsObject(List tsObject) { - this.tsObject = tsObject; - } - - /** - * Converts this TspublicRestV2MetadataTagUnassignRequest into string format. - * @return String representation of this class - */ - @Override - public String toString() { - return "TspublicRestV2MetadataTagUnassignRequest [" + "tsObject=" + tsObject + ", name=" - + name + ", id=" + id + "]"; - } - - /** - * Builds a new {@link TspublicRestV2MetadataTagUnassignRequest.Builder} object. - * Creates the instance with the state of the current model. - * @return a new {@link TspublicRestV2MetadataTagUnassignRequest.Builder} object - */ - public Builder toBuilder() { - Builder builder = new Builder(tsObject) - .name(getName()) - .id(getId()); - return builder; - } - - /** - * Class to build instances of {@link TspublicRestV2MetadataTagUnassignRequest}. - */ - public static class Builder { - private List tsObject; - private String name; - private String id; - - /** - * Initialization constructor. - */ - public Builder() { - } - - /** - * Initialization constructor. - * @param tsObject List of TsObjectInput value for tsObject. - */ - public Builder(List tsObject) { - this.tsObject = tsObject; - } - - /** - * Setter for tsObject. - * @param tsObject List of TsObjectInput value for tsObject. - * @return Builder - */ - public Builder tsObject(List tsObject) { - this.tsObject = tsObject; - return this; - } - - /** - * Setter for name. - * @param name String value for name. - * @return Builder - */ - public Builder name(String name) { - this.name = name; - return this; - } - - /** - * Setter for id. - * @param id String value for id. - * @return Builder - */ - public Builder id(String id) { - this.id = id; - return this; - } - - /** - * Builds a new {@link TspublicRestV2MetadataTagUnassignRequest} object using the set - * fields. - * @return {@link TspublicRestV2MetadataTagUnassignRequest} - */ - public TspublicRestV2MetadataTagUnassignRequest build() { - return new TspublicRestV2MetadataTagUnassignRequest(tsObject, name, id); - } - } -} diff --git a/Java/src/main/java/localhost/models/TspublicRestV2MetadataTagUpdateRequest.java b/Java/src/main/java/localhost/models/TspublicRestV2MetadataTagUpdateRequest.java deleted file mode 100644 index 10413fbb5..000000000 --- a/Java/src/main/java/localhost/models/TspublicRestV2MetadataTagUpdateRequest.java +++ /dev/null @@ -1,177 +0,0 @@ -/* - * ThoughtSpotPublicRESTAPILib - * - * This file was automatically generated by APIMATIC v3.0 ( https://www.apimatic.io ). - */ - -package localhost.models; - -import com.fasterxml.jackson.annotation.JsonGetter; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonSetter; -import io.apimatic.core.types.BaseModel; - -/** - * This is a model class for TspublicRestV2MetadataTagUpdateRequest type. - */ -public class TspublicRestV2MetadataTagUpdateRequest { - private String name; - private String id; - private String color; - - /** - * Default constructor. - */ - public TspublicRestV2MetadataTagUpdateRequest() { - } - - /** - * Initialization constructor. - * @param name String value for name. - * @param id String value for id. - * @param color String value for color. - */ - public TspublicRestV2MetadataTagUpdateRequest( - String name, - String id, - String color) { - this.name = name; - this.id = id; - this.color = color; - } - - /** - * Getter for Name. - * Name of the tag - * @return Returns the String - */ - @JsonGetter("name") - @JsonInclude(JsonInclude.Include.NON_NULL) - public String getName() { - return name; - } - - /** - * Setter for Name. - * Name of the tag - * @param name Value for String - */ - @JsonSetter("name") - public void setName(String name) { - this.name = name; - } - - /** - * Getter for Id. - * The GUID of the tag - * @return Returns the String - */ - @JsonGetter("id") - @JsonInclude(JsonInclude.Include.NON_NULL) - public String getId() { - return id; - } - - /** - * Setter for Id. - * The GUID of the tag - * @param id Value for String - */ - @JsonSetter("id") - public void setId(String id) { - this.id = id; - } - - /** - * Getter for Color. - * Hex color code to be assigned to the tag - * @return Returns the String - */ - @JsonGetter("color") - @JsonInclude(JsonInclude.Include.NON_NULL) - public String getColor() { - return color; - } - - /** - * Setter for Color. - * Hex color code to be assigned to the tag - * @param color Value for String - */ - @JsonSetter("color") - public void setColor(String color) { - this.color = color; - } - - /** - * Converts this TspublicRestV2MetadataTagUpdateRequest into string format. - * @return String representation of this class - */ - @Override - public String toString() { - return "TspublicRestV2MetadataTagUpdateRequest [" + "name=" + name + ", id=" + id - + ", color=" + color + "]"; - } - - /** - * Builds a new {@link TspublicRestV2MetadataTagUpdateRequest.Builder} object. - * Creates the instance with the state of the current model. - * @return a new {@link TspublicRestV2MetadataTagUpdateRequest.Builder} object - */ - public Builder toBuilder() { - Builder builder = new Builder() - .name(getName()) - .id(getId()) - .color(getColor()); - return builder; - } - - /** - * Class to build instances of {@link TspublicRestV2MetadataTagUpdateRequest}. - */ - public static class Builder { - private String name; - private String id; - private String color; - - - - /** - * Setter for name. - * @param name String value for name. - * @return Builder - */ - public Builder name(String name) { - this.name = name; - return this; - } - - /** - * Setter for id. - * @param id String value for id. - * @return Builder - */ - public Builder id(String id) { - this.id = id; - return this; - } - - /** - * Setter for color. - * @param color String value for color. - * @return Builder - */ - public Builder color(String color) { - this.color = color; - return this; - } - - /** - * Builds a new {@link TspublicRestV2MetadataTagUpdateRequest} object using the set fields. - * @return {@link TspublicRestV2MetadataTagUpdateRequest} - */ - public TspublicRestV2MetadataTagUpdateRequest build() { - return new TspublicRestV2MetadataTagUpdateRequest(name, id, color); - } - } -} diff --git a/Java/src/main/java/localhost/models/TspublicRestV2MetadataTmlExportRequest.java b/Java/src/main/java/localhost/models/TspublicRestV2MetadataTmlExportRequest.java deleted file mode 100644 index 626d7b640..000000000 --- a/Java/src/main/java/localhost/models/TspublicRestV2MetadataTmlExportRequest.java +++ /dev/null @@ -1,196 +0,0 @@ -/* - * ThoughtSpotPublicRESTAPILib - * - * This file was automatically generated by APIMATIC v3.0 ( https://www.apimatic.io ). - */ - -package localhost.models; - -import com.fasterxml.jackson.annotation.JsonGetter; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonSetter; -import io.apimatic.core.types.BaseModel; -import java.util.List; - -/** - * This is a model class for TspublicRestV2MetadataTmlExportRequest type. - */ -public class TspublicRestV2MetadataTmlExportRequest { - private List id; - private FormatType3Enum formatType; - private Boolean exportAssociated; - - /** - * Default constructor. - */ - public TspublicRestV2MetadataTmlExportRequest() { - formatType = FormatType3Enum.YAML; - exportAssociated = false; - } - - /** - * Initialization constructor. - * @param id List of String value for id. - * @param formatType FormatType3Enum value for formatType. - * @param exportAssociated Boolean value for exportAssociated. - */ - public TspublicRestV2MetadataTmlExportRequest( - List id, - FormatType3Enum formatType, - Boolean exportAssociated) { - this.id = id; - this.formatType = formatType; - this.exportAssociated = exportAssociated; - } - - /** - * Getter for Id. - * A JSON array of GUIDs of the objects. - * @return Returns the List of String - */ - @JsonGetter("id") - public List getId() { - return id; - } - - /** - * Setter for Id. - * A JSON array of GUIDs of the objects. - * @param id Value for List of String - */ - @JsonSetter("id") - public void setId(List id) { - this.id = id; - } - - /** - * Getter for FormatType. - * The format in which to export the objects - * @return Returns the FormatType3Enum - */ - @JsonGetter("formatType") - @JsonInclude(JsonInclude.Include.NON_NULL) - public FormatType3Enum getFormatType() { - return formatType; - } - - /** - * Setter for FormatType. - * The format in which to export the objects - * @param formatType Value for FormatType3Enum - */ - @JsonSetter("formatType") - public void setFormatType(FormatType3Enum formatType) { - this.formatType = formatType; - } - - /** - * Getter for ExportAssociated. - * Specifies if you would like to export the associated objects. To export the objects - * associated with the objects specified in id, set the value to true. When set to true, the API - * exports any underlying worksheets, tables, or views for a given object. By default, the API - * does not export these underlying objects - * @return Returns the Boolean - */ - @JsonGetter("exportAssociated") - @JsonInclude(JsonInclude.Include.NON_NULL) - public Boolean getExportAssociated() { - return exportAssociated; - } - - /** - * Setter for ExportAssociated. - * Specifies if you would like to export the associated objects. To export the objects - * associated with the objects specified in id, set the value to true. When set to true, the API - * exports any underlying worksheets, tables, or views for a given object. By default, the API - * does not export these underlying objects - * @param exportAssociated Value for Boolean - */ - @JsonSetter("exportAssociated") - public void setExportAssociated(Boolean exportAssociated) { - this.exportAssociated = exportAssociated; - } - - /** - * Converts this TspublicRestV2MetadataTmlExportRequest into string format. - * @return String representation of this class - */ - @Override - public String toString() { - return "TspublicRestV2MetadataTmlExportRequest [" + "id=" + id + ", formatType=" - + formatType + ", exportAssociated=" + exportAssociated + "]"; - } - - /** - * Builds a new {@link TspublicRestV2MetadataTmlExportRequest.Builder} object. - * Creates the instance with the state of the current model. - * @return a new {@link TspublicRestV2MetadataTmlExportRequest.Builder} object - */ - public Builder toBuilder() { - Builder builder = new Builder(id) - .formatType(getFormatType()) - .exportAssociated(getExportAssociated()); - return builder; - } - - /** - * Class to build instances of {@link TspublicRestV2MetadataTmlExportRequest}. - */ - public static class Builder { - private List id; - private FormatType3Enum formatType = FormatType3Enum.YAML; - private Boolean exportAssociated = false; - - /** - * Initialization constructor. - */ - public Builder() { - } - - /** - * Initialization constructor. - * @param id List of String value for id. - */ - public Builder(List id) { - this.id = id; - } - - /** - * Setter for id. - * @param id List of String value for id. - * @return Builder - */ - public Builder id(List id) { - this.id = id; - return this; - } - - /** - * Setter for formatType. - * @param formatType FormatType3Enum value for formatType. - * @return Builder - */ - public Builder formatType(FormatType3Enum formatType) { - this.formatType = formatType; - return this; - } - - /** - * Setter for exportAssociated. - * @param exportAssociated Boolean value for exportAssociated. - * @return Builder - */ - public Builder exportAssociated(Boolean exportAssociated) { - this.exportAssociated = exportAssociated; - return this; - } - - /** - * Builds a new {@link TspublicRestV2MetadataTmlExportRequest} object using the set fields. - * @return {@link TspublicRestV2MetadataTmlExportRequest} - */ - public TspublicRestV2MetadataTmlExportRequest build() { - return new TspublicRestV2MetadataTmlExportRequest(id, formatType, exportAssociated); - } - } -} diff --git a/Java/src/main/java/localhost/models/TspublicRestV2MetadataTmlImportRequest.java b/Java/src/main/java/localhost/models/TspublicRestV2MetadataTmlImportRequest.java deleted file mode 100644 index 98043dc02..000000000 --- a/Java/src/main/java/localhost/models/TspublicRestV2MetadataTmlImportRequest.java +++ /dev/null @@ -1,226 +0,0 @@ -/* - * ThoughtSpotPublicRESTAPILib - * - * This file was automatically generated by APIMATIC v3.0 ( https://www.apimatic.io ). - */ - -package localhost.models; - -import com.fasterxml.jackson.annotation.JsonGetter; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonSetter; -import io.apimatic.core.types.BaseModel; -import java.util.List; - -/** - * This is a model class for TspublicRestV2MetadataTmlImportRequest type. - */ -public class TspublicRestV2MetadataTmlImportRequest { - private List objectTML; - private ImportPolicyEnum importPolicy; - private Boolean forceCreate; - - /** - * Default constructor. - */ - public TspublicRestV2MetadataTmlImportRequest() { - importPolicy = ImportPolicyEnum.PARTIAL; - forceCreate = false; - } - - /** - * Initialization constructor. - * @param objectTML List of String value for objectTML. - * @param importPolicy ImportPolicyEnum value for importPolicy. - * @param forceCreate Boolean value for forceCreate. - */ - public TspublicRestV2MetadataTmlImportRequest( - List objectTML, - ImportPolicyEnum importPolicy, - Boolean forceCreate) { - this.objectTML = objectTML; - this.importPolicy = importPolicy; - this.forceCreate = forceCreate; - } - - /** - * Getter for ObjectTML. - * A string array of TML objects to upload, in YAML or JSON format. If TML is in YAML format, - * then use escape characters for quotes and new line characters. Example TML: guid: - * 6d2c1c9b-a407-409c-8c0c-819aeb51350f\ntable:\n name: TESTINT\n db: SUPPLYCHAIN_MAIN\n schema: - * PUBLIC\n db_table: TESTINT\n connection:\n name: SnowflakeConnection\n columns:\n - name: - * C1\n db_column_name: C1\n properties:\n column_type: MEASURE\n aggregation: SUM\n index_type: - * DONT_INDEX\n db_column_properties:\n data_type: INT64\n If TML is in JSON format, then use - * escape characters for quotes. Example TML: {\\"guid\\": - * \\"6d2c1c9b-a407-409c-8c0c-819aeb51350f\\", \\"table\\": { \\"name\\": \\"TESTINT\\", - * \\"db\\": \\"SUPPLYCHAIN_MAIN\\", \\"schema\\": \\"PUBLIC\\", \\"db_table\\": \\"TESTINT\\", - * \\"connection\\": { \\"name\\": \\"SnowflakeConnection\\" }, \\"columns\\": [ { \\"name\\": - * \\"C1\\", \\"db_column_name\\": \\"C1\\", \\"properties\\": { \\"column_type\\": - * \\"MEASURE\\", \\"aggregation\\": \\"SUM\\", \\"index_type\\": \\"DONT_INDEX\\" }, - * \\"db_column_properties\\": { \\"data_type\\": \\"INT64\\" } } ] } }', - * @return Returns the List of String - */ - @JsonGetter("objectTML") - public List getObjectTML() { - return objectTML; - } - - /** - * Setter for ObjectTML. - * A string array of TML objects to upload, in YAML or JSON format. If TML is in YAML format, - * then use escape characters for quotes and new line characters. Example TML: guid: - * 6d2c1c9b-a407-409c-8c0c-819aeb51350f\ntable:\n name: TESTINT\n db: SUPPLYCHAIN_MAIN\n schema: - * PUBLIC\n db_table: TESTINT\n connection:\n name: SnowflakeConnection\n columns:\n - name: - * C1\n db_column_name: C1\n properties:\n column_type: MEASURE\n aggregation: SUM\n index_type: - * DONT_INDEX\n db_column_properties:\n data_type: INT64\n If TML is in JSON format, then use - * escape characters for quotes. Example TML: {\\"guid\\": - * \\"6d2c1c9b-a407-409c-8c0c-819aeb51350f\\", \\"table\\": { \\"name\\": \\"TESTINT\\", - * \\"db\\": \\"SUPPLYCHAIN_MAIN\\", \\"schema\\": \\"PUBLIC\\", \\"db_table\\": \\"TESTINT\\", - * \\"connection\\": { \\"name\\": \\"SnowflakeConnection\\" }, \\"columns\\": [ { \\"name\\": - * \\"C1\\", \\"db_column_name\\": \\"C1\\", \\"properties\\": { \\"column_type\\": - * \\"MEASURE\\", \\"aggregation\\": \\"SUM\\", \\"index_type\\": \\"DONT_INDEX\\" }, - * \\"db_column_properties\\": { \\"data_type\\": \\"INT64\\" } } ] } }', - * @param objectTML Value for List of String - */ - @JsonSetter("objectTML") - public void setObjectTML(List objectTML) { - this.objectTML = objectTML; - } - - /** - * Getter for ImportPolicy. - * Policy to follow during import - * @return Returns the ImportPolicyEnum - */ - @JsonGetter("importPolicy") - @JsonInclude(JsonInclude.Include.NON_NULL) - public ImportPolicyEnum getImportPolicy() { - return importPolicy; - } - - /** - * Setter for ImportPolicy. - * Policy to follow during import - * @param importPolicy Value for ImportPolicyEnum - */ - @JsonSetter("importPolicy") - public void setImportPolicy(ImportPolicyEnum importPolicy) { - this.importPolicy = importPolicy; - } - - /** - * Getter for ForceCreate. - * Specifies if you are updating or creating objects. To create new objects, specify true. By - * default, ThoughtSpot updates existing objects that have the same GUID as the objects you are - * importing. When set to true, the GUID property in the imported TML is replaced on the server, - * and the response headers will include the id_guid property with the GUID of the new object. - * The new object will be assigned a new GUID, even if the imported TML file included a guid - * value. Thus, there is no need to include the guid in the TML file if you are using - * forceCreate=true. - * @return Returns the Boolean - */ - @JsonGetter("forceCreate") - @JsonInclude(JsonInclude.Include.NON_NULL) - public Boolean getForceCreate() { - return forceCreate; - } - - /** - * Setter for ForceCreate. - * Specifies if you are updating or creating objects. To create new objects, specify true. By - * default, ThoughtSpot updates existing objects that have the same GUID as the objects you are - * importing. When set to true, the GUID property in the imported TML is replaced on the server, - * and the response headers will include the id_guid property with the GUID of the new object. - * The new object will be assigned a new GUID, even if the imported TML file included a guid - * value. Thus, there is no need to include the guid in the TML file if you are using - * forceCreate=true. - * @param forceCreate Value for Boolean - */ - @JsonSetter("forceCreate") - public void setForceCreate(Boolean forceCreate) { - this.forceCreate = forceCreate; - } - - /** - * Converts this TspublicRestV2MetadataTmlImportRequest into string format. - * @return String representation of this class - */ - @Override - public String toString() { - return "TspublicRestV2MetadataTmlImportRequest [" + "objectTML=" + objectTML - + ", importPolicy=" + importPolicy + ", forceCreate=" + forceCreate + "]"; - } - - /** - * Builds a new {@link TspublicRestV2MetadataTmlImportRequest.Builder} object. - * Creates the instance with the state of the current model. - * @return a new {@link TspublicRestV2MetadataTmlImportRequest.Builder} object - */ - public Builder toBuilder() { - Builder builder = new Builder(objectTML) - .importPolicy(getImportPolicy()) - .forceCreate(getForceCreate()); - return builder; - } - - /** - * Class to build instances of {@link TspublicRestV2MetadataTmlImportRequest}. - */ - public static class Builder { - private List objectTML; - private ImportPolicyEnum importPolicy = ImportPolicyEnum.PARTIAL; - private Boolean forceCreate = false; - - /** - * Initialization constructor. - */ - public Builder() { - } - - /** - * Initialization constructor. - * @param objectTML List of String value for objectTML. - */ - public Builder(List objectTML) { - this.objectTML = objectTML; - } - - /** - * Setter for objectTML. - * @param objectTML List of String value for objectTML. - * @return Builder - */ - public Builder objectTML(List objectTML) { - this.objectTML = objectTML; - return this; - } - - /** - * Setter for importPolicy. - * @param importPolicy ImportPolicyEnum value for importPolicy. - * @return Builder - */ - public Builder importPolicy(ImportPolicyEnum importPolicy) { - this.importPolicy = importPolicy; - return this; - } - - /** - * Setter for forceCreate. - * @param forceCreate Boolean value for forceCreate. - * @return Builder - */ - public Builder forceCreate(Boolean forceCreate) { - this.forceCreate = forceCreate; - return this; - } - - /** - * Builds a new {@link TspublicRestV2MetadataTmlImportRequest} object using the set fields. - * @return {@link TspublicRestV2MetadataTmlImportRequest} - */ - public TspublicRestV2MetadataTmlImportRequest build() { - return new TspublicRestV2MetadataTmlImportRequest(objectTML, importPolicy, forceCreate); - } - } -} diff --git a/Java/src/main/java/localhost/models/TspublicRestV2OrgCreateRequest.java b/Java/src/main/java/localhost/models/TspublicRestV2OrgCreateRequest.java deleted file mode 100644 index 4c167f3e6..000000000 --- a/Java/src/main/java/localhost/models/TspublicRestV2OrgCreateRequest.java +++ /dev/null @@ -1,150 +0,0 @@ -/* - * ThoughtSpotPublicRESTAPILib - * - * This file was automatically generated by APIMATIC v3.0 ( https://www.apimatic.io ). - */ - -package localhost.models; - -import com.fasterxml.jackson.annotation.JsonGetter; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonSetter; -import io.apimatic.core.types.BaseModel; - -/** - * This is a model class for TspublicRestV2OrgCreateRequest type. - */ -public class TspublicRestV2OrgCreateRequest { - private String name; - private String description; - - /** - * Default constructor. - */ - public TspublicRestV2OrgCreateRequest() { - } - - /** - * Initialization constructor. - * @param name String value for name. - * @param description String value for description. - */ - public TspublicRestV2OrgCreateRequest( - String name, - String description) { - this.name = name; - this.description = description; - } - - /** - * Getter for Name. - * Name of the organization. - * @return Returns the String - */ - @JsonGetter("name") - public String getName() { - return name; - } - - /** - * Setter for Name. - * Name of the organization. - * @param name Value for String - */ - @JsonSetter("name") - public void setName(String name) { - this.name = name; - } - - /** - * Getter for Description. - * Description text for the organization. - * @return Returns the String - */ - @JsonGetter("description") - @JsonInclude(JsonInclude.Include.NON_NULL) - public String getDescription() { - return description; - } - - /** - * Setter for Description. - * Description text for the organization. - * @param description Value for String - */ - @JsonSetter("description") - public void setDescription(String description) { - this.description = description; - } - - /** - * Converts this TspublicRestV2OrgCreateRequest into string format. - * @return String representation of this class - */ - @Override - public String toString() { - return "TspublicRestV2OrgCreateRequest [" + "name=" + name + ", description=" + description - + "]"; - } - - /** - * Builds a new {@link TspublicRestV2OrgCreateRequest.Builder} object. - * Creates the instance with the state of the current model. - * @return a new {@link TspublicRestV2OrgCreateRequest.Builder} object - */ - public Builder toBuilder() { - Builder builder = new Builder(name) - .description(getDescription()); - return builder; - } - - /** - * Class to build instances of {@link TspublicRestV2OrgCreateRequest}. - */ - public static class Builder { - private String name; - private String description; - - /** - * Initialization constructor. - */ - public Builder() { - } - - /** - * Initialization constructor. - * @param name String value for name. - */ - public Builder(String name) { - this.name = name; - } - - /** - * Setter for name. - * @param name String value for name. - * @return Builder - */ - public Builder name(String name) { - this.name = name; - return this; - } - - /** - * Setter for description. - * @param description String value for description. - * @return Builder - */ - public Builder description(String description) { - this.description = description; - return this; - } - - /** - * Builds a new {@link TspublicRestV2OrgCreateRequest} object using the set fields. - * @return {@link TspublicRestV2OrgCreateRequest} - */ - public TspublicRestV2OrgCreateRequest build() { - return new TspublicRestV2OrgCreateRequest(name, description); - } - } -} diff --git a/Java/src/main/java/localhost/models/TspublicRestV2OrgSearchRequest.java b/Java/src/main/java/localhost/models/TspublicRestV2OrgSearchRequest.java deleted file mode 100644 index 6d8e7b40a..000000000 --- a/Java/src/main/java/localhost/models/TspublicRestV2OrgSearchRequest.java +++ /dev/null @@ -1,178 +0,0 @@ -/* - * ThoughtSpotPublicRESTAPILib - * - * This file was automatically generated by APIMATIC v3.0 ( https://www.apimatic.io ). - */ - -package localhost.models; - -import com.fasterxml.jackson.annotation.JsonGetter; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonSetter; -import io.apimatic.core.types.BaseModel; - -/** - * This is a model class for TspublicRestV2OrgSearchRequest type. - */ -public class TspublicRestV2OrgSearchRequest { - private String name; - private Integer id; - private Boolean showDeleted; - - /** - * Default constructor. - */ - public TspublicRestV2OrgSearchRequest() { - showDeleted = false; - } - - /** - * Initialization constructor. - * @param name String value for name. - * @param id Integer value for id. - * @param showDeleted Boolean value for showDeleted. - */ - public TspublicRestV2OrgSearchRequest( - String name, - Integer id, - Boolean showDeleted) { - this.name = name; - this.id = id; - this.showDeleted = showDeleted; - } - - /** - * Getter for Name. - * Name of the organization. - * @return Returns the String - */ - @JsonGetter("name") - @JsonInclude(JsonInclude.Include.NON_NULL) - public String getName() { - return name; - } - - /** - * Setter for Name. - * Name of the organization. - * @param name Value for String - */ - @JsonSetter("name") - public void setName(String name) { - this.name = name; - } - - /** - * Getter for Id. - * The ID of the organization. - * @return Returns the Integer - */ - @JsonGetter("id") - @JsonInclude(JsonInclude.Include.NON_NULL) - public Integer getId() { - return id; - } - - /** - * Setter for Id. - * The ID of the organization. - * @param id Value for Integer - */ - @JsonSetter("id") - public void setId(Integer id) { - this.id = id; - } - - /** - * Getter for ShowDeleted. - * When set to true, the response will include the details of deleted organization also. - * @return Returns the Boolean - */ - @JsonGetter("showDeleted") - @JsonInclude(JsonInclude.Include.NON_NULL) - public Boolean getShowDeleted() { - return showDeleted; - } - - /** - * Setter for ShowDeleted. - * When set to true, the response will include the details of deleted organization also. - * @param showDeleted Value for Boolean - */ - @JsonSetter("showDeleted") - public void setShowDeleted(Boolean showDeleted) { - this.showDeleted = showDeleted; - } - - /** - * Converts this TspublicRestV2OrgSearchRequest into string format. - * @return String representation of this class - */ - @Override - public String toString() { - return "TspublicRestV2OrgSearchRequest [" + "name=" + name + ", id=" + id + ", showDeleted=" - + showDeleted + "]"; - } - - /** - * Builds a new {@link TspublicRestV2OrgSearchRequest.Builder} object. - * Creates the instance with the state of the current model. - * @return a new {@link TspublicRestV2OrgSearchRequest.Builder} object - */ - public Builder toBuilder() { - Builder builder = new Builder() - .name(getName()) - .id(getId()) - .showDeleted(getShowDeleted()); - return builder; - } - - /** - * Class to build instances of {@link TspublicRestV2OrgSearchRequest}. - */ - public static class Builder { - private String name; - private Integer id; - private Boolean showDeleted = false; - - - - /** - * Setter for name. - * @param name String value for name. - * @return Builder - */ - public Builder name(String name) { - this.name = name; - return this; - } - - /** - * Setter for id. - * @param id Integer value for id. - * @return Builder - */ - public Builder id(Integer id) { - this.id = id; - return this; - } - - /** - * Setter for showDeleted. - * @param showDeleted Boolean value for showDeleted. - * @return Builder - */ - public Builder showDeleted(Boolean showDeleted) { - this.showDeleted = showDeleted; - return this; - } - - /** - * Builds a new {@link TspublicRestV2OrgSearchRequest} object using the set fields. - * @return {@link TspublicRestV2OrgSearchRequest} - */ - public TspublicRestV2OrgSearchRequest build() { - return new TspublicRestV2OrgSearchRequest(name, id, showDeleted); - } - } -} diff --git a/Java/src/main/java/localhost/models/TspublicRestV2OrgUpdateRequest.java b/Java/src/main/java/localhost/models/TspublicRestV2OrgUpdateRequest.java deleted file mode 100644 index 47e71651c..000000000 --- a/Java/src/main/java/localhost/models/TspublicRestV2OrgUpdateRequest.java +++ /dev/null @@ -1,214 +0,0 @@ -/* - * ThoughtSpotPublicRESTAPILib - * - * This file was automatically generated by APIMATIC v3.0 ( https://www.apimatic.io ). - */ - -package localhost.models; - -import com.fasterxml.jackson.annotation.JsonGetter; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonSetter; -import io.apimatic.core.types.BaseModel; - -/** - * This is a model class for TspublicRestV2OrgUpdateRequest type. - */ -public class TspublicRestV2OrgUpdateRequest { - private String name; - private Integer id; - private String description; - private Boolean active; - - /** - * Default constructor. - */ - public TspublicRestV2OrgUpdateRequest() { - } - - /** - * Initialization constructor. - * @param name String value for name. - * @param id Integer value for id. - * @param description String value for description. - * @param active Boolean value for active. - */ - public TspublicRestV2OrgUpdateRequest( - String name, - Integer id, - String description, - Boolean active) { - this.name = name; - this.id = id; - this.description = description; - this.active = active; - } - - /** - * Getter for Name. - * Name of the organization. - * @return Returns the String - */ - @JsonGetter("name") - @JsonInclude(JsonInclude.Include.NON_NULL) - public String getName() { - return name; - } - - /** - * Setter for Name. - * Name of the organization. - * @param name Value for String - */ - @JsonSetter("name") - public void setName(String name) { - this.name = name; - } - - /** - * Getter for Id. - * The ID of the organization. - * @return Returns the Integer - */ - @JsonGetter("id") - @JsonInclude(JsonInclude.Include.NON_NULL) - public Integer getId() { - return id; - } - - /** - * Setter for Id. - * The ID of the organization. - * @param id Value for Integer - */ - @JsonSetter("id") - public void setId(Integer id) { - this.id = id; - } - - /** - * Getter for Description. - * Description text for the organization. - * @return Returns the String - */ - @JsonGetter("description") - @JsonInclude(JsonInclude.Include.NON_NULL) - public String getDescription() { - return description; - } - - /** - * Setter for Description. - * Description text for the organization. - * @param description Value for String - */ - @JsonSetter("description") - public void setDescription(String description) { - this.description = description; - } - - /** - * Getter for Active. - * Status of the organization. - * @return Returns the Boolean - */ - @JsonGetter("active") - @JsonInclude(JsonInclude.Include.NON_NULL) - public Boolean getActive() { - return active; - } - - /** - * Setter for Active. - * Status of the organization. - * @param active Value for Boolean - */ - @JsonSetter("active") - public void setActive(Boolean active) { - this.active = active; - } - - /** - * Converts this TspublicRestV2OrgUpdateRequest into string format. - * @return String representation of this class - */ - @Override - public String toString() { - return "TspublicRestV2OrgUpdateRequest [" + "name=" + name + ", id=" + id + ", description=" - + description + ", active=" + active + "]"; - } - - /** - * Builds a new {@link TspublicRestV2OrgUpdateRequest.Builder} object. - * Creates the instance with the state of the current model. - * @return a new {@link TspublicRestV2OrgUpdateRequest.Builder} object - */ - public Builder toBuilder() { - Builder builder = new Builder() - .name(getName()) - .id(getId()) - .description(getDescription()) - .active(getActive()); - return builder; - } - - /** - * Class to build instances of {@link TspublicRestV2OrgUpdateRequest}. - */ - public static class Builder { - private String name; - private Integer id; - private String description; - private Boolean active; - - - - /** - * Setter for name. - * @param name String value for name. - * @return Builder - */ - public Builder name(String name) { - this.name = name; - return this; - } - - /** - * Setter for id. - * @param id Integer value for id. - * @return Builder - */ - public Builder id(Integer id) { - this.id = id; - return this; - } - - /** - * Setter for description. - * @param description String value for description. - * @return Builder - */ - public Builder description(String description) { - this.description = description; - return this; - } - - /** - * Setter for active. - * @param active Boolean value for active. - * @return Builder - */ - public Builder active(Boolean active) { - this.active = active; - return this; - } - - /** - * Builds a new {@link TspublicRestV2OrgUpdateRequest} object using the set fields. - * @return {@link TspublicRestV2OrgUpdateRequest} - */ - public TspublicRestV2OrgUpdateRequest build() { - return new TspublicRestV2OrgUpdateRequest(name, id, description, active); - } - } -} diff --git a/Java/src/main/java/localhost/models/TspublicRestV2SecurityPermissionPrincipalSearchRequest.java b/Java/src/main/java/localhost/models/TspublicRestV2SecurityPermissionPrincipalSearchRequest.java deleted file mode 100644 index b1e65cd3f..000000000 --- a/Java/src/main/java/localhost/models/TspublicRestV2SecurityPermissionPrincipalSearchRequest.java +++ /dev/null @@ -1,154 +0,0 @@ -/* - * ThoughtSpotPublicRESTAPILib - * - * This file was automatically generated by APIMATIC v3.0 ( https://www.apimatic.io ). - */ - -package localhost.models; - -import com.fasterxml.jackson.annotation.JsonGetter; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonSetter; -import io.apimatic.core.types.BaseModel; -import java.util.List; - -/** - * This is a model class for TspublicRestV2SecurityPermissionPrincipalSearchRequest type. - */ -public class TspublicRestV2SecurityPermissionPrincipalSearchRequest { - private List principal; - private List tsObject; - - /** - * Default constructor. - */ - public TspublicRestV2SecurityPermissionPrincipalSearchRequest() { - } - - /** - * Initialization constructor. - * @param principal List of UserNameAndIDInput value for principal. - * @param tsObject List of TsObjectSearchInput value for tsObject. - */ - public TspublicRestV2SecurityPermissionPrincipalSearchRequest( - List principal, - List tsObject) { - this.principal = principal; - this.tsObject = tsObject; - } - - /** - * Getter for Principal. - * A JSON array of principal names or GUIDs to be included in the request. When both are given - * then id is considered. - * @return Returns the List of UserNameAndIDInput - */ - @JsonGetter("principal") - public List getPrincipal() { - return principal; - } - - /** - * Setter for Principal. - * A JSON array of principal names or GUIDs to be included in the request. When both are given - * then id is considered. - * @param principal Value for List of UserNameAndIDInput - */ - @JsonSetter("principal") - public void setPrincipal(List principal) { - this.principal = principal; - } - - /** - * Getter for TsObject. - * A JSON Array of GUIDs and type of metadata object. - * @return Returns the List of TsObjectSearchInput - */ - @JsonGetter("tsObject") - @JsonInclude(JsonInclude.Include.NON_NULL) - public List getTsObject() { - return tsObject; - } - - /** - * Setter for TsObject. - * A JSON Array of GUIDs and type of metadata object. - * @param tsObject Value for List of TsObjectSearchInput - */ - @JsonSetter("tsObject") - public void setTsObject(List tsObject) { - this.tsObject = tsObject; - } - - /** - * Converts this TspublicRestV2SecurityPermissionPrincipalSearchRequest into string format. - * @return String representation of this class - */ - @Override - public String toString() { - return "TspublicRestV2SecurityPermissionPrincipalSearchRequest [" + "principal=" + principal - + ", tsObject=" + tsObject + "]"; - } - - /** - * Builds a new {@link TspublicRestV2SecurityPermissionPrincipalSearchRequest.Builder} object. - * Creates the instance with the state of the current model. - * @return a new {@link TspublicRestV2SecurityPermissionPrincipalSearchRequest.Builder} object - */ - public Builder toBuilder() { - Builder builder = new Builder(principal) - .tsObject(getTsObject()); - return builder; - } - - /** - * Class to build instances of {@link TspublicRestV2SecurityPermissionPrincipalSearchRequest}. - */ - public static class Builder { - private List principal; - private List tsObject; - - /** - * Initialization constructor. - */ - public Builder() { - } - - /** - * Initialization constructor. - * @param principal List of UserNameAndIDInput value for principal. - */ - public Builder(List principal) { - this.principal = principal; - } - - /** - * Setter for principal. - * @param principal List of UserNameAndIDInput value for principal. - * @return Builder - */ - public Builder principal(List principal) { - this.principal = principal; - return this; - } - - /** - * Setter for tsObject. - * @param tsObject List of TsObjectSearchInput value for tsObject. - * @return Builder - */ - public Builder tsObject(List tsObject) { - this.tsObject = tsObject; - return this; - } - - /** - * Builds a new {@link TspublicRestV2SecurityPermissionPrincipalSearchRequest} object using - * the set fields. - * @return {@link TspublicRestV2SecurityPermissionPrincipalSearchRequest} - */ - public TspublicRestV2SecurityPermissionPrincipalSearchRequest build() { - return new TspublicRestV2SecurityPermissionPrincipalSearchRequest(principal, tsObject); - } - } -} diff --git a/Java/src/main/java/localhost/models/TspublicRestV2SecurityPermissionTsobjectSearchRequest.java b/Java/src/main/java/localhost/models/TspublicRestV2SecurityPermissionTsobjectSearchRequest.java deleted file mode 100644 index dfa6c63c1..000000000 --- a/Java/src/main/java/localhost/models/TspublicRestV2SecurityPermissionTsobjectSearchRequest.java +++ /dev/null @@ -1,193 +0,0 @@ -/* - * ThoughtSpotPublicRESTAPILib - * - * This file was automatically generated by APIMATIC v3.0 ( https://www.apimatic.io ). - */ - -package localhost.models; - -import com.fasterxml.jackson.annotation.JsonGetter; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonSetter; -import io.apimatic.core.types.BaseModel; -import java.util.List; - -/** - * This is a model class for TspublicRestV2SecurityPermissionTsobjectSearchRequest type. - */ -public class TspublicRestV2SecurityPermissionTsobjectSearchRequest { - private List tsObject; - private List principal; - private Boolean includeDependent; - - /** - * Default constructor. - */ - public TspublicRestV2SecurityPermissionTsobjectSearchRequest() { - includeDependent = false; - } - - /** - * Initialization constructor. - * @param tsObject List of TsObjectSearchInput value for tsObject. - * @param principal List of UserNameAndIDInput value for principal. - * @param includeDependent Boolean value for includeDependent. - */ - public TspublicRestV2SecurityPermissionTsobjectSearchRequest( - List tsObject, - List principal, - Boolean includeDependent) { - this.tsObject = tsObject; - this.principal = principal; - this.includeDependent = includeDependent; - } - - /** - * Getter for TsObject. - * A JSON Array of GUIDs and type of metadata object. - * @return Returns the List of TsObjectSearchInput - */ - @JsonGetter("tsObject") - public List getTsObject() { - return tsObject; - } - - /** - * Setter for TsObject. - * A JSON Array of GUIDs and type of metadata object. - * @param tsObject Value for List of TsObjectSearchInput - */ - @JsonSetter("tsObject") - public void setTsObject(List tsObject) { - this.tsObject = tsObject; - } - - /** - * Getter for Principal. - * A JSON array of principal names or GUIDs. When both are given then id is considered. - * @return Returns the List of UserNameAndIDInput - */ - @JsonGetter("principal") - @JsonInclude(JsonInclude.Include.NON_NULL) - public List getPrincipal() { - return principal; - } - - /** - * Setter for Principal. - * A JSON array of principal names or GUIDs. When both are given then id is considered. - * @param principal Value for List of UserNameAndIDInput - */ - @JsonSetter("principal") - public void setPrincipal(List principal) { - this.principal = principal; - } - - /** - * Getter for IncludeDependent. - * When this field is set to true, the API response includes the permission details for the - * dependent objects. - * @return Returns the Boolean - */ - @JsonGetter("includeDependent") - @JsonInclude(JsonInclude.Include.NON_NULL) - public Boolean getIncludeDependent() { - return includeDependent; - } - - /** - * Setter for IncludeDependent. - * When this field is set to true, the API response includes the permission details for the - * dependent objects. - * @param includeDependent Value for Boolean - */ - @JsonSetter("includeDependent") - public void setIncludeDependent(Boolean includeDependent) { - this.includeDependent = includeDependent; - } - - /** - * Converts this TspublicRestV2SecurityPermissionTsobjectSearchRequest into string format. - * @return String representation of this class - */ - @Override - public String toString() { - return "TspublicRestV2SecurityPermissionTsobjectSearchRequest [" + "tsObject=" + tsObject - + ", principal=" + principal + ", includeDependent=" + includeDependent + "]"; - } - - /** - * Builds a new {@link TspublicRestV2SecurityPermissionTsobjectSearchRequest.Builder} object. - * Creates the instance with the state of the current model. - * @return a new {@link TspublicRestV2SecurityPermissionTsobjectSearchRequest.Builder} object - */ - public Builder toBuilder() { - Builder builder = new Builder(tsObject) - .principal(getPrincipal()) - .includeDependent(getIncludeDependent()); - return builder; - } - - /** - * Class to build instances of {@link TspublicRestV2SecurityPermissionTsobjectSearchRequest}. - */ - public static class Builder { - private List tsObject; - private List principal; - private Boolean includeDependent = false; - - /** - * Initialization constructor. - */ - public Builder() { - } - - /** - * Initialization constructor. - * @param tsObject List of TsObjectSearchInput value for tsObject. - */ - public Builder(List tsObject) { - this.tsObject = tsObject; - } - - /** - * Setter for tsObject. - * @param tsObject List of TsObjectSearchInput value for tsObject. - * @return Builder - */ - public Builder tsObject(List tsObject) { - this.tsObject = tsObject; - return this; - } - - /** - * Setter for principal. - * @param principal List of UserNameAndIDInput value for principal. - * @return Builder - */ - public Builder principal(List principal) { - this.principal = principal; - return this; - } - - /** - * Setter for includeDependent. - * @param includeDependent Boolean value for includeDependent. - * @return Builder - */ - public Builder includeDependent(Boolean includeDependent) { - this.includeDependent = includeDependent; - return this; - } - - /** - * Builds a new {@link TspublicRestV2SecurityPermissionTsobjectSearchRequest} object using - * the set fields. - * @return {@link TspublicRestV2SecurityPermissionTsobjectSearchRequest} - */ - public TspublicRestV2SecurityPermissionTsobjectSearchRequest build() { - return new TspublicRestV2SecurityPermissionTsobjectSearchRequest(tsObject, principal, - includeDependent); - } - } -} diff --git a/Java/src/main/java/localhost/models/TspublicRestV2SecurityShareTsobjectRequest.java b/Java/src/main/java/localhost/models/TspublicRestV2SecurityShareTsobjectRequest.java deleted file mode 100644 index eadaddcf7..000000000 --- a/Java/src/main/java/localhost/models/TspublicRestV2SecurityShareTsobjectRequest.java +++ /dev/null @@ -1,355 +0,0 @@ -/* - * ThoughtSpotPublicRESTAPILib - * - * This file was automatically generated by APIMATIC v3.0 ( https://www.apimatic.io ). - */ - -package localhost.models; - -import com.fasterxml.jackson.annotation.JsonGetter; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonSetter; -import io.apimatic.core.types.BaseModel; -import java.util.List; - -/** - * This is a model class for TspublicRestV2SecurityShareTsobjectRequest type. - */ -public class TspublicRestV2SecurityShareTsobjectRequest { - private Type18Enum type; - private List id; - private String permission; - private List emailId; - private Boolean notify; - private String message; - private Boolean includeCustomEmbedUrl; - - /** - * Default constructor. - */ - public TspublicRestV2SecurityShareTsobjectRequest() { - notify = true; - includeCustomEmbedUrl = false; - } - - /** - * Initialization constructor. - * @param type Type18Enum value for type. - * @param id List of String value for id. - * @param permission String value for permission. - * @param emailId List of String value for emailId. - * @param notify Boolean value for notify. - * @param message String value for message. - * @param includeCustomEmbedUrl Boolean value for includeCustomEmbedUrl. - */ - public TspublicRestV2SecurityShareTsobjectRequest( - Type18Enum type, - List id, - String permission, - List emailId, - Boolean notify, - String message, - Boolean includeCustomEmbedUrl) { - this.type = type; - this.id = id; - this.permission = permission; - this.emailId = emailId; - this.notify = notify; - this.message = message; - this.includeCustomEmbedUrl = includeCustomEmbedUrl; - } - - /** - * Getter for Type. - * Type of metadata object. Valid values: Liveboard|Answer|DataObject|Column - * @return Returns the Type18Enum - */ - @JsonGetter("type") - public Type18Enum getType() { - return type; - } - - /** - * Setter for Type. - * Type of metadata object. Valid values: Liveboard|Answer|DataObject|Column - * @param type Value for Type18Enum - */ - @JsonSetter("type") - public void setType(Type18Enum type) { - this.type = type; - } - - /** - * Getter for Id. - * A JSON array of the GUIDs of the objects to be shared - * @return Returns the List of String - */ - @JsonGetter("id") - public List getId() { - return id; - } - - /** - * Setter for Id. - * A JSON array of the GUIDs of the objects to be shared - * @param id Value for List of String - */ - @JsonSetter("id") - public void setId(List id) { - this.id = id; - } - - /** - * Getter for Permission. - * A JSON object with GUIDs of user and user group, and the type of access privilge. You can - * provide READ_ONLY or MODIFY access to the objects. With READ_ONLY access, the user or user - * group can view the shared object, whereas MODIFY access enables users to modify the object. - * To remove access to a shared object, you can set the shareMode in the permission string to - * NO_ACCESS. Example: {"permissions": {"e7040a64-7ff1-4ab9-a1b0-f1acac596866": {"shareMode": - * "READ_ONLY"}, "f7b8f511-317c-485d-8131-26cf084ef47b": {"shareMode": "MODIFY"}, - * "7a9a6715-e154-431b-baaf-7b58246c13dd":{"shareMode":"NO_ACCESS"}}} - * @return Returns the String - */ - @JsonGetter("permission") - public String getPermission() { - return permission; - } - - /** - * Setter for Permission. - * A JSON object with GUIDs of user and user group, and the type of access privilge. You can - * provide READ_ONLY or MODIFY access to the objects. With READ_ONLY access, the user or user - * group can view the shared object, whereas MODIFY access enables users to modify the object. - * To remove access to a shared object, you can set the shareMode in the permission string to - * NO_ACCESS. Example: {"permissions": {"e7040a64-7ff1-4ab9-a1b0-f1acac596866": {"shareMode": - * "READ_ONLY"}, "f7b8f511-317c-485d-8131-26cf084ef47b": {"shareMode": "MODIFY"}, - * "7a9a6715-e154-431b-baaf-7b58246c13dd":{"shareMode":"NO_ACCESS"}}} - * @param permission Value for String - */ - @JsonSetter("permission") - public void setPermission(String permission) { - this.permission = permission; - } - - /** - * Getter for EmailId. - * The email addresses that should ne notified when the objects are shared. - * @return Returns the List of String - */ - @JsonGetter("emailId") - @JsonInclude(JsonInclude.Include.NON_NULL) - public List getEmailId() { - return emailId; - } - - /** - * Setter for EmailId. - * The email addresses that should ne notified when the objects are shared. - * @param emailId Value for List of String - */ - @JsonSetter("emailId") - public void setEmailId(List emailId) { - this.emailId = emailId; - } - - /** - * Getter for Notify. - * When set to true, a notification is sent to the users after an object is shared. - * @return Returns the Boolean - */ - @JsonGetter("notify") - @JsonInclude(JsonInclude.Include.NON_NULL) - public Boolean getNotify() { - return notify; - } - - /** - * Setter for Notify. - * When set to true, a notification is sent to the users after an object is shared. - * @param notify Value for Boolean - */ - @JsonSetter("notify") - public void setNotify(Boolean notify) { - this.notify = notify; - } - - /** - * Getter for Message. - * The message text to send in the notification email. - * @return Returns the String - */ - @JsonGetter("message") - @JsonInclude(JsonInclude.Include.NON_NULL) - public String getMessage() { - return message; - } - - /** - * Setter for Message. - * The message text to send in the notification email. - * @param message Value for String - */ - @JsonSetter("message") - public void setMessage(String message) { - this.message = message; - } - - /** - * Getter for IncludeCustomEmbedUrl. - * When set to true, ThoughtSpot sends a link with the host application context to allow users - * to access the shared object from their ThoughtSpot embedded instance. - * @return Returns the Boolean - */ - @JsonGetter("includeCustomEmbedUrl") - @JsonInclude(JsonInclude.Include.NON_NULL) - public Boolean getIncludeCustomEmbedUrl() { - return includeCustomEmbedUrl; - } - - /** - * Setter for IncludeCustomEmbedUrl. - * When set to true, ThoughtSpot sends a link with the host application context to allow users - * to access the shared object from their ThoughtSpot embedded instance. - * @param includeCustomEmbedUrl Value for Boolean - */ - @JsonSetter("includeCustomEmbedUrl") - public void setIncludeCustomEmbedUrl(Boolean includeCustomEmbedUrl) { - this.includeCustomEmbedUrl = includeCustomEmbedUrl; - } - - /** - * Converts this TspublicRestV2SecurityShareTsobjectRequest into string format. - * @return String representation of this class - */ - @Override - public String toString() { - return "TspublicRestV2SecurityShareTsobjectRequest [" + "type=" + type + ", id=" + id - + ", permission=" + permission + ", emailId=" + emailId + ", notify=" + notify - + ", message=" + message + ", includeCustomEmbedUrl=" + includeCustomEmbedUrl + "]"; - } - - /** - * Builds a new {@link TspublicRestV2SecurityShareTsobjectRequest.Builder} object. - * Creates the instance with the state of the current model. - * @return a new {@link TspublicRestV2SecurityShareTsobjectRequest.Builder} object - */ - public Builder toBuilder() { - Builder builder = new Builder(type, id, permission) - .emailId(getEmailId()) - .notify(getNotify()) - .message(getMessage()) - .includeCustomEmbedUrl(getIncludeCustomEmbedUrl()); - return builder; - } - - /** - * Class to build instances of {@link TspublicRestV2SecurityShareTsobjectRequest}. - */ - public static class Builder { - private Type18Enum type; - private List id; - private String permission; - private List emailId; - private Boolean notify = true; - private String message; - private Boolean includeCustomEmbedUrl = false; - - /** - * Initialization constructor. - */ - public Builder() { - } - - /** - * Initialization constructor. - * @param type Type18Enum value for type. - * @param id List of String value for id. - * @param permission String value for permission. - */ - public Builder(Type18Enum type, List id, String permission) { - this.type = type; - this.id = id; - this.permission = permission; - } - - /** - * Setter for type. - * @param type Type18Enum value for type. - * @return Builder - */ - public Builder type(Type18Enum type) { - this.type = type; - return this; - } - - /** - * Setter for id. - * @param id List of String value for id. - * @return Builder - */ - public Builder id(List id) { - this.id = id; - return this; - } - - /** - * Setter for permission. - * @param permission String value for permission. - * @return Builder - */ - public Builder permission(String permission) { - this.permission = permission; - return this; - } - - /** - * Setter for emailId. - * @param emailId List of String value for emailId. - * @return Builder - */ - public Builder emailId(List emailId) { - this.emailId = emailId; - return this; - } - - /** - * Setter for notify. - * @param notify Boolean value for notify. - * @return Builder - */ - public Builder notify(Boolean notify) { - this.notify = notify; - return this; - } - - /** - * Setter for message. - * @param message String value for message. - * @return Builder - */ - public Builder message(String message) { - this.message = message; - return this; - } - - /** - * Setter for includeCustomEmbedUrl. - * @param includeCustomEmbedUrl Boolean value for includeCustomEmbedUrl. - * @return Builder - */ - public Builder includeCustomEmbedUrl(Boolean includeCustomEmbedUrl) { - this.includeCustomEmbedUrl = includeCustomEmbedUrl; - return this; - } - - /** - * Builds a new {@link TspublicRestV2SecurityShareTsobjectRequest} object using the set - * fields. - * @return {@link TspublicRestV2SecurityShareTsobjectRequest} - */ - public TspublicRestV2SecurityShareTsobjectRequest build() { - return new TspublicRestV2SecurityShareTsobjectRequest(type, id, permission, emailId, - notify, message, includeCustomEmbedUrl); - } - } -} diff --git a/Java/src/main/java/localhost/models/TspublicRestV2SecurityShareVisualizationRequest.java b/Java/src/main/java/localhost/models/TspublicRestV2SecurityShareVisualizationRequest.java deleted file mode 100644 index 1a1782154..000000000 --- a/Java/src/main/java/localhost/models/TspublicRestV2SecurityShareVisualizationRequest.java +++ /dev/null @@ -1,343 +0,0 @@ -/* - * ThoughtSpotPublicRESTAPILib - * - * This file was automatically generated by APIMATIC v3.0 ( https://www.apimatic.io ). - */ - -package localhost.models; - -import com.fasterxml.jackson.annotation.JsonGetter; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonSetter; -import io.apimatic.core.types.BaseModel; -import java.util.List; - -/** - * This is a model class for TspublicRestV2SecurityShareVisualizationRequest type. - */ -public class TspublicRestV2SecurityShareVisualizationRequest { - private String id; - private String vizId; - private List principalId; - private List emailId; - private Boolean notify; - private String message; - private Boolean includeCustomEmbedUrl; - - /** - * Default constructor. - */ - public TspublicRestV2SecurityShareVisualizationRequest() { - notify = true; - includeCustomEmbedUrl = false; - } - - /** - * Initialization constructor. - * @param id String value for id. - * @param vizId String value for vizId. - * @param principalId List of String value for principalId. - * @param emailId List of String value for emailId. - * @param notify Boolean value for notify. - * @param message String value for message. - * @param includeCustomEmbedUrl Boolean value for includeCustomEmbedUrl. - */ - public TspublicRestV2SecurityShareVisualizationRequest( - String id, - String vizId, - List principalId, - List emailId, - Boolean notify, - String message, - Boolean includeCustomEmbedUrl) { - this.id = id; - this.vizId = vizId; - this.principalId = principalId; - this.emailId = emailId; - this.notify = notify; - this.message = message; - this.includeCustomEmbedUrl = includeCustomEmbedUrl; - } - - /** - * Getter for Id. - * A JSON array of the GUIDs of the objects to be shared - * @return Returns the String - */ - @JsonGetter("id") - public String getId() { - return id; - } - - /** - * Setter for Id. - * A JSON array of the GUIDs of the objects to be shared - * @param id Value for String - */ - @JsonSetter("id") - public void setId(String id) { - this.id = id; - } - - /** - * Getter for VizId. - * The GUID of visualization - * @return Returns the String - */ - @JsonGetter("vizId") - public String getVizId() { - return vizId; - } - - /** - * Setter for VizId. - * The GUID of visualization - * @param vizId Value for String - */ - @JsonSetter("vizId") - public void setVizId(String vizId) { - this.vizId = vizId; - } - - /** - * Getter for PrincipalId. - * The GUID of the users and user groups with which you want to share the visualization - * @return Returns the List of String - */ - @JsonGetter("principalId") - public List getPrincipalId() { - return principalId; - } - - /** - * Setter for PrincipalId. - * The GUID of the users and user groups with which you want to share the visualization - * @param principalId Value for List of String - */ - @JsonSetter("principalId") - public void setPrincipalId(List principalId) { - this.principalId = principalId; - } - - /** - * Getter for EmailId. - * The email addresses that should ne notified when the objects are shared - * @return Returns the List of String - */ - @JsonGetter("emailId") - @JsonInclude(JsonInclude.Include.NON_NULL) - public List getEmailId() { - return emailId; - } - - /** - * Setter for EmailId. - * The email addresses that should ne notified when the objects are shared - * @param emailId Value for List of String - */ - @JsonSetter("emailId") - public void setEmailId(List emailId) { - this.emailId = emailId; - } - - /** - * Getter for Notify. - * When set to true, a notification is sent to the users after an object is shared. - * @return Returns the Boolean - */ - @JsonGetter("notify") - @JsonInclude(JsonInclude.Include.NON_NULL) - public Boolean getNotify() { - return notify; - } - - /** - * Setter for Notify. - * When set to true, a notification is sent to the users after an object is shared. - * @param notify Value for Boolean - */ - @JsonSetter("notify") - public void setNotify(Boolean notify) { - this.notify = notify; - } - - /** - * Getter for Message. - * The message text to send in the notification email. - * @return Returns the String - */ - @JsonGetter("message") - @JsonInclude(JsonInclude.Include.NON_NULL) - public String getMessage() { - return message; - } - - /** - * Setter for Message. - * The message text to send in the notification email. - * @param message Value for String - */ - @JsonSetter("message") - public void setMessage(String message) { - this.message = message; - } - - /** - * Getter for IncludeCustomEmbedUrl. - * When set to true, ThoughtSpot sends a link with the host application context to allow users - * to access the shared object from their ThoughtSpot embedded instance. - * @return Returns the Boolean - */ - @JsonGetter("includeCustomEmbedUrl") - @JsonInclude(JsonInclude.Include.NON_NULL) - public Boolean getIncludeCustomEmbedUrl() { - return includeCustomEmbedUrl; - } - - /** - * Setter for IncludeCustomEmbedUrl. - * When set to true, ThoughtSpot sends a link with the host application context to allow users - * to access the shared object from their ThoughtSpot embedded instance. - * @param includeCustomEmbedUrl Value for Boolean - */ - @JsonSetter("includeCustomEmbedUrl") - public void setIncludeCustomEmbedUrl(Boolean includeCustomEmbedUrl) { - this.includeCustomEmbedUrl = includeCustomEmbedUrl; - } - - /** - * Converts this TspublicRestV2SecurityShareVisualizationRequest into string format. - * @return String representation of this class - */ - @Override - public String toString() { - return "TspublicRestV2SecurityShareVisualizationRequest [" + "id=" + id + ", vizId=" + vizId - + ", principalId=" + principalId + ", emailId=" + emailId + ", notify=" + notify - + ", message=" + message + ", includeCustomEmbedUrl=" + includeCustomEmbedUrl + "]"; - } - - /** - * Builds a new {@link TspublicRestV2SecurityShareVisualizationRequest.Builder} object. - * Creates the instance with the state of the current model. - * @return a new {@link TspublicRestV2SecurityShareVisualizationRequest.Builder} object - */ - public Builder toBuilder() { - Builder builder = new Builder(id, vizId, principalId) - .emailId(getEmailId()) - .notify(getNotify()) - .message(getMessage()) - .includeCustomEmbedUrl(getIncludeCustomEmbedUrl()); - return builder; - } - - /** - * Class to build instances of {@link TspublicRestV2SecurityShareVisualizationRequest}. - */ - public static class Builder { - private String id; - private String vizId; - private List principalId; - private List emailId; - private Boolean notify = true; - private String message; - private Boolean includeCustomEmbedUrl = false; - - /** - * Initialization constructor. - */ - public Builder() { - } - - /** - * Initialization constructor. - * @param id String value for id. - * @param vizId String value for vizId. - * @param principalId List of String value for principalId. - */ - public Builder(String id, String vizId, List principalId) { - this.id = id; - this.vizId = vizId; - this.principalId = principalId; - } - - /** - * Setter for id. - * @param id String value for id. - * @return Builder - */ - public Builder id(String id) { - this.id = id; - return this; - } - - /** - * Setter for vizId. - * @param vizId String value for vizId. - * @return Builder - */ - public Builder vizId(String vizId) { - this.vizId = vizId; - return this; - } - - /** - * Setter for principalId. - * @param principalId List of String value for principalId. - * @return Builder - */ - public Builder principalId(List principalId) { - this.principalId = principalId; - return this; - } - - /** - * Setter for emailId. - * @param emailId List of String value for emailId. - * @return Builder - */ - public Builder emailId(List emailId) { - this.emailId = emailId; - return this; - } - - /** - * Setter for notify. - * @param notify Boolean value for notify. - * @return Builder - */ - public Builder notify(Boolean notify) { - this.notify = notify; - return this; - } - - /** - * Setter for message. - * @param message String value for message. - * @return Builder - */ - public Builder message(String message) { - this.message = message; - return this; - } - - /** - * Setter for includeCustomEmbedUrl. - * @param includeCustomEmbedUrl Boolean value for includeCustomEmbedUrl. - * @return Builder - */ - public Builder includeCustomEmbedUrl(Boolean includeCustomEmbedUrl) { - this.includeCustomEmbedUrl = includeCustomEmbedUrl; - return this; - } - - /** - * Builds a new {@link TspublicRestV2SecurityShareVisualizationRequest} object using the set - * fields. - * @return {@link TspublicRestV2SecurityShareVisualizationRequest} - */ - public TspublicRestV2SecurityShareVisualizationRequest build() { - return new TspublicRestV2SecurityShareVisualizationRequest(id, vizId, principalId, - emailId, notify, message, includeCustomEmbedUrl); - } - } -} diff --git a/Java/src/main/java/localhost/models/TspublicRestV2UserAddgroupRequest.java b/Java/src/main/java/localhost/models/TspublicRestV2UserAddgroupRequest.java deleted file mode 100644 index d1b122d19..000000000 --- a/Java/src/main/java/localhost/models/TspublicRestV2UserAddgroupRequest.java +++ /dev/null @@ -1,188 +0,0 @@ -/* - * ThoughtSpotPublicRESTAPILib - * - * This file was automatically generated by APIMATIC v3.0 ( https://www.apimatic.io ). - */ - -package localhost.models; - -import com.fasterxml.jackson.annotation.JsonGetter; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonSetter; -import io.apimatic.core.types.BaseModel; -import java.util.List; - -/** - * This is a model class for TspublicRestV2UserAddgroupRequest type. - */ -public class TspublicRestV2UserAddgroupRequest { - private String name; - private String id; - private List groups; - - /** - * Default constructor. - */ - public TspublicRestV2UserAddgroupRequest() { - } - - /** - * Initialization constructor. - * @param groups List of GroupNameAndIDInput value for groups. - * @param name String value for name. - * @param id String value for id. - */ - public TspublicRestV2UserAddgroupRequest( - List groups, - String name, - String id) { - this.name = name; - this.id = id; - this.groups = groups; - } - - /** - * Getter for Name. - * User name of the user account - * @return Returns the String - */ - @JsonGetter("name") - @JsonInclude(JsonInclude.Include.NON_NULL) - public String getName() { - return name; - } - - /** - * Setter for Name. - * User name of the user account - * @param name Value for String - */ - @JsonSetter("name") - public void setName(String name) { - this.name = name; - } - - /** - * Getter for Id. - * The GUID of the user account - * @return Returns the String - */ - @JsonGetter("id") - @JsonInclude(JsonInclude.Include.NON_NULL) - public String getId() { - return id; - } - - /** - * Setter for Id. - * The GUID of the user account - * @param id Value for String - */ - @JsonSetter("id") - public void setId(String id) { - this.id = id; - } - - /** - * Getter for Groups. - * Array of objects of groups that the user belong to. - * @return Returns the List of GroupNameAndIDInput - */ - @JsonGetter("groups") - public List getGroups() { - return groups; - } - - /** - * Setter for Groups. - * Array of objects of groups that the user belong to. - * @param groups Value for List of GroupNameAndIDInput - */ - @JsonSetter("groups") - public void setGroups(List groups) { - this.groups = groups; - } - - /** - * Converts this TspublicRestV2UserAddgroupRequest into string format. - * @return String representation of this class - */ - @Override - public String toString() { - return "TspublicRestV2UserAddgroupRequest [" + "groups=" + groups + ", name=" + name - + ", id=" + id + "]"; - } - - /** - * Builds a new {@link TspublicRestV2UserAddgroupRequest.Builder} object. - * Creates the instance with the state of the current model. - * @return a new {@link TspublicRestV2UserAddgroupRequest.Builder} object - */ - public Builder toBuilder() { - Builder builder = new Builder(groups) - .name(getName()) - .id(getId()); - return builder; - } - - /** - * Class to build instances of {@link TspublicRestV2UserAddgroupRequest}. - */ - public static class Builder { - private List groups; - private String name; - private String id; - - /** - * Initialization constructor. - */ - public Builder() { - } - - /** - * Initialization constructor. - * @param groups List of GroupNameAndIDInput value for groups. - */ - public Builder(List groups) { - this.groups = groups; - } - - /** - * Setter for groups. - * @param groups List of GroupNameAndIDInput value for groups. - * @return Builder - */ - public Builder groups(List groups) { - this.groups = groups; - return this; - } - - /** - * Setter for name. - * @param name String value for name. - * @return Builder - */ - public Builder name(String name) { - this.name = name; - return this; - } - - /** - * Setter for id. - * @param id String value for id. - * @return Builder - */ - public Builder id(String id) { - this.id = id; - return this; - } - - /** - * Builds a new {@link TspublicRestV2UserAddgroupRequest} object using the set fields. - * @return {@link TspublicRestV2UserAddgroupRequest} - */ - public TspublicRestV2UserAddgroupRequest build() { - return new TspublicRestV2UserAddgroupRequest(groups, name, id); - } - } -} diff --git a/Java/src/main/java/localhost/models/TspublicRestV2UserAddorgRequest.java b/Java/src/main/java/localhost/models/TspublicRestV2UserAddorgRequest.java deleted file mode 100644 index 8c85aa834..000000000 --- a/Java/src/main/java/localhost/models/TspublicRestV2UserAddorgRequest.java +++ /dev/null @@ -1,152 +0,0 @@ -/* - * ThoughtSpotPublicRESTAPILib - * - * This file was automatically generated by APIMATIC v3.0 ( https://www.apimatic.io ). - */ - -package localhost.models; - -import com.fasterxml.jackson.annotation.JsonGetter; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonSetter; -import io.apimatic.core.types.BaseModel; -import java.util.List; - -/** - * This is a model class for TspublicRestV2UserAddorgRequest type. - */ -public class TspublicRestV2UserAddorgRequest { - private Integer orgId; - private List users; - - /** - * Default constructor. - */ - public TspublicRestV2UserAddorgRequest() { - } - - /** - * Initialization constructor. - * @param users List of UserNameAndIDInput value for users. - * @param orgId Integer value for orgId. - */ - public TspublicRestV2UserAddorgRequest( - List users, - Integer orgId) { - this.orgId = orgId; - this.users = users; - } - - /** - * Getter for OrgId. - * The ID of the organization. - * @return Returns the Integer - */ - @JsonGetter("orgId") - @JsonInclude(JsonInclude.Include.NON_NULL) - public Integer getOrgId() { - return orgId; - } - - /** - * Setter for OrgId. - * The ID of the organization. - * @param orgId Value for Integer - */ - @JsonSetter("orgId") - public void setOrgId(Integer orgId) { - this.orgId = orgId; - } - - /** - * Getter for Users. - * Array of objects. A JSON array of name of users or GUIDs of users or both. When both are - * given then id is considered - * @return Returns the List of UserNameAndIDInput - */ - @JsonGetter("users") - public List getUsers() { - return users; - } - - /** - * Setter for Users. - * Array of objects. A JSON array of name of users or GUIDs of users or both. When both are - * given then id is considered - * @param users Value for List of UserNameAndIDInput - */ - @JsonSetter("users") - public void setUsers(List users) { - this.users = users; - } - - /** - * Converts this TspublicRestV2UserAddorgRequest into string format. - * @return String representation of this class - */ - @Override - public String toString() { - return "TspublicRestV2UserAddorgRequest [" + "users=" + users + ", orgId=" + orgId + "]"; - } - - /** - * Builds a new {@link TspublicRestV2UserAddorgRequest.Builder} object. - * Creates the instance with the state of the current model. - * @return a new {@link TspublicRestV2UserAddorgRequest.Builder} object - */ - public Builder toBuilder() { - Builder builder = new Builder(users) - .orgId(getOrgId()); - return builder; - } - - /** - * Class to build instances of {@link TspublicRestV2UserAddorgRequest}. - */ - public static class Builder { - private List users; - private Integer orgId; - - /** - * Initialization constructor. - */ - public Builder() { - } - - /** - * Initialization constructor. - * @param users List of UserNameAndIDInput value for users. - */ - public Builder(List users) { - this.users = users; - } - - /** - * Setter for users. - * @param users List of UserNameAndIDInput value for users. - * @return Builder - */ - public Builder users(List users) { - this.users = users; - return this; - } - - /** - * Setter for orgId. - * @param orgId Integer value for orgId. - * @return Builder - */ - public Builder orgId(Integer orgId) { - this.orgId = orgId; - return this; - } - - /** - * Builds a new {@link TspublicRestV2UserAddorgRequest} object using the set fields. - * @return {@link TspublicRestV2UserAddorgRequest} - */ - public TspublicRestV2UserAddorgRequest build() { - return new TspublicRestV2UserAddorgRequest(users, orgId); - } - } -} diff --git a/Java/src/main/java/localhost/models/TspublicRestV2UserChangepasswordRequest.java b/Java/src/main/java/localhost/models/TspublicRestV2UserChangepasswordRequest.java deleted file mode 100644 index 45a2a2980..000000000 --- a/Java/src/main/java/localhost/models/TspublicRestV2UserChangepasswordRequest.java +++ /dev/null @@ -1,225 +0,0 @@ -/* - * ThoughtSpotPublicRESTAPILib - * - * This file was automatically generated by APIMATIC v3.0 ( https://www.apimatic.io ). - */ - -package localhost.models; - -import com.fasterxml.jackson.annotation.JsonGetter; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonSetter; -import io.apimatic.core.types.BaseModel; - -/** - * This is a model class for TspublicRestV2UserChangepasswordRequest type. - */ -public class TspublicRestV2UserChangepasswordRequest { - private String name; - private String id; - private String currentPassword; - private String newPassword; - - /** - * Default constructor. - */ - public TspublicRestV2UserChangepasswordRequest() { - } - - /** - * Initialization constructor. - * @param currentPassword String value for currentPassword. - * @param newPassword String value for newPassword. - * @param name String value for name. - * @param id String value for id. - */ - public TspublicRestV2UserChangepasswordRequest( - String currentPassword, - String newPassword, - String name, - String id) { - this.name = name; - this.id = id; - this.currentPassword = currentPassword; - this.newPassword = newPassword; - } - - /** - * Getter for Name. - * User name of the user account. - * @return Returns the String - */ - @JsonGetter("name") - @JsonInclude(JsonInclude.Include.NON_NULL) - public String getName() { - return name; - } - - /** - * Setter for Name. - * User name of the user account. - * @param name Value for String - */ - @JsonSetter("name") - public void setName(String name) { - this.name = name; - } - - /** - * Getter for Id. - * The GUID of the user account to query. - * @return Returns the String - */ - @JsonGetter("id") - @JsonInclude(JsonInclude.Include.NON_NULL) - public String getId() { - return id; - } - - /** - * Setter for Id. - * The GUID of the user account to query. - * @param id Value for String - */ - @JsonSetter("id") - public void setId(String id) { - this.id = id; - } - - /** - * Getter for CurrentPassword. - * The current password of the user. - * @return Returns the String - */ - @JsonGetter("currentPassword") - public String getCurrentPassword() { - return currentPassword; - } - - /** - * Setter for CurrentPassword. - * The current password of the user. - * @param currentPassword Value for String - */ - @JsonSetter("currentPassword") - public void setCurrentPassword(String currentPassword) { - this.currentPassword = currentPassword; - } - - /** - * Getter for NewPassword. - * A new password for the user. - * @return Returns the String - */ - @JsonGetter("newPassword") - public String getNewPassword() { - return newPassword; - } - - /** - * Setter for NewPassword. - * A new password for the user. - * @param newPassword Value for String - */ - @JsonSetter("newPassword") - public void setNewPassword(String newPassword) { - this.newPassword = newPassword; - } - - /** - * Converts this TspublicRestV2UserChangepasswordRequest into string format. - * @return String representation of this class - */ - @Override - public String toString() { - return "TspublicRestV2UserChangepasswordRequest [" + "currentPassword=" + currentPassword - + ", newPassword=" + newPassword + ", name=" + name + ", id=" + id + "]"; - } - - /** - * Builds a new {@link TspublicRestV2UserChangepasswordRequest.Builder} object. - * Creates the instance with the state of the current model. - * @return a new {@link TspublicRestV2UserChangepasswordRequest.Builder} object - */ - public Builder toBuilder() { - Builder builder = new Builder(currentPassword, newPassword) - .name(getName()) - .id(getId()); - return builder; - } - - /** - * Class to build instances of {@link TspublicRestV2UserChangepasswordRequest}. - */ - public static class Builder { - private String currentPassword; - private String newPassword; - private String name; - private String id; - - /** - * Initialization constructor. - */ - public Builder() { - } - - /** - * Initialization constructor. - * @param currentPassword String value for currentPassword. - * @param newPassword String value for newPassword. - */ - public Builder(String currentPassword, String newPassword) { - this.currentPassword = currentPassword; - this.newPassword = newPassword; - } - - /** - * Setter for currentPassword. - * @param currentPassword String value for currentPassword. - * @return Builder - */ - public Builder currentPassword(String currentPassword) { - this.currentPassword = currentPassword; - return this; - } - - /** - * Setter for newPassword. - * @param newPassword String value for newPassword. - * @return Builder - */ - public Builder newPassword(String newPassword) { - this.newPassword = newPassword; - return this; - } - - /** - * Setter for name. - * @param name String value for name. - * @return Builder - */ - public Builder name(String name) { - this.name = name; - return this; - } - - /** - * Setter for id. - * @param id String value for id. - * @return Builder - */ - public Builder id(String id) { - this.id = id; - return this; - } - - /** - * Builds a new {@link TspublicRestV2UserChangepasswordRequest} object using the set fields. - * @return {@link TspublicRestV2UserChangepasswordRequest} - */ - public TspublicRestV2UserChangepasswordRequest build() { - return new TspublicRestV2UserChangepasswordRequest(currentPassword, newPassword, name, - id); - } - } -} diff --git a/Java/src/main/java/localhost/models/TspublicRestV2UserRemovegroupRequest.java b/Java/src/main/java/localhost/models/TspublicRestV2UserRemovegroupRequest.java deleted file mode 100644 index a4bdbedec..000000000 --- a/Java/src/main/java/localhost/models/TspublicRestV2UserRemovegroupRequest.java +++ /dev/null @@ -1,188 +0,0 @@ -/* - * ThoughtSpotPublicRESTAPILib - * - * This file was automatically generated by APIMATIC v3.0 ( https://www.apimatic.io ). - */ - -package localhost.models; - -import com.fasterxml.jackson.annotation.JsonGetter; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonSetter; -import io.apimatic.core.types.BaseModel; -import java.util.List; - -/** - * This is a model class for TspublicRestV2UserRemovegroupRequest type. - */ -public class TspublicRestV2UserRemovegroupRequest { - private String name; - private String id; - private List groups; - - /** - * Default constructor. - */ - public TspublicRestV2UserRemovegroupRequest() { - } - - /** - * Initialization constructor. - * @param groups List of GroupNameAndIDInput value for groups. - * @param name String value for name. - * @param id String value for id. - */ - public TspublicRestV2UserRemovegroupRequest( - List groups, - String name, - String id) { - this.name = name; - this.id = id; - this.groups = groups; - } - - /** - * Getter for Name. - * User name of the user account - * @return Returns the String - */ - @JsonGetter("name") - @JsonInclude(JsonInclude.Include.NON_NULL) - public String getName() { - return name; - } - - /** - * Setter for Name. - * User name of the user account - * @param name Value for String - */ - @JsonSetter("name") - public void setName(String name) { - this.name = name; - } - - /** - * Getter for Id. - * The GUID of the user account - * @return Returns the String - */ - @JsonGetter("id") - @JsonInclude(JsonInclude.Include.NON_NULL) - public String getId() { - return id; - } - - /** - * Setter for Id. - * The GUID of the user account - * @param id Value for String - */ - @JsonSetter("id") - public void setId(String id) { - this.id = id; - } - - /** - * Getter for Groups. - * Array of objects of groups that the user belong to. - * @return Returns the List of GroupNameAndIDInput - */ - @JsonGetter("groups") - public List getGroups() { - return groups; - } - - /** - * Setter for Groups. - * Array of objects of groups that the user belong to. - * @param groups Value for List of GroupNameAndIDInput - */ - @JsonSetter("groups") - public void setGroups(List groups) { - this.groups = groups; - } - - /** - * Converts this TspublicRestV2UserRemovegroupRequest into string format. - * @return String representation of this class - */ - @Override - public String toString() { - return "TspublicRestV2UserRemovegroupRequest [" + "groups=" + groups + ", name=" + name - + ", id=" + id + "]"; - } - - /** - * Builds a new {@link TspublicRestV2UserRemovegroupRequest.Builder} object. - * Creates the instance with the state of the current model. - * @return a new {@link TspublicRestV2UserRemovegroupRequest.Builder} object - */ - public Builder toBuilder() { - Builder builder = new Builder(groups) - .name(getName()) - .id(getId()); - return builder; - } - - /** - * Class to build instances of {@link TspublicRestV2UserRemovegroupRequest}. - */ - public static class Builder { - private List groups; - private String name; - private String id; - - /** - * Initialization constructor. - */ - public Builder() { - } - - /** - * Initialization constructor. - * @param groups List of GroupNameAndIDInput value for groups. - */ - public Builder(List groups) { - this.groups = groups; - } - - /** - * Setter for groups. - * @param groups List of GroupNameAndIDInput value for groups. - * @return Builder - */ - public Builder groups(List groups) { - this.groups = groups; - return this; - } - - /** - * Setter for name. - * @param name String value for name. - * @return Builder - */ - public Builder name(String name) { - this.name = name; - return this; - } - - /** - * Setter for id. - * @param id String value for id. - * @return Builder - */ - public Builder id(String id) { - this.id = id; - return this; - } - - /** - * Builds a new {@link TspublicRestV2UserRemovegroupRequest} object using the set fields. - * @return {@link TspublicRestV2UserRemovegroupRequest} - */ - public TspublicRestV2UserRemovegroupRequest build() { - return new TspublicRestV2UserRemovegroupRequest(groups, name, id); - } - } -} diff --git a/Java/src/main/java/localhost/models/TspublicRestV2UserSearchRequest.java b/Java/src/main/java/localhost/models/TspublicRestV2UserSearchRequest.java deleted file mode 100644 index dab187fdf..000000000 --- a/Java/src/main/java/localhost/models/TspublicRestV2UserSearchRequest.java +++ /dev/null @@ -1,568 +0,0 @@ -/* - * ThoughtSpotPublicRESTAPILib - * - * This file was automatically generated by APIMATIC v3.0 ( https://www.apimatic.io ). - */ - -package localhost.models; - -import com.fasterxml.jackson.annotation.JsonGetter; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonSetter; -import io.apimatic.core.types.BaseModel; -import java.util.List; - -/** - * This is a model class for TspublicRestV2UserSearchRequest type. - */ -public class TspublicRestV2UserSearchRequest { - private List outputFields; - private String name; - private String id; - private String displayName; - private String visibility; - private String mail; - private List groups; - private List privileges; - private String state; - private Boolean notifyOnShare; - private Boolean showWalkMe; - private Boolean analystOnboardingComplete; - private String type; - - /** - * Default constructor. - */ - public TspublicRestV2UserSearchRequest() { - } - - /** - * Initialization constructor. - * @param outputFields List of String value for outputFields. - * @param name String value for name. - * @param id String value for id. - * @param displayName String value for displayName. - * @param visibility String value for visibility. - * @param mail String value for mail. - * @param groups List of GroupNameAndIDInput value for groups. - * @param privileges List of PrivilegeEnum value for privileges. - * @param state String value for state. - * @param notifyOnShare Boolean value for notifyOnShare. - * @param showWalkMe Boolean value for showWalkMe. - * @param analystOnboardingComplete Boolean value for analystOnboardingComplete. - * @param type String value for type. - */ - public TspublicRestV2UserSearchRequest( - List outputFields, - String name, - String id, - String displayName, - String visibility, - String mail, - List groups, - List privileges, - String state, - Boolean notifyOnShare, - Boolean showWalkMe, - Boolean analystOnboardingComplete, - String type) { - this.outputFields = outputFields; - this.name = name; - this.id = id; - this.displayName = displayName; - this.visibility = visibility; - this.mail = mail; - this.groups = groups; - this.privileges = privileges; - this.state = state; - this.notifyOnShare = notifyOnShare; - this.showWalkMe = showWalkMe; - this.analystOnboardingComplete = analystOnboardingComplete; - this.type = type; - } - - /** - * Getter for OutputFields. - * Array of field names that need to be included in the response - * @return Returns the List of String - */ - @JsonGetter("outputFields") - @JsonInclude(JsonInclude.Include.NON_NULL) - public List getOutputFields() { - return outputFields; - } - - /** - * Setter for OutputFields. - * Array of field names that need to be included in the response - * @param outputFields Value for List of String - */ - @JsonSetter("outputFields") - public void setOutputFields(List outputFields) { - this.outputFields = outputFields; - } - - /** - * Getter for Name. - * User name of the user account - * @return Returns the String - */ - @JsonGetter("name") - @JsonInclude(JsonInclude.Include.NON_NULL) - public String getName() { - return name; - } - - /** - * Setter for Name. - * User name of the user account - * @param name Value for String - */ - @JsonSetter("name") - public void setName(String name) { - this.name = name; - } - - /** - * Getter for Id. - * The GUID of the user account - * @return Returns the String - */ - @JsonGetter("id") - @JsonInclude(JsonInclude.Include.NON_NULL) - public String getId() { - return id; - } - - /** - * Setter for Id. - * The GUID of the user account - * @param id Value for String - */ - @JsonSetter("id") - public void setId(String id) { - this.id = id; - } - - /** - * Getter for DisplayName. - * A unique display name string for the user, usually their first and last name. - * @return Returns the String - */ - @JsonGetter("displayName") - @JsonInclude(JsonInclude.Include.NON_NULL) - public String getDisplayName() { - return displayName; - } - - /** - * Setter for DisplayName. - * A unique display name string for the user, usually their first and last name. - * @param displayName Value for String - */ - @JsonSetter("displayName") - public void setDisplayName(String displayName) { - this.displayName = displayName; - } - - /** - * Getter for Visibility. - * Visibility of the user account. The visibility attribute is set to DEFAULT when creating a - * user. The DEFAULT attribute makes a user visible to other users and user groups, and thus - * allows them to share objects. - * @return Returns the String - */ - @JsonGetter("visibility") - @JsonInclude(JsonInclude.Include.NON_NULL) - public String getVisibility() { - return visibility; - } - - /** - * Setter for Visibility. - * Visibility of the user account. The visibility attribute is set to DEFAULT when creating a - * user. The DEFAULT attribute makes a user visible to other users and user groups, and thus - * allows them to share objects. - * @param visibility Value for String - */ - @JsonSetter("visibility") - public void setVisibility(String visibility) { - this.visibility = visibility; - } - - /** - * Getter for Mail. - * email of the user. - * @return Returns the String - */ - @JsonGetter("mail") - @JsonInclude(JsonInclude.Include.NON_NULL) - public String getMail() { - return mail; - } - - /** - * Setter for Mail. - * email of the user. - * @param mail Value for String - */ - @JsonSetter("mail") - public void setMail(String mail) { - this.mail = mail; - } - - /** - * Getter for Groups. - * Array of objects of groups that the user belong to. - * @return Returns the List of GroupNameAndIDInput - */ - @JsonGetter("groups") - @JsonInclude(JsonInclude.Include.NON_NULL) - public List getGroups() { - return groups; - } - - /** - * Setter for Groups. - * Array of objects of groups that the user belong to. - * @param groups Value for List of GroupNameAndIDInput - */ - @JsonSetter("groups") - public void setGroups(List groups) { - this.groups = groups; - } - - /** - * Getter for Privileges. - * Privileges assigned to user account - * @return Returns the List of PrivilegeEnum - */ - @JsonGetter("privileges") - @JsonInclude(JsonInclude.Include.NON_NULL) - public List getPrivileges() { - return privileges; - } - - /** - * Setter for Privileges. - * Privileges assigned to user account - * @param privileges Value for List of PrivilegeEnum - */ - @JsonSetter("privileges") - public void setPrivileges(List privileges) { - this.privileges = privileges; - } - - /** - * Getter for State. - * Status of user account. acitve or inactive. - * @return Returns the String - */ - @JsonGetter("state") - @JsonInclude(JsonInclude.Include.NON_NULL) - public String getState() { - return state; - } - - /** - * Setter for State. - * Status of user account. acitve or inactive. - * @param state Value for String - */ - @JsonSetter("state") - public void setState(String state) { - this.state = state; - } - - /** - * Getter for NotifyOnShare. - * User preference for receiving email notifications when another ThoughtSpot user shares - * answers or pinboards. - * @return Returns the Boolean - */ - @JsonGetter("notifyOnShare") - @JsonInclude(JsonInclude.Include.NON_NULL) - public Boolean getNotifyOnShare() { - return notifyOnShare; - } - - /** - * Setter for NotifyOnShare. - * User preference for receiving email notifications when another ThoughtSpot user shares - * answers or pinboards. - * @param notifyOnShare Value for Boolean - */ - @JsonSetter("notifyOnShare") - public void setNotifyOnShare(Boolean notifyOnShare) { - this.notifyOnShare = notifyOnShare; - } - - /** - * Getter for ShowWalkMe. - * The user preference for revisiting the onboarding experience. - * @return Returns the Boolean - */ - @JsonGetter("showWalkMe") - @JsonInclude(JsonInclude.Include.NON_NULL) - public Boolean getShowWalkMe() { - return showWalkMe; - } - - /** - * Setter for ShowWalkMe. - * The user preference for revisiting the onboarding experience. - * @param showWalkMe Value for Boolean - */ - @JsonSetter("showWalkMe") - public void setShowWalkMe(Boolean showWalkMe) { - this.showWalkMe = showWalkMe; - } - - /** - * Getter for AnalystOnboardingComplete. - * ThoughtSpot provides an interactive guided walkthrough to onboard new users. The onboarding - * experience leads users through a set of actions to help users get started and accomplish - * their tasks quickly. The users can turn off the Onboarding experience and access it again - * when they need assistance with the ThoughtSpot UI. - * @return Returns the Boolean - */ - @JsonGetter("analystOnboardingComplete") - @JsonInclude(JsonInclude.Include.NON_NULL) - public Boolean getAnalystOnboardingComplete() { - return analystOnboardingComplete; - } - - /** - * Setter for AnalystOnboardingComplete. - * ThoughtSpot provides an interactive guided walkthrough to onboard new users. The onboarding - * experience leads users through a set of actions to help users get started and accomplish - * their tasks quickly. The users can turn off the Onboarding experience and access it again - * when they need assistance with the ThoughtSpot UI. - * @param analystOnboardingComplete Value for Boolean - */ - @JsonSetter("analystOnboardingComplete") - public void setAnalystOnboardingComplete(Boolean analystOnboardingComplete) { - this.analystOnboardingComplete = analystOnboardingComplete; - } - - /** - * Getter for Type. - * Type of user. LOCAL_USER indicates that the user is created locally in the ThoughtSpot - * system. - * @return Returns the String - */ - @JsonGetter("type") - @JsonInclude(JsonInclude.Include.NON_NULL) - public String getType() { - return type; - } - - /** - * Setter for Type. - * Type of user. LOCAL_USER indicates that the user is created locally in the ThoughtSpot - * system. - * @param type Value for String - */ - @JsonSetter("type") - public void setType(String type) { - this.type = type; - } - - /** - * Converts this TspublicRestV2UserSearchRequest into string format. - * @return String representation of this class - */ - @Override - public String toString() { - return "TspublicRestV2UserSearchRequest [" + "outputFields=" + outputFields + ", name=" - + name + ", id=" + id + ", displayName=" + displayName + ", visibility=" - + visibility + ", mail=" + mail + ", groups=" + groups + ", privileges=" - + privileges + ", state=" + state + ", notifyOnShare=" + notifyOnShare - + ", showWalkMe=" + showWalkMe + ", analystOnboardingComplete=" - + analystOnboardingComplete + ", type=" + type + "]"; - } - - /** - * Builds a new {@link TspublicRestV2UserSearchRequest.Builder} object. - * Creates the instance with the state of the current model. - * @return a new {@link TspublicRestV2UserSearchRequest.Builder} object - */ - public Builder toBuilder() { - Builder builder = new Builder() - .outputFields(getOutputFields()) - .name(getName()) - .id(getId()) - .displayName(getDisplayName()) - .visibility(getVisibility()) - .mail(getMail()) - .groups(getGroups()) - .privileges(getPrivileges()) - .state(getState()) - .notifyOnShare(getNotifyOnShare()) - .showWalkMe(getShowWalkMe()) - .analystOnboardingComplete(getAnalystOnboardingComplete()) - .type(getType()); - return builder; - } - - /** - * Class to build instances of {@link TspublicRestV2UserSearchRequest}. - */ - public static class Builder { - private List outputFields; - private String name; - private String id; - private String displayName; - private String visibility; - private String mail; - private List groups; - private List privileges; - private String state; - private Boolean notifyOnShare; - private Boolean showWalkMe; - private Boolean analystOnboardingComplete; - private String type; - - - - /** - * Setter for outputFields. - * @param outputFields List of String value for outputFields. - * @return Builder - */ - public Builder outputFields(List outputFields) { - this.outputFields = outputFields; - return this; - } - - /** - * Setter for name. - * @param name String value for name. - * @return Builder - */ - public Builder name(String name) { - this.name = name; - return this; - } - - /** - * Setter for id. - * @param id String value for id. - * @return Builder - */ - public Builder id(String id) { - this.id = id; - return this; - } - - /** - * Setter for displayName. - * @param displayName String value for displayName. - * @return Builder - */ - public Builder displayName(String displayName) { - this.displayName = displayName; - return this; - } - - /** - * Setter for visibility. - * @param visibility String value for visibility. - * @return Builder - */ - public Builder visibility(String visibility) { - this.visibility = visibility; - return this; - } - - /** - * Setter for mail. - * @param mail String value for mail. - * @return Builder - */ - public Builder mail(String mail) { - this.mail = mail; - return this; - } - - /** - * Setter for groups. - * @param groups List of GroupNameAndIDInput value for groups. - * @return Builder - */ - public Builder groups(List groups) { - this.groups = groups; - return this; - } - - /** - * Setter for privileges. - * @param privileges List of PrivilegeEnum value for privileges. - * @return Builder - */ - public Builder privileges(List privileges) { - this.privileges = privileges; - return this; - } - - /** - * Setter for state. - * @param state String value for state. - * @return Builder - */ - public Builder state(String state) { - this.state = state; - return this; - } - - /** - * Setter for notifyOnShare. - * @param notifyOnShare Boolean value for notifyOnShare. - * @return Builder - */ - public Builder notifyOnShare(Boolean notifyOnShare) { - this.notifyOnShare = notifyOnShare; - return this; - } - - /** - * Setter for showWalkMe. - * @param showWalkMe Boolean value for showWalkMe. - * @return Builder - */ - public Builder showWalkMe(Boolean showWalkMe) { - this.showWalkMe = showWalkMe; - return this; - } - - /** - * Setter for analystOnboardingComplete. - * @param analystOnboardingComplete Boolean value for analystOnboardingComplete. - * @return Builder - */ - public Builder analystOnboardingComplete(Boolean analystOnboardingComplete) { - this.analystOnboardingComplete = analystOnboardingComplete; - return this; - } - - /** - * Setter for type. - * @param type String value for type. - * @return Builder - */ - public Builder type(String type) { - this.type = type; - return this; - } - - /** - * Builds a new {@link TspublicRestV2UserSearchRequest} object using the set fields. - * @return {@link TspublicRestV2UserSearchRequest} - */ - public TspublicRestV2UserSearchRequest build() { - return new TspublicRestV2UserSearchRequest(outputFields, name, id, displayName, - visibility, mail, groups, privileges, state, notifyOnShare, showWalkMe, - analystOnboardingComplete, type); - } - } -} diff --git a/Java/src/main/java/localhost/models/TspublicRestV2UserUpdateRequest.java b/Java/src/main/java/localhost/models/TspublicRestV2UserUpdateRequest.java deleted file mode 100644 index 6f13d5788..000000000 --- a/Java/src/main/java/localhost/models/TspublicRestV2UserUpdateRequest.java +++ /dev/null @@ -1,498 +0,0 @@ -/* - * ThoughtSpotPublicRESTAPILib - * - * This file was automatically generated by APIMATIC v3.0 ( https://www.apimatic.io ). - */ - -package localhost.models; - -import com.fasterxml.jackson.annotation.JsonGetter; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonSetter; -import io.apimatic.core.types.BaseModel; -import java.util.List; - -/** - * This is a model class for TspublicRestV2UserUpdateRequest type. - */ -public class TspublicRestV2UserUpdateRequest { - private String name; - private String id; - private String displayName; - private Visibility1Enum visibility; - private String mail; - private State1Enum state; - private Boolean notifyOnShare; - private Boolean showWalkMe; - private Boolean analystOnboardingComplete; - private Type9Enum type; - private List groups; - - /** - * Default constructor. - */ - public TspublicRestV2UserUpdateRequest() { - visibility = Visibility1Enum.DEFAULT; - state = State1Enum.ACTIVE; - notifyOnShare = true; - showWalkMe = true; - analystOnboardingComplete = false; - type = Type9Enum.LOCAL_USER; - } - - /** - * Initialization constructor. - * @param name String value for name. - * @param id String value for id. - * @param displayName String value for displayName. - * @param visibility Visibility1Enum value for visibility. - * @param mail String value for mail. - * @param state State1Enum value for state. - * @param notifyOnShare Boolean value for notifyOnShare. - * @param showWalkMe Boolean value for showWalkMe. - * @param analystOnboardingComplete Boolean value for analystOnboardingComplete. - * @param type Type9Enum value for type. - * @param groups List of GroupNameAndIDInput value for groups. - */ - public TspublicRestV2UserUpdateRequest( - String name, - String id, - String displayName, - Visibility1Enum visibility, - String mail, - State1Enum state, - Boolean notifyOnShare, - Boolean showWalkMe, - Boolean analystOnboardingComplete, - Type9Enum type, - List groups) { - this.name = name; - this.id = id; - this.displayName = displayName; - this.visibility = visibility; - this.mail = mail; - this.state = state; - this.notifyOnShare = notifyOnShare; - this.showWalkMe = showWalkMe; - this.analystOnboardingComplete = analystOnboardingComplete; - this.type = type; - this.groups = groups; - } - - /** - * Getter for Name. - * Name of the user. The username string must be unique. - * @return Returns the String - */ - @JsonGetter("name") - @JsonInclude(JsonInclude.Include.NON_NULL) - public String getName() { - return name; - } - - /** - * Setter for Name. - * Name of the user. The username string must be unique. - * @param name Value for String - */ - @JsonSetter("name") - public void setName(String name) { - this.name = name; - } - - /** - * Getter for Id. - * The GUID of the user account to query - * @return Returns the String - */ - @JsonGetter("id") - @JsonInclude(JsonInclude.Include.NON_NULL) - public String getId() { - return id; - } - - /** - * Setter for Id. - * The GUID of the user account to query - * @param id Value for String - */ - @JsonSetter("id") - public void setId(String id) { - this.id = id; - } - - /** - * Getter for DisplayName. - * A unique display name string for the user, usually their first and last name. - * @return Returns the String - */ - @JsonGetter("displayName") - @JsonInclude(JsonInclude.Include.NON_NULL) - public String getDisplayName() { - return displayName; - } - - /** - * Setter for DisplayName. - * A unique display name string for the user, usually their first and last name. - * @param displayName Value for String - */ - @JsonSetter("displayName") - public void setDisplayName(String displayName) { - this.displayName = displayName; - } - - /** - * Getter for Visibility. - * Visibility of the user account. The visibility attribute is set to DEFAULT when creating a - * user. The DEFAULT attribute makes a user visible to other users and user groups, and thus - * allows them to share objects. - * @return Returns the Visibility1Enum - */ - @JsonGetter("visibility") - @JsonInclude(JsonInclude.Include.NON_NULL) - public Visibility1Enum getVisibility() { - return visibility; - } - - /** - * Setter for Visibility. - * Visibility of the user account. The visibility attribute is set to DEFAULT when creating a - * user. The DEFAULT attribute makes a user visible to other users and user groups, and thus - * allows them to share objects. - * @param visibility Value for Visibility1Enum - */ - @JsonSetter("visibility") - public void setVisibility(Visibility1Enum visibility) { - this.visibility = visibility; - } - - /** - * Getter for Mail. - * email of the user. - * @return Returns the String - */ - @JsonGetter("mail") - @JsonInclude(JsonInclude.Include.NON_NULL) - public String getMail() { - return mail; - } - - /** - * Setter for Mail. - * email of the user. - * @param mail Value for String - */ - @JsonSetter("mail") - public void setMail(String mail) { - this.mail = mail; - } - - /** - * Getter for State. - * Status of user account. acitve or inactive. - * @return Returns the State1Enum - */ - @JsonGetter("state") - @JsonInclude(JsonInclude.Include.NON_NULL) - public State1Enum getState() { - return state; - } - - /** - * Setter for State. - * Status of user account. acitve or inactive. - * @param state Value for State1Enum - */ - @JsonSetter("state") - public void setState(State1Enum state) { - this.state = state; - } - - /** - * Getter for NotifyOnShare. - * User preference for receiving email notifications when another ThoughtSpot user shares - * answers or pinboards. - * @return Returns the Boolean - */ - @JsonGetter("notifyOnShare") - @JsonInclude(JsonInclude.Include.NON_NULL) - public Boolean getNotifyOnShare() { - return notifyOnShare; - } - - /** - * Setter for NotifyOnShare. - * User preference for receiving email notifications when another ThoughtSpot user shares - * answers or pinboards. - * @param notifyOnShare Value for Boolean - */ - @JsonSetter("notifyOnShare") - public void setNotifyOnShare(Boolean notifyOnShare) { - this.notifyOnShare = notifyOnShare; - } - - /** - * Getter for ShowWalkMe. - * The user preference for revisiting the onboarding experience. - * @return Returns the Boolean - */ - @JsonGetter("showWalkMe") - @JsonInclude(JsonInclude.Include.NON_NULL) - public Boolean getShowWalkMe() { - return showWalkMe; - } - - /** - * Setter for ShowWalkMe. - * The user preference for revisiting the onboarding experience. - * @param showWalkMe Value for Boolean - */ - @JsonSetter("showWalkMe") - public void setShowWalkMe(Boolean showWalkMe) { - this.showWalkMe = showWalkMe; - } - - /** - * Getter for AnalystOnboardingComplete. - * ThoughtSpot provides an interactive guided walkthrough to onboard new users. The onboarding - * experience leads users through a set of actions to help users get started and accomplish - * their tasks quickly. The users can turn off the Onboarding experience and access it again - * when they need assistance with the ThoughtSpot UI. - * @return Returns the Boolean - */ - @JsonGetter("analystOnboardingComplete") - @JsonInclude(JsonInclude.Include.NON_NULL) - public Boolean getAnalystOnboardingComplete() { - return analystOnboardingComplete; - } - - /** - * Setter for AnalystOnboardingComplete. - * ThoughtSpot provides an interactive guided walkthrough to onboard new users. The onboarding - * experience leads users through a set of actions to help users get started and accomplish - * their tasks quickly. The users can turn off the Onboarding experience and access it again - * when they need assistance with the ThoughtSpot UI. - * @param analystOnboardingComplete Value for Boolean - */ - @JsonSetter("analystOnboardingComplete") - public void setAnalystOnboardingComplete(Boolean analystOnboardingComplete) { - this.analystOnboardingComplete = analystOnboardingComplete; - } - - /** - * Getter for Type. - * Type of user. LOCAL_USER indicates that the user is created locally in the ThoughtSpot - * system. - * @return Returns the Type9Enum - */ - @JsonGetter("type") - @JsonInclude(JsonInclude.Include.NON_NULL) - public Type9Enum getType() { - return type; - } - - /** - * Setter for Type. - * Type of user. LOCAL_USER indicates that the user is created locally in the ThoughtSpot - * system. - * @param type Value for Type9Enum - */ - @JsonSetter("type") - public void setType(Type9Enum type) { - this.type = type; - } - - /** - * Getter for Groups. - * Array of objects of groups that the user belong to. - * @return Returns the List of GroupNameAndIDInput - */ - @JsonGetter("groups") - @JsonInclude(JsonInclude.Include.NON_NULL) - public List getGroups() { - return groups; - } - - /** - * Setter for Groups. - * Array of objects of groups that the user belong to. - * @param groups Value for List of GroupNameAndIDInput - */ - @JsonSetter("groups") - public void setGroups(List groups) { - this.groups = groups; - } - - /** - * Converts this TspublicRestV2UserUpdateRequest into string format. - * @return String representation of this class - */ - @Override - public String toString() { - return "TspublicRestV2UserUpdateRequest [" + "name=" + name + ", id=" + id - + ", displayName=" + displayName + ", visibility=" + visibility + ", mail=" + mail - + ", state=" + state + ", notifyOnShare=" + notifyOnShare + ", showWalkMe=" - + showWalkMe + ", analystOnboardingComplete=" + analystOnboardingComplete - + ", type=" + type + ", groups=" + groups + "]"; - } - - /** - * Builds a new {@link TspublicRestV2UserUpdateRequest.Builder} object. - * Creates the instance with the state of the current model. - * @return a new {@link TspublicRestV2UserUpdateRequest.Builder} object - */ - public Builder toBuilder() { - Builder builder = new Builder() - .name(getName()) - .id(getId()) - .displayName(getDisplayName()) - .visibility(getVisibility()) - .mail(getMail()) - .state(getState()) - .notifyOnShare(getNotifyOnShare()) - .showWalkMe(getShowWalkMe()) - .analystOnboardingComplete(getAnalystOnboardingComplete()) - .type(getType()) - .groups(getGroups()); - return builder; - } - - /** - * Class to build instances of {@link TspublicRestV2UserUpdateRequest}. - */ - public static class Builder { - private String name; - private String id; - private String displayName; - private Visibility1Enum visibility = Visibility1Enum.DEFAULT; - private String mail; - private State1Enum state = State1Enum.ACTIVE; - private Boolean notifyOnShare = true; - private Boolean showWalkMe = true; - private Boolean analystOnboardingComplete = false; - private Type9Enum type = Type9Enum.LOCAL_USER; - private List groups; - - - - /** - * Setter for name. - * @param name String value for name. - * @return Builder - */ - public Builder name(String name) { - this.name = name; - return this; - } - - /** - * Setter for id. - * @param id String value for id. - * @return Builder - */ - public Builder id(String id) { - this.id = id; - return this; - } - - /** - * Setter for displayName. - * @param displayName String value for displayName. - * @return Builder - */ - public Builder displayName(String displayName) { - this.displayName = displayName; - return this; - } - - /** - * Setter for visibility. - * @param visibility Visibility1Enum value for visibility. - * @return Builder - */ - public Builder visibility(Visibility1Enum visibility) { - this.visibility = visibility; - return this; - } - - /** - * Setter for mail. - * @param mail String value for mail. - * @return Builder - */ - public Builder mail(String mail) { - this.mail = mail; - return this; - } - - /** - * Setter for state. - * @param state State1Enum value for state. - * @return Builder - */ - public Builder state(State1Enum state) { - this.state = state; - return this; - } - - /** - * Setter for notifyOnShare. - * @param notifyOnShare Boolean value for notifyOnShare. - * @return Builder - */ - public Builder notifyOnShare(Boolean notifyOnShare) { - this.notifyOnShare = notifyOnShare; - return this; - } - - /** - * Setter for showWalkMe. - * @param showWalkMe Boolean value for showWalkMe. - * @return Builder - */ - public Builder showWalkMe(Boolean showWalkMe) { - this.showWalkMe = showWalkMe; - return this; - } - - /** - * Setter for analystOnboardingComplete. - * @param analystOnboardingComplete Boolean value for analystOnboardingComplete. - * @return Builder - */ - public Builder analystOnboardingComplete(Boolean analystOnboardingComplete) { - this.analystOnboardingComplete = analystOnboardingComplete; - return this; - } - - /** - * Setter for type. - * @param type Type9Enum value for type. - * @return Builder - */ - public Builder type(Type9Enum type) { - this.type = type; - return this; - } - - /** - * Setter for groups. - * @param groups List of GroupNameAndIDInput value for groups. - * @return Builder - */ - public Builder groups(List groups) { - this.groups = groups; - return this; - } - - /** - * Builds a new {@link TspublicRestV2UserUpdateRequest} object using the set fields. - * @return {@link TspublicRestV2UserUpdateRequest} - */ - public TspublicRestV2UserUpdateRequest build() { - return new TspublicRestV2UserUpdateRequest(name, id, displayName, visibility, mail, - state, notifyOnShare, showWalkMe, analystOnboardingComplete, type, groups); - } - } -} diff --git a/Java/src/main/java/localhost/models/Type10Enum.java b/Java/src/main/java/localhost/models/Type10Enum.java deleted file mode 100644 index 282df8cca..000000000 --- a/Java/src/main/java/localhost/models/Type10Enum.java +++ /dev/null @@ -1,75 +0,0 @@ -/* - * ThoughtSpotPublicRESTAPILib - * - * This file was automatically generated by APIMATIC v3.0 ( https://www.apimatic.io ). - */ - -package localhost.models; - -import java.util.ArrayList; -import java.util.List; -import java.util.TreeMap; - -/** - * Type10Enum to be used. - */ -public enum Type10Enum { - LOCAL_GROUP, - - TENANT_GROUP; - - - private static TreeMap valueMap = new TreeMap<>(); - private String value; - - static { - LOCAL_GROUP.value = "LOCAL_GROUP"; - TENANT_GROUP.value = "TENANT_GROUP"; - - valueMap.put("LOCAL_GROUP", LOCAL_GROUP); - valueMap.put("TENANT_GROUP", TENANT_GROUP); - } - - /** - * Returns the enum member associated with the given string value. - * @param toConvert String value to get enum member. - * @return The enum member against the given string value. - */ - @com.fasterxml.jackson.annotation.JsonCreator - public static Type10Enum fromString(String toConvert) { - return valueMap.get(toConvert); - } - - /** - * Returns the string value associated with the enum member. - * @return The string value against enum member. - */ - @com.fasterxml.jackson.annotation.JsonValue - public String value() { - return value; - } - - /** - * Get string representation of this enum. - */ - @Override - public String toString() { - return value.toString(); - } - - /** - * Convert list of Type10Enum values to list of string values. - * @param toConvert The list of Type10Enum values to convert. - * @return List of representative string values. - */ - public static List toValue(List toConvert) { - if (toConvert == null) { - return null; - } - List convertedValues = new ArrayList<>(); - for (Type10Enum enumValue : toConvert) { - convertedValues.add(enumValue.value); - } - return convertedValues; - } -} \ No newline at end of file diff --git a/Java/src/main/java/localhost/models/Type13Enum.java b/Java/src/main/java/localhost/models/Type13Enum.java deleted file mode 100644 index e7a030c79..000000000 --- a/Java/src/main/java/localhost/models/Type13Enum.java +++ /dev/null @@ -1,83 +0,0 @@ -/* - * ThoughtSpotPublicRESTAPILib - * - * This file was automatically generated by APIMATIC v3.0 ( https://www.apimatic.io ). - */ - -package localhost.models; - -import java.util.ArrayList; -import java.util.List; -import java.util.TreeMap; - -/** - * Type13Enum to be used. - */ -public enum Type13Enum { - LIVEBOARD, - - DATAOBJECT, - - COLUMN, - - JOIN; - - - private static TreeMap valueMap = new TreeMap<>(); - private String value; - - static { - LIVEBOARD.value = "LIVEBOARD"; - DATAOBJECT.value = "DATAOBJECT"; - COLUMN.value = "COLUMN"; - JOIN.value = "JOIN"; - - valueMap.put("LIVEBOARD", LIVEBOARD); - valueMap.put("DATAOBJECT", DATAOBJECT); - valueMap.put("COLUMN", COLUMN); - valueMap.put("JOIN", JOIN); - } - - /** - * Returns the enum member associated with the given string value. - * @param toConvert String value to get enum member. - * @return The enum member against the given string value. - */ - @com.fasterxml.jackson.annotation.JsonCreator - public static Type13Enum fromString(String toConvert) { - return valueMap.get(toConvert); - } - - /** - * Returns the string value associated with the enum member. - * @return The string value against enum member. - */ - @com.fasterxml.jackson.annotation.JsonValue - public String value() { - return value; - } - - /** - * Get string representation of this enum. - */ - @Override - public String toString() { - return value.toString(); - } - - /** - * Convert list of Type13Enum values to list of string values. - * @param toConvert The list of Type13Enum values to convert. - * @return List of representative string values. - */ - public static List toValue(List toConvert) { - if (toConvert == null) { - return null; - } - List convertedValues = new ArrayList<>(); - for (Type13Enum enumValue : toConvert) { - convertedValues.add(enumValue.value); - } - return convertedValues; - } -} \ No newline at end of file diff --git a/Java/src/main/java/localhost/models/Type14Enum.java b/Java/src/main/java/localhost/models/Type14Enum.java deleted file mode 100644 index b1e10b52c..000000000 --- a/Java/src/main/java/localhost/models/Type14Enum.java +++ /dev/null @@ -1,111 +0,0 @@ -/* - * ThoughtSpotPublicRESTAPILib - * - * This file was automatically generated by APIMATIC v3.0 ( https://www.apimatic.io ). - */ - -package localhost.models; - -import java.util.ArrayList; -import java.util.List; -import java.util.TreeMap; - -/** - * Type14Enum to be used. - */ -public enum Type14Enum { - SNOWFLAKE, - - AMAZON_REDSHIFT, - - GOOGLE_BIGQUERY, - - AZURE_SYNAPSE, - - TERADATA, - - STARBURST, - - SAP_HANA, - - ORACLE_ADW, - - DATABRICKS, - - DENODO, - - DREMIO; - - - private static TreeMap valueMap = new TreeMap<>(); - private String value; - - static { - SNOWFLAKE.value = "SNOWFLAKE"; - AMAZON_REDSHIFT.value = "AMAZON_REDSHIFT"; - GOOGLE_BIGQUERY.value = "GOOGLE_BIGQUERY"; - AZURE_SYNAPSE.value = "AZURE_SYNAPSE"; - TERADATA.value = "TERADATA"; - STARBURST.value = "STARBURST"; - SAP_HANA.value = "SAP_HANA"; - ORACLE_ADW.value = "ORACLE_ADW"; - DATABRICKS.value = "DATABRICKS"; - DENODO.value = "DENODO"; - DREMIO.value = "DREMIO"; - - valueMap.put("SNOWFLAKE", SNOWFLAKE); - valueMap.put("AMAZON_REDSHIFT", AMAZON_REDSHIFT); - valueMap.put("GOOGLE_BIGQUERY", GOOGLE_BIGQUERY); - valueMap.put("AZURE_SYNAPSE", AZURE_SYNAPSE); - valueMap.put("TERADATA", TERADATA); - valueMap.put("STARBURST", STARBURST); - valueMap.put("SAP_HANA", SAP_HANA); - valueMap.put("ORACLE_ADW", ORACLE_ADW); - valueMap.put("DATABRICKS", DATABRICKS); - valueMap.put("DENODO", DENODO); - valueMap.put("DREMIO", DREMIO); - } - - /** - * Returns the enum member associated with the given string value. - * @param toConvert String value to get enum member. - * @return The enum member against the given string value. - */ - @com.fasterxml.jackson.annotation.JsonCreator - public static Type14Enum fromString(String toConvert) { - return valueMap.get(toConvert); - } - - /** - * Returns the string value associated with the enum member. - * @return The string value against enum member. - */ - @com.fasterxml.jackson.annotation.JsonValue - public String value() { - return value; - } - - /** - * Get string representation of this enum. - */ - @Override - public String toString() { - return value.toString(); - } - - /** - * Convert list of Type14Enum values to list of string values. - * @param toConvert The list of Type14Enum values to convert. - * @return List of representative string values. - */ - public static List toValue(List toConvert) { - if (toConvert == null) { - return null; - } - List convertedValues = new ArrayList<>(); - for (Type14Enum enumValue : toConvert) { - convertedValues.add(enumValue.value); - } - return convertedValues; - } -} \ No newline at end of file diff --git a/Java/src/main/java/localhost/models/Type15Enum.java b/Java/src/main/java/localhost/models/Type15Enum.java deleted file mode 100644 index 4a5279e14..000000000 --- a/Java/src/main/java/localhost/models/Type15Enum.java +++ /dev/null @@ -1,111 +0,0 @@ -/* - * ThoughtSpotPublicRESTAPILib - * - * This file was automatically generated by APIMATIC v3.0 ( https://www.apimatic.io ). - */ - -package localhost.models; - -import java.util.ArrayList; -import java.util.List; -import java.util.TreeMap; - -/** - * Type15Enum to be used. - */ -public enum Type15Enum { - SNOWFLAKE, - - AMAZON_REDSHIFT, - - GOOGLE_BIGQUERY, - - AZURE_SYNAPSE, - - TERADATA, - - STARBURST, - - SAP_HANA, - - ORACLE_ADW, - - DATABRICKS, - - DENODO, - - DREMIO; - - - private static TreeMap valueMap = new TreeMap<>(); - private String value; - - static { - SNOWFLAKE.value = "SNOWFLAKE"; - AMAZON_REDSHIFT.value = "AMAZON_REDSHIFT"; - GOOGLE_BIGQUERY.value = "GOOGLE_BIGQUERY"; - AZURE_SYNAPSE.value = "AZURE_SYNAPSE"; - TERADATA.value = "TERADATA"; - STARBURST.value = "STARBURST"; - SAP_HANA.value = "SAP_HANA"; - ORACLE_ADW.value = "ORACLE_ADW"; - DATABRICKS.value = "DATABRICKS"; - DENODO.value = "DENODO"; - DREMIO.value = "DREMIO"; - - valueMap.put("SNOWFLAKE", SNOWFLAKE); - valueMap.put("AMAZON_REDSHIFT", AMAZON_REDSHIFT); - valueMap.put("GOOGLE_BIGQUERY", GOOGLE_BIGQUERY); - valueMap.put("AZURE_SYNAPSE", AZURE_SYNAPSE); - valueMap.put("TERADATA", TERADATA); - valueMap.put("STARBURST", STARBURST); - valueMap.put("SAP_HANA", SAP_HANA); - valueMap.put("ORACLE_ADW", ORACLE_ADW); - valueMap.put("DATABRICKS", DATABRICKS); - valueMap.put("DENODO", DENODO); - valueMap.put("DREMIO", DREMIO); - } - - /** - * Returns the enum member associated with the given string value. - * @param toConvert String value to get enum member. - * @return The enum member against the given string value. - */ - @com.fasterxml.jackson.annotation.JsonCreator - public static Type15Enum fromString(String toConvert) { - return valueMap.get(toConvert); - } - - /** - * Returns the string value associated with the enum member. - * @return The string value against enum member. - */ - @com.fasterxml.jackson.annotation.JsonValue - public String value() { - return value; - } - - /** - * Get string representation of this enum. - */ - @Override - public String toString() { - return value.toString(); - } - - /** - * Convert list of Type15Enum values to list of string values. - * @param toConvert The list of Type15Enum values to convert. - * @return List of representative string values. - */ - public static List toValue(List toConvert) { - if (toConvert == null) { - return null; - } - List convertedValues = new ArrayList<>(); - for (Type15Enum enumValue : toConvert) { - convertedValues.add(enumValue.value); - } - return convertedValues; - } -} \ No newline at end of file diff --git a/Java/src/main/java/localhost/models/Type16Enum.java b/Java/src/main/java/localhost/models/Type16Enum.java deleted file mode 100644 index f6e17fd17..000000000 --- a/Java/src/main/java/localhost/models/Type16Enum.java +++ /dev/null @@ -1,83 +0,0 @@ -/* - * ThoughtSpotPublicRESTAPILib - * - * This file was automatically generated by APIMATIC v3.0 ( https://www.apimatic.io ). - */ - -package localhost.models; - -import java.util.ArrayList; -import java.util.List; -import java.util.TreeMap; - -/** - * Type16Enum to be used. - */ -public enum Type16Enum { - CSV, - - XLSX, - - PDF, - - PNG; - - - private static TreeMap valueMap = new TreeMap<>(); - private String value; - - static { - CSV.value = "CSV"; - XLSX.value = "XLSX"; - PDF.value = "PDF"; - PNG.value = "PNG"; - - valueMap.put("CSV", CSV); - valueMap.put("XLSX", XLSX); - valueMap.put("PDF", PDF); - valueMap.put("PNG", PNG); - } - - /** - * Returns the enum member associated with the given string value. - * @param toConvert String value to get enum member. - * @return The enum member against the given string value. - */ - @com.fasterxml.jackson.annotation.JsonCreator - public static Type16Enum fromString(String toConvert) { - return valueMap.get(toConvert); - } - - /** - * Returns the string value associated with the enum member. - * @return The string value against enum member. - */ - @com.fasterxml.jackson.annotation.JsonValue - public String value() { - return value; - } - - /** - * Get string representation of this enum. - */ - @Override - public String toString() { - return value.toString(); - } - - /** - * Convert list of Type16Enum values to list of string values. - * @param toConvert The list of Type16Enum values to convert. - * @return List of representative string values. - */ - public static List toValue(List toConvert) { - if (toConvert == null) { - return null; - } - List convertedValues = new ArrayList<>(); - for (Type16Enum enumValue : toConvert) { - convertedValues.add(enumValue.value); - } - return convertedValues; - } -} \ No newline at end of file diff --git a/Java/src/main/java/localhost/models/Type18Enum.java b/Java/src/main/java/localhost/models/Type18Enum.java deleted file mode 100644 index d8c7b137c..000000000 --- a/Java/src/main/java/localhost/models/Type18Enum.java +++ /dev/null @@ -1,83 +0,0 @@ -/* - * ThoughtSpotPublicRESTAPILib - * - * This file was automatically generated by APIMATIC v3.0 ( https://www.apimatic.io ). - */ - -package localhost.models; - -import java.util.ArrayList; -import java.util.List; -import java.util.TreeMap; - -/** - * Type18Enum to be used. - */ -public enum Type18Enum { - LIVEBOARD, - - ANSWER, - - DATAOBJECT, - - COLUMN; - - - private static TreeMap valueMap = new TreeMap<>(); - private String value; - - static { - LIVEBOARD.value = "LIVEBOARD"; - ANSWER.value = "ANSWER"; - DATAOBJECT.value = "DATAOBJECT"; - COLUMN.value = "COLUMN"; - - valueMap.put("LIVEBOARD", LIVEBOARD); - valueMap.put("ANSWER", ANSWER); - valueMap.put("DATAOBJECT", DATAOBJECT); - valueMap.put("COLUMN", COLUMN); - } - - /** - * Returns the enum member associated with the given string value. - * @param toConvert String value to get enum member. - * @return The enum member against the given string value. - */ - @com.fasterxml.jackson.annotation.JsonCreator - public static Type18Enum fromString(String toConvert) { - return valueMap.get(toConvert); - } - - /** - * Returns the string value associated with the enum member. - * @return The string value against enum member. - */ - @com.fasterxml.jackson.annotation.JsonValue - public String value() { - return value; - } - - /** - * Get string representation of this enum. - */ - @Override - public String toString() { - return value.toString(); - } - - /** - * Convert list of Type18Enum values to list of string values. - * @param toConvert The list of Type18Enum values to convert. - * @return List of representative string values. - */ - public static List toValue(List toConvert) { - if (toConvert == null) { - return null; - } - List convertedValues = new ArrayList<>(); - for (Type18Enum enumValue : toConvert) { - convertedValues.add(enumValue.value); - } - return convertedValues; - } -} \ No newline at end of file diff --git a/Java/src/main/java/localhost/models/Type1Enum.java b/Java/src/main/java/localhost/models/Type1Enum.java deleted file mode 100644 index ac37c2c1c..000000000 --- a/Java/src/main/java/localhost/models/Type1Enum.java +++ /dev/null @@ -1,75 +0,0 @@ -/* - * ThoughtSpotPublicRESTAPILib - * - * This file was automatically generated by APIMATIC v3.0 ( https://www.apimatic.io ). - */ - -package localhost.models; - -import java.util.ArrayList; -import java.util.List; -import java.util.TreeMap; - -/** - * Type1Enum to be used. - */ -public enum Type1Enum { - USER, - - USER_GROUP; - - - private static TreeMap valueMap = new TreeMap<>(); - private String value; - - static { - USER.value = "USER"; - USER_GROUP.value = "USER_GROUP"; - - valueMap.put("USER", USER); - valueMap.put("USER_GROUP", USER_GROUP); - } - - /** - * Returns the enum member associated with the given string value. - * @param toConvert String value to get enum member. - * @return The enum member against the given string value. - */ - @com.fasterxml.jackson.annotation.JsonCreator - public static Type1Enum fromString(String toConvert) { - return valueMap.get(toConvert); - } - - /** - * Returns the string value associated with the enum member. - * @return The string value against enum member. - */ - @com.fasterxml.jackson.annotation.JsonValue - public String value() { - return value; - } - - /** - * Get string representation of this enum. - */ - @Override - public String toString() { - return value.toString(); - } - - /** - * Convert list of Type1Enum values to list of string values. - * @param toConvert The list of Type1Enum values to convert. - * @return List of representative string values. - */ - public static List toValue(List toConvert) { - if (toConvert == null) { - return null; - } - List convertedValues = new ArrayList<>(); - for (Type1Enum enumValue : toConvert) { - convertedValues.add(enumValue.value); - } - return convertedValues; - } -} \ No newline at end of file diff --git a/Java/src/main/java/localhost/models/Type2Enum.java b/Java/src/main/java/localhost/models/Type2Enum.java deleted file mode 100644 index 55e89647e..000000000 --- a/Java/src/main/java/localhost/models/Type2Enum.java +++ /dev/null @@ -1,83 +0,0 @@ -/* - * ThoughtSpotPublicRESTAPILib - * - * This file was automatically generated by APIMATIC v3.0 ( https://www.apimatic.io ). - */ - -package localhost.models; - -import java.util.ArrayList; -import java.util.List; -import java.util.TreeMap; - -/** - * Type2Enum to be used. - */ -public enum Type2Enum { - LIVEBOARD, - - ANSWER, - - DATAOBJECT, - - COLUMN; - - - private static TreeMap valueMap = new TreeMap<>(); - private String value; - - static { - LIVEBOARD.value = "LIVEBOARD"; - ANSWER.value = "ANSWER"; - DATAOBJECT.value = "DATAOBJECT"; - COLUMN.value = "COLUMN"; - - valueMap.put("LIVEBOARD", LIVEBOARD); - valueMap.put("ANSWER", ANSWER); - valueMap.put("DATAOBJECT", DATAOBJECT); - valueMap.put("COLUMN", COLUMN); - } - - /** - * Returns the enum member associated with the given string value. - * @param toConvert String value to get enum member. - * @return The enum member against the given string value. - */ - @com.fasterxml.jackson.annotation.JsonCreator - public static Type2Enum fromString(String toConvert) { - return valueMap.get(toConvert); - } - - /** - * Returns the string value associated with the enum member. - * @return The string value against enum member. - */ - @com.fasterxml.jackson.annotation.JsonValue - public String value() { - return value; - } - - /** - * Get string representation of this enum. - */ - @Override - public String toString() { - return value.toString(); - } - - /** - * Convert list of Type2Enum values to list of string values. - * @param toConvert The list of Type2Enum values to convert. - * @return List of representative string values. - */ - public static List toValue(List toConvert) { - if (toConvert == null) { - return null; - } - List convertedValues = new ArrayList<>(); - for (Type2Enum enumValue : toConvert) { - convertedValues.add(enumValue.value); - } - return convertedValues; - } -} \ No newline at end of file diff --git a/Java/src/main/java/localhost/models/Type3Enum.java b/Java/src/main/java/localhost/models/Type3Enum.java deleted file mode 100644 index 918f0b295..000000000 --- a/Java/src/main/java/localhost/models/Type3Enum.java +++ /dev/null @@ -1,143 +0,0 @@ -/* - * ThoughtSpotPublicRESTAPILib - * - * This file was automatically generated by APIMATIC v3.0 ( https://www.apimatic.io ). - */ - -package localhost.models; - -import java.util.ArrayList; -import java.util.List; -import java.util.TreeMap; - -/** - * Type3Enum to be used. - */ -public enum Type3Enum { - ANSWER, - - LIVEBOARD, - - DATAOBJECT_ALL, - - DATAOBJECT_WORKSHEET, - - DATAOBJECT_TABLE, - - DATAOBJECT_USER_DEFINED, - - DATAOBJECT_VIEW, - - DATAOBJECT_CALENDAR_TABLE, - - COLUMN_ALL, - - COLUMN_WORKSHEET, - - COLUMN_TABLE, - - COLUMN_USER_DEFINED, - - COLUMN_VIEW, - - COLUMN_CALENDAR_TABLE, - - JOIN, - - CONNECTION, - - TAG, - - USER, - - USER_GROUP; - - - private static TreeMap valueMap = new TreeMap<>(); - private String value; - - static { - ANSWER.value = "ANSWER"; - LIVEBOARD.value = "LIVEBOARD"; - DATAOBJECT_ALL.value = "DATAOBJECT_ALL"; - DATAOBJECT_WORKSHEET.value = "DATAOBJECT_WORKSHEET"; - DATAOBJECT_TABLE.value = "DATAOBJECT_TABLE"; - DATAOBJECT_USER_DEFINED.value = "DATAOBJECT_USER_DEFINED"; - DATAOBJECT_VIEW.value = "DATAOBJECT_VIEW"; - DATAOBJECT_CALENDAR_TABLE.value = "DATAOBJECT_CALENDAR_TABLE"; - COLUMN_ALL.value = "COLUMN_ALL"; - COLUMN_WORKSHEET.value = "COLUMN_WORKSHEET"; - COLUMN_TABLE.value = "COLUMN_TABLE"; - COLUMN_USER_DEFINED.value = "COLUMN_USER_DEFINED"; - COLUMN_VIEW.value = "COLUMN_VIEW"; - COLUMN_CALENDAR_TABLE.value = "COLUMN_CALENDAR_TABLE"; - JOIN.value = "JOIN"; - CONNECTION.value = "CONNECTION"; - TAG.value = "TAG"; - USER.value = "USER"; - USER_GROUP.value = "USER_GROUP"; - - valueMap.put("ANSWER", ANSWER); - valueMap.put("LIVEBOARD", LIVEBOARD); - valueMap.put("DATAOBJECT_ALL", DATAOBJECT_ALL); - valueMap.put("DATAOBJECT_WORKSHEET", DATAOBJECT_WORKSHEET); - valueMap.put("DATAOBJECT_TABLE", DATAOBJECT_TABLE); - valueMap.put("DATAOBJECT_USER_DEFINED", DATAOBJECT_USER_DEFINED); - valueMap.put("DATAOBJECT_VIEW", DATAOBJECT_VIEW); - valueMap.put("DATAOBJECT_CALENDAR_TABLE", DATAOBJECT_CALENDAR_TABLE); - valueMap.put("COLUMN_ALL", COLUMN_ALL); - valueMap.put("COLUMN_WORKSHEET", COLUMN_WORKSHEET); - valueMap.put("COLUMN_TABLE", COLUMN_TABLE); - valueMap.put("COLUMN_USER_DEFINED", COLUMN_USER_DEFINED); - valueMap.put("COLUMN_VIEW", COLUMN_VIEW); - valueMap.put("COLUMN_CALENDAR_TABLE", COLUMN_CALENDAR_TABLE); - valueMap.put("JOIN", JOIN); - valueMap.put("CONNECTION", CONNECTION); - valueMap.put("TAG", TAG); - valueMap.put("USER", USER); - valueMap.put("USER_GROUP", USER_GROUP); - } - - /** - * Returns the enum member associated with the given string value. - * @param toConvert String value to get enum member. - * @return The enum member against the given string value. - */ - @com.fasterxml.jackson.annotation.JsonCreator - public static Type3Enum fromString(String toConvert) { - return valueMap.get(toConvert); - } - - /** - * Returns the string value associated with the enum member. - * @return The string value against enum member. - */ - @com.fasterxml.jackson.annotation.JsonValue - public String value() { - return value; - } - - /** - * Get string representation of this enum. - */ - @Override - public String toString() { - return value.toString(); - } - - /** - * Convert list of Type3Enum values to list of string values. - * @param toConvert The list of Type3Enum values to convert. - * @return List of representative string values. - */ - public static List toValue(List toConvert) { - if (toConvert == null) { - return null; - } - List convertedValues = new ArrayList<>(); - for (Type3Enum enumValue : toConvert) { - convertedValues.add(enumValue.value); - } - return convertedValues; - } -} \ No newline at end of file diff --git a/Java/src/main/java/localhost/models/Type4Enum.java b/Java/src/main/java/localhost/models/Type4Enum.java deleted file mode 100644 index 2063fde5d..000000000 --- a/Java/src/main/java/localhost/models/Type4Enum.java +++ /dev/null @@ -1,103 +0,0 @@ -/* - * ThoughtSpotPublicRESTAPILib - * - * This file was automatically generated by APIMATIC v3.0 ( https://www.apimatic.io ). - */ - -package localhost.models; - -import java.util.ArrayList; -import java.util.List; -import java.util.TreeMap; - -/** - * Type4Enum to be used. - */ -public enum Type4Enum { - ANSWER, - - LIVEBOARD, - - DATAOBJECT, - - COLUMN, - - JOIN, - - CONNECTION, - - TAG, - - USER, - - USER_GROUP; - - - private static TreeMap valueMap = new TreeMap<>(); - private String value; - - static { - ANSWER.value = "ANSWER"; - LIVEBOARD.value = "LIVEBOARD"; - DATAOBJECT.value = "DATAOBJECT"; - COLUMN.value = "COLUMN"; - JOIN.value = "JOIN"; - CONNECTION.value = "CONNECTION"; - TAG.value = "TAG"; - USER.value = "USER"; - USER_GROUP.value = "USER_GROUP"; - - valueMap.put("ANSWER", ANSWER); - valueMap.put("LIVEBOARD", LIVEBOARD); - valueMap.put("DATAOBJECT", DATAOBJECT); - valueMap.put("COLUMN", COLUMN); - valueMap.put("JOIN", JOIN); - valueMap.put("CONNECTION", CONNECTION); - valueMap.put("TAG", TAG); - valueMap.put("USER", USER); - valueMap.put("USER_GROUP", USER_GROUP); - } - - /** - * Returns the enum member associated with the given string value. - * @param toConvert String value to get enum member. - * @return The enum member against the given string value. - */ - @com.fasterxml.jackson.annotation.JsonCreator - public static Type4Enum fromString(String toConvert) { - return valueMap.get(toConvert); - } - - /** - * Returns the string value associated with the enum member. - * @return The string value against enum member. - */ - @com.fasterxml.jackson.annotation.JsonValue - public String value() { - return value; - } - - /** - * Get string representation of this enum. - */ - @Override - public String toString() { - return value.toString(); - } - - /** - * Convert list of Type4Enum values to list of string values. - * @param toConvert The list of Type4Enum values to convert. - * @return List of representative string values. - */ - public static List toValue(List toConvert) { - if (toConvert == null) { - return null; - } - List convertedValues = new ArrayList<>(); - for (Type4Enum enumValue : toConvert) { - convertedValues.add(enumValue.value); - } - return convertedValues; - } -} \ No newline at end of file diff --git a/Java/src/main/java/localhost/models/Type5Enum.java b/Java/src/main/java/localhost/models/Type5Enum.java deleted file mode 100644 index a27ee1469..000000000 --- a/Java/src/main/java/localhost/models/Type5Enum.java +++ /dev/null @@ -1,143 +0,0 @@ -/* - * ThoughtSpotPublicRESTAPILib - * - * This file was automatically generated by APIMATIC v3.0 ( https://www.apimatic.io ). - */ - -package localhost.models; - -import java.util.ArrayList; -import java.util.List; -import java.util.TreeMap; - -/** - * Type5Enum to be used. - */ -public enum Type5Enum { - ANSWER, - - LIVEBOARD, - - DATAOBJECT_ALL, - - DATAOBJECT_WORKSHEET, - - DATAOBJECT_TABLE, - - DATAOBJECT_USER_DEFINED, - - DATAOBJECT_VIEW, - - DATAOBJECT_CALENDAR_TABLE, - - COLUMN_ALL, - - COLUMN_WORKSHEET, - - COLUMN_TABLE, - - COLUMN_USER_DEFINED, - - COLUMN_VIEW, - - COLUMN_CALENDAR_TABLE, - - JOIN, - - CONNECTION, - - TAG, - - USER, - - USER_GROUP; - - - private static TreeMap valueMap = new TreeMap<>(); - private String value; - - static { - ANSWER.value = "ANSWER"; - LIVEBOARD.value = "LIVEBOARD"; - DATAOBJECT_ALL.value = "DATAOBJECT_ALL"; - DATAOBJECT_WORKSHEET.value = "DATAOBJECT_WORKSHEET"; - DATAOBJECT_TABLE.value = "DATAOBJECT_TABLE"; - DATAOBJECT_USER_DEFINED.value = "DATAOBJECT_USER_DEFINED"; - DATAOBJECT_VIEW.value = "DATAOBJECT_VIEW"; - DATAOBJECT_CALENDAR_TABLE.value = "DATAOBJECT_CALENDAR_TABLE"; - COLUMN_ALL.value = "COLUMN_ALL"; - COLUMN_WORKSHEET.value = "COLUMN_WORKSHEET"; - COLUMN_TABLE.value = "COLUMN_TABLE"; - COLUMN_USER_DEFINED.value = "COLUMN_USER_DEFINED"; - COLUMN_VIEW.value = "COLUMN_VIEW"; - COLUMN_CALENDAR_TABLE.value = "COLUMN_CALENDAR_TABLE"; - JOIN.value = "JOIN"; - CONNECTION.value = "CONNECTION"; - TAG.value = "TAG"; - USER.value = "USER"; - USER_GROUP.value = "USER_GROUP"; - - valueMap.put("ANSWER", ANSWER); - valueMap.put("LIVEBOARD", LIVEBOARD); - valueMap.put("DATAOBJECT_ALL", DATAOBJECT_ALL); - valueMap.put("DATAOBJECT_WORKSHEET", DATAOBJECT_WORKSHEET); - valueMap.put("DATAOBJECT_TABLE", DATAOBJECT_TABLE); - valueMap.put("DATAOBJECT_USER_DEFINED", DATAOBJECT_USER_DEFINED); - valueMap.put("DATAOBJECT_VIEW", DATAOBJECT_VIEW); - valueMap.put("DATAOBJECT_CALENDAR_TABLE", DATAOBJECT_CALENDAR_TABLE); - valueMap.put("COLUMN_ALL", COLUMN_ALL); - valueMap.put("COLUMN_WORKSHEET", COLUMN_WORKSHEET); - valueMap.put("COLUMN_TABLE", COLUMN_TABLE); - valueMap.put("COLUMN_USER_DEFINED", COLUMN_USER_DEFINED); - valueMap.put("COLUMN_VIEW", COLUMN_VIEW); - valueMap.put("COLUMN_CALENDAR_TABLE", COLUMN_CALENDAR_TABLE); - valueMap.put("JOIN", JOIN); - valueMap.put("CONNECTION", CONNECTION); - valueMap.put("TAG", TAG); - valueMap.put("USER", USER); - valueMap.put("USER_GROUP", USER_GROUP); - } - - /** - * Returns the enum member associated with the given string value. - * @param toConvert String value to get enum member. - * @return The enum member against the given string value. - */ - @com.fasterxml.jackson.annotation.JsonCreator - public static Type5Enum fromString(String toConvert) { - return valueMap.get(toConvert); - } - - /** - * Returns the string value associated with the enum member. - * @return The string value against enum member. - */ - @com.fasterxml.jackson.annotation.JsonValue - public String value() { - return value; - } - - /** - * Get string representation of this enum. - */ - @Override - public String toString() { - return value.toString(); - } - - /** - * Convert list of Type5Enum values to list of string values. - * @param toConvert The list of Type5Enum values to convert. - * @return List of representative string values. - */ - public static List toValue(List toConvert) { - if (toConvert == null) { - return null; - } - List convertedValues = new ArrayList<>(); - for (Type5Enum enumValue : toConvert) { - convertedValues.add(enumValue.value); - } - return convertedValues; - } -} \ No newline at end of file diff --git a/Java/src/main/java/localhost/models/Type6Enum.java b/Java/src/main/java/localhost/models/Type6Enum.java deleted file mode 100644 index a9f556a34..000000000 --- a/Java/src/main/java/localhost/models/Type6Enum.java +++ /dev/null @@ -1,103 +0,0 @@ -/* - * ThoughtSpotPublicRESTAPILib - * - * This file was automatically generated by APIMATIC v3.0 ( https://www.apimatic.io ). - */ - -package localhost.models; - -import java.util.ArrayList; -import java.util.List; -import java.util.TreeMap; - -/** - * Type6Enum to be used. - */ -public enum Type6Enum { - ANSWER, - - LIVEBOARD, - - DATAOBJECT, - - COLUMN, - - JOIN, - - CONNECTION, - - TAG, - - USER, - - USER_GROUP; - - - private static TreeMap valueMap = new TreeMap<>(); - private String value; - - static { - ANSWER.value = "ANSWER"; - LIVEBOARD.value = "LIVEBOARD"; - DATAOBJECT.value = "DATAOBJECT"; - COLUMN.value = "COLUMN"; - JOIN.value = "JOIN"; - CONNECTION.value = "CONNECTION"; - TAG.value = "TAG"; - USER.value = "USER"; - USER_GROUP.value = "USER_GROUP"; - - valueMap.put("ANSWER", ANSWER); - valueMap.put("LIVEBOARD", LIVEBOARD); - valueMap.put("DATAOBJECT", DATAOBJECT); - valueMap.put("COLUMN", COLUMN); - valueMap.put("JOIN", JOIN); - valueMap.put("CONNECTION", CONNECTION); - valueMap.put("TAG", TAG); - valueMap.put("USER", USER); - valueMap.put("USER_GROUP", USER_GROUP); - } - - /** - * Returns the enum member associated with the given string value. - * @param toConvert String value to get enum member. - * @return The enum member against the given string value. - */ - @com.fasterxml.jackson.annotation.JsonCreator - public static Type6Enum fromString(String toConvert) { - return valueMap.get(toConvert); - } - - /** - * Returns the string value associated with the enum member. - * @return The string value against enum member. - */ - @com.fasterxml.jackson.annotation.JsonValue - public String value() { - return value; - } - - /** - * Get string representation of this enum. - */ - @Override - public String toString() { - return value.toString(); - } - - /** - * Convert list of Type6Enum values to list of string values. - * @param toConvert The list of Type6Enum values to convert. - * @return List of representative string values. - */ - public static List toValue(List toConvert) { - if (toConvert == null) { - return null; - } - List convertedValues = new ArrayList<>(); - for (Type6Enum enumValue : toConvert) { - convertedValues.add(enumValue.value); - } - return convertedValues; - } -} \ No newline at end of file diff --git a/Java/src/main/java/localhost/models/Type7Enum.java b/Java/src/main/java/localhost/models/Type7Enum.java deleted file mode 100644 index 3dd185014..000000000 --- a/Java/src/main/java/localhost/models/Type7Enum.java +++ /dev/null @@ -1,83 +0,0 @@ -/* - * ThoughtSpotPublicRESTAPILib - * - * This file was automatically generated by APIMATIC v3.0 ( https://www.apimatic.io ). - */ - -package localhost.models; - -import java.util.ArrayList; -import java.util.List; -import java.util.TreeMap; - -/** - * Type7Enum to be used. - */ -public enum Type7Enum { - LIVEBOARD, - - ANSWER, - - DATAOBJECT, - - COLUMN; - - - private static TreeMap valueMap = new TreeMap<>(); - private String value; - - static { - LIVEBOARD.value = "LIVEBOARD"; - ANSWER.value = "ANSWER"; - DATAOBJECT.value = "DATAOBJECT"; - COLUMN.value = "COLUMN"; - - valueMap.put("LIVEBOARD", LIVEBOARD); - valueMap.put("ANSWER", ANSWER); - valueMap.put("DATAOBJECT", DATAOBJECT); - valueMap.put("COLUMN", COLUMN); - } - - /** - * Returns the enum member associated with the given string value. - * @param toConvert String value to get enum member. - * @return The enum member against the given string value. - */ - @com.fasterxml.jackson.annotation.JsonCreator - public static Type7Enum fromString(String toConvert) { - return valueMap.get(toConvert); - } - - /** - * Returns the string value associated with the enum member. - * @return The string value against enum member. - */ - @com.fasterxml.jackson.annotation.JsonValue - public String value() { - return value; - } - - /** - * Get string representation of this enum. - */ - @Override - public String toString() { - return value.toString(); - } - - /** - * Convert list of Type7Enum values to list of string values. - * @param toConvert The list of Type7Enum values to convert. - * @return List of representative string values. - */ - public static List toValue(List toConvert) { - if (toConvert == null) { - return null; - } - List convertedValues = new ArrayList<>(); - for (Type7Enum enumValue : toConvert) { - convertedValues.add(enumValue.value); - } - return convertedValues; - } -} \ No newline at end of file diff --git a/Java/src/main/java/localhost/models/Type8Enum.java b/Java/src/main/java/localhost/models/Type8Enum.java deleted file mode 100644 index 6e630b5b6..000000000 --- a/Java/src/main/java/localhost/models/Type8Enum.java +++ /dev/null @@ -1,87 +0,0 @@ -/* - * ThoughtSpotPublicRESTAPILib - * - * This file was automatically generated by APIMATIC v3.0 ( https://www.apimatic.io ). - */ - -package localhost.models; - -import java.util.ArrayList; -import java.util.List; -import java.util.TreeMap; - -/** - * Type8Enum to be used. - */ -public enum Type8Enum { - UNKNOWN, - - LDAP_USER, - - SAML_USER, - - OIDC_USER, - - LOCAL_USER; - - - private static TreeMap valueMap = new TreeMap<>(); - private String value; - - static { - UNKNOWN.value = "UNKNOWN"; - LDAP_USER.value = "LDAP_USER"; - SAML_USER.value = "SAML_USER"; - OIDC_USER.value = "OIDC_USER"; - LOCAL_USER.value = "LOCAL_USER"; - - valueMap.put("UNKNOWN", UNKNOWN); - valueMap.put("LDAP_USER", LDAP_USER); - valueMap.put("SAML_USER", SAML_USER); - valueMap.put("OIDC_USER", OIDC_USER); - valueMap.put("LOCAL_USER", LOCAL_USER); - } - - /** - * Returns the enum member associated with the given string value. - * @param toConvert String value to get enum member. - * @return The enum member against the given string value. - */ - @com.fasterxml.jackson.annotation.JsonCreator - public static Type8Enum fromString(String toConvert) { - return valueMap.get(toConvert); - } - - /** - * Returns the string value associated with the enum member. - * @return The string value against enum member. - */ - @com.fasterxml.jackson.annotation.JsonValue - public String value() { - return value; - } - - /** - * Get string representation of this enum. - */ - @Override - public String toString() { - return value.toString(); - } - - /** - * Convert list of Type8Enum values to list of string values. - * @param toConvert The list of Type8Enum values to convert. - * @return List of representative string values. - */ - public static List toValue(List toConvert) { - if (toConvert == null) { - return null; - } - List convertedValues = new ArrayList<>(); - for (Type8Enum enumValue : toConvert) { - convertedValues.add(enumValue.value); - } - return convertedValues; - } -} \ No newline at end of file diff --git a/Java/src/main/java/localhost/models/Type9Enum.java b/Java/src/main/java/localhost/models/Type9Enum.java deleted file mode 100644 index 722fd0187..000000000 --- a/Java/src/main/java/localhost/models/Type9Enum.java +++ /dev/null @@ -1,87 +0,0 @@ -/* - * ThoughtSpotPublicRESTAPILib - * - * This file was automatically generated by APIMATIC v3.0 ( https://www.apimatic.io ). - */ - -package localhost.models; - -import java.util.ArrayList; -import java.util.List; -import java.util.TreeMap; - -/** - * Type9Enum to be used. - */ -public enum Type9Enum { - UNKNOWN, - - LDAP_USER, - - SAML_USER, - - OIDC_USER, - - LOCAL_USER; - - - private static TreeMap valueMap = new TreeMap<>(); - private String value; - - static { - UNKNOWN.value = "UNKNOWN"; - LDAP_USER.value = "LDAP_USER"; - SAML_USER.value = "SAML_USER"; - OIDC_USER.value = "OIDC_USER"; - LOCAL_USER.value = "LOCAL_USER"; - - valueMap.put("UNKNOWN", UNKNOWN); - valueMap.put("LDAP_USER", LDAP_USER); - valueMap.put("SAML_USER", SAML_USER); - valueMap.put("OIDC_USER", OIDC_USER); - valueMap.put("LOCAL_USER", LOCAL_USER); - } - - /** - * Returns the enum member associated with the given string value. - * @param toConvert String value to get enum member. - * @return The enum member against the given string value. - */ - @com.fasterxml.jackson.annotation.JsonCreator - public static Type9Enum fromString(String toConvert) { - return valueMap.get(toConvert); - } - - /** - * Returns the string value associated with the enum member. - * @return The string value against enum member. - */ - @com.fasterxml.jackson.annotation.JsonValue - public String value() { - return value; - } - - /** - * Get string representation of this enum. - */ - @Override - public String toString() { - return value.toString(); - } - - /** - * Convert list of Type9Enum values to list of string values. - * @param toConvert The list of Type9Enum values to convert. - * @return List of representative string values. - */ - public static List toValue(List toConvert) { - if (toConvert == null) { - return null; - } - List convertedValues = new ArrayList<>(); - for (Type9Enum enumValue : toConvert) { - convertedValues.add(enumValue.value); - } - return convertedValues; - } -} \ No newline at end of file diff --git a/Java/src/main/java/localhost/models/TypeEnum.java b/Java/src/main/java/localhost/models/TypeEnum.java deleted file mode 100644 index e82961df5..000000000 --- a/Java/src/main/java/localhost/models/TypeEnum.java +++ /dev/null @@ -1,83 +0,0 @@ -/* - * ThoughtSpotPublicRESTAPILib - * - * This file was automatically generated by APIMATIC v3.0 ( https://www.apimatic.io ). - */ - -package localhost.models; - -import java.util.ArrayList; -import java.util.List; -import java.util.TreeMap; - -/** - * TypeEnum to be used. - */ -public enum TypeEnum { - ANSWER, - - LIVEBOARD, - - DATAOBJECT, - - CONNECTION; - - - private static TreeMap valueMap = new TreeMap<>(); - private String value; - - static { - ANSWER.value = "ANSWER"; - LIVEBOARD.value = "LIVEBOARD"; - DATAOBJECT.value = "DATAOBJECT"; - CONNECTION.value = "CONNECTION"; - - valueMap.put("ANSWER", ANSWER); - valueMap.put("LIVEBOARD", LIVEBOARD); - valueMap.put("DATAOBJECT", DATAOBJECT); - valueMap.put("CONNECTION", CONNECTION); - } - - /** - * Returns the enum member associated with the given string value. - * @param toConvert String value to get enum member. - * @return The enum member against the given string value. - */ - @com.fasterxml.jackson.annotation.JsonCreator - public static TypeEnum fromString(String toConvert) { - return valueMap.get(toConvert); - } - - /** - * Returns the string value associated with the enum member. - * @return The string value against enum member. - */ - @com.fasterxml.jackson.annotation.JsonValue - public String value() { - return value; - } - - /** - * Get string representation of this enum. - */ - @Override - public String toString() { - return value.toString(); - } - - /** - * Convert list of TypeEnum values to list of string values. - * @param toConvert The list of TypeEnum values to convert. - * @return List of representative string values. - */ - public static List toValue(List toConvert) { - if (toConvert == null) { - return null; - } - List convertedValues = new ArrayList<>(); - for (TypeEnum enumValue : toConvert) { - convertedValues.add(enumValue.value); - } - return convertedValues; - } -} \ No newline at end of file diff --git a/Java/src/main/java/localhost/models/UserNameAndID.java b/Java/src/main/java/localhost/models/UserNameAndID.java deleted file mode 100644 index a9b9a38a2..000000000 --- a/Java/src/main/java/localhost/models/UserNameAndID.java +++ /dev/null @@ -1,139 +0,0 @@ -/* - * ThoughtSpotPublicRESTAPILib - * - * This file was automatically generated by APIMATIC v3.0 ( https://www.apimatic.io ). - */ - -package localhost.models; - -import com.fasterxml.jackson.annotation.JsonGetter; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonSetter; -import io.apimatic.core.types.BaseModel; - -/** - * This is a model class for UserNameAndID type. - */ -public class UserNameAndID { - private String name; - private String id; - - /** - * Default constructor. - */ - public UserNameAndID() { - } - - /** - * Initialization constructor. - * @param name String value for name. - * @param id String value for id. - */ - public UserNameAndID( - String name, - String id) { - this.name = name; - this.id = id; - } - - /** - * Getter for Name. - * Username of the user - * @return Returns the String - */ - @JsonGetter("name") - @JsonInclude(JsonInclude.Include.NON_NULL) - public String getName() { - return name; - } - - /** - * Setter for Name. - * Username of the user - * @param name Value for String - */ - @JsonSetter("name") - public void setName(String name) { - this.name = name; - } - - /** - * Getter for Id. - * GUID of the user - * @return Returns the String - */ - @JsonGetter("id") - @JsonInclude(JsonInclude.Include.NON_NULL) - public String getId() { - return id; - } - - /** - * Setter for Id. - * GUID of the user - * @param id Value for String - */ - @JsonSetter("id") - public void setId(String id) { - this.id = id; - } - - /** - * Converts this UserNameAndID into string format. - * @return String representation of this class - */ - @Override - public String toString() { - return "UserNameAndID [" + "name=" + name + ", id=" + id + "]"; - } - - /** - * Builds a new {@link UserNameAndID.Builder} object. - * Creates the instance with the state of the current model. - * @return a new {@link UserNameAndID.Builder} object - */ - public Builder toBuilder() { - Builder builder = new Builder() - .name(getName()) - .id(getId()); - return builder; - } - - /** - * Class to build instances of {@link UserNameAndID}. - */ - public static class Builder { - private String name; - private String id; - - - - /** - * Setter for name. - * @param name String value for name. - * @return Builder - */ - public Builder name(String name) { - this.name = name; - return this; - } - - /** - * Setter for id. - * @param id String value for id. - * @return Builder - */ - public Builder id(String id) { - this.id = id; - return this; - } - - /** - * Builds a new {@link UserNameAndID} object using the set fields. - * @return {@link UserNameAndID} - */ - public UserNameAndID build() { - return new UserNameAndID(name, id); - } - } -} diff --git a/Java/src/main/java/localhost/models/UserNameAndIDInput.java b/Java/src/main/java/localhost/models/UserNameAndIDInput.java deleted file mode 100644 index 46dd8e631..000000000 --- a/Java/src/main/java/localhost/models/UserNameAndIDInput.java +++ /dev/null @@ -1,139 +0,0 @@ -/* - * ThoughtSpotPublicRESTAPILib - * - * This file was automatically generated by APIMATIC v3.0 ( https://www.apimatic.io ). - */ - -package localhost.models; - -import com.fasterxml.jackson.annotation.JsonGetter; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonSetter; -import io.apimatic.core.types.BaseModel; - -/** - * This is a model class for UserNameAndIDInput type. - */ -public class UserNameAndIDInput { - private String name; - private String id; - - /** - * Default constructor. - */ - public UserNameAndIDInput() { - } - - /** - * Initialization constructor. - * @param name String value for name. - * @param id String value for id. - */ - public UserNameAndIDInput( - String name, - String id) { - this.name = name; - this.id = id; - } - - /** - * Getter for Name. - * Username of the user - * @return Returns the String - */ - @JsonGetter("name") - @JsonInclude(JsonInclude.Include.NON_NULL) - public String getName() { - return name; - } - - /** - * Setter for Name. - * Username of the user - * @param name Value for String - */ - @JsonSetter("name") - public void setName(String name) { - this.name = name; - } - - /** - * Getter for Id. - * GUID of the user - * @return Returns the String - */ - @JsonGetter("id") - @JsonInclude(JsonInclude.Include.NON_NULL) - public String getId() { - return id; - } - - /** - * Setter for Id. - * GUID of the user - * @param id Value for String - */ - @JsonSetter("id") - public void setId(String id) { - this.id = id; - } - - /** - * Converts this UserNameAndIDInput into string format. - * @return String representation of this class - */ - @Override - public String toString() { - return "UserNameAndIDInput [" + "name=" + name + ", id=" + id + "]"; - } - - /** - * Builds a new {@link UserNameAndIDInput.Builder} object. - * Creates the instance with the state of the current model. - * @return a new {@link UserNameAndIDInput.Builder} object - */ - public Builder toBuilder() { - Builder builder = new Builder() - .name(getName()) - .id(getId()); - return builder; - } - - /** - * Class to build instances of {@link UserNameAndIDInput}. - */ - public static class Builder { - private String name; - private String id; - - - - /** - * Setter for name. - * @param name String value for name. - * @return Builder - */ - public Builder name(String name) { - this.name = name; - return this; - } - - /** - * Setter for id. - * @param id String value for id. - * @return Builder - */ - public Builder id(String id) { - this.id = id; - return this; - } - - /** - * Builds a new {@link UserNameAndIDInput} object using the set fields. - * @return {@link UserNameAndIDInput} - */ - public UserNameAndIDInput build() { - return new UserNameAndIDInput(name, id); - } - } -} diff --git a/Java/src/main/java/localhost/models/UserResponse.java b/Java/src/main/java/localhost/models/UserResponse.java deleted file mode 100644 index 85bd379ba..000000000 --- a/Java/src/main/java/localhost/models/UserResponse.java +++ /dev/null @@ -1,1254 +0,0 @@ -/* - * ThoughtSpotPublicRESTAPILib - * - * This file was automatically generated by APIMATIC v3.0 ( https://www.apimatic.io ). - */ - -package localhost.models; - -import com.fasterxml.jackson.annotation.JsonGetter; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonSetter; -import io.apimatic.core.types.BaseModel; -import java.util.List; - -/** - * This is a model class for UserResponse type. - */ -public class UserResponse { - private String name; - private String displayName; - private String id; - private String visibility; - private String mail; - private List groups; - private List privileges; - private List orgs; - private List tags; - private String state; - private Boolean notifyOnShare; - private Boolean showWalkMe; - private Boolean analystOnboardingComplete; - private Integer firstLogin; - private Boolean welcomeEmailSent; - private Boolean isDeleted; - private Boolean isHidden; - private Boolean isExternal; - private Boolean isDeprecated; - private Boolean complete; - private Boolean isSuperUser; - private Boolean isSystemPrincipal; - private String type; - private String parenttype; - private String tenantId; - private Double indexVersion; - private Double generationNum; - private Double created; - private Double modified; - private UserNameAndID author; - private UserNameAndID modifiedBy; - private UserNameAndID owner; - - /** - * Default constructor. - */ - public UserResponse() { - } - - /** - * Initialization constructor. - * @param name String value for name. - * @param displayName String value for displayName. - * @param id String value for id. - * @param visibility String value for visibility. - * @param mail String value for mail. - * @param groups List of GroupNameAndID value for groups. - * @param privileges List of String value for privileges. - * @param orgs List of OrgType value for orgs. - * @param tags List of String value for tags. - * @param state String value for state. - * @param notifyOnShare Boolean value for notifyOnShare. - * @param showWalkMe Boolean value for showWalkMe. - * @param analystOnboardingComplete Boolean value for analystOnboardingComplete. - * @param firstLogin Integer value for firstLogin. - * @param welcomeEmailSent Boolean value for welcomeEmailSent. - * @param isDeleted Boolean value for isDeleted. - * @param isHidden Boolean value for isHidden. - * @param isExternal Boolean value for isExternal. - * @param isDeprecated Boolean value for isDeprecated. - * @param complete Boolean value for complete. - * @param isSuperUser Boolean value for isSuperUser. - * @param isSystemPrincipal Boolean value for isSystemPrincipal. - * @param type String value for type. - * @param parenttype String value for parenttype. - * @param tenantId String value for tenantId. - * @param indexVersion Double value for indexVersion. - * @param generationNum Double value for generationNum. - * @param created Double value for created. - * @param modified Double value for modified. - * @param author UserNameAndID value for author. - * @param modifiedBy UserNameAndID value for modifiedBy. - * @param owner UserNameAndID value for owner. - */ - public UserResponse( - String name, - String displayName, - String id, - String visibility, - String mail, - List groups, - List privileges, - List orgs, - List tags, - String state, - Boolean notifyOnShare, - Boolean showWalkMe, - Boolean analystOnboardingComplete, - Integer firstLogin, - Boolean welcomeEmailSent, - Boolean isDeleted, - Boolean isHidden, - Boolean isExternal, - Boolean isDeprecated, - Boolean complete, - Boolean isSuperUser, - Boolean isSystemPrincipal, - String type, - String parenttype, - String tenantId, - Double indexVersion, - Double generationNum, - Double created, - Double modified, - UserNameAndID author, - UserNameAndID modifiedBy, - UserNameAndID owner) { - this.name = name; - this.displayName = displayName; - this.id = id; - this.visibility = visibility; - this.mail = mail; - this.groups = groups; - this.privileges = privileges; - this.orgs = orgs; - this.tags = tags; - this.state = state; - this.notifyOnShare = notifyOnShare; - this.showWalkMe = showWalkMe; - this.analystOnboardingComplete = analystOnboardingComplete; - this.firstLogin = firstLogin; - this.welcomeEmailSent = welcomeEmailSent; - this.isDeleted = isDeleted; - this.isHidden = isHidden; - this.isExternal = isExternal; - this.isDeprecated = isDeprecated; - this.complete = complete; - this.isSuperUser = isSuperUser; - this.isSystemPrincipal = isSystemPrincipal; - this.type = type; - this.parenttype = parenttype; - this.tenantId = tenantId; - this.indexVersion = indexVersion; - this.generationNum = generationNum; - this.created = created; - this.modified = modified; - this.author = author; - this.modifiedBy = modifiedBy; - this.owner = owner; - } - - /** - * Getter for Name. - * Username of the user account - * @return Returns the String - */ - @JsonGetter("name") - @JsonInclude(JsonInclude.Include.NON_NULL) - public String getName() { - return name; - } - - /** - * Setter for Name. - * Username of the user account - * @param name Value for String - */ - @JsonSetter("name") - public void setName(String name) { - this.name = name; - } - - /** - * Getter for DisplayName. - * Display name of the user account - * @return Returns the String - */ - @JsonGetter("displayName") - @JsonInclude(JsonInclude.Include.NON_NULL) - public String getDisplayName() { - return displayName; - } - - /** - * Setter for DisplayName. - * Display name of the user account - * @param displayName Value for String - */ - @JsonSetter("displayName") - public void setDisplayName(String displayName) { - this.displayName = displayName; - } - - /** - * Getter for Id. - * GUID of the user account - * @return Returns the String - */ - @JsonGetter("id") - @JsonInclude(JsonInclude.Include.NON_NULL) - public String getId() { - return id; - } - - /** - * Setter for Id. - * GUID of the user account - * @param id Value for String - */ - @JsonSetter("id") - public void setId(String id) { - this.id = id; - } - - /** - * Getter for Visibility. - * Visibility of the user account - * @return Returns the String - */ - @JsonGetter("visibility") - @JsonInclude(JsonInclude.Include.NON_NULL) - public String getVisibility() { - return visibility; - } - - /** - * Setter for Visibility. - * Visibility of the user account - * @param visibility Value for String - */ - @JsonSetter("visibility") - public void setVisibility(String visibility) { - this.visibility = visibility; - } - - /** - * Getter for Mail. - * Email of the user account - * @return Returns the String - */ - @JsonGetter("mail") - @JsonInclude(JsonInclude.Include.NON_NULL) - public String getMail() { - return mail; - } - - /** - * Setter for Mail. - * Email of the user account - * @param mail Value for String - */ - @JsonSetter("mail") - public void setMail(String mail) { - this.mail = mail; - } - - /** - * Getter for Groups. - * Name of the group to which user account is added - * @return Returns the List of GroupNameAndID - */ - @JsonGetter("groups") - @JsonInclude(JsonInclude.Include.NON_NULL) - public List getGroups() { - return groups; - } - - /** - * Setter for Groups. - * Name of the group to which user account is added - * @param groups Value for List of GroupNameAndID - */ - @JsonSetter("groups") - public void setGroups(List groups) { - this.groups = groups; - } - - /** - * Getter for Privileges. - * Privileges assigned to user account - * @return Returns the List of String - */ - @JsonGetter("privileges") - @JsonInclude(JsonInclude.Include.NON_NULL) - public List getPrivileges() { - return privileges; - } - - /** - * Setter for Privileges. - * Privileges assigned to user account - * @param privileges Value for List of String - */ - @JsonSetter("privileges") - public void setPrivileges(List privileges) { - this.privileges = privileges; - } - - /** - * Getter for Orgs. - * The organizations that user belongs to - * @return Returns the List of OrgType - */ - @JsonGetter("orgs") - @JsonInclude(JsonInclude.Include.NON_NULL) - public List getOrgs() { - return orgs; - } - - /** - * Setter for Orgs. - * The organizations that user belongs to - * @param orgs Value for List of OrgType - */ - @JsonSetter("orgs") - public void setOrgs(List orgs) { - this.orgs = orgs; - } - - /** - * Getter for Tags. - * Tags assigned to the user - * @return Returns the List of String - */ - @JsonGetter("tags") - @JsonInclude(JsonInclude.Include.NON_NULL) - public List getTags() { - return tags; - } - - /** - * Setter for Tags. - * Tags assigned to the user - * @param tags Value for List of String - */ - @JsonSetter("tags") - public void setTags(List tags) { - this.tags = tags; - } - - /** - * Getter for State. - * Indicates if the user account is active or inactive - * @return Returns the String - */ - @JsonGetter("state") - @JsonInclude(JsonInclude.Include.NON_NULL) - public String getState() { - return state; - } - - /** - * Setter for State. - * Indicates if the user account is active or inactive - * @param state Value for String - */ - @JsonSetter("state") - public void setState(String state) { - this.state = state; - } - - /** - * Getter for NotifyOnShare. - * Indicates if the email should be sent when object is shared with the user - * @return Returns the Boolean - */ - @JsonGetter("notifyOnShare") - @JsonInclude(JsonInclude.Include.NON_NULL) - public Boolean getNotifyOnShare() { - return notifyOnShare; - } - - /** - * Setter for NotifyOnShare. - * Indicates if the email should be sent when object is shared with the user - * @param notifyOnShare Value for Boolean - */ - @JsonSetter("notifyOnShare") - public void setNotifyOnShare(Boolean notifyOnShare) { - this.notifyOnShare = notifyOnShare; - } - - /** - * Getter for ShowWalkMe. - * Indicates if the walk me should be shown when logging in - * @return Returns the Boolean - */ - @JsonGetter("showWalkMe") - @JsonInclude(JsonInclude.Include.NON_NULL) - public Boolean getShowWalkMe() { - return showWalkMe; - } - - /** - * Setter for ShowWalkMe. - * Indicates if the walk me should be shown when logging in - * @param showWalkMe Value for Boolean - */ - @JsonSetter("showWalkMe") - public void setShowWalkMe(Boolean showWalkMe) { - this.showWalkMe = showWalkMe; - } - - /** - * Getter for AnalystOnboardingComplete. - * Indicates if the onboarding is completed for the user - * @return Returns the Boolean - */ - @JsonGetter("analystOnboardingComplete") - @JsonInclude(JsonInclude.Include.NON_NULL) - public Boolean getAnalystOnboardingComplete() { - return analystOnboardingComplete; - } - - /** - * Setter for AnalystOnboardingComplete. - * Indicates if the onboarding is completed for the user - * @param analystOnboardingComplete Value for Boolean - */ - @JsonSetter("analystOnboardingComplete") - public void setAnalystOnboardingComplete(Boolean analystOnboardingComplete) { - this.analystOnboardingComplete = analystOnboardingComplete; - } - - /** - * Getter for FirstLogin. - * Indicates if the use is logging in for the first time - * @return Returns the Integer - */ - @JsonGetter("firstLogin") - @JsonInclude(JsonInclude.Include.NON_NULL) - public Integer getFirstLogin() { - return firstLogin; - } - - /** - * Setter for FirstLogin. - * Indicates if the use is logging in for the first time - * @param firstLogin Value for Integer - */ - @JsonSetter("firstLogin") - public void setFirstLogin(Integer firstLogin) { - this.firstLogin = firstLogin; - } - - /** - * Getter for WelcomeEmailSent. - * Indicates if the welcome email is sent to email associated with the user account - * @return Returns the Boolean - */ - @JsonGetter("welcomeEmailSent") - @JsonInclude(JsonInclude.Include.NON_NULL) - public Boolean getWelcomeEmailSent() { - return welcomeEmailSent; - } - - /** - * Setter for WelcomeEmailSent. - * Indicates if the welcome email is sent to email associated with the user account - * @param welcomeEmailSent Value for Boolean - */ - @JsonSetter("welcomeEmailSent") - public void setWelcomeEmailSent(Boolean welcomeEmailSent) { - this.welcomeEmailSent = welcomeEmailSent; - } - - /** - * Getter for IsDeleted. - * Indicates if the user account is deleted - * @return Returns the Boolean - */ - @JsonGetter("isDeleted") - @JsonInclude(JsonInclude.Include.NON_NULL) - public Boolean getIsDeleted() { - return isDeleted; - } - - /** - * Setter for IsDeleted. - * Indicates if the user account is deleted - * @param isDeleted Value for Boolean - */ - @JsonSetter("isDeleted") - public void setIsDeleted(Boolean isDeleted) { - this.isDeleted = isDeleted; - } - - /** - * Getter for IsHidden. - * Indicates if the user account is hidden - * @return Returns the Boolean - */ - @JsonGetter("isHidden") - @JsonInclude(JsonInclude.Include.NON_NULL) - public Boolean getIsHidden() { - return isHidden; - } - - /** - * Setter for IsHidden. - * Indicates if the user account is hidden - * @param isHidden Value for Boolean - */ - @JsonSetter("isHidden") - public void setIsHidden(Boolean isHidden) { - this.isHidden = isHidden; - } - - /** - * Getter for IsExternal. - * Indicates if the user account is from external system isDeprecated - * @return Returns the Boolean - */ - @JsonGetter("isExternal") - @JsonInclude(JsonInclude.Include.NON_NULL) - public Boolean getIsExternal() { - return isExternal; - } - - /** - * Setter for IsExternal. - * Indicates if the user account is from external system isDeprecated - * @param isExternal Value for Boolean - */ - @JsonSetter("isExternal") - public void setIsExternal(Boolean isExternal) { - this.isExternal = isExternal; - } - - /** - * Getter for IsDeprecated. - * @return Returns the Boolean - */ - @JsonGetter("isDeprecated") - @JsonInclude(JsonInclude.Include.NON_NULL) - public Boolean getIsDeprecated() { - return isDeprecated; - } - - /** - * Setter for IsDeprecated. - * @param isDeprecated Value for Boolean - */ - @JsonSetter("isDeprecated") - public void setIsDeprecated(Boolean isDeprecated) { - this.isDeprecated = isDeprecated; - } - - /** - * Getter for Complete. - * Indicates if the all the properties of user account is provided - * @return Returns the Boolean - */ - @JsonGetter("complete") - @JsonInclude(JsonInclude.Include.NON_NULL) - public Boolean getComplete() { - return complete; - } - - /** - * Setter for Complete. - * Indicates if the all the properties of user account is provided - * @param complete Value for Boolean - */ - @JsonSetter("complete") - public void setComplete(Boolean complete) { - this.complete = complete; - } - - /** - * Getter for IsSuperUser. - * Indicates if the user account is super user - * @return Returns the Boolean - */ - @JsonGetter("isSuperUser") - @JsonInclude(JsonInclude.Include.NON_NULL) - public Boolean getIsSuperUser() { - return isSuperUser; - } - - /** - * Setter for IsSuperUser. - * Indicates if the user account is super user - * @param isSuperUser Value for Boolean - */ - @JsonSetter("isSuperUser") - public void setIsSuperUser(Boolean isSuperUser) { - this.isSuperUser = isSuperUser; - } - - /** - * Getter for IsSystemPrincipal. - * Indicates if the user account is system principal - * @return Returns the Boolean - */ - @JsonGetter("isSystemPrincipal") - @JsonInclude(JsonInclude.Include.NON_NULL) - public Boolean getIsSystemPrincipal() { - return isSystemPrincipal; - } - - /** - * Setter for IsSystemPrincipal. - * Indicates if the user account is system principal - * @param isSystemPrincipal Value for Boolean - */ - @JsonSetter("isSystemPrincipal") - public void setIsSystemPrincipal(Boolean isSystemPrincipal) { - this.isSystemPrincipal = isSystemPrincipal; - } - - /** - * Getter for Type. - * Indicates the type of user account - * @return Returns the String - */ - @JsonGetter("type") - @JsonInclude(JsonInclude.Include.NON_NULL) - public String getType() { - return type; - } - - /** - * Setter for Type. - * Indicates the type of user account - * @param type Value for String - */ - @JsonSetter("type") - public void setType(String type) { - this.type = type; - } - - /** - * Getter for Parenttype. - * Indicates the type of parent object - * @return Returns the String - */ - @JsonGetter("parenttype") - @JsonInclude(JsonInclude.Include.NON_NULL) - public String getParenttype() { - return parenttype; - } - - /** - * Setter for Parenttype. - * Indicates the type of parent object - * @param parenttype Value for String - */ - @JsonSetter("parenttype") - public void setParenttype(String parenttype) { - this.parenttype = parenttype; - } - - /** - * Getter for TenantId. - * Tenant id associated with the user account - * @return Returns the String - */ - @JsonGetter("tenantId") - @JsonInclude(JsonInclude.Include.NON_NULL) - public String getTenantId() { - return tenantId; - } - - /** - * Setter for TenantId. - * Tenant id associated with the user account - * @param tenantId Value for String - */ - @JsonSetter("tenantId") - public void setTenantId(String tenantId) { - this.tenantId = tenantId; - } - - /** - * Getter for IndexVersion. - * @return Returns the Double - */ - @JsonGetter("indexVersion") - @JsonInclude(JsonInclude.Include.NON_NULL) - public Double getIndexVersion() { - return indexVersion; - } - - /** - * Setter for IndexVersion. - * @param indexVersion Value for Double - */ - @JsonSetter("indexVersion") - public void setIndexVersion(Double indexVersion) { - this.indexVersion = indexVersion; - } - - /** - * Getter for GenerationNum. - * @return Returns the Double - */ - @JsonGetter("generationNum") - @JsonInclude(JsonInclude.Include.NON_NULL) - public Double getGenerationNum() { - return generationNum; - } - - /** - * Setter for GenerationNum. - * @param generationNum Value for Double - */ - @JsonSetter("generationNum") - public void setGenerationNum(Double generationNum) { - this.generationNum = generationNum; - } - - /** - * Getter for Created. - * Date and time when user account was created - * @return Returns the Double - */ - @JsonGetter("created") - @JsonInclude(JsonInclude.Include.NON_NULL) - public Double getCreated() { - return created; - } - - /** - * Setter for Created. - * Date and time when user account was created - * @param created Value for Double - */ - @JsonSetter("created") - public void setCreated(Double created) { - this.created = created; - } - - /** - * Getter for Modified. - * Date and time of last modification of user account - * @return Returns the Double - */ - @JsonGetter("modified") - @JsonInclude(JsonInclude.Include.NON_NULL) - public Double getModified() { - return modified; - } - - /** - * Setter for Modified. - * Date and time of last modification of user account - * @param modified Value for Double - */ - @JsonSetter("modified") - public void setModified(Double modified) { - this.modified = modified; - } - - /** - * Getter for Author. - * @return Returns the UserNameAndID - */ - @JsonGetter("author") - @JsonInclude(JsonInclude.Include.NON_NULL) - public UserNameAndID getAuthor() { - return author; - } - - /** - * Setter for Author. - * @param author Value for UserNameAndID - */ - @JsonSetter("author") - public void setAuthor(UserNameAndID author) { - this.author = author; - } - - /** - * Getter for ModifiedBy. - * @return Returns the UserNameAndID - */ - @JsonGetter("modifiedBy") - @JsonInclude(JsonInclude.Include.NON_NULL) - public UserNameAndID getModifiedBy() { - return modifiedBy; - } - - /** - * Setter for ModifiedBy. - * @param modifiedBy Value for UserNameAndID - */ - @JsonSetter("modifiedBy") - public void setModifiedBy(UserNameAndID modifiedBy) { - this.modifiedBy = modifiedBy; - } - - /** - * Getter for Owner. - * @return Returns the UserNameAndID - */ - @JsonGetter("owner") - @JsonInclude(JsonInclude.Include.NON_NULL) - public UserNameAndID getOwner() { - return owner; - } - - /** - * Setter for Owner. - * @param owner Value for UserNameAndID - */ - @JsonSetter("owner") - public void setOwner(UserNameAndID owner) { - this.owner = owner; - } - - /** - * Converts this UserResponse into string format. - * @return String representation of this class - */ - @Override - public String toString() { - return "UserResponse [" + "name=" + name + ", displayName=" + displayName + ", id=" + id - + ", visibility=" + visibility + ", mail=" + mail + ", groups=" + groups - + ", privileges=" + privileges + ", orgs=" + orgs + ", tags=" + tags + ", state=" - + state + ", notifyOnShare=" + notifyOnShare + ", showWalkMe=" + showWalkMe - + ", analystOnboardingComplete=" + analystOnboardingComplete + ", firstLogin=" - + firstLogin + ", welcomeEmailSent=" + welcomeEmailSent + ", isDeleted=" + isDeleted - + ", isHidden=" + isHidden + ", isExternal=" + isExternal + ", isDeprecated=" - + isDeprecated + ", complete=" + complete + ", isSuperUser=" + isSuperUser - + ", isSystemPrincipal=" + isSystemPrincipal + ", type=" + type + ", parenttype=" - + parenttype + ", tenantId=" + tenantId + ", indexVersion=" + indexVersion - + ", generationNum=" + generationNum + ", created=" + created + ", modified=" - + modified + ", author=" + author + ", modifiedBy=" + modifiedBy + ", owner=" - + owner + "]"; - } - - /** - * Builds a new {@link UserResponse.Builder} object. - * Creates the instance with the state of the current model. - * @return a new {@link UserResponse.Builder} object - */ - public Builder toBuilder() { - Builder builder = new Builder() - .name(getName()) - .displayName(getDisplayName()) - .id(getId()) - .visibility(getVisibility()) - .mail(getMail()) - .groups(getGroups()) - .privileges(getPrivileges()) - .orgs(getOrgs()) - .tags(getTags()) - .state(getState()) - .notifyOnShare(getNotifyOnShare()) - .showWalkMe(getShowWalkMe()) - .analystOnboardingComplete(getAnalystOnboardingComplete()) - .firstLogin(getFirstLogin()) - .welcomeEmailSent(getWelcomeEmailSent()) - .isDeleted(getIsDeleted()) - .isHidden(getIsHidden()) - .isExternal(getIsExternal()) - .isDeprecated(getIsDeprecated()) - .complete(getComplete()) - .isSuperUser(getIsSuperUser()) - .isSystemPrincipal(getIsSystemPrincipal()) - .type(getType()) - .parenttype(getParenttype()) - .tenantId(getTenantId()) - .indexVersion(getIndexVersion()) - .generationNum(getGenerationNum()) - .created(getCreated()) - .modified(getModified()) - .author(getAuthor()) - .modifiedBy(getModifiedBy()) - .owner(getOwner()); - return builder; - } - - /** - * Class to build instances of {@link UserResponse}. - */ - public static class Builder { - private String name; - private String displayName; - private String id; - private String visibility; - private String mail; - private List groups; - private List privileges; - private List orgs; - private List tags; - private String state; - private Boolean notifyOnShare; - private Boolean showWalkMe; - private Boolean analystOnboardingComplete; - private Integer firstLogin; - private Boolean welcomeEmailSent; - private Boolean isDeleted; - private Boolean isHidden; - private Boolean isExternal; - private Boolean isDeprecated; - private Boolean complete; - private Boolean isSuperUser; - private Boolean isSystemPrincipal; - private String type; - private String parenttype; - private String tenantId; - private Double indexVersion; - private Double generationNum; - private Double created; - private Double modified; - private UserNameAndID author; - private UserNameAndID modifiedBy; - private UserNameAndID owner; - - - - /** - * Setter for name. - * @param name String value for name. - * @return Builder - */ - public Builder name(String name) { - this.name = name; - return this; - } - - /** - * Setter for displayName. - * @param displayName String value for displayName. - * @return Builder - */ - public Builder displayName(String displayName) { - this.displayName = displayName; - return this; - } - - /** - * Setter for id. - * @param id String value for id. - * @return Builder - */ - public Builder id(String id) { - this.id = id; - return this; - } - - /** - * Setter for visibility. - * @param visibility String value for visibility. - * @return Builder - */ - public Builder visibility(String visibility) { - this.visibility = visibility; - return this; - } - - /** - * Setter for mail. - * @param mail String value for mail. - * @return Builder - */ - public Builder mail(String mail) { - this.mail = mail; - return this; - } - - /** - * Setter for groups. - * @param groups List of GroupNameAndID value for groups. - * @return Builder - */ - public Builder groups(List groups) { - this.groups = groups; - return this; - } - - /** - * Setter for privileges. - * @param privileges List of String value for privileges. - * @return Builder - */ - public Builder privileges(List privileges) { - this.privileges = privileges; - return this; - } - - /** - * Setter for orgs. - * @param orgs List of OrgType value for orgs. - * @return Builder - */ - public Builder orgs(List orgs) { - this.orgs = orgs; - return this; - } - - /** - * Setter for tags. - * @param tags List of String value for tags. - * @return Builder - */ - public Builder tags(List tags) { - this.tags = tags; - return this; - } - - /** - * Setter for state. - * @param state String value for state. - * @return Builder - */ - public Builder state(String state) { - this.state = state; - return this; - } - - /** - * Setter for notifyOnShare. - * @param notifyOnShare Boolean value for notifyOnShare. - * @return Builder - */ - public Builder notifyOnShare(Boolean notifyOnShare) { - this.notifyOnShare = notifyOnShare; - return this; - } - - /** - * Setter for showWalkMe. - * @param showWalkMe Boolean value for showWalkMe. - * @return Builder - */ - public Builder showWalkMe(Boolean showWalkMe) { - this.showWalkMe = showWalkMe; - return this; - } - - /** - * Setter for analystOnboardingComplete. - * @param analystOnboardingComplete Boolean value for analystOnboardingComplete. - * @return Builder - */ - public Builder analystOnboardingComplete(Boolean analystOnboardingComplete) { - this.analystOnboardingComplete = analystOnboardingComplete; - return this; - } - - /** - * Setter for firstLogin. - * @param firstLogin Integer value for firstLogin. - * @return Builder - */ - public Builder firstLogin(Integer firstLogin) { - this.firstLogin = firstLogin; - return this; - } - - /** - * Setter for welcomeEmailSent. - * @param welcomeEmailSent Boolean value for welcomeEmailSent. - * @return Builder - */ - public Builder welcomeEmailSent(Boolean welcomeEmailSent) { - this.welcomeEmailSent = welcomeEmailSent; - return this; - } - - /** - * Setter for isDeleted. - * @param isDeleted Boolean value for isDeleted. - * @return Builder - */ - public Builder isDeleted(Boolean isDeleted) { - this.isDeleted = isDeleted; - return this; - } - - /** - * Setter for isHidden. - * @param isHidden Boolean value for isHidden. - * @return Builder - */ - public Builder isHidden(Boolean isHidden) { - this.isHidden = isHidden; - return this; - } - - /** - * Setter for isExternal. - * @param isExternal Boolean value for isExternal. - * @return Builder - */ - public Builder isExternal(Boolean isExternal) { - this.isExternal = isExternal; - return this; - } - - /** - * Setter for isDeprecated. - * @param isDeprecated Boolean value for isDeprecated. - * @return Builder - */ - public Builder isDeprecated(Boolean isDeprecated) { - this.isDeprecated = isDeprecated; - return this; - } - - /** - * Setter for complete. - * @param complete Boolean value for complete. - * @return Builder - */ - public Builder complete(Boolean complete) { - this.complete = complete; - return this; - } - - /** - * Setter for isSuperUser. - * @param isSuperUser Boolean value for isSuperUser. - * @return Builder - */ - public Builder isSuperUser(Boolean isSuperUser) { - this.isSuperUser = isSuperUser; - return this; - } - - /** - * Setter for isSystemPrincipal. - * @param isSystemPrincipal Boolean value for isSystemPrincipal. - * @return Builder - */ - public Builder isSystemPrincipal(Boolean isSystemPrincipal) { - this.isSystemPrincipal = isSystemPrincipal; - return this; - } - - /** - * Setter for type. - * @param type String value for type. - * @return Builder - */ - public Builder type(String type) { - this.type = type; - return this; - } - - /** - * Setter for parenttype. - * @param parenttype String value for parenttype. - * @return Builder - */ - public Builder parenttype(String parenttype) { - this.parenttype = parenttype; - return this; - } - - /** - * Setter for tenantId. - * @param tenantId String value for tenantId. - * @return Builder - */ - public Builder tenantId(String tenantId) { - this.tenantId = tenantId; - return this; - } - - /** - * Setter for indexVersion. - * @param indexVersion Double value for indexVersion. - * @return Builder - */ - public Builder indexVersion(Double indexVersion) { - this.indexVersion = indexVersion; - return this; - } - - /** - * Setter for generationNum. - * @param generationNum Double value for generationNum. - * @return Builder - */ - public Builder generationNum(Double generationNum) { - this.generationNum = generationNum; - return this; - } - - /** - * Setter for created. - * @param created Double value for created. - * @return Builder - */ - public Builder created(Double created) { - this.created = created; - return this; - } - - /** - * Setter for modified. - * @param modified Double value for modified. - * @return Builder - */ - public Builder modified(Double modified) { - this.modified = modified; - return this; - } - - /** - * Setter for author. - * @param author UserNameAndID value for author. - * @return Builder - */ - public Builder author(UserNameAndID author) { - this.author = author; - return this; - } - - /** - * Setter for modifiedBy. - * @param modifiedBy UserNameAndID value for modifiedBy. - * @return Builder - */ - public Builder modifiedBy(UserNameAndID modifiedBy) { - this.modifiedBy = modifiedBy; - return this; - } - - /** - * Setter for owner. - * @param owner UserNameAndID value for owner. - * @return Builder - */ - public Builder owner(UserNameAndID owner) { - this.owner = owner; - return this; - } - - /** - * Builds a new {@link UserResponse} object using the set fields. - * @return {@link UserResponse} - */ - public UserResponse build() { - return new UserResponse(name, displayName, id, visibility, mail, groups, privileges, - orgs, tags, state, notifyOnShare, showWalkMe, analystOnboardingComplete, - firstLogin, welcomeEmailSent, isDeleted, isHidden, isExternal, isDeprecated, - complete, isSuperUser, isSystemPrincipal, type, parenttype, tenantId, - indexVersion, generationNum, created, modified, author, modifiedBy, owner); - } - } -} diff --git a/Java/src/main/java/localhost/models/Visibility1Enum.java b/Java/src/main/java/localhost/models/Visibility1Enum.java deleted file mode 100644 index 3f5280035..000000000 --- a/Java/src/main/java/localhost/models/Visibility1Enum.java +++ /dev/null @@ -1,79 +0,0 @@ -/* - * ThoughtSpotPublicRESTAPILib - * - * This file was automatically generated by APIMATIC v3.0 ( https://www.apimatic.io ). - */ - -package localhost.models; - -import java.util.ArrayList; -import java.util.List; -import java.util.TreeMap; - -/** - * Visibility1Enum to be used. - */ -public enum Visibility1Enum { - DEFAULT, - - NON_SHARABLE, - - SHARABLE; - - - private static TreeMap valueMap = new TreeMap<>(); - private String value; - - static { - DEFAULT.value = "DEFAULT"; - NON_SHARABLE.value = "NON_SHARABLE"; - SHARABLE.value = "SHARABLE"; - - valueMap.put("DEFAULT", DEFAULT); - valueMap.put("NON_SHARABLE", NON_SHARABLE); - valueMap.put("SHARABLE", SHARABLE); - } - - /** - * Returns the enum member associated with the given string value. - * @param toConvert String value to get enum member. - * @return The enum member against the given string value. - */ - @com.fasterxml.jackson.annotation.JsonCreator - public static Visibility1Enum fromString(String toConvert) { - return valueMap.get(toConvert); - } - - /** - * Returns the string value associated with the enum member. - * @return The string value against enum member. - */ - @com.fasterxml.jackson.annotation.JsonValue - public String value() { - return value; - } - - /** - * Get string representation of this enum. - */ - @Override - public String toString() { - return value.toString(); - } - - /** - * Convert list of Visibility1Enum values to list of string values. - * @param toConvert The list of Visibility1Enum values to convert. - * @return List of representative string values. - */ - public static List toValue(List toConvert) { - if (toConvert == null) { - return null; - } - List convertedValues = new ArrayList<>(); - for (Visibility1Enum enumValue : toConvert) { - convertedValues.add(enumValue.value); - } - return convertedValues; - } -} \ No newline at end of file diff --git a/Java/src/main/java/localhost/models/Visibility2Enum.java b/Java/src/main/java/localhost/models/Visibility2Enum.java deleted file mode 100644 index 9b705e9e0..000000000 --- a/Java/src/main/java/localhost/models/Visibility2Enum.java +++ /dev/null @@ -1,79 +0,0 @@ -/* - * ThoughtSpotPublicRESTAPILib - * - * This file was automatically generated by APIMATIC v3.0 ( https://www.apimatic.io ). - */ - -package localhost.models; - -import java.util.ArrayList; -import java.util.List; -import java.util.TreeMap; - -/** - * Visibility2Enum to be used. - */ -public enum Visibility2Enum { - DEFAULT, - - NON_SHARABLE, - - SHARABLE; - - - private static TreeMap valueMap = new TreeMap<>(); - private String value; - - static { - DEFAULT.value = "DEFAULT"; - NON_SHARABLE.value = "NON_SHARABLE"; - SHARABLE.value = "SHARABLE"; - - valueMap.put("DEFAULT", DEFAULT); - valueMap.put("NON_SHARABLE", NON_SHARABLE); - valueMap.put("SHARABLE", SHARABLE); - } - - /** - * Returns the enum member associated with the given string value. - * @param toConvert String value to get enum member. - * @return The enum member against the given string value. - */ - @com.fasterxml.jackson.annotation.JsonCreator - public static Visibility2Enum fromString(String toConvert) { - return valueMap.get(toConvert); - } - - /** - * Returns the string value associated with the enum member. - * @return The string value against enum member. - */ - @com.fasterxml.jackson.annotation.JsonValue - public String value() { - return value; - } - - /** - * Get string representation of this enum. - */ - @Override - public String toString() { - return value.toString(); - } - - /** - * Convert list of Visibility2Enum values to list of string values. - * @param toConvert The list of Visibility2Enum values to convert. - * @return List of representative string values. - */ - public static List toValue(List toConvert) { - if (toConvert == null) { - return null; - } - List convertedValues = new ArrayList<>(); - for (Visibility2Enum enumValue : toConvert) { - convertedValues.add(enumValue.value); - } - return convertedValues; - } -} \ No newline at end of file diff --git a/Java/src/main/java/localhost/models/VisibilityEnum.java b/Java/src/main/java/localhost/models/VisibilityEnum.java deleted file mode 100644 index 1159c340d..000000000 --- a/Java/src/main/java/localhost/models/VisibilityEnum.java +++ /dev/null @@ -1,79 +0,0 @@ -/* - * ThoughtSpotPublicRESTAPILib - * - * This file was automatically generated by APIMATIC v3.0 ( https://www.apimatic.io ). - */ - -package localhost.models; - -import java.util.ArrayList; -import java.util.List; -import java.util.TreeMap; - -/** - * VisibilityEnum to be used. - */ -public enum VisibilityEnum { - DEFAULT, - - NON_SHARABLE, - - SHARABLE; - - - private static TreeMap valueMap = new TreeMap<>(); - private String value; - - static { - DEFAULT.value = "DEFAULT"; - NON_SHARABLE.value = "NON_SHARABLE"; - SHARABLE.value = "SHARABLE"; - - valueMap.put("DEFAULT", DEFAULT); - valueMap.put("NON_SHARABLE", NON_SHARABLE); - valueMap.put("SHARABLE", SHARABLE); - } - - /** - * Returns the enum member associated with the given string value. - * @param toConvert String value to get enum member. - * @return The enum member against the given string value. - */ - @com.fasterxml.jackson.annotation.JsonCreator - public static VisibilityEnum fromString(String toConvert) { - return valueMap.get(toConvert); - } - - /** - * Returns the string value associated with the enum member. - * @return The string value against enum member. - */ - @com.fasterxml.jackson.annotation.JsonValue - public String value() { - return value; - } - - /** - * Get string representation of this enum. - */ - @Override - public String toString() { - return value.toString(); - } - - /** - * Convert list of VisibilityEnum values to list of string values. - * @param toConvert The list of VisibilityEnum values to convert. - * @return List of representative string values. - */ - public static List toValue(List toConvert) { - if (toConvert == null) { - return null; - } - List convertedValues = new ArrayList<>(); - for (VisibilityEnum enumValue : toConvert) { - convertedValues.add(enumValue.value); - } - return convertedValues; - } -} \ No newline at end of file diff --git a/Java/src/main/java/localhost/models/VizType.java b/Java/src/main/java/localhost/models/VizType.java deleted file mode 100644 index 1d61740f5..000000000 --- a/Java/src/main/java/localhost/models/VizType.java +++ /dev/null @@ -1,176 +0,0 @@ -/* - * ThoughtSpotPublicRESTAPILib - * - * This file was automatically generated by APIMATIC v3.0 ( https://www.apimatic.io ). - */ - -package localhost.models; - -import com.fasterxml.jackson.annotation.JsonGetter; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonSetter; -import io.apimatic.core.types.BaseModel; - -/** - * This is a model class for VizType type. - */ -public class VizType { - private String name; - private String id; - private String querySql; - - /** - * Default constructor. - */ - public VizType() { - } - - /** - * Initialization constructor. - * @param name String value for name. - * @param id String value for id. - * @param querySql String value for querySql. - */ - public VizType( - String name, - String id, - String querySql) { - this.name = name; - this.id = id; - this.querySql = querySql; - } - - /** - * Getter for Name. - * The name of the visualization - * @return Returns the String - */ - @JsonGetter("name") - @JsonInclude(JsonInclude.Include.NON_NULL) - public String getName() { - return name; - } - - /** - * Setter for Name. - * The name of the visualization - * @param name Value for String - */ - @JsonSetter("name") - public void setName(String name) { - this.name = name; - } - - /** - * Getter for Id. - * The GUID of the visualization - * @return Returns the String - */ - @JsonGetter("id") - @JsonInclude(JsonInclude.Include.NON_NULL) - public String getId() { - return id; - } - - /** - * Setter for Id. - * The GUID of the visualization - * @param id Value for String - */ - @JsonSetter("id") - public void setId(String id) { - this.id = id; - } - - /** - * Getter for QuerySql. - * SQL query associated with the visualization - * @return Returns the String - */ - @JsonGetter("querySql") - @JsonInclude(JsonInclude.Include.NON_NULL) - public String getQuerySql() { - return querySql; - } - - /** - * Setter for QuerySql. - * SQL query associated with the visualization - * @param querySql Value for String - */ - @JsonSetter("querySql") - public void setQuerySql(String querySql) { - this.querySql = querySql; - } - - /** - * Converts this VizType into string format. - * @return String representation of this class - */ - @Override - public String toString() { - return "VizType [" + "name=" + name + ", id=" + id + ", querySql=" + querySql + "]"; - } - - /** - * Builds a new {@link VizType.Builder} object. - * Creates the instance with the state of the current model. - * @return a new {@link VizType.Builder} object - */ - public Builder toBuilder() { - Builder builder = new Builder() - .name(getName()) - .id(getId()) - .querySql(getQuerySql()); - return builder; - } - - /** - * Class to build instances of {@link VizType}. - */ - public static class Builder { - private String name; - private String id; - private String querySql; - - - - /** - * Setter for name. - * @param name String value for name. - * @return Builder - */ - public Builder name(String name) { - this.name = name; - return this; - } - - /** - * Setter for id. - * @param id String value for id. - * @return Builder - */ - public Builder id(String id) { - this.id = id; - return this; - } - - /** - * Setter for querySql. - * @param querySql String value for querySql. - * @return Builder - */ - public Builder querySql(String querySql) { - this.querySql = querySql; - return this; - } - - /** - * Builds a new {@link VizType} object using the set fields. - * @return {@link VizType} - */ - public VizType build() { - return new VizType(name, id, querySql); - } - } -} diff --git a/Java/src/main/java/localhost/utilities/FileWrapper.java b/Java/src/main/java/localhost/utilities/FileWrapper.java deleted file mode 100644 index fb6d75f3c..000000000 --- a/Java/src/main/java/localhost/utilities/FileWrapper.java +++ /dev/null @@ -1,56 +0,0 @@ -/* - * ThoughtSpotPublicRESTAPILib - * - * This file was automatically generated by APIMATIC v3.0 ( https://www.apimatic.io ). - */ - -package localhost.utilities; - -import com.fasterxml.jackson.annotation.JsonInclude; -import java.io.File; -import io.apimatic.coreinterfaces.type.CoreFileWrapper; - -/** - * Class to wrap file and contentType to be sent as part of a HTTP request. - */ -public class FileWrapper implements CoreFileWrapper { - - @JsonInclude(JsonInclude.Include.NON_NULL) - private File file; - @JsonInclude(JsonInclude.Include.NON_NULL) - private String contentType; - - /** - * Initialization constructor. - * @param file File object to be wrapped - * @param contentType content type of file - */ - public FileWrapper(File file, String contentType) { - this.file = file; - this.contentType = contentType; - } - - /** - * Initialization constructor. - * @param file File object to be wrapped - */ - public FileWrapper(File file) { - this.file = file; - } - - /** - * Getter for file. - * @return File instance - */ - public File getFile() { - return file; - } - - /** - * Getter for content type. - * @return content type of the file - */ - public String getContentType() { - return contentType; - } -} diff --git a/Java/src/test/java/localhost/controllers/BaseControllerTest.java b/Java/src/test/java/localhost/controllers/BaseControllerTest.java deleted file mode 100644 index 99963ef27..000000000 --- a/Java/src/test/java/localhost/controllers/BaseControllerTest.java +++ /dev/null @@ -1,97 +0,0 @@ -/* - * ThoughtSpotPublicRESTAPILib - * - * This file was automatically generated by APIMATIC v3.0 ( https://www.apimatic.io ). - */ - -package localhost.controllers; - -import localhost.Environment; -import localhost.ThoughtSpotPublicRESTAPIClient; -import localhost.testing.HttpCallbackCatcher; -import org.junit.AfterClass; -import org.junit.BeforeClass; -import org.junit.Rule; -import org.junit.rules.Timeout; - -/** - * Base class for all test cases. - */ -public class BaseControllerTest { - /** - * Test configuration. - */ - public static final int REQUEST_TIMEOUT = 30; - - public static final double ASSERT_PRECISION = 0.01; - - /** - * Global rules for tests. - */ - @Rule - public Timeout globalTimeout = Timeout.seconds(REQUEST_TIMEOUT); - - /** - * Test fixtures, - * Used to serve as HttpCallback and to capture request & response. - */ - - protected static HttpCallbackCatcher httpResponse; - - /** - * Setup test. - */ - @BeforeClass - public static void setUp() throws Exception { - httpResponse = new HttpCallbackCatcher(); - } - - /** - * Tear down test. - */ - @AfterClass - public static void tearDown() throws Exception { - httpResponse = null; - } - - /** - * Create test configuration from Environment variables. - */ - protected static ThoughtSpotPublicRESTAPIClient createConfigurationFromEnvironment() { - ThoughtSpotPublicRESTAPIClient.Builder builder = - new ThoughtSpotPublicRESTAPIClient.Builder(); - - final String environment = System.getenv("THOUGHT_SPOT_PUBLIC_RESTAPI_LIB_ENVIRONMENT"); - final String baseUrl = System.getenv("THOUGHT_SPOT_PUBLIC_RESTAPI_LIB_BASE_URL"); - final String timeout = System.getenv("THOUGHT_SPOT_PUBLIC_RESTAPI_LIB_TIMEOUT"); - final String accessToken = System.getenv("THOUGHT_SPOT_PUBLIC_RESTAPI_LIB_ACCESS_TOKEN"); - - if (accessToken != null) { - builder.accessToken(accessToken); - } - if (environment != null) { - builder.environment(Environment.fromString(environment)); - } - if (baseUrl != null) { - builder.baseUrl(baseUrl); - } - if (timeout != null) { - builder.httpClientConfig(configBuilder -> configBuilder.timeout( - Long.parseLong(timeout))); - } - return builder.build(); - } - - - /** - * Create test configuration. - */ - protected static ThoughtSpotPublicRESTAPIClient createConfiguration() { - // Set Configuration parameters for test execution - ThoughtSpotPublicRESTAPIClient config = createConfigurationFromEnvironment(); - config = config.newBuilder() - .httpCallback(httpResponse) - .build(); - return config; - } -} diff --git a/Java/src/test/java/localhost/controllers/GroupControllerTest.java b/Java/src/test/java/localhost/controllers/GroupControllerTest.java deleted file mode 100644 index 0de0d7002..000000000 --- a/Java/src/test/java/localhost/controllers/GroupControllerTest.java +++ /dev/null @@ -1,120 +0,0 @@ -/* - * ThoughtSpotPublicRESTAPILib - * - * This file was automatically generated by APIMATIC v3.0 ( https://www.apimatic.io ). - */ - -package localhost.controllers; - -import static org.junit.Assert.assertEquals; -import static org.junit.Assert.assertNotNull; -import static org.junit.Assert.assertTrue; - -import io.apimatic.core.testing.TestHelper; -import java.util.LinkedHashMap; -import java.util.Map; -import localhost.ThoughtSpotPublicRESTAPIClient; -import localhost.exceptions.ApiException; -import org.junit.AfterClass; -import org.junit.BeforeClass; -import org.junit.Test; - -public class GroupControllerTest extends BaseControllerTest { - - /** - * Client instance. - */ - private static ThoughtSpotPublicRESTAPIClient client; - - /** - * Controller instance (for all tests). - */ - private static GroupController controller; - - /** - * Setup test class. - */ - @BeforeClass - public static void setUpClass() { - client = createConfiguration(); - controller = client.getGroupController(); - } - - /** - * Tear down test class. - */ - @AfterClass - public static void tearDownClass() { - controller = null; - } - - /** - * To get the details of a specific group by name or id, use this endpoint. At Least one value - * needed. When both are given id will be considered to fetch user information. - * @throws Throwable exception if occurs. - */ - @Test - public void testTestRestapiV2GetGroup() throws Exception { - // Parameters for the API call - String name = null; - String id = null; - - // Set callback and perform API call - try { - controller.restapiV2GetGroup(name, id); - } catch (ApiException e) { - // Empty block - } - - // Test whether the response is null - assertNotNull("Response is null", - httpResponse.getResponse()); - // Test response code - assertEquals("Status is not 200", - 200, httpResponse.getResponse().getStatusCode()); - - // Test headers - Map headers = new LinkedHashMap(); - headers.put("Content-Type", "application/json"); - - assertTrue("Headers do not match", TestHelper.areHeadersProperSubsetOf( - headers, httpResponse.getResponse().getHeaders().asSimpleMap(), true)); - - } - - /** - * To remove a group from the ThoughtSpot system, send a DELETE request to this endpoint. At - * Least one value needed. When both are given user id will be considered to fetch user - * information. - * @throws Throwable exception if occurs. - */ - @Test - public void testTestRestapiV2DeleteGroup() throws Exception { - // Parameters for the API call - String name = null; - String id = null; - - // Set callback and perform API call - try { - controller.restapiV2DeleteGroup(name, id); - } catch (ApiException e) { - // Empty block - } - - // Test whether the response is null - assertNotNull("Response is null", - httpResponse.getResponse()); - // Test response code - assertEquals("Status is not 200", - 200, httpResponse.getResponse().getStatusCode()); - - // Test headers - Map headers = new LinkedHashMap(); - headers.put("Content-Type", "application/json"); - - assertTrue("Headers do not match", TestHelper.areHeadersProperSubsetOf( - headers, httpResponse.getResponse().getHeaders().asSimpleMap(), true)); - - } - -} diff --git a/Java/src/test/java/localhost/controllers/MetadataControllerTest.java b/Java/src/test/java/localhost/controllers/MetadataControllerTest.java deleted file mode 100644 index ec7d97e3c..000000000 --- a/Java/src/test/java/localhost/controllers/MetadataControllerTest.java +++ /dev/null @@ -1,155 +0,0 @@ -/* - * ThoughtSpotPublicRESTAPILib - * - * This file was automatically generated by APIMATIC v3.0 ( https://www.apimatic.io ). - */ - -package localhost.controllers; - -import static org.junit.Assert.assertEquals; -import static org.junit.Assert.assertNotNull; -import static org.junit.Assert.assertTrue; - -import io.apimatic.core.testing.TestHelper; -import java.util.LinkedHashMap; -import java.util.List; -import java.util.Map; -import localhost.ThoughtSpotPublicRESTAPIClient; -import localhost.exceptions.ApiException; -import org.junit.AfterClass; -import org.junit.BeforeClass; -import org.junit.Test; - -public class MetadataControllerTest extends BaseControllerTest { - - /** - * Client instance. - */ - private static ThoughtSpotPublicRESTAPIClient client; - - /** - * Controller instance (for all tests). - */ - private static MetadataController controller; - - /** - * Setup test class. - */ - @BeforeClass - public static void setUpClass() { - client = createConfiguration(); - controller = client.getMetadataController(); - } - - /** - * Tear down test class. - */ - @AfterClass - public static void tearDownClass() { - controller = null; - } - - /** - * To get details of a specific tag, use this endpoint. At least one of id or name of tag is - * required. When both are given, then id will be considered. - * @throws Throwable exception if occurs. - */ - @Test - public void testTestRestapiV2GetTag() throws Exception { - // Parameters for the API call - String name = null; - String id = null; - - // Set callback and perform API call - try { - controller.restapiV2GetTag(name, id); - } catch (ApiException e) { - // Empty block - } - - // Test whether the response is null - assertNotNull("Response is null", - httpResponse.getResponse()); - // Test response code - assertEquals("Status is not 200", - 200, httpResponse.getResponse().getStatusCode()); - - // Test headers - Map headers = new LinkedHashMap(); - headers.put("Content-Type", "application/json"); - - assertTrue("Headers do not match", TestHelper.areHeadersProperSubsetOf( - headers, httpResponse.getResponse().getHeaders().asSimpleMap(), true)); - - } - - /** - * To get the name and id of liveboard that is set as a home liveboard for a user, use this - * endpoint. At least one of user id or username is required. When both are given, then id will - * be considered. - * @throws Throwable exception if occurs. - */ - @Test - public void testTestRestapiV2GetHomeLiveboard() throws Exception { - // Parameters for the API call - String userName = null; - String userId = null; - - // Set callback and perform API call - try { - controller.restapiV2GetHomeLiveboard(userName, userId); - } catch (ApiException e) { - // Empty block - } - - // Test whether the response is null - assertNotNull("Response is null", - httpResponse.getResponse()); - // Test response code - assertEquals("Status is not 200", - 200, httpResponse.getResponse().getStatusCode()); - - // Test headers - Map headers = new LinkedHashMap(); - headers.put("Content-Type", "application/json"); - - assertTrue("Headers do not match", TestHelper.areHeadersProperSubsetOf( - headers, httpResponse.getResponse().getHeaders().asSimpleMap(), true)); - - } - - /** - * To programmatically delete tags, use this endpoint. At least one of id or name of tag is - * required. When both are given, then id will be considered. - * @throws Throwable exception if occurs. - */ - @Test - public void testTestRestapiV2DeleteTag() throws Exception { - // Parameters for the API call - String name = null; - String id = null; - - // Set callback and perform API call - try { - controller.restapiV2DeleteTag(name, id); - } catch (ApiException e) { - // Empty block - } - - // Test whether the response is null - assertNotNull("Response is null", - httpResponse.getResponse()); - // Test response code - assertEquals("Status is not 200", - 200, httpResponse.getResponse().getStatusCode()); - - // Test headers - Map headers = new LinkedHashMap(); - headers.put("Content-Type", "application/json"); - - assertTrue("Headers do not match", TestHelper.areHeadersProperSubsetOf( - headers, httpResponse.getResponse().getHeaders().asSimpleMap(), true)); - - } - -} diff --git a/Java/src/test/java/localhost/controllers/OrgControllerTest.java b/Java/src/test/java/localhost/controllers/OrgControllerTest.java deleted file mode 100644 index 4f746b12f..000000000 --- a/Java/src/test/java/localhost/controllers/OrgControllerTest.java +++ /dev/null @@ -1,122 +0,0 @@ -/* - * ThoughtSpotPublicRESTAPILib - * - * This file was automatically generated by APIMATIC v3.0 ( https://www.apimatic.io ). - */ - -package localhost.controllers; - -import static org.junit.Assert.assertEquals; -import static org.junit.Assert.assertNotNull; -import static org.junit.Assert.assertTrue; - -import io.apimatic.core.testing.TestHelper; -import java.util.LinkedHashMap; -import java.util.List; -import java.util.Map; -import localhost.ThoughtSpotPublicRESTAPIClient; -import localhost.exceptions.ApiException; -import org.junit.AfterClass; -import org.junit.BeforeClass; -import org.junit.Test; - -public class OrgControllerTest extends BaseControllerTest { - - /** - * Client instance. - */ - private static ThoughtSpotPublicRESTAPIClient client; - - /** - * Controller instance (for all tests). - */ - private static OrgController controller; - - /** - * Setup test class. - */ - @BeforeClass - public static void setUpClass() { - client = createConfiguration(); - controller = client.getOrgController(); - } - - /** - * Tear down test class. - */ - @AfterClass - public static void tearDownClass() { - controller = null; - } - - /** - * To get the details of a specific organization by name or id, use this endpoint. At least one - * value needed. When both are given,then id will be considered to fetch organization - * information. Requires Administration privilege for tenant. - * @throws Throwable exception if occurs. - */ - @Test - public void testTestRestapiV2GetOrg() throws Exception { - // Parameters for the API call - String name = null; - Integer id = null; - - // Set callback and perform API call - try { - controller.restapiV2GetOrg(name, id); - } catch (ApiException e) { - // Empty block - } - - // Test whether the response is null - assertNotNull("Response is null", - httpResponse.getResponse()); - // Test response code - assertEquals("Status is not 200", - 200, httpResponse.getResponse().getStatusCode()); - - // Test headers - Map headers = new LinkedHashMap(); - headers.put("Content-Type", "application/json"); - - assertTrue("Headers do not match", TestHelper.areHeadersProperSubsetOf( - headers, httpResponse.getResponse().getHeaders().asSimpleMap(), true)); - - } - - /** - * To remove an organization from the ThoughtSpot system, send a DELETE request to this - * endpoint. At least one value is needed. When both id and name are given, then id will be - * considered. Requires Administration privilege for tenant. - * @throws Throwable exception if occurs. - */ - @Test - public void testTestRestapiV2DeleteOrg() throws Exception { - // Parameters for the API call - String name = null; - Integer id = null; - - // Set callback and perform API call - try { - controller.restapiV2DeleteOrg(name, id); - } catch (ApiException e) { - // Empty block - } - - // Test whether the response is null - assertNotNull("Response is null", - httpResponse.getResponse()); - // Test response code - assertEquals("Status is not 200", - 200, httpResponse.getResponse().getStatusCode()); - - // Test headers - Map headers = new LinkedHashMap(); - headers.put("Content-Type", "application/json"); - - assertTrue("Headers do not match", TestHelper.areHeadersProperSubsetOf( - headers, httpResponse.getResponse().getHeaders().asSimpleMap(), true)); - - } - -} diff --git a/Java/src/test/java/localhost/controllers/SecurityControllerTest.java b/Java/src/test/java/localhost/controllers/SecurityControllerTest.java deleted file mode 100644 index 507a16b18..000000000 --- a/Java/src/test/java/localhost/controllers/SecurityControllerTest.java +++ /dev/null @@ -1,87 +0,0 @@ -/* - * ThoughtSpotPublicRESTAPILib - * - * This file was automatically generated by APIMATIC v3.0 ( https://www.apimatic.io ). - */ - -package localhost.controllers; - -import static org.junit.Assert.assertEquals; -import static org.junit.Assert.assertNotNull; -import static org.junit.Assert.assertTrue; - -import io.apimatic.core.testing.TestHelper; -import java.util.LinkedHashMap; -import java.util.List; -import java.util.Map; -import localhost.ThoughtSpotPublicRESTAPIClient; -import localhost.exceptions.ApiException; -import org.junit.AfterClass; -import org.junit.BeforeClass; -import org.junit.Test; - -public class SecurityControllerTest extends BaseControllerTest { - - /** - * Client instance. - */ - private static ThoughtSpotPublicRESTAPIClient client; - - /** - * Controller instance (for all tests). - */ - private static SecurityController controller; - - /** - * Setup test class. - */ - @BeforeClass - public static void setUpClass() { - client = createConfiguration(); - controller = client.getSecurityController(); - } - - /** - * Tear down test class. - */ - @AfterClass - public static void tearDownClass() { - controller = null; - } - - /** - * Use this endpoint to list the objects on which a user or user group has permission. The - * response will include only those objects on which the user or user group has either VIEW OR - * MODIFY permission. Requires administration privilege. - * @throws Throwable exception if occurs. - */ - @Test - public void testTestRestapiV2GetPermissionForPrincipal() throws Exception { - // Parameters for the API call - String id = null; - String name = null; - - // Set callback and perform API call - try { - controller.restapiV2GetPermissionForPrincipal(id, name); - } catch (ApiException e) { - // Empty block - } - - // Test whether the response is null - assertNotNull("Response is null", - httpResponse.getResponse()); - // Test response code - assertEquals("Status is not 200", - 200, httpResponse.getResponse().getStatusCode()); - - // Test headers - Map headers = new LinkedHashMap(); - headers.put("Content-Type", "application/json"); - - assertTrue("Headers do not match", TestHelper.areHeadersProperSubsetOf( - headers, httpResponse.getResponse().getHeaders().asSimpleMap(), true)); - - } - -} diff --git a/Java/src/test/java/localhost/controllers/SessionControllerTest.java b/Java/src/test/java/localhost/controllers/SessionControllerTest.java deleted file mode 100644 index 15b46c9a6..000000000 --- a/Java/src/test/java/localhost/controllers/SessionControllerTest.java +++ /dev/null @@ -1,89 +0,0 @@ -/* - * ThoughtSpotPublicRESTAPILib - * - * This file was automatically generated by APIMATIC v3.0 ( https://www.apimatic.io ). - */ - -package localhost.controllers; - -import static org.junit.Assert.assertEquals; -import static org.junit.Assert.assertNotNull; -import static org.junit.Assert.assertTrue; - -import io.apimatic.core.testing.TestHelper; -import java.util.LinkedHashMap; -import java.util.Map; -import localhost.ThoughtSpotPublicRESTAPIClient; -import localhost.exceptions.ApiException; -import org.junit.AfterClass; -import org.junit.BeforeClass; -import org.junit.Test; - -public class SessionControllerTest extends BaseControllerTest { - - /** - * Client instance. - */ - private static ThoughtSpotPublicRESTAPIClient client; - - /** - * Controller instance (for all tests). - */ - private static SessionController controller; - - /** - * Setup test class. - */ - @BeforeClass - public static void setUpClass() { - client = createConfiguration(); - controller = client.getSessionController(); - } - - /** - * Tear down test class. - */ - @AfterClass - public static void tearDownClass() { - controller = null; - } - - /** - * You can programmatically create login session for a user in ThoughtSpot using this endpoint. - * You can create session by either providing userName and password as inputs in this request - * body or by including "Authorization" header with the token generated through the endpoint - * /tspublic/rest/v2/session/gettoken. userName and password input is given precedence over - * "Authorization" header, when both are included in the request. - * @throws Throwable exception if occurs. - */ - @Test - public void testTestRestapiV2Login() throws Exception { - // Parameters for the API call - String userName = null; - String password = null; - Boolean rememberMe = null; - - // Set callback and perform API call - try { - controller.restapiV2Login(userName, password, rememberMe); - } catch (ApiException e) { - // Empty block - } - - // Test whether the response is null - assertNotNull("Response is null", - httpResponse.getResponse()); - // Test response code - assertEquals("Status is not 200", - 200, httpResponse.getResponse().getStatusCode()); - - // Test headers - Map headers = new LinkedHashMap(); - headers.put("Content-Type", "application/json"); - - assertTrue("Headers do not match", TestHelper.areHeadersProperSubsetOf( - headers, httpResponse.getResponse().getHeaders().asSimpleMap(), true)); - - } - -} diff --git a/Java/src/test/java/localhost/controllers/UserControllerTest.java b/Java/src/test/java/localhost/controllers/UserControllerTest.java deleted file mode 100644 index 556e8c501..000000000 --- a/Java/src/test/java/localhost/controllers/UserControllerTest.java +++ /dev/null @@ -1,122 +0,0 @@ -/* - * ThoughtSpotPublicRESTAPILib - * - * This file was automatically generated by APIMATIC v3.0 ( https://www.apimatic.io ). - */ - -package localhost.controllers; - -import static org.junit.Assert.assertEquals; -import static org.junit.Assert.assertNotNull; -import static org.junit.Assert.assertTrue; - -import io.apimatic.core.testing.TestHelper; -import java.util.LinkedHashMap; -import java.util.List; -import java.util.Map; -import localhost.ThoughtSpotPublicRESTAPIClient; -import localhost.exceptions.ApiException; -import org.junit.AfterClass; -import org.junit.BeforeClass; -import org.junit.Test; - -public class UserControllerTest extends BaseControllerTest { - - /** - * Client instance. - */ - private static ThoughtSpotPublicRESTAPIClient client; - - /** - * Controller instance (for all tests). - */ - private static UserController controller; - - /** - * Setup test class. - */ - @BeforeClass - public static void setUpClass() { - client = createConfiguration(); - controller = client.getUserController(); - } - - /** - * Tear down test class. - */ - @AfterClass - public static void tearDownClass() { - controller = null; - } - - /** - * To get the details of a specific user account by username or user id, use this endpoint. At - * Least one value is needed. When both are given, user id will be considered to fetch user - * information. - * @throws Throwable exception if occurs. - */ - @Test - public void testTestRestapiV2GetUser() throws Exception { - // Parameters for the API call - String name = null; - String id = null; - - // Set callback and perform API call - try { - controller.restapiV2GetUser(name, id); - } catch (ApiException e) { - // Empty block - } - - // Test whether the response is null - assertNotNull("Response is null", - httpResponse.getResponse()); - // Test response code - assertEquals("Status is not 200", - 200, httpResponse.getResponse().getStatusCode()); - - // Test headers - Map headers = new LinkedHashMap(); - headers.put("Content-Type", "application/json"); - - assertTrue("Headers do not match", TestHelper.areHeadersProperSubsetOf( - headers, httpResponse.getResponse().getHeaders().asSimpleMap(), true)); - - } - - /** - * To remove a user from the ThoughtSpot system, use this endpoint. At Least one value needed. - * When both are given user id will be considered to delete user. - * @throws Throwable exception if occurs. - */ - @Test - public void testTestRestapiV2DeleteUser() throws Exception { - // Parameters for the API call - String name = null; - String id = null; - Integer orgId = null; - - // Set callback and perform API call - try { - controller.restapiV2DeleteUser(name, id, orgId); - } catch (ApiException e) { - // Empty block - } - - // Test whether the response is null - assertNotNull("Response is null", - httpResponse.getResponse()); - // Test response code - assertEquals("Status is not 200", - 200, httpResponse.getResponse().getStatusCode()); - - // Test headers - Map headers = new LinkedHashMap(); - headers.put("Content-Type", "application/json"); - - assertTrue("Headers do not match", TestHelper.areHeadersProperSubsetOf( - headers, httpResponse.getResponse().getHeaders().asSimpleMap(), true)); - - } - -} diff --git a/Java/src/test/java/localhost/testing/HttpCallbackCatcher.java b/Java/src/test/java/localhost/testing/HttpCallbackCatcher.java deleted file mode 100644 index 907a356a5..000000000 --- a/Java/src/test/java/localhost/testing/HttpCallbackCatcher.java +++ /dev/null @@ -1,70 +0,0 @@ -/* - * ThoughtSpotPublicRESTAPILib - * - * This file was automatically generated by APIMATIC v3.0 ( https://www.apimatic.io ). - */ - -package localhost.testing; - -import localhost.http.client.HttpCallback; -import localhost.http.request.HttpRequest; -import localhost.http.response.HttpResponse; -import io.apimatic.coreinterfaces.http.request.Request; -import io.apimatic.coreinterfaces.http.Context; - -/** - * An HTTPCallback that captures the request and response for use later. - */ -public class HttpCallbackCatcher implements HttpCallback { - - private HttpRequest request; - private HttpResponse response; - - /** - * Call back executed before the HTTP request is sent. - */ - public void onBeforeRequest(Request request) { - // Nothing to do here - } - - /** - * Call back executed after the HTTP response is received - * but before the APICallback's handler is called. - */ - public void onAfterResponse(Context context) { - setRequest((HttpRequest) context.getRequest()); - setResponse((HttpResponse) context.getResponse()); - } - - /** - * Get the HTTP Request object associated with this API call. - * @return the HTTP Request - */ - public HttpRequest getRequest() { - return request; - } - - /** - * Set the HTTP Request object associated with this API call. - * @param request the HTTP Request - */ - private void setRequest(HttpRequest prequest) { - this.request = prequest; - } - - /** - * Get the HTTP Response object associated with this API call. - * @return the HTTP Response - */ - public HttpResponse getResponse() { - return response; - } - - /** - * Get the HTTP Response object associated with this API call. - * @param httpResponse the HTTP Response - */ - private void setResponse(HttpResponse httpResponse) { - this.response = httpResponse; - } -} diff --git a/LICENSE.md b/LICENSE.md new file mode 100644 index 000000000..a7cb0da39 --- /dev/null +++ b/LICENSE.md @@ -0,0 +1,21 @@ +ThoughtSpot Development Tools End User License Agreement + +THIS THOUGHTSPOT DEVELOPMENT TOOLS END USER LICENSE AGREEMENT (“EULA”) FORMS A BINDING AGREEMENT BETWEEN YOU INDIVIDUALLY OR THE BUSINESS ENTITY OR PUBLIC AGENCY ON WHOSE BEHALF YOU ARE ACCEPTING THIS AGREEMENT (“COMPANY”) AND THOUGHTSPOT, INC. (“THOUGHTSPOT”). THIS EULA DESCRIBES THE RIGHTS AND OBLIGATIONS OF COMPANY AND THOUGHTSPOT GOVERNING THE USE OF ANY APPLICATION PROGRAMMING INTERFACE, CONNECTOR, SOFTWARE DEVELOPMENT KIT, CODE SNIPPET, SAMPLE CODE, FREE CUSTOM USER INTERFACE OR VISUALIZATION, SAMPLE DATA, AND THE CORRESPONDING DOCUMENTATION FOR EACH, ANY UPDATES AND UPGRADES THERETO, AND ANY MODIFICATIONS, ENHANCEMENTS, OR IMPROVEMENTS, OF ANY OF THE FOREGOING, MADE AVAILABLE BY THOUGHTSPOT TOGETHER WITH THIS EULA (EACH A “TOOL” AND COLLECTIVELY “TOOLS”). +THIS EULA IS ACCEPTED BY: (1) INDICATING ACCEPTANCE OF THESE TERMS BY CLICKING “SUBMIT,” “ACCEPT” OR A SIMILAR BUTTON WHEN THIS EULA IS REFERENCED ON A WEB PAGE TO RECEIVE A TOOL; OR (2) DOWNLOADING, INSTALLING, OR USING, ANY PORTION OF THE TOOL. THE INDIVIDUAL ACCEPTING THIS AGREEMENT ON BEHALF OF COMPANY REPRESENTS AND WARRANTS THAT HE OR SHE: (A) IS AN EMPLOYEE, CONTRACTOR, OR AGENT OF, AND HAS THE AUTHORITY TO REPRESENT, COMPANY; AND (B) HAS READ AND UNDERSTANDS ALL THE PROVISIONS OF THIS AGREEMENT. IF COMPANY DOES NOT WISH TO ACCEPT THIS AGREEMENT, OR THE INDIVIDUAL ACCEPTING THE AGREEMENT DOES NOT HAVE AUTHORITY TO BIND COMPANY TO THIS AGREEMENT, THEN DO NOT CLICK OR SIGN TO ACCEPT THIS AGREEMENT, OR DOWNLOAD, INSTALL, OR USE, ANY TOOL. +In the event of any conflict between the terms of this EULA and a signed agreement between Company and ThoughtSpot, the terms of the signed agreement will apply. +ACKNOWLEDGMENT. ThoughtSpot provides the Tool to Company “as is” and “as available” and as an accommodation to Company to more quickly connect third-party software or services with, utilize sample data or code on, or utilize sample data sets or other materials with, the search and analytics ThoughtSpot Cloud subscription service or ThoughtSpot Application licensed software, to which Company must have purchased the necessary use rights pursuant to a separate purchase agreement (“Agreement”). ThoughtSpot may at any time remove Company’s access to any Tool or terminate the availability of a Tool without any liability to Company or any third party. In the event of termination, Company must remove and destroy all copies of the affected Tool, including all backup copies from all devices Company owns, possesses or controls and on which the Tool is installed. +LICENSE SCOPE. Subject to Company’s compliance with this EULA, ThoughtSpot hereby grants to Company a royalty-free, sub-licensable, transferable, non-exclusive, worldwide right and license to use, reproduce, display, perform, import and export, the Tool. The Tool is licensed, not sold. +RESTRICTIONS. Company will not (and has no license to): (a) use the Tool except as permitted in this EULA; (b) sell, resell, license, sublicense, rent, lease, encumber, lend, distribute, transfer, or provide a third party with access to the Tool; (c) modify, or create derivative works of the Tool; (d) circumvent or remove by any means any click-accept or copy protection used by ThoughtSpot in connection with the Tool; (e) use the Tool to conduct competitive research, to develop a product that is competitive with any ThoughtSpot product offering, or otherwise if Company is a competitor to ThoughtSpot, or to assert, authorize, assist, or encourage a third-party to assert, against ThoughtSpot or any of its affiliates, customers, vendors, business partners, or licensors, any patent or other intellectual property claim regarding ThoughtSpot products or services; (f) publicly disseminate any performance or security vulnerability test (including a penetration test) results or analysis related to or derived from the Tool; (g) use the Tool to create a product that converts ThoughtSpot products’ file formats for use with data analysis, machine learning, or data visualization software that is not the property of ThoughtSpot; (h) use the Tool to access ThoughtSpot products in a manner not authorized by the Agreement or this EULA; (i) use the Tool in any manner that violates any applicable laws or regulations; or (j) to the extent that the Tool includes a third-party application programming interface, then Company will not modify, distribute, or use, the Tool with anything other than to connect the intended corresponding third-party technology to ThoughtSpot’s products. Company will not cause, encourage, or permit any other person or entity under its control from taking any actions that Company is prohibited from taking under this Agreement. Before Company engages in any of the foregoing acts that it believes it may be entitled to, it will provide ThoughtSpot with 30 days’ prior notice to legal@thoughtspot.com, and provide reasonably requested information to allow ThoughtSpot to assess Company’s claim. ThoughtSpot may, in its discretion, provide alternatives that reduce adverse impacts to ThoughtSpot’s intellectual property or other rights. +OPEN SOURCE COMPONENTS. A Tool may include one or more open source software components provided under separate license terms which can be found in the open source disclosure file provided with or within a Tool download. Notwithstanding anything herein to the contrary, open source software is licensed to Company under such OSS’s own applicable license terms, which can be found in the attribution file. The open source license terms are consistent with the license granted in this EULA, and may contain additional rights benefiting Company. The open source license terms shall take precedence over this EULA to the extent that this EULA imposes greater restrictions on Company than the applicable open source license terms. To the extent the license for any open source software requires ThoughtSpot to make available to Company the corresponding source code and/or modifications, Company may obtain a copy of the applicable source files by sending a written request, with Company’s name and address to: ThoughtSpot, Inc., 444 Castro Street, Suite 1000, Mountain View, CA 94041, United States of America. All requests should clearly specify: Open Source Files Request, Attention: General Counsel. This offer to obtain a copy of such source files is valid for three years from the date Company acquired the applicable Tool. +THIRD-PARTY COMPONENTS. In addition to open source components, a Tool may include one or more components licensed by a third party (a “Component”) (e.g., an application programming interface or a sample data set). To the extent that third-party license requirements apply to a third-party component in a Tool, such additional license terms will be provided in the open source disclosure file provided with or within a Tool download. Third-party license terms shall take precedence over this EULA to the extent that they impose additional restrictions or limitations on Company than the license provided herein for download and use of a Component. The parties agree that: (a) to the extent that the terms between Company and the third party for use of a third-party technology accessed by the Component are more restrictive, such terms shall apply to Company’s use of the Component; (b) ThoughtSpot, and not the third party, is responsible for the Component including, without limitation, for any warranties, maintenance, and support thereof, and the third party does not warrant the Component’s accuracy, reliability, completeness, usefulness, non-infringement, or quality of the Component, and will not be liable for any losses or damages of any kind, including lost profits or other indirect or consequential damages, relating to use of or reliance on the Component; and (c) the third party owns all right, title, and interest in and to the Component, including all intellectual property rights therein. +DISCLAIMER OF WARRANTIES. THOUGHTSPOT DISCLAIMS RESPONSIBILITY FOR ANY HARM RESULTING FROM COMPANY’S USE OF THIS TOOL. THOUGHTSPOT DISCLAIMS TO THE FULLEST EXTENT PERMITTED, ALL GUARANTEES AND EXPRESS, IMPLIED AND STATUTORY WARRANTIES, INCLUDING WITHOUT LIMITATION THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT OF PROPRIETARY RIGHTS, AND ANY WARRANTIES REGARDING THE AVAILABILITY, SECURITY, RELIABILITY, TIMELINESS AND PERFORMANCE OF THIS TOOL. COMPANY DOWNLOADS AND USES THIS TOOL AT ITS OWN DISCRETION AND RISK, AND COMPANY IS SOLELY RESPONSIBLE FOR ANY DAMAGES TO ITS HARDWARE DEVICES OR LOSS OF DATA THAT RESULT FROM THE DOWNLOAD OR USE OF THIS TOOL. +INTELLECTUAL PROPERTY. ThoughtSpot and its licensors own all right, title, and interest in and to this Tool, including all intellectual property or other proprietary rights worldwide therein, including patent, trademark, service mark, copyright, trade secret, know-how, moral right, and any other intellectual and intangible property rights, including all continuations, continuations in part, applications, renewals, and extensions of any of the foregoing, whether registered or unregistered. All rights not expressly granted herein are reserved. +INDEMNIFICATION. Company will indemnify and hold harmless ThoughtSpot from any claim made by any third party due to or arising directly or indirectly out of its conduct or any connection with its use of this Tool, violation of the terms herein, and any violation of any applicable law or regulation. ThoughtSpot reserves the right, at its own expense, to assume the exclusive defense and control of any manner subject to indemnification by Company, but doing so will not excuse Company’s indemnity obligations. +LIMITATION OF LIABILITY. TO THE MAXIMUM EXTENT PERMITTED BY LAW, IN NO EVENT WILL THOUGHTSPOT AND ITS LICENSORS BE LIABLE FOR ANY LOST PROFITS OR BUSINESS OPPORTUNITIES, LOSS OF USE, BUSINESS INTERRUPTION, LOSS OF DATA, OR ANY OTHER INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES UNDER ANY THEORY OF LIABILITY, WHETHER BASED IN CONTRACT, TORT, NEGLIGENCE, PRODUCT LIABILITY, OR OTHERWISE. BECAUSE SOME JURISDICTIONS DO NOT ALLOW THE EXCLUSION OR LIMITATION OF LIABILITY FOR CONSEQUENTIAL OR INCIDENTAL DAMAGES, THE PRECEDING LIMITATION MAY NOT APPLY TO COMPANY. THOUGHTSPOT’S AND ITS LICENSORS’ LIABILITY UNDER THIS EULA WILL NOT, IN ANY EVENT, EXCEED \$10 USD. THE FOREGOING LIMITATIONS SHALL APPLY REGARDLESS OF WHETHER THOUGHTSPOT OR ITS LICENSORS HAVE BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES AND REGARDLESS OF WHETHER ANY REMEDY FAILS OF ITS ESSENTIAL PURPOSE. +LEGAL COMPLIANCE. A Tool may be subject to United States export control regulations. Without prior authorization from the United States government, Company shall not use the Tool for, and shall not permit the Tool to be used for, any purposes prohibited by United States law, including, without limitation, for any prohibited development, design, manufacture or production of missiles or nuclear, chemical or biological weapons. Without limiting the foregoing, Company represents and warrants that: (a) Company is not, and is not acting on behalf of, any person who is a citizen, national, or resident of, or who is controlled by the government of, Cuba, Iran, North Korea, Sudan, or Syria, the Crimea Region, or any other country to which the United States has prohibited export transactions; (b) Company is not located in a country that is subject to a U.S. Government embargo, or that has been designated by the U.S. Government as a “terrorist supporting” country; and (c) Company is not, and is not acting on behalf of, any person or entity listed on the U.S. Treasury Department list of Specially Designated Nationals and Blocked Persons, or the U.S. Commerce Department Denied Persons List, Unverified List, or Entity List or any other U.S. Government list of prohibited or restricted parties unless authorized by license or regulation. In addition, Company is responsible for complying with any local Law that may impact Company’s right to import, export, or use the Tool. +U.S. GOVERNMENT USE. If a Tool provided under this Agreement is software, then it is commercial computer software developed exclusively at private expense. Unless otherwise set forth in this Agreement, use, duplication, and disclosure by civilian agencies of the U.S. Government will not exceed those minimum rights set forth in FAR 52.227-19(c) or successor regulations. Use, duplication, and disclosure by U.S. Department of Defense agencies is subject solely to the license terms contained in this EULA, as stated in DFARS 227.7202 or successor regulations. U.S. Government rights will apply only to the specific agency and program for which the Application is obtained. +SUPPORT. If Company has a support question regarding a Tool, use ThoughtSpot’s standard support process applicable to Company’s access to ThoughtSpot Cloud or license to the ThoughtSpot Application to receive assistance. +COMPLAINTS. Company agrees to direct any questions, complaints, or claims, with respect to the Tools to legal@thoughtspot.com. +CONTRACTING PARTIES. The contracting party is ThoughtSpot, Inc., 444 Castro Street, Suite 1000, Mountain View, CA 94041, the United States of America. This EULA is governed by the laws of the State of California, United States of America, unless mandated by other law. The United Nations Convention for the International Sale of Goods shall not apply. +ENTIRE AGREEMENT. This EULA represents the entire agreement between the parties with respect to the Tool, and supersedes any prior or contemporaneous oral or written agreements concerning the subject matter contained herein. +INTERPRETATION. No failure of either party to exercise or enforce any of its rights under this EULA will act as a waiver of those rights. This EULA may only be modified, or any rights under it waived, by a written agreement executed by the party against which it is asserted. If any provision of this EULA is found illegal or unenforceable, it will be enforced to the maximum extent permissible, and the legality and enforceability of the other provisions of this EULA will not be affected. Any translation of this EULA is done for local requirements and in the event of a dispute between the English and any non-English version, the English version of this EULA shall govern. If Company is located in the province of Quebec, Canada, the following clause applies: The parties hereby confirm that Company has requested this EULA and all related documents be drafted in English. Les parties ont exige que le present contrat et tous les documents connexes soient rediges en anglais. diff --git a/Python/.gitignore b/Python/.gitignore deleted file mode 100644 index 94487b951..000000000 --- a/Python/.gitignore +++ /dev/null @@ -1 +0,0 @@ -*.pyc diff --git a/Python/LICENSE b/Python/LICENSE deleted file mode 100644 index c571aa529..000000000 --- a/Python/LICENSE +++ /dev/null @@ -1,28 +0,0 @@ -License: -======== -The MIT License (MIT) -http://opensource.org/licenses/MIT - -Copyright (c) 2014 - 2022 APIMATIC Limited - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. - -Trade Mark: -========== -APIMATIC is a trade mark for APIMATIC Limited \ No newline at end of file diff --git a/Python/MANIFEST.in b/Python/MANIFEST.in deleted file mode 100644 index 64aa22e70..000000000 --- a/Python/MANIFEST.in +++ /dev/null @@ -1,2 +0,0 @@ -include LICENSE -include README.md diff --git a/Python/README.md b/Python/README.md deleted file mode 100644 index 795928ba7..000000000 --- a/Python/README.md +++ /dev/null @@ -1,86 +0,0 @@ - -# Getting Started with ThoughtSpot Public REST API - -## Install the Package - -The package is compatible with Python versions `3 >=3.7, <= 3.10`. -Install the package from PyPi using the following pip command: - -```python -pip install thoughtspot-rest-api-sdk==1.13.1 -``` - -You can also view the package at: -https://pypi.python.org/pypi/thoughtspot-rest-api-sdk - -## Test the SDK - -You can test the generated SDK and the server with test cases. `unittest` is used as the testing framework and `pytest` is used as the test runner. You can run the tests as follows: - -Navigate to the root directory of the SDK and run the following commands - -``` -pip install -r test-requirements.txt -pytest -``` - -## Initialize the API Client - -**_Note:_** Documentation for the client can be found [here.](doc/client.md) - -The following parameters are configurable for the API Client: - -| Parameter | Type | Description | -| --- | --- | --- | -| `base_url` | `string` | *Default*: `'https://localhost:443'` | -| `environment` | Environment | The API environment.
**Default: `Environment.PRODUCTION`** | -| `http_client_instance` | `HttpClient` | The Http Client passed from the sdk user for making requests | -| `override_http_client_configuration` | `bool` | The value which determines to override properties of the passed Http Client from the sdk user | -| `http_call_back` | `HttpCallBack` | The callback value that is invoked before and after an HTTP call is made to an endpoint | -| `timeout` | `float` | The value to use for connection timeout.
**Default: 60** | -| `max_retries` | `int` | The number of times to retry an endpoint call if it fails.
**Default: 0** | -| `backoff_factor` | `float` | A backoff factor to apply between attempts after the second try.
**Default: 2** | -| `retry_statuses` | `Array of int` | The http statuses on which retry is to be done.
**Default: [408, 413, 429, 500, 502, 503, 504, 521, 522, 524, 408, 413, 429, 500, 502, 503, 504, 521, 522, 524]** | -| `retry_methods` | `Array of string` | The http methods on which retry is to be done.
**Default: ['GET', 'PUT', 'GET', 'PUT']** | -| `skip_ssl_cert_verification` | `boolean` | Set to true to allow skipping ssl certificate verification | -| `access_token` | `string` | The OAuth 2.0 Access Token to use for API requests. | - -The API client can be initialized as follows: - -```python -from thoughtspotpublicrestapi.thoughtspotpublicrestapi_client import ThoughtspotpublicrestapiClient -from thoughtspotpublicrestapi.configuration import Environment - -client = ThoughtspotpublicrestapiClient( - access_token='AccessToken', - environment=Environment.PRODUCTION, - base_url = 'https://localhost:443',) -``` - -## Authorization - -This API uses `OAuth 2 Bearer token`. - -## List of APIs - -* [User](doc/controllers/user.md) -* [Group](doc/controllers/group.md) -* [Metadata](doc/controllers/metadata.md) -* [Database](doc/controllers/database.md) -* [Connection](doc/controllers/connection.md) -* [Data](doc/controllers/data.md) -* [Logs](doc/controllers/logs.md) -* [Custom Actions](doc/controllers/custom-actions.md) -* [Security](doc/controllers/security.md) -* [Org](doc/controllers/org.md) -* [Session](doc/controllers/session.md) -* [Admin](doc/controllers/admin.md) -* [Report](doc/controllers/report.md) -* [Materialization](doc/controllers/materialization.md) - -## Classes Documentation - -* [Utility Classes](doc/utility-classes.md) -* [HttpResponse](doc/http-response.md) -* [HttpRequest](doc/http-request.md) - diff --git a/Python/doc/client.md b/Python/doc/client.md deleted file mode 100644 index dbfd8e04c..000000000 --- a/Python/doc/client.md +++ /dev/null @@ -1,55 +0,0 @@ - -# Client Class Documentation - -The following parameters are configurable for the API Client: - -| Parameter | Type | Description | -| --- | --- | --- | -| `base_url` | `string` | *Default*: `'https://localhost:443'` | -| `environment` | Environment | The API environment.
**Default: `Environment.PRODUCTION`** | -| `http_client_instance` | `HttpClient` | The Http Client passed from the sdk user for making requests | -| `override_http_client_configuration` | `bool` | The value which determines to override properties of the passed Http Client from the sdk user | -| `http_call_back` | `HttpCallBack` | The callback value that is invoked before and after an HTTP call is made to an endpoint | -| `timeout` | `float` | The value to use for connection timeout.
**Default: 60** | -| `max_retries` | `int` | The number of times to retry an endpoint call if it fails.
**Default: 0** | -| `backoff_factor` | `float` | A backoff factor to apply between attempts after the second try.
**Default: 2** | -| `retry_statuses` | `Array of int` | The http statuses on which retry is to be done.
**Default: [408, 413, 429, 500, 502, 503, 504, 521, 522, 524, 408, 413, 429, 500, 502, 503, 504, 521, 522, 524]** | -| `retry_methods` | `Array of string` | The http methods on which retry is to be done.
**Default: ['GET', 'PUT', 'GET', 'PUT']** | -| `skip_ssl_cert_verification` | `boolean` | Set to true to allow skipping ssl certificate verification | -| `access_token` | `string` | The OAuth 2.0 Access Token to use for API requests. | - -The API client can be initialized as follows: - -```python -from thoughtspotpublicrestapi.thoughtspotpublicrestapi_client import ThoughtspotpublicrestapiClient -from thoughtspotpublicrestapi.configuration import Environment - -client = ThoughtspotpublicrestapiClient( - access_token='AccessToken', - environment=Environment.PRODUCTION, - base_url = 'https://localhost:443',) -``` - -## ThoughtSpot Public REST API Client - -The gateway for the SDK. This class acts as a factory for the Controllers and also holds the configuration of the SDK. - -## Controllers - -| Name | Description | -| --- | --- | -| user | Gets UserController | -| group | Gets GroupController | -| metadata | Gets MetadataController | -| database | Gets DatabaseController | -| connection | Gets ConnectionController | -| data | Gets DataController | -| logs | Gets LogsController | -| custom_actions | Gets CustomActionsController | -| security | Gets SecurityController | -| org | Gets OrgController | -| session | Gets SessionController | -| admin | Gets AdminController | -| report | Gets ReportController | -| materialization | Gets MaterializationController | - diff --git a/Python/doc/controllers/admin.md b/Python/doc/controllers/admin.md deleted file mode 100644 index 97bf8038c..000000000 --- a/Python/doc/controllers/admin.md +++ /dev/null @@ -1,248 +0,0 @@ -# Admin - -```python -admin_controller = client.admin -``` - -## Class Name - -`AdminController` - -## Methods - -* [Restapi V2 Update Cluster Config](../../doc/controllers/admin.md#restapi-v2-update-cluster-config) -* [Restapi V2 Reset User Password](../../doc/controllers/admin.md#restapi-v2-reset-user-password) -* [Restapi V2 Sync Principal](../../doc/controllers/admin.md#restapi-v2-sync-principal) -* [Restapi V2 Change Author of Objects](../../doc/controllers/admin.md#restapi-v2-change-author-of-objects) -* [Restapi V2 Assign Author to Objects](../../doc/controllers/admin.md#restapi-v2-assign-author-to-objects) -* [Restapi V2 Force Logout Users](../../doc/controllers/admin.md#restapi-v2-force-logout-users) - - -# Restapi V2 Update Cluster Config - -To update the Thoughtspot cluster configuration, use this endpoint. - -```python -def restapi_v_2__update_cluster_config(self, - body) -``` - -## Parameters - -| Parameter | Type | Tags | Description | -| --- | --- | --- | --- | -| `body` | [`TspublicRestV2AdminConfigurationUpdateRequest`](../../doc/models/tspublic-rest-v2-admin-configuration-update-request.md) | Body, Required | - | - -## Response Type - -`bool` - -## Example Usage - -```python -body = TspublicRestV2AdminConfigurationUpdateRequest() - -result = admin_controller.restapi_v_2__update_cluster_config(body) -``` - -## Errors - -| HTTP Status Code | Error Description | Exception Class | -| --- | --- | --- | -| 500 | Operation failed | [`ErrorResponseException`](../../doc/models/error-response-exception.md) | - - -# Restapi V2 Reset User Password - -To reset the password of a ThoughtSpot user account, use this endpoint. - -It is mandatory to use Authorization header with token of a user with admin access to successfully run this endpoint. - -At least one of User Id or username is mandatory. When both are given, then user id will be considered. - -```python -def restapi_v_2__reset_user_password(self, - body) -``` - -## Parameters - -| Parameter | Type | Tags | Description | -| --- | --- | --- | --- | -| `body` | [`TspublicRestV2AdminResetpasswordRequest`](../../doc/models/tspublic-rest-v2-admin-resetpassword-request.md) | Body, Required | - | - -## Response Type - -`bool` - -## Example Usage - -```python -body = TspublicRestV2AdminResetpasswordRequest() -body.new_password = 'newPassword0' - -result = admin_controller.restapi_v_2__reset_user_password(body) -``` - -## Errors - -| HTTP Status Code | Error Description | Exception Class | -| --- | --- | --- | -| 500 | Operation failed | [`ErrorResponseException`](../../doc/models/error-response-exception.md) | - - -# Restapi V2 Sync Principal - -To programmatically synchronize user accounts and user groups from external system with ThoughtSpot, use this endpoint. - -The payload takes principals containing all users and groups present in the external system. - -The users and user groups in Thoughtspot get updated for any matching inputs. - -Any user and user group present in the input, but not present in the cluster, gets created in cluster. -n You can optionally choose to delete the user and groups from the cluster, that are not present in the input. - -```python -def restapi_v_2__sync_principal(self, - body) -``` - -## Parameters - -| Parameter | Type | Tags | Description | -| --- | --- | --- | --- | -| `body` | [`TspublicRestV2AdminSyncprincipalRequest`](../../doc/models/tspublic-rest-v2-admin-syncprincipal-request.md) | Body, Required | - | - -## Response Type - -[`AdminsyncPrincipalResponse`](../../doc/models/adminsync-principal-response.md) - -## Example Usage - -```python -body = TspublicRestV2AdminSyncprincipalRequest() -body.principal_object = [jsonpickle.decode('{"key1":"val1","key2":"val2"}')] - -result = admin_controller.restapi_v_2__sync_principal(body) -``` - -## Errors - -| HTTP Status Code | Error Description | Exception Class | -| --- | --- | --- | -| 500 | Operation failed | [`ErrorResponseException`](../../doc/models/error-response-exception.md) | - - -# Restapi V2 Change Author of Objects - -To programmatically change the owner of one or several objects from one user account to another, use this endpoint. - -You might want to transfer ownership of objects owned by a user to another active user, when the account is removed from the ThoughtSpot application. - -```python -def restapi_v_2__change_author_of_objects(self, - body) -``` - -## Parameters - -| Parameter | Type | Tags | Description | -| --- | --- | --- | --- | -| `body` | [`TspublicRestV2AdminChangeauthorRequest`](../../doc/models/tspublic-rest-v2-admin-changeauthor-request.md) | Body, Required | - | - -## Response Type - -`bool` - -## Example Usage - -```python -body = TspublicRestV2AdminChangeauthorRequest() -body.ts_object_id = ['tsObjectId7'] -body.from_user = FromUserNameAndIDInput() -body.to_user = ToUserNameAndIDInput() - -result = admin_controller.restapi_v_2__change_author_of_objects(body) -``` - -## Errors - -| HTTP Status Code | Error Description | Exception Class | -| --- | --- | --- | -| 500 | Operation failed | [`ErrorResponseException`](../../doc/models/error-response-exception.md) | - - -# Restapi V2 Assign Author to Objects - -To programmatically assign an author to one or several objects, use this endpoint. - -Provide either user name or id as input. When both are given user id will be considered. - -Requires administration privilege. - -```python -def restapi_v_2__assign_author_to_objects(self, - body) -``` - -## Parameters - -| Parameter | Type | Tags | Description | -| --- | --- | --- | --- | -| `body` | [`TspublicRestV2AdminAssignauthorRequest`](../../doc/models/tspublic-rest-v2-admin-assignauthor-request.md) | Body, Required | - | - -## Response Type - -`bool` - -## Example Usage - -```python -body = TspublicRestV2AdminAssignauthorRequest() -body.ts_object_id = ['tsObjectId7'] - -result = admin_controller.restapi_v_2__assign_author_to_objects(body) -``` - -## Errors - -| HTTP Status Code | Error Description | Exception Class | -| --- | --- | --- | -| 500 | Operation failed | [`ErrorResponseException`](../../doc/models/error-response-exception.md) | - - -# Restapi V2 Force Logout Users - -To logout one or more users from logged in session, use this endpoint. If no input is provided then all logged in users are force logged out. - -Requires administration privilege - -```python -def restapi_v_2__force_logout_users(self, - body) -``` - -## Parameters - -| Parameter | Type | Tags | Description | -| --- | --- | --- | --- | -| `body` | [`TspublicRestV2AdminForcelogoutRequest`](../../doc/models/tspublic-rest-v2-admin-forcelogout-request.md) | Body, Required | - | - -## Response Type - -`bool` - -## Example Usage - -```python -body = TspublicRestV2AdminForcelogoutRequest() - -result = admin_controller.restapi_v_2__force_logout_users(body) -``` - -## Errors - -| HTTP Status Code | Error Description | Exception Class | -| --- | --- | --- | -| 500 | Operation failed | [`ErrorResponseException`](../../doc/models/error-response-exception.md) | - diff --git a/Python/doc/controllers/connection.md b/Python/doc/controllers/connection.md deleted file mode 100644 index 00d9f8d71..000000000 --- a/Python/doc/controllers/connection.md +++ /dev/null @@ -1,460 +0,0 @@ -# Connection - -```python -connection_controller = client.connection -``` - -## Class Name - -`ConnectionController` - -## Methods - -* [Restapi V2 Get Connection](../../doc/controllers/connection.md#restapi-v2-get-connection) -* [Restapi V2 Get Connection Database](../../doc/controllers/connection.md#restapi-v2-get-connection-database) -* [Restapi V2 Create Connection](../../doc/controllers/connection.md#restapi-v2-create-connection) -* [Restapi V2 Update Connection](../../doc/controllers/connection.md#restapi-v2-update-connection) -* [Restapi V2 Delete Connection](../../doc/controllers/connection.md#restapi-v2-delete-connection) -* [Restapi V2 Add Table to Connection](../../doc/controllers/connection.md#restapi-v2-add-table-to-connection) -* [Restapi V2 Remove Table From Connection](../../doc/controllers/connection.md#restapi-v2-remove-table-from-connection) -* [Restapi V2 Search Connection](../../doc/controllers/connection.md#restapi-v2-search-connection) -* [Restapi V2 Get Connection Tables](../../doc/controllers/connection.md#restapi-v2-get-connection-tables) -* [Restapi V2 Get Connection Table Columns](../../doc/controllers/connection.md#restapi-v2-get-connection-table-columns) - - -# Restapi V2 Get Connection - -To get the details of a specific connection use this endpoint - -```python -def restapi_v_2__get_connection(self, - id) -``` - -## Parameters - -| Parameter | Type | Tags | Description | -| --- | --- | --- | --- | -| `id` | `string` | Query, Required | The GUID of the connection to query | - -## Response Type - -[`ConnectionResponse`](../../doc/models/connection-response.md) - -## Example Usage - -```python -id = 'id0' - -result = connection_controller.restapi_v_2__get_connection(id) -``` - -## Errors - -| HTTP Status Code | Error Description | Exception Class | -| --- | --- | --- | -| 500 | Operation failed | [`ErrorResponseException`](../../doc/models/error-response-exception.md) | - - -# Restapi V2 Get Connection Database - -To get the list of databases for a connection, use this endpoint. - -The response will include databases from the data platform corresponding to the connection id provided. - -```python -def restapi_v_2__get_connection_database(self, - id) -``` - -## Parameters - -| Parameter | Type | Tags | Description | -| --- | --- | --- | --- | -| `id` | `string` | Query, Required | The GUID of the connection | - -## Response Type - -`List of string` - -## Example Usage - -```python -id = 'id0' - -result = connection_controller.restapi_v_2__get_connection_database(id) -``` - -## Errors - -| HTTP Status Code | Error Description | Exception Class | -| --- | --- | --- | -| 500 | Operation failed | [`ErrorResponseException`](../../doc/models/error-response-exception.md) | - - -# Restapi V2 Create Connection - -To programmatically create a connection in the ThoughtSpot system use this API endpoint. -Using this API, you can create a connection and assign groups. -To create a connection, you require admin connection privileges. -All connections created in the ThoughtSpot system are added to ALL_GROUP - -```python -def restapi_v_2__create_connection(self, - body) -``` - -## Parameters - -| Parameter | Type | Tags | Description | -| --- | --- | --- | --- | -| `body` | [`TspublicRestV2ConnectionCreateRequest`](../../doc/models/tspublic-rest-v2-connection-create-request.md) | Body, Required | - | - -## Response Type - -[`CreateConnectionResponse`](../../doc/models/create-connection-response.md) - -## Example Usage - -```python -body = TspublicRestV2ConnectionCreateRequest() -body.mtype = Type14Enum.ORACLE_ADW -body.name = 'name6' -body.configuration = 'configuration0' - -result = connection_controller.restapi_v_2__create_connection(body) -``` - -## Errors - -| HTTP Status Code | Error Description | Exception Class | -| --- | --- | --- | -| 500 | Operation failed | [`ErrorResponseException`](../../doc/models/error-response-exception.md) | - - -# Restapi V2 Update Connection - -You can use this endpoint to programmatically modify an existing connection -To modify a connection, you require admin connection privileges. -At least one of Connection Id or connectionname is mandatory. When both are given, then connection id will be considered and connectionname will be updated - -```python -def restapi_v_2__update_connection(self, - body) -``` - -## Parameters - -| Parameter | Type | Tags | Description | -| --- | --- | --- | --- | -| `body` | [`TspublicRestV2ConnectionUpdateRequest`](../../doc/models/tspublic-rest-v2-connection-update-request.md) | Body, Required | - | - -## Response Type - -`bool` - -## Example Usage - -```python -body = TspublicRestV2ConnectionUpdateRequest() -body.id = 'id6' -body.configuration = 'configuration0' - -result = connection_controller.restapi_v_2__update_connection(body) -``` - -## Errors - -| HTTP Status Code | Error Description | Exception Class | -| --- | --- | --- | -| 500 | Operation failed | [`ErrorResponseException`](../../doc/models/error-response-exception.md) | - - -# Restapi V2 Delete Connection - -To remove a connection from the ThoughtSpot system, use this endpoint. - -```python -def restapi_v_2__delete_connection(self, - id) -``` - -## Parameters - -| Parameter | Type | Tags | Description | -| --- | --- | --- | --- | -| `id` | `List of string` | Query, Required | A JSON array of GUIDs of the connection | - -## Response Type - -`bool` - -## Example Usage - -```python -id = ['id0'] - -result = connection_controller.restapi_v_2__delete_connection(id) -``` - -## Errors - -| HTTP Status Code | Error Description | Exception Class | -| --- | --- | --- | -| 500 | Operation failed | [`ErrorResponseException`](../../doc/models/error-response-exception.md) | - - -# Restapi V2 Add Table to Connection - -To programmatically add table to an existing connection use this endpoint. -When you assign groups to a connection, the connection inherits the privileges assigned to those groups. -At least one of Connection Id or connectionname is mandatory. When both are given, then connection id will be considered. - -```python -def restapi_v_2__add_table_to_connection(self, - body) -``` - -## Parameters - -| Parameter | Type | Tags | Description | -| --- | --- | --- | --- | -| `body` | [`TspublicRestV2ConnectionAddtableRequest`](../../doc/models/tspublic-rest-v2-connection-addtable-request.md) | Body, Required | - | - -## Response Type - -`bool` - -## Example Usage - -```python -body = TspublicRestV2ConnectionAddtableRequest() -body.id = 'id6' -body.table = [] - -body.table.append(AddTableInput()) -body.table[0].name = 'name0' -body.table[0].db_name = 'dbName8' -body.table[0].schema_name = 'schemaName4' -body.table[0].columns = [] - -body.table[0].columns.append(ColumnsInput()) -body.table[0].columns[0].name = 'name0' -body.table[0].columns[0].data_type = 'dataType2' - -body.table[0].columns.append(ColumnsInput()) -body.table[0].columns[1].name = 'name1' -body.table[0].columns[1].data_type = 'dataType3' - - -body.table.append(AddTableInput()) -body.table[1].name = 'name1' -body.table[1].db_name = 'dbName9' -body.table[1].schema_name = 'schemaName5' -body.table[1].columns = [] - -body.table[1].columns.append(ColumnsInput()) -body.table[1].columns[0].name = 'name9' -body.table[1].columns[0].data_type = 'dataType1' - - -body.table.append(AddTableInput()) -body.table[2].name = 'name2' -body.table[2].db_name = 'dbName0' -body.table[2].schema_name = 'schemaName6' -body.table[2].columns = [] - -body.table[2].columns.append(ColumnsInput()) -body.table[2].columns[0].name = 'name8' -body.table[2].columns[0].data_type = 'dataType0' - -body.table[2].columns.append(ColumnsInput()) -body.table[2].columns[1].name = 'name9' -body.table[2].columns[1].data_type = 'dataType1' - -body.table[2].columns.append(ColumnsInput()) -body.table[2].columns[2].name = 'name0' -body.table[2].columns[2].data_type = 'dataType2' - - - -result = connection_controller.restapi_v_2__add_table_to_connection(body) -``` - -## Errors - -| HTTP Status Code | Error Description | Exception Class | -| --- | --- | --- | -| 500 | Operation failed | [`ErrorResponseException`](../../doc/models/error-response-exception.md) | - - -# Restapi V2 Remove Table From Connection - -To programmatically remove a table from a connection use API endpoint. -The API removes only the connection association. It does not delete the connection or group from the Thoughtspot system. -At least one of id or name of connection is required. When both are given connection id will be considered. - -```python -def restapi_v_2__remove_table_from_connection(self, - body) -``` - -## Parameters - -| Parameter | Type | Tags | Description | -| --- | --- | --- | --- | -| `body` | [`TspublicRestV2ConnectionRemovetableRequest`](../../doc/models/tspublic-rest-v2-connection-removetable-request.md) | Body, Required | - | - -## Response Type - -`bool` - -## Example Usage - -```python -body = TspublicRestV2ConnectionRemovetableRequest() -body.id = 'id6' -body.table = [] - -body.table.append(TableInput()) - -body.table.append(TableInput()) - -body.table.append(TableInput()) - - -result = connection_controller.restapi_v_2__remove_table_from_connection(body) -``` - -## Errors - -| HTTP Status Code | Error Description | Exception Class | -| --- | --- | --- | -| 500 | Operation failed | [`ErrorResponseException`](../../doc/models/error-response-exception.md) | - - -# Restapi V2 Search Connection - -To get the details of a specific connection or all connections in the ThoughtSpot system use this end point. - -```python -def restapi_v_2__search_connection(self, - body) -``` - -## Parameters - -| Parameter | Type | Tags | Description | -| --- | --- | --- | --- | -| `body` | [`TspublicRestV2ConnectionSearchRequest`](../../doc/models/tspublic-rest-v2-connection-search-request.md) | Body, Required | - | - -## Response Type - -[`List of ConnectionResponse`](../../doc/models/connection-response.md) - -## Example Usage - -```python -body = TspublicRestV2ConnectionSearchRequest() -body.mtype = Type15Enum.ORACLE_ADW - -result = connection_controller.restapi_v_2__search_connection(body) -``` - -## Errors - -| HTTP Status Code | Error Description | Exception Class | -| --- | --- | --- | -| 500 | Operation failed | [`ErrorResponseException`](../../doc/models/error-response-exception.md) | - - -# Restapi V2 Get Connection Tables - -To get the details of tables from a connection, use this endpoint. - -You can get the details of tables in the data platform for the connection id provided. - -```python -def restapi_v_2__get_connection_tables(self, - body) -``` - -## Parameters - -| Parameter | Type | Tags | Description | -| --- | --- | --- | --- | -| `body` | [`TspublicRestV2ConnectionTableRequest`](../../doc/models/tspublic-rest-v2-connection-table-request.md) | Body, Required | - | - -## Response Type - -[`ConnectionTableResponse`](../../doc/models/connection-table-response.md) - -## Example Usage - -```python -body = TspublicRestV2ConnectionTableRequest() -body.id = 'id6' - -result = connection_controller.restapi_v_2__get_connection_tables(body) -``` - -## Errors - -| HTTP Status Code | Error Description | Exception Class | -| --- | --- | --- | -| 500 | Operation failed | [`ErrorResponseException`](../../doc/models/error-response-exception.md) | - - -# Restapi V2 Get Connection Table Columns - -To get the details of columns in a table associated to a connection, use this endpoint. - -You can get the columns of any table available in the data platform for the connection id provided. - -```python -def restapi_v_2__get_connection_table_columns(self, - body) -``` - -## Parameters - -| Parameter | Type | Tags | Description | -| --- | --- | --- | --- | -| `body` | [`TspublicRestV2ConnectionTablecoloumnRequest`](../../doc/models/tspublic-rest-v2-connection-tablecoloumn-request.md) | Body, Required | - | - -## Response Type - -[`ConnectionTableColumnsResponse`](../../doc/models/connection-table-columns-response.md) - -## Example Usage - -```python -body = TspublicRestV2ConnectionTablecoloumnRequest() -body.id = 'id6' -body.table = [] - -body.table.append(ConnectionTableColumnsInput()) -body.table[0].db_name = 'dbName8' -body.table[0].schema_name = 'schemaName4' -body.table[0].name = 'name0' - -body.table.append(ConnectionTableColumnsInput()) -body.table[1].db_name = 'dbName9' -body.table[1].schema_name = 'schemaName5' -body.table[1].name = 'name1' - -body.table.append(ConnectionTableColumnsInput()) -body.table[2].db_name = 'dbName0' -body.table[2].schema_name = 'schemaName6' -body.table[2].name = 'name2' - - -result = connection_controller.restapi_v_2__get_connection_table_columns(body) -``` - -## Errors - -| HTTP Status Code | Error Description | Exception Class | -| --- | --- | --- | -| 500 | Operation failed | [`ErrorResponseException`](../../doc/models/error-response-exception.md) | - diff --git a/Python/doc/controllers/custom-actions.md b/Python/doc/controllers/custom-actions.md deleted file mode 100644 index db58c8a08..000000000 --- a/Python/doc/controllers/custom-actions.md +++ /dev/null @@ -1,301 +0,0 @@ -# Custom Actions - -```python -custom_actions_controller = client.custom_actions -``` - -## Class Name - -`CustomActionsController` - -## Methods - -* [Restapi V2 Get Custom Action](../../doc/controllers/custom-actions.md#restapi-v2-get-custom-action) -* [Restapi V2 Search Custom Action](../../doc/controllers/custom-actions.md#restapi-v2-search-custom-action) -* [Restapi V2 Get Custom Action Association](../../doc/controllers/custom-actions.md#restapi-v2-get-custom-action-association) -* [Restapi V2 Create Custom Action](../../doc/controllers/custom-actions.md#restapi-v2-create-custom-action) -* [Restapi V2 Update Custom Action](../../doc/controllers/custom-actions.md#restapi-v2-update-custom-action) -* [Restapi V2 Delete Custom Action](../../doc/controllers/custom-actions.md#restapi-v2-delete-custom-action) -* [Restapi V2 Update Custom Action Association](../../doc/controllers/custom-actions.md#restapi-v2-update-custom-action-association) -* [Restapi V2 Delete Custom Action Association](../../doc/controllers/custom-actions.md#restapi-v2-delete-custom-action-association) - - -# Restapi V2 Get Custom Action - -To get details of a specific custom action configured in the ThoughtSpot system, use this endpoint - -```python -def restapi_v_2__get_custom_action(self, - id) -``` - -## Parameters - -| Parameter | Type | Tags | Description | -| --- | --- | --- | --- | -| `id` | `string` | Query, Required | GUID of the custom action | - -## Response Type - -`object` - -## Example Usage - -```python -id = 'id0' - -result = custom_actions_controller.restapi_v_2__get_custom_action(id) -``` - -## Errors - -| HTTP Status Code | Error Description | Exception Class | -| --- | --- | --- | -| 500 | Operation failed | [`ErrorResponseException`](../../doc/models/error-response-exception.md) | - - -# Restapi V2 Search Custom Action - -To search custom actions available on a ThoughtSpot instance, use this endpoint - -```python -def restapi_v_2__search_custom_action(self, - body) -``` - -## Parameters - -| Parameter | Type | Tags | Description | -| --- | --- | --- | --- | -| `body` | [`TspublicRestV2CustomactionSearchRequest`](../../doc/models/tspublic-rest-v2-customaction-search-request.md) | Body, Required | - | - -## Response Type - -`object` - -## Example Usage - -```python -body = TspublicRestV2CustomactionSearchRequest() - -result = custom_actions_controller.restapi_v_2__search_custom_action(body) -``` - -## Errors - -| HTTP Status Code | Error Description | Exception Class | -| --- | --- | --- | -| 500 | Operation failed | [`ErrorResponseException`](../../doc/models/error-response-exception.md) | - - -# Restapi V2 Get Custom Action Association - -ThoughtSpot supports associating custom actions to Liveboards, answers, and worksheets. To get the details of the ThoughtSpot objects associated with a custom action, use this endpoint. - -```python -def restapi_v_2__get_custom_action_association(self, - id) -``` - -## Parameters - -| Parameter | Type | Tags | Description | -| --- | --- | --- | --- | -| `id` | `string` | Query, Required | GUID of the custom action | - -## Response Type - -`object` - -## Example Usage - -```python -id = 'id0' - -result = custom_actions_controller.restapi_v_2__get_custom_action_association(id) -``` - -## Errors - -| HTTP Status Code | Error Description | Exception Class | -| --- | --- | --- | -| 500 | Operation failed | [`ErrorResponseException`](../../doc/models/error-response-exception.md) | - - -# Restapi V2 Create Custom Action - -To programmatically create custom actions on ThoughtSpot clusters that support embedding configuration, use this endpoint - -```python -def restapi_v_2__create_custom_action(self, - body) -``` - -## Parameters - -| Parameter | Type | Tags | Description | -| --- | --- | --- | --- | -| `body` | [`TspublicRestV2CustomactionCreateRequest`](../../doc/models/tspublic-rest-v2-customaction-create-request.md) | Body, Required | - | - -## Response Type - -`object` - -## Example Usage - -```python -body = TspublicRestV2CustomactionCreateRequest() -body.configuration = 'configuration0' - -result = custom_actions_controller.restapi_v_2__create_custom_action(body) -``` - -## Errors - -| HTTP Status Code | Error Description | Exception Class | -| --- | --- | --- | -| 500 | Operation failed | [`ErrorResponseException`](../../doc/models/error-response-exception.md) | - - -# Restapi V2 Update Custom Action - -To programmatically edit an existing custom action, use this endpoint - -```python -def restapi_v_2__update_custom_action(self, - body) -``` - -## Parameters - -| Parameter | Type | Tags | Description | -| --- | --- | --- | --- | -| `body` | [`TspublicRestV2CustomactionUpdateRequest`](../../doc/models/tspublic-rest-v2-customaction-update-request.md) | Body, Required | - | - -## Response Type - -`object` - -## Example Usage - -```python -body = TspublicRestV2CustomactionUpdateRequest() -body.id = 'id6' -body.configuration = 'configuration0' - -result = custom_actions_controller.restapi_v_2__update_custom_action(body) -``` - -## Errors - -| HTTP Status Code | Error Description | Exception Class | -| --- | --- | --- | -| 500 | Operation failed | [`ErrorResponseException`](../../doc/models/error-response-exception.md) | - - -# Restapi V2 Delete Custom Action - -To programmatically delete a custom action, use this endpoint - -```python -def restapi_v_2__delete_custom_action(self, - id) -``` - -## Parameters - -| Parameter | Type | Tags | Description | -| --- | --- | --- | --- | -| `id` | `string` | Query, Required | GUID of the custom action | - -## Response Type - -`object` - -## Example Usage - -```python -id = 'id0' - -result = custom_actions_controller.restapi_v_2__delete_custom_action(id) -``` - -## Errors - -| HTTP Status Code | Error Description | Exception Class | -| --- | --- | --- | -| 500 | Operation failed | [`ErrorResponseException`](../../doc/models/error-response-exception.md) | - - -# Restapi V2 Update Custom Action Association - -To programmatically associate a custom action to a ThoughtSpot object, use this endpoint - -```python -def restapi_v_2__update_custom_action_association(self, - body) -``` - -## Parameters - -| Parameter | Type | Tags | Description | -| --- | --- | --- | --- | -| `body` | [`TspublicRestV2CustomactionAssociationUpdateRequest`](../../doc/models/tspublic-rest-v2-customaction-association-update-request.md) | Body, Required | - | - -## Response Type - -`object` - -## Example Usage - -```python -body = TspublicRestV2CustomactionAssociationUpdateRequest() -body.id = 'id6' -body.association = 'association6' - -result = custom_actions_controller.restapi_v_2__update_custom_action_association(body) -``` - -## Errors - -| HTTP Status Code | Error Description | Exception Class | -| --- | --- | --- | -| 500 | Operation failed | [`ErrorResponseException`](../../doc/models/error-response-exception.md) | - - -# Restapi V2 Delete Custom Action Association - -To remove custom action associations to ThoughtSpot objects, use this endpoint - -```python -def restapi_v_2__delete_custom_action_association(self, - id, - association) -``` - -## Parameters - -| Parameter | Type | Tags | Description | -| --- | --- | --- | --- | -| `id` | `string` | Query, Required | GUID of the custom action | -| `association` | `string` | Query, Required | A JSON map of the attributes with association of the action to ThoughtSpot object ID

Example:

{"id":"0dbd5b3a-84c1-4407-9803-cf07d67e6fcf","name":"My worksheet action","version":"v2","type":"URL","detail":{"link":"https://unpkg.com","function":"my-worksheet-action","authSelect":"NONE","authToken":"","encodeUser":"","apiKey":"X-API-KEY","apiValue":"","additionalUrlHeaders":"{}"},"actionAssociationMap":{"WORKSHEET":{"2b9d083a-275c-4984-9cfe-90b036affa17":{"enabled":"true","context":"PRIMARY"}}},"context":"NONE","availability":[ ],"userGroupList":["d0326b56-ef23-4c8a-8327-a30e99bcc72b"]} | - -## Response Type - -`object` - -## Example Usage - -```python -id = 'id0' -association = 'association0' - -result = custom_actions_controller.restapi_v_2__delete_custom_action_association(id, association) -``` - -## Errors - -| HTTP Status Code | Error Description | Exception Class | -| --- | --- | --- | -| 500 | Operation failed | [`ErrorResponseException`](../../doc/models/error-response-exception.md) | - diff --git a/Python/doc/controllers/data.md b/Python/doc/controllers/data.md deleted file mode 100644 index c473f63cd..000000000 --- a/Python/doc/controllers/data.md +++ /dev/null @@ -1,193 +0,0 @@ -# Data - -```python -data_controller = client.data -``` - -## Class Name - -`DataController` - -## Methods - -* [Restapi V2 Search Query Data](../../doc/controllers/data.md#restapi-v2-search-query-data) -* [Restapi V2 Liveboard Data](../../doc/controllers/data.md#restapi-v2-liveboard-data) -* [Restapi V2 Answer Data](../../doc/controllers/data.md#restapi-v2-answer-data) -* [Restapi V2 Answer Query Sql](../../doc/controllers/data.md#restapi-v2-answer-query-sql) -* [Restapi V2 Liveboard Query Sql](../../doc/controllers/data.md#restapi-v2-liveboard-query-sql) - - -# Restapi V2 Search Query Data - -To programmatically retrieve data from ThoughtSpot using search query string, use this endpoint - -```python -def restapi_v_2__search_query_data(self, - body) -``` - -## Parameters - -| Parameter | Type | Tags | Description | -| --- | --- | --- | --- | -| `body` | [`TspublicRestV2DataSearchRequest`](../../doc/models/tspublic-rest-v2-data-search-request.md) | Body, Required | - | - -## Response Type - -`object` - -## Example Usage - -```python -body = TspublicRestV2DataSearchRequest() -body.query_string = 'queryString0' -body.data_object_id = 'dataObjectId6' - -result = data_controller.restapi_v_2__search_query_data(body) -``` - -## Errors - -| HTTP Status Code | Error Description | Exception Class | -| --- | --- | --- | -| 500 | Operation failed | [`ErrorResponseException`](../../doc/models/error-response-exception.md) | - - -# Restapi V2 Liveboard Data - -To retrieve data related to a Liveboard or visualization from the ThoughtSpot system, you can use this endpoint - -```python -def restapi_v_2__liveboard_data(self, - body) -``` - -## Parameters - -| Parameter | Type | Tags | Description | -| --- | --- | --- | --- | -| `body` | [`TspublicRestV2DataLiveboardRequest`](../../doc/models/tspublic-rest-v2-data-liveboard-request.md) | Body, Required | - | - -## Response Type - -`object` - -## Example Usage - -```python -body = TspublicRestV2DataLiveboardRequest() - -result = data_controller.restapi_v_2__liveboard_data(body) -``` - -## Errors - -| HTTP Status Code | Error Description | Exception Class | -| --- | --- | --- | -| 500 | Operation failed | [`ErrorResponseException`](../../doc/models/error-response-exception.md) | - - -# Restapi V2 Answer Data - -To retrieve data related to a Answer from the ThoughtSpot system, you can use this endpoint - -```python -def restapi_v_2__answer_data(self, - body) -``` - -## Parameters - -| Parameter | Type | Tags | Description | -| --- | --- | --- | --- | -| `body` | [`TspublicRestV2DataAnswerRequest`](../../doc/models/tspublic-rest-v2-data-answer-request.md) | Body, Required | - | - -## Response Type - -`object` - -## Example Usage - -```python -body = TspublicRestV2DataAnswerRequest() -body.id = 'id6' - -result = data_controller.restapi_v_2__answer_data(body) -``` - -## Errors - -| HTTP Status Code | Error Description | Exception Class | -| --- | --- | --- | -| 500 | Operation failed | [`ErrorResponseException`](../../doc/models/error-response-exception.md) | - - -# Restapi V2 Answer Query Sql - -To retrieve the query SQL related to an Answer that is run on the data platform, you can use this endpoint - -```python -def restapi_v_2__answer_query_sql(self, - id) -``` - -## Parameters - -| Parameter | Type | Tags | Description | -| --- | --- | --- | --- | -| `id` | `string` | Query, Required | The GUID of the Answer | - -## Response Type - -[`AnswerQueryResponse`](../../doc/models/answer-query-response.md) - -## Example Usage - -```python -id = 'id0' - -result = data_controller.restapi_v_2__answer_query_sql(id) -``` - -## Errors - -| HTTP Status Code | Error Description | Exception Class | -| --- | --- | --- | -| 500 | Operation failed | [`ErrorResponseException`](../../doc/models/error-response-exception.md) | - - -# Restapi V2 Liveboard Query Sql - -To retrieve the query SQL related to a Visualization in a Liveboard that is run on the data platform, you can use this endpoint - -```python -def restapi_v_2__liveboard_query_sql(self, - id, - viz_id=None) -``` - -## Parameters - -| Parameter | Type | Tags | Description | -| --- | --- | --- | --- | -| `id` | `string` | Query, Required | The GUID of the Answer | -| `viz_id` | `List of string` | Query, Optional | A JSON array of GUIDs of the visualizations in the Liveboard. | - -## Response Type - -[`LiveboardQueryResponse`](../../doc/models/liveboard-query-response.md) - -## Example Usage - -```python -id = 'id0' - -result = data_controller.restapi_v_2__liveboard_query_sql(id) -``` - -## Errors - -| HTTP Status Code | Error Description | Exception Class | -| --- | --- | --- | -| 500 | Operation failed | [`ErrorResponseException`](../../doc/models/error-response-exception.md) | - diff --git a/Python/doc/controllers/database.md b/Python/doc/controllers/database.md deleted file mode 100644 index 22ea1bebc..000000000 --- a/Python/doc/controllers/database.md +++ /dev/null @@ -1,199 +0,0 @@ -# Database - -```python -database_controller = client.database -``` - -## Class Name - -`DatabaseController` - -## Methods - -* [Restapi V2 Get Schemas](../../doc/controllers/database.md#restapi-v2-get-schemas) -* [Restapi V2 Get Tables](../../doc/controllers/database.md#restapi-v2-get-tables) -* [Restapi V2 Get Table Details](../../doc/controllers/database.md#restapi-v2-get-table-details) -* [Restapi V2 Create Table](../../doc/controllers/database.md#restapi-v2-create-table) -* [Restapi V2 Run Query](../../doc/controllers/database.md#restapi-v2-run-query) - - -# Restapi V2 Get Schemas - -To list all the schemas in a database in Falcon, use this endpoint. - -```python -def restapi_v_2__get_schemas(self, - database) -``` - -## Parameters - -| Parameter | Type | Tags | Description | -| --- | --- | --- | --- | -| `database` | `string` | Query, Required | Name of the Falcon database | - -## Response Type - -`List of string` - -## Example Usage - -```python -database = 'database0' - -result = database_controller.restapi_v_2__get_schemas(database) -``` - -## Errors - -| HTTP Status Code | Error Description | Exception Class | -| --- | --- | --- | -| 500 | Operation failed | [`ErrorResponseException`](../../doc/models/error-response-exception.md) | - - -# Restapi V2 Get Tables - -To list all the tables in a schema of a database in Falcon, use this endpoint. - -```python -def restapi_v_2__get_tables(self, - database, - schema) -``` - -## Parameters - -| Parameter | Type | Tags | Description | -| --- | --- | --- | --- | -| `database` | `string` | Query, Required | Name of the Falcon database | -| `schema` | `string` | Query, Required | Name of the schema in Falcon database | - -## Response Type - -`List of string` - -## Example Usage - -```python -database = 'database0' -schema = 'schema2' - -result = database_controller.restapi_v_2__get_tables(database, schema) -``` - -## Errors - -| HTTP Status Code | Error Description | Exception Class | -| --- | --- | --- | -| 500 | Operation failed | [`ErrorResponseException`](../../doc/models/error-response-exception.md) | - - -# Restapi V2 Get Table Details - -Note: This endpoint is applicable only for on-prem deployments. - -To provide details of a table in a schema of a database in Falcon, use this endpoint. - -```python -def restapi_v_2__get_table_details(self, - database, - table, - schema=None) -``` - -## Parameters - -| Parameter | Type | Tags | Description | -| --- | --- | --- | --- | -| `database` | `string` | Query, Required | Name of the Falcon database | -| `table` | `string` | Query, Required | Name of the table in Falcon database | -| `schema` | `string` | Query, Optional | Name of the schema in Falcon database | - -## Response Type - -`object` - -## Example Usage - -```python -database = 'database0' -table = 'table2' - -result = database_controller.restapi_v_2__get_table_details(database, table) -``` - -## Errors - -| HTTP Status Code | Error Description | Exception Class | -| --- | --- | --- | -| 500 | Operation failed | [`ErrorResponseException`](../../doc/models/error-response-exception.md) | - - -# Restapi V2 Create Table - -To create a table in Falcon, use this endpoint. - -```python -def restapi_v_2__create_table(self, - body) -``` - -## Parameters - -| Parameter | Type | Tags | Description | -| --- | --- | --- | --- | -| `body` | [`TspublicRestV2DatabaseTableCreateRequest`](../../doc/models/tspublic-rest-v2-database-table-create-request.md) | Body, Required | - | - -## Response Type - -[`CreateTableResponse`](../../doc/models/create-table-response.md) - -## Example Usage - -```python -body = TspublicRestV2DatabaseTableCreateRequest() - -result = database_controller.restapi_v_2__create_table(body) -``` - -## Errors - -| HTTP Status Code | Error Description | Exception Class | -| --- | --- | --- | -| 500 | Operation failed | [`ErrorResponseException`](../../doc/models/error-response-exception.md) | - - -# Restapi V2 Run Query - -To run a TQL statement in Falcon, use this endpoint. You can run only following type of statements - Table DDL alter and Table rows update and delete. - -```python -def restapi_v_2__run_query(self, - body) -``` - -## Parameters - -| Parameter | Type | Tags | Description | -| --- | --- | --- | --- | -| `body` | [`TspublicRestV2DatabaseTableRunqueryRequest`](../../doc/models/tspublic-rest-v2-database-table-runquery-request.md) | Body, Required | - | - -## Response Type - -`List of object` - -## Example Usage - -```python -body = TspublicRestV2DatabaseTableRunqueryRequest() -body.statement = ['statement6', 'statement7'] - -result = database_controller.restapi_v_2__run_query(body) -``` - -## Errors - -| HTTP Status Code | Error Description | Exception Class | -| --- | --- | --- | -| 500 | Operation failed | [`ErrorResponseException`](../../doc/models/error-response-exception.md) | - diff --git a/Python/doc/controllers/group.md b/Python/doc/controllers/group.md deleted file mode 100644 index ec22a9b33..000000000 --- a/Python/doc/controllers/group.md +++ /dev/null @@ -1,421 +0,0 @@ -# Group - -```python -group_controller = client.group -``` - -## Class Name - -`GroupController` - -## Methods - -* [Restapi V2 Get Group](../../doc/controllers/group.md#restapi-v2-get-group) -* [Restapi V2 Create Group](../../doc/controllers/group.md#restapi-v2-create-group) -* [Restapi V2 Update Group](../../doc/controllers/group.md#restapi-v2-update-group) -* [Restapi V2 Delete Group](../../doc/controllers/group.md#restapi-v2-delete-group) -* [Restapi V2 Add Privileges to Group](../../doc/controllers/group.md#restapi-v2-add-privileges-to-group) -* [Restapi V2 Remove Privileges From Group](../../doc/controllers/group.md#restapi-v2-remove-privileges-from-group) -* [Restapi V2 Add Users to Group](../../doc/controllers/group.md#restapi-v2-add-users-to-group) -* [Restapi V2 Remove Users From Group](../../doc/controllers/group.md#restapi-v2-remove-users-from-group) -* [Restapi V2 Add Groups to Group](../../doc/controllers/group.md#restapi-v2-add-groups-to-group) -* [Restapi V2 Remove Groups From Group](../../doc/controllers/group.md#restapi-v2-remove-groups-from-group) -* [Restapi V2 Search Groups](../../doc/controllers/group.md#restapi-v2-search-groups) - - -# Restapi V2 Get Group - -To get the details of a specific group by name or id, use this endpoint. -At Least one value needed. When both are given id will be considered to fetch user information. - -```python -def restapi_v_2__get_group(self, - name=None, - id=None) -``` - -## Parameters - -| Parameter | Type | Tags | Description | -| --- | --- | --- | --- | -| `name` | `string` | Query, Optional | Name of the group | -| `id` | `string` | Query, Optional | The GUID of the group to query. | - -## Response Type - -[`GroupResponse`](../../doc/models/group-response.md) - -## Example Usage - -```python -result = group_controller.restapi_v_2__get_group() -``` - -## Errors - -| HTTP Status Code | Error Description | Exception Class | -| --- | --- | --- | -| 500 | Operation failed | [`ErrorResponseException`](../../doc/models/error-response-exception.md) | - - -# Restapi V2 Create Group - -To programmatically create a group in the ThoughtSpot system, use this API endpoint. Using this API, you can create a group and assign privileges and users. For ease of user management and access control, ThoughtSpot administrators can create groups and assign privileges to these groups. The privileges determine the actions that the users belonging to a group are allowed to do. ThoughtSpot also has a default group called ALL_GROUP. When you create new group in ThoughtSpot, they are automatically added to ALL_GROUP. You cannot delete the ALL_GROUP or remove members from it. - -```python -def restapi_v_2__create_group(self, - body) -``` - -## Parameters - -| Parameter | Type | Tags | Description | -| --- | --- | --- | --- | -| `body` | [`TspublicRestV2GroupCreateRequest`](../../doc/models/tspublic-rest-v2-group-create-request.md) | Body, Required | - | - -## Response Type - -[`GroupResponse`](../../doc/models/group-response.md) - -## Example Usage - -```python -body = TspublicRestV2GroupCreateRequest() -body.name = 'name6' -body.display_name = 'displayName6' - -result = group_controller.restapi_v_2__create_group(body) -``` - -## Errors - -| HTTP Status Code | Error Description | Exception Class | -| --- | --- | --- | -| 500 | Operation failed | [`ErrorResponseException`](../../doc/models/error-response-exception.md) | - - -# Restapi V2 Update Group - -You can use this endpoint to programmatically modify an existing user account. -To modify a user, you require admin user privileges. -At least one of User Id or username is mandatory. When both are given, then user id will be considered and username will be updated - -```python -def restapi_v_2__update_group(self, - body) -``` - -## Parameters - -| Parameter | Type | Tags | Description | -| --- | --- | --- | --- | -| `body` | [`TspublicRestV2GroupUpdateRequest`](../../doc/models/tspublic-rest-v2-group-update-request.md) | Body, Required | - | - -## Response Type - -`bool` - -## Example Usage - -```python -body = TspublicRestV2GroupUpdateRequest() - -result = group_controller.restapi_v_2__update_group(body) -``` - -## Errors - -| HTTP Status Code | Error Description | Exception Class | -| --- | --- | --- | -| 500 | Operation failed | [`ErrorResponseException`](../../doc/models/error-response-exception.md) | - - -# Restapi V2 Delete Group - -To remove a group from the ThoughtSpot system, send a DELETE request to this endpoint. At Least one value needed. When both are given user id will be considered to fetch user information. - -```python -def restapi_v_2__delete_group(self, - name=None, - id=None) -``` - -## Parameters - -| Parameter | Type | Tags | Description | -| --- | --- | --- | --- | -| `name` | `string` | Query, Optional | Name of the group. | -| `id` | `string` | Query, Optional | The GUID of the group | - -## Response Type - -`bool` - -## Example Usage - -```python -result = group_controller.restapi_v_2__delete_group() -``` - -## Errors - -| HTTP Status Code | Error Description | Exception Class | -| --- | --- | --- | -| 500 | Operation failed | [`ErrorResponseException`](../../doc/models/error-response-exception.md) | - - -# Restapi V2 Add Privileges to Group - -To programmatically add privileges to an existing group, use API endpoint. -When you assign privileges to a group, all the users under to this group inherits the privileges assigned to that group. -At least one of id or name of group is required. When both are given user id will be considered. - -```python -def restapi_v_2__add_privileges_to_group(self, - body) -``` - -## Parameters - -| Parameter | Type | Tags | Description | -| --- | --- | --- | --- | -| `body` | [`TspublicRestV2GroupAddprivilegeRequest`](../../doc/models/tspublic-rest-v2-group-addprivilege-request.md) | Body, Required | - | - -## Response Type - -`bool` - -## Example Usage - -```python -body = TspublicRestV2GroupAddprivilegeRequest() - -result = group_controller.restapi_v_2__add_privileges_to_group(body) -``` - -## Errors - -| HTTP Status Code | Error Description | Exception Class | -| --- | --- | --- | -| 500 | Operation failed | [`ErrorResponseException`](../../doc/models/error-response-exception.md) | - - -# Restapi V2 Remove Privileges From Group - -To programmatically remove privileges from a group, use API endpoint. The API removes only the privilege association. It does not delete the privilege or group from the Thoughtspot system. At least one of id or name of group is required. When both are given user id will be considered. - -```python -def restapi_v_2__remove_privileges_from_group(self, - body) -``` - -## Parameters - -| Parameter | Type | Tags | Description | -| --- | --- | --- | --- | -| `body` | [`TspublicRestV2GroupRemoveprivilegeRequest`](../../doc/models/tspublic-rest-v2-group-removeprivilege-request.md) | Body, Required | - | - -## Response Type - -`bool` - -## Example Usage - -```python -body = TspublicRestV2GroupRemoveprivilegeRequest() - -result = group_controller.restapi_v_2__remove_privileges_from_group(body) -``` - -## Errors - -| HTTP Status Code | Error Description | Exception Class | -| --- | --- | --- | -| 500 | Operation failed | [`ErrorResponseException`](../../doc/models/error-response-exception.md) | - - -# Restapi V2 Add Users to Group - -To programmatically add existing ThoughtSpot users to a group, use this API endpoint. When you assign users to a group, the users inherits the privileges assigned to that group. At least one of id or name of the group is required. When both are given user id will be considered. - -```python -def restapi_v_2__add_users_to_group(self, - body) -``` - -## Parameters - -| Parameter | Type | Tags | Description | -| --- | --- | --- | --- | -| `body` | [`TspublicRestV2GroupAdduserRequest`](../../doc/models/tspublic-rest-v2-group-adduser-request.md) | Body, Required | - | - -## Response Type - -`bool` - -## Example Usage - -```python -body = TspublicRestV2GroupAdduserRequest() -body.users = [] - -body.users.append(UserNameAndIDInput()) - - -result = group_controller.restapi_v_2__add_users_to_group(body) -``` - -## Errors - -| HTTP Status Code | Error Description | Exception Class | -| --- | --- | --- | -| 500 | Operation failed | [`ErrorResponseException`](../../doc/models/error-response-exception.md) | - - -# Restapi V2 Remove Users From Group - -To programmatically remove users from a group, use API endpoint.The API removes only the user association. It does not delete the users or group from the Thoughtspot system. At least one of id or name of group is required. When both are given user id will be considered. - -```python -def restapi_v_2__remove_users_from_group(self, - body) -``` - -## Parameters - -| Parameter | Type | Tags | Description | -| --- | --- | --- | --- | -| `body` | [`TspublicRestV2GroupRemoveuserRequest`](../../doc/models/tspublic-rest-v2-group-removeuser-request.md) | Body, Required | - | - -## Response Type - -`bool` - -## Example Usage - -```python -body = TspublicRestV2GroupRemoveuserRequest() -body.users = [] - -body.users.append(UserNameAndIDInput()) - - -result = group_controller.restapi_v_2__remove_users_from_group(body) -``` - -## Errors - -| HTTP Status Code | Error Description | Exception Class | -| --- | --- | --- | -| 500 | Operation failed | [`ErrorResponseException`](../../doc/models/error-response-exception.md) | - - -# Restapi V2 Add Groups to Group - -To programmatically add existing groups to a group, use API endpoint. When you assign groups to a group, the group inherits the privileges assigned to those groups. At least one of id or name of group is required. When both are given user id will be considered. - -```python -def restapi_v_2__add_groups_to_group(self, - body) -``` - -## Parameters - -| Parameter | Type | Tags | Description | -| --- | --- | --- | --- | -| `body` | [`TspublicRestV2GroupAddgroupRequest`](../../doc/models/tspublic-rest-v2-group-addgroup-request.md) | Body, Required | - | - -## Response Type - -`bool` - -## Example Usage - -```python -body = TspublicRestV2GroupAddgroupRequest() -body.groups = [] - -body.groups.append(GroupNameAndIDInput()) - - -result = group_controller.restapi_v_2__add_groups_to_group(body) -``` - -## Errors - -| HTTP Status Code | Error Description | Exception Class | -| --- | --- | --- | -| 500 | Operation failed | [`ErrorResponseException`](../../doc/models/error-response-exception.md) | - - -# Restapi V2 Remove Groups From Group - -To programmatically remove groups from a group, use API endpoint.The API removes only the group association. It does not delete the group from the Thoughtspot system. At least one of id or name of group is required. When both are given user id will be considered. - -```python -def restapi_v_2__remove_groups_from_group(self, - body) -``` - -## Parameters - -| Parameter | Type | Tags | Description | -| --- | --- | --- | --- | -| `body` | [`TspublicRestV2GroupRemovegroupRequest`](../../doc/models/tspublic-rest-v2-group-removegroup-request.md) | Body, Required | - | - -## Response Type - -`bool` - -## Example Usage - -```python -body = TspublicRestV2GroupRemovegroupRequest() -body.groups = [] - -body.groups.append(GroupNameAndIDInput()) - - -result = group_controller.restapi_v_2__remove_groups_from_group(body) -``` - -## Errors - -| HTTP Status Code | Error Description | Exception Class | -| --- | --- | --- | -| 500 | Operation failed | [`ErrorResponseException`](../../doc/models/error-response-exception.md) | - - -# Restapi V2 Search Groups - -To get the details of a specific group account or all groups in the ThoughtSpot system, use this end point. - -```python -def restapi_v_2__search_groups(self, - body) -``` - -## Parameters - -| Parameter | Type | Tags | Description | -| --- | --- | --- | --- | -| `body` | [`TspublicRestV2GroupSearchRequest`](../../doc/models/tspublic-rest-v2-group-search-request.md) | Body, Required | - | - -## Response Type - -`object` - -## Example Usage - -```python -body = TspublicRestV2GroupSearchRequest() - -result = group_controller.restapi_v_2__search_groups(body) -``` - -## Errors - -| HTTP Status Code | Error Description | Exception Class | -| --- | --- | --- | -| 500 | Operation failed | [`ErrorResponseException`](../../doc/models/error-response-exception.md) | - diff --git a/Python/doc/controllers/logs.md b/Python/doc/controllers/logs.md deleted file mode 100644 index bb5d82cd2..000000000 --- a/Python/doc/controllers/logs.md +++ /dev/null @@ -1,56 +0,0 @@ -# Logs - -```python -logs_controller = client.logs -``` - -## Class Name - -`LogsController` - - -# Restapi V2 Get Log Events - -Note: This endpoint is applicable only for SAAS deployments. - -The ThoughtSpot log streaming service API allows you to programmatically get a security audit event log from the ThoughtSpot system. - -To use this API, make sure you have admin user privileges. - -ThoughtSpot cloud deployments allow you to collect security audit events and send them to your Security information and event management (SIEM) application in real-time. - -These events can help your security operations personnel to detect potential security threats or compromised user accounts in your organization. - -```python -def restapi_v_2__get_log_events(self, - topic, - from_epoch=None, - to_epoch=None) -``` - -## Parameters - -| Parameter | Type | Tags | Description | -| --- | --- | --- | --- | -| `topic` | [`TopicEnum`](../../doc/models/topic-enum.md) | Query, Required | Type of the log | -| `from_epoch` | `string` | Query, Optional | The EPOCH time in milliseconds to set the start time for streaming logs.

Example: To set the timestamp as June 1, 2021 8 am, specify 1622534400000. | -| `to_epoch` | `string` | Query, Optional | The EPOCH time in milliseconds to set the end time for streaming logs.

Example: To set the timestamp as July 1, 2021, 8 am, specify 1625126400000. | - -## Response Type - -[`LogsResponse`](../../doc/models/logs-response.md) - -## Example Usage - -```python -topic = TopicEnum.SECURITY_LOGS - -result = logs_controller.restapi_v_2__get_log_events(topic) -``` - -## Errors - -| HTTP Status Code | Error Description | Exception Class | -| --- | --- | --- | -| 500 | Operation failed | [`ErrorResponseException`](../../doc/models/error-response-exception.md) | - diff --git a/Python/doc/controllers/materialization.md b/Python/doc/controllers/materialization.md deleted file mode 100644 index 07e834337..000000000 --- a/Python/doc/controllers/materialization.md +++ /dev/null @@ -1,45 +0,0 @@ -# Materialization - -```python -materialization_controller = client.materialization -``` - -## Class Name - -`MaterializationController` - - -# Restapi V2 Refresh Materialized View - -Use this endpoint to refresh data in the materialized view by running the query associated with it - -```python -def restapi_v_2__refresh_materialized_view(self, - body) -``` - -## Parameters - -| Parameter | Type | Tags | Description | -| --- | --- | --- | --- | -| `body` | [`TspublicRestV2MaterializationRefreshviewRequest`](../../doc/models/tspublic-rest-v2-materialization-refreshview-request.md) | Body, Required | - | - -## Response Type - -`object` - -## Example Usage - -```python -body = TspublicRestV2MaterializationRefreshviewRequest() -body.id = 'id6' - -result = materialization_controller.restapi_v_2__refresh_materialized_view(body) -``` - -## Errors - -| HTTP Status Code | Error Description | Exception Class | -| --- | --- | --- | -| 500 | Operation failed | [`ErrorResponseException`](../../doc/models/error-response-exception.md) | - diff --git a/Python/doc/controllers/metadata.md b/Python/doc/controllers/metadata.md deleted file mode 100644 index eb5a71e4f..000000000 --- a/Python/doc/controllers/metadata.md +++ /dev/null @@ -1,788 +0,0 @@ -# Metadata - -```python -metadata_controller = client.metadata -``` - -## Class Name - -`MetadataController` - -## Methods - -* [Restapi V2 Get Tag](../../doc/controllers/metadata.md#restapi-v2-get-tag) -* [Restapi V2 Get Home Liveboard](../../doc/controllers/metadata.md#restapi-v2-get-home-liveboard) -* [Restapi V2 Search Object Header](../../doc/controllers/metadata.md#restapi-v2-search-object-header) -* [Restapi V2 Get Object Visualization Header](../../doc/controllers/metadata.md#restapi-v2-get-object-visualization-header) -* [Restapi V2 Get Object Detail](../../doc/controllers/metadata.md#restapi-v2-get-object-detail) -* [Restapi V2 Get Object Header](../../doc/controllers/metadata.md#restapi-v2-get-object-header) -* [Restapi V2 Search Object Detail](../../doc/controllers/metadata.md#restapi-v2-search-object-detail) -* [Restapi V2 Create Tag](../../doc/controllers/metadata.md#restapi-v2-create-tag) -* [Restapi V2 Update Tag](../../doc/controllers/metadata.md#restapi-v2-update-tag) -* [Restapi V2 Delete Tag](../../doc/controllers/metadata.md#restapi-v2-delete-tag) -* [Restapi V2 Assign Tag](../../doc/controllers/metadata.md#restapi-v2-assign-tag) -* [Restapi V2 Unassign Tag](../../doc/controllers/metadata.md#restapi-v2-unassign-tag) -* [Restapi V2 Assign Favorite](../../doc/controllers/metadata.md#restapi-v2-assign-favorite) -* [Restapi V2 Unassign Favorite](../../doc/controllers/metadata.md#restapi-v2-unassign-favorite) -* [Restapi V2 Assign Home Liveboard](../../doc/controllers/metadata.md#restapi-v2-assign-home-liveboard) -* [Restapi V2 Unassign Home Liveboard](../../doc/controllers/metadata.md#restapi-v2-unassign-home-liveboard) -* [Restapi V2 Export Object TML](../../doc/controllers/metadata.md#restapi-v2-export-object-tml) -* [Restapi V2 Import Object TML](../../doc/controllers/metadata.md#restapi-v2-import-object-tml) -* [Restapi V2 Delete Object](../../doc/controllers/metadata.md#restapi-v2-delete-object) -* [Restapi V2 Get Object Dependency](../../doc/controllers/metadata.md#restapi-v2-get-object-dependency) - - -# Restapi V2 Get Tag - -To get details of a specific tag, use this endpoint. At least one of id or name of tag is required. When both are given, then id will be considered. - -```python -def restapi_v_2__get_tag(self, - name=None, - id=None) -``` - -## Parameters - -| Parameter | Type | Tags | Description | -| --- | --- | --- | --- | -| `name` | `string` | Query, Optional | Name of the tag | -| `id` | `string` | Query, Optional | The GUID of the tag | - -## Response Type - -[`MetadataTagResponse`](../../doc/models/metadata-tag-response.md) - -## Example Usage - -```python -result = metadata_controller.restapi_v_2__get_tag() -``` - -## Errors - -| HTTP Status Code | Error Description | Exception Class | -| --- | --- | --- | -| 500 | Operation failed | [`ErrorResponseException`](../../doc/models/error-response-exception.md) | - - -# Restapi V2 Get Home Liveboard - -To get the name and id of liveboard that is set as a home liveboard for a user, use this endpoint. At least one of user id or username is required. When both are given, then id will be considered. - -```python -def restapi_v_2__get_home_liveboard(self, - user_name=None, - user_id=None) -``` - -## Parameters - -| Parameter | Type | Tags | Description | -| --- | --- | --- | --- | -| `user_name` | `string` | Query, Optional | Name of the tag | -| `user_id` | `string` | Query, Optional | The GUID of the tag | - -## Response Type - -[`HomeLiveboardResponse`](../../doc/models/home-liveboard-response.md) - -## Example Usage - -```python -result = metadata_controller.restapi_v_2__get_home_liveboard() -``` - -## Errors - -| HTTP Status Code | Error Description | Exception Class | -| --- | --- | --- | -| 500 | Operation failed | [`ErrorResponseException`](../../doc/models/error-response-exception.md) | - - -# Restapi V2 Search Object Header - -To get header details for metadata objects, use this endpoint. You can provide as input selective fields to get the data for. - -```python -def restapi_v_2__search_object_header(self, - body) -``` - -## Parameters - -| Parameter | Type | Tags | Description | -| --- | --- | --- | --- | -| `body` | [`TspublicRestV2MetadataHeaderSearchRequest`](../../doc/models/tspublic-rest-v2-metadata-header-search-request.md) | Body, Required | - | - -## Response Type - -`object` - -## Example Usage - -```python -body = TspublicRestV2MetadataHeaderSearchRequest() -body.mtype = Type3Enum.USER - -result = metadata_controller.restapi_v_2__search_object_header(body) -``` - -## Errors - -| HTTP Status Code | Error Description | Exception Class | -| --- | --- | --- | -| 500 | Operation failed | [`ErrorResponseException`](../../doc/models/error-response-exception.md) | - - -# Restapi V2 Get Object Visualization Header - -Use this endpoint to get header details of visualization charts for a given liveboard or answer. At least one of id or name of liveboard or answer is required. When both are given, then id will be considered. - -```python -def restapi_v_2__get_object_visualization_header(self, - id) -``` - -## Parameters - -| Parameter | Type | Tags | Description | -| --- | --- | --- | --- | -| `id` | `string` | Query, Required | The GUID of the liveboard or answer | - -## Response Type - -`List of object` - -## Example Usage - -```python -id = 'id0' - -result = metadata_controller.restapi_v_2__get_object_visualization_header(id) -``` - -## Errors - -| HTTP Status Code | Error Description | Exception Class | -| --- | --- | --- | -| 500 | Operation failed | [`ErrorResponseException`](../../doc/models/error-response-exception.md) | - - -# Restapi V2 Get Object Detail - -Use this endpoint to get full details of metadata objects - -```python -def restapi_v_2__get_object_detail(self, - mtype, - id) -``` - -## Parameters - -| Parameter | Type | Tags | Description | -| --- | --- | --- | --- | -| `mtype` | [`Type4Enum`](../../doc/models/type-4-enum.md) | Query, Required | Type of the metadata object being searched. | -| `id` | `List of string` | Query, Required | A JSON array of GUIDs of the objects. | - -## Response Type - -`object` - -## Example Usage - -```python -mtype = Type4Enum.DATAOBJECT -id = ['id0'] - -result = metadata_controller.restapi_v_2__get_object_detail(mtype, id) -``` - -## Errors - -| HTTP Status Code | Error Description | Exception Class | -| --- | --- | --- | -| 500 | Operation failed | [`ErrorResponseException`](../../doc/models/error-response-exception.md) | - - -# Restapi V2 Get Object Header - -To get header detail of a metadata object, use this endpoint. You can provide as input selective fields to get the data for. - -```python -def restapi_v_2__get_object_header(self, - mtype, - id, - output_fields=None) -``` - -## Parameters - -| Parameter | Type | Tags | Description | -| --- | --- | --- | --- | -| `mtype` | [`Type5Enum`](../../doc/models/type-5-enum.md) | Query, Required | Type of the metadata object being searched. | -| `id` | `string` | Query, Required | GUID of the metadata object | -| `output_fields` | `List of string` | Query, Optional | Array of header field names that need to be included in the header response | - -## Response Type - -`object` - -## Example Usage - -```python -mtype = Type5Enum.COLUMN_ALL -id = 'id0' - -result = metadata_controller.restapi_v_2__get_object_header(mtype, id) -``` - -## Errors - -| HTTP Status Code | Error Description | Exception Class | -| --- | --- | --- | -| 500 | Operation failed | [`ErrorResponseException`](../../doc/models/error-response-exception.md) | - - -# Restapi V2 Search Object Detail - -Use this endpoint to get full details of metadata objects - -```python -def restapi_v_2__search_object_detail(self, - body) -``` - -## Parameters - -| Parameter | Type | Tags | Description | -| --- | --- | --- | --- | -| `body` | [`TspublicRestV2MetadataDetailSearchRequest`](../../doc/models/tspublic-rest-v2-metadata-detail-search-request.md) | Body, Required | - | - -## Response Type - -`object` - -## Example Usage - -```python -body = TspublicRestV2MetadataDetailSearchRequest() -body.mtype = Type6Enum.USER -body.id = ['id6', 'id7'] - -result = metadata_controller.restapi_v_2__search_object_detail(body) -``` - -## Errors - -| HTTP Status Code | Error Description | Exception Class | -| --- | --- | --- | -| 500 | Operation failed | [`ErrorResponseException`](../../doc/models/error-response-exception.md) | - - -# Restapi V2 Create Tag - -To programmatically create tags, use this endpoint - -```python -def restapi_v_2__create_tag(self, - body) -``` - -## Parameters - -| Parameter | Type | Tags | Description | -| --- | --- | --- | --- | -| `body` | [`TspublicRestV2MetadataTagCreateRequest`](../../doc/models/tspublic-rest-v2-metadata-tag-create-request.md) | Body, Required | - | - -## Response Type - -[`MetadataTagResponse`](../../doc/models/metadata-tag-response.md) - -## Example Usage - -```python -body = TspublicRestV2MetadataTagCreateRequest() -body.name = 'name6' - -result = metadata_controller.restapi_v_2__create_tag(body) -``` - -## Errors - -| HTTP Status Code | Error Description | Exception Class | -| --- | --- | --- | -| 500 | Operation failed | [`ErrorResponseException`](../../doc/models/error-response-exception.md) | - - -# Restapi V2 Update Tag - -To programmatically update tags, use this endpoint. At least one of id or name of tag is required. When both are given, then id will be considered. - -```python -def restapi_v_2__update_tag(self, - body) -``` - -## Parameters - -| Parameter | Type | Tags | Description | -| --- | --- | --- | --- | -| `body` | [`TspublicRestV2MetadataTagUpdateRequest`](../../doc/models/tspublic-rest-v2-metadata-tag-update-request.md) | Body, Required | - | - -## Response Type - -`bool` - -## Example Usage - -```python -body = TspublicRestV2MetadataTagUpdateRequest() - -result = metadata_controller.restapi_v_2__update_tag(body) -``` - -## Errors - -| HTTP Status Code | Error Description | Exception Class | -| --- | --- | --- | -| 500 | Operation failed | [`ErrorResponseException`](../../doc/models/error-response-exception.md) | - - -# Restapi V2 Delete Tag - -To programmatically delete tags, use this endpoint. At least one of id or name of tag is required. When both are given, then id will be considered. - -```python -def restapi_v_2__delete_tag(self, - name=None, - id=None) -``` - -## Parameters - -| Parameter | Type | Tags | Description | -| --- | --- | --- | --- | -| `name` | `string` | Query, Optional | Name of the tag | -| `id` | `string` | Query, Optional | The GUID of the tag | - -## Response Type - -`bool` - -## Example Usage - -```python -result = metadata_controller.restapi_v_2__delete_tag() -``` - -## Errors - -| HTTP Status Code | Error Description | Exception Class | -| --- | --- | --- | -| 500 | Operation failed | [`ErrorResponseException`](../../doc/models/error-response-exception.md) | - - -# Restapi V2 Assign Tag - -To programmatically assign tags to a metadata object, such as a liveboard, search answer, table, worksheet, or view, use this endpoint. At least one of id or name of tag is required. When both are given, then id will be considered. - -```python -def restapi_v_2__assign_tag(self, - body) -``` - -## Parameters - -| Parameter | Type | Tags | Description | -| --- | --- | --- | --- | -| `body` | [`TspublicRestV2MetadataTagAssignRequest`](../../doc/models/tspublic-rest-v2-metadata-tag-assign-request.md) | Body, Required | - | - -## Response Type - -`bool` - -## Example Usage - -```python -body = TspublicRestV2MetadataTagAssignRequest() -body.ts_object = [] - -body.ts_object.append(TsObjectInput()) -body.ts_object[0].id = 'id8' -body.ts_object[0].mtype = TypeEnum.DATAOBJECT - -body.ts_object.append(TsObjectInput()) -body.ts_object[1].id = 'id9' -body.ts_object[1].mtype = TypeEnum.CONNECTION - -body.ts_object.append(TsObjectInput()) -body.ts_object[2].id = 'id0' -body.ts_object[2].mtype = TypeEnum.ANSWER - - -result = metadata_controller.restapi_v_2__assign_tag(body) -``` - -## Errors - -| HTTP Status Code | Error Description | Exception Class | -| --- | --- | --- | -| 500 | Operation failed | [`ErrorResponseException`](../../doc/models/error-response-exception.md) | - - -# Restapi V2 Unassign Tag - -To programmatically unassign tags to a metadata object, such as a liveboard, search answer, table, worksheet, or view, use this endpoint. At least one of id or name of tag is required. When both are given, then id will be considered. - -```python -def restapi_v_2__unassign_tag(self, - body) -``` - -## Parameters - -| Parameter | Type | Tags | Description | -| --- | --- | --- | --- | -| `body` | [`TspublicRestV2MetadataTagUnassignRequest`](../../doc/models/tspublic-rest-v2-metadata-tag-unassign-request.md) | Body, Required | - | - -## Response Type - -`bool` - -## Example Usage - -```python -body = TspublicRestV2MetadataTagUnassignRequest() -body.ts_object = [] - -body.ts_object.append(TsObjectInput()) -body.ts_object[0].id = 'id8' -body.ts_object[0].mtype = TypeEnum.DATAOBJECT - -body.ts_object.append(TsObjectInput()) -body.ts_object[1].id = 'id9' -body.ts_object[1].mtype = TypeEnum.CONNECTION - -body.ts_object.append(TsObjectInput()) -body.ts_object[2].id = 'id0' -body.ts_object[2].mtype = TypeEnum.ANSWER - - -result = metadata_controller.restapi_v_2__unassign_tag(body) -``` - -## Errors - -| HTTP Status Code | Error Description | Exception Class | -| --- | --- | --- | -| 500 | Operation failed | [`ErrorResponseException`](../../doc/models/error-response-exception.md) | - - -# Restapi V2 Assign Favorite - -To programmatically assign objects to favorites for a given user account, use this endpoint. At least one of user id or username is required. When both are given, then id will be considered. - -```python -def restapi_v_2__assign_favorite(self, - body) -``` - -## Parameters - -| Parameter | Type | Tags | Description | -| --- | --- | --- | --- | -| `body` | [`TspublicRestV2MetadataFavoriteAssignRequest`](../../doc/models/tspublic-rest-v2-metadata-favorite-assign-request.md) | Body, Required | - | - -## Response Type - -`bool` - -## Example Usage - -```python -body = TspublicRestV2MetadataFavoriteAssignRequest() -body.ts_object = [] - -body.ts_object.append(TsObjectInput()) -body.ts_object[0].id = 'id8' -body.ts_object[0].mtype = TypeEnum.DATAOBJECT - -body.ts_object.append(TsObjectInput()) -body.ts_object[1].id = 'id9' -body.ts_object[1].mtype = TypeEnum.CONNECTION - -body.ts_object.append(TsObjectInput()) -body.ts_object[2].id = 'id0' -body.ts_object[2].mtype = TypeEnum.ANSWER - - -result = metadata_controller.restapi_v_2__assign_favorite(body) -``` - -## Errors - -| HTTP Status Code | Error Description | Exception Class | -| --- | --- | --- | -| 500 | Operation failed | [`ErrorResponseException`](../../doc/models/error-response-exception.md) | - - -# Restapi V2 Unassign Favorite - -To programmatically unassign objects to favorites for a given user account, use this endpoint. At least one of user id or username is required. When both are given, then id will be considered. - -```python -def restapi_v_2__unassign_favorite(self, - body) -``` - -## Parameters - -| Parameter | Type | Tags | Description | -| --- | --- | --- | --- | -| `body` | [`TspublicRestV2MetadataFavoriteUnassignRequest`](../../doc/models/tspublic-rest-v2-metadata-favorite-unassign-request.md) | Body, Required | - | - -## Response Type - -`bool` - -## Example Usage - -```python -body = TspublicRestV2MetadataFavoriteUnassignRequest() -body.ts_object = [] - -body.ts_object.append(TsObjectInput()) -body.ts_object[0].id = 'id8' -body.ts_object[0].mtype = TypeEnum.DATAOBJECT - -body.ts_object.append(TsObjectInput()) -body.ts_object[1].id = 'id9' -body.ts_object[1].mtype = TypeEnum.CONNECTION - -body.ts_object.append(TsObjectInput()) -body.ts_object[2].id = 'id0' -body.ts_object[2].mtype = TypeEnum.ANSWER - - -result = metadata_controller.restapi_v_2__unassign_favorite(body) -``` - -## Errors - -| HTTP Status Code | Error Description | Exception Class | -| --- | --- | --- | -| 500 | Operation failed | [`ErrorResponseException`](../../doc/models/error-response-exception.md) | - - -# Restapi V2 Assign Home Liveboard - -To assign a specific liveboard as a home liveboard for a user, use this endpoint. At least one of user id or username is required. When both are given, then id will be considered. - -```python -def restapi_v_2__assign_home_liveboard(self, - body) -``` - -## Parameters - -| Parameter | Type | Tags | Description | -| --- | --- | --- | --- | -| `body` | [`TspublicRestV2MetadataHomeliveboardAssignRequest`](../../doc/models/tspublic-rest-v2-metadata-homeliveboard-assign-request.md) | Body, Required | - | - -## Response Type - -`bool` - -## Example Usage - -```python -body = TspublicRestV2MetadataHomeliveboardAssignRequest() - -result = metadata_controller.restapi_v_2__assign_home_liveboard(body) -``` - -## Errors - -| HTTP Status Code | Error Description | Exception Class | -| --- | --- | --- | -| 500 | Operation failed | [`ErrorResponseException`](../../doc/models/error-response-exception.md) | - - -# Restapi V2 Unassign Home Liveboard - -To unassign the home liveboard set for a user, use this endpoint. At least one of user id or username is required. When both are given, then id will be considered. - -```python -def restapi_v_2__unassign_home_liveboard(self, - body) -``` - -## Parameters - -| Parameter | Type | Tags | Description | -| --- | --- | --- | --- | -| `body` | [`TspublicRestV2MetadataHomeliveboardUnassignRequest`](../../doc/models/tspublic-rest-v2-metadata-homeliveboard-unassign-request.md) | Body, Required | - | - -## Response Type - -`bool` - -## Example Usage - -```python -body = TspublicRestV2MetadataHomeliveboardUnassignRequest() - -result = metadata_controller.restapi_v_2__unassign_home_liveboard(body) -``` - -## Errors - -| HTTP Status Code | Error Description | Exception Class | -| --- | --- | --- | -| 500 | Operation failed | [`ErrorResponseException`](../../doc/models/error-response-exception.md) | - - -# Restapi V2 Export Object TML - -To export ThoughtSpot objects represented in ThoughtSpot Modeling Language (TML), use this endpoint - -```python -def restapi_v_2__export_object_tml(self, - body) -``` - -## Parameters - -| Parameter | Type | Tags | Description | -| --- | --- | --- | --- | -| `body` | [`TspublicRestV2MetadataTmlExportRequest`](../../doc/models/tspublic-rest-v2-metadata-tml-export-request.md) | Body, Required | - | - -## Response Type - -`object` - -## Example Usage - -```python -body = TspublicRestV2MetadataTmlExportRequest() -body.id = ['id6', 'id7'] - -result = metadata_controller.restapi_v_2__export_object_tml(body) -``` - -## Errors - -| HTTP Status Code | Error Description | Exception Class | -| --- | --- | --- | -| 500 | Operation failed | [`ErrorResponseException`](../../doc/models/error-response-exception.md) | - - -# Restapi V2 Import Object TML - -To import ThoughtSpot objects represented in ThoughtSpot Modeling Language (TML), use this endpoint - -```python -def restapi_v_2__import_object_tml(self, - body) -``` - -## Parameters - -| Parameter | Type | Tags | Description | -| --- | --- | --- | --- | -| `body` | [`TspublicRestV2MetadataTmlImportRequest`](../../doc/models/tspublic-rest-v2-metadata-tml-import-request.md) | Body, Required | - | - -## Response Type - -`object` - -## Example Usage - -```python -body = TspublicRestV2MetadataTmlImportRequest() -body.object_tml = ['objectTML5', 'objectTML6'] - -result = metadata_controller.restapi_v_2__import_object_tml(body) -``` - -## Errors - -| HTTP Status Code | Error Description | Exception Class | -| --- | --- | --- | -| 500 | Operation failed | [`ErrorResponseException`](../../doc/models/error-response-exception.md) | - - -# Restapi V2 Delete Object - -Use this endpoint to delete the metadata objects - -```python -def restapi_v_2__delete_object(self, - mtype, - id) -``` - -## Parameters - -| Parameter | Type | Tags | Description | -| --- | --- | --- | --- | -| `mtype` | [`Type4Enum`](../../doc/models/type-4-enum.md) | Query, Required | Type of the metadata object being searched | -| `id` | `List of string` | Query, Required | A JSON array of GUIDs of the objects | - -## Response Type - -`bool` - -## Example Usage - -```python -mtype = Type4Enum.DATAOBJECT -id = ['id0'] - -result = metadata_controller.restapi_v_2__delete_object(mtype, id) -``` - -## Errors - -| HTTP Status Code | Error Description | Exception Class | -| --- | --- | --- | -| 500 | Operation failed | [`ErrorResponseException`](../../doc/models/error-response-exception.md) | - - -# Restapi V2 Get Object Dependency - -To query the details of dependent objects and associate objects as dependents, you can use this API. Dependency is defined as relation between referenced and referencing objects. A referencing object is said to have a dependency on a referenced object, if the referenced object cannot be deleted without first deleting the referencing object. For example, consider a worksheet 'W1' that has a derived logical column 'C1' that has a reference to a base logical column 'C2'. This can be shown diagramatically as: W1-->C1-->C2. W1 has a dependency on C2 i.e. W1 is a referencing object and C2 is a referenced object. It is not possible to delete C2 without first deleting W1 because deletion of C2 will be prevented by the relationship between W1's column C1 and C2. Similarly C1 is said to have a dependency on C2 i.e. C1 is a referencing object and C2 is a referenced object. It is not possible to delete C2 without first deleting C1 - -```python -def restapi_v_2__get_object_dependency(self, - body) -``` - -## Parameters - -| Parameter | Type | Tags | Description | -| --- | --- | --- | --- | -| `body` | [`TspublicRestV2MetadataDependencyRequest`](../../doc/models/tspublic-rest-v2-metadata-dependency-request.md) | Body, Required | - | - -## Response Type - -`object` - -## Example Usage - -```python -body = TspublicRestV2MetadataDependencyRequest() -body.mtype = Type13Enum.COLUMN -body.id = ['id6', 'id7'] - -result = metadata_controller.restapi_v_2__get_object_dependency(body) -``` - -## Errors - -| HTTP Status Code | Error Description | Exception Class | -| --- | --- | --- | -| 500 | Operation failed | [`ErrorResponseException`](../../doc/models/error-response-exception.md) | - diff --git a/Python/doc/controllers/org.md b/Python/doc/controllers/org.md deleted file mode 100644 index 16a3c4c48..000000000 --- a/Python/doc/controllers/org.md +++ /dev/null @@ -1,207 +0,0 @@ -# Org - -```python -org_controller = client.org -``` - -## Class Name - -`OrgController` - -## Methods - -* [Restapi V2 Get Org](../../doc/controllers/org.md#restapi-v2-get-org) -* [Restapi V2 Create Org](../../doc/controllers/org.md#restapi-v2-create-org) -* [Restapi V2 Update Org](../../doc/controllers/org.md#restapi-v2-update-org) -* [Restapi V2 Delete Org](../../doc/controllers/org.md#restapi-v2-delete-org) -* [Restapi V2 Search Orgs](../../doc/controllers/org.md#restapi-v2-search-orgs) - - -# Restapi V2 Get Org - -To get the details of a specific organization by name or id, use this endpoint. - -At least one value needed. When both are given,then id will be considered to fetch organization information. - -Requires Administration privilege for tenant. - -```python -def restapi_v_2__get_org(self, - name=None, - id=None) -``` - -## Parameters - -| Parameter | Type | Tags | Description | -| --- | --- | --- | --- | -| `name` | `string` | Query, Optional | Name of the organization. | -| `id` | `int` | Query, Optional | The ID of the organization. | - -## Response Type - -[`OrgsResponse`](../../doc/models/orgs-response.md) - -## Example Usage - -```python -result = org_controller.restapi_v_2__get_org() -``` - -## Errors - -| HTTP Status Code | Error Description | Exception Class | -| --- | --- | --- | -| 500 | Operation failed | [`ErrorResponseException`](../../doc/models/error-response-exception.md) | - - -# Restapi V2 Create Org - -To programmatically create an organization in the ThoughtSpot system, use this API endpoint. - -Requires Administration privilege for tenant. - -```python -def restapi_v_2__create_org(self, - body) -``` - -## Parameters - -| Parameter | Type | Tags | Description | -| --- | --- | --- | --- | -| `body` | [`TspublicRestV2OrgCreateRequest`](../../doc/models/tspublic-rest-v2-org-create-request.md) | Body, Required | - | - -## Response Type - -[`OrgsResponse`](../../doc/models/orgs-response.md) - -## Example Usage - -```python -body = TspublicRestV2OrgCreateRequest() -body.name = 'name6' - -result = org_controller.restapi_v_2__create_org(body) -``` - -## Errors - -| HTTP Status Code | Error Description | Exception Class | -| --- | --- | --- | -| 500 | Operation failed | [`ErrorResponseException`](../../doc/models/error-response-exception.md) | - - -# Restapi V2 Update Org - -You can use this endpoint to programmatically modify an existing org. - -Provide name or id of the organization to update the properties. When both id and name are given, then id will be considered and name of the organization will be updated. - -Requires Administration privilege for tenant. - -```python -def restapi_v_2__update_org(self, - body) -``` - -## Parameters - -| Parameter | Type | Tags | Description | -| --- | --- | --- | --- | -| `body` | [`TspublicRestV2OrgUpdateRequest`](../../doc/models/tspublic-rest-v2-org-update-request.md) | Body, Required | - | - -## Response Type - -[`OrgsResponse`](../../doc/models/orgs-response.md) - -## Example Usage - -```python -body = TspublicRestV2OrgUpdateRequest() - -result = org_controller.restapi_v_2__update_org(body) -``` - -## Errors - -| HTTP Status Code | Error Description | Exception Class | -| --- | --- | --- | -| 500 | Operation failed | [`ErrorResponseException`](../../doc/models/error-response-exception.md) | - - -# Restapi V2 Delete Org - -To remove an organization from the ThoughtSpot system, send a DELETE request to this endpoint. - -At least one value is needed. When both id and name are given, then id will be considered. - -Requires Administration privilege for tenant. - -```python -def restapi_v_2__delete_org(self, - name=None, - id=None) -``` - -## Parameters - -| Parameter | Type | Tags | Description | -| --- | --- | --- | --- | -| `name` | `string` | Query, Optional | Name of the organization. | -| `id` | `int` | Query, Optional | The ID of the organization. | - -## Response Type - -`bool` - -## Example Usage - -```python -result = org_controller.restapi_v_2__delete_org() -``` - -## Errors - -| HTTP Status Code | Error Description | Exception Class | -| --- | --- | --- | -| 500 | Operation failed | [`ErrorResponseException`](../../doc/models/error-response-exception.md) | - - -# Restapi V2 Search Orgs - -To get the details of a specific organization or all organizations in the ThoughtSpot system use this end point. - -If no input is provided, then all organizations are included in the response. - -Requires Administration privilege for tenant. - -```python -def restapi_v_2__search_orgs(self, - body) -``` - -## Parameters - -| Parameter | Type | Tags | Description | -| --- | --- | --- | --- | -| `body` | [`TspublicRestV2OrgSearchRequest`](../../doc/models/tspublic-rest-v2-org-search-request.md) | Body, Required | - | - -## Response Type - -[`List of OrgsResponse`](../../doc/models/orgs-response.md) - -## Example Usage - -```python -body = TspublicRestV2OrgSearchRequest() - -result = org_controller.restapi_v_2__search_orgs(body) -``` - -## Errors - -| HTTP Status Code | Error Description | Exception Class | -| --- | --- | --- | -| 500 | Operation failed | [`ErrorResponseException`](../../doc/models/error-response-exception.md) | - diff --git a/Python/doc/controllers/report.md b/Python/doc/controllers/report.md deleted file mode 100644 index bea596bab..000000000 --- a/Python/doc/controllers/report.md +++ /dev/null @@ -1,100 +0,0 @@ -# Report - -```python -report_controller = client.report -``` - -## Class Name - -`ReportController` - -## Methods - -* [Restapi V2 Answer Report](../../doc/controllers/report.md#restapi-v2-answer-report) -* [Restapi V2 Liveboard Report](../../doc/controllers/report.md#restapi-v2-liveboard-report) - - -# Restapi V2 Answer Report - -To programmatically download Answer data as a file, use this endpoint. - -The PDF will download data in the tabular format even if Answer is saved as chart. - -```python -def restapi_v_2__answer_report(self, - id, - mtype) -``` - -## Parameters - -| Parameter | Type | Tags | Description | -| --- | --- | --- | --- | -| `id` | `string` | Query, Required | GUID of the Answer to download. | -| `mtype` | [`Type16Enum`](../../doc/models/type-16-enum.md) | Query, Required | Type of file to be generated. | - -## Response Type - -`object` - -## Example Usage - -```python -id = 'id0' -mtype = Type16Enum.PDF - -result = report_controller.restapi_v_2__answer_report(id, mtype) -``` - -## Errors - -| HTTP Status Code | Error Description | Exception Class | -| --- | --- | --- | -| 500 | Operation failed | [`ErrorResponseException`](../../doc/models/error-response-exception.md) | - - -# Restapi V2 Liveboard Report - -To programmatically download Liveboard data or specific Visualization data from Liveboard as a file, use this endpoint - -```python -def restapi_v_2__liveboard_report(self, - mtype, - id=None, - viz_id=None, - transient_content=None, - runtime_filter=None, - runtime_sort=None, - pdf_options=None) -``` - -## Parameters - -| Parameter | Type | Tags | Description | -| --- | --- | --- | --- | -| `mtype` | [`Type16Enum`](../../doc/models/type-16-enum.md) | Query, Required | Type of file to be generated. Valid values: CSV/XLSX/PDF/PNG. | -| `id` | `string` | Query, Optional | GUID of the Liveboard to download.

This field is considered only when no input is provided for transientContent field. | -| `viz_id` | `List of string` | Query, Optional | JSON Array of GUIDs of the visualizations in the Liveboard to be included in the downloaded file.

For CSV, XLSX and PNG file download, visualization id is mandatory. CSV and XLSX is valid only for visualization of type table and PNG is valid for charts.

Only one value will be accepted for these formats. If multiple values are provided then first value in the array will be considered. | -| `transient_content` | `string` | Query, Optional | If you have embedded ThoughtSpot in your host application, and you want to download Liveboards with unsaved changes as a file, pass the transient content from the browser fetch request, using the getExportRequestForCurrentPinboard method. For more information, see https://developers.thoughtspot.com/docs/?pageid=liveboard-export-api#transient-pinboard. | -| `runtime_filter` | `string` | Query, Optional | If you have embedded ThoughtSpot in your host application, and you want to download Liveboards with unsaved changes as a file, pass the transient content from the browser fetch request, using the getExportRequestForCurrentPinboard method. For more information, see https://developers.thoughtspot.com/docs/?pageid=liveboard-export-api#transient-pinboard . | -| `runtime_sort` | `string` | Query, Optional | JSON object which provides columns to sort the data at the time of data retrieval.

Example: {"sortCol1":"region","asc1":true,"sortCol2":"date"}

For more information, see https://developers.thoughtspot.com/docs/?pageid=runtime-filters | -| `pdf_options` | [`PdfOptionsInput`](../../doc/models/pdf-options-input.md) | Query, Optional | Additional options that are applicable for PDF type. | - -## Response Type - -`object` - -## Example Usage - -```python -mtype = Type16Enum.PDF - -result = report_controller.restapi_v_2__liveboard_report(mtype) -``` - -## Errors - -| HTTP Status Code | Error Description | Exception Class | -| --- | --- | --- | -| 500 | Operation failed | [`ErrorResponseException`](../../doc/models/error-response-exception.md) | - diff --git a/Python/doc/controllers/security.md b/Python/doc/controllers/security.md deleted file mode 100644 index 6ae7577b5..000000000 --- a/Python/doc/controllers/security.md +++ /dev/null @@ -1,276 +0,0 @@ -# Security - -```python -security_controller = client.security -``` - -## Class Name - -`SecurityController` - -## Methods - -* [Restapi V2 Get Permission on Object](../../doc/controllers/security.md#restapi-v2-get-permission-on-object) -* [Restapi V2 Get Permission for Principal](../../doc/controllers/security.md#restapi-v2-get-permission-for-principal) -* [Restapi V2 Share Object](../../doc/controllers/security.md#restapi-v2-share-object) -* [Restapi V2 Share Visualization](../../doc/controllers/security.md#restapi-v2-share-visualization) -* [Restapi V2 Search Permission on Objects](../../doc/controllers/security.md#restapi-v2-search-permission-on-objects) -* [Restapi V2 Search Permission for Principals](../../doc/controllers/security.md#restapi-v2-search-permission-for-principals) - - -# Restapi V2 Get Permission on Object - -To list the permissions for user and user groups on an object, use this endpoint. The response will include only those users and groups with have either VIEW OR MODIFY permission. - -You can optionally see the permission on the dependent objects as well by enabling includeDependent field. - -```python -def restapi_v_2__get_permission_on_object(self, - id, - mtype, - include_dependent=None) -``` - -## Parameters - -| Parameter | Type | Tags | Description | -| --- | --- | --- | --- | -| `id` | `string` | Query, Required | GUID of the metadata object for which the permission needs to be obtained. | -| `mtype` | [`Type7Enum`](../../doc/models/type-7-enum.md) | Query, Required | Type of metadata object. Valid values: Liveboard\|Answer\|DataObject\|Column | -| `include_dependent` | `bool` | Query, Optional | When this field is set to true, the API returns the permission details for the dependent objects for the the object included in the request | - -## Response Type - -[`SecurityPermissionResponse`](../../doc/models/security-permission-response.md) - -## Example Usage - -```python -id = 'id0' -mtype = Type7Enum.DATAOBJECT - -result = security_controller.restapi_v_2__get_permission_on_object(id, mtype) -``` - -## Errors - -| HTTP Status Code | Error Description | Exception Class | -| --- | --- | --- | -| 500 | Operation failed | [`ErrorResponseException`](../../doc/models/error-response-exception.md) | - - -# Restapi V2 Get Permission for Principal - -Use this endpoint to list the objects on which a user or user group has permission. The response will include only those objects on which the user or user group has either VIEW OR MODIFY permission. - -Requires administration privilege - -```python -def restapi_v_2__get_permission_for_principal(self, - id=None, - name=None) -``` - -## Parameters - -| Parameter | Type | Tags | Description | -| --- | --- | --- | --- | -| `id` | `string` | Query, Optional | GUID of the user or user group for which the object permission needs to be obtained | -| `name` | `string` | Query, Optional | Name of the ser or user group for which the object permission needs to be obtained | - -## Response Type - -[`PrincipalSearchResponse`](../../doc/models/principal-search-response.md) - -## Example Usage - -```python -result = security_controller.restapi_v_2__get_permission_for_principal() -``` - -## Errors - -| HTTP Status Code | Error Description | Exception Class | -| --- | --- | --- | -| 500 | Operation failed | [`ErrorResponseException`](../../doc/models/error-response-exception.md) | - - -# Restapi V2 Share Object - -To programmatically share ThoughtSpot objects with another user or user group, use this endpoint. - -When you share an object like a Liveboard or visualization, a notification with a live link is sent to the user. When the users access this object, they can view the last saved version of the object. - -```python -def restapi_v_2__share_object(self, - body) -``` - -## Parameters - -| Parameter | Type | Tags | Description | -| --- | --- | --- | --- | -| `body` | [`TspublicRestV2SecurityShareTsobjectRequest`](../../doc/models/tspublic-rest-v2-security-share-tsobject-request.md) | Body, Required | - | - -## Response Type - -`bool` - -## Example Usage - -```python -body = TspublicRestV2SecurityShareTsobjectRequest() -body.mtype = Type18Enum.DATAOBJECT -body.id = ['id6', 'id7'] -body.permission = 'permission8' - -result = security_controller.restapi_v_2__share_object(body) -``` - -## Errors - -| HTTP Status Code | Error Description | Exception Class | -| --- | --- | --- | -| 500 | Operation failed | [`ErrorResponseException`](../../doc/models/error-response-exception.md) | - - -# Restapi V2 Share Visualization - -If you want to share a specific visualization from a Liveboard with another user or user group, then use this endpoint. - -Requires privilege to share the visualization - -```python -def restapi_v_2__share_visualization(self, - body) -``` - -## Parameters - -| Parameter | Type | Tags | Description | -| --- | --- | --- | --- | -| `body` | [`TspublicRestV2SecurityShareVisualizationRequest`](../../doc/models/tspublic-rest-v2-security-share-visualization-request.md) | Body, Required | - | - -## Response Type - -`bool` - -## Example Usage - -```python -body = TspublicRestV2SecurityShareVisualizationRequest() -body.id = 'id6' -body.viz_id = 'vizId4' -body.principal_id = ['principalId2', 'principalId3'] - -result = security_controller.restapi_v_2__share_visualization(body) -``` - -## Errors - -| HTTP Status Code | Error Description | Exception Class | -| --- | --- | --- | -| 500 | Operation failed | [`ErrorResponseException`](../../doc/models/error-response-exception.md) | - - -# Restapi V2 Search Permission on Objects - -To list the permissions for user and user groups on a list of objects, use this endpoint. The response will include only those users and groups with have either VIEW OR MODIFY permission. - -You can either provide list of object ids or type of objects to list the permissions for. One of these inputs is mandatory. If both are provided then only object ids will be considred. - -You can optionally provide users or user groups for which the persmission needs to be displayed. - -You can optionally see the permission on the dependent objects as well by enabling includeDependent field. - -Requires administration privilege - -```python -def restapi_v_2__search_permission_on_objects(self, - body) -``` - -## Parameters - -| Parameter | Type | Tags | Description | -| --- | --- | --- | --- | -| `body` | [`TspublicRestV2SecurityPermissionTsobjectSearchRequest`](../../doc/models/tspublic-rest-v2-security-permission-tsobject-search-request.md) | Body, Required | - | - -## Response Type - -[`List of SecurityPermissionResponse`](../../doc/models/security-permission-response.md) - -## Example Usage - -```python -body = TspublicRestV2SecurityPermissionTsobjectSearchRequest() -body.ts_object = [] - -body.ts_object.append(TsObjectSearchInput()) -body.ts_object[0].mtype = Type2Enum.DATAOBJECT -body.ts_object[0].id = ['id8', 'id9'] - -body.ts_object.append(TsObjectSearchInput()) -body.ts_object[1].mtype = Type2Enum.COLUMN -body.ts_object[1].id = ['id9', 'id0', 'id1'] - -body.ts_object.append(TsObjectSearchInput()) -body.ts_object[2].mtype = Type2Enum.LIVEBOARD -body.ts_object[2].id = ['id0'] - - -result = security_controller.restapi_v_2__search_permission_on_objects(body) -``` - -## Errors - -| HTTP Status Code | Error Description | Exception Class | -| --- | --- | --- | -| 500 | Operation failed | [`ErrorResponseException`](../../doc/models/error-response-exception.md) | - - -# Restapi V2 Search Permission for Principals - -To list the permissions for user and user groups on a list of objects, use this endpoint. The response will include only those users and groups with have either VIEW OR MODIFY permission. - -You can either provide list of object ids or type of objects to list the permissions for. One of these inputs is mandatory. If both are provided then only object ids will be considred. - -You can optionally provide users or user groups for which the persmission needs to be displayed. - -You can optionally see the permission on the dependent objects as well by enabling includeDependent field. - -Requires administration privilege - -```python -def restapi_v_2__search_permission_for_principals(self, - body) -``` - -## Parameters - -| Parameter | Type | Tags | Description | -| --- | --- | --- | --- | -| `body` | [`TspublicRestV2SecurityPermissionPrincipalSearchRequest`](../../doc/models/tspublic-rest-v2-security-permission-principal-search-request.md) | Body, Required | - | - -## Response Type - -[`List of PrincipalSearchResponse`](../../doc/models/principal-search-response.md) - -## Example Usage - -```python -body = TspublicRestV2SecurityPermissionPrincipalSearchRequest() -body.principal = [] - -body.principal.append(UserNameAndIDInput()) - - -result = security_controller.restapi_v_2__search_permission_for_principals(body) -``` - -## Errors - -| HTTP Status Code | Error Description | Exception Class | -| --- | --- | --- | -| 500 | Operation failed | [`ErrorResponseException`](../../doc/models/error-response-exception.md) | - diff --git a/Python/doc/controllers/session.md b/Python/doc/controllers/session.md deleted file mode 100644 index a1c4f5833..000000000 --- a/Python/doc/controllers/session.md +++ /dev/null @@ -1,117 +0,0 @@ -# Session - -```python -session_controller = client.session -``` - -## Class Name - -`SessionController` - -## Methods - -* [Restapi V2 Login](../../doc/controllers/session.md#restapi-v2-login) -* [Restapi V2 Get Token](../../doc/controllers/session.md#restapi-v2-get-token) - - -# Restapi V2 Login - -You can programmatically create login session for a user in ThoughtSpot using this endpoint. - -You can create session by either providing userName and password as inputs in this request body or by including "Authorization" header with the token generated through the endpoint /tspublic/rest/v2/session/gettoken. - -userName and password input is given precedence over "Authorization" header, when both are included in the request. - -```python -def restapi_v_2__login(self, - user_name=None, - password=None, - remember_me=None) -``` - -## Parameters - -| Parameter | Type | Tags | Description | -| --- | --- | --- | --- | -| `user_name` | `string` | Query, Optional | Username of the user account | -| `password` | `string` | Query, Optional | The password of the user account | -| `remember_me` | `bool` | Query, Optional | A flag to remember the user session. When set to true, sets a session cookie that persists in subsequent API calls. | - -## Response Type - -[`SessionLoginResponse`](../../doc/models/session-login-response.md) - -## Example Usage - -```python -result = session_controller.restapi_v_2__login() -``` - -## Errors - -| HTTP Status Code | Error Description | Exception Class | -| --- | --- | --- | -| 500 | Operation failed | [`ErrorResponseException`](../../doc/models/error-response-exception.md) | - - -# Restapi V2 Get Token - -To programmatically create session token for a user in ThoughtSpot, use this endpoint. - -You can generate the token for a user by providing password or secret key from the cluster. - -You need to enable trusted authentication to generate secret key. To generate secret key, follow below steps. - -1. Click the Develop tab. - -2. Under Customizations, click Settings. - -3. To enable trusted authentication, turn on the toggle. - -4. A secret_key for trusted authentication is generated. - -5. Click the clipboard icon to copy the token. - -Password is given precedence over secretKey input, when both are included in the request. - -```python -def restapi_v_2__get_token(self, - user_name, - password=None, - secret_key=None, - access_level=None, - ts_object_id=None, - token_expiry_duration=None, - org_id=None) -``` - -## Parameters - -| Parameter | Type | Tags | Description | -| --- | --- | --- | --- | -| `user_name` | `string` | Query, Required | Username of the user account | -| `password` | `string` | Query, Optional | The password of the user account | -| `secret_key` | `string` | Query, Optional | The secret key string provided by the ThoughtSpot application server. ThoughtSpot generates this secret key when you enable trusted authentication. | -| `access_level` | [`AccessLevelEnum`](../../doc/models/access-level-enum.md) | Query, Optional | User access privilege.

FULL - Creates a session with full access.

REPORT_BOOK_VIEW - Allow view access to the specified visualizations. | -| `ts_object_id` | `string` | Query, Optional | GUID of the ThoughtSpot object. If you have set the accessLevel attribute to REPORT_BOOK_VIEW, specify the GUID of the Liveboard or visualization object. | -| `token_expiry_duration` | `string` | Query, Optional | Duration in seconds after which the token expires | -| `org_id` | `string` | Query, Optional | Id of the organization to be associated with the user login. If no input is provided then last logged in organization will be considered | - -## Response Type - -[`SessionLoginResponse`](../../doc/models/session-login-response.md) - -## Example Usage - -```python -user_name = 'userName2' - -result = session_controller.restapi_v_2__get_token(user_name) -``` - -## Errors - -| HTTP Status Code | Error Description | Exception Class | -| --- | --- | --- | -| 500 | Operation failed | [`ErrorResponseException`](../../doc/models/error-response-exception.md) | - diff --git a/Python/doc/controllers/user.md b/Python/doc/controllers/user.md deleted file mode 100644 index 0dcff30bd..000000000 --- a/Python/doc/controllers/user.md +++ /dev/null @@ -1,382 +0,0 @@ -# User - -```python -user_controller = client.user -``` - -## Class Name - -`UserController` - -## Methods - -* [Restapi V2 Get User](../../doc/controllers/user.md#restapi-v2-get-user) -* [Restapi V2 Create User](../../doc/controllers/user.md#restapi-v2-create-user) -* [Restapi V2 Update User](../../doc/controllers/user.md#restapi-v2-update-user) -* [Restapi V2 Delete User](../../doc/controllers/user.md#restapi-v2-delete-user) -* [Restapi V2 Add User to Groups](../../doc/controllers/user.md#restapi-v2-add-user-to-groups) -* [Restapi V2 Remove User From Groups](../../doc/controllers/user.md#restapi-v2-remove-user-from-groups) -* [Restapi V2 Search Users](../../doc/controllers/user.md#restapi-v2-search-users) -* [Restapi V2 Change Password of User](../../doc/controllers/user.md#restapi-v2-change-password-of-user) -* [Restapi V2 Add User to Orgs](../../doc/controllers/user.md#restapi-v2-add-user-to-orgs) - - -# Restapi V2 Get User - -To get the details of a specific user account by username or user id, use this endpoint. At Least one value is needed. When both are given, user id will be considered to fetch user information - -```python -def restapi_v_2__get_user(self, - name=None, - id=None) -``` - -## Parameters - -| Parameter | Type | Tags | Description | -| --- | --- | --- | --- | -| `name` | `string` | Query, Optional | Username of the user that you want to query. | -| `id` | `string` | Query, Optional | The GUID of the user account to query | - -## Response Type - -[`UserResponse`](../../doc/models/user-response.md) - -## Example Usage - -```python -result = user_controller.restapi_v_2__get_user() -``` - -## Errors - -| HTTP Status Code | Error Description | Exception Class | -| --- | --- | --- | -| 500 | Operation failed | [`ErrorResponseException`](../../doc/models/error-response-exception.md) | - - -# Restapi V2 Create User - -To programmatically create a user account in the ThoughtSpot system use this API endpoint. Using this API, you can create a user and assign groups. -To create a user, you require admin user privileges. -All users created in the ThoughtSpot system are added to ALL_GROUP - -```python -def restapi_v_2__create_user(self, - name, - display_name, - password, - visibility=None, - mail=None, - org_ids=None, - groups=None, - state=None, - notify_on_share=None, - show_walk_me=None, - analyst_onboarding_complete=None, - mtype=None) -``` - -## Parameters - -| Parameter | Type | Tags | Description | -| --- | --- | --- | --- | -| `name` | `string` | Query, Required | Name of the user. The username string must be unique. | -| `display_name` | `string` | Query, Required | A unique display name string for the user account, usually their first and last name | -| `password` | `string` | Query, Required | Password for the user account. | -| `visibility` | [`VisibilityEnum`](../../doc/models/visibility-enum.md) | Query, Optional | Visibility of the user. The visibility attribute is set to DEFAULT when creating a user. The DEFAULT attribute makes a user visible to other users and user groups, and this allows them to share objects | -| `mail` | `string` | Query, Optional | Email of the user account | -| `org_ids` | `List of int` | Query, Optional | Array of org identifiers. If no value is provided then user will be created in the organization associated with the login session. | -| `groups` | [`List of GroupNameAndIDInput`](../../doc/models/group-name-and-id-input.md) | Query, Optional | Array of objects of groups that the user belong to. | -| `state` | [`StateEnum`](../../doc/models/state-enum.md) | Query, Optional | Status of user account. acitve or inactive. | -| `notify_on_share` | `bool` | Query, Optional | User preference for receiving email notifications when another ThoughtSpot user shares answers or pinboards. | -| `show_walk_me` | `bool` | Query, Optional | The user preference for revisiting the onboarding experience. | -| `analyst_onboarding_complete` | `bool` | Query, Optional | ThoughtSpot provides an interactive guided walkthrough to onboard new users. The onboarding experience leads users through a set of actions to help users get started and accomplish their tasks quickly. The users can turn off the Onboarding experience and access it again when they need assistance with the ThoughtSpot UI. | -| `mtype` | [`Type8Enum`](../../doc/models/type-8-enum.md) | Query, Optional | Type of user. LOCAL_USER indicates that the user is created locally in the ThoughtSpot system. | - -## Response Type - -[`UserResponse`](../../doc/models/user-response.md) - -## Example Usage - -```python -name = 'name0' -display_name = 'displayName2' -password = 'password4' - -result = user_controller.restapi_v_2__create_user(name, display_name, password) -``` - -## Errors - -| HTTP Status Code | Error Description | Exception Class | -| --- | --- | --- | -| 500 | Operation failed | [`ErrorResponseException`](../../doc/models/error-response-exception.md) | - - -# Restapi V2 Update User - -You can use this endpoint to programmatically modify an existing user account. To modify a user, you require admin user privileges. -At least one of User Id or username is mandatory. When both are given, then user id will be considered and username will be updated - -```python -def restapi_v_2__update_user(self, - body) -``` - -## Parameters - -| Parameter | Type | Tags | Description | -| --- | --- | --- | --- | -| `body` | [`TspublicRestV2UserUpdateRequest`](../../doc/models/tspublic-rest-v2-user-update-request.md) | Body, Required | - | - -## Response Type - -`bool` - -## Example Usage - -```python -body = TspublicRestV2UserUpdateRequest() - -result = user_controller.restapi_v_2__update_user(body) -``` - -## Errors - -| HTTP Status Code | Error Description | Exception Class | -| --- | --- | --- | -| 500 | Operation failed | [`ErrorResponseException`](../../doc/models/error-response-exception.md) | - - -# Restapi V2 Delete User - -To remove a user from the ThoughtSpot system, use this endpoint. -At Least one value needed. When both are given user id will be considered to delete user. - -```python -def restapi_v_2__delete_user(self, - name=None, - id=None, - org_id=None) -``` - -## Parameters - -| Parameter | Type | Tags | Description | -| --- | --- | --- | --- | -| `name` | `string` | Query, Optional | Username of the user that you want to query. | -| `id` | `string` | Query, Optional | The GUID of the user account to query | -| `org_id` | `int` | Query, Optional | Unique identifier of the organization from which the user would be deleted. If no value is provided then user will be deleted from the organization associated with the login session. | - -## Response Type - -`bool` - -## Example Usage - -```python -result = user_controller.restapi_v_2__delete_user() -``` - -## Errors - -| HTTP Status Code | Error Description | Exception Class | -| --- | --- | --- | -| 500 | Operation failed | [`ErrorResponseException`](../../doc/models/error-response-exception.md) | - - -# Restapi V2 Add User to Groups - -To programmatically add groups to an existing ThoughtSpot user use this endpoint. -When you assign groups to a user, the user inherits the privileges assigned to those groups. -At least one of User Id or username is mandatory. When both are given, then user id will be considered. - -```python -def restapi_v_2__add_user_to_groups(self, - body) -``` - -## Parameters - -| Parameter | Type | Tags | Description | -| --- | --- | --- | --- | -| `body` | [`TspublicRestV2UserAddgroupRequest`](../../doc/models/tspublic-rest-v2-user-addgroup-request.md) | Body, Required | - | - -## Response Type - -`bool` - -## Example Usage - -```python -body = TspublicRestV2UserAddgroupRequest() -body.groups = [] - -body.groups.append(GroupNameAndIDInput()) - - -result = user_controller.restapi_v_2__add_user_to_groups(body) -``` - -## Errors - -| HTTP Status Code | Error Description | Exception Class | -| --- | --- | --- | -| 500 | Operation failed | [`ErrorResponseException`](../../doc/models/error-response-exception.md) | - - -# Restapi V2 Remove User From Groups - -To programmatically remove groups from an existing ThoughtSpot user, use this API endpoint. -The API removes only the user association. It does not delete the user or group from the Thoughtspot system -At least one of User Id or username is mandatory. When both are given, then user id will be considered. - -```python -def restapi_v_2__remove_user_from_groups(self, - body) -``` - -## Parameters - -| Parameter | Type | Tags | Description | -| --- | --- | --- | --- | -| `body` | [`TspublicRestV2UserRemovegroupRequest`](../../doc/models/tspublic-rest-v2-user-removegroup-request.md) | Body, Required | - | - -## Response Type - -`bool` - -## Example Usage - -```python -body = TspublicRestV2UserRemovegroupRequest() -body.groups = [] - -body.groups.append(GroupNameAndIDInput()) - - -result = user_controller.restapi_v_2__remove_user_from_groups(body) -``` - -## Errors - -| HTTP Status Code | Error Description | Exception Class | -| --- | --- | --- | -| 500 | Operation failed | [`ErrorResponseException`](../../doc/models/error-response-exception.md) | - - -# Restapi V2 Search Users - -To get the details of a specific user account or all users in the ThoughtSpot system use this end point. - -```python -def restapi_v_2__search_users(self, - body) -``` - -## Parameters - -| Parameter | Type | Tags | Description | -| --- | --- | --- | --- | -| `body` | [`TspublicRestV2UserSearchRequest`](../../doc/models/tspublic-rest-v2-user-search-request.md) | Body, Required | - | - -## Response Type - -`object` - -## Example Usage - -```python -body = TspublicRestV2UserSearchRequest() - -result = user_controller.restapi_v_2__search_users(body) -``` - -## Errors - -| HTTP Status Code | Error Description | Exception Class | -| --- | --- | --- | -| 500 | Operation failed | [`ErrorResponseException`](../../doc/models/error-response-exception.md) | - - -# Restapi V2 Change Password of User - -To change the password of a ThoughtSpot user account, use this endpoint. - -At least one of id or name of user is required. When both are given user id will be considered. - -```python -def restapi_v_2__change_password_of_user(self, - body) -``` - -## Parameters - -| Parameter | Type | Tags | Description | -| --- | --- | --- | --- | -| `body` | [`TspublicRestV2UserChangepasswordRequest`](../../doc/models/tspublic-rest-v2-user-changepassword-request.md) | Body, Required | - | - -## Response Type - -`bool` - -## Example Usage - -```python -body = TspublicRestV2UserChangepasswordRequest() -body.current_password = 'currentPassword0' -body.new_password = 'newPassword0' - -result = user_controller.restapi_v_2__change_password_of_user(body) -``` - -## Errors - -| HTTP Status Code | Error Description | Exception Class | -| --- | --- | --- | -| 500 | Operation failed | [`ErrorResponseException`](../../doc/models/error-response-exception.md) | - - -# Restapi V2 Add User to Orgs - -To programmatically add existing ThoughtSpot users to an organization, use this API endpoint. - -At least one of id or name of the organization is required. When both are given, then organization id will be considered. - -Requires Administration access for the organization to which users need to be added. - -```python -def restapi_v_2__add_user_to_orgs(self, - body) -``` - -## Parameters - -| Parameter | Type | Tags | Description | -| --- | --- | --- | --- | -| `body` | [`TspublicRestV2UserAddorgRequest`](../../doc/models/tspublic-rest-v2-user-addorg-request.md) | Body, Required | - | - -## Response Type - -`bool` - -## Example Usage - -```python -body = TspublicRestV2UserAddorgRequest() -body.users = [] - -body.users.append(UserNameAndIDInput()) - - -result = user_controller.restapi_v_2__add_user_to_orgs(body) -``` - -## Errors - -| HTTP Status Code | Error Description | Exception Class | -| --- | --- | --- | -| 500 | Operation failed | [`ErrorResponseException`](../../doc/models/error-response-exception.md) | - diff --git a/Python/doc/http-request.md b/Python/doc/http-request.md deleted file mode 100644 index 2c16378b7..000000000 --- a/Python/doc/http-request.md +++ /dev/null @@ -1,16 +0,0 @@ - -# HttpRequest - -Represents a single Http Request. - -## Parameters - -| Name | Type | Tag | Description | -| --- | --- | --- | --- | -| http_method | HttpMethodEnum | | The HTTP method of the request. | -| query_url | str | | The endpoint URL for the API request. | -| headers | dict | optional | Request headers. | -| query_parameters | dict | optional | Query parameters to add in the URL. | -| parameters | dict | str | optional | Request body, either as a serialized string or else a list of parameters to form encode. | -| files | dict | optional | Files to be sent with the request. | - diff --git a/Python/doc/http-response.md b/Python/doc/http-response.md deleted file mode 100644 index 7bb56d49b..000000000 --- a/Python/doc/http-response.md +++ /dev/null @@ -1,15 +0,0 @@ - -# HttpResponse - -Http response received. - -## Parameters - -| Name | Type | Description | -| --- | --- | --- | -| status_code | int | The status code returned by the server. | -| reason_phrase | str | The reason phrase returned by the server. | -| headers | dict | Response headers. | -| text | str | Response body. | -| request | HttpRequest | The request that resulted in this response. | - diff --git a/Python/doc/models/access-enum.md b/Python/doc/models/access-enum.md deleted file mode 100644 index 7617967c1..000000000 --- a/Python/doc/models/access-enum.md +++ /dev/null @@ -1,16 +0,0 @@ - -# Access Enum - -Minimum access level that the specified user or user group has. If no input is provided then minimum access of READ_ONLY will be considered. - -## Enumeration - -`AccessEnum` - -## Fields - -| Name | -| --- | -| `READ_ONLY` | -| `MODIFY` | - diff --git a/Python/doc/models/access-level-enum.md b/Python/doc/models/access-level-enum.md deleted file mode 100644 index 8242b529d..000000000 --- a/Python/doc/models/access-level-enum.md +++ /dev/null @@ -1,14 +0,0 @@ - -# Access Level Enum - -## Enumeration - -`AccessLevelEnum` - -## Fields - -| Name | -| --- | -| `FULL` | -| `REPORT_BOOK_VIEW` | - diff --git a/Python/doc/models/access-level-input.md b/Python/doc/models/access-level-input.md deleted file mode 100644 index eed71b579..000000000 --- a/Python/doc/models/access-level-input.md +++ /dev/null @@ -1,27 +0,0 @@ - -# Access Level Input - -## Structure - -`AccessLevelInput` - -## Fields - -| Name | Type | Tags | Description | -| --- | --- | --- | --- | -| `name` | `string` | Optional | Username or name of the user group | -| `id` | `string` | Optional | GUID of the user or user group | -| `mtype` | [`Type1Enum`](../../doc/models/type-1-enum.md) | Optional | Type of access detail provided | -| `access` | [`AccessEnum`](../../doc/models/access-enum.md) | Optional | Minimum access level that the specified user or user group has. If no input is provided then minimum access of READ_ONLY will be considered. | - -## Example (as JSON) - -```json -{ - "name": null, - "id": null, - "type": null, - "access": null -} -``` - diff --git a/Python/doc/models/add-table-input.md b/Python/doc/models/add-table-input.md deleted file mode 100644 index 6c70f60b7..000000000 --- a/Python/doc/models/add-table-input.md +++ /dev/null @@ -1,32 +0,0 @@ - -# Add Table Input - -## Structure - -`AddTableInput` - -## Fields - -| Name | Type | Tags | Description | -| --- | --- | --- | --- | -| `name` | `string` | Required | Name of the table | -| `db_name` | `string` | Required | Name of the database in the data platform | -| `schema_name` | `string` | Required | Name of the schema in the database | -| `columns` | [`List of ColumnsInput`](../../doc/models/columns-input.md) | Required | A JSON array of column details | - -## Example (as JSON) - -```json -{ - "name": "name0", - "dbName": "dbName8", - "schemaName": "schemaName4", - "columns": [ - { - "name": "name0", - "dataType": "dataType2" - } - ] -} -``` - diff --git a/Python/doc/models/adminsync-principal-response.md b/Python/doc/models/adminsync-principal-response.md deleted file mode 100644 index 967913cf7..000000000 --- a/Python/doc/models/adminsync-principal-response.md +++ /dev/null @@ -1,31 +0,0 @@ - -# Adminsync Principal Response - -## Structure - -`AdminsyncPrincipalResponse` - -## Fields - -| Name | Type | Tags | Description | -| --- | --- | --- | --- | -| `users_added` | `List of string` | Optional | Username of list of users added | -| `users_deleted` | `List of string` | Optional | Username of list of users deleted | -| `users_updated` | `List of string` | Optional | Username of list of users updated | -| `groups_added` | `List of string` | Optional | Group name of list of groups added | -| `groups_deleted` | `List of string` | Optional | Group name of list of groups deleted | -| `groups_updated` | `List of string` | Optional | Group name of list of groups updated | - -## Example (as JSON) - -```json -{ - "usersAdded": null, - "usersDeleted": null, - "usersUpdated": null, - "groupsAdded": null, - "groupsDeleted": null, - "groupsUpdated": null -} -``` - diff --git a/Python/doc/models/answer-query-response.md b/Python/doc/models/answer-query-response.md deleted file mode 100644 index 2a2a24bb2..000000000 --- a/Python/doc/models/answer-query-response.md +++ /dev/null @@ -1,25 +0,0 @@ - -# Answer Query Response - -## Structure - -`AnswerQueryResponse` - -## Fields - -| Name | Type | Tags | Description | -| --- | --- | --- | --- | -| `name` | `string` | Optional | The name of the saved Answer | -| `id` | `string` | Optional | The GUID of the saved Answer | -| `query_sql` | `string` | Optional | SQL query associated with the saved Answer | - -## Example (as JSON) - -```json -{ - "name": null, - "id": null, - "querySql": null -} -``` - diff --git a/Python/doc/models/client-state.md b/Python/doc/models/client-state.md deleted file mode 100644 index 5945770b6..000000000 --- a/Python/doc/models/client-state.md +++ /dev/null @@ -1,21 +0,0 @@ - -# Client State - -## Structure - -`ClientState` - -## Fields - -| Name | Type | Tags | Description | -| --- | --- | --- | --- | -| `color` | `string` | Optional | Color assigned to the tag | - -## Example (as JSON) - -```json -{ - "color": null -} -``` - diff --git a/Python/doc/models/columns-input.md b/Python/doc/models/columns-input.md deleted file mode 100644 index e94a8c2a7..000000000 --- a/Python/doc/models/columns-input.md +++ /dev/null @@ -1,23 +0,0 @@ - -# Columns Input - -## Structure - -`ColumnsInput` - -## Fields - -| Name | Type | Tags | Description | -| --- | --- | --- | --- | -| `name` | `string` | Required | Name of the column | -| `data_type` | `string` | Required | Datatype of the column | - -## Example (as JSON) - -```json -{ - "name": "name0", - "dataType": "dataType2" -} -``` - diff --git a/Python/doc/models/connection-column.md b/Python/doc/models/connection-column.md deleted file mode 100644 index af5abc864..000000000 --- a/Python/doc/models/connection-column.md +++ /dev/null @@ -1,25 +0,0 @@ - -# Connection Column - -## Structure - -`ConnectionColumn` - -## Fields - -| Name | Type | Tags | Description | -| --- | --- | --- | --- | -| `name` | `string` | Optional | Name of the table | -| `mtype` | `string` | Optional | Type of the Table | -| `column` | [`List of TableColumns`](../../doc/models/table-columns.md) | Optional | List of columns in the table | - -## Example (as JSON) - -```json -{ - "name": null, - "type": null, - "column": null -} -``` - diff --git a/Python/doc/models/connection-columns-shema.md b/Python/doc/models/connection-columns-shema.md deleted file mode 100644 index 820760b5c..000000000 --- a/Python/doc/models/connection-columns-shema.md +++ /dev/null @@ -1,27 +0,0 @@ - -# Connection Columns Shema - -## Structure - -`ConnectionColumnsShema` - -## Fields - -| Name | Type | Tags | Description | -| --- | --- | --- | --- | -| `name` | `string` | Optional | Name of the table | -| `db_name` | `string` | Optional | Name of the database | -| `schema_name` | `string` | Optional | Name of the schema | -| `columns` | [`List of TableColumns`](../../doc/models/table-columns.md) | Optional | List of columns in the table | - -## Example (as JSON) - -```json -{ - "name": null, - "dbName": null, - "schemaName": null, - "columns": null -} -``` - diff --git a/Python/doc/models/connection-database-type.md b/Python/doc/models/connection-database-type.md deleted file mode 100644 index 5ff2c2075..000000000 --- a/Python/doc/models/connection-database-type.md +++ /dev/null @@ -1,23 +0,0 @@ - -# Connection Database Type - -## Structure - -`ConnectionDatabaseType` - -## Fields - -| Name | Type | Tags | Description | -| --- | --- | --- | --- | -| `name` | `string` | Optional | Name of the database | -| `schema` | [`List of ConnectionTableSchema`](../../doc/models/connection-table-schema.md) | Optional | List of schemas | - -## Example (as JSON) - -```json -{ - "name": null, - "schema": null -} -``` - diff --git a/Python/doc/models/connection-response.md b/Python/doc/models/connection-response.md deleted file mode 100644 index 523016c3e..000000000 --- a/Python/doc/models/connection-response.md +++ /dev/null @@ -1,61 +0,0 @@ - -# Connection Response - -## Structure - -`ConnectionResponse` - -## Fields - -| Name | Type | Tags | Description | -| --- | --- | --- | --- | -| `name` | `string` | Optional | Name of the connection | -| `description` | `string` | Optional | Description associated with the connection | -| `mtype` | `string` | Optional | Type of the connection. The database associated with this type can be obtained from the response returned by the /tspublic/rest/v2/connection/types API endpoint. | -| `id` | `string` | Optional | GUID of the connection | -| `scheduled` | `bool` | Optional | Indicates if the data sync is scheduled for this connection | -| `connection_type` | `string` | Optional | - | -| `configuration` | `string` | Optional | Configuration properties of the connection | -| `is_external` | `bool` | Optional | - | -| `is_deprecated` | `bool` | Optional | Indicates if the connection is deprecated | -| `is_deleted` | `bool` | Optional | Indicates if the connection is deleted | -| `is_hidden` | `bool` | Optional | Indicates if the connection is hideen | -| `complete` | `bool` | Optional | Indicates if the all the properties of connection is provided | -| `index_version` | `float` | Optional | - | -| `generation_num` | `float` | Optional | - | -| `created` | `string` | Optional | Date and time when the connection was created | -| `modified` | `string` | Optional | Date and time of last modification of the connection | -| `author` | [`UserNameAndID`](../../doc/models/user-name-and-id.md) | Optional | - | -| `modified_by` | [`UserNameAndID`](../../doc/models/user-name-and-id.md) | Optional | - | -| `owner` | [`UserNameAndID`](../../doc/models/user-name-and-id.md) | Optional | - | -| `tags` | `List of string` | Optional | List of tags assigned to the connection | -| `tables` | [`List of TableList`](../../doc/models/table-list.md) | Optional | List of tables linked to this connection | - -## Example (as JSON) - -```json -{ - "name": null, - "description": null, - "type": null, - "id": null, - "scheduled": null, - "connectionType": null, - "configuration": null, - "isExternal": null, - "isDeprecated": null, - "isDeleted": null, - "isHidden": null, - "complete": null, - "indexVersion": null, - "generationNum": null, - "created": null, - "modified": null, - "author": null, - "modifiedBy": null, - "owner": null, - "tags": null, - "tables": null -} -``` - diff --git a/Python/doc/models/connection-table-columns-input.md b/Python/doc/models/connection-table-columns-input.md deleted file mode 100644 index bca27d58a..000000000 --- a/Python/doc/models/connection-table-columns-input.md +++ /dev/null @@ -1,25 +0,0 @@ - -# Connection Table Columns Input - -## Structure - -`ConnectionTableColumnsInput` - -## Fields - -| Name | Type | Tags | Description | -| --- | --- | --- | --- | -| `db_name` | `string` | Required | Name of the database | -| `schema_name` | `string` | Required | Name of the schema | -| `name` | `string` | Required | Name of the table | - -## Example (as JSON) - -```json -{ - "dbName": "dbName8", - "schemaName": "schemaName4", - "name": "name0" -} -``` - diff --git a/Python/doc/models/connection-table-columns-response.md b/Python/doc/models/connection-table-columns-response.md deleted file mode 100644 index b50ebb0c5..000000000 --- a/Python/doc/models/connection-table-columns-response.md +++ /dev/null @@ -1,23 +0,0 @@ - -# Connection Table Columns Response - -## Structure - -`ConnectionTableColumnsResponse` - -## Fields - -| Name | Type | Tags | Description | -| --- | --- | --- | --- | -| `id` | `string` | Optional | Connection id | -| `table` | [`List of ConnectionColumnsShema`](../../doc/models/connection-columns-shema.md) | Optional | List of table details | - -## Example (as JSON) - -```json -{ - "id": null, - "table": null -} -``` - diff --git a/Python/doc/models/connection-table-response.md b/Python/doc/models/connection-table-response.md deleted file mode 100644 index 0376ec7ca..000000000 --- a/Python/doc/models/connection-table-response.md +++ /dev/null @@ -1,23 +0,0 @@ - -# Connection Table Response - -## Structure - -`ConnectionTableResponse` - -## Fields - -| Name | Type | Tags | Description | -| --- | --- | --- | --- | -| `id` | `string` | Optional | Connection id | -| `database` | [`List of ConnectionDatabaseType`](../../doc/models/connection-database-type.md) | Optional | List of databases | - -## Example (as JSON) - -```json -{ - "id": null, - "database": null -} -``` - diff --git a/Python/doc/models/connection-table-schema.md b/Python/doc/models/connection-table-schema.md deleted file mode 100644 index f1a0167d2..000000000 --- a/Python/doc/models/connection-table-schema.md +++ /dev/null @@ -1,23 +0,0 @@ - -# Connection Table Schema - -## Structure - -`ConnectionTableSchema` - -## Fields - -| Name | Type | Tags | Description | -| --- | --- | --- | --- | -| `name` | `string` | Optional | Name of the schema | -| `table` | [`List of ConnectionColumn`](../../doc/models/connection-column.md) | Optional | List of table details | - -## Example (as JSON) - -```json -{ - "name": null, - "table": null -} -``` - diff --git a/Python/doc/models/create-connection-response.md b/Python/doc/models/create-connection-response.md deleted file mode 100644 index cf9e8dd84..000000000 --- a/Python/doc/models/create-connection-response.md +++ /dev/null @@ -1,61 +0,0 @@ - -# Create Connection Response - -## Structure - -`CreateConnectionResponse` - -## Fields - -| Name | Type | Tags | Description | -| --- | --- | --- | --- | -| `name` | `string` | Optional | Name of the connection | -| `description` | `string` | Optional | Description associated with the connection | -| `mtype` | `string` | Optional | Type of the connection. The database associated with this type can be obtained from the response returned by the /tspublic/rest/v2/connection/types API endpoint. | -| `id` | `string` | Optional | GUID of the connection | -| `scheduled` | `bool` | Optional | Indicates if the data sync is scheduled for this connection | -| `connection_type` | `string` | Optional | - | -| `configuration` | `string` | Optional | Configuration properties of the connection | -| `is_external` | `bool` | Optional | - | -| `is_deprecated` | `bool` | Optional | Indicates if the connection is deprecated | -| `is_deleted` | `bool` | Optional | Indicates if the connection is deleted | -| `is_hidden` | `bool` | Optional | Indicates if the connection is hideen | -| `complete` | `bool` | Optional | Indicates if the all the properties of connection is provided | -| `index_version` | `float` | Optional | - | -| `generation_num` | `float` | Optional | - | -| `created` | `string` | Optional | Date and time when user account was created | -| `modified` | `string` | Optional | Date and time of last modification of user account | -| `author` | [`UserNameAndID`](../../doc/models/user-name-and-id.md) | Optional | - | -| `modified_by` | [`UserNameAndID`](../../doc/models/user-name-and-id.md) | Optional | - | -| `owner` | [`UserNameAndID`](../../doc/models/user-name-and-id.md) | Optional | - | -| `tags` | `List of string` | Optional | List of tags assigned to the connection | -| `tables` | `List of string` | Optional | List of tables linked to this connection and details of the columns in the table | - -## Example (as JSON) - -```json -{ - "name": null, - "description": null, - "type": null, - "id": null, - "scheduled": null, - "connectionType": null, - "configuration": null, - "isExternal": null, - "isDeprecated": null, - "isDeleted": null, - "isHidden": null, - "complete": null, - "indexVersion": null, - "generationNum": null, - "created": null, - "modified": null, - "author": null, - "modifiedBy": null, - "owner": null, - "tags": null, - "tables": null -} -``` - diff --git a/Python/doc/models/create-table-response.md b/Python/doc/models/create-table-response.md deleted file mode 100644 index c612455ec..000000000 --- a/Python/doc/models/create-table-response.md +++ /dev/null @@ -1,23 +0,0 @@ - -# Create Table Response - -## Structure - -`CreateTableResponse` - -## Fields - -| Name | Type | Tags | Description | -| --- | --- | --- | --- | -| `logical_table_header` | [`LogicalTableHeader`](../../doc/models/logical-table-header.md) | Optional | - | -| `physical_table_id` | `string` | Optional | - | - -## Example (as JSON) - -```json -{ - "logicalTableHeader": null, - "physicalTableId": null -} -``` - diff --git a/Python/doc/models/dependent-permission.md b/Python/doc/models/dependent-permission.md deleted file mode 100644 index 137b4ed10..000000000 --- a/Python/doc/models/dependent-permission.md +++ /dev/null @@ -1,31 +0,0 @@ - -# Dependent Permission - -## Structure - -`DependentPermission` - -## Fields - -| Name | Type | Tags | Description | -| --- | --- | --- | --- | -| `id` | `string` | Optional | GUID of the object | -| `name` | `string` | Optional | Name of the object | -| `mtype` | `string` | Optional | Indicates the type of the object | -| `permission` | `string` | Optional | Indicates the permission which user or user group has on the object | -| `shared_permission` | `string` | Optional | Indicates the permission which user or user group has on the object through sharing of the object with this user or user group | -| `group_permission` | [`List of GroupPermission`](../../doc/models/group-permission.md) | Optional | An array of object with details of permission on the user groups to which the user or user group belongs | - -## Example (as JSON) - -```json -{ - "id": null, - "name": null, - "type": null, - "permission": null, - "sharedPermission": null, - "groupPermission": null -} -``` - diff --git a/Python/doc/models/error-response-exception.md b/Python/doc/models/error-response-exception.md deleted file mode 100644 index d4b2b9433..000000000 --- a/Python/doc/models/error-response-exception.md +++ /dev/null @@ -1,21 +0,0 @@ - -# Error Response Exception - -## Structure - -`ErrorResponseException` - -## Fields - -| Name | Type | Tags | Description | -| --- | --- | --- | --- | -| `error` | `object` | Optional | - | - -## Example (as JSON) - -```json -{ - "error": null -} -``` - diff --git a/Python/doc/models/format-type-3-enum.md b/Python/doc/models/format-type-3-enum.md deleted file mode 100644 index 8b2285822..000000000 --- a/Python/doc/models/format-type-3-enum.md +++ /dev/null @@ -1,16 +0,0 @@ - -# Format Type 3 Enum - -The format in which to export the objects - -## Enumeration - -`FormatType3Enum` - -## Fields - -| Name | -| --- | -| `YAML` | -| `JSON` | - diff --git a/Python/doc/models/format-type-enum.md b/Python/doc/models/format-type-enum.md deleted file mode 100644 index 7d7d7e249..000000000 --- a/Python/doc/models/format-type-enum.md +++ /dev/null @@ -1,20 +0,0 @@ - -# Format Type Enum - -The format of the data in the response. - -FULL: The response comes in "column":"value" format. - -COMPACT: The response includes only the value of the columns. - -## Enumeration - -`FormatTypeEnum` - -## Fields - -| Name | -| --- | -| `COMPACT` | -| `FULL` | - diff --git a/Python/doc/models/from-user-name-and-id-input.md b/Python/doc/models/from-user-name-and-id-input.md deleted file mode 100644 index e743af835..000000000 --- a/Python/doc/models/from-user-name-and-id-input.md +++ /dev/null @@ -1,29 +0,0 @@ - -# From User Name and ID Input - -A JSON object of name or GUIDs of the current owner of the objects. When both are given then id is considered. - -If a list of object ids are provided as input for TsObjectId, then only for those ids that have owner as the value provided in fromUser, the owner will be changed. - -Provide either name or id as input. When both are given user id will be considered. - -## Structure - -`FromUserNameAndIDInput` - -## Fields - -| Name | Type | Tags | Description | -| --- | --- | --- | --- | -| `name` | `string` | Optional | Username of the user | -| `id` | `string` | Optional | GUID of the user | - -## Example (as JSON) - -```json -{ - "name": null, - "id": null -} -``` - diff --git a/Python/doc/models/group-name-and-id-input.md b/Python/doc/models/group-name-and-id-input.md deleted file mode 100644 index 0240576b7..000000000 --- a/Python/doc/models/group-name-and-id-input.md +++ /dev/null @@ -1,23 +0,0 @@ - -# Group Name and ID Input - -## Structure - -`GroupNameAndIDInput` - -## Fields - -| Name | Type | Tags | Description | -| --- | --- | --- | --- | -| `name` | `string` | Optional | Name of the group | -| `id` | `string` | Optional | GUID of the group | - -## Example (as JSON) - -```json -{ - "name": null, - "id": null -} -``` - diff --git a/Python/doc/models/group-name-and-id.md b/Python/doc/models/group-name-and-id.md deleted file mode 100644 index f7f66286a..000000000 --- a/Python/doc/models/group-name-and-id.md +++ /dev/null @@ -1,23 +0,0 @@ - -# Group Name and ID - -## Structure - -`GroupNameAndID` - -## Fields - -| Name | Type | Tags | Description | -| --- | --- | --- | --- | -| `name` | `string` | Optional | Name of the group | -| `id` | `string` | Optional | GUID of the group | - -## Example (as JSON) - -```json -{ - "name": null, - "id": null -} -``` - diff --git a/Python/doc/models/group-permission.md b/Python/doc/models/group-permission.md deleted file mode 100644 index 5392f4cba..000000000 --- a/Python/doc/models/group-permission.md +++ /dev/null @@ -1,25 +0,0 @@ - -# Group Permission - -## Structure - -`GroupPermission` - -## Fields - -| Name | Type | Tags | Description | -| --- | --- | --- | --- | -| `id` | `string` | Optional | GUID of the user group | -| `name` | `string` | Optional | Name of the user group | -| `permission` | `string` | Optional | Indicates the permission which user group has on the object | - -## Example (as JSON) - -```json -{ - "id": null, - "name": null, - "permission": null -} -``` - diff --git a/Python/doc/models/group-response.md b/Python/doc/models/group-response.md deleted file mode 100644 index 78b1a3104..000000000 --- a/Python/doc/models/group-response.md +++ /dev/null @@ -1,79 +0,0 @@ - -# Group Response - -## Structure - -`GroupResponse` - -## Fields - -| Name | Type | Tags | Description | -| --- | --- | --- | --- | -| `name` | `string` | Optional | Name of the group | -| `display_name` | `string` | Optional | A unique display name string for the user group | -| `id` | `string` | Optional | GUID of the group | -| `visibility` | `string` | Optional | Visibility of the group | -| `description` | `string` | Optional | Description of the group | -| `privileges` | `List of string` | Optional | Privileges assigned to the group | -| `orgs` | [`List of OrgType`](../../doc/models/org-type.md) | Optional | The organizations that user belongs to | -| `groups` | [`List of GroupNameAndID`](../../doc/models/group-name-and-id.md) | Optional | Name of the group to which is added | -| `users` | [`List of UserNameAndID`](../../doc/models/user-name-and-id.md) | Optional | User Group Information by Id or Name. | -| `assigned_liveboards` | [`List of LiveboardNameAndID`](../../doc/models/liveboard-name-and-id.md) | Optional | Liveboards assigned to the group | -| `user_group_content` | `object` | Optional | - | -| `tags` | `List of string` | Optional | Tags assigned to the group | -| `is_deleted` | `bool` | Optional | Indicates if the group is deleted | -| `is_hidden` | `bool` | Optional | Indicates if the group is hidden | -| `is_external` | `bool` | Optional | Indicates if the group is from external system | -| `is_deprecated` | `bool` | Optional | - | -| `complete` | `bool` | Optional | Indicates if the all the properties of group is provided | -| `is_system_principal` | `bool` | Optional | Indicates if the group is system principal | -| `mtype` | `string` | Optional | Indicates the type of group | -| `parenttype` | `string` | Optional | Indicates the type of parent object | -| `group_idx` | `int` | Optional | - | -| `metadata_version` | `int` | Optional | - | -| `tenant_id` | `string` | Optional | Tenant id associated with the group | -| `index_version` | `float` | Optional | - | -| `generation_num` | `float` | Optional | - | -| `created` | `float` | Optional | Date and time when group was created | -| `modified` | `float` | Optional | Date and time of last modification of the group | -| `author` | [`UserNameAndID`](../../doc/models/user-name-and-id.md) | Optional | - | -| `modified_by` | [`UserNameAndID`](../../doc/models/user-name-and-id.md) | Optional | - | -| `owner` | [`UserNameAndID`](../../doc/models/user-name-and-id.md) | Optional | - | - -## Example (as JSON) - -```json -{ - "name": null, - "displayName": null, - "id": null, - "visibility": null, - "description": null, - "privileges": null, - "orgs": null, - "groups": null, - "users": null, - "assignedLiveboards": null, - "userGroupContent": null, - "tags": null, - "isDeleted": null, - "isHidden": null, - "isExternal": null, - "isDeprecated": null, - "complete": null, - "isSystemPrincipal": null, - "type": null, - "parenttype": null, - "groupIdx": null, - "metadataVersion": null, - "tenantId": null, - "indexVersion": null, - "generationNum": null, - "created": null, - "modified": null, - "author": null, - "modifiedBy": null, - "owner": null -} -``` - diff --git a/Python/doc/models/home-liveboard-response.md b/Python/doc/models/home-liveboard-response.md deleted file mode 100644 index 73f11472b..000000000 --- a/Python/doc/models/home-liveboard-response.md +++ /dev/null @@ -1,27 +0,0 @@ - -# Home Liveboard Response - -## Structure - -`HomeLiveboardResponse` - -## Fields - -| Name | Type | Tags | Description | -| --- | --- | --- | --- | -| `user_name` | `string` | Optional | Name of the user | -| `user_id` | `string` | Optional | The GUID of the user | -| `liveboard_name` | `string` | Optional | Name of the liveboard | -| `liveboard_id` | `string` | Optional | The GUID of the liveboard | - -## Example (as JSON) - -```json -{ - "userName": null, - "userId": null, - "liveboardName": null, - "liveboardId": null -} -``` - diff --git a/Python/doc/models/import-policy-enum.md b/Python/doc/models/import-policy-enum.md deleted file mode 100644 index 7cb9614e2..000000000 --- a/Python/doc/models/import-policy-enum.md +++ /dev/null @@ -1,17 +0,0 @@ - -# Import Policy Enum - -Policy to follow during import - -## Enumeration - -`ImportPolicyEnum` - -## Fields - -| Name | -| --- | -| `PARTIAL` | -| `ALL_OR_NONE` | -| `VALIDATE_ONLY` | - diff --git a/Python/doc/models/liveboard-name-and-id.md b/Python/doc/models/liveboard-name-and-id.md deleted file mode 100644 index fdaf1f448..000000000 --- a/Python/doc/models/liveboard-name-and-id.md +++ /dev/null @@ -1,23 +0,0 @@ - -# Liveboard Name and ID - -## Structure - -`LiveboardNameAndID` - -## Fields - -| Name | Type | Tags | Description | -| --- | --- | --- | --- | -| `name` | `string` | Optional | Name of the liveboard | -| `id` | `string` | Optional | GUID of the liveboard | - -## Example (as JSON) - -```json -{ - "name": null, - "id": null -} -``` - diff --git a/Python/doc/models/liveboard-query-response.md b/Python/doc/models/liveboard-query-response.md deleted file mode 100644 index 51f58db13..000000000 --- a/Python/doc/models/liveboard-query-response.md +++ /dev/null @@ -1,25 +0,0 @@ - -# Liveboard Query Response - -## Structure - -`LiveboardQueryResponse` - -## Fields - -| Name | Type | Tags | Description | -| --- | --- | --- | --- | -| `name` | `string` | Optional | The name of the Liveboard | -| `id` | `string` | Optional | The GUID of the Liveboard | -| `viz` | [`List of VizType`](../../doc/models/viz-type.md) | Optional | SQL query associated with the saved Answer | - -## Example (as JSON) - -```json -{ - "name": null, - "id": null, - "viz": null -} -``` - diff --git a/Python/doc/models/logical-table-header.md b/Python/doc/models/logical-table-header.md deleted file mode 100644 index 791b5a5a8..000000000 --- a/Python/doc/models/logical-table-header.md +++ /dev/null @@ -1,51 +0,0 @@ - -# Logical Table Header - -## Structure - -`LogicalTableHeader` - -## Fields - -| Name | Type | Tags | Description | -| --- | --- | --- | --- | -| `id` | `string` | Optional | - | -| `name` | `string` | Optional | - | -| `author` | `string` | Optional | - | -| `author_name` | `string` | Optional | - | -| `author_display_name` | `string` | Optional | - | -| `created` | `float` | Optional | - | -| `modified` | `float` | Optional | - | -| `modified_by` | `string` | Optional | - | -| `generation_num` | `int` | Optional | - | -| `owner` | `string` | Optional | - | -| `deleted` | `bool` | Optional | - | -| `hidden` | `bool` | Optional | - | -| `database` | `string` | Optional | - | -| `schema` | `string` | Optional | - | -| `mtype` | `string` | Optional | - | -| `sub_type` | `string` | Optional | - | - -## Example (as JSON) - -```json -{ - "id": null, - "name": null, - "author": null, - "authorName": null, - "authorDisplayName": null, - "created": null, - "modified": null, - "modifiedBy": null, - "generationNum": null, - "owner": null, - "deleted": null, - "hidden": null, - "database": null, - "schema": null, - "type": null, - "subType": null -} -``` - diff --git a/Python/doc/models/logs-response.md b/Python/doc/models/logs-response.md deleted file mode 100644 index f3aef07f0..000000000 --- a/Python/doc/models/logs-response.md +++ /dev/null @@ -1,23 +0,0 @@ - -# Logs Response - -## Structure - -`LogsResponse` - -## Fields - -| Name | Type | Tags | Description | -| --- | --- | --- | --- | -| `date` | `string` | Optional | Date and time for the event in the log | -| `log` | `string` | Optional | Logged event at the time specified in JSON format. This includes, Event ID, A unique description of the event, for example, User login failed, Timestamp, User ID of the person initiating the event and IP address of the ThoughtSpot instance. | - -## Example (as JSON) - -```json -{ - "date": null, - "log": null -} -``` - diff --git a/Python/doc/models/metadata-tag-response.md b/Python/doc/models/metadata-tag-response.md deleted file mode 100644 index 22fc8efb6..000000000 --- a/Python/doc/models/metadata-tag-response.md +++ /dev/null @@ -1,47 +0,0 @@ - -# Metadata Tag Response - -## Structure - -`MetadataTagResponse` - -## Fields - -| Name | Type | Tags | Description | -| --- | --- | --- | --- | -| `name` | `string` | Optional | Name of the tag | -| `id` | `string` | Optional | GUID of the tag | -| `client_state` | [`ClientState`](../../doc/models/client-state.md) | Optional | - | -| `index_version` | `float` | Optional | - | -| `generation_num` | `float` | Optional | - | -| `is_deleted` | `bool` | Optional | Indicates if the tag is deleted | -| `is_hidden` | `bool` | Optional | Indicates if the tag is hidden | -| `is_external` | `bool` | Optional | Indicates if the tag is from external system | -| `is_deprecated` | `bool` | Optional | - | -| `created` | `float` | Optional | Date and time when group was created | -| `modified` | `float` | Optional | Date and time of last modification of the group | -| `modified_by` | [`TagNameAndID`](../../doc/models/tag-name-and-id.md) | Optional | - | -| `author` | [`TagNameAndID`](../../doc/models/tag-name-and-id.md) | Optional | - | -| `owner` | [`TagNameAndID`](../../doc/models/tag-name-and-id.md) | Optional | - | - -## Example (as JSON) - -```json -{ - "name": null, - "id": null, - "clientState": null, - "indexVersion": null, - "generationNum": null, - "isDeleted": null, - "isHidden": null, - "isExternal": null, - "isDeprecated": null, - "created": null, - "modified": null, - "modifiedBy": null, - "author": null, - "owner": null -} -``` - diff --git a/Python/doc/models/name-and-id-input.md b/Python/doc/models/name-and-id-input.md deleted file mode 100644 index 4ed03d046..000000000 --- a/Python/doc/models/name-and-id-input.md +++ /dev/null @@ -1,23 +0,0 @@ - -# Name and Id Input - -## Structure - -`NameAndIdInput` - -## Fields - -| Name | Type | Tags | Description | -| --- | --- | --- | --- | -| `name` | `string` | Optional | Name of the user | -| `id` | `string` | Optional | GUID of the user | - -## Example (as JSON) - -```json -{ - "name": null, - "id": null -} -``` - diff --git a/Python/doc/models/org-type.md b/Python/doc/models/org-type.md deleted file mode 100644 index 32b67393e..000000000 --- a/Python/doc/models/org-type.md +++ /dev/null @@ -1,23 +0,0 @@ - -# Org Type - -## Structure - -`OrgType` - -## Fields - -| Name | Type | Tags | Description | -| --- | --- | --- | --- | -| `name` | `string` | Optional | Name of the organization | -| `id` | `int` | Optional | Id of the organization | - -## Example (as JSON) - -```json -{ - "name": null, - "id": null -} -``` - diff --git a/Python/doc/models/orgs-response.md b/Python/doc/models/orgs-response.md deleted file mode 100644 index 2c685759a..000000000 --- a/Python/doc/models/orgs-response.md +++ /dev/null @@ -1,31 +0,0 @@ - -# Orgs Response - -## Structure - -`OrgsResponse` - -## Fields - -| Name | Type | Tags | Description | -| --- | --- | --- | --- | -| `org_id` | `int` | Optional | ID of the organization searched for | -| `org_name` | `string` | Optional | Name of the organization searched for | -| `description` | `string` | Optional | Description associated with the organization | -| `all_group_user_id` | `string` | Optional | GUID of the ALL group in the organization | -| `default_admin_user_group_id` | `string` | Optional | GUID of the admin group in the organization | -| `active` | `bool` | Optional | Indicates if the organization is active or not | - -## Example (as JSON) - -```json -{ - "orgId": null, - "orgName": null, - "description": null, - "allGroupUserId": null, - "defaultAdminUserGroupId": null, - "active": null -} -``` - diff --git a/Python/doc/models/orientation-enum.md b/Python/doc/models/orientation-enum.md deleted file mode 100644 index 361feb0ee..000000000 --- a/Python/doc/models/orientation-enum.md +++ /dev/null @@ -1,16 +0,0 @@ - -# Orientation Enum - -Page orientation for the PDF. Default: PORTRAIT - -## Enumeration - -`OrientationEnum` - -## Fields - -| Name | -| --- | -| `PORTRAIT` | -| `LANDSCAPE` | - diff --git a/Python/doc/models/pdf-options-input.md b/Python/doc/models/pdf-options-input.md deleted file mode 100644 index 413e7b0a2..000000000 --- a/Python/doc/models/pdf-options-input.md +++ /dev/null @@ -1,33 +0,0 @@ - -# Pdf Options Input - -## Structure - -`PdfOptionsInput` - -## Fields - -| Name | Type | Tags | Description | -| --- | --- | --- | --- | -| `orientation` | [`OrientationEnum`](../../doc/models/orientation-enum.md) | Optional | Page orientation for the PDF. Default: PORTRAIT | -| `truncate_tables` | `bool` | Optional | When set to true, only the first page of the tables is displayed in the file.

This setting is applicable only when generating report for specific visualization ids. Default: false | -| `include_logo` | `bool` | Optional | Include customized wide logo if available in the footer. Default: true | -| `footer_text` | `string` | Optional | Footer text to include in the footer of each page of the PDF. | -| `include_page_number` | `bool` | Optional | When set to true, the page number is included in the footer of each page. Default: true | -| `include_cover_page` | `bool` | Optional | When set to true, a cover page with the Liveboard title is added in the PDF. Default: true | -| `include_filter_page` | `bool` | Optional | When set to true, a second page with a list of all applied filters is added in the PDF. Default: true | - -## Example (as JSON) - -```json -{ - "orientation": null, - "truncateTables": null, - "includeLogo": null, - "footerText": null, - "includePageNumber": null, - "includeCoverPage": null, - "includeFilterPage": null -} -``` - diff --git a/Python/doc/models/permissions-type-search.md b/Python/doc/models/permissions-type-search.md deleted file mode 100644 index d056fb7eb..000000000 --- a/Python/doc/models/permissions-type-search.md +++ /dev/null @@ -1,23 +0,0 @@ - -# Permissions Type Search - -## Structure - -`PermissionsTypeSearch` - -## Fields - -| Name | Type | Tags | Description | -| --- | --- | --- | --- | -| `mtype` | `string` | Optional | Indicates the type of the object | -| `ts_object` | [`List of TsObjectTypeSerach`](../../doc/models/ts-object-type-serach.md) | Optional | An array of objects of type mentioned in type field | - -## Example (as JSON) - -```json -{ - "type": null, - "tsObject": null -} -``` - diff --git a/Python/doc/models/pinboard-details.md b/Python/doc/models/pinboard-details.md deleted file mode 100644 index be850e67f..000000000 --- a/Python/doc/models/pinboard-details.md +++ /dev/null @@ -1,27 +0,0 @@ - -# Pinboard Details - -## Structure - -`PinboardDetails` - -## Fields - -| Name | Type | Tags | Description | -| --- | --- | --- | --- | -| `pinboard_id` | `string` | Optional | pinboard id of recently pinned pinboard | -| `pinboard_name` | `string` | Optional | pinboard name of recently pinned pinboard | -| `tab_id` | `string` | Optional | tab id of recently pinned tab | -| `tab_name` | `string` | Optional | tab name of recently pinned tab | - -## Example (as JSON) - -```json -{ - "pinboardId": null, - "pinboardName": null, - "tabId": null, - "tabName": null -} -``` - diff --git a/Python/doc/models/principal-search-response.md b/Python/doc/models/principal-search-response.md deleted file mode 100644 index 96f2396c5..000000000 --- a/Python/doc/models/principal-search-response.md +++ /dev/null @@ -1,27 +0,0 @@ - -# Principal Search Response - -## Structure - -`PrincipalSearchResponse` - -## Fields - -| Name | Type | Tags | Description | -| --- | --- | --- | --- | -| `id` | `string` | Optional | GUID of the user or user group | -| `name` | `string` | Optional | Name of the user or user group | -| `mtype` | `string` | Optional | Indicates the type of principal | -| `permissions` | [`List of PermissionsTypeSearch`](../../doc/models/permissions-type-search.md) | Optional | Indicates the permission which user or user group has on the object | - -## Example (as JSON) - -```json -{ - "id": null, - "name": null, - "type": null, - "permissions": null -} -``` - diff --git a/Python/doc/models/privilege-enum.md b/Python/doc/models/privilege-enum.md deleted file mode 100644 index cb4f44eaf..000000000 --- a/Python/doc/models/privilege-enum.md +++ /dev/null @@ -1,31 +0,0 @@ - -# Privilege Enum - -## Enumeration - -`PrivilegeEnum` - -## Fields - -| Name | -| --- | -| `RANALYSIS` | -| `DATAMANAGEMENT` | -| `APPLICATION_ADMINISTRATION` | -| `USER_ADMINISTRATION` | -| `SYSTEMMANAGEMENT` | -| `SYSTEM_INFO_ADMINISTRATION` | -| `AUTHORING` | -| `BACKUP_ADMINISTRATION` | -| `SHAREWITHALL` | -| `DEVELOPER` | -| `JOBSCHEDULING` | -| `GROUP_ADMINISTRATION` | -| `BYPASSRLS` | -| `EXPERIMENTALFEATUREPRIVILEGE` | -| `A3ANALYSIS` | -| `USERDATAUPLOADING` | -| `DATADOWNLOADING` | -| `DISABLE_PINBOARD_CREATION` | -| `ADMINISTRATION` | - diff --git a/Python/doc/models/secuirity-dependents.md b/Python/doc/models/secuirity-dependents.md deleted file mode 100644 index 0a360066d..000000000 --- a/Python/doc/models/secuirity-dependents.md +++ /dev/null @@ -1,31 +0,0 @@ - -# Secuirity Dependents - -## Structure - -`SecuirityDependents` - -## Fields - -| Name | Type | Tags | Description | -| --- | --- | --- | --- | -| `id` | `string` | Optional | GUID of the object | -| `name` | `string` | Optional | Name of the object | -| `mtype` | `string` | Optional | Indicates the type of the object | -| `owner` | `string` | Optional | Owner of the object | -| `author` | [`UserNameAndID`](../../doc/models/user-name-and-id.md) | Optional | - | -| `permissions` | [`List of DependentPermission`](../../doc/models/dependent-permission.md) | Optional | - | - -## Example (as JSON) - -```json -{ - "id": null, - "name": null, - "type": null, - "owner": null, - "author": null, - "permissions": null -} -``` - diff --git a/Python/doc/models/security-permission-response.md b/Python/doc/models/security-permission-response.md deleted file mode 100644 index 60ca79c54..000000000 --- a/Python/doc/models/security-permission-response.md +++ /dev/null @@ -1,33 +0,0 @@ - -# Security Permission Response - -## Structure - -`SecurityPermissionResponse` - -## Fields - -| Name | Type | Tags | Description | -| --- | --- | --- | --- | -| `id` | `string` | Optional | GUID of the object | -| `name` | `string` | Optional | Name of the object | -| `mtype` | `string` | Optional | Indicates the type of the object | -| `owner` | `string` | Optional | GUID of the owner of the object | -| `author` | [`UserNameAndID`](../../doc/models/user-name-and-id.md) | Optional | - | -| `permissions` | [`List of SecurityPermission`](../../doc/models/security-permission.md) | Optional | An array of object with details of permission on users and user groups | -| `dependents` | [`List of SecuirityDependents`](../../doc/models/secuirity-dependents.md) | Optional | The objects on which the primary object is dependent on | - -## Example (as JSON) - -```json -{ - "id": null, - "name": null, - "type": null, - "owner": null, - "author": null, - "permissions": null, - "dependents": null -} -``` - diff --git a/Python/doc/models/security-permission.md b/Python/doc/models/security-permission.md deleted file mode 100644 index 39b1026d8..000000000 --- a/Python/doc/models/security-permission.md +++ /dev/null @@ -1,31 +0,0 @@ - -# Security Permission - -## Structure - -`SecurityPermission` - -## Fields - -| Name | Type | Tags | Description | -| --- | --- | --- | --- | -| `id` | `string` | Optional | GUID of the user or user group | -| `name` | `string` | Optional | Name of the user or user group | -| `mtype` | `string` | Optional | Indicates the type of principal | -| `permission` | `string` | Optional | Indicates the permission which user or user group has on the object | -| `shared_permission` | `string` | Optional | Indicates the permission which user or user group has on the object through sharing of the object with this user or user group | -| `group_permission` | [`List of GroupPermission`](../../doc/models/group-permission.md) | Optional | An array of object with details of permission on the user groups to which the user or user group belongs | - -## Example (as JSON) - -```json -{ - "id": null, - "name": null, - "type": null, - "permission": null, - "sharedPermission": null, - "groupPermission": null -} -``` - diff --git a/Python/doc/models/session-login-response.md b/Python/doc/models/session-login-response.md deleted file mode 100644 index bd3da83df..000000000 --- a/Python/doc/models/session-login-response.md +++ /dev/null @@ -1,31 +0,0 @@ - -# Session Login Response - -Login response - -## Structure - -`SessionLoginResponse` - -## Fields - -| Name | Type | Tags | Description | -| --- | --- | --- | --- | -| `user_name` | `string` | Optional | Username of the user account for which token is generated | -| `token` | `string` | Optional | Bearer token generated. This will be blank when token type is Cookie | -| `token_created_time` | `string` | Optional | Date and time at which the token is generated | -| `token_expiry_duration` | `string` | Optional | Duration in seconds after which the token expires | -| `token_type` | `string` | Optional | Type of token generated | - -## Example (as JSON) - -```json -{ - "userName": null, - "token": null, - "tokenCreatedTime": null, - "tokenExpiryDuration": null, - "tokenType": null -} -``` - diff --git a/Python/doc/models/sort-by-1-enum.md b/Python/doc/models/sort-by-1-enum.md deleted file mode 100644 index 6261ec4f9..000000000 --- a/Python/doc/models/sort-by-1-enum.md +++ /dev/null @@ -1,26 +0,0 @@ - -# Sort by 1 Enum - -Field based on which the re.sponse needs to be ordered. Valid values - -## Enumeration - -`SortBy1Enum` - -## Fields - -| Name | -| --- | -| `DEFAULT` | -| `NAME` | -| `DISPLAY_NAME` | -| `AUTHOR` | -| `CREATED` | -| `MODIFIED` | -| `LAST_ACCESSED` | -| `SYNCED` | -| `VIEWS` | -| `NONE` | -| `USER_STATE` | -| `ROW_COUNT` | - diff --git a/Python/doc/models/sort-by-enum.md b/Python/doc/models/sort-by-enum.md deleted file mode 100644 index bf870406d..000000000 --- a/Python/doc/models/sort-by-enum.md +++ /dev/null @@ -1,26 +0,0 @@ - -# Sort by Enum - -Field based on which the response needs to be ordered. - -## Enumeration - -`SortByEnum` - -## Fields - -| Name | -| --- | -| `DEFAULT` | -| `NAME` | -| `DISPLAY_NAME` | -| `AUTHOR` | -| `CREATED` | -| `MODIFIED` | -| `LAST_ACCESSED` | -| `SYNCED` | -| `VIEWS` | -| `NONE` | -| `USER_STATE` | -| `ROW_COUNT` | - diff --git a/Python/doc/models/sort-order-1-enum.md b/Python/doc/models/sort-order-1-enum.md deleted file mode 100644 index 123cd4b67..000000000 --- a/Python/doc/models/sort-order-1-enum.md +++ /dev/null @@ -1,17 +0,0 @@ - -# Sort Order 1 Enum - -Order in which sortBy should be applied. Valid values - -## Enumeration - -`SortOrder1Enum` - -## Fields - -| Name | -| --- | -| `DEFAULT` | -| `ASC` | -| `DESC` | - diff --git a/Python/doc/models/sort-order-enum.md b/Python/doc/models/sort-order-enum.md deleted file mode 100644 index 2e3885d85..000000000 --- a/Python/doc/models/sort-order-enum.md +++ /dev/null @@ -1,17 +0,0 @@ - -# Sort Order Enum - -Order in which sortBy should be applied. - -## Enumeration - -`SortOrderEnum` - -## Fields - -| Name | -| --- | -| `DEFAULT` | -| `ASC` | -| `DESC` | - diff --git a/Python/doc/models/state-1-enum.md b/Python/doc/models/state-1-enum.md deleted file mode 100644 index 33cec645b..000000000 --- a/Python/doc/models/state-1-enum.md +++ /dev/null @@ -1,19 +0,0 @@ - -# State 1 Enum - -Status of user account. acitve or inactive. - -## Enumeration - -`State1Enum` - -## Fields - -| Name | -| --- | -| `ACTIVE` | -| `INACTIVE` | -| `EXPIRED` | -| `LOCKED` | -| `PENDING` | - diff --git a/Python/doc/models/state-enum.md b/Python/doc/models/state-enum.md deleted file mode 100644 index 8448d4860..000000000 --- a/Python/doc/models/state-enum.md +++ /dev/null @@ -1,17 +0,0 @@ - -# State Enum - -## Enumeration - -`StateEnum` - -## Fields - -| Name | -| --- | -| `ACTIVE` | -| `INACTIVE` | -| `EXPIRED` | -| `LOCKED` | -| `PENDING` | - diff --git a/Python/doc/models/table-columns.md b/Python/doc/models/table-columns.md deleted file mode 100644 index f46794283..000000000 --- a/Python/doc/models/table-columns.md +++ /dev/null @@ -1,23 +0,0 @@ - -# Table Columns - -## Structure - -`TableColumns` - -## Fields - -| Name | Type | Tags | Description | -| --- | --- | --- | --- | -| `name` | `string` | Optional | Name of the column | -| `data_type` | `string` | Optional | Datatype of the column | - -## Example (as JSON) - -```json -{ - "name": null, - "dataType": null -} -``` - diff --git a/Python/doc/models/table-input.md b/Python/doc/models/table-input.md deleted file mode 100644 index da208f0f5..000000000 --- a/Python/doc/models/table-input.md +++ /dev/null @@ -1,23 +0,0 @@ - -# Table Input - -## Structure - -`TableInput` - -## Fields - -| Name | Type | Tags | Description | -| --- | --- | --- | --- | -| `name` | `string` | Optional | Name of the table | -| `id` | `string` | Optional | GUID of the Table | - -## Example (as JSON) - -```json -{ - "name": null, - "id": null -} -``` - diff --git a/Python/doc/models/table-list.md b/Python/doc/models/table-list.md deleted file mode 100644 index 78d36c345..000000000 --- a/Python/doc/models/table-list.md +++ /dev/null @@ -1,53 +0,0 @@ - -# Table List - -## Structure - -`TableList` - -## Fields - -| Name | Type | Tags | Description | -| --- | --- | --- | --- | -| `name` | `string` | Optional | Name of the table | -| `mtype` | `string` | Optional | Type of the table | -| `id` | `string` | Optional | GUID of the table | -| `database_stripe` | `string` | Optional | Name of the database to which the table belongs | -| `schema_stripe` | `string` | Optional | Name of the schema to which the table belongs | -| `is_external` | `bool` | Optional | - | -| `is_deprecated` | `bool` | Optional | Indicates if the table is deprecated | -| `is_deleted` | `bool` | Optional | Indicates if the table is deleted | -| `is_hidden` | `bool` | Optional | Indicates if the table is hideen | -| `index_version` | `float` | Optional | - | -| `generation_num` | `float` | Optional | - | -| `created` | `string` | Optional | Date and time when the table was created | -| `modified` | `string` | Optional | Date and time of last modification of the table | -| `author` | [`UserNameAndID`](../../doc/models/user-name-and-id.md) | Optional | - | -| `modified_by` | [`UserNameAndID`](../../doc/models/user-name-and-id.md) | Optional | - | -| `owner` | [`UserNameAndID`](../../doc/models/user-name-and-id.md) | Optional | - | -| `tags` | `List of string` | Optional | List of tags assigned to the table | - -## Example (as JSON) - -```json -{ - "name": null, - "type": null, - "id": null, - "databaseStripe": null, - "schemaStripe": null, - "isExternal": null, - "isDeprecated": null, - "isDeleted": null, - "isHidden": null, - "indexVersion": null, - "generationNum": null, - "created": null, - "modified": null, - "author": null, - "modifiedBy": null, - "owner": null, - "tags": null -} -``` - diff --git a/Python/doc/models/tag-name-and-id-input.md b/Python/doc/models/tag-name-and-id-input.md deleted file mode 100644 index 1d705e90d..000000000 --- a/Python/doc/models/tag-name-and-id-input.md +++ /dev/null @@ -1,23 +0,0 @@ - -# Tag Name and Id Input - -## Structure - -`TagNameAndIdInput` - -## Fields - -| Name | Type | Tags | Description | -| --- | --- | --- | --- | -| `name` | `string` | Optional | Name of the tags | -| `id` | `string` | Optional | GUID of the tags | - -## Example (as JSON) - -```json -{ - "name": null, - "id": null -} -``` - diff --git a/Python/doc/models/tag-name-and-id.md b/Python/doc/models/tag-name-and-id.md deleted file mode 100644 index aaa27aed5..000000000 --- a/Python/doc/models/tag-name-and-id.md +++ /dev/null @@ -1,23 +0,0 @@ - -# Tag Name and ID - -## Structure - -`TagNameAndID` - -## Fields - -| Name | Type | Tags | Description | -| --- | --- | --- | --- | -| `name` | `string` | Optional | Name of the group to which group is added | -| `id` | `string` | Optional | GUID of the group to which group is added | - -## Example (as JSON) - -```json -{ - "name": null, - "id": null -} -``` - diff --git a/Python/doc/models/to-user-name-and-id-input.md b/Python/doc/models/to-user-name-and-id-input.md deleted file mode 100644 index cdd5bb2c3..000000000 --- a/Python/doc/models/to-user-name-and-id-input.md +++ /dev/null @@ -1,25 +0,0 @@ - -# To User Name and ID Input - -A JSON object of name or GUIDs of the new owner for the objects. When both are given then id is considered. - -## Structure - -`ToUserNameAndIDInput` - -## Fields - -| Name | Type | Tags | Description | -| --- | --- | --- | --- | -| `name` | `string` | Optional | Username of the user | -| `id` | `string` | Optional | GUID of the user | - -## Example (as JSON) - -```json -{ - "name": null, - "id": null -} -``` - diff --git a/Python/doc/models/topic-enum.md b/Python/doc/models/topic-enum.md deleted file mode 100644 index cb94c0ad9..000000000 --- a/Python/doc/models/topic-enum.md +++ /dev/null @@ -1,13 +0,0 @@ - -# Topic Enum - -## Enumeration - -`TopicEnum` - -## Fields - -| Name | -| --- | -| `SECURITY_LOGS` | - diff --git a/Python/doc/models/ts-object-input.md b/Python/doc/models/ts-object-input.md deleted file mode 100644 index 76b910097..000000000 --- a/Python/doc/models/ts-object-input.md +++ /dev/null @@ -1,23 +0,0 @@ - -# Ts Object Input - -## Structure - -`TsObjectInput` - -## Fields - -| Name | Type | Tags | Description | -| --- | --- | --- | --- | -| `id` | `string` | Required | GUID of the metadata object | -| `mtype` | [`TypeEnum`](../../doc/models/type-enum.md) | Required | Type of the metadata object | - -## Example (as JSON) - -```json -{ - "id": "id0", - "type": "DATAOBJECT" -} -``` - diff --git a/Python/doc/models/ts-object-search-input.md b/Python/doc/models/ts-object-search-input.md deleted file mode 100644 index cfc532fff..000000000 --- a/Python/doc/models/ts-object-search-input.md +++ /dev/null @@ -1,25 +0,0 @@ - -# Ts Object Search Input - -## Structure - -`TsObjectSearchInput` - -## Fields - -| Name | Type | Tags | Description | -| --- | --- | --- | --- | -| `mtype` | [`Type2Enum`](../../doc/models/type-2-enum.md) | Required | Type of the metadata objec | -| `id` | `List of string` | Required | A JSON Array of GUIDs of the metadata object | - -## Example (as JSON) - -```json -{ - "type": "DATAOBJECT", - "id": [ - "id0" - ] -} -``` - diff --git a/Python/doc/models/ts-object-type-serach.md b/Python/doc/models/ts-object-type-serach.md deleted file mode 100644 index 4486eb66d..000000000 --- a/Python/doc/models/ts-object-type-serach.md +++ /dev/null @@ -1,33 +0,0 @@ - -# Ts Object Type Serach - -## Structure - -`TsObjectTypeSerach` - -## Fields - -| Name | Type | Tags | Description | -| --- | --- | --- | --- | -| `id` | `string` | Optional | GUID of the object | -| `name` | `string` | Optional | Name of the object | -| `owner` | `string` | Optional | Owner of the object | -| `author` | [`UserNameAndID`](../../doc/models/user-name-and-id.md) | Optional | - | -| `permission` | `string` | Optional | Indicates the permission which user or user group has on the object | -| `shared_permission` | `string` | Optional | Indicates the permission which user or user group has on the object through sharing of the object with the user or user group | -| `group_permission` | [`List of GroupPermission`](../../doc/models/group-permission.md) | Optional | An array of object with details of permission on the user groups to which the user or user group belongs | - -## Example (as JSON) - -```json -{ - "id": null, - "name": null, - "owner": null, - "author": null, - "permission": null, - "sharedPermission": null, - "groupPermission": null -} -``` - diff --git a/Python/doc/models/tspublic-rest-v2-admin-assignauthor-request.md b/Python/doc/models/tspublic-rest-v2-admin-assignauthor-request.md deleted file mode 100644 index 37e51deb5..000000000 --- a/Python/doc/models/tspublic-rest-v2-admin-assignauthor-request.md +++ /dev/null @@ -1,29 +0,0 @@ - -# Tspublic Rest V2 Admin Assignauthor Request - -## Structure - -`TspublicRestV2AdminAssignauthorRequest` - -## Fields - -| Name | Type | Tags | Description | -| --- | --- | --- | --- | -| `ts_object_id` | `List of string` | Required | A JSON array of GUIDs of the metadata objects. | -| `name` | `string` | Optional | User name of the user account | -| `id` | `string` | Optional | The GUID of the user account | - -## Example (as JSON) - -```json -{ - "tsObjectId": [ - "tsObjectId1", - "tsObjectId2", - "tsObjectId3" - ], - "name": null, - "id": null -} -``` - diff --git a/Python/doc/models/tspublic-rest-v2-admin-changeauthor-request.md b/Python/doc/models/tspublic-rest-v2-admin-changeauthor-request.md deleted file mode 100644 index 4ec5fe9c9..000000000 --- a/Python/doc/models/tspublic-rest-v2-admin-changeauthor-request.md +++ /dev/null @@ -1,35 +0,0 @@ - -# Tspublic Rest V2 Admin Changeauthor Request - -## Structure - -`TspublicRestV2AdminChangeauthorRequest` - -## Fields - -| Name | Type | Tags | Description | -| --- | --- | --- | --- | -| `ts_object_id` | `List of string` | Required | A JSON array of GUIDs of the metadata objects.

To change owner of all the objects owned by a user, provide single input as ALL.

If multiple object ids along with ALL is provided as input, then ALL will be considered. | -| `from_user` | [`FromUserNameAndIDInput`](../../doc/models/from-user-name-and-id-input.md) | Required | A JSON object of name or GUIDs of the current owner of the objects. When both are given then id is considered.

If a list of object ids are provided as input for TsObjectId, then only for those ids that have owner as the value provided in fromUser, the owner will be changed.

Provide either name or id as input. When both are given user id will be considered. | -| `to_user` | [`ToUserNameAndIDInput`](../../doc/models/to-user-name-and-id-input.md) | Required | A JSON object of name or GUIDs of the new owner for the objects. When both are given then id is considered. | - -## Example (as JSON) - -```json -{ - "tsObjectId": [ - "tsObjectId1", - "tsObjectId2", - "tsObjectId3" - ], - "fromUser": { - "name": null, - "id": null - }, - "toUser": { - "name": null, - "id": null - } -} -``` - diff --git a/Python/doc/models/tspublic-rest-v2-admin-configuration-update-request.md b/Python/doc/models/tspublic-rest-v2-admin-configuration-update-request.md deleted file mode 100644 index e15da45da..000000000 --- a/Python/doc/models/tspublic-rest-v2-admin-configuration-update-request.md +++ /dev/null @@ -1,21 +0,0 @@ - -# Tspublic Rest V2 Admin Configuration Update Request - -## Structure - -`TspublicRestV2AdminConfigurationUpdateRequest` - -## Fields - -| Name | Type | Tags | Description | -| --- | --- | --- | --- | -| `configuration` | `string` | Optional | A JSON file with the key-value pair of configuration attributes to be updated.

Example: {"defaultChartDataSize": 5000} | - -## Example (as JSON) - -```json -{ - "configuration": null -} -``` - diff --git a/Python/doc/models/tspublic-rest-v2-admin-forcelogout-request.md b/Python/doc/models/tspublic-rest-v2-admin-forcelogout-request.md deleted file mode 100644 index de8b13e91..000000000 --- a/Python/doc/models/tspublic-rest-v2-admin-forcelogout-request.md +++ /dev/null @@ -1,21 +0,0 @@ - -# Tspublic Rest V2 Admin Forcelogout Request - -## Structure - -`TspublicRestV2AdminForcelogoutRequest` - -## Fields - -| Name | Type | Tags | Description | -| --- | --- | --- | --- | -| `user` | [`List of NameAndIdInput`](../../doc/models/name-and-id-input.md) | Optional | A JSON array of name of users or GUIDs of groups or both. When both are given then id is considered. | - -## Example (as JSON) - -```json -{ - "user": null -} -``` - diff --git a/Python/doc/models/tspublic-rest-v2-admin-resetpassword-request.md b/Python/doc/models/tspublic-rest-v2-admin-resetpassword-request.md deleted file mode 100644 index d3a3e218e..000000000 --- a/Python/doc/models/tspublic-rest-v2-admin-resetpassword-request.md +++ /dev/null @@ -1,25 +0,0 @@ - -# Tspublic Rest V2 Admin Resetpassword Request - -## Structure - -`TspublicRestV2AdminResetpasswordRequest` - -## Fields - -| Name | Type | Tags | Description | -| --- | --- | --- | --- | -| `name` | `string` | Optional | User name of the user account | -| `id` | `string` | Optional | The GUID of the user account to query. | -| `new_password` | `string` | Required | A new password for the user. | - -## Example (as JSON) - -```json -{ - "name": null, - "id": null, - "newPassword": "newPassword6" -} -``` - diff --git a/Python/doc/models/tspublic-rest-v2-admin-syncprincipal-request.md b/Python/doc/models/tspublic-rest-v2-admin-syncprincipal-request.md deleted file mode 100644 index c88636175..000000000 --- a/Python/doc/models/tspublic-rest-v2-admin-syncprincipal-request.md +++ /dev/null @@ -1,40 +0,0 @@ - -# Tspublic Rest V2 Admin Syncprincipal Request - -## Structure - -`TspublicRestV2AdminSyncprincipalRequest` - -## Fields - -| Name | Type | Tags | Description | -| --- | --- | --- | --- | -| `principal_object` | `List of object` | Required | A JSON array of principal objects containing all users and groups present in the external system.

Example:

{

"name": "Customer Success",

"displayName": "Customer Success",

"description": "CS",

"created": 1568926267025,

"modified": 1568926982242,

"principalTypeEnum": "LOCAL_GROUP",

"groupNames": [],

"visibility": "DEFAULT"

},

{

"name": "test",

"displayName": "test one",

"created": 1587573621279,

"modified": 1587573621674,

"mail": "test2@test.com",

"principalTypeEnum": "LOCAL_USER",

"groupNames": [ "Administrator", "All" ],

"visibility": "DEFAULT"

}

You can leave the created and modified dates blank for new users.

You can specify if the principal is a user (LOCAL_USER) or user group (LOCAL_GROUP) in the principalTypeEnum keyword.

Set visibility to NON_SHARABLE, if you do not want the user to be able to share ThoughtSpot objects with other users in this group. | -| `update_modified` | `bool` | Optional | Specifies whether to apply the changes to users and groups already in the cluster based on the principal object list input.
**Default**: `False` | -| `delete_removed` | `bool` | Optional | Specifies whether to delete the users and groups already in the cluster if not present in the principal object list input.
**Default**: `False` | -| `new_user_password` | `string` | Optional | Assign a password for new users added during the sync operation.

All new users added will have this password. It is mandatory to provide value for this field if new users are included in the input list. | - -## Example (as JSON) - -```json -{ - "principalObject": [ - { - "key1": "val1", - "key2": "val2" - }, - { - "key1": "val1", - "key2": "val2" - }, - { - "key1": "val1", - "key2": "val2" - } - ], - "updateModified": null, - "deleteRemoved": null, - "newUserPassword": null -} -``` - diff --git a/Python/doc/models/tspublic-rest-v2-connection-addtable-request.md b/Python/doc/models/tspublic-rest-v2-connection-addtable-request.md deleted file mode 100644 index 53e36757b..000000000 --- a/Python/doc/models/tspublic-rest-v2-connection-addtable-request.md +++ /dev/null @@ -1,35 +0,0 @@ - -# Tspublic Rest V2 Connection Addtable Request - -## Structure - -`TspublicRestV2ConnectionAddtableRequest` - -## Fields - -| Name | Type | Tags | Description | -| --- | --- | --- | --- | -| `id` | `string` | Required | GUID of the connection | -| `table` | [`List of AddTableInput`](../../doc/models/add-table-input.md) | Required | A JSON array of table details | - -## Example (as JSON) - -```json -{ - "id": "id0", - "table": [ - { - "name": "name6", - "dbName": "dbName4", - "schemaName": "schemaName0", - "columns": [ - { - "name": "name6", - "dataType": "dataType8" - } - ] - } - ] -} -``` - diff --git a/Python/doc/models/tspublic-rest-v2-connection-create-request.md b/Python/doc/models/tspublic-rest-v2-connection-create-request.md deleted file mode 100644 index 686391e42..000000000 --- a/Python/doc/models/tspublic-rest-v2-connection-create-request.md +++ /dev/null @@ -1,27 +0,0 @@ - -# Tspublic Rest V2 Connection Create Request - -## Structure - -`TspublicRestV2ConnectionCreateRequest` - -## Fields - -| Name | Type | Tags | Description | -| --- | --- | --- | --- | -| `mtype` | [`Type14Enum`](../../doc/models/type-14-enum.md) | Required | Type of the data connection. | -| `name` | `string` | Required | Name of the connection | -| `description` | `string` | Optional | A short description of the connection. | -| `configuration` | `string` | Required | A JSON object of the connection metadata. The metadata must include configuration attributes required to create the connection. | - -## Example (as JSON) - -```json -{ - "type": "DENODO", - "name": "name0", - "description": null, - "configuration": "configuration6" -} -``` - diff --git a/Python/doc/models/tspublic-rest-v2-connection-removetable-request.md b/Python/doc/models/tspublic-rest-v2-connection-removetable-request.md deleted file mode 100644 index 12ec783a0..000000000 --- a/Python/doc/models/tspublic-rest-v2-connection-removetable-request.md +++ /dev/null @@ -1,28 +0,0 @@ - -# Tspublic Rest V2 Connection Removetable Request - -## Structure - -`TspublicRestV2ConnectionRemovetableRequest` - -## Fields - -| Name | Type | Tags | Description | -| --- | --- | --- | --- | -| `id` | `string` | Required | GUID of the connection | -| `table` | [`List of TableInput`](../../doc/models/table-input.md) | Required | A JSON array of name or GUIDs of the table or both. At least one input is required. Provide either table name or id. When both are given then id is considered | - -## Example (as JSON) - -```json -{ - "id": "id0", - "table": [ - { - "name": null, - "id": null - } - ] -} -``` - diff --git a/Python/doc/models/tspublic-rest-v2-connection-search-request.md b/Python/doc/models/tspublic-rest-v2-connection-search-request.md deleted file mode 100644 index 67ad06a01..000000000 --- a/Python/doc/models/tspublic-rest-v2-connection-search-request.md +++ /dev/null @@ -1,39 +0,0 @@ - -# Tspublic Rest V2 Connection Search Request - -## Structure - -`TspublicRestV2ConnectionSearchRequest` - -## Fields - -| Name | Type | Tags | Description | -| --- | --- | --- | --- | -| `offset` | `int` | Optional | The offset point, starting from where the records should be included in the response. If no input is provided then offset starts from 0
**Default**: `0` | -| `batch_number` | `int` | Optional | An alternate way to set offset for the starting point of the response. Offset field should be kept blank to use the value from this field. Offset value will be calculated as (batchNumber - 1) * batchSize. It is mandatory to provide a value for batchSize with batchNumber. Example: Assume response has 100 records. Now, batchNumber is set as 2 and batchSize as 10, then offset value will be 10. So, 10 records starting from 11th record will be considered.
**Default**: `-1` | -| `batch_size` | `int` | Optional | The number of records that should be included in the response starting from offset position. If no input is provided, then all records starting from the value provided in offset is included in the response.
**Default**: `-1` | -| `sort_by` | [`SortBy1Enum`](../../doc/models/sort-by-1-enum.md) | Optional | Field based on which the re.sponse needs to be ordered. Valid values
**Default**: `'DEFAULT'` | -| `sort_order` | [`SortOrder1Enum`](../../doc/models/sort-order-1-enum.md) | Optional | Order in which sortBy should be applied. Valid values | -| `mtype` | [`Type15Enum`](../../doc/models/type-15-enum.md) | Required | Type of the connect being searched. Valid values: SNOWFLAKE\|AMAZON_REDSHIFT\|GOOGLE_BIGQUERY\|AZURE_SYNAPSE\|TERADATA\|STARBURST\|SAP_HANA\|ORACLE_ADW\|DATABRICKS\|DENODO | -| `name_pattern` | `string` | Optional | A pattern to match the name of the connection. This parameter supports matching case-insensitive strings. For a wildcard match, use %. | -| `fetch_id` | `List of string` | Optional | A JSON array containing the GUIDs of the connections that you want to fetch. | -| `skip_id` | `List of string` | Optional | A JSON array containing the GUIDs of the connections that you want to skip. | -| `tag` | [`List of TagNameAndIdInput`](../../doc/models/tag-name-and-id-input.md) | Optional | A JSON array of name or GUID of tags or both. When both are given then id is considered | - -## Example (as JSON) - -```json -{ - "offset": null, - "batchNumber": null, - "batchSize": null, - "sortBy": null, - "sortOrder": null, - "type": "DENODO", - "namePattern": null, - "fetchId": null, - "skipId": null, - "tag": null -} -``` - diff --git a/Python/doc/models/tspublic-rest-v2-connection-table-request.md b/Python/doc/models/tspublic-rest-v2-connection-table-request.md deleted file mode 100644 index 40487ecf1..000000000 --- a/Python/doc/models/tspublic-rest-v2-connection-table-request.md +++ /dev/null @@ -1,25 +0,0 @@ - -# Tspublic Rest V2 Connection Table Request - -## Structure - -`TspublicRestV2ConnectionTableRequest` - -## Fields - -| Name | Type | Tags | Description | -| --- | --- | --- | --- | -| `id` | `string` | Required | The GUID of the connection | -| `configuration` | `string` | Optional | A JSON object of the connection metadata. If this field is left empty, then the configuration saved in the connection is considered.

To get the tables based on a different configuration, include required attributes in the connection configuration JSON.

Example:

Get tables from Snowflake with a different user account than specified in the connection: {"user":"test_user","password":"test_pwd","role":"test_role"}

Get tables from Redshift for different database than specified in the connection: {"database":"test_db"} | -| `include_column` | `bool` | Optional | When set to true, the response will include column level details as well
**Default**: `True` | - -## Example (as JSON) - -```json -{ - "id": "id0", - "configuration": null, - "includeColumn": null -} -``` - diff --git a/Python/doc/models/tspublic-rest-v2-connection-tablecoloumn-request.md b/Python/doc/models/tspublic-rest-v2-connection-tablecoloumn-request.md deleted file mode 100644 index 2c8e219fe..000000000 --- a/Python/doc/models/tspublic-rest-v2-connection-tablecoloumn-request.md +++ /dev/null @@ -1,31 +0,0 @@ - -# Tspublic Rest V2 Connection Tablecoloumn Request - -## Structure - -`TspublicRestV2ConnectionTablecoloumnRequest` - -## Fields - -| Name | Type | Tags | Description | -| --- | --- | --- | --- | -| `id` | `string` | Required | The GUID of the connection | -| `configuration` | `string` | Optional | A JSON object of the connection metadata. If this field is left empty, then the configuration saved in the connection is considered.

To get the tables based on a different configuration, include required attributes in the connection configuration JSON.

Example:

Get tables from Snowflake with a different user account than specified in the connection: {"user":"test_user","password":"test_pwd","role":"test_role"}

Get tables from Redshift for different database than specified in the connection: {"database":"test_db"} | -| `table` | [`List of ConnectionTableColumnsInput`](../../doc/models/connection-table-columns-input.md) | Required | List of table details | - -## Example (as JSON) - -```json -{ - "id": "id0", - "configuration": null, - "table": [ - { - "dbName": "dbName4", - "schemaName": "schemaName0", - "name": "name6" - } - ] -} -``` - diff --git a/Python/doc/models/tspublic-rest-v2-connection-update-request.md b/Python/doc/models/tspublic-rest-v2-connection-update-request.md deleted file mode 100644 index 6c39f3253..000000000 --- a/Python/doc/models/tspublic-rest-v2-connection-update-request.md +++ /dev/null @@ -1,27 +0,0 @@ - -# Tspublic Rest V2 Connection Update Request - -## Structure - -`TspublicRestV2ConnectionUpdateRequest` - -## Fields - -| Name | Type | Tags | Description | -| --- | --- | --- | --- | -| `id` | `string` | Required | GUID of the connection | -| `name` | `string` | Optional | The text to update the name of the connection. | -| `description` | `string` | Optional | The text to update the description of the connection. | -| `configuration` | `string` | Required | A JSON object of the connection metadata. Include all the configuration attributes with original value along with the changes required to any attribute. | - -## Example (as JSON) - -```json -{ - "id": "id0", - "name": null, - "description": null, - "configuration": "configuration6" -} -``` - diff --git a/Python/doc/models/tspublic-rest-v2-customaction-association-update-request.md b/Python/doc/models/tspublic-rest-v2-customaction-association-update-request.md deleted file mode 100644 index 61169999d..000000000 --- a/Python/doc/models/tspublic-rest-v2-customaction-association-update-request.md +++ /dev/null @@ -1,23 +0,0 @@ - -# Tspublic Rest V2 Customaction Association Update Request - -## Structure - -`TspublicRestV2CustomactionAssociationUpdateRequest` - -## Fields - -| Name | Type | Tags | Description | -| --- | --- | --- | --- | -| `id` | `string` | Required | GUID of the custom action | -| `association` | `string` | Required | A JSON map of the attributes with association of the action to ThoughtSpot object ID

Example:

{"id":"0dbd5b3a-84c1-4407-9803-cf07d67e6fcf","name":"My worksheet action","version":"v2","type":"URL","detail":{"link":"https://unpkg.com","function":"my-worksheet-action","authSelect":"NONE","authToken":"","encodeUser":"","apiKey":"X-API-KEY","apiValue":"","additionalUrlHeaders":"{}"},"actionAssociationMap":{"WORKSHEET":{"2b9d083a-275c-4984-9cfe-90b036affa17":{"enabled":"true","context":"PRIMARY"}}},"context":"NONE","availability":[ ],"userGroupList":["d0326b56-ef23-4c8a-8327-a30e99bcc72b"]} | - -## Example (as JSON) - -```json -{ - "id": "id0", - "association": "association0" -} -``` - diff --git a/Python/doc/models/tspublic-rest-v2-customaction-create-request.md b/Python/doc/models/tspublic-rest-v2-customaction-create-request.md deleted file mode 100644 index aa54bf787..000000000 --- a/Python/doc/models/tspublic-rest-v2-customaction-create-request.md +++ /dev/null @@ -1,21 +0,0 @@ - -# Tspublic Rest V2 Customaction Create Request - -## Structure - -`TspublicRestV2CustomactionCreateRequest` - -## Fields - -| Name | Type | Tags | Description | -| --- | --- | --- | --- | -| `configuration` | `string` | Required | A JSON object with the key-value pair of configuration attributes

Example:

{"id":"3f7eac93-cce1-4ffc-b7a8-429353edbc6b","name":"unpkg test","version":"v2","type":"URL","detail":{"link":"https://unpkg.com ","function":"unpkg-test","authSelect":"BEARER","authToken":"asdfasadf3q4534534","encodeUser":"","apiKey":"X-API-KEY","apiValue":"","additionalUrlHeaders":"{\\"url_header1\\":{\\"id\\":\\"6a82908c-9328-40ff-b347-65adeda12f57\\",\\"key\\":\\"key1\\",\\"value\\":\\"value1\\"}}"},"actionAssociationMap":{"ANSWER":{"e4079d3f-ae71-4b0a-a70a-f17ecaf157a5":{"enabled":"true","context":"MENU"}}},"context":"NONE","availability":["GLOBAL"],"userGroupList":["d0326b56-ef23-4c8a-8327-a30e99bcc72b"]} | - -## Example (as JSON) - -```json -{ - "configuration": "configuration6" -} -``` - diff --git a/Python/doc/models/tspublic-rest-v2-customaction-search-request.md b/Python/doc/models/tspublic-rest-v2-customaction-search-request.md deleted file mode 100644 index eb6b7e2e2..000000000 --- a/Python/doc/models/tspublic-rest-v2-customaction-search-request.md +++ /dev/null @@ -1,21 +0,0 @@ - -# Tspublic Rest V2 Customaction Search Request - -## Structure - -`TspublicRestV2CustomactionSearchRequest` - -## Fields - -| Name | Type | Tags | Description | -| --- | --- | --- | --- | -| `tag` | `List of string` | Optional | A JSON array of tag GUIDs.

If tags are applied to worksheets, search answers, or Liveboard visualizations, and custom actions are associated to these objects, you can use this parameter to filter the custom action data by tags. | - -## Example (as JSON) - -```json -{ - "tag": null -} -``` - diff --git a/Python/doc/models/tspublic-rest-v2-customaction-update-request.md b/Python/doc/models/tspublic-rest-v2-customaction-update-request.md deleted file mode 100644 index bcad68a87..000000000 --- a/Python/doc/models/tspublic-rest-v2-customaction-update-request.md +++ /dev/null @@ -1,23 +0,0 @@ - -# Tspublic Rest V2 Customaction Update Request - -## Structure - -`TspublicRestV2CustomactionUpdateRequest` - -## Fields - -| Name | Type | Tags | Description | -| --- | --- | --- | --- | -| `id` | `string` | Required | GUID of the custom action | -| `configuration` | `string` | Required | A JSON object with the key-value pair of configuration attributes

Example:

{"id":"3f7eac93-cce1-4ffc-b7a8-429353edbc6b","name":"unpkg test","version":"v2","type":"URL","detail":{"link":"https://unpkg.com ","function":"unpkg-test","authSelect":"BEARER","authToken":"asdfasadf3q4534534","encodeUser":"","apiKey":"X-API-KEY","apiValue":"","additionalUrlHeaders":"{\\"url_header1\\":{\\"id\\":\\"6a82908c-9328-40ff-b347-65adeda12f57\\",\\"key\\":\\"key1\\",\\"value\\":\\"value1\\"}}"},"actionAssociationMap":{"ANSWER":{"e4079d3f-ae71-4b0a-a70a-f17ecaf157a5":{"enabled":"true","context":"MENU"}}},"context":"NONE","availability":["GLOBAL"],"userGroupList":["d0326b56-ef23-4c8a-8327-a30e99bcc72b"]} | - -## Example (as JSON) - -```json -{ - "id": "id0", - "configuration": "configuration6" -} -``` - diff --git a/Python/doc/models/tspublic-rest-v2-data-answer-request.md b/Python/doc/models/tspublic-rest-v2-data-answer-request.md deleted file mode 100644 index 913d00e8f..000000000 --- a/Python/doc/models/tspublic-rest-v2-data-answer-request.md +++ /dev/null @@ -1,29 +0,0 @@ - -# Tspublic Rest V2 Data Answer Request - -## Structure - -`TspublicRestV2DataAnswerRequest` - -## Fields - -| Name | Type | Tags | Description | -| --- | --- | --- | --- | -| `offset` | `int` | Optional | The offset point, starting from where the records should be included in the response.

If no input is provided then offset starts from 0.
**Default**: `0` | -| `batch_number` | `int` | Optional | An alternate way to set offset for the starting point of the response.

The value in offset field will not be considered if batchNumber field has value greater than 0.

Offset value will be calculated as (batchNumber - 1) * batchSize.

It is mandatory to provide a value for batchSize with batchNumber.

Example:

Assume response has 100 records. Now, batchNumber is set as 2 and batchSize as 10, then offset value will be 10. So, 10 records starting from 11th record will be considered.
**Default**: `-1` | -| `batch_size` | `int` | Optional | The number of records that should be included in the response starting from offset position.

If no input is provided, then all records starting from the value provided in offset is included in the response
**Default**: `-1` | -| `id` | `string` | Required | The GUID of the Answer | -| `format_type` | [`FormatTypeEnum`](../../doc/models/format-type-enum.md) | Optional | The format of the data in the response.

FULL: The response comes in "column":"value" format.

COMPACT: The response includes only the value of the columns.
**Default**: `'COMPACT'` | - -## Example (as JSON) - -```json -{ - "offset": null, - "batchNumber": null, - "batchSize": null, - "id": "id0", - "formatType": null -} -``` - diff --git a/Python/doc/models/tspublic-rest-v2-data-liveboard-request.md b/Python/doc/models/tspublic-rest-v2-data-liveboard-request.md deleted file mode 100644 index d40b4164c..000000000 --- a/Python/doc/models/tspublic-rest-v2-data-liveboard-request.md +++ /dev/null @@ -1,37 +0,0 @@ - -# Tspublic Rest V2 Data Liveboard Request - -## Structure - -`TspublicRestV2DataLiveboardRequest` - -## Fields - -| Name | Type | Tags | Description | -| --- | --- | --- | --- | -| `offset` | `int` | Optional | The offset point, starting from where the records should be included in the response.

If no input is provided then offset starts from 0.
**Default**: `0` | -| `batch_number` | `int` | Optional | An alternate way to set offset for the starting point of the response.

The value in offset field will not be considered if batchNumber field has value greater than 0.

Offset value will be calculated as (batchNumber - 1) * batchSize.

It is mandatory to provide a value for batchSize with batchNumber.

Example:

Assume response has 100 records. Now, batchNumber is set as 2 and batchSize as 10, then offset value will be 10. So, 10 records starting from 11th record will be considered.
**Default**: `-1` | -| `batch_size` | `int` | Optional | The number of records that should be included in the response starting from offset position.

If no input is provided, then all records starting from the value provided in offset is included in the response
**Default**: `-1` | -| `id` | `string` | Optional | The GUID of the Liveboard | -| `transient_content` | `string` | Optional | If you have embedded ThoughtSpot in your host application, and you want to download Liveboard data with unsaved changes then, pass the transient content from the browser fetch request, using the getExportRequestForCurrentPinboard method. For more information, see https://developers.thoughtspot.com/docs/?pageid=liveboard-export-api#transient-pinboard . If value for this field is provided, then id will not be considered. | -| `viz_id` | `List of string` | Optional | A JSON array of GUIDs of the visualizations in the Liveboard. | -| `runtime_filter` | `string` | Optional | JSON object which contains filter condition to filter the data at the time of data retrieval.

Example: {"col1":"region","op1":"EQ","val1":"northeast","col2":"date","op2":"BET","val2":["1625126400000","1625126400000"]}

For more information, see https://developers.thoughtspot.com/docs/?pageid=runtime-filters | -| `runtime_sort` | `string` | Optional | JSON object which provides columns to sort the data at the time of data retrieval.

Example: {"sortCol1":"region","asc1":true,"sortCol2":"date"}

For more information, see https://developers.thoughtspot.com/docs/?pageid=runtime-filters. | -| `format_type` | [`FormatTypeEnum`](../../doc/models/format-type-enum.md) | Optional | The format of the data in the response.

FULL: The response comes in "column":"value" format.

COMPACT: The response includes only the value of the columns.
**Default**: `'COMPACT'` | - -## Example (as JSON) - -```json -{ - "offset": null, - "batchNumber": null, - "batchSize": null, - "id": null, - "transientContent": null, - "vizId": null, - "runtimeFilter": null, - "runtimeSort": null, - "formatType": null -} -``` - diff --git a/Python/doc/models/tspublic-rest-v2-data-search-request.md b/Python/doc/models/tspublic-rest-v2-data-search-request.md deleted file mode 100644 index ecd37cf44..000000000 --- a/Python/doc/models/tspublic-rest-v2-data-search-request.md +++ /dev/null @@ -1,31 +0,0 @@ - -# Tspublic Rest V2 Data Search Request - -## Structure - -`TspublicRestV2DataSearchRequest` - -## Fields - -| Name | Type | Tags | Description | -| --- | --- | --- | --- | -| `offset` | `int` | Optional | The offset point, starting from where the records should be included in the response.

If no input is provided then offset starts from 0.
**Default**: `-1` | -| `batch_number` | `int` | Optional | An alternate way to set offset for the starting point of the response.

The value in offset field will not be considered if batchNumber field has value greater than 0.

Offset value will be calculated as (batchNumber - 1) * batchSize.

It is mandatory to provide a value for batchSize with batchNumber.

Example:

Assume response has 100 records. Now, batchNumber is set as 2 and batchSize as 10, then offset value will be 10. So, 10 records starting from 11th record will be considered.
**Default**: `-1` | -| `batch_size` | `int` | Optional | The number of records that should be included in the response starting from offset position.

If no input is provided, then all records starting from the value provided in offset is included in the response
**Default**: `-1` | -| `query_string` | `string` | Required | The data search query string. Example: [revenue] > 1000 [ship mode] = 'air' | -| `data_object_id` | `string` | Required | The GUID of the data object, either a worksheet, a view, or a table. | -| `format_type` | [`FormatTypeEnum`](../../doc/models/format-type-enum.md) | Optional | The format of the data in the response.

FULL: The response comes in "column":"value" format.

COMPACT: The response includes only the value of the columns.
**Default**: `'COMPACT'` | - -## Example (as JSON) - -```json -{ - "offset": null, - "batchNumber": null, - "batchSize": null, - "queryString": "queryString4", - "dataObjectId": "dataObjectId2", - "formatType": null -} -``` - diff --git a/Python/doc/models/tspublic-rest-v2-database-table-create-request.md b/Python/doc/models/tspublic-rest-v2-database-table-create-request.md deleted file mode 100644 index 0d57298e4..000000000 --- a/Python/doc/models/tspublic-rest-v2-database-table-create-request.md +++ /dev/null @@ -1,23 +0,0 @@ - -# Tspublic Rest V2 Database Table Create Request - -## Structure - -`TspublicRestV2DatabaseTableCreateRequest` - -## Fields - -| Name | Type | Tags | Description | -| --- | --- | --- | --- | -| `create_database` | `bool` | Optional | Flag to indicate if the database and schema should be created if they do not exist in Falcon. (Valid values: True/False)
**Default**: `True` | -| `schema` | `string` | Optional | DDL of the table to be created. Example: {"database":{"name":"test_db"},"schema":{"name":"test_schema"},"table":{"id":{"name":"test_table"},"primary_key":[{"name":"test_pk"}],"column":[{"id":{"name":"test_pk"},"size":0,"data_type":"TYPE_INT32"},{"id":{"name":"test_col1"},"size":0,"data_type":"TYPE_FLOAT"},{"id":{"name":"test_col2"},"data_type":"TYPE_INT64","datetime":"TYPE_DATE"}{"id":{"name":"test_col3"},"size":10,"data_type":"TYPE_VAR_CHAR"}]}} | - -## Example (as JSON) - -```json -{ - "createDatabase": null, - "schema": null -} -``` - diff --git a/Python/doc/models/tspublic-rest-v2-database-table-runquery-request.md b/Python/doc/models/tspublic-rest-v2-database-table-runquery-request.md deleted file mode 100644 index 14d23c592..000000000 --- a/Python/doc/models/tspublic-rest-v2-database-table-runquery-request.md +++ /dev/null @@ -1,23 +0,0 @@ - -# Tspublic Rest V2 Database Table Runquery Request - -## Structure - -`TspublicRestV2DatabaseTableRunqueryRequest` - -## Fields - -| Name | Type | Tags | Description | -| --- | --- | --- | --- | -| `statement` | `List of string` | Required | A JSON array of TQL statements separated by semi-colon (;). Each TQL statement should end with semi-colon (;). The TQL operations that can be run through this API are restricted to create database and schema, alter table, delete and update table rows. If a TQL statement fails, then the subsequent statements in the array are not run. Example: ["alter table test_db.test_schema.test_table drop contraint primary key;";"alter table test_db.test_schema.test_table add column test_col4 varchar(10) DEFAULT '';"] | - -## Example (as JSON) - -```json -{ - "statement": [ - "statement0" - ] -} -``` - diff --git a/Python/doc/models/tspublic-rest-v2-group-addgroup-request.md b/Python/doc/models/tspublic-rest-v2-group-addgroup-request.md deleted file mode 100644 index b9ac6f289..000000000 --- a/Python/doc/models/tspublic-rest-v2-group-addgroup-request.md +++ /dev/null @@ -1,38 +0,0 @@ - -# Tspublic Rest V2 Group Addgroup Request - -## Structure - -`TspublicRestV2GroupAddgroupRequest` - -## Fields - -| Name | Type | Tags | Description | -| --- | --- | --- | --- | -| `name` | `string` | Optional | Name of the group | -| `id` | `string` | Optional | The GUID of the group to query. | -| `groups` | [`List of GroupNameAndIDInput`](../../doc/models/group-name-and-id-input.md) | Required | Array of objects of groups that the user belong to. | - -## Example (as JSON) - -```json -{ - "name": null, - "id": null, - "groups": [ - { - "name": null, - "id": null - }, - { - "name": null, - "id": null - }, - { - "name": null, - "id": null - } - ] -} -``` - diff --git a/Python/doc/models/tspublic-rest-v2-group-addprivilege-request.md b/Python/doc/models/tspublic-rest-v2-group-addprivilege-request.md deleted file mode 100644 index f54924932..000000000 --- a/Python/doc/models/tspublic-rest-v2-group-addprivilege-request.md +++ /dev/null @@ -1,25 +0,0 @@ - -# Tspublic Rest V2 Group Addprivilege Request - -## Structure - -`TspublicRestV2GroupAddprivilegeRequest` - -## Fields - -| Name | Type | Tags | Description | -| --- | --- | --- | --- | -| `name` | `string` | Optional | Name of the group | -| `id` | `string` | Optional | The GUID of the group to query. | -| `privileges` | [`List of PrivilegeEnum`](../../doc/models/privilege-enum.md) | Optional | A JSON array of name of users or GUIDs of users or both. When both are given then id is considered | - -## Example (as JSON) - -```json -{ - "name": null, - "id": null, - "privileges": null -} -``` - diff --git a/Python/doc/models/tspublic-rest-v2-group-adduser-request.md b/Python/doc/models/tspublic-rest-v2-group-adduser-request.md deleted file mode 100644 index 6883cd816..000000000 --- a/Python/doc/models/tspublic-rest-v2-group-adduser-request.md +++ /dev/null @@ -1,34 +0,0 @@ - -# Tspublic Rest V2 Group Adduser Request - -## Structure - -`TspublicRestV2GroupAdduserRequest` - -## Fields - -| Name | Type | Tags | Description | -| --- | --- | --- | --- | -| `name` | `string` | Optional | Name of the group | -| `id` | `string` | Optional | The GUID of the group to query. | -| `users` | [`List of UserNameAndIDInput`](../../doc/models/user-name-and-id-input.md) | Required | Array of user name that you want to update in user group. | - -## Example (as JSON) - -```json -{ - "name": null, - "id": null, - "users": [ - { - "name": null, - "id": null - }, - { - "name": null, - "id": null - } - ] -} -``` - diff --git a/Python/doc/models/tspublic-rest-v2-group-create-request.md b/Python/doc/models/tspublic-rest-v2-group-create-request.md deleted file mode 100644 index 77ceabb83..000000000 --- a/Python/doc/models/tspublic-rest-v2-group-create-request.md +++ /dev/null @@ -1,37 +0,0 @@ - -# Tspublic Rest V2 Group Create Request - -## Structure - -`TspublicRestV2GroupCreateRequest` - -## Fields - -| Name | Type | Tags | Description | -| --- | --- | --- | --- | -| `name` | `string` | Required | Name of the user group. The group name string must be unique. | -| `display_name` | `string` | Required | A unique display name string for the user group, for example, Developer group. | -| `visibility` | [`Visibility2Enum`](../../doc/models/visibility-2-enum.md) | Optional | Visibility of the user group. The visibility attribute is set to DEFAULT. The DEFAULT attribute makes the user group visible for other user groups and allows them to share objects.
**Default**: `'DEFAULT'` | -| `description` | `string` | Optional | Description text for the group. | -| `privileges` | [`List of PrivilegeEnum`](../../doc/models/privilege-enum.md) | Optional | A JSON array of privileges assigned to the group | -| `org_id` | `int` | Optional | Unique identifier of the organization. If no value is provided then group will be created in the organization associated with the login session. | -| `groups` | [`List of GroupNameAndIDInput`](../../doc/models/group-name-and-id-input.md) | Optional | Array of objects of groups that the group belong to. | -| `users` | [`List of UserNameAndIDInput`](../../doc/models/user-name-and-id-input.md) | Optional | Array of names of user names that the group belong to. | -| `mtype` | [`Type10Enum`](../../doc/models/type-10-enum.md) | Optional | Type of user group. LOCAL_GROUP indicates that the user is created locally in the ThoughtSpot system.
**Default**: `'LOCAL_GROUP'` | - -## Example (as JSON) - -```json -{ - "name": "name0", - "displayName": "displayName2", - "visibility": null, - "description": null, - "privileges": null, - "orgId": null, - "groups": null, - "users": null, - "type": null -} -``` - diff --git a/Python/doc/models/tspublic-rest-v2-group-removegroup-request.md b/Python/doc/models/tspublic-rest-v2-group-removegroup-request.md deleted file mode 100644 index 5a2f79de1..000000000 --- a/Python/doc/models/tspublic-rest-v2-group-removegroup-request.md +++ /dev/null @@ -1,38 +0,0 @@ - -# Tspublic Rest V2 Group Removegroup Request - -## Structure - -`TspublicRestV2GroupRemovegroupRequest` - -## Fields - -| Name | Type | Tags | Description | -| --- | --- | --- | --- | -| `name` | `string` | Optional | Name of the group | -| `id` | `string` | Optional | The GUID of the group to query. | -| `groups` | [`List of GroupNameAndIDInput`](../../doc/models/group-name-and-id-input.md) | Required | Array of objects of groups that the user belong to. | - -## Example (as JSON) - -```json -{ - "name": null, - "id": null, - "groups": [ - { - "name": null, - "id": null - }, - { - "name": null, - "id": null - }, - { - "name": null, - "id": null - } - ] -} -``` - diff --git a/Python/doc/models/tspublic-rest-v2-group-removeprivilege-request.md b/Python/doc/models/tspublic-rest-v2-group-removeprivilege-request.md deleted file mode 100644 index 484f124b8..000000000 --- a/Python/doc/models/tspublic-rest-v2-group-removeprivilege-request.md +++ /dev/null @@ -1,25 +0,0 @@ - -# Tspublic Rest V2 Group Removeprivilege Request - -## Structure - -`TspublicRestV2GroupRemoveprivilegeRequest` - -## Fields - -| Name | Type | Tags | Description | -| --- | --- | --- | --- | -| `name` | `string` | Optional | Name of the group | -| `id` | `string` | Optional | The GUID of the group to query. | -| `privileges` | [`List of PrivilegeEnum`](../../doc/models/privilege-enum.md) | Optional | A JSON array of name of users or GUIDs of users or both. When both are given then id is considered | - -## Example (as JSON) - -```json -{ - "name": null, - "id": null, - "privileges": null -} -``` - diff --git a/Python/doc/models/tspublic-rest-v2-group-removeuser-request.md b/Python/doc/models/tspublic-rest-v2-group-removeuser-request.md deleted file mode 100644 index 9b9260438..000000000 --- a/Python/doc/models/tspublic-rest-v2-group-removeuser-request.md +++ /dev/null @@ -1,34 +0,0 @@ - -# Tspublic Rest V2 Group Removeuser Request - -## Structure - -`TspublicRestV2GroupRemoveuserRequest` - -## Fields - -| Name | Type | Tags | Description | -| --- | --- | --- | --- | -| `name` | `string` | Optional | Name of the group | -| `id` | `string` | Optional | The GUID of the group to query. | -| `users` | [`List of UserNameAndIDInput`](../../doc/models/user-name-and-id-input.md) | Required | Array of user name that you want to delete from user group. | - -## Example (as JSON) - -```json -{ - "name": null, - "id": null, - "users": [ - { - "name": null, - "id": null - }, - { - "name": null, - "id": null - } - ] -} -``` - diff --git a/Python/doc/models/tspublic-rest-v2-group-search-request.md b/Python/doc/models/tspublic-rest-v2-group-search-request.md deleted file mode 100644 index 057743e61..000000000 --- a/Python/doc/models/tspublic-rest-v2-group-search-request.md +++ /dev/null @@ -1,39 +0,0 @@ - -# Tspublic Rest V2 Group Search Request - -## Structure - -`TspublicRestV2GroupSearchRequest` - -## Fields - -| Name | Type | Tags | Description | -| --- | --- | --- | --- | -| `output_fields` | `List of string` | Optional | Array of field names that need to be included in the response | -| `name` | `string` | Optional | Name of the user group | -| `id` | `string` | Optional | GUID of the group to update | -| `display_name` | `string` | Optional | A unique display name string for the user group, for example, Developer group. | -| `visibility` | `string` | Optional | Visibility of the user group. The visibility attribute is set to DEFAULT. The DEFAULT attribute makes the user group visible for other user groups and allows them to share objects. | -| `description` | `string` | Optional | Description text for the group. | -| `privileges` | [`List of PrivilegeEnum`](../../doc/models/privilege-enum.md) | Optional | A JSON array of privileges assigned to the group | -| `groups` | [`List of GroupNameAndIDInput`](../../doc/models/group-name-and-id-input.md) | Optional | Array of objects of groups that the user belong to. | -| `users` | [`List of UserNameAndIDInput`](../../doc/models/user-name-and-id-input.md) | Optional | Array of user name that associated with group. | -| `mtype` | `string` | Optional | Type of user group. LOCAL_GROUP indicates that the user is created locally in the ThoughtSpot system. | - -## Example (as JSON) - -```json -{ - "outputFields": null, - "name": null, - "id": null, - "displayName": null, - "visibility": null, - "description": null, - "privileges": null, - "groups": null, - "users": null, - "type": null -} -``` - diff --git a/Python/doc/models/tspublic-rest-v2-group-update-request.md b/Python/doc/models/tspublic-rest-v2-group-update-request.md deleted file mode 100644 index ac369d962..000000000 --- a/Python/doc/models/tspublic-rest-v2-group-update-request.md +++ /dev/null @@ -1,39 +0,0 @@ - -# Tspublic Rest V2 Group Update Request - -## Structure - -`TspublicRestV2GroupUpdateRequest` - -## Fields - -| Name | Type | Tags | Description | -| --- | --- | --- | --- | -| `name` | `string` | Optional | Name of the user group. The group name string must be unique. | -| `id` | `string` | Optional | he GUID of the user account to query. | -| `display_name` | `string` | Optional | A unique display name string for the user group, for example, Developer group. | -| `visibility` | [`Visibility2Enum`](../../doc/models/visibility-2-enum.md) | Optional | Visibility of the user group. The visibility attribute is set to DEFAULT. The DEFAULT attribute makes the user group visible for other user groups and allows them to share objects.
**Default**: `'DEFAULT'` | -| `description` | `string` | Optional | Description text for the group. | -| `privileges` | [`List of PrivilegeEnum`](../../doc/models/privilege-enum.md) | Optional | A JSON array of privileges assigned to the group | -| `groups` | [`List of GroupNameAndIDInput`](../../doc/models/group-name-and-id-input.md) | Optional | Array of objects of groups that the user belong to. | -| `users` | [`List of UserNameAndIDInput`](../../doc/models/user-name-and-id-input.md) | Optional | Array of object, A JSON array of name of users of users. | -| `assigned_liveboards` | `List of string` | Optional | Array of string. An array of liveboard ids to be assigned to the group. | -| `mtype` | [`Type10Enum`](../../doc/models/type-10-enum.md) | Optional | Type of user group. LOCAL_GROUP indicates that the user is created locally in the ThoughtSpot system.
**Default**: `'LOCAL_GROUP'` | - -## Example (as JSON) - -```json -{ - "name": null, - "id": null, - "displayName": null, - "visibility": null, - "description": null, - "privileges": null, - "groups": null, - "users": null, - "assignedLiveboards": null, - "type": null -} -``` - diff --git a/Python/doc/models/tspublic-rest-v2-materialization-refreshview-request.md b/Python/doc/models/tspublic-rest-v2-materialization-refreshview-request.md deleted file mode 100644 index fd33ba900..000000000 --- a/Python/doc/models/tspublic-rest-v2-materialization-refreshview-request.md +++ /dev/null @@ -1,21 +0,0 @@ - -# Tspublic Rest V2 Materialization Refreshview Request - -## Structure - -`TspublicRestV2MaterializationRefreshviewRequest` - -## Fields - -| Name | Type | Tags | Description | -| --- | --- | --- | --- | -| `id` | `string` | Required | GUID of metadata object | - -## Example (as JSON) - -```json -{ - "id": "id0" -} -``` - diff --git a/Python/doc/models/tspublic-rest-v2-metadata-dependency-request.md b/Python/doc/models/tspublic-rest-v2-metadata-dependency-request.md deleted file mode 100644 index 0d2fa44cb..000000000 --- a/Python/doc/models/tspublic-rest-v2-metadata-dependency-request.md +++ /dev/null @@ -1,27 +0,0 @@ - -# Tspublic Rest V2 Metadata Dependency Request - -## Structure - -`TspublicRestV2MetadataDependencyRequest` - -## Fields - -| Name | Type | Tags | Description | -| --- | --- | --- | --- | -| `mtype` | [`Type13Enum`](../../doc/models/type-13-enum.md) | Required | Type of the data object | -| `id` | `List of string` | Required | A JSON array of GUIDs of the objects | -| `batch_size` | `int` | Optional | The maximum number of batches to fetch in a query. If this attribute is not defined, the value specified in the cluster configuration is used. To get the list of all dependent objects in a single query, define the batch size attribute as -1
**Default**: `-1` | - -## Example (as JSON) - -```json -{ - "type": "COLUMN", - "id": [ - "id0" - ], - "batchSize": null -} -``` - diff --git a/Python/doc/models/tspublic-rest-v2-metadata-detail-search-request.md b/Python/doc/models/tspublic-rest-v2-metadata-detail-search-request.md deleted file mode 100644 index c44572c85..000000000 --- a/Python/doc/models/tspublic-rest-v2-metadata-detail-search-request.md +++ /dev/null @@ -1,31 +0,0 @@ - -# Tspublic Rest V2 Metadata Detail Search Request - -## Structure - -`TspublicRestV2MetadataDetailSearchRequest` - -## Fields - -| Name | Type | Tags | Description | -| --- | --- | --- | --- | -| `mtype` | [`Type6Enum`](../../doc/models/type-6-enum.md) | Required | Type of the metadata object being searched. | -| `id` | `List of string` | Required | A JSON array of GUIDs of the objects. | -| `show_hidden` | `bool` | Optional | When set to true, returns details of the hidden objects, such as a column in a worksheet or a table.
**Default**: `False` | -| `drop_question_details` | `bool` | Optional | When set to true, the search assist data associated with a worksheet is not included in the API response. This attribute is applicable only for DATAOBJECT data type.
**Default**: `False` | -| `version` | `string` | Optional | Specify the version to retrieve the objects from. By default, the API returns metadata for all versions of the object. | - -## Example (as JSON) - -```json -{ - "type": "DATAOBJECT", - "id": [ - "id0" - ], - "showHidden": null, - "dropQuestionDetails": null, - "version": null -} -``` - diff --git a/Python/doc/models/tspublic-rest-v2-metadata-favorite-assign-request.md b/Python/doc/models/tspublic-rest-v2-metadata-favorite-assign-request.md deleted file mode 100644 index 84df85a69..000000000 --- a/Python/doc/models/tspublic-rest-v2-metadata-favorite-assign-request.md +++ /dev/null @@ -1,34 +0,0 @@ - -# Tspublic Rest V2 Metadata Favorite Assign Request - -## Structure - -`TspublicRestV2MetadataFavoriteAssignRequest` - -## Fields - -| Name | Type | Tags | Description | -| --- | --- | --- | --- | -| `user_name` | `string` | Optional | Name of the user | -| `user_id` | `string` | Optional | The GUID of the user | -| `ts_object` | [`List of TsObjectInput`](../../doc/models/ts-object-input.md) | Required | A JSON Array of GUIDs and type of metadata object. | - -## Example (as JSON) - -```json -{ - "userName": null, - "userId": null, - "tsObject": [ - { - "id": "id2", - "type": "DATAOBJECT" - }, - { - "id": "id3", - "type": "CONNECTION" - } - ] -} -``` - diff --git a/Python/doc/models/tspublic-rest-v2-metadata-favorite-unassign-request.md b/Python/doc/models/tspublic-rest-v2-metadata-favorite-unassign-request.md deleted file mode 100644 index 29b5f5ef6..000000000 --- a/Python/doc/models/tspublic-rest-v2-metadata-favorite-unassign-request.md +++ /dev/null @@ -1,34 +0,0 @@ - -# Tspublic Rest V2 Metadata Favorite Unassign Request - -## Structure - -`TspublicRestV2MetadataFavoriteUnassignRequest` - -## Fields - -| Name | Type | Tags | Description | -| --- | --- | --- | --- | -| `user_name` | `string` | Optional | Name of the user | -| `user_id` | `string` | Optional | The GUID of the user | -| `ts_object` | [`List of TsObjectInput`](../../doc/models/ts-object-input.md) | Required | A JSON Array of GUIDs and type of metadata object. | - -## Example (as JSON) - -```json -{ - "userName": null, - "userId": null, - "tsObject": [ - { - "id": "id2", - "type": "DATAOBJECT" - }, - { - "id": "id3", - "type": "CONNECTION" - } - ] -} -``` - diff --git a/Python/doc/models/tspublic-rest-v2-metadata-header-search-request.md b/Python/doc/models/tspublic-rest-v2-metadata-header-search-request.md deleted file mode 100644 index 34d0a707c..000000000 --- a/Python/doc/models/tspublic-rest-v2-metadata-header-search-request.md +++ /dev/null @@ -1,53 +0,0 @@ - -# Tspublic Rest V2 Metadata Header Search Request - -## Structure - -`TspublicRestV2MetadataHeaderSearchRequest` - -## Fields - -| Name | Type | Tags | Description | -| --- | --- | --- | --- | -| `output_fields` | `List of string` | Optional | Array of header field names that need to be included in the header response | -| `offset` | `int` | Optional | The batch offset, starting from where the records should be included in the response. If no input is provided then offset starts from 0. Default: 0
**Default**: `0` | -| `batch_number` | `int` | Optional | An alternate way to set offset for the starting point of the response.

The value in offset field will not be considered if batchNumber field has value greater than 0.

Offset value will be calculated as (batchNumber - 1) * batchSize.

It is mandatory to provide a value for batchSize with batchNumber.

Example:

Assume response has 100 records. Now, batchNumber is set as 2 and batchSize as 10, then offset value will be 10. So, 10 records starting from 11th record will be considered. | -| `batch_size` | `int` | Optional | The number of records that should be included in the response starting from offset position. If no input is provided then first page is included in the response.
**Default**: `-1` | -| `sort_by` | [`SortByEnum`](../../doc/models/sort-by-enum.md) | Optional | Field based on which the response needs to be ordered.
**Default**: `'DEFAULT'` | -| `sort_order` | [`SortOrderEnum`](../../doc/models/sort-order-enum.md) | Optional | Order in which sortBy should be applied.
**Default**: `'DEFAULT'` | -| `mtype` | [`Type3Enum`](../../doc/models/type-3-enum.md) | Required | Type of the metadata object being searched. | -| `name_pattern` | `string` | Optional | A pattern to match the name of the metadata object. This parameter supports matching case-insensitive strings. For a wildcard match, use %. | -| `fetch_id` | `List of string` | Optional | A JSON array containing the GUIDs of the metadata objects that you want to fetch. | -| `skip_id` | `List of string` | Optional | A JSON array containing the GUIDs of the metadata objects that you want to skip. | -| `show_hidden` | `bool` | Optional | When set to true, returns details of the hidden objects, such as a column in a worksheet or a table.
**Default**: `False` | -| `auto_created` | `bool` | Optional | A flag to indicate whether to list only the auto created objects. When no value is provided as input then all objects are returned. | -| `access_level` | [`List of AccessLevelInput`](../../doc/models/access-level-input.md) | Optional | A JSON array of objects with user details for which the metadata objects should be considered from the repository
If you specify ID or name of user and set the type parameter to USER, the API returns metadata objects associated with the user
If you specify ID or name of user group and set the type parameter to USER_GROUP, the API returns metadata objects for all the users mapped to the specified user group.
If the id or name parameter is not defined, but the type attribute is set to USER or USER_GROUP, then the API will not return and response.
If no input is provided for any field for this object, then the API returns headers for all users.
If both name and id is provided, then id will be considered. | -| `tag` | [`List of TagNameAndIdInput`](../../doc/models/tag-name-and-id-input.md) | Optional | A JSON array of name or GUID of tags or both. When both are given then id is considered. | -| `favorite_for` | [`List of NameAndIdInput`](../../doc/models/name-and-id-input.md) | Optional | A JSON array of name or GUID of the user or both for whom the object is assigned as favorite. When both are given then id is considered. | -| `author` | [`List of NameAndIdInput`](../../doc/models/name-and-id-input.md) | Optional | A JSON array of name or GUID of the user or both who created the object. When both are given then id is considered | -| `last_modified_by` | [`List of NameAndIdInput`](../../doc/models/name-and-id-input.md) | Optional | A JSON array of name or GUID of the user or both who last modified the object. When both are given then id is considered. | - -## Example (as JSON) - -```json -{ - "outputFields": null, - "offset": null, - "batchNumber": null, - "batchSize": null, - "sortBy": null, - "sortOrder": null, - "type": "COLUMN_ALL", - "namePattern": null, - "fetchId": null, - "skipId": null, - "showHidden": null, - "autoCreated": null, - "accessLevel": null, - "tag": null, - "favoriteFor": null, - "author": null, - "lastModifiedBy": null -} -``` - diff --git a/Python/doc/models/tspublic-rest-v2-metadata-homeliveboard-assign-request.md b/Python/doc/models/tspublic-rest-v2-metadata-homeliveboard-assign-request.md deleted file mode 100644 index c1aed4c34..000000000 --- a/Python/doc/models/tspublic-rest-v2-metadata-homeliveboard-assign-request.md +++ /dev/null @@ -1,25 +0,0 @@ - -# Tspublic Rest V2 Metadata Homeliveboard Assign Request - -## Structure - -`TspublicRestV2MetadataHomeliveboardAssignRequest` - -## Fields - -| Name | Type | Tags | Description | -| --- | --- | --- | --- | -| `user_name` | `string` | Optional | Name of the user | -| `user_id` | `string` | Optional | The GUID of the user | -| `liveboard_id` | `string` | Optional | The GUID of the liveboard | - -## Example (as JSON) - -```json -{ - "userName": null, - "userId": null, - "liveboardId": null -} -``` - diff --git a/Python/doc/models/tspublic-rest-v2-metadata-homeliveboard-unassign-request.md b/Python/doc/models/tspublic-rest-v2-metadata-homeliveboard-unassign-request.md deleted file mode 100644 index 79856cd29..000000000 --- a/Python/doc/models/tspublic-rest-v2-metadata-homeliveboard-unassign-request.md +++ /dev/null @@ -1,23 +0,0 @@ - -# Tspublic Rest V2 Metadata Homeliveboard Unassign Request - -## Structure - -`TspublicRestV2MetadataHomeliveboardUnassignRequest` - -## Fields - -| Name | Type | Tags | Description | -| --- | --- | --- | --- | -| `user_name` | `string` | Optional | Name of the user | -| `user_id` | `string` | Optional | The GUID of the user | - -## Example (as JSON) - -```json -{ - "userName": null, - "userId": null -} -``` - diff --git a/Python/doc/models/tspublic-rest-v2-metadata-tag-assign-request.md b/Python/doc/models/tspublic-rest-v2-metadata-tag-assign-request.md deleted file mode 100644 index 508a23188..000000000 --- a/Python/doc/models/tspublic-rest-v2-metadata-tag-assign-request.md +++ /dev/null @@ -1,34 +0,0 @@ - -# Tspublic Rest V2 Metadata Tag Assign Request - -## Structure - -`TspublicRestV2MetadataTagAssignRequest` - -## Fields - -| Name | Type | Tags | Description | -| --- | --- | --- | --- | -| `name` | `string` | Optional | Name of the tag | -| `id` | `string` | Optional | The GUID of the tag | -| `ts_object` | [`List of TsObjectInput`](../../doc/models/ts-object-input.md) | Required | A JSON Array of GUIDs and type of metadata object. | - -## Example (as JSON) - -```json -{ - "name": null, - "id": null, - "tsObject": [ - { - "id": "id2", - "type": "DATAOBJECT" - }, - { - "id": "id3", - "type": "CONNECTION" - } - ] -} -``` - diff --git a/Python/doc/models/tspublic-rest-v2-metadata-tag-create-request.md b/Python/doc/models/tspublic-rest-v2-metadata-tag-create-request.md deleted file mode 100644 index da6a9af2e..000000000 --- a/Python/doc/models/tspublic-rest-v2-metadata-tag-create-request.md +++ /dev/null @@ -1,23 +0,0 @@ - -# Tspublic Rest V2 Metadata Tag Create Request - -## Structure - -`TspublicRestV2MetadataTagCreateRequest` - -## Fields - -| Name | Type | Tags | Description | -| --- | --- | --- | --- | -| `name` | `string` | Required | Name of the tag | -| `color` | `string` | Optional | Hex color code to be assigned to the tag | - -## Example (as JSON) - -```json -{ - "name": "name0", - "color": null -} -``` - diff --git a/Python/doc/models/tspublic-rest-v2-metadata-tag-unassign-request.md b/Python/doc/models/tspublic-rest-v2-metadata-tag-unassign-request.md deleted file mode 100644 index b1103d1ab..000000000 --- a/Python/doc/models/tspublic-rest-v2-metadata-tag-unassign-request.md +++ /dev/null @@ -1,34 +0,0 @@ - -# Tspublic Rest V2 Metadata Tag Unassign Request - -## Structure - -`TspublicRestV2MetadataTagUnassignRequest` - -## Fields - -| Name | Type | Tags | Description | -| --- | --- | --- | --- | -| `name` | `string` | Optional | Name of the tag | -| `id` | `string` | Optional | The GUID of the tag | -| `ts_object` | [`List of TsObjectInput`](../../doc/models/ts-object-input.md) | Required | A JSON Array of GUIDs and type of metadata object. | - -## Example (as JSON) - -```json -{ - "name": null, - "id": null, - "tsObject": [ - { - "id": "id2", - "type": "DATAOBJECT" - }, - { - "id": "id3", - "type": "CONNECTION" - } - ] -} -``` - diff --git a/Python/doc/models/tspublic-rest-v2-metadata-tag-update-request.md b/Python/doc/models/tspublic-rest-v2-metadata-tag-update-request.md deleted file mode 100644 index 8dfc507ad..000000000 --- a/Python/doc/models/tspublic-rest-v2-metadata-tag-update-request.md +++ /dev/null @@ -1,25 +0,0 @@ - -# Tspublic Rest V2 Metadata Tag Update Request - -## Structure - -`TspublicRestV2MetadataTagUpdateRequest` - -## Fields - -| Name | Type | Tags | Description | -| --- | --- | --- | --- | -| `name` | `string` | Optional | Name of the tag | -| `id` | `string` | Optional | The GUID of the tag | -| `color` | `string` | Optional | Hex color code to be assigned to the tag | - -## Example (as JSON) - -```json -{ - "name": null, - "id": null, - "color": null -} -``` - diff --git a/Python/doc/models/tspublic-rest-v2-metadata-tml-export-request.md b/Python/doc/models/tspublic-rest-v2-metadata-tml-export-request.md deleted file mode 100644 index 6dae52ea8..000000000 --- a/Python/doc/models/tspublic-rest-v2-metadata-tml-export-request.md +++ /dev/null @@ -1,27 +0,0 @@ - -# Tspublic Rest V2 Metadata Tml Export Request - -## Structure - -`TspublicRestV2MetadataTmlExportRequest` - -## Fields - -| Name | Type | Tags | Description | -| --- | --- | --- | --- | -| `id` | `List of string` | Required | A JSON array of GUIDs of the objects. | -| `format_type` | [`FormatType3Enum`](../../doc/models/format-type-3-enum.md) | Optional | The format in which to export the objects
**Default**: `'YAML'` | -| `export_associated` | `bool` | Optional | Specifies if you would like to export the associated objects. To export the objects associated with the objects specified in id, set the value to true. When set to true, the API exports any underlying worksheets, tables, or views for a given object. By default, the API does not export these underlying objects
**Default**: `False` | - -## Example (as JSON) - -```json -{ - "id": [ - "id0" - ], - "formatType": null, - "exportAssociated": null -} -``` - diff --git a/Python/doc/models/tspublic-rest-v2-metadata-tml-import-request.md b/Python/doc/models/tspublic-rest-v2-metadata-tml-import-request.md deleted file mode 100644 index c70e087c1..000000000 --- a/Python/doc/models/tspublic-rest-v2-metadata-tml-import-request.md +++ /dev/null @@ -1,27 +0,0 @@ - -# Tspublic Rest V2 Metadata Tml Import Request - -## Structure - -`TspublicRestV2MetadataTmlImportRequest` - -## Fields - -| Name | Type | Tags | Description | -| --- | --- | --- | --- | -| `object_tml` | `List of string` | Required | A string array of TML objects to upload, in YAML or JSON format.

If TML is in YAML format, then use escape characters for quotes and new line characters.

Example TML:

guid: 6d2c1c9b-a407-409c-8c0c-819aeb51350f\ntable:\n name: TESTINT\n db: SUPPLYCHAIN_MAIN\n schema: PUBLIC\n db_table: TESTINT\n connection:\n name: SnowflakeConnection\n columns:\n - name: C1\n db_column_name: C1\n properties:\n column_type: MEASURE\n aggregation: SUM\n index_type: DONT_INDEX\n db_column_properties:\n data_type: INT64\n

If TML is in JSON format, then use escape characters for quotes.

Example TML:

{\\"guid\\": \\"6d2c1c9b-a407-409c-8c0c-819aeb51350f\\", \\"table\\": { \\"name\\": \\"TESTINT\\", \\"db\\": \\"SUPPLYCHAIN_MAIN\\", \\"schema\\": \\"PUBLIC\\", \\"db_table\\": \\"TESTINT\\", \\"connection\\": { \\"name\\": \\"SnowflakeConnection\\" }, \\"columns\\": [ { \\"name\\": \\"C1\\", \\"db_column_name\\": \\"C1\\", \\"properties\\": { \\"column_type\\": \\"MEASURE\\", \\"aggregation\\": \\"SUM\\", \\"index_type\\": \\"DONT_INDEX\\" }, \\"db_column_properties\\": { \\"data_type\\": \\"INT64\\" } } ] } }', | -| `import_policy` | [`ImportPolicyEnum`](../../doc/models/import-policy-enum.md) | Optional | Policy to follow during import
**Default**: `'PARTIAL'` | -| `force_create` | `bool` | Optional | Specifies if you are updating or creating objects. To create new objects, specify true. By default, ThoughtSpot updates existing objects that have the same GUID as the objects you are importing. When set to true, the GUID property in the imported TML is replaced on the server, and the response headers will include the id_guid property with the GUID of the new object. The new object will be assigned a new GUID, even if the imported TML file included a guid value. Thus, there is no need to include the guid in the TML file if you are using forceCreate=true.
**Default**: `False` | - -## Example (as JSON) - -```json -{ - "objectTML": [ - "objectTML7" - ], - "importPolicy": null, - "forceCreate": null -} -``` - diff --git a/Python/doc/models/tspublic-rest-v2-org-create-request.md b/Python/doc/models/tspublic-rest-v2-org-create-request.md deleted file mode 100644 index dcc737a96..000000000 --- a/Python/doc/models/tspublic-rest-v2-org-create-request.md +++ /dev/null @@ -1,23 +0,0 @@ - -# Tspublic Rest V2 Org Create Request - -## Structure - -`TspublicRestV2OrgCreateRequest` - -## Fields - -| Name | Type | Tags | Description | -| --- | --- | --- | --- | -| `name` | `string` | Required | Name of the organization. | -| `description` | `string` | Optional | Description text for the organization. | - -## Example (as JSON) - -```json -{ - "name": "name0", - "description": null -} -``` - diff --git a/Python/doc/models/tspublic-rest-v2-org-search-request.md b/Python/doc/models/tspublic-rest-v2-org-search-request.md deleted file mode 100644 index b9c292ca9..000000000 --- a/Python/doc/models/tspublic-rest-v2-org-search-request.md +++ /dev/null @@ -1,25 +0,0 @@ - -# Tspublic Rest V2 Org Search Request - -## Structure - -`TspublicRestV2OrgSearchRequest` - -## Fields - -| Name | Type | Tags | Description | -| --- | --- | --- | --- | -| `name` | `string` | Optional | Name of the organization. | -| `id` | `int` | Optional | The ID of the organization. | -| `show_deleted` | `bool` | Optional | When set to true, the response will include the details of deleted organization also.
**Default**: `False` | - -## Example (as JSON) - -```json -{ - "name": null, - "id": null, - "showDeleted": null -} -``` - diff --git a/Python/doc/models/tspublic-rest-v2-org-update-request.md b/Python/doc/models/tspublic-rest-v2-org-update-request.md deleted file mode 100644 index a72f36085..000000000 --- a/Python/doc/models/tspublic-rest-v2-org-update-request.md +++ /dev/null @@ -1,27 +0,0 @@ - -# Tspublic Rest V2 Org Update Request - -## Structure - -`TspublicRestV2OrgUpdateRequest` - -## Fields - -| Name | Type | Tags | Description | -| --- | --- | --- | --- | -| `name` | `string` | Optional | Name of the organization. | -| `id` | `int` | Optional | The ID of the organization. | -| `description` | `string` | Optional | Description text for the organization. | -| `active` | `bool` | Optional | Status of the organization. | - -## Example (as JSON) - -```json -{ - "name": null, - "id": null, - "description": null, - "active": null -} -``` - diff --git a/Python/doc/models/tspublic-rest-v2-security-permission-principal-search-request.md b/Python/doc/models/tspublic-rest-v2-security-permission-principal-search-request.md deleted file mode 100644 index 83c52dea5..000000000 --- a/Python/doc/models/tspublic-rest-v2-security-permission-principal-search-request.md +++ /dev/null @@ -1,32 +0,0 @@ - -# Tspublic Rest V2 Security Permission Principal Search Request - -## Structure - -`TspublicRestV2SecurityPermissionPrincipalSearchRequest` - -## Fields - -| Name | Type | Tags | Description | -| --- | --- | --- | --- | -| `principal` | [`List of UserNameAndIDInput`](../../doc/models/user-name-and-id-input.md) | Required | A JSON array of principal names or GUIDs to be included in the request. When both are given then id is considered. | -| `ts_object` | [`List of TsObjectSearchInput`](../../doc/models/ts-object-search-input.md) | Optional | A JSON Array of GUIDs and type of metadata object. | - -## Example (as JSON) - -```json -{ - "principal": [ - { - "name": null, - "id": null - }, - { - "name": null, - "id": null - } - ], - "tsObject": null -} -``` - diff --git a/Python/doc/models/tspublic-rest-v2-security-permission-tsobject-search-request.md b/Python/doc/models/tspublic-rest-v2-security-permission-tsobject-search-request.md deleted file mode 100644 index 2f4c5a1c1..000000000 --- a/Python/doc/models/tspublic-rest-v2-security-permission-tsobject-search-request.md +++ /dev/null @@ -1,39 +0,0 @@ - -# Tspublic Rest V2 Security Permission Tsobject Search Request - -## Structure - -`TspublicRestV2SecurityPermissionTsobjectSearchRequest` - -## Fields - -| Name | Type | Tags | Description | -| --- | --- | --- | --- | -| `ts_object` | [`List of TsObjectSearchInput`](../../doc/models/ts-object-search-input.md) | Required | A JSON Array of GUIDs and type of metadata object. | -| `principal` | [`List of UserNameAndIDInput`](../../doc/models/user-name-and-id-input.md) | Optional | A JSON array of principal names or GUIDs. When both are given then id is considered. | -| `include_dependent` | `bool` | Optional | When this field is set to true, the API response includes the permission details for the dependent objects.
**Default**: `False` | - -## Example (as JSON) - -```json -{ - "tsObject": [ - { - "type": "DATAOBJECT", - "id": [ - "id2" - ] - }, - { - "type": "COLUMN", - "id": [ - "id3", - "id4" - ] - } - ], - "principal": null, - "includeDependent": null -} -``` - diff --git a/Python/doc/models/tspublic-rest-v2-security-share-tsobject-request.md b/Python/doc/models/tspublic-rest-v2-security-share-tsobject-request.md deleted file mode 100644 index 4eff80f87..000000000 --- a/Python/doc/models/tspublic-rest-v2-security-share-tsobject-request.md +++ /dev/null @@ -1,35 +0,0 @@ - -# Tspublic Rest V2 Security Share Tsobject Request - -## Structure - -`TspublicRestV2SecurityShareTsobjectRequest` - -## Fields - -| Name | Type | Tags | Description | -| --- | --- | --- | --- | -| `mtype` | [`Type18Enum`](../../doc/models/type-18-enum.md) | Required | Type of metadata object. Valid values: Liveboard\|Answer\|DataObject\|Column | -| `id` | `List of string` | Required | A JSON array of the GUIDs of the objects to be shared | -| `permission` | `string` | Required | A JSON object with GUIDs of user and user group, and the type of access privilge.

You can provide READ_ONLY or MODIFY access to the objects. With READ_ONLY access, the user or user group can view the shared object, whereas MODIFY access enables users to modify the object.

To remove access to a shared object, you can set the shareMode in the permission string to NO_ACCESS. Example:

{"permissions": {"e7040a64-7ff1-4ab9-a1b0-f1acac596866": {"shareMode": "READ_ONLY"}, "f7b8f511-317c-485d-8131-26cf084ef47b": {"shareMode": "MODIFY"}, "7a9a6715-e154-431b-baaf-7b58246c13dd":{"shareMode":"NO_ACCESS"}}} | -| `email_id` | `List of string` | Optional | The email addresses that should ne notified when the objects are shared. | -| `notify` | `bool` | Optional | When set to true, a notification is sent to the users after an object is shared.
**Default**: `True` | -| `message` | `string` | Optional | The message text to send in the notification email. | -| `include_custom_embed_url` | `bool` | Optional | When set to true, ThoughtSpot sends a link with the host application context to allow users to access the shared object from their ThoughtSpot embedded instance.
**Default**: `False` | - -## Example (as JSON) - -```json -{ - "type": "DATAOBJECT", - "id": [ - "id0" - ], - "permission": "permission2", - "emailId": null, - "notify": null, - "message": null, - "includeCustomEmbedUrl": null -} -``` - diff --git a/Python/doc/models/tspublic-rest-v2-security-share-visualization-request.md b/Python/doc/models/tspublic-rest-v2-security-share-visualization-request.md deleted file mode 100644 index d40f1bfd9..000000000 --- a/Python/doc/models/tspublic-rest-v2-security-share-visualization-request.md +++ /dev/null @@ -1,37 +0,0 @@ - -# Tspublic Rest V2 Security Share Visualization Request - -## Structure - -`TspublicRestV2SecurityShareVisualizationRequest` - -## Fields - -| Name | Type | Tags | Description | -| --- | --- | --- | --- | -| `id` | `string` | Required | A JSON array of the GUIDs of the objects to be shared | -| `viz_id` | `string` | Required | The GUID of visualization | -| `principal_id` | `List of string` | Required | The GUID of the users and user groups with which you want to share the visualization | -| `email_id` | `List of string` | Optional | The email addresses that should ne notified when the objects are shared | -| `notify` | `bool` | Optional | When set to true, a notification is sent to the users after an object is shared.
**Default**: `True` | -| `message` | `string` | Optional | The message text to send in the notification email. | -| `include_custom_embed_url` | `bool` | Optional | When set to true, ThoughtSpot sends a link with the host application context to allow users to access the shared object from their ThoughtSpot embedded instance.
**Default**: `False` | - -## Example (as JSON) - -```json -{ - "id": "id0", - "vizId": "vizId2", - "principalId": [ - "principalId8", - "principalId9", - "principalId0" - ], - "emailId": null, - "notify": null, - "message": null, - "includeCustomEmbedUrl": null -} -``` - diff --git a/Python/doc/models/tspublic-rest-v2-user-addgroup-request.md b/Python/doc/models/tspublic-rest-v2-user-addgroup-request.md deleted file mode 100644 index 4f181b8c6..000000000 --- a/Python/doc/models/tspublic-rest-v2-user-addgroup-request.md +++ /dev/null @@ -1,38 +0,0 @@ - -# Tspublic Rest V2 User Addgroup Request - -## Structure - -`TspublicRestV2UserAddgroupRequest` - -## Fields - -| Name | Type | Tags | Description | -| --- | --- | --- | --- | -| `name` | `string` | Optional | User name of the user account | -| `id` | `string` | Optional | The GUID of the user account | -| `groups` | [`List of GroupNameAndIDInput`](../../doc/models/group-name-and-id-input.md) | Required | Array of objects of groups that the user belong to. | - -## Example (as JSON) - -```json -{ - "name": null, - "id": null, - "groups": [ - { - "name": null, - "id": null - }, - { - "name": null, - "id": null - }, - { - "name": null, - "id": null - } - ] -} -``` - diff --git a/Python/doc/models/tspublic-rest-v2-user-addorg-request.md b/Python/doc/models/tspublic-rest-v2-user-addorg-request.md deleted file mode 100644 index 609ca11ae..000000000 --- a/Python/doc/models/tspublic-rest-v2-user-addorg-request.md +++ /dev/null @@ -1,32 +0,0 @@ - -# Tspublic Rest V2 User Addorg Request - -## Structure - -`TspublicRestV2UserAddorgRequest` - -## Fields - -| Name | Type | Tags | Description | -| --- | --- | --- | --- | -| `org_id` | `int` | Optional | The ID of the organization. | -| `users` | [`List of UserNameAndIDInput`](../../doc/models/user-name-and-id-input.md) | Required | Array of objects. A JSON array of name of users or GUIDs of users or both. When both are given then id is considered | - -## Example (as JSON) - -```json -{ - "orgId": null, - "users": [ - { - "name": null, - "id": null - }, - { - "name": null, - "id": null - } - ] -} -``` - diff --git a/Python/doc/models/tspublic-rest-v2-user-changepassword-request.md b/Python/doc/models/tspublic-rest-v2-user-changepassword-request.md deleted file mode 100644 index f247aa1f0..000000000 --- a/Python/doc/models/tspublic-rest-v2-user-changepassword-request.md +++ /dev/null @@ -1,27 +0,0 @@ - -# Tspublic Rest V2 User Changepassword Request - -## Structure - -`TspublicRestV2UserChangepasswordRequest` - -## Fields - -| Name | Type | Tags | Description | -| --- | --- | --- | --- | -| `name` | `string` | Optional | User name of the user account. | -| `id` | `string` | Optional | The GUID of the user account to query. | -| `current_password` | `string` | Required | The current password of the user. | -| `new_password` | `string` | Required | A new password for the user. | - -## Example (as JSON) - -```json -{ - "name": null, - "id": null, - "currentPassword": "currentPassword6", - "newPassword": "newPassword6" -} -``` - diff --git a/Python/doc/models/tspublic-rest-v2-user-removegroup-request.md b/Python/doc/models/tspublic-rest-v2-user-removegroup-request.md deleted file mode 100644 index 141fe141b..000000000 --- a/Python/doc/models/tspublic-rest-v2-user-removegroup-request.md +++ /dev/null @@ -1,38 +0,0 @@ - -# Tspublic Rest V2 User Removegroup Request - -## Structure - -`TspublicRestV2UserRemovegroupRequest` - -## Fields - -| Name | Type | Tags | Description | -| --- | --- | --- | --- | -| `name` | `string` | Optional | User name of the user account | -| `id` | `string` | Optional | The GUID of the user account | -| `groups` | [`List of GroupNameAndIDInput`](../../doc/models/group-name-and-id-input.md) | Required | Array of objects of groups that the user belong to. | - -## Example (as JSON) - -```json -{ - "name": null, - "id": null, - "groups": [ - { - "name": null, - "id": null - }, - { - "name": null, - "id": null - }, - { - "name": null, - "id": null - } - ] -} -``` - diff --git a/Python/doc/models/tspublic-rest-v2-user-search-request.md b/Python/doc/models/tspublic-rest-v2-user-search-request.md deleted file mode 100644 index 3a0a923e7..000000000 --- a/Python/doc/models/tspublic-rest-v2-user-search-request.md +++ /dev/null @@ -1,45 +0,0 @@ - -# Tspublic Rest V2 User Search Request - -## Structure - -`TspublicRestV2UserSearchRequest` - -## Fields - -| Name | Type | Tags | Description | -| --- | --- | --- | --- | -| `output_fields` | `List of string` | Optional | Array of field names that need to be included in the response | -| `name` | `string` | Optional | User name of the user account | -| `id` | `string` | Optional | The GUID of the user account | -| `display_name` | `string` | Optional | A unique display name string for the user, usually their first and last name. | -| `visibility` | `string` | Optional | Visibility of the user account. The visibility attribute is set to DEFAULT when creating a user. The DEFAULT attribute makes a user visible to other users and user groups, and thus allows them to share objects. | -| `mail` | `string` | Optional | email of the user. | -| `groups` | [`List of GroupNameAndIDInput`](../../doc/models/group-name-and-id-input.md) | Optional | Array of objects of groups that the user belong to. | -| `privileges` | [`List of PrivilegeEnum`](../../doc/models/privilege-enum.md) | Optional | Privileges assigned to user account | -| `state` | `string` | Optional | Status of user account. acitve or inactive. | -| `notify_on_share` | `bool` | Optional | User preference for receiving email notifications when another ThoughtSpot user shares answers or pinboards. | -| `show_walk_me` | `bool` | Optional | The user preference for revisiting the onboarding experience. | -| `analyst_onboarding_complete` | `bool` | Optional | ThoughtSpot provides an interactive guided walkthrough to onboard new users. The onboarding experience leads users through a set of actions to help users get started and accomplish their tasks quickly. The users can turn off the Onboarding experience and access it again when they need assistance with the ThoughtSpot UI. | -| `mtype` | `string` | Optional | Type of user. LOCAL_USER indicates that the user is created locally in the ThoughtSpot system. | - -## Example (as JSON) - -```json -{ - "outputFields": null, - "name": null, - "id": null, - "displayName": null, - "visibility": null, - "mail": null, - "groups": null, - "privileges": null, - "state": null, - "notifyOnShare": null, - "showWalkMe": null, - "analystOnboardingComplete": null, - "type": null -} -``` - diff --git a/Python/doc/models/tspublic-rest-v2-user-update-request.md b/Python/doc/models/tspublic-rest-v2-user-update-request.md deleted file mode 100644 index d5f32d8c9..000000000 --- a/Python/doc/models/tspublic-rest-v2-user-update-request.md +++ /dev/null @@ -1,41 +0,0 @@ - -# Tspublic Rest V2 User Update Request - -## Structure - -`TspublicRestV2UserUpdateRequest` - -## Fields - -| Name | Type | Tags | Description | -| --- | --- | --- | --- | -| `name` | `string` | Optional | Name of the user. The username string must be unique. | -| `id` | `string` | Optional | The GUID of the user account to query | -| `display_name` | `string` | Optional | A unique display name string for the user, usually their first and last name. | -| `visibility` | [`Visibility1Enum`](../../doc/models/visibility-1-enum.md) | Optional | Visibility of the user account. The visibility attribute is set to DEFAULT when creating a user. The DEFAULT attribute makes a user visible to other users and user groups, and thus allows them to share objects.
**Default**: `'DEFAULT'` | -| `mail` | `string` | Optional | email of the user. | -| `state` | [`State1Enum`](../../doc/models/state-1-enum.md) | Optional | Status of user account. acitve or inactive.
**Default**: `'ACTIVE'` | -| `notify_on_share` | `bool` | Optional | User preference for receiving email notifications when another ThoughtSpot user shares answers or pinboards.
**Default**: `True` | -| `show_walk_me` | `bool` | Optional | The user preference for revisiting the onboarding experience.
**Default**: `True` | -| `analyst_onboarding_complete` | `bool` | Optional | ThoughtSpot provides an interactive guided walkthrough to onboard new users. The onboarding experience leads users through a set of actions to help users get started and accomplish their tasks quickly. The users can turn off the Onboarding experience and access it again when they need assistance with the ThoughtSpot UI.
**Default**: `False` | -| `mtype` | [`Type9Enum`](../../doc/models/type-9-enum.md) | Optional | Type of user. LOCAL_USER indicates that the user is created locally in the ThoughtSpot system.
**Default**: `'LOCAL_USER'` | -| `groups` | [`List of GroupNameAndIDInput`](../../doc/models/group-name-and-id-input.md) | Optional | Array of objects of groups that the user belong to. | - -## Example (as JSON) - -```json -{ - "name": null, - "id": null, - "displayName": null, - "visibility": null, - "mail": null, - "state": null, - "notifyOnShare": null, - "showWalkMe": null, - "analystOnboardingComplete": null, - "type": null, - "groups": null -} -``` - diff --git a/Python/doc/models/type-1-enum.md b/Python/doc/models/type-1-enum.md deleted file mode 100644 index f4a3c36b9..000000000 --- a/Python/doc/models/type-1-enum.md +++ /dev/null @@ -1,16 +0,0 @@ - -# Type 1 Enum - -Type of access detail provided - -## Enumeration - -`Type1Enum` - -## Fields - -| Name | -| --- | -| `USER` | -| `USER_GROUP` | - diff --git a/Python/doc/models/type-10-enum.md b/Python/doc/models/type-10-enum.md deleted file mode 100644 index 6b990ecab..000000000 --- a/Python/doc/models/type-10-enum.md +++ /dev/null @@ -1,16 +0,0 @@ - -# Type 10 Enum - -Type of user group. LOCAL_GROUP indicates that the user is created locally in the ThoughtSpot system. - -## Enumeration - -`Type10Enum` - -## Fields - -| Name | -| --- | -| `LOCAL_GROUP` | -| `TENANT_GROUP` | - diff --git a/Python/doc/models/type-13-enum.md b/Python/doc/models/type-13-enum.md deleted file mode 100644 index 1912ab366..000000000 --- a/Python/doc/models/type-13-enum.md +++ /dev/null @@ -1,18 +0,0 @@ - -# Type 13 Enum - -Type of the data object - -## Enumeration - -`Type13Enum` - -## Fields - -| Name | -| --- | -| `LIVEBOARD` | -| `DATAOBJECT` | -| `COLUMN` | -| `JOIN` | - diff --git a/Python/doc/models/type-14-enum.md b/Python/doc/models/type-14-enum.md deleted file mode 100644 index 10b5041f3..000000000 --- a/Python/doc/models/type-14-enum.md +++ /dev/null @@ -1,25 +0,0 @@ - -# Type 14 Enum - -Type of the data connection. - -## Enumeration - -`Type14Enum` - -## Fields - -| Name | -| --- | -| `SNOWFLAKE` | -| `AMAZON_REDSHIFT` | -| `GOOGLE_BIGQUERY` | -| `AZURE_SYNAPSE` | -| `TERADATA` | -| `STARBURST` | -| `SAP_HANA` | -| `ORACLE_ADW` | -| `DATABRICKS` | -| `DENODO` | -| `DREMIO` | - diff --git a/Python/doc/models/type-15-enum.md b/Python/doc/models/type-15-enum.md deleted file mode 100644 index 850fafbc4..000000000 --- a/Python/doc/models/type-15-enum.md +++ /dev/null @@ -1,25 +0,0 @@ - -# Type 15 Enum - -Type of the connect being searched. Valid values: SNOWFLAKE|AMAZON_REDSHIFT|GOOGLE_BIGQUERY|AZURE_SYNAPSE|TERADATA|STARBURST|SAP_HANA|ORACLE_ADW|DATABRICKS|DENODO - -## Enumeration - -`Type15Enum` - -## Fields - -| Name | -| --- | -| `SNOWFLAKE` | -| `AMAZON_REDSHIFT` | -| `GOOGLE_BIGQUERY` | -| `AZURE_SYNAPSE` | -| `TERADATA` | -| `STARBURST` | -| `SAP_HANA` | -| `ORACLE_ADW` | -| `DATABRICKS` | -| `DENODO` | -| `DREMIO` | - diff --git a/Python/doc/models/type-16-enum.md b/Python/doc/models/type-16-enum.md deleted file mode 100644 index 136de4cf8..000000000 --- a/Python/doc/models/type-16-enum.md +++ /dev/null @@ -1,16 +0,0 @@ - -# Type 16 Enum - -## Enumeration - -`Type16Enum` - -## Fields - -| Name | -| --- | -| `CSV` | -| `XLSX` | -| `PDF` | -| `PNG` | - diff --git a/Python/doc/models/type-18-enum.md b/Python/doc/models/type-18-enum.md deleted file mode 100644 index aa9d5da11..000000000 --- a/Python/doc/models/type-18-enum.md +++ /dev/null @@ -1,18 +0,0 @@ - -# Type 18 Enum - -Type of metadata object. Valid values: Liveboard|Answer|DataObject|Column - -## Enumeration - -`Type18Enum` - -## Fields - -| Name | -| --- | -| `LIVEBOARD` | -| `ANSWER` | -| `DATAOBJECT` | -| `COLUMN` | - diff --git a/Python/doc/models/type-2-enum.md b/Python/doc/models/type-2-enum.md deleted file mode 100644 index b541e8352..000000000 --- a/Python/doc/models/type-2-enum.md +++ /dev/null @@ -1,18 +0,0 @@ - -# Type 2 Enum - -Type of the metadata objec - -## Enumeration - -`Type2Enum` - -## Fields - -| Name | -| --- | -| `LIVEBOARD` | -| `ANSWER` | -| `DATAOBJECT` | -| `COLUMN` | - diff --git a/Python/doc/models/type-3-enum.md b/Python/doc/models/type-3-enum.md deleted file mode 100644 index f88874f75..000000000 --- a/Python/doc/models/type-3-enum.md +++ /dev/null @@ -1,33 +0,0 @@ - -# Type 3 Enum - -Type of the metadata object being searched. - -## Enumeration - -`Type3Enum` - -## Fields - -| Name | -| --- | -| `ANSWER` | -| `LIVEBOARD` | -| `DATAOBJECT_ALL` | -| `DATAOBJECT_WORKSHEET` | -| `DATAOBJECT_TABLE` | -| `DATAOBJECT_USER_DEFINED` | -| `DATAOBJECT_VIEW` | -| `DATAOBJECT_CALENDAR_TABLE` | -| `COLUMN_ALL` | -| `COLUMN_WORKSHEET` | -| `COLUMN_TABLE` | -| `COLUMN_USER_DEFINED` | -| `COLUMN_VIEW` | -| `COLUMN_CALENDAR_TABLE` | -| `JOIN` | -| `CONNECTION` | -| `TAG` | -| `USER` | -| `USER_GROUP` | - diff --git a/Python/doc/models/type-4-enum.md b/Python/doc/models/type-4-enum.md deleted file mode 100644 index f0b251809..000000000 --- a/Python/doc/models/type-4-enum.md +++ /dev/null @@ -1,21 +0,0 @@ - -# Type 4 Enum - -## Enumeration - -`Type4Enum` - -## Fields - -| Name | -| --- | -| `ANSWER` | -| `LIVEBOARD` | -| `DATAOBJECT` | -| `COLUMN` | -| `JOIN` | -| `CONNECTION` | -| `TAG` | -| `USER` | -| `USER_GROUP` | - diff --git a/Python/doc/models/type-5-enum.md b/Python/doc/models/type-5-enum.md deleted file mode 100644 index 119760013..000000000 --- a/Python/doc/models/type-5-enum.md +++ /dev/null @@ -1,31 +0,0 @@ - -# Type 5 Enum - -## Enumeration - -`Type5Enum` - -## Fields - -| Name | -| --- | -| `ANSWER` | -| `LIVEBOARD` | -| `DATAOBJECT_ALL` | -| `DATAOBJECT_WORKSHEET` | -| `DATAOBJECT_TABLE` | -| `DATAOBJECT_USER_DEFINED` | -| `DATAOBJECT_VIEW` | -| `DATAOBJECT_CALENDAR_TABLE` | -| `COLUMN_ALL` | -| `COLUMN_WORKSHEET` | -| `COLUMN_TABLE` | -| `COLUMN_USER_DEFINED` | -| `COLUMN_VIEW` | -| `COLUMN_CALENDAR_TABLE` | -| `JOIN` | -| `CONNECTION` | -| `TAG` | -| `USER` | -| `USER_GROUP` | - diff --git a/Python/doc/models/type-6-enum.md b/Python/doc/models/type-6-enum.md deleted file mode 100644 index b5304ab29..000000000 --- a/Python/doc/models/type-6-enum.md +++ /dev/null @@ -1,23 +0,0 @@ - -# Type 6 Enum - -Type of the metadata object being searched. - -## Enumeration - -`Type6Enum` - -## Fields - -| Name | -| --- | -| `ANSWER` | -| `LIVEBOARD` | -| `DATAOBJECT` | -| `COLUMN` | -| `JOIN` | -| `CONNECTION` | -| `TAG` | -| `USER` | -| `USER_GROUP` | - diff --git a/Python/doc/models/type-7-enum.md b/Python/doc/models/type-7-enum.md deleted file mode 100644 index 6faa098f0..000000000 --- a/Python/doc/models/type-7-enum.md +++ /dev/null @@ -1,16 +0,0 @@ - -# Type 7 Enum - -## Enumeration - -`Type7Enum` - -## Fields - -| Name | -| --- | -| `LIVEBOARD` | -| `ANSWER` | -| `DATAOBJECT` | -| `COLUMN` | - diff --git a/Python/doc/models/type-8-enum.md b/Python/doc/models/type-8-enum.md deleted file mode 100644 index 19c74c8aa..000000000 --- a/Python/doc/models/type-8-enum.md +++ /dev/null @@ -1,17 +0,0 @@ - -# Type 8 Enum - -## Enumeration - -`Type8Enum` - -## Fields - -| Name | -| --- | -| `UNKNOWN` | -| `LDAP_USER` | -| `SAML_USER` | -| `OIDC_USER` | -| `LOCAL_USER` | - diff --git a/Python/doc/models/type-9-enum.md b/Python/doc/models/type-9-enum.md deleted file mode 100644 index 416611325..000000000 --- a/Python/doc/models/type-9-enum.md +++ /dev/null @@ -1,19 +0,0 @@ - -# Type 9 Enum - -Type of user. LOCAL_USER indicates that the user is created locally in the ThoughtSpot system. - -## Enumeration - -`Type9Enum` - -## Fields - -| Name | -| --- | -| `UNKNOWN` | -| `LDAP_USER` | -| `SAML_USER` | -| `OIDC_USER` | -| `LOCAL_USER` | - diff --git a/Python/doc/models/type-enum.md b/Python/doc/models/type-enum.md deleted file mode 100644 index ecf2ffb92..000000000 --- a/Python/doc/models/type-enum.md +++ /dev/null @@ -1,18 +0,0 @@ - -# Type Enum - -Type of the metadata object - -## Enumeration - -`TypeEnum` - -## Fields - -| Name | -| --- | -| `ANSWER` | -| `LIVEBOARD` | -| `DATAOBJECT` | -| `CONNECTION` | - diff --git a/Python/doc/models/user-name-and-id-input.md b/Python/doc/models/user-name-and-id-input.md deleted file mode 100644 index 168cd0a8b..000000000 --- a/Python/doc/models/user-name-and-id-input.md +++ /dev/null @@ -1,23 +0,0 @@ - -# User Name and ID Input - -## Structure - -`UserNameAndIDInput` - -## Fields - -| Name | Type | Tags | Description | -| --- | --- | --- | --- | -| `name` | `string` | Optional | Username of the user | -| `id` | `string` | Optional | GUID of the user | - -## Example (as JSON) - -```json -{ - "name": null, - "id": null -} -``` - diff --git a/Python/doc/models/user-name-and-id.md b/Python/doc/models/user-name-and-id.md deleted file mode 100644 index 61b99bff7..000000000 --- a/Python/doc/models/user-name-and-id.md +++ /dev/null @@ -1,23 +0,0 @@ - -# User Name and ID - -## Structure - -`UserNameAndID` - -## Fields - -| Name | Type | Tags | Description | -| --- | --- | --- | --- | -| `name` | `string` | Optional | Username of the user | -| `id` | `string` | Optional | GUID of the user | - -## Example (as JSON) - -```json -{ - "name": null, - "id": null -} -``` - diff --git a/Python/doc/models/user-response.md b/Python/doc/models/user-response.md deleted file mode 100644 index d803d763e..000000000 --- a/Python/doc/models/user-response.md +++ /dev/null @@ -1,83 +0,0 @@ - -# User Response - -## Structure - -`UserResponse` - -## Fields - -| Name | Type | Tags | Description | -| --- | --- | --- | --- | -| `name` | `string` | Optional | Username of the user account | -| `display_name` | `string` | Optional | Display name of the user account | -| `id` | `string` | Optional | GUID of the user account | -| `visibility` | `string` | Optional | Visibility of the user account | -| `mail` | `string` | Optional | Email of the user account | -| `groups` | [`List of GroupNameAndID`](../../doc/models/group-name-and-id.md) | Optional | Name of the group to which user account is added | -| `privileges` | `List of string` | Optional | Privileges assigned to user account | -| `orgs` | [`List of OrgType`](../../doc/models/org-type.md) | Optional | The organizations that user belongs to | -| `tags` | `List of string` | Optional | Tags assigned to the user | -| `state` | `string` | Optional | Indicates if the user account is active or inactive | -| `notify_on_share` | `bool` | Optional | Indicates if the email should be sent when object is shared with the user | -| `show_walk_me` | `bool` | Optional | Indicates if the walk me should be shown when logging in | -| `analyst_onboarding_complete` | `bool` | Optional | Indicates if the onboarding is completed for the user | -| `first_login` | `int` | Optional | Indicates if the use is logging in for the first time | -| `welcome_email_sent` | `bool` | Optional | Indicates if the welcome email is sent to email associated with the user account | -| `is_deleted` | `bool` | Optional | Indicates if the user account is deleted | -| `is_hidden` | `bool` | Optional | Indicates if the user account is hidden | -| `is_external` | `bool` | Optional | Indicates if the user account is from external system
isDeprecated | -| `is_deprecated` | `bool` | Optional | - | -| `complete` | `bool` | Optional | Indicates if the all the properties of user account is provided | -| `is_super_user` | `bool` | Optional | Indicates if the user account is super user | -| `is_system_principal` | `bool` | Optional | Indicates if the user account is system principal | -| `mtype` | `string` | Optional | Indicates the type of user account | -| `parenttype` | `string` | Optional | Indicates the type of parent object | -| `tenant_id` | `string` | Optional | Tenant id associated with the user account | -| `index_version` | `float` | Optional | - | -| `generation_num` | `float` | Optional | - | -| `created` | `float` | Optional | Date and time when user account was created | -| `modified` | `float` | Optional | Date and time of last modification of user account | -| `author` | [`UserNameAndID`](../../doc/models/user-name-and-id.md) | Optional | - | -| `modified_by` | [`UserNameAndID`](../../doc/models/user-name-and-id.md) | Optional | - | -| `owner` | [`UserNameAndID`](../../doc/models/user-name-and-id.md) | Optional | - | - -## Example (as JSON) - -```json -{ - "name": null, - "displayName": null, - "id": null, - "visibility": null, - "mail": null, - "groups": null, - "privileges": null, - "orgs": null, - "tags": null, - "state": null, - "notifyOnShare": null, - "showWalkMe": null, - "analystOnboardingComplete": null, - "firstLogin": null, - "welcomeEmailSent": null, - "isDeleted": null, - "isHidden": null, - "isExternal": null, - "isDeprecated": null, - "complete": null, - "isSuperUser": null, - "isSystemPrincipal": null, - "type": null, - "parenttype": null, - "tenantId": null, - "indexVersion": null, - "generationNum": null, - "created": null, - "modified": null, - "author": null, - "modifiedBy": null, - "owner": null -} -``` - diff --git a/Python/doc/models/visibility-1-enum.md b/Python/doc/models/visibility-1-enum.md deleted file mode 100644 index d57c13a51..000000000 --- a/Python/doc/models/visibility-1-enum.md +++ /dev/null @@ -1,17 +0,0 @@ - -# Visibility 1 Enum - -Visibility of the user account. The visibility attribute is set to DEFAULT when creating a user. The DEFAULT attribute makes a user visible to other users and user groups, and thus allows them to share objects. - -## Enumeration - -`Visibility1Enum` - -## Fields - -| Name | -| --- | -| `DEFAULT` | -| `NON_SHARABLE` | -| `SHARABLE` | - diff --git a/Python/doc/models/visibility-2-enum.md b/Python/doc/models/visibility-2-enum.md deleted file mode 100644 index cad29dd94..000000000 --- a/Python/doc/models/visibility-2-enum.md +++ /dev/null @@ -1,17 +0,0 @@ - -# Visibility 2 Enum - -Visibility of the user group. The visibility attribute is set to DEFAULT. The DEFAULT attribute makes the user group visible for other user groups and allows them to share objects. - -## Enumeration - -`Visibility2Enum` - -## Fields - -| Name | -| --- | -| `DEFAULT` | -| `NON_SHARABLE` | -| `SHARABLE` | - diff --git a/Python/doc/models/visibility-enum.md b/Python/doc/models/visibility-enum.md deleted file mode 100644 index abe530ba2..000000000 --- a/Python/doc/models/visibility-enum.md +++ /dev/null @@ -1,15 +0,0 @@ - -# Visibility Enum - -## Enumeration - -`VisibilityEnum` - -## Fields - -| Name | -| --- | -| `DEFAULT` | -| `NON_SHARABLE` | -| `SHARABLE` | - diff --git a/Python/doc/models/viz-type.md b/Python/doc/models/viz-type.md deleted file mode 100644 index c63c14573..000000000 --- a/Python/doc/models/viz-type.md +++ /dev/null @@ -1,25 +0,0 @@ - -# Viz Type - -## Structure - -`VizType` - -## Fields - -| Name | Type | Tags | Description | -| --- | --- | --- | --- | -| `name` | `string` | Optional | The name of the visualization | -| `id` | `string` | Optional | The GUID of the visualization | -| `query_sql` | `string` | Optional | SQL query associated with the visualization | - -## Example (as JSON) - -```json -{ - "name": null, - "id": null, - "querySql": null -} -``` - diff --git a/Python/doc/utility-classes.md b/Python/doc/utility-classes.md deleted file mode 100644 index c09e079b6..000000000 --- a/Python/doc/utility-classes.md +++ /dev/null @@ -1,21 +0,0 @@ - -# Utility Classes Documentation - -## ApiHelper - -A utility class for processing API Calls. Also contains classes for supporting standard datetime formats. - -### Methods - -| Name | Description | -| --- | --- | -| json_deserialize | Deserializes a JSON string to a Python dictionary. | - -### Classes - -| Name | Description | -| --- | --- | -| HttpDateTime | A wrapper for datetime to support HTTP date format. | -| UnixDateTime | A wrapper for datetime to support Unix date format. | -| RFC3339DateTime | A wrapper for datetime to support RFC3339 format. | - diff --git a/Python/requirements.txt b/Python/requirements.txt deleted file mode 100644 index 00aae20ab..000000000 --- a/Python/requirements.txt +++ /dev/null @@ -1,5 +0,0 @@ -apimatic-core~=0.1.0 -apimatic-core-interfaces~=0.1.0 -apimatic-requests-client-adapter~=0.1.0 -python-dateutil~=2.8.1 -enum34~=1.1, >=1.1.10 diff --git a/Python/setup.py b/Python/setup.py deleted file mode 100644 index 199bb3a31..000000000 --- a/Python/setup.py +++ /dev/null @@ -1,33 +0,0 @@ -# -*- coding: utf-8 -*- - -import sys -from setuptools import setup, find_packages - -if sys.version_info[0] < 3: - with open('README.md', 'r') as fh: - long_description = fh.read() -else: - with open('README.md', 'r', encoding='utf-8') as fh: - long_description = fh.read() - -setup( - name='thoughtspot-rest-api-sdk', - version='1.13.1', - description='Python client library for ThoughtSpot Public REST API', - long_description=long_description, - long_description_content_type="text/markdown", - author='APIMatic SDK Generator', - author_email='support@apimatic.io', - url='https://apimatic.io', - packages=find_packages(), - install_requires=[ - 'apimatic-core~=0.1.0', - 'apimatic-core-interfaces~=0.1.0', - 'apimatic-requests-client-adapter~=0.1.0', - 'python-dateutil~=2.8.1', - 'enum34~=1.1, >=1.1.10' - ], - tests_require=[ - 'pytest>=7.1.3' - ], -) \ No newline at end of file diff --git a/Python/test-requirements.txt b/Python/test-requirements.txt deleted file mode 100644 index f1fbc9439..000000000 --- a/Python/test-requirements.txt +++ /dev/null @@ -1 +0,0 @@ -pytest>=7.1.3 diff --git a/Python/tests/__init__.py b/Python/tests/__init__.py deleted file mode 100644 index e69de29bb..000000000 diff --git a/Python/tests/controllers/__init__.py b/Python/tests/controllers/__init__.py deleted file mode 100644 index e69de29bb..000000000 diff --git a/Python/tests/controllers/controller_test_base.py b/Python/tests/controllers/controller_test_base.py deleted file mode 100644 index 2f11a4f4e..000000000 --- a/Python/tests/controllers/controller_test_base.py +++ /dev/null @@ -1,33 +0,0 @@ -# -*- coding: utf-8 -*- - -""" -thoughtspotpublicrestapi - -This file was automatically generated by APIMATIC v3.0 ( - https://www.apimatic.io ). -""" - -import unittest -from tests.http_response_catcher import HttpResponseCatcher -from thoughtspotpublicrestapi.configuration import Configuration -from thoughtspotpublicrestapi.configuration import Environment -from thoughtspotpublicrestapi.thoughtspotpublicrestapi_client import ThoughtspotpublicrestapiClient - - -class ControllerTestBase(unittest.TestCase): - - """All test classes inherit from this base class. It abstracts out - common functionality and configuration variables set up.""" - - @classmethod - def setUpClass(cls): - """Class method called once before running tests in a test class.""" - cls.request_timeout = 30 - cls.assert_precision = 0.01 - cls.config = ControllerTestBase.create_configuration() - cls.client = ThoughtspotpublicrestapiClient(config=cls.config) - cls.auth_managers = cls.client.auth_managers - - @staticmethod - def create_configuration(): - return Configuration(http_call_back=HttpResponseCatcher()) diff --git a/Python/tests/controllers/test_group_controller.py b/Python/tests/controllers/test_group_controller.py deleted file mode 100644 index 4ca19ecd3..000000000 --- a/Python/tests/controllers/test_group_controller.py +++ /dev/null @@ -1,64 +0,0 @@ -# -*- coding: utf-8 -*- - -""" -thoughtspotpublicrestapi - -This file was automatically generated by APIMATIC v3.0 ( - https://www.apimatic.io ). -""" - -import json -import dateutil.parser - -from tests.controllers.controller_test_base import ControllerTestBase -from apimatic_core.utilities.comparison_helper import ComparisonHelper -from thoughtspotpublicrestapi.api_helper import APIHelper - - -class GroupControllerTests(ControllerTestBase): - - @classmethod - def setUpClass(cls): - super(GroupControllerTests, cls).setUpClass() - cls.controller = cls.client.group - cls.response_catcher = cls.controller.http_call_back - - # To get the details of a specific group by name or id, use this endpoint. - #At Least one value needed. When both are given id will be considered to fetch user information. - def test_restapi_v_2__get_group(self): - # Parameters for the API call - name = None - id = None - - # Perform the API call through the SDK function - result = self.controller.restapi_v_2__get_group(name, id) - - # Test response code - assert self.response_catcher.response.status_code == 200 - - # Test headers - expected_headers = {} - expected_headers['content-type'] = 'application/json' - - assert ComparisonHelper.match_headers(expected_headers, self.response_catcher.response.headers) - - - # To remove a group from the ThoughtSpot system, send a DELETE request to this endpoint. At Least one value needed. When both are given user id will be considered to fetch user information. - def test_restapi_v_2__delete_group(self): - # Parameters for the API call - name = None - id = None - - # Perform the API call through the SDK function - result = self.controller.restapi_v_2__delete_group(name, id) - - # Test response code - assert self.response_catcher.response.status_code == 200 - - # Test headers - expected_headers = {} - expected_headers['content-type'] = 'application/json' - - assert ComparisonHelper.match_headers(expected_headers, self.response_catcher.response.headers) - - diff --git a/Python/tests/controllers/test_metadata_controller.py b/Python/tests/controllers/test_metadata_controller.py deleted file mode 100644 index 28f206149..000000000 --- a/Python/tests/controllers/test_metadata_controller.py +++ /dev/null @@ -1,82 +0,0 @@ -# -*- coding: utf-8 -*- - -""" -thoughtspotpublicrestapi - -This file was automatically generated by APIMATIC v3.0 ( - https://www.apimatic.io ). -""" - -import json -import dateutil.parser - -from tests.controllers.controller_test_base import ControllerTestBase -from apimatic_core.utilities.comparison_helper import ComparisonHelper -from thoughtspotpublicrestapi.api_helper import APIHelper - - -class MetadataControllerTests(ControllerTestBase): - - @classmethod - def setUpClass(cls): - super(MetadataControllerTests, cls).setUpClass() - cls.controller = cls.client.metadata - cls.response_catcher = cls.controller.http_call_back - - # To get details of a specific tag, use this endpoint. At least one of id or name of tag is required. When both are given, then id will be considered. - def test_restapi_v_2__get_tag(self): - # Parameters for the API call - name = None - id = None - - # Perform the API call through the SDK function - result = self.controller.restapi_v_2__get_tag(name, id) - - # Test response code - assert self.response_catcher.response.status_code == 200 - - # Test headers - expected_headers = {} - expected_headers['content-type'] = 'application/json' - - assert ComparisonHelper.match_headers(expected_headers, self.response_catcher.response.headers) - - - # To get the name and id of liveboard that is set as a home liveboard for a user, use this endpoint. At least one of user id or username is required. When both are given, then id will be considered. - def test_restapi_v_2__get_home_liveboard(self): - # Parameters for the API call - user_name = None - user_id = None - - # Perform the API call through the SDK function - result = self.controller.restapi_v_2__get_home_liveboard(user_name, user_id) - - # Test response code - assert self.response_catcher.response.status_code == 200 - - # Test headers - expected_headers = {} - expected_headers['content-type'] = 'application/json' - - assert ComparisonHelper.match_headers(expected_headers, self.response_catcher.response.headers) - - - # To programmatically delete tags, use this endpoint. At least one of id or name of tag is required. When both are given, then id will be considered. - def test_restapi_v_2__delete_tag(self): - # Parameters for the API call - name = None - id = None - - # Perform the API call through the SDK function - result = self.controller.restapi_v_2__delete_tag(name, id) - - # Test response code - assert self.response_catcher.response.status_code == 200 - - # Test headers - expected_headers = {} - expected_headers['content-type'] = 'application/json' - - assert ComparisonHelper.match_headers(expected_headers, self.response_catcher.response.headers) - - diff --git a/Python/tests/controllers/test_org_controller.py b/Python/tests/controllers/test_org_controller.py deleted file mode 100644 index 588a140ff..000000000 --- a/Python/tests/controllers/test_org_controller.py +++ /dev/null @@ -1,71 +0,0 @@ -# -*- coding: utf-8 -*- - -""" -thoughtspotpublicrestapi - -This file was automatically generated by APIMATIC v3.0 ( - https://www.apimatic.io ). -""" - -import json -import dateutil.parser - -from tests.controllers.controller_test_base import ControllerTestBase -from apimatic_core.utilities.comparison_helper import ComparisonHelper -from thoughtspotpublicrestapi.api_helper import APIHelper - - -class OrgControllerTests(ControllerTestBase): - - @classmethod - def setUpClass(cls): - super(OrgControllerTests, cls).setUpClass() - cls.controller = cls.client.org - cls.response_catcher = cls.controller.http_call_back - - # To get the details of a specific organization by name or id, use this endpoint. - # - #At least one value needed. When both are given,then id will be considered to fetch organization information. - # - #Requires Administration privilege for tenant. - def test_restapi_v_2__get_org(self): - # Parameters for the API call - name = None - id = None - - # Perform the API call through the SDK function - result = self.controller.restapi_v_2__get_org(name, id) - - # Test response code - assert self.response_catcher.response.status_code == 200 - - # Test headers - expected_headers = {} - expected_headers['content-type'] = 'application/json' - - assert ComparisonHelper.match_headers(expected_headers, self.response_catcher.response.headers) - - - # To remove an organization from the ThoughtSpot system, send a DELETE request to this endpoint. - # - #At least one value is needed. When both id and name are given, then id will be considered. - # - #Requires Administration privilege for tenant. - def test_restapi_v_2__delete_org(self): - # Parameters for the API call - name = None - id = None - - # Perform the API call through the SDK function - result = self.controller.restapi_v_2__delete_org(name, id) - - # Test response code - assert self.response_catcher.response.status_code == 200 - - # Test headers - expected_headers = {} - expected_headers['content-type'] = 'application/json' - - assert ComparisonHelper.match_headers(expected_headers, self.response_catcher.response.headers) - - diff --git a/Python/tests/controllers/test_security_controller.py b/Python/tests/controllers/test_security_controller.py deleted file mode 100644 index 0b23337d3..000000000 --- a/Python/tests/controllers/test_security_controller.py +++ /dev/null @@ -1,46 +0,0 @@ -# -*- coding: utf-8 -*- - -""" -thoughtspotpublicrestapi - -This file was automatically generated by APIMATIC v3.0 ( - https://www.apimatic.io ). -""" - -import json -import dateutil.parser - -from tests.controllers.controller_test_base import ControllerTestBase -from apimatic_core.utilities.comparison_helper import ComparisonHelper -from thoughtspotpublicrestapi.api_helper import APIHelper - - -class SecurityControllerTests(ControllerTestBase): - - @classmethod - def setUpClass(cls): - super(SecurityControllerTests, cls).setUpClass() - cls.controller = cls.client.security - cls.response_catcher = cls.controller.http_call_back - - # Use this endpoint to list the objects on which a user or user group has permission. The response will include only those objects on which the user or user group has either VIEW OR MODIFY permission. - # - #Requires administration privilege - def test_restapi_v_2__get_permission_for_principal(self): - # Parameters for the API call - id = None - name = None - - # Perform the API call through the SDK function - result = self.controller.restapi_v_2__get_permission_for_principal(id, name) - - # Test response code - assert self.response_catcher.response.status_code == 200 - - # Test headers - expected_headers = {} - expected_headers['content-type'] = 'application/json' - - assert ComparisonHelper.match_headers(expected_headers, self.response_catcher.response.headers) - - diff --git a/Python/tests/controllers/test_session_controller.py b/Python/tests/controllers/test_session_controller.py deleted file mode 100644 index 6151c2cdb..000000000 --- a/Python/tests/controllers/test_session_controller.py +++ /dev/null @@ -1,49 +0,0 @@ -# -*- coding: utf-8 -*- - -""" -thoughtspotpublicrestapi - -This file was automatically generated by APIMATIC v3.0 ( - https://www.apimatic.io ). -""" - -import json -import dateutil.parser - -from tests.controllers.controller_test_base import ControllerTestBase -from apimatic_core.utilities.comparison_helper import ComparisonHelper -from thoughtspotpublicrestapi.api_helper import APIHelper - - -class SessionControllerTests(ControllerTestBase): - - @classmethod - def setUpClass(cls): - super(SessionControllerTests, cls).setUpClass() - cls.controller = cls.client.session - cls.response_catcher = cls.controller.http_call_back - - # You can programmatically create login session for a user in ThoughtSpot using this endpoint. - # - #You can create session by either providing userName and password as inputs in this request body or by including "Authorization" header with the token generated through the endpoint /tspublic/rest/v2/session/gettoken. - # - #userName and password input is given precedence over "Authorization" header, when both are included in the request. - def test_restapi_v_2__login(self): - # Parameters for the API call - user_name = None - password = None - remember_me = None - - # Perform the API call through the SDK function - result = self.controller.restapi_v_2__login(user_name, password, remember_me) - - # Test response code - assert self.response_catcher.response.status_code == 200 - - # Test headers - expected_headers = {} - expected_headers['content-type'] = 'application/json' - - assert ComparisonHelper.match_headers(expected_headers, self.response_catcher.response.headers) - - diff --git a/Python/tests/controllers/test_user_controller.py b/Python/tests/controllers/test_user_controller.py deleted file mode 100644 index bafe26460..000000000 --- a/Python/tests/controllers/test_user_controller.py +++ /dev/null @@ -1,65 +0,0 @@ -# -*- coding: utf-8 -*- - -""" -thoughtspotpublicrestapi - -This file was automatically generated by APIMATIC v3.0 ( - https://www.apimatic.io ). -""" - -import json -import dateutil.parser - -from tests.controllers.controller_test_base import ControllerTestBase -from apimatic_core.utilities.comparison_helper import ComparisonHelper -from thoughtspotpublicrestapi.api_helper import APIHelper - - -class UserControllerTests(ControllerTestBase): - - @classmethod - def setUpClass(cls): - super(UserControllerTests, cls).setUpClass() - cls.controller = cls.client.user - cls.response_catcher = cls.controller.http_call_back - - # To get the details of a specific user account by username or user id, use this endpoint. At Least one value is needed. When both are given, user id will be considered to fetch user information - def test_restapi_v_2__get_user(self): - # Parameters for the API call - name = None - id = None - - # Perform the API call through the SDK function - result = self.controller.restapi_v_2__get_user(name, id) - - # Test response code - assert self.response_catcher.response.status_code == 200 - - # Test headers - expected_headers = {} - expected_headers['content-type'] = 'application/json' - - assert ComparisonHelper.match_headers(expected_headers, self.response_catcher.response.headers) - - - # To remove a user from the ThoughtSpot system, use this endpoint. - #At Least one value needed. When both are given user id will be considered to delete user. - def test_restapi_v_2__delete_user(self): - # Parameters for the API call - name = None - id = None - org_id = None - - # Perform the API call through the SDK function - result = self.controller.restapi_v_2__delete_user(name, id, org_id) - - # Test response code - assert self.response_catcher.response.status_code == 200 - - # Test headers - expected_headers = {} - expected_headers['content-type'] = 'application/json' - - assert ComparisonHelper.match_headers(expected_headers, self.response_catcher.response.headers) - - diff --git a/Python/tests/http_response_catcher.py b/Python/tests/http_response_catcher.py deleted file mode 100644 index c8b03a1c0..000000000 --- a/Python/tests/http_response_catcher.py +++ /dev/null @@ -1,28 +0,0 @@ -# -*- coding: utf-8 -*- - -""" -thoughtspotpublicrestapi - -This file was automatically generated by APIMATIC v3.0 ( - https://www.apimatic.io ). -""" - -from thoughtspotpublicrestapi.http.http_call_back import HttpCallBack - -class HttpResponseCatcher(HttpCallBack): - - """A class used for catching the HttpResponse object from controllers. - - This class inherits HttpCallBack and implements the on_after_response - method to catch the HttpResponse object as returned by the HttpClient - after a request is executed. - - """ - def on_before_request(self, request): - pass - - def on_after_response(self, response): - self.response = response - - - diff --git a/Python/thoughtspotpublicrestapi/__init__.py b/Python/thoughtspotpublicrestapi/__init__.py deleted file mode 100644 index e80695b15..000000000 --- a/Python/thoughtspotpublicrestapi/__init__.py +++ /dev/null @@ -1,9 +0,0 @@ -__all__ = [ - 'api_helper', - 'configuration', - 'controllers', - 'exceptions', - 'http', - 'models', - 'thoughtspotpublicrestapi_client', -] diff --git a/Python/thoughtspotpublicrestapi/api_helper.py b/Python/thoughtspotpublicrestapi/api_helper.py deleted file mode 100644 index 8266735e9..000000000 --- a/Python/thoughtspotpublicrestapi/api_helper.py +++ /dev/null @@ -1,22 +0,0 @@ -# -*- coding: utf-8 -*- - -""" -thoughtspotpublicrestapi - -This file was automatically generated by APIMATIC v3.0 ( - https://www.apimatic.io ). -""" - -from apimatic_core.utilities.api_helper import ApiHelper - - -class APIHelper(ApiHelper): - - """A Helper Class for various functions associated with API Calls. - - This class contains static methods for operations that need to be - performed during API requests. All of the methods inside this class are - static methods, there is no need to ever initialise an instance of this - class. - - """ \ No newline at end of file diff --git a/Python/thoughtspotpublicrestapi/configuration.py b/Python/thoughtspotpublicrestapi/configuration.py deleted file mode 100644 index c46eb170d..000000000 --- a/Python/thoughtspotpublicrestapi/configuration.py +++ /dev/null @@ -1,134 +0,0 @@ -# -*- coding: utf-8 -*- - -""" -thoughtspotpublicrestapi - -This file was automatically generated by APIMATIC v3.0 ( - https://www.apimatic.io ). -""" - -from enum import Enum -from thoughtspotpublicrestapi.api_helper import APIHelper -from apimatic_core.http.configurations.http_client_configuration import HttpClientConfiguration -from apimatic_requests_client_adapter.requests_client import RequestsClient - - -class Environment(Enum): - """An enum for SDK environments""" - PRODUCTION = 0 - - -class Server(Enum): - """An enum for API servers""" - DEFAULT = 0 - - -class Configuration(HttpClientConfiguration): - """A class used for configuring the SDK by a user. - """ - - @property - def environment(self): - return self._environment - - @property - def base_url(self): - return self._base_url - - @property - def access_token(self): - return self._access_token - - @property - def skip_ssl_cert_verification(self): - return self._skip_ssl_cert_verification - - def __init__( - self, http_client_instance=None, override_http_client_configuration=False, http_call_back=None, - timeout=60, max_retries=0, backoff_factor=2, - retry_statuses=[408, 413, 429, 500, 502, 503, 504, 521, 522, 524, 408, 413, 429, 500, 502, 503, 504, 521, 522, 524], - retry_methods=['GET', 'PUT', 'GET', 'PUT'], environment=Environment.PRODUCTION, base_url='https://localhost:443', - access_token='', skip_ssl_cert_verification=False - ): - super().__init__(http_client_instance, override_http_client_configuration, http_call_back, timeout, max_retries, - backoff_factor, retry_statuses, retry_methods) - # Current API environment - self._environment = environment - - # base_url value - self._base_url = base_url - - # The OAuth 2.0 Access Token to use for API requests. - self._access_token = access_token - - # Set to true to allow skipping ssl certificate verification - self._skip_ssl_cert_verification = skip_ssl_cert_verification - - # The Http Client to use for making requests. - super().set_http_client(self.create_http_client()) - - def clone_with(self, http_client_instance=None, - override_http_client_configuration=None, http_call_back=None, - timeout=None, max_retries=None, backoff_factor=None, - retry_statuses=None, retry_methods=None, environment=None, - base_url=None, access_token=None, - skip_ssl_cert_verification=None): - http_client_instance = http_client_instance or super().http_client_instance - override_http_client_configuration = override_http_client_configuration or super().override_http_client_configuration - http_call_back = http_call_back or super().http_callback - timeout = timeout or super().timeout - max_retries = max_retries or super().max_retries - backoff_factor = backoff_factor or super().backoff_factor - retry_statuses = retry_statuses or super().retry_statuses - retry_methods = retry_methods or super().retry_methods - environment = environment or self.environment - base_url = base_url or self.base_url - access_token = access_token or self.access_token - skip_ssl_cert_verification = skip_ssl_cert_verification or self.skip_ssl_cert_verification - return Configuration( - http_client_instance=http_client_instance, - override_http_client_configuration=override_http_client_configuration, - http_call_back=http_call_back, timeout=timeout, - max_retries=max_retries, backoff_factor=backoff_factor, - retry_statuses=retry_statuses, retry_methods=retry_methods, - environment=environment, base_url=base_url, access_token=access_token, - skip_ssl_cert_verification=skip_ssl_cert_verification - ) - - def create_http_client(self): - return RequestsClient( - timeout=super().timeout, max_retries=super().max_retries, - backoff_factor=super().backoff_factor, retry_statuses=super().retry_statuses, - retry_methods=super().retry_methods, - http_client_instance=super().http_client_instance, - override_http_client_configuration=super().override_http_client_configuration, - response_factory=super().http_response_factory, - verify=not self.skip_ssl_cert_verification - ) - - # All the environments the SDK can run in - environments = { - Environment.PRODUCTION: { - Server.DEFAULT: '{base-url}' - } - } - - def get_base_uri(self, server=Server.DEFAULT): - """Generates the appropriate base URI for the environment and the - server. - - Args: - server (Configuration.Server): The server enum for which the base - URI is required. - - Returns: - String: The base URI. - - """ - parameters = { - "base-url": {'value': self.base_url, 'encode': False}, - } - - return APIHelper.append_url_with_template_parameters( - self.environments[self.environment][server], parameters - ) diff --git a/Python/thoughtspotpublicrestapi/controllers/__init__.py b/Python/thoughtspotpublicrestapi/controllers/__init__.py deleted file mode 100644 index 065f9b1af..000000000 --- a/Python/thoughtspotpublicrestapi/controllers/__init__.py +++ /dev/null @@ -1,17 +0,0 @@ -__all__ = [ - 'base_controller', - 'user_controller', - 'group_controller', - 'metadata_controller', - 'database_controller', - 'connection_controller', - 'data_controller', - 'logs_controller', - 'custom_actions_controller', - 'security_controller', - 'org_controller', - 'session_controller', - 'admin_controller', - 'report_controller', - 'materialization_controller', -] diff --git a/Python/thoughtspotpublicrestapi/controllers/admin_controller.py b/Python/thoughtspotpublicrestapi/controllers/admin_controller.py deleted file mode 100644 index 83498895d..000000000 --- a/Python/thoughtspotpublicrestapi/controllers/admin_controller.py +++ /dev/null @@ -1,290 +0,0 @@ -# -*- coding: utf-8 -*- - -""" -thoughtspotpublicrestapi - -This file was automatically generated by APIMATIC v3.0 ( - https://www.apimatic.io ). -""" - -from thoughtspotpublicrestapi.api_helper import APIHelper -from thoughtspotpublicrestapi.configuration import Server -from thoughtspotpublicrestapi.controllers.base_controller import BaseController -from apimatic_core.request_builder import RequestBuilder -from apimatic_core.response_handler import ResponseHandler -from apimatic_core.types.parameter import Parameter -from thoughtspotpublicrestapi.http.http_method_enum import HttpMethodEnum -from apimatic_core.authentication.multiple.single_auth import Single -from apimatic_core.authentication.multiple.and_auth_group import And -from apimatic_core.authentication.multiple.or_auth_group import Or -from thoughtspotpublicrestapi.models.adminsync_principal_response import AdminsyncPrincipalResponse -from thoughtspotpublicrestapi.exceptions.error_response_exception import ErrorResponseException - - -class AdminController(BaseController): - - """A Controller to access Endpoints in the thoughtspotpublicrestapi API.""" - def __init__(self, config): - super(AdminController, self).__init__(config) - - def restapi_v_2__update_cluster_config(self, - body): - """Does a PUT request to /tspublic/rest/v2/admin/configuration/update. - - To update the Thoughtspot cluster configuration, use this endpoint. - - Args: - body (TspublicRestV2AdminConfigurationUpdateRequest): TODO: type - description here. - - Returns: - bool: Response from the API. - - Raises: - APIException: When an error occurs while fetching the data from - the remote API. This exception includes the HTTP Response - code, an error message, and the HTTP body that was received in - the request. - - """ - - return super().new_api_call_builder.request( - RequestBuilder().server(Server.DEFAULT) - .path('/tspublic/rest/v2/admin/configuration/update') - .http_method(HttpMethodEnum.PUT) - .header_param(Parameter() - .key('Content-Type') - .value('application/json')) - .body_param(Parameter() - .value(body) - .is_required(True)) - .body_serializer(APIHelper.json_serialize) - .auth(Single('global')) - ).response( - ResponseHandler() - .deserializer(APIHelper.json_deserialize) - .local_error('500', 'Operation failed', ErrorResponseException) - ).execute() - - def restapi_v_2__reset_user_password(self, - body): - """Does a PUT request to /tspublic/rest/v2/admin/resetpassword. - - To reset the password of a ThoughtSpot user account, use this - endpoint. - It is mandatory to use Authorization header with token of a user with - admin access to successfully run this endpoint. - At least one of User Id or username is mandatory. When both are given, - then user id will be considered. - - Args: - body (TspublicRestV2AdminResetpasswordRequest): TODO: type - description here. - - Returns: - bool: Response from the API. - - Raises: - APIException: When an error occurs while fetching the data from - the remote API. This exception includes the HTTP Response - code, an error message, and the HTTP body that was received in - the request. - - """ - - return super().new_api_call_builder.request( - RequestBuilder().server(Server.DEFAULT) - .path('/tspublic/rest/v2/admin/resetpassword') - .http_method(HttpMethodEnum.PUT) - .header_param(Parameter() - .key('Content-Type') - .value('application/json')) - .body_param(Parameter() - .value(body) - .is_required(True)) - .body_serializer(APIHelper.json_serialize) - .auth(Single('global')) - ).response( - ResponseHandler() - .deserializer(APIHelper.json_deserialize) - .local_error('500', 'Operation failed', ErrorResponseException) - ).execute() - - def restapi_v_2__sync_principal(self, - body): - """Does a PUT request to /tspublic/rest/v2/admin/syncprincipal. - - To programmatically synchronize user accounts and user groups from - external system with ThoughtSpot, use this endpoint. - The payload takes principals containing all users and groups present - in the external system. - The users and user groups in Thoughtspot get updated for any matching - inputs. - Any user and user group present in the input, but not present in the - cluster, gets created in cluster. - n You can optionally choose to delete the user and groups from the - cluster, that are not present in the input. - - Args: - body (TspublicRestV2AdminSyncprincipalRequest): TODO: type - description here. - - Returns: - AdminsyncPrincipalResponse: Response from the API. - - Raises: - APIException: When an error occurs while fetching the data from - the remote API. This exception includes the HTTP Response - code, an error message, and the HTTP body that was received in - the request. - - """ - - return super().new_api_call_builder.request( - RequestBuilder().server(Server.DEFAULT) - .path('/tspublic/rest/v2/admin/syncprincipal') - .http_method(HttpMethodEnum.PUT) - .header_param(Parameter() - .key('Content-Type') - .value('application/json')) - .body_param(Parameter() - .value(body) - .is_required(True)) - .header_param(Parameter() - .key('accept') - .value('application/json')) - .body_serializer(APIHelper.json_serialize) - .auth(Single('global')) - ).response( - ResponseHandler() - .deserializer(APIHelper.json_deserialize) - .deserialize_into(AdminsyncPrincipalResponse.from_dictionary) - .local_error('500', 'Operation failed', ErrorResponseException) - ).execute() - - def restapi_v_2__change_author_of_objects(self, - body): - """Does a PUT request to /tspublic/rest/v2/admin/changeauthor. - - To programmatically change the owner of one or several objects from - one user account to another, use this endpoint. - You might want to transfer ownership of objects owned by a user to - another active user, when the account is removed from the ThoughtSpot - application. - - Args: - body (TspublicRestV2AdminChangeauthorRequest): TODO: type - description here. - - Returns: - bool: Response from the API. - - Raises: - APIException: When an error occurs while fetching the data from - the remote API. This exception includes the HTTP Response - code, an error message, and the HTTP body that was received in - the request. - - """ - - return super().new_api_call_builder.request( - RequestBuilder().server(Server.DEFAULT) - .path('/tspublic/rest/v2/admin/changeauthor') - .http_method(HttpMethodEnum.PUT) - .header_param(Parameter() - .key('Content-Type') - .value('application/json')) - .body_param(Parameter() - .value(body) - .is_required(True)) - .body_serializer(APIHelper.json_serialize) - .auth(Single('global')) - ).response( - ResponseHandler() - .deserializer(APIHelper.json_deserialize) - .local_error('500', 'Operation failed', ErrorResponseException) - ).execute() - - def restapi_v_2__assign_author_to_objects(self, - body): - """Does a PUT request to /tspublic/rest/v2/admin/assignauthor. - - To programmatically assign an author to one or several objects, use - this endpoint. - Provide either user name or id as input. When both are given user id - will be considered. - Requires administration privilege. - - Args: - body (TspublicRestV2AdminAssignauthorRequest): TODO: type - description here. - - Returns: - bool: Response from the API. - - Raises: - APIException: When an error occurs while fetching the data from - the remote API. This exception includes the HTTP Response - code, an error message, and the HTTP body that was received in - the request. - - """ - - return super().new_api_call_builder.request( - RequestBuilder().server(Server.DEFAULT) - .path('/tspublic/rest/v2/admin/assignauthor') - .http_method(HttpMethodEnum.PUT) - .header_param(Parameter() - .key('Content-Type') - .value('application/json')) - .body_param(Parameter() - .value(body) - .is_required(True)) - .body_serializer(APIHelper.json_serialize) - .auth(Single('global')) - ).response( - ResponseHandler() - .deserializer(APIHelper.json_deserialize) - .local_error('500', 'Operation failed', ErrorResponseException) - ).execute() - - def restapi_v_2__force_logout_users(self, - body): - """Does a POST request to /tspublic/rest/v2/admin/forcelogout. - - To logout one or more users from logged in session, use this endpoint. - If no input is provided then all logged in users are force logged out. - Requires administration privilege - - Args: - body (TspublicRestV2AdminForcelogoutRequest): TODO: type - description here. - - Returns: - bool: Response from the API. - - Raises: - APIException: When an error occurs while fetching the data from - the remote API. This exception includes the HTTP Response - code, an error message, and the HTTP body that was received in - the request. - - """ - - return super().new_api_call_builder.request( - RequestBuilder().server(Server.DEFAULT) - .path('/tspublic/rest/v2/admin/forcelogout') - .http_method(HttpMethodEnum.POST) - .header_param(Parameter() - .key('Content-Type') - .value('application/json')) - .body_param(Parameter() - .value(body) - .is_required(True)) - .body_serializer(APIHelper.json_serialize) - .auth(Single('global')) - ).response( - ResponseHandler() - .deserializer(APIHelper.json_deserialize) - .local_error('500', 'Operation failed', ErrorResponseException) - ).execute() diff --git a/Python/thoughtspotpublicrestapi/controllers/base_controller.py b/Python/thoughtspotpublicrestapi/controllers/base_controller.py deleted file mode 100644 index 85482dc6c..000000000 --- a/Python/thoughtspotpublicrestapi/controllers/base_controller.py +++ /dev/null @@ -1,67 +0,0 @@ -# -*- coding: utf-8 -*- - -""" -thoughtspotpublicrestapi - -This file was automatically generated by APIMATIC v3.0 ( - https://www.apimatic.io ). -""" - -import platform -from apimatic_core.api_call import ApiCall -from apimatic_core.types.error_case import ErrorCase -from thoughtspotpublicrestapi.exceptions.api_exception import APIException - - -class BaseController(object): - - """All controllers inherit from this base class. - - Attributes: - config (Configuration): The HttpClient which a specific controller - instance will use. By default all the controller objects share - the same HttpClient. A user can use his own custom HttpClient - as well. - http_call_back (HttpCallBack): An object which holds call back - methods to be called before and after the execution of an HttpRequest. - new_api_call_builder (APICall): Returns the API Call builder instance. - auth_managers (dict): A dictionary which holds the instances of authentication managers. - - """ - - @staticmethod - def user_agent(): - return 'RestAPI V2 SDK' - - @staticmethod - def user_agent_parameters(): - return { - } - - @staticmethod - def global_errors(): - return{ - 'default': ErrorCase().description('HTTP response not OK.').exception_type(APIException), - } - - def __init__(self, config): - self._global_config = config - self._config = self._global_config.get_http_client_configuration() - self._http_call_back = self.config.http_callback - self.api_call = ApiCall(config) - - @property - def config(self): - return self._config - - @property - def http_call_back(self): - return self._http_call_back - - @property - def new_api_call_builder(self): - return self.api_call.new_builder - - @property - def auth_managers(self): - return self._global_config.get_auth_managers() diff --git a/Python/thoughtspotpublicrestapi/controllers/connection_controller.py b/Python/thoughtspotpublicrestapi/controllers/connection_controller.py deleted file mode 100644 index 8ce97335c..000000000 --- a/Python/thoughtspotpublicrestapi/controllers/connection_controller.py +++ /dev/null @@ -1,463 +0,0 @@ -# -*- coding: utf-8 -*- - -""" -thoughtspotpublicrestapi - -This file was automatically generated by APIMATIC v3.0 ( - https://www.apimatic.io ). -""" - -from thoughtspotpublicrestapi.api_helper import APIHelper -from thoughtspotpublicrestapi.configuration import Server -from thoughtspotpublicrestapi.controllers.base_controller import BaseController -from apimatic_core.request_builder import RequestBuilder -from apimatic_core.response_handler import ResponseHandler -from apimatic_core.types.parameter import Parameter -from thoughtspotpublicrestapi.http.http_method_enum import HttpMethodEnum -from apimatic_core.types.array_serialization_format import SerializationFormats -from apimatic_core.authentication.multiple.single_auth import Single -from apimatic_core.authentication.multiple.and_auth_group import And -from apimatic_core.authentication.multiple.or_auth_group import Or -from thoughtspotpublicrestapi.models.connection_response import ConnectionResponse -from thoughtspotpublicrestapi.models.create_connection_response import CreateConnectionResponse -from thoughtspotpublicrestapi.models.connection_table_response import ConnectionTableResponse -from thoughtspotpublicrestapi.models.connection_table_columns_response import ConnectionTableColumnsResponse -from thoughtspotpublicrestapi.exceptions.error_response_exception import ErrorResponseException - - -class ConnectionController(BaseController): - - """A Controller to access Endpoints in the thoughtspotpublicrestapi API.""" - def __init__(self, config): - super(ConnectionController, self).__init__(config) - - def restapi_v_2__get_connection(self, - id): - """Does a GET request to /tspublic/rest/v2/connection. - - To get the details of a specific connection use this endpoint - - Args: - id (string): The GUID of the connection to query - - Returns: - ConnectionResponse: Response from the API. - - Raises: - APIException: When an error occurs while fetching the data from - the remote API. This exception includes the HTTP Response - code, an error message, and the HTTP body that was received in - the request. - - """ - - return super().new_api_call_builder.request( - RequestBuilder().server(Server.DEFAULT) - .path('/tspublic/rest/v2/connection') - .http_method(HttpMethodEnum.GET) - .query_param(Parameter() - .key('id') - .value(id) - .is_required(True)) - .header_param(Parameter() - .key('accept') - .value('application/json')) - .auth(Single('global')) - ).response( - ResponseHandler() - .deserializer(APIHelper.json_deserialize) - .deserialize_into(ConnectionResponse.from_dictionary) - .local_error('500', 'Operation failed', ErrorResponseException) - ).execute() - - def restapi_v_2__get_connection_database(self, - id): - """Does a GET request to /tspublic/rest/v2/connection/database. - - To get the list of databases for a connection, use this endpoint. - The response will include databases from the data platform - corresponding to the connection id provided. - - Args: - id (string): The GUID of the connection - - Returns: - list of string: Response from the API. - - Raises: - APIException: When an error occurs while fetching the data from - the remote API. This exception includes the HTTP Response - code, an error message, and the HTTP body that was received in - the request. - - """ - - return super().new_api_call_builder.request( - RequestBuilder().server(Server.DEFAULT) - .path('/tspublic/rest/v2/connection/database') - .http_method(HttpMethodEnum.GET) - .query_param(Parameter() - .key('id') - .value(id) - .is_required(True)) - .header_param(Parameter() - .key('accept') - .value('application/json')) - .auth(Single('global')) - ).response( - ResponseHandler() - .deserializer(APIHelper.json_deserialize) - .local_error('500', 'Operation failed', ErrorResponseException) - ).execute() - - def restapi_v_2__create_connection(self, - body): - """Does a POST request to /tspublic/rest/v2/connection/create. - - To programmatically create a connection in the ThoughtSpot system use - this API endpoint. - Using this API, you can create a connection and assign groups. - To create a connection, you require admin connection privileges. - All connections created in the ThoughtSpot system are added to - ALL_GROUP - - Args: - body (TspublicRestV2ConnectionCreateRequest): TODO: type - description here. - - Returns: - CreateConnectionResponse: Response from the API. - - Raises: - APIException: When an error occurs while fetching the data from - the remote API. This exception includes the HTTP Response - code, an error message, and the HTTP body that was received in - the request. - - """ - - return super().new_api_call_builder.request( - RequestBuilder().server(Server.DEFAULT) - .path('/tspublic/rest/v2/connection/create') - .http_method(HttpMethodEnum.POST) - .header_param(Parameter() - .key('Content-Type') - .value('application/json')) - .body_param(Parameter() - .value(body) - .is_required(True)) - .header_param(Parameter() - .key('accept') - .value('application/json')) - .body_serializer(APIHelper.json_serialize) - .auth(Single('global')) - ).response( - ResponseHandler() - .deserializer(APIHelper.json_deserialize) - .deserialize_into(CreateConnectionResponse.from_dictionary) - .local_error('500', 'Operation failed', ErrorResponseException) - ).execute() - - def restapi_v_2__update_connection(self, - body): - """Does a PUT request to /tspublic/rest/v2/connection/update. - - You can use this endpoint to programmatically modify an existing - connection - To modify a connection, you require admin connection privileges. - At least one of Connection Id or connectionname is mandatory. When - both are given, then connection id will be considered and - connectionname will be updated - - Args: - body (TspublicRestV2ConnectionUpdateRequest): TODO: type - description here. - - Returns: - bool: Response from the API. - - Raises: - APIException: When an error occurs while fetching the data from - the remote API. This exception includes the HTTP Response - code, an error message, and the HTTP body that was received in - the request. - - """ - - return super().new_api_call_builder.request( - RequestBuilder().server(Server.DEFAULT) - .path('/tspublic/rest/v2/connection/update') - .http_method(HttpMethodEnum.PUT) - .header_param(Parameter() - .key('Content-Type') - .value('application/json')) - .body_param(Parameter() - .value(body) - .is_required(True)) - .body_serializer(APIHelper.json_serialize) - .auth(Single('global')) - ).response( - ResponseHandler() - .deserializer(APIHelper.json_deserialize) - .local_error('500', 'Operation failed', ErrorResponseException) - ).execute() - - def restapi_v_2__delete_connection(self, - id): - """Does a DELETE request to /tspublic/rest/v2/connection/delete. - - To remove a connection from the ThoughtSpot system, use this - endpoint. - - Args: - id (list of string): A JSON array of GUIDs of the connection - - Returns: - bool: Response from the API. - - Raises: - APIException: When an error occurs while fetching the data from - the remote API. This exception includes the HTTP Response - code, an error message, and the HTTP body that was received in - the request. - - """ - - return super().new_api_call_builder.request( - RequestBuilder().server(Server.DEFAULT) - .path('/tspublic/rest/v2/connection/delete') - .http_method(HttpMethodEnum.DELETE) - .query_param(Parameter() - .key('id') - .value(id) - .is_required(True)) - .array_serialization_format(SerializationFormats.PLAIN) - .auth(Single('global')) - ).response( - ResponseHandler() - .deserializer(APIHelper.json_deserialize) - .local_error('500', 'Operation failed', ErrorResponseException) - ).execute() - - def restapi_v_2__add_table_to_connection(self, - body): - """Does a PUT request to /tspublic/rest/v2/connection/addtable. - - To programmatically add table to an existing connection use this - endpoint. - When you assign groups to a connection, the connection inherits the - privileges assigned to those groups. - At least one of Connection Id or connectionname is mandatory. When - both are given, then connection id will be considered. - - Args: - body (TspublicRestV2ConnectionAddtableRequest): TODO: type - description here. - - Returns: - bool: Response from the API. - - Raises: - APIException: When an error occurs while fetching the data from - the remote API. This exception includes the HTTP Response - code, an error message, and the HTTP body that was received in - the request. - - """ - - return super().new_api_call_builder.request( - RequestBuilder().server(Server.DEFAULT) - .path('/tspublic/rest/v2/connection/addtable') - .http_method(HttpMethodEnum.PUT) - .header_param(Parameter() - .key('Content-Type') - .value('application/json')) - .body_param(Parameter() - .value(body) - .is_required(True)) - .body_serializer(APIHelper.json_serialize) - .auth(Single('global')) - ).response( - ResponseHandler() - .deserializer(APIHelper.json_deserialize) - .local_error('500', 'Operation failed', ErrorResponseException) - ).execute() - - def restapi_v_2__remove_table_from_connection(self, - body): - """Does a PUT request to /tspublic/rest/v2/connection/removetable. - - To programmatically remove a table from a connection use API - endpoint. - The API removes only the connection association. It does not delete - the connection or group from the Thoughtspot system. - At least one of id or name of connection is required. When both are - given connection id will be considered. - - Args: - body (TspublicRestV2ConnectionRemovetableRequest): TODO: type - description here. - - Returns: - bool: Response from the API. - - Raises: - APIException: When an error occurs while fetching the data from - the remote API. This exception includes the HTTP Response - code, an error message, and the HTTP body that was received in - the request. - - """ - - return super().new_api_call_builder.request( - RequestBuilder().server(Server.DEFAULT) - .path('/tspublic/rest/v2/connection/removetable') - .http_method(HttpMethodEnum.PUT) - .header_param(Parameter() - .key('Content-Type') - .value('application/json')) - .body_param(Parameter() - .value(body) - .is_required(True)) - .body_serializer(APIHelper.json_serialize) - .auth(Single('global')) - ).response( - ResponseHandler() - .deserializer(APIHelper.json_deserialize) - .local_error('500', 'Operation failed', ErrorResponseException) - ).execute() - - def restapi_v_2__search_connection(self, - body): - """Does a POST request to /tspublic/rest/v2/connection/search. - - To get the details of a specific connection or all connections in the - ThoughtSpot system use this end point. - - Args: - body (TspublicRestV2ConnectionSearchRequest): TODO: type - description here. - - Returns: - list of ConnectionResponse: Response from the API. - - Raises: - APIException: When an error occurs while fetching the data from - the remote API. This exception includes the HTTP Response - code, an error message, and the HTTP body that was received in - the request. - - """ - - return super().new_api_call_builder.request( - RequestBuilder().server(Server.DEFAULT) - .path('/tspublic/rest/v2/connection/search') - .http_method(HttpMethodEnum.POST) - .header_param(Parameter() - .key('Content-Type') - .value('application/json')) - .body_param(Parameter() - .value(body) - .is_required(True)) - .header_param(Parameter() - .key('accept') - .value('application/json')) - .body_serializer(APIHelper.json_serialize) - .auth(Single('global')) - ).response( - ResponseHandler() - .deserializer(APIHelper.json_deserialize) - .deserialize_into(ConnectionResponse.from_dictionary) - .local_error('500', 'Operation failed', ErrorResponseException) - ).execute() - - def restapi_v_2__get_connection_tables(self, - body): - """Does a POST request to /tspublic/rest/v2/connection/table. - - To get the details of tables from a connection, use this endpoint. - You can get the details of tables in the data platform for the - connection id provided. - - Args: - body (TspublicRestV2ConnectionTableRequest): TODO: type - description here. - - Returns: - ConnectionTableResponse: Response from the API. - - Raises: - APIException: When an error occurs while fetching the data from - the remote API. This exception includes the HTTP Response - code, an error message, and the HTTP body that was received in - the request. - - """ - - return super().new_api_call_builder.request( - RequestBuilder().server(Server.DEFAULT) - .path('/tspublic/rest/v2/connection/table') - .http_method(HttpMethodEnum.POST) - .header_param(Parameter() - .key('Content-Type') - .value('application/json')) - .body_param(Parameter() - .value(body) - .is_required(True)) - .header_param(Parameter() - .key('accept') - .value('application/json')) - .body_serializer(APIHelper.json_serialize) - .auth(Single('global')) - ).response( - ResponseHandler() - .deserializer(APIHelper.json_deserialize) - .deserialize_into(ConnectionTableResponse.from_dictionary) - .local_error('500', 'Operation failed', ErrorResponseException) - ).execute() - - def restapi_v_2__get_connection_table_columns(self, - body): - """Does a POST request to /tspublic/rest/v2/connection/tablecoloumn. - - To get the details of columns in a table associated to a connection, - use this endpoint. - You can get the columns of any table available in the data platform - for the connection id provided. - - Args: - body (TspublicRestV2ConnectionTablecoloumnRequest): TODO: type - description here. - - Returns: - ConnectionTableColumnsResponse: Response from the API. - - Raises: - APIException: When an error occurs while fetching the data from - the remote API. This exception includes the HTTP Response - code, an error message, and the HTTP body that was received in - the request. - - """ - - return super().new_api_call_builder.request( - RequestBuilder().server(Server.DEFAULT) - .path('/tspublic/rest/v2/connection/tablecoloumn') - .http_method(HttpMethodEnum.POST) - .header_param(Parameter() - .key('Content-Type') - .value('application/json')) - .body_param(Parameter() - .value(body) - .is_required(True)) - .header_param(Parameter() - .key('accept') - .value('application/json')) - .body_serializer(APIHelper.json_serialize) - .auth(Single('global')) - ).response( - ResponseHandler() - .deserializer(APIHelper.json_deserialize) - .deserialize_into(ConnectionTableColumnsResponse.from_dictionary) - .local_error('500', 'Operation failed', ErrorResponseException) - ).execute() diff --git a/Python/thoughtspotpublicrestapi/controllers/custom_actions_controller.py b/Python/thoughtspotpublicrestapi/controllers/custom_actions_controller.py deleted file mode 100644 index d2c647c83..000000000 --- a/Python/thoughtspotpublicrestapi/controllers/custom_actions_controller.py +++ /dev/null @@ -1,370 +0,0 @@ -# -*- coding: utf-8 -*- - -""" -thoughtspotpublicrestapi - -This file was automatically generated by APIMATIC v3.0 ( - https://www.apimatic.io ). -""" - -from thoughtspotpublicrestapi.api_helper import APIHelper -from thoughtspotpublicrestapi.configuration import Server -from thoughtspotpublicrestapi.controllers.base_controller import BaseController -from apimatic_core.request_builder import RequestBuilder -from apimatic_core.response_handler import ResponseHandler -from apimatic_core.types.parameter import Parameter -from thoughtspotpublicrestapi.http.http_method_enum import HttpMethodEnum -from apimatic_core.authentication.multiple.single_auth import Single -from apimatic_core.authentication.multiple.and_auth_group import And -from apimatic_core.authentication.multiple.or_auth_group import Or -from thoughtspotpublicrestapi.exceptions.error_response_exception import ErrorResponseException - - -class CustomActionsController(BaseController): - - """A Controller to access Endpoints in the thoughtspotpublicrestapi API.""" - def __init__(self, config): - super(CustomActionsController, self).__init__(config) - - def restapi_v_2__get_custom_action(self, - id): - """Does a GET request to /tspublic/rest/v2/customaction. - - To get details of a specific custom action configured in the - ThoughtSpot system, use this endpoint - - Args: - id (string): GUID of the custom action - - Returns: - object: Response from the API. - - Raises: - APIException: When an error occurs while fetching the data from - the remote API. This exception includes the HTTP Response - code, an error message, and the HTTP body that was received in - the request. - - """ - - return super().new_api_call_builder.request( - RequestBuilder().server(Server.DEFAULT) - .path('/tspublic/rest/v2/customaction') - .http_method(HttpMethodEnum.GET) - .query_param(Parameter() - .key('id') - .value(id) - .is_required(True)) - .header_param(Parameter() - .key('accept') - .value('application/json')) - .auth(Single('global')) - ).response( - ResponseHandler() - .deserializer(APIHelper.json_deserialize) - .local_error('500', 'Operation failed', ErrorResponseException) - ).execute() - - def restapi_v_2__search_custom_action(self, - body): - """Does a POST request to /tspublic/rest/v2/customaction/search. - - To search custom actions available on a ThoughtSpot instance, use this - endpoint - - Args: - body (TspublicRestV2CustomactionSearchRequest): TODO: type - description here. - - Returns: - object: Response from the API. - - Raises: - APIException: When an error occurs while fetching the data from - the remote API. This exception includes the HTTP Response - code, an error message, and the HTTP body that was received in - the request. - - """ - - return super().new_api_call_builder.request( - RequestBuilder().server(Server.DEFAULT) - .path('/tspublic/rest/v2/customaction/search') - .http_method(HttpMethodEnum.POST) - .header_param(Parameter() - .key('Content-Type') - .value('application/json')) - .body_param(Parameter() - .value(body) - .is_required(True)) - .header_param(Parameter() - .key('accept') - .value('application/json')) - .body_serializer(APIHelper.json_serialize) - .auth(Single('global')) - ).response( - ResponseHandler() - .deserializer(APIHelper.json_deserialize) - .local_error('500', 'Operation failed', ErrorResponseException) - ).execute() - - def restapi_v_2__get_custom_action_association(self, - id): - """Does a GET request to /tspublic/rest/v2/customaction/association. - - ThoughtSpot supports associating custom actions to Liveboards, - answers, and worksheets. To get the details of the ThoughtSpot objects - associated with a custom action, use this endpoint. - - Args: - id (string): GUID of the custom action - - Returns: - object: Response from the API. - - Raises: - APIException: When an error occurs while fetching the data from - the remote API. This exception includes the HTTP Response - code, an error message, and the HTTP body that was received in - the request. - - """ - - return super().new_api_call_builder.request( - RequestBuilder().server(Server.DEFAULT) - .path('/tspublic/rest/v2/customaction/association') - .http_method(HttpMethodEnum.GET) - .query_param(Parameter() - .key('id') - .value(id) - .is_required(True)) - .header_param(Parameter() - .key('accept') - .value('application/json')) - .auth(Single('global')) - ).response( - ResponseHandler() - .deserializer(APIHelper.json_deserialize) - .local_error('500', 'Operation failed', ErrorResponseException) - ).execute() - - def restapi_v_2__create_custom_action(self, - body): - """Does a POST request to /tspublic/rest/v2/customaction/create. - - To programmatically create custom actions on ThoughtSpot clusters that - support embedding configuration, use this endpoint - - Args: - body (TspublicRestV2CustomactionCreateRequest): TODO: type - description here. - - Returns: - object: Response from the API. - - Raises: - APIException: When an error occurs while fetching the data from - the remote API. This exception includes the HTTP Response - code, an error message, and the HTTP body that was received in - the request. - - """ - - return super().new_api_call_builder.request( - RequestBuilder().server(Server.DEFAULT) - .path('/tspublic/rest/v2/customaction/create') - .http_method(HttpMethodEnum.POST) - .header_param(Parameter() - .key('Content-Type') - .value('application/json')) - .body_param(Parameter() - .value(body) - .is_required(True)) - .header_param(Parameter() - .key('accept') - .value('application/json')) - .body_serializer(APIHelper.json_serialize) - .auth(Single('global')) - ).response( - ResponseHandler() - .deserializer(APIHelper.json_deserialize) - .local_error('500', 'Operation failed', ErrorResponseException) - ).execute() - - def restapi_v_2__update_custom_action(self, - body): - """Does a PUT request to /tspublic/rest/v2/customaction/update. - - To programmatically edit an existing custom action, use this endpoint - - Args: - body (TspublicRestV2CustomactionUpdateRequest): TODO: type - description here. - - Returns: - object: Response from the API. - - Raises: - APIException: When an error occurs while fetching the data from - the remote API. This exception includes the HTTP Response - code, an error message, and the HTTP body that was received in - the request. - - """ - - return super().new_api_call_builder.request( - RequestBuilder().server(Server.DEFAULT) - .path('/tspublic/rest/v2/customaction/update') - .http_method(HttpMethodEnum.PUT) - .header_param(Parameter() - .key('Content-Type') - .value('application/json')) - .body_param(Parameter() - .value(body) - .is_required(True)) - .header_param(Parameter() - .key('accept') - .value('application/json')) - .body_serializer(APIHelper.json_serialize) - .auth(Single('global')) - ).response( - ResponseHandler() - .deserializer(APIHelper.json_deserialize) - .local_error('500', 'Operation failed', ErrorResponseException) - ).execute() - - def restapi_v_2__delete_custom_action(self, - id): - """Does a DELETE request to /tspublic/rest/v2/customaction/delete. - - To programmatically delete a custom action, use this endpoint - - Args: - id (string): GUID of the custom action - - Returns: - object: Response from the API. - - Raises: - APIException: When an error occurs while fetching the data from - the remote API. This exception includes the HTTP Response - code, an error message, and the HTTP body that was received in - the request. - - """ - - return super().new_api_call_builder.request( - RequestBuilder().server(Server.DEFAULT) - .path('/tspublic/rest/v2/customaction/delete') - .http_method(HttpMethodEnum.DELETE) - .query_param(Parameter() - .key('id') - .value(id) - .is_required(True)) - .header_param(Parameter() - .key('accept') - .value('application/json')) - .auth(Single('global')) - ).response( - ResponseHandler() - .deserializer(APIHelper.json_deserialize) - .local_error('500', 'Operation failed', ErrorResponseException) - ).execute() - - def restapi_v_2__update_custom_action_association(self, - body): - """Does a PUT request to /tspublic/rest/v2/customaction/association/update. - - To programmatically associate a custom action to a ThoughtSpot object, - use this endpoint - - Args: - body (TspublicRestV2CustomactionAssociationUpdateRequest): TODO: - type description here. - - Returns: - object: Response from the API. - - Raises: - APIException: When an error occurs while fetching the data from - the remote API. This exception includes the HTTP Response - code, an error message, and the HTTP body that was received in - the request. - - """ - - return super().new_api_call_builder.request( - RequestBuilder().server(Server.DEFAULT) - .path('/tspublic/rest/v2/customaction/association/update') - .http_method(HttpMethodEnum.PUT) - .header_param(Parameter() - .key('Content-Type') - .value('application/json')) - .body_param(Parameter() - .value(body) - .is_required(True)) - .header_param(Parameter() - .key('accept') - .value('application/json')) - .body_serializer(APIHelper.json_serialize) - .auth(Single('global')) - ).response( - ResponseHandler() - .deserializer(APIHelper.json_deserialize) - .local_error('500', 'Operation failed', ErrorResponseException) - ).execute() - - def restapi_v_2__delete_custom_action_association(self, - id, - association): - """Does a DELETE request to /tspublic/rest/v2/customactions/association/delete. - - To remove custom action associations to ThoughtSpot objects, use this - endpoint - - Args: - id (string): GUID of the custom action - association (string): A JSON map of the attributes with - association of the action to ThoughtSpot object ID Example: - {"id":"0dbd5b3a-84c1-4407-9803-cf07d67e6fcf","name":"My - worksheet - action","version":"v2","type":"URL","detail":{"link":"https://u - npkg.com","function":"my-worksheet-action","authSelect":"NONE", - "authToken":"","encodeUser":"","apiKey":"X-API-KEY","apiValue": - "","additionalUrlHeaders":"{}"},"actionAssociationMap":{"WORKSH - EET":{"2b9d083a-275c-4984-9cfe-90b036affa17":{"enabled":"true", - "context":"PRIMARY"}}},"context":"NONE","availability":[ - ],"userGroupList":["d0326b56-ef23-4c8a-8327-a30e99bcc72b"]} - - Returns: - object: Response from the API. - - Raises: - APIException: When an error occurs while fetching the data from - the remote API. This exception includes the HTTP Response - code, an error message, and the HTTP body that was received in - the request. - - """ - - return super().new_api_call_builder.request( - RequestBuilder().server(Server.DEFAULT) - .path('/tspublic/rest/v2/customactions/association/delete') - .http_method(HttpMethodEnum.DELETE) - .query_param(Parameter() - .key('id') - .value(id) - .is_required(True)) - .query_param(Parameter() - .key('association') - .value(association) - .is_required(True)) - .header_param(Parameter() - .key('accept') - .value('application/json')) - .auth(Single('global')) - ).response( - ResponseHandler() - .deserializer(APIHelper.json_deserialize) - .local_error('500', 'Operation failed', ErrorResponseException) - ).execute() diff --git a/Python/thoughtspotpublicrestapi/controllers/data_controller.py b/Python/thoughtspotpublicrestapi/controllers/data_controller.py deleted file mode 100644 index e350eaf1b..000000000 --- a/Python/thoughtspotpublicrestapi/controllers/data_controller.py +++ /dev/null @@ -1,246 +0,0 @@ -# -*- coding: utf-8 -*- - -""" -thoughtspotpublicrestapi - -This file was automatically generated by APIMATIC v3.0 ( - https://www.apimatic.io ). -""" - -from thoughtspotpublicrestapi.api_helper import APIHelper -from thoughtspotpublicrestapi.configuration import Server -from thoughtspotpublicrestapi.controllers.base_controller import BaseController -from apimatic_core.request_builder import RequestBuilder -from apimatic_core.response_handler import ResponseHandler -from apimatic_core.types.parameter import Parameter -from thoughtspotpublicrestapi.http.http_method_enum import HttpMethodEnum -from apimatic_core.types.array_serialization_format import SerializationFormats -from apimatic_core.authentication.multiple.single_auth import Single -from apimatic_core.authentication.multiple.and_auth_group import And -from apimatic_core.authentication.multiple.or_auth_group import Or -from thoughtspotpublicrestapi.models.answer_query_response import AnswerQueryResponse -from thoughtspotpublicrestapi.models.liveboard_query_response import LiveboardQueryResponse -from thoughtspotpublicrestapi.exceptions.error_response_exception import ErrorResponseException - - -class DataController(BaseController): - - """A Controller to access Endpoints in the thoughtspotpublicrestapi API.""" - def __init__(self, config): - super(DataController, self).__init__(config) - - def restapi_v_2__search_query_data(self, - body): - """Does a POST request to /tspublic/rest/v2/data/search. - - To programmatically retrieve data from ThoughtSpot using search query - string, use this endpoint - - Args: - body (TspublicRestV2DataSearchRequest): TODO: type description - here. - - Returns: - object: Response from the API. - - Raises: - APIException: When an error occurs while fetching the data from - the remote API. This exception includes the HTTP Response - code, an error message, and the HTTP body that was received in - the request. - - """ - - return super().new_api_call_builder.request( - RequestBuilder().server(Server.DEFAULT) - .path('/tspublic/rest/v2/data/search') - .http_method(HttpMethodEnum.POST) - .header_param(Parameter() - .key('Content-Type') - .value('application/json')) - .body_param(Parameter() - .value(body) - .is_required(True)) - .header_param(Parameter() - .key('accept') - .value('application/json')) - .body_serializer(APIHelper.json_serialize) - .auth(Single('global')) - ).response( - ResponseHandler() - .deserializer(APIHelper.json_deserialize) - .local_error('500', 'Operation failed', ErrorResponseException) - ).execute() - - def restapi_v_2__liveboard_data(self, - body): - """Does a POST request to /tspublic/rest/v2/data/liveboard. - - To retrieve data related to a Liveboard or visualization from the - ThoughtSpot system, you can use this endpoint - - Args: - body (TspublicRestV2DataLiveboardRequest): TODO: type description - here. - - Returns: - object: Response from the API. - - Raises: - APIException: When an error occurs while fetching the data from - the remote API. This exception includes the HTTP Response - code, an error message, and the HTTP body that was received in - the request. - - """ - - return super().new_api_call_builder.request( - RequestBuilder().server(Server.DEFAULT) - .path('/tspublic/rest/v2/data/liveboard') - .http_method(HttpMethodEnum.POST) - .header_param(Parameter() - .key('Content-Type') - .value('application/json')) - .body_param(Parameter() - .value(body) - .is_required(True)) - .header_param(Parameter() - .key('accept') - .value('application/json')) - .body_serializer(APIHelper.json_serialize) - .auth(Single('global')) - ).response( - ResponseHandler() - .deserializer(APIHelper.json_deserialize) - .local_error('500', 'Operation failed', ErrorResponseException) - ).execute() - - def restapi_v_2__answer_data(self, - body): - """Does a POST request to /tspublic/rest/v2/data/answer. - - To retrieve data related to a Answer from the ThoughtSpot system, you - can use this endpoint - - Args: - body (TspublicRestV2DataAnswerRequest): TODO: type description - here. - - Returns: - object: Response from the API. - - Raises: - APIException: When an error occurs while fetching the data from - the remote API. This exception includes the HTTP Response - code, an error message, and the HTTP body that was received in - the request. - - """ - - return super().new_api_call_builder.request( - RequestBuilder().server(Server.DEFAULT) - .path('/tspublic/rest/v2/data/answer') - .http_method(HttpMethodEnum.POST) - .header_param(Parameter() - .key('Content-Type') - .value('application/json')) - .body_param(Parameter() - .value(body) - .is_required(True)) - .header_param(Parameter() - .key('accept') - .value('application/json')) - .body_serializer(APIHelper.json_serialize) - .auth(Single('global')) - ).response( - ResponseHandler() - .deserializer(APIHelper.json_deserialize) - .local_error('500', 'Operation failed', ErrorResponseException) - ).execute() - - def restapi_v_2__answer_query_sql(self, - id): - """Does a GET request to /tspublic/rest/v2/data/answer/querysql. - - To retrieve the query SQL related to an Answer that is run on the data - platform, you can use this endpoint - - Args: - id (string): The GUID of the Answer - - Returns: - AnswerQueryResponse: Response from the API. - - Raises: - APIException: When an error occurs while fetching the data from - the remote API. This exception includes the HTTP Response - code, an error message, and the HTTP body that was received in - the request. - - """ - - return super().new_api_call_builder.request( - RequestBuilder().server(Server.DEFAULT) - .path('/tspublic/rest/v2/data/answer/querysql') - .http_method(HttpMethodEnum.GET) - .query_param(Parameter() - .key('id') - .value(id) - .is_required(True)) - .header_param(Parameter() - .key('accept') - .value('application/json')) - .auth(Single('global')) - ).response( - ResponseHandler() - .deserializer(APIHelper.json_deserialize) - .deserialize_into(AnswerQueryResponse.from_dictionary) - .local_error('500', 'Operation failed', ErrorResponseException) - ).execute() - - def restapi_v_2__liveboard_query_sql(self, - id, - viz_id=None): - """Does a GET request to /tspublic/rest/v2/data/liveboard/querysql. - - To retrieve the query SQL related to a Visualization in a Liveboard - that is run on the data platform, you can use this endpoint - - Args: - id (string): The GUID of the Answer - viz_id (list of string, optional): A JSON array of GUIDs of the - visualizations in the Liveboard. - - Returns: - LiveboardQueryResponse: Response from the API. - - Raises: - APIException: When an error occurs while fetching the data from - the remote API. This exception includes the HTTP Response - code, an error message, and the HTTP body that was received in - the request. - - """ - - return super().new_api_call_builder.request( - RequestBuilder().server(Server.DEFAULT) - .path('/tspublic/rest/v2/data/liveboard/querysql') - .http_method(HttpMethodEnum.GET) - .query_param(Parameter() - .key('id') - .value(id) - .is_required(True)) - .query_param(Parameter() - .key('vizId') - .value(viz_id)) - .header_param(Parameter() - .key('accept') - .value('application/json')) - .array_serialization_format(SerializationFormats.PLAIN) - .auth(Single('global')) - ).response( - ResponseHandler() - .deserializer(APIHelper.json_deserialize) - .deserialize_into(LiveboardQueryResponse.from_dictionary) - .local_error('500', 'Operation failed', ErrorResponseException) - ).execute() diff --git a/Python/thoughtspotpublicrestapi/controllers/database_controller.py b/Python/thoughtspotpublicrestapi/controllers/database_controller.py deleted file mode 100644 index ad9662353..000000000 --- a/Python/thoughtspotpublicrestapi/controllers/database_controller.py +++ /dev/null @@ -1,249 +0,0 @@ -# -*- coding: utf-8 -*- - -""" -thoughtspotpublicrestapi - -This file was automatically generated by APIMATIC v3.0 ( - https://www.apimatic.io ). -""" - -from thoughtspotpublicrestapi.api_helper import APIHelper -from thoughtspotpublicrestapi.configuration import Server -from thoughtspotpublicrestapi.controllers.base_controller import BaseController -from apimatic_core.request_builder import RequestBuilder -from apimatic_core.response_handler import ResponseHandler -from apimatic_core.types.parameter import Parameter -from thoughtspotpublicrestapi.http.http_method_enum import HttpMethodEnum -from apimatic_core.authentication.multiple.single_auth import Single -from apimatic_core.authentication.multiple.and_auth_group import And -from apimatic_core.authentication.multiple.or_auth_group import Or -from thoughtspotpublicrestapi.models.create_table_response import CreateTableResponse -from thoughtspotpublicrestapi.exceptions.error_response_exception import ErrorResponseException - - -class DatabaseController(BaseController): - - """A Controller to access Endpoints in the thoughtspotpublicrestapi API.""" - def __init__(self, config): - super(DatabaseController, self).__init__(config) - - def restapi_v_2__get_schemas(self, - database): - """Does a GET request to /tspublic/rest/v2/database/schema. - - To list all the schemas in a database in Falcon, use this endpoint. - - Args: - database (string): Name of the Falcon database - - Returns: - list of string: Response from the API. - - Raises: - APIException: When an error occurs while fetching the data from - the remote API. This exception includes the HTTP Response - code, an error message, and the HTTP body that was received in - the request. - - """ - - return super().new_api_call_builder.request( - RequestBuilder().server(Server.DEFAULT) - .path('/tspublic/rest/v2/database/schema') - .http_method(HttpMethodEnum.GET) - .query_param(Parameter() - .key('database') - .value(database) - .is_required(True)) - .header_param(Parameter() - .key('accept') - .value('application/json')) - .auth(Single('global')) - ).response( - ResponseHandler() - .deserializer(APIHelper.json_deserialize) - .local_error('500', 'Operation failed', ErrorResponseException) - ).execute() - - def restapi_v_2__get_tables(self, - database, - schema): - """Does a GET request to /tspublic/rest/v2/database/table. - - To list all the tables in a schema of a database in Falcon, use this - endpoint. - - Args: - database (string): Name of the Falcon database - schema (string): Name of the schema in Falcon database - - Returns: - list of string: Response from the API. - - Raises: - APIException: When an error occurs while fetching the data from - the remote API. This exception includes the HTTP Response - code, an error message, and the HTTP body that was received in - the request. - - """ - - return super().new_api_call_builder.request( - RequestBuilder().server(Server.DEFAULT) - .path('/tspublic/rest/v2/database/table') - .http_method(HttpMethodEnum.GET) - .query_param(Parameter() - .key('database') - .value(database) - .is_required(True)) - .query_param(Parameter() - .key('schema') - .value(schema) - .is_required(True)) - .header_param(Parameter() - .key('accept') - .value('application/json')) - .auth(Single('global')) - ).response( - ResponseHandler() - .deserializer(APIHelper.json_deserialize) - .local_error('500', 'Operation failed', ErrorResponseException) - ).execute() - - def restapi_v_2__get_table_details(self, - database, - table, - schema=None): - """Does a GET request to /tspublic/rest/v2/database/table/detail. - - Note: This endpoint is applicable only for on-prem deployments. - To provide details of a table in a schema of a database in Falcon, use - this endpoint. - - Args: - database (string): Name of the Falcon database - table (string): Name of the table in Falcon database - schema (string, optional): Name of the schema in Falcon database - - Returns: - object: Response from the API. - - Raises: - APIException: When an error occurs while fetching the data from - the remote API. This exception includes the HTTP Response - code, an error message, and the HTTP body that was received in - the request. - - """ - - return super().new_api_call_builder.request( - RequestBuilder().server(Server.DEFAULT) - .path('/tspublic/rest/v2/database/table/detail') - .http_method(HttpMethodEnum.GET) - .query_param(Parameter() - .key('database') - .value(database) - .is_required(True)) - .query_param(Parameter() - .key('table') - .value(table) - .is_required(True)) - .query_param(Parameter() - .key('schema') - .value(schema)) - .header_param(Parameter() - .key('accept') - .value('application/json')) - .auth(Single('global')) - ).response( - ResponseHandler() - .deserializer(APIHelper.json_deserialize) - .local_error('500', 'Operation failed', ErrorResponseException) - ).execute() - - def restapi_v_2__create_table(self, - body): - """Does a POST request to /tspublic/rest/v2/database/table/create. - - To create a table in Falcon, use this endpoint. - - Args: - body (TspublicRestV2DatabaseTableCreateRequest): TODO: type - description here. - - Returns: - CreateTableResponse: Response from the API. - - Raises: - APIException: When an error occurs while fetching the data from - the remote API. This exception includes the HTTP Response - code, an error message, and the HTTP body that was received in - the request. - - """ - - return super().new_api_call_builder.request( - RequestBuilder().server(Server.DEFAULT) - .path('/tspublic/rest/v2/database/table/create') - .http_method(HttpMethodEnum.POST) - .header_param(Parameter() - .key('Content-Type') - .value('application/json')) - .body_param(Parameter() - .value(body) - .is_required(True)) - .header_param(Parameter() - .key('accept') - .value('application/json')) - .body_serializer(APIHelper.json_serialize) - .auth(Single('global')) - ).response( - ResponseHandler() - .deserializer(APIHelper.json_deserialize) - .deserialize_into(CreateTableResponse.from_dictionary) - .local_error('500', 'Operation failed', ErrorResponseException) - ).execute() - - def restapi_v_2__run_query(self, - body): - """Does a POST request to /tspublic/rest/v2/database/table/runquery. - - To run a TQL statement in Falcon, use this endpoint. You can run only - following type of statements - Table DDL alter and Table rows update - and delete. - - Args: - body (TspublicRestV2DatabaseTableRunqueryRequest): TODO: type - description here. - - Returns: - list of object: Response from the API. - - Raises: - APIException: When an error occurs while fetching the data from - the remote API. This exception includes the HTTP Response - code, an error message, and the HTTP body that was received in - the request. - - """ - - return super().new_api_call_builder.request( - RequestBuilder().server(Server.DEFAULT) - .path('/tspublic/rest/v2/database/table/runquery') - .http_method(HttpMethodEnum.POST) - .header_param(Parameter() - .key('Content-Type') - .value('application/json')) - .body_param(Parameter() - .value(body) - .is_required(True)) - .header_param(Parameter() - .key('accept') - .value('application/json')) - .body_serializer(APIHelper.json_serialize) - .auth(Single('global')) - ).response( - ResponseHandler() - .deserializer(APIHelper.json_deserialize) - .local_error('500', 'Operation failed', ErrorResponseException) - ).execute() diff --git a/Python/thoughtspotpublicrestapi/controllers/group_controller.py b/Python/thoughtspotpublicrestapi/controllers/group_controller.py deleted file mode 100644 index 733ae495e..000000000 --- a/Python/thoughtspotpublicrestapi/controllers/group_controller.py +++ /dev/null @@ -1,508 +0,0 @@ -# -*- coding: utf-8 -*- - -""" -thoughtspotpublicrestapi - -This file was automatically generated by APIMATIC v3.0 ( - https://www.apimatic.io ). -""" - -from thoughtspotpublicrestapi.api_helper import APIHelper -from thoughtspotpublicrestapi.configuration import Server -from thoughtspotpublicrestapi.controllers.base_controller import BaseController -from apimatic_core.request_builder import RequestBuilder -from apimatic_core.response_handler import ResponseHandler -from apimatic_core.types.parameter import Parameter -from thoughtspotpublicrestapi.http.http_method_enum import HttpMethodEnum -from apimatic_core.authentication.multiple.single_auth import Single -from apimatic_core.authentication.multiple.and_auth_group import And -from apimatic_core.authentication.multiple.or_auth_group import Or -from thoughtspotpublicrestapi.models.group_response import GroupResponse -from thoughtspotpublicrestapi.exceptions.error_response_exception import ErrorResponseException - - -class GroupController(BaseController): - - """A Controller to access Endpoints in the thoughtspotpublicrestapi API.""" - def __init__(self, config): - super(GroupController, self).__init__(config) - - def restapi_v_2__get_group(self, - name=None, - id=None): - """Does a GET request to /tspublic/rest/v2/group. - - To get the details of a specific group by name or id, use this - endpoint. - At Least one value needed. When both are given id will be considered - to fetch user information. - - Args: - name (string, optional): Name of the group - id (string, optional): The GUID of the group to query. - - Returns: - GroupResponse: Response from the API. - - Raises: - APIException: When an error occurs while fetching the data from - the remote API. This exception includes the HTTP Response - code, an error message, and the HTTP body that was received in - the request. - - """ - - return super().new_api_call_builder.request( - RequestBuilder().server(Server.DEFAULT) - .path('/tspublic/rest/v2/group') - .http_method(HttpMethodEnum.GET) - .query_param(Parameter() - .key('name') - .value(name)) - .query_param(Parameter() - .key('id') - .value(id)) - .header_param(Parameter() - .key('accept') - .value('application/json')) - .auth(Single('global')) - ).response( - ResponseHandler() - .deserializer(APIHelper.json_deserialize) - .deserialize_into(GroupResponse.from_dictionary) - .local_error('500', 'Operation failed', ErrorResponseException) - ).execute() - - def restapi_v_2__create_group(self, - body): - """Does a POST request to /tspublic/rest/v2/group/create. - - To programmatically create a group in the ThoughtSpot system, use this - API endpoint. Using this API, you can create a group and assign - privileges and users. For ease of user management and access control, - ThoughtSpot administrators can create groups and assign privileges to - these groups. The privileges determine the actions that the users - belonging to a group are allowed to do. ThoughtSpot also has a default - group called ALL_GROUP. When you create new group in ThoughtSpot, they - are automatically added to ALL_GROUP. You cannot delete the ALL_GROUP - or remove members from it. - - Args: - body (TspublicRestV2GroupCreateRequest): TODO: type description - here. - - Returns: - GroupResponse: Response from the API. - - Raises: - APIException: When an error occurs while fetching the data from - the remote API. This exception includes the HTTP Response - code, an error message, and the HTTP body that was received in - the request. - - """ - - return super().new_api_call_builder.request( - RequestBuilder().server(Server.DEFAULT) - .path('/tspublic/rest/v2/group/create') - .http_method(HttpMethodEnum.POST) - .header_param(Parameter() - .key('Content-Type') - .value('application/json')) - .body_param(Parameter() - .value(body) - .is_required(True)) - .header_param(Parameter() - .key('accept') - .value('application/json')) - .body_serializer(APIHelper.json_serialize) - .auth(Single('global')) - ).response( - ResponseHandler() - .deserializer(APIHelper.json_deserialize) - .deserialize_into(GroupResponse.from_dictionary) - .local_error('500', 'Operation failed', ErrorResponseException) - ).execute() - - def restapi_v_2__update_group(self, - body): - """Does a PUT request to /tspublic/rest/v2/group/update. - - You can use this endpoint to programmatically modify an existing user - account. - To modify a user, you require admin user privileges. - At least one of User Id or username is mandatory. When both are given, - then user id will be considered and username will be updated - - Args: - body (TspublicRestV2GroupUpdateRequest): TODO: type description - here. - - Returns: - bool: Response from the API. - - Raises: - APIException: When an error occurs while fetching the data from - the remote API. This exception includes the HTTP Response - code, an error message, and the HTTP body that was received in - the request. - - """ - - return super().new_api_call_builder.request( - RequestBuilder().server(Server.DEFAULT) - .path('/tspublic/rest/v2/group/update') - .http_method(HttpMethodEnum.PUT) - .header_param(Parameter() - .key('Content-Type') - .value('application/json')) - .body_param(Parameter() - .value(body) - .is_required(True)) - .body_serializer(APIHelper.json_serialize) - .auth(Single('global')) - ).response( - ResponseHandler() - .deserializer(APIHelper.json_deserialize) - .local_error('500', 'Operation failed', ErrorResponseException) - ).execute() - - def restapi_v_2__delete_group(self, - name=None, - id=None): - """Does a DELETE request to /tspublic/rest/v2/group/delete. - - To remove a group from the ThoughtSpot system, send a DELETE request - to this endpoint. At Least one value needed. When both are given user - id will be considered to fetch user information. - - Args: - name (string, optional): Name of the group. - id (string, optional): The GUID of the group - - Returns: - bool: Response from the API. - - Raises: - APIException: When an error occurs while fetching the data from - the remote API. This exception includes the HTTP Response - code, an error message, and the HTTP body that was received in - the request. - - """ - - return super().new_api_call_builder.request( - RequestBuilder().server(Server.DEFAULT) - .path('/tspublic/rest/v2/group/delete') - .http_method(HttpMethodEnum.DELETE) - .query_param(Parameter() - .key('name') - .value(name)) - .query_param(Parameter() - .key('id') - .value(id)) - .auth(Single('global')) - ).response( - ResponseHandler() - .deserializer(APIHelper.json_deserialize) - .local_error('500', 'Operation failed', ErrorResponseException) - ).execute() - - def restapi_v_2__add_privileges_to_group(self, - body): - """Does a PUT request to /tspublic/rest/v2/group/addprivilege. - - To programmatically add privileges to an existing group, use API - endpoint. - When you assign privileges to a group, all the users under to this - group inherits the privileges assigned to that group. - At least one of id or name of group is required. When both are given - user id will be considered. - - Args: - body (TspublicRestV2GroupAddprivilegeRequest): TODO: type - description here. - - Returns: - bool: Response from the API. - - Raises: - APIException: When an error occurs while fetching the data from - the remote API. This exception includes the HTTP Response - code, an error message, and the HTTP body that was received in - the request. - - """ - - return super().new_api_call_builder.request( - RequestBuilder().server(Server.DEFAULT) - .path('/tspublic/rest/v2/group/addprivilege') - .http_method(HttpMethodEnum.PUT) - .header_param(Parameter() - .key('Content-Type') - .value('application/json')) - .body_param(Parameter() - .value(body) - .is_required(True)) - .body_serializer(APIHelper.json_serialize) - .auth(Single('global')) - ).response( - ResponseHandler() - .deserializer(APIHelper.json_deserialize) - .local_error('500', 'Operation failed', ErrorResponseException) - ).execute() - - def restapi_v_2__remove_privileges_from_group(self, - body): - """Does a PUT request to /tspublic/rest/v2/group/removeprivilege. - - To programmatically remove privileges from a group, use API endpoint. - The API removes only the privilege association. It does not delete the - privilege or group from the Thoughtspot system. At least one of id or - name of group is required. When both are given user id will be - considered. - - Args: - body (TspublicRestV2GroupRemoveprivilegeRequest): TODO: type - description here. - - Returns: - bool: Response from the API. - - Raises: - APIException: When an error occurs while fetching the data from - the remote API. This exception includes the HTTP Response - code, an error message, and the HTTP body that was received in - the request. - - """ - - return super().new_api_call_builder.request( - RequestBuilder().server(Server.DEFAULT) - .path('/tspublic/rest/v2/group/removeprivilege') - .http_method(HttpMethodEnum.PUT) - .header_param(Parameter() - .key('Content-Type') - .value('application/json')) - .body_param(Parameter() - .value(body) - .is_required(True)) - .body_serializer(APIHelper.json_serialize) - .auth(Single('global')) - ).response( - ResponseHandler() - .deserializer(APIHelper.json_deserialize) - .local_error('500', 'Operation failed', ErrorResponseException) - ).execute() - - def restapi_v_2__add_users_to_group(self, - body): - """Does a PUT request to /tspublic/rest/v2/group/adduser. - - To programmatically add existing ThoughtSpot users to a group, use - this API endpoint. When you assign users to a group, the users - inherits the privileges assigned to that group. At least one of id or - name of the group is required. When both are given user id will be - considered. - - Args: - body (TspublicRestV2GroupAdduserRequest): TODO: type description - here. - - Returns: - bool: Response from the API. - - Raises: - APIException: When an error occurs while fetching the data from - the remote API. This exception includes the HTTP Response - code, an error message, and the HTTP body that was received in - the request. - - """ - - return super().new_api_call_builder.request( - RequestBuilder().server(Server.DEFAULT) - .path('/tspublic/rest/v2/group/adduser') - .http_method(HttpMethodEnum.PUT) - .header_param(Parameter() - .key('Content-Type') - .value('application/json')) - .body_param(Parameter() - .value(body) - .is_required(True)) - .body_serializer(APIHelper.json_serialize) - .auth(Single('global')) - ).response( - ResponseHandler() - .deserializer(APIHelper.json_deserialize) - .local_error('500', 'Operation failed', ErrorResponseException) - ).execute() - - def restapi_v_2__remove_users_from_group(self, - body): - """Does a PUT request to /tspublic/rest/v2/group/removeuser. - - To programmatically remove users from a group, use API endpoint.The - API removes only the user association. It does not delete the users or - group from the Thoughtspot system. At least one of id or name of group - is required. When both are given user id will be considered. - - Args: - body (TspublicRestV2GroupRemoveuserRequest): TODO: type - description here. - - Returns: - bool: Response from the API. - - Raises: - APIException: When an error occurs while fetching the data from - the remote API. This exception includes the HTTP Response - code, an error message, and the HTTP body that was received in - the request. - - """ - - return super().new_api_call_builder.request( - RequestBuilder().server(Server.DEFAULT) - .path('/tspublic/rest/v2/group/removeuser') - .http_method(HttpMethodEnum.PUT) - .header_param(Parameter() - .key('Content-Type') - .value('application/json')) - .body_param(Parameter() - .value(body) - .is_required(True)) - .body_serializer(APIHelper.json_serialize) - .auth(Single('global')) - ).response( - ResponseHandler() - .deserializer(APIHelper.json_deserialize) - .local_error('500', 'Operation failed', ErrorResponseException) - ).execute() - - def restapi_v_2__add_groups_to_group(self, - body): - """Does a PUT request to /tspublic/rest/v2/group/addgroup. - - To programmatically add existing groups to a group, use API endpoint. - When you assign groups to a group, the group inherits the privileges - assigned to those groups. At least one of id or name of group is - required. When both are given user id will be considered. - - Args: - body (TspublicRestV2GroupAddgroupRequest): TODO: type description - here. - - Returns: - bool: Response from the API. - - Raises: - APIException: When an error occurs while fetching the data from - the remote API. This exception includes the HTTP Response - code, an error message, and the HTTP body that was received in - the request. - - """ - - return super().new_api_call_builder.request( - RequestBuilder().server(Server.DEFAULT) - .path('/tspublic/rest/v2/group/addgroup') - .http_method(HttpMethodEnum.PUT) - .header_param(Parameter() - .key('Content-Type') - .value('application/json')) - .body_param(Parameter() - .value(body) - .is_required(True)) - .body_serializer(APIHelper.json_serialize) - .auth(Single('global')) - ).response( - ResponseHandler() - .deserializer(APIHelper.json_deserialize) - .local_error('500', 'Operation failed', ErrorResponseException) - ).execute() - - def restapi_v_2__remove_groups_from_group(self, - body): - """Does a PUT request to /tspublic/rest/v2/group/removegroup. - - To programmatically remove groups from a group, use API endpoint.The - API removes only the group association. It does not delete the group - from the Thoughtspot system. At least one of id or name of group is - required. When both are given user id will be considered. - - Args: - body (TspublicRestV2GroupRemovegroupRequest): TODO: type - description here. - - Returns: - bool: Response from the API. - - Raises: - APIException: When an error occurs while fetching the data from - the remote API. This exception includes the HTTP Response - code, an error message, and the HTTP body that was received in - the request. - - """ - - return super().new_api_call_builder.request( - RequestBuilder().server(Server.DEFAULT) - .path('/tspublic/rest/v2/group/removegroup') - .http_method(HttpMethodEnum.PUT) - .header_param(Parameter() - .key('Content-Type') - .value('application/json')) - .body_param(Parameter() - .value(body) - .is_required(True)) - .body_serializer(APIHelper.json_serialize) - .auth(Single('global')) - ).response( - ResponseHandler() - .deserializer(APIHelper.json_deserialize) - .local_error('500', 'Operation failed', ErrorResponseException) - ).execute() - - def restapi_v_2__search_groups(self, - body): - """Does a POST request to /tspublic/rest/v2/group/search. - - To get the details of a specific group account or all groups in the - ThoughtSpot system, use this end point. - - Args: - body (TspublicRestV2GroupSearchRequest): TODO: type description - here. - - Returns: - object: Response from the API. - - Raises: - APIException: When an error occurs while fetching the data from - the remote API. This exception includes the HTTP Response - code, an error message, and the HTTP body that was received in - the request. - - """ - - return super().new_api_call_builder.request( - RequestBuilder().server(Server.DEFAULT) - .path('/tspublic/rest/v2/group/search') - .http_method(HttpMethodEnum.POST) - .header_param(Parameter() - .key('Content-Type') - .value('application/json')) - .body_param(Parameter() - .value(body) - .is_required(True)) - .header_param(Parameter() - .key('accept') - .value('application/json')) - .body_serializer(APIHelper.json_serialize) - .auth(Single('global')) - ).response( - ResponseHandler() - .deserializer(APIHelper.json_deserialize) - .local_error('500', 'Operation failed', ErrorResponseException) - ).execute() diff --git a/Python/thoughtspotpublicrestapi/controllers/logs_controller.py b/Python/thoughtspotpublicrestapi/controllers/logs_controller.py deleted file mode 100644 index 6a564565b..000000000 --- a/Python/thoughtspotpublicrestapi/controllers/logs_controller.py +++ /dev/null @@ -1,91 +0,0 @@ -# -*- coding: utf-8 -*- - -""" -thoughtspotpublicrestapi - -This file was automatically generated by APIMATIC v3.0 ( - https://www.apimatic.io ). -""" - -from thoughtspotpublicrestapi.api_helper import APIHelper -from thoughtspotpublicrestapi.configuration import Server -from thoughtspotpublicrestapi.controllers.base_controller import BaseController -from apimatic_core.request_builder import RequestBuilder -from apimatic_core.response_handler import ResponseHandler -from apimatic_core.types.parameter import Parameter -from thoughtspotpublicrestapi.http.http_method_enum import HttpMethodEnum -from apimatic_core.authentication.multiple.single_auth import Single -from apimatic_core.authentication.multiple.and_auth_group import And -from apimatic_core.authentication.multiple.or_auth_group import Or -from thoughtspotpublicrestapi.models.logs_response import LogsResponse -from thoughtspotpublicrestapi.exceptions.error_response_exception import ErrorResponseException - - -class LogsController(BaseController): - - """A Controller to access Endpoints in the thoughtspotpublicrestapi API.""" - def __init__(self, config): - super(LogsController, self).__init__(config) - - def restapi_v_2__get_log_events(self, - topic, - from_epoch=None, - to_epoch=None): - """Does a GET request to /tspublic/rest/v2/logs/events. - - Note: This endpoint is applicable only for SAAS deployments. - The ThoughtSpot log streaming service API allows you to - programmatically get a security audit event log from the ThoughtSpot - system. - To use this API, make sure you have admin user privileges. - ThoughtSpot cloud deployments allow you to collect security audit - events and send them to your Security information and event management - (SIEM) application in real-time. - These events can help your security operations personnel to detect - potential security threats or compromised user accounts in your - organization. - - Args: - topic (TopicEnum): Type of the log - from_epoch (string, optional): The EPOCH time in milliseconds to - set the start time for streaming logs. Example: To set the - timestamp as June 1, 2021 8 am, specify 1622534400000. - to_epoch (string, optional): The EPOCH time in milliseconds to set - the end time for streaming logs. Example: To set the - timestamp as July 1, 2021, 8 am, specify 1625126400000. - - Returns: - LogsResponse: Response from the API. - - Raises: - APIException: When an error occurs while fetching the data from - the remote API. This exception includes the HTTP Response - code, an error message, and the HTTP body that was received in - the request. - - """ - - return super().new_api_call_builder.request( - RequestBuilder().server(Server.DEFAULT) - .path('/tspublic/rest/v2/logs/events') - .http_method(HttpMethodEnum.GET) - .query_param(Parameter() - .key('topic') - .value(topic) - .is_required(True)) - .query_param(Parameter() - .key('fromEpoch') - .value(from_epoch)) - .query_param(Parameter() - .key('toEpoch') - .value(to_epoch)) - .header_param(Parameter() - .key('accept') - .value('application/json')) - .auth(Single('global')) - ).response( - ResponseHandler() - .deserializer(APIHelper.json_deserialize) - .deserialize_into(LogsResponse.from_dictionary) - .local_error('500', 'Operation failed', ErrorResponseException) - ).execute() diff --git a/Python/thoughtspotpublicrestapi/controllers/materialization_controller.py b/Python/thoughtspotpublicrestapi/controllers/materialization_controller.py deleted file mode 100644 index 81392fd25..000000000 --- a/Python/thoughtspotpublicrestapi/controllers/materialization_controller.py +++ /dev/null @@ -1,70 +0,0 @@ -# -*- coding: utf-8 -*- - -""" -thoughtspotpublicrestapi - -This file was automatically generated by APIMATIC v3.0 ( - https://www.apimatic.io ). -""" - -from thoughtspotpublicrestapi.api_helper import APIHelper -from thoughtspotpublicrestapi.configuration import Server -from thoughtspotpublicrestapi.controllers.base_controller import BaseController -from apimatic_core.request_builder import RequestBuilder -from apimatic_core.response_handler import ResponseHandler -from apimatic_core.types.parameter import Parameter -from thoughtspotpublicrestapi.http.http_method_enum import HttpMethodEnum -from apimatic_core.authentication.multiple.single_auth import Single -from apimatic_core.authentication.multiple.and_auth_group import And -from apimatic_core.authentication.multiple.or_auth_group import Or -from thoughtspotpublicrestapi.exceptions.error_response_exception import ErrorResponseException - - -class MaterializationController(BaseController): - - """A Controller to access Endpoints in the thoughtspotpublicrestapi API.""" - def __init__(self, config): - super(MaterializationController, self).__init__(config) - - def restapi_v_2__refresh_materialized_view(self, - body): - """Does a PUT request to /tspublic/rest/v2/materialization/refreshview. - - Use this endpoint to refresh data in the materialized view by running - the query associated with it - - Args: - body (TspublicRestV2MaterializationRefreshviewRequest): TODO: type - description here. - - Returns: - object: Response from the API. - - Raises: - APIException: When an error occurs while fetching the data from - the remote API. This exception includes the HTTP Response - code, an error message, and the HTTP body that was received in - the request. - - """ - - return super().new_api_call_builder.request( - RequestBuilder().server(Server.DEFAULT) - .path('/tspublic/rest/v2/materialization/refreshview') - .http_method(HttpMethodEnum.PUT) - .header_param(Parameter() - .key('Content-Type') - .value('application/json')) - .body_param(Parameter() - .value(body) - .is_required(True)) - .header_param(Parameter() - .key('accept') - .value('application/json')) - .body_serializer(APIHelper.json_serialize) - .auth(Single('global')) - ).response( - ResponseHandler() - .deserializer(APIHelper.json_deserialize) - .local_error('500', 'Operation failed', ErrorResponseException) - ).execute() diff --git a/Python/thoughtspotpublicrestapi/controllers/metadata_controller.py b/Python/thoughtspotpublicrestapi/controllers/metadata_controller.py deleted file mode 100644 index e9d0e6078..000000000 --- a/Python/thoughtspotpublicrestapi/controllers/metadata_controller.py +++ /dev/null @@ -1,899 +0,0 @@ -# -*- coding: utf-8 -*- - -""" -thoughtspotpublicrestapi - -This file was automatically generated by APIMATIC v3.0 ( - https://www.apimatic.io ). -""" - -from thoughtspotpublicrestapi.api_helper import APIHelper -from thoughtspotpublicrestapi.configuration import Server -from thoughtspotpublicrestapi.controllers.base_controller import BaseController -from apimatic_core.request_builder import RequestBuilder -from apimatic_core.response_handler import ResponseHandler -from apimatic_core.types.parameter import Parameter -from thoughtspotpublicrestapi.http.http_method_enum import HttpMethodEnum -from apimatic_core.types.array_serialization_format import SerializationFormats -from apimatic_core.authentication.multiple.single_auth import Single -from apimatic_core.authentication.multiple.and_auth_group import And -from apimatic_core.authentication.multiple.or_auth_group import Or -from thoughtspotpublicrestapi.models.metadata_tag_response import MetadataTagResponse -from thoughtspotpublicrestapi.models.home_liveboard_response import HomeLiveboardResponse -from thoughtspotpublicrestapi.exceptions.error_response_exception import ErrorResponseException - - -class MetadataController(BaseController): - - """A Controller to access Endpoints in the thoughtspotpublicrestapi API.""" - def __init__(self, config): - super(MetadataController, self).__init__(config) - - def restapi_v_2__get_tag(self, - name=None, - id=None): - """Does a GET request to /tspublic/rest/v2/metadata/tag. - - To get details of a specific tag, use this endpoint. At least one of - id or name of tag is required. When both are given, then id will be - considered. - - Args: - name (string, optional): Name of the tag - id (string, optional): The GUID of the tag - - Returns: - MetadataTagResponse: Response from the API. - - Raises: - APIException: When an error occurs while fetching the data from - the remote API. This exception includes the HTTP Response - code, an error message, and the HTTP body that was received in - the request. - - """ - - return super().new_api_call_builder.request( - RequestBuilder().server(Server.DEFAULT) - .path('/tspublic/rest/v2/metadata/tag') - .http_method(HttpMethodEnum.GET) - .query_param(Parameter() - .key('name') - .value(name)) - .query_param(Parameter() - .key('id') - .value(id)) - .header_param(Parameter() - .key('accept') - .value('application/json')) - .auth(Single('global')) - ).response( - ResponseHandler() - .deserializer(APIHelper.json_deserialize) - .deserialize_into(MetadataTagResponse.from_dictionary) - .local_error('500', 'Operation failed', ErrorResponseException) - ).execute() - - def restapi_v_2__get_home_liveboard(self, - user_name=None, - user_id=None): - """Does a GET request to /tspublic/rest/v2/metadata/homeliveboard. - - To get the name and id of liveboard that is set as a home liveboard - for a user, use this endpoint. At least one of user id or username is - required. When both are given, then id will be considered. - - Args: - user_name (string, optional): Name of the tag - user_id (string, optional): The GUID of the tag - - Returns: - HomeLiveboardResponse: Response from the API. - - Raises: - APIException: When an error occurs while fetching the data from - the remote API. This exception includes the HTTP Response - code, an error message, and the HTTP body that was received in - the request. - - """ - - return super().new_api_call_builder.request( - RequestBuilder().server(Server.DEFAULT) - .path('/tspublic/rest/v2/metadata/homeliveboard') - .http_method(HttpMethodEnum.GET) - .query_param(Parameter() - .key('userName') - .value(user_name)) - .query_param(Parameter() - .key('userId') - .value(user_id)) - .header_param(Parameter() - .key('accept') - .value('application/json')) - .auth(Single('global')) - ).response( - ResponseHandler() - .deserializer(APIHelper.json_deserialize) - .deserialize_into(HomeLiveboardResponse.from_dictionary) - .local_error('500', 'Operation failed', ErrorResponseException) - ).execute() - - def restapi_v_2__search_object_header(self, - body): - """Does a POST request to /tspublic/rest/v2/metadata/header/search. - - To get header details for metadata objects, use this endpoint. You can - provide as input selective fields to get the data for. - - Args: - body (TspublicRestV2MetadataHeaderSearchRequest): TODO: type - description here. - - Returns: - object: Response from the API. - - Raises: - APIException: When an error occurs while fetching the data from - the remote API. This exception includes the HTTP Response - code, an error message, and the HTTP body that was received in - the request. - - """ - - return super().new_api_call_builder.request( - RequestBuilder().server(Server.DEFAULT) - .path('/tspublic/rest/v2/metadata/header/search') - .http_method(HttpMethodEnum.POST) - .header_param(Parameter() - .key('Content-Type') - .value('application/json')) - .body_param(Parameter() - .value(body) - .is_required(True)) - .header_param(Parameter() - .key('accept') - .value('application/json')) - .body_serializer(APIHelper.json_serialize) - .auth(Single('global')) - ).response( - ResponseHandler() - .deserializer(APIHelper.json_deserialize) - .local_error('500', 'Operation failed', ErrorResponseException) - ).execute() - - def restapi_v_2__get_object_visualization_header(self, - id): - """Does a GET request to /tspublic/rest/v2/metadata/vizheader. - - Use this endpoint to get header details of visualization charts for a - given liveboard or answer. At least one of id or name of liveboard or - answer is required. When both are given, then id will be considered. - - Args: - id (string): The GUID of the liveboard or answer - - Returns: - list of object: Response from the API. - - Raises: - APIException: When an error occurs while fetching the data from - the remote API. This exception includes the HTTP Response - code, an error message, and the HTTP body that was received in - the request. - - """ - - return super().new_api_call_builder.request( - RequestBuilder().server(Server.DEFAULT) - .path('/tspublic/rest/v2/metadata/vizheader') - .http_method(HttpMethodEnum.GET) - .query_param(Parameter() - .key('id') - .value(id) - .is_required(True)) - .header_param(Parameter() - .key('accept') - .value('application/json')) - .auth(Single('global')) - ).response( - ResponseHandler() - .deserializer(APIHelper.json_deserialize) - .local_error('500', 'Operation failed', ErrorResponseException) - ).execute() - - def restapi_v_2__get_object_detail(self, - mtype, - id): - """Does a GET request to /tspublic/rest/v2/metadata/detail. - - Use this endpoint to get full details of metadata objects - - Args: - mtype (Type4Enum): Type of the metadata object being searched. - id (list of string): A JSON array of GUIDs of the objects. - - Returns: - object: Response from the API. - - Raises: - APIException: When an error occurs while fetching the data from - the remote API. This exception includes the HTTP Response - code, an error message, and the HTTP body that was received in - the request. - - """ - - return super().new_api_call_builder.request( - RequestBuilder().server(Server.DEFAULT) - .path('/tspublic/rest/v2/metadata/detail') - .http_method(HttpMethodEnum.GET) - .query_param(Parameter() - .key('type') - .value(mtype) - .is_required(True)) - .query_param(Parameter() - .key('id') - .value(id) - .is_required(True)) - .header_param(Parameter() - .key('accept') - .value('application/json')) - .array_serialization_format(SerializationFormats.PLAIN) - .auth(Single('global')) - ).response( - ResponseHandler() - .deserializer(APIHelper.json_deserialize) - .local_error('500', 'Operation failed', ErrorResponseException) - ).execute() - - def restapi_v_2__get_object_header(self, - mtype, - id, - output_fields=None): - """Does a GET request to /tspublic/rest/v2/metadata/header. - - To get header detail of a metadata object, use this endpoint. You can - provide as input selective fields to get the data for. - - Args: - mtype (Type5Enum): Type of the metadata object being searched. - id (string): GUID of the metadata object - output_fields (list of string, optional): Array of header field - names that need to be included in the header response - - Returns: - object: Response from the API. - - Raises: - APIException: When an error occurs while fetching the data from - the remote API. This exception includes the HTTP Response - code, an error message, and the HTTP body that was received in - the request. - - """ - - return super().new_api_call_builder.request( - RequestBuilder().server(Server.DEFAULT) - .path('/tspublic/rest/v2/metadata/header') - .http_method(HttpMethodEnum.GET) - .query_param(Parameter() - .key('type') - .value(mtype) - .is_required(True)) - .query_param(Parameter() - .key('id') - .value(id) - .is_required(True)) - .query_param(Parameter() - .key('outputFields') - .value(output_fields)) - .header_param(Parameter() - .key('accept') - .value('application/json')) - .array_serialization_format(SerializationFormats.PLAIN) - .auth(Single('global')) - ).response( - ResponseHandler() - .deserializer(APIHelper.json_deserialize) - .local_error('500', 'Operation failed', ErrorResponseException) - ).execute() - - def restapi_v_2__search_object_detail(self, - body): - """Does a POST request to /tspublic/rest/v2/metadata/detail/search. - - Use this endpoint to get full details of metadata objects - - Args: - body (TspublicRestV2MetadataDetailSearchRequest): TODO: type - description here. - - Returns: - object: Response from the API. - - Raises: - APIException: When an error occurs while fetching the data from - the remote API. This exception includes the HTTP Response - code, an error message, and the HTTP body that was received in - the request. - - """ - - return super().new_api_call_builder.request( - RequestBuilder().server(Server.DEFAULT) - .path('/tspublic/rest/v2/metadata/detail/search') - .http_method(HttpMethodEnum.POST) - .header_param(Parameter() - .key('Content-Type') - .value('application/json')) - .body_param(Parameter() - .value(body) - .is_required(True)) - .header_param(Parameter() - .key('accept') - .value('application/json')) - .body_serializer(APIHelper.json_serialize) - .auth(Single('global')) - ).response( - ResponseHandler() - .deserializer(APIHelper.json_deserialize) - .local_error('500', 'Operation failed', ErrorResponseException) - ).execute() - - def restapi_v_2__create_tag(self, - body): - """Does a POST request to /tspublic/rest/v2/metadata/tag/create. - - To programmatically create tags, use this endpoint - - Args: - body (TspublicRestV2MetadataTagCreateRequest): TODO: type - description here. - - Returns: - MetadataTagResponse: Response from the API. - - Raises: - APIException: When an error occurs while fetching the data from - the remote API. This exception includes the HTTP Response - code, an error message, and the HTTP body that was received in - the request. - - """ - - return super().new_api_call_builder.request( - RequestBuilder().server(Server.DEFAULT) - .path('/tspublic/rest/v2/metadata/tag/create') - .http_method(HttpMethodEnum.POST) - .header_param(Parameter() - .key('Content-Type') - .value('application/json')) - .body_param(Parameter() - .value(body) - .is_required(True)) - .header_param(Parameter() - .key('accept') - .value('application/json')) - .body_serializer(APIHelper.json_serialize) - .auth(Single('global')) - ).response( - ResponseHandler() - .deserializer(APIHelper.json_deserialize) - .deserialize_into(MetadataTagResponse.from_dictionary) - .local_error('500', 'Operation failed', ErrorResponseException) - ).execute() - - def restapi_v_2__update_tag(self, - body): - """Does a PUT request to /tspublic/rest/v2/metadata/tag/update. - - To programmatically update tags, use this endpoint. At least one of id - or name of tag is required. When both are given, then id will be - considered. - - Args: - body (TspublicRestV2MetadataTagUpdateRequest): TODO: type - description here. - - Returns: - bool: Response from the API. - - Raises: - APIException: When an error occurs while fetching the data from - the remote API. This exception includes the HTTP Response - code, an error message, and the HTTP body that was received in - the request. - - """ - - return super().new_api_call_builder.request( - RequestBuilder().server(Server.DEFAULT) - .path('/tspublic/rest/v2/metadata/tag/update') - .http_method(HttpMethodEnum.PUT) - .header_param(Parameter() - .key('Content-Type') - .value('application/json')) - .body_param(Parameter() - .value(body) - .is_required(True)) - .body_serializer(APIHelper.json_serialize) - .auth(Single('global')) - ).response( - ResponseHandler() - .deserializer(APIHelper.json_deserialize) - .local_error('500', 'Operation failed', ErrorResponseException) - ).execute() - - def restapi_v_2__delete_tag(self, - name=None, - id=None): - """Does a DELETE request to /tspublic/rest/v2/metadata/tag/delete. - - To programmatically delete tags, use this endpoint. At least one of id - or name of tag is required. When both are given, then id will be - considered. - - Args: - name (string, optional): Name of the tag - id (string, optional): The GUID of the tag - - Returns: - bool: Response from the API. - - Raises: - APIException: When an error occurs while fetching the data from - the remote API. This exception includes the HTTP Response - code, an error message, and the HTTP body that was received in - the request. - - """ - - return super().new_api_call_builder.request( - RequestBuilder().server(Server.DEFAULT) - .path('/tspublic/rest/v2/metadata/tag/delete') - .http_method(HttpMethodEnum.DELETE) - .query_param(Parameter() - .key('name') - .value(name)) - .query_param(Parameter() - .key('id') - .value(id)) - .auth(Single('global')) - ).response( - ResponseHandler() - .deserializer(APIHelper.json_deserialize) - .local_error('500', 'Operation failed', ErrorResponseException) - ).execute() - - def restapi_v_2__assign_tag(self, - body): - """Does a PUT request to /tspublic/rest/v2/metadata/tag/assign. - - To programmatically assign tags to a metadata object, such as a - liveboard, search answer, table, worksheet, or view, use this - endpoint. At least one of id or name of tag is required. When both - are given, then id will be considered. - - Args: - body (TspublicRestV2MetadataTagAssignRequest): TODO: type - description here. - - Returns: - bool: Response from the API. - - Raises: - APIException: When an error occurs while fetching the data from - the remote API. This exception includes the HTTP Response - code, an error message, and the HTTP body that was received in - the request. - - """ - - return super().new_api_call_builder.request( - RequestBuilder().server(Server.DEFAULT) - .path('/tspublic/rest/v2/metadata/tag/assign') - .http_method(HttpMethodEnum.PUT) - .header_param(Parameter() - .key('Content-Type') - .value('application/json')) - .body_param(Parameter() - .value(body) - .is_required(True)) - .body_serializer(APIHelper.json_serialize) - .auth(Single('global')) - ).response( - ResponseHandler() - .deserializer(APIHelper.json_deserialize) - .local_error('500', 'Operation failed', ErrorResponseException) - ).execute() - - def restapi_v_2__unassign_tag(self, - body): - """Does a PUT request to /tspublic/rest/v2/metadata/tag/unassign. - - To programmatically unassign tags to a metadata object, such as a - liveboard, search answer, table, worksheet, or view, use this - endpoint. At least one of id or name of tag is required. When both are - given, then id will be considered. - - Args: - body (TspublicRestV2MetadataTagUnassignRequest): TODO: type - description here. - - Returns: - bool: Response from the API. - - Raises: - APIException: When an error occurs while fetching the data from - the remote API. This exception includes the HTTP Response - code, an error message, and the HTTP body that was received in - the request. - - """ - - return super().new_api_call_builder.request( - RequestBuilder().server(Server.DEFAULT) - .path('/tspublic/rest/v2/metadata/tag/unassign') - .http_method(HttpMethodEnum.PUT) - .header_param(Parameter() - .key('Content-Type') - .value('application/json')) - .body_param(Parameter() - .value(body) - .is_required(True)) - .body_serializer(APIHelper.json_serialize) - .auth(Single('global')) - ).response( - ResponseHandler() - .deserializer(APIHelper.json_deserialize) - .local_error('500', 'Operation failed', ErrorResponseException) - ).execute() - - def restapi_v_2__assign_favorite(self, - body): - """Does a PUT request to /tspublic/rest/v2/metadata/favorite/assign. - - To programmatically assign objects to favorites for a given user - account, use this endpoint. At least one of user id or username is - required. When both are given, then id will be considered. - - Args: - body (TspublicRestV2MetadataFavoriteAssignRequest): TODO: type - description here. - - Returns: - bool: Response from the API. - - Raises: - APIException: When an error occurs while fetching the data from - the remote API. This exception includes the HTTP Response - code, an error message, and the HTTP body that was received in - the request. - - """ - - return super().new_api_call_builder.request( - RequestBuilder().server(Server.DEFAULT) - .path('/tspublic/rest/v2/metadata/favorite/assign') - .http_method(HttpMethodEnum.PUT) - .header_param(Parameter() - .key('Content-Type') - .value('application/json')) - .body_param(Parameter() - .value(body) - .is_required(True)) - .body_serializer(APIHelper.json_serialize) - .auth(Single('global')) - ).response( - ResponseHandler() - .deserializer(APIHelper.json_deserialize) - .local_error('500', 'Operation failed', ErrorResponseException) - ).execute() - - def restapi_v_2__unassign_favorite(self, - body): - """Does a PUT request to /tspublic/rest/v2/metadata/favorite/unassign. - - To programmatically unassign objects to favorites for a given user - account, use this endpoint. At least one of user id or username is - required. When both are given, then id will be considered. - - Args: - body (TspublicRestV2MetadataFavoriteUnassignRequest): TODO: type - description here. - - Returns: - bool: Response from the API. - - Raises: - APIException: When an error occurs while fetching the data from - the remote API. This exception includes the HTTP Response - code, an error message, and the HTTP body that was received in - the request. - - """ - - return super().new_api_call_builder.request( - RequestBuilder().server(Server.DEFAULT) - .path('/tspublic/rest/v2/metadata/favorite/unassign') - .http_method(HttpMethodEnum.PUT) - .header_param(Parameter() - .key('Content-Type') - .value('application/json')) - .body_param(Parameter() - .value(body) - .is_required(True)) - .body_serializer(APIHelper.json_serialize) - .auth(Single('global')) - ).response( - ResponseHandler() - .deserializer(APIHelper.json_deserialize) - .local_error('500', 'Operation failed', ErrorResponseException) - ).execute() - - def restapi_v_2__assign_home_liveboard(self, - body): - """Does a PUT request to /tspublic/rest/v2/metadata/homeliveboard/assign. - - To assign a specific liveboard as a home liveboard for a user, use - this endpoint. At least one of user id or username is required. When - both are given, then id will be considered. - - Args: - body (TspublicRestV2MetadataHomeliveboardAssignRequest): TODO: - type description here. - - Returns: - bool: Response from the API. - - Raises: - APIException: When an error occurs while fetching the data from - the remote API. This exception includes the HTTP Response - code, an error message, and the HTTP body that was received in - the request. - - """ - - return super().new_api_call_builder.request( - RequestBuilder().server(Server.DEFAULT) - .path('/tspublic/rest/v2/metadata/homeliveboard/assign') - .http_method(HttpMethodEnum.PUT) - .header_param(Parameter() - .key('Content-Type') - .value('application/json')) - .body_param(Parameter() - .value(body) - .is_required(True)) - .body_serializer(APIHelper.json_serialize) - .auth(Single('global')) - ).response( - ResponseHandler() - .deserializer(APIHelper.json_deserialize) - .local_error('500', 'Operation failed', ErrorResponseException) - ).execute() - - def restapi_v_2__unassign_home_liveboard(self, - body): - """Does a PUT request to /tspublic/rest/v2/metadata/homeliveboard/unassign. - - To unassign the home liveboard set for a user, use this endpoint. At - least one of user id or username is required. When both are given, - then id will be considered. - - Args: - body (TspublicRestV2MetadataHomeliveboardUnassignRequest): TODO: - type description here. - - Returns: - bool: Response from the API. - - Raises: - APIException: When an error occurs while fetching the data from - the remote API. This exception includes the HTTP Response - code, an error message, and the HTTP body that was received in - the request. - - """ - - return super().new_api_call_builder.request( - RequestBuilder().server(Server.DEFAULT) - .path('/tspublic/rest/v2/metadata/homeliveboard/unassign') - .http_method(HttpMethodEnum.PUT) - .header_param(Parameter() - .key('Content-Type') - .value('application/json')) - .body_param(Parameter() - .value(body) - .is_required(True)) - .body_serializer(APIHelper.json_serialize) - .auth(Single('global')) - ).response( - ResponseHandler() - .deserializer(APIHelper.json_deserialize) - .local_error('500', 'Operation failed', ErrorResponseException) - ).execute() - - def restapi_v_2__export_object_tml(self, - body): - """Does a POST request to /tspublic/rest/v2/metadata/tml/export. - - To export ThoughtSpot objects represented in ThoughtSpot Modeling - Language (TML), use this endpoint - - Args: - body (TspublicRestV2MetadataTmlExportRequest): TODO: type - description here. - - Returns: - object: Response from the API. - - Raises: - APIException: When an error occurs while fetching the data from - the remote API. This exception includes the HTTP Response - code, an error message, and the HTTP body that was received in - the request. - - """ - - return super().new_api_call_builder.request( - RequestBuilder().server(Server.DEFAULT) - .path('/tspublic/rest/v2/metadata/tml/export') - .http_method(HttpMethodEnum.POST) - .header_param(Parameter() - .key('Content-Type') - .value('application/json')) - .body_param(Parameter() - .value(body) - .is_required(True)) - .header_param(Parameter() - .key('accept') - .value('application/json')) - .body_serializer(APIHelper.json_serialize) - .auth(Single('global')) - ).response( - ResponseHandler() - .deserializer(APIHelper.json_deserialize) - .local_error('500', 'Operation failed', ErrorResponseException) - ).execute() - - def restapi_v_2__import_object_tml(self, - body): - """Does a POST request to /tspublic/rest/v2/metadata/tml/import. - - To import ThoughtSpot objects represented in ThoughtSpot Modeling - Language (TML), use this endpoint - - Args: - body (TspublicRestV2MetadataTmlImportRequest): TODO: type - description here. - - Returns: - object: Response from the API. - - Raises: - APIException: When an error occurs while fetching the data from - the remote API. This exception includes the HTTP Response - code, an error message, and the HTTP body that was received in - the request. - - """ - - return super().new_api_call_builder.request( - RequestBuilder().server(Server.DEFAULT) - .path('/tspublic/rest/v2/metadata/tml/import') - .http_method(HttpMethodEnum.POST) - .header_param(Parameter() - .key('Content-Type') - .value('application/json')) - .body_param(Parameter() - .value(body) - .is_required(True)) - .header_param(Parameter() - .key('accept') - .value('application/json')) - .body_serializer(APIHelper.json_serialize) - .auth(Single('global')) - ).response( - ResponseHandler() - .deserializer(APIHelper.json_deserialize) - .local_error('500', 'Operation failed', ErrorResponseException) - ).execute() - - def restapi_v_2__delete_object(self, - mtype, - id): - """Does a DELETE request to /tspublic/rest/v2/metadata/delete. - - Use this endpoint to delete the metadata objects - - Args: - mtype (Type4Enum): Type of the metadata object being searched - id (list of string): A JSON array of GUIDs of the objects - - Returns: - bool: Response from the API. - - Raises: - APIException: When an error occurs while fetching the data from - the remote API. This exception includes the HTTP Response - code, an error message, and the HTTP body that was received in - the request. - - """ - - return super().new_api_call_builder.request( - RequestBuilder().server(Server.DEFAULT) - .path('/tspublic/rest/v2/metadata/delete') - .http_method(HttpMethodEnum.DELETE) - .query_param(Parameter() - .key('type') - .value(mtype) - .is_required(True)) - .query_param(Parameter() - .key('id') - .value(id) - .is_required(True)) - .array_serialization_format(SerializationFormats.PLAIN) - .auth(Single('global')) - ).response( - ResponseHandler() - .deserializer(APIHelper.json_deserialize) - .local_error('500', 'Operation failed', ErrorResponseException) - ).execute() - - def restapi_v_2__get_object_dependency(self, - body): - """Does a POST request to /tspublic/rest/v2/metadata/dependency. - - To query the details of dependent objects and associate objects as - dependents, you can use this API. Dependency is defined as relation - between referenced and referencing objects. A referencing object is - said to have a dependency on a referenced object, if the referenced - object cannot be deleted without first deleting the referencing - object. For example, consider a worksheet 'W1' that has a derived - logical column 'C1' that has a reference to a base logical column - 'C2'. This can be shown diagramatically as: W1-->C1-->C2. W1 has a - dependency on C2 i.e. W1 is a referencing object and C2 is a - referenced object. It is not possible to delete C2 without first - deleting W1 because deletion of C2 will be prevented by the - relationship between W1's column C1 and C2. Similarly C1 is said to - have a dependency on C2 i.e. C1 is a referencing object and C2 is a - referenced object. It is not possible to delete C2 without first - deleting C1 - - Args: - body (TspublicRestV2MetadataDependencyRequest): TODO: type - description here. - - Returns: - object: Response from the API. - - Raises: - APIException: When an error occurs while fetching the data from - the remote API. This exception includes the HTTP Response - code, an error message, and the HTTP body that was received in - the request. - - """ - - return super().new_api_call_builder.request( - RequestBuilder().server(Server.DEFAULT) - .path('/tspublic/rest/v2/metadata/dependency') - .http_method(HttpMethodEnum.POST) - .header_param(Parameter() - .key('Content-Type') - .value('application/json')) - .body_param(Parameter() - .value(body) - .is_required(True)) - .header_param(Parameter() - .key('accept') - .value('application/json')) - .body_serializer(APIHelper.json_serialize) - .auth(Single('global')) - ).response( - ResponseHandler() - .deserializer(APIHelper.json_deserialize) - .local_error('500', 'Operation failed', ErrorResponseException) - ).execute() diff --git a/Python/thoughtspotpublicrestapi/controllers/org_controller.py b/Python/thoughtspotpublicrestapi/controllers/org_controller.py deleted file mode 100644 index 0d489e1a6..000000000 --- a/Python/thoughtspotpublicrestapi/controllers/org_controller.py +++ /dev/null @@ -1,257 +0,0 @@ -# -*- coding: utf-8 -*- - -""" -thoughtspotpublicrestapi - -This file was automatically generated by APIMATIC v3.0 ( - https://www.apimatic.io ). -""" - -from thoughtspotpublicrestapi.api_helper import APIHelper -from thoughtspotpublicrestapi.configuration import Server -from thoughtspotpublicrestapi.controllers.base_controller import BaseController -from apimatic_core.request_builder import RequestBuilder -from apimatic_core.response_handler import ResponseHandler -from apimatic_core.types.parameter import Parameter -from thoughtspotpublicrestapi.http.http_method_enum import HttpMethodEnum -from apimatic_core.authentication.multiple.single_auth import Single -from apimatic_core.authentication.multiple.and_auth_group import And -from apimatic_core.authentication.multiple.or_auth_group import Or -from thoughtspotpublicrestapi.models.orgs_response import OrgsResponse -from thoughtspotpublicrestapi.exceptions.error_response_exception import ErrorResponseException - - -class OrgController(BaseController): - - """A Controller to access Endpoints in the thoughtspotpublicrestapi API.""" - def __init__(self, config): - super(OrgController, self).__init__(config) - - def restapi_v_2__get_org(self, - name=None, - id=None): - """Does a GET request to /tspublic/rest/v2/org. - - To get the details of a specific organization by name or id, use this - endpoint. - At least one value needed. When both are given,then id will be - considered to fetch organization information. - Requires Administration privilege for tenant. - - Args: - name (string, optional): Name of the organization. - id (int, optional): The ID of the organization. - - Returns: - OrgsResponse: Response from the API. - - Raises: - APIException: When an error occurs while fetching the data from - the remote API. This exception includes the HTTP Response - code, an error message, and the HTTP body that was received in - the request. - - """ - - return super().new_api_call_builder.request( - RequestBuilder().server(Server.DEFAULT) - .path('/tspublic/rest/v2/org') - .http_method(HttpMethodEnum.GET) - .query_param(Parameter() - .key('name') - .value(name)) - .query_param(Parameter() - .key('id') - .value(id)) - .header_param(Parameter() - .key('accept') - .value('application/json')) - .auth(Single('global')) - ).response( - ResponseHandler() - .deserializer(APIHelper.json_deserialize) - .deserialize_into(OrgsResponse.from_dictionary) - .local_error('500', 'Operation failed', ErrorResponseException) - ).execute() - - def restapi_v_2__create_org(self, - body): - """Does a POST request to /tspublic/rest/v2/org/create. - - To programmatically create an organization in the ThoughtSpot system, - use this API endpoint. - Requires Administration privilege for tenant. - - Args: - body (TspublicRestV2OrgCreateRequest): TODO: type description - here. - - Returns: - OrgsResponse: Response from the API. - - Raises: - APIException: When an error occurs while fetching the data from - the remote API. This exception includes the HTTP Response - code, an error message, and the HTTP body that was received in - the request. - - """ - - return super().new_api_call_builder.request( - RequestBuilder().server(Server.DEFAULT) - .path('/tspublic/rest/v2/org/create') - .http_method(HttpMethodEnum.POST) - .header_param(Parameter() - .key('Content-Type') - .value('application/json')) - .body_param(Parameter() - .value(body) - .is_required(True)) - .header_param(Parameter() - .key('accept') - .value('application/json')) - .body_serializer(APIHelper.json_serialize) - .auth(Single('global')) - ).response( - ResponseHandler() - .deserializer(APIHelper.json_deserialize) - .deserialize_into(OrgsResponse.from_dictionary) - .local_error('500', 'Operation failed', ErrorResponseException) - ).execute() - - def restapi_v_2__update_org(self, - body): - """Does a PUT request to /tspublic/rest/v2/org/update. - - You can use this endpoint to programmatically modify an existing org. - Provide name or id of the organization to update the properties. When - both id and name are given, then id will be considered and name of the - organization will be updated. - Requires Administration privilege for tenant. - - Args: - body (TspublicRestV2OrgUpdateRequest): TODO: type description - here. - - Returns: - OrgsResponse: Response from the API. - - Raises: - APIException: When an error occurs while fetching the data from - the remote API. This exception includes the HTTP Response - code, an error message, and the HTTP body that was received in - the request. - - """ - - return super().new_api_call_builder.request( - RequestBuilder().server(Server.DEFAULT) - .path('/tspublic/rest/v2/org/update') - .http_method(HttpMethodEnum.PUT) - .header_param(Parameter() - .key('Content-Type') - .value('application/json')) - .body_param(Parameter() - .value(body) - .is_required(True)) - .header_param(Parameter() - .key('accept') - .value('application/json')) - .body_serializer(APIHelper.json_serialize) - .auth(Single('global')) - ).response( - ResponseHandler() - .deserializer(APIHelper.json_deserialize) - .deserialize_into(OrgsResponse.from_dictionary) - .local_error('500', 'Operation failed', ErrorResponseException) - ).execute() - - def restapi_v_2__delete_org(self, - name=None, - id=None): - """Does a DELETE request to /tspublic/rest/v2/org/delete. - - To remove an organization from the ThoughtSpot system, send a DELETE - request to this endpoint. - At least one value is needed. When both id and name are given, then id - will be considered. - Requires Administration privilege for tenant. - - Args: - name (string, optional): Name of the organization. - id (int, optional): The ID of the organization. - - Returns: - bool: Response from the API. - - Raises: - APIException: When an error occurs while fetching the data from - the remote API. This exception includes the HTTP Response - code, an error message, and the HTTP body that was received in - the request. - - """ - - return super().new_api_call_builder.request( - RequestBuilder().server(Server.DEFAULT) - .path('/tspublic/rest/v2/org/delete') - .http_method(HttpMethodEnum.DELETE) - .query_param(Parameter() - .key('name') - .value(name)) - .query_param(Parameter() - .key('id') - .value(id)) - .auth(Single('global')) - ).response( - ResponseHandler() - .deserializer(APIHelper.json_deserialize) - .local_error('500', 'Operation failed', ErrorResponseException) - ).execute() - - def restapi_v_2__search_orgs(self, - body): - """Does a POST request to /tspublic/rest/v2/org/search. - - To get the details of a specific organization or all organizations in - the ThoughtSpot system use this end point. - If no input is provided, then all organizations are included in the - response. - Requires Administration privilege for tenant. - - Args: - body (TspublicRestV2OrgSearchRequest): TODO: type description - here. - - Returns: - list of OrgsResponse: Response from the API. - - Raises: - APIException: When an error occurs while fetching the data from - the remote API. This exception includes the HTTP Response - code, an error message, and the HTTP body that was received in - the request. - - """ - - return super().new_api_call_builder.request( - RequestBuilder().server(Server.DEFAULT) - .path('/tspublic/rest/v2/org/search') - .http_method(HttpMethodEnum.POST) - .header_param(Parameter() - .key('Content-Type') - .value('application/json')) - .body_param(Parameter() - .value(body) - .is_required(True)) - .header_param(Parameter() - .key('accept') - .value('application/json')) - .body_serializer(APIHelper.json_serialize) - .auth(Single('global')) - ).response( - ResponseHandler() - .deserializer(APIHelper.json_deserialize) - .deserialize_into(OrgsResponse.from_dictionary) - .local_error('500', 'Operation failed', ErrorResponseException) - ).execute() diff --git a/Python/thoughtspotpublicrestapi/controllers/report_controller.py b/Python/thoughtspotpublicrestapi/controllers/report_controller.py deleted file mode 100644 index bf76192e0..000000000 --- a/Python/thoughtspotpublicrestapi/controllers/report_controller.py +++ /dev/null @@ -1,173 +0,0 @@ -# -*- coding: utf-8 -*- - -""" -thoughtspotpublicrestapi - -This file was automatically generated by APIMATIC v3.0 ( - https://www.apimatic.io ). -""" - -from thoughtspotpublicrestapi.api_helper import APIHelper -from thoughtspotpublicrestapi.configuration import Server -from thoughtspotpublicrestapi.controllers.base_controller import BaseController -from apimatic_core.request_builder import RequestBuilder -from apimatic_core.response_handler import ResponseHandler -from apimatic_core.types.parameter import Parameter -from thoughtspotpublicrestapi.http.http_method_enum import HttpMethodEnum -from apimatic_core.types.array_serialization_format import SerializationFormats -from apimatic_core.authentication.multiple.single_auth import Single -from apimatic_core.authentication.multiple.and_auth_group import And -from apimatic_core.authentication.multiple.or_auth_group import Or -from thoughtspotpublicrestapi.exceptions.error_response_exception import ErrorResponseException - - -class ReportController(BaseController): - - """A Controller to access Endpoints in the thoughtspotpublicrestapi API.""" - def __init__(self, config): - super(ReportController, self).__init__(config) - - def restapi_v_2__answer_report(self, - id, - mtype): - """Does a GET request to /tspublic/rest/v2/report/answer. - - To programmatically download Answer data as a file, use this endpoint. - The PDF will download data in the tabular format even if Answer is - saved as chart. - - Args: - id (string): GUID of the Answer to download. - mtype (Type16Enum): Type of file to be generated. - - Returns: - object: Response from the API. - - Raises: - APIException: When an error occurs while fetching the data from - the remote API. This exception includes the HTTP Response - code, an error message, and the HTTP body that was received in - the request. - - """ - - return super().new_api_call_builder.request( - RequestBuilder().server(Server.DEFAULT) - .path('/tspublic/rest/v2/report/answer') - .http_method(HttpMethodEnum.GET) - .query_param(Parameter() - .key('id') - .value(id) - .is_required(True)) - .query_param(Parameter() - .key('type') - .value(mtype) - .is_required(True)) - .header_param(Parameter() - .key('accept') - .value('application/json')) - .auth(Single('global')) - ).response( - ResponseHandler() - .deserializer(APIHelper.json_deserialize) - .local_error('500', 'Operation failed', ErrorResponseException) - ).execute() - - def restapi_v_2__liveboard_report(self, - mtype, - id=None, - viz_id=None, - transient_content=None, - runtime_filter=None, - runtime_sort=None, - pdf_options=None): - """Does a GET request to /tspublic/rest/v2/report/liveboard. - - To programmatically download Liveboard data or specific Visualization - data from Liveboard as a file, use this endpoint - - Args: - mtype (Type16Enum): Type of file to be generated. Valid values: - CSV/XLSX/PDF/PNG. - id (string, optional): GUID of the Liveboard to download. This - field is considered only when no input is provided for - transientContent field. - viz_id (list of string, optional): JSON Array of GUIDs of the - visualizations in the Liveboard to be included in the - downloaded file. For CSV, XLSX and PNG file download, - visualization id is mandatory. CSV and XLSX is valid only for - visualization of type table and PNG is valid for charts. - Only one value will be accepted for these formats. If multiple - values are provided then first value in the array will be - considered. - transient_content (string, optional): If you have embedded - ThoughtSpot in your host application, and you want to download - Liveboards with unsaved changes as a file, pass the transient - content from the browser fetch request, using the - getExportRequestForCurrentPinboard method. For more - information, see - https://developers.thoughtspot.com/docs/?pageid=liveboard-expor - t-api#transient-pinboard. - runtime_filter (string, optional): If you have embedded - ThoughtSpot in your host application, and you want to download - Liveboards with unsaved changes as a file, pass the transient - content from the browser fetch request, using the - getExportRequestForCurrentPinboard method. For more - information, see - https://developers.thoughtspot.com/docs/?pageid=liveboard-expor - t-api#transient-pinboard . - runtime_sort (string, optional): JSON object which provides - columns to sort the data at the time of data retrieval. - Example: {"sortCol1":"region","asc1":true,"sortCol2":"date"} - For more information, see - https://developers.thoughtspot.com/docs/?pageid=runtime-filters - pdf_options (PdfOptionsInput, optional): Additional options that - are applicable for PDF type. - - Returns: - object: Response from the API. - - Raises: - APIException: When an error occurs while fetching the data from - the remote API. This exception includes the HTTP Response - code, an error message, and the HTTP body that was received in - the request. - - """ - - return super().new_api_call_builder.request( - RequestBuilder().server(Server.DEFAULT) - .path('/tspublic/rest/v2/report/liveboard') - .http_method(HttpMethodEnum.GET) - .query_param(Parameter() - .key('type') - .value(mtype) - .is_required(True)) - .query_param(Parameter() - .key('id') - .value(id)) - .query_param(Parameter() - .key('vizId') - .value(viz_id)) - .query_param(Parameter() - .key('transientContent') - .value(transient_content)) - .query_param(Parameter() - .key('runtimeFilter') - .value(runtime_filter)) - .query_param(Parameter() - .key('runtimeSort') - .value(runtime_sort)) - .query_param(Parameter() - .key('pdfOptions') - .value(pdf_options)) - .header_param(Parameter() - .key('accept') - .value('application/json')) - .array_serialization_format(SerializationFormats.PLAIN) - .auth(Single('global')) - ).response( - ResponseHandler() - .deserializer(APIHelper.json_deserialize) - .local_error('500', 'Operation failed', ErrorResponseException) - ).execute() diff --git a/Python/thoughtspotpublicrestapi/controllers/security_controller.py b/Python/thoughtspotpublicrestapi/controllers/security_controller.py deleted file mode 100644 index d5926d3bc..000000000 --- a/Python/thoughtspotpublicrestapi/controllers/security_controller.py +++ /dev/null @@ -1,326 +0,0 @@ -# -*- coding: utf-8 -*- - -""" -thoughtspotpublicrestapi - -This file was automatically generated by APIMATIC v3.0 ( - https://www.apimatic.io ). -""" - -from thoughtspotpublicrestapi.api_helper import APIHelper -from thoughtspotpublicrestapi.configuration import Server -from thoughtspotpublicrestapi.controllers.base_controller import BaseController -from apimatic_core.request_builder import RequestBuilder -from apimatic_core.response_handler import ResponseHandler -from apimatic_core.types.parameter import Parameter -from thoughtspotpublicrestapi.http.http_method_enum import HttpMethodEnum -from apimatic_core.authentication.multiple.single_auth import Single -from apimatic_core.authentication.multiple.and_auth_group import And -from apimatic_core.authentication.multiple.or_auth_group import Or -from thoughtspotpublicrestapi.models.security_permission_response import SecurityPermissionResponse -from thoughtspotpublicrestapi.models.principal_search_response import PrincipalSearchResponse -from thoughtspotpublicrestapi.exceptions.error_response_exception import ErrorResponseException - - -class SecurityController(BaseController): - - """A Controller to access Endpoints in the thoughtspotpublicrestapi API.""" - def __init__(self, config): - super(SecurityController, self).__init__(config) - - def restapi_v_2__get_permission_on_object(self, - id, - mtype, - include_dependent=None): - """Does a GET request to /tspublic/rest/v2/security/permission/tsobject. - - To list the permissions for user and user groups on an object, use - this endpoint. The response will include only those users and groups - with have either VIEW OR MODIFY permission. - You can optionally see the permission on the dependent objects as well - by enabling includeDependent field. - - Args: - id (string): GUID of the metadata object for which the permission - needs to be obtained. - mtype (Type7Enum): Type of metadata object. Valid values: - Liveboard|Answer|DataObject|Column - include_dependent (bool, optional): When this field is set to - true, the API returns the permission details for the dependent - objects for the the object included in the request - - Returns: - SecurityPermissionResponse: Response from the API. - - Raises: - APIException: When an error occurs while fetching the data from - the remote API. This exception includes the HTTP Response - code, an error message, and the HTTP body that was received in - the request. - - """ - - return super().new_api_call_builder.request( - RequestBuilder().server(Server.DEFAULT) - .path('/tspublic/rest/v2/security/permission/tsobject') - .http_method(HttpMethodEnum.GET) - .query_param(Parameter() - .key('id') - .value(id) - .is_required(True)) - .query_param(Parameter() - .key('type') - .value(mtype) - .is_required(True)) - .query_param(Parameter() - .key('includeDependent') - .value(include_dependent)) - .header_param(Parameter() - .key('accept') - .value('application/json')) - .auth(Single('global')) - ).response( - ResponseHandler() - .deserializer(APIHelper.json_deserialize) - .deserialize_into(SecurityPermissionResponse.from_dictionary) - .local_error('500', 'Operation failed', ErrorResponseException) - ).execute() - - def restapi_v_2__get_permission_for_principal(self, - id=None, - name=None): - """Does a GET request to /tspublic/rest/v2/security/permission/principal. - - Use this endpoint to list the objects on which a user or user group - has permission. The response will include only those objects on which - the user or user group has either VIEW OR MODIFY permission. - Requires administration privilege - - Args: - id (string, optional): GUID of the user or user group for which - the object permission needs to be obtained - name (string, optional): Name of the ser or user group for which - the object permission needs to be obtained - - Returns: - PrincipalSearchResponse: Response from the API. - - Raises: - APIException: When an error occurs while fetching the data from - the remote API. This exception includes the HTTP Response - code, an error message, and the HTTP body that was received in - the request. - - """ - - return super().new_api_call_builder.request( - RequestBuilder().server(Server.DEFAULT) - .path('/tspublic/rest/v2/security/permission/principal') - .http_method(HttpMethodEnum.GET) - .query_param(Parameter() - .key('id') - .value(id)) - .query_param(Parameter() - .key('name') - .value(name)) - .header_param(Parameter() - .key('accept') - .value('application/json')) - .auth(Single('global')) - ).response( - ResponseHandler() - .deserializer(APIHelper.json_deserialize) - .deserialize_into(PrincipalSearchResponse.from_dictionary) - .local_error('500', 'Operation failed', ErrorResponseException) - ).execute() - - def restapi_v_2__share_object(self, - body): - """Does a POST request to /tspublic/rest/v2/security/share/tsobject. - - To programmatically share ThoughtSpot objects with another user or - user group, use this endpoint. - When you share an object like a Liveboard or visualization, a - notification with a live link is sent to the user. When the users - access this object, they can view the last saved version of the - object. - - Args: - body (TspublicRestV2SecurityShareTsobjectRequest): TODO: type - description here. - - Returns: - bool: Response from the API. - - Raises: - APIException: When an error occurs while fetching the data from - the remote API. This exception includes the HTTP Response - code, an error message, and the HTTP body that was received in - the request. - - """ - - return super().new_api_call_builder.request( - RequestBuilder().server(Server.DEFAULT) - .path('/tspublic/rest/v2/security/share/tsobject') - .http_method(HttpMethodEnum.POST) - .header_param(Parameter() - .key('Content-Type') - .value('application/json')) - .body_param(Parameter() - .value(body) - .is_required(True)) - .body_serializer(APIHelper.json_serialize) - .auth(Single('global')) - ).response( - ResponseHandler() - .deserializer(APIHelper.json_deserialize) - .local_error('500', 'Operation failed', ErrorResponseException) - ).execute() - - def restapi_v_2__share_visualization(self, - body): - """Does a POST request to /tspublic/rest/v2/security/share/visualization. - - If you want to share a specific visualization from a Liveboard with - another user or user group, then use this endpoint. - Requires privilege to share the visualization - - Args: - body (TspublicRestV2SecurityShareVisualizationRequest): TODO: type - description here. - - Returns: - bool: Response from the API. - - Raises: - APIException: When an error occurs while fetching the data from - the remote API. This exception includes the HTTP Response - code, an error message, and the HTTP body that was received in - the request. - - """ - - return super().new_api_call_builder.request( - RequestBuilder().server(Server.DEFAULT) - .path('/tspublic/rest/v2/security/share/visualization') - .http_method(HttpMethodEnum.POST) - .header_param(Parameter() - .key('Content-Type') - .value('application/json')) - .body_param(Parameter() - .value(body) - .is_required(True)) - .body_serializer(APIHelper.json_serialize) - .auth(Single('global')) - ).response( - ResponseHandler() - .deserializer(APIHelper.json_deserialize) - .local_error('500', 'Operation failed', ErrorResponseException) - ).execute() - - def restapi_v_2__search_permission_on_objects(self, - body): - """Does a POST request to /tspublic/rest/v2/security/permission/tsobject/search. - - To list the permissions for user and user groups on a list of objects, - use this endpoint. The response will include only those users and - groups with have either VIEW OR MODIFY permission. - You can either provide list of object ids or type of objects to list - the permissions for. One of these inputs is mandatory. If both are - provided then only object ids will be considred. - You can optionally provide users or user groups for which the - persmission needs to be displayed. - You can optionally see the permission on the dependent objects as well - by enabling includeDependent field. - Requires administration privilege - - Args: - body (TspublicRestV2SecurityPermissionTsobjectSearchRequest): - TODO: type description here. - - Returns: - list of SecurityPermissionResponse: Response from the API. - - Raises: - APIException: When an error occurs while fetching the data from - the remote API. This exception includes the HTTP Response - code, an error message, and the HTTP body that was received in - the request. - - """ - - return super().new_api_call_builder.request( - RequestBuilder().server(Server.DEFAULT) - .path('/tspublic/rest/v2/security/permission/tsobject/search') - .http_method(HttpMethodEnum.POST) - .header_param(Parameter() - .key('Content-Type') - .value('application/json')) - .body_param(Parameter() - .value(body) - .is_required(True)) - .header_param(Parameter() - .key('accept') - .value('application/json')) - .body_serializer(APIHelper.json_serialize) - .auth(Single('global')) - ).response( - ResponseHandler() - .deserializer(APIHelper.json_deserialize) - .deserialize_into(SecurityPermissionResponse.from_dictionary) - .local_error('500', 'Operation failed', ErrorResponseException) - ).execute() - - def restapi_v_2__search_permission_for_principals(self, - body): - """Does a POST request to /tspublic/rest/v2/security/permission/principal/search. - - To list the permissions for user and user groups on a list of objects, - use this endpoint. The response will include only those users and - groups with have either VIEW OR MODIFY permission. - You can either provide list of object ids or type of objects to list - the permissions for. One of these inputs is mandatory. If both are - provided then only object ids will be considred. - You can optionally provide users or user groups for which the - persmission needs to be displayed. - You can optionally see the permission on the dependent objects as well - by enabling includeDependent field. - Requires administration privilege - - Args: - body (TspublicRestV2SecurityPermissionPrincipalSearchRequest): - TODO: type description here. - - Returns: - list of PrincipalSearchResponse: Response from the API. - - Raises: - APIException: When an error occurs while fetching the data from - the remote API. This exception includes the HTTP Response - code, an error message, and the HTTP body that was received in - the request. - - """ - - return super().new_api_call_builder.request( - RequestBuilder().server(Server.DEFAULT) - .path('/tspublic/rest/v2/security/permission/principal/search') - .http_method(HttpMethodEnum.POST) - .header_param(Parameter() - .key('Content-Type') - .value('application/json')) - .body_param(Parameter() - .value(body) - .is_required(True)) - .header_param(Parameter() - .key('accept') - .value('application/json')) - .body_serializer(APIHelper.json_serialize) - .auth(Single('global')) - ).response( - ResponseHandler() - .deserializer(APIHelper.json_deserialize) - .deserialize_into(PrincipalSearchResponse.from_dictionary) - .local_error('500', 'Operation failed', ErrorResponseException) - ).execute() diff --git a/Python/thoughtspotpublicrestapi/controllers/session_controller.py b/Python/thoughtspotpublicrestapi/controllers/session_controller.py deleted file mode 100644 index eab1d8446..000000000 --- a/Python/thoughtspotpublicrestapi/controllers/session_controller.py +++ /dev/null @@ -1,176 +0,0 @@ -# -*- coding: utf-8 -*- - -""" -thoughtspotpublicrestapi - -This file was automatically generated by APIMATIC v3.0 ( - https://www.apimatic.io ). -""" - -from thoughtspotpublicrestapi.api_helper import APIHelper -from thoughtspotpublicrestapi.configuration import Server -from thoughtspotpublicrestapi.controllers.base_controller import BaseController -from apimatic_core.request_builder import RequestBuilder -from apimatic_core.response_handler import ResponseHandler -from apimatic_core.types.parameter import Parameter -from thoughtspotpublicrestapi.http.http_method_enum import HttpMethodEnum -from apimatic_core.authentication.multiple.single_auth import Single -from apimatic_core.authentication.multiple.and_auth_group import And -from apimatic_core.authentication.multiple.or_auth_group import Or -from thoughtspotpublicrestapi.models.session_login_response import SessionLoginResponse -from thoughtspotpublicrestapi.exceptions.error_response_exception import ErrorResponseException - - -class SessionController(BaseController): - - """A Controller to access Endpoints in the thoughtspotpublicrestapi API.""" - def __init__(self, config): - super(SessionController, self).__init__(config) - - def restapi_v_2__login(self, - user_name=None, - password=None, - remember_me=None): - """Does a GET request to /tspublic/rest/v2/session/login. - - You can programmatically create login session for a user in - ThoughtSpot using this endpoint. - You can create session by either providing userName and password as - inputs in this request body or by including "Authorization" header - with the token generated through the endpoint - /tspublic/rest/v2/session/gettoken. - userName and password input is given precedence over "Authorization" - header, when both are included in the request. - - Args: - user_name (string, optional): Username of the user account - password (string, optional): The password of the user account - remember_me (bool, optional): A flag to remember the user session. - When set to true, sets a session cookie that persists in - subsequent API calls. - - Returns: - SessionLoginResponse: Response from the API. - - Raises: - APIException: When an error occurs while fetching the data from - the remote API. This exception includes the HTTP Response - code, an error message, and the HTTP body that was received in - the request. - - """ - - return super().new_api_call_builder.request( - RequestBuilder().server(Server.DEFAULT) - .path('/tspublic/rest/v2/session/login') - .http_method(HttpMethodEnum.GET) - .query_param(Parameter() - .key('userName') - .value(user_name)) - .query_param(Parameter() - .key('password') - .value(password)) - .query_param(Parameter() - .key('rememberMe') - .value(remember_me)) - .header_param(Parameter() - .key('accept') - .value('application/json')) - .auth(Single('global')) - ).response( - ResponseHandler() - .deserializer(APIHelper.json_deserialize) - .deserialize_into(SessionLoginResponse.from_dictionary) - .local_error('500', 'Operation failed', ErrorResponseException) - ).execute() - - def restapi_v_2__get_token(self, - user_name, - password=None, - secret_key=None, - access_level=None, - ts_object_id=None, - token_expiry_duration=None, - org_id=None): - """Does a GET request to /tspublic/rest/v2/session/gettoken. - - To programmatically create session token for a user in ThoughtSpot, - use this endpoint. - You can generate the token for a user by providing password or secret - key from the cluster. - You need to enable trusted authentication to generate secret key. To - generate secret key, follow below steps. - 1. Click the Develop tab. - 2. Under Customizations, click Settings. - 3. To enable trusted authentication, turn on the toggle. - 4. A secret_key for trusted authentication is generated. - 5. Click the clipboard icon to copy the token. - - Password is given precedence over secretKey input, when both are - included in the request. - - Args: - user_name (string): Username of the user account - password (string, optional): The password of the user account - secret_key (string, optional): The secret key string provided by - the ThoughtSpot application server. ThoughtSpot generates this - secret key when you enable trusted authentication. - access_level (AccessLevelEnum, optional): User access privilege. - FULL - Creates a session with full access. REPORT_BOOK_VIEW - - Allow view access to the specified visualizations. - ts_object_id (string, optional): GUID of the ThoughtSpot object. - If you have set the accessLevel attribute to REPORT_BOOK_VIEW, - specify the GUID of the Liveboard or visualization object. - token_expiry_duration (string, optional): Duration in seconds - after which the token expires - org_id (string, optional): Id of the organization to be associated - with the user login. If no input is provided then last logged - in organization will be considered - - Returns: - SessionLoginResponse: Response from the API. - - Raises: - APIException: When an error occurs while fetching the data from - the remote API. This exception includes the HTTP Response - code, an error message, and the HTTP body that was received in - the request. - - """ - - return super().new_api_call_builder.request( - RequestBuilder().server(Server.DEFAULT) - .path('/tspublic/rest/v2/session/gettoken') - .http_method(HttpMethodEnum.GET) - .query_param(Parameter() - .key('userName') - .value(user_name) - .is_required(True)) - .query_param(Parameter() - .key('password') - .value(password)) - .query_param(Parameter() - .key('secretKey') - .value(secret_key)) - .query_param(Parameter() - .key('accessLevel') - .value(access_level)) - .query_param(Parameter() - .key('tsObjectId') - .value(ts_object_id)) - .query_param(Parameter() - .key('tokenExpiryDuration') - .value(token_expiry_duration)) - .query_param(Parameter() - .key('orgId') - .value(org_id)) - .header_param(Parameter() - .key('accept') - .value('application/json')) - .auth(Single('global')) - ).response( - ResponseHandler() - .deserializer(APIHelper.json_deserialize) - .deserialize_into(SessionLoginResponse.from_dictionary) - .local_error('500', 'Operation failed', ErrorResponseException) - ).execute() diff --git a/Python/thoughtspotpublicrestapi/controllers/user_controller.py b/Python/thoughtspotpublicrestapi/controllers/user_controller.py deleted file mode 100644 index 92e694e58..000000000 --- a/Python/thoughtspotpublicrestapi/controllers/user_controller.py +++ /dev/null @@ -1,503 +0,0 @@ -# -*- coding: utf-8 -*- - -""" -thoughtspotpublicrestapi - -This file was automatically generated by APIMATIC v3.0 ( - https://www.apimatic.io ). -""" - -from thoughtspotpublicrestapi.api_helper import APIHelper -from thoughtspotpublicrestapi.configuration import Server -from thoughtspotpublicrestapi.controllers.base_controller import BaseController -from apimatic_core.request_builder import RequestBuilder -from apimatic_core.response_handler import ResponseHandler -from apimatic_core.types.parameter import Parameter -from thoughtspotpublicrestapi.http.http_method_enum import HttpMethodEnum -from apimatic_core.types.array_serialization_format import SerializationFormats -from apimatic_core.authentication.multiple.single_auth import Single -from apimatic_core.authentication.multiple.and_auth_group import And -from apimatic_core.authentication.multiple.or_auth_group import Or -from thoughtspotpublicrestapi.models.user_response import UserResponse -from thoughtspotpublicrestapi.exceptions.error_response_exception import ErrorResponseException - - -class UserController(BaseController): - - """A Controller to access Endpoints in the thoughtspotpublicrestapi API.""" - def __init__(self, config): - super(UserController, self).__init__(config) - - def restapi_v_2__get_user(self, - name=None, - id=None): - """Does a GET request to /tspublic/rest/v2/user. - - To get the details of a specific user account by username or user id, - use this endpoint. At Least one value is needed. When both are given, - user id will be considered to fetch user information - - Args: - name (string, optional): Username of the user that you want to - query. - id (string, optional): The GUID of the user account to query - - Returns: - UserResponse: Response from the API. - - Raises: - APIException: When an error occurs while fetching the data from - the remote API. This exception includes the HTTP Response - code, an error message, and the HTTP body that was received in - the request. - - """ - - return super().new_api_call_builder.request( - RequestBuilder().server(Server.DEFAULT) - .path('/tspublic/rest/v2/user') - .http_method(HttpMethodEnum.GET) - .query_param(Parameter() - .key('name') - .value(name)) - .query_param(Parameter() - .key('id') - .value(id)) - .header_param(Parameter() - .key('accept') - .value('application/json')) - .auth(Single('global')) - ).response( - ResponseHandler() - .deserializer(APIHelper.json_deserialize) - .deserialize_into(UserResponse.from_dictionary) - .local_error('500', 'Operation failed', ErrorResponseException) - ).execute() - - def restapi_v_2__create_user(self, - name, - display_name, - password, - visibility=None, - mail=None, - org_ids=None, - groups=None, - state=None, - notify_on_share=None, - show_walk_me=None, - analyst_onboarding_complete=None, - mtype=None): - """Does a GET request to /tspublic/rest/v2/user/create. - - To programmatically create a user account in the ThoughtSpot system - use this API endpoint. Using this API, you can create a user and - assign groups. - To create a user, you require admin user privileges. - All users created in the ThoughtSpot system are added to ALL_GROUP - - Args: - name (string): Name of the user. The username string must be - unique. - display_name (string): A unique display name string for the user - account, usually their first and last name - password (string): Password for the user account. - visibility (VisibilityEnum, optional): Visibility of the user. The - visibility attribute is set to DEFAULT when creating a user. - The DEFAULT attribute makes a user visible to other users and - user groups, and this allows them to share objects - mail (string, optional): Email of the user account - org_ids (list of int, optional): Array of org identifiers. If no - value is provided then user will be created in the - organization associated with the login session. - groups (list of GroupNameAndIDInput, optional): Array of objects - of groups that the user belong to. - state (StateEnum, optional): Status of user account. acitve or - inactive. - notify_on_share (bool, optional): User preference for receiving - email notifications when another ThoughtSpot user shares - answers or pinboards. - show_walk_me (bool, optional): The user preference for revisiting - the onboarding experience. - analyst_onboarding_complete (bool, optional): ThoughtSpot provides - an interactive guided walkthrough to onboard new users. The - onboarding experience leads users through a set of actions to - help users get started and accomplish their tasks quickly. The - users can turn off the Onboarding experience and access it - again when they need assistance with the ThoughtSpot UI. - mtype (Type8Enum, optional): Type of user. LOCAL_USER indicates - that the user is created locally in the ThoughtSpot system. - - Returns: - UserResponse: Response from the API. - - Raises: - APIException: When an error occurs while fetching the data from - the remote API. This exception includes the HTTP Response - code, an error message, and the HTTP body that was received in - the request. - - """ - - return super().new_api_call_builder.request( - RequestBuilder().server(Server.DEFAULT) - .path('/tspublic/rest/v2/user/create') - .http_method(HttpMethodEnum.GET) - .query_param(Parameter() - .key('name') - .value(name) - .is_required(True)) - .query_param(Parameter() - .key('displayName') - .value(display_name) - .is_required(True)) - .query_param(Parameter() - .key('password') - .value(password) - .is_required(True)) - .query_param(Parameter() - .key('visibility') - .value(visibility)) - .query_param(Parameter() - .key('mail') - .value(mail)) - .query_param(Parameter() - .key('orgIds') - .value(org_ids)) - .query_param(Parameter() - .key('groups') - .value(groups)) - .query_param(Parameter() - .key('state') - .value(state)) - .query_param(Parameter() - .key('notifyOnShare') - .value(notify_on_share)) - .query_param(Parameter() - .key('showWalkMe') - .value(show_walk_me)) - .query_param(Parameter() - .key('analystOnboardingComplete') - .value(analyst_onboarding_complete)) - .query_param(Parameter() - .key('type') - .value(mtype)) - .header_param(Parameter() - .key('accept') - .value('application/json')) - .array_serialization_format(SerializationFormats.PLAIN) - .auth(Single('global')) - ).response( - ResponseHandler() - .deserializer(APIHelper.json_deserialize) - .deserialize_into(UserResponse.from_dictionary) - .local_error('500', 'Operation failed', ErrorResponseException) - ).execute() - - def restapi_v_2__update_user(self, - body): - """Does a PUT request to /tspublic/rest/v2/user/update. - - You can use this endpoint to programmatically modify an existing user - account. To modify a user, you require admin user privileges. - At least one of User Id or username is mandatory. When both are given, - then user id will be considered and username will be updated - - Args: - body (TspublicRestV2UserUpdateRequest): TODO: type description - here. - - Returns: - bool: Response from the API. - - Raises: - APIException: When an error occurs while fetching the data from - the remote API. This exception includes the HTTP Response - code, an error message, and the HTTP body that was received in - the request. - - """ - - return super().new_api_call_builder.request( - RequestBuilder().server(Server.DEFAULT) - .path('/tspublic/rest/v2/user/update') - .http_method(HttpMethodEnum.PUT) - .header_param(Parameter() - .key('Content-Type') - .value('application/json')) - .body_param(Parameter() - .value(body) - .is_required(True)) - .body_serializer(APIHelper.json_serialize) - .auth(Single('global')) - ).response( - ResponseHandler() - .deserializer(APIHelper.json_deserialize) - .local_error('500', 'Operation failed', ErrorResponseException) - ).execute() - - def restapi_v_2__delete_user(self, - name=None, - id=None, - org_id=None): - """Does a DELETE request to /tspublic/rest/v2/user/delete. - - To remove a user from the ThoughtSpot system, use this endpoint. - At Least one value needed. When both are given user id will be - considered to delete user. - - Args: - name (string, optional): Username of the user that you want to - query. - id (string, optional): The GUID of the user account to query - org_id (int, optional): Unique identifier of the organization from - which the user would be deleted. If no value is provided then - user will be deleted from the organization associated with the - login session. - - Returns: - bool: Response from the API. - - Raises: - APIException: When an error occurs while fetching the data from - the remote API. This exception includes the HTTP Response - code, an error message, and the HTTP body that was received in - the request. - - """ - - return super().new_api_call_builder.request( - RequestBuilder().server(Server.DEFAULT) - .path('/tspublic/rest/v2/user/delete') - .http_method(HttpMethodEnum.DELETE) - .query_param(Parameter() - .key('name') - .value(name)) - .query_param(Parameter() - .key('id') - .value(id)) - .query_param(Parameter() - .key('orgId') - .value(org_id)) - .auth(Single('global')) - ).response( - ResponseHandler() - .deserializer(APIHelper.json_deserialize) - .local_error('500', 'Operation failed', ErrorResponseException) - ).execute() - - def restapi_v_2__add_user_to_groups(self, - body): - """Does a PUT request to /tspublic/rest/v2/user/addgroup. - - To programmatically add groups to an existing ThoughtSpot user use - this endpoint. - When you assign groups to a user, the user inherits the privileges - assigned to those groups. - At least one of User Id or username is mandatory. When both are given, - then user id will be considered. - - Args: - body (TspublicRestV2UserAddgroupRequest): TODO: type description - here. - - Returns: - bool: Response from the API. - - Raises: - APIException: When an error occurs while fetching the data from - the remote API. This exception includes the HTTP Response - code, an error message, and the HTTP body that was received in - the request. - - """ - - return super().new_api_call_builder.request( - RequestBuilder().server(Server.DEFAULT) - .path('/tspublic/rest/v2/user/addgroup') - .http_method(HttpMethodEnum.PUT) - .header_param(Parameter() - .key('Content-Type') - .value('application/json')) - .body_param(Parameter() - .value(body) - .is_required(True)) - .body_serializer(APIHelper.json_serialize) - .auth(Single('global')) - ).response( - ResponseHandler() - .deserializer(APIHelper.json_deserialize) - .local_error('500', 'Operation failed', ErrorResponseException) - ).execute() - - def restapi_v_2__remove_user_from_groups(self, - body): - """Does a PUT request to /tspublic/rest/v2/user/removegroup. - - To programmatically remove groups from an existing ThoughtSpot user, - use this API endpoint. - The API removes only the user association. It does not delete the user - or group from the Thoughtspot system - At least one of User Id or username is mandatory. When both are given, - then user id will be considered. - - Args: - body (TspublicRestV2UserRemovegroupRequest): TODO: type - description here. - - Returns: - bool: Response from the API. - - Raises: - APIException: When an error occurs while fetching the data from - the remote API. This exception includes the HTTP Response - code, an error message, and the HTTP body that was received in - the request. - - """ - - return super().new_api_call_builder.request( - RequestBuilder().server(Server.DEFAULT) - .path('/tspublic/rest/v2/user/removegroup') - .http_method(HttpMethodEnum.PUT) - .header_param(Parameter() - .key('Content-Type') - .value('application/json')) - .body_param(Parameter() - .value(body) - .is_required(True)) - .body_serializer(APIHelper.json_serialize) - .auth(Single('global')) - ).response( - ResponseHandler() - .deserializer(APIHelper.json_deserialize) - .local_error('500', 'Operation failed', ErrorResponseException) - ).execute() - - def restapi_v_2__search_users(self, - body): - """Does a POST request to /tspublic/rest/v2/user/search. - - To get the details of a specific user account or all users in the - ThoughtSpot system use this end point. - - Args: - body (TspublicRestV2UserSearchRequest): TODO: type description - here. - - Returns: - object: Response from the API. - - Raises: - APIException: When an error occurs while fetching the data from - the remote API. This exception includes the HTTP Response - code, an error message, and the HTTP body that was received in - the request. - - """ - - return super().new_api_call_builder.request( - RequestBuilder().server(Server.DEFAULT) - .path('/tspublic/rest/v2/user/search') - .http_method(HttpMethodEnum.POST) - .header_param(Parameter() - .key('Content-Type') - .value('application/json')) - .body_param(Parameter() - .value(body) - .is_required(True)) - .header_param(Parameter() - .key('accept') - .value('application/json')) - .body_serializer(APIHelper.json_serialize) - .auth(Single('global')) - ).response( - ResponseHandler() - .deserializer(APIHelper.json_deserialize) - .local_error('500', 'Operation failed', ErrorResponseException) - ).execute() - - def restapi_v_2__change_password_of_user(self, - body): - """Does a PUT request to /tspublic/rest/v2/user/changepassword. - - To change the password of a ThoughtSpot user account, use this - endpoint. - At least one of id or name of user is required. When both are given - user id will be considered. - - Args: - body (TspublicRestV2UserChangepasswordRequest): TODO: type - description here. - - Returns: - bool: Response from the API. - - Raises: - APIException: When an error occurs while fetching the data from - the remote API. This exception includes the HTTP Response - code, an error message, and the HTTP body that was received in - the request. - - """ - - return super().new_api_call_builder.request( - RequestBuilder().server(Server.DEFAULT) - .path('/tspublic/rest/v2/user/changepassword') - .http_method(HttpMethodEnum.PUT) - .header_param(Parameter() - .key('Content-Type') - .value('application/json')) - .body_param(Parameter() - .value(body) - .is_required(True)) - .body_serializer(APIHelper.json_serialize) - .auth(Single('global')) - ).response( - ResponseHandler() - .deserializer(APIHelper.json_deserialize) - .local_error('500', 'Operation failed', ErrorResponseException) - ).execute() - - def restapi_v_2__add_user_to_orgs(self, - body): - """Does a PUT request to /tspublic/rest/v2/user/addorg. - - To programmatically add existing ThoughtSpot users to an organization, - use this API endpoint. - At least one of id or name of the organization is required. When both - are given, then organization id will be considered. - Requires Administration access for the organization to which users - need to be added. - - Args: - body (TspublicRestV2UserAddorgRequest): TODO: type description - here. - - Returns: - bool: Response from the API. - - Raises: - APIException: When an error occurs while fetching the data from - the remote API. This exception includes the HTTP Response - code, an error message, and the HTTP body that was received in - the request. - - """ - - return super().new_api_call_builder.request( - RequestBuilder().server(Server.DEFAULT) - .path('/tspublic/rest/v2/user/addorg') - .http_method(HttpMethodEnum.PUT) - .header_param(Parameter() - .key('Content-Type') - .value('application/json')) - .body_param(Parameter() - .value(body) - .is_required(True)) - .body_serializer(APIHelper.json_serialize) - .auth(Single('global')) - ).response( - ResponseHandler() - .deserializer(APIHelper.json_deserialize) - .local_error('500', 'Operation failed', ErrorResponseException) - ).execute() diff --git a/Python/thoughtspotpublicrestapi/exceptions/__init__.py b/Python/thoughtspotpublicrestapi/exceptions/__init__.py deleted file mode 100644 index 58864fae4..000000000 --- a/Python/thoughtspotpublicrestapi/exceptions/__init__.py +++ /dev/null @@ -1,4 +0,0 @@ -__all__ = [ - 'api_exception', - 'error_response_exception', -] diff --git a/Python/thoughtspotpublicrestapi/exceptions/api_exception.py b/Python/thoughtspotpublicrestapi/exceptions/api_exception.py deleted file mode 100644 index 91fa71330..000000000 --- a/Python/thoughtspotpublicrestapi/exceptions/api_exception.py +++ /dev/null @@ -1,35 +0,0 @@ -# -*- coding: utf-8 -*- - -""" -thoughtspotpublicrestapi - -This file was automatically generated by APIMATIC v3.0 ( - https://www.apimatic.io ). -""" - - -class APIException(Exception): - - """Class that handles HTTP Exceptions when fetching API Endpoints. - - Attributes: - response_code (int): The status code of the response. - response (HttpResponse): The HttpResponse of the API call. - - """ - - def __init__(self, - reason, - response): - """Constructor for the APIException class - - Args: - reason (string): The reason (or error message) for the Exception - to be raised. - response (HttpResponse): The HttpResponse of the API call. - - """ - super(APIException, self).__init__(reason) - self.reason = reason - self.response = response - self.response_code = response.status_code diff --git a/Python/thoughtspotpublicrestapi/exceptions/error_response_exception.py b/Python/thoughtspotpublicrestapi/exceptions/error_response_exception.py deleted file mode 100644 index ea99f94b9..000000000 --- a/Python/thoughtspotpublicrestapi/exceptions/error_response_exception.py +++ /dev/null @@ -1,38 +0,0 @@ -# -*- coding: utf-8 -*- - -""" -thoughtspotpublicrestapi - -This file was automatically generated by APIMATIC v3.0 ( - https://www.apimatic.io ). -""" - -from thoughtspotpublicrestapi.api_helper import APIHelper -import thoughtspotpublicrestapi.exceptions.api_exception - - -class ErrorResponseException(thoughtspotpublicrestapi.exceptions.api_exception.APIException): - def __init__(self, reason, response): - """Constructor for the ErrorResponseException class - - Args: - reason (string): The reason (or error message) for the Exception - to be raised. - response (HttpResponse): The HttpResponse of the API call. - - """ - super(ErrorResponseException, self).__init__(reason, response) - dictionary = APIHelper.json_deserialize(self.response.text) - if isinstance(dictionary, dict): - self.unbox(dictionary) - - def unbox(self, dictionary): - """Populates the properties of this object by extracting them from a dictionary. - - Args: - dictionary (dictionary): A dictionary representation of the object as - obtained from the deserialization of the server's response. The keys - MUST match property names in the API description. - - """ - self.error = dictionary.get("error") if dictionary.get("error") else APIHelper.SKIP diff --git a/Python/thoughtspotpublicrestapi/http/__init__.py b/Python/thoughtspotpublicrestapi/http/__init__.py deleted file mode 100644 index b1344a840..000000000 --- a/Python/thoughtspotpublicrestapi/http/__init__.py +++ /dev/null @@ -1,7 +0,0 @@ -__all__ = [ - 'auth', - 'http_method_enum', - 'http_request', - 'http_response', - 'http_call_back', -] diff --git a/Python/thoughtspotpublicrestapi/http/auth/__init__.py b/Python/thoughtspotpublicrestapi/http/auth/__init__.py deleted file mode 100644 index 649126762..000000000 --- a/Python/thoughtspotpublicrestapi/http/auth/__init__.py +++ /dev/null @@ -1,3 +0,0 @@ -__all__ = [ - 'o_auth_2', -] diff --git a/Python/thoughtspotpublicrestapi/http/auth/o_auth_2.py b/Python/thoughtspotpublicrestapi/http/auth/o_auth_2.py deleted file mode 100644 index 9a8353e99..000000000 --- a/Python/thoughtspotpublicrestapi/http/auth/o_auth_2.py +++ /dev/null @@ -1,29 +0,0 @@ -# -*- coding: utf-8 -*- - -""" -thoughtspotpublicrestapi - -This file was automatically generated by APIMATIC v3.0 ( - https://www.apimatic.io ). -""" - -from apimatic_core.authentication.header_auth import HeaderAuth - - -class OAuth2(HeaderAuth): - - @property - def error_message(self): - """Display error message on occurrence of authentication failure - in BearerAuth - - """ - return "BearerAuth: access_token is undefined." - - def __init__(self, access_token): - auth_params = {} - self._access_token = access_token - if self._access_token: - auth_params["Authorization"] = "Bearer {}".format(self._access_token) - super().__init__(auth_params=auth_params) - diff --git a/Python/thoughtspotpublicrestapi/http/http_call_back.py b/Python/thoughtspotpublicrestapi/http/http_call_back.py deleted file mode 100644 index b46d9986d..000000000 --- a/Python/thoughtspotpublicrestapi/http/http_call_back.py +++ /dev/null @@ -1,21 +0,0 @@ -# -*- coding: utf-8 -*- - -""" -thoughtspotpublicrestapi - -This file was automatically generated by APIMATIC v3.0 ( - https://www.apimatic.io ). -""" - -from apimatic_core.http.http_callback import HttpCallBack - - -class HttpCallBack(HttpCallBack): - - """An interface for the callback to be called before and after the - HTTP call for an endpoint is made. - - This class should not be instantiated but should be used as a base class - for HttpCallBack classes. - - """ \ No newline at end of file diff --git a/Python/thoughtspotpublicrestapi/http/http_method_enum.py b/Python/thoughtspotpublicrestapi/http/http_method_enum.py deleted file mode 100644 index 0da02d750..000000000 --- a/Python/thoughtspotpublicrestapi/http/http_method_enum.py +++ /dev/null @@ -1,24 +0,0 @@ -# -*- coding: utf-8 -*- - -""" -thoughtspotpublicrestapi - -This file was automatically generated by APIMATIC v3.0 ( - https://www.apimatic.io ). -""" - -from apimatic_core_interfaces.types.http_method_enum import HttpMethodEnum - - -class HttpMethodEnum(HttpMethodEnum): - - """Enumeration of an HTTP Method - - Attributes: - GET: A GET Request - POST: A POST Request - PUT: A PUT Request - PATCH: A PATCH Request - DELETE: A DELETE Request - - """ \ No newline at end of file diff --git a/Python/thoughtspotpublicrestapi/http/http_request.py b/Python/thoughtspotpublicrestapi/http/http_request.py deleted file mode 100644 index c2ba4899c..000000000 --- a/Python/thoughtspotpublicrestapi/http/http_request.py +++ /dev/null @@ -1,54 +0,0 @@ -# -*- coding: utf-8 -*- - -""" -thoughtspotpublicrestapi - -This file was automatically generated by APIMATIC v3.0 ( - https://www.apimatic.io ). -""" - -from apimatic_core.http.request.http_request import HttpRequest - - -class HttpRequest(HttpRequest): - - """Information about an HTTP Request including its method, headers, - parameters, URL, and Basic Auth details - - Attributes: - http_method (HttpMethodEnum): The HTTP Method that this request should - perform when called. - headers (dict): A dictionary of headers (key : value) that should be - sent along with the request. - query_url (string): The URL that the request should be sent to. - parameters (dict): A dictionary of parameters that are to be sent along - with the request in the form body of the request - - """ - - def __init__(self, - http_method, - query_url, - headers=None, - query_parameters=None, - parameters=None, - files=None): - """Constructor for the HttpRequest class - - Args: - http_method (HttpMethodEnum): The HTTP Method. - query_url (string): The URL to send the request to. - headers (dict, optional): The headers for the HTTP Request. - query_parameters (dict, optional): Query parameters to add in the - URL. - parameters (dict, optional): Form or body parameters to be included - in the body. - files (dict, optional): Files to be sent with the request. - - """ - super().__init__(http_method, - query_url, - headers, - query_parameters, - parameters, - files) diff --git a/Python/thoughtspotpublicrestapi/http/http_response.py b/Python/thoughtspotpublicrestapi/http/http_response.py deleted file mode 100644 index 6a53e7e25..000000000 --- a/Python/thoughtspotpublicrestapi/http/http_response.py +++ /dev/null @@ -1,45 +0,0 @@ -# -*- coding: utf-8 -*- - -""" -thoughtspotpublicrestapi - -This file was automatically generated by APIMATIC v3.0 ( - https://www.apimatic.io ). -""" - -from apimatic_core.http.response.http_response import HttpResponse - - -class HttpResponse(HttpResponse): - - """Information about an HTTP Response including its status code, returned - headers, and raw body - - Attributes: - status_code (int): The status code response from the server that - corresponds to this response. - reason_phrase (string): The reason phrase returned by the server. - headers (dict): A dictionary of headers (key : value) that were - returned with the response - text (string): The Raw body of the HTTP Response as a string - request (HttpRequest): The request that resulted in this response. - - """ - - def __init__(self, - status_code, - reason_phrase, - headers, - text, - request): - """Constructor for the HttpResponse class - - Args: - status_code (int): The response status code. - reason_phrase (string): The response reason phrase. - headers (dict): The response headers. - text (string): The raw body from the server. - request (HttpRequest): The request that resulted in this response. - - """ - super().__init__(status_code, reason_phrase, headers, text, request) diff --git a/Python/thoughtspotpublicrestapi/models/__init__.py b/Python/thoughtspotpublicrestapi/models/__init__.py deleted file mode 100644 index ad12eba67..000000000 --- a/Python/thoughtspotpublicrestapi/models/__init__.py +++ /dev/null @@ -1,145 +0,0 @@ -__all__ = [ - 'session_login_response', - 'group_name_and_id_input', - 'group_name_and_id', - 'user_name_and_id', - 'user_name_and_id_input', - 'user_response', - 'pinboard_details', - 'group_response', - 'liveboard_name_and_id', - 'metadata_tag_response', - 'client_state', - 'tag_name_and_id', - 'ts_object_input', - 'home_liveboard_response', - 'access_level_input', - 'tag_name_and_id_input', - 'name_and_id_input', - 'connection_response', - 'create_connection_response', - 'add_table_input', - 'table_input', - 'connection_table_response', - 'connection_table_columns_response', - 'answer_query_response', - 'liveboard_query_response', - 'from_user_name_and_id_input', - 'to_user_name_and_id_input', - 'adminsync_principal_response', - 'pdf_options_input', - 'logs_response', - 'ts_object_search_input', - 'security_permission_response', - 'principal_search_response', - 'orgs_response', - 'create_table_response', - 'connection_table_columns_input', - 'org_type', - 'table_list', - 'columns_input', - 'connection_database_type', - 'connection_columns_shema', - 'viz_type', - 'security_permission', - 'secuirity_dependents', - 'permissions_type_search', - 'logical_table_header', - 'connection_table_schema', - 'table_columns', - 'group_permission', - 'dependent_permission', - 'ts_object_type_serach', - 'connection_column', - 'tspublic_rest_v_2_admin_assignauthor_request', - 'tspublic_rest_v_2_admin_changeauthor_request', - 'tspublic_rest_v_2_admin_configuration_update_request', - 'tspublic_rest_v_2_admin_forcelogout_request', - 'tspublic_rest_v_2_admin_resetpassword_request', - 'tspublic_rest_v_2_admin_syncprincipal_request', - 'tspublic_rest_v_2_connection_addtable_request', - 'tspublic_rest_v_2_connection_create_request', - 'tspublic_rest_v_2_connection_removetable_request', - 'tspublic_rest_v_2_connection_search_request', - 'tspublic_rest_v_2_connection_table_request', - 'tspublic_rest_v_2_connection_tablecoloumn_request', - 'tspublic_rest_v_2_connection_update_request', - 'tspublic_rest_v_2_customaction_association_update_request', - 'tspublic_rest_v_2_customaction_create_request', - 'tspublic_rest_v_2_customaction_search_request', - 'tspublic_rest_v_2_customaction_update_request', - 'tspublic_rest_v_2_data_answer_request', - 'tspublic_rest_v_2_data_liveboard_request', - 'tspublic_rest_v_2_data_search_request', - 'tspublic_rest_v_2_database_table_create_request', - 'tspublic_rest_v_2_database_table_runquery_request', - 'tspublic_rest_v_2_group_addgroup_request', - 'tspublic_rest_v_2_group_addprivilege_request', - 'tspublic_rest_v_2_group_adduser_request', - 'tspublic_rest_v_2_group_create_request', - 'tspublic_rest_v_2_group_removegroup_request', - 'tspublic_rest_v_2_group_removeprivilege_request', - 'tspublic_rest_v_2_group_removeuser_request', - 'tspublic_rest_v_2_group_search_request', - 'tspublic_rest_v_2_group_update_request', - 'tspublic_rest_v_2_materialization_refreshview_request', - 'tspublic_rest_v_2_metadata_dependency_request', - 'tspublic_rest_v_2_metadata_detail_search_request', - 'tspublic_rest_v_2_metadata_favorite_assign_request', - 'tspublic_rest_v_2_metadata_favorite_unassign_request', - 'tspublic_rest_v_2_metadata_header_search_request', - 'tspublic_rest_v_2_metadata_homeliveboard_assign_request', - 'tspublic_rest_v_2_metadata_homeliveboard_unassign_request', - 'tspublic_rest_v_2_metadata_tag_assign_request', - 'tspublic_rest_v_2_metadata_tag_create_request', - 'tspublic_rest_v_2_metadata_tag_unassign_request', - 'tspublic_rest_v_2_metadata_tag_update_request', - 'tspublic_rest_v_2_metadata_tml_export_request', - 'tspublic_rest_v_2_metadata_tml_import_request', - 'tspublic_rest_v_2_org_create_request', - 'tspublic_rest_v_2_org_search_request', - 'tspublic_rest_v_2_org_update_request', - 'tspublic_rest_v_2_security_permission_principal_search_request', - 'tspublic_rest_v_2_security_permission_tsobject_search_request', - 'tspublic_rest_v_2_security_share_tsobject_request', - 'tspublic_rest_v_2_security_share_visualization_request', - 'tspublic_rest_v_2_user_addgroup_request', - 'tspublic_rest_v_2_user_addorg_request', - 'tspublic_rest_v_2_user_changepassword_request', - 'tspublic_rest_v_2_user_removegroup_request', - 'tspublic_rest_v_2_user_search_request', - 'tspublic_rest_v_2_user_update_request', - 'access_enum', - 'access_level_enum', - 'format_type_enum', - 'format_type_3_enum', - 'import_policy_enum', - 'orientation_enum', - 'privilege_enum', - 'sort_by_enum', - 'sort_by_1_enum', - 'sort_order_enum', - 'sort_order_1_enum', - 'state_enum', - 'state_1_enum', - 'topic_enum', - 'type_enum', - 'type_1_enum', - 'type_2_enum', - 'type_3_enum', - 'type_4_enum', - 'type_5_enum', - 'type_6_enum', - 'type_7_enum', - 'type_8_enum', - 'type_9_enum', - 'type_10_enum', - 'type_13_enum', - 'type_14_enum', - 'type_15_enum', - 'type_16_enum', - 'type_18_enum', - 'visibility_enum', - 'visibility_1_enum', - 'visibility_2_enum', -] diff --git a/Python/thoughtspotpublicrestapi/models/access_enum.py b/Python/thoughtspotpublicrestapi/models/access_enum.py deleted file mode 100644 index 62176c157..000000000 --- a/Python/thoughtspotpublicrestapi/models/access_enum.py +++ /dev/null @@ -1,26 +0,0 @@ -# -*- coding: utf-8 -*- - -""" -thoughtspotpublicrestapi - -This file was automatically generated by APIMATIC v3.0 ( - https://www.apimatic.io ). -""" - - -class AccessEnum(object): - - """Implementation of the 'Access' enum. - - Minimum access level that the specified user or user group has. If no - input is provided then minimum access of READ_ONLY will be considered. - - Attributes: - READ_ONLY: TODO: type description here. - MODIFY: TODO: type description here. - - """ - - READ_ONLY = 'READ_ONLY' - - MODIFY = 'MODIFY' diff --git a/Python/thoughtspotpublicrestapi/models/access_level_enum.py b/Python/thoughtspotpublicrestapi/models/access_level_enum.py deleted file mode 100644 index 583a37ace..000000000 --- a/Python/thoughtspotpublicrestapi/models/access_level_enum.py +++ /dev/null @@ -1,25 +0,0 @@ -# -*- coding: utf-8 -*- - -""" -thoughtspotpublicrestapi - -This file was automatically generated by APIMATIC v3.0 ( - https://www.apimatic.io ). -""" - - -class AccessLevelEnum(object): - - """Implementation of the 'accessLevel' enum. - - TODO: type enum description here. - - Attributes: - FULL: TODO: type description here. - REPORT_BOOK_VIEW: TODO: type description here. - - """ - - FULL = 'FULL' - - REPORT_BOOK_VIEW = 'REPORT_BOOK_VIEW' diff --git a/Python/thoughtspotpublicrestapi/models/access_level_input.py b/Python/thoughtspotpublicrestapi/models/access_level_input.py deleted file mode 100644 index 1342a358c..000000000 --- a/Python/thoughtspotpublicrestapi/models/access_level_input.py +++ /dev/null @@ -1,87 +0,0 @@ -# -*- coding: utf-8 -*- - -""" -thoughtspotpublicrestapi - -This file was automatically generated by APIMATIC v3.0 ( - https://www.apimatic.io ). -""" -from thoughtspotpublicrestapi.api_helper import APIHelper - - -class AccessLevelInput(object): - - """Implementation of the 'AccessLevelInput' model. - - TODO: type model description here. - - Attributes: - name (string): Username or name of the user group - id (string): GUID of the user or user group - mtype (Type1Enum): Type of access detail provided - access (AccessEnum): Minimum access level that the specified user or - user group has. If no input is provided then minimum access of - READ_ONLY will be considered. - - """ - - # Create a mapping from Model property names to API property names - _names = { - "name": 'name', - "id": 'id', - "mtype": 'type', - "access": 'access' - } - - _optionals = [ - 'name', - 'id', - 'mtype', - 'access', - ] - - def __init__(self, - name=APIHelper.SKIP, - id=APIHelper.SKIP, - mtype=APIHelper.SKIP, - access=APIHelper.SKIP): - """Constructor for the AccessLevelInput class""" - - # Initialize members of the class - if name is not APIHelper.SKIP: - self.name = name - if id is not APIHelper.SKIP: - self.id = id - if mtype is not APIHelper.SKIP: - self.mtype = mtype - if access is not APIHelper.SKIP: - self.access = access - - @classmethod - def from_dictionary(cls, - dictionary): - """Creates an instance of this model from a dictionary - - Args: - dictionary (dictionary): A dictionary representation of the object - as obtained from the deserialization of the server's response. The - keys MUST match property names in the API description. - - Returns: - object: An instance of this structure class. - - """ - if dictionary is None: - return None - - # Extract variables from the dictionary - - name = dictionary.get("name") if dictionary.get("name") else APIHelper.SKIP - id = dictionary.get("id") if dictionary.get("id") else APIHelper.SKIP - mtype = dictionary.get("type") if dictionary.get("type") else APIHelper.SKIP - access = dictionary.get("access") if dictionary.get("access") else APIHelper.SKIP - # Return an object of this model - return cls(name, - id, - mtype, - access) diff --git a/Python/thoughtspotpublicrestapi/models/add_table_input.py b/Python/thoughtspotpublicrestapi/models/add_table_input.py deleted file mode 100644 index afd5e0146..000000000 --- a/Python/thoughtspotpublicrestapi/models/add_table_input.py +++ /dev/null @@ -1,76 +0,0 @@ -# -*- coding: utf-8 -*- - -""" -thoughtspotpublicrestapi - -This file was automatically generated by APIMATIC v3.0 ( - https://www.apimatic.io ). -""" -from thoughtspotpublicrestapi.models.columns_input import ColumnsInput - - -class AddTableInput(object): - - """Implementation of the 'AddTableInput' model. - - TODO: type model description here. - - Attributes: - name (string): Name of the table - db_name (string): Name of the database in the data platform - schema_name (string): Name of the schema in the database - columns (list of ColumnsInput): A JSON array of column details - - """ - - # Create a mapping from Model property names to API property names - _names = { - "name": 'name', - "db_name": 'dbName', - "schema_name": 'schemaName', - "columns": 'columns' - } - - def __init__(self, - name=None, - db_name=None, - schema_name=None, - columns=None): - """Constructor for the AddTableInput class""" - - # Initialize members of the class - self.name = name - self.db_name = db_name - self.schema_name = schema_name - self.columns = columns - - @classmethod - def from_dictionary(cls, - dictionary): - """Creates an instance of this model from a dictionary - - Args: - dictionary (dictionary): A dictionary representation of the object - as obtained from the deserialization of the server's response. The - keys MUST match property names in the API description. - - Returns: - object: An instance of this structure class. - - """ - if dictionary is None: - return None - - # Extract variables from the dictionary - - name = dictionary.get("name") if dictionary.get("name") else None - db_name = dictionary.get("dbName") if dictionary.get("dbName") else None - schema_name = dictionary.get("schemaName") if dictionary.get("schemaName") else None - columns = None - if dictionary.get('columns') is not None: - columns = [ColumnsInput.from_dictionary(x) for x in dictionary.get('columns')] - # Return an object of this model - return cls(name, - db_name, - schema_name, - columns) diff --git a/Python/thoughtspotpublicrestapi/models/adminsync_principal_response.py b/Python/thoughtspotpublicrestapi/models/adminsync_principal_response.py deleted file mode 100644 index b74fccd35..000000000 --- a/Python/thoughtspotpublicrestapi/models/adminsync_principal_response.py +++ /dev/null @@ -1,101 +0,0 @@ -# -*- coding: utf-8 -*- - -""" -thoughtspotpublicrestapi - -This file was automatically generated by APIMATIC v3.0 ( - https://www.apimatic.io ). -""" -from thoughtspotpublicrestapi.api_helper import APIHelper - - -class AdminsyncPrincipalResponse(object): - - """Implementation of the 'AdminsyncPrincipalResponse' model. - - TODO: type model description here. - - Attributes: - users_added (list of string): Username of list of users added - users_deleted (list of string): Username of list of users deleted - users_updated (list of string): Username of list of users updated - groups_added (list of string): Group name of list of groups added - groups_deleted (list of string): Group name of list of groups deleted - groups_updated (list of string): Group name of list of groups updated - - """ - - # Create a mapping from Model property names to API property names - _names = { - "users_added": 'usersAdded', - "users_deleted": 'usersDeleted', - "users_updated": 'usersUpdated', - "groups_added": 'groupsAdded', - "groups_deleted": 'groupsDeleted', - "groups_updated": 'groupsUpdated' - } - - _optionals = [ - 'users_added', - 'users_deleted', - 'users_updated', - 'groups_added', - 'groups_deleted', - 'groups_updated', - ] - - def __init__(self, - users_added=APIHelper.SKIP, - users_deleted=APIHelper.SKIP, - users_updated=APIHelper.SKIP, - groups_added=APIHelper.SKIP, - groups_deleted=APIHelper.SKIP, - groups_updated=APIHelper.SKIP): - """Constructor for the AdminsyncPrincipalResponse class""" - - # Initialize members of the class - if users_added is not APIHelper.SKIP: - self.users_added = users_added - if users_deleted is not APIHelper.SKIP: - self.users_deleted = users_deleted - if users_updated is not APIHelper.SKIP: - self.users_updated = users_updated - if groups_added is not APIHelper.SKIP: - self.groups_added = groups_added - if groups_deleted is not APIHelper.SKIP: - self.groups_deleted = groups_deleted - if groups_updated is not APIHelper.SKIP: - self.groups_updated = groups_updated - - @classmethod - def from_dictionary(cls, - dictionary): - """Creates an instance of this model from a dictionary - - Args: - dictionary (dictionary): A dictionary representation of the object - as obtained from the deserialization of the server's response. The - keys MUST match property names in the API description. - - Returns: - object: An instance of this structure class. - - """ - if dictionary is None: - return None - - # Extract variables from the dictionary - - users_added = dictionary.get("usersAdded") if dictionary.get("usersAdded") else APIHelper.SKIP - users_deleted = dictionary.get("usersDeleted") if dictionary.get("usersDeleted") else APIHelper.SKIP - users_updated = dictionary.get("usersUpdated") if dictionary.get("usersUpdated") else APIHelper.SKIP - groups_added = dictionary.get("groupsAdded") if dictionary.get("groupsAdded") else APIHelper.SKIP - groups_deleted = dictionary.get("groupsDeleted") if dictionary.get("groupsDeleted") else APIHelper.SKIP - groups_updated = dictionary.get("groupsUpdated") if dictionary.get("groupsUpdated") else APIHelper.SKIP - # Return an object of this model - return cls(users_added, - users_deleted, - users_updated, - groups_added, - groups_deleted, - groups_updated) diff --git a/Python/thoughtspotpublicrestapi/models/answer_query_response.py b/Python/thoughtspotpublicrestapi/models/answer_query_response.py deleted file mode 100644 index 7c70e382e..000000000 --- a/Python/thoughtspotpublicrestapi/models/answer_query_response.py +++ /dev/null @@ -1,77 +0,0 @@ -# -*- coding: utf-8 -*- - -""" -thoughtspotpublicrestapi - -This file was automatically generated by APIMATIC v3.0 ( - https://www.apimatic.io ). -""" -from thoughtspotpublicrestapi.api_helper import APIHelper - - -class AnswerQueryResponse(object): - - """Implementation of the 'AnswerQueryResponse' model. - - TODO: type model description here. - - Attributes: - name (string): The name of the saved Answer - id (string): The GUID of the saved Answer - query_sql (string): SQL query associated with the saved Answer - - """ - - # Create a mapping from Model property names to API property names - _names = { - "name": 'name', - "id": 'id', - "query_sql": 'querySql' - } - - _optionals = [ - 'name', - 'id', - 'query_sql', - ] - - def __init__(self, - name=APIHelper.SKIP, - id=APIHelper.SKIP, - query_sql=APIHelper.SKIP): - """Constructor for the AnswerQueryResponse class""" - - # Initialize members of the class - if name is not APIHelper.SKIP: - self.name = name - if id is not APIHelper.SKIP: - self.id = id - if query_sql is not APIHelper.SKIP: - self.query_sql = query_sql - - @classmethod - def from_dictionary(cls, - dictionary): - """Creates an instance of this model from a dictionary - - Args: - dictionary (dictionary): A dictionary representation of the object - as obtained from the deserialization of the server's response. The - keys MUST match property names in the API description. - - Returns: - object: An instance of this structure class. - - """ - if dictionary is None: - return None - - # Extract variables from the dictionary - - name = dictionary.get("name") if dictionary.get("name") else APIHelper.SKIP - id = dictionary.get("id") if dictionary.get("id") else APIHelper.SKIP - query_sql = dictionary.get("querySql") if dictionary.get("querySql") else APIHelper.SKIP - # Return an object of this model - return cls(name, - id, - query_sql) diff --git a/Python/thoughtspotpublicrestapi/models/client_state.py b/Python/thoughtspotpublicrestapi/models/client_state.py deleted file mode 100644 index 74eb67d5a..000000000 --- a/Python/thoughtspotpublicrestapi/models/client_state.py +++ /dev/null @@ -1,61 +0,0 @@ -# -*- coding: utf-8 -*- - -""" -thoughtspotpublicrestapi - -This file was automatically generated by APIMATIC v3.0 ( - https://www.apimatic.io ). -""" -from thoughtspotpublicrestapi.api_helper import APIHelper - - -class ClientState(object): - - """Implementation of the 'ClientState' model. - - TODO: type model description here. - - Attributes: - color (string): Color assigned to the tag - - """ - - # Create a mapping from Model property names to API property names - _names = { - "color": 'color' - } - - _optionals = [ - 'color', - ] - - def __init__(self, - color=APIHelper.SKIP): - """Constructor for the ClientState class""" - - # Initialize members of the class - if color is not APIHelper.SKIP: - self.color = color - - @classmethod - def from_dictionary(cls, - dictionary): - """Creates an instance of this model from a dictionary - - Args: - dictionary (dictionary): A dictionary representation of the object - as obtained from the deserialization of the server's response. The - keys MUST match property names in the API description. - - Returns: - object: An instance of this structure class. - - """ - if dictionary is None: - return None - - # Extract variables from the dictionary - - color = dictionary.get("color") if dictionary.get("color") else APIHelper.SKIP - # Return an object of this model - return cls(color) diff --git a/Python/thoughtspotpublicrestapi/models/columns_input.py b/Python/thoughtspotpublicrestapi/models/columns_input.py deleted file mode 100644 index 5968379f1..000000000 --- a/Python/thoughtspotpublicrestapi/models/columns_input.py +++ /dev/null @@ -1,61 +0,0 @@ -# -*- coding: utf-8 -*- - -""" -thoughtspotpublicrestapi - -This file was automatically generated by APIMATIC v3.0 ( - https://www.apimatic.io ). -""" - - -class ColumnsInput(object): - - """Implementation of the 'ColumnsInput' model. - - TODO: type model description here. - - Attributes: - name (string): Name of the column - data_type (string): Datatype of the column - - """ - - # Create a mapping from Model property names to API property names - _names = { - "name": 'name', - "data_type": 'dataType' - } - - def __init__(self, - name=None, - data_type=None): - """Constructor for the ColumnsInput class""" - - # Initialize members of the class - self.name = name - self.data_type = data_type - - @classmethod - def from_dictionary(cls, - dictionary): - """Creates an instance of this model from a dictionary - - Args: - dictionary (dictionary): A dictionary representation of the object - as obtained from the deserialization of the server's response. The - keys MUST match property names in the API description. - - Returns: - object: An instance of this structure class. - - """ - if dictionary is None: - return None - - # Extract variables from the dictionary - - name = dictionary.get("name") if dictionary.get("name") else None - data_type = dictionary.get("dataType") if dictionary.get("dataType") else None - # Return an object of this model - return cls(name, - data_type) diff --git a/Python/thoughtspotpublicrestapi/models/connection_column.py b/Python/thoughtspotpublicrestapi/models/connection_column.py deleted file mode 100644 index 7fa439e02..000000000 --- a/Python/thoughtspotpublicrestapi/models/connection_column.py +++ /dev/null @@ -1,82 +0,0 @@ -# -*- coding: utf-8 -*- - -""" -thoughtspotpublicrestapi - -This file was automatically generated by APIMATIC v3.0 ( - https://www.apimatic.io ). -""" -from thoughtspotpublicrestapi.api_helper import APIHelper -from thoughtspotpublicrestapi.models.table_columns import TableColumns - - -class ConnectionColumn(object): - - """Implementation of the 'ConnectionColumn' model. - - TODO: type model description here. - - Attributes: - name (string): Name of the table - mtype (string): Type of the Table - column (list of TableColumns): List of columns in the table - - """ - - # Create a mapping from Model property names to API property names - _names = { - "name": 'name', - "mtype": 'type', - "column": 'column' - } - - _optionals = [ - 'name', - 'mtype', - 'column', - ] - - def __init__(self, - name=APIHelper.SKIP, - mtype=APIHelper.SKIP, - column=APIHelper.SKIP): - """Constructor for the ConnectionColumn class""" - - # Initialize members of the class - if name is not APIHelper.SKIP: - self.name = name - if mtype is not APIHelper.SKIP: - self.mtype = mtype - if column is not APIHelper.SKIP: - self.column = column - - @classmethod - def from_dictionary(cls, - dictionary): - """Creates an instance of this model from a dictionary - - Args: - dictionary (dictionary): A dictionary representation of the object - as obtained from the deserialization of the server's response. The - keys MUST match property names in the API description. - - Returns: - object: An instance of this structure class. - - """ - if dictionary is None: - return None - - # Extract variables from the dictionary - - name = dictionary.get("name") if dictionary.get("name") else APIHelper.SKIP - mtype = dictionary.get("type") if dictionary.get("type") else APIHelper.SKIP - column = None - if dictionary.get('column') is not None: - column = [TableColumns.from_dictionary(x) for x in dictionary.get('column')] - else: - column = APIHelper.SKIP - # Return an object of this model - return cls(name, - mtype, - column) diff --git a/Python/thoughtspotpublicrestapi/models/connection_columns_shema.py b/Python/thoughtspotpublicrestapi/models/connection_columns_shema.py deleted file mode 100644 index 35565f124..000000000 --- a/Python/thoughtspotpublicrestapi/models/connection_columns_shema.py +++ /dev/null @@ -1,90 +0,0 @@ -# -*- coding: utf-8 -*- - -""" -thoughtspotpublicrestapi - -This file was automatically generated by APIMATIC v3.0 ( - https://www.apimatic.io ). -""" -from thoughtspotpublicrestapi.api_helper import APIHelper -from thoughtspotpublicrestapi.models.table_columns import TableColumns - - -class ConnectionColumnsShema(object): - - """Implementation of the 'ConnectionColumnsShema' model. - - TODO: type model description here. - - Attributes: - name (string): Name of the table - db_name (string): Name of the database - schema_name (string): Name of the schema - columns (list of TableColumns): List of columns in the table - - """ - - # Create a mapping from Model property names to API property names - _names = { - "name": 'name', - "db_name": 'dbName', - "schema_name": 'schemaName', - "columns": 'columns' - } - - _optionals = [ - 'name', - 'db_name', - 'schema_name', - 'columns', - ] - - def __init__(self, - name=APIHelper.SKIP, - db_name=APIHelper.SKIP, - schema_name=APIHelper.SKIP, - columns=APIHelper.SKIP): - """Constructor for the ConnectionColumnsShema class""" - - # Initialize members of the class - if name is not APIHelper.SKIP: - self.name = name - if db_name is not APIHelper.SKIP: - self.db_name = db_name - if schema_name is not APIHelper.SKIP: - self.schema_name = schema_name - if columns is not APIHelper.SKIP: - self.columns = columns - - @classmethod - def from_dictionary(cls, - dictionary): - """Creates an instance of this model from a dictionary - - Args: - dictionary (dictionary): A dictionary representation of the object - as obtained from the deserialization of the server's response. The - keys MUST match property names in the API description. - - Returns: - object: An instance of this structure class. - - """ - if dictionary is None: - return None - - # Extract variables from the dictionary - - name = dictionary.get("name") if dictionary.get("name") else APIHelper.SKIP - db_name = dictionary.get("dbName") if dictionary.get("dbName") else APIHelper.SKIP - schema_name = dictionary.get("schemaName") if dictionary.get("schemaName") else APIHelper.SKIP - columns = None - if dictionary.get('columns') is not None: - columns = [TableColumns.from_dictionary(x) for x in dictionary.get('columns')] - else: - columns = APIHelper.SKIP - # Return an object of this model - return cls(name, - db_name, - schema_name, - columns) diff --git a/Python/thoughtspotpublicrestapi/models/connection_database_type.py b/Python/thoughtspotpublicrestapi/models/connection_database_type.py deleted file mode 100644 index 2b97e9603..000000000 --- a/Python/thoughtspotpublicrestapi/models/connection_database_type.py +++ /dev/null @@ -1,74 +0,0 @@ -# -*- coding: utf-8 -*- - -""" -thoughtspotpublicrestapi - -This file was automatically generated by APIMATIC v3.0 ( - https://www.apimatic.io ). -""" -from thoughtspotpublicrestapi.api_helper import APIHelper -from thoughtspotpublicrestapi.models.connection_table_schema import ConnectionTableSchema - - -class ConnectionDatabaseType(object): - - """Implementation of the 'ConnectionDatabaseType' model. - - TODO: type model description here. - - Attributes: - name (string): Name of the database - schema (list of ConnectionTableSchema): List of schemas - - """ - - # Create a mapping from Model property names to API property names - _names = { - "name": 'name', - "schema": 'schema' - } - - _optionals = [ - 'name', - 'schema', - ] - - def __init__(self, - name=APIHelper.SKIP, - schema=APIHelper.SKIP): - """Constructor for the ConnectionDatabaseType class""" - - # Initialize members of the class - if name is not APIHelper.SKIP: - self.name = name - if schema is not APIHelper.SKIP: - self.schema = schema - - @classmethod - def from_dictionary(cls, - dictionary): - """Creates an instance of this model from a dictionary - - Args: - dictionary (dictionary): A dictionary representation of the object - as obtained from the deserialization of the server's response. The - keys MUST match property names in the API description. - - Returns: - object: An instance of this structure class. - - """ - if dictionary is None: - return None - - # Extract variables from the dictionary - - name = dictionary.get("name") if dictionary.get("name") else APIHelper.SKIP - schema = None - if dictionary.get('schema') is not None: - schema = [ConnectionTableSchema.from_dictionary(x) for x in dictionary.get('schema')] - else: - schema = APIHelper.SKIP - # Return an object of this model - return cls(name, - schema) diff --git a/Python/thoughtspotpublicrestapi/models/connection_response.py b/Python/thoughtspotpublicrestapi/models/connection_response.py deleted file mode 100644 index 30d73992b..000000000 --- a/Python/thoughtspotpublicrestapi/models/connection_response.py +++ /dev/null @@ -1,232 +0,0 @@ -# -*- coding: utf-8 -*- - -""" -thoughtspotpublicrestapi - -This file was automatically generated by APIMATIC v3.0 ( - https://www.apimatic.io ). -""" -from thoughtspotpublicrestapi.api_helper import APIHelper -from thoughtspotpublicrestapi.models.table_list import TableList -from thoughtspotpublicrestapi.models.user_name_and_id import UserNameAndID - - -class ConnectionResponse(object): - - """Implementation of the 'ConnectionResponse' model. - - TODO: type model description here. - - Attributes: - name (string): Name of the connection - description (string): Description associated with the connection - mtype (string): Type of the connection. The database associated with - this type can be obtained from the response returned by the - /tspublic/rest/v2/connection/types API endpoint. - id (string): GUID of the connection - scheduled (bool): Indicates if the data sync is scheduled for this - connection - connection_type (string): TODO: type description here. - configuration (string): Configuration properties of the connection - is_external (bool): TODO: type description here. - is_deprecated (bool): Indicates if the connection is deprecated - is_deleted (bool): Indicates if the connection is deleted - is_hidden (bool): Indicates if the connection is hideen - complete (bool): Indicates if the all the properties of connection is - provided - index_version (float): TODO: type description here. - generation_num (float): TODO: type description here. - created (string): Date and time when the connection was created - modified (string): Date and time of last modification of the - connection - author (UserNameAndID): TODO: type description here. - modified_by (UserNameAndID): TODO: type description here. - owner (UserNameAndID): TODO: type description here. - tags (list of string): List of tags assigned to the connection - tables (list of TableList): List of tables linked to this connection - - """ - - # Create a mapping from Model property names to API property names - _names = { - "name": 'name', - "description": 'description', - "mtype": 'type', - "id": 'id', - "scheduled": 'scheduled', - "connection_type": 'connectionType', - "configuration": 'configuration', - "is_external": 'isExternal', - "is_deprecated": 'isDeprecated', - "is_deleted": 'isDeleted', - "is_hidden": 'isHidden', - "complete": 'complete', - "index_version": 'indexVersion', - "generation_num": 'generationNum', - "created": 'created', - "modified": 'modified', - "author": 'author', - "modified_by": 'modifiedBy', - "owner": 'owner', - "tags": 'tags', - "tables": 'tables' - } - - _optionals = [ - 'name', - 'description', - 'mtype', - 'id', - 'scheduled', - 'connection_type', - 'configuration', - 'is_external', - 'is_deprecated', - 'is_deleted', - 'is_hidden', - 'complete', - 'index_version', - 'generation_num', - 'created', - 'modified', - 'author', - 'modified_by', - 'owner', - 'tags', - 'tables', - ] - - def __init__(self, - name=APIHelper.SKIP, - description=APIHelper.SKIP, - mtype=APIHelper.SKIP, - id=APIHelper.SKIP, - scheduled=APIHelper.SKIP, - connection_type=APIHelper.SKIP, - configuration=APIHelper.SKIP, - is_external=APIHelper.SKIP, - is_deprecated=APIHelper.SKIP, - is_deleted=APIHelper.SKIP, - is_hidden=APIHelper.SKIP, - complete=APIHelper.SKIP, - index_version=APIHelper.SKIP, - generation_num=APIHelper.SKIP, - created=APIHelper.SKIP, - modified=APIHelper.SKIP, - author=APIHelper.SKIP, - modified_by=APIHelper.SKIP, - owner=APIHelper.SKIP, - tags=APIHelper.SKIP, - tables=APIHelper.SKIP): - """Constructor for the ConnectionResponse class""" - - # Initialize members of the class - if name is not APIHelper.SKIP: - self.name = name - if description is not APIHelper.SKIP: - self.description = description - if mtype is not APIHelper.SKIP: - self.mtype = mtype - if id is not APIHelper.SKIP: - self.id = id - if scheduled is not APIHelper.SKIP: - self.scheduled = scheduled - if connection_type is not APIHelper.SKIP: - self.connection_type = connection_type - if configuration is not APIHelper.SKIP: - self.configuration = configuration - if is_external is not APIHelper.SKIP: - self.is_external = is_external - if is_deprecated is not APIHelper.SKIP: - self.is_deprecated = is_deprecated - if is_deleted is not APIHelper.SKIP: - self.is_deleted = is_deleted - if is_hidden is not APIHelper.SKIP: - self.is_hidden = is_hidden - if complete is not APIHelper.SKIP: - self.complete = complete - if index_version is not APIHelper.SKIP: - self.index_version = index_version - if generation_num is not APIHelper.SKIP: - self.generation_num = generation_num - if created is not APIHelper.SKIP: - self.created = created - if modified is not APIHelper.SKIP: - self.modified = modified - if author is not APIHelper.SKIP: - self.author = author - if modified_by is not APIHelper.SKIP: - self.modified_by = modified_by - if owner is not APIHelper.SKIP: - self.owner = owner - if tags is not APIHelper.SKIP: - self.tags = tags - if tables is not APIHelper.SKIP: - self.tables = tables - - @classmethod - def from_dictionary(cls, - dictionary): - """Creates an instance of this model from a dictionary - - Args: - dictionary (dictionary): A dictionary representation of the object - as obtained from the deserialization of the server's response. The - keys MUST match property names in the API description. - - Returns: - object: An instance of this structure class. - - """ - if dictionary is None: - return None - - # Extract variables from the dictionary - - name = dictionary.get("name") if dictionary.get("name") else APIHelper.SKIP - description = dictionary.get("description") if dictionary.get("description") else APIHelper.SKIP - mtype = dictionary.get("type") if dictionary.get("type") else APIHelper.SKIP - id = dictionary.get("id") if dictionary.get("id") else APIHelper.SKIP - scheduled = dictionary.get("scheduled") if "scheduled" in dictionary.keys() else APIHelper.SKIP - connection_type = dictionary.get("connectionType") if dictionary.get("connectionType") else APIHelper.SKIP - configuration = dictionary.get("configuration") if dictionary.get("configuration") else APIHelper.SKIP - is_external = dictionary.get("isExternal") if "isExternal" in dictionary.keys() else APIHelper.SKIP - is_deprecated = dictionary.get("isDeprecated") if "isDeprecated" in dictionary.keys() else APIHelper.SKIP - is_deleted = dictionary.get("isDeleted") if "isDeleted" in dictionary.keys() else APIHelper.SKIP - is_hidden = dictionary.get("isHidden") if "isHidden" in dictionary.keys() else APIHelper.SKIP - complete = dictionary.get("complete") if "complete" in dictionary.keys() else APIHelper.SKIP - index_version = dictionary.get("indexVersion") if dictionary.get("indexVersion") else APIHelper.SKIP - generation_num = dictionary.get("generationNum") if dictionary.get("generationNum") else APIHelper.SKIP - created = dictionary.get("created") if dictionary.get("created") else APIHelper.SKIP - modified = dictionary.get("modified") if dictionary.get("modified") else APIHelper.SKIP - author = UserNameAndID.from_dictionary(dictionary.get('author')) if 'author' in dictionary.keys() else APIHelper.SKIP - modified_by = UserNameAndID.from_dictionary(dictionary.get('modifiedBy')) if 'modifiedBy' in dictionary.keys() else APIHelper.SKIP - owner = UserNameAndID.from_dictionary(dictionary.get('owner')) if 'owner' in dictionary.keys() else APIHelper.SKIP - tags = dictionary.get("tags") if dictionary.get("tags") else APIHelper.SKIP - tables = None - if dictionary.get('tables') is not None: - tables = [TableList.from_dictionary(x) for x in dictionary.get('tables')] - else: - tables = APIHelper.SKIP - # Return an object of this model - return cls(name, - description, - mtype, - id, - scheduled, - connection_type, - configuration, - is_external, - is_deprecated, - is_deleted, - is_hidden, - complete, - index_version, - generation_num, - created, - modified, - author, - modified_by, - owner, - tags, - tables) diff --git a/Python/thoughtspotpublicrestapi/models/connection_table_columns_input.py b/Python/thoughtspotpublicrestapi/models/connection_table_columns_input.py deleted file mode 100644 index ecf4ebf3a..000000000 --- a/Python/thoughtspotpublicrestapi/models/connection_table_columns_input.py +++ /dev/null @@ -1,67 +0,0 @@ -# -*- coding: utf-8 -*- - -""" -thoughtspotpublicrestapi - -This file was automatically generated by APIMATIC v3.0 ( - https://www.apimatic.io ). -""" - - -class ConnectionTableColumnsInput(object): - - """Implementation of the 'ConnectionTableColumnsInput' model. - - TODO: type model description here. - - Attributes: - db_name (string): Name of the database - schema_name (string): Name of the schema - name (string): Name of the table - - """ - - # Create a mapping from Model property names to API property names - _names = { - "db_name": 'dbName', - "schema_name": 'schemaName', - "name": 'name' - } - - def __init__(self, - db_name=None, - schema_name=None, - name=None): - """Constructor for the ConnectionTableColumnsInput class""" - - # Initialize members of the class - self.db_name = db_name - self.schema_name = schema_name - self.name = name - - @classmethod - def from_dictionary(cls, - dictionary): - """Creates an instance of this model from a dictionary - - Args: - dictionary (dictionary): A dictionary representation of the object - as obtained from the deserialization of the server's response. The - keys MUST match property names in the API description. - - Returns: - object: An instance of this structure class. - - """ - if dictionary is None: - return None - - # Extract variables from the dictionary - - db_name = dictionary.get("dbName") if dictionary.get("dbName") else None - schema_name = dictionary.get("schemaName") if dictionary.get("schemaName") else None - name = dictionary.get("name") if dictionary.get("name") else None - # Return an object of this model - return cls(db_name, - schema_name, - name) diff --git a/Python/thoughtspotpublicrestapi/models/connection_table_columns_response.py b/Python/thoughtspotpublicrestapi/models/connection_table_columns_response.py deleted file mode 100644 index 0d4e4893f..000000000 --- a/Python/thoughtspotpublicrestapi/models/connection_table_columns_response.py +++ /dev/null @@ -1,74 +0,0 @@ -# -*- coding: utf-8 -*- - -""" -thoughtspotpublicrestapi - -This file was automatically generated by APIMATIC v3.0 ( - https://www.apimatic.io ). -""" -from thoughtspotpublicrestapi.api_helper import APIHelper -from thoughtspotpublicrestapi.models.connection_columns_shema import ConnectionColumnsShema - - -class ConnectionTableColumnsResponse(object): - - """Implementation of the 'ConnectionTableColumnsResponse' model. - - TODO: type model description here. - - Attributes: - id (string): Connection id - table (list of ConnectionColumnsShema): List of table details - - """ - - # Create a mapping from Model property names to API property names - _names = { - "id": 'id', - "table": 'table' - } - - _optionals = [ - 'id', - 'table', - ] - - def __init__(self, - id=APIHelper.SKIP, - table=APIHelper.SKIP): - """Constructor for the ConnectionTableColumnsResponse class""" - - # Initialize members of the class - if id is not APIHelper.SKIP: - self.id = id - if table is not APIHelper.SKIP: - self.table = table - - @classmethod - def from_dictionary(cls, - dictionary): - """Creates an instance of this model from a dictionary - - Args: - dictionary (dictionary): A dictionary representation of the object - as obtained from the deserialization of the server's response. The - keys MUST match property names in the API description. - - Returns: - object: An instance of this structure class. - - """ - if dictionary is None: - return None - - # Extract variables from the dictionary - - id = dictionary.get("id") if dictionary.get("id") else APIHelper.SKIP - table = None - if dictionary.get('table') is not None: - table = [ConnectionColumnsShema.from_dictionary(x) for x in dictionary.get('table')] - else: - table = APIHelper.SKIP - # Return an object of this model - return cls(id, - table) diff --git a/Python/thoughtspotpublicrestapi/models/connection_table_response.py b/Python/thoughtspotpublicrestapi/models/connection_table_response.py deleted file mode 100644 index 80d78ecaa..000000000 --- a/Python/thoughtspotpublicrestapi/models/connection_table_response.py +++ /dev/null @@ -1,74 +0,0 @@ -# -*- coding: utf-8 -*- - -""" -thoughtspotpublicrestapi - -This file was automatically generated by APIMATIC v3.0 ( - https://www.apimatic.io ). -""" -from thoughtspotpublicrestapi.api_helper import APIHelper -from thoughtspotpublicrestapi.models.connection_database_type import ConnectionDatabaseType - - -class ConnectionTableResponse(object): - - """Implementation of the 'ConnectionTableResponse' model. - - TODO: type model description here. - - Attributes: - id (string): Connection id - database (list of ConnectionDatabaseType): List of databases - - """ - - # Create a mapping from Model property names to API property names - _names = { - "id": 'id', - "database": 'database' - } - - _optionals = [ - 'id', - 'database', - ] - - def __init__(self, - id=APIHelper.SKIP, - database=APIHelper.SKIP): - """Constructor for the ConnectionTableResponse class""" - - # Initialize members of the class - if id is not APIHelper.SKIP: - self.id = id - if database is not APIHelper.SKIP: - self.database = database - - @classmethod - def from_dictionary(cls, - dictionary): - """Creates an instance of this model from a dictionary - - Args: - dictionary (dictionary): A dictionary representation of the object - as obtained from the deserialization of the server's response. The - keys MUST match property names in the API description. - - Returns: - object: An instance of this structure class. - - """ - if dictionary is None: - return None - - # Extract variables from the dictionary - - id = dictionary.get("id") if dictionary.get("id") else APIHelper.SKIP - database = None - if dictionary.get('database') is not None: - database = [ConnectionDatabaseType.from_dictionary(x) for x in dictionary.get('database')] - else: - database = APIHelper.SKIP - # Return an object of this model - return cls(id, - database) diff --git a/Python/thoughtspotpublicrestapi/models/connection_table_schema.py b/Python/thoughtspotpublicrestapi/models/connection_table_schema.py deleted file mode 100644 index 8e4871831..000000000 --- a/Python/thoughtspotpublicrestapi/models/connection_table_schema.py +++ /dev/null @@ -1,74 +0,0 @@ -# -*- coding: utf-8 -*- - -""" -thoughtspotpublicrestapi - -This file was automatically generated by APIMATIC v3.0 ( - https://www.apimatic.io ). -""" -from thoughtspotpublicrestapi.api_helper import APIHelper -from thoughtspotpublicrestapi.models.connection_column import ConnectionColumn - - -class ConnectionTableSchema(object): - - """Implementation of the 'ConnectionTableSchema' model. - - TODO: type model description here. - - Attributes: - name (string): Name of the schema - table (list of ConnectionColumn): List of table details - - """ - - # Create a mapping from Model property names to API property names - _names = { - "name": 'name', - "table": 'table' - } - - _optionals = [ - 'name', - 'table', - ] - - def __init__(self, - name=APIHelper.SKIP, - table=APIHelper.SKIP): - """Constructor for the ConnectionTableSchema class""" - - # Initialize members of the class - if name is not APIHelper.SKIP: - self.name = name - if table is not APIHelper.SKIP: - self.table = table - - @classmethod - def from_dictionary(cls, - dictionary): - """Creates an instance of this model from a dictionary - - Args: - dictionary (dictionary): A dictionary representation of the object - as obtained from the deserialization of the server's response. The - keys MUST match property names in the API description. - - Returns: - object: An instance of this structure class. - - """ - if dictionary is None: - return None - - # Extract variables from the dictionary - - name = dictionary.get("name") if dictionary.get("name") else APIHelper.SKIP - table = None - if dictionary.get('table') is not None: - table = [ConnectionColumn.from_dictionary(x) for x in dictionary.get('table')] - else: - table = APIHelper.SKIP - # Return an object of this model - return cls(name, - table) diff --git a/Python/thoughtspotpublicrestapi/models/create_connection_response.py b/Python/thoughtspotpublicrestapi/models/create_connection_response.py deleted file mode 100644 index 111adfbda..000000000 --- a/Python/thoughtspotpublicrestapi/models/create_connection_response.py +++ /dev/null @@ -1,227 +0,0 @@ -# -*- coding: utf-8 -*- - -""" -thoughtspotpublicrestapi - -This file was automatically generated by APIMATIC v3.0 ( - https://www.apimatic.io ). -""" -from thoughtspotpublicrestapi.api_helper import APIHelper -from thoughtspotpublicrestapi.models.user_name_and_id import UserNameAndID - - -class CreateConnectionResponse(object): - - """Implementation of the 'CreateConnectionResponse' model. - - TODO: type model description here. - - Attributes: - name (string): Name of the connection - description (string): Description associated with the connection - mtype (string): Type of the connection. The database associated with - this type can be obtained from the response returned by the - /tspublic/rest/v2/connection/types API endpoint. - id (string): GUID of the connection - scheduled (bool): Indicates if the data sync is scheduled for this - connection - connection_type (string): TODO: type description here. - configuration (string): Configuration properties of the connection - is_external (bool): TODO: type description here. - is_deprecated (bool): Indicates if the connection is deprecated - is_deleted (bool): Indicates if the connection is deleted - is_hidden (bool): Indicates if the connection is hideen - complete (bool): Indicates if the all the properties of connection is - provided - index_version (float): TODO: type description here. - generation_num (float): TODO: type description here. - created (string): Date and time when user account was created - modified (string): Date and time of last modification of user account - author (UserNameAndID): TODO: type description here. - modified_by (UserNameAndID): TODO: type description here. - owner (UserNameAndID): TODO: type description here. - tags (list of string): List of tags assigned to the connection - tables (list of string): List of tables linked to this connection and - details of the columns in the table - - """ - - # Create a mapping from Model property names to API property names - _names = { - "name": 'name', - "description": 'description', - "mtype": 'type', - "id": 'id', - "scheduled": 'scheduled', - "connection_type": 'connectionType', - "configuration": 'configuration', - "is_external": 'isExternal', - "is_deprecated": 'isDeprecated', - "is_deleted": 'isDeleted', - "is_hidden": 'isHidden', - "complete": 'complete', - "index_version": 'indexVersion', - "generation_num": 'generationNum', - "created": 'created', - "modified": 'modified', - "author": 'author', - "modified_by": 'modifiedBy', - "owner": 'owner', - "tags": 'tags', - "tables": 'tables' - } - - _optionals = [ - 'name', - 'description', - 'mtype', - 'id', - 'scheduled', - 'connection_type', - 'configuration', - 'is_external', - 'is_deprecated', - 'is_deleted', - 'is_hidden', - 'complete', - 'index_version', - 'generation_num', - 'created', - 'modified', - 'author', - 'modified_by', - 'owner', - 'tags', - 'tables', - ] - - def __init__(self, - name=APIHelper.SKIP, - description=APIHelper.SKIP, - mtype=APIHelper.SKIP, - id=APIHelper.SKIP, - scheduled=APIHelper.SKIP, - connection_type=APIHelper.SKIP, - configuration=APIHelper.SKIP, - is_external=APIHelper.SKIP, - is_deprecated=APIHelper.SKIP, - is_deleted=APIHelper.SKIP, - is_hidden=APIHelper.SKIP, - complete=APIHelper.SKIP, - index_version=APIHelper.SKIP, - generation_num=APIHelper.SKIP, - created=APIHelper.SKIP, - modified=APIHelper.SKIP, - author=APIHelper.SKIP, - modified_by=APIHelper.SKIP, - owner=APIHelper.SKIP, - tags=APIHelper.SKIP, - tables=APIHelper.SKIP): - """Constructor for the CreateConnectionResponse class""" - - # Initialize members of the class - if name is not APIHelper.SKIP: - self.name = name - if description is not APIHelper.SKIP: - self.description = description - if mtype is not APIHelper.SKIP: - self.mtype = mtype - if id is not APIHelper.SKIP: - self.id = id - if scheduled is not APIHelper.SKIP: - self.scheduled = scheduled - if connection_type is not APIHelper.SKIP: - self.connection_type = connection_type - if configuration is not APIHelper.SKIP: - self.configuration = configuration - if is_external is not APIHelper.SKIP: - self.is_external = is_external - if is_deprecated is not APIHelper.SKIP: - self.is_deprecated = is_deprecated - if is_deleted is not APIHelper.SKIP: - self.is_deleted = is_deleted - if is_hidden is not APIHelper.SKIP: - self.is_hidden = is_hidden - if complete is not APIHelper.SKIP: - self.complete = complete - if index_version is not APIHelper.SKIP: - self.index_version = index_version - if generation_num is not APIHelper.SKIP: - self.generation_num = generation_num - if created is not APIHelper.SKIP: - self.created = created - if modified is not APIHelper.SKIP: - self.modified = modified - if author is not APIHelper.SKIP: - self.author = author - if modified_by is not APIHelper.SKIP: - self.modified_by = modified_by - if owner is not APIHelper.SKIP: - self.owner = owner - if tags is not APIHelper.SKIP: - self.tags = tags - if tables is not APIHelper.SKIP: - self.tables = tables - - @classmethod - def from_dictionary(cls, - dictionary): - """Creates an instance of this model from a dictionary - - Args: - dictionary (dictionary): A dictionary representation of the object - as obtained from the deserialization of the server's response. The - keys MUST match property names in the API description. - - Returns: - object: An instance of this structure class. - - """ - if dictionary is None: - return None - - # Extract variables from the dictionary - - name = dictionary.get("name") if dictionary.get("name") else APIHelper.SKIP - description = dictionary.get("description") if dictionary.get("description") else APIHelper.SKIP - mtype = dictionary.get("type") if dictionary.get("type") else APIHelper.SKIP - id = dictionary.get("id") if dictionary.get("id") else APIHelper.SKIP - scheduled = dictionary.get("scheduled") if "scheduled" in dictionary.keys() else APIHelper.SKIP - connection_type = dictionary.get("connectionType") if dictionary.get("connectionType") else APIHelper.SKIP - configuration = dictionary.get("configuration") if dictionary.get("configuration") else APIHelper.SKIP - is_external = dictionary.get("isExternal") if "isExternal" in dictionary.keys() else APIHelper.SKIP - is_deprecated = dictionary.get("isDeprecated") if "isDeprecated" in dictionary.keys() else APIHelper.SKIP - is_deleted = dictionary.get("isDeleted") if "isDeleted" in dictionary.keys() else APIHelper.SKIP - is_hidden = dictionary.get("isHidden") if "isHidden" in dictionary.keys() else APIHelper.SKIP - complete = dictionary.get("complete") if "complete" in dictionary.keys() else APIHelper.SKIP - index_version = dictionary.get("indexVersion") if dictionary.get("indexVersion") else APIHelper.SKIP - generation_num = dictionary.get("generationNum") if dictionary.get("generationNum") else APIHelper.SKIP - created = dictionary.get("created") if dictionary.get("created") else APIHelper.SKIP - modified = dictionary.get("modified") if dictionary.get("modified") else APIHelper.SKIP - author = UserNameAndID.from_dictionary(dictionary.get('author')) if 'author' in dictionary.keys() else APIHelper.SKIP - modified_by = UserNameAndID.from_dictionary(dictionary.get('modifiedBy')) if 'modifiedBy' in dictionary.keys() else APIHelper.SKIP - owner = UserNameAndID.from_dictionary(dictionary.get('owner')) if 'owner' in dictionary.keys() else APIHelper.SKIP - tags = dictionary.get("tags") if dictionary.get("tags") else APIHelper.SKIP - tables = dictionary.get("tables") if dictionary.get("tables") else APIHelper.SKIP - # Return an object of this model - return cls(name, - description, - mtype, - id, - scheduled, - connection_type, - configuration, - is_external, - is_deprecated, - is_deleted, - is_hidden, - complete, - index_version, - generation_num, - created, - modified, - author, - modified_by, - owner, - tags, - tables) diff --git a/Python/thoughtspotpublicrestapi/models/create_table_response.py b/Python/thoughtspotpublicrestapi/models/create_table_response.py deleted file mode 100644 index ba84ae955..000000000 --- a/Python/thoughtspotpublicrestapi/models/create_table_response.py +++ /dev/null @@ -1,71 +0,0 @@ -# -*- coding: utf-8 -*- - -""" -thoughtspotpublicrestapi - -This file was automatically generated by APIMATIC v3.0 ( - https://www.apimatic.io ). -""" -from thoughtspotpublicrestapi.api_helper import APIHelper -from thoughtspotpublicrestapi.models.logical_table_header import LogicalTableHeader - - -class CreateTableResponse(object): - - """Implementation of the 'CreateTableResponse' model. - - TODO: type model description here. - - Attributes: - logical_table_header (LogicalTableHeader): TODO: type description - here. - physical_table_id (string): TODO: type description here. - - """ - - # Create a mapping from Model property names to API property names - _names = { - "logical_table_header": 'logicalTableHeader', - "physical_table_id": 'physicalTableId' - } - - _optionals = [ - 'logical_table_header', - 'physical_table_id', - ] - - def __init__(self, - logical_table_header=APIHelper.SKIP, - physical_table_id=APIHelper.SKIP): - """Constructor for the CreateTableResponse class""" - - # Initialize members of the class - if logical_table_header is not APIHelper.SKIP: - self.logical_table_header = logical_table_header - if physical_table_id is not APIHelper.SKIP: - self.physical_table_id = physical_table_id - - @classmethod - def from_dictionary(cls, - dictionary): - """Creates an instance of this model from a dictionary - - Args: - dictionary (dictionary): A dictionary representation of the object - as obtained from the deserialization of the server's response. The - keys MUST match property names in the API description. - - Returns: - object: An instance of this structure class. - - """ - if dictionary is None: - return None - - # Extract variables from the dictionary - - logical_table_header = LogicalTableHeader.from_dictionary(dictionary.get('logicalTableHeader')) if 'logicalTableHeader' in dictionary.keys() else APIHelper.SKIP - physical_table_id = dictionary.get("physicalTableId") if dictionary.get("physicalTableId") else APIHelper.SKIP - # Return an object of this model - return cls(logical_table_header, - physical_table_id) diff --git a/Python/thoughtspotpublicrestapi/models/dependent_permission.py b/Python/thoughtspotpublicrestapi/models/dependent_permission.py deleted file mode 100644 index 8df0e4cbc..000000000 --- a/Python/thoughtspotpublicrestapi/models/dependent_permission.py +++ /dev/null @@ -1,111 +0,0 @@ -# -*- coding: utf-8 -*- - -""" -thoughtspotpublicrestapi - -This file was automatically generated by APIMATIC v3.0 ( - https://www.apimatic.io ). -""" -from thoughtspotpublicrestapi.api_helper import APIHelper -from thoughtspotpublicrestapi.models.group_permission import GroupPermission - - -class DependentPermission(object): - - """Implementation of the 'DependentPermission' model. - - TODO: type model description here. - - Attributes: - id (string): GUID of the object - name (string): Name of the object - mtype (string): Indicates the type of the object - permission (string): Indicates the permission which user or user group - has on the object - shared_permission (string): Indicates the permission which user or - user group has on the object through sharing of the object with - this user or user group - group_permission (list of GroupPermission): An array of object with - details of permission on the user groups to which the user or user - group belongs - - """ - - # Create a mapping from Model property names to API property names - _names = { - "id": 'id', - "name": 'name', - "mtype": 'type', - "permission": 'permission', - "shared_permission": 'sharedPermission', - "group_permission": 'groupPermission' - } - - _optionals = [ - 'id', - 'name', - 'mtype', - 'permission', - 'shared_permission', - 'group_permission', - ] - - def __init__(self, - id=APIHelper.SKIP, - name=APIHelper.SKIP, - mtype=APIHelper.SKIP, - permission=APIHelper.SKIP, - shared_permission=APIHelper.SKIP, - group_permission=APIHelper.SKIP): - """Constructor for the DependentPermission class""" - - # Initialize members of the class - if id is not APIHelper.SKIP: - self.id = id - if name is not APIHelper.SKIP: - self.name = name - if mtype is not APIHelper.SKIP: - self.mtype = mtype - if permission is not APIHelper.SKIP: - self.permission = permission - if shared_permission is not APIHelper.SKIP: - self.shared_permission = shared_permission - if group_permission is not APIHelper.SKIP: - self.group_permission = group_permission - - @classmethod - def from_dictionary(cls, - dictionary): - """Creates an instance of this model from a dictionary - - Args: - dictionary (dictionary): A dictionary representation of the object - as obtained from the deserialization of the server's response. The - keys MUST match property names in the API description. - - Returns: - object: An instance of this structure class. - - """ - if dictionary is None: - return None - - # Extract variables from the dictionary - - id = dictionary.get("id") if dictionary.get("id") else APIHelper.SKIP - name = dictionary.get("name") if dictionary.get("name") else APIHelper.SKIP - mtype = dictionary.get("type") if dictionary.get("type") else APIHelper.SKIP - permission = dictionary.get("permission") if dictionary.get("permission") else APIHelper.SKIP - shared_permission = dictionary.get("sharedPermission") if dictionary.get("sharedPermission") else APIHelper.SKIP - group_permission = None - if dictionary.get('groupPermission') is not None: - group_permission = [GroupPermission.from_dictionary(x) for x in dictionary.get('groupPermission')] - else: - group_permission = APIHelper.SKIP - # Return an object of this model - return cls(id, - name, - mtype, - permission, - shared_permission, - group_permission) diff --git a/Python/thoughtspotpublicrestapi/models/format_type_3_enum.py b/Python/thoughtspotpublicrestapi/models/format_type_3_enum.py deleted file mode 100644 index 979e21742..000000000 --- a/Python/thoughtspotpublicrestapi/models/format_type_3_enum.py +++ /dev/null @@ -1,25 +0,0 @@ -# -*- coding: utf-8 -*- - -""" -thoughtspotpublicrestapi - -This file was automatically generated by APIMATIC v3.0 ( - https://www.apimatic.io ). -""" - - -class FormatType3Enum(object): - - """Implementation of the 'FormatType3' enum. - - The format in which to export the objects - - Attributes: - YAML: TODO: type description here. - JSON: TODO: type description here. - - """ - - YAML = 'YAML' - - JSON = 'JSON' diff --git a/Python/thoughtspotpublicrestapi/models/format_type_enum.py b/Python/thoughtspotpublicrestapi/models/format_type_enum.py deleted file mode 100644 index a98b7ba0d..000000000 --- a/Python/thoughtspotpublicrestapi/models/format_type_enum.py +++ /dev/null @@ -1,27 +0,0 @@ -# -*- coding: utf-8 -*- - -""" -thoughtspotpublicrestapi - -This file was automatically generated by APIMATIC v3.0 ( - https://www.apimatic.io ). -""" - - -class FormatTypeEnum(object): - - """Implementation of the 'FormatType' enum. - - The format of the data in the response. - FULL: The response comes in "column":"value" format. - COMPACT: The response includes only the value of the columns. - - Attributes: - COMPACT: TODO: type description here. - FULL: TODO: type description here. - - """ - - COMPACT = 'COMPACT' - - FULL = 'FULL' diff --git a/Python/thoughtspotpublicrestapi/models/from_user_name_and_id_input.py b/Python/thoughtspotpublicrestapi/models/from_user_name_and_id_input.py deleted file mode 100644 index d0ee6a763..000000000 --- a/Python/thoughtspotpublicrestapi/models/from_user_name_and_id_input.py +++ /dev/null @@ -1,75 +0,0 @@ -# -*- coding: utf-8 -*- - -""" -thoughtspotpublicrestapi - -This file was automatically generated by APIMATIC v3.0 ( - https://www.apimatic.io ). -""" -from thoughtspotpublicrestapi.api_helper import APIHelper - - -class FromUserNameAndIDInput(object): - - """Implementation of the 'FromUserNameAndIDInput' model. - - A JSON object of name or GUIDs of the current owner of the objects. When - both are given then id is considered. - If a list of object ids are provided as input for TsObjectId, then only - for those ids that have owner as the value provided in fromUser, the owner - will be changed. - Provide either name or id as input. When both are given user id will be - considered. - - Attributes: - name (string): Username of the user - id (string): GUID of the user - - """ - - # Create a mapping from Model property names to API property names - _names = { - "name": 'name', - "id": 'id' - } - - _optionals = [ - 'name', - 'id', - ] - - def __init__(self, - name=APIHelper.SKIP, - id=APIHelper.SKIP): - """Constructor for the FromUserNameAndIDInput class""" - - # Initialize members of the class - if name is not APIHelper.SKIP: - self.name = name - if id is not APIHelper.SKIP: - self.id = id - - @classmethod - def from_dictionary(cls, - dictionary): - """Creates an instance of this model from a dictionary - - Args: - dictionary (dictionary): A dictionary representation of the object - as obtained from the deserialization of the server's response. The - keys MUST match property names in the API description. - - Returns: - object: An instance of this structure class. - - """ - if dictionary is None: - return None - - # Extract variables from the dictionary - - name = dictionary.get("name") if dictionary.get("name") else APIHelper.SKIP - id = dictionary.get("id") if dictionary.get("id") else APIHelper.SKIP - # Return an object of this model - return cls(name, - id) diff --git a/Python/thoughtspotpublicrestapi/models/group_name_and_id.py b/Python/thoughtspotpublicrestapi/models/group_name_and_id.py deleted file mode 100644 index 893bca1bd..000000000 --- a/Python/thoughtspotpublicrestapi/models/group_name_and_id.py +++ /dev/null @@ -1,69 +0,0 @@ -# -*- coding: utf-8 -*- - -""" -thoughtspotpublicrestapi - -This file was automatically generated by APIMATIC v3.0 ( - https://www.apimatic.io ). -""" -from thoughtspotpublicrestapi.api_helper import APIHelper - - -class GroupNameAndID(object): - - """Implementation of the 'GroupNameAndID' model. - - TODO: type model description here. - - Attributes: - name (string): Name of the group - id (string): GUID of the group - - """ - - # Create a mapping from Model property names to API property names - _names = { - "name": 'name', - "id": 'id' - } - - _optionals = [ - 'name', - 'id', - ] - - def __init__(self, - name=APIHelper.SKIP, - id=APIHelper.SKIP): - """Constructor for the GroupNameAndID class""" - - # Initialize members of the class - if name is not APIHelper.SKIP: - self.name = name - if id is not APIHelper.SKIP: - self.id = id - - @classmethod - def from_dictionary(cls, - dictionary): - """Creates an instance of this model from a dictionary - - Args: - dictionary (dictionary): A dictionary representation of the object - as obtained from the deserialization of the server's response. The - keys MUST match property names in the API description. - - Returns: - object: An instance of this structure class. - - """ - if dictionary is None: - return None - - # Extract variables from the dictionary - - name = dictionary.get("name") if dictionary.get("name") else APIHelper.SKIP - id = dictionary.get("id") if dictionary.get("id") else APIHelper.SKIP - # Return an object of this model - return cls(name, - id) diff --git a/Python/thoughtspotpublicrestapi/models/group_name_and_id_input.py b/Python/thoughtspotpublicrestapi/models/group_name_and_id_input.py deleted file mode 100644 index c2444487d..000000000 --- a/Python/thoughtspotpublicrestapi/models/group_name_and_id_input.py +++ /dev/null @@ -1,69 +0,0 @@ -# -*- coding: utf-8 -*- - -""" -thoughtspotpublicrestapi - -This file was automatically generated by APIMATIC v3.0 ( - https://www.apimatic.io ). -""" -from thoughtspotpublicrestapi.api_helper import APIHelper - - -class GroupNameAndIDInput(object): - - """Implementation of the 'GroupNameAndIDInput' model. - - TODO: type model description here. - - Attributes: - name (string): Name of the group - id (string): GUID of the group - - """ - - # Create a mapping from Model property names to API property names - _names = { - "name": 'name', - "id": 'id' - } - - _optionals = [ - 'name', - 'id', - ] - - def __init__(self, - name=APIHelper.SKIP, - id=APIHelper.SKIP): - """Constructor for the GroupNameAndIDInput class""" - - # Initialize members of the class - if name is not APIHelper.SKIP: - self.name = name - if id is not APIHelper.SKIP: - self.id = id - - @classmethod - def from_dictionary(cls, - dictionary): - """Creates an instance of this model from a dictionary - - Args: - dictionary (dictionary): A dictionary representation of the object - as obtained from the deserialization of the server's response. The - keys MUST match property names in the API description. - - Returns: - object: An instance of this structure class. - - """ - if dictionary is None: - return None - - # Extract variables from the dictionary - - name = dictionary.get("name") if dictionary.get("name") else APIHelper.SKIP - id = dictionary.get("id") if dictionary.get("id") else APIHelper.SKIP - # Return an object of this model - return cls(name, - id) diff --git a/Python/thoughtspotpublicrestapi/models/group_permission.py b/Python/thoughtspotpublicrestapi/models/group_permission.py deleted file mode 100644 index da6afb88a..000000000 --- a/Python/thoughtspotpublicrestapi/models/group_permission.py +++ /dev/null @@ -1,78 +0,0 @@ -# -*- coding: utf-8 -*- - -""" -thoughtspotpublicrestapi - -This file was automatically generated by APIMATIC v3.0 ( - https://www.apimatic.io ). -""" -from thoughtspotpublicrestapi.api_helper import APIHelper - - -class GroupPermission(object): - - """Implementation of the 'GroupPermission' model. - - TODO: type model description here. - - Attributes: - id (string): GUID of the user group - name (string): Name of the user group - permission (string): Indicates the permission which user group has on - the object - - """ - - # Create a mapping from Model property names to API property names - _names = { - "id": 'id', - "name": 'name', - "permission": 'permission' - } - - _optionals = [ - 'id', - 'name', - 'permission', - ] - - def __init__(self, - id=APIHelper.SKIP, - name=APIHelper.SKIP, - permission=APIHelper.SKIP): - """Constructor for the GroupPermission class""" - - # Initialize members of the class - if id is not APIHelper.SKIP: - self.id = id - if name is not APIHelper.SKIP: - self.name = name - if permission is not APIHelper.SKIP: - self.permission = permission - - @classmethod - def from_dictionary(cls, - dictionary): - """Creates an instance of this model from a dictionary - - Args: - dictionary (dictionary): A dictionary representation of the object - as obtained from the deserialization of the server's response. The - keys MUST match property names in the API description. - - Returns: - object: An instance of this structure class. - - """ - if dictionary is None: - return None - - # Extract variables from the dictionary - - id = dictionary.get("id") if dictionary.get("id") else APIHelper.SKIP - name = dictionary.get("name") if dictionary.get("name") else APIHelper.SKIP - permission = dictionary.get("permission") if dictionary.get("permission") else APIHelper.SKIP - # Return an object of this model - return cls(id, - name, - permission) diff --git a/Python/thoughtspotpublicrestapi/models/group_response.py b/Python/thoughtspotpublicrestapi/models/group_response.py deleted file mode 100644 index d91bc5bb3..000000000 --- a/Python/thoughtspotpublicrestapi/models/group_response.py +++ /dev/null @@ -1,317 +0,0 @@ -# -*- coding: utf-8 -*- - -""" -thoughtspotpublicrestapi - -This file was automatically generated by APIMATIC v3.0 ( - https://www.apimatic.io ). -""" -from thoughtspotpublicrestapi.api_helper import APIHelper -from thoughtspotpublicrestapi.models.group_name_and_id import GroupNameAndID -from thoughtspotpublicrestapi.models.liveboard_name_and_id import LiveboardNameAndID -from thoughtspotpublicrestapi.models.org_type import OrgType -from thoughtspotpublicrestapi.models.user_name_and_id import UserNameAndID - - -class GroupResponse(object): - - """Implementation of the 'GroupResponse' model. - - TODO: type model description here. - - Attributes: - name (string): Name of the group - display_name (string): A unique display name string for the user - group - id (string): GUID of the group - visibility (string): Visibility of the group - description (string): Description of the group - privileges (list of string): Privileges assigned to the group - orgs (list of OrgType): The organizations that user belongs to - groups (list of GroupNameAndID): Name of the group to which is added - users (list of UserNameAndID): User Group Information by Id or Name. - assigned_liveboards (list of LiveboardNameAndID): Liveboards assigned - to the group - user_group_content (object): TODO: type description here. - tags (list of string): Tags assigned to the group - is_deleted (bool): Indicates if the group is deleted - is_hidden (bool): Indicates if the group is hidden - is_external (bool): Indicates if the group is from external system - is_deprecated (bool): TODO: type description here. - complete (bool): Indicates if the all the properties of group is - provided - is_system_principal (bool): Indicates if the group is system - principal - mtype (string): Indicates the type of group - parenttype (string): Indicates the type of parent object - group_idx (int): TODO: type description here. - metadata_version (int): TODO: type description here. - tenant_id (string): Tenant id associated with the group - index_version (float): TODO: type description here. - generation_num (float): TODO: type description here. - created (float): Date and time when group was created - modified (float): Date and time of last modification of the group - author (UserNameAndID): TODO: type description here. - modified_by (UserNameAndID): TODO: type description here. - owner (UserNameAndID): TODO: type description here. - - """ - - # Create a mapping from Model property names to API property names - _names = { - "name": 'name', - "display_name": 'displayName', - "id": 'id', - "visibility": 'visibility', - "description": 'description', - "privileges": 'privileges', - "orgs": 'orgs', - "groups": 'groups', - "users": 'users', - "assigned_liveboards": 'assignedLiveboards', - "user_group_content": 'userGroupContent', - "tags": 'tags', - "is_deleted": 'isDeleted', - "is_hidden": 'isHidden', - "is_external": 'isExternal', - "is_deprecated": 'isDeprecated', - "complete": 'complete', - "is_system_principal": 'isSystemPrincipal', - "mtype": 'type', - "parenttype": 'parenttype', - "group_idx": 'groupIdx', - "metadata_version": 'metadataVersion', - "tenant_id": 'tenantId', - "index_version": 'indexVersion', - "generation_num": 'generationNum', - "created": 'created', - "modified": 'modified', - "author": 'author', - "modified_by": 'modifiedBy', - "owner": 'owner' - } - - _optionals = [ - 'name', - 'display_name', - 'id', - 'visibility', - 'description', - 'privileges', - 'orgs', - 'groups', - 'users', - 'assigned_liveboards', - 'user_group_content', - 'tags', - 'is_deleted', - 'is_hidden', - 'is_external', - 'is_deprecated', - 'complete', - 'is_system_principal', - 'mtype', - 'parenttype', - 'group_idx', - 'metadata_version', - 'tenant_id', - 'index_version', - 'generation_num', - 'created', - 'modified', - 'author', - 'modified_by', - 'owner', - ] - - def __init__(self, - name=APIHelper.SKIP, - display_name=APIHelper.SKIP, - id=APIHelper.SKIP, - visibility=APIHelper.SKIP, - description=APIHelper.SKIP, - privileges=APIHelper.SKIP, - orgs=APIHelper.SKIP, - groups=APIHelper.SKIP, - users=APIHelper.SKIP, - assigned_liveboards=APIHelper.SKIP, - user_group_content=APIHelper.SKIP, - tags=APIHelper.SKIP, - is_deleted=APIHelper.SKIP, - is_hidden=APIHelper.SKIP, - is_external=APIHelper.SKIP, - is_deprecated=APIHelper.SKIP, - complete=APIHelper.SKIP, - is_system_principal=APIHelper.SKIP, - mtype=APIHelper.SKIP, - parenttype=APIHelper.SKIP, - group_idx=APIHelper.SKIP, - metadata_version=APIHelper.SKIP, - tenant_id=APIHelper.SKIP, - index_version=APIHelper.SKIP, - generation_num=APIHelper.SKIP, - created=APIHelper.SKIP, - modified=APIHelper.SKIP, - author=APIHelper.SKIP, - modified_by=APIHelper.SKIP, - owner=APIHelper.SKIP): - """Constructor for the GroupResponse class""" - - # Initialize members of the class - if name is not APIHelper.SKIP: - self.name = name - if display_name is not APIHelper.SKIP: - self.display_name = display_name - if id is not APIHelper.SKIP: - self.id = id - if visibility is not APIHelper.SKIP: - self.visibility = visibility - if description is not APIHelper.SKIP: - self.description = description - if privileges is not APIHelper.SKIP: - self.privileges = privileges - if orgs is not APIHelper.SKIP: - self.orgs = orgs - if groups is not APIHelper.SKIP: - self.groups = groups - if users is not APIHelper.SKIP: - self.users = users - if assigned_liveboards is not APIHelper.SKIP: - self.assigned_liveboards = assigned_liveboards - if user_group_content is not APIHelper.SKIP: - self.user_group_content = user_group_content - if tags is not APIHelper.SKIP: - self.tags = tags - if is_deleted is not APIHelper.SKIP: - self.is_deleted = is_deleted - if is_hidden is not APIHelper.SKIP: - self.is_hidden = is_hidden - if is_external is not APIHelper.SKIP: - self.is_external = is_external - if is_deprecated is not APIHelper.SKIP: - self.is_deprecated = is_deprecated - if complete is not APIHelper.SKIP: - self.complete = complete - if is_system_principal is not APIHelper.SKIP: - self.is_system_principal = is_system_principal - if mtype is not APIHelper.SKIP: - self.mtype = mtype - if parenttype is not APIHelper.SKIP: - self.parenttype = parenttype - if group_idx is not APIHelper.SKIP: - self.group_idx = group_idx - if metadata_version is not APIHelper.SKIP: - self.metadata_version = metadata_version - if tenant_id is not APIHelper.SKIP: - self.tenant_id = tenant_id - if index_version is not APIHelper.SKIP: - self.index_version = index_version - if generation_num is not APIHelper.SKIP: - self.generation_num = generation_num - if created is not APIHelper.SKIP: - self.created = created - if modified is not APIHelper.SKIP: - self.modified = modified - if author is not APIHelper.SKIP: - self.author = author - if modified_by is not APIHelper.SKIP: - self.modified_by = modified_by - if owner is not APIHelper.SKIP: - self.owner = owner - - @classmethod - def from_dictionary(cls, - dictionary): - """Creates an instance of this model from a dictionary - - Args: - dictionary (dictionary): A dictionary representation of the object - as obtained from the deserialization of the server's response. The - keys MUST match property names in the API description. - - Returns: - object: An instance of this structure class. - - """ - if dictionary is None: - return None - - # Extract variables from the dictionary - - name = dictionary.get("name") if dictionary.get("name") else APIHelper.SKIP - display_name = dictionary.get("displayName") if dictionary.get("displayName") else APIHelper.SKIP - id = dictionary.get("id") if dictionary.get("id") else APIHelper.SKIP - visibility = dictionary.get("visibility") if dictionary.get("visibility") else APIHelper.SKIP - description = dictionary.get("description") if dictionary.get("description") else APIHelper.SKIP - privileges = dictionary.get("privileges") if dictionary.get("privileges") else APIHelper.SKIP - orgs = None - if dictionary.get('orgs') is not None: - orgs = [OrgType.from_dictionary(x) for x in dictionary.get('orgs')] - else: - orgs = APIHelper.SKIP - groups = None - if dictionary.get('groups') is not None: - groups = [GroupNameAndID.from_dictionary(x) for x in dictionary.get('groups')] - else: - groups = APIHelper.SKIP - users = None - if dictionary.get('users') is not None: - users = [UserNameAndID.from_dictionary(x) for x in dictionary.get('users')] - else: - users = APIHelper.SKIP - assigned_liveboards = None - if dictionary.get('assignedLiveboards') is not None: - assigned_liveboards = [LiveboardNameAndID.from_dictionary(x) for x in dictionary.get('assignedLiveboards')] - else: - assigned_liveboards = APIHelper.SKIP - user_group_content = dictionary.get("userGroupContent") if dictionary.get("userGroupContent") else APIHelper.SKIP - tags = dictionary.get("tags") if dictionary.get("tags") else APIHelper.SKIP - is_deleted = dictionary.get("isDeleted") if "isDeleted" in dictionary.keys() else APIHelper.SKIP - is_hidden = dictionary.get("isHidden") if "isHidden" in dictionary.keys() else APIHelper.SKIP - is_external = dictionary.get("isExternal") if "isExternal" in dictionary.keys() else APIHelper.SKIP - is_deprecated = dictionary.get("isDeprecated") if "isDeprecated" in dictionary.keys() else APIHelper.SKIP - complete = dictionary.get("complete") if "complete" in dictionary.keys() else APIHelper.SKIP - is_system_principal = dictionary.get("isSystemPrincipal") if "isSystemPrincipal" in dictionary.keys() else APIHelper.SKIP - mtype = dictionary.get("type") if dictionary.get("type") else APIHelper.SKIP - parenttype = dictionary.get("parenttype") if dictionary.get("parenttype") else APIHelper.SKIP - group_idx = dictionary.get("groupIdx") if dictionary.get("groupIdx") else APIHelper.SKIP - metadata_version = dictionary.get("metadataVersion") if dictionary.get("metadataVersion") else APIHelper.SKIP - tenant_id = dictionary.get("tenantId") if dictionary.get("tenantId") else APIHelper.SKIP - index_version = dictionary.get("indexVersion") if dictionary.get("indexVersion") else APIHelper.SKIP - generation_num = dictionary.get("generationNum") if dictionary.get("generationNum") else APIHelper.SKIP - created = dictionary.get("created") if dictionary.get("created") else APIHelper.SKIP - modified = dictionary.get("modified") if dictionary.get("modified") else APIHelper.SKIP - author = UserNameAndID.from_dictionary(dictionary.get('author')) if 'author' in dictionary.keys() else APIHelper.SKIP - modified_by = UserNameAndID.from_dictionary(dictionary.get('modifiedBy')) if 'modifiedBy' in dictionary.keys() else APIHelper.SKIP - owner = UserNameAndID.from_dictionary(dictionary.get('owner')) if 'owner' in dictionary.keys() else APIHelper.SKIP - # Return an object of this model - return cls(name, - display_name, - id, - visibility, - description, - privileges, - orgs, - groups, - users, - assigned_liveboards, - user_group_content, - tags, - is_deleted, - is_hidden, - is_external, - is_deprecated, - complete, - is_system_principal, - mtype, - parenttype, - group_idx, - metadata_version, - tenant_id, - index_version, - generation_num, - created, - modified, - author, - modified_by, - owner) diff --git a/Python/thoughtspotpublicrestapi/models/home_liveboard_response.py b/Python/thoughtspotpublicrestapi/models/home_liveboard_response.py deleted file mode 100644 index 4d228bade..000000000 --- a/Python/thoughtspotpublicrestapi/models/home_liveboard_response.py +++ /dev/null @@ -1,85 +0,0 @@ -# -*- coding: utf-8 -*- - -""" -thoughtspotpublicrestapi - -This file was automatically generated by APIMATIC v3.0 ( - https://www.apimatic.io ). -""" -from thoughtspotpublicrestapi.api_helper import APIHelper - - -class HomeLiveboardResponse(object): - - """Implementation of the 'HomeLiveboardResponse' model. - - TODO: type model description here. - - Attributes: - user_name (string): Name of the user - user_id (string): The GUID of the user - liveboard_name (string): Name of the liveboard - liveboard_id (string): The GUID of the liveboard - - """ - - # Create a mapping from Model property names to API property names - _names = { - "user_name": 'userName', - "user_id": 'userId', - "liveboard_name": 'liveboardName', - "liveboard_id": 'liveboardId' - } - - _optionals = [ - 'user_name', - 'user_id', - 'liveboard_name', - 'liveboard_id', - ] - - def __init__(self, - user_name=APIHelper.SKIP, - user_id=APIHelper.SKIP, - liveboard_name=APIHelper.SKIP, - liveboard_id=APIHelper.SKIP): - """Constructor for the HomeLiveboardResponse class""" - - # Initialize members of the class - if user_name is not APIHelper.SKIP: - self.user_name = user_name - if user_id is not APIHelper.SKIP: - self.user_id = user_id - if liveboard_name is not APIHelper.SKIP: - self.liveboard_name = liveboard_name - if liveboard_id is not APIHelper.SKIP: - self.liveboard_id = liveboard_id - - @classmethod - def from_dictionary(cls, - dictionary): - """Creates an instance of this model from a dictionary - - Args: - dictionary (dictionary): A dictionary representation of the object - as obtained from the deserialization of the server's response. The - keys MUST match property names in the API description. - - Returns: - object: An instance of this structure class. - - """ - if dictionary is None: - return None - - # Extract variables from the dictionary - - user_name = dictionary.get("userName") if dictionary.get("userName") else APIHelper.SKIP - user_id = dictionary.get("userId") if dictionary.get("userId") else APIHelper.SKIP - liveboard_name = dictionary.get("liveboardName") if dictionary.get("liveboardName") else APIHelper.SKIP - liveboard_id = dictionary.get("liveboardId") if dictionary.get("liveboardId") else APIHelper.SKIP - # Return an object of this model - return cls(user_name, - user_id, - liveboard_name, - liveboard_id) diff --git a/Python/thoughtspotpublicrestapi/models/import_policy_enum.py b/Python/thoughtspotpublicrestapi/models/import_policy_enum.py deleted file mode 100644 index 0e2372f54..000000000 --- a/Python/thoughtspotpublicrestapi/models/import_policy_enum.py +++ /dev/null @@ -1,28 +0,0 @@ -# -*- coding: utf-8 -*- - -""" -thoughtspotpublicrestapi - -This file was automatically generated by APIMATIC v3.0 ( - https://www.apimatic.io ). -""" - - -class ImportPolicyEnum(object): - - """Implementation of the 'ImportPolicy' enum. - - Policy to follow during import - - Attributes: - PARTIAL: TODO: type description here. - ALL_OR_NONE: TODO: type description here. - VALIDATE_ONLY: TODO: type description here. - - """ - - PARTIAL = 'PARTIAL' - - ALL_OR_NONE = 'ALL_OR_NONE' - - VALIDATE_ONLY = 'VALIDATE_ONLY' diff --git a/Python/thoughtspotpublicrestapi/models/liveboard_name_and_id.py b/Python/thoughtspotpublicrestapi/models/liveboard_name_and_id.py deleted file mode 100644 index 0673ce398..000000000 --- a/Python/thoughtspotpublicrestapi/models/liveboard_name_and_id.py +++ /dev/null @@ -1,69 +0,0 @@ -# -*- coding: utf-8 -*- - -""" -thoughtspotpublicrestapi - -This file was automatically generated by APIMATIC v3.0 ( - https://www.apimatic.io ). -""" -from thoughtspotpublicrestapi.api_helper import APIHelper - - -class LiveboardNameAndID(object): - - """Implementation of the 'LiveboardNameAndID' model. - - TODO: type model description here. - - Attributes: - name (string): Name of the liveboard - id (string): GUID of the liveboard - - """ - - # Create a mapping from Model property names to API property names - _names = { - "name": 'name', - "id": 'id' - } - - _optionals = [ - 'name', - 'id', - ] - - def __init__(self, - name=APIHelper.SKIP, - id=APIHelper.SKIP): - """Constructor for the LiveboardNameAndID class""" - - # Initialize members of the class - if name is not APIHelper.SKIP: - self.name = name - if id is not APIHelper.SKIP: - self.id = id - - @classmethod - def from_dictionary(cls, - dictionary): - """Creates an instance of this model from a dictionary - - Args: - dictionary (dictionary): A dictionary representation of the object - as obtained from the deserialization of the server's response. The - keys MUST match property names in the API description. - - Returns: - object: An instance of this structure class. - - """ - if dictionary is None: - return None - - # Extract variables from the dictionary - - name = dictionary.get("name") if dictionary.get("name") else APIHelper.SKIP - id = dictionary.get("id") if dictionary.get("id") else APIHelper.SKIP - # Return an object of this model - return cls(name, - id) diff --git a/Python/thoughtspotpublicrestapi/models/liveboard_query_response.py b/Python/thoughtspotpublicrestapi/models/liveboard_query_response.py deleted file mode 100644 index c0ee9402f..000000000 --- a/Python/thoughtspotpublicrestapi/models/liveboard_query_response.py +++ /dev/null @@ -1,82 +0,0 @@ -# -*- coding: utf-8 -*- - -""" -thoughtspotpublicrestapi - -This file was automatically generated by APIMATIC v3.0 ( - https://www.apimatic.io ). -""" -from thoughtspotpublicrestapi.api_helper import APIHelper -from thoughtspotpublicrestapi.models.viz_type import VizType - - -class LiveboardQueryResponse(object): - - """Implementation of the 'LiveboardQueryResponse' model. - - TODO: type model description here. - - Attributes: - name (string): The name of the Liveboard - id (string): The GUID of the Liveboard - viz (list of VizType): SQL query associated with the saved Answer - - """ - - # Create a mapping from Model property names to API property names - _names = { - "name": 'name', - "id": 'id', - "viz": 'viz' - } - - _optionals = [ - 'name', - 'id', - 'viz', - ] - - def __init__(self, - name=APIHelper.SKIP, - id=APIHelper.SKIP, - viz=APIHelper.SKIP): - """Constructor for the LiveboardQueryResponse class""" - - # Initialize members of the class - if name is not APIHelper.SKIP: - self.name = name - if id is not APIHelper.SKIP: - self.id = id - if viz is not APIHelper.SKIP: - self.viz = viz - - @classmethod - def from_dictionary(cls, - dictionary): - """Creates an instance of this model from a dictionary - - Args: - dictionary (dictionary): A dictionary representation of the object - as obtained from the deserialization of the server's response. The - keys MUST match property names in the API description. - - Returns: - object: An instance of this structure class. - - """ - if dictionary is None: - return None - - # Extract variables from the dictionary - - name = dictionary.get("name") if dictionary.get("name") else APIHelper.SKIP - id = dictionary.get("id") if dictionary.get("id") else APIHelper.SKIP - viz = None - if dictionary.get('viz') is not None: - viz = [VizType.from_dictionary(x) for x in dictionary.get('viz')] - else: - viz = APIHelper.SKIP - # Return an object of this model - return cls(name, - id, - viz) diff --git a/Python/thoughtspotpublicrestapi/models/logical_table_header.py b/Python/thoughtspotpublicrestapi/models/logical_table_header.py deleted file mode 100644 index f0f300872..000000000 --- a/Python/thoughtspotpublicrestapi/models/logical_table_header.py +++ /dev/null @@ -1,181 +0,0 @@ -# -*- coding: utf-8 -*- - -""" -thoughtspotpublicrestapi - -This file was automatically generated by APIMATIC v3.0 ( - https://www.apimatic.io ). -""" -from thoughtspotpublicrestapi.api_helper import APIHelper - - -class LogicalTableHeader(object): - - """Implementation of the 'LogicalTableHeader' model. - - TODO: type model description here. - - Attributes: - id (string): TODO: type description here. - name (string): TODO: type description here. - author (string): TODO: type description here. - author_name (string): TODO: type description here. - author_display_name (string): TODO: type description here. - created (float): TODO: type description here. - modified (float): TODO: type description here. - modified_by (string): TODO: type description here. - generation_num (int): TODO: type description here. - owner (string): TODO: type description here. - deleted (bool): TODO: type description here. - hidden (bool): TODO: type description here. - database (string): TODO: type description here. - schema (string): TODO: type description here. - mtype (string): TODO: type description here. - sub_type (string): TODO: type description here. - - """ - - # Create a mapping from Model property names to API property names - _names = { - "id": 'id', - "name": 'name', - "author": 'author', - "author_name": 'authorName', - "author_display_name": 'authorDisplayName', - "created": 'created', - "modified": 'modified', - "modified_by": 'modifiedBy', - "generation_num": 'generationNum', - "owner": 'owner', - "deleted": 'deleted', - "hidden": 'hidden', - "database": 'database', - "schema": 'schema', - "mtype": 'type', - "sub_type": 'subType' - } - - _optionals = [ - 'id', - 'name', - 'author', - 'author_name', - 'author_display_name', - 'created', - 'modified', - 'modified_by', - 'generation_num', - 'owner', - 'deleted', - 'hidden', - 'database', - 'schema', - 'mtype', - 'sub_type', - ] - - def __init__(self, - id=APIHelper.SKIP, - name=APIHelper.SKIP, - author=APIHelper.SKIP, - author_name=APIHelper.SKIP, - author_display_name=APIHelper.SKIP, - created=APIHelper.SKIP, - modified=APIHelper.SKIP, - modified_by=APIHelper.SKIP, - generation_num=APIHelper.SKIP, - owner=APIHelper.SKIP, - deleted=APIHelper.SKIP, - hidden=APIHelper.SKIP, - database=APIHelper.SKIP, - schema=APIHelper.SKIP, - mtype=APIHelper.SKIP, - sub_type=APIHelper.SKIP): - """Constructor for the LogicalTableHeader class""" - - # Initialize members of the class - if id is not APIHelper.SKIP: - self.id = id - if name is not APIHelper.SKIP: - self.name = name - if author is not APIHelper.SKIP: - self.author = author - if author_name is not APIHelper.SKIP: - self.author_name = author_name - if author_display_name is not APIHelper.SKIP: - self.author_display_name = author_display_name - if created is not APIHelper.SKIP: - self.created = created - if modified is not APIHelper.SKIP: - self.modified = modified - if modified_by is not APIHelper.SKIP: - self.modified_by = modified_by - if generation_num is not APIHelper.SKIP: - self.generation_num = generation_num - if owner is not APIHelper.SKIP: - self.owner = owner - if deleted is not APIHelper.SKIP: - self.deleted = deleted - if hidden is not APIHelper.SKIP: - self.hidden = hidden - if database is not APIHelper.SKIP: - self.database = database - if schema is not APIHelper.SKIP: - self.schema = schema - if mtype is not APIHelper.SKIP: - self.mtype = mtype - if sub_type is not APIHelper.SKIP: - self.sub_type = sub_type - - @classmethod - def from_dictionary(cls, - dictionary): - """Creates an instance of this model from a dictionary - - Args: - dictionary (dictionary): A dictionary representation of the object - as obtained from the deserialization of the server's response. The - keys MUST match property names in the API description. - - Returns: - object: An instance of this structure class. - - """ - if dictionary is None: - return None - - # Extract variables from the dictionary - - id = dictionary.get("id") if dictionary.get("id") else APIHelper.SKIP - name = dictionary.get("name") if dictionary.get("name") else APIHelper.SKIP - author = dictionary.get("author") if dictionary.get("author") else APIHelper.SKIP - author_name = dictionary.get("authorName") if dictionary.get("authorName") else APIHelper.SKIP - author_display_name = dictionary.get("authorDisplayName") if dictionary.get("authorDisplayName") else APIHelper.SKIP - created = dictionary.get("created") if dictionary.get("created") else APIHelper.SKIP - modified = dictionary.get("modified") if dictionary.get("modified") else APIHelper.SKIP - modified_by = dictionary.get("modifiedBy") if dictionary.get("modifiedBy") else APIHelper.SKIP - generation_num = dictionary.get("generationNum") if dictionary.get("generationNum") else APIHelper.SKIP - owner = dictionary.get("owner") if dictionary.get("owner") else APIHelper.SKIP - deleted = dictionary.get("deleted") if "deleted" in dictionary.keys() else APIHelper.SKIP - hidden = dictionary.get("hidden") if "hidden" in dictionary.keys() else APIHelper.SKIP - database = dictionary.get("database") if dictionary.get("database") else APIHelper.SKIP - schema = dictionary.get("schema") if dictionary.get("schema") else APIHelper.SKIP - mtype = dictionary.get("type") if dictionary.get("type") else APIHelper.SKIP - sub_type = dictionary.get("subType") if dictionary.get("subType") else APIHelper.SKIP - # Return an object of this model - return cls(id, - name, - author, - author_name, - author_display_name, - created, - modified, - modified_by, - generation_num, - owner, - deleted, - hidden, - database, - schema, - mtype, - sub_type) diff --git a/Python/thoughtspotpublicrestapi/models/logs_response.py b/Python/thoughtspotpublicrestapi/models/logs_response.py deleted file mode 100644 index 43ec4fa35..000000000 --- a/Python/thoughtspotpublicrestapi/models/logs_response.py +++ /dev/null @@ -1,72 +0,0 @@ -# -*- coding: utf-8 -*- - -""" -thoughtspotpublicrestapi - -This file was automatically generated by APIMATIC v3.0 ( - https://www.apimatic.io ). -""" -from thoughtspotpublicrestapi.api_helper import APIHelper - - -class LogsResponse(object): - - """Implementation of the 'LogsResponse' model. - - TODO: type model description here. - - Attributes: - date (string): Date and time for the event in the log - log (string): Logged event at the time specified in JSON format. This - includes, Event ID, A unique description of the event, for - example, User login failed, Timestamp, User ID of the person - initiating the event and IP address of the ThoughtSpot instance. - - """ - - # Create a mapping from Model property names to API property names - _names = { - "date": 'date', - "log": 'log' - } - - _optionals = [ - 'date', - 'log', - ] - - def __init__(self, - date=APIHelper.SKIP, - log=APIHelper.SKIP): - """Constructor for the LogsResponse class""" - - # Initialize members of the class - if date is not APIHelper.SKIP: - self.date = date - if log is not APIHelper.SKIP: - self.log = log - - @classmethod - def from_dictionary(cls, - dictionary): - """Creates an instance of this model from a dictionary - - Args: - dictionary (dictionary): A dictionary representation of the object - as obtained from the deserialization of the server's response. The - keys MUST match property names in the API description. - - Returns: - object: An instance of this structure class. - - """ - if dictionary is None: - return None - - # Extract variables from the dictionary - - date = dictionary.get("date") if dictionary.get("date") else APIHelper.SKIP - log = dictionary.get("log") if dictionary.get("log") else APIHelper.SKIP - # Return an object of this model - return cls(date, - log) diff --git a/Python/thoughtspotpublicrestapi/models/metadata_tag_response.py b/Python/thoughtspotpublicrestapi/models/metadata_tag_response.py deleted file mode 100644 index 8136776ec..000000000 --- a/Python/thoughtspotpublicrestapi/models/metadata_tag_response.py +++ /dev/null @@ -1,167 +0,0 @@ -# -*- coding: utf-8 -*- - -""" -thoughtspotpublicrestapi - -This file was automatically generated by APIMATIC v3.0 ( - https://www.apimatic.io ). -""" -from thoughtspotpublicrestapi.api_helper import APIHelper -from thoughtspotpublicrestapi.models.client_state import ClientState -from thoughtspotpublicrestapi.models.tag_name_and_id import TagNameAndID - - -class MetadataTagResponse(object): - - """Implementation of the 'MetadataTagResponse' model. - - TODO: type model description here. - - Attributes: - name (string): Name of the tag - id (string): GUID of the tag - client_state (ClientState): TODO: type description here. - index_version (float): TODO: type description here. - generation_num (float): TODO: type description here. - is_deleted (bool): Indicates if the tag is deleted - is_hidden (bool): Indicates if the tag is hidden - is_external (bool): Indicates if the tag is from external system - is_deprecated (bool): TODO: type description here. - created (float): Date and time when group was created - modified (float): Date and time of last modification of the group - modified_by (TagNameAndID): TODO: type description here. - author (TagNameAndID): TODO: type description here. - owner (TagNameAndID): TODO: type description here. - - """ - - # Create a mapping from Model property names to API property names - _names = { - "name": 'name', - "id": 'id', - "client_state": 'clientState', - "index_version": 'indexVersion', - "generation_num": 'generationNum', - "is_deleted": 'isDeleted', - "is_hidden": 'isHidden', - "is_external": 'isExternal', - "is_deprecated": 'isDeprecated', - "created": 'created', - "modified": 'modified', - "modified_by": 'modifiedBy', - "author": 'author', - "owner": 'owner' - } - - _optionals = [ - 'name', - 'id', - 'client_state', - 'index_version', - 'generation_num', - 'is_deleted', - 'is_hidden', - 'is_external', - 'is_deprecated', - 'created', - 'modified', - 'modified_by', - 'author', - 'owner', - ] - - def __init__(self, - name=APIHelper.SKIP, - id=APIHelper.SKIP, - client_state=APIHelper.SKIP, - index_version=APIHelper.SKIP, - generation_num=APIHelper.SKIP, - is_deleted=APIHelper.SKIP, - is_hidden=APIHelper.SKIP, - is_external=APIHelper.SKIP, - is_deprecated=APIHelper.SKIP, - created=APIHelper.SKIP, - modified=APIHelper.SKIP, - modified_by=APIHelper.SKIP, - author=APIHelper.SKIP, - owner=APIHelper.SKIP): - """Constructor for the MetadataTagResponse class""" - - # Initialize members of the class - if name is not APIHelper.SKIP: - self.name = name - if id is not APIHelper.SKIP: - self.id = id - if client_state is not APIHelper.SKIP: - self.client_state = client_state - if index_version is not APIHelper.SKIP: - self.index_version = index_version - if generation_num is not APIHelper.SKIP: - self.generation_num = generation_num - if is_deleted is not APIHelper.SKIP: - self.is_deleted = is_deleted - if is_hidden is not APIHelper.SKIP: - self.is_hidden = is_hidden - if is_external is not APIHelper.SKIP: - self.is_external = is_external - if is_deprecated is not APIHelper.SKIP: - self.is_deprecated = is_deprecated - if created is not APIHelper.SKIP: - self.created = created - if modified is not APIHelper.SKIP: - self.modified = modified - if modified_by is not APIHelper.SKIP: - self.modified_by = modified_by - if author is not APIHelper.SKIP: - self.author = author - if owner is not APIHelper.SKIP: - self.owner = owner - - @classmethod - def from_dictionary(cls, - dictionary): - """Creates an instance of this model from a dictionary - - Args: - dictionary (dictionary): A dictionary representation of the object - as obtained from the deserialization of the server's response. The - keys MUST match property names in the API description. - - Returns: - object: An instance of this structure class. - - """ - if dictionary is None: - return None - - # Extract variables from the dictionary - - name = dictionary.get("name") if dictionary.get("name") else APIHelper.SKIP - id = dictionary.get("id") if dictionary.get("id") else APIHelper.SKIP - client_state = ClientState.from_dictionary(dictionary.get('clientState')) if 'clientState' in dictionary.keys() else APIHelper.SKIP - index_version = dictionary.get("indexVersion") if dictionary.get("indexVersion") else APIHelper.SKIP - generation_num = dictionary.get("generationNum") if dictionary.get("generationNum") else APIHelper.SKIP - is_deleted = dictionary.get("isDeleted") if "isDeleted" in dictionary.keys() else APIHelper.SKIP - is_hidden = dictionary.get("isHidden") if "isHidden" in dictionary.keys() else APIHelper.SKIP - is_external = dictionary.get("isExternal") if "isExternal" in dictionary.keys() else APIHelper.SKIP - is_deprecated = dictionary.get("isDeprecated") if "isDeprecated" in dictionary.keys() else APIHelper.SKIP - created = dictionary.get("created") if dictionary.get("created") else APIHelper.SKIP - modified = dictionary.get("modified") if dictionary.get("modified") else APIHelper.SKIP - modified_by = TagNameAndID.from_dictionary(dictionary.get('modifiedBy')) if 'modifiedBy' in dictionary.keys() else APIHelper.SKIP - author = TagNameAndID.from_dictionary(dictionary.get('author')) if 'author' in dictionary.keys() else APIHelper.SKIP - owner = TagNameAndID.from_dictionary(dictionary.get('owner')) if 'owner' in dictionary.keys() else APIHelper.SKIP - # Return an object of this model - return cls(name, - id, - client_state, - index_version, - generation_num, - is_deleted, - is_hidden, - is_external, - is_deprecated, - created, - modified, - modified_by, - author, - owner) diff --git a/Python/thoughtspotpublicrestapi/models/name_and_id_input.py b/Python/thoughtspotpublicrestapi/models/name_and_id_input.py deleted file mode 100644 index 9788d9bb1..000000000 --- a/Python/thoughtspotpublicrestapi/models/name_and_id_input.py +++ /dev/null @@ -1,69 +0,0 @@ -# -*- coding: utf-8 -*- - -""" -thoughtspotpublicrestapi - -This file was automatically generated by APIMATIC v3.0 ( - https://www.apimatic.io ). -""" -from thoughtspotpublicrestapi.api_helper import APIHelper - - -class NameAndIdInput(object): - - """Implementation of the 'NameAndIdInput' model. - - TODO: type model description here. - - Attributes: - name (string): Name of the user - id (string): GUID of the user - - """ - - # Create a mapping from Model property names to API property names - _names = { - "name": 'name', - "id": 'id' - } - - _optionals = [ - 'name', - 'id', - ] - - def __init__(self, - name=APIHelper.SKIP, - id=APIHelper.SKIP): - """Constructor for the NameAndIdInput class""" - - # Initialize members of the class - if name is not APIHelper.SKIP: - self.name = name - if id is not APIHelper.SKIP: - self.id = id - - @classmethod - def from_dictionary(cls, - dictionary): - """Creates an instance of this model from a dictionary - - Args: - dictionary (dictionary): A dictionary representation of the object - as obtained from the deserialization of the server's response. The - keys MUST match property names in the API description. - - Returns: - object: An instance of this structure class. - - """ - if dictionary is None: - return None - - # Extract variables from the dictionary - - name = dictionary.get("name") if dictionary.get("name") else APIHelper.SKIP - id = dictionary.get("id") if dictionary.get("id") else APIHelper.SKIP - # Return an object of this model - return cls(name, - id) diff --git a/Python/thoughtspotpublicrestapi/models/org_type.py b/Python/thoughtspotpublicrestapi/models/org_type.py deleted file mode 100644 index fe3664a88..000000000 --- a/Python/thoughtspotpublicrestapi/models/org_type.py +++ /dev/null @@ -1,69 +0,0 @@ -# -*- coding: utf-8 -*- - -""" -thoughtspotpublicrestapi - -This file was automatically generated by APIMATIC v3.0 ( - https://www.apimatic.io ). -""" -from thoughtspotpublicrestapi.api_helper import APIHelper - - -class OrgType(object): - - """Implementation of the 'OrgType' model. - - TODO: type model description here. - - Attributes: - name (string): Name of the organization - id (int): Id of the organization - - """ - - # Create a mapping from Model property names to API property names - _names = { - "name": 'name', - "id": 'id' - } - - _optionals = [ - 'name', - 'id', - ] - - def __init__(self, - name=APIHelper.SKIP, - id=APIHelper.SKIP): - """Constructor for the OrgType class""" - - # Initialize members of the class - if name is not APIHelper.SKIP: - self.name = name - if id is not APIHelper.SKIP: - self.id = id - - @classmethod - def from_dictionary(cls, - dictionary): - """Creates an instance of this model from a dictionary - - Args: - dictionary (dictionary): A dictionary representation of the object - as obtained from the deserialization of the server's response. The - keys MUST match property names in the API description. - - Returns: - object: An instance of this structure class. - - """ - if dictionary is None: - return None - - # Extract variables from the dictionary - - name = dictionary.get("name") if dictionary.get("name") else APIHelper.SKIP - id = dictionary.get("id") if dictionary.get("id") else APIHelper.SKIP - # Return an object of this model - return cls(name, - id) diff --git a/Python/thoughtspotpublicrestapi/models/orgs_response.py b/Python/thoughtspotpublicrestapi/models/orgs_response.py deleted file mode 100644 index 0711c2a18..000000000 --- a/Python/thoughtspotpublicrestapi/models/orgs_response.py +++ /dev/null @@ -1,102 +0,0 @@ -# -*- coding: utf-8 -*- - -""" -thoughtspotpublicrestapi - -This file was automatically generated by APIMATIC v3.0 ( - https://www.apimatic.io ). -""" -from thoughtspotpublicrestapi.api_helper import APIHelper - - -class OrgsResponse(object): - - """Implementation of the 'OrgsResponse' model. - - TODO: type model description here. - - Attributes: - org_id (int): ID of the organization searched for - org_name (string): Name of the organization searched for - description (string): Description associated with the organization - all_group_user_id (string): GUID of the ALL group in the organization - default_admin_user_group_id (string): GUID of the admin group in the - organization - active (bool): Indicates if the organization is active or not - - """ - - # Create a mapping from Model property names to API property names - _names = { - "org_id": 'orgId', - "org_name": 'orgName', - "description": 'description', - "all_group_user_id": 'allGroupUserId', - "default_admin_user_group_id": 'defaultAdminUserGroupId', - "active": 'active' - } - - _optionals = [ - 'org_id', - 'org_name', - 'description', - 'all_group_user_id', - 'default_admin_user_group_id', - 'active', - ] - - def __init__(self, - org_id=APIHelper.SKIP, - org_name=APIHelper.SKIP, - description=APIHelper.SKIP, - all_group_user_id=APIHelper.SKIP, - default_admin_user_group_id=APIHelper.SKIP, - active=APIHelper.SKIP): - """Constructor for the OrgsResponse class""" - - # Initialize members of the class - if org_id is not APIHelper.SKIP: - self.org_id = org_id - if org_name is not APIHelper.SKIP: - self.org_name = org_name - if description is not APIHelper.SKIP: - self.description = description - if all_group_user_id is not APIHelper.SKIP: - self.all_group_user_id = all_group_user_id - if default_admin_user_group_id is not APIHelper.SKIP: - self.default_admin_user_group_id = default_admin_user_group_id - if active is not APIHelper.SKIP: - self.active = active - - @classmethod - def from_dictionary(cls, - dictionary): - """Creates an instance of this model from a dictionary - - Args: - dictionary (dictionary): A dictionary representation of the object - as obtained from the deserialization of the server's response. The - keys MUST match property names in the API description. - - Returns: - object: An instance of this structure class. - - """ - if dictionary is None: - return None - - # Extract variables from the dictionary - - org_id = dictionary.get("orgId") if dictionary.get("orgId") else APIHelper.SKIP - org_name = dictionary.get("orgName") if dictionary.get("orgName") else APIHelper.SKIP - description = dictionary.get("description") if dictionary.get("description") else APIHelper.SKIP - all_group_user_id = dictionary.get("allGroupUserId") if dictionary.get("allGroupUserId") else APIHelper.SKIP - default_admin_user_group_id = dictionary.get("defaultAdminUserGroupId") if dictionary.get("defaultAdminUserGroupId") else APIHelper.SKIP - active = dictionary.get("active") if "active" in dictionary.keys() else APIHelper.SKIP - # Return an object of this model - return cls(org_id, - org_name, - description, - all_group_user_id, - default_admin_user_group_id, - active) diff --git a/Python/thoughtspotpublicrestapi/models/orientation_enum.py b/Python/thoughtspotpublicrestapi/models/orientation_enum.py deleted file mode 100644 index dc46d538d..000000000 --- a/Python/thoughtspotpublicrestapi/models/orientation_enum.py +++ /dev/null @@ -1,25 +0,0 @@ -# -*- coding: utf-8 -*- - -""" -thoughtspotpublicrestapi - -This file was automatically generated by APIMATIC v3.0 ( - https://www.apimatic.io ). -""" - - -class OrientationEnum(object): - - """Implementation of the 'Orientation' enum. - - Page orientation for the PDF. Default: PORTRAIT - - Attributes: - PORTRAIT: TODO: type description here. - LANDSCAPE: TODO: type description here. - - """ - - PORTRAIT = 'PORTRAIT' - - LANDSCAPE = 'LANDSCAPE' diff --git a/Python/thoughtspotpublicrestapi/models/pdf_options_input.py b/Python/thoughtspotpublicrestapi/models/pdf_options_input.py deleted file mode 100644 index ed71f040b..000000000 --- a/Python/thoughtspotpublicrestapi/models/pdf_options_input.py +++ /dev/null @@ -1,118 +0,0 @@ -# -*- coding: utf-8 -*- - -""" -thoughtspotpublicrestapi - -This file was automatically generated by APIMATIC v3.0 ( - https://www.apimatic.io ). -""" -from thoughtspotpublicrestapi.api_helper import APIHelper - - -class PdfOptionsInput(object): - - """Implementation of the 'pdfOptionsInput' model. - - TODO: type model description here. - - Attributes: - orientation (OrientationEnum): Page orientation for the PDF. Default: - PORTRAIT - truncate_tables (bool): When set to true, only the first page of the - tables is displayed in the file. This setting is applicable only - when generating report for specific visualization ids. Default: - false - include_logo (bool): Include customized wide logo if available in the - footer. Default: true - footer_text (string): Footer text to include in the footer of each - page of the PDF. - include_page_number (bool): When set to true, the page number is - included in the footer of each page. Default: true - include_cover_page (bool): When set to true, a cover page with the - Liveboard title is added in the PDF. Default: true - include_filter_page (bool): When set to true, a second page with a - list of all applied filters is added in the PDF. Default: true - - """ - - # Create a mapping from Model property names to API property names - _names = { - "orientation": 'orientation', - "truncate_tables": 'truncateTables', - "include_logo": 'includeLogo', - "footer_text": 'footerText', - "include_page_number": 'includePageNumber', - "include_cover_page": 'includeCoverPage', - "include_filter_page": 'includeFilterPage' - } - - _optionals = [ - 'orientation', - 'truncate_tables', - 'include_logo', - 'footer_text', - 'include_page_number', - 'include_cover_page', - 'include_filter_page', - ] - - def __init__(self, - orientation=APIHelper.SKIP, - truncate_tables=APIHelper.SKIP, - include_logo=APIHelper.SKIP, - footer_text=APIHelper.SKIP, - include_page_number=APIHelper.SKIP, - include_cover_page=APIHelper.SKIP, - include_filter_page=APIHelper.SKIP): - """Constructor for the PdfOptionsInput class""" - - # Initialize members of the class - if orientation is not APIHelper.SKIP: - self.orientation = orientation - if truncate_tables is not APIHelper.SKIP: - self.truncate_tables = truncate_tables - if include_logo is not APIHelper.SKIP: - self.include_logo = include_logo - if footer_text is not APIHelper.SKIP: - self.footer_text = footer_text - if include_page_number is not APIHelper.SKIP: - self.include_page_number = include_page_number - if include_cover_page is not APIHelper.SKIP: - self.include_cover_page = include_cover_page - if include_filter_page is not APIHelper.SKIP: - self.include_filter_page = include_filter_page - - @classmethod - def from_dictionary(cls, - dictionary): - """Creates an instance of this model from a dictionary - - Args: - dictionary (dictionary): A dictionary representation of the object - as obtained from the deserialization of the server's response. The - keys MUST match property names in the API description. - - Returns: - object: An instance of this structure class. - - """ - if dictionary is None: - return None - - # Extract variables from the dictionary - - orientation = dictionary.get("orientation") if dictionary.get("orientation") else APIHelper.SKIP - truncate_tables = dictionary.get("truncateTables") if "truncateTables" in dictionary.keys() else APIHelper.SKIP - include_logo = dictionary.get("includeLogo") if "includeLogo" in dictionary.keys() else APIHelper.SKIP - footer_text = dictionary.get("footerText") if dictionary.get("footerText") else APIHelper.SKIP - include_page_number = dictionary.get("includePageNumber") if "includePageNumber" in dictionary.keys() else APIHelper.SKIP - include_cover_page = dictionary.get("includeCoverPage") if "includeCoverPage" in dictionary.keys() else APIHelper.SKIP - include_filter_page = dictionary.get("includeFilterPage") if "includeFilterPage" in dictionary.keys() else APIHelper.SKIP - # Return an object of this model - return cls(orientation, - truncate_tables, - include_logo, - footer_text, - include_page_number, - include_cover_page, - include_filter_page) diff --git a/Python/thoughtspotpublicrestapi/models/permissions_type_search.py b/Python/thoughtspotpublicrestapi/models/permissions_type_search.py deleted file mode 100644 index 3d0a839ba..000000000 --- a/Python/thoughtspotpublicrestapi/models/permissions_type_search.py +++ /dev/null @@ -1,75 +0,0 @@ -# -*- coding: utf-8 -*- - -""" -thoughtspotpublicrestapi - -This file was automatically generated by APIMATIC v3.0 ( - https://www.apimatic.io ). -""" -from thoughtspotpublicrestapi.api_helper import APIHelper -from thoughtspotpublicrestapi.models.ts_object_type_serach import TsObjectTypeSerach - - -class PermissionsTypeSearch(object): - - """Implementation of the 'PermissionsTypeSearch' model. - - TODO: type model description here. - - Attributes: - mtype (string): Indicates the type of the object - ts_object (list of TsObjectTypeSerach): An array of objects of type - mentioned in type field - - """ - - # Create a mapping from Model property names to API property names - _names = { - "mtype": 'type', - "ts_object": 'tsObject' - } - - _optionals = [ - 'mtype', - 'ts_object', - ] - - def __init__(self, - mtype=APIHelper.SKIP, - ts_object=APIHelper.SKIP): - """Constructor for the PermissionsTypeSearch class""" - - # Initialize members of the class - if mtype is not APIHelper.SKIP: - self.mtype = mtype - if ts_object is not APIHelper.SKIP: - self.ts_object = ts_object - - @classmethod - def from_dictionary(cls, - dictionary): - """Creates an instance of this model from a dictionary - - Args: - dictionary (dictionary): A dictionary representation of the object - as obtained from the deserialization of the server's response. The - keys MUST match property names in the API description. - - Returns: - object: An instance of this structure class. - - """ - if dictionary is None: - return None - - # Extract variables from the dictionary - - mtype = dictionary.get("type") if dictionary.get("type") else APIHelper.SKIP - ts_object = None - if dictionary.get('tsObject') is not None: - ts_object = [TsObjectTypeSerach.from_dictionary(x) for x in dictionary.get('tsObject')] - else: - ts_object = APIHelper.SKIP - # Return an object of this model - return cls(mtype, - ts_object) diff --git a/Python/thoughtspotpublicrestapi/models/pinboard_details.py b/Python/thoughtspotpublicrestapi/models/pinboard_details.py deleted file mode 100644 index 5a72f8474..000000000 --- a/Python/thoughtspotpublicrestapi/models/pinboard_details.py +++ /dev/null @@ -1,85 +0,0 @@ -# -*- coding: utf-8 -*- - -""" -thoughtspotpublicrestapi - -This file was automatically generated by APIMATIC v3.0 ( - https://www.apimatic.io ). -""" -from thoughtspotpublicrestapi.api_helper import APIHelper - - -class PinboardDetails(object): - - """Implementation of the 'PinboardDetails' model. - - TODO: type model description here. - - Attributes: - pinboard_id (string): pinboard id of recently pinned pinboard - pinboard_name (string): pinboard name of recently pinned pinboard - tab_id (string): tab id of recently pinned tab - tab_name (string): tab name of recently pinned tab - - """ - - # Create a mapping from Model property names to API property names - _names = { - "pinboard_id": 'pinboardId', - "pinboard_name": 'pinboardName', - "tab_id": 'tabId', - "tab_name": 'tabName' - } - - _optionals = [ - 'pinboard_id', - 'pinboard_name', - 'tab_id', - 'tab_name', - ] - - def __init__(self, - pinboard_id=APIHelper.SKIP, - pinboard_name=APIHelper.SKIP, - tab_id=APIHelper.SKIP, - tab_name=APIHelper.SKIP): - """Constructor for the PinboardDetails class""" - - # Initialize members of the class - if pinboard_id is not APIHelper.SKIP: - self.pinboard_id = pinboard_id - if pinboard_name is not APIHelper.SKIP: - self.pinboard_name = pinboard_name - if tab_id is not APIHelper.SKIP: - self.tab_id = tab_id - if tab_name is not APIHelper.SKIP: - self.tab_name = tab_name - - @classmethod - def from_dictionary(cls, - dictionary): - """Creates an instance of this model from a dictionary - - Args: - dictionary (dictionary): A dictionary representation of the object - as obtained from the deserialization of the server's response. The - keys MUST match property names in the API description. - - Returns: - object: An instance of this structure class. - - """ - if dictionary is None: - return None - - # Extract variables from the dictionary - - pinboard_id = dictionary.get("pinboardId") if dictionary.get("pinboardId") else APIHelper.SKIP - pinboard_name = dictionary.get("pinboardName") if dictionary.get("pinboardName") else APIHelper.SKIP - tab_id = dictionary.get("tabId") if dictionary.get("tabId") else APIHelper.SKIP - tab_name = dictionary.get("tabName") if dictionary.get("tabName") else APIHelper.SKIP - # Return an object of this model - return cls(pinboard_id, - pinboard_name, - tab_id, - tab_name) diff --git a/Python/thoughtspotpublicrestapi/models/principal_search_response.py b/Python/thoughtspotpublicrestapi/models/principal_search_response.py deleted file mode 100644 index 982e15d27..000000000 --- a/Python/thoughtspotpublicrestapi/models/principal_search_response.py +++ /dev/null @@ -1,91 +0,0 @@ -# -*- coding: utf-8 -*- - -""" -thoughtspotpublicrestapi - -This file was automatically generated by APIMATIC v3.0 ( - https://www.apimatic.io ). -""" -from thoughtspotpublicrestapi.api_helper import APIHelper -from thoughtspotpublicrestapi.models.permissions_type_search import PermissionsTypeSearch - - -class PrincipalSearchResponse(object): - - """Implementation of the 'PrincipalSearchResponse' model. - - TODO: type model description here. - - Attributes: - id (string): GUID of the user or user group - name (string): Name of the user or user group - mtype (string): Indicates the type of principal - permissions (list of PermissionsTypeSearch): Indicates the permission - which user or user group has on the object - - """ - - # Create a mapping from Model property names to API property names - _names = { - "id": 'id', - "name": 'name', - "mtype": 'type', - "permissions": 'permissions' - } - - _optionals = [ - 'id', - 'name', - 'mtype', - 'permissions', - ] - - def __init__(self, - id=APIHelper.SKIP, - name=APIHelper.SKIP, - mtype=APIHelper.SKIP, - permissions=APIHelper.SKIP): - """Constructor for the PrincipalSearchResponse class""" - - # Initialize members of the class - if id is not APIHelper.SKIP: - self.id = id - if name is not APIHelper.SKIP: - self.name = name - if mtype is not APIHelper.SKIP: - self.mtype = mtype - if permissions is not APIHelper.SKIP: - self.permissions = permissions - - @classmethod - def from_dictionary(cls, - dictionary): - """Creates an instance of this model from a dictionary - - Args: - dictionary (dictionary): A dictionary representation of the object - as obtained from the deserialization of the server's response. The - keys MUST match property names in the API description. - - Returns: - object: An instance of this structure class. - - """ - if dictionary is None: - return None - - # Extract variables from the dictionary - - id = dictionary.get("id") if dictionary.get("id") else APIHelper.SKIP - name = dictionary.get("name") if dictionary.get("name") else APIHelper.SKIP - mtype = dictionary.get("type") if dictionary.get("type") else APIHelper.SKIP - permissions = None - if dictionary.get('permissions') is not None: - permissions = [PermissionsTypeSearch.from_dictionary(x) for x in dictionary.get('permissions')] - else: - permissions = APIHelper.SKIP - # Return an object of this model - return cls(id, - name, - mtype, - permissions) diff --git a/Python/thoughtspotpublicrestapi/models/privilege_enum.py b/Python/thoughtspotpublicrestapi/models/privilege_enum.py deleted file mode 100644 index d41e54aa9..000000000 --- a/Python/thoughtspotpublicrestapi/models/privilege_enum.py +++ /dev/null @@ -1,76 +0,0 @@ -# -*- coding: utf-8 -*- - -""" -thoughtspotpublicrestapi - -This file was automatically generated by APIMATIC v3.0 ( - https://www.apimatic.io ). -""" - - -class PrivilegeEnum(object): - - """Implementation of the 'Privilege' enum. - - TODO: type enum description here. - - Attributes: - RANALYSIS: TODO: type description here. - DATAMANAGEMENT: TODO: type description here. - APPLICATION_ADMINISTRATION: TODO: type description here. - USER_ADMINISTRATION: TODO: type description here. - SYSTEMMANAGEMENT: TODO: type description here. - SYSTEM_INFO_ADMINISTRATION: TODO: type description here. - AUTHORING: TODO: type description here. - BACKUP_ADMINISTRATION: TODO: type description here. - SHAREWITHALL: TODO: type description here. - DEVELOPER: TODO: type description here. - JOBSCHEDULING: TODO: type description here. - GROUP_ADMINISTRATION: TODO: type description here. - BYPASSRLS: TODO: type description here. - EXPERIMENTALFEATUREPRIVILEGE: TODO: type description here. - A3ANALYSIS: TODO: type description here. - USERDATAUPLOADING: TODO: type description here. - DATADOWNLOADING: TODO: type description here. - DISABLE_PINBOARD_CREATION: TODO: type description here. - ADMINISTRATION: TODO: type description here. - - """ - - RANALYSIS = 'RANALYSIS' - - DATAMANAGEMENT = 'DATAMANAGEMENT' - - APPLICATION_ADMINISTRATION = 'APPLICATION_ADMINISTRATION' - - USER_ADMINISTRATION = 'USER_ADMINISTRATION' - - SYSTEMMANAGEMENT = 'SYSTEMMANAGEMENT' - - SYSTEM_INFO_ADMINISTRATION = 'SYSTEM_INFO_ADMINISTRATION' - - AUTHORING = 'AUTHORING' - - BACKUP_ADMINISTRATION = 'BACKUP_ADMINISTRATION' - - SHAREWITHALL = 'SHAREWITHALL' - - DEVELOPER = 'DEVELOPER' - - JOBSCHEDULING = 'JOBSCHEDULING' - - GROUP_ADMINISTRATION = 'GROUP_ADMINISTRATION' - - BYPASSRLS = 'BYPASSRLS' - - EXPERIMENTALFEATUREPRIVILEGE = 'EXPERIMENTALFEATUREPRIVILEGE' - - A3ANALYSIS = 'A3ANALYSIS' - - USERDATAUPLOADING = 'USERDATAUPLOADING' - - DATADOWNLOADING = 'DATADOWNLOADING' - - DISABLE_PINBOARD_CREATION = 'DISABLE_PINBOARD_CREATION' - - ADMINISTRATION = 'ADMINISTRATION' diff --git a/Python/thoughtspotpublicrestapi/models/secuirity_dependents.py b/Python/thoughtspotpublicrestapi/models/secuirity_dependents.py deleted file mode 100644 index 69e4cdb8a..000000000 --- a/Python/thoughtspotpublicrestapi/models/secuirity_dependents.py +++ /dev/null @@ -1,108 +0,0 @@ -# -*- coding: utf-8 -*- - -""" -thoughtspotpublicrestapi - -This file was automatically generated by APIMATIC v3.0 ( - https://www.apimatic.io ). -""" -from thoughtspotpublicrestapi.api_helper import APIHelper -from thoughtspotpublicrestapi.models.dependent_permission import DependentPermission -from thoughtspotpublicrestapi.models.user_name_and_id import UserNameAndID - - -class SecuirityDependents(object): - - """Implementation of the 'SecuirityDependents' model. - - TODO: type model description here. - - Attributes: - id (string): GUID of the object - name (string): Name of the object - mtype (string): Indicates the type of the object - owner (string): Owner of the object - author (UserNameAndID): TODO: type description here. - permissions (list of DependentPermission): TODO: type description - here. - - """ - - # Create a mapping from Model property names to API property names - _names = { - "id": 'id', - "name": 'name', - "mtype": 'type', - "owner": 'owner', - "author": 'author', - "permissions": 'permissions' - } - - _optionals = [ - 'id', - 'name', - 'mtype', - 'owner', - 'author', - 'permissions', - ] - - def __init__(self, - id=APIHelper.SKIP, - name=APIHelper.SKIP, - mtype=APIHelper.SKIP, - owner=APIHelper.SKIP, - author=APIHelper.SKIP, - permissions=APIHelper.SKIP): - """Constructor for the SecuirityDependents class""" - - # Initialize members of the class - if id is not APIHelper.SKIP: - self.id = id - if name is not APIHelper.SKIP: - self.name = name - if mtype is not APIHelper.SKIP: - self.mtype = mtype - if owner is not APIHelper.SKIP: - self.owner = owner - if author is not APIHelper.SKIP: - self.author = author - if permissions is not APIHelper.SKIP: - self.permissions = permissions - - @classmethod - def from_dictionary(cls, - dictionary): - """Creates an instance of this model from a dictionary - - Args: - dictionary (dictionary): A dictionary representation of the object - as obtained from the deserialization of the server's response. The - keys MUST match property names in the API description. - - Returns: - object: An instance of this structure class. - - """ - if dictionary is None: - return None - - # Extract variables from the dictionary - - id = dictionary.get("id") if dictionary.get("id") else APIHelper.SKIP - name = dictionary.get("name") if dictionary.get("name") else APIHelper.SKIP - mtype = dictionary.get("type") if dictionary.get("type") else APIHelper.SKIP - owner = dictionary.get("owner") if dictionary.get("owner") else APIHelper.SKIP - author = UserNameAndID.from_dictionary(dictionary.get('author')) if 'author' in dictionary.keys() else APIHelper.SKIP - permissions = None - if dictionary.get('permissions') is not None: - permissions = [DependentPermission.from_dictionary(x) for x in dictionary.get('permissions')] - else: - permissions = APIHelper.SKIP - # Return an object of this model - return cls(id, - name, - mtype, - owner, - author, - permissions) diff --git a/Python/thoughtspotpublicrestapi/models/security_permission.py b/Python/thoughtspotpublicrestapi/models/security_permission.py deleted file mode 100644 index e0e3e038a..000000000 --- a/Python/thoughtspotpublicrestapi/models/security_permission.py +++ /dev/null @@ -1,111 +0,0 @@ -# -*- coding: utf-8 -*- - -""" -thoughtspotpublicrestapi - -This file was automatically generated by APIMATIC v3.0 ( - https://www.apimatic.io ). -""" -from thoughtspotpublicrestapi.api_helper import APIHelper -from thoughtspotpublicrestapi.models.group_permission import GroupPermission - - -class SecurityPermission(object): - - """Implementation of the 'SecurityPermission' model. - - TODO: type model description here. - - Attributes: - id (string): GUID of the user or user group - name (string): Name of the user or user group - mtype (string): Indicates the type of principal - permission (string): Indicates the permission which user or user group - has on the object - shared_permission (string): Indicates the permission which user or - user group has on the object through sharing of the object with - this user or user group - group_permission (list of GroupPermission): An array of object with - details of permission on the user groups to which the user or user - group belongs - - """ - - # Create a mapping from Model property names to API property names - _names = { - "id": 'id', - "name": 'name', - "mtype": 'type', - "permission": 'permission', - "shared_permission": 'sharedPermission', - "group_permission": 'groupPermission' - } - - _optionals = [ - 'id', - 'name', - 'mtype', - 'permission', - 'shared_permission', - 'group_permission', - ] - - def __init__(self, - id=APIHelper.SKIP, - name=APIHelper.SKIP, - mtype=APIHelper.SKIP, - permission=APIHelper.SKIP, - shared_permission=APIHelper.SKIP, - group_permission=APIHelper.SKIP): - """Constructor for the SecurityPermission class""" - - # Initialize members of the class - if id is not APIHelper.SKIP: - self.id = id - if name is not APIHelper.SKIP: - self.name = name - if mtype is not APIHelper.SKIP: - self.mtype = mtype - if permission is not APIHelper.SKIP: - self.permission = permission - if shared_permission is not APIHelper.SKIP: - self.shared_permission = shared_permission - if group_permission is not APIHelper.SKIP: - self.group_permission = group_permission - - @classmethod - def from_dictionary(cls, - dictionary): - """Creates an instance of this model from a dictionary - - Args: - dictionary (dictionary): A dictionary representation of the object - as obtained from the deserialization of the server's response. The - keys MUST match property names in the API description. - - Returns: - object: An instance of this structure class. - - """ - if dictionary is None: - return None - - # Extract variables from the dictionary - - id = dictionary.get("id") if dictionary.get("id") else APIHelper.SKIP - name = dictionary.get("name") if dictionary.get("name") else APIHelper.SKIP - mtype = dictionary.get("type") if dictionary.get("type") else APIHelper.SKIP - permission = dictionary.get("permission") if dictionary.get("permission") else APIHelper.SKIP - shared_permission = dictionary.get("sharedPermission") if dictionary.get("sharedPermission") else APIHelper.SKIP - group_permission = None - if dictionary.get('groupPermission') is not None: - group_permission = [GroupPermission.from_dictionary(x) for x in dictionary.get('groupPermission')] - else: - group_permission = APIHelper.SKIP - # Return an object of this model - return cls(id, - name, - mtype, - permission, - shared_permission, - group_permission) diff --git a/Python/thoughtspotpublicrestapi/models/security_permission_response.py b/Python/thoughtspotpublicrestapi/models/security_permission_response.py deleted file mode 100644 index 5f31e3837..000000000 --- a/Python/thoughtspotpublicrestapi/models/security_permission_response.py +++ /dev/null @@ -1,122 +0,0 @@ -# -*- coding: utf-8 -*- - -""" -thoughtspotpublicrestapi - -This file was automatically generated by APIMATIC v3.0 ( - https://www.apimatic.io ). -""" -from thoughtspotpublicrestapi.api_helper import APIHelper -from thoughtspotpublicrestapi.models.secuirity_dependents import SecuirityDependents -from thoughtspotpublicrestapi.models.security_permission import SecurityPermission -from thoughtspotpublicrestapi.models.user_name_and_id import UserNameAndID - - -class SecurityPermissionResponse(object): - - """Implementation of the 'SecurityPermissionResponse' model. - - TODO: type model description here. - - Attributes: - id (string): GUID of the object - name (string): Name of the object - mtype (string): Indicates the type of the object - owner (string): GUID of the owner of the object - author (UserNameAndID): TODO: type description here. - permissions (list of SecurityPermission): An array of object with - details of permission on users and user groups - dependents (list of SecuirityDependents): The objects on which the - primary object is dependent on - - """ - - # Create a mapping from Model property names to API property names - _names = { - "id": 'id', - "name": 'name', - "mtype": 'type', - "owner": 'owner', - "author": 'author', - "permissions": 'permissions', - "dependents": 'dependents' - } - - _optionals = [ - 'id', - 'name', - 'mtype', - 'owner', - 'author', - 'permissions', - 'dependents', - ] - - def __init__(self, - id=APIHelper.SKIP, - name=APIHelper.SKIP, - mtype=APIHelper.SKIP, - owner=APIHelper.SKIP, - author=APIHelper.SKIP, - permissions=APIHelper.SKIP, - dependents=APIHelper.SKIP): - """Constructor for the SecurityPermissionResponse class""" - - # Initialize members of the class - if id is not APIHelper.SKIP: - self.id = id - if name is not APIHelper.SKIP: - self.name = name - if mtype is not APIHelper.SKIP: - self.mtype = mtype - if owner is not APIHelper.SKIP: - self.owner = owner - if author is not APIHelper.SKIP: - self.author = author - if permissions is not APIHelper.SKIP: - self.permissions = permissions - if dependents is not APIHelper.SKIP: - self.dependents = dependents - - @classmethod - def from_dictionary(cls, - dictionary): - """Creates an instance of this model from a dictionary - - Args: - dictionary (dictionary): A dictionary representation of the object - as obtained from the deserialization of the server's response. The - keys MUST match property names in the API description. - - Returns: - object: An instance of this structure class. - - """ - if dictionary is None: - return None - - # Extract variables from the dictionary - - id = dictionary.get("id") if dictionary.get("id") else APIHelper.SKIP - name = dictionary.get("name") if dictionary.get("name") else APIHelper.SKIP - mtype = dictionary.get("type") if dictionary.get("type") else APIHelper.SKIP - owner = dictionary.get("owner") if dictionary.get("owner") else APIHelper.SKIP - author = UserNameAndID.from_dictionary(dictionary.get('author')) if 'author' in dictionary.keys() else APIHelper.SKIP - permissions = None - if dictionary.get('permissions') is not None: - permissions = [SecurityPermission.from_dictionary(x) for x in dictionary.get('permissions')] - else: - permissions = APIHelper.SKIP - dependents = None - if dictionary.get('dependents') is not None: - dependents = [SecuirityDependents.from_dictionary(x) for x in dictionary.get('dependents')] - else: - dependents = APIHelper.SKIP - # Return an object of this model - return cls(id, - name, - mtype, - owner, - author, - permissions, - dependents) diff --git a/Python/thoughtspotpublicrestapi/models/session_login_response.py b/Python/thoughtspotpublicrestapi/models/session_login_response.py deleted file mode 100644 index ed4f3ffbc..000000000 --- a/Python/thoughtspotpublicrestapi/models/session_login_response.py +++ /dev/null @@ -1,97 +0,0 @@ -# -*- coding: utf-8 -*- - -""" -thoughtspotpublicrestapi - -This file was automatically generated by APIMATIC v3.0 ( - https://www.apimatic.io ). -""" -from thoughtspotpublicrestapi.api_helper import APIHelper - - -class SessionLoginResponse(object): - - """Implementation of the 'SessionLoginResponse' model. - - Login response - - Attributes: - user_name (string): Username of the user account for which token is - generated - token (string): Bearer token generated. This will be blank when token - type is Cookie - token_created_time (string): Date and time at which the token is - generated - token_expiry_duration (string): Duration in seconds after which the - token expires - token_type (string): Type of token generated - - """ - - # Create a mapping from Model property names to API property names - _names = { - "user_name": 'userName', - "token": 'token', - "token_created_time": 'tokenCreatedTime', - "token_expiry_duration": 'tokenExpiryDuration', - "token_type": 'tokenType' - } - - _optionals = [ - 'user_name', - 'token', - 'token_created_time', - 'token_expiry_duration', - 'token_type', - ] - - def __init__(self, - user_name=APIHelper.SKIP, - token=APIHelper.SKIP, - token_created_time=APIHelper.SKIP, - token_expiry_duration=APIHelper.SKIP, - token_type=APIHelper.SKIP): - """Constructor for the SessionLoginResponse class""" - - # Initialize members of the class - if user_name is not APIHelper.SKIP: - self.user_name = user_name - if token is not APIHelper.SKIP: - self.token = token - if token_created_time is not APIHelper.SKIP: - self.token_created_time = token_created_time - if token_expiry_duration is not APIHelper.SKIP: - self.token_expiry_duration = token_expiry_duration - if token_type is not APIHelper.SKIP: - self.token_type = token_type - - @classmethod - def from_dictionary(cls, - dictionary): - """Creates an instance of this model from a dictionary - - Args: - dictionary (dictionary): A dictionary representation of the object - as obtained from the deserialization of the server's response. The - keys MUST match property names in the API description. - - Returns: - object: An instance of this structure class. - - """ - if dictionary is None: - return None - - # Extract variables from the dictionary - - user_name = dictionary.get("userName") if dictionary.get("userName") else APIHelper.SKIP - token = dictionary.get("token") if dictionary.get("token") else APIHelper.SKIP - token_created_time = dictionary.get("tokenCreatedTime") if dictionary.get("tokenCreatedTime") else APIHelper.SKIP - token_expiry_duration = dictionary.get("tokenExpiryDuration") if dictionary.get("tokenExpiryDuration") else APIHelper.SKIP - token_type = dictionary.get("tokenType") if dictionary.get("tokenType") else APIHelper.SKIP - # Return an object of this model - return cls(user_name, - token, - token_created_time, - token_expiry_duration, - token_type) diff --git a/Python/thoughtspotpublicrestapi/models/sort_by_1_enum.py b/Python/thoughtspotpublicrestapi/models/sort_by_1_enum.py deleted file mode 100644 index 53671341b..000000000 --- a/Python/thoughtspotpublicrestapi/models/sort_by_1_enum.py +++ /dev/null @@ -1,55 +0,0 @@ -# -*- coding: utf-8 -*- - -""" -thoughtspotpublicrestapi - -This file was automatically generated by APIMATIC v3.0 ( - https://www.apimatic.io ). -""" - - -class SortBy1Enum(object): - - """Implementation of the 'SortBy1' enum. - - Field based on which the re.sponse needs to be ordered. Valid values - - Attributes: - DEFAULT: TODO: type description here. - NAME: TODO: type description here. - DISPLAY_NAME: TODO: type description here. - AUTHOR: TODO: type description here. - CREATED: TODO: type description here. - MODIFIED: TODO: type description here. - LAST_ACCESSED: TODO: type description here. - SYNCED: TODO: type description here. - VIEWS: TODO: type description here. - NONE: TODO: type description here. - USER_STATE: TODO: type description here. - ROW_COUNT: TODO: type description here. - - """ - - DEFAULT = 'DEFAULT' - - NAME = 'NAME' - - DISPLAY_NAME = 'DISPLAY_NAME' - - AUTHOR = 'AUTHOR' - - CREATED = 'CREATED' - - MODIFIED = 'MODIFIED' - - LAST_ACCESSED = 'LAST_ACCESSED' - - SYNCED = 'SYNCED' - - VIEWS = 'VIEWS' - - NONE = 'NONE' - - USER_STATE = 'USER_STATE' - - ROW_COUNT = 'ROW_COUNT' diff --git a/Python/thoughtspotpublicrestapi/models/sort_by_enum.py b/Python/thoughtspotpublicrestapi/models/sort_by_enum.py deleted file mode 100644 index f1370918a..000000000 --- a/Python/thoughtspotpublicrestapi/models/sort_by_enum.py +++ /dev/null @@ -1,55 +0,0 @@ -# -*- coding: utf-8 -*- - -""" -thoughtspotpublicrestapi - -This file was automatically generated by APIMATIC v3.0 ( - https://www.apimatic.io ). -""" - - -class SortByEnum(object): - - """Implementation of the 'SortBy' enum. - - Field based on which the response needs to be ordered. - - Attributes: - DEFAULT: TODO: type description here. - NAME: TODO: type description here. - DISPLAY_NAME: TODO: type description here. - AUTHOR: TODO: type description here. - CREATED: TODO: type description here. - MODIFIED: TODO: type description here. - LAST_ACCESSED: TODO: type description here. - SYNCED: TODO: type description here. - VIEWS: TODO: type description here. - NONE: TODO: type description here. - USER_STATE: TODO: type description here. - ROW_COUNT: TODO: type description here. - - """ - - DEFAULT = 'DEFAULT' - - NAME = 'NAME' - - DISPLAY_NAME = 'DISPLAY_NAME' - - AUTHOR = 'AUTHOR' - - CREATED = 'CREATED' - - MODIFIED = 'MODIFIED' - - LAST_ACCESSED = 'LAST_ACCESSED' - - SYNCED = 'SYNCED' - - VIEWS = 'VIEWS' - - NONE = 'NONE' - - USER_STATE = 'USER_STATE' - - ROW_COUNT = 'ROW_COUNT' diff --git a/Python/thoughtspotpublicrestapi/models/sort_order_1_enum.py b/Python/thoughtspotpublicrestapi/models/sort_order_1_enum.py deleted file mode 100644 index 5fdbc160c..000000000 --- a/Python/thoughtspotpublicrestapi/models/sort_order_1_enum.py +++ /dev/null @@ -1,28 +0,0 @@ -# -*- coding: utf-8 -*- - -""" -thoughtspotpublicrestapi - -This file was automatically generated by APIMATIC v3.0 ( - https://www.apimatic.io ). -""" - - -class SortOrder1Enum(object): - - """Implementation of the 'SortOrder1' enum. - - Order in which sortBy should be applied. Valid values - - Attributes: - DEFAULT: TODO: type description here. - ASC: TODO: type description here. - DESC: TODO: type description here. - - """ - - DEFAULT = 'DEFAULT' - - ASC = 'ASC' - - DESC = 'DESC' diff --git a/Python/thoughtspotpublicrestapi/models/sort_order_enum.py b/Python/thoughtspotpublicrestapi/models/sort_order_enum.py deleted file mode 100644 index 2442a94ca..000000000 --- a/Python/thoughtspotpublicrestapi/models/sort_order_enum.py +++ /dev/null @@ -1,28 +0,0 @@ -# -*- coding: utf-8 -*- - -""" -thoughtspotpublicrestapi - -This file was automatically generated by APIMATIC v3.0 ( - https://www.apimatic.io ). -""" - - -class SortOrderEnum(object): - - """Implementation of the 'SortOrder' enum. - - Order in which sortBy should be applied. - - Attributes: - DEFAULT: TODO: type description here. - ASC: TODO: type description here. - DESC: TODO: type description here. - - """ - - DEFAULT = 'DEFAULT' - - ASC = 'ASC' - - DESC = 'DESC' diff --git a/Python/thoughtspotpublicrestapi/models/state_1_enum.py b/Python/thoughtspotpublicrestapi/models/state_1_enum.py deleted file mode 100644 index 6e8083f7c..000000000 --- a/Python/thoughtspotpublicrestapi/models/state_1_enum.py +++ /dev/null @@ -1,34 +0,0 @@ -# -*- coding: utf-8 -*- - -""" -thoughtspotpublicrestapi - -This file was automatically generated by APIMATIC v3.0 ( - https://www.apimatic.io ). -""" - - -class State1Enum(object): - - """Implementation of the 'State1' enum. - - Status of user account. acitve or inactive. - - Attributes: - ACTIVE: TODO: type description here. - INACTIVE: TODO: type description here. - EXPIRED: TODO: type description here. - LOCKED: TODO: type description here. - PENDING: TODO: type description here. - - """ - - ACTIVE = 'ACTIVE' - - INACTIVE = 'INACTIVE' - - EXPIRED = 'EXPIRED' - - LOCKED = 'LOCKED' - - PENDING = 'PENDING' diff --git a/Python/thoughtspotpublicrestapi/models/state_enum.py b/Python/thoughtspotpublicrestapi/models/state_enum.py deleted file mode 100644 index 14e20923f..000000000 --- a/Python/thoughtspotpublicrestapi/models/state_enum.py +++ /dev/null @@ -1,34 +0,0 @@ -# -*- coding: utf-8 -*- - -""" -thoughtspotpublicrestapi - -This file was automatically generated by APIMATIC v3.0 ( - https://www.apimatic.io ). -""" - - -class StateEnum(object): - - """Implementation of the 'state' enum. - - TODO: type enum description here. - - Attributes: - ACTIVE: TODO: type description here. - INACTIVE: TODO: type description here. - EXPIRED: TODO: type description here. - LOCKED: TODO: type description here. - PENDING: TODO: type description here. - - """ - - ACTIVE = 'ACTIVE' - - INACTIVE = 'INACTIVE' - - EXPIRED = 'EXPIRED' - - LOCKED = 'LOCKED' - - PENDING = 'PENDING' diff --git a/Python/thoughtspotpublicrestapi/models/table_columns.py b/Python/thoughtspotpublicrestapi/models/table_columns.py deleted file mode 100644 index e92721afb..000000000 --- a/Python/thoughtspotpublicrestapi/models/table_columns.py +++ /dev/null @@ -1,69 +0,0 @@ -# -*- coding: utf-8 -*- - -""" -thoughtspotpublicrestapi - -This file was automatically generated by APIMATIC v3.0 ( - https://www.apimatic.io ). -""" -from thoughtspotpublicrestapi.api_helper import APIHelper - - -class TableColumns(object): - - """Implementation of the 'TableColumns' model. - - TODO: type model description here. - - Attributes: - name (string): Name of the column - data_type (string): Datatype of the column - - """ - - # Create a mapping from Model property names to API property names - _names = { - "name": 'name', - "data_type": 'dataType' - } - - _optionals = [ - 'name', - 'data_type', - ] - - def __init__(self, - name=APIHelper.SKIP, - data_type=APIHelper.SKIP): - """Constructor for the TableColumns class""" - - # Initialize members of the class - if name is not APIHelper.SKIP: - self.name = name - if data_type is not APIHelper.SKIP: - self.data_type = data_type - - @classmethod - def from_dictionary(cls, - dictionary): - """Creates an instance of this model from a dictionary - - Args: - dictionary (dictionary): A dictionary representation of the object - as obtained from the deserialization of the server's response. The - keys MUST match property names in the API description. - - Returns: - object: An instance of this structure class. - - """ - if dictionary is None: - return None - - # Extract variables from the dictionary - - name = dictionary.get("name") if dictionary.get("name") else APIHelper.SKIP - data_type = dictionary.get("dataType") if dictionary.get("dataType") else APIHelper.SKIP - # Return an object of this model - return cls(name, - data_type) diff --git a/Python/thoughtspotpublicrestapi/models/table_input.py b/Python/thoughtspotpublicrestapi/models/table_input.py deleted file mode 100644 index 34025154c..000000000 --- a/Python/thoughtspotpublicrestapi/models/table_input.py +++ /dev/null @@ -1,69 +0,0 @@ -# -*- coding: utf-8 -*- - -""" -thoughtspotpublicrestapi - -This file was automatically generated by APIMATIC v3.0 ( - https://www.apimatic.io ). -""" -from thoughtspotpublicrestapi.api_helper import APIHelper - - -class TableInput(object): - - """Implementation of the 'TableInput' model. - - TODO: type model description here. - - Attributes: - name (string): Name of the table - id (string): GUID of the Table - - """ - - # Create a mapping from Model property names to API property names - _names = { - "name": 'name', - "id": 'id' - } - - _optionals = [ - 'name', - 'id', - ] - - def __init__(self, - name=APIHelper.SKIP, - id=APIHelper.SKIP): - """Constructor for the TableInput class""" - - # Initialize members of the class - if name is not APIHelper.SKIP: - self.name = name - if id is not APIHelper.SKIP: - self.id = id - - @classmethod - def from_dictionary(cls, - dictionary): - """Creates an instance of this model from a dictionary - - Args: - dictionary (dictionary): A dictionary representation of the object - as obtained from the deserialization of the server's response. The - keys MUST match property names in the API description. - - Returns: - object: An instance of this structure class. - - """ - if dictionary is None: - return None - - # Extract variables from the dictionary - - name = dictionary.get("name") if dictionary.get("name") else APIHelper.SKIP - id = dictionary.get("id") if dictionary.get("id") else APIHelper.SKIP - # Return an object of this model - return cls(name, - id) diff --git a/Python/thoughtspotpublicrestapi/models/table_list.py b/Python/thoughtspotpublicrestapi/models/table_list.py deleted file mode 100644 index fd6503e6b..000000000 --- a/Python/thoughtspotpublicrestapi/models/table_list.py +++ /dev/null @@ -1,191 +0,0 @@ -# -*- coding: utf-8 -*- - -""" -thoughtspotpublicrestapi - -This file was automatically generated by APIMATIC v3.0 ( - https://www.apimatic.io ). -""" -from thoughtspotpublicrestapi.api_helper import APIHelper -from thoughtspotpublicrestapi.models.user_name_and_id import UserNameAndID - - -class TableList(object): - - """Implementation of the 'tableList' model. - - TODO: type model description here. - - Attributes: - name (string): Name of the table - mtype (string): Type of the table - id (string): GUID of the table - database_stripe (string): Name of the database to which the table - belongs - schema_stripe (string): Name of the schema to which the table belongs - is_external (bool): TODO: type description here. - is_deprecated (bool): Indicates if the table is deprecated - is_deleted (bool): Indicates if the table is deleted - is_hidden (bool): Indicates if the table is hideen - index_version (float): TODO: type description here. - generation_num (float): TODO: type description here. - created (string): Date and time when the table was created - modified (string): Date and time of last modification of the table - author (UserNameAndID): TODO: type description here. - modified_by (UserNameAndID): TODO: type description here. - owner (UserNameAndID): TODO: type description here. - tags (list of string): List of tags assigned to the table - - """ - - # Create a mapping from Model property names to API property names - _names = { - "name": 'name', - "mtype": 'type', - "id": 'id', - "database_stripe": 'databaseStripe', - "schema_stripe": 'schemaStripe', - "is_external": 'isExternal', - "is_deprecated": 'isDeprecated', - "is_deleted": 'isDeleted', - "is_hidden": 'isHidden', - "index_version": 'indexVersion', - "generation_num": 'generationNum', - "created": 'created', - "modified": 'modified', - "author": 'author', - "modified_by": 'modifiedBy', - "owner": 'owner', - "tags": 'tags' - } - - _optionals = [ - 'name', - 'mtype', - 'id', - 'database_stripe', - 'schema_stripe', - 'is_external', - 'is_deprecated', - 'is_deleted', - 'is_hidden', - 'index_version', - 'generation_num', - 'created', - 'modified', - 'author', - 'modified_by', - 'owner', - 'tags', - ] - - def __init__(self, - name=APIHelper.SKIP, - mtype=APIHelper.SKIP, - id=APIHelper.SKIP, - database_stripe=APIHelper.SKIP, - schema_stripe=APIHelper.SKIP, - is_external=APIHelper.SKIP, - is_deprecated=APIHelper.SKIP, - is_deleted=APIHelper.SKIP, - is_hidden=APIHelper.SKIP, - index_version=APIHelper.SKIP, - generation_num=APIHelper.SKIP, - created=APIHelper.SKIP, - modified=APIHelper.SKIP, - author=APIHelper.SKIP, - modified_by=APIHelper.SKIP, - owner=APIHelper.SKIP, - tags=APIHelper.SKIP): - """Constructor for the TableList class""" - - # Initialize members of the class - if name is not APIHelper.SKIP: - self.name = name - if mtype is not APIHelper.SKIP: - self.mtype = mtype - if id is not APIHelper.SKIP: - self.id = id - if database_stripe is not APIHelper.SKIP: - self.database_stripe = database_stripe - if schema_stripe is not APIHelper.SKIP: - self.schema_stripe = schema_stripe - if is_external is not APIHelper.SKIP: - self.is_external = is_external - if is_deprecated is not APIHelper.SKIP: - self.is_deprecated = is_deprecated - if is_deleted is not APIHelper.SKIP: - self.is_deleted = is_deleted - if is_hidden is not APIHelper.SKIP: - self.is_hidden = is_hidden - if index_version is not APIHelper.SKIP: - self.index_version = index_version - if generation_num is not APIHelper.SKIP: - self.generation_num = generation_num - if created is not APIHelper.SKIP: - self.created = created - if modified is not APIHelper.SKIP: - self.modified = modified - if author is not APIHelper.SKIP: - self.author = author - if modified_by is not APIHelper.SKIP: - self.modified_by = modified_by - if owner is not APIHelper.SKIP: - self.owner = owner - if tags is not APIHelper.SKIP: - self.tags = tags - - @classmethod - def from_dictionary(cls, - dictionary): - """Creates an instance of this model from a dictionary - - Args: - dictionary (dictionary): A dictionary representation of the object - as obtained from the deserialization of the server's response. The - keys MUST match property names in the API description. - - Returns: - object: An instance of this structure class. - - """ - if dictionary is None: - return None - - # Extract variables from the dictionary - - name = dictionary.get("name") if dictionary.get("name") else APIHelper.SKIP - mtype = dictionary.get("type") if dictionary.get("type") else APIHelper.SKIP - id = dictionary.get("id") if dictionary.get("id") else APIHelper.SKIP - database_stripe = dictionary.get("databaseStripe") if dictionary.get("databaseStripe") else APIHelper.SKIP - schema_stripe = dictionary.get("schemaStripe") if dictionary.get("schemaStripe") else APIHelper.SKIP - is_external = dictionary.get("isExternal") if "isExternal" in dictionary.keys() else APIHelper.SKIP - is_deprecated = dictionary.get("isDeprecated") if "isDeprecated" in dictionary.keys() else APIHelper.SKIP - is_deleted = dictionary.get("isDeleted") if "isDeleted" in dictionary.keys() else APIHelper.SKIP - is_hidden = dictionary.get("isHidden") if "isHidden" in dictionary.keys() else APIHelper.SKIP - index_version = dictionary.get("indexVersion") if dictionary.get("indexVersion") else APIHelper.SKIP - generation_num = dictionary.get("generationNum") if dictionary.get("generationNum") else APIHelper.SKIP - created = dictionary.get("created") if dictionary.get("created") else APIHelper.SKIP - modified = dictionary.get("modified") if dictionary.get("modified") else APIHelper.SKIP - author = UserNameAndID.from_dictionary(dictionary.get('author')) if 'author' in dictionary.keys() else APIHelper.SKIP - modified_by = UserNameAndID.from_dictionary(dictionary.get('modifiedBy')) if 'modifiedBy' in dictionary.keys() else APIHelper.SKIP - owner = UserNameAndID.from_dictionary(dictionary.get('owner')) if 'owner' in dictionary.keys() else APIHelper.SKIP - tags = dictionary.get("tags") if dictionary.get("tags") else APIHelper.SKIP - # Return an object of this model - return cls(name, - mtype, - id, - database_stripe, - schema_stripe, - is_external, - is_deprecated, - is_deleted, - is_hidden, - index_version, - generation_num, - created, - modified, - author, - modified_by, - owner, - tags) diff --git a/Python/thoughtspotpublicrestapi/models/tag_name_and_id.py b/Python/thoughtspotpublicrestapi/models/tag_name_and_id.py deleted file mode 100644 index 14668ff35..000000000 --- a/Python/thoughtspotpublicrestapi/models/tag_name_and_id.py +++ /dev/null @@ -1,69 +0,0 @@ -# -*- coding: utf-8 -*- - -""" -thoughtspotpublicrestapi - -This file was automatically generated by APIMATIC v3.0 ( - https://www.apimatic.io ). -""" -from thoughtspotpublicrestapi.api_helper import APIHelper - - -class TagNameAndID(object): - - """Implementation of the 'TagNameAndID' model. - - TODO: type model description here. - - Attributes: - name (string): Name of the group to which group is added - id (string): GUID of the group to which group is added - - """ - - # Create a mapping from Model property names to API property names - _names = { - "name": 'name', - "id": 'id' - } - - _optionals = [ - 'name', - 'id', - ] - - def __init__(self, - name=APIHelper.SKIP, - id=APIHelper.SKIP): - """Constructor for the TagNameAndID class""" - - # Initialize members of the class - if name is not APIHelper.SKIP: - self.name = name - if id is not APIHelper.SKIP: - self.id = id - - @classmethod - def from_dictionary(cls, - dictionary): - """Creates an instance of this model from a dictionary - - Args: - dictionary (dictionary): A dictionary representation of the object - as obtained from the deserialization of the server's response. The - keys MUST match property names in the API description. - - Returns: - object: An instance of this structure class. - - """ - if dictionary is None: - return None - - # Extract variables from the dictionary - - name = dictionary.get("name") if dictionary.get("name") else APIHelper.SKIP - id = dictionary.get("id") if dictionary.get("id") else APIHelper.SKIP - # Return an object of this model - return cls(name, - id) diff --git a/Python/thoughtspotpublicrestapi/models/tag_name_and_id_input.py b/Python/thoughtspotpublicrestapi/models/tag_name_and_id_input.py deleted file mode 100644 index 4ea02dfb4..000000000 --- a/Python/thoughtspotpublicrestapi/models/tag_name_and_id_input.py +++ /dev/null @@ -1,69 +0,0 @@ -# -*- coding: utf-8 -*- - -""" -thoughtspotpublicrestapi - -This file was automatically generated by APIMATIC v3.0 ( - https://www.apimatic.io ). -""" -from thoughtspotpublicrestapi.api_helper import APIHelper - - -class TagNameAndIdInput(object): - - """Implementation of the 'TagNameAndIdInput' model. - - TODO: type model description here. - - Attributes: - name (string): Name of the tags - id (string): GUID of the tags - - """ - - # Create a mapping from Model property names to API property names - _names = { - "name": 'name', - "id": 'id' - } - - _optionals = [ - 'name', - 'id', - ] - - def __init__(self, - name=APIHelper.SKIP, - id=APIHelper.SKIP): - """Constructor for the TagNameAndIdInput class""" - - # Initialize members of the class - if name is not APIHelper.SKIP: - self.name = name - if id is not APIHelper.SKIP: - self.id = id - - @classmethod - def from_dictionary(cls, - dictionary): - """Creates an instance of this model from a dictionary - - Args: - dictionary (dictionary): A dictionary representation of the object - as obtained from the deserialization of the server's response. The - keys MUST match property names in the API description. - - Returns: - object: An instance of this structure class. - - """ - if dictionary is None: - return None - - # Extract variables from the dictionary - - name = dictionary.get("name") if dictionary.get("name") else APIHelper.SKIP - id = dictionary.get("id") if dictionary.get("id") else APIHelper.SKIP - # Return an object of this model - return cls(name, - id) diff --git a/Python/thoughtspotpublicrestapi/models/to_user_name_and_id_input.py b/Python/thoughtspotpublicrestapi/models/to_user_name_and_id_input.py deleted file mode 100644 index 9e4d35699..000000000 --- a/Python/thoughtspotpublicrestapi/models/to_user_name_and_id_input.py +++ /dev/null @@ -1,70 +0,0 @@ -# -*- coding: utf-8 -*- - -""" -thoughtspotpublicrestapi - -This file was automatically generated by APIMATIC v3.0 ( - https://www.apimatic.io ). -""" -from thoughtspotpublicrestapi.api_helper import APIHelper - - -class ToUserNameAndIDInput(object): - - """Implementation of the 'ToUserNameAndIDInput' model. - - A JSON object of name or GUIDs of the new owner for the objects. When both - are given then id is considered. - - Attributes: - name (string): Username of the user - id (string): GUID of the user - - """ - - # Create a mapping from Model property names to API property names - _names = { - "name": 'name', - "id": 'id' - } - - _optionals = [ - 'name', - 'id', - ] - - def __init__(self, - name=APIHelper.SKIP, - id=APIHelper.SKIP): - """Constructor for the ToUserNameAndIDInput class""" - - # Initialize members of the class - if name is not APIHelper.SKIP: - self.name = name - if id is not APIHelper.SKIP: - self.id = id - - @classmethod - def from_dictionary(cls, - dictionary): - """Creates an instance of this model from a dictionary - - Args: - dictionary (dictionary): A dictionary representation of the object - as obtained from the deserialization of the server's response. The - keys MUST match property names in the API description. - - Returns: - object: An instance of this structure class. - - """ - if dictionary is None: - return None - - # Extract variables from the dictionary - - name = dictionary.get("name") if dictionary.get("name") else APIHelper.SKIP - id = dictionary.get("id") if dictionary.get("id") else APIHelper.SKIP - # Return an object of this model - return cls(name, - id) diff --git a/Python/thoughtspotpublicrestapi/models/topic_enum.py b/Python/thoughtspotpublicrestapi/models/topic_enum.py deleted file mode 100644 index 060e014ad..000000000 --- a/Python/thoughtspotpublicrestapi/models/topic_enum.py +++ /dev/null @@ -1,22 +0,0 @@ -# -*- coding: utf-8 -*- - -""" -thoughtspotpublicrestapi - -This file was automatically generated by APIMATIC v3.0 ( - https://www.apimatic.io ). -""" - - -class TopicEnum(object): - - """Implementation of the 'topic' enum. - - TODO: type enum description here. - - Attributes: - SECURITY_LOGS: TODO: type description here. - - """ - - SECURITY_LOGS = 'security_logs' diff --git a/Python/thoughtspotpublicrestapi/models/ts_object_input.py b/Python/thoughtspotpublicrestapi/models/ts_object_input.py deleted file mode 100644 index 6bb9c0ec3..000000000 --- a/Python/thoughtspotpublicrestapi/models/ts_object_input.py +++ /dev/null @@ -1,61 +0,0 @@ -# -*- coding: utf-8 -*- - -""" -thoughtspotpublicrestapi - -This file was automatically generated by APIMATIC v3.0 ( - https://www.apimatic.io ). -""" - - -class TsObjectInput(object): - - """Implementation of the 'TsObjectInput' model. - - TODO: type model description here. - - Attributes: - id (string): GUID of the metadata object - mtype (TypeEnum): Type of the metadata object - - """ - - # Create a mapping from Model property names to API property names - _names = { - "id": 'id', - "mtype": 'type' - } - - def __init__(self, - id=None, - mtype=None): - """Constructor for the TsObjectInput class""" - - # Initialize members of the class - self.id = id - self.mtype = mtype - - @classmethod - def from_dictionary(cls, - dictionary): - """Creates an instance of this model from a dictionary - - Args: - dictionary (dictionary): A dictionary representation of the object - as obtained from the deserialization of the server's response. The - keys MUST match property names in the API description. - - Returns: - object: An instance of this structure class. - - """ - if dictionary is None: - return None - - # Extract variables from the dictionary - - id = dictionary.get("id") if dictionary.get("id") else None - mtype = dictionary.get("type") if dictionary.get("type") else None - # Return an object of this model - return cls(id, - mtype) diff --git a/Python/thoughtspotpublicrestapi/models/ts_object_search_input.py b/Python/thoughtspotpublicrestapi/models/ts_object_search_input.py deleted file mode 100644 index f20b1204c..000000000 --- a/Python/thoughtspotpublicrestapi/models/ts_object_search_input.py +++ /dev/null @@ -1,61 +0,0 @@ -# -*- coding: utf-8 -*- - -""" -thoughtspotpublicrestapi - -This file was automatically generated by APIMATIC v3.0 ( - https://www.apimatic.io ). -""" - - -class TsObjectSearchInput(object): - - """Implementation of the 'TsObjectSearchInput' model. - - TODO: type model description here. - - Attributes: - mtype (Type2Enum): Type of the metadata objec - id (list of string): A JSON Array of GUIDs of the metadata object - - """ - - # Create a mapping from Model property names to API property names - _names = { - "mtype": 'type', - "id": 'id' - } - - def __init__(self, - mtype=None, - id=None): - """Constructor for the TsObjectSearchInput class""" - - # Initialize members of the class - self.mtype = mtype - self.id = id - - @classmethod - def from_dictionary(cls, - dictionary): - """Creates an instance of this model from a dictionary - - Args: - dictionary (dictionary): A dictionary representation of the object - as obtained from the deserialization of the server's response. The - keys MUST match property names in the API description. - - Returns: - object: An instance of this structure class. - - """ - if dictionary is None: - return None - - # Extract variables from the dictionary - - mtype = dictionary.get("type") if dictionary.get("type") else None - id = dictionary.get("id") if dictionary.get("id") else None - # Return an object of this model - return cls(mtype, - id) diff --git a/Python/thoughtspotpublicrestapi/models/ts_object_type_serach.py b/Python/thoughtspotpublicrestapi/models/ts_object_type_serach.py deleted file mode 100644 index c9c70a234..000000000 --- a/Python/thoughtspotpublicrestapi/models/ts_object_type_serach.py +++ /dev/null @@ -1,120 +0,0 @@ -# -*- coding: utf-8 -*- - -""" -thoughtspotpublicrestapi - -This file was automatically generated by APIMATIC v3.0 ( - https://www.apimatic.io ). -""" -from thoughtspotpublicrestapi.api_helper import APIHelper -from thoughtspotpublicrestapi.models.group_permission import GroupPermission -from thoughtspotpublicrestapi.models.user_name_and_id import UserNameAndID - - -class TsObjectTypeSerach(object): - - """Implementation of the 'TsObjectTypeSerach' model. - - TODO: type model description here. - - Attributes: - id (string): GUID of the object - name (string): Name of the object - owner (string): Owner of the object - author (UserNameAndID): TODO: type description here. - permission (string): Indicates the permission which user or user group - has on the object - shared_permission (string): Indicates the permission which user or - user group has on the object through sharing of the object with - the user or user group - group_permission (list of GroupPermission): An array of object with - details of permission on the user groups to which the user or user - group belongs - - """ - - # Create a mapping from Model property names to API property names - _names = { - "id": 'id', - "name": 'name', - "owner": 'owner', - "author": 'author', - "permission": 'permission', - "shared_permission": 'sharedPermission', - "group_permission": 'groupPermission' - } - - _optionals = [ - 'id', - 'name', - 'owner', - 'author', - 'permission', - 'shared_permission', - 'group_permission', - ] - - def __init__(self, - id=APIHelper.SKIP, - name=APIHelper.SKIP, - owner=APIHelper.SKIP, - author=APIHelper.SKIP, - permission=APIHelper.SKIP, - shared_permission=APIHelper.SKIP, - group_permission=APIHelper.SKIP): - """Constructor for the TsObjectTypeSerach class""" - - # Initialize members of the class - if id is not APIHelper.SKIP: - self.id = id - if name is not APIHelper.SKIP: - self.name = name - if owner is not APIHelper.SKIP: - self.owner = owner - if author is not APIHelper.SKIP: - self.author = author - if permission is not APIHelper.SKIP: - self.permission = permission - if shared_permission is not APIHelper.SKIP: - self.shared_permission = shared_permission - if group_permission is not APIHelper.SKIP: - self.group_permission = group_permission - - @classmethod - def from_dictionary(cls, - dictionary): - """Creates an instance of this model from a dictionary - - Args: - dictionary (dictionary): A dictionary representation of the object - as obtained from the deserialization of the server's response. The - keys MUST match property names in the API description. - - Returns: - object: An instance of this structure class. - - """ - if dictionary is None: - return None - - # Extract variables from the dictionary - - id = dictionary.get("id") if dictionary.get("id") else APIHelper.SKIP - name = dictionary.get("name") if dictionary.get("name") else APIHelper.SKIP - owner = dictionary.get("owner") if dictionary.get("owner") else APIHelper.SKIP - author = UserNameAndID.from_dictionary(dictionary.get('author')) if 'author' in dictionary.keys() else APIHelper.SKIP - permission = dictionary.get("permission") if dictionary.get("permission") else APIHelper.SKIP - shared_permission = dictionary.get("sharedPermission") if dictionary.get("sharedPermission") else APIHelper.SKIP - group_permission = None - if dictionary.get('groupPermission') is not None: - group_permission = [GroupPermission.from_dictionary(x) for x in dictionary.get('groupPermission')] - else: - group_permission = APIHelper.SKIP - # Return an object of this model - return cls(id, - name, - owner, - author, - permission, - shared_permission, - group_permission) diff --git a/Python/thoughtspotpublicrestapi/models/tspublic_rest_v_2_admin_assignauthor_request.py b/Python/thoughtspotpublicrestapi/models/tspublic_rest_v_2_admin_assignauthor_request.py deleted file mode 100644 index fae24b5e0..000000000 --- a/Python/thoughtspotpublicrestapi/models/tspublic_rest_v_2_admin_assignauthor_request.py +++ /dev/null @@ -1,76 +0,0 @@ -# -*- coding: utf-8 -*- - -""" -thoughtspotpublicrestapi - -This file was automatically generated by APIMATIC v3.0 ( - https://www.apimatic.io ). -""" -from thoughtspotpublicrestapi.api_helper import APIHelper - - -class TspublicRestV2AdminAssignauthorRequest(object): - - """Implementation of the 'Tspublic Rest V2 Admin Assignauthor Request' model. - - TODO: type model description here. - - Attributes: - ts_object_id (list of string): A JSON array of GUIDs of the metadata - objects. - name (string): User name of the user account - id (string): The GUID of the user account - - """ - - # Create a mapping from Model property names to API property names - _names = { - "ts_object_id": 'tsObjectId', - "name": 'name', - "id": 'id' - } - - _optionals = [ - 'name', - 'id', - ] - - def __init__(self, - ts_object_id=None, - name=APIHelper.SKIP, - id=APIHelper.SKIP): - """Constructor for the TspublicRestV2AdminAssignauthorRequest class""" - - # Initialize members of the class - self.ts_object_id = ts_object_id - if name is not APIHelper.SKIP: - self.name = name - if id is not APIHelper.SKIP: - self.id = id - - @classmethod - def from_dictionary(cls, - dictionary): - """Creates an instance of this model from a dictionary - - Args: - dictionary (dictionary): A dictionary representation of the object - as obtained from the deserialization of the server's response. The - keys MUST match property names in the API description. - - Returns: - object: An instance of this structure class. - - """ - if dictionary is None: - return None - - # Extract variables from the dictionary - - ts_object_id = dictionary.get("tsObjectId") if dictionary.get("tsObjectId") else None - name = dictionary.get("name") if dictionary.get("name") else APIHelper.SKIP - id = dictionary.get("id") if dictionary.get("id") else APIHelper.SKIP - # Return an object of this model - return cls(ts_object_id, - name, - id) diff --git a/Python/thoughtspotpublicrestapi/models/tspublic_rest_v_2_admin_changeauthor_request.py b/Python/thoughtspotpublicrestapi/models/tspublic_rest_v_2_admin_changeauthor_request.py deleted file mode 100644 index 61c493e07..000000000 --- a/Python/thoughtspotpublicrestapi/models/tspublic_rest_v_2_admin_changeauthor_request.py +++ /dev/null @@ -1,80 +0,0 @@ -# -*- coding: utf-8 -*- - -""" -thoughtspotpublicrestapi - -This file was automatically generated by APIMATIC v3.0 ( - https://www.apimatic.io ). -""" -from thoughtspotpublicrestapi.models.from_user_name_and_id_input import FromUserNameAndIDInput -from thoughtspotpublicrestapi.models.to_user_name_and_id_input import ToUserNameAndIDInput - - -class TspublicRestV2AdminChangeauthorRequest(object): - - """Implementation of the 'Tspublic Rest V2 Admin Changeauthor Request' model. - - TODO: type model description here. - - Attributes: - ts_object_id (list of string): A JSON array of GUIDs of the metadata - objects. To change owner of all the objects owned by a user, - provide single input as ALL. If multiple object ids along with - ALL is provided as input, then ALL will be considered. - from_user (FromUserNameAndIDInput): A JSON object of name or GUIDs of - the current owner of the objects. When both are given then id is - considered. If a list of object ids are provided as input for - TsObjectId, then only for those ids that have owner as the value - provided in fromUser, the owner will be changed. Provide either - name or id as input. When both are given user id will be - considered. - to_user (ToUserNameAndIDInput): A JSON object of name or GUIDs of the - new owner for the objects. When both are given then id is - considered. - - """ - - # Create a mapping from Model property names to API property names - _names = { - "ts_object_id": 'tsObjectId', - "from_user": 'fromUser', - "to_user": 'toUser' - } - - def __init__(self, - ts_object_id=None, - from_user=None, - to_user=None): - """Constructor for the TspublicRestV2AdminChangeauthorRequest class""" - - # Initialize members of the class - self.ts_object_id = ts_object_id - self.from_user = from_user - self.to_user = to_user - - @classmethod - def from_dictionary(cls, - dictionary): - """Creates an instance of this model from a dictionary - - Args: - dictionary (dictionary): A dictionary representation of the object - as obtained from the deserialization of the server's response. The - keys MUST match property names in the API description. - - Returns: - object: An instance of this structure class. - - """ - if dictionary is None: - return None - - # Extract variables from the dictionary - - ts_object_id = dictionary.get("tsObjectId") if dictionary.get("tsObjectId") else None - from_user = FromUserNameAndIDInput.from_dictionary(dictionary.get('fromUser')) if dictionary.get('fromUser') else None - to_user = ToUserNameAndIDInput.from_dictionary(dictionary.get('toUser')) if dictionary.get('toUser') else None - # Return an object of this model - return cls(ts_object_id, - from_user, - to_user) diff --git a/Python/thoughtspotpublicrestapi/models/tspublic_rest_v_2_admin_configuration_update_request.py b/Python/thoughtspotpublicrestapi/models/tspublic_rest_v_2_admin_configuration_update_request.py deleted file mode 100644 index ff07ad25f..000000000 --- a/Python/thoughtspotpublicrestapi/models/tspublic_rest_v_2_admin_configuration_update_request.py +++ /dev/null @@ -1,63 +0,0 @@ -# -*- coding: utf-8 -*- - -""" -thoughtspotpublicrestapi - -This file was automatically generated by APIMATIC v3.0 ( - https://www.apimatic.io ). -""" -from thoughtspotpublicrestapi.api_helper import APIHelper - - -class TspublicRestV2AdminConfigurationUpdateRequest(object): - - """Implementation of the 'Tspublic Rest V2 Admin Configuration Update Request' model. - - TODO: type model description here. - - Attributes: - configuration (string): A JSON file with the key-value pair of - configuration attributes to be updated. Example: - {"defaultChartDataSize": 5000} - - """ - - # Create a mapping from Model property names to API property names - _names = { - "configuration": 'configuration' - } - - _optionals = [ - 'configuration', - ] - - def __init__(self, - configuration=APIHelper.SKIP): - """Constructor for the TspublicRestV2AdminConfigurationUpdateRequest class""" - - # Initialize members of the class - if configuration is not APIHelper.SKIP: - self.configuration = configuration - - @classmethod - def from_dictionary(cls, - dictionary): - """Creates an instance of this model from a dictionary - - Args: - dictionary (dictionary): A dictionary representation of the object - as obtained from the deserialization of the server's response. The - keys MUST match property names in the API description. - - Returns: - object: An instance of this structure class. - - """ - if dictionary is None: - return None - - # Extract variables from the dictionary - - configuration = dictionary.get("configuration") if dictionary.get("configuration") else APIHelper.SKIP - # Return an object of this model - return cls(configuration) diff --git a/Python/thoughtspotpublicrestapi/models/tspublic_rest_v_2_admin_forcelogout_request.py b/Python/thoughtspotpublicrestapi/models/tspublic_rest_v_2_admin_forcelogout_request.py deleted file mode 100644 index 711a88185..000000000 --- a/Python/thoughtspotpublicrestapi/models/tspublic_rest_v_2_admin_forcelogout_request.py +++ /dev/null @@ -1,67 +0,0 @@ -# -*- coding: utf-8 -*- - -""" -thoughtspotpublicrestapi - -This file was automatically generated by APIMATIC v3.0 ( - https://www.apimatic.io ). -""" -from thoughtspotpublicrestapi.api_helper import APIHelper -from thoughtspotpublicrestapi.models.name_and_id_input import NameAndIdInput - - -class TspublicRestV2AdminForcelogoutRequest(object): - - """Implementation of the 'Tspublic Rest V2 Admin Forcelogout Request' model. - - TODO: type model description here. - - Attributes: - user (list of NameAndIdInput): A JSON array of name of users or GUIDs - of groups or both. When both are given then id is considered. - - """ - - # Create a mapping from Model property names to API property names - _names = { - "user": 'user' - } - - _optionals = [ - 'user', - ] - - def __init__(self, - user=APIHelper.SKIP): - """Constructor for the TspublicRestV2AdminForcelogoutRequest class""" - - # Initialize members of the class - if user is not APIHelper.SKIP: - self.user = user - - @classmethod - def from_dictionary(cls, - dictionary): - """Creates an instance of this model from a dictionary - - Args: - dictionary (dictionary): A dictionary representation of the object - as obtained from the deserialization of the server's response. The - keys MUST match property names in the API description. - - Returns: - object: An instance of this structure class. - - """ - if dictionary is None: - return None - - # Extract variables from the dictionary - - user = None - if dictionary.get('user') is not None: - user = [NameAndIdInput.from_dictionary(x) for x in dictionary.get('user')] - else: - user = APIHelper.SKIP - # Return an object of this model - return cls(user) diff --git a/Python/thoughtspotpublicrestapi/models/tspublic_rest_v_2_admin_resetpassword_request.py b/Python/thoughtspotpublicrestapi/models/tspublic_rest_v_2_admin_resetpassword_request.py deleted file mode 100644 index 88498a6cf..000000000 --- a/Python/thoughtspotpublicrestapi/models/tspublic_rest_v_2_admin_resetpassword_request.py +++ /dev/null @@ -1,75 +0,0 @@ -# -*- coding: utf-8 -*- - -""" -thoughtspotpublicrestapi - -This file was automatically generated by APIMATIC v3.0 ( - https://www.apimatic.io ). -""" -from thoughtspotpublicrestapi.api_helper import APIHelper - - -class TspublicRestV2AdminResetpasswordRequest(object): - - """Implementation of the 'Tspublic Rest V2 Admin Resetpassword Request' model. - - TODO: type model description here. - - Attributes: - name (string): User name of the user account - id (string): The GUID of the user account to query. - new_password (string): A new password for the user. - - """ - - # Create a mapping from Model property names to API property names - _names = { - "new_password": 'newPassword', - "name": 'name', - "id": 'id' - } - - _optionals = [ - 'name', - 'id', - ] - - def __init__(self, - new_password=None, - name=APIHelper.SKIP, - id=APIHelper.SKIP): - """Constructor for the TspublicRestV2AdminResetpasswordRequest class""" - - # Initialize members of the class - if name is not APIHelper.SKIP: - self.name = name - if id is not APIHelper.SKIP: - self.id = id - self.new_password = new_password - - @classmethod - def from_dictionary(cls, - dictionary): - """Creates an instance of this model from a dictionary - - Args: - dictionary (dictionary): A dictionary representation of the object - as obtained from the deserialization of the server's response. The - keys MUST match property names in the API description. - - Returns: - object: An instance of this structure class. - - """ - if dictionary is None: - return None - - # Extract variables from the dictionary - - new_password = dictionary.get("newPassword") if dictionary.get("newPassword") else None - name = dictionary.get("name") if dictionary.get("name") else APIHelper.SKIP - id = dictionary.get("id") if dictionary.get("id") else APIHelper.SKIP - # Return an object of this model - return cls(new_password, - name, - id) diff --git a/Python/thoughtspotpublicrestapi/models/tspublic_rest_v_2_admin_syncprincipal_request.py b/Python/thoughtspotpublicrestapi/models/tspublic_rest_v_2_admin_syncprincipal_request.py deleted file mode 100644 index d81c9b190..000000000 --- a/Python/thoughtspotpublicrestapi/models/tspublic_rest_v_2_admin_syncprincipal_request.py +++ /dev/null @@ -1,103 +0,0 @@ -# -*- coding: utf-8 -*- - -""" -thoughtspotpublicrestapi - -This file was automatically generated by APIMATIC v3.0 ( - https://www.apimatic.io ). -""" -from thoughtspotpublicrestapi.api_helper import APIHelper - - -class TspublicRestV2AdminSyncprincipalRequest(object): - - """Implementation of the 'Tspublic Rest V2 Admin Syncprincipal Request' model. - - TODO: type model description here. - - Attributes: - principal_object (list of object): A JSON array of principal objects - containing all users and groups present in the external system. - Example: { "name": "Customer Success", "displayName": - "Customer Success", "description": "CS", "created": - 1568926267025, "modified": 1568926982242, "principalTypeEnum": - "LOCAL_GROUP", "groupNames": [], "visibility": "DEFAULT" }, - { "name": "test", "displayName": "test one", "created": - 1587573621279, "modified": 1587573621674, "mail": - "test2@test.com", "principalTypeEnum": "LOCAL_USER", - "groupNames": [ "Administrator", "All" ], "visibility": - "DEFAULT" } You can leave the created and modified dates blank - for new users. You can specify if the principal is a user - (LOCAL_USER) or user group (LOCAL_GROUP) in the principalTypeEnum - keyword. Set visibility to NON_SHARABLE, if you do not want the - user to be able to share ThoughtSpot objects with other users in - this group. - update_modified (bool): Specifies whether to apply the changes to - users and groups already in the cluster based on the principal - object list input. - delete_removed (bool): Specifies whether to delete the users and - groups already in the cluster if not present in the principal - object list input. - new_user_password (string): Assign a password for new users added - during the sync operation. All new users added will have this - password. It is mandatory to provide value for this field if new - users are included in the input list. - - """ - - # Create a mapping from Model property names to API property names - _names = { - "principal_object": 'principalObject', - "update_modified": 'updateModified', - "delete_removed": 'deleteRemoved', - "new_user_password": 'newUserPassword' - } - - _optionals = [ - 'update_modified', - 'delete_removed', - 'new_user_password', - ] - - def __init__(self, - principal_object=None, - update_modified=False, - delete_removed=False, - new_user_password=APIHelper.SKIP): - """Constructor for the TspublicRestV2AdminSyncprincipalRequest class""" - - # Initialize members of the class - self.principal_object = principal_object - self.update_modified = update_modified - self.delete_removed = delete_removed - if new_user_password is not APIHelper.SKIP: - self.new_user_password = new_user_password - - @classmethod - def from_dictionary(cls, - dictionary): - """Creates an instance of this model from a dictionary - - Args: - dictionary (dictionary): A dictionary representation of the object - as obtained from the deserialization of the server's response. The - keys MUST match property names in the API description. - - Returns: - object: An instance of this structure class. - - """ - if dictionary is None: - return None - - # Extract variables from the dictionary - - principal_object = dictionary.get("principalObject") if dictionary.get("principalObject") else None - update_modified = dictionary.get("updateModified") if dictionary.get("updateModified") else False - delete_removed = dictionary.get("deleteRemoved") if dictionary.get("deleteRemoved") else False - new_user_password = dictionary.get("newUserPassword") if dictionary.get("newUserPassword") else APIHelper.SKIP - # Return an object of this model - return cls(principal_object, - update_modified, - delete_removed, - new_user_password) diff --git a/Python/thoughtspotpublicrestapi/models/tspublic_rest_v_2_connection_addtable_request.py b/Python/thoughtspotpublicrestapi/models/tspublic_rest_v_2_connection_addtable_request.py deleted file mode 100644 index eebf31e31..000000000 --- a/Python/thoughtspotpublicrestapi/models/tspublic_rest_v_2_connection_addtable_request.py +++ /dev/null @@ -1,64 +0,0 @@ -# -*- coding: utf-8 -*- - -""" -thoughtspotpublicrestapi - -This file was automatically generated by APIMATIC v3.0 ( - https://www.apimatic.io ). -""" -from thoughtspotpublicrestapi.models.add_table_input import AddTableInput - - -class TspublicRestV2ConnectionAddtableRequest(object): - - """Implementation of the 'Tspublic Rest V2 Connection Addtable Request' model. - - TODO: type model description here. - - Attributes: - id (string): GUID of the connection - table (list of AddTableInput): A JSON array of table details - - """ - - # Create a mapping from Model property names to API property names - _names = { - "id": 'id', - "table": 'table' - } - - def __init__(self, - id=None, - table=None): - """Constructor for the TspublicRestV2ConnectionAddtableRequest class""" - - # Initialize members of the class - self.id = id - self.table = table - - @classmethod - def from_dictionary(cls, - dictionary): - """Creates an instance of this model from a dictionary - - Args: - dictionary (dictionary): A dictionary representation of the object - as obtained from the deserialization of the server's response. The - keys MUST match property names in the API description. - - Returns: - object: An instance of this structure class. - - """ - if dictionary is None: - return None - - # Extract variables from the dictionary - - id = dictionary.get("id") if dictionary.get("id") else None - table = None - if dictionary.get('table') is not None: - table = [AddTableInput.from_dictionary(x) for x in dictionary.get('table')] - # Return an object of this model - return cls(id, - table) diff --git a/Python/thoughtspotpublicrestapi/models/tspublic_rest_v_2_connection_create_request.py b/Python/thoughtspotpublicrestapi/models/tspublic_rest_v_2_connection_create_request.py deleted file mode 100644 index cdd43eeca..000000000 --- a/Python/thoughtspotpublicrestapi/models/tspublic_rest_v_2_connection_create_request.py +++ /dev/null @@ -1,81 +0,0 @@ -# -*- coding: utf-8 -*- - -""" -thoughtspotpublicrestapi - -This file was automatically generated by APIMATIC v3.0 ( - https://www.apimatic.io ). -""" -from thoughtspotpublicrestapi.api_helper import APIHelper - - -class TspublicRestV2ConnectionCreateRequest(object): - - """Implementation of the 'Tspublic Rest V2 Connection Create Request' model. - - TODO: type model description here. - - Attributes: - mtype (Type14Enum): Type of the data connection. - name (string): Name of the connection - description (string): A short description of the connection. - configuration (string): A JSON object of the connection metadata. The - metadata must include configuration attributes required to create - the connection. - - """ - - # Create a mapping from Model property names to API property names - _names = { - "mtype": 'type', - "name": 'name', - "configuration": 'configuration', - "description": 'description' - } - - _optionals = [ - 'description', - ] - - def __init__(self, - mtype=None, - name=None, - configuration=None, - description=APIHelper.SKIP): - """Constructor for the TspublicRestV2ConnectionCreateRequest class""" - - # Initialize members of the class - self.mtype = mtype - self.name = name - if description is not APIHelper.SKIP: - self.description = description - self.configuration = configuration - - @classmethod - def from_dictionary(cls, - dictionary): - """Creates an instance of this model from a dictionary - - Args: - dictionary (dictionary): A dictionary representation of the object - as obtained from the deserialization of the server's response. The - keys MUST match property names in the API description. - - Returns: - object: An instance of this structure class. - - """ - if dictionary is None: - return None - - # Extract variables from the dictionary - - mtype = dictionary.get("type") if dictionary.get("type") else None - name = dictionary.get("name") if dictionary.get("name") else None - configuration = dictionary.get("configuration") if dictionary.get("configuration") else None - description = dictionary.get("description") if dictionary.get("description") else APIHelper.SKIP - # Return an object of this model - return cls(mtype, - name, - configuration, - description) diff --git a/Python/thoughtspotpublicrestapi/models/tspublic_rest_v_2_connection_removetable_request.py b/Python/thoughtspotpublicrestapi/models/tspublic_rest_v_2_connection_removetable_request.py deleted file mode 100644 index cd07f245b..000000000 --- a/Python/thoughtspotpublicrestapi/models/tspublic_rest_v_2_connection_removetable_request.py +++ /dev/null @@ -1,66 +0,0 @@ -# -*- coding: utf-8 -*- - -""" -thoughtspotpublicrestapi - -This file was automatically generated by APIMATIC v3.0 ( - https://www.apimatic.io ). -""" -from thoughtspotpublicrestapi.models.table_input import TableInput - - -class TspublicRestV2ConnectionRemovetableRequest(object): - - """Implementation of the 'Tspublic Rest V2 Connection Removetable Request' model. - - TODO: type model description here. - - Attributes: - id (string): GUID of the connection - table (list of TableInput): A JSON array of name or GUIDs of the table - or both. At least one input is required. Provide either table name - or id. When both are given then id is considered - - """ - - # Create a mapping from Model property names to API property names - _names = { - "id": 'id', - "table": 'table' - } - - def __init__(self, - id=None, - table=None): - """Constructor for the TspublicRestV2ConnectionRemovetableRequest class""" - - # Initialize members of the class - self.id = id - self.table = table - - @classmethod - def from_dictionary(cls, - dictionary): - """Creates an instance of this model from a dictionary - - Args: - dictionary (dictionary): A dictionary representation of the object - as obtained from the deserialization of the server's response. The - keys MUST match property names in the API description. - - Returns: - object: An instance of this structure class. - - """ - if dictionary is None: - return None - - # Extract variables from the dictionary - - id = dictionary.get("id") if dictionary.get("id") else None - table = None - if dictionary.get('table') is not None: - table = [TableInput.from_dictionary(x) for x in dictionary.get('table')] - # Return an object of this model - return cls(id, - table) diff --git a/Python/thoughtspotpublicrestapi/models/tspublic_rest_v_2_connection_search_request.py b/Python/thoughtspotpublicrestapi/models/tspublic_rest_v_2_connection_search_request.py deleted file mode 100644 index b292904c4..000000000 --- a/Python/thoughtspotpublicrestapi/models/tspublic_rest_v_2_connection_search_request.py +++ /dev/null @@ -1,153 +0,0 @@ -# -*- coding: utf-8 -*- - -""" -thoughtspotpublicrestapi - -This file was automatically generated by APIMATIC v3.0 ( - https://www.apimatic.io ). -""" -from thoughtspotpublicrestapi.api_helper import APIHelper -from thoughtspotpublicrestapi.models.tag_name_and_id_input import TagNameAndIdInput - - -class TspublicRestV2ConnectionSearchRequest(object): - - """Implementation of the 'Tspublic Rest V2 Connection Search Request' model. - - TODO: type model description here. - - Attributes: - offset (int): The offset point, starting from where the records should - be included in the response. If no input is provided then offset - starts from 0 - batch_number (int): An alternate way to set offset for the starting - point of the response. Offset field should be kept blank to use - the value from this field. Offset value will be calculated as - (batchNumber - 1) * batchSize. It is mandatory to provide a value - for batchSize with batchNumber. Example: Assume response has 100 - records. Now, batchNumber is set as 2 and batchSize as 10, then - offset value will be 10. So, 10 records starting from 11th record - will be considered. - batch_size (int): The number of records that should be included in the - response starting from offset position. If no input is provided, - then all records starting from the value provided in offset is - included in the response. - sort_by (SortBy1Enum): Field based on which the re.sponse needs to be - ordered. Valid values - sort_order (SortOrder1Enum): Order in which sortBy should be applied. - Valid values - mtype (Type15Enum): Type of the connect being searched. Valid values: - SNOWFLAKE|AMAZON_REDSHIFT|GOOGLE_BIGQUERY|AZURE_SYNAPSE|TERADATA|ST - ARBURST|SAP_HANA|ORACLE_ADW|DATABRICKS|DENODO - name_pattern (string): A pattern to match the name of the connection. - This parameter supports matching case-insensitive strings. For a - wildcard match, use %. - fetch_id (list of string): A JSON array containing the GUIDs of the - connections that you want to fetch. - skip_id (list of string): A JSON array containing the GUIDs of the - connections that you want to skip. - tag (list of TagNameAndIdInput): A JSON array of name or GUID of tags - or both. When both are given then id is considered - - """ - - # Create a mapping from Model property names to API property names - _names = { - "mtype": 'type', - "offset": 'offset', - "batch_number": 'batchNumber', - "batch_size": 'batchSize', - "sort_by": 'sortBy', - "sort_order": 'sortOrder', - "name_pattern": 'namePattern', - "fetch_id": 'fetchId', - "skip_id": 'skipId', - "tag": 'tag' - } - - _optionals = [ - 'offset', - 'batch_number', - 'batch_size', - 'sort_by', - 'sort_order', - 'name_pattern', - 'fetch_id', - 'skip_id', - 'tag', - ] - - def __init__(self, - mtype=None, - offset=0, - batch_number=-1, - batch_size=-1, - sort_by='DEFAULT', - sort_order=APIHelper.SKIP, - name_pattern=APIHelper.SKIP, - fetch_id=APIHelper.SKIP, - skip_id=APIHelper.SKIP, - tag=APIHelper.SKIP): - """Constructor for the TspublicRestV2ConnectionSearchRequest class""" - - # Initialize members of the class - self.offset = offset - self.batch_number = batch_number - self.batch_size = batch_size - self.sort_by = sort_by - if sort_order is not APIHelper.SKIP: - self.sort_order = sort_order - self.mtype = mtype - if name_pattern is not APIHelper.SKIP: - self.name_pattern = name_pattern - if fetch_id is not APIHelper.SKIP: - self.fetch_id = fetch_id - if skip_id is not APIHelper.SKIP: - self.skip_id = skip_id - if tag is not APIHelper.SKIP: - self.tag = tag - - @classmethod - def from_dictionary(cls, - dictionary): - """Creates an instance of this model from a dictionary - - Args: - dictionary (dictionary): A dictionary representation of the object - as obtained from the deserialization of the server's response. The - keys MUST match property names in the API description. - - Returns: - object: An instance of this structure class. - - """ - if dictionary is None: - return None - - # Extract variables from the dictionary - - mtype = dictionary.get("type") if dictionary.get("type") else None - offset = dictionary.get("offset") if dictionary.get("offset") else 0 - batch_number = dictionary.get("batchNumber") if dictionary.get("batchNumber") else -1 - batch_size = dictionary.get("batchSize") if dictionary.get("batchSize") else -1 - sort_by = dictionary.get("sortBy") if dictionary.get("sortBy") else 'DEFAULT' - sort_order = dictionary.get("sortOrder") if dictionary.get("sortOrder") else APIHelper.SKIP - name_pattern = dictionary.get("namePattern") if dictionary.get("namePattern") else APIHelper.SKIP - fetch_id = dictionary.get("fetchId") if dictionary.get("fetchId") else APIHelper.SKIP - skip_id = dictionary.get("skipId") if dictionary.get("skipId") else APIHelper.SKIP - tag = None - if dictionary.get('tag') is not None: - tag = [TagNameAndIdInput.from_dictionary(x) for x in dictionary.get('tag')] - else: - tag = APIHelper.SKIP - # Return an object of this model - return cls(mtype, - offset, - batch_number, - batch_size, - sort_by, - sort_order, - name_pattern, - fetch_id, - skip_id, - tag) diff --git a/Python/thoughtspotpublicrestapi/models/tspublic_rest_v_2_connection_table_request.py b/Python/thoughtspotpublicrestapi/models/tspublic_rest_v_2_connection_table_request.py deleted file mode 100644 index 6cb214859..000000000 --- a/Python/thoughtspotpublicrestapi/models/tspublic_rest_v_2_connection_table_request.py +++ /dev/null @@ -1,83 +0,0 @@ -# -*- coding: utf-8 -*- - -""" -thoughtspotpublicrestapi - -This file was automatically generated by APIMATIC v3.0 ( - https://www.apimatic.io ). -""" -from thoughtspotpublicrestapi.api_helper import APIHelper - - -class TspublicRestV2ConnectionTableRequest(object): - - """Implementation of the 'Tspublic Rest V2 Connection Table Request' model. - - TODO: type model description here. - - Attributes: - id (string): The GUID of the connection - configuration (string): A JSON object of the connection metadata. If - this field is left empty, then the configuration saved in the - connection is considered. To get the tables based on a different - configuration, include required attributes in the connection - configuration JSON. Example: Get tables from Snowflake - with a different user account than specified in the connection: - {"user":"test_user","password":"test_pwd","role":"test_role"} - Get tables from Redshift for different database than specified in - the connection: {"database":"test_db"} - include_column (bool): When set to true, the response will include - column level details as well - - """ - - # Create a mapping from Model property names to API property names - _names = { - "id": 'id', - "configuration": 'configuration', - "include_column": 'includeColumn' - } - - _optionals = [ - 'configuration', - 'include_column', - ] - - def __init__(self, - id=None, - configuration=APIHelper.SKIP, - include_column=True): - """Constructor for the TspublicRestV2ConnectionTableRequest class""" - - # Initialize members of the class - self.id = id - if configuration is not APIHelper.SKIP: - self.configuration = configuration - self.include_column = include_column - - @classmethod - def from_dictionary(cls, - dictionary): - """Creates an instance of this model from a dictionary - - Args: - dictionary (dictionary): A dictionary representation of the object - as obtained from the deserialization of the server's response. The - keys MUST match property names in the API description. - - Returns: - object: An instance of this structure class. - - """ - if dictionary is None: - return None - - # Extract variables from the dictionary - - id = dictionary.get("id") if dictionary.get("id") else None - configuration = dictionary.get("configuration") if dictionary.get("configuration") else APIHelper.SKIP - include_column = dictionary.get("includeColumn") if dictionary.get("includeColumn") else True - # Return an object of this model - return cls(id, - configuration, - include_column) diff --git a/Python/thoughtspotpublicrestapi/models/tspublic_rest_v_2_connection_tablecoloumn_request.py b/Python/thoughtspotpublicrestapi/models/tspublic_rest_v_2_connection_tablecoloumn_request.py deleted file mode 100644 index ff7f60d64..000000000 --- a/Python/thoughtspotpublicrestapi/models/tspublic_rest_v_2_connection_tablecoloumn_request.py +++ /dev/null @@ -1,84 +0,0 @@ -# -*- coding: utf-8 -*- - -""" -thoughtspotpublicrestapi - -This file was automatically generated by APIMATIC v3.0 ( - https://www.apimatic.io ). -""" -from thoughtspotpublicrestapi.api_helper import APIHelper -from thoughtspotpublicrestapi.models.connection_table_columns_input import ConnectionTableColumnsInput - - -class TspublicRestV2ConnectionTablecoloumnRequest(object): - - """Implementation of the 'Tspublic Rest V2 Connection Tablecoloumn Request' model. - - TODO: type model description here. - - Attributes: - id (string): The GUID of the connection - configuration (string): A JSON object of the connection metadata. If - this field is left empty, then the configuration saved in the - connection is considered. To get the tables based on a different - configuration, include required attributes in the connection - configuration JSON. Example: Get tables from Snowflake - with a different user account than specified in the connection: - {"user":"test_user","password":"test_pwd","role":"test_role"} - Get tables from Redshift for different database than specified in - the connection: {"database":"test_db"} - table (list of ConnectionTableColumnsInput): List of table details - - """ - - # Create a mapping from Model property names to API property names - _names = { - "id": 'id', - "table": 'table', - "configuration": 'configuration' - } - - _optionals = [ - 'configuration', - ] - - def __init__(self, - id=None, - table=None, - configuration=APIHelper.SKIP): - """Constructor for the TspublicRestV2ConnectionTablecoloumnRequest class""" - - # Initialize members of the class - self.id = id - if configuration is not APIHelper.SKIP: - self.configuration = configuration - self.table = table - - @classmethod - def from_dictionary(cls, - dictionary): - """Creates an instance of this model from a dictionary - - Args: - dictionary (dictionary): A dictionary representation of the object - as obtained from the deserialization of the server's response. The - keys MUST match property names in the API description. - - Returns: - object: An instance of this structure class. - - """ - if dictionary is None: - return None - - # Extract variables from the dictionary - - id = dictionary.get("id") if dictionary.get("id") else None - table = None - if dictionary.get('table') is not None: - table = [ConnectionTableColumnsInput.from_dictionary(x) for x in dictionary.get('table')] - configuration = dictionary.get("configuration") if dictionary.get("configuration") else APIHelper.SKIP - # Return an object of this model - return cls(id, - table, - configuration) diff --git a/Python/thoughtspotpublicrestapi/models/tspublic_rest_v_2_connection_update_request.py b/Python/thoughtspotpublicrestapi/models/tspublic_rest_v_2_connection_update_request.py deleted file mode 100644 index bc47c8016..000000000 --- a/Python/thoughtspotpublicrestapi/models/tspublic_rest_v_2_connection_update_request.py +++ /dev/null @@ -1,84 +0,0 @@ -# -*- coding: utf-8 -*- - -""" -thoughtspotpublicrestapi - -This file was automatically generated by APIMATIC v3.0 ( - https://www.apimatic.io ). -""" -from thoughtspotpublicrestapi.api_helper import APIHelper - - -class TspublicRestV2ConnectionUpdateRequest(object): - - """Implementation of the 'Tspublic Rest V2 Connection Update Request' model. - - TODO: type model description here. - - Attributes: - id (string): GUID of the connection - name (string): The text to update the name of the connection. - description (string): The text to update the description of the - connection. - configuration (string): A JSON object of the connection metadata. - Include all the configuration attributes with original value along - with the changes required to any attribute. - - """ - - # Create a mapping from Model property names to API property names - _names = { - "id": 'id', - "configuration": 'configuration', - "name": 'name', - "description": 'description' - } - - _optionals = [ - 'name', - 'description', - ] - - def __init__(self, - id=None, - configuration=None, - name=APIHelper.SKIP, - description=APIHelper.SKIP): - """Constructor for the TspublicRestV2ConnectionUpdateRequest class""" - - # Initialize members of the class - self.id = id - if name is not APIHelper.SKIP: - self.name = name - if description is not APIHelper.SKIP: - self.description = description - self.configuration = configuration - - @classmethod - def from_dictionary(cls, - dictionary): - """Creates an instance of this model from a dictionary - - Args: - dictionary (dictionary): A dictionary representation of the object - as obtained from the deserialization of the server's response. The - keys MUST match property names in the API description. - - Returns: - object: An instance of this structure class. - - """ - if dictionary is None: - return None - - # Extract variables from the dictionary - - id = dictionary.get("id") if dictionary.get("id") else None - configuration = dictionary.get("configuration") if dictionary.get("configuration") else None - name = dictionary.get("name") if dictionary.get("name") else APIHelper.SKIP - description = dictionary.get("description") if dictionary.get("description") else APIHelper.SKIP - # Return an object of this model - return cls(id, - configuration, - name, - description) diff --git a/Python/thoughtspotpublicrestapi/models/tspublic_rest_v_2_customaction_association_update_request.py b/Python/thoughtspotpublicrestapi/models/tspublic_rest_v_2_customaction_association_update_request.py deleted file mode 100644 index 90aad1331..000000000 --- a/Python/thoughtspotpublicrestapi/models/tspublic_rest_v_2_customaction_association_update_request.py +++ /dev/null @@ -1,70 +0,0 @@ -# -*- coding: utf-8 -*- - -""" -thoughtspotpublicrestapi - -This file was automatically generated by APIMATIC v3.0 ( - https://www.apimatic.io ). -""" - - -class TspublicRestV2CustomactionAssociationUpdateRequest(object): - - """Implementation of the 'Tspublic Rest V2 Customaction Association Update Request' model. - - TODO: type model description here. - - Attributes: - id (string): GUID of the custom action - association (string): A JSON map of the attributes with association of - the action to ThoughtSpot object ID Example: - {"id":"0dbd5b3a-84c1-4407-9803-cf07d67e6fcf","name":"My worksheet - action","version":"v2","type":"URL","detail":{"link":"https://unpkg - .com","function":"my-worksheet-action","authSelect":"NONE","authTok - en":"","encodeUser":"","apiKey":"X-API-KEY","apiValue":"","addition - alUrlHeaders":"{}"},"actionAssociationMap":{"WORKSHEET":{"2b9d083a- - 275c-4984-9cfe-90b036affa17":{"enabled":"true","context":"PRIMARY"} - }},"context":"NONE","availability":[ - ],"userGroupList":["d0326b56-ef23-4c8a-8327-a30e99bcc72b"]} - - """ - - # Create a mapping from Model property names to API property names - _names = { - "id": 'id', - "association": 'association' - } - - def __init__(self, - id=None, - association=None): - """Constructor for the TspublicRestV2CustomactionAssociationUpdateRequest class""" - - # Initialize members of the class - self.id = id - self.association = association - - @classmethod - def from_dictionary(cls, - dictionary): - """Creates an instance of this model from a dictionary - - Args: - dictionary (dictionary): A dictionary representation of the object - as obtained from the deserialization of the server's response. The - keys MUST match property names in the API description. - - Returns: - object: An instance of this structure class. - - """ - if dictionary is None: - return None - - # Extract variables from the dictionary - - id = dictionary.get("id") if dictionary.get("id") else None - association = dictionary.get("association") if dictionary.get("association") else None - # Return an object of this model - return cls(id, - association) diff --git a/Python/thoughtspotpublicrestapi/models/tspublic_rest_v_2_customaction_create_request.py b/Python/thoughtspotpublicrestapi/models/tspublic_rest_v_2_customaction_create_request.py deleted file mode 100644 index d4efa3be0..000000000 --- a/Python/thoughtspotpublicrestapi/models/tspublic_rest_v_2_customaction_create_request.py +++ /dev/null @@ -1,67 +0,0 @@ -# -*- coding: utf-8 -*- - -""" -thoughtspotpublicrestapi - -This file was automatically generated by APIMATIC v3.0 ( - https://www.apimatic.io ). -""" - - -class TspublicRestV2CustomactionCreateRequest(object): - - """Implementation of the 'Tspublic Rest V2 Customaction Create Request' model. - - TODO: type model description here. - - Attributes: - configuration (string): A JSON object with the key-value pair of - configuration attributes Example: - {"id":"3f7eac93-cce1-4ffc-b7a8-429353edbc6b","name":"unpkg - test","version":"v2","type":"URL","detail":{"link":"https://unpkg.c - om - ","function":"unpkg-test","authSelect":"BEARER","authToken":"asdfas - adf3q4534534","encodeUser":"","apiKey":"X-API-KEY","apiValue":"","a - dditionalUrlHeaders":"{\\"url_header1\\":{\\"id\\":\\"6a82908c-9328 - -40ff-b347-65adeda12f57\\",\\"key\\":\\"key1\\",\\"value\\":\\"valu - e1\\"}}"},"actionAssociationMap":{"ANSWER":{"e4079d3f-ae71-4b0a-a70 - a-f17ecaf157a5":{"enabled":"true","context":"MENU"}}},"context":"NO - NE","availability":["GLOBAL"],"userGroupList":["d0326b56-ef23-4c8a- - 8327-a30e99bcc72b"]} - - """ - - # Create a mapping from Model property names to API property names - _names = { - "configuration": 'configuration' - } - - def __init__(self, - configuration=None): - """Constructor for the TspublicRestV2CustomactionCreateRequest class""" - - # Initialize members of the class - self.configuration = configuration - - @classmethod - def from_dictionary(cls, - dictionary): - """Creates an instance of this model from a dictionary - - Args: - dictionary (dictionary): A dictionary representation of the object - as obtained from the deserialization of the server's response. The - keys MUST match property names in the API description. - - Returns: - object: An instance of this structure class. - - """ - if dictionary is None: - return None - - # Extract variables from the dictionary - - configuration = dictionary.get("configuration") if dictionary.get("configuration") else None - # Return an object of this model - return cls(configuration) diff --git a/Python/thoughtspotpublicrestapi/models/tspublic_rest_v_2_customaction_search_request.py b/Python/thoughtspotpublicrestapi/models/tspublic_rest_v_2_customaction_search_request.py deleted file mode 100644 index af9ee9dcb..000000000 --- a/Python/thoughtspotpublicrestapi/models/tspublic_rest_v_2_customaction_search_request.py +++ /dev/null @@ -1,64 +0,0 @@ -# -*- coding: utf-8 -*- - -""" -thoughtspotpublicrestapi - -This file was automatically generated by APIMATIC v3.0 ( - https://www.apimatic.io ). -""" -from thoughtspotpublicrestapi.api_helper import APIHelper - - -class TspublicRestV2CustomactionSearchRequest(object): - - """Implementation of the 'Tspublic Rest V2 Customaction Search Request' model. - - TODO: type model description here. - - Attributes: - tag (list of string): A JSON array of tag GUIDs. If tags are applied - to worksheets, search answers, or Liveboard visualizations, and - custom actions are associated to these objects, you can use this - parameter to filter the custom action data by tags. - - """ - - # Create a mapping from Model property names to API property names - _names = { - "tag": 'tag' - } - - _optionals = [ - 'tag', - ] - - def __init__(self, - tag=APIHelper.SKIP): - """Constructor for the TspublicRestV2CustomactionSearchRequest class""" - - # Initialize members of the class - if tag is not APIHelper.SKIP: - self.tag = tag - - @classmethod - def from_dictionary(cls, - dictionary): - """Creates an instance of this model from a dictionary - - Args: - dictionary (dictionary): A dictionary representation of the object - as obtained from the deserialization of the server's response. The - keys MUST match property names in the API description. - - Returns: - object: An instance of this structure class. - - """ - if dictionary is None: - return None - - # Extract variables from the dictionary - - tag = dictionary.get("tag") if dictionary.get("tag") else APIHelper.SKIP - # Return an object of this model - return cls(tag) diff --git a/Python/thoughtspotpublicrestapi/models/tspublic_rest_v_2_customaction_update_request.py b/Python/thoughtspotpublicrestapi/models/tspublic_rest_v_2_customaction_update_request.py deleted file mode 100644 index 7fa492548..000000000 --- a/Python/thoughtspotpublicrestapi/models/tspublic_rest_v_2_customaction_update_request.py +++ /dev/null @@ -1,73 +0,0 @@ -# -*- coding: utf-8 -*- - -""" -thoughtspotpublicrestapi - -This file was automatically generated by APIMATIC v3.0 ( - https://www.apimatic.io ). -""" - - -class TspublicRestV2CustomactionUpdateRequest(object): - - """Implementation of the 'Tspublic Rest V2 Customaction Update Request' model. - - TODO: type model description here. - - Attributes: - id (string): GUID of the custom action - configuration (string): A JSON object with the key-value pair of - configuration attributes Example: - {"id":"3f7eac93-cce1-4ffc-b7a8-429353edbc6b","name":"unpkg - test","version":"v2","type":"URL","detail":{"link":"https://unpkg.c - om - ","function":"unpkg-test","authSelect":"BEARER","authToken":"asdfas - adf3q4534534","encodeUser":"","apiKey":"X-API-KEY","apiValue":"","a - dditionalUrlHeaders":"{\\"url_header1\\":{\\"id\\":\\"6a82908c-9328 - -40ff-b347-65adeda12f57\\",\\"key\\":\\"key1\\",\\"value\\":\\"valu - e1\\"}}"},"actionAssociationMap":{"ANSWER":{"e4079d3f-ae71-4b0a-a70 - a-f17ecaf157a5":{"enabled":"true","context":"MENU"}}},"context":"NO - NE","availability":["GLOBAL"],"userGroupList":["d0326b56-ef23-4c8a- - 8327-a30e99bcc72b"]} - - """ - - # Create a mapping from Model property names to API property names - _names = { - "id": 'id', - "configuration": 'configuration' - } - - def __init__(self, - id=None, - configuration=None): - """Constructor for the TspublicRestV2CustomactionUpdateRequest class""" - - # Initialize members of the class - self.id = id - self.configuration = configuration - - @classmethod - def from_dictionary(cls, - dictionary): - """Creates an instance of this model from a dictionary - - Args: - dictionary (dictionary): A dictionary representation of the object - as obtained from the deserialization of the server's response. The - keys MUST match property names in the API description. - - Returns: - object: An instance of this structure class. - - """ - if dictionary is None: - return None - - # Extract variables from the dictionary - - id = dictionary.get("id") if dictionary.get("id") else None - configuration = dictionary.get("configuration") if dictionary.get("configuration") else None - # Return an object of this model - return cls(id, - configuration) diff --git a/Python/thoughtspotpublicrestapi/models/tspublic_rest_v_2_data_answer_request.py b/Python/thoughtspotpublicrestapi/models/tspublic_rest_v_2_data_answer_request.py deleted file mode 100644 index e314c6657..000000000 --- a/Python/thoughtspotpublicrestapi/models/tspublic_rest_v_2_data_answer_request.py +++ /dev/null @@ -1,101 +0,0 @@ -# -*- coding: utf-8 -*- - -""" -thoughtspotpublicrestapi - -This file was automatically generated by APIMATIC v3.0 ( - https://www.apimatic.io ). -""" -from thoughtspotpublicrestapi.api_helper import APIHelper - - -class TspublicRestV2DataAnswerRequest(object): - - """Implementation of the 'Tspublic Rest V2 Data Answer Request' model. - - TODO: type model description here. - - Attributes: - offset (int): The offset point, starting from where the records should - be included in the response. If no input is provided then offset - starts from 0. - batch_number (int): An alternate way to set offset for the starting - point of the response. The value in offset field will not be - considered if batchNumber field has value greater than 0. Offset - value will be calculated as (batchNumber - 1) * batchSize. It is - mandatory to provide a value for batchSize with batchNumber. - Example: Assume response has 100 records. Now, batchNumber is - set as 2 and batchSize as 10, then offset value will be 10. So, 10 - records starting from 11th record will be considered. - batch_size (int): The number of records that should be included in the - response starting from offset position. If no input is provided, - then all records starting from the value provided in offset is - included in the response - id (string): The GUID of the Answer - format_type (FormatTypeEnum): The format of the data in the response. - FULL: The response comes in "column":"value" format. COMPACT: - The response includes only the value of the columns. - - """ - - # Create a mapping from Model property names to API property names - _names = { - "id": 'id', - "offset": 'offset', - "batch_number": 'batchNumber', - "batch_size": 'batchSize', - "format_type": 'formatType' - } - - _optionals = [ - 'offset', - 'batch_number', - 'batch_size', - 'format_type', - ] - - def __init__(self, - id=None, - offset=0, - batch_number=-1, - batch_size=-1, - format_type='COMPACT'): - """Constructor for the TspublicRestV2DataAnswerRequest class""" - - # Initialize members of the class - self.offset = offset - self.batch_number = batch_number - self.batch_size = batch_size - self.id = id - self.format_type = format_type - - @classmethod - def from_dictionary(cls, - dictionary): - """Creates an instance of this model from a dictionary - - Args: - dictionary (dictionary): A dictionary representation of the object - as obtained from the deserialization of the server's response. The - keys MUST match property names in the API description. - - Returns: - object: An instance of this structure class. - - """ - if dictionary is None: - return None - - # Extract variables from the dictionary - - id = dictionary.get("id") if dictionary.get("id") else None - offset = dictionary.get("offset") if dictionary.get("offset") else 0 - batch_number = dictionary.get("batchNumber") if dictionary.get("batchNumber") else -1 - batch_size = dictionary.get("batchSize") if dictionary.get("batchSize") else -1 - format_type = dictionary.get("formatType") if dictionary.get("formatType") else 'COMPACT' - # Return an object of this model - return cls(id, - offset, - batch_number, - batch_size, - format_type) diff --git a/Python/thoughtspotpublicrestapi/models/tspublic_rest_v_2_data_liveboard_request.py b/Python/thoughtspotpublicrestapi/models/tspublic_rest_v_2_data_liveboard_request.py deleted file mode 100644 index d04719ca8..000000000 --- a/Python/thoughtspotpublicrestapi/models/tspublic_rest_v_2_data_liveboard_request.py +++ /dev/null @@ -1,152 +0,0 @@ -# -*- coding: utf-8 -*- - -""" -thoughtspotpublicrestapi - -This file was automatically generated by APIMATIC v3.0 ( - https://www.apimatic.io ). -""" -from thoughtspotpublicrestapi.api_helper import APIHelper - - -class TspublicRestV2DataLiveboardRequest(object): - - """Implementation of the 'Tspublic Rest V2 Data Liveboard Request' model. - - TODO: type model description here. - - Attributes: - offset (int): The offset point, starting from where the records should - be included in the response. If no input is provided then offset - starts from 0. - batch_number (int): An alternate way to set offset for the starting - point of the response. The value in offset field will not be - considered if batchNumber field has value greater than 0. Offset - value will be calculated as (batchNumber - 1) * batchSize. It is - mandatory to provide a value for batchSize with batchNumber. - Example: Assume response has 100 records. Now, batchNumber is - set as 2 and batchSize as 10, then offset value will be 10. So, 10 - records starting from 11th record will be considered. - batch_size (int): The number of records that should be included in the - response starting from offset position. If no input is provided, - then all records starting from the value provided in offset is - included in the response - id (string): The GUID of the Liveboard - transient_content (string): If you have embedded ThoughtSpot in your - host application, and you want to download Liveboard data with - unsaved changes then, pass the transient content from the browser - fetch request, using the getExportRequestForCurrentPinboard - method. For more information, see - https://developers.thoughtspot.com/docs/?pageid=liveboard-export-ap - i#transient-pinboard . If value for this field is provided, then - id will not be considered. - viz_id (list of string): A JSON array of GUIDs of the visualizations - in the Liveboard. - runtime_filter (string): JSON object which contains filter condition - to filter the data at the time of data retrieval. Example: - {"col1":"region","op1":"EQ","val1":"northeast","col2":"date","op2": - "BET","val2":["1625126400000","1625126400000"]} For more - information, see - https://developers.thoughtspot.com/docs/?pageid=runtime-filters - runtime_sort (string): JSON object which provides columns to sort the - data at the time of data retrieval. Example: - {"sortCol1":"region","asc1":true,"sortCol2":"date"} For more - information, see - https://developers.thoughtspot.com/docs/?pageid=runtime-filters. - format_type (FormatTypeEnum): The format of the data in the response. - FULL: The response comes in "column":"value" format. COMPACT: - The response includes only the value of the columns. - - """ - - # Create a mapping from Model property names to API property names - _names = { - "offset": 'offset', - "batch_number": 'batchNumber', - "batch_size": 'batchSize', - "id": 'id', - "transient_content": 'transientContent', - "viz_id": 'vizId', - "runtime_filter": 'runtimeFilter', - "runtime_sort": 'runtimeSort', - "format_type": 'formatType' - } - - _optionals = [ - 'offset', - 'batch_number', - 'batch_size', - 'id', - 'transient_content', - 'viz_id', - 'runtime_filter', - 'runtime_sort', - 'format_type', - ] - - def __init__(self, - offset=0, - batch_number=-1, - batch_size=-1, - id=APIHelper.SKIP, - transient_content=APIHelper.SKIP, - viz_id=APIHelper.SKIP, - runtime_filter=APIHelper.SKIP, - runtime_sort=APIHelper.SKIP, - format_type='COMPACT'): - """Constructor for the TspublicRestV2DataLiveboardRequest class""" - - # Initialize members of the class - self.offset = offset - self.batch_number = batch_number - self.batch_size = batch_size - if id is not APIHelper.SKIP: - self.id = id - if transient_content is not APIHelper.SKIP: - self.transient_content = transient_content - if viz_id is not APIHelper.SKIP: - self.viz_id = viz_id - if runtime_filter is not APIHelper.SKIP: - self.runtime_filter = runtime_filter - if runtime_sort is not APIHelper.SKIP: - self.runtime_sort = runtime_sort - self.format_type = format_type - - @classmethod - def from_dictionary(cls, - dictionary): - """Creates an instance of this model from a dictionary - - Args: - dictionary (dictionary): A dictionary representation of the object - as obtained from the deserialization of the server's response. The - keys MUST match property names in the API description. - - Returns: - object: An instance of this structure class. - - """ - if dictionary is None: - return None - - # Extract variables from the dictionary - - offset = dictionary.get("offset") if dictionary.get("offset") else 0 - batch_number = dictionary.get("batchNumber") if dictionary.get("batchNumber") else -1 - batch_size = dictionary.get("batchSize") if dictionary.get("batchSize") else -1 - id = dictionary.get("id") if dictionary.get("id") else APIHelper.SKIP - transient_content = dictionary.get("transientContent") if dictionary.get("transientContent") else APIHelper.SKIP - viz_id = dictionary.get("vizId") if dictionary.get("vizId") else APIHelper.SKIP - runtime_filter = dictionary.get("runtimeFilter") if dictionary.get("runtimeFilter") else APIHelper.SKIP - runtime_sort = dictionary.get("runtimeSort") if dictionary.get("runtimeSort") else APIHelper.SKIP - format_type = dictionary.get("formatType") if dictionary.get("formatType") else 'COMPACT' - # Return an object of this model - return cls(offset, - batch_number, - batch_size, - id, - transient_content, - viz_id, - runtime_filter, - runtime_sort, - format_type) diff --git a/Python/thoughtspotpublicrestapi/models/tspublic_rest_v_2_data_search_request.py b/Python/thoughtspotpublicrestapi/models/tspublic_rest_v_2_data_search_request.py deleted file mode 100644 index fd0523509..000000000 --- a/Python/thoughtspotpublicrestapi/models/tspublic_rest_v_2_data_search_request.py +++ /dev/null @@ -1,109 +0,0 @@ -# -*- coding: utf-8 -*- - -""" -thoughtspotpublicrestapi - -This file was automatically generated by APIMATIC v3.0 ( - https://www.apimatic.io ). -""" -from thoughtspotpublicrestapi.api_helper import APIHelper - - -class TspublicRestV2DataSearchRequest(object): - - """Implementation of the 'Tspublic Rest V2 Data Search Request' model. - - TODO: type model description here. - - Attributes: - offset (int): The offset point, starting from where the records should - be included in the response. If no input is provided then offset - starts from 0. - batch_number (int): An alternate way to set offset for the starting - point of the response. The value in offset field will not be - considered if batchNumber field has value greater than 0. Offset - value will be calculated as (batchNumber - 1) * batchSize. It is - mandatory to provide a value for batchSize with batchNumber. - Example: Assume response has 100 records. Now, batchNumber is - set as 2 and batchSize as 10, then offset value will be 10. So, 10 - records starting from 11th record will be considered. - batch_size (int): The number of records that should be included in the - response starting from offset position. If no input is provided, - then all records starting from the value provided in offset is - included in the response - query_string (string): The data search query string. Example: - [revenue] > 1000 [ship mode] = 'air' - data_object_id (string): The GUID of the data object, either a - worksheet, a view, or a table. - format_type (FormatTypeEnum): The format of the data in the response. - FULL: The response comes in "column":"value" format. COMPACT: - The response includes only the value of the columns. - - """ - - # Create a mapping from Model property names to API property names - _names = { - "query_string": 'queryString', - "data_object_id": 'dataObjectId', - "offset": 'offset', - "batch_number": 'batchNumber', - "batch_size": 'batchSize', - "format_type": 'formatType' - } - - _optionals = [ - 'offset', - 'batch_number', - 'batch_size', - 'format_type', - ] - - def __init__(self, - query_string=None, - data_object_id=None, - offset=-1, - batch_number=-1, - batch_size=-1, - format_type='COMPACT'): - """Constructor for the TspublicRestV2DataSearchRequest class""" - - # Initialize members of the class - self.offset = offset - self.batch_number = batch_number - self.batch_size = batch_size - self.query_string = query_string - self.data_object_id = data_object_id - self.format_type = format_type - - @classmethod - def from_dictionary(cls, - dictionary): - """Creates an instance of this model from a dictionary - - Args: - dictionary (dictionary): A dictionary representation of the object - as obtained from the deserialization of the server's response. The - keys MUST match property names in the API description. - - Returns: - object: An instance of this structure class. - - """ - if dictionary is None: - return None - - # Extract variables from the dictionary - - query_string = dictionary.get("queryString") if dictionary.get("queryString") else None - data_object_id = dictionary.get("dataObjectId") if dictionary.get("dataObjectId") else None - offset = dictionary.get("offset") if dictionary.get("offset") else -1 - batch_number = dictionary.get("batchNumber") if dictionary.get("batchNumber") else -1 - batch_size = dictionary.get("batchSize") if dictionary.get("batchSize") else -1 - format_type = dictionary.get("formatType") if dictionary.get("formatType") else 'COMPACT' - # Return an object of this model - return cls(query_string, - data_object_id, - offset, - batch_number, - batch_size, - format_type) diff --git a/Python/thoughtspotpublicrestapi/models/tspublic_rest_v_2_database_table_create_request.py b/Python/thoughtspotpublicrestapi/models/tspublic_rest_v_2_database_table_create_request.py deleted file mode 100644 index 6e4a91d0e..000000000 --- a/Python/thoughtspotpublicrestapi/models/tspublic_rest_v_2_database_table_create_request.py +++ /dev/null @@ -1,77 +0,0 @@ -# -*- coding: utf-8 -*- - -""" -thoughtspotpublicrestapi - -This file was automatically generated by APIMATIC v3.0 ( - https://www.apimatic.io ). -""" -from thoughtspotpublicrestapi.api_helper import APIHelper - - -class TspublicRestV2DatabaseTableCreateRequest(object): - - """Implementation of the 'Tspublic Rest V2 Database Table Create Request' model. - - TODO: type model description here. - - Attributes: - create_database (bool): Flag to indicate if the database and schema - should be created if they do not exist in Falcon. (Valid values: - True/False) - schema (string): DDL of the table to be created. Example: - {"database":{"name":"test_db"},"schema":{"name":"test_schema"},"tab - le":{"id":{"name":"test_table"},"primary_key":[{"name":"test_pk"}], - "column":[{"id":{"name":"test_pk"},"size":0,"data_type":"TYPE_INT32 - "},{"id":{"name":"test_col1"},"size":0,"data_type":"TYPE_FLOAT"},{" - id":{"name":"test_col2"},"data_type":"TYPE_INT64","datetime":"TYPE_ - DATE"}{"id":{"name":"test_col3"},"size":10,"data_type":"TYPE_VAR_CH - AR"}]}} - - """ - - # Create a mapping from Model property names to API property names - _names = { - "create_database": 'createDatabase', - "schema": 'schema' - } - - _optionals = [ - 'create_database', - 'schema', - ] - - def __init__(self, - create_database=True, - schema=APIHelper.SKIP): - """Constructor for the TspublicRestV2DatabaseTableCreateRequest class""" - - # Initialize members of the class - self.create_database = create_database - if schema is not APIHelper.SKIP: - self.schema = schema - - @classmethod - def from_dictionary(cls, - dictionary): - """Creates an instance of this model from a dictionary - - Args: - dictionary (dictionary): A dictionary representation of the object - as obtained from the deserialization of the server's response. The - keys MUST match property names in the API description. - - Returns: - object: An instance of this structure class. - - """ - if dictionary is None: - return None - - # Extract variables from the dictionary - - create_database = dictionary.get("createDatabase") if dictionary.get("createDatabase") else True - schema = dictionary.get("schema") if dictionary.get("schema") else APIHelper.SKIP - # Return an object of this model - return cls(create_database, - schema) diff --git a/Python/thoughtspotpublicrestapi/models/tspublic_rest_v_2_database_table_runquery_request.py b/Python/thoughtspotpublicrestapi/models/tspublic_rest_v_2_database_table_runquery_request.py deleted file mode 100644 index a437e63a8..000000000 --- a/Python/thoughtspotpublicrestapi/models/tspublic_rest_v_2_database_table_runquery_request.py +++ /dev/null @@ -1,63 +0,0 @@ -# -*- coding: utf-8 -*- - -""" -thoughtspotpublicrestapi - -This file was automatically generated by APIMATIC v3.0 ( - https://www.apimatic.io ). -""" - - -class TspublicRestV2DatabaseTableRunqueryRequest(object): - - """Implementation of the 'Tspublic Rest V2 Database Table Runquery Request' model. - - TODO: type model description here. - - Attributes: - statement (list of string): A JSON array of TQL statements separated - by semi-colon (;). Each TQL statement should end with semi-colon - (;). The TQL operations that can be run through this API are - restricted to create database and schema, alter table, delete and - update table rows. If a TQL statement fails, then the subsequent - statements in the array are not run. Example: ["alter table - test_db.test_schema.test_table drop contraint primary key;";"alter - table test_db.test_schema.test_table add column test_col4 - varchar(10) DEFAULT '';"] - - """ - - # Create a mapping from Model property names to API property names - _names = { - "statement": 'statement' - } - - def __init__(self, - statement=None): - """Constructor for the TspublicRestV2DatabaseTableRunqueryRequest class""" - - # Initialize members of the class - self.statement = statement - - @classmethod - def from_dictionary(cls, - dictionary): - """Creates an instance of this model from a dictionary - - Args: - dictionary (dictionary): A dictionary representation of the object - as obtained from the deserialization of the server's response. The - keys MUST match property names in the API description. - - Returns: - object: An instance of this structure class. - - """ - if dictionary is None: - return None - - # Extract variables from the dictionary - - statement = dictionary.get("statement") if dictionary.get("statement") else None - # Return an object of this model - return cls(statement) diff --git a/Python/thoughtspotpublicrestapi/models/tspublic_rest_v_2_group_addgroup_request.py b/Python/thoughtspotpublicrestapi/models/tspublic_rest_v_2_group_addgroup_request.py deleted file mode 100644 index e1668606e..000000000 --- a/Python/thoughtspotpublicrestapi/models/tspublic_rest_v_2_group_addgroup_request.py +++ /dev/null @@ -1,79 +0,0 @@ -# -*- coding: utf-8 -*- - -""" -thoughtspotpublicrestapi - -This file was automatically generated by APIMATIC v3.0 ( - https://www.apimatic.io ). -""" -from thoughtspotpublicrestapi.api_helper import APIHelper -from thoughtspotpublicrestapi.models.group_name_and_id_input import GroupNameAndIDInput - - -class TspublicRestV2GroupAddgroupRequest(object): - - """Implementation of the 'Tspublic Rest V2 Group Addgroup Request' model. - - TODO: type model description here. - - Attributes: - name (string): Name of the group - id (string): The GUID of the group to query. - groups (list of GroupNameAndIDInput): Array of objects of groups that - the user belong to. - - """ - - # Create a mapping from Model property names to API property names - _names = { - "groups": 'groups', - "name": 'name', - "id": 'id' - } - - _optionals = [ - 'name', - 'id', - ] - - def __init__(self, - groups=None, - name=APIHelper.SKIP, - id=APIHelper.SKIP): - """Constructor for the TspublicRestV2GroupAddgroupRequest class""" - - # Initialize members of the class - if name is not APIHelper.SKIP: - self.name = name - if id is not APIHelper.SKIP: - self.id = id - self.groups = groups - - @classmethod - def from_dictionary(cls, - dictionary): - """Creates an instance of this model from a dictionary - - Args: - dictionary (dictionary): A dictionary representation of the object - as obtained from the deserialization of the server's response. The - keys MUST match property names in the API description. - - Returns: - object: An instance of this structure class. - - """ - if dictionary is None: - return None - - # Extract variables from the dictionary - - groups = None - if dictionary.get('groups') is not None: - groups = [GroupNameAndIDInput.from_dictionary(x) for x in dictionary.get('groups')] - name = dictionary.get("name") if dictionary.get("name") else APIHelper.SKIP - id = dictionary.get("id") if dictionary.get("id") else APIHelper.SKIP - # Return an object of this model - return cls(groups, - name, - id) diff --git a/Python/thoughtspotpublicrestapi/models/tspublic_rest_v_2_group_addprivilege_request.py b/Python/thoughtspotpublicrestapi/models/tspublic_rest_v_2_group_addprivilege_request.py deleted file mode 100644 index 57d9ebbbe..000000000 --- a/Python/thoughtspotpublicrestapi/models/tspublic_rest_v_2_group_addprivilege_request.py +++ /dev/null @@ -1,78 +0,0 @@ -# -*- coding: utf-8 -*- - -""" -thoughtspotpublicrestapi - -This file was automatically generated by APIMATIC v3.0 ( - https://www.apimatic.io ). -""" -from thoughtspotpublicrestapi.api_helper import APIHelper - - -class TspublicRestV2GroupAddprivilegeRequest(object): - - """Implementation of the 'Tspublic Rest V2 Group Addprivilege Request' model. - - TODO: type model description here. - - Attributes: - name (string): Name of the group - id (string): The GUID of the group to query. - privileges (list of PrivilegeEnum): A JSON array of name of users or - GUIDs of users or both. When both are given then id is considered - - """ - - # Create a mapping from Model property names to API property names - _names = { - "name": 'name', - "id": 'id', - "privileges": 'privileges' - } - - _optionals = [ - 'name', - 'id', - 'privileges', - ] - - def __init__(self, - name=APIHelper.SKIP, - id=APIHelper.SKIP, - privileges=APIHelper.SKIP): - """Constructor for the TspublicRestV2GroupAddprivilegeRequest class""" - - # Initialize members of the class - if name is not APIHelper.SKIP: - self.name = name - if id is not APIHelper.SKIP: - self.id = id - if privileges is not APIHelper.SKIP: - self.privileges = privileges - - @classmethod - def from_dictionary(cls, - dictionary): - """Creates an instance of this model from a dictionary - - Args: - dictionary (dictionary): A dictionary representation of the object - as obtained from the deserialization of the server's response. The - keys MUST match property names in the API description. - - Returns: - object: An instance of this structure class. - - """ - if dictionary is None: - return None - - # Extract variables from the dictionary - - name = dictionary.get("name") if dictionary.get("name") else APIHelper.SKIP - id = dictionary.get("id") if dictionary.get("id") else APIHelper.SKIP - privileges = dictionary.get("privileges") if dictionary.get("privileges") else APIHelper.SKIP - # Return an object of this model - return cls(name, - id, - privileges) diff --git a/Python/thoughtspotpublicrestapi/models/tspublic_rest_v_2_group_adduser_request.py b/Python/thoughtspotpublicrestapi/models/tspublic_rest_v_2_group_adduser_request.py deleted file mode 100644 index 0f524091e..000000000 --- a/Python/thoughtspotpublicrestapi/models/tspublic_rest_v_2_group_adduser_request.py +++ /dev/null @@ -1,79 +0,0 @@ -# -*- coding: utf-8 -*- - -""" -thoughtspotpublicrestapi - -This file was automatically generated by APIMATIC v3.0 ( - https://www.apimatic.io ). -""" -from thoughtspotpublicrestapi.api_helper import APIHelper -from thoughtspotpublicrestapi.models.user_name_and_id_input import UserNameAndIDInput - - -class TspublicRestV2GroupAdduserRequest(object): - - """Implementation of the 'Tspublic Rest V2 Group Adduser Request' model. - - TODO: type model description here. - - Attributes: - name (string): Name of the group - id (string): The GUID of the group to query. - users (list of UserNameAndIDInput): Array of user name that you want - to update in user group. - - """ - - # Create a mapping from Model property names to API property names - _names = { - "users": 'users', - "name": 'name', - "id": 'id' - } - - _optionals = [ - 'name', - 'id', - ] - - def __init__(self, - users=None, - name=APIHelper.SKIP, - id=APIHelper.SKIP): - """Constructor for the TspublicRestV2GroupAdduserRequest class""" - - # Initialize members of the class - if name is not APIHelper.SKIP: - self.name = name - if id is not APIHelper.SKIP: - self.id = id - self.users = users - - @classmethod - def from_dictionary(cls, - dictionary): - """Creates an instance of this model from a dictionary - - Args: - dictionary (dictionary): A dictionary representation of the object - as obtained from the deserialization of the server's response. The - keys MUST match property names in the API description. - - Returns: - object: An instance of this structure class. - - """ - if dictionary is None: - return None - - # Extract variables from the dictionary - - users = None - if dictionary.get('users') is not None: - users = [UserNameAndIDInput.from_dictionary(x) for x in dictionary.get('users')] - name = dictionary.get("name") if dictionary.get("name") else APIHelper.SKIP - id = dictionary.get("id") if dictionary.get("id") else APIHelper.SKIP - # Return an object of this model - return cls(users, - name, - id) diff --git a/Python/thoughtspotpublicrestapi/models/tspublic_rest_v_2_group_create_request.py b/Python/thoughtspotpublicrestapi/models/tspublic_rest_v_2_group_create_request.py deleted file mode 100644 index c601e896e..000000000 --- a/Python/thoughtspotpublicrestapi/models/tspublic_rest_v_2_group_create_request.py +++ /dev/null @@ -1,140 +0,0 @@ -# -*- coding: utf-8 -*- - -""" -thoughtspotpublicrestapi - -This file was automatically generated by APIMATIC v3.0 ( - https://www.apimatic.io ). -""" -from thoughtspotpublicrestapi.api_helper import APIHelper -from thoughtspotpublicrestapi.models.group_name_and_id_input import GroupNameAndIDInput -from thoughtspotpublicrestapi.models.user_name_and_id_input import UserNameAndIDInput - - -class TspublicRestV2GroupCreateRequest(object): - - """Implementation of the 'Tspublic Rest V2 Group Create Request' model. - - TODO: type model description here. - - Attributes: - name (string): Name of the user group. The group name string must be - unique. - display_name (string): A unique display name string for the user - group, for example, Developer group. - visibility (Visibility2Enum): Visibility of the user group. The - visibility attribute is set to DEFAULT. The DEFAULT attribute - makes the user group visible for other user groups and allows them - to share objects. - description (string): Description text for the group. - privileges (list of PrivilegeEnum): A JSON array of privileges - assigned to the group - org_id (int): Unique identifier of the organization. If no value is - provided then group will be created in the organization associated - with the login session. - groups (list of GroupNameAndIDInput): Array of objects of groups that - the group belong to. - users (list of UserNameAndIDInput): Array of names of user names that - the group belong to. - mtype (Type10Enum): Type of user group. LOCAL_GROUP indicates that the - user is created locally in the ThoughtSpot system. - - """ - - # Create a mapping from Model property names to API property names - _names = { - "name": 'name', - "display_name": 'displayName', - "visibility": 'visibility', - "description": 'description', - "privileges": 'privileges', - "org_id": 'orgId', - "groups": 'groups', - "users": 'users', - "mtype": 'type' - } - - _optionals = [ - 'visibility', - 'description', - 'privileges', - 'org_id', - 'groups', - 'users', - 'mtype', - ] - - def __init__(self, - name=None, - display_name=None, - visibility='DEFAULT', - description=APIHelper.SKIP, - privileges=APIHelper.SKIP, - org_id=APIHelper.SKIP, - groups=APIHelper.SKIP, - users=APIHelper.SKIP, - mtype='LOCAL_GROUP'): - """Constructor for the TspublicRestV2GroupCreateRequest class""" - - # Initialize members of the class - self.name = name - self.display_name = display_name - self.visibility = visibility - if description is not APIHelper.SKIP: - self.description = description - if privileges is not APIHelper.SKIP: - self.privileges = privileges - if org_id is not APIHelper.SKIP: - self.org_id = org_id - if groups is not APIHelper.SKIP: - self.groups = groups - if users is not APIHelper.SKIP: - self.users = users - self.mtype = mtype - - @classmethod - def from_dictionary(cls, - dictionary): - """Creates an instance of this model from a dictionary - - Args: - dictionary (dictionary): A dictionary representation of the object - as obtained from the deserialization of the server's response. The - keys MUST match property names in the API description. - - Returns: - object: An instance of this structure class. - - """ - if dictionary is None: - return None - - # Extract variables from the dictionary - - name = dictionary.get("name") if dictionary.get("name") else None - display_name = dictionary.get("displayName") if dictionary.get("displayName") else None - visibility = dictionary.get("visibility") if dictionary.get("visibility") else 'DEFAULT' - description = dictionary.get("description") if dictionary.get("description") else APIHelper.SKIP - privileges = dictionary.get("privileges") if dictionary.get("privileges") else APIHelper.SKIP - org_id = dictionary.get("orgId") if dictionary.get("orgId") else APIHelper.SKIP - groups = None - if dictionary.get('groups') is not None: - groups = [GroupNameAndIDInput.from_dictionary(x) for x in dictionary.get('groups')] - else: - groups = APIHelper.SKIP - users = None - if dictionary.get('users') is not None: - users = [UserNameAndIDInput.from_dictionary(x) for x in dictionary.get('users')] - else: - users = APIHelper.SKIP - mtype = dictionary.get("type") if dictionary.get("type") else 'LOCAL_GROUP' - # Return an object of this model - return cls(name, - display_name, - visibility, - description, - privileges, - org_id, - groups, - users, - mtype) diff --git a/Python/thoughtspotpublicrestapi/models/tspublic_rest_v_2_group_removegroup_request.py b/Python/thoughtspotpublicrestapi/models/tspublic_rest_v_2_group_removegroup_request.py deleted file mode 100644 index 36cb166bd..000000000 --- a/Python/thoughtspotpublicrestapi/models/tspublic_rest_v_2_group_removegroup_request.py +++ /dev/null @@ -1,79 +0,0 @@ -# -*- coding: utf-8 -*- - -""" -thoughtspotpublicrestapi - -This file was automatically generated by APIMATIC v3.0 ( - https://www.apimatic.io ). -""" -from thoughtspotpublicrestapi.api_helper import APIHelper -from thoughtspotpublicrestapi.models.group_name_and_id_input import GroupNameAndIDInput - - -class TspublicRestV2GroupRemovegroupRequest(object): - - """Implementation of the 'Tspublic Rest V2 Group Removegroup Request' model. - - TODO: type model description here. - - Attributes: - name (string): Name of the group - id (string): The GUID of the group to query. - groups (list of GroupNameAndIDInput): Array of objects of groups that - the user belong to. - - """ - - # Create a mapping from Model property names to API property names - _names = { - "groups": 'groups', - "name": 'name', - "id": 'id' - } - - _optionals = [ - 'name', - 'id', - ] - - def __init__(self, - groups=None, - name=APIHelper.SKIP, - id=APIHelper.SKIP): - """Constructor for the TspublicRestV2GroupRemovegroupRequest class""" - - # Initialize members of the class - if name is not APIHelper.SKIP: - self.name = name - if id is not APIHelper.SKIP: - self.id = id - self.groups = groups - - @classmethod - def from_dictionary(cls, - dictionary): - """Creates an instance of this model from a dictionary - - Args: - dictionary (dictionary): A dictionary representation of the object - as obtained from the deserialization of the server's response. The - keys MUST match property names in the API description. - - Returns: - object: An instance of this structure class. - - """ - if dictionary is None: - return None - - # Extract variables from the dictionary - - groups = None - if dictionary.get('groups') is not None: - groups = [GroupNameAndIDInput.from_dictionary(x) for x in dictionary.get('groups')] - name = dictionary.get("name") if dictionary.get("name") else APIHelper.SKIP - id = dictionary.get("id") if dictionary.get("id") else APIHelper.SKIP - # Return an object of this model - return cls(groups, - name, - id) diff --git a/Python/thoughtspotpublicrestapi/models/tspublic_rest_v_2_group_removeprivilege_request.py b/Python/thoughtspotpublicrestapi/models/tspublic_rest_v_2_group_removeprivilege_request.py deleted file mode 100644 index 1611bff22..000000000 --- a/Python/thoughtspotpublicrestapi/models/tspublic_rest_v_2_group_removeprivilege_request.py +++ /dev/null @@ -1,78 +0,0 @@ -# -*- coding: utf-8 -*- - -""" -thoughtspotpublicrestapi - -This file was automatically generated by APIMATIC v3.0 ( - https://www.apimatic.io ). -""" -from thoughtspotpublicrestapi.api_helper import APIHelper - - -class TspublicRestV2GroupRemoveprivilegeRequest(object): - - """Implementation of the 'Tspublic Rest V2 Group Removeprivilege Request' model. - - TODO: type model description here. - - Attributes: - name (string): Name of the group - id (string): The GUID of the group to query. - privileges (list of PrivilegeEnum): A JSON array of name of users or - GUIDs of users or both. When both are given then id is considered - - """ - - # Create a mapping from Model property names to API property names - _names = { - "name": 'name', - "id": 'id', - "privileges": 'privileges' - } - - _optionals = [ - 'name', - 'id', - 'privileges', - ] - - def __init__(self, - name=APIHelper.SKIP, - id=APIHelper.SKIP, - privileges=APIHelper.SKIP): - """Constructor for the TspublicRestV2GroupRemoveprivilegeRequest class""" - - # Initialize members of the class - if name is not APIHelper.SKIP: - self.name = name - if id is not APIHelper.SKIP: - self.id = id - if privileges is not APIHelper.SKIP: - self.privileges = privileges - - @classmethod - def from_dictionary(cls, - dictionary): - """Creates an instance of this model from a dictionary - - Args: - dictionary (dictionary): A dictionary representation of the object - as obtained from the deserialization of the server's response. The - keys MUST match property names in the API description. - - Returns: - object: An instance of this structure class. - - """ - if dictionary is None: - return None - - # Extract variables from the dictionary - - name = dictionary.get("name") if dictionary.get("name") else APIHelper.SKIP - id = dictionary.get("id") if dictionary.get("id") else APIHelper.SKIP - privileges = dictionary.get("privileges") if dictionary.get("privileges") else APIHelper.SKIP - # Return an object of this model - return cls(name, - id, - privileges) diff --git a/Python/thoughtspotpublicrestapi/models/tspublic_rest_v_2_group_removeuser_request.py b/Python/thoughtspotpublicrestapi/models/tspublic_rest_v_2_group_removeuser_request.py deleted file mode 100644 index 3407eef1b..000000000 --- a/Python/thoughtspotpublicrestapi/models/tspublic_rest_v_2_group_removeuser_request.py +++ /dev/null @@ -1,79 +0,0 @@ -# -*- coding: utf-8 -*- - -""" -thoughtspotpublicrestapi - -This file was automatically generated by APIMATIC v3.0 ( - https://www.apimatic.io ). -""" -from thoughtspotpublicrestapi.api_helper import APIHelper -from thoughtspotpublicrestapi.models.user_name_and_id_input import UserNameAndIDInput - - -class TspublicRestV2GroupRemoveuserRequest(object): - - """Implementation of the 'Tspublic Rest V2 Group Removeuser Request' model. - - TODO: type model description here. - - Attributes: - name (string): Name of the group - id (string): The GUID of the group to query. - users (list of UserNameAndIDInput): Array of user name that you want - to delete from user group. - - """ - - # Create a mapping from Model property names to API property names - _names = { - "users": 'users', - "name": 'name', - "id": 'id' - } - - _optionals = [ - 'name', - 'id', - ] - - def __init__(self, - users=None, - name=APIHelper.SKIP, - id=APIHelper.SKIP): - """Constructor for the TspublicRestV2GroupRemoveuserRequest class""" - - # Initialize members of the class - if name is not APIHelper.SKIP: - self.name = name - if id is not APIHelper.SKIP: - self.id = id - self.users = users - - @classmethod - def from_dictionary(cls, - dictionary): - """Creates an instance of this model from a dictionary - - Args: - dictionary (dictionary): A dictionary representation of the object - as obtained from the deserialization of the server's response. The - keys MUST match property names in the API description. - - Returns: - object: An instance of this structure class. - - """ - if dictionary is None: - return None - - # Extract variables from the dictionary - - users = None - if dictionary.get('users') is not None: - users = [UserNameAndIDInput.from_dictionary(x) for x in dictionary.get('users')] - name = dictionary.get("name") if dictionary.get("name") else APIHelper.SKIP - id = dictionary.get("id") if dictionary.get("id") else APIHelper.SKIP - # Return an object of this model - return cls(users, - name, - id) diff --git a/Python/thoughtspotpublicrestapi/models/tspublic_rest_v_2_group_search_request.py b/Python/thoughtspotpublicrestapi/models/tspublic_rest_v_2_group_search_request.py deleted file mode 100644 index ed2d3e0d6..000000000 --- a/Python/thoughtspotpublicrestapi/models/tspublic_rest_v_2_group_search_request.py +++ /dev/null @@ -1,152 +0,0 @@ -# -*- coding: utf-8 -*- - -""" -thoughtspotpublicrestapi - -This file was automatically generated by APIMATIC v3.0 ( - https://www.apimatic.io ). -""" -from thoughtspotpublicrestapi.api_helper import APIHelper -from thoughtspotpublicrestapi.models.group_name_and_id_input import GroupNameAndIDInput -from thoughtspotpublicrestapi.models.user_name_and_id_input import UserNameAndIDInput - - -class TspublicRestV2GroupSearchRequest(object): - - """Implementation of the 'Tspublic Rest V2 Group Search Request' model. - - TODO: type model description here. - - Attributes: - output_fields (list of string): Array of field names that need to be - included in the response - name (string): Name of the user group - id (string): GUID of the group to update - display_name (string): A unique display name string for the user - group, for example, Developer group. - visibility (string): Visibility of the user group. The visibility - attribute is set to DEFAULT. The DEFAULT attribute makes the user - group visible for other user groups and allows them to share - objects. - description (string): Description text for the group. - privileges (list of PrivilegeEnum): A JSON array of privileges - assigned to the group - groups (list of GroupNameAndIDInput): Array of objects of groups that - the user belong to. - users (list of UserNameAndIDInput): Array of user name that associated - with group. - mtype (string): Type of user group. LOCAL_GROUP indicates that the - user is created locally in the ThoughtSpot system. - - """ - - # Create a mapping from Model property names to API property names - _names = { - "output_fields": 'outputFields', - "name": 'name', - "id": 'id', - "display_name": 'displayName', - "visibility": 'visibility', - "description": 'description', - "privileges": 'privileges', - "groups": 'groups', - "users": 'users', - "mtype": 'type' - } - - _optionals = [ - 'output_fields', - 'name', - 'id', - 'display_name', - 'visibility', - 'description', - 'privileges', - 'groups', - 'users', - 'mtype', - ] - - def __init__(self, - output_fields=APIHelper.SKIP, - name=APIHelper.SKIP, - id=APIHelper.SKIP, - display_name=APIHelper.SKIP, - visibility=APIHelper.SKIP, - description=APIHelper.SKIP, - privileges=APIHelper.SKIP, - groups=APIHelper.SKIP, - users=APIHelper.SKIP, - mtype=APIHelper.SKIP): - """Constructor for the TspublicRestV2GroupSearchRequest class""" - - # Initialize members of the class - if output_fields is not APIHelper.SKIP: - self.output_fields = output_fields - if name is not APIHelper.SKIP: - self.name = name - if id is not APIHelper.SKIP: - self.id = id - if display_name is not APIHelper.SKIP: - self.display_name = display_name - if visibility is not APIHelper.SKIP: - self.visibility = visibility - if description is not APIHelper.SKIP: - self.description = description - if privileges is not APIHelper.SKIP: - self.privileges = privileges - if groups is not APIHelper.SKIP: - self.groups = groups - if users is not APIHelper.SKIP: - self.users = users - if mtype is not APIHelper.SKIP: - self.mtype = mtype - - @classmethod - def from_dictionary(cls, - dictionary): - """Creates an instance of this model from a dictionary - - Args: - dictionary (dictionary): A dictionary representation of the object - as obtained from the deserialization of the server's response. The - keys MUST match property names in the API description. - - Returns: - object: An instance of this structure class. - - """ - if dictionary is None: - return None - - # Extract variables from the dictionary - - output_fields = dictionary.get("outputFields") if dictionary.get("outputFields") else APIHelper.SKIP - name = dictionary.get("name") if dictionary.get("name") else APIHelper.SKIP - id = dictionary.get("id") if dictionary.get("id") else APIHelper.SKIP - display_name = dictionary.get("displayName") if dictionary.get("displayName") else APIHelper.SKIP - visibility = dictionary.get("visibility") if dictionary.get("visibility") else APIHelper.SKIP - description = dictionary.get("description") if dictionary.get("description") else APIHelper.SKIP - privileges = dictionary.get("privileges") if dictionary.get("privileges") else APIHelper.SKIP - groups = None - if dictionary.get('groups') is not None: - groups = [GroupNameAndIDInput.from_dictionary(x) for x in dictionary.get('groups')] - else: - groups = APIHelper.SKIP - users = None - if dictionary.get('users') is not None: - users = [UserNameAndIDInput.from_dictionary(x) for x in dictionary.get('users')] - else: - users = APIHelper.SKIP - mtype = dictionary.get("type") if dictionary.get("type") else APIHelper.SKIP - # Return an object of this model - return cls(output_fields, - name, - id, - display_name, - visibility, - description, - privileges, - groups, - users, - mtype) diff --git a/Python/thoughtspotpublicrestapi/models/tspublic_rest_v_2_group_update_request.py b/Python/thoughtspotpublicrestapi/models/tspublic_rest_v_2_group_update_request.py deleted file mode 100644 index 39fa75cbd..000000000 --- a/Python/thoughtspotpublicrestapi/models/tspublic_rest_v_2_group_update_request.py +++ /dev/null @@ -1,151 +0,0 @@ -# -*- coding: utf-8 -*- - -""" -thoughtspotpublicrestapi - -This file was automatically generated by APIMATIC v3.0 ( - https://www.apimatic.io ). -""" -from thoughtspotpublicrestapi.api_helper import APIHelper -from thoughtspotpublicrestapi.models.group_name_and_id_input import GroupNameAndIDInput -from thoughtspotpublicrestapi.models.user_name_and_id_input import UserNameAndIDInput - - -class TspublicRestV2GroupUpdateRequest(object): - - """Implementation of the 'Tspublic Rest V2 Group Update Request' model. - - TODO: type model description here. - - Attributes: - name (string): Name of the user group. The group name string must be - unique. - id (string): he GUID of the user account to query. - display_name (string): A unique display name string for the user - group, for example, Developer group. - visibility (Visibility2Enum): Visibility of the user group. The - visibility attribute is set to DEFAULT. The DEFAULT attribute - makes the user group visible for other user groups and allows them - to share objects. - description (string): Description text for the group. - privileges (list of PrivilegeEnum): A JSON array of privileges - assigned to the group - groups (list of GroupNameAndIDInput): Array of objects of groups that - the user belong to. - users (list of UserNameAndIDInput): Array of object, A JSON array of - name of users of users. - assigned_liveboards (list of string): Array of string. An array of - liveboard ids to be assigned to the group. - mtype (Type10Enum): Type of user group. LOCAL_GROUP indicates that the - user is created locally in the ThoughtSpot system. - - """ - - # Create a mapping from Model property names to API property names - _names = { - "name": 'name', - "id": 'id', - "display_name": 'displayName', - "visibility": 'visibility', - "description": 'description', - "privileges": 'privileges', - "groups": 'groups', - "users": 'users', - "assigned_liveboards": 'assignedLiveboards', - "mtype": 'type' - } - - _optionals = [ - 'name', - 'id', - 'display_name', - 'visibility', - 'description', - 'privileges', - 'groups', - 'users', - 'assigned_liveboards', - 'mtype', - ] - - def __init__(self, - name=APIHelper.SKIP, - id=APIHelper.SKIP, - display_name=APIHelper.SKIP, - visibility='DEFAULT', - description=APIHelper.SKIP, - privileges=APIHelper.SKIP, - groups=APIHelper.SKIP, - users=APIHelper.SKIP, - assigned_liveboards=APIHelper.SKIP, - mtype='LOCAL_GROUP'): - """Constructor for the TspublicRestV2GroupUpdateRequest class""" - - # Initialize members of the class - if name is not APIHelper.SKIP: - self.name = name - if id is not APIHelper.SKIP: - self.id = id - if display_name is not APIHelper.SKIP: - self.display_name = display_name - self.visibility = visibility - if description is not APIHelper.SKIP: - self.description = description - if privileges is not APIHelper.SKIP: - self.privileges = privileges - if groups is not APIHelper.SKIP: - self.groups = groups - if users is not APIHelper.SKIP: - self.users = users - if assigned_liveboards is not APIHelper.SKIP: - self.assigned_liveboards = assigned_liveboards - self.mtype = mtype - - @classmethod - def from_dictionary(cls, - dictionary): - """Creates an instance of this model from a dictionary - - Args: - dictionary (dictionary): A dictionary representation of the object - as obtained from the deserialization of the server's response. The - keys MUST match property names in the API description. - - Returns: - object: An instance of this structure class. - - """ - if dictionary is None: - return None - - # Extract variables from the dictionary - - name = dictionary.get("name") if dictionary.get("name") else APIHelper.SKIP - id = dictionary.get("id") if dictionary.get("id") else APIHelper.SKIP - display_name = dictionary.get("displayName") if dictionary.get("displayName") else APIHelper.SKIP - visibility = dictionary.get("visibility") if dictionary.get("visibility") else 'DEFAULT' - description = dictionary.get("description") if dictionary.get("description") else APIHelper.SKIP - privileges = dictionary.get("privileges") if dictionary.get("privileges") else APIHelper.SKIP - groups = None - if dictionary.get('groups') is not None: - groups = [GroupNameAndIDInput.from_dictionary(x) for x in dictionary.get('groups')] - else: - groups = APIHelper.SKIP - users = None - if dictionary.get('users') is not None: - users = [UserNameAndIDInput.from_dictionary(x) for x in dictionary.get('users')] - else: - users = APIHelper.SKIP - assigned_liveboards = dictionary.get("assignedLiveboards") if dictionary.get("assignedLiveboards") else APIHelper.SKIP - mtype = dictionary.get("type") if dictionary.get("type") else 'LOCAL_GROUP' - # Return an object of this model - return cls(name, - id, - display_name, - visibility, - description, - privileges, - groups, - users, - assigned_liveboards, - mtype) diff --git a/Python/thoughtspotpublicrestapi/models/tspublic_rest_v_2_materialization_refreshview_request.py b/Python/thoughtspotpublicrestapi/models/tspublic_rest_v_2_materialization_refreshview_request.py deleted file mode 100644 index 44dc0c3c8..000000000 --- a/Python/thoughtspotpublicrestapi/models/tspublic_rest_v_2_materialization_refreshview_request.py +++ /dev/null @@ -1,55 +0,0 @@ -# -*- coding: utf-8 -*- - -""" -thoughtspotpublicrestapi - -This file was automatically generated by APIMATIC v3.0 ( - https://www.apimatic.io ). -""" - - -class TspublicRestV2MaterializationRefreshviewRequest(object): - - """Implementation of the 'Tspublic Rest V2 Materialization Refreshview Request' model. - - TODO: type model description here. - - Attributes: - id (string): GUID of metadata object - - """ - - # Create a mapping from Model property names to API property names - _names = { - "id": 'id' - } - - def __init__(self, - id=None): - """Constructor for the TspublicRestV2MaterializationRefreshviewRequest class""" - - # Initialize members of the class - self.id = id - - @classmethod - def from_dictionary(cls, - dictionary): - """Creates an instance of this model from a dictionary - - Args: - dictionary (dictionary): A dictionary representation of the object - as obtained from the deserialization of the server's response. The - keys MUST match property names in the API description. - - Returns: - object: An instance of this structure class. - - """ - if dictionary is None: - return None - - # Extract variables from the dictionary - - id = dictionary.get("id") if dictionary.get("id") else None - # Return an object of this model - return cls(id) diff --git a/Python/thoughtspotpublicrestapi/models/tspublic_rest_v_2_metadata_dependency_request.py b/Python/thoughtspotpublicrestapi/models/tspublic_rest_v_2_metadata_dependency_request.py deleted file mode 100644 index 39bed2ef1..000000000 --- a/Python/thoughtspotpublicrestapi/models/tspublic_rest_v_2_metadata_dependency_request.py +++ /dev/null @@ -1,75 +0,0 @@ -# -*- coding: utf-8 -*- - -""" -thoughtspotpublicrestapi - -This file was automatically generated by APIMATIC v3.0 ( - https://www.apimatic.io ). -""" -from thoughtspotpublicrestapi.api_helper import APIHelper - - -class TspublicRestV2MetadataDependencyRequest(object): - - """Implementation of the 'Tspublic Rest V2 Metadata Dependency Request' model. - - TODO: type model description here. - - Attributes: - mtype (Type13Enum): Type of the data object - id (list of string): A JSON array of GUIDs of the objects - batch_size (int): The maximum number of batches to fetch in a query. - If this attribute is not defined, the value specified in the - cluster configuration is used. To get the list of all dependent - objects in a single query, define the batch size attribute as -1 - - """ - - # Create a mapping from Model property names to API property names - _names = { - "mtype": 'type', - "id": 'id', - "batch_size": 'batchSize' - } - - _optionals = [ - 'batch_size', - ] - - def __init__(self, - mtype=None, - id=None, - batch_size=-1): - """Constructor for the TspublicRestV2MetadataDependencyRequest class""" - - # Initialize members of the class - self.mtype = mtype - self.id = id - self.batch_size = batch_size - - @classmethod - def from_dictionary(cls, - dictionary): - """Creates an instance of this model from a dictionary - - Args: - dictionary (dictionary): A dictionary representation of the object - as obtained from the deserialization of the server's response. The - keys MUST match property names in the API description. - - Returns: - object: An instance of this structure class. - - """ - if dictionary is None: - return None - - # Extract variables from the dictionary - - mtype = dictionary.get("type") if dictionary.get("type") else None - id = dictionary.get("id") if dictionary.get("id") else None - batch_size = dictionary.get("batchSize") if dictionary.get("batchSize") else -1 - # Return an object of this model - return cls(mtype, - id, - batch_size) diff --git a/Python/thoughtspotpublicrestapi/models/tspublic_rest_v_2_metadata_detail_search_request.py b/Python/thoughtspotpublicrestapi/models/tspublic_rest_v_2_metadata_detail_search_request.py deleted file mode 100644 index 625fc716a..000000000 --- a/Python/thoughtspotpublicrestapi/models/tspublic_rest_v_2_metadata_detail_search_request.py +++ /dev/null @@ -1,91 +0,0 @@ -# -*- coding: utf-8 -*- - -""" -thoughtspotpublicrestapi - -This file was automatically generated by APIMATIC v3.0 ( - https://www.apimatic.io ). -""" -from thoughtspotpublicrestapi.api_helper import APIHelper - - -class TspublicRestV2MetadataDetailSearchRequest(object): - - """Implementation of the 'Tspublic Rest V2 Metadata Detail Search Request' model. - - TODO: type model description here. - - Attributes: - mtype (Type6Enum): Type of the metadata object being searched. - id (list of string): A JSON array of GUIDs of the objects. - show_hidden (bool): When set to true, returns details of the hidden - objects, such as a column in a worksheet or a table. - drop_question_details (bool): When set to true, the search assist data - associated with a worksheet is not included in the API response. - This attribute is applicable only for DATAOBJECT data type. - version (string): Specify the version to retrieve the objects from. By - default, the API returns metadata for all versions of the object. - - """ - - # Create a mapping from Model property names to API property names - _names = { - "mtype": 'type', - "id": 'id', - "show_hidden": 'showHidden', - "drop_question_details": 'dropQuestionDetails', - "version": 'version' - } - - _optionals = [ - 'show_hidden', - 'drop_question_details', - 'version', - ] - - def __init__(self, - mtype=None, - id=None, - show_hidden=False, - drop_question_details=False, - version=APIHelper.SKIP): - """Constructor for the TspublicRestV2MetadataDetailSearchRequest class""" - - # Initialize members of the class - self.mtype = mtype - self.id = id - self.show_hidden = show_hidden - self.drop_question_details = drop_question_details - if version is not APIHelper.SKIP: - self.version = version - - @classmethod - def from_dictionary(cls, - dictionary): - """Creates an instance of this model from a dictionary - - Args: - dictionary (dictionary): A dictionary representation of the object - as obtained from the deserialization of the server's response. The - keys MUST match property names in the API description. - - Returns: - object: An instance of this structure class. - - """ - if dictionary is None: - return None - - # Extract variables from the dictionary - - mtype = dictionary.get("type") if dictionary.get("type") else None - id = dictionary.get("id") if dictionary.get("id") else None - show_hidden = dictionary.get("showHidden") if dictionary.get("showHidden") else False - drop_question_details = dictionary.get("dropQuestionDetails") if dictionary.get("dropQuestionDetails") else False - version = dictionary.get("version") if dictionary.get("version") else APIHelper.SKIP - # Return an object of this model - return cls(mtype, - id, - show_hidden, - drop_question_details, - version) diff --git a/Python/thoughtspotpublicrestapi/models/tspublic_rest_v_2_metadata_favorite_assign_request.py b/Python/thoughtspotpublicrestapi/models/tspublic_rest_v_2_metadata_favorite_assign_request.py deleted file mode 100644 index 64a7b587d..000000000 --- a/Python/thoughtspotpublicrestapi/models/tspublic_rest_v_2_metadata_favorite_assign_request.py +++ /dev/null @@ -1,79 +0,0 @@ -# -*- coding: utf-8 -*- - -""" -thoughtspotpublicrestapi - -This file was automatically generated by APIMATIC v3.0 ( - https://www.apimatic.io ). -""" -from thoughtspotpublicrestapi.api_helper import APIHelper -from thoughtspotpublicrestapi.models.ts_object_input import TsObjectInput - - -class TspublicRestV2MetadataFavoriteAssignRequest(object): - - """Implementation of the 'Tspublic Rest V2 Metadata Favorite Assign Request' model. - - TODO: type model description here. - - Attributes: - user_name (string): Name of the user - user_id (string): The GUID of the user - ts_object (list of TsObjectInput): A JSON Array of GUIDs and type of - metadata object. - - """ - - # Create a mapping from Model property names to API property names - _names = { - "ts_object": 'tsObject', - "user_name": 'userName', - "user_id": 'userId' - } - - _optionals = [ - 'user_name', - 'user_id', - ] - - def __init__(self, - ts_object=None, - user_name=APIHelper.SKIP, - user_id=APIHelper.SKIP): - """Constructor for the TspublicRestV2MetadataFavoriteAssignRequest class""" - - # Initialize members of the class - if user_name is not APIHelper.SKIP: - self.user_name = user_name - if user_id is not APIHelper.SKIP: - self.user_id = user_id - self.ts_object = ts_object - - @classmethod - def from_dictionary(cls, - dictionary): - """Creates an instance of this model from a dictionary - - Args: - dictionary (dictionary): A dictionary representation of the object - as obtained from the deserialization of the server's response. The - keys MUST match property names in the API description. - - Returns: - object: An instance of this structure class. - - """ - if dictionary is None: - return None - - # Extract variables from the dictionary - - ts_object = None - if dictionary.get('tsObject') is not None: - ts_object = [TsObjectInput.from_dictionary(x) for x in dictionary.get('tsObject')] - user_name = dictionary.get("userName") if dictionary.get("userName") else APIHelper.SKIP - user_id = dictionary.get("userId") if dictionary.get("userId") else APIHelper.SKIP - # Return an object of this model - return cls(ts_object, - user_name, - user_id) diff --git a/Python/thoughtspotpublicrestapi/models/tspublic_rest_v_2_metadata_favorite_unassign_request.py b/Python/thoughtspotpublicrestapi/models/tspublic_rest_v_2_metadata_favorite_unassign_request.py deleted file mode 100644 index 7ea2f4052..000000000 --- a/Python/thoughtspotpublicrestapi/models/tspublic_rest_v_2_metadata_favorite_unassign_request.py +++ /dev/null @@ -1,79 +0,0 @@ -# -*- coding: utf-8 -*- - -""" -thoughtspotpublicrestapi - -This file was automatically generated by APIMATIC v3.0 ( - https://www.apimatic.io ). -""" -from thoughtspotpublicrestapi.api_helper import APIHelper -from thoughtspotpublicrestapi.models.ts_object_input import TsObjectInput - - -class TspublicRestV2MetadataFavoriteUnassignRequest(object): - - """Implementation of the 'Tspublic Rest V2 Metadata Favorite Unassign Request' model. - - TODO: type model description here. - - Attributes: - user_name (string): Name of the user - user_id (string): The GUID of the user - ts_object (list of TsObjectInput): A JSON Array of GUIDs and type of - metadata object. - - """ - - # Create a mapping from Model property names to API property names - _names = { - "ts_object": 'tsObject', - "user_name": 'userName', - "user_id": 'userId' - } - - _optionals = [ - 'user_name', - 'user_id', - ] - - def __init__(self, - ts_object=None, - user_name=APIHelper.SKIP, - user_id=APIHelper.SKIP): - """Constructor for the TspublicRestV2MetadataFavoriteUnassignRequest class""" - - # Initialize members of the class - if user_name is not APIHelper.SKIP: - self.user_name = user_name - if user_id is not APIHelper.SKIP: - self.user_id = user_id - self.ts_object = ts_object - - @classmethod - def from_dictionary(cls, - dictionary): - """Creates an instance of this model from a dictionary - - Args: - dictionary (dictionary): A dictionary representation of the object - as obtained from the deserialization of the server's response. The - keys MUST match property names in the API description. - - Returns: - object: An instance of this structure class. - - """ - if dictionary is None: - return None - - # Extract variables from the dictionary - - ts_object = None - if dictionary.get('tsObject') is not None: - ts_object = [TsObjectInput.from_dictionary(x) for x in dictionary.get('tsObject')] - user_name = dictionary.get("userName") if dictionary.get("userName") else APIHelper.SKIP - user_id = dictionary.get("userId") if dictionary.get("userId") else APIHelper.SKIP - # Return an object of this model - return cls(ts_object, - user_name, - user_id) diff --git a/Python/thoughtspotpublicrestapi/models/tspublic_rest_v_2_metadata_header_search_request.py b/Python/thoughtspotpublicrestapi/models/tspublic_rest_v_2_metadata_header_search_request.py deleted file mode 100644 index 3ae2530ea..000000000 --- a/Python/thoughtspotpublicrestapi/models/tspublic_rest_v_2_metadata_header_search_request.py +++ /dev/null @@ -1,243 +0,0 @@ -# -*- coding: utf-8 -*- - -""" -thoughtspotpublicrestapi - -This file was automatically generated by APIMATIC v3.0 ( - https://www.apimatic.io ). -""" -from thoughtspotpublicrestapi.api_helper import APIHelper -from thoughtspotpublicrestapi.models.access_level_input import AccessLevelInput -from thoughtspotpublicrestapi.models.name_and_id_input import NameAndIdInput -from thoughtspotpublicrestapi.models.tag_name_and_id_input import TagNameAndIdInput - - -class TspublicRestV2MetadataHeaderSearchRequest(object): - - """Implementation of the 'Tspublic Rest V2 Metadata Header Search Request' model. - - TODO: type model description here. - - Attributes: - output_fields (list of string): Array of header field names that need - to be included in the header response - offset (int): The batch offset, starting from where the records should - be included in the response. If no input is provided then offset - starts from 0. Default: 0 - batch_number (int): An alternate way to set offset for the starting - point of the response. The value in offset field will not be - considered if batchNumber field has value greater than 0. Offset - value will be calculated as (batchNumber - 1) * batchSize. It is - mandatory to provide a value for batchSize with batchNumber. - Example: Assume response has 100 records. Now, batchNumber is - set as 2 and batchSize as 10, then offset value will be 10. So, 10 - records starting from 11th record will be considered. - batch_size (int): The number of records that should be included in the - response starting from offset position. If no input is provided - then first page is included in the response. - sort_by (SortByEnum): Field based on which the response needs to be - ordered. - sort_order (SortOrderEnum): Order in which sortBy should be applied. - mtype (Type3Enum): Type of the metadata object being searched. - name_pattern (string): A pattern to match the name of the metadata - object. This parameter supports matching case-insensitive strings. - For a wildcard match, use %. - fetch_id (list of string): A JSON array containing the GUIDs of the - metadata objects that you want to fetch. - skip_id (list of string): A JSON array containing the GUIDs of the - metadata objects that you want to skip. - show_hidden (bool): When set to true, returns details of the hidden - objects, such as a column in a worksheet or a table. - auto_created (bool): A flag to indicate whether to list only the auto - created objects. When no value is provided as input then all - objects are returned. - access_level (list of AccessLevelInput): A JSON array of objects with - user details for which the metadata objects should be considered - from the repository If you specify ID or name of user and set the - type parameter to USER, the API returns metadata objects - associated with the user If you specify ID or name of user group - and set the type parameter to USER_GROUP, the API returns metadata - objects for all the users mapped to the specified user group. If - the id or name parameter is not defined, but the type attribute is - set to USER or USER_GROUP, then the API will not return and - response. If no input is provided for any field for this object, - then the API returns headers for all users. If both name and id is - provided, then id will be considered. - tag (list of TagNameAndIdInput): A JSON array of name or GUID of tags - or both. When both are given then id is considered. - favorite_for (list of NameAndIdInput): A JSON array of name or GUID of - the user or both for whom the object is assigned as favorite. When - both are given then id is considered. - author (list of NameAndIdInput): A JSON array of name or GUID of the - user or both who created the object. When both are given then id - is considered - last_modified_by (list of NameAndIdInput): A JSON array of name or - GUID of the user or both who last modified the object. When both - are given then id is considered. - - """ - - # Create a mapping from Model property names to API property names - _names = { - "mtype": 'type', - "output_fields": 'outputFields', - "offset": 'offset', - "batch_number": 'batchNumber', - "batch_size": 'batchSize', - "sort_by": 'sortBy', - "sort_order": 'sortOrder', - "name_pattern": 'namePattern', - "fetch_id": 'fetchId', - "skip_id": 'skipId', - "show_hidden": 'showHidden', - "auto_created": 'autoCreated', - "access_level": 'accessLevel', - "tag": 'tag', - "favorite_for": 'favoriteFor', - "author": 'author', - "last_modified_by": 'lastModifiedBy' - } - - _optionals = [ - 'output_fields', - 'offset', - 'batch_number', - 'batch_size', - 'sort_by', - 'sort_order', - 'name_pattern', - 'fetch_id', - 'skip_id', - 'show_hidden', - 'auto_created', - 'access_level', - 'tag', - 'favorite_for', - 'author', - 'last_modified_by', - ] - - def __init__(self, - mtype=None, - output_fields=APIHelper.SKIP, - offset=0, - batch_number=APIHelper.SKIP, - batch_size=-1, - sort_by='DEFAULT', - sort_order='DEFAULT', - name_pattern=APIHelper.SKIP, - fetch_id=APIHelper.SKIP, - skip_id=APIHelper.SKIP, - show_hidden=False, - auto_created=APIHelper.SKIP, - access_level=APIHelper.SKIP, - tag=APIHelper.SKIP, - favorite_for=APIHelper.SKIP, - author=APIHelper.SKIP, - last_modified_by=APIHelper.SKIP): - """Constructor for the TspublicRestV2MetadataHeaderSearchRequest class""" - - # Initialize members of the class - if output_fields is not APIHelper.SKIP: - self.output_fields = output_fields - self.offset = offset - if batch_number is not APIHelper.SKIP: - self.batch_number = batch_number - self.batch_size = batch_size - self.sort_by = sort_by - self.sort_order = sort_order - self.mtype = mtype - if name_pattern is not APIHelper.SKIP: - self.name_pattern = name_pattern - if fetch_id is not APIHelper.SKIP: - self.fetch_id = fetch_id - if skip_id is not APIHelper.SKIP: - self.skip_id = skip_id - self.show_hidden = show_hidden - if auto_created is not APIHelper.SKIP: - self.auto_created = auto_created - if access_level is not APIHelper.SKIP: - self.access_level = access_level - if tag is not APIHelper.SKIP: - self.tag = tag - if favorite_for is not APIHelper.SKIP: - self.favorite_for = favorite_for - if author is not APIHelper.SKIP: - self.author = author - if last_modified_by is not APIHelper.SKIP: - self.last_modified_by = last_modified_by - - @classmethod - def from_dictionary(cls, - dictionary): - """Creates an instance of this model from a dictionary - - Args: - dictionary (dictionary): A dictionary representation of the object - as obtained from the deserialization of the server's response. The - keys MUST match property names in the API description. - - Returns: - object: An instance of this structure class. - - """ - if dictionary is None: - return None - - # Extract variables from the dictionary - - mtype = dictionary.get("type") if dictionary.get("type") else None - output_fields = dictionary.get("outputFields") if dictionary.get("outputFields") else APIHelper.SKIP - offset = dictionary.get("offset") if dictionary.get("offset") else 0 - batch_number = dictionary.get("batchNumber") if dictionary.get("batchNumber") else APIHelper.SKIP - batch_size = dictionary.get("batchSize") if dictionary.get("batchSize") else -1 - sort_by = dictionary.get("sortBy") if dictionary.get("sortBy") else 'DEFAULT' - sort_order = dictionary.get("sortOrder") if dictionary.get("sortOrder") else 'DEFAULT' - name_pattern = dictionary.get("namePattern") if dictionary.get("namePattern") else APIHelper.SKIP - fetch_id = dictionary.get("fetchId") if dictionary.get("fetchId") else APIHelper.SKIP - skip_id = dictionary.get("skipId") if dictionary.get("skipId") else APIHelper.SKIP - show_hidden = dictionary.get("showHidden") if dictionary.get("showHidden") else False - auto_created = dictionary.get("autoCreated") if "autoCreated" in dictionary.keys() else APIHelper.SKIP - access_level = None - if dictionary.get('accessLevel') is not None: - access_level = [AccessLevelInput.from_dictionary(x) for x in dictionary.get('accessLevel')] - else: - access_level = APIHelper.SKIP - tag = None - if dictionary.get('tag') is not None: - tag = [TagNameAndIdInput.from_dictionary(x) for x in dictionary.get('tag')] - else: - tag = APIHelper.SKIP - favorite_for = None - if dictionary.get('favoriteFor') is not None: - favorite_for = [NameAndIdInput.from_dictionary(x) for x in dictionary.get('favoriteFor')] - else: - favorite_for = APIHelper.SKIP - author = None - if dictionary.get('author') is not None: - author = [NameAndIdInput.from_dictionary(x) for x in dictionary.get('author')] - else: - author = APIHelper.SKIP - last_modified_by = None - if dictionary.get('lastModifiedBy') is not None: - last_modified_by = [NameAndIdInput.from_dictionary(x) for x in dictionary.get('lastModifiedBy')] - else: - last_modified_by = APIHelper.SKIP - # Return an object of this model - return cls(mtype, - output_fields, - offset, - batch_number, - batch_size, - sort_by, - sort_order, - name_pattern, - fetch_id, - skip_id, - show_hidden, - auto_created, - access_level, - tag, - favorite_for, - author, - last_modified_by) diff --git a/Python/thoughtspotpublicrestapi/models/tspublic_rest_v_2_metadata_homeliveboard_assign_request.py b/Python/thoughtspotpublicrestapi/models/tspublic_rest_v_2_metadata_homeliveboard_assign_request.py deleted file mode 100644 index 8ed27f977..000000000 --- a/Python/thoughtspotpublicrestapi/models/tspublic_rest_v_2_metadata_homeliveboard_assign_request.py +++ /dev/null @@ -1,77 +0,0 @@ -# -*- coding: utf-8 -*- - -""" -thoughtspotpublicrestapi - -This file was automatically generated by APIMATIC v3.0 ( - https://www.apimatic.io ). -""" -from thoughtspotpublicrestapi.api_helper import APIHelper - - -class TspublicRestV2MetadataHomeliveboardAssignRequest(object): - - """Implementation of the 'Tspublic Rest V2 Metadata Homeliveboard Assign Request' model. - - TODO: type model description here. - - Attributes: - user_name (string): Name of the user - user_id (string): The GUID of the user - liveboard_id (string): The GUID of the liveboard - - """ - - # Create a mapping from Model property names to API property names - _names = { - "user_name": 'userName', - "user_id": 'userId', - "liveboard_id": 'liveboardId' - } - - _optionals = [ - 'user_name', - 'user_id', - 'liveboard_id', - ] - - def __init__(self, - user_name=APIHelper.SKIP, - user_id=APIHelper.SKIP, - liveboard_id=APIHelper.SKIP): - """Constructor for the TspublicRestV2MetadataHomeliveboardAssignRequest class""" - - # Initialize members of the class - if user_name is not APIHelper.SKIP: - self.user_name = user_name - if user_id is not APIHelper.SKIP: - self.user_id = user_id - if liveboard_id is not APIHelper.SKIP: - self.liveboard_id = liveboard_id - - @classmethod - def from_dictionary(cls, - dictionary): - """Creates an instance of this model from a dictionary - - Args: - dictionary (dictionary): A dictionary representation of the object - as obtained from the deserialization of the server's response. The - keys MUST match property names in the API description. - - Returns: - object: An instance of this structure class. - - """ - if dictionary is None: - return None - - # Extract variables from the dictionary - - user_name = dictionary.get("userName") if dictionary.get("userName") else APIHelper.SKIP - user_id = dictionary.get("userId") if dictionary.get("userId") else APIHelper.SKIP - liveboard_id = dictionary.get("liveboardId") if dictionary.get("liveboardId") else APIHelper.SKIP - # Return an object of this model - return cls(user_name, - user_id, - liveboard_id) diff --git a/Python/thoughtspotpublicrestapi/models/tspublic_rest_v_2_metadata_homeliveboard_unassign_request.py b/Python/thoughtspotpublicrestapi/models/tspublic_rest_v_2_metadata_homeliveboard_unassign_request.py deleted file mode 100644 index f916a733f..000000000 --- a/Python/thoughtspotpublicrestapi/models/tspublic_rest_v_2_metadata_homeliveboard_unassign_request.py +++ /dev/null @@ -1,69 +0,0 @@ -# -*- coding: utf-8 -*- - -""" -thoughtspotpublicrestapi - -This file was automatically generated by APIMATIC v3.0 ( - https://www.apimatic.io ). -""" -from thoughtspotpublicrestapi.api_helper import APIHelper - - -class TspublicRestV2MetadataHomeliveboardUnassignRequest(object): - - """Implementation of the 'Tspublic Rest V2 Metadata Homeliveboard Unassign Request' model. - - TODO: type model description here. - - Attributes: - user_name (string): Name of the user - user_id (string): The GUID of the user - - """ - - # Create a mapping from Model property names to API property names - _names = { - "user_name": 'userName', - "user_id": 'userId' - } - - _optionals = [ - 'user_name', - 'user_id', - ] - - def __init__(self, - user_name=APIHelper.SKIP, - user_id=APIHelper.SKIP): - """Constructor for the TspublicRestV2MetadataHomeliveboardUnassignRequest class""" - - # Initialize members of the class - if user_name is not APIHelper.SKIP: - self.user_name = user_name - if user_id is not APIHelper.SKIP: - self.user_id = user_id - - @classmethod - def from_dictionary(cls, - dictionary): - """Creates an instance of this model from a dictionary - - Args: - dictionary (dictionary): A dictionary representation of the object - as obtained from the deserialization of the server's response. The - keys MUST match property names in the API description. - - Returns: - object: An instance of this structure class. - - """ - if dictionary is None: - return None - - # Extract variables from the dictionary - - user_name = dictionary.get("userName") if dictionary.get("userName") else APIHelper.SKIP - user_id = dictionary.get("userId") if dictionary.get("userId") else APIHelper.SKIP - # Return an object of this model - return cls(user_name, - user_id) diff --git a/Python/thoughtspotpublicrestapi/models/tspublic_rest_v_2_metadata_tag_assign_request.py b/Python/thoughtspotpublicrestapi/models/tspublic_rest_v_2_metadata_tag_assign_request.py deleted file mode 100644 index 42355dcb5..000000000 --- a/Python/thoughtspotpublicrestapi/models/tspublic_rest_v_2_metadata_tag_assign_request.py +++ /dev/null @@ -1,79 +0,0 @@ -# -*- coding: utf-8 -*- - -""" -thoughtspotpublicrestapi - -This file was automatically generated by APIMATIC v3.0 ( - https://www.apimatic.io ). -""" -from thoughtspotpublicrestapi.api_helper import APIHelper -from thoughtspotpublicrestapi.models.ts_object_input import TsObjectInput - - -class TspublicRestV2MetadataTagAssignRequest(object): - - """Implementation of the 'Tspublic Rest V2 Metadata Tag Assign Request' model. - - TODO: type model description here. - - Attributes: - name (string): Name of the tag - id (string): The GUID of the tag - ts_object (list of TsObjectInput): A JSON Array of GUIDs and type of - metadata object. - - """ - - # Create a mapping from Model property names to API property names - _names = { - "ts_object": 'tsObject', - "name": 'name', - "id": 'id' - } - - _optionals = [ - 'name', - 'id', - ] - - def __init__(self, - ts_object=None, - name=APIHelper.SKIP, - id=APIHelper.SKIP): - """Constructor for the TspublicRestV2MetadataTagAssignRequest class""" - - # Initialize members of the class - if name is not APIHelper.SKIP: - self.name = name - if id is not APIHelper.SKIP: - self.id = id - self.ts_object = ts_object - - @classmethod - def from_dictionary(cls, - dictionary): - """Creates an instance of this model from a dictionary - - Args: - dictionary (dictionary): A dictionary representation of the object - as obtained from the deserialization of the server's response. The - keys MUST match property names in the API description. - - Returns: - object: An instance of this structure class. - - """ - if dictionary is None: - return None - - # Extract variables from the dictionary - - ts_object = None - if dictionary.get('tsObject') is not None: - ts_object = [TsObjectInput.from_dictionary(x) for x in dictionary.get('tsObject')] - name = dictionary.get("name") if dictionary.get("name") else APIHelper.SKIP - id = dictionary.get("id") if dictionary.get("id") else APIHelper.SKIP - # Return an object of this model - return cls(ts_object, - name, - id) diff --git a/Python/thoughtspotpublicrestapi/models/tspublic_rest_v_2_metadata_tag_create_request.py b/Python/thoughtspotpublicrestapi/models/tspublic_rest_v_2_metadata_tag_create_request.py deleted file mode 100644 index 7a96559d8..000000000 --- a/Python/thoughtspotpublicrestapi/models/tspublic_rest_v_2_metadata_tag_create_request.py +++ /dev/null @@ -1,67 +0,0 @@ -# -*- coding: utf-8 -*- - -""" -thoughtspotpublicrestapi - -This file was automatically generated by APIMATIC v3.0 ( - https://www.apimatic.io ). -""" -from thoughtspotpublicrestapi.api_helper import APIHelper - - -class TspublicRestV2MetadataTagCreateRequest(object): - - """Implementation of the 'Tspublic Rest V2 Metadata Tag Create Request' model. - - TODO: type model description here. - - Attributes: - name (string): Name of the tag - color (string): Hex color code to be assigned to the tag - - """ - - # Create a mapping from Model property names to API property names - _names = { - "name": 'name', - "color": 'color' - } - - _optionals = [ - 'color', - ] - - def __init__(self, - name=None, - color=APIHelper.SKIP): - """Constructor for the TspublicRestV2MetadataTagCreateRequest class""" - - # Initialize members of the class - self.name = name - if color is not APIHelper.SKIP: - self.color = color - - @classmethod - def from_dictionary(cls, - dictionary): - """Creates an instance of this model from a dictionary - - Args: - dictionary (dictionary): A dictionary representation of the object - as obtained from the deserialization of the server's response. The - keys MUST match property names in the API description. - - Returns: - object: An instance of this structure class. - - """ - if dictionary is None: - return None - - # Extract variables from the dictionary - - name = dictionary.get("name") if dictionary.get("name") else None - color = dictionary.get("color") if dictionary.get("color") else APIHelper.SKIP - # Return an object of this model - return cls(name, - color) diff --git a/Python/thoughtspotpublicrestapi/models/tspublic_rest_v_2_metadata_tag_unassign_request.py b/Python/thoughtspotpublicrestapi/models/tspublic_rest_v_2_metadata_tag_unassign_request.py deleted file mode 100644 index e5b42b576..000000000 --- a/Python/thoughtspotpublicrestapi/models/tspublic_rest_v_2_metadata_tag_unassign_request.py +++ /dev/null @@ -1,79 +0,0 @@ -# -*- coding: utf-8 -*- - -""" -thoughtspotpublicrestapi - -This file was automatically generated by APIMATIC v3.0 ( - https://www.apimatic.io ). -""" -from thoughtspotpublicrestapi.api_helper import APIHelper -from thoughtspotpublicrestapi.models.ts_object_input import TsObjectInput - - -class TspublicRestV2MetadataTagUnassignRequest(object): - - """Implementation of the 'Tspublic Rest V2 Metadata Tag Unassign Request' model. - - TODO: type model description here. - - Attributes: - name (string): Name of the tag - id (string): The GUID of the tag - ts_object (list of TsObjectInput): A JSON Array of GUIDs and type of - metadata object. - - """ - - # Create a mapping from Model property names to API property names - _names = { - "ts_object": 'tsObject', - "name": 'name', - "id": 'id' - } - - _optionals = [ - 'name', - 'id', - ] - - def __init__(self, - ts_object=None, - name=APIHelper.SKIP, - id=APIHelper.SKIP): - """Constructor for the TspublicRestV2MetadataTagUnassignRequest class""" - - # Initialize members of the class - if name is not APIHelper.SKIP: - self.name = name - if id is not APIHelper.SKIP: - self.id = id - self.ts_object = ts_object - - @classmethod - def from_dictionary(cls, - dictionary): - """Creates an instance of this model from a dictionary - - Args: - dictionary (dictionary): A dictionary representation of the object - as obtained from the deserialization of the server's response. The - keys MUST match property names in the API description. - - Returns: - object: An instance of this structure class. - - """ - if dictionary is None: - return None - - # Extract variables from the dictionary - - ts_object = None - if dictionary.get('tsObject') is not None: - ts_object = [TsObjectInput.from_dictionary(x) for x in dictionary.get('tsObject')] - name = dictionary.get("name") if dictionary.get("name") else APIHelper.SKIP - id = dictionary.get("id") if dictionary.get("id") else APIHelper.SKIP - # Return an object of this model - return cls(ts_object, - name, - id) diff --git a/Python/thoughtspotpublicrestapi/models/tspublic_rest_v_2_metadata_tag_update_request.py b/Python/thoughtspotpublicrestapi/models/tspublic_rest_v_2_metadata_tag_update_request.py deleted file mode 100644 index 2a7ec66be..000000000 --- a/Python/thoughtspotpublicrestapi/models/tspublic_rest_v_2_metadata_tag_update_request.py +++ /dev/null @@ -1,77 +0,0 @@ -# -*- coding: utf-8 -*- - -""" -thoughtspotpublicrestapi - -This file was automatically generated by APIMATIC v3.0 ( - https://www.apimatic.io ). -""" -from thoughtspotpublicrestapi.api_helper import APIHelper - - -class TspublicRestV2MetadataTagUpdateRequest(object): - - """Implementation of the 'Tspublic Rest V2 Metadata Tag Update Request' model. - - TODO: type model description here. - - Attributes: - name (string): Name of the tag - id (string): The GUID of the tag - color (string): Hex color code to be assigned to the tag - - """ - - # Create a mapping from Model property names to API property names - _names = { - "name": 'name', - "id": 'id', - "color": 'color' - } - - _optionals = [ - 'name', - 'id', - 'color', - ] - - def __init__(self, - name=APIHelper.SKIP, - id=APIHelper.SKIP, - color=APIHelper.SKIP): - """Constructor for the TspublicRestV2MetadataTagUpdateRequest class""" - - # Initialize members of the class - if name is not APIHelper.SKIP: - self.name = name - if id is not APIHelper.SKIP: - self.id = id - if color is not APIHelper.SKIP: - self.color = color - - @classmethod - def from_dictionary(cls, - dictionary): - """Creates an instance of this model from a dictionary - - Args: - dictionary (dictionary): A dictionary representation of the object - as obtained from the deserialization of the server's response. The - keys MUST match property names in the API description. - - Returns: - object: An instance of this structure class. - - """ - if dictionary is None: - return None - - # Extract variables from the dictionary - - name = dictionary.get("name") if dictionary.get("name") else APIHelper.SKIP - id = dictionary.get("id") if dictionary.get("id") else APIHelper.SKIP - color = dictionary.get("color") if dictionary.get("color") else APIHelper.SKIP - # Return an object of this model - return cls(name, - id, - color) diff --git a/Python/thoughtspotpublicrestapi/models/tspublic_rest_v_2_metadata_tml_export_request.py b/Python/thoughtspotpublicrestapi/models/tspublic_rest_v_2_metadata_tml_export_request.py deleted file mode 100644 index 1d6f32a1e..000000000 --- a/Python/thoughtspotpublicrestapi/models/tspublic_rest_v_2_metadata_tml_export_request.py +++ /dev/null @@ -1,79 +0,0 @@ -# -*- coding: utf-8 -*- - -""" -thoughtspotpublicrestapi - -This file was automatically generated by APIMATIC v3.0 ( - https://www.apimatic.io ). -""" -from thoughtspotpublicrestapi.api_helper import APIHelper - - -class TspublicRestV2MetadataTmlExportRequest(object): - - """Implementation of the 'Tspublic Rest V2 Metadata Tml Export Request' model. - - TODO: type model description here. - - Attributes: - id (list of string): A JSON array of GUIDs of the objects. - format_type (FormatType3Enum): The format in which to export the - objects - export_associated (bool): Specifies if you would like to export the - associated objects. To export the objects associated with the - objects specified in id, set the value to true. When set to true, - the API exports any underlying worksheets, tables, or views for a - given object. By default, the API does not export these underlying - objects - - """ - - # Create a mapping from Model property names to API property names - _names = { - "id": 'id', - "format_type": 'formatType', - "export_associated": 'exportAssociated' - } - - _optionals = [ - 'format_type', - 'export_associated', - ] - - def __init__(self, - id=None, - format_type='YAML', - export_associated=False): - """Constructor for the TspublicRestV2MetadataTmlExportRequest class""" - - # Initialize members of the class - self.id = id - self.format_type = format_type - self.export_associated = export_associated - - @classmethod - def from_dictionary(cls, - dictionary): - """Creates an instance of this model from a dictionary - - Args: - dictionary (dictionary): A dictionary representation of the object - as obtained from the deserialization of the server's response. The - keys MUST match property names in the API description. - - Returns: - object: An instance of this structure class. - - """ - if dictionary is None: - return None - - # Extract variables from the dictionary - - id = dictionary.get("id") if dictionary.get("id") else None - format_type = dictionary.get("formatType") if dictionary.get("formatType") else 'YAML' - export_associated = dictionary.get("exportAssociated") if dictionary.get("exportAssociated") else False - # Return an object of this model - return cls(id, - format_type, - export_associated) diff --git a/Python/thoughtspotpublicrestapi/models/tspublic_rest_v_2_metadata_tml_import_request.py b/Python/thoughtspotpublicrestapi/models/tspublic_rest_v_2_metadata_tml_import_request.py deleted file mode 100644 index c2cb9fc62..000000000 --- a/Python/thoughtspotpublicrestapi/models/tspublic_rest_v_2_metadata_tml_import_request.py +++ /dev/null @@ -1,101 +0,0 @@ -# -*- coding: utf-8 -*- - -""" -thoughtspotpublicrestapi - -This file was automatically generated by APIMATIC v3.0 ( - https://www.apimatic.io ). -""" -from thoughtspotpublicrestapi.api_helper import APIHelper - - -class TspublicRestV2MetadataTmlImportRequest(object): - - """Implementation of the 'Tspublic Rest V2 Metadata Tml Import Request' model. - - TODO: type model description here. - - Attributes: - object_tml (list of string): A string array of TML objects to upload, - in YAML or JSON format. If TML is in YAML format, then use - escape characters for quotes and new line characters. Example - TML: guid: 6d2c1c9b-a407-409c-8c0c-819aeb51350f\ntable:\n name: - TESTINT\n db: SUPPLYCHAIN_MAIN\n schema: PUBLIC\n db_table: - TESTINT\n connection:\n name: SnowflakeConnection\n - columns:\n - name: C1\n db_column_name: C1\n properties:\n - column_type: MEASURE\n aggregation: SUM\n index_type: - DONT_INDEX\n db_column_properties:\n data_type: INT64\n - If TML is in JSON format, then use escape characters for quotes. - Example TML: {\\"guid\\": - \\"6d2c1c9b-a407-409c-8c0c-819aeb51350f\\", \\"table\\": { - \\"name\\": \\"TESTINT\\", \\"db\\": \\"SUPPLYCHAIN_MAIN\\", - \\"schema\\": \\"PUBLIC\\", \\"db_table\\": \\"TESTINT\\", - \\"connection\\": { \\"name\\": \\"SnowflakeConnection\\" }, - \\"columns\\": [ { \\"name\\": \\"C1\\", \\"db_column_name\\": - \\"C1\\", \\"properties\\": { \\"column_type\\": \\"MEASURE\\", - \\"aggregation\\": \\"SUM\\", \\"index_type\\": \\"DONT_INDEX\\" - }, \\"db_column_properties\\": { \\"data_type\\": \\"INT64\\" } } - ] } }', - import_policy (ImportPolicyEnum): Policy to follow during import - force_create (bool): Specifies if you are updating or creating - objects. To create new objects, specify true. By default, - ThoughtSpot updates existing objects that have the same GUID as - the objects you are importing. When set to true, the GUID property - in the imported TML is replaced on the server, and the response - headers will include the id_guid property with the GUID of the new - object. The new object will be assigned a new GUID, even if the - imported TML file included a guid value. Thus, there is no need to - include the guid in the TML file if you are using - forceCreate=true. - - """ - - # Create a mapping from Model property names to API property names - _names = { - "object_tml": 'objectTML', - "import_policy": 'importPolicy', - "force_create": 'forceCreate' - } - - _optionals = [ - 'import_policy', - 'force_create', - ] - - def __init__(self, - object_tml=None, - import_policy='PARTIAL', - force_create=False): - """Constructor for the TspublicRestV2MetadataTmlImportRequest class""" - - # Initialize members of the class - self.object_tml = object_tml - self.import_policy = import_policy - self.force_create = force_create - - @classmethod - def from_dictionary(cls, - dictionary): - """Creates an instance of this model from a dictionary - - Args: - dictionary (dictionary): A dictionary representation of the object - as obtained from the deserialization of the server's response. The - keys MUST match property names in the API description. - - Returns: - object: An instance of this structure class. - - """ - if dictionary is None: - return None - - # Extract variables from the dictionary - - object_tml = dictionary.get("objectTML") if dictionary.get("objectTML") else None - import_policy = dictionary.get("importPolicy") if dictionary.get("importPolicy") else 'PARTIAL' - force_create = dictionary.get("forceCreate") if dictionary.get("forceCreate") else False - # Return an object of this model - return cls(object_tml, - import_policy, - force_create) diff --git a/Python/thoughtspotpublicrestapi/models/tspublic_rest_v_2_org_create_request.py b/Python/thoughtspotpublicrestapi/models/tspublic_rest_v_2_org_create_request.py deleted file mode 100644 index 253cf28ae..000000000 --- a/Python/thoughtspotpublicrestapi/models/tspublic_rest_v_2_org_create_request.py +++ /dev/null @@ -1,67 +0,0 @@ -# -*- coding: utf-8 -*- - -""" -thoughtspotpublicrestapi - -This file was automatically generated by APIMATIC v3.0 ( - https://www.apimatic.io ). -""" -from thoughtspotpublicrestapi.api_helper import APIHelper - - -class TspublicRestV2OrgCreateRequest(object): - - """Implementation of the 'Tspublic Rest V2 Org Create Request' model. - - TODO: type model description here. - - Attributes: - name (string): Name of the organization. - description (string): Description text for the organization. - - """ - - # Create a mapping from Model property names to API property names - _names = { - "name": 'name', - "description": 'description' - } - - _optionals = [ - 'description', - ] - - def __init__(self, - name=None, - description=APIHelper.SKIP): - """Constructor for the TspublicRestV2OrgCreateRequest class""" - - # Initialize members of the class - self.name = name - if description is not APIHelper.SKIP: - self.description = description - - @classmethod - def from_dictionary(cls, - dictionary): - """Creates an instance of this model from a dictionary - - Args: - dictionary (dictionary): A dictionary representation of the object - as obtained from the deserialization of the server's response. The - keys MUST match property names in the API description. - - Returns: - object: An instance of this structure class. - - """ - if dictionary is None: - return None - - # Extract variables from the dictionary - - name = dictionary.get("name") if dictionary.get("name") else None - description = dictionary.get("description") if dictionary.get("description") else APIHelper.SKIP - # Return an object of this model - return cls(name, - description) diff --git a/Python/thoughtspotpublicrestapi/models/tspublic_rest_v_2_org_search_request.py b/Python/thoughtspotpublicrestapi/models/tspublic_rest_v_2_org_search_request.py deleted file mode 100644 index c2f43cabb..000000000 --- a/Python/thoughtspotpublicrestapi/models/tspublic_rest_v_2_org_search_request.py +++ /dev/null @@ -1,77 +0,0 @@ -# -*- coding: utf-8 -*- - -""" -thoughtspotpublicrestapi - -This file was automatically generated by APIMATIC v3.0 ( - https://www.apimatic.io ). -""" -from thoughtspotpublicrestapi.api_helper import APIHelper - - -class TspublicRestV2OrgSearchRequest(object): - - """Implementation of the 'Tspublic Rest V2 Org Search Request' model. - - TODO: type model description here. - - Attributes: - name (string): Name of the organization. - id (int): The ID of the organization. - show_deleted (bool): When set to true, the response will include the - details of deleted organization also. - - """ - - # Create a mapping from Model property names to API property names - _names = { - "name": 'name', - "id": 'id', - "show_deleted": 'showDeleted' - } - - _optionals = [ - 'name', - 'id', - 'show_deleted', - ] - - def __init__(self, - name=APIHelper.SKIP, - id=APIHelper.SKIP, - show_deleted=False): - """Constructor for the TspublicRestV2OrgSearchRequest class""" - - # Initialize members of the class - if name is not APIHelper.SKIP: - self.name = name - if id is not APIHelper.SKIP: - self.id = id - self.show_deleted = show_deleted - - @classmethod - def from_dictionary(cls, - dictionary): - """Creates an instance of this model from a dictionary - - Args: - dictionary (dictionary): A dictionary representation of the object - as obtained from the deserialization of the server's response. The - keys MUST match property names in the API description. - - Returns: - object: An instance of this structure class. - - """ - if dictionary is None: - return None - - # Extract variables from the dictionary - - name = dictionary.get("name") if dictionary.get("name") else APIHelper.SKIP - id = dictionary.get("id") if dictionary.get("id") else APIHelper.SKIP - show_deleted = dictionary.get("showDeleted") if dictionary.get("showDeleted") else False - # Return an object of this model - return cls(name, - id, - show_deleted) diff --git a/Python/thoughtspotpublicrestapi/models/tspublic_rest_v_2_org_update_request.py b/Python/thoughtspotpublicrestapi/models/tspublic_rest_v_2_org_update_request.py deleted file mode 100644 index 87b67c928..000000000 --- a/Python/thoughtspotpublicrestapi/models/tspublic_rest_v_2_org_update_request.py +++ /dev/null @@ -1,85 +0,0 @@ -# -*- coding: utf-8 -*- - -""" -thoughtspotpublicrestapi - -This file was automatically generated by APIMATIC v3.0 ( - https://www.apimatic.io ). -""" -from thoughtspotpublicrestapi.api_helper import APIHelper - - -class TspublicRestV2OrgUpdateRequest(object): - - """Implementation of the 'Tspublic Rest V2 Org Update Request' model. - - TODO: type model description here. - - Attributes: - name (string): Name of the organization. - id (int): The ID of the organization. - description (string): Description text for the organization. - active (bool): Status of the organization. - - """ - - # Create a mapping from Model property names to API property names - _names = { - "name": 'name', - "id": 'id', - "description": 'description', - "active": 'active' - } - - _optionals = [ - 'name', - 'id', - 'description', - 'active', - ] - - def __init__(self, - name=APIHelper.SKIP, - id=APIHelper.SKIP, - description=APIHelper.SKIP, - active=APIHelper.SKIP): - """Constructor for the TspublicRestV2OrgUpdateRequest class""" - - # Initialize members of the class - if name is not APIHelper.SKIP: - self.name = name - if id is not APIHelper.SKIP: - self.id = id - if description is not APIHelper.SKIP: - self.description = description - if active is not APIHelper.SKIP: - self.active = active - - @classmethod - def from_dictionary(cls, - dictionary): - """Creates an instance of this model from a dictionary - - Args: - dictionary (dictionary): A dictionary representation of the object - as obtained from the deserialization of the server's response. The - keys MUST match property names in the API description. - - Returns: - object: An instance of this structure class. - - """ - if dictionary is None: - return None - - # Extract variables from the dictionary - - name = dictionary.get("name") if dictionary.get("name") else APIHelper.SKIP - id = dictionary.get("id") if dictionary.get("id") else APIHelper.SKIP - description = dictionary.get("description") if dictionary.get("description") else APIHelper.SKIP - active = dictionary.get("active") if "active" in dictionary.keys() else APIHelper.SKIP - # Return an object of this model - return cls(name, - id, - description, - active) diff --git a/Python/thoughtspotpublicrestapi/models/tspublic_rest_v_2_security_permission_principal_search_request.py b/Python/thoughtspotpublicrestapi/models/tspublic_rest_v_2_security_permission_principal_search_request.py deleted file mode 100644 index 6bd0e7f80..000000000 --- a/Python/thoughtspotpublicrestapi/models/tspublic_rest_v_2_security_permission_principal_search_request.py +++ /dev/null @@ -1,78 +0,0 @@ -# -*- coding: utf-8 -*- - -""" -thoughtspotpublicrestapi - -This file was automatically generated by APIMATIC v3.0 ( - https://www.apimatic.io ). -""" -from thoughtspotpublicrestapi.api_helper import APIHelper -from thoughtspotpublicrestapi.models.ts_object_search_input import TsObjectSearchInput -from thoughtspotpublicrestapi.models.user_name_and_id_input import UserNameAndIDInput - - -class TspublicRestV2SecurityPermissionPrincipalSearchRequest(object): - - """Implementation of the 'Tspublic Rest V2 Security Permission Principal Search Request' model. - - TODO: type model description here. - - Attributes: - principal (list of UserNameAndIDInput): A JSON array of principal - names or GUIDs to be included in the request. When both are given - then id is considered. - ts_object (list of TsObjectSearchInput): A JSON Array of GUIDs and - type of metadata object. - - """ - - # Create a mapping from Model property names to API property names - _names = { - "principal": 'principal', - "ts_object": 'tsObject' - } - - _optionals = [ - 'ts_object', - ] - - def __init__(self, - principal=None, - ts_object=APIHelper.SKIP): - """Constructor for the TspublicRestV2SecurityPermissionPrincipalSearchRequest class""" - - # Initialize members of the class - self.principal = principal - if ts_object is not APIHelper.SKIP: - self.ts_object = ts_object - - @classmethod - def from_dictionary(cls, - dictionary): - """Creates an instance of this model from a dictionary - - Args: - dictionary (dictionary): A dictionary representation of the object - as obtained from the deserialization of the server's response. The - keys MUST match property names in the API description. - - Returns: - object: An instance of this structure class. - - """ - if dictionary is None: - return None - - # Extract variables from the dictionary - - principal = None - if dictionary.get('principal') is not None: - principal = [UserNameAndIDInput.from_dictionary(x) for x in dictionary.get('principal')] - ts_object = None - if dictionary.get('tsObject') is not None: - ts_object = [TsObjectSearchInput.from_dictionary(x) for x in dictionary.get('tsObject')] - else: - ts_object = APIHelper.SKIP - # Return an object of this model - return cls(principal, - ts_object) diff --git a/Python/thoughtspotpublicrestapi/models/tspublic_rest_v_2_security_permission_tsobject_search_request.py b/Python/thoughtspotpublicrestapi/models/tspublic_rest_v_2_security_permission_tsobject_search_request.py deleted file mode 100644 index 9c7fb8332..000000000 --- a/Python/thoughtspotpublicrestapi/models/tspublic_rest_v_2_security_permission_tsobject_search_request.py +++ /dev/null @@ -1,86 +0,0 @@ -# -*- coding: utf-8 -*- - -""" -thoughtspotpublicrestapi - -This file was automatically generated by APIMATIC v3.0 ( - https://www.apimatic.io ). -""" -from thoughtspotpublicrestapi.api_helper import APIHelper -from thoughtspotpublicrestapi.models.ts_object_search_input import TsObjectSearchInput -from thoughtspotpublicrestapi.models.user_name_and_id_input import UserNameAndIDInput - - -class TspublicRestV2SecurityPermissionTsobjectSearchRequest(object): - - """Implementation of the 'Tspublic Rest V2 Security Permission Tsobject Search Request' model. - - TODO: type model description here. - - Attributes: - ts_object (list of TsObjectSearchInput): A JSON Array of GUIDs and - type of metadata object. - principal (list of UserNameAndIDInput): A JSON array of principal - names or GUIDs. When both are given then id is considered. - include_dependent (bool): When this field is set to true, the API - response includes the permission details for the dependent - objects. - - """ - - # Create a mapping from Model property names to API property names - _names = { - "ts_object": 'tsObject', - "principal": 'principal', - "include_dependent": 'includeDependent' - } - - _optionals = [ - 'principal', - 'include_dependent', - ] - - def __init__(self, - ts_object=None, - principal=APIHelper.SKIP, - include_dependent=False): - """Constructor for the TspublicRestV2SecurityPermissionTsobjectSearchRequest class""" - - # Initialize members of the class - self.ts_object = ts_object - if principal is not APIHelper.SKIP: - self.principal = principal - self.include_dependent = include_dependent - - @classmethod - def from_dictionary(cls, - dictionary): - """Creates an instance of this model from a dictionary - - Args: - dictionary (dictionary): A dictionary representation of the object - as obtained from the deserialization of the server's response. The - keys MUST match property names in the API description. - - Returns: - object: An instance of this structure class. - - """ - if dictionary is None: - return None - - # Extract variables from the dictionary - - ts_object = None - if dictionary.get('tsObject') is not None: - ts_object = [TsObjectSearchInput.from_dictionary(x) for x in dictionary.get('tsObject')] - principal = None - if dictionary.get('principal') is not None: - principal = [UserNameAndIDInput.from_dictionary(x) for x in dictionary.get('principal')] - else: - principal = APIHelper.SKIP - include_dependent = dictionary.get("includeDependent") if dictionary.get("includeDependent") else False - # Return an object of this model - return cls(ts_object, - principal, - include_dependent) diff --git a/Python/thoughtspotpublicrestapi/models/tspublic_rest_v_2_security_share_tsobject_request.py b/Python/thoughtspotpublicrestapi/models/tspublic_rest_v_2_security_share_tsobject_request.py deleted file mode 100644 index 8d5462aef..000000000 --- a/Python/thoughtspotpublicrestapi/models/tspublic_rest_v_2_security_share_tsobject_request.py +++ /dev/null @@ -1,116 +0,0 @@ -# -*- coding: utf-8 -*- - -""" -thoughtspotpublicrestapi - -This file was automatically generated by APIMATIC v3.0 ( - https://www.apimatic.io ). -""" -from thoughtspotpublicrestapi.api_helper import APIHelper - - -class TspublicRestV2SecurityShareTsobjectRequest(object): - - """Implementation of the 'Tspublic Rest V2 Security Share Tsobject Request' model. - - TODO: type model description here. - - Attributes: - mtype (Type18Enum): Type of metadata object. Valid values: - Liveboard|Answer|DataObject|Column - id (list of string): A JSON array of the GUIDs of the objects to be - shared - permission (string): A JSON object with GUIDs of user and user group, - and the type of access privilge. You can provide READ_ONLY or - MODIFY access to the objects. With READ_ONLY access, the user or - user group can view the shared object, whereas MODIFY access - enables users to modify the object. To remove access to a shared - object, you can set the shareMode in the permission string to - NO_ACCESS. Example: {"permissions": - {"e7040a64-7ff1-4ab9-a1b0-f1acac596866": {"shareMode": - "READ_ONLY"}, "f7b8f511-317c-485d-8131-26cf084ef47b": - {"shareMode": "MODIFY"}, - "7a9a6715-e154-431b-baaf-7b58246c13dd":{"shareMode":"NO_ACCESS"}}} - email_id (list of string): The email addresses that should ne notified - when the objects are shared. - notify (bool): When set to true, a notification is sent to the users - after an object is shared. - message (string): The message text to send in the notification email. - include_custom_embed_url (bool): When set to true, ThoughtSpot sends a - link with the host application context to allow users to access - the shared object from their ThoughtSpot embedded instance. - - """ - - # Create a mapping from Model property names to API property names - _names = { - "mtype": 'type', - "id": 'id', - "permission": 'permission', - "email_id": 'emailId', - "notify": 'notify', - "message": 'message', - "include_custom_embed_url": 'includeCustomEmbedUrl' - } - - _optionals = [ - 'email_id', - 'notify', - 'message', - 'include_custom_embed_url', - ] - - def __init__(self, - mtype=None, - id=None, - permission=None, - email_id=None, - notify=True, - message=APIHelper.SKIP, - include_custom_embed_url=False): - """Constructor for the TspublicRestV2SecurityShareTsobjectRequest class""" - - # Initialize members of the class - self.mtype = mtype - self.id = id - self.permission = permission - self.email_id = email_id - self.notify = notify - if message is not APIHelper.SKIP: - self.message = message - self.include_custom_embed_url = include_custom_embed_url - - @classmethod - def from_dictionary(cls, - dictionary): - """Creates an instance of this model from a dictionary - - Args: - dictionary (dictionary): A dictionary representation of the object - as obtained from the deserialization of the server's response. The - keys MUST match property names in the API description. - - Returns: - object: An instance of this structure class. - - """ - if dictionary is None: - return None - - # Extract variables from the dictionary - - mtype = dictionary.get("type") if dictionary.get("type") else None - id = dictionary.get("id") if dictionary.get("id") else None - permission = dictionary.get("permission") if dictionary.get("permission") else None - email_id = dictionary.get("emailId") if dictionary.get("emailId") else None - notify = dictionary.get("notify") if dictionary.get("notify") else True - message = dictionary.get("message") if dictionary.get("message") else APIHelper.SKIP - include_custom_embed_url = dictionary.get("includeCustomEmbedUrl") if dictionary.get("includeCustomEmbedUrl") else False - # Return an object of this model - return cls(mtype, - id, - permission, - email_id, - notify, - message, - include_custom_embed_url) diff --git a/Python/thoughtspotpublicrestapi/models/tspublic_rest_v_2_security_share_visualization_request.py b/Python/thoughtspotpublicrestapi/models/tspublic_rest_v_2_security_share_visualization_request.py deleted file mode 100644 index 5e1ff3297..000000000 --- a/Python/thoughtspotpublicrestapi/models/tspublic_rest_v_2_security_share_visualization_request.py +++ /dev/null @@ -1,105 +0,0 @@ -# -*- coding: utf-8 -*- - -""" -thoughtspotpublicrestapi - -This file was automatically generated by APIMATIC v3.0 ( - https://www.apimatic.io ). -""" -from thoughtspotpublicrestapi.api_helper import APIHelper - - -class TspublicRestV2SecurityShareVisualizationRequest(object): - - """Implementation of the 'Tspublic Rest V2 Security Share Visualization Request' model. - - TODO: type model description here. - - Attributes: - id (string): A JSON array of the GUIDs of the objects to be shared - viz_id (string): The GUID of visualization - principal_id (list of string): The GUID of the users and user groups - with which you want to share the visualization - email_id (list of string): The email addresses that should ne notified - when the objects are shared - notify (bool): When set to true, a notification is sent to the users - after an object is shared. - message (string): The message text to send in the notification email. - include_custom_embed_url (bool): When set to true, ThoughtSpot sends a - link with the host application context to allow users to access - the shared object from their ThoughtSpot embedded instance. - - """ - - # Create a mapping from Model property names to API property names - _names = { - "id": 'id', - "viz_id": 'vizId', - "principal_id": 'principalId', - "email_id": 'emailId', - "notify": 'notify', - "message": 'message', - "include_custom_embed_url": 'includeCustomEmbedUrl' - } - - _optionals = [ - 'email_id', - 'notify', - 'message', - 'include_custom_embed_url', - ] - - def __init__(self, - id=None, - viz_id=None, - principal_id=None, - email_id=None, - notify=True, - message=APIHelper.SKIP, - include_custom_embed_url=False): - """Constructor for the TspublicRestV2SecurityShareVisualizationRequest class""" - - # Initialize members of the class - self.id = id - self.viz_id = viz_id - self.principal_id = principal_id - self.email_id = email_id - self.notify = notify - if message is not APIHelper.SKIP: - self.message = message - self.include_custom_embed_url = include_custom_embed_url - - @classmethod - def from_dictionary(cls, - dictionary): - """Creates an instance of this model from a dictionary - - Args: - dictionary (dictionary): A dictionary representation of the object - as obtained from the deserialization of the server's response. The - keys MUST match property names in the API description. - - Returns: - object: An instance of this structure class. - - """ - if dictionary is None: - return None - - # Extract variables from the dictionary - - id = dictionary.get("id") if dictionary.get("id") else None - viz_id = dictionary.get("vizId") if dictionary.get("vizId") else None - principal_id = dictionary.get("principalId") if dictionary.get("principalId") else None - email_id = dictionary.get("emailId") if dictionary.get("emailId") else None - notify = dictionary.get("notify") if dictionary.get("notify") else True - message = dictionary.get("message") if dictionary.get("message") else APIHelper.SKIP - include_custom_embed_url = dictionary.get("includeCustomEmbedUrl") if dictionary.get("includeCustomEmbedUrl") else False - # Return an object of this model - return cls(id, - viz_id, - principal_id, - email_id, - notify, - message, - include_custom_embed_url) diff --git a/Python/thoughtspotpublicrestapi/models/tspublic_rest_v_2_user_addgroup_request.py b/Python/thoughtspotpublicrestapi/models/tspublic_rest_v_2_user_addgroup_request.py deleted file mode 100644 index 6ff962283..000000000 --- a/Python/thoughtspotpublicrestapi/models/tspublic_rest_v_2_user_addgroup_request.py +++ /dev/null @@ -1,79 +0,0 @@ -# -*- coding: utf-8 -*- - -""" -thoughtspotpublicrestapi - -This file was automatically generated by APIMATIC v3.0 ( - https://www.apimatic.io ). -""" -from thoughtspotpublicrestapi.api_helper import APIHelper -from thoughtspotpublicrestapi.models.group_name_and_id_input import GroupNameAndIDInput - - -class TspublicRestV2UserAddgroupRequest(object): - - """Implementation of the 'Tspublic Rest V2 User Addgroup Request' model. - - TODO: type model description here. - - Attributes: - name (string): User name of the user account - id (string): The GUID of the user account - groups (list of GroupNameAndIDInput): Array of objects of groups that - the user belong to. - - """ - - # Create a mapping from Model property names to API property names - _names = { - "groups": 'groups', - "name": 'name', - "id": 'id' - } - - _optionals = [ - 'name', - 'id', - ] - - def __init__(self, - groups=None, - name=APIHelper.SKIP, - id=APIHelper.SKIP): - """Constructor for the TspublicRestV2UserAddgroupRequest class""" - - # Initialize members of the class - if name is not APIHelper.SKIP: - self.name = name - if id is not APIHelper.SKIP: - self.id = id - self.groups = groups - - @classmethod - def from_dictionary(cls, - dictionary): - """Creates an instance of this model from a dictionary - - Args: - dictionary (dictionary): A dictionary representation of the object - as obtained from the deserialization of the server's response. The - keys MUST match property names in the API description. - - Returns: - object: An instance of this structure class. - - """ - if dictionary is None: - return None - - # Extract variables from the dictionary - - groups = None - if dictionary.get('groups') is not None: - groups = [GroupNameAndIDInput.from_dictionary(x) for x in dictionary.get('groups')] - name = dictionary.get("name") if dictionary.get("name") else APIHelper.SKIP - id = dictionary.get("id") if dictionary.get("id") else APIHelper.SKIP - # Return an object of this model - return cls(groups, - name, - id) diff --git a/Python/thoughtspotpublicrestapi/models/tspublic_rest_v_2_user_addorg_request.py b/Python/thoughtspotpublicrestapi/models/tspublic_rest_v_2_user_addorg_request.py deleted file mode 100644 index 5f1afac21..000000000 --- a/Python/thoughtspotpublicrestapi/models/tspublic_rest_v_2_user_addorg_request.py +++ /dev/null @@ -1,72 +0,0 @@ -# -*- coding: utf-8 -*- - -""" -thoughtspotpublicrestapi - -This file was automatically generated by APIMATIC v3.0 ( - https://www.apimatic.io ). -""" -from thoughtspotpublicrestapi.api_helper import APIHelper -from thoughtspotpublicrestapi.models.user_name_and_id_input import UserNameAndIDInput - - -class TspublicRestV2UserAddorgRequest(object): - - """Implementation of the 'Tspublic Rest V2 User Addorg Request' model. - - TODO: type model description here. - - Attributes: - org_id (int): The ID of the organization. - users (list of UserNameAndIDInput): Array of objects. A JSON array of - name of users or GUIDs of users or both. When both are given then - id is considered - - """ - - # Create a mapping from Model property names to API property names - _names = { - "users": 'users', - "org_id": 'orgId' - } - - _optionals = [ - 'org_id', - ] - - def __init__(self, - users=None, - org_id=APIHelper.SKIP): - """Constructor for the TspublicRestV2UserAddorgRequest class""" - - # Initialize members of the class - if org_id is not APIHelper.SKIP: - self.org_id = org_id - self.users = users - - @classmethod - def from_dictionary(cls, - dictionary): - """Creates an instance of this model from a dictionary - - Args: - dictionary (dictionary): A dictionary representation of the object - as obtained from the deserialization of the server's response. The - keys MUST match property names in the API description. - - Returns: - object: An instance of this structure class. - - """ - if dictionary is None: - return None - - # Extract variables from the dictionary - - users = None - if dictionary.get('users') is not None: - users = [UserNameAndIDInput.from_dictionary(x) for x in dictionary.get('users')] - org_id = dictionary.get("orgId") if dictionary.get("orgId") else APIHelper.SKIP - # Return an object of this model - return cls(users, - org_id) diff --git a/Python/thoughtspotpublicrestapi/models/tspublic_rest_v_2_user_changepassword_request.py b/Python/thoughtspotpublicrestapi/models/tspublic_rest_v_2_user_changepassword_request.py deleted file mode 100644 index 3e9cf1ce4..000000000 --- a/Python/thoughtspotpublicrestapi/models/tspublic_rest_v_2_user_changepassword_request.py +++ /dev/null @@ -1,81 +0,0 @@ -# -*- coding: utf-8 -*- - -""" -thoughtspotpublicrestapi - -This file was automatically generated by APIMATIC v3.0 ( - https://www.apimatic.io ). -""" -from thoughtspotpublicrestapi.api_helper import APIHelper - - -class TspublicRestV2UserChangepasswordRequest(object): - - """Implementation of the 'Tspublic Rest V2 User Changepassword Request' model. - - TODO: type model description here. - - Attributes: - name (string): User name of the user account. - id (string): The GUID of the user account to query. - current_password (string): The current password of the user. - new_password (string): A new password for the user. - - """ - - # Create a mapping from Model property names to API property names - _names = { - "current_password": 'currentPassword', - "new_password": 'newPassword', - "name": 'name', - "id": 'id' - } - - _optionals = [ - 'name', - 'id', - ] - - def __init__(self, - current_password=None, - new_password=None, - name=APIHelper.SKIP, - id=APIHelper.SKIP): - """Constructor for the TspublicRestV2UserChangepasswordRequest class""" - - # Initialize members of the class - if name is not APIHelper.SKIP: - self.name = name - if id is not APIHelper.SKIP: - self.id = id - self.current_password = current_password - self.new_password = new_password - - @classmethod - def from_dictionary(cls, - dictionary): - """Creates an instance of this model from a dictionary - - Args: - dictionary (dictionary): A dictionary representation of the object - as obtained from the deserialization of the server's response. The - keys MUST match property names in the API description. - - Returns: - object: An instance of this structure class. - - """ - if dictionary is None: - return None - - # Extract variables from the dictionary - - current_password = dictionary.get("currentPassword") if dictionary.get("currentPassword") else None - new_password = dictionary.get("newPassword") if dictionary.get("newPassword") else None - name = dictionary.get("name") if dictionary.get("name") else APIHelper.SKIP - id = dictionary.get("id") if dictionary.get("id") else APIHelper.SKIP - # Return an object of this model - return cls(current_password, - new_password, - name, - id) diff --git a/Python/thoughtspotpublicrestapi/models/tspublic_rest_v_2_user_removegroup_request.py b/Python/thoughtspotpublicrestapi/models/tspublic_rest_v_2_user_removegroup_request.py deleted file mode 100644 index 1497d9461..000000000 --- a/Python/thoughtspotpublicrestapi/models/tspublic_rest_v_2_user_removegroup_request.py +++ /dev/null @@ -1,79 +0,0 @@ -# -*- coding: utf-8 -*- - -""" -thoughtspotpublicrestapi - -This file was automatically generated by APIMATIC v3.0 ( - https://www.apimatic.io ). -""" -from thoughtspotpublicrestapi.api_helper import APIHelper -from thoughtspotpublicrestapi.models.group_name_and_id_input import GroupNameAndIDInput - - -class TspublicRestV2UserRemovegroupRequest(object): - - """Implementation of the 'Tspublic Rest V2 User Removegroup Request' model. - - TODO: type model description here. - - Attributes: - name (string): User name of the user account - id (string): The GUID of the user account - groups (list of GroupNameAndIDInput): Array of objects of groups that - the user belong to. - - """ - - # Create a mapping from Model property names to API property names - _names = { - "groups": 'groups', - "name": 'name', - "id": 'id' - } - - _optionals = [ - 'name', - 'id', - ] - - def __init__(self, - groups=None, - name=APIHelper.SKIP, - id=APIHelper.SKIP): - """Constructor for the TspublicRestV2UserRemovegroupRequest class""" - - # Initialize members of the class - if name is not APIHelper.SKIP: - self.name = name - if id is not APIHelper.SKIP: - self.id = id - self.groups = groups - - @classmethod - def from_dictionary(cls, - dictionary): - """Creates an instance of this model from a dictionary - - Args: - dictionary (dictionary): A dictionary representation of the object - as obtained from the deserialization of the server's response. The - keys MUST match property names in the API description. - - Returns: - object: An instance of this structure class. - - """ - if dictionary is None: - return None - - # Extract variables from the dictionary - - groups = None - if dictionary.get('groups') is not None: - groups = [GroupNameAndIDInput.from_dictionary(x) for x in dictionary.get('groups')] - name = dictionary.get("name") if dictionary.get("name") else APIHelper.SKIP - id = dictionary.get("id") if dictionary.get("id") else APIHelper.SKIP - # Return an object of this model - return cls(groups, - name, - id) diff --git a/Python/thoughtspotpublicrestapi/models/tspublic_rest_v_2_user_search_request.py b/Python/thoughtspotpublicrestapi/models/tspublic_rest_v_2_user_search_request.py deleted file mode 100644 index 3475e048a..000000000 --- a/Python/thoughtspotpublicrestapi/models/tspublic_rest_v_2_user_search_request.py +++ /dev/null @@ -1,178 +0,0 @@ -# -*- coding: utf-8 -*- - -""" -thoughtspotpublicrestapi - -This file was automatically generated by APIMATIC v3.0 ( - https://www.apimatic.io ). -""" -from thoughtspotpublicrestapi.api_helper import APIHelper -from thoughtspotpublicrestapi.models.group_name_and_id_input import GroupNameAndIDInput - - -class TspublicRestV2UserSearchRequest(object): - - """Implementation of the 'Tspublic Rest V2 User Search Request' model. - - TODO: type model description here. - - Attributes: - output_fields (list of string): Array of field names that need to be - included in the response - name (string): User name of the user account - id (string): The GUID of the user account - display_name (string): A unique display name string for the user, - usually their first and last name. - visibility (string): Visibility of the user account. The visibility - attribute is set to DEFAULT when creating a user. The DEFAULT - attribute makes a user visible to other users and user groups, and - thus allows them to share objects. - mail (string): email of the user. - groups (list of GroupNameAndIDInput): Array of objects of groups that - the user belong to. - privileges (list of PrivilegeEnum): Privileges assigned to user - account - state (string): Status of user account. acitve or inactive. - notify_on_share (bool): User preference for receiving email - notifications when another ThoughtSpot user shares answers or - pinboards. - show_walk_me (bool): The user preference for revisiting the onboarding - experience. - analyst_onboarding_complete (bool): ThoughtSpot provides an - interactive guided walkthrough to onboard new users. The - onboarding experience leads users through a set of actions to help - users get started and accomplish their tasks quickly. The users - can turn off the Onboarding experience and access it again when - they need assistance with the ThoughtSpot UI. - mtype (string): Type of user. LOCAL_USER indicates that the user is - created locally in the ThoughtSpot system. - - """ - - # Create a mapping from Model property names to API property names - _names = { - "output_fields": 'outputFields', - "name": 'name', - "id": 'id', - "display_name": 'displayName', - "visibility": 'visibility', - "mail": 'mail', - "groups": 'groups', - "privileges": 'privileges', - "state": 'state', - "notify_on_share": 'notifyOnShare', - "show_walk_me": 'showWalkMe', - "analyst_onboarding_complete": 'analystOnboardingComplete', - "mtype": 'type' - } - - _optionals = [ - 'output_fields', - 'name', - 'id', - 'display_name', - 'visibility', - 'mail', - 'groups', - 'privileges', - 'state', - 'notify_on_share', - 'show_walk_me', - 'analyst_onboarding_complete', - 'mtype', - ] - - def __init__(self, - output_fields=APIHelper.SKIP, - name=APIHelper.SKIP, - id=APIHelper.SKIP, - display_name=APIHelper.SKIP, - visibility=APIHelper.SKIP, - mail=APIHelper.SKIP, - groups=APIHelper.SKIP, - privileges=APIHelper.SKIP, - state=APIHelper.SKIP, - notify_on_share=APIHelper.SKIP, - show_walk_me=APIHelper.SKIP, - analyst_onboarding_complete=APIHelper.SKIP, - mtype=APIHelper.SKIP): - """Constructor for the TspublicRestV2UserSearchRequest class""" - - # Initialize members of the class - if output_fields is not APIHelper.SKIP: - self.output_fields = output_fields - if name is not APIHelper.SKIP: - self.name = name - if id is not APIHelper.SKIP: - self.id = id - if display_name is not APIHelper.SKIP: - self.display_name = display_name - if visibility is not APIHelper.SKIP: - self.visibility = visibility - if mail is not APIHelper.SKIP: - self.mail = mail - if groups is not APIHelper.SKIP: - self.groups = groups - if privileges is not APIHelper.SKIP: - self.privileges = privileges - if state is not APIHelper.SKIP: - self.state = state - if notify_on_share is not APIHelper.SKIP: - self.notify_on_share = notify_on_share - if show_walk_me is not APIHelper.SKIP: - self.show_walk_me = show_walk_me - if analyst_onboarding_complete is not APIHelper.SKIP: - self.analyst_onboarding_complete = analyst_onboarding_complete - if mtype is not APIHelper.SKIP: - self.mtype = mtype - - @classmethod - def from_dictionary(cls, - dictionary): - """Creates an instance of this model from a dictionary - - Args: - dictionary (dictionary): A dictionary representation of the object - as obtained from the deserialization of the server's response. The - keys MUST match property names in the API description. - - Returns: - object: An instance of this structure class. - - """ - if dictionary is None: - return None - - # Extract variables from the dictionary - - output_fields = dictionary.get("outputFields") if dictionary.get("outputFields") else APIHelper.SKIP - name = dictionary.get("name") if dictionary.get("name") else APIHelper.SKIP - id = dictionary.get("id") if dictionary.get("id") else APIHelper.SKIP - display_name = dictionary.get("displayName") if dictionary.get("displayName") else APIHelper.SKIP - visibility = dictionary.get("visibility") if dictionary.get("visibility") else APIHelper.SKIP - mail = dictionary.get("mail") if dictionary.get("mail") else APIHelper.SKIP - groups = None - if dictionary.get('groups') is not None: - groups = [GroupNameAndIDInput.from_dictionary(x) for x in dictionary.get('groups')] - else: - groups = APIHelper.SKIP - privileges = dictionary.get("privileges") if dictionary.get("privileges") else APIHelper.SKIP - state = dictionary.get("state") if dictionary.get("state") else APIHelper.SKIP - notify_on_share = dictionary.get("notifyOnShare") if "notifyOnShare" in dictionary.keys() else APIHelper.SKIP - show_walk_me = dictionary.get("showWalkMe") if "showWalkMe" in dictionary.keys() else APIHelper.SKIP - analyst_onboarding_complete = dictionary.get("analystOnboardingComplete") if "analystOnboardingComplete" in dictionary.keys() else APIHelper.SKIP - mtype = dictionary.get("type") if dictionary.get("type") else APIHelper.SKIP - # Return an object of this model - return cls(output_fields, - name, - id, - display_name, - visibility, - mail, - groups, - privileges, - state, - notify_on_share, - show_walk_me, - analyst_onboarding_complete, - mtype) diff --git a/Python/thoughtspotpublicrestapi/models/tspublic_rest_v_2_user_update_request.py b/Python/thoughtspotpublicrestapi/models/tspublic_rest_v_2_user_update_request.py deleted file mode 100644 index ed9e1bbb7..000000000 --- a/Python/thoughtspotpublicrestapi/models/tspublic_rest_v_2_user_update_request.py +++ /dev/null @@ -1,154 +0,0 @@ -# -*- coding: utf-8 -*- - -""" -thoughtspotpublicrestapi - -This file was automatically generated by APIMATIC v3.0 ( - https://www.apimatic.io ). -""" -from thoughtspotpublicrestapi.api_helper import APIHelper -from thoughtspotpublicrestapi.models.group_name_and_id_input import GroupNameAndIDInput - - -class TspublicRestV2UserUpdateRequest(object): - - """Implementation of the 'Tspublic Rest V2 User Update Request' model. - - TODO: type model description here. - - Attributes: - name (string): Name of the user. The username string must be unique. - id (string): The GUID of the user account to query - display_name (string): A unique display name string for the user, - usually their first and last name. - visibility (Visibility1Enum): Visibility of the user account. The - visibility attribute is set to DEFAULT when creating a user. The - DEFAULT attribute makes a user visible to other users and user - groups, and thus allows them to share objects. - mail (string): email of the user. - state (State1Enum): Status of user account. acitve or inactive. - notify_on_share (bool): User preference for receiving email - notifications when another ThoughtSpot user shares answers or - pinboards. - show_walk_me (bool): The user preference for revisiting the onboarding - experience. - analyst_onboarding_complete (bool): ThoughtSpot provides an - interactive guided walkthrough to onboard new users. The - onboarding experience leads users through a set of actions to help - users get started and accomplish their tasks quickly. The users - can turn off the Onboarding experience and access it again when - they need assistance with the ThoughtSpot UI. - mtype (Type9Enum): Type of user. LOCAL_USER indicates that the user is - created locally in the ThoughtSpot system. - groups (list of GroupNameAndIDInput): Array of objects of groups that - the user belong to. - - """ - - # Create a mapping from Model property names to API property names - _names = { - "name": 'name', - "id": 'id', - "display_name": 'displayName', - "visibility": 'visibility', - "mail": 'mail', - "state": 'state', - "notify_on_share": 'notifyOnShare', - "show_walk_me": 'showWalkMe', - "analyst_onboarding_complete": 'analystOnboardingComplete', - "mtype": 'type', - "groups": 'groups' - } - - _optionals = [ - 'name', - 'id', - 'display_name', - 'visibility', - 'mail', - 'state', - 'notify_on_share', - 'show_walk_me', - 'analyst_onboarding_complete', - 'mtype', - 'groups', - ] - - def __init__(self, - name=APIHelper.SKIP, - id=APIHelper.SKIP, - display_name=APIHelper.SKIP, - visibility='DEFAULT', - mail=APIHelper.SKIP, - state='ACTIVE', - notify_on_share=True, - show_walk_me=True, - analyst_onboarding_complete=False, - mtype='LOCAL_USER', - groups=APIHelper.SKIP): - """Constructor for the TspublicRestV2UserUpdateRequest class""" - - # Initialize members of the class - if name is not APIHelper.SKIP: - self.name = name - if id is not APIHelper.SKIP: - self.id = id - if display_name is not APIHelper.SKIP: - self.display_name = display_name - self.visibility = visibility - if mail is not APIHelper.SKIP: - self.mail = mail - self.state = state - self.notify_on_share = notify_on_share - self.show_walk_me = show_walk_me - self.analyst_onboarding_complete = analyst_onboarding_complete - self.mtype = mtype - if groups is not APIHelper.SKIP: - self.groups = groups - - @classmethod - def from_dictionary(cls, - dictionary): - """Creates an instance of this model from a dictionary - - Args: - dictionary (dictionary): A dictionary representation of the object - as obtained from the deserialization of the server's response. The - keys MUST match property names in the API description. - - Returns: - object: An instance of this structure class. - - """ - if dictionary is None: - return None - - # Extract variables from the dictionary - - name = dictionary.get("name") if dictionary.get("name") else APIHelper.SKIP - id = dictionary.get("id") if dictionary.get("id") else APIHelper.SKIP - display_name = dictionary.get("displayName") if dictionary.get("displayName") else APIHelper.SKIP - visibility = dictionary.get("visibility") if dictionary.get("visibility") else 'DEFAULT' - mail = dictionary.get("mail") if dictionary.get("mail") else APIHelper.SKIP - state = dictionary.get("state") if dictionary.get("state") else 'ACTIVE' - notify_on_share = dictionary.get("notifyOnShare") if dictionary.get("notifyOnShare") else True - show_walk_me = dictionary.get("showWalkMe") if dictionary.get("showWalkMe") else True - analyst_onboarding_complete = dictionary.get("analystOnboardingComplete") if dictionary.get("analystOnboardingComplete") else False - mtype = dictionary.get("type") if dictionary.get("type") else 'LOCAL_USER' - groups = None - if dictionary.get('groups') is not None: - groups = [GroupNameAndIDInput.from_dictionary(x) for x in dictionary.get('groups')] - else: - groups = APIHelper.SKIP - # Return an object of this model - return cls(name, - id, - display_name, - visibility, - mail, - state, - notify_on_share, - show_walk_me, - analyst_onboarding_complete, - mtype, - groups) diff --git a/Python/thoughtspotpublicrestapi/models/type_10_enum.py b/Python/thoughtspotpublicrestapi/models/type_10_enum.py deleted file mode 100644 index d5f5f9af2..000000000 --- a/Python/thoughtspotpublicrestapi/models/type_10_enum.py +++ /dev/null @@ -1,26 +0,0 @@ -# -*- coding: utf-8 -*- - -""" -thoughtspotpublicrestapi - -This file was automatically generated by APIMATIC v3.0 ( - https://www.apimatic.io ). -""" - - -class Type10Enum(object): - - """Implementation of the 'Type10' enum. - - Type of user group. LOCAL_GROUP indicates that the user is created locally - in the ThoughtSpot system. - - Attributes: - LOCAL_GROUP: TODO: type description here. - TENANT_GROUP: TODO: type description here. - - """ - - LOCAL_GROUP = 'LOCAL_GROUP' - - TENANT_GROUP = 'TENANT_GROUP' diff --git a/Python/thoughtspotpublicrestapi/models/type_13_enum.py b/Python/thoughtspotpublicrestapi/models/type_13_enum.py deleted file mode 100644 index e2acac1db..000000000 --- a/Python/thoughtspotpublicrestapi/models/type_13_enum.py +++ /dev/null @@ -1,31 +0,0 @@ -# -*- coding: utf-8 -*- - -""" -thoughtspotpublicrestapi - -This file was automatically generated by APIMATIC v3.0 ( - https://www.apimatic.io ). -""" - - -class Type13Enum(object): - - """Implementation of the 'Type13' enum. - - Type of the data object - - Attributes: - LIVEBOARD: TODO: type description here. - DATAOBJECT: TODO: type description here. - COLUMN: TODO: type description here. - JOIN: TODO: type description here. - - """ - - LIVEBOARD = 'LIVEBOARD' - - DATAOBJECT = 'DATAOBJECT' - - COLUMN = 'COLUMN' - - JOIN = 'JOIN' diff --git a/Python/thoughtspotpublicrestapi/models/type_14_enum.py b/Python/thoughtspotpublicrestapi/models/type_14_enum.py deleted file mode 100644 index d1a5f1a0f..000000000 --- a/Python/thoughtspotpublicrestapi/models/type_14_enum.py +++ /dev/null @@ -1,52 +0,0 @@ -# -*- coding: utf-8 -*- - -""" -thoughtspotpublicrestapi - -This file was automatically generated by APIMATIC v3.0 ( - https://www.apimatic.io ). -""" - - -class Type14Enum(object): - - """Implementation of the 'Type14' enum. - - Type of the data connection. - - Attributes: - SNOWFLAKE: TODO: type description here. - AMAZON_REDSHIFT: TODO: type description here. - GOOGLE_BIGQUERY: TODO: type description here. - AZURE_SYNAPSE: TODO: type description here. - TERADATA: TODO: type description here. - STARBURST: TODO: type description here. - SAP_HANA: TODO: type description here. - ORACLE_ADW: TODO: type description here. - DATABRICKS: TODO: type description here. - DENODO: TODO: type description here. - DREMIO: TODO: type description here. - - """ - - SNOWFLAKE = 'SNOWFLAKE' - - AMAZON_REDSHIFT = 'AMAZON_REDSHIFT' - - GOOGLE_BIGQUERY = 'GOOGLE_BIGQUERY' - - AZURE_SYNAPSE = 'AZURE_SYNAPSE' - - TERADATA = 'TERADATA' - - STARBURST = 'STARBURST' - - SAP_HANA = 'SAP_HANA' - - ORACLE_ADW = 'ORACLE_ADW' - - DATABRICKS = 'DATABRICKS' - - DENODO = 'DENODO' - - DREMIO = 'DREMIO' diff --git a/Python/thoughtspotpublicrestapi/models/type_15_enum.py b/Python/thoughtspotpublicrestapi/models/type_15_enum.py deleted file mode 100644 index 914898264..000000000 --- a/Python/thoughtspotpublicrestapi/models/type_15_enum.py +++ /dev/null @@ -1,54 +0,0 @@ -# -*- coding: utf-8 -*- - -""" -thoughtspotpublicrestapi - -This file was automatically generated by APIMATIC v3.0 ( - https://www.apimatic.io ). -""" - - -class Type15Enum(object): - - """Implementation of the 'Type15' enum. - - Type of the connect being searched. Valid values: - SNOWFLAKE|AMAZON_REDSHIFT|GOOGLE_BIGQUERY|AZURE_SYNAPSE|TERADATA|STARBURST| - SAP_HANA|ORACLE_ADW|DATABRICKS|DENODO - - Attributes: - SNOWFLAKE: TODO: type description here. - AMAZON_REDSHIFT: TODO: type description here. - GOOGLE_BIGQUERY: TODO: type description here. - AZURE_SYNAPSE: TODO: type description here. - TERADATA: TODO: type description here. - STARBURST: TODO: type description here. - SAP_HANA: TODO: type description here. - ORACLE_ADW: TODO: type description here. - DATABRICKS: TODO: type description here. - DENODO: TODO: type description here. - DREMIO: TODO: type description here. - - """ - - SNOWFLAKE = 'SNOWFLAKE' - - AMAZON_REDSHIFT = 'AMAZON_REDSHIFT' - - GOOGLE_BIGQUERY = 'GOOGLE_BIGQUERY' - - AZURE_SYNAPSE = 'AZURE_SYNAPSE' - - TERADATA = 'TERADATA' - - STARBURST = 'STARBURST' - - SAP_HANA = 'SAP_HANA' - - ORACLE_ADW = 'ORACLE_ADW' - - DATABRICKS = 'DATABRICKS' - - DENODO = 'DENODO' - - DREMIO = 'DREMIO' diff --git a/Python/thoughtspotpublicrestapi/models/type_16_enum.py b/Python/thoughtspotpublicrestapi/models/type_16_enum.py deleted file mode 100644 index 2840c641e..000000000 --- a/Python/thoughtspotpublicrestapi/models/type_16_enum.py +++ /dev/null @@ -1,31 +0,0 @@ -# -*- coding: utf-8 -*- - -""" -thoughtspotpublicrestapi - -This file was automatically generated by APIMATIC v3.0 ( - https://www.apimatic.io ). -""" - - -class Type16Enum(object): - - """Implementation of the 'type16' enum. - - TODO: type enum description here. - - Attributes: - CSV: TODO: type description here. - XLSX: TODO: type description here. - PDF: TODO: type description here. - PNG: TODO: type description here. - - """ - - CSV = 'CSV' - - XLSX = 'XLSX' - - PDF = 'PDF' - - PNG = 'PNG' diff --git a/Python/thoughtspotpublicrestapi/models/type_18_enum.py b/Python/thoughtspotpublicrestapi/models/type_18_enum.py deleted file mode 100644 index a123ad6af..000000000 --- a/Python/thoughtspotpublicrestapi/models/type_18_enum.py +++ /dev/null @@ -1,31 +0,0 @@ -# -*- coding: utf-8 -*- - -""" -thoughtspotpublicrestapi - -This file was automatically generated by APIMATIC v3.0 ( - https://www.apimatic.io ). -""" - - -class Type18Enum(object): - - """Implementation of the 'Type18' enum. - - Type of metadata object. Valid values: Liveboard|Answer|DataObject|Column - - Attributes: - LIVEBOARD: TODO: type description here. - ANSWER: TODO: type description here. - DATAOBJECT: TODO: type description here. - COLUMN: TODO: type description here. - - """ - - LIVEBOARD = 'LIVEBOARD' - - ANSWER = 'ANSWER' - - DATAOBJECT = 'DATAOBJECT' - - COLUMN = 'COLUMN' diff --git a/Python/thoughtspotpublicrestapi/models/type_1_enum.py b/Python/thoughtspotpublicrestapi/models/type_1_enum.py deleted file mode 100644 index 95889c03d..000000000 --- a/Python/thoughtspotpublicrestapi/models/type_1_enum.py +++ /dev/null @@ -1,25 +0,0 @@ -# -*- coding: utf-8 -*- - -""" -thoughtspotpublicrestapi - -This file was automatically generated by APIMATIC v3.0 ( - https://www.apimatic.io ). -""" - - -class Type1Enum(object): - - """Implementation of the 'Type1' enum. - - Type of access detail provided - - Attributes: - USER: TODO: type description here. - USER_GROUP: TODO: type description here. - - """ - - USER = 'USER' - - USER_GROUP = 'USER_GROUP' diff --git a/Python/thoughtspotpublicrestapi/models/type_2_enum.py b/Python/thoughtspotpublicrestapi/models/type_2_enum.py deleted file mode 100644 index 8bb4416f9..000000000 --- a/Python/thoughtspotpublicrestapi/models/type_2_enum.py +++ /dev/null @@ -1,31 +0,0 @@ -# -*- coding: utf-8 -*- - -""" -thoughtspotpublicrestapi - -This file was automatically generated by APIMATIC v3.0 ( - https://www.apimatic.io ). -""" - - -class Type2Enum(object): - - """Implementation of the 'Type2' enum. - - Type of the metadata objec - - Attributes: - LIVEBOARD: TODO: type description here. - ANSWER: TODO: type description here. - DATAOBJECT: TODO: type description here. - COLUMN: TODO: type description here. - - """ - - LIVEBOARD = 'LIVEBOARD' - - ANSWER = 'ANSWER' - - DATAOBJECT = 'DATAOBJECT' - - COLUMN = 'COLUMN' diff --git a/Python/thoughtspotpublicrestapi/models/type_3_enum.py b/Python/thoughtspotpublicrestapi/models/type_3_enum.py deleted file mode 100644 index b645adf39..000000000 --- a/Python/thoughtspotpublicrestapi/models/type_3_enum.py +++ /dev/null @@ -1,76 +0,0 @@ -# -*- coding: utf-8 -*- - -""" -thoughtspotpublicrestapi - -This file was automatically generated by APIMATIC v3.0 ( - https://www.apimatic.io ). -""" - - -class Type3Enum(object): - - """Implementation of the 'Type3' enum. - - Type of the metadata object being searched. - - Attributes: - ANSWER: TODO: type description here. - LIVEBOARD: TODO: type description here. - DATAOBJECT_ALL: TODO: type description here. - DATAOBJECT_WORKSHEET: TODO: type description here. - DATAOBJECT_TABLE: TODO: type description here. - DATAOBJECT_USER_DEFINED: TODO: type description here. - DATAOBJECT_VIEW: TODO: type description here. - DATAOBJECT_CALENDAR_TABLE: TODO: type description here. - COLUMN_ALL: TODO: type description here. - COLUMN_WORKSHEET: TODO: type description here. - COLUMN_TABLE: TODO: type description here. - COLUMN_USER_DEFINED: TODO: type description here. - COLUMN_VIEW: TODO: type description here. - COLUMN_CALENDAR_TABLE: TODO: type description here. - JOIN: TODO: type description here. - CONNECTION: TODO: type description here. - TAG: TODO: type description here. - USER: TODO: type description here. - USER_GROUP: TODO: type description here. - - """ - - ANSWER = 'ANSWER' - - LIVEBOARD = 'LIVEBOARD' - - DATAOBJECT_ALL = 'DATAOBJECT_ALL' - - DATAOBJECT_WORKSHEET = 'DATAOBJECT_WORKSHEET' - - DATAOBJECT_TABLE = 'DATAOBJECT_TABLE' - - DATAOBJECT_USER_DEFINED = 'DATAOBJECT_USER_DEFINED' - - DATAOBJECT_VIEW = 'DATAOBJECT_VIEW' - - DATAOBJECT_CALENDAR_TABLE = 'DATAOBJECT_CALENDAR_TABLE' - - COLUMN_ALL = 'COLUMN_ALL' - - COLUMN_WORKSHEET = 'COLUMN_WORKSHEET' - - COLUMN_TABLE = 'COLUMN_TABLE' - - COLUMN_USER_DEFINED = 'COLUMN_USER_DEFINED' - - COLUMN_VIEW = 'COLUMN_VIEW' - - COLUMN_CALENDAR_TABLE = 'COLUMN_CALENDAR_TABLE' - - JOIN = 'JOIN' - - CONNECTION = 'CONNECTION' - - TAG = 'TAG' - - USER = 'USER' - - USER_GROUP = 'USER_GROUP' diff --git a/Python/thoughtspotpublicrestapi/models/type_4_enum.py b/Python/thoughtspotpublicrestapi/models/type_4_enum.py deleted file mode 100644 index fe29b3d66..000000000 --- a/Python/thoughtspotpublicrestapi/models/type_4_enum.py +++ /dev/null @@ -1,46 +0,0 @@ -# -*- coding: utf-8 -*- - -""" -thoughtspotpublicrestapi - -This file was automatically generated by APIMATIC v3.0 ( - https://www.apimatic.io ). -""" - - -class Type4Enum(object): - - """Implementation of the 'type4' enum. - - TODO: type enum description here. - - Attributes: - ANSWER: TODO: type description here. - LIVEBOARD: TODO: type description here. - DATAOBJECT: TODO: type description here. - COLUMN: TODO: type description here. - JOIN: TODO: type description here. - CONNECTION: TODO: type description here. - TAG: TODO: type description here. - USER: TODO: type description here. - USER_GROUP: TODO: type description here. - - """ - - ANSWER = 'ANSWER' - - LIVEBOARD = 'LIVEBOARD' - - DATAOBJECT = 'DATAOBJECT' - - COLUMN = 'COLUMN' - - JOIN = 'JOIN' - - CONNECTION = 'CONNECTION' - - TAG = 'TAG' - - USER = 'USER' - - USER_GROUP = 'USER_GROUP' diff --git a/Python/thoughtspotpublicrestapi/models/type_5_enum.py b/Python/thoughtspotpublicrestapi/models/type_5_enum.py deleted file mode 100644 index 1575766de..000000000 --- a/Python/thoughtspotpublicrestapi/models/type_5_enum.py +++ /dev/null @@ -1,76 +0,0 @@ -# -*- coding: utf-8 -*- - -""" -thoughtspotpublicrestapi - -This file was automatically generated by APIMATIC v3.0 ( - https://www.apimatic.io ). -""" - - -class Type5Enum(object): - - """Implementation of the 'type5' enum. - - TODO: type enum description here. - - Attributes: - ANSWER: TODO: type description here. - LIVEBOARD: TODO: type description here. - DATAOBJECT_ALL: TODO: type description here. - DATAOBJECT_WORKSHEET: TODO: type description here. - DATAOBJECT_TABLE: TODO: type description here. - DATAOBJECT_USER_DEFINED: TODO: type description here. - DATAOBJECT_VIEW: TODO: type description here. - DATAOBJECT_CALENDAR_TABLE: TODO: type description here. - COLUMN_ALL: TODO: type description here. - COLUMN_WORKSHEET: TODO: type description here. - COLUMN_TABLE: TODO: type description here. - COLUMN_USER_DEFINED: TODO: type description here. - COLUMN_VIEW: TODO: type description here. - COLUMN_CALENDAR_TABLE: TODO: type description here. - JOIN: TODO: type description here. - CONNECTION: TODO: type description here. - TAG: TODO: type description here. - USER: TODO: type description here. - USER_GROUP: TODO: type description here. - - """ - - ANSWER = 'ANSWER' - - LIVEBOARD = 'LIVEBOARD' - - DATAOBJECT_ALL = 'DATAOBJECT_ALL' - - DATAOBJECT_WORKSHEET = 'DATAOBJECT_WORKSHEET' - - DATAOBJECT_TABLE = 'DATAOBJECT_TABLE' - - DATAOBJECT_USER_DEFINED = 'DATAOBJECT_USER_DEFINED' - - DATAOBJECT_VIEW = 'DATAOBJECT_VIEW' - - DATAOBJECT_CALENDAR_TABLE = 'DATAOBJECT_CALENDAR_TABLE' - - COLUMN_ALL = 'COLUMN_ALL' - - COLUMN_WORKSHEET = 'COLUMN_WORKSHEET' - - COLUMN_TABLE = 'COLUMN_TABLE' - - COLUMN_USER_DEFINED = 'COLUMN_USER_DEFINED' - - COLUMN_VIEW = 'COLUMN_VIEW' - - COLUMN_CALENDAR_TABLE = 'COLUMN_CALENDAR_TABLE' - - JOIN = 'JOIN' - - CONNECTION = 'CONNECTION' - - TAG = 'TAG' - - USER = 'USER' - - USER_GROUP = 'USER_GROUP' diff --git a/Python/thoughtspotpublicrestapi/models/type_6_enum.py b/Python/thoughtspotpublicrestapi/models/type_6_enum.py deleted file mode 100644 index 70eb3d593..000000000 --- a/Python/thoughtspotpublicrestapi/models/type_6_enum.py +++ /dev/null @@ -1,46 +0,0 @@ -# -*- coding: utf-8 -*- - -""" -thoughtspotpublicrestapi - -This file was automatically generated by APIMATIC v3.0 ( - https://www.apimatic.io ). -""" - - -class Type6Enum(object): - - """Implementation of the 'Type6' enum. - - Type of the metadata object being searched. - - Attributes: - ANSWER: TODO: type description here. - LIVEBOARD: TODO: type description here. - DATAOBJECT: TODO: type description here. - COLUMN: TODO: type description here. - JOIN: TODO: type description here. - CONNECTION: TODO: type description here. - TAG: TODO: type description here. - USER: TODO: type description here. - USER_GROUP: TODO: type description here. - - """ - - ANSWER = 'ANSWER' - - LIVEBOARD = 'LIVEBOARD' - - DATAOBJECT = 'DATAOBJECT' - - COLUMN = 'COLUMN' - - JOIN = 'JOIN' - - CONNECTION = 'CONNECTION' - - TAG = 'TAG' - - USER = 'USER' - - USER_GROUP = 'USER_GROUP' diff --git a/Python/thoughtspotpublicrestapi/models/type_7_enum.py b/Python/thoughtspotpublicrestapi/models/type_7_enum.py deleted file mode 100644 index 373eb68c3..000000000 --- a/Python/thoughtspotpublicrestapi/models/type_7_enum.py +++ /dev/null @@ -1,31 +0,0 @@ -# -*- coding: utf-8 -*- - -""" -thoughtspotpublicrestapi - -This file was automatically generated by APIMATIC v3.0 ( - https://www.apimatic.io ). -""" - - -class Type7Enum(object): - - """Implementation of the 'type7' enum. - - TODO: type enum description here. - - Attributes: - LIVEBOARD: TODO: type description here. - ANSWER: TODO: type description here. - DATAOBJECT: TODO: type description here. - COLUMN: TODO: type description here. - - """ - - LIVEBOARD = 'LIVEBOARD' - - ANSWER = 'ANSWER' - - DATAOBJECT = 'DATAOBJECT' - - COLUMN = 'COLUMN' diff --git a/Python/thoughtspotpublicrestapi/models/type_8_enum.py b/Python/thoughtspotpublicrestapi/models/type_8_enum.py deleted file mode 100644 index 17f2ea02f..000000000 --- a/Python/thoughtspotpublicrestapi/models/type_8_enum.py +++ /dev/null @@ -1,34 +0,0 @@ -# -*- coding: utf-8 -*- - -""" -thoughtspotpublicrestapi - -This file was automatically generated by APIMATIC v3.0 ( - https://www.apimatic.io ). -""" - - -class Type8Enum(object): - - """Implementation of the 'type8' enum. - - TODO: type enum description here. - - Attributes: - UNKNOWN: TODO: type description here. - LDAP_USER: TODO: type description here. - SAML_USER: TODO: type description here. - OIDC_USER: TODO: type description here. - LOCAL_USER: TODO: type description here. - - """ - - UNKNOWN = 'UNKNOWN' - - LDAP_USER = 'LDAP_USER' - - SAML_USER = 'SAML_USER' - - OIDC_USER = 'OIDC_USER' - - LOCAL_USER = 'LOCAL_USER' diff --git a/Python/thoughtspotpublicrestapi/models/type_9_enum.py b/Python/thoughtspotpublicrestapi/models/type_9_enum.py deleted file mode 100644 index 116a11f6a..000000000 --- a/Python/thoughtspotpublicrestapi/models/type_9_enum.py +++ /dev/null @@ -1,35 +0,0 @@ -# -*- coding: utf-8 -*- - -""" -thoughtspotpublicrestapi - -This file was automatically generated by APIMATIC v3.0 ( - https://www.apimatic.io ). -""" - - -class Type9Enum(object): - - """Implementation of the 'Type9' enum. - - Type of user. LOCAL_USER indicates that the user is created locally in the - ThoughtSpot system. - - Attributes: - UNKNOWN: TODO: type description here. - LDAP_USER: TODO: type description here. - SAML_USER: TODO: type description here. - OIDC_USER: TODO: type description here. - LOCAL_USER: TODO: type description here. - - """ - - UNKNOWN = 'UNKNOWN' - - LDAP_USER = 'LDAP_USER' - - SAML_USER = 'SAML_USER' - - OIDC_USER = 'OIDC_USER' - - LOCAL_USER = 'LOCAL_USER' diff --git a/Python/thoughtspotpublicrestapi/models/type_enum.py b/Python/thoughtspotpublicrestapi/models/type_enum.py deleted file mode 100644 index 160f80806..000000000 --- a/Python/thoughtspotpublicrestapi/models/type_enum.py +++ /dev/null @@ -1,31 +0,0 @@ -# -*- coding: utf-8 -*- - -""" -thoughtspotpublicrestapi - -This file was automatically generated by APIMATIC v3.0 ( - https://www.apimatic.io ). -""" - - -class TypeEnum(object): - - """Implementation of the 'Type' enum. - - Type of the metadata object - - Attributes: - ANSWER: TODO: type description here. - LIVEBOARD: TODO: type description here. - DATAOBJECT: TODO: type description here. - CONNECTION: TODO: type description here. - - """ - - ANSWER = 'ANSWER' - - LIVEBOARD = 'LIVEBOARD' - - DATAOBJECT = 'DATAOBJECT' - - CONNECTION = 'CONNECTION' diff --git a/Python/thoughtspotpublicrestapi/models/user_name_and_id.py b/Python/thoughtspotpublicrestapi/models/user_name_and_id.py deleted file mode 100644 index 62e3cf8ab..000000000 --- a/Python/thoughtspotpublicrestapi/models/user_name_and_id.py +++ /dev/null @@ -1,69 +0,0 @@ -# -*- coding: utf-8 -*- - -""" -thoughtspotpublicrestapi - -This file was automatically generated by APIMATIC v3.0 ( - https://www.apimatic.io ). -""" -from thoughtspotpublicrestapi.api_helper import APIHelper - - -class UserNameAndID(object): - - """Implementation of the 'UserNameAndID' model. - - TODO: type model description here. - - Attributes: - name (string): Username of the user - id (string): GUID of the user - - """ - - # Create a mapping from Model property names to API property names - _names = { - "name": 'name', - "id": 'id' - } - - _optionals = [ - 'name', - 'id', - ] - - def __init__(self, - name=APIHelper.SKIP, - id=APIHelper.SKIP): - """Constructor for the UserNameAndID class""" - - # Initialize members of the class - if name is not APIHelper.SKIP: - self.name = name - if id is not APIHelper.SKIP: - self.id = id - - @classmethod - def from_dictionary(cls, - dictionary): - """Creates an instance of this model from a dictionary - - Args: - dictionary (dictionary): A dictionary representation of the object - as obtained from the deserialization of the server's response. The - keys MUST match property names in the API description. - - Returns: - object: An instance of this structure class. - - """ - if dictionary is None: - return None - - # Extract variables from the dictionary - - name = dictionary.get("name") if dictionary.get("name") else APIHelper.SKIP - id = dictionary.get("id") if dictionary.get("id") else APIHelper.SKIP - # Return an object of this model - return cls(name, - id) diff --git a/Python/thoughtspotpublicrestapi/models/user_name_and_id_input.py b/Python/thoughtspotpublicrestapi/models/user_name_and_id_input.py deleted file mode 100644 index 4c5815343..000000000 --- a/Python/thoughtspotpublicrestapi/models/user_name_and_id_input.py +++ /dev/null @@ -1,69 +0,0 @@ -# -*- coding: utf-8 -*- - -""" -thoughtspotpublicrestapi - -This file was automatically generated by APIMATIC v3.0 ( - https://www.apimatic.io ). -""" -from thoughtspotpublicrestapi.api_helper import APIHelper - - -class UserNameAndIDInput(object): - - """Implementation of the 'UserNameAndIDInput' model. - - TODO: type model description here. - - Attributes: - name (string): Username of the user - id (string): GUID of the user - - """ - - # Create a mapping from Model property names to API property names - _names = { - "name": 'name', - "id": 'id' - } - - _optionals = [ - 'name', - 'id', - ] - - def __init__(self, - name=APIHelper.SKIP, - id=APIHelper.SKIP): - """Constructor for the UserNameAndIDInput class""" - - # Initialize members of the class - if name is not APIHelper.SKIP: - self.name = name - if id is not APIHelper.SKIP: - self.id = id - - @classmethod - def from_dictionary(cls, - dictionary): - """Creates an instance of this model from a dictionary - - Args: - dictionary (dictionary): A dictionary representation of the object - as obtained from the deserialization of the server's response. The - keys MUST match property names in the API description. - - Returns: - object: An instance of this structure class. - - """ - if dictionary is None: - return None - - # Extract variables from the dictionary - - name = dictionary.get("name") if dictionary.get("name") else APIHelper.SKIP - id = dictionary.get("id") if dictionary.get("id") else APIHelper.SKIP - # Return an object of this model - return cls(name, - id) diff --git a/Python/thoughtspotpublicrestapi/models/user_response.py b/Python/thoughtspotpublicrestapi/models/user_response.py deleted file mode 100644 index 0be044f46..000000000 --- a/Python/thoughtspotpublicrestapi/models/user_response.py +++ /dev/null @@ -1,329 +0,0 @@ -# -*- coding: utf-8 -*- - -""" -thoughtspotpublicrestapi - -This file was automatically generated by APIMATIC v3.0 ( - https://www.apimatic.io ). -""" -from thoughtspotpublicrestapi.api_helper import APIHelper -from thoughtspotpublicrestapi.models.group_name_and_id import GroupNameAndID -from thoughtspotpublicrestapi.models.org_type import OrgType -from thoughtspotpublicrestapi.models.user_name_and_id import UserNameAndID - - -class UserResponse(object): - - """Implementation of the 'UserResponse' model. - - TODO: type model description here. - - Attributes: - name (string): Username of the user account - display_name (string): Display name of the user account - id (string): GUID of the user account - visibility (string): Visibility of the user account - mail (string): Email of the user account - groups (list of GroupNameAndID): Name of the group to which user - account is added - privileges (list of string): Privileges assigned to user account - orgs (list of OrgType): The organizations that user belongs to - tags (list of string): Tags assigned to the user - state (string): Indicates if the user account is active or inactive - notify_on_share (bool): Indicates if the email should be sent when - object is shared with the user - show_walk_me (bool): Indicates if the walk me should be shown when - logging in - analyst_onboarding_complete (bool): Indicates if the onboarding is - completed for the user - first_login (int): Indicates if the use is logging in for the first - time - welcome_email_sent (bool): Indicates if the welcome email is sent to - email associated with the user account - is_deleted (bool): Indicates if the user account is deleted - is_hidden (bool): Indicates if the user account is hidden - is_external (bool): Indicates if the user account is from external - system isDeprecated - is_deprecated (bool): TODO: type description here. - complete (bool): Indicates if the all the properties of user account - is provided - is_super_user (bool): Indicates if the user account is super user - is_system_principal (bool): Indicates if the user account is system - principal - mtype (string): Indicates the type of user account - parenttype (string): Indicates the type of parent object - tenant_id (string): Tenant id associated with the user account - index_version (float): TODO: type description here. - generation_num (float): TODO: type description here. - created (float): Date and time when user account was created - modified (float): Date and time of last modification of user account - author (UserNameAndID): TODO: type description here. - modified_by (UserNameAndID): TODO: type description here. - owner (UserNameAndID): TODO: type description here. - - """ - - # Create a mapping from Model property names to API property names - _names = { - "name": 'name', - "display_name": 'displayName', - "id": 'id', - "visibility": 'visibility', - "mail": 'mail', - "groups": 'groups', - "privileges": 'privileges', - "orgs": 'orgs', - "tags": 'tags', - "state": 'state', - "notify_on_share": 'notifyOnShare', - "show_walk_me": 'showWalkMe', - "analyst_onboarding_complete": 'analystOnboardingComplete', - "first_login": 'firstLogin', - "welcome_email_sent": 'welcomeEmailSent', - "is_deleted": 'isDeleted', - "is_hidden": 'isHidden', - "is_external": 'isExternal', - "is_deprecated": 'isDeprecated', - "complete": 'complete', - "is_super_user": 'isSuperUser', - "is_system_principal": 'isSystemPrincipal', - "mtype": 'type', - "parenttype": 'parenttype', - "tenant_id": 'tenantId', - "index_version": 'indexVersion', - "generation_num": 'generationNum', - "created": 'created', - "modified": 'modified', - "author": 'author', - "modified_by": 'modifiedBy', - "owner": 'owner' - } - - _optionals = [ - 'name', - 'display_name', - 'id', - 'visibility', - 'mail', - 'groups', - 'privileges', - 'orgs', - 'tags', - 'state', - 'notify_on_share', - 'show_walk_me', - 'analyst_onboarding_complete', - 'first_login', - 'welcome_email_sent', - 'is_deleted', - 'is_hidden', - 'is_external', - 'is_deprecated', - 'complete', - 'is_super_user', - 'is_system_principal', - 'mtype', - 'parenttype', - 'tenant_id', - 'index_version', - 'generation_num', - 'created', - 'modified', - 'author', - 'modified_by', - 'owner', - ] - - def __init__(self, - name=APIHelper.SKIP, - display_name=APIHelper.SKIP, - id=APIHelper.SKIP, - visibility=APIHelper.SKIP, - mail=APIHelper.SKIP, - groups=APIHelper.SKIP, - privileges=APIHelper.SKIP, - orgs=APIHelper.SKIP, - tags=APIHelper.SKIP, - state=APIHelper.SKIP, - notify_on_share=APIHelper.SKIP, - show_walk_me=APIHelper.SKIP, - analyst_onboarding_complete=APIHelper.SKIP, - first_login=APIHelper.SKIP, - welcome_email_sent=APIHelper.SKIP, - is_deleted=APIHelper.SKIP, - is_hidden=APIHelper.SKIP, - is_external=APIHelper.SKIP, - is_deprecated=APIHelper.SKIP, - complete=APIHelper.SKIP, - is_super_user=APIHelper.SKIP, - is_system_principal=APIHelper.SKIP, - mtype=APIHelper.SKIP, - parenttype=APIHelper.SKIP, - tenant_id=APIHelper.SKIP, - index_version=APIHelper.SKIP, - generation_num=APIHelper.SKIP, - created=APIHelper.SKIP, - modified=APIHelper.SKIP, - author=APIHelper.SKIP, - modified_by=APIHelper.SKIP, - owner=APIHelper.SKIP): - """Constructor for the UserResponse class""" - - # Initialize members of the class - if name is not APIHelper.SKIP: - self.name = name - if display_name is not APIHelper.SKIP: - self.display_name = display_name - if id is not APIHelper.SKIP: - self.id = id - if visibility is not APIHelper.SKIP: - self.visibility = visibility - if mail is not APIHelper.SKIP: - self.mail = mail - if groups is not APIHelper.SKIP: - self.groups = groups - if privileges is not APIHelper.SKIP: - self.privileges = privileges - if orgs is not APIHelper.SKIP: - self.orgs = orgs - if tags is not APIHelper.SKIP: - self.tags = tags - if state is not APIHelper.SKIP: - self.state = state - if notify_on_share is not APIHelper.SKIP: - self.notify_on_share = notify_on_share - if show_walk_me is not APIHelper.SKIP: - self.show_walk_me = show_walk_me - if analyst_onboarding_complete is not APIHelper.SKIP: - self.analyst_onboarding_complete = analyst_onboarding_complete - if first_login is not APIHelper.SKIP: - self.first_login = first_login - if welcome_email_sent is not APIHelper.SKIP: - self.welcome_email_sent = welcome_email_sent - if is_deleted is not APIHelper.SKIP: - self.is_deleted = is_deleted - if is_hidden is not APIHelper.SKIP: - self.is_hidden = is_hidden - if is_external is not APIHelper.SKIP: - self.is_external = is_external - if is_deprecated is not APIHelper.SKIP: - self.is_deprecated = is_deprecated - if complete is not APIHelper.SKIP: - self.complete = complete - if is_super_user is not APIHelper.SKIP: - self.is_super_user = is_super_user - if is_system_principal is not APIHelper.SKIP: - self.is_system_principal = is_system_principal - if mtype is not APIHelper.SKIP: - self.mtype = mtype - if parenttype is not APIHelper.SKIP: - self.parenttype = parenttype - if tenant_id is not APIHelper.SKIP: - self.tenant_id = tenant_id - if index_version is not APIHelper.SKIP: - self.index_version = index_version - if generation_num is not APIHelper.SKIP: - self.generation_num = generation_num - if created is not APIHelper.SKIP: - self.created = created - if modified is not APIHelper.SKIP: - self.modified = modified - if author is not APIHelper.SKIP: - self.author = author - if modified_by is not APIHelper.SKIP: - self.modified_by = modified_by - if owner is not APIHelper.SKIP: - self.owner = owner - - @classmethod - def from_dictionary(cls, - dictionary): - """Creates an instance of this model from a dictionary - - Args: - dictionary (dictionary): A dictionary representation of the object - as obtained from the deserialization of the server's response. The - keys MUST match property names in the API description. - - Returns: - object: An instance of this structure class. - - """ - if dictionary is None: - return None - - # Extract variables from the dictionary - - name = dictionary.get("name") if dictionary.get("name") else APIHelper.SKIP - display_name = dictionary.get("displayName") if dictionary.get("displayName") else APIHelper.SKIP - id = dictionary.get("id") if dictionary.get("id") else APIHelper.SKIP - visibility = dictionary.get("visibility") if dictionary.get("visibility") else APIHelper.SKIP - mail = dictionary.get("mail") if dictionary.get("mail") else APIHelper.SKIP - groups = None - if dictionary.get('groups') is not None: - groups = [GroupNameAndID.from_dictionary(x) for x in dictionary.get('groups')] - else: - groups = APIHelper.SKIP - privileges = dictionary.get("privileges") if dictionary.get("privileges") else APIHelper.SKIP - orgs = None - if dictionary.get('orgs') is not None: - orgs = [OrgType.from_dictionary(x) for x in dictionary.get('orgs')] - else: - orgs = APIHelper.SKIP - tags = dictionary.get("tags") if dictionary.get("tags") else APIHelper.SKIP - state = dictionary.get("state") if dictionary.get("state") else APIHelper.SKIP - notify_on_share = dictionary.get("notifyOnShare") if "notifyOnShare" in dictionary.keys() else APIHelper.SKIP - show_walk_me = dictionary.get("showWalkMe") if "showWalkMe" in dictionary.keys() else APIHelper.SKIP - analyst_onboarding_complete = dictionary.get("analystOnboardingComplete") if "analystOnboardingComplete" in dictionary.keys() else APIHelper.SKIP - first_login = dictionary.get("firstLogin") if dictionary.get("firstLogin") else APIHelper.SKIP - welcome_email_sent = dictionary.get("welcomeEmailSent") if "welcomeEmailSent" in dictionary.keys() else APIHelper.SKIP - is_deleted = dictionary.get("isDeleted") if "isDeleted" in dictionary.keys() else APIHelper.SKIP - is_hidden = dictionary.get("isHidden") if "isHidden" in dictionary.keys() else APIHelper.SKIP - is_external = dictionary.get("isExternal") if "isExternal" in dictionary.keys() else APIHelper.SKIP - is_deprecated = dictionary.get("isDeprecated") if "isDeprecated" in dictionary.keys() else APIHelper.SKIP - complete = dictionary.get("complete") if "complete" in dictionary.keys() else APIHelper.SKIP - is_super_user = dictionary.get("isSuperUser") if "isSuperUser" in dictionary.keys() else APIHelper.SKIP - is_system_principal = dictionary.get("isSystemPrincipal") if "isSystemPrincipal" in dictionary.keys() else APIHelper.SKIP - mtype = dictionary.get("type") if dictionary.get("type") else APIHelper.SKIP - parenttype = dictionary.get("parenttype") if dictionary.get("parenttype") else APIHelper.SKIP - tenant_id = dictionary.get("tenantId") if dictionary.get("tenantId") else APIHelper.SKIP - index_version = dictionary.get("indexVersion") if dictionary.get("indexVersion") else APIHelper.SKIP - generation_num = dictionary.get("generationNum") if dictionary.get("generationNum") else APIHelper.SKIP - created = dictionary.get("created") if dictionary.get("created") else APIHelper.SKIP - modified = dictionary.get("modified") if dictionary.get("modified") else APIHelper.SKIP - author = UserNameAndID.from_dictionary(dictionary.get('author')) if 'author' in dictionary.keys() else APIHelper.SKIP - modified_by = UserNameAndID.from_dictionary(dictionary.get('modifiedBy')) if 'modifiedBy' in dictionary.keys() else APIHelper.SKIP - owner = UserNameAndID.from_dictionary(dictionary.get('owner')) if 'owner' in dictionary.keys() else APIHelper.SKIP - # Return an object of this model - return cls(name, - display_name, - id, - visibility, - mail, - groups, - privileges, - orgs, - tags, - state, - notify_on_share, - show_walk_me, - analyst_onboarding_complete, - first_login, - welcome_email_sent, - is_deleted, - is_hidden, - is_external, - is_deprecated, - complete, - is_super_user, - is_system_principal, - mtype, - parenttype, - tenant_id, - index_version, - generation_num, - created, - modified, - author, - modified_by, - owner) diff --git a/Python/thoughtspotpublicrestapi/models/visibility_1_enum.py b/Python/thoughtspotpublicrestapi/models/visibility_1_enum.py deleted file mode 100644 index fe01b1316..000000000 --- a/Python/thoughtspotpublicrestapi/models/visibility_1_enum.py +++ /dev/null @@ -1,30 +0,0 @@ -# -*- coding: utf-8 -*- - -""" -thoughtspotpublicrestapi - -This file was automatically generated by APIMATIC v3.0 ( - https://www.apimatic.io ). -""" - - -class Visibility1Enum(object): - - """Implementation of the 'Visibility1' enum. - - Visibility of the user account. The visibility attribute is set to DEFAULT - when creating a user. The DEFAULT attribute makes a user visible to other - users and user groups, and thus allows them to share objects. - - Attributes: - DEFAULT: TODO: type description here. - NON_SHARABLE: TODO: type description here. - SHARABLE: TODO: type description here. - - """ - - DEFAULT = 'DEFAULT' - - NON_SHARABLE = 'NON_SHARABLE' - - SHARABLE = 'SHARABLE' diff --git a/Python/thoughtspotpublicrestapi/models/visibility_2_enum.py b/Python/thoughtspotpublicrestapi/models/visibility_2_enum.py deleted file mode 100644 index 10eea8f1d..000000000 --- a/Python/thoughtspotpublicrestapi/models/visibility_2_enum.py +++ /dev/null @@ -1,30 +0,0 @@ -# -*- coding: utf-8 -*- - -""" -thoughtspotpublicrestapi - -This file was automatically generated by APIMATIC v3.0 ( - https://www.apimatic.io ). -""" - - -class Visibility2Enum(object): - - """Implementation of the 'Visibility2' enum. - - Visibility of the user group. The visibility attribute is set to DEFAULT. - The DEFAULT attribute makes the user group visible for other user groups - and allows them to share objects. - - Attributes: - DEFAULT: TODO: type description here. - NON_SHARABLE: TODO: type description here. - SHARABLE: TODO: type description here. - - """ - - DEFAULT = 'DEFAULT' - - NON_SHARABLE = 'NON_SHARABLE' - - SHARABLE = 'SHARABLE' diff --git a/Python/thoughtspotpublicrestapi/models/visibility_enum.py b/Python/thoughtspotpublicrestapi/models/visibility_enum.py deleted file mode 100644 index 55b69b402..000000000 --- a/Python/thoughtspotpublicrestapi/models/visibility_enum.py +++ /dev/null @@ -1,28 +0,0 @@ -# -*- coding: utf-8 -*- - -""" -thoughtspotpublicrestapi - -This file was automatically generated by APIMATIC v3.0 ( - https://www.apimatic.io ). -""" - - -class VisibilityEnum(object): - - """Implementation of the 'visibility' enum. - - TODO: type enum description here. - - Attributes: - DEFAULT: TODO: type description here. - NON_SHARABLE: TODO: type description here. - SHARABLE: TODO: type description here. - - """ - - DEFAULT = 'DEFAULT' - - NON_SHARABLE = 'NON_SHARABLE' - - SHARABLE = 'SHARABLE' diff --git a/Python/thoughtspotpublicrestapi/models/viz_type.py b/Python/thoughtspotpublicrestapi/models/viz_type.py deleted file mode 100644 index bd157a8c8..000000000 --- a/Python/thoughtspotpublicrestapi/models/viz_type.py +++ /dev/null @@ -1,77 +0,0 @@ -# -*- coding: utf-8 -*- - -""" -thoughtspotpublicrestapi - -This file was automatically generated by APIMATIC v3.0 ( - https://www.apimatic.io ). -""" -from thoughtspotpublicrestapi.api_helper import APIHelper - - -class VizType(object): - - """Implementation of the 'VizType' model. - - TODO: type model description here. - - Attributes: - name (string): The name of the visualization - id (string): The GUID of the visualization - query_sql (string): SQL query associated with the visualization - - """ - - # Create a mapping from Model property names to API property names - _names = { - "name": 'name', - "id": 'id', - "query_sql": 'querySql' - } - - _optionals = [ - 'name', - 'id', - 'query_sql', - ] - - def __init__(self, - name=APIHelper.SKIP, - id=APIHelper.SKIP, - query_sql=APIHelper.SKIP): - """Constructor for the VizType class""" - - # Initialize members of the class - if name is not APIHelper.SKIP: - self.name = name - if id is not APIHelper.SKIP: - self.id = id - if query_sql is not APIHelper.SKIP: - self.query_sql = query_sql - - @classmethod - def from_dictionary(cls, - dictionary): - """Creates an instance of this model from a dictionary - - Args: - dictionary (dictionary): A dictionary representation of the object - as obtained from the deserialization of the server's response. The - keys MUST match property names in the API description. - - Returns: - object: An instance of this structure class. - - """ - if dictionary is None: - return None - - # Extract variables from the dictionary - - name = dictionary.get("name") if dictionary.get("name") else APIHelper.SKIP - id = dictionary.get("id") if dictionary.get("id") else APIHelper.SKIP - query_sql = dictionary.get("querySql") if dictionary.get("querySql") else APIHelper.SKIP - # Return an object of this model - return cls(name, - id, - query_sql) diff --git a/Python/thoughtspotpublicrestapi/thoughtspotpublicrestapi_client.py b/Python/thoughtspotpublicrestapi/thoughtspotpublicrestapi_client.py deleted file mode 100644 index f1734625c..000000000 --- a/Python/thoughtspotpublicrestapi/thoughtspotpublicrestapi_client.py +++ /dev/null @@ -1,137 +0,0 @@ -# -*- coding: utf-8 -*- - -""" -thoughtspotpublicrestapi - -This file was automatically generated by APIMATIC v3.0 ( - https://www.apimatic.io ). -""" - -from apimatic_core.configurations.global_configuration import GlobalConfiguration -from apimatic_core.decorators.lazy_property import LazyProperty -from thoughtspotpublicrestapi.configuration import Configuration -from thoughtspotpublicrestapi.controllers.base_controller import BaseController -from thoughtspotpublicrestapi.configuration import Environment -from thoughtspotpublicrestapi.http.auth.o_auth_2 import OAuth2 -from thoughtspotpublicrestapi.controllers.user_controller import UserController -from thoughtspotpublicrestapi.controllers.group_controller\ - import GroupController -from thoughtspotpublicrestapi.controllers.metadata_controller\ - import MetadataController -from thoughtspotpublicrestapi.controllers.database_controller\ - import DatabaseController -from thoughtspotpublicrestapi.controllers.connection_controller\ - import ConnectionController -from thoughtspotpublicrestapi.controllers.data_controller import DataController -from thoughtspotpublicrestapi.controllers.logs_controller import LogsController -from thoughtspotpublicrestapi.controllers.custom_actions_controller\ - import CustomActionsController -from thoughtspotpublicrestapi.controllers.security_controller\ - import SecurityController -from thoughtspotpublicrestapi.controllers.org_controller import OrgController -from thoughtspotpublicrestapi.controllers.session_controller\ - import SessionController -from thoughtspotpublicrestapi.controllers.admin_controller\ - import AdminController -from thoughtspotpublicrestapi.controllers.report_controller\ - import ReportController -from thoughtspotpublicrestapi.controllers.materialization_controller\ - import MaterializationController - - -class ThoughtspotpublicrestapiClient(object): - - @LazyProperty - def user(self): - return UserController(self.global_configuration) - - @LazyProperty - def group(self): - return GroupController(self.global_configuration) - - @LazyProperty - def metadata(self): - return MetadataController(self.global_configuration) - - @LazyProperty - def database(self): - return DatabaseController(self.global_configuration) - - @LazyProperty - def connection(self): - return ConnectionController(self.global_configuration) - - @LazyProperty - def data(self): - return DataController(self.global_configuration) - - @LazyProperty - def logs(self): - return LogsController(self.global_configuration) - - @LazyProperty - def custom_actions(self): - return CustomActionsController(self.global_configuration) - - @LazyProperty - def security(self): - return SecurityController(self.global_configuration) - - @LazyProperty - def org(self): - return OrgController(self.global_configuration) - - @LazyProperty - def session(self): - return SessionController(self.global_configuration) - - @LazyProperty - def admin(self): - return AdminController(self.global_configuration) - - @LazyProperty - def report(self): - return ReportController(self.global_configuration) - - @LazyProperty - def materialization(self): - return MaterializationController(self.global_configuration) - - def __init__(self, http_client_instance=None, - override_http_client_configuration=False, http_call_back=None, - timeout=60, max_retries=0, backoff_factor=2, - retry_statuses=[408, 413, 429, 500, 502, 503, 504, 521, 522, 524, 408, 413, 429, 500, 502, 503, 504, 521, 522, 524], - retry_methods=['GET', 'PUT', 'GET', 'PUT'], - environment=Environment.PRODUCTION, - base_url='https://localhost:443', access_token='', - skip_ssl_cert_verification=False, config=None): - if config is None: - self.config = Configuration( - http_client_instance=http_client_instance, - override_http_client_configuration=override_http_client_configuration, - http_call_back=http_call_back, - timeout=timeout, - max_retries=max_retries, - backoff_factor=backoff_factor, - retry_statuses=retry_statuses, - retry_methods=retry_methods, - environment=environment, - base_url=base_url, - access_token=access_token, - skip_ssl_cert_verification=skip_ssl_cert_verification) - else: - self.config = config - - self.global_configuration = GlobalConfiguration(self.config)\ - .global_errors(BaseController.global_errors())\ - .base_uri_executor(self.config.get_base_uri)\ - .user_agent(BaseController.user_agent(), BaseController.user_agent_parameters()) - self.initialize_auth_managers(self.global_configuration) - - self.global_configuration = self.global_configuration.auth_managers(self.auth_managers) - - def initialize_auth_managers(self, global_config): - http_client_config = global_config.get_http_client_configuration() - self.auth_managers = { key: None for key in ['global']} - self.auth_managers['global'] = OAuth2(http_client_config.access_token) - return self.auth_managers diff --git a/Python/thoughtspotpublicrestapi/utilities/__init__.py b/Python/thoughtspotpublicrestapi/utilities/__init__.py deleted file mode 100644 index c66129ab8..000000000 --- a/Python/thoughtspotpublicrestapi/utilities/__init__.py +++ /dev/null @@ -1,3 +0,0 @@ -__all__ = [ - 'file_wrapper', -] diff --git a/Python/thoughtspotpublicrestapi/utilities/file_wrapper.py b/Python/thoughtspotpublicrestapi/utilities/file_wrapper.py deleted file mode 100644 index 80b56114a..000000000 --- a/Python/thoughtspotpublicrestapi/utilities/file_wrapper.py +++ /dev/null @@ -1,17 +0,0 @@ -# -*- coding: utf-8 -*- - -""" -thoughtspotpublicrestapi - -This file was automatically generated by APIMATIC v3.0 ( - https://www.apimatic.io ). -""" - -from apimatic_core.types.file_wrapper import FileWrapper - - -class FileWrapper(FileWrapper): - """A wrapper to allow passing in content type for file uploads.""" - - def __init__(self, file, content_type='application/octet-stream'): - super().__init__(file, content_type) diff --git a/Python/tox.ini b/Python/tox.ini deleted file mode 100644 index 6d6285799..000000000 --- a/Python/tox.ini +++ /dev/null @@ -1,7 +0,0 @@ -[tox] -envlist = {py37, py38, py39} - -[testenv] -commands = pytest -deps = - pytest diff --git a/README.md b/README.md index 454734a79..86d8d6a86 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,7 @@ -# rest-api-sdk -ThoughtSpot REST API SDK +# ThoughtSpot REST API SDK +Repository for automatically generated REST API SDK projects. TypeScript and Java SDKs are currently available, with more SDKs planned in the near future.
+The source code for the SDKs is located in the `sdks` directory -`api-spec` directory has the openapi specs. +For Python, please see the library at https://github.com/thoughtspot/thoughtspot_rest_api_v1_python, which has implementations of V1 and V2.0 REST API and can be installed via pip from PyPi. + +`api-spec` directory does has the current openapi specs for V2.0 REST API. diff --git a/Typescript/.editorconfig b/Typescript/.editorconfig deleted file mode 100644 index 63187fe16..000000000 --- a/Typescript/.editorconfig +++ /dev/null @@ -1,15 +0,0 @@ -# http://editorconfig.org -root = true - -[*] -charset = utf-8 -end_of_line = lf -indent_size = 2 -indent_style = space -insert_final_newline = true -max_line_length = 80 -trim_trailing_whitespace = true - -[*.md] -max_line_length = 0 -trim_trailing_whitespace = false diff --git a/Typescript/.gitignore b/Typescript/.gitignore deleted file mode 100644 index 9f9eafe6a..000000000 --- a/Typescript/.gitignore +++ /dev/null @@ -1,5 +0,0 @@ -*.log -.DS_Store -node_modules -dist -coverage \ No newline at end of file diff --git a/Typescript/LICENSE b/Typescript/LICENSE deleted file mode 100644 index c571aa529..000000000 --- a/Typescript/LICENSE +++ /dev/null @@ -1,28 +0,0 @@ -License: -======== -The MIT License (MIT) -http://opensource.org/licenses/MIT - -Copyright (c) 2014 - 2022 APIMATIC Limited - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. - -Trade Mark: -========== -APIMATIC is a trade mark for APIMATIC Limited \ No newline at end of file diff --git a/Typescript/README.md b/Typescript/README.md deleted file mode 100644 index ed92b28ff..000000000 --- a/Typescript/README.md +++ /dev/null @@ -1,83 +0,0 @@ - -# Getting Started with ThoughtSpot Public REST API - -## Install the Package - -Run the following command from your project directory to install the package from npm: - -```ts -npm install thoughtspot@rest-api-sdk@1.13.1 -``` - -## Initialize the API Client - -**_Note:_** Documentation for the client can be found [here.](doc/client.md) - -The following parameters are configurable for the API Client: - -| Parameter | Type | Description | -| --- | --- | --- | -| `baseUrl` | `string` | *Default*: `'https://localhost:443'` | -| `environment` | Environment | The API environment.
**Default: `Environment.Production`** | -| `timeout` | `number` | Timeout for API calls.
*Default*: `0` | -| `httpClientOptions` | `Partial` | Stable configurable http client options. | -| `unstableHttpClientOptions` | `any` | Unstable configurable http client options. | -| `accessToken` | `string` | The OAuth 2.0 Access Token to use for API requests. | - -### HttpClientOptions - -| Parameter | Type | Description | -| --- | --- | --- | -| `timeout` | `number` | Timeout in milliseconds. | -| `httpAgent` | `any` | Custom http agent to be used when performing http requests. | -| `httpsAgent` | `any` | Custom https agent to be used when performing http requests. | -| `retryConfig` | `Partial` | Configurations to retry requests. | - -### RetryConfiguration - -| Parameter | Type | Description | -| --- | --- | --- | -| `maxNumberOfRetries` | `number` | Maximum number of retries.
*Default*: `0` | -| `retryOnTimeout` | `boolean` | Whether to retry on request timeout.
*Default*: `true` | -| `retryInterval` | `number` | Interval before next retry. Used in calculation of wait time for next request in case of failure.
*Default*: `1` | -| `maximumRetryWaitTime` | `number` | Overall wait time for the requests getting retried.
*Default*: `0` | -| `backoffFactor` | `number` | Used in calculation of wait time for next request in case of failure.
*Default*: `2` | -| `httpStatusCodesToRetry` | `number[]` | Http status codes to retry against.
*Default*: `[408, 413, 429, 500, 502, 503, 504, 521, 522, 524, 408, 413, 429, 500, 502, 503, 504, 521, 522, 524]` | -| `httpMethodsToRetry` | `HttpMethod[]` | Http methods to retry against.
*Default*: `['GET', 'PUT', 'GET', 'PUT']` | - -The API client can be initialized as follows: - -```ts -const client = new Client({ - timeout: 0, - environment: Environment.Production, - accessToken: 'AccessToken', -}) -``` - -## Authorization - -This API uses `OAuth 2 Bearer token`. - -## List of APIs - -* [User](doc/controllers/user.md) -* [Group](doc/controllers/group.md) -* [Metadata](doc/controllers/metadata.md) -* [Database](doc/controllers/database.md) -* [Connection](doc/controllers/connection.md) -* [Data](doc/controllers/data.md) -* [Logs](doc/controllers/logs.md) -* [Custom Actions](doc/controllers/custom-actions.md) -* [Security](doc/controllers/security.md) -* [Org](doc/controllers/org.md) -* [Session](doc/controllers/session.md) -* [Admin](doc/controllers/admin.md) -* [Report](doc/controllers/report.md) -* [Materialization](doc/controllers/materialization.md) - -## Classes Documentation - -* [ApiResponse](doc/api-response.md) -* [ApiError](doc/api-error.md) - diff --git a/Typescript/doc/api-error.md b/Typescript/doc/api-error.md deleted file mode 100644 index 4161e0e33..000000000 --- a/Typescript/doc/api-error.md +++ /dev/null @@ -1,17 +0,0 @@ - -# ApiError - -Thrown when the HTTP status code is not okay. - -The ApiError extends the ApiResponse interface, so all ApiResponse properties are available. - -## Properties - -| Name | Type | Description | -| --- | --- | --- | -| request | HttpRequest | Original request that resulted in this response. | -| statusCode | number | Response status codee. | -| headers | Record | Response headers. | -| result | T | Response data. | -| body | string \| Blob \| NodeJS.ReadableStream | Original body from the response. | - diff --git a/Typescript/doc/api-response.md b/Typescript/doc/api-response.md deleted file mode 100644 index 1e886c9e1..000000000 --- a/Typescript/doc/api-response.md +++ /dev/null @@ -1,15 +0,0 @@ - -# ApiResponse - -An interface for the result of an API call. - -## Properties - -| Name | Type | Description | -| --- | --- | --- | -| request | HttpRequest | Original request that resulted in this response. | -| statusCode | number | Response status codee. | -| headers | Record | Response headers. | -| result | T | Response data. | -| body | string \| Blob \| NodeJS.ReadableStream | Original body from the response. | - diff --git a/Typescript/doc/client.md b/Typescript/doc/client.md deleted file mode 100644 index 189bf8e38..000000000 --- a/Typescript/doc/client.md +++ /dev/null @@ -1,68 +0,0 @@ - -# Client Class Documentation - -The following parameters are configurable for the API Client: - -| Parameter | Type | Description | -| --- | --- | --- | -| `baseUrl` | `string` | *Default*: `'https://localhost:443'` | -| `environment` | Environment | The API environment.
**Default: `Environment.Production`** | -| `timeout` | `number` | Timeout for API calls.
*Default*: `0` | -| `httpClientOptions` | `Partial` | Stable configurable http client options. | -| `unstableHttpClientOptions` | `any` | Unstable configurable http client options. | -| `accessToken` | `string` | The OAuth 2.0 Access Token to use for API requests. | - -## HttpClientOptions - -| Parameter | Type | Description | -| --- | --- | --- | -| `timeout` | `number` | Timeout in milliseconds. | -| `httpAgent` | `any` | Custom http agent to be used when performing http requests. | -| `httpsAgent` | `any` | Custom https agent to be used when performing http requests. | -| `retryConfig` | `Partial` | Configurations to retry requests. | - -## RetryConfiguration - -| Parameter | Type | Description | -| --- | --- | --- | -| `maxNumberOfRetries` | `number` | Maximum number of retries.
*Default*: `0` | -| `retryOnTimeout` | `boolean` | Whether to retry on request timeout.
*Default*: `true` | -| `retryInterval` | `number` | Interval before next retry. Used in calculation of wait time for next request in case of failure.
*Default*: `1` | -| `maximumRetryWaitTime` | `number` | Overall wait time for the requests getting retried.
*Default*: `0` | -| `backoffFactor` | `number` | Used in calculation of wait time for next request in case of failure.
*Default*: `2` | -| `httpStatusCodesToRetry` | `number[]` | Http status codes to retry against.
*Default*: `[408, 413, 429, 500, 502, 503, 504, 521, 522, 524, 408, 413, 429, 500, 502, 503, 504, 521, 522, 524]` | -| `httpMethodsToRetry` | `HttpMethod[]` | Http methods to retry against.
*Default*: `['GET', 'PUT', 'GET', 'PUT']` | - -The API client can be initialized as follows: - -```ts -const client = new Client({ - timeout: 0, - environment: Environment.Production, - accessToken: 'AccessToken', -}) -``` - -## ThoughtSpot Public REST API Client - -The gateway for the SDK. This class acts as a factory for the Controllers and also holds the configuration of the SDK. - -## Controllers - -| Name | Description | -| --- | --- | -| user | Gets UserController | -| group | Gets GroupController | -| metadata | Gets MetadataController | -| database | Gets DatabaseController | -| connection | Gets ConnectionController | -| data | Gets DataController | -| logs | Gets LogsController | -| customActions | Gets CustomActionsController | -| security | Gets SecurityController | -| org | Gets OrgController | -| session | Gets SessionController | -| admin | Gets AdminController | -| report | Gets ReportController | -| materialization | Gets MaterializationController | - diff --git a/Typescript/doc/controllers/admin.md b/Typescript/doc/controllers/admin.md deleted file mode 100644 index 40767b84f..000000000 --- a/Typescript/doc/controllers/admin.md +++ /dev/null @@ -1,337 +0,0 @@ -# Admin - -```ts -const adminController = new AdminController(client); -``` - -## Class Name - -`AdminController` - -## Methods - -* [Restapi V2 Update Cluster Config](../../doc/controllers/admin.md#restapi-v2-update-cluster-config) -* [Restapi V2 Reset User Password](../../doc/controllers/admin.md#restapi-v2-reset-user-password) -* [Restapi V2 Sync Principal](../../doc/controllers/admin.md#restapi-v2-sync-principal) -* [Restapi V2 Change Author of Objects](../../doc/controllers/admin.md#restapi-v2-change-author-of-objects) -* [Restapi V2 Assign Author to Objects](../../doc/controllers/admin.md#restapi-v2-assign-author-to-objects) -* [Restapi V2 Force Logout Users](../../doc/controllers/admin.md#restapi-v2-force-logout-users) - - -# Restapi V2 Update Cluster Config - -To update the Thoughtspot cluster configuration, use this endpoint. - -```ts -async restapiV2UpdateClusterConfig( - body: TspublicRestV2AdminConfigurationUpdateRequest, - requestOptions?: RequestOptions -): Promise> -``` - -## Parameters - -| Parameter | Type | Tags | Description | -| --- | --- | --- | --- | -| `body` | [`TspublicRestV2AdminConfigurationUpdateRequest`](../../doc/models/tspublic-rest-v2-admin-configuration-update-request.md) | Body, Required | - | -| `requestOptions` | `RequestOptions \| undefined` | Optional | Pass additional request options. | - -## Response Type - -`boolean` - -## Example Usage - -```ts -const contentType = null; -const body: TspublicRestV2AdminConfigurationUpdateRequest = {}; - -try { - const { result, ...httpResponse } = await adminController.restapiV2UpdateClusterConfig(body); - // Get more response info... - // const { statusCode, headers } = httpResponse; -} catch(error) { - if (error instanceof ApiError) { - const errors = error.result; - // const { statusCode, headers } = error; - } -} -``` - -## Errors - -| HTTP Status Code | Error Description | Exception Class | -| --- | --- | --- | -| 500 | Operation failed | [`ErrorResponseError`](../../doc/models/error-response-error.md) | - - -# Restapi V2 Reset User Password - -To reset the password of a ThoughtSpot user account, use this endpoint. - -It is mandatory to use Authorization header with token of a user with admin access to successfully run this endpoint. - -At least one of User Id or username is mandatory. When both are given, then user id will be considered. - -```ts -async restapiV2ResetUserPassword( - body: TspublicRestV2AdminResetpasswordRequest, - requestOptions?: RequestOptions -): Promise> -``` - -## Parameters - -| Parameter | Type | Tags | Description | -| --- | --- | --- | --- | -| `body` | [`TspublicRestV2AdminResetpasswordRequest`](../../doc/models/tspublic-rest-v2-admin-resetpassword-request.md) | Body, Required | - | -| `requestOptions` | `RequestOptions \| undefined` | Optional | Pass additional request options. | - -## Response Type - -`boolean` - -## Example Usage - -```ts -const contentType = null; -const body: TspublicRestV2AdminResetpasswordRequest = { - newPassword: 'newPassword0', -}; - -try { - const { result, ...httpResponse } = await adminController.restapiV2ResetUserPassword(body); - // Get more response info... - // const { statusCode, headers } = httpResponse; -} catch(error) { - if (error instanceof ApiError) { - const errors = error.result; - // const { statusCode, headers } = error; - } -} -``` - -## Errors - -| HTTP Status Code | Error Description | Exception Class | -| --- | --- | --- | -| 500 | Operation failed | [`ErrorResponseError`](../../doc/models/error-response-error.md) | - - -# Restapi V2 Sync Principal - -To programmatically synchronize user accounts and user groups from external system with ThoughtSpot, use this endpoint. - -The payload takes principals containing all users and groups present in the external system. - -The users and user groups in Thoughtspot get updated for any matching inputs. - -Any user and user group present in the input, but not present in the cluster, gets created in cluster. -n You can optionally choose to delete the user and groups from the cluster, that are not present in the input. - -```ts -async restapiV2SyncPrincipal( - body: TspublicRestV2AdminSyncprincipalRequest, - requestOptions?: RequestOptions -): Promise> -``` - -## Parameters - -| Parameter | Type | Tags | Description | -| --- | --- | --- | --- | -| `body` | [`TspublicRestV2AdminSyncprincipalRequest`](../../doc/models/tspublic-rest-v2-admin-syncprincipal-request.md) | Body, Required | - | -| `requestOptions` | `RequestOptions \| undefined` | Optional | Pass additional request options. | - -## Response Type - -[`AdminsyncPrincipalResponse`](../../doc/models/adminsync-principal-response.md) - -## Example Usage - -```ts -const contentType = null; -const bodyPrincipalObject: unknown[] = ['{"key1":"val1","key2":"val2"}']; -const body: TspublicRestV2AdminSyncprincipalRequest = { - principalObject: bodyPrincipalObject, -}; - -try { - const { result, ...httpResponse } = await adminController.restapiV2SyncPrincipal(body); - // Get more response info... - // const { statusCode, headers } = httpResponse; -} catch(error) { - if (error instanceof ApiError) { - const errors = error.result; - // const { statusCode, headers } = error; - } -} -``` - -## Errors - -| HTTP Status Code | Error Description | Exception Class | -| --- | --- | --- | -| 500 | Operation failed | [`ErrorResponseError`](../../doc/models/error-response-error.md) | - - -# Restapi V2 Change Author of Objects - -To programmatically change the owner of one or several objects from one user account to another, use this endpoint. - -You might want to transfer ownership of objects owned by a user to another active user, when the account is removed from the ThoughtSpot application. - -```ts -async restapiV2ChangeAuthorOfObjects( - body: TspublicRestV2AdminChangeauthorRequest, - requestOptions?: RequestOptions -): Promise> -``` - -## Parameters - -| Parameter | Type | Tags | Description | -| --- | --- | --- | --- | -| `body` | [`TspublicRestV2AdminChangeauthorRequest`](../../doc/models/tspublic-rest-v2-admin-changeauthor-request.md) | Body, Required | - | -| `requestOptions` | `RequestOptions \| undefined` | Optional | Pass additional request options. | - -## Response Type - -`boolean` - -## Example Usage - -```ts -const contentType = null; -const bodyTsObjectId: string[] = ['tsObjectId7']; -const bodyFromUser: FromUserNameAndIDInput = {}; - -const bodyToUser: ToUserNameAndIDInput = {}; - -const body: TspublicRestV2AdminChangeauthorRequest = { - tsObjectId: bodyTsObjectId, - fromUser: bodyFromUser, - toUser: bodyToUser, -}; - -try { - const { result, ...httpResponse } = await adminController.restapiV2ChangeAuthorOfObjects(body); - // Get more response info... - // const { statusCode, headers } = httpResponse; -} catch(error) { - if (error instanceof ApiError) { - const errors = error.result; - // const { statusCode, headers } = error; - } -} -``` - -## Errors - -| HTTP Status Code | Error Description | Exception Class | -| --- | --- | --- | -| 500 | Operation failed | [`ErrorResponseError`](../../doc/models/error-response-error.md) | - - -# Restapi V2 Assign Author to Objects - -To programmatically assign an author to one or several objects, use this endpoint. - -Provide either user name or id as input. When both are given user id will be considered. - -Requires administration privilege. - -```ts -async restapiV2AssignAuthorToObjects( - body: TspublicRestV2AdminAssignauthorRequest, - requestOptions?: RequestOptions -): Promise> -``` - -## Parameters - -| Parameter | Type | Tags | Description | -| --- | --- | --- | --- | -| `body` | [`TspublicRestV2AdminAssignauthorRequest`](../../doc/models/tspublic-rest-v2-admin-assignauthor-request.md) | Body, Required | - | -| `requestOptions` | `RequestOptions \| undefined` | Optional | Pass additional request options. | - -## Response Type - -`boolean` - -## Example Usage - -```ts -const contentType = null; -const bodyTsObjectId: string[] = ['tsObjectId7']; -const body: TspublicRestV2AdminAssignauthorRequest = { - tsObjectId: bodyTsObjectId, -}; - -try { - const { result, ...httpResponse } = await adminController.restapiV2AssignAuthorToObjects(body); - // Get more response info... - // const { statusCode, headers } = httpResponse; -} catch(error) { - if (error instanceof ApiError) { - const errors = error.result; - // const { statusCode, headers } = error; - } -} -``` - -## Errors - -| HTTP Status Code | Error Description | Exception Class | -| --- | --- | --- | -| 500 | Operation failed | [`ErrorResponseError`](../../doc/models/error-response-error.md) | - - -# Restapi V2 Force Logout Users - -To logout one or more users from logged in session, use this endpoint. If no input is provided then all logged in users are force logged out. - -Requires administration privilege - -```ts -async restapiV2ForceLogoutUsers( - body: TspublicRestV2AdminForcelogoutRequest, - requestOptions?: RequestOptions -): Promise> -``` - -## Parameters - -| Parameter | Type | Tags | Description | -| --- | --- | --- | --- | -| `body` | [`TspublicRestV2AdminForcelogoutRequest`](../../doc/models/tspublic-rest-v2-admin-forcelogout-request.md) | Body, Required | - | -| `requestOptions` | `RequestOptions \| undefined` | Optional | Pass additional request options. | - -## Response Type - -`boolean` - -## Example Usage - -```ts -const contentType = null; -const body: TspublicRestV2AdminForcelogoutRequest = {}; - -try { - const { result, ...httpResponse } = await adminController.restapiV2ForceLogoutUsers(body); - // Get more response info... - // const { statusCode, headers } = httpResponse; -} catch(error) { - if (error instanceof ApiError) { - const errors = error.result; - // const { statusCode, headers } = error; - } -} -``` - -## Errors - -| HTTP Status Code | Error Description | Exception Class | -| --- | --- | --- | -| 500 | Operation failed | [`ErrorResponseError`](../../doc/models/error-response-error.md) | - diff --git a/Typescript/doc/controllers/connection.md b/Typescript/doc/controllers/connection.md deleted file mode 100644 index 8fb72a998..000000000 --- a/Typescript/doc/controllers/connection.md +++ /dev/null @@ -1,639 +0,0 @@ -# Connection - -```ts -const connectionController = new ConnectionController(client); -``` - -## Class Name - -`ConnectionController` - -## Methods - -* [Restapi V2 Get Connection](../../doc/controllers/connection.md#restapi-v2-get-connection) -* [Restapi V2 Get Connection Database](../../doc/controllers/connection.md#restapi-v2-get-connection-database) -* [Restapi V2 Create Connection](../../doc/controllers/connection.md#restapi-v2-create-connection) -* [Restapi V2 Update Connection](../../doc/controllers/connection.md#restapi-v2-update-connection) -* [Restapi V2 Delete Connection](../../doc/controllers/connection.md#restapi-v2-delete-connection) -* [Restapi V2 Add Table to Connection](../../doc/controllers/connection.md#restapi-v2-add-table-to-connection) -* [Restapi V2 Remove Table From Connection](../../doc/controllers/connection.md#restapi-v2-remove-table-from-connection) -* [Restapi V2 Search Connection](../../doc/controllers/connection.md#restapi-v2-search-connection) -* [Restapi V2 Get Connection Tables](../../doc/controllers/connection.md#restapi-v2-get-connection-tables) -* [Restapi V2 Get Connection Table Columns](../../doc/controllers/connection.md#restapi-v2-get-connection-table-columns) - - -# Restapi V2 Get Connection - -To get the details of a specific connection use this endpoint - -```ts -async restapiV2GetConnection( - id: string, - requestOptions?: RequestOptions -): Promise> -``` - -## Parameters - -| Parameter | Type | Tags | Description | -| --- | --- | --- | --- | -| `id` | `string` | Query, Required | The GUID of the connection to query | -| `requestOptions` | `RequestOptions \| undefined` | Optional | Pass additional request options. | - -## Response Type - -[`ConnectionResponse`](../../doc/models/connection-response.md) - -## Example Usage - -```ts -const id = 'id0'; -try { - const { result, ...httpResponse } = await connectionController.restapiV2GetConnection(id); - // Get more response info... - // const { statusCode, headers } = httpResponse; -} catch(error) { - if (error instanceof ApiError) { - const errors = error.result; - // const { statusCode, headers } = error; - } -} -``` - -## Errors - -| HTTP Status Code | Error Description | Exception Class | -| --- | --- | --- | -| 500 | Operation failed | [`ErrorResponseError`](../../doc/models/error-response-error.md) | - - -# Restapi V2 Get Connection Database - -To get the list of databases for a connection, use this endpoint. - -The response will include databases from the data platform corresponding to the connection id provided. - -```ts -async restapiV2GetConnectionDatabase( - id: string, - requestOptions?: RequestOptions -): Promise> -``` - -## Parameters - -| Parameter | Type | Tags | Description | -| --- | --- | --- | --- | -| `id` | `string` | Query, Required | The GUID of the connection | -| `requestOptions` | `RequestOptions \| undefined` | Optional | Pass additional request options. | - -## Response Type - -`string[]` - -## Example Usage - -```ts -const id = 'id0'; -try { - const { result, ...httpResponse } = await connectionController.restapiV2GetConnectionDatabase(id); - // Get more response info... - // const { statusCode, headers } = httpResponse; -} catch(error) { - if (error instanceof ApiError) { - const errors = error.result; - // const { statusCode, headers } = error; - } -} -``` - -## Errors - -| HTTP Status Code | Error Description | Exception Class | -| --- | --- | --- | -| 500 | Operation failed | [`ErrorResponseError`](../../doc/models/error-response-error.md) | - - -# Restapi V2 Create Connection - -To programmatically create a connection in the ThoughtSpot system use this API endpoint. -Using this API, you can create a connection and assign groups. -To create a connection, you require admin connection privileges. -All connections created in the ThoughtSpot system are added to ALL_GROUP - -```ts -async restapiV2CreateConnection( - body: TspublicRestV2ConnectionCreateRequest, - requestOptions?: RequestOptions -): Promise> -``` - -## Parameters - -| Parameter | Type | Tags | Description | -| --- | --- | --- | --- | -| `body` | [`TspublicRestV2ConnectionCreateRequest`](../../doc/models/tspublic-rest-v2-connection-create-request.md) | Body, Required | - | -| `requestOptions` | `RequestOptions \| undefined` | Optional | Pass additional request options. | - -## Response Type - -[`CreateConnectionResponse`](../../doc/models/create-connection-response.md) - -## Example Usage - -```ts -const contentType = null; -const body: TspublicRestV2ConnectionCreateRequest = { - type: 'ORACLE_ADW', - name: 'name6', - configuration: 'configuration0', -}; - -try { - const { result, ...httpResponse } = await connectionController.restapiV2CreateConnection(body); - // Get more response info... - // const { statusCode, headers } = httpResponse; -} catch(error) { - if (error instanceof ApiError) { - const errors = error.result; - // const { statusCode, headers } = error; - } -} -``` - -## Errors - -| HTTP Status Code | Error Description | Exception Class | -| --- | --- | --- | -| 500 | Operation failed | [`ErrorResponseError`](../../doc/models/error-response-error.md) | - - -# Restapi V2 Update Connection - -You can use this endpoint to programmatically modify an existing connection -To modify a connection, you require admin connection privileges. -At least one of Connection Id or connectionname is mandatory. When both are given, then connection id will be considered and connectionname will be updated - -```ts -async restapiV2UpdateConnection( - body: TspublicRestV2ConnectionUpdateRequest, - requestOptions?: RequestOptions -): Promise> -``` - -## Parameters - -| Parameter | Type | Tags | Description | -| --- | --- | --- | --- | -| `body` | [`TspublicRestV2ConnectionUpdateRequest`](../../doc/models/tspublic-rest-v2-connection-update-request.md) | Body, Required | - | -| `requestOptions` | `RequestOptions \| undefined` | Optional | Pass additional request options. | - -## Response Type - -`boolean` - -## Example Usage - -```ts -const contentType = null; -const body: TspublicRestV2ConnectionUpdateRequest = { - id: 'id6', - configuration: 'configuration0', -}; - -try { - const { result, ...httpResponse } = await connectionController.restapiV2UpdateConnection(body); - // Get more response info... - // const { statusCode, headers } = httpResponse; -} catch(error) { - if (error instanceof ApiError) { - const errors = error.result; - // const { statusCode, headers } = error; - } -} -``` - -## Errors - -| HTTP Status Code | Error Description | Exception Class | -| --- | --- | --- | -| 500 | Operation failed | [`ErrorResponseError`](../../doc/models/error-response-error.md) | - - -# Restapi V2 Delete Connection - -To remove a connection from the ThoughtSpot system, use this endpoint. - -```ts -async restapiV2DeleteConnection( - id: string[], - requestOptions?: RequestOptions -): Promise> -``` - -## Parameters - -| Parameter | Type | Tags | Description | -| --- | --- | --- | --- | -| `id` | `string[]` | Query, Required | A JSON array of GUIDs of the connection | -| `requestOptions` | `RequestOptions \| undefined` | Optional | Pass additional request options. | - -## Response Type - -`boolean` - -## Example Usage - -```ts -const Id: string[] = ['id0']; -try { - const { result, ...httpResponse } = await connectionController.restapiV2DeleteConnection(id); - // Get more response info... - // const { statusCode, headers } = httpResponse; -} catch(error) { - if (error instanceof ApiError) { - const errors = error.result; - // const { statusCode, headers } = error; - } -} -``` - -## Errors - -| HTTP Status Code | Error Description | Exception Class | -| --- | --- | --- | -| 500 | Operation failed | [`ErrorResponseError`](../../doc/models/error-response-error.md) | - - -# Restapi V2 Add Table to Connection - -To programmatically add table to an existing connection use this endpoint. -When you assign groups to a connection, the connection inherits the privileges assigned to those groups. -At least one of Connection Id or connectionname is mandatory. When both are given, then connection id will be considered. - -```ts -async restapiV2AddTableToConnection( - body: TspublicRestV2ConnectionAddtableRequest, - requestOptions?: RequestOptions -): Promise> -``` - -## Parameters - -| Parameter | Type | Tags | Description | -| --- | --- | --- | --- | -| `body` | [`TspublicRestV2ConnectionAddtableRequest`](../../doc/models/tspublic-rest-v2-connection-addtable-request.md) | Body, Required | - | -| `requestOptions` | `RequestOptions \| undefined` | Optional | Pass additional request options. | - -## Response Type - -`boolean` - -## Example Usage - -```ts -const contentType = null; -const bodyTable: AddTableInput[] = []; - -const bodytable0Columns: ColumnsInput[] = []; - -const bodytable0columns0: ColumnsInput = { - name: 'name0', - dataType: 'dataType2', -}; - -bodytable0Columns[0] = bodytable0columns0; - -const bodytable0columns1: ColumnsInput = { - name: 'name1', - dataType: 'dataType3', -}; - -bodytable0Columns[1] = bodytable0columns1; - -const bodytable0: AddTableInput = { - name: 'name0', - dbName: 'dbName8', - schemaName: 'schemaName4', - columns: bodytable0Columns, -}; - -bodyTable[0] = bodytable0; - -const bodytable1Columns: ColumnsInput[] = []; - -const bodytable1columns0: ColumnsInput = { - name: 'name9', - dataType: 'dataType1', -}; - -bodytable1Columns[0] = bodytable1columns0; - -const bodytable1: AddTableInput = { - name: 'name1', - dbName: 'dbName9', - schemaName: 'schemaName5', - columns: bodytable1Columns, -}; - -bodyTable[1] = bodytable1; - -const bodytable2Columns: ColumnsInput[] = []; - -const bodytable2columns0: ColumnsInput = { - name: 'name8', - dataType: 'dataType0', -}; - -bodytable2Columns[0] = bodytable2columns0; - -const bodytable2columns1: ColumnsInput = { - name: 'name9', - dataType: 'dataType1', -}; - -bodytable2Columns[1] = bodytable2columns1; - -const bodytable2columns2: ColumnsInput = { - name: 'name0', - dataType: 'dataType2', -}; - -bodytable2Columns[2] = bodytable2columns2; - -const bodytable2: AddTableInput = { - name: 'name2', - dbName: 'dbName0', - schemaName: 'schemaName6', - columns: bodytable2Columns, -}; - -bodyTable[2] = bodytable2; - -const body: TspublicRestV2ConnectionAddtableRequest = { - id: 'id6', - table: bodyTable, -}; - -try { - const { result, ...httpResponse } = await connectionController.restapiV2AddTableToConnection(body); - // Get more response info... - // const { statusCode, headers } = httpResponse; -} catch(error) { - if (error instanceof ApiError) { - const errors = error.result; - // const { statusCode, headers } = error; - } -} -``` - -## Errors - -| HTTP Status Code | Error Description | Exception Class | -| --- | --- | --- | -| 500 | Operation failed | [`ErrorResponseError`](../../doc/models/error-response-error.md) | - - -# Restapi V2 Remove Table From Connection - -To programmatically remove a table from a connection use API endpoint. -The API removes only the connection association. It does not delete the connection or group from the Thoughtspot system. -At least one of id or name of connection is required. When both are given connection id will be considered. - -```ts -async restapiV2RemoveTableFromConnection( - body: TspublicRestV2ConnectionRemovetableRequest, - requestOptions?: RequestOptions -): Promise> -``` - -## Parameters - -| Parameter | Type | Tags | Description | -| --- | --- | --- | --- | -| `body` | [`TspublicRestV2ConnectionRemovetableRequest`](../../doc/models/tspublic-rest-v2-connection-removetable-request.md) | Body, Required | - | -| `requestOptions` | `RequestOptions \| undefined` | Optional | Pass additional request options. | - -## Response Type - -`boolean` - -## Example Usage - -```ts -const contentType = null; -const bodyTable: TableInput[] = []; - -const bodytable0: TableInput = {}; - -bodyTable[0] = bodytable0; - -const bodytable1: TableInput = {}; - -bodyTable[1] = bodytable1; - -const bodytable2: TableInput = {}; - -bodyTable[2] = bodytable2; - -const body: TspublicRestV2ConnectionRemovetableRequest = { - id: 'id6', - table: bodyTable, -}; - -try { - const { result, ...httpResponse } = await connectionController.restapiV2RemoveTableFromConnection(body); - // Get more response info... - // const { statusCode, headers } = httpResponse; -} catch(error) { - if (error instanceof ApiError) { - const errors = error.result; - // const { statusCode, headers } = error; - } -} -``` - -## Errors - -| HTTP Status Code | Error Description | Exception Class | -| --- | --- | --- | -| 500 | Operation failed | [`ErrorResponseError`](../../doc/models/error-response-error.md) | - - -# Restapi V2 Search Connection - -To get the details of a specific connection or all connections in the ThoughtSpot system use this end point. - -```ts -async restapiV2SearchConnection( - body: TspublicRestV2ConnectionSearchRequest, - requestOptions?: RequestOptions -): Promise> -``` - -## Parameters - -| Parameter | Type | Tags | Description | -| --- | --- | --- | --- | -| `body` | [`TspublicRestV2ConnectionSearchRequest`](../../doc/models/tspublic-rest-v2-connection-search-request.md) | Body, Required | - | -| `requestOptions` | `RequestOptions \| undefined` | Optional | Pass additional request options. | - -## Response Type - -[`ConnectionResponse[]`](../../doc/models/connection-response.md) - -## Example Usage - -```ts -const contentType = null; -const body: TspublicRestV2ConnectionSearchRequest = { - type: 'ORACLE_ADW', -}; - -try { - const { result, ...httpResponse } = await connectionController.restapiV2SearchConnection(body); - // Get more response info... - // const { statusCode, headers } = httpResponse; -} catch(error) { - if (error instanceof ApiError) { - const errors = error.result; - // const { statusCode, headers } = error; - } -} -``` - -## Errors - -| HTTP Status Code | Error Description | Exception Class | -| --- | --- | --- | -| 500 | Operation failed | [`ErrorResponseError`](../../doc/models/error-response-error.md) | - - -# Restapi V2 Get Connection Tables - -To get the details of tables from a connection, use this endpoint. - -You can get the details of tables in the data platform for the connection id provided. - -```ts -async restapiV2GetConnectionTables( - body: TspublicRestV2ConnectionTableRequest, - requestOptions?: RequestOptions -): Promise> -``` - -## Parameters - -| Parameter | Type | Tags | Description | -| --- | --- | --- | --- | -| `body` | [`TspublicRestV2ConnectionTableRequest`](../../doc/models/tspublic-rest-v2-connection-table-request.md) | Body, Required | - | -| `requestOptions` | `RequestOptions \| undefined` | Optional | Pass additional request options. | - -## Response Type - -[`ConnectionTableResponse`](../../doc/models/connection-table-response.md) - -## Example Usage - -```ts -const contentType = null; -const body: TspublicRestV2ConnectionTableRequest = { - id: 'id6', -}; - -try { - const { result, ...httpResponse } = await connectionController.restapiV2GetConnectionTables(body); - // Get more response info... - // const { statusCode, headers } = httpResponse; -} catch(error) { - if (error instanceof ApiError) { - const errors = error.result; - // const { statusCode, headers } = error; - } -} -``` - -## Errors - -| HTTP Status Code | Error Description | Exception Class | -| --- | --- | --- | -| 500 | Operation failed | [`ErrorResponseError`](../../doc/models/error-response-error.md) | - - -# Restapi V2 Get Connection Table Columns - -To get the details of columns in a table associated to a connection, use this endpoint. - -You can get the columns of any table available in the data platform for the connection id provided. - -```ts -async restapiV2GetConnectionTableColumns( - body: TspublicRestV2ConnectionTablecoloumnRequest, - requestOptions?: RequestOptions -): Promise> -``` - -## Parameters - -| Parameter | Type | Tags | Description | -| --- | --- | --- | --- | -| `body` | [`TspublicRestV2ConnectionTablecoloumnRequest`](../../doc/models/tspublic-rest-v2-connection-tablecoloumn-request.md) | Body, Required | - | -| `requestOptions` | `RequestOptions \| undefined` | Optional | Pass additional request options. | - -## Response Type - -[`ConnectionTableColumnsResponse`](../../doc/models/connection-table-columns-response.md) - -## Example Usage - -```ts -const contentType = null; -const bodyTable: ConnectionTableColumnsInput[] = []; - -const bodytable0: ConnectionTableColumnsInput = { - dbName: 'dbName8', - schemaName: 'schemaName4', - name: 'name0', -}; - -bodyTable[0] = bodytable0; - -const bodytable1: ConnectionTableColumnsInput = { - dbName: 'dbName9', - schemaName: 'schemaName5', - name: 'name1', -}; - -bodyTable[1] = bodytable1; - -const bodytable2: ConnectionTableColumnsInput = { - dbName: 'dbName0', - schemaName: 'schemaName6', - name: 'name2', -}; - -bodyTable[2] = bodytable2; - -const body: TspublicRestV2ConnectionTablecoloumnRequest = { - id: 'id6', - table: bodyTable, -}; - -try { - const { result, ...httpResponse } = await connectionController.restapiV2GetConnectionTableColumns(body); - // Get more response info... - // const { statusCode, headers } = httpResponse; -} catch(error) { - if (error instanceof ApiError) { - const errors = error.result; - // const { statusCode, headers } = error; - } -} -``` - -## Errors - -| HTTP Status Code | Error Description | Exception Class | -| --- | --- | --- | -| 500 | Operation failed | [`ErrorResponseError`](../../doc/models/error-response-error.md) | - diff --git a/Typescript/doc/controllers/custom-actions.md b/Typescript/doc/controllers/custom-actions.md deleted file mode 100644 index 3af051197..000000000 --- a/Typescript/doc/controllers/custom-actions.md +++ /dev/null @@ -1,400 +0,0 @@ -# Custom Actions - -```ts -const customActionsController = new CustomActionsController(client); -``` - -## Class Name - -`CustomActionsController` - -## Methods - -* [Restapi V2 Get Custom Action](../../doc/controllers/custom-actions.md#restapi-v2-get-custom-action) -* [Restapi V2 Search Custom Action](../../doc/controllers/custom-actions.md#restapi-v2-search-custom-action) -* [Restapi V2 Get Custom Action Association](../../doc/controllers/custom-actions.md#restapi-v2-get-custom-action-association) -* [Restapi V2 Create Custom Action](../../doc/controllers/custom-actions.md#restapi-v2-create-custom-action) -* [Restapi V2 Update Custom Action](../../doc/controllers/custom-actions.md#restapi-v2-update-custom-action) -* [Restapi V2 Delete Custom Action](../../doc/controllers/custom-actions.md#restapi-v2-delete-custom-action) -* [Restapi V2 Update Custom Action Association](../../doc/controllers/custom-actions.md#restapi-v2-update-custom-action-association) -* [Restapi V2 Delete Custom Action Association](../../doc/controllers/custom-actions.md#restapi-v2-delete-custom-action-association) - - -# Restapi V2 Get Custom Action - -To get details of a specific custom action configured in the ThoughtSpot system, use this endpoint - -```ts -async restapiV2GetCustomAction( - id: string, - requestOptions?: RequestOptions -): Promise> -``` - -## Parameters - -| Parameter | Type | Tags | Description | -| --- | --- | --- | --- | -| `id` | `string` | Query, Required | GUID of the custom action | -| `requestOptions` | `RequestOptions \| undefined` | Optional | Pass additional request options. | - -## Response Type - -`unknown` - -## Example Usage - -```ts -const id = 'id0'; -try { - const { result, ...httpResponse } = await customActionsController.restapiV2GetCustomAction(id); - // Get more response info... - // const { statusCode, headers } = httpResponse; -} catch(error) { - if (error instanceof ApiError) { - const errors = error.result; - // const { statusCode, headers } = error; - } -} -``` - -## Errors - -| HTTP Status Code | Error Description | Exception Class | -| --- | --- | --- | -| 500 | Operation failed | [`ErrorResponseError`](../../doc/models/error-response-error.md) | - - -# Restapi V2 Search Custom Action - -To search custom actions available on a ThoughtSpot instance, use this endpoint - -```ts -async restapiV2SearchCustomAction( - body: TspublicRestV2CustomactionSearchRequest, - requestOptions?: RequestOptions -): Promise> -``` - -## Parameters - -| Parameter | Type | Tags | Description | -| --- | --- | --- | --- | -| `body` | [`TspublicRestV2CustomactionSearchRequest`](../../doc/models/tspublic-rest-v2-customaction-search-request.md) | Body, Required | - | -| `requestOptions` | `RequestOptions \| undefined` | Optional | Pass additional request options. | - -## Response Type - -`unknown` - -## Example Usage - -```ts -const contentType = null; -const body: TspublicRestV2CustomactionSearchRequest = {}; - -try { - const { result, ...httpResponse } = await customActionsController.restapiV2SearchCustomAction(body); - // Get more response info... - // const { statusCode, headers } = httpResponse; -} catch(error) { - if (error instanceof ApiError) { - const errors = error.result; - // const { statusCode, headers } = error; - } -} -``` - -## Errors - -| HTTP Status Code | Error Description | Exception Class | -| --- | --- | --- | -| 500 | Operation failed | [`ErrorResponseError`](../../doc/models/error-response-error.md) | - - -# Restapi V2 Get Custom Action Association - -ThoughtSpot supports associating custom actions to Liveboards, answers, and worksheets. To get the details of the ThoughtSpot objects associated with a custom action, use this endpoint. - -```ts -async restapiV2GetCustomActionAssociation( - id: string, - requestOptions?: RequestOptions -): Promise> -``` - -## Parameters - -| Parameter | Type | Tags | Description | -| --- | --- | --- | --- | -| `id` | `string` | Query, Required | GUID of the custom action | -| `requestOptions` | `RequestOptions \| undefined` | Optional | Pass additional request options. | - -## Response Type - -`unknown` - -## Example Usage - -```ts -const id = 'id0'; -try { - const { result, ...httpResponse } = await customActionsController.restapiV2GetCustomActionAssociation(id); - // Get more response info... - // const { statusCode, headers } = httpResponse; -} catch(error) { - if (error instanceof ApiError) { - const errors = error.result; - // const { statusCode, headers } = error; - } -} -``` - -## Errors - -| HTTP Status Code | Error Description | Exception Class | -| --- | --- | --- | -| 500 | Operation failed | [`ErrorResponseError`](../../doc/models/error-response-error.md) | - - -# Restapi V2 Create Custom Action - -To programmatically create custom actions on ThoughtSpot clusters that support embedding configuration, use this endpoint - -```ts -async restapiV2CreateCustomAction( - body: TspublicRestV2CustomactionCreateRequest, - requestOptions?: RequestOptions -): Promise> -``` - -## Parameters - -| Parameter | Type | Tags | Description | -| --- | --- | --- | --- | -| `body` | [`TspublicRestV2CustomactionCreateRequest`](../../doc/models/tspublic-rest-v2-customaction-create-request.md) | Body, Required | - | -| `requestOptions` | `RequestOptions \| undefined` | Optional | Pass additional request options. | - -## Response Type - -`unknown` - -## Example Usage - -```ts -const contentType = null; -const body: TspublicRestV2CustomactionCreateRequest = { - configuration: 'configuration0', -}; - -try { - const { result, ...httpResponse } = await customActionsController.restapiV2CreateCustomAction(body); - // Get more response info... - // const { statusCode, headers } = httpResponse; -} catch(error) { - if (error instanceof ApiError) { - const errors = error.result; - // const { statusCode, headers } = error; - } -} -``` - -## Errors - -| HTTP Status Code | Error Description | Exception Class | -| --- | --- | --- | -| 500 | Operation failed | [`ErrorResponseError`](../../doc/models/error-response-error.md) | - - -# Restapi V2 Update Custom Action - -To programmatically edit an existing custom action, use this endpoint - -```ts -async restapiV2UpdateCustomAction( - body: TspublicRestV2CustomactionUpdateRequest, - requestOptions?: RequestOptions -): Promise> -``` - -## Parameters - -| Parameter | Type | Tags | Description | -| --- | --- | --- | --- | -| `body` | [`TspublicRestV2CustomactionUpdateRequest`](../../doc/models/tspublic-rest-v2-customaction-update-request.md) | Body, Required | - | -| `requestOptions` | `RequestOptions \| undefined` | Optional | Pass additional request options. | - -## Response Type - -`unknown` - -## Example Usage - -```ts -const contentType = null; -const body: TspublicRestV2CustomactionUpdateRequest = { - id: 'id6', - configuration: 'configuration0', -}; - -try { - const { result, ...httpResponse } = await customActionsController.restapiV2UpdateCustomAction(body); - // Get more response info... - // const { statusCode, headers } = httpResponse; -} catch(error) { - if (error instanceof ApiError) { - const errors = error.result; - // const { statusCode, headers } = error; - } -} -``` - -## Errors - -| HTTP Status Code | Error Description | Exception Class | -| --- | --- | --- | -| 500 | Operation failed | [`ErrorResponseError`](../../doc/models/error-response-error.md) | - - -# Restapi V2 Delete Custom Action - -To programmatically delete a custom action, use this endpoint - -```ts -async restapiV2DeleteCustomAction( - id: string, - requestOptions?: RequestOptions -): Promise> -``` - -## Parameters - -| Parameter | Type | Tags | Description | -| --- | --- | --- | --- | -| `id` | `string` | Query, Required | GUID of the custom action | -| `requestOptions` | `RequestOptions \| undefined` | Optional | Pass additional request options. | - -## Response Type - -`unknown` - -## Example Usage - -```ts -const id = 'id0'; -try { - const { result, ...httpResponse } = await customActionsController.restapiV2DeleteCustomAction(id); - // Get more response info... - // const { statusCode, headers } = httpResponse; -} catch(error) { - if (error instanceof ApiError) { - const errors = error.result; - // const { statusCode, headers } = error; - } -} -``` - -## Errors - -| HTTP Status Code | Error Description | Exception Class | -| --- | --- | --- | -| 500 | Operation failed | [`ErrorResponseError`](../../doc/models/error-response-error.md) | - - -# Restapi V2 Update Custom Action Association - -To programmatically associate a custom action to a ThoughtSpot object, use this endpoint - -```ts -async restapiV2UpdateCustomActionAssociation( - body: TspublicRestV2CustomactionAssociationUpdateRequest, - requestOptions?: RequestOptions -): Promise> -``` - -## Parameters - -| Parameter | Type | Tags | Description | -| --- | --- | --- | --- | -| `body` | [`TspublicRestV2CustomactionAssociationUpdateRequest`](../../doc/models/tspublic-rest-v2-customaction-association-update-request.md) | Body, Required | - | -| `requestOptions` | `RequestOptions \| undefined` | Optional | Pass additional request options. | - -## Response Type - -`unknown` - -## Example Usage - -```ts -const contentType = null; -const body: TspublicRestV2CustomactionAssociationUpdateRequest = { - id: 'id6', - association: 'association6', -}; - -try { - const { result, ...httpResponse } = await customActionsController.restapiV2UpdateCustomActionAssociation(body); - // Get more response info... - // const { statusCode, headers } = httpResponse; -} catch(error) { - if (error instanceof ApiError) { - const errors = error.result; - // const { statusCode, headers } = error; - } -} -``` - -## Errors - -| HTTP Status Code | Error Description | Exception Class | -| --- | --- | --- | -| 500 | Operation failed | [`ErrorResponseError`](../../doc/models/error-response-error.md) | - - -# Restapi V2 Delete Custom Action Association - -To remove custom action associations to ThoughtSpot objects, use this endpoint - -```ts -async restapiV2DeleteCustomActionAssociation( - id: string, - association: string, - requestOptions?: RequestOptions -): Promise> -``` - -## Parameters - -| Parameter | Type | Tags | Description | -| --- | --- | --- | --- | -| `id` | `string` | Query, Required | GUID of the custom action | -| `association` | `string` | Query, Required | A JSON map of the attributes with association of the action to ThoughtSpot object ID

Example:

{"id":"0dbd5b3a-84c1-4407-9803-cf07d67e6fcf","name":"My worksheet action","version":"v2","type":"URL","detail":{"link":"https://unpkg.com","function":"my-worksheet-action","authSelect":"NONE","authToken":"","encodeUser":"","apiKey":"X-API-KEY","apiValue":"","additionalUrlHeaders":"{}"},"actionAssociationMap":{"WORKSHEET":{"2b9d083a-275c-4984-9cfe-90b036affa17":{"enabled":"true","context":"PRIMARY"}}},"context":"NONE","availability":[ ],"userGroupList":["d0326b56-ef23-4c8a-8327-a30e99bcc72b"]} | -| `requestOptions` | `RequestOptions \| undefined` | Optional | Pass additional request options. | - -## Response Type - -`unknown` - -## Example Usage - -```ts -const id = 'id0'; -const association = 'association0'; -try { - const { result, ...httpResponse } = await customActionsController.restapiV2DeleteCustomActionAssociation(id, association); - // Get more response info... - // const { statusCode, headers } = httpResponse; -} catch(error) { - if (error instanceof ApiError) { - const errors = error.result; - // const { statusCode, headers } = error; - } -} -``` - -## Errors - -| HTTP Status Code | Error Description | Exception Class | -| --- | --- | --- | -| 500 | Operation failed | [`ErrorResponseError`](../../doc/models/error-response-error.md) | - diff --git a/Typescript/doc/controllers/data.md b/Typescript/doc/controllers/data.md deleted file mode 100644 index 0caea5ff5..000000000 --- a/Typescript/doc/controllers/data.md +++ /dev/null @@ -1,256 +0,0 @@ -# Data - -```ts -const dataController = new DataController(client); -``` - -## Class Name - -`DataController` - -## Methods - -* [Restapi V2 Search Query Data](../../doc/controllers/data.md#restapi-v2-search-query-data) -* [Restapi V2 Liveboard Data](../../doc/controllers/data.md#restapi-v2-liveboard-data) -* [Restapi V2 Answer Data](../../doc/controllers/data.md#restapi-v2-answer-data) -* [Restapi V2 Answer Query Sql](../../doc/controllers/data.md#restapi-v2-answer-query-sql) -* [Restapi V2 Liveboard Query Sql](../../doc/controllers/data.md#restapi-v2-liveboard-query-sql) - - -# Restapi V2 Search Query Data - -To programmatically retrieve data from ThoughtSpot using search query string, use this endpoint - -```ts -async restapiV2SearchQueryData( - body: TspublicRestV2DataSearchRequest, - requestOptions?: RequestOptions -): Promise> -``` - -## Parameters - -| Parameter | Type | Tags | Description | -| --- | --- | --- | --- | -| `body` | [`TspublicRestV2DataSearchRequest`](../../doc/models/tspublic-rest-v2-data-search-request.md) | Body, Required | - | -| `requestOptions` | `RequestOptions \| undefined` | Optional | Pass additional request options. | - -## Response Type - -`unknown` - -## Example Usage - -```ts -const contentType = null; -const body: TspublicRestV2DataSearchRequest = { - queryString: 'queryString0', - dataObjectId: 'dataObjectId6', -}; - -try { - const { result, ...httpResponse } = await dataController.restapiV2SearchQueryData(body); - // Get more response info... - // const { statusCode, headers } = httpResponse; -} catch(error) { - if (error instanceof ApiError) { - const errors = error.result; - // const { statusCode, headers } = error; - } -} -``` - -## Errors - -| HTTP Status Code | Error Description | Exception Class | -| --- | --- | --- | -| 500 | Operation failed | [`ErrorResponseError`](../../doc/models/error-response-error.md) | - - -# Restapi V2 Liveboard Data - -To retrieve data related to a Liveboard or visualization from the ThoughtSpot system, you can use this endpoint - -```ts -async restapiV2LiveboardData( - body: TspublicRestV2DataLiveboardRequest, - requestOptions?: RequestOptions -): Promise> -``` - -## Parameters - -| Parameter | Type | Tags | Description | -| --- | --- | --- | --- | -| `body` | [`TspublicRestV2DataLiveboardRequest`](../../doc/models/tspublic-rest-v2-data-liveboard-request.md) | Body, Required | - | -| `requestOptions` | `RequestOptions \| undefined` | Optional | Pass additional request options. | - -## Response Type - -`unknown` - -## Example Usage - -```ts -const contentType = null; -const body: TspublicRestV2DataLiveboardRequest = {}; - -try { - const { result, ...httpResponse } = await dataController.restapiV2LiveboardData(body); - // Get more response info... - // const { statusCode, headers } = httpResponse; -} catch(error) { - if (error instanceof ApiError) { - const errors = error.result; - // const { statusCode, headers } = error; - } -} -``` - -## Errors - -| HTTP Status Code | Error Description | Exception Class | -| --- | --- | --- | -| 500 | Operation failed | [`ErrorResponseError`](../../doc/models/error-response-error.md) | - - -# Restapi V2 Answer Data - -To retrieve data related to a Answer from the ThoughtSpot system, you can use this endpoint - -```ts -async restapiV2AnswerData( - body: TspublicRestV2DataAnswerRequest, - requestOptions?: RequestOptions -): Promise> -``` - -## Parameters - -| Parameter | Type | Tags | Description | -| --- | --- | --- | --- | -| `body` | [`TspublicRestV2DataAnswerRequest`](../../doc/models/tspublic-rest-v2-data-answer-request.md) | Body, Required | - | -| `requestOptions` | `RequestOptions \| undefined` | Optional | Pass additional request options. | - -## Response Type - -`unknown` - -## Example Usage - -```ts -const contentType = null; -const body: TspublicRestV2DataAnswerRequest = { - id: 'id6', -}; - -try { - const { result, ...httpResponse } = await dataController.restapiV2AnswerData(body); - // Get more response info... - // const { statusCode, headers } = httpResponse; -} catch(error) { - if (error instanceof ApiError) { - const errors = error.result; - // const { statusCode, headers } = error; - } -} -``` - -## Errors - -| HTTP Status Code | Error Description | Exception Class | -| --- | --- | --- | -| 500 | Operation failed | [`ErrorResponseError`](../../doc/models/error-response-error.md) | - - -# Restapi V2 Answer Query Sql - -To retrieve the query SQL related to an Answer that is run on the data platform, you can use this endpoint - -```ts -async restapiV2AnswerQuerySql( - id: string, - requestOptions?: RequestOptions -): Promise> -``` - -## Parameters - -| Parameter | Type | Tags | Description | -| --- | --- | --- | --- | -| `id` | `string` | Query, Required | The GUID of the Answer | -| `requestOptions` | `RequestOptions \| undefined` | Optional | Pass additional request options. | - -## Response Type - -[`AnswerQueryResponse`](../../doc/models/answer-query-response.md) - -## Example Usage - -```ts -const id = 'id0'; -try { - const { result, ...httpResponse } = await dataController.restapiV2AnswerQuerySql(id); - // Get more response info... - // const { statusCode, headers } = httpResponse; -} catch(error) { - if (error instanceof ApiError) { - const errors = error.result; - // const { statusCode, headers } = error; - } -} -``` - -## Errors - -| HTTP Status Code | Error Description | Exception Class | -| --- | --- | --- | -| 500 | Operation failed | [`ErrorResponseError`](../../doc/models/error-response-error.md) | - - -# Restapi V2 Liveboard Query Sql - -To retrieve the query SQL related to a Visualization in a Liveboard that is run on the data platform, you can use this endpoint - -```ts -async restapiV2LiveboardQuerySql( - id: string, - vizId?: string[], - requestOptions?: RequestOptions -): Promise> -``` - -## Parameters - -| Parameter | Type | Tags | Description | -| --- | --- | --- | --- | -| `id` | `string` | Query, Required | The GUID of the Answer | -| `vizId` | `string[] \| undefined` | Query, Optional | A JSON array of GUIDs of the visualizations in the Liveboard. | -| `requestOptions` | `RequestOptions \| undefined` | Optional | Pass additional request options. | - -## Response Type - -[`LiveboardQueryResponse`](../../doc/models/liveboard-query-response.md) - -## Example Usage - -```ts -const id = 'id0'; -try { - const { result, ...httpResponse } = await dataController.restapiV2LiveboardQuerySql(id); - // Get more response info... - // const { statusCode, headers } = httpResponse; -} catch(error) { - if (error instanceof ApiError) { - const errors = error.result; - // const { statusCode, headers } = error; - } -} -``` - -## Errors - -| HTTP Status Code | Error Description | Exception Class | -| --- | --- | --- | -| 500 | Operation failed | [`ErrorResponseError`](../../doc/models/error-response-error.md) | - diff --git a/Typescript/doc/controllers/database.md b/Typescript/doc/controllers/database.md deleted file mode 100644 index 5807201c2..000000000 --- a/Typescript/doc/controllers/database.md +++ /dev/null @@ -1,260 +0,0 @@ -# Database - -```ts -const databaseController = new DatabaseController(client); -``` - -## Class Name - -`DatabaseController` - -## Methods - -* [Restapi V2 Get Schemas](../../doc/controllers/database.md#restapi-v2-get-schemas) -* [Restapi V2 Get Tables](../../doc/controllers/database.md#restapi-v2-get-tables) -* [Restapi V2 Get Table Details](../../doc/controllers/database.md#restapi-v2-get-table-details) -* [Restapi V2 Create Table](../../doc/controllers/database.md#restapi-v2-create-table) -* [Restapi V2 Run Query](../../doc/controllers/database.md#restapi-v2-run-query) - - -# Restapi V2 Get Schemas - -To list all the schemas in a database in Falcon, use this endpoint. - -```ts -async restapiV2GetSchemas( - database: string, - requestOptions?: RequestOptions -): Promise> -``` - -## Parameters - -| Parameter | Type | Tags | Description | -| --- | --- | --- | --- | -| `database` | `string` | Query, Required | Name of the Falcon database | -| `requestOptions` | `RequestOptions \| undefined` | Optional | Pass additional request options. | - -## Response Type - -`string[]` - -## Example Usage - -```ts -const database = 'database0'; -try { - const { result, ...httpResponse } = await databaseController.restapiV2GetSchemas(database); - // Get more response info... - // const { statusCode, headers } = httpResponse; -} catch(error) { - if (error instanceof ApiError) { - const errors = error.result; - // const { statusCode, headers } = error; - } -} -``` - -## Errors - -| HTTP Status Code | Error Description | Exception Class | -| --- | --- | --- | -| 500 | Operation failed | [`ErrorResponseError`](../../doc/models/error-response-error.md) | - - -# Restapi V2 Get Tables - -To list all the tables in a schema of a database in Falcon, use this endpoint. - -```ts -async restapiV2GetTables( - database: string, - schema: string, - requestOptions?: RequestOptions -): Promise> -``` - -## Parameters - -| Parameter | Type | Tags | Description | -| --- | --- | --- | --- | -| `database` | `string` | Query, Required | Name of the Falcon database | -| `schema` | `string` | Query, Required | Name of the schema in Falcon database | -| `requestOptions` | `RequestOptions \| undefined` | Optional | Pass additional request options. | - -## Response Type - -`string[]` - -## Example Usage - -```ts -const database = 'database0'; -const schema = 'schema2'; -try { - const { result, ...httpResponse } = await databaseController.restapiV2GetTables(database, schema); - // Get more response info... - // const { statusCode, headers } = httpResponse; -} catch(error) { - if (error instanceof ApiError) { - const errors = error.result; - // const { statusCode, headers } = error; - } -} -``` - -## Errors - -| HTTP Status Code | Error Description | Exception Class | -| --- | --- | --- | -| 500 | Operation failed | [`ErrorResponseError`](../../doc/models/error-response-error.md) | - - -# Restapi V2 Get Table Details - -Note: This endpoint is applicable only for on-prem deployments. - -To provide details of a table in a schema of a database in Falcon, use this endpoint. - -```ts -async restapiV2GetTableDetails( - database: string, - table: string, - schema?: string, - requestOptions?: RequestOptions -): Promise> -``` - -## Parameters - -| Parameter | Type | Tags | Description | -| --- | --- | --- | --- | -| `database` | `string` | Query, Required | Name of the Falcon database | -| `table` | `string` | Query, Required | Name of the table in Falcon database | -| `schema` | `string \| undefined` | Query, Optional | Name of the schema in Falcon database | -| `requestOptions` | `RequestOptions \| undefined` | Optional | Pass additional request options. | - -## Response Type - -`unknown` - -## Example Usage - -```ts -const database = 'database0'; -const table = 'table2'; -try { - const { result, ...httpResponse } = await databaseController.restapiV2GetTableDetails(database, table); - // Get more response info... - // const { statusCode, headers } = httpResponse; -} catch(error) { - if (error instanceof ApiError) { - const errors = error.result; - // const { statusCode, headers } = error; - } -} -``` - -## Errors - -| HTTP Status Code | Error Description | Exception Class | -| --- | --- | --- | -| 500 | Operation failed | [`ErrorResponseError`](../../doc/models/error-response-error.md) | - - -# Restapi V2 Create Table - -To create a table in Falcon, use this endpoint. - -```ts -async restapiV2CreateTable( - body: TspublicRestV2DatabaseTableCreateRequest, - requestOptions?: RequestOptions -): Promise> -``` - -## Parameters - -| Parameter | Type | Tags | Description | -| --- | --- | --- | --- | -| `body` | [`TspublicRestV2DatabaseTableCreateRequest`](../../doc/models/tspublic-rest-v2-database-table-create-request.md) | Body, Required | - | -| `requestOptions` | `RequestOptions \| undefined` | Optional | Pass additional request options. | - -## Response Type - -[`CreateTableResponse`](../../doc/models/create-table-response.md) - -## Example Usage - -```ts -const contentType = null; -const body: TspublicRestV2DatabaseTableCreateRequest = {}; - -try { - const { result, ...httpResponse } = await databaseController.restapiV2CreateTable(body); - // Get more response info... - // const { statusCode, headers } = httpResponse; -} catch(error) { - if (error instanceof ApiError) { - const errors = error.result; - // const { statusCode, headers } = error; - } -} -``` - -## Errors - -| HTTP Status Code | Error Description | Exception Class | -| --- | --- | --- | -| 500 | Operation failed | [`ErrorResponseError`](../../doc/models/error-response-error.md) | - - -# Restapi V2 Run Query - -To run a TQL statement in Falcon, use this endpoint. You can run only following type of statements - Table DDL alter and Table rows update and delete. - -```ts -async restapiV2RunQuery( - body: TspublicRestV2DatabaseTableRunqueryRequest, - requestOptions?: RequestOptions -): Promise> -``` - -## Parameters - -| Parameter | Type | Tags | Description | -| --- | --- | --- | --- | -| `body` | [`TspublicRestV2DatabaseTableRunqueryRequest`](../../doc/models/tspublic-rest-v2-database-table-runquery-request.md) | Body, Required | - | -| `requestOptions` | `RequestOptions \| undefined` | Optional | Pass additional request options. | - -## Response Type - -`unknown[]` - -## Example Usage - -```ts -const contentType = null; -const bodyStatement: string[] = ['statement6', 'statement7']; -const body: TspublicRestV2DatabaseTableRunqueryRequest = { - statement: bodyStatement, -}; - -try { - const { result, ...httpResponse } = await databaseController.restapiV2RunQuery(body); - // Get more response info... - // const { statusCode, headers } = httpResponse; -} catch(error) { - if (error instanceof ApiError) { - const errors = error.result; - // const { statusCode, headers } = error; - } -} -``` - -## Errors - -| HTTP Status Code | Error Description | Exception Class | -| --- | --- | --- | -| 500 | Operation failed | [`ErrorResponseError`](../../doc/models/error-response-error.md) | - diff --git a/Typescript/doc/controllers/group.md b/Typescript/doc/controllers/group.md deleted file mode 100644 index e86e0408f..000000000 --- a/Typescript/doc/controllers/group.md +++ /dev/null @@ -1,579 +0,0 @@ -# Group - -```ts -const groupController = new GroupController(client); -``` - -## Class Name - -`GroupController` - -## Methods - -* [Restapi V2 Get Group](../../doc/controllers/group.md#restapi-v2-get-group) -* [Restapi V2 Create Group](../../doc/controllers/group.md#restapi-v2-create-group) -* [Restapi V2 Update Group](../../doc/controllers/group.md#restapi-v2-update-group) -* [Restapi V2 Delete Group](../../doc/controllers/group.md#restapi-v2-delete-group) -* [Restapi V2 Add Privileges to Group](../../doc/controllers/group.md#restapi-v2-add-privileges-to-group) -* [Restapi V2 Remove Privileges From Group](../../doc/controllers/group.md#restapi-v2-remove-privileges-from-group) -* [Restapi V2 Add Users to Group](../../doc/controllers/group.md#restapi-v2-add-users-to-group) -* [Restapi V2 Remove Users From Group](../../doc/controllers/group.md#restapi-v2-remove-users-from-group) -* [Restapi V2 Add Groups to Group](../../doc/controllers/group.md#restapi-v2-add-groups-to-group) -* [Restapi V2 Remove Groups From Group](../../doc/controllers/group.md#restapi-v2-remove-groups-from-group) -* [Restapi V2 Search Groups](../../doc/controllers/group.md#restapi-v2-search-groups) - - -# Restapi V2 Get Group - -To get the details of a specific group by name or id, use this endpoint. -At Least one value needed. When both are given id will be considered to fetch user information. - -```ts -async restapiV2GetGroup( - name?: string, - id?: string, - requestOptions?: RequestOptions -): Promise> -``` - -## Parameters - -| Parameter | Type | Tags | Description | -| --- | --- | --- | --- | -| `name` | `string \| undefined` | Query, Optional | Name of the group | -| `id` | `string \| undefined` | Query, Optional | The GUID of the group to query. | -| `requestOptions` | `RequestOptions \| undefined` | Optional | Pass additional request options. | - -## Response Type - -[`GroupResponse`](../../doc/models/group-response.md) - -## Example Usage - -```ts -try { - const { result, ...httpResponse } = await groupController.restapiV2GetGroup(); - // Get more response info... - // const { statusCode, headers } = httpResponse; -} catch(error) { - if (error instanceof ApiError) { - const errors = error.result; - // const { statusCode, headers } = error; - } -} -``` - -## Errors - -| HTTP Status Code | Error Description | Exception Class | -| --- | --- | --- | -| 500 | Operation failed | [`ErrorResponseError`](../../doc/models/error-response-error.md) | - - -# Restapi V2 Create Group - -To programmatically create a group in the ThoughtSpot system, use this API endpoint. Using this API, you can create a group and assign privileges and users. For ease of user management and access control, ThoughtSpot administrators can create groups and assign privileges to these groups. The privileges determine the actions that the users belonging to a group are allowed to do. ThoughtSpot also has a default group called ALL_GROUP. When you create new group in ThoughtSpot, they are automatically added to ALL_GROUP. You cannot delete the ALL_GROUP or remove members from it. - -```ts -async restapiV2CreateGroup( - body: TspublicRestV2GroupCreateRequest, - requestOptions?: RequestOptions -): Promise> -``` - -## Parameters - -| Parameter | Type | Tags | Description | -| --- | --- | --- | --- | -| `body` | [`TspublicRestV2GroupCreateRequest`](../../doc/models/tspublic-rest-v2-group-create-request.md) | Body, Required | - | -| `requestOptions` | `RequestOptions \| undefined` | Optional | Pass additional request options. | - -## Response Type - -[`GroupResponse`](../../doc/models/group-response.md) - -## Example Usage - -```ts -const contentType = null; -const body: TspublicRestV2GroupCreateRequest = { - name: 'name6', - displayName: 'displayName6', -}; - -try { - const { result, ...httpResponse } = await groupController.restapiV2CreateGroup(body); - // Get more response info... - // const { statusCode, headers } = httpResponse; -} catch(error) { - if (error instanceof ApiError) { - const errors = error.result; - // const { statusCode, headers } = error; - } -} -``` - -## Errors - -| HTTP Status Code | Error Description | Exception Class | -| --- | --- | --- | -| 500 | Operation failed | [`ErrorResponseError`](../../doc/models/error-response-error.md) | - - -# Restapi V2 Update Group - -You can use this endpoint to programmatically modify an existing user account. -To modify a user, you require admin user privileges. -At least one of User Id or username is mandatory. When both are given, then user id will be considered and username will be updated - -```ts -async restapiV2UpdateGroup( - body: TspublicRestV2GroupUpdateRequest, - requestOptions?: RequestOptions -): Promise> -``` - -## Parameters - -| Parameter | Type | Tags | Description | -| --- | --- | --- | --- | -| `body` | [`TspublicRestV2GroupUpdateRequest`](../../doc/models/tspublic-rest-v2-group-update-request.md) | Body, Required | - | -| `requestOptions` | `RequestOptions \| undefined` | Optional | Pass additional request options. | - -## Response Type - -`boolean` - -## Example Usage - -```ts -const contentType = null; -const body: TspublicRestV2GroupUpdateRequest = {}; - -try { - const { result, ...httpResponse } = await groupController.restapiV2UpdateGroup(body); - // Get more response info... - // const { statusCode, headers } = httpResponse; -} catch(error) { - if (error instanceof ApiError) { - const errors = error.result; - // const { statusCode, headers } = error; - } -} -``` - -## Errors - -| HTTP Status Code | Error Description | Exception Class | -| --- | --- | --- | -| 500 | Operation failed | [`ErrorResponseError`](../../doc/models/error-response-error.md) | - - -# Restapi V2 Delete Group - -To remove a group from the ThoughtSpot system, send a DELETE request to this endpoint. At Least one value needed. When both are given user id will be considered to fetch user information. - -```ts -async restapiV2DeleteGroup( - name?: string, - id?: string, - requestOptions?: RequestOptions -): Promise> -``` - -## Parameters - -| Parameter | Type | Tags | Description | -| --- | --- | --- | --- | -| `name` | `string \| undefined` | Query, Optional | Name of the group. | -| `id` | `string \| undefined` | Query, Optional | The GUID of the group | -| `requestOptions` | `RequestOptions \| undefined` | Optional | Pass additional request options. | - -## Response Type - -`boolean` - -## Example Usage - -```ts -try { - const { result, ...httpResponse } = await groupController.restapiV2DeleteGroup(); - // Get more response info... - // const { statusCode, headers } = httpResponse; -} catch(error) { - if (error instanceof ApiError) { - const errors = error.result; - // const { statusCode, headers } = error; - } -} -``` - -## Errors - -| HTTP Status Code | Error Description | Exception Class | -| --- | --- | --- | -| 500 | Operation failed | [`ErrorResponseError`](../../doc/models/error-response-error.md) | - - -# Restapi V2 Add Privileges to Group - -To programmatically add privileges to an existing group, use API endpoint. -When you assign privileges to a group, all the users under to this group inherits the privileges assigned to that group. -At least one of id or name of group is required. When both are given user id will be considered. - -```ts -async restapiV2AddPrivilegesToGroup( - body: TspublicRestV2GroupAddprivilegeRequest, - requestOptions?: RequestOptions -): Promise> -``` - -## Parameters - -| Parameter | Type | Tags | Description | -| --- | --- | --- | --- | -| `body` | [`TspublicRestV2GroupAddprivilegeRequest`](../../doc/models/tspublic-rest-v2-group-addprivilege-request.md) | Body, Required | - | -| `requestOptions` | `RequestOptions \| undefined` | Optional | Pass additional request options. | - -## Response Type - -`boolean` - -## Example Usage - -```ts -const contentType = null; -const body: TspublicRestV2GroupAddprivilegeRequest = {}; - -try { - const { result, ...httpResponse } = await groupController.restapiV2AddPrivilegesToGroup(body); - // Get more response info... - // const { statusCode, headers } = httpResponse; -} catch(error) { - if (error instanceof ApiError) { - const errors = error.result; - // const { statusCode, headers } = error; - } -} -``` - -## Errors - -| HTTP Status Code | Error Description | Exception Class | -| --- | --- | --- | -| 500 | Operation failed | [`ErrorResponseError`](../../doc/models/error-response-error.md) | - - -# Restapi V2 Remove Privileges From Group - -To programmatically remove privileges from a group, use API endpoint. The API removes only the privilege association. It does not delete the privilege or group from the Thoughtspot system. At least one of id or name of group is required. When both are given user id will be considered. - -```ts -async restapiV2RemovePrivilegesFromGroup( - body: TspublicRestV2GroupRemoveprivilegeRequest, - requestOptions?: RequestOptions -): Promise> -``` - -## Parameters - -| Parameter | Type | Tags | Description | -| --- | --- | --- | --- | -| `body` | [`TspublicRestV2GroupRemoveprivilegeRequest`](../../doc/models/tspublic-rest-v2-group-removeprivilege-request.md) | Body, Required | - | -| `requestOptions` | `RequestOptions \| undefined` | Optional | Pass additional request options. | - -## Response Type - -`boolean` - -## Example Usage - -```ts -const contentType = null; -const body: TspublicRestV2GroupRemoveprivilegeRequest = {}; - -try { - const { result, ...httpResponse } = await groupController.restapiV2RemovePrivilegesFromGroup(body); - // Get more response info... - // const { statusCode, headers } = httpResponse; -} catch(error) { - if (error instanceof ApiError) { - const errors = error.result; - // const { statusCode, headers } = error; - } -} -``` - -## Errors - -| HTTP Status Code | Error Description | Exception Class | -| --- | --- | --- | -| 500 | Operation failed | [`ErrorResponseError`](../../doc/models/error-response-error.md) | - - -# Restapi V2 Add Users to Group - -To programmatically add existing ThoughtSpot users to a group, use this API endpoint. When you assign users to a group, the users inherits the privileges assigned to that group. At least one of id or name of the group is required. When both are given user id will be considered. - -```ts -async restapiV2AddUsersToGroup( - body: TspublicRestV2GroupAdduserRequest, - requestOptions?: RequestOptions -): Promise> -``` - -## Parameters - -| Parameter | Type | Tags | Description | -| --- | --- | --- | --- | -| `body` | [`TspublicRestV2GroupAdduserRequest`](../../doc/models/tspublic-rest-v2-group-adduser-request.md) | Body, Required | - | -| `requestOptions` | `RequestOptions \| undefined` | Optional | Pass additional request options. | - -## Response Type - -`boolean` - -## Example Usage - -```ts -const contentType = null; -const bodyUsers: UserNameAndIDInput[] = []; - -const bodyusers0: UserNameAndIDInput = {}; - -bodyUsers[0] = bodyusers0; - -const body: TspublicRestV2GroupAdduserRequest = { - users: bodyUsers, -}; - -try { - const { result, ...httpResponse } = await groupController.restapiV2AddUsersToGroup(body); - // Get more response info... - // const { statusCode, headers } = httpResponse; -} catch(error) { - if (error instanceof ApiError) { - const errors = error.result; - // const { statusCode, headers } = error; - } -} -``` - -## Errors - -| HTTP Status Code | Error Description | Exception Class | -| --- | --- | --- | -| 500 | Operation failed | [`ErrorResponseError`](../../doc/models/error-response-error.md) | - - -# Restapi V2 Remove Users From Group - -To programmatically remove users from a group, use API endpoint.The API removes only the user association. It does not delete the users or group from the Thoughtspot system. At least one of id or name of group is required. When both are given user id will be considered. - -```ts -async restapiV2RemoveUsersFromGroup( - body: TspublicRestV2GroupRemoveuserRequest, - requestOptions?: RequestOptions -): Promise> -``` - -## Parameters - -| Parameter | Type | Tags | Description | -| --- | --- | --- | --- | -| `body` | [`TspublicRestV2GroupRemoveuserRequest`](../../doc/models/tspublic-rest-v2-group-removeuser-request.md) | Body, Required | - | -| `requestOptions` | `RequestOptions \| undefined` | Optional | Pass additional request options. | - -## Response Type - -`boolean` - -## Example Usage - -```ts -const contentType = null; -const bodyUsers: UserNameAndIDInput[] = []; - -const bodyusers0: UserNameAndIDInput = {}; - -bodyUsers[0] = bodyusers0; - -const body: TspublicRestV2GroupRemoveuserRequest = { - users: bodyUsers, -}; - -try { - const { result, ...httpResponse } = await groupController.restapiV2RemoveUsersFromGroup(body); - // Get more response info... - // const { statusCode, headers } = httpResponse; -} catch(error) { - if (error instanceof ApiError) { - const errors = error.result; - // const { statusCode, headers } = error; - } -} -``` - -## Errors - -| HTTP Status Code | Error Description | Exception Class | -| --- | --- | --- | -| 500 | Operation failed | [`ErrorResponseError`](../../doc/models/error-response-error.md) | - - -# Restapi V2 Add Groups to Group - -To programmatically add existing groups to a group, use API endpoint. When you assign groups to a group, the group inherits the privileges assigned to those groups. At least one of id or name of group is required. When both are given user id will be considered. - -```ts -async restapiV2AddGroupsToGroup( - body: TspublicRestV2GroupAddgroupRequest, - requestOptions?: RequestOptions -): Promise> -``` - -## Parameters - -| Parameter | Type | Tags | Description | -| --- | --- | --- | --- | -| `body` | [`TspublicRestV2GroupAddgroupRequest`](../../doc/models/tspublic-rest-v2-group-addgroup-request.md) | Body, Required | - | -| `requestOptions` | `RequestOptions \| undefined` | Optional | Pass additional request options. | - -## Response Type - -`boolean` - -## Example Usage - -```ts -const contentType = null; -const bodyGroups: GroupNameAndIDInput[] = []; - -const bodygroups0: GroupNameAndIDInput = {}; - -bodyGroups[0] = bodygroups0; - -const body: TspublicRestV2GroupAddgroupRequest = { - groups: bodyGroups, -}; - -try { - const { result, ...httpResponse } = await groupController.restapiV2AddGroupsToGroup(body); - // Get more response info... - // const { statusCode, headers } = httpResponse; -} catch(error) { - if (error instanceof ApiError) { - const errors = error.result; - // const { statusCode, headers } = error; - } -} -``` - -## Errors - -| HTTP Status Code | Error Description | Exception Class | -| --- | --- | --- | -| 500 | Operation failed | [`ErrorResponseError`](../../doc/models/error-response-error.md) | - - -# Restapi V2 Remove Groups From Group - -To programmatically remove groups from a group, use API endpoint.The API removes only the group association. It does not delete the group from the Thoughtspot system. At least one of id or name of group is required. When both are given user id will be considered. - -```ts -async restapiV2RemoveGroupsFromGroup( - body: TspublicRestV2GroupRemovegroupRequest, - requestOptions?: RequestOptions -): Promise> -``` - -## Parameters - -| Parameter | Type | Tags | Description | -| --- | --- | --- | --- | -| `body` | [`TspublicRestV2GroupRemovegroupRequest`](../../doc/models/tspublic-rest-v2-group-removegroup-request.md) | Body, Required | - | -| `requestOptions` | `RequestOptions \| undefined` | Optional | Pass additional request options. | - -## Response Type - -`boolean` - -## Example Usage - -```ts -const contentType = null; -const bodyGroups: GroupNameAndIDInput[] = []; - -const bodygroups0: GroupNameAndIDInput = {}; - -bodyGroups[0] = bodygroups0; - -const body: TspublicRestV2GroupRemovegroupRequest = { - groups: bodyGroups, -}; - -try { - const { result, ...httpResponse } = await groupController.restapiV2RemoveGroupsFromGroup(body); - // Get more response info... - // const { statusCode, headers } = httpResponse; -} catch(error) { - if (error instanceof ApiError) { - const errors = error.result; - // const { statusCode, headers } = error; - } -} -``` - -## Errors - -| HTTP Status Code | Error Description | Exception Class | -| --- | --- | --- | -| 500 | Operation failed | [`ErrorResponseError`](../../doc/models/error-response-error.md) | - - -# Restapi V2 Search Groups - -To get the details of a specific group account or all groups in the ThoughtSpot system, use this end point. - -```ts -async restapiV2SearchGroups( - body: TspublicRestV2GroupSearchRequest, - requestOptions?: RequestOptions -): Promise> -``` - -## Parameters - -| Parameter | Type | Tags | Description | -| --- | --- | --- | --- | -| `body` | [`TspublicRestV2GroupSearchRequest`](../../doc/models/tspublic-rest-v2-group-search-request.md) | Body, Required | - | -| `requestOptions` | `RequestOptions \| undefined` | Optional | Pass additional request options. | - -## Response Type - -`unknown` - -## Example Usage - -```ts -const contentType = null; -const body: TspublicRestV2GroupSearchRequest = {}; - -try { - const { result, ...httpResponse } = await groupController.restapiV2SearchGroups(body); - // Get more response info... - // const { statusCode, headers } = httpResponse; -} catch(error) { - if (error instanceof ApiError) { - const errors = error.result; - // const { statusCode, headers } = error; - } -} -``` - -## Errors - -| HTTP Status Code | Error Description | Exception Class | -| --- | --- | --- | -| 500 | Operation failed | [`ErrorResponseError`](../../doc/models/error-response-error.md) | - diff --git a/Typescript/doc/controllers/logs.md b/Typescript/doc/controllers/logs.md deleted file mode 100644 index c0bf44759..000000000 --- a/Typescript/doc/controllers/logs.md +++ /dev/null @@ -1,67 +0,0 @@ -# Logs - -```ts -const logsController = new LogsController(client); -``` - -## Class Name - -`LogsController` - - -# Restapi V2 Get Log Events - -Note: This endpoint is applicable only for SAAS deployments. - -The ThoughtSpot log streaming service API allows you to programmatically get a security audit event log from the ThoughtSpot system. - -To use this API, make sure you have admin user privileges. - -ThoughtSpot cloud deployments allow you to collect security audit events and send them to your Security information and event management (SIEM) application in real-time. - -These events can help your security operations personnel to detect potential security threats or compromised user accounts in your organization. - -```ts -async restapiV2GetLogEvents( - topic: TopicEnum, - fromEpoch?: string, - toEpoch?: string, - requestOptions?: RequestOptions -): Promise> -``` - -## Parameters - -| Parameter | Type | Tags | Description | -| --- | --- | --- | --- | -| `topic` | [`TopicEnum`](../../doc/models/topic-enum.md) | Query, Required | Type of the log | -| `fromEpoch` | `string \| undefined` | Query, Optional | The EPOCH time in milliseconds to set the start time for streaming logs.

Example: To set the timestamp as June 1, 2021 8 am, specify 1622534400000. | -| `toEpoch` | `string \| undefined` | Query, Optional | The EPOCH time in milliseconds to set the end time for streaming logs.

Example: To set the timestamp as July 1, 2021, 8 am, specify 1625126400000. | -| `requestOptions` | `RequestOptions \| undefined` | Optional | Pass additional request options. | - -## Response Type - -[`LogsResponse`](../../doc/models/logs-response.md) - -## Example Usage - -```ts -const topic = 'security_logs'; -try { - const { result, ...httpResponse } = await logsController.restapiV2GetLogEvents(topic); - // Get more response info... - // const { statusCode, headers } = httpResponse; -} catch(error) { - if (error instanceof ApiError) { - const errors = error.result; - // const { statusCode, headers } = error; - } -} -``` - -## Errors - -| HTTP Status Code | Error Description | Exception Class | -| --- | --- | --- | -| 500 | Operation failed | [`ErrorResponseError`](../../doc/models/error-response-error.md) | - diff --git a/Typescript/doc/controllers/materialization.md b/Typescript/doc/controllers/materialization.md deleted file mode 100644 index 10b71a8cd..000000000 --- a/Typescript/doc/controllers/materialization.md +++ /dev/null @@ -1,59 +0,0 @@ -# Materialization - -```ts -const materializationController = new MaterializationController(client); -``` - -## Class Name - -`MaterializationController` - - -# Restapi V2 Refresh Materialized View - -Use this endpoint to refresh data in the materialized view by running the query associated with it - -```ts -async restapiV2RefreshMaterializedView( - body: TspublicRestV2MaterializationRefreshviewRequest, - requestOptions?: RequestOptions -): Promise> -``` - -## Parameters - -| Parameter | Type | Tags | Description | -| --- | --- | --- | --- | -| `body` | [`TspublicRestV2MaterializationRefreshviewRequest`](../../doc/models/tspublic-rest-v2-materialization-refreshview-request.md) | Body, Required | - | -| `requestOptions` | `RequestOptions \| undefined` | Optional | Pass additional request options. | - -## Response Type - -`unknown` - -## Example Usage - -```ts -const contentType = null; -const body: TspublicRestV2MaterializationRefreshviewRequest = { - id: 'id6', -}; - -try { - const { result, ...httpResponse } = await materializationController.restapiV2RefreshMaterializedView(body); - // Get more response info... - // const { statusCode, headers } = httpResponse; -} catch(error) { - if (error instanceof ApiError) { - const errors = error.result; - // const { statusCode, headers } = error; - } -} -``` - -## Errors - -| HTTP Status Code | Error Description | Exception Class | -| --- | --- | --- | -| 500 | Operation failed | [`ErrorResponseError`](../../doc/models/error-response-error.md) | - diff --git a/Typescript/doc/controllers/metadata.md b/Typescript/doc/controllers/metadata.md deleted file mode 100644 index 5103dcec0..000000000 --- a/Typescript/doc/controllers/metadata.md +++ /dev/null @@ -1,1091 +0,0 @@ -# Metadata - -```ts -const metadataController = new MetadataController(client); -``` - -## Class Name - -`MetadataController` - -## Methods - -* [Restapi V2 Get Tag](../../doc/controllers/metadata.md#restapi-v2-get-tag) -* [Restapi V2 Get Home Liveboard](../../doc/controllers/metadata.md#restapi-v2-get-home-liveboard) -* [Restapi V2 Search Object Header](../../doc/controllers/metadata.md#restapi-v2-search-object-header) -* [Restapi V2 Get Object Visualization Header](../../doc/controllers/metadata.md#restapi-v2-get-object-visualization-header) -* [Restapi V2 Get Object Detail](../../doc/controllers/metadata.md#restapi-v2-get-object-detail) -* [Restapi V2 Get Object Header](../../doc/controllers/metadata.md#restapi-v2-get-object-header) -* [Restapi V2 Search Object Detail](../../doc/controllers/metadata.md#restapi-v2-search-object-detail) -* [Restapi V2 Create Tag](../../doc/controllers/metadata.md#restapi-v2-create-tag) -* [Restapi V2 Update Tag](../../doc/controllers/metadata.md#restapi-v2-update-tag) -* [Restapi V2 Delete Tag](../../doc/controllers/metadata.md#restapi-v2-delete-tag) -* [Restapi V2 Assign Tag](../../doc/controllers/metadata.md#restapi-v2-assign-tag) -* [Restapi V2 Unassign Tag](../../doc/controllers/metadata.md#restapi-v2-unassign-tag) -* [Restapi V2 Assign Favorite](../../doc/controllers/metadata.md#restapi-v2-assign-favorite) -* [Restapi V2 Unassign Favorite](../../doc/controllers/metadata.md#restapi-v2-unassign-favorite) -* [Restapi V2 Assign Home Liveboard](../../doc/controllers/metadata.md#restapi-v2-assign-home-liveboard) -* [Restapi V2 Unassign Home Liveboard](../../doc/controllers/metadata.md#restapi-v2-unassign-home-liveboard) -* [Restapi V2 Export Object TML](../../doc/controllers/metadata.md#restapi-v2-export-object-tml) -* [Restapi V2 Import Object TML](../../doc/controllers/metadata.md#restapi-v2-import-object-tml) -* [Restapi V2 Delete Object](../../doc/controllers/metadata.md#restapi-v2-delete-object) -* [Restapi V2 Get Object Dependency](../../doc/controllers/metadata.md#restapi-v2-get-object-dependency) - - -# Restapi V2 Get Tag - -To get details of a specific tag, use this endpoint. At least one of id or name of tag is required. When both are given, then id will be considered. - -```ts -async restapiV2GetTag( - name?: string, - id?: string, - requestOptions?: RequestOptions -): Promise> -``` - -## Parameters - -| Parameter | Type | Tags | Description | -| --- | --- | --- | --- | -| `name` | `string \| undefined` | Query, Optional | Name of the tag | -| `id` | `string \| undefined` | Query, Optional | The GUID of the tag | -| `requestOptions` | `RequestOptions \| undefined` | Optional | Pass additional request options. | - -## Response Type - -[`MetadataTagResponse`](../../doc/models/metadata-tag-response.md) - -## Example Usage - -```ts -try { - const { result, ...httpResponse } = await metadataController.restapiV2GetTag(); - // Get more response info... - // const { statusCode, headers } = httpResponse; -} catch(error) { - if (error instanceof ApiError) { - const errors = error.result; - // const { statusCode, headers } = error; - } -} -``` - -## Errors - -| HTTP Status Code | Error Description | Exception Class | -| --- | --- | --- | -| 500 | Operation failed | [`ErrorResponseError`](../../doc/models/error-response-error.md) | - - -# Restapi V2 Get Home Liveboard - -To get the name and id of liveboard that is set as a home liveboard for a user, use this endpoint. At least one of user id or username is required. When both are given, then id will be considered. - -```ts -async restapiV2GetHomeLiveboard( - userName?: string, - userId?: string, - requestOptions?: RequestOptions -): Promise> -``` - -## Parameters - -| Parameter | Type | Tags | Description | -| --- | --- | --- | --- | -| `userName` | `string \| undefined` | Query, Optional | Name of the tag | -| `userId` | `string \| undefined` | Query, Optional | The GUID of the tag | -| `requestOptions` | `RequestOptions \| undefined` | Optional | Pass additional request options. | - -## Response Type - -[`HomeLiveboardResponse`](../../doc/models/home-liveboard-response.md) - -## Example Usage - -```ts -try { - const { result, ...httpResponse } = await metadataController.restapiV2GetHomeLiveboard(); - // Get more response info... - // const { statusCode, headers } = httpResponse; -} catch(error) { - if (error instanceof ApiError) { - const errors = error.result; - // const { statusCode, headers } = error; - } -} -``` - -## Errors - -| HTTP Status Code | Error Description | Exception Class | -| --- | --- | --- | -| 500 | Operation failed | [`ErrorResponseError`](../../doc/models/error-response-error.md) | - - -# Restapi V2 Search Object Header - -To get header details for metadata objects, use this endpoint. You can provide as input selective fields to get the data for. - -```ts -async restapiV2SearchObjectHeader( - body: TspublicRestV2MetadataHeaderSearchRequest, - requestOptions?: RequestOptions -): Promise> -``` - -## Parameters - -| Parameter | Type | Tags | Description | -| --- | --- | --- | --- | -| `body` | [`TspublicRestV2MetadataHeaderSearchRequest`](../../doc/models/tspublic-rest-v2-metadata-header-search-request.md) | Body, Required | - | -| `requestOptions` | `RequestOptions \| undefined` | Optional | Pass additional request options. | - -## Response Type - -`unknown` - -## Example Usage - -```ts -const contentType = null; -const body: TspublicRestV2MetadataHeaderSearchRequest = { - type: 'USER', -}; - -try { - const { result, ...httpResponse } = await metadataController.restapiV2SearchObjectHeader(body); - // Get more response info... - // const { statusCode, headers } = httpResponse; -} catch(error) { - if (error instanceof ApiError) { - const errors = error.result; - // const { statusCode, headers } = error; - } -} -``` - -## Errors - -| HTTP Status Code | Error Description | Exception Class | -| --- | --- | --- | -| 500 | Operation failed | [`ErrorResponseError`](../../doc/models/error-response-error.md) | - - -# Restapi V2 Get Object Visualization Header - -Use this endpoint to get header details of visualization charts for a given liveboard or answer. At least one of id or name of liveboard or answer is required. When both are given, then id will be considered. - -```ts -async restapiV2GetObjectVisualizationHeader( - id: string, - requestOptions?: RequestOptions -): Promise> -``` - -## Parameters - -| Parameter | Type | Tags | Description | -| --- | --- | --- | --- | -| `id` | `string` | Query, Required | The GUID of the liveboard or answer | -| `requestOptions` | `RequestOptions \| undefined` | Optional | Pass additional request options. | - -## Response Type - -`unknown[]` - -## Example Usage - -```ts -const id = 'id0'; -try { - const { result, ...httpResponse } = await metadataController.restapiV2GetObjectVisualizationHeader(id); - // Get more response info... - // const { statusCode, headers } = httpResponse; -} catch(error) { - if (error instanceof ApiError) { - const errors = error.result; - // const { statusCode, headers } = error; - } -} -``` - -## Errors - -| HTTP Status Code | Error Description | Exception Class | -| --- | --- | --- | -| 500 | Operation failed | [`ErrorResponseError`](../../doc/models/error-response-error.md) | - - -# Restapi V2 Get Object Detail - -Use this endpoint to get full details of metadata objects - -```ts -async restapiV2GetObjectDetail( - type: Type4Enum, - id: string[], - requestOptions?: RequestOptions -): Promise> -``` - -## Parameters - -| Parameter | Type | Tags | Description | -| --- | --- | --- | --- | -| `type` | [`Type4Enum`](../../doc/models/type-4-enum.md) | Query, Required | Type of the metadata object being searched. | -| `id` | `string[]` | Query, Required | A JSON array of GUIDs of the objects. | -| `requestOptions` | `RequestOptions \| undefined` | Optional | Pass additional request options. | - -## Response Type - -`unknown` - -## Example Usage - -```ts -const type = 'DATAOBJECT'; -const Id: string[] = ['id0']; -try { - const { result, ...httpResponse } = await metadataController.restapiV2GetObjectDetail(type, id); - // Get more response info... - // const { statusCode, headers } = httpResponse; -} catch(error) { - if (error instanceof ApiError) { - const errors = error.result; - // const { statusCode, headers } = error; - } -} -``` - -## Errors - -| HTTP Status Code | Error Description | Exception Class | -| --- | --- | --- | -| 500 | Operation failed | [`ErrorResponseError`](../../doc/models/error-response-error.md) | - - -# Restapi V2 Get Object Header - -To get header detail of a metadata object, use this endpoint. You can provide as input selective fields to get the data for. - -```ts -async restapiV2GetObjectHeader( - type: Type5Enum, - id: string, - outputFields?: string[], - requestOptions?: RequestOptions -): Promise> -``` - -## Parameters - -| Parameter | Type | Tags | Description | -| --- | --- | --- | --- | -| `type` | [`Type5Enum`](../../doc/models/type-5-enum.md) | Query, Required | Type of the metadata object being searched. | -| `id` | `string` | Query, Required | GUID of the metadata object | -| `outputFields` | `string[] \| undefined` | Query, Optional | Array of header field names that need to be included in the header response | -| `requestOptions` | `RequestOptions \| undefined` | Optional | Pass additional request options. | - -## Response Type - -`unknown` - -## Example Usage - -```ts -const type = 'COLUMN_ALL'; -const id = 'id0'; -try { - const { result, ...httpResponse } = await metadataController.restapiV2GetObjectHeader(type, id); - // Get more response info... - // const { statusCode, headers } = httpResponse; -} catch(error) { - if (error instanceof ApiError) { - const errors = error.result; - // const { statusCode, headers } = error; - } -} -``` - -## Errors - -| HTTP Status Code | Error Description | Exception Class | -| --- | --- | --- | -| 500 | Operation failed | [`ErrorResponseError`](../../doc/models/error-response-error.md) | - - -# Restapi V2 Search Object Detail - -Use this endpoint to get full details of metadata objects - -```ts -async restapiV2SearchObjectDetail( - body: TspublicRestV2MetadataDetailSearchRequest, - requestOptions?: RequestOptions -): Promise> -``` - -## Parameters - -| Parameter | Type | Tags | Description | -| --- | --- | --- | --- | -| `body` | [`TspublicRestV2MetadataDetailSearchRequest`](../../doc/models/tspublic-rest-v2-metadata-detail-search-request.md) | Body, Required | - | -| `requestOptions` | `RequestOptions \| undefined` | Optional | Pass additional request options. | - -## Response Type - -`unknown` - -## Example Usage - -```ts -const contentType = null; -const bodyId: string[] = ['id6', 'id7']; -const body: TspublicRestV2MetadataDetailSearchRequest = { - type: 'USER', - id: bodyId, -}; - -try { - const { result, ...httpResponse } = await metadataController.restapiV2SearchObjectDetail(body); - // Get more response info... - // const { statusCode, headers } = httpResponse; -} catch(error) { - if (error instanceof ApiError) { - const errors = error.result; - // const { statusCode, headers } = error; - } -} -``` - -## Errors - -| HTTP Status Code | Error Description | Exception Class | -| --- | --- | --- | -| 500 | Operation failed | [`ErrorResponseError`](../../doc/models/error-response-error.md) | - - -# Restapi V2 Create Tag - -To programmatically create tags, use this endpoint - -```ts -async restapiV2CreateTag( - body: TspublicRestV2MetadataTagCreateRequest, - requestOptions?: RequestOptions -): Promise> -``` - -## Parameters - -| Parameter | Type | Tags | Description | -| --- | --- | --- | --- | -| `body` | [`TspublicRestV2MetadataTagCreateRequest`](../../doc/models/tspublic-rest-v2-metadata-tag-create-request.md) | Body, Required | - | -| `requestOptions` | `RequestOptions \| undefined` | Optional | Pass additional request options. | - -## Response Type - -[`MetadataTagResponse`](../../doc/models/metadata-tag-response.md) - -## Example Usage - -```ts -const contentType = null; -const body: TspublicRestV2MetadataTagCreateRequest = { - name: 'name6', -}; - -try { - const { result, ...httpResponse } = await metadataController.restapiV2CreateTag(body); - // Get more response info... - // const { statusCode, headers } = httpResponse; -} catch(error) { - if (error instanceof ApiError) { - const errors = error.result; - // const { statusCode, headers } = error; - } -} -``` - -## Errors - -| HTTP Status Code | Error Description | Exception Class | -| --- | --- | --- | -| 500 | Operation failed | [`ErrorResponseError`](../../doc/models/error-response-error.md) | - - -# Restapi V2 Update Tag - -To programmatically update tags, use this endpoint. At least one of id or name of tag is required. When both are given, then id will be considered. - -```ts -async restapiV2UpdateTag( - body: TspublicRestV2MetadataTagUpdateRequest, - requestOptions?: RequestOptions -): Promise> -``` - -## Parameters - -| Parameter | Type | Tags | Description | -| --- | --- | --- | --- | -| `body` | [`TspublicRestV2MetadataTagUpdateRequest`](../../doc/models/tspublic-rest-v2-metadata-tag-update-request.md) | Body, Required | - | -| `requestOptions` | `RequestOptions \| undefined` | Optional | Pass additional request options. | - -## Response Type - -`boolean` - -## Example Usage - -```ts -const contentType = null; -const body: TspublicRestV2MetadataTagUpdateRequest = {}; - -try { - const { result, ...httpResponse } = await metadataController.restapiV2UpdateTag(body); - // Get more response info... - // const { statusCode, headers } = httpResponse; -} catch(error) { - if (error instanceof ApiError) { - const errors = error.result; - // const { statusCode, headers } = error; - } -} -``` - -## Errors - -| HTTP Status Code | Error Description | Exception Class | -| --- | --- | --- | -| 500 | Operation failed | [`ErrorResponseError`](../../doc/models/error-response-error.md) | - - -# Restapi V2 Delete Tag - -To programmatically delete tags, use this endpoint. At least one of id or name of tag is required. When both are given, then id will be considered. - -```ts -async restapiV2DeleteTag( - name?: string, - id?: string, - requestOptions?: RequestOptions -): Promise> -``` - -## Parameters - -| Parameter | Type | Tags | Description | -| --- | --- | --- | --- | -| `name` | `string \| undefined` | Query, Optional | Name of the tag | -| `id` | `string \| undefined` | Query, Optional | The GUID of the tag | -| `requestOptions` | `RequestOptions \| undefined` | Optional | Pass additional request options. | - -## Response Type - -`boolean` - -## Example Usage - -```ts -try { - const { result, ...httpResponse } = await metadataController.restapiV2DeleteTag(); - // Get more response info... - // const { statusCode, headers } = httpResponse; -} catch(error) { - if (error instanceof ApiError) { - const errors = error.result; - // const { statusCode, headers } = error; - } -} -``` - -## Errors - -| HTTP Status Code | Error Description | Exception Class | -| --- | --- | --- | -| 500 | Operation failed | [`ErrorResponseError`](../../doc/models/error-response-error.md) | - - -# Restapi V2 Assign Tag - -To programmatically assign tags to a metadata object, such as a liveboard, search answer, table, worksheet, or view, use this endpoint. At least one of id or name of tag is required. When both are given, then id will be considered. - -```ts -async restapiV2AssignTag( - body: TspublicRestV2MetadataTagAssignRequest, - requestOptions?: RequestOptions -): Promise> -``` - -## Parameters - -| Parameter | Type | Tags | Description | -| --- | --- | --- | --- | -| `body` | [`TspublicRestV2MetadataTagAssignRequest`](../../doc/models/tspublic-rest-v2-metadata-tag-assign-request.md) | Body, Required | - | -| `requestOptions` | `RequestOptions \| undefined` | Optional | Pass additional request options. | - -## Response Type - -`boolean` - -## Example Usage - -```ts -const contentType = null; -const bodyTsObject: TsObjectInput[] = []; - -const bodytsObject0: TsObjectInput = { - id: 'id8', - type: 'DATAOBJECT', -}; - -bodyTsObject[0] = bodytsObject0; - -const bodytsObject1: TsObjectInput = { - id: 'id9', - type: 'CONNECTION', -}; - -bodyTsObject[1] = bodytsObject1; - -const bodytsObject2: TsObjectInput = { - id: 'id0', - type: 'ANSWER', -}; - -bodyTsObject[2] = bodytsObject2; - -const body: TspublicRestV2MetadataTagAssignRequest = { - tsObject: bodyTsObject, -}; - -try { - const { result, ...httpResponse } = await metadataController.restapiV2AssignTag(body); - // Get more response info... - // const { statusCode, headers } = httpResponse; -} catch(error) { - if (error instanceof ApiError) { - const errors = error.result; - // const { statusCode, headers } = error; - } -} -``` - -## Errors - -| HTTP Status Code | Error Description | Exception Class | -| --- | --- | --- | -| 500 | Operation failed | [`ErrorResponseError`](../../doc/models/error-response-error.md) | - - -# Restapi V2 Unassign Tag - -To programmatically unassign tags to a metadata object, such as a liveboard, search answer, table, worksheet, or view, use this endpoint. At least one of id or name of tag is required. When both are given, then id will be considered. - -```ts -async restapiV2UnassignTag( - body: TspublicRestV2MetadataTagUnassignRequest, - requestOptions?: RequestOptions -): Promise> -``` - -## Parameters - -| Parameter | Type | Tags | Description | -| --- | --- | --- | --- | -| `body` | [`TspublicRestV2MetadataTagUnassignRequest`](../../doc/models/tspublic-rest-v2-metadata-tag-unassign-request.md) | Body, Required | - | -| `requestOptions` | `RequestOptions \| undefined` | Optional | Pass additional request options. | - -## Response Type - -`boolean` - -## Example Usage - -```ts -const contentType = null; -const bodyTsObject: TsObjectInput[] = []; - -const bodytsObject0: TsObjectInput = { - id: 'id8', - type: 'DATAOBJECT', -}; - -bodyTsObject[0] = bodytsObject0; - -const bodytsObject1: TsObjectInput = { - id: 'id9', - type: 'CONNECTION', -}; - -bodyTsObject[1] = bodytsObject1; - -const bodytsObject2: TsObjectInput = { - id: 'id0', - type: 'ANSWER', -}; - -bodyTsObject[2] = bodytsObject2; - -const body: TspublicRestV2MetadataTagUnassignRequest = { - tsObject: bodyTsObject, -}; - -try { - const { result, ...httpResponse } = await metadataController.restapiV2UnassignTag(body); - // Get more response info... - // const { statusCode, headers } = httpResponse; -} catch(error) { - if (error instanceof ApiError) { - const errors = error.result; - // const { statusCode, headers } = error; - } -} -``` - -## Errors - -| HTTP Status Code | Error Description | Exception Class | -| --- | --- | --- | -| 500 | Operation failed | [`ErrorResponseError`](../../doc/models/error-response-error.md) | - - -# Restapi V2 Assign Favorite - -To programmatically assign objects to favorites for a given user account, use this endpoint. At least one of user id or username is required. When both are given, then id will be considered. - -```ts -async restapiV2AssignFavorite( - body: TspublicRestV2MetadataFavoriteAssignRequest, - requestOptions?: RequestOptions -): Promise> -``` - -## Parameters - -| Parameter | Type | Tags | Description | -| --- | --- | --- | --- | -| `body` | [`TspublicRestV2MetadataFavoriteAssignRequest`](../../doc/models/tspublic-rest-v2-metadata-favorite-assign-request.md) | Body, Required | - | -| `requestOptions` | `RequestOptions \| undefined` | Optional | Pass additional request options. | - -## Response Type - -`boolean` - -## Example Usage - -```ts -const contentType = null; -const bodyTsObject: TsObjectInput[] = []; - -const bodytsObject0: TsObjectInput = { - id: 'id8', - type: 'DATAOBJECT', -}; - -bodyTsObject[0] = bodytsObject0; - -const bodytsObject1: TsObjectInput = { - id: 'id9', - type: 'CONNECTION', -}; - -bodyTsObject[1] = bodytsObject1; - -const bodytsObject2: TsObjectInput = { - id: 'id0', - type: 'ANSWER', -}; - -bodyTsObject[2] = bodytsObject2; - -const body: TspublicRestV2MetadataFavoriteAssignRequest = { - tsObject: bodyTsObject, -}; - -try { - const { result, ...httpResponse } = await metadataController.restapiV2AssignFavorite(body); - // Get more response info... - // const { statusCode, headers } = httpResponse; -} catch(error) { - if (error instanceof ApiError) { - const errors = error.result; - // const { statusCode, headers } = error; - } -} -``` - -## Errors - -| HTTP Status Code | Error Description | Exception Class | -| --- | --- | --- | -| 500 | Operation failed | [`ErrorResponseError`](../../doc/models/error-response-error.md) | - - -# Restapi V2 Unassign Favorite - -To programmatically unassign objects to favorites for a given user account, use this endpoint. At least one of user id or username is required. When both are given, then id will be considered. - -```ts -async restapiV2UnassignFavorite( - body: TspublicRestV2MetadataFavoriteUnassignRequest, - requestOptions?: RequestOptions -): Promise> -``` - -## Parameters - -| Parameter | Type | Tags | Description | -| --- | --- | --- | --- | -| `body` | [`TspublicRestV2MetadataFavoriteUnassignRequest`](../../doc/models/tspublic-rest-v2-metadata-favorite-unassign-request.md) | Body, Required | - | -| `requestOptions` | `RequestOptions \| undefined` | Optional | Pass additional request options. | - -## Response Type - -`boolean` - -## Example Usage - -```ts -const contentType = null; -const bodyTsObject: TsObjectInput[] = []; - -const bodytsObject0: TsObjectInput = { - id: 'id8', - type: 'DATAOBJECT', -}; - -bodyTsObject[0] = bodytsObject0; - -const bodytsObject1: TsObjectInput = { - id: 'id9', - type: 'CONNECTION', -}; - -bodyTsObject[1] = bodytsObject1; - -const bodytsObject2: TsObjectInput = { - id: 'id0', - type: 'ANSWER', -}; - -bodyTsObject[2] = bodytsObject2; - -const body: TspublicRestV2MetadataFavoriteUnassignRequest = { - tsObject: bodyTsObject, -}; - -try { - const { result, ...httpResponse } = await metadataController.restapiV2UnassignFavorite(body); - // Get more response info... - // const { statusCode, headers } = httpResponse; -} catch(error) { - if (error instanceof ApiError) { - const errors = error.result; - // const { statusCode, headers } = error; - } -} -``` - -## Errors - -| HTTP Status Code | Error Description | Exception Class | -| --- | --- | --- | -| 500 | Operation failed | [`ErrorResponseError`](../../doc/models/error-response-error.md) | - - -# Restapi V2 Assign Home Liveboard - -To assign a specific liveboard as a home liveboard for a user, use this endpoint. At least one of user id or username is required. When both are given, then id will be considered. - -```ts -async restapiV2AssignHomeLiveboard( - body: TspublicRestV2MetadataHomeliveboardAssignRequest, - requestOptions?: RequestOptions -): Promise> -``` - -## Parameters - -| Parameter | Type | Tags | Description | -| --- | --- | --- | --- | -| `body` | [`TspublicRestV2MetadataHomeliveboardAssignRequest`](../../doc/models/tspublic-rest-v2-metadata-homeliveboard-assign-request.md) | Body, Required | - | -| `requestOptions` | `RequestOptions \| undefined` | Optional | Pass additional request options. | - -## Response Type - -`boolean` - -## Example Usage - -```ts -const contentType = null; -const body: TspublicRestV2MetadataHomeliveboardAssignRequest = {}; - -try { - const { result, ...httpResponse } = await metadataController.restapiV2AssignHomeLiveboard(body); - // Get more response info... - // const { statusCode, headers } = httpResponse; -} catch(error) { - if (error instanceof ApiError) { - const errors = error.result; - // const { statusCode, headers } = error; - } -} -``` - -## Errors - -| HTTP Status Code | Error Description | Exception Class | -| --- | --- | --- | -| 500 | Operation failed | [`ErrorResponseError`](../../doc/models/error-response-error.md) | - - -# Restapi V2 Unassign Home Liveboard - -To unassign the home liveboard set for a user, use this endpoint. At least one of user id or username is required. When both are given, then id will be considered. - -```ts -async restapiV2UnassignHomeLiveboard( - body: TspublicRestV2MetadataHomeliveboardUnassignRequest, - requestOptions?: RequestOptions -): Promise> -``` - -## Parameters - -| Parameter | Type | Tags | Description | -| --- | --- | --- | --- | -| `body` | [`TspublicRestV2MetadataHomeliveboardUnassignRequest`](../../doc/models/tspublic-rest-v2-metadata-homeliveboard-unassign-request.md) | Body, Required | - | -| `requestOptions` | `RequestOptions \| undefined` | Optional | Pass additional request options. | - -## Response Type - -`boolean` - -## Example Usage - -```ts -const contentType = null; -const body: TspublicRestV2MetadataHomeliveboardUnassignRequest = {}; - -try { - const { result, ...httpResponse } = await metadataController.restapiV2UnassignHomeLiveboard(body); - // Get more response info... - // const { statusCode, headers } = httpResponse; -} catch(error) { - if (error instanceof ApiError) { - const errors = error.result; - // const { statusCode, headers } = error; - } -} -``` - -## Errors - -| HTTP Status Code | Error Description | Exception Class | -| --- | --- | --- | -| 500 | Operation failed | [`ErrorResponseError`](../../doc/models/error-response-error.md) | - - -# Restapi V2 Export Object TML - -To export ThoughtSpot objects represented in ThoughtSpot Modeling Language (TML), use this endpoint - -```ts -async restapiV2ExportObjectTML( - body: TspublicRestV2MetadataTmlExportRequest, - requestOptions?: RequestOptions -): Promise> -``` - -## Parameters - -| Parameter | Type | Tags | Description | -| --- | --- | --- | --- | -| `body` | [`TspublicRestV2MetadataTmlExportRequest`](../../doc/models/tspublic-rest-v2-metadata-tml-export-request.md) | Body, Required | - | -| `requestOptions` | `RequestOptions \| undefined` | Optional | Pass additional request options. | - -## Response Type - -`unknown` - -## Example Usage - -```ts -const contentType = null; -const bodyId: string[] = ['id6', 'id7']; -const body: TspublicRestV2MetadataTmlExportRequest = { - id: bodyId, -}; - -try { - const { result, ...httpResponse } = await metadataController.restapiV2ExportObjectTML(body); - // Get more response info... - // const { statusCode, headers } = httpResponse; -} catch(error) { - if (error instanceof ApiError) { - const errors = error.result; - // const { statusCode, headers } = error; - } -} -``` - -## Errors - -| HTTP Status Code | Error Description | Exception Class | -| --- | --- | --- | -| 500 | Operation failed | [`ErrorResponseError`](../../doc/models/error-response-error.md) | - - -# Restapi V2 Import Object TML - -To import ThoughtSpot objects represented in ThoughtSpot Modeling Language (TML), use this endpoint - -```ts -async restapiV2ImportObjectTML( - body: TspublicRestV2MetadataTmlImportRequest, - requestOptions?: RequestOptions -): Promise> -``` - -## Parameters - -| Parameter | Type | Tags | Description | -| --- | --- | --- | --- | -| `body` | [`TspublicRestV2MetadataTmlImportRequest`](../../doc/models/tspublic-rest-v2-metadata-tml-import-request.md) | Body, Required | - | -| `requestOptions` | `RequestOptions \| undefined` | Optional | Pass additional request options. | - -## Response Type - -`unknown` - -## Example Usage - -```ts -const contentType = null; -const bodyObjectTML: string[] = ['objectTML5', 'objectTML6']; -const body: TspublicRestV2MetadataTmlImportRequest = { - objectTML: bodyObjectTML, -}; - -try { - const { result, ...httpResponse } = await metadataController.restapiV2ImportObjectTML(body); - // Get more response info... - // const { statusCode, headers } = httpResponse; -} catch(error) { - if (error instanceof ApiError) { - const errors = error.result; - // const { statusCode, headers } = error; - } -} -``` - -## Errors - -| HTTP Status Code | Error Description | Exception Class | -| --- | --- | --- | -| 500 | Operation failed | [`ErrorResponseError`](../../doc/models/error-response-error.md) | - - -# Restapi V2 Delete Object - -Use this endpoint to delete the metadata objects - -```ts -async restapiV2DeleteObject( - type: Type4Enum, - id: string[], - requestOptions?: RequestOptions -): Promise> -``` - -## Parameters - -| Parameter | Type | Tags | Description | -| --- | --- | --- | --- | -| `type` | [`Type4Enum`](../../doc/models/type-4-enum.md) | Query, Required | Type of the metadata object being searched | -| `id` | `string[]` | Query, Required | A JSON array of GUIDs of the objects | -| `requestOptions` | `RequestOptions \| undefined` | Optional | Pass additional request options. | - -## Response Type - -`boolean` - -## Example Usage - -```ts -const type = 'DATAOBJECT'; -const Id: string[] = ['id0']; -try { - const { result, ...httpResponse } = await metadataController.restapiV2DeleteObject(type, id); - // Get more response info... - // const { statusCode, headers } = httpResponse; -} catch(error) { - if (error instanceof ApiError) { - const errors = error.result; - // const { statusCode, headers } = error; - } -} -``` - -## Errors - -| HTTP Status Code | Error Description | Exception Class | -| --- | --- | --- | -| 500 | Operation failed | [`ErrorResponseError`](../../doc/models/error-response-error.md) | - - -# Restapi V2 Get Object Dependency - -To query the details of dependent objects and associate objects as dependents, you can use this API. Dependency is defined as relation between referenced and referencing objects. A referencing object is said to have a dependency on a referenced object, if the referenced object cannot be deleted without first deleting the referencing object. For example, consider a worksheet 'W1' that has a derived logical column 'C1' that has a reference to a base logical column 'C2'. This can be shown diagramatically as: W1-->C1-->C2. W1 has a dependency on C2 i.e. W1 is a referencing object and C2 is a referenced object. It is not possible to delete C2 without first deleting W1 because deletion of C2 will be prevented by the relationship between W1's column C1 and C2. Similarly C1 is said to have a dependency on C2 i.e. C1 is a referencing object and C2 is a referenced object. It is not possible to delete C2 without first deleting C1 - -```ts -async restapiV2GetObjectDependency( - body: TspublicRestV2MetadataDependencyRequest, - requestOptions?: RequestOptions -): Promise> -``` - -## Parameters - -| Parameter | Type | Tags | Description | -| --- | --- | --- | --- | -| `body` | [`TspublicRestV2MetadataDependencyRequest`](../../doc/models/tspublic-rest-v2-metadata-dependency-request.md) | Body, Required | - | -| `requestOptions` | `RequestOptions \| undefined` | Optional | Pass additional request options. | - -## Response Type - -`unknown` - -## Example Usage - -```ts -const contentType = null; -const bodyId: string[] = ['id6', 'id7']; -const body: TspublicRestV2MetadataDependencyRequest = { - type: 'COLUMN', - id: bodyId, -}; - -try { - const { result, ...httpResponse } = await metadataController.restapiV2GetObjectDependency(body); - // Get more response info... - // const { statusCode, headers } = httpResponse; -} catch(error) { - if (error instanceof ApiError) { - const errors = error.result; - // const { statusCode, headers } = error; - } -} -``` - -## Errors - -| HTTP Status Code | Error Description | Exception Class | -| --- | --- | --- | -| 500 | Operation failed | [`ErrorResponseError`](../../doc/models/error-response-error.md) | - diff --git a/Typescript/doc/controllers/org.md b/Typescript/doc/controllers/org.md deleted file mode 100644 index 4aca92865..000000000 --- a/Typescript/doc/controllers/org.md +++ /dev/null @@ -1,271 +0,0 @@ -# Org - -```ts -const orgController = new OrgController(client); -``` - -## Class Name - -`OrgController` - -## Methods - -* [Restapi V2 Get Org](../../doc/controllers/org.md#restapi-v2-get-org) -* [Restapi V2 Create Org](../../doc/controllers/org.md#restapi-v2-create-org) -* [Restapi V2 Update Org](../../doc/controllers/org.md#restapi-v2-update-org) -* [Restapi V2 Delete Org](../../doc/controllers/org.md#restapi-v2-delete-org) -* [Restapi V2 Search Orgs](../../doc/controllers/org.md#restapi-v2-search-orgs) - - -# Restapi V2 Get Org - -To get the details of a specific organization by name or id, use this endpoint. - -At least one value needed. When both are given,then id will be considered to fetch organization information. - -Requires Administration privilege for tenant. - -```ts -async restapiV2GetOrg( - name?: string, - id?: number, - requestOptions?: RequestOptions -): Promise> -``` - -## Parameters - -| Parameter | Type | Tags | Description | -| --- | --- | --- | --- | -| `name` | `string \| undefined` | Query, Optional | Name of the organization. | -| `id` | `number \| undefined` | Query, Optional | The ID of the organization. | -| `requestOptions` | `RequestOptions \| undefined` | Optional | Pass additional request options. | - -## Response Type - -[`OrgsResponse`](../../doc/models/orgs-response.md) - -## Example Usage - -```ts -try { - const { result, ...httpResponse } = await orgController.restapiV2GetOrg(); - // Get more response info... - // const { statusCode, headers } = httpResponse; -} catch(error) { - if (error instanceof ApiError) { - const errors = error.result; - // const { statusCode, headers } = error; - } -} -``` - -## Errors - -| HTTP Status Code | Error Description | Exception Class | -| --- | --- | --- | -| 500 | Operation failed | [`ErrorResponseError`](../../doc/models/error-response-error.md) | - - -# Restapi V2 Create Org - -To programmatically create an organization in the ThoughtSpot system, use this API endpoint. - -Requires Administration privilege for tenant. - -```ts -async restapiV2CreateOrg( - body: TspublicRestV2OrgCreateRequest, - requestOptions?: RequestOptions -): Promise> -``` - -## Parameters - -| Parameter | Type | Tags | Description | -| --- | --- | --- | --- | -| `body` | [`TspublicRestV2OrgCreateRequest`](../../doc/models/tspublic-rest-v2-org-create-request.md) | Body, Required | - | -| `requestOptions` | `RequestOptions \| undefined` | Optional | Pass additional request options. | - -## Response Type - -[`OrgsResponse`](../../doc/models/orgs-response.md) - -## Example Usage - -```ts -const contentType = null; -const body: TspublicRestV2OrgCreateRequest = { - name: 'name6', -}; - -try { - const { result, ...httpResponse } = await orgController.restapiV2CreateOrg(body); - // Get more response info... - // const { statusCode, headers } = httpResponse; -} catch(error) { - if (error instanceof ApiError) { - const errors = error.result; - // const { statusCode, headers } = error; - } -} -``` - -## Errors - -| HTTP Status Code | Error Description | Exception Class | -| --- | --- | --- | -| 500 | Operation failed | [`ErrorResponseError`](../../doc/models/error-response-error.md) | - - -# Restapi V2 Update Org - -You can use this endpoint to programmatically modify an existing org. - -Provide name or id of the organization to update the properties. When both id and name are given, then id will be considered and name of the organization will be updated. - -Requires Administration privilege for tenant. - -```ts -async restapiV2UpdateOrg( - body: TspublicRestV2OrgUpdateRequest, - requestOptions?: RequestOptions -): Promise> -``` - -## Parameters - -| Parameter | Type | Tags | Description | -| --- | --- | --- | --- | -| `body` | [`TspublicRestV2OrgUpdateRequest`](../../doc/models/tspublic-rest-v2-org-update-request.md) | Body, Required | - | -| `requestOptions` | `RequestOptions \| undefined` | Optional | Pass additional request options. | - -## Response Type - -[`OrgsResponse`](../../doc/models/orgs-response.md) - -## Example Usage - -```ts -const contentType = null; -const body: TspublicRestV2OrgUpdateRequest = {}; - -try { - const { result, ...httpResponse } = await orgController.restapiV2UpdateOrg(body); - // Get more response info... - // const { statusCode, headers } = httpResponse; -} catch(error) { - if (error instanceof ApiError) { - const errors = error.result; - // const { statusCode, headers } = error; - } -} -``` - -## Errors - -| HTTP Status Code | Error Description | Exception Class | -| --- | --- | --- | -| 500 | Operation failed | [`ErrorResponseError`](../../doc/models/error-response-error.md) | - - -# Restapi V2 Delete Org - -To remove an organization from the ThoughtSpot system, send a DELETE request to this endpoint. - -At least one value is needed. When both id and name are given, then id will be considered. - -Requires Administration privilege for tenant. - -```ts -async restapiV2DeleteOrg( - name?: string, - id?: number, - requestOptions?: RequestOptions -): Promise> -``` - -## Parameters - -| Parameter | Type | Tags | Description | -| --- | --- | --- | --- | -| `name` | `string \| undefined` | Query, Optional | Name of the organization. | -| `id` | `number \| undefined` | Query, Optional | The ID of the organization. | -| `requestOptions` | `RequestOptions \| undefined` | Optional | Pass additional request options. | - -## Response Type - -`boolean` - -## Example Usage - -```ts -try { - const { result, ...httpResponse } = await orgController.restapiV2DeleteOrg(); - // Get more response info... - // const { statusCode, headers } = httpResponse; -} catch(error) { - if (error instanceof ApiError) { - const errors = error.result; - // const { statusCode, headers } = error; - } -} -``` - -## Errors - -| HTTP Status Code | Error Description | Exception Class | -| --- | --- | --- | -| 500 | Operation failed | [`ErrorResponseError`](../../doc/models/error-response-error.md) | - - -# Restapi V2 Search Orgs - -To get the details of a specific organization or all organizations in the ThoughtSpot system use this end point. - -If no input is provided, then all organizations are included in the response. - -Requires Administration privilege for tenant. - -```ts -async restapiV2SearchOrgs( - body: TspublicRestV2OrgSearchRequest, - requestOptions?: RequestOptions -): Promise> -``` - -## Parameters - -| Parameter | Type | Tags | Description | -| --- | --- | --- | --- | -| `body` | [`TspublicRestV2OrgSearchRequest`](../../doc/models/tspublic-rest-v2-org-search-request.md) | Body, Required | - | -| `requestOptions` | `RequestOptions \| undefined` | Optional | Pass additional request options. | - -## Response Type - -[`OrgsResponse[]`](../../doc/models/orgs-response.md) - -## Example Usage - -```ts -const contentType = null; -const body: TspublicRestV2OrgSearchRequest = {}; - -try { - const { result, ...httpResponse } = await orgController.restapiV2SearchOrgs(body); - // Get more response info... - // const { statusCode, headers } = httpResponse; -} catch(error) { - if (error instanceof ApiError) { - const errors = error.result; - // const { statusCode, headers } = error; - } -} -``` - -## Errors - -| HTTP Status Code | Error Description | Exception Class | -| --- | --- | --- | -| 500 | Operation failed | [`ErrorResponseError`](../../doc/models/error-response-error.md) | - diff --git a/Typescript/doc/controllers/report.md b/Typescript/doc/controllers/report.md deleted file mode 100644 index 05131cae4..000000000 --- a/Typescript/doc/controllers/report.md +++ /dev/null @@ -1,120 +0,0 @@ -# Report - -```ts -const reportController = new ReportController(client); -``` - -## Class Name - -`ReportController` - -## Methods - -* [Restapi V2 Answer Report](../../doc/controllers/report.md#restapi-v2-answer-report) -* [Restapi V2 Liveboard Report](../../doc/controllers/report.md#restapi-v2-liveboard-report) - - -# Restapi V2 Answer Report - -To programmatically download Answer data as a file, use this endpoint. - -The PDF will download data in the tabular format even if Answer is saved as chart. - -```ts -async restapiV2AnswerReport( - id: string, - type: Type16Enum, - requestOptions?: RequestOptions -): Promise> -``` - -## Parameters - -| Parameter | Type | Tags | Description | -| --- | --- | --- | --- | -| `id` | `string` | Query, Required | GUID of the Answer to download. | -| `type` | [`Type16Enum`](../../doc/models/type-16-enum.md) | Query, Required | Type of file to be generated. | -| `requestOptions` | `RequestOptions \| undefined` | Optional | Pass additional request options. | - -## Response Type - -`unknown` - -## Example Usage - -```ts -const id = 'id0'; -const type = 'PDF'; -try { - const { result, ...httpResponse } = await reportController.restapiV2AnswerReport(id, type); - // Get more response info... - // const { statusCode, headers } = httpResponse; -} catch(error) { - if (error instanceof ApiError) { - const errors = error.result; - // const { statusCode, headers } = error; - } -} -``` - -## Errors - -| HTTP Status Code | Error Description | Exception Class | -| --- | --- | --- | -| 500 | Operation failed | [`ErrorResponseError`](../../doc/models/error-response-error.md) | - - -# Restapi V2 Liveboard Report - -To programmatically download Liveboard data or specific Visualization data from Liveboard as a file, use this endpoint - -```ts -async restapiV2LiveboardReport( - type: Type16Enum, - id?: string, - vizId?: string[], - transientContent?: string, - runtimeFilter?: string, - runtimeSort?: string, - requestOptions?: RequestOptions -): Promise> -``` - -## Parameters - -| Parameter | Type | Tags | Description | -| --- | --- | --- | --- | -| `type` | [`Type16Enum`](../../doc/models/type-16-enum.md) | Query, Required | Type of file to be generated. Valid values: CSV/XLSX/PDF/PNG. | -| `id` | `string \| undefined` | Query, Optional | GUID of the Liveboard to download.

This field is considered only when no input is provided for transientContent field. | -| `vizId` | `string[] \| undefined` | Query, Optional | JSON Array of GUIDs of the visualizations in the Liveboard to be included in the downloaded file.

For CSV, XLSX and PNG file download, visualization id is mandatory. CSV and XLSX is valid only for visualization of type table and PNG is valid for charts.

Only one value will be accepted for these formats. If multiple values are provided then first value in the array will be considered. | -| `transientContent` | `string \| undefined` | Query, Optional | If you have embedded ThoughtSpot in your host application, and you want to download Liveboards with unsaved changes as a file, pass the transient content from the browser fetch request, using the getExportRequestForCurrentPinboard method. For more information, see https://developers.thoughtspot.com/docs/?pageid=liveboard-export-api#transient-pinboard. | -| `runtimeFilter` | `string \| undefined` | Query, Optional | If you have embedded ThoughtSpot in your host application, and you want to download Liveboards with unsaved changes as a file, pass the transient content from the browser fetch request, using the getExportRequestForCurrentPinboard method. For more information, see https://developers.thoughtspot.com/docs/?pageid=liveboard-export-api#transient-pinboard . | -| `runtimeSort` | `string \| undefined` | Query, Optional | JSON object which provides columns to sort the data at the time of data retrieval.

Example: {"sortCol1":"region","asc1":true,"sortCol2":"date"}

For more information, see https://developers.thoughtspot.com/docs/?pageid=runtime-filters | -| `requestOptions` | `RequestOptions \| undefined` | Optional | Pass additional request options. | - -## Response Type - -`unknown` - -## Example Usage - -```ts -const type = 'PDF'; -try { - const { result, ...httpResponse } = await reportController.restapiV2LiveboardReport(type); - // Get more response info... - // const { statusCode, headers } = httpResponse; -} catch(error) { - if (error instanceof ApiError) { - const errors = error.result; - // const { statusCode, headers } = error; - } -} -``` - -## Errors - -| HTTP Status Code | Error Description | Exception Class | -| --- | --- | --- | -| 500 | Operation failed | [`ErrorResponseError`](../../doc/models/error-response-error.md) | - diff --git a/Typescript/doc/controllers/security.md b/Typescript/doc/controllers/security.md deleted file mode 100644 index 1f6beee0b..000000000 --- a/Typescript/doc/controllers/security.md +++ /dev/null @@ -1,373 +0,0 @@ -# Security - -```ts -const securityController = new SecurityController(client); -``` - -## Class Name - -`SecurityController` - -## Methods - -* [Restapi V2 Get Permission on Object](../../doc/controllers/security.md#restapi-v2-get-permission-on-object) -* [Restapi V2 Get Permission for Principal](../../doc/controllers/security.md#restapi-v2-get-permission-for-principal) -* [Restapi V2 Share Object](../../doc/controllers/security.md#restapi-v2-share-object) -* [Restapi V2 Share Visualization](../../doc/controllers/security.md#restapi-v2-share-visualization) -* [Restapi V2 Search Permission on Objects](../../doc/controllers/security.md#restapi-v2-search-permission-on-objects) -* [Restapi V2 Search Permission for Principals](../../doc/controllers/security.md#restapi-v2-search-permission-for-principals) - - -# Restapi V2 Get Permission on Object - -To list the permissions for user and user groups on an object, use this endpoint. The response will include only those users and groups with have either VIEW OR MODIFY permission. - -You can optionally see the permission on the dependent objects as well by enabling includeDependent field. - -```ts -async restapiV2GetPermissionOnObject( - id: string, - type: Type7Enum, - includeDependent?: boolean, - requestOptions?: RequestOptions -): Promise> -``` - -## Parameters - -| Parameter | Type | Tags | Description | -| --- | --- | --- | --- | -| `id` | `string` | Query, Required | GUID of the metadata object for which the permission needs to be obtained. | -| `type` | [`Type7Enum`](../../doc/models/type-7-enum.md) | Query, Required | Type of metadata object. Valid values: Liveboard\|Answer\|DataObject\|Column | -| `includeDependent` | `boolean \| undefined` | Query, Optional | When this field is set to true, the API returns the permission details for the dependent objects for the the object included in the request | -| `requestOptions` | `RequestOptions \| undefined` | Optional | Pass additional request options. | - -## Response Type - -[`SecurityPermissionResponse`](../../doc/models/security-permission-response.md) - -## Example Usage - -```ts -const id = 'id0'; -const type = 'DATAOBJECT'; -try { - const { result, ...httpResponse } = await securityController.restapiV2GetPermissionOnObject(id, type); - // Get more response info... - // const { statusCode, headers } = httpResponse; -} catch(error) { - if (error instanceof ApiError) { - const errors = error.result; - // const { statusCode, headers } = error; - } -} -``` - -## Errors - -| HTTP Status Code | Error Description | Exception Class | -| --- | --- | --- | -| 500 | Operation failed | [`ErrorResponseError`](../../doc/models/error-response-error.md) | - - -# Restapi V2 Get Permission for Principal - -Use this endpoint to list the objects on which a user or user group has permission. The response will include only those objects on which the user or user group has either VIEW OR MODIFY permission. - -Requires administration privilege - -```ts -async restapiV2GetPermissionForPrincipal( - id?: string, - name?: string, - requestOptions?: RequestOptions -): Promise> -``` - -## Parameters - -| Parameter | Type | Tags | Description | -| --- | --- | --- | --- | -| `id` | `string \| undefined` | Query, Optional | GUID of the user or user group for which the object permission needs to be obtained | -| `name` | `string \| undefined` | Query, Optional | Name of the ser or user group for which the object permission needs to be obtained | -| `requestOptions` | `RequestOptions \| undefined` | Optional | Pass additional request options. | - -## Response Type - -[`PrincipalSearchResponse`](../../doc/models/principal-search-response.md) - -## Example Usage - -```ts -try { - const { result, ...httpResponse } = await securityController.restapiV2GetPermissionForPrincipal(); - // Get more response info... - // const { statusCode, headers } = httpResponse; -} catch(error) { - if (error instanceof ApiError) { - const errors = error.result; - // const { statusCode, headers } = error; - } -} -``` - -## Errors - -| HTTP Status Code | Error Description | Exception Class | -| --- | --- | --- | -| 500 | Operation failed | [`ErrorResponseError`](../../doc/models/error-response-error.md) | - - -# Restapi V2 Share Object - -To programmatically share ThoughtSpot objects with another user or user group, use this endpoint. - -When you share an object like a Liveboard or visualization, a notification with a live link is sent to the user. When the users access this object, they can view the last saved version of the object. - -```ts -async restapiV2ShareObject( - body: TspublicRestV2SecurityShareTsobjectRequest, - requestOptions?: RequestOptions -): Promise> -``` - -## Parameters - -| Parameter | Type | Tags | Description | -| --- | --- | --- | --- | -| `body` | [`TspublicRestV2SecurityShareTsobjectRequest`](../../doc/models/tspublic-rest-v2-security-share-tsobject-request.md) | Body, Required | - | -| `requestOptions` | `RequestOptions \| undefined` | Optional | Pass additional request options. | - -## Response Type - -`boolean` - -## Example Usage - -```ts -const contentType = null; -const bodyId: string[] = ['id6', 'id7']; -const body: TspublicRestV2SecurityShareTsobjectRequest = { - type: 'DATAOBJECT', - id: bodyId, - permission: 'permission8', -}; - -try { - const { result, ...httpResponse } = await securityController.restapiV2ShareObject(body); - // Get more response info... - // const { statusCode, headers } = httpResponse; -} catch(error) { - if (error instanceof ApiError) { - const errors = error.result; - // const { statusCode, headers } = error; - } -} -``` - -## Errors - -| HTTP Status Code | Error Description | Exception Class | -| --- | --- | --- | -| 500 | Operation failed | [`ErrorResponseError`](../../doc/models/error-response-error.md) | - - -# Restapi V2 Share Visualization - -If you want to share a specific visualization from a Liveboard with another user or user group, then use this endpoint. - -Requires privilege to share the visualization - -```ts -async restapiV2ShareVisualization( - body: TspublicRestV2SecurityShareVisualizationRequest, - requestOptions?: RequestOptions -): Promise> -``` - -## Parameters - -| Parameter | Type | Tags | Description | -| --- | --- | --- | --- | -| `body` | [`TspublicRestV2SecurityShareVisualizationRequest`](../../doc/models/tspublic-rest-v2-security-share-visualization-request.md) | Body, Required | - | -| `requestOptions` | `RequestOptions \| undefined` | Optional | Pass additional request options. | - -## Response Type - -`boolean` - -## Example Usage - -```ts -const contentType = null; -const bodyPrincipalId: string[] = ['principalId2', 'principalId3']; -const body: TspublicRestV2SecurityShareVisualizationRequest = { - id: 'id6', - vizId: 'vizId4', - principalId: bodyPrincipalId, -}; - -try { - const { result, ...httpResponse } = await securityController.restapiV2ShareVisualization(body); - // Get more response info... - // const { statusCode, headers } = httpResponse; -} catch(error) { - if (error instanceof ApiError) { - const errors = error.result; - // const { statusCode, headers } = error; - } -} -``` - -## Errors - -| HTTP Status Code | Error Description | Exception Class | -| --- | --- | --- | -| 500 | Operation failed | [`ErrorResponseError`](../../doc/models/error-response-error.md) | - - -# Restapi V2 Search Permission on Objects - -To list the permissions for user and user groups on a list of objects, use this endpoint. The response will include only those users and groups with have either VIEW OR MODIFY permission. - -You can either provide list of object ids or type of objects to list the permissions for. One of these inputs is mandatory. If both are provided then only object ids will be considred. - -You can optionally provide users or user groups for which the persmission needs to be displayed. - -You can optionally see the permission on the dependent objects as well by enabling includeDependent field. - -Requires administration privilege - -```ts -async restapiV2SearchPermissionOnObjects( - body: TspublicRestV2SecurityPermissionTsobjectSearchRequest, - requestOptions?: RequestOptions -): Promise> -``` - -## Parameters - -| Parameter | Type | Tags | Description | -| --- | --- | --- | --- | -| `body` | [`TspublicRestV2SecurityPermissionTsobjectSearchRequest`](../../doc/models/tspublic-rest-v2-security-permission-tsobject-search-request.md) | Body, Required | - | -| `requestOptions` | `RequestOptions \| undefined` | Optional | Pass additional request options. | - -## Response Type - -[`SecurityPermissionResponse[]`](../../doc/models/security-permission-response.md) - -## Example Usage - -```ts -const contentType = null; -const bodyTsObject: TsObjectSearchInput[] = []; - -const bodytsObject0Id: string[] = ['id8', 'id9']; -const bodytsObject0: TsObjectSearchInput = { - type: 'DATAOBJECT', - id: bodytsObject0Id, -}; - -bodyTsObject[0] = bodytsObject0; - -const bodytsObject1Id: string[] = ['id9', 'id0', 'id1']; -const bodytsObject1: TsObjectSearchInput = { - type: 'COLUMN', - id: bodytsObject1Id, -}; - -bodyTsObject[1] = bodytsObject1; - -const bodytsObject2Id: string[] = ['id0']; -const bodytsObject2: TsObjectSearchInput = { - type: 'LIVEBOARD', - id: bodytsObject2Id, -}; - -bodyTsObject[2] = bodytsObject2; - -const body: TspublicRestV2SecurityPermissionTsobjectSearchRequest = { - tsObject: bodyTsObject, -}; - -try { - const { result, ...httpResponse } = await securityController.restapiV2SearchPermissionOnObjects(body); - // Get more response info... - // const { statusCode, headers } = httpResponse; -} catch(error) { - if (error instanceof ApiError) { - const errors = error.result; - // const { statusCode, headers } = error; - } -} -``` - -## Errors - -| HTTP Status Code | Error Description | Exception Class | -| --- | --- | --- | -| 500 | Operation failed | [`ErrorResponseError`](../../doc/models/error-response-error.md) | - - -# Restapi V2 Search Permission for Principals - -To list the permissions for user and user groups on a list of objects, use this endpoint. The response will include only those users and groups with have either VIEW OR MODIFY permission. - -You can either provide list of object ids or type of objects to list the permissions for. One of these inputs is mandatory. If both are provided then only object ids will be considred. - -You can optionally provide users or user groups for which the persmission needs to be displayed. - -You can optionally see the permission on the dependent objects as well by enabling includeDependent field. - -Requires administration privilege - -```ts -async restapiV2SearchPermissionForPrincipals( - body: TspublicRestV2SecurityPermissionPrincipalSearchRequest, - requestOptions?: RequestOptions -): Promise> -``` - -## Parameters - -| Parameter | Type | Tags | Description | -| --- | --- | --- | --- | -| `body` | [`TspublicRestV2SecurityPermissionPrincipalSearchRequest`](../../doc/models/tspublic-rest-v2-security-permission-principal-search-request.md) | Body, Required | - | -| `requestOptions` | `RequestOptions \| undefined` | Optional | Pass additional request options. | - -## Response Type - -[`PrincipalSearchResponse[]`](../../doc/models/principal-search-response.md) - -## Example Usage - -```ts -const contentType = null; -const bodyPrincipal: UserNameAndIDInput[] = []; - -const bodyprincipal0: UserNameAndIDInput = {}; - -bodyPrincipal[0] = bodyprincipal0; - -const body: TspublicRestV2SecurityPermissionPrincipalSearchRequest = { - principal: bodyPrincipal, -}; - -try { - const { result, ...httpResponse } = await securityController.restapiV2SearchPermissionForPrincipals(body); - // Get more response info... - // const { statusCode, headers } = httpResponse; -} catch(error) { - if (error instanceof ApiError) { - const errors = error.result; - // const { statusCode, headers } = error; - } -} -``` - -## Errors - -| HTTP Status Code | Error Description | Exception Class | -| --- | --- | --- | -| 500 | Operation failed | [`ErrorResponseError`](../../doc/models/error-response-error.md) | - diff --git a/Typescript/doc/controllers/session.md b/Typescript/doc/controllers/session.md deleted file mode 100644 index 7e1d28383..000000000 --- a/Typescript/doc/controllers/session.md +++ /dev/null @@ -1,140 +0,0 @@ -# Session - -```ts -const sessionController = new SessionController(client); -``` - -## Class Name - -`SessionController` - -## Methods - -* [Restapi V2 Login](../../doc/controllers/session.md#restapi-v2-login) -* [Restapi V2 Get Token](../../doc/controllers/session.md#restapi-v2-get-token) - - -# Restapi V2 Login - -You can programmatically create login session for a user in ThoughtSpot using this endpoint. - -You can create session by either providing userName and password as inputs in this request body or by including "Authorization" header with the token generated through the endpoint /tspublic/rest/v2/session/gettoken. - -userName and password input is given precedence over "Authorization" header, when both are included in the request. - -```ts -async restapiV2Login( - userName?: string, - password?: string, - rememberMe?: boolean, - requestOptions?: RequestOptions -): Promise> -``` - -## Parameters - -| Parameter | Type | Tags | Description | -| --- | --- | --- | --- | -| `userName` | `string \| undefined` | Query, Optional | Username of the user account | -| `password` | `string \| undefined` | Query, Optional | The password of the user account | -| `rememberMe` | `boolean \| undefined` | Query, Optional | A flag to remember the user session. When set to true, sets a session cookie that persists in subsequent API calls. | -| `requestOptions` | `RequestOptions \| undefined` | Optional | Pass additional request options. | - -## Response Type - -[`SessionLoginResponse`](../../doc/models/session-login-response.md) - -## Example Usage - -```ts -try { - const { result, ...httpResponse } = await sessionController.restapiV2Login(); - // Get more response info... - // const { statusCode, headers } = httpResponse; -} catch(error) { - if (error instanceof ApiError) { - const errors = error.result; - // const { statusCode, headers } = error; - } -} -``` - -## Errors - -| HTTP Status Code | Error Description | Exception Class | -| --- | --- | --- | -| 500 | Operation failed | [`ErrorResponseError`](../../doc/models/error-response-error.md) | - - -# Restapi V2 Get Token - -To programmatically create session token for a user in ThoughtSpot, use this endpoint. - -You can generate the token for a user by providing password or secret key from the cluster. - -You need to enable trusted authentication to generate secret key. To generate secret key, follow below steps. - -1. Click the Develop tab. - -2. Under Customizations, click Settings. - -3. To enable trusted authentication, turn on the toggle. - -4. A secret_key for trusted authentication is generated. - -5. Click the clipboard icon to copy the token. - -Password is given precedence over secretKey input, when both are included in the request. - -```ts -async restapiV2GetToken( - userName: string, - password?: string, - secretKey?: string, - accessLevel?: AccessLevelEnum, - tsObjectId?: string, - tokenExpiryDuration?: string, - orgId?: string, - requestOptions?: RequestOptions -): Promise> -``` - -## Parameters - -| Parameter | Type | Tags | Description | -| --- | --- | --- | --- | -| `userName` | `string` | Query, Required | Username of the user account | -| `password` | `string \| undefined` | Query, Optional | The password of the user account | -| `secretKey` | `string \| undefined` | Query, Optional | The secret key string provided by the ThoughtSpot application server. ThoughtSpot generates this secret key when you enable trusted authentication. | -| `accessLevel` | [`AccessLevelEnum \| undefined`](../../doc/models/access-level-enum.md) | Query, Optional | User access privilege.

FULL - Creates a session with full access.

REPORT_BOOK_VIEW - Allow view access to the specified visualizations. | -| `tsObjectId` | `string \| undefined` | Query, Optional | GUID of the ThoughtSpot object. If you have set the accessLevel attribute to REPORT_BOOK_VIEW, specify the GUID of the Liveboard or visualization object. | -| `tokenExpiryDuration` | `string \| undefined` | Query, Optional | Duration in seconds after which the token expires | -| `orgId` | `string \| undefined` | Query, Optional | Id of the organization to be associated with the user login. If no input is provided then last logged in organization will be considered | -| `requestOptions` | `RequestOptions \| undefined` | Optional | Pass additional request options. | - -## Response Type - -[`SessionLoginResponse`](../../doc/models/session-login-response.md) - -## Example Usage - -```ts -const userName = 'userName2'; -try { - const { result, ...httpResponse } = await sessionController.restapiV2GetToken(userName); - // Get more response info... - // const { statusCode, headers } = httpResponse; -} catch(error) { - if (error instanceof ApiError) { - const errors = error.result; - // const { statusCode, headers } = error; - } -} -``` - -## Errors - -| HTTP Status Code | Error Description | Exception Class | -| --- | --- | --- | -| 500 | Operation failed | [`ErrorResponseError`](../../doc/models/error-response-error.md) | - diff --git a/Typescript/doc/controllers/user.md b/Typescript/doc/controllers/user.md deleted file mode 100644 index 345695af9..000000000 --- a/Typescript/doc/controllers/user.md +++ /dev/null @@ -1,506 +0,0 @@ -# User - -```ts -const userController = new UserController(client); -``` - -## Class Name - -`UserController` - -## Methods - -* [Restapi V2 Get User](../../doc/controllers/user.md#restapi-v2-get-user) -* [Restapi V2 Create User](../../doc/controllers/user.md#restapi-v2-create-user) -* [Restapi V2 Update User](../../doc/controllers/user.md#restapi-v2-update-user) -* [Restapi V2 Delete User](../../doc/controllers/user.md#restapi-v2-delete-user) -* [Restapi V2 Add User to Groups](../../doc/controllers/user.md#restapi-v2-add-user-to-groups) -* [Restapi V2 Remove User From Groups](../../doc/controllers/user.md#restapi-v2-remove-user-from-groups) -* [Restapi V2 Search Users](../../doc/controllers/user.md#restapi-v2-search-users) -* [Restapi V2 Change Password of User](../../doc/controllers/user.md#restapi-v2-change-password-of-user) -* [Restapi V2 Add User to Orgs](../../doc/controllers/user.md#restapi-v2-add-user-to-orgs) - - -# Restapi V2 Get User - -To get the details of a specific user account by username or user id, use this endpoint. At Least one value is needed. When both are given, user id will be considered to fetch user information - -```ts -async restapiV2GetUser( - name?: string, - id?: string, - requestOptions?: RequestOptions -): Promise> -``` - -## Parameters - -| Parameter | Type | Tags | Description | -| --- | --- | --- | --- | -| `name` | `string \| undefined` | Query, Optional | Username of the user that you want to query. | -| `id` | `string \| undefined` | Query, Optional | The GUID of the user account to query | -| `requestOptions` | `RequestOptions \| undefined` | Optional | Pass additional request options. | - -## Response Type - -[`UserResponse`](../../doc/models/user-response.md) - -## Example Usage - -```ts -try { - const { result, ...httpResponse } = await userController.restapiV2GetUser(); - // Get more response info... - // const { statusCode, headers } = httpResponse; -} catch(error) { - if (error instanceof ApiError) { - const errors = error.result; - // const { statusCode, headers } = error; - } -} -``` - -## Errors - -| HTTP Status Code | Error Description | Exception Class | -| --- | --- | --- | -| 500 | Operation failed | [`ErrorResponseError`](../../doc/models/error-response-error.md) | - - -# Restapi V2 Create User - -To programmatically create a user account in the ThoughtSpot system use this API endpoint. Using this API, you can create a user and assign groups. -To create a user, you require admin user privileges. -All users created in the ThoughtSpot system are added to ALL_GROUP - -```ts -async restapiV2CreateUser( - name: string, - displayName: string, - password: string, - visibility?: VisibilityEnum, - mail?: string, - orgIds?: number[], - state?: StateEnum, - notifyOnShare?: boolean, - showWalkMe?: boolean, - analystOnboardingComplete?: boolean, - type?: Type8Enum, - requestOptions?: RequestOptions -): Promise> -``` - -## Parameters - -| Parameter | Type | Tags | Description | -| --- | --- | --- | --- | -| `name` | `string` | Query, Required | Name of the user. The username string must be unique. | -| `displayName` | `string` | Query, Required | A unique display name string for the user account, usually their first and last name | -| `password` | `string` | Query, Required | Password for the user account. | -| `visibility` | [`VisibilityEnum \| undefined`](../../doc/models/visibility-enum.md) | Query, Optional | Visibility of the user. The visibility attribute is set to DEFAULT when creating a user. The DEFAULT attribute makes a user visible to other users and user groups, and this allows them to share objects | -| `mail` | `string \| undefined` | Query, Optional | Email of the user account | -| `orgIds` | `number[] \| undefined` | Query, Optional | Array of org identifiers. If no value is provided then user will be created in the organization associated with the login session. | -| `state` | [`StateEnum \| undefined`](../../doc/models/state-enum.md) | Query, Optional | Status of user account. acitve or inactive. | -| `notifyOnShare` | `boolean \| undefined` | Query, Optional | User preference for receiving email notifications when another ThoughtSpot user shares answers or pinboards. | -| `showWalkMe` | `boolean \| undefined` | Query, Optional | The user preference for revisiting the onboarding experience. | -| `analystOnboardingComplete` | `boolean \| undefined` | Query, Optional | ThoughtSpot provides an interactive guided walkthrough to onboard new users. The onboarding experience leads users through a set of actions to help users get started and accomplish their tasks quickly. The users can turn off the Onboarding experience and access it again when they need assistance with the ThoughtSpot UI. | -| `type` | [`Type8Enum \| undefined`](../../doc/models/type-8-enum.md) | Query, Optional | Type of user. LOCAL_USER indicates that the user is created locally in the ThoughtSpot system. | -| `requestOptions` | `RequestOptions \| undefined` | Optional | Pass additional request options. | - -## Response Type - -[`UserResponse`](../../doc/models/user-response.md) - -## Example Usage - -```ts -const name = 'name0'; -const displayName = 'displayName2'; -const password = 'password4'; -try { - const { result, ...httpResponse } = await userController.restapiV2CreateUser(name, displayName, password); - // Get more response info... - // const { statusCode, headers } = httpResponse; -} catch(error) { - if (error instanceof ApiError) { - const errors = error.result; - // const { statusCode, headers } = error; - } -} -``` - -## Errors - -| HTTP Status Code | Error Description | Exception Class | -| --- | --- | --- | -| 500 | Operation failed | [`ErrorResponseError`](../../doc/models/error-response-error.md) | - - -# Restapi V2 Update User - -You can use this endpoint to programmatically modify an existing user account. To modify a user, you require admin user privileges. -At least one of User Id or username is mandatory. When both are given, then user id will be considered and username will be updated - -```ts -async restapiV2UpdateUser( - body: TspublicRestV2UserUpdateRequest, - requestOptions?: RequestOptions -): Promise> -``` - -## Parameters - -| Parameter | Type | Tags | Description | -| --- | --- | --- | --- | -| `body` | [`TspublicRestV2UserUpdateRequest`](../../doc/models/tspublic-rest-v2-user-update-request.md) | Body, Required | - | -| `requestOptions` | `RequestOptions \| undefined` | Optional | Pass additional request options. | - -## Response Type - -`boolean` - -## Example Usage - -```ts -const contentType = null; -const body: TspublicRestV2UserUpdateRequest = {}; - -try { - const { result, ...httpResponse } = await userController.restapiV2UpdateUser(body); - // Get more response info... - // const { statusCode, headers } = httpResponse; -} catch(error) { - if (error instanceof ApiError) { - const errors = error.result; - // const { statusCode, headers } = error; - } -} -``` - -## Errors - -| HTTP Status Code | Error Description | Exception Class | -| --- | --- | --- | -| 500 | Operation failed | [`ErrorResponseError`](../../doc/models/error-response-error.md) | - - -# Restapi V2 Delete User - -To remove a user from the ThoughtSpot system, use this endpoint. -At Least one value needed. When both are given user id will be considered to delete user. - -```ts -async restapiV2DeleteUser( - name?: string, - id?: string, - orgId?: number, - requestOptions?: RequestOptions -): Promise> -``` - -## Parameters - -| Parameter | Type | Tags | Description | -| --- | --- | --- | --- | -| `name` | `string \| undefined` | Query, Optional | Username of the user that you want to query. | -| `id` | `string \| undefined` | Query, Optional | The GUID of the user account to query | -| `orgId` | `number \| undefined` | Query, Optional | Unique identifier of the organization from which the user would be deleted. If no value is provided then user will be deleted from the organization associated with the login session. | -| `requestOptions` | `RequestOptions \| undefined` | Optional | Pass additional request options. | - -## Response Type - -`boolean` - -## Example Usage - -```ts -try { - const { result, ...httpResponse } = await userController.restapiV2DeleteUser(); - // Get more response info... - // const { statusCode, headers } = httpResponse; -} catch(error) { - if (error instanceof ApiError) { - const errors = error.result; - // const { statusCode, headers } = error; - } -} -``` - -## Errors - -| HTTP Status Code | Error Description | Exception Class | -| --- | --- | --- | -| 500 | Operation failed | [`ErrorResponseError`](../../doc/models/error-response-error.md) | - - -# Restapi V2 Add User to Groups - -To programmatically add groups to an existing ThoughtSpot user use this endpoint. -When you assign groups to a user, the user inherits the privileges assigned to those groups. -At least one of User Id or username is mandatory. When both are given, then user id will be considered. - -```ts -async restapiV2AddUserToGroups( - body: TspublicRestV2UserAddgroupRequest, - requestOptions?: RequestOptions -): Promise> -``` - -## Parameters - -| Parameter | Type | Tags | Description | -| --- | --- | --- | --- | -| `body` | [`TspublicRestV2UserAddgroupRequest`](../../doc/models/tspublic-rest-v2-user-addgroup-request.md) | Body, Required | - | -| `requestOptions` | `RequestOptions \| undefined` | Optional | Pass additional request options. | - -## Response Type - -`boolean` - -## Example Usage - -```ts -const contentType = null; -const bodyGroups: GroupNameAndIDInput[] = []; - -const bodygroups0: GroupNameAndIDInput = {}; - -bodyGroups[0] = bodygroups0; - -const body: TspublicRestV2UserAddgroupRequest = { - groups: bodyGroups, -}; - -try { - const { result, ...httpResponse } = await userController.restapiV2AddUserToGroups(body); - // Get more response info... - // const { statusCode, headers } = httpResponse; -} catch(error) { - if (error instanceof ApiError) { - const errors = error.result; - // const { statusCode, headers } = error; - } -} -``` - -## Errors - -| HTTP Status Code | Error Description | Exception Class | -| --- | --- | --- | -| 500 | Operation failed | [`ErrorResponseError`](../../doc/models/error-response-error.md) | - - -# Restapi V2 Remove User From Groups - -To programmatically remove groups from an existing ThoughtSpot user, use this API endpoint. -The API removes only the user association. It does not delete the user or group from the Thoughtspot system -At least one of User Id or username is mandatory. When both are given, then user id will be considered. - -```ts -async restapiV2RemoveUserFromGroups( - body: TspublicRestV2UserRemovegroupRequest, - requestOptions?: RequestOptions -): Promise> -``` - -## Parameters - -| Parameter | Type | Tags | Description | -| --- | --- | --- | --- | -| `body` | [`TspublicRestV2UserRemovegroupRequest`](../../doc/models/tspublic-rest-v2-user-removegroup-request.md) | Body, Required | - | -| `requestOptions` | `RequestOptions \| undefined` | Optional | Pass additional request options. | - -## Response Type - -`boolean` - -## Example Usage - -```ts -const contentType = null; -const bodyGroups: GroupNameAndIDInput[] = []; - -const bodygroups0: GroupNameAndIDInput = {}; - -bodyGroups[0] = bodygroups0; - -const body: TspublicRestV2UserRemovegroupRequest = { - groups: bodyGroups, -}; - -try { - const { result, ...httpResponse } = await userController.restapiV2RemoveUserFromGroups(body); - // Get more response info... - // const { statusCode, headers } = httpResponse; -} catch(error) { - if (error instanceof ApiError) { - const errors = error.result; - // const { statusCode, headers } = error; - } -} -``` - -## Errors - -| HTTP Status Code | Error Description | Exception Class | -| --- | --- | --- | -| 500 | Operation failed | [`ErrorResponseError`](../../doc/models/error-response-error.md) | - - -# Restapi V2 Search Users - -To get the details of a specific user account or all users in the ThoughtSpot system use this end point. - -```ts -async restapiV2SearchUsers( - body: TspublicRestV2UserSearchRequest, - requestOptions?: RequestOptions -): Promise> -``` - -## Parameters - -| Parameter | Type | Tags | Description | -| --- | --- | --- | --- | -| `body` | [`TspublicRestV2UserSearchRequest`](../../doc/models/tspublic-rest-v2-user-search-request.md) | Body, Required | - | -| `requestOptions` | `RequestOptions \| undefined` | Optional | Pass additional request options. | - -## Response Type - -`unknown` - -## Example Usage - -```ts -const contentType = null; -const body: TspublicRestV2UserSearchRequest = {}; - -try { - const { result, ...httpResponse } = await userController.restapiV2SearchUsers(body); - // Get more response info... - // const { statusCode, headers } = httpResponse; -} catch(error) { - if (error instanceof ApiError) { - const errors = error.result; - // const { statusCode, headers } = error; - } -} -``` - -## Errors - -| HTTP Status Code | Error Description | Exception Class | -| --- | --- | --- | -| 500 | Operation failed | [`ErrorResponseError`](../../doc/models/error-response-error.md) | - - -# Restapi V2 Change Password of User - -To change the password of a ThoughtSpot user account, use this endpoint. - -At least one of id or name of user is required. When both are given user id will be considered. - -```ts -async restapiV2ChangePasswordOfUser( - body: TspublicRestV2UserChangepasswordRequest, - requestOptions?: RequestOptions -): Promise> -``` - -## Parameters - -| Parameter | Type | Tags | Description | -| --- | --- | --- | --- | -| `body` | [`TspublicRestV2UserChangepasswordRequest`](../../doc/models/tspublic-rest-v2-user-changepassword-request.md) | Body, Required | - | -| `requestOptions` | `RequestOptions \| undefined` | Optional | Pass additional request options. | - -## Response Type - -`boolean` - -## Example Usage - -```ts -const contentType = null; -const body: TspublicRestV2UserChangepasswordRequest = { - currentPassword: 'currentPassword0', - newPassword: 'newPassword0', -}; - -try { - const { result, ...httpResponse } = await userController.restapiV2ChangePasswordOfUser(body); - // Get more response info... - // const { statusCode, headers } = httpResponse; -} catch(error) { - if (error instanceof ApiError) { - const errors = error.result; - // const { statusCode, headers } = error; - } -} -``` - -## Errors - -| HTTP Status Code | Error Description | Exception Class | -| --- | --- | --- | -| 500 | Operation failed | [`ErrorResponseError`](../../doc/models/error-response-error.md) | - - -# Restapi V2 Add User to Orgs - -To programmatically add existing ThoughtSpot users to an organization, use this API endpoint. - -At least one of id or name of the organization is required. When both are given, then organization id will be considered. - -Requires Administration access for the organization to which users need to be added. - -```ts -async restapiV2AddUserToOrgs( - body: TspublicRestV2UserAddorgRequest, - requestOptions?: RequestOptions -): Promise> -``` - -## Parameters - -| Parameter | Type | Tags | Description | -| --- | --- | --- | --- | -| `body` | [`TspublicRestV2UserAddorgRequest`](../../doc/models/tspublic-rest-v2-user-addorg-request.md) | Body, Required | - | -| `requestOptions` | `RequestOptions \| undefined` | Optional | Pass additional request options. | - -## Response Type - -`boolean` - -## Example Usage - -```ts -const contentType = null; -const bodyUsers: UserNameAndIDInput[] = []; - -const bodyusers0: UserNameAndIDInput = {}; - -bodyUsers[0] = bodyusers0; - -const body: TspublicRestV2UserAddorgRequest = { - users: bodyUsers, -}; - -try { - const { result, ...httpResponse } = await userController.restapiV2AddUserToOrgs(body); - // Get more response info... - // const { statusCode, headers } = httpResponse; -} catch(error) { - if (error instanceof ApiError) { - const errors = error.result; - // const { statusCode, headers } = error; - } -} -``` - -## Errors - -| HTTP Status Code | Error Description | Exception Class | -| --- | --- | --- | -| 500 | Operation failed | [`ErrorResponseError`](../../doc/models/error-response-error.md) | - diff --git a/Typescript/doc/models/access-enum.md b/Typescript/doc/models/access-enum.md deleted file mode 100644 index 2e4bce4fe..000000000 --- a/Typescript/doc/models/access-enum.md +++ /dev/null @@ -1,16 +0,0 @@ - -# Access Enum - -Minimum access level that the specified user or user group has. If no input is provided then minimum access of READ_ONLY will be considered. - -## Enumeration - -`AccessEnum` - -## Fields - -| Name | -| --- | -| `rEADONLY` | -| `mODIFY` | - diff --git a/Typescript/doc/models/access-level-enum.md b/Typescript/doc/models/access-level-enum.md deleted file mode 100644 index 00d08d56c..000000000 --- a/Typescript/doc/models/access-level-enum.md +++ /dev/null @@ -1,14 +0,0 @@ - -# Access Level Enum - -## Enumeration - -`AccessLevelEnum` - -## Fields - -| Name | -| --- | -| `fULL` | -| `rEPORTBOOKVIEW` | - diff --git a/Typescript/doc/models/access-level-input.md b/Typescript/doc/models/access-level-input.md deleted file mode 100644 index f8704908e..000000000 --- a/Typescript/doc/models/access-level-input.md +++ /dev/null @@ -1,27 +0,0 @@ - -# Access Level Input - -## Structure - -`AccessLevelInput` - -## Fields - -| Name | Type | Tags | Description | -| --- | --- | --- | --- | -| `name` | `string \| undefined` | Optional | Username or name of the user group | -| `id` | `string \| undefined` | Optional | GUID of the user or user group | -| `type` | [`Type1Enum \| undefined`](../../doc/models/type-1-enum.md) | Optional | Type of access detail provided | -| `access` | [`AccessEnum \| undefined`](../../doc/models/access-enum.md) | Optional | Minimum access level that the specified user or user group has. If no input is provided then minimum access of READ_ONLY will be considered. | - -## Example (as JSON) - -```json -{ - "name": null, - "id": null, - "type": null, - "access": null -} -``` - diff --git a/Typescript/doc/models/add-table-input.md b/Typescript/doc/models/add-table-input.md deleted file mode 100644 index 1371e2004..000000000 --- a/Typescript/doc/models/add-table-input.md +++ /dev/null @@ -1,32 +0,0 @@ - -# Add Table Input - -## Structure - -`AddTableInput` - -## Fields - -| Name | Type | Tags | Description | -| --- | --- | --- | --- | -| `name` | `string` | Required | Name of the table | -| `dbName` | `string` | Required | Name of the database in the data platform | -| `schemaName` | `string` | Required | Name of the schema in the database | -| `columns` | [`ColumnsInput[]`](../../doc/models/columns-input.md) | Required | A JSON array of column details | - -## Example (as JSON) - -```json -{ - "name": "name0", - "dbName": "dbName8", - "schemaName": "schemaName4", - "columns": [ - { - "name": "name0", - "dataType": "dataType2" - } - ] -} -``` - diff --git a/Typescript/doc/models/adminsync-principal-response.md b/Typescript/doc/models/adminsync-principal-response.md deleted file mode 100644 index 43caadbdd..000000000 --- a/Typescript/doc/models/adminsync-principal-response.md +++ /dev/null @@ -1,31 +0,0 @@ - -# Adminsync Principal Response - -## Structure - -`AdminsyncPrincipalResponse` - -## Fields - -| Name | Type | Tags | Description | -| --- | --- | --- | --- | -| `usersAdded` | `string[] \| undefined` | Optional | Username of list of users added | -| `usersDeleted` | `string[] \| undefined` | Optional | Username of list of users deleted | -| `usersUpdated` | `string[] \| undefined` | Optional | Username of list of users updated | -| `groupsAdded` | `string[] \| undefined` | Optional | Group name of list of groups added | -| `groupsDeleted` | `string[] \| undefined` | Optional | Group name of list of groups deleted | -| `groupsUpdated` | `string[] \| undefined` | Optional | Group name of list of groups updated | - -## Example (as JSON) - -```json -{ - "usersAdded": null, - "usersDeleted": null, - "usersUpdated": null, - "groupsAdded": null, - "groupsDeleted": null, - "groupsUpdated": null -} -``` - diff --git a/Typescript/doc/models/answer-query-response.md b/Typescript/doc/models/answer-query-response.md deleted file mode 100644 index d82db6e95..000000000 --- a/Typescript/doc/models/answer-query-response.md +++ /dev/null @@ -1,25 +0,0 @@ - -# Answer Query Response - -## Structure - -`AnswerQueryResponse` - -## Fields - -| Name | Type | Tags | Description | -| --- | --- | --- | --- | -| `name` | `string \| undefined` | Optional | The name of the saved Answer | -| `id` | `string \| undefined` | Optional | The GUID of the saved Answer | -| `querySql` | `string \| undefined` | Optional | SQL query associated with the saved Answer | - -## Example (as JSON) - -```json -{ - "name": null, - "id": null, - "querySql": null -} -``` - diff --git a/Typescript/doc/models/client-state.md b/Typescript/doc/models/client-state.md deleted file mode 100644 index 8ef36d946..000000000 --- a/Typescript/doc/models/client-state.md +++ /dev/null @@ -1,21 +0,0 @@ - -# Client State - -## Structure - -`ClientState` - -## Fields - -| Name | Type | Tags | Description | -| --- | --- | --- | --- | -| `color` | `string \| undefined` | Optional | Color assigned to the tag | - -## Example (as JSON) - -```json -{ - "color": null -} -``` - diff --git a/Typescript/doc/models/columns-input.md b/Typescript/doc/models/columns-input.md deleted file mode 100644 index 0d5ad378e..000000000 --- a/Typescript/doc/models/columns-input.md +++ /dev/null @@ -1,23 +0,0 @@ - -# Columns Input - -## Structure - -`ColumnsInput` - -## Fields - -| Name | Type | Tags | Description | -| --- | --- | --- | --- | -| `name` | `string` | Required | Name of the column | -| `dataType` | `string` | Required | Datatype of the column | - -## Example (as JSON) - -```json -{ - "name": "name0", - "dataType": "dataType2" -} -``` - diff --git a/Typescript/doc/models/connection-column.md b/Typescript/doc/models/connection-column.md deleted file mode 100644 index 34c8dbd7d..000000000 --- a/Typescript/doc/models/connection-column.md +++ /dev/null @@ -1,25 +0,0 @@ - -# Connection Column - -## Structure - -`ConnectionColumn` - -## Fields - -| Name | Type | Tags | Description | -| --- | --- | --- | --- | -| `name` | `string \| undefined` | Optional | Name of the table | -| `type` | `string \| undefined` | Optional | Type of the Table | -| `column` | [`TableColumns[] \| undefined`](../../doc/models/table-columns.md) | Optional | List of columns in the table | - -## Example (as JSON) - -```json -{ - "name": null, - "type": null, - "column": null -} -``` - diff --git a/Typescript/doc/models/connection-columns-shema.md b/Typescript/doc/models/connection-columns-shema.md deleted file mode 100644 index 77147c5eb..000000000 --- a/Typescript/doc/models/connection-columns-shema.md +++ /dev/null @@ -1,27 +0,0 @@ - -# Connection Columns Shema - -## Structure - -`ConnectionColumnsShema` - -## Fields - -| Name | Type | Tags | Description | -| --- | --- | --- | --- | -| `name` | `string \| undefined` | Optional | Name of the table | -| `dbName` | `string \| undefined` | Optional | Name of the database | -| `schemaName` | `string \| undefined` | Optional | Name of the schema | -| `columns` | [`TableColumns[] \| undefined`](../../doc/models/table-columns.md) | Optional | List of columns in the table | - -## Example (as JSON) - -```json -{ - "name": null, - "dbName": null, - "schemaName": null, - "columns": null -} -``` - diff --git a/Typescript/doc/models/connection-database-type.md b/Typescript/doc/models/connection-database-type.md deleted file mode 100644 index 2a7c14bbd..000000000 --- a/Typescript/doc/models/connection-database-type.md +++ /dev/null @@ -1,23 +0,0 @@ - -# Connection Database Type - -## Structure - -`ConnectionDatabaseType` - -## Fields - -| Name | Type | Tags | Description | -| --- | --- | --- | --- | -| `name` | `string \| undefined` | Optional | Name of the database | -| `schema` | [`ConnectionTableSchema[] \| undefined`](../../doc/models/connection-table-schema.md) | Optional | List of schemas | - -## Example (as JSON) - -```json -{ - "name": null, - "schema": null -} -``` - diff --git a/Typescript/doc/models/connection-response.md b/Typescript/doc/models/connection-response.md deleted file mode 100644 index f9f3065c1..000000000 --- a/Typescript/doc/models/connection-response.md +++ /dev/null @@ -1,61 +0,0 @@ - -# Connection Response - -## Structure - -`ConnectionResponse` - -## Fields - -| Name | Type | Tags | Description | -| --- | --- | --- | --- | -| `name` | `string \| undefined` | Optional | Name of the connection | -| `description` | `string \| undefined` | Optional | Description associated with the connection | -| `type` | `string \| undefined` | Optional | Type of the connection. The database associated with this type can be obtained from the response returned by the /tspublic/rest/v2/connection/types API endpoint. | -| `id` | `string \| undefined` | Optional | GUID of the connection | -| `scheduled` | `boolean \| undefined` | Optional | Indicates if the data sync is scheduled for this connection | -| `connectionType` | `string \| undefined` | Optional | - | -| `configuration` | `string \| undefined` | Optional | Configuration properties of the connection | -| `isExternal` | `boolean \| undefined` | Optional | - | -| `isDeprecated` | `boolean \| undefined` | Optional | Indicates if the connection is deprecated | -| `isDeleted` | `boolean \| undefined` | Optional | Indicates if the connection is deleted | -| `isHidden` | `boolean \| undefined` | Optional | Indicates if the connection is hideen | -| `complete` | `boolean \| undefined` | Optional | Indicates if the all the properties of connection is provided | -| `indexVersion` | `number \| undefined` | Optional | - | -| `generationNum` | `number \| undefined` | Optional | - | -| `created` | `string \| undefined` | Optional | Date and time when the connection was created | -| `modified` | `string \| undefined` | Optional | Date and time of last modification of the connection | -| `author` | [`UserNameAndID \| undefined`](../../doc/models/user-name-and-id.md) | Optional | - | -| `modifiedBy` | [`UserNameAndID \| undefined`](../../doc/models/user-name-and-id.md) | Optional | - | -| `owner` | [`UserNameAndID \| undefined`](../../doc/models/user-name-and-id.md) | Optional | - | -| `tags` | `string[] \| undefined` | Optional | List of tags assigned to the connection | -| `tables` | [`TableList[] \| undefined`](../../doc/models/table-list.md) | Optional | List of tables linked to this connection | - -## Example (as JSON) - -```json -{ - "name": null, - "description": null, - "type": null, - "id": null, - "scheduled": null, - "connectionType": null, - "configuration": null, - "isExternal": null, - "isDeprecated": null, - "isDeleted": null, - "isHidden": null, - "complete": null, - "indexVersion": null, - "generationNum": null, - "created": null, - "modified": null, - "author": null, - "modifiedBy": null, - "owner": null, - "tags": null, - "tables": null -} -``` - diff --git a/Typescript/doc/models/connection-table-columns-input.md b/Typescript/doc/models/connection-table-columns-input.md deleted file mode 100644 index 0a060e939..000000000 --- a/Typescript/doc/models/connection-table-columns-input.md +++ /dev/null @@ -1,25 +0,0 @@ - -# Connection Table Columns Input - -## Structure - -`ConnectionTableColumnsInput` - -## Fields - -| Name | Type | Tags | Description | -| --- | --- | --- | --- | -| `dbName` | `string` | Required | Name of the database | -| `schemaName` | `string` | Required | Name of the schema | -| `name` | `string` | Required | Name of the table | - -## Example (as JSON) - -```json -{ - "dbName": "dbName8", - "schemaName": "schemaName4", - "name": "name0" -} -``` - diff --git a/Typescript/doc/models/connection-table-columns-response.md b/Typescript/doc/models/connection-table-columns-response.md deleted file mode 100644 index c4c44e423..000000000 --- a/Typescript/doc/models/connection-table-columns-response.md +++ /dev/null @@ -1,23 +0,0 @@ - -# Connection Table Columns Response - -## Structure - -`ConnectionTableColumnsResponse` - -## Fields - -| Name | Type | Tags | Description | -| --- | --- | --- | --- | -| `id` | `string \| undefined` | Optional | Connection id | -| `table` | [`ConnectionColumnsShema[] \| undefined`](../../doc/models/connection-columns-shema.md) | Optional | List of table details | - -## Example (as JSON) - -```json -{ - "id": null, - "table": null -} -``` - diff --git a/Typescript/doc/models/connection-table-response.md b/Typescript/doc/models/connection-table-response.md deleted file mode 100644 index 1d8e6382a..000000000 --- a/Typescript/doc/models/connection-table-response.md +++ /dev/null @@ -1,23 +0,0 @@ - -# Connection Table Response - -## Structure - -`ConnectionTableResponse` - -## Fields - -| Name | Type | Tags | Description | -| --- | --- | --- | --- | -| `id` | `string \| undefined` | Optional | Connection id | -| `database` | [`ConnectionDatabaseType[] \| undefined`](../../doc/models/connection-database-type.md) | Optional | List of databases | - -## Example (as JSON) - -```json -{ - "id": null, - "database": null -} -``` - diff --git a/Typescript/doc/models/connection-table-schema.md b/Typescript/doc/models/connection-table-schema.md deleted file mode 100644 index 3e34ff435..000000000 --- a/Typescript/doc/models/connection-table-schema.md +++ /dev/null @@ -1,23 +0,0 @@ - -# Connection Table Schema - -## Structure - -`ConnectionTableSchema` - -## Fields - -| Name | Type | Tags | Description | -| --- | --- | --- | --- | -| `name` | `string \| undefined` | Optional | Name of the schema | -| `table` | [`ConnectionColumn[] \| undefined`](../../doc/models/connection-column.md) | Optional | List of table details | - -## Example (as JSON) - -```json -{ - "name": null, - "table": null -} -``` - diff --git a/Typescript/doc/models/create-connection-response.md b/Typescript/doc/models/create-connection-response.md deleted file mode 100644 index c92f3dcc9..000000000 --- a/Typescript/doc/models/create-connection-response.md +++ /dev/null @@ -1,61 +0,0 @@ - -# Create Connection Response - -## Structure - -`CreateConnectionResponse` - -## Fields - -| Name | Type | Tags | Description | -| --- | --- | --- | --- | -| `name` | `string \| undefined` | Optional | Name of the connection | -| `description` | `string \| undefined` | Optional | Description associated with the connection | -| `type` | `string \| undefined` | Optional | Type of the connection. The database associated with this type can be obtained from the response returned by the /tspublic/rest/v2/connection/types API endpoint. | -| `id` | `string \| undefined` | Optional | GUID of the connection | -| `scheduled` | `boolean \| undefined` | Optional | Indicates if the data sync is scheduled for this connection | -| `connectionType` | `string \| undefined` | Optional | - | -| `configuration` | `string \| undefined` | Optional | Configuration properties of the connection | -| `isExternal` | `boolean \| undefined` | Optional | - | -| `isDeprecated` | `boolean \| undefined` | Optional | Indicates if the connection is deprecated | -| `isDeleted` | `boolean \| undefined` | Optional | Indicates if the connection is deleted | -| `isHidden` | `boolean \| undefined` | Optional | Indicates if the connection is hideen | -| `complete` | `boolean \| undefined` | Optional | Indicates if the all the properties of connection is provided | -| `indexVersion` | `number \| undefined` | Optional | - | -| `generationNum` | `number \| undefined` | Optional | - | -| `created` | `string \| undefined` | Optional | Date and time when user account was created | -| `modified` | `string \| undefined` | Optional | Date and time of last modification of user account | -| `author` | [`UserNameAndID \| undefined`](../../doc/models/user-name-and-id.md) | Optional | - | -| `modifiedBy` | [`UserNameAndID \| undefined`](../../doc/models/user-name-and-id.md) | Optional | - | -| `owner` | [`UserNameAndID \| undefined`](../../doc/models/user-name-and-id.md) | Optional | - | -| `tags` | `string[] \| undefined` | Optional | List of tags assigned to the connection | -| `tables` | `string[] \| undefined` | Optional | List of tables linked to this connection and details of the columns in the table | - -## Example (as JSON) - -```json -{ - "name": null, - "description": null, - "type": null, - "id": null, - "scheduled": null, - "connectionType": null, - "configuration": null, - "isExternal": null, - "isDeprecated": null, - "isDeleted": null, - "isHidden": null, - "complete": null, - "indexVersion": null, - "generationNum": null, - "created": null, - "modified": null, - "author": null, - "modifiedBy": null, - "owner": null, - "tags": null, - "tables": null -} -``` - diff --git a/Typescript/doc/models/create-table-response.md b/Typescript/doc/models/create-table-response.md deleted file mode 100644 index e26816e0a..000000000 --- a/Typescript/doc/models/create-table-response.md +++ /dev/null @@ -1,23 +0,0 @@ - -# Create Table Response - -## Structure - -`CreateTableResponse` - -## Fields - -| Name | Type | Tags | Description | -| --- | --- | --- | --- | -| `logicalTableHeader` | [`LogicalTableHeader \| undefined`](../../doc/models/logical-table-header.md) | Optional | - | -| `physicalTableId` | `string \| undefined` | Optional | - | - -## Example (as JSON) - -```json -{ - "logicalTableHeader": null, - "physicalTableId": null -} -``` - diff --git a/Typescript/doc/models/dependent-permission.md b/Typescript/doc/models/dependent-permission.md deleted file mode 100644 index 64f741a3c..000000000 --- a/Typescript/doc/models/dependent-permission.md +++ /dev/null @@ -1,31 +0,0 @@ - -# Dependent Permission - -## Structure - -`DependentPermission` - -## Fields - -| Name | Type | Tags | Description | -| --- | --- | --- | --- | -| `id` | `string \| undefined` | Optional | GUID of the object | -| `name` | `string \| undefined` | Optional | Name of the object | -| `type` | `string \| undefined` | Optional | Indicates the type of the object | -| `permission` | `string \| undefined` | Optional | Indicates the permission which user or user group has on the object | -| `sharedPermission` | `string \| undefined` | Optional | Indicates the permission which user or user group has on the object through sharing of the object with this user or user group | -| `groupPermission` | [`GroupPermission[] \| undefined`](../../doc/models/group-permission.md) | Optional | An array of object with details of permission on the user groups to which the user or user group belongs | - -## Example (as JSON) - -```json -{ - "id": null, - "name": null, - "type": null, - "permission": null, - "sharedPermission": null, - "groupPermission": null -} -``` - diff --git a/Typescript/doc/models/error-response-error.md b/Typescript/doc/models/error-response-error.md deleted file mode 100644 index 04dfd4402..000000000 --- a/Typescript/doc/models/error-response-error.md +++ /dev/null @@ -1,21 +0,0 @@ - -# Error Response Error - -## Structure - -`ErrorResponseError` - -## Fields - -| Name | Type | Tags | Description | -| --- | --- | --- | --- | -| `error` | `unknown \| undefined` | Optional | - | - -## Example (as JSON) - -```json -{ - "error": null -} -``` - diff --git a/Typescript/doc/models/format-type-3-enum.md b/Typescript/doc/models/format-type-3-enum.md deleted file mode 100644 index c2872a726..000000000 --- a/Typescript/doc/models/format-type-3-enum.md +++ /dev/null @@ -1,16 +0,0 @@ - -# Format Type 3 Enum - -The format in which to export the objects - -## Enumeration - -`FormatType3Enum` - -## Fields - -| Name | -| --- | -| `yAML` | -| `jSON` | - diff --git a/Typescript/doc/models/format-type-enum.md b/Typescript/doc/models/format-type-enum.md deleted file mode 100644 index 4b606651c..000000000 --- a/Typescript/doc/models/format-type-enum.md +++ /dev/null @@ -1,20 +0,0 @@ - -# Format Type Enum - -The format of the data in the response. - -FULL: The response comes in "column":"value" format. - -COMPACT: The response includes only the value of the columns. - -## Enumeration - -`FormatTypeEnum` - -## Fields - -| Name | -| --- | -| `cOMPACT` | -| `fULL` | - diff --git a/Typescript/doc/models/from-user-name-and-id-input.md b/Typescript/doc/models/from-user-name-and-id-input.md deleted file mode 100644 index 49285f0c1..000000000 --- a/Typescript/doc/models/from-user-name-and-id-input.md +++ /dev/null @@ -1,29 +0,0 @@ - -# From User Name and ID Input - -A JSON object of name or GUIDs of the current owner of the objects. When both are given then id is considered. - -If a list of object ids are provided as input for TsObjectId, then only for those ids that have owner as the value provided in fromUser, the owner will be changed. - -Provide either name or id as input. When both are given user id will be considered. - -## Structure - -`FromUserNameAndIDInput` - -## Fields - -| Name | Type | Tags | Description | -| --- | --- | --- | --- | -| `name` | `string \| undefined` | Optional | Username of the user | -| `id` | `string \| undefined` | Optional | GUID of the user | - -## Example (as JSON) - -```json -{ - "name": null, - "id": null -} -``` - diff --git a/Typescript/doc/models/group-name-and-id-input.md b/Typescript/doc/models/group-name-and-id-input.md deleted file mode 100644 index 48b4ecf15..000000000 --- a/Typescript/doc/models/group-name-and-id-input.md +++ /dev/null @@ -1,23 +0,0 @@ - -# Group Name and ID Input - -## Structure - -`GroupNameAndIDInput` - -## Fields - -| Name | Type | Tags | Description | -| --- | --- | --- | --- | -| `name` | `string \| undefined` | Optional | Name of the group | -| `id` | `string \| undefined` | Optional | GUID of the group | - -## Example (as JSON) - -```json -{ - "name": null, - "id": null -} -``` - diff --git a/Typescript/doc/models/group-name-and-id.md b/Typescript/doc/models/group-name-and-id.md deleted file mode 100644 index 932e6bcda..000000000 --- a/Typescript/doc/models/group-name-and-id.md +++ /dev/null @@ -1,23 +0,0 @@ - -# Group Name and ID - -## Structure - -`GroupNameAndID` - -## Fields - -| Name | Type | Tags | Description | -| --- | --- | --- | --- | -| `name` | `string \| undefined` | Optional | Name of the group | -| `id` | `string \| undefined` | Optional | GUID of the group | - -## Example (as JSON) - -```json -{ - "name": null, - "id": null -} -``` - diff --git a/Typescript/doc/models/group-permission.md b/Typescript/doc/models/group-permission.md deleted file mode 100644 index b2d79e301..000000000 --- a/Typescript/doc/models/group-permission.md +++ /dev/null @@ -1,25 +0,0 @@ - -# Group Permission - -## Structure - -`GroupPermission` - -## Fields - -| Name | Type | Tags | Description | -| --- | --- | --- | --- | -| `id` | `string \| undefined` | Optional | GUID of the user group | -| `name` | `string \| undefined` | Optional | Name of the user group | -| `permission` | `string \| undefined` | Optional | Indicates the permission which user group has on the object | - -## Example (as JSON) - -```json -{ - "id": null, - "name": null, - "permission": null -} -``` - diff --git a/Typescript/doc/models/group-response.md b/Typescript/doc/models/group-response.md deleted file mode 100644 index 943f05343..000000000 --- a/Typescript/doc/models/group-response.md +++ /dev/null @@ -1,79 +0,0 @@ - -# Group Response - -## Structure - -`GroupResponse` - -## Fields - -| Name | Type | Tags | Description | -| --- | --- | --- | --- | -| `name` | `string \| undefined` | Optional | Name of the group | -| `displayName` | `string \| undefined` | Optional | A unique display name string for the user group | -| `id` | `string \| undefined` | Optional | GUID of the group | -| `visibility` | `string \| undefined` | Optional | Visibility of the group | -| `description` | `string \| undefined` | Optional | Description of the group | -| `privileges` | `string[] \| undefined` | Optional | Privileges assigned to the group | -| `orgs` | [`OrgType[] \| undefined`](../../doc/models/org-type.md) | Optional | The organizations that user belongs to | -| `groups` | [`GroupNameAndID[] \| undefined`](../../doc/models/group-name-and-id.md) | Optional | Name of the group to which is added | -| `users` | [`UserNameAndID[] \| undefined`](../../doc/models/user-name-and-id.md) | Optional | User Group Information by Id or Name. | -| `assignedLiveboards` | [`LiveboardNameAndID[] \| undefined`](../../doc/models/liveboard-name-and-id.md) | Optional | Liveboards assigned to the group | -| `userGroupContent` | `unknown \| undefined` | Optional | - | -| `tags` | `string[] \| undefined` | Optional | Tags assigned to the group | -| `isDeleted` | `boolean \| undefined` | Optional | Indicates if the group is deleted | -| `isHidden` | `boolean \| undefined` | Optional | Indicates if the group is hidden | -| `isExternal` | `boolean \| undefined` | Optional | Indicates if the group is from external system | -| `isDeprecated` | `boolean \| undefined` | Optional | - | -| `complete` | `boolean \| undefined` | Optional | Indicates if the all the properties of group is provided | -| `isSystemPrincipal` | `boolean \| undefined` | Optional | Indicates if the group is system principal | -| `type` | `string \| undefined` | Optional | Indicates the type of group | -| `parenttype` | `string \| undefined` | Optional | Indicates the type of parent object | -| `groupIdx` | `number \| undefined` | Optional | - | -| `metadataVersion` | `number \| undefined` | Optional | - | -| `tenantId` | `string \| undefined` | Optional | Tenant id associated with the group | -| `indexVersion` | `number \| undefined` | Optional | - | -| `generationNum` | `number \| undefined` | Optional | - | -| `created` | `number \| undefined` | Optional | Date and time when group was created | -| `modified` | `number \| undefined` | Optional | Date and time of last modification of the group | -| `author` | [`UserNameAndID \| undefined`](../../doc/models/user-name-and-id.md) | Optional | - | -| `modifiedBy` | [`UserNameAndID \| undefined`](../../doc/models/user-name-and-id.md) | Optional | - | -| `owner` | [`UserNameAndID \| undefined`](../../doc/models/user-name-and-id.md) | Optional | - | - -## Example (as JSON) - -```json -{ - "name": null, - "displayName": null, - "id": null, - "visibility": null, - "description": null, - "privileges": null, - "orgs": null, - "groups": null, - "users": null, - "assignedLiveboards": null, - "userGroupContent": null, - "tags": null, - "isDeleted": null, - "isHidden": null, - "isExternal": null, - "isDeprecated": null, - "complete": null, - "isSystemPrincipal": null, - "type": null, - "parenttype": null, - "groupIdx": null, - "metadataVersion": null, - "tenantId": null, - "indexVersion": null, - "generationNum": null, - "created": null, - "modified": null, - "author": null, - "modifiedBy": null, - "owner": null -} -``` - diff --git a/Typescript/doc/models/home-liveboard-response.md b/Typescript/doc/models/home-liveboard-response.md deleted file mode 100644 index c3544c973..000000000 --- a/Typescript/doc/models/home-liveboard-response.md +++ /dev/null @@ -1,27 +0,0 @@ - -# Home Liveboard Response - -## Structure - -`HomeLiveboardResponse` - -## Fields - -| Name | Type | Tags | Description | -| --- | --- | --- | --- | -| `userName` | `string \| undefined` | Optional | Name of the user | -| `userId` | `string \| undefined` | Optional | The GUID of the user | -| `liveboardName` | `string \| undefined` | Optional | Name of the liveboard | -| `liveboardId` | `string \| undefined` | Optional | The GUID of the liveboard | - -## Example (as JSON) - -```json -{ - "userName": null, - "userId": null, - "liveboardName": null, - "liveboardId": null -} -``` - diff --git a/Typescript/doc/models/import-policy-enum.md b/Typescript/doc/models/import-policy-enum.md deleted file mode 100644 index e9b69a301..000000000 --- a/Typescript/doc/models/import-policy-enum.md +++ /dev/null @@ -1,17 +0,0 @@ - -# Import Policy Enum - -Policy to follow during import - -## Enumeration - -`ImportPolicyEnum` - -## Fields - -| Name | -| --- | -| `pARTIAL` | -| `aLLORNONE` | -| `vALIDATEONLY` | - diff --git a/Typescript/doc/models/liveboard-name-and-id.md b/Typescript/doc/models/liveboard-name-and-id.md deleted file mode 100644 index 43ef1c1d2..000000000 --- a/Typescript/doc/models/liveboard-name-and-id.md +++ /dev/null @@ -1,23 +0,0 @@ - -# Liveboard Name and ID - -## Structure - -`LiveboardNameAndID` - -## Fields - -| Name | Type | Tags | Description | -| --- | --- | --- | --- | -| `name` | `string \| undefined` | Optional | Name of the liveboard | -| `id` | `string \| undefined` | Optional | GUID of the liveboard | - -## Example (as JSON) - -```json -{ - "name": null, - "id": null -} -``` - diff --git a/Typescript/doc/models/liveboard-query-response.md b/Typescript/doc/models/liveboard-query-response.md deleted file mode 100644 index 1aacee506..000000000 --- a/Typescript/doc/models/liveboard-query-response.md +++ /dev/null @@ -1,25 +0,0 @@ - -# Liveboard Query Response - -## Structure - -`LiveboardQueryResponse` - -## Fields - -| Name | Type | Tags | Description | -| --- | --- | --- | --- | -| `name` | `string \| undefined` | Optional | The name of the Liveboard | -| `id` | `string \| undefined` | Optional | The GUID of the Liveboard | -| `viz` | [`VizType[] \| undefined`](../../doc/models/viz-type.md) | Optional | SQL query associated with the saved Answer | - -## Example (as JSON) - -```json -{ - "name": null, - "id": null, - "viz": null -} -``` - diff --git a/Typescript/doc/models/logical-table-header.md b/Typescript/doc/models/logical-table-header.md deleted file mode 100644 index fa2643bfd..000000000 --- a/Typescript/doc/models/logical-table-header.md +++ /dev/null @@ -1,51 +0,0 @@ - -# Logical Table Header - -## Structure - -`LogicalTableHeader` - -## Fields - -| Name | Type | Tags | Description | -| --- | --- | --- | --- | -| `id` | `string \| undefined` | Optional | - | -| `name` | `string \| undefined` | Optional | - | -| `author` | `string \| undefined` | Optional | - | -| `authorName` | `string \| undefined` | Optional | - | -| `authorDisplayName` | `string \| undefined` | Optional | - | -| `created` | `number \| undefined` | Optional | - | -| `modified` | `number \| undefined` | Optional | - | -| `modifiedBy` | `string \| undefined` | Optional | - | -| `generationNum` | `number \| undefined` | Optional | - | -| `owner` | `string \| undefined` | Optional | - | -| `deleted` | `boolean \| undefined` | Optional | - | -| `hidden` | `boolean \| undefined` | Optional | - | -| `database` | `string \| undefined` | Optional | - | -| `schema` | `string \| undefined` | Optional | - | -| `type` | `string \| undefined` | Optional | - | -| `subType` | `string \| undefined` | Optional | - | - -## Example (as JSON) - -```json -{ - "id": null, - "name": null, - "author": null, - "authorName": null, - "authorDisplayName": null, - "created": null, - "modified": null, - "modifiedBy": null, - "generationNum": null, - "owner": null, - "deleted": null, - "hidden": null, - "database": null, - "schema": null, - "type": null, - "subType": null -} -``` - diff --git a/Typescript/doc/models/logs-response.md b/Typescript/doc/models/logs-response.md deleted file mode 100644 index 8b7e371d0..000000000 --- a/Typescript/doc/models/logs-response.md +++ /dev/null @@ -1,23 +0,0 @@ - -# Logs Response - -## Structure - -`LogsResponse` - -## Fields - -| Name | Type | Tags | Description | -| --- | --- | --- | --- | -| `date` | `string \| undefined` | Optional | Date and time for the event in the log | -| `log` | `string \| undefined` | Optional | Logged event at the time specified in JSON format. This includes, Event ID, A unique description of the event, for example, User login failed, Timestamp, User ID of the person initiating the event and IP address of the ThoughtSpot instance. | - -## Example (as JSON) - -```json -{ - "date": null, - "log": null -} -``` - diff --git a/Typescript/doc/models/metadata-tag-response.md b/Typescript/doc/models/metadata-tag-response.md deleted file mode 100644 index 6d1eb9592..000000000 --- a/Typescript/doc/models/metadata-tag-response.md +++ /dev/null @@ -1,47 +0,0 @@ - -# Metadata Tag Response - -## Structure - -`MetadataTagResponse` - -## Fields - -| Name | Type | Tags | Description | -| --- | --- | --- | --- | -| `name` | `string \| undefined` | Optional | Name of the tag | -| `id` | `string \| undefined` | Optional | GUID of the tag | -| `clientState` | [`ClientState \| undefined`](../../doc/models/client-state.md) | Optional | - | -| `indexVersion` | `number \| undefined` | Optional | - | -| `generationNum` | `number \| undefined` | Optional | - | -| `isDeleted` | `boolean \| undefined` | Optional | Indicates if the tag is deleted | -| `isHidden` | `boolean \| undefined` | Optional | Indicates if the tag is hidden | -| `isExternal` | `boolean \| undefined` | Optional | Indicates if the tag is from external system | -| `isDeprecated` | `boolean \| undefined` | Optional | - | -| `created` | `number \| undefined` | Optional | Date and time when group was created | -| `modified` | `number \| undefined` | Optional | Date and time of last modification of the group | -| `modifiedBy` | [`TagNameAndID \| undefined`](../../doc/models/tag-name-and-id.md) | Optional | - | -| `author` | [`TagNameAndID \| undefined`](../../doc/models/tag-name-and-id.md) | Optional | - | -| `owner` | [`TagNameAndID \| undefined`](../../doc/models/tag-name-and-id.md) | Optional | - | - -## Example (as JSON) - -```json -{ - "name": null, - "id": null, - "clientState": null, - "indexVersion": null, - "generationNum": null, - "isDeleted": null, - "isHidden": null, - "isExternal": null, - "isDeprecated": null, - "created": null, - "modified": null, - "modifiedBy": null, - "author": null, - "owner": null -} -``` - diff --git a/Typescript/doc/models/name-and-id-input.md b/Typescript/doc/models/name-and-id-input.md deleted file mode 100644 index d23ad8851..000000000 --- a/Typescript/doc/models/name-and-id-input.md +++ /dev/null @@ -1,23 +0,0 @@ - -# Name and Id Input - -## Structure - -`NameAndIdInput` - -## Fields - -| Name | Type | Tags | Description | -| --- | --- | --- | --- | -| `name` | `string \| undefined` | Optional | Name of the user | -| `id` | `string \| undefined` | Optional | GUID of the user | - -## Example (as JSON) - -```json -{ - "name": null, - "id": null -} -``` - diff --git a/Typescript/doc/models/org-type.md b/Typescript/doc/models/org-type.md deleted file mode 100644 index 4650e6766..000000000 --- a/Typescript/doc/models/org-type.md +++ /dev/null @@ -1,23 +0,0 @@ - -# Org Type - -## Structure - -`OrgType` - -## Fields - -| Name | Type | Tags | Description | -| --- | --- | --- | --- | -| `name` | `string \| undefined` | Optional | Name of the organization | -| `id` | `number \| undefined` | Optional | Id of the organization | - -## Example (as JSON) - -```json -{ - "name": null, - "id": null -} -``` - diff --git a/Typescript/doc/models/orgs-response.md b/Typescript/doc/models/orgs-response.md deleted file mode 100644 index bf8796526..000000000 --- a/Typescript/doc/models/orgs-response.md +++ /dev/null @@ -1,31 +0,0 @@ - -# Orgs Response - -## Structure - -`OrgsResponse` - -## Fields - -| Name | Type | Tags | Description | -| --- | --- | --- | --- | -| `orgId` | `number \| undefined` | Optional | ID of the organization searched for | -| `orgName` | `string \| undefined` | Optional | Name of the organization searched for | -| `description` | `string \| undefined` | Optional | Description associated with the organization | -| `allGroupUserId` | `string \| undefined` | Optional | GUID of the ALL group in the organization | -| `defaultAdminUserGroupId` | `string \| undefined` | Optional | GUID of the admin group in the organization | -| `active` | `boolean \| undefined` | Optional | Indicates if the organization is active or not | - -## Example (as JSON) - -```json -{ - "orgId": null, - "orgName": null, - "description": null, - "allGroupUserId": null, - "defaultAdminUserGroupId": null, - "active": null -} -``` - diff --git a/Typescript/doc/models/orientation-enum.md b/Typescript/doc/models/orientation-enum.md deleted file mode 100644 index a437f078b..000000000 --- a/Typescript/doc/models/orientation-enum.md +++ /dev/null @@ -1,16 +0,0 @@ - -# Orientation Enum - -Page orientation for the PDF. Default: PORTRAIT - -## Enumeration - -`OrientationEnum` - -## Fields - -| Name | -| --- | -| `pORTRAIT` | -| `lANDSCAPE` | - diff --git a/Typescript/doc/models/pdf-options-input.md b/Typescript/doc/models/pdf-options-input.md deleted file mode 100644 index 9f9be425c..000000000 --- a/Typescript/doc/models/pdf-options-input.md +++ /dev/null @@ -1,33 +0,0 @@ - -# Pdf Options Input - -## Structure - -`PdfOptionsInput` - -## Fields - -| Name | Type | Tags | Description | -| --- | --- | --- | --- | -| `orientation` | [`OrientationEnum \| undefined`](../../doc/models/orientation-enum.md) | Optional | Page orientation for the PDF. Default: PORTRAIT | -| `truncateTables` | `boolean \| undefined` | Optional | When set to true, only the first page of the tables is displayed in the file.

This setting is applicable only when generating report for specific visualization ids. Default: false | -| `includeLogo` | `boolean \| undefined` | Optional | Include customized wide logo if available in the footer. Default: true | -| `footerText` | `string \| undefined` | Optional | Footer text to include in the footer of each page of the PDF. | -| `includePageNumber` | `boolean \| undefined` | Optional | When set to true, the page number is included in the footer of each page. Default: true | -| `includeCoverPage` | `boolean \| undefined` | Optional | When set to true, a cover page with the Liveboard title is added in the PDF. Default: true | -| `includeFilterPage` | `boolean \| undefined` | Optional | When set to true, a second page with a list of all applied filters is added in the PDF. Default: true | - -## Example (as JSON) - -```json -{ - "orientation": null, - "truncateTables": null, - "includeLogo": null, - "footerText": null, - "includePageNumber": null, - "includeCoverPage": null, - "includeFilterPage": null -} -``` - diff --git a/Typescript/doc/models/permissions-type-search.md b/Typescript/doc/models/permissions-type-search.md deleted file mode 100644 index 674521fb4..000000000 --- a/Typescript/doc/models/permissions-type-search.md +++ /dev/null @@ -1,23 +0,0 @@ - -# Permissions Type Search - -## Structure - -`PermissionsTypeSearch` - -## Fields - -| Name | Type | Tags | Description | -| --- | --- | --- | --- | -| `type` | `string \| undefined` | Optional | Indicates the type of the object | -| `tsObject` | [`TsObjectTypeSerach[] \| undefined`](../../doc/models/ts-object-type-serach.md) | Optional | An array of objects of type mentioned in type field | - -## Example (as JSON) - -```json -{ - "type": null, - "tsObject": null -} -``` - diff --git a/Typescript/doc/models/pinboard-details.md b/Typescript/doc/models/pinboard-details.md deleted file mode 100644 index 940b82e4b..000000000 --- a/Typescript/doc/models/pinboard-details.md +++ /dev/null @@ -1,27 +0,0 @@ - -# Pinboard Details - -## Structure - -`PinboardDetails` - -## Fields - -| Name | Type | Tags | Description | -| --- | --- | --- | --- | -| `pinboardId` | `string \| undefined` | Optional | pinboard id of recently pinned pinboard | -| `pinboardName` | `string \| undefined` | Optional | pinboard name of recently pinned pinboard | -| `tabId` | `string \| undefined` | Optional | tab id of recently pinned tab | -| `tabName` | `string \| undefined` | Optional | tab name of recently pinned tab | - -## Example (as JSON) - -```json -{ - "pinboardId": null, - "pinboardName": null, - "tabId": null, - "tabName": null -} -``` - diff --git a/Typescript/doc/models/principal-search-response.md b/Typescript/doc/models/principal-search-response.md deleted file mode 100644 index dc7771296..000000000 --- a/Typescript/doc/models/principal-search-response.md +++ /dev/null @@ -1,27 +0,0 @@ - -# Principal Search Response - -## Structure - -`PrincipalSearchResponse` - -## Fields - -| Name | Type | Tags | Description | -| --- | --- | --- | --- | -| `id` | `string \| undefined` | Optional | GUID of the user or user group | -| `name` | `string \| undefined` | Optional | Name of the user or user group | -| `type` | `string \| undefined` | Optional | Indicates the type of principal | -| `permissions` | [`PermissionsTypeSearch[] \| undefined`](../../doc/models/permissions-type-search.md) | Optional | Indicates the permission which user or user group has on the object | - -## Example (as JSON) - -```json -{ - "id": null, - "name": null, - "type": null, - "permissions": null -} -``` - diff --git a/Typescript/doc/models/privilege-enum.md b/Typescript/doc/models/privilege-enum.md deleted file mode 100644 index ff8709905..000000000 --- a/Typescript/doc/models/privilege-enum.md +++ /dev/null @@ -1,31 +0,0 @@ - -# Privilege Enum - -## Enumeration - -`PrivilegeEnum` - -## Fields - -| Name | -| --- | -| `rANALYSIS` | -| `dATAMANAGEMENT` | -| `aPPLICATIONADMINISTRATION` | -| `uSERADMINISTRATION` | -| `sYSTEMMANAGEMENT` | -| `sYSTEMINFOADMINISTRATION` | -| `aUTHORING` | -| `bACKUPADMINISTRATION` | -| `sHAREWITHALL` | -| `dEVELOPER` | -| `jOBSCHEDULING` | -| `gROUPADMINISTRATION` | -| `bYPASSRLS` | -| `eXPERIMENTALFEATUREPRIVILEGE` | -| `a3ANALYSIS` | -| `uSERDATAUPLOADING` | -| `dATADOWNLOADING` | -| `dISABLEPINBOARDCREATION` | -| `aDMINISTRATION` | - diff --git a/Typescript/doc/models/secuirity-dependents.md b/Typescript/doc/models/secuirity-dependents.md deleted file mode 100644 index 09b6af907..000000000 --- a/Typescript/doc/models/secuirity-dependents.md +++ /dev/null @@ -1,31 +0,0 @@ - -# Secuirity Dependents - -## Structure - -`SecuirityDependents` - -## Fields - -| Name | Type | Tags | Description | -| --- | --- | --- | --- | -| `id` | `string \| undefined` | Optional | GUID of the object | -| `name` | `string \| undefined` | Optional | Name of the object | -| `type` | `string \| undefined` | Optional | Indicates the type of the object | -| `owner` | `string \| undefined` | Optional | Owner of the object | -| `author` | [`UserNameAndID \| undefined`](../../doc/models/user-name-and-id.md) | Optional | - | -| `permissions` | [`DependentPermission[] \| undefined`](../../doc/models/dependent-permission.md) | Optional | - | - -## Example (as JSON) - -```json -{ - "id": null, - "name": null, - "type": null, - "owner": null, - "author": null, - "permissions": null -} -``` - diff --git a/Typescript/doc/models/security-permission-response.md b/Typescript/doc/models/security-permission-response.md deleted file mode 100644 index 8d7a3148f..000000000 --- a/Typescript/doc/models/security-permission-response.md +++ /dev/null @@ -1,33 +0,0 @@ - -# Security Permission Response - -## Structure - -`SecurityPermissionResponse` - -## Fields - -| Name | Type | Tags | Description | -| --- | --- | --- | --- | -| `id` | `string \| undefined` | Optional | GUID of the object | -| `name` | `string \| undefined` | Optional | Name of the object | -| `type` | `string \| undefined` | Optional | Indicates the type of the object | -| `owner` | `string \| undefined` | Optional | GUID of the owner of the object | -| `author` | [`UserNameAndID \| undefined`](../../doc/models/user-name-and-id.md) | Optional | - | -| `permissions` | [`SecurityPermission[] \| undefined`](../../doc/models/security-permission.md) | Optional | An array of object with details of permission on users and user groups | -| `dependents` | [`SecuirityDependents[] \| undefined`](../../doc/models/secuirity-dependents.md) | Optional | The objects on which the primary object is dependent on | - -## Example (as JSON) - -```json -{ - "id": null, - "name": null, - "type": null, - "owner": null, - "author": null, - "permissions": null, - "dependents": null -} -``` - diff --git a/Typescript/doc/models/security-permission.md b/Typescript/doc/models/security-permission.md deleted file mode 100644 index 424c595c1..000000000 --- a/Typescript/doc/models/security-permission.md +++ /dev/null @@ -1,31 +0,0 @@ - -# Security Permission - -## Structure - -`SecurityPermission` - -## Fields - -| Name | Type | Tags | Description | -| --- | --- | --- | --- | -| `id` | `string \| undefined` | Optional | GUID of the user or user group | -| `name` | `string \| undefined` | Optional | Name of the user or user group | -| `type` | `string \| undefined` | Optional | Indicates the type of principal | -| `permission` | `string \| undefined` | Optional | Indicates the permission which user or user group has on the object | -| `sharedPermission` | `string \| undefined` | Optional | Indicates the permission which user or user group has on the object through sharing of the object with this user or user group | -| `groupPermission` | [`GroupPermission[] \| undefined`](../../doc/models/group-permission.md) | Optional | An array of object with details of permission on the user groups to which the user or user group belongs | - -## Example (as JSON) - -```json -{ - "id": null, - "name": null, - "type": null, - "permission": null, - "sharedPermission": null, - "groupPermission": null -} -``` - diff --git a/Typescript/doc/models/session-login-response.md b/Typescript/doc/models/session-login-response.md deleted file mode 100644 index 45fd07a65..000000000 --- a/Typescript/doc/models/session-login-response.md +++ /dev/null @@ -1,31 +0,0 @@ - -# Session Login Response - -Login response - -## Structure - -`SessionLoginResponse` - -## Fields - -| Name | Type | Tags | Description | -| --- | --- | --- | --- | -| `userName` | `string \| undefined` | Optional | Username of the user account for which token is generated | -| `token` | `string \| undefined` | Optional | Bearer token generated. This will be blank when token type is Cookie | -| `tokenCreatedTime` | `string \| undefined` | Optional | Date and time at which the token is generated | -| `tokenExpiryDuration` | `string \| undefined` | Optional | Duration in seconds after which the token expires | -| `tokenType` | `string \| undefined` | Optional | Type of token generated | - -## Example (as JSON) - -```json -{ - "userName": null, - "token": null, - "tokenCreatedTime": null, - "tokenExpiryDuration": null, - "tokenType": null -} -``` - diff --git a/Typescript/doc/models/sort-by-1-enum.md b/Typescript/doc/models/sort-by-1-enum.md deleted file mode 100644 index fafbe555b..000000000 --- a/Typescript/doc/models/sort-by-1-enum.md +++ /dev/null @@ -1,26 +0,0 @@ - -# Sort by 1 Enum - -Field based on which the re.sponse needs to be ordered. Valid values - -## Enumeration - -`SortBy1Enum` - -## Fields - -| Name | -| --- | -| `dEFAULT` | -| `nAME` | -| `dISPLAYNAME` | -| `aUTHOR` | -| `cREATED` | -| `mODIFIED` | -| `lASTACCESSED` | -| `sYNCED` | -| `vIEWS` | -| `nONE` | -| `uSERSTATE` | -| `rOWCOUNT` | - diff --git a/Typescript/doc/models/sort-by-enum.md b/Typescript/doc/models/sort-by-enum.md deleted file mode 100644 index 457180bd6..000000000 --- a/Typescript/doc/models/sort-by-enum.md +++ /dev/null @@ -1,26 +0,0 @@ - -# Sort by Enum - -Field based on which the response needs to be ordered. - -## Enumeration - -`SortByEnum` - -## Fields - -| Name | -| --- | -| `dEFAULT` | -| `nAME` | -| `dISPLAYNAME` | -| `aUTHOR` | -| `cREATED` | -| `mODIFIED` | -| `lASTACCESSED` | -| `sYNCED` | -| `vIEWS` | -| `nONE` | -| `uSERSTATE` | -| `rOWCOUNT` | - diff --git a/Typescript/doc/models/sort-order-1-enum.md b/Typescript/doc/models/sort-order-1-enum.md deleted file mode 100644 index b1c1c74bd..000000000 --- a/Typescript/doc/models/sort-order-1-enum.md +++ /dev/null @@ -1,17 +0,0 @@ - -# Sort Order 1 Enum - -Order in which sortBy should be applied. Valid values - -## Enumeration - -`SortOrder1Enum` - -## Fields - -| Name | -| --- | -| `dEFAULT` | -| `aSC` | -| `dESC` | - diff --git a/Typescript/doc/models/sort-order-enum.md b/Typescript/doc/models/sort-order-enum.md deleted file mode 100644 index 27d5e0c75..000000000 --- a/Typescript/doc/models/sort-order-enum.md +++ /dev/null @@ -1,17 +0,0 @@ - -# Sort Order Enum - -Order in which sortBy should be applied. - -## Enumeration - -`SortOrderEnum` - -## Fields - -| Name | -| --- | -| `dEFAULT` | -| `aSC` | -| `dESC` | - diff --git a/Typescript/doc/models/state-1-enum.md b/Typescript/doc/models/state-1-enum.md deleted file mode 100644 index 3b166c252..000000000 --- a/Typescript/doc/models/state-1-enum.md +++ /dev/null @@ -1,19 +0,0 @@ - -# State 1 Enum - -Status of user account. acitve or inactive. - -## Enumeration - -`State1Enum` - -## Fields - -| Name | -| --- | -| `aCTIVE` | -| `iNACTIVE` | -| `eXPIRED` | -| `lOCKED` | -| `pENDING` | - diff --git a/Typescript/doc/models/state-enum.md b/Typescript/doc/models/state-enum.md deleted file mode 100644 index 1d3c55ebd..000000000 --- a/Typescript/doc/models/state-enum.md +++ /dev/null @@ -1,17 +0,0 @@ - -# State Enum - -## Enumeration - -`StateEnum` - -## Fields - -| Name | -| --- | -| `aCTIVE` | -| `iNACTIVE` | -| `eXPIRED` | -| `lOCKED` | -| `pENDING` | - diff --git a/Typescript/doc/models/table-columns.md b/Typescript/doc/models/table-columns.md deleted file mode 100644 index 0b38b31f8..000000000 --- a/Typescript/doc/models/table-columns.md +++ /dev/null @@ -1,23 +0,0 @@ - -# Table Columns - -## Structure - -`TableColumns` - -## Fields - -| Name | Type | Tags | Description | -| --- | --- | --- | --- | -| `name` | `string \| undefined` | Optional | Name of the column | -| `dataType` | `string \| undefined` | Optional | Datatype of the column | - -## Example (as JSON) - -```json -{ - "name": null, - "dataType": null -} -``` - diff --git a/Typescript/doc/models/table-input.md b/Typescript/doc/models/table-input.md deleted file mode 100644 index a8ac77ab6..000000000 --- a/Typescript/doc/models/table-input.md +++ /dev/null @@ -1,23 +0,0 @@ - -# Table Input - -## Structure - -`TableInput` - -## Fields - -| Name | Type | Tags | Description | -| --- | --- | --- | --- | -| `name` | `string \| undefined` | Optional | Name of the table | -| `id` | `string \| undefined` | Optional | GUID of the Table | - -## Example (as JSON) - -```json -{ - "name": null, - "id": null -} -``` - diff --git a/Typescript/doc/models/table-list.md b/Typescript/doc/models/table-list.md deleted file mode 100644 index 4330ea373..000000000 --- a/Typescript/doc/models/table-list.md +++ /dev/null @@ -1,53 +0,0 @@ - -# Table List - -## Structure - -`TableList` - -## Fields - -| Name | Type | Tags | Description | -| --- | --- | --- | --- | -| `name` | `string \| undefined` | Optional | Name of the table | -| `type` | `string \| undefined` | Optional | Type of the table | -| `id` | `string \| undefined` | Optional | GUID of the table | -| `databaseStripe` | `string \| undefined` | Optional | Name of the database to which the table belongs | -| `schemaStripe` | `string \| undefined` | Optional | Name of the schema to which the table belongs | -| `isExternal` | `boolean \| undefined` | Optional | - | -| `isDeprecated` | `boolean \| undefined` | Optional | Indicates if the table is deprecated | -| `isDeleted` | `boolean \| undefined` | Optional | Indicates if the table is deleted | -| `isHidden` | `boolean \| undefined` | Optional | Indicates if the table is hideen | -| `indexVersion` | `number \| undefined` | Optional | - | -| `generationNum` | `number \| undefined` | Optional | - | -| `created` | `string \| undefined` | Optional | Date and time when the table was created | -| `modified` | `string \| undefined` | Optional | Date and time of last modification of the table | -| `author` | [`UserNameAndID \| undefined`](../../doc/models/user-name-and-id.md) | Optional | - | -| `modifiedBy` | [`UserNameAndID \| undefined`](../../doc/models/user-name-and-id.md) | Optional | - | -| `owner` | [`UserNameAndID \| undefined`](../../doc/models/user-name-and-id.md) | Optional | - | -| `tags` | `string[] \| undefined` | Optional | List of tags assigned to the table | - -## Example (as JSON) - -```json -{ - "name": null, - "type": null, - "id": null, - "databaseStripe": null, - "schemaStripe": null, - "isExternal": null, - "isDeprecated": null, - "isDeleted": null, - "isHidden": null, - "indexVersion": null, - "generationNum": null, - "created": null, - "modified": null, - "author": null, - "modifiedBy": null, - "owner": null, - "tags": null -} -``` - diff --git a/Typescript/doc/models/tag-name-and-id-input.md b/Typescript/doc/models/tag-name-and-id-input.md deleted file mode 100644 index aa956f364..000000000 --- a/Typescript/doc/models/tag-name-and-id-input.md +++ /dev/null @@ -1,23 +0,0 @@ - -# Tag Name and Id Input - -## Structure - -`TagNameAndIdInput` - -## Fields - -| Name | Type | Tags | Description | -| --- | --- | --- | --- | -| `name` | `string \| undefined` | Optional | Name of the tags | -| `id` | `string \| undefined` | Optional | GUID of the tags | - -## Example (as JSON) - -```json -{ - "name": null, - "id": null -} -``` - diff --git a/Typescript/doc/models/tag-name-and-id.md b/Typescript/doc/models/tag-name-and-id.md deleted file mode 100644 index 3cfc931d6..000000000 --- a/Typescript/doc/models/tag-name-and-id.md +++ /dev/null @@ -1,23 +0,0 @@ - -# Tag Name and ID - -## Structure - -`TagNameAndID` - -## Fields - -| Name | Type | Tags | Description | -| --- | --- | --- | --- | -| `name` | `string \| undefined` | Optional | Name of the group to which group is added | -| `id` | `string \| undefined` | Optional | GUID of the group to which group is added | - -## Example (as JSON) - -```json -{ - "name": null, - "id": null -} -``` - diff --git a/Typescript/doc/models/to-user-name-and-id-input.md b/Typescript/doc/models/to-user-name-and-id-input.md deleted file mode 100644 index 91b8e6a2d..000000000 --- a/Typescript/doc/models/to-user-name-and-id-input.md +++ /dev/null @@ -1,25 +0,0 @@ - -# To User Name and ID Input - -A JSON object of name or GUIDs of the new owner for the objects. When both are given then id is considered. - -## Structure - -`ToUserNameAndIDInput` - -## Fields - -| Name | Type | Tags | Description | -| --- | --- | --- | --- | -| `name` | `string \| undefined` | Optional | Username of the user | -| `id` | `string \| undefined` | Optional | GUID of the user | - -## Example (as JSON) - -```json -{ - "name": null, - "id": null -} -``` - diff --git a/Typescript/doc/models/topic-enum.md b/Typescript/doc/models/topic-enum.md deleted file mode 100644 index 88dbce811..000000000 --- a/Typescript/doc/models/topic-enum.md +++ /dev/null @@ -1,13 +0,0 @@ - -# Topic Enum - -## Enumeration - -`TopicEnum` - -## Fields - -| Name | -| --- | -| `securityLogs` | - diff --git a/Typescript/doc/models/ts-object-input.md b/Typescript/doc/models/ts-object-input.md deleted file mode 100644 index 5bece7795..000000000 --- a/Typescript/doc/models/ts-object-input.md +++ /dev/null @@ -1,23 +0,0 @@ - -# Ts Object Input - -## Structure - -`TsObjectInput` - -## Fields - -| Name | Type | Tags | Description | -| --- | --- | --- | --- | -| `id` | `string` | Required | GUID of the metadata object | -| `type` | [`TypeEnum`](../../doc/models/type-enum.md) | Required | Type of the metadata object | - -## Example (as JSON) - -```json -{ - "id": "id0", - "type": "DATAOBJECT" -} -``` - diff --git a/Typescript/doc/models/ts-object-search-input.md b/Typescript/doc/models/ts-object-search-input.md deleted file mode 100644 index c42de9f47..000000000 --- a/Typescript/doc/models/ts-object-search-input.md +++ /dev/null @@ -1,25 +0,0 @@ - -# Ts Object Search Input - -## Structure - -`TsObjectSearchInput` - -## Fields - -| Name | Type | Tags | Description | -| --- | --- | --- | --- | -| `type` | [`Type2Enum`](../../doc/models/type-2-enum.md) | Required | Type of the metadata objec | -| `id` | `string[]` | Required | A JSON Array of GUIDs of the metadata object | - -## Example (as JSON) - -```json -{ - "type": "DATAOBJECT", - "id": [ - "id0" - ] -} -``` - diff --git a/Typescript/doc/models/ts-object-type-serach.md b/Typescript/doc/models/ts-object-type-serach.md deleted file mode 100644 index a0978fe77..000000000 --- a/Typescript/doc/models/ts-object-type-serach.md +++ /dev/null @@ -1,33 +0,0 @@ - -# Ts Object Type Serach - -## Structure - -`TsObjectTypeSerach` - -## Fields - -| Name | Type | Tags | Description | -| --- | --- | --- | --- | -| `id` | `string \| undefined` | Optional | GUID of the object | -| `name` | `string \| undefined` | Optional | Name of the object | -| `owner` | `string \| undefined` | Optional | Owner of the object | -| `author` | [`UserNameAndID \| undefined`](../../doc/models/user-name-and-id.md) | Optional | - | -| `permission` | `string \| undefined` | Optional | Indicates the permission which user or user group has on the object | -| `sharedPermission` | `string \| undefined` | Optional | Indicates the permission which user or user group has on the object through sharing of the object with the user or user group | -| `groupPermission` | [`GroupPermission[] \| undefined`](../../doc/models/group-permission.md) | Optional | An array of object with details of permission on the user groups to which the user or user group belongs | - -## Example (as JSON) - -```json -{ - "id": null, - "name": null, - "owner": null, - "author": null, - "permission": null, - "sharedPermission": null, - "groupPermission": null -} -``` - diff --git a/Typescript/doc/models/tspublic-rest-v2-admin-assignauthor-request.md b/Typescript/doc/models/tspublic-rest-v2-admin-assignauthor-request.md deleted file mode 100644 index 950643bab..000000000 --- a/Typescript/doc/models/tspublic-rest-v2-admin-assignauthor-request.md +++ /dev/null @@ -1,29 +0,0 @@ - -# Tspublic Rest V2 Admin Assignauthor Request - -## Structure - -`TspublicRestV2AdminAssignauthorRequest` - -## Fields - -| Name | Type | Tags | Description | -| --- | --- | --- | --- | -| `tsObjectId` | `string[]` | Required | A JSON array of GUIDs of the metadata objects. | -| `name` | `string \| undefined` | Optional | User name of the user account | -| `id` | `string \| undefined` | Optional | The GUID of the user account | - -## Example (as JSON) - -```json -{ - "tsObjectId": [ - "tsObjectId1", - "tsObjectId2", - "tsObjectId3" - ], - "name": null, - "id": null -} -``` - diff --git a/Typescript/doc/models/tspublic-rest-v2-admin-changeauthor-request.md b/Typescript/doc/models/tspublic-rest-v2-admin-changeauthor-request.md deleted file mode 100644 index d7e871fb3..000000000 --- a/Typescript/doc/models/tspublic-rest-v2-admin-changeauthor-request.md +++ /dev/null @@ -1,35 +0,0 @@ - -# Tspublic Rest V2 Admin Changeauthor Request - -## Structure - -`TspublicRestV2AdminChangeauthorRequest` - -## Fields - -| Name | Type | Tags | Description | -| --- | --- | --- | --- | -| `tsObjectId` | `string[]` | Required | A JSON array of GUIDs of the metadata objects.

To change owner of all the objects owned by a user, provide single input as ALL.

If multiple object ids along with ALL is provided as input, then ALL will be considered. | -| `fromUser` | [`FromUserNameAndIDInput`](../../doc/models/from-user-name-and-id-input.md) | Required | A JSON object of name or GUIDs of the current owner of the objects. When both are given then id is considered.

If a list of object ids are provided as input for TsObjectId, then only for those ids that have owner as the value provided in fromUser, the owner will be changed.

Provide either name or id as input. When both are given user id will be considered. | -| `toUser` | [`ToUserNameAndIDInput`](../../doc/models/to-user-name-and-id-input.md) | Required | A JSON object of name or GUIDs of the new owner for the objects. When both are given then id is considered. | - -## Example (as JSON) - -```json -{ - "tsObjectId": [ - "tsObjectId1", - "tsObjectId2", - "tsObjectId3" - ], - "fromUser": { - "name": null, - "id": null - }, - "toUser": { - "name": null, - "id": null - } -} -``` - diff --git a/Typescript/doc/models/tspublic-rest-v2-admin-configuration-update-request.md b/Typescript/doc/models/tspublic-rest-v2-admin-configuration-update-request.md deleted file mode 100644 index 3affb49f9..000000000 --- a/Typescript/doc/models/tspublic-rest-v2-admin-configuration-update-request.md +++ /dev/null @@ -1,21 +0,0 @@ - -# Tspublic Rest V2 Admin Configuration Update Request - -## Structure - -`TspublicRestV2AdminConfigurationUpdateRequest` - -## Fields - -| Name | Type | Tags | Description | -| --- | --- | --- | --- | -| `configuration` | `string \| undefined` | Optional | A JSON file with the key-value pair of configuration attributes to be updated.

Example: {"defaultChartDataSize": 5000} | - -## Example (as JSON) - -```json -{ - "configuration": null -} -``` - diff --git a/Typescript/doc/models/tspublic-rest-v2-admin-forcelogout-request.md b/Typescript/doc/models/tspublic-rest-v2-admin-forcelogout-request.md deleted file mode 100644 index f99a0c7f5..000000000 --- a/Typescript/doc/models/tspublic-rest-v2-admin-forcelogout-request.md +++ /dev/null @@ -1,21 +0,0 @@ - -# Tspublic Rest V2 Admin Forcelogout Request - -## Structure - -`TspublicRestV2AdminForcelogoutRequest` - -## Fields - -| Name | Type | Tags | Description | -| --- | --- | --- | --- | -| `user` | [`NameAndIdInput[] \| undefined`](../../doc/models/name-and-id-input.md) | Optional | A JSON array of name of users or GUIDs of groups or both. When both are given then id is considered. | - -## Example (as JSON) - -```json -{ - "user": null -} -``` - diff --git a/Typescript/doc/models/tspublic-rest-v2-admin-resetpassword-request.md b/Typescript/doc/models/tspublic-rest-v2-admin-resetpassword-request.md deleted file mode 100644 index 2d08678cb..000000000 --- a/Typescript/doc/models/tspublic-rest-v2-admin-resetpassword-request.md +++ /dev/null @@ -1,25 +0,0 @@ - -# Tspublic Rest V2 Admin Resetpassword Request - -## Structure - -`TspublicRestV2AdminResetpasswordRequest` - -## Fields - -| Name | Type | Tags | Description | -| --- | --- | --- | --- | -| `name` | `string \| undefined` | Optional | User name of the user account | -| `id` | `string \| undefined` | Optional | The GUID of the user account to query. | -| `newPassword` | `string` | Required | A new password for the user. | - -## Example (as JSON) - -```json -{ - "name": null, - "id": null, - "newPassword": "newPassword6" -} -``` - diff --git a/Typescript/doc/models/tspublic-rest-v2-admin-syncprincipal-request.md b/Typescript/doc/models/tspublic-rest-v2-admin-syncprincipal-request.md deleted file mode 100644 index b04d3336f..000000000 --- a/Typescript/doc/models/tspublic-rest-v2-admin-syncprincipal-request.md +++ /dev/null @@ -1,40 +0,0 @@ - -# Tspublic Rest V2 Admin Syncprincipal Request - -## Structure - -`TspublicRestV2AdminSyncprincipalRequest` - -## Fields - -| Name | Type | Tags | Description | -| --- | --- | --- | --- | -| `principalObject` | `unknown[]` | Required | A JSON array of principal objects containing all users and groups present in the external system.

Example:

{

"name": "Customer Success",

"displayName": "Customer Success",

"description": "CS",

"created": 1568926267025,

"modified": 1568926982242,

"principalTypeEnum": "LOCAL_GROUP",

"groupNames": [],

"visibility": "DEFAULT"

},

{

"name": "test",

"displayName": "test one",

"created": 1587573621279,

"modified": 1587573621674,

"mail": "test2@test.com",

"principalTypeEnum": "LOCAL_USER",

"groupNames": [ "Administrator", "All" ],

"visibility": "DEFAULT"

}

You can leave the created and modified dates blank for new users.

You can specify if the principal is a user (LOCAL_USER) or user group (LOCAL_GROUP) in the principalTypeEnum keyword.

Set visibility to NON_SHARABLE, if you do not want the user to be able to share ThoughtSpot objects with other users in this group. | -| `updateModified` | `boolean \| undefined` | Optional | Specifies whether to apply the changes to users and groups already in the cluster based on the principal object list input.
**Default**: `false` | -| `deleteRemoved` | `boolean \| undefined` | Optional | Specifies whether to delete the users and groups already in the cluster if not present in the principal object list input.
**Default**: `false` | -| `newUserPassword` | `string \| undefined` | Optional | Assign a password for new users added during the sync operation.

All new users added will have this password. It is mandatory to provide value for this field if new users are included in the input list. | - -## Example (as JSON) - -```json -{ - "principalObject": [ - { - "key1": "val1", - "key2": "val2" - }, - { - "key1": "val1", - "key2": "val2" - }, - { - "key1": "val1", - "key2": "val2" - } - ], - "updateModified": null, - "deleteRemoved": null, - "newUserPassword": null -} -``` - diff --git a/Typescript/doc/models/tspublic-rest-v2-connection-addtable-request.md b/Typescript/doc/models/tspublic-rest-v2-connection-addtable-request.md deleted file mode 100644 index ef1e5dcbf..000000000 --- a/Typescript/doc/models/tspublic-rest-v2-connection-addtable-request.md +++ /dev/null @@ -1,35 +0,0 @@ - -# Tspublic Rest V2 Connection Addtable Request - -## Structure - -`TspublicRestV2ConnectionAddtableRequest` - -## Fields - -| Name | Type | Tags | Description | -| --- | --- | --- | --- | -| `id` | `string` | Required | GUID of the connection | -| `table` | [`AddTableInput[]`](../../doc/models/add-table-input.md) | Required | A JSON array of table details | - -## Example (as JSON) - -```json -{ - "id": "id0", - "table": [ - { - "name": "name6", - "dbName": "dbName4", - "schemaName": "schemaName0", - "columns": [ - { - "name": "name6", - "dataType": "dataType8" - } - ] - } - ] -} -``` - diff --git a/Typescript/doc/models/tspublic-rest-v2-connection-create-request.md b/Typescript/doc/models/tspublic-rest-v2-connection-create-request.md deleted file mode 100644 index 18cbef17b..000000000 --- a/Typescript/doc/models/tspublic-rest-v2-connection-create-request.md +++ /dev/null @@ -1,27 +0,0 @@ - -# Tspublic Rest V2 Connection Create Request - -## Structure - -`TspublicRestV2ConnectionCreateRequest` - -## Fields - -| Name | Type | Tags | Description | -| --- | --- | --- | --- | -| `type` | [`Type14Enum`](../../doc/models/type-14-enum.md) | Required | Type of the data connection. | -| `name` | `string` | Required | Name of the connection | -| `description` | `string \| undefined` | Optional | A short description of the connection. | -| `configuration` | `string` | Required | A JSON object of the connection metadata. The metadata must include configuration attributes required to create the connection. | - -## Example (as JSON) - -```json -{ - "type": "DENODO", - "name": "name0", - "description": null, - "configuration": "configuration6" -} -``` - diff --git a/Typescript/doc/models/tspublic-rest-v2-connection-removetable-request.md b/Typescript/doc/models/tspublic-rest-v2-connection-removetable-request.md deleted file mode 100644 index 2f0c562bb..000000000 --- a/Typescript/doc/models/tspublic-rest-v2-connection-removetable-request.md +++ /dev/null @@ -1,28 +0,0 @@ - -# Tspublic Rest V2 Connection Removetable Request - -## Structure - -`TspublicRestV2ConnectionRemovetableRequest` - -## Fields - -| Name | Type | Tags | Description | -| --- | --- | --- | --- | -| `id` | `string` | Required | GUID of the connection | -| `table` | [`TableInput[]`](../../doc/models/table-input.md) | Required | A JSON array of name or GUIDs of the table or both. At least one input is required. Provide either table name or id. When both are given then id is considered | - -## Example (as JSON) - -```json -{ - "id": "id0", - "table": [ - { - "name": null, - "id": null - } - ] -} -``` - diff --git a/Typescript/doc/models/tspublic-rest-v2-connection-search-request.md b/Typescript/doc/models/tspublic-rest-v2-connection-search-request.md deleted file mode 100644 index 03d31853c..000000000 --- a/Typescript/doc/models/tspublic-rest-v2-connection-search-request.md +++ /dev/null @@ -1,39 +0,0 @@ - -# Tspublic Rest V2 Connection Search Request - -## Structure - -`TspublicRestV2ConnectionSearchRequest` - -## Fields - -| Name | Type | Tags | Description | -| --- | --- | --- | --- | -| `offset` | `number \| undefined` | Optional | The offset point, starting from where the records should be included in the response. If no input is provided then offset starts from 0
**Default**: `0` | -| `batchNumber` | `number \| undefined` | Optional | An alternate way to set offset for the starting point of the response. Offset field should be kept blank to use the value from this field. Offset value will be calculated as (batchNumber - 1) * batchSize. It is mandatory to provide a value for batchSize with batchNumber. Example: Assume response has 100 records. Now, batchNumber is set as 2 and batchSize as 10, then offset value will be 10. So, 10 records starting from 11th record will be considered.
**Default**: `-1` | -| `batchSize` | `number \| undefined` | Optional | The number of records that should be included in the response starting from offset position. If no input is provided, then all records starting from the value provided in offset is included in the response.
**Default**: `-1` | -| `sortBy` | [`SortBy1Enum \| undefined`](../../doc/models/sort-by-1-enum.md) | Optional | Field based on which the re.sponse needs to be ordered. Valid values
**Default**: `SortBy1Enum.DEFAULT` | -| `sortOrder` | [`SortOrder1Enum \| undefined`](../../doc/models/sort-order-1-enum.md) | Optional | Order in which sortBy should be applied. Valid values | -| `type` | [`Type15Enum`](../../doc/models/type-15-enum.md) | Required | Type of the connect being searched. Valid values: SNOWFLAKE\|AMAZON_REDSHIFT\|GOOGLE_BIGQUERY\|AZURE_SYNAPSE\|TERADATA\|STARBURST\|SAP_HANA\|ORACLE_ADW\|DATABRICKS\|DENODO | -| `namePattern` | `string \| undefined` | Optional | A pattern to match the name of the connection. This parameter supports matching case-insensitive strings. For a wildcard match, use %. | -| `fetchId` | `string[] \| undefined` | Optional | A JSON array containing the GUIDs of the connections that you want to fetch. | -| `skipId` | `string[] \| undefined` | Optional | A JSON array containing the GUIDs of the connections that you want to skip. | -| `tag` | [`TagNameAndIdInput[] \| undefined`](../../doc/models/tag-name-and-id-input.md) | Optional | A JSON array of name or GUID of tags or both. When both are given then id is considered | - -## Example (as JSON) - -```json -{ - "offset": null, - "batchNumber": null, - "batchSize": null, - "sortBy": null, - "sortOrder": null, - "type": "DENODO", - "namePattern": null, - "fetchId": null, - "skipId": null, - "tag": null -} -``` - diff --git a/Typescript/doc/models/tspublic-rest-v2-connection-table-request.md b/Typescript/doc/models/tspublic-rest-v2-connection-table-request.md deleted file mode 100644 index fa64ea526..000000000 --- a/Typescript/doc/models/tspublic-rest-v2-connection-table-request.md +++ /dev/null @@ -1,25 +0,0 @@ - -# Tspublic Rest V2 Connection Table Request - -## Structure - -`TspublicRestV2ConnectionTableRequest` - -## Fields - -| Name | Type | Tags | Description | -| --- | --- | --- | --- | -| `id` | `string` | Required | The GUID of the connection | -| `configuration` | `string \| undefined` | Optional | A JSON object of the connection metadata. If this field is left empty, then the configuration saved in the connection is considered.

To get the tables based on a different configuration, include required attributes in the connection configuration JSON.

Example:

Get tables from Snowflake with a different user account than specified in the connection: {"user":"test_user","password":"test_pwd","role":"test_role"}

Get tables from Redshift for different database than specified in the connection: {"database":"test_db"} | -| `includeColumn` | `boolean \| undefined` | Optional | When set to true, the response will include column level details as well
**Default**: `true` | - -## Example (as JSON) - -```json -{ - "id": "id0", - "configuration": null, - "includeColumn": null -} -``` - diff --git a/Typescript/doc/models/tspublic-rest-v2-connection-tablecoloumn-request.md b/Typescript/doc/models/tspublic-rest-v2-connection-tablecoloumn-request.md deleted file mode 100644 index 85f09a3bb..000000000 --- a/Typescript/doc/models/tspublic-rest-v2-connection-tablecoloumn-request.md +++ /dev/null @@ -1,31 +0,0 @@ - -# Tspublic Rest V2 Connection Tablecoloumn Request - -## Structure - -`TspublicRestV2ConnectionTablecoloumnRequest` - -## Fields - -| Name | Type | Tags | Description | -| --- | --- | --- | --- | -| `id` | `string` | Required | The GUID of the connection | -| `configuration` | `string \| undefined` | Optional | A JSON object of the connection metadata. If this field is left empty, then the configuration saved in the connection is considered.

To get the tables based on a different configuration, include required attributes in the connection configuration JSON.

Example:

Get tables from Snowflake with a different user account than specified in the connection: {"user":"test_user","password":"test_pwd","role":"test_role"}

Get tables from Redshift for different database than specified in the connection: {"database":"test_db"} | -| `table` | [`ConnectionTableColumnsInput[]`](../../doc/models/connection-table-columns-input.md) | Required | List of table details | - -## Example (as JSON) - -```json -{ - "id": "id0", - "configuration": null, - "table": [ - { - "dbName": "dbName4", - "schemaName": "schemaName0", - "name": "name6" - } - ] -} -``` - diff --git a/Typescript/doc/models/tspublic-rest-v2-connection-update-request.md b/Typescript/doc/models/tspublic-rest-v2-connection-update-request.md deleted file mode 100644 index 4742d2402..000000000 --- a/Typescript/doc/models/tspublic-rest-v2-connection-update-request.md +++ /dev/null @@ -1,27 +0,0 @@ - -# Tspublic Rest V2 Connection Update Request - -## Structure - -`TspublicRestV2ConnectionUpdateRequest` - -## Fields - -| Name | Type | Tags | Description | -| --- | --- | --- | --- | -| `id` | `string` | Required | GUID of the connection | -| `name` | `string \| undefined` | Optional | The text to update the name of the connection. | -| `description` | `string \| undefined` | Optional | The text to update the description of the connection. | -| `configuration` | `string` | Required | A JSON object of the connection metadata. Include all the configuration attributes with original value along with the changes required to any attribute. | - -## Example (as JSON) - -```json -{ - "id": "id0", - "name": null, - "description": null, - "configuration": "configuration6" -} -``` - diff --git a/Typescript/doc/models/tspublic-rest-v2-customaction-association-update-request.md b/Typescript/doc/models/tspublic-rest-v2-customaction-association-update-request.md deleted file mode 100644 index 5e0c15229..000000000 --- a/Typescript/doc/models/tspublic-rest-v2-customaction-association-update-request.md +++ /dev/null @@ -1,23 +0,0 @@ - -# Tspublic Rest V2 Customaction Association Update Request - -## Structure - -`TspublicRestV2CustomactionAssociationUpdateRequest` - -## Fields - -| Name | Type | Tags | Description | -| --- | --- | --- | --- | -| `id` | `string` | Required | GUID of the custom action | -| `association` | `string` | Required | A JSON map of the attributes with association of the action to ThoughtSpot object ID

Example:

{"id":"0dbd5b3a-84c1-4407-9803-cf07d67e6fcf","name":"My worksheet action","version":"v2","type":"URL","detail":{"link":"https://unpkg.com","function":"my-worksheet-action","authSelect":"NONE","authToken":"","encodeUser":"","apiKey":"X-API-KEY","apiValue":"","additionalUrlHeaders":"{}"},"actionAssociationMap":{"WORKSHEET":{"2b9d083a-275c-4984-9cfe-90b036affa17":{"enabled":"true","context":"PRIMARY"}}},"context":"NONE","availability":[ ],"userGroupList":["d0326b56-ef23-4c8a-8327-a30e99bcc72b"]} | - -## Example (as JSON) - -```json -{ - "id": "id0", - "association": "association0" -} -``` - diff --git a/Typescript/doc/models/tspublic-rest-v2-customaction-create-request.md b/Typescript/doc/models/tspublic-rest-v2-customaction-create-request.md deleted file mode 100644 index 77e668387..000000000 --- a/Typescript/doc/models/tspublic-rest-v2-customaction-create-request.md +++ /dev/null @@ -1,21 +0,0 @@ - -# Tspublic Rest V2 Customaction Create Request - -## Structure - -`TspublicRestV2CustomactionCreateRequest` - -## Fields - -| Name | Type | Tags | Description | -| --- | --- | --- | --- | -| `configuration` | `string` | Required | A JSON object with the key-value pair of configuration attributes

Example:

{"id":"3f7eac93-cce1-4ffc-b7a8-429353edbc6b","name":"unpkg test","version":"v2","type":"URL","detail":{"link":"https://unpkg.com ","function":"unpkg-test","authSelect":"BEARER","authToken":"asdfasadf3q4534534","encodeUser":"","apiKey":"X-API-KEY","apiValue":"","additionalUrlHeaders":"{\\"url_header1\\":{\\"id\\":\\"6a82908c-9328-40ff-b347-65adeda12f57\\",\\"key\\":\\"key1\\",\\"value\\":\\"value1\\"}}"},"actionAssociationMap":{"ANSWER":{"e4079d3f-ae71-4b0a-a70a-f17ecaf157a5":{"enabled":"true","context":"MENU"}}},"context":"NONE","availability":["GLOBAL"],"userGroupList":["d0326b56-ef23-4c8a-8327-a30e99bcc72b"]} | - -## Example (as JSON) - -```json -{ - "configuration": "configuration6" -} -``` - diff --git a/Typescript/doc/models/tspublic-rest-v2-customaction-search-request.md b/Typescript/doc/models/tspublic-rest-v2-customaction-search-request.md deleted file mode 100644 index 549ca82ce..000000000 --- a/Typescript/doc/models/tspublic-rest-v2-customaction-search-request.md +++ /dev/null @@ -1,21 +0,0 @@ - -# Tspublic Rest V2 Customaction Search Request - -## Structure - -`TspublicRestV2CustomactionSearchRequest` - -## Fields - -| Name | Type | Tags | Description | -| --- | --- | --- | --- | -| `tag` | `string[] \| undefined` | Optional | A JSON array of tag GUIDs.

If tags are applied to worksheets, search answers, or Liveboard visualizations, and custom actions are associated to these objects, you can use this parameter to filter the custom action data by tags. | - -## Example (as JSON) - -```json -{ - "tag": null -} -``` - diff --git a/Typescript/doc/models/tspublic-rest-v2-customaction-update-request.md b/Typescript/doc/models/tspublic-rest-v2-customaction-update-request.md deleted file mode 100644 index 888a203a1..000000000 --- a/Typescript/doc/models/tspublic-rest-v2-customaction-update-request.md +++ /dev/null @@ -1,23 +0,0 @@ - -# Tspublic Rest V2 Customaction Update Request - -## Structure - -`TspublicRestV2CustomactionUpdateRequest` - -## Fields - -| Name | Type | Tags | Description | -| --- | --- | --- | --- | -| `id` | `string` | Required | GUID of the custom action | -| `configuration` | `string` | Required | A JSON object with the key-value pair of configuration attributes

Example:

{"id":"3f7eac93-cce1-4ffc-b7a8-429353edbc6b","name":"unpkg test","version":"v2","type":"URL","detail":{"link":"https://unpkg.com ","function":"unpkg-test","authSelect":"BEARER","authToken":"asdfasadf3q4534534","encodeUser":"","apiKey":"X-API-KEY","apiValue":"","additionalUrlHeaders":"{\\"url_header1\\":{\\"id\\":\\"6a82908c-9328-40ff-b347-65adeda12f57\\",\\"key\\":\\"key1\\",\\"value\\":\\"value1\\"}}"},"actionAssociationMap":{"ANSWER":{"e4079d3f-ae71-4b0a-a70a-f17ecaf157a5":{"enabled":"true","context":"MENU"}}},"context":"NONE","availability":["GLOBAL"],"userGroupList":["d0326b56-ef23-4c8a-8327-a30e99bcc72b"]} | - -## Example (as JSON) - -```json -{ - "id": "id0", - "configuration": "configuration6" -} -``` - diff --git a/Typescript/doc/models/tspublic-rest-v2-data-answer-request.md b/Typescript/doc/models/tspublic-rest-v2-data-answer-request.md deleted file mode 100644 index a9cdc0d91..000000000 --- a/Typescript/doc/models/tspublic-rest-v2-data-answer-request.md +++ /dev/null @@ -1,29 +0,0 @@ - -# Tspublic Rest V2 Data Answer Request - -## Structure - -`TspublicRestV2DataAnswerRequest` - -## Fields - -| Name | Type | Tags | Description | -| --- | --- | --- | --- | -| `offset` | `number \| undefined` | Optional | The offset point, starting from where the records should be included in the response.

If no input is provided then offset starts from 0.
**Default**: `0` | -| `batchNumber` | `number \| undefined` | Optional | An alternate way to set offset for the starting point of the response.

The value in offset field will not be considered if batchNumber field has value greater than 0.

Offset value will be calculated as (batchNumber - 1) * batchSize.

It is mandatory to provide a value for batchSize with batchNumber.

Example:

Assume response has 100 records. Now, batchNumber is set as 2 and batchSize as 10, then offset value will be 10. So, 10 records starting from 11th record will be considered.
**Default**: `-1` | -| `batchSize` | `number \| undefined` | Optional | The number of records that should be included in the response starting from offset position.

If no input is provided, then all records starting from the value provided in offset is included in the response
**Default**: `-1` | -| `id` | `string` | Required | The GUID of the Answer | -| `formatType` | [`FormatTypeEnum \| undefined`](../../doc/models/format-type-enum.md) | Optional | The format of the data in the response.

FULL: The response comes in "column":"value" format.

COMPACT: The response includes only the value of the columns.
**Default**: `FormatTypeEnum.COMPACT` | - -## Example (as JSON) - -```json -{ - "offset": null, - "batchNumber": null, - "batchSize": null, - "id": "id0", - "formatType": null -} -``` - diff --git a/Typescript/doc/models/tspublic-rest-v2-data-liveboard-request.md b/Typescript/doc/models/tspublic-rest-v2-data-liveboard-request.md deleted file mode 100644 index 7831474bc..000000000 --- a/Typescript/doc/models/tspublic-rest-v2-data-liveboard-request.md +++ /dev/null @@ -1,37 +0,0 @@ - -# Tspublic Rest V2 Data Liveboard Request - -## Structure - -`TspublicRestV2DataLiveboardRequest` - -## Fields - -| Name | Type | Tags | Description | -| --- | --- | --- | --- | -| `offset` | `number \| undefined` | Optional | The offset point, starting from where the records should be included in the response.

If no input is provided then offset starts from 0.
**Default**: `0` | -| `batchNumber` | `number \| undefined` | Optional | An alternate way to set offset for the starting point of the response.

The value in offset field will not be considered if batchNumber field has value greater than 0.

Offset value will be calculated as (batchNumber - 1) * batchSize.

It is mandatory to provide a value for batchSize with batchNumber.

Example:

Assume response has 100 records. Now, batchNumber is set as 2 and batchSize as 10, then offset value will be 10. So, 10 records starting from 11th record will be considered.
**Default**: `-1` | -| `batchSize` | `number \| undefined` | Optional | The number of records that should be included in the response starting from offset position.

If no input is provided, then all records starting from the value provided in offset is included in the response
**Default**: `-1` | -| `id` | `string \| undefined` | Optional | The GUID of the Liveboard | -| `transientContent` | `string \| undefined` | Optional | If you have embedded ThoughtSpot in your host application, and you want to download Liveboard data with unsaved changes then, pass the transient content from the browser fetch request, using the getExportRequestForCurrentPinboard method. For more information, see https://developers.thoughtspot.com/docs/?pageid=liveboard-export-api#transient-pinboard . If value for this field is provided, then id will not be considered. | -| `vizId` | `string[] \| undefined` | Optional | A JSON array of GUIDs of the visualizations in the Liveboard. | -| `runtimeFilter` | `string \| undefined` | Optional | JSON object which contains filter condition to filter the data at the time of data retrieval.

Example: {"col1":"region","op1":"EQ","val1":"northeast","col2":"date","op2":"BET","val2":["1625126400000","1625126400000"]}

For more information, see https://developers.thoughtspot.com/docs/?pageid=runtime-filters | -| `runtimeSort` | `string \| undefined` | Optional | JSON object which provides columns to sort the data at the time of data retrieval.

Example: {"sortCol1":"region","asc1":true,"sortCol2":"date"}

For more information, see https://developers.thoughtspot.com/docs/?pageid=runtime-filters. | -| `formatType` | [`FormatTypeEnum \| undefined`](../../doc/models/format-type-enum.md) | Optional | The format of the data in the response.

FULL: The response comes in "column":"value" format.

COMPACT: The response includes only the value of the columns.
**Default**: `FormatTypeEnum.COMPACT` | - -## Example (as JSON) - -```json -{ - "offset": null, - "batchNumber": null, - "batchSize": null, - "id": null, - "transientContent": null, - "vizId": null, - "runtimeFilter": null, - "runtimeSort": null, - "formatType": null -} -``` - diff --git a/Typescript/doc/models/tspublic-rest-v2-data-search-request.md b/Typescript/doc/models/tspublic-rest-v2-data-search-request.md deleted file mode 100644 index 3b44554f6..000000000 --- a/Typescript/doc/models/tspublic-rest-v2-data-search-request.md +++ /dev/null @@ -1,31 +0,0 @@ - -# Tspublic Rest V2 Data Search Request - -## Structure - -`TspublicRestV2DataSearchRequest` - -## Fields - -| Name | Type | Tags | Description | -| --- | --- | --- | --- | -| `offset` | `number \| undefined` | Optional | The offset point, starting from where the records should be included in the response.

If no input is provided then offset starts from 0.
**Default**: `-1` | -| `batchNumber` | `number \| undefined` | Optional | An alternate way to set offset for the starting point of the response.

The value in offset field will not be considered if batchNumber field has value greater than 0.

Offset value will be calculated as (batchNumber - 1) * batchSize.

It is mandatory to provide a value for batchSize with batchNumber.

Example:

Assume response has 100 records. Now, batchNumber is set as 2 and batchSize as 10, then offset value will be 10. So, 10 records starting from 11th record will be considered.
**Default**: `-1` | -| `batchSize` | `number \| undefined` | Optional | The number of records that should be included in the response starting from offset position.

If no input is provided, then all records starting from the value provided in offset is included in the response
**Default**: `-1` | -| `queryString` | `string` | Required | The data search query string. Example: [revenue] > 1000 [ship mode] = 'air' | -| `dataObjectId` | `string` | Required | The GUID of the data object, either a worksheet, a view, or a table. | -| `formatType` | [`FormatTypeEnum \| undefined`](../../doc/models/format-type-enum.md) | Optional | The format of the data in the response.

FULL: The response comes in "column":"value" format.

COMPACT: The response includes only the value of the columns.
**Default**: `FormatTypeEnum.COMPACT` | - -## Example (as JSON) - -```json -{ - "offset": null, - "batchNumber": null, - "batchSize": null, - "queryString": "queryString4", - "dataObjectId": "dataObjectId2", - "formatType": null -} -``` - diff --git a/Typescript/doc/models/tspublic-rest-v2-database-table-create-request.md b/Typescript/doc/models/tspublic-rest-v2-database-table-create-request.md deleted file mode 100644 index e1c08c0a4..000000000 --- a/Typescript/doc/models/tspublic-rest-v2-database-table-create-request.md +++ /dev/null @@ -1,23 +0,0 @@ - -# Tspublic Rest V2 Database Table Create Request - -## Structure - -`TspublicRestV2DatabaseTableCreateRequest` - -## Fields - -| Name | Type | Tags | Description | -| --- | --- | --- | --- | -| `createDatabase` | `boolean \| undefined` | Optional | Flag to indicate if the database and schema should be created if they do not exist in Falcon. (Valid values: True/False)
**Default**: `true` | -| `schema` | `string \| undefined` | Optional | DDL of the table to be created. Example: {"database":{"name":"test_db"},"schema":{"name":"test_schema"},"table":{"id":{"name":"test_table"},"primary_key":[{"name":"test_pk"}],"column":[{"id":{"name":"test_pk"},"size":0,"data_type":"TYPE_INT32"},{"id":{"name":"test_col1"},"size":0,"data_type":"TYPE_FLOAT"},{"id":{"name":"test_col2"},"data_type":"TYPE_INT64","datetime":"TYPE_DATE"}{"id":{"name":"test_col3"},"size":10,"data_type":"TYPE_VAR_CHAR"}]}} | - -## Example (as JSON) - -```json -{ - "createDatabase": null, - "schema": null -} -``` - diff --git a/Typescript/doc/models/tspublic-rest-v2-database-table-runquery-request.md b/Typescript/doc/models/tspublic-rest-v2-database-table-runquery-request.md deleted file mode 100644 index 8675aaf7a..000000000 --- a/Typescript/doc/models/tspublic-rest-v2-database-table-runquery-request.md +++ /dev/null @@ -1,23 +0,0 @@ - -# Tspublic Rest V2 Database Table Runquery Request - -## Structure - -`TspublicRestV2DatabaseTableRunqueryRequest` - -## Fields - -| Name | Type | Tags | Description | -| --- | --- | --- | --- | -| `statement` | `string[]` | Required | A JSON array of TQL statements separated by semi-colon (;). Each TQL statement should end with semi-colon (;). The TQL operations that can be run through this API are restricted to create database and schema, alter table, delete and update table rows. If a TQL statement fails, then the subsequent statements in the array are not run. Example: ["alter table test_db.test_schema.test_table drop contraint primary key;";"alter table test_db.test_schema.test_table add column test_col4 varchar(10) DEFAULT '';"] | - -## Example (as JSON) - -```json -{ - "statement": [ - "statement0" - ] -} -``` - diff --git a/Typescript/doc/models/tspublic-rest-v2-group-addgroup-request.md b/Typescript/doc/models/tspublic-rest-v2-group-addgroup-request.md deleted file mode 100644 index 54a61227f..000000000 --- a/Typescript/doc/models/tspublic-rest-v2-group-addgroup-request.md +++ /dev/null @@ -1,38 +0,0 @@ - -# Tspublic Rest V2 Group Addgroup Request - -## Structure - -`TspublicRestV2GroupAddgroupRequest` - -## Fields - -| Name | Type | Tags | Description | -| --- | --- | --- | --- | -| `name` | `string \| undefined` | Optional | Name of the group | -| `id` | `string \| undefined` | Optional | The GUID of the group to query. | -| `groups` | [`GroupNameAndIDInput[]`](../../doc/models/group-name-and-id-input.md) | Required | Array of objects of groups that the user belong to. | - -## Example (as JSON) - -```json -{ - "name": null, - "id": null, - "groups": [ - { - "name": null, - "id": null - }, - { - "name": null, - "id": null - }, - { - "name": null, - "id": null - } - ] -} -``` - diff --git a/Typescript/doc/models/tspublic-rest-v2-group-addprivilege-request.md b/Typescript/doc/models/tspublic-rest-v2-group-addprivilege-request.md deleted file mode 100644 index 1bbcd3977..000000000 --- a/Typescript/doc/models/tspublic-rest-v2-group-addprivilege-request.md +++ /dev/null @@ -1,25 +0,0 @@ - -# Tspublic Rest V2 Group Addprivilege Request - -## Structure - -`TspublicRestV2GroupAddprivilegeRequest` - -## Fields - -| Name | Type | Tags | Description | -| --- | --- | --- | --- | -| `name` | `string \| undefined` | Optional | Name of the group | -| `id` | `string \| undefined` | Optional | The GUID of the group to query. | -| `privileges` | [`PrivilegeEnum[] \| undefined`](../../doc/models/privilege-enum.md) | Optional | A JSON array of name of users or GUIDs of users or both. When both are given then id is considered | - -## Example (as JSON) - -```json -{ - "name": null, - "id": null, - "privileges": null -} -``` - diff --git a/Typescript/doc/models/tspublic-rest-v2-group-adduser-request.md b/Typescript/doc/models/tspublic-rest-v2-group-adduser-request.md deleted file mode 100644 index 7b2540fe4..000000000 --- a/Typescript/doc/models/tspublic-rest-v2-group-adduser-request.md +++ /dev/null @@ -1,34 +0,0 @@ - -# Tspublic Rest V2 Group Adduser Request - -## Structure - -`TspublicRestV2GroupAdduserRequest` - -## Fields - -| Name | Type | Tags | Description | -| --- | --- | --- | --- | -| `name` | `string \| undefined` | Optional | Name of the group | -| `id` | `string \| undefined` | Optional | The GUID of the group to query. | -| `users` | [`UserNameAndIDInput[]`](../../doc/models/user-name-and-id-input.md) | Required | Array of user name that you want to update in user group. | - -## Example (as JSON) - -```json -{ - "name": null, - "id": null, - "users": [ - { - "name": null, - "id": null - }, - { - "name": null, - "id": null - } - ] -} -``` - diff --git a/Typescript/doc/models/tspublic-rest-v2-group-create-request.md b/Typescript/doc/models/tspublic-rest-v2-group-create-request.md deleted file mode 100644 index e349b71e5..000000000 --- a/Typescript/doc/models/tspublic-rest-v2-group-create-request.md +++ /dev/null @@ -1,37 +0,0 @@ - -# Tspublic Rest V2 Group Create Request - -## Structure - -`TspublicRestV2GroupCreateRequest` - -## Fields - -| Name | Type | Tags | Description | -| --- | --- | --- | --- | -| `name` | `string` | Required | Name of the user group. The group name string must be unique. | -| `displayName` | `string` | Required | A unique display name string for the user group, for example, Developer group. | -| `visibility` | [`Visibility2Enum \| undefined`](../../doc/models/visibility-2-enum.md) | Optional | Visibility of the user group. The visibility attribute is set to DEFAULT. The DEFAULT attribute makes the user group visible for other user groups and allows them to share objects.
**Default**: `Visibility2Enum.DEFAULT` | -| `description` | `string \| undefined` | Optional | Description text for the group. | -| `privileges` | [`PrivilegeEnum[] \| undefined`](../../doc/models/privilege-enum.md) | Optional | A JSON array of privileges assigned to the group | -| `orgId` | `number \| undefined` | Optional | Unique identifier of the organization. If no value is provided then group will be created in the organization associated with the login session. | -| `groups` | [`GroupNameAndIDInput[] \| undefined`](../../doc/models/group-name-and-id-input.md) | Optional | Array of objects of groups that the group belong to. | -| `users` | [`UserNameAndIDInput[] \| undefined`](../../doc/models/user-name-and-id-input.md) | Optional | Array of names of user names that the group belong to. | -| `type` | [`Type10Enum \| undefined`](../../doc/models/type-10-enum.md) | Optional | Type of user group. LOCAL_GROUP indicates that the user is created locally in the ThoughtSpot system.
**Default**: `Type10Enum.LOCALGROUP` | - -## Example (as JSON) - -```json -{ - "name": "name0", - "displayName": "displayName2", - "visibility": null, - "description": null, - "privileges": null, - "orgId": null, - "groups": null, - "users": null, - "type": null -} -``` - diff --git a/Typescript/doc/models/tspublic-rest-v2-group-removegroup-request.md b/Typescript/doc/models/tspublic-rest-v2-group-removegroup-request.md deleted file mode 100644 index 85335e3ae..000000000 --- a/Typescript/doc/models/tspublic-rest-v2-group-removegroup-request.md +++ /dev/null @@ -1,38 +0,0 @@ - -# Tspublic Rest V2 Group Removegroup Request - -## Structure - -`TspublicRestV2GroupRemovegroupRequest` - -## Fields - -| Name | Type | Tags | Description | -| --- | --- | --- | --- | -| `name` | `string \| undefined` | Optional | Name of the group | -| `id` | `string \| undefined` | Optional | The GUID of the group to query. | -| `groups` | [`GroupNameAndIDInput[]`](../../doc/models/group-name-and-id-input.md) | Required | Array of objects of groups that the user belong to. | - -## Example (as JSON) - -```json -{ - "name": null, - "id": null, - "groups": [ - { - "name": null, - "id": null - }, - { - "name": null, - "id": null - }, - { - "name": null, - "id": null - } - ] -} -``` - diff --git a/Typescript/doc/models/tspublic-rest-v2-group-removeprivilege-request.md b/Typescript/doc/models/tspublic-rest-v2-group-removeprivilege-request.md deleted file mode 100644 index e9659d0a7..000000000 --- a/Typescript/doc/models/tspublic-rest-v2-group-removeprivilege-request.md +++ /dev/null @@ -1,25 +0,0 @@ - -# Tspublic Rest V2 Group Removeprivilege Request - -## Structure - -`TspublicRestV2GroupRemoveprivilegeRequest` - -## Fields - -| Name | Type | Tags | Description | -| --- | --- | --- | --- | -| `name` | `string \| undefined` | Optional | Name of the group | -| `id` | `string \| undefined` | Optional | The GUID of the group to query. | -| `privileges` | [`PrivilegeEnum[] \| undefined`](../../doc/models/privilege-enum.md) | Optional | A JSON array of name of users or GUIDs of users or both. When both are given then id is considered | - -## Example (as JSON) - -```json -{ - "name": null, - "id": null, - "privileges": null -} -``` - diff --git a/Typescript/doc/models/tspublic-rest-v2-group-removeuser-request.md b/Typescript/doc/models/tspublic-rest-v2-group-removeuser-request.md deleted file mode 100644 index 956f56991..000000000 --- a/Typescript/doc/models/tspublic-rest-v2-group-removeuser-request.md +++ /dev/null @@ -1,34 +0,0 @@ - -# Tspublic Rest V2 Group Removeuser Request - -## Structure - -`TspublicRestV2GroupRemoveuserRequest` - -## Fields - -| Name | Type | Tags | Description | -| --- | --- | --- | --- | -| `name` | `string \| undefined` | Optional | Name of the group | -| `id` | `string \| undefined` | Optional | The GUID of the group to query. | -| `users` | [`UserNameAndIDInput[]`](../../doc/models/user-name-and-id-input.md) | Required | Array of user name that you want to delete from user group. | - -## Example (as JSON) - -```json -{ - "name": null, - "id": null, - "users": [ - { - "name": null, - "id": null - }, - { - "name": null, - "id": null - } - ] -} -``` - diff --git a/Typescript/doc/models/tspublic-rest-v2-group-search-request.md b/Typescript/doc/models/tspublic-rest-v2-group-search-request.md deleted file mode 100644 index b13632fe8..000000000 --- a/Typescript/doc/models/tspublic-rest-v2-group-search-request.md +++ /dev/null @@ -1,39 +0,0 @@ - -# Tspublic Rest V2 Group Search Request - -## Structure - -`TspublicRestV2GroupSearchRequest` - -## Fields - -| Name | Type | Tags | Description | -| --- | --- | --- | --- | -| `outputFields` | `string[] \| undefined` | Optional | Array of field names that need to be included in the response | -| `name` | `string \| undefined` | Optional | Name of the user group | -| `id` | `string \| undefined` | Optional | GUID of the group to update | -| `displayName` | `string \| undefined` | Optional | A unique display name string for the user group, for example, Developer group. | -| `visibility` | `string \| undefined` | Optional | Visibility of the user group. The visibility attribute is set to DEFAULT. The DEFAULT attribute makes the user group visible for other user groups and allows them to share objects. | -| `description` | `string \| undefined` | Optional | Description text for the group. | -| `privileges` | [`PrivilegeEnum[] \| undefined`](../../doc/models/privilege-enum.md) | Optional | A JSON array of privileges assigned to the group | -| `groups` | [`GroupNameAndIDInput[] \| undefined`](../../doc/models/group-name-and-id-input.md) | Optional | Array of objects of groups that the user belong to. | -| `users` | [`UserNameAndIDInput[] \| undefined`](../../doc/models/user-name-and-id-input.md) | Optional | Array of user name that associated with group. | -| `type` | `string \| undefined` | Optional | Type of user group. LOCAL_GROUP indicates that the user is created locally in the ThoughtSpot system. | - -## Example (as JSON) - -```json -{ - "outputFields": null, - "name": null, - "id": null, - "displayName": null, - "visibility": null, - "description": null, - "privileges": null, - "groups": null, - "users": null, - "type": null -} -``` - diff --git a/Typescript/doc/models/tspublic-rest-v2-group-update-request.md b/Typescript/doc/models/tspublic-rest-v2-group-update-request.md deleted file mode 100644 index 2df6201dd..000000000 --- a/Typescript/doc/models/tspublic-rest-v2-group-update-request.md +++ /dev/null @@ -1,39 +0,0 @@ - -# Tspublic Rest V2 Group Update Request - -## Structure - -`TspublicRestV2GroupUpdateRequest` - -## Fields - -| Name | Type | Tags | Description | -| --- | --- | --- | --- | -| `name` | `string \| undefined` | Optional | Name of the user group. The group name string must be unique. | -| `id` | `string \| undefined` | Optional | he GUID of the user account to query. | -| `displayName` | `string \| undefined` | Optional | A unique display name string for the user group, for example, Developer group. | -| `visibility` | [`Visibility2Enum \| undefined`](../../doc/models/visibility-2-enum.md) | Optional | Visibility of the user group. The visibility attribute is set to DEFAULT. The DEFAULT attribute makes the user group visible for other user groups and allows them to share objects.
**Default**: `Visibility2Enum.DEFAULT` | -| `description` | `string \| undefined` | Optional | Description text for the group. | -| `privileges` | [`PrivilegeEnum[] \| undefined`](../../doc/models/privilege-enum.md) | Optional | A JSON array of privileges assigned to the group | -| `groups` | [`GroupNameAndIDInput[] \| undefined`](../../doc/models/group-name-and-id-input.md) | Optional | Array of objects of groups that the user belong to. | -| `users` | [`UserNameAndIDInput[] \| undefined`](../../doc/models/user-name-and-id-input.md) | Optional | Array of object, A JSON array of name of users of users. | -| `assignedLiveboards` | `string[] \| undefined` | Optional | Array of string. An array of liveboard ids to be assigned to the group. | -| `type` | [`Type10Enum \| undefined`](../../doc/models/type-10-enum.md) | Optional | Type of user group. LOCAL_GROUP indicates that the user is created locally in the ThoughtSpot system.
**Default**: `Type10Enum.LOCALGROUP` | - -## Example (as JSON) - -```json -{ - "name": null, - "id": null, - "displayName": null, - "visibility": null, - "description": null, - "privileges": null, - "groups": null, - "users": null, - "assignedLiveboards": null, - "type": null -} -``` - diff --git a/Typescript/doc/models/tspublic-rest-v2-materialization-refreshview-request.md b/Typescript/doc/models/tspublic-rest-v2-materialization-refreshview-request.md deleted file mode 100644 index e238fb62b..000000000 --- a/Typescript/doc/models/tspublic-rest-v2-materialization-refreshview-request.md +++ /dev/null @@ -1,21 +0,0 @@ - -# Tspublic Rest V2 Materialization Refreshview Request - -## Structure - -`TspublicRestV2MaterializationRefreshviewRequest` - -## Fields - -| Name | Type | Tags | Description | -| --- | --- | --- | --- | -| `id` | `string` | Required | GUID of metadata object | - -## Example (as JSON) - -```json -{ - "id": "id0" -} -``` - diff --git a/Typescript/doc/models/tspublic-rest-v2-metadata-dependency-request.md b/Typescript/doc/models/tspublic-rest-v2-metadata-dependency-request.md deleted file mode 100644 index f50aa6f5b..000000000 --- a/Typescript/doc/models/tspublic-rest-v2-metadata-dependency-request.md +++ /dev/null @@ -1,27 +0,0 @@ - -# Tspublic Rest V2 Metadata Dependency Request - -## Structure - -`TspublicRestV2MetadataDependencyRequest` - -## Fields - -| Name | Type | Tags | Description | -| --- | --- | --- | --- | -| `type` | [`Type13Enum`](../../doc/models/type-13-enum.md) | Required | Type of the data object | -| `id` | `string[]` | Required | A JSON array of GUIDs of the objects | -| `batchSize` | `number \| undefined` | Optional | The maximum number of batches to fetch in a query. If this attribute is not defined, the value specified in the cluster configuration is used. To get the list of all dependent objects in a single query, define the batch size attribute as -1
**Default**: `-1` | - -## Example (as JSON) - -```json -{ - "type": "COLUMN", - "id": [ - "id0" - ], - "batchSize": null -} -``` - diff --git a/Typescript/doc/models/tspublic-rest-v2-metadata-detail-search-request.md b/Typescript/doc/models/tspublic-rest-v2-metadata-detail-search-request.md deleted file mode 100644 index 3cc22852f..000000000 --- a/Typescript/doc/models/tspublic-rest-v2-metadata-detail-search-request.md +++ /dev/null @@ -1,31 +0,0 @@ - -# Tspublic Rest V2 Metadata Detail Search Request - -## Structure - -`TspublicRestV2MetadataDetailSearchRequest` - -## Fields - -| Name | Type | Tags | Description | -| --- | --- | --- | --- | -| `type` | [`Type6Enum`](../../doc/models/type-6-enum.md) | Required | Type of the metadata object being searched. | -| `id` | `string[]` | Required | A JSON array of GUIDs of the objects. | -| `showHidden` | `boolean \| undefined` | Optional | When set to true, returns details of the hidden objects, such as a column in a worksheet or a table.
**Default**: `false` | -| `dropQuestionDetails` | `boolean \| undefined` | Optional | When set to true, the search assist data associated with a worksheet is not included in the API response. This attribute is applicable only for DATAOBJECT data type.
**Default**: `false` | -| `version` | `string \| undefined` | Optional | Specify the version to retrieve the objects from. By default, the API returns metadata for all versions of the object. | - -## Example (as JSON) - -```json -{ - "type": "DATAOBJECT", - "id": [ - "id0" - ], - "showHidden": null, - "dropQuestionDetails": null, - "version": null -} -``` - diff --git a/Typescript/doc/models/tspublic-rest-v2-metadata-favorite-assign-request.md b/Typescript/doc/models/tspublic-rest-v2-metadata-favorite-assign-request.md deleted file mode 100644 index e1d1602c2..000000000 --- a/Typescript/doc/models/tspublic-rest-v2-metadata-favorite-assign-request.md +++ /dev/null @@ -1,34 +0,0 @@ - -# Tspublic Rest V2 Metadata Favorite Assign Request - -## Structure - -`TspublicRestV2MetadataFavoriteAssignRequest` - -## Fields - -| Name | Type | Tags | Description | -| --- | --- | --- | --- | -| `userName` | `string \| undefined` | Optional | Name of the user | -| `userId` | `string \| undefined` | Optional | The GUID of the user | -| `tsObject` | [`TsObjectInput[]`](../../doc/models/ts-object-input.md) | Required | A JSON Array of GUIDs and type of metadata object. | - -## Example (as JSON) - -```json -{ - "userName": null, - "userId": null, - "tsObject": [ - { - "id": "id2", - "type": "DATAOBJECT" - }, - { - "id": "id3", - "type": "CONNECTION" - } - ] -} -``` - diff --git a/Typescript/doc/models/tspublic-rest-v2-metadata-favorite-unassign-request.md b/Typescript/doc/models/tspublic-rest-v2-metadata-favorite-unassign-request.md deleted file mode 100644 index ccfd12ef9..000000000 --- a/Typescript/doc/models/tspublic-rest-v2-metadata-favorite-unassign-request.md +++ /dev/null @@ -1,34 +0,0 @@ - -# Tspublic Rest V2 Metadata Favorite Unassign Request - -## Structure - -`TspublicRestV2MetadataFavoriteUnassignRequest` - -## Fields - -| Name | Type | Tags | Description | -| --- | --- | --- | --- | -| `userName` | `string \| undefined` | Optional | Name of the user | -| `userId` | `string \| undefined` | Optional | The GUID of the user | -| `tsObject` | [`TsObjectInput[]`](../../doc/models/ts-object-input.md) | Required | A JSON Array of GUIDs and type of metadata object. | - -## Example (as JSON) - -```json -{ - "userName": null, - "userId": null, - "tsObject": [ - { - "id": "id2", - "type": "DATAOBJECT" - }, - { - "id": "id3", - "type": "CONNECTION" - } - ] -} -``` - diff --git a/Typescript/doc/models/tspublic-rest-v2-metadata-header-search-request.md b/Typescript/doc/models/tspublic-rest-v2-metadata-header-search-request.md deleted file mode 100644 index 67a417f57..000000000 --- a/Typescript/doc/models/tspublic-rest-v2-metadata-header-search-request.md +++ /dev/null @@ -1,53 +0,0 @@ - -# Tspublic Rest V2 Metadata Header Search Request - -## Structure - -`TspublicRestV2MetadataHeaderSearchRequest` - -## Fields - -| Name | Type | Tags | Description | -| --- | --- | --- | --- | -| `outputFields` | `string[] \| undefined` | Optional | Array of header field names that need to be included in the header response | -| `offset` | `number \| undefined` | Optional | The batch offset, starting from where the records should be included in the response. If no input is provided then offset starts from 0. Default: 0
**Default**: `0` | -| `batchNumber` | `number \| undefined` | Optional | An alternate way to set offset for the starting point of the response.

The value in offset field will not be considered if batchNumber field has value greater than 0.

Offset value will be calculated as (batchNumber - 1) * batchSize.

It is mandatory to provide a value for batchSize with batchNumber.

Example:

Assume response has 100 records. Now, batchNumber is set as 2 and batchSize as 10, then offset value will be 10. So, 10 records starting from 11th record will be considered. | -| `batchSize` | `number \| undefined` | Optional | The number of records that should be included in the response starting from offset position. If no input is provided then first page is included in the response.
**Default**: `-1` | -| `sortBy` | [`SortByEnum \| undefined`](../../doc/models/sort-by-enum.md) | Optional | Field based on which the response needs to be ordered.
**Default**: `SortByEnum.DEFAULT` | -| `sortOrder` | [`SortOrderEnum \| undefined`](../../doc/models/sort-order-enum.md) | Optional | Order in which sortBy should be applied.
**Default**: `SortOrderEnum.DEFAULT` | -| `type` | [`Type3Enum`](../../doc/models/type-3-enum.md) | Required | Type of the metadata object being searched. | -| `namePattern` | `string \| undefined` | Optional | A pattern to match the name of the metadata object. This parameter supports matching case-insensitive strings. For a wildcard match, use %. | -| `fetchId` | `string[] \| undefined` | Optional | A JSON array containing the GUIDs of the metadata objects that you want to fetch. | -| `skipId` | `string[] \| undefined` | Optional | A JSON array containing the GUIDs of the metadata objects that you want to skip. | -| `showHidden` | `boolean \| undefined` | Optional | When set to true, returns details of the hidden objects, such as a column in a worksheet or a table.
**Default**: `false` | -| `autoCreated` | `boolean \| undefined` | Optional | A flag to indicate whether to list only the auto created objects. When no value is provided as input then all objects are returned. | -| `accessLevel` | [`AccessLevelInput[] \| undefined`](../../doc/models/access-level-input.md) | Optional | A JSON array of objects with user details for which the metadata objects should be considered from the repository
If you specify ID or name of user and set the type parameter to USER, the API returns metadata objects associated with the user
If you specify ID or name of user group and set the type parameter to USER_GROUP, the API returns metadata objects for all the users mapped to the specified user group.
If the id or name parameter is not defined, but the type attribute is set to USER or USER_GROUP, then the API will not return and response.
If no input is provided for any field for this object, then the API returns headers for all users.
If both name and id is provided, then id will be considered. | -| `tag` | [`TagNameAndIdInput[] \| undefined`](../../doc/models/tag-name-and-id-input.md) | Optional | A JSON array of name or GUID of tags or both. When both are given then id is considered. | -| `favoriteFor` | [`NameAndIdInput[] \| undefined`](../../doc/models/name-and-id-input.md) | Optional | A JSON array of name or GUID of the user or both for whom the object is assigned as favorite. When both are given then id is considered. | -| `author` | [`NameAndIdInput[] \| undefined`](../../doc/models/name-and-id-input.md) | Optional | A JSON array of name or GUID of the user or both who created the object. When both are given then id is considered | -| `lastModifiedBy` | [`NameAndIdInput[] \| undefined`](../../doc/models/name-and-id-input.md) | Optional | A JSON array of name or GUID of the user or both who last modified the object. When both are given then id is considered. | - -## Example (as JSON) - -```json -{ - "outputFields": null, - "offset": null, - "batchNumber": null, - "batchSize": null, - "sortBy": null, - "sortOrder": null, - "type": "COLUMN_ALL", - "namePattern": null, - "fetchId": null, - "skipId": null, - "showHidden": null, - "autoCreated": null, - "accessLevel": null, - "tag": null, - "favoriteFor": null, - "author": null, - "lastModifiedBy": null -} -``` - diff --git a/Typescript/doc/models/tspublic-rest-v2-metadata-homeliveboard-assign-request.md b/Typescript/doc/models/tspublic-rest-v2-metadata-homeliveboard-assign-request.md deleted file mode 100644 index 8b6af6152..000000000 --- a/Typescript/doc/models/tspublic-rest-v2-metadata-homeliveboard-assign-request.md +++ /dev/null @@ -1,25 +0,0 @@ - -# Tspublic Rest V2 Metadata Homeliveboard Assign Request - -## Structure - -`TspublicRestV2MetadataHomeliveboardAssignRequest` - -## Fields - -| Name | Type | Tags | Description | -| --- | --- | --- | --- | -| `userName` | `string \| undefined` | Optional | Name of the user | -| `userId` | `string \| undefined` | Optional | The GUID of the user | -| `liveboardId` | `string \| undefined` | Optional | The GUID of the liveboard | - -## Example (as JSON) - -```json -{ - "userName": null, - "userId": null, - "liveboardId": null -} -``` - diff --git a/Typescript/doc/models/tspublic-rest-v2-metadata-homeliveboard-unassign-request.md b/Typescript/doc/models/tspublic-rest-v2-metadata-homeliveboard-unassign-request.md deleted file mode 100644 index 1d3a8019e..000000000 --- a/Typescript/doc/models/tspublic-rest-v2-metadata-homeliveboard-unassign-request.md +++ /dev/null @@ -1,23 +0,0 @@ - -# Tspublic Rest V2 Metadata Homeliveboard Unassign Request - -## Structure - -`TspublicRestV2MetadataHomeliveboardUnassignRequest` - -## Fields - -| Name | Type | Tags | Description | -| --- | --- | --- | --- | -| `userName` | `string \| undefined` | Optional | Name of the user | -| `userId` | `string \| undefined` | Optional | The GUID of the user | - -## Example (as JSON) - -```json -{ - "userName": null, - "userId": null -} -``` - diff --git a/Typescript/doc/models/tspublic-rest-v2-metadata-tag-assign-request.md b/Typescript/doc/models/tspublic-rest-v2-metadata-tag-assign-request.md deleted file mode 100644 index f70d50040..000000000 --- a/Typescript/doc/models/tspublic-rest-v2-metadata-tag-assign-request.md +++ /dev/null @@ -1,34 +0,0 @@ - -# Tspublic Rest V2 Metadata Tag Assign Request - -## Structure - -`TspublicRestV2MetadataTagAssignRequest` - -## Fields - -| Name | Type | Tags | Description | -| --- | --- | --- | --- | -| `name` | `string \| undefined` | Optional | Name of the tag | -| `id` | `string \| undefined` | Optional | The GUID of the tag | -| `tsObject` | [`TsObjectInput[]`](../../doc/models/ts-object-input.md) | Required | A JSON Array of GUIDs and type of metadata object. | - -## Example (as JSON) - -```json -{ - "name": null, - "id": null, - "tsObject": [ - { - "id": "id2", - "type": "DATAOBJECT" - }, - { - "id": "id3", - "type": "CONNECTION" - } - ] -} -``` - diff --git a/Typescript/doc/models/tspublic-rest-v2-metadata-tag-create-request.md b/Typescript/doc/models/tspublic-rest-v2-metadata-tag-create-request.md deleted file mode 100644 index 515e9b132..000000000 --- a/Typescript/doc/models/tspublic-rest-v2-metadata-tag-create-request.md +++ /dev/null @@ -1,23 +0,0 @@ - -# Tspublic Rest V2 Metadata Tag Create Request - -## Structure - -`TspublicRestV2MetadataTagCreateRequest` - -## Fields - -| Name | Type | Tags | Description | -| --- | --- | --- | --- | -| `name` | `string` | Required | Name of the tag | -| `color` | `string \| undefined` | Optional | Hex color code to be assigned to the tag | - -## Example (as JSON) - -```json -{ - "name": "name0", - "color": null -} -``` - diff --git a/Typescript/doc/models/tspublic-rest-v2-metadata-tag-unassign-request.md b/Typescript/doc/models/tspublic-rest-v2-metadata-tag-unassign-request.md deleted file mode 100644 index da314f2c2..000000000 --- a/Typescript/doc/models/tspublic-rest-v2-metadata-tag-unassign-request.md +++ /dev/null @@ -1,34 +0,0 @@ - -# Tspublic Rest V2 Metadata Tag Unassign Request - -## Structure - -`TspublicRestV2MetadataTagUnassignRequest` - -## Fields - -| Name | Type | Tags | Description | -| --- | --- | --- | --- | -| `name` | `string \| undefined` | Optional | Name of the tag | -| `id` | `string \| undefined` | Optional | The GUID of the tag | -| `tsObject` | [`TsObjectInput[]`](../../doc/models/ts-object-input.md) | Required | A JSON Array of GUIDs and type of metadata object. | - -## Example (as JSON) - -```json -{ - "name": null, - "id": null, - "tsObject": [ - { - "id": "id2", - "type": "DATAOBJECT" - }, - { - "id": "id3", - "type": "CONNECTION" - } - ] -} -``` - diff --git a/Typescript/doc/models/tspublic-rest-v2-metadata-tag-update-request.md b/Typescript/doc/models/tspublic-rest-v2-metadata-tag-update-request.md deleted file mode 100644 index e3ed4f30d..000000000 --- a/Typescript/doc/models/tspublic-rest-v2-metadata-tag-update-request.md +++ /dev/null @@ -1,25 +0,0 @@ - -# Tspublic Rest V2 Metadata Tag Update Request - -## Structure - -`TspublicRestV2MetadataTagUpdateRequest` - -## Fields - -| Name | Type | Tags | Description | -| --- | --- | --- | --- | -| `name` | `string \| undefined` | Optional | Name of the tag | -| `id` | `string \| undefined` | Optional | The GUID of the tag | -| `color` | `string \| undefined` | Optional | Hex color code to be assigned to the tag | - -## Example (as JSON) - -```json -{ - "name": null, - "id": null, - "color": null -} -``` - diff --git a/Typescript/doc/models/tspublic-rest-v2-metadata-tml-export-request.md b/Typescript/doc/models/tspublic-rest-v2-metadata-tml-export-request.md deleted file mode 100644 index cc8f6f23a..000000000 --- a/Typescript/doc/models/tspublic-rest-v2-metadata-tml-export-request.md +++ /dev/null @@ -1,27 +0,0 @@ - -# Tspublic Rest V2 Metadata Tml Export Request - -## Structure - -`TspublicRestV2MetadataTmlExportRequest` - -## Fields - -| Name | Type | Tags | Description | -| --- | --- | --- | --- | -| `id` | `string[]` | Required | A JSON array of GUIDs of the objects. | -| `formatType` | [`FormatType3Enum \| undefined`](../../doc/models/format-type-3-enum.md) | Optional | The format in which to export the objects
**Default**: `FormatType3Enum.YAML` | -| `exportAssociated` | `boolean \| undefined` | Optional | Specifies if you would like to export the associated objects. To export the objects associated with the objects specified in id, set the value to true. When set to true, the API exports any underlying worksheets, tables, or views for a given object. By default, the API does not export these underlying objects
**Default**: `false` | - -## Example (as JSON) - -```json -{ - "id": [ - "id0" - ], - "formatType": null, - "exportAssociated": null -} -``` - diff --git a/Typescript/doc/models/tspublic-rest-v2-metadata-tml-import-request.md b/Typescript/doc/models/tspublic-rest-v2-metadata-tml-import-request.md deleted file mode 100644 index 0134bb52c..000000000 --- a/Typescript/doc/models/tspublic-rest-v2-metadata-tml-import-request.md +++ /dev/null @@ -1,27 +0,0 @@ - -# Tspublic Rest V2 Metadata Tml Import Request - -## Structure - -`TspublicRestV2MetadataTmlImportRequest` - -## Fields - -| Name | Type | Tags | Description | -| --- | --- | --- | --- | -| `objectTML` | `string[]` | Required | A string array of TML objects to upload, in YAML or JSON format.

If TML is in YAML format, then use escape characters for quotes and new line characters.

Example TML:

guid: 6d2c1c9b-a407-409c-8c0c-819aeb51350f\ntable:\n name: TESTINT\n db: SUPPLYCHAIN_MAIN\n schema: PUBLIC\n db_table: TESTINT\n connection:\n name: SnowflakeConnection\n columns:\n - name: C1\n db_column_name: C1\n properties:\n column_type: MEASURE\n aggregation: SUM\n index_type: DONT_INDEX\n db_column_properties:\n data_type: INT64\n

If TML is in JSON format, then use escape characters for quotes.

Example TML:

{\\"guid\\": \\"6d2c1c9b-a407-409c-8c0c-819aeb51350f\\", \\"table\\": { \\"name\\": \\"TESTINT\\", \\"db\\": \\"SUPPLYCHAIN_MAIN\\", \\"schema\\": \\"PUBLIC\\", \\"db_table\\": \\"TESTINT\\", \\"connection\\": { \\"name\\": \\"SnowflakeConnection\\" }, \\"columns\\": [ { \\"name\\": \\"C1\\", \\"db_column_name\\": \\"C1\\", \\"properties\\": { \\"column_type\\": \\"MEASURE\\", \\"aggregation\\": \\"SUM\\", \\"index_type\\": \\"DONT_INDEX\\" }, \\"db_column_properties\\": { \\"data_type\\": \\"INT64\\" } } ] } }', | -| `importPolicy` | [`ImportPolicyEnum \| undefined`](../../doc/models/import-policy-enum.md) | Optional | Policy to follow during import
**Default**: `ImportPolicyEnum.PARTIAL` | -| `forceCreate` | `boolean \| undefined` | Optional | Specifies if you are updating or creating objects. To create new objects, specify true. By default, ThoughtSpot updates existing objects that have the same GUID as the objects you are importing. When set to true, the GUID property in the imported TML is replaced on the server, and the response headers will include the id_guid property with the GUID of the new object. The new object will be assigned a new GUID, even if the imported TML file included a guid value. Thus, there is no need to include the guid in the TML file if you are using forceCreate=true.
**Default**: `false` | - -## Example (as JSON) - -```json -{ - "objectTML": [ - "objectTML7" - ], - "importPolicy": null, - "forceCreate": null -} -``` - diff --git a/Typescript/doc/models/tspublic-rest-v2-org-create-request.md b/Typescript/doc/models/tspublic-rest-v2-org-create-request.md deleted file mode 100644 index be31179d7..000000000 --- a/Typescript/doc/models/tspublic-rest-v2-org-create-request.md +++ /dev/null @@ -1,23 +0,0 @@ - -# Tspublic Rest V2 Org Create Request - -## Structure - -`TspublicRestV2OrgCreateRequest` - -## Fields - -| Name | Type | Tags | Description | -| --- | --- | --- | --- | -| `name` | `string` | Required | Name of the organization. | -| `description` | `string \| undefined` | Optional | Description text for the organization. | - -## Example (as JSON) - -```json -{ - "name": "name0", - "description": null -} -``` - diff --git a/Typescript/doc/models/tspublic-rest-v2-org-search-request.md b/Typescript/doc/models/tspublic-rest-v2-org-search-request.md deleted file mode 100644 index 1a90eafc4..000000000 --- a/Typescript/doc/models/tspublic-rest-v2-org-search-request.md +++ /dev/null @@ -1,25 +0,0 @@ - -# Tspublic Rest V2 Org Search Request - -## Structure - -`TspublicRestV2OrgSearchRequest` - -## Fields - -| Name | Type | Tags | Description | -| --- | --- | --- | --- | -| `name` | `string \| undefined` | Optional | Name of the organization. | -| `id` | `number \| undefined` | Optional | The ID of the organization. | -| `showDeleted` | `boolean \| undefined` | Optional | When set to true, the response will include the details of deleted organization also.
**Default**: `false` | - -## Example (as JSON) - -```json -{ - "name": null, - "id": null, - "showDeleted": null -} -``` - diff --git a/Typescript/doc/models/tspublic-rest-v2-org-update-request.md b/Typescript/doc/models/tspublic-rest-v2-org-update-request.md deleted file mode 100644 index bce78c5cd..000000000 --- a/Typescript/doc/models/tspublic-rest-v2-org-update-request.md +++ /dev/null @@ -1,27 +0,0 @@ - -# Tspublic Rest V2 Org Update Request - -## Structure - -`TspublicRestV2OrgUpdateRequest` - -## Fields - -| Name | Type | Tags | Description | -| --- | --- | --- | --- | -| `name` | `string \| undefined` | Optional | Name of the organization. | -| `id` | `number \| undefined` | Optional | The ID of the organization. | -| `description` | `string \| undefined` | Optional | Description text for the organization. | -| `active` | `boolean \| undefined` | Optional | Status of the organization. | - -## Example (as JSON) - -```json -{ - "name": null, - "id": null, - "description": null, - "active": null -} -``` - diff --git a/Typescript/doc/models/tspublic-rest-v2-security-permission-principal-search-request.md b/Typescript/doc/models/tspublic-rest-v2-security-permission-principal-search-request.md deleted file mode 100644 index 2f1aeaa07..000000000 --- a/Typescript/doc/models/tspublic-rest-v2-security-permission-principal-search-request.md +++ /dev/null @@ -1,32 +0,0 @@ - -# Tspublic Rest V2 Security Permission Principal Search Request - -## Structure - -`TspublicRestV2SecurityPermissionPrincipalSearchRequest` - -## Fields - -| Name | Type | Tags | Description | -| --- | --- | --- | --- | -| `principal` | [`UserNameAndIDInput[]`](../../doc/models/user-name-and-id-input.md) | Required | A JSON array of principal names or GUIDs to be included in the request. When both are given then id is considered. | -| `tsObject` | [`TsObjectSearchInput[] \| undefined`](../../doc/models/ts-object-search-input.md) | Optional | A JSON Array of GUIDs and type of metadata object. | - -## Example (as JSON) - -```json -{ - "principal": [ - { - "name": null, - "id": null - }, - { - "name": null, - "id": null - } - ], - "tsObject": null -} -``` - diff --git a/Typescript/doc/models/tspublic-rest-v2-security-permission-tsobject-search-request.md b/Typescript/doc/models/tspublic-rest-v2-security-permission-tsobject-search-request.md deleted file mode 100644 index 9bd29f36c..000000000 --- a/Typescript/doc/models/tspublic-rest-v2-security-permission-tsobject-search-request.md +++ /dev/null @@ -1,39 +0,0 @@ - -# Tspublic Rest V2 Security Permission Tsobject Search Request - -## Structure - -`TspublicRestV2SecurityPermissionTsobjectSearchRequest` - -## Fields - -| Name | Type | Tags | Description | -| --- | --- | --- | --- | -| `tsObject` | [`TsObjectSearchInput[]`](../../doc/models/ts-object-search-input.md) | Required | A JSON Array of GUIDs and type of metadata object. | -| `principal` | [`UserNameAndIDInput[] \| undefined`](../../doc/models/user-name-and-id-input.md) | Optional | A JSON array of principal names or GUIDs. When both are given then id is considered. | -| `includeDependent` | `boolean \| undefined` | Optional | When this field is set to true, the API response includes the permission details for the dependent objects.
**Default**: `false` | - -## Example (as JSON) - -```json -{ - "tsObject": [ - { - "type": "DATAOBJECT", - "id": [ - "id2" - ] - }, - { - "type": "COLUMN", - "id": [ - "id3", - "id4" - ] - } - ], - "principal": null, - "includeDependent": null -} -``` - diff --git a/Typescript/doc/models/tspublic-rest-v2-security-share-tsobject-request.md b/Typescript/doc/models/tspublic-rest-v2-security-share-tsobject-request.md deleted file mode 100644 index f3869107f..000000000 --- a/Typescript/doc/models/tspublic-rest-v2-security-share-tsobject-request.md +++ /dev/null @@ -1,35 +0,0 @@ - -# Tspublic Rest V2 Security Share Tsobject Request - -## Structure - -`TspublicRestV2SecurityShareTsobjectRequest` - -## Fields - -| Name | Type | Tags | Description | -| --- | --- | --- | --- | -| `type` | [`Type18Enum`](../../doc/models/type-18-enum.md) | Required | Type of metadata object. Valid values: Liveboard\|Answer\|DataObject\|Column | -| `id` | `string[]` | Required | A JSON array of the GUIDs of the objects to be shared | -| `permission` | `string` | Required | A JSON object with GUIDs of user and user group, and the type of access privilge.

You can provide READ_ONLY or MODIFY access to the objects. With READ_ONLY access, the user or user group can view the shared object, whereas MODIFY access enables users to modify the object.

To remove access to a shared object, you can set the shareMode in the permission string to NO_ACCESS. Example:

{"permissions": {"e7040a64-7ff1-4ab9-a1b0-f1acac596866": {"shareMode": "READ_ONLY"}, "f7b8f511-317c-485d-8131-26cf084ef47b": {"shareMode": "MODIFY"}, "7a9a6715-e154-431b-baaf-7b58246c13dd":{"shareMode":"NO_ACCESS"}}} | -| `emailId` | `string[] \| undefined` | Optional | The email addresses that should ne notified when the objects are shared. | -| `notify` | `boolean \| undefined` | Optional | When set to true, a notification is sent to the users after an object is shared.
**Default**: `true` | -| `message` | `string \| undefined` | Optional | The message text to send in the notification email. | -| `includeCustomEmbedUrl` | `boolean \| undefined` | Optional | When set to true, ThoughtSpot sends a link with the host application context to allow users to access the shared object from their ThoughtSpot embedded instance.
**Default**: `false` | - -## Example (as JSON) - -```json -{ - "type": "DATAOBJECT", - "id": [ - "id0" - ], - "permission": "permission2", - "emailId": null, - "notify": null, - "message": null, - "includeCustomEmbedUrl": null -} -``` - diff --git a/Typescript/doc/models/tspublic-rest-v2-security-share-visualization-request.md b/Typescript/doc/models/tspublic-rest-v2-security-share-visualization-request.md deleted file mode 100644 index f65073104..000000000 --- a/Typescript/doc/models/tspublic-rest-v2-security-share-visualization-request.md +++ /dev/null @@ -1,37 +0,0 @@ - -# Tspublic Rest V2 Security Share Visualization Request - -## Structure - -`TspublicRestV2SecurityShareVisualizationRequest` - -## Fields - -| Name | Type | Tags | Description | -| --- | --- | --- | --- | -| `id` | `string` | Required | A JSON array of the GUIDs of the objects to be shared | -| `vizId` | `string` | Required | The GUID of visualization | -| `principalId` | `string[]` | Required | The GUID of the users and user groups with which you want to share the visualization | -| `emailId` | `string[] \| undefined` | Optional | The email addresses that should ne notified when the objects are shared | -| `notify` | `boolean \| undefined` | Optional | When set to true, a notification is sent to the users after an object is shared.
**Default**: `true` | -| `message` | `string \| undefined` | Optional | The message text to send in the notification email. | -| `includeCustomEmbedUrl` | `boolean \| undefined` | Optional | When set to true, ThoughtSpot sends a link with the host application context to allow users to access the shared object from their ThoughtSpot embedded instance.
**Default**: `false` | - -## Example (as JSON) - -```json -{ - "id": "id0", - "vizId": "vizId2", - "principalId": [ - "principalId8", - "principalId9", - "principalId0" - ], - "emailId": null, - "notify": null, - "message": null, - "includeCustomEmbedUrl": null -} -``` - diff --git a/Typescript/doc/models/tspublic-rest-v2-user-addgroup-request.md b/Typescript/doc/models/tspublic-rest-v2-user-addgroup-request.md deleted file mode 100644 index 3724dd143..000000000 --- a/Typescript/doc/models/tspublic-rest-v2-user-addgroup-request.md +++ /dev/null @@ -1,38 +0,0 @@ - -# Tspublic Rest V2 User Addgroup Request - -## Structure - -`TspublicRestV2UserAddgroupRequest` - -## Fields - -| Name | Type | Tags | Description | -| --- | --- | --- | --- | -| `name` | `string \| undefined` | Optional | User name of the user account | -| `id` | `string \| undefined` | Optional | The GUID of the user account | -| `groups` | [`GroupNameAndIDInput[]`](../../doc/models/group-name-and-id-input.md) | Required | Array of objects of groups that the user belong to. | - -## Example (as JSON) - -```json -{ - "name": null, - "id": null, - "groups": [ - { - "name": null, - "id": null - }, - { - "name": null, - "id": null - }, - { - "name": null, - "id": null - } - ] -} -``` - diff --git a/Typescript/doc/models/tspublic-rest-v2-user-addorg-request.md b/Typescript/doc/models/tspublic-rest-v2-user-addorg-request.md deleted file mode 100644 index b60b0e3eb..000000000 --- a/Typescript/doc/models/tspublic-rest-v2-user-addorg-request.md +++ /dev/null @@ -1,32 +0,0 @@ - -# Tspublic Rest V2 User Addorg Request - -## Structure - -`TspublicRestV2UserAddorgRequest` - -## Fields - -| Name | Type | Tags | Description | -| --- | --- | --- | --- | -| `orgId` | `number \| undefined` | Optional | The ID of the organization. | -| `users` | [`UserNameAndIDInput[]`](../../doc/models/user-name-and-id-input.md) | Required | Array of objects. A JSON array of name of users or GUIDs of users or both. When both are given then id is considered | - -## Example (as JSON) - -```json -{ - "orgId": null, - "users": [ - { - "name": null, - "id": null - }, - { - "name": null, - "id": null - } - ] -} -``` - diff --git a/Typescript/doc/models/tspublic-rest-v2-user-changepassword-request.md b/Typescript/doc/models/tspublic-rest-v2-user-changepassword-request.md deleted file mode 100644 index 797c7d2d9..000000000 --- a/Typescript/doc/models/tspublic-rest-v2-user-changepassword-request.md +++ /dev/null @@ -1,27 +0,0 @@ - -# Tspublic Rest V2 User Changepassword Request - -## Structure - -`TspublicRestV2UserChangepasswordRequest` - -## Fields - -| Name | Type | Tags | Description | -| --- | --- | --- | --- | -| `name` | `string \| undefined` | Optional | User name of the user account. | -| `id` | `string \| undefined` | Optional | The GUID of the user account to query. | -| `currentPassword` | `string` | Required | The current password of the user. | -| `newPassword` | `string` | Required | A new password for the user. | - -## Example (as JSON) - -```json -{ - "name": null, - "id": null, - "currentPassword": "currentPassword6", - "newPassword": "newPassword6" -} -``` - diff --git a/Typescript/doc/models/tspublic-rest-v2-user-removegroup-request.md b/Typescript/doc/models/tspublic-rest-v2-user-removegroup-request.md deleted file mode 100644 index 26fae2e7d..000000000 --- a/Typescript/doc/models/tspublic-rest-v2-user-removegroup-request.md +++ /dev/null @@ -1,38 +0,0 @@ - -# Tspublic Rest V2 User Removegroup Request - -## Structure - -`TspublicRestV2UserRemovegroupRequest` - -## Fields - -| Name | Type | Tags | Description | -| --- | --- | --- | --- | -| `name` | `string \| undefined` | Optional | User name of the user account | -| `id` | `string \| undefined` | Optional | The GUID of the user account | -| `groups` | [`GroupNameAndIDInput[]`](../../doc/models/group-name-and-id-input.md) | Required | Array of objects of groups that the user belong to. | - -## Example (as JSON) - -```json -{ - "name": null, - "id": null, - "groups": [ - { - "name": null, - "id": null - }, - { - "name": null, - "id": null - }, - { - "name": null, - "id": null - } - ] -} -``` - diff --git a/Typescript/doc/models/tspublic-rest-v2-user-search-request.md b/Typescript/doc/models/tspublic-rest-v2-user-search-request.md deleted file mode 100644 index f074c4114..000000000 --- a/Typescript/doc/models/tspublic-rest-v2-user-search-request.md +++ /dev/null @@ -1,45 +0,0 @@ - -# Tspublic Rest V2 User Search Request - -## Structure - -`TspublicRestV2UserSearchRequest` - -## Fields - -| Name | Type | Tags | Description | -| --- | --- | --- | --- | -| `outputFields` | `string[] \| undefined` | Optional | Array of field names that need to be included in the response | -| `name` | `string \| undefined` | Optional | User name of the user account | -| `id` | `string \| undefined` | Optional | The GUID of the user account | -| `displayName` | `string \| undefined` | Optional | A unique display name string for the user, usually their first and last name. | -| `visibility` | `string \| undefined` | Optional | Visibility of the user account. The visibility attribute is set to DEFAULT when creating a user. The DEFAULT attribute makes a user visible to other users and user groups, and thus allows them to share objects. | -| `mail` | `string \| undefined` | Optional | email of the user. | -| `groups` | [`GroupNameAndIDInput[] \| undefined`](../../doc/models/group-name-and-id-input.md) | Optional | Array of objects of groups that the user belong to. | -| `privileges` | [`PrivilegeEnum[] \| undefined`](../../doc/models/privilege-enum.md) | Optional | Privileges assigned to user account | -| `state` | `string \| undefined` | Optional | Status of user account. acitve or inactive. | -| `notifyOnShare` | `boolean \| undefined` | Optional | User preference for receiving email notifications when another ThoughtSpot user shares answers or pinboards. | -| `showWalkMe` | `boolean \| undefined` | Optional | The user preference for revisiting the onboarding experience. | -| `analystOnboardingComplete` | `boolean \| undefined` | Optional | ThoughtSpot provides an interactive guided walkthrough to onboard new users. The onboarding experience leads users through a set of actions to help users get started and accomplish their tasks quickly. The users can turn off the Onboarding experience and access it again when they need assistance with the ThoughtSpot UI. | -| `type` | `string \| undefined` | Optional | Type of user. LOCAL_USER indicates that the user is created locally in the ThoughtSpot system. | - -## Example (as JSON) - -```json -{ - "outputFields": null, - "name": null, - "id": null, - "displayName": null, - "visibility": null, - "mail": null, - "groups": null, - "privileges": null, - "state": null, - "notifyOnShare": null, - "showWalkMe": null, - "analystOnboardingComplete": null, - "type": null -} -``` - diff --git a/Typescript/doc/models/tspublic-rest-v2-user-update-request.md b/Typescript/doc/models/tspublic-rest-v2-user-update-request.md deleted file mode 100644 index bd44664fe..000000000 --- a/Typescript/doc/models/tspublic-rest-v2-user-update-request.md +++ /dev/null @@ -1,41 +0,0 @@ - -# Tspublic Rest V2 User Update Request - -## Structure - -`TspublicRestV2UserUpdateRequest` - -## Fields - -| Name | Type | Tags | Description | -| --- | --- | --- | --- | -| `name` | `string \| undefined` | Optional | Name of the user. The username string must be unique. | -| `id` | `string \| undefined` | Optional | The GUID of the user account to query | -| `displayName` | `string \| undefined` | Optional | A unique display name string for the user, usually their first and last name. | -| `visibility` | [`Visibility1Enum \| undefined`](../../doc/models/visibility-1-enum.md) | Optional | Visibility of the user account. The visibility attribute is set to DEFAULT when creating a user. The DEFAULT attribute makes a user visible to other users and user groups, and thus allows them to share objects.
**Default**: `Visibility1Enum.DEFAULT` | -| `mail` | `string \| undefined` | Optional | email of the user. | -| `state` | [`State1Enum \| undefined`](../../doc/models/state-1-enum.md) | Optional | Status of user account. acitve or inactive.
**Default**: `State1Enum.ACTIVE` | -| `notifyOnShare` | `boolean \| undefined` | Optional | User preference for receiving email notifications when another ThoughtSpot user shares answers or pinboards.
**Default**: `true` | -| `showWalkMe` | `boolean \| undefined` | Optional | The user preference for revisiting the onboarding experience.
**Default**: `true` | -| `analystOnboardingComplete` | `boolean \| undefined` | Optional | ThoughtSpot provides an interactive guided walkthrough to onboard new users. The onboarding experience leads users through a set of actions to help users get started and accomplish their tasks quickly. The users can turn off the Onboarding experience and access it again when they need assistance with the ThoughtSpot UI.
**Default**: `false` | -| `type` | [`Type9Enum \| undefined`](../../doc/models/type-9-enum.md) | Optional | Type of user. LOCAL_USER indicates that the user is created locally in the ThoughtSpot system.
**Default**: `Type9Enum.LOCALUSER` | -| `groups` | [`GroupNameAndIDInput[] \| undefined`](../../doc/models/group-name-and-id-input.md) | Optional | Array of objects of groups that the user belong to. | - -## Example (as JSON) - -```json -{ - "name": null, - "id": null, - "displayName": null, - "visibility": null, - "mail": null, - "state": null, - "notifyOnShare": null, - "showWalkMe": null, - "analystOnboardingComplete": null, - "type": null, - "groups": null -} -``` - diff --git a/Typescript/doc/models/type-1-enum.md b/Typescript/doc/models/type-1-enum.md deleted file mode 100644 index b279c27cd..000000000 --- a/Typescript/doc/models/type-1-enum.md +++ /dev/null @@ -1,16 +0,0 @@ - -# Type 1 Enum - -Type of access detail provided - -## Enumeration - -`Type1Enum` - -## Fields - -| Name | -| --- | -| `uSER` | -| `uSERGROUP` | - diff --git a/Typescript/doc/models/type-10-enum.md b/Typescript/doc/models/type-10-enum.md deleted file mode 100644 index 0054f3808..000000000 --- a/Typescript/doc/models/type-10-enum.md +++ /dev/null @@ -1,16 +0,0 @@ - -# Type 10 Enum - -Type of user group. LOCAL_GROUP indicates that the user is created locally in the ThoughtSpot system. - -## Enumeration - -`Type10Enum` - -## Fields - -| Name | -| --- | -| `lOCALGROUP` | -| `tENANTGROUP` | - diff --git a/Typescript/doc/models/type-13-enum.md b/Typescript/doc/models/type-13-enum.md deleted file mode 100644 index e163138f3..000000000 --- a/Typescript/doc/models/type-13-enum.md +++ /dev/null @@ -1,18 +0,0 @@ - -# Type 13 Enum - -Type of the data object - -## Enumeration - -`Type13Enum` - -## Fields - -| Name | -| --- | -| `lIVEBOARD` | -| `dATAOBJECT` | -| `cOLUMN` | -| `jOIN` | - diff --git a/Typescript/doc/models/type-14-enum.md b/Typescript/doc/models/type-14-enum.md deleted file mode 100644 index acb028692..000000000 --- a/Typescript/doc/models/type-14-enum.md +++ /dev/null @@ -1,25 +0,0 @@ - -# Type 14 Enum - -Type of the data connection. - -## Enumeration - -`Type14Enum` - -## Fields - -| Name | -| --- | -| `sNOWFLAKE` | -| `aMAZONREDSHIFT` | -| `gOOGLEBIGQUERY` | -| `aZURESYNAPSE` | -| `tERADATA` | -| `sTARBURST` | -| `sAPHANA` | -| `oRACLEADW` | -| `dATABRICKS` | -| `dENODO` | -| `dREMIO` | - diff --git a/Typescript/doc/models/type-15-enum.md b/Typescript/doc/models/type-15-enum.md deleted file mode 100644 index 121be93bf..000000000 --- a/Typescript/doc/models/type-15-enum.md +++ /dev/null @@ -1,25 +0,0 @@ - -# Type 15 Enum - -Type of the connect being searched. Valid values: SNOWFLAKE|AMAZON_REDSHIFT|GOOGLE_BIGQUERY|AZURE_SYNAPSE|TERADATA|STARBURST|SAP_HANA|ORACLE_ADW|DATABRICKS|DENODO - -## Enumeration - -`Type15Enum` - -## Fields - -| Name | -| --- | -| `sNOWFLAKE` | -| `aMAZONREDSHIFT` | -| `gOOGLEBIGQUERY` | -| `aZURESYNAPSE` | -| `tERADATA` | -| `sTARBURST` | -| `sAPHANA` | -| `oRACLEADW` | -| `dATABRICKS` | -| `dENODO` | -| `dREMIO` | - diff --git a/Typescript/doc/models/type-16-enum.md b/Typescript/doc/models/type-16-enum.md deleted file mode 100644 index e03b749bc..000000000 --- a/Typescript/doc/models/type-16-enum.md +++ /dev/null @@ -1,16 +0,0 @@ - -# Type 16 Enum - -## Enumeration - -`Type16Enum` - -## Fields - -| Name | -| --- | -| `cSV` | -| `xLSX` | -| `pDF` | -| `pNG` | - diff --git a/Typescript/doc/models/type-18-enum.md b/Typescript/doc/models/type-18-enum.md deleted file mode 100644 index b9de01550..000000000 --- a/Typescript/doc/models/type-18-enum.md +++ /dev/null @@ -1,18 +0,0 @@ - -# Type 18 Enum - -Type of metadata object. Valid values: Liveboard|Answer|DataObject|Column - -## Enumeration - -`Type18Enum` - -## Fields - -| Name | -| --- | -| `lIVEBOARD` | -| `aNSWER` | -| `dATAOBJECT` | -| `cOLUMN` | - diff --git a/Typescript/doc/models/type-2-enum.md b/Typescript/doc/models/type-2-enum.md deleted file mode 100644 index 67cd89b0b..000000000 --- a/Typescript/doc/models/type-2-enum.md +++ /dev/null @@ -1,18 +0,0 @@ - -# Type 2 Enum - -Type of the metadata objec - -## Enumeration - -`Type2Enum` - -## Fields - -| Name | -| --- | -| `lIVEBOARD` | -| `aNSWER` | -| `dATAOBJECT` | -| `cOLUMN` | - diff --git a/Typescript/doc/models/type-3-enum.md b/Typescript/doc/models/type-3-enum.md deleted file mode 100644 index 08919eb07..000000000 --- a/Typescript/doc/models/type-3-enum.md +++ /dev/null @@ -1,33 +0,0 @@ - -# Type 3 Enum - -Type of the metadata object being searched. - -## Enumeration - -`Type3Enum` - -## Fields - -| Name | -| --- | -| `aNSWER` | -| `lIVEBOARD` | -| `dATAOBJECTALL` | -| `dATAOBJECTWORKSHEET` | -| `dATAOBJECTTABLE` | -| `dATAOBJECTUSERDEFINED` | -| `dATAOBJECTVIEW` | -| `dATAOBJECTCALENDARTABLE` | -| `cOLUMNALL` | -| `cOLUMNWORKSHEET` | -| `cOLUMNTABLE` | -| `cOLUMNUSERDEFINED` | -| `cOLUMNVIEW` | -| `cOLUMNCALENDARTABLE` | -| `jOIN` | -| `cONNECTION` | -| `tAG` | -| `uSER` | -| `uSERGROUP` | - diff --git a/Typescript/doc/models/type-4-enum.md b/Typescript/doc/models/type-4-enum.md deleted file mode 100644 index 1a2d9ae5e..000000000 --- a/Typescript/doc/models/type-4-enum.md +++ /dev/null @@ -1,21 +0,0 @@ - -# Type 4 Enum - -## Enumeration - -`Type4Enum` - -## Fields - -| Name | -| --- | -| `aNSWER` | -| `lIVEBOARD` | -| `dATAOBJECT` | -| `cOLUMN` | -| `jOIN` | -| `cONNECTION` | -| `tAG` | -| `uSER` | -| `uSERGROUP` | - diff --git a/Typescript/doc/models/type-5-enum.md b/Typescript/doc/models/type-5-enum.md deleted file mode 100644 index d8abde6ba..000000000 --- a/Typescript/doc/models/type-5-enum.md +++ /dev/null @@ -1,31 +0,0 @@ - -# Type 5 Enum - -## Enumeration - -`Type5Enum` - -## Fields - -| Name | -| --- | -| `aNSWER` | -| `lIVEBOARD` | -| `dATAOBJECTALL` | -| `dATAOBJECTWORKSHEET` | -| `dATAOBJECTTABLE` | -| `dATAOBJECTUSERDEFINED` | -| `dATAOBJECTVIEW` | -| `dATAOBJECTCALENDARTABLE` | -| `cOLUMNALL` | -| `cOLUMNWORKSHEET` | -| `cOLUMNTABLE` | -| `cOLUMNUSERDEFINED` | -| `cOLUMNVIEW` | -| `cOLUMNCALENDARTABLE` | -| `jOIN` | -| `cONNECTION` | -| `tAG` | -| `uSER` | -| `uSERGROUP` | - diff --git a/Typescript/doc/models/type-6-enum.md b/Typescript/doc/models/type-6-enum.md deleted file mode 100644 index 234b8a898..000000000 --- a/Typescript/doc/models/type-6-enum.md +++ /dev/null @@ -1,23 +0,0 @@ - -# Type 6 Enum - -Type of the metadata object being searched. - -## Enumeration - -`Type6Enum` - -## Fields - -| Name | -| --- | -| `aNSWER` | -| `lIVEBOARD` | -| `dATAOBJECT` | -| `cOLUMN` | -| `jOIN` | -| `cONNECTION` | -| `tAG` | -| `uSER` | -| `uSERGROUP` | - diff --git a/Typescript/doc/models/type-7-enum.md b/Typescript/doc/models/type-7-enum.md deleted file mode 100644 index e2e937e54..000000000 --- a/Typescript/doc/models/type-7-enum.md +++ /dev/null @@ -1,16 +0,0 @@ - -# Type 7 Enum - -## Enumeration - -`Type7Enum` - -## Fields - -| Name | -| --- | -| `lIVEBOARD` | -| `aNSWER` | -| `dATAOBJECT` | -| `cOLUMN` | - diff --git a/Typescript/doc/models/type-8-enum.md b/Typescript/doc/models/type-8-enum.md deleted file mode 100644 index 5ff1b296f..000000000 --- a/Typescript/doc/models/type-8-enum.md +++ /dev/null @@ -1,17 +0,0 @@ - -# Type 8 Enum - -## Enumeration - -`Type8Enum` - -## Fields - -| Name | -| --- | -| `uNKNOWN` | -| `lDAPUSER` | -| `sAMLUSER` | -| `oIDCUSER` | -| `lOCALUSER` | - diff --git a/Typescript/doc/models/type-9-enum.md b/Typescript/doc/models/type-9-enum.md deleted file mode 100644 index 0b575813c..000000000 --- a/Typescript/doc/models/type-9-enum.md +++ /dev/null @@ -1,19 +0,0 @@ - -# Type 9 Enum - -Type of user. LOCAL_USER indicates that the user is created locally in the ThoughtSpot system. - -## Enumeration - -`Type9Enum` - -## Fields - -| Name | -| --- | -| `uNKNOWN` | -| `lDAPUSER` | -| `sAMLUSER` | -| `oIDCUSER` | -| `lOCALUSER` | - diff --git a/Typescript/doc/models/type-enum.md b/Typescript/doc/models/type-enum.md deleted file mode 100644 index cb7efcc70..000000000 --- a/Typescript/doc/models/type-enum.md +++ /dev/null @@ -1,18 +0,0 @@ - -# Type Enum - -Type of the metadata object - -## Enumeration - -`TypeEnum` - -## Fields - -| Name | -| --- | -| `aNSWER` | -| `lIVEBOARD` | -| `dATAOBJECT` | -| `cONNECTION` | - diff --git a/Typescript/doc/models/user-name-and-id-input.md b/Typescript/doc/models/user-name-and-id-input.md deleted file mode 100644 index 099d4bbd4..000000000 --- a/Typescript/doc/models/user-name-and-id-input.md +++ /dev/null @@ -1,23 +0,0 @@ - -# User Name and ID Input - -## Structure - -`UserNameAndIDInput` - -## Fields - -| Name | Type | Tags | Description | -| --- | --- | --- | --- | -| `name` | `string \| undefined` | Optional | Username of the user | -| `id` | `string \| undefined` | Optional | GUID of the user | - -## Example (as JSON) - -```json -{ - "name": null, - "id": null -} -``` - diff --git a/Typescript/doc/models/user-name-and-id.md b/Typescript/doc/models/user-name-and-id.md deleted file mode 100644 index 3bc5b8f01..000000000 --- a/Typescript/doc/models/user-name-and-id.md +++ /dev/null @@ -1,23 +0,0 @@ - -# User Name and ID - -## Structure - -`UserNameAndID` - -## Fields - -| Name | Type | Tags | Description | -| --- | --- | --- | --- | -| `name` | `string \| undefined` | Optional | Username of the user | -| `id` | `string \| undefined` | Optional | GUID of the user | - -## Example (as JSON) - -```json -{ - "name": null, - "id": null -} -``` - diff --git a/Typescript/doc/models/user-response.md b/Typescript/doc/models/user-response.md deleted file mode 100644 index 67bcca8bb..000000000 --- a/Typescript/doc/models/user-response.md +++ /dev/null @@ -1,83 +0,0 @@ - -# User Response - -## Structure - -`UserResponse` - -## Fields - -| Name | Type | Tags | Description | -| --- | --- | --- | --- | -| `name` | `string \| undefined` | Optional | Username of the user account | -| `displayName` | `string \| undefined` | Optional | Display name of the user account | -| `id` | `string \| undefined` | Optional | GUID of the user account | -| `visibility` | `string \| undefined` | Optional | Visibility of the user account | -| `mail` | `string \| undefined` | Optional | Email of the user account | -| `groups` | [`GroupNameAndID[] \| undefined`](../../doc/models/group-name-and-id.md) | Optional | Name of the group to which user account is added | -| `privileges` | `string[] \| undefined` | Optional | Privileges assigned to user account | -| `orgs` | [`OrgType[] \| undefined`](../../doc/models/org-type.md) | Optional | The organizations that user belongs to | -| `tags` | `string[] \| undefined` | Optional | Tags assigned to the user | -| `state` | `string \| undefined` | Optional | Indicates if the user account is active or inactive | -| `notifyOnShare` | `boolean \| undefined` | Optional | Indicates if the email should be sent when object is shared with the user | -| `showWalkMe` | `boolean \| undefined` | Optional | Indicates if the walk me should be shown when logging in | -| `analystOnboardingComplete` | `boolean \| undefined` | Optional | Indicates if the onboarding is completed for the user | -| `firstLogin` | `number \| undefined` | Optional | Indicates if the use is logging in for the first time | -| `welcomeEmailSent` | `boolean \| undefined` | Optional | Indicates if the welcome email is sent to email associated with the user account | -| `isDeleted` | `boolean \| undefined` | Optional | Indicates if the user account is deleted | -| `isHidden` | `boolean \| undefined` | Optional | Indicates if the user account is hidden | -| `isExternal` | `boolean \| undefined` | Optional | Indicates if the user account is from external system
isDeprecated | -| `isDeprecated` | `boolean \| undefined` | Optional | - | -| `complete` | `boolean \| undefined` | Optional | Indicates if the all the properties of user account is provided | -| `isSuperUser` | `boolean \| undefined` | Optional | Indicates if the user account is super user | -| `isSystemPrincipal` | `boolean \| undefined` | Optional | Indicates if the user account is system principal | -| `type` | `string \| undefined` | Optional | Indicates the type of user account | -| `parenttype` | `string \| undefined` | Optional | Indicates the type of parent object | -| `tenantId` | `string \| undefined` | Optional | Tenant id associated with the user account | -| `indexVersion` | `number \| undefined` | Optional | - | -| `generationNum` | `number \| undefined` | Optional | - | -| `created` | `number \| undefined` | Optional | Date and time when user account was created | -| `modified` | `number \| undefined` | Optional | Date and time of last modification of user account | -| `author` | [`UserNameAndID \| undefined`](../../doc/models/user-name-and-id.md) | Optional | - | -| `modifiedBy` | [`UserNameAndID \| undefined`](../../doc/models/user-name-and-id.md) | Optional | - | -| `owner` | [`UserNameAndID \| undefined`](../../doc/models/user-name-and-id.md) | Optional | - | - -## Example (as JSON) - -```json -{ - "name": null, - "displayName": null, - "id": null, - "visibility": null, - "mail": null, - "groups": null, - "privileges": null, - "orgs": null, - "tags": null, - "state": null, - "notifyOnShare": null, - "showWalkMe": null, - "analystOnboardingComplete": null, - "firstLogin": null, - "welcomeEmailSent": null, - "isDeleted": null, - "isHidden": null, - "isExternal": null, - "isDeprecated": null, - "complete": null, - "isSuperUser": null, - "isSystemPrincipal": null, - "type": null, - "parenttype": null, - "tenantId": null, - "indexVersion": null, - "generationNum": null, - "created": null, - "modified": null, - "author": null, - "modifiedBy": null, - "owner": null -} -``` - diff --git a/Typescript/doc/models/visibility-1-enum.md b/Typescript/doc/models/visibility-1-enum.md deleted file mode 100644 index ee26b4779..000000000 --- a/Typescript/doc/models/visibility-1-enum.md +++ /dev/null @@ -1,17 +0,0 @@ - -# Visibility 1 Enum - -Visibility of the user account. The visibility attribute is set to DEFAULT when creating a user. The DEFAULT attribute makes a user visible to other users and user groups, and thus allows them to share objects. - -## Enumeration - -`Visibility1Enum` - -## Fields - -| Name | -| --- | -| `dEFAULT` | -| `nONSHARABLE` | -| `sHARABLE` | - diff --git a/Typescript/doc/models/visibility-2-enum.md b/Typescript/doc/models/visibility-2-enum.md deleted file mode 100644 index c1f638a93..000000000 --- a/Typescript/doc/models/visibility-2-enum.md +++ /dev/null @@ -1,17 +0,0 @@ - -# Visibility 2 Enum - -Visibility of the user group. The visibility attribute is set to DEFAULT. The DEFAULT attribute makes the user group visible for other user groups and allows them to share objects. - -## Enumeration - -`Visibility2Enum` - -## Fields - -| Name | -| --- | -| `dEFAULT` | -| `nONSHARABLE` | -| `sHARABLE` | - diff --git a/Typescript/doc/models/visibility-enum.md b/Typescript/doc/models/visibility-enum.md deleted file mode 100644 index 05dec14b2..000000000 --- a/Typescript/doc/models/visibility-enum.md +++ /dev/null @@ -1,15 +0,0 @@ - -# Visibility Enum - -## Enumeration - -`VisibilityEnum` - -## Fields - -| Name | -| --- | -| `dEFAULT` | -| `nONSHARABLE` | -| `sHARABLE` | - diff --git a/Typescript/doc/models/viz-type.md b/Typescript/doc/models/viz-type.md deleted file mode 100644 index 18e9fa604..000000000 --- a/Typescript/doc/models/viz-type.md +++ /dev/null @@ -1,25 +0,0 @@ - -# Viz Type - -## Structure - -`VizType` - -## Fields - -| Name | Type | Tags | Description | -| --- | --- | --- | --- | -| `name` | `string \| undefined` | Optional | The name of the visualization | -| `id` | `string \| undefined` | Optional | The GUID of the visualization | -| `querySql` | `string \| undefined` | Optional | SQL query associated with the visualization | - -## Example (as JSON) - -```json -{ - "name": null, - "id": null, - "querySql": null -} -``` - diff --git a/Typescript/jest.config.js b/Typescript/jest.config.js deleted file mode 100644 index e13821fb6..000000000 --- a/Typescript/jest.config.js +++ /dev/null @@ -1,6 +0,0 @@ -module.exports = { - testEnvironment: 'node', - globals: { - "__DEV__": true, - } -}; \ No newline at end of file diff --git a/Typescript/src/authentication.ts b/Typescript/src/authentication.ts deleted file mode 100644 index 96f0cbd37..000000000 --- a/Typescript/src/authentication.ts +++ /dev/null @@ -1,31 +0,0 @@ -/** - * ThoughtSpot Public REST APILib - * - * This file was automatically generated by APIMATIC v3.0 ( https://www.apimatic.io ). - */ - -import { AUTHORIZATION_HEADER, setHeader } from './core'; -import { passThroughInterceptor } from './core'; -import { AuthenticatorInterface } from './core'; - -/** None authentication provider */ -export const noneAuthenticationProvider = () => passThroughInterceptor; - -export const accessTokenAuthenticationProvider = ({ - accessToken, -}: { - accessToken: string; -}): AuthenticatorInterface => { - return (requiresAuth?: boolean) => { - if (!requiresAuth) { - return passThroughInterceptor; - } - - return (request, options, next) => { - request.headers = request.headers ?? {}; - setHeader(request.headers, AUTHORIZATION_HEADER, `Bearer ${accessToken}`); - - return next(request, options); - }; - }; -}; diff --git a/Typescript/src/client.ts b/Typescript/src/client.ts deleted file mode 100644 index d8521d531..000000000 --- a/Typescript/src/client.ts +++ /dev/null @@ -1,150 +0,0 @@ -/** - * ThoughtSpot Public REST APILib - * - * This file was automatically generated by APIMATIC v3.0 ( https://www.apimatic.io ). - */ - -import { accessTokenAuthenticationProvider } from './authentication'; -import { - AuthParams, - ClientInterface, - SdkRequestBuilder, - SdkRequestBuilderFactory, - Server, -} from './clientInterface'; -import { Configuration, Environment } from './configuration'; -import { - DEFAULT_CONFIGURATION, - DEFAULT_RETRY_CONFIG, -} from './defaultConfiguration'; -import { ApiError } from './core'; -import { pathTemplate, SkipEncode } from './core'; -import { setHeader } from './core'; -import { updateUserAgent } from './core'; -import { - AuthenticatorInterface, - createRequestBuilderFactory, - HttpClient, - HttpClientInterface, - RetryConfiguration, - XmlSerializerInterface, -} from './core'; -import { XmlSerialization } from './http/xmlSerialization'; - -export class Client implements ClientInterface { - private _config: Readonly; - private _timeout: number; - private _retryConfig: RetryConfiguration; - private _requestBuilderFactory: SdkRequestBuilderFactory; - private _userAgent: string; - - constructor(config?: Partial) { - this._config = { - ...DEFAULT_CONFIGURATION, - ...config, - }; - this._retryConfig = { - ...DEFAULT_RETRY_CONFIG, - ...this._config.httpClientOptions?.retryConfig, - }; - this._timeout = - typeof this._config.httpClientOptions?.timeout != 'undefined' - ? this._config.httpClientOptions.timeout - : this._config.timeout; - this._userAgent = updateUserAgent( - 'RestAPI V2 SDK', - ); - this._requestBuilderFactory = createRequestHandlerFactory( - server => getBaseUri(server, this._config), - accessTokenAuthenticationProvider(this._config), - new HttpClient({ - timeout: this._timeout, - clientConfigOverrides: this._config.unstable_httpClientOptions, - httpAgent: this._config.httpClientOptions?.httpAgent, - httpsAgent: this._config.httpClientOptions?.httpsAgent, - }), - [ - withErrorHandlers, - withUserAgent(this._userAgent), - withAuthenticationByDefault, - ], - new XmlSerialization(), - this._retryConfig - ); - } - - public getRequestBuilderFactory(): SdkRequestBuilderFactory { - return this._requestBuilderFactory; - } - - /** - * Clone this client and override given configuration options - */ - public withConfiguration(config: Partial) { - return new Client({ ...this._config, ...config }); - } -} - -function createHttpClientAdapter(client: HttpClient): HttpClientInterface { - return async (request, requestOptions) => { - return await client.executeRequest(request, requestOptions); - }; -} - -function getBaseUri(server: Server = 'default', config: Configuration): string { - if (config.environment === Environment.Production) { - if (server === 'default') { - return pathTemplate`${new SkipEncode(config.baseUrl)}`; - } - } - throw new Error('Could not get Base URL. Invalid environment or server.'); -} - -function createRequestHandlerFactory( - baseUrlProvider: (server?: Server) => string, - authProvider: AuthenticatorInterface, - httpClient: HttpClient, - addons: ((rb: SdkRequestBuilder) => void)[], - xmlSerializer: XmlSerializerInterface, - retryConfig: RetryConfiguration -): SdkRequestBuilderFactory { - const requestBuilderFactory = createRequestBuilderFactory( - createHttpClientAdapter(httpClient), - baseUrlProvider, - ApiError, - authProvider, - xmlSerializer, - retryConfig - ); - - return tap(requestBuilderFactory, ...addons); -} - -function tap( - requestBuilderFactory: SdkRequestBuilderFactory, - ...callback: ((requestBuilder: SdkRequestBuilder) => void)[] -): SdkRequestBuilderFactory { - return (...args) => { - const requestBuilder = requestBuilderFactory(...args); - callback.forEach(c => c(requestBuilder)); - return requestBuilder; - }; -} - -function withErrorHandlers(rb: SdkRequestBuilder) { - rb.defaultToError(ApiError); -} - -function withUserAgent(userAgent: string) { - return (rb: SdkRequestBuilder) => { - rb.interceptRequest(request => { - const headers = request.headers ?? {}; - setHeader(headers, 'user-agent', userAgent); - return { ...request, headers }; - }); - }; -} - -function withAuthenticationByDefault(rb: SdkRequestBuilder) { - rb.authenticate(true); -} diff --git a/Typescript/src/clientInterface.ts b/Typescript/src/clientInterface.ts deleted file mode 100644 index c3ec27d59..000000000 --- a/Typescript/src/clientInterface.ts +++ /dev/null @@ -1,22 +0,0 @@ -/** - * ThoughtSpot Public REST APILib - * - * This file was automatically generated by APIMATIC v3.0 ( https://www.apimatic.io ). - */ - -import { RequestBuilderFactory } from './core'; - -export interface ClientInterface { - getRequestBuilderFactory(): SdkRequestBuilderFactory; -} - -export type SdkRequestBuilderFactory = RequestBuilderFactory< - Server, - AuthParams ->; - -export type SdkRequestBuilder = ReturnType; - -export type Server = 'default'; - -export type AuthParams = boolean; diff --git a/Typescript/src/configuration.ts b/Typescript/src/configuration.ts deleted file mode 100644 index 7571c2aa2..000000000 --- a/Typescript/src/configuration.ts +++ /dev/null @@ -1,22 +0,0 @@ -/** - * ThoughtSpot Public REST APILib - * - * This file was automatically generated by APIMATIC v3.0 ( https://www.apimatic.io ). - */ - -import { HttpClientOptions } from './core'; - -/** An interface for all configuration parameters required by the SDK. */ -export interface Configuration { - timeout: number; - environment: Environment; - baseUrl: string; - accessToken: string; - httpClientOptions?: Partial; - unstable_httpClientOptions?: any; -} - -/** Environments available for API */ -export enum Environment { - Production = 'production', -} diff --git a/Typescript/src/controllers/adminController.ts b/Typescript/src/controllers/adminController.ts deleted file mode 100644 index c7d30d97a..000000000 --- a/Typescript/src/controllers/adminController.ts +++ /dev/null @@ -1,205 +0,0 @@ -/** - * ThoughtSpot Public REST APILib - * - * This file was automatically generated by APIMATIC v3.0 ( https://www.apimatic.io ). - */ - -import { ApiResponse, RequestOptions } from '../core'; -import { ErrorResponseError } from '../errors/errorResponseError'; -import { - AdminsyncPrincipalResponse, - adminsyncPrincipalResponseSchema, -} from '../models/adminsyncPrincipalResponse'; -import { - TspublicRestV2AdminAssignauthorRequest, - tspublicRestV2AdminAssignauthorRequestSchema, -} from '../models/tspublicRestV2AdminAssignauthorRequest'; -import { - TspublicRestV2AdminChangeauthorRequest, - tspublicRestV2AdminChangeauthorRequestSchema, -} from '../models/tspublicRestV2AdminChangeauthorRequest'; -import { - TspublicRestV2AdminConfigurationUpdateRequest, - tspublicRestV2AdminConfigurationUpdateRequestSchema, -} from '../models/tspublicRestV2AdminConfigurationUpdateRequest'; -import { - TspublicRestV2AdminForcelogoutRequest, - tspublicRestV2AdminForcelogoutRequestSchema, -} from '../models/tspublicRestV2AdminForcelogoutRequest'; -import { - TspublicRestV2AdminResetpasswordRequest, - tspublicRestV2AdminResetpasswordRequestSchema, -} from '../models/tspublicRestV2AdminResetpasswordRequest'; -import { - TspublicRestV2AdminSyncprincipalRequest, - tspublicRestV2AdminSyncprincipalRequestSchema, -} from '../models/tspublicRestV2AdminSyncprincipalRequest'; -import { boolean } from '../schema'; -import { BaseController } from './baseController'; - -export class AdminController extends BaseController { - /** - * To update the Thoughtspot cluster configuration, use this endpoint. - * - * @param body - * @return Response from the API call - */ - async restapiV2UpdateClusterConfig( - body: TspublicRestV2AdminConfigurationUpdateRequest, - requestOptions?: RequestOptions - ): Promise> { - const req = this.createRequest( - 'PUT', - '/tspublic/rest/v2/admin/configuration/update' - ); - const mapped = req.prepareArgs({ - body: [body, tspublicRestV2AdminConfigurationUpdateRequestSchema], - }); - req.header('Content-Type', 'application/json'); - req.json(mapped.body); - req.throwOn(500, ErrorResponseError, 'Operation failed'); - return req.callAsJson(boolean(), requestOptions); - } - - /** - * To reset the password of a ThoughtSpot user account, use this endpoint. - * - * It is mandatory to use Authorization header with token of a user with admin access to successfully - * run this endpoint. - * - * At least one of User Id or username is mandatory. When both are given, then user id will be - * considered. - * - * @param body - * @return Response from the API call - */ - async restapiV2ResetUserPassword( - body: TspublicRestV2AdminResetpasswordRequest, - requestOptions?: RequestOptions - ): Promise> { - const req = this.createRequest( - 'PUT', - '/tspublic/rest/v2/admin/resetpassword' - ); - const mapped = req.prepareArgs({ - body: [body, tspublicRestV2AdminResetpasswordRequestSchema], - }); - req.header('Content-Type', 'application/json'); - req.json(mapped.body); - req.throwOn(500, ErrorResponseError, 'Operation failed'); - return req.callAsJson(boolean(), requestOptions); - } - - /** - * To programmatically synchronize user accounts and user groups from external system with ThoughtSpot, - * use this endpoint. - * - * The payload takes principals containing all users and groups present in the external system. - * - * The users and user groups in Thoughtspot get updated for any matching inputs. - * - * Any user and user group present in the input, but not present in the cluster, gets created in - * cluster. - * n You can optionally choose to delete the user and groups from the cluster, that are not present in - * the input. - * - * @param body - * @return Response from the API call - */ - async restapiV2SyncPrincipal( - body: TspublicRestV2AdminSyncprincipalRequest, - requestOptions?: RequestOptions - ): Promise> { - const req = this.createRequest( - 'PUT', - '/tspublic/rest/v2/admin/syncprincipal' - ); - const mapped = req.prepareArgs({ - body: [body, tspublicRestV2AdminSyncprincipalRequestSchema], - }); - req.header('Content-Type', 'application/json'); - req.json(mapped.body); - req.throwOn(500, ErrorResponseError, 'Operation failed'); - return req.callAsJson(adminsyncPrincipalResponseSchema, requestOptions); - } - - /** - * To programmatically change the owner of one or several objects from one user account to another, use - * this endpoint. - * - * You might want to transfer ownership of objects owned by a user to another active user, when the - * account is removed from the ThoughtSpot application. - * - * @param body - * @return Response from the API call - */ - async restapiV2ChangeAuthorOfObjects( - body: TspublicRestV2AdminChangeauthorRequest, - requestOptions?: RequestOptions - ): Promise> { - const req = this.createRequest( - 'PUT', - '/tspublic/rest/v2/admin/changeauthor' - ); - const mapped = req.prepareArgs({ - body: [body, tspublicRestV2AdminChangeauthorRequestSchema], - }); - req.header('Content-Type', 'application/json'); - req.json(mapped.body); - req.throwOn(500, ErrorResponseError, 'Operation failed'); - return req.callAsJson(boolean(), requestOptions); - } - - /** - * To programmatically assign an author to one or several objects, use this endpoint. - * - * Provide either user name or id as input. When both are given user id will be considered. - * - * Requires administration privilege. - * - * @param body - * @return Response from the API call - */ - async restapiV2AssignAuthorToObjects( - body: TspublicRestV2AdminAssignauthorRequest, - requestOptions?: RequestOptions - ): Promise> { - const req = this.createRequest( - 'PUT', - '/tspublic/rest/v2/admin/assignauthor' - ); - const mapped = req.prepareArgs({ - body: [body, tspublicRestV2AdminAssignauthorRequestSchema], - }); - req.header('Content-Type', 'application/json'); - req.json(mapped.body); - req.throwOn(500, ErrorResponseError, 'Operation failed'); - return req.callAsJson(boolean(), requestOptions); - } - - /** - * To logout one or more users from logged in session, use this endpoint. If no input is provided then - * all logged in users are force logged out. - * - * Requires administration privilege - * - * @param body - * @return Response from the API call - */ - async restapiV2ForceLogoutUsers( - body: TspublicRestV2AdminForcelogoutRequest, - requestOptions?: RequestOptions - ): Promise> { - const req = this.createRequest( - 'POST', - '/tspublic/rest/v2/admin/forcelogout' - ); - const mapped = req.prepareArgs({ - body: [body, tspublicRestV2AdminForcelogoutRequestSchema], - }); - req.header('Content-Type', 'application/json'); - req.json(mapped.body); - req.throwOn(500, ErrorResponseError, 'Operation failed'); - return req.callAsJson(boolean(), requestOptions); - } -} diff --git a/Typescript/src/controllers/baseController.ts b/Typescript/src/controllers/baseController.ts deleted file mode 100644 index 034ade0de..000000000 --- a/Typescript/src/controllers/baseController.ts +++ /dev/null @@ -1,17 +0,0 @@ -/** - * ThoughtSpot Public REST APILib - * - * This file was automatically generated by APIMATIC v3.0 ( https://www.apimatic.io ). - */ - -import { ClientInterface, SdkRequestBuilderFactory } from '../clientInterface'; - -/** Base class for all controllers */ -export class BaseController { - /** Create a request builder */ - protected createRequest: SdkRequestBuilderFactory; - - constructor(client: ClientInterface) { - this.createRequest = client.getRequestBuilderFactory(); - } -} diff --git a/Typescript/src/controllers/connectionController.ts b/Typescript/src/controllers/connectionController.ts deleted file mode 100644 index b452130a6..000000000 --- a/Typescript/src/controllers/connectionController.ts +++ /dev/null @@ -1,296 +0,0 @@ -/** - * ThoughtSpot Public REST APILib - * - * This file was automatically generated by APIMATIC v3.0 ( https://www.apimatic.io ). - */ - -import { ApiResponse, RequestOptions } from '../core'; -import { ErrorResponseError } from '../errors/errorResponseError'; -import { - ConnectionResponse, - connectionResponseSchema, -} from '../models/connectionResponse'; -import { - ConnectionTableColumnsResponse, - connectionTableColumnsResponseSchema, -} from '../models/connectionTableColumnsResponse'; -import { - ConnectionTableResponse, - connectionTableResponseSchema, -} from '../models/connectionTableResponse'; -import { - CreateConnectionResponse, - createConnectionResponseSchema, -} from '../models/createConnectionResponse'; -import { - TspublicRestV2ConnectionAddtableRequest, - tspublicRestV2ConnectionAddtableRequestSchema, -} from '../models/tspublicRestV2ConnectionAddtableRequest'; -import { - TspublicRestV2ConnectionCreateRequest, - tspublicRestV2ConnectionCreateRequestSchema, -} from '../models/tspublicRestV2ConnectionCreateRequest'; -import { - TspublicRestV2ConnectionRemovetableRequest, - tspublicRestV2ConnectionRemovetableRequestSchema, -} from '../models/tspublicRestV2ConnectionRemovetableRequest'; -import { - TspublicRestV2ConnectionSearchRequest, - tspublicRestV2ConnectionSearchRequestSchema, -} from '../models/tspublicRestV2ConnectionSearchRequest'; -import { - TspublicRestV2ConnectionTablecoloumnRequest, - tspublicRestV2ConnectionTablecoloumnRequestSchema, -} from '../models/tspublicRestV2ConnectionTablecoloumnRequest'; -import { - TspublicRestV2ConnectionTableRequest, - tspublicRestV2ConnectionTableRequestSchema, -} from '../models/tspublicRestV2ConnectionTableRequest'; -import { - TspublicRestV2ConnectionUpdateRequest, - tspublicRestV2ConnectionUpdateRequestSchema, -} from '../models/tspublicRestV2ConnectionUpdateRequest'; -import { array, boolean, string } from '../schema'; -import { BaseController } from './baseController'; - -export class ConnectionController extends BaseController { - /** - * To get the details of a specific connection use this endpoint - * - * @param id The GUID of the connection to query - * @return Response from the API call - */ - async restapiV2GetConnection( - id: string, - requestOptions?: RequestOptions - ): Promise> { - const req = this.createRequest('GET', '/tspublic/rest/v2/connection'); - const mapped = req.prepareArgs({ id: [id, string()] }); - req.query('id', mapped.id); - req.throwOn(500, ErrorResponseError, 'Operation failed'); - return req.callAsJson(connectionResponseSchema, requestOptions); - } - - /** - * To get the list of databases for a connection, use this endpoint. - * - * The response will include databases from the data platform corresponding to the connection id - * provided. - * - * @param id The GUID of the connection - * @return Response from the API call - */ - async restapiV2GetConnectionDatabase( - id: string, - requestOptions?: RequestOptions - ): Promise> { - const req = this.createRequest( - 'GET', - '/tspublic/rest/v2/connection/database' - ); - const mapped = req.prepareArgs({ id: [id, string()] }); - req.query('id', mapped.id); - req.throwOn(500, ErrorResponseError, 'Operation failed'); - return req.callAsJson(array(string()), requestOptions); - } - - /** - * To programmatically create a connection in the ThoughtSpot system use this API endpoint. - * Using this API, you can create a connection and assign groups. - * To create a connection, you require admin connection privileges. - * All connections created in the ThoughtSpot system are added to ALL_GROUP - * - * @param body - * @return Response from the API call - */ - async restapiV2CreateConnection( - body: TspublicRestV2ConnectionCreateRequest, - requestOptions?: RequestOptions - ): Promise> { - const req = this.createRequest( - 'POST', - '/tspublic/rest/v2/connection/create' - ); - const mapped = req.prepareArgs({ - body: [body, tspublicRestV2ConnectionCreateRequestSchema], - }); - req.header('Content-Type', 'application/json'); - req.json(mapped.body); - req.throwOn(500, ErrorResponseError, 'Operation failed'); - return req.callAsJson(createConnectionResponseSchema, requestOptions); - } - - /** - * You can use this endpoint to programmatically modify an existing connection - * To modify a connection, you require admin connection privileges. - * At least one of Connection Id or connectionname is mandatory. When both are given, then connection - * id will be considered and connectionname will be updated - * - * @param body - * @return Response from the API call - */ - async restapiV2UpdateConnection( - body: TspublicRestV2ConnectionUpdateRequest, - requestOptions?: RequestOptions - ): Promise> { - const req = this.createRequest( - 'PUT', - '/tspublic/rest/v2/connection/update' - ); - const mapped = req.prepareArgs({ - body: [body, tspublicRestV2ConnectionUpdateRequestSchema], - }); - req.header('Content-Type', 'application/json'); - req.json(mapped.body); - req.throwOn(500, ErrorResponseError, 'Operation failed'); - return req.callAsJson(boolean(), requestOptions); - } - - /** - * To remove a connection from the ThoughtSpot system, use this endpoint. - * - * @param id A JSON array of GUIDs of the connection - * @return Response from the API call - */ - async restapiV2DeleteConnection( - id: string[], - requestOptions?: RequestOptions - ): Promise> { - const req = this.createRequest( - 'DELETE', - '/tspublic/rest/v2/connection/delete' - ); - const mapped = req.prepareArgs({ id: [id, array(string())] }); - req.query('id', mapped.id); - req.throwOn(500, ErrorResponseError, 'Operation failed'); - return req.callAsJson(boolean(), requestOptions); - } - - /** - * To programmatically add table to an existing connection use this endpoint. - * When you assign groups to a connection, the connection inherits the privileges assigned to those - * groups. - * At least one of Connection Id or connectionname is mandatory. When both are given, then connection - * id will be considered. - * - * @param body - * @return Response from the API call - */ - async restapiV2AddTableToConnection( - body: TspublicRestV2ConnectionAddtableRequest, - requestOptions?: RequestOptions - ): Promise> { - const req = this.createRequest( - 'PUT', - '/tspublic/rest/v2/connection/addtable' - ); - const mapped = req.prepareArgs({ - body: [body, tspublicRestV2ConnectionAddtableRequestSchema], - }); - req.header('Content-Type', 'application/json'); - req.json(mapped.body); - req.throwOn(500, ErrorResponseError, 'Operation failed'); - return req.callAsJson(boolean(), requestOptions); - } - - /** - * To programmatically remove a table from a connection use API endpoint. - * The API removes only the connection association. It does not delete the connection or group from the - * Thoughtspot system. - * At least one of id or name of connection is required. When both are given connection id will be - * considered. - * - * @param body - * @return Response from the API call - */ - async restapiV2RemoveTableFromConnection( - body: TspublicRestV2ConnectionRemovetableRequest, - requestOptions?: RequestOptions - ): Promise> { - const req = this.createRequest( - 'PUT', - '/tspublic/rest/v2/connection/removetable' - ); - const mapped = req.prepareArgs({ - body: [body, tspublicRestV2ConnectionRemovetableRequestSchema], - }); - req.header('Content-Type', 'application/json'); - req.json(mapped.body); - req.throwOn(500, ErrorResponseError, 'Operation failed'); - return req.callAsJson(boolean(), requestOptions); - } - - /** - * To get the details of a specific connection or all connections in the ThoughtSpot system use this - * end point. - * - * @param body - * @return Response from the API call - */ - async restapiV2SearchConnection( - body: TspublicRestV2ConnectionSearchRequest, - requestOptions?: RequestOptions - ): Promise> { - const req = this.createRequest( - 'POST', - '/tspublic/rest/v2/connection/search' - ); - const mapped = req.prepareArgs({ - body: [body, tspublicRestV2ConnectionSearchRequestSchema], - }); - req.header('Content-Type', 'application/json'); - req.json(mapped.body); - req.throwOn(500, ErrorResponseError, 'Operation failed'); - return req.callAsJson(array(connectionResponseSchema), requestOptions); - } - - /** - * To get the details of tables from a connection, use this endpoint. - * - * You can get the details of tables in the data platform for the connection id provided. - * - * @param body - * @return Response from the API call - */ - async restapiV2GetConnectionTables( - body: TspublicRestV2ConnectionTableRequest, - requestOptions?: RequestOptions - ): Promise> { - const req = this.createRequest( - 'POST', - '/tspublic/rest/v2/connection/table' - ); - const mapped = req.prepareArgs({ - body: [body, tspublicRestV2ConnectionTableRequestSchema], - }); - req.header('Content-Type', 'application/json'); - req.json(mapped.body); - req.throwOn(500, ErrorResponseError, 'Operation failed'); - return req.callAsJson(connectionTableResponseSchema, requestOptions); - } - - /** - * To get the details of columns in a table associated to a connection, use this endpoint. - * - * You can get the columns of any table available in the data platform for the connection id provided. - * - * @param body - * @return Response from the API call - */ - async restapiV2GetConnectionTableColumns( - body: TspublicRestV2ConnectionTablecoloumnRequest, - requestOptions?: RequestOptions - ): Promise> { - const req = this.createRequest( - 'POST', - '/tspublic/rest/v2/connection/tablecoloumn' - ); - const mapped = req.prepareArgs({ - body: [body, tspublicRestV2ConnectionTablecoloumnRequestSchema], - }); - req.header('Content-Type', 'application/json'); - req.json(mapped.body); - req.throwOn(500, ErrorResponseError, 'Operation failed'); - return req.callAsJson(connectionTableColumnsResponseSchema, requestOptions); - } -} diff --git a/Typescript/src/controllers/customActionsController.ts b/Typescript/src/controllers/customActionsController.ts deleted file mode 100644 index a97c9c236..000000000 --- a/Typescript/src/controllers/customActionsController.ts +++ /dev/null @@ -1,212 +0,0 @@ -/** - * ThoughtSpot Public REST APILib - * - * This file was automatically generated by APIMATIC v3.0 ( https://www.apimatic.io ). - */ - -import { ApiResponse, RequestOptions } from '../core'; -import { ErrorResponseError } from '../errors/errorResponseError'; -import { - TspublicRestV2CustomactionAssociationUpdateRequest, - tspublicRestV2CustomactionAssociationUpdateRequestSchema, -} from '../models/tspublicRestV2CustomactionAssociationUpdateRequest'; -import { - TspublicRestV2CustomactionCreateRequest, - tspublicRestV2CustomactionCreateRequestSchema, -} from '../models/tspublicRestV2CustomactionCreateRequest'; -import { - TspublicRestV2CustomactionSearchRequest, - tspublicRestV2CustomactionSearchRequestSchema, -} from '../models/tspublicRestV2CustomactionSearchRequest'; -import { - TspublicRestV2CustomactionUpdateRequest, - tspublicRestV2CustomactionUpdateRequestSchema, -} from '../models/tspublicRestV2CustomactionUpdateRequest'; -import { string, unknown } from '../schema'; -import { BaseController } from './baseController'; - -export class CustomActionsController extends BaseController { - /** - * To get details of a specific custom action configured in the ThoughtSpot system, use this endpoint - * - * @param id GUID of the custom action - * @return Response from the API call - */ - async restapiV2GetCustomAction( - id: string, - requestOptions?: RequestOptions - ): Promise> { - const req = this.createRequest('GET', '/tspublic/rest/v2/customaction'); - const mapped = req.prepareArgs({ id: [id, string()] }); - req.query('id', mapped.id); - req.throwOn(500, ErrorResponseError, 'Operation failed'); - return req.callAsJson(unknown(), requestOptions); - } - - /** - * To search custom actions available on a ThoughtSpot instance, use this endpoint - * - * @param body - * @return Response from the API call - */ - async restapiV2SearchCustomAction( - body: TspublicRestV2CustomactionSearchRequest, - requestOptions?: RequestOptions - ): Promise> { - const req = this.createRequest( - 'POST', - '/tspublic/rest/v2/customaction/search' - ); - const mapped = req.prepareArgs({ - body: [body, tspublicRestV2CustomactionSearchRequestSchema], - }); - req.header('Content-Type', 'application/json'); - req.json(mapped.body); - req.throwOn(500, ErrorResponseError, 'Operation failed'); - return req.callAsJson(unknown(), requestOptions); - } - - /** - * ThoughtSpot supports associating custom actions to Liveboards, answers, and worksheets. To get the - * details of the ThoughtSpot objects associated with a custom action, use this endpoint. - * - * @param id GUID of the custom action - * @return Response from the API call - */ - async restapiV2GetCustomActionAssociation( - id: string, - requestOptions?: RequestOptions - ): Promise> { - const req = this.createRequest( - 'GET', - '/tspublic/rest/v2/customaction/association' - ); - const mapped = req.prepareArgs({ id: [id, string()] }); - req.query('id', mapped.id); - req.throwOn(500, ErrorResponseError, 'Operation failed'); - return req.callAsJson(unknown(), requestOptions); - } - - /** - * To programmatically create custom actions on ThoughtSpot clusters that support embedding - * configuration, use this endpoint - * - * @param body - * @return Response from the API call - */ - async restapiV2CreateCustomAction( - body: TspublicRestV2CustomactionCreateRequest, - requestOptions?: RequestOptions - ): Promise> { - const req = this.createRequest( - 'POST', - '/tspublic/rest/v2/customaction/create' - ); - const mapped = req.prepareArgs({ - body: [body, tspublicRestV2CustomactionCreateRequestSchema], - }); - req.header('Content-Type', 'application/json'); - req.json(mapped.body); - req.throwOn(500, ErrorResponseError, 'Operation failed'); - return req.callAsJson(unknown(), requestOptions); - } - - /** - * To programmatically edit an existing custom action, use this endpoint - * - * @param body - * @return Response from the API call - */ - async restapiV2UpdateCustomAction( - body: TspublicRestV2CustomactionUpdateRequest, - requestOptions?: RequestOptions - ): Promise> { - const req = this.createRequest( - 'PUT', - '/tspublic/rest/v2/customaction/update' - ); - const mapped = req.prepareArgs({ - body: [body, tspublicRestV2CustomactionUpdateRequestSchema], - }); - req.header('Content-Type', 'application/json'); - req.json(mapped.body); - req.throwOn(500, ErrorResponseError, 'Operation failed'); - return req.callAsJson(unknown(), requestOptions); - } - - /** - * To programmatically delete a custom action, use this endpoint - * - * @param id GUID of the custom action - * @return Response from the API call - */ - async restapiV2DeleteCustomAction( - id: string, - requestOptions?: RequestOptions - ): Promise> { - const req = this.createRequest( - 'DELETE', - '/tspublic/rest/v2/customaction/delete' - ); - const mapped = req.prepareArgs({ id: [id, string()] }); - req.query('id', mapped.id); - req.throwOn(500, ErrorResponseError, 'Operation failed'); - return req.callAsJson(unknown(), requestOptions); - } - - /** - * To programmatically associate a custom action to a ThoughtSpot object, use this endpoint - * - * @param body - * @return Response from the API call - */ - async restapiV2UpdateCustomActionAssociation( - body: TspublicRestV2CustomactionAssociationUpdateRequest, - requestOptions?: RequestOptions - ): Promise> { - const req = this.createRequest( - 'PUT', - '/tspublic/rest/v2/customaction/association/update' - ); - const mapped = req.prepareArgs({ - body: [body, tspublicRestV2CustomactionAssociationUpdateRequestSchema], - }); - req.header('Content-Type', 'application/json'); - req.json(mapped.body); - req.throwOn(500, ErrorResponseError, 'Operation failed'); - return req.callAsJson(unknown(), requestOptions); - } - - /** - * To remove custom action associations to ThoughtSpot objects, use this endpoint - * - * @param id GUID of the custom action - * @param association A JSON map of the attributes with association of the action to ThoughtSpot object ID - * Example: {"id":"0dbd5b3a-84c1-4407-9803-cf07d67e6fcf","name":"My worksheet - * action","version":"v2","type":"URL","detail":{"link":"https://unpkg.com","function": - * "my-worksheet-action","authSelect":"NONE","authToken":"","encodeUser":"","apiKey":"X- - * API-KEY","apiValue":"","additionalUrlHeaders":"{}"},"actionAssociationMap": - * {"WORKSHEET":{"2b9d083a-275c-4984-9cfe-90b036affa17":{"enabled":"true","context": - * "PRIMARY"}}},"context":"NONE","availability":[ ],"userGroupList":["d0326b56-ef23-4c8a- - * 8327-a30e99bcc72b"]} - * @return Response from the API call - */ - async restapiV2DeleteCustomActionAssociation( - id: string, - association: string, - requestOptions?: RequestOptions - ): Promise> { - const req = this.createRequest( - 'DELETE', - '/tspublic/rest/v2/customactions/association/delete' - ); - const mapped = req.prepareArgs({ - id: [id, string()], - association: [association, string()], - }); - req.query('id', mapped.id); - req.query('association', mapped.association); - req.throwOn(500, ErrorResponseError, 'Operation failed'); - return req.callAsJson(unknown(), requestOptions); - } -} diff --git a/Typescript/src/controllers/dataController.ts b/Typescript/src/controllers/dataController.ts deleted file mode 100644 index 9e9bfd20b..000000000 --- a/Typescript/src/controllers/dataController.ts +++ /dev/null @@ -1,141 +0,0 @@ -/** - * ThoughtSpot Public REST APILib - * - * This file was automatically generated by APIMATIC v3.0 ( https://www.apimatic.io ). - */ - -import { ApiResponse, RequestOptions } from '../core'; -import { ErrorResponseError } from '../errors/errorResponseError'; -import { - AnswerQueryResponse, - answerQueryResponseSchema, -} from '../models/answerQueryResponse'; -import { - LiveboardQueryResponse, - liveboardQueryResponseSchema, -} from '../models/liveboardQueryResponse'; -import { - TspublicRestV2DataAnswerRequest, - tspublicRestV2DataAnswerRequestSchema, -} from '../models/tspublicRestV2DataAnswerRequest'; -import { - TspublicRestV2DataLiveboardRequest, - tspublicRestV2DataLiveboardRequestSchema, -} from '../models/tspublicRestV2DataLiveboardRequest'; -import { - TspublicRestV2DataSearchRequest, - tspublicRestV2DataSearchRequestSchema, -} from '../models/tspublicRestV2DataSearchRequest'; -import { array, optional, string, unknown } from '../schema'; -import { BaseController } from './baseController'; - -export class DataController extends BaseController { - /** - * To programmatically retrieve data from ThoughtSpot using search query string, use this endpoint - * - * @param body - * @return Response from the API call - */ - async restapiV2SearchQueryData( - body: TspublicRestV2DataSearchRequest, - requestOptions?: RequestOptions - ): Promise> { - const req = this.createRequest('POST', '/tspublic/rest/v2/data/search'); - const mapped = req.prepareArgs({ - body: [body, tspublicRestV2DataSearchRequestSchema], - }); - req.header('Content-Type', 'application/json'); - req.json(mapped.body); - req.throwOn(500, ErrorResponseError, 'Operation failed'); - return req.callAsJson(unknown(), requestOptions); - } - - /** - * To retrieve data related to a Liveboard or visualization from the ThoughtSpot system, you can use - * this endpoint - * - * @param body - * @return Response from the API call - */ - async restapiV2LiveboardData( - body: TspublicRestV2DataLiveboardRequest, - requestOptions?: RequestOptions - ): Promise> { - const req = this.createRequest('POST', '/tspublic/rest/v2/data/liveboard'); - const mapped = req.prepareArgs({ - body: [body, tspublicRestV2DataLiveboardRequestSchema], - }); - req.header('Content-Type', 'application/json'); - req.json(mapped.body); - req.throwOn(500, ErrorResponseError, 'Operation failed'); - return req.callAsJson(unknown(), requestOptions); - } - - /** - * To retrieve data related to a Answer from the ThoughtSpot system, you can use this endpoint - * - * @param body - * @return Response from the API call - */ - async restapiV2AnswerData( - body: TspublicRestV2DataAnswerRequest, - requestOptions?: RequestOptions - ): Promise> { - const req = this.createRequest('POST', '/tspublic/rest/v2/data/answer'); - const mapped = req.prepareArgs({ - body: [body, tspublicRestV2DataAnswerRequestSchema], - }); - req.header('Content-Type', 'application/json'); - req.json(mapped.body); - req.throwOn(500, ErrorResponseError, 'Operation failed'); - return req.callAsJson(unknown(), requestOptions); - } - - /** - * To retrieve the query SQL related to an Answer that is run on the data platform, you can use this - * endpoint - * - * @param id The GUID of the Answer - * @return Response from the API call - */ - async restapiV2AnswerQuerySql( - id: string, - requestOptions?: RequestOptions - ): Promise> { - const req = this.createRequest( - 'GET', - '/tspublic/rest/v2/data/answer/querysql' - ); - const mapped = req.prepareArgs({ id: [id, string()] }); - req.query('id', mapped.id); - req.throwOn(500, ErrorResponseError, 'Operation failed'); - return req.callAsJson(answerQueryResponseSchema, requestOptions); - } - - /** - * To retrieve the query SQL related to a Visualization in a Liveboard that is run on the data platform, - * you can use this endpoint - * - * @param id The GUID of the Answer - * @param vizId A JSON array of GUIDs of the visualizations in the Liveboard. - * @return Response from the API call - */ - async restapiV2LiveboardQuerySql( - id: string, - vizId?: string[], - requestOptions?: RequestOptions - ): Promise> { - const req = this.createRequest( - 'GET', - '/tspublic/rest/v2/data/liveboard/querysql' - ); - const mapped = req.prepareArgs({ - id: [id, string()], - vizId: [vizId, optional(array(string()))], - }); - req.query('id', mapped.id); - req.query('vizId', mapped.vizId); - req.throwOn(500, ErrorResponseError, 'Operation failed'); - return req.callAsJson(liveboardQueryResponseSchema, requestOptions); - } -} diff --git a/Typescript/src/controllers/databaseController.ts b/Typescript/src/controllers/databaseController.ts deleted file mode 100644 index 3433c68b8..000000000 --- a/Typescript/src/controllers/databaseController.ts +++ /dev/null @@ -1,143 +0,0 @@ -/** - * ThoughtSpot Public REST APILib - * - * This file was automatically generated by APIMATIC v3.0 ( https://www.apimatic.io ). - */ - -import { ApiResponse, RequestOptions } from '../core'; -import { ErrorResponseError } from '../errors/errorResponseError'; -import { - CreateTableResponse, - createTableResponseSchema, -} from '../models/createTableResponse'; -import { - TspublicRestV2DatabaseTableCreateRequest, - tspublicRestV2DatabaseTableCreateRequestSchema, -} from '../models/tspublicRestV2DatabaseTableCreateRequest'; -import { - TspublicRestV2DatabaseTableRunqueryRequest, - tspublicRestV2DatabaseTableRunqueryRequestSchema, -} from '../models/tspublicRestV2DatabaseTableRunqueryRequest'; -import { array, optional, string, unknown } from '../schema'; -import { BaseController } from './baseController'; - -export class DatabaseController extends BaseController { - /** - * To list all the schemas in a database in Falcon, use this endpoint. - * - * @param database Name of the Falcon database - * @return Response from the API call - */ - async restapiV2GetSchemas( - database: string, - requestOptions?: RequestOptions - ): Promise> { - const req = this.createRequest('GET', '/tspublic/rest/v2/database/schema'); - const mapped = req.prepareArgs({ database: [database, string()] }); - req.query('database', mapped.database); - req.throwOn(500, ErrorResponseError, 'Operation failed'); - return req.callAsJson(array(string()), requestOptions); - } - - /** - * To list all the tables in a schema of a database in Falcon, use this endpoint. - * - * @param database Name of the Falcon database - * @param schema Name of the schema in Falcon database - * @return Response from the API call - */ - async restapiV2GetTables( - database: string, - schema: string, - requestOptions?: RequestOptions - ): Promise> { - const req = this.createRequest('GET', '/tspublic/rest/v2/database/table'); - const mapped = req.prepareArgs({ - database: [database, string()], - schema: [schema, string()], - }); - req.query('database', mapped.database); - req.query('schema', mapped.schema); - req.throwOn(500, ErrorResponseError, 'Operation failed'); - return req.callAsJson(array(string()), requestOptions); - } - - /** - * Note: This endpoint is applicable only for on-prem deployments. - * - * To provide details of a table in a schema of a database in Falcon, use this endpoint. - * - * @param database Name of the Falcon database - * @param table Name of the table in Falcon database - * @param schema Name of the schema in Falcon database - * @return Response from the API call - */ - async restapiV2GetTableDetails( - database: string, - table: string, - schema?: string, - requestOptions?: RequestOptions - ): Promise> { - const req = this.createRequest( - 'GET', - '/tspublic/rest/v2/database/table/detail' - ); - const mapped = req.prepareArgs({ - database: [database, string()], - table: [table, string()], - schema: [schema, optional(string())], - }); - req.query('database', mapped.database); - req.query('table', mapped.table); - req.query('schema', mapped.schema); - req.throwOn(500, ErrorResponseError, 'Operation failed'); - return req.callAsJson(unknown(), requestOptions); - } - - /** - * To create a table in Falcon, use this endpoint. - * - * @param body - * @return Response from the API call - */ - async restapiV2CreateTable( - body: TspublicRestV2DatabaseTableCreateRequest, - requestOptions?: RequestOptions - ): Promise> { - const req = this.createRequest( - 'POST', - '/tspublic/rest/v2/database/table/create' - ); - const mapped = req.prepareArgs({ - body: [body, tspublicRestV2DatabaseTableCreateRequestSchema], - }); - req.header('Content-Type', 'application/json'); - req.json(mapped.body); - req.throwOn(500, ErrorResponseError, 'Operation failed'); - return req.callAsJson(createTableResponseSchema, requestOptions); - } - - /** - * To run a TQL statement in Falcon, use this endpoint. You can run only following type of statements - - * Table DDL alter and Table rows update and delete. - * - * @param body - * @return Response from the API call - */ - async restapiV2RunQuery( - body: TspublicRestV2DatabaseTableRunqueryRequest, - requestOptions?: RequestOptions - ): Promise> { - const req = this.createRequest( - 'POST', - '/tspublic/rest/v2/database/table/runquery' - ); - const mapped = req.prepareArgs({ - body: [body, tspublicRestV2DatabaseTableRunqueryRequestSchema], - }); - req.header('Content-Type', 'application/json'); - req.json(mapped.body); - req.throwOn(500, ErrorResponseError, 'Operation failed'); - return req.callAsJson(array(unknown()), requestOptions); - } -} diff --git a/Typescript/src/controllers/groupController.ts b/Typescript/src/controllers/groupController.ts deleted file mode 100644 index 9c1004d59..000000000 --- a/Typescript/src/controllers/groupController.ts +++ /dev/null @@ -1,308 +0,0 @@ -/** - * ThoughtSpot Public REST APILib - * - * This file was automatically generated by APIMATIC v3.0 ( https://www.apimatic.io ). - */ - -import { ApiResponse, RequestOptions } from '../core'; -import { ErrorResponseError } from '../errors/errorResponseError'; -import { GroupResponse, groupResponseSchema } from '../models/groupResponse'; -import { - TspublicRestV2GroupAddgroupRequest, - tspublicRestV2GroupAddgroupRequestSchema, -} from '../models/tspublicRestV2GroupAddgroupRequest'; -import { - TspublicRestV2GroupAddprivilegeRequest, - tspublicRestV2GroupAddprivilegeRequestSchema, -} from '../models/tspublicRestV2GroupAddprivilegeRequest'; -import { - TspublicRestV2GroupAdduserRequest, - tspublicRestV2GroupAdduserRequestSchema, -} from '../models/tspublicRestV2GroupAdduserRequest'; -import { - TspublicRestV2GroupCreateRequest, - tspublicRestV2GroupCreateRequestSchema, -} from '../models/tspublicRestV2GroupCreateRequest'; -import { - TspublicRestV2GroupRemovegroupRequest, - tspublicRestV2GroupRemovegroupRequestSchema, -} from '../models/tspublicRestV2GroupRemovegroupRequest'; -import { - TspublicRestV2GroupRemoveprivilegeRequest, - tspublicRestV2GroupRemoveprivilegeRequestSchema, -} from '../models/tspublicRestV2GroupRemoveprivilegeRequest'; -import { - TspublicRestV2GroupRemoveuserRequest, - tspublicRestV2GroupRemoveuserRequestSchema, -} from '../models/tspublicRestV2GroupRemoveuserRequest'; -import { - TspublicRestV2GroupSearchRequest, - tspublicRestV2GroupSearchRequestSchema, -} from '../models/tspublicRestV2GroupSearchRequest'; -import { - TspublicRestV2GroupUpdateRequest, - tspublicRestV2GroupUpdateRequestSchema, -} from '../models/tspublicRestV2GroupUpdateRequest'; -import { boolean, optional, string, unknown } from '../schema'; -import { BaseController } from './baseController'; - -export class GroupController extends BaseController { - /** - * To get the details of a specific group by name or id, use this endpoint. - * At Least one value needed. When both are given id will be considered to fetch user information. - * - * @param name Name of the group - * @param id The GUID of the group to query. - * @return Response from the API call - */ - async restapiV2GetGroup( - name?: string, - id?: string, - requestOptions?: RequestOptions - ): Promise> { - const req = this.createRequest('GET', '/tspublic/rest/v2/group'); - const mapped = req.prepareArgs({ - name: [name, optional(string())], - id: [id, optional(string())], - }); - req.query('name', mapped.name); - req.query('id', mapped.id); - req.throwOn(500, ErrorResponseError, 'Operation failed'); - return req.callAsJson(groupResponseSchema, requestOptions); - } - - /** - * To programmatically create a group in the ThoughtSpot system, use this API endpoint. Using this API, - * you can create a group and assign privileges and users. For ease of user management and access - * control, ThoughtSpot administrators can create groups and assign privileges to these groups. The - * privileges determine the actions that the users belonging to a group are allowed to do. ThoughtSpot - * also has a default group called ALL_GROUP. When you create new group in ThoughtSpot, they are - * automatically added to ALL_GROUP. You cannot delete the ALL_GROUP or remove members from it. - * - * @param body - * @return Response from the API call - */ - async restapiV2CreateGroup( - body: TspublicRestV2GroupCreateRequest, - requestOptions?: RequestOptions - ): Promise> { - const req = this.createRequest('POST', '/tspublic/rest/v2/group/create'); - const mapped = req.prepareArgs({ - body: [body, tspublicRestV2GroupCreateRequestSchema], - }); - req.header('Content-Type', 'application/json'); - req.json(mapped.body); - req.throwOn(500, ErrorResponseError, 'Operation failed'); - return req.callAsJson(groupResponseSchema, requestOptions); - } - - /** - * You can use this endpoint to programmatically modify an existing user account. - * To modify a user, you require admin user privileges. - * At least one of User Id or username is mandatory. When both are given, then user id will be - * considered and username will be updated - * - * @param body - * @return Response from the API call - */ - async restapiV2UpdateGroup( - body: TspublicRestV2GroupUpdateRequest, - requestOptions?: RequestOptions - ): Promise> { - const req = this.createRequest('PUT', '/tspublic/rest/v2/group/update'); - const mapped = req.prepareArgs({ - body: [body, tspublicRestV2GroupUpdateRequestSchema], - }); - req.header('Content-Type', 'application/json'); - req.json(mapped.body); - req.throwOn(500, ErrorResponseError, 'Operation failed'); - return req.callAsJson(boolean(), requestOptions); - } - - /** - * To remove a group from the ThoughtSpot system, send a DELETE request to this endpoint. At Least one - * value needed. When both are given user id will be considered to fetch user information. - * - * @param name Name of the group. - * @param id The GUID of the group - * @return Response from the API call - */ - async restapiV2DeleteGroup( - name?: string, - id?: string, - requestOptions?: RequestOptions - ): Promise> { - const req = this.createRequest('DELETE', '/tspublic/rest/v2/group/delete'); - const mapped = req.prepareArgs({ - name: [name, optional(string())], - id: [id, optional(string())], - }); - req.query('name', mapped.name); - req.query('id', mapped.id); - req.throwOn(500, ErrorResponseError, 'Operation failed'); - return req.callAsJson(boolean(), requestOptions); - } - - /** - * To programmatically add privileges to an existing group, use API endpoint. - * When you assign privileges to a group, all the users under to this group inherits the privileges - * assigned to that group. - * At least one of id or name of group is required. When both are given user id will be considered. - * - * @param body - * @return Response from the API call - */ - async restapiV2AddPrivilegesToGroup( - body: TspublicRestV2GroupAddprivilegeRequest, - requestOptions?: RequestOptions - ): Promise> { - const req = this.createRequest( - 'PUT', - '/tspublic/rest/v2/group/addprivilege' - ); - const mapped = req.prepareArgs({ - body: [body, tspublicRestV2GroupAddprivilegeRequestSchema], - }); - req.header('Content-Type', 'application/json'); - req.json(mapped.body); - req.throwOn(500, ErrorResponseError, 'Operation failed'); - return req.callAsJson(boolean(), requestOptions); - } - - /** - * To programmatically remove privileges from a group, use API endpoint. The API removes only the - * privilege association. It does not delete the privilege or group from the Thoughtspot system. At - * least one of id or name of group is required. When both are given user id will be considered. - * - * @param body - * @return Response from the API call - */ - async restapiV2RemovePrivilegesFromGroup( - body: TspublicRestV2GroupRemoveprivilegeRequest, - requestOptions?: RequestOptions - ): Promise> { - const req = this.createRequest( - 'PUT', - '/tspublic/rest/v2/group/removeprivilege' - ); - const mapped = req.prepareArgs({ - body: [body, tspublicRestV2GroupRemoveprivilegeRequestSchema], - }); - req.header('Content-Type', 'application/json'); - req.json(mapped.body); - req.throwOn(500, ErrorResponseError, 'Operation failed'); - return req.callAsJson(boolean(), requestOptions); - } - - /** - * To programmatically add existing ThoughtSpot users to a group, use this API endpoint. When you - * assign users to a group, the users inherits the privileges assigned to that group. At least one of - * id or name of the group is required. When both are given user id will be considered. - * - * @param body - * @return Response from the API call - */ - async restapiV2AddUsersToGroup( - body: TspublicRestV2GroupAdduserRequest, - requestOptions?: RequestOptions - ): Promise> { - const req = this.createRequest('PUT', '/tspublic/rest/v2/group/adduser'); - const mapped = req.prepareArgs({ - body: [body, tspublicRestV2GroupAdduserRequestSchema], - }); - req.header('Content-Type', 'application/json'); - req.json(mapped.body); - req.throwOn(500, ErrorResponseError, 'Operation failed'); - return req.callAsJson(boolean(), requestOptions); - } - - /** - * To programmatically remove users from a group, use API endpoint.The API removes only the user - * association. It does not delete the users or group from the Thoughtspot system. At least one of id - * or name of group is required. When both are given user id will be considered. - * - * @param body - * @return Response from the API call - */ - async restapiV2RemoveUsersFromGroup( - body: TspublicRestV2GroupRemoveuserRequest, - requestOptions?: RequestOptions - ): Promise> { - const req = this.createRequest('PUT', '/tspublic/rest/v2/group/removeuser'); - const mapped = req.prepareArgs({ - body: [body, tspublicRestV2GroupRemoveuserRequestSchema], - }); - req.header('Content-Type', 'application/json'); - req.json(mapped.body); - req.throwOn(500, ErrorResponseError, 'Operation failed'); - return req.callAsJson(boolean(), requestOptions); - } - - /** - * To programmatically add existing groups to a group, use API endpoint. When you assign groups to a - * group, the group inherits the privileges assigned to those groups. At least one of id or name of - * group is required. When both are given user id will be considered. - * - * @param body - * @return Response from the API call - */ - async restapiV2AddGroupsToGroup( - body: TspublicRestV2GroupAddgroupRequest, - requestOptions?: RequestOptions - ): Promise> { - const req = this.createRequest('PUT', '/tspublic/rest/v2/group/addgroup'); - const mapped = req.prepareArgs({ - body: [body, tspublicRestV2GroupAddgroupRequestSchema], - }); - req.header('Content-Type', 'application/json'); - req.json(mapped.body); - req.throwOn(500, ErrorResponseError, 'Operation failed'); - return req.callAsJson(boolean(), requestOptions); - } - - /** - * To programmatically remove groups from a group, use API endpoint.The API removes only the group - * association. It does not delete the group from the Thoughtspot system. At least one of id or name of - * group is required. When both are given user id will be considered. - * - * @param body - * @return Response from the API call - */ - async restapiV2RemoveGroupsFromGroup( - body: TspublicRestV2GroupRemovegroupRequest, - requestOptions?: RequestOptions - ): Promise> { - const req = this.createRequest( - 'PUT', - '/tspublic/rest/v2/group/removegroup' - ); - const mapped = req.prepareArgs({ - body: [body, tspublicRestV2GroupRemovegroupRequestSchema], - }); - req.header('Content-Type', 'application/json'); - req.json(mapped.body); - req.throwOn(500, ErrorResponseError, 'Operation failed'); - return req.callAsJson(boolean(), requestOptions); - } - - /** - * To get the details of a specific group account or all groups in the ThoughtSpot system, use this end - * point. - * - * @param body - * @return Response from the API call - */ - async restapiV2SearchGroups( - body: TspublicRestV2GroupSearchRequest, - requestOptions?: RequestOptions - ): Promise> { - const req = this.createRequest('POST', '/tspublic/rest/v2/group/search'); - const mapped = req.prepareArgs({ - body: [body, tspublicRestV2GroupSearchRequestSchema], - }); - req.header('Content-Type', 'application/json'); - req.json(mapped.body); - req.throwOn(500, ErrorResponseError, 'Operation failed'); - return req.callAsJson(unknown(), requestOptions); - } -} diff --git a/Typescript/src/controllers/logsController.ts b/Typescript/src/controllers/logsController.ts deleted file mode 100644 index 3d03aa7c2..000000000 --- a/Typescript/src/controllers/logsController.ts +++ /dev/null @@ -1,54 +0,0 @@ -/** - * ThoughtSpot Public REST APILib - * - * This file was automatically generated by APIMATIC v3.0 ( https://www.apimatic.io ). - */ - -import { ApiResponse, RequestOptions } from '../core'; -import { ErrorResponseError } from '../errors/errorResponseError'; -import { LogsResponse, logsResponseSchema } from '../models/logsResponse'; -import { TopicEnum, topicEnumSchema } from '../models/topicEnum'; -import { optional, string } from '../schema'; -import { BaseController } from './baseController'; - -export class LogsController extends BaseController { - /** - * Note: This endpoint is applicable only for SAAS deployments. - * - * The ThoughtSpot log streaming service API allows you to programmatically get a security audit event - * log from the ThoughtSpot system. - * - * To use this API, make sure you have admin user privileges. - * - * ThoughtSpot cloud deployments allow you to collect security audit events and send them to your - * Security information and event management (SIEM) application in real-time. - * - * These events can help your security operations personnel to detect potential security threats or - * compromised user accounts in your organization. - * - * @param topic Type of the log - * @param fromEpoch The EPOCH time in milliseconds to set the start time for streaming logs. Example: - * To set the timestamp as June 1, 2021 8 am, specify 1622534400000. - * @param toEpoch The EPOCH time in milliseconds to set the end time for streaming logs. Example: - * To set the timestamp as July 1, 2021, 8 am, specify 1625126400000. - * @return Response from the API call - */ - async restapiV2GetLogEvents( - topic: TopicEnum, - fromEpoch?: string, - toEpoch?: string, - requestOptions?: RequestOptions - ): Promise> { - const req = this.createRequest('GET', '/tspublic/rest/v2/logs/events'); - const mapped = req.prepareArgs({ - topic: [topic, topicEnumSchema], - fromEpoch: [fromEpoch, optional(string())], - toEpoch: [toEpoch, optional(string())], - }); - req.query('topic', mapped.topic); - req.query('fromEpoch', mapped.fromEpoch); - req.query('toEpoch', mapped.toEpoch); - req.throwOn(500, ErrorResponseError, 'Operation failed'); - return req.callAsJson(logsResponseSchema, requestOptions); - } -} diff --git a/Typescript/src/controllers/materializationController.ts b/Typescript/src/controllers/materializationController.ts deleted file mode 100644 index 3735d634c..000000000 --- a/Typescript/src/controllers/materializationController.ts +++ /dev/null @@ -1,39 +0,0 @@ -/** - * ThoughtSpot Public REST APILib - * - * This file was automatically generated by APIMATIC v3.0 ( https://www.apimatic.io ). - */ - -import { ApiResponse, RequestOptions } from '../core'; -import { ErrorResponseError } from '../errors/errorResponseError'; -import { - TspublicRestV2MaterializationRefreshviewRequest, - tspublicRestV2MaterializationRefreshviewRequestSchema, -} from '../models/tspublicRestV2MaterializationRefreshviewRequest'; -import { unknown } from '../schema'; -import { BaseController } from './baseController'; - -export class MaterializationController extends BaseController { - /** - * Use this endpoint to refresh data in the materialized view by running the query associated with it - * - * @param body - * @return Response from the API call - */ - async restapiV2RefreshMaterializedView( - body: TspublicRestV2MaterializationRefreshviewRequest, - requestOptions?: RequestOptions - ): Promise> { - const req = this.createRequest( - 'PUT', - '/tspublic/rest/v2/materialization/refreshview' - ); - const mapped = req.prepareArgs({ - body: [body, tspublicRestV2MaterializationRefreshviewRequestSchema], - }); - req.header('Content-Type', 'application/json'); - req.json(mapped.body); - req.throwOn(500, ErrorResponseError, 'Operation failed'); - return req.callAsJson(unknown(), requestOptions); - } -} diff --git a/Typescript/src/controllers/metadataController.ts b/Typescript/src/controllers/metadataController.ts deleted file mode 100644 index 5f518e7d8..000000000 --- a/Typescript/src/controllers/metadataController.ts +++ /dev/null @@ -1,569 +0,0 @@ -/** - * ThoughtSpot Public REST APILib - * - * This file was automatically generated by APIMATIC v3.0 ( https://www.apimatic.io ). - */ - -import { ApiResponse, RequestOptions } from '../core'; -import { ErrorResponseError } from '../errors/errorResponseError'; -import { - HomeLiveboardResponse, - homeLiveboardResponseSchema, -} from '../models/homeLiveboardResponse'; -import { - MetadataTagResponse, - metadataTagResponseSchema, -} from '../models/metadataTagResponse'; -import { - TspublicRestV2MetadataDependencyRequest, - tspublicRestV2MetadataDependencyRequestSchema, -} from '../models/tspublicRestV2MetadataDependencyRequest'; -import { - TspublicRestV2MetadataDetailSearchRequest, - tspublicRestV2MetadataDetailSearchRequestSchema, -} from '../models/tspublicRestV2MetadataDetailSearchRequest'; -import { - TspublicRestV2MetadataFavoriteAssignRequest, - tspublicRestV2MetadataFavoriteAssignRequestSchema, -} from '../models/tspublicRestV2MetadataFavoriteAssignRequest'; -import { - TspublicRestV2MetadataFavoriteUnassignRequest, - tspublicRestV2MetadataFavoriteUnassignRequestSchema, -} from '../models/tspublicRestV2MetadataFavoriteUnassignRequest'; -import { - TspublicRestV2MetadataHeaderSearchRequest, - tspublicRestV2MetadataHeaderSearchRequestSchema, -} from '../models/tspublicRestV2MetadataHeaderSearchRequest'; -import { - TspublicRestV2MetadataHomeliveboardAssignRequest, - tspublicRestV2MetadataHomeliveboardAssignRequestSchema, -} from '../models/tspublicRestV2MetadataHomeliveboardAssignRequest'; -import { - TspublicRestV2MetadataHomeliveboardUnassignRequest, - tspublicRestV2MetadataHomeliveboardUnassignRequestSchema, -} from '../models/tspublicRestV2MetadataHomeliveboardUnassignRequest'; -import { - TspublicRestV2MetadataTagAssignRequest, - tspublicRestV2MetadataTagAssignRequestSchema, -} from '../models/tspublicRestV2MetadataTagAssignRequest'; -import { - TspublicRestV2MetadataTagCreateRequest, - tspublicRestV2MetadataTagCreateRequestSchema, -} from '../models/tspublicRestV2MetadataTagCreateRequest'; -import { - TspublicRestV2MetadataTagUnassignRequest, - tspublicRestV2MetadataTagUnassignRequestSchema, -} from '../models/tspublicRestV2MetadataTagUnassignRequest'; -import { - TspublicRestV2MetadataTagUpdateRequest, - tspublicRestV2MetadataTagUpdateRequestSchema, -} from '../models/tspublicRestV2MetadataTagUpdateRequest'; -import { - TspublicRestV2MetadataTmlExportRequest, - tspublicRestV2MetadataTmlExportRequestSchema, -} from '../models/tspublicRestV2MetadataTmlExportRequest'; -import { - TspublicRestV2MetadataTmlImportRequest, - tspublicRestV2MetadataTmlImportRequestSchema, -} from '../models/tspublicRestV2MetadataTmlImportRequest'; -import { Type4Enum, type4EnumSchema } from '../models/type4Enum'; -import { Type5Enum, type5EnumSchema } from '../models/type5Enum'; -import { array, boolean, optional, string, unknown } from '../schema'; -import { BaseController } from './baseController'; - -export class MetadataController extends BaseController { - /** - * To get details of a specific tag, use this endpoint. At least one of id or name of tag is required. - * When both are given, then id will be considered. - * - * @param name Name of the tag - * @param id The GUID of the tag - * @return Response from the API call - */ - async restapiV2GetTag( - name?: string, - id?: string, - requestOptions?: RequestOptions - ): Promise> { - const req = this.createRequest('GET', '/tspublic/rest/v2/metadata/tag'); - const mapped = req.prepareArgs({ - name: [name, optional(string())], - id: [id, optional(string())], - }); - req.query('name', mapped.name); - req.query('id', mapped.id); - req.throwOn(500, ErrorResponseError, 'Operation failed'); - return req.callAsJson(metadataTagResponseSchema, requestOptions); - } - - /** - * To get the name and id of liveboard that is set as a home liveboard for a user, use this endpoint. - * At least one of user id or username is required. When both are given, then id will be considered. - * - * @param userName Name of the tag - * @param userId The GUID of the tag - * @return Response from the API call - */ - async restapiV2GetHomeLiveboard( - userName?: string, - userId?: string, - requestOptions?: RequestOptions - ): Promise> { - const req = this.createRequest( - 'GET', - '/tspublic/rest/v2/metadata/homeliveboard' - ); - const mapped = req.prepareArgs({ - userName: [userName, optional(string())], - userId: [userId, optional(string())], - }); - req.query('userName', mapped.userName); - req.query('userId', mapped.userId); - req.throwOn(500, ErrorResponseError, 'Operation failed'); - return req.callAsJson(homeLiveboardResponseSchema, requestOptions); - } - - /** - * To get header details for metadata objects, use this endpoint. You can provide as input selective - * fields to get the data for. - * - * @param body - * @return Response from the API call - */ - async restapiV2SearchObjectHeader( - body: TspublicRestV2MetadataHeaderSearchRequest, - requestOptions?: RequestOptions - ): Promise> { - const req = this.createRequest( - 'POST', - '/tspublic/rest/v2/metadata/header/search' - ); - const mapped = req.prepareArgs({ - body: [body, tspublicRestV2MetadataHeaderSearchRequestSchema], - }); - req.header('Content-Type', 'application/json'); - req.json(mapped.body); - req.throwOn(500, ErrorResponseError, 'Operation failed'); - return req.callAsJson(unknown(), requestOptions); - } - - /** - * Use this endpoint to get header details of visualization charts for a given liveboard or answer. At - * least one of id or name of liveboard or answer is required. When both are given, then id will be - * considered. - * - * @param id The GUID of the liveboard or answer - * @return Response from the API call - */ - async restapiV2GetObjectVisualizationHeader( - id: string, - requestOptions?: RequestOptions - ): Promise> { - const req = this.createRequest( - 'GET', - '/tspublic/rest/v2/metadata/vizheader' - ); - const mapped = req.prepareArgs({ id: [id, string()] }); - req.query('id', mapped.id); - req.throwOn(500, ErrorResponseError, 'Operation failed'); - return req.callAsJson(array(unknown()), requestOptions); - } - - /** - * Use this endpoint to get full details of metadata objects - * - * @param type Type of the metadata object being searched. - * @param id A JSON array of GUIDs of the objects. - * @return Response from the API call - */ - async restapiV2GetObjectDetail( - type: Type4Enum, - id: string[], - requestOptions?: RequestOptions - ): Promise> { - const req = this.createRequest('GET', '/tspublic/rest/v2/metadata/detail'); - const mapped = req.prepareArgs({ - type: [type, type4EnumSchema], - id: [id, array(string())], - }); - req.query('type', mapped.type); - req.query('id', mapped.id); - req.throwOn(500, ErrorResponseError, 'Operation failed'); - return req.callAsJson(unknown(), requestOptions); - } - - /** - * To get header detail of a metadata object, use this endpoint. You can provide as input selective - * fields to get the data for. - * - * @param type Type of the metadata object being searched. - * @param id GUID of the metadata object - * @param outputFields Array of header field names that need to be included in the header response - * @return Response from the API call - */ - async restapiV2GetObjectHeader( - type: Type5Enum, - id: string, - outputFields?: string[], - requestOptions?: RequestOptions - ): Promise> { - const req = this.createRequest('GET', '/tspublic/rest/v2/metadata/header'); - const mapped = req.prepareArgs({ - type: [type, type5EnumSchema], - id: [id, string()], - outputFields: [outputFields, optional(array(string()))], - }); - req.query('type', mapped.type); - req.query('id', mapped.id); - req.query('outputFields', mapped.outputFields); - req.throwOn(500, ErrorResponseError, 'Operation failed'); - return req.callAsJson(unknown(), requestOptions); - } - - /** - * Use this endpoint to get full details of metadata objects - * - * @param body - * @return Response from the API call - */ - async restapiV2SearchObjectDetail( - body: TspublicRestV2MetadataDetailSearchRequest, - requestOptions?: RequestOptions - ): Promise> { - const req = this.createRequest( - 'POST', - '/tspublic/rest/v2/metadata/detail/search' - ); - const mapped = req.prepareArgs({ - body: [body, tspublicRestV2MetadataDetailSearchRequestSchema], - }); - req.header('Content-Type', 'application/json'); - req.json(mapped.body); - req.throwOn(500, ErrorResponseError, 'Operation failed'); - return req.callAsJson(unknown(), requestOptions); - } - - /** - * To programmatically create tags, use this endpoint - * - * @param body - * @return Response from the API call - */ - async restapiV2CreateTag( - body: TspublicRestV2MetadataTagCreateRequest, - requestOptions?: RequestOptions - ): Promise> { - const req = this.createRequest( - 'POST', - '/tspublic/rest/v2/metadata/tag/create' - ); - const mapped = req.prepareArgs({ - body: [body, tspublicRestV2MetadataTagCreateRequestSchema], - }); - req.header('Content-Type', 'application/json'); - req.json(mapped.body); - req.throwOn(500, ErrorResponseError, 'Operation failed'); - return req.callAsJson(metadataTagResponseSchema, requestOptions); - } - - /** - * To programmatically update tags, use this endpoint. At least one of id or name of tag is required. - * When both are given, then id will be considered. - * - * @param body - * @return Response from the API call - */ - async restapiV2UpdateTag( - body: TspublicRestV2MetadataTagUpdateRequest, - requestOptions?: RequestOptions - ): Promise> { - const req = this.createRequest( - 'PUT', - '/tspublic/rest/v2/metadata/tag/update' - ); - const mapped = req.prepareArgs({ - body: [body, tspublicRestV2MetadataTagUpdateRequestSchema], - }); - req.header('Content-Type', 'application/json'); - req.json(mapped.body); - req.throwOn(500, ErrorResponseError, 'Operation failed'); - return req.callAsJson(boolean(), requestOptions); - } - - /** - * To programmatically delete tags, use this endpoint. At least one of id or name of tag is required. - * When both are given, then id will be considered. - * - * @param name Name of the tag - * @param id The GUID of the tag - * @return Response from the API call - */ - async restapiV2DeleteTag( - name?: string, - id?: string, - requestOptions?: RequestOptions - ): Promise> { - const req = this.createRequest( - 'DELETE', - '/tspublic/rest/v2/metadata/tag/delete' - ); - const mapped = req.prepareArgs({ - name: [name, optional(string())], - id: [id, optional(string())], - }); - req.query('name', mapped.name); - req.query('id', mapped.id); - req.throwOn(500, ErrorResponseError, 'Operation failed'); - return req.callAsJson(boolean(), requestOptions); - } - - /** - * To programmatically assign tags to a metadata object, such as a liveboard, search answer, table, - * worksheet, or view, use this endpoint. At least one of id or name of tag is required. When both are - * given, then id will be considered. - * - * @param body - * @return Response from the API call - */ - async restapiV2AssignTag( - body: TspublicRestV2MetadataTagAssignRequest, - requestOptions?: RequestOptions - ): Promise> { - const req = this.createRequest( - 'PUT', - '/tspublic/rest/v2/metadata/tag/assign' - ); - const mapped = req.prepareArgs({ - body: [body, tspublicRestV2MetadataTagAssignRequestSchema], - }); - req.header('Content-Type', 'application/json'); - req.json(mapped.body); - req.throwOn(500, ErrorResponseError, 'Operation failed'); - return req.callAsJson(boolean(), requestOptions); - } - - /** - * To programmatically unassign tags to a metadata object, such as a liveboard, search answer, table, - * worksheet, or view, use this endpoint. At least one of id or name of tag is required. When both are - * given, then id will be considered. - * - * @param body - * @return Response from the API call - */ - async restapiV2UnassignTag( - body: TspublicRestV2MetadataTagUnassignRequest, - requestOptions?: RequestOptions - ): Promise> { - const req = this.createRequest( - 'PUT', - '/tspublic/rest/v2/metadata/tag/unassign' - ); - const mapped = req.prepareArgs({ - body: [body, tspublicRestV2MetadataTagUnassignRequestSchema], - }); - req.header('Content-Type', 'application/json'); - req.json(mapped.body); - req.throwOn(500, ErrorResponseError, 'Operation failed'); - return req.callAsJson(boolean(), requestOptions); - } - - /** - * To programmatically assign objects to favorites for a given user account, use this endpoint. At - * least one of user id or username is required. When both are given, then id will be considered. - * - * @param body - * @return Response from the API call - */ - async restapiV2AssignFavorite( - body: TspublicRestV2MetadataFavoriteAssignRequest, - requestOptions?: RequestOptions - ): Promise> { - const req = this.createRequest( - 'PUT', - '/tspublic/rest/v2/metadata/favorite/assign' - ); - const mapped = req.prepareArgs({ - body: [body, tspublicRestV2MetadataFavoriteAssignRequestSchema], - }); - req.header('Content-Type', 'application/json'); - req.json(mapped.body); - req.throwOn(500, ErrorResponseError, 'Operation failed'); - return req.callAsJson(boolean(), requestOptions); - } - - /** - * To programmatically unassign objects to favorites for a given user account, use this endpoint. At - * least one of user id or username is required. When both are given, then id will be considered. - * - * @param body - * @return Response from the API call - */ - async restapiV2UnassignFavorite( - body: TspublicRestV2MetadataFavoriteUnassignRequest, - requestOptions?: RequestOptions - ): Promise> { - const req = this.createRequest( - 'PUT', - '/tspublic/rest/v2/metadata/favorite/unassign' - ); - const mapped = req.prepareArgs({ - body: [body, tspublicRestV2MetadataFavoriteUnassignRequestSchema], - }); - req.header('Content-Type', 'application/json'); - req.json(mapped.body); - req.throwOn(500, ErrorResponseError, 'Operation failed'); - return req.callAsJson(boolean(), requestOptions); - } - - /** - * To assign a specific liveboard as a home liveboard for a user, use this endpoint. At least one of - * user id or username is required. When both are given, then id will be considered. - * - * @param body - * @return Response from the API call - */ - async restapiV2AssignHomeLiveboard( - body: TspublicRestV2MetadataHomeliveboardAssignRequest, - requestOptions?: RequestOptions - ): Promise> { - const req = this.createRequest( - 'PUT', - '/tspublic/rest/v2/metadata/homeliveboard/assign' - ); - const mapped = req.prepareArgs({ - body: [body, tspublicRestV2MetadataHomeliveboardAssignRequestSchema], - }); - req.header('Content-Type', 'application/json'); - req.json(mapped.body); - req.throwOn(500, ErrorResponseError, 'Operation failed'); - return req.callAsJson(boolean(), requestOptions); - } - - /** - * To unassign the home liveboard set for a user, use this endpoint. At least one of user id or - * username is required. When both are given, then id will be considered. - * - * @param body - * @return Response from the API call - */ - async restapiV2UnassignHomeLiveboard( - body: TspublicRestV2MetadataHomeliveboardUnassignRequest, - requestOptions?: RequestOptions - ): Promise> { - const req = this.createRequest( - 'PUT', - '/tspublic/rest/v2/metadata/homeliveboard/unassign' - ); - const mapped = req.prepareArgs({ - body: [body, tspublicRestV2MetadataHomeliveboardUnassignRequestSchema], - }); - req.header('Content-Type', 'application/json'); - req.json(mapped.body); - req.throwOn(500, ErrorResponseError, 'Operation failed'); - return req.callAsJson(boolean(), requestOptions); - } - - /** - * To export ThoughtSpot objects represented in ThoughtSpot Modeling Language (TML), use this endpoint - * - * @param body - * @return Response from the API call - */ - async restapiV2ExportObjectTML( - body: TspublicRestV2MetadataTmlExportRequest, - requestOptions?: RequestOptions - ): Promise> { - const req = this.createRequest( - 'POST', - '/tspublic/rest/v2/metadata/tml/export' - ); - const mapped = req.prepareArgs({ - body: [body, tspublicRestV2MetadataTmlExportRequestSchema], - }); - req.header('Content-Type', 'application/json'); - req.json(mapped.body); - req.throwOn(500, ErrorResponseError, 'Operation failed'); - return req.callAsJson(unknown(), requestOptions); - } - - /** - * To import ThoughtSpot objects represented in ThoughtSpot Modeling Language (TML), use this endpoint - * - * @param body - * @return Response from the API call - */ - async restapiV2ImportObjectTML( - body: TspublicRestV2MetadataTmlImportRequest, - requestOptions?: RequestOptions - ): Promise> { - const req = this.createRequest( - 'POST', - '/tspublic/rest/v2/metadata/tml/import' - ); - const mapped = req.prepareArgs({ - body: [body, tspublicRestV2MetadataTmlImportRequestSchema], - }); - req.header('Content-Type', 'application/json'); - req.json(mapped.body); - req.throwOn(500, ErrorResponseError, 'Operation failed'); - return req.callAsJson(unknown(), requestOptions); - } - - /** - * Use this endpoint to delete the metadata objects - * - * @param type Type of the metadata object being searched - * @param id A JSON array of GUIDs of the objects - * @return Response from the API call - */ - async restapiV2DeleteObject( - type: Type4Enum, - id: string[], - requestOptions?: RequestOptions - ): Promise> { - const req = this.createRequest( - 'DELETE', - '/tspublic/rest/v2/metadata/delete' - ); - const mapped = req.prepareArgs({ - type: [type, type4EnumSchema], - id: [id, array(string())], - }); - req.query('type', mapped.type); - req.query('id', mapped.id); - req.throwOn(500, ErrorResponseError, 'Operation failed'); - return req.callAsJson(boolean(), requestOptions); - } - - /** - * To query the details of dependent objects and associate objects as dependents, you can use this API. - * Dependency is defined as relation between referenced and referencing objects. A referencing object - * is said to have a dependency on a referenced object, if the referenced object cannot be deleted - * without first deleting the referencing object. For example, consider a worksheet 'W1' that has a - * derived logical column 'C1' that has a reference to a base logical column 'C2'. This can be shown - * diagramatically as: W1-->C1-->C2. W1 has a dependency on C2 i.e. W1 is a referencing object and C2 - * is a referenced object. It is not possible to delete C2 without first deleting W1 because deletion - * of C2 will be prevented by the relationship between W1's column C1 and C2. Similarly C1 is said to - * have a dependency on C2 i.e. C1 is a referencing object and C2 is a referenced object. It is not - * possible to delete C2 without first deleting C1 - * - * @param body - * @return Response from the API call - */ - async restapiV2GetObjectDependency( - body: TspublicRestV2MetadataDependencyRequest, - requestOptions?: RequestOptions - ): Promise> { - const req = this.createRequest( - 'POST', - '/tspublic/rest/v2/metadata/dependency' - ); - const mapped = req.prepareArgs({ - body: [body, tspublicRestV2MetadataDependencyRequestSchema], - }); - req.header('Content-Type', 'application/json'); - req.json(mapped.body); - req.throwOn(500, ErrorResponseError, 'Operation failed'); - return req.callAsJson(unknown(), requestOptions); - } -} diff --git a/Typescript/src/controllers/orgController.ts b/Typescript/src/controllers/orgController.ts deleted file mode 100644 index e68b6ffc8..000000000 --- a/Typescript/src/controllers/orgController.ts +++ /dev/null @@ -1,152 +0,0 @@ -/** - * ThoughtSpot Public REST APILib - * - * This file was automatically generated by APIMATIC v3.0 ( https://www.apimatic.io ). - */ - -import { ApiResponse, RequestOptions } from '../core'; -import { ErrorResponseError } from '../errors/errorResponseError'; -import { OrgsResponse, orgsResponseSchema } from '../models/orgsResponse'; -import { - TspublicRestV2OrgCreateRequest, - tspublicRestV2OrgCreateRequestSchema, -} from '../models/tspublicRestV2OrgCreateRequest'; -import { - TspublicRestV2OrgSearchRequest, - tspublicRestV2OrgSearchRequestSchema, -} from '../models/tspublicRestV2OrgSearchRequest'; -import { - TspublicRestV2OrgUpdateRequest, - tspublicRestV2OrgUpdateRequestSchema, -} from '../models/tspublicRestV2OrgUpdateRequest'; -import { array, boolean, number, optional, string } from '../schema'; -import { BaseController } from './baseController'; - -export class OrgController extends BaseController { - /** - * To get the details of a specific organization by name or id, use this endpoint. - * - * At least one value needed. When both are given,then id will be considered to fetch organization - * information. - * - * Requires Administration privilege for tenant. - * - * @param name Name of the organization. - * @param id The ID of the organization. - * @return Response from the API call - */ - async restapiV2GetOrg( - name?: string, - id?: number, - requestOptions?: RequestOptions - ): Promise> { - const req = this.createRequest('GET', '/tspublic/rest/v2/org'); - const mapped = req.prepareArgs({ - name: [name, optional(string())], - id: [id, optional(number())], - }); - req.query('name', mapped.name); - req.query('id', mapped.id); - req.throwOn(500, ErrorResponseError, 'Operation failed'); - return req.callAsJson(orgsResponseSchema, requestOptions); - } - - /** - * To programmatically create an organization in the ThoughtSpot system, use this API endpoint. - * - * Requires Administration privilege for tenant. - * - * @param body - * @return Response from the API call - */ - async restapiV2CreateOrg( - body: TspublicRestV2OrgCreateRequest, - requestOptions?: RequestOptions - ): Promise> { - const req = this.createRequest('POST', '/tspublic/rest/v2/org/create'); - const mapped = req.prepareArgs({ - body: [body, tspublicRestV2OrgCreateRequestSchema], - }); - req.header('Content-Type', 'application/json'); - req.json(mapped.body); - req.throwOn(500, ErrorResponseError, 'Operation failed'); - return req.callAsJson(orgsResponseSchema, requestOptions); - } - - /** - * You can use this endpoint to programmatically modify an existing org. - * - * Provide name or id of the organization to update the properties. When both id and name are given, - * then id will be considered and name of the organization will be updated. - * - * Requires Administration privilege for tenant. - * - * @param body - * @return Response from the API call - */ - async restapiV2UpdateOrg( - body: TspublicRestV2OrgUpdateRequest, - requestOptions?: RequestOptions - ): Promise> { - const req = this.createRequest('PUT', '/tspublic/rest/v2/org/update'); - const mapped = req.prepareArgs({ - body: [body, tspublicRestV2OrgUpdateRequestSchema], - }); - req.header('Content-Type', 'application/json'); - req.json(mapped.body); - req.throwOn(500, ErrorResponseError, 'Operation failed'); - return req.callAsJson(orgsResponseSchema, requestOptions); - } - - /** - * To remove an organization from the ThoughtSpot system, send a DELETE request to this endpoint. - * - * At least one value is needed. When both id and name are given, then id will be considered. - * - * Requires Administration privilege for tenant. - * - * @param name Name of the organization. - * @param id The ID of the organization. - * @return Response from the API call - */ - async restapiV2DeleteOrg( - name?: string, - id?: number, - requestOptions?: RequestOptions - ): Promise> { - const req = this.createRequest('DELETE', '/tspublic/rest/v2/org/delete'); - const mapped = req.prepareArgs({ - name: [name, optional(string())], - id: [id, optional(number())], - }); - req.query('name', mapped.name); - req.query('id', mapped.id); - req.throwOn(500, ErrorResponseError, 'Operation failed'); - return req.callAsJson(boolean(), requestOptions); - } - - /** - * To get the details of a specific organization or all organizations in the ThoughtSpot system use - * this end point. - * - * If no input is provided, then all organizations are included in the response. - * - * Requires Administration privilege for tenant. - * - * @param body - * @return Response from the API call - */ - async restapiV2SearchOrgs( - body: TspublicRestV2OrgSearchRequest, - requestOptions?: RequestOptions - ): Promise> { - const req = this.createRequest('POST', '/tspublic/rest/v2/org/search'); - const mapped = req.prepareArgs({ - body: [body, tspublicRestV2OrgSearchRequestSchema], - }); - req.header('Content-Type', 'application/json'); - req.json(mapped.body); - req.throwOn(500, ErrorResponseError, 'Operation failed'); - return req.callAsJson(array(orgsResponseSchema), requestOptions); - } -} diff --git a/Typescript/src/controllers/reportController.ts b/Typescript/src/controllers/reportController.ts deleted file mode 100644 index 168202bec..000000000 --- a/Typescript/src/controllers/reportController.ts +++ /dev/null @@ -1,97 +0,0 @@ -/** - * ThoughtSpot Public REST APILib - * - * This file was automatically generated by APIMATIC v3.0 ( https://www.apimatic.io ). - */ - -import { ApiResponse, RequestOptions } from '../core'; -import { ErrorResponseError } from '../errors/errorResponseError'; -import { Type16Enum, type16EnumSchema } from '../models/type16Enum'; -import { array, optional, string, unknown } from '../schema'; -import { BaseController } from './baseController'; - -export class ReportController extends BaseController { - /** - * To programmatically download Answer data as a file, use this endpoint. - * - * The PDF will download data in the tabular format even if Answer is saved as chart. - * - * @param id GUID of the Answer to download. - * @param type Type of file to be generated. - * @return Response from the API call - */ - async restapiV2AnswerReport( - id: string, - type: Type16Enum, - requestOptions?: RequestOptions - ): Promise> { - const req = this.createRequest('GET', '/tspublic/rest/v2/report/answer'); - const mapped = req.prepareArgs({ - id: [id, string()], - type: [type, type16EnumSchema], - }); - req.query('id', mapped.id); - req.query('type', mapped.type); - req.throwOn(500, ErrorResponseError, 'Operation failed'); - return req.callAsJson(unknown(), requestOptions); - } - - /** - * To programmatically download Liveboard data or specific Visualization data from Liveboard as a file, - * use this endpoint - * - * @param type Type of file to be generated. Valid values: CSV/XLSX/PDF/PNG. - * @param id GUID of the Liveboard to download. This field is considered only when no - * input is provided for transientContent field. - * @param vizId JSON Array of GUIDs of the visualizations in the Liveboard to be included - * in the downloaded file. For CSV, XLSX and PNG file download, visualization - * id is mandatory. CSV and XLSX is valid only for visualization of type table - * and PNG is valid for charts. Only one value will be accepted for these - * formats. If multiple values are provided then first value in the array will - * be considered. - * @param transientContent If you have embedded ThoughtSpot in your host application, and you want to - * download Liveboards with unsaved changes as a file, pass the transient - * content from the browser fetch request, using the - * getExportRequestForCurrentPinboard method. For more information, see https: - * //developers.thoughtspot.com/docs/?pageid=liveboard-export-api#transient- - * pinboard. - * @param runtimeFilter If you have embedded ThoughtSpot in your host application, and you want to - * download Liveboards with unsaved changes as a file, pass the transient - * content from the browser fetch request, using the - * getExportRequestForCurrentPinboard method. For more information, see https: - * //developers.thoughtspot.com/docs/?pageid=liveboard-export-api#transient- - * pinboard . - * @param runtimeSort JSON object which provides columns to sort the data at the time of data - * retrieval. Example: {"sortCol1":"region","asc1":true,"sortCol2":"date"} - * For more information, see https://developers.thoughtspot.com/docs/? - * pageid=runtime-filters - * @return Response from the API call - */ - async restapiV2LiveboardReport( - type: Type16Enum, - id?: string, - vizId?: string[], - transientContent?: string, - runtimeFilter?: string, - runtimeSort?: string, - requestOptions?: RequestOptions - ): Promise> { - const req = this.createRequest('GET', '/tspublic/rest/v2/report/liveboard'); - const mapped = req.prepareArgs({ - type: [type, type16EnumSchema], - id: [id, optional(string())], - vizId: [vizId, optional(array(string()))], - transientContent: [transientContent, optional(string())], - runtimeFilter: [runtimeFilter, optional(string())], - runtimeSort: [runtimeSort, optional(string())], - }); - req.query('type', mapped.type); - req.query('id', mapped.id); - req.query('vizId', mapped.vizId); - req.query('transientContent', mapped.transientContent); - req.query('runtimeFilter', mapped.runtimeFilter); - req.query('runtimeSort', mapped.runtimeSort); - req.throwOn(500, ErrorResponseError, 'Operation failed'); - return req.callAsJson(unknown(), requestOptions); - } -} diff --git a/Typescript/src/controllers/securityController.ts b/Typescript/src/controllers/securityController.ts deleted file mode 100644 index 5932d8b24..000000000 --- a/Typescript/src/controllers/securityController.ts +++ /dev/null @@ -1,228 +0,0 @@ -/** - * ThoughtSpot Public REST APILib - * - * This file was automatically generated by APIMATIC v3.0 ( https://www.apimatic.io ). - */ - -import { ApiResponse, RequestOptions } from '../core'; -import { ErrorResponseError } from '../errors/errorResponseError'; -import { - PrincipalSearchResponse, - principalSearchResponseSchema, -} from '../models/principalSearchResponse'; -import { - SecurityPermissionResponse, - securityPermissionResponseSchema, -} from '../models/securityPermissionResponse'; -import { - TspublicRestV2SecurityPermissionPrincipalSearchRequest, - tspublicRestV2SecurityPermissionPrincipalSearchRequestSchema, -} from '../models/tspublicRestV2SecurityPermissionPrincipalSearchRequest'; -import { - TspublicRestV2SecurityPermissionTsobjectSearchRequest, - tspublicRestV2SecurityPermissionTsobjectSearchRequestSchema, -} from '../models/tspublicRestV2SecurityPermissionTsobjectSearchRequest'; -import { - TspublicRestV2SecurityShareTsobjectRequest, - tspublicRestV2SecurityShareTsobjectRequestSchema, -} from '../models/tspublicRestV2SecurityShareTsobjectRequest'; -import { - TspublicRestV2SecurityShareVisualizationRequest, - tspublicRestV2SecurityShareVisualizationRequestSchema, -} from '../models/tspublicRestV2SecurityShareVisualizationRequest'; -import { Type7Enum, type7EnumSchema } from '../models/type7Enum'; -import { array, boolean, optional, string } from '../schema'; -import { BaseController } from './baseController'; - -export class SecurityController extends BaseController { - /** - * To list the permissions for user and user groups on an object, use this endpoint. The response will - * include only those users and groups with have either VIEW OR MODIFY permission. - * - * You can optionally see the permission on the dependent objects as well by enabling includeDependent - * field. - * - * @param id GUID of the metadata object for which the permission needs to be obtained. - * @param type Type of metadata object. Valid values: Liveboard|Answer|DataObject|Column - * @param includeDependent When this field is set to true, the API returns the permission details for - * the dependent objects for the the object included in the request - * @return Response from the API call - */ - async restapiV2GetPermissionOnObject( - id: string, - type: Type7Enum, - includeDependent?: boolean, - requestOptions?: RequestOptions - ): Promise> { - const req = this.createRequest( - 'GET', - '/tspublic/rest/v2/security/permission/tsobject' - ); - const mapped = req.prepareArgs({ - id: [id, string()], - type: [type, type7EnumSchema], - includeDependent: [includeDependent, optional(boolean())], - }); - req.query('id', mapped.id); - req.query('type', mapped.type); - req.query('includeDependent', mapped.includeDependent); - req.throwOn(500, ErrorResponseError, 'Operation failed'); - return req.callAsJson(securityPermissionResponseSchema, requestOptions); - } - - /** - * Use this endpoint to list the objects on which a user or user group has permission. The response - * will include only those objects on which the user or user group has either VIEW OR MODIFY permission. - * - * - * Requires administration privilege - * - * @param id GUID of the user or user group for which the object permission needs to be obtained - * @param name Name of the ser or user group for which the object permission needs to be obtained - * @return Response from the API call - */ - async restapiV2GetPermissionForPrincipal( - id?: string, - name?: string, - requestOptions?: RequestOptions - ): Promise> { - const req = this.createRequest( - 'GET', - '/tspublic/rest/v2/security/permission/principal' - ); - const mapped = req.prepareArgs({ - id: [id, optional(string())], - name: [name, optional(string())], - }); - req.query('id', mapped.id); - req.query('name', mapped.name); - req.throwOn(500, ErrorResponseError, 'Operation failed'); - return req.callAsJson(principalSearchResponseSchema, requestOptions); - } - - /** - * To programmatically share ThoughtSpot objects with another user or user group, use this endpoint. - * - * When you share an object like a Liveboard or visualization, a notification with a live link is sent - * to the user. When the users access this object, they can view the last saved version of the object. - * - * @param body - * @return Response from the API call - */ - async restapiV2ShareObject( - body: TspublicRestV2SecurityShareTsobjectRequest, - requestOptions?: RequestOptions - ): Promise> { - const req = this.createRequest( - 'POST', - '/tspublic/rest/v2/security/share/tsobject' - ); - const mapped = req.prepareArgs({ - body: [body, tspublicRestV2SecurityShareTsobjectRequestSchema], - }); - req.header('Content-Type', 'application/json'); - req.json(mapped.body); - req.throwOn(500, ErrorResponseError, 'Operation failed'); - return req.callAsJson(boolean(), requestOptions); - } - - /** - * If you want to share a specific visualization from a Liveboard with another user or user group, then - * use this endpoint. - * - * Requires privilege to share the visualization - * - * @param body - * @return Response from the API call - */ - async restapiV2ShareVisualization( - body: TspublicRestV2SecurityShareVisualizationRequest, - requestOptions?: RequestOptions - ): Promise> { - const req = this.createRequest( - 'POST', - '/tspublic/rest/v2/security/share/visualization' - ); - const mapped = req.prepareArgs({ - body: [body, tspublicRestV2SecurityShareVisualizationRequestSchema], - }); - req.header('Content-Type', 'application/json'); - req.json(mapped.body); - req.throwOn(500, ErrorResponseError, 'Operation failed'); - return req.callAsJson(boolean(), requestOptions); - } - - /** - * To list the permissions for user and user groups on a list of objects, use this endpoint. The - * response will include only those users and groups with have either VIEW OR MODIFY permission. - * - * You can either provide list of object ids or type of objects to list the permissions for. One of - * these inputs is mandatory. If both are provided then only object ids will be considred. - * - * You can optionally provide users or user groups for which the persmission needs to be displayed. - * - * You can optionally see the permission on the dependent objects as well by enabling includeDependent - * field. - * - * Requires administration privilege - * - * @param body - * @return Response from the API call - */ - async restapiV2SearchPermissionOnObjects( - body: TspublicRestV2SecurityPermissionTsobjectSearchRequest, - requestOptions?: RequestOptions - ): Promise> { - const req = this.createRequest( - 'POST', - '/tspublic/rest/v2/security/permission/tsobject/search' - ); - const mapped = req.prepareArgs({ - body: [body, tspublicRestV2SecurityPermissionTsobjectSearchRequestSchema], - }); - req.header('Content-Type', 'application/json'); - req.json(mapped.body); - req.throwOn(500, ErrorResponseError, 'Operation failed'); - return req.callAsJson( - array(securityPermissionResponseSchema), - requestOptions - ); - } - - /** - * To list the permissions for user and user groups on a list of objects, use this endpoint. The - * response will include only those users and groups with have either VIEW OR MODIFY permission. - * - * You can either provide list of object ids or type of objects to list the permissions for. One of - * these inputs is mandatory. If both are provided then only object ids will be considred. - * - * You can optionally provide users or user groups for which the persmission needs to be displayed. - * - * You can optionally see the permission on the dependent objects as well by enabling includeDependent - * field. - * - * Requires administration privilege - * - * @param body - * @return Response from the API call - */ - async restapiV2SearchPermissionForPrincipals( - body: TspublicRestV2SecurityPermissionPrincipalSearchRequest, - requestOptions?: RequestOptions - ): Promise> { - const req = this.createRequest( - 'POST', - '/tspublic/rest/v2/security/permission/principal/search' - ); - const mapped = req.prepareArgs({ - body: [ - body, - tspublicRestV2SecurityPermissionPrincipalSearchRequestSchema, - ], - }); - req.header('Content-Type', 'application/json'); - req.json(mapped.body); - req.throwOn(500, ErrorResponseError, 'Operation failed'); - return req.callAsJson(array(principalSearchResponseSchema), requestOptions); - } -} diff --git a/Typescript/src/controllers/sessionController.ts b/Typescript/src/controllers/sessionController.ts deleted file mode 100644 index ea855576d..000000000 --- a/Typescript/src/controllers/sessionController.ts +++ /dev/null @@ -1,131 +0,0 @@ -/** - * ThoughtSpot Public REST APILib - * - * This file was automatically generated by APIMATIC v3.0 ( https://www.apimatic.io ). - */ - -import { ApiResponse, RequestOptions } from '../core'; -import { ErrorResponseError } from '../errors/errorResponseError'; -import { - AccessLevelEnum, - accessLevelEnumSchema, -} from '../models/accessLevelEnum'; -import { - SessionLoginResponse, - sessionLoginResponseSchema, -} from '../models/sessionLoginResponse'; -import { boolean, optional, string } from '../schema'; -import { BaseController } from './baseController'; - -export class SessionController extends BaseController { - /** - * You can programmatically create login session for a user in ThoughtSpot using this endpoint. - * - * You can create session by either providing userName and password as inputs in this request body or - * by including "Authorization" header with the token generated through the endpoint - * /tspublic/rest/v2/session/gettoken. - * - * userName and password input is given precedence over "Authorization" header, when both are included - * in the request. - * - * @param userName Username of the user account - * @param password The password of the user account - * @param rememberMe A flag to remember the user session. When set to true, sets a session cookie that - * persists in subsequent API calls. - * @return Response from the API call - */ - async restapiV2Login( - userName?: string, - password?: string, - rememberMe?: boolean, - requestOptions?: RequestOptions - ): Promise> { - const req = this.createRequest('GET', '/tspublic/rest/v2/session/login'); - const mapped = req.prepareArgs({ - userName: [userName, optional(string())], - password: [password, optional(string())], - rememberMe: [rememberMe, optional(boolean())], - }); - req.query('userName', mapped.userName); - req.query('password', mapped.password); - req.query('rememberMe', mapped.rememberMe); - req.throwOn(500, ErrorResponseError, 'Operation failed'); - return req.callAsJson(sessionLoginResponseSchema, requestOptions); - } - - /** - * To programmatically create session token for a user in ThoughtSpot, use this endpoint. - * - * You can generate the token for a user by providing password or secret key from the cluster. - * - * You need to enable trusted authentication to generate secret key. To generate secret key, follow - * below steps. - * - * - * 1. Click the Develop tab. - * - * - * 2. Under Customizations, click Settings. - * - * - * 3. To enable trusted authentication, turn on the toggle. - * - * - * 4. A secret_key for trusted authentication is generated. - * - * - * 5. Click the clipboard icon to copy the token. - * - * - * - * - * Password is given precedence over secretKey input, when both are included in the request. - * - * @param userName Username of the user account - * @param password The password of the user account - * @param secretKey The secret key string provided by the ThoughtSpot application - * server. ThoughtSpot generates this secret key when you enable - * trusted authentication. - * @param accessLevel User access privilege. FULL - Creates a session with full access. - * REPORT_BOOK_VIEW - Allow view access to the specified - * visualizations. - * @param tsObjectId GUID of the ThoughtSpot object. If you have set the accessLevel - * attribute to REPORT_BOOK_VIEW, specify the GUID of the Liveboard or - * visualization object. - * @param tokenExpiryDuration Duration in seconds after which the token expires - * @param orgId Id of the organization to be associated with the user login. If no - * input is provided then last logged in organization will be - * considered - * @return Response from the API call - */ - async restapiV2GetToken( - userName: string, - password?: string, - secretKey?: string, - accessLevel?: AccessLevelEnum, - tsObjectId?: string, - tokenExpiryDuration?: string, - orgId?: string, - requestOptions?: RequestOptions - ): Promise> { - const req = this.createRequest('GET', '/tspublic/rest/v2/session/gettoken'); - const mapped = req.prepareArgs({ - userName: [userName, string()], - password: [password, optional(string())], - secretKey: [secretKey, optional(string())], - accessLevel: [accessLevel, optional(accessLevelEnumSchema)], - tsObjectId: [tsObjectId, optional(string())], - tokenExpiryDuration: [tokenExpiryDuration, optional(string())], - orgId: [orgId, optional(string())], - }); - req.query('userName', mapped.userName); - req.query('password', mapped.password); - req.query('secretKey', mapped.secretKey); - req.query('accessLevel', mapped.accessLevel); - req.query('tsObjectId', mapped.tsObjectId); - req.query('tokenExpiryDuration', mapped.tokenExpiryDuration); - req.query('orgId', mapped.orgId); - req.throwOn(500, ErrorResponseError, 'Operation failed'); - return req.callAsJson(sessionLoginResponseSchema, requestOptions); - } -} diff --git a/Typescript/src/controllers/userController.ts b/Typescript/src/controllers/userController.ts deleted file mode 100644 index 2bae5f361..000000000 --- a/Typescript/src/controllers/userController.ts +++ /dev/null @@ -1,312 +0,0 @@ -/** - * ThoughtSpot Public REST APILib - * - * This file was automatically generated by APIMATIC v3.0 ( https://www.apimatic.io ). - */ - -import { ApiResponse, RequestOptions } from '../core'; -import { ErrorResponseError } from '../errors/errorResponseError'; -import { StateEnum, stateEnumSchema } from '../models/stateEnum'; -import { - TspublicRestV2UserAddgroupRequest, - tspublicRestV2UserAddgroupRequestSchema, -} from '../models/tspublicRestV2UserAddgroupRequest'; -import { - TspublicRestV2UserAddorgRequest, - tspublicRestV2UserAddorgRequestSchema, -} from '../models/tspublicRestV2UserAddorgRequest'; -import { - TspublicRestV2UserChangepasswordRequest, - tspublicRestV2UserChangepasswordRequestSchema, -} from '../models/tspublicRestV2UserChangepasswordRequest'; -import { - TspublicRestV2UserRemovegroupRequest, - tspublicRestV2UserRemovegroupRequestSchema, -} from '../models/tspublicRestV2UserRemovegroupRequest'; -import { - TspublicRestV2UserSearchRequest, - tspublicRestV2UserSearchRequestSchema, -} from '../models/tspublicRestV2UserSearchRequest'; -import { - TspublicRestV2UserUpdateRequest, - tspublicRestV2UserUpdateRequestSchema, -} from '../models/tspublicRestV2UserUpdateRequest'; -import { Type8Enum, type8EnumSchema } from '../models/type8Enum'; -import { UserResponse, userResponseSchema } from '../models/userResponse'; -import { VisibilityEnum, visibilityEnumSchema } from '../models/visibilityEnum'; -import { array, boolean, number, optional, string, unknown } from '../schema'; -import { BaseController } from './baseController'; - -export class UserController extends BaseController { - /** - * To get the details of a specific user account by username or user id, use this endpoint. At Least - * one value is needed. When both are given, user id will be considered to fetch user information - * - * @param name Username of the user that you want to query. - * @param id The GUID of the user account to query - * @return Response from the API call - */ - async restapiV2GetUser( - name?: string, - id?: string, - requestOptions?: RequestOptions - ): Promise> { - const req = this.createRequest('GET', '/tspublic/rest/v2/user'); - const mapped = req.prepareArgs({ - name: [name, optional(string())], - id: [id, optional(string())], - }); - req.query('name', mapped.name); - req.query('id', mapped.id); - req.throwOn(500, ErrorResponseError, 'Operation failed'); - return req.callAsJson(userResponseSchema, requestOptions); - } - - /** - * To programmatically create a user account in the ThoughtSpot system use this API endpoint. Using - * this API, you can create a user and assign groups. - * To create a user, you require admin user privileges. - * All users created in the ThoughtSpot system are added to ALL_GROUP - * - * @param name Name of the user. The username string must be unique. - * @param displayName A unique display name string for the user account, usually - * their first and last name - * @param password Password for the user account. - * @param visibility Visibility of the user. The visibility attribute is set to - * DEFAULT when creating a user. The DEFAULT attribute makes a - * user visible to other users and user groups, and this allows - * them to share objects - * @param mail Email of the user account - * @param orgIds Array of org identifiers. If no value is provided then user - * will be created in the organization associated with the login - * session. - * @param state Status of user account. acitve or inactive. - * @param notifyOnShare User preference for receiving email notifications when another - * ThoughtSpot user shares answers or pinboards. - * @param showWalkMe The user preference for revisiting the onboarding experience. - * @param analystOnboardingComplete ThoughtSpot provides an interactive guided walkthrough to - * onboard new users. The onboarding experience leads users - * through a set of actions to help users get started and - * accomplish their tasks quickly. The users can turn off the - * Onboarding experience and access it again when they need - * assistance with the ThoughtSpot UI. - * @param type Type of user. LOCAL_USER indicates that the user is created - * locally in the ThoughtSpot system. - * @return Response from the API call - */ - async restapiV2CreateUser( - name: string, - displayName: string, - password: string, - visibility?: VisibilityEnum, - mail?: string, - orgIds?: number[], - state?: StateEnum, - notifyOnShare?: boolean, - showWalkMe?: boolean, - analystOnboardingComplete?: boolean, - type?: Type8Enum, - requestOptions?: RequestOptions - ): Promise> { - const req = this.createRequest('GET', '/tspublic/rest/v2/user/create'); - const mapped = req.prepareArgs({ - name: [name, string()], - displayName: [displayName, string()], - password: [password, string()], - visibility: [visibility, optional(visibilityEnumSchema)], - mail: [mail, optional(string())], - orgIds: [orgIds, optional(array(number()))], - state: [state, optional(stateEnumSchema)], - notifyOnShare: [notifyOnShare, optional(boolean())], - showWalkMe: [showWalkMe, optional(boolean())], - analystOnboardingComplete: [ - analystOnboardingComplete, - optional(boolean()), - ], - type: [type, optional(type8EnumSchema)], - }); - req.query('name', mapped.name); - req.query('displayName', mapped.displayName); - req.query('password', mapped.password); - req.query('visibility', mapped.visibility); - req.query('mail', mapped.mail); - req.query('orgIds', mapped.orgIds); - req.query('state', mapped.state); - req.query('notifyOnShare', mapped.notifyOnShare); - req.query('showWalkMe', mapped.showWalkMe); - req.query('analystOnboardingComplete', mapped.analystOnboardingComplete); - req.query('type', mapped.type); - req.throwOn(500, ErrorResponseError, 'Operation failed'); - return req.callAsJson(userResponseSchema, requestOptions); - } - - /** - * You can use this endpoint to programmatically modify an existing user account. To modify a user, - * you require admin user privileges. - * At least one of User Id or username is mandatory. When both are given, then user id will be - * considered and username will be updated - * - * @param body - * @return Response from the API call - */ - async restapiV2UpdateUser( - body: TspublicRestV2UserUpdateRequest, - requestOptions?: RequestOptions - ): Promise> { - const req = this.createRequest('PUT', '/tspublic/rest/v2/user/update'); - const mapped = req.prepareArgs({ - body: [body, tspublicRestV2UserUpdateRequestSchema], - }); - req.header('Content-Type', 'application/json'); - req.json(mapped.body); - req.throwOn(500, ErrorResponseError, 'Operation failed'); - return req.callAsJson(boolean(), requestOptions); - } - - /** - * To remove a user from the ThoughtSpot system, use this endpoint. - * At Least one value needed. When both are given user id will be considered to delete user. - * - * @param name Username of the user that you want to query. - * @param id The GUID of the user account to query - * @param orgId Unique identifier of the organization from which the user would be deleted. If no value is - * provided then user will be deleted from the organization associated with the login session. - * @return Response from the API call - */ - async restapiV2DeleteUser( - name?: string, - id?: string, - orgId?: number, - requestOptions?: RequestOptions - ): Promise> { - const req = this.createRequest('DELETE', '/tspublic/rest/v2/user/delete'); - const mapped = req.prepareArgs({ - name: [name, optional(string())], - id: [id, optional(string())], - orgId: [orgId, optional(number())], - }); - req.query('name', mapped.name); - req.query('id', mapped.id); - req.query('orgId', mapped.orgId); - req.throwOn(500, ErrorResponseError, 'Operation failed'); - return req.callAsJson(boolean(), requestOptions); - } - - /** - * To programmatically add groups to an existing ThoughtSpot user use this endpoint. - * When you assign groups to a user, the user inherits the privileges assigned to those groups. - * At least one of User Id or username is mandatory. When both are given, then user id will be - * considered. - * - * @param body - * @return Response from the API call - */ - async restapiV2AddUserToGroups( - body: TspublicRestV2UserAddgroupRequest, - requestOptions?: RequestOptions - ): Promise> { - const req = this.createRequest('PUT', '/tspublic/rest/v2/user/addgroup'); - const mapped = req.prepareArgs({ - body: [body, tspublicRestV2UserAddgroupRequestSchema], - }); - req.header('Content-Type', 'application/json'); - req.json(mapped.body); - req.throwOn(500, ErrorResponseError, 'Operation failed'); - return req.callAsJson(boolean(), requestOptions); - } - - /** - * To programmatically remove groups from an existing ThoughtSpot user, use this API endpoint. - * The API removes only the user association. It does not delete the user or group from the Thoughtspot - * system - * At least one of User Id or username is mandatory. When both are given, then user id will be - * considered. - * - * @param body - * @return Response from the API call - */ - async restapiV2RemoveUserFromGroups( - body: TspublicRestV2UserRemovegroupRequest, - requestOptions?: RequestOptions - ): Promise> { - const req = this.createRequest('PUT', '/tspublic/rest/v2/user/removegroup'); - const mapped = req.prepareArgs({ - body: [body, tspublicRestV2UserRemovegroupRequestSchema], - }); - req.header('Content-Type', 'application/json'); - req.json(mapped.body); - req.throwOn(500, ErrorResponseError, 'Operation failed'); - return req.callAsJson(boolean(), requestOptions); - } - - /** - * To get the details of a specific user account or all users in the ThoughtSpot system use this end - * point. - * - * @param body - * @return Response from the API call - */ - async restapiV2SearchUsers( - body: TspublicRestV2UserSearchRequest, - requestOptions?: RequestOptions - ): Promise> { - const req = this.createRequest('POST', '/tspublic/rest/v2/user/search'); - const mapped = req.prepareArgs({ - body: [body, tspublicRestV2UserSearchRequestSchema], - }); - req.header('Content-Type', 'application/json'); - req.json(mapped.body); - req.throwOn(500, ErrorResponseError, 'Operation failed'); - return req.callAsJson(unknown(), requestOptions); - } - - /** - * To change the password of a ThoughtSpot user account, use this endpoint. - * - * At least one of id or name of user is required. When both are given user id will be considered. - * - * @param body - * @return Response from the API call - */ - async restapiV2ChangePasswordOfUser( - body: TspublicRestV2UserChangepasswordRequest, - requestOptions?: RequestOptions - ): Promise> { - const req = this.createRequest( - 'PUT', - '/tspublic/rest/v2/user/changepassword' - ); - const mapped = req.prepareArgs({ - body: [body, tspublicRestV2UserChangepasswordRequestSchema], - }); - req.header('Content-Type', 'application/json'); - req.json(mapped.body); - req.throwOn(500, ErrorResponseError, 'Operation failed'); - return req.callAsJson(boolean(), requestOptions); - } - - /** - * To programmatically add existing ThoughtSpot users to an organization, use this API endpoint. - * - * At least one of id or name of the organization is required. When both are given, then organization - * id will be considered. - * - * Requires Administration access for the organization to which users need to be added. - * - * @param body - * @return Response from the API call - */ - async restapiV2AddUserToOrgs( - body: TspublicRestV2UserAddorgRequest, - requestOptions?: RequestOptions - ): Promise> { - const req = this.createRequest('PUT', '/tspublic/rest/v2/user/addorg'); - const mapped = req.prepareArgs({ - body: [body, tspublicRestV2UserAddorgRequestSchema], - }); - req.header('Content-Type', 'application/json'); - req.json(mapped.body); - req.throwOn(500, ErrorResponseError, 'Operation failed'); - return req.callAsJson(boolean(), requestOptions); - } -} diff --git a/Typescript/src/core.ts b/Typescript/src/core.ts deleted file mode 100644 index 76772d7a9..000000000 --- a/Typescript/src/core.ts +++ /dev/null @@ -1,7 +0,0 @@ -/** - * ThoughtSpot Public REST APILib - * - * This file was automatically generated by APIMATIC v3.0 ( https://www.apimatic.io ). - */ - -export * from '@apimatic/core'; diff --git a/Typescript/src/defaultConfiguration.ts b/Typescript/src/defaultConfiguration.ts deleted file mode 100644 index cf29d5a07..000000000 --- a/Typescript/src/defaultConfiguration.ts +++ /dev/null @@ -1,27 +0,0 @@ -/** - * ThoughtSpot Public REST APILib - * - * This file was automatically generated by APIMATIC v3.0 ( https://www.apimatic.io ). - */ - -import { Configuration, Environment } from './configuration'; -import { RetryConfiguration } from './core'; - -/** Default values for the configuration parameters of the client. */ -export const DEFAULT_CONFIGURATION: Configuration = { - timeout: 0, - environment: Environment.Production, - baseUrl: 'https://localhost:443', - accessToken: '', -}; - -/** Default values for retry configuration parameters. */ -export const DEFAULT_RETRY_CONFIG: RetryConfiguration = { - maxNumberOfRetries: 0, - retryOnTimeout: true, - retryInterval: 1, - maximumRetryWaitTime: 0, - backoffFactor: 2, - httpStatusCodesToRetry: [408, 413, 429, 500, 502, 503, 504, 521, 522, 524, 408, 413, 429, 500, 502, 503, 504, 521, 522, 524], - httpMethodsToRetry: ['GET', 'PUT', 'GET', 'PUT'], -}; diff --git a/Typescript/src/errors/errorResponseError.ts b/Typescript/src/errors/errorResponseError.ts deleted file mode 100644 index 444a24c71..000000000 --- a/Typescript/src/errors/errorResponseError.ts +++ /dev/null @@ -1,16 +0,0 @@ -/** - * ThoughtSpot Public REST APILib - * - * This file was automatically generated by APIMATIC v3.0 ( https://www.apimatic.io ). - */ - -import { ApiError } from '../core'; - -/** - * Creates an instance of ErrorResponse - */ -interface ErrorResponse { - error?: unknown; -} - -export class ErrorResponseError extends ApiError {} diff --git a/Typescript/src/http/xmlSerialization.ts b/Typescript/src/http/xmlSerialization.ts deleted file mode 100644 index 6c6b9a9b0..000000000 --- a/Typescript/src/http/xmlSerialization.ts +++ /dev/null @@ -1,15 +0,0 @@ -/** - * ThoughtSpot Public REST APILib - * - * This file was automatically generated by APIMATIC v3.0 ( https://www.apimatic.io ). - */ - -export class XmlSerialization { - public xmlSerialize(_rootName: string, _value: unknown): string { - throw new Error('XML serialization is not available.'); - } - - public xmlDeserialize(_rootName: string, _xmlString: string): Promise { - throw new Error('XML deserialization is not available.'); - } -} diff --git a/Typescript/src/index.ts b/Typescript/src/index.ts deleted file mode 100644 index 2216be4d1..000000000 --- a/Typescript/src/index.ts +++ /dev/null @@ -1,177 +0,0 @@ -/** - * ThoughtSpot Public REST APILib - * - * This file was automatically generated by APIMATIC v3.0 ( https://www.apimatic.io ). - */ - -export * from './client'; -export * from './configuration'; -export { - AbortError, - ApiResponse, - ArgumentsValidationError, - cloneFileWrapper, - FileWrapper, - isFileWrapper, - ResponseValidationError, -} from './core'; -export * from './defaultConfiguration'; -export * from './controllers/adminController'; -export * from './controllers/connectionController'; -export * from './controllers/customActionsController'; -export * from './controllers/dataController'; -export * from './controllers/databaseController'; -export * from './controllers/groupController'; -export * from './controllers/logsController'; -export * from './controllers/materializationController'; -export * from './controllers/metadataController'; -export * from './controllers/orgController'; -export * from './controllers/reportController'; -export * from './controllers/securityController'; -export * from './controllers/sessionController'; -export * from './controllers/userController'; -export { ApiError } from './core'; -export * from './errors/errorResponseError'; -export { AccessEnum } from './models/accessEnum'; -export { AccessLevelEnum } from './models/accessLevelEnum'; -export { AccessLevelInput } from './models/accessLevelInput'; -export { AddTableInput } from './models/addTableInput'; -export { AdminsyncPrincipalResponse } from './models/adminsyncPrincipalResponse'; -export { AnswerQueryResponse } from './models/answerQueryResponse'; -export { ClientState } from './models/clientState'; -export { ColumnsInput } from './models/columnsInput'; -export { ConnectionColumn } from './models/connectionColumn'; -export { ConnectionColumnsShema } from './models/connectionColumnsShema'; -export { ConnectionDatabaseType } from './models/connectionDatabaseType'; -export { ConnectionResponse } from './models/connectionResponse'; -export { ConnectionTableColumnsInput } from './models/connectionTableColumnsInput'; -export { ConnectionTableColumnsResponse } from './models/connectionTableColumnsResponse'; -export { ConnectionTableResponse } from './models/connectionTableResponse'; -export { ConnectionTableSchema } from './models/connectionTableSchema'; -export { CreateConnectionResponse } from './models/createConnectionResponse'; -export { CreateTableResponse } from './models/createTableResponse'; -export { DependentPermission } from './models/dependentPermission'; -export { FormatType3Enum } from './models/formatType3Enum'; -export { FormatTypeEnum } from './models/formatTypeEnum'; -export { FromUserNameAndIDInput } from './models/fromUserNameAndIDInput'; -export { GroupNameAndID } from './models/groupNameAndID'; -export { GroupNameAndIDInput } from './models/groupNameAndIDInput'; -export { GroupPermission } from './models/groupPermission'; -export { GroupResponse } from './models/groupResponse'; -export { HomeLiveboardResponse } from './models/homeLiveboardResponse'; -export { ImportPolicyEnum } from './models/importPolicyEnum'; -export { LiveboardNameAndID } from './models/liveboardNameAndID'; -export { LiveboardQueryResponse } from './models/liveboardQueryResponse'; -export { LogicalTableHeader } from './models/logicalTableHeader'; -export { LogsResponse } from './models/logsResponse'; -export { MetadataTagResponse } from './models/metadataTagResponse'; -export { NameAndIdInput } from './models/nameAndIdInput'; -export { OrgsResponse } from './models/orgsResponse'; -export { OrgType } from './models/orgType'; -export { OrientationEnum } from './models/orientationEnum'; -export { PdfOptionsInput } from './models/pdfOptionsInput'; -export { PermissionsTypeSearch } from './models/permissionsTypeSearch'; -export { PinboardDetails } from './models/pinboardDetails'; -export { PrincipalSearchResponse } from './models/principalSearchResponse'; -export { PrivilegeEnum } from './models/privilegeEnum'; -export { SecuirityDependents } from './models/secuirityDependents'; -export { SecurityPermission } from './models/securityPermission'; -export { SecurityPermissionResponse } from './models/securityPermissionResponse'; -export { SessionLoginResponse } from './models/sessionLoginResponse'; -export { SortBy1Enum } from './models/sortBy1Enum'; -export { SortByEnum } from './models/sortByEnum'; -export { SortOrder1Enum } from './models/sortOrder1Enum'; -export { SortOrderEnum } from './models/sortOrderEnum'; -export { State1Enum } from './models/state1Enum'; -export { StateEnum } from './models/stateEnum'; -export { TableColumns } from './models/tableColumns'; -export { TableInput } from './models/tableInput'; -export { TableList } from './models/tableList'; -export { TagNameAndID } from './models/tagNameAndID'; -export { TagNameAndIdInput } from './models/tagNameAndIdInput'; -export { TopicEnum } from './models/topicEnum'; -export { ToUserNameAndIDInput } from './models/toUserNameAndIDInput'; -export { TsObjectInput } from './models/tsObjectInput'; -export { TsObjectSearchInput } from './models/tsObjectSearchInput'; -export { TsObjectTypeSerach } from './models/tsObjectTypeSerach'; -export { TspublicRestV2AdminAssignauthorRequest } from './models/tspublicRestV2AdminAssignauthorRequest'; -export { TspublicRestV2AdminChangeauthorRequest } from './models/tspublicRestV2AdminChangeauthorRequest'; -export { TspublicRestV2AdminConfigurationUpdateRequest } from './models/tspublicRestV2AdminConfigurationUpdateRequest'; -export { TspublicRestV2AdminForcelogoutRequest } from './models/tspublicRestV2AdminForcelogoutRequest'; -export { TspublicRestV2AdminResetpasswordRequest } from './models/tspublicRestV2AdminResetpasswordRequest'; -export { TspublicRestV2AdminSyncprincipalRequest } from './models/tspublicRestV2AdminSyncprincipalRequest'; -export { TspublicRestV2ConnectionAddtableRequest } from './models/tspublicRestV2ConnectionAddtableRequest'; -export { TspublicRestV2ConnectionCreateRequest } from './models/tspublicRestV2ConnectionCreateRequest'; -export { TspublicRestV2ConnectionRemovetableRequest } from './models/tspublicRestV2ConnectionRemovetableRequest'; -export { TspublicRestV2ConnectionSearchRequest } from './models/tspublicRestV2ConnectionSearchRequest'; -export { TspublicRestV2ConnectionTablecoloumnRequest } from './models/tspublicRestV2ConnectionTablecoloumnRequest'; -export { TspublicRestV2ConnectionTableRequest } from './models/tspublicRestV2ConnectionTableRequest'; -export { TspublicRestV2ConnectionUpdateRequest } from './models/tspublicRestV2ConnectionUpdateRequest'; -export { TspublicRestV2CustomactionAssociationUpdateRequest } from './models/tspublicRestV2CustomactionAssociationUpdateRequest'; -export { TspublicRestV2CustomactionCreateRequest } from './models/tspublicRestV2CustomactionCreateRequest'; -export { TspublicRestV2CustomactionSearchRequest } from './models/tspublicRestV2CustomactionSearchRequest'; -export { TspublicRestV2CustomactionUpdateRequest } from './models/tspublicRestV2CustomactionUpdateRequest'; -export { TspublicRestV2DataAnswerRequest } from './models/tspublicRestV2DataAnswerRequest'; -export { TspublicRestV2DatabaseTableCreateRequest } from './models/tspublicRestV2DatabaseTableCreateRequest'; -export { TspublicRestV2DatabaseTableRunqueryRequest } from './models/tspublicRestV2DatabaseTableRunqueryRequest'; -export { TspublicRestV2DataLiveboardRequest } from './models/tspublicRestV2DataLiveboardRequest'; -export { TspublicRestV2DataSearchRequest } from './models/tspublicRestV2DataSearchRequest'; -export { TspublicRestV2GroupAddgroupRequest } from './models/tspublicRestV2GroupAddgroupRequest'; -export { TspublicRestV2GroupAddprivilegeRequest } from './models/tspublicRestV2GroupAddprivilegeRequest'; -export { TspublicRestV2GroupAdduserRequest } from './models/tspublicRestV2GroupAdduserRequest'; -export { TspublicRestV2GroupCreateRequest } from './models/tspublicRestV2GroupCreateRequest'; -export { TspublicRestV2GroupRemovegroupRequest } from './models/tspublicRestV2GroupRemovegroupRequest'; -export { TspublicRestV2GroupRemoveprivilegeRequest } from './models/tspublicRestV2GroupRemoveprivilegeRequest'; -export { TspublicRestV2GroupRemoveuserRequest } from './models/tspublicRestV2GroupRemoveuserRequest'; -export { TspublicRestV2GroupSearchRequest } from './models/tspublicRestV2GroupSearchRequest'; -export { TspublicRestV2GroupUpdateRequest } from './models/tspublicRestV2GroupUpdateRequest'; -export { TspublicRestV2MaterializationRefreshviewRequest } from './models/tspublicRestV2MaterializationRefreshviewRequest'; -export { TspublicRestV2MetadataDependencyRequest } from './models/tspublicRestV2MetadataDependencyRequest'; -export { TspublicRestV2MetadataDetailSearchRequest } from './models/tspublicRestV2MetadataDetailSearchRequest'; -export { TspublicRestV2MetadataFavoriteAssignRequest } from './models/tspublicRestV2MetadataFavoriteAssignRequest'; -export { TspublicRestV2MetadataFavoriteUnassignRequest } from './models/tspublicRestV2MetadataFavoriteUnassignRequest'; -export { TspublicRestV2MetadataHeaderSearchRequest } from './models/tspublicRestV2MetadataHeaderSearchRequest'; -export { TspublicRestV2MetadataHomeliveboardAssignRequest } from './models/tspublicRestV2MetadataHomeliveboardAssignRequest'; -export { TspublicRestV2MetadataHomeliveboardUnassignRequest } from './models/tspublicRestV2MetadataHomeliveboardUnassignRequest'; -export { TspublicRestV2MetadataTagAssignRequest } from './models/tspublicRestV2MetadataTagAssignRequest'; -export { TspublicRestV2MetadataTagCreateRequest } from './models/tspublicRestV2MetadataTagCreateRequest'; -export { TspublicRestV2MetadataTagUnassignRequest } from './models/tspublicRestV2MetadataTagUnassignRequest'; -export { TspublicRestV2MetadataTagUpdateRequest } from './models/tspublicRestV2MetadataTagUpdateRequest'; -export { TspublicRestV2MetadataTmlExportRequest } from './models/tspublicRestV2MetadataTmlExportRequest'; -export { TspublicRestV2MetadataTmlImportRequest } from './models/tspublicRestV2MetadataTmlImportRequest'; -export { TspublicRestV2OrgCreateRequest } from './models/tspublicRestV2OrgCreateRequest'; -export { TspublicRestV2OrgSearchRequest } from './models/tspublicRestV2OrgSearchRequest'; -export { TspublicRestV2OrgUpdateRequest } from './models/tspublicRestV2OrgUpdateRequest'; -export { TspublicRestV2SecurityPermissionPrincipalSearchRequest } from './models/tspublicRestV2SecurityPermissionPrincipalSearchRequest'; -export { TspublicRestV2SecurityPermissionTsobjectSearchRequest } from './models/tspublicRestV2SecurityPermissionTsobjectSearchRequest'; -export { TspublicRestV2SecurityShareTsobjectRequest } from './models/tspublicRestV2SecurityShareTsobjectRequest'; -export { TspublicRestV2SecurityShareVisualizationRequest } from './models/tspublicRestV2SecurityShareVisualizationRequest'; -export { TspublicRestV2UserAddgroupRequest } from './models/tspublicRestV2UserAddgroupRequest'; -export { TspublicRestV2UserAddorgRequest } from './models/tspublicRestV2UserAddorgRequest'; -export { TspublicRestV2UserChangepasswordRequest } from './models/tspublicRestV2UserChangepasswordRequest'; -export { TspublicRestV2UserRemovegroupRequest } from './models/tspublicRestV2UserRemovegroupRequest'; -export { TspublicRestV2UserSearchRequest } from './models/tspublicRestV2UserSearchRequest'; -export { TspublicRestV2UserUpdateRequest } from './models/tspublicRestV2UserUpdateRequest'; -export { Type10Enum } from './models/type10Enum'; -export { Type13Enum } from './models/type13Enum'; -export { Type14Enum } from './models/type14Enum'; -export { Type15Enum } from './models/type15Enum'; -export { Type16Enum } from './models/type16Enum'; -export { Type18Enum } from './models/type18Enum'; -export { Type1Enum } from './models/type1Enum'; -export { Type2Enum } from './models/type2Enum'; -export { Type3Enum } from './models/type3Enum'; -export { Type4Enum } from './models/type4Enum'; -export { Type5Enum } from './models/type5Enum'; -export { Type6Enum } from './models/type6Enum'; -export { Type7Enum } from './models/type7Enum'; -export { Type8Enum } from './models/type8Enum'; -export { Type9Enum } from './models/type9Enum'; -export { TypeEnum } from './models/typeEnum'; -export { UserNameAndID } from './models/userNameAndID'; -export { UserNameAndIDInput } from './models/userNameAndIDInput'; -export { UserResponse } from './models/userResponse'; -export { Visibility1Enum } from './models/visibility1Enum'; -export { Visibility2Enum } from './models/visibility2Enum'; -export { VisibilityEnum } from './models/visibilityEnum'; -export { VizType } from './models/vizType'; diff --git a/Typescript/src/models/accessEnum.ts b/Typescript/src/models/accessEnum.ts deleted file mode 100644 index d0f289307..000000000 --- a/Typescript/src/models/accessEnum.ts +++ /dev/null @@ -1,20 +0,0 @@ -/** - * ThoughtSpot Public REST APILib - * - * This file was automatically generated by APIMATIC v3.0 ( https://www.apimatic.io ). - */ - -import { Schema, stringEnum } from '../schema'; - -/** - * Enum for AccessEnum - */ -export enum AccessEnum { - READONLY = 'READ_ONLY', - MODIFY = 'MODIFY', -} - -/** - * Schema for AccessEnum - */ -export const accessEnumSchema: Schema = stringEnum(AccessEnum); diff --git a/Typescript/src/models/accessLevelEnum.ts b/Typescript/src/models/accessLevelEnum.ts deleted file mode 100644 index e170b911a..000000000 --- a/Typescript/src/models/accessLevelEnum.ts +++ /dev/null @@ -1,20 +0,0 @@ -/** - * ThoughtSpot Public REST APILib - * - * This file was automatically generated by APIMATIC v3.0 ( https://www.apimatic.io ). - */ - -import { Schema, stringEnum } from '../schema'; - -/** - * Enum for AccessLevelEnum - */ -export enum AccessLevelEnum { - FULL = 'FULL', - REPORTBOOKVIEW = 'REPORT_BOOK_VIEW', -} - -/** - * Schema for AccessLevelEnum - */ -export const accessLevelEnumSchema: Schema = stringEnum(AccessLevelEnum); diff --git a/Typescript/src/models/accessLevelInput.ts b/Typescript/src/models/accessLevelInput.ts deleted file mode 100644 index d8d15d3cb..000000000 --- a/Typescript/src/models/accessLevelInput.ts +++ /dev/null @@ -1,27 +0,0 @@ -/** - * ThoughtSpot Public REST APILib - * - * This file was automatically generated by APIMATIC v3.0 ( https://www.apimatic.io ). - */ - -import { object, optional, Schema, string } from '../schema'; -import { AccessEnum, accessEnumSchema } from './accessEnum'; -import { Type1Enum, type1EnumSchema } from './type1Enum'; - -export interface AccessLevelInput { - /** Username or name of the user group */ - name?: string; - /** GUID of the user or user group */ - id?: string; - /** Type of access detail provided */ - type?: Type1Enum; - /** Minimum access level that the specified user or user group has. If no input is provided then minimum access of READ_ONLY will be considered. */ - access?: AccessEnum; -} - -export const accessLevelInputSchema: Schema = object({ - name: ['name', optional(string())], - id: ['id', optional(string())], - type: ['type', optional(type1EnumSchema)], - access: ['access', optional(accessEnumSchema)], -}); diff --git a/Typescript/src/models/addTableInput.ts b/Typescript/src/models/addTableInput.ts deleted file mode 100644 index 3250bc819..000000000 --- a/Typescript/src/models/addTableInput.ts +++ /dev/null @@ -1,26 +0,0 @@ -/** - * ThoughtSpot Public REST APILib - * - * This file was automatically generated by APIMATIC v3.0 ( https://www.apimatic.io ). - */ - -import { array, lazy, object, Schema, string } from '../schema'; -import { ColumnsInput, columnsInputSchema } from './columnsInput'; - -export interface AddTableInput { - /** Name of the table */ - name: string; - /** Name of the database in the data platform */ - dbName: string; - /** Name of the schema in the database */ - schemaName: string; - /** A JSON array of column details */ - columns: ColumnsInput[]; -} - -export const addTableInputSchema: Schema = object({ - name: ['name', string()], - dbName: ['dbName', string()], - schemaName: ['schemaName', string()], - columns: ['columns', array(lazy(() => columnsInputSchema))], -}); diff --git a/Typescript/src/models/adminsyncPrincipalResponse.ts b/Typescript/src/models/adminsyncPrincipalResponse.ts deleted file mode 100644 index 410439bd4..000000000 --- a/Typescript/src/models/adminsyncPrincipalResponse.ts +++ /dev/null @@ -1,33 +0,0 @@ -/** - * ThoughtSpot Public REST APILib - * - * This file was automatically generated by APIMATIC v3.0 ( https://www.apimatic.io ). - */ - -import { array, object, optional, Schema, string } from '../schema'; - -export interface AdminsyncPrincipalResponse { - /** Username of list of users added */ - usersAdded?: string[]; - /** Username of list of users deleted */ - usersDeleted?: string[]; - /** Username of list of users updated */ - usersUpdated?: string[]; - /** Group name of list of groups added */ - groupsAdded?: string[]; - /** Group name of list of groups deleted */ - groupsDeleted?: string[]; - /** Group name of list of groups updated */ - groupsUpdated?: string[]; -} - -export const adminsyncPrincipalResponseSchema: Schema = object( - { - usersAdded: ['usersAdded', optional(array(string()))], - usersDeleted: ['usersDeleted', optional(array(string()))], - usersUpdated: ['usersUpdated', optional(array(string()))], - groupsAdded: ['groupsAdded', optional(array(string()))], - groupsDeleted: ['groupsDeleted', optional(array(string()))], - groupsUpdated: ['groupsUpdated', optional(array(string()))], - } -); diff --git a/Typescript/src/models/answerQueryResponse.ts b/Typescript/src/models/answerQueryResponse.ts deleted file mode 100644 index 4f4317879..000000000 --- a/Typescript/src/models/answerQueryResponse.ts +++ /dev/null @@ -1,22 +0,0 @@ -/** - * ThoughtSpot Public REST APILib - * - * This file was automatically generated by APIMATIC v3.0 ( https://www.apimatic.io ). - */ - -import { object, optional, Schema, string } from '../schema'; - -export interface AnswerQueryResponse { - /** The name of the saved Answer */ - name?: string; - /** The GUID of the saved Answer */ - id?: string; - /** SQL query associated with the saved Answer */ - querySql?: string; -} - -export const answerQueryResponseSchema: Schema = object({ - name: ['name', optional(string())], - id: ['id', optional(string())], - querySql: ['querySql', optional(string())], -}); diff --git a/Typescript/src/models/clientState.ts b/Typescript/src/models/clientState.ts deleted file mode 100644 index 7912f153f..000000000 --- a/Typescript/src/models/clientState.ts +++ /dev/null @@ -1,16 +0,0 @@ -/** - * ThoughtSpot Public REST APILib - * - * This file was automatically generated by APIMATIC v3.0 ( https://www.apimatic.io ). - */ - -import { object, optional, Schema, string } from '../schema'; - -export interface ClientState { - /** Color assigned to the tag */ - color?: string; -} - -export const clientStateSchema: Schema = object({ - color: ['color', optional(string())], -}); diff --git a/Typescript/src/models/columnsInput.ts b/Typescript/src/models/columnsInput.ts deleted file mode 100644 index 31c11fbc7..000000000 --- a/Typescript/src/models/columnsInput.ts +++ /dev/null @@ -1,19 +0,0 @@ -/** - * ThoughtSpot Public REST APILib - * - * This file was automatically generated by APIMATIC v3.0 ( https://www.apimatic.io ). - */ - -import { object, Schema, string } from '../schema'; - -export interface ColumnsInput { - /** Name of the column */ - name: string; - /** Datatype of the column */ - dataType: string; -} - -export const columnsInputSchema: Schema = object({ - name: ['name', string()], - dataType: ['dataType', string()], -}); diff --git a/Typescript/src/models/connectionColumn.ts b/Typescript/src/models/connectionColumn.ts deleted file mode 100644 index 8966459e1..000000000 --- a/Typescript/src/models/connectionColumn.ts +++ /dev/null @@ -1,23 +0,0 @@ -/** - * ThoughtSpot Public REST APILib - * - * This file was automatically generated by APIMATIC v3.0 ( https://www.apimatic.io ). - */ - -import { array, lazy, object, optional, Schema, string } from '../schema'; -import { TableColumns, tableColumnsSchema } from './tableColumns'; - -export interface ConnectionColumn { - /** Name of the table */ - name?: string; - /** Type of the Table */ - type?: string; - /** List of columns in the table */ - column?: TableColumns[]; -} - -export const connectionColumnSchema: Schema = object({ - name: ['name', optional(string())], - type: ['type', optional(string())], - column: ['column', optional(array(lazy(() => tableColumnsSchema)))], -}); diff --git a/Typescript/src/models/connectionColumnsShema.ts b/Typescript/src/models/connectionColumnsShema.ts deleted file mode 100644 index c191cb9d8..000000000 --- a/Typescript/src/models/connectionColumnsShema.ts +++ /dev/null @@ -1,28 +0,0 @@ -/** - * ThoughtSpot Public REST APILib - * - * This file was automatically generated by APIMATIC v3.0 ( https://www.apimatic.io ). - */ - -import { array, lazy, object, optional, Schema, string } from '../schema'; -import { TableColumns, tableColumnsSchema } from './tableColumns'; - -export interface ConnectionColumnsShema { - /** Name of the table */ - name?: string; - /** Name of the database */ - dbName?: string; - /** Name of the schema */ - schemaName?: string; - /** List of columns in the table */ - columns?: TableColumns[]; -} - -export const connectionColumnsShemaSchema: Schema = object( - { - name: ['name', optional(string())], - dbName: ['dbName', optional(string())], - schemaName: ['schemaName', optional(string())], - columns: ['columns', optional(array(lazy(() => tableColumnsSchema)))], - } -); diff --git a/Typescript/src/models/connectionDatabaseType.ts b/Typescript/src/models/connectionDatabaseType.ts deleted file mode 100644 index fcbe6b826..000000000 --- a/Typescript/src/models/connectionDatabaseType.ts +++ /dev/null @@ -1,28 +0,0 @@ -/** - * ThoughtSpot Public REST APILib - * - * This file was automatically generated by APIMATIC v3.0 ( https://www.apimatic.io ). - */ - -import { array, lazy, object, optional, Schema, string } from '../schema'; -import { - ConnectionTableSchema, - connectionTableSchemaSchema, -} from './connectionTableSchema'; - -export interface ConnectionDatabaseType { - /** Name of the database */ - name?: string; - /** List of schemas */ - schema?: ConnectionTableSchema[]; -} - -export const connectionDatabaseTypeSchema: Schema = object( - { - name: ['name', optional(string())], - schema: [ - 'schema', - optional(array(lazy(() => connectionTableSchemaSchema))), - ], - } -); diff --git a/Typescript/src/models/connectionResponse.ts b/Typescript/src/models/connectionResponse.ts deleted file mode 100644 index e8263059e..000000000 --- a/Typescript/src/models/connectionResponse.ts +++ /dev/null @@ -1,80 +0,0 @@ -/** - * ThoughtSpot Public REST APILib - * - * This file was automatically generated by APIMATIC v3.0 ( https://www.apimatic.io ). - */ - -import { - array, - boolean, - lazy, - number, - object, - optional, - Schema, - string, -} from '../schema'; -import { TableList, tableListSchema } from './tableList'; -import { UserNameAndID, userNameAndIDSchema } from './userNameAndID'; - -export interface ConnectionResponse { - /** Name of the connection */ - name?: string; - /** Description associated with the connection */ - description?: string; - /** Type of the connection. The database associated with this type can be obtained from the response returned by the /tspublic/rest/v2/connection/types API endpoint. */ - type?: string; - /** GUID of the connection */ - id?: string; - /** Indicates if the data sync is scheduled for this connection */ - scheduled?: boolean; - connectionType?: string; - /** Configuration properties of the connection */ - configuration?: string; - isExternal?: boolean; - /** Indicates if the connection is deprecated */ - isDeprecated?: boolean; - /** Indicates if the connection is deleted */ - isDeleted?: boolean; - /** Indicates if the connection is hideen */ - isHidden?: boolean; - /** Indicates if the all the properties of connection is provided */ - complete?: boolean; - indexVersion?: number; - generationNum?: number; - /** Date and time when the connection was created */ - created?: string; - /** Date and time of last modification of the connection */ - modified?: string; - author?: UserNameAndID; - modifiedBy?: UserNameAndID; - owner?: UserNameAndID; - /** List of tags assigned to the connection */ - tags?: string[]; - /** List of tables linked to this connection */ - tables?: TableList[]; -} - -export const connectionResponseSchema: Schema = object({ - name: ['name', optional(string())], - description: ['description', optional(string())], - type: ['type', optional(string())], - id: ['id', optional(string())], - scheduled: ['scheduled', optional(boolean())], - connectionType: ['connectionType', optional(string())], - configuration: ['configuration', optional(string())], - isExternal: ['isExternal', optional(boolean())], - isDeprecated: ['isDeprecated', optional(boolean())], - isDeleted: ['isDeleted', optional(boolean())], - isHidden: ['isHidden', optional(boolean())], - complete: ['complete', optional(boolean())], - indexVersion: ['indexVersion', optional(number())], - generationNum: ['generationNum', optional(number())], - created: ['created', optional(string())], - modified: ['modified', optional(string())], - author: ['author', optional(lazy(() => userNameAndIDSchema))], - modifiedBy: ['modifiedBy', optional(lazy(() => userNameAndIDSchema))], - owner: ['owner', optional(lazy(() => userNameAndIDSchema))], - tags: ['tags', optional(array(string()))], - tables: ['tables', optional(array(lazy(() => tableListSchema)))], -}); diff --git a/Typescript/src/models/connectionTableColumnsInput.ts b/Typescript/src/models/connectionTableColumnsInput.ts deleted file mode 100644 index 52a724e8e..000000000 --- a/Typescript/src/models/connectionTableColumnsInput.ts +++ /dev/null @@ -1,24 +0,0 @@ -/** - * ThoughtSpot Public REST APILib - * - * This file was automatically generated by APIMATIC v3.0 ( https://www.apimatic.io ). - */ - -import { object, Schema, string } from '../schema'; - -export interface ConnectionTableColumnsInput { - /** Name of the database */ - dbName: string; - /** Name of the schema */ - schemaName: string; - /** Name of the table */ - name: string; -} - -export const connectionTableColumnsInputSchema: Schema = object( - { - dbName: ['dbName', string()], - schemaName: ['schemaName', string()], - name: ['name', string()], - } -); diff --git a/Typescript/src/models/connectionTableColumnsResponse.ts b/Typescript/src/models/connectionTableColumnsResponse.ts deleted file mode 100644 index cfe3fd962..000000000 --- a/Typescript/src/models/connectionTableColumnsResponse.ts +++ /dev/null @@ -1,25 +0,0 @@ -/** - * ThoughtSpot Public REST APILib - * - * This file was automatically generated by APIMATIC v3.0 ( https://www.apimatic.io ). - */ - -import { array, lazy, object, optional, Schema, string } from '../schema'; -import { - ConnectionColumnsShema, - connectionColumnsShemaSchema, -} from './connectionColumnsShema'; - -export interface ConnectionTableColumnsResponse { - /** Connection id */ - id?: string; - /** List of table details */ - table?: ConnectionColumnsShema[]; -} - -export const connectionTableColumnsResponseSchema: Schema = object( - { - id: ['id', optional(string())], - table: ['table', optional(array(lazy(() => connectionColumnsShemaSchema)))], - } -); diff --git a/Typescript/src/models/connectionTableResponse.ts b/Typescript/src/models/connectionTableResponse.ts deleted file mode 100644 index f8eee52ea..000000000 --- a/Typescript/src/models/connectionTableResponse.ts +++ /dev/null @@ -1,28 +0,0 @@ -/** - * ThoughtSpot Public REST APILib - * - * This file was automatically generated by APIMATIC v3.0 ( https://www.apimatic.io ). - */ - -import { array, lazy, object, optional, Schema, string } from '../schema'; -import { - ConnectionDatabaseType, - connectionDatabaseTypeSchema, -} from './connectionDatabaseType'; - -export interface ConnectionTableResponse { - /** Connection id */ - id?: string; - /** List of databases */ - database?: ConnectionDatabaseType[]; -} - -export const connectionTableResponseSchema: Schema = object( - { - id: ['id', optional(string())], - database: [ - 'database', - optional(array(lazy(() => connectionDatabaseTypeSchema))), - ], - } -); diff --git a/Typescript/src/models/connectionTableSchema.ts b/Typescript/src/models/connectionTableSchema.ts deleted file mode 100644 index 6ffb711e2..000000000 --- a/Typescript/src/models/connectionTableSchema.ts +++ /dev/null @@ -1,22 +0,0 @@ -/** - * ThoughtSpot Public REST APILib - * - * This file was automatically generated by APIMATIC v3.0 ( https://www.apimatic.io ). - */ - -import { array, lazy, object, optional, Schema, string } from '../schema'; -import { ConnectionColumn, connectionColumnSchema } from './connectionColumn'; - -export interface ConnectionTableSchema { - /** Name of the schema */ - name?: string; - /** List of table details */ - table?: ConnectionColumn[]; -} - -export const connectionTableSchemaSchema: Schema = object( - { - name: ['name', optional(string())], - table: ['table', optional(array(lazy(() => connectionColumnSchema)))], - } -); diff --git a/Typescript/src/models/createConnectionResponse.ts b/Typescript/src/models/createConnectionResponse.ts deleted file mode 100644 index 0a531aaf3..000000000 --- a/Typescript/src/models/createConnectionResponse.ts +++ /dev/null @@ -1,81 +0,0 @@ -/** - * ThoughtSpot Public REST APILib - * - * This file was automatically generated by APIMATIC v3.0 ( https://www.apimatic.io ). - */ - -import { - array, - boolean, - lazy, - number, - object, - optional, - Schema, - string, -} from '../schema'; -import { UserNameAndID, userNameAndIDSchema } from './userNameAndID'; - -export interface CreateConnectionResponse { - /** Name of the connection */ - name?: string; - /** Description associated with the connection */ - description?: string; - /** Type of the connection. The database associated with this type can be obtained from the response returned by the /tspublic/rest/v2/connection/types API endpoint. */ - type?: string; - /** GUID of the connection */ - id?: string; - /** Indicates if the data sync is scheduled for this connection */ - scheduled?: boolean; - connectionType?: string; - /** Configuration properties of the connection */ - configuration?: string; - isExternal?: boolean; - /** Indicates if the connection is deprecated */ - isDeprecated?: boolean; - /** Indicates if the connection is deleted */ - isDeleted?: boolean; - /** Indicates if the connection is hideen */ - isHidden?: boolean; - /** Indicates if the all the properties of connection is provided */ - complete?: boolean; - indexVersion?: number; - generationNum?: number; - /** Date and time when user account was created */ - created?: string; - /** Date and time of last modification of user account */ - modified?: string; - author?: UserNameAndID; - modifiedBy?: UserNameAndID; - owner?: UserNameAndID; - /** List of tags assigned to the connection */ - tags?: string[]; - /** List of tables linked to this connection and details of the columns in the table */ - tables?: string[]; -} - -export const createConnectionResponseSchema: Schema = object( - { - name: ['name', optional(string())], - description: ['description', optional(string())], - type: ['type', optional(string())], - id: ['id', optional(string())], - scheduled: ['scheduled', optional(boolean())], - connectionType: ['connectionType', optional(string())], - configuration: ['configuration', optional(string())], - isExternal: ['isExternal', optional(boolean())], - isDeprecated: ['isDeprecated', optional(boolean())], - isDeleted: ['isDeleted', optional(boolean())], - isHidden: ['isHidden', optional(boolean())], - complete: ['complete', optional(boolean())], - indexVersion: ['indexVersion', optional(number())], - generationNum: ['generationNum', optional(number())], - created: ['created', optional(string())], - modified: ['modified', optional(string())], - author: ['author', optional(lazy(() => userNameAndIDSchema))], - modifiedBy: ['modifiedBy', optional(lazy(() => userNameAndIDSchema))], - owner: ['owner', optional(lazy(() => userNameAndIDSchema))], - tags: ['tags', optional(array(string()))], - tables: ['tables', optional(array(string()))], - } -); diff --git a/Typescript/src/models/createTableResponse.ts b/Typescript/src/models/createTableResponse.ts deleted file mode 100644 index 75a48faf1..000000000 --- a/Typescript/src/models/createTableResponse.ts +++ /dev/null @@ -1,24 +0,0 @@ -/** - * ThoughtSpot Public REST APILib - * - * This file was automatically generated by APIMATIC v3.0 ( https://www.apimatic.io ). - */ - -import { lazy, object, optional, Schema, string } from '../schema'; -import { - LogicalTableHeader, - logicalTableHeaderSchema, -} from './logicalTableHeader'; - -export interface CreateTableResponse { - logicalTableHeader?: LogicalTableHeader; - physicalTableId?: string; -} - -export const createTableResponseSchema: Schema = object({ - logicalTableHeader: [ - 'logicalTableHeader', - optional(lazy(() => logicalTableHeaderSchema)), - ], - physicalTableId: ['physicalTableId', optional(string())], -}); diff --git a/Typescript/src/models/dependentPermission.ts b/Typescript/src/models/dependentPermission.ts deleted file mode 100644 index ed8f401e6..000000000 --- a/Typescript/src/models/dependentPermission.ts +++ /dev/null @@ -1,35 +0,0 @@ -/** - * ThoughtSpot Public REST APILib - * - * This file was automatically generated by APIMATIC v3.0 ( https://www.apimatic.io ). - */ - -import { array, lazy, object, optional, Schema, string } from '../schema'; -import { GroupPermission, groupPermissionSchema } from './groupPermission'; - -export interface DependentPermission { - /** GUID of the object */ - id?: string; - /** Name of the object */ - name?: string; - /** Indicates the type of the object */ - type?: string; - /** Indicates the permission which user or user group has on the object */ - permission?: string; - /** Indicates the permission which user or user group has on the object through sharing of the object with this user or user group */ - sharedPermission?: string; - /** An array of object with details of permission on the user groups to which the user or user group belongs */ - groupPermission?: GroupPermission[]; -} - -export const dependentPermissionSchema: Schema = object({ - id: ['id', optional(string())], - name: ['name', optional(string())], - type: ['type', optional(string())], - permission: ['permission', optional(string())], - sharedPermission: ['sharedPermission', optional(string())], - groupPermission: [ - 'groupPermission', - optional(array(lazy(() => groupPermissionSchema))), - ], -}); diff --git a/Typescript/src/models/formatType3Enum.ts b/Typescript/src/models/formatType3Enum.ts deleted file mode 100644 index 6475fb9c2..000000000 --- a/Typescript/src/models/formatType3Enum.ts +++ /dev/null @@ -1,20 +0,0 @@ -/** - * ThoughtSpot Public REST APILib - * - * This file was automatically generated by APIMATIC v3.0 ( https://www.apimatic.io ). - */ - -import { Schema, stringEnum } from '../schema'; - -/** - * Enum for FormatType3Enum - */ -export enum FormatType3Enum { - YAML = 'YAML', - JSON = 'JSON', -} - -/** - * Schema for FormatType3Enum - */ -export const formatType3EnumSchema: Schema = stringEnum(FormatType3Enum); diff --git a/Typescript/src/models/formatTypeEnum.ts b/Typescript/src/models/formatTypeEnum.ts deleted file mode 100644 index 2851b21d1..000000000 --- a/Typescript/src/models/formatTypeEnum.ts +++ /dev/null @@ -1,20 +0,0 @@ -/** - * ThoughtSpot Public REST APILib - * - * This file was automatically generated by APIMATIC v3.0 ( https://www.apimatic.io ). - */ - -import { Schema, stringEnum } from '../schema'; - -/** - * Enum for FormatTypeEnum - */ -export enum FormatTypeEnum { - COMPACT = 'COMPACT', - FULL = 'FULL', -} - -/** - * Schema for FormatTypeEnum - */ -export const formatTypeEnumSchema: Schema = stringEnum(FormatTypeEnum); diff --git a/Typescript/src/models/fromUserNameAndIDInput.ts b/Typescript/src/models/fromUserNameAndIDInput.ts deleted file mode 100644 index c844f25c3..000000000 --- a/Typescript/src/models/fromUserNameAndIDInput.ts +++ /dev/null @@ -1,23 +0,0 @@ -/** - * ThoughtSpot Public REST APILib - * - * This file was automatically generated by APIMATIC v3.0 ( https://www.apimatic.io ). - */ - -import { object, optional, Schema, string } from '../schema'; - -/** - * A JSON object of name or GUIDs of the current owner of the objects. When both are given then id is considered. - * If a list of object ids are provided as input for TsObjectId, then only for those ids that have owner as the value provided in fromUser, the owner will be changed. - * Provide either name or id as input. When both are given user id will be considered. - */ -export interface FromUserNameAndIDInput { - /** Username of the user */ - name?: string; - /** GUID of the user */ - id?: string; -} - -export const fromUserNameAndIDInputSchema: Schema = object( - { name: ['name', optional(string())], id: ['id', optional(string())] } -); diff --git a/Typescript/src/models/groupNameAndID.ts b/Typescript/src/models/groupNameAndID.ts deleted file mode 100644 index 09ba514cf..000000000 --- a/Typescript/src/models/groupNameAndID.ts +++ /dev/null @@ -1,19 +0,0 @@ -/** - * ThoughtSpot Public REST APILib - * - * This file was automatically generated by APIMATIC v3.0 ( https://www.apimatic.io ). - */ - -import { object, optional, Schema, string } from '../schema'; - -export interface GroupNameAndID { - /** Name of the group */ - name?: string; - /** GUID of the group */ - id?: string; -} - -export const groupNameAndIDSchema: Schema = object({ - name: ['name', optional(string())], - id: ['id', optional(string())], -}); diff --git a/Typescript/src/models/groupNameAndIDInput.ts b/Typescript/src/models/groupNameAndIDInput.ts deleted file mode 100644 index 4bf42f6f9..000000000 --- a/Typescript/src/models/groupNameAndIDInput.ts +++ /dev/null @@ -1,19 +0,0 @@ -/** - * ThoughtSpot Public REST APILib - * - * This file was automatically generated by APIMATIC v3.0 ( https://www.apimatic.io ). - */ - -import { object, optional, Schema, string } from '../schema'; - -export interface GroupNameAndIDInput { - /** Name of the group */ - name?: string; - /** GUID of the group */ - id?: string; -} - -export const groupNameAndIDInputSchema: Schema = object({ - name: ['name', optional(string())], - id: ['id', optional(string())], -}); diff --git a/Typescript/src/models/groupPermission.ts b/Typescript/src/models/groupPermission.ts deleted file mode 100644 index f5e081838..000000000 --- a/Typescript/src/models/groupPermission.ts +++ /dev/null @@ -1,22 +0,0 @@ -/** - * ThoughtSpot Public REST APILib - * - * This file was automatically generated by APIMATIC v3.0 ( https://www.apimatic.io ). - */ - -import { object, optional, Schema, string } from '../schema'; - -export interface GroupPermission { - /** GUID of the user group */ - id?: string; - /** Name of the user group */ - name?: string; - /** Indicates the permission which user group has on the object */ - permission?: string; -} - -export const groupPermissionSchema: Schema = object({ - id: ['id', optional(string())], - name: ['name', optional(string())], - permission: ['permission', optional(string())], -}); diff --git a/Typescript/src/models/groupResponse.ts b/Typescript/src/models/groupResponse.ts deleted file mode 100644 index eee4eadd3..000000000 --- a/Typescript/src/models/groupResponse.ts +++ /dev/null @@ -1,114 +0,0 @@ -/** - * ThoughtSpot Public REST APILib - * - * This file was automatically generated by APIMATIC v3.0 ( https://www.apimatic.io ). - */ - -import { - array, - boolean, - lazy, - number, - object, - optional, - Schema, - string, - unknown, -} from '../schema'; -import { GroupNameAndID, groupNameAndIDSchema } from './groupNameAndID'; -import { - LiveboardNameAndID, - liveboardNameAndIDSchema, -} from './liveboardNameAndID'; -import { OrgType, orgTypeSchema } from './orgType'; -import { UserNameAndID, userNameAndIDSchema } from './userNameAndID'; - -export interface GroupResponse { - /** Name of the group */ - name?: string; - /** A unique display name string for the user group */ - displayName?: string; - /** GUID of the group */ - id?: string; - /** Visibility of the group */ - visibility?: string; - /** Description of the group */ - description?: string; - /** Privileges assigned to the group */ - privileges?: string[]; - /** The organizations that user belongs to */ - orgs?: OrgType[]; - /** Name of the group to which is added */ - groups?: GroupNameAndID[]; - /** User Group Information by Id or Name. */ - users?: UserNameAndID[]; - /** Liveboards assigned to the group */ - assignedLiveboards?: LiveboardNameAndID[]; - userGroupContent?: unknown; - /** Tags assigned to the group */ - tags?: string[]; - /** Indicates if the group is deleted */ - isDeleted?: boolean; - /** Indicates if the group is hidden */ - isHidden?: boolean; - /** Indicates if the group is from external system */ - isExternal?: boolean; - isDeprecated?: boolean; - /** Indicates if the all the properties of group is provided */ - complete?: boolean; - /** Indicates if the group is system principal */ - isSystemPrincipal?: boolean; - /** Indicates the type of group */ - type?: string; - /** Indicates the type of parent object */ - parenttype?: string; - groupIdx?: number; - metadataVersion?: number; - /** Tenant id associated with the group */ - tenantId?: string; - indexVersion?: number; - generationNum?: number; - /** Date and time when group was created */ - created?: number; - /** Date and time of last modification of the group */ - modified?: number; - author?: UserNameAndID; - modifiedBy?: UserNameAndID; - owner?: UserNameAndID; -} - -export const groupResponseSchema: Schema = object({ - name: ['name', optional(string())], - displayName: ['displayName', optional(string())], - id: ['id', optional(string())], - visibility: ['visibility', optional(string())], - description: ['description', optional(string())], - privileges: ['privileges', optional(array(string()))], - orgs: ['orgs', optional(array(lazy(() => orgTypeSchema)))], - groups: ['groups', optional(array(lazy(() => groupNameAndIDSchema)))], - users: ['users', optional(array(lazy(() => userNameAndIDSchema)))], - assignedLiveboards: [ - 'assignedLiveboards', - optional(array(lazy(() => liveboardNameAndIDSchema))), - ], - userGroupContent: ['userGroupContent', optional(unknown())], - tags: ['tags', optional(array(string()))], - isDeleted: ['isDeleted', optional(boolean())], - isHidden: ['isHidden', optional(boolean())], - isExternal: ['isExternal', optional(boolean())], - isDeprecated: ['isDeprecated', optional(boolean())], - complete: ['complete', optional(boolean())], - isSystemPrincipal: ['isSystemPrincipal', optional(boolean())], - type: ['type', optional(string())], - parenttype: ['parenttype', optional(string())], - groupIdx: ['groupIdx', optional(number())], - metadataVersion: ['metadataVersion', optional(number())], - tenantId: ['tenantId', optional(string())], - indexVersion: ['indexVersion', optional(number())], - generationNum: ['generationNum', optional(number())], - created: ['created', optional(number())], - modified: ['modified', optional(number())], - author: ['author', optional(lazy(() => userNameAndIDSchema))], - modifiedBy: ['modifiedBy', optional(lazy(() => userNameAndIDSchema))], - owner: ['owner', optional(lazy(() => userNameAndIDSchema))], -}); diff --git a/Typescript/src/models/homeLiveboardResponse.ts b/Typescript/src/models/homeLiveboardResponse.ts deleted file mode 100644 index 51e67a0f3..000000000 --- a/Typescript/src/models/homeLiveboardResponse.ts +++ /dev/null @@ -1,27 +0,0 @@ -/** - * ThoughtSpot Public REST APILib - * - * This file was automatically generated by APIMATIC v3.0 ( https://www.apimatic.io ). - */ - -import { object, optional, Schema, string } from '../schema'; - -export interface HomeLiveboardResponse { - /** Name of the user */ - userName?: string; - /** The GUID of the user */ - userId?: string; - /** Name of the liveboard */ - liveboardName?: string; - /** The GUID of the liveboard */ - liveboardId?: string; -} - -export const homeLiveboardResponseSchema: Schema = object( - { - userName: ['userName', optional(string())], - userId: ['userId', optional(string())], - liveboardName: ['liveboardName', optional(string())], - liveboardId: ['liveboardId', optional(string())], - } -); diff --git a/Typescript/src/models/importPolicyEnum.ts b/Typescript/src/models/importPolicyEnum.ts deleted file mode 100644 index 2b0226a90..000000000 --- a/Typescript/src/models/importPolicyEnum.ts +++ /dev/null @@ -1,21 +0,0 @@ -/** - * ThoughtSpot Public REST APILib - * - * This file was automatically generated by APIMATIC v3.0 ( https://www.apimatic.io ). - */ - -import { Schema, stringEnum } from '../schema'; - -/** - * Enum for ImportPolicyEnum - */ -export enum ImportPolicyEnum { - PARTIAL = 'PARTIAL', - ALLORNONE = 'ALL_OR_NONE', - VALIDATEONLY = 'VALIDATE_ONLY', -} - -/** - * Schema for ImportPolicyEnum - */ -export const importPolicyEnumSchema: Schema = stringEnum(ImportPolicyEnum); diff --git a/Typescript/src/models/liveboardNameAndID.ts b/Typescript/src/models/liveboardNameAndID.ts deleted file mode 100644 index bd5f18d65..000000000 --- a/Typescript/src/models/liveboardNameAndID.ts +++ /dev/null @@ -1,19 +0,0 @@ -/** - * ThoughtSpot Public REST APILib - * - * This file was automatically generated by APIMATIC v3.0 ( https://www.apimatic.io ). - */ - -import { object, optional, Schema, string } from '../schema'; - -export interface LiveboardNameAndID { - /** Name of the liveboard */ - name?: string; - /** GUID of the liveboard */ - id?: string; -} - -export const liveboardNameAndIDSchema: Schema = object({ - name: ['name', optional(string())], - id: ['id', optional(string())], -}); diff --git a/Typescript/src/models/liveboardQueryResponse.ts b/Typescript/src/models/liveboardQueryResponse.ts deleted file mode 100644 index 2d07918d1..000000000 --- a/Typescript/src/models/liveboardQueryResponse.ts +++ /dev/null @@ -1,25 +0,0 @@ -/** - * ThoughtSpot Public REST APILib - * - * This file was automatically generated by APIMATIC v3.0 ( https://www.apimatic.io ). - */ - -import { array, lazy, object, optional, Schema, string } from '../schema'; -import { VizType, vizTypeSchema } from './vizType'; - -export interface LiveboardQueryResponse { - /** The name of the Liveboard */ - name?: string; - /** The GUID of the Liveboard */ - id?: string; - /** SQL query associated with the saved Answer */ - viz?: VizType[]; -} - -export const liveboardQueryResponseSchema: Schema = object( - { - name: ['name', optional(string())], - id: ['id', optional(string())], - viz: ['viz', optional(array(lazy(() => vizTypeSchema)))], - } -); diff --git a/Typescript/src/models/logicalTableHeader.ts b/Typescript/src/models/logicalTableHeader.ts deleted file mode 100644 index c9586a30b..000000000 --- a/Typescript/src/models/logicalTableHeader.ts +++ /dev/null @@ -1,45 +0,0 @@ -/** - * ThoughtSpot Public REST APILib - * - * This file was automatically generated by APIMATIC v3.0 ( https://www.apimatic.io ). - */ - -import { boolean, number, object, optional, Schema, string } from '../schema'; - -export interface LogicalTableHeader { - id?: string; - name?: string; - author?: string; - authorName?: string; - authorDisplayName?: string; - created?: number; - modified?: number; - modifiedBy?: string; - generationNum?: number; - owner?: string; - deleted?: boolean; - hidden?: boolean; - database?: string; - schema?: string; - type?: string; - subType?: string; -} - -export const logicalTableHeaderSchema: Schema = object({ - id: ['id', optional(string())], - name: ['name', optional(string())], - author: ['author', optional(string())], - authorName: ['authorName', optional(string())], - authorDisplayName: ['authorDisplayName', optional(string())], - created: ['created', optional(number())], - modified: ['modified', optional(number())], - modifiedBy: ['modifiedBy', optional(string())], - generationNum: ['generationNum', optional(number())], - owner: ['owner', optional(string())], - deleted: ['deleted', optional(boolean())], - hidden: ['hidden', optional(boolean())], - database: ['database', optional(string())], - schema: ['schema', optional(string())], - type: ['type', optional(string())], - subType: ['subType', optional(string())], -}); diff --git a/Typescript/src/models/logsResponse.ts b/Typescript/src/models/logsResponse.ts deleted file mode 100644 index 877b996ed..000000000 --- a/Typescript/src/models/logsResponse.ts +++ /dev/null @@ -1,19 +0,0 @@ -/** - * ThoughtSpot Public REST APILib - * - * This file was automatically generated by APIMATIC v3.0 ( https://www.apimatic.io ). - */ - -import { object, optional, Schema, string } from '../schema'; - -export interface LogsResponse { - /** Date and time for the event in the log */ - date?: string; - /** Logged event at the time specified in JSON format. This includes, Event ID, A unique description of the event, for example, User login failed, Timestamp, User ID of the person initiating the event and IP address of the ThoughtSpot instance. */ - log?: string; -} - -export const logsResponseSchema: Schema = object({ - date: ['date', optional(string())], - log: ['log', optional(string())], -}); diff --git a/Typescript/src/models/metadataTagResponse.ts b/Typescript/src/models/metadataTagResponse.ts deleted file mode 100644 index 5221d3cce..000000000 --- a/Typescript/src/models/metadataTagResponse.ts +++ /dev/null @@ -1,58 +0,0 @@ -/** - * ThoughtSpot Public REST APILib - * - * This file was automatically generated by APIMATIC v3.0 ( https://www.apimatic.io ). - */ - -import { - boolean, - lazy, - number, - object, - optional, - Schema, - string, -} from '../schema'; -import { ClientState, clientStateSchema } from './clientState'; -import { TagNameAndID, tagNameAndIDSchema } from './tagNameAndID'; - -export interface MetadataTagResponse { - /** Name of the tag */ - name?: string; - /** GUID of the tag */ - id?: string; - clientState?: ClientState; - indexVersion?: number; - generationNum?: number; - /** Indicates if the tag is deleted */ - isDeleted?: boolean; - /** Indicates if the tag is hidden */ - isHidden?: boolean; - /** Indicates if the tag is from external system */ - isExternal?: boolean; - isDeprecated?: boolean; - /** Date and time when group was created */ - created?: number; - /** Date and time of last modification of the group */ - modified?: number; - modifiedBy?: TagNameAndID; - author?: TagNameAndID; - owner?: TagNameAndID; -} - -export const metadataTagResponseSchema: Schema = object({ - name: ['name', optional(string())], - id: ['id', optional(string())], - clientState: ['clientState', optional(lazy(() => clientStateSchema))], - indexVersion: ['indexVersion', optional(number())], - generationNum: ['generationNum', optional(number())], - isDeleted: ['isDeleted', optional(boolean())], - isHidden: ['isHidden', optional(boolean())], - isExternal: ['isExternal', optional(boolean())], - isDeprecated: ['isDeprecated', optional(boolean())], - created: ['created', optional(number())], - modified: ['modified', optional(number())], - modifiedBy: ['modifiedBy', optional(lazy(() => tagNameAndIDSchema))], - author: ['author', optional(lazy(() => tagNameAndIDSchema))], - owner: ['owner', optional(lazy(() => tagNameAndIDSchema))], -}); diff --git a/Typescript/src/models/nameAndIdInput.ts b/Typescript/src/models/nameAndIdInput.ts deleted file mode 100644 index 43fe352ff..000000000 --- a/Typescript/src/models/nameAndIdInput.ts +++ /dev/null @@ -1,19 +0,0 @@ -/** - * ThoughtSpot Public REST APILib - * - * This file was automatically generated by APIMATIC v3.0 ( https://www.apimatic.io ). - */ - -import { object, optional, Schema, string } from '../schema'; - -export interface NameAndIdInput { - /** Name of the user */ - name?: string; - /** GUID of the user */ - id?: string; -} - -export const nameAndIdInputSchema: Schema = object({ - name: ['name', optional(string())], - id: ['id', optional(string())], -}); diff --git a/Typescript/src/models/orgType.ts b/Typescript/src/models/orgType.ts deleted file mode 100644 index 41be41077..000000000 --- a/Typescript/src/models/orgType.ts +++ /dev/null @@ -1,19 +0,0 @@ -/** - * ThoughtSpot Public REST APILib - * - * This file was automatically generated by APIMATIC v3.0 ( https://www.apimatic.io ). - */ - -import { number, object, optional, Schema, string } from '../schema'; - -export interface OrgType { - /** Name of the organization */ - name?: string; - /** Id of the organization */ - id?: number; -} - -export const orgTypeSchema: Schema = object({ - name: ['name', optional(string())], - id: ['id', optional(number())], -}); diff --git a/Typescript/src/models/orgsResponse.ts b/Typescript/src/models/orgsResponse.ts deleted file mode 100644 index 7403502d1..000000000 --- a/Typescript/src/models/orgsResponse.ts +++ /dev/null @@ -1,31 +0,0 @@ -/** - * ThoughtSpot Public REST APILib - * - * This file was automatically generated by APIMATIC v3.0 ( https://www.apimatic.io ). - */ - -import { boolean, number, object, optional, Schema, string } from '../schema'; - -export interface OrgsResponse { - /** ID of the organization searched for */ - orgId?: number; - /** Name of the organization searched for */ - orgName?: string; - /** Description associated with the organization */ - description?: string; - /** GUID of the ALL group in the organization */ - allGroupUserId?: string; - /** GUID of the admin group in the organization */ - defaultAdminUserGroupId?: string; - /** Indicates if the organization is active or not */ - active?: boolean; -} - -export const orgsResponseSchema: Schema = object({ - orgId: ['orgId', optional(number())], - orgName: ['orgName', optional(string())], - description: ['description', optional(string())], - allGroupUserId: ['allGroupUserId', optional(string())], - defaultAdminUserGroupId: ['defaultAdminUserGroupId', optional(string())], - active: ['active', optional(boolean())], -}); diff --git a/Typescript/src/models/orientationEnum.ts b/Typescript/src/models/orientationEnum.ts deleted file mode 100644 index b1fbf12c2..000000000 --- a/Typescript/src/models/orientationEnum.ts +++ /dev/null @@ -1,20 +0,0 @@ -/** - * ThoughtSpot Public REST APILib - * - * This file was automatically generated by APIMATIC v3.0 ( https://www.apimatic.io ). - */ - -import { Schema, stringEnum } from '../schema'; - -/** - * Enum for OrientationEnum - */ -export enum OrientationEnum { - PORTRAIT = 'PORTRAIT', - LANDSCAPE = 'LANDSCAPE', -} - -/** - * Schema for OrientationEnum - */ -export const orientationEnumSchema: Schema = stringEnum(OrientationEnum); diff --git a/Typescript/src/models/pdfOptionsInput.ts b/Typescript/src/models/pdfOptionsInput.ts deleted file mode 100644 index d3ff42084..000000000 --- a/Typescript/src/models/pdfOptionsInput.ts +++ /dev/null @@ -1,38 +0,0 @@ -/** - * ThoughtSpot Public REST APILib - * - * This file was automatically generated by APIMATIC v3.0 ( https://www.apimatic.io ). - */ - -import { boolean, object, optional, Schema, string } from '../schema'; -import { OrientationEnum, orientationEnumSchema } from './orientationEnum'; - -export interface PdfOptionsInput { - /** Page orientation for the PDF. Default: PORTRAIT */ - orientation?: OrientationEnum; - /** - * When set to true, only the first page of the tables is displayed in the file. - * This setting is applicable only when generating report for specific visualization ids. Default: false - */ - truncateTables?: boolean; - /** Include customized wide logo if available in the footer. Default: true */ - includeLogo?: boolean; - /** Footer text to include in the footer of each page of the PDF. */ - footerText?: string; - /** When set to true, the page number is included in the footer of each page. Default: true */ - includePageNumber?: boolean; - /** When set to true, a cover page with the Liveboard title is added in the PDF. Default: true */ - includeCoverPage?: boolean; - /** When set to true, a second page with a list of all applied filters is added in the PDF. Default: true */ - includeFilterPage?: boolean; -} - -export const pdfOptionsInputSchema: Schema = object({ - orientation: ['orientation', optional(orientationEnumSchema)], - truncateTables: ['truncateTables', optional(boolean())], - includeLogo: ['includeLogo', optional(boolean())], - footerText: ['footerText', optional(string())], - includePageNumber: ['includePageNumber', optional(boolean())], - includeCoverPage: ['includeCoverPage', optional(boolean())], - includeFilterPage: ['includeFilterPage', optional(boolean())], -}); diff --git a/Typescript/src/models/permissionsTypeSearch.ts b/Typescript/src/models/permissionsTypeSearch.ts deleted file mode 100644 index ec5186b28..000000000 --- a/Typescript/src/models/permissionsTypeSearch.ts +++ /dev/null @@ -1,28 +0,0 @@ -/** - * ThoughtSpot Public REST APILib - * - * This file was automatically generated by APIMATIC v3.0 ( https://www.apimatic.io ). - */ - -import { array, lazy, object, optional, Schema, string } from '../schema'; -import { - TsObjectTypeSerach, - tsObjectTypeSerachSchema, -} from './tsObjectTypeSerach'; - -export interface PermissionsTypeSearch { - /** Indicates the type of the object */ - type?: string; - /** An array of objects of type mentioned in type field */ - tsObject?: TsObjectTypeSerach[]; -} - -export const permissionsTypeSearchSchema: Schema = object( - { - type: ['type', optional(string())], - tsObject: [ - 'tsObject', - optional(array(lazy(() => tsObjectTypeSerachSchema))), - ], - } -); diff --git a/Typescript/src/models/pinboardDetails.ts b/Typescript/src/models/pinboardDetails.ts deleted file mode 100644 index f0bb1082c..000000000 --- a/Typescript/src/models/pinboardDetails.ts +++ /dev/null @@ -1,25 +0,0 @@ -/** - * ThoughtSpot Public REST APILib - * - * This file was automatically generated by APIMATIC v3.0 ( https://www.apimatic.io ). - */ - -import { object, optional, Schema, string } from '../schema'; - -export interface PinboardDetails { - /** pinboard id of recently pinned pinboard */ - pinboardId?: string; - /** pinboard name of recently pinned pinboard */ - pinboardName?: string; - /** tab id of recently pinned tab */ - tabId?: string; - /** tab name of recently pinned tab */ - tabName?: string; -} - -export const pinboardDetailsSchema: Schema = object({ - pinboardId: ['pinboardId', optional(string())], - pinboardName: ['pinboardName', optional(string())], - tabId: ['tabId', optional(string())], - tabName: ['tabName', optional(string())], -}); diff --git a/Typescript/src/models/principalSearchResponse.ts b/Typescript/src/models/principalSearchResponse.ts deleted file mode 100644 index 116fee583..000000000 --- a/Typescript/src/models/principalSearchResponse.ts +++ /dev/null @@ -1,34 +0,0 @@ -/** - * ThoughtSpot Public REST APILib - * - * This file was automatically generated by APIMATIC v3.0 ( https://www.apimatic.io ). - */ - -import { array, lazy, object, optional, Schema, string } from '../schema'; -import { - PermissionsTypeSearch, - permissionsTypeSearchSchema, -} from './permissionsTypeSearch'; - -export interface PrincipalSearchResponse { - /** GUID of the user or user group */ - id?: string; - /** Name of the user or user group */ - name?: string; - /** Indicates the type of principal */ - type?: string; - /** Indicates the permission which user or user group has on the object */ - permissions?: PermissionsTypeSearch[]; -} - -export const principalSearchResponseSchema: Schema = object( - { - id: ['id', optional(string())], - name: ['name', optional(string())], - type: ['type', optional(string())], - permissions: [ - 'permissions', - optional(array(lazy(() => permissionsTypeSearchSchema))), - ], - } -); diff --git a/Typescript/src/models/privilegeEnum.ts b/Typescript/src/models/privilegeEnum.ts deleted file mode 100644 index 232d9f270..000000000 --- a/Typescript/src/models/privilegeEnum.ts +++ /dev/null @@ -1,37 +0,0 @@ -/** - * ThoughtSpot Public REST APILib - * - * This file was automatically generated by APIMATIC v3.0 ( https://www.apimatic.io ). - */ - -import { Schema, stringEnum } from '../schema'; - -/** - * Enum for PrivilegeEnum - */ -export enum PrivilegeEnum { - RANALYSIS = 'RANALYSIS', - DATAMANAGEMENT = 'DATAMANAGEMENT', - APPLICATIONADMINISTRATION = 'APPLICATION_ADMINISTRATION', - USERADMINISTRATION = 'USER_ADMINISTRATION', - SYSTEMMANAGEMENT = 'SYSTEMMANAGEMENT', - SYSTEMINFOADMINISTRATION = 'SYSTEM_INFO_ADMINISTRATION', - AUTHORING = 'AUTHORING', - BACKUPADMINISTRATION = 'BACKUP_ADMINISTRATION', - SHAREWITHALL = 'SHAREWITHALL', - DEVELOPER = 'DEVELOPER', - JOBSCHEDULING = 'JOBSCHEDULING', - GROUPADMINISTRATION = 'GROUP_ADMINISTRATION', - BYPASSRLS = 'BYPASSRLS', - EXPERIMENTALFEATUREPRIVILEGE = 'EXPERIMENTALFEATUREPRIVILEGE', - A3ANALYSIS = 'A3ANALYSIS', - USERDATAUPLOADING = 'USERDATAUPLOADING', - DATADOWNLOADING = 'DATADOWNLOADING', - DISABLEPINBOARDCREATION = 'DISABLE_PINBOARD_CREATION', - ADMINISTRATION = 'ADMINISTRATION', -} - -/** - * Schema for PrivilegeEnum - */ -export const privilegeEnumSchema: Schema = stringEnum(PrivilegeEnum); diff --git a/Typescript/src/models/secuirityDependents.ts b/Typescript/src/models/secuirityDependents.ts deleted file mode 100644 index 0db1680f0..000000000 --- a/Typescript/src/models/secuirityDependents.ts +++ /dev/null @@ -1,37 +0,0 @@ -/** - * ThoughtSpot Public REST APILib - * - * This file was automatically generated by APIMATIC v3.0 ( https://www.apimatic.io ). - */ - -import { array, lazy, object, optional, Schema, string } from '../schema'; -import { - DependentPermission, - dependentPermissionSchema, -} from './dependentPermission'; -import { UserNameAndID, userNameAndIDSchema } from './userNameAndID'; - -export interface SecuirityDependents { - /** GUID of the object */ - id?: string; - /** Name of the object */ - name?: string; - /** Indicates the type of the object */ - type?: string; - /** Owner of the object */ - owner?: string; - author?: UserNameAndID; - permissions?: DependentPermission[]; -} - -export const secuirityDependentsSchema: Schema = object({ - id: ['id', optional(string())], - name: ['name', optional(string())], - type: ['type', optional(string())], - owner: ['owner', optional(string())], - author: ['author', optional(lazy(() => userNameAndIDSchema))], - permissions: [ - 'permissions', - optional(array(lazy(() => dependentPermissionSchema))), - ], -}); diff --git a/Typescript/src/models/securityPermission.ts b/Typescript/src/models/securityPermission.ts deleted file mode 100644 index 4477f374e..000000000 --- a/Typescript/src/models/securityPermission.ts +++ /dev/null @@ -1,35 +0,0 @@ -/** - * ThoughtSpot Public REST APILib - * - * This file was automatically generated by APIMATIC v3.0 ( https://www.apimatic.io ). - */ - -import { array, lazy, object, optional, Schema, string } from '../schema'; -import { GroupPermission, groupPermissionSchema } from './groupPermission'; - -export interface SecurityPermission { - /** GUID of the user or user group */ - id?: string; - /** Name of the user or user group */ - name?: string; - /** Indicates the type of principal */ - type?: string; - /** Indicates the permission which user or user group has on the object */ - permission?: string; - /** Indicates the permission which user or user group has on the object through sharing of the object with this user or user group */ - sharedPermission?: string; - /** An array of object with details of permission on the user groups to which the user or user group belongs */ - groupPermission?: GroupPermission[]; -} - -export const securityPermissionSchema: Schema = object({ - id: ['id', optional(string())], - name: ['name', optional(string())], - type: ['type', optional(string())], - permission: ['permission', optional(string())], - sharedPermission: ['sharedPermission', optional(string())], - groupPermission: [ - 'groupPermission', - optional(array(lazy(() => groupPermissionSchema))), - ], -}); diff --git a/Typescript/src/models/securityPermissionResponse.ts b/Typescript/src/models/securityPermissionResponse.ts deleted file mode 100644 index 70649da5b..000000000 --- a/Typescript/src/models/securityPermissionResponse.ts +++ /dev/null @@ -1,50 +0,0 @@ -/** - * ThoughtSpot Public REST APILib - * - * This file was automatically generated by APIMATIC v3.0 ( https://www.apimatic.io ). - */ - -import { array, lazy, object, optional, Schema, string } from '../schema'; -import { - SecuirityDependents, - secuirityDependentsSchema, -} from './secuirityDependents'; -import { - SecurityPermission, - securityPermissionSchema, -} from './securityPermission'; -import { UserNameAndID, userNameAndIDSchema } from './userNameAndID'; - -export interface SecurityPermissionResponse { - /** GUID of the object */ - id?: string; - /** Name of the object */ - name?: string; - /** Indicates the type of the object */ - type?: string; - /** GUID of the owner of the object */ - owner?: string; - author?: UserNameAndID; - /** An array of object with details of permission on users and user groups */ - permissions?: SecurityPermission[]; - /** The objects on which the primary object is dependent on */ - dependents?: SecuirityDependents[]; -} - -export const securityPermissionResponseSchema: Schema = object( - { - id: ['id', optional(string())], - name: ['name', optional(string())], - type: ['type', optional(string())], - owner: ['owner', optional(string())], - author: ['author', optional(lazy(() => userNameAndIDSchema))], - permissions: [ - 'permissions', - optional(array(lazy(() => securityPermissionSchema))), - ], - dependents: [ - 'dependents', - optional(array(lazy(() => secuirityDependentsSchema))), - ], - } -); diff --git a/Typescript/src/models/sessionLoginResponse.ts b/Typescript/src/models/sessionLoginResponse.ts deleted file mode 100644 index c4609bb95..000000000 --- a/Typescript/src/models/sessionLoginResponse.ts +++ /dev/null @@ -1,29 +0,0 @@ -/** - * ThoughtSpot Public REST APILib - * - * This file was automatically generated by APIMATIC v3.0 ( https://www.apimatic.io ). - */ - -import { object, optional, Schema, string } from '../schema'; - -/** Login response */ -export interface SessionLoginResponse { - /** Username of the user account for which token is generated */ - userName?: string; - /** Bearer token generated. This will be blank when token type is Cookie */ - token?: string; - /** Date and time at which the token is generated */ - tokenCreatedTime?: string; - /** Duration in seconds after which the token expires */ - tokenExpiryDuration?: string; - /** Type of token generated */ - tokenType?: string; -} - -export const sessionLoginResponseSchema: Schema = object({ - userName: ['userName', optional(string())], - token: ['token', optional(string())], - tokenCreatedTime: ['tokenCreatedTime', optional(string())], - tokenExpiryDuration: ['tokenExpiryDuration', optional(string())], - tokenType: ['tokenType', optional(string())], -}); diff --git a/Typescript/src/models/sortBy1Enum.ts b/Typescript/src/models/sortBy1Enum.ts deleted file mode 100644 index 683b842ce..000000000 --- a/Typescript/src/models/sortBy1Enum.ts +++ /dev/null @@ -1,30 +0,0 @@ -/** - * ThoughtSpot Public REST APILib - * - * This file was automatically generated by APIMATIC v3.0 ( https://www.apimatic.io ). - */ - -import { Schema, stringEnum } from '../schema'; - -/** - * Enum for SortBy1Enum - */ -export enum SortBy1Enum { - DEFAULT = 'DEFAULT', - NAME = 'NAME', - DISPLAYNAME = 'DISPLAY_NAME', - AUTHOR = 'AUTHOR', - CREATED = 'CREATED', - MODIFIED = 'MODIFIED', - LASTACCESSED = 'LAST_ACCESSED', - SYNCED = 'SYNCED', - VIEWS = 'VIEWS', - NONE = 'NONE', - USERSTATE = 'USER_STATE', - ROWCOUNT = 'ROW_COUNT', -} - -/** - * Schema for SortBy1Enum - */ -export const sortBy1EnumSchema: Schema = stringEnum(SortBy1Enum); diff --git a/Typescript/src/models/sortByEnum.ts b/Typescript/src/models/sortByEnum.ts deleted file mode 100644 index 94f6a008a..000000000 --- a/Typescript/src/models/sortByEnum.ts +++ /dev/null @@ -1,30 +0,0 @@ -/** - * ThoughtSpot Public REST APILib - * - * This file was automatically generated by APIMATIC v3.0 ( https://www.apimatic.io ). - */ - -import { Schema, stringEnum } from '../schema'; - -/** - * Enum for SortByEnum - */ -export enum SortByEnum { - DEFAULT = 'DEFAULT', - NAME = 'NAME', - DISPLAYNAME = 'DISPLAY_NAME', - AUTHOR = 'AUTHOR', - CREATED = 'CREATED', - MODIFIED = 'MODIFIED', - LASTACCESSED = 'LAST_ACCESSED', - SYNCED = 'SYNCED', - VIEWS = 'VIEWS', - NONE = 'NONE', - USERSTATE = 'USER_STATE', - ROWCOUNT = 'ROW_COUNT', -} - -/** - * Schema for SortByEnum - */ -export const sortByEnumSchema: Schema = stringEnum(SortByEnum); diff --git a/Typescript/src/models/sortOrder1Enum.ts b/Typescript/src/models/sortOrder1Enum.ts deleted file mode 100644 index 233b73b0f..000000000 --- a/Typescript/src/models/sortOrder1Enum.ts +++ /dev/null @@ -1,21 +0,0 @@ -/** - * ThoughtSpot Public REST APILib - * - * This file was automatically generated by APIMATIC v3.0 ( https://www.apimatic.io ). - */ - -import { Schema, stringEnum } from '../schema'; - -/** - * Enum for SortOrder1Enum - */ -export enum SortOrder1Enum { - DEFAULT = 'DEFAULT', - ASC = 'ASC', - DESC = 'DESC', -} - -/** - * Schema for SortOrder1Enum - */ -export const sortOrder1EnumSchema: Schema = stringEnum(SortOrder1Enum); diff --git a/Typescript/src/models/sortOrderEnum.ts b/Typescript/src/models/sortOrderEnum.ts deleted file mode 100644 index 7adaa68dd..000000000 --- a/Typescript/src/models/sortOrderEnum.ts +++ /dev/null @@ -1,21 +0,0 @@ -/** - * ThoughtSpot Public REST APILib - * - * This file was automatically generated by APIMATIC v3.0 ( https://www.apimatic.io ). - */ - -import { Schema, stringEnum } from '../schema'; - -/** - * Enum for SortOrderEnum - */ -export enum SortOrderEnum { - DEFAULT = 'DEFAULT', - ASC = 'ASC', - DESC = 'DESC', -} - -/** - * Schema for SortOrderEnum - */ -export const sortOrderEnumSchema: Schema = stringEnum(SortOrderEnum); diff --git a/Typescript/src/models/state1Enum.ts b/Typescript/src/models/state1Enum.ts deleted file mode 100644 index 15be18ef0..000000000 --- a/Typescript/src/models/state1Enum.ts +++ /dev/null @@ -1,23 +0,0 @@ -/** - * ThoughtSpot Public REST APILib - * - * This file was automatically generated by APIMATIC v3.0 ( https://www.apimatic.io ). - */ - -import { Schema, stringEnum } from '../schema'; - -/** - * Enum for State1Enum - */ -export enum State1Enum { - ACTIVE = 'ACTIVE', - INACTIVE = 'INACTIVE', - EXPIRED = 'EXPIRED', - LOCKED = 'LOCKED', - PENDING = 'PENDING', -} - -/** - * Schema for State1Enum - */ -export const state1EnumSchema: Schema = stringEnum(State1Enum); diff --git a/Typescript/src/models/stateEnum.ts b/Typescript/src/models/stateEnum.ts deleted file mode 100644 index f7aa123f6..000000000 --- a/Typescript/src/models/stateEnum.ts +++ /dev/null @@ -1,23 +0,0 @@ -/** - * ThoughtSpot Public REST APILib - * - * This file was automatically generated by APIMATIC v3.0 ( https://www.apimatic.io ). - */ - -import { Schema, stringEnum } from '../schema'; - -/** - * Enum for StateEnum - */ -export enum StateEnum { - ACTIVE = 'ACTIVE', - INACTIVE = 'INACTIVE', - EXPIRED = 'EXPIRED', - LOCKED = 'LOCKED', - PENDING = 'PENDING', -} - -/** - * Schema for StateEnum - */ -export const stateEnumSchema: Schema = stringEnum(StateEnum); diff --git a/Typescript/src/models/tableColumns.ts b/Typescript/src/models/tableColumns.ts deleted file mode 100644 index 61b0da0fb..000000000 --- a/Typescript/src/models/tableColumns.ts +++ /dev/null @@ -1,19 +0,0 @@ -/** - * ThoughtSpot Public REST APILib - * - * This file was automatically generated by APIMATIC v3.0 ( https://www.apimatic.io ). - */ - -import { object, optional, Schema, string } from '../schema'; - -export interface TableColumns { - /** Name of the column */ - name?: string; - /** Datatype of the column */ - dataType?: string; -} - -export const tableColumnsSchema: Schema = object({ - name: ['name', optional(string())], - dataType: ['dataType', optional(string())], -}); diff --git a/Typescript/src/models/tableInput.ts b/Typescript/src/models/tableInput.ts deleted file mode 100644 index a5e970033..000000000 --- a/Typescript/src/models/tableInput.ts +++ /dev/null @@ -1,19 +0,0 @@ -/** - * ThoughtSpot Public REST APILib - * - * This file was automatically generated by APIMATIC v3.0 ( https://www.apimatic.io ). - */ - -import { object, optional, Schema, string } from '../schema'; - -export interface TableInput { - /** Name of the table */ - name?: string; - /** GUID of the Table */ - id?: string; -} - -export const tableInputSchema: Schema = object({ - name: ['name', optional(string())], - id: ['id', optional(string())], -}); diff --git a/Typescript/src/models/tableList.ts b/Typescript/src/models/tableList.ts deleted file mode 100644 index b89e41fa0..000000000 --- a/Typescript/src/models/tableList.ts +++ /dev/null @@ -1,68 +0,0 @@ -/** - * ThoughtSpot Public REST APILib - * - * This file was automatically generated by APIMATIC v3.0 ( https://www.apimatic.io ). - */ - -import { - array, - boolean, - lazy, - number, - object, - optional, - Schema, - string, -} from '../schema'; -import { UserNameAndID, userNameAndIDSchema } from './userNameAndID'; - -export interface TableList { - /** Name of the table */ - name?: string; - /** Type of the table */ - type?: string; - /** GUID of the table */ - id?: string; - /** Name of the database to which the table belongs */ - databaseStripe?: string; - /** Name of the schema to which the table belongs */ - schemaStripe?: string; - isExternal?: boolean; - /** Indicates if the table is deprecated */ - isDeprecated?: boolean; - /** Indicates if the table is deleted */ - isDeleted?: boolean; - /** Indicates if the table is hideen */ - isHidden?: boolean; - indexVersion?: number; - generationNum?: number; - /** Date and time when the table was created */ - created?: string; - /** Date and time of last modification of the table */ - modified?: string; - author?: UserNameAndID; - modifiedBy?: UserNameAndID; - owner?: UserNameAndID; - /** List of tags assigned to the table */ - tags?: string[]; -} - -export const tableListSchema: Schema = object({ - name: ['name', optional(string())], - type: ['type', optional(string())], - id: ['id', optional(string())], - databaseStripe: ['databaseStripe', optional(string())], - schemaStripe: ['schemaStripe', optional(string())], - isExternal: ['isExternal', optional(boolean())], - isDeprecated: ['isDeprecated', optional(boolean())], - isDeleted: ['isDeleted', optional(boolean())], - isHidden: ['isHidden', optional(boolean())], - indexVersion: ['indexVersion', optional(number())], - generationNum: ['generationNum', optional(number())], - created: ['created', optional(string())], - modified: ['modified', optional(string())], - author: ['author', optional(lazy(() => userNameAndIDSchema))], - modifiedBy: ['modifiedBy', optional(lazy(() => userNameAndIDSchema))], - owner: ['owner', optional(lazy(() => userNameAndIDSchema))], - tags: ['tags', optional(array(string()))], -}); diff --git a/Typescript/src/models/tagNameAndID.ts b/Typescript/src/models/tagNameAndID.ts deleted file mode 100644 index e84aa9e25..000000000 --- a/Typescript/src/models/tagNameAndID.ts +++ /dev/null @@ -1,19 +0,0 @@ -/** - * ThoughtSpot Public REST APILib - * - * This file was automatically generated by APIMATIC v3.0 ( https://www.apimatic.io ). - */ - -import { object, optional, Schema, string } from '../schema'; - -export interface TagNameAndID { - /** Name of the group to which group is added */ - name?: string; - /** GUID of the group to which group is added */ - id?: string; -} - -export const tagNameAndIDSchema: Schema = object({ - name: ['name', optional(string())], - id: ['id', optional(string())], -}); diff --git a/Typescript/src/models/tagNameAndIdInput.ts b/Typescript/src/models/tagNameAndIdInput.ts deleted file mode 100644 index c1adb97fe..000000000 --- a/Typescript/src/models/tagNameAndIdInput.ts +++ /dev/null @@ -1,19 +0,0 @@ -/** - * ThoughtSpot Public REST APILib - * - * This file was automatically generated by APIMATIC v3.0 ( https://www.apimatic.io ). - */ - -import { object, optional, Schema, string } from '../schema'; - -export interface TagNameAndIdInput { - /** Name of the tags */ - name?: string; - /** GUID of the tags */ - id?: string; -} - -export const tagNameAndIdInputSchema: Schema = object({ - name: ['name', optional(string())], - id: ['id', optional(string())], -}); diff --git a/Typescript/src/models/toUserNameAndIDInput.ts b/Typescript/src/models/toUserNameAndIDInput.ts deleted file mode 100644 index 0aef43148..000000000 --- a/Typescript/src/models/toUserNameAndIDInput.ts +++ /dev/null @@ -1,20 +0,0 @@ -/** - * ThoughtSpot Public REST APILib - * - * This file was automatically generated by APIMATIC v3.0 ( https://www.apimatic.io ). - */ - -import { object, optional, Schema, string } from '../schema'; - -/** A JSON object of name or GUIDs of the new owner for the objects. When both are given then id is considered. */ -export interface ToUserNameAndIDInput { - /** Username of the user */ - name?: string; - /** GUID of the user */ - id?: string; -} - -export const toUserNameAndIDInputSchema: Schema = object({ - name: ['name', optional(string())], - id: ['id', optional(string())], -}); diff --git a/Typescript/src/models/topicEnum.ts b/Typescript/src/models/topicEnum.ts deleted file mode 100644 index 3ff30b096..000000000 --- a/Typescript/src/models/topicEnum.ts +++ /dev/null @@ -1,19 +0,0 @@ -/** - * ThoughtSpot Public REST APILib - * - * This file was automatically generated by APIMATIC v3.0 ( https://www.apimatic.io ). - */ - -import { Schema, stringEnum } from '../schema'; - -/** - * Enum for TopicEnum - */ -export enum TopicEnum { - SecurityLogs = 'security_logs', -} - -/** - * Schema for TopicEnum - */ -export const topicEnumSchema: Schema = stringEnum(TopicEnum); diff --git a/Typescript/src/models/tsObjectInput.ts b/Typescript/src/models/tsObjectInput.ts deleted file mode 100644 index 2df1a07c1..000000000 --- a/Typescript/src/models/tsObjectInput.ts +++ /dev/null @@ -1,20 +0,0 @@ -/** - * ThoughtSpot Public REST APILib - * - * This file was automatically generated by APIMATIC v3.0 ( https://www.apimatic.io ). - */ - -import { object, Schema, string } from '../schema'; -import { TypeEnum, typeEnumSchema } from './typeEnum'; - -export interface TsObjectInput { - /** GUID of the metadata object */ - id: string; - /** Type of the metadata object */ - type: TypeEnum; -} - -export const tsObjectInputSchema: Schema = object({ - id: ['id', string()], - type: ['type', typeEnumSchema], -}); diff --git a/Typescript/src/models/tsObjectSearchInput.ts b/Typescript/src/models/tsObjectSearchInput.ts deleted file mode 100644 index 56b21dfbe..000000000 --- a/Typescript/src/models/tsObjectSearchInput.ts +++ /dev/null @@ -1,20 +0,0 @@ -/** - * ThoughtSpot Public REST APILib - * - * This file was automatically generated by APIMATIC v3.0 ( https://www.apimatic.io ). - */ - -import { array, object, Schema, string } from '../schema'; -import { Type2Enum, type2EnumSchema } from './type2Enum'; - -export interface TsObjectSearchInput { - /** Type of the metadata objec */ - type: Type2Enum; - /** A JSON Array of GUIDs of the metadata object */ - id: string[]; -} - -export const tsObjectSearchInputSchema: Schema = object({ - type: ['type', type2EnumSchema], - id: ['id', array(string())], -}); diff --git a/Typescript/src/models/tsObjectTypeSerach.ts b/Typescript/src/models/tsObjectTypeSerach.ts deleted file mode 100644 index f9cb16b7d..000000000 --- a/Typescript/src/models/tsObjectTypeSerach.ts +++ /dev/null @@ -1,38 +0,0 @@ -/** - * ThoughtSpot Public REST APILib - * - * This file was automatically generated by APIMATIC v3.0 ( https://www.apimatic.io ). - */ - -import { array, lazy, object, optional, Schema, string } from '../schema'; -import { GroupPermission, groupPermissionSchema } from './groupPermission'; -import { UserNameAndID, userNameAndIDSchema } from './userNameAndID'; - -export interface TsObjectTypeSerach { - /** GUID of the object */ - id?: string; - /** Name of the object */ - name?: string; - /** Owner of the object */ - owner?: string; - author?: UserNameAndID; - /** Indicates the permission which user or user group has on the object */ - permission?: string; - /** Indicates the permission which user or user group has on the object through sharing of the object with the user or user group */ - sharedPermission?: string; - /** An array of object with details of permission on the user groups to which the user or user group belongs */ - groupPermission?: GroupPermission[]; -} - -export const tsObjectTypeSerachSchema: Schema = object({ - id: ['id', optional(string())], - name: ['name', optional(string())], - owner: ['owner', optional(string())], - author: ['author', optional(lazy(() => userNameAndIDSchema))], - permission: ['permission', optional(string())], - sharedPermission: ['sharedPermission', optional(string())], - groupPermission: [ - 'groupPermission', - optional(array(lazy(() => groupPermissionSchema))), - ], -}); diff --git a/Typescript/src/models/tspublicRestV2AdminAssignauthorRequest.ts b/Typescript/src/models/tspublicRestV2AdminAssignauthorRequest.ts deleted file mode 100644 index 83871cd0e..000000000 --- a/Typescript/src/models/tspublicRestV2AdminAssignauthorRequest.ts +++ /dev/null @@ -1,24 +0,0 @@ -/** - * ThoughtSpot Public REST APILib - * - * This file was automatically generated by APIMATIC v3.0 ( https://www.apimatic.io ). - */ - -import { array, object, optional, Schema, string } from '../schema'; - -export interface TspublicRestV2AdminAssignauthorRequest { - /** A JSON array of GUIDs of the metadata objects. */ - tsObjectId: string[]; - /** User name of the user account */ - name?: string; - /** The GUID of the user account */ - id?: string; -} - -export const tspublicRestV2AdminAssignauthorRequestSchema: Schema = object( - { - tsObjectId: ['tsObjectId', array(string())], - name: ['name', optional(string())], - id: ['id', optional(string())], - } -); diff --git a/Typescript/src/models/tspublicRestV2AdminChangeauthorRequest.ts b/Typescript/src/models/tspublicRestV2AdminChangeauthorRequest.ts deleted file mode 100644 index bd4ebf0ad..000000000 --- a/Typescript/src/models/tspublicRestV2AdminChangeauthorRequest.ts +++ /dev/null @@ -1,40 +0,0 @@ -/** - * ThoughtSpot Public REST APILib - * - * This file was automatically generated by APIMATIC v3.0 ( https://www.apimatic.io ). - */ - -import { array, lazy, object, Schema, string } from '../schema'; -import { - FromUserNameAndIDInput, - fromUserNameAndIDInputSchema, -} from './fromUserNameAndIDInput'; -import { - ToUserNameAndIDInput, - toUserNameAndIDInputSchema, -} from './toUserNameAndIDInput'; - -export interface TspublicRestV2AdminChangeauthorRequest { - /** - * A JSON array of GUIDs of the metadata objects. - * To change owner of all the objects owned by a user, provide single input as ALL. - * If multiple object ids along with ALL is provided as input, then ALL will be considered. - */ - tsObjectId: string[]; - /** - * A JSON object of name or GUIDs of the current owner of the objects. When both are given then id is considered. - * If a list of object ids are provided as input for TsObjectId, then only for those ids that have owner as the value provided in fromUser, the owner will be changed. - * Provide either name or id as input. When both are given user id will be considered. - */ - fromUser: FromUserNameAndIDInput; - /** A JSON object of name or GUIDs of the new owner for the objects. When both are given then id is considered. */ - toUser: ToUserNameAndIDInput; -} - -export const tspublicRestV2AdminChangeauthorRequestSchema: Schema = object( - { - tsObjectId: ['tsObjectId', array(string())], - fromUser: ['fromUser', lazy(() => fromUserNameAndIDInputSchema)], - toUser: ['toUser', lazy(() => toUserNameAndIDInputSchema)], - } -); diff --git a/Typescript/src/models/tspublicRestV2AdminConfigurationUpdateRequest.ts b/Typescript/src/models/tspublicRestV2AdminConfigurationUpdateRequest.ts deleted file mode 100644 index 148abb9cc..000000000 --- a/Typescript/src/models/tspublicRestV2AdminConfigurationUpdateRequest.ts +++ /dev/null @@ -1,19 +0,0 @@ -/** - * ThoughtSpot Public REST APILib - * - * This file was automatically generated by APIMATIC v3.0 ( https://www.apimatic.io ). - */ - -import { object, optional, Schema, string } from '../schema'; - -export interface TspublicRestV2AdminConfigurationUpdateRequest { - /** - * A JSON file with the key-value pair of configuration attributes to be updated. - * Example: {"defaultChartDataSize": 5000} - */ - configuration?: string; -} - -export const tspublicRestV2AdminConfigurationUpdateRequestSchema: Schema = object( - { configuration: ['configuration', optional(string())] } -); diff --git a/Typescript/src/models/tspublicRestV2AdminForcelogoutRequest.ts b/Typescript/src/models/tspublicRestV2AdminForcelogoutRequest.ts deleted file mode 100644 index 706fb5103..000000000 --- a/Typescript/src/models/tspublicRestV2AdminForcelogoutRequest.ts +++ /dev/null @@ -1,17 +0,0 @@ -/** - * ThoughtSpot Public REST APILib - * - * This file was automatically generated by APIMATIC v3.0 ( https://www.apimatic.io ). - */ - -import { array, lazy, object, optional, Schema } from '../schema'; -import { NameAndIdInput, nameAndIdInputSchema } from './nameAndIdInput'; - -export interface TspublicRestV2AdminForcelogoutRequest { - /** A JSON array of name of users or GUIDs of groups or both. When both are given then id is considered. */ - user?: NameAndIdInput[]; -} - -export const tspublicRestV2AdminForcelogoutRequestSchema: Schema = object( - { user: ['user', optional(array(lazy(() => nameAndIdInputSchema)))] } -); diff --git a/Typescript/src/models/tspublicRestV2AdminResetpasswordRequest.ts b/Typescript/src/models/tspublicRestV2AdminResetpasswordRequest.ts deleted file mode 100644 index feb910670..000000000 --- a/Typescript/src/models/tspublicRestV2AdminResetpasswordRequest.ts +++ /dev/null @@ -1,24 +0,0 @@ -/** - * ThoughtSpot Public REST APILib - * - * This file was automatically generated by APIMATIC v3.0 ( https://www.apimatic.io ). - */ - -import { object, optional, Schema, string } from '../schema'; - -export interface TspublicRestV2AdminResetpasswordRequest { - /** User name of the user account */ - name?: string; - /** The GUID of the user account to query. */ - id?: string; - /** A new password for the user. */ - newPassword: string; -} - -export const tspublicRestV2AdminResetpasswordRequestSchema: Schema = object( - { - name: ['name', optional(string())], - id: ['id', optional(string())], - newPassword: ['newPassword', string()], - } -); diff --git a/Typescript/src/models/tspublicRestV2AdminSyncprincipalRequest.ts b/Typescript/src/models/tspublicRestV2AdminSyncprincipalRequest.ts deleted file mode 100644 index 18fe7bdeb..000000000 --- a/Typescript/src/models/tspublicRestV2AdminSyncprincipalRequest.ts +++ /dev/null @@ -1,64 +0,0 @@ -/** - * ThoughtSpot Public REST APILib - * - * This file was automatically generated by APIMATIC v3.0 ( https://www.apimatic.io ). - */ - -import { - array, - boolean, - object, - optional, - Schema, - string, - unknown, -} from '../schema'; - -export interface TspublicRestV2AdminSyncprincipalRequest { - /** - * A JSON array of principal objects containing all users and groups present in the external system. - * Example: - * { - * "name": "Customer Success", - * "displayName": "Customer Success", - * "description": "CS", - * "created": 1568926267025, - * "modified": 1568926982242, - * "principalTypeEnum": "LOCAL_GROUP", - * "groupNames": [], - * "visibility": "DEFAULT" - * }, - * { - * "name": "test", - * "displayName": "test one", - * "created": 1587573621279, - * "modified": 1587573621674, - * "mail": "test2@test.com", - * "principalTypeEnum": "LOCAL_USER", - * "groupNames": [ "Administrator", "All" ], - * "visibility": "DEFAULT" - * } - * You can leave the created and modified dates blank for new users. - * You can specify if the principal is a user (LOCAL_USER) or user group (LOCAL_GROUP) in the principalTypeEnum keyword. - * Set visibility to NON_SHARABLE, if you do not want the user to be able to share ThoughtSpot objects with other users in this group. - */ - principalObject: unknown[]; - /** Specifies whether to apply the changes to users and groups already in the cluster based on the principal object list input. */ - updateModified?: boolean; - /** Specifies whether to delete the users and groups already in the cluster if not present in the principal object list input. */ - deleteRemoved?: boolean; - /** - * Assign a password for new users added during the sync operation. - * All new users added will have this password. It is mandatory to provide value for this field if new users are included in the input list. - */ - newUserPassword?: string; -} - -export const tspublicRestV2AdminSyncprincipalRequestSchema: Schema = object( - { - principalObject: ['principalObject', array(unknown())], - updateModified: ['updateModified', optional(boolean())], - deleteRemoved: ['deleteRemoved', optional(boolean())], - newUserPassword: ['newUserPassword', optional(string())], - } -); diff --git a/Typescript/src/models/tspublicRestV2ConnectionAddtableRequest.ts b/Typescript/src/models/tspublicRestV2ConnectionAddtableRequest.ts deleted file mode 100644 index 34b931dbf..000000000 --- a/Typescript/src/models/tspublicRestV2ConnectionAddtableRequest.ts +++ /dev/null @@ -1,22 +0,0 @@ -/** - * ThoughtSpot Public REST APILib - * - * This file was automatically generated by APIMATIC v3.0 ( https://www.apimatic.io ). - */ - -import { array, lazy, object, Schema, string } from '../schema'; -import { AddTableInput, addTableInputSchema } from './addTableInput'; - -export interface TspublicRestV2ConnectionAddtableRequest { - /** GUID of the connection */ - id: string; - /** A JSON array of table details */ - table: AddTableInput[]; -} - -export const tspublicRestV2ConnectionAddtableRequestSchema: Schema = object( - { - id: ['id', string()], - table: ['table', array(lazy(() => addTableInputSchema))], - } -); diff --git a/Typescript/src/models/tspublicRestV2ConnectionCreateRequest.ts b/Typescript/src/models/tspublicRestV2ConnectionCreateRequest.ts deleted file mode 100644 index 4115ee3e7..000000000 --- a/Typescript/src/models/tspublicRestV2ConnectionCreateRequest.ts +++ /dev/null @@ -1,28 +0,0 @@ -/** - * ThoughtSpot Public REST APILib - * - * This file was automatically generated by APIMATIC v3.0 ( https://www.apimatic.io ). - */ - -import { object, optional, Schema, string } from '../schema'; -import { Type14Enum, type14EnumSchema } from './type14Enum'; - -export interface TspublicRestV2ConnectionCreateRequest { - /** Type of the data connection. */ - type: Type14Enum; - /** Name of the connection */ - name: string; - /** A short description of the connection. */ - description?: string; - /** A JSON object of the connection metadata. The metadata must include configuration attributes required to create the connection. */ - configuration: string; -} - -export const tspublicRestV2ConnectionCreateRequestSchema: Schema = object( - { - type: ['type', type14EnumSchema], - name: ['name', string()], - description: ['description', optional(string())], - configuration: ['configuration', string()], - } -); diff --git a/Typescript/src/models/tspublicRestV2ConnectionRemovetableRequest.ts b/Typescript/src/models/tspublicRestV2ConnectionRemovetableRequest.ts deleted file mode 100644 index 1cbffcaf4..000000000 --- a/Typescript/src/models/tspublicRestV2ConnectionRemovetableRequest.ts +++ /dev/null @@ -1,22 +0,0 @@ -/** - * ThoughtSpot Public REST APILib - * - * This file was automatically generated by APIMATIC v3.0 ( https://www.apimatic.io ). - */ - -import { array, lazy, object, Schema, string } from '../schema'; -import { TableInput, tableInputSchema } from './tableInput'; - -export interface TspublicRestV2ConnectionRemovetableRequest { - /** GUID of the connection */ - id: string; - /** A JSON array of name or GUIDs of the table or both. At least one input is required. Provide either table name or id. When both are given then id is considered */ - table: TableInput[]; -} - -export const tspublicRestV2ConnectionRemovetableRequestSchema: Schema = object( - { - id: ['id', string()], - table: ['table', array(lazy(() => tableInputSchema))], - } -); diff --git a/Typescript/src/models/tspublicRestV2ConnectionSearchRequest.ts b/Typescript/src/models/tspublicRestV2ConnectionSearchRequest.ts deleted file mode 100644 index 1e794ca12..000000000 --- a/Typescript/src/models/tspublicRestV2ConnectionSearchRequest.ts +++ /dev/null @@ -1,60 +0,0 @@ -/** - * ThoughtSpot Public REST APILib - * - * This file was automatically generated by APIMATIC v3.0 ( https://www.apimatic.io ). - */ - -import { - array, - lazy, - number, - object, - optional, - Schema, - string, -} from '../schema'; -import { SortBy1Enum, sortBy1EnumSchema } from './sortBy1Enum'; -import { SortOrder1Enum, sortOrder1EnumSchema } from './sortOrder1Enum'; -import { - TagNameAndIdInput, - tagNameAndIdInputSchema, -} from './tagNameAndIdInput'; -import { Type15Enum, type15EnumSchema } from './type15Enum'; - -export interface TspublicRestV2ConnectionSearchRequest { - /** The offset point, starting from where the records should be included in the response. If no input is provided then offset starts from 0 */ - offset?: number; - /** An alternate way to set offset for the starting point of the response. Offset field should be kept blank to use the value from this field. Offset value will be calculated as (batchNumber - 1) * batchSize. It is mandatory to provide a value for batchSize with batchNumber. Example: Assume response has 100 records. Now, batchNumber is set as 2 and batchSize as 10, then offset value will be 10. So, 10 records starting from 11th record will be considered. */ - batchNumber?: number; - /** The number of records that should be included in the response starting from offset position. If no input is provided, then all records starting from the value provided in offset is included in the response. */ - batchSize?: number; - /** Field based on which the re.sponse needs to be ordered. Valid values */ - sortBy?: SortBy1Enum; - /** Order in which sortBy should be applied. Valid values */ - sortOrder?: SortOrder1Enum; - /** Type of the connect being searched. Valid values: SNOWFLAKE|AMAZON_REDSHIFT|GOOGLE_BIGQUERY|AZURE_SYNAPSE|TERADATA|STARBURST|SAP_HANA|ORACLE_ADW|DATABRICKS|DENODO */ - type: Type15Enum; - /** A pattern to match the name of the connection. This parameter supports matching case-insensitive strings. For a wildcard match, use %. */ - namePattern?: string; - /** A JSON array containing the GUIDs of the connections that you want to fetch. */ - fetchId?: string[]; - /** A JSON array containing the GUIDs of the connections that you want to skip. */ - skipId?: string[]; - /** A JSON array of name or GUID of tags or both. When both are given then id is considered */ - tag?: TagNameAndIdInput[]; -} - -export const tspublicRestV2ConnectionSearchRequestSchema: Schema = object( - { - offset: ['offset', optional(number())], - batchNumber: ['batchNumber', optional(number())], - batchSize: ['batchSize', optional(number())], - sortBy: ['sortBy', optional(sortBy1EnumSchema)], - sortOrder: ['sortOrder', optional(sortOrder1EnumSchema)], - type: ['type', type15EnumSchema], - namePattern: ['namePattern', optional(string())], - fetchId: ['fetchId', optional(array(string()))], - skipId: ['skipId', optional(array(string()))], - tag: ['tag', optional(array(lazy(() => tagNameAndIdInputSchema)))], - } -); diff --git a/Typescript/src/models/tspublicRestV2ConnectionTableRequest.ts b/Typescript/src/models/tspublicRestV2ConnectionTableRequest.ts deleted file mode 100644 index bfdefda5f..000000000 --- a/Typescript/src/models/tspublicRestV2ConnectionTableRequest.ts +++ /dev/null @@ -1,30 +0,0 @@ -/** - * ThoughtSpot Public REST APILib - * - * This file was automatically generated by APIMATIC v3.0 ( https://www.apimatic.io ). - */ - -import { boolean, object, optional, Schema, string } from '../schema'; - -export interface TspublicRestV2ConnectionTableRequest { - /** The GUID of the connection */ - id: string; - /** - * A JSON object of the connection metadata. If this field is left empty, then the configuration saved in the connection is considered. - * To get the tables based on a different configuration, include required attributes in the connection configuration JSON. - * Example: - * Get tables from Snowflake with a different user account than specified in the connection: {"user":"test_user","password":"test_pwd","role":"test_role"} - * Get tables from Redshift for different database than specified in the connection: {"database":"test_db"} - */ - configuration?: string; - /** When set to true, the response will include column level details as well */ - includeColumn?: boolean; -} - -export const tspublicRestV2ConnectionTableRequestSchema: Schema = object( - { - id: ['id', string()], - configuration: ['configuration', optional(string())], - includeColumn: ['includeColumn', optional(boolean())], - } -); diff --git a/Typescript/src/models/tspublicRestV2ConnectionTablecoloumnRequest.ts b/Typescript/src/models/tspublicRestV2ConnectionTablecoloumnRequest.ts deleted file mode 100644 index 3608a51bf..000000000 --- a/Typescript/src/models/tspublicRestV2ConnectionTablecoloumnRequest.ts +++ /dev/null @@ -1,34 +0,0 @@ -/** - * ThoughtSpot Public REST APILib - * - * This file was automatically generated by APIMATIC v3.0 ( https://www.apimatic.io ). - */ - -import { array, lazy, object, optional, Schema, string } from '../schema'; -import { - ConnectionTableColumnsInput, - connectionTableColumnsInputSchema, -} from './connectionTableColumnsInput'; - -export interface TspublicRestV2ConnectionTablecoloumnRequest { - /** The GUID of the connection */ - id: string; - /** - * A JSON object of the connection metadata. If this field is left empty, then the configuration saved in the connection is considered. - * To get the tables based on a different configuration, include required attributes in the connection configuration JSON. - * Example: - * Get tables from Snowflake with a different user account than specified in the connection: {"user":"test_user","password":"test_pwd","role":"test_role"} - * Get tables from Redshift for different database than specified in the connection: {"database":"test_db"} - */ - configuration?: string; - /** List of table details */ - table: ConnectionTableColumnsInput[]; -} - -export const tspublicRestV2ConnectionTablecoloumnRequestSchema: Schema = object( - { - id: ['id', string()], - configuration: ['configuration', optional(string())], - table: ['table', array(lazy(() => connectionTableColumnsInputSchema))], - } -); diff --git a/Typescript/src/models/tspublicRestV2ConnectionUpdateRequest.ts b/Typescript/src/models/tspublicRestV2ConnectionUpdateRequest.ts deleted file mode 100644 index b9f8f1f02..000000000 --- a/Typescript/src/models/tspublicRestV2ConnectionUpdateRequest.ts +++ /dev/null @@ -1,27 +0,0 @@ -/** - * ThoughtSpot Public REST APILib - * - * This file was automatically generated by APIMATIC v3.0 ( https://www.apimatic.io ). - */ - -import { object, optional, Schema, string } from '../schema'; - -export interface TspublicRestV2ConnectionUpdateRequest { - /** GUID of the connection */ - id: string; - /** The text to update the name of the connection. */ - name?: string; - /** The text to update the description of the connection. */ - description?: string; - /** A JSON object of the connection metadata. Include all the configuration attributes with original value along with the changes required to any attribute. */ - configuration: string; -} - -export const tspublicRestV2ConnectionUpdateRequestSchema: Schema = object( - { - id: ['id', string()], - name: ['name', optional(string())], - description: ['description', optional(string())], - configuration: ['configuration', string()], - } -); diff --git a/Typescript/src/models/tspublicRestV2CustomactionAssociationUpdateRequest.ts b/Typescript/src/models/tspublicRestV2CustomactionAssociationUpdateRequest.ts deleted file mode 100644 index cf3e53c4c..000000000 --- a/Typescript/src/models/tspublicRestV2CustomactionAssociationUpdateRequest.ts +++ /dev/null @@ -1,22 +0,0 @@ -/** - * ThoughtSpot Public REST APILib - * - * This file was automatically generated by APIMATIC v3.0 ( https://www.apimatic.io ). - */ - -import { object, Schema, string } from '../schema'; - -export interface TspublicRestV2CustomactionAssociationUpdateRequest { - /** GUID of the custom action */ - id: string; - /** - * A JSON map of the attributes with association of the action to ThoughtSpot object ID - * Example: - * {"id":"0dbd5b3a-84c1-4407-9803-cf07d67e6fcf","name":"My worksheet action","version":"v2","type":"URL","detail":{"link":"https://unpkg.com","function":"my-worksheet-action","authSelect":"NONE","authToken":"","encodeUser":"","apiKey":"X-API-KEY","apiValue":"","additionalUrlHeaders":"{}"},"actionAssociationMap":{"WORKSHEET":{"2b9d083a-275c-4984-9cfe-90b036affa17":{"enabled":"true","context":"PRIMARY"}}},"context":"NONE","availability":[ ],"userGroupList":["d0326b56-ef23-4c8a-8327-a30e99bcc72b"]} - */ - association: string; -} - -export const tspublicRestV2CustomactionAssociationUpdateRequestSchema: Schema = object( - { id: ['id', string()], association: ['association', string()] } -); diff --git a/Typescript/src/models/tspublicRestV2CustomactionCreateRequest.ts b/Typescript/src/models/tspublicRestV2CustomactionCreateRequest.ts deleted file mode 100644 index ef4ab8669..000000000 --- a/Typescript/src/models/tspublicRestV2CustomactionCreateRequest.ts +++ /dev/null @@ -1,20 +0,0 @@ -/** - * ThoughtSpot Public REST APILib - * - * This file was automatically generated by APIMATIC v3.0 ( https://www.apimatic.io ). - */ - -import { object, Schema, string } from '../schema'; - -export interface TspublicRestV2CustomactionCreateRequest { - /** - * A JSON object with the key-value pair of configuration attributes - * Example: - * {"id":"3f7eac93-cce1-4ffc-b7a8-429353edbc6b","name":"unpkg test","version":"v2","type":"URL","detail":{"link":"https://unpkg.com ","function":"unpkg-test","authSelect":"BEARER","authToken":"asdfasadf3q4534534","encodeUser":"","apiKey":"X-API-KEY","apiValue":"","additionalUrlHeaders":"{\\"url_header1\\":{\\"id\\":\\"6a82908c-9328-40ff-b347-65adeda12f57\\",\\"key\\":\\"key1\\",\\"value\\":\\"value1\\"}}"},"actionAssociationMap":{"ANSWER":{"e4079d3f-ae71-4b0a-a70a-f17ecaf157a5":{"enabled":"true","context":"MENU"}}},"context":"NONE","availability":["GLOBAL"],"userGroupList":["d0326b56-ef23-4c8a-8327-a30e99bcc72b"]} - */ - configuration: string; -} - -export const tspublicRestV2CustomactionCreateRequestSchema: Schema = object( - { configuration: ['configuration', string()] } -); diff --git a/Typescript/src/models/tspublicRestV2CustomactionSearchRequest.ts b/Typescript/src/models/tspublicRestV2CustomactionSearchRequest.ts deleted file mode 100644 index 98f300088..000000000 --- a/Typescript/src/models/tspublicRestV2CustomactionSearchRequest.ts +++ /dev/null @@ -1,19 +0,0 @@ -/** - * ThoughtSpot Public REST APILib - * - * This file was automatically generated by APIMATIC v3.0 ( https://www.apimatic.io ). - */ - -import { array, object, optional, Schema, string } from '../schema'; - -export interface TspublicRestV2CustomactionSearchRequest { - /** - * A JSON array of tag GUIDs. - * If tags are applied to worksheets, search answers, or Liveboard visualizations, and custom actions are associated to these objects, you can use this parameter to filter the custom action data by tags. - */ - tag?: string[]; -} - -export const tspublicRestV2CustomactionSearchRequestSchema: Schema = object( - { tag: ['tag', optional(array(string()))] } -); diff --git a/Typescript/src/models/tspublicRestV2CustomactionUpdateRequest.ts b/Typescript/src/models/tspublicRestV2CustomactionUpdateRequest.ts deleted file mode 100644 index b82c2d114..000000000 --- a/Typescript/src/models/tspublicRestV2CustomactionUpdateRequest.ts +++ /dev/null @@ -1,22 +0,0 @@ -/** - * ThoughtSpot Public REST APILib - * - * This file was automatically generated by APIMATIC v3.0 ( https://www.apimatic.io ). - */ - -import { object, Schema, string } from '../schema'; - -export interface TspublicRestV2CustomactionUpdateRequest { - /** GUID of the custom action */ - id: string; - /** - * A JSON object with the key-value pair of configuration attributes - * Example: - * {"id":"3f7eac93-cce1-4ffc-b7a8-429353edbc6b","name":"unpkg test","version":"v2","type":"URL","detail":{"link":"https://unpkg.com ","function":"unpkg-test","authSelect":"BEARER","authToken":"asdfasadf3q4534534","encodeUser":"","apiKey":"X-API-KEY","apiValue":"","additionalUrlHeaders":"{\\"url_header1\\":{\\"id\\":\\"6a82908c-9328-40ff-b347-65adeda12f57\\",\\"key\\":\\"key1\\",\\"value\\":\\"value1\\"}}"},"actionAssociationMap":{"ANSWER":{"e4079d3f-ae71-4b0a-a70a-f17ecaf157a5":{"enabled":"true","context":"MENU"}}},"context":"NONE","availability":["GLOBAL"],"userGroupList":["d0326b56-ef23-4c8a-8327-a30e99bcc72b"]} - */ - configuration: string; -} - -export const tspublicRestV2CustomactionUpdateRequestSchema: Schema = object( - { id: ['id', string()], configuration: ['configuration', string()] } -); diff --git a/Typescript/src/models/tspublicRestV2DataAnswerRequest.ts b/Typescript/src/models/tspublicRestV2DataAnswerRequest.ts deleted file mode 100644 index 1f1cb9ffc..000000000 --- a/Typescript/src/models/tspublicRestV2DataAnswerRequest.ts +++ /dev/null @@ -1,48 +0,0 @@ -/** - * ThoughtSpot Public REST APILib - * - * This file was automatically generated by APIMATIC v3.0 ( https://www.apimatic.io ). - */ - -import { number, object, optional, Schema, string } from '../schema'; -import { FormatTypeEnum, formatTypeEnumSchema } from './formatTypeEnum'; - -export interface TspublicRestV2DataAnswerRequest { - /** - * The offset point, starting from where the records should be included in the response. - * If no input is provided then offset starts from 0. - */ - offset?: number; - /** - * An alternate way to set offset for the starting point of the response. - * The value in offset field will not be considered if batchNumber field has value greater than 0. - * Offset value will be calculated as (batchNumber - 1) * batchSize. - * It is mandatory to provide a value for batchSize with batchNumber. - * Example: - * Assume response has 100 records. Now, batchNumber is set as 2 and batchSize as 10, then offset value will be 10. So, 10 records starting from 11th record will be considered. - */ - batchNumber?: number; - /** - * The number of records that should be included in the response starting from offset position. - * If no input is provided, then all records starting from the value provided in offset is included in the response - */ - batchSize?: number; - /** The GUID of the Answer */ - id: string; - /** - * The format of the data in the response. - * FULL: The response comes in "column":"value" format. - * COMPACT: The response includes only the value of the columns. - */ - formatType?: FormatTypeEnum; -} - -export const tspublicRestV2DataAnswerRequestSchema: Schema = object( - { - offset: ['offset', optional(number())], - batchNumber: ['batchNumber', optional(number())], - batchSize: ['batchSize', optional(number())], - id: ['id', string()], - formatType: ['formatType', optional(formatTypeEnumSchema)], - } -); diff --git a/Typescript/src/models/tspublicRestV2DataLiveboardRequest.ts b/Typescript/src/models/tspublicRestV2DataLiveboardRequest.ts deleted file mode 100644 index 69d4ac50c..000000000 --- a/Typescript/src/models/tspublicRestV2DataLiveboardRequest.ts +++ /dev/null @@ -1,68 +0,0 @@ -/** - * ThoughtSpot Public REST APILib - * - * This file was automatically generated by APIMATIC v3.0 ( https://www.apimatic.io ). - */ - -import { array, number, object, optional, Schema, string } from '../schema'; -import { FormatTypeEnum, formatTypeEnumSchema } from './formatTypeEnum'; - -export interface TspublicRestV2DataLiveboardRequest { - /** - * The offset point, starting from where the records should be included in the response. - * If no input is provided then offset starts from 0. - */ - offset?: number; - /** - * An alternate way to set offset for the starting point of the response. - * The value in offset field will not be considered if batchNumber field has value greater than 0. - * Offset value will be calculated as (batchNumber - 1) * batchSize. - * It is mandatory to provide a value for batchSize with batchNumber. - * Example: - * Assume response has 100 records. Now, batchNumber is set as 2 and batchSize as 10, then offset value will be 10. So, 10 records starting from 11th record will be considered. - */ - batchNumber?: number; - /** - * The number of records that should be included in the response starting from offset position. - * If no input is provided, then all records starting from the value provided in offset is included in the response - */ - batchSize?: number; - /** The GUID of the Liveboard */ - id?: string; - /** If you have embedded ThoughtSpot in your host application, and you want to download Liveboard data with unsaved changes then, pass the transient content from the browser fetch request, using the getExportRequestForCurrentPinboard method. For more information, see https://developers.thoughtspot.com/docs/?pageid=liveboard-export-api#transient-pinboard . If value for this field is provided, then id will not be considered. */ - transientContent?: string; - /** A JSON array of GUIDs of the visualizations in the Liveboard. */ - vizId?: string[]; - /** - * JSON object which contains filter condition to filter the data at the time of data retrieval. - * Example: {"col1":"region","op1":"EQ","val1":"northeast","col2":"date","op2":"BET","val2":["1625126400000","1625126400000"]} - * For more information, see https://developers.thoughtspot.com/docs/?pageid=runtime-filters - */ - runtimeFilter?: string; - /** - * JSON object which provides columns to sort the data at the time of data retrieval. - * Example: {"sortCol1":"region","asc1":true,"sortCol2":"date"} - * For more information, see https://developers.thoughtspot.com/docs/?pageid=runtime-filters. - */ - runtimeSort?: string; - /** - * The format of the data in the response. - * FULL: The response comes in "column":"value" format. - * COMPACT: The response includes only the value of the columns. - */ - formatType?: FormatTypeEnum; -} - -export const tspublicRestV2DataLiveboardRequestSchema: Schema = object( - { - offset: ['offset', optional(number())], - batchNumber: ['batchNumber', optional(number())], - batchSize: ['batchSize', optional(number())], - id: ['id', optional(string())], - transientContent: ['transientContent', optional(string())], - vizId: ['vizId', optional(array(string()))], - runtimeFilter: ['runtimeFilter', optional(string())], - runtimeSort: ['runtimeSort', optional(string())], - formatType: ['formatType', optional(formatTypeEnumSchema)], - } -); diff --git a/Typescript/src/models/tspublicRestV2DataSearchRequest.ts b/Typescript/src/models/tspublicRestV2DataSearchRequest.ts deleted file mode 100644 index 424c56343..000000000 --- a/Typescript/src/models/tspublicRestV2DataSearchRequest.ts +++ /dev/null @@ -1,51 +0,0 @@ -/** - * ThoughtSpot Public REST APILib - * - * This file was automatically generated by APIMATIC v3.0 ( https://www.apimatic.io ). - */ - -import { number, object, optional, Schema, string } from '../schema'; -import { FormatTypeEnum, formatTypeEnumSchema } from './formatTypeEnum'; - -export interface TspublicRestV2DataSearchRequest { - /** - * The offset point, starting from where the records should be included in the response. - * If no input is provided then offset starts from 0. - */ - offset?: number; - /** - * An alternate way to set offset for the starting point of the response. - * The value in offset field will not be considered if batchNumber field has value greater than 0. - * Offset value will be calculated as (batchNumber - 1) * batchSize. - * It is mandatory to provide a value for batchSize with batchNumber. - * Example: - * Assume response has 100 records. Now, batchNumber is set as 2 and batchSize as 10, then offset value will be 10. So, 10 records starting from 11th record will be considered. - */ - batchNumber?: number; - /** - * The number of records that should be included in the response starting from offset position. - * If no input is provided, then all records starting from the value provided in offset is included in the response - */ - batchSize?: number; - /** The data search query string. Example: [revenue] > 1000 [ship mode] = 'air' */ - queryString: string; - /** The GUID of the data object, either a worksheet, a view, or a table. */ - dataObjectId: string; - /** - * The format of the data in the response. - * FULL: The response comes in "column":"value" format. - * COMPACT: The response includes only the value of the columns. - */ - formatType?: FormatTypeEnum; -} - -export const tspublicRestV2DataSearchRequestSchema: Schema = object( - { - offset: ['offset', optional(number())], - batchNumber: ['batchNumber', optional(number())], - batchSize: ['batchSize', optional(number())], - queryString: ['queryString', string()], - dataObjectId: ['dataObjectId', string()], - formatType: ['formatType', optional(formatTypeEnumSchema)], - } -); diff --git a/Typescript/src/models/tspublicRestV2DatabaseTableCreateRequest.ts b/Typescript/src/models/tspublicRestV2DatabaseTableCreateRequest.ts deleted file mode 100644 index ff3c66cea..000000000 --- a/Typescript/src/models/tspublicRestV2DatabaseTableCreateRequest.ts +++ /dev/null @@ -1,21 +0,0 @@ -/** - * ThoughtSpot Public REST APILib - * - * This file was automatically generated by APIMATIC v3.0 ( https://www.apimatic.io ). - */ - -import { boolean, object, optional, Schema, string } from '../schema'; - -export interface TspublicRestV2DatabaseTableCreateRequest { - /** Flag to indicate if the database and schema should be created if they do not exist in Falcon. (Valid values: True/False) */ - createDatabase?: boolean; - /** DDL of the table to be created. Example: {"database":{"name":"test_db"},"schema":{"name":"test_schema"},"table":{"id":{"name":"test_table"},"primary_key":[{"name":"test_pk"}],"column":[{"id":{"name":"test_pk"},"size":0,"data_type":"TYPE_INT32"},{"id":{"name":"test_col1"},"size":0,"data_type":"TYPE_FLOAT"},{"id":{"name":"test_col2"},"data_type":"TYPE_INT64","datetime":"TYPE_DATE"}{"id":{"name":"test_col3"},"size":10,"data_type":"TYPE_VAR_CHAR"}]}} */ - schema?: string; -} - -export const tspublicRestV2DatabaseTableCreateRequestSchema: Schema = object( - { - createDatabase: ['createDatabase', optional(boolean())], - schema: ['schema', optional(string())], - } -); diff --git a/Typescript/src/models/tspublicRestV2DatabaseTableRunqueryRequest.ts b/Typescript/src/models/tspublicRestV2DatabaseTableRunqueryRequest.ts deleted file mode 100644 index 71b882469..000000000 --- a/Typescript/src/models/tspublicRestV2DatabaseTableRunqueryRequest.ts +++ /dev/null @@ -1,16 +0,0 @@ -/** - * ThoughtSpot Public REST APILib - * - * This file was automatically generated by APIMATIC v3.0 ( https://www.apimatic.io ). - */ - -import { array, object, Schema, string } from '../schema'; - -export interface TspublicRestV2DatabaseTableRunqueryRequest { - /** A JSON array of TQL statements separated by semi-colon (;). Each TQL statement should end with semi-colon (;). The TQL operations that can be run through this API are restricted to create database and schema, alter table, delete and update table rows. If a TQL statement fails, then the subsequent statements in the array are not run. Example: ["alter table test_db.test_schema.test_table drop contraint primary key;";"alter table test_db.test_schema.test_table add column test_col4 varchar(10) DEFAULT '';"] */ - statement: string[]; -} - -export const tspublicRestV2DatabaseTableRunqueryRequestSchema: Schema = object( - { statement: ['statement', array(string())] } -); diff --git a/Typescript/src/models/tspublicRestV2GroupAddgroupRequest.ts b/Typescript/src/models/tspublicRestV2GroupAddgroupRequest.ts deleted file mode 100644 index 81a1b07e7..000000000 --- a/Typescript/src/models/tspublicRestV2GroupAddgroupRequest.ts +++ /dev/null @@ -1,28 +0,0 @@ -/** - * ThoughtSpot Public REST APILib - * - * This file was automatically generated by APIMATIC v3.0 ( https://www.apimatic.io ). - */ - -import { array, lazy, object, optional, Schema, string } from '../schema'; -import { - GroupNameAndIDInput, - groupNameAndIDInputSchema, -} from './groupNameAndIDInput'; - -export interface TspublicRestV2GroupAddgroupRequest { - /** Name of the group */ - name?: string; - /** The GUID of the group to query. */ - id?: string; - /** Array of objects of groups that the user belong to. */ - groups: GroupNameAndIDInput[]; -} - -export const tspublicRestV2GroupAddgroupRequestSchema: Schema = object( - { - name: ['name', optional(string())], - id: ['id', optional(string())], - groups: ['groups', array(lazy(() => groupNameAndIDInputSchema))], - } -); diff --git a/Typescript/src/models/tspublicRestV2GroupAddprivilegeRequest.ts b/Typescript/src/models/tspublicRestV2GroupAddprivilegeRequest.ts deleted file mode 100644 index 05cdf053d..000000000 --- a/Typescript/src/models/tspublicRestV2GroupAddprivilegeRequest.ts +++ /dev/null @@ -1,25 +0,0 @@ -/** - * ThoughtSpot Public REST APILib - * - * This file was automatically generated by APIMATIC v3.0 ( https://www.apimatic.io ). - */ - -import { array, object, optional, Schema, string } from '../schema'; -import { PrivilegeEnum, privilegeEnumSchema } from './privilegeEnum'; - -export interface TspublicRestV2GroupAddprivilegeRequest { - /** Name of the group */ - name?: string; - /** The GUID of the group to query. */ - id?: string; - /** A JSON array of name of users or GUIDs of users or both. When both are given then id is considered */ - privileges?: PrivilegeEnum[]; -} - -export const tspublicRestV2GroupAddprivilegeRequestSchema: Schema = object( - { - name: ['name', optional(string())], - id: ['id', optional(string())], - privileges: ['privileges', optional(array(privilegeEnumSchema))], - } -); diff --git a/Typescript/src/models/tspublicRestV2GroupAdduserRequest.ts b/Typescript/src/models/tspublicRestV2GroupAdduserRequest.ts deleted file mode 100644 index 4fb91fb88..000000000 --- a/Typescript/src/models/tspublicRestV2GroupAdduserRequest.ts +++ /dev/null @@ -1,28 +0,0 @@ -/** - * ThoughtSpot Public REST APILib - * - * This file was automatically generated by APIMATIC v3.0 ( https://www.apimatic.io ). - */ - -import { array, lazy, object, optional, Schema, string } from '../schema'; -import { - UserNameAndIDInput, - userNameAndIDInputSchema, -} from './userNameAndIDInput'; - -export interface TspublicRestV2GroupAdduserRequest { - /** Name of the group */ - name?: string; - /** The GUID of the group to query. */ - id?: string; - /** Array of user name that you want to update in user group. */ - users: UserNameAndIDInput[]; -} - -export const tspublicRestV2GroupAdduserRequestSchema: Schema = object( - { - name: ['name', optional(string())], - id: ['id', optional(string())], - users: ['users', array(lazy(() => userNameAndIDInputSchema))], - } -); diff --git a/Typescript/src/models/tspublicRestV2GroupCreateRequest.ts b/Typescript/src/models/tspublicRestV2GroupCreateRequest.ts deleted file mode 100644 index 0521d989c..000000000 --- a/Typescript/src/models/tspublicRestV2GroupCreateRequest.ts +++ /dev/null @@ -1,61 +0,0 @@ -/** - * ThoughtSpot Public REST APILib - * - * This file was automatically generated by APIMATIC v3.0 ( https://www.apimatic.io ). - */ - -import { - array, - lazy, - number, - object, - optional, - Schema, - string, -} from '../schema'; -import { - GroupNameAndIDInput, - groupNameAndIDInputSchema, -} from './groupNameAndIDInput'; -import { PrivilegeEnum, privilegeEnumSchema } from './privilegeEnum'; -import { Type10Enum, type10EnumSchema } from './type10Enum'; -import { - UserNameAndIDInput, - userNameAndIDInputSchema, -} from './userNameAndIDInput'; -import { Visibility2Enum, visibility2EnumSchema } from './visibility2Enum'; - -export interface TspublicRestV2GroupCreateRequest { - /** Name of the user group. The group name string must be unique. */ - name: string; - /** A unique display name string for the user group, for example, Developer group. */ - displayName: string; - /** Visibility of the user group. The visibility attribute is set to DEFAULT. The DEFAULT attribute makes the user group visible for other user groups and allows them to share objects. */ - visibility?: Visibility2Enum; - /** Description text for the group. */ - description?: string; - /** A JSON array of privileges assigned to the group */ - privileges?: PrivilegeEnum[]; - /** Unique identifier of the organization. If no value is provided then group will be created in the organization associated with the login session. */ - orgId?: number; - /** Array of objects of groups that the group belong to. */ - groups?: GroupNameAndIDInput[]; - /** Array of names of user names that the group belong to. */ - users?: UserNameAndIDInput[]; - /** Type of user group. LOCAL_GROUP indicates that the user is created locally in the ThoughtSpot system. */ - type?: Type10Enum; -} - -export const tspublicRestV2GroupCreateRequestSchema: Schema = object( - { - name: ['name', string()], - displayName: ['displayName', string()], - visibility: ['visibility', optional(visibility2EnumSchema)], - description: ['description', optional(string())], - privileges: ['privileges', optional(array(privilegeEnumSchema))], - orgId: ['orgId', optional(number())], - groups: ['groups', optional(array(lazy(() => groupNameAndIDInputSchema)))], - users: ['users', optional(array(lazy(() => userNameAndIDInputSchema)))], - type: ['type', optional(type10EnumSchema)], - } -); diff --git a/Typescript/src/models/tspublicRestV2GroupRemovegroupRequest.ts b/Typescript/src/models/tspublicRestV2GroupRemovegroupRequest.ts deleted file mode 100644 index 38eb027fe..000000000 --- a/Typescript/src/models/tspublicRestV2GroupRemovegroupRequest.ts +++ /dev/null @@ -1,28 +0,0 @@ -/** - * ThoughtSpot Public REST APILib - * - * This file was automatically generated by APIMATIC v3.0 ( https://www.apimatic.io ). - */ - -import { array, lazy, object, optional, Schema, string } from '../schema'; -import { - GroupNameAndIDInput, - groupNameAndIDInputSchema, -} from './groupNameAndIDInput'; - -export interface TspublicRestV2GroupRemovegroupRequest { - /** Name of the group */ - name?: string; - /** The GUID of the group to query. */ - id?: string; - /** Array of objects of groups that the user belong to. */ - groups: GroupNameAndIDInput[]; -} - -export const tspublicRestV2GroupRemovegroupRequestSchema: Schema = object( - { - name: ['name', optional(string())], - id: ['id', optional(string())], - groups: ['groups', array(lazy(() => groupNameAndIDInputSchema))], - } -); diff --git a/Typescript/src/models/tspublicRestV2GroupRemoveprivilegeRequest.ts b/Typescript/src/models/tspublicRestV2GroupRemoveprivilegeRequest.ts deleted file mode 100644 index deca1ba84..000000000 --- a/Typescript/src/models/tspublicRestV2GroupRemoveprivilegeRequest.ts +++ /dev/null @@ -1,25 +0,0 @@ -/** - * ThoughtSpot Public REST APILib - * - * This file was automatically generated by APIMATIC v3.0 ( https://www.apimatic.io ). - */ - -import { array, object, optional, Schema, string } from '../schema'; -import { PrivilegeEnum, privilegeEnumSchema } from './privilegeEnum'; - -export interface TspublicRestV2GroupRemoveprivilegeRequest { - /** Name of the group */ - name?: string; - /** The GUID of the group to query. */ - id?: string; - /** A JSON array of name of users or GUIDs of users or both. When both are given then id is considered */ - privileges?: PrivilegeEnum[]; -} - -export const tspublicRestV2GroupRemoveprivilegeRequestSchema: Schema = object( - { - name: ['name', optional(string())], - id: ['id', optional(string())], - privileges: ['privileges', optional(array(privilegeEnumSchema))], - } -); diff --git a/Typescript/src/models/tspublicRestV2GroupRemoveuserRequest.ts b/Typescript/src/models/tspublicRestV2GroupRemoveuserRequest.ts deleted file mode 100644 index 051a172d0..000000000 --- a/Typescript/src/models/tspublicRestV2GroupRemoveuserRequest.ts +++ /dev/null @@ -1,28 +0,0 @@ -/** - * ThoughtSpot Public REST APILib - * - * This file was automatically generated by APIMATIC v3.0 ( https://www.apimatic.io ). - */ - -import { array, lazy, object, optional, Schema, string } from '../schema'; -import { - UserNameAndIDInput, - userNameAndIDInputSchema, -} from './userNameAndIDInput'; - -export interface TspublicRestV2GroupRemoveuserRequest { - /** Name of the group */ - name?: string; - /** The GUID of the group to query. */ - id?: string; - /** Array of user name that you want to delete from user group. */ - users: UserNameAndIDInput[]; -} - -export const tspublicRestV2GroupRemoveuserRequestSchema: Schema = object( - { - name: ['name', optional(string())], - id: ['id', optional(string())], - users: ['users', array(lazy(() => userNameAndIDInputSchema))], - } -); diff --git a/Typescript/src/models/tspublicRestV2GroupSearchRequest.ts b/Typescript/src/models/tspublicRestV2GroupSearchRequest.ts deleted file mode 100644 index c5fb183f9..000000000 --- a/Typescript/src/models/tspublicRestV2GroupSearchRequest.ts +++ /dev/null @@ -1,54 +0,0 @@ -/** - * ThoughtSpot Public REST APILib - * - * This file was automatically generated by APIMATIC v3.0 ( https://www.apimatic.io ). - */ - -import { array, lazy, object, optional, Schema, string } from '../schema'; -import { - GroupNameAndIDInput, - groupNameAndIDInputSchema, -} from './groupNameAndIDInput'; -import { PrivilegeEnum, privilegeEnumSchema } from './privilegeEnum'; -import { - UserNameAndIDInput, - userNameAndIDInputSchema, -} from './userNameAndIDInput'; - -export interface TspublicRestV2GroupSearchRequest { - /** Array of field names that need to be included in the response */ - outputFields?: string[]; - /** Name of the user group */ - name?: string; - /** GUID of the group to update */ - id?: string; - /** A unique display name string for the user group, for example, Developer group. */ - displayName?: string; - /** Visibility of the user group. The visibility attribute is set to DEFAULT. The DEFAULT attribute makes the user group visible for other user groups and allows them to share objects. */ - visibility?: string; - /** Description text for the group. */ - description?: string; - /** A JSON array of privileges assigned to the group */ - privileges?: PrivilegeEnum[]; - /** Array of objects of groups that the user belong to. */ - groups?: GroupNameAndIDInput[]; - /** Array of user name that associated with group. */ - users?: UserNameAndIDInput[]; - /** Type of user group. LOCAL_GROUP indicates that the user is created locally in the ThoughtSpot system. */ - type?: string; -} - -export const tspublicRestV2GroupSearchRequestSchema: Schema = object( - { - outputFields: ['outputFields', optional(array(string()))], - name: ['name', optional(string())], - id: ['id', optional(string())], - displayName: ['displayName', optional(string())], - visibility: ['visibility', optional(string())], - description: ['description', optional(string())], - privileges: ['privileges', optional(array(privilegeEnumSchema))], - groups: ['groups', optional(array(lazy(() => groupNameAndIDInputSchema)))], - users: ['users', optional(array(lazy(() => userNameAndIDInputSchema)))], - type: ['type', optional(string())], - } -); diff --git a/Typescript/src/models/tspublicRestV2GroupUpdateRequest.ts b/Typescript/src/models/tspublicRestV2GroupUpdateRequest.ts deleted file mode 100644 index e922c6180..000000000 --- a/Typescript/src/models/tspublicRestV2GroupUpdateRequest.ts +++ /dev/null @@ -1,56 +0,0 @@ -/** - * ThoughtSpot Public REST APILib - * - * This file was automatically generated by APIMATIC v3.0 ( https://www.apimatic.io ). - */ - -import { array, lazy, object, optional, Schema, string } from '../schema'; -import { - GroupNameAndIDInput, - groupNameAndIDInputSchema, -} from './groupNameAndIDInput'; -import { PrivilegeEnum, privilegeEnumSchema } from './privilegeEnum'; -import { Type10Enum, type10EnumSchema } from './type10Enum'; -import { - UserNameAndIDInput, - userNameAndIDInputSchema, -} from './userNameAndIDInput'; -import { Visibility2Enum, visibility2EnumSchema } from './visibility2Enum'; - -export interface TspublicRestV2GroupUpdateRequest { - /** Name of the user group. The group name string must be unique. */ - name?: string; - /** he GUID of the user account to query. */ - id?: string; - /** A unique display name string for the user group, for example, Developer group. */ - displayName?: string; - /** Visibility of the user group. The visibility attribute is set to DEFAULT. The DEFAULT attribute makes the user group visible for other user groups and allows them to share objects. */ - visibility?: Visibility2Enum; - /** Description text for the group. */ - description?: string; - /** A JSON array of privileges assigned to the group */ - privileges?: PrivilegeEnum[]; - /** Array of objects of groups that the user belong to. */ - groups?: GroupNameAndIDInput[]; - /** Array of object, A JSON array of name of users of users. */ - users?: UserNameAndIDInput[]; - /** Array of string. An array of liveboard ids to be assigned to the group. */ - assignedLiveboards?: string[]; - /** Type of user group. LOCAL_GROUP indicates that the user is created locally in the ThoughtSpot system. */ - type?: Type10Enum; -} - -export const tspublicRestV2GroupUpdateRequestSchema: Schema = object( - { - name: ['name', optional(string())], - id: ['id', optional(string())], - displayName: ['displayName', optional(string())], - visibility: ['visibility', optional(visibility2EnumSchema)], - description: ['description', optional(string())], - privileges: ['privileges', optional(array(privilegeEnumSchema))], - groups: ['groups', optional(array(lazy(() => groupNameAndIDInputSchema)))], - users: ['users', optional(array(lazy(() => userNameAndIDInputSchema)))], - assignedLiveboards: ['assignedLiveboards', optional(array(string()))], - type: ['type', optional(type10EnumSchema)], - } -); diff --git a/Typescript/src/models/tspublicRestV2MaterializationRefreshviewRequest.ts b/Typescript/src/models/tspublicRestV2MaterializationRefreshviewRequest.ts deleted file mode 100644 index f8fc8aea1..000000000 --- a/Typescript/src/models/tspublicRestV2MaterializationRefreshviewRequest.ts +++ /dev/null @@ -1,16 +0,0 @@ -/** - * ThoughtSpot Public REST APILib - * - * This file was automatically generated by APIMATIC v3.0 ( https://www.apimatic.io ). - */ - -import { object, Schema, string } from '../schema'; - -export interface TspublicRestV2MaterializationRefreshviewRequest { - /** GUID of metadata object */ - id: string; -} - -export const tspublicRestV2MaterializationRefreshviewRequestSchema: Schema = object( - { id: ['id', string()] } -); diff --git a/Typescript/src/models/tspublicRestV2MetadataDependencyRequest.ts b/Typescript/src/models/tspublicRestV2MetadataDependencyRequest.ts deleted file mode 100644 index 7d8a0d2ca..000000000 --- a/Typescript/src/models/tspublicRestV2MetadataDependencyRequest.ts +++ /dev/null @@ -1,25 +0,0 @@ -/** - * ThoughtSpot Public REST APILib - * - * This file was automatically generated by APIMATIC v3.0 ( https://www.apimatic.io ). - */ - -import { array, number, object, optional, Schema, string } from '../schema'; -import { Type13Enum, type13EnumSchema } from './type13Enum'; - -export interface TspublicRestV2MetadataDependencyRequest { - /** Type of the data object */ - type: Type13Enum; - /** A JSON array of GUIDs of the objects */ - id: string[]; - /** The maximum number of batches to fetch in a query. If this attribute is not defined, the value specified in the cluster configuration is used. To get the list of all dependent objects in a single query, define the batch size attribute as -1 */ - batchSize?: number; -} - -export const tspublicRestV2MetadataDependencyRequestSchema: Schema = object( - { - type: ['type', type13EnumSchema], - id: ['id', array(string())], - batchSize: ['batchSize', optional(number())], - } -); diff --git a/Typescript/src/models/tspublicRestV2MetadataDetailSearchRequest.ts b/Typescript/src/models/tspublicRestV2MetadataDetailSearchRequest.ts deleted file mode 100644 index 35cd00064..000000000 --- a/Typescript/src/models/tspublicRestV2MetadataDetailSearchRequest.ts +++ /dev/null @@ -1,31 +0,0 @@ -/** - * ThoughtSpot Public REST APILib - * - * This file was automatically generated by APIMATIC v3.0 ( https://www.apimatic.io ). - */ - -import { array, boolean, object, optional, Schema, string } from '../schema'; -import { Type6Enum, type6EnumSchema } from './type6Enum'; - -export interface TspublicRestV2MetadataDetailSearchRequest { - /** Type of the metadata object being searched. */ - type: Type6Enum; - /** A JSON array of GUIDs of the objects. */ - id: string[]; - /** When set to true, returns details of the hidden objects, such as a column in a worksheet or a table. */ - showHidden?: boolean; - /** When set to true, the search assist data associated with a worksheet is not included in the API response. This attribute is applicable only for DATAOBJECT data type. */ - dropQuestionDetails?: boolean; - /** Specify the version to retrieve the objects from. By default, the API returns metadata for all versions of the object. */ - version?: string; -} - -export const tspublicRestV2MetadataDetailSearchRequestSchema: Schema = object( - { - type: ['type', type6EnumSchema], - id: ['id', array(string())], - showHidden: ['showHidden', optional(boolean())], - dropQuestionDetails: ['dropQuestionDetails', optional(boolean())], - version: ['version', optional(string())], - } -); diff --git a/Typescript/src/models/tspublicRestV2MetadataFavoriteAssignRequest.ts b/Typescript/src/models/tspublicRestV2MetadataFavoriteAssignRequest.ts deleted file mode 100644 index ee6694c48..000000000 --- a/Typescript/src/models/tspublicRestV2MetadataFavoriteAssignRequest.ts +++ /dev/null @@ -1,25 +0,0 @@ -/** - * ThoughtSpot Public REST APILib - * - * This file was automatically generated by APIMATIC v3.0 ( https://www.apimatic.io ). - */ - -import { array, lazy, object, optional, Schema, string } from '../schema'; -import { TsObjectInput, tsObjectInputSchema } from './tsObjectInput'; - -export interface TspublicRestV2MetadataFavoriteAssignRequest { - /** Name of the user */ - userName?: string; - /** The GUID of the user */ - userId?: string; - /** A JSON Array of GUIDs and type of metadata object. */ - tsObject: TsObjectInput[]; -} - -export const tspublicRestV2MetadataFavoriteAssignRequestSchema: Schema = object( - { - userName: ['userName', optional(string())], - userId: ['userId', optional(string())], - tsObject: ['tsObject', array(lazy(() => tsObjectInputSchema))], - } -); diff --git a/Typescript/src/models/tspublicRestV2MetadataFavoriteUnassignRequest.ts b/Typescript/src/models/tspublicRestV2MetadataFavoriteUnassignRequest.ts deleted file mode 100644 index 4e7daa5f9..000000000 --- a/Typescript/src/models/tspublicRestV2MetadataFavoriteUnassignRequest.ts +++ /dev/null @@ -1,25 +0,0 @@ -/** - * ThoughtSpot Public REST APILib - * - * This file was automatically generated by APIMATIC v3.0 ( https://www.apimatic.io ). - */ - -import { array, lazy, object, optional, Schema, string } from '../schema'; -import { TsObjectInput, tsObjectInputSchema } from './tsObjectInput'; - -export interface TspublicRestV2MetadataFavoriteUnassignRequest { - /** Name of the user */ - userName?: string; - /** The GUID of the user */ - userId?: string; - /** A JSON Array of GUIDs and type of metadata object. */ - tsObject: TsObjectInput[]; -} - -export const tspublicRestV2MetadataFavoriteUnassignRequestSchema: Schema = object( - { - userName: ['userName', optional(string())], - userId: ['userId', optional(string())], - tsObject: ['tsObject', array(lazy(() => tsObjectInputSchema))], - } -); diff --git a/Typescript/src/models/tspublicRestV2MetadataHeaderSearchRequest.ts b/Typescript/src/models/tspublicRestV2MetadataHeaderSearchRequest.ts deleted file mode 100644 index 121f35c90..000000000 --- a/Typescript/src/models/tspublicRestV2MetadataHeaderSearchRequest.ts +++ /dev/null @@ -1,107 +0,0 @@ -/** - * ThoughtSpot Public REST APILib - * - * This file was automatically generated by APIMATIC v3.0 ( https://www.apimatic.io ). - */ - -import { - array, - boolean, - lazy, - number, - object, - optional, - Schema, - string, -} from '../schema'; -import { AccessLevelInput, accessLevelInputSchema } from './accessLevelInput'; -import { NameAndIdInput, nameAndIdInputSchema } from './nameAndIdInput'; -import { SortByEnum, sortByEnumSchema } from './sortByEnum'; -import { SortOrderEnum, sortOrderEnumSchema } from './sortOrderEnum'; -import { - TagNameAndIdInput, - tagNameAndIdInputSchema, -} from './tagNameAndIdInput'; -import { Type3Enum, type3EnumSchema } from './type3Enum'; - -export interface TspublicRestV2MetadataHeaderSearchRequest { - /** Array of header field names that need to be included in the header response */ - outputFields?: string[]; - /** The batch offset, starting from where the records should be included in the response. If no input is provided then offset starts from 0. Default: 0 */ - offset?: number; - /** - * An alternate way to set offset for the starting point of the response. - * The value in offset field will not be considered if batchNumber field has value greater than 0. - * Offset value will be calculated as (batchNumber - 1) * batchSize. - * It is mandatory to provide a value for batchSize with batchNumber. - * Example: - * Assume response has 100 records. Now, batchNumber is set as 2 and batchSize as 10, then offset value will be 10. So, 10 records starting from 11th record will be considered. - */ - batchNumber?: number; - /** The number of records that should be included in the response starting from offset position. If no input is provided then first page is included in the response. */ - batchSize?: number; - /** Field based on which the response needs to be ordered. */ - sortBy?: SortByEnum; - /** Order in which sortBy should be applied. */ - sortOrder?: SortOrderEnum; - /** Type of the metadata object being searched. */ - type: Type3Enum; - /** A pattern to match the name of the metadata object. This parameter supports matching case-insensitive strings. For a wildcard match, use %. */ - namePattern?: string; - /** A JSON array containing the GUIDs of the metadata objects that you want to fetch. */ - fetchId?: string[]; - /** A JSON array containing the GUIDs of the metadata objects that you want to skip. */ - skipId?: string[]; - /** When set to true, returns details of the hidden objects, such as a column in a worksheet or a table. */ - showHidden?: boolean; - /** A flag to indicate whether to list only the auto created objects. When no value is provided as input then all objects are returned. */ - autoCreated?: boolean; - /** - * A JSON array of objects with user details for which the metadata objects should be considered from the repository - * If you specify ID or name of user and set the type parameter to USER, the API returns metadata objects associated with the user - * If you specify ID or name of user group and set the type parameter to USER_GROUP, the API returns metadata objects for all the users mapped to the specified user group. - * If the id or name parameter is not defined, but the type attribute is set to USER or USER_GROUP, then the API will not return and response. - * If no input is provided for any field for this object, then the API returns headers for all users. - * If both name and id is provided, then id will be considered. - */ - accessLevel?: AccessLevelInput[]; - /** A JSON array of name or GUID of tags or both. When both are given then id is considered. */ - tag?: TagNameAndIdInput[]; - /** A JSON array of name or GUID of the user or both for whom the object is assigned as favorite. When both are given then id is considered. */ - favoriteFor?: NameAndIdInput[]; - /** A JSON array of name or GUID of the user or both who created the object. When both are given then id is considered */ - author?: NameAndIdInput[]; - /** A JSON array of name or GUID of the user or both who last modified the object. When both are given then id is considered. */ - lastModifiedBy?: NameAndIdInput[]; -} - -export const tspublicRestV2MetadataHeaderSearchRequestSchema: Schema = object( - { - outputFields: ['outputFields', optional(array(string()))], - offset: ['offset', optional(number())], - batchNumber: ['batchNumber', optional(number())], - batchSize: ['batchSize', optional(number())], - sortBy: ['sortBy', optional(sortByEnumSchema)], - sortOrder: ['sortOrder', optional(sortOrderEnumSchema)], - type: ['type', type3EnumSchema], - namePattern: ['namePattern', optional(string())], - fetchId: ['fetchId', optional(array(string()))], - skipId: ['skipId', optional(array(string()))], - showHidden: ['showHidden', optional(boolean())], - autoCreated: ['autoCreated', optional(boolean())], - accessLevel: [ - 'accessLevel', - optional(array(lazy(() => accessLevelInputSchema))), - ], - tag: ['tag', optional(array(lazy(() => tagNameAndIdInputSchema)))], - favoriteFor: [ - 'favoriteFor', - optional(array(lazy(() => nameAndIdInputSchema))), - ], - author: ['author', optional(array(lazy(() => nameAndIdInputSchema)))], - lastModifiedBy: [ - 'lastModifiedBy', - optional(array(lazy(() => nameAndIdInputSchema))), - ], - } -); diff --git a/Typescript/src/models/tspublicRestV2MetadataHomeliveboardAssignRequest.ts b/Typescript/src/models/tspublicRestV2MetadataHomeliveboardAssignRequest.ts deleted file mode 100644 index 5e70c8c6d..000000000 --- a/Typescript/src/models/tspublicRestV2MetadataHomeliveboardAssignRequest.ts +++ /dev/null @@ -1,24 +0,0 @@ -/** - * ThoughtSpot Public REST APILib - * - * This file was automatically generated by APIMATIC v3.0 ( https://www.apimatic.io ). - */ - -import { object, optional, Schema, string } from '../schema'; - -export interface TspublicRestV2MetadataHomeliveboardAssignRequest { - /** Name of the user */ - userName?: string; - /** The GUID of the user */ - userId?: string; - /** The GUID of the liveboard */ - liveboardId?: string; -} - -export const tspublicRestV2MetadataHomeliveboardAssignRequestSchema: Schema = object( - { - userName: ['userName', optional(string())], - userId: ['userId', optional(string())], - liveboardId: ['liveboardId', optional(string())], - } -); diff --git a/Typescript/src/models/tspublicRestV2MetadataHomeliveboardUnassignRequest.ts b/Typescript/src/models/tspublicRestV2MetadataHomeliveboardUnassignRequest.ts deleted file mode 100644 index dc6f93c9c..000000000 --- a/Typescript/src/models/tspublicRestV2MetadataHomeliveboardUnassignRequest.ts +++ /dev/null @@ -1,21 +0,0 @@ -/** - * ThoughtSpot Public REST APILib - * - * This file was automatically generated by APIMATIC v3.0 ( https://www.apimatic.io ). - */ - -import { object, optional, Schema, string } from '../schema'; - -export interface TspublicRestV2MetadataHomeliveboardUnassignRequest { - /** Name of the user */ - userName?: string; - /** The GUID of the user */ - userId?: string; -} - -export const tspublicRestV2MetadataHomeliveboardUnassignRequestSchema: Schema = object( - { - userName: ['userName', optional(string())], - userId: ['userId', optional(string())], - } -); diff --git a/Typescript/src/models/tspublicRestV2MetadataTagAssignRequest.ts b/Typescript/src/models/tspublicRestV2MetadataTagAssignRequest.ts deleted file mode 100644 index d8feaa0dc..000000000 --- a/Typescript/src/models/tspublicRestV2MetadataTagAssignRequest.ts +++ /dev/null @@ -1,25 +0,0 @@ -/** - * ThoughtSpot Public REST APILib - * - * This file was automatically generated by APIMATIC v3.0 ( https://www.apimatic.io ). - */ - -import { array, lazy, object, optional, Schema, string } from '../schema'; -import { TsObjectInput, tsObjectInputSchema } from './tsObjectInput'; - -export interface TspublicRestV2MetadataTagAssignRequest { - /** Name of the tag */ - name?: string; - /** The GUID of the tag */ - id?: string; - /** A JSON Array of GUIDs and type of metadata object. */ - tsObject: TsObjectInput[]; -} - -export const tspublicRestV2MetadataTagAssignRequestSchema: Schema = object( - { - name: ['name', optional(string())], - id: ['id', optional(string())], - tsObject: ['tsObject', array(lazy(() => tsObjectInputSchema))], - } -); diff --git a/Typescript/src/models/tspublicRestV2MetadataTagCreateRequest.ts b/Typescript/src/models/tspublicRestV2MetadataTagCreateRequest.ts deleted file mode 100644 index 0bdf49f7a..000000000 --- a/Typescript/src/models/tspublicRestV2MetadataTagCreateRequest.ts +++ /dev/null @@ -1,18 +0,0 @@ -/** - * ThoughtSpot Public REST APILib - * - * This file was automatically generated by APIMATIC v3.0 ( https://www.apimatic.io ). - */ - -import { object, optional, Schema, string } from '../schema'; - -export interface TspublicRestV2MetadataTagCreateRequest { - /** Name of the tag */ - name: string; - /** Hex color code to be assigned to the tag */ - color?: string; -} - -export const tspublicRestV2MetadataTagCreateRequestSchema: Schema = object( - { name: ['name', string()], color: ['color', optional(string())] } -); diff --git a/Typescript/src/models/tspublicRestV2MetadataTagUnassignRequest.ts b/Typescript/src/models/tspublicRestV2MetadataTagUnassignRequest.ts deleted file mode 100644 index fa845724c..000000000 --- a/Typescript/src/models/tspublicRestV2MetadataTagUnassignRequest.ts +++ /dev/null @@ -1,25 +0,0 @@ -/** - * ThoughtSpot Public REST APILib - * - * This file was automatically generated by APIMATIC v3.0 ( https://www.apimatic.io ). - */ - -import { array, lazy, object, optional, Schema, string } from '../schema'; -import { TsObjectInput, tsObjectInputSchema } from './tsObjectInput'; - -export interface TspublicRestV2MetadataTagUnassignRequest { - /** Name of the tag */ - name?: string; - /** The GUID of the tag */ - id?: string; - /** A JSON Array of GUIDs and type of metadata object. */ - tsObject: TsObjectInput[]; -} - -export const tspublicRestV2MetadataTagUnassignRequestSchema: Schema = object( - { - name: ['name', optional(string())], - id: ['id', optional(string())], - tsObject: ['tsObject', array(lazy(() => tsObjectInputSchema))], - } -); diff --git a/Typescript/src/models/tspublicRestV2MetadataTagUpdateRequest.ts b/Typescript/src/models/tspublicRestV2MetadataTagUpdateRequest.ts deleted file mode 100644 index 95fd18912..000000000 --- a/Typescript/src/models/tspublicRestV2MetadataTagUpdateRequest.ts +++ /dev/null @@ -1,24 +0,0 @@ -/** - * ThoughtSpot Public REST APILib - * - * This file was automatically generated by APIMATIC v3.0 ( https://www.apimatic.io ). - */ - -import { object, optional, Schema, string } from '../schema'; - -export interface TspublicRestV2MetadataTagUpdateRequest { - /** Name of the tag */ - name?: string; - /** The GUID of the tag */ - id?: string; - /** Hex color code to be assigned to the tag */ - color?: string; -} - -export const tspublicRestV2MetadataTagUpdateRequestSchema: Schema = object( - { - name: ['name', optional(string())], - id: ['id', optional(string())], - color: ['color', optional(string())], - } -); diff --git a/Typescript/src/models/tspublicRestV2MetadataTmlExportRequest.ts b/Typescript/src/models/tspublicRestV2MetadataTmlExportRequest.ts deleted file mode 100644 index 151234036..000000000 --- a/Typescript/src/models/tspublicRestV2MetadataTmlExportRequest.ts +++ /dev/null @@ -1,25 +0,0 @@ -/** - * ThoughtSpot Public REST APILib - * - * This file was automatically generated by APIMATIC v3.0 ( https://www.apimatic.io ). - */ - -import { array, boolean, object, optional, Schema, string } from '../schema'; -import { FormatType3Enum, formatType3EnumSchema } from './formatType3Enum'; - -export interface TspublicRestV2MetadataTmlExportRequest { - /** A JSON array of GUIDs of the objects. */ - id: string[]; - /** The format in which to export the objects */ - formatType?: FormatType3Enum; - /** Specifies if you would like to export the associated objects. To export the objects associated with the objects specified in id, set the value to true. When set to true, the API exports any underlying worksheets, tables, or views for a given object. By default, the API does not export these underlying objects */ - exportAssociated?: boolean; -} - -export const tspublicRestV2MetadataTmlExportRequestSchema: Schema = object( - { - id: ['id', array(string())], - formatType: ['formatType', optional(formatType3EnumSchema)], - exportAssociated: ['exportAssociated', optional(boolean())], - } -); diff --git a/Typescript/src/models/tspublicRestV2MetadataTmlImportRequest.ts b/Typescript/src/models/tspublicRestV2MetadataTmlImportRequest.ts deleted file mode 100644 index a2288fc5c..000000000 --- a/Typescript/src/models/tspublicRestV2MetadataTmlImportRequest.ts +++ /dev/null @@ -1,33 +0,0 @@ -/** - * ThoughtSpot Public REST APILib - * - * This file was automatically generated by APIMATIC v3.0 ( https://www.apimatic.io ). - */ - -import { array, boolean, object, optional, Schema, string } from '../schema'; -import { ImportPolicyEnum, importPolicyEnumSchema } from './importPolicyEnum'; - -export interface TspublicRestV2MetadataTmlImportRequest { - /** - * A string array of TML objects to upload, in YAML or JSON format. - * If TML is in YAML format, then use escape characters for quotes and new line characters. - * Example TML: - * guid: 6d2c1c9b-a407-409c-8c0c-819aeb51350f\ntable:\n name: TESTINT\n db: SUPPLYCHAIN_MAIN\n schema: PUBLIC\n db_table: TESTINT\n connection:\n name: SnowflakeConnection\n columns:\n - name: C1\n db_column_name: C1\n properties:\n column_type: MEASURE\n aggregation: SUM\n index_type: DONT_INDEX\n db_column_properties:\n data_type: INT64\n - * If TML is in JSON format, then use escape characters for quotes. - * Example TML: - * {\\"guid\\": \\"6d2c1c9b-a407-409c-8c0c-819aeb51350f\\", \\"table\\": { \\"name\\": \\"TESTINT\\", \\"db\\": \\"SUPPLYCHAIN_MAIN\\", \\"schema\\": \\"PUBLIC\\", \\"db_table\\": \\"TESTINT\\", \\"connection\\": { \\"name\\": \\"SnowflakeConnection\\" }, \\"columns\\": [ { \\"name\\": \\"C1\\", \\"db_column_name\\": \\"C1\\", \\"properties\\": { \\"column_type\\": \\"MEASURE\\", \\"aggregation\\": \\"SUM\\", \\"index_type\\": \\"DONT_INDEX\\" }, \\"db_column_properties\\": { \\"data_type\\": \\"INT64\\" } } ] } }', - */ - objectTML: string[]; - /** Policy to follow during import */ - importPolicy?: ImportPolicyEnum; - /** Specifies if you are updating or creating objects. To create new objects, specify true. By default, ThoughtSpot updates existing objects that have the same GUID as the objects you are importing. When set to true, the GUID property in the imported TML is replaced on the server, and the response headers will include the id_guid property with the GUID of the new object. The new object will be assigned a new GUID, even if the imported TML file included a guid value. Thus, there is no need to include the guid in the TML file if you are using forceCreate=true. */ - forceCreate?: boolean; -} - -export const tspublicRestV2MetadataTmlImportRequestSchema: Schema = object( - { - objectTML: ['objectTML', array(string())], - importPolicy: ['importPolicy', optional(importPolicyEnumSchema)], - forceCreate: ['forceCreate', optional(boolean())], - } -); diff --git a/Typescript/src/models/tspublicRestV2OrgCreateRequest.ts b/Typescript/src/models/tspublicRestV2OrgCreateRequest.ts deleted file mode 100644 index 58a61c1ad..000000000 --- a/Typescript/src/models/tspublicRestV2OrgCreateRequest.ts +++ /dev/null @@ -1,18 +0,0 @@ -/** - * ThoughtSpot Public REST APILib - * - * This file was automatically generated by APIMATIC v3.0 ( https://www.apimatic.io ). - */ - -import { object, optional, Schema, string } from '../schema'; - -export interface TspublicRestV2OrgCreateRequest { - /** Name of the organization. */ - name: string; - /** Description text for the organization. */ - description?: string; -} - -export const tspublicRestV2OrgCreateRequestSchema: Schema = object( - { name: ['name', string()], description: ['description', optional(string())] } -); diff --git a/Typescript/src/models/tspublicRestV2OrgSearchRequest.ts b/Typescript/src/models/tspublicRestV2OrgSearchRequest.ts deleted file mode 100644 index 10fb521f4..000000000 --- a/Typescript/src/models/tspublicRestV2OrgSearchRequest.ts +++ /dev/null @@ -1,24 +0,0 @@ -/** - * ThoughtSpot Public REST APILib - * - * This file was automatically generated by APIMATIC v3.0 ( https://www.apimatic.io ). - */ - -import { boolean, number, object, optional, Schema, string } from '../schema'; - -export interface TspublicRestV2OrgSearchRequest { - /** Name of the organization. */ - name?: string; - /** The ID of the organization. */ - id?: number; - /** When set to true, the response will include the details of deleted organization also. */ - showDeleted?: boolean; -} - -export const tspublicRestV2OrgSearchRequestSchema: Schema = object( - { - name: ['name', optional(string())], - id: ['id', optional(number())], - showDeleted: ['showDeleted', optional(boolean())], - } -); diff --git a/Typescript/src/models/tspublicRestV2OrgUpdateRequest.ts b/Typescript/src/models/tspublicRestV2OrgUpdateRequest.ts deleted file mode 100644 index 3b15e5e9b..000000000 --- a/Typescript/src/models/tspublicRestV2OrgUpdateRequest.ts +++ /dev/null @@ -1,27 +0,0 @@ -/** - * ThoughtSpot Public REST APILib - * - * This file was automatically generated by APIMATIC v3.0 ( https://www.apimatic.io ). - */ - -import { boolean, number, object, optional, Schema, string } from '../schema'; - -export interface TspublicRestV2OrgUpdateRequest { - /** Name of the organization. */ - name?: string; - /** The ID of the organization. */ - id?: number; - /** Description text for the organization. */ - description?: string; - /** Status of the organization. */ - active?: boolean; -} - -export const tspublicRestV2OrgUpdateRequestSchema: Schema = object( - { - name: ['name', optional(string())], - id: ['id', optional(number())], - description: ['description', optional(string())], - active: ['active', optional(boolean())], - } -); diff --git a/Typescript/src/models/tspublicRestV2SecurityPermissionPrincipalSearchRequest.ts b/Typescript/src/models/tspublicRestV2SecurityPermissionPrincipalSearchRequest.ts deleted file mode 100644 index e769bcd11..000000000 --- a/Typescript/src/models/tspublicRestV2SecurityPermissionPrincipalSearchRequest.ts +++ /dev/null @@ -1,32 +0,0 @@ -/** - * ThoughtSpot Public REST APILib - * - * This file was automatically generated by APIMATIC v3.0 ( https://www.apimatic.io ). - */ - -import { array, lazy, object, optional, Schema } from '../schema'; -import { - TsObjectSearchInput, - tsObjectSearchInputSchema, -} from './tsObjectSearchInput'; -import { - UserNameAndIDInput, - userNameAndIDInputSchema, -} from './userNameAndIDInput'; - -export interface TspublicRestV2SecurityPermissionPrincipalSearchRequest { - /** A JSON array of principal names or GUIDs to be included in the request. When both are given then id is considered. */ - principal: UserNameAndIDInput[]; - /** A JSON Array of GUIDs and type of metadata object. */ - tsObject?: TsObjectSearchInput[]; -} - -export const tspublicRestV2SecurityPermissionPrincipalSearchRequestSchema: Schema = object( - { - principal: ['principal', array(lazy(() => userNameAndIDInputSchema))], - tsObject: [ - 'tsObject', - optional(array(lazy(() => tsObjectSearchInputSchema))), - ], - } -); diff --git a/Typescript/src/models/tspublicRestV2SecurityPermissionTsobjectSearchRequest.ts b/Typescript/src/models/tspublicRestV2SecurityPermissionTsobjectSearchRequest.ts deleted file mode 100644 index 29802f50e..000000000 --- a/Typescript/src/models/tspublicRestV2SecurityPermissionTsobjectSearchRequest.ts +++ /dev/null @@ -1,35 +0,0 @@ -/** - * ThoughtSpot Public REST APILib - * - * This file was automatically generated by APIMATIC v3.0 ( https://www.apimatic.io ). - */ - -import { array, boolean, lazy, object, optional, Schema } from '../schema'; -import { - TsObjectSearchInput, - tsObjectSearchInputSchema, -} from './tsObjectSearchInput'; -import { - UserNameAndIDInput, - userNameAndIDInputSchema, -} from './userNameAndIDInput'; - -export interface TspublicRestV2SecurityPermissionTsobjectSearchRequest { - /** A JSON Array of GUIDs and type of metadata object. */ - tsObject: TsObjectSearchInput[]; - /** A JSON array of principal names or GUIDs. When both are given then id is considered. */ - principal?: UserNameAndIDInput[]; - /** When this field is set to true, the API response includes the permission details for the dependent objects. */ - includeDependent?: boolean; -} - -export const tspublicRestV2SecurityPermissionTsobjectSearchRequestSchema: Schema = object( - { - tsObject: ['tsObject', array(lazy(() => tsObjectSearchInputSchema))], - principal: [ - 'principal', - optional(array(lazy(() => userNameAndIDInputSchema))), - ], - includeDependent: ['includeDependent', optional(boolean())], - } -); diff --git a/Typescript/src/models/tspublicRestV2SecurityShareTsobjectRequest.ts b/Typescript/src/models/tspublicRestV2SecurityShareTsobjectRequest.ts deleted file mode 100644 index 5fe175124..000000000 --- a/Typescript/src/models/tspublicRestV2SecurityShareTsobjectRequest.ts +++ /dev/null @@ -1,42 +0,0 @@ -/** - * ThoughtSpot Public REST APILib - * - * This file was automatically generated by APIMATIC v3.0 ( https://www.apimatic.io ). - */ - -import { array, boolean, object, optional, Schema, string } from '../schema'; -import { Type18Enum, type18EnumSchema } from './type18Enum'; - -export interface TspublicRestV2SecurityShareTsobjectRequest { - /** Type of metadata object. Valid values: Liveboard|Answer|DataObject|Column */ - type: Type18Enum; - /** A JSON array of the GUIDs of the objects to be shared */ - id: string[]; - /** - * A JSON object with GUIDs of user and user group, and the type of access privilge. - * You can provide READ_ONLY or MODIFY access to the objects. With READ_ONLY access, the user or user group can view the shared object, whereas MODIFY access enables users to modify the object. - * To remove access to a shared object, you can set the shareMode in the permission string to NO_ACCESS. Example: - * {"permissions": {"e7040a64-7ff1-4ab9-a1b0-f1acac596866": {"shareMode": "READ_ONLY"}, "f7b8f511-317c-485d-8131-26cf084ef47b": {"shareMode": "MODIFY"}, "7a9a6715-e154-431b-baaf-7b58246c13dd":{"shareMode":"NO_ACCESS"}}} - */ - permission: string; - /** The email addresses that should ne notified when the objects are shared. */ - emailId?: string[]; - /** When set to true, a notification is sent to the users after an object is shared. */ - notify?: boolean; - /** The message text to send in the notification email. */ - message?: string; - /** When set to true, ThoughtSpot sends a link with the host application context to allow users to access the shared object from their ThoughtSpot embedded instance. */ - includeCustomEmbedUrl?: boolean; -} - -export const tspublicRestV2SecurityShareTsobjectRequestSchema: Schema = object( - { - type: ['type', type18EnumSchema], - id: ['id', array(string())], - permission: ['permission', string()], - emailId: ['emailId', optional(array(string()))], - notify: ['notify', optional(boolean())], - message: ['message', optional(string())], - includeCustomEmbedUrl: ['includeCustomEmbedUrl', optional(boolean())], - } -); diff --git a/Typescript/src/models/tspublicRestV2SecurityShareVisualizationRequest.ts b/Typescript/src/models/tspublicRestV2SecurityShareVisualizationRequest.ts deleted file mode 100644 index 5d8711e41..000000000 --- a/Typescript/src/models/tspublicRestV2SecurityShareVisualizationRequest.ts +++ /dev/null @@ -1,36 +0,0 @@ -/** - * ThoughtSpot Public REST APILib - * - * This file was automatically generated by APIMATIC v3.0 ( https://www.apimatic.io ). - */ - -import { array, boolean, object, optional, Schema, string } from '../schema'; - -export interface TspublicRestV2SecurityShareVisualizationRequest { - /** A JSON array of the GUIDs of the objects to be shared */ - id: string; - /** The GUID of visualization */ - vizId: string; - /** The GUID of the users and user groups with which you want to share the visualization */ - principalId: string[]; - /** The email addresses that should ne notified when the objects are shared */ - emailId?: string[]; - /** When set to true, a notification is sent to the users after an object is shared. */ - notify?: boolean; - /** The message text to send in the notification email. */ - message?: string; - /** When set to true, ThoughtSpot sends a link with the host application context to allow users to access the shared object from their ThoughtSpot embedded instance. */ - includeCustomEmbedUrl?: boolean; -} - -export const tspublicRestV2SecurityShareVisualizationRequestSchema: Schema = object( - { - id: ['id', string()], - vizId: ['vizId', string()], - principalId: ['principalId', array(string())], - emailId: ['emailId', optional(array(string()))], - notify: ['notify', optional(boolean())], - message: ['message', optional(string())], - includeCustomEmbedUrl: ['includeCustomEmbedUrl', optional(boolean())], - } -); diff --git a/Typescript/src/models/tspublicRestV2UserAddgroupRequest.ts b/Typescript/src/models/tspublicRestV2UserAddgroupRequest.ts deleted file mode 100644 index d6240c55a..000000000 --- a/Typescript/src/models/tspublicRestV2UserAddgroupRequest.ts +++ /dev/null @@ -1,28 +0,0 @@ -/** - * ThoughtSpot Public REST APILib - * - * This file was automatically generated by APIMATIC v3.0 ( https://www.apimatic.io ). - */ - -import { array, lazy, object, optional, Schema, string } from '../schema'; -import { - GroupNameAndIDInput, - groupNameAndIDInputSchema, -} from './groupNameAndIDInput'; - -export interface TspublicRestV2UserAddgroupRequest { - /** User name of the user account */ - name?: string; - /** The GUID of the user account */ - id?: string; - /** Array of objects of groups that the user belong to. */ - groups: GroupNameAndIDInput[]; -} - -export const tspublicRestV2UserAddgroupRequestSchema: Schema = object( - { - name: ['name', optional(string())], - id: ['id', optional(string())], - groups: ['groups', array(lazy(() => groupNameAndIDInputSchema))], - } -); diff --git a/Typescript/src/models/tspublicRestV2UserAddorgRequest.ts b/Typescript/src/models/tspublicRestV2UserAddorgRequest.ts deleted file mode 100644 index 91cb2c8f7..000000000 --- a/Typescript/src/models/tspublicRestV2UserAddorgRequest.ts +++ /dev/null @@ -1,25 +0,0 @@ -/** - * ThoughtSpot Public REST APILib - * - * This file was automatically generated by APIMATIC v3.0 ( https://www.apimatic.io ). - */ - -import { array, lazy, number, object, optional, Schema } from '../schema'; -import { - UserNameAndIDInput, - userNameAndIDInputSchema, -} from './userNameAndIDInput'; - -export interface TspublicRestV2UserAddorgRequest { - /** The ID of the organization. */ - orgId?: number; - /** Array of objects. A JSON array of name of users or GUIDs of users or both. When both are given then id is considered */ - users: UserNameAndIDInput[]; -} - -export const tspublicRestV2UserAddorgRequestSchema: Schema = object( - { - orgId: ['orgId', optional(number())], - users: ['users', array(lazy(() => userNameAndIDInputSchema))], - } -); diff --git a/Typescript/src/models/tspublicRestV2UserChangepasswordRequest.ts b/Typescript/src/models/tspublicRestV2UserChangepasswordRequest.ts deleted file mode 100644 index d164409fd..000000000 --- a/Typescript/src/models/tspublicRestV2UserChangepasswordRequest.ts +++ /dev/null @@ -1,27 +0,0 @@ -/** - * ThoughtSpot Public REST APILib - * - * This file was automatically generated by APIMATIC v3.0 ( https://www.apimatic.io ). - */ - -import { object, optional, Schema, string } from '../schema'; - -export interface TspublicRestV2UserChangepasswordRequest { - /** User name of the user account. */ - name?: string; - /** The GUID of the user account to query. */ - id?: string; - /** The current password of the user. */ - currentPassword: string; - /** A new password for the user. */ - newPassword: string; -} - -export const tspublicRestV2UserChangepasswordRequestSchema: Schema = object( - { - name: ['name', optional(string())], - id: ['id', optional(string())], - currentPassword: ['currentPassword', string()], - newPassword: ['newPassword', string()], - } -); diff --git a/Typescript/src/models/tspublicRestV2UserRemovegroupRequest.ts b/Typescript/src/models/tspublicRestV2UserRemovegroupRequest.ts deleted file mode 100644 index d6b261b82..000000000 --- a/Typescript/src/models/tspublicRestV2UserRemovegroupRequest.ts +++ /dev/null @@ -1,28 +0,0 @@ -/** - * ThoughtSpot Public REST APILib - * - * This file was automatically generated by APIMATIC v3.0 ( https://www.apimatic.io ). - */ - -import { array, lazy, object, optional, Schema, string } from '../schema'; -import { - GroupNameAndIDInput, - groupNameAndIDInputSchema, -} from './groupNameAndIDInput'; - -export interface TspublicRestV2UserRemovegroupRequest { - /** User name of the user account */ - name?: string; - /** The GUID of the user account */ - id?: string; - /** Array of objects of groups that the user belong to. */ - groups: GroupNameAndIDInput[]; -} - -export const tspublicRestV2UserRemovegroupRequestSchema: Schema = object( - { - name: ['name', optional(string())], - id: ['id', optional(string())], - groups: ['groups', array(lazy(() => groupNameAndIDInputSchema))], - } -); diff --git a/Typescript/src/models/tspublicRestV2UserSearchRequest.ts b/Typescript/src/models/tspublicRestV2UserSearchRequest.ts deleted file mode 100644 index 5a5264119..000000000 --- a/Typescript/src/models/tspublicRestV2UserSearchRequest.ts +++ /dev/null @@ -1,70 +0,0 @@ -/** - * ThoughtSpot Public REST APILib - * - * This file was automatically generated by APIMATIC v3.0 ( https://www.apimatic.io ). - */ - -import { - array, - boolean, - lazy, - object, - optional, - Schema, - string, -} from '../schema'; -import { - GroupNameAndIDInput, - groupNameAndIDInputSchema, -} from './groupNameAndIDInput'; -import { PrivilegeEnum, privilegeEnumSchema } from './privilegeEnum'; - -export interface TspublicRestV2UserSearchRequest { - /** Array of field names that need to be included in the response */ - outputFields?: string[]; - /** User name of the user account */ - name?: string; - /** The GUID of the user account */ - id?: string; - /** A unique display name string for the user, usually their first and last name. */ - displayName?: string; - /** Visibility of the user account. The visibility attribute is set to DEFAULT when creating a user. The DEFAULT attribute makes a user visible to other users and user groups, and thus allows them to share objects. */ - visibility?: string; - /** email of the user. */ - mail?: string; - /** Array of objects of groups that the user belong to. */ - groups?: GroupNameAndIDInput[]; - /** Privileges assigned to user account */ - privileges?: PrivilegeEnum[]; - /** Status of user account. acitve or inactive. */ - state?: string; - /** User preference for receiving email notifications when another ThoughtSpot user shares answers or pinboards. */ - notifyOnShare?: boolean; - /** The user preference for revisiting the onboarding experience. */ - showWalkMe?: boolean; - /** ThoughtSpot provides an interactive guided walkthrough to onboard new users. The onboarding experience leads users through a set of actions to help users get started and accomplish their tasks quickly. The users can turn off the Onboarding experience and access it again when they need assistance with the ThoughtSpot UI. */ - analystOnboardingComplete?: boolean; - /** Type of user. LOCAL_USER indicates that the user is created locally in the ThoughtSpot system. */ - type?: string; -} - -export const tspublicRestV2UserSearchRequestSchema: Schema = object( - { - outputFields: ['outputFields', optional(array(string()))], - name: ['name', optional(string())], - id: ['id', optional(string())], - displayName: ['displayName', optional(string())], - visibility: ['visibility', optional(string())], - mail: ['mail', optional(string())], - groups: ['groups', optional(array(lazy(() => groupNameAndIDInputSchema)))], - privileges: ['privileges', optional(array(privilegeEnumSchema))], - state: ['state', optional(string())], - notifyOnShare: ['notifyOnShare', optional(boolean())], - showWalkMe: ['showWalkMe', optional(boolean())], - analystOnboardingComplete: [ - 'analystOnboardingComplete', - optional(boolean()), - ], - type: ['type', optional(string())], - } -); diff --git a/Typescript/src/models/tspublicRestV2UserUpdateRequest.ts b/Typescript/src/models/tspublicRestV2UserUpdateRequest.ts deleted file mode 100644 index bfe47663e..000000000 --- a/Typescript/src/models/tspublicRestV2UserUpdateRequest.ts +++ /dev/null @@ -1,66 +0,0 @@ -/** - * ThoughtSpot Public REST APILib - * - * This file was automatically generated by APIMATIC v3.0 ( https://www.apimatic.io ). - */ - -import { - array, - boolean, - lazy, - object, - optional, - Schema, - string, -} from '../schema'; -import { - GroupNameAndIDInput, - groupNameAndIDInputSchema, -} from './groupNameAndIDInput'; -import { State1Enum, state1EnumSchema } from './state1Enum'; -import { Type9Enum, type9EnumSchema } from './type9Enum'; -import { Visibility1Enum, visibility1EnumSchema } from './visibility1Enum'; - -export interface TspublicRestV2UserUpdateRequest { - /** Name of the user. The username string must be unique. */ - name?: string; - /** The GUID of the user account to query */ - id?: string; - /** A unique display name string for the user, usually their first and last name. */ - displayName?: string; - /** Visibility of the user account. The visibility attribute is set to DEFAULT when creating a user. The DEFAULT attribute makes a user visible to other users and user groups, and thus allows them to share objects. */ - visibility?: Visibility1Enum; - /** email of the user. */ - mail?: string; - /** Status of user account. acitve or inactive. */ - state?: State1Enum; - /** User preference for receiving email notifications when another ThoughtSpot user shares answers or pinboards. */ - notifyOnShare?: boolean; - /** The user preference for revisiting the onboarding experience. */ - showWalkMe?: boolean; - /** ThoughtSpot provides an interactive guided walkthrough to onboard new users. The onboarding experience leads users through a set of actions to help users get started and accomplish their tasks quickly. The users can turn off the Onboarding experience and access it again when they need assistance with the ThoughtSpot UI. */ - analystOnboardingComplete?: boolean; - /** Type of user. LOCAL_USER indicates that the user is created locally in the ThoughtSpot system. */ - type?: Type9Enum; - /** Array of objects of groups that the user belong to. */ - groups?: GroupNameAndIDInput[]; -} - -export const tspublicRestV2UserUpdateRequestSchema: Schema = object( - { - name: ['name', optional(string())], - id: ['id', optional(string())], - displayName: ['displayName', optional(string())], - visibility: ['visibility', optional(visibility1EnumSchema)], - mail: ['mail', optional(string())], - state: ['state', optional(state1EnumSchema)], - notifyOnShare: ['notifyOnShare', optional(boolean())], - showWalkMe: ['showWalkMe', optional(boolean())], - analystOnboardingComplete: [ - 'analystOnboardingComplete', - optional(boolean()), - ], - type: ['type', optional(type9EnumSchema)], - groups: ['groups', optional(array(lazy(() => groupNameAndIDInputSchema)))], - } -); diff --git a/Typescript/src/models/type10Enum.ts b/Typescript/src/models/type10Enum.ts deleted file mode 100644 index 7857665cb..000000000 --- a/Typescript/src/models/type10Enum.ts +++ /dev/null @@ -1,20 +0,0 @@ -/** - * ThoughtSpot Public REST APILib - * - * This file was automatically generated by APIMATIC v3.0 ( https://www.apimatic.io ). - */ - -import { Schema, stringEnum } from '../schema'; - -/** - * Enum for Type10Enum - */ -export enum Type10Enum { - LOCALGROUP = 'LOCAL_GROUP', - TENANTGROUP = 'TENANT_GROUP', -} - -/** - * Schema for Type10Enum - */ -export const type10EnumSchema: Schema = stringEnum(Type10Enum); diff --git a/Typescript/src/models/type13Enum.ts b/Typescript/src/models/type13Enum.ts deleted file mode 100644 index e62a5dfa7..000000000 --- a/Typescript/src/models/type13Enum.ts +++ /dev/null @@ -1,22 +0,0 @@ -/** - * ThoughtSpot Public REST APILib - * - * This file was automatically generated by APIMATIC v3.0 ( https://www.apimatic.io ). - */ - -import { Schema, stringEnum } from '../schema'; - -/** - * Enum for Type13Enum - */ -export enum Type13Enum { - LIVEBOARD = 'LIVEBOARD', - DATAOBJECT = 'DATAOBJECT', - COLUMN = 'COLUMN', - JOIN = 'JOIN', -} - -/** - * Schema for Type13Enum - */ -export const type13EnumSchema: Schema = stringEnum(Type13Enum); diff --git a/Typescript/src/models/type14Enum.ts b/Typescript/src/models/type14Enum.ts deleted file mode 100644 index 9a0ef4a32..000000000 --- a/Typescript/src/models/type14Enum.ts +++ /dev/null @@ -1,29 +0,0 @@ -/** - * ThoughtSpot Public REST APILib - * - * This file was automatically generated by APIMATIC v3.0 ( https://www.apimatic.io ). - */ - -import { Schema, stringEnum } from '../schema'; - -/** - * Enum for Type14Enum - */ -export enum Type14Enum { - SNOWFLAKE = 'SNOWFLAKE', - AMAZONREDSHIFT = 'AMAZON_REDSHIFT', - GOOGLEBIGQUERY = 'GOOGLE_BIGQUERY', - AZURESYNAPSE = 'AZURE_SYNAPSE', - TERADATA = 'TERADATA', - STARBURST = 'STARBURST', - SAPHANA = 'SAP_HANA', - ORACLEADW = 'ORACLE_ADW', - DATABRICKS = 'DATABRICKS', - DENODO = 'DENODO', - DREMIO = 'DREMIO', -} - -/** - * Schema for Type14Enum - */ -export const type14EnumSchema: Schema = stringEnum(Type14Enum); diff --git a/Typescript/src/models/type15Enum.ts b/Typescript/src/models/type15Enum.ts deleted file mode 100644 index 01e8fa051..000000000 --- a/Typescript/src/models/type15Enum.ts +++ /dev/null @@ -1,29 +0,0 @@ -/** - * ThoughtSpot Public REST APILib - * - * This file was automatically generated by APIMATIC v3.0 ( https://www.apimatic.io ). - */ - -import { Schema, stringEnum } from '../schema'; - -/** - * Enum for Type15Enum - */ -export enum Type15Enum { - SNOWFLAKE = 'SNOWFLAKE', - AMAZONREDSHIFT = 'AMAZON_REDSHIFT', - GOOGLEBIGQUERY = 'GOOGLE_BIGQUERY', - AZURESYNAPSE = 'AZURE_SYNAPSE', - TERADATA = 'TERADATA', - STARBURST = 'STARBURST', - SAPHANA = 'SAP_HANA', - ORACLEADW = 'ORACLE_ADW', - DATABRICKS = 'DATABRICKS', - DENODO = 'DENODO', - DREMIO = 'DREMIO', -} - -/** - * Schema for Type15Enum - */ -export const type15EnumSchema: Schema = stringEnum(Type15Enum); diff --git a/Typescript/src/models/type16Enum.ts b/Typescript/src/models/type16Enum.ts deleted file mode 100644 index f15eef908..000000000 --- a/Typescript/src/models/type16Enum.ts +++ /dev/null @@ -1,22 +0,0 @@ -/** - * ThoughtSpot Public REST APILib - * - * This file was automatically generated by APIMATIC v3.0 ( https://www.apimatic.io ). - */ - -import { Schema, stringEnum } from '../schema'; - -/** - * Enum for Type16Enum - */ -export enum Type16Enum { - CSV = 'CSV', - XLSX = 'XLSX', - PDF = 'PDF', - PNG = 'PNG', -} - -/** - * Schema for Type16Enum - */ -export const type16EnumSchema: Schema = stringEnum(Type16Enum); diff --git a/Typescript/src/models/type18Enum.ts b/Typescript/src/models/type18Enum.ts deleted file mode 100644 index 555c1dcae..000000000 --- a/Typescript/src/models/type18Enum.ts +++ /dev/null @@ -1,22 +0,0 @@ -/** - * ThoughtSpot Public REST APILib - * - * This file was automatically generated by APIMATIC v3.0 ( https://www.apimatic.io ). - */ - -import { Schema, stringEnum } from '../schema'; - -/** - * Enum for Type18Enum - */ -export enum Type18Enum { - LIVEBOARD = 'LIVEBOARD', - ANSWER = 'ANSWER', - DATAOBJECT = 'DATAOBJECT', - COLUMN = 'COLUMN', -} - -/** - * Schema for Type18Enum - */ -export const type18EnumSchema: Schema = stringEnum(Type18Enum); diff --git a/Typescript/src/models/type1Enum.ts b/Typescript/src/models/type1Enum.ts deleted file mode 100644 index eec25168f..000000000 --- a/Typescript/src/models/type1Enum.ts +++ /dev/null @@ -1,20 +0,0 @@ -/** - * ThoughtSpot Public REST APILib - * - * This file was automatically generated by APIMATIC v3.0 ( https://www.apimatic.io ). - */ - -import { Schema, stringEnum } from '../schema'; - -/** - * Enum for Type1Enum - */ -export enum Type1Enum { - USER = 'USER', - USERGROUP = 'USER_GROUP', -} - -/** - * Schema for Type1Enum - */ -export const type1EnumSchema: Schema = stringEnum(Type1Enum); diff --git a/Typescript/src/models/type2Enum.ts b/Typescript/src/models/type2Enum.ts deleted file mode 100644 index a5101bba2..000000000 --- a/Typescript/src/models/type2Enum.ts +++ /dev/null @@ -1,22 +0,0 @@ -/** - * ThoughtSpot Public REST APILib - * - * This file was automatically generated by APIMATIC v3.0 ( https://www.apimatic.io ). - */ - -import { Schema, stringEnum } from '../schema'; - -/** - * Enum for Type2Enum - */ -export enum Type2Enum { - LIVEBOARD = 'LIVEBOARD', - ANSWER = 'ANSWER', - DATAOBJECT = 'DATAOBJECT', - COLUMN = 'COLUMN', -} - -/** - * Schema for Type2Enum - */ -export const type2EnumSchema: Schema = stringEnum(Type2Enum); diff --git a/Typescript/src/models/type3Enum.ts b/Typescript/src/models/type3Enum.ts deleted file mode 100644 index f9292e611..000000000 --- a/Typescript/src/models/type3Enum.ts +++ /dev/null @@ -1,37 +0,0 @@ -/** - * ThoughtSpot Public REST APILib - * - * This file was automatically generated by APIMATIC v3.0 ( https://www.apimatic.io ). - */ - -import { Schema, stringEnum } from '../schema'; - -/** - * Enum for Type3Enum - */ -export enum Type3Enum { - ANSWER = 'ANSWER', - LIVEBOARD = 'LIVEBOARD', - DATAOBJECTALL = 'DATAOBJECT_ALL', - DATAOBJECTWORKSHEET = 'DATAOBJECT_WORKSHEET', - DATAOBJECTTABLE = 'DATAOBJECT_TABLE', - DATAOBJECTUSERDEFINED = 'DATAOBJECT_USER_DEFINED', - DATAOBJECTVIEW = 'DATAOBJECT_VIEW', - DATAOBJECTCALENDARTABLE = 'DATAOBJECT_CALENDAR_TABLE', - COLUMNALL = 'COLUMN_ALL', - COLUMNWORKSHEET = 'COLUMN_WORKSHEET', - COLUMNTABLE = 'COLUMN_TABLE', - COLUMNUSERDEFINED = 'COLUMN_USER_DEFINED', - COLUMNVIEW = 'COLUMN_VIEW', - COLUMNCALENDARTABLE = 'COLUMN_CALENDAR_TABLE', - JOIN = 'JOIN', - CONNECTION = 'CONNECTION', - TAG = 'TAG', - USER = 'USER', - USERGROUP = 'USER_GROUP', -} - -/** - * Schema for Type3Enum - */ -export const type3EnumSchema: Schema = stringEnum(Type3Enum); diff --git a/Typescript/src/models/type4Enum.ts b/Typescript/src/models/type4Enum.ts deleted file mode 100644 index c938a71dc..000000000 --- a/Typescript/src/models/type4Enum.ts +++ /dev/null @@ -1,27 +0,0 @@ -/** - * ThoughtSpot Public REST APILib - * - * This file was automatically generated by APIMATIC v3.0 ( https://www.apimatic.io ). - */ - -import { Schema, stringEnum } from '../schema'; - -/** - * Enum for Type4Enum - */ -export enum Type4Enum { - ANSWER = 'ANSWER', - LIVEBOARD = 'LIVEBOARD', - DATAOBJECT = 'DATAOBJECT', - COLUMN = 'COLUMN', - JOIN = 'JOIN', - CONNECTION = 'CONNECTION', - TAG = 'TAG', - USER = 'USER', - USERGROUP = 'USER_GROUP', -} - -/** - * Schema for Type4Enum - */ -export const type4EnumSchema: Schema = stringEnum(Type4Enum); diff --git a/Typescript/src/models/type5Enum.ts b/Typescript/src/models/type5Enum.ts deleted file mode 100644 index c3e354c43..000000000 --- a/Typescript/src/models/type5Enum.ts +++ /dev/null @@ -1,37 +0,0 @@ -/** - * ThoughtSpot Public REST APILib - * - * This file was automatically generated by APIMATIC v3.0 ( https://www.apimatic.io ). - */ - -import { Schema, stringEnum } from '../schema'; - -/** - * Enum for Type5Enum - */ -export enum Type5Enum { - ANSWER = 'ANSWER', - LIVEBOARD = 'LIVEBOARD', - DATAOBJECTALL = 'DATAOBJECT_ALL', - DATAOBJECTWORKSHEET = 'DATAOBJECT_WORKSHEET', - DATAOBJECTTABLE = 'DATAOBJECT_TABLE', - DATAOBJECTUSERDEFINED = 'DATAOBJECT_USER_DEFINED', - DATAOBJECTVIEW = 'DATAOBJECT_VIEW', - DATAOBJECTCALENDARTABLE = 'DATAOBJECT_CALENDAR_TABLE', - COLUMNALL = 'COLUMN_ALL', - COLUMNWORKSHEET = 'COLUMN_WORKSHEET', - COLUMNTABLE = 'COLUMN_TABLE', - COLUMNUSERDEFINED = 'COLUMN_USER_DEFINED', - COLUMNVIEW = 'COLUMN_VIEW', - COLUMNCALENDARTABLE = 'COLUMN_CALENDAR_TABLE', - JOIN = 'JOIN', - CONNECTION = 'CONNECTION', - TAG = 'TAG', - USER = 'USER', - USERGROUP = 'USER_GROUP', -} - -/** - * Schema for Type5Enum - */ -export const type5EnumSchema: Schema = stringEnum(Type5Enum); diff --git a/Typescript/src/models/type6Enum.ts b/Typescript/src/models/type6Enum.ts deleted file mode 100644 index 13d349a66..000000000 --- a/Typescript/src/models/type6Enum.ts +++ /dev/null @@ -1,27 +0,0 @@ -/** - * ThoughtSpot Public REST APILib - * - * This file was automatically generated by APIMATIC v3.0 ( https://www.apimatic.io ). - */ - -import { Schema, stringEnum } from '../schema'; - -/** - * Enum for Type6Enum - */ -export enum Type6Enum { - ANSWER = 'ANSWER', - LIVEBOARD = 'LIVEBOARD', - DATAOBJECT = 'DATAOBJECT', - COLUMN = 'COLUMN', - JOIN = 'JOIN', - CONNECTION = 'CONNECTION', - TAG = 'TAG', - USER = 'USER', - USERGROUP = 'USER_GROUP', -} - -/** - * Schema for Type6Enum - */ -export const type6EnumSchema: Schema = stringEnum(Type6Enum); diff --git a/Typescript/src/models/type7Enum.ts b/Typescript/src/models/type7Enum.ts deleted file mode 100644 index 8d03d7cd5..000000000 --- a/Typescript/src/models/type7Enum.ts +++ /dev/null @@ -1,22 +0,0 @@ -/** - * ThoughtSpot Public REST APILib - * - * This file was automatically generated by APIMATIC v3.0 ( https://www.apimatic.io ). - */ - -import { Schema, stringEnum } from '../schema'; - -/** - * Enum for Type7Enum - */ -export enum Type7Enum { - LIVEBOARD = 'LIVEBOARD', - ANSWER = 'ANSWER', - DATAOBJECT = 'DATAOBJECT', - COLUMN = 'COLUMN', -} - -/** - * Schema for Type7Enum - */ -export const type7EnumSchema: Schema = stringEnum(Type7Enum); diff --git a/Typescript/src/models/type8Enum.ts b/Typescript/src/models/type8Enum.ts deleted file mode 100644 index f93360ba9..000000000 --- a/Typescript/src/models/type8Enum.ts +++ /dev/null @@ -1,23 +0,0 @@ -/** - * ThoughtSpot Public REST APILib - * - * This file was automatically generated by APIMATIC v3.0 ( https://www.apimatic.io ). - */ - -import { Schema, stringEnum } from '../schema'; - -/** - * Enum for Type8Enum - */ -export enum Type8Enum { - UNKNOWN = 'UNKNOWN', - LDAPUSER = 'LDAP_USER', - SAMLUSER = 'SAML_USER', - OIDCUSER = 'OIDC_USER', - LOCALUSER = 'LOCAL_USER', -} - -/** - * Schema for Type8Enum - */ -export const type8EnumSchema: Schema = stringEnum(Type8Enum); diff --git a/Typescript/src/models/type9Enum.ts b/Typescript/src/models/type9Enum.ts deleted file mode 100644 index 775d99e50..000000000 --- a/Typescript/src/models/type9Enum.ts +++ /dev/null @@ -1,23 +0,0 @@ -/** - * ThoughtSpot Public REST APILib - * - * This file was automatically generated by APIMATIC v3.0 ( https://www.apimatic.io ). - */ - -import { Schema, stringEnum } from '../schema'; - -/** - * Enum for Type9Enum - */ -export enum Type9Enum { - UNKNOWN = 'UNKNOWN', - LDAPUSER = 'LDAP_USER', - SAMLUSER = 'SAML_USER', - OIDCUSER = 'OIDC_USER', - LOCALUSER = 'LOCAL_USER', -} - -/** - * Schema for Type9Enum - */ -export const type9EnumSchema: Schema = stringEnum(Type9Enum); diff --git a/Typescript/src/models/typeEnum.ts b/Typescript/src/models/typeEnum.ts deleted file mode 100644 index a180b46ac..000000000 --- a/Typescript/src/models/typeEnum.ts +++ /dev/null @@ -1,22 +0,0 @@ -/** - * ThoughtSpot Public REST APILib - * - * This file was automatically generated by APIMATIC v3.0 ( https://www.apimatic.io ). - */ - -import { Schema, stringEnum } from '../schema'; - -/** - * Enum for TypeEnum - */ -export enum TypeEnum { - ANSWER = 'ANSWER', - LIVEBOARD = 'LIVEBOARD', - DATAOBJECT = 'DATAOBJECT', - CONNECTION = 'CONNECTION', -} - -/** - * Schema for TypeEnum - */ -export const typeEnumSchema: Schema = stringEnum(TypeEnum); diff --git a/Typescript/src/models/userNameAndID.ts b/Typescript/src/models/userNameAndID.ts deleted file mode 100644 index d5e1834c3..000000000 --- a/Typescript/src/models/userNameAndID.ts +++ /dev/null @@ -1,19 +0,0 @@ -/** - * ThoughtSpot Public REST APILib - * - * This file was automatically generated by APIMATIC v3.0 ( https://www.apimatic.io ). - */ - -import { object, optional, Schema, string } from '../schema'; - -export interface UserNameAndID { - /** Username of the user */ - name?: string; - /** GUID of the user */ - id?: string; -} - -export const userNameAndIDSchema: Schema = object({ - name: ['name', optional(string())], - id: ['id', optional(string())], -}); diff --git a/Typescript/src/models/userNameAndIDInput.ts b/Typescript/src/models/userNameAndIDInput.ts deleted file mode 100644 index 63d4dc2e3..000000000 --- a/Typescript/src/models/userNameAndIDInput.ts +++ /dev/null @@ -1,19 +0,0 @@ -/** - * ThoughtSpot Public REST APILib - * - * This file was automatically generated by APIMATIC v3.0 ( https://www.apimatic.io ). - */ - -import { object, optional, Schema, string } from '../schema'; - -export interface UserNameAndIDInput { - /** Username of the user */ - name?: string; - /** GUID of the user */ - id?: string; -} - -export const userNameAndIDInputSchema: Schema = object({ - name: ['name', optional(string())], - id: ['id', optional(string())], -}); diff --git a/Typescript/src/models/userResponse.ts b/Typescript/src/models/userResponse.ts deleted file mode 100644 index 82e378232..000000000 --- a/Typescript/src/models/userResponse.ts +++ /dev/null @@ -1,118 +0,0 @@ -/** - * ThoughtSpot Public REST APILib - * - * This file was automatically generated by APIMATIC v3.0 ( https://www.apimatic.io ). - */ - -import { - array, - boolean, - lazy, - number, - object, - optional, - Schema, - string, -} from '../schema'; -import { GroupNameAndID, groupNameAndIDSchema } from './groupNameAndID'; -import { OrgType, orgTypeSchema } from './orgType'; -import { UserNameAndID, userNameAndIDSchema } from './userNameAndID'; - -export interface UserResponse { - /** Username of the user account */ - name?: string; - /** Display name of the user account */ - displayName?: string; - /** GUID of the user account */ - id?: string; - /** Visibility of the user account */ - visibility?: string; - /** Email of the user account */ - mail?: string; - /** Name of the group to which user account is added */ - groups?: GroupNameAndID[]; - /** Privileges assigned to user account */ - privileges?: string[]; - /** The organizations that user belongs to */ - orgs?: OrgType[]; - /** Tags assigned to the user */ - tags?: string[]; - /** Indicates if the user account is active or inactive */ - state?: string; - /** Indicates if the email should be sent when object is shared with the user */ - notifyOnShare?: boolean; - /** Indicates if the walk me should be shown when logging in */ - showWalkMe?: boolean; - /** Indicates if the onboarding is completed for the user */ - analystOnboardingComplete?: boolean; - /** Indicates if the use is logging in for the first time */ - firstLogin?: number; - /** Indicates if the welcome email is sent to email associated with the user account */ - welcomeEmailSent?: boolean; - /** Indicates if the user account is deleted */ - isDeleted?: boolean; - /** Indicates if the user account is hidden */ - isHidden?: boolean; - /** - * Indicates if the user account is from external system - * isDeprecated - */ - isExternal?: boolean; - isDeprecated?: boolean; - /** Indicates if the all the properties of user account is provided */ - complete?: boolean; - /** Indicates if the user account is super user */ - isSuperUser?: boolean; - /** Indicates if the user account is system principal */ - isSystemPrincipal?: boolean; - /** Indicates the type of user account */ - type?: string; - /** Indicates the type of parent object */ - parenttype?: string; - /** Tenant id associated with the user account */ - tenantId?: string; - indexVersion?: number; - generationNum?: number; - /** Date and time when user account was created */ - created?: number; - /** Date and time of last modification of user account */ - modified?: number; - author?: UserNameAndID; - modifiedBy?: UserNameAndID; - owner?: UserNameAndID; -} - -export const userResponseSchema: Schema = object({ - name: ['name', optional(string())], - displayName: ['displayName', optional(string())], - id: ['id', optional(string())], - visibility: ['visibility', optional(string())], - mail: ['mail', optional(string())], - groups: ['groups', optional(array(lazy(() => groupNameAndIDSchema)))], - privileges: ['privileges', optional(array(string()))], - orgs: ['orgs', optional(array(lazy(() => orgTypeSchema)))], - tags: ['tags', optional(array(string()))], - state: ['state', optional(string())], - notifyOnShare: ['notifyOnShare', optional(boolean())], - showWalkMe: ['showWalkMe', optional(boolean())], - analystOnboardingComplete: ['analystOnboardingComplete', optional(boolean())], - firstLogin: ['firstLogin', optional(number())], - welcomeEmailSent: ['welcomeEmailSent', optional(boolean())], - isDeleted: ['isDeleted', optional(boolean())], - isHidden: ['isHidden', optional(boolean())], - isExternal: ['isExternal', optional(boolean())], - isDeprecated: ['isDeprecated', optional(boolean())], - complete: ['complete', optional(boolean())], - isSuperUser: ['isSuperUser', optional(boolean())], - isSystemPrincipal: ['isSystemPrincipal', optional(boolean())], - type: ['type', optional(string())], - parenttype: ['parenttype', optional(string())], - tenantId: ['tenantId', optional(string())], - indexVersion: ['indexVersion', optional(number())], - generationNum: ['generationNum', optional(number())], - created: ['created', optional(number())], - modified: ['modified', optional(number())], - author: ['author', optional(lazy(() => userNameAndIDSchema))], - modifiedBy: ['modifiedBy', optional(lazy(() => userNameAndIDSchema))], - owner: ['owner', optional(lazy(() => userNameAndIDSchema))], -}); diff --git a/Typescript/src/models/visibility1Enum.ts b/Typescript/src/models/visibility1Enum.ts deleted file mode 100644 index 3750caf0d..000000000 --- a/Typescript/src/models/visibility1Enum.ts +++ /dev/null @@ -1,21 +0,0 @@ -/** - * ThoughtSpot Public REST APILib - * - * This file was automatically generated by APIMATIC v3.0 ( https://www.apimatic.io ). - */ - -import { Schema, stringEnum } from '../schema'; - -/** - * Enum for Visibility1Enum - */ -export enum Visibility1Enum { - DEFAULT = 'DEFAULT', - NONSHARABLE = 'NON_SHARABLE', - SHARABLE = 'SHARABLE', -} - -/** - * Schema for Visibility1Enum - */ -export const visibility1EnumSchema: Schema = stringEnum(Visibility1Enum); diff --git a/Typescript/src/models/visibility2Enum.ts b/Typescript/src/models/visibility2Enum.ts deleted file mode 100644 index 04ef6cabc..000000000 --- a/Typescript/src/models/visibility2Enum.ts +++ /dev/null @@ -1,21 +0,0 @@ -/** - * ThoughtSpot Public REST APILib - * - * This file was automatically generated by APIMATIC v3.0 ( https://www.apimatic.io ). - */ - -import { Schema, stringEnum } from '../schema'; - -/** - * Enum for Visibility2Enum - */ -export enum Visibility2Enum { - DEFAULT = 'DEFAULT', - NONSHARABLE = 'NON_SHARABLE', - SHARABLE = 'SHARABLE', -} - -/** - * Schema for Visibility2Enum - */ -export const visibility2EnumSchema: Schema = stringEnum(Visibility2Enum); diff --git a/Typescript/src/models/visibilityEnum.ts b/Typescript/src/models/visibilityEnum.ts deleted file mode 100644 index 6ba83672d..000000000 --- a/Typescript/src/models/visibilityEnum.ts +++ /dev/null @@ -1,21 +0,0 @@ -/** - * ThoughtSpot Public REST APILib - * - * This file was automatically generated by APIMATIC v3.0 ( https://www.apimatic.io ). - */ - -import { Schema, stringEnum } from '../schema'; - -/** - * Enum for VisibilityEnum - */ -export enum VisibilityEnum { - DEFAULT = 'DEFAULT', - NONSHARABLE = 'NON_SHARABLE', - SHARABLE = 'SHARABLE', -} - -/** - * Schema for VisibilityEnum - */ -export const visibilityEnumSchema: Schema = stringEnum(VisibilityEnum); diff --git a/Typescript/src/models/vizType.ts b/Typescript/src/models/vizType.ts deleted file mode 100644 index 2e4d1b740..000000000 --- a/Typescript/src/models/vizType.ts +++ /dev/null @@ -1,22 +0,0 @@ -/** - * ThoughtSpot Public REST APILib - * - * This file was automatically generated by APIMATIC v3.0 ( https://www.apimatic.io ). - */ - -import { object, optional, Schema, string } from '../schema'; - -export interface VizType { - /** The name of the visualization */ - name?: string; - /** The GUID of the visualization */ - id?: string; - /** SQL query associated with the visualization */ - querySql?: string; -} - -export const vizTypeSchema: Schema = object({ - name: ['name', optional(string())], - id: ['id', optional(string())], - querySql: ['querySql', optional(string())], -}); diff --git a/Typescript/src/schema.ts b/Typescript/src/schema.ts deleted file mode 100644 index a6c3afaff..000000000 --- a/Typescript/src/schema.ts +++ /dev/null @@ -1,7 +0,0 @@ -/** - * ThoughtSpot Public REST APILib - * - * This file was automatically generated by APIMATIC v3.0 ( https://www.apimatic.io ). - */ - -export * from '@apimatic/schema'; diff --git a/Typescript/tsconfig.json b/Typescript/tsconfig.json deleted file mode 100644 index 57d362c9a..000000000 --- a/Typescript/tsconfig.json +++ /dev/null @@ -1,20 +0,0 @@ -{ - "include": ["src", "types"], - "compilerOptions": { - "module": "esnext", - "lib": ["esnext"], - "importHelpers": true, - "declaration": true, - "sourceMap": true, - "rootDir": "./src", - "strict": true, - "noUnusedLocals": true, - "noUnusedParameters": true, - "noImplicitReturns": true, - "noFallthroughCasesInSwitch": true, - "moduleResolution": "node", - "target": "ES2017", - "jsx": "react", - "esModuleInterop": true - } -} diff --git a/Typescript/tsdx.config.js b/Typescript/tsdx.config.js deleted file mode 100644 index 3072760cb..000000000 --- a/Typescript/tsdx.config.js +++ /dev/null @@ -1,11 +0,0 @@ -// Not transpiled with TypeScript or Babel, so use plain Es6/Node.js! -module.exports = { - // This function will run for each entry/format/env combination - rollup(config, options) { - config.onwarn = ( warning, next ) => { - if ( warning.code === 'CIRCULAR_DEPENDENCY' ) return; - next( warning ); - }; - return config; // always return a config. - }, -}; diff --git a/api-playground/APIMATIC-BUILD.json b/api-playground/APIMATIC-BUILD.json index 91f699662..3b892d643 100644 --- a/api-playground/APIMATIC-BUILD.json +++ b/api-playground/APIMATIC-BUILD.json @@ -2,12 +2,13 @@ "$schema": "https://titan.apimatic.io/api/build/schema", "buildFileVersion": "1.0", "generatePortal": { + "useHostedPortalScript": false, "pageTitle": "ThoughtSpot Public Rest APIs", "languageConfig": { "http": {} }, "headIncludes": "", - "tailIncludes": "", + "tailIncludes": "", "portalSettings": { "themeOverrides": { "themeType": "cool", @@ -20,10 +21,10 @@ "C200": "#FFFFFF", "C300": "#C0C6CF", "C400": "#777e8b", - "C500": "#B0B5C9", - "C600": "#FFFFFF", + "C500": "#1D232F", + "C600": "#858BA5", "C700": "#606E8A", - "C800": "#1d232f", + "C800": "#1D232F", "C900": "#1C2029", "C1000": "#1D2236" } @@ -77,7 +78,10 @@ } }, "enableExport": false, - "enableConsoleCalls": true + "enableConsoleCalls": true, + "useLegacyApiPlayground": true } } } + + diff --git a/api-playground/README.md b/api-playground/README.md index 5647be40f..9abe51ef9 100644 --- a/api-playground/README.md +++ b/api-playground/README.md @@ -1,6 +1,19 @@ ## Background The Rest API playground is generated using APIMatic's [portal generation API](https://portal-api-docs.apimatic.io/#/http/getting-started/overview-apimatic-portal-generation) and deployed directly on Vercel +## Hiding Fields + +To hide specific fields from the API playground UI: + +Add configuration to `api-playground-config.json`: +```json +{ + "hideApiFields": [ + { "operationId": "APIOperantionId", "fields": ["field.refSchemaField"] } + ] +} +``` + ## Local development Prepare the build folder diff --git a/api-playground/api-playground-config.json b/api-playground/api-playground-config.json new file mode 100644 index 000000000..0a4b67d3a --- /dev/null +++ b/api-playground/api-playground-config.json @@ -0,0 +1,7 @@ +{ + "hideApiFields": [ + { "operationId": "getFullAccessToken", "fields": ["user_parameters"] }, + { "operationId": "getObjectAccessToken", "fields": ["user_parameters"] }, + { "operationId": "getCustomAccessToken", "fields": ["filter_rules"] } + ] +} \ No newline at end of file diff --git a/api-playground/build.sh b/api-playground/build.sh index 3cb42c3bb..8b34a1ad7 100644 --- a/api-playground/build.sh +++ b/api-playground/build.sh @@ -7,10 +7,14 @@ mkdir $PWD/build $PWD/spec # prepare spec cp ../api-spec/* spec/ +if [ -f $PWD/processSpec.js ]; then + npx node processSpec.js +fi + # native zip and unzip unavailable npx bestzip $PWD/build/portal-input.zip . -curl -X POST --url 'https://www.apimatic.io/api/portal' -H "Authorization:X-Auth-Key "$APIMATIC_API_KEY"" -F 'file=@./build/portal-input.zip' -o ./build/portal-output.zip +curl -X POST --url 'https://api.apimatic.io/portal' -H "Authorization:X-Auth-Key "$APIMATIC_API_KEY"" -F 'file=@./build/portal-input.zip' -o ./build/portal-output.zip npx extract-zip $PWD/build/portal-output.zip $PWD/build/static-portal -ls -R $PWD/build/static-portal \ No newline at end of file +ls -Rlh $PWD/build/static-portal diff --git a/api-playground/content/Introduction.md b/api-playground/content/Introduction.md new file mode 100644 index 000000000..1e1fbd01b --- /dev/null +++ b/api-playground/content/Introduction.md @@ -0,0 +1,28 @@ +# Introduction +Welcome to the Thoughtspot REST API v2.0 playground! +Browse through the following details before you begin and learn how to interact with the ThoughtSpot system through APIs. + +## Playground layout +The REST API Playground offers an interactive portal with comprehensive information about each API endpoint, request format, and responses. + +- On the left pane, you can find a catalog of API endpoints, grouped based on the objects they operate on. You can also view the data structure of the request and response and enumerations. +- The middle section of the portal provides a detailed description of the endpoint, its input fields, and the allowed and default values for attributes. +- On the right side of Playground, you can find an interactive code explorer that shows the API request details and allows you to try out an API and view the response. + +## Resources +All the resources that can be used are listed under the **API Endpoints** section on the left pane. On clicking an endpoint, you can view its resource URL, input fields, and request and response formats. + +## Sample request and response +Based on the input provided for the fields, you can see the request generated in the API code explorer on the right side of the portal. You can click **Try it out** to explore an API and also copy the request using the copy icon in the code explorer. + +On clicking the **Try it out** button, you can view the API response. If the request succeeds, the API returns the 200 response code. You can copy or download the API response using the buttons at the bottom of the code explorer. You can also copy the individual field values using the button next to the field. You can click the **Back** button to go back to the previous page and try out another API. + +## Errors +The portal uses the standard HTTP response codes to indicate the success or failure of a request. The 200 response code indicates a successful request, whereas 500 and 4xx response codes indicate an error. + +If the API response indicates an error, you can view the error details by navigating to `root` > `error` > `message` > `debug` in the error response body. + +## Getting started +For information about setting up and using the REST API v2.0 endpoints, please refer to the **Setup and usage** guide, which describes the initial setup process and authentication options and examples to help you effectively use the APIs. + +If you need further assistance, contact ThoughtSpot support team or connect with ThoughtSpot Developer Community on [Discord](https://discord.com/invite/JHPGwCkvjQ). diff --git a/api-playground/content/introduction.md b/api-playground/content/introduction.md deleted file mode 100644 index cad71d6f8..000000000 --- a/api-playground/content/introduction.md +++ /dev/null @@ -1,27 +0,0 @@ -# Introduction -Welcome to the Thoughtspot REST API playground! We recommend that you browse through the following details before you start constructing your API requests to interact with the ThoughtSpot system. - -## Playground layout -The REST API Playground offers an interactive portal with comprehensive information about the API endpoints, request and response workflows. -- On the left pane, you can find a catalog of API endpoints, grouped based on the objects they operate on. You can also view the data structure of the request and response and enumerations. -- The middle section of the portal provides a detailed description of the endpoint, its input fields, and the allowed and default values for attributes. -- On the right side of Playground, you can find an interactive code explorer that shows the API request details and allows you to try out an API and view the response. - -## Resources -All the resources that can be used are listed under the **API Endpoints** section on the left pane. On clicking an endpoint, you can view its resource URL, input fields, request and response formats. - -## Sample request and response -Based on the input provided for the fields, you can see the request generated in the API code explorer on the right side of the portal. You can click **Try it out** to explore an API and also copy the request using the copy icon in the code explorer. - -On clicking the **Try it out** button, you can view the API response. If the request succeeds, the API returns the 200 response code. You can copy or download the API response using the buttons at the bottom of the code explorer. You can also copy the individual field values using the button that appears next to the field. You can click the **Back** button to go back to the previous page and try out another API. - -## Errors -The portal uses the standard HTTP response codes to indicate the success or failure of a request. The 200 response code indicates a successful request, whereas 500 and 4xx response codes indicate an error. - -If the API response indicates an error, you can view the error details by navigating to `root` > `error` > `message` > `debug` in the error response body. - -## Authentication - -All API requests generated from Playground are authenticated using the Bearer token included with the `Authorization` header passed along with the request. This token is generated and set each time you open the REST API Playground and navigate to an endpoint. The token is generated for the logged-in user and is valid for 24 hours. - -If you want to use a new token, you can generate a token using the `/api/rest/2.0/auth/token/object` endpoint. To update the token, click **Configure** in the code explorer and edit the `AccessToken` field in the pop-up that appears. diff --git a/api-playground/content/setup-and-usage.md b/api-playground/content/setup-and-usage.md new file mode 100644 index 000000000..6845e2d4d --- /dev/null +++ b/api-playground/content/setup-and-usage.md @@ -0,0 +1,187 @@ + +Welcome to the Thoughtspot REST API v2.0 Setup and usage guide! +This document describes how to set up authentication to access and manage ThoughtSpot resources and objects programmatically. + +## Base URL and suffix +**Base URL**: For REST APIs, the base URL is the foundational URL that serves as the starting point for all API requests. +It usually represents the root endpoint for accessing the API's resources. The base URL includes the protocol (HTTP or HTTPS), the domain name (or IP address), and +often a version number. + +**Suffix (or endpoint)**: The suffix (or endpoint) is appended to the base URL to specify a particular resource or action within the API. +It usually represents specific data or functions provided by the API. + +**ThoughtSpot base URL** + +`https:///api/rest/2.0/` + +**Example of complete API request URL for "Getting Current User Info"** + +`GET https:///api/rest/2.0/auth/session/user` + +## Types of authentication +Authentication is crucial to protect the API endpoints and allow only authorized users to access or modify the resources. + +To ensure secure communication between the client and server, the API supports various authentication options. Select the authentication method that best suits your application's setup and ensure secure access to your resources: + +> **Note:** All API requests generated from Playground are authenticated using the Bearer token included with the `Authorization` header passed along with the request. +This token is generated and set each time you open the REST API Playground and navigate to an API endpoint. The token is generated for the logged-in user and is valid for 24 hours. +However, for programming needs, developers can use one of the following authentication methods to authenticate users and invoke APIs. + + +### Token-based authentication +In this method, the REST clients obtain a bearer token with basic authentication or a Trusted authentication token from ThoughtSpot. REST clients must use this authentication token in the `Authorization` header to authorize their subsequent API requests: + +`Authorization: Bearer {AUTH_TOKEN}` + +> **Note:** By default, the token obtained from ThoughtSpot is valid for 5 minutes (300 seconds). If a REST client tries to make an API call with an expired token, the server returns an error. In such cases, get a new token and use it in your subsequent API calls. If you want to use the token for more than 5 minutes, set the token expiry duration to a higher value. + +#### Using username and secret key (Recommended) +In this method, you must pass the `username` and `secret_key` parameters to authenticate to ThoughtSpot and obtain a token. To request a token on behalf of another user, you need administrator privileges and access to the `secret_key` that allows you to securely pass the authentication details of an embedded application user. + +The `secret_key` is generated and available if [Trusted Authentication is enabled on your ThoughtSpot Instance](https://developers.thoughtspot.com/docs/trusted-auth#trusted-auth-enable). + +- Get a token for full access: `POST /api/rest/2.0/auth/token/full` +- Get a token for object access: `POST /api/rest/2.0/auth/token/object` + +##### Request and response example +The following example sends `username` and `secret_key` in the `POST` request body to the `/api/rest/2.0/auth/token/full` API endpoint, to obtain an authentication token with full access to ThoughtSpot: + +``` +curl -X POST \ + --url 'https://{ThoughtSpot-Host}/api/rest/2.0/auth/token/full' \ + -H 'Accept: application/json' \ + -H 'Content-Type: application/json' \ + --data-raw '{ + "username": "tsUserA", + "validity_time_in_sec": 86400, + "auto_create": false, + "secret_key": "2657f6f9-6aa9-4432-99f2-bf0d70f240ac" +}' +``` +If the request is successful, the API returns the authentication token assigned to the user specified in the request. + +``` +{ + "token":"{AUTH_TOKEN}", + "creation_time_in_millis": 1730086220962, + "expiration_time_in_millis": 1730172619979, + "scope":{ + "access_type":"FULL", + "org_id":0, + "metadata_id":null + }, + "valid_for_user_id":"fd873d1e-11cc-4246-8ee2-78e78d2b5840", + "valid_for_username":"tsUserA" +} +``` +For more information, see [REST API v2 Authentication](https://developers.thoughtspot.com/docs/api-authv2#trusted-auth-v2). + +#### Using username and password +In this method, user credentials such as the `username` and `password` are required to authenticate to ThoughtSpot and obtain a token. REST clients can use one of the endpoints to obtain a token: + +- Get a token for full access: `POST /api/rest/2.0/auth/token/full` +- Get a token for object access: `POST /api/rest/2.0/auth/token/object` + +##### Request and response example +The following example sends `username` and `password` in the `POST` request body to the `/api/rest/2.0/auth/token/full` API endpoint, to obtain an authentication token with full access to ThoughtSpot: + +``` +curl -X POST \ + --url 'https://{ThoughtSpot-Host}/api/rest/2.0/auth/token/full' \ + -H 'Accept: application/json'\ + -H 'Content-Type: application/json' \ + --data-raw '{ + "username": "tsUserA", + "password": "Guest123!", + "org_id": 1, + "validity_time_in_sec": 86400 +}' +``` +If the request is successful, the API returns the Bearer token assigned to the user specified in the request. + +``` +{ + "token": "{AUTH_TOKEN}", + "creation_time_in_millis": 1730086220962, + "expiration_time_in_millis": 1730172619979, + "scope": { + "access_type": "FULL", + "org_id": 1, + "metadata_id": null + }, + "valid_for_user_id": "59a122dc0-38d7-43e7-bb90-86f724c7b602", + "valid_for_username": "tsUserA" +} +``` +For more information, see [REST API v2 Authentication](https://developers.thoughtspot.com/docs/api-authv2#_basic_authentication). + +#### Using tokens in subsequent API requests + +Include the authentication token obtained from ThoughtSpot in the `Authorization` header of your subsequent API requests as shown in this example: + +``` +curl -X POST \ + --url 'https://{ThoughtSpot-host}/api/rest/2.0/metadata/search' \ + -H 'Authorization: Bearer {AUTH_TOKEN}' \ + -H 'Accept: application/json' \ + -H 'Content-Type: application/json' \ + --data-raw '{ + "metadata": [ + { + "type": "LIVEBOARD" + } + ] +}' +``` + +### Cookie-based authentication +In this method, when a REST client sends an API request to the `api/rest/2.0/auth/session/login` endpoint with the `username` and `password`, upon successful login, a cookie `JSESSIONID` is assigned to the client session. This `JSESSIONID` cookie is then used to authenticate the client in subsequent API calls. + +The cookie-based authentication method is useful when REST clients use the browser for API calls. + +> **Note:** Applications embedding ThoughtSpot can also use this method in conjunction with the Visual Embed SDK and reuse the cookie that is already set. + +#### Request example + +The following example shows the attributes required to log in to ThoughtSpot and get a cookie assigned for the user session: + +``` +curl -X POST \ + --url 'https://{ThoughtSpot-Host}/api/rest/2.0/auth/session/login' \ + -H 'Content-Type: application/json' \ + --data-raw '{ + "username": "tsUserA", + "password": "Guest@123!", + "remember_me": true +}' +``` + +If the login attempt is successful, a `JSESSIONID` cookie is assigned to the client session. This cookie is automatically set in the request header when REST clients make subsequent API calls via a web browser or Postman. +REST clients in a non-browser environment must include the session cookie in the request header as shown here: + +``` +curl -X POST \ + --url 'https://{ThoughtSpot-Host}/api/rest/2.0/metadata/search' \ + -H 'Accept: application/json'\ + -H 'Content-Type: application/json' \ + -H 'Cookie: JSESSIONID=fc3424f9-d3f0-4a24-bd33-400fd826cac7; clientId=70cf1328-af97-40b2-9bd5-1c520e133963' \ + --data-raw '{ + "metadata": [ + { + "type": "LIVEBOARD" + } + ] + }' +``` +For more information, see [Cookie-based authentication](https://developers.thoughtspot.com/docs/api-authv2#loginTS). + +# Additional resources +Refer to the following resources for additional information on REST APIs and SDK: +* [REST API v2.0 Reference](https://developers.thoughtspot.com/docs/rest-apiv2-reference) +* [REST API v2.0 SDKs](https://developers.thoughtspot.com/docs/rest-api-sdk) +* [Get started with REST API v2.0](https://developers.thoughtspot.com/docs/rest-apiv2-getstarted) +* [REST API v2.0 authentication](https://developers.thoughtspot.com/docs/api-authv2) + +To get help and assistance, contact ThoughtSpot support or connect with the ThoughtSpot Developer Community on [Discord](https://discord.com/invite/JHPGwCkvjQ). + +Happy coding! diff --git a/api-playground/content/toc.yml b/api-playground/content/toc.yml index 501481f28..e405ea38d 100644 --- a/api-playground/content/toc.yml +++ b/api-playground/content/toc.yml @@ -3,8 +3,8 @@ toc: items: - page: Introduction file: Introduction.md - - generate: Setup and Usage - from: getting-started + - page: Setup and Usage + file: setup-and-usage.md - generate: Resources from: endpoints - generate: Models diff --git a/api-playground/processSpec.js b/api-playground/processSpec.js new file mode 100644 index 000000000..0ce7ba7c6 --- /dev/null +++ b/api-playground/processSpec.js @@ -0,0 +1,171 @@ +const fs = require('fs'); + +const SPEC_PATH = './spec/openapiSpecv3-2_0.json'; +const CONFIG_PATH = './api-playground-config.json'; + +function isObject(value) { + return value !== null && typeof value === 'object' && !Array.isArray(value); +} + +//Resolves a JSON reference pointer (e.g., "#/components/schemas/MySchema") to the actual object in the spec. +function resolveRef(root, ref) { + if (typeof ref !== 'string' || !ref.startsWith('#/')) return null; + const parts = ref.slice(2).split('/').map((p) => p.replace(/~1/g, '/').replace(/~0/g, '~')); + let node = root; + for (const part of parts) { + if (!isObject(node) || !(part in node)) return null; + node = node[part]; + } + return node; +} + +//Recursively traverses a schema and removes the specified field. +function hideFieldInSchema(root, schemaNode, fieldPathParts) { + if (!isObject(schemaNode)) return false; + + if (schemaNode.$ref && typeof schemaNode.$ref === 'string') { + const target = resolveRef(root, schemaNode.$ref); + if (isObject(target)) { + return hideFieldInSchema(root, target, fieldPathParts); + } + return false; + } + + if (isObject(schemaNode.items)) { + if (hideFieldInSchema(root, schemaNode.items, fieldPathParts)) return true; + } + + let modified = false; + for (const keyword of ['allOf', 'oneOf', 'anyOf']) { + const variants = schemaNode[keyword]; + if (Array.isArray(variants)) { + for (const variant of variants) { + if (hideFieldInSchema(root, variant, fieldPathParts)) modified = true; + } + } + } + + if (!isObject(schemaNode.properties)) return modified; + + const [current, ...rest] = fieldPathParts; + + if (rest.length === 0) { + if (schemaNode.properties[current]) { + delete schemaNode.properties[current]; + return true; + } + return modified; + } + + const child = schemaNode.properties[current]; + if (!child || typeof child !== 'object') return modified; + return hideFieldInSchema(root, child, rest) || modified; +} + +//Processes all operations in the spec and hides fields based on the configuration. +function hideApiFields(spec, config) { + const hideApiFieldsConfig = config.hideApiFields || []; + + if (hideApiFieldsConfig.length === 0) { + console.log('No API fields specified to hide'); + return; + } + + const fieldsMap = new Map(); + for (const { operationId, fields } of hideApiFieldsConfig) { + if (operationId && fields && fields.length > 0) { + fieldsMap.set(operationId, fields); + } + } + + for (const [pathKey, pathItem] of Object.entries(spec.paths)) { + for (const [method, operation] of Object.entries(pathItem)) { + if (!operation.operationId) continue; + + const fields = fieldsMap.get(operation.operationId); + if (!fields) continue; + + console.log(`\nProcessing operation: ${operation.operationId} (${method.toUpperCase()} ${pathKey})`); + + hideFieldsInOperation(spec, operation, fields); + + } + } +} + +//Hides specified fields from a single operation's parameters and request body. +function hideFieldsInOperation(spec, op, fields) { + const hidden = { parameters: [], requestBody: [] }; + + if (op.parameters) { + const simpleFields = new Set(fields.filter((f) => !f.includes('.'))); + op.parameters = op.parameters.filter((p) => { + if (p.name && simpleFields.has(p.name)) { + hidden.parameters.push(p.name); + return false; + } + return true; + }); + } + + const requestBody = op.requestBody; + + if (requestBody && requestBody.content) { + for (const media of Object.values(requestBody.content)) { + if (media && media.schema) { + for (const field of fields) { + const parts = field.split('.').filter(Boolean); + if (parts.length && hideFieldInSchema(spec, media.schema, parts)) { + hidden.requestBody.push(field); + } + } + } + } + } + + return hidden; +} + +async function processOpenApiSpec() { + try { + if (!fs.existsSync(CONFIG_PATH)) { + console.error(`Config file not found: ${CONFIG_PATH}`); + process.exit(1); + } + + const specContent = fs.readFileSync(SPEC_PATH, 'utf8'); + const spec = JSON.parse(specContent); + + const configContent = fs.readFileSync(CONFIG_PATH, 'utf8'); + const config = JSON.parse(configContent); + + if (config.hideApiFields && config.hideApiFields.length > 0) { + console.log('\n=== Hiding API Fields in Spec ==='); + hideApiFields(spec, config); + } + + let updatedSpecContent = JSON.stringify(spec, null, 2); + if (!updatedSpecContent.endsWith('\n')) { + updatedSpecContent += '\n'; + } + fs.writeFileSync(SPEC_PATH, updatedSpecContent, 'utf8'); + + console.log('\n=== Processing Complete ==='); + console.log('Successfully updated OpenAPI specification file'); + + } catch (error) { + console.error('Error processing files:', error.message); + process.exit(1); + } +} + +if (require.main === module) { + processOpenApiSpec(); +} + +module.exports = { + processOpenApiSpec, + hideApiFields +}; + + diff --git a/api-playground/static/fonts/bb-roller/BB-Roller-Mono-ProTx-semibold.otf b/api-playground/static/fonts/bb-roller/BB-Roller-Mono-ProTx-semibold.otf new file mode 100755 index 000000000..19d387a15 Binary files /dev/null and b/api-playground/static/fonts/bb-roller/BB-Roller-Mono-ProTx-semibold.otf differ diff --git a/api-playground/static/fonts/bb-roller/BB-Roller-Mono-Regular-fontlab.ttf b/api-playground/static/fonts/bb-roller/BB-Roller-Mono-Regular-fontlab.ttf new file mode 100644 index 000000000..a569590af Binary files /dev/null and b/api-playground/static/fonts/bb-roller/BB-Roller-Mono-Regular-fontlab.ttf differ diff --git a/api-playground/static/fonts/bb-roller/BB-Roller-Mono-Regular.otf b/api-playground/static/fonts/bb-roller/BB-Roller-Mono-Regular.otf new file mode 100755 index 000000000..f9d13b234 Binary files /dev/null and b/api-playground/static/fonts/bb-roller/BB-Roller-Mono-Regular.otf differ diff --git a/api-playground/static/fonts/optimo/Plain-Light.otf b/api-playground/static/fonts/optimo/Plain-Light.otf new file mode 100755 index 000000000..a1a1eacee Binary files /dev/null and b/api-playground/static/fonts/optimo/Plain-Light.otf differ diff --git a/api-playground/static/fonts/optimo/Plain-LightIta.otf b/api-playground/static/fonts/optimo/Plain-LightIta.otf new file mode 100755 index 000000000..c9e8fb30a Binary files /dev/null and b/api-playground/static/fonts/optimo/Plain-LightIta.otf differ diff --git a/api-playground/static/fonts/optimo/Plain-Medium.otf b/api-playground/static/fonts/optimo/Plain-Medium.otf new file mode 100755 index 000000000..9b2c358e3 Binary files /dev/null and b/api-playground/static/fonts/optimo/Plain-Medium.otf differ diff --git a/api-playground/static/fonts/optimo/Plain-Medium.ttf b/api-playground/static/fonts/optimo/Plain-Medium.ttf new file mode 100755 index 000000000..228d6c869 Binary files /dev/null and b/api-playground/static/fonts/optimo/Plain-Medium.ttf differ diff --git a/api-playground/static/fonts/optimo/Plain-MediumIta.otf b/api-playground/static/fonts/optimo/Plain-MediumIta.otf new file mode 100755 index 000000000..ffc575838 Binary files /dev/null and b/api-playground/static/fonts/optimo/Plain-MediumIta.otf differ diff --git a/api-playground/static/fonts/optimo/Plain-MediumIta.ttf b/api-playground/static/fonts/optimo/Plain-MediumIta.ttf new file mode 100755 index 000000000..b19551584 Binary files /dev/null and b/api-playground/static/fonts/optimo/Plain-MediumIta.ttf differ diff --git a/api-playground/static/fonts/optimo/Plain-Regular.otf b/api-playground/static/fonts/optimo/Plain-Regular.otf new file mode 100755 index 000000000..130b25234 Binary files /dev/null and b/api-playground/static/fonts/optimo/Plain-Regular.otf differ diff --git a/api-playground/static/fonts/optimo/Plain-RegularIta.otf b/api-playground/static/fonts/optimo/Plain-RegularIta.otf new file mode 100755 index 000000000..59e756d03 Binary files /dev/null and b/api-playground/static/fonts/optimo/Plain-RegularIta.otf differ diff --git a/api-playground/static/js/embedded.js b/api-playground/static/js/embedded.js index cd248c4cb..8c89bfa01 100644 --- a/api-playground/static/js/embedded.js +++ b/api-playground/static/js/embedded.js @@ -3,6 +3,8 @@ const navigateEndpoint = (apiResourceId) => { }; let shouldPatch = false; +let _setConfig = null; +let isApiMaticPortalReady = false; const patchURLAndPlayground = async ({ baseUrl, accessToken }) => { // find the configure button element @@ -48,10 +50,6 @@ const patchURLAndPlayground = async ({ baseUrl, accessToken }) => { const channel = new MessageChannel(); let playgroundConfig = {}; -window.parent.postMessage({ type: 'api-playground-ready' }, '*', [ - channel.port2, -]); - function getElementByIdAsync(id) { let maxTime = 2000; const STEP = 16; @@ -69,18 +67,54 @@ function getElementByIdAsync(id) { document.getElementsByClassName('portal-header')[0].style.display = 'none'; +const setAPIMaticPortalConfig = () => { + APIMaticDevPortal.ready(({ setConfig }) => { + isApiMaticPortalReady = true; + _setConfig = setConfig; + window.parent.postMessage({ type: 'api-playground-ready' }, '*', [ + channel.port2, + ]); + }); +}; + +const setPlaygroundConfig = ({ baseUrl, accessToken }) => { + if(isApiMaticPortalReady) { + _setConfig((defaultConfig) => { + return { + // ...defaultConfig, + showFullCode: false, + auth: { + bearerAuth: { + AccessToken: accessToken, + }, + }, + config: { + // ...defaultConfig.config, + "base-url": baseUrl, + }, + environment: "production", + }; + }); + } +}; + +/** setting APIMatic Portal */ +setAPIMaticPortalConfig(); + window.addEventListener('hashchange', (e) => { if (!shouldPatch) { return; } - patchURLAndPlayground(playgroundConfig); + const queryParams = window.location.href.split("#/")[1]; + window.parent.postMessage({ type: "url-change", data: queryParams }, "*"); + setPlaygroundConfig(playgroundConfig); }); window.addEventListener('message', (event) => { if (event.data?.type === 'api-playground-config') { shouldPatch = true; playgroundConfig = event.data; - patchURLAndPlayground(playgroundConfig); + setPlaygroundConfig(playgroundConfig); if (playgroundConfig.apiResourceId) { navigateEndpoint(playgroundConfig.apiResourceId); } @@ -88,5 +122,5 @@ window.addEventListener('message', (event) => { }); window.test = (config) => { - patchURLAndPlayground(config); + setPlaygroundConfig(playgroundConfig); }; diff --git a/api-playground/static/styles/overrides.css b/api-playground/static/styles/overrides.css index 05e5dd0a7..4e41d3e46 100644 --- a/api-playground/static/styles/overrides.css +++ b/api-playground/static/styles/overrides.css @@ -1,22 +1,95 @@ @font-face { - font-family: 'Optimo-Plain'; - src: url('../fonts/Plain-Medium.otf') format('opentype'); - font-weight: 500; + font-family: Optimo-Plain; + src: url('../fonts/optimo/Plain-Light.otf') format('opentype'); + font-weight: 400; font-style: normal; font-display: swap; } @font-face { - font-family: 'Optimo-Plain'; - src: url('../fonts/Plain-Light.otf') format('opentype'); - font-weight: 300; + font-family: Optimo-Plain; + src: url('../fonts/optimo/Plain-LightIta.otf') format('opentype'); + font-weight: 400; + font-style: italic; + font-display: swap; +} + +@font-face { + font-family: Optimo-Plain; + src: url('../fonts/optimo/Plain-Regular.otf') format('opentype'); + font-weight: 600; + font-style: normal; + font-display: swap; +} + +@font-face { + font-family: Optimo-Plain; + src: url('../fonts/optimo/Plain-RegularIta.otf') format('opentype'); + font-weight: 600; + font-style: italic; + font-display: swap; +} + +@font-face { + font-family: Optimo-Plain; + src: url('../fonts/optimo/Plain-Medium.ttf') format('truetype'); /* [1] */ + font-weight: 700; + font-style: normal; + font-display: swap; +} + +@font-face { + font-family: Optimo-Plain; + src: url('../fonts/optimo/Plain-MediumIta.ttf') format('truetype'); /* [1] */ + font-weight: 700; + font-style: italic; + font-display: swap; +} + +@font-face { + font-family: BB-Roller-Regular; + src: url('../fonts/bb-roller/BB-Roller-Mono-Regular-fontlab.ttf') + format('truetype'); /* [1] */ + font-weight: 400; + font-style: normal; + font-display: swap; +} + +@font-face { + font-family: BB-Roller-Mono-semibold; + src: url('../fonts/bb-roller/BB-Roller-Mono-ProTx-semibold.otf') + format('truetype'); /* [1] */ + font-weight: 600; font-style: normal; font-display: swap; } +*:not(pre):not(pre *):not(.body-response):not(.body-response *) { + font-family: Optimo-Plain, sans-serif !important; +} + +strong { + font-weight: 700 !important; +} + .portal-header { background: #323946 } + +.hosted-api-docs{ + height: calc(100vh - 24px); +} + .branding-container .logo p { color: #eaedf2 -} \ No newline at end of file +} +.since-beta-tag { + padding: 1px 5px; + margin: 0 10px 0 0; + border-radius: 4px; + border: 1px solid #707070; + color: white; + font-size: 0.8em; + font-weight: normal; + background: grey; +} diff --git a/api-spec/openapiSpecv3-2_0.json b/api-spec/openapiSpecv3-2_0.json index 3fb9f5d12..ff4227e95 100644 --- a/api-spec/openapiSpecv3-2_0.json +++ b/api-spec/openapiSpecv3-2_0.json @@ -4,22 +4,308 @@ "title": "ThoughtSpot Public REST API", "version": "2.0" }, + "x-roles": [ + { + "name": "26.2.0.cl", + "id": "26.2.0.cl", + "tags": [ + "26.2.0.cl" + ], + "description": "Roles for version 26.2.0.cl" + }, + { + "name": "10.4.0.cl", + "id": "10.4.0.cl", + "tags": [ + "10.4.0.cl" + ], + "description": "Roles for version 10.4.0.cl" + }, + { + "name": "26.7.0.cl", + "id": "26.7.0.cl", + "tags": [ + "26.7.0.cl" + ], + "description": "Roles for version 26.7.0.cl" + }, + { + "name": "26.6.0.cl", + "id": "26.6.0.cl", + "tags": [ + "26.6.0.cl" + ], + "description": "Roles for version 26.6.0.cl" + }, + { + "name": "10.15.0.cl", + "id": "10.15.0.cl", + "tags": [ + "10.15.0.cl" + ], + "description": "Roles for version 10.15.0.cl" + }, + { + "name": "10.13.0.cl", + "id": "10.13.0.cl", + "tags": [ + "10.13.0.cl" + ], + "description": "Roles for version 10.13.0.cl" + }, + { + "name": "10.7.0.cl", + "id": "10.7.0.cl", + "tags": [ + "10.7.0.cl" + ], + "description": "Roles for version 10.7.0.cl" + }, + { + "name": "26.5.0.cl", + "id": "26.5.0.cl", + "tags": [ + "26.5.0.cl" + ], + "description": "Roles for version 26.5.0.cl" + }, + { + "name": "9.0.0.cl", + "id": "9.0.0.cl", + "tags": [ + "9.0.0.cl" + ], + "description": "Roles for version 9.0.0.cl" + }, + { + "name": "9.4.0.cl", + "id": "9.4.0.cl", + "tags": [ + "9.4.0.cl" + ], + "description": "Roles for version 9.4.0.cl" + }, + { + "name": "9.12.0.cl", + "id": "9.12.0.cl", + "tags": [ + "9.12.0.cl" + ], + "description": "Roles for version 9.12.0.cl" + }, + { + "name": "26.4.0.cl", + "id": "26.4.0.cl", + "tags": [ + "26.4.0.cl" + ], + "description": "Roles for version 26.4.0.cl" + }, + { + "name": "10.12.0.cl", + "id": "10.12.0.cl", + "tags": [ + "10.12.0.cl" + ], + "description": "Roles for version 10.12.0.cl" + }, + { + "name": "9.2.0.cl", + "id": "9.2.0.cl", + "tags": [ + "9.2.0.cl" + ], + "description": "Roles for version 9.2.0.cl" + }, + { + "name": "9.9.0.cl", + "id": "9.9.0.cl", + "tags": [ + "9.9.0.cl" + ], + "description": "Roles for version 9.9.0.cl" + }, + { + "name": "9.6.0.cl", + "id": "9.6.0.cl", + "tags": [ + "9.6.0.cl" + ], + "description": "Roles for version 9.6.0.cl" + }, + { + "name": "10.10.0.cl", + "id": "10.10.0.cl", + "tags": [ + "10.10.0.cl" + ], + "description": "Roles for version 10.10.0.cl" + }, + { + "name": "26.8.0.cl", + "id": "26.8.0.cl", + "tags": [ + "26.8.0.cl" + ], + "description": "Roles for version 26.8.0.cl" + }, + { + "name": "10.6.0.cl", + "id": "10.6.0.cl", + "tags": [ + "10.6.0.cl" + ], + "description": "Roles for version 10.6.0.cl" + }, + { + "name": "10.3.0.cl", + "id": "10.3.0.cl", + "tags": [ + "10.3.0.cl" + ], + "description": "Roles for version 10.3.0.cl" + }, + { + "name": "10.1.0.cl", + "id": "10.1.0.cl", + "tags": [ + "10.1.0.cl" + ], + "description": "Roles for version 10.1.0.cl" + }, + { + "name": "10.9.0.cl", + "id": "10.9.0.cl", + "tags": [ + "10.9.0.cl" + ], + "description": "Roles for version 10.9.0.cl" + }, + { + "name": "10.8.0.cl", + "id": "10.8.0.cl", + "tags": [ + "10.8.0.cl" + ], + "description": "Roles for version 10.8.0.cl" + }, + { + "name": "9.5.0.cl", + "id": "9.5.0.cl", + "tags": [ + "9.5.0.cl" + ], + "description": "Roles for version 9.5.0.cl" + }, + { + "name": "26.3.0.cl", + "id": "26.3.0.cl", + "tags": [ + "26.3.0.cl" + ], + "description": "Roles for version 26.3.0.cl" + }, + { + "name": "10.14.0.cl", + "id": "10.14.0.cl", + "tags": [ + "10.14.0.cl" + ], + "description": "Roles for version 10.14.0.cl" + }, + { + "name": "9.7.0.cl", + "id": "9.7.0.cl", + "tags": [ + "9.7.0.cl" + ], + "description": "Roles for version 9.7.0.cl" + } + ], "tags": [], "paths": { - "/api/rest/2.0/auth/session/user": { - "get": { - "operationId": "getCurrentUserInfo", - "description": "Get session information for the currently logged-in user.", + "/api/rest/2.0/ai/agent/conversation/create": { + "post": { + "operationId": "createAgentConversation", + "description": "\n Version: 26.2.0.cl or later\n\nVersion: 26.2.0.cl or later\n\nCreates a new Spotter agent conversation based on the provided context and settings. The endpoint was in Beta from 26.2.0.cl through 26.4.0.cl.\n\nRequires `CAN_USE_SPOTTER` privilege and at least view access to the metadata object specified in the request.\n\n#### Usage guidelines\n\nThe request must include the `metadata_context` parameter to define the conversation context. The context type can be one of:\n\n- `DATA_SOURCE` *(available from 26.5.0.cl)*: targets a specific data source. Provide `data_source_identifier` in `data_source_context` for a single data source, or `data_source_identifiers` for multi-data-source context. The deprecated `guid` field is accepted for backwards compatibility.\n- `AUTO_MODE` *(available from 26.5.0.cl)*: automatically discovers and selects the most relevant datasets for the user's queries.\n\n> **Note for callers on versions 26.2.0.cl – 26.4.0.cl (Beta):** use the lowercase `data_source` enum value with the `guid` field instead of the above. Example: `{ \"type\": \"data_source\", \"data_source_context\": { \"guid\": \"\" } }`.\n\nThe `conversation_settings` parameter controls which Spotter capabilities are enabled for the conversation:\n\n- `enable_contextual_change_analysis` (default: `true`, **deprecated from 26.2.0.cl**) — always enabled in Spotter 3; setting this to `false` has no effect on versions >= 26.2.0.cl\n- `enable_natural_language_answer_generation` (default: `true`, **deprecated from 26.2.0.cl**) — always enabled in Spotter 3; setting this to `false` has no effect on versions >= 26.2.0.cl\n- `enable_reasoning` (default: `true`, **deprecated from 26.2.0.cl**) — always enabled in Spotter 3; setting this to `false` has no effect on versions >= 26.2.0.cl\n- `enable_save_chat` (default: `false`, *available from 26.5.0.cl*) — enables saving the conversation for later retrieval via conversation history\n\nIf the request is successful, the response includes a unique `conversation_identifier` that must be passed to `sendAgentConversationMessage` or `sendAgentConversationMessageStreaming` to send messages within this conversation. The response also includes `conversation_id` with the same value for backwards compatibility; use `conversation_identifier` for new integrations.\n\n#### Example request\n\n```json\n{\n \"metadata_context\": {\n \"type\": \"DATA_SOURCE\",\n \"data_source_context\": {\n \"data_source_identifier\": \"a1b2c3d4-e5f6-7890-abcd-ef1234567890\"\n }\n },\n \"conversation_settings\": {}\n}\n```\n\n#### Error responses\n\n| Code | Description |\n| ---- | --------------------------------------------------------------------------------------------------------------------------------------- |\n| 401 | Unauthorized — authentication token is missing, expired, or invalid. |\n| 403 | Forbidden — the authenticated user does not have `CAN_USE_SPOTTER` privilege or lacks view permission on the specified metadata object. |\n\n> ###### Note:\n>\n> - This endpoint was in Beta from 26.2.0.cl through 26.4.0.cl and is Generally Available from version 26.5.0.cl.\n> - This endpoint requires Spotter - please contact ThoughtSpot support to enable Spotter on your cluster.\n\n\n\n\n#### Endpoint URL\n", "tags": [ - "Authentication" + "AI", + "26.2.0.cl" ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CreateAgentConversationRequest" + } + } + }, + "required": true + }, "parameters": [], "responses": { "200": { + "description": "Common successful response", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/User" + "$ref": "#/components/schemas/AgentConversation" + }, + "examples": { + "example_1": { + "summary": "Create a conversation with a specific data source", + "value": { + "conversation_id": "wwHQ5j8O8dQC", + "conversation_identifier": "wwHQ5j8O8dQC" + } + }, + "example_2": { + "summary": "Create a conversation using auto mode where the agent automatically discovers and selects the most relevant datasets for the user's queries", + "value": { + "conversation_id": "aaHQ5j8O8dQC", + "conversation_identifier": "aaHQ5j8O8dQC" + } + } + } + } + } + }, + "201": { + "description": "Common error response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/AgentConversation" + } + } + } + }, + "400": { + "description": "Operation failed", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "401": { + "description": "Unauthorized access.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "403": { + "description": "Forbidden access.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" } } } @@ -37,185 +323,58 @@ } } }, - "/api/rest/2.0/users/search": { + "/api/rest/2.0/ai/conversation/create": { "post": { - "operationId": "searchUsers", - "description": "Gets a list of ThoughtSpot users. To get details of a specific user, specify the user GUID or name. ", + "operationId": "createConversation", + "description": "\nBeta Version: 10.4.0.cl or later\n\nVersion: 10.4.0.cl or later\n\nCreates a new conversation session tied to a specific data model for AI-driven natural language querying.\n\nRequires `CAN_USE_SPOTTER` privilege and at least view access to the metadata object specified in the request.\n\n#### Usage guidelines\n\nThe request must include:\n- `metadata_identifier`: the unique ID of the data source that provides context for the conversation\n\nOptionally, you can provide:\n- `tokens`: a token string to set initial context for the conversation (e.g., `\"[sales],[item type],[state]\"`)\n\nIf the request is successful, ThoughtSpot returns a unique `conversation_identifier` that must be passed to `sendMessage` to continue the conversation.\n\n#### Error responses\n\n| Code | Description |\n|------|-------------|\n| 401 | Unauthorized — authentication token is missing, expired, or invalid. |\n| 403 | Forbidden — the authenticated user does not have `CAN_USE_SPOTTER` privilege or lacks view permission on the specified metadata object. |\n\n> ###### Note:\n> * This endpoint is currently in Beta. Breaking changes may be introduced before the endpoint is made Generally Available.\n> * This endpoint requires Spotter - please contact ThoughtSpot support to enable Spotter on your cluster.\n\n\n\n\n#### Endpoint URL\n", "tags": [ - "Users" + "AI", + "10.4.0.cl" ], "requestBody": { "content": { "application/json": { "schema": { - "type": "object", - "properties": { - "user_identifier": { - "description": "GUID / name of the user to search", - "type": "string", - "deprecated": false - }, - "display_name": { - "description": "A unique display name string for the user account, usually their first and last name", - "type": "string", - "deprecated": false - }, - "visibility": { - "description": "Visibility of the user.", - "type": "string", - "enum": [ - "SHARABLE", - "NON_SHARABLE" - ], - "deprecated": false - }, - "email": { - "description": "Email of the user account", - "type": "string", - "deprecated": false - }, - "group_identifiers": { - "description": "GUID or name of the group to which the user belongs.", - "type": "array", - "items": { - "type": "string" - }, - "deprecated": false - }, - "privileges": { - "description": "Privileges assigned to the user.", - "type": "array", - "items": { - "type": "string", - "enum": [ - "ADMINISTRATION", - "AUTHORING", - "USERDATAUPLOADING", - "DATADOWNLOADING", - "USERMANAGEMENT", - "SECURITYMANAGEMENT", - "LOGICALMODELING", - "DATAMANAGEMENT", - "TAGMANAGEMENT", - "SHAREWITHALL", - "SYSTEMMANAGEMENT", - "JOBSCHEDULING", - "A3ANALYSIS", - "EXPERIMENTALFEATUREPRIVILEGE", - "BYPASSRLS", - "RANALYSIS", - "DISABLE_PINBOARD_CREATION", - "DEVELOPER", - "APPLICATION_ADMINISTRATION", - "USER_ADMINISTRATION", - "GROUP_ADMINISTRATION", - "BACKUP_ADMINISTRATION", - "SYSTEM_INFO_ADMINISTRATION", - "ENABLESPOTAPPCREATION", - "SYNCMANAGEMENT" - ] - }, - "deprecated": false - }, - "account_type": { - "description": "Type of the account.", - "type": "string", - "enum": [ - "LOCAL_USER", - "LDAP_USER", - "SAML_USER", - "OIDC_USER", - "REMOTE_USER" - ], - "deprecated": false - }, - "account_status": { - "description": "Current status of the user account.", - "type": "string", - "enum": [ - "ACTIVE", - "INACTIVE", - "EXPIRED", - "LOCKED", - "PENDING" - ], - "deprecated": false - }, - "notify_on_share": { - "description": "User preference for receiving email notifications when another ThoughtSpot user\nshares a metadata object such as Answer, Liveboard, or Worksheet.", - "type": "boolean", - "deprecated": false - }, - "show_onboarding_experience": { - "description": "The user preference for revisiting the onboarding experience.", - "type": "boolean", - "deprecated": false - }, - "onboarding_experience_completed": { - "description": "Indicates if the user has completed the onboarding walkthrough.", - "type": "boolean", - "deprecated": false - }, - "org_identifiers": { - "description": "IDs or names of the Orgs to which the user belongs", - "type": "array", - "items": { - "type": "string" - }, - "deprecated": false - } - } + "$ref": "#/components/schemas/CreateConversationRequest" } } }, "required": true }, + "parameters": [], "responses": { "200": { + "description": "Common successful response", "content": { "application/json": { "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/User" - } + "$ref": "#/components/schemas/Conversation" } } } }, - "500": { - "description": "Operation failed", + "201": { + "description": "Common error response", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/ErrorResponse" + "$ref": "#/components/schemas/Conversation" } } } - } - } - } - }, - "/api/rest/2.0/system": { - "get": { - "operationId": "getSystemInformation", - "description": "Get system details", - "tags": [ - "System" - ], - "parameters": [], - "responses": { - "200": { + }, + "400": { + "description": "Operation failed", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/SystemInfo" + "$ref": "#/components/schemas/ErrorResponse" } } } }, - "500": { - "description": "Operation failed", + "401": { + "description": "Unauthorized access.", "content": { "application/json": { "schema": { @@ -223,24 +382,13 @@ } } } - } - } - } - }, - "/api/rest/2.0/system/config": { - "get": { - "operationId": "getSystemConfig", - "description": "Get system config information", - "tags": [ - "System" - ], - "parameters": [], - "responses": { - "200": { + }, + "403": { + "description": "Forbidden access.", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/SystemConfig" + "$ref": "#/components/schemas/ErrorResponse" } } } @@ -258,76 +406,41 @@ } } }, - "/api/rest/2.0/orgs/search": { - "post": { - "operationId": "searchOrgs", - "description": "Gets Orgs configured on a ThoughtSpot instance. Requires cluster administration privileges.", + "/api/rest/2.0/ai/agent/conversations/{conversation_identifier}/delete": { + "delete": { + "operationId": "deleteConversation", + "description": "\nDeletes an existing agent conversation.
Version: 26.7.0.cl or later\n\nPermanently deletes an existing saved agent conversation and all its associated messages. This operation is irreversible — deleted conversations cannot be recovered.\n\nRequires `CAN_USE_SPOTTER` privilege and ownership of the conversation being deleted.\n\n#### Usage guidelines\n\nThe request must include:\n\n- `conversation_identifier` *(path parameter)*: the unique ID of the conversation to delete, as returned by `createAgentConversation` or `getConversationList`\n\nA successful request returns an empty `204 No Content` response. The deleted conversation no longer appears in `getConversationList`.\n\n#### Example request\n\n```bash\nDELETE /api/rest/2.0/ai/agent/conversations/{conversation_identifier}/delete\n```\n\n#### Error responses\n\n| Code | Description |\n|------|-------------|\n| 401 | Unauthorized — authentication token is missing, expired, or invalid. |\n| 403 | Forbidden — the authenticated user does not have `CAN_USE_SPOTTER` privilege or does not own the specified conversation. |\n| 404 | Not Found — no conversation exists with the given `conversation_identifier` for the authenticated user. |\n\n> ###### Note:\n>\n> - Deletion is permanent and cannot be undone. Ensure the correct `conversation_identifier` is used before calling this endpoint.\n> - Only conversations created with `enable_save_chat: true` are persisted and can be deleted via this endpoint.\n> - Available from version 26.7.0.cl and later.\n> - This endpoint requires Spotter — please contact ThoughtSpot Support to enable Spotter on your cluster.\n\n\n\n\n#### Endpoint URL\n", "tags": [ - "Orgs" + "AI", + "26.7.0.cl" + ], + "parameters": [ + { + "in": "path", + "name": "conversation_identifier", + "required": true, + "schema": { + "type": "string" + }, + "description": "Unique identifier of the conversation to delete." + } ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "org_identifier": { - "description": "ID or name of the Org.", - "type": "string", - "deprecated": false - }, - "description": { - "description": "Description of the Org.", - "type": "string", - "deprecated": false - }, - "visibility": { - "description": "Visibility of the Org.", - "type": "string", - "enum": [ - "SHOW", - "HIDDEN" - ], - "deprecated": false - }, - "status": { - "description": "Status of the Org.", - "type": "string", - "enum": [ - "ACTIVE", - "IN_ACTIVE" - ], - "deprecated": false - }, - "user_identifiers": { - "description": "GUIDs or names of the users for which you want to retrieve the Orgs data.", - "type": "array", - "items": { - "type": "string" - }, - "deprecated": false - } - } - } - } - }, - "required": true - }, "responses": { - "200": { + "204": { + "description": "Successfully deleted the agent conversation." + }, + "400": { + "description": "Operation failed", "content": { "application/json": { "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/OrgResponse" - } + "$ref": "#/components/schemas/ErrorResponse" } } } }, - "500": { - "description": "Operation failed", + "401": { + "description": "Unauthorized access.", "content": { "application/json": { "schema": { @@ -335,48 +448,13 @@ } } } - } - } - } - }, - "/api/rest/2.0/tags/search": { - "post": { - "operationId": "searchTags", - "description": "TAllows searching tags. ", - "tags": [ - "Tags" - ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "tag_identifier": { - "description": "Name or Id of the tag.", - "type": "string", - "deprecated": false - }, - "color": { - "description": "Color of the tag.", - "type": "string", - "deprecated": false - } - } - } - } }, - "required": true - }, - "responses": { - "200": { + "403": { + "description": "Forbidden access.", "content": { "application/json": { "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/Tag" - } + "$ref": "#/components/schemas/ErrorResponse" } } } @@ -394,139 +472,37 @@ } } }, - "/api/rest/2.0/groups/search": { - "post": { - "operationId": "searchUserGroups", - "description": "Allows searching groups. Requires administrator privileges.", + "/api/rest/2.0/ai/agent/instructions/get": { + "get": { + "operationId": "getAgentInstructions", + "description": "\nBeta Version: 26.6.0.cl or later\n\nRetrieves the admin instructions currently configured for the AI agent (Spotter). Admin instructions are tenant- and org-scoped text that guide agent behavior across all conversations.\n\nRequires admin privileges. Only users with org admin access can retrieve agent instructions.\n\n#### Usage guidelines\n\nNo input parameters are required. The API returns the stored `AgentInstructions` record for the caller's tenant and org.\n\nIf no instructions have been configured yet, the API returns a record with an empty `instructions` field and `null` values for `id`, `created_at`, `updated_at`, and `last_updated_by`.\n\nIf the request is successful, the response includes:\n\n- `id`: unique identifier of the instructions record\n- `instructions`: the configured instructions text\n- `created_at`: ISO timestamp when the instructions were first saved\n- `updated_at`: ISO timestamp when the instructions were last updated\n- `last_updated_by`: user ID of the admin who last updated the instructions (may be `null` for older records)\n\n#### Error responses\n\n| Code | Description |\n|------|-------------|\n| 401 | Unauthorized — authentication token is missing, expired, or invalid. |\n| 403 | Forbidden — the authenticated user does not have org admin privileges required to read agent instructions. |\n\n> ###### Note:\n>\n> - Use `setAgentInstructions` to create or update agent instructions.\n> - Available from version 26.6.0.cl and later.\n\n\n\n\n#### Endpoint URL\n", "tags": [ - "Groups" + "AI", + "26.6.0.cl" ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "default_liveboard_identifiers": { - "description": "GUID of Liveboards which will be assigned as default Liveboards for the users in the specified group.", - "type": "array", - "items": { - "type": "string" - }, - "deprecated": false - }, - "description": { - "description": "Description of the group.", - "type": "string", - "deprecated": false - }, - "display_name": { - "description": "Display name of the group", - "type": "string", - "deprecated": false - }, - "group_identifier": { - "description": "GUID or name of the group", - "type": "string", - "deprecated": false - }, - "org_identifiers": { - "description": "ID or name of the Org to which the group belongs.", - "type": "array", - "items": { - "type": "string" - }, - "deprecated": false - }, - "privileges": { - "description": "Privileges assigned to the group.", - "type": "array", - "items": { - "type": "string", - "enum": [ - "ADMINISTRATION", - "AUTHORING", - "USERDATAUPLOADING", - "DATADOWNLOADING", - "USERMANAGEMENT", - "SECURITYMANAGEMENT", - "LOGICALMODELING", - "DATAMANAGEMENT", - "TAGMANAGEMENT", - "SHAREWITHALL", - "SYSTEMMANAGEMENT", - "JOBSCHEDULING", - "A3ANALYSIS", - "EXPERIMENTALFEATUREPRIVILEGE", - "BYPASSRLS", - "RANALYSIS", - "DISABLE_PINBOARD_CREATION", - "DEVELOPER", - "APPLICATION_ADMINISTRATION", - "USER_ADMINISTRATION", - "GROUP_ADMINISTRATION", - "BACKUP_ADMINISTRATION", - "SYSTEM_INFO_ADMINISTRATION", - "ENABLESPOTAPPCREATION", - "SYNCMANAGEMENT" - ] - }, - "deprecated": false - }, - "sub_group_identifiers": { - "description": "GUID or name of the sub groups. A subgroup is a group assigned to a parent group.", - "type": "array", - "items": { - "type": "string" - }, - "deprecated": false - }, - "type": { - "description": "Group type.", - "type": "string", - "enum": [ - "LOCAL_GROUP", - "LDAP_GROUP" - ], - "deprecated": false - }, - "user_identifiers": { - "description": "GUID or name of the users assigned to the group.", - "type": "array", - "items": { - "type": "string" - }, - "deprecated": false - }, - "visibility": { - "description": "Visibility of the group. To make a group visible to other users and groups,\nset the visibility to SHAREABLE. ", - "type": "string", - "enum": [ - "SHARABLE", - "NON_SHARABLE" - ], - "deprecated": false - } + "parameters": [], + "responses": { + "200": { + "description": "Common successful response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/AgentInstructions" } } } }, - "required": true - }, - "responses": { - "200": { + "201": { + "description": "Common error response", "content": { "application/json": { "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/UserGroupResponse" - } + "$ref": "#/components/schemas/AgentInstructions" } } } }, - "500": { + "400": { "description": "Operation failed", "content": { "application/json": { @@ -535,167 +511,23 @@ } } } - } - } - } - }, - "/api/rest/2.0/metadata/search": { - "post": { - "operationId": "searchMetadata", - "description": "Allows searching for metadata objects. You can search for metadata objects \nsuch as Liveboard, Answer. Requires at least view access to the metadata object.", - "tags": [ - "Metadata" - ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "metadata": { - "description": "Metadata objects such as Liveboards, Answers, and Worksheets.", - "type": "array", - "items": { - "$ref": "#/components/schemas/MetadataListItemInput" - }, - "deprecated": false - }, - "permissions": { - "description": "Object permission details to search by.", - "type": "array", - "items": { - "$ref": "#/components/schemas/PermissionInput" - }, - "deprecated": false - }, - "created_by_user_identifiers": { - "description": "GUID or name of user who created the metadata object.", - "type": "array", - "items": { - "type": "string" - }, - "deprecated": false - }, - "dependent_object_version": { - "description": "Version of the dependent table of the metadata like worksheets.", - "default": "V1", - "type": "string", - "enum": [ - "V1", - "V2" - ], - "deprecated": false - }, - "exclude_objects": { - "description": "List of metadata objects to exclude from search.", - "type": "array", - "items": { - "$ref": "#/components/schemas/ExcludeMetadataListItemInput" - }, - "deprecated": false - }, - "favorite_object_options": { - "description": "Options to sort the API response by objects set as favorites \nfor the logged-in user or the users specified in the API request.", - "$ref": "#/components/schemas/FavoriteObjectOptionsInput", - "deprecated": false - }, - "include_auto_created_objects": { - "description": "Includes system-generated metadata objects.", - "default": false, - "type": "boolean", - "deprecated": false - }, - "include_dependent_objects": { - "description": "Includes dependents of the metadata object specified in the API request.\nFor example, a worksheet can consist of dependent objects such as Liveboards or Answers.", - "default": false, - "type": "boolean", - "deprecated": false - }, - "include_details": { - "description": "Includes complete details of the metadata objects.", - "default": false, - "type": "boolean", - "deprecated": false - }, - "include_headers": { - "description": "Includes headers of the metadata objects.", - "default": true, - "type": "boolean", - "deprecated": false - }, - "include_hidden_objects": { - "description": "Includes details of the hidden objects, such as a column in a worksheet or a table.", - "default": false, - "type": "boolean", - "deprecated": false - }, - "include_incomplete_objects": { - "description": "Includes objects with incomplete metadata.", - "default": false, - "type": "boolean", - "deprecated": false - }, - "include_visualization_headers": { - "description": "Includes visualization headers of the specified Liveboard object.", - "default": false, - "type": "boolean", - "deprecated": false - }, - "include_worksheet_search_assist_data": { - "description": "If search assistance lessons are configured on a worksheet, \nthe API returns the search assist data for Worksheet objects.", - "type": "boolean", - "deprecated": false - }, - "modified_by_user_identifiers": { - "description": "Includes ID or names of the users who have modified the metadata object.", - "type": "array", - "items": { - "type": "string" - }, - "deprecated": false - }, - "record_offset": { - "description": "The starting record number from where the records should be included.", - "default": 0, - "type": "integer", - "format": "int32", - "deprecated": false - }, - "record_size": { - "description": "The number of records that should be included.", - "default": 10, - "type": "integer", - "format": "int32", - "deprecated": false - }, - "sort_options": { - "description": "Sort options to filter metadata details.", - "$ref": "#/components/schemas/SortOptions", - "deprecated": false - }, - "tag_identifiers": { - "description": "Tags to filter metadata objects by", - "type": "array", - "items": { - "type": "string" - }, - "deprecated": false - } + }, + "401": { + "description": "Unauthorized access.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" } } } }, - "required": true - }, - "responses": { - "200": { + "403": { + "description": "Forbidden access.", "content": { "application/json": { "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/MetadataSearchResponse" - } + "$ref": "#/components/schemas/ErrorResponse" } } } @@ -713,47 +545,72 @@ } } }, - "/api/rest/2.0/metadata/liveboard/sql": { - "post": { - "operationId": "fetchLiveboardSqlQuery", - "description": "Fetches SQL query data for Liveboard and its visualizations.", + "/api/rest/2.0/ai/agent/conversations/{conversation_identifier}/messages": { + "get": { + "operationId": "getConversation", + "description": "\nRetrieves the full public-safe content of a saved agent conversation: ordered\nturns (user messages and agent response items) and sanitized code-execution\nfile metadata. Internal graph or branch state, Azure file identifiers, and\nmessages with a `SYSTEM` source are omitted. The full answer payload is not\nembedded; fetch it separately via `loadAnswer` using the `answer_id` on each\n`answer` response item.\nRequires `CAN_USE_SPOTTER` privilege and access to the specified conversation.
Version: 26.7.0.cl or later\n\nRetrieves the full public-safe content of a saved agent conversation. Returns ordered conversation messages — each carrying an optional user prompt (the user's message and any attachments) and the agent response items produced for that turn — plus sanitized metadata for any files generated by the code-execution tool. \n\nUse this endpoint to render a persisted conversation in a UI, build an audit trail, or post-process a completed conversation. The full answer payload is not embedded — fetch it separately via `loadAnswer` using the `answer_id` on each `answer` response item.\n\nRequires `CAN_USE_SPOTTER` privilege and access to the specified conversation.\n\n#### Usage guidelines\n\nThe request must include:\n\n- `conversation_identifier` _(path parameter)_: the unique ID of the conversation, as returned by `createAgentConversation` or `getConversationList`.\n\nIf the request is successful, the response contains two top-level fields:\n\n| Field | Type | Description |\n| ---------------------- | ------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------- |\n| `messages` | `ConversationMessage[]` | Ordered oldest to newest. Empty array when the conversation has no messages. |\n| `code_execution_files` | `CodeExecutionFileMetadata[]` | List of sanitized file metadata entries (one per `file_id`). Covers all code-execution-generated files referenced anywhere in the conversation. Empty array when there are none. |\n\nNo other top-level fields are returned.\n\n#### ConversationMessage fields\n\n| Field | Type | Description |\n| --------------------- | ---------------------------- | -------------------------------------------------------------------------------------------------------------- |\n| `message_id` | `String` | Stable identifier for the turn. For liveboard-started synthetic first turns, this is the root node identifier. |\n| `timestamp_in_millis` | `Long` | Milliseconds since Unix epoch for the turn. |\n| `user_prompt` | `UserPrompt` | User-authored prompt that started the turn (message and attachments). `null` for liveboard-started synthetic first turns. |\n| `response_items` | `ConversationResponseItem[]` | Agent-side output produced in response to this turn. Empty array for in-progress turns. |\n\n#### UserPrompt fields\n\n| Field | Type | Description |\n| ------------- | ---------------------- | ---------------------------------------------------------------------------------------------------- |\n| `message` | `UserMessage` | User query that started the turn. `null` for liveboard-started synthetic first turns. |\n| `attachments` | `UserAttachmentItem[]` | Files or connector resources attached to the user message. Empty array when there are no attachments. |\n\n#### UserMessage fields\n\n| Field | Type | Description |\n| ------------ | -------- | --------------------------------------------- |\n| `message_id` | `String` | Unique identifier of the user-source message. |\n| `content` | `String` | Text body of the user query. |\n\n#### UserAttachmentItem fields\n\nDiscriminated by `type`. Only `\"file\"` or `\"resource\"` are valid values. Only the fields for the indicated variant are populated. See `ConversationResponseItem` below for the field definitions of the `file` and `resource` variants — `UserAttachmentItem` uses the same fields.\n\n#### ConversationResponseItem fields\n\nEvery item carries a `type` discriminator and these shared fields:\n\n| Field | Type | Description |\n| --------------------- | --------- | ------------------------------------------------------------------------------------------------------------------------------ |\n| `type` | `String` | Discriminator. One of `\"text\"`, `\"tool_call\"`, `\"tool_result\"`, `\"answer\"`, `\"file\"`, `\"resource\"`, `\"search_datasets\"`. |\n| `timestamp_in_millis` | `Long` | Milliseconds since Unix epoch when this item was produced. |\n| `is_thinking` | `Boolean` | `true` when the item represents internal agent reasoning rather than user-facing output. Consumers may hide or collapse these. |\n| `step_title` | `String` | Human-readable label for the agent step producing this item (e.g. `\"Searching\"`, `\"Visualising\"`). |\n\nVariant-specific fields:\n\n- **`text`** — agent text output: `content` (String), `content_type` (`ContentMimeType` enum), `file_reference` (FileReference).\n- **`tool_call`** — agent invoked a tool: `tool_call_id` (String), `tool_name` (String), `arguments` (JSON object).\n- **`tool_result`** — result returned from a tool invocation: `tool_call_id`, `tool_name`, `content`, `content_type` (`ContentMimeType` enum), `success` (Boolean).\n- **`answer`** — slim reference to a saved answer: `answer_id` (String), `tool_call_id`, `tool_name`.\n- **`file`** — uploaded or generated files: `files` (`PublicFileInfo[]`).\n- **`resource`** — MCP connector resource: `title`, `uri`, `name`, `mime_type`, `description`, `size` (Int), `connector_id`, `connector_name`, `connector_slug`, `transport_type` (`TransportType` enum).\n- **`search_datasets`** — dataset discovery result: `text` (String), `data_sources` (`DataSourceInfo[]`).\n\nClients should switch on `type` and ignore unknown variants for forward-compatibility.\n\n#### content_type values\n\n`content_type` is the `ContentMimeType` enum. The following values are defined:\n\n| Value | Wire MIME | Meaning |\n| --------------------------- | --------------------------- | ---------------------------------------------------- |\n| `TEXT_PLAIN` | `text/plain` | Plain text. Default for `tool_result`. |\n| `TEXT_MARKDOWN` | `text/markdown` | Markdown. Default for `text`. |\n| `TEXT_X_MARKDOWN_WITH_CODE` | `text/x-markdown-with-code` | Markdown whose body starts with a fenced code block. |\n| `TEXT_HTML` | `text/html` | Raw HTML. |\n\n#### transport_type values\n\n`transport_type` is the `TransportType` enum used on the `resource` variant.\n\n| Value | Meaning |\n| ------------------ | --------------------------------------------- |\n| `STREAMABLE_HTTP` | Streamable HTTP transport (default for MCP). |\n| `SSE` | Server-sent events transport. |\n\n#### FileReference fields\n\n| Field | Type | Description |\n| ------------------------ | -------- | ------------------------------------------------------------ |\n| `file_id` | `String` | Unique identifier of the code-execution-generated file. |\n| `display_name` | `String` | Human-readable file name. |\n| `created_time_in_millis` | `Long` | Milliseconds since Unix epoch when the file was created. |\n\nCross-reference `file_id` against `code_execution_files` to retrieve full metadata including the `expired` flag before attempting a download.\n\n#### PublicFileInfo fields\n\n| Field | Type | Description |\n| ------------------------ | -------- | -------------------------------------------------------- |\n| `file_id` | `String` | Unique identifier of the file. |\n| `display_name` | `String` | Human-readable file name. |\n| `file_type` | `String` | File type such as `csv`, `pdf`, or `png`. |\n| `created_time_in_millis` | `Long` | Milliseconds since Unix epoch when the file was created. |\n| `size_bytes` | `Int` | File size in bytes. |\n\n#### CodeExecutionFileMetadata fields\n\nEach entry in the `code_execution_files` array contains:\n\n| Field | Type | Description |\n| ------------------------ | --------- | ------------------------------------------------------------------------------------------------------------------------------- |\n| `file_id` | `String` | Unique identifier of the file. |\n| `display_name` | `String` | Human-readable file name. |\n| `file_type` | `String` | File type such as `csv`, `pdf`, or `png`. |\n| `created_time_in_millis` | `Long` | Milliseconds since Unix epoch when the file was created. |\n| `expired` | `Boolean` | When `true`, the underlying file is no longer retrievable from code-execution storage; UIs should disable download and preview. |\n\n#### Loading answer payloads\n\nEach `AnswerResponseItem` in the response contains an `answer_id` field. Pass this value as the `answer_identifier` parameter to `loadAnswer` to retrieve the full answer payload (TML tokens, visualization metadata) for that item.\n\n#### Example request\n\n```bash\nGET /api/rest/2.0/ai/agent/conversations/{conversation_identifier}/messages\n```\n\n#### Example response\n\n```json\n{\n \"messages\": [\n {\n \"message_id\": \"node_u_01\",\n \"timestamp_in_millis\": 1744000000000,\n \"user_prompt\": {\n \"message\": {\n \"message_id\": \"msg_u_01\",\n \"content\": \"Show me revenue by region as a chart.\"\n },\n \"attachments\": []\n },\n \"response_items\": [\n {\n \"type\": \"tool_call\",\n \"tool_call_id\": \"toolu_01ABC\",\n \"tool_name\": \"search_datasets\",\n \"step_title\": \"Searching datasets\",\n \"arguments\": { \"query\": \"revenue\" },\n \"timestamp_in_millis\": 1744000001000,\n \"is_thinking\": false\n },\n {\n \"type\": \"answer\",\n \"answer_id\": \"ans_01XYZ\",\n \"tool_call_id\": \"toolu_02DEF\",\n \"tool_name\": \"fetch_and_visualize\",\n \"step_title\": \"Visualising\",\n \"timestamp_in_millis\": 1744000004000,\n \"is_thinking\": false\n },\n {\n \"type\": \"text\",\n \"content\": \"Revenue is highest in APAC.\",\n \"content_type\": \"TEXT_MARKDOWN\",\n \"timestamp_in_millis\": 1744000005000,\n \"is_thinking\": false,\n \"step_title\": null,\n \"file_reference\": {\n \"file_id\": \"revenue_by_region.csv\",\n \"display_name\": \"revenue_by_region.csv\",\n \"created_time_in_millis\": 1744027200000\n }\n }\n ]\n }\n ],\n \"code_execution_files\": [\n {\n \"file_id\": \"revenue_by_region.csv\",\n \"display_name\": \"revenue_by_region.csv\",\n \"file_type\": \"csv\",\n \"created_time_in_millis\": 1744027200000,\n \"expired\": false\n }\n ]\n}\n```\n\n#### Example: liveboard-started conversation\n\nWhen a conversation is initiated from a saved liveboard visualization rather than a user query, the first turn is synthetic. `user_prompt` is `null`, and `response_items` contains a single `answer` item referencing the seed visualization.\n\n```json\n{\n \"messages\": [\n {\n \"message_id\": \"ROOT_NODE\",\n \"timestamp_in_millis\": 1743999000000,\n \"user_prompt\": null,\n \"response_items\": [\n {\n \"type\": \"answer\",\n \"answer_id\": \"lb_seed_01\",\n \"tool_call_id\": null,\n \"tool_name\": null,\n \"step_title\": null,\n \"timestamp_in_millis\": 1743999000000,\n \"is_thinking\": false\n }\n ]\n }\n ],\n \"code_execution_files\": []\n}\n```\n\nSubsequent turns follow the normal user-to-agent pattern.\n\n#### Error responses\n\n| Code | Description |\n| ---- | --------------------------------------------------------------------------------------------------------------------------- |\n| 401 | Unauthorized — authentication token is missing, expired, or invalid. |\n| 403 | Forbidden — the authenticated user does not have `CAN_USE_SPOTTER` privilege or lacks access to the specified conversation. |\n| 404 | Not Found — no conversation exists with the given identifier for the authenticated user. |\n\n> ###### Note:\n>\n> - Messages with an internal `SYSTEM` source are always dropped from the response.\n> - In-progress turns are still returned with an empty `response_items` array so clients can render the user message immediately.\n> - Do not assume every `tool_call` has a paired `tool_result` or `answer` — an interrupted conversation can leave a dangling call.\n> - Available from version 26.7.0.cl and later.\n> - This endpoint requires Spotter — please contact ThoughtSpot Support to enable Spotter on your cluster.\n\n\n\n\n#### Endpoint URL\n", "tags": [ - "Metadata" + "AI", + "26.7.0.cl" ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "metadata_identifier": { - "description": "ID or name of an Liveboard.", - "type": "string", - "deprecated": false - }, - "visualization_identifiers": { - "description": "Unique ID or name of visualizations.", - "type": "array", - "items": { - "type": "string" - }, - "deprecated": false - } - }, - "required": [ - "metadata_identifier" - ] + "parameters": [ + { + "in": "path", + "name": "conversation_identifier", + "required": true, + "schema": { + "type": "string" + }, + "description": "Unique identifier of the conversation to load." + } + ], + "responses": { + "200": { + "description": "Common successful response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ConversationMessageResponse" + } } } }, - "required": true - }, - "responses": { - "200": { + "201": { + "description": "Common error response", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/SqlQueryResponse" + "$ref": "#/components/schemas/ConversationMessageResponse" + } + } + } + }, + "400": { + "description": "Operation failed", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "401": { + "description": "Unauthorized access.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "403": { + "description": "Forbidden access.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" } } } @@ -771,39 +628,95 @@ } } }, - "/api/rest/2.0/metadata/answer/sql": { - "post": { - "operationId": "fetchAnswerSqlQuery", - "description": "Fetches SQL query data for an Answer.", + "/api/rest/2.0/ai/agent/conversations": { + "get": { + "operationId": "getConversationList", + "description": "\nRetrieves the list of saved agent conversations for the currently authenticated user.\nOnly conversations created with `enable_save_chat: true` are returned.
Version: 26.7.0.cl or later\n\nRetrieves a paginated list of saved agent conversations for the currently authenticated user. Only conversations that were created with `enable_save_chat: true` in `createAgentConversation` are returned.\n\nRequires `CAN_USE_SPOTTER` privilege.\n\n#### Usage guidelines\n\nThe request supports the following optional query parameters:\n\n- `limit`: maximum number of conversations to return. Use this together with `offset` for pagination.\n- `offset`: number of conversations to skip before returning results. Defaults to `0`.\n- `skip_empty`: when `true` (default), conversations with no messages are excluded from the results. Set to `false` to include empty conversations.\n\nIf the request is successful, the response includes a `conversations` array. Each entry contains:\n\n- `conversation_identifier`: the unique ID of the conversation, used as input to `sendAgentConversationMessage`, `updateConversation`, `deleteConversation`, `stopConversation`, and `loadAnswer`\n- `conversation_title`: the display name of the conversation\n- `created_at`: ISO 8601 timestamp of when the conversation was created\n- `updated_at`: ISO 8601 timestamp of the most recent update to the conversation\n- `data_source_identifiers`: list of unique IDs of the data sources associated with the conversation\n- `data_source_names`: array of `{ id, name }` objects for the data sources associated with the conversation\n\n#### Pagination\n\nUse `limit` and `offset` to page through large result sets:\n\n```\nGET /api/rest/2.0/ai/agent/conversations?limit=20&offset=0 → first page\nGET /api/rest/2.0/ai/agent/conversations?limit=20&offset=20 → second page\n```\n\n#### Pagination and `has_more`\n\nThe response includes a `has_more: Boolean` field. When `true`, there are additional conversations beyond the current page — increment `offset` by `limit` to fetch the next page. When `has_more` is `false`, the current page is the last. Note that `total_count` is not returned; use `has_more` to drive paging controls.\n\n#### Example response\n\n```json\n{\n \"conversations\": [\n {\n \"conversation_identifier\": \"abc123\",\n \"conversation_title\": \"Sales by Region Q1\",\n \"created_at\": \"2026-03-01T10:00:00Z\",\n \"updated_at\": \"2026-03-05T14:23:00Z\",\n \"data_source_identifiers\": [\"ds-001\"],\n \"data_source_names\": [{ \"id\": \"ds-001\", \"name\": \"Retail Sales\" }]\n }\n ],\n \"has_more\": false\n}\n```\n\n#### Error responses\n\n| Code | Description |\n|------|-------------|\n| 401 | Unauthorized — authentication token is missing, expired, or invalid. |\n| 403 | Forbidden — the authenticated user does not have `CAN_USE_SPOTTER` privilege. |\n\n> ###### Note:\n>\n> - Only conversations created with `enable_save_chat: true` appear in this list. Conversations created with `enable_save_chat: false` (the default) are not persisted and cannot be retrieved.\n> - Available from version 26.7.0.cl and later.\n> - This endpoint requires Spotter — please contact ThoughtSpot Support to enable Spotter on your cluster.\n\n\n\n\n#### Endpoint URL\n", "tags": [ - "Metadata" + "AI", + "26.7.0.cl" ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "metadata_identifier": { - "description": "ID or name of an Answer.", - "type": "string", - "deprecated": false - } - }, - "required": [ - "metadata_identifier" - ] - } - } + "parameters": [ + { + "in": "query", + "name": "limit", + "required": false, + "schema": { + "type": "integer", + "format": "int32" + }, + "description": "Maximum number of conversations to return. Used for pagination.", + "default": 30 }, - "required": true - }, + { + "in": "query", + "name": "offset", + "required": false, + "schema": { + "type": "integer", + "format": "int32" + }, + "description": "Number of conversations to skip before returning results. Used for pagination.", + "default": 0 + }, + { + "in": "query", + "name": "skip_empty", + "required": false, + "schema": { + "type": "boolean" + }, + "description": "When true, excludes conversations with no messages. Defaults to true.", + "default": true + } + ], "responses": { "200": { + "description": "Common successful response", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/SqlQueryResponse" + "$ref": "#/components/schemas/AgentConversationHistoryResponse" + } + } + } + }, + "201": { + "description": "Common error response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/AgentConversationHistoryResponse" + } + } + } + }, + "400": { + "description": "Operation failed", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "401": { + "description": "Unauthorized access.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "403": { + "description": "Forbidden access.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" } } } @@ -821,144 +734,47 @@ } } }, - "/api/rest/2.0/report/liveboard": { + "/api/rest/2.0/ai/data-source-suggestions": { "post": { - "operationId": "exportLiveboardReport", - "description": "Exports Liveboard and visualization data in PDF, PNG, XLS, or CSV format.\nRequires at least view access to the Liveboard.", + "operationId": "getDataSourceSuggestions", + "description": "\nBeta Version: 10.15.0.cl or later\n\nSuggests the most relevant data sources for a given natural language query, ranked by confidence with LLM-generated reasoning.\n\nRequires `CAN_USE_SPOTTER` privilege and at least view-level access to the underlying metadata entities referenced in the response.\n\n#### Usage guidelines\n\nThe request must include:\n- `query`: the natural language question to find relevant data sources for\n\nIf the request is successful, the API returns a ranked list of suggested data sources, each containing:\n- `confidence`: a float score indicating the model's confidence in the relevance of the suggestion\n- `details`: metadata about the data source\n - `data_source_identifier`: the unique ID of the data source\n - `data_source_name`: the display name of the data source\n - `description`: a description of the data source\n- `reasoning`: LLM-generated rationale explaining why the data source was recommended\n\n#### Error responses\n\n| Code | Description |\n|------|--------------------------------------------------------------------------------------------------------------------------------------------|\n| 401 | Unauthorized — authentication token is missing, expired, or invalid. |\n| 403 | Forbidden — the authenticated user does not have `CAN_USE_SPOTTER` privilege or lacks view permission on the underlying metadata entities. |\n\n> ###### Note:\n> * This endpoint is currently in Beta. Breaking changes may be introduced before it is made Generally Available.\n> * This endpoint requires Spotter — please contact ThoughtSpot Support to enable Spotter on your cluster.\n\n\n\n\n#### Endpoint URL\n", "tags": [ - "Reports" + "AI", + "10.15.0.cl" ], "requestBody": { "content": { "application/json": { "schema": { - "type": "object", - "properties": { - "metadata_identifier": { - "description": "GUID or name of the Liveboard object.", - "type": "string", - "deprecated": false - }, - "visualization_identifiers": { - "description": "GUID or name of visualizations on the Liveboard. If this parameter is \nnot defined, the API returns a report with all visualizations saved on a Liveboard.", - "type": "array", - "items": { - "type": "string" - }, - "deprecated": false - }, - "transient_content": { - "description": "Transient content of the Liveboard.", - "type": "string", - "deprecated": false - }, - "file_format": { - "description": "Export file format.", - "default": "CSV", - "type": "string", - "enum": [ - "CSV", - "PDF", - "XLSX", - "PNG" - ], - "deprecated": false - }, - "runtime_filter": { - "description": "JSON string representing runtime filter.\n{ col1:'region', op1: 'EQ', val1: 'northeast' }", - "type": "object", - "deprecated": false - }, - "runtime_sort": { - "description": "JSON string representing runtime sort.\n{ sortCol1: 'region', asc1 : true, sortCol2 : 'date' }", - "type": "object", - "deprecated": false - }, - "pdf_options": { - "description": "Options for PDF export.", - "$ref": "#/components/schemas/PdfOptionsInput", - "deprecated": false - } - }, - "required": [ - "metadata_identifier" - ] + "$ref": "#/components/schemas/GetDataSourceSuggestionsRequest" } } }, "required": true }, + "parameters": [], "responses": { - "204": { - "description": "Successful" + "200": { + "description": "Common successful response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/eureka_DataSourceSuggestionResponse" + } + } + } }, - "500": { - "description": "Operation failed", + "201": { + "description": "Common error response", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/ErrorResponse" + "$ref": "#/components/schemas/eureka_DataSourceSuggestionResponse" } } } - } - } - } - }, - "/api/rest/2.0/report/answer": { - "post": { - "operationId": "exportAnswerReport", - "description": "Export report file for Answer data.", - "tags": [ - "Reports" - ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "metadata_identifier": { - "description": "Unique ID or name of the metadata.", - "type": "string", - "deprecated": false - }, - "file_format": { - "description": "Export file format.", - "default": "CSV", - "type": "string", - "enum": [ - "CSV", - "PDF", - "XLSX", - "PNG" - ], - "deprecated": false - }, - "runtime_filter": { - "description": "JSON string representing runtime filter.\n{ col1:region, op1: EQ, val1: northeast }", - "type": "object", - "deprecated": false - }, - "runtime_sort": { - "description": "JSON string representing runtime sort.\n{ sortCol1: region, asc1 :true, sortCol2 : date }", - "type": "object", - "deprecated": false - } - }, - "required": [ - "metadata_identifier" - ] - } - } - }, - "required": true - }, - "responses": { - "204": { - "description": "Successful" }, - "500": { + "400": { "description": "Operation failed", "content": { "application/json": { @@ -967,54 +783,23 @@ } } } - } - } - } - }, - "/api/rest/2.0/security/principals/fetch-permissions": { - "post": { - "operationId": "fetchPermissionsOfPrincipals", - "description": "Fetch permission details for principal objects, such as users and groups.", - "tags": [ - "Security" - ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "principals": { - "description": "GUID or name of the principal.", - "type": "array", - "items": { - "$ref": "#/components/schemas/PrincipalsInput" - }, - "deprecated": false - }, - "metadata": { - "description": "Metadata objects for which you want to fetch permission details. \nIf not specified, the API returns permission details for all \nmetadata objects that the specified users and groups can access.", - "type": "array", - "items": { - "$ref": "#/components/schemas/PermissionsMetadataTypeInput" - }, - "deprecated": false - } - }, - "required": [ - "principals" - ] + }, + "401": { + "description": "Unauthorized access.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } } } }, - "required": true - }, - "responses": { - "200": { + "403": { + "description": "Forbidden access.", "content": { "application/json": { "schema": { - "type": "object" + "$ref": "#/components/schemas/ErrorResponse" } } } @@ -1032,61 +817,47 @@ } } }, - "/api/rest/2.0/security/metadata/fetch-permissions": { + "/api/rest/2.0/ai/instructions/get": { "post": { - "operationId": "fetchPermissionsOnMetadata", - "description": "Fetch permission details for metadata objects", + "operationId": "getNLInstructions", + "description": "\nBeta Version: 10.15.0.cl or later\n\nRetrieves existing natural language (NL) instructions configured for a specific data model. These instructions guide the AI system in understanding data context and generating more accurate responses.\n\nRequires `CAN_USE_SPOTTER` privilege, at least view access on the data model, and a bearer token corresponding to the org where the data model exists.\n\n#### Usage guidelines\n\nThe request must include:\n\n- `data_source_identifier`: the unique ID of the data model to retrieve instructions for\n\nIf the request is successful, the API returns:\n\n- `nl_instructions_info`: an array of instruction objects, each containing:\n - `instructions`: the configured text instructions for AI processing\n - `scope`: the scope of the instruction — currently only `GLOBAL` is supported\n\n#### Instructions scope\n\n- **GLOBAL**: Instructions that apply globally across the system on the given data-model (currently only global instructions are supported)\n\n#### Error responses\n\n| Code | Description |\n|------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| 401 | Unauthorized — authentication token is missing, expired, or invalid. |\n| 403 | Forbidden — the authenticated user does not have `CAN_USE_SPOTTER` privilege, lacks view access on the data model, or the bearer token does not correspond to the org where the data model exists. |\n\n> ###### Note:\n>\n> - To use this API, the user needs at least view access on the data model, and must use the bearer token corresponding to the org where the data model exists.\n> - This endpoint is currently in Beta. Breaking changes may be introduced before the endpoint is made Generally Available.\n> - Available from version 10.15.0.cl and later.\n> - This endpoint requires Spotter — please contact ThoughtSpot Support to enable Spotter on your cluster.\n> - Use this API to review currently configured instructions before modifying them with `setNLInstructions`.\n\n\n\n\n#### Endpoint URL\n", "tags": [ - "Security" + "AI", + "10.15.0.cl" ], "requestBody": { "content": { "application/json": { "schema": { - "type": "object", - "properties": { - "metadata": { - "description": "GUID or name of the metadata object.", - "type": "array", - "items": { - "$ref": "#/components/schemas/PermissionsMetadataTypeInput" - }, - "deprecated": false - }, - "principals": { - "description": "Principal objects for which you want to fetch permissions. \nIf not specified, the API returns all users and groups that \ncan access the specified metadata objects.", - "type": "array", - "items": { - "$ref": "#/components/schemas/PrincipalsInput" - }, - "deprecated": false - }, - "include_dependent_objects": { - "description": "Indicates whether to fetch permissions of depedent metadata objects.", - "default": false, - "type": "boolean", - "deprecated": false - } - }, - "required": [ - "metadata" - ] + "$ref": "#/components/schemas/GetNLInstructionsRequest" } } }, "required": true }, + "parameters": [], "responses": { "200": { + "description": "Common successful response", "content": { "application/json": { "schema": { - "type": "object" + "$ref": "#/components/schemas/eureka_GetNLInstructionsResponse" } } } }, - "500": { + "201": { + "description": "Common error response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/eureka_GetNLInstructionsResponse" + } + } + } + }, + "400": { "description": "Operation failed", "content": { "application/json": { @@ -1095,71 +866,23 @@ } } } - } - } - } - }, - "/api/rest/2.0/searchdata": { - "post": { - "operationId": "searchData", - "description": "Allows passing a search query string and retrieving data from ThoughtSpot.", - "tags": [ - "Data" - ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "query_string": { - "description": "Data search query string token.", - "type": "string", - "deprecated": false - }, - "logical_table_identifier": { - "description": "GUID of the data source object, such as a worksheet, view, or table.", - "type": "string", - "deprecated": false - }, - "data_format": { - "description": "JSON output format. By default, the API returns full data in the JSON.", - "type": "string", - "enum": [ - "COMPACT" - ], - "deprecated": false - }, - "record_offset": { - "description": "The starting record number from where the records should be included.", - "default": 0, - "type": "integer", - "format": "int32", - "deprecated": false - }, - "record_size": { - "description": "The number of records to include in a batch.", - "default": 10, - "type": "integer", - "format": "int32", - "deprecated": false - } - }, - "required": [ - "query_string", - "logical_table_identifier" - ] + }, + "401": { + "description": "Unauthorized access.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } } } }, - "required": true - }, - "responses": { - "200": { + "403": { + "description": "Forbidden access.", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/SearchDataResponse" + "$ref": "#/components/schemas/ErrorResponse" } } } @@ -1177,80 +900,47 @@ } } }, - "/api/rest/2.0/metadata/liveboard/data": { + "/api/rest/2.0/ai/relevant-questions/": { "post": { - "operationId": "fetchLiveboardData", - "description": "Fetches Liveboard data. Requires at least view access to the Liveboard. ", + "operationId": "getRelevantQuestions", + "description": "\nBeta Version: 10.13.0.cl or later\n\nBreaks down a natural language query into a series of smaller analytical sub-questions, each mapped to a relevant data source.\n\nRequires `CAN_USE_SPOTTER` privilege and at least view-level access to the referenced metadata objects.\n\n#### Usage guidelines\n\nThe request must include:\n- `query`: the natural language question to decompose into analytical sub-questions\n- `metadata_context`: at least one of the following context identifiers to guide question generation:\n - `conversation_identifier` — an existing conversation session ID\n - `answer_identifiers` — a list of Answer GUIDs\n - `liveboard_identifiers` — a list of Liveboard GUIDs\n - `data_source_identifiers` — a list of data source GUIDs\n\nOptional parameters for refining the output:\n- `ai_context`: additional context to improve response quality\n - `content` — supplementary text or CSV data as string input\n - `instructions` — custom text instructions for the AI system\n- `limit_relevant_questions`: maximum number of questions to return (default: `5`)\n- `bypass_cache`: if `true`, forces fresh computation instead of returning cached results\n\nIf the request is successful, the API returns a list of relevant analytical questions, each containing:\n- `query`: the generated sub-question\n- `data_source_identifier`: the unique ID of the data source the question targets\n- `data_source_name`: the display name of the corresponding data source\n\n#### Error responses\n\n| Code | Description |\n|------|---------------------------------------------------------------------------------------------------------------------------------------|\n| 401 | Unauthorized — authentication token is missing, expired, or invalid. |\n| 403 | Forbidden — the authenticated user does not have `CAN_USE_SPOTTER` privilege or lacks view access to the referenced metadata objects. |\n\n> ###### Note:\n> * This endpoint is currently in Beta. Breaking changes may be introduced before the endpoint is made Generally Available.\n> * This endpoint requires Spotter - please contact ThoughtSpot support to enable Spotter on your cluster.\n\n\n\n\n#### Endpoint URL\n", "tags": [ - "Data" + "AI", + "10.13.0.cl" ], "requestBody": { "content": { "application/json": { "schema": { - "type": "object", - "properties": { - "metadata_identifier": { - "description": "GUID or name of the Liveboard.", - "type": "string", - "deprecated": false - }, - "visualization_identifiers": { - "description": "GUIDs or names of the visualizations on the Liveboard.", - "type": "array", - "items": { - "type": "string" - }, - "deprecated": false - }, - "transient_content": { - "description": "Transient content of the Liveboard.", - "type": "string", - "deprecated": false - }, - "data_format": { - "description": "JSON output format. By default, the API returns full data in the JSON.", - "default": "COMPACT", - "type": "string", - "enum": [ - "COMPACT" - ], - "deprecated": false - }, - "record_offset": { - "description": "The starting record number from where the records should be included.", - "default": 0, - "type": "integer", - "format": "int32", - "deprecated": false - }, - "record_size": { - "description": "The number of records to include in a batch.", - "default": 10, - "type": "integer", - "format": "int32", - "deprecated": false - } - }, - "required": [ - "metadata_identifier" - ] + "$ref": "#/components/schemas/GetRelevantQuestionsRequest" } } }, "required": true }, + "parameters": [], "responses": { "200": { + "description": "Common successful response", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/LiveboardDataResponse" + "$ref": "#/components/schemas/eureka_GetRelevantQuestionsResponse" } } } }, - "500": { + "201": { + "description": "Common error response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/eureka_GetRelevantQuestionsResponse" + } + } + } + }, + "400": { "description": "Operation failed", "content": { "application/json": { @@ -1259,66 +949,23 @@ } } } - } - } - } - }, - "/api/rest/2.0/metadata/answer/data": { - "post": { - "operationId": "fetchAnswerData", - "description": "Fetches data from a saved Answer. Requires at least view access to the Answer object. ", - "tags": [ - "Data" - ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "metadata_identifier": { - "description": "GUID or name of the Answer.", - "type": "string", - "deprecated": false - }, - "data_format": { - "description": "JSON output format. By default, the API returns full data in the JSON.", - "default": "COMPACT", - "type": "string", - "enum": [ - "COMPACT" - ], - "deprecated": false - }, - "record_offset": { - "description": "The starting record number from where the records should be included.", - "default": 0, - "type": "integer", - "format": "int32", - "deprecated": false - }, - "record_size": { - "description": "The number of records to include in a batch.", - "default": 10, - "type": "integer", - "format": "int32", - "deprecated": false - } - }, - "required": [ - "metadata_identifier" - ] + }, + "401": { + "description": "Unauthorized access.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } } } }, - "required": true - }, - "responses": { - "200": { + "403": { + "description": "Forbidden access.", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/AnswerDataResponse" + "$ref": "#/components/schemas/ErrorResponse" } } } @@ -1336,62 +983,56 @@ } } }, - "/api/rest/2.0/logs/fetch": { - "post": { - "operationId": "fetchLogs", - "description": "Fetches security audit logs. Requires administrator privileges.", + "/api/rest/2.0/ai/agent/conversations/{conversation_identifier}/answers/{answer_identifier}/details": { + "get": { + "operationId": "loadAnswer", + "description": "\nLoads the full answer payload for a specific answer item in an agent\nconversation. Returns structured answer data including the TML query, token\nbreakdown, visualization metadata, and agent context state.\nPass the `answer_id` from an `AnswerResponseItem` in the `getConversation`\nresponse as the `answer_identifier` parameter.\nRequires `CAN_USE_SPOTTER` privilege and access to the specified conversation.
Version: 26.7.0.cl or later\n\nLoads the answer details for a specific answer item in an agent conversation. Returns structured answer data including the TML token list, visualization metadata, and agent context state. Use this endpoint to retrieve the full answer representation for an answer item — for example, to re-render a chart, export a query, or inspect the generated TML.\n\nRequires `CAN_USE_SPOTTER` privilege and access to the specified conversation.\n\n#### Usage guidelines\n\nThe request must include:\n\n- `conversation_identifier` *(path parameter)*: the unique ID of the conversation, as returned by `createAgentConversation`\n- `answer_identifier` *(path parameter)*: the `answer_id` field from an `AnswerResponseItem` in the `getConversation` response\n\nIf the request is successful, the response contains an `answer` object with the following fields:\n\n| Field | Type | Description |\n|-------|------|-------------|\n| `title` | `String` | Display title of the generated answer (e.g., `\"sales by month\"`). |\n| `description` | `String` | Optional description of the answer. |\n| `session_identifier` | `String` | Unique identifier of the session in which this answer was generated. |\n| `generation_number` | `Int` | Generation sequence number of this answer within the session. |\n| `tokens` | `[String]` | Ordered list of TML token strings that make up the answer query (e.g., `[\"[sales]\", \"[date].'monthly'\"]`). |\n| `visualization_type` | `VizType` | Suggested visualization type: `Chart`, `Table`, or `Undefined`. `null` if no suggestion is available. |\n| `formulas` | `[String]` | List of formula names referenced in the answer. Empty if none are used. |\n| `parameters` | `[String]` | List of parameter names applied to the answer. Empty if none are used. |\n| `sub_queries` | `[JSON]` | List of sub-query objects used in the answer. Empty if none are present. |\n| `ac_state` | `ACState` | Agent context state, including `transaction_identifier` and `generation_number`, used to correlate this answer with a specific agent turn. |\n\n#### ACState fields\n\n| Field | Type | Description |\n|-------|------|-------------|\n| `transaction_identifier` | `String` | Unique identifier of the agent transaction that produced this answer. |\n| `generation_number` | `Int` | Generation number within the transaction. |\n\n#### Example request\n\n```bash\nGET /api/rest/2.0/ai/agent/conversations/{conversation_identifier}/answers/{answer_identifier}/details\n```\n\n#### Example response\n\n```json\n{\n \"answer\": {\n \"title\": \"sales by month\",\n \"description\": \"\",\n \"session_identifier\": \"7b00b801-73f4-4639-af5e-e775584ceba6\",\n \"generation_number\": 1,\n \"tokens\": [\"[sales]\", \"[date].'monthly'\"],\n \"visualization_type\": null,\n \"formulas\": [],\n \"parameters\": [],\n \"sub_queries\": [],\n \"ac_state\": {\n \"transaction_identifier\": \"7f6c9948-b4c7-4098-bb1f-6c67bc0e5699\",\n \"generation_number\": 1\n }\n }\n}\n```\n\n#### Typical usage scenario\n\n1. Call `getConversation` to retrieve the full conversation history.\n2. Locate an `AnswerResponseItem` in `response_items` — note its `answer_id` field.\n3. Call `loadAnswer` with the `conversation_identifier` and `answer_id` as `answer_identifier`.\n4. The returned `tokens` array can be used to open the answer in the ThoughtSpot search interface or rendered as pill chips in the UI.\n\n#### Error responses\n\n| Code | Description |\n|------|-------------|\n| 401 | Unauthorized — authentication token is missing, expired, or invalid. |\n| 403 | Forbidden — the authenticated user does not have `CAN_USE_SPOTTER` privilege or lacks access to the specified conversation. |\n| 404 | Not Found — no conversation or message exists with the given identifiers for the authenticated user. |\n| 422 | Unprocessable Entity — the message does not contain an answer of the expected type. |\n\n> ###### Note:\n>\n> - This endpoint only loads answer-type messages. Other message types are not supported.\n> - `visualization_type` may be `null` if the agent did not produce a visualization suggestion for this answer.\n> - `formulas`, `parameters`, and `sub_queries` are returned as empty arrays when not applicable — they are never `null`.\n> - Available from version 26.7.0.cl and later.\n> - This endpoint requires Spotter — please contact ThoughtSpot Support to enable Spotter on your cluster.\n\n\n\n\n#### Endpoint URL\n", "tags": [ - "Log" + "AI", + "26.7.0.cl" ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "log_type": { - "description": "Name of the log type.", - "type": "string", - "enum": [ - "SECURITY_AUDIT" - ], - "deprecated": false - }, - "start_epoch_time_in_millis": { - "description": "Start time in EPOCH format", - "type": "number", - "format": "float", - "deprecated": false - }, - "end_epoch_time_in_millis": { - "description": "End time in EPOCH format", - "type": "number", - "format": "float", - "deprecated": false - } - }, - "required": [ - "log_type" - ] - } - } + "parameters": [ + { + "in": "path", + "name": "conversation_identifier", + "required": true, + "schema": { + "type": "string" + }, + "description": "Unique identifier of the conversation." }, - "required": true - }, + { + "in": "path", + "name": "answer_identifier", + "required": true, + "schema": { + "type": "string" + }, + "description": "Unique identifier of the answer to load. Use the `answer_id` field from an\n`AnswerResponseItem` returned by `getConversation`." + } + ], "responses": { "200": { + "description": "Common successful response", "content": { "application/json": { "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/LogResponse" - } + "$ref": "#/components/schemas/LoadAnswerResponse" } } } }, - "500": { + "201": { + "description": "Common error response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/LoadAnswerResponse" + } + } + } + }, + "400": { "description": "Operation failed", "content": { "application/json": { @@ -1400,33 +1041,19 @@ } } } - } - } - } - }, - "/api/rest/2.0/vcs/config/search": { - "post": { - "operationId": "searchLocalConfig", - "description": "Search local repository configuration", - "tags": [ - "Version Control" - ], - "parameters": [], - "responses": { - "200": { + }, + "401": { + "description": "Unauthorized access.", "content": { "application/json": { "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/RepoConfigObject" - } + "$ref": "#/components/schemas/ErrorResponse" } } } }, - "500": { - "description": "Operation failed", + "403": { + "description": "Forbidden access.", "content": { "application/json": { "schema": { @@ -1434,85 +1061,62 @@ } } } - } - } + }, + "500": { + "description": "Operation failed", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + } + } } }, - "/api/rest/2.0/vcs/commits/search": { + "/api/rest/2.0/ai/analytical-questions": { "post": { - "operationId": "searchCommits", - "description": "List the commit history of a metadata object", + "operationId": "queryGetDecomposedQuery", + "description": "\nBeta Version: 10.7.0.cl or later\n\nVersion: 10.7.0.cl or later\n\n**Deprecated** — Use `getRelevantQuestions` instead (available from 10.13.0.cl).\n\nBreaks down a topical or goal-oriented natural language question into smaller, actionable analytical sub-questions, each mapped to a relevant data source for independent execution.\n\nRequires `CAN_USE_SPOTTER` privilege and at least view-level access to the referenced metadata objects.\n\n#### Usage guidelines\n\nThe request accepts the following parameters:\n\n- `nlsRequest`: contains the user `query` to decompose, along with optional `instructions` and `bypassCache` flag\n- `worksheetIds`: list of data source identifiers to scope the decomposition\n- `answerIds`: list of Answer GUIDs whose data guides the response\n- `liveboardIds`: list of Liveboard GUIDs whose data guides the response\n- `conversationId`: an existing conversation session ID for context continuity\n- `content`: supplementary text or CSV data to improve response quality\n- `maxDecomposedQueries`: maximum number of sub-questions to return (default: `5`)\n\nIf the request is successful, the API returns a `decomposedQueryResponse` containing a list of `decomposedQueries`, each with:\n- `query`: the generated analytical sub-question\n- `worksheetId`: the unique ID of the data source the question targets\n- `worksheetName`: the display name of the corresponding data source\n\n#### Error responses\n\n| Code | Description |\n|------|---------------------------------------------------------------------------------------------------------------------------------------|\n| 401 | Unauthorized — authentication token is missing, expired, or invalid. |\n| 403 | Forbidden — the authenticated user does not have `CAN_USE_SPOTTER` privilege or lacks view access to the referenced metadata objects. |\n\n> ###### Note:\n> * This endpoint is deprecated since 10.13.0.cl. Use `getRelevantQuestions` for new integrations.\n> * This endpoint is currently in Beta. Breaking changes may be introduced before the endpoint is made Generally Available.\n> * This endpoint requires Spotter — please contact ThoughtSpot support to enable Spotter on your cluster.\n\n\n\n\n#### Endpoint URL\n", + "deprecated": true, "tags": [ - "Version Control" + "AI", + "10.7.0.cl" ], "requestBody": { "content": { "application/json": { "schema": { - "type": "object", - "properties": { - "metadata_identifier": { - "description": "Unique ID or name of the metadata.", - "type": "string", - "deprecated": false - }, - "metadata_type": { - "description": "Type of metadata.", - "type": "string", - "enum": [ - "LIVEBOARD", - "ANSWER", - "LOGICAL_TABLE", - "LOGICAL_COLUMN", - "CONNECTION", - "TAG", - "USER", - "USER_GROUP", - "LOGICAL_RELATIONSHIP" - ], - "deprecated": false - }, - "branch_name": { - "description": "Name of the branch from which commit history needs to be displayed", - "type": "string", - "deprecated": false - }, - "record_offset": { - "description": "Record offset point in the commit history to display the response", - "type": "integer", - "format": "int32", - "deprecated": false - }, - "record_size": { - "description": "Number of history records from record offset point to be displayed in the response", - "type": "integer", - "format": "int32", - "deprecated": false - } - }, - "required": [ - "metadata_identifier", - "metadata_type" - ] + "$ref": "#/components/schemas/QueryGetDecomposedQueryRequest" } } }, "required": true }, + "parameters": [], "responses": { "200": { + "description": "Common successful response", "content": { "application/json": { "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/CommitHistoryResponse" - } + "$ref": "#/components/schemas/eureka_DecomposeQueryResponse" } } } }, - "500": { + "201": { + "description": "Common error response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/eureka_DecomposeQueryResponse" + } + } + } + }, + "400": { "description": "Operation failed", "content": { "application/json": { @@ -1521,48 +1125,26 @@ } } } - } - } - } - }, - "/api/rest/2.0/auth/session/login": { - "post": { - "operationId": "login", - "description": "Using this endpoint, you can programmatically create a login session for a user in ThoughtSpot.", - "tags": [ - "Authentication" - ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "username": { - "description": "Username of the user account", - "type": "string", - "deprecated": false - }, - "password": { - "description": "The password of the user account", - "type": "string", - "deprecated": false - }, - "remember_me": { - "description": "A flag to remember the user session. When set to true, sets a session cookie that persists in subsequent API calls.", - "default": false, - "type": "boolean", - "deprecated": false - } + }, + "401": { + "description": "Unauthorized access.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" } } } }, - "required": true - }, - "responses": { - "204": { - "description": "Successful" + "403": { + "description": "Forbidden access.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } }, "500": { "description": "Operation failed", @@ -1577,85 +1159,145 @@ } } }, - "/api/rest/2.0/auth/token/object": { + "/api/rest/2.0/ai/agent/conversation/{conversation_identifier}/send": { "post": { - "operationId": "getObjectAccessToken", - "description": " To programmatically create object session token for a user in ThoughtSpot, use this endpoint. \n\nYou can generate the token for a user by providing password or secret key from the cluster. \n\nYou need to enable trusted authentication to generate secret key. To generate secret key, follow below steps. \n\n\n 1. Click the Develop tab. \n\n\n 2. Under Customizations, click Settings. \n\n\n 3. To enable trusted authentication, turn on the toggle. \n\n\n 4. A secret_key for trusted authentication is generated. \n\n\n 5. Click the clipboard icon to copy the token. \n\n\n \n\nPassword is given precedence over secretKey input, when both are included in the request.", + "operationId": "sendAgentConversationMessage", + "description": "\n Version: 26.5.0.cl or later\n\nVersion: 26.5.0.cl or later\n\nSends natural language messages to an existing Spotter agent conversation and returns the complete response synchronously.\n\nRequires `CAN_USE_SPOTTER` privilege and access to the metadata object associated with the conversation. The user must have access to the conversation session referenced by `conversation_identifier`. A conversation must first be created using the `createAgentConversation` API.\n\n#### Usage guidelines\n\nThe request must include:\n\n- `conversation_identifier`: the unique session ID returned by `createAgentConversation`, used for context continuity and message tracking\n- `messages`: an array of one or more text messages to send to the agent\n\nThe API returns an array of response objects, each containing:\n\n- `type`: the kind of response — `text`, `answer`, or `error`\n- `message`: the main content of the response\n- `metadata`: additional information depending on the message type (e.g., answer metadata includes analytics and visualization details)\n\n#### Error responses\n\n| Code | Description |\n|------|----------------------------------------------------------------------------------------------------------------------------------|\n| 401 | Unauthorized — authentication token is missing, expired, or invalid. |\n| 403 | Forbidden — the authenticated user does not have `CAN_USE_SPOTTER` privilege or lacks permission on the referenced conversation. |\n\n> ###### Note:\n>\n> - This endpoint is Generally Available from version 26.5.0.cl.\n> - This endpoint requires Spotter - please contact ThoughtSpot support to enable Spotter on your cluster.\n> - For real-time streamed responses, use `sendAgentConversationMessageStreaming` instead.\n\n\n\n\n#### Endpoint URL\n", "tags": [ - "Authentication" + "AI", + "26.5.0.cl" ], "requestBody": { "content": { "application/json": { "schema": { - "type": "object", - "properties": { - "username": { - "description": "Username of the user account", - "type": "string", - "deprecated": false - }, - "object_id": { - "description": "GUID of the ThoughtSpot object. If set, the bearer will only have access to the specified Liveboard or another object.", - "type": "string", - "deprecated": false - }, - "password": { - "description": "The password of the user account", - "default": "", - "type": "string", - "deprecated": false - }, - "secret_key": { - "description": "The secret key string provided by the ThoughtSpot application server. ThoughtSpot generates this secret key when you enable trusted authentication.", - "default": "", - "type": "string", - "deprecated": false - }, - "validity_time_in_sec": { - "description": "Duration in seconds after which the token expires", - "default": 300, - "type": "integer", - "format": "int32", - "deprecated": false - }, - "org_id": { - "description": "Id of the Org to be associated with the user login. If no input is provided then last logged in Org will be considered", - "default": 0, - "type": "integer", - "format": "int32", - "deprecated": false - }, - "auto_create": { - "description": "“Creates a new user if the specified username does not already exist in ThoughtSpot. Use this parameter to provision a user just-in-time (JIT).", - "default": false, - "type": "boolean", - "deprecated": false - }, - "group_identifiers": { - "description": "Unique ID or name of the User Groups to which newly created user to be added.", - "type": "array", - "items": { - "type": "string" - }, - "deprecated": false - } - }, - "required": [ - "username", - "object_id" - ] + "$ref": "#/components/schemas/SendAgentConversationMessageRequest" } } }, "required": true }, + "parameters": [ + { + "in": "path", + "name": "conversation_identifier", + "required": true, + "schema": { + "type": "string" + }, + "description": "Unique identifier for the conversation (used to track context)" + } + ], "responses": { "200": { + "description": "Common successful response", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/Token" + "type": "object" + }, + "examples": { + "example_1": { + "summary": "Send a message to an existing agent conversation", + "value": { + "messages": [ + { + "metadata": {}, + "internal": {}, + "type": "text", + "text": "\n\nI'll compare sales between 2025 and 2024. First, let me get the dataset context to identify the relevant sales and date columns.", + "agent_context": "" + }, + { + "metadata": {}, + "internal": {}, + "type": "text", + "text": "```json\n{\"search_mode\": \"semantic\", \"dataset_name\": \"(Sample) Retail - Apparel\", \"columns\": [{\"name\": \"sales\", \"type\": \"MEASURE\", \"data_type\": \"double\"}, {\"name\": \"date\", \"type\": \"ATTRIBUTE\", \"data_type\": \"date\", \"sample_values\": [\"2025\", \"2024\"]}]}\n```", + "agent_context": "" + }, + { + "metadata": {}, + "internal": {}, + "type": "text", + "text": "\n\nPerfect! I found the sales and date columns. I can see the dataset contains sales data for both 2025 and 2024. Now I'll create a comparison query to show sales for 2025 versus 2024.", + "agent_context": "" + }, + { + "metadata": { + "output": "", + "worksheet_id": "cd252e5c-b552-49a8-821d-3eadaa049cca", + "assumptions": "", + "chart_type": "KPI", + "interrupted": false, + "data_awareness_enabled": true + }, + "internal": {}, + "type": "answer", + "title": "Compare total sales for 2025 vs 2024", + "description": "", + "session_id": "842bb67a-e08e-4861-97e8-8db9538db51d", + "gen_no": 2, + "sage_query": "[sales] [date] = '2025' vs [date] = '2024'", + "tml_tokens": [ + "[sales]", + "[date] = '2025' vs [date] = '2024'" + ], + "formulas": [], + "parameters": [], + "subqueries": [], + "viz_suggestion": "CAEQIBomEiQ2NjE5NzI0Yy1kMjVlLTU4MDItOWNjOC1jNDA3MWY3OWY5MzAoATIA", + "ac_state": null + }, + { + "metadata": {}, + "internal": {}, + "type": "text", + "text": "\n\nThe visualization shows the side-by-side comparison of total sales (in USD) between the two years, allowing you to see the year-over-year performance. You can see the sales figures for both 2024 and 2025, making it easy to identify growth or decline trends in your retail apparel business.", + "agent_context": "" + } + ] + } + } + } + } + } + }, + "201": { + "description": "Common error response", + "content": { + "application/json": { + "schema": { + "type": "object" + } + } + } + }, + "400": { + "description": "Operation failed", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "401": { + "description": "Unauthorized access.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "403": { + "description": "Forbidden access.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" } } } @@ -1673,84 +1315,103 @@ } } }, - "/api/rest/2.0/auth/token/full": { + "/api/rest/2.0/ai/agent/conversation/{conversation_identifier}/send/stream": { "post": { - "operationId": "getFullAccessToken", - "description": " To programmatically create full session token for a user in ThoughtSpot, use this endpoint. \n\nYou can generate the token for a user by providing password or secret key from the cluster. \n\nYou need to enable trusted authentication to generate secret key. To generate secret key, follow below steps. \n\n\n 1. Click the Develop tab. \n\n\n 2. Under Customizations, click Settings. \n\n\n 3. To enable trusted authentication, turn on the toggle. \n\n\n 4. A secret_key for trusted authentication is generated. \n\n\n 5. Click the clipboard icon to copy the token. \n\n\n \n\nPassword is given precedence over secretKey input, when both are included in the request.", + "operationId": "sendAgentConversationMessageStreaming", + "description": "\n Version: 26.5.0.cl or later\n\nVersion: 26.5.0.cl or later\n\nSends one or more natural language messages to an existing Spotter agent conversation and returns the response as a real-time Server-Sent Events stream.\n\nRequires `CAN_USE_SPOTTER` privilege and access to the metadata object associated with the conversation. The user must have access to the conversation session referenced by `conversation_identifier`. A conversation must first be created using the `createAgentConversation` API.\n\n#### Usage guidelines\n\nThe request must include:\n\n- `conversation_identifier`: the unique session ID returned by `createAgentConversation`, used for context continuity and message tracking\n- `messages`: an array of one or more text messages to send to the agent\n\nIf the request is valid, the API returns a Server-Sent Events (SSE) stream. Each line has the form `data: [{\"type\": \"...\", ...}]` — a JSON array of event objects. Event types include:\n\n- `ack`: confirms receipt of the request (`node_id`)\n- `conv_title`: conversation title (`title`, `conv_id`)\n- `notification`: status updates on operations (`group_id`, `metadata`, `code` — e.g. `TOOL_CALL_NOTIFICATION`, `nls_start`, `FINAL_RESPONSE_NOTIFICATION`)\n- `text-chunk`: incremental content chunks (`id`, `group_id`, `metadata` with `format` and `type` such as `thinking` or `text`, `content`)\n- `text`: full text block with same structure as `text-chunk`\n- `answer`: structured answer with metadata (`id`, `group_id`, `metadata` with `sage_query`, `session_id`, `title`, etc., `title`)\n- `error`: if a failure occurs\n\n#### Error responses\n\n| Code | Description |\n| ---- | -------------------------------------------------------------------------------------------------------------------------------- |\n| 401 | Unauthorized — authentication token is missing, expired, or invalid. |\n| 403 | Forbidden — the authenticated user does not have `CAN_USE_SPOTTER` privilege or lacks permission on the referenced conversation. |\n\n> ###### Note:\n>\n> - This endpoint is Generally Available from version 26.5.0.cl.\n> - This endpoint requires Spotter - please contact ThoughtSpot support to enable Spotter on your cluster.\n> - The streaming protocol uses Server-Sent Events (SSE).\n> - For the complete response in a single payload, use `sendAgentConversationMessage` instead.\n\n\n\n\n#### Endpoint URL\n", "tags": [ - "Authentication" + "AI", + "26.5.0.cl" ], "requestBody": { "content": { "application/json": { "schema": { - "type": "object", - "properties": { - "username": { - "description": "Username of the user account", - "type": "string", - "deprecated": false - }, - "password": { - "description": "The password of the user account", - "default": "", - "type": "string", - "deprecated": false - }, - "secret_key": { - "description": "The secret key string provided by the ThoughtSpot application server. ThoughtSpot generates this secret key when you enable trusted authentication.", - "default": "", - "type": "string", - "deprecated": false - }, - "validity_time_in_sec": { - "description": "Duration in seconds after which the token expires", - "default": 300, - "type": "integer", - "format": "int32", - "deprecated": false - }, - "org_id": { - "description": "Id of the Org to be associated with the user login. If no input is provided then last logged in Org will be considered", - "default": 0, - "type": "integer", - "format": "int32", - "deprecated": false - }, - "auto_create": { - "description": "Creates a new user if the specified username does not already exist in ThoughtSpot. Use this parameter to provision a user just-in-time (JIT).", - "default": false, - "type": "boolean", - "deprecated": false - }, - "group_identifiers": { - "description": "ID or name of the groups to which the newly created user belongs.", - "type": "array", - "items": { - "type": "string" - }, - "deprecated": false - } - }, - "required": [ - "username" - ] + "$ref": "#/components/schemas/SendAgentConversationMessageStreamingRequest" } } }, "required": true }, + "parameters": [ + { + "in": "path", + "name": "conversation_identifier", + "required": true, + "schema": { + "type": "string" + }, + "description": "Unique identifier for the conversation (used to track context)" + } + ], "responses": { "200": { + "description": "Common successful response", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/Token" + "$ref": "#/components/schemas/SendAgentMessageResponse" + }, + "examples": { + "example_1": { + "summary": "SSE stream — each line is data: [{\"type\": \"...\", ...}]. Events arrive over time; this example shows a minimal sequence.", + "value": [ + { + "type": "ack", + "node_id": "aGxzcFVrtom8" + }, + { + "type": "conv_title", + "title": "Sales 2025 vs 2024", + "conv_id": "-XIi04l5rrof" + }, + { + "type": "notification", + "group_id": "cDEsAQbSnd3J", + "metadata": { + "type": "thinking", + "tool_title": "Analyzing Sales Performance: 2025 vs 2024" + }, + "code": "TOOL_CALL_NOTIFICATION" + }, + { + "id": "mNAdvy-NK2l6", + "type": "text-chunk", + "group_id": "cDEsAQbSnd3J", + "metadata": { + "format": "markdown", + "type": "thinking" + }, + "content": "\n\nI need to compare sales performance between 2025 and 2024." + }, + { + "id": "hxWMDP-pgR3B", + "type": "answer", + "group_id": "m1MTvttEUa7o", + "metadata": { + "sage_query": "[sales] [date] = '2025' vs [date] = '2024'", + "session_id": "431adcf9-1328-4d8c-81a1-0faa7fa37ba6", + "title": "Compare sales for 2025 vs 2024" + }, + "title": "Compare sales for 2025 vs 2024" + } + ] + } } } } }, - "500": { + "201": { + "description": "Common error response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SendAgentMessageResponse" + } + } + } + }, + "400": { "description": "Operation failed", "content": { "application/json": { @@ -1759,21 +1420,26 @@ } } } - } - } - } - }, - "/api/rest/2.0/auth/session/logout": { - "post": { - "operationId": "logout", - "description": "To log a user out of the current session, use this endpoint", - "tags": [ - "Authentication" - ], - "parameters": [], - "responses": { - "204": { - "description": "Successful" + }, + "401": { + "description": "Unauthorized access.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "403": { + "description": "Forbidden access.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } }, "500": { "description": "Operation failed", @@ -1788,38 +1454,58 @@ } } }, - "/api/rest/2.0/auth/token/revoke": { + "/api/rest/2.0/ai/agent/{conversation_identifier}/converse": { "post": { - "operationId": "revokeToken", - "description": "To expire or revoke a token for a user, use this endpoint", + "operationId": "sendAgentMessage", + "description": "\nBeta Version: 26.2.0.cl or later\n\n**Deprecated** — Use `sendAgentConversationMessage` instead.\n\nSend natural language messages to an existing Spotter agent conversation and returns the complete response synchronously.\n\nRequires `CAN_USE_SPOTTER` privilege and access to the metadata object associated with the conversation. The user must have access to the conversation session referenced by `conversation_identifier`.\nA conversation must first be created using the `createAgentConversation` API.\n\n#### Usage guidelines\n\nThe request must include:\n\n- `conversation_identifier`: the unique session ID returned by `createAgentConversation`, used for context continuity and message tracking\n- `messages`: an array of one or more text messages to send to the agent\n\nThe API returns an array of response objects, each containing:\n\n- `type`: the kind of response — `text`, `answer`, or `error`\n- `message`: the main content of the response\n- `metadata`: additional information depending on the message type (e.g., answer metadata includes analytics and visualization details)\n\n#### Error responses\n\n| Code | Description |\n|------|----------------------------------------------------------------------------------------------------------------------------------|\n| 401 | Unauthorized — authentication token is missing, expired, or invalid. |\n| 403 | Forbidden — the authenticated user does not have `CAN_USE_SPOTTER` privilege or lacks permission on the referenced conversation. |\n\n> ###### Note:\n>\n> - This endpoint is deprecated. Use `sendAgentConversationMessage` for new integrations.\n> - This endpoint is currently in Beta. Breaking changes may be introduced before the endpoint is made Generally Available.\n> - This endpoint requires Spotter - please contact ThoughtSpot support to enable Spotter on your cluster.\n\n\n\n\n#### Endpoint URL\n", + "deprecated": true, "tags": [ - "Authentication" + "AI", + "26.2.0.cl" ], "requestBody": { "content": { "application/json": { "schema": { - "type": "object", - "properties": { - "user_identifier": { - "type": "string", - "deprecated": false - }, - "token": { - "type": "string", - "deprecated": false - } - } + "$ref": "#/components/schemas/SendAgentMessageRequest" } } }, "required": true }, + "parameters": [ + { + "in": "path", + "name": "conversation_identifier", + "required": true, + "schema": { + "type": "string" + }, + "description": "Unique identifier for the conversation (used to track context)" + } + ], "responses": { - "204": { - "description": "Successful" + "200": { + "description": "Common successful response", + "content": { + "application/json": { + "schema": { + "type": "object" + } + } + } }, - "500": { + "201": { + "description": "Common error response", + "content": { + "application/json": { + "schema": { + "type": "object" + } + } + } + }, + "400": { "description": "Operation failed", "content": { "application/json": { @@ -1828,144 +1514,23 @@ } } } - } - } - } - }, - "/api/rest/2.0/users/create": { - "post": { - "operationId": "createUser", - "description": "Allows creating a user in ThoughtSpot. The API endpoint also allows you to assign the user to specific groups,\nOrgs, and add favorite Liveboards and Answers. To create a user, you require administration privileges.", - "tags": [ - "Users" - ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "name": { - "description": "Name of the user. The username string must be unique.", - "type": "string", - "deprecated": false - }, - "display_name": { - "description": "A unique display name string for the user account, usually their first and last name", - "type": "string", - "deprecated": false - }, - "password": { - "description": "Password for the user account.", - "type": "string", - "deprecated": false - }, - "email": { - "description": "Email of the user account", - "type": "string", - "deprecated": false - }, - "account_type": { - "description": "Type of the account.", - "default": "LOCAL_USER", - "type": "string", - "enum": [ - "LOCAL_USER", - "LDAP_USER", - "SAML_USER", - "OIDC_USER", - "REMOTE_USER" - ], - "deprecated": false - }, - "account_status": { - "description": "Current status of the user account.", - "default": "ACTIVE", - "type": "string", - "enum": [ - "ACTIVE", - "INACTIVE", - "EXPIRED", - "LOCKED", - "PENDING" - ], - "deprecated": false - }, - "org_identifiers": { - "description": "List of Org IDs to which the user belongs.", - "type": "array", - "items": { - "type": "string" - }, - "deprecated": false - }, - "group_identifiers": { - "description": "GUIDs or names of the groups to which the newly created user belongs.", - "type": "array", - "items": { - "type": "string" - }, - "deprecated": false - }, - "visibility": { - "description": "Visibility of the users. When set to SHARABLE, the user is visible to other users and groups when they try to share an object.", - "default": "SHARABLE", - "type": "string", - "enum": [ - "SHARABLE", - "NON_SHARABLE" - ], - "deprecated": false - }, - "notify_on_share": { - "description": "User preference for receiving email notifications when another ThoughtSpot\nuser shares a metadata object such as Answer, Liveboard, or Worksheet.", - "default": true, - "type": "boolean", - "deprecated": false - }, - "show_onboarding_experience": { - "description": "The user preference for revisiting the onboarding experience.", - "default": true, - "type": "boolean", - "deprecated": false - }, - "onboarding_experience_completed": { - "description": "flag to get the on-boarding experience is completed or not.", - "default": false, - "type": "boolean", - "deprecated": false - }, - "home_liveboard_identifier": { - "description": "GUID of the Liveboard to set a default Liveboard for the user. \nThoughtSpot displays this Liveboard on the Home page when the user logs in.", - "type": "string", - "deprecated": false - }, - "favorite_metadata": { - "description": "Metadata objects to add to the user's favorites list.", - "type": "array", - "items": { - "$ref": "#/components/schemas/FavoriteMetadataInput" - }, - "deprecated": false - } - }, - "required": [ - "name", - "display_name", - "password", - "email" - ] + }, + "401": { + "description": "Unauthorized access.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } } } }, - "required": true - }, - "responses": { - "200": { + "403": { + "description": "Forbidden access.", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/User" + "$ref": "#/components/schemas/ErrorResponse" } } } @@ -1983,170 +1548,48 @@ } } }, - "/api/rest/2.0/users/{user_identifier}/update": { + "/api/rest/2.0/ai/agent/converse/sse": { "post": { - "operationId": "updateUser", - "description": "Updates a given user object. Requires administrator privileges.", + "operationId": "sendAgentMessageStreaming", + "description": "\nBeta Version: 26.2.0.cl or later\n\n**Deprecated** — Use `sendAgentConversationMessageStreaming` instead.\n\nSends one or more natural language messages to an existing Spotter agent conversation and returns the response as a real-time Server-Sent Events stream.\n\nRequires `CAN_USE_SPOTTER` privilege and access to the metadata object associated with the conversation. The user must have access to the conversation session referenced by `conversation_identifier`. A conversation must first be created using the `createAgentConversation` API.\n\n#### Usage guidelines\n\nThe request must include:\n\n- `conversation_identifier`: the unique session ID returned by `createAgentConversation`, used for context continuity and message tracking\n- `messages`: an array of one or more text messages to send to the agent\n\nIf the request is valid, the API returns a Server-Sent Events (SSE) stream. Each line has the form `data: [{\"type\": \"...\", ...}]` — a JSON array of event objects. Event types include:\n\n- `ack`: confirms receipt of the request (`node_id`)\n- `conv_title`: conversation title (`title`, `conv_id`)\n- `notification`: status updates on operations (`group_id`, `metadata`, `code` — e.g. `TOOL_CALL_NOTIFICATION`, `nls_start`, `FINAL_RESPONSE_NOTIFICATION`)\n- `text-chunk`: incremental content chunks (`id`, `group_id`, `metadata` with `format` and `type` such as `thinking` or `text`, `content`)\n- `text`: full text block with same structure as `text-chunk`\n- `answer`: structured answer with metadata (`id`, `group_id`, `metadata` with `sage_query`, `session_id`, `title`, etc., `title`)\n- `error`: if a failure occurs\n\n#### Error responses\n\n| Code | Description |\n|------|----------------------------------------------------------------------------------------------------------------------------------|\n| 401 | Unauthorized — authentication token is missing, expired, or invalid. |\n| 403 | Forbidden — the authenticated user does not have `CAN_USE_SPOTTER` privilege or lacks permission on the referenced conversation. |\n\n> ###### Note:\n>\n> - This endpoint is deprecated. Use `sendAgentConversationMessageStreaming` for new integrations.\n> - This endpoint is currently in Beta. Breaking changes may be introduced before the endpoint is made Generally Available.\n> - This endpoint requires Spotter - please contact ThoughtSpot support to enable Spotter on your cluster.\n> - The streaming protocol uses Server-Sent Events (SSE).\n\n\n\n\n#### Endpoint URL\n", + "deprecated": true, "tags": [ - "Users" + "AI", + "26.2.0.cl" ], "requestBody": { "content": { "application/json": { "schema": { - "type": "object", - "properties": { - "name": { - "description": "Name of the user. The username string must be unique.", - "type": "string", - "deprecated": false - }, - "display_name": { - "description": "A unique display name string for the user account, usually their first and last name", - "type": "string", - "deprecated": false - }, - "visibility": { - "description": "Visibility of the users. When set to SHARABLE, the user is visible to other users and groups when they try to share an object.", - "type": "string", - "enum": [ - "SHARABLE", - "NON_SHARABLE" - ], - "deprecated": false - }, - "email": { - "description": "Email of the user account", - "type": "string", - "deprecated": false - }, - "account_status": { - "description": "Current status of the user account.", - "type": "string", - "enum": [ - "ACTIVE", - "INACTIVE", - "EXPIRED", - "LOCKED", - "PENDING" - ], - "deprecated": false - }, - "notify_on_share": { - "description": "User preference for receiving email notifications when another ThoughtSpot user \nshares a metadata object such as Answer, Liveboard, or Worksheet. ", - "type": "boolean", - "deprecated": false - }, - "show_onboarding_experience": { - "description": "The user preference for revisiting the onboarding experience.", - "type": "boolean", - "deprecated": false - }, - "onboarding_experience_completed": { - "description": "Indicates if the user has completed the onboarding and allows turning off the onboarding walkthrough.", - "type": "boolean", - "deprecated": false - }, - "account_type": { - "description": "Type of the account.", - "type": "string", - "enum": [ - "LOCAL_USER", - "LDAP_USER", - "SAML_USER", - "OIDC_USER", - "REMOTE_USER" - ], - "deprecated": false - }, - "group_identifiers": { - "description": "GUIDs or names of the groups.", - "type": "array", - "items": { - "type": "string" - }, - "deprecated": false - }, - "home_liveboard_identifier": { - "description": "GUID of the Liveboard to set a default Liveboard for the user. ThoughtSpot displays\nthis Liveboard on the Home page when the user logs in.", - "type": "string", - "deprecated": false - }, - "favorite_metadata": { - "description": "Metadata objects to add to the user's favorites list.", - "type": "array", - "items": { - "$ref": "#/components/schemas/FavoriteMetadataInput" - }, - "deprecated": false - }, - "org_identifiers": { - "description": "IDs of the Orgs.", - "type": "array", - "items": { - "type": "string" - }, - "deprecated": false - } - } + "$ref": "#/components/schemas/SendAgentMessageStreamingRequest" } } }, "required": true }, + "parameters": [], "responses": { - "204": { - "description": "Successful" + "200": { + "description": "Common successful response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SendAgentMessageResponse" + } + } + } }, - "500": { - "description": "Operation failed", + "201": { + "description": "Common error response", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/ErrorResponse" + "$ref": "#/components/schemas/SendAgentMessageResponse" } } } - } - }, - "parameters": [ - { - "in": "path", - "name": "user_identifier", - "required": true, - "schema": { - "type": "string" - }, - "description": "GUID / name of the user", - "deprecated": false - } - ] - } - }, - "/api/rest/2.0/users/{user_identifier}/delete": { - "post": { - "operationId": "deleteUser", - "description": "Deletes a user. Requires administrator privileges.", - "tags": [ - "Users" - ], - "parameters": [ - { - "in": "path", - "name": "user_identifier", - "required": true, - "schema": { - "type": "string" - }, - "description": "GUID / name of the user", - "deprecated": false - } - ], - "responses": { - "204": { - "description": "Successful" }, - "500": { + "400": { "description": "Operation failed", "content": { "application/json": { @@ -2155,63 +1598,23 @@ } } } - } - } - } - }, - "/api/rest/2.0/users/import": { - "post": { - "operationId": "importUsers", - "description": "Imports user data from external databases to ThoughtSpot.", - "tags": [ - "Users" - ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "users": { - "description": "List of users needs to be imported.", - "type": "array", - "items": { - "$ref": "#/components/schemas/ImportUser" - }, - "deprecated": false - }, - "default_password": { - "description": "The default password to assign to users if they do not have a password assigned in ThoughtSpot. ", - "type": "string", - "deprecated": false - }, - "dry_run": { - "description": "If true, the API performs a test operation and returns user IDs whose data will be edited after the import.", - "default": true, - "type": "boolean", - "deprecated": false - }, - "delete_unspecified_users": { - "description": "If set to true, removes the users that are not specified in the API request.", - "default": false, - "type": "boolean", - "deprecated": false - } - }, - "required": [ - "users" - ] + }, + "401": { + "description": "Unauthorized access.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } } } }, - "required": true - }, - "responses": { - "200": { + "403": { + "description": "Forbidden access.", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/ImportUsersResponse" + "$ref": "#/components/schemas/ErrorResponse" } } } @@ -2229,50 +1632,63 @@ } } }, - "/api/rest/2.0/users/change-password": { + "/api/rest/2.0/ai/conversation/{conversation_identifier}/converse": { "post": { - "operationId": "changeUserPassword", - "description": "Allows changing the password of a ThoughtSpot user account.", + "operationId": "sendMessage", + "description": "\nBeta Version: 10.4.0.cl or later\n\nSends a follow-up message to an existing conversation within the context of a data model.\n\nRequires `CAN_USE_SPOTTER` privilege and at least view access to the metadata object specified in the request. A conversation must first be created using the `createConversation` API.\n\n#### Usage guidelines\n\nThe request must include:\n- `conversation_identifier`: the unique session ID returned by `createConversation`\n- `metadata_identifier`: the unique ID of the data source used for the conversation\n- `message`: a natural language string with the follow-up question\n\nIf the request is successful, the API returns an array of response messages, each containing:\n- `session_identifier`: the unique ID of the generated response\n- `generation_number`: the generation number of the response\n- `message_type`: the type of the response (e.g., `TSAnswer`)\n- `visualization_type`: the generated visualization type (`Chart`, `Table`, or `Undefined`)\n- `tokens` / `display_tokens`: the search tokens and user-friendly display tokens for the response\n\n#### Error responses\n\n| Code | Description |\n|------|-----------------------------------------------------------------------------------------------------------------------------------------|\n| 401 | Unauthorized — authentication token is missing, expired, or invalid. |\n| 403 | Forbidden — the authenticated user does not have `CAN_USE_SPOTTER` privilege or lacks view permission on the specified metadata object. |\n\n> ###### Note:\n> * This endpoint is currently in Beta. Breaking changes may be introduced before the endpoint is made Generally Available.\n> * This endpoint requires Spotter - please contact ThoughtSpot support to enable Spotter on your cluster.\n\n\n\n\n#### Endpoint URL\n", "tags": [ - "Users" + "AI", + "10.4.0.cl" ], "requestBody": { "content": { "application/json": { "schema": { - "type": "object", - "properties": { - "current_password": { - "description": "Current password of the user.", - "type": "string", - "deprecated": false - }, - "new_password": { - "description": "New password for the user.", - "type": "string", - "deprecated": false - }, - "user_identifier": { - "description": "GUID or name of the user.", - "type": "string", - "deprecated": false - } - }, - "required": [ - "current_password", - "new_password", - "user_identifier" - ] + "$ref": "#/components/schemas/SendMessageRequest" } } }, "required": true }, + "parameters": [ + { + "in": "path", + "name": "conversation_identifier", + "required": true, + "schema": { + "type": "string" + }, + "description": "Unique identifier of the conversation." + } + ], "responses": { - "204": { - "description": "Successful" + "200": { + "description": "Common successful response", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ResponseMessage" + } + } + } + } }, - "500": { + "201": { + "description": "Common error response", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ResponseMessage" + } + } + } + } + }, + "400": { "description": "Operation failed", "content": { "application/json": { @@ -2281,46 +1697,26 @@ } } } - } - } - } - }, - "/api/rest/2.0/users/reset-password": { - "post": { - "operationId": "resetUserPassword", - "description": "Resets the password of a ThoughtSpot user account.", - "tags": [ - "Users" - ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "new_password": { - "description": "New password for the user.", - "type": "string", - "deprecated": false - }, - "user_identifier": { - "description": "GUID or name of the user.", - "type": "string", - "deprecated": false - } - }, - "required": [ - "new_password", - "user_identifier" - ] + }, + "401": { + "description": "Unauthorized access.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } } } }, - "required": true - }, - "responses": { - "204": { - "description": "Successful" + "403": { + "description": "Forbidden access.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } }, "500": { "description": "Operation failed", @@ -2335,38 +1731,47 @@ } } }, - "/api/rest/2.0/users/force-logout": { - "post": { - "operationId": "forceLogoutUsers", - "description": "Logs out a user from their current session. This API operation makes\na user session invalid and forces the user to re-login.", + "/api/rest/2.0/ai/agent/instructions/set": { + "put": { + "operationId": "setAgentInstructions", + "description": "\nBeta Version: 26.6.0.cl or later\n\nCreates or updates the admin instructions for the AI agent (Spotter). Admin instructions are tenant- and org-scoped text that guide agent behavior across all conversations. If instructions already exist for the org, they are replaced (upsert semantics).\n\nRequires admin privileges. Only users with org admin access can set agent instructions.\n\n#### Usage guidelines\n\nThe request must include:\n\n- `instructions`: the instructions text to apply to the agent (maximum 5000 characters)\n\nInstructions are validated against system guardrails before being saved. If the instructions contain content that conflicts with guardrails, the request is rejected with a `409` error and the existing instructions remain unchanged.\n\nIf the request is successful, the response includes the saved `AgentInstructions` record:\n\n- `id`: unique identifier of the record\n- `instructions`: the saved instructions text\n- `created_at`: ISO timestamp when the instructions were first created\n- `updated_at`: ISO timestamp of this update\n- `last_updated_by`: user ID of the admin who performed this update\n\n#### Error responses\n\n| Code | Description |\n|------|-------------|\n| 400 | Bad request — the request body is missing required fields or the `instructions` field exceeds the maximum allowed length of 5000 characters. |\n| 401 | Unauthorized — authentication token is missing, expired, or invalid. |\n| 403 | Forbidden — the authenticated user does not have org admin privileges required to set agent instructions. |\n| 409 | Conflict — the provided instructions conflict with system guardrails. Review and revise the instructions text before retrying. |\n| 500 | Internal server error. |\n\n> ###### Note:\n>\n> - This operation uses upsert semantics: it creates the instructions record if none exists, or replaces the existing one.\n> - Instructions take effect immediately for new conversations created after the update.\n> - Use `getAgentInstructions` to retrieve the current instructions before making changes.\n> - Available from version 26.6.0.cl and later.\n\n\n\n\n#### Endpoint URL\n", "tags": [ - "Users" + "AI", + "26.6.0.cl" ], "requestBody": { "content": { "application/json": { "schema": { - "type": "object", - "properties": { - "user_identifiers": { - "description": "GUID or name of the users for force logging out their sessions.", - "type": "array", - "items": { - "type": "string" - }, - "deprecated": false - } - } + "$ref": "#/components/schemas/SetAgentInstructionsRequest" } } }, "required": true }, + "parameters": [], "responses": { - "204": { - "description": "Successful" - }, - "500": { + "200": { + "description": "Common successful response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/AgentInstructions" + } + } + } + }, + "201": { + "description": "Common error response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/AgentInstructions" + } + } + } + }, + "400": { "description": "Operation failed", "content": { "application/json": { @@ -2375,48 +1780,23 @@ } } } - } - } - } - }, - "/api/rest/2.0/orgs/create": { - "post": { - "operationId": "createOrg", - "description": "Creates an Org. Requires cluster administration privileges.", - "tags": [ - "Orgs" - ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "name": { - "description": "Name of the Org.", - "type": "string", - "deprecated": false - }, - "description": { - "description": "Description of the Org.", - "type": "string", - "deprecated": false - } - }, - "required": [ - "name" - ] + }, + "401": { + "description": "Unauthorized access.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } } } }, - "required": true - }, - "responses": { - "200": { + "403": { + "description": "Forbidden access.", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/OrgResponse" + "$ref": "#/components/schemas/ErrorResponse" } } } @@ -2434,48 +1814,47 @@ } } }, - "/api/rest/2.0/orgs/{org_identifier}/update": { + "/api/rest/2.0/ai/instructions/set": { "post": { - "operationId": "updateOrg", - "description": "Updates an Org. Requires cluster administration privileges.", + "operationId": "setNLInstructions", + "description": "\nBeta Version: 10.15.0.cl or later\n\nThis API allows users to set natural language (NL) instructions for a specific data-model to improve AI-generated answers and query processing. These instructions help guide the AI system to better understand the data context and provide more accurate responses.\n\nRequires `CAN_USE_SPOTTER` privilege, either edit access or `SPOTTER_COACHING_PRIVILEGE` on the data model, and a bearer token corresponding to the org where the data model exists.\n\n#### Usage guidelines\n\nTo set NL instructions for a data-model, the request must include:\n\n- `data_source_identifier`: The unique ID of the data-model for which to set NL instructions\n- `nl_instructions_info`: An array of instruction objects, each containing:\n - `instructions`: Array of text instructions for the LLM\n - `scope`: The scope of the instruction (`GLOBAL`). Currently only `GLOBAL` is supported. It can be extended to data-model-user scope in future.\n\n#### Instructions scope\n\n- **GLOBAL**: instructions that apply to all users querying this data model\n\nIf the request is successful, the API returns:\n\n- `success`: a boolean indicating whether the operation completed successfully\n\n#### Error responses\n\n| Code | Description |\n|------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| 401 | Unauthorized — authentication token is missing, expired, or invalid. |\n| 403 | Forbidden — the authenticated user does not have `CAN_USE_SPOTTER` privilege, lacks edit access or `SPOTTER_COACHING_PRIVILEGE` on the data model, or the bearer token does not correspond to the org where the data model exists. |\n\n> ###### Note:\n>\n> - To use this API, the user needs either edit access or `SPOTTER_COACHING_PRIVILEGE` on the data model, and must use the bearer token corresponding to the org where the data model exists.\n> - This endpoint is currently in Beta. Breaking changes may be introduced before the endpoint is made Generally Available.\n> - Available from version 10.15.0.cl and later.\n> - This endpoint requires Spotter — please contact ThoughtSpot Support to enable Spotter on your cluster.\n> - Instructions help improve the accuracy and relevance of AI-generated responses for the specified data-model.\n\n\n\n\n#### Endpoint URL\n", "tags": [ - "Orgs" + "AI", + "10.15.0.cl" ], "requestBody": { "content": { "application/json": { "schema": { - "type": "object", - "properties": { - "name": { - "description": "Name of the Org.", - "type": "string", - "deprecated": false - }, - "description": { - "description": "Description of the Org.", - "type": "string", - "deprecated": false - }, - "user_identifiers": { - "description": "Add Users to an Org.", - "type": "array", - "items": { - "type": "string" - }, - "deprecated": false - } - } + "$ref": "#/components/schemas/SetNLInstructionsRequest" } } }, "required": true }, + "parameters": [], "responses": { - "204": { - "description": "Successful" + "200": { + "description": "Common successful response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/eureka_SetNLInstructionsResponse" + } + } + } }, - "500": { + "201": { + "description": "Common error response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/eureka_SetNLInstructionsResponse" + } + } + } + }, + "400": { "description": "Operation failed", "content": { "application/json": { @@ -2484,44 +1863,26 @@ } } } - } - }, - "parameters": [ - { - "in": "path", - "name": "org_identifier", - "required": true, - "schema": { - "type": "string" - }, - "description": "ID or name of the Org.", - "deprecated": false - } - ] - } - }, - "/api/rest/2.0/orgs/{org_identifier}/delete": { - "post": { - "operationId": "deleteOrg", - "description": "Deletes an Org. Requires cluster administration privileges.", - "tags": [ - "Orgs" - ], - "parameters": [ - { - "in": "path", - "name": "org_identifier", - "required": true, - "schema": { - "type": "string" - }, - "description": "ID or name of the Org.", - "deprecated": false - } - ], - "responses": { - "204": { - "description": "Successful" + }, + "401": { + "description": "Unauthorized access.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "403": { + "description": "Forbidden access.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } }, "500": { "description": "Operation failed", @@ -2536,50 +1897,47 @@ } } }, - "/api/rest/2.0/tags/create": { + "/api/rest/2.0/ai/answer/create": { "post": { - "operationId": "createTag", - "description": "Creates an Org. Requires administrator privileges.", + "operationId": "singleAnswer", + "description": "\nBeta Version: 10.4.0.cl or later\n\nProcesses a natural language query against a specified data model and returns a single AI-generated answer without requiring a conversation session.\n\nRequires `CAN_USE_SPOTTER` privilege and at least view access to the metadata object specified in the request.\n\n#### Usage guidelines\n\nThe request must include:\n- `query`: a natural language question (e.g., \"What were total sales last quarter?\")\n- `metadata_identifier`: the unique ID of the data source to query against\n\nIf the request is successful, the API returns a response message containing:\n- `session_identifier`: the unique ID of the generated response\n- `generation_number`: the generation number of the response\n- `message_type`: the type of the response (e.g., `TSAnswer`)\n- `visualization_type`: the generated visualization type (`Chart`, `Table`, or `Undefined`)\n- `tokens` / `display_tokens`: the search tokens and user-friendly display tokens for the response\n\n#### Error responses\n\n| Code | Description |\n|------|-----------------------------------------------------------------------------------------------------------------------------------------|\n| 401 | Unauthorized — authentication token is missing, expired, or invalid. |\n| 403 | Forbidden — the authenticated user does not have `CAN_USE_SPOTTER` privilege or lacks view permission on the specified metadata object. |\n\n> ###### Note:\n> * This endpoint is currently in Beta. Breaking changes may be introduced before the endpoint is made Generally Available.\n> * This endpoint requires Spotter - please contact ThoughtSpot support to enable Spotter on your cluster.\n\n\n\n\n#### Endpoint URL\n", "tags": [ - "Tags" + "AI", + "10.4.0.cl" ], "requestBody": { "content": { "application/json": { "schema": { - "type": "object", - "properties": { - "name": { - "description": "Name of the tag.", - "type": "string", - "deprecated": false - }, - "color": { - "description": "Hex color code to be assigned to the tag. For example, #ff78a9.", - "type": "string", - "deprecated": false - } - }, - "required": [ - "name", - "color" - ] + "$ref": "#/components/schemas/SingleAnswerRequest" } } }, "required": true }, + "parameters": [], "responses": { "200": { + "description": "Common successful response", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/Tag" + "$ref": "#/components/schemas/ResponseMessage" } } } }, - "500": { + "201": { + "description": "Common error response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ResponseMessage" + } + } + } + }, + "400": { "description": "Operation failed", "content": { "application/json": { @@ -2588,42 +1946,26 @@ } } } - } - } - } - }, - "/api/rest/2.0/tags/{tag_identifier}/update": { - "post": { - "operationId": "updateTag", - "description": "Updates an Org. Requires administrator privileges.", - "tags": [ - "Tags" - ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "name": { - "description": "Name of the tag.", - "type": "string", - "deprecated": false - }, - "color": { - "description": "Hex color code to be assigned to the tag. For example, #ff78a9.", - "type": "string", - "deprecated": false - } + }, + "401": { + "description": "Unauthorized access.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" } } } }, - "required": true - }, - "responses": { - "204": { - "description": "Successful" + "403": { + "description": "Forbidden access.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } }, "500": { "description": "Operation failed", @@ -2635,45 +1977,33 @@ } } } - }, - "parameters": [ - { - "in": "path", - "name": "tag_identifier", - "required": true, - "schema": { - "type": "string" - }, - "description": "Name or Id of the tag.", - "deprecated": false - } - ] + } } }, - "/api/rest/2.0/tags/{tag_identifier}/delete": { + "/api/rest/2.0/ai/agent/conversation/{conversation_identifier}/stop-response": { "post": { - "operationId": "deleteTag", - "description": "Deletes a tag. Requires administrator privileges.", + "operationId": "stopConversation", + "description": "\nStops an in-progress agent conversation response.
Version: 26.6.0.cl or later\n\nVersion: 26.6.0.cl or later\n\nStops an in-progress agent response for the specified conversation. Use this endpoint to cancel a response that is actively being generated — for example, when the user navigates away, reformulates their question, or no longer needs the current result.\n\nRequires `CAN_USE_SPOTTER` privilege and access to the specified conversation.\n\n#### Usage guidelines\n\nThe request must include:\n\n- `conversation_identifier` *(path parameter)*: the unique ID of the conversation whose active response should be stopped, as returned by `createAgentConversation`\n\nA successful request returns an empty `204 No Content` response. If there is no active response in progress at the time of the call, the request is still treated as successful.\n\nAfter stopping a response, the conversation session remains active. You can continue sending messages using `sendAgentConversationMessage` or `sendAgentConversationMessageStreaming`.\n\n#### Example request\n\n```bash\nPOST /api/rest/2.0/ai/agent/conversation/{conversation_identifier}/stop-response\n```\n\n#### Typical usage scenario\n\nThis endpoint is useful when integrating Spotter into a chat UI where users can cancel a long-running query. For example:\n\n1. User sends a message via `sendAgentConversationMessageStreaming`.\n2. User clicks a \"Stop generating\" button while the response is streaming.\n3. Your client calls `stopConversation` with the active `conversation_identifier`.\n4. The stream is terminated and the user can ask a new question.\n\n#### Error responses\n\n| Code | Description |\n|------|-------------|\n| 401 | Unauthorized — authentication token is missing, expired, or invalid. |\n| 403 | Forbidden — the authenticated user does not have `CAN_USE_SPOTTER` privilege or lacks access to the specified conversation. |\n\n> ###### Note:\n>\n> - Calling this endpoint when no response is in progress does not return an error.\n> - The conversation context is preserved after stopping — previous messages and answers remain accessible.\n> - Available from version 26.6.0.cl and later.\n> - This endpoint requires Spotter — please contact ThoughtSpot Support to enable Spotter on your cluster.\n> - This feature is available only for **Spotter 3** (`SPOTTER3`) version.\n\n\n\n\n#### Endpoint URL\n", "tags": [ - "Tags" + "AI", + "26.6.0.cl" ], "parameters": [ { "in": "path", - "name": "tag_identifier", + "name": "conversation_identifier", "required": true, "schema": { "type": "string" }, - "description": "Tag identifier Tag name or Tag id.", - "deprecated": false + "description": "Unique identifier of the conversation to stop." } ], "responses": { "204": { - "description": "Successful" + "description": "Successfully stopped the in-progress agent conversation response for the given." }, - "500": { + "400": { "description": "Operation failed", "content": { "application/json": { @@ -2682,52 +2012,26 @@ } } } - } - } - } - }, - "/api/rest/2.0/tags/assign": { - "post": { - "operationId": "assignTag", - "description": "Assigns a tag to a metadata object Org.", - "tags": [ - "Tags" - ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "metadata": { - "description": "Metadata objects.", - "type": "array", - "items": { - "$ref": "#/components/schemas/TagMetadataTypeInput" - }, - "deprecated": false - }, - "tag_identifiers": { - "description": "GUID or name of the tag.", - "type": "array", - "items": { - "type": "string" - }, - "deprecated": false - } - }, - "required": [ - "metadata", - "tag_identifiers" - ] + }, + "401": { + "description": "Unauthorized access.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } } } }, - "required": true - }, - "responses": { - "204": { - "description": "Successful" + "403": { + "description": "Forbidden access.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } }, "500": { "description": "Operation failed", @@ -2742,185 +2046,65 @@ } } }, - "/api/rest/2.0/tags/unassign": { + "/api/rest/2.0/ai/agent/conversations/{conversation_identifier}/update": { "post": { - "operationId": "unassignTag", - "description": "Unassign a tag to a metadata object.", + "operationId": "updateConversation", + "description": "\nUpdates attributes of an existing agent conversation. Currently only the\ndisplay title can be updated; additional conversation attributes may be\nsupported in future versions. At least one updatable attribute must be\nprovided in the request body.
Version: 26.7.0.cl or later\n\nUpdates attributes of an existing saved agent conversation. Currently only the conversation's display `title` can be updated; additional updatable attributes may be supported in future versions. At least one updatable attribute must be supplied in the request body.\n\nRequires `CAN_USE_SPOTTER` privilege and ownership of the conversation being updated.\n\n#### Usage guidelines\n\nThe request must include:\n\n- `conversation_identifier` *(path parameter)*: the unique ID of the conversation to update, as returned by `createAgentConversation` or `getConversationList`\n- At least one updatable attribute in the request body:\n - `title` *(optional)*: the new display name for the conversation. When provided, must be a non-empty string.\n\nA successful request returns an empty `204 No Content` response. Updated attributes are reflected immediately in subsequent calls to `getConversationList`.\n\n#### Example request\n\n```bash\nPOST /api/rest/2.0/ai/agent/conversations/{conversation_identifier}/update\nContent-Type: application/json\n\n{\n \"title\": \"Revenue Breakdown by Product Line\"\n}\n```\n\n#### Error responses\n\n| Code | Description |\n|------|-------------|\n| 400 | Bad Request — the request body is empty or `title` is provided as an empty string. |\n| 401 | Unauthorized — authentication token is missing, expired, or invalid. |\n| 403 | Forbidden — the authenticated user does not have `CAN_USE_SPOTTER` privilege or does not own the specified conversation. |\n| 404 | Not Found — no conversation exists with the given `conversation_identifier` for the authenticated user. |\n| 422 | Unprocessable Entity — the request body is malformed or contains an invalid field value. |\n\n> ###### Note:\n>\n> - Only conversations created with `enable_save_chat: true` can be updated. Unsaved conversations are not persisted and do not have a retrievable identifier.\n> - Available from version 26.7.0.cl and later.\n> - This endpoint requires Spotter — please contact ThoughtSpot Support to enable Spotter on your cluster.\n\n\n\n\n#### Endpoint URL\n", "tags": [ - "Tags" + "AI", + "26.7.0.cl" ], "requestBody": { "content": { "application/json": { "schema": { - "type": "object", - "properties": { - "metadata": { - "description": "Metadata objects.", - "type": "array", - "items": { - "$ref": "#/components/schemas/TagMetadataTypeInput" - }, - "deprecated": false - }, - "tag_identifiers": { - "description": "GUID or name of the tag.", - "type": "array", - "items": { - "type": "string" - }, - "deprecated": false - } - }, - "required": [ - "metadata", - "tag_identifiers" - ] + "$ref": "#/components/schemas/UpdateConversationRequest" } } }, "required": true }, - "responses": { - "204": { - "description": "Successful" - }, - "500": { - "description": "Operation failed", - "content": { + "parameters": [ + { + "in": "path", + "name": "conversation_identifier", + "required": true, + "schema": { + "type": "string" + }, + "description": "Unique identifier of the conversation to update." + } + ], + "responses": { + "204": { + "description": "Successfully updated the agent conversation." + }, + "400": { + "description": "Operation failed", + "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } - } - } - } - }, - "/api/rest/2.0/groups/create": { - "post": { - "operationId": "createUserGroup", - "description": "Create a group. Requires administrator privilege.", - "tags": [ - "Groups" - ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "name": { - "description": "Name of the group. The group name must be unique.", - "type": "string", - "deprecated": false - }, - "display_name": { - "description": "Unique display name for the group.", - "type": "string", - "deprecated": false - }, - "default_liveboard_identifiers": { - "description": "Unique ID of Liveboards to assign as default liveboards to the users in the group.", - "type": "array", - "items": { - "type": "string" - }, - "deprecated": false - }, - "description": { - "description": "Description of the group.", - "type": "string", - "deprecated": false - }, - "privileges": { - "description": "Privileges to assign to the group.", - "type": "array", - "items": { - "type": "string", - "enum": [ - "ADMINISTRATION", - "AUTHORING", - "USERDATAUPLOADING", - "DATADOWNLOADING", - "USERMANAGEMENT", - "SECURITYMANAGEMENT", - "LOGICALMODELING", - "DATAMANAGEMENT", - "TAGMANAGEMENT", - "SHAREWITHALL", - "SYSTEMMANAGEMENT", - "JOBSCHEDULING", - "A3ANALYSIS", - "EXPERIMENTALFEATUREPRIVILEGE", - "BYPASSRLS", - "RANALYSIS", - "DISABLE_PINBOARD_CREATION", - "DEVELOPER", - "APPLICATION_ADMINISTRATION", - "USER_ADMINISTRATION", - "GROUP_ADMINISTRATION", - "BACKUP_ADMINISTRATION", - "SYSTEM_INFO_ADMINISTRATION", - "ENABLESPOTAPPCREATION", - "SYNCMANAGEMENT" - ] - }, - "deprecated": false - }, - "sub_group_identifiers": { - "description": "GUID or name of the sub groups. A subgroup is a group assigned to a parent group.", - "type": "array", - "items": { - "type": "string" - }, - "deprecated": false - }, - "type": { - "description": "Group type.", - "default": "LOCAL_GROUP", - "type": "string", - "enum": [ - "LOCAL_GROUP", - "LDAP_GROUP" - ], - "deprecated": false - }, - "user_identifiers": { - "description": "GUID or name of the users to assign to the group.", - "type": "array", - "items": { - "type": "string" - }, - "deprecated": false - }, - "visibility": { - "description": "Visibility of the group. To make a group visible to other users and groups,\nset the visibility to SHAREABLE. ", - "default": "SHARABLE", - "type": "string", - "enum": [ - "SHARABLE", - "NON_SHARABLE" - ], - "deprecated": false - } - }, - "required": [ - "name", - "display_name" - ] + }, + "401": { + "description": "Unauthorized access.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } } } }, - "required": true - }, - "responses": { - "200": { + "403": { + "description": "Forbidden access.", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/UserGroupResponse" + "$ref": "#/components/schemas/ErrorResponse" } } } @@ -2938,235 +2122,125 @@ } } }, - "/api/rest/2.0/groups/{group_identifier}/update": { + "/api/rest/2.0/auth/configure": { "post": { - "operationId": "updateUserGroup", - "description": "Update group properties.", + "operationId": "configureAuthSettings", + "description": "\n Version: 26.6.0.cl or later\n\nVersion: 26.6.0.cl or later\n\nEnables or disables authentication at cluster or org level for the specified auth type. Currently supports `TRUSTED_AUTH`.\n\n#### Required privileges\n\nRequires `ADMINISTRATION` (**Can administer ThoughtSpot**) or `CONTROL_TRUSTED_AUTH` (**Can Enable or Disable Trusted Authentication**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled, the `CONTROL_TRUSTED_AUTH` privilege is required.\n\n#### Usage guidelines\n\nUse `cluster_preferences` to enable or disable authentication at the cluster level. Cluster-level settings can only be configured from the Primary Org.\n- `ENABLED` — Generates a new access token if one does not exist. An existing token is preserved.\n- `DISABLED` — Revokes the existing cluster-level access token.\n\nUse `org_preferences` to enable or disable authentication for one or more Orgs. Each entry must include an `org_identifier` (unique ID or name) and an `auth_status`. Org-level configuration requires the per-Org authentication feature to be enabled on your instance.\n- `ENABLED` — Generates a new org-level access token if one does not exist.\n- `DISABLED` — Revokes the existing org-level access token for that Org.\n\nBoth `cluster_preferences` and `org_preferences` are optional. Omitting a field leaves the corresponding settings unchanged. If both are omitted, the API returns `204 No Content` without making any changes.\n\n**Note**: Cluster-level and org-level settings are independent of each other. Enabling or disabling one does not affect the other.\n\n\n\n\n#### Endpoint URL\n", "tags": [ - "Groups" + "Authentication", + "26.6.0.cl" ], "requestBody": { "content": { "application/json": { "schema": { - "type": "object", - "properties": { - "name": { - "description": "Name of the group to modify.", - "type": "string", - "deprecated": false - }, - "default_liveboard_identifiers": { - "description": "Unique ID of Liveboards to assign as default liveboards to the users in the group.", - "type": "array", - "items": { - "type": "string" - }, - "deprecated": false - }, - "description": { - "description": "Description for the group.", - "type": "string", - "deprecated": false - }, - "display_name": { - "description": "Display name of the group.", - "type": "string", - "deprecated": false - }, - "privileges": { - "description": "Privileges to assign to the group.", - "type": "array", - "items": { - "type": "string", - "enum": [ - "ADMINISTRATION", - "AUTHORING", - "USERDATAUPLOADING", - "DATADOWNLOADING", - "USERMANAGEMENT", - "SECURITYMANAGEMENT", - "LOGICALMODELING", - "DATAMANAGEMENT", - "TAGMANAGEMENT", - "SHAREWITHALL", - "SYSTEMMANAGEMENT", - "JOBSCHEDULING", - "A3ANALYSIS", - "EXPERIMENTALFEATUREPRIVILEGE", - "BYPASSRLS", - "RANALYSIS", - "DISABLE_PINBOARD_CREATION", - "DEVELOPER", - "APPLICATION_ADMINISTRATION", - "USER_ADMINISTRATION", - "GROUP_ADMINISTRATION", - "BACKUP_ADMINISTRATION", - "SYSTEM_INFO_ADMINISTRATION", - "ENABLESPOTAPPCREATION", - "SYNCMANAGEMENT" - ] - }, - "deprecated": false - }, - "sub_group_identifiers": { - "description": "GUID or name of the sub groups. A subgroup is a group assigned to a parent group.", - "type": "array", - "items": { - "type": "string" - }, - "deprecated": false - }, - "type": { - "description": "Type of the user group.", - "type": "string", - "enum": [ - "LOCAL_GROUP", - "LDAP_GROUP" - ], - "deprecated": false - }, - "user_identifiers": { - "description": "GUID or name of the users to assign to the group.", - "type": "array", - "items": { - "type": "string" - }, - "deprecated": false - }, - "visibility": { - "description": "Visibility of the group. To make a group visible to other users and \ngroups, set the visibility to SHAREABLE. ", - "type": "string", - "enum": [ - "SHARABLE", - "NON_SHARABLE" - ], - "deprecated": false - } - } + "$ref": "#/components/schemas/ConfigureAuthSettingsRequest" } } }, "required": true }, + "parameters": [], "responses": { "204": { - "description": "Successful" + "description": "Trusted authentication settings configured successfully." }, - "500": { - "description": "Operation failed", + "400": { + "description": "Invalid request.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" + }, + "examples": { + "invalid_request": { + "summary": "Invalid request", + "value": { + "error": { + "message": { + "code": 10002, + "incident_id_guid": "a1b2c3d4-e5f6-7890-abcd-ef1234567890", + "trace_id_guid": "a1b2c3d4-e5f6-7890-abcd-ef1234567890", + "debug": "At least one of cluster_preferences or org_preferences must be provided." + } + } + } + } } } } - } - }, - "parameters": [ - { - "in": "path", - "name": "group_identifier", - "required": true, - "schema": { - "type": "string" - }, - "description": "GUID or name of the group.", - "deprecated": false - } - ] - } - }, - "/api/rest/2.0/groups/{group_identifier}/delete": { - "post": { - "operationId": "deleteUserGroup", - "description": "Deletes a group.", - "tags": [ - "Groups" - ], - "parameters": [ - { - "in": "path", - "name": "group_identifier", - "required": true, - "schema": { - "type": "string" - }, - "description": "GUID or name of the group.", - "deprecated": false - } - ], - "responses": { - "204": { - "description": "Successful" }, - "500": { - "description": "Operation failed", + "401": { + "description": "Unauthorized access.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" - } - } - } - } - } - } - }, - "/api/rest/2.0/groups/import": { - "post": { - "operationId": "importUserGroups", - "description": "Import groups to ThoughtSpot. Requires administrator privilege.", - "tags": [ - "Groups" - ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "groups": { - "description": "Details of user groups which are to be imported", - "type": "array", - "items": { - "$ref": "#/components/schemas/GroupsImportListInput" - }, - "deprecated": false - }, - "delete_unspecified_groups": { - "description": "If set to true, removes groups that are not specified in the API request.", - "type": "boolean", - "deprecated": false - }, - "dry_run": { - "description": "If true, the API performs a test operation and returns user IDs whose \ndata will be edited after the import.", - "type": "boolean", - "deprecated": false + }, + "examples": { + "unauthorized_access": { + "summary": "Unauthorized access", + "value": { + "error": { + "message": { + "code": 10097, + "incident_id_guid": "b2c3d4e5-f678-9012-bcde-f23456789012", + "trace_id_guid": "b2c3d4e5-f678-9012-bcde-f23456789012", + "debug": "Authentication required to configure authentication settings." + } + } + } } } } } }, - "required": true - }, - "responses": { - "200": { + "403": { + "description": "Forbidden access.", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/ImportUserGroupsResponse" + "$ref": "#/components/schemas/ErrorResponse" + }, + "examples": { + "forbidden_access": { + "summary": "Forbidden access", + "value": { + "error": { + "message": { + "code": 10023, + "incident_id_guid": "c3d4e5f6-7890-1234-cdef-345678901234", + "trace_id_guid": "c3d4e5f6-7890-1234-cdef-345678901234", + "debug": "ADMINISTRATION or CONTROL_TRUSTED_AUTH privilege required to configure authentication settings." + } + } + } + } } } } }, "500": { - "description": "Operation failed", + "description": "Unexpected error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" + }, + "examples": { + "unexpected_error": { + "summary": "Unexpected error", + "value": { + "error": { + "message": { + "code": 10038, + "incident_id_guid": "d4e5f678-9012-3456-defa-456789012345", + "trace_id_guid": "d4e5f678-9012-3456-defa-456789012345", + "debug": "Unexpected server error while configuring authentication settings." + } + } + } + } } } } @@ -3174,68 +2248,74 @@ } } }, - "/api/rest/2.0/metadata/tml/import": { - "post": { - "operationId": "importMetadata", - "description": "Imports TML representation of metadata objects. Requires data management privileges.", + "/api/rest/2.0/auth/session/user": { + "get": { + "operationId": "getCurrentUserInfo", + "description": "\n Version: 9.0.0.cl or later\n\nRetrieves details of the current user session for the token provided in the request header.\n\nAny ThoughtSpot user can access this endpoint and send an API request. The data returned in the API response varies according to user's privilege and object access permissions.\n\n**NOTE**: In ThoughtSpot, users with cluster administration privileges can access all Orgs by default. However, unless the administrator is explicitly added to an Org, the Orgs list in the session information returned by the API will include only the Primary Org. To include other Orgs in the API response, you must explicitly add the administrator to each Org in the Admin settings page in the UI or via user REST API.\n\n\n\n#### Endpoint URL\n", "tags": [ - "Metadata" + "Authentication", + "9.0.0.cl" ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "metadata_tmls": { - "description": "Details of TML objects.", - "type": "array", - "items": { - "type": "string" - }, - "deprecated": false - }, - "import_policy": { - "description": "Specifies the import policy for the TML import.", - "default": "PARTIAL", - "type": "string", - "enum": [ - "PARTIAL", - "ALL_OR_NONE", - "VALIDATE_ONLY" - ], - "deprecated": false - }, - "create_new": { - "description": "If selected, creates TML objects with new GUIDs.", - "default": false, - "type": "boolean", - "deprecated": false - } - }, - "required": [ - "metadata_tmls" - ] - } - } - }, - "required": true - }, + "parameters": [], "responses": { "200": { + "description": "Fetch current session user detail successful.", "content": { "application/json": { "schema": { - "type": "array", - "items": { - "type": "object" + "$ref": "#/components/schemas/User" + }, + "examples": { + "example_1": { + "description": "Current user info for an admin user in the primary org", + "value": { + "id": "59481331-ee53-42be-a548-bd87be6ddd4a", + "name": "tsadmin", + "display_name": "TS Admin", + "visibility": "SHARABLE", + "author_id": "59481331-ee53-42be-a548-bd87be6ddd4a", + "can_change_password": true, + "complete_detail": true, + "creation_time_in_millis": 1699900000000, + "current_org": { + "id": 0, + "name": "Primary" + }, + "deleted": false, + "deprecated": false, + "account_type": "LOCAL_USER", + "account_status": "ACTIVE", + "email": "tsadmin@example.com" + } + }, + "example_2": { + "description": "Current user info for a SAML user switched to a non-primary org", + "value": { + "id": "7e4c9f2a-8b5d-4a1e-9c3b-6d8e2f5a7b4c", + "name": "sales_analyst", + "display_name": "Sales Analyst", + "visibility": "SHARABLE", + "author_id": "7e4c9f2a-8b5d-4a1e-9c3b-6d8e2f5a7b4c", + "can_change_password": false, + "complete_detail": true, + "creation_time_in_millis": 1699900000000, + "current_org": { + "id": 583464508, + "name": "sales_org" + }, + "deleted": false, + "deprecated": false, + "account_type": "SAML_USER", + "account_status": "ACTIVE", + "email": "sales_analyst@example.com" + } } } } } }, - "500": { - "description": "Operation failed", + "400": { + "description": "Invalid request.", "content": { "application/json": { "schema": { @@ -3243,71 +2323,63 @@ } } } - } - } - } - }, - "/api/rest/2.0/metadata/tml/export": { - "post": { - "operationId": "exportMetadata", - "description": "Exports TML representation of metadata objects", - "tags": [ - "Metadata" - ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "metadata": { - "description": "Metadata objects.", - "type": "array", - "items": { - "$ref": "#/components/schemas/MetadataTypeInput" - }, - "deprecated": false - }, - "export_associated": { - "description": "Indicates whether to export associated metadata objects of specified metadata objects.", - "default": false, - "type": "boolean", - "deprecated": false - }, - "export_fqn": { - "description": "Indicates whether to include FQN (GUID) of specified metadata objects.", - "default": false, - "type": "boolean", - "deprecated": false - } + }, + "401": { + "description": "Unauthorized access.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" }, - "required": [ - "metadata" - ] + "examples": { + "unauthorized_access": { + "summary": "Unauthorized access", + "value": { + "error": { + "message": { + "code": 10097, + "incident_id_guid": "b2c3d4e5-f678-9012-bcde-f23456789012", + "trace_id_guid": "b2c3d4e5-f678-9012-bcde-f23456789012", + "debug": "Authentication required to retrieve the current user information." + } + } + } + } + } } } }, - "required": true - }, - "responses": { - "200": { + "403": { + "description": "Forbidden access.", "content": { "application/json": { "schema": { - "type": "array", - "items": { - "type": "object" - } + "$ref": "#/components/schemas/ErrorResponse" } } } }, "500": { - "description": "Operation failed", + "description": "Unexpected error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" + }, + "examples": { + "unexpected_error": { + "summary": "Unexpected error", + "value": { + "error": { + "message": { + "code": 10038, + "incident_id_guid": "d4e5f678-9012-3456-defa-456789012345", + "trace_id_guid": "d4e5f678-9012-3456-defa-456789012345", + "debug": "Unexpected server error while retrieving current user information." + } + } + } + } } } } @@ -3315,48 +2387,50 @@ } } }, - "/api/rest/2.0/metadata/delete": { - "post": { - "operationId": "deleteMetadata", - "description": "Deletes metadata objects. Requires edit access to objects.", + "/api/rest/2.0/auth/session/token": { + "get": { + "operationId": "getCurrentUserToken", + "description": "\n Version: 9.4.0.cl or later\n\nRetrieves details of the current session token for the bearer token provided in the request header.\n\nThis API endpoint does not create a new token. Instead, it returns details about the token, including the token string, creation time, expiration time, and the associated user.\n\nUse this endpoint to introspect your current session token, debug authentication issues, or when a frontend application needs session token details.\n\nAny ThoughtSpot user with a valid bearer token can access this endpoint and send an API request\n\n\n\n\n#### Endpoint URL\n", "tags": [ - "Metadata" + "Authentication", + "9.4.0.cl" ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "metadata": { - "description": "Metadata objects.", - "type": "array", - "items": { - "$ref": "#/components/schemas/DeleteMetadataTypeInput" - }, - "deprecated": false + "parameters": [], + "responses": { + "200": { + "description": "Fetching token for current user successful.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/GetTokenResponse" + }, + "examples": { + "example_1": { + "description": "Standard session token valid for 1 hour", + "value": { + "token": "eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCJ9.example_token_payload.signature", + "creation_time_in_millis": 1724277430000, + "expiration_time_in_millis": 1724281030000, + "valid_for_user_id": "59481331-ee53-42be-a548-bd87be6ddd4a", + "valid_for_username": "tsadmin" + } }, - "delete_disabled_objects": { - "description": "Indicates whether to delete disabled metadata objects.", - "default": false, - "type": "boolean", - "deprecated": false + "example_2": { + "description": "Short-lived session token valid for 5 minutes", + "value": { + "token": "eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCJ9.example_short_token_payload.signature", + "creation_time_in_millis": 1724277430000, + "expiration_time_in_millis": 1724277730000, + "valid_for_user_id": "7e4c9f2a-8b5d-4a1e-9c3b-6d8e2f5a7b4c", + "valid_for_username": "sales_analyst" + } } - }, - "required": [ - "metadata" - ] + } } } }, - "required": true - }, - "responses": { - "204": { - "description": "Successful" - }, - "500": { - "description": "Operation failed", + "400": { + "description": "Invalid request.", "content": { "application/json": { "schema": { @@ -3364,61 +2438,63 @@ } } } - } - } - } - }, - "/api/rest/2.0/security/metadata/assign": { - "post": { - "operationId": "assignChangeAuthor", - "description": "Assigns a new author or transfers the ownership of the specified metadata objects.", - "tags": [ - "Security" - ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "metadata": { - "description": "GUID or name of the metadata object.", - "type": "array", - "items": { - "$ref": "#/components/schemas/AuthorMetadataTypeInput" - }, - "deprecated": false - }, - "user_identifier": { - "description": "GUID or name of the user who you want to assign as the author.", - "type": "string", - "deprecated": false - }, - "current_owner_identifier": { - "description": "GUID or name of the current author. When defined, the metadata objects \nauthored by the specified owner are filtered for the API operation.", - "type": "string", - "deprecated": false - } + }, + "401": { + "description": "Unauthorized access.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" }, - "required": [ - "metadata", - "user_identifier" - ] + "examples": { + "unauthorized_access": { + "summary": "Unauthorized access", + "value": { + "error": { + "message": { + "code": 10097, + "incident_id_guid": "b2c3d4e5-f678-9012-bcde-f23456789012", + "trace_id_guid": "b2c3d4e5-f678-9012-bcde-f23456789012", + "debug": "Authentication required to retrieve the current session token." + } + } + } + } + } } } }, - "required": true - }, - "responses": { - "204": { - "description": "Successful" + "403": { + "description": "Forbidden access.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } }, "500": { - "description": "Operation failed", + "description": "Unexpected error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" + }, + "examples": { + "unexpected_error": { + "summary": "Unexpected error", + "value": { + "error": { + "message": { + "code": 10038, + "incident_id_guid": "d4e5f678-9012-3456-defa-456789012345", + "trace_id_guid": "d4e5f678-9012-3456-defa-456789012345", + "debug": "Unexpected server error while retrieving the current user session token." + } + } + } + } } } } @@ -3426,479 +2502,625 @@ } } }, - "/api/rest/2.0/security/metadata/share": { + "/api/rest/2.0/auth/token/custom": { "post": { - "operationId": "shareMetadata", - "description": "Share one or several metadata objects with users or groups. \nRequires edit access to metadata objects.", + "operationId": "getCustomAccessToken", + "description": "\n Version: 10.4.0.cl or later\n\nCreates an authentication token that provides values for the formula variables in the Row Level Security (RLS) rules for a given user. Recommended for use cases that require Attribute-based access control (ABAC) via RLS.\n\n#### Required privileges\n\nTo add a new user and assign privileges during auto-creation, the `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege is required. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled, the `CONTROL_TRUSTED_AUTH` (**Can Enable or Disable Trusted Authentication**) privilege and edit access to the data source are required.\n\nTo configure formula variables for all Orgs on your instance or the Primary Org, cluster administration privileges are required. Org administrators can configure formula variables for their respective Orgs. If Role-Based Access Control (RBAC) is enabled, users with the `CAN_MANAGE_VARIABLES` (**Can manage variables**) role privilege can also create and manage variables for their Org context.\n\n#### Usage guidelines\n\nYou can generate a token by providing a `username` and `password`, or by using a `secret_key`. To generate a `secret_key`, the administrator must enable [Trusted authentication](https://developers.thoughtspot.com/docs/trusted-auth-secret-key) in the **Develop** > **Customizations** > **Security Settings** page.\n\n**Note**:\n* When both `password` and `secret_key` are included in the API request, `password` takes precedence.\n* If [Multi-Factor Authentication (MFA)](https://docs.thoughtspot.com/cloud/latest/authentication-local-mfa) is enabled on your instance, the API login request with `username` and `password` returns an error. You can switch to token-based authentication with `secret_key` or contact ThoughtSpot Support for assistance.\n\nThe token obtained from ThoughtSpot is valid for 5 minutes by default. You can configure the token expiration time as required.\n\n#### ABAC via RLS\n\nTo implement ABAC via RLS and assign security entitlements to users during session creation, generate a token with custom variable values. The values set in the authentication token are applied to the formula variables referenced in RLS rules at the table level, which determines the data each user can access based on their entitlements.\n\nThe variable values can be configured to persist for a specific set of Models in user sessions initiated with the token, allowing different RLS rules to be set for different data models. Once defined, the rules are added to the user's `variable_values` object, after which all sessions will use the persisted values.\n\nFor more information, see [ABAC via tokens Documentation](https://developers.thoughtspot.com/docs/abac-via-rls-variables).\n\n##### Formula variables\nBefore defining variable values, ensure the variables are created and available on your instance. To create a formula variable, you can use the **Create variable** (`/api/rest/2.0/template/variables/create`) REST API endpoint, with the variable `type` set as `Formula_Variable` in the API request.\n\nThe API doesn't support `\"persist_option\": \"RESET\"` and `\"persist_option\": \"NONE\"` when `variable_values` are defined in the request. If you are using `variable_values` for token generation, you must use other supported persist options such as `APPEND` or `REPLACE`.\n\nIf you want to use `RESET` or `NONE`, do not pass any `variable_values`. In such cases, `variable_values` will remain unaffected.\n\n#### Supported objects\n\nThe supported object type is `LOGICAL_TABLE`. When using `object_id` with `variable_values`, models are supported.\n\n#### Just-in-time provisioning\n\nFor [just-in-time user creation and provisioning](https://developers.thoughtspot.com/docs/just-in-time-provisioning), specify the following attributes in the API request:\n\n* `auto_create`\n* `username`\n* `display_name`\n* `email`\n* `groups`\n\nSet `auto_create` to `true` if the username does not exist in ThoughtSpot. If the username already exists in ThoughtSpot and `auto_create` is set to `true`, user properties such as display name, email, Org and group entitlements will not be updated with new values. Setting `auto_create` to `true` does not create formula variables. Hence, this setting will not be applicable to `variable_values`.\n\n#### Important point to note\nAll options in the token creation APIs that define user access to data in ThoughtSpot will take effect during token creation, not when the token is used for authentication. For example, `auto_create:true` will create the user when the authentication token is created. Persist options such as `APPEND` and `REPLACE` will persist `variable_values` on the user profile when the token is created.\n\n\n\n\n#### Endpoint URL\n", "tags": [ - "Security" + "Authentication", + "10.4.0.cl" ], "requestBody": { "content": { "application/json": { "schema": { - "type": "object", - "properties": { - "metadata_type": { - "description": "Type of metadata.\n1. Liveboard\n2. Answers\n3. LOGICAL_TABLE for any data object such as table, worksheet or view.\n4. LOGICAL_COLUMN for a column of any data object such as table, worksheet or view.\n5. CONNECTION for creating or modify data connections.\n6. TAG for tag objects.\n7. USER for user objects.\n8. USER_GROUP for user group objects.\n9. LOGICAL_RELATIONSHIP for table or worksheet joins. A join combines from one or several data object by using matching values", - "type": "string", - "enum": [ - "LIVEBOARD", - "ANSWER", - "LOGICAL_TABLE", - "LOGICAL_COLUMN", - "CONNECTION", - "TAG", - "USER", - "USER_GROUP", - "LOGICAL_RELATIONSHIP" - ], - "deprecated": false - }, - "metadata_identifiers": { - "description": "Unique ID or name of metadata objects.", - "type": "array", - "items": { - "type": "string" - }, - "deprecated": false - }, - "permissions": { - "description": "Permission details for sharing the objects.", - "type": "array", - "items": { - "$ref": "#/components/schemas/SharePermissionsInput" - }, - "deprecated": false - }, - "visualization_identifiers": { - "description": "Options to specify details of Liveboard.", - "type": "array", - "items": { - "type": "string" - }, - "deprecated": false - }, - "emails": { - "description": "Email IDs to which notifications will be sent.", - "type": "array", - "items": { - "type": "string" - }, - "deprecated": false - }, - "message": { - "description": "Message to be included in notification.", - "type": "string", - "deprecated": false - }, - "enable_custom_url": { - "description": "Sends object URLs in the customized format in email notifications. ", - "default": false, - "type": "boolean", - "deprecated": false - } - }, - "required": [ - "metadata_type", - "metadata_identifiers", - "permissions", - "emails", - "message" - ] + "$ref": "#/components/schemas/GetCustomAccessTokenRequest" } } }, "required": true }, + "parameters": [], "responses": { - "204": { - "description": "Successful" + "200": { + "description": "ABAC token creation was successful.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/AccessToken" + }, + "examples": { + "example_1": { + "description": "Custom access token with variable values and APPEND persist option for an existing user", + "value": { + "id": "9f8e7d6c-5b4a-3210-fedc-ba9876543210", + "token": "eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCJ9.example_custom_token.signature", + "org": { + "id": 0, + "name": "Primary" + }, + "user": { + "id": "59481331-ee53-42be-a548-bd87be6ddd4a", + "name": "analyst_user" + }, + "creation_time_in_millis": 1724277430000, + "expiration_time_in_millis": 1724277730000 + } + }, + "example_2": { + "description": "Custom access token with variable values for a JIT-provisioned user", + "value": { + "id": "1a2b3c4d-5e6f-7890-abcd-ef1234567890", + "token": "eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCJ9.example_jit_custom_token.signature", + "org": { + "id": 1, + "name": "SalesOrg" + }, + "user": { + "id": "3f2e1d4c-9b8a-7e6f-5d4c-3b2a1e0f9d8c", + "name": "new_sales_user@example.com" + }, + "creation_time_in_millis": 1724278000000, + "expiration_time_in_millis": 1724278300000 + } + } + } + } + } }, - "500": { - "description": "Operation failed", + "400": { + "description": "Invalid request. This could be due to missing or incorrect parameters.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" + }, + "examples": { + "invalid_request": { + "summary": "Invalid request", + "value": { + "error": { + "message": { + "code": 10002, + "incident_id_guid": "a1b2c3d4-e5f6-7890-abcd-ef1234567890", + "trace_id_guid": "a1b2c3d4-e5f6-7890-abcd-ef1234567890", + "debug": "Invalid persistOption: 'APPEND'. Expected: 'RESET' when resetOption is provided." + } + } + } + } } } } - } - } - } - }, - "/api/rest/2.0/vcs/config/create": { - "post": { - "operationId": "createLocalConfig", - "description": "Configure local repository to connect to remote repository", - "tags": [ - "Version Control" - ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "repository_url": { - "description": "URL for connecting to remote repository", - "type": "string", - "deprecated": false - }, - "default_branch": { - "description": "Name of the default remote branch", - "type": "string", - "deprecated": false - }, - "username": { - "description": "Username to authenticate connection to remote repository", - "type": "string", - "deprecated": false - }, - "access_token": { - "description": "Access token corresponding to the user to authenticate connection to remote repository", - "type": "string", - "deprecated": false - } + }, + "401": { + "description": "Unauthorized access. The request could not be authenticated.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" }, - "required": [ - "repository_url", - "username", - "access_token" - ] + "examples": { + "unauthorized_access": { + "summary": "Unauthorized access", + "value": { + "error": { + "message": { + "code": 10097, + "incident_id_guid": "b2c3d4e5-f678-9012-bcde-f23456789012", + "trace_id_guid": "b2c3d4e5-f678-9012-bcde-f23456789012", + "debug": "Invalid credentials. The provided secret key or password is incorrect." + } + } + } + } + } } } }, - "required": true - }, - "responses": { - "200": { + "403": { + "description": "Forbidden access. The user does not have permission to access this resource.", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/RepoConfigObject" + "$ref": "#/components/schemas/ErrorResponse" + }, + "examples": { + "forbidden_access": { + "summary": "Forbidden access", + "value": { + "error": { + "message": { + "code": 10023, + "incident_id_guid": "c3d4e5f6-7890-1234-cdef-345678901234", + "trace_id_guid": "c3d4e5f6-7890-1234-cdef-345678901234", + "debug": "Trusted authentication is not enabled for this cluster or org." + } + } + } + } } } } }, "500": { - "description": "Operation failed", + "description": "An unexpected error occurred on the server.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" + }, + "examples": { + "unexpected_error": { + "summary": "Unexpected error", + "value": { + "error": { + "message": { + "code": 10038, + "incident_id_guid": "d4e5f678-9012-3456-defa-456789012345", + "trace_id_guid": "d4e5f678-9012-3456-defa-456789012345", + "debug": "Unexpected server error while generating the custom access token." + } + } + } + } } } } } - } + }, + "security": [] } }, - "/api/rest/2.0/vcs/config/update": { + "/api/rest/2.0/auth/token/full": { "post": { - "operationId": "updateLocalConfig", - "description": "Update local repository configuration.", + "operationId": "getFullAccessToken", + "description": "\n Version: 9.0.0.cl or later\n\nGenerates an authentication token for creating a full session in ThoughtSpot for a given user. Recommended for use cases that do not require Attribute-based access control (ABAC) via Row Level Security (RLS).\n\n#### Usage guidelines\n\nYou can generate a token for a user by providing a `username` and `password`, or by using the `secret_key` generated for your instance. To generate a `secret_key`, the administrator must enable [Trusted authentication](https://developers.thoughtspot.com/docs/trusted-auth-secret-key) in the **Develop** > **Customizations** > **Security Settings** page.\n\n**Note**:\n* When both `password` and `secret_key` are included in the API request, `password` takes precedence.\n* If [Multi-Factor Authentication (MFA)](https://docs.thoughtspot.com/cloud/latest/authentication-local-mfa) is enabled on your instance, the API login request with `username` and `password` returns an error. You can switch to token-based authentication with `secret_key` or contact ThoughtSpot Support for assistance.\n\nThe token obtained from ThoughtSpot is valid for 5 minutes by default. You can configure the token expiration time as required.\n\n#### Just-in-time provisioning\n\nFor [just-in-time user creation and provisioning](https://developers.thoughtspot.com/docs/just-in-time-provisioning), specify the following attributes in the API request:\n\n* `auto_create`\n* `username`\n* `display_name`\n* `email`\n* `group_identifiers`\n\nSet `auto_create` to `true` if the username does not exist in ThoughtSpot. If the user already exists in ThoughtSpot and `auto_create` is set to `true`, user properties such as display name, email and group assignment will be updated.\n\nTo add a new user and assign privileges during auto-creation, the `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege is required. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled, the `CONTROL_TRUSTED_AUTH` (**Can Enable or Disable Trusted Authentication**) privilege is required.\n\n#### Important point to note\nAll options in the token creation APIs that define user access to data in ThoughtSpot will take effect during token creation, not when the token is used for authentication. For example, `auto_create:true` will create the user when the authentication token is created.\n\n\n\n\n#### Endpoint URL\n", "tags": [ - "Version Control" + "Authentication", + "9.0.0.cl" ], "requestBody": { "content": { "application/json": { "schema": { - "type": "object", - "properties": { - "username": { - "description": "Username to authenticate connection to vcs", - "type": "string", - "deprecated": false - }, - "access_token": { - "description": "Access token corresponding to the user to authenticate connection to vcs", - "type": "string", - "deprecated": false - }, - "default_branch": { - "description": "Name of the default remote branch", - "type": "string", - "deprecated": false - } - } + "$ref": "#/components/schemas/GetFullAccessTokenRequest" } } }, "required": true }, + "parameters": [], "responses": { "200": { + "description": "Bearer auth token creation successful.", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/RepoConfigObject" + "$ref": "#/components/schemas/Token" + }, + "examples": { + "example_1": { + "description": "Full-access token generated using cluster secret key", + "value": { + "token": "eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCJ9.example_full_token.signature", + "creation_time_in_millis": 1724277430000, + "expiration_time_in_millis": 1724277730000, + "scope": { + "access_type": "FULL", + "org_id": 0 + }, + "valid_for_user_id": "59481331-ee53-42be-a548-bd87be6ddd4a", + "valid_for_username": "tsadmin" + } + }, + "example_2": { + "description": "Full-access token for a JIT-provisioned user in a specific org", + "value": { + "token": "eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCJ9.example_jit_full_token.signature", + "creation_time_in_millis": 1724278000000, + "expiration_time_in_millis": 1724278300000, + "scope": { + "access_type": "FULL", + "org_id": 1 + }, + "valid_for_user_id": "b3d9e1f7-2a4c-4e8b-9d1f-6c5a3b8e7d2f", + "valid_for_username": "jit_analyst@example.com" + } + } } } } }, - "500": { - "description": "Operation failed", + "400": { + "description": "Invalid request.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" + }, + "examples": { + "invalid_request": { + "summary": "Invalid request", + "value": { + "error": { + "message": { + "code": 10002, + "incident_id_guid": "a1b2c3d4-e5f6-7890-abcd-ef1234567890", + "trace_id_guid": "a1b2c3d4-e5f6-7890-abcd-ef1234567890", + "debug": "Either secret_key or password must be provided." + } + } + } + } } } } - } - } - } - }, - "/api/rest/2.0/vcs/config/delete": { - "post": { - "operationId": "deleteLocalConfig", - "description": "Delete local repository configuration", - "tags": [ - "Version Control" - ], - "parameters": [], - "responses": { - "204": { - "description": "Successful" }, - "500": { - "description": "Operation failed", + "401": { + "description": "Unauthorized access.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" + }, + "examples": { + "unauthorized_access": { + "summary": "Unauthorized access", + "value": { + "error": { + "message": { + "code": 10097, + "incident_id_guid": "b2c3d4e5-f678-9012-bcde-f23456789012", + "trace_id_guid": "b2c3d4e5-f678-9012-bcde-f23456789012", + "debug": "Invalid credentials. The provided secret key or password is incorrect." + } + } + } + } + } + } + } + }, + "403": { + "description": "Forbidden access.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + }, + "examples": { + "forbidden_access": { + "summary": "Forbidden access", + "value": { + "error": { + "message": { + "code": 10023, + "incident_id_guid": "c3d4e5f6-7890-1234-cdef-345678901234", + "trace_id_guid": "c3d4e5f6-7890-1234-cdef-345678901234", + "debug": "Trusted authentication is not enabled for this cluster or org." + } + } + } + } } } } - } - } - } - }, - "/api/rest/2.0/vcs/branches/{branch_name}/pull": { - "post": { - "operationId": "pullBranch", - "description": "Pull a branch from remote repository to local repository.", - "tags": [ - "Version Control" - ], - "parameters": [ - { - "in": "path", - "name": "branch_name", - "required": true, - "schema": { - "type": "string" - }, - "description": "Name of the branch to pull", - "deprecated": false - } - ], - "responses": { - "204": { - "description": "Successful" }, "500": { - "description": "Operation failed", + "description": "Unexpected error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" + }, + "examples": { + "unexpected_error": { + "summary": "Unexpected error", + "value": { + "error": { + "message": { + "code": 10038, + "incident_id_guid": "d4e5f678-9012-3456-defa-456789012345", + "trace_id_guid": "d4e5f678-9012-3456-defa-456789012345", + "debug": "Unexpected server error while generating the full-access token." + } + } + } + } } } } } - } + }, + "security": [] } }, - "/api/rest/2.0/vcs/branches/commit": { + "/api/rest/2.0/auth/token/object": { "post": { - "operationId": "commitBranch", - "description": "Commit the object from metadata to remote repository", + "operationId": "getObjectAccessToken", + "description": "\n Version: 9.0.0.cl or later\n\nGenerates an authentication token that provides access to a specific metadata object. This object list is intersected with the list of objects the user is allowed to access via group membership. For more information, see [Object security](https://docs.thoughtspot.com/cloud/latest/security-data-object#object_security).\n\n#### Usage guidelines\n\nYou can generate a token for a user by providing a `username` and `password`, or by using the `secret_key` generated for your instance. To generate a `secret_key`, the administrator must enable [Trusted authentication](https://developers.thoughtspot.com/docs/trusted-auth-secret-key) in the **Develop** > **Customizations** > **Security Settings** page.\n\n**Note**:\n* When both `password` and `secret_key` are included in the API request, `password` takes precedence.\n* If [Multi-Factor Authentication (MFA)](https://docs.thoughtspot.com/cloud/latest/authentication-local-mfa) is enabled on your instance, the API login request with `username` and `password` returns an error. You can switch to token-based authentication with `secret_key` or contact ThoughtSpot Support for assistance.\n\nThe token obtained from ThoughtSpot is valid for 5 minutes by default. You can configure the token expiration time as required.\n\n#### Just-in-time provisioning\n\nFor [just-in-time user creation and provisioning](https://developers.thoughtspot.com/docs/just-in-time-provisioning), specify the following attributes in the API request:\n\n* `auto_create`\n* `username`\n* `display_name`\n* `email`\n* `group_identifiers`\n\nSet `auto_create` to `true` if the user is not available in ThoughtSpot. If the user already exists in ThoughtSpot and the `auto_create` parameter is set to `true`, user properties such as display name, email, and group assignment will be updated.\n\nTo add a new user and assign privileges, the `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege is required. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled, the `CONTROL_TRUSTED_AUTH`(**Can Enable or Disable Trusted Authentication**) privilege is required.\n\n#### Important point to note\n\nAll options in the token creation APIs that define user access to data in ThoughtSpot will take effect during token creation, not when the token is used for authentication. For example, `auto_create:true` will create the user when the authentication token is created.\n\n\n\n\n#### Endpoint URL\n", "tags": [ - "Version Control" + "Authentication", + "9.0.0.cl" ], "requestBody": { "content": { "application/json": { "schema": { - "type": "object", - "properties": { - "metadata": { - "description": "Metadata objects.", - "type": "array", - "items": { - "$ref": "#/components/schemas/MetadataObject" - }, - "deprecated": false - }, - "branch_name": { - "description": "Name of the remote branch where object tml should be pushed", - "type": "string", - "deprecated": false - }, - "comment": { - "description": "Comment to be added to the commit", - "type": "string", - "deprecated": false - } - }, - "required": [ - "metadata", - "comment" - ] + "$ref": "#/components/schemas/GetObjectAccessTokenRequest" } } }, "required": true }, + "parameters": [], "responses": { "200": { + "description": "Bearer auth token creation successful.", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/CommitResponse" + "$ref": "#/components/schemas/Token" + }, + "examples": { + "example_1": { + "description": "Object-scoped access token for a specific liveboard", + "value": { + "token": "eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCJ9.example_object_token.signature", + "creation_time_in_millis": 1724277430000, + "expiration_time_in_millis": 1724277730000, + "scope": { + "access_type": "REPORT_BOOK_VIEW", + "org_id": 0, + "metadata_id": "f47ac10b-58cc-4372-a567-0e02b2c3d479" + }, + "valid_for_user_id": "59481331-ee53-42be-a548-bd87be6ddd4a", + "valid_for_username": "tsadmin" + } + }, + "example_2": { + "description": "Object-scoped token with JIT user provisioning", + "value": { + "token": "eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCJ9.example_jit_object_token.signature", + "creation_time_in_millis": 1724278000000, + "expiration_time_in_millis": 1724278300000, + "scope": { + "access_type": "REPORT_BOOK_VIEW", + "org_id": 0, + "metadata_id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890" + }, + "valid_for_user_id": "7e4c9f2a-8b5d-4a1e-9c3b-6d8e2f5a7b4c", + "valid_for_username": "new_user@example.com" + } + } } } } }, - "500": { - "description": "Operation failed", + "400": { + "description": "Invalid request.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" + }, + "examples": { + "invalid_request": { + "summary": "Invalid request", + "value": { + "error": { + "message": { + "code": 10002, + "incident_id_guid": "a1b2c3d4-e5f6-7890-abcd-ef1234567890", + "trace_id_guid": "a1b2c3d4-e5f6-7890-abcd-ef1234567890", + "debug": "Either secret_key or password must be provided." + } + } + } + } } } } - } - } - } - }, - "/api/rest/2.0/vcs/commits/{commit_id}/revert": { - "post": { - "operationId": "revertCommit", - "description": "Revert an object to a specific commit id", - "tags": [ - "Version Control" - ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "metadata": { - "description": "Metadata objects.", - "type": "array", - "items": { - "$ref": "#/components/schemas/MetadataObject" - }, - "deprecated": false - }, - "branch_name": { - "description": "Name of the branch where the reverted version should be comitted", - "type": "string", - "deprecated": false - } + }, + "401": { + "description": "Unauthorized access.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" }, - "required": [ - "metadata" - ] + "examples": { + "unauthorized_access": { + "summary": "Unauthorized access", + "value": { + "error": { + "message": { + "code": 10097, + "incident_id_guid": "b2c3d4e5-f678-9012-bcde-f23456789012", + "trace_id_guid": "b2c3d4e5-f678-9012-bcde-f23456789012", + "debug": "Invalid credentials. The provided secret key or password is incorrect." + } + } + } + } + } } } }, - "required": true - }, - "responses": { - "200": { + "403": { + "description": "Forbidden access.", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/CommitResponse" + "$ref": "#/components/schemas/ErrorResponse" + }, + "examples": { + "forbidden_access": { + "summary": "Forbidden access", + "value": { + "error": { + "message": { + "code": 10023, + "incident_id_guid": "c3d4e5f6-7890-1234-cdef-345678901234", + "trace_id_guid": "c3d4e5f6-7890-1234-cdef-345678901234", + "debug": "Trusted authentication is not enabled for this cluster or org." + } + } + } + } } } } }, "500": { - "description": "Operation failed", + "description": "Unexpected error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" + }, + "examples": { + "unexpected_error": { + "summary": "Unexpected error", + "value": { + "error": { + "message": { + "code": 10038, + "incident_id_guid": "d4e5f678-9012-3456-defa-456789012345", + "trace_id_guid": "d4e5f678-9012-3456-defa-456789012345", + "debug": "Unexpected server error while generating the object-scoped access token." + } + } + } + } } } } } }, - "parameters": [ - { - "in": "path", - "name": "commit_id", - "required": true, - "schema": { - "type": "string" - }, - "description": "Commit id to which the object should be reverted", - "deprecated": false - } - ] + "security": [] } }, - "/api/rest/2.0/vcs/branches/validate": { + "/api/rest/2.0/auth/session/login": { "post": { - "operationId": "validateMerge", - "description": "Before merging changes to target branch, pick the changes from source branch and validate the files", + "operationId": "login", + "description": "\n Version: 9.0.0.cl or later\n\nCreates a login session for a ThoughtSpot user with Basic authentication.\n\nIn Basic authentication method, REST clients log in to ThoughtSpot using `username` and `password` attributes. On a multi-tenant cluster with Orgs, users can pass the ID of the Org in the API request to log in to a specific Org context.\n\n**Note**: If Multi-Factor Authentication (MFA) is enabled on your instance, the API login request with basic authentication (`username` and `password` ) returns an error. Contact ThoughtSpot Support for assistance.\n\nA successful login returns a session cookie that can be used in your subsequent API requests.\n\n\n\n#### Endpoint URL\n", "tags": [ - "Version Control" + "Authentication", + "9.0.0.cl" ], "requestBody": { "content": { "application/json": { "schema": { - "type": "object", - "properties": { - "source_branch_name": { - "description": "Name of the branch from which changes need to be picked for validation", - "type": "string", - "deprecated": false - }, - "target_branch_name": { - "description": "Name of the branch where files will be merged", - "type": "string", - "deprecated": false - } - }, - "required": [ - "source_branch_name", - "target_branch_name" - ] + "$ref": "#/components/schemas/LoginRequest" } } }, "required": true }, + "parameters": [], "responses": { - "200": { + "204": { + "description": "User login successful." + }, + "400": { + "description": "Invalid request.", "content": { "application/json": { "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/DeployResponse" + "$ref": "#/components/schemas/ErrorResponse" + }, + "examples": { + "invalid_request": { + "summary": "Invalid request", + "value": { + "error": { + "message": { + "code": 10002, + "incident_id_guid": "a1b2c3d4-e5f6-7890-abcd-ef1234567890", + "trace_id_guid": "a1b2c3d4-e5f6-7890-abcd-ef1234567890", + "debug": "The specified org_identifier does not refer to a valid or accessible org." + } + } + } + } + } + } + } + }, + "401": { + "description": "Unauthorized access.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + }, + "examples": { + "unauthorized_access": { + "summary": "Unauthorized access", + "value": { + "error": { + "message": { + "code": 10097, + "incident_id_guid": "b2c3d4e5-f678-9012-bcde-f23456789012", + "trace_id_guid": "b2c3d4e5-f678-9012-bcde-f23456789012", + "debug": "Authentication failed. Verify that the username and password are correct." + } + } + } + } + } + } + } + }, + "403": { + "description": "Forbidden access.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + }, + "examples": { + "forbidden_access": { + "summary": "Forbidden access", + "value": { + "error": { + "message": { + "code": 10023, + "incident_id_guid": "c3d4e5f6-7890-1234-cdef-345678901234", + "trace_id_guid": "c3d4e5f6-7890-1234-cdef-345678901234", + "debug": "User account is inactive or locked." + } + } + } } } } } }, "500": { - "description": "Operation failed", + "description": "Unexpected error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" + }, + "examples": { + "unexpected_error": { + "summary": "Unexpected error", + "value": { + "error": { + "message": { + "code": 10038, + "incident_id_guid": "d4e5f678-9012-3456-defa-456789012345", + "trace_id_guid": "d4e5f678-9012-3456-defa-456789012345", + "debug": "Unexpected server error during login." + } + } + } + } } } } @@ -3906,1533 +3128,31530 @@ } } }, - "/api/rest/2.0/vcs/commits/deploy": { + "/api/rest/2.0/auth/session/logout": { "post": { - "operationId": "deployCommit", - "description": "Deploy changes to a Thoughtspot environment from a commit point\"", + "operationId": "logout", + "description": "\n Version: 9.0.0.cl or later\n\n\nLogs out a user from their current session.\n\n\n\n\n#### Endpoint URL\n", + "tags": [ + "Authentication", + "9.0.0.cl" + ], + "parameters": [], + "responses": { + "204": { + "description": "User logout successful." + }, + "400": { + "description": "Invalid request.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "401": { + "description": "Unauthorized access.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + }, + "examples": { + "unauthorized_access": { + "summary": "Unauthorized access", + "value": { + "error": { + "message": { + "code": 10097, + "incident_id_guid": "b2c3d4e5-f678-9012-bcde-f23456789012", + "trace_id_guid": "b2c3d4e5-f678-9012-bcde-f23456789012", + "debug": "No active session found. User is not logged in." + } + } + } + } + } + } + } + }, + "403": { + "description": "Forbidden access.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "500": { + "description": "Unexpected error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + }, + "examples": { + "unexpected_error": { + "summary": "Unexpected error", + "value": { + "error": { + "message": { + "code": 10038, + "incident_id_guid": "d4e5f678-9012-3456-defa-456789012345", + "trace_id_guid": "d4e5f678-9012-3456-defa-456789012345", + "debug": "Unexpected server error during logout." + } + } + } + } + } + } + } + } + } + } + }, + "/api/rest/2.0/auth/token/revoke": { + "post": { + "operationId": "revokeToken", + "description": "\n Version: 9.0.0.cl or later\n\n\nRevokes the authentication token issued for current user session.\n\nThe token of your current session expires when you make a call to the `/api/rest/2.0/auth/token/revoke` endpoint.\nthe users will not be able to access ThoughtSpot objects until a new token is obtained.\n\nTo restart your session, request for a new token from ThoughtSpot. See [Get Full Access Token](#/http/api-endpoints/authentication/get-full-access-token).\n\n\n\n\n#### Endpoint URL\n", "tags": [ - "Version Control" + "Authentication", + "9.0.0.cl" ], "requestBody": { "content": { "application/json": { "schema": { - "type": "object", - "properties": { - "import_type": { - "description": "Indicates if all files or only modified file at specified commit point should be considered", - "default": "DELTA", - "type": "string", - "enum": [ - "FULL", - "DELTA" - ], - "deprecated": false - }, - "commit_id": { - "description": "Commit_id against which the files should be picked to deploy", - "type": "string", - "deprecated": false - } - }, - "required": [ - "commit_id" - ] + "$ref": "#/components/schemas/RevokeTokenRequest" } } }, "required": true }, + "parameters": [], "responses": { - "200": { + "204": { + "description": "Token successfully revoked." + }, + "400": { + "description": "Invalid request.", "content": { "application/json": { "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/DeployResponse" + "$ref": "#/components/schemas/ErrorResponse" + }, + "examples": { + "invalid_request": { + "summary": "Invalid request", + "value": { + "error": { + "message": { + "code": 10002, + "incident_id_guid": "a1b2c3d4-e5f6-7890-abcd-ef1234567890", + "trace_id_guid": "a1b2c3d4-e5f6-7890-abcd-ef1234567890", + "debug": "Either user_identifier or token must be provided." + } + } + } + } + } + } + } + }, + "401": { + "description": "Unauthorized access.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + }, + "examples": { + "unauthorized_access": { + "summary": "Unauthorized access", + "value": { + "error": { + "message": { + "code": 10097, + "incident_id_guid": "b2c3d4e5-f678-9012-bcde-f23456789012", + "trace_id_guid": "b2c3d4e5-f678-9012-bcde-f23456789012", + "debug": "Authentication required to revoke a token." + } + } + } + } + } + } + } + }, + "403": { + "description": "Forbidden access.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + }, + "examples": { + "forbidden_access": { + "summary": "Forbidden access", + "value": { + "error": { + "message": { + "code": 10023, + "incident_id_guid": "c3d4e5f6-7890-1234-cdef-345678901234", + "trace_id_guid": "c3d4e5f6-7890-1234-cdef-345678901234", + "debug": "Insufficient privileges to revoke tokens for another user." + } + } + } } } } } }, "500": { - "description": "Operation failed", + "description": "Unexpected error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" + }, + "examples": { + "unexpected_error": { + "summary": "Unexpected error", + "value": { + "error": { + "message": { + "code": 10038, + "incident_id_guid": "d4e5f678-9012-3456-defa-456789012345", + "trace_id_guid": "d4e5f678-9012-3456-defa-456789012345", + "debug": "Unexpected server error while revoking the token." + } + } + } + } } } } } } } - } - }, - "components": { - "schemas": { - "ErrorResponse": { - "type": "object", - "properties": { - "error": { - "type": "object" - } - } - }, - "User": { - "type": "object", - "required": [ - "id", - "name", - "display_name", - "visibility" + }, + "/api/rest/2.0/auth/search": { + "post": { + "operationId": "searchAuthSettings", + "description": "\n Version: 26.6.0.cl or later\n\nVersion: 26.6.0.cl or later\n\nReturns the authentication configuration for the specified auth type at cluster and org level. Currently supports `TRUSTED_AUTH`.\n\n#### Required privileges\n\nRequires `ADMINISTRATION` (**Can administer ThoughtSpot**) or `CONTROL_TRUSTED_AUTH` (**Can Enable or Disable Trusted Authentication**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled, the `CONTROL_TRUSTED_AUTH` privilege is required.\n\n#### Usage guidelines\n\nUse `scope` to control which level of settings are returned:\n- `CLUSTER` — Returns cluster-level authentication status and access tokens. Accessible only from the Primary Org.\n- `ORG` — Returns org-level authentication status and access tokens for the current Org. Requires the per-Org authentication feature to be enabled on your instance.\n- If `scope` is omitted, both cluster and org-level settings are returned based on the caller's org context and feature availability.\n\nThe `access_tokens` array in `cluster_preferences` or `org_preferences` is omitted when no token is configured at that level.\n\n**Note**: Access tokens returned in the response are sensitive credentials. Treat them with the same care as passwords.\n\n\n\n\n#### Endpoint URL\n", + "tags": [ + "Authentication", + "26.6.0.cl" ], - "properties": { - "id": { - "type": "string", - "description": "Unique identifier of the user." - }, - "name": { - "type": "string", - "description": "Name of the user." - }, - "display_name": { - "type": "string", - "description": "Display name of the user." - }, - "visibility": { - "type": "string", - "enum": [ - "SHARABLE", - "NON_SHARABLE" - ], - "description": "Visibility of the users. The SHARABLE makes a users visible to other users and user groups, and thus allows them to share objects." - }, - "author_id": { - "type": "string", - "description": "Unique identifier of author of the user." - }, - "can_change_password": { - "type": "boolean", - "description": "Indicates whether the user can change their password." - }, - "complete_detail": { - "type": "boolean", - "description": "Indicates whether the response has complete detail of the user." + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SearchAuthSettingsRequest" + } + } }, - "creation_time_in_millis": { - "type": "number", - "format": "float", - "description": "Creation time of the user in milliseconds." + "required": true + }, + "parameters": [], + "responses": { + "200": { + "description": "Authentication settings retrieved successfully.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SearchAuthSettingsResponse" + }, + "examples": { + "example_1": { + "value": { + "auth_type": "TRUSTED_AUTH", + "cluster_preferences": { + "auth_status": "ENABLED", + "access_tokens": [ + { + "key": "a1b2c3d4-e5f6-7890-abcd-ef1234567890" + } + ] + }, + "org_preferences": [ + { + "org": { + "id": 583464508, + "name": "sales_org" + }, + "auth_status": "ENABLED", + "access_tokens": [ + { + "key": "f9e8d7c6-b5a4-3210-fedc-ba9876543210" + } + ] + } + ] + } + } + } + } + } }, - "current_org": { - "$ref": "#/components/schemas/Org", - "description": "Current logged in Organizations of the user." + "400": { + "description": "Invalid request.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + }, + "examples": { + "invalid_request": { + "summary": "Invalid request", + "value": { + "error": { + "message": { + "code": 10002, + "incident_id_guid": "a1b2c3d4-e5f6-7890-abcd-ef1234567890", + "trace_id_guid": "a1b2c3d4-e5f6-7890-abcd-ef1234567890", + "debug": "auth_type must be specified and currently only TRUSTED_AUTH is supported." + } + } + } + } + } + } + } }, - "deleted": { - "type": "boolean", - "description": "Indicates whether the user is deleted." + "401": { + "description": "Unauthorized access.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + }, + "examples": { + "unauthorized_access": { + "summary": "Unauthorized access", + "value": { + "error": { + "message": { + "code": 10097, + "incident_id_guid": "b2c3d4e5-f678-9012-bcde-f23456789012", + "trace_id_guid": "b2c3d4e5-f678-9012-bcde-f23456789012", + "debug": "Authentication required to retrieve authentication settings." + } + } + } + } + } + } + } }, - "deprecated": { - "type": "boolean", - "description": "Indicates whether the user is deprecated." + "403": { + "description": "Forbidden access.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + }, + "examples": { + "forbidden_access": { + "summary": "Forbidden access", + "value": { + "error": { + "message": { + "code": 10023, + "incident_id_guid": "c3d4e5f6-7890-1234-cdef-345678901234", + "trace_id_guid": "c3d4e5f6-7890-1234-cdef-345678901234", + "debug": "ADMINISTRATION or CONTROL_TRUSTED_AUTH privilege required to retrieve authentication settings." + } + } + } + } + } + } + } }, - "account_type": { - "type": "string", + "500": { + "description": "Unexpected error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + }, + "examples": { + "unexpected_error": { + "summary": "Unexpected error", + "value": { + "error": { + "message": { + "code": 10038, + "incident_id_guid": "d4e5f678-9012-3456-defa-456789012345", + "trace_id_guid": "d4e5f678-9012-3456-defa-456789012345", + "debug": "Unexpected server error while retrieving authentication settings." + } + } + } + } + } + } + } + } + } + } + }, + "/api/rest/2.0/auth/token/validate": { + "post": { + "operationId": "validateToken", + "description": "\n Version: 9.12.0.cl or later\n\n\nValidates the authentication token specified in the API request.\n\nIf your token is not valid, [Get a new token](#/http/api-endpoints/authentication/get-full-access-token).\n\n\n\n\n#### Endpoint URL\n", + "tags": [ + "Authentication", + "9.12.0.cl" + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ValidateTokenRequest" + } + } + }, + "required": true + }, + "parameters": [], + "responses": { + "200": { + "description": "Token validation successful.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/TokenValidationResponse" + }, + "examples": { + "example_1": { + "description": "Valid full-access token", + "value": { + "creation_time_in_millis": 1724277430000, + "expiration_time_in_millis": 1724277730000, + "scope": { + "access_type": "FULL", + "org_id": 0 + }, + "valid_for_user_id": "59481331-ee53-42be-a548-bd87be6ddd4a", + "token_type": "BEARER" + } + }, + "example_2": { + "description": "Valid object-scoped token", + "value": { + "creation_time_in_millis": 1724277430000, + "expiration_time_in_millis": 1724277730000, + "scope": { + "access_type": "REPORT_BOOK_VIEW", + "org_id": 0, + "metadata_id": "f47ac10b-58cc-4372-a567-0e02b2c3d479" + }, + "valid_for_user_id": "7e4c9f2a-8b5d-4a1e-9c3b-6d8e2f5a7b4c", + "token_type": "BEARER" + } + } + } + } + } + }, + "400": { + "description": "Invalid request.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + }, + "examples": { + "malformed_token": { + "summary": "Malformed token", + "description": "The token cannot be parsed. Both malformed and expired tokens return error code 10002 — the debug field distinguishes the root cause.", + "value": { + "error": { + "message": { + "code": 10002, + "incident_id_guid": "a1b2c3d4-e5f6-7890-abcd-ef1234567890", + "trace_id_guid": "a1b2c3d4-e5f6-7890-abcd-ef1234567890", + "debug": "The provided token is malformed and cannot be parsed." + } + } + } + }, + "expired_token": { + "summary": "Expired token", + "description": "The token signature is valid but the token has passed its expiration time. Both malformed and expired tokens return error code 10002 — the debug field distinguishes the root cause.", + "value": { + "error": { + "message": { + "code": 10002, + "incident_id_guid": "a1b2c3d4-e5f6-7890-abcf-ef1234567891", + "trace_id_guid": "a1b2c3d4-e5f6-7890-abcf-ef1234567891", + "debug": "The provided token has expired." + } + } + } + } + } + } + } + }, + "401": { + "description": "Unauthorized access.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + }, + "examples": { + "unauthorized_access": { + "summary": "Unauthorized access", + "value": { + "error": { + "message": { + "code": 10097, + "incident_id_guid": "b2c3d4e5-f678-9012-bcde-f23456789012", + "trace_id_guid": "b2c3d4e5-f678-9012-bcde-f23456789012", + "debug": "Authentication required to validate a token." + } + } + } + } + } + } + } + }, + "403": { + "description": "Forbidden access.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "500": { + "description": "Unexpected error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + }, + "examples": { + "unexpected_error": { + "summary": "Unexpected error", + "value": { + "error": { + "message": { + "code": 10038, + "incident_id_guid": "d4e5f678-9012-3456-defa-456789012345", + "trace_id_guid": "d4e5f678-9012-3456-defa-456789012345", + "debug": "Unexpected server error while validating the token." + } + } + } + } + } + } + } + } + } + } + }, + "/api/rest/2.0/collections/create": { + "post": { + "operationId": "createCollection", + "description": "\n Version: 26.4.0.cl or later\n\nCreates a new collection in ThoughtSpot.\n\nCollections allow you to organize and group related metadata objects such as Liveboards, Answers, worksheets, and other data objects. You can also create nested collections (sub-collections) to build a hierarchical structure.\n\n#### Supported operations\n\nThe API endpoint lets you perform the following operations:\n\n* Create a new collection\n* Add metadata objects (Liveboards, Answers, Logical Tables) to the collection\n* Create nested collections by adding sub-collections\n\n\n\n\n#### Endpoint URL\n", + "tags": [ + "Collections", + "26.4.0.cl" + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CreateCollectionRequest" + } + } + }, + "required": true + }, + "parameters": [], + "responses": { + "200": { + "description": "Collection created successfully", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Collection" + } + } + } + }, + "400": { + "description": "Invalid request.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "401": { + "description": "Unauthorized access.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "403": { + "description": "Forbidden access.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "500": { + "description": "Unexpected error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + } + } + } + }, + "/api/rest/2.0/collections/delete": { + "post": { + "operationId": "deleteCollection", + "description": "\n Version: 26.4.0.cl or later\n\nDeletes one or more collections from ThoughtSpot.\n\n#### Delete options\n\n* **delete_children**: When set to `true`, deletes the child objects (metadata items) within the collection that the user has access to. Objects that the user does not have permission to delete will be skipped.\n* **dry_run**: When set to `true`, performs a preview of the deletion operation without actually deleting anything. The response shows what would be deleted, allowing you to review before committing the deletion.\n\n#### Response\n\nThe response includes:\n* **metadata_deleted**: List of metadata objects that were successfully deleted\n* **metadata_skipped**: List of metadata objects that were skipped due to lack of permissions or other constraints\n\n\n\n\n#### Endpoint URL\n", + "tags": [ + "Collections", + "26.4.0.cl" + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/DeleteCollectionRequest" + } + } + }, + "required": true + }, + "parameters": [], + "responses": { + "200": { + "description": "Collections deleted successfully.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CollectionDeleteResponse" + } + } + } + }, + "400": { + "description": "Invalid request.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "401": { + "description": "Unauthorized access.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "403": { + "description": "Forbidden access.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "404": { + "description": "Resource not found.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "500": { + "description": "Unexpected error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + } + } + } + }, + "/api/rest/2.0/collections/search": { + "post": { + "operationId": "searchCollections", + "description": "\n Version: 26.4.0.cl or later\n\nGets a list of collections available in ThoughtSpot.\n\nTo get details of a specific collection, specify the collection GUID or name. You can also filter the API response based on the collection name pattern, author, and other criteria.\n\n#### Search options\n\n* **name_pattern**: Use '%' as a wildcard character to match collection names\n* **collection_identifiers**: Search for specific collections by their GUIDs or names\n* **include_metadata**: When set to `true`, includes the metadata objects within each collection in the response\n\n**NOTE**: If the API returns an empty list, consider increasing the value of the `record_size` parameter. To search across all available collections, set `record_size` to `-1`.\n\n\n\n\n#### Endpoint URL\n", + "tags": [ + "Collections", + "26.4.0.cl" + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SearchCollectionsRequest" + } + } + }, + "required": true + }, + "parameters": [], + "responses": { + "200": { + "description": "Successfully retrieved list of collections", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CollectionSearchResponse" + } + } + } + }, + "400": { + "description": "Invalid request.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "401": { + "description": "Unauthorized access.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "403": { + "description": "Forbidden access.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "500": { + "description": "Unexpected error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + } + } + } + }, + "/api/rest/2.0/collections/{collection_identifier}/update": { + "post": { + "operationId": "updateCollection", + "description": "\n Version: 26.4.0.cl or later\n\nUpdates an existing collection in ThoughtSpot.\n\n#### Supported operations\n\nThis API endpoint lets you perform the following operations:\n\n* Update collection name and description\n* Change visibility settings\n* Add metadata objects to the collection (operation: ADD)\n* Remove metadata objects from the collection (operation: REMOVE)\n* Replace all metadata objects in the collection (operation: REPLACE)\n\n#### Operation types\n\n* **ADD**: Adds the specified metadata objects to the existing collection without removing current items\n* **REMOVE**: Removes only the specified metadata objects from the collection\n* **REPLACE**: Replaces all existing metadata objects with the specified items (default behavior)\n\n\n\n\n#### Endpoint URL\n", + "tags": [ + "Collections", + "26.4.0.cl" + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UpdateCollectionRequest" + } + } + }, + "required": true + }, + "parameters": [ + { + "in": "path", + "name": "collection_identifier", + "required": true, + "schema": { + "type": "string" + }, + "description": "Unique GUID of the collection. Note: Collection names cannot be used as\nidentifiers since duplicate names are allowed." + } + ], + "responses": { + "204": { + "description": "Collection updated successfully. No content returned." + }, + "400": { + "description": "Invalid request.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "401": { + "description": "Unauthorized access.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "403": { + "description": "Forbidden access.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "404": { + "description": "Resource not found.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "500": { + "description": "Unexpected error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + } + } + } + }, + "/api/rest/2.0/connection-configurations/search": { + "post": { + "operationId": "connectionConfigurationSearch", + "description": "\n Version: 10.12.0.cl or later\n\nGets connection configuration objects.\n\nRequires `DATAMANAGEMENT` (**Can manage data**) and edit permissions to the connection object, or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege.\n\nIf [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) privilege is required.\n\n#### Usage guidelines\n* To get a list of all configurations available in the ThoughtSpot system, send the API request with only the connection name or GUID in the request body.\n* To fetch details of a configuration object, specify the configuration object name or GUID.\n\n\n\n\n#### Endpoint URL\n", + "tags": [ + "Connection Configurations", + "10.12.0.cl" + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ConnectionConfigurationSearchRequest" + } + } + }, + "required": true + }, + "parameters": [], + "responses": { + "200": { + "description": "Configuration fetched successfully.", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ConnectionConfigurationResponse" + } + } + } + } + }, + "400": { + "description": "Invalid request.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "401": { + "description": "Unauthorized access.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "403": { + "description": "Forbidden access.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "500": { + "description": "Unexpected error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + } + } + } + }, + "/api/rest/2.0/connection-configurations/create": { + "post": { + "operationId": "createConnectionConfiguration", + "description": "\n Version: 10.12.0.cl or later\n\nCreates an additional configuration to an existing connection to a data warehouse. \n\nRequires `DATAMANAGEMENT` (**Can manage data**) or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege.\n\nIf [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) privilege is required.\n\n#### Usage guidelines\n\n * A JSON map of configuration attributes in `configuration`. The following example shows the configuration attributes:\n ```\n {\n \"user\":\"DEV_USER\",\n \"password\":\"TestConn123\",\n \"role\":\"DEV\",\n \"warehouse\":\"DEV_WH\"\n }\n ```\n\n* If the `policy_type` is `PRINCIPALS`, then `policy_principals` is a required field.\n* If the `policy_type` is `PROCESSES`, then `policy_processes` is a required field.\n* If the `policy_type` is `NO_POLICY`, then `policy_principals` and `policy_processes` are not required fields.\n\n#### Parameterized Connection Support\nFor parameterized connections that use OAuth authentication, only the same_as_parent and policy_process_options attributes are allowed in the API request. These attributes are not applicable to connections that are not parameterized.\n\n\n\n\n\n#### Endpoint URL\n", + "tags": [ + "Connection Configurations", + "10.12.0.cl" + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CreateConnectionConfigurationRequest" + } + } + }, + "required": true + }, + "parameters": [], + "responses": { + "200": { + "description": "Connection configuration successfully created.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ConnectionConfigurationResponse" + } + } + } + }, + "400": { + "description": "Invalid request.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "401": { + "description": "Unauthorized access.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "403": { + "description": "Forbidden access.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "500": { + "description": "Unexpected error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + } + } + } + }, + "/api/rest/2.0/connection-configurations/delete": { + "post": { + "operationId": "deleteConnectionConfiguration", + "description": "\n Version: 10.12.0.cl or later\n\nDeletes connection configuration objects.\n\nRequires `DATAMANAGEMENT` (**Can manage data**) and edit permissions to the connection object, or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege.\n\nIf [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) privilege is required.\n\n\n\n\n#### Endpoint URL\n", + "tags": [ + "Connection Configurations", + "10.12.0.cl" + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/DeleteConnectionConfigurationRequest" + } + } + }, + "required": true + }, + "parameters": [], + "responses": { + "204": { + "description": "Connection Configurations successfully deleted." + }, + "400": { + "description": "Invalid request.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "401": { + "description": "Unauthorized access.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "403": { + "description": "Forbidden access.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "500": { + "description": "Unexpected error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + } + } + } + }, + "/api/rest/2.0/connection-configurations/{configuration_identifier}/update": { + "post": { + "operationId": "updateConnectionConfiguration", + "description": "\n Version: 10.12.0.cl or later\n\nUpdates a connection configuration object.\n\nRequires `DATAMANAGEMENT` (**Can manage data**) and edit permissions to the connection object, or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege.\n\nIf [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) privilege is required.\n\n#### Supported operations\nThis API endpoint lets you perform the following operations in a single API request:\n\n * Edit the name or description of the configuration\n * Edit the configuration properties\n * Edit the `policy_type`\n * Edit the type of authentication\n * Enable or disable a configuration\n\n#### Parameterized Connection Support\nFor parameterized oauth based connections, only the `same_as_parent` and `policy_process_options` attributes are allowed. These attributes are not applicable to connections that are not parameterized.\n\n **NOTE**: When updating a configuration where `disabled` is `true`, you must reset `disabled` to `true` in your update request payload. If not explicitly set again, the API will default `disabled` to `false`.\n\n\n\n\n#### Endpoint URL\n", + "tags": [ + "Connection Configurations", + "10.12.0.cl" + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UpdateConnectionConfigurationRequest" + } + } + }, + "required": true + }, + "parameters": [ + { + "in": "path", + "name": "configuration_identifier", + "required": true, + "schema": { + "type": "string" + }, + "description": "Unique ID or name of the configuration." + } + ], + "responses": { + "204": { + "description": "Connection configuration successfully updated." + }, + "400": { + "description": "Invalid request.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "401": { + "description": "Unauthorized access.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "403": { + "description": "Forbidden access.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "500": { + "description": "Unexpected error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + } + } + } + }, + "/api/rest/2.0/connection/create": { + "post": { + "operationId": "createConnection", + "description": "\n Version: 9.2.0.cl or later\n\nCreates a connection to a data warehouse for live query services.\n\nRequires `DATAMANAGEMENT` (**Can manage data**) or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege.\nIf [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) privilege is required.\n\n#### Create a connection without tables\n\nTo create a connection without tables:\n\n1. Pass these parameters in your API request.\n * Name of the connection.\n * Type of the data warehouse to connect to.\n * A JSON map of configuration attributes in `data_warehouse_config`. The following example shows the configuration attributes for a SnowFlake connection:\n ```\n {\n \"configuration\":{\n \"accountName\":\"thoughtspot_partner\",\n \"user\":\"tsadmin\",\n \"password\":\"TestConn123\",\n \"role\":\"sysadmin\",\n \"warehouse\":\"MEDIUM_WH\"\n },\n \"authenticationType\": \"SERVICE_ACCOUNT\",\n \"databases\": [\"DB1\", \"DB2\"],\n \"externalDatabases\":[\n\n ]\n }\n ```\n2. Set `validate` to `false`.\n\n**NOTE:** If the `authentication_type` is anything other than SERVICE_ACCOUNT, you must explicitly provide the authenticationType property in the payload. If you do not specify authenticationType, the API will default to SERVICE_ACCOUNT as the authentication type.\n\n#### Create a connection with tables\n\nIf [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) and `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` (**Can manage data models**) privilege is required.\n\nTo create a connection with tables:\n\n1. Pass these parameters in your API request.\n* Name of the connection.\n* Type of the data warehouse to connect to.\n* A JSON map of configuration attributes, database details, and table properties in `data_warehouse_config` as shown in the following example:\n ```\n {\n \"configuration\":{\n \"accountName\":\"thoughtspot_partner\",\n \"user\":\"tsadmin\",\n \"password\":\"TestConn123\",\n \"role\":\"sysadmin\",\n \"warehouse\":\"MEDIUM_WH\"\n },\n \"authenticationType\": \"SERVICE_ACCOUNT\",\n \"databases\": [\"DB1\", \"DB2\", \"AllDatatypes\"],\n \"externalDatabases\":[\n {\n \"name\":\"AllDatatypes\",\n \"isAutoCreated\":false,\n \"schemas\":[\n {\n \"name\":\"alldatatypes\",\n \"tables\":[\n {\n \"name\":\"allDatatypes\",\n \"type\":\"TABLE\",\n \"description\":\"\",\n \"selected\":true,\n \"linked\":true,\n \"columns\":[\n {\n \"name\":\"CNUMBER\",\n \"type\":\"INT64\",\n \"canImport\":true,\n \"selected\":true,\n \"isLinkedActive\":true,\n \"isImported\":false,\n \"tableName\":\"allDatatypes\",\n \"schemaName\":\"alldatatypes\",\n \"dbName\":\"AllDatatypes\"\n },\n {\n \"name\":\"CDECIMAL\",\n \"type\":\"INT64\",\n \"canImport\":true,\n \"selected\":true,\n \"isLinkedActive\":true,\n \"isImported\":false,\n \"tableName\":\"allDatatypes\",\n \"schemaName\":\"alldatatypes\",\n \"dbName\":\"AllDatatypes\"\n }\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n ```\n2. Set `validate` to `true`.\n\n**NOTE:** If the `authentication_type` is anything other than SERVICE_ACCOUNT, you must explicitly provide the authenticationType property in the payload. If you do not specify authenticationType, the API will default to SERVICE_ACCOUNT as the authentication type.\n\nThe optional `databases` property in `data_warehouse_config` accepts a list of database names. When specified, ThoughtSpot persists this list on the connection and uses it to scope metadata fetching to only the specified databases in subsequent table add and remove operations. If omitted, all databases in the data warehouse are accessible for metadata operations.\n\nThe `databases` and `externalDatabases` serve different purposes. `databases` is a flat list of database names that controls which databases are scanned during metadata operations. `externalDatabases` defines the full table hierarchy and determines which tables are linked into ThoughtSpot.\n\n\n\n\n#### Endpoint URL\n", + "tags": [ + "Connections", + "9.2.0.cl" + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CreateConnectionRequest" + } + } + }, + "required": true + }, + "parameters": [], + "responses": { + "200": { + "description": "Connection to the datasource successfully created.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CreateConnectionResponse" + } + } + } + }, + "400": { + "description": "Invalid request.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "401": { + "description": "Unauthorized access.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "403": { + "description": "Forbidden access.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "500": { + "description": "Unexpected error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + } + } + } + }, + "/api/rest/2.0/connection/delete": { + "post": { + "operationId": "deleteConnection", + "description": "\n Version: 9.2.0.cl or later\n\n\n**Important**: This endpoint is deprecated and will be removed from ThoughtSpot in September 2025. ThoughtSpot strongly recommends using the\n[Delete Connection V2](#/http/api-endpoints/connections/delete-connection-v2) endpoint to delete your connection objects. \n\n#### Usage guidelines\n\nDeletes a connection object.\n\nRequires `DATAMANAGEMENT` (**Can manage data**) and edit permissions to the connection object, or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege.\nIf [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) privilege is required.\n\n**Note**: If a connection has dependent objects, make sure you remove its associations before the delete operation.\n\n\n\n#### Endpoint URL\n", + "deprecated": true, + "tags": [ + "Connections", + "9.2.0.cl" + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/DeleteConnectionRequest" + } + } + }, + "required": true + }, + "parameters": [], + "responses": { + "204": { + "description": "Connection successfully deleted." + }, + "400": { + "description": "Invalid request.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "401": { + "description": "Unauthorized access.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "403": { + "description": "Forbidden access.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "500": { + "description": "Unexpected error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + } + } + } + }, + "/api/rest/2.0/connections/{connection_identifier}/delete": { + "post": { + "operationId": "deleteConnectionV2", + "description": "\n Version: 10.4.0.cl or later\n\nDeletes a connection object.\n\n**Note**: If a connection has dependent objects, make sure you remove its associations before the delete operation.\n\nRequires `DATAMANAGEMENT` (**Can manage data**) and edit permissions to the connection object, or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege.\nIf [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) privilege is required.\n\n\n\n\n#### Endpoint URL\n", + "tags": [ + "Connections", + "10.4.0.cl" + ], + "parameters": [ + { + "in": "path", + "name": "connection_identifier", + "required": true, + "schema": { + "type": "string" + }, + "description": "Unique ID or name of the connection." + } + ], + "responses": { + "204": { + "description": "Connection successfully deleted." + }, + "400": { + "description": "Invalid request.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "401": { + "description": "Unauthorized access.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "403": { + "description": "Forbidden access.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "500": { + "description": "Unexpected error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + } + } + } + }, + "/api/rest/2.0/connections/download-connection-metadata-changes/{connection_identifier}": { + "post": { + "operationId": "downloadConnectionMetadataChanges", + "description": "\n Version: 9.9.0.cl or later\n\nExports the difference in connection metadata between CDW and ThoughtSpot\n\nRequires `DATAMANAGEMENT` (**Can manage data**) privilege.\nIf [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the following Data control privileges may be required: \n- `CAN_MANAGE_CUSTOM_CALENDAR`(**Can manage custom calendars**)\n- `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**)\n- `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` (**Can manage data models**)\n\nTo download the connection metadata difference between ThoughtSpot and CDW, pass the connection GUID as `connection_identifier` in the API request.\n\n\n\n\n#### Endpoint URL\n", + "tags": [ + "Connections", + "9.9.0.cl" + ], + "parameters": [ + { + "in": "path", + "name": "connection_identifier", + "required": true, + "schema": { + "type": "string" + }, + "description": "GUID of the connection" + } + ], + "responses": { + "200": { + "description": "Export metadata changes.", + "content": { + "application/octet-stream": {} + } + }, + "400": { + "description": "Invalid request.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "401": { + "description": "Unauthorized access.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "403": { + "description": "Forbidden access.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "500": { + "description": "Unexpected error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + } + } + } + }, + "/api/rest/2.0/connections/fetch-connection-diff-status/{connection_identifier}": { + "post": { + "operationId": "fetchConnectionDiffStatus", + "description": "\n Version: 9.9.0.cl or later\n\nValidates the difference in connection metadata between CDW and ThoughtSpot.\n\nRequires `DATAMANAGEMENT` (**Can manage data**) privilege.\nIf [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the following Data control privileges may be required:\n\n- `CAN_MANAGE_CUSTOM_CALENDAR`(**Can manage custom calendars**)\n- `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**)\n- `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` (**Can manage data models**)\n\nReturns a boolean indicating whether there is any difference between the connection metadata at ThoughtSpot and CDW.\n\nTo get the connection metadata difference status, pass the connection GUID as `connection_identifier` in the API request.\n\n\n\n\n#### Endpoint URL\n", + "tags": [ + "Connections", + "9.9.0.cl" + ], + "parameters": [ + { + "in": "path", + "name": "connection_identifier", + "required": true, + "schema": { + "type": "string" + }, + "description": "GUID of the connection" + } + ], + "responses": { + "200": { + "description": "true/false", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/FetchConnectionDiffStatusResponse" + } + } + } + }, + "400": { + "description": "Invalid request.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "401": { + "description": "Unauthorized access.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "403": { + "description": "Forbidden access.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "500": { + "description": "Unexpected error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + } + } + } + }, + "/api/rest/2.0/connections/{connection_identifier}/revoke-refresh-tokens": { + "post": { + "operationId": "revokeRefreshTokens", + "description": "\n Version: 26.2.0.cl or later\n\nRevokes OAuth refresh tokens for users who no longer require access to a data warehouse connection.\nWhen a token is revoked, the affected user's session for that connection is terminated, and they must re-authenticate to regain access.\n\nRequires `ADMINISTRATION` (**Can administer ThoughtSpot**) or `DATAMANAGEMENT` (**Can manage data**) privileges.\nIf [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on the ThoughtSpot instance, users with `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) privilege can also make API requests to revoke tokens for connection users.\n\n#### Usage guidelines\n\nYou can specify different combinations of identifiers to control which refresh tokens are revoked.\n\n- **connection_identifier**: Revokes refresh tokens for all users of the connection, except the connection author.\n- **connection_identifier** and **user_identifiers**: Revokes refresh tokens only for the users specified in the request. If the name or ID of the connection author is included in the request, their token will also be revoked.\n- **connection_identifier** and **configuration_identifiers**: Revokes refresh tokens for all users on the specified configurations, except the configuration author.\n- **connection_identifier**, **configuration_identifiers**, and **user_identifiers**: Revokes refresh tokens for the specified users on the specified configurations.\n- **connection_identifier** and **org_identifiers**: Revokes refresh tokens for the specified Orgs. Applicable only for published connections.\n- **connection_identifier**, **org_identifiers**, and **user_identifiers**: Revokes refresh tokens for the specified users in the specified Orgs. Applicable only for published connections.\n\n**NOTE**: The `org_identifiers` parameter is only applicable for published connections. Using this parameter for unpublished connections will result in an error. Ensure that the connections are published before making the API request.\n\n\n\n\n#### Endpoint URL\n", + "tags": [ + "Connections", + "26.2.0.cl" + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/RevokeRefreshTokensRequest" + } + } + }, + "required": true + }, + "parameters": [ + { + "in": "path", + "name": "connection_identifier", + "required": true, + "schema": { + "type": "string" + }, + "description": "Unique ID or name of the connection whose refresh tokens need to be revoked. All the users associated with the connection will have their refresh tokens revoked except the author." + } + ], + "responses": { + "200": { + "description": "Token(s) successfully revoked.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/RevokeRefreshTokensResponse" + } + } + } + }, + "400": { + "description": "Invalid request.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "401": { + "description": "Unauthorized access.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "403": { + "description": "Forbidden access.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "404": { + "description": "Object not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "409": { + "description": "Conflict", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "500": { + "description": "Unexpected error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + } + } + } + }, + "/api/rest/2.0/connection/search": { + "post": { + "operationId": "searchConnection", + "description": "\n Version: 9.2.0.cl or later\n\nGets connection objects.\nRequires `DATAMANAGEMENT` (**Can manage data**) or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege.\nIf [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) privilege is required.\n\n- To get a list of all connections available in the ThoughtSpot system, send the API request without any attributes in the request body.\n- To get the connection objects for a specific type of data warehouse, specify the type in `data_warehouse_types`.\n- To fetch details of a connection object, specify the connection object GUID or name. The `name_pattern` attribute allows passing partial text with `%` for a wildcard match.\n- To get details of the database, schemas, tables, or columns from a data connection object, specify `data_warehouse_object_type`.\n- To get a specific database, schema, table, or column from a connection object, define the object type in `data_warehouse_object_type` and object properties in the `data_warehouse_objects` array. For example, to search for a column, you must pass the database, schema, and table names in the API request.\n Note that in the following example, object properties are set in a hierarchical order (`database` > `schema` > `table` > `column`).\n\n```\n{\n \"connections\": [\n {\n \"identifier\": \"b9d1f2ef-fa65-4a4b-994e-30fa2d57b0c2\",\n \"data_warehouse_objects\": [\n {\n \"database\": \"NEBULADEV\",\n \"schema\": \"INFORMATION_SCHEMA\",\n \"table\": \"APPLICABLE_ROLES\",\n \"column\": \"ROLE_NAME\"\n }\n ]\n }\n ],\n \"data_warehouse_object_type\": \"COLUMN\"\n}\n```\n\n- To fetch data by `configuration`, specify `data_warehouse_object_type`. For example, to fetch columns from the `DEVELOPMENT` database, specify the `data_warehouse_object_type` as `DATABASE` and define the `configuration` string as `{\"database\":\"DEVELOPMENT\"}`. To get column data for a specific table, specify the table, for example,`{\"database\":\"RETAILAPPAREL\",\"table\":\"PIPES\"}`.\n- To query connections by `authentication_type`, specify `data_warehouse_object_type`. Supported values for `authentication_type` are:\n - `SERVICE_ACCOUNT`: For connections that require service account credentials to authenticate to the Cloud Data Warehouse and fetch data.\n - `OAUTH`: For connections that require OAuth credentials to authenticate to the Cloud Data Warehouse and fetch data. Teradata, Oracle, and Presto Cloud Data Warehouses do not support the OAuth authentication type.\n - `IAM`: For connections that have the IAM OAuth set up. This authentication type is supported on Amazon Redshift connections only.\n - `EXTOAUTH`: For connections that have External OAuth set up. ThoughtSpot supports external [OAuth with Microsoft Azure Active Directory (AD)](https://docs.thoughtspot.com/cloud/latest/ connections-snowflake-azure-ad-oauth) and [Okta for Snowflake data connections](https://docs.thoughtspot.com/cloud/latest/connections-snowflake-okta-oauth).\n - `KEY_PAIR`: For connections that require Key Pair account credentials to authenticate to the Cloud Data Warehouse and fetch data. This authentication type is supported on Snowflake connections only.\n - `OAUTH_WITH_PKCE`: For connections that require OAuth with PKCE account credentials to authenticate to the Cloud Data Warehouse and fetch data. This authentication type is supported on Snowflake, Starburst, Databricks, Denodo connections only.\n - `EXTOAUTH_WITH_PKCE`: For connections that require External OAuth With PKCE account credentials to authenticate to the Cloud Data Warehouse and fetch data. This authentication type is supported on Snowflake connections only.\n - `OAUTH_WITH_PEZ`: For connections that require OAuth With PEZ account credentials to authenticate to the Cloud Data Warehouse and fetch data. This authentication type is supported on Amazon Redshift connections only.\n - `OAUTH_WITH_SERVICE_PRINCIPAL`: For connections that require OAuth With Service Principal account credentials to authenticate to the Cloud Data Warehouse and fetch data. This authentication type is supported on Databricks connections only.\n - `PERSONAL_ACCESS_TOKEN`: For connections that require Personal Access Token account credentials to authenticate to the Cloud Data Warehouse and fetch data. This authentication type is supported on Databricks connections only.\n - `OAUTH_CLIENT_CREDENTIALS`: For connections that require OAuth Client Credentials to authenticate to the Cloud Data Warehouse and fetch data. This authentication type is supported on Snowflake connections only.\n- To include more details about connection objects in the API response, set `include_details` to `true`.\n- You can also sort the output by field names and filter connections by tags.\n\n**NOTE**: When filtering connection records by parameters other than `data_warehouse_types` or `tag_identifiers`, ensure that you set `record_size` to `-1` and `record_offset` to `0` for precise results.\n\n\n\n\n#### Endpoint URL\n", + "tags": [ + "Connections", + "9.2.0.cl" + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SearchConnectionRequest" + } + } + }, + "required": true + }, + "parameters": [], + "responses": { + "200": { + "description": "List of connections to the datasource.", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/SearchConnectionResponse" + } + } + } + } + }, + "400": { + "description": "Invalid request.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "401": { + "description": "Unauthorized access.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "403": { + "description": "Forbidden access.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "500": { + "description": "Unexpected error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + } + } + } + }, + "/api/rest/2.0/connections/{connection_identifier}/resync-metadata": { + "post": { + "operationId": "syncMetadata", + "description": "\n Version: 26.5.0.cl or later\n\nSynchronizes connection metadata attributes from your Cloud Data Warehouse (CDW) with ThoughtSpot.\n\nRequires the `DATAMANAGEMENT` (**Can manage data**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` (**Can manage data models**) privilege is required.\n\n#### Usage guidelines\n\nTo synchronize attributes from a CDW, specify the connection GUID or name in the `connection_identifier` path parameter and `sync_attributes` in the request body. Default attribute is `[\"DESCRIPTION\"]`.\n\n##### Hierarchical schema\n\n* Connection: The connection object for the sync operation.\n* Tables: Tables for the sync operation. When no table is specified, all tables are synchronized.\n* Columns: If the table is specified, you can add the columns for the sync operation. If no columns are specified, all columns in the specified table are considered for the sync operation.\n\nTo set the scope for the sync operation:\n\n* Connection-level: To sync all tables and columns, pass an empty request body, or only the attributes in the request body.\n* Table-level: To synchronize specific tables and their columns, specify the table identifiers in the `tables` array.\n* Column-level: To synchronize specific columns, specify the table identifier as the key and column identifiers as the value in the `tables` array.\n\n```\n{\n \"tables\": [\n {\"table-guid-1\": [\"column-guid-1\", \"column-guid-2\"]},\n \"table-guid-2\"\n ],\n \"sync_attributes\": [\"DESCRIPTION\"]\n}\n```\n\n##### API response\n\nIf the sync operation is successful, the API returns the following information:\n\n* Status of the sync operation. For example, `SUCCESS`, `PARTIAL_SUCCESS`, or `NO_UPDATE`.\n* Number of tables and columns that were updated.\n* Number of tables and columns with the sync failed status when the overall sync status is `PARTIAL_SUCCESS`.\n* Message text indicating the sync results.\n\n\n\n\n#### Endpoint URL\n", + "tags": [ + "Connections", + "26.5.0.cl" + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SyncMetadataRequest" + } + } + }, + "required": true + }, + "parameters": [ + { + "in": "path", + "name": "connection_identifier", + "required": true, + "schema": { + "type": "string" + }, + "description": "Unique ID or name of the connection." + } + ], + "responses": { + "200": { + "description": "Metadata synced successfully.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SyncMetadataResponse" + } + } + } + }, + "400": { + "description": "Invalid request parameters or hierarchy.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "401": { + "description": "Unauthorized access.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "403": { + "description": "Forbidden access.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "404": { + "description": "Connection, table, or column not found.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "500": { + "description": "Unexpected error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + } + } + } + }, + "/api/rest/2.0/connection/update": { + "post": { + "operationId": "updateConnection", + "description": "\n Version: 9.2.0.cl or later\n\n**Important**: This endpoint is deprecated and will be removed from ThoughtSpot in September 2025. ThoughtSpot strongly recommends using the\n[Update connection V2](#/http/api-endpoints/connections/update-connection-v2) endpoint to update your connection objects.\n\n#### Usage guidelines\n\nUpdates a connection object. \n\nRequires `DATAMANAGEMENT` (**Can manage data**) and edit permissions to the connection object, or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege.\nIf [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) privilege is required.\n\nTo update a connection object, pass these parameters in your API request:\n\n1. GUID of the connection object.\n2. If you are updating tables or database schema of a connection object:\n a. Add the updated JSON map of metadata with database, schema, and tables in `data_warehouse_config`.\n b. Set `validate` to `true`.\n3. If you are updating a configuration attribute, connection name, or description, you can set `validate` to `false`.\n\n\n\n\n#### Endpoint URL\n", + "deprecated": true, + "tags": [ + "Connections", + "9.2.0.cl" + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UpdateConnectionRequest" + } + } + }, + "required": true + }, + "parameters": [], + "responses": { + "204": { + "description": "Connection successfully updated." + }, + "400": { + "description": "Invalid request.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "401": { + "description": "Unauthorized access.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "403": { + "description": "Forbidden access.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "500": { + "description": "Unexpected error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + } + } + } + }, + "/api/rest/2.0/connections/{connection_identifier}/status": { + "post": { + "operationId": "updateConnectionStatus", + "description": "\n Version: 26.6.0.cl or later\n\nActivates or deactivates a connection. A deactivated connection cannot be used for queries or operations until it is activated again.\n\nRequires `DATAMANAGEMENT` (**Can manage data**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) privilege is required. Only the connection owner or an administrator can perform this operation.\n\n#### Usage guidelines\n\nTo update the status of a connection, specify the connection GUID or name in the `connection_identifier` path parameter and the desired `status` in the request body.\n\n- **ACTIVATED**: Enables the connection. Queries and operations can resume on an activated connection.\n- **DEACTIVATED**: Disables the connection. It does not remove the connection metadata, but only makes the connection unavailable for queries and operations. You can reactivate a deactivated connection by setting \"status\": \"ACTIVATED\".\n\n\n\n\n\n#### Endpoint URL\n", + "tags": [ + "Connections", + "26.6.0.cl" + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UpdateConnectionStatusRequest" + } + } + }, + "required": true + }, + "parameters": [ + { + "in": "path", + "name": "connection_identifier", + "required": true, + "schema": { + "type": "string" + }, + "description": "Unique ID or name of the connection." + } + ], + "responses": { + "204": { + "description": "Connection status updated successfully." + }, + "400": { + "description": "Invalid request.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "401": { + "description": "Unauthorized access.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "403": { + "description": "Forbidden access.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "404": { + "description": "Object not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "500": { + "description": "Unexpected error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + } + } + } + }, + "/api/rest/2.0/connections/{connection_identifier}/update": { + "post": { + "operationId": "updateConnectionV2", + "description": "\n Version: 10.4.0.cl or later\n\nUpdates a connection object.\n\nRequires `DATAMANAGEMENT` (**Can manage data**) and edit permissions to the connection object, or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege.\nIf [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) privilege is required.\n\nTo update a connection object, pass these parameters in your API request:\n\n1. GUID of the connection object.\n2. If you are updating tables or database schema of a connection object:\n a. Add the updated JSON map of metadata with database, schema, and tables in `data_warehouse_config`.\n b. Set `validate` to `true`.\n \n **NOTE:** If the `authentication_type` is anything other than SERVICE_ACCOUNT, you must explicitly provide the authenticationType property in the payload. If you do not specify authenticationType, the API will default to SERVICE_ACCOUNT as the authentication type.\n\n * A JSON map of configuration attributes, database details, and table properties in `data_warehouse_config` as shown in the following example:\n * This is an example of updating a single table in a empty connection:\n \n ```\n {\n \"authenticationType\": \"SERVICE_ACCOUNT\",\n \"databases\": [\"DB2\", \"DB3\", \"DEVELOPMENT\"],\n \"externalDatabases\": [\n {\n \"name\": \"DEVELOPMENT\",\n \"isAutoCreated\": false,\n \"schemas\": [\n {\n \"name\": \"TS_dataset\",\n \"tables\": [\n {\n \"name\": \"DEMORENAME\",\n \"type\": \"TABLE\",\n \"description\": \"\",\n \"selected\": true,\n \"linked\": true,\n \"gid\": 0,\n \"datasetId\": \"-1\",\n \"subType\": \"\",\n \"reportId\": \"\",\n \"viewId\": \"\",\n \"columns\": [\n {\n \"name\": \"Col1\",\n \"type\": \"VARCHAR\",\n \"canImport\": true,\n \"selected\": true,\n \"description\": \"\",\n \"isLinkedActive\": true,\n \"isAggregate\": false\n },\n {\n \"name\": \"Col2\",\n \"type\": \"VARCHAR\",\n \"canImport\": true,\n \"selected\": true,\n \"description\": \"\",\n \"isLinkedActive\": true,\n \"isAggregate\": false\n },\n {\n \"name\": \"Col3\",\n \"type\": \"VARCHAR\",\n \"canImport\": true,\n \"selected\": true,\n \"description\": \"\",\n \"isLinkedActive\": true,\n \"isAggregate\": false\n },\n {\n \"name\": \"Col312\",\n \"type\": \"VARCHAR\",\n \"canImport\": true,\n \"selected\": true,\n \"description\": \"\",\n \"isLinkedActive\": true,\n \"isAggregate\": false\n },\n {\n \"name\": \"Col4\",\n \"type\": \"VARCHAR\",\n \"canImport\": true,\n \"selected\": true,\n \"description\": \"\",\n \"isLinkedActive\": true,\n \"isAggregate\": false\n }\n ],\n \"relationships\": []\n }\n ]\n }\n ]\n }\n ],\n \"configuration\": {\n \"password\": \"\",\n \"database\": \"DEVELOPMENT\",\n \"role\": \"DEV\",\n \"accountName\": \"thoughtspot_partner\",\n \"warehouse\": \"DEMO_WH\",\n \"user\": \"DEV_USER\"\n }\n }\n ```\n \n* This is an example of updating a single table in an existing connection with tables:\n \n ```\n {\n \"authenticationType\": \"SERVICE_ACCOUNT\",\n \"databases\": [\"DB2\", \"DB3\", \"DEVELOPMENT\"],\n \"externalDatabases\": [\n {\n \"name\": \"DEVELOPMENT\",\n \"isAutoCreated\": false,\n \"schemas\": [\n {\n \"name\": \"TS_dataset\",\n \"tables\": [\n {\n \"name\": \"CUSTOMER\",\n \"type\": \"TABLE\",\n \"description\": \"\",\n \"selected\": true,\n \"linked\": true,\n \"gid\": 0,\n \"datasetId\": \"-1\",\n \"subType\": \"\",\n \"reportId\": \"\",\n \"viewId\": \"\",\n \"columns\": [],\n \"relationships\": []\n },\n {\n \"name\": \"tpch5k_falcon_default_schema_users\",\n \"type\": \"TABLE\",\n \"description\": \"\",\n \"selected\": true,\n \"linked\": true,\n \"gid\": 0,\n \"datasetId\": \"-1\",\n \"subType\": \"\",\n \"reportId\": \"\",\n \"viewId\": \"\",\n \"columns\": [\n {\n \"name\": \"user_id\",\n \"type\": \"INT64\",\n \"canImport\": true,\n \"selected\": true,\n \"description\": \"\",\n \"isLinkedActive\": true,\n \"isAggregate\": false\n },\n {\n \"name\": \"product_id\",\n \"type\": \"INT64\",\n \"canImport\": true,\n \"selected\": true,\n \"description\": \"\",\n \"isLinkedActive\": true,\n \"isAggregate\": false\n },\n {\n \"name\": \"user_cost\",\n \"type\": \"INT64\",\n \"canImport\": true,\n \"selected\": true,\n \"description\": \"\",\n \"isLinkedActive\": true,\n \"isAggregate\": false\n }\n ],\n \"relationships\": []\n }\n ]\n }\n ]\n }\n ],\n \"configuration\": {\n \"password\": \"\",\n \"database\": \"DEVELOPMENT\",\n \"role\": \"DEV\",\n \"accountName\": \"thoughtspot_partner\",\n \"warehouse\": \"DEMO_WH\",\n \"user\": \"DEV_USER\"\n }\n }\n ```\n\n3. If you are updating a configuration attribute, connection name, or description, you can set `validate` to `false`.\n\n **NOTE:** If the `authentication_type` is anything other than SERVICE_ACCOUNT, you must explicitly provide the authenticationType property in the payload. If you do not specify authenticationType, the API will default to SERVICE_ACCOUNT as the authentication type.\n\n * A JSON map of configuration attributes in `data_warehouse_config`. The following example shows the configuration attributes for a Snowflake connection:\n ```\n {\n \"configuration\":{\n \"accountName\":\"thoughtspot_partner\",\n \"user\":\"tsadmin\",\n \"password\":\"TestConn123\",\n \"role\":\"sysadmin\",\n \"warehouse\":\"MEDIUM_WH\"\n },\n \"databases\":[\"DB1\", \"DB2\"],\n \"externalDatabases\":[\n\n ]\n }\n ```\n\nThe optional `databases` property in `data_warehouse_config` accepts a list of database names. When specified, ThoughtSpot persists this list on the connection and uses it to scope metadata fetching to only the specified databases in subsequent table add and remove operations. If omitted, all databases in the data warehouse are accessible for metadata operations.\n\nThe `databases` and `externalDatabases` serve different purposes. `databases` is a flat list of database names that controls which databases are scanned during metadata operations. `externalDatabases` defines the full table hierarchy and determines which tables are linked into ThoughtSpot.\n\n\n\n\n\n#### Endpoint URL\n", + "tags": [ + "Connections", + "10.4.0.cl" + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UpdateConnectionV2Request" + } + } + }, + "required": true + }, + "parameters": [ + { + "in": "path", + "name": "connection_identifier", + "required": true, + "schema": { + "type": "string" + }, + "description": "Unique ID or name of the connection." + } + ], + "responses": { + "204": { + "description": "Connection successfully updated." + }, + "400": { + "description": "Invalid request.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "401": { + "description": "Unauthorized access.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "403": { + "description": "Forbidden access.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "500": { + "description": "Unexpected error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + } + } + } + }, + "/api/rest/2.0/customization/custom-actions": { + "post": { + "operationId": "createCustomAction", + "description": "\n Version: 9.6.0.cl or later\n\nCreates a custom action that appears as a menu action on a saved Answer or Liveboard visualization.\n\nRequires `DEVELOPER` (**Has Developer privilege**) or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege.\nIf [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `DEVELOPER` (**Has developer privilege**) privilege is required.\n\n#### Usage Guidelines\n\nThe API lets you create the following types of custom actions:\n\n* URL-based action \n Allows pushing data to an external URL.\n* Callback action \n Triggers a callback to the host application and initiates a response payload on an embedded ThoughtSpot instance.\n\nBy default, custom actions are visible to only administrator or developer users. To make a custom action available to other users, and specify the groups in `group_identifiers`.\n\nBy default, the custom action is set as a _global_ action on all visualizations and saved Answers. To assign a custom action to specific Liveboard visualization, saved Answer, or Worksheet, set `visibility` to `false` in `default_action_config` property and specify the GUID or name of the object in `associate_metadata`.\n\nFor more information, see [Custom actions](https://developers.thoughtspot.com/docs/custom-action-intro).\n\n\n\n\n#### Endpoint URL\n", + "tags": [ + "Custom Action", + "9.6.0.cl" + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CreateCustomActionRequest" + } + } + }, + "required": true + }, + "parameters": [], + "responses": { + "200": { + "description": "Custom action created successfully.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ResponseCustomAction" + }, + "examples": { + "example_1": { + "value": { + "action_details": { + "CALLBACK": { + "reference": "customaction" + } + }, + "default_action_config": { + "visibility": true + }, + "id": "3d3cad0f-e57b-4faa-8e24-da596c727ee0", + "metadata_association": [], + "name": "customactionsample", + "user_groups": [] + } + } + } + } + } + }, + "400": { + "description": "Invalid request.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + }, + "examples": { + "invalid_request": { + "summary": "Invalid request", + "value": { + "error": { + "message": { + "code": 10002, + "incident_id_guid": "a1b2c3d4-e5f6-7890-abcd-ef1234567890", + "trace_id_guid": "a1b2c3d4-e5f6-7890-abcd-ef1234567890", + "debug": "A custom action with the same name already exists. The custom action name must be unique." + } + } + } + } + } + } + } + }, + "401": { + "description": "Unauthorized access.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + }, + "examples": { + "unauthorized_access": { + "summary": "Unauthorized access", + "value": { + "error": { + "message": { + "code": 10097, + "incident_id_guid": "b2c3d4e5-f678-9012-bcde-f23456789012", + "trace_id_guid": "b2c3d4e5-f678-9012-bcde-f23456789012", + "debug": "Authentication required to create a custom action." + } + } + } + } + } + } + } + }, + "403": { + "description": "Forbidden access.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + }, + "examples": { + "forbidden_access": { + "summary": "Forbidden access", + "value": { + "error": { + "message": { + "code": 10023, + "incident_id_guid": "c3d4e5f6-7890-1234-cdef-345678901234", + "trace_id_guid": "c3d4e5f6-7890-1234-cdef-345678901234", + "debug": "Insufficient privileges to create custom actions." + } + } + } + } + } + } + } + }, + "500": { + "description": "Unexpected error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + }, + "examples": { + "unexpected_error": { + "summary": "Unexpected error", + "value": { + "error": { + "message": { + "code": 10038, + "incident_id_guid": "d4e5f678-9012-3456-defa-456789012345", + "trace_id_guid": "d4e5f678-9012-3456-defa-456789012345", + "debug": "Unexpected server error while creating the custom action." + } + } + } + } + } + } + } + } + } + } + }, + "/api/rest/2.0/customization/custom-actions/{custom_action_identifier}/delete": { + "post": { + "operationId": "deleteCustomAction", + "description": "\n Version: 9.6.0.cl or later\n\nRemoves the custom action specified in the API request.\n\nRequires `DEVELOPER` (**Has Developer privilege**) or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege.\nIf [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `DEVELOPER` (**Has developer privilege**) privilege is required.\n\n\n\n\n#### Endpoint URL\n", + "tags": [ + "Custom Action", + "9.6.0.cl" + ], + "parameters": [ + { + "in": "path", + "name": "custom_action_identifier", + "required": true, + "schema": { + "type": "string" + }, + "description": "Unique ID or name of the custom action." + } + ], + "responses": { + "204": { + "description": "Custom action is successfully deleted." + }, + "400": { + "description": "Invalid request.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + }, + "examples": { + "invalid_request": { + "summary": "Invalid request", + "value": { + "error": { + "message": { + "code": 10002, + "incident_id_guid": "a1b2c3d4-e5f6-7890-abcd-ef1234567890", + "trace_id_guid": "a1b2c3d4-e5f6-7890-abcd-ef1234567890", + "debug": "Custom action with the specified identifier was not found." + } + } + } + } + } + } + } + }, + "401": { + "description": "Unauthorized access.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + }, + "examples": { + "unauthorized_access": { + "summary": "Unauthorized access", + "value": { + "error": { + "message": { + "code": 10097, + "incident_id_guid": "b2c3d4e5-f678-9012-bcde-f23456789012", + "trace_id_guid": "b2c3d4e5-f678-9012-bcde-f23456789012", + "debug": "Authentication required to delete a custom action." + } + } + } + } + } + } + } + }, + "403": { + "description": "Forbidden access.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + }, + "examples": { + "forbidden_access": { + "summary": "Forbidden access", + "value": { + "error": { + "message": { + "code": 10023, + "incident_id_guid": "c3d4e5f6-7890-1234-cdef-345678901234", + "trace_id_guid": "c3d4e5f6-7890-1234-cdef-345678901234", + "debug": "Insufficient privileges to delete custom actions." + } + } + } + } + } + } + } + }, + "500": { + "description": "Unexpected error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + }, + "examples": { + "unexpected_error": { + "summary": "Unexpected error", + "value": { + "error": { + "message": { + "code": 10038, + "incident_id_guid": "d4e5f678-9012-3456-defa-456789012345", + "trace_id_guid": "d4e5f678-9012-3456-defa-456789012345", + "debug": "Unexpected server error while deleting the custom action." + } + } + } + } + } + } + } + } + } + } + }, + "/api/rest/2.0/customization/custom-actions/search": { + "post": { + "operationId": "searchCustomActions", + "description": "\n Version: 9.6.0.cl or later\n\nGets custom actions configured on the cluster.\n\nRequires `DEVELOPER` (**Has Developer privilege**) or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege.\nIf [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `DEVELOPER` (**Has developer privilege**) privilege is required.\n\n\n\n\n#### Endpoint URL\n", + "tags": [ + "Custom Action", + "9.6.0.cl" + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SearchCustomActionsRequest" + } + } + }, + "required": true + }, + "parameters": [], + "responses": { + "200": { + "description": "Custom action search is successful.", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ResponseCustomAction" + } + }, + "examples": { + "example_1": { + "value": [ + { + "action_details": { + "CALLBACK": { + "reference": "LEDE" + } + }, + "default_action_config": { + "visibility": true + }, + "id": "c59262df-cf9e-4947-96fa-52d494688797", + "name": "LEDE" + } + ] + } + } + } + } + }, + "400": { + "description": "Invalid request.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + }, + "examples": { + "invalid_request": { + "summary": "Invalid request", + "value": { + "error": { + "message": { + "code": 10002, + "incident_id_guid": "a1b2c3d4-e5f6-7890-abcd-ef1234567890", + "trace_id_guid": "a1b2c3d4-e5f6-7890-abcd-ef1234567890", + "debug": "Custom action identifier is invalid or malformed." + } + } + } + } + } + } + } + }, + "401": { + "description": "Unauthorized access.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + }, + "examples": { + "unauthorized_access": { + "summary": "Unauthorized access", + "value": { + "error": { + "message": { + "code": 10097, + "incident_id_guid": "b2c3d4e5-f678-9012-bcde-f23456789012", + "trace_id_guid": "b2c3d4e5-f678-9012-bcde-f23456789012", + "debug": "Authentication required to search custom actions." + } + } + } + } + } + } + } + }, + "403": { + "description": "Forbidden access.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "500": { + "description": "Unexpected error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + }, + "examples": { + "unexpected_error": { + "summary": "Unexpected error", + "value": { + "error": { + "message": { + "code": 10038, + "incident_id_guid": "d4e5f678-9012-3456-defa-456789012345", + "trace_id_guid": "d4e5f678-9012-3456-defa-456789012345", + "debug": "Unexpected server error while searching custom actions." + } + } + } + } + } + } + } + } + } + } + }, + "/api/rest/2.0/customization/custom-actions/{custom_action_identifier}/update": { + "post": { + "operationId": "updateCustomAction", + "description": "\n Version: 9.6.0.cl or later\n\nUpdates a custom action.\n\nRequires `DEVELOPER` (**Has Developer privilege**) or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege.\nIf [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `DEVELOPER` (**Has developer privilege**) privilege is required.\n\n#### Usage Guidelines\n\nThe API allows you to modify the following properties:\n\n* Name of the custom action\n* Action availability to groups\n* Association to metadata objects\n* Authentication settings for a URL-based action\n\nFor more information, see [Custom actions](https://developers.thoughtspot.com/docs/custom-action-intro).\n\n\n\n\n#### Endpoint URL\n", + "tags": [ + "Custom Action", + "9.6.0.cl" + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UpdateCustomActionRequest" + } + } + }, + "required": true + }, + "parameters": [ + { + "in": "path", + "name": "custom_action_identifier", + "required": true, + "schema": { + "type": "string" + }, + "description": "Unique ID or name of the custom action." + } + ], + "responses": { + "204": { + "description": "Custom action updated successfully." + }, + "400": { + "description": "Invalid request.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + }, + "examples": { + "invalid_request": { + "summary": "Invalid request", + "value": { + "error": { + "message": { + "code": 10002, + "incident_id_guid": "a1b2c3d4-e5f6-7890-abcd-ef1234567890", + "trace_id_guid": "a1b2c3d4-e5f6-7890-abcd-ef1234567890", + "debug": "Custom action with the specified identifier was not found." + } + } + } + } + } + } + } + }, + "401": { + "description": "Unauthorized access.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + }, + "examples": { + "unauthorized_access": { + "summary": "Unauthorized access", + "value": { + "error": { + "message": { + "code": 10097, + "incident_id_guid": "b2c3d4e5-f678-9012-bcde-f23456789012", + "trace_id_guid": "b2c3d4e5-f678-9012-bcde-f23456789012", + "debug": "Authentication required to update a custom action." + } + } + } + } + } + } + } + }, + "403": { + "description": "Forbidden access.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + }, + "examples": { + "forbidden_access": { + "summary": "Forbidden access", + "value": { + "error": { + "message": { + "code": 10023, + "incident_id_guid": "c3d4e5f6-7890-1234-cdef-345678901234", + "trace_id_guid": "c3d4e5f6-7890-1234-cdef-345678901234", + "debug": "Insufficient privileges to update custom actions." + } + } + } + } + } + } + } + }, + "500": { + "description": "Unexpected error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + }, + "examples": { + "unexpected_error": { + "summary": "Unexpected error", + "value": { + "error": { + "message": { + "code": 10038, + "incident_id_guid": "d4e5f678-9012-3456-defa-456789012345", + "trace_id_guid": "d4e5f678-9012-3456-defa-456789012345", + "debug": "Unexpected server error while updating the custom action." + } + } + } + } + } + } + } + } + } + } + }, + "/api/rest/2.0/calendars/create": { + "post": { + "operationId": "createCalendar", + "description": "\n Version: 10.12.0.cl or later\n\nCreates a new [custom calendar](https://docs.thoughtspot.com/cloud/latest/connections-cust-cal).\n\nRequires `DATAMANAGEMENT` (**Can manage data**) or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege.\nIf [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your ThoughtSpot instance, the `CAN_MANAGE_CUSTOM_CALENDAR` (**Can manage custom calendars**) privilege is required.\n\n\n#### Usage guidelines\n\nYou can create a custom calendar from scratch or an existing Table in ThoughtSpot. For both methods of calendar creation, the following parameters are required:\n\n* Name of the custom calendar.\n* Calendar creation method. To create a calendar from an existing table, specify the method:\n\n - `FROM_EXISTING_TABLE` - Creates calendar from the table reference provided in the API request.\n - `FROM_INPUT_PARAMS` - Creates a calendar from the parameters defined in the API request.\n\n* Connection ID and Table name\n* Database and schema name attributes:\n For most Cloud Data Warehouse (CDW) connectors, both `database_name` and `schema_name` attributes are required. \n However, the attribute requirements are conditional and vary based on the connector type and its metadata structure. For example, for connectors such as Teradata, MySQL, SingleSore, Amazon Aurora MySQL, Amazon RDS MySQL, Oracle, and GCP_MYSQL, the `schema_name` is required, whereas the `database_name` attribute is not.\n Similarly, connectors such as ClickHouse require you to specify the `database_name` and the schema specification in such cases is optional.\n\n**NOTE**: If you are creating a calendar from an existing table, ensure that the referenced table matches the required DDL for custom calendars. If the schema does not match, the API returns an error.\n\n##### Calendar type\nThe API allows you to create the following types of calendars:\n\n* `MONTH_OFFSET`. The default calendar type. A `MONTH_OFFSET` calendar is offset by a few months from the standard calendar months (January to December) and the year begins with the month defined in the request. For example, if the `month_offset` value is set as `April`, the calendar year begins in April.\n\n* `4-4-5`. Each quarter in the calendar will include two 4-week months followed by one 5-week month.\n* `4-5-4`. Each quarter in the calendar will include two 4-week months with a 5-week month between.\n* `5-4-4`. Each quarter begins with a 5-week month, followed by two 4-week months.\n\nTo start and end the calendar on a specific date, specify the dates in the `MM/DD/YYYY` format. For `MONTH_OFFSET` calendars, ensure that the `start_date` matches the month specified in the `month_offset` attribute.\n\nYou can also set the starting day of the week and customize the prefixes for year and quarter labels.\n\n#### Examples\n\nTo create a calendar from an existing table:\n\n```\n{\n \"name\": \"MyCustomCalendar1\",\n \"table_reference\": {\n \"connection_identifier\": \"4db8ea22-2ff4-4224-b05a-26674717e468\",\n \"table_name\": \"MyCalendarTable\",\n \"database_name\": \"RETAILAPPAREL\",\n \"schema_name\": \"PUBLIC\"\n },\n \"creation_method\": \"FROM_EXISTING_TABLE\",\n}\n```\n\nTo create a calendar from scratch:\n\n```\n{\n \"name\": \"MyCustomCalendar1\",\n \"table_reference\": {\n \"connection_identifier\": \"4db8ea22-2ff4-4224-b05a-26674717e468\",\n \"table_name\": \"MyCalendarTable\",\n \"database_name\": \"RETAILAPPAREL\",\n \"schema_name\": \"PUBLIC\"\n },\n \"creation_method\": \"FROM_INPUT_PARAMS\",\n \"calendar_type\": \"MONTH_OFFSET\",\n \"month_offset\": \"April\",\n \"start_day_of_week\": \"Monday\",\n \"quarter_name_prefix\": \"Q\",\n \"year_name_prefix\": \"FY\",\n \"start_date\": \"04/01/2025\",\n \"end_date\": \"04/31/2025\"\n}\n```\n\n\n\n\n#### Endpoint URL\n", + "tags": [ + "Custom Calendars", + "10.12.0.cl" + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CreateCalendarRequest" + } + } + }, + "required": true + }, + "parameters": [], + "responses": { + "200": { + "description": "Custom calendar created successfully.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CalendarResponse" + } + } + } + }, + "400": { + "description": "Invalid request.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "401": { + "description": "Unauthorized access.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "403": { + "description": "Forbidden access.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "500": { + "description": "Unexpected error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + } + } + } + }, + "/api/rest/2.0/calendars/{calendar_identifier}/delete": { + "post": { + "operationId": "deleteCalendar", + "description": "\n Version: 10.12.0.cl or later\n\nDeletes a [custom calendar](https://docs.thoughtspot.com/cloud/latest/connections-cust-cal).\n\nRequires `DATAMANAGEMENT` (**Can manage data**) or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege.\nIf [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your ThoughtSpot instance, the `CAN_MANAGE_CUSTOM_CALENDAR` (**Can manage custom calendars**) privilege is required.\n\n#### Usage guidelines\nTo delete a custom calendar, specify the calendar ID as a path parameter in the request URL. \n\n\n\n\n#### Endpoint URL\n", + "tags": [ + "Custom Calendars", + "10.12.0.cl" + ], + "parameters": [ + { + "in": "path", + "name": "calendar_identifier", + "required": true, + "schema": { + "type": "string" + }, + "description": "Unique ID or name of the Calendar." + } + ], + "responses": { + "204": { + "description": "Custom calendar successfully deleted." + }, + "400": { + "description": "Invalid request.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "401": { + "description": "Unauthorized access.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "403": { + "description": "Forbidden access.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "500": { + "description": "Unexpected error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + } + } + } + }, + "/api/rest/2.0/calendars/generate-csv": { + "post": { + "operationId": "generateCSV", + "description": "\n Version: 10.12.0.cl or later\n\nExports a [custom calendar](https://docs.thoughtspot.com/cloud/latest/connections-cust-cal) in the CSV format.\n\nRequires `DATAMANAGEMENT` (**Can manage data**) or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege.\nIf [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your ThoughtSpot instance, the `CAN_MANAGE_CUSTOM_CALENDAR` (**Can manage custom calendars**) privilege is required.\n\n#### Usage guidelines\n\nUse this API to download a custom calendar in the CSV file format. In your API request, specify the following parameters.\n\n* Start and end date of the calendar. For \"month offset\" calendars, the start date must match the month defined in the `month_offset` attribute.\n\nYou can also specify optional parameters such as the starting day of the week and prefixes for the quarter and year labels.\n\n\n\n\n#### Endpoint URL\n", + "tags": [ + "Custom Calendars", + "10.12.0.cl" + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/GenerateCSVRequest" + } + } + }, + "required": true + }, + "parameters": [], + "responses": { + "200": { + "description": "Generate custom calendar data based on specifications, as a CSV file.", + "content": { + "application/json": { + "schema": { + "type": "object" + } + } + } + }, + "400": { + "description": "Invalid request.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "401": { + "description": "Unauthorized access.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "403": { + "description": "Forbidden access.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "500": { + "description": "Unexpected error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + } + } + } + }, + "/api/rest/2.0/calendars/search": { + "post": { + "operationId": "searchCalendars", + "description": "\n Version: 10.12.0.cl or later\n\nGets a list of [custom calendars](https://docs.thoughtspot.com/cloud/latest/connections-cust-cal).\n\nRequires `DATAMANAGEMENT` (**Can manage data**) or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege.\nIf [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your ThoughtSpot instance, the `CAN_MANAGE_CUSTOM_CALENDAR` (**Can manage custom calendars**) privilege is required.\n\n#### Usage guidelines\n\nBy default, the API returns a list of custom calendars for all connection objects. To retrieve custom calendar details for a particular connection, specify the connection ID. You can also use other search parameters such as `name_pattern` and `sort_options` as search filters.\n\nThe `name_pattern` parameter filters and returns only those objects that match the specified pattern. Use `%` as a wildcard for pattern matching.\n\n\n\n\n#### Endpoint URL\n", + "tags": [ + "Custom Calendars", + "10.12.0.cl" + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SearchCalendarsRequest" + } + } + }, + "required": true + }, + "parameters": [], + "responses": { + "200": { + "description": "Custom calendar fetched successfully.", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/CalendarResponse" + } + } + } + } + }, + "400": { + "description": "Invalid request.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "401": { + "description": "Unauthorized access.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "403": { + "description": "Forbidden access.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "500": { + "description": "Unexpected error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + } + } + } + }, + "/api/rest/2.0/calendars/{calendar_identifier}/update": { + "post": { + "operationId": "updateCalendar", + "description": "\n Version: 10.12.0.cl or later\n\nUpdates the properties of a [custom calendar](https://docs.thoughtspot.com/cloud/latest/connections-cust-cal).\n\nRequires `DATAMANAGEMENT` (**Can manage data**) or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege.\nIf [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your ThoughtSpot instance, the `CAN_MANAGE_CUSTOM_CALENDAR` (**Can manage custom calendars**) privilege is required.\n\n#### Usage guidelines\n\nYou can update the properties of a calendar using one of the following methods:\n* `FROM_INPUT_PARAMS` to update the calendar properties with the values defined in the API request.\n* `FROM_EXISTING_TABLE` Creates a calendar from the parameters defined in the API request.\n\nTo update a custom calendar, specify the calendar ID as a path parameter in the request URL and the following parameters in the request body: \n\n* Connection ID and Table name\n* Database and schema name attributes:\n For most Cloud Data Warehouse (CDW) connectors, both `database_name` and `schema_name` attributes are required. \n However, the attribute requirements are conditional and vary based on the connector type and its metadata structure. For example, for connectors such as Teradata, MySQL, SingleSore, Amazon Aurora MySQL, Amazon RDS MySQL, Oracle, and GCP_MYSQL, the `schema_name` is required, whereas the `database_name` attribute is not.\n Similarly, connectors such as ClickHouse require you to specify the `database_name` and the schema specification in such cases is optional.\n\nThe API allows you to modify the calendar type, month offset value, start and end date, starting day of the week, and prefixes assigned to the year and quarter labels. \n\n#### Examples\n\nUpdate a custom calendar using an existing Table in ThoughtSpot:\n\n```\n{\n \"update_method\": \"FROM_EXISTING_TABLE\",\n \"table_reference\": {\n \"connection_identifier\": \"Connection1\",\n \"database_name\": \"db1\",\n \"table_name\": \"custom_calendar_2025\",\n \"schame_name\": \"schemaVar\"\n }\n}\n```\n\nUpdate a custom calendar with the attributes defined in the API request:\n\n```\n{\n \"update_method\": \"FROM_INPUT_PARAMS\",\n \"table_reference\": {\n \"connection_identifier\": \"Connection1\",\n \"database_name\": \"db1\",\n \"table_name\": \"custom_calendar_2025\",\n \"schame_name\": \"schemaVar\"\n },\n \"month_offset\": \"August\",\n \"start_day_of_week\": \"Monday\",\n \"start_date\": \"08/01/2025\",\n \"end_date\": \"07/31/2026\"\n}\n```\n\n\n\n\n#### Endpoint URL\n", + "tags": [ + "Custom Calendars", + "10.12.0.cl" + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UpdateCalendarRequest" + } + } + }, + "required": true + }, + "parameters": [ + { + "in": "path", + "name": "calendar_identifier", + "required": true, + "schema": { + "type": "string" + }, + "description": "Unique Id or name of the calendar." + } + ], + "responses": { + "204": { + "description": "Custom calendar updated successfully." + }, + "400": { + "description": "Invalid request.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "401": { + "description": "Unauthorized access.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "403": { + "description": "Forbidden access.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "500": { + "description": "Unexpected error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + } + } + } + }, + "/api/rest/2.0/metadata/answer/data": { + "post": { + "operationId": "fetchAnswerData", + "description": "\n Version: 9.0.0.cl or later\n\nFetches data from a saved Answer.\n\nRequires at least view access to the saved Answer. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled, the `CAN_DOWNLOAD_DETAILED_DATA` (**Can download detailed data**) privilege is also required.\n\nThe `record_size` attribute determines the number of records to retrieve in an API call. For more information about pagination, record size, and maximum row limit, see [Pagination and record size settings](https://developers.thoughtspot.com/docs/fetch-data-and-report-apis#_pagination_settings_for_data_and_report_apis).\n\n\n\n#### Endpoint URL\n", + "tags": [ + "Data", + "9.0.0.cl" + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/FetchAnswerDataRequest" + } + } + }, + "required": true + }, + "parameters": [], + "responses": { + "200": { + "description": "Fetching data of specified metadata object is successful.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/AnswerDataResponse" + } + } + } + }, + "400": { + "description": "Invalid request.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "401": { + "description": "Unauthorized access.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "403": { + "description": "Forbidden access.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "500": { + "description": "Unexpected error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + } + } + } + }, + "/api/rest/2.0/metadata/liveboard/data": { + "post": { + "operationId": "fetchLiveboardData", + "description": "\n Version: 9.0.0.cl or later\n\nGets data from a Liveboard object and its visualization. \n\nRequires at least view access to the Liveboard. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled, the `CAN_DOWNLOAD_DETAILED_DATA` (**Can download detailed data**) privilege is also required.\n\n#### Usage guidelines\n\nIn the request body, specify the GUID or name of the Liveboard. To get data for specific visualizations, add the GUIDs or names of the visualizations in the API request.\n\nTo include unsaved changes in the report, pass the `transient_pinboard_content` script generated from the `getExportRequestForCurrentPinboard` method in the Visual Embed SDK. Upon successful execution, the API returns the report with unsaved changes. If the new Liveboard experience mode, the transient content includes ad hoc changes to visualizations such as sorting, toggling of legends, and data drill down.\n\nFor more information, and see [Liveboard data API](https://developers.thoughtspot.com/docs/fetch-data-and-report-apis#_fetch_liveboard_data_api).\n\n\n\n#### Endpoint URL\n", + "tags": [ + "Data", + "9.0.0.cl" + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/FetchLiveboardDataRequest" + } + } + }, + "required": true + }, + "parameters": [], + "responses": { + "200": { + "description": "Fetching data of specified metadata object is successful.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/LiveboardDataResponse" + } + } + } + }, + "400": { + "description": "Invalid request.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "401": { + "description": "Unauthorized access.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "403": { + "description": "Forbidden access.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "500": { + "description": "Unexpected error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + } + } + } + }, + "/api/rest/2.0/searchdata": { + "post": { + "operationId": "searchData", + "description": "\n Version: 9.0.0.cl or later\n\nGenerates an Answer from a given data source.\n\nRequires at least view access to the data source object (Worksheet or View). If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled, the `CAN_DOWNLOAD_DETAILED_DATA` (**Can download detailed data**) privilege is also required.\n\n#### Usage guidelines\n\nTo search data, specify the data source GUID in `logical_table_identifier`. The data source can be a Worksheet, View, Table, or SQL view.\n\nPass search tokens in the `query_string` attribute in the API request as shown in the following example:\n\n```\n{\n \"query_string\": \"[sales] by [store]\",\n \"logical_table_identifier\": \"cd252e5c-b552-49a8-821d-3eadaa049cca\",\n}\n```\n\nFor more information about the `query_string` format and data source attribute, see [Search data API](https://developers.thoughtspot.com/docs/fetch-data-and-report-apis#_search_data_api). \n\nThe `record_size` attribute determines the number of records to retrieve in an API call. For more information about pagination, record size, and maximum row limit, see [Pagination and record size settings](https://developers.thoughtspot.com/docs/fetch-data-and-report-apis#_pagination_settings_for_data_and_report_api). \n\n\n\n#### Endpoint URL\n", + "tags": [ + "Data", + "9.0.0.cl" + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SearchDataRequest" + } + } + }, + "required": true + }, + "parameters": [], + "responses": { + "200": { + "description": "Fetching data of specified metadata object is successful.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SearchDataResponse" + } + } + } + }, + "400": { + "description": "Invalid request.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "401": { + "description": "Unauthorized access.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "403": { + "description": "Forbidden access.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "500": { + "description": "Unexpected error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + } + } + } + }, + "/api/rest/2.0/dbt/dbt-connection": { + "post": { + "operationId": "dbtConnection", + "description": "\n Version: 9.9.0.cl or later\n\nCreates a DBT connection object in ThoughtSpot.\n\nRequires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege or `DATAMANAGEMENT` (**Can manage data**) privilege.\nIf [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the following Data control privileges may be required:\n\n- `CAN_MANAGE_CUSTOM_CALENDAR`(**Can manage custom calendars**)\n- `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**)\n- `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` (**Can manage data models**)\n\n#### About create DBT connection\nDBT connection in ThoughtSpot is used by the user to define DBT credentials for cloud . The API needs embrace connection, embrace database name, DBT url, import type, DBT account identifier, DBT project identifier, DBT access token and environment details (or) embrace connection, embrace database name, import type, file_content to create a connection object. To know more about DBT, see ThoughtSpot Product Documentation.\n\n\n\n\n#### Endpoint URL\n", + "tags": [ + "DBT", + "9.9.0.cl" + ], + "requestBody": { + "content": { + "multipart/form-data": { + "schema": { + "type": "object", + "properties": { + "connection_name": { + "description": "Name of the connection.", + "type": "string" + }, + "database_name": { + "description": "Name of the Database.", + "type": "string" + }, + "import_type": { + "description": "Mention type of Import", + "default": "DBT_CLOUD", + "type": "string", + "enum": [ + "DBT_CLOUD", + "ZIP_FILE" + ] + }, + "access_token": { + "description": "Access token is mandatory when Import_Type is DBT_CLOUD.", + "type": "string" + }, + "dbt_url": { + "description": "DBT URL is mandatory when Import_Type is DBT_CLOUD.", + "type": "string" + }, + "account_id": { + "description": "Account ID is mandatory when Import_Type is DBT_CLOUD", + "type": "string" + }, + "project_id": { + "description": "Project ID is mandatory when Import_Type is DBT_CLOUD", + "type": "string" + }, + "dbt_env_id": { + "description": "DBT Environment ID\"", + "type": "string" + }, + "project_name": { + "description": "Name of the project", + "type": "string" + }, + "file_content": { + "description": "Upload DBT Manifest and Catalog artifact files as a ZIP file. This field is Mandatory when Import Type is 'ZIP_FILE'", + "type": "string", + "format": "binary" + } + }, + "required": [ + "connection_name", + "database_name" + ] + } + } + }, + "required": true + }, + "parameters": [], + "responses": { + "200": { + "description": "Succesfully created DBT Connection.", + "content": { + "application/json": { + "schema": { + "type": "object" + } + } + } + }, + "400": { + "description": "Invalid request.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "401": { + "description": "Unauthorized access.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "403": { + "description": "Forbidden access.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "500": { + "description": "Unexpected error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + } + } + } + }, + "/api/rest/2.0/dbt/generate-sync-tml": { + "post": { + "operationId": "dbtGenerateSyncTml", + "description": "\n Version: 9.9.0.cl or later\n\nResynchronize the existing list of models, tables, worksheet tml’s and import them to Thoughtspot based on the DBT connection object.\n\nRequires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege or `DATAMANAGEMENT` (**Can manage data**) privilege, along with an existing DBT connection.\nIf [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the following data control privileges may be required:\n\n- `CAN_MANAGE_CUSTOM_CALENDAR`(**Can manage custom calendars**)\n- `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**)\n- `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` (**Can manage data models**)\n\n\n\n\n#### Endpoint URL\n", + "tags": [ + "DBT", + "9.9.0.cl" + ], + "requestBody": { + "content": { + "multipart/form-data": { + "schema": { + "type": "object", + "properties": { + "dbt_connection_identifier": { + "description": "Unique ID of the DBT connection.", + "type": "string" + }, + "file_content": { + "description": "Upload DBT Manifest and Catalog artifact files as a ZIP file. This field is mandatory if the connection was created with import_type ‘ZIP_FILE’", + "type": "string", + "format": "binary" + }, + "include_semantic_report": { + "description": "If true, includes a `semantic_report` per model showing which components were imported or skipped. Each component includes its name, type (such as dimension, measure, or metric), import status, SQL expression, and the corresponding generated ThoughtSpot formula. Note: supported only for Snowflake and Databricks connections.", + "type": "boolean", + "nullable": true + } + }, + "required": [ + "dbt_connection_identifier" + ] + } + } + }, + "required": true + }, + "parameters": [], + "responses": { + "200": { + "description": "Sync Table and Worksheet TML's are successfully generated.", + "content": { + "application/json": { + "schema": { + "type": "object" + } + } + } + }, + "400": { + "description": "Invalid request.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "401": { + "description": "Unauthorized access.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "403": { + "description": "Forbidden access.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "500": { + "description": "Unexpected error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + } + } + } + }, + "/api/rest/2.0/dbt/generate-tml": { + "post": { + "operationId": "dbtGenerateTml", + "description": "\n Version: 9.9.0.cl or later\n\nGenerate required table and worksheet and import them.\n\nRequires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege or `DATAMANAGEMENT` (**Can manage data**) privilege, along with an existing DBT connection.\nIf [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the following data control privileges may be required:\n\n- `CAN_MANAGE_CUSTOM_CALENDAR`(**Can manage custom calendars**)\n- `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**)\n- `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` (**Can manage data models**)\n\n#### About generate TML\nModels and Worksheets to be imported can be selected by the user as part of the API.\n\n\n\n\n#### Endpoint URL\n", + "tags": [ + "DBT", + "9.9.0.cl" + ], + "requestBody": { + "content": { + "multipart/form-data": { + "schema": { + "type": "object", + "properties": { + "dbt_connection_identifier": { + "description": "Unique ID of the DBT connection.", + "type": "string" + }, + "model_tables": { + "description": "List of Models and their respective Tables\nExample: '[{\"model_name\": \"model_name\", \"model_path\": \"model_path\", \"tables\": [\"table_name\"]}]'", + "type": "string", + "format": "json" + }, + "import_worksheets": { + "description": "Mention the worksheet tmls to import", + "type": "string", + "enum": [ + "ALL", + "NONE", + "SELECTED" + ] + }, + "worksheets": { + "description": "List of worksheets is mandatory when import_Worksheets is type SELECTED\nExample: [\"worksheet_name\"]", + "type": "string", + "format": "json" + }, + "file_content": { + "description": "Upload DBT Manifest and Catalog artifact files as a ZIP file. This field is mandatory if the connection was created with import_type ‘ZIP_FILE’", + "type": "string", + "format": "binary" + }, + "include_semantic_report": { + "description": "If true, includes a `semantic_report` per model showing which components were imported or skipped. Each component includes its name, type (such as dimension, measure, or metric), import status, SQL expression, and the corresponding generated ThoughtSpot formula. Note: supported only for Snowflake and Databricks connections.", + "type": "boolean", + "nullable": true + } + }, + "required": [ + "dbt_connection_identifier", + "model_tables", + "import_worksheets" + ] + } + } + }, + "required": true + }, + "parameters": [], + "responses": { + "200": { + "description": "Required Table and Worksheet TML's are successfully generated.", + "content": { + "application/json": { + "schema": { + "type": "object" + } + } + } + }, + "400": { + "description": "Invalid request.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "401": { + "description": "Unauthorized access.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "403": { + "description": "Forbidden access.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "500": { + "description": "Unexpected error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + } + } + } + }, + "/api/rest/2.0/dbt/search": { + "post": { + "operationId": "dbtSearch", + "description": "\n Version: 9.9.0.cl or later\n\nGets a list of DBT connection objects by user and organization, available on the ThoughtSpot system.\n\nRequires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege or `DATAMANAGEMENT` (**Can manage data**) privilege.\nIf [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the following Data control privileges may be required:\n\n- `CAN_MANAGE_CUSTOM_CALENDAR`(**Can manage custom calendars**)\n- `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**)\n- `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` (**Can manage data models**)\n\n#### About search DBT connection\nTo get details of a specific DBT connection identifier, database connection identifier, database connection name, database name, project name, project identifier, environment identifier , import type and author.\n\n\n\n\n#### Endpoint URL\n", + "tags": [ + "DBT", + "9.9.0.cl" + ], + "parameters": [], + "responses": { + "200": { + "description": "Retrieved list of DBT connections successfully.", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/DbtSearchResponse" + } + } + } + } + }, + "400": { + "description": "Invalid request.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "401": { + "description": "Unauthorized access.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "403": { + "description": "Forbidden access.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "500": { + "description": "Unexpected error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + } + } + } + }, + "/api/rest/2.0/dbt/{dbt_connection_identifier}/delete": { + "post": { + "operationId": "deleteDbtConnection", + "description": "\n Version: 9.9.0.cl or later\n\nRemoves the specified DBT connection object from the ThoughtSpot system.\n\nRequires `ADMINISTRATION` (**Can administer ThoughtSpot**) or `DATAMANAGEMENT` (**Can manage data ThoughtSpot**) privilege.\nIf [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the following Data control privileges may be required:\n\n- `CAN_MANAGE_CUSTOM_CALENDAR`(**Can manage custom calendars**)\n- `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**)\n- `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` (**Can manage data models**)\n\n\n\n\n#### Endpoint URL\n", + "tags": [ + "DBT", + "9.9.0.cl" + ], + "parameters": [ + { + "in": "path", + "name": "dbt_connection_identifier", + "required": true, + "schema": { + "type": "string" + }, + "description": "Unique ID of the DBT Connection." + } + ], + "responses": { + "204": { + "description": "DBT Connection successfully deleted." + }, + "400": { + "description": "Invalid request.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "401": { + "description": "Unauthorized access.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "403": { + "description": "Forbidden access.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "500": { + "description": "Unexpected error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + } + } + } + }, + "/api/rest/2.0/dbt/update-dbt-connection": { + "post": { + "operationId": "updateDbtConnection", + "description": "\n Version: 9.9.0.cl or later\n\nUpdates a DBT connection object.\n\nRequires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege or `DATAMANAGEMENT` (**Can manage data ThoughtSpot**) privilege, along with an existing DBT connection.\nIf [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the following data control privileges may be required:\n\n- `CAN_MANAGE_CUSTOM_CALENDAR`(**Can manage custom calendars**)\n- `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**)\n- `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` (**Can manage data models**)\n\n#### About update DBT connection\nYou can modify DBT connection object properties such as embrace connection name, embrace database name, import type, account identifier, access token, project identifier and environment (or) embrace connection, embrace database name, import type, file_content settings.\n\n\n\n\n#### Endpoint URL\n", + "tags": [ + "DBT", + "9.9.0.cl" + ], + "requestBody": { + "content": { + "multipart/form-data": { + "schema": { + "type": "object", + "properties": { + "dbt_connection_identifier": { + "description": "Unique ID of the DBT Connection.", + "type": "string" + }, + "connection_name": { + "description": "Name of the connection.", + "type": "string" + }, + "database_name": { + "description": "Name of the Database.", + "type": "string" + }, + "import_type": { + "description": "Mention type of Import", + "default": "DBT_CLOUD", + "type": "string", + "enum": [ + "DBT_CLOUD", + "ZIP_FILE" + ] + }, + "access_token": { + "description": "Access token is mandatory when Import_Type is DBT_CLOUD.", + "type": "string" + }, + "dbt_url": { + "description": "DBT URL is mandatory when Import_Type is DBT_CLOUD.", + "type": "string" + }, + "account_id": { + "description": "Account ID is mandatory when Import_Type is DBT_CLOUD", + "type": "string" + }, + "project_id": { + "description": "Project ID is mandatory when Import_Type is DBT_CLOUD", + "type": "string" + }, + "dbt_env_id": { + "description": "DBT Environment ID\"", + "type": "string" + }, + "project_name": { + "description": "Name of the project", + "type": "string" + }, + "file_content": { + "description": "Upload DBT Manifest and Catalog artifact files as a ZIP file. This field is Mandatory when Import Type is 'ZIP_FILE'", + "type": "string", + "format": "binary" + } + }, + "required": [ + "dbt_connection_identifier" + ] + } + } + }, + "required": true + }, + "parameters": [], + "responses": { + "200": { + "description": "DBT Connection successfully updated.", + "content": { + "application/json": { + "schema": { + "type": "object" + } + } + } + }, + "400": { + "description": "Invalid request.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "401": { + "description": "Unauthorized access.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "403": { + "description": "Forbidden access.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "500": { + "description": "Unexpected error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + } + } + } + }, + "/api/rest/2.0/customization/email": { + "post": { + "operationId": "createEmailCustomization", + "description": "\nBeta Version: 10.10.0.cl or later\n\nCreates a customization configuration for the notification email.\n\n#### Pre-requisites\n\nRequires `DEVELOPER` (**has developer privilege**) or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege.\nIf [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `DEVELOPER` (**Has developer privilege**) privilege is required.\n\n**NOTE**:This endpoint in currently in beta. Contact ThoughtSpot support to enable this on your instance.\n\n#### Usage guidelines\n\nTo create a custom configuration pass these parameters in your API request:\n\n- A JSON map of configuration attributes `template_properties`. The following example shows a sample set of customization configuration:\n\n```\n{\n {\n \"cta_button_bg_color\": \"#444DEA\",\n \"cta_text_font_color\": \"#FFFFFF\",\n \"primary_bg_color\": \"#D3DEF0\",\n \"logo_url\": \"https://storage.pardot.com/710713/1642089901EbkRibJq/TS_fullworkmark_darkmode.png\",\n \t \"font_family\": \"\",\n \"product_name\": \"ThoughtSpot\",\n \"footer_address\": \"444 Castro St, Suite 1000 Mountain View, CA 94041\",\n\t \"footer_phone\": \"(800) 508-7008\",\n \"replacement_value_for_liveboard\": \"Dashboard\",\n \"replacement_value_for_answer\": \"Chart\",\n \"replacement_value_for_spot_iq\": \"AI Insights\",\n \t \"hide_footer_phone\": false,\n \"hide_footer_address\": false,\n \"hide_product_name\": false,\n \"hide_manage_notification\": false,\n \"hide_mobile_app_nudge\": false,\n \"hide_privacy_policy\": false,\n \"hide_ts_vocabulary_definitions\": false,\n \"hide_error_message\": false,\n \"hide_unsubscribe_link\": false,\n \"hide_notification_status\": false,\n \"hide_modify_alert\": false,\n \"company_website_url\": \"https://your-website.com/\",\n \"company_privacy_policy_url\" : \"https://link-to-privacy-policy.com/\",\n \"contact_support_url\": \"https://link-to-contact-support.com/\",\n \"hide_contact_support_url\": false,\n\t \"hide_logo_url\" : false\n }\n}\n```\n\n\n\n\n#### Endpoint URL\n", + "tags": [ + "Email Customization", + "10.10.0.cl" + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CreateEmailCustomizationRequest" + } + } + }, + "required": true + }, + "parameters": [], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CreateEmailCustomizationResponse" + } + } + } + }, + "400": { + "description": "Invalid request.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "403": { + "description": "Unauthorized access.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "500": { + "description": "Unexpected error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + } + } + } + }, + "/api/rest/2.0/customization/email/{template_identifier}/delete": { + "post": { + "operationId": "deleteEmailCustomization", + "description": "\nBeta Version: 10.10.0.cl or later\n\nDeletes the configuration for the email customization.\n\n#### Pre-requisites\n\nRequires `DEVELOPER` (**has developer privilege**) or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege.\nIf [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `DEVELOPER` (**Has developer privilege**) privilege is required.\n\n**NOTE**:This endpoint in currently in beta. Contact ThoughtSpot support to enable this on your instance.\n\n#### Usage guidelines\n\n- Call the search API endpoint to get the `template_identifier` from the response.\n- Use that `template_identifier` as a parameter in this API request.\n\n\n\n\n#### Endpoint URL\n", + "deprecated": true, + "tags": [ + "Email Customization", + "10.10.0.cl" + ], + "parameters": [ + { + "in": "path", + "name": "template_identifier", + "required": true, + "schema": { + "type": "string" + }, + "description": "Unique ID or name of the email customization." + } + ], + "responses": { + "204": { + "description": "Email Customization configuration successfully deleted." + }, + "400": { + "description": "Invalid request.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "403": { + "description": "Unauthorized access.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "500": { + "description": "Unexpected error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + } + } + } + }, + "/api/rest/2.0/customization/email/delete": { + "post": { + "operationId": "deleteOrgEmailCustomization", + "description": "\nBeta Version: 10.12.0.cl or later\n\nDeletes the configuration for the email customization.\n\n#### Pre-requisites\n\nRequires `DEVELOPER` (**has developer privilege**) or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege.\nIf [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `DEVELOPER` (**Has developer privilege**) privilege is required.\n\n**NOTE**:This endpoint in currently in beta. Contact ThoughtSpot support to enable this on your instance.\n\n#### Usage guidelines\n\n- Call the search API endpoint to get the `org_identifier` from the response.\n- Use that `org_identifier` as a parameter in this API request.\n\n\n\n\n#### Endpoint URL\n", + "tags": [ + "Email Customization", + "10.12.0.cl" + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/DeleteOrgEmailCustomizationRequest" + } + } + }, + "required": true + }, + "parameters": [], + "responses": { + "204": { + "description": "Email Customization configuration successfully deleted." + }, + "400": { + "description": "Invalid request.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "401": { + "description": "Unauthorized access.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "403": { + "description": "Unauthorized access.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "500": { + "description": "Unexpected error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + } + } + } + }, + "/api/rest/2.0/customization/email/search": { + "post": { + "operationId": "searchEmailCustomization", + "description": "\nBeta Version: 10.10.0.cl or later\n\nSearch the email customization configuration if any set for the ThoughtSpot system.\n\n#### Pre-requisites\n\nRequires `DEVELOPER` (**has developer privilege**) or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege.\nIf [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `DEVELOPER` (**Has developer privilege**) privilege is required.\n\n**NOTE**:This endpoint in currently in beta. Contact ThoughtSpot support to enable this on your instance.\n\n\n\n\n#### Endpoint URL\n", + "tags": [ + "Email Customization", + "10.10.0.cl" + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SearchEmailCustomizationRequest" + } + } + }, + "required": true + }, + "parameters": [], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/CreateEmailCustomizationResponse" + } + } + } + } + }, + "400": { + "description": "Invalid request.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "403": { + "description": "Unauthorized access.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "500": { + "description": "Unexpected error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + } + } + } + }, + "/api/rest/2.0/customization/email/update": { + "post": { + "operationId": "updateEmailCustomization", + "description": "\nBeta Version: 10.12.0.cl or later\n\nUpdates a customization configuration for the notification email.\n\n#### Pre-requisites\n\nRequires `DEVELOPER` (**has developer privilege**) or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege.\nIf [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `DEVELOPER` (**Has developer privilege**) privilege is required.\n\n**NOTE**:This endpoint in currently in beta. Contact ThoughtSpot support to enable this on your instance.\n\n#### Usage guidelines\n\nTo update a custom configuration pass these parameters in your API request:\n\n- A JSON map of configuration attributes `template_properties`. The following example shows a sample set of customization configuration:\n\n```\n{\n {\n \"cta_button_bg_color\": \"#444DEA\",\n \t\"cta_text_font_color\": \"#FFFFFF\",\n \t\"primary_bg_color\": \"#D3DEF0\",\n \"logo_url\": \"https://storage.pardot.com/710713/1642089901EbkRibJq/TS_fullworkmark_darkmode.png\",\n \t \"font_family\": \"\",\n \t\"product_name\": \"ThoughtSpot\",\n \t\"footer_address\": \"444 Castro St, Suite 1000 Mountain View, CA 94041\",\n\t \"footer_phone\": \"(800) 508-7008\",\n \"replacement_value_for_liveboard\": \"Dashboard\",\n \t\"replacement_value_for_answer\": \"Chart\",\n \t\"replacement_value_for_spot_iq\": \"AI Insights\",\n \t \"hide_footer_phone\": false,\n \"hide_footer_address\": false,\n \"hide_product_name\": false,\n \t\"hide_manage_notification\": false,\n \t\"hide_mobile_app_nudge\": false,\n \t\"hide_privacy_policy\": false,\n \t\"hide_ts_vocabulary_definitions\": false,\n \t\"hide_error_message\": false,\n \t\"hide_unsubscribe_link\": false,\n \"hide_notification_status\": false,\n \t\"hide_modify_alert\": false,\n \t\"company_website_url\": \"https://your-website.com/\",\n \t\"company_privacy_policy_url\" : \"https://link-to-privacy-policy.com/\",\n \"contact_support_url\": \"https://link-to-contact-support.com/\",\n \"hide_contact_support_url\": false,\n\t \"hide_logo_url\" : false\n }\n}\n```\n\n\n\n\n#### Endpoint URL\n", + "tags": [ + "Email Customization", + "10.12.0.cl" + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UpdateEmailCustomizationRequest" + } + } + }, + "required": true + }, + "parameters": [], + "responses": { + "204": { + "description": "Email Customization configuration successfully updated." + }, + "400": { + "description": "Invalid request.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "401": { + "description": "Unauthorized access.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "403": { + "description": "Unauthorized access.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "500": { + "description": "Unexpected error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + } + } + } + }, + "/api/rest/2.0/customization/email/validate": { + "post": { + "operationId": "validateEmailCustomization", + "description": "\nBeta Version: 10.10.0.cl or later\n\nValidates the email customization configuration if any set for the ThoughtSpot system.\n\n#### Pre-requisites\n\nRequires `DEVELOPER` (**has developer privilege**) or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege.\nIf [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `DEVELOPER` (**Has developer privilege**) privilege is required.\n\n**NOTE**:This endpoint in currently in beta. Contact ThoughtSpot support to enable this on your instance.\n\n\n\n\n#### Endpoint URL\n", + "tags": [ + "Email Customization", + "10.10.0.cl" + ], + "parameters": [], + "responses": { + "204": { + "description": "Triggered test email for customization configuration" + }, + "400": { + "description": "Invalid request.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "403": { + "description": "Unauthorized access.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "500": { + "description": "Unexpected error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + } + } + } + }, + "/api/rest/2.0/groups/create": { + "post": { + "operationId": "createUserGroup", + "description": "\n Version: 9.0.0.cl or later\n\nCreates a group object in ThoughtSpot.\n\nRequires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege.\nIf [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `GROUP_ADMINISTRATION` (**Can manage groups**) privilege is required.\n\n#### About groups\nGroups in ThoughtSpot are used by the administrators to define privileges and organize users based on their roles and access requirements. To know more about groups and privileges, see [ThoughtSpot Product Documentation](https://docs.thoughtspot.com/cloud/latest/groups-privileges).\n\n#### Supported operations\n\nThe API endpoint lets you perform the following operations:\n\n* Assign privileges\n* Add users\n* Define sharing visibility\n* Add sub-groups\n* Assign a default Liveboard\n\n\n\n\n#### Endpoint URL\n", + "tags": [ + "Groups", + "9.0.0.cl" + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CreateUserGroupRequest" + } + } + }, + "required": true + }, + "parameters": [], + "responses": { + "200": { + "description": "User group successfully created.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UserGroupResponse" + } + } + } + }, + "400": { + "description": "Invalid request.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "401": { + "description": "Unauthorized access.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "403": { + "description": "Forbidden access.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "500": { + "description": "Unexpected error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + } + } + } + }, + "/api/rest/2.0/groups/{group_identifier}/delete": { + "post": { + "operationId": "deleteUserGroup", + "description": "\n Version: 9.0.0.cl or later\n\nRemoves the specified group object from the ThoughtSpot system.\n\nRequires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege.\nIf [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `GROUP_ADMINISTRATION` (**Can manage groups**) privilege is required.\n\n\n\n\n#### Endpoint URL\n", + "tags": [ + "Groups", + "9.0.0.cl" + ], + "parameters": [ + { + "in": "path", + "name": "group_identifier", + "required": true, + "schema": { + "type": "string" + }, + "description": "GUID or name of the group." + } + ], + "responses": { + "204": { + "description": "User group successfully deleted." + }, + "400": { + "description": "Invalid request.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "401": { + "description": "Unauthorized access.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "403": { + "description": "Forbidden access.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "500": { + "description": "Unexpected error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + } + } + } + }, + "/api/rest/2.0/groups/import": { + "post": { + "operationId": "importUserGroups", + "description": "\n Version: 9.0.0.cl or later\n\nImports group objects from external databases into ThoughtSpot.\n\nRequires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege.\nIf [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `GROUP_ADMINISTRATION` (**Can manage groups**) privilege is required.\n\nDuring the import operation:\n\n* If the specified group is not available in ThoughtSpot, it will be added to ThoughtSpot.\n* If `delete_unspecified_groups` is set to `true`, the groups not specified in the API request, excluding administrator and system user groups, are deleted.\n* If the specified groups are already available in ThoughtSpot, the object properties of these groups are modified and synchronized as per the input data in the API request.\n\nA successful API call returns the object that represents the changes made in the ThoughtSpot system.\n\n\n\n\n#### Endpoint URL\n", + "tags": [ + "Groups", + "9.0.0.cl" + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ImportUserGroupsRequest" + } + } + }, + "required": true + }, + "parameters": [], + "responses": { + "200": { + "description": "Import user groups operation successful.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ImportUserGroupsResponse" + } + } + } + }, + "400": { + "description": "Invalid request.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "401": { + "description": "Unauthorized access.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "403": { + "description": "Forbidden access.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "500": { + "description": "Unexpected error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + } + } + } + }, + "/api/rest/2.0/groups/search": { + "post": { + "operationId": "searchUserGroups", + "description": "\n Version: 9.0.0.cl or later\n\nGets a list of user group objects from the ThoughtSpot system.\n\nTo get details of a specific user group, specify the user group GUID or name. You can also filter the API response based on User ID, Org ID, Role ID, type of group, sharing visibility, privileges assigned to the group, and the Liveboard IDs assigned to the users in the group.\n\nAvailable to all users. Users with `ADMINISTRATION` (**Can administer ThoughtSpot**) privileges can view all users properties.\n\nIf [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `GROUP_ADMINISTRATION` (**Can manage groups**) privilege is required.\n\n**NOTE**: If you do not get precise results, try setting `record_size` to `-1` and `record_offset` to `0`.\n\n\n\n\n#### Endpoint URL\n", + "tags": [ + "Groups", + "9.0.0.cl" + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SearchUserGroupsRequest" + } + } + }, + "required": true + }, + "parameters": [], + "responses": { + "200": { + "description": "User group search result.", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/UserGroupResponse" + } + } + } + } + }, + "400": { + "description": "Invalid request.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "401": { + "description": "Unauthorized access.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "403": { + "description": "Forbidden access.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "500": { + "description": "Unexpected error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + } + } + } + }, + "/api/rest/2.0/groups/{group_identifier}/update": { + "post": { + "operationId": "updateUserGroup", + "description": "\n Version: 9.0.0.cl or later\n\nUpdates the properties of a group object in ThoughtSpot.\n\nRequires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege.\nIf [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `GROUP_ADMINISTRATION` (**Can manage groups**) privilege is required.\n\n#### Supported operations\n\nThis API endpoint lets you perform the following operations in a single API request:\n\n* Edit [privileges](https://developers.thoughtspot.com/docs/?pageid=api-user-management#group-privileges)\n* Add or remove users\n* Change sharing visibility settings\n* Add or remove sub-groups\n* Assign a default Liveboard or update the existing settings\n\n\n\n\n#### Endpoint URL\n", + "tags": [ + "Groups", + "9.0.0.cl" + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UpdateUserGroupRequest" + } + } + }, + "required": true + }, + "parameters": [ + { + "in": "path", + "name": "group_identifier", + "required": true, + "schema": { + "type": "string" + }, + "description": "GUID or name of the group." + } + ], + "responses": { + "204": { + "description": "User group successfully updated." + }, + "400": { + "description": "Invalid request.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "401": { + "description": "Unauthorized access.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "403": { + "description": "Forbidden access.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "500": { + "description": "Unexpected error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + } + } + } + }, + "/api/rest/2.0/input-tables/create": { + "post": { + "operationId": "createInputTable", + "description": "\n Version: 26.8.0.cl or later\n\nVersion: 26.8.0.cl or later\n\nCreates an input table and links it to a ThoughtSpot model (worksheet). An input table is a user-editable table stored in the model's external Cloud Data Warehouse (CDW) connection. It lets analysts enter or import data directly from the ThoughtSpot UI without requiring access to the underlying warehouse.\n\nRequires `DATAMANAGEMENT` (**Can manage data**) or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege.\nIf [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your ThoughtSpot instance, the `CAN_MANAGE_INPUT_TABLES` (**Can manage input tables**) privilege is required.\n\n#### Usage guidelines\n\nTo create an input table, provide the following in the request body:\n\n* **`table_name`** — Physical name of the table to create in the external warehouse.\n* **`model_identifier`** — GUID or name of the model (worksheet) to link the input table to. The connection, database, and schema used to create the physical table are derived from this model's metadata.\n* **`table_definition`** — Describes the table schema:\n * `referenced_columns` — List of column GUIDs from the linked model to include as read-only reference columns in the input table. These columns anchor the input data to existing model dimensions.\n * `new_columns` — List of new editable columns to create. Each column requires:\n * `name` — Column display name.\n * `data_type` — Warehouse data type (for example, `VARCHAR`, `DOUBLE`, `DATE`).\n * `type` — Semantic role of the column: `ATTRIBUTE` for dimension columns or `MEASURE` for numeric columns.\n\n**Note**: The physical table is created in the same connection, database, and schema as the linked model. Ensure the connection user has `CREATE TABLE` permissions in the target schema.\n\n#### Examples\n\nCreate an input table with one referenced model column and one new editable measure column:\n\n```json\n{\n \"table_name\": \"Sales Region Targets\",\n \"model_identifier\": \"a1b2c3d4-e5f6-7890-abcd-ef1234567890\",\n \"table_definition\": {\n \"referenced_columns\": [\"c7d8e9f0-1234-5678-abcd-ef0987654321\"],\n \"new_columns\": [\n {\n \"name\": \"target_revenue\",\n \"data_type\": \"DOUBLE\",\n \"type\": \"MEASURE\"\n }\n ]\n }\n}\n```\n\nCreate an input table with multiple new editable columns and no referenced columns:\n\n```json\n{\n \"table_name\": \"Budget Adjustments\",\n \"model_identifier\": \"a1b2c3d4-e5f6-7890-abcd-ef1234567890\",\n \"table_definition\": {\n \"referenced_columns\": [],\n \"new_columns\": [\n {\n \"name\": \"region\",\n \"data_type\": \"VARCHAR\",\n \"type\": \"ATTRIBUTE\"\n },\n {\n \"name\": \"adjustment_amount\",\n \"data_type\": \"DOUBLE\",\n \"type\": \"MEASURE\"\n },\n {\n \"name\": \"effective_date\",\n \"data_type\": \"DATE\",\n \"type\": \"ATTRIBUTE\"\n }\n ]\n }\n}\n```\n\n\n\n\n#### Endpoint URL\n", + "tags": [ + "Input Tables", + "26.8.0.cl" + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CreateInputTableRequest" + } + } + }, + "required": true + }, + "parameters": [], + "responses": { + "200": { + "description": "Input table created successfully.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/InputTableResponse" + }, + "examples": { + "example_1": { + "summary": "Input table created successfully", + "value": { + "input_table_identifier": "f47ac10b-58cc-4372-a567-0e02b2c3d479" + } + } + } + } + } + }, + "400": { + "description": "Bad request — invalid payload, no columns selected, or upload disabled on the connection.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "401": { + "description": "Unauthorized access.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "403": { + "description": "Forbidden — caller does not have MODIFY permission on the model.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "404": { + "description": "Model not found.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "500": { + "description": "Unexpected error.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + } + } + } + }, + "/api/rest/2.0/input-tables/{input_table_identifier}/delete": { + "post": { + "operationId": "deleteInputTable", + "description": "\n Version: 26.8.0.cl or later\n\nVersion: 26.8.0.cl or later\n\nDeletes an input table. This operation unlinks the input table from its owner model, removes it from the connection metadata, and drops the physical table from the Cloud Data Warehouse (CDW). This action is irreversible — all data stored in the input table is permanently deleted.\n\nRequires `DATAMANAGEMENT` (**Can manage data**) or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege.\nIf [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your ThoughtSpot instance, the `CAN_MANAGE_INPUT_TABLES` (**Can manage input tables**) privilege is required.\n\n#### Usage guidelines\n\nSpecify the GUID of the input table to delete as the `input_table_identifier` path parameter. The owner model (worksheet) is derived from the input table's metadata and is used to locate and clean up the associated connection entry.\n\n**Note**: Deleting an input table does not delete the linked model. However, any Answers or Liveboards that reference columns from the deleted input table will lose access to that data and may return errors until the affected visualizations are updated.\n\n#### Example\n\nPass the input table GUID as a path parameter. This endpoint has no request body.\n\n```\nDELETE /api/rest/2.0/input-tables/a1b2c3d4-e5f6-7890-abcd-ef1234567890/delete\n```\n\n\n\n\n#### Endpoint URL\n", + "tags": [ + "Input Tables", + "26.8.0.cl" + ], + "parameters": [ + { + "in": "path", + "name": "input_table_identifier", + "required": true, + "schema": { + "type": "string" + }, + "description": "Unique ID of the input table to delete." + } + ], + "responses": { + "204": { + "description": "Successfully deleted the input table and dropped the physical CDW table." + }, + "400": { + "description": "Operation failed", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "401": { + "description": "Unauthorized access.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "403": { + "description": "Forbidden access.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "500": { + "description": "Operation failed", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + } + } + } + }, + "/api/rest/2.0/input-tables/{input_table_identifier}/update": { + "post": { + "operationId": "updateInputTable", + "description": "\n Version: 26.8.0.cl or later\n\nVersion: 26.8.0.cl or later\n\nWrites rows of data into an existing input table. The supplied rows replace the current contents of the table: each call serializes the provided values to CSV and loads them into the input table via DataManager, overwriting any previously stored rows.\n\nRequires `DATAMANAGEMENT` (**Can manage data**) or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege.\nIf [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your ThoughtSpot instance, the `CAN_MANAGE_INPUT_TABLES` (**Can manage input tables**) privilege is required. The caller must also have `MODIFY` permission on the input table object.\n\n#### Usage guidelines\n\nSpecify the input table GUID as the `input_table_identifier` path parameter and provide the row data in the request body:\n\n* **`columns`** — Ordered list of column names to write. Column names must exactly match the names defined when the input table was created. Only the listed columns are written; unlisted columns retain their existing values.\n* **`rows`** — List of rows to load. Each row is an array of string values in the same order as `columns`. All cell values must be passed as strings regardless of the column's underlying data type.\n\n**Note**: Each call fully replaces the previously loaded rows. To clear the table, send an empty `rows` array. Partial updates to individual rows are not supported; re-submit all rows on every write.\n\n#### Examples\n\nWrite two rows to an input table. Pass the input table GUID as the\n`input_table_identifier` path parameter:\n\n```\nPOST /api/rest/2.0/input-tables/{input_table_identifier}/update\n```\n\n```json\n{\n \"columns\": [\"region\", \"target_revenue\", \"effective_date\"],\n \"rows\": [\n [\"West\", \"1500000\", \"2025-01-01\"],\n [\"East\", \"2000000\", \"2025-01-01\"]\n ]\n}\n```\n\nThe response returns the number of rows written:\n\n```json\n{ \"rows_loaded\": 2 }\n```\n\nClear all rows from an input table:\n\n```json\n{\n \"columns\": [\"region\", \"target_revenue\"],\n \"rows\": []\n}\n```\n\n\n\n\n#### Endpoint URL\n", + "tags": [ + "Input Tables", + "26.8.0.cl" + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UpdateInputTableRequest" + } + } + }, + "required": true + }, + "parameters": [ + { + "in": "path", + "name": "input_table_identifier", + "required": true, + "schema": { + "type": "string" + }, + "description": "Unique ID of the input table to update." + } + ], + "responses": { + "200": { + "description": "Rows loaded successfully.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/InputTableUpdateResponse" + }, + "examples": { + "example_1": { + "summary": "Rows loaded successfully", + "value": { + "rows_loaded": 3 + } + } + } + } + } + }, + "400": { + "description": "Malformed request or unknown column name.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "401": { + "description": "Unauthorized access.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "403": { + "description": "Forbidden — caller does not have MODIFY permission on the input table.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "404": { + "description": "Input table not found.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "500": { + "description": "Unexpected error.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + } + } + } + }, + "/api/rest/2.0/jobs/history/communication-channels/search": { + "post": { + "operationId": "searchChannelHistory", + "description": "\n Version: 26.4.0.cl or later\n\nSearches delivery history for communication channels such as webhooks. Returns channel-level delivery status for each job execution record. Use this to monitor channel health and delivery success rates across events.\n\nRequires `ADMINISTRATION` (**Can administer ThoughtSpot**) or `DEVELOPER` (**Has developer privilege**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, users with `CAN_MANAGE_WEBHOOKS` (**Can manage webhooks**) privilege are also authorized to perform this action.\n\n**NOTE**: When `channel_type` is `WEBHOOK`, the following constraints apply:\n\n- `job_ids`, `channel_identifiers`, and `events` each accept at most one element.\n- When `job_ids` is provided, it is used as the sole lookup key and other filter fields are ignored.\n- When `job_ids` is not provided, `channel_identifiers` and `events` are both required, each containing exactly one element.\n- Records older than the configured retention period are not returned.\n- Use `start_epoch_time_in_millis` and/or `end_epoch_time_in_millis` to narrow results to a specific time window.\n\n\n\n\n#### Endpoint URL\n", + "tags": [ + "Jobs", + "26.4.0.cl" + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SearchChannelHistoryRequest" + } + } + }, + "required": true + }, + "parameters": [], + "responses": { + "200": { + "description": "Channel status logs retrieved successfully.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SearchChannelHistoryResponse" + }, + "examples": { + "example_1": { + "description": "Search webhook channel history by channel identifier and event", + "value": { + "jobs": [ + { + "id": "n.6170538a-a4d4-4712-91bf-39b353db2b72", + "status": "SUCCESS", + "creation_time_in_millis": 1771599720674, + "event": { + "type": "LIVEBOARD_SCHEDULE", + "id": "2bb2ff83-b8d9-4d2b-8913-b2589bb6831b", + "name": "schedule-identifier", + "run_id": "90c4f1b0-08c9-4a6c-8e61-49cffd9f1550" + }, + "recipients": [ + { + "type": "USER", + "id": "d211f619-8b72-45d3-92a7-69dde41159c7", + "name": "admin-user", + "email": "admin@example.com" + } + ], + "detail": "", + "try_count": 1 + }, + { + "id": "n.5c5bbedb-c425-48c0-8b54-a17267b08e7c", + "status": "SUCCESS", + "creation_time_in_millis": 1771599600508, + "event": { + "type": "LIVEBOARD_SCHEDULE", + "id": "2bb2ff83-b8d9-4d2b-8913-b2589bb6831b", + "name": "schedule-identifier", + "run_id": "b9834966-fe85-4fa9-8a10-9889c01d4826" + }, + "recipients": [ + { + "type": "USER", + "id": "d211f619-8b72-45d3-92a7-69dde41159c7", + "name": "admin-user", + "email": "admin@example.com" + } + ], + "detail": "", + "try_count": 1 + } + ] + } + }, + "example_2": { + "description": "Search webhook channel history by job ID", + "value": { + "jobs": [ + { + "id": "n.5c5bbedb-c425-48c0-8b54-a17267b08e7c", + "status": "SUCCESS", + "creation_time_in_millis": 1771599600508, + "event": { + "type": "LIVEBOARD_SCHEDULE", + "id": "2bb2ff83-b8d9-4d2b-8913-b2589bb6831b", + "name": "schedule-identifier", + "run_id": "b9834966-fe85-4fa9-8a10-9889c01d4826" + }, + "recipients": [ + { + "type": "USER", + "id": "d211f619-8b72-45d3-92a7-69dde41159c7", + "name": "admin-user", + "email": "admin@example.com" + } + ], + "detail": "", + "try_count": 1 + } + ] + } + } + } + } + } + }, + "400": { + "description": "Invalid request.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + }, + "examples": { + "invalid_request": { + "summary": "Invalid request", + "value": { + "error": { + "message": { + "code": 10002, + "incident_id_guid": "a1b2c3d4-e5f6-7890-abcd-ef1234567890", + "trace_id_guid": "a1b2c3d4-e5f6-7890-abcd-ef1234567890", + "debug": "channel_type must be specified. Currently only WEBHOOK is supported." + } + } + } + } + } + } + } + }, + "401": { + "description": "Unauthorized access.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + }, + "examples": { + "unauthorized_access": { + "summary": "Unauthorized access", + "value": { + "error": { + "message": { + "code": 10097, + "incident_id_guid": "b2c3d4e5-f678-9012-bcde-f23456789012", + "trace_id_guid": "b2c3d4e5-f678-9012-bcde-f23456789012", + "debug": "Authentication required to retrieve channel delivery history." + } + } + } + } + } + } + } + }, + "403": { + "description": "Forbidden access.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + }, + "examples": { + "forbidden_access": { + "summary": "Forbidden access", + "value": { + "error": { + "message": { + "code": 10023, + "incident_id_guid": "c3d4e5f6-7890-1234-cdef-345678901234", + "trace_id_guid": "c3d4e5f6-7890-1234-cdef-345678901234", + "debug": "Insufficient privileges to retrieve channel delivery history." + } + } + } + } + } + } + } + }, + "500": { + "description": "Unexpected error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + }, + "examples": { + "unexpected_error": { + "summary": "Unexpected error", + "value": { + "error": { + "message": { + "code": 10038, + "incident_id_guid": "d4e5f678-9012-3456-defa-456789012345", + "trace_id_guid": "d4e5f678-9012-3456-defa-456789012345", + "debug": "Unexpected server error while retrieving channel delivery history." + } + } + } + } + } + } + } + } + } + } + }, + "/api/rest/2.0/logs/fetch": { + "post": { + "operationId": "fetchLogs", + "description": "\n Version: 9.0.0.cl or later\n\nFetches security audit logs. \n\nRequires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege.\nIf [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the [Admin Control](https://developers.thoughtspot.com/docs/rbac#_admin_control) privileges are required.\n\n\n#### Usage guidelines\n\nBy default, the API retrieves logs for the last 24 hours. You can set a custom duration in EPOCH time. Make sure the log duration specified in your API request doesn’t exceed 24 hours. If you must fetch logs for a longer time range, modify the duration and make multiple sequential API requests.\n\nUpon successful execution, the API returns logs with the following information:\n* timestamp of the event\n* event ID\n* event type\n* name and GUID of the user\n* IP address of ThoughtSpot instance\n\nFor more information see [Audit logs Documentation](https://developers.thoughtspot.com/docs/audit-logs).\n\n\n\n\n#### Endpoint URL\n", + "tags": [ + "Log", + "9.0.0.cl" + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/FetchLogsRequest" + } + } + }, + "required": true + }, + "parameters": [], + "responses": { + "200": { + "description": "Log fetched successfully.", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/LogResponse" + } + } + } + } + }, + "400": { + "description": "Invalid request.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "401": { + "description": "Unauthorized access.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "403": { + "description": "Forbidden access.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "500": { + "description": "Unexpected error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + } + } + } + }, + "/api/rest/2.0/localizations/manual-translation/delete": { + "post": { + "operationId": "deleteManualTranslations", + "description": "\nDelete manual translations.
Version: 26.7.0.cl or later\n\nDeletes all manual translations for the org.\n\nRequires `ADMINISTRATION` (**Can administer ThoughtSpot**), `ORG_ADMINISTRATION` (**Can administer Org**), or `APPLICATION_ADMINISTRATION` (**Can administer application**) privilege.\n\n#### Usage guidelines\n\n- This deletes **all** translation entries for the targeted org. The operation cannot be undone.\n- Defaults to `ORG` scope if not specified.\n- Set `scope` to `CLUSTER` to delete translations uploaded in the All-Org context.\n\n\n\n\n#### Endpoint URL\n", + "tags": [ + "Manual Translation", + "26.7.0.cl" + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/DeleteManualTranslationsRequest" + } + } + }, + "required": true + }, + "parameters": [], + "responses": { + "204": { + "description": "Successfully deleted manual translations." + }, + "400": { + "description": "Operation failed", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "401": { + "description": "Unauthorized access.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "403": { + "description": "Forbidden access.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "500": { + "description": "Operation failed", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + } + } + } + }, + "/api/rest/2.0/localizations/manual-translation/export": { + "post": { + "operationId": "exportManualTranslations", + "description": "\nExport manual translations as a CSV file.
Version: 26.7.0.cl or later\n\nDownloads all manual translations for the org as a CSV file.\n\nRequires `ADMINISTRATION` (**Can administer ThoughtSpot**), `ORG_ADMINISTRATION` (**Can administer Org**), or `APPLICATION_ADMINISTRATION` (**Can administer application**) privilege.\n\n#### Usage guidelines\n\n- The response is a CSV file with columns: `content`, `locale`, `translated-content`.\n- Defaults to `ORG` scope if not specified.\n- Set `scope` to `CLUSTER` to export translations from the All-Org context.\n- Returns a `404` error if no translations exist for the targeted org or cluster scope.\n\n\n\n\n#### Endpoint URL\n", + "tags": [ + "Manual Translation", + "26.7.0.cl" + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExportManualTranslationsRequest" + } + } + }, + "required": true + }, + "parameters": [], + "responses": { + "200": { + "description": "CSV file downloaded successfully.", + "content": { + "application/octet-stream": {} + } + }, + "400": { + "description": "Invalid request.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "401": { + "description": "Unauthorized access.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "403": { + "description": "Forbidden access.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "404": { + "description": "No translations file found.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "500": { + "description": "Unexpected error.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + } + } + } + }, + "/api/rest/2.0/localizations/manual-translation/locales/{locale}/export": { + "post": { + "operationId": "getManualTranslationBundle", + "description": "\nGet translations bundle for a locale.
Version: 26.7.0.cl or later\n\nRetrieves all translations for a specific locale as a JSON map.\n\nAvailable to all authenticated users. No additional privileges are required.\n\n#### Usage guidelines\n\n- `locale` parameter must be a hyphenated locale code (for example, `fr-fr`, `de-de`, `JA-JP`).\n- Returns a JSON object with a `translations` map where each key is the original string and each value is the translated string.\n- If the org has no translations for the requested locale, the endpoint falls back to cluster-level translations.\n- Returns an empty `translations` map (not an error) if no entries exist at either level.\n\n\n\n\n#### Endpoint URL\n", + "tags": [ + "Manual Translation", + "26.7.0.cl" + ], + "parameters": [ + { + "in": "path", + "name": "locale", + "required": true, + "schema": { + "type": "string" + }, + "description": "Locale code for which to retrieve translations. For example, `fr-fr`, `de-de`, `JA-JP`." + } + ], + "responses": { + "200": { + "description": "Translation bundle retrieved successfully.", + "content": { + "application/json": { + "schema": { + "type": "object" + } + } + } + }, + "400": { + "description": "Invalid request.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "401": { + "description": "Unauthorized access.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "403": { + "description": "Forbidden access.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "404": { + "description": "No translations found for the requested locale.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "500": { + "description": "Unexpected error.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + } + } + } + }, + "/api/rest/2.0/localizations/manual-translation/import": { + "post": { + "operationId": "importManualTranslations", + "description": "\nImport manual translations from a CSV file.
Version: 26.7.0.cl or later\n\nUploads a CSV file containing manual translations and upserts them into the database.\n\nRequires `ADMINISTRATION` (**Can administer ThoughtSpot**), `ORG_ADMINISTRATION` (**Can administer Org**), or `APPLICATION_ADMINISTRATION` (**Can administer application**) privilege.\n\n#### Usage guidelines\n\n- The CSV file must have exactly three columns in this order: `content`, `locale`, `translated-content`.\n- Maximum file size: **30 MB**. Maximum rows: **10,000**.\n- Only `.csv` files are accepted.\n- The import performs an **upsert**: existing entries matched by `(org_id, locale, content)` are updated; new entries are inserted. Entries not in the upload are left untouched.\n- Set `scope` to `CLUSTER` to upload translations to the All-Org context. Cluster-level translations act as defaults for orgs that have no translations for a locale.\n\n\n\n\n#### Endpoint URL\n", + "tags": [ + "Manual Translation", + "26.7.0.cl" + ], + "requestBody": { + "content": { + "multipart/form-data": { + "schema": { + "type": "object", + "properties": { + "translations_file": { + "description": "CSV file containing translations. The file must have three columns:\n`content`, `locale`, `translated-content`. Max file size: 30 MB.\nMax rows: 10,000.", + "type": "string", + "format": "binary" + }, + "scope": { + "description": "Org scope for the import. `ORG` (default) targets the calling\nuser's current org. `CLUSTER` targets the All-Org context.", + "default": "ORG", + "type": "string", + "enum": [ + "ORG", + "CLUSTER" + ] + } + }, + "required": [ + "translations_file" + ] + } + } + }, + "required": true + }, + "parameters": [], + "responses": { + "204": { + "description": "Successfully imported manual translations." + }, + "400": { + "description": "Operation failed", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "401": { + "description": "Unauthorized access.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "403": { + "description": "Forbidden access.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "500": { + "description": "Operation failed", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + } + } + } + }, + "/api/rest/2.0/metadata/worksheets/convert": { + "post": { + "operationId": "convertWorksheetToModel", + "description": "\nConvert worksheets to models
Version: 10.6.0.cl or later\n\n## Prerequisites\n- **Privileges Required:**\n - `DATAMANAGEMENT` (Can manage data) or `ADMINISTRATION` (Can administer ThoughtSpot).\n- **Additional Privileges (if RBAC is enabled):**\n - `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` (Can manage data models).\n\n---\n\n## Usage Guidelines\n\n### Parameters\n\n1. **worksheet_ids** \n - **Description:** A comma-separated list of GUIDs (Globally Unique Identifiers) specifying the Worksheets to be converted. \n - **Usage:** \n - Used only when `convert_all` is set to `false`. \n - Leave empty or omit when `convert_all` is set to `true`.\n\n2. **exclude_worksheet_ids** \n - **Description:** A comma-separated list of GUIDs specifying Worksheets to be excluded from conversion. \n - **Usage:** \n - Useful when `convert_all` is set to `true` and specific Worksheets should not be converted.\n\n3. **convert_all** \n - **Description:** Sets the scope of conversion.\n - **Options:** \n - `true`: Converts all Worksheets in the system, except those specified in `exclude_worksheet_ids`. \n - `false`: Converts only the Worksheets listed in `worksheet_ids`.\n\n4. **apply_changes** \n - **Description:** Specifies whether to apply changes directly to ThoughtSpot or to generate a preview before applying any changes.Used for validation of conversion.\n - **Options:** \n - `true`: Applies conversion changes directly to ThoughtSpot.\n - `false`: Generates only a preview of the changes and does not apply any changes to ThoughtSpot\n\n---\n\n## Best Practices\n\n1. **Backup Before Conversion:** \n Always export metadata as a backup before initiating the conversion process\n\n2. **Partial Conversion for Testing:** \n Test the conversion process by setting `convert_all` to `false` and specifying a small number of `worksheet_ids`.\n\n3. **Verify Dependencies:** \n Check for dependent objects, such as Tables and Connections, to avoid invalid references.\n\n4. **Review Changes:** \n Use `apply_changes: false` to preview the impact of the conversion before applying changes.\n\n---\n\n## Examples\n\n### Convert Specific Worksheets\n```json\n{\n \"worksheet_ids\": [\"guid1\", \"guid2\", \"guid3\"],\n \"exclude_worksheet_ids\": [],\n \"convert_all\": false,\n \"apply_changes\": true\n}\n```\n\n### Convert All Accessible Worksheets\n```json\n{\n \"worksheet_ids\": [],\n \"exclude_worksheet_ids\": [],\n \"convert_all\": true,\n \"apply_changes\": true\n}\n```\n\n### Exclude Specific Worksheets While Converting All Accessible Worksheets\n```json\n{\n \"worksheet_ids\": [],\n \"exclude_worksheet_ids\": [\"abc\"],\n \"convert_all\": true,\n \"apply_changes\": true\n}\n```\n\n\n\n#### Endpoint URL\n", + "tags": [ + "Metadata", + "10.6.0.cl" + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ConvertWorksheetToModelRequest" + } + } + }, + "required": true + }, + "parameters": [], + "responses": { + "200": { + "description": "Conversion of worksheets to model done successfully.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ResponseWorksheetToModelConversion" + } + } + } + }, + "400": { + "description": "Invalid request.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "401": { + "description": "Unauthorized access.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "403": { + "description": "Forbidden access.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "500": { + "description": "Unexpected error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + } + } + } + }, + "/api/rest/2.0/metadata/copyobject": { + "post": { + "operationId": "copyObject", + "description": "\nMakes a copy of an Answer or Liveboard
Version: 10.3.0.cl or later\n\nCreates a copy of a metadata object.\n\nRequires at least view access to the metadata object being copied.\n\nUpon successful execution, the API creates a copy of the metadata object specified in the API request and returns the ID of the new object.\n\n\n\n\n#### Endpoint URL\n", + "tags": [ + "Metadata", + "10.3.0.cl" + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CopyObjectRequest" + } + } + }, + "required": true + }, + "parameters": [], + "responses": { + "200": { + "description": "Successfully created a copy of the object", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ResponseCopyObject" + } + } + } + }, + "400": { + "description": "Invalid request.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "401": { + "description": "Unauthorized access.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "403": { + "description": "Forbidden access.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "404": { + "description": "Object not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "500": { + "description": "Unexpected error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + } + } + } + }, + "/api/rest/2.0/metadata/delete": { + "post": { + "operationId": "deleteMetadata", + "description": "\n Version: 9.0.0.cl or later\n\nRemoves the specified metadata object from the ThoughtSpot system.\n\nRequires edit access to the metadata object. \n\n\n\n\n#### Endpoint URL\n", + "tags": [ + "Metadata", + "9.0.0.cl" + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/DeleteMetadataRequest" + } + } + }, + "required": true + }, + "parameters": [], + "responses": { + "204": { + "description": "Metadata objects successfully deleted." + }, + "400": { + "description": "Invalid request.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "401": { + "description": "Unauthorized access.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "403": { + "description": "Forbidden access.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "500": { + "description": "Unexpected error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + } + } + } + }, + "/api/rest/2.0/metadata/tml/export": { + "post": { + "operationId": "exportMetadataTML", + "description": "\n Version: 9.0.0.cl or later\n\nExports the [TML](https://docs.thoughtspot.com/cloud/latest/tml) representation of metadata objects in JSON or YAML format.\n\nRequires `DATADOWNLOADING` (**Can download Data**) and at least view access to the metadata object.\n\n#### Usage guidelines\n\n* You can export one or several objects by passing metadata object GUIDs in the `metadata` array.\n* When exporting TML content for a Liveboard or Answer object, you can set `export_associated` to `true` to retrieve TML content for underlying Worksheets, Tables, or Views, including the GUID of each object within the headers. When `export_associated` is set to `true`, consider retrieving one metadata object at a time.\n* Set `export_fqns` to `true` to add FQNs of the referenced objects in the TML content. For example, if you send an API request to retrieve TML for a Liveboard and its associated objects, the API returns the TML content with FQNs of the referenced Worksheet. Exporting TML with FQNs is useful if ThoughtSpot has multiple objects with the same name and you want to eliminate ambiguity when importing TML files into ThoughtSpot. It eliminates the need for adding FQNs of the referenced objects manually during the import operation.\n* To export only the TML of feedbacks associated with an object, set the GUID of the object as `identifier`, and set the `type` as `FEEDBACK` in the `metadata` array.\n* To export the TML of an object along with the feedbacks associated with it, set the GUID of the object as `identifier`, set the `type` as `LOGIAL_TABLE` in the `metadata` array, and set `export_with_associated_feedbacks` in `export_options` to true.\n\nFor more information, see [TML Documentation](https://developers.thoughtspot.com/docs/tml#_export_a_tml).\n\nFor more information on feedbacks, see [Feedback Documentation](https://docs.thoughtspot.com/cloud/latest/sage-feedback).\n\n\n\n#### Endpoint URL\n", + "tags": [ + "Metadata", + "9.0.0.cl" + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExportMetadataTMLRequest" + } + } + }, + "required": true + }, + "parameters": [], + "responses": { + "200": { + "description": "Export TMLs of specified metadata objects is successful.", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "type": "object" + } + } + } + } + }, + "400": { + "description": "Invalid request.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "401": { + "description": "Unauthorized access.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "403": { + "description": "Forbidden access.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "500": { + "description": "Unexpected error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + } + } + } + }, + "/api/rest/2.0/metadata/tml/export/batch": { + "post": { + "operationId": "exportMetadataTMLBatched", + "description": "\n Version: 10.1.0.cl or later\n\nExports the [TML](https://docs.thoughtspot.com/cloud/latest/tml) representation of metadata objects in JSON or YAML format.\n\n### **Permissions Required**\n\nRequires `DATAMANAGEMENT` (**Can manage data**) and `USERMANAGEMENT` (**Can manage users**) privileges.\n\n#### **Usage Guidelines**\n\nThis API is only applicable for `USER`, `GROUP`, and `ROLES` metadata types.\n\n- `batch_offset` Indicates the starting position within the complete dataset from which the API should begin returning objects. Useful for paginating results efficiently.\n- `batch_size` Specifies the number of objects or items to retrieve in a single request. Helps control response size for better performance.\n- `edoc_format` Defines the format of the TML content. The exported metadata can be in JSON or YAML format.\n- `export_dependent` Specifies whether to include dependent metadata objects in the export. Ensures related objects are also retrieved if needed.\n- `all_orgs_override` Indicates whether the export operation applies across all organizations. Useful for multi-tenant environments where cross-org exports are required.\n\n\n\n\n#### Endpoint URL\n", + "tags": [ + "Metadata", + "10.1.0.cl" + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExportMetadataTMLBatchedRequest" + } + } + }, + "required": true + }, + "parameters": [], + "responses": { + "200": { + "description": "Export TMLs of specified metadata objects is successful.", + "content": { + "application/json": { + "schema": { + "type": "object" + } + } + } + }, + "400": { + "description": "Invalid request.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "401": { + "description": "Unauthorized access.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "403": { + "description": "Forbidden access.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "500": { + "description": "Unexpected error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + } + } + } + }, + "/api/rest/2.0/metadata/answer/sql": { + "post": { + "operationId": "fetchAnswerSqlQuery", + "description": "\n Version: 9.0.0.cl or later\n\nFetches the underlying SQL query data for an Answer object.\n\nRequires at least view access to the Answer object.\n\nUpon successful execution, the API returns the SQL queries for the specified object as shown in this example:\n```\n{\n \"metadata_id\":\"8fbe44a8-46ad-4b16-8d39-184b2fada490\",\n \"metadata_name\":\"Total sales\",\n \"metadata_type\":\"ANSWER\",\n \"sql_queries\":[\n {\n \"metadata_id\":\"8fbe44a8-46ad-4b16-8d39-184b2fada490\",\n \"metadata_name\":\"Total sales -test\",\n \"sql_query\":\"SELECT \\n \\\"ta_1\\\".\\\"REGION\\\" \\\"ca_1\\\", \\n \\\"ta_2\\\".\\\"PRODUCTNAME\\\" \\\"ca_2\\\", \\n \\\"ta_1\\\".\\\"STORENAME\\\" \\\"ca_3\\\", \\n CASE\\n WHEN sum(\\\"ta_3\\\".\\\"SALES\\\") IS NOT NULL THEN sum(\\\"ta_3\\\".\\\"SALES\\\")\\n ELSE 0\\n END \\\"ca_4\\\", \\n CASE\\n WHEN sum(\\\"ta_3\\\".\\\"QUANTITYPURCHASED\\\") IS NOT NULL THEN sum(\\\"ta_3\\\".\\\"QUANTITYPURCHASED\\\")\\n ELSE 0\\n END \\\"ca_5\\\"\\nFROM \\\"RETAILAPPAREL\\\".\\\"PUBLIC\\\".\\\"FACT_RETAPP_SALES\\\" \\\"ta_3\\\"\\n JOIN \\\"RETAILAPPAREL\\\".\\\"PUBLIC\\\".\\\"DIM_RETAPP_STORES\\\" \\\"ta_1\\\"\\n ON \\\"ta_3\\\".\\\"STOREID\\\" = \\\"ta_1\\\".\\\"STOREID\\\"\\n JOIN \\\"RETAILAPPAREL\\\".\\\"PUBLIC\\\".\\\"DIM_RETAPP_PRODUCTS\\\" \\\"ta_2\\\"\\n ON \\\"ta_3\\\".\\\"PRODUCTID\\\" = \\\"ta_2\\\".\\\"PRODUCTID\\\"\\nGROUP BY \\n \\\"ca_1\\\", \\n \\\"ca_2\\\", \\n \\\"ca_3\\\"\\n\"\n }\n ]\n}\n```\n\n\n\n\n#### Endpoint URL\n", + "tags": [ + "Metadata", + "9.0.0.cl" + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/FetchAnswerSqlQueryRequest" + } + } + }, + "required": true + }, + "parameters": [], + "responses": { + "200": { + "description": "Fetching SQL query of specified metadata object is successful.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SqlQueryResponse" + } + } + } + }, + "400": { + "description": "Invalid request.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "401": { + "description": "Unauthorized access.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "403": { + "description": "Forbidden access.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "500": { + "description": "Unexpected error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + } + } + } + }, + "/api/rest/2.0/metadata/tml/async/status": { + "post": { + "operationId": "fetchAsyncImportTaskStatus", + "description": "\n Version: 10.4.0.cl or later\n\nGets information about the status of the TML async import task scheduled using the `/api/rest/2.0/metadata/tml/async/import` API call.\n\nTo fetch the task details, specify the ID of the TML async import task. \n\nRequires access to the task ID. The API allows users who initiated the asynchronous TML import via `/api/rest/2.0/metadata/tml/async/import` to view the status of their tasks. Users with administration privilege can view the status of all import tasks initiated by the users in their Org.\n\n#### Usage guidelines\n\nSee [TML API Documentation](https://developers.thoughtspot.com/docs/tml#_fetch_status_of_the_tml_import_task) for usage guidelines.\n\n\n\n#### Endpoint URL\n", + "tags": [ + "Metadata", + "10.4.0.cl" + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/FetchAsyncImportTaskStatusRequest" + } + } + }, + "required": true + }, + "parameters": [], + "responses": { + "200": { + "description": "Async TML Import Task statuses fetched successfully.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/GetAsyncImportStatusResponse" + } + } + } + }, + "400": { + "description": "Invalid request.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "401": { + "description": "Unauthorized access.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "403": { + "description": "Forbidden access.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "500": { + "description": "Unexpected error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + } + } + } + }, + "/api/rest/2.0/metadata/liveboard/sql": { + "post": { + "operationId": "fetchLiveboardSqlQuery", + "description": "\n Version: 9.0.0.cl or later\n\nFetches the underlying SQL query data for a Liveboard object and its visualizations.\n\nRequires at least view access to the Liveboard object.\n\nTo get SQL query data for a Liveboard, specify the GUID of the Liveboard. Optionally, you can add an array of visualization GUIDs to retrieve the SQL query data for visualizations in the Liveboard.\n\nUpon successful execution, the API returns the SQL queries for the specified object as shown in this example:\n```\n{\n \"metadata_id\": \"fa68ae91-7588-4136-bacd-d71fb12dda69\",\n \"metadata_name\": \"Total Sales\",\n \"metadata_type\": \"LIVEBOARD\",\n \"sql_queries\": [\n {\n \"metadata_id\": \"b3b6d2b9-089a-490c-8e16-b144650b7843\",\n \"metadata_name\": \"Total quantity purchased, Total sales by region\",\n \"sql_query\": \"SELECT \\n \\\"ta_1\\\".\\\"REGION\\\" \\\"ca_1\\\", \\n CASE\\n WHEN sum(\\\"ta_2\\\".\\\"QUANTITYPURCHASED\\\") IS NOT NULL THEN sum(\\\"ta_2\\\".\\\"QUANTITYPURCHASED\\\")\\n ELSE 0\\n END \\\"ca_2\\\", \\n CASE\\n WHEN sum(\\\"ta_2\\\".\\\"SALES\\\") IS NOT NULL THEN sum(\\\"ta_2\\\".\\\"SALES\\\")\\n ELSE 0\\n END \\\"ca_3\\\"\\nFROM \\\"RETAILAPPAREL\\\".\\\"PUBLIC\\\".\\\"FACT_RETAPP_SALES\\\" \\\"ta_2\\\"\\n JOIN \\\"RETAILAPPAREL\\\".\\\"PUBLIC\\\".\\\"DIM_RETAPP_STORES\\\" \\\"ta_1\\\"\\n ON \\\"ta_2\\\".\\\"STOREID\\\" = \\\"ta_1\\\".\\\"STOREID\\\"\\nGROUP BY \\\"ca_1\\\"\"\n }\n ]\n}\n```\n\n\n\n\n#### Endpoint URL\n", + "tags": [ + "Metadata", + "9.0.0.cl" + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/FetchLiveboardSqlQueryRequest" + } + } + }, + "required": true + }, + "parameters": [], + "responses": { + "200": { + "description": "Fetching SQL query of specified metadata object is successful.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SqlQueryResponse" + } + } + } + }, + "400": { + "description": "Invalid request.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "401": { + "description": "Unauthorized access.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "403": { + "description": "Forbidden access.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "500": { + "description": "Unexpected error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + } + } + } + }, + "/api/rest/2.0/metadata/tml/import": { + "post": { + "operationId": "importMetadataTML", + "description": "\n Version: 9.0.0.cl or later\n\nImports [TML](https://docs.thoughtspot.com/cloud/latest/tml) files into ThoughtSpot.\n\nRequires `DATAMANAGEMENT` (**Can manage data**) or `ADMINISTRATION` (**Can administer ThoughtsSpot**) privilege.\n\nIf [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the following Data control privileges may be required:\n- `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**)\n- `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` (**Can manage data models**)\n\n#### Usage guidelines\n\n* Import all related objects in a single TML Import API call. For example, Tables that use the same Connection object and Worksheets connected to these Tables.\n* Include the `fqn` property to distinguish objects that have the same name.\n For example, if you have multiple Connections or Worksheets with the same name on ThoughtSpot and the Connection or Worksheet referenced in your TML file does not have a unique name to distinguish, it may result in invalid object references.\n Adding `fqn` helps ThoughtSpot differentiate a Table from another with the same name.\n We recommend [exporting TML with FQNs](#/http/api-endpoints/metadata/export-metadata-tml) and using these during the import operation.\n* You can upload multiple TML files at a time.\n If you import a Worksheet along with Liveboards, Answers, and other dependent objects in a single API call, the imported objects will be immediately available for use.\n When you import only a Worksheet object, it may take some time for the Worksheet to become available in the ThoughtSpot system. Please wait for a few minutes, and then proceed to create an Answer and Liveboard from the newly imported Worksheet.\n\nFor more information, see [TML Documentation](https://developers.thoughtspot.com/docs/tml#_import_a_tml).\n\n\n\n\n#### Endpoint URL\n", + "tags": [ + "Metadata", + "9.0.0.cl" + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ImportMetadataTMLRequest" + } + } + }, + "required": true + }, + "parameters": [], + "responses": { + "200": { + "description": "Import metadata objects using specified TMLs is successful.", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "type": "object" + } + } + } + } + }, + "400": { + "description": "Invalid request.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "401": { + "description": "Unauthorized access.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "403": { + "description": "Forbidden access.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "500": { + "description": "Unexpected error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + } + } + } + }, + "/api/rest/2.0/metadata/tml/async/import": { + "post": { + "operationId": "importMetadataTMLAsync", + "description": "\n Version: 10.4.0.cl or later\n\nSchedules a task to import [TML](https://docs.thoughtspot.com/cloud/latest/tml) files into ThoughtSpot. You can use this API endpoint to process TML objects asynchronously when importing TMLs of large and complex metadata objects into ThoughtSpot. Unlike the synchronous import TML operation, the API processes TML data in the background and returns a task ID, which can be used to check the status of the import task via `/api/rest/2.0/metadata/tml/async/status` API endpoint.\n\nRequires `DATAMANAGEMENT` (**Can manage data**) or `ADMINISTRATION` (**Can administer ThoughtsSpot**) privilege, and edit access to the TML objects.\n\nIf [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the following Data control privileges may be required:\n- `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**)\n- `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` (**Can manage data models**)\n\n#### Usage guidelines\n\nSee [Async TML API Documentation](https://developers.thoughtspot.com/docs/tml#_import_tml_objects_asynchronously) for usage guidelines.\n\n\n\n\n#### Endpoint URL\n", + "tags": [ + "Metadata", + "10.4.0.cl" + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ImportMetadataTMLAsyncRequest" + } + } + }, + "required": true + }, + "parameters": [], + "responses": { + "200": { + "description": "Async TML Import Task submitted successfully.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ImportEPackAsyncTaskStatus" + } + } + } + }, + "400": { + "description": "Invalid request.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "401": { + "description": "Unauthorized access.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "403": { + "description": "Forbidden access.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "500": { + "description": "Unexpected error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + } + } + } + }, + "/api/rest/2.0/metadata/parameterize": { + "post": { + "operationId": "parameterizeMetadata", + "description": "\nParameterize fields in metadata objects.
Beta Version: 10.9.0.cl or later\n\n**Note:** This API endpoint is deprecated and will be removed from ThoughtSpot in a future release. Use [POST /api/rest/2.0/metadata/parameterize-fields](/api/rest/2.0/metadata/parameterize-fields) instead.\n\nAllows parameterizing fields in metadata objects in ThoughtSpot.\n\nRequires appropriate permissions to modify the metadata object.\n\nThe API endpoint allows parameterizing the following types of metadata objects:\n* Logical Tables\n* Connections\n* Connection Configs\n\nFor a Logical Table the field type must be `ATTRIBUTE` and field name can be one of:\n* databaseName\n* schemaName\n* tableName\n\nFor a Connection or Connection Config, the field type is always `CONNECTION_PROPERTY`. In this case, field_name specifies the exact property of the Connection or Connection Config that needs to be parameterized.\n\nFor Connection Config, the only supported field name is:\n* impersonate_user\n\n\n\n\n#### Endpoint URL\n", + "deprecated": true, + "tags": [ + "Metadata", + "10.9.0.cl" + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ParameterizeMetadataRequest" + } + } + }, + "required": true + }, + "parameters": [], + "responses": { + "204": { + "description": "Parameterize successful." + }, + "400": { + "description": "Invalid request.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "401": { + "description": "Unauthorized access.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "403": { + "description": "Forbidden access.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "500": { + "description": "Unexpected error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + } + } + } + }, + "/api/rest/2.0/metadata/parameterize-fields": { + "post": { + "operationId": "parameterizeMetadataFields", + "description": "\nParameterize multiple fields of metadata objects. For example [schemaName, databaseName] for LOGICAL_TABLE.
Version: 26.5.0.cl or later\n\nAllows parameterizing multiple fields of metadata objects in ThoughtSpot. For example, you can parameterize [schemaName, databaseName] for LOGICAL_TABLE.\n\nRequires appropriate permissions to modify the metadata object.\n\nThe API endpoint allows parameterizing the following types of metadata objects:\n* Logical Tables\n* Connections\n* Connection Configs\n\nFor a Logical Table, the field type must be `ATTRIBUTE` and field names can include:\n* databaseName\n* schemaName\n* tableName\n\nFor a Connection or Connection Config, the field type is always `CONNECTION_PROPERTY`. In this case, field_names specifies the exact properties of the Connection or Connection Config that need to be parameterized.\n\nFor Connection Config, supported field names include:\n* impersonate_user\n\nYou can parameterize multiple fields at once by providing an array of field names.\n\n\n\n\n#### Endpoint URL\n", + "tags": [ + "Metadata", + "26.5.0.cl" + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ParameterizeMetadataFieldsRequest" + } + } + }, + "required": true + }, + "parameters": [], + "responses": { + "204": { + "description": "Parameterize successful." + }, + "400": { + "description": "Invalid request.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "401": { + "description": "Unauthorized access.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "403": { + "description": "Forbidden access.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "500": { + "description": "Unexpected error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + } + } + } + }, + "/api/rest/2.0/metadata/search": { + "post": { + "operationId": "searchMetadata", + "description": "\n Version: 9.0.0.cl or later\n\nGets a list of metadata objects available on the ThoughtSpot system.\n\nThis API endpoint is available to all users who have view access to the object. Users with `ADMINISTRATION` (**Can administer ThoughtSpot**) privileges can view data for all metadata objects, including users and groups.\n\n#### Usage guidelines\n\n- To get all metadata objects, send the API request without any attributes.\n- To get metadata objects of a specific type, set the `type` attribute. For example, to fetch a Worksheet, set the type as `LOGICAL_TABLE`.\n- To filter metadata objects within type `LOGICAL_TABLE`, set the `subtypes` attribute. For example, to fetch a Worksheet, set the type as `LOGICAL_TABLE` & subtypes as `[WORKSHEET]`.\n- To get a specific metadata object, specify the GUID.\n- To customize your search and filter the API response, you can use several parameters.\n You can search for objects created or modified by specific users, by tags applied to the objects, or by using the include parameters like `include_auto_created_objects`, `include_dependent_objects`, `include_headers`, `include_incomplete_objects`, and so on.\n You can also define sorting options to sort the data retrieved in the API response.\n- To get discoverable objects when linientmodel is enabled you can use `include_discoverable_objects` as true else false. Default value is true.\n- For liveboard metadata type, to get the newer format, set the `liveboard_response_format` as V2. Default value is V1.\n- To retrieve only objects that are published, set the `include_only_published_objects` as true. Default value is false.\n\n**NOTE**: The following parameters support pagination of metadata records:\n\n- `tag_identifiers`\n- `type`\n- `subtypes`\n- `created_by_user_identifiers`\n- `modified_by_user_identifiers`\n- `owned_by_user_identifiers`\n- `exclude_objects`\n- `include_auto_created_objects`\n- `favorite_object_options`\n- `include_only_published_objects`\nIf you are using other parameters to search metadata, set `record_size` to `-1` and `record_offset` to `0`.\n\n\n\n\n#### Endpoint URL\n", + "tags": [ + "Metadata", + "9.0.0.cl" + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SearchMetadataRequest" + } + } + }, + "required": true + }, + "parameters": [], + "responses": { + "200": { + "description": "Metadata objects search result.", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/MetadataSearchResponse" + } + } + } + } + }, + "400": { + "description": "Invalid request.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "401": { + "description": "Unauthorized access.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "403": { + "description": "Forbidden access.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "500": { + "description": "Unexpected error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + } + } + } + }, + "/api/rest/2.0/metadata/unparameterize": { + "post": { + "operationId": "unparameterizeMetadata", + "description": "\nRemove parameterization from fields in metadata objects.
Version: 26.5.0.cl or later\n\nAllows removing parameterization from fields in metadata objects in ThoughtSpot.\n\nRequires appropriate permissions to modify the metadata object.\n\nThe API endpoint allows unparameterizing the following types of metadata objects:\n* Logical Tables\n* Connections\n* Connection Configs\n\nFor a Logical Table the field type must be `ATTRIBUTE` and field name can be one of:\n* databaseName\n* schemaName\n* tableName\n\nFor a Connection or Connection Config, the field type is always `CONNECTION_PROPERTY`. In this case, field_name specifies the exact property of the Connection or Connection Config that needs to be unparameterized.\n\nFor Connection Config, the only supported field name is:\n* impersonate_user\n\n\n\n\n#### Endpoint URL\n", + "tags": [ + "Metadata", + "26.5.0.cl" + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnparameterizeMetadataRequest" + } + } + }, + "required": true + }, + "parameters": [], + "responses": { + "204": { + "description": "Successfuly removed parameters." + }, + "400": { + "description": "Invalid request.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "401": { + "description": "Unauthorized access.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "403": { + "description": "Forbidden access.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "500": { + "description": "Unexpected error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + } + } + } + }, + "/api/rest/2.0/metadata/headers/update": { + "post": { + "operationId": "updateMetadataHeader", + "description": "\nUpdate header attributes for a given list of header objects.
Beta Version: 10.6.0.cl or later\n\n## Prerequisites\n- **Privileges Required:**\n - `DATAMANAGEMENT` (Can manage data) or `ADMINISTRATION` (Can administer ThoughtSpot).\n- **Additional Privileges (if RBAC is enabled):**\n - `ORG_ADMINISTRATION` (Can manage orgs).\n\n---\n\n## Usage Guidelines\n\n### Parameters\n\n1. **headers_update** \n - **Description:** List of header objects with their attributes to be updated. Each object contains a list of attributes to be updated in the header.\n - **Usage:**\n - You must provide either `identifier` or `obj_identifier`, but not both. Both fields cannot be empty.\n - When `org_identifier` is set to `-1`, only the `identifier` value is accepted; `obj_identifier` is not allowed.\n\n2. **org_identifier** \n - **Description:** GUID (Globally Unique Identifier) or name of the organization. \n - **Usage:**\n - Leaving this field empty assumes that the changes should be applied to the current organization \n - Provide `org_guid` or `org_name` to uniquely identify the organization where changes need to be applied. .\n - Provide `-1` if changes have to be applied across all the org.\n\n---\n\n## Note\nCurrently, this API is enabled only for updating the `obj_identifier` attribute. Only `text` will be allowed in attribute's value.\n\n## Best Practices\n\n1. **Backup Before Conversion:** \n Always export metadata as a backup before initiating the update process\n\n---\n\n## Examples\n\n### Only `identifier` is given \n```json\n{\n \"headers_update\":\n [\n {\n \"identifier\": \"guid_1\",\n \"obj_identifier\": \"\",\n \"type\": \"LOGICAL_COLUMN\",\n \"attributes\":\n [\n {\n \"name\": \"obj_id\",\n \"value\": \"custom_object_id\"\n }\n ]\n }\n ],\n \"org_identifier\": \"orgGuid\"\n}\n```\n\n### Only `obj_identifier` is given\n```json\n{\n \"headers_update\":\n [\n {\n \"obj_identifier\": \"custom_object_id\",\n \"type\": \"ANSWER\",\n \"attributes\":\n [\n {\n \"name\": \"obj_id\",\n \"value\": \"custom_object_id\"\n }\n ]\n }\n ],\n \"org_identifier\": \"orgName\"\n}\n```\n\n### Executing update for all org `-1`\n```json\n{\n \"headers_update\":\n [\n {\n \"identifier\": \"guid_1\",\n \"type\": \"ANSWER\",\n \"attributes\":\n [\n {\n \"name\": \"obj_id\",\n \"value\": \"custom_object_id\"\n }\n ]\n }\n ],\n \"org_identifier\": -1\n}\n```\n\n### Optional `type` is not provided\n```json\n{\n \"headers_update\":\n [\n {\n \"identifier\": \"guid_1\",\n \"attributes\":\n [\n {\n \"name\": \"obj_id\",\n \"value\": \"custom_object_id\"\n }\n ]\n }\n ],\n \"org_identifier\": -1\n}\n```\n\n\n\n#### Endpoint URL\n", + "tags": [ + "Metadata", + "10.6.0.cl" + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UpdateMetadataHeaderRequest" + } + } + }, + "required": true + }, + "parameters": [], + "responses": { + "204": { + "description": "Headers update was successful." + }, + "400": { + "description": "Invalid request.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "401": { + "description": "Unauthorized access.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "403": { + "description": "Forbidden access.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "500": { + "description": "Unexpected error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + } + } + } + }, + "/api/rest/2.0/metadata/update-obj-id": { + "post": { + "operationId": "updateMetadataObjId", + "description": "\nUpdate object IDs for given metadata objects.
Beta Version: 10.8.0.cl or later\n\n## Prerequisites\n- **Privileges Required:**\n - `DATAMANAGEMENT` (Can manage data) or `ADMINISTRATION` (Can administer ThoughtSpot).\n- **Additional Privileges (if RBAC is enabled):**\n - `ORG_ADMINISTRATION` (Can manage orgs).\n\n---\n\n## Usage Guidelines\n\n### Parameters\n\n1. **metadata** \n - **Description:** List of metadata objects to update their object IDs.\n - **Usage:**\n - Use either `current_obj_id` alone OR use `metadata_identifier` with `type` (when needed).\n - When using `metadata_identifier`, the `type` field is required if using a name instead of a GUID.\n - The `new_obj_id` field is always required.\n\n---\n\n## Note\nThis API is specifically designed for updating object IDs of metadata objects. It internally uses the header update mechanism to perform the changes.\n\n## Best Practices\n\n1. **Backup Before Update:** \n Always export metadata as a backup before initiating the update process.\n\n2. **Validation:**\n - When using `current_obj_id`, ensure it matches the existing object ID exactly.\n - When using `metadata_identifier` with a name, ensure the `type` is specified correctly.\n - Verify that the `new_obj_id` follows your naming conventions and is unique within your system.\n\n---\n\n## Examples\n\n### Using current_obj_id\n```json\n{\n \"metadata\": [\n {\n \"current_obj_id\": \"existing_object_id\",\n \"new_obj_id\": \"new_object_id\"\n }\n ]\n}\n```\n\n### Using metadata_identifier with GUID\n```json\n{\n \"metadata\": [\n {\n \"metadata_identifier\": \"01234567-89ab-cdef-0123-456789abcdef\",\n \"new_obj_id\": \"new_object_id\"\n }\n ]\n}\n```\n\n### Using metadata_identifier with name and type\n```json\n{\n \"metadata\": [\n {\n \"metadata_identifier\": \"My Answer\",\n \"type\": \"ANSWER\",\n \"new_obj_id\": \"new_object_id\"\n }\n ]\n}\n```\n\n### Multiple objects update\n```json\n{\n \"metadata\": [\n {\n \"current_obj_id\": \"existing_object_id_1\",\n \"new_obj_id\": \"new_object_id_1\"\n },\n {\n \"metadata_identifier\": \"My Worksheet\",\n \"type\": \"LOGICAL_TABLE\",\n \"new_obj_id\": \"new_object_id_2\"\n }\n ]\n}\n```\n\n\n\n\n#### Endpoint URL\n", + "tags": [ + "Metadata", + "10.8.0.cl" + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UpdateMetadataObjIdRequest" + } + } + }, + "required": true + }, + "parameters": [], + "responses": { + "204": { + "description": "Headers update was successful." + }, + "400": { + "description": "Invalid request.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "401": { + "description": "Unauthorized access.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "403": { + "description": "Forbidden access.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "500": { + "description": "Unexpected error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + } + } + } + }, + "/api/rest/2.0/orgs/create": { + "post": { + "operationId": "createOrg", + "description": "\n Version: 9.0.0.cl or later\n\nCreates an Org object.\n\nTo use this API, the [Orgs](https://docs.thoughtspot.com/cloud/latest/orgs-overview) feature must be enabled in your cluster.\n\nRequires cluster administration (**Can administer Org**) privileges.\nIf [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `ORG_ADMINISTRATION` (**Can manage Orgs**) privilege is required.\n\n\n\n\n#### Endpoint URL\n", + "tags": [ + "Orgs", + "9.0.0.cl" + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CreateOrgRequest" + } + } + }, + "required": true + }, + "parameters": [], + "responses": { + "200": { + "description": "Organization successfully created.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/OrgResponse" + }, + "examples": { + "example_1": { + "value": { + "id": 1980035173, + "name": "test_org", + "status": "ACTIVE", + "description": "test_org", + "visibility": "SHOW" + } + } + } + } + } + }, + "400": { + "description": "Invalid request.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "401": { + "description": "Unauthorized access.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "403": { + "description": "Forbidden access.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "500": { + "description": "Unexpected error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + } + } + } + }, + "/api/rest/2.0/orgs/{org_identifier}/delete": { + "post": { + "operationId": "deleteOrg", + "description": "\n Version: 9.0.0.cl or later\n\nDeletes an Org object from the ThoughtSpot system.\n\nRequires cluster administration (**Can administer Org**) privilege.\nIf [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `ORG_ADMINISTRATION` (**Can manage Orgs**) privilege is required.\n\nWhen you delete an Org, all its users and objects created in that Org context are removed. However, if the users in the deleted Org also exists in other Orgs, they are removed only from the deleted Org.\n\n\n\n\n#### Endpoint URL\n", + "tags": [ + "Orgs", + "9.0.0.cl" + ], + "parameters": [ + { + "in": "path", + "name": "org_identifier", + "required": true, + "schema": { + "type": "string" + }, + "description": "ID or name of the Org" + } + ], + "responses": { + "204": { + "description": "Organization successfully deleted." + }, + "400": { + "description": "Invalid request.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "401": { + "description": "Unauthorized access.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "403": { + "description": "Forbidden access.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "500": { + "description": "Unexpected error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + } + } + } + }, + "/api/rest/2.0/orgs/search": { + "post": { + "operationId": "searchOrgs", + "description": "\n Version: 9.0.0.cl or later\n\nGets a list of Orgs configured on the ThoughtSpot system. To get details of a specific Org, specify the Org ID or name. You can also pass parameters such as status, visibility, and user identifiers to get a specific list of Orgs.\n\nRequires cluster administration (**Can administer Org**) privileges.\nIf [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `ORG_ADMINISTRATION` (**Can manage Orgs**) privilege is required.\n\n\n\n\n#### Endpoint URL\n", + "tags": [ + "Orgs", + "9.0.0.cl" + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SearchOrgsRequest" + } + } + }, + "required": true + }, + "parameters": [], + "responses": { + "200": { + "description": "Organization search result.", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/OrgResponse" + } + }, + "examples": { + "example_1": { + "value": [ + { + "id": 0, + "name": "Primary", + "status": "ACTIVE", + "description": "Primary Org", + "visibility": "SHOW" + }, + { + "id": 583464508, + "name": "test_org", + "status": "ACTIVE", + "description": "test_org", + "visibility": "SHOW" + } + ] + } + } + } + } + }, + "400": { + "description": "Invalid request.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "401": { + "description": "Unauthorized access.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "403": { + "description": "Forbidden access.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "500": { + "description": "Unexpected error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + } + } + } + }, + "/api/rest/2.0/orgs/{org_identifier}/update": { + "post": { + "operationId": "updateOrg", + "description": "\n Version: 9.0.0.cl or later\n\nUpdates an Org object. You can modify Org properties such as name, description, and user associations.\n\nRequires cluster administration (**Can administer Org**) privileges.\nIf [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `ORG_ADMINISTRATION` (**Can manage Orgs**) privilege is required.\n\n\n\n\n#### Endpoint URL\n", + "tags": [ + "Orgs", + "9.0.0.cl" + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UpdateOrgRequest" + } + } + }, + "required": true + }, + "parameters": [ + { + "in": "path", + "name": "org_identifier", + "required": true, + "schema": { + "type": "string" + }, + "description": "ID or name of the Org" + } + ], + "responses": { + "204": { + "description": "Organization successfully updated." + }, + "400": { + "description": "Invalid request.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "401": { + "description": "Unauthorized access.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "403": { + "description": "Forbidden access.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "500": { + "description": "Unexpected error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + } + } + } + }, + "/api/rest/2.0/report/answer": { + "post": { + "operationId": "exportAnswerReport", + "description": "\n Version: 9.0.0.cl or later\n\nExports an Answer in the given file format. You can download the Answer data as a PDF, PNG, CSV, or XLSX file.\n\nRequires at least view access to the Answer.\n\n#### Usage guidelines\n\nIn the request body, specify the GUID or name of the Answer and set `file_format`. The default file format is CSV.\n\nUse the `type` parameter to specify whether the Answer being exported is a saved Answer (`SAVED`) or a pinned Answer on a Liveboard (`PINNED`). Defaults to `SAVED`. When using `PINNED`, the `metadata_identifier` must be the container id.\n\n**NOTE**:\n* The downloadable file returned in API response file is extensionless. Please rename the downloaded file by typing in the relevant extension.\n* HTML rendering is not supported for PDF exports of Answers with tables.\n\nOptionally, you can define [runtime overrides](https://developers.thoughtspot.com/docs/fetch-data-and-report-apis#_runtime_overrides) to apply to the Answer data. \n\n\n\n#### Endpoint URL\n", + "tags": [ + "Reports", + "9.0.0.cl" + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExportAnswerReportRequest" + } + } + }, + "required": true + }, + "parameters": [], + "responses": { + "200": { + "description": "Export report file of specified metadata object is successful.", + "content": { + "application/octet-stream": {} + } + }, + "400": { + "description": "Invalid request.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "401": { + "description": "Unauthorized access.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "403": { + "description": "Forbidden access.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "500": { + "description": "Unexpected error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + } + } + } + }, + "/api/rest/2.0/report/liveboard": { + "post": { + "operationId": "exportLiveboardReport", + "description": "\n Version: 9.0.0.cl or later\n\nExports a Liveboard and its visualizations in PDF, PNG, CSV, or XLSX file format.\nThe default `file_format` is CSV.\n\nRequires at least view access to the Liveboard.\n\n#### Usage guidelines\n\nIn the request body, specify the GUID or name of the Liveboard. To generate a Liveboard report with specific visualizations, add GUIDs or names of the visualizations.\n\n**NOTE**: \n\n* The downloadable file returned in API response file is extensionless. Please rename the downloaded file by typing in the relevant extension.\n\n* Optionally, you can define [runtime overrides](https://developers.thoughtspot.com/docs/fetch-data-and-report-apis#_runtime_overrides) to apply to the Answer data.\n\n* To include unsaved changes in the report, pass the `transient_pinboard_content` script generated from the `getExportRequestForCurrentPinboard` method in the Visual Embed SDK. Upon successful execution, the API returns the report with unsaved changes, including ad hoc changes to visualizations. For more information, see [Liveboard Report API](https://developers.thoughtspot.com/docs/fetch-data-and-report-apis#_liveboard_report_api). \n\n* Starting with ThoughtSpot Cloud 10.9.0.cl release, the Liveboard can be exported in the PNG format in the resolution of your choice. To enable this on your instance, contact ThoughtSpot support. When this feature is enabled, the options `include_cover_page`,`include_filter_page` within the `png_options` will not be available for PNG exports.\n\n* Starting with the ThoughtSpot Cloud 26.2.0.cl release,\n\n * Liveboards can be exported in CSV format. \n * All visualizations within a Liveboard can be exported as individual CSV files. \n * When exporting multiple visualizations or the entire Liveboard, the system returns the report as a compressed ZIP file containing the separate CSV files for each visualization.\n\n * Liveboards can also be exported in XLSX format. \n * All selected visualizations are consolidated into a single Excel workbook (.xlsx), with each visualization placed in its own worksheet (tab). \n * XLSX exports are limited to a maximum of 255 worksheets (tabs) per workbook.\n\n\n\n#### Endpoint URL\n", + "tags": [ + "Reports", + "9.0.0.cl" + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExportLiveboardReportRequest" + } + } + }, + "required": true + }, + "parameters": [], + "responses": { + "200": { + "description": "Export report file of specified metadata object is successful.", + "content": { + "application/octet-stream": {} + } + }, + "400": { + "description": "Invalid request.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "401": { + "description": "Unauthorized access.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "403": { + "description": "Forbidden access.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "500": { + "description": "Unexpected error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + } + } + } + }, + "/api/rest/2.0/roles/create": { + "post": { + "operationId": "createRole", + "description": "\n Version: 9.5.0.cl or later\n\nCreates a Role object in ThoughtSpot.\n\nAvailable only if [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance. To create a Role, the `ROLE_ADMINISTRATION` (**Can manage roles**) privilege is required.\n\n\n\n\n#### Endpoint URL\n", + "tags": [ + "Roles", + "9.5.0.cl" + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CreateRoleRequest" + } + } + }, + "required": true + }, + "parameters": [], + "responses": { + "200": { + "description": "Role successfully created.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/RoleResponse" + } + } + } + }, + "400": { + "description": "Invalid parameters.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "401": { + "description": "Unauthorized access.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "403": { + "description": "Forbidden access.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "500": { + "description": "Internal error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + } + } + } + }, + "/api/rest/2.0/roles/{role_identifier}/delete": { + "post": { + "operationId": "deleteRole", + "description": "\n Version: 9.5.0.cl or later\n\nDeletes a Role object from the ThoughtSpot system.\n\nAvailable only if [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance. To delete a Role, the `ROLE_ADMINISTRATION` (**Can manage roles**) privilege is required.\n\n\n\n\n#### Endpoint URL\n", + "tags": [ + "Roles", + "9.5.0.cl" + ], + "parameters": [ + { + "in": "path", + "name": "role_identifier", + "required": true, + "schema": { + "type": "string" + }, + "description": "Unique ID or name of the Role. ReadOnly roles cannot be deleted." + } + ], + "responses": { + "204": { + "description": "Role successfully deleted." + }, + "400": { + "description": "Invalid request.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "401": { + "description": "Unauthorized access.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "403": { + "description": "Forbidden access.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "500": { + "description": "Internal error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + } + } + } + }, + "/api/rest/2.0/roles/search": { + "post": { + "operationId": "searchRoles", + "description": "\n Version: 9.5.0.cl or later\n\nGets a list of Role objects from the ThoughtSpot system.\n\nAvailable if [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance. To search for Roles, the `ROLE_ADMINISTRATION` (**Can manage roles**) privilege is required.\n\nTo get details of a specific Role object, specify the GUID or name. You can also filter the API response based on user group and Org identifiers, privileges assigned to the Role, and deprecation status.\n\n\n\n\n#### Endpoint URL\n", + "tags": [ + "Roles", + "9.5.0.cl" + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SearchRolesRequest" + } + } + }, + "required": true + }, + "parameters": [], + "responses": { + "200": { + "description": "Roles search result.", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/SearchRoleResponse" + } + } + } + } + }, + "400": { + "description": "Invalid request.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "401": { + "description": "Unauthorized access.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "403": { + "description": "Forbidden access.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "500": { + "description": "Internal error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + } + } + } + }, + "/api/rest/2.0/roles/{role_identifier}/update": { + "post": { + "operationId": "updateRole", + "description": "\n Version: 9.5.0.cl or later\n\nUpdates the properties of a Role object.\n\nAvailable only if [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance. To update a Role, the `ROLE_ADMINISTRATION` (**Can manage roles**) privilege is required.\n\n\n\n\n#### Endpoint URL\n", + "tags": [ + "Roles", + "9.5.0.cl" + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UpdateRoleRequest" + } + } + }, + "required": true + }, + "parameters": [ + { + "in": "path", + "name": "role_identifier", + "required": true, + "schema": { + "type": "string" + }, + "description": "Unique ID or name of the Role." + } + ], + "responses": { + "200": { + "description": "Role successfully updated.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/RoleResponse" + } + } + } + }, + "400": { + "description": "Invalid request.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "401": { + "description": "Unauthorized access.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "403": { + "description": "Forbidden access.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "500": { + "description": "Unexpected error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + } + } + } + }, + "/api/rest/2.0/schedules/create": { + "post": { + "operationId": "createSchedule", + "description": "\nCreate schedule.
Version: 9.4.0.cl or later\n\nCreates a Liveboard schedule job.\n\nRequires at least edit access to Liveboards. To create a schedule on behalf of another user, you need `ADMINISTRATION` (**Can administer Org**) or `JOBSCHEDULING` (**Can schedule for others**) privilege and edit access to the Liveboard.\nIf [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `JOBSCHEDULING` (**Can schedule for others**) privilege is required.\n\nIf RBAC is enabled, creating a schedule also requires the download privilege that corresponds to the selected `file_format`: `CSV` and `XLSX` require the `CAN_DOWNLOAD_DETAILED_DATA` (**Can download detailed data**) privilege, and `PDF` requires the `CAN_DOWNLOAD_VISUALS` (**Can download visuals**) privilege.\n\n#### Usage guidelines\n\n* The description text is mandatory. The description text appears as **Description: ** in the Liveboard schedule email notifications.\n* For Liveboards with both charts and tables, schedule creation is only supported in PDF and XLS formats. Schedules created in CSV formats for such Liveboards will fail to run. If `PDF` is set as the `file_format`, enable `pdf_options` to get the correct attachment. Not doing so may cause the attachment to be rendered empty.\n* To include only specific visualizations, specify the visualization GUIDs in the `visualization_identifiers` array.\n* You can schedule a Liveboard job to run periodically by setting frequency parameters. You can set the schedule to run daily, weekly, monthly or every n minutes or hours. The scheduled job can also be configured to run at a specific time of the day or on specific days of the week or month. Please ensure that when setting the schedule frequency for _minute of the object_, only values that are multiples of 5 are included.\n* If the `frequency` parameters are defined, you can set the time zone to a value that matches your server's time zone. For example, `US/Central`, `Etc/UTC`, `CET`. The default time zone is `America/Los_Angeles`.\n\nFor more information about Liveboard jobs, see [ThoughtSpot Product Documentation](https://docs.thoughtspot.com/cloud/latest/liveboard-schedule).\n\n\n\n#### Endpoint URL\n", + "tags": [ + "Schedules", + "9.4.0.cl" + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CreateScheduleRequest" + } + } + }, + "required": true + }, + "parameters": [], + "responses": { + "200": { + "description": "Schedule successfully created.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ResponseSchedule" + } + } + } + }, + "400": { + "description": "Invalid request.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "401": { + "description": "Unauthorized access.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "403": { + "description": "Forbidden access.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "500": { + "description": "Unexpected error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + } + } + } + }, + "/api/rest/2.0/schedules/{schedule_identifier}/delete": { + "post": { + "operationId": "deleteSchedule", + "description": "\nDeletes a scheduled job.
Version: 9.4.0.cl or later\n\nDeletes a scheduled Liveboard job.\n\nRequires at least edit access to Liveboard or `ADMINISTRATION` (**Can administer Org**) privilege. \nIf [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `JOBSCHEDULING` (**Can schedule for others**) privilege is required.\n\n\n\n\n#### Endpoint URL\n", + "tags": [ + "Schedules", + "9.4.0.cl" + ], + "parameters": [ + { + "in": "path", + "name": "schedule_identifier", + "required": true, + "schema": { + "type": "string" + }, + "description": "Unique ID or name of the scheduled job." + } + ], + "responses": { + "204": { + "description": "Schedule successfully deleted." + }, + "400": { + "description": "Invalid request.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "401": { + "description": "Unauthorized access.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "403": { + "description": "Forbidden access.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "500": { + "description": "Unexpected error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + } + } + } + }, + "/api/rest/2.0/schedules/search": { + "post": { + "operationId": "searchSchedules", + "description": "\nSearch Schedules
Version: 9.4.0.cl or later\n\nGets a list of scheduled jobs configured for a Liveboard.\n\nTo get details of a specific scheduled job, specify the name or GUID of the scheduled job.\n\nRequires at least view access to Liveboards.\n\n**NOTE**: When filtering schedules by parameters other than `metadata`, set `record_size` to `-1` and `record_offset` to `0` for accurate results.\n\n\n\n\n#### Endpoint URL\n", + "tags": [ + "Schedules", + "9.4.0.cl" + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SearchSchedulesRequest" + } + } + }, + "required": true + }, + "parameters": [], + "responses": { + "200": { + "description": "Schedule search result.", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ResponseSchedule" + } + } + } + } + }, + "400": { + "description": "Invalid request.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "401": { + "description": "Unauthorized access.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "403": { + "description": "Forbidden access.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "500": { + "description": "Unexpected error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + } + } + } + }, + "/api/rest/2.0/schedules/{schedule_identifier}/update": { + "post": { + "operationId": "updateSchedule", + "description": "\nUpdate schedule.
Version: 9.4.0.cl or later\n\nUpdates a scheduled Liveboard job.\n\nRequires at least edit access to Liveboards. To update a schedule on behalf of another user, you need `ADMINISTRATION` (**Can administer Org**) or `JOBSCHEDULING` (**Can schedule for others**) privilege and edit access to the Liveboard.\nIf [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `JOBSCHEDULING` (**Can schedule for others**) privilege is required.\n\nIf RBAC is enabled, changing a schedule's `file_format` also requires the download privilege that corresponds to the selected format: `CSV` and `XLSX` require the `CAN_DOWNLOAD_DETAILED_DATA` (**Can download detailed data**) privilege, and `PDF` requires the `CAN_DOWNLOAD_VISUALS` (**Can download visuals**) privilege.\n\nThe API endpoint allows you to pause a scheduled job, change the status of a paused job. You can also edit the recipients list, frequency of the job, format of the file to send to the recipients in email notifications, PDF options, and time zone setting.\n\n\n\n\n#### Endpoint URL\n", + "tags": [ + "Schedules", + "9.4.0.cl" + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UpdateScheduleRequest" + } + } + }, + "required": true + }, + "parameters": [ + { + "in": "path", + "name": "schedule_identifier", + "required": true, + "schema": { + "type": "string" + }, + "description": "Unique ID or name of the schedule." + } + ], + "responses": { + "204": { + "description": "Schedule successfully updated." + }, + "400": { + "description": "Invalid request.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "401": { + "description": "Unauthorized access.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "403": { + "description": "Forbidden access.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "500": { + "description": "Unexpected error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + } + } + } + }, + "/api/rest/2.0/security/metadata/assign": { + "post": { + "operationId": "assignChangeAuthor", + "description": "\n Version: 9.0.0.cl or later\n\nTransfers the ownership of one or several objects from one user to another.\n\nRequires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege.\n\nIf [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `USER_ADMINISTRATION` (**Can manage users**) privilege and edit access to the objects are required.\n\n\n\n\n#### Endpoint URL\n", + "tags": [ + "Security", + "9.0.0.cl" + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/AssignChangeAuthorRequest" + } + } + }, + "required": true + }, + "parameters": [], + "responses": { + "204": { + "description": "Author assignment for given metadata objects is successful." + }, + "400": { + "description": "Invalid request.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "401": { + "description": "Unauthorized access.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "403": { + "description": "Forbidden access.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "500": { + "description": "Unexpected error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + } + } + } + }, + "/api/rest/2.0/security/column/rules/fetch": { + "post": { + "operationId": "fetchColumnSecurityRules", + "description": "\nBeta Version: 10.12.0.cl or later\n\nFetches column security rules for specified tables.\n\nThis API endpoint retrieves column-level security rules configured for tables. It returns information about which columns are secured and which groups have access to those columns.\n\n#### Usage guidelines\n\n- Provide an array of table identifiers using either `identifier` (GUID or name) or `obj_identifier` (object ID)\n- At least one of `identifier` or `obj_identifier` must be provided for each table\n- The API returns column security rules for all specified tables\n- Users must have appropriate permissions to access security rules for the specified tables\n\n#### Required permissions\n\n- `ADMINISTRATION` - Can administer ThoughtSpot\n- `DATAMANAGEMENT` - Can manage data\n- `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` - Can manage worksheet views and tables\n\n#### Example request\n\n```json\n{\n \"tables\": [\n {\n \"identifier\": \"table-guid\",\n \"obj_identifier\": \"table-object-id\"\n }\n ]\n}\n```\n\n#### Response format\n\nThe API returns an array of `ColumnSecurityRuleResponse` objects wrapped in a `data` field. Each `ColumnSecurityRuleResponse` object contains:\n- Table information (GUID and object ID) \n- Array of column security rules with column details, group access, and source table information\n\n#### Example response\n\n```json\n{\n \"data\": [\n {\n \"guid\": \"table-guid\",\n \"objId\": \"table-object-id\",\n \"columnSecurityRules\": [\n {\n \"column\": {\n \"id\": \"col_123\",\n \"name\": \"Salary\"\n },\n \"groups\": [\n {\n \"id\": \"group_1\",\n \"name\": \"HR Department\"\n }\n ],\n \"sourceTableDetails\": {\n \"id\": \"source-table-guid\",\n \"name\": \"Employee_Data\"\n }\n }\n ]\n }\n ]\n}\n```\n\n\n\n#### Endpoint URL\n", + "tags": [ + "Security", + "10.12.0.cl" + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/FetchColumnSecurityRulesRequest" + } + } + }, + "required": true + }, + "parameters": [], + "responses": { + "200": { + "description": "Successfully fetched column security rules", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ColumnSecurityRuleResponse" + } + } + } + } + }, + "400": { + "description": "Bad request - Table not found or invalid parameters", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "401": { + "description": "Unauthorized access.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "403": { + "description": "Forbidden - User doesn't have permission to access security rules for this table", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "500": { + "description": "Internal server error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + } + } + } + }, + "/api/rest/2.0/security/metadata/fetch-object-privileges": { + "post": { + "operationId": "fetchObjectPrivileges", + "description": "\n Version: 26.3.0.cl or later\n\nThis API fetches the object privileges present for the given list of principals (user or group), on the given set of objects. It supports pagination, which can be enabled and configured using the request parameters. It provides users access to certain features based on privilege based access control.\n\n#### Usage guidelines\n\n- Specify the `type` (`USER` or `USER_GROUP`) and `identifier` (either GUID or name) of the principals for which you want to retrieve object privilege information in the `principals` array.\n- Specify the `type` (`LOGICAL_TABLE`) and `identifier` (either GUID or name) of the metadata objects for which you want to retrieve object privilege information in the `metadata` array. Only `LOGICAL_TABLE` metadata type is supported for now. It may be extended for other metadata types in future.\n- To control the offset from where principals have to be fetched, use `record_offset`. When `record_offset` is 0, information is fetched from the beginning.\n- To control the number of principals to be fetched, use `record_size`. Default `record_size` is 20.\n- Ensure `record_offset` for a subsequent request is one more than the value of `record_size` of the previous request.\n- Ensure using correct Authorization Bearer Token corresponding to specific user & org. \n\n#### Example request\n\n```json\n{\n \"principals\": [\n {\n \"type\": \"type-1\",\n \"identifier\": \"principal-guid-or-name-1\"\n },\n {\n \"type\": \"type-2\",\n \"identifier\": \"principal-guid-or-name-2\"\n }\n ],\n \"metadata\": [\n {\n \"type\": \"metadata-type-1\",\n \"identifier\": \"metadata-guid-or-name-1\"\n },\n {\n \"type\": \"metadata-type-2\",\n \"identifier\": \"metadata-guid-or-name-2\"\n }\n ],\n \"record_offset\": 0,\n \"record_size\": 20\n}\n```\n\n\n#### Response format\n\nThe API returns an array of `metadata_object_privileges` objects wrapped in JSON. Each `metadata_object_privileges` object contains:\n- Metadata information (GUID, name and type)\n- Array of `principal_object_privilege_info`.\n- Each `principal_object_privilege_info` contains:\n - Principal type. All principals of this type are listed as described below.\n - Array of `principal_object_privileges`.\n - Each `principal_object_privileges` contains:\n - Principal information (GUID, name, subtype)\n - List of applied object level privileges.\n\n#### Example response\n\n```json\n{\n \"metadata_object_privileges\": [\n {\n \"metadata_id\": \"metadata-guid-1\",\n \"metadata_name\": \"metadata-name-1\",\n \"metadata_type\": \"metadata-type-1\",\n \"principal_object_privilege_info\": [\n {\n \"principal_type\": \"principal-type-1\",\n \"principal_object_privileges\": [\n {\n \"principal_id\": \"principal-guid-1\",\n \"principal_name\": \"principal-name-1\",\n \"principal_sub_type\": \"principal-sub-type-1\",\n \"object_privileges\": \"[object-privilege-1, object-privilege-2]\"\n },\n {\n \"principal_id\": \"principal-guid-2\",\n \"principal_name\": \"principal-name-2\",\n \"principal_sub_type\": \"principal-sub-type-2\",\n \"object_privileges\": \"[object-privilege-1, object-privilege-2]\"\n }\n ]\n },\n {\n \"principal_type\": \"principal-type-2\",\n \"principal_object_privileges\": [\n {\n \"principal_id\": \"principal-guid-3\",\n \"principal_name\": \"principal-guid-4\",\n \"principal_sub_type\": \"principal-sub-type-4\",\n \"object_privileges\": \"[object-privilege-1]\"\n }\n ]\n }\n ]\n },\n {\n \"metadata_id\": \"metadata-guid-2\",\n \"metadata_name\": \"metadata-name-2\",\n \"metadata_type\": \"metadata-type-2\",\n \"principal_object_privilege_info\": [\n {\n \"principal_type\": \"principal-type-1\",\n \"principal_object_privileges\": [\n {\n \"principal_id\": \"principal-guid-1\",\n \"principal_name\": \"principal-name-1\",\n \"principal_sub_type\": \"principal-sub-type-1\",\n \"object_privileges\": \"[object-privilege-3, object-privilege-4]\"\n },\n {\n \"principal_id\": \"principal-guid-2\",\n \"principal_name\": \"principal-name-2\",\n \"principal_sub_type\": \"principal-sub-type-2\",\n \"object_privileges\": \"[object-privilege-4]\"\n }\n ]\n }\n ]\n }\n ]\n}\n```\n\n\n\n#### Endpoint URL\n", + "tags": [ + "Security", + "26.3.0.cl" + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/FetchObjectPrivilegesRequest" + } + } + }, + "required": true + }, + "parameters": [], + "responses": { + "200": { + "description": "Fetching defined object privileges of metadata objects is successful.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ObjectPrivilegesOfMetadataResponse" + } + } + } + }, + "400": { + "description": "Invalid request.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "401": { + "description": "Unauthorized access.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "403": { + "description": "Forbidden access.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "500": { + "description": "Unexpected error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + } + } + } + }, + "/api/rest/2.0/security/principals/fetch-permissions": { + "post": { + "operationId": "fetchPermissionsOfPrincipals", + "description": "\n Version: 9.0.0.cl or later\n\nFetches object permission details for a given principal object such as a user and group.\n\nRequires view access to the metadata object. \n\n#### Usage guidelines\n\n* To get a list of all metadata objects that a user or group can access, specify the `type` and GUID or name of the principal.\n* To get permission details for a specific object, add the `type` and GUID or name of the metadata object to your API request.\n\nUpon successful execution, the API returns a list of metadata objects and permission details for each object. \n\n\n\n\n#### Endpoint URL\n", + "tags": [ + "Security", + "9.0.0.cl" + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/FetchPermissionsOfPrincipalsRequest" + } + } + }, + "required": true + }, + "parameters": [], + "responses": { + "200": { + "description": "Fetching permissions of principals is successful.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PermissionOfPrincipalsResponse" + }, + "examples": { + "example_1": { + "value": { + "principal_permission_details": [ + { + "principal_id": "7f5e7f87-09a1-487c-a1da-c4bb35e45270", + "principal_name": "test_user", + "principal_type": "USER", + "principal_sub_type": "LOCAL_USER", + "metadata_permission_info": [ + { + "metadata_type": "LIVEBOARD", + "metadata_permissions": [ + { + "metadata_id": "2ff57a24-cf90-485f-8b4b-45fc17474c6f", + "metadata_name": "Learn how to use ThoughtSpot", + "metadata_owner": { + "id": "2ff57a24-cf90-485f-8b4b-45fc17474c6f", + "name": "Learn how to use ThoughtSpot" + }, + "metadata_author": { + "id": "59481331-ee53-42be-a548-bd87be6ddd4a", + "name": "tsadmin" + }, + "permission": "READ_ONLY", + "shared_permission": "NO_ACCESS", + "group_permission": [] + } + ] + } + ] + } + ] + } + } + } + } + } + }, + "400": { + "description": "Invalid request.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "401": { + "description": "Unauthorized access.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "403": { + "description": "Forbidden access.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "500": { + "description": "Unexpected error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + } + } + } + }, + "/api/rest/2.0/security/metadata/fetch-permissions": { + "post": { + "operationId": "fetchPermissionsOnMetadata", + "description": "\n Version: 9.0.0.cl or later\n\nFetches permission details for a given metadata object.\n\nRequires view access to the metadata object.\n\n#### Usage guidelines\n\n* To fetch a list of users and groups for a metadata object, specify `type` and GUID or name of the metadata object.\n* To get permission details for a specific user or group, add `type` and GUID or name of the principal object to your API request.\n\nUpon successful execution, the API returns permission details and principal information for the object specified in the API request.\n\n\n\n\n#### Endpoint URL\n", + "tags": [ + "Security", + "9.0.0.cl" + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/FetchPermissionsOnMetadataRequest" + } + } + }, + "required": true + }, + "parameters": [], + "responses": { + "200": { + "description": "Fetching permissions of metadata objects is successful.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PermissionOfMetadataResponse" + }, + "examples": { + "example_1": { + "value": { + "metadata_permission_details": [ + { + "metadata_id": "a62a5bf3-9f16-45b2-a174-7d30b3b577a9", + "metadata_name": "testing", + "metadata_type": "LIVEBOARD", + "metadata_owner": { + "id": "a62a5bf3-9f16-45b2-a174-7d30b3b577a9", + "name": "testing" + }, + "metadata_author": { + "id": "59481331-ee53-42be-a548-bd87be6ddd4a", + "name": "tsadmin" + }, + "principal_permission_info": [ + { + "principal_type": "USER_GROUP", + "principal_sub_type": "LOCAL_GROUP", + "principal_permissions": [ + { + "principal_id": "d0326b56-ef23-4c8a-8327-a30e99bcc72b", + "principal_name": "Administrator", + "permission": "MODIFY", + "shared_permission": "NO_ACCESS", + "group_permission": [] + } + ] + }, + { + "principal_type": "USER", + "principal_sub_type": "LOCAL_USER", + "principal_permissions": [ + { + "principal_id": "0f0dd0f7-7411-4195-a4aa-0dc6b58413c9", + "principal_name": "su", + "permission": "MODIFY", + "shared_permission": "NO_ACCESS", + "group_permission": [] + }, + { + "principal_id": "59481331-ee53-42be-a548-bd87be6ddd4a", + "principal_name": "tsadmin", + "permission": "MODIFY", + "shared_permission": "NO_ACCESS", + "group_permission": [] + } + ] + } + ] + } + ] + } + } + } + } + } + }, + "400": { + "description": "Invalid request.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "401": { + "description": "Unauthorized access.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "403": { + "description": "Forbidden access.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "500": { + "description": "Unexpected error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + } + } + } + }, + "/api/rest/2.0/security/metadata/manage-object-privilege": { + "post": { + "operationId": "manageObjectPrivilege", + "description": "\n Version: 26.3.0.cl or later\n\nThis API allows the addition or deletion of object level privileges for a set of users and groups, on a set of metadata objects. It provides users to access certain features based on privilege based access control.\n\n#### Usage guidelines\n\n- Specify the `operation`. The supported operations are: `ADD`, `REMOVE`.\n- Specify the type of the objects on which the object privileges are being provided in `metadata_type`. Only `LOGICAL_TABLE` metadata type is supported for now. It may be extended for other metadata types in future.\n- Specify the list of object privilege types in the `object_privilege_types` array. The supported object privilege types are: `SPOTTER_COACHING_PRIVILEGE`.\n- Specify the identifiers (either GUID or name) for the metadata objects in the `metadata_identifiers` array.\n- Specify the `type` (`USER` or `USER_GROUP`) and `identifier` (either GUID or name) of the principals to which you want to apply the given operation and given object privileges in the `principals` array.\n- Ensure using correct Authorization Bearer Token corresponding to specific user & org.\n\n#### Example request\n\n```json\n{\n \"operation\": \"operation-type\",\n \"metadata_type\": \"metadata-type\",\n \"object_privilege_types\": [\"privilege-type-1\", \"privilege-type-2\"],\n \"metadata_identifiers\": [\"metadata-guid-or-name-1\", \"metadata-guid-or-name-1\"],\n \"principals\": [\n {\n \"type\": \"type-1\", \n \"identifier\": \"principal-guid-or-name-1\"\n },\n {\n \"type\": \"type-2\",\n \"identifier\": \"principal-guid-or-name-2\"\n }\n ]\n}\n```\n\n> ###### Note:\n> * Only admin users, users with edit access and users with coaching privilege on a given data-model can add or remove principals related to SPOTTER_COACHING_PRIVILEGE \n\n\n\n#### Endpoint URL\n", + "tags": [ + "Security", + "26.3.0.cl" + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ManageObjectPrivilegeRequest" + } + } + }, + "required": true + }, + "parameters": [], + "responses": { + "204": { + "description": "Object privileges added/removed successfully" + }, + "400": { + "description": "Invalid request", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "401": { + "description": "Unauthorized access", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "403": { + "description": "Forbidden access", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "500": { + "description": "Unexpected error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + } + } + } + }, + "/api/rest/2.0/security/metadata/publish": { + "post": { + "operationId": "publishMetadata", + "description": "\n Version: 26.5.0.cl or later\n\nAllows publishing metadata objects across organizations in ThoughtSpot.\n\nRequires ADMINISTRATION role and TENANT scope.\n\nThe API endpoint allows publishing the following types of metadata objects:\n* Liveboards\n* Answers\n* Logical Tables\n\nThis API will essentially share the objects along with it's dependencies to\nthe org admins of the orgs to which it is being published.\n\n\n\n\n#### Endpoint URL\n", + "tags": [ + "Security", + "26.5.0.cl" + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PublishMetadataRequest" + } + } + }, + "required": true + }, + "parameters": [], + "responses": { + "204": { + "description": "Publishing metadata objects is successful." + }, + "400": { + "description": "Invalid request.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "401": { + "description": "Unauthorized access.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "403": { + "description": "Forbidden access.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "500": { + "description": "Unexpected error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + } + } + } + }, + "/api/rest/2.0/security/metadata/share": { + "post": { + "operationId": "shareMetadata", + "description": "\n Version: 9.0.0.cl or later\n\nAllows sharing one or several metadata objects with users and groups in ThoughtSpot.\n\nRequires edit access to the metadata object.\n\n#### Supported metadata objects:\n* Liveboards\n* Visualizations\n* Answers\n* Models\n* Views\n* Connections\n* Collections\n\n#### Object permissions\n\nYou can provide `READ_ONLY` or `MODIFY` access when sharing an object with another user or group. The `READ_ONLY` permission grants view access to the shared object, whereas `MODIFY` provides edit access.\n\nTo prevent a user or group from accessing the shared object, specify the GUID or name of the principal and set `shareMode` to `NO_ACCESS`.\n\n#### Sharing a visualization\n\n* Sharing a visualization implicitly shares the entire Liveboard with the recipient.\n* Object permissions set for a shared visualization also apply to the Liveboard unless overridden by another API request or via UI.\n* If email notifications for object sharing are enabled, a notification with a link to the shared visualization will be sent to the recipient’s email address. Although this link opens the shared visualization, recipients can also access other visualizations in the Liveboard.\n\n#### Sharing a collection\n\nCollections support **dual permissions** that provide fine-grained control:\n\n* **Collection permissions** (`share_mode`) - controls access to the collection itself (view, edit, delete the collection)\n* **Content permissions** (`content_share_mode`) - controls access to objects within the collection (view, edit objects inside)\n\n**Default Behavior:**\n- If only `share_mode` is specified, the content permissions default to `READ_ONLY` (except when `share_mode` is `NO_ACCESS`, then content also gets `NO_ACCESS`)\n- To give users edit access to collection contents, explicitly set `content_share_mode: \"MODIFY\"`\n\n## Examples\n\nThe following JSON examples can be copy-pasted as request bodies for the REST v2 API endpoint:\n\n```bash\nPOST /callosum/v1/v2/security/metadata/share\nContent-Type: application/x-www-form-urlencoded\n```\n\n### Basic collection sharing\nShare a collection with read-only access:\n\n```json\n{\n \"metadata_type\": \"COLLECTION\",\n \"metadata_identifiers\": [\"Sales Reports Collection\"],\n \"permissions\": [{\n \"principal\": {\n \"type\": \"USER\",\n \"identifier\": \"alice@company.com\"\n },\n \"share_mode\": \"READ_ONLY\"\n }],\n \"notification\": {\n \"message\": \"I've shared the Sales Reports collection with you\",\n \"notify_on_share\": true\n }\n}\n```\n\n### Collection sharing with dual permissions\nShare a collection with different permissions for the collection vs. its contents:\n\n```json\n{\n \"metadata_type\": \"COLLECTION\",\n \"metadata_identifiers\": [\"Marketing Analytics\"],\n \"permissions\": [{\n \"principal\": {\n \"type\": \"USER\",\n \"identifier\": \"bob@company.com\"\n },\n \"share_mode\": \"MODIFY\",\n \"content_share_mode\": \"READ_ONLY\"\n }, {\n \"principal\": {\n \"type\": \"USER_GROUP\",\n \"identifier\": \"Marketing Team\"\n },\n \"share_mode\": \"READ_ONLY\",\n \"content_share_mode\": \"READ_ONLY\"\n }],\n \"notification\": {\n \"emails\": [\"bob@company.com\"],\n \"message\": \"You can edit the collection but content is read-only\",\n \"enable_custom_url\": false,\n \"notify_on_share\": true\n },\n \"has_lenient_discoverability\": false\n}\n```\n\n### Multiple collections sharing\nShare multiple collections with different users:\n\n```json\n{\n \"metadata\": [\n {\n \"type\": \"COLLECTION\",\n \"identifier\": \"Q4 Reports\"\n },\n {\n \"type\": \"COLLECTION\",\n \"identifier\": \"Executive Dashboard Collection\"\n }\n ],\n \"permissions\": [{\n \"principal\": {\n \"type\": \"USER_GROUP\",\n \"identifier\": \"Executives\"\n },\n \"share_mode\": \"MODIFY\"\n }, {\n \"principal\": {\n \"type\": \"USER\",\n \"identifier\": \"manager@company.com\"\n },\n \"share_mode\": \"READ_ONLY\",\n \"content_share_mode\": \"MODIFY\"\n }],\n \"notification\": {\n \"message\": \"Sharing quarterly collections with leadership team\",\n \"notify_on_share\": true\n }\n}\n```\n\n### Remove collection access\nRemove access to a collection by setting share_mode to NO_ACCESS:\n\n```json\n{\n \"metadata_type\": \"COLLECTION\",\n \"metadata_identifiers\": [\"Confidential Reports\"],\n \"permissions\": [{\n \"principal\": {\n \"type\": \"USER\",\n \"identifier\": \"former-employee@company.com\"\n },\n \"share_mode\": \"NO_ACCESS\"\n }],\n \"notification\": {\n \"notify_on_share\": false\n }\n}\n```\n\n### Collection Permission Scenarios\n\n**Scenario 1: Collection Admin**\n- `share_mode: MODIFY` + `content_share_mode: MODIFY` = Full control over collection and its contents\n\n**Scenario 2: Collection Curator**\n- `share_mode: MODIFY` + `content_share_mode: READ_ONLY` = Can manage collection structure but not edit contents\n\n**Scenario 3: Content Editor**\n- `share_mode: READ_ONLY` + `content_share_mode: MODIFY` = Can edit objects within collection but can't change collection itself\n\n**Scenario 4: Viewer**\n- `share_mode: READ_ONLY` + `content_share_mode: READ_ONLY` = View-only access to collection and contents\n\n\n\n\n#### Endpoint URL\n", + "tags": [ + "Security", + "9.0.0.cl" + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ShareMetadataRequest" + } + } + }, + "required": true + }, + "parameters": [], + "responses": { + "204": { + "description": "Sharing metadata objects is successful." + }, + "400": { + "description": "Invalid request.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "401": { + "description": "Unauthorized access.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "403": { + "description": "Forbidden access.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "500": { + "description": "Unexpected error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + } + } + } + }, + "/api/rest/2.0/security/metadata/unpublish": { + "post": { + "operationId": "unpublishMetadata", + "description": "\n Version: 26.5.0.cl or later\n\nAllows unpublishing metadata objects from organizations in ThoughtSpot.\n\nRequires ADMINISTRATION role and TENANT scope.\n\nThe API endpoint allows unpublishing the following types of metadata objects:\n* Liveboards\n* Answers\n* Logical Tables\n\nWhen unpublishing objects, you can:\n* Include dependencies by setting `include_dependencies` to true - this will unpublish all dependent objects if no other published object is using them\n* Force unpublish by setting `force` to true - this will break all dependent objects in the unpublished organizations\n\n\n\n\n#### Endpoint URL\n", + "tags": [ + "Security", + "26.5.0.cl" + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnpublishMetadataRequest" + } + } + }, + "required": true + }, + "parameters": [], + "responses": { + "204": { + "description": "Unpublishing metadata objects is successful." + }, + "400": { + "description": "Invalid request.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "401": { + "description": "Unauthorized access.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "403": { + "description": "Forbidden access.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "500": { + "description": "Unexpected error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + } + } + } + }, + "/api/rest/2.0/security/column/rules/update": { + "post": { + "operationId": "updateColumnSecurityRules", + "description": "\nBeta Version: 10.12.0.cl or later\n\nCreates, updates, or deletes column security rules for specified tables.\n\nThis API endpoint allows you to create, update, or delete column-level security rules on columns of a table. The operation follows an \"all or none\" policy: if defining security rules for any of the provided columns fails, the entire operation will be rolled back, and no rules will be created.\n\n#### Usage guidelines\n\n- Provide table identifier using either `identifier` (GUID or name) or `obj_identifier` (object ID)\n- Use `clear_csr: true` to remove all column security rules from the table\n- For each column, specify the security rule using `column_security_rules` array\n- Use `is_unsecured: true` to mark a specific column as unprotected\n- Use `group_access` operations to manage group associations:\n - `ADD`: Add groups to the column's access list\n - `REMOVE`: Remove groups from the column's access list\n - `REPLACE`: Replace all existing groups with the specified groups\n\n#### Required permissions\n\n- `ADMINISTRATION` - Can administer ThoughtSpot\n- `DATAMANAGEMENT` - Can manage data (if RBAC is disabled)\n- `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` - Can manage worksheet views and tables (if RBAC is enabled)\n\n#### Example request\n\n```json\n{\n \"identifier\": \"table-guid\",\n \"obj_identifier\": \"table-object-id\",\n \"clear_csr\": false,\n \"column_security_rules\": [\n {\n \"column_identifier\": \"col id or col name\",\n \"is_unsecured\": false,\n \"group_access\": [\n {\n \"operation\": \"ADD\",\n \"group_identifiers\": [\"hr_group_id\", \"hr_group_name\", \"finance_group_id\"]\n }\n ]\n },\n {\n \"column_identifier\": \"col id or col name\",\n \"is_unsecured\": true\n },\n {\n \"column_identifier\": \"col id or col name\",\n \"is_unsecured\": false,\n \"group_access\": [\n {\n \"operation\": \"REPLACE\",\n \"group_identifiers\": [\"management_group_id\", \"management_group_name\"]\n }\n ]\n }\n ]\n}\n```\n\n#### Request Body Schema\n\n- `identifier` (string, optional): GUID or name of the table for which we want to create column security rules\n- `obj_identifier` (string, optional): The object ID of the table\n- `clear_csr` (boolean, optional): If true, then all the secured columns will be marked as unprotected, and all the group associations will be removed\n- `column_security_rules` (array of objects, required): An array where each object defines the security rule for a specific column\n\nEach column security rule object contains:\n- `column_identifier` (string, required): Column identifier (col_id or name)\n- `is_unsecured` (boolean, optional): If true, the column will be marked as unprotected and all groups associated with it will be removed\n- `group_access` (array of objects, optional): Array of group operation objects\n\nEach group operation object contains:\n- `operation` (string, required): Operation type - ADD, REMOVE, or REPLACE\n- `group_identifiers` (array of strings, required): Array of group identifiers (name or GUID) on which the operation will be performed\n\n#### Response\n\nThis API does not return any response body. A successful operation returns HTTP 200 status code.\n\n#### Operation Types\n\n- **ADD**: Adds the specified groups to the column's access list\n- **REMOVE**: Removes the specified groups from the column's access list \n- **REPLACE**: Replaces all existing groups with the specified groups \n\n\n\n#### Endpoint URL\n", + "tags": [ + "Security", + "10.12.0.cl" + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UpdateColumnSecurityRulesRequest" + } + } + }, + "required": true + }, + "parameters": [], + "responses": { + "204": { + "description": "Successfully updated column security rules" + }, + "400": { + "description": "Bad request - Invalid parameters or table not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "401": { + "description": "Unauthorized access.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "403": { + "description": "Forbidden - User doesn't have permission to modify security rules for this table", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "500": { + "description": "Internal server error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + } + } + } + }, + "/api/rest/2.0/customization/styles/fonts/delete": { + "post": { + "operationId": "deleteStyleFonts", + "description": "\n Version: 26.7.0.cl or later\n\nDeletes one or more custom fonts from the cluster-level or org-level font library. If a deleted font is assigned to visualization areas, those assignments automatically fallback to the cluster/system default font. The response lists all affected areas where the font was explicitly set. Note: dry_run defaults to true. To actually delete fonts, you must explicitly pass dry_run: false.\n\nRequires `ADMINISTRATION` (**Can administer ThoughtSpot**) or `DEVELOPER` (**Has developer privilege**) privilege.\n\n#### Usage guidelines\n\n- Provide one or more font UUIDs or names in `font_identifiers`.\n- Set `scope` to `CLUSTER` to delete from the cluster-level library. Set `scope` to `ORG` (default) to delete from the authenticated user's org library.\n- Use `dry_run: true` to preview which visualization areas would be affected without actually deleting the font. The response lists affected assignments; no changes are applied.\n- Deletions cannot be undone. Re-upload the font file using `uploadStyleFont` if needed.\n\n\n\n\n#### Endpoint URL\n", + "tags": [ + "Style Customization", + "26.7.0.cl" + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/DeleteStyleFontsRequest" + } + } + }, + "required": true + }, + "parameters": [], + "responses": { + "200": { + "description": "Font deleted successfully.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/StyleFontDeleteData" + }, + "examples": { + "example_1": { + "summary": "Font deleted with affected assignments", + "value": { + "affected_assignments": [ + { + "org": { + "id": 1234567890, + "name": "Sales" + }, + "visualization_areas": [ + "CHART_X_AXIS_LABELS", + "CHART_Y_AXIS_LABELS" + ] + } + ] + } + }, + "example_2": { + "summary": "Font deleted with no affected assignments", + "value": { + "affected_assignments": [] + } + } + } + } + } + }, + "400": { + "description": "Invalid request.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + }, + "examples": { + "invalid_request": { + "summary": "Invalid request", + "value": { + "error": { + "message": { + "code": 10002, + "incident_id_guid": "a1b2c3d4-e5f6-7890-abcd-ef1234567890", + "trace_id_guid": "a1b2c3d4-e5f6-7890-abcd-ef1234567890", + "debug": "Field 'font_identifiers' must contain at least one identifier." + } + } + } + } + } + } + } + }, + "401": { + "description": "Unauthorized access.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + }, + "examples": { + "unauthorized_access": { + "summary": "Unauthorized access", + "value": { + "error": { + "message": { + "code": 10097, + "incident_id_guid": "b2c3d4e5-f678-9012-bcde-f23456789012", + "trace_id_guid": "b2c3d4e5-f678-9012-bcde-f23456789012", + "debug": "Authentication required to delete custom fonts from the font library." + } + } + } + } + } + } + } + }, + "403": { + "description": "Forbidden access.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + }, + "examples": { + "forbidden_access": { + "summary": "Forbidden access", + "value": { + "error": { + "message": { + "code": 10023, + "incident_id_guid": "c3d4e5f6-7890-1234-cdef-345678901234", + "trace_id_guid": "c3d4e5f6-7890-1234-cdef-345678901234", + "debug": "Only Tenant admin can delete cluster-level fonts." + } + } + } + } + } + } + } + }, + "500": { + "description": "Unexpected error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + }, + "examples": { + "unexpected_error": { + "summary": "Unexpected error", + "value": { + "error": { + "message": { + "code": 10038, + "incident_id_guid": "d4e5f678-9012-3456-defa-456789012345", + "trace_id_guid": "d4e5f678-9012-3456-defa-456789012345", + "debug": "Unexpected server error while deleting fonts from the font library." + } + } + } + } + } + } + } + } + } + } + }, + "/api/rest/2.0/customization/styles/logos/export": { + "post": { + "operationId": "exportStyleLogos", + "description": "\n Version: 26.7.0.cl or later\n\nDownloads the active logos (default and wide slots) at the requested scope as a single ZIP archive containing both logo image files. If no custom logo has been uploaded at the ORG scope, the archive contains the resolved logo falling through from the cluster. If no cluster logo has been uploaded, no file is returned.\n\nRequires `ADMINISTRATION` (**Can administer ThoughtSpot**) or `DEVELOPER` (**Has developer privilege**) privilege.\n\n#### Usage guidelines\n\n- Set `scope` to `CLUSTER` to download cluster-level logos.\n- Set `scope` to `ORG` (default) to download logos for the authenticated user's org.\n- The response is a ZIP archive (`application/zip`). Save the response body directly to a `.zip` file.\n- The archive always contains two files — one for the DEFAULT slot and one for the WIDE slot — even if no custom logo is set at the requested scope.\n\n\n\n\n#### Endpoint URL\n", + "tags": [ + "Style Customization", + "26.7.0.cl" + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExportStyleLogosRequest" + } + } + }, + "required": true + }, + "parameters": [], + "responses": { + "200": { + "description": "Logo ZIP archive retrieved successfully.", + "content": { + "application/octet-stream": {} + } + }, + "400": { + "description": "Invalid request.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "401": { + "description": "Unauthorized access.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + }, + "examples": { + "unauthorized_access": { + "summary": "Unauthorized access", + "value": { + "error": { + "message": { + "code": 10097, + "incident_id_guid": "b2c3d4e5-f678-9012-bcde-f23456789012", + "trace_id_guid": "b2c3d4e5-f678-9012-bcde-f23456789012", + "debug": "Authentication required to export style logos." + } + } + } + } + } + } + } + }, + "403": { + "description": "Forbidden access.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + }, + "examples": { + "forbidden_access": { + "summary": "Forbidden access", + "value": { + "error": { + "message": { + "code": 10023, + "incident_id_guid": "c3d4e5f6-7890-1234-cdef-345678901234", + "trace_id_guid": "c3d4e5f6-7890-1234-cdef-345678901234", + "debug": "Cluster-level logos can only be exported from PRIMARY org." + } + } + } + } + } + } + } + }, + "500": { + "description": "Unexpected error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + }, + "examples": { + "unexpected_error": { + "summary": "Unexpected error", + "value": { + "error": { + "message": { + "code": 10038, + "incident_id_guid": "d4e5f678-9012-3456-defa-456789012345", + "trace_id_guid": "d4e5f678-9012-3456-defa-456789012345", + "debug": "Unexpected server error while exporting style logos." + } + } + } + } + } + } + } + } + } + } + }, + "/api/rest/2.0/customization/styles/search": { + "post": { + "operationId": "searchStyleCustomizations", + "description": "\n Version: 26.7.0.cl or later\n\nRetrieves style preferences at cluster level or for the authenticated user's org. Cluster-level preferences serve as defaults for all orgs. Org-level preferences override cluster defaults.\n\nRequires `ADMINISTRATION` (**Can administer ThoughtSpot**) or `DEVELOPER` (**Has developer privilege**) privilege.\n\n#### Usage guidelines\n\n- Set `scope` to `CLUSTER` to retrieve cluster-level style defaults.\n- Set `scope` to `ORG` (default) to retrieve preferences for the authenticated user's org.\n- Each field in the response includes an `is_overridden` flag indicating whether the value was explicitly set at the requested scope or inherited from a parent scope (cluster or system default).\n\n\n\n\n#### Endpoint URL\n", + "tags": [ + "Style Customization", + "26.7.0.cl" + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SearchStyleCustomizationsRequest" + } + } + }, + "required": true + }, + "parameters": [], + "responses": { + "200": { + "description": "Style preferences retrieved successfully.", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/StylePreference" + } + }, + "examples": { + "example_1": { + "value": [ + { + "scope": "CLUSTER", + "navigation_panel": { + "theme": "DARK", + "is_overridden": false + }, + "chart_color_palette": { + "colors": [ + { + "primary": "#2359B6", + "secondary": [ + "#1A4690", + "#0E2E66", + "#07194A", + "#030D30" + ] + }, + { + "primary": "#E8552D", + "secondary": [ + "#C4421A", + "#9E2F0D", + "#7A2005", + "#581302" + ] + }, + { + "primary": "#F5A623", + "secondary": [ + "#D08B0E", + "#A86E05", + "#825202", + "#5E3900" + ] + }, + { + "primary": "#7ED321", + "secondary": [ + "#62A815", + "#488009", + "#305A03", + "#1C3800" + ] + }, + { + "primary": "#9B59B6", + "secondary": [ + "#7D3F9A", + "#612C7E", + "#481C62", + "#320F48" + ] + }, + { + "primary": "#1ABC9C", + "secondary": [ + "#0E9E81", + "#077F67", + "#03624E", + "#014838" + ] + }, + { + "primary": "#E74C3C", + "secondary": [ + "#C0392B", + "#9A2518", + "#761409", + "#540703" + ] + }, + { + "primary": "#3498DB", + "secondary": [ + "#1A7DC0", + "#0E60A0", + "#074580", + "#032C60" + ] + } + ], + "disable_color_rotation": false, + "is_overridden": false + }, + "embedded_footer_text": { + "value": "", + "is_overridden": false + }, + "logo": { + "default_logo": { + "id": "a1b2c3d4-0001-0001-0001-000000000001", + "is_overridden": false + }, + "wide_logo": { + "id": "a1b2c3d4-0002-0002-0002-000000000002", + "is_overridden": false + } + }, + "visualization_fonts": { + "chart_visualization_fonts": [ + { + "visualization_area": "CHART_X_AXIS_LABELS", + "font_id": null, + "font_name": null, + "is_overridden": false + } + ], + "table_visualization_fonts": [ + { + "visualization_area": "TABLE_VALUE_CELLS", + "font_id": null, + "font_name": null, + "is_overridden": false + } + ] + } + }, + { + "scope": "ORG", + "org": { + "id": 1234567890, + "name": "Sales" + }, + "navigation_panel": { + "theme": "CUSTOM", + "base_color": "#2359B6", + "is_overridden": true + }, + "chart_color_palette": { + "colors": [ + { + "primary": "#2359B6", + "secondary": [ + "#1A4690", + "#0E2E66", + "#07194A", + "#030D30" + ] + }, + { + "primary": "#E8552D", + "secondary": [ + "#C4421A", + "#9E2F0D", + "#7A2005", + "#581302" + ] + }, + { + "primary": "#F5A623", + "secondary": [ + "#D08B0E", + "#A86E05", + "#825202", + "#5E3900" + ] + }, + { + "primary": "#7ED321", + "secondary": [ + "#62A815", + "#488009", + "#305A03", + "#1C3800" + ] + }, + { + "primary": "#9B59B6", + "secondary": [ + "#7D3F9A", + "#612C7E", + "#481C62", + "#320F48" + ] + }, + { + "primary": "#1ABC9C", + "secondary": [ + "#0E9E81", + "#077F67", + "#03624E", + "#014838" + ] + }, + { + "primary": "#E74C3C", + "secondary": [ + "#C0392B", + "#9A2518", + "#761409", + "#540703" + ] + }, + { + "primary": "#3498DB", + "secondary": [ + "#1A7DC0", + "#0E60A0", + "#074580", + "#032C60" + ] + } + ], + "disable_color_rotation": false, + "is_overridden": false + }, + "embedded_footer_text": { + "value": "Powered by Sales Analytics", + "is_overridden": true + }, + "logo": { + "default_logo": { + "id": "b2c3d4e5-0001-0001-0001-000000000011", + "is_overridden": true + }, + "wide_logo": { + "id": "b2c3d4e5-0002-0002-0002-000000000022", + "is_overridden": true + } + }, + "visualization_fonts": { + "chart_visualization_fonts": [ + { + "visualization_area": "CHART_X_AXIS_LABELS", + "font_id": "c3d4e5f6-1111-1111-1111-111111111111", + "font_name": "Acme Sans", + "is_overridden": true + } + ], + "table_visualization_fonts": [ + { + "visualization_area": "TABLE_VALUE_CELLS", + "font_id": null, + "font_name": "Optimo-Plain, Helvetica Neue, Helvetica, Arial, sans-serif", + "is_overridden": false + } + ] + } + } + ] + } + } + } + } + }, + "400": { + "description": "Invalid request.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + }, + "examples": { + "invalid_request": { + "summary": "Invalid request", + "value": { + "error": { + "message": { + "code": 10002, + "incident_id_guid": "a1b2c3d4-e5f6-7890-abcd-ef1234567890", + "trace_id_guid": "a1b2c3d4-e5f6-7890-abcd-ef1234567890", + "debug": "Field 'org_identifiers' is only allowed when scope is ORG." + } + } + } + } + } + } + } + }, + "401": { + "description": "Unauthorized access.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + }, + "examples": { + "unauthorized_access": { + "summary": "Unauthorized access", + "value": { + "error": { + "message": { + "code": 10097, + "incident_id_guid": "b2c3d4e5-f678-9012-bcde-f23456789012", + "trace_id_guid": "b2c3d4e5-f678-9012-bcde-f23456789012", + "debug": "Authentication required to retrieve style preferences for the cluster or org." + } + } + } + } + } + } + } + }, + "403": { + "description": "Forbidden access.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + }, + "examples": { + "forbidden_access": { + "summary": "Forbidden access", + "value": { + "error": { + "message": { + "code": 10023, + "incident_id_guid": "c3d4e5f6-7890-1234-cdef-345678901234", + "trace_id_guid": "c3d4e5f6-7890-1234-cdef-345678901234", + "debug": "Cluster config can only be accessed from PRIMARY org." + } + } + } + } + } + } + } + }, + "500": { + "description": "Unexpected error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + }, + "examples": { + "unexpected_error": { + "summary": "Unexpected error", + "value": { + "error": { + "message": { + "code": 10038, + "incident_id_guid": "d4e5f678-9012-3456-defa-456789012345", + "trace_id_guid": "d4e5f678-9012-3456-defa-456789012345", + "debug": "Unexpected server error while retrieving style customization preferences." + } + } + } + } + } + } + } + } + } + } + }, + "/api/rest/2.0/customization/styles/fonts/search": { + "post": { + "operationId": "searchStyleFonts", + "description": "\n Version: 26.7.0.cl or later\n\nReturns custom fonts from the cluster-level or org-level font library. Omitting all filter fields returns all fonts in the target scope.\n\nWhen `include_font_assignments` is `true`, the response includes only the visualization areas explicitly assigned to each font. For cluster-scoped fonts, `org` is returned as `null`.\n\nRequires `ADMINISTRATION` (**Can administer ThoughtSpot**) or `DEVELOPER` (**Has developer privilege**) privilege.\n\n#### Usage guidelines\n\n- Set `scope` to `CLUSTER` to search the cluster-level library. Set `scope` to `ORG` (default) to search the authenticated user's org library.\n- Use `font_identifier` to look up a specific font by UUID or name.\n- Use `name_pattern` for partial, case-insensitive name matching.\n- Set `include_font_assignments` to `true` to include visualization areas this font is currently assigned to. Defaults to `false`.\n\n\n\n\n#### Endpoint URL\n", + "tags": [ + "Style Customization", + "26.7.0.cl" + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SearchStyleFontsRequest" + } + } + }, + "required": true + }, + "parameters": [], + "responses": { + "200": { + "description": "Custom fonts retrieved successfully.", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/StyleFontRecord" + } + }, + "examples": { + "example_1": { + "value": [ + { + "id": "c3d4e5f6-1111-1111-1111-111111111111", + "scope": "ORG", + "org": { + "id": 1234567890, + "name": "Sales" + }, + "name": "Acme Sans", + "weight": "NORMAL", + "style": "NORMAL", + "color": "#333333", + "creation_time_in_millis": 1714000000000, + "assignments": [ + { + "org": { + "id": 1234567890, + "name": "Sales" + }, + "visualization_areas": [ + "CHART_X_AXIS_LABELS", + "CHART_Y_AXIS_LABELS" + ] + } + ] + }, + { + "id": "d4e5f6a7-2222-2222-2222-222222222222", + "scope": "CLUSTER", + "name": "Corporate Bold", + "weight": "BOLD", + "style": "NORMAL", + "color": "#000000", + "creation_time_in_millis": 1713500000000, + "assignments": [] + } + ] + } + } + } + } + }, + "400": { + "description": "Invalid request.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + }, + "examples": { + "invalid_request": { + "summary": "Invalid request", + "value": { + "error": { + "message": { + "code": 10002, + "incident_id_guid": "a1b2c3d4-e5f6-7890-abcd-ef1234567890", + "trace_id_guid": "a1b2c3d4-e5f6-7890-abcd-ef1234567890", + "debug": "Only one of 'font_identifier' or 'name_pattern' may be provided." + } + } + } + } + } + } + } + }, + "401": { + "description": "Unauthorized access.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + }, + "examples": { + "unauthorized_access": { + "summary": "Unauthorized access", + "value": { + "error": { + "message": { + "code": 10097, + "incident_id_guid": "b2c3d4e5-f678-9012-bcde-f23456789012", + "trace_id_guid": "b2c3d4e5-f678-9012-bcde-f23456789012", + "debug": "Authentication required to search the cluster-level or org-level font library." + } + } + } + } + } + } + } + }, + "403": { + "description": "Forbidden access.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + }, + "examples": { + "forbidden_access": { + "summary": "Forbidden access", + "value": { + "error": { + "message": { + "code": 10023, + "incident_id_guid": "c3d4e5f6-7890-1234-cdef-345678901234", + "trace_id_guid": "c3d4e5f6-7890-1234-cdef-345678901234", + "debug": "Cluster config can only be accessed from PRIMARY org." + } + } + } + } + } + } + } + }, + "500": { + "description": "Unexpected error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + }, + "examples": { + "unexpected_error": { + "summary": "Unexpected error", + "value": { + "error": { + "message": { + "code": 10038, + "incident_id_guid": "d4e5f678-9012-3456-defa-456789012345", + "trace_id_guid": "d4e5f678-9012-3456-defa-456789012345", + "debug": "Unexpected server error while searching the font library." + } + } + } + } + } + } + } + } + } + } + }, + "/api/rest/2.0/customization/styles/update": { + "post": { + "operationId": "updateStyleCustomization", + "description": "\n Version: 26.7.0.cl or later\n\nUpdates style preferences at cluster level or for the authenticated user's org, including navigation panel color, chart color palette, embedded footer text, logo, and font assignments per visualization area. Cluster-level preferences serve as defaults for all orgs. Org-level preferences override cluster defaults. Resetting an Org-level preference falls back to Cluster-level preference, which on reset falls back to system defaults.\n\nRequires `ADMINISTRATION` (**Can administer ThoughtSpot**) or `DEVELOPER` (**Has developer privilege**) privilege.\n\n#### Usage guidelines\n\nTwo operations are supported via the `operation` field:\n\n- **REPLACE** (default): Applies the fields provided in the request. Omitted fields remain unchanged.\n- **RESET**: Reverts specific fields to defaults. Specify which fields to reset using `reset_options.style` (for style fields) and `reset_options.visualization_areas` (for font assignments). Fields not listed in `reset_options` are not affected.\n\n#### Logo upload\n\nLogo files are uploaded as binary fields using `multipart/form-data`:\n\n- `default_logo`: Square app icon and favicon. Recommended size: 140×140 px. Accepted formats: PNG, JPG.\n- `wide_logo`: Horizontal top nav bar logo. Recommended size: 230×45 px. Accepted formats: PNG, JPG.\n\nTo reset a logo to the default, use `operation: RESET` with `reset_options.style` set to `DEFAULT_LOGO` or `WIDE_LOGO`.\n\n#### Navigation panel color\n\nSet `navigation_panel.theme` to one of:\n\n- `DARK`: Default dark theme.\n- `TWO_TONE`: Dual-tone panel style.\n- `CUSTOM`: User-defined color. Provide `navigation_panel.base_color` as a 6-digit hex string (e.g. `#2359B6`).\n\n#### Chart color palette\n\nProvide exactly 8 color entries in `chart_color_palette.colors`. Each entry requires a `primary` hex color. If `secondary` shades are omitted, the server auto-generates 4 shades from the primary color.\n\n#### Font assignments\n\nSpecify `visualization_fonts.chart_visualization_fonts`, `visualization_fonts.table_visualization_fonts`, and `visualization_fonts.advanced_chart_visualization_fonts` to assign custom fonts to specific visualization areas. Only provide the areas you want to update; omitted areas remain unchanged.\n\n\n\n\n#### Endpoint URL\n", + "tags": [ + "Style Customization", + "26.7.0.cl" + ], + "requestBody": { + "content": { + "multipart/form-data": { + "schema": { + "type": "object", + "properties": { + "scope": { + "description": "Scope at which to apply the preferences. CLUSTER sets cluster-level\ndefaults for all orgs. ORG applies to the authenticated user's org.", + "default": "ORG", + "type": "string", + "enum": [ + "CLUSTER", + "ORG" + ] + }, + "operation": { + "description": "Operation to perform. REPLACE (default) applies the provided fields and\nleaves omitted fields unchanged. RESET reverts fields listed in\nreset_options to defaults.", + "default": "REPLACE", + "type": "string", + "enum": [ + "REPLACE", + "RESET" + ] + }, + "reset_options": { + "description": "Fields to reset when operation is RESET. Specify style fields and\nvisualization areas to revert to defaults.", + "allOf": [ + { + "$ref": "#/components/schemas/StyleResetOptionsInput" + } + ] + }, + "navigation_panel": { + "description": "Navigation panel color. Provide theme and, when theme is CUSTOM, also\nprovide base_color.", + "allOf": [ + { + "$ref": "#/components/schemas/NavigationPanelInput" + } + ] + }, + "chart_color_palette": { + "description": "Chart color palette. When provided with operation REPLACE, exactly 8\ncolor entries must be specified in colors.", + "allOf": [ + { + "$ref": "#/components/schemas/StyleColorPaletteInput" + } + ] + }, + "embedded_footer_text": { + "description": "Custom footer text for the embedded application. An empty\nstring clears the footer.", + "type": "string" + }, + "visualization_fonts": { + "description": "Font assignments per visualization area. Provide only the areas to\nupdate; omitted areas remain unchanged.", + "allOf": [ + { + "$ref": "#/components/schemas/VisualizationFontsInput" + } + ] + }, + "default_logo": { + "description": "Binary image for the DEFAULT logo slot (square app icon and favicon;\nrecommended 140x140 px). Accepted formats: PNG, JPG.", + "type": "string", + "format": "binary" + }, + "wide_logo": { + "description": "Binary image for the WIDE logo slot (horizontal top nav bar logo;\nrecommended 230x45 px). Accepted formats: PNG, JPG.", + "type": "string", + "format": "binary" + } + }, + "required": [ + "scope" + ] + }, + "encoding": { + "reset_options": { + "contentType": "application/json" + }, + "navigation_panel": { + "contentType": "application/json" + }, + "chart_color_palette": { + "contentType": "application/json" + }, + "visualization_fonts": { + "contentType": "application/json" + } + } + } + }, + "required": true + }, + "parameters": [], + "responses": { + "204": { + "description": "Style preferences updated successfully." + }, + "400": { + "description": "Invalid request.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + }, + "examples": { + "invalid_request": { + "summary": "Invalid request", + "value": { + "error": { + "message": { + "code": 10002, + "incident_id_guid": "a1b2c3d4-e5f6-7890-abcd-ef1234567890", + "trace_id_guid": "a1b2c3d4-e5f6-7890-abcd-ef1234567890", + "debug": "chart_color_palette must specify exactly 8 color entries when operation is REPLACE." + } + } + } + } + } + } + } + }, + "401": { + "description": "Unauthorized access.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + }, + "examples": { + "unauthorized_access": { + "summary": "Unauthorized access", + "value": { + "error": { + "message": { + "code": 10097, + "incident_id_guid": "b2c3d4e5-f678-9012-bcde-f23456789012", + "trace_id_guid": "b2c3d4e5-f678-9012-bcde-f23456789012", + "debug": "Authentication required to update style customization preferences." + } + } + } + } + } + } + } + }, + "403": { + "description": "Forbidden access.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + }, + "examples": { + "forbidden_access": { + "summary": "Forbidden access", + "value": { + "error": { + "message": { + "code": 10023, + "incident_id_guid": "c3d4e5f6-7890-1234-cdef-345678901234", + "trace_id_guid": "c3d4e5f6-7890-1234-cdef-345678901234", + "debug": "Cluster-level style customization can only be updated from PRIMARY org." + } + } + } + } + } + } + } + }, + "500": { + "description": "Unexpected error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + }, + "examples": { + "unexpected_error": { + "summary": "Unexpected error", + "value": { + "error": { + "message": { + "code": 10038, + "incident_id_guid": "d4e5f678-9012-3456-defa-456789012345", + "trace_id_guid": "d4e5f678-9012-3456-defa-456789012345", + "debug": "Unexpected server error while updating style customization preferences." + } + } + } + } + } + } + } + } + } + } + }, + "/api/rest/2.0/customization/styles/fonts/{font_identifier}/update": { + "post": { + "operationId": "updateStyleFont", + "description": "\n Version: 26.7.0.cl or later\n\nUpdates the metadata of an existing custom font in the cluster-level or org-level font library. Only the fields provided in the request are modified; omitted fields remain unchanged.\n\nRequires `ADMINISTRATION` (**Can administer ThoughtSpot**) or `DEVELOPER` (**Has developer privilege**) privilege.\n\n#### Usage guidelines\n\n- Identify the font using `font_identifier` (UUID or name).\n- Set `scope` to `CLUSTER` to target the cluster-level library. Set `scope` to `ORG` (default) to target the authenticated user's org library.\n- To replace the font file itself (WOFF/WOFF2 binary), delete the existing font and re-upload using `uploadStyleFont`.\n- `name` must be unique within the target scope if provided.\n- `color` must be a valid 6-digit hex string (e.g. `#333333`) if provided.\n\n\n\n\n#### Endpoint URL\n", + "tags": [ + "Style Customization", + "26.7.0.cl" + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UpdateStyleFontRequest" + } + } + }, + "required": true + }, + "parameters": [ + { + "in": "path", + "name": "font_identifier", + "required": true, + "schema": { + "type": "string" + }, + "description": "UUID or name of the font to update." + } + ], + "responses": { + "204": { + "description": "Font metadata updated successfully." + }, + "400": { + "description": "Invalid request.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + }, + "examples": { + "invalid_request": { + "summary": "Invalid request", + "value": { + "error": { + "message": { + "code": 10002, + "incident_id_guid": "a1b2c3d4-e5f6-7890-abcd-ef1234567890", + "trace_id_guid": "a1b2c3d4-e5f6-7890-abcd-ef1234567890", + "debug": "Font color must be a valid 6-digit hex string (e.g. '#333333')." + } + } + } + } + } + } + } + }, + "401": { + "description": "Unauthorized access.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + }, + "examples": { + "unauthorized_access": { + "summary": "Unauthorized access", + "value": { + "error": { + "message": { + "code": 10097, + "incident_id_guid": "b2c3d4e5-f678-9012-bcde-f23456789012", + "trace_id_guid": "b2c3d4e5-f678-9012-bcde-f23456789012", + "debug": "Authentication required to update a custom font." + } + } + } + } + } + } + } + }, + "403": { + "description": "Forbidden access.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + }, + "examples": { + "forbidden_access": { + "summary": "Forbidden access", + "value": { + "error": { + "message": { + "code": 10023, + "incident_id_guid": "c3d4e5f6-7890-1234-cdef-345678901234", + "trace_id_guid": "c3d4e5f6-7890-1234-cdef-345678901234", + "debug": "Only Tenant admin can update cluster-level fonts." + } + } + } + } + } + } + } + }, + "500": { + "description": "Unexpected error.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + }, + "examples": { + "unexpected_error": { + "summary": "Unexpected error", + "value": { + "error": { + "message": { + "code": 10038, + "incident_id_guid": "d4e5f678-9012-3456-defa-456789012345", + "trace_id_guid": "d4e5f678-9012-3456-defa-456789012345", + "debug": "Unexpected server error while updating the custom font." + } + } + } + } + } + } + } + } + } + } + }, + "/api/rest/2.0/customization/styles/fonts/upload": { + "post": { + "operationId": "uploadStyleFont", + "description": "\n Version: 26.7.0.cl or later\n\nUploads a custom font to the cluster-level or org-level font library. Cluster-level fonts are available as defaults for all orgs. Org-level fonts are only available within that org.\n\nRequires `ADMINISTRATION` (**Can administer ThoughtSpot**) or `DEVELOPER` (**Has developer privilege**) privilege.\n\n#### Usage guidelines\n\n- Only **WOFF** and **WOFF2** font formats are accepted. TTF and OTF files are rejected with an error.\n- The `name` field must be unique within the target scope. Uploading a font with a name that already exists returns an error.\n- Set `scope` to `CLUSTER` to upload to the cluster-level library. Set `scope` to `ORG` (default) to upload to the authenticated user's org library.\n- `weight` defaults to `NORMAL` if omitted. Supported values: `NORMAL`, `LIGHT`, `BOLD`.\n- `style` defaults to `NORMAL` if omitted. Supported values: `NORMAL`, `ITALIC`, `OBLIQUE`.\n- `color` defaults to `#000000` (black) if omitted. Provide as a 6-digit hex string (e.g. `#333333`).\n- The uploaded font can be assigned to visualization areas using the `updateStyleCustomization` endpoint.\n\n\n\n\n#### Endpoint URL\n", + "tags": [ + "Style Customization", + "26.7.0.cl" + ], + "requestBody": { + "content": { + "multipart/form-data": { + "schema": { + "type": "object", + "properties": { + "scope": { + "description": "Scope of the font library to upload to. CLUSTER uploads to the\ncluster-level library, making the font available as a default for all\norgs. ORG uploads to the authenticated user's org library. Defaults to\nORG if omitted.", + "default": "ORG", + "type": "string", + "enum": [ + "CLUSTER", + "ORG" + ] + }, + "name": { + "description": "Display name for the font (e.g. \"Acme Sans\"). Must be unique within the\ntarget scope; returns an error if a font with this name already exists.", + "type": "string" + }, + "weight": { + "description": "Weight of the font. Supported values: NORMAL, LIGHT, BOLD. Defaults to\nNORMAL if omitted.", + "default": "NORMAL", + "type": "string", + "enum": [ + "NORMAL", + "LIGHT", + "BOLD" + ] + }, + "style": { + "description": "Style of the font. Supported values: NORMAL, ITALIC, OBLIQUE. Defaults\nto NORMAL if omitted.", + "default": "NORMAL", + "type": "string", + "enum": [ + "NORMAL", + "ITALIC", + "OBLIQUE" + ] + }, + "color": { + "description": "Color of the font as a 6-digit hex string (e.g. \"#333333\"). Defaults to\n#000000 (black) if omitted. Returns an error if the value is malformed.", + "type": "string" + }, + "file_content": { + "description": "Binary WOFF or WOFF2 font file to upload. Only WOFF and WOFF2 formats\nare accepted; TTF and OTF are rejected. The file is validated on upload.", + "type": "string", + "format": "binary" + } + }, + "required": [ + "name", + "file_content" + ] + } + } + }, + "required": true + }, + "parameters": [], + "responses": { + "200": { + "description": "Font uploaded successfully.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/StyleFontUploadData" + }, + "examples": { + "example_1": { + "value": { + "id": "c3d4e5f6-1111-1111-1111-111111111111", + "name": "Acme Sans" + } + } + } + } + } + }, + "400": { + "description": "Invalid request.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + }, + "examples": { + "invalid_request": { + "summary": "Invalid request", + "value": { + "error": { + "message": { + "code": 10002, + "incident_id_guid": "a1b2c3d4-e5f6-7890-abcd-ef1234567890", + "trace_id_guid": "a1b2c3d4-e5f6-7890-abcd-ef1234567890", + "debug": "Unsupported font format. Only WOFF and WOFF2 are accepted." + } + } + } + } + } + } + } + }, + "401": { + "description": "Unauthorized access.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + }, + "examples": { + "unauthorized_access": { + "summary": "Unauthorized access", + "value": { + "error": { + "message": { + "code": 10097, + "incident_id_guid": "b2c3d4e5-f678-9012-bcde-f23456789012", + "trace_id_guid": "b2c3d4e5-f678-9012-bcde-f23456789012", + "debug": "Authentication required to upload a custom font to the font library." + } + } + } + } + } + } + } + }, + "403": { + "description": "Forbidden access.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + }, + "examples": { + "forbidden_access": { + "summary": "Forbidden access", + "value": { + "error": { + "message": { + "code": 10023, + "incident_id_guid": "c3d4e5f6-7890-1234-cdef-345678901234", + "trace_id_guid": "c3d4e5f6-7890-1234-cdef-345678901234", + "debug": "Cluster config can only be accessed from PRIMARY org." + } + } + } + } + } + } + } + }, + "500": { + "description": "Unexpected error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + }, + "examples": { + "unexpected_error": { + "summary": "Unexpected error", + "value": { + "error": { + "message": { + "code": 10038, + "incident_id_guid": "d4e5f678-9012-3456-defa-456789012345", + "trace_id_guid": "d4e5f678-9012-3456-defa-456789012345", + "debug": "Unexpected server error while uploading the custom font." + } + } + } + } + } + } + } + } + } + } + }, + "/api/rest/2.0/system/preferences/communication-channels/configure": { + "post": { + "operationId": "configureCommunicationChannelPreferences", + "description": "\nBeta Version: 10.14.0.cl or later\n\nConfigure communication channel preferences.\n- Use `cluster_preferences` to update the default preferences for your ThoughtSpot application instance.\n- If your instance has [Orgs](https://docs.thoughtspot.com/cloud/latest/orgs-overview), use `org_preferences` to specify Org-specific preferences that override the defaults.\n\nRequires `ADMINISTRATION` (**Can administer ThoughtSpot**) or `DEVELOPER` (**Has developer privilege**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, users with `APPLICATION_ADMINISTRATION` (**Can manage application settings**) privilege are also authorized to perform this action.\n\n\n\n\n#### Endpoint URL\n", + "tags": [ + "System", + "10.14.0.cl" + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ConfigureCommunicationChannelPreferencesRequest" + } + } + }, + "required": true + }, + "parameters": [], + "responses": { + "204": { + "description": "Communication channel preferences successfully updated." + }, + "400": { + "description": "Invalid request.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + }, + "examples": { + "invalid_request": { + "summary": "Invalid request", + "value": { + "error": { + "message": { + "code": 10002, + "incident_id_guid": "a1b2c3d4-e5f6-7890-abcd-ef1234567890", + "trace_id_guid": "a1b2c3d4-e5f6-7890-abcd-ef1234567890", + "debug": "RESET operation requires reset_events to be specified." + } + } + } + } + } + } + } + }, + "401": { + "description": "Unauthorized access.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + }, + "examples": { + "unauthorized_access": { + "summary": "Unauthorized access", + "value": { + "error": { + "message": { + "code": 10097, + "incident_id_guid": "b2c3d4e5-f678-9012-bcde-f23456789012", + "trace_id_guid": "b2c3d4e5-f678-9012-bcde-f23456789012", + "debug": "Authentication required to configure communication channel preferences." + } + } + } + } + } + } + } + }, + "403": { + "description": "Forbidden access.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + }, + "examples": { + "forbidden_access": { + "summary": "Forbidden access", + "value": { + "error": { + "message": { + "code": 10023, + "incident_id_guid": "c3d4e5f6-7890-1234-cdef-345678901234", + "trace_id_guid": "c3d4e5f6-7890-1234-cdef-345678901234", + "debug": "ADMINISTRATION privilege required to configure cluster-level communication channel preferences." + } + } + } + } + } + } + } + }, + "500": { + "description": "Unexpected error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + }, + "examples": { + "unexpected_error": { + "summary": "Unexpected error", + "value": { + "error": { + "message": { + "code": 10038, + "incident_id_guid": "d4e5f678-9012-3456-defa-456789012345", + "trace_id_guid": "d4e5f678-9012-3456-defa-456789012345", + "debug": "Unexpected server error while configuring communication channel preferences." + } + } + } + } + } + } + } + } + } + } + }, + "/api/rest/2.0/system/security-settings/configure": { + "post": { + "operationId": "configureSecuritySettings", + "description": "\n Version: 26.2.0.cl or later\n\nConfigure security settings for your ThoughtSpot application instance.\n- Use `cluster_preferences` to update cluster-level security settings including CORS whitelisted URLs, CSP settings, SAML redirect URLs, partitioned cookies, and non-embed access configuration.\n- Use `org_preferences` to configure Org-specific security settings. If your instance has [Orgs](https://docs.thoughtspot.com/cloud/latest/orgs-overview), this allows configuring CORS and non-embed access settings specific to the Org.\n\nRequires `ADMINISTRATION` (**Can administer ThoughtSpot**) or `DEVELOPER` (**Has developer privilege**) privilege. Cluster-level SAML and script-src settings require `ADMINISTRATION` privilege.\nSee [Security Settings](https://developers.thoughtspot.com/docs/security-settings) for more details.\n\n\n\n#### Endpoint URL\n", + "tags": [ + "System", + "26.2.0.cl" + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ConfigureSecuritySettingsRequest" + } + } + }, + "required": true + }, + "parameters": [], + "responses": { + "204": { + "description": "Successfully configured the security settings." + }, + "400": { + "description": "Invalid request.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + }, + "examples": { + "invalid_request": { + "summary": "Invalid request", + "value": { + "error": { + "message": { + "code": 10002, + "incident_id_guid": "a1b2c3d4-e5f6-7890-abcd-ef1234567890", + "trace_id_guid": "a1b2c3d4-e5f6-7890-abcd-ef1234567890", + "debug": "groups_identifiers_with_access can only be set when block_full_app_access is true." + } + } + } + } + } + } + } + }, + "401": { + "description": "Unauthorized access.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + }, + "examples": { + "unauthorized_access": { + "summary": "Unauthorized access", + "value": { + "error": { + "message": { + "code": 10097, + "incident_id_guid": "b2c3d4e5-f678-9012-bcde-f23456789012", + "trace_id_guid": "b2c3d4e5-f678-9012-bcde-f23456789012", + "debug": "Authentication required to configure security settings." + } + } + } + } + } + } + } + }, + "403": { + "description": "Forbidden access.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + }, + "examples": { + "forbidden_access": { + "summary": "Forbidden access", + "value": { + "error": { + "message": { + "code": 10023, + "incident_id_guid": "c3d4e5f6-7890-1234-cdef-345678901234", + "trace_id_guid": "c3d4e5f6-7890-1234-cdef-345678901234", + "debug": "ADMINISTRATION privilege required to configure cluster-level security settings." + } + } + } + } + } + } + } + }, + "500": { + "description": "Unexpected error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + }, + "examples": { + "unexpected_error": { + "summary": "Unexpected error", + "value": { + "error": { + "message": { + "code": 10038, + "incident_id_guid": "d4e5f678-9012-3456-defa-456789012345", + "trace_id_guid": "d4e5f678-9012-3456-defa-456789012345", + "debug": "Unexpected server error while configuring security settings." + } + } + } + } + } + } + } + } + } + } + }, + "/api/rest/2.0/system/config": { + "get": { + "operationId": "getSystemConfig", + "description": "\n Version: 9.0.0.cl or later\n\nRetrieves the current configuration details of the cluster. If the request is successful, the API returns a list configuration settings applied on the cluster.\n\nRequires `ADMINISTRATION`(**Can administer ThoughtSpot**) privilege to view these complete configuration settings of the cluster.\nIf [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `SYSTEM_INFO_ADMINISTRATION` (**Can view system activities**) privilege is required.\n\nThis API does not require any parameters to be passed in the request.\n\n\n\n\n#### Endpoint URL\n", + "tags": [ + "System", + "9.0.0.cl" + ], + "parameters": [], + "responses": { + "200": { + "description": "Cluster config information.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SystemConfig" + }, + "examples": { + "example_1": { + "value": { + "onboarding_content_url": "", + "saml_enabled": false, + "okta_enabled": false + } + } + } + } + } + }, + "400": { + "description": "Invalid request.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "401": { + "description": "Unauthorized access.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + }, + "examples": { + "unauthorized_access": { + "summary": "Unauthorized access", + "value": { + "error": { + "message": { + "code": 10097, + "incident_id_guid": "b2c3d4e5-f678-9012-bcde-f23456789012", + "trace_id_guid": "b2c3d4e5-f678-9012-bcde-f23456789012", + "debug": "Authentication required to retrieve system configuration." + } + } + } + } + } + } + } + }, + "403": { + "description": "Forbidden access.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + }, + "examples": { + "forbidden_access": { + "summary": "Forbidden access", + "value": { + "error": { + "message": { + "code": 10023, + "incident_id_guid": "c3d4e5f6-7890-1234-cdef-345678901234", + "trace_id_guid": "c3d4e5f6-7890-1234-cdef-345678901234", + "debug": "ADMINISTRATION privilege required to retrieve system configuration." + } + } + } + } + } + } + } + }, + "500": { + "description": "Unexpected error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + }, + "examples": { + "unexpected_error": { + "summary": "Unexpected error", + "value": { + "error": { + "message": { + "code": 10038, + "incident_id_guid": "d4e5f678-9012-3456-defa-456789012345", + "trace_id_guid": "d4e5f678-9012-3456-defa-456789012345", + "debug": "Unexpected server error while retrieving system configuration." + } + } + } + } + } + } + } + } + } + } + }, + "/api/rest/2.0/system": { + "get": { + "operationId": "getSystemInformation", + "description": "\n Version: 9.0.0.cl or later\n\nGets system information such as the release version, locale, time zone, deployment environment, date format, and date time format of the cluster.\n\nRequires `ADMINISTRATION` (**Can administer ThoughtSpot**) privileges.\nIf [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `SYSTEM_INFO_ADMINISTRATION` (**Can view system activities**) privilege is required.\n\nThis API does not require any parameters to be passed in the request. \n\n\n\n\n#### Endpoint URL\n", + "tags": [ + "System", + "9.0.0.cl" + ], + "parameters": [], + "responses": { + "200": { + "description": "Cluster information.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SystemInfo" + }, + "examples": { + "example_1": { + "value": { + "id": "local", + "name": "local", + "release_version": "test", + "time_zone": "America/Los_Angeles", + "locale": "", + "date_format": "MM/dd/yyyy", + "api_version": "v1", + "type": "SW", + "environment": "DEV", + "license": "EAE", + "date_time_format": "MM/dd/yyyy h:mm a", + "time_format": "HH:mm:ss", + "system_user_id": "67e15c06-d153-4924-a4cd-ff615393b60f", + "super_user_id": "0f0dd0f7-7411-4195-a4aa-0dc6b58413c9", + "hidden_object_id": "31745bb4-defd-4e8b-8de9-8fd01db78827", + "system_group_id": "179d8867-cf36-4a8d-a019-63a226fd3196", + "tsadmin_user_id": "59481331-ee53-42be-a548-bd87be6ddd4a", + "admin_group_id": "d0326b56-ef23-4c8a-8327-a30e99bcc72b", + "all_tables_connection_id": "bfc6feb4-8dac-402c-8ae8-78b43d318777", + "all_user_group_id": "b25ee394-9d13-49e3-9385-cd97f5b253b4", + "accept_language": "undefined", + "all_user_group_member_user_count": 13, + "logical_model_version": 43 + } + } + } + } + } + }, + "400": { + "description": "Invalid request.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "401": { + "description": "Unauthorized access.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + }, + "examples": { + "unauthorized_access": { + "summary": "Unauthorized access", + "value": { + "error": { + "message": { + "code": 10097, + "incident_id_guid": "b2c3d4e5-f678-9012-bcde-f23456789012", + "trace_id_guid": "b2c3d4e5-f678-9012-bcde-f23456789012", + "debug": "Authentication required to retrieve system information." + } + } + } + } + } + } + } + }, + "403": { + "description": "Forbidden access.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + }, + "examples": { + "forbidden_access": { + "summary": "Forbidden access", + "value": { + "error": { + "message": { + "code": 10023, + "incident_id_guid": "c3d4e5f6-7890-1234-cdef-345678901234", + "trace_id_guid": "c3d4e5f6-7890-1234-cdef-345678901234", + "debug": "ADMINISTRATION privilege required to retrieve system information." + } + } + } + } + } + } + } + }, + "500": { + "description": "Unexpected error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + }, + "examples": { + "unexpected_error": { + "summary": "Unexpected error", + "value": { + "error": { + "message": { + "code": 10038, + "incident_id_guid": "d4e5f678-9012-3456-defa-456789012345", + "trace_id_guid": "d4e5f678-9012-3456-defa-456789012345", + "debug": "Unexpected server error while retrieving system information." + } + } + } + } + } + } + } + } + } + } + }, + "/api/rest/2.0/system/config-overrides": { + "get": { + "operationId": "getSystemOverrideInfo", + "description": "\n Version: 9.2.0.cl or later\n\nGets a list of configuration overrides applied on the cluster. \n\nRequires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege.\nIf [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `APPLICATION_ADMINISTRATION` (**Can manage application settings**) privilege is required.\n\nThis API does not require any parameters to be passed in the request. \n\n\n\n\n#### Endpoint URL\n", + "tags": [ + "System", + "9.2.0.cl" + ], + "parameters": [], + "responses": { + "200": { + "description": "Cluster configuration which can be overridden.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SystemOverrideInfo" + }, + "examples": { + "example_1": { + "description": "System configuration overrides. The config_override_info field is a free-form JSON object whose keys are camelCase internal configuration property identifiers as returned by the server.", + "value": { + "config_override_info": { + "maxTableRowsPerPage": 500, + "enableCustomCalendar": true, + "allowMultipleOrgs": true, + "sessionTimeout": 3600 + } + } + }, + "example_2": { + "description": "No configuration overrides applied", + "value": { + "config_override_info": {} + } + } + } + } + } + }, + "400": { + "description": "Invalid request.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "401": { + "description": "Unauthorized access.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + }, + "examples": { + "unauthorized_access": { + "summary": "Unauthorized access", + "value": { + "error": { + "message": { + "code": 10097, + "incident_id_guid": "b2c3d4e5-f678-9012-bcde-f23456789012", + "trace_id_guid": "b2c3d4e5-f678-9012-bcde-f23456789012", + "debug": "Authentication required to retrieve system configuration overrides." + } + } + } + } + } + } + } + }, + "403": { + "description": "Forbidden access.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + }, + "examples": { + "forbidden_access": { + "summary": "Forbidden access", + "value": { + "error": { + "message": { + "code": 10023, + "incident_id_guid": "c3d4e5f6-7890-1234-cdef-345678901234", + "trace_id_guid": "c3d4e5f6-7890-1234-cdef-345678901234", + "debug": "ADMINISTRATION privilege required to retrieve system configuration overrides." + } + } + } + } + } + } + } + }, + "500": { + "description": "Unexpected error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + }, + "examples": { + "unexpected_error": { + "summary": "Unexpected error", + "value": { + "error": { + "message": { + "code": 10038, + "incident_id_guid": "d4e5f678-9012-3456-defa-456789012345", + "trace_id_guid": "d4e5f678-9012-3456-defa-456789012345", + "debug": "Unexpected server error while retrieving system configuration overrides." + } + } + } + } + } + } + } + } + } + } + }, + "/api/rest/2.0/system/preferences/communication-channels/search": { + "post": { + "operationId": "searchCommunicationChannelPreferences", + "description": "\nBeta Version: 10.14.0.cl or later\n\nFetch communication channel preferences.\n- Use `cluster_preferences` to fetch the default preferences for your ThoughtSpot application instance.\n- If your instance has [Orgs](https://docs.thoughtspot.com/cloud/latest/orgs-overview), use `org_preferences` to fetch any Org-specific preferences that override the defaults.\n\nRequires `ADMINISTRATION` (**Can administer ThoughtSpot**) or `DEVELOPER` (**Has developer privilege**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, users with `APPLICATION_ADMINISTRATION` (**Can manage application settings**) privilege are also authorized to perform this action.\n\n\n\n\n#### Endpoint URL\n", + "tags": [ + "System", + "10.14.0.cl" + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SearchCommunicationChannelPreferencesRequest" + } + } + }, + "required": true + }, + "parameters": [], + "responses": { + "200": { + "description": "Communication channel preferences retrieved successfully.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CommunicationChannelPreferencesResponse" + }, + "examples": { + "example_1": { + "value": { + "cluster_preferences": [ + { + "event_type": "LIVEBOARD_SCHEDULE", + "channels": [ + "WEBHOOK" + ] + } + ], + "org_preferences": [ + { + "org": { + "id": "583464508", + "name": "test_org" + }, + "preferences": [ + { + "event_type": "LIVEBOARD_SCHEDULE", + "channels": [ + "EMAIL" + ] + } + ] + } + ] + } + } + } + } + } + }, + "400": { + "description": "Invalid request.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + }, + "examples": { + "invalid_request": { + "summary": "Invalid request", + "value": { + "error": { + "message": { + "code": 10002, + "incident_id_guid": "a1b2c3d4-e5f6-7890-abcd-ef1234567890", + "trace_id_guid": "a1b2c3d4-e5f6-7890-abcd-ef1234567890", + "debug": "org_identifier in org_preferences does not match a known org." + } + } + } + } + } + } + } + }, + "401": { + "description": "Unauthorized access.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + }, + "examples": { + "unauthorized_access": { + "summary": "Unauthorized access", + "value": { + "error": { + "message": { + "code": 10097, + "incident_id_guid": "b2c3d4e5-f678-9012-bcde-f23456789012", + "trace_id_guid": "b2c3d4e5-f678-9012-bcde-f23456789012", + "debug": "Authentication required to search communication channel preferences." + } + } + } + } + } + } + } + }, + "403": { + "description": "Forbidden access.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + }, + "examples": { + "forbidden_access": { + "summary": "Forbidden access", + "value": { + "error": { + "message": { + "code": 10023, + "incident_id_guid": "c3d4e5f6-7890-1234-cdef-345678901234", + "trace_id_guid": "c3d4e5f6-7890-1234-cdef-345678901234", + "debug": "ADMINISTRATION privilege required to retrieve cluster-level communication channel preferences." + } + } + } + } + } + } + } + }, + "500": { + "description": "Unexpected error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + }, + "examples": { + "unexpected_error": { + "summary": "Unexpected error", + "value": { + "error": { + "message": { + "code": 10038, + "incident_id_guid": "d4e5f678-9012-3456-defa-456789012345", + "trace_id_guid": "d4e5f678-9012-3456-defa-456789012345", + "debug": "Unexpected server error while searching communication channel preferences." + } + } + } + } + } + } + } + } + } + } + }, + "/api/rest/2.0/system/security-settings/search": { + "post": { + "operationId": "searchSecuritySettings", + "description": "\n Version: 26.2.0.cl or later\n\nFetch security settings for your ThoughtSpot application instance.\n- Use `scope: CLUSTER` to retrieve cluster-level security settings, including CORS and CSP allowlists, SAML redirect URLs, and settings that control access to non-embedded pages.\n- Use `scope: ORG` to retrieve Org-level security settings. If your instance has [Orgs](https://docs.thoughtspot.com/cloud/latest/orgs-overview), this returns CORS and non-embed access settings specific to the Org.\n- If `scope` is not specified, returns both cluster and Org-specific settings based on user privileges.\n\nRequires `ADMINISTRATION` (**Can administer ThoughtSpot**) or `DEVELOPER` (**Has developer privilege**) privilege.\nSee [Security Settings](https://developers.thoughtspot.com/docs/security-settings) for more details.\n\n\n\n#### Endpoint URL\n", + "tags": [ + "System", + "26.2.0.cl" + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SearchSecuritySettingsRequest" + } + } + }, + "required": true + }, + "parameters": [], + "responses": { + "200": { + "description": "Successfully retrieved the list of security settings.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SecuritySettingsResponse" + }, + "examples": { + "example_1": { + "value": { + "cluster_preferences": { + "enable_partitioned_cookies": false, + "cors_whitelisted_urls": [ + "example.com" + ], + "csp_settings": { + "connect_src_urls": [ + "https://connect.example.com" + ], + "font_src_urls": [ + "https://font.example.com" + ], + "visual_embed_hosts": [ + "https://embed.example.com" + ], + "iframe_src_urls": [ + "https://embed.example.com" + ], + "img_src_urls": [ + "https://img.example.com" + ], + "script_src_urls": { + "enabled": true, + "urls": [ + "https://script.example.com" + ] + }, + "style_src_urls": [ + "https://style.example.com" + ] + }, + "saml_redirect_urls": [ + "https://saml.example.com" + ], + "non_embed_access": { + "block_full_app_access": true + } + }, + "org_preferences": [ + { + "org": { + "id": 0, + "name": "Primary" + }, + "cors_whitelisted_urls": [ + "https://cors.example.com" + ], + "non_embed_access": { + "block_full_app_access": true, + "groups_with_access": [ + { + "id": "1234567890", + "name": "Group Name" + } + ] + } + } + ] + } + } + } + } + } + }, + "400": { + "description": "Invalid request.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + }, + "examples": { + "invalid_request": { + "summary": "Invalid request", + "value": { + "error": { + "message": { + "code": 10002, + "incident_id_guid": "a1b2c3d4-e5f6-7890-abcd-ef1234567890", + "trace_id_guid": "a1b2c3d4-e5f6-7890-abcd-ef1234567890", + "debug": "scope must be one of CLUSTER or ORG." + } + } + } + } + } + } + } + }, + "401": { + "description": "Unauthorized access.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + }, + "examples": { + "unauthorized_access": { + "summary": "Unauthorized access", + "value": { + "error": { + "message": { + "code": 10097, + "incident_id_guid": "b2c3d4e5-f678-9012-bcde-f23456789012", + "trace_id_guid": "b2c3d4e5-f678-9012-bcde-f23456789012", + "debug": "Authentication required to retrieve security settings." + } + } + } + } + } + } + } + }, + "403": { + "description": "Forbidden access.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + }, + "examples": { + "forbidden_access": { + "summary": "Forbidden access", + "value": { + "error": { + "message": { + "code": 10023, + "incident_id_guid": "c3d4e5f6-7890-1234-cdef-345678901234", + "trace_id_guid": "c3d4e5f6-7890-1234-cdef-345678901234", + "debug": "ADMINISTRATION privilege required to retrieve cluster-level security settings." + } + } + } + } + } + } + } + }, + "500": { + "description": "Unexpected error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + }, + "examples": { + "unexpected_error": { + "summary": "Unexpected error", + "value": { + "error": { + "message": { + "code": 10038, + "incident_id_guid": "d4e5f678-9012-3456-defa-456789012345", + "trace_id_guid": "d4e5f678-9012-3456-defa-456789012345", + "debug": "Unexpected server error while retrieving security settings." + } + } + } + } + } + } + } + } + } + } + }, + "/api/rest/2.0/system/config-update": { + "post": { + "operationId": "updateSystemConfig", + "description": "\n Version: 9.2.0.cl or later\n\nUpdates the current configuration of the cluster. You must send the configuration data in JSON format.\n\nRequires `ADMINISTRATION` (**Can administer ThoughtSpot**) privileges.\nIf [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `APPLICATION_ADMINISTRATION` (**Can manage application settings**) privilege is required.\n\n\n\n\n#### Endpoint URL\n", + "tags": [ + "System", + "9.2.0.cl" + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UpdateSystemConfigRequest" + } + } + }, + "required": true + }, + "parameters": [], + "responses": { + "204": { + "description": "Configuration successfully updated." + }, + "400": { + "description": "Invalid request.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + }, + "examples": { + "invalid_request": { + "summary": "Invalid request", + "value": { + "error": { + "message": { + "code": 10002, + "incident_id_guid": "a1b2c3d4-e5f6-7890-abcd-ef1234567890", + "trace_id_guid": "a1b2c3d4-e5f6-7890-abcd-ef1234567890", + "debug": "The configuration JSON contains an unknown or unsupported key." + } + } + } + } + } + } + } + }, + "401": { + "description": "Unauthorized access.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + }, + "examples": { + "unauthorized_access": { + "summary": "Unauthorized access", + "value": { + "error": { + "message": { + "code": 10097, + "incident_id_guid": "b2c3d4e5-f678-9012-bcde-f23456789012", + "trace_id_guid": "b2c3d4e5-f678-9012-bcde-f23456789012", + "debug": "Authentication required to update system configuration." + } + } + } + } + } + } + } + }, + "403": { + "description": "Forbidden access.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + }, + "examples": { + "forbidden_access": { + "summary": "Forbidden access", + "value": { + "error": { + "message": { + "code": 10023, + "incident_id_guid": "c3d4e5f6-7890-1234-cdef-345678901234", + "trace_id_guid": "c3d4e5f6-7890-1234-cdef-345678901234", + "debug": "ADMINISTRATION privilege required to update system configuration." + } + } + } + } + } + } + } + }, + "500": { + "description": "Unexpected error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + }, + "examples": { + "unexpected_error": { + "summary": "Unexpected error", + "value": { + "error": { + "message": { + "code": 10038, + "incident_id_guid": "d4e5f678-9012-3456-defa-456789012345", + "trace_id_guid": "d4e5f678-9012-3456-defa-456789012345", + "debug": "Unexpected server error while updating system configuration." + } + } + } + } + } + } + } + } + } + } + }, + "/api/rest/2.0/system/communication-channels/validate": { + "post": { + "operationId": "validateCommunicationChannel", + "description": "\nBeta Version: 26.4.0.cl or later\n\nValidates a communication channel configuration to ensure it is properly set up and can receive events.\n- Use `channel_type` to specify the type of communication channel to validate (e.g., WEBHOOK).\n- Use `channel_identifier` to provide the unique identifier or name for the communication channel.\n- Use `event_type` to specify the event type to validate for this channel.\n\nRequires `ADMINISTRATION` (**Can administer ThoughtSpot**) or `DEVELOPER` (**Has developer privilege**) privilege. For webhook channels, users with `CAN_MANAGE_WEBHOOKS` (**Can manage webhooks**) privilege are also authorized to perform this action.\n\n\n\n\n#### Endpoint URL\n", + "tags": [ + "System", + "26.4.0.cl" + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ValidateCommunicationChannelRequest" + } + } + }, + "required": true + }, + "parameters": [], + "responses": { + "200": { + "description": "communication channel configuration validated successfully.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CommunicationChannelValidateResponse" + }, + "examples": { + "example_1": { + "description": "Successful webhook validation with HTTP check only", + "value": { + "channel_type": "WEBHOOK", + "channel_id": "f47ac10b-58cc-4372-a567-0e02b2c3d479", + "channel_name": "My Liveboard Webhook", + "event_type": "LIVEBOARD_SCHEDULE", + "job_id": "9a8b7c6d-5e4f-3210-fedc-ba9876543210", + "result_code": "SUCCESS", + "details": [ + { + "validation_step": "HTTP_CONNECTION_CHECK", + "status": "SUCCESS", + "http_status": 200, + "error_message": null, + "aws_s3_info": null + } + ] + } + }, + "example_2": { + "description": "Successful webhook validation with both HTTP and S3 storage checks", + "value": { + "channel_type": "WEBHOOK", + "channel_id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890", + "channel_name": "S3 Storage Webhook", + "event_type": "LIVEBOARD_SCHEDULE", + "job_id": "b2c3d4e5-f678-9012-bcde-f23456789012", + "result_code": "SUCCESS", + "details": [ + { + "validation_step": "HTTP_CONNECTION_CHECK", + "status": "SUCCESS", + "http_status": 200, + "error_message": null, + "aws_s3_info": null + }, + { + "validation_step": "STORAGE_FILE_UPLOAD_CHECK", + "status": "SUCCESS", + "http_status": null, + "error_message": null, + "aws_s3_info": { + "bucket_name": "my-webhook-files", + "file_name": "thoughtspot-validation-test.json", + "object_key": "webhooks/thoughtspot-validation-test.json" + } + } + ] + } + }, + "example_3": { + "description": "Partial success: HTTP check passed but S3 upload failed", + "value": { + "channel_type": "WEBHOOK", + "channel_id": "c3d4e5f6-7890-1234-cdef-345678901234", + "channel_name": "Failed S3 Webhook", + "event_type": "LIVEBOARD_SCHEDULE", + "job_id": "d4e5f678-9012-3456-defa-456789012345", + "result_code": "PARTIAL_SUCCESS", + "details": [ + { + "validation_step": "HTTP_CONNECTION_CHECK", + "status": "SUCCESS", + "http_status": 200, + "error_message": null, + "aws_s3_info": null + }, + { + "validation_step": "STORAGE_FILE_UPLOAD_CHECK", + "status": "FAILED", + "http_status": null, + "error_message": "Access denied. Ensure the IAM role has s3:PutObject permission on the target bucket.", + "aws_s3_info": null + } + ] + } + } + } + } + } + }, + "400": { + "description": "Invalid request.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + }, + "examples": { + "invalid_request": { + "summary": "Invalid request", + "value": { + "error": { + "message": { + "code": 10002, + "incident_id_guid": "a1b2c3d4-e5f6-7890-abcd-ef1234567890", + "trace_id_guid": "a1b2c3d4-e5f6-7890-abcd-ef1234567890", + "debug": "Webhook with the specified channel_identifier was not found." + } + } + } + } + } + } + } + }, + "401": { + "description": "Unauthorized access.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + }, + "examples": { + "unauthorized_access": { + "summary": "Unauthorized access", + "value": { + "error": { + "message": { + "code": 10097, + "incident_id_guid": "b2c3d4e5-f678-9012-bcde-f23456789012", + "trace_id_guid": "b2c3d4e5-f678-9012-bcde-f23456789012", + "debug": "Authentication required to validate a communication channel." + } + } + } + } + } + } + } + }, + "403": { + "description": "Forbidden access.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + }, + "examples": { + "forbidden_access": { + "summary": "Forbidden access", + "value": { + "error": { + "message": { + "code": 10023, + "incident_id_guid": "c3d4e5f6-7890-1234-cdef-345678901234", + "trace_id_guid": "c3d4e5f6-7890-1234-cdef-345678901234", + "debug": "Insufficient privileges to validate communication channels." + } + } + } + } + } + } + } + }, + "500": { + "description": "Unexpected error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + }, + "examples": { + "unexpected_error": { + "summary": "Unexpected error", + "value": { + "error": { + "message": { + "code": 10038, + "incident_id_guid": "d4e5f678-9012-3456-defa-456789012345", + "trace_id_guid": "d4e5f678-9012-3456-defa-456789012345", + "debug": "Unexpected server error while validating the communication channel." + } + } + } + } + } + } + } + } + } + } + }, + "/api/rest/2.0/tags/assign": { + "post": { + "operationId": "assignTag", + "description": "\n Version: 9.0.0.cl or later\n\nAssigns tags to Liveboards, Answers, Tables, and Worksheets.\n\nRequires edit access to the metadata object.\n\n\n\n\n#### Endpoint URL\n", + "tags": [ + "Tags", + "9.0.0.cl" + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/AssignTagRequest" + } + } + }, + "required": true + }, + "parameters": [], + "responses": { + "204": { + "description": "Tags successfully assigned." + }, + "400": { + "description": "Invalid request.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "401": { + "description": "Unauthorized access.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "403": { + "description": "Forbidden access.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "500": { + "description": "Unexpected error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + } + } + } + }, + "/api/rest/2.0/tags/create": { + "post": { + "operationId": "createTag", + "description": "\n Version: 9.0.0.cl or later\n\nCreates a tag object.\n\nTags are labels that identify a metadata object. For example, you can create a tag to designate subject areas, such as sales, HR, marketing, and finance.\n\nRequires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege.\nIf [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `TAGMANAGEMENT` (**Can manage tags**) privilege is required to create, edit, and delete tags.\n\n\n\n\n#### Endpoint URL\n", + "tags": [ + "Tags", + "9.0.0.cl" + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CreateTagRequest" + } + } + }, + "required": true + }, + "parameters": [], + "responses": { + "200": { + "description": "Tag successfully created.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Tag" + }, + "examples": { + "example_1": { + "value": { + "name": "test5", + "id": "6abf5aec-3485-4f83-b25f-8c55b92e2b20", + "color": "#342323", + "deleted": false, + "hidden": false, + "external": false, + "deprecated": false, + "creation_time_in_millis": 1685441468684, + "modification_time_in_millis": 1685441468684, + "author_id": "59481331-ee53-42be-a548-bd87be6ddd4a", + "modifier_id": "59481331-ee53-42be-a548-bd87be6ddd4a", + "owner_id": "6abf5aec-3485-4f83-b25f-8c55b92e2b20" + } + } + } + } + } + }, + "400": { + "description": "Invalid request.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "401": { + "description": "Unauthorized access.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "403": { + "description": "Forbidden access.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "500": { + "description": "Unexpected error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + } + } + } + }, + "/api/rest/2.0/tags/{tag_identifier}/delete": { + "post": { + "operationId": "deleteTag", + "description": "\n Version: 9.0.0.cl or later\n\nDeletes a tag object from the ThoughtSpot system\n\nRequires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege.\nIf [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `TAGMANAGEMENT` (**Can manage tags**) privilege is required to create, edit, and delete tags.\n\n\n\n\n#### Endpoint URL\n", + "tags": [ + "Tags", + "9.0.0.cl" + ], + "parameters": [ + { + "in": "path", + "name": "tag_identifier", + "required": true, + "schema": { + "type": "string" + }, + "description": "Tag identifier Tag name or Tag id." + } + ], + "responses": { + "204": { + "description": "Tag successfully deleted." + }, + "400": { + "description": "Invalid request.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "401": { + "description": "Unauthorized access.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "403": { + "description": "Forbidden access.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "500": { + "description": "Unexpected error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + } + } + } + }, + "/api/rest/2.0/tags/search": { + "post": { + "operationId": "searchTags", + "description": "\n Version: 9.0.0.cl or later\n\nGets a list of tag objects available on the ThoughtSpot system. To get details of a specific tag object, specify the GUID or name.\n\nAny authenticated user can search for tag objects.\n\n\n\n\n#### Endpoint URL\n", + "tags": [ + "Tags", + "9.0.0.cl" + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SearchTagsRequest" + } + } + }, + "required": true + }, + "parameters": [], + "responses": { + "200": { + "description": "Tags search result.", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Tag" + } + }, + "examples": { + "example_1": { + "value": [ + { + "name": "test4", + "id": "0935bbb5-17e2-43ab-b657-da6bf347cbb4", + "color": "#342323", + "deleted": false, + "hidden": false, + "external": false, + "deprecated": false, + "creation_time_in_millis": 1684937524885, + "modification_time_in_millis": 1684937524885, + "author_id": "59481331-ee53-42be-a548-bd87be6ddd4a", + "modifier_id": "59481331-ee53-42be-a548-bd87be6ddd4a", + "owner_id": "0935bbb5-17e2-43ab-b657-da6bf347cbb4" + }, + { + "name": "test6", + "id": "65a5c39a-daf5-4cae-975f-44283628494e", + "color": "#342323", + "deleted": false, + "hidden": false, + "external": false, + "deprecated": false, + "creation_time_in_millis": 1684988834183, + "modification_time_in_millis": 1684988887888, + "author_id": "59481331-ee53-42be-a548-bd87be6ddd4a", + "modifier_id": "59481331-ee53-42be-a548-bd87be6ddd4a", + "owner_id": "65a5c39a-daf5-4cae-975f-44283628494e" + } + ] + } + } + } + } + }, + "400": { + "description": "Invalid request.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "401": { + "description": "Unauthorized access.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "403": { + "description": "Forbidden access.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "500": { + "description": "Unexpected error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + } + } + } + }, + "/api/rest/2.0/tags/unassign": { + "post": { + "operationId": "unassignTag", + "description": "\n Version: 9.0.0.cl or later\n\nRemoves the tags applied to a Liveboard, Answer, Table, or Worksheet.\n\nRequires edit access to the metadata object.\n\n\n\n\n#### Endpoint URL\n", + "tags": [ + "Tags", + "9.0.0.cl" + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnassignTagRequest" + } + } + }, + "required": true + }, + "parameters": [], + "responses": { + "204": { + "description": "Tags successfully unassigned." + }, + "400": { + "description": "Invalid request.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "401": { + "description": "Unauthorized access.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "403": { + "description": "Forbidden access.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "500": { + "description": "Unexpected error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + } + } + } + }, + "/api/rest/2.0/tags/{tag_identifier}/update": { + "post": { + "operationId": "updateTag", + "description": "\n Version: 9.0.0.cl or later\n\nUpdates a tag object.\n\nYou can modify the `name` and `color` properties of a tag object. \n\nRequires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege.\nIf [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `TAGMANAGEMENT` (**Can manage tags**) privilege is required to create, edit, and delete tags.\n\n\n\n\n#### Endpoint URL\n", + "tags": [ + "Tags", + "9.0.0.cl" + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UpdateTagRequest" + } + } + }, + "required": true + }, + "parameters": [ + { + "in": "path", + "name": "tag_identifier", + "required": true, + "schema": { + "type": "string" + }, + "description": "Name or Id of the tag." + } + ], + "responses": { + "204": { + "description": "Tag successfully updated." + }, + "400": { + "description": "Invalid request.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "401": { + "description": "Unauthorized access.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "403": { + "description": "Forbidden access.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "500": { + "description": "Unexpected error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + } + } + } + }, + "/api/rest/2.0/users/activate": { + "post": { + "operationId": "activateUser", + "description": "\n Version: 9.7.0.cl or later\n\nActivates a deactivated user account.\n\nRequires `ADMINISTRATION` (**Can administer Thoughtspot**) privilege.\nIf [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `USER_ADMINISTRATION` (**Can manage users**) privilege is required.\n\nTo activate an inactive user account, the API request body must include the following information:\n\n- Username or the GUID of the user account.\n- Auth token generated for the deactivated user. The auth token is sent in the API response when a user is deactivated.\n- Password for the user account.\n\n\n\n\n#### Endpoint URL\n", + "tags": [ + "Users", + "9.7.0.cl" + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ActivateUserRequest" + } + } + }, + "required": true + }, + "parameters": [], + "responses": { + "200": { + "description": "User activated successfully.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/User" + } + } + } + }, + "400": { + "description": "Invalid request.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "401": { + "description": "Unauthorized access.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "403": { + "description": "Forbidden access.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "500": { + "description": "Unexpected error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + } + } + } + }, + "/api/rest/2.0/users/change-password": { + "post": { + "operationId": "changeUserPassword", + "description": "\n Version: 9.0.0.cl or later\n\nUpdates the current password of the user.\n\nRequires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege.\nIf [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `USER_ADMINISTRATION` (**Can manage users**) privilege is required.\n\n\n\n\n#### Endpoint URL\n", + "tags": [ + "Users", + "9.0.0.cl" + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ChangeUserPasswordRequest" + } + } + }, + "required": true + }, + "parameters": [], + "responses": { + "204": { + "description": "User password change operation successful." + }, + "400": { + "description": "Invalid request.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "401": { + "description": "Unauthorized access.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "403": { + "description": "Forbidden access.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "500": { + "description": "Unexpected error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + } + } + } + }, + "/api/rest/2.0/users/create": { + "post": { + "operationId": "createUser", + "description": "\n Version: 9.0.0.cl or later\n\nCreates a user in ThoughtSpot.\n\nThe API endpoint allows you to configure several user properties such as email address, account status, share notification preferences, and sharing visibility. You can provision the user to [groups](https://docs.thoughtspot.com/cloud/latest/groups-privileges) and [Orgs](https://docs.thoughtspot.com/cloud/latest/orgs-overview). You can also add Liveboard, Answer, and Worksheet objects to the user’s favorites list, assign a default Liveboard for the user, and set user preferences.\n\nRequires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege.\nIf [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `USER_ADMINISTRATION` (**Can manage users**) privilege is required.\n\n\n\n\n#### Endpoint URL\n", + "tags": [ + "Users", + "9.0.0.cl" + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CreateUserRequest" + } + } + }, + "required": true + }, + "parameters": [], + "responses": { + "200": { + "description": "User successfully created.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/User" + } + } + } + }, + "400": { + "description": "Invalid request.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "401": { + "description": "Unauthorized access.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "403": { + "description": "Forbidden access.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "500": { + "description": "Unexpected error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + } + } + } + }, + "/api/rest/2.0/users/deactivate": { + "post": { + "operationId": "deactivateUser", + "description": "\n Version: 9.7.0.cl or later\n\nDeactivates a user account.\n\nRequires `ADMINISTRATION` (**Can administer Thoughtspot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `USER_ADMINISTRATION` (**Can manage users**) privilege is required.\n\nTo deactivate a user account, the API request body must include the following information:\n\n- Username or the GUID of the user account\n- Base URL of the ThoughtSpot instance\n\nIf the API request is successful, ThoughtSpot returns the activation URL in the response. The activation URL is valid for 14 days and can be used to re-activate the account and reset the password of the deactivated account.\n\n\n\n\n#### Endpoint URL\n", + "tags": [ + "Users", + "9.7.0.cl" + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/DeactivateUserRequest" + } + } + }, + "required": true + }, + "parameters": [], + "responses": { + "200": { + "description": "User deactivated successfully.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ResponseActivationURL" + } + } + } + }, + "400": { + "description": "Invalid request.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "401": { + "description": "Unauthorized access.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "403": { + "description": "Forbidden access.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "500": { + "description": "Unexpected error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + } + } + } + }, + "/api/rest/2.0/users/{user_identifier}/delete": { + "post": { + "operationId": "deleteUser", + "description": "\n Version: 9.0.0.cl or later\n\nDeletes a user from the ThoughtSpot system.\n\nIf you want to remove a user from a specific Org but not from ThoughtSpot, update the group and Org mapping properties of the user object via a POST API call to the [/api/rest/2.0/users/{user_identifier}/update](#/http/api-endpoints/users/update-user) endpoint.\n\nRequires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege.\nIf [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `USER_ADMINISTRATION` (**Can manage users**) privilege is required.\n\n\n\n\n#### Endpoint URL\n", + "tags": [ + "Users", + "9.0.0.cl" + ], + "parameters": [ + { + "in": "path", + "name": "user_identifier", + "required": true, + "schema": { + "type": "string" + }, + "description": "GUID / name of the user" + } + ], + "responses": { + "204": { + "description": "User successfully deleted." + }, + "400": { + "description": "Invalid request.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "401": { + "description": "Unauthorized access.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "403": { + "description": "Forbidden access.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "500": { + "description": "Unexpected error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + } + } + } + }, + "/api/rest/2.0/users/force-logout": { + "post": { + "operationId": "forceLogoutUsers", + "description": "\n Version: 9.0.0.cl or later\n\nEnforces logout on current user sessions. \n\nUse this API with caution as it may invalidate active user sessions and force users to re-login. Make sure you specify the usernames or GUIDs. If you pass null values in the API call, all user sessions on your cluster become invalid, and the users are forced to re-login.\n\nRequires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege.\nIf [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `USER_ADMINISTRATION` (**Can manage users**) privilege is required.\n\n\n\n\n#### Endpoint URL\n", + "tags": [ + "Users", + "9.0.0.cl" + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ForceLogoutUsersRequest" + } + } + }, + "required": true + }, + "parameters": [], + "responses": { + "204": { + "description": "Force logging out of users operation successful." + }, + "400": { + "description": "Invalid request.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "401": { + "description": "Unauthorized access.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "403": { + "description": "Forbidden access.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "500": { + "description": "Unexpected error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + } + } + } + }, + "/api/rest/2.0/users/import": { + "post": { + "operationId": "importUsers", + "description": "\n Version: 9.0.0.cl or later\n\nImports user data from external databases into ThoughtSpot. During the user import operation:\n\n* If the specified users are not available in ThoughtSpot, the users are created and assigned a default password. Defining a `default_password` in the API request is optional.\n* If `delete_unspecified_users` is set to `true`, the users not specified in the API request, excluding the `tsadmin`, `guest`, `system` and `su` users, are deleted.\n* If the specified user objects are already available in ThoughtSpot, the object properties are updated and synchronized as per the input data in the API request.\n\nA successful API call returns the object that represents the changes made in the ThoughtSpot system.\n\nRequires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege.\nIf [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `USER_ADMINISTRATION` (**Can manage users**) privilege is required.\n\n\n\n\n#### Endpoint URL\n", + "tags": [ + "Users", + "9.0.0.cl" + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ImportUsersRequest" + } + } + }, + "required": true + }, + "parameters": [], + "responses": { + "200": { + "description": "Import users operation successful.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ImportUsersResponse" + } + } + } + }, + "400": { + "description": "Invalid request.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "401": { + "description": "Unauthorized access.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "403": { + "description": "Forbidden access.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "500": { + "description": "Unexpected error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + } + } + } + }, + "/api/rest/2.0/users/reset-password": { + "post": { + "operationId": "resetUserPassword", + "description": "\n Version: 9.0.0.cl or later\n\nResets the password of a user account. Administrators can reset password on behalf of a user.\n\nRequires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege.\nIf [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `USER_ADMINISTRATION` (**Can manage users**) privilege is required.\n\n\n\n\n#### Endpoint URL\n", + "tags": [ + "Users", + "9.0.0.cl" + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ResetUserPasswordRequest" + } + } + }, + "required": true + }, + "parameters": [], + "responses": { + "204": { + "description": "User password reset operation successful." + }, + "400": { + "description": "Invalid request.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "401": { + "description": "Unauthorized access.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "403": { + "description": "Forbidden access.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "500": { + "description": "Unexpected error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + } + } + } + }, + "/api/rest/2.0/users/search": { + "post": { + "operationId": "searchUsers", + "description": "\n Version: 9.0.0.cl or later\n\nGets a list of users available on the ThoughtSpot system.\n\nTo get details of a specific user, specify the user GUID or name. You can also filter the API response based on groups, Org ID, user visibility, account status, user type, and user preference settings and favorites.\n\nAvailable to all users. Users with `ADMINISTRATION` (**Can administer ThoughtSpot**) privileges can view all users properties. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `USER_ADMINISTRATION` (**Can manage users**) privilege is required.\n\n**NOTE**: If the API returns an empty list, consider increasing the value of the `record_size` parameter. To search across all available users, set `record_size` to `-1`.\n\n\n\n\n#### Endpoint URL\n", + "tags": [ + "Users", + "9.0.0.cl" + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SearchUsersRequest" + } + } + }, + "required": true + }, + "parameters": [], + "responses": { + "200": { + "description": "User search result.", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/User" + } + } + } + } + }, + "400": { + "description": "Invalid request.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "401": { + "description": "Unauthorized access.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "403": { + "description": "Forbidden access.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "500": { + "description": "Unexpected error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + } + } + } + }, + "/api/rest/2.0/users/{user_identifier}/update": { + "post": { + "operationId": "updateUser", + "description": "\n Version: 9.0.0.cl or later\n\nUpdates the properties of a user object.\n\nYou can modify user properties such as username, email, and share notification settings. You can also assign new groups and Orgs, remove the user from a group or Org, reset password, and modify user preferences.\n\nRequires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege.\nIf [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `USER_ADMINISTRATION` (**Can manage users**) privilege is required.\n\n\n\n\n#### Endpoint URL\n", + "tags": [ + "Users", + "9.0.0.cl" + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UpdateUserRequest" + } + } + }, + "required": true + }, + "parameters": [ + { + "in": "path", + "name": "user_identifier", + "required": true, + "schema": { + "type": "string" + }, + "description": "GUID / name of the user" + } + ], + "responses": { + "204": { + "description": "User successfully updated." + }, + "400": { + "description": "Invalid request.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "401": { + "description": "Unauthorized access.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "403": { + "description": "Forbidden access.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "500": { + "description": "Unexpected error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + } + } + } + }, + "/api/rest/2.0/template/variables/create": { + "post": { + "operationId": "createVariable", + "description": "\nCreate a variable which can be used for parameterizing metadata objects
Version: 26.4.0.cl or later\n\nAllows creating a variable which can be used for parameterizing metadata objects in ThoughtSpot.\n\nRequires ADMINISTRATION role and TENANT scope.\nThe CAN_MANAGE_VARIABLES permission allows you to manage Formula Variables in the current organization scope.\n\nThe API endpoint supports the following types of variables:\n* CONNECTION_PROPERTY - For connection properties\n* TABLE_MAPPING - For table mappings\n* CONNECTION_PROPERTY_PER_PRINCIPAL - For connection properties per principal. In order to use this please contact support to enable this.\n* FORMULA_VARIABLE - For Formula variables, introduced in 10.15.0.cl\n\nWhen creating a variable, you need to specify:\n* The variable type\n* A unique name for the variable\n* Whether the variable contains sensitive values (defaults to false)\n* The data type of the variable, only specify for formula variables (defaults to null)\n\nThe operation will fail if:\n* The user lacks required permissions\n* The variable name already exists\n* The variable type is invalid\n\n\n\n#### Endpoint URL\n", + "tags": [ + "Variable", + "26.4.0.cl" + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CreateVariableRequest" + } + } + }, + "required": true + }, + "parameters": [], + "responses": { + "200": { + "description": "Create variable is successful.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Variable" + } + } + } + }, + "400": { + "description": "Invalid request.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "401": { + "description": "Unauthorized access.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "403": { + "description": "Forbidden access.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "500": { + "description": "Unexpected error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + } + } + } + }, + "/api/rest/2.0/template/variables/{identifier}/delete": { + "post": { + "operationId": "deleteVariable", + "description": "\nDelete a variable
Version: 10.14.0.cl or later\n\n**Note:** This API endpoint is deprecated and will be removed from ThoughtSpot in a future release. Use [POST /api/rest/2.0/template/variables/delete](/api/rest/2.0/template/variables/delete) instead.\n\nAllows deleting a variable from ThoughtSpot.\n\nRequires ADMINISTRATION role and TENANT scope.\nThe CAN_MANAGE_VARIABLES permission allows you to manage Formula Variables in the current organization scope.\n\nThe API endpoint requires:\n* The variable identifier (ID or name)\n\nThe operation will fail if:\n* The user lacks required permissions\n* The variable doesn't exist\n* The variable is being used by other objects \n\n\n\n#### Endpoint URL\n", + "deprecated": true, + "tags": [ + "Variable", + "10.14.0.cl" + ], + "parameters": [ + { + "in": "path", + "name": "identifier", + "required": true, + "schema": { + "type": "string" + }, + "description": "Unique id or name of the variable" + } + ], + "responses": { + "204": { + "description": "Deleting the variable is successful." + }, + "400": { + "description": "Invalid request.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "401": { + "description": "Unauthorized access.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "403": { + "description": "Forbidden access.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "500": { + "description": "Unexpected error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + } + } + } + }, + "/api/rest/2.0/template/variables/delete": { + "post": { + "operationId": "deleteVariables", + "description": "\nDelete variable(s)
Version: 26.4.0.cl or later\n\nAllows deleting multiple variables from ThoughtSpot.\n\nRequires ADMINISTRATION role and TENANT scope.\nThe CAN_MANAGE_VARIABLES permission allows you to manage Formula Variables in the current organization scope.\n\nThe API endpoint requires:\n* The variable identifiers (IDs or names)\n\nThe operation will fail if:\n* The user lacks required permissions\n* Any of the variables don't exist\n* Any of the variables are being used by other objects\n\n\n\n\n#### Endpoint URL\n", + "tags": [ + "Variable", + "26.4.0.cl" + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/DeleteVariablesRequest" + } + } + }, + "required": true + }, + "parameters": [], + "responses": { + "204": { + "description": "Deletion of variable(s) is successful." + }, + "400": { + "description": "Invalid request.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "401": { + "description": "Unauthorized access.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "403": { + "description": "Forbidden access.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "500": { + "description": "Unexpected error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + } + } + } + }, + "/api/rest/2.0/template/variables/{identifier}/update-values": { + "post": { + "operationId": "putVariableValues", + "description": "\nUpdate values for a variable
Version: 26.4.0.cl or later\n\nAllows updating values for a specific variable in ThoughtSpot.\n\nRequires ADMINISTRATION role.\nThe CAN_MANAGE_VARIABLES permission allows you to manage Formula Variables in the current organization scope.\n\nThe API endpoint allows:\n* Adding new values to the variable\n* Replacing existing values\n* Deleting values from the variable\n* Resetting all values\n\nWhen updating variable values, you need to specify:\n* The variable identifier (ID or name)\n* The values to add/replace/remove\n* The operation to perform (ADD, REPLACE, REMOVE, RESET)\n\nBehaviour based on operation type:\n* ADD - Adds values to the variable if this is a list type variable, else same as replace.\n* REPLACE - Replaces all values of a given set of constraints with the current set of values.\n* REMOVE - Removes any values which match the set of conditions of the variables if this is a list type variable, else clears value.\n* RESET - Removes all constraints for the given variable, scope is ignored\n\n\n\n\n#### Endpoint URL\n", + "tags": [ + "Variable", + "26.4.0.cl" + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PutVariableValuesRequest" + } + } + }, + "required": true + }, + "parameters": [ + { + "in": "path", + "name": "identifier", + "required": true, + "schema": { + "type": "string" + }, + "description": "Unique ID or name of the variable" + } + ], + "responses": { + "204": { + "description": "Variable values updated successfully." + }, + "400": { + "description": "Invalid request.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "401": { + "description": "Unauthorized access.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "403": { + "description": "Forbidden access.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "500": { + "description": "Unexpected error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + } + } + } + }, + "/api/rest/2.0/template/variables/search": { + "post": { + "operationId": "searchVariables", + "description": "\nSearch variables
Version: 26.4.0.cl or later\n\nAllows searching for variables in ThoughtSpot.\n\nRequires ADMINISTRATION role.\nThe CAN_MANAGE_VARIABLES permission allows you to manage Formula Variables in the current organization scope.\n\nThe API endpoint supports searching variables by:\n* Variable identifier (ID or name)\n* Variable type\n* Name pattern (case-insensitive, supports % for wildcard)\n\nThe search results can be formatted in three ways:\n* METADATA - Returns only variable metadata (default)\n* METADATA_AND_VALUES - Returns variable metadata and values\n\nThe values can be filtered by scope:\n* org_identifier\n* principal_identifier\n* model_identifier\n\n\n\n\n#### Endpoint URL\n", + "tags": [ + "Variable", + "26.4.0.cl" + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SearchVariablesRequest" + } + } + }, + "required": true + }, + "parameters": [], + "responses": { + "200": { + "description": "List of variables is successful.", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Variable" + } + } + } + } + }, + "400": { + "description": "Invalid request.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "401": { + "description": "Unauthorized access.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "403": { + "description": "Forbidden access.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "500": { + "description": "Unexpected error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + } + } + } + }, + "/api/rest/2.0/template/variables/{identifier}/update": { + "post": { + "operationId": "updateVariable", + "description": "\nUpdate a variable's name
Version: 26.4.0.cl or later\n\nAllows updating a variable's name in ThoughtSpot.\n\nRequires ADMINISTRATION role and TENANT scope.\nThe CAN_MANAGE_VARIABLES permission allows you to manage Formula Variables in the current organization scope.\n\nThe API endpoint allows updating:\n* The variable name\n\n\n\n#### Endpoint URL\n", + "tags": [ + "Variable", + "26.4.0.cl" + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UpdateVariableRequest" + } + } + }, + "required": true + }, + "parameters": [ + { + "in": "path", + "name": "identifier", + "required": true, + "schema": { + "type": "string" + }, + "description": "Unique id or name of the variable to update." + } + ], + "responses": { + "204": { + "description": "Variable name updated successfully." + }, + "400": { + "description": "Invalid request.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "401": { + "description": "Unauthorized access.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "403": { + "description": "Forbidden access.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "500": { + "description": "Unexpected error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + } + } + } + }, + "/api/rest/2.0/template/variables/update-values": { + "post": { + "operationId": "updateVariableValues", + "description": "\nUpdate values for multiple variables
Version: 10.14.0.cl or later\n\n**Note:** This API endpoint is deprecated and will be removed from ThoughtSpot in a future release. Use [POST /api/rest/2.0/template/variables/{identifier}/update-values](/api/rest/2.0/template/variables/%7Bidentifier%7D/update-values) instead.\n\nAllows updating values for multiple variables in ThoughtSpot.\n\nRequires ADMINISTRATION role.\nThe CAN_MANAGE_VARIABLES permission allows you to manage Formula Variables in the current organization scope.\n\nThe API endpoint allows:\n* Adding new values to variables\n* Replacing existing values\n* Deleting values from variables\n\nWhen updating variable values, you need to specify:\n* The variable identifiers\n* The values to add/replace/remove for each variable\n* The operation to perform (ADD, REPLACE, REMOVE, RESET)\n\nBehaviour based on operation type:\n* ADD - Adds values to the variable if this is a list type variable, else same as replace.\n* REPLACE - Replaces all values of a given set of constraints with the current set of values.\n* REMOVE - Removes any values which match the set of conditions of the variables if this is a list type variable, else clears value.\n* RESET - Removes all constrains for a given variable, scope is ignored\n\n\n\n\n#### Endpoint URL\n", + "deprecated": true, + "tags": [ + "Variable", + "10.14.0.cl" + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UpdateVariableValuesRequest" + } + } + }, + "required": true + }, + "parameters": [], + "responses": { + "204": { + "description": "Variable values updated successfully." + }, + "400": { + "description": "Invalid request.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "401": { + "description": "Unauthorized access.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "403": { + "description": "Forbidden access.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "500": { + "description": "Unexpected error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + } + } + } + }, + "/api/rest/2.0/vcs/git/branches/commit": { + "post": { + "operationId": "commitBranch", + "description": "\n Version: 9.2.0.cl or later\n\nCommits TML files of metadata objects to the Git branch configured on your instance.\n\nRequires at least edit access to objects used in the commit operation.\n\nBefore using this endpoint to push your commits:\n\n* Enable Git integration on your instance.\n* Make sure the Git repository and branch details are configured on your instance.\n\nFor more information, see [Git integration documentation](https://developers.thoughtspot.com/docs/git-integration).\n\n\n\n\n#### Endpoint URL\n", + "tags": [ + "Version Control", + "9.2.0.cl" + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CommitBranchRequest" + } + } + }, + "required": true + }, + "parameters": [], + "responses": { + "200": { + "description": "Successfully committed the metadata objects", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CommitResponse" + } + } + } + }, + "400": { + "description": "Invalid request.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "401": { + "description": "Unauthorized access.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "403": { + "description": "Forbidden access.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "500": { + "description": "Unexpected error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + } + } + } + }, + "/api/rest/2.0/vcs/git/config/create": { + "post": { + "operationId": "createConfig", + "description": "\n Version: 9.2.0.cl or later\n\nAllows you to connect a ThoughtSpot instance to a Git repository.\n\nRequires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege.\n\nIf [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance on your instance, the `CAN_SETUP_VERSION_CONTROL` (**Can set up version control**) privilege.\n\nYou can use this API endpoint to connect your ThoughtSpot development and production environments to the development and production branches of a Git repository.\n\nBefore using this endpoint to connect your ThoughtSpot instance to a Git repository, check the following prerequisites:\n\n* You have a Git repository. If you are using GitHub, make sure you have a valid account and an access token to connect ThoughtSpot to GitHub. For information about generating a token, see [GitHub Documentation](https://docs.github.com/en/authentication/keeping-your-account-and-data-secure/managing-your-personal-access-tokens).\n\n* Your access token has `repo` scope that grants full access to public and private repositories.\n* Your Git repository has a branch that can be configured as a default branch in ThoughtSpot.\n\nFor more information, see [Git integration documentation](https://developers.thoughtspot.com/docs/?pageid=git-integration).\n\n**Note**: ThoughtSpot supports only GitHub / itHub Enterprise for CI/CD.\n\n\n\n\n#### Endpoint URL\n", + "tags": [ + "Version Control", + "9.2.0.cl" + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CreateConfigRequest" + } + } + }, + "required": true + }, + "parameters": [], + "responses": { + "200": { + "description": "Successfully configured local repository", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/RepoConfigObject" + } + } + } + }, + "400": { + "description": "Invalid request.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "401": { + "description": "Unauthorized access.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "403": { + "description": "Forbidden access.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "500": { + "description": "Unexpected error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + } + } + } + }, + "/api/rest/2.0/vcs/git/config/delete": { + "post": { + "operationId": "deleteConfig", + "description": "\n Version: 9.2.0.cl or later\n\nDeletes Git repository configuration from your ThoughtSpot instance.\n\nRequires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege.\n\nIf [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance on your instance, the `CAN_SETUP_VERSION_CONTROL` (**Can set up version control**) privilege.\n\n\n\n\n#### Endpoint URL\n", + "tags": [ + "Version Control", + "9.2.0.cl" + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/DeleteConfigRequest" + } + } + }, + "required": true + }, + "parameters": [], + "responses": { + "204": { + "description": "Successfully deleted local repository configuration" + }, + "400": { + "description": "Invalid request.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "401": { + "description": "Unauthorized access.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "403": { + "description": "Forbidden access.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "500": { + "description": "Unexpected error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + } + } + } + }, + "/api/rest/2.0/vcs/git/commits/deploy": { + "post": { + "operationId": "deployCommit", + "description": "\n Version: 9.2.0.cl or later\n\nAllows you to deploy a commit and publish TML content to your ThoughtSpot instance.\n\nRequires at least edit access to the objects used in the deploy operation.\n\nThe API deploys the head of the branch unless a `commit_id` is specified in the API request. If the branch name is not defined in the request, the default branch is considered for deploying commits.\n\nFor more information, see [Git integration documentation](https://developers.thoughtspot.com/docs/git-integration).\n\n\n\n\n#### Endpoint URL\n", + "tags": [ + "Version Control", + "9.2.0.cl" + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/DeployCommitRequest" + } + } + }, + "required": true + }, + "parameters": [], + "responses": { + "200": { + "description": "Successfully deployed the changes", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/DeployResponse" + } + } + } + } + }, + "400": { + "description": "Invalid request.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "401": { + "description": "Unauthorized access.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "403": { + "description": "Forbidden access.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "500": { + "description": "Unexpected error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + } + } + } + }, + "/api/rest/2.0/vcs/git/commits/{commit_id}/revert": { + "post": { + "operationId": "revertCommit", + "description": "\n Version: 9.2.0.cl or later\n\nReverts TML objects to a previous commit specified in the API request.\n\nRequires at least edit access to objects.\n\nIn the API request, specify the `commit_id`. If the branch name is not specified in the request, the API will consider the default branch configured on your instance.\n\nBy default, the API reverts all objects. If the revert operation fails for one of the objects provided in the commit, the API returns an error and does not revert any object.\n\nFor more information, see [Git integration documentation](https://developers.thoughtspot.com/docs/git-integration).\n\n\n\n\n#### Endpoint URL\n", + "tags": [ + "Version Control", + "9.2.0.cl" + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/RevertCommitRequest" + } + } + }, + "required": true + }, + "parameters": [ + { + "in": "path", + "name": "commit_id", + "required": true, + "schema": { + "type": "string" + }, + "description": "Commit id to which the object should be reverted" + } + ], + "responses": { + "200": { + "description": "Reverted the object to the commit point specified", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/RevertResponse" + } + } + } + }, + "400": { + "description": "Invalid request.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "401": { + "description": "Unauthorized access.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "403": { + "description": "Forbidden access.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "500": { + "description": "Unexpected error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + } + } + } + }, + "/api/rest/2.0/vcs/git/commits/search": { + "post": { + "operationId": "searchCommits", + "description": "\n Version: 9.2.0.cl or later\n\nGets a list of commits for a given metadata object.\n\nRequires `DATAMANAGEMENT` (**Can manage data**) privilege.\n\nIf [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance on your instance, the `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` (**Can manage data models**) privilege and edit access to the metadata objects.\n\n\n\n\n#### Endpoint URL\n", + "tags": [ + "Version Control", + "9.2.0.cl" + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SearchCommitsRequest" + } + } + }, + "required": true + }, + "parameters": [], + "responses": { + "200": { + "description": "Commit history of the metadata object", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/CommitHistoryResponse" + } + } + } + } + }, + "400": { + "description": "Invalid request.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "401": { + "description": "Unauthorized access.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "403": { + "description": "Forbidden access.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "500": { + "description": "Unexpected error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + } + } + } + }, + "/api/rest/2.0/vcs/git/config/search": { + "post": { + "operationId": "searchConfig", + "description": "\n Version: 9.2.0.cl or later\n\nGets Git repository connections configured on the ThoughtSpot instance.\n\nRequires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege.\n\nIf [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance on your instance, the `CAN_SETUP_VERSION_CONTROL` (**Can set up version control**) privilege.\n\n\n\n\n#### Endpoint URL\n", + "tags": [ + "Version Control", + "9.2.0.cl" + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SearchConfigRequest" + } + } + }, + "required": true + }, + "parameters": [], + "responses": { + "200": { + "description": "Details of local repository configuration", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RepoConfigObject" + } + } + } + } + }, + "400": { + "description": "Invalid request.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "401": { + "description": "Unauthorized access.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "403": { + "description": "Forbidden access.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "500": { + "description": "Unexpected error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + } + } + } + }, + "/api/rest/2.0/vcs/git/config/update": { + "post": { + "operationId": "updateConfig", + "description": "\n Version: 9.2.0.cl or later\n\nUpdates Git repository configuration settings.\n\nRequires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege.\n\nIf [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance on your instance, the `CAN_SETUP_VERSION_CONTROL` (**Can set up version control**) privilege.\n\n\n\n\n#### Endpoint URL\n", + "tags": [ + "Version Control", + "9.2.0.cl" + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UpdateConfigRequest" + } + } + }, + "required": true + }, + "parameters": [], + "responses": { + "200": { + "description": "Successfully updated local repository configuration", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/RepoConfigObject" + } + } + } + }, + "400": { + "description": "Invalid request.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "401": { + "description": "Unauthorized access.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "403": { + "description": "Forbidden access.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "500": { + "description": "Unexpected error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + } + } + } + }, + "/api/rest/2.0/vcs/git/branches/validate": { + "post": { + "operationId": "validateMerge", + "description": "\n Version: 9.2.0.cl or later\n\nValidates the content of your source branch against the objects in your destination environment.\n\nBefore merging content from your source branch to the destination branch, run this API operation from your destination environment and ensure that the changes from the source branch function in the destination environment.\n\nRequires `DATAMANAGEMENT` (**Can manage data**) privilege.\n\nIf [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance on your instance, the `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` (**Can manage data models**) privilege and edit access to the metadata objects.\n\n\n\n\n#### Endpoint URL\n", + "tags": [ + "Version Control", + "9.2.0.cl" + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ValidateMergeRequest" + } + } + }, + "required": true + }, + "parameters": [], + "responses": { + "200": { + "description": "validation done successfully", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/DeployResponse" + } + } + } + } + }, + "400": { + "description": "Invalid request.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "401": { + "description": "Unauthorized access.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "403": { + "description": "Forbidden access.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "500": { + "description": "Unexpected error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + } + } + } + }, + "/api/rest/2.0/webhooks/create": { + "post": { + "operationId": "createWebhookConfiguration", + "description": "\n Version: 10.14.0.cl or later\n\nCreates a new webhook configuration to receive notifications for specified events. The webhook will be triggered when the configured events occur in the system.\n\nRequires `ADMINISTRATION` (**Can administer ThoughtSpot**) or `DEVELOPER` (**Has developer privilege**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, users with `CAN_MANAGE_WEBHOOKS` (**Can manage webhooks**) privilege are also authorized to perform this action.\n\n\n\n\n#### Endpoint URL\n", + "tags": [ + "Webhooks", + "10.14.0.cl" + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CreateWebhookConfigurationRequest" + } + } + }, + "required": true + }, + "parameters": [], + "responses": { + "200": { + "description": "Webhook configuration created successfully", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/WebhookResponse" + }, + "examples": { + "example_1": { + "description": "Basic webhook with Bearer token authentication", + "value": { + "id": "f47ac10b-58cc-4372-a567-0e02b2c3d479", + "name": "My Liveboard Webhook", + "description": "Webhook to notify external system about liveboard schedules", + "org": { + "id": "0", + "name": "Primary" + }, + "url": "https://myapp.example.com/webhooks/thoughtspot", + "url_params": { + "api_key": "abc123", + "version": "v1" + }, + "events": [ + "LIVEBOARD_SCHEDULE" + ], + "authentication": { + "BEARER_TOKEN": "***" + }, + "signature_verification": { + "type": "HMAC_SHA256", + "header": "X-Webhook-Signature", + "algorithm": "SHA256", + "secret": "***" + }, + "creation_time_in_millis": 1724277430243, + "modification_time_in_millis": 1724277430243, + "additional_headers": [ + { + "key": "Custom-Header", + "value": "value1" + }, + { + "key": "Custom-Header-2", + "value": "value2" + } + ], + "created_by": { + "id": "8e3f2a7b-9c4d-4e5f-8a1b-7c9d3e6f4a2b", + "name": "sarah_chen" + }, + "last_modified_by": { + "id": "8e3f2a7b-9c4d-4e5f-8a1b-7c9d3e6f4a2b", + "name": "sarah_chen" + } + } + }, + "example_2": { + "description": "Webhook with OAuth2 authentication", + "value": { + "id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890", + "name": "OAuth2 Webhook", + "description": "Webhook with OAuth2 client credentials", + "org": { + "id": "0", + "name": "Primary" + }, + "url": "https://api.example.com/webhooks", + "events": [ + "LIVEBOARD_SCHEDULE" + ], + "authentication": { + "OAUTH2": { + "authorization_url": "https://auth.example.com/oauth2/authorize", + "client_id": "client_123", + "client_secret": "***" + } + }, + "creation_time_in_millis": 1724278530123, + "modification_time_in_millis": 1724278530123, + "created_by": { + "id": "7d5e9f2a-4b8c-4d6e-9a3b-5c7e1f4a8b2d", + "name": "mike_rodriguez" + } + } + }, + "example_3": { + "description": "Webhook with GCP GCS storage destination", + "value": { + "id": "c9d8e7f6-a5b4-4321-9876-fedcba012345", + "name": "GCS Storage Webhook", + "description": "Webhook that uploads payloads to a GCS bucket", + "org": { + "id": "0", + "name": "Primary" + }, + "url": "https://api.example.com/webhooks", + "events": [ + "LIVEBOARD_SCHEDULE" + ], + "storage_destination": { + "storage_type": "GCP_GCS", + "storage_config": { + "gcp_gcs_config": { + "bucket_name": "my-webhook-files", + "service_account_email": "my-sa@my-project.iam.gserviceaccount.com", + "path_prefix": "webhooks/" + } + } + }, + "creation_time_in_millis": 1724279630456, + "modification_time_in_millis": 1724279630456, + "created_by": { + "id": "3a2b1c4d-5e6f-7890-abcd-ef0123456789", + "name": "priya_sharma" + }, + "last_modified_by": { + "id": "3a2b1c4d-5e6f-7890-abcd-ef0123456789", + "name": "priya_sharma" + } + } + } + } + } + } + }, + "400": { + "description": "Invalid request.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + }, + "examples": { + "invalid_request": { + "summary": "Invalid request", + "value": { + "error": { + "message": { + "code": 10002, + "incident_id_guid": "a1b2c3d4-e5f6-7890-abcd-ef1234567890", + "trace_id_guid": "a1b2c3d4-e5f6-7890-abcd-ef1234567890", + "debug": "At least one event type must be specified in the events field." + } + } + } + } + } + } + } + }, + "401": { + "description": "Unauthorized access.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + }, + "examples": { + "unauthorized_access": { + "summary": "Unauthorized access", + "value": { + "error": { + "message": { + "code": 10097, + "incident_id_guid": "b2c3d4e5-f678-9012-bcde-f23456789012", + "trace_id_guid": "b2c3d4e5-f678-9012-bcde-f23456789012", + "debug": "Authentication required to create a webhook configuration." + } + } + } + } + } + } + } + }, + "403": { + "description": "Forbidden access.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + }, + "examples": { + "forbidden_access": { + "summary": "Forbidden access", + "value": { + "error": { + "message": { + "code": 10023, + "incident_id_guid": "c3d4e5f6-7890-1234-cdef-345678901234", + "trace_id_guid": "c3d4e5f6-7890-1234-cdef-345678901234", + "debug": "Insufficient privileges to create webhook configurations." + } + } + } + } + } + } + } + }, + "500": { + "description": "Unexpected error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + }, + "examples": { + "unexpected_error": { + "summary": "Unexpected error", + "value": { + "error": { + "message": { + "code": 10038, + "incident_id_guid": "d4e5f678-9012-3456-defa-456789012345", + "trace_id_guid": "d4e5f678-9012-3456-defa-456789012345", + "debug": "Unexpected server error while creating the webhook configuration." + } + } + } + } + } + } + } + } + } + } + }, + "/api/rest/2.0/webhooks/delete": { + "post": { + "operationId": "deleteWebhookConfigurations", + "description": "\n Version: 10.14.0.cl or later\n\nDeletes one or more webhook configurations by their unique id or name. Returns status of each deletion operation, including successfully deleted webhooks and any failures with error details.\n\nRequires `ADMINISTRATION` (**Can administer ThoughtSpot**) or `DEVELOPER` (**Has developer privilege**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, users with `CAN_MANAGE_WEBHOOKS` (**Can manage webhooks**) privilege are also authorized to perform this action.\n\n\n\n\n#### Endpoint URL\n", + "tags": [ + "Webhooks", + "10.14.0.cl" + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/DeleteWebhookConfigurationsRequest" + } + } + }, + "required": true + }, + "parameters": [], + "responses": { + "200": { + "description": "Webhook configurations deleted successfully", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/WebhookDeleteResponse" + }, + "examples": { + "example_1": { + "description": "Successful deletion of multiple webhooks", + "value": { + "deleted_count": 2, + "failed_count": 0, + "deleted_webhooks": [ + { + "id": "b9e3d8f2-4c7a-4e1b-8d3c-5f9a2b7e4c6d", + "name": "Old Webhook 1", + "description": "First webhook to be deleted", + "org": { + "id": "0", + "name": "Primary" + }, + "url": "https://old-service.example.com/webhook1", + "events": [ + "LIVEBOARD_SCHEDULE" + ], + "authentication": { + "BEARER_TOKEN": "***" + }, + "creation_time_in_millis": 1724274600000, + "modification_time_in_millis": 1724274600000, + "created_by": { + "id": "1f4e7b2d-9c3a-4e6f-8b1d-3e7c5a9b2f4e", + "name": "jennifer_patel" + } + }, + { + "id": "e7c4a1f8-2b5d-4a9e-7c3f-8b1e5d4a7c9b", + "name": "Old Webhook 2", + "description": "Second webhook to be deleted", + "org": { + "id": "0", + "name": "Primary" + }, + "url": "https://old-service.example.com/webhook2", + "events": [ + "LIVEBOARD_SCHEDULE" + ], + "authentication": { + "API_KEY": { + "key": "X-API-Key", + "value": "***" + } + }, + "creation_time_in_millis": 1724275530123, + "modification_time_in_millis": 1724275530123, + "created_by": { + "id": "9a5c2e8f-4b7d-4c1e-9f2a-6c8e3b5d7a4c", + "name": "david_thompson" + } + } + ], + "failed_webhooks": [] + } + }, + "example_2": { + "description": "Partial failure during deletion", + "value": { + "deleted_count": 1, + "failed_count": 1, + "deleted_webhooks": [ + { + "id": "c8f2a5e9-3d6b-4f1e-a8c2-7e4b1d9f5a3c", + "name": "Successfully Deleted Webhook", + "description": "This webhook was deleted successfully", + "org": { + "id": "0", + "name": "Primary" + }, + "url": "https://service.example.com/webhook", + "events": [ + "LIVEBOARD_SCHEDULE" + ], + "authentication": { + "BEARER_TOKEN": "***" + }, + "creation_time_in_millis": 1724276415456, + "modification_time_in_millis": 1724276415456, + "created_by": { + "id": "6e9c4f2a-8b5d-4e1f-9c3a-5f8b2e7d4a6c", + "name": "emma_wang" + } + } + ], + "failed_webhooks": [ + { + "id": "a3f7c1e4-9b2d-4a6e-8f3c-1e5b7a9c4f2e", + "name": "Non-existent Webhook", + "error": "Webhook not found or access denied" + } + ] + } + } + } + } + } + }, + "400": { + "description": "Invalid request.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + }, + "examples": { + "invalid_request": { + "summary": "Invalid request", + "value": { + "error": { + "message": { + "code": 10002, + "incident_id_guid": "a1b2c3d4-e5f6-7890-abcd-ef1234567890", + "trace_id_guid": "a1b2c3d4-e5f6-7890-abcd-ef1234567890", + "debug": "webhook_identifiers must contain at least one identifier." + } + } + } + } + } + } + } + }, + "401": { + "description": "Unauthorized access.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + }, + "examples": { + "unauthorized_access": { + "summary": "Unauthorized access", + "value": { + "error": { + "message": { + "code": 10097, + "incident_id_guid": "b2c3d4e5-f678-9012-bcde-f23456789012", + "trace_id_guid": "b2c3d4e5-f678-9012-bcde-f23456789012", + "debug": "Authentication required to delete webhook configurations." + } + } + } + } + } + } + } + }, + "403": { + "description": "Forbidden access.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + }, + "examples": { + "forbidden_access": { + "summary": "Forbidden access", + "value": { + "error": { + "message": { + "code": 10023, + "incident_id_guid": "c3d4e5f6-7890-1234-cdef-345678901234", + "trace_id_guid": "c3d4e5f6-7890-1234-cdef-345678901234", + "debug": "Insufficient privileges to delete webhook configurations." + } + } + } + } + } + } + } + }, + "500": { + "description": "Unexpected error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + }, + "examples": { + "unexpected_error": { + "summary": "Unexpected error", + "value": { + "error": { + "message": { + "code": 10038, + "incident_id_guid": "d4e5f678-9012-3456-defa-456789012345", + "trace_id_guid": "d4e5f678-9012-3456-defa-456789012345", + "debug": "Unexpected server error while deleting webhook configurations." + } + } + } + } + } + } + } + } + } + } + }, + "/api/rest/2.0/webhooks/storage-config": { + "get": { + "operationId": "getWebhookStorageConfig", + "description": "\n Version: 26.7.0.cl or later\n\nReturns cluster-level storage setup information for configuring customer-managed storage. Use this endpoint to obtain the IAM identity details required before configuring a webhook storage destination. For S3 destinations, returns the platform AWS account ID and IAM trust policy template. For GCS destinations, returns the platform GCP service account email and the IAM role to grant for service account impersonation.\n\nRequires `ADMINISTRATION` (**Can administer ThoughtSpot**) or `DEVELOPER` (**Has developer privilege**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, users with `CAN_MANAGE_WEBHOOKS` (**Can manage webhooks**) privilege are also authorized to perform this action.\n\n\n\n\n#### Endpoint URL\n", + "tags": [ + "Webhooks", + "26.7.0.cl" + ], + "parameters": [], + "responses": { + "200": { + "description": "Storage setup information retrieved successfully", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/WebhookStorageConfigInfo" + } + }, + "examples": { + "example_1": { + "description": "AWS-hosted cluster — customer configuring S3 storage destination", + "value": [ + { + "storage_type": "OBJECT_STORAGE", + "provider": "AWS_S3", + "config": { + "config_type": "AWS_TO_S3_STORAGE", + "aws_account_id": "123456789012", + "trust_policy_template": { + "Version": "2012-10-17", + "Statement": [ + { + "Effect": "Allow", + "Principal": { + "AWS": "arn:aws:iam::123456789012:root" + }, + "Action": "sts:AssumeRole", + "Condition": { + "StringEquals": { + "sts:ExternalId": "ts-webhook-a1b2c3d4-7890" + } + } + } + ] + }, + "setup_instructions": [ + "1. Create an IAM role in your AWS account", + "2. Attach the trust policy template to the role", + "3. Attach S3 permissions (s3:PutObject, s3:PutObjectAcl) to the role", + "4. Use the role ARN in your webhook storage configuration" + ] + } + } + ] + }, + "example_2": { + "description": "GCP-hosted cluster — customer configuring S3 storage destination", + "value": [ + { + "storage_type": "OBJECT_STORAGE", + "provider": "AWS_S3", + "config": { + "config_type": "GCP_TO_S3_STORAGE", + "gcp_service_account_id": "115663769112811637952", + "oidc_provider": "accounts.google.com", + "trust_policy_template": { + "Version": "2012-10-17", + "Statement": [ + { + "Effect": "Allow", + "Principal": { + "Federated": "arn:aws:iam::YOUR_AWS_ACCOUNT_ID:oidc-provider/accounts.google.com" + }, + "Action": "sts:AssumeRoleWithWebIdentity", + "Condition": { + "StringEquals": { + "accounts.google.com:sub": "115663769112811637952" + } + } + } + ] + }, + "setup_instructions": [ + "1. Add accounts.google.com as an Identity Provider in AWS IAM", + "2. Create an IAM role with Web Identity Federation trust", + "3. Configure the trust policy with the GCP service account ID", + "4. Attach S3 permissions (s3:PutObject, s3:PutObjectAcl) to the role", + "5. Use the role ARN in your webhook storage configuration" + ] + } + } + ] + }, + "example_3": { + "description": "GCP-hosted cluster — customer configuring both S3 and GCS storage destinations", + "value": [ + { + "storage_type": "OBJECT_STORAGE", + "provider": "AWS_S3", + "config": { + "config_type": "GCP_TO_S3_STORAGE", + "gcp_service_account_id": "115663769112811637952", + "oidc_provider": "accounts.google.com", + "trust_policy_template": { + "Version": "2012-10-17", + "Statement": [ + { + "Effect": "Allow", + "Principal": { + "Federated": "arn:aws:iam::YOUR_AWS_ACCOUNT_ID:oidc-provider/accounts.google.com" + }, + "Action": "sts:AssumeRoleWithWebIdentity", + "Condition": { + "StringEquals": { + "accounts.google.com:sub": "115663769112811637952" + } + } + } + ] + }, + "setup_instructions": [ + "1. Add accounts.google.com as an Identity Provider in AWS IAM", + "2. Create an IAM role with Web Identity Federation trust", + "3. Configure the trust policy with the GCP service account ID", + "4. Attach S3 permissions (s3:PutObject, s3:PutObjectAcl) to the role", + "5. Use the role ARN in your webhook storage configuration" + ] + } + }, + { + "storage_type": "OBJECT_STORAGE", + "provider": "GCP_GCS", + "config": { + "config_type": "GCP_TO_GCS_STORAGE", + "service_account_email": "webhook-sa@example-project.iam.gserviceaccount.com", + "required_role": "roles/iam.serviceAccountTokenCreator", + "setup_instructions": [ + "1. In GCP Console, go to IAM & Admin > Service Accounts", + "2. Click on the service account that has write access to your GCS bucket", + "3. Open the 'Principals with access' tab and click 'Grant Access'", + "4. Enter the service account email as the principal", + "5. Assign the roles/iam.serviceAccountTokenCreator role and save", + "6. Use your service account email in the webhook storage configuration" + ] + } + } + ] + } + } + } + } + }, + "400": { + "description": "Invalid request.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "401": { + "description": "Unauthorized access.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + }, + "examples": { + "unauthorized_access": { + "summary": "Unauthorized access", + "value": { + "error": { + "message": { + "code": 10097, + "incident_id_guid": "b2c3d4e5-f678-9012-bcde-f23456789012", + "trace_id_guid": "b2c3d4e5-f678-9012-bcde-f23456789012", + "debug": "Authentication required to retrieve webhook storage configuration." + } + } + } + } + } + } + } + }, + "403": { + "description": "Forbidden access.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + }, + "examples": { + "forbidden_access": { + "summary": "Forbidden access", + "value": { + "error": { + "message": { + "code": 10023, + "incident_id_guid": "c3d4e5f6-7890-1234-cdef-345678901234", + "trace_id_guid": "c3d4e5f6-7890-1234-cdef-345678901234", + "debug": "Insufficient privileges to retrieve webhook storage configuration." + } + } + } + } + } + } + } + }, + "500": { + "description": "Unexpected error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + }, + "examples": { + "unexpected_error": { + "summary": "Unexpected error", + "value": { + "error": { + "message": { + "code": 10038, + "incident_id_guid": "d4e5f678-9012-3456-defa-456789012345", + "trace_id_guid": "d4e5f678-9012-3456-defa-456789012345", + "debug": "Unexpected server error while retrieving webhook storage configuration." + } + } + } + } + } + } + } + } + } + } + }, + "/api/rest/2.0/webhooks/search": { + "post": { + "operationId": "searchWebhookConfigurations", + "description": "\n Version: 10.14.0.cl or later\n\nSearches for webhook configurations based on various criteria such as Org, webhook identifier, event type, with support for pagination and sorting. Returns matching webhook configurations with their complete details.\n\nRequires `ADMINISTRATION` (**Can administer ThoughtSpot**) or `DEVELOPER` (**Has developer privilege**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, users with `CAN_MANAGE_WEBHOOKS` (**Can manage webhooks**) privilege are also authorized to perform this action.\n\n\n\n\n#### Endpoint URL\n", + "tags": [ + "Webhooks", + "10.14.0.cl" + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SearchWebhookConfigurationsRequest" + } + } + }, + "required": true + }, + "parameters": [], + "responses": { + "200": { + "description": "Webhook configurations retrieved successfully", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/WebhookSearchResponse" + }, + "examples": { + "example_1": { + "description": "Search results with multiple webhooks", + "value": { + "webhooks": [ + { + "id": "f47ac10b-58cc-4372-a567-0e02b2c3d479", + "name": "Liveboard Schedule Webhook", + "description": "Webhook for liveboard schedule notifications", + "org": { + "id": "0", + "name": "Primary" + }, + "url": "https://myapp.example.com/webhooks", + "url_params": { + "api_key": "abc123" + }, + "events": [ + "LIVEBOARD_SCHEDULE" + ], + "authentication": { + "BEARER_TOKEN": "***" + }, + "signature_verification": { + "type": "HMAC_SHA256", + "header": "X-Webhook-Signature", + "algorithm": "SHA256", + "secret": "***" + }, + "creation_time_in_millis": 1724277430243, + "modification_time_in_millis": 1724278215123, + "additional_headers": [ + { + "key": "Custom-Header", + "value": "value1" + }, + { + "key": "Custom-Header-2", + "value": "value2" + } + ], + "created_by": { + "id": "8e3f2a7b-9c4d-4e5f-8a1b-7c9d3e6f4a2b", + "name": "sarah_chen" + }, + "last_modified_by": { + "id": "2c9a7e4f-6b3d-4a8e-9f1c-5e7a3b9c2d6f", + "name": "alex_kim" + } + }, + { + "id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890", + "name": "API Key Webhook", + "description": "Webhook with API key authentication", + "org": { + "id": "0", + "name": "Primary" + }, + "url": "https://api.example.com/notifications", + "events": [ + "LIVEBOARD_SCHEDULE" + ], + "authentication": { + "API_KEY": { + "key": "X-API-Key", + "value": "***" + } + }, + "creation_time_in_millis": 1724275845987, + "modification_time_in_millis": 1724275845987, + "created_by": { + "id": "7d5e9f2a-4b8c-4d6e-9a3b-5c7e1f4a8b2d", + "name": "mike_rodriguez" + } + } + ], + "pagination": { + "record_offset": 0, + "record_size": 50, + "total_count": 2, + "has_more": false + } + } + }, + "example_2": { + "description": "Empty search results", + "value": { + "webhooks": [], + "pagination": { + "record_offset": 0, + "record_size": 50, + "total_count": 0, + "has_more": false + } + } + } + } + } + } + }, + "400": { + "description": "Invalid request.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + }, + "examples": { + "invalid_request": { + "summary": "Invalid request", + "value": { + "error": { + "message": { + "code": 10002, + "incident_id_guid": "a1b2c3d4-e5f6-7890-abcd-ef1234567890", + "trace_id_guid": "a1b2c3d4-e5f6-7890-abcd-ef1234567890", + "debug": "record_size must be a positive integer." + } + } + } + } + } + } + } + }, + "401": { + "description": "Unauthorized access.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + }, + "examples": { + "unauthorized_access": { + "summary": "Unauthorized access", + "value": { + "error": { + "message": { + "code": 10097, + "incident_id_guid": "b2c3d4e5-f678-9012-bcde-f23456789012", + "trace_id_guid": "b2c3d4e5-f678-9012-bcde-f23456789012", + "debug": "Authentication required to search webhook configurations." + } + } + } + } + } + } + } + }, + "403": { + "description": "Forbidden access.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + }, + "examples": { + "forbidden_access": { + "summary": "Forbidden access", + "value": { + "error": { + "message": { + "code": 10023, + "incident_id_guid": "c3d4e5f6-7890-1234-cdef-345678901234", + "trace_id_guid": "c3d4e5f6-7890-1234-cdef-345678901234", + "debug": "Insufficient privileges to search webhook configurations." + } + } + } + } + } + } + } + }, + "500": { + "description": "Unexpected error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + }, + "examples": { + "unexpected_error": { + "summary": "Unexpected error", + "value": { + "error": { + "message": { + "code": 10038, + "incident_id_guid": "d4e5f678-9012-3456-defa-456789012345", + "trace_id_guid": "d4e5f678-9012-3456-defa-456789012345", + "debug": "Unexpected server error while searching webhook configurations." + } + } + } + } + } + } + } + } + } + } + }, + "/api/rest/2.0/webhooks/{webhook_identifier}/update": { + "post": { + "operationId": "updateWebhookConfiguration", + "description": "\n Version: 10.14.0.cl or later\n\nUpdates an existing webhook configuration by its unique id or name. Only the provided fields will be updated.\n\nRequires `ADMINISTRATION` (**Can administer ThoughtSpot**) or `DEVELOPER` (**Has developer privilege**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, users with `CAN_MANAGE_WEBHOOKS` (**Can manage webhooks**) privilege are also authorized to perform this action.\n\n\n\n\n#### Endpoint URL\n", + "tags": [ + "Webhooks", + "10.14.0.cl" + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UpdateWebhookConfigurationRequest" + } + } + }, + "required": true + }, + "parameters": [ + { + "in": "path", + "name": "webhook_identifier", + "required": true, + "schema": { + "type": "string" + }, + "description": "Unique ID or name of the webhook configuration." + } + ], + "responses": { + "204": { + "description": "Webhook configuration updated successfully" + }, + "400": { + "description": "Invalid request.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + }, + "examples": { + "invalid_request": { + "summary": "Invalid request", + "value": { + "error": { + "message": { + "code": 10002, + "incident_id_guid": "a1b2c3d4-e5f6-7890-abcd-ef1234567890", + "trace_id_guid": "a1b2c3d4-e5f6-7890-abcd-ef1234567890", + "debug": "Webhook with the specified identifier was not found." + } + } + } + } + } + } + } + }, + "401": { + "description": "Unauthorized access.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + }, + "examples": { + "unauthorized_access": { + "summary": "Unauthorized access", + "value": { + "error": { + "message": { + "code": 10097, + "incident_id_guid": "b2c3d4e5-f678-9012-bcde-f23456789012", + "trace_id_guid": "b2c3d4e5-f678-9012-bcde-f23456789012", + "debug": "Authentication required to update a webhook configuration." + } + } + } + } + } + } + } + }, + "403": { + "description": "Forbidden access.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + }, + "examples": { + "forbidden_access": { + "summary": "Forbidden access", + "value": { + "error": { + "message": { + "code": 10023, + "incident_id_guid": "c3d4e5f6-7890-1234-cdef-345678901234", + "trace_id_guid": "c3d4e5f6-7890-1234-cdef-345678901234", + "debug": "Insufficient privileges to update webhook configurations." + } + } + } + } + } + } + } + }, + "500": { + "description": "Unexpected error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + }, + "examples": { + "unexpected_error": { + "summary": "Unexpected error", + "value": { + "error": { + "message": { + "code": 10038, + "incident_id_guid": "d4e5f678-9012-3456-defa-456789012345", + "trace_id_guid": "d4e5f678-9012-3456-defa-456789012345", + "debug": "Unexpected server error while updating the webhook configuration." + } + } + } + } + } + } + } + } + } + } + } + }, + "components": { + "schemas": { + "ErrorResponse": { + "type": "object", + "properties": { + "error": { + "type": "object", + "nullable": true + } + } + }, + "GetTokenResponse": { + "type": "object", + "required": [ + "token", + "creation_time_in_millis", + "expiration_time_in_millis", + "valid_for_user_id", + "valid_for_username" + ], + "properties": { + "token": { + "type": "string", + "description": "Bearer auth token." + }, + "creation_time_in_millis": { + "type": "number", + "format": "float", + "description": "Token creation time in milliseconds." + }, + "expiration_time_in_millis": { + "type": "number", + "format": "float", + "description": "Token expiration time in milliseconds." + }, + "valid_for_user_id": { + "type": "string", + "description": "Username to whom the token is issued." + }, + "valid_for_username": { + "type": "string", + "description": "Unique identifier of the user to whom the token is issued." + } + } + }, + "SearchAuthSettingsResponse": { + "type": "object", + "properties": { + "auth_type": { + "type": "string", + "enum": [ + "TRUSTED_AUTH" + ], + "description": "Type of authentication mechanism returned.", + "nullable": true + }, + "cluster_preferences": { + "$ref": "#/components/schemas/AuthClusterPreferences", + "description": "Cluster-level authentication configuration. Present when cluster scope was requested and the caller has ADMINISTRATION or CONTROL_TRUSTED_AUTH privilege.", + "nullable": true + }, + "org_preferences": { + "type": "array", + "items": { + "$ref": "#/components/schemas/AuthOrgPreference" + }, + "description": "Org-level authentication configurations. Present when org scope was requested and per-org auth feature is enabled.", + "nullable": true + } + }, + "description": "Response for searchAuthSettings. Contains auth type and cluster/org-level preferences." + }, + "AuthClusterPreferences": { + "type": "object", + "properties": { + "auth_status": { + "type": "string", + "enum": [ + "ENABLED", + "DISABLED" + ], + "description": "Whether authentication is enabled or disabled at the cluster level.", + "nullable": true + }, + "access_tokens": { + "type": "array", + "items": { + "$ref": "#/components/schemas/AuthSettingsAccessToken" + }, + "description": "Cluster-level access tokens. Absent when no token is configured.", + "nullable": true + } + }, + "description": "Cluster-level authentication preferences." + }, + "AuthSettingsAccessToken": { + "type": "object", + "required": [ + "key" + ], + "properties": { + "key": { + "type": "string", + "description": "The plaintext token key value." + } + }, + "description": "An auth settings access token." + }, + "AuthOrgPreference": { + "type": "object", + "properties": { + "org": { + "$ref": "#/components/schemas/AuthOrgInfo", + "description": "Org identifier details.", + "nullable": true + }, + "auth_status": { + "type": "string", + "enum": [ + "ENABLED", + "DISABLED" + ], + "description": "Whether authentication is enabled or disabled for this org.", + "nullable": true + }, + "access_tokens": { + "type": "array", + "items": { + "$ref": "#/components/schemas/AuthSettingsAccessToken" + }, + "description": "Org-level access tokens. Absent when no token is configured or the feature flag is off.", + "nullable": true + } + }, + "description": "Org-level authentication preferences for a single org." + }, + "AuthOrgInfo": { + "type": "object", + "required": [ + "id" + ], + "properties": { + "id": { + "type": "integer", + "format": "int32", + "description": "Unique identifier of the org." + }, + "name": { + "type": "string", + "description": "Name of the org.", + "nullable": true + } + }, + "description": "Org identifier returned in auth settings search results." + }, + "RiseSetter": { + "type": "object", + "required": [ + "field", + "path" + ], + "properties": { + "field": { + "type": "string" + }, + "path": { + "type": "string" + } + } + }, + "User": { + "type": "object", + "required": [ + "id", + "name", + "display_name", + "visibility" + ], + "properties": { + "id": { + "type": "string", + "description": "Unique identifier of the user." + }, + "name": { + "type": "string", + "description": "Name of the user." + }, + "display_name": { + "type": "string", + "description": "Display name of the user." + }, + "visibility": { + "type": "string", + "enum": [ + "SHARABLE", + "NON_SHARABLE" + ], + "description": "Visibility of the users. The `SHARABLE` property makes a user visible to other users and group, who can share objects with the user." + }, + "author_id": { + "type": "string", + "description": "Unique identifier of author of the user.", + "nullable": true + }, + "can_change_password": { + "type": "boolean", + "description": "Defines whether the user can change their password.", + "nullable": true + }, + "complete_detail": { + "type": "boolean", + "description": "Defines whether the response has complete detail of the user.", + "nullable": true + }, + "creation_time_in_millis": { + "type": "number", + "format": "float", + "description": "Creation time of the user in milliseconds.", + "nullable": true + }, + "current_org": { + "$ref": "#/components/schemas/Org", + "description": "Current logged-in Org of the user.", + "nullable": true + }, + "deleted": { + "type": "boolean", + "description": "Indicates whether the user is deleted.", + "nullable": true + }, + "deprecated": { + "type": "boolean", + "description": "Indicates whether the user is deprecated.", + "nullable": true + }, + "account_type": { + "type": "string", + "enum": [ + "LOCAL_USER", + "LDAP_USER", + "SAML_USER", + "OIDC_USER", + "REMOTE_USER" + ], + "description": "Type of the user account.", + "nullable": true + }, + "account_status": { + "type": "string", + "enum": [ + "ACTIVE", + "INACTIVE", + "EXPIRED", + "LOCKED", + "PENDING", + "SUSPENDED" + ], + "description": "Status of the user account.", + "nullable": true + }, + "email": { + "type": "string", + "description": "Email of the user.", + "nullable": true + }, + "expiration_time_in_millis": { + "type": "number", + "format": "float", + "description": "Expiration time of the user in milliseconds.", + "nullable": true + }, + "external": { + "type": "boolean", + "description": "Indicates whether the user is external.", + "nullable": true + }, + "favorite_metadata": { + "type": "array", + "items": { + "$ref": "#/components/schemas/FavoriteMetadataItem" + }, + "description": "Metadata objects to add to the users' favorites list.", + "nullable": true + }, + "first_login_time_in_millis": { + "type": "number", + "format": "float", + "description": "Timestamp of the first login session of the user in milliseconds.", + "nullable": true + }, + "group_mask": { + "type": "integer", + "format": "int32", + "description": "Group mask of the user.", + "nullable": true + }, + "hidden": { + "type": "boolean", + "description": "Indicates whether the user is hidden.", + "nullable": true + }, + "home_liveboard": { + "$ref": "#/components/schemas/Object_ID_And_Name", + "description": "Unique ID or name of the default Liveboard assigned to the user.", + "nullable": true + }, + "incomplete_details": { + "type": "object", + "description": "Incomplete details of user if any present.", + "nullable": true + }, + "is_first_login": { + "type": "boolean", + "description": "Indicates whether it is first login of the user.", + "nullable": true + }, + "modification_time_in_millis": { + "type": "number", + "format": "float", + "description": "Last modified time of the user in milliseconds.", + "nullable": true + }, + "modifier_id": { + "type": "string", + "description": "Unique identifier of modifier of the user.", + "nullable": true + }, + "notify_on_share": { + "type": "boolean", + "description": "User preference for receiving email notifications on shared Answers or Liveboard.", + "nullable": true + }, + "onboarding_experience_completed": { + "type": "boolean", + "description": "The user preference for turning off the onboarding experience.", + "nullable": true + }, + "orgs": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Org" + }, + "description": "Orgs to which the user belongs.", + "nullable": true + }, + "owner_id": { + "type": "string", + "description": "Unique identifier of owner of the user.", + "nullable": true + }, + "parent_type": { + "type": "string", + "enum": [ + "USER", + "GROUP" + ], + "description": "Parent type of the user.", + "nullable": true + }, + "privileges": { + "type": "array", + "items": { + "type": "string" + }, + "description": "Privileges which are assigned to the user.", + "nullable": true + }, + "show_onboarding_experience": { + "type": "boolean", + "description": "User's preference to revisit the new user onboarding experience.", + "nullable": true + }, + "super_user": { + "type": "boolean", + "description": "Indicates whether the user is a super user.", + "nullable": true + }, + "system_user": { + "type": "boolean", + "description": "Indicates whether the user is a system user.", + "nullable": true + }, + "tags": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Object_ID_And_Name" + }, + "description": "Tags associated with the user.", + "nullable": true + }, + "tenant_id": { + "type": "string", + "description": "Unique identifier of tenant of the user.", + "nullable": true + }, + "user_groups": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Object_ID_And_Name" + }, + "description": "Groups to which the user is assigned.", + "nullable": true + }, + "user_inherited_groups": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Object_ID_And_Name" + }, + "description": "Inherited User Groups which the user is part of.", + "nullable": true + }, + "welcome_email_sent": { + "type": "boolean", + "description": "Indicates whether welcome email is sent for the user.", + "nullable": true + }, + "org_privileges": { + "type": "object", + "description": "Privileges which are assigned to the user with org.", + "nullable": true + }, + "preferred_locale": { + "type": "string", + "description": "Locale for the user.", + "nullable": true + }, + "use_browser_language": { + "type": "boolean", + "description": "Flag to indicate whether to use the browser locale for the user in the UI.\nWhen set to true, the preferred_locale value is unset and the browser's\nlanguage setting takes precedence.
Version: 26.3.0.cl or later", + "nullable": true + }, + "extended_properties": { + "type": "object", + "description": "Properties for the user", + "nullable": true + }, + "extended_preferences": { + "type": "object", + "description": "Preferences for the user", + "nullable": true + }, + "user_parameters": { + "type": "object", + "description": "User Parameters which are specified for the user via JWToken", + "nullable": true + }, + "access_control_properties": { + "type": "object", + "description": "Access Control Properties which are specified for the user via JWToken", + "nullable": true + }, + "variable_values": { + "type": "object", + "description": "Formula Variables which are specified for the user via JWToken", + "nullable": true + } + } + }, + "Org": { + "type": "object", + "required": [ + "id", + "name" + ], + "properties": { + "id": { + "type": "integer", + "format": "int32", + "description": "The ID of the object." + }, + "name": { + "type": "string", + "description": "Name of the object." + } + }, + "description": "The current Org context of the user." + }, + "FavoriteMetadataItem": { + "type": "object", + "required": [ + "id", + "name", + "type" + ], + "properties": { + "id": { + "type": "string", + "description": "Unique ID of the metadata object." + }, + "name": { + "type": "string", + "description": "name of the metadata object." + }, + "type": { + "type": "string", + "enum": [ + "LIVEBOARD", + "ANSWER", + "LOGICAL_TABLE", + "LOGICAL_COLUMN", + "CONNECTION", + "TAG", + "USER", + "USER_GROUP", + "LOGICAL_RELATIONSHIP" + ], + "description": " Type of metadata object.\n \n\nRequired if the name of the object is set as the identifier. This attribute is optional when the object GUID is specified as the identifier." + } + } + }, + "Object_ID_And_Name": { + "type": "object", + "properties": { + "id": { + "type": "string", + "description": "The unique identifier of the object.", + "nullable": true + }, + "name": { + "type": "string", + "description": "Name of the object.", + "nullable": true + } + }, + "description": "The object representation with ID and Name." + }, + "FavoriteMetadataInput": { + "type": "object", + "properties": { + "identifier": { + "type": "string", + "description": "Unique ID or name of the metadata object.", + "nullable": true + }, + "type": { + "type": "string", + "enum": [ + "LIVEBOARD", + "ANSWER" + ], + "description": " Type of metadata object.\n \n\nRequired if the name of the object is set as the identifier. This attribute is optional when the object GUID is specified as the identifier.", + "nullable": true + } + } + }, + "SortOptions": { + "type": "object", + "properties": { + "field_name": { + "type": "string", + "enum": [ + "NAME", + "DISPLAY_NAME", + "AUTHOR", + "CREATED", + "MODIFIED" + ], + "description": "Name of the field to apply the sort on.", + "nullable": true + }, + "order": { + "type": "string", + "enum": [ + "ASC", + "DESC" + ], + "description": "Sort order : ASC(Ascending) or DESC(Descending).", + "nullable": true + } + }, + "description": "Sort options." + }, + "SystemInfo": { + "type": "object", + "properties": { + "id": { + "type": "string", + "description": "The unique identifier of the object", + "nullable": true + }, + "name": { + "type": "string", + "description": "Name of the cluster.", + "nullable": true + }, + "release_version": { + "type": "string", + "description": "The release version of the cluster.", + "nullable": true + }, + "time_zone": { + "type": "string", + "description": "The timezone of the cluster.", + "nullable": true + }, + "locale": { + "type": "string", + "description": "The default locale of the cluster.", + "nullable": true + }, + "date_format": { + "type": "string", + "description": "The default date format representation of the cluster.", + "nullable": true + }, + "api_version": { + "type": "string", + "description": "The API version of the cluster.", + "nullable": true + }, + "type": { + "type": "string", + "description": "The deployment type of the cluster.", + "nullable": true + }, + "environment": { + "type": "string", + "description": "The deployed environment of the cluster.", + "nullable": true + }, + "license": { + "type": "string", + "description": "The license applied to the cluster.", + "nullable": true + }, + "date_time_format": { + "type": "string", + "description": "The default date time format representation of the cluster.", + "nullable": true + }, + "time_format": { + "type": "string", + "description": "The default time format representation of the cluster.", + "nullable": true + }, + "system_user_id": { + "type": "string", + "description": "The unique identifier of system user.", + "nullable": true + }, + "super_user_id": { + "type": "string", + "description": "The unique identifier of super user.", + "nullable": true + }, + "hidden_object_id": { + "type": "string", + "description": "The unique identifier of hidden object.", + "nullable": true + }, + "system_group_id": { + "type": "string", + "description": "The unique identifier of system group.", + "nullable": true + }, + "tsadmin_user_id": { + "type": "string", + "description": "The unique identifier of tsadmin user.", + "nullable": true + }, + "admin_group_id": { + "type": "string", + "description": "The unique identifier of admin group.", + "nullable": true + }, + "all_tables_connection_id": { + "type": "string", + "description": "The unique identifier of all tables connection.", + "nullable": true + }, + "all_user_group_id": { + "type": "string", + "description": "The unique identifier of ALL group.", + "nullable": true + }, + "accept_language": { + "type": "string", + "description": "The supported accept language by the cluster.", + "nullable": true + }, + "all_user_group_member_user_count": { + "type": "integer", + "format": "int32", + "description": "The count of users of ALL group.", + "nullable": true + }, + "logical_model_version": { + "type": "integer", + "format": "int32", + "description": "The version number of logical model of the cluster.", + "nullable": true + } + } + }, + "SystemConfig": { + "type": "object", + "properties": { + "onboarding_content_url": { + "type": "string", + "nullable": true + }, + "saml_enabled": { + "type": "boolean", + "nullable": true + }, + "okta_enabled": { + "type": "boolean", + "nullable": true + } + } + }, + "SystemOverrideInfo": { + "type": "object", + "properties": { + "config_override_info": { + "type": "object", + "nullable": true + } + } + }, + "OrgPreferenceSearchCriteriaInput": { + "type": "object", + "required": [ + "org_identifier" + ], + "properties": { + "org_identifier": { + "type": "string", + "description": "Unique identifier or name of the org" + }, + "event_types": { + "type": "array", + "items": { + "type": "string", + "enum": [ + "LIVEBOARD_SCHEDULE" + ] + }, + "description": "Event types to search for. If not provided, all event types for this org are returned.", + "nullable": true + } + } + }, + "CommunicationChannelPreferencesResponse": { + "type": "object", + "properties": { + "cluster_preferences": { + "type": "array", + "items": { + "$ref": "#/components/schemas/EventChannelConfig" + }, + "description": "Cluster-level default configurations.", + "nullable": true + }, + "org_preferences": { + "type": "array", + "items": { + "$ref": "#/components/schemas/OrgChannelConfigResponse" + }, + "description": "Org-specific configurations.", + "nullable": true + } + } + }, + "EventChannelConfig": { + "type": "object", + "required": [ + "event_type", + "channels" + ], + "properties": { + "event_type": { + "type": "string", + "enum": [ + "LIVEBOARD_SCHEDULE" + ], + "description": "Type of event for which communication channels are configured" + }, + "channels": { + "type": "array", + "items": { + "type": "string", + "enum": [ + "EMAIL", + "WEBHOOK" + ] + }, + "description": "Communication channels enabled for this event type. Empty array indicates no channels are enabled." + } + } + }, + "OrgChannelConfigResponse": { + "type": "object", + "required": [ + "org", + "preferences" + ], + "properties": { + "org": { + "$ref": "#/components/schemas/OrgDetails", + "description": "Org details" + }, + "preferences": { + "type": "array", + "items": { + "$ref": "#/components/schemas/EventChannelConfig" + }, + "description": "Event-specific communication channel configurations for this org" + } + } + }, + "OrgDetails": { + "type": "object", + "required": [ + "id", + "name" + ], + "properties": { + "id": { + "type": "string", + "description": "Unique id of the org" + }, + "name": { + "type": "string", + "description": "Name of the org" + } + } + }, + "SecuritySettingsResponse": { + "type": "object", + "properties": { + "cluster_preferences": { + "$ref": "#/components/schemas/SecuritySettingsClusterPreferences", + "description": "Cluster-level security preferences.", + "nullable": true + }, + "org_preferences": { + "type": "array", + "items": { + "$ref": "#/components/schemas/SecuritySettingsOrgPreferences" + }, + "description": "Org-level security preferences.", + "nullable": true + } + }, + "description": "Response type for security settings search." + }, + "SecuritySettingsClusterPreferences": { + "type": "object", + "properties": { + "enable_partitioned_cookies": { + "type": "boolean", + "description": "Support embedded access when third-party cookies are blocked.", + "nullable": true + }, + "cors_whitelisted_urls": { + "type": "array", + "items": { + "type": "string" + }, + "description": "Allowed origins for CORS.", + "nullable": true + }, + "csp_settings": { + "$ref": "#/components/schemas/CspSettings", + "description": "CSP (Content Security Policy) settings.", + "nullable": true + }, + "saml_redirect_urls": { + "type": "array", + "items": { + "type": "string" + }, + "description": "Allowed redirect hosts for SAML login.", + "nullable": true + }, + "non_embed_access": { + "$ref": "#/components/schemas/ClusterNonEmbedAccess", + "description": "Non-embed access configuration at cluster level.", + "nullable": true + }, + "trusted_auth_status": { + "type": "string", + "enum": [ + "ENABLED", + "DISABLED" + ], + "description": "Trusted authentication status at the cluster level.
Version: 26.6.0.cl or later", + "nullable": true + } + }, + "description": "Cluster-level security preferences." + }, + "CspSettings": { + "type": "object", + "properties": { + "connect_src_urls": { + "type": "array", + "items": { + "type": "string" + }, + "description": "Allowed URLs for connect-src directive.", + "nullable": true + }, + "font_src_urls": { + "type": "array", + "items": { + "type": "string" + }, + "description": "Allowed URLs for font-src directive.", + "nullable": true + }, + "visual_embed_hosts": { + "type": "array", + "items": { + "type": "string" + }, + "description": "Allowed hosts for visual embed (frame-ancestors directive).", + "nullable": true + }, + "iframe_src_urls": { + "type": "array", + "items": { + "type": "string" + }, + "description": "Allowed URLs for frame-src directive.", + "nullable": true + }, + "img_src_urls": { + "type": "array", + "items": { + "type": "string" + }, + "description": "Allowed URLs for img-src directive.", + "nullable": true + }, + "script_src_urls": { + "$ref": "#/components/schemas/ScriptSrcUrls", + "description": "Script-src settings including URLs and enabled flag.", + "nullable": true + }, + "style_src_urls": { + "type": "array", + "items": { + "type": "string" + }, + "description": "Allowed URLs for style-src directive.", + "nullable": true + } + }, + "description": "CSP (Content Security Policy) settings." + }, + "ScriptSrcUrls": { + "type": "object", + "properties": { + "enabled": { + "type": "boolean", + "description": "Whether script-src customization is enabled.", + "nullable": true + }, + "urls": { + "type": "array", + "items": { + "type": "string" + }, + "description": "Allowed URLs for script-src directive. Can only be set if enabled is true.", + "nullable": true + } + }, + "description": "Script-src CSP settings." + }, + "ClusterNonEmbedAccess": { + "type": "object", + "properties": { + "block_full_app_access": { + "type": "boolean", + "description": "Block full application access for non-embedded usage.", + "nullable": true + }, + "groups_with_access": { + "type": "array", + "items": { + "$ref": "#/components/schemas/GroupInfo" + }, + "description": "Groups that have non-embed full app access.\nOnly applicable when orgs feature is disabled. Use org_preferences when org feature is enabled.", + "nullable": true + } + }, + "description": "Cluster-level non-embed access configuration." + }, + "GroupInfo": { + "type": "object", + "properties": { + "id": { + "type": "string", + "description": "Unique identifier of the group.", + "nullable": true + }, + "name": { + "type": "string", + "description": "Name of the group.", + "nullable": true + } + }, + "description": "Group information for non-embed access." + }, + "SecuritySettingsOrgPreferences": { + "type": "object", + "properties": { + "org": { + "$ref": "#/components/schemas/SecuritySettingsOrgDetails", + "description": "Org details (id and name).", + "nullable": true + }, + "cors_whitelisted_urls": { + "type": "array", + "items": { + "type": "string" + }, + "description": "Allowed origins for CORS for this org.", + "nullable": true + }, + "non_embed_access": { + "$ref": "#/components/schemas/OrgNonEmbedAccess", + "description": "Non-embed access configuration for this org.", + "nullable": true + }, + "trusted_auth_status": { + "type": "string", + "enum": [ + "ENABLED", + "DISABLED" + ], + "description": "Trusted authentication status for this org.
Version: 26.6.0.cl or later", + "nullable": true + } + }, + "description": "Org-level security preferences." + }, + "SecuritySettingsOrgDetails": { + "type": "object", + "properties": { + "id": { + "type": "integer", + "format": "int32", + "description": "Unique identifier of the org.", + "nullable": true + }, + "name": { + "type": "string", + "description": "Name of the org.", + "nullable": true + } + }, + "description": "Org details for security settings." + }, + "OrgNonEmbedAccess": { + "type": "object", + "properties": { + "block_full_app_access": { + "type": "boolean", + "description": "Block full application access for non-embedded usage.", + "nullable": true + }, + "groups_with_access": { + "type": "array", + "items": { + "$ref": "#/components/schemas/GroupInfo" + }, + "description": "Groups that have non-embed full app access.", + "nullable": true + } + }, + "description": "Org-level non-embed access configuration." + }, + "OrgResponse": { + "type": "object", + "properties": { + "id": { + "type": "integer", + "format": "int32", + "description": "Unique identifier of the Org.", + "nullable": true + }, + "name": { + "type": "string", + "description": "Name of the Org.", + "nullable": true + }, + "status": { + "type": "string", + "enum": [ + "ACTIVE", + "IN_ACTIVE" + ], + "description": "Status of the Org.", + "nullable": true + }, + "description": { + "type": "string", + "description": "Description of the Org.", + "nullable": true + }, + "visibility": { + "type": "string", + "enum": [ + "SHOW", + "HIDDEN" + ], + "description": "Visibility of the Org.", + "nullable": true + } + } + }, + "Tag": { + "type": "object", + "required": [ + "name", + "id" + ], + "properties": { + "name": { + "type": "string" + }, + "id": { + "type": "string" + }, + "color": { + "type": "string", + "nullable": true + }, + "deleted": { + "type": "boolean", + "nullable": true + }, + "hidden": { + "type": "boolean", + "nullable": true + }, + "external": { + "type": "boolean", + "nullable": true + }, + "deprecated": { + "type": "boolean", + "nullable": true + }, + "creation_time_in_millis": { + "type": "number", + "format": "float", + "nullable": true + }, + "modification_time_in_millis": { + "type": "number", + "format": "float", + "nullable": true + }, + "author_id": { + "type": "string", + "nullable": true + }, + "modifier_id": { + "type": "string", + "nullable": true + }, + "owner_id": { + "type": "string", + "nullable": true + } + } + }, + "UserGroupResponse": { + "type": "object", + "required": [ + "display_name", + "id", + "name", + "visibility" + ], + "properties": { + "author_id": { + "type": "string", + "description": "The unique identifier of the object", + "nullable": true + }, + "complete_detail": { + "type": "boolean", + "description": "Indicates whether the response has complete detail of the group.", + "nullable": true + }, + "content": { + "type": "object", + "description": "Content details of the group", + "nullable": true + }, + "creation_time_in_millis": { + "type": "number", + "format": "float", + "description": "Creation time of the group in milliseconds", + "nullable": true + }, + "default_liveboards": { + "type": "array", + "items": { + "$ref": "#/components/schemas/UserGroup" + }, + "description": "Liveboards that are assigned as default Liveboards to the group.", + "nullable": true + }, + "deleted": { + "type": "boolean", + "description": "Indicates whether the group is deleted", + "nullable": true + }, + "deprecated": { + "type": "boolean", + "description": "Indicates whether the group is deprecated", + "nullable": true + }, + "description": { + "type": "string", + "description": "Description of the group", + "nullable": true + }, + "display_name": { + "type": "string", + "description": "Display name of the group." + }, + "external": { + "type": "boolean", + "description": "Indicates whether the group is external", + "nullable": true + }, + "generation_number": { + "type": "integer", + "format": "int32", + "description": "Generation number of the group", + "nullable": true + }, + "hidden": { + "type": "boolean", + "description": "Indicates whether the group is hidden", + "nullable": true + }, + "id": { + "type": "string", + "description": "The unique identifier of the object" + }, + "index": { + "type": "integer", + "format": "int32", + "description": "Index number of the group", + "nullable": true + }, + "index_version": { + "type": "integer", + "format": "int32", + "description": "Index version number of the group", + "nullable": true + }, + "metadata_version": { + "type": "integer", + "format": "int32", + "description": "Metadata version number of the group", + "nullable": true + }, + "modification_time_in_millis": { + "type": "number", + "format": "float", + "description": "Last modified time of the group in milliseconds.", + "nullable": true + }, + "modifier_id": { + "type": "string", + "description": "The unique identifier of the object", + "nullable": true + }, + "name": { + "type": "string", + "description": "Name of the group." + }, + "orgs": { + "type": "array", + "items": { + "$ref": "#/components/schemas/UserGroup" + }, + "description": "Orgs in which group exists.", + "nullable": true + }, + "owner_id": { + "type": "string", + "description": "The unique identifier of the object", + "nullable": true + }, + "parent_type": { + "type": "string", + "enum": [ + "USER", + "GROUP" + ], + "description": "Parent type of the group.", + "nullable": true + }, + "privileges": { + "type": "array", + "items": { + "type": "string" + }, + "description": "Privileges which are assigned to the group", + "nullable": true + }, + "sub_groups": { + "type": "array", + "items": { + "$ref": "#/components/schemas/UserGroup" + }, + "description": "Groups who are part of the group", + "nullable": true + }, + "system_group": { + "type": "boolean", + "description": "Indicates whether the group is a system group.", + "nullable": true + }, + "tags": { + "type": "array", + "items": { + "$ref": "#/components/schemas/UserGroup" + }, + "description": "Tags associated with the group.", + "nullable": true + }, + "type": { + "type": "string", + "enum": [ + "LOCAL_GROUP", + "LDAP_GROUP", + "TEAM_GROUP", + "TENANT_GROUP" + ], + "description": "Type of the group.", + "nullable": true + }, + "users": { + "type": "array", + "items": { + "$ref": "#/components/schemas/UserGroup" + }, + "description": "Users who are part of the group.", + "nullable": true + }, + "visibility": { + "type": "string", + "enum": [ + "SHARABLE", + "NON_SHARABLE" + ], + "description": "Visibility of the group. The SHARABLE makes a group visible to other users and groups, and thus allows them to share objects." + }, + "roles": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Role" + }, + "description": "List of roles assgined to the user", + "nullable": true + } + } + }, + "Role": { + "type": "object", + "properties": { + "id": { + "type": "string", + "description": "id of the role", + "nullable": true + }, + "name": { + "type": "string", + "description": "name of the role", + "nullable": true + } + } + }, + "MetadataListItemInput": { + "type": "object", + "properties": { + "identifier": { + "type": "string", + "description": "Unique ID or name of the metadata.", + "nullable": true + }, + "obj_identifier": { + "type": "string", + "description": "CustomObjectId of the metadata.", + "nullable": true + }, + "name_pattern": { + "type": "string", + "description": "A pattern to match the case-insensitive name of the metadata object. User % for a wildcard match.", + "nullable": true + }, + "type": { + "type": "string", + "enum": [ + "LIVEBOARD", + "ANSWER", + "LOGICAL_TABLE", + "LOGICAL_COLUMN", + "CONNECTION", + "TAG", + "USER", + "USER_GROUP", + "LOGICAL_RELATIONSHIP", + "INSIGHT_SPEC", + "COLLECTION" + ], + "description": "Type of metadata. Required if the name of the object is set as identifier. This attribute is optional when the object GUID is specified as identifier.\n1. Liveboard\n2. Answers\n3. LOGICAL_TABLE for any data object such as table, worksheet or view.\n4. LOGICAL_COLUMN for a column of any data object such as table, worksheet or view.\n5. CONNECTION for creating or modify data connections.\n6. TAG for tag objects.\n7. USER for user objects.\n8. USER_GROUP for group objects.\n9. LOGICAL_RELATIONSHIP for table or worksheet joins. A join combines from one or several data object by using matching values\n10. INSIGHT_SPEC for SpotIQ objects\n11. COLLECTION for collection objects", + "nullable": true + }, + "subtypes": { + "type": "array", + "items": { + "type": "string", + "enum": [ + "ONE_TO_ONE_LOGICAL", + "WORKSHEET", + "PRIVATE_WORKSHEET", + "USER_DEFINED", + "AGGR_WORKSHEET", + "SQL_VIEW" + ] + }, + "description": "List of subtype of metadata. Applies for LOGICAL_TABLE type with the following valid values.\n1. ONE_TO_ONE_LOGICAL\n2. WORKSHEET\n3. PRIVATE_WORKSHEET.\n4. USER_DEFINED.\n5. AGGR_WORKSHEET.\n6. SQL_VIEW
Version: 10.11.0.cl or later", + "nullable": true + } + } + }, + "PermissionInput": { + "type": "object", + "required": [ + "principal", + "share_mode" + ], + "properties": { + "principal": { + "$ref": "#/components/schemas/PrincipalsInput", + "description": "Details of users or groups." + }, + "share_mode": { + "type": "string", + "enum": [ + "READ_ONLY", + "MODIFY", + "NO_ACCESS" + ], + "description": "Object share mode." + } + }, + "description": "Details of users or groups." + }, + "ExcludeMetadataListItemInput": { + "type": "object", + "required": [ + "identifier", + "type" + ], + "properties": { + "identifier": { + "type": "string", + "description": "Unique ID or name of the metadata." + }, + "type": { + "type": "string", + "enum": [ + "LIVEBOARD", + "ANSWER", + "LOGICAL_TABLE", + "LOGICAL_COLUMN", + "CONNECTION", + "TAG", + "USER", + "USER_GROUP", + "LOGICAL_RELATIONSHIP", + "INSIGHT_SPEC", + "COLLECTION" + ], + "description": "Type of metadata. Required if the name of the object is set as identifier. This attribute is optional when the object GUID is specified as identifier.\n1. Liveboard\n2. Answers\n3. LOGICAL_TABLE for any data object such as table, worksheet or view\n4. LOGICAL_COLUMN for a column of any data object such as table, worksheet or view\n5. CONNECTION for connection objects\n6. TAG for tag objects\n7. USER for user objects\n8. USER_GROUP for group objects\n9. LOGICAL_RELATIONSHIP for table or worksheet joins. A join combines from one or several data object by using matching values.\n10. INSIGHT_SPEC for SpotIQ objects\n11. COLLECTION for collection objects" + } + } + }, + "FavoriteObjectOptionsInput": { + "type": "object", + "properties": { + "include": { + "type": "boolean", + "default": false, + "description": "Includes objects marked as favorite for the specified users.", + "nullable": true + }, + "user_identifiers": { + "type": "array", + "items": { + "type": "string" + }, + "description": "Unique ID or name of the users. If not specified, the favorite objects of current logged in user are returned.", + "nullable": true + } + }, + "description": "Favorite object options." + }, + "MetadataSearchSortOptions": { + "type": "object", + "properties": { + "field_name": { + "type": "string", + "enum": [ + "NAME", + "DISPLAY_NAME", + "AUTHOR", + "CREATED", + "MODIFIED", + "VIEWS", + "FAVORITES", + "LAST_ACCESSED" + ], + "description": "Name of the field to apply the sort on.", + "nullable": true + }, + "order": { + "type": "string", + "enum": [ + "ASC", + "DESC" + ], + "description": "Sort order : ASC(Ascending) or DESC(Descending).", + "nullable": true + } + }, + "description": "Sort options." + }, + "MetadataSearchResponse": { + "type": "object", + "required": [ + "metadata_type" + ], + "properties": { + "metadata_id": { + "type": "string", + "description": "Unique identifier of the metadata.", + "nullable": true + }, + "metadata_name": { + "type": "string", + "description": "Name of the metadata.", + "nullable": true + }, + "metadata_type": { + "type": "string", + "enum": [ + "LIVEBOARD", + "ANSWER", + "LOGICAL_TABLE", + "LOGICAL_COLUMN", + "CONNECTION", + "TAG", + "USER", + "USER_GROUP", + "LOGICAL_RELATIONSHIP", + "INSIGHT_SPEC", + "COLLECTION" + ], + "description": "Type of the metadata." + }, + "metadata_obj_id": { + "type": "string", + "description": "Custom identifier of the metadata.\n(Available from 10.8.0.cl onwards)", + "nullable": true + }, + "dependent_objects": { + "type": "object", + "description": "Details of dependent objects of the metadata objects.", + "nullable": true + }, + "incomplete_objects": { + "type": "array", + "items": { + "type": "object" + }, + "description": "Details of incomplete information of the metadata objects if any.", + "nullable": true + }, + "metadata_detail": { + "type": "object", + "description": "Complete details of the metadata objects.", + "nullable": true + }, + "metadata_header": { + "type": "object", + "description": "Header information of the metadata objects.", + "nullable": true + }, + "visualization_headers": { + "type": "array", + "items": { + "type": "object" + }, + "description": "Visualization header information of the metadata objects.", + "nullable": true + }, + "stats": { + "type": "object", + "description": "Stats of the metadata object. Includes views, favorites, last_accessed.", + "nullable": true + } + }, + "description": "Metadata Search Response Object." + }, + "GetAsyncImportStatusResponse": { + "type": "object", + "properties": { + "status_list": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ImportEPackAsyncTaskStatus" + }, + "description": "List of task statuses.", + "nullable": true + }, + "last_batch": { + "type": "boolean", + "description": "Indicates whether there are more task statuses to fetch.", + "nullable": true + } + } + }, + "ImportEPackAsyncTaskStatus": { + "type": "object", + "properties": { + "tenant_id": { + "type": "string", + "description": "GUID of tenant from which the task is initiated.", + "nullable": true + }, + "org_id": { + "type": "integer", + "format": "int32", + "description": "Organisation ID of the user who initiated the task.", + "nullable": true + }, + "task_id": { + "type": "string", + "description": "Unique identifier for the task.", + "nullable": true + }, + "task_name": { + "type": "string", + "description": "Name of the task.", + "nullable": true + }, + "import_response": { + "type": "object", + "description": "Response of imported objects so far.", + "nullable": true + }, + "task_status": { + "type": "string", + "enum": [ + "COMPLETED", + "IN_QUEUE", + "IN_PROGRESS", + "FAILED" + ], + "description": "Current status of the task.", + "nullable": true + }, + "author_id": { + "type": "string", + "description": "ID of the user who initiated the task.", + "nullable": true + }, + "import_policy": { + "type": "string", + "enum": [ + "PARTIAL", + "ALL_OR_NONE", + "VALIDATE_ONLY", + "PARTIAL_OBJECT" + ], + "description": "Policy used for the import task.", + "nullable": true + }, + "created_at": { + "type": "number", + "format": "float", + "description": "Time when the task was created (in ms since epoch).", + "nullable": true + }, + "in_progress_at": { + "type": "number", + "format": "float", + "description": "Time when the task started (in ms since epoch).", + "nullable": true + }, + "completed_at": { + "type": "number", + "format": "float", + "description": "Time when the task was completed (in ms since epoch).", + "nullable": true + }, + "total_object_count": { + "type": "integer", + "format": "int32", + "description": "Total number of objects to process.", + "nullable": true + }, + "object_processed_count": { + "type": "integer", + "format": "int32", + "description": "Number of objects processed so far.", + "nullable": true + }, + "modified_at": { + "type": "number", + "format": "float", + "description": "Last time the task status was updated (in ms since epoch).", + "nullable": true + }, + "author_display_name": { + "type": "string", + "description": "Display name of the user who initiated the task.", + "nullable": true + } + } + }, + "SqlQueryResponse": { + "type": "object", + "required": [ + "metadata_id", + "metadata_name", + "metadata_type", + "sql_queries" + ], + "properties": { + "metadata_id": { + "type": "string", + "description": "Unique identifier of the metadata." + }, + "metadata_name": { + "type": "string", + "description": "Name of the metadata." + }, + "metadata_type": { + "type": "string", + "enum": [ + "LIVEBOARD", + "ANSWER", + "LOGICAL_TABLE", + "LOGICAL_COLUMN", + "CONNECTION", + "TAG", + "USER", + "USER_GROUP", + "LOGICAL_RELATIONSHIP" + ], + "description": "Type of the metadata." + }, + "sql_queries": { + "type": "array", + "items": { + "$ref": "#/components/schemas/SqlQuery" + }, + "description": "SQL query details of metadata objects." + } + } + }, + "SqlQuery": { + "type": "object", + "required": [ + "metadata_id", + "metadata_name", + "sql_query" + ], + "properties": { + "metadata_id": { + "type": "string", + "description": "Unique identifier of the metadata." + }, + "metadata_name": { + "type": "string", + "description": "Name of the metadata." + }, + "sql_query": { + "type": "string", + "description": "SQL query of a metadata object." + } + }, + "description": "Response format associated with fetch SQL query api" + }, + "PdfOptionsInput": { + "type": "object", + "properties": { + "page_size": { + "type": "string", + "enum": [ + "A4", + "CONTINUOUS" + ], + "description": "Size of PDF page. `A4` generates a paginated A4 PDF. `CONTINUOUS` generates a continuous PDF that matches the Liveboard layout. Each Liveboard tab has its own page of variable length. Defaults to `A4` if not specified.
Beta Version: 26.5.0.cl or later", + "nullable": true + }, + "zoom_level": { + "type": "integer", + "format": "int32", + "description": "Zoom level percentage for the PDF. Only applicable when `page_size` is `CONTINUOUS`. Acceptable values are integers in the range [45, 175]. Defaults to 100 if not specified.
Beta Version: 26.5.0.cl or later", + "nullable": true + }, + "include_cover_page": { + "type": "boolean", + "default": true, + "description": "Indicates whether to include the cover page with the Liveboard title.", + "nullable": true + }, + "include_custom_logo": { + "type": "boolean", + "default": true, + "description": "Indicates whether to include customized wide logo in the footer if available.", + "nullable": true + }, + "include_filter_page": { + "type": "boolean", + "default": true, + "description": "Indicates whether to include a page with all applied filters. For `CONTINUOUS` page_size, this parameter indicates whether to include the filter header.", + "nullable": true + }, + "include_page_number": { + "type": "boolean", + "default": true, + "description": "Indicates whether to include page number in the footer of each page.", + "nullable": true + }, + "page_orientation": { + "type": "string", + "enum": [ + "PORTRAIT", + "LANDSCAPE" + ], + "default": "PORTRAIT", + "description": "Page orientation of the PDF.", + "nullable": true + }, + "truncate_table": { + "type": "boolean", + "default": false, + "description": "Indicates whether to include only the first page of the tables.", + "nullable": true + }, + "page_footer_text": { + "type": "string", + "description": "Text to include in the footer of each page.", + "nullable": true + } + } + }, + "PngOptionsInput": { + "type": "object", + "properties": { + "include_cover_page": { + "type": "boolean", + "default": false, + "description": "Indicates whether to include the cover page with the Liveboard title.", + "nullable": true + }, + "include_filter_page": { + "type": "boolean", + "default": false, + "description": "Indicates whether to include a page with all applied filters.", + "nullable": true + }, + "personalised_view_id": { + "type": "string", + "description": "Indicates personalised view of the Liveboard in case of png", + "nullable": true + }, + "image_resolution": { + "type": "integer", + "format": "int32", + "description": "Desired width of the Liveboard image in pixels. Ex. 1920 for Full HD image
Beta Version: 10.9.0.cl or later", + "nullable": true + }, + "image_scale": { + "type": "integer", + "format": "int32", + "description": "The scale of the image in percentage. Ex. 100 for 100% scale.
Beta Version: 10.9.0.cl or later", + "nullable": true + }, + "include_header": { + "type": "boolean", + "default": false, + "description": "Indicates whether to include the header of the liveboard.
Beta Version: 10.9.0.cl or later", + "nullable": true + } + } + }, + "RegionalSettingsInput": { + "type": "object", + "properties": { + "currency_format": { + "type": "string", + "description": "ISO code to be appended with currency values.", + "nullable": true, + "enum": [ + "ADP", + "AED", + "AFN", + "ALL", + "AMD", + "ANG", + "AOA", + "ARA", + "ARS", + "ATS", + "AUD", + "AWG", + "AZN", + "BAM", + "BBD", + "BDT", + "BEF", + "BGL", + "BGM", + "BGN", + "BHD", + "BIF", + "BMD", + "BND", + "BOB", + "BOP", + "BOV", + "BRL", + "BSD", + "BTN", + "BUK", + "BWP", + "BYN", + "BZD", + "CAD", + "CDF", + "CHE", + "CHF", + "CHW", + "CLE", + "CLP", + "CNX", + "CNY", + "COP", + "COU", + "CRC", + "CSK", + "CUC", + "CUP", + "CVE", + "CYP", + "CZK", + "DDM", + "DEM", + "DJF", + "DKK", + "DOP", + "DZD", + "ECS", + "ECV", + "EEK", + "EGP", + "ERN", + "ESP", + "ETB", + "EUR", + "FIM", + "FJD", + "FKP", + "FRF", + "GBP", + "GEK", + "GEL", + "GHS", + "GIP", + "GMD", + "GNF", + "GNS", + "GQE", + "GRD", + "GTQ", + "GWE", + "GWP", + "GYD", + "HKD", + "HNL", + "HRD", + "HRK", + "HTG", + "HUF", + "IDR", + "IEP", + "ILP", + "ILS", + "INR", + "IQD", + "IRR", + "ISK", + "ITL", + "JMD", + "JOD", + "JPY", + "KES", + "KGS", + "KHR", + "KMF", + "KPW", + "KRW", + "KWD", + "KYD", + "KZT", + "LAK", + "LBP", + "LKR", + "LRD", + "LSL", + "LTL", + "LTT", + "LUC", + "LUF", + "LUL", + "LVL", + "LVR", + "LYD", + "MAD", + "MAF", + "MCF", + "MDC", + "MDL", + "MGA", + "MGF", + "MKD", + "MLF", + "MMK", + "MNT", + "MOP", + "MRU", + "MTL", + "MTP", + "MUR", + "MVR", + "MWK", + "MXN", + "MXV", + "MYR", + "MZE", + "MZN", + "NAD", + "NGN", + "NIO", + "NLG", + "NOK", + "NPR", + "NZD", + "OMR", + "PAB", + "PEI", + "PEN", + "PGK", + "PHP", + "PKR", + "PLN", + "PTE", + "PYG", + "QAR", + "RHD", + "RON", + "RSD", + "RUB", + "RWF", + "SAR", + "SBD", + "SCR", + "SDG", + "SEK", + "SGD", + "SHP", + "SIT", + "SKK", + "SLL", + "SOS", + "SRD", + "SRG", + "SSP", + "STN", + "SUR", + "SVC", + "SYP", + "SZL", + "THB", + "TJR", + "TJS", + "TMT", + "TND", + "TOP", + "TPE", + "TRY", + "TTD", + "TWD", + "TZS", + "UAH", + "UAK", + "UGX", + "USD", + "UYU", + "UYW", + "UZS", + "VES", + "VND", + "VUV", + "WST", + "XAF", + "XAG", + "XAU", + "XBA", + "XBB", + "XCD", + "XDR", + "XEU", + "XFO", + "XFU", + "XOF", + "XPD", + "XPF", + "XPT", + "XRE", + "XSU", + "XTS", + "XUA", + "XXX", + "YDD", + "YER", + "ZAR", + "ZMW" + ] + }, + "user_locale": { + "type": "string", + "description": "Indicates the locale to be used for all formattings.", + "nullable": true, + "enum": [ + "en-CA", + "en-GB", + "en-US", + "de-DE", + "ja-JP", + "zh-CN", + "pt-BR", + "fr-FR", + "fr-CA", + "es-US", + "da-DK", + "es-ES", + "fi-FI", + "sv-SE", + "nb-NO", + "pt-PT", + "nl-NL", + "it-IT", + "ru-RU", + "en-IN", + "de-CH", + "en-NZ", + "es-MX", + "en-AU", + "zh-Hant", + "ko-KR", + "en-DE" + ] + }, + "number_format_locale": { + "type": "string", + "description": "Indicates the locale to be used for number formatting.", + "nullable": true, + "enum": [ + "en-CA", + "en-GB", + "en-US", + "de-DE", + "ja-JP", + "zh-CN", + "pt-BR", + "fr-FR", + "fr-CA", + "es-US", + "da-DK", + "es-ES", + "fi-FI", + "sv-SE", + "nb-NO", + "pt-PT", + "nl-NL", + "it-IT", + "ru-RU", + "en-IN", + "de-CH", + "en-NZ", + "es-MX", + "en-AU", + "zh-Hant", + "ko-KR", + "en-DE" + ] + }, + "date_format_locale": { + "type": "string", + "description": "Indicates the locale to be used for date formatting.", + "nullable": true, + "enum": [ + "en-CA", + "en-GB", + "en-US", + "de-DE", + "ja-JP", + "zh-CN", + "pt-BR", + "fr-FR", + "fr-CA", + "es-US", + "da-DK", + "es-ES", + "fi-FI", + "sv-SE", + "nb-NO", + "pt-PT", + "nl-NL", + "it-IT", + "ru-RU", + "en-IN", + "de-CH", + "en-NZ", + "es-MX", + "en-AU", + "zh-Hant", + "ko-KR", + "en-DE" + ] + } + } + }, + "AnswerPngOptionsInput": { + "type": "object", + "properties": { + "x_resolution": { + "type": "integer", + "format": "int32", + "description": "Desired width of the answer image in pixels. Ex. 1920 for Full HD image
Beta Version: 26.6.0.cl or later", + "nullable": true + }, + "y_resolution": { + "type": "integer", + "format": "int32", + "description": "Desired height of the answer image in pixels. Ex. 1080 for Full HD image
Beta Version: 26.6.0.cl or later", + "nullable": true + }, + "scaling": { + "type": "integer", + "format": "int32", + "description": "The scale of the image in percentage. Ex. 100 for 100% scale.
Beta Version: 26.6.0.cl or later", + "nullable": true + } + } + }, + "PermissionOfPrincipalsResponse": { + "type": "object", + "properties": { + "principal_permission_details": { + "type": "object", + "nullable": true + } + } + }, + "PermissionOfMetadataResponse": { + "type": "object", + "properties": { + "metadata_permission_details": { + "type": "object", + "nullable": true + } + } + }, + "ObjectPrivilegesMetadataInput": { + "type": "object", + "required": [ + "identifier" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "LOGICAL_TABLE" + ], + "description": "Type of metadata object.\nRequired if the name of the object is set as the identifier. This attribute is optional when the object GUID is specified as the identifier.", + "nullable": true + }, + "identifier": { + "type": "string", + "description": "Unique ID or name of the metadata object." + } + } + }, + "ObjectPrivilegesOfMetadataResponse": { + "type": "object", + "properties": { + "metadata_object_privileges": { + "type": "object", + "nullable": true + } + } + }, + "PrincipalsInput": { + "type": "object", + "required": [ + "identifier" + ], + "properties": { + "identifier": { + "type": "string", + "description": "Unique ID or name of the principal object such as a user or group." + }, + "type": { + "type": "string", + "enum": [ + "USER", + "USER_GROUP" + ], + "description": "Principal type.", + "nullable": true + } + } + }, + "PermissionsMetadataTypeInput": { + "type": "object", + "required": [ + "identifier" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "LIVEBOARD", + "ANSWER", + "LOGICAL_TABLE", + "LOGICAL_COLUMN", + "CONNECTION", + "COLLECTION" + ], + "description": " Type of metadata object.\n \n\nRequired if the name of the object is set as the identifier. This attribute is optional when the object GUID is specified as the identifier.", + "nullable": true + }, + "identifier": { + "type": "string", + "description": "Unique ID or name of the metadata object." + } + }, + "description": "MetadataType InputType used in Permission API's" + }, + "ColumnSecurityRuleTableInput": { + "type": "object", + "properties": { + "identifier": { + "type": "string", + "description": "Name or GUID of the table", + "nullable": true + }, + "obj_identifier": { + "type": "string", + "description": "Object ID of the table", + "nullable": true + } + } + }, + "ColumnSecurityRuleResponse": { + "type": "object", + "properties": { + "table_guid": { + "type": "string", + "description": "GUID of the table for which the column security rules are fetched", + "nullable": true + }, + "obj_id": { + "type": "string", + "description": "Object ID of the table for which the column security rules are fetched", + "nullable": true + }, + "column_security_rules": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ColumnSecurityRule" + }, + "description": "Array containing column security rule objects", + "nullable": true + } + } + }, + "ColumnSecurityRule": { + "type": "object", + "required": [ + "column" + ], + "properties": { + "column": { + "$ref": "#/components/schemas/ColumnSecurityRuleColumn", + "description": "Information about the column" + }, + "groups": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ColumnSecurityRuleGroup" + }, + "description": "Array of groups that have access to this column", + "nullable": true + }, + "source_table_details": { + "$ref": "#/components/schemas/ColumnSecurityRuleSourceTable", + "description": "Information about the source table", + "nullable": true + } + } + }, + "ColumnSecurityRuleColumn": { + "type": "object", + "required": [ + "id", + "name" + ], + "properties": { + "id": { + "type": "string", + "description": "The unique identifier of the column" + }, + "name": { + "type": "string", + "description": "The name of the column" + } + } + }, + "ColumnSecurityRuleGroup": { + "type": "object", + "required": [ + "id", + "name" + ], + "properties": { + "id": { + "type": "string", + "description": "The unique identifier of the group" + }, + "name": { + "type": "string", + "description": "The name of the group" + } + } + }, + "ColumnSecurityRuleSourceTable": { + "type": "object", + "required": [ + "id", + "name" + ], + "properties": { + "id": { + "type": "string", + "description": "The unique identifier of the source table" + }, + "name": { + "type": "string", + "description": "The name of the source table" + } + } + }, + "SearchDataResponse": { + "type": "object", + "required": [ + "contents" + ], + "properties": { + "contents": { + "type": "array", + "items": { + "$ref": "#/components/schemas/AnswerContent" + }, + "description": "Data content of metadata objects" + } + }, + "description": "Response format associated with the search data API." + }, + "AnswerContent": { + "type": "object", + "required": [ + "available_data_row_count", + "column_names", + "data_rows", + "record_offset", + "record_size", + "returned_data_row_count", + "sampling_ratio" + ], + "properties": { + "available_data_row_count": { + "type": "integer", + "format": "int32", + "description": "Total available data row count." + }, + "column_names": { + "type": "array", + "items": { + "type": "string" + }, + "description": "Name of the columns." + }, + "data_rows": { + "type": "array", + "items": { + "type": "object" + }, + "description": "Rows of data set." + }, + "record_offset": { + "type": "integer", + "format": "int32", + "description": "The starting record number from where the records should be included." + }, + "record_size": { + "type": "integer", + "format": "int32", + "description": "The number of records that should be included." + }, + "returned_data_row_count": { + "type": "integer", + "format": "int32", + "description": "Total returned data row count." + }, + "sampling_ratio": { + "type": "number", + "format": "float", + "description": "Sampling ratio (0 to 1). If the query was sampled, it is the ratio of keys returned in the data set to the total number of keys expected in the query. If the value is 1.0, this means that the complete result is returned." + } + } + }, + "LiveboardDataResponse": { + "type": "object", + "required": [ + "metadata_id", + "metadata_name", + "contents" + ], + "properties": { + "metadata_id": { + "type": "string", + "description": "The unique identifier of the object" + }, + "metadata_name": { + "type": "string", + "description": "Name of the metadata object" + }, + "contents": { + "type": "array", + "items": { + "$ref": "#/components/schemas/LiveboardContent" + }, + "description": "Data content of metadata objects" + } + } + }, + "LiveboardContent": { + "type": "object", + "required": [ + "available_data_row_count", + "column_names", + "data_rows", + "record_offset", + "record_size", + "returned_data_row_count", + "sampling_ratio" + ], + "properties": { + "available_data_row_count": { + "type": "integer", + "format": "int32", + "description": "Total available data row count." + }, + "column_names": { + "type": "array", + "items": { + "type": "string" + }, + "description": "Name of the columns." + }, + "data_rows": { + "type": "array", + "items": { + "type": "object" + }, + "description": "Rows of data set." + }, + "record_offset": { + "type": "integer", + "format": "int32", + "description": "The starting record number from where the records should be included." + }, + "record_size": { + "type": "integer", + "format": "int32", + "description": "The number of records that should be included." + }, + "returned_data_row_count": { + "type": "integer", + "format": "int32", + "description": "Total returned data row count." + }, + "sampling_ratio": { + "type": "number", + "format": "float", + "description": "Sampling ratio (0 to 1). If the query was sampled, it is the ratio of keys returned in the data set to the total number of keys expected in the query. If the value is 1.0, this means that the complete result is returned." + }, + "visualization_id": { + "type": "string", + "description": "Unique ID of the visualization.", + "nullable": true + }, + "visualization_name": { + "type": "string", + "description": "Name of the visualization.", + "nullable": true + } + } + }, + "AnswerDataResponse": { + "type": "object", + "required": [ + "metadata_id", + "metadata_name", + "contents" + ], + "properties": { + "metadata_id": { + "type": "string", + "description": "The unique identifier of the object" + }, + "metadata_name": { + "type": "string", + "description": "Name of the metadata object" + }, + "contents": { + "type": "array", + "items": { + "$ref": "#/components/schemas/AnswerContent" + }, + "description": "Data content of metadata objects" + } + }, + "description": "Response format associated with fetch data api" + }, + "LogResponse": { + "type": "object", + "required": [ + "date", + "log" + ], + "properties": { + "date": { + "type": "string", + "description": "Date timestamp of the log entry" + }, + "log": { + "type": "string", + "description": "Log data" + } + } + }, + "RepoConfigObject": { + "type": "object", + "properties": { + "repository_url": { + "type": "string", + "description": "Remote repository URL configured", + "nullable": true + }, + "username": { + "type": "string", + "description": "Username to authenticate connection to the version control system", + "nullable": true + }, + "commit_branch_name": { + "type": "string", + "description": "Name of the remote branch where objects from this Thoughtspot instance will be versioned.", + "nullable": true + }, + "branches": { + "type": "array", + "items": { + "type": "string" + }, + "description": "Branches that have been pulled in local repository", + "nullable": true + }, + "enable_guid_mapping": { + "type": "boolean", + "description": "Maintain mapping of guid for the deployment to an instance", + "nullable": true + }, + "configuration_branch_name": { + "type": "string", + "description": "Name of the branch where the configuration files related to operations between Thoughtspot and version control repo should be maintained.", + "nullable": true + }, + "org": { + "$ref": "#/components/schemas/Org", + "description": "Details of the Org", + "nullable": true + } + } + }, + "CommitHistoryResponse": { + "type": "object", + "required": [ + "committer", + "author", + "comment", + "commit_time", + "commit_id", + "branch" + ], + "properties": { + "committer": { + "$ref": "#/components/schemas/CommiterType", + "description": "Repository user using which changes were committed" + }, + "author": { + "$ref": "#/components/schemas/AuthorType", + "description": "Thoughtspot user who commits the changes" + }, + "comment": { + "type": "string", + "description": "Comments associated with the commit" + }, + "commit_time": { + "type": "string", + "description": "Time at which the changes were committed." + }, + "commit_id": { + "type": "string", + "description": "SHA id associated with the commit" + }, + "branch": { + "type": "string", + "description": "Branch where changes were committed" + } + } + }, + "CommiterType": { + "type": "object", + "properties": { + "email": { + "type": "string", + "description": "Email id of the committer", + "nullable": true + }, + "username": { + "type": "string", + "description": "Username of the committer", + "nullable": true + } + } + }, + "AuthorType": { + "type": "object", + "properties": { + "email": { + "type": "string", + "description": "Email id of the committer", + "nullable": true + }, + "username": { + "type": "string", + "description": "Username of the committer", + "nullable": true + } + } + }, + "ConnectionInput": { + "type": "object", + "properties": { + "identifier": { + "type": "string", + "description": "Unique ID or name of the connection.", + "nullable": true + }, + "name_pattern": { + "type": "string", + "description": "A pattern to match case-insensitive name of the connection object. User `%` for a wildcard match.", + "nullable": true + }, + "data_warehouse_objects": { + "type": "array", + "items": { + "$ref": "#/components/schemas/DataWarehouseObjectInput" + }, + "description": "Filter options for databases, schemas, tables and columns.", + "nullable": true + } + } + }, + "DataWarehouseObjectInput": { + "type": "object", + "properties": { + "database": { + "type": "string", + "description": "Name of the database.", + "nullable": true + }, + "schema": { + "type": "string", + "description": "Name of the schema within the database.", + "nullable": true + }, + "table": { + "type": "string", + "description": "Name of the table within the schema.", + "nullable": true + }, + "column": { + "type": "string", + "description": "Name of the column within the table.", + "nullable": true + } + } + }, + "SortOptionInput": { + "type": "object", + "properties": { + "field_name": { + "type": "string", + "enum": [ + "NAME", + "DISPLAY_NAME", + "AUTHOR", + "CREATED", + "MODIFIED", + "LAST_ACCESSED", + "SYNCED", + "VIEWS", + "USER_STATE", + "ROW_COUNT" + ], + "description": "Name of the field to apply the sort on.", + "nullable": true + }, + "order": { + "type": "string", + "enum": [ + "ASC", + "DESC" + ], + "description": "Sort order : ASC(Ascending) or DESC(Descending).", + "nullable": true + } + } + }, + "SearchConnectionResponse": { + "type": "object", + "required": [ + "id", + "name", + "data_warehouse_type" + ], + "properties": { + "id": { + "type": "string", + "description": "Unique ID of the connection." + }, + "name": { + "type": "string", + "description": "Name of the connection." + }, + "description": { + "type": "string", + "description": "Description of the connection.", + "nullable": true + }, + "data_warehouse_type": { + "type": "string", + "enum": [ + "SNOWFLAKE", + "AMAZON_REDSHIFT", + "GOOGLE_BIGQUERY", + "AZURE_SYNAPSE", + "TERADATA", + "SAP_HANA", + "STARBURST", + "ORACLE_ADW", + "DATABRICKS", + "DENODO", + "DREMIO", + "TRINO", + "PRESTO", + "POSTGRES", + "SQLSERVER", + "MYSQL", + "GENERIC_JDBC", + "AMAZON_RDS_POSTGRESQL", + "AMAZON_AURORA_POSTGRESQL", + "AMAZON_RDS_MYSQL", + "AMAZON_AURORA_MYSQL", + "LOOKER", + "AMAZON_ATHENA", + "SINGLESTORE", + "GCP_SQLSERVER", + "GCP_ALLOYDB_POSTGRESQL", + "GCP_POSTGRESQL", + "GCP_MYSQL", + "MODE", + "GOOGLE_SHEETS", + "FALCON", + "FALCON_ONPREM", + "CLICKHOUSE", + "IOMETE" + ], + "description": "Type of data warehouse." + }, + "data_warehouse_objects": { + "$ref": "#/components/schemas/DataWarehouseObjects", + "description": "List of Data warehouse objects", + "nullable": true + }, + "details": { + "type": "object", + "description": "Details of the connection.", + "nullable": true + } + } + }, + "DataWarehouseObjects": { + "type": "object", + "required": [ + "databases" + ], + "properties": { + "databases": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Database" + }, + "description": "Databases of the connection." + } + } + }, + "Database": { + "type": "object", + "required": [ + "name" + ], + "properties": { + "name": { + "type": "string", + "description": "Name of the database." + }, + "schemas": { + "type": "array", + "items": { + "$ref": "#/components/schemas/SchemaObject" + }, + "description": "Schemas of the database.", + "nullable": true + }, + "auto_created": { + "type": "boolean", + "description": "Determines if the object is auto created.", + "nullable": true + } + } + }, + "SchemaObject": { + "type": "object", + "required": [ + "name" + ], + "properties": { + "name": { + "type": "string", + "description": "Name of the schema." + }, + "tables": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Table" + }, + "description": "Tables in the schema.", + "nullable": true + } + } + }, + "Table": { + "type": "object", + "required": [ + "name" + ], + "properties": { + "name": { + "type": "string", + "description": "Name of the table." + }, + "columns": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Column" + }, + "description": "Columns of the table.", + "nullable": true + }, + "type": { + "type": "string", + "description": "Type of table. Either view or table", + "nullable": true + }, + "description": { + "type": "string", + "description": "Description of the table", + "nullable": true + }, + "selected": { + "type": "boolean", + "description": "Determines if the table is selected", + "nullable": true + }, + "linked": { + "type": "boolean", + "description": "Determines if the table is linked", + "nullable": true + }, + "relationships": { + "type": "array", + "items": { + "type": "object" + }, + "description": "List of relationships for the table", + "nullable": true + } + } + }, + "Column": { + "type": "object", + "required": [ + "name", + "data_type" + ], + "properties": { + "name": { + "type": "string", + "description": "Name of the column" + }, + "data_type": { + "type": "string", + "description": "Data type of the column" + }, + "is_aggregate": { + "type": "string", + "description": "Determines if the column schema is an aggregate", + "nullable": true + }, + "can_import": { + "type": "boolean", + "description": "Determines if the column schema can be imported", + "nullable": true + }, + "selected": { + "type": "boolean", + "description": "Determines if the table is selected", + "nullable": true + }, + "is_linked_active": { + "type": "boolean", + "description": "Determines if the table is linked", + "nullable": true + } + } + }, + "SearchRoleResponse": { + "type": "object", + "required": [ + "id", + "name", + "description", + "privileges" + ], + "properties": { + "id": { + "type": "string", + "description": "Unique Id of the role." + }, + "name": { + "type": "string", + "description": "Name of the role" + }, + "description": { + "type": "string", + "description": "Description of the role" + }, + "groups_assigned_count": { + "type": "integer", + "format": "int32", + "description": "number of groups assigned with this role", + "nullable": true + }, + "orgs": { + "type": "array", + "items": { + "$ref": "#/components/schemas/GenericInfo" + }, + "description": "Orgs in which role exists.", + "nullable": true + }, + "groups": { + "type": "array", + "items": { + "$ref": "#/components/schemas/GenericInfo" + }, + "description": "Details of groups assigned with this role", + "nullable": true + }, + "privileges": { + "type": "array", + "items": { + "type": "string", + "enum": [ + "UNKNOWN", + "ADMINISTRATION", + "AUTHORING", + "USERDATAUPLOADING", + "DATADOWNLOADING", + "USERMANAGEMENT", + "SECURITYMANAGEMENT", + "LOGICALMODELING", + "DATAMANAGEMENT", + "TAGMANAGEMENT", + "SHAREWITHALL", + "SYSTEMMANAGEMENT", + "JOBSCHEDULING", + "A3ANALYSIS", + "EXPERIMENTALFEATUREPRIVILEGE", + "BYPASSRLS", + "RANALYSIS", + "DISABLE_PINBOARD_CREATION", + "DEVELOPER", + "APPLICATION_ADMINISTRATION", + "USER_ADMINISTRATION", + "GROUP_ADMINISTRATION", + "BACKUP_ADMINISTRATION", + "SYSTEM_INFO_ADMINISTRATION", + "ENABLESPOTAPPCREATION", + "SYNCMANAGEMENT", + "ORG_ADMINISTRATION", + "ROLE_ADMINISTRATION", + "AUTHENTICATION_ADMINISTRATION", + "BILLING_INFO_ADMINISTRATION", + "PREVIEW_THOUGHTSPOT_SAGE", + "LIVEBOARD_VERIFIER", + "CAN_MANAGE_CUSTOM_CALENDAR", + "CAN_CREATE_OR_EDIT_CONNECTIONS", + "CAN_CONFIGURE_CONNECTIONS", + "CAN_MANAGE_WORKSHEET_VIEWS_TABLES", + "CAN_MANAGE_VERSION_CONTROL", + "THIRDPARTY_ANALYSIS", + "CONTROL_TRUSTED_AUTH", + "CAN_CREATE_CATALOG", + "ALLOW_NON_EMBED_FULL_APP_ACCESS", + "CAN_ACCESS_ANALYST_STUDIO", + "CAN_MANAGE_ANALYST_STUDIO", + "CAN_VIEW_FOLDERS", + "CAN_MODIDY_FOLDERS", + "CAN_MANAGE_VARIABLES", + "CAN_MANAGE_AGENTSPOT", + "CAN_ACCESS_AGENTSPOT", + "PREVIEW_DOCUMENT_SEARCH", + "CAN_SETUP_VERSION_CONTROL", + "CAN_MANAGE_WEBHOOKS", + "CAN_DOWNLOAD_VISUALS", + "CAN_DOWNLOAD_DETAILED_DATA", + "CAN_USE_SPOTTER", + "CAN_MANAGE_SPOTTER" + ] + }, + "description": "Privileges granted to the role." + }, + "permission": { + "type": "string", + "enum": [ + "READ_ONLY", + "MODIFY", + "NO_ACCESS" + ], + "description": "Permission details of the Role", + "nullable": true + }, + "author_id": { + "type": "string", + "description": "Unique identifier of author of the role.", + "nullable": true + }, + "modifier_id": { + "type": "string", + "description": "Unique identifier of modifier of the role.", + "nullable": true + }, + "creation_time_in_millis": { + "type": "object", + "description": "Creation time of the role in milliseconds.", + "nullable": true + }, + "modification_time_in_millis": { + "type": "object", + "description": "Last modified time of the role in milliseconds.", + "nullable": true + }, + "deleted": { + "type": "boolean", + "description": "Indicates whether the role is deleted.", + "nullable": true + }, + "deprecated": { + "type": "boolean", + "description": "Indicates whether the role is deprecated.", + "nullable": true + }, + "external": { + "type": "boolean", + "description": "Indicates whether the role is external.", + "nullable": true + }, + "hidden": { + "type": "boolean", + "description": "Indicates whether the role is hidden.", + "nullable": true + }, + "shared_via_connection": { + "type": "boolean", + "description": "Indicates whether the role is shared via connection", + "nullable": true + } + }, + "description": "Response for search role api should handle hidden privileges as well." + }, + "Default_Action_Config_Search_Input": { + "type": "object", + "properties": { + "visibility": { + "type": "boolean", + "description": "Custom action is available on all visualizations. Earlier naming convention: LOCAL/GLOBAL. TRUE signifies GLOBAL for backward compatibility.", + "nullable": true + } + }, + "description": "Default Custom action configuration. This includes the custom action's visibility across all visualizations and Answers. By default, a custom action is added to all visualizations and Answers." + }, + "ResponseCustomAction": { + "type": "object", + "required": [ + "action_details", + "default_action_config", + "id", + "name" + ], + "properties": { + "action_details": { + "$ref": "#/components/schemas/Action_details", + "description": "`Type` and configuration data for custom actions" + }, + "default_action_config": { + "$ref": "#/components/schemas/Default_action_config", + "description": "Default custom action configuration. This includes the custom action's visibility across all visualizations and Answers. By default, a custom action is added to all visualizations and Answers." + }, + "id": { + "type": "string", + "description": "Unique Id of the custom action." + }, + "metadata_association": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Metadata_Association_Item" + }, + "description": "Metadata objects to assign the the custom action to.", + "nullable": true + }, + "name": { + "type": "string", + "description": "Unique name of the custom action." + }, + "user_groups": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Object_ID_And_Name" + }, + "description": "Unique ID or name of the User groups which are associated with the custom action.", + "nullable": true + } + }, + "description": "Custom action details" + }, + "Action_details": { + "type": "object", + "properties": { + "CALLBACK": { + "$ref": "#/components/schemas/CALLBACK", + "description": "CALLBACK Custom Action Type", + "nullable": true + }, + "URL": { + "$ref": "#/components/schemas/URL", + "description": "URL Custom Action Type", + "nullable": true + } + }, + "description": "Type and Configuration for Custom Actions" + }, + "CALLBACK": { + "type": "object", + "properties": { + "reference": { + "type": "string", + "description": "Reference name of the SDK. By default, the value will be set to action name.", + "nullable": true + } + }, + "description": "CALLBACK Custom Action Type" + }, + "URL": { + "type": "object", + "required": [ + "url" + ], + "properties": { + "authentication": { + "$ref": "#/components/schemas/Authentication", + "description": "Authorization type for the custom action.", + "nullable": true + }, + "parameters": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ParametersListItem" + }, + "description": "Query parameters for url.", + "nullable": true + }, + "url": { + "type": "string", + "description": "Request Url for the Custom action." + }, + "reference": { + "type": "string", + "description": "Reference name of the SDK. By default, the value will be set to action name.", + "nullable": true + } + }, + "description": "URL Custom Action Type" + }, + "Authentication": { + "type": "object", + "properties": { + "API_Key": { + "$ref": "#/components/schemas/API_Key", + "description": "With API key auth, you send a key-value pair to the API either in the request headers or query parameters.", + "nullable": true + }, + "Basic_Auth": { + "$ref": "#/components/schemas/Basic_Auth", + "description": "Basic Auth: Basic authentication involves sending a verified username and password with your request.", + "nullable": true + }, + "Bearer_Token": { + "type": "string", + "description": "Bearer tokens enable requests to authenticate using an access key.", + "nullable": true + }, + "No_Auth": { + "type": "string", + "description": "No authorization. If your request doesn't require authorization.", + "nullable": true + } + }, + "description": "Authorization type for the custom action." + }, + "API_Key": { + "type": "object", + "properties": { + "key": { + "type": "string", + "description": "Enter your key name", + "nullable": true + }, + "value": { + "type": "string", + "description": "Enter you key value", + "nullable": true + } + }, + "description": "With API key auth, you send a key-value pair to the API either in the request headers or query parameters." + }, + "Basic_Auth": { + "type": "object", + "properties": { + "password": { + "type": "string", + "description": "Password for the basic authentication", + "nullable": true + }, + "username": { + "type": "string", + "description": "Username for the basic authentication", + "nullable": true + } + }, + "description": "Basic Auth: Basic authentication involves sending a verified username and password with your request." + }, + "ParametersListItem": { + "type": "object", + "properties": { + "key": { + "type": "string", + "description": "Key for the url query parameter", + "nullable": true + }, + "value": { + "type": "string", + "description": "Value for the url query parameter", + "nullable": true + } + } + }, + "Default_action_config": { + "type": "object", + "properties": { + "visibility": { + "type": "boolean", + "description": "Custom action is available on all visualizations. Earlier , the naming convention: LOCAL/GLOBAL. TRUE signifies GLOBAL for backward compatibility.", + "nullable": true + } + }, + "description": "Default Custom action configuration. This includes the custom action's visibility across all visualizations and Answers. By default, a custom action is added to all visualizations and Answers." + }, + "Metadata_Association_Item": { + "type": "object", + "required": [ + "action_config", + "identifier", + "type" + ], + "properties": { + "action_config": { + "$ref": "#/components/schemas/Action_config", + "description": "Specify that the association is enabled for the metadata object" + }, + "identifier": { + "type": "string", + "description": "Unique ID or name of the metadata." + }, + "type": { + "type": "string", + "description": " Type of metadata.\n \n\nRequired if the name of the object is set as the identifier. This attribute is optional when the object GUID is specified as the identifier." + } + } + }, + "Action_config": { + "type": "object", + "properties": { + "position": { + "type": "string", + "description": "Position of the Custom action on the Metadata object. Earlier naming convention: context.", + "nullable": true + }, + "visibility": { + "type": "boolean", + "description": "Visibility of the metadata association with custom action. Earlier naming convention: enabled", + "nullable": true + } + }, + "description": "Specify that the association is enabled for the metadata object" + }, + "CustomActionMetadataTypeInput": { + "type": "object", + "required": [ + "identifier" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "VISUALIZATION", + "ANSWER", + "WORKSHEET" + ], + "description": " Type of metadata object.\n \n\nRequired if the name of the object is set as the identifier. This attribute is optional when the object GUID is specified as the identifier.", + "nullable": true + }, + "identifier": { + "type": "string", + "description": "Unique ID or name of the metadata object." + } + }, + "description": "MetadataType InputType used in Custom Action API's" + }, + "MetadataContext": { + "type": "object", + "properties": { + "data_source_identifiers": { + "type": "array", + "items": { + "type": "string" + }, + "description": "List of data_source_identifiers to provide context for breaking down user query into analytical queries that can be run on them.", + "nullable": true + }, + "answer_identifiers": { + "type": "array", + "items": { + "type": "string" + }, + "description": "List of answer unique identifiers (GUIDs) whose data will be used to guide the response.", + "nullable": true + }, + "conversation_identifier": { + "type": "string", + "description": "Unique identifier to denote current conversation.", + "nullable": true + }, + "liveboard_identifiers": { + "type": "array", + "items": { + "type": "string" + }, + "description": "List of liveboard unique identifiers (GUIDs) whose data will be used to guide the response.", + "nullable": true + } + } + }, + "AIContext": { + "type": "object", + "properties": { + "instructions": { + "type": "array", + "items": { + "type": "string" + }, + "description": "User specific text instructions sent to AI system for processing the query.", + "nullable": true + }, + "content": { + "type": "array", + "items": { + "type": "string" + }, + "description": "User provided content like text data, csv data as a string message to provide context & potentially improve the quality of the response.", + "nullable": true + } + } + }, + "eureka_GetRelevantQuestionsResponse": { + "type": "object", + "properties": { + "relevant_questions": { + "type": "array", + "items": { + "$ref": "#/components/schemas/eureka_RelevantQuestion" + }, + "description": "List of relevant questions that can be run on their respective data sources.", + "nullable": true + } + } + }, + "eureka_RelevantQuestion": { + "type": "object", + "properties": { + "query": { + "type": "string", + "description": "NL query that can be run using spotter aka natural language search to get an AI generated answer.", + "nullable": true + }, + "data_source_identifier": { + "type": "string", + "description": "Unique identifier of the data source on which this query can be run on.", + "nullable": true + }, + "data_source_name": { + "type": "string", + "description": "Display name of the data source on which this query can be run on.", + "nullable": true + } + } + }, + "Input_eureka_NLSRequest": { + "type": "object", + "properties": { + "agentVersion": { + "type": "integer", + "format": "int32", + "description": "Cluster version like 10.4.0.cl, 10.5.0.cl, so on.", + "nullable": true + }, + "bypassCache": { + "type": "boolean", + "description": "If true, results are not returned from cache & calculated every time. Can incur high costs & latency.", + "nullable": true + }, + "instructions": { + "type": "array", + "items": { + "type": "string" + }, + "description": "User specific instructions for processing the @query.", + "nullable": true + }, + "query": { + "type": "string", + "description": "User query which is a topical/goal oriented question that needs to be broken down into smaller simple analytical questions.", + "nullable": true + } + } + }, + "eureka_DecomposeQueryResponse": { + "type": "object", + "properties": { + "decomposedQueryResponse": { + "$ref": "#/components/schemas/eureka_LLMDecomposeQueryResponse", + "description": "Decomposed query response for a topical/goal oriented question that contains broken down analytical questions.", + "nullable": true + } + } + }, + "eureka_LLMDecomposeQueryResponse": { + "type": "object", + "properties": { + "decomposedQueries": { + "type": "array", + "items": { + "$ref": "#/components/schemas/eureka_LLMSuggestedQuery" + }, + "description": "List of analytical questions that can be run on their respective worksheet/data sources.", + "nullable": true + } + } + }, + "eureka_LLMSuggestedQuery": { + "type": "object", + "properties": { + "query": { + "type": "string", + "description": "NL query that can be run using spotter aka natural language search to get an AI generated answer.", + "nullable": true + }, + "worksheetId": { + "type": "string", + "description": "Unique identifier of the worksheet on which this query can be run on.", + "nullable": true + }, + "worksheetName": { + "type": "string", + "description": "Display name of the worksheet on which this query can be run on.", + "nullable": true + } + } + }, + "eureka_DataSourceSuggestionResponse": { + "type": "object", + "properties": { + "data_sources": { + "type": "array", + "items": { + "$ref": "#/components/schemas/DataSource" + }, + "description": "List of data sources suggested.", + "nullable": true + } + } + }, + "DataSource": { + "type": "object", + "properties": { + "confidence": { + "type": "number", + "format": "float", + "description": "Confidence score for the data source suggestion.", + "nullable": true + }, + "details": { + "$ref": "#/components/schemas/EntityHeader", + "description": "Details of the data source.", + "nullable": true + }, + "reasoning": { + "type": "string", + "description": "LLM reasoning for the data source.", + "nullable": true + } + } + }, + "EntityHeader": { + "type": "object", + "properties": { + "description": { + "type": "string", + "description": "Description of the data source.", + "nullable": true + }, + "data_source_name": { + "type": "string", + "description": "Display name of the data source.", + "nullable": true + }, + "data_source_identifier": { + "type": "string", + "description": "Unique identifier of the data source.", + "nullable": true + } + } + }, + "eureka_GetNLInstructionsResponse": { + "type": "object", + "required": [ + "nl_instructions_info" + ], + "properties": { + "nl_instructions_info": { + "type": "array", + "items": { + "$ref": "#/components/schemas/NLInstructionsInfo" + }, + "description": "List of NL instructions with their scopes." + } + } + }, + "NLInstructionsInfo": { + "type": "object", + "required": [ + "instructions", + "scope" + ], + "properties": { + "instructions": { + "type": "array", + "items": { + "type": "string" + }, + "description": "User instructions for natural language processing." + }, + "scope": { + "type": "string", + "enum": [ + "GLOBAL" + ], + "description": "Scope of the instruction." + } + } + }, + "AgentInstructions": { + "type": "object", + "required": [ + "instructions" + ], + "properties": { + "id": { + "type": "string", + "description": "Unique identifier of the record.", + "nullable": true + }, + "instructions": { + "type": "string", + "description": "The admin instructions text for the agent." + }, + "created_at": { + "type": "string", + "description": "ISO timestamp when the instructions were created.", + "nullable": true + }, + "updated_at": { + "type": "string", + "description": "ISO timestamp when the instructions were last updated.", + "nullable": true + }, + "last_updated_by": { + "type": "string", + "description": "User ID of the admin who last updated the instructions.", + "nullable": true + } + }, + "description": "Admin instructions configured for the AI agent." + }, + "AgentConversationHistoryResponse": { + "type": "object", + "properties": { + "conversations": { + "type": "array", + "items": { + "$ref": "#/components/schemas/AgentConversationList" + }, + "description": "List of saved agent conversations for the current user.", + "nullable": true + }, + "has_more": { + "type": "boolean", + "description": "Whether additional conversations exist beyond this page. `true` when one or\nmore conversations remain after the current page; `false` when the current\npage is the last. Use `offset` to fetch the next page.", + "nullable": true + } + }, + "description": "Response returned by getConversationList." + }, + "AgentConversationList": { + "type": "object", + "required": [ + "conversation_identifier" + ], + "properties": { + "conversation_identifier": { + "type": "string", + "description": "Unique identifier of the conversation." + }, + "conversation_title": { + "type": "string", + "description": "Display title of the conversation.", + "nullable": true + }, + "created_at": { + "type": "string", + "description": "ISO 8601 timestamp when the conversation was created.", + "nullable": true + }, + "updated_at": { + "type": "string", + "description": "ISO 8601 timestamp when the conversation was last updated.", + "nullable": true + }, + "data_source_identifiers": { + "type": "array", + "items": { + "type": "string" + }, + "description": "Unique identifiers of the data sources associated with the conversation.", + "nullable": true + }, + "data_source_names": { + "type": "array", + "items": { + "$ref": "#/components/schemas/DataSourceEntry" + }, + "description": "Data sources associated with the conversation, each with an `id` and `name`.", + "nullable": true + } + }, + "description": "A saved agent conversation item returned in list responses." + }, + "DataSourceEntry": { + "type": "object", + "required": [ + "id", + "name" + ], + "properties": { + "id": { + "type": "string", + "description": "Unique identifier of the data source." + }, + "name": { + "type": "string", + "description": "Display name of the data source." + } + }, + "description": "A data source associated with a conversation, returned as a typed entry." + }, + "ConversationMessageResponse": { + "type": "object", + "properties": { + "messages": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ConversationMessage" + }, + "description": "Ordered conversation messages. Empty array when the conversation has no messages.", + "nullable": true + }, + "code_execution_files": { + "type": "array", + "items": { + "$ref": "#/components/schemas/CodeExecutionFileMetadata" + }, + "description": "Sanitized code-execution file metadata for files referenced by this\nconversation. Empty array when the conversation has no code-execution files.", + "nullable": true + } + }, + "description": "Response body of getConversation. `messages` is ordered oldest to newest.\n`code_execution_files` is a list of sanitized code-execution file metadata\nentries, keyed in upstream by `file_id`." + }, + "ConversationMessage": { + "type": "object", + "required": [ + "message_id", + "timestamp_in_millis" + ], + "properties": { + "message_id": { + "type": "string", + "description": "Stable identifier for the turn. For liveboard-started synthetic first turns,\nthis is the root node identifier." + }, + "timestamp_in_millis": { + "type": "object", + "description": "Milliseconds since Unix epoch for the turn." + }, + "user_prompt": { + "$ref": "#/components/schemas/UserPrompt", + "description": "User-authored prompt that started the turn: the user's message and any files\nor connector resources attached to it. Null for liveboard-started synthetic\nfirst turns.", + "nullable": true + }, + "response_items": { + "type": "array", + "items": { + "type": "object" + }, + "description": "Agent-side output produced in response to this turn. Empty array for\nin-progress turns where the agent has not yet produced output.", + "nullable": true + } + }, + "description": "One conversational exchange: an optional user prompt (message and attachments),\nfollowed by the agent's response items for that turn." + }, + "UserPrompt": { + "type": "object", + "properties": { + "message": { + "$ref": "#/components/schemas/UserMessage", + "description": "User query that started the turn. Null for liveboard-started synthetic first turns.", + "nullable": true + }, + "attachments": { + "type": "array", + "items": { + "type": "object" + }, + "description": "Files or connector resources attached to the user message. Empty array when\nthere are no attachments.", + "nullable": true + } + }, + "description": "User-authored prompt for a conversation turn: the user's text message and any\nfiles or connector resources attached to it." + }, + "UserMessage": { + "type": "object", + "required": [ + "message_id", + "content" + ], + "properties": { + "message_id": { + "type": "string", + "description": "Unique identifier of the user message." + }, + "content": { + "type": "string", + "description": "Text body of the user query." + } + }, + "description": "User-authored text message that begins a conversation turn.\nNull when the turn is a synthetic liveboard-started first turn." + }, + "FileResponseItem": { + "type": "object", + "required": [ + "type", + "timestamp_in_millis" + ], + "properties": { + "type": { + "type": "string", + "description": "Variant discriminator. Always `\"file\"`." + }, + "timestamp_in_millis": { + "type": "object", + "description": "Milliseconds since Unix epoch when this item was produced." + }, + "is_thinking": { + "type": "boolean", + "description": "True when the item represents internal agent reasoning rather than user-facing output.", + "nullable": true + }, + "step_title": { + "type": "string", + "description": "Human-readable label for the agent step producing this item.", + "nullable": true + }, + "files": { + "type": "array", + "items": { + "$ref": "#/components/schemas/PublicFileInfo" + }, + "description": "Sanitized file metadata.", + "nullable": true + } + }, + "description": "Uploaded or generated files attached to a turn." + }, + "PublicFileInfo": { + "type": "object", + "required": [ + "file_id" + ], + "properties": { + "file_id": { + "type": "string", + "description": "Unique identifier of the file." + }, + "display_name": { + "type": "string", + "description": "Human-readable file name.", + "nullable": true + }, + "file_type": { + "type": "string", + "description": "File type such as `csv`, `pdf`, or `png`.", + "nullable": true + }, + "created_time_in_millis": { + "type": "object", + "description": "Milliseconds since Unix epoch when the file was created.", + "nullable": true + }, + "size_bytes": { + "type": "integer", + "format": "int32", + "description": "File size in bytes.", + "nullable": true + } + }, + "description": "Sanitized metadata for a file attached to or produced by a conversation turn.\nNever exposes internal Azure or blob-storage identifiers." + }, + "ResourceResponseItem": { + "type": "object", + "required": [ + "type", + "timestamp_in_millis", + "title", + "uri" + ], + "properties": { + "type": { + "type": "string", + "description": "Variant discriminator. Always `\"resource\"`." + }, + "timestamp_in_millis": { + "type": "object", + "description": "Milliseconds since Unix epoch when this item was produced." + }, + "is_thinking": { + "type": "boolean", + "description": "True when the item represents internal agent reasoning rather than user-facing output.", + "nullable": true + }, + "step_title": { + "type": "string", + "description": "Human-readable label for the agent step producing this item.", + "nullable": true + }, + "title": { + "type": "string", + "description": "Human-readable title of the resource." + }, + "uri": { + "type": "string", + "description": "Resource URI." + }, + "name": { + "type": "string", + "description": "Original name or filename.", + "nullable": true + }, + "mime_type": { + "type": "string", + "description": "MIME type.", + "nullable": true + }, + "description": { + "type": "string", + "description": "Short description.", + "nullable": true + }, + "size": { + "type": "integer", + "format": "int32", + "description": "Size in bytes.", + "nullable": true + }, + "connector_id": { + "type": "string", + "description": "Connector instance identifier.", + "nullable": true + }, + "connector_name": { + "type": "string", + "description": "Human-readable connector name.", + "nullable": true + }, + "connector_slug": { + "type": "string", + "description": "Connector slug or type key.", + "nullable": true + }, + "transport_type": { + "type": "string", + "enum": [ + "STREAMABLE_HTTP", + "SSE" + ], + "description": "Underlying transport protocol used by the MCP connector. See `TransportType`\nfor accepted values.", + "nullable": true + } + }, + "description": "MCP (Model Context Protocol) resource — typically a connector-provided artifact\nsuch as a document excerpt." + }, + "TextResponseItem": { + "type": "object", + "required": [ + "type", + "timestamp_in_millis", + "content" + ], + "properties": { + "type": { + "type": "string", + "description": "Variant discriminator. Always `\"text\"`." + }, + "timestamp_in_millis": { + "type": "object", + "description": "Milliseconds since Unix epoch when this item was produced." + }, + "is_thinking": { + "type": "boolean", + "description": "True when the item represents internal agent reasoning rather than user-facing output.", + "nullable": true + }, + "step_title": { + "type": "string", + "description": "Human-readable label for the agent step producing this item.", + "nullable": true + }, + "content": { + "type": "string", + "description": "The text body." + }, + "content_type": { + "type": "string", + "enum": [ + "TEXT_PLAIN", + "TEXT_MARKDOWN", + "TEXT_X_MARKDOWN_WITH_CODE", + "TEXT_HTML" + ], + "description": "Rendering hint for the text content. See `ContentMimeType` for accepted values.", + "nullable": true + }, + "file_reference": { + "$ref": "#/components/schemas/FileReference", + "description": "Pointer to a code-execution-generated file associated with this text item.", + "nullable": true + } + }, + "description": "Agent text output." + }, + "FileReference": { + "type": "object", + "required": [ + "file_id" + ], + "properties": { + "file_id": { + "type": "string", + "description": "Unique identifier of the code-execution-generated file." + }, + "display_name": { + "type": "string", + "description": "Human-readable file name.", + "nullable": true + }, + "created_time_in_millis": { + "type": "object", + "description": "Milliseconds since Unix epoch when the file was created.", + "nullable": true + } + }, + "description": "Pointer to a code-execution-generated file referenced from a text response item.\nFull metadata (including expiry) is in the top-level `code_execution_files` map." + }, + "ToolCallResponseItem": { + "type": "object", + "required": [ + "type", + "timestamp_in_millis", + "arguments" + ], + "properties": { + "type": { + "type": "string", + "description": "Variant discriminator. Always `\"tool_call\"`." + }, + "timestamp_in_millis": { + "type": "object", + "description": "Milliseconds since Unix epoch when this item was produced." + }, + "is_thinking": { + "type": "boolean", + "description": "True when the item represents internal agent reasoning rather than user-facing output.", + "nullable": true + }, + "step_title": { + "type": "string", + "description": "Human-readable label for the agent step producing this item.", + "nullable": true + }, + "tool_call_id": { + "type": "string", + "description": "Identifier linking this tool call to its matching tool_result or answer.", + "nullable": true + }, + "tool_name": { + "type": "string", + "description": "Name of the tool being invoked.", + "nullable": true + }, + "arguments": { + "type": "object", + "description": "Input arguments passed to the tool. Shape depends on the tool." + } + }, + "description": "Agent invoked a tool." + }, + "ToolResultResponseItem": { + "type": "object", + "required": [ + "type", + "timestamp_in_millis", + "content" + ], + "properties": { + "type": { + "type": "string", + "description": "Variant discriminator. Always `\"tool_result\"`." + }, + "timestamp_in_millis": { + "type": "object", + "description": "Milliseconds since Unix epoch when this item was produced." + }, + "is_thinking": { + "type": "boolean", + "description": "True when the item represents internal agent reasoning rather than user-facing output.", + "nullable": true + }, + "step_title": { + "type": "string", + "description": "Human-readable label for the agent step producing this item.", + "nullable": true + }, + "tool_call_id": { + "type": "string", + "description": "Matches the originating tool_call.", + "nullable": true + }, + "tool_name": { + "type": "string", + "description": "Name of the tool that produced this result.", + "nullable": true + }, + "content": { + "type": "string", + "description": "Result body (tool output, or `\": \"` for errors)." + }, + "content_type": { + "type": "string", + "enum": [ + "TEXT_PLAIN", + "TEXT_MARKDOWN", + "TEXT_X_MARKDOWN_WITH_CODE", + "TEXT_HTML" + ], + "description": "Rendering hint for the result content; defaults to `TEXT_PLAIN` for tool\nresults. See `ContentMimeType` for accepted values.", + "nullable": true + }, + "success": { + "type": "boolean", + "description": "False when the tool invocation errored; true otherwise.", + "nullable": true + } + }, + "description": "Result returned from a tool invocation." + }, + "AnswerResponseItem": { + "type": "object", + "required": [ + "type", + "timestamp_in_millis", + "answer_id" + ], + "properties": { + "type": { + "type": "string", + "description": "Variant discriminator. Always `\"answer\"`." + }, + "timestamp_in_millis": { + "type": "object", + "description": "Milliseconds since Unix epoch when this item was produced." + }, + "is_thinking": { + "type": "boolean", + "description": "True when the item represents internal agent reasoning rather than user-facing output.", + "nullable": true + }, + "step_title": { + "type": "string", + "description": "Human-readable label for the agent step producing this item.", + "nullable": true + }, + "answer_id": { + "type": "string", + "description": "Identifier used to fetch the full answer payload separately." + }, + "tool_call_id": { + "type": "string", + "description": "Links to the originating tool_call, when applicable.", + "nullable": true + }, + "tool_name": { + "type": "string", + "description": "Tool that produced the answer, when applicable.", + "nullable": true + } + }, + "description": "Slim reference to a saved answer produced by the agent. Full answer payload\n(visualization spec, formulas, session info) is not embedded — fetch separately\nvia `loadAnswer` using `answer_id`." + }, + "SearchDatasetsResponseItem": { + "type": "object", + "required": [ + "type", + "timestamp_in_millis", + "text" + ], + "properties": { + "type": { + "type": "string", + "description": "Variant discriminator. Always `\"search_datasets\"`." + }, + "timestamp_in_millis": { + "type": "object", + "description": "Milliseconds since Unix epoch when this item was produced." + }, + "is_thinking": { + "type": "boolean", + "description": "True when the item represents internal agent reasoning rather than user-facing output.", + "nullable": true + }, + "step_title": { + "type": "string", + "description": "Human-readable label for the agent step producing this item.", + "nullable": true + }, + "text": { + "type": "string", + "description": "Summary message describing the dataset search results." + }, + "data_sources": { + "type": "array", + "items": { + "$ref": "#/components/schemas/DataSourceInfo" + }, + "description": "Dataset descriptors returned by the `search_datasets` tool.", + "nullable": true + } + }, + "description": "Result of a dataset discovery step." + }, + "DataSourceInfo": { + "type": "object", + "properties": { + "data_source_identifier": { + "type": "string", + "description": "Unique identifier of the data source (mirrors `header.guid`).", + "nullable": true + }, + "data_source_name": { + "type": "string", + "description": "Display name of the data source (mirrors `header.display_name`).", + "nullable": true + }, + "description": { + "type": "string", + "description": "Optional description of the data source.", + "nullable": true + }, + "confidence": { + "type": "number", + "format": "float", + "description": "Tool-reported confidence that this data source matches the query, in `[0, 1]`.", + "nullable": true + }, + "reasoning": { + "type": "string", + "description": "LLM reasoning describing why the data source was selected.", + "nullable": true + }, + "header": { + "$ref": "#/components/schemas/DataSourceHeader", + "description": "Header metadata extracted from the data source proto.", + "nullable": true + }, + "related_liveboard_visualizations": { + "type": "array", + "items": { + "type": "object" + }, + "description": "Related liveboard visualizations for this data source. Open-ended JSON shape\ndriven by the underlying proto.", + "nullable": true + }, + "related_answers": { + "type": "array", + "items": { + "type": "object" + }, + "description": "Related saved answers for this data source. Open-ended JSON shape driven by\nthe underlying proto.", + "nullable": true + }, + "related_spotter_queries": { + "type": "array", + "items": { + "type": "string" + }, + "description": "Related Spotter queries previously run against this data source. Truncated to\na small upper bound by the tool.", + "nullable": true + }, + "popularity": { + "$ref": "#/components/schemas/DataSourcePopularity", + "description": "Aggregate popularity counters.", + "nullable": true + }, + "user_usage": { + "$ref": "#/components/schemas/DataSourceUserUsage", + "description": "Per-user usage counters scoped to the calling user.", + "nullable": true + } + }, + "description": "A data source descriptor returned by the agent's `search_datasets` tool." + }, + "DataSourceHeader": { + "type": "object", + "properties": { + "display_name": { + "type": "string", + "description": "Display name of the data source.", + "nullable": true + }, + "guid": { + "type": "string", + "description": "Canonical unique identifier (GUID) of the data source.", + "nullable": true + }, + "description": { + "type": "string", + "description": "Optional description of the data source.", + "nullable": true + } + }, + "description": "Header metadata extracted from a data source proto. `guid` is the canonical\ndata source identifier and `display_name` is its user-facing name." + }, + "DataSourcePopularity": { + "type": "object", + "properties": { + "total_spotter_queries": { + "type": "integer", + "format": "int32", + "description": "Total number of Spotter natural-language queries run against this data source.", + "nullable": true + }, + "total_answers": { + "type": "integer", + "format": "int32", + "description": "Total number of saved answers backed by this data source.", + "nullable": true + }, + "total_answer_impressions": { + "type": "integer", + "format": "int32", + "description": "Total number of impressions across saved answers backed by this data source.", + "nullable": true + } + }, + "description": "Aggregate popularity counters for a data source." + }, + "DataSourceUserUsage": { + "type": "object", + "properties": { + "total_spotter_queries": { + "type": "integer", + "format": "int32", + "description": "Total Spotter natural-language queries the calling user has run against this\ndata source.", + "nullable": true + } + }, + "description": "Per-user usage counters for a data source, scoped to the calling user." + }, + "CodeExecutionFileMetadata": { + "type": "object", + "required": [ + "file_id", + "expired" + ], + "properties": { + "file_id": { + "type": "string", + "description": "Unique identifier of the code-execution-generated file. Stable across\nconversation turns." + }, + "display_name": { + "type": "string", + "description": "Human-readable file name.", + "nullable": true + }, + "file_type": { + "type": "string", + "description": "File type hint. Either a MIME string (e.g. `text/csv`) or an extension\n(e.g. `csv`).", + "nullable": true + }, + "created_time_in_millis": { + "type": "object", + "description": "Milliseconds since Unix epoch when the file was created.", + "nullable": true + }, + "expired": { + "type": "boolean", + "description": "True when the file is no longer downloadable (storage expired or evicted)." + } + }, + "description": "Sanitized public metadata for a code-execution-generated file. Internal\nstorage identifiers (e.g. Azure blob ids) are deliberately not exposed." + }, + "LoadAnswerResponse": { + "type": "object", + "properties": { + "answer": { + "$ref": "#/components/schemas/AnswerDetails", + "description": "Answer details for the loaded message.", + "nullable": true + } + } + }, + "AnswerDetails": { + "type": "object", + "properties": { + "title": { + "type": "string", + "description": "Display title of the answer.", + "nullable": true + }, + "description": { + "type": "string", + "description": "Description of the answer.", + "nullable": true + }, + "session_identifier": { + "type": "string", + "description": "Unique identifier of the session.", + "nullable": true + }, + "generation_number": { + "type": "integer", + "format": "int32", + "description": "Generation number of the answer.", + "nullable": true + }, + "tokens": { + "type": "array", + "items": { + "type": "string" + }, + "description": "Ordered list of TML token strings that make up the answer query.", + "nullable": true + }, + "visualization_type": { + "type": "string", + "enum": [ + "Chart", + "CHART", + "Table", + "TABLE", + "Undefined", + "UNDEFINED" + ], + "description": "Visualization type for the answer.", + "nullable": true + }, + "formulas": { + "type": "array", + "items": { + "type": "string" + }, + "description": "List of formulas used in the answer.", + "nullable": true + }, + "parameters": { + "type": "array", + "items": { + "type": "string" + }, + "description": "List of parameters used in the answer.", + "nullable": true + }, + "sub_queries": { + "type": "array", + "items": { + "type": "object" + }, + "description": "List of sub-queries used in the answer.", + "nullable": true + }, + "ac_state": { + "$ref": "#/components/schemas/ACState", + "description": "Agent context state for the answer.", + "nullable": true + } + } + }, + "ACState": { + "type": "object", + "properties": { + "transaction_identifier": { + "type": "string", + "description": "Unique identifier of the transaction.", + "nullable": true + }, + "generation_number": { + "type": "integer", + "format": "int32", + "description": "Generation number of the transaction.", + "nullable": true + } + } + }, + "RiseGQLArgWrapper": { + "type": "object", + "required": [ + "name", + "type" + ], + "properties": { + "name": { + "type": "string" + }, + "type": { + "type": "string" + } + } + }, + "VariableDetailInput": { + "type": "object", + "properties": { + "identifier": { + "type": "string", + "description": "Unique ID or name of the variable", + "nullable": true + }, + "type": { + "type": "string", + "enum": [ + "CONNECTION_PROPERTY", + "TABLE_MAPPING", + "CONNECTION_PROPERTY_PER_PRINCIPAL", + "FORMULA_VARIABLE", + "USER_PROPERTY" + ], + "description": "Type of variable", + "nullable": true + }, + "name_pattern": { + "type": "string", + "description": "A pattern to match case-insensitive name of the variable. User % for a wildcard match", + "nullable": true + } + }, + "description": "Input for variable details in search" + }, + "ValueScopeInput": { + "type": "object", + "properties": { + "org_identifier": { + "type": "string", + "description": "The unique name of the org", + "nullable": true + }, + "principal_type": { + "type": "string", + "enum": [ + "USER", + "USER_GROUP" + ], + "description": "Type of principal to filter by. Use USER to filter values assigned to specific users, or USER_GROUP to filter values assigned to groups.", + "nullable": true + }, + "principal_identifier": { + "type": "string", + "description": "Unique ID or name of the principal", + "nullable": true + }, + "model_identifier": { + "type": "string", + "description": "Unique ID or name of the model to filter by. Applicable only for FORMULA_VARIABLE type.", + "nullable": true + } + }, + "description": "Input for filtering variable values by scope in search operations" + }, + "Variable": { + "type": "object", + "required": [ + "id", + "name" + ], + "properties": { + "id": { + "type": "string", + "description": "Unique identifier of the variable" + }, + "name": { + "type": "string", + "description": "Name of the variable" + }, + "variable_type": { + "type": "string", + "enum": [ + "CONNECTION_PROPERTY", + "TABLE_MAPPING", + "CONNECTION_PROPERTY_PER_PRINCIPAL", + "FORMULA_VARIABLE", + "USER_PROPERTY" + ], + "description": "Type of the variable", + "nullable": true + }, + "sensitive": { + "type": "boolean", + "description": "If the variable is sensitive", + "nullable": true + }, + "values": { + "type": "array", + "items": { + "$ref": "#/components/schemas/VariableValue" + }, + "description": "Values of the variable", + "nullable": true + }, + "org": { + "$ref": "#/components/schemas/VariableOrgInfo", + "description": "Owner org of the variable.", + "nullable": true + } + }, + "description": "Variable object" + }, + "VariableValue": { + "type": "object", + "required": [ + "org_identifier" + ], + "properties": { + "value": { + "type": "string", + "description": "The value of the variable", + "nullable": true + }, + "value_list": { + "type": "array", + "items": { + "type": "string" + }, + "description": "The value of the variable if it is a list type", + "nullable": true + }, + "org_identifier": { + "type": "string", + "description": "The unique name of the org" + }, + "principal_type": { + "type": "string", + "enum": [ + "USER", + "USER_GROUP" + ], + "description": "Type of principal to which this value applies. Use USER to assign the value to a specific user, or USER_GROUP to assign it to a group.", + "nullable": true + }, + "principal_identifier": { + "type": "string", + "description": "Unique ID or name of the principal", + "nullable": true + }, + "model_identifier": { + "type": "string", + "description": "Unique ID of the model
Beta Version: 26.3.0.cl or later", + "nullable": true + }, + "priority": { + "type": "integer", + "format": "int32", + "description": "The priority assigned to this value. If there are 2 matching values, the one with the higher priority will be picked.", + "nullable": true + } + } + }, + "VariableOrgInfo": { + "type": "object", + "required": [ + "id", + "name" + ], + "properties": { + "id": { + "type": "integer", + "format": "int32", + "description": "ID of the Org." + }, + "name": { + "type": "string", + "description": "Name of the Org." + } + } + }, + "SortOption": { + "type": "object", + "properties": { + "field_name": { + "type": "string", + "enum": [ + "DEFAULT", + "NAME", + "DISPLAY_NAME", + "AUTHOR", + "CREATED", + "MODIFIED" + ], + "default": "DEFAULT", + "description": "Name of the field to apply the sort on.", + "nullable": true + }, + "order": { + "type": "string", + "enum": [ + "ASC", + "DESC" + ], + "default": "ASC", + "description": "Sort order : ASC(Ascending) or DESC(Descending).", + "nullable": true + } + } + }, + "CalendarResponse": { + "type": "object", + "properties": { + "calendar_name": { + "type": "string", + "description": "Name of the calendar", + "nullable": true + }, + "connection_name": { + "type": "string", + "description": "Name of the connection", + "nullable": true + }, + "data_warehouse_type": { + "type": "string", + "description": "Type of data warehouse", + "nullable": true + }, + "modification_time_in_millis": { + "type": "string", + "description": "Last modification time in milliseconds", + "nullable": true + }, + "author_name": { + "type": "string", + "description": "Name of the author who created the calendar", + "nullable": true + }, + "connection_id": { + "type": "string", + "description": "Unique ID of the connection", + "nullable": true + }, + "calendar_id": { + "type": "string", + "description": "Unique ID of the calendar", + "nullable": true + } + } + }, + "ConnectionConfigurationResponse": { + "type": "object", + "properties": { + "configuration_identifier": { + "type": "string", + "nullable": true + }, + "name": { + "type": "string", + "nullable": true + }, + "description": { + "type": "string", + "nullable": true + }, + "configuration": { + "type": "object", + "nullable": true + }, + "policy_principals": { + "type": "array", + "items": { + "$ref": "#/components/schemas/UserPrincipal" + }, + "nullable": true + }, + "policy_processes": { + "type": "array", + "items": { + "type": "string", + "enum": [ + "SAGE_INDEXING", + "ROW_COUNT_STATS" + ] + }, + "nullable": true + }, + "disabled": { + "type": "boolean", + "nullable": true + }, + "data_warehouse_type": { + "type": "string", + "enum": [ + "SNOWFLAKE", + "AMAZON_REDSHIFT", + "GOOGLE_BIGQUERY", + "AZURE_SYNAPSE", + "TERADATA", + "SAP_HANA", + "STARBURST", + "ORACLE_ADW", + "DATABRICKS", + "DENODO", + "DREMIO", + "TRINO", + "PRESTO", + "POSTGRES", + "SQLSERVER", + "MYSQL", + "GENERIC_JDBC", + "AMAZON_RDS_POSTGRESQL", + "AMAZON_AURORA_POSTGRESQL", + "AMAZON_RDS_MYSQL", + "AMAZON_AURORA_MYSQL", + "LOOKER", + "AMAZON_ATHENA", + "SINGLESTORE", + "GCP_SQLSERVER", + "GCP_ALLOYDB_POSTGRESQL", + "GCP_POSTGRESQL", + "GCP_MYSQL", + "MODE", + "GOOGLE_SHEETS", + "FALCON", + "FALCON_ONPREM", + "CLICKHOUSE", + "IOMETE" + ], + "nullable": true + }, + "policy_type": { + "type": "string", + "enum": [ + "NO_POLICY", + "PRINCIPALS", + "PROCESSES" + ], + "nullable": true + }, + "same_as_parent": { + "type": "boolean", + "nullable": true + }, + "policy_process_options": { + "$ref": "#/components/schemas/PolicyProcessOptions", + "nullable": true + } + } + }, + "UserPrincipal": { + "type": "object", + "properties": { + "id": { + "type": "string", + "nullable": true + }, + "name": { + "type": "string", + "nullable": true + }, + "type": { + "type": "string", + "nullable": true + } + } + }, + "PolicyProcessOptions": { + "type": "object", + "properties": { + "impersonate_user": { + "type": "string", + "nullable": true + } + } + }, + "WebhookStorageConfigInfo": { + "type": "object", + "required": [ + "storage_type", + "provider", + "config" + ], + "properties": { + "storage_type": { + "type": "string", + "enum": [ + "OBJECT_STORAGE" + ], + "description": "Type of storage destination." + }, + "provider": { + "type": "string", + "enum": [ + "AWS_S3", + "GCP_GCS" + ], + "description": "Storage destination provider." + }, + "config": { + "$ref": "#/components/schemas/WebhookStorageSetupConfig", + "description": "Setup configuration specific to the upload path." + } + }, + "description": "Cluster-level storage setup information for configuring customer-managed storage." + }, + "WebhookStorageSetupConfig": { + "type": "object", + "required": [ + "config_type", + "setup_instructions" + ], + "properties": { + "config_type": { + "type": "string", + "enum": [ + "AWS_TO_S3_STORAGE", + "GCP_TO_S3_STORAGE", + "GCP_TO_GCS_STORAGE" + ], + "description": "Discriminator identifying the upload path. One of: AWS_TO_S3_STORAGE, GCP_TO_S3_STORAGE, GCP_TO_GCS_STORAGE." + }, + "aws_account_id": { + "type": "string", + "description": "AWS Account ID of the platform. Populated for AWS_TO_S3_STORAGE. Include in your IAM role trust policy.", + "nullable": true + }, + "gcp_service_account_id": { + "type": "string", + "description": "GCP service account numeric ID of the platform (the 'sub' claim in OIDC tokens). Populated for GCP_TO_S3_STORAGE.", + "nullable": true + }, + "oidc_provider": { + "type": "string", + "description": "OIDC identity provider URL. Populated for GCP_TO_S3_STORAGE; always 'accounts.google.com' for GCP.", + "nullable": true + }, + "trust_policy_template": { + "type": "object", + "description": "Sample IAM trust policy JSON. Populated for AWS_TO_S3_STORAGE and GCP_TO_S3_STORAGE.", + "nullable": true + }, + "service_account_email": { + "type": "string", + "description": "GCP service account email of the platform. Populated for GCP_TO_GCS_STORAGE. Grant it roles/iam.serviceAccountTokenCreator on your service account.", + "nullable": true + }, + "required_role": { + "type": "string", + "description": "IAM role the customer must grant to the platform service account. Populated for GCP_TO_GCS_STORAGE.", + "nullable": true + }, + "setup_instructions": { + "type": "array", + "items": { + "type": "string" + }, + "description": "Step-by-step instructions to configure the storage destination." + } + }, + "description": "Storage setup configuration for a specific upload path. The populated fields depend on config_type:\nAWS_TO_S3_STORAGE: aws_account_id, trust_policy_template, setup_instructions.\nGCP_TO_S3_STORAGE: gcp_service_account_id, oidc_provider, trust_policy_template, setup_instructions.\nGCP_TO_GCS_STORAGE: service_account_email, required_role, setup_instructions." + }, + "WebhookSortOptionsInput": { + "type": "object", + "properties": { + "field_name": { + "type": "string", + "enum": [ + "CREATED", + "MODIFIED", + "NAME" + ], + "default": "CREATED", + "description": "Name of the field to apply the sort on.", + "nullable": true + }, + "order": { + "type": "string", + "enum": [ + "ASC", + "DESC" + ], + "default": "DESC", + "description": "Sort order: ASC (Ascending) or DESC (Descending).", + "nullable": true + } + } + }, + "WebhookSearchResponse": { + "type": "object", + "required": [ + "webhooks", + "pagination" + ], + "properties": { + "webhooks": { + "type": "array", + "items": { + "$ref": "#/components/schemas/WebhookResponse" + }, + "description": "List of webhook configurations matching the search criteria." + }, + "pagination": { + "$ref": "#/components/schemas/WebhookPagination", + "description": "Pagination information." + } + } + }, + "WebhookResponse": { + "type": "object", + "required": [ + "id", + "name", + "url", + "events", + "creation_time_in_millis", + "modification_time_in_millis" + ], + "properties": { + "id": { + "type": "string", + "description": "Unique identifier of the webhook configuration." + }, + "name": { + "type": "string", + "description": "Name of the webhook configuration." + }, + "description": { + "type": "string", + "description": "Description of the webhook configuration.", + "nullable": true + }, + "org": { + "$ref": "#/components/schemas/WebhookOrg", + "description": "Org details.", + "nullable": true + }, + "url": { + "type": "string", + "description": "The webhook endpoint URL." + }, + "url_params": { + "type": "object", + "description": "Additional URL parameters as key-value pairs.", + "nullable": true + }, + "events": { + "type": "array", + "items": { + "type": "string", + "enum": [ + "LIVEBOARD_SCHEDULE" + ] + }, + "description": "List of events this webhook subscribes to." + }, + "authentication": { + "$ref": "#/components/schemas/WebhookAuthentication", + "description": "Redacted authorization configuration for the webhook.", + "nullable": true + }, + "signature_verification": { + "$ref": "#/components/schemas/WebhookSignatureVerification", + "description": "Redacted configuration for webhook signature verification.", + "nullable": true + }, + "additional_headers": { + "type": "array", + "items": { + "$ref": "#/components/schemas/WebhookKeyValuePair" + }, + "description": "Additional headers as an array of key-value pairs.
Version: 26.4.0.cl or later", + "nullable": true + }, + "creation_time_in_millis": { + "type": "number", + "format": "float", + "description": "Creation time of the webhook configuration in milliseconds." + }, + "modification_time_in_millis": { + "type": "number", + "format": "float", + "description": "Last modified time of the webhook configuration in milliseconds." + }, + "created_by": { + "$ref": "#/components/schemas/WebhookUser", + "description": "User who created the webhook.", + "nullable": true + }, + "last_modified_by": { + "$ref": "#/components/schemas/WebhookUser", + "description": "User who last modified the webhook.", + "nullable": true + }, + "storage_destination": { + "$ref": "#/components/schemas/StorageDestination", + "description": "Storage destination configuration for webhook payload delivery.", + "nullable": true + }, + "status": { + "type": "string", + "enum": [ + "ENABLED", + "DISABLED" + ], + "description": "Status of the webhook (ENABLED or DISABLED).\nOnly present when explicitly set.
Version: 26.7.0.cl or later", + "nullable": true + } + } + }, + "WebhookOrg": { + "type": "object", + "required": [ + "id", + "name" + ], + "properties": { + "id": { + "type": "string", + "description": "Unique identifier of the org." + }, + "name": { + "type": "string", + "description": "Name of the org." + } + } + }, + "WebhookAuthentication": { + "type": "object", + "properties": { + "API_KEY": { + "$ref": "#/components/schemas/WebhookAuthApiKey", + "description": "Redacted API key authentication configuration.", + "nullable": true + }, + "BASIC_AUTH": { + "$ref": "#/components/schemas/WebhookAuthBasicAuth", + "description": "Redacted Basic authentication configuration.", + "nullable": true + }, + "BEARER_TOKEN": { + "type": "string", + "description": "Redacted Bearer token authentication configuration.", + "nullable": true + }, + "OAUTH2": { + "$ref": "#/components/schemas/WebhookAuthOAuth2", + "description": "Redacted OAuth2 authentication configuration.", + "nullable": true + } + } + }, + "WebhookAuthApiKey": { + "type": "object", + "required": [ + "key", + "value" + ], + "properties": { + "key": { + "type": "string", + "description": "The header or query parameter name for the API key." + }, + "value": { + "type": "string", + "description": "The API key value." + } + } + }, + "WebhookAuthBasicAuth": { + "type": "object", + "required": [ + "username", + "password" + ], + "properties": { + "username": { + "type": "string", + "description": "Username for basic authentication." + }, + "password": { + "type": "string", + "description": "Password for basic authentication." + } + } + }, + "WebhookAuthOAuth2": { + "type": "object", + "required": [ + "authorization_url", + "client_id", + "client_secret" + ], + "properties": { + "authorization_url": { + "type": "string", + "description": "OAuth2 authorization server URL." + }, + "client_id": { + "type": "string", + "description": "OAuth2 client identifier." + }, + "client_secret": { + "type": "string", + "description": "OAuth2 client secret key." + } + } + }, + "WebhookSignatureVerification": { + "type": "object", + "required": [ + "type", + "header", + "algorithm", + "secret" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "HMAC_SHA256" + ], + "description": "Signature verification method type." + }, + "header": { + "type": "string", + "description": "HTTP header where the signature is sent." + }, + "algorithm": { + "type": "string", + "enum": [ + "SHA256" + ], + "description": "Hash algorithm used for signature verification." + }, + "secret": { + "type": "string", + "description": "Shared secret used for HMAC signature generation." + } + } + }, + "WebhookKeyValuePair": { + "type": "object", + "required": [ + "key", + "value" + ], + "properties": { + "key": { + "type": "string", + "description": "Header name." + }, + "value": { + "type": "string", + "description": "Header value." + } + }, + "description": "Key-value pair for additional webhook headers." + }, + "WebhookUser": { + "type": "object", + "required": [ + "id", + "name" + ], + "properties": { + "id": { + "type": "string", + "description": "Unique identifier of the user." + }, + "name": { + "type": "string", + "description": "Name of the user." + } + } + }, + "StorageDestination": { + "type": "object", + "required": [ + "storage_type", + "storage_config" + ], + "properties": { + "storage_type": { + "type": "string", + "enum": [ + "AWS_S3", + "GCP_GCS" + ], + "description": "Type of storage destination (e.g., AWS_S3)." + }, + "storage_config": { + "$ref": "#/components/schemas/StorageConfig", + "description": "Storage-specific configuration settings." + } + }, + "description": "Storage destination configuration for webhook payload delivery." + }, + "StorageConfig": { + "type": "object", + "properties": { + "aws_s3_config": { + "$ref": "#/components/schemas/AwsS3Config", + "description": "AWS S3 storage configuration.", + "nullable": true + }, + "gcp_gcs_config": { + "$ref": "#/components/schemas/GcpGcsConfig", + "description": "GCP GCS storage configuration.
Version: 26.7.0.cl or later", + "nullable": true + } + }, + "description": "Storage configuration containing provider-specific settings." + }, + "AwsS3Config": { + "type": "object", + "required": [ + "bucket_name", + "region", + "role_arn" + ], + "properties": { + "bucket_name": { + "type": "string", + "description": "Name of the S3 bucket where webhook payloads are stored." + }, + "region": { + "type": "string", + "description": "AWS region where the S3 bucket is located." + }, + "role_arn": { + "type": "string", + "description": "ARN of the IAM role used for S3 access." + }, + "external_id": { + "type": "string", + "description": "External ID for secure cross-account role assumption.", + "nullable": true + }, + "path_prefix": { + "type": "string", + "description": "Path prefix for organizing objects within the bucket.", + "nullable": true + } + }, + "description": "AWS S3 storage configuration details." + }, + "GcpGcsConfig": { + "type": "object", + "required": [ + "bucket_name", + "service_account_email" + ], + "properties": { + "bucket_name": { + "type": "string", + "description": "Name of the GCS bucket where webhook payloads are stored." + }, + "service_account_email": { + "type": "string", + "description": "Email of the GCP service account to impersonate for bucket access." + }, + "path_prefix": { + "type": "string", + "description": "Path prefix for organizing objects within the bucket.", + "nullable": true + } + }, + "description": "GCP GCS storage configuration details." + }, + "WebhookPagination": { + "type": "object", + "required": [ + "record_offset", + "record_size", + "total_count", + "has_more" + ], + "properties": { + "record_offset": { + "type": "integer", + "format": "int32", + "description": "The starting record number from where the records are included." + }, + "record_size": { + "type": "integer", + "format": "int32", + "description": "The number of records included in the response." + }, + "total_count": { + "type": "integer", + "format": "int32", + "description": "Total number of webhook configurations available." + }, + "has_more": { + "type": "boolean", + "description": "Indicates whether more records are available beyond the current response." + } + } + }, + "CollectionSearchResponse": { + "type": "object", + "required": [ + "collections" + ], + "properties": { + "collections": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Collection" + }, + "description": "List of collections matching the search criteria." + }, + "record_offset": { + "type": "integer", + "format": "int32", + "description": "The starting record number from where the records are included.", + "nullable": true + }, + "record_size": { + "type": "integer", + "format": "int32", + "description": "The number of records returned.", + "nullable": true + }, + "is_last_batch": { + "type": "boolean", + "description": "Indicates if this is the last batch of results.", + "nullable": true + }, + "count": { + "type": "integer", + "format": "int32", + "description": "Total count of records returned.", + "nullable": true + } + }, + "description": "Response object for search collections operation." + }, + "Collection": { + "type": "object", + "required": [ + "id", + "name" + ], + "properties": { + "id": { + "type": "string", + "description": "Unique identifier of the collection." + }, + "name": { + "type": "string", + "description": "Name of the collection." + }, + "description": { + "type": "string", + "description": "Description of the collection.", + "nullable": true + }, + "metadata": { + "type": "array", + "items": { + "$ref": "#/components/schemas/CollectionMetadataItem" + }, + "description": "Metadata objects in the collection.", + "nullable": true + }, + "created_at": { + "type": "string", + "description": "Creation timestamp in milliseconds.", + "nullable": true + }, + "updated_at": { + "type": "string", + "description": "Last updated timestamp in milliseconds.", + "nullable": true + }, + "author_name": { + "type": "string", + "description": "Name of the author who created the collection.", + "nullable": true + }, + "author_id": { + "type": "string", + "description": "Unique identifier of the author.", + "nullable": true + }, + "org": { + "$ref": "#/components/schemas/CollectionEntityIdentifier", + "description": "Org associated with the collection.", + "nullable": true + } + }, + "description": "Response object for a collection." + }, + "CollectionMetadataItem": { + "type": "object", + "properties": { + "type": { + "type": "string", + "description": "Type of the metadata object.", + "nullable": true + }, + "identifiers": { + "type": "array", + "items": { + "$ref": "#/components/schemas/CollectionEntityIdentifier" + }, + "description": "List of identifiers for this metadata type.", + "nullable": true + } + }, + "description": "Metadata item in a collection response." + }, + "CollectionEntityIdentifier": { + "type": "object", + "properties": { + "identifier": { + "type": "string", + "description": "Unique identifier of the entity.", + "nullable": true + }, + "name": { + "type": "string", + "description": "Name of the entity.", + "nullable": true + } + }, + "description": "Entity identifier with name." + }, + "ChannelHistoryEventInput": { + "type": "object", + "required": [ + "type" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "LIVEBOARD_SCHEDULE" + ], + "description": "Type of the event." + }, + "identifier": { + "type": "string", + "description": "Unique ID or name of the event.", + "nullable": true + } + }, + "description": "Event specification for channel history search." + }, + "SearchChannelHistoryResponse": { + "type": "object", + "required": [ + "jobs" + ], + "properties": { + "jobs": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ChannelHistoryJob" + }, + "description": "List of job execution records." + } + }, + "description": "Response wrapper for channel delivery history." + }, + "ChannelHistoryJob": { + "type": "object", + "required": [ + "id", + "status", + "creation_time_in_millis" + ], + "properties": { + "id": { + "type": "string", + "description": "Unique identifier for this job." + }, + "status": { + "type": "string", + "enum": [ + "PENDING", + "RETRY", + "SUCCESS", + "FAILED" + ], + "description": "Delivery status of this job." + }, + "creation_time_in_millis": { + "type": "number", + "format": "float", + "description": "Timestamp when this job was created (epoch milliseconds)." + }, + "event": { + "$ref": "#/components/schemas/ChannelHistoryEventInfo", + "description": "Event metadata for the triggering event associated with this job.", + "nullable": true + }, + "recipients": { + "type": "array", + "items": { + "$ref": "#/components/schemas/JobRecipient" + }, + "description": "The users, groups or external recipients for this job.", + "nullable": true + }, + "detail": { + "type": "string", + "description": "Additional delivery details such as HTTP response code or error message.", + "nullable": true + }, + "try_count": { + "type": "integer", + "format": "int32", + "description": "Number of attempts made. 1 indicates first attempt.", + "nullable": true + } + }, + "description": "A single job execution record for a channel." + }, + "ChannelHistoryEventInfo": { + "type": "object", + "required": [ + "type", + "id" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "LIVEBOARD_SCHEDULE" + ], + "description": "Type of the event." + }, + "id": { + "type": "string", + "description": "Unique ID of the event." + }, + "name": { + "type": "string", + "description": "Name of the event.", + "nullable": true + }, + "run_id": { + "type": "string", + "description": "Unique run ID for this event execution.", + "nullable": true + } + }, + "description": "Event metadata for the triggering event associated with a job." + }, + "JobRecipient": { + "type": "object", + "required": [ + "type" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "USER", + "EXTERNAL" + ], + "description": "Type of the recipient." + }, + "id": { + "type": "string", + "description": "Unique ID of the recipient.", + "nullable": true + }, + "name": { + "type": "string", + "description": "Name of the recipient.", + "nullable": true + }, + "email": { + "type": "string", + "description": "Email of the recipient.", + "nullable": true + } + }, + "description": "A recipient (user, group, or external) for a job execution." + }, + "StylePreference": { + "type": "object", + "properties": { + "scope": { + "type": "string", + "enum": [ + "CLUSTER", + "ORG" + ], + "description": "Scope at which these style preferences apply.", + "nullable": true + }, + "org": { + "$ref": "#/components/schemas/StyleOrgInfo", + "description": "Org associated with these preferences. Present only when scope is ORG.", + "nullable": true + }, + "navigation_panel": { + "$ref": "#/components/schemas/StyleNavigationPanel", + "description": "Navigation panel color configuration.", + "nullable": true + }, + "chart_color_palette": { + "$ref": "#/components/schemas/StyleChartColorPalette", + "description": "Chart color palette configuration.", + "nullable": true + }, + "embedded_footer_text": { + "$ref": "#/components/schemas/StyleEmbeddedFooterText", + "description": "Embedded footer text configuration.", + "nullable": true + }, + "logo": { + "$ref": "#/components/schemas/StyleLogoStatus", + "description": "Logo status per slot.", + "nullable": true + }, + "visualization_fonts": { + "$ref": "#/components/schemas/StyleVisualizationFonts", + "description": "Effective font assignments per visualization area.", + "nullable": true + } + }, + "description": "Style preferences for a single scope entry." + }, + "StyleOrgInfo": { + "type": "object", + "properties": { + "id": { + "type": "integer", + "format": "int32", + "description": "Unique integer ID of the org.", + "nullable": true + }, + "name": { + "type": "string", + "description": "Name of the org.", + "nullable": true + } + }, + "description": "Org information returned in style API responses." + }, + "StyleNavigationPanel": { + "type": "object", + "properties": { + "theme": { + "type": "string", + "enum": [ + "DARK", + "TWO_TONE", + "CUSTOM" + ], + "description": "Navigation panel color mode.", + "nullable": true + }, + "base_color": { + "type": "string", + "description": "Base color as a 6-digit hex string. Present only when theme is CUSTOM.", + "nullable": true + }, + "is_overridden": { + "type": "boolean", + "description": "True if explicitly set at this scope, overriding any inherited value.", + "nullable": true + } + }, + "description": "Navigation panel color configuration for a specific scope." + }, + "StyleChartColorPalette": { + "type": "object", + "properties": { + "colors": { + "type": "array", + "items": { + "$ref": "#/components/schemas/StyleColorEntry" + }, + "description": "Ordered array of 8 color entries.", + "nullable": true + }, + "disable_color_rotation": { + "type": "boolean", + "description": "When true, automatic color rotation across chart data series is disabled.", + "nullable": true + }, + "is_overridden": { + "type": "boolean", + "description": "True if explicitly set at this scope, overriding any inherited value.", + "nullable": true + } + }, + "description": "Chart color palette configuration for a specific scope." + }, + "StyleColorEntry": { + "type": "object", + "properties": { + "primary": { + "type": "string", + "description": "Primary color as a 6-digit hex string.", + "nullable": true + }, + "secondary": { + "type": "array", + "items": { + "type": "string" + }, + "description": "Array of 4 secondary shade hex strings.", + "nullable": true + } + }, + "description": "A single color entry in the chart color palette." + }, + "StyleEmbeddedFooterText": { + "type": "object", + "properties": { + "value": { + "type": "string", + "description": "Footer text value. Empty string indicates no footer is set.", + "nullable": true + }, + "is_overridden": { + "type": "boolean", + "description": "True if explicitly set at this scope, overriding any inherited value.", + "nullable": true + } + }, + "description": "Embedded footer text configuration for a specific scope." + }, + "StyleLogoStatus": { + "type": "object", + "properties": { + "default_logo": { + "$ref": "#/components/schemas/StyleLogoSlot", + "description": "Status of the DEFAULT logo slot (square app icon and favicon; recommended\n140x140 px).", + "nullable": true + }, + "wide_logo": { + "$ref": "#/components/schemas/StyleLogoSlot", + "description": "Status of the WIDE logo slot (horizontal top nav bar logo; recommended\n230x45 px).", + "nullable": true + } + }, + "description": "Logo status per slot." + }, + "StyleLogoSlot": { + "type": "object", + "properties": { + "id": { + "type": "string", + "description": "UUID of the active logo.", + "nullable": true + }, + "is_overridden": { + "type": "boolean", + "description": "True if a custom logo is uploaded at this scope. False if the system\ndefault or cluster logo is active.", + "nullable": true + } + }, + "description": "Status of a single logo slot." + }, + "StyleVisualizationFonts": { + "type": "object", + "properties": { + "chart_visualization_fonts": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ChartVisualizationFontRecord" + }, + "description": "Font assignments for chart visualization areas.", + "nullable": true + }, + "table_visualization_fonts": { + "type": "array", + "items": { + "$ref": "#/components/schemas/TableVisualizationFontRecord" + }, + "description": "Font assignments for table visualization areas.", + "nullable": true + }, + "advanced_chart_visualization_fonts": { + "type": "array", + "items": { + "$ref": "#/components/schemas/AdvancedChartVisualizationFontRecord" + }, + "description": "Font assignments for advanced chart visualization areas.
Version: 26.7.0.cl or later", + "nullable": true + } + }, + "description": "Effective font assignments per visualization type." + }, + "ChartVisualizationFontRecord": { + "type": "object", + "properties": { + "visualization_area": { + "type": "string", + "enum": [ + "CHART_X_AXIS_LABELS", + "CHART_X_AXIS_TITLE", + "CHART_Y_AXIS_LABELS", + "CHART_Y_AXIS_TITLE", + "CHART_TOOLTIP", + "CHART_SCATTER_DATA_LABELS", + "CHART_DONUT_DATA_LABELS", + "CHART_LINE_DATA_LABELS", + "CHART_COLUMN_DATA_LABELS", + "CHART_BAR_DATA_LABELS", + "CHART_AREA_DATA_LABELS" + ], + "description": "Chart visualization area.", + "nullable": true + }, + "font_id": { + "type": "string", + "description": "UUID of the font assigned to this area. Null when the system default font\nis active.", + "nullable": true + }, + "font_name": { + "type": "string", + "description": "Display name of the font assigned to this area. Null when the system\ndefault font is active.", + "nullable": true + }, + "is_overridden": { + "type": "boolean", + "description": "True if explicitly set at this scope, overriding any inherited value.", + "nullable": true + } + }, + "description": "Font assignment for a chart visualization area in the response." + }, + "TableVisualizationFontRecord": { + "type": "object", + "properties": { + "visualization_area": { + "type": "string", + "enum": [ + "TABLE_VALUE_CELLS" + ], + "description": "Table visualization area.", + "nullable": true + }, + "font_id": { + "type": "string", + "description": "UUID of the font assigned to this area. Null when the system default font\nis active.", + "nullable": true + }, + "font_name": { + "type": "string", + "description": "Display name of the font assigned to this area. Null when the system\ndefault font is active.", + "nullable": true + }, + "is_overridden": { + "type": "boolean", + "description": "True if explicitly set at this scope, overriding any inherited value.", + "nullable": true + } + }, + "description": "Font assignment for a table visualization area in the response." + }, + "AdvancedChartVisualizationFontRecord": { + "type": "object", + "properties": { + "visualization_area": { + "type": "string", + "enum": [ + "ADVANCED_CHART_LABELS" + ], + "description": "Advanced chart visualization area.", + "nullable": true + }, + "font_id": { + "type": "string", + "description": "UUID of the font assigned to this area. Null when the system default font\nis active.", + "nullable": true + }, + "font_name": { + "type": "string", + "description": "Display name of the font assigned to this area. Null when the system\ndefault font is active.", + "nullable": true + }, + "is_overridden": { + "type": "boolean", + "description": "True if explicitly set at this scope, overriding any inherited value.", + "nullable": true + } + }, + "description": "Font assignment for an advanced chart visualization area in the response." + }, + "StyleFontRecord": { + "type": "object", + "required": [ + "id", + "name" + ], + "properties": { + "id": { + "type": "string", + "description": "Unique UUID identifier of the font." + }, + "scope": { + "type": "string", + "enum": [ + "CLUSTER", + "ORG" + ], + "description": "Scope indicating whether this font belongs to the cluster or org library.", + "nullable": true + }, + "org": { + "$ref": "#/components/schemas/StyleOrgInfo", + "description": "Org associated with this font. Present only when scope is ORG.", + "nullable": true + }, + "name": { + "type": "string", + "description": "Display name of the font." + }, + "weight": { + "type": "string", + "enum": [ + "NORMAL", + "LIGHT", + "BOLD" + ], + "description": "Weight of the font.", + "nullable": true + }, + "style": { + "type": "string", + "enum": [ + "NORMAL", + "ITALIC", + "OBLIQUE" + ], + "description": "Style of the font.", + "nullable": true + }, + "color": { + "type": "string", + "description": "Color of the font as a 6-digit hex string.", + "nullable": true + }, + "creation_time_in_millis": { + "type": "number", + "format": "float", + "description": "Timestamp in milliseconds when the font was uploaded.", + "nullable": true + }, + "assignments": { + "type": "array", + "items": { + "$ref": "#/components/schemas/StyleFontAssignment" + }, + "description": "Visualization areas currently assigned to this font. Empty if not assigned\nto any area. Populated only when include_font_assignments is true.", + "nullable": true + } + }, + "description": "A custom font record in the font library." + }, + "StyleFontAssignment": { + "type": "object", + "properties": { + "org": { + "$ref": "#/components/schemas/StyleOrgInfo", + "description": "Org context for this assignment. Present only when scope is ORG.", + "nullable": true + }, + "visualization_areas": { + "type": "array", + "items": { + "type": "string", + "enum": [ + "CHART_X_AXIS_LABELS", + "CHART_X_AXIS_TITLE", + "CHART_Y_AXIS_LABELS", + "CHART_Y_AXIS_TITLE", + "CHART_TOOLTIP", + "CHART_SCATTER_DATA_LABELS", + "CHART_DONUT_DATA_LABELS", + "CHART_LINE_DATA_LABELS", + "CHART_COLUMN_DATA_LABELS", + "CHART_BAR_DATA_LABELS", + "CHART_AREA_DATA_LABELS", + "TABLE_VALUE_CELLS", + "ADVANCED_CHART_LABELS" + ] + }, + "description": "Visualization areas using this font.", + "nullable": true + } + }, + "description": "Visualization areas assigned to a font, grouped by org context." + }, + "GenericInfo": { + "type": "object", + "properties": { + "id": { + "type": "string", + "nullable": true + }, + "name": { + "type": "string", + "nullable": true + } + } + }, + "UserGroup": { + "type": "object", + "properties": { + "id": { + "type": "string", + "nullable": true + }, + "name": { + "type": "string", + "nullable": true + } + } + }, + "JWT_User_Options": { + "type": "object", + "properties": { + "parameters": { + "items": { + "anyOf": [ + { + "$ref": "#/components/schemas/Runtime_Filter" + }, + { + "$ref": "#/components/schemas/Runtime_Sort" + }, + { + "$ref": "#/components/schemas/Runtime_Param_Override" + } + ] + } + }, + "metadata": { + "type": "array", + "items": { + "$ref": "#/components/schemas/JWT_Metadata_Object" + }, + "nullable": true + } + }, + "description": "JWT user options to create a JWT token given the payload.\n\n\n*Deprecated in 9.12.0.cl. Use user_parameters instead.*" + }, + "JWT_Parameter": { + "type": "object", + "properties": { + "runtime_filter": { + "type": "object", + "description": "Runtime filter parameter type in JWT.", + "nullable": true + }, + "runtime_sort": { + "type": "object", + "description": "Runtime sort parameter type in JWT.", + "nullable": true + }, + "runtime_param_override": { + "type": "object", + "description": "Runtime param override type in JWT.", + "nullable": true + } + }, + "description": "List of runtime parameters need to set during the session." + }, + "JWT_Metadata_Object": { + "type": "object", + "properties": { + "identifier": { + "type": "string", + "nullable": true + }, + "type": { + "type": "string", + "enum": [ + "LOGICAL_TABLE" + ], + "nullable": true + } + }, + "description": "Metadata objects." + }, + "User_Parameter_Options": { + "type": "object", + "properties": { + "objects": { + "type": "array", + "items": { + "$ref": "#/components/schemas/User_Object" + }, + "nullable": true + }, + "runtime_filters": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Runtime_Filters" + }, + "description": "Objects to apply the User_Runtime_Filters.\n\nExamples to set the `runtime_filters` :\n```json\n{ \"column_name\": \"Color\", \"operator\": \"EQ\", \"values\": [\"red\"], \"persist\": false }\n```", + "nullable": true + }, + "runtime_sorts": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Runtime_Sorts" + }, + "description": "Objects to apply the User_Runtime_Sorts.\n\nExamples to set the `runtime_sorts` :\n```json\n{ \"column_name\": \"Color\", \"order\": \"ASC\", \"persist\": false }\n```", + "nullable": true + }, + "parameters": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Runtime_Parameters" + }, + "description": "Objects to apply the Runtime_Parameters.\n\nExamples to set the `parameters` :\n```json\n{ \"name\": \"Color\", \"values\": [\"Blue\"], \"persist\": false }\n```", + "nullable": true + } + }, + "description": "Define attributes such as Runtime filters and Runtime parameters to send security entitlements to a user session. For more information, see [Documentation](https://developers.thoughtspot.com/docs/abac-user-parameters).\n" + }, + "User_Object": { + "type": "object", + "required": [ + "identifier" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "LOGICAL_TABLE" + ], + "description": " Type of object.\n \n\nRequired if the name of the object is set as the identifier. This attribute is optional when the object GUID is specified as the identifier.\n \n\n Specify the object type as `LOGICAL_TABLE`.", + "nullable": true + }, + "identifier": { + "type": "string", + "description": "Unique name/id of the object." + } + }, + "description": "Objects to apply the User_Object." + }, + "Runtime_Filters": { + "type": "object", + "required": [ + "column_name", + "values", + "operator" + ], + "properties": { + "column_name": { + "type": "string", + "description": "The column name to apply filter." + }, + "values": { + "type": "array", + "items": { + "type": "string" + }, + "description": "Value of the filters." + }, + "operator": { + "type": "string", + "enum": [ + "EQ", + "NE", + "LT", + "LE", + "GT", + "GE", + "IN", + "BW", + "CONTAINS", + "BEGINS_WITH", + "ENDS_WITH", + "BW_INC", + "BW_INC_MIN", + "BW_INC_MAX", + "LIKE", + "NOT_IN" + ], + "description": "Operator value. Example: EQ" + }, + "persist": { + "type": "boolean", + "default": false, + "description": "Flag to persist the runtime filters.
Version: 9.12.0.cl or later", + "nullable": true + }, + "objects": { + "type": "array", + "items": { + "$ref": "#/components/schemas/User_Object" + }, + "description": "Object to apply the runtime filter.", + "nullable": true + } + }, + "description": "Objects to apply the Runtime_Filters." + }, + "Runtime_Sorts": { + "type": "object", + "properties": { + "column_name": { + "type": "string", + "description": "The column name to apply filter.", + "nullable": true + }, + "order": { + "type": "string", + "enum": [ + "ASC", + "DESC" + ], + "description": "Order for the sort.", + "nullable": true + }, + "persist": { + "type": "boolean", + "default": false, + "description": "Flag to persist the runtime sorts.
Version: 9.12.0.cl or later", + "nullable": true + }, + "objects": { + "type": "array", + "items": { + "$ref": "#/components/schemas/User_Object" + }, + "description": "Object to apply the runtime sort.", + "nullable": true + } + }, + "description": "Objects to apply the Runtime_Sorts." + }, + "Runtime_Parameters": { + "type": "object", + "required": [ + "name", + "values" + ], + "properties": { + "name": { + "type": "string", + "description": "The name of the parameter." + }, + "values": { + "type": "array", + "items": { + "type": "string" + }, + "description": "The array of values." + }, + "persist": { + "type": "boolean", + "default": false, + "description": "Flag to persist the parameters.
Version: 9.12.0.cl or later", + "nullable": true + }, + "objects": { + "type": "array", + "items": { + "$ref": "#/components/schemas/User_Object" + }, + "description": "Object to apply the runtime parameter.", + "nullable": true + } + }, + "description": "Objects to apply the Runtime_Parameters." + }, + "Token": { + "type": "object", + "required": [ + "token", + "creation_time_in_millis", + "expiration_time_in_millis", + "scope", + "valid_for_user_id", + "valid_for_username" + ], + "properties": { + "token": { + "type": "string", + "description": "Bearer auth token." + }, + "creation_time_in_millis": { + "type": "number", + "format": "float", + "description": "Token creation time in milliseconds." + }, + "expiration_time_in_millis": { + "type": "number", + "format": "float", + "description": "Token expiration time in milliseconds." + }, + "scope": { + "$ref": "#/components/schemas/Scope", + "description": "Token access scope details" + }, + "valid_for_user_id": { + "type": "string", + "description": "Username to whom the token is issued." + }, + "valid_for_username": { + "type": "string", + "description": "Unique identifier of the user to whom the token is issued." + } + } + }, + "Scope": { + "type": "object", + "required": [ + "access_type" + ], + "properties": { + "access_type": { + "type": "string", + "description": "Object access scope type." + }, + "org_id": { + "type": "integer", + "format": "int32", + "description": "Unique identifier of the metadata.", + "nullable": true + }, + "metadata_id": { + "type": "string", + "description": "Unique identifier of the Org.", + "nullable": true + } + } + }, + "JWT_User_Options_Full": { + "type": "object", + "properties": { + "parameters": { + "type": "array", + "items": { + "$ref": "#/components/schemas/JWT_Parameter" + }, + "nullable": true + } + }, + "description": "JWT user options to create a JWT token given the payload.\n\n\n*Deprecated in 9.12.0.cl. Use user_parameters instead.*" + }, + "TokenValidationResponse": { + "type": "object", + "required": [ + "creation_time_in_millis", + "expiration_time_in_millis", + "scope", + "valid_for_user_id", + "token_type" + ], + "properties": { + "creation_time_in_millis": { + "type": "number", + "format": "float", + "description": "Token creation time in milliseconds." + }, + "expiration_time_in_millis": { + "type": "number", + "format": "float", + "description": "Token expiration time in milliseconds." + }, + "scope": { + "$ref": "#/components/schemas/Scope", + "description": "Token access scope details" + }, + "valid_for_user_id": { + "type": "string", + "description": "Username to whom the token is issued." + }, + "token_type": { + "type": "string", + "description": "Type of token." + } + } + }, + "FilterRules": { + "type": "object", + "required": [ + "column_name", + "operator", + "values" + ], + "properties": { + "column_name": { + "type": "string", + "description": "The name of the column to apply the filter on." + }, + "operator": { + "type": "string", + "enum": [ + "EQ", + "NE", + "LT", + "LE", + "GT", + "GE", + "IN", + "BW", + "CONTAINS", + "BEGINS_WITH", + "ENDS_WITH", + "BW_INC", + "BW_INC_MIN", + "BW_INC_MAX", + "LIKE", + "NOT_IN" + ], + "description": "The operator to use for filtering. Example: EQ (equals), GT(greater than), etc." + }, + "values": { + "type": "array", + "items": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "boolean" + }, + { + "type": "number" + } + ] + }, + "description": "The values to filter on. To get all records, use TS_WILDCARD_ALL as values." + } + }, + "description": "Filter Rules to be applied on Objects." + }, + "ParameterValues": { + "type": "object", + "required": [ + "name", + "values" + ], + "properties": { + "name": { + "type": "string", + "description": "The name of the column to apply the filter on." + }, + "values": { + "type": "array", + "items": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "boolean" + }, + { + "type": "number" + } + ] + }, + "description": "The values to filter on. Only single value is supported currently." + } + }, + "description": "Filter Rules to be applied on Objects." + }, + "VariableValues": { + "type": "object", + "required": [ + "name", + "values" + ], + "properties": { + "name": { + "type": "string", + "description": "The name of the existing formula variable." + }, + "values": { + "type": "array", + "items": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "boolean" + }, + { + "type": "number" + } + ] + }, + "description": "The values to filter on." + } + }, + "description": "Variable values." + }, + "TokenAccessScopeObject": { + "type": "object", + "required": [ + "identifier" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "LOGICAL_TABLE" + ], + "description": " Type of object.\n \n\nRequired if the name of the object is set as the identifier. This attribute is optional when the object GUID is specified as the identifier.\n \n\n Specify the object type as `LOGICAL_TABLE`.", + "nullable": true + }, + "identifier": { + "type": "string", + "description": "Unique name/id of the object." + } + }, + "description": "Objects on which the filter rules and parameters values should be applied to" + }, + "Group_Object": { + "type": "object", + "properties": { + "identifier": { + "type": "string", + "nullable": true + } + }, + "description": "Groups objects." + }, + "AccessToken": { + "type": "object", + "required": [ + "token", + "org", + "user", + "creation_time_in_millis", + "expiration_time_in_millis" + ], + "properties": { + "id": { + "type": "string", + "description": "GUID of the auth token.", + "nullable": true + }, + "token": { + "type": "string", + "description": "Bearer auth token." + }, + "org": { + "$ref": "#/components/schemas/OrgInfo", + "description": "Org information for which the token is generated." + }, + "user": { + "$ref": "#/components/schemas/UserInfo", + "description": "User information for which the token is generated." + }, + "creation_time_in_millis": { + "type": "number", + "format": "float", + "description": "Token creation time in milliseconds." + }, + "expiration_time_in_millis": { + "type": "number", + "format": "float", + "description": "Token expiration time in milliseconds." + } + } + }, + "OrgInfo": { + "type": "object", + "required": [ + "id" + ], + "properties": { + "id": { + "type": "integer", + "format": "int32", + "description": "Id." + }, + "name": { + "type": "string", + "description": "Name.", + "nullable": true + } + } + }, + "UserInfo": { + "type": "object", + "required": [ + "id" + ], + "properties": { + "id": { + "type": "string", + "description": "Id." + }, + "name": { + "type": "string", + "description": "Name.", + "nullable": true + } + } + }, + "AuthClusterPreferencesInput": { + "type": "object", + "properties": { + "auth_status": { + "type": "string", + "enum": [ + "ENABLED", + "DISABLED" + ], + "description": "Enable or disable authentication at the cluster level. When enabled, a new token is generated if one does not exist. When disabled, the existing token is revoked.", + "nullable": true + } + }, + "description": "Input for cluster-level auth configuration." + }, + "AuthOrgPreferenceInput": { + "type": "object", + "required": [ + "org_identifier" + ], + "properties": { + "org_identifier": { + "type": "string", + "description": "Unique ID or name of the org to configure." + }, + "auth_status": { + "type": "string", + "enum": [ + "ENABLED", + "DISABLED" + ], + "description": "Enable or disable authentication for this org. When enabled, a new token is generated if one does not exist. When disabled, the existing token is revoked.", + "nullable": true + } + }, + "description": "Input for org-level auth configuration." + }, + "ResponseActivationURL": { + "type": "object", + "properties": { + "activation_link": { + "type": "string", + "description": "Activation link to activate the user.", + "nullable": true + } + }, + "description": "The object representation with activation link." + }, + "ImportUser": { + "type": "object", + "required": [ + "user_identifier", + "display_name" + ], + "properties": { + "user_identifier": { + "type": "string", + "description": "Unique ID or name of the user." + }, + "display_name": { + "type": "string", + "description": "Display name of the user." + }, + "password": { + "type": "string", + "description": "Password of the user.", + "nullable": true + }, + "account_type": { + "type": "string", + "enum": [ + "LOCAL_USER", + "LDAP_USER", + "SAML_USER", + "OIDC_USER", + "REMOTE_USER" + ], + "description": "Type of the user account.", + "nullable": true + }, + "account_status": { + "type": "string", + "enum": [ + "ACTIVE", + "INACTIVE", + "EXPIRED", + "LOCKED", + "PENDING", + "SUSPENDED" + ], + "description": "Status of the user account.", + "nullable": true + }, + "email": { + "type": "string", + "description": "Email address of the user.", + "nullable": true + }, + "org_identifiers": { + "type": "array", + "items": { + "type": "string" + }, + "description": "ID or name of the Orgs to which the user belongs.", + "nullable": true + }, + "group_identifiers": { + "type": "array", + "items": { + "type": "string" + }, + "description": "ID or name of the groups to which the user belongs.", + "nullable": true + }, + "visibility": { + "type": "string", + "enum": [ + "SHARABLE", + "NON_SHARABLE" + ], + "description": "Visibility of the users. The SHARABLE property makes a user visible to other users and group, who can share objects with the user.", + "nullable": true + }, + "notify_on_share": { + "type": "boolean", + "default": true, + "description": "Notify user when other users or groups share metadata objects", + "nullable": true + }, + "show_onboarding_experience": { + "type": "boolean", + "description": "Show or hide the new user onboarding walkthroughs", + "nullable": true + }, + "onboarding_experience_completed": { + "type": "boolean", + "description": "Revisit the new user onboarding walkthroughs", + "nullable": true + }, + "home_liveboard_identifier": { + "type": "string", + "description": "Unique ID or name of the default Liveboard assigned to the user.", + "nullable": true + }, + "favorite_metadata": { + "type": "array", + "items": { + "$ref": "#/components/schemas/FavoriteMetadataInput" + }, + "description": "Metadata objects to add to the user's favorites list.", + "nullable": true + }, + "preferred_locale": { + "type": "string", + "description": "Locale for the user. When setting this value, do not set use_browser_language to true, otherwise the browser's language setting will take precedence and the preferred_locale value will be ignored.", + "nullable": true, + "enum": [ + "en-CA", + "en-GB", + "en-US", + "de-DE", + "ja-JP", + "zh-CN", + "pt-BR", + "fr-FR", + "fr-CA", + "es-US", + "da-DK", + "es-ES", + "fi-FI", + "sv-SE", + "nb-NO", + "pt-PT", + "nl-NL", + "it-IT", + "ru-RU", + "en-IN", + "de-CH", + "en-NZ", + "es-MX", + "en-AU", + "zh-Hant", + "ko-KR", + "en-DE" + ] + }, + "use_browser_language": { + "type": "boolean", + "description": "Flag to indicate whether to use the browser locale for the user in the UI.\nWhen set to true, the preferred_locale value is unset and the browser's\nlanguage setting takes precedence.
Version: 26.3.0.cl or later", + "nullable": true + } + } + }, + "ImportUsersResponse": { + "type": "object", + "properties": { + "users_added": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ImportUserType" + }, + "nullable": true + }, + "users_updated": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ImportUserType" + }, + "nullable": true + }, + "users_deleted": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ImportUserType" + }, + "nullable": true + } + } + }, + "ImportUserType": { + "type": "object", + "required": [ + "name" + ], + "properties": { + "id": { + "type": "string", + "description": "Unique identifier of the user.", + "nullable": true + }, + "name": { + "type": "string", + "description": "Name of the user." + } + } + }, + "EventChannelConfigInput": { + "type": "object", + "required": [ + "event_type", + "channels" + ], + "properties": { + "event_type": { + "type": "string", + "enum": [ + "LIVEBOARD_SCHEDULE" + ], + "description": "Type of event for which communication channels are configured" + }, + "channels": { + "type": "array", + "items": { + "type": "string", + "enum": [ + "EMAIL", + "WEBHOOK" + ] + }, + "description": "Communication channels enabled for this event type. Empty array disables all channels for this event." + } + } + }, + "OrgChannelConfigInput": { + "type": "object", + "required": [ + "org_identifier" + ], + "properties": { + "org_identifier": { + "type": "string", + "description": "Unique identifier or name of the org" + }, + "operation": { + "type": "string", + "enum": [ + "REPLACE", + "RESET" + ], + "default": "REPLACE", + "description": "Operation to perform. REPLACE: Update preferences (default). RESET: Remove org-specific configurations, causing fallback to cluster-level preferences.", + "nullable": true + }, + "preferences": { + "type": "array", + "items": { + "$ref": "#/components/schemas/EventChannelConfigInput" + }, + "description": "Event-specific configurations. Required for REPLACE operation.", + "nullable": true + }, + "reset_events": { + "type": "array", + "items": { + "type": "string", + "enum": [ + "LIVEBOARD_SCHEDULE" + ] + }, + "description": "Event types to reset. Required for RESET operation. Org-specific configurations for these events will be removed, causing fallback to cluster-level preferences.", + "nullable": true + } + } + }, + "SecuritySettingsClusterPreferencesInput": { + "type": "object", + "properties": { + "enable_partitioned_cookies": { + "type": "boolean", + "description": "Support embedded access when third-party cookies are blocked.", + "nullable": true + }, + "cors_whitelisted_urls": { + "type": "array", + "items": { + "type": "string" + }, + "description": "Allowed origins for CORS.", + "nullable": true + }, + "csp_settings": { + "$ref": "#/components/schemas/CspSettingsInput", + "description": "CSP (Content Security Policy) settings.", + "nullable": true + }, + "saml_redirect_urls": { + "type": "array", + "items": { + "type": "string" + }, + "description": "Allowed redirect hosts for SAML login.", + "nullable": true + }, + "non_embed_access": { + "$ref": "#/components/schemas/ClusterNonEmbedAccessInput", + "description": "Non-embed access configuration at cluster level.", + "nullable": true + } + }, + "description": "Input for cluster-level security preferences configuration." + }, + "CspSettingsInput": { + "type": "object", + "properties": { + "connect_src_urls": { + "type": "array", + "items": { + "type": "string" + }, + "description": "Allowed URLs for connect-src directive.", + "nullable": true + }, + "font_src_urls": { + "type": "array", + "items": { + "type": "string" + }, + "description": "Allowed URLs for font-src directive.", + "nullable": true + }, + "visual_embed_hosts": { + "type": "array", + "items": { + "type": "string" + }, + "description": "Allowed hosts for visual embed (frame-ancestors directive).", + "nullable": true + }, + "iframe_src_urls": { + "type": "array", + "items": { + "type": "string" + }, + "description": "Allowed URLs for frame-src directive.", + "nullable": true + }, + "img_src_urls": { + "type": "array", + "items": { + "type": "string" + }, + "description": "Allowed URLs for img-src directive.", + "nullable": true + }, + "script_src_urls": { + "$ref": "#/components/schemas/ScriptSrcUrlsInput", + "description": "Script-src settings including URLs and enabled flag.", + "nullable": true + }, + "style_src_urls": { + "type": "array", + "items": { + "type": "string" + }, + "description": "Allowed URLs for style-src directive.", + "nullable": true + } + }, + "description": "Input for CSP (Content Security Policy) settings." + }, + "ScriptSrcUrlsInput": { + "type": "object", + "properties": { + "enabled": { + "type": "boolean", + "description": "Whether script-src customization is enabled.", + "nullable": true + }, + "urls": { + "type": "array", + "items": { + "type": "string" + }, + "description": "Allowed URLs for script-src directive. Can only be set if enabled is true.", + "nullable": true + } + }, + "description": "Input for script-src CSP settings." + }, + "ClusterNonEmbedAccessInput": { + "type": "object", + "properties": { + "block_full_app_access": { + "type": "boolean", + "description": "Block full application access for non-embedded usage.", + "nullable": true + }, + "groups_identifiers_with_access": { + "type": "array", + "items": { + "type": "string" + }, + "description": "Group identifiers that are allowed non-embed full app access.\nCan only be set when orgs feature is disabled and block_full_app_access is true.", + "nullable": true + } + }, + "description": "Input for cluster-level non-embed access configuration." + }, + "SecuritySettingsOrgPreferencesInput": { + "type": "object", + "required": [ + "org_identifier" + ], + "properties": { + "org_identifier": { + "type": "string", + "description": "Unique identifier or name of the org" + }, + "cors_whitelisted_urls": { + "type": "array", + "items": { + "type": "string" + }, + "description": "Allowed origins for CORS for this org.", + "nullable": true + }, + "non_embed_access": { + "$ref": "#/components/schemas/OrgNonEmbedAccessInput", + "description": "Non-embed access configuration for this org.", + "nullable": true + } + }, + "description": "Input for org-level security preferences configuration.\nNote: cross-org operations are not supported currently." + }, + "OrgNonEmbedAccessInput": { + "type": "object", + "properties": { + "block_full_app_access": { + "type": "boolean", + "description": "Block full application access for non-embedded usage.", + "nullable": true + }, + "groups_identifiers_with_access": { + "type": "array", + "items": { + "type": "string" + }, + "description": "Group identifiers that are allowed non-embed full app access. Can only be set if block_full_app_access is true.", + "nullable": true + } + }, + "description": "Input for org-level non-embed access configuration." + }, + "CommunicationChannelValidateResponse": { + "type": "object", + "required": [ + "channel_type", + "channel_id", + "event_type", + "job_id", + "result_code" + ], + "properties": { + "channel_type": { + "type": "string", + "enum": [ + "WEBHOOK" + ], + "description": "Type of communication channel that was validated." + }, + "channel_id": { + "type": "string", + "description": "ID of the communication channel (e.g., webhook_id)." + }, + "channel_name": { + "type": "string", + "description": "Name of the communication channel (e.g., webhook name).", + "nullable": true + }, + "event_type": { + "type": "string", + "enum": [ + "LIVEBOARD_SCHEDULE" + ], + "description": "Event type that was validated." + }, + "job_id": { + "type": "string", + "description": "Unique Job Id of the validation." + }, + "result_code": { + "type": "string", + "enum": [ + "SUCCESS", + "FAILED", + "PARTIAL_SUCCESS" + ], + "description": "Overall result of the validation." + }, + "details": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ChannelValidationDetail" + }, + "description": "Detailed results of various validation sub-steps.", + "nullable": true + } + }, + "description": "Response containing validation results for communication channel configuration." + }, + "ChannelValidationDetail": { + "type": "object", + "required": [ + "validation_step", + "status" + ], + "properties": { + "validation_step": { + "type": "string", + "enum": [ + "HTTP_CONNECTION_CHECK", + "STORAGE_FILE_UPLOAD_CHECK" + ], + "description": "The validation step that was performed." + }, + "status": { + "type": "string", + "enum": [ + "SUCCESS", + "FAILED" + ], + "description": "Status of this validation step." + }, + "http_status": { + "type": "integer", + "format": "int32", + "description": "HTTP status code returned by the channel (if applicable).", + "nullable": true + }, + "error_message": { + "type": "string", + "description": "Error message from the channel or validation process.", + "nullable": true + }, + "aws_s3_info": { + "$ref": "#/components/schemas/ChannelValidationAwsS3Info", + "description": "AWS S3 storage information from the validation step.", + "nullable": true + }, + "gcp_gcs_info": { + "$ref": "#/components/schemas/ChannelValidationGcpGcsInfo", + "description": "GCP GCS storage information from the validation step.
Version: 26.7.0.cl or later", + "nullable": true + } + }, + "description": "Validation detail result for a sub-step." + }, + "ChannelValidationAwsS3Info": { + "type": "object", + "properties": { + "bucket_name": { + "type": "string", + "description": "Name of the S3 bucket.", + "nullable": true + }, + "file_name": { + "type": "string", + "description": "Name of the uploaded file.", + "nullable": true + }, + "object_key": { + "type": "string", + "description": "Key of the object in S3 storage.", + "nullable": true + } + }, + "description": "AWS S3 storage information returned from a validation step." + }, + "ChannelValidationGcpGcsInfo": { + "type": "object", + "properties": { + "bucket_name": { + "type": "string", + "description": "Name of the GCS bucket.", + "nullable": true + }, + "file_name": { + "type": "string", + "description": "Name of the uploaded file.", + "nullable": true + }, + "object_key": { + "type": "string", + "description": "Key (path) of the object within the GCS bucket.", + "nullable": true + } + }, + "description": "GCP GCS storage information returned from a validation step." + }, + "TagMetadataTypeInput": { + "type": "object", + "required": [ + "identifier" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "LIVEBOARD", + "ANSWER", + "LOGICAL_TABLE", + "LOGICAL_COLUMN", + "CONNECTION", + "COLLECTION" + ], + "description": " Type of metadata.\n \n\nRequired if the name of the object is set as the identifier. This attribute is optional when the object GUID is specified as the identifier.\n 1. LIVEBOARD\n 2. ANSWERS\n 3. LOGICAL_TABLE for any data object such as table, worksheet or view.\n 4. LOGICAL_COLUMN for a column of any data object such as tables, worksheets or views.", + "nullable": true + }, + "identifier": { + "type": "string", + "description": "Unique ID or name of the metadata." + } + } + }, + "GroupsImportListInput": { + "type": "object", + "required": [ + "display_name", + "group_identifier" + ], + "properties": { + "display_name": { + "type": "string", + "description": "Unique display name of the group." + }, + "group_identifier": { + "type": "string", + "description": "Unique ID or name of the group." + }, + "default_liveboard_identifiers": { + "type": "array", + "items": { + "type": "string" + }, + "description": "Unique ID of Liveboards that will be assigned as default Liveboards to the users in the group.", + "nullable": true + }, + "description": { + "type": "string", + "description": "Description of the group.", + "nullable": true + }, + "privileges": { + "type": "array", + "items": { + "type": "string", + "enum": [ + "ADMINISTRATION", + "AUTHORING", + "USERDATAUPLOADING", + "DATADOWNLOADING", + "USERMANAGEMENT", + "DATAMANAGEMENT", + "SHAREWITHALL", + "JOBSCHEDULING", + "A3ANALYSIS", + "EXPERIMENTALFEATUREPRIVILEGE", + "BYPASSRLS", + "RANALYSIS", + "DEVELOPER", + "USER_ADMINISTRATION", + "GROUP_ADMINISTRATION", + "SYNCMANAGEMENT", + "CAN_CREATE_CATALOG", + "DISABLE_PINBOARD_CREATION", + "LIVEBOARD_VERIFIER", + "PREVIEW_THOUGHTSPOT_SAGE", + "CAN_MANAGE_VERSION_CONTROL", + "THIRDPARTY_ANALYSIS", + "ALLOW_NON_EMBED_FULL_APP_ACCESS", + "CAN_ACCESS_ANALYST_STUDIO", + "CAN_MANAGE_ANALYST_STUDIO", + "CAN_MODIFY_FOLDERS", + "CAN_MANAGE_VARIABLES", + "CAN_VIEW_FOLDERS", + "CAN_MANAGE_AGENTSPOT", + "CAN_ACCESS_AGENTSPOT", + "PREVIEW_DOCUMENT_SEARCH", + "CAN_SETUP_VERSION_CONTROL", + "CAN_DOWNLOAD_VISUALS", + "CAN_DOWNLOAD_DETAILED_DATA", + "CAN_USE_SPOTTER", + "CAN_MANAGE_SPOTTER" + ] + }, + "description": "Privileges that will be assigned to the group. Note: AUTHORING is a no-op — always inherited via ALL_GROUP, assigning it has no effect.", + "nullable": true + }, + "sub_group_identifiers": { + "type": "array", + "items": { + "type": "string" + }, + "description": "Unique ID or name of the sub-groups to add to the group.", + "nullable": true + }, + "type": { + "type": "string", + "enum": [ + "LOCAL_GROUP", + "LDAP_GROUP", + "TEAM_GROUP", + "TENANT_GROUP" + ], + "description": "Type of the group.", + "nullable": true + }, + "user_identifiers": { + "type": "array", + "items": { + "type": "string" + }, + "description": "Unique ID or name of the users to assign to the group.", + "nullable": true + }, + "visibility": { + "type": "string", + "enum": [ + "SHARABLE", + "NON_SHARABLE" + ], + "description": "Visibility of the group. The SHARABLE makes a group visible to other users and groups, and thus allows them to share objects.", + "nullable": true + } + } + }, + "ImportUserGroupsResponse": { + "type": "object", + "required": [ + "groups_added", + "groups_deleted", + "groups_updated" + ], + "properties": { + "groups_added": { + "type": "array", + "items": { + "$ref": "#/components/schemas/UserGroup" + }, + "description": "The groups which are added into the system." + }, + "groups_deleted": { + "type": "array", + "items": { + "$ref": "#/components/schemas/UserGroup" + }, + "description": "The groups which are deleted from the system." + }, + "groups_updated": { + "type": "array", + "items": { + "$ref": "#/components/schemas/UserGroup" + }, + "description": "The groups which are updated in the system." + } + } + }, + "Export_Options": { + "type": "object", + "properties": { + "include_obj_id_ref": { + "type": "boolean", + "default": false, + "description": "Boolean Flag to export Object ID of referenced object. This flag will work only after the Object ID feature has been enabled. Please contact support to enable the feature.", + "nullable": true + }, + "include_guid": { + "type": "boolean", + "default": true, + "description": "Boolean flag to export guid of the object. This flag will work only after the Object ID feature has been enabled. Please contact support to enable the feature.", + "nullable": true + }, + "include_obj_id": { + "type": "boolean", + "default": false, + "description": "Boolean flag to export Object ID of the object. This flag will work only after the Object ID feature has been enabled. Please contact support to enable the feature.", + "nullable": true + }, + "export_with_associated_feedbacks": { + "type": "boolean", + "default": false, + "description": "Boolean flag indicating whether to export associated feedbacks of the object. This will only be respected when the object can have feedbacks.
Version: 10.7.0.cl or later", + "nullable": true + }, + "export_column_security_rules": { + "type": "boolean", + "default": false, + "description": "Boolean flag indicating whether to export column security rules of the object. This will only be respected when the object can have column security rules and export_associated is true.
Beta Version: 10.12.0.cl or later", + "nullable": true + }, + "export_with_column_aliases": { + "type": "boolean", + "default": false, + "description": "Boolean flag indicating whether to export column aliases of the model. This will only be respected when the object can have column aliases.
Beta Version: 10.13.0.cl or later", + "nullable": true + } + }, + "description": "Flags to specify additional options for export. This will only be active when UserDefinedId in TML is enabled." + }, + "ResponseCopyObject": { + "type": "object", + "properties": { + "metadata_id": { + "type": "string", + "description": "The unique identifier of the object.", + "nullable": true + } + } + }, + "ResponseWorksheetToModelConversion": { + "type": "object", + "required": [ + "name", + "success_count", + "failure_count", + "incomplete_count", + "post_upgrade_failed_count", + "total_time_in_millis", + "successful_entities", + "failed_entities", + "incomplete_entities", + "post_upgrade_failed_entities" + ], + "properties": { + "name": { + "type": "string" + }, + "success_count": { + "type": "integer", + "format": "int32", + "description": "The number of worksheets successfully converted to models." + }, + "failure_count": { + "type": "integer", + "format": "int32", + "description": "The number of worksheets that failed to convert." + }, + "incomplete_count": { + "type": "integer", + "format": "int32", + "description": "The number of worksheets that were incomplete during the conversion process." + }, + "post_upgrade_failed_count": { + "type": "integer", + "format": "int32", + "description": "The number of worksheets that failed after an upgrade during the conversion process." + }, + "total_time_in_millis": { + "type": "integer", + "format": "int32", + "description": "The total time taken to complete the conversion process in milliseconds." + }, + "successful_entities": { + "$ref": "#/components/schemas/ResponseSuccessfulEntities", + "description": "List of worksheets successfully converted to models." + }, + "failed_entities": { + "$ref": "#/components/schemas/ResponseFailedEntities", + "description": "List of worksheets that failed to convert." + }, + "incomplete_entities": { + "$ref": "#/components/schemas/ResponseIncompleteEntities", + "description": "List of worksheets that were incomplete during the conversion." + }, + "post_upgrade_failed_entities": { + "$ref": "#/components/schemas/ResponsePostUpgradeFailedEntities", + "description": "List of worksheets that failed after an upgrade during the conversion process." + } + }, + "description": "Name of the conversion process, which involves converting worksheets to models." + }, + "ResponseSuccessfulEntities": { + "type": "object", + "required": [ + "data" + ], + "properties": { + "data": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ResponseSuccessfulEntity" + } + } + }, + "description": "Wrapper for the successful entities, as they are inside a 'data' field in the response." + }, + "ResponseSuccessfulEntity": { + "type": "object", + "required": [ + "id", + "name" + ], + "properties": { + "id": { + "type": "string" + }, + "name": { + "type": "string", + "description": "Name of the worksheet." + } + }, + "description": "Unique ID of the worksheet." + }, + "ResponseFailedEntities": { + "type": "object", + "required": [ + "data" + ], + "properties": { + "data": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ResponseFailedEntity" + } + } + }, + "description": "Wrapper for the failed entities, as they are inside a 'data' field in the response." + }, + "ResponseFailedEntity": { + "type": "object", + "required": [ + "id", + "name", + "error" + ], + "properties": { + "id": { + "type": "string" + }, + "name": { + "type": "string", + "description": "Name of the worksheet that failed to convert." + }, + "error": { + "type": "string", + "description": "Error details related to the failed conversion." + } + }, + "description": "Unique ID of the failed worksheet." + }, + "ResponseIncompleteEntities": { + "type": "object", + "required": [ + "data" + ], + "properties": { + "data": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ResponseIncompleteEntity" + } + } + }, + "description": "Wrapper for the incomplete entities, as they are inside a 'data' field in the response." + }, + "ResponseIncompleteEntity": { + "type": "object", + "required": [ + "id", + "name", + "error" + ], + "properties": { + "id": { + "type": "string" + }, + "name": { + "type": "string", + "description": "Name of the incomplete worksheet." + }, + "error": { + "type": "string", + "description": "Error details related to the incomplete conversion." + } + }, + "description": "Unique ID of the incomplete worksheet." + }, + "ResponsePostUpgradeFailedEntities": { + "type": "object", + "required": [ + "data" + ], + "properties": { + "data": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ResponsePostUpgradeFailedEntity" + } + } + }, + "description": "Wrapper for the post-upgrade failed entities, as they are inside a 'data' field in the response." + }, + "ResponsePostUpgradeFailedEntity": { + "type": "object", + "required": [ + "id", + "name", + "error" + ], + "properties": { + "id": { + "type": "string" + }, + "name": { + "type": "string", + "description": "Name of the worksheet that failed post-upgrade." + }, + "error": { + "type": "string", + "description": "Error details related to the post-upgrade failure." + } + }, + "description": "Unique ID of the worksheet that failed post-upgrade." + }, + "HeaderUpdateInput": { + "type": "object", + "required": [ + "attributes" + ], + "properties": { + "identifier": { + "type": "string", + "description": "Unique ID of a specified type to identify the header.", + "nullable": true + }, + "obj_identifier": { + "type": "string", + "description": "Custom object identifier to uniquely identify header.", + "nullable": true + }, + "type": { + "type": "string", + "enum": [ + "ANSWER", + "LOGICAL_TABLE", + "LOGICAL_COLUMN", + "LIVEBOARD", + "ACTION_OBJECT", + "DATA_SOURCE", + "USER", + "USER_GROUP", + "COLLECTION" + ], + "description": "Optional type of the header object.", + "nullable": true + }, + "attributes": { + "type": "array", + "items": { + "$ref": "#/components/schemas/HeaderAttributeInput" + }, + "description": "List of attributes to update" + } + }, + "description": "Favorite object options." + }, + "HeaderAttributeInput": { + "type": "object", + "required": [ + "name", + "value" + ], + "properties": { + "name": { + "type": "string", + "description": "Attribute name to be updated." + }, + "value": { + "type": "string", + "description": "Attribute's new value." + } + }, + "description": "Attribute to update in a header." + }, + "UpdateObjIdInput": { + "type": "object", + "required": [ + "new_obj_id" + ], + "properties": { + "metadata_identifier": { + "type": "string", + "description": "GUID or name of the metadata object.", + "nullable": true + }, + "type": { + "type": "string", + "enum": [ + "ANSWER", + "LOGICAL_TABLE", + "LOGICAL_COLUMN", + "LIVEBOARD", + "ACTION_OBJECT", + "DATA_SOURCE", + "USER", + "USER_GROUP", + "COLLECTION" + ], + "description": "Type of metadata. Required if metadata_identifier is name of the object.", + "nullable": true + }, + "current_obj_id": { + "type": "string", + "description": "Current object ID value.", + "nullable": true + }, + "new_obj_id": { + "type": "string", + "description": "New object ID value to set." + } + }, + "description": "Input for updating object ID of a metadata object." + }, + "ExportMetadataTypeInput": { + "type": "object", + "properties": { + "type": { + "type": "string", + "enum": [ + "LIVEBOARD", + "ANSWER", + "LOGICAL_TABLE", + "CONNECTION", + "CUSTOM_ACTION", + "USER", + "USER_GROUP", + "ROLE", + "FEEDBACK", + "COLLECTION" + ], + "description": " Type of metadata.\n \n\nRequired if the name of the object is set as the identifier. This attribute is optional when the object GUID is specified as the identifier.", + "nullable": true + }, + "identifier": { + "type": "string", + "description": "Unique ID or name of the metadata object. Not required if the metadata type is ANSWER when session_id and generation_number is set.", + "nullable": true + }, + "session_identifier": { + "type": "string", + "description": "Unique ID of the Answer session. Required if the metadata type is ANSWER and identifier is not set.", + "nullable": true + }, + "generation_number": { + "type": "integer", + "format": "int32", + "description": "Generation Number of the Answer session. Required if the metadata type is ANSWER and identifier is not set.", + "nullable": true + } + }, + "description": "MetadataType InputType used in Export MetadataType API" + }, + "DeleteMetadataTypeInput": { + "type": "object", + "required": [ + "identifier" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "LIVEBOARD", + "ANSWER", + "LOGICAL_TABLE", + "LOGICAL_COLUMN", + "LOGICAL_RELATIONSHIP" + ], + "description": " Type of metadata.\n \n\nRequired if the name of the object is set as the identifier. This attribute is optional when the object GUID is specified as the identifier.", + "nullable": true + }, + "identifier": { + "type": "string", + "description": "Unique ID or name of the metadata object." + } + }, + "description": "MetadataType InputType used in Delete MetadataType API" + }, + "PublishMetadataListItem": { + "type": "object", + "required": [ + "identifier" + ], + "properties": { + "identifier": { + "type": "string", + "description": "Unique ID or name of the metadata." + }, + "type": { + "type": "string", + "enum": [ + "LIVEBOARD", + "ANSWER", + "LOGICAL_TABLE" + ], + "description": "Type of metadata. Required if identifier is name.", + "nullable": true + } + } + }, + "AuthorMetadataTypeInput": { + "type": "object", + "required": [ + "identifier" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "LIVEBOARD", + "ANSWER", + "LOGICAL_TABLE", + "CONNECTION" + ], + "description": " Type of metadata.\n \n\nRequired if the name of the object is set as the identifier. This attribute is optional when the object GUID is specified as the identifier.", + "nullable": true + }, + "identifier": { + "type": "string", + "description": "Unique ID or name of the metadata object." + } + }, + "description": "MetadataType InputType used in Author API's" + }, + "ShareMetadataTypeInput": { + "type": "object", + "required": [ + "identifier" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "LIVEBOARD", + "ANSWER", + "LOGICAL_TABLE", + "LOGICAL_COLUMN", + "CONNECTION", + "COLLECTION" + ], + "description": " Type of metadata.\n \n\nType of metadata. Required if the name of the object is set as the identifier. This attribute is optional when the object GUID is specified as the identifier.", + "nullable": true + }, + "identifier": { + "type": "string", + "description": "Unique ID or name of the metadata object." + } + } + }, + "SharePermissionsInput": { + "type": "object", + "required": [ + "principal", + "share_mode" + ], + "properties": { + "principal": { + "$ref": "#/components/schemas/PrincipalsInput", + "description": "Details of users or groups." + }, + "share_mode": { + "type": "string", + "enum": [ + "READ_ONLY", + "MODIFY", + "NO_ACCESS" + ], + "description": "Type of access to the shared object" + }, + "content_share_mode": { + "type": "string", + "enum": [ + "READ_ONLY", + "MODIFY" + ], + "description": "Content share mode for collections. Controls access to objects within the collection. Only applicable when sharing COLLECTION metadata type.", + "nullable": true + } + } + }, + "ColumnSecurityRuleUpdate": { + "type": "object", + "required": [ + "column_identifier" + ], + "properties": { + "column_identifier": { + "type": "string", + "description": "Column identifier (col_id or name)" + }, + "is_unsecured": { + "type": "boolean", + "description": "If true, the column will be marked as unprotected and all groups associated with it will be removed", + "nullable": true + }, + "group_access": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ColumnSecurityRuleGroupOperation" + }, + "description": "Array of group operation objects that specifies the actions for groups to be associated with a column", + "nullable": true + } + } + }, + "ColumnSecurityRuleGroupOperation": { + "type": "object", + "required": [ + "operation", + "group_identifiers" + ], + "properties": { + "operation": { + "type": "string", + "enum": [ + "ADD", + "REMOVE", + "REPLACE" + ], + "description": "Type of operation to be performed on the groups" + }, + "group_identifiers": { + "type": "array", + "items": { + "type": "string" + }, + "description": "Array of group identifiers (name or GUID) on which the operation will be performed" + } + } + }, + "MetadataObject": { + "type": "object", + "required": [ + "identifier" + ], + "properties": { + "identifier": { + "type": "string", + "description": "Unique ID or name of the metadata" + }, + "type": { + "type": "string", + "enum": [ + "LIVEBOARD", + "ANSWER", + "LOGICAL_TABLE", + "CUSTOM_ACTION" + ], + "description": " Type of metadata.\n \n\nRequired if the name of the object is set as the identifier. This attribute is optional when the object GUID is specified as the identifier.", + "nullable": true + } + } + }, + "CommitResponse": { + "type": "object", + "properties": { + "committer": { + "$ref": "#/components/schemas/CommiterType", + "description": "Repository user using which changes were committed", + "nullable": true + }, + "author": { + "$ref": "#/components/schemas/AuthorType", + "description": "Thoughtspot user who commits the changes", + "nullable": true + }, + "comment": { + "type": "string", + "description": "Comments associated with the commit", + "nullable": true + }, + "commit_time": { + "type": "string", + "description": "Time at which the changes were committed.", + "nullable": true + }, + "commit_id": { + "type": "string", + "description": "SHA id associated with the commit", + "nullable": true + }, + "branch": { + "type": "string", + "description": "Branch where changes were committed", + "nullable": true + }, + "committed_files": { + "type": "array", + "items": { + "$ref": "#/components/schemas/CommitFileType" + }, + "description": "Files that were pushed as part of this commit", + "nullable": true + } + } + }, + "CommitFileType": { + "type": "object", + "required": [ + "file_name", + "status_code" + ], + "properties": { + "file_name": { + "type": "string", + "description": "Name of the file deployed" + }, + "status_code": { + "type": "string", + "description": "Indicates the status of deployment for the file" + }, + "status_message": { + "type": "string", + "description": "Any error or warning with the deployment", + "nullable": true + } + } + }, + "RevertResponse": { + "type": "object", + "properties": { + "committer": { + "$ref": "#/components/schemas/CommiterType", + "description": "Repository user using which changes were committed", + "nullable": true + }, + "author": { + "$ref": "#/components/schemas/AuthorType", + "description": "Thoughtspot user who commits the changes", + "nullable": true + }, + "comment": { + "type": "string", + "description": "Comments associated with the commit", + "nullable": true + }, + "commit_time": { + "type": "string", + "description": "Time at which the changes were committed.", + "nullable": true + }, + "commit_id": { + "type": "string", + "description": "SHA id associated with the commit", + "nullable": true + }, + "branch": { + "type": "string", + "description": "Branch where changes were committed", + "nullable": true + }, + "committed_files": { + "type": "array", + "items": { + "$ref": "#/components/schemas/CommitFileType" + }, + "description": "Files that were pushed as part of this commit", + "nullable": true + }, + "reverted_metadata": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RevertedMetadata" + }, + "description": "Metadata of reverted file of this commit", + "nullable": true + } + } + }, + "RevertedMetadata": { + "type": "object", + "required": [ + "file_name", + "metadata_name", + "metadata_type", + "status_code", + "status_message" + ], + "properties": { + "file_name": { + "type": "string", + "description": "Name of the file deployed" + }, + "metadata_name": { + "type": "string", + "description": "Name of the metadata object" + }, + "metadata_type": { + "type": "string", + "description": "Type of the metadata object" + }, + "status_code": { + "type": "string", + "description": "Indicates the status of deployment for the file" + }, + "status_message": { + "type": "string", + "description": "Any error or warning with the deployment" + } + } + }, + "DeployResponse": { + "type": "object", + "properties": { + "file_name": { + "type": "string", + "description": "Name of the file deployed", + "nullable": true + }, + "metadata_name": { + "type": "string", + "description": "Name of the metadata object", + "nullable": true + }, + "metadata_type": { + "type": "string", + "description": "Type of the metadata object", + "nullable": true + }, + "status_code": { + "type": "string", + "description": "Indicates the status of deployment for the file", + "nullable": true + }, + "status_message": { + "type": "string", + "description": "Any error or warning with the deployment", + "nullable": true + } + } + }, + "CreateConnectionResponse": { + "type": "object", + "required": [ + "id", + "name", + "data_warehouse_type" + ], + "properties": { + "id": { + "type": "string", + "description": "ID of the connection created." + }, + "name": { + "type": "string", + "description": "Name of the connection." + }, + "data_warehouse_type": { + "type": "string", + "enum": [ + "SNOWFLAKE", + "AMAZON_REDSHIFT", + "GOOGLE_BIGQUERY", + "AZURE_SYNAPSE", + "TERADATA", + "SAP_HANA", + "STARBURST", + "ORACLE_ADW", + "DATABRICKS", + "DENODO", + "DREMIO", + "TRINO", + "PRESTO", + "POSTGRES", + "SQLSERVER", + "MYSQL", + "GENERIC_JDBC", + "AMAZON_RDS_POSTGRESQL", + "AMAZON_AURORA_POSTGRESQL", + "AMAZON_RDS_MYSQL", + "AMAZON_AURORA_MYSQL", + "LOOKER", + "AMAZON_ATHENA", + "SINGLESTORE", + "GCP_SQLSERVER", + "GCP_ALLOYDB_POSTGRESQL", + "GCP_POSTGRESQL", + "GCP_MYSQL", + "MODE", + "GOOGLE_SHEETS", + "FALCON", + "FALCON_ONPREM", + "CLICKHOUSE", + "IOMETE" + ], + "description": "Type of data warehouse." + }, + "details": { + "type": "object", + "description": "Details of the connection.", + "nullable": true + } + } + }, + "FetchConnectionDiffStatusResponse": { + "type": "object", + "properties": { + "status": { + "type": "boolean", + "description": "Status of the connection diff.", + "nullable": true + } + } + }, + "RevokeRefreshTokensResponse": { + "type": "object", + "required": [ + "data" + ], + "properties": { + "data": { + "type": "string", + "description": "Result message describing the outcome of the refresh token revocation operation." + } + } + }, + "SyncMetadataResponse": { + "type": "object", + "properties": { + "status": { + "type": "string", + "enum": [ + "SUCCESS", + "PARTIAL_SUCCESS", + "NO_UPDATE" + ], + "description": "Overall status of the sync operation.", + "nullable": true + }, + "tables_updated": { + "type": "integer", + "format": "int32", + "description": "Number of tables with metadata updates.", + "nullable": true + }, + "columns_updated": { + "type": "integer", + "format": "int32", + "description": "Number of columns with metadata updates.", + "nullable": true + }, + "tables_failed": { + "type": "integer", + "format": "int32", + "description": "Number of tables that failed to sync (for PARTIAL_SUCCESS).", + "nullable": true + }, + "columns_failed": { + "type": "integer", + "format": "int32", + "description": "Number of columns that failed to sync (for PARTIAL_SUCCESS).", + "nullable": true + }, + "message": { + "type": "string", + "description": "Message describing the result.", + "nullable": true + } + }, + "description": "Response from sync metadata operation." + }, + "RoleResponse": { + "type": "object", + "required": [ + "id", + "name", + "description", + "privileges" + ], + "properties": { + "id": { + "type": "string", + "description": "Unique Id of the role." + }, + "name": { + "type": "string", + "description": "Name of the role" + }, + "description": { + "type": "string", + "description": "Description of the role" + }, + "groups_assigned_count": { + "type": "integer", + "format": "int32", + "description": "number of groups assigned with this role", + "nullable": true + }, + "orgs": { + "type": "array", + "items": { + "$ref": "#/components/schemas/GenericInfo" + }, + "description": "Orgs in which role exists.", + "nullable": true + }, + "groups": { + "type": "array", + "items": { + "$ref": "#/components/schemas/GenericInfo" + }, + "description": "Details of groups assigned with this role", + "nullable": true + }, + "privileges": { + "type": "array", + "items": { + "type": "string", + "enum": [ + "USERDATAUPLOADING", + "DATADOWNLOADING", + "DATAMANAGEMENT", + "SHAREWITHALL", + "JOBSCHEDULING", + "A3ANALYSIS", + "BYPASSRLS", + "DISABLE_PINBOARD_CREATION", + "DEVELOPER", + "APPLICATION_ADMINISTRATION", + "USER_ADMINISTRATION", + "GROUP_ADMINISTRATION", + "SYSTEM_INFO_ADMINISTRATION", + "SYNCMANAGEMENT", + "ORG_ADMINISTRATION", + "ROLE_ADMINISTRATION", + "AUTHENTICATION_ADMINISTRATION", + "BILLING_INFO_ADMINISTRATION", + "CONTROL_TRUSTED_AUTH", + "TAGMANAGEMENT", + "LIVEBOARD_VERIFIER", + "CAN_MANAGE_CUSTOM_CALENDAR", + "CAN_CREATE_OR_EDIT_CONNECTIONS", + "CAN_MANAGE_WORKSHEET_VIEWS_TABLES", + "CAN_MANAGE_VERSION_CONTROL", + "THIRDPARTY_ANALYSIS", + "CAN_CREATE_CATALOG", + "ALLOW_NON_EMBED_FULL_APP_ACCESS", + "CAN_ACCESS_ANALYST_STUDIO", + "CAN_MANAGE_ANALYST_STUDIO", + "PREVIEW_DOCUMENT_SEARCH", + "CAN_MANAGE_VARIABLES", + "CAN_MODIFY_FOLDERS", + "CAN_VIEW_FOLDERS", + "CAN_MANAGE_AGENTSPOT", + "CAN_ACCESS_AGENTSPOT", + "CAN_SETUP_VERSION_CONTROL", + "PREVIEW_THOUGHTSPOT_SAGE", + "CAN_MANAGE_WEBHOOKS", + "CAN_DOWNLOAD_VISUALS", + "CAN_DOWNLOAD_DETAILED_DATA", + "CAN_USE_SPOTTER", + "CAN_MANAGE_SPOTTER" + ] + }, + "description": "Privileges granted to the role." + }, + "permission": { + "type": "string", + "enum": [ + "READ_ONLY", + "MODIFY", + "NO_ACCESS" + ], + "description": "Permission details of the Role", + "nullable": true + }, + "author_id": { + "type": "string", + "description": "Unique identifier of author of the role.", + "nullable": true + }, + "modifier_id": { + "type": "string", + "description": "Unique identifier of modifier of the role.", + "nullable": true + }, + "creation_time_in_millis": { + "type": "object", + "description": "Creation time of the role in milliseconds.", + "nullable": true + }, + "modification_time_in_millis": { + "type": "object", + "description": "Last modified time of the role in milliseconds.", + "nullable": true + }, + "deleted": { + "type": "boolean", + "description": "Indicates whether the role is deleted.", + "nullable": true + }, + "deprecated": { + "type": "boolean", + "description": "Indicates whether the role is deprecated.", + "nullable": true + }, + "external": { + "type": "boolean", + "description": "Indicates whether the role is external.", + "nullable": true + }, + "hidden": { + "type": "boolean", + "description": "Indicates whether the role is hidden.", + "nullable": true + }, + "shared_via_connection": { + "type": "boolean", + "description": "Indicates whether the role is shared via connection", + "nullable": true + } + } + }, + "LiveboardOptionsInput": { + "type": "object", + "required": [ + "visualization_identifiers" + ], + "properties": { + "visualization_identifiers": { + "type": "array", + "items": { + "type": "string" + }, + "description": "Unique ID or name of visualizations." + } + }, + "description": "Options to specify details of Liveboard." + }, + "SchedulesPdfOptionsInput": { + "type": "object", + "properties": { + "complete_liveboard": { + "type": "boolean", + "description": "Indicates whether to include complete Liveboard.", + "nullable": true + }, + "include_cover_page": { + "type": "boolean", + "description": "Indicates whether to include cover page with the Liveboard title.", + "nullable": true + }, + "include_custom_logo": { + "type": "boolean", + "description": "Indicates whether to include customized wide logo in the footer if available.", + "nullable": true + }, + "include_filter_page": { + "type": "boolean", + "description": "Indicates whether to include a page with all applied filters.", + "nullable": true + }, + "include_page_number": { + "type": "boolean", + "description": "Indicates whether to include page number in the footer of each page", + "nullable": true + }, + "page_footer_text": { + "type": "string", + "description": "Text to include in the footer of each page.", + "nullable": true + }, + "page_orientation": { + "type": "string", + "description": "Page orientation of the PDF.", + "nullable": true + }, + "page_size": { + "type": "string", + "enum": [ + "A4", + "TAB_BASED" + ], + "description": "Page size.", + "nullable": true + }, + "truncate_table": { + "type": "boolean", + "description": "Indicates whether to include only first page of the tables.", + "nullable": true + } + }, + "description": "Options for PDF export." + }, + "FrequencyInput": { + "type": "object", + "required": [ + "cron_expression" + ], + "properties": { + "cron_expression": { + "$ref": "#/components/schemas/CronExpressionInput", + "description": "Schedule selected cron expression." + } + }, + "description": "Configuration of schedule with cron expression" + }, + "CronExpressionInput": { + "type": "object", + "required": [ + "day_of_month", + "day_of_week", + "hour", + "minute", + "month", + "second" + ], + "properties": { + "day_of_month": { + "type": "string", + "description": "Day of month of the object." + }, + "day_of_week": { + "type": "string", + "description": "Day of Week of the object." + }, + "hour": { + "type": "string", + "description": "Hour of the object." + }, + "minute": { + "type": "string", + "description": "Minute of the object." + }, + "month": { + "type": "string", + "description": "Month of the object." + }, + "second": { + "type": "string", + "description": "Second of the object." + } + }, + "description": "Schedule selected cron expression." + }, + "RecipientDetailsInput": { + "type": "object", + "properties": { + "emails": { + "type": "array", + "items": { + "type": "string" + }, + "description": "Emails of the recipients.", + "nullable": true + }, + "principals": { + "type": "array", + "items": { + "$ref": "#/components/schemas/PrincipalsListItemInput" + }, + "description": "User or groups to be set as recipients of the schedule notifications.", + "nullable": true + } + }, + "description": "Recipients of the scheduled job notification." + }, + "PrincipalsListItemInput": { + "type": "object", + "required": [ + "identifier", + "type" + ], + "properties": { + "identifier": { + "type": "string", + "description": "Unique ID or name of the user or group." + }, + "type": { + "type": "string", + "description": "Principal type." + } + } + }, + "ResponseSchedule": { + "type": "object", + "required": [ + "author", + "creation_time_in_millis", + "file_format", + "frequency", + "id", + "metadata", + "name", + "recipient_details", + "time_zone" + ], + "properties": { + "author": { + "$ref": "#/components/schemas/Author", + "description": "Author of the schedule." + }, + "creation_time_in_millis": { + "type": "object", + "description": "Schedule creation time in milliseconds." + }, + "description": { + "type": "string", + "description": "Description of the job.", + "nullable": true + }, + "file_format": { + "type": "string", + "description": "Export file format." + }, + "frequency": { + "$ref": "#/components/schemas/Frequency", + "description": "Configuration of schedule with cron expression" + }, + "id": { + "type": "string", + "description": "GUID of the scheduled job." + }, + "liveboard_options": { + "$ref": "#/components/schemas/LiveboardOptions", + "description": "Options to specify details of Liveboard.", + "nullable": true + }, + "metadata": { + "$ref": "#/components/schemas/MetadataResponse", + "description": "Unique ID or name of the metadata." + }, + "name": { + "type": "string", + "description": "Name of the scheduled job." + }, + "pdf_options": { + "$ref": "#/components/schemas/PdfOptions", + "description": "Options for PDF export.", + "nullable": true + }, + "recipient_details": { + "$ref": "#/components/schemas/RecipientDetails", + "description": "Recipient of the scheduled job notifications." + }, + "status": { + "type": "string", + "description": "Status of the job", + "nullable": true + }, + "time_zone": { + "type": "string", + "description": "Time zone" + }, + "history_runs": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ResponseScheduleRun" + }, + "description": "Schedule runs history records.", + "nullable": true + }, + "personalised_view_id": { + "type": "string", + "description": "Personalised view id of the liveboard to be scheduled.", + "nullable": true + } + } + }, + "Author": { + "type": "object", + "required": [ + "id", + "name" + ], + "properties": { + "id": { + "type": "string", + "description": "The unique identifier of the object." + }, + "name": { + "type": "string", + "description": "Name of the object." + } + }, + "description": "Author of the schedule." + }, + "Frequency": { + "type": "object", + "required": [ + "cron_expression" + ], + "properties": { + "cron_expression": { + "$ref": "#/components/schemas/CronExpression", + "description": "Schedule selected cron expression." + } + }, + "description": "Configuration of schedule with cron expression" + }, + "CronExpression": { + "type": "object", + "required": [ + "day_of_month", + "day_of_week", + "hour", + "minute", + "month", + "second" + ], + "properties": { + "day_of_month": { + "type": "string", + "description": "Day of month of the object." + }, + "day_of_week": { + "type": "string", + "description": "Day of Week of the object." + }, + "hour": { + "type": "string", + "description": "Hour of the object." + }, + "minute": { + "type": "string", + "description": "Minute of the object." + }, + "month": { + "type": "string", + "description": "Month of the object." + }, + "second": { + "type": "string", + "description": "Second of the object." + } + }, + "description": "Schedule selected cron expression." + }, + "LiveboardOptions": { + "type": "object", + "required": [ + "visualization_identifiers" + ], + "properties": { + "visualization_identifiers": { + "type": "array", + "items": { + "type": "string" + }, + "description": "Unique ID or name of visualizations." + } + }, + "description": "Options to specify details of Liveboard." + }, + "MetadataResponse": { + "type": "object", + "required": [ + "id", + "type" + ], + "properties": { + "name": { + "type": "string", + "nullable": true + }, + "id": { + "type": "string" + }, + "type": { + "type": "string", + "enum": [ + "LIVEBOARD" + ] + } + } + }, + "PdfOptions": { + "type": "object", + "properties": { + "complete_liveboard": { + "type": "boolean", + "description": "Indicates whether to include complete Liveboard.", + "nullable": true + }, + "include_cover_page": { + "type": "boolean", + "description": "Indicates whether to include cover page with the Liveboard title.", + "nullable": true + }, + "include_custom_logo": { + "type": "boolean", + "description": "Indicates whether to include customized wide logo in the footer if available.", + "nullable": true + }, + "include_filter_page": { + "type": "boolean", + "description": "Indicates whether to include a page with all applied filters.", + "nullable": true + }, + "include_page_number": { + "type": "boolean", + "description": "Indicates whether to include page number in the footer of each page", + "nullable": true + }, + "page_footer_text": { + "type": "string", + "description": "Text to include in the footer of each page.", + "nullable": true + }, + "page_orientation": { + "type": "string", + "description": "Page orientation of the PDF.", + "nullable": true + }, + "page_size": { + "type": "string", + "enum": [ + "A4", + "TAB_BASED" + ], + "description": "Page size.", + "nullable": true + }, + "truncate_table": { + "type": "boolean", + "description": "Indicates whether to include only first page of the tables.", + "nullable": true + } + }, + "description": "Options for PDF export." + }, + "RecipientDetails": { + "type": "object", + "properties": { + "emails": { + "type": "array", + "items": { + "type": "string" + }, + "description": "Emails of the recipients. Specify email address if the recipient is not a ThoughtSpot user.", + "nullable": true + }, + "principals": { + "type": "array", + "items": { + "$ref": "#/components/schemas/PrincipalsListItem" + }, + "description": "List of user or groups to subscribe for the scheduled job notifications.", + "nullable": true + } + }, + "description": "Recipient configuration which includes email address, ID or name of the users and groups." + }, + "PrincipalsListItem": { + "type": "object", + "required": [ + "identifier", + "type" + ], + "properties": { + "identifier": { + "type": "string", + "description": "Unique ID or name of the user or group." + }, + "type": { + "type": "string", + "description": "Principal type. Valid values are" + } + } + }, + "ResponseScheduleRun": { + "type": "object", + "required": [ + "id", + "start_time_in_millis", + "end_time_in_millis", + "status" + ], + "properties": { + "id": { + "type": "string", + "description": "GUID of the scheduled job." + }, + "start_time_in_millis": { + "type": "integer", + "format": "int32", + "description": "Schedule run start time in milliseconds." + }, + "end_time_in_millis": { + "type": "integer", + "format": "int32", + "description": "Schedule run end time in milliseconds." + }, + "status": { + "type": "string", + "description": "Status of the schedule run." + }, + "detail": { + "type": "string", + "description": "Message details related to the schedule run.", + "nullable": true + } + }, + "description": "Schedule run response object" + }, + "MetadataInput": { + "type": "object", + "properties": { + "identifier": { + "type": "string", + "nullable": true + }, + "type": { + "type": "string", + "enum": [ + "LIVEBOARD" + ], + "nullable": true + } + } + }, + "SortingOptions": { + "type": "object", + "properties": { + "field_name": { + "type": "string", + "description": "Name of the field to apply the sort on.", + "nullable": true + }, + "order": { + "type": "string", + "description": "Sort order : ASC(Ascending) or DESC(Descending).", + "nullable": true + } + }, + "description": "Sort options." + }, + "ScheduleHistoryRunsOptionsInput": { + "type": "object", + "properties": { + "include_history_runs": { + "type": "boolean", + "default": false, + "description": "Indicates whether to fetch history runs for the scheduled notification.", + "nullable": true + }, + "record_size": { + "type": "integer", + "format": "int32", + "default": 10, + "description": "Indicates the max number of records that can be fetched as past runs of any scheduled job.", + "nullable": true + }, + "record_offset": { + "type": "integer", + "format": "int32", + "default": 0, + "description": "Indicates the starting record number from where history runs records should be fetched.", + "nullable": true + } + } + }, + "Action_Details_Input_Create": { + "type": "object", + "properties": { + "CALLBACK": { + "$ref": "#/components/schemas/CALLBACKInputMandatory", + "description": "CALLBACK Custom Action Type", + "nullable": true + }, + "URL": { + "$ref": "#/components/schemas/URLInputMandatory", + "description": "URL Custom Action Type", + "nullable": true + } + }, + "description": "Action details includes Type and Configuration for Custom Actions, either Callback or URL is required.\nWhen both callback and url are provided, callback would be considered" + }, + "CALLBACKInputMandatory": { + "type": "object", + "properties": { + "reference": { + "type": "string", + "description": "Reference name. By default, the value will be set to action name.", + "nullable": true + } + }, + "description": "CALLBACK Custom Action Type" + }, + "URLInputMandatory": { + "type": "object", + "required": [ + "url" + ], + "properties": { + "authentication": { + "$ref": "#/components/schemas/AuthenticationInput", + "description": "Authorization type for the custom action.", + "nullable": true + }, + "parameters": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ParametersListItemInput" + }, + "description": "Query parameters for url.", + "nullable": true + }, + "url": { + "type": "string", + "description": "Request Url for the Custom action." + }, + "reference": { + "type": "string", + "description": "Reference name. By default the value will be set to action name", + "nullable": true + } + }, + "description": "URL Custom Action Type" + }, + "AuthenticationInput": { + "type": "object", + "properties": { + "API_Key": { + "$ref": "#/components/schemas/API_KeyInput", + "description": "With API key auth, you send a key-value pair to the API either in the request headers or query parameters.", + "nullable": true + }, + "Basic_Auth": { + "$ref": "#/components/schemas/Basic_AuthInput", + "description": "Basic Auth: Basic authentication involves sending a verified username and password with your request.", + "nullable": true + }, + "Bearer_Token": { + "type": "string", + "description": "Bearer tokens enable requests to authenticate using an access key.", + "nullable": true + }, + "No_Auth": { + "type": "string", + "description": "No authorization. If your request doesn't require authorization.", + "nullable": true + } + }, + "description": "Authorization type for the custom action." + }, + "API_KeyInput": { + "type": "object", + "properties": { + "key": { + "type": "string", + "description": "Enter your key name", + "nullable": true + }, + "value": { + "type": "string", + "description": "Enter you key value", + "nullable": true + } + }, + "description": "With API key auth, you send a key-value pair to the API either in the request headers or query parameters." + }, + "Basic_AuthInput": { + "type": "object", + "properties": { + "password": { + "type": "string", + "description": "Password for the basic authentication", + "nullable": true + }, + "username": { + "type": "string", + "description": "Username for the basic authentication", + "nullable": true + } + }, + "description": "Basic Auth: Basic authentication involves sending a verified username and password with your request." + }, + "ParametersListItemInput": { + "type": "object", + "properties": { + "key": { + "type": "string", + "description": "Key for the url query parameter", + "nullable": true + }, + "value": { + "type": "string", + "description": "Value for the url query parameter", + "nullable": true + } + } + }, + "Associate_Metadata_Input_Create": { + "type": "object", + "required": [ + "identifier" + ], + "properties": { + "action_config": { + "$ref": "#/components/schemas/ActionConfigInputCreate", + "description": "Specify that the association is enabled for the metadata object", + "nullable": true + }, + "identifier": { + "type": "string", + "description": "Unique ID or name of the metadata." + }, + "type": { + "type": "string", + "enum": [ + "VISUALIZATION", + "ANSWER", + "WORKSHEET" + ], + "description": " Type of metadata.\n \n\nRequired if the name of the object is set as the identifier. This attribute is optional when the object GUID is specified as the identifier.", + "nullable": true + } + } + }, + "ActionConfigInputCreate": { + "type": "object", + "properties": { + "position": { + "type": "string", + "enum": [ + "MENU", + "PRIMARY", + "CONTEXT_MENU" + ], + "default": "MENU", + "description": "Position of the Custom action on the Metadata object. Earlier naming convention: context.", + "nullable": true + }, + "visibility": { + "type": "boolean", + "default": true, + "description": "Visibility of the metadata association with custom action. Earlier naming convention: enabled", + "nullable": true + } + }, + "description": "Specify that the association is enabled for the metadata object Default" + }, + "Default_Action_Config_Input_Create": { + "type": "object", + "properties": { + "visibility": { + "type": "boolean", + "default": true, + "description": "Custom action is available on all visualizations. Earlier naming convention: LOCAL/GLOBAL. TRUE signifies GLOBAL for backward compatibility.\nDefault: true", + "nullable": true + } + }, + "description": "Default Custom action configuration. This includes the custom action's visibility across all visualizations and Answers. By default, a custom action is added to all visualizations and Answers." + }, + "Action_Details_Input": { + "type": "object", + "properties": { + "CALLBACK": { + "$ref": "#/components/schemas/CALLBACKInput", + "description": "CALLBACK Custom Action Type", + "nullable": true + }, + "URL": { + "$ref": "#/components/schemas/URLInput", + "description": "URL Custom Action Type", + "nullable": true + } + }, + "description": "Action details includes `Type` and configuration details of Custom Actions. Either Callback or URL is required." + }, + "CALLBACKInput": { + "type": "object", + "properties": { + "reference": { + "type": "string", + "description": "Reference name. By default, the value will be set to action name.", + "nullable": true + } + }, + "description": "CALLBACK Custom Action Type" + }, + "URLInput": { + "type": "object", + "properties": { + "authentication": { + "$ref": "#/components/schemas/AuthenticationInput", + "description": "Authorization type for the custom action.", + "nullable": true + }, + "parameters": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ParametersListItemInput" + }, + "description": "Query parameters for url.", + "nullable": true + }, + "url": { + "type": "string", + "description": "Request Url for the Custom action.", + "nullable": true + }, + "reference": { + "type": "string", + "description": "Reference name. By default the value will be set to action name", + "nullable": true + } + }, + "description": "URL Custom Action Type" + }, + "Associate_Metadata_Input": { + "type": "object", + "properties": { + "action_config": { + "$ref": "#/components/schemas/ActionConfigInput", + "description": "Specify that the association is enabled for the metadata object", + "nullable": true + }, + "identifier": { + "type": "string", + "description": "Unique ID or name of the metadata.", + "nullable": true + }, + "type": { + "type": "string", + "enum": [ + "VISUALIZATION", + "ANSWER", + "WORKSHEET" + ], + "description": " Type of metadata.\n \n\nRequired if the name of the object is set as the identifier. This attribute is optional when the object GUID is specified as the identifier.", + "nullable": true + } + } + }, + "ActionConfigInput": { + "type": "object", + "properties": { + "position": { + "type": "string", + "enum": [ + "MENU", + "PRIMARY", + "CONTEXT_MENU" + ], + "description": "Position of the Custom action on the Metadata object. Earlier naming convention: context.", + "nullable": true + }, + "visibility": { + "type": "boolean", + "description": "Visibility of the metadata association with custom action. Earlier naming convention: enabled", + "nullable": true + } + }, + "description": "Specify that the association is enabled for the metadata object Default" + }, + "Default_Action_Config_Input": { + "type": "object", + "properties": { + "visibility": { + "type": "boolean", + "description": "Custom action is available on all visualizations. Earlier naming convention: LOCAL/GLOBAL. TRUE signifies GLOBAL for backward compatibility.", + "nullable": true + } + }, + "description": "Default Custom action configuration. This includes the custom action's visibility across all visualizations and Answers. By default, a custom action is added to all visualizations and Answers." + }, + "ModelTableList": { + "type": "object", + "required": [ + "model_name", + "tables" + ], + "properties": { + "model_name": { + "type": "string", + "description": "Name of the Model." + }, + "model_path": { + "type": "string", + "description": "Model directory path, this is optional param and required if there are duplicate models with the same name.", + "nullable": true + }, + "tables": { + "type": "array", + "items": { + "type": "string" + }, + "description": "List of Tables." + } + } + }, + "DbtSearchResponse": { + "type": "object", + "properties": { + "dbt_connection_identifier": { + "type": "string", + "nullable": true + }, + "project_name": { + "type": "string", + "nullable": true + }, + "connection_id": { + "type": "string", + "nullable": true + }, + "connection_name": { + "type": "string", + "nullable": true + }, + "cdw_database": { + "type": "string", + "nullable": true + }, + "import_type": { + "type": "string", + "nullable": true + }, + "author_name": { + "type": "string", + "nullable": true + } + } + }, + "Conversation": { + "type": "object", + "required": [ + "conversation_identifier" + ], + "properties": { + "conversation_identifier": { + "type": "string", + "description": "Unique identifier of the conversation." + } + } + }, + "ResponseMessage": { + "type": "object", + "required": [ + "message_type" + ], + "properties": { + "session_identifier": { + "type": "string", + "description": "Unique identifier of the generated response.", + "nullable": true + }, + "generation_number": { + "type": "integer", + "format": "int32", + "description": "Generate number of the response.", + "nullable": true + }, + "message_type": { + "type": "string", + "enum": [ + "TSAnswer" + ], + "description": "Type of the generated response." + }, + "visualization_type": { + "type": "string", + "enum": [ + "Chart", + "CHART", + "Table", + "TABLE", + "Undefined", + "UNDEFINED" + ], + "description": "Generated visualization type.", + "nullable": true + }, + "tokens": { + "type": "string", + "description": "Tokens for the response.", + "nullable": true + }, + "display_tokens": { + "type": "string", + "description": "User friendly tokens for the response.", + "nullable": true + } + } + }, + "ContextPayloadV2Input": { + "type": "object", + "properties": { + "type": { + "type": "string", + "enum": [ + "data_source", + "DATA_SOURCE", + "AUTO_MODE" + ], + "description": "Type of the context.", + "nullable": true + }, + "data_source_context": { + "$ref": "#/components/schemas/DataSourceContextInput", + "description": "Data source context.", + "nullable": true + } + } + }, + "DataSourceContextInput": { + "type": "object", + "properties": { + "data_source_identifier": { + "type": "string", + "description": "Unique identifier of the data source.\nRequired when context type is DATA_SOURCE and `data_source_identifiers` is not provided.\nAt least one of `data_source_identifier` or `data_source_identifiers` must be supplied for DATA_SOURCE context;\nomit only when context type is AUTO_MODE.
Version: 26.5.0.cl or later", + "nullable": true + }, + "data_source_identifiers": { + "type": "array", + "items": { + "type": "string" + }, + "description": "Unique identifiers of data sources for multi-data-source context.\nRequired when context type is DATA_SOURCE and `data_source_identifier` is not provided.
Version: 26.5.0.cl or later", + "nullable": true + }, + "guid": { + "type": "string", + "description": "Deprecated. Use `data_source_identifier` instead.\nPreviously required when neither `data_source_identifier` nor `data_source_identifiers` was provided for DATA_SOURCE context.
Version: 26.2.0.cl or later", + "nullable": true + } + } + }, + "ConversationSettingsInput": { + "type": "object", + "properties": { + "enable_contextual_change_analysis": { + "type": "boolean", + "default": true, + "description": "Enable contextual change analysis.\nDefault changed from `false` to `true` in 26.2.0.cl.\nIgnored on versions >= 26.2.0.cl where it is always enabled.
Version: 10.4.0.cl or later", + "nullable": true + }, + "enable_natural_language_answer_generation": { + "type": "boolean", + "default": true, + "description": "Enable natural language to answer generation.\nDefault changed from `false` to `true` in 26.2.0.cl.\nIgnored on versions >= 26.2.0.cl where it is always enabled.
Version: 10.4.0.cl or later", + "nullable": true + }, + "enable_reasoning": { + "type": "boolean", + "default": true, + "description": "Enable reasoning.\nDefault changed from `false` to `true` in 26.2.0.cl.\nIgnored on versions >= 26.2.0.cl where it is always enabled.
Version: 10.4.0.cl or later", + "nullable": true + }, + "enable_save_chat": { + "type": "boolean", + "default": false, + "description": "Enable save conversation. When `true`, the conversation is persisted\nand can be retrieved later via conversation history.
Version: 26.5.0.cl or later", + "nullable": true + } + } + }, + "AgentConversation": { + "type": "object", + "required": [ + "conversation_id", + "conversation_identifier" + ], + "properties": { + "conversation_id": { + "type": "string", + "description": "Unique identifier of the conversation." + }, + "conversation_identifier": { + "type": "string", + "description": "Unique identifier of the conversation.
Version: 26.5.0.cl or later" + } + } + }, + "SendAgentMessageResponse": { + "type": "object", + "required": [ + "success" + ], + "properties": { + "success": { + "type": "boolean", + "description": "Indicates whether the agent response was received and processed successfully." + }, + "message": { + "type": "string", + "description": "Optional message providing additional context about the operation outcome.", + "nullable": true + } + } + }, + "NLInstructionsInfoInput": { + "type": "object", + "required": [ + "instructions", + "scope" + ], + "properties": { + "instructions": { + "type": "array", + "items": { + "type": "string" + }, + "description": "User instructions for natural language processing." + }, + "scope": { + "type": "string", + "enum": [ + "GLOBAL" + ], + "description": "Scope of the instruction (USER or GLOBAL). Defaults to GLOBAL." + } + } + }, + "eureka_SetNLInstructionsResponse": { + "type": "object", + "required": [ + "success" + ], + "properties": { + "success": { + "type": "boolean", + "description": "Success status of the operation." + } + } + }, + "VariableUpdateAssignmentInput": { + "type": "object", + "required": [ + "variable_identifier", + "variable_values", + "operation" + ], + "properties": { + "variable_identifier": { + "type": "string", + "description": "ID or Name of the variable" + }, + "variable_values": { + "type": "array", + "items": { + "type": "string" + }, + "description": "Values of the variable" + }, + "operation": { + "type": "string", + "enum": [ + "ADD", + "REMOVE", + "REPLACE", + "RESET" + ], + "description": "Operation to perform" + } + }, + "description": "Input for variable value update in batch operations" + }, + "VariableUpdateScopeInput": { + "type": "object", + "required": [ + "org_identifier" + ], + "properties": { + "org_identifier": { + "type": "string", + "description": "The unique name of the org" + }, + "principal_type": { + "type": "string", + "enum": [ + "USER", + "USER_GROUP" + ], + "description": "Type of principal to which the variable value applies. Use USER to assign values to a specific user, or USER_GROUP to assign values to a group.", + "nullable": true + }, + "principal_identifier": { + "type": "string", + "description": "Unique ID or name of the principal", + "nullable": true + }, + "model_identifier": { + "type": "string", + "description": "Unique ID or name of the model. Required for FORMULA_VARIABLE type to scope the variable value to a specific worksheet.", + "nullable": true + }, + "priority": { + "type": "integer", + "format": "int32", + "description": "The priority level for this scope assignment, used for conflict resolution when multiple values match. Higher priority values (larger numbers) take precedence.", + "nullable": true + } + }, + "description": "Input for defining the scope of variable value assignments in batch update operations" + }, + "VariablePutAssignmentInput": { + "type": "object", + "required": [ + "assigned_values" + ], + "properties": { + "assigned_values": { + "type": "array", + "items": { + "type": "string" + }, + "description": "Values of the variable" + }, + "org_identifier": { + "type": "string", + "description": "The unique name of the org", + "nullable": true + }, + "principal_type": { + "type": "string", + "enum": [ + "USER", + "USER_GROUP" + ], + "description": "Principal type", + "nullable": true + }, + "principal_identifier": { + "type": "string", + "description": "Unique ID or name of the principal", + "nullable": true + }, + "model_identifier": { + "type": "string", + "description": "Unique ID of the model", + "nullable": true + }, + "priority": { + "type": "integer", + "format": "int32", + "description": "Priority level", + "nullable": true + } + }, + "description": "Input for variable value put operations" + }, + "CreateEmailCustomizationResponse": { + "type": "object", + "required": [ + "tenant_id", + "org", + "name", + "template_properties" + ], + "properties": { + "tenant_id": { + "type": "string", + "description": "Tenant ID" + }, + "org": { + "$ref": "#/components/schemas/OrgType", + "description": "Email customization org" + }, + "name": { + "type": "string", + "description": "Email customization name." + }, + "template_properties": { + "type": "object", + "description": "Customization configuration for the email" + } + } + }, + "OrgType": { + "type": "object", + "properties": { + "name": { + "type": "string", + "nullable": true + }, + "id": { + "type": "integer", + "format": "int32", + "nullable": true + } + } + }, + "Template_Properties_Input_Create": { + "type": "object", + "properties": { + "cta_button_bg_color": { + "type": "string", + "description": "Background color for call-to-action button in hex format", + "nullable": true + }, + "cta_text_font_color": { + "type": "string", + "description": "Text color for call-to-action button in hex format", + "nullable": true + }, + "primary_bg_color": { + "type": "string", + "description": "Primary background color in hex format", + "nullable": true + }, + "home_url": { + "type": "string", + "description": "Home page URL (HTTP/HTTPS only)", + "nullable": true + }, + "logo_url": { + "type": "string", + "description": "Logo image URL (HTTP/HTTPS only)", + "nullable": true + }, + "font_family": { + "type": "string", + "description": "Font family for email content (e.g., Arial, sans-serif)", + "nullable": true + }, + "product_name": { + "type": "string", + "description": "Product name to display", + "nullable": true + }, + "footer_address": { + "type": "string", + "description": "Footer address text", + "nullable": true + }, + "footer_phone": { + "type": "string", + "description": "Footer phone number", + "nullable": true + }, + "replacement_value_for_liveboard": { + "type": "string", + "description": "Replacement value for Liveboard", + "nullable": true + }, + "replacement_value_for_answer": { + "type": "string", + "description": "Replacement value for Answer", + "nullable": true + }, + "replacement_value_for_spot_iq": { + "type": "string", + "description": "Replacement value for SpotIQ", + "nullable": true + }, + "hide_footer_address": { + "type": "boolean", + "description": "Whether to hide footer address", + "nullable": true + }, + "hide_footer_phone": { + "type": "boolean", + "description": "Whether to hide footer phone number", + "nullable": true + }, + "hide_manage_notification": { + "type": "boolean", + "description": "Whether to hide manage notification link", + "nullable": true + }, + "hide_mobile_app_nudge": { + "type": "boolean", + "description": "Whether to hide mobile app nudge", + "nullable": true + }, + "hide_privacy_policy": { + "type": "boolean", + "description": "Whether to hide privacy policy link", + "nullable": true + }, + "hide_product_name": { + "type": "boolean", + "description": "Whether to hide product name", + "nullable": true + }, + "hide_ts_vocabulary_definitions": { + "type": "boolean", + "description": "Whether to hide ThoughtSpot vocabulary definitions", + "nullable": true + }, + "hide_notification_status": { + "type": "boolean", + "description": "Whether to hide notification status", + "nullable": true + }, + "hide_error_message": { + "type": "boolean", + "description": "Whether to hide error message", + "nullable": true + }, + "hide_unsubscribe_link": { + "type": "boolean", + "description": "Whether to hide unsubscribe link", + "nullable": true + }, + "hide_modify_alert": { + "type": "boolean", + "description": "Whether to hide modify alert", + "nullable": true + }, + "company_privacy_policy_url": { + "type": "string", + "description": "Company privacy policy URL (HTTP/HTTPS only)", + "nullable": true + }, + "company_website_url": { + "type": "string", + "description": "Company website URL (HTTP/HTTPS only)", + "nullable": true + }, + "contact_support_url": { + "type": "string", + "description": "Contact support url (HTTP/HTTPS only).
Version: 26.2.0.cl or later", + "nullable": true + }, + "hide_contact_support_url": { + "type": "boolean", + "description": "Whether to hide contact support url.
Version: 26.2.0.cl or later", + "nullable": true + }, + "hide_logo_url": { + "type": "boolean", + "description": "Whether to hide logo
Version: 26.4.0.cl or later", + "nullable": true + } + }, + "description": "Email customization configuration properties" + }, + "ExternalTableInput": { + "type": "object", + "required": [ + "connection_identifier", + "table_name" + ], + "properties": { + "connection_identifier": { + "type": "string", + "description": "Unique ID or name of the connection." + }, + "database_name": { + "type": "string", + "default": "", + "description": "Name of the database.", + "nullable": true + }, + "schema_name": { + "type": "string", + "default": "", + "description": "Name of the schema.", + "nullable": true + }, + "table_name": { + "type": "string", + "description": "Name of the table. Table names may be case-sensitive depending on the database system." + } + } + }, + "InputTableDefinitionInput": { + "type": "object", + "required": [ + "new_columns", + "referenced_columns" + ], + "properties": { + "new_columns": { + "type": "array", + "items": { + "$ref": "#/components/schemas/InputColumnSchemaInput" + }, + "description": "New input-only columns to create in the table." + }, + "referenced_columns": { + "type": "array", + "items": { + "type": "string" + }, + "description": "Column IDs from the linked model to include in the table.\nPass an empty array to create an input table with no reference\ncolumns from the model." + } + }, + "description": "Definition of the input table schema." + }, + "InputColumnSchemaInput": { + "type": "object", + "required": [ + "name", + "data_type", + "type" + ], + "properties": { + "name": { + "type": "string", + "description": "Name of the column." + }, + "data_type": { + "type": "string", + "description": "Physical data type of the column as recognized by the connected\nwarehouse (for example, VARCHAR, INT64, DOUBLE, BOOL, DATE).\nThe accepted values depend on the underlying Cloud Data Warehouse." + }, + "type": { + "type": "string", + "enum": [ + "ATTRIBUTE", + "MEASURE" + ], + "description": "Semantic role of the column in ThoughtSpot. Use ATTRIBUTE for\ndimensional data such as text, dates, and identifiers, and\nMEASURE for numeric or aggregatable values." + } + }, + "description": "Schema definition for a single input column." + }, + "InputTableResponse": { + "type": "object", + "properties": { + "input_table_identifier": { + "type": "string", + "description": "Unique ID of the newly created input table.", + "nullable": true + } + } + }, + "InputTableUpdateResponse": { + "type": "object", + "properties": { + "rows_loaded": { + "type": "integer", + "format": "int32", + "description": "Number of rows successfully written to the input table.", + "nullable": true + } + }, + "description": "Response returned after successfully writing rows to an input table." + }, + "PolicyProcessOptionsInput": { + "type": "object", + "properties": { + "impersonate_user": { + "type": "string", + "nullable": true + } + } + }, + "WebhookAuthenticationInput": { + "type": "object", + "properties": { + "API_KEY": { + "$ref": "#/components/schemas/WebhookAuthApiKeyInput", + "description": "API key authentication configuration.", + "nullable": true + }, + "BASIC_AUTH": { + "$ref": "#/components/schemas/WebhookAuthBasicAuthInput", + "description": "Basic authentication configuration.", + "nullable": true + }, + "BEARER_TOKEN": { + "type": "string", + "description": "Bearer token authentication configuration.", + "nullable": true + }, + "OAUTH2": { + "$ref": "#/components/schemas/WebhookAuthOAuth2Input", + "description": "OAuth2 authentication configuration.", + "nullable": true + } + } + }, + "WebhookAuthApiKeyInput": { + "type": "object", + "required": [ + "key", + "value" + ], + "properties": { + "key": { + "type": "string", + "description": "The header or query parameter name for the API key." + }, + "value": { + "type": "string", + "description": "The API key value." + } + } + }, + "WebhookAuthBasicAuthInput": { + "type": "object", + "required": [ + "username", + "password" + ], + "properties": { + "username": { + "type": "string", + "description": "Username for basic authentication." + }, + "password": { + "type": "string", + "description": "Password for basic authentication." + } + } + }, + "WebhookAuthOAuth2Input": { + "type": "object", + "required": [ + "authorization_url", + "client_id", + "client_secret" + ], + "properties": { + "authorization_url": { + "type": "string", + "description": "OAuth2 authorization server URL." + }, + "client_id": { + "type": "string", + "description": "OAuth2 client identifier." + }, + "client_secret": { + "type": "string", + "description": "OAuth2 client secret key." + } + } + }, + "WebhookSignatureVerificationInput": { + "type": "object", + "required": [ + "type", + "header", + "algorithm", + "secret" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "HMAC_SHA256" + ], + "description": "Signature verification method type." + }, + "header": { + "type": "string", + "description": "HTTP header where the signature is sent." + }, + "algorithm": { + "type": "string", + "enum": [ + "SHA256" + ], + "description": "Hash algorithm used for signature verification." + }, + "secret": { + "type": "string", + "description": "Shared secret used for HMAC signature generation." + } + } + }, + "StorageDestinationInput": { + "type": "object", + "required": [ + "storage_type", + "storage_config" + ], + "properties": { + "storage_type": { + "type": "string", + "enum": [ + "AWS_S3", + "GCP_GCS" + ], + "description": "Type of storage destination.\nExample: \"AWS_S3\"" + }, + "storage_config": { + "$ref": "#/components/schemas/StorageConfigInput", + "description": "Storage-specific configuration settings.\nExample: {\"aws_s3_config\": {\"bucket_name\": \"my-webhook-files\", \"region\": \"us-west-2\", \"role_arn\": \"arn:aws:iam::123456789012:role/WebhookDeliveryRole\", \"external_id\": \"ts-webhook-a1b2c3d4-7890\", \"path_prefix\": \"webhook-deliveries/\"}}" + } + }, + "description": "Input type for storage destination configuration." + }, + "StorageConfigInput": { + "type": "object", + "properties": { + "aws_s3_config": { + "$ref": "#/components/schemas/AwsS3ConfigInput", + "description": "AWS S3 storage configuration.\nExample: {\"bucket_name\": \"my-webhook-files\", \"region\": \"us-west-2\", \"role_arn\": \"arn:aws:iam::123456789012:role/WebhookDeliveryRole\", \"external_id\": \"ts-webhook-a1b2c3d4-7890\", \"path_prefix\": \"webhook-deliveries/\"}", + "nullable": true + }, + "gcp_gcs_config": { + "$ref": "#/components/schemas/GcpGcsConfigInput", + "description": "GCP GCS storage configuration.\nExample: {\"bucket_name\": \"my-webhook-files\", \"service_account_email\": \"my-sa@my-project.iam.gserviceaccount.com\", \"path_prefix\": \"webhooks/\"}
Version: 26.7.0.cl or later", + "nullable": true + } + }, + "description": "Input type for storage configuration." + }, + "AwsS3ConfigInput": { + "type": "object", + "required": [ + "bucket_name", + "region", + "role_arn" + ], + "properties": { + "bucket_name": { + "type": "string", + "description": "Name of the S3 bucket where webhook payloads will be stored.\nExample: \"my-webhook-files\"" + }, + "region": { + "type": "string", + "description": "AWS region where the S3 bucket is located.\nExample: \"us-west-2\"" + }, + "role_arn": { + "type": "string", + "description": "ARN of the IAM role to assume for S3 access.\nExample: \"arn:aws:iam::123456789012:role/WebhookDeliveryRole\"" + }, + "external_id": { + "type": "string", + "description": "External ID for secure cross-account role assumption.\nExample: \"ts-webhook-a1b2c3d4-7890\"", + "nullable": true + }, + "path_prefix": { + "type": "string", + "description": "Optional path prefix for organizing objects within the bucket.\nExample: \"webhook-deliveries/\"", + "nullable": true + } + }, + "description": "Input type for AWS S3 storage configuration." + }, + "GcpGcsConfigInput": { + "type": "object", + "required": [ + "bucket_name", + "service_account_email" + ], + "properties": { + "bucket_name": { + "type": "string", + "description": "Name of the GCS bucket where webhook payloads will be stored.\nExample: \"my-webhook-files\"" + }, + "service_account_email": { + "type": "string", + "description": "Email of the GCP service account to impersonate for bucket access.\nThe platform's service account must be granted roles/iam.serviceAccountTokenCreator on this SA.\nExample: \"my-sa@my-project.iam.gserviceaccount.com\"" + }, + "path_prefix": { + "type": "string", + "description": "Optional path prefix for organizing objects within the bucket.\nExample: \"webhooks/\"", + "nullable": true + } + }, + "description": "Input type for GCP GCS storage configuration." + }, + "WebhookKeyValuePairInput": { + "type": "object", + "required": [ + "key", + "value" + ], + "properties": { + "key": { + "type": "string", + "description": "Header name." + }, + "value": { + "type": "string", + "description": "Header value." + } + }, + "description": "Key-value pair input for additional webhook headers." + }, + "WebhookDeleteResponse": { + "type": "object", + "required": [ + "deleted_count", + "failed_count", + "deleted_webhooks", + "failed_webhooks" + ], + "properties": { + "deleted_count": { + "type": "integer", + "format": "int32", + "description": "Number of webhooks successfully deleted." + }, + "failed_count": { + "type": "integer", + "format": "int32", + "description": "Number of webhooks that failed to delete." + }, + "deleted_webhooks": { + "type": "array", + "items": { + "$ref": "#/components/schemas/WebhookResponse" + }, + "description": "List of successfully deleted webhooks." + }, + "failed_webhooks": { + "type": "array", + "items": { + "$ref": "#/components/schemas/WebhookDeleteFailure" + }, + "description": "List of webhooks that failed to delete with error details." + } + } + }, + "WebhookDeleteFailure": { + "type": "object", + "required": [ + "id", + "name", + "error" + ], + "properties": { + "id": { + "type": "string", + "description": "Unique identifier of the webhook that failed to delete." + }, + "name": { + "type": "string", + "description": "Name of the webhook that failed to delete." + }, + "error": { + "type": "string", + "description": "Error message describing why the deletion failed." + } + } + }, + "CollectionMetadataInput": { + "type": "object", + "required": [ + "type", + "identifiers" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "LIVEBOARD", + "ANSWER", + "LOGICAL_TABLE", + "COLLECTION" + ], + "description": "Type of metadata object." + }, + "identifiers": { + "type": "array", + "items": { + "type": "string" + }, + "description": "List of unique IDs or names of metadata objects." + } + }, + "description": "Input type for metadata to be added to a collection." + }, + "CollectionDeleteResponse": { + "type": "object", + "properties": { + "metadata_deleted": { + "type": "array", + "items": { + "$ref": "#/components/schemas/CollectionDeleteTypeIdentifiers" + }, + "description": "List of metadata objects that were successfully deleted.", + "nullable": true + }, + "metadata_skipped": { + "type": "array", + "items": { + "$ref": "#/components/schemas/CollectionDeleteTypeIdentifiers" + }, + "description": "List of metadata objects that were skipped during deletion.\nObjects may be skipped due to lack of permissions, dependencies, or other constraints.", + "nullable": true + } + }, + "description": "Response object for delete collection operation." + }, + "CollectionDeleteTypeIdentifiers": { + "type": "object", + "properties": { + "type": { + "type": "string", + "description": "Type of the metadata object (e.g., Collection, Worksheet, Table).", + "nullable": true + }, + "identifiers": { + "type": "array", + "items": { + "$ref": "#/components/schemas/GenericInfo" + }, + "description": "List of metadata identifiers belonging to the given type.", + "nullable": true + } + }, + "description": "Group of metadata objects identified by type." + }, + "StyleResetOptionsInput": { + "type": "object", + "properties": { + "style": { + "type": "array", + "items": { + "type": "string", + "enum": [ + "CHART_COLOR_PALETTE", + "EMBEDDED_FOOTER_TEXT", + "NAV_PANEL_COLOR", + "DEFAULT_LOGO", + "WIDE_LOGO" + ] + }, + "description": "Style fields to reset. Supported values: CHART_COLOR_PALETTE,\nEMBEDDED_FOOTER_TEXT, NAV_PANEL_COLOR, DEFAULT_LOGO, WIDE_LOGO.", + "nullable": true + }, + "visualization_areas": { + "type": "array", + "items": { + "type": "string", + "enum": [ + "CHART_X_AXIS_LABELS", + "CHART_X_AXIS_TITLE", + "CHART_Y_AXIS_LABELS", + "CHART_Y_AXIS_TITLE", + "CHART_TOOLTIP", + "CHART_SCATTER_DATA_LABELS", + "CHART_DONUT_DATA_LABELS", + "CHART_LINE_DATA_LABELS", + "CHART_COLUMN_DATA_LABELS", + "CHART_BAR_DATA_LABELS", + "CHART_AREA_DATA_LABELS", + "TABLE_VALUE_CELLS", + "ADVANCED_CHART_LABELS" + ] + }, + "description": "Visualization areas whose font assignments should revert to the system\ndefault font.", + "nullable": true + } + }, + "description": "Fields to revert to defaults when operation is RESET." + }, + "NavigationPanelInput": { + "type": "object", + "properties": { + "theme": { + "type": "string", + "enum": [ + "DARK", + "TWO_TONE", + "CUSTOM" + ], + "description": "Color mode for the navigation panel. DARK applies the default dark theme.\nTWO_TONE applies a dual-tone style. CUSTOM enables a user-defined base\ncolor; base_color is required when theme is CUSTOM.", + "nullable": true + }, + "base_color": { + "type": "string", + "description": "Base color as a 6-digit hex string (e.g. \"#2359B6\"). Required when theme\nis CUSTOM.", + "nullable": true + } + }, + "description": "Navigation panel color configuration." + }, + "StyleColorPaletteInput": { + "type": "object", + "properties": { + "colors": { + "type": "array", + "items": { + "$ref": "#/components/schemas/StyleColorEntryInput" + }, + "description": "Ordered array of exactly 8 color entries defining the chart color palette.", + "nullable": true + }, + "disable_color_rotation": { + "type": "boolean", + "description": "When true, disables automatic color rotation across chart data series.", + "nullable": true + } + }, + "description": "Chart color palette configuration." + }, + "StyleColorEntryInput": { + "type": "object", + "required": [ + "primary" + ], + "properties": { + "primary": { + "type": "string", + "description": "Primary color as a 6-digit hex string (e.g. \"#2359B6\"). Required." + }, + "secondary": { + "type": "array", + "items": { + "type": "string" + }, + "description": "Array of exactly 4 secondary shade hex strings. If omitted, the server\nauto-generates 4 shades from the primary color. If provided, must contain\nexactly 4 valid 6-digit hex color strings.", + "nullable": true + } + }, + "description": "A single color entry in the chart color palette." + }, + "VisualizationFontsInput": { + "type": "object", + "properties": { + "chart_visualization_fonts": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ChartFontAssignmentInput" + }, + "description": "Font assignments for chart visualization areas. Provide only the areas to\nupdate; omitted areas remain unchanged.", + "nullable": true + }, + "table_visualization_fonts": { + "type": "array", + "items": { + "$ref": "#/components/schemas/TableFontAssignmentInput" + }, + "description": "Font assignments for table visualization areas. Provide only the areas to\nupdate; omitted areas remain unchanged.", + "nullable": true + }, + "advanced_chart_visualization_fonts": { + "type": "array", + "items": { + "$ref": "#/components/schemas/AdvancedChartFontAssignmentInput" + }, + "description": "Font assignments for advanced chart visualization areas. Provide only the\nareas to update; omitted areas remain unchanged.
Version: 26.7.0.cl or later", + "nullable": true + } + }, + "description": "Font assignments grouped by visualization type." + }, + "ChartFontAssignmentInput": { + "type": "object", + "required": [ + "visualization_area", + "font_identifier" + ], + "properties": { + "visualization_area": { + "type": "string", + "enum": [ + "CHART_X_AXIS_LABELS", + "CHART_X_AXIS_TITLE", + "CHART_Y_AXIS_LABELS", + "CHART_Y_AXIS_TITLE", + "CHART_TOOLTIP", + "CHART_SCATTER_DATA_LABELS", + "CHART_DONUT_DATA_LABELS", + "CHART_LINE_DATA_LABELS", + "CHART_COLUMN_DATA_LABELS", + "CHART_BAR_DATA_LABELS", + "CHART_AREA_DATA_LABELS" + ], + "description": "Chart visualization area to assign the font to." + }, + "font_identifier": { + "type": "string", + "description": "UUID or name of the font to assign to this area." + } + }, + "description": "Font assignment for a single chart visualization area." + }, + "TableFontAssignmentInput": { + "type": "object", + "required": [ + "visualization_area", + "font_identifier" + ], + "properties": { + "visualization_area": { + "type": "string", + "enum": [ + "TABLE_VALUE_CELLS" + ], + "description": "Table visualization area to assign the font to." + }, + "font_identifier": { + "type": "string", + "description": "UUID or name of the font to assign to this area." + } + }, + "description": "Font assignment for a single table visualization area." + }, + "AdvancedChartFontAssignmentInput": { + "type": "object", + "required": [ + "visualization_area", + "font_identifier" + ], + "properties": { + "visualization_area": { + "type": "string", + "enum": [ + "ADVANCED_CHART_LABELS" + ], + "description": "Advanced chart visualization area to assign the font to.
Version: 26.7.0.cl or later" + }, + "font_identifier": { + "type": "string", + "description": "UUID or name of the font to assign to this area.
Version: 26.7.0.cl or later" + } + }, + "description": "Font assignment for a single advanced chart visualization area." + }, + "StyleFontUploadData": { + "type": "object", + "required": [ + "id", + "name" + ], + "properties": { + "id": { + "type": "string", + "description": "Unique UUID identifier of the uploaded font." + }, + "name": { + "type": "string", + "description": "Display name of the uploaded font." + } + }, + "description": "Font data returned after a successful upload." + }, + "StyleFontDeleteData": { + "type": "object", + "properties": { + "affected_assignments": { + "type": "array", + "items": { + "$ref": "#/components/schemas/StyleFontDeleteAffectedAssignment" + }, + "description": "Visualization areas that used the deleted font(s) and were automatically\nreset to the system default font. Empty if no areas were affected.", + "nullable": true + } + }, + "description": "Result data for font deletion." + }, + "StyleFontDeleteAffectedAssignment": { + "type": "object", + "properties": { + "org": { + "$ref": "#/components/schemas/StyleOrgInfo", + "description": "Org context for this assignment. Present only when scope is ORG.", + "nullable": true + }, + "visualization_areas": { + "type": "array", + "items": { + "type": "string", + "enum": [ + "CHART_X_AXIS_LABELS", + "CHART_X_AXIS_TITLE", + "CHART_Y_AXIS_LABELS", + "CHART_Y_AXIS_TITLE", + "CHART_TOOLTIP", + "CHART_SCATTER_DATA_LABELS", + "CHART_DONUT_DATA_LABELS", + "CHART_LINE_DATA_LABELS", + "CHART_COLUMN_DATA_LABELS", + "CHART_BAR_DATA_LABELS", + "CHART_AREA_DATA_LABELS", + "TABLE_VALUE_CELLS", + "ADVANCED_CHART_LABELS" + ] + }, + "description": "Visualization areas that used the deleted font and were automatically reset\nto the system default font.", + "nullable": true + } + }, + "description": "A visualization area assignment affected by a font deletion." + }, + "Runtime_Filter": { + "type": "object", + "properties": { + "runtime_filter": { + "type": "object", + "description": "Runtime filter parameter type in JWT." + } + }, + "description": "List of runtime parameters need to set during the session." + }, + "Runtime_Sort": { + "type": "object", + "properties": { + "runtime_sort": { + "type": "object", + "description": "Runtime sort parameter type in JWT." + } + }, + "description": "List of runtime parameters need to set during the session." + }, + "Runtime_Param_Override": { + "type": "object", + "properties": { + "runtime_param_override": { + "type": "object", + "description": "Runtime param override type in JWT." + } + }, + "description": "List of runtime parameters need to set during the session." + }, + "CreateAgentConversationRequest": { + "type": "object", + "properties": { + "metadata_context": { + "description": "Context for the conversation.", + "allOf": [ + { + "$ref": "#/components/schemas/ContextPayloadV2Input" + } + ] + }, + "conversation_settings": { + "description": "Conversation settings.", + "allOf": [ + { + "$ref": "#/components/schemas/ConversationSettingsInput" + } + ] + } + }, + "required": [ + "metadata_context", + "conversation_settings" + ] + }, + "CreateConversationRequest": { + "type": "object", + "properties": { + "metadata_identifier": { + "description": "ID of the metadata object, such as a Worksheet or Model, to use as a data source for the conversation.", + "type": "string" + }, + "tokens": { + "description": "Token string to set the context for the conversation. For example,`[sales],[item type],[state]`.", + "type": "string" + } + }, + "required": [ + "metadata_identifier" + ] + }, + "GetDataSourceSuggestionsRequest": { + "type": "object", + "properties": { + "query": { + "description": "User query used to suggest data sources. Must be a non-empty string.", + "type": "string" + } + }, + "required": [ + "query" + ] + }, + "GetNLInstructionsRequest": { + "type": "object", + "properties": { + "data_source_identifier": { + "description": "Unique ID or name of the data-model for which to retrieve NL instructions.", + "type": "string" + } + }, + "required": [ + "data_source_identifier" + ] + }, + "GetRelevantQuestionsRequest": { + "type": "object", + "properties": { + "metadata_context": { + "description": "metadata for the query to enable generation of relevant sub-questions; at least one context identifier is required.", + "allOf": [ + { + "$ref": "#/components/schemas/MetadataContext" + } + ] + }, + "limit_relevant_questions": { + "description": "Maximum number of relevant questions that is allowed in the response, default = 5.", + "type": "integer", + "format": "int32" + }, + "bypass_cache": { + "description": "If true, results are not returned from cache & calculated every time.", + "type": "boolean", + "nullable": true + }, + "query": { + "description": "A user query that requires breaking down into smaller, more manageable analytical questions to facilitate better understanding and analysis. Must be a non-empty string.", + "type": "string" + }, + "ai_context": { + "description": "Additional context to guide the response.", + "allOf": [ + { + "$ref": "#/components/schemas/AIContext" + } + ] + } + }, + "required": [ + "metadata_context", + "query" + ] + }, + "QueryGetDecomposedQueryRequest": { + "type": "object", + "properties": { + "answerIds": { + "description": "List of answer unique identifiers (GUIDs) whose data will be used to guide the response.", + "type": "array", + "items": { + "type": "string" + } + }, + "content": { + "description": "User provided content like text data, csv data as a string message to provide context & potentially improve the quality of the response.", + "type": "array", + "items": { + "type": "string" + } + }, + "conversationId": { + "description": "Unique identifier to denote current conversation.", + "type": "string" + }, + "liveboardIds": { + "description": "List of liveboard unique identifiers (GUIDs) whose data will be used to guide the response.", + "type": "array", + "items": { + "type": "string" + } + }, + "maxDecomposedQueries": { + "description": "Maximum number of decomposed queries that is allowed in the response, default = 5.", + "type": "integer", + "format": "int32" + }, + "nlsRequest": { + "description": "NLSRequest object containing user query & instructions.", + "allOf": [ + { + "$ref": "#/components/schemas/Input_eureka_NLSRequest" + } + ] + }, + "worksheetIds": { + "description": "List of worksheetIds to provide context for decomposing user query into analytical queries that can be run on them.", + "type": "array", + "items": { + "type": "string" + } + } + } + }, + "SendAgentConversationMessageRequest": { + "type": "object", + "properties": { + "messages": { + "description": "messages to be sent to the agent", + "type": "array", + "items": { + "type": "string" + } + } + }, + "required": [ + "messages" + ] + }, + "SendAgentConversationMessageStreamingRequest": { + "type": "object", + "properties": { + "messages": { + "description": "messages to be sent to the agent", + "type": "array", + "items": { + "type": "string" + } + } + }, + "required": [ + "messages" + ] + }, + "SendAgentMessageRequest": { + "type": "object", + "properties": { + "messages": { + "description": "messages to be sent to the agent", + "type": "array", + "items": { + "type": "string" + } + } + }, + "required": [ + "messages" + ] + }, + "SendAgentMessageStreamingRequest": { + "type": "object", + "properties": { + "conversation_identifier": { + "description": "Unique identifier for the conversation (used to track context)", + "type": "string" + }, + "messages": { + "description": "messages to be sent to the agent", + "type": "array", + "items": { + "type": "string" + } + } + }, + "required": [ + "conversation_identifier", + "messages" + ] + }, + "SendMessageRequest": { + "type": "object", + "properties": { + "metadata_identifier": { + "description": "ID of the metadata object, such as a Worksheet or Model, to use as a data source for the conversation.", + "type": "string" + }, + "message": { + "description": "A message string with the follow-up question to continue the conversation.", + "type": "string" + } + }, + "required": [ + "metadata_identifier", + "message" + ] + }, + "SetAgentInstructionsRequest": { + "type": "object", + "properties": { + "instructions": { + "description": "The admin instructions text to set for the agent.", + "type": "string" + } + }, + "required": [ + "instructions" + ] + }, + "SetNLInstructionsRequest": { + "type": "object", + "properties": { + "data_source_identifier": { + "description": "Unique ID or name of the data-model for which to set NL instructions.", + "type": "string" + }, + "nl_instructions_info": { + "description": "List of NL instructions to set for the data-model.", + "type": "array", + "items": { + "$ref": "#/components/schemas/NLInstructionsInfoInput" + } + } + }, + "required": [ + "data_source_identifier", + "nl_instructions_info" + ] + }, + "SingleAnswerRequest": { + "type": "object", + "properties": { + "query": { + "description": "A natural language query string to generate the Answer.", + "type": "string" + }, + "metadata_identifier": { + "description": "ID of the metadata object, such as a Worksheet or Model, to use as a data source for the query.", + "type": "string" + } + }, + "required": [ + "query", + "metadata_identifier" + ] + }, + "UpdateConversationRequest": { + "type": "object", + "properties": { + "title": { + "description": "New display title for the conversation. Omit to leave the title\nunchanged.", + "type": "string" + } + } + }, + "ConfigureAuthSettingsRequest": { + "type": "object", + "properties": { + "auth_type": { + "description": "Type of authentication mechanism to configure. Currently supports TRUSTED_AUTH.", + "type": "string", + "enum": [ + "TRUSTED_AUTH" + ] + }, + "cluster_preferences": { + "description": "Cluster-level authentication preferences. Omit to leave the existing cluster setting unchanged.", + "allOf": [ + { + "$ref": "#/components/schemas/AuthClusterPreferencesInput" + } + ] + }, + "org_preferences": { + "description": "Org-level authentication preferences. Each entry identifies an org and the desired status. Omit to leave existing org settings unchanged.", + "type": "array", + "items": { + "$ref": "#/components/schemas/AuthOrgPreferenceInput" + } + } + }, + "required": [ + "auth_type" + ] + }, + "GetCustomAccessTokenRequest": { + "type": "object", + "properties": { + "username": { + "description": "Username of the ThoughtSpot user. The username is stored in the `name` attribute of the user object.", + "type": "string" + }, + "password": { + "description": "Password of the user account", + "default": "", + "type": "string" + }, + "secret_key": { + "description": "The secret key string provided by the ThoughtSpot application server. ThoughtSpot generates a secret key when Trusted authentication is enabled.", + "default": "", + "type": "string" + }, + "validity_time_in_sec": { + "description": "Token validity duration in seconds", + "default": 300, + "type": "integer", + "format": "int32" + }, + "org_identifier": { + "description": "ID or name of the Org context to log in to. If the Org ID or name is not specified but a secret key is provided, the user will be logged into the Org associated with the secret key. If neither the Org ID/name nor the secret key is provided, the user will be logged into the Org context from their previous login session.", + "type": "string" + }, + "persist_option": { + "description": "Indicates whether the specified attributes should be persisted or not. RESET and NONE are not applicable if you are setting variable_values.", + "type": "string", + "enum": [ + "REPLACE", + "APPEND", + "NONE", + "RESET" + ] + }, + "filter_rules": { + "description": "Filter rules.", + "type": "array", + "items": { + "$ref": "#/components/schemas/FilterRules" + } + }, + "parameter_values": { + "description": "Allows developers to assign parameter values for existing parameters to a user at login. Note: Using parameter values for row level security use cases will ultimately be deprecated. Developers can still pass data security values via the Custom Access token via the variable_values field and create RLS rules based on custom variables. Please refer to the [ABAC via RLS documentation](https://developers.thoughtspot.com/docs/abac-user-parameters) for more details.", + "type": "array", + "items": { + "$ref": "#/components/schemas/ParameterValues" + } + }, + "variable_values": { + "description": "List of variable values where `name` references an existing formula variable and `values` is any value from the corresponding column.
Version: 10.14.0.cl or later", + "type": "array", + "items": { + "$ref": "#/components/schemas/VariableValues" + } + }, + "objects": { + "description": "Objects on which the parameter and variable values should be applied to", + "type": "array", + "items": { + "$ref": "#/components/schemas/TokenAccessScopeObject" + } + }, + "email": { + "description": "(just-in-time (JIT) provisioning)Email address of the user. Specify this attribute when creating a new user.", + "type": "string" + }, + "display_name": { + "description": "(just-in-time (JIT) provisioning) Indicates display name of the user. Specify this attribute when creating a new user.", + "type": "string" + }, + "groups": { + "description": "(just-in-time (JIT) provisioning) ID or name of the groups to which the newly created user belongs. Specify this attribute when creating a new user.", + "type": "array", + "items": { + "$ref": "#/components/schemas/Group_Object" + } + }, + "auto_create": { + "description": " Creates a new user if the specified username does not exist in ThoughtSpot. To provision a user just-in-time (JIT), set this attribute to true.\n \n\nNote: For JIT provisioning of a user, the secret_key is required. New formula variables won't be created.
Version: 10.5.0.cl or later", + "default": true, + "type": "boolean", + "nullable": true + } + }, + "required": [ + "username", + "persist_option" + ] + }, + "GetFullAccessTokenRequest": { + "type": "object", + "properties": { + "username": { + "description": "Username of the ThoughtSpot user. The username is stored in the `name` attribute of the user object.", + "type": "string" + }, + "password": { + "description": "Password of the user account", + "default": "", + "type": "string" + }, + "secret_key": { + "description": "The secret key string provided by the ThoughtSpot application server. ThoughtSpot generates a secret key when Trusted authentication is enabled.", + "default": "", + "type": "string" + }, + "validity_time_in_sec": { + "description": "Token validity duration in seconds", + "default": 300, + "type": "integer", + "format": "int32" + }, + "org_id": { + "description": "ID of the Org context to log in to. If the Org ID is not specified and secret key is provided then user will be logged into the org corresponding to the secret key, and if secret key is not provided then user will be logged in to the Org context of their previous login session.", + "type": "integer", + "format": "int32" + }, + "email": { + "description": "Email address of the user. Specify this attribute when creating a new user (just-in-time (JIT) provisioning).", + "type": "string" + }, + "display_name": { + "description": "Indicates display name of the user. Use this parameter to provision a user just-in-time (JIT).", + "type": "string" + }, + "auto_create": { + "description": " Creates a new user if the specified username does not already exist in ThoughtSpot. To provision a user just-in-time (JIT), set this attribute to true.\n \n\nNote: For JIT provisioning of a user, the secret_key is required. ", + "default": false, + "type": "boolean", + "nullable": true + }, + "group_identifiers": { + "description": "ID or name of the groups to which the newly created user belongs. Use this parameter to provision a user just-in-time (JIT).", + "type": "array", + "items": { + "type": "string" + } + }, + "user_parameters": { + "description": "
Version: 9.10.5.cl or laterDeprecated: 10.4.0.cl and later
\n\nDefine attributes such as Runtime filters and Runtime parameters to send security entitlements to a user session. For more information, see [Documentation](https://developers.thoughtspot.com/docs/abac-user-parameters).", + "allOf": [ + { + "$ref": "#/components/schemas/User_Parameter_Options" + } + ] + } + }, + "required": [ + "username" + ] + }, + "GetObjectAccessTokenRequest": { + "type": "object", + "properties": { + "username": { + "description": "Username of the ThoughtSpot user. The username is stored in the `name` attribute of the user object.", + "type": "string" + }, + "object_id": { + "description": "GUID of the ThoughtSpot metadata object that the user can access. The bearer will only have access to the object specified in the API request.", + "type": "string" + }, + "password": { + "description": "Password of the user account", + "default": "", + "type": "string" + }, + "secret_key": { + "description": "The secret key string provided by the ThoughtSpot application server. ThoughtSpot generates a secret key when Trusted authentication is enabled.", + "default": "", + "type": "string" + }, + "validity_time_in_sec": { + "description": "Token validity duration in seconds", + "default": 300, + "type": "integer", + "format": "int32" + }, + "org_id": { + "description": "ID of the Org context to log in to. If the Org ID is not specified and secret key is provided then user will be logged into the org corresponding to the secret key, and if secret key is not provided then user will be logged in to the Org context of their previous login session.", + "type": "integer", + "format": "int32" + }, + "email": { + "description": "Email address of the user. Specify this attribute when creating a new user (just-in-time (JIT) provisioning).", + "type": "string" + }, + "display_name": { + "description": "Display name of the user. Specify this attribute when creating a new user (just-in-time (JIT) provisioning).", + "type": "string" + }, + "auto_create": { + "description": " Creates a new user if the specified username does not exist in ThoughtSpot. To provision a user just-in-time (JIT), set this attribute to true.\n \n\nNote: For JIT provisioning of a user, the secret_key is required. ", + "default": false, + "type": "boolean", + "nullable": true + }, + "group_identifiers": { + "description": "Unique ID or name of the groups to which you want to assign the new user. You can specify this attribute to dynamically assign privileges during just-in-time (JIT) provisioning.", + "type": "array", + "items": { + "type": "string" + } + }, + "user_parameters": { + "description": "
Version: 9.10.5.cl or laterDeprecated: 10.4.0.cl and later
\n\nDefine attributes such as Runtime filters and Runtime parameters to send security entitlements to a user session. For more information, see [Documentation](https://developers.thoughtspot.com/docs/abac-user-parameters).", + "allOf": [ + { + "$ref": "#/components/schemas/User_Parameter_Options" + } + ] + } + }, + "required": [ + "username" + ] + }, + "LoginRequest": { + "type": "object", + "properties": { + "username": { + "description": "Username of the ThoughtSpot user", + "type": "string" + }, + "password": { + "description": "Password of the user account", + "type": "string" + }, + "org_identifier": { + "description": "ID of the Org context to log in to. If Org ID is not specified, the user will be logged in to the Org context of their previous login session.", + "type": "string" + }, + "remember_me": { + "description": "A flag to remember the user session. When set to true, a session cookie is created and used in subsequent API requests.", + "default": false, + "type": "boolean", + "nullable": true + } + } + }, + "RevokeTokenRequest": { + "type": "object", + "properties": { + "user_identifier": { + "type": "string" + }, + "token": { + "type": "string" + } + } + }, + "SearchAuthSettingsRequest": { + "type": "object", + "properties": { + "auth_type": { + "description": "Type of authentication mechanism to retrieve settings for. Currently supports TRUSTED_AUTH.", + "type": "string", + "enum": [ + "TRUSTED_AUTH" + ] + }, + "scope": { + "description": "Scope of auth settings to retrieve. When absent, both cluster and org settings are returned (subject to caller privileges). Set to CLUSTER to retrieve only cluster-level settings, or ORG to retrieve only org-level settings.", + "type": "string", + "enum": [ + "CLUSTER", + "ORG" + ] + } + }, + "required": [ + "auth_type" + ] + }, + "ValidateTokenRequest": { + "type": "object", + "properties": { + "token": { + "type": "string" + } + }, + "required": [ + "token" + ] + }, + "CreateCollectionRequest": { + "type": "object", + "properties": { + "name": { + "description": "Name of the collection.", + "type": "string" + }, + "description": { + "description": "Description of the collection.", + "type": "string" + }, + "metadata": { + "description": "Metadata objects to add to the collection.", + "type": "array", + "items": { + "$ref": "#/components/schemas/CollectionMetadataInput" + } + } + }, + "required": [ + "name" + ] + }, + "DeleteCollectionRequest": { + "type": "object", + "properties": { + "collection_identifiers": { + "description": "Unique GUIDs of collections to delete. Note: Collection names cannot be\nused as identifiers since duplicate names are allowed.", + "type": "array", + "items": { + "type": "string" + } + }, + "delete_children": { + "description": "Flag to delete child objects of the collection that the user has access to.", + "default": false, + "type": "boolean", + "nullable": true + }, + "dry_run": { + "description": "Preview deletion without actually deleting. When set to true, returns\nwhat would be deleted without performing the actual deletion.", + "default": false, + "type": "boolean", + "nullable": true + } + }, + "required": [ + "collection_identifiers" + ] + }, + "SearchCollectionsRequest": { + "type": "object", + "properties": { + "name_pattern": { + "description": "A pattern to match case-insensitive name of the Collection object.\nUse '%' for wildcard match.", + "type": "string" + }, + "record_offset": { + "description": "The starting record number from where the records should be included.", + "default": 0, + "type": "integer", + "format": "int32" + }, + "record_size": { + "description": "The number of records that should be included.\n-1 implies no pagination.", + "default": 10, + "type": "integer", + "format": "int32" + }, + "collection_identifiers": { + "description": "Unique GUIDs of collections to search. Note: Collection names cannot be\nused as identifiers since duplicate names are allowed.", + "type": "array", + "items": { + "type": "string" + } + }, + "created_by_user_identifiers": { + "description": "Filter collections by author. Provide unique IDs or names of users\nwho created the collections.", + "type": "array", + "items": { + "type": "string" + } + }, + "include_metadata": { + "description": "Include collection metadata items in the response.", + "default": false, + "type": "boolean", + "nullable": true + }, + "sort_options": { + "description": "Sort options.", + "allOf": [ + { + "$ref": "#/components/schemas/SortOptions" + } + ] + } + } + }, + "UpdateCollectionRequest": { + "type": "object", + "properties": { + "name": { + "description": "Name of the collection.", + "type": "string" + }, + "description": { + "description": "Description of the collection.", + "type": "string" + }, + "metadata": { + "description": "Metadata objects to add, remove, or replace in the collection.", + "type": "array", + "items": { + "$ref": "#/components/schemas/CollectionMetadataInput" + } + }, + "operation": { + "description": "Type of update operation. Default operation type is REPLACE.", + "default": "REPLACE", + "type": "string", + "enum": [ + "ADD", + "REMOVE", + "REPLACE" + ] + } + } + }, + "ConnectionConfigurationSearchRequest": { + "type": "object", + "properties": { + "connection_identifier": { + "description": "Unique ID or name of the connection.", + "type": "string" + }, + "configuration_identifier": { + "description": "Unique ID or name of the configuration.", + "type": "string" + }, + "policy_type": { + "description": "Type of policy.", + "type": "string", + "enum": [ + "NO_POLICY", + "PRINCIPALS", + "PROCESSES" + ] + } + }, + "required": [ + "connection_identifier" + ] + }, + "CreateConnectionConfigurationRequest": { + "type": "object", + "properties": { + "name": { + "description": "Unique name for the configuration.", + "type": "string" + }, + "description": { + "description": "Description of the configuration.", + "type": "string" + }, + "connection_identifier": { + "description": "Unique ID or name of the connection.", + "type": "string" + }, + "same_as_parent": { + "description": "Specifies whether the connection configuration should inherit all properties and authentication\ntype from its parent connection. This attribute is only applicable to parameterized connections.\nWhen set to true, the configuration uses only the connection properties and authentication type\ninherited from the parent.
Version: 26.2.0.cl or later", + "default": false, + "type": "boolean", + "nullable": true + }, + "policy_process_options": { + "description": "This attribute is only applicable to parameterized connections. Ensure that the policy is\nset to Processes to allow the configuration to be used exclusively for system processes.
Version: 26.2.0.cl or later", + "allOf": [ + { + "$ref": "#/components/schemas/PolicyProcessOptionsInput" + } + ] + }, + "authentication_type": { + "description": "Type of authentication used for the connection.", + "default": "SERVICE_ACCOUNT", + "type": "string", + "enum": [ + "SERVICE_ACCOUNT", + "KEY_PAIR", + "PERSONAL_ACCESS_TOKEN", + "OAUTH_WITH_SERVICE_PRINCIPAL", + "OAUTH_CLIENT_CREDENTIALS" + ] + }, + "configuration": { + "description": "Configuration properties in JSON.", + "type": "object" + }, + "policy_type": { + "description": "Type of policy.", + "default": "NO_POLICY", + "type": "string", + "enum": [ + "NO_POLICY", + "PRINCIPALS", + "PROCESSES" + ] + }, + "policy_principals": { + "description": "Unique ID or name of the User and User Groups.", + "type": "array", + "items": { + "type": "string" + } + }, + "policy_processes": { + "description": "Action that the query performed on the data warehouse, such as SAGE_INDEXING and ROW_COUNT_STATS.", + "type": "array", + "items": { + "type": "string", + "enum": [ + "SAGE_INDEXING", + "ROW_COUNT_STATS" + ] + } + } + }, + "required": [ + "name", + "connection_identifier", + "configuration" + ] + }, + "DeleteConnectionConfigurationRequest": { + "type": "object", + "properties": { + "configuration_identifier": { + "description": "Unique ID or name of the configuration.", + "type": "string" + }, + "connection_identifier": { + "description": "Unique ID or name of the connection.", + "type": "string" + } + }, + "required": [ + "configuration_identifier", + "connection_identifier" + ] + }, + "UpdateConnectionConfigurationRequest": { + "type": "object", + "properties": { + "connection_identifier": { + "description": "Unique ID or name of the connection.", + "type": "string" + }, + "name": { + "description": "Name of the configuration to update.", + "type": "string" + }, + "description": { + "description": "Description of the configuration.", + "type": "string" + }, + "same_as_parent": { + "description": "Specifies whether the connection configuration should inherit all properties and authentication\ntype from its parent connection. This attribute is only applicable to parameterized connections.\nWhen set to true, the configuration uses only the connection properties and authentication type\ninherited from the parent.
Version: 26.2.0.cl or later", + "default": false, + "type": "boolean", + "nullable": true + }, + "policy_process_options": { + "description": "This attribute is only applicable to parameterized connections. Ensure that the policy is\nset to Processes to allow the configuration to be used exclusively for system processes.
Version: 26.2.0.cl or later", + "allOf": [ + { + "$ref": "#/components/schemas/PolicyProcessOptionsInput" + } + ] + }, + "authentication_type": { + "description": "Type of authentication.", + "type": "string", + "enum": [ + "SERVICE_ACCOUNT", + "OAUTH", + "OAUTH_WITH_SERVICE_PRINCIPAL", + "EXTOAUTH", + "KEY_PAIR", + "EXTOAUTH_WITH_PKCE", + "OAUTH_WITH_PKCE", + "PERSONAL_ACCESS_TOKEN", + "OAUTH_CLIENT_CREDENTIALS" + ] + }, + "configuration": { + "description": "Configuration properties in JSON.", + "type": "object" + }, + "policy_type": { + "description": "Type of policy.", + "type": "string", + "enum": [ + "NO_POLICY", + "PRINCIPALS", + "PROCESSES" + ] + }, + "policy_principals": { + "description": "Unique ID or name of the User and User Groups.", + "type": "array", + "items": { + "type": "string" + } + }, + "policy_processes": { + "description": "Action that the query performed on the data warehouse, such as SAGE_INDEXING and ROW_COUNT_STATS.", + "type": "array", + "items": { + "type": "string", + "enum": [ + "SAGE_INDEXING", + "ROW_COUNT_STATS" + ] + } + }, + "disable": { + "description": "Indicates whether the configuration enable/disable.", + "default": false, + "type": "boolean", + "nullable": true + } + }, + "required": [ + "connection_identifier" + ] + }, + "CreateConnectionRequest": { + "type": "object", + "properties": { + "name": { + "description": "Unique name for the connection.", + "type": "string" + }, + "description": { + "description": "Description of the connection.", + "type": "string" + }, + "data_warehouse_type": { + "description": "Type of the data warehouse.", + "type": "string", + "enum": [ + "SNOWFLAKE", + "AMAZON_REDSHIFT", + "GOOGLE_BIGQUERY", + "AZURE_SYNAPSE", + "TERADATA", + "SAP_HANA", + "STARBURST", + "ORACLE_ADW", + "DATABRICKS", + "DENODO", + "DREMIO", + "TRINO", + "PRESTO", + "POSTGRES", + "SQLSERVER", + "MYSQL", + "GENERIC_JDBC", + "AMAZON_RDS_POSTGRESQL", + "AMAZON_AURORA_POSTGRESQL", + "AMAZON_RDS_MYSQL", + "AMAZON_AURORA_MYSQL", + "LOOKER", + "AMAZON_ATHENA", + "SINGLESTORE", + "GCP_SQLSERVER", + "GCP_ALLOYDB_POSTGRESQL", + "GCP_POSTGRESQL", + "GCP_MYSQL", + "MODE", + "GOOGLE_SHEETS", + "FALCON", + "FALCON_ONPREM", + "CLICKHOUSE", + "IOMETE" + ] + }, + "data_warehouse_config": { + "description": "Connection configuration attributes in JSON format. To create a connection with tables, include table attributes. See the documentation above for sample JSON.", + "type": "object" + }, + "validate": { + "description": "Validates the connection metadata if tables are included. If you are creating a connection without tables, specify `false`.", + "default": true, + "type": "boolean", + "nullable": true + } + }, + "required": [ + "name", + "data_warehouse_type", + "data_warehouse_config" + ] + }, + "DeleteConnectionRequest": { + "type": "object", + "properties": { + "connection_identifier": { + "description": "Unique ID or name of the connection.", + "type": "string" + } + }, + "required": [ + "connection_identifier" + ] + }, + "RevokeRefreshTokensRequest": { + "type": "object", + "properties": { + "configuration_identifiers": { + "description": "Unique ID or name of the configuration. When provided, the refresh tokens of the users associated with the connection configuration will be revoked.", + "type": "array", + "items": { + "type": "string" + } + }, + "user_identifiers": { + "description": "Unique ID or name of the users. When provided, the refresh tokens of the specified users will be revoked. If the request includes the user ID or name of the connection author, their token will also be revoked.", + "type": "array", + "items": { + "type": "string" + } + }, + "org_identifiers": { + "description": "Unique ID or name of the Org. When provided, the refresh tokens of all users associated with the published connection in the Org will be revoked. This parameter is valid only for published connections. Using it with unpublished connections will result in an error.", + "type": "array", + "items": { + "type": "string" + } + } + } + }, + "SearchConnectionRequest": { + "type": "object", + "properties": { + "connections": { + "description": "List of connections and name pattern", + "type": "array", + "items": { + "$ref": "#/components/schemas/ConnectionInput" + } + }, + "data_warehouse_types": { + "description": "Array of types of data warehouse defined for the connection.", + "type": "array", + "items": { + "type": "string", + "enum": [ + "SNOWFLAKE", + "AMAZON_REDSHIFT", + "GOOGLE_BIGQUERY", + "AZURE_SYNAPSE", + "TERADATA", + "SAP_HANA", + "STARBURST", + "ORACLE_ADW", + "DATABRICKS", + "DENODO", + "DREMIO", + "TRINO", + "PRESTO", + "POSTGRES", + "SQLSERVER", + "MYSQL", + "GENERIC_JDBC", + "AMAZON_RDS_POSTGRESQL", + "AMAZON_AURORA_POSTGRESQL", + "AMAZON_RDS_MYSQL", + "AMAZON_AURORA_MYSQL", + "LOOKER", + "AMAZON_ATHENA", + "SINGLESTORE", + "GCP_SQLSERVER", + "GCP_ALLOYDB_POSTGRESQL", + "GCP_POSTGRESQL", + "GCP_MYSQL", + "MODE", + "GOOGLE_SHEETS", + "FALCON", + "FALCON_ONPREM", + "CLICKHOUSE", + "IOMETE" + ] + } + }, + "record_offset": { + "description": "The starting record number from where the records should be included.", + "default": 0, + "type": "integer", + "format": "int32" + }, + "record_size": { + "description": "The number of records that should be included.", + "default": 10, + "type": "integer", + "format": "int32" + }, + "tag_identifiers": { + "description": "Unique ID or name of tags.", + "type": "array", + "items": { + "type": "string" + } + }, + "data_warehouse_object_type": { + "description": "Data warehouse object type.", + "type": "string", + "enum": [ + "DATABASE", + "SCHEMA", + "TABLE", + "COLUMN" + ] + }, + "sort_options": { + "description": "Sort options.", + "allOf": [ + { + "$ref": "#/components/schemas/SortOptionInput" + } + ] + }, + "include_details": { + "description": "Indicates whether to include complete details of the connection objects.", + "type": "boolean", + "nullable": true + }, + "configuration": { + "description": "Configuration values. If empty we are fetching configuration from datasource based on given connection id. If required you can provide config details to fetch specific details. Example input: {}, {\"warehouse\":\"SMALL_WH\",\"database\":\"DEVELOPMENT\"}. This is only applicable when data_warehouse_object_type is selected.", + "type": "object" + }, + "authentication_type": { + "description": "List of authentication types to fetch data_ware_house_objects from external Data warehouse. This is only applicable when data_warehouse_object_type is selected.", + "default": "SERVICE_ACCOUNT", + "type": "string", + "enum": [ + "SERVICE_ACCOUNT", + "OAUTH", + "IAM", + "EXTOAUTH", + "OAUTH_WITH_SERVICE_PRINCIPAL", + "PERSONAL_ACCESS_TOKEN", + "KEY_PAIR", + "OAUTH_WITH_PKCE", + "EXTOAUTH_WITH_PKCE", + "OAUTH_WITH_PEZ", + "OAUTH_CLIENT_CREDENTIALS" + ] + }, + "show_resolved_parameters": { + "description": "
Version: 10.9.0.cl or later
\n\nIndicates whether to show resolved parameterised values.", + "default": false, + "type": "boolean", + "nullable": true + } + } + }, + "SyncMetadataRequest": { + "type": "object", + "properties": { + "tables": { + "description": "Array of tables to sync. Each element can be:\n- String: Table identifier (GUID or name) to sync\n all columns for that table.\n- Object: {tableId: [columnIds]} to sync specific\n columns.\nIf not provided, syncs all tables in the connection.", + "type": "object" + }, + "sync_attributes": { + "description": "List of sync_attributes to sync from CDW.\nThe default value is DESCRIPTION.", + "default": [ + "DESCRIPTION" + ], + "type": "array", + "items": { + "type": "string", + "enum": [ + "DESCRIPTION" + ] + } + } + } + }, + "UpdateConnectionRequest": { + "type": "object", + "properties": { + "connection_identifier": { + "description": "Unique ID or name of the connection.", + "type": "string" + }, + "name": { + "description": "Updated name of the connection.", + "type": "string" + }, + "description": { + "description": "Updated description of the connection.", + "type": "string" + }, + "data_warehouse_config": { + "description": "Configuration of the data warehouse in JSON.", + "type": "object" + }, + "validate": { + "description": "Indicates whether to validate the connection details.", + "default": true, + "type": "boolean", + "nullable": true + } + }, + "required": [ + "connection_identifier" + ] + }, + "UpdateConnectionStatusRequest": { + "type": "object", + "properties": { + "status": { + "description": "Status to set for the connection. Use ACTIVATED to enable the connection or DEACTIVATED to disable it.", + "default": "ACTIVATED", + "type": "string", + "enum": [ + "ACTIVATED", + "DEACTIVATED" + ] + } + } + }, + "UpdateConnectionV2Request": { + "type": "object", + "properties": { + "name": { + "description": "Updated name of the connection.", + "type": "string" + }, + "description": { + "description": "Updated description of the connection.", + "type": "string" + }, + "data_warehouse_config": { + "description": "Configuration of the data warehouse in JSON.", + "type": "object" + }, + "validate": { + "description": "Indicates whether to validate the connection details.", + "default": true, + "type": "boolean", + "nullable": true + } + } + }, + "CreateCustomActionRequest": { + "type": "object", + "properties": { + "name": { + "description": "Name of the custom action. The custom action name must be unique.", + "type": "string" + }, + "action_details": { + "description": "Action details includes `Type` and Configuration data for Custom Actions, either Callback or URL is required.", + "allOf": [ + { + "$ref": "#/components/schemas/Action_Details_Input_Create" + } + ] + }, + "associate_metadata": { + "description": "Metadata objects to which the custom action needs to be associated.", + "type": "array", + "items": { + "$ref": "#/components/schemas/Associate_Metadata_Input_Create" + } + }, + "default_action_config": { + "description": "Default Custom action configuration. This includes if the custom action is available on all visualizations. By default, a custom action is added to all visualizations and Answers.", + "allOf": [ + { + "$ref": "#/components/schemas/Default_Action_Config_Input_Create" + } + ] + }, + "group_identifiers": { + "description": "Unique ID or name of the groups that can view and access the custom action.", + "type": "array", + "items": { + "type": "string" + } + } + }, + "required": [ + "name", + "action_details" + ] + }, + "SearchCustomActionsRequest": { + "type": "object", + "properties": { + "custom_action_identifier": { + "description": "Name or ID of the custom action.", + "type": "string" + }, + "name_pattern": { + "description": "A pattern to match case-insensitive name of the custom-action object.", + "type": "string" + }, + "default_action_config": { + "description": "Default Custom action configuration. This includes if the custom action is available on all visualizations. By default, a custom action is added to all visualizations and Answers.", + "allOf": [ + { + "$ref": "#/components/schemas/Default_Action_Config_Search_Input" + } + ] + }, + "include_group_associations": { + "description": "When set to true, returns the associated groups for a custom action.", + "default": false, + "type": "boolean", + "nullable": true + }, + "include_metadata_associations": { + "description": "When set to true, returns the associated metadata for a custom action.", + "default": false, + "type": "boolean", + "nullable": true + }, + "metadata": { + "description": "Search with a given metadata identifier.", + "type": "array", + "items": { + "$ref": "#/components/schemas/CustomActionMetadataTypeInput" + } + }, + "type": { + "description": "Filter the action objects based on type", + "type": "string", + "enum": [ + "CALLBACK", + "URL" + ] + } + } + }, + "UpdateCustomActionRequest": { + "type": "object", + "properties": { + "action_details": { + "description": "Action details includes `Type` and Configuration for Custom Actions, either Callback or URL is required.", + "allOf": [ + { + "$ref": "#/components/schemas/Action_Details_Input" + } + ] + }, + "associate_metadata": { + "description": "Metadata objects to which the custom action needs to be associated.", + "type": "array", + "items": { + "$ref": "#/components/schemas/Associate_Metadata_Input" + } + }, + "default_action_config": { + "description": "Default Custom action configuration. This includes if the custom action available on visualizations and Answers. By default, a custom action is added to all visualizations and Answers.", + "allOf": [ + { + "$ref": "#/components/schemas/Default_Action_Config_Input" + } + ] + }, + "group_identifiers": { + "description": "Unique ID or name of the groups that can view and access the custom action.", + "type": "array", + "items": { + "type": "string" + } + }, + "name": { + "description": "Name of the custom action. The custom action name must be unique.", + "type": "string" + }, + "operation": { + "description": "Type of update operation. Default operation type is ADD", + "default": "ADD", + "type": "string", + "enum": [ + "ADD", + "REMOVE" + ] + } + } + }, + "CreateCalendarRequest": { + "type": "object", + "properties": { + "name": { + "description": "Name of the custom calendar.", + "type": "string" + }, + "creation_method": { + "description": "Type of create operation.", + "type": "string", + "enum": [ + "FROM_INPUT_PARAMS", + "FROM_EXISTING_TABLE" + ] + }, + "table_reference": { + "description": "Table reference containing connection identifier and table details in this format: `{\"connection_identifier\":\"conn1\", \"database_name\":\"db1\", \"schema_name\":\"sc1\", \"table_name\":\"tb1\"}`. The given table will be created if `creation_method` is set as `FROM_INPUT_PARAMS`.", + "allOf": [ + { + "$ref": "#/components/schemas/ExternalTableInput" + } + ] + }, + "start_date": { + "description": "Start date for the calendar in `MM/dd/yyyy` format. This parameter is mandatory if `creation_method` is set as `FROM_INPUT_PARAMS`.", + "type": "string" + }, + "end_date": { + "description": "End date for the calendar in `MM/dd/yyyy` format. This parameter is mandatory if `creation_method` is set as `FROM_INPUT_PARAMS`.", + "type": "string" + }, + "calendar_type": { + "description": "Type of the calendar.", + "default": "MONTH_OFFSET", + "type": "string", + "enum": [ + "MONTH_OFFSET", + "FOUR_FOUR_FIVE", + "FOUR_FIVE_FOUR", + "FIVE_FOUR_FOUR" + ] + }, + "month_offset": { + "description": "Specify the month in which the fiscal or custom calendar year should start. For example, if you set `month_offset` to \"April\", the custom calendar will treat \"April\" as the first month of the year, and the related attributes such as quarters and start date will be based on this offset. The default value is `January`, which represents the standard calendar year (January to December).", + "default": "January", + "type": "string", + "enum": [ + "January", + "February", + "March", + "April", + "May", + "June", + "July", + "August", + "September", + "October", + "November", + "December" + ] + }, + "start_day_of_week": { + "description": "Specify the starting day of the week.", + "default": "Sunday", + "type": "string", + "enum": [ + "Sunday", + "Monday", + "Tuesday", + "Wednesday", + "Thursday", + "Friday", + "Saturday" + ] + }, + "quarter_name_prefix": { + "description": "Prefix to add before the quarter.", + "default": "", + "type": "string" + }, + "year_name_prefix": { + "description": "Prefix to add before the year.", + "default": "", + "type": "string" + } + }, + "required": [ + "name", + "creation_method", + "table_reference" + ] + }, + "GenerateCSVRequest": { + "type": "object", + "properties": { + "start_date": { + "description": "Start date for the calendar in `MM/dd/yyyy` format.", + "type": "string" + }, + "end_date": { + "description": "End date for the calendar in `MM/dd/yyyy` format.", + "type": "string" + }, + "calendar_type": { + "description": "Type of the calendar.", + "default": "MONTH_OFFSET", + "type": "string", + "enum": [ + "MONTH_OFFSET", + "FOUR_FOUR_FIVE", + "FOUR_FIVE_FOUR", + "FIVE_FOUR_FOUR" + ] + }, + "month_offset": { + "description": "Month offset to start calendar from `January`.", + "default": "January", + "type": "string", + "enum": [ + "January", + "February", + "March", + "April", + "May", + "June", + "July", + "August", + "September", + "October", + "November", + "December" + ] + }, + "start_day_of_week": { + "description": "Specify the starting day of the week.", + "default": "Sunday", + "type": "string", + "enum": [ + "Sunday", + "Monday", + "Tuesday", + "Wednesday", + "Thursday", + "Friday", + "Saturday" + ] + }, + "quarter_name_prefix": { + "description": "Prefix to add before the quarter.", + "type": "string" + }, + "year_name_prefix": { + "description": "Prefix to add before the year.", + "type": "string" + } + }, + "required": [ + "start_date", + "end_date" + ] + }, + "SearchCalendarsRequest": { + "type": "object", + "properties": { + "connection_identifier": { + "description": "Unique ID or name of the connection.", + "type": "string" + }, + "name_pattern": { + "description": "Pattern to match for calendar names (use '%' for wildcard match).", + "type": "string" + }, + "record_offset": { + "description": "The starting record number from where the records should be included.", + "default": 0, + "type": "integer", + "format": "int32" + }, + "record_size": { + "description": "The number of records that should be included.", + "default": 10, + "type": "integer", + "format": "int32" + }, + "sort_options": { + "description": "Sort options.", + "allOf": [ + { + "$ref": "#/components/schemas/SortOption" + } + ] + } + } + }, + "UpdateCalendarRequest": { + "type": "object", + "properties": { + "update_method": { + "description": "Type of update operation.", + "default": "FROM_INPUT_PARAMS", + "type": "string", + "enum": [ + "FROM_INPUT_PARAMS", + "FROM_EXISTING_TABLE" + ] + }, + "table_reference": { + "description": "Table reference containing connection identifier and table details in this format: `{\"connection_identifier\":\"conn1\", \"database_name\":\"db1\", \"schema_name\":\"sc1\", \"table_name\":\"tb1\"}`.", + "allOf": [ + { + "$ref": "#/components/schemas/ExternalTableInput" + } + ] + }, + "start_date": { + "description": "Start date for the calendar in `MM/dd/yyyy` format. This parameter is mandatory if `update_method` is set as `FROM_INPUT_PARAMS`.", + "type": "string" + }, + "end_date": { + "description": "End date for the calendar in `MM/dd/yyyy` format. This parameter is mandatory if `update_method` is set as `FROM_INPUT_PARAMS`.", + "type": "string" + }, + "calendar_type": { + "description": "Type of the calendar.", + "default": "MONTH_OFFSET", + "type": "string", + "enum": [ + "MONTH_OFFSET", + "FOUR_FOUR_FIVE", + "FOUR_FIVE_FOUR", + "FIVE_FOUR_FOUR" + ] + }, + "month_offset": { + "description": "Specify the month in which the fiscal or custom calendar year should start. For example, if you set `month_offset` to \"April\", the custom calendar will treat \"April\" as the first month of the year, and the related attributes such as quarters and start date will be based on this offset. The default value is `January`, which represents the standard calendar year (January to December).", + "default": "January", + "type": "string", + "enum": [ + "January", + "February", + "March", + "April", + "May", + "June", + "July", + "August", + "September", + "October", + "November", + "December" + ] + }, + "start_day_of_week": { + "description": "Specify the starting day of the week", + "default": "Sunday", + "type": "string", + "enum": [ + "Sunday", + "Monday", + "Tuesday", + "Wednesday", + "Thursday", + "Friday", + "Saturday" + ] + }, + "quarter_name_prefix": { + "description": "Prefix to add before the quarter.", + "default": "", + "type": "string" + }, + "year_name_prefix": { + "description": "Prefix to add before the year.", + "default": "", + "type": "string" + } + }, + "required": [ + "table_reference" + ] + }, + "FetchAnswerDataRequest": { + "type": "object", + "properties": { + "metadata_identifier": { + "description": "GUID or name of the Answer.", + "type": "string" + }, + "data_format": { + "description": "JSON output in compact or full format. The FULL option is available in 9.12.5.cl or later.", + "default": "COMPACT", + "type": "string", + "enum": [ + "FULL", + "COMPACT" + ] + }, + "record_offset": { + "description": "The starting record number from where the records should be included.", + "default": 0, + "type": "integer", + "format": "int32" + }, + "record_size": { + "description": "The number of records to include in a batch.", + "default": 10, + "type": "integer", + "format": "int32" + }, + "runtime_filter": { + "description": "JSON object with representing filter condition to apply filters at runtime. For example, {\"col1\": \"item type\", \"op1\": \"EQ\", \"val1\": \"Bags\"} . You can add multiple keys by incrementing the number at the end, for example, col2, op2, val2, and col3, op3, val3. For more information, see [API Documentation](https://developers.thoughtspot.com/docs/fetch-data-and-report-apis#_runtime_filters).", + "type": "object" + }, + "runtime_sort": { + "description": "JSON object representing columns to sort data at runtime. For example, {\"sortCol1\": \"sales\", \"asc1\": true} . You can add multiple keys by incrementing the number at the end, for example, sortCol1, asc2. For more information, see [API Documentation](https://developers.thoughtspot.com/docs/fetch-data-and-report-apis#_runtime_sort).", + "type": "object" + }, + "runtime_param_override": { + "description": "JSON object for setting values of parameters at runtime. For example, {\"param1\": \"Double List Param\", \"paramVal1\": 0.5}. You can add multiple keys by incrementing the number at the end, for example, param2, paramVal2. For more information, see [API Documentation](https://developers.thoughtspot.com/docs/fetch-data-and-report-apis#_runtime_parameters).", + "type": "object" + } + }, + "required": [ + "metadata_identifier" + ] + }, + "FetchLiveboardDataRequest": { + "type": "object", + "properties": { + "metadata_identifier": { + "description": "GUID or name of the Liveboard.", + "type": "string" + }, + "visualization_identifiers": { + "description": "GUIDs or names of the visualizations on the Liveboard.", + "type": "array", + "items": { + "type": "string" + } + }, + "transient_content": { + "description": "Transient content of the Liveboard.", + "type": "string" + }, + "data_format": { + "description": "JSON output in compact or full format. The FULL option is available in 9.12.5.cl or later.", + "default": "COMPACT", + "type": "string", + "enum": [ + "FULL", + "COMPACT" + ] + }, + "record_offset": { + "description": "The starting record number from where the records should be included.", + "default": 0, + "type": "integer", + "format": "int32" + }, + "record_size": { + "description": "The number of records to include in a batch.", + "default": 10, + "type": "integer", + "format": "int32" + }, + "runtime_filter": { + "description": "JSON object with representing filter condition to apply filters at runtime. For example, {\"col1\": \"item type\", \"op1\": \"EQ\", \"val1\": \"Bags\"} . You can add multiple keys by incrementing the number at the end, for example, col2, op2, val2, and col3, op3, val3. For more information, see [API Documentation](https://developers.thoughtspot.com/docs/fetch-data-and-report-apis#_runtime_filters).", + "type": "object" + }, + "runtime_sort": { + "description": "JSON object representing columns to sort data at runtime. For example, {\"sortCol1\": \"sales\", \"asc1\": true} . You can add multiple keys by incrementing the number at the end, for example, sortCol1, asc2. For more information, see [API Documentation](https://developers.thoughtspot.com/docs/fetch-data-and-report-apis#_runtime_sort).", + "type": "object" + }, + "runtime_param_override": { + "description": "JSON object for setting values of parameters at runtime. For example, {\"param1\": \"Double List Param\", \"paramVal1\": 0.5}. You can add multiple keys by incrementing the number at the end, for example, param2, paramVal2. For more information, see [API Documentation](https://developers.thoughtspot.com/docs/fetch-data-and-report-apis#_runtime_parameters).", + "type": "object" + } + }, + "required": [ + "metadata_identifier" + ] + }, + "SearchDataRequest": { + "type": "object", + "properties": { + "query_string": { + "description": "Query string with search tokens. For example, [Sales][Region]. See [API Documentation](https://developers.thoughtspot.com/docs/fetch-data-and-report-apis#_search_data_api)", + "type": "string" + }, + "logical_table_identifier": { + "description": "GUID of the data source object, such as a Worksheet, View, or Table. You can find the GUID of a data object from the UI or via API. See [API Documentation](https://developers.thoughtspot.com/docs/fetch-data-and-report-apis#_search_query) for more details.", + "type": "string" + }, + "data_format": { + "description": "JSON output in compact or full format. The FULL option is available in 9.12.5.cl or later.", + "default": "COMPACT", + "type": "string", + "enum": [ + "FULL", + "COMPACT" + ] + }, + "record_offset": { + "description": "The starting record number from where the records should be included.", + "default": 0, + "type": "integer", + "format": "int32" + }, + "record_size": { + "description": "The number of records to include in a batch.", + "default": 10, + "type": "integer", + "format": "int32" + }, + "runtime_filter": { + "description": "JSON object with representing filter condition to apply filters at runtime. For example, {\"col1\": \"item type\", \"op1\": \"EQ\", \"val1\": \"Bags\"} . You can add multiple keys by incrementing the number at the end, for example, col2, op2, val2, and col3, op3, val3. For more information, see [API Documentation](https://developers.thoughtspot.com/docs/fetch-data-and-report-apis#_runtime_filters).", + "type": "object" + }, + "runtime_sort": { + "description": "JSON object representing columns to sort data at runtime. For example, {\"sortCol1\": \"sales\", \"asc1\": true} . You can add multiple keys by incrementing the number at the end, for example, sortCol1, asc2. For more information, see [API Documentation](https://developers.thoughtspot.com/docs/fetch-data-and-report-apis#_runtime_sort).", + "type": "object" + }, + "runtime_param_override": { + "description": "JSON object for setting values of parameters at runtime. For example, {\"param1\": \"Double List Param\", \"paramVal1\": 0.5}. You can add multiple keys by incrementing the number at the end, for example, param2, paramVal2. For more information, see [API Documentation](https://developers.thoughtspot.com/docs/fetch-data-and-report-apis#_runtime_parameters).", + "type": "object" + } + }, + "required": [ + "query_string", + "logical_table_identifier" + ] + }, + "CreateEmailCustomizationRequest": { + "type": "object", + "properties": { + "template_properties": { + "description": "Email customization configuration as key value pair", + "allOf": [ + { + "$ref": "#/components/schemas/Template_Properties_Input_Create" + } + ] + }, + "org_identifier": { + "description": "Unique ID or name of org
Version: 10.12.0.cl or later", + "type": "string" + } + }, + "required": [ + "template_properties" + ] + }, + "DeleteOrgEmailCustomizationRequest": { + "type": "object", + "properties": { + "org_identifiers": { + "description": "Unique identifier of the organization.", + "type": "array", + "items": { + "type": "string" + } + } + } + }, + "SearchEmailCustomizationRequest": { + "type": "object", + "properties": { + "org_identifiers": { + "description": "Unique ID or name of org
Version: 10.12.0.cl or later", + "type": "array", + "items": { + "type": "string" + } + } + } + }, + "UpdateEmailCustomizationRequest": { + "type": "object", + "properties": { + "template_properties": { + "description": "Email customization configuration as key value pair", + "allOf": [ + { + "$ref": "#/components/schemas/Template_Properties_Input_Create" + } + ] + }, + "org_identifier": { + "description": "Unique ID or name of org", + "type": "string" + } + }, + "required": [ + "template_properties" + ] + }, + "CreateUserGroupRequest": { + "type": "object", + "properties": { + "name": { + "description": "Name of the group. The group name must be unique.", + "type": "string" + }, + "display_name": { + "description": "Display name for the group.", + "type": "string" + }, + "default_liveboard_identifiers": { + "description": "GUID of the Liveboards to assign as default Liveboards to the users in the group.", + "type": "array", + "items": { + "type": "string" + } + }, + "description": { + "description": "Description of the group", + "type": "string" + }, + "privileges": { + "description": "Privileges to assign to the group. Note: AUTHORING is a no-op — always inherited via ALL_GROUP, assigning it has no effect.", + "type": "array", + "items": { + "type": "string", + "enum": [ + "ADMINISTRATION", + "AUTHORING", + "USERDATAUPLOADING", + "DATADOWNLOADING", + "USERMANAGEMENT", + "DATAMANAGEMENT", + "SHAREWITHALL", + "JOBSCHEDULING", + "A3ANALYSIS", + "EXPERIMENTALFEATUREPRIVILEGE", + "BYPASSRLS", + "RANALYSIS", + "DEVELOPER", + "USER_ADMINISTRATION", + "GROUP_ADMINISTRATION", + "SYNCMANAGEMENT", + "CAN_CREATE_CATALOG", + "DISABLE_PINBOARD_CREATION", + "LIVEBOARD_VERIFIER", + "PREVIEW_THOUGHTSPOT_SAGE", + "CAN_MANAGE_VERSION_CONTROL", + "THIRDPARTY_ANALYSIS", + "ALLOW_NON_EMBED_FULL_APP_ACCESS", + "CAN_ACCESS_ANALYST_STUDIO", + "CAN_MANAGE_ANALYST_STUDIO", + "CAN_MODIFY_FOLDERS", + "CAN_MANAGE_VARIABLES", + "CAN_VIEW_FOLDERS", + "CAN_MANAGE_AGENTSPOT", + "CAN_ACCESS_AGENTSPOT", + "PREVIEW_DOCUMENT_SEARCH", + "CAN_SETUP_VERSION_CONTROL", + "CAN_DOWNLOAD_VISUALS", + "CAN_DOWNLOAD_DETAILED_DATA", + "CAN_USE_SPOTTER", + "CAN_MANAGE_SPOTTER" + ] + } + }, + "sub_group_identifiers": { + "description": "GUID or name of the sub groups. A subgroup is a group assigned to a parent group.", + "type": "array", + "items": { + "type": "string" + } + }, + "type": { + "description": "Group type.", + "default": "LOCAL_GROUP", + "type": "string", + "enum": [ + "LOCAL_GROUP", + "LDAP_GROUP", + "TEAM_GROUP", + "TENANT_GROUP" + ] + }, + "user_identifiers": { + "description": "GUID or name of the users to assign to the group.", + "type": "array", + "items": { + "type": "string" + } + }, + "visibility": { + "description": "Visibility of the group. To make a group visible to other users and groups,\nset the visibility to SHAREABLE.", + "default": "SHARABLE", + "type": "string", + "enum": [ + "SHARABLE", + "NON_SHARABLE" + ] + }, + "role_identifiers": { + "description": "Role identifiers of the roles that should be assigned to the group.", + "type": "array", + "items": { + "type": "string" + } + } + }, + "required": [ + "name", + "display_name" + ] + }, + "ImportUserGroupsRequest": { + "type": "object", + "properties": { + "groups": { + "description": "Details of groups which are to be imported", + "type": "array", + "items": { + "$ref": "#/components/schemas/GroupsImportListInput" + } + }, + "delete_unspecified_groups": { + "description": "If set to true, removes groups that are not specified in the API request.", + "default": false, + "type": "boolean", + "nullable": true + }, + "dry_run": { + "description": "If true, the API performs a test operation and returns user IDs whose\ndata will be edited after the import.", + "default": true, + "type": "boolean", + "nullable": true + } + } + }, + "SearchUserGroupsRequest": { + "type": "object", + "properties": { + "default_liveboard_identifiers": { + "description": "GUID of Liveboards that are assigned as default Liveboards to the users in the group.", + "type": "array", + "items": { + "type": "string" + } + }, + "description": { + "description": "Description of the group", + "type": "string" + }, + "display_name": { + "description": "Display name of the group", + "type": "string" + }, + "name_pattern": { + "description": "A pattern to match case-insensitive name of the Group object.", + "type": "string" + }, + "group_identifier": { + "description": "GUID or name of the group", + "type": "string" + }, + "org_identifiers": { + "description": "ID or name of the Org to which the group belongs", + "type": "array", + "items": { + "type": "string" + } + }, + "privileges": { + "description": "Privileges assigned to the group.", + "type": "array", + "items": { + "type": "string", + "enum": [ + "ADMINISTRATION", + "AUTHORING", + "USERDATAUPLOADING", + "DATADOWNLOADING", + "USERMANAGEMENT", + "DATAMANAGEMENT", + "SHAREWITHALL", + "JOBSCHEDULING", + "A3ANALYSIS", + "EXPERIMENTALFEATUREPRIVILEGE", + "BYPASSRLS", + "RANALYSIS", + "DEVELOPER", + "USER_ADMINISTRATION", + "GROUP_ADMINISTRATION", + "SYNCMANAGEMENT", + "CAN_CREATE_CATALOG", + "DISABLE_PINBOARD_CREATION", + "LIVEBOARD_VERIFIER", + "PREVIEW_THOUGHTSPOT_SAGE", + "APPLICATION_ADMINISTRATION", + "SYSTEM_INFO_ADMINISTRATION", + "ORG_ADMINISTRATION", + "ROLE_ADMINISTRATION", + "AUTHENTICATION_ADMINISTRATION", + "BILLING_INFO_ADMINISTRATION", + "CAN_MANAGE_CUSTOM_CALENDAR", + "CAN_CREATE_OR_EDIT_CONNECTIONS", + "CAN_MANAGE_WORKSHEET_VIEWS_TABLES", + "CAN_MANAGE_VERSION_CONTROL", + "THIRDPARTY_ANALYSIS", + "ALLOW_NON_EMBED_FULL_APP_ACCESS", + "CAN_ACCESS_ANALYST_STUDIO", + "CAN_MANAGE_ANALYST_STUDIO", + "PREVIEW_DOCUMENT_SEARCH", + "CAN_MODIFY_FOLDERS", + "CAN_MANAGE_VARIABLES", + "CAN_VIEW_FOLDERS", + "CAN_MANAGE_AGENTSPOT", + "CAN_ACCESS_AGENTSPOT", + "CAN_SETUP_VERSION_CONTROL", + "CAN_MANAGE_WEBHOOKS", + "CAN_DOWNLOAD_VISUALS", + "CAN_DOWNLOAD_DETAILED_DATA", + "CAN_USE_SPOTTER", + "CAN_MANAGE_SPOTTER" + ] + } + }, + "sub_group_identifiers": { + "description": "GUID or name of the sub groups. A subgroup is a group assigned to a parent group.", + "type": "array", + "items": { + "type": "string" + } + }, + "type": { + "description": "Group type.", + "type": "string", + "enum": [ + "LOCAL_GROUP", + "LDAP_GROUP", + "TEAM_GROUP", + "TENANT_GROUP" + ] + }, + "user_identifiers": { + "description": "GUID or name of the users assigned to the group.", + "type": "array", + "items": { + "type": "string" + } + }, + "visibility": { + "description": "Visibility of the group. To make a group visible to other users and groups,\nset the visibility to SHAREABLE.", + "type": "string", + "enum": [ + "SHARABLE", + "NON_SHARABLE" + ] + }, + "role_identifiers": { + "description": "Filter groups with a list of Roles assigned to a group", + "type": "array", + "items": { + "type": "string" + } + }, + "record_offset": { + "description": "The starting record number from where the records should be included.", + "default": 0, + "type": "integer", + "format": "int32" + }, + "record_size": { + "description": "The number of records that should be included.", + "default": 10, + "type": "integer", + "format": "int32" + }, + "sort_options": { + "description": "Sort options to filter group details.", + "allOf": [ + { + "$ref": "#/components/schemas/SortOptions" + } + ] + }, + "include_users": { + "description": "
Version: 10.10.0.cl or later
\n\nDefine Parameter to consider if the users should be included in group search response.", + "default": true, + "type": "boolean", + "nullable": true + }, + "include_sub_groups": { + "description": "
Version: 10.10.0.cl or later
\n\nDefine Parameter to consider if the sub groups should be included in group search response.", + "default": true, + "type": "boolean", + "nullable": true + } + } + }, + "UpdateUserGroupRequest": { + "type": "object", + "properties": { + "name": { + "description": "Name of the group to modify.", + "type": "string" + }, + "default_liveboard_identifiers": { + "description": "ID of the Liveboards to be assigned as default Liveboards to the users in the group.", + "type": "array", + "items": { + "type": "string" + } + }, + "description": { + "description": "Description for the group.", + "type": "string" + }, + "display_name": { + "description": "Display name of the group.", + "type": "string" + }, + "privileges": { + "description": "Privileges to assign to the group. Note: AUTHORING is a no-op — always inherited via ALL_GROUP, assigning it has no effect.", + "type": "array", + "items": { + "type": "string", + "enum": [ + "ADMINISTRATION", + "AUTHORING", + "USERDATAUPLOADING", + "DATADOWNLOADING", + "USERMANAGEMENT", + "DATAMANAGEMENT", + "SHAREWITHALL", + "JOBSCHEDULING", + "A3ANALYSIS", + "EXPERIMENTALFEATUREPRIVILEGE", + "BYPASSRLS", + "RANALYSIS", + "DEVELOPER", + "USER_ADMINISTRATION", + "GROUP_ADMINISTRATION", + "SYNCMANAGEMENT", + "CAN_CREATE_CATALOG", + "DISABLE_PINBOARD_CREATION", + "LIVEBOARD_VERIFIER", + "PREVIEW_THOUGHTSPOT_SAGE", + "CAN_MANAGE_VERSION_CONTROL", + "THIRDPARTY_ANALYSIS", + "ALLOW_NON_EMBED_FULL_APP_ACCESS", + "CAN_ACCESS_ANALYST_STUDIO", + "CAN_MANAGE_ANALYST_STUDIO", + "CAN_MODIFY_FOLDERS", + "CAN_MANAGE_VARIABLES", + "CAN_VIEW_FOLDERS", + "CAN_MANAGE_AGENTSPOT", + "CAN_ACCESS_AGENTSPOT", + "PREVIEW_DOCUMENT_SEARCH", + "CAN_SETUP_VERSION_CONTROL", + "CAN_DOWNLOAD_VISUALS", + "CAN_DOWNLOAD_DETAILED_DATA", + "CAN_USE_SPOTTER", + "CAN_MANAGE_SPOTTER" + ] + } + }, + "sub_group_identifiers": { + "description": "GUID or name of the sub groups. A subgroup is a group assigned to a parent group.", + "type": "array", + "items": { + "type": "string" + } + }, + "type": { + "description": "Type of the group", + "type": "string", "enum": [ - "LOCAL_USER", - "LDAP_USER", - "SAML_USER", - "OIDC_USER", - "REMOTE_USER" - ], - "description": "Type of the user account." + "LOCAL_GROUP", + "LDAP_GROUP", + "TEAM_GROUP", + "TENANT_GROUP" + ] }, - "account_status": { + "user_identifiers": { + "description": "GUID or name of the users to assign to the group.", + "type": "array", + "items": { + "type": "string" + } + }, + "visibility": { + "description": "Visibility of the group. To make a group visible to other users and\ngroups, set the visibility to SHAREABLE.", "type": "string", "enum": [ - "ACTIVE", - "INACTIVE", - "EXPIRED", - "LOCKED", - "PENDING" - ], - "description": "Status of the user account." + "SHARABLE", + "NON_SHARABLE" + ] }, - "email": { + "role_identifiers": { + "description": "Role identifiers of the Roles that should be assigned to the group.", + "type": "array", + "items": { + "type": "string" + } + }, + "operation": { + "description": "Type of update operation. Default operation type is REPLACE", + "default": "REPLACE", "type": "string", - "description": "Email of the user." + "enum": [ + "ADD", + "REMOVE", + "REPLACE" + ] + } + } + }, + "CreateInputTableRequest": { + "type": "object", + "properties": { + "table_name": { + "description": "Physical table name to create in the external warehouse.", + "type": "string" }, - "expiration_time_in_millis": { + "model_identifier": { + "description": "Unique ID or name of the model (worksheet) to link the\ninput table to.", + "type": "string" + }, + "table_definition": { + "description": "Definition of the input table, including new columns\nand referenced model columns.", + "allOf": [ + { + "$ref": "#/components/schemas/InputTableDefinitionInput" + } + ] + } + }, + "required": [ + "table_name", + "model_identifier", + "table_definition" + ] + }, + "UpdateInputTableRequest": { + "type": "object", + "properties": { + "columns": { + "description": "Names of the columns being written, in the same order as\nthe values in each row.", + "type": "array", + "items": { + "type": "string" + } + }, + "rows": { + "description": "Rows to write into the input table. Each row is an array\nof string values aligned positionally with columns.", + "type": "array", + "items": { + "type": "array", + "items": { + "type": "string" + } + } + } + }, + "required": [ + "columns", + "rows" + ] + }, + "SearchChannelHistoryRequest": { + "type": "object", + "properties": { + "channel_type": { + "description": "Type of communication channel to search history for.", + "type": "string", + "enum": [ + "WEBHOOK" + ] + }, + "job_ids": { + "description": "List of job execution record IDs to retrieve.", + "type": "array", + "items": { + "type": "string" + } + }, + "channel_identifiers": { + "description": "List of channel IDs or names to filter by.", + "type": "array", + "items": { + "type": "string" + } + }, + "channel_status": { + "description": "Filter by channel delivery status.", + "type": "string", + "enum": [ + "PENDING", + "RETRY", + "SUCCESS", + "FAILED" + ] + }, + "events": { + "description": "Filter by events that triggered the channel.", + "type": "array", + "items": { + "$ref": "#/components/schemas/ChannelHistoryEventInput" + } + }, + "start_epoch_time_in_millis": { + "description": "Filter records created on or after this time (epoch milliseconds).", "type": "number", - "format": "float", - "description": "Expiration time of the user in milliseconds." + "format": "float" }, - "external": { + "end_epoch_time_in_millis": { + "description": "Filter records created before this time (epoch milliseconds).
Version: 26.7.0.cl or later", + "type": "number", + "format": "float" + } + }, + "required": [ + "channel_type" + ] + }, + "FetchLogsRequest": { + "type": "object", + "properties": { + "log_type": { + "description": "Name of the log type", + "type": "string", + "enum": [ + "SECURITY_AUDIT" + ] + }, + "start_epoch_time_in_millis": { + "description": "Start time in EPOCH format", + "type": "number", + "format": "float" + }, + "end_epoch_time_in_millis": { + "description": "End time in EPOCH format", + "type": "number", + "format": "float" + }, + "get_all_logs": { + "description": "Fetch all the logs. This is available from 9.10.5.cl", + "default": true, + "type": "boolean", + "nullable": true + } + }, + "required": [ + "log_type" + ] + }, + "DeleteManualTranslationsRequest": { + "type": "object", + "properties": { + "scope": { + "description": "Org scope for the delete. `ORG` (default) targets the calling\nuser's current org. `CLUSTER` targets the All-Org context.", + "default": "ORG", + "type": "string", + "enum": [ + "ORG", + "CLUSTER" + ] + } + } + }, + "ExportManualTranslationsRequest": { + "type": "object", + "properties": { + "scope": { + "description": "Org scope for the export. `ORG` (default) targets the calling\nuser's current org. `CLUSTER` targets the All-Org context.", + "default": "ORG", + "type": "string", + "enum": [ + "ORG", + "CLUSTER" + ] + } + } + }, + "ConvertWorksheetToModelRequest": { + "type": "object", + "properties": { + "worksheet_ids": { + "description": "List of Worksheet IDs.", + "type": "array", + "items": { + "type": "string" + } + }, + "exclude_worksheet_ids": { + "description": "List of Worksheet IDs to be excluded.", + "type": "array", + "items": { + "type": "string" + } + }, + "convert_all": { + "description": "Indicates whether all the worksheet needs to be converted to models.", + "default": false, "type": "boolean", - "description": "Indicates whether the user is external." + "nullable": true }, - "favorite_metadata": { + "apply_changes": { + "description": "Indicates whether the changes should be applied to database.", + "default": false, + "type": "boolean", + "nullable": true + } + } + }, + "CopyObjectRequest": { + "type": "object", + "properties": { + "description": { + "description": "Description of the new object", + "type": "string" + }, + "identifier": { + "description": "GUID of metadata object to be copied (answer id or liveboard id)", + "type": "string" + }, + "type": { + "description": "Type of metadata object", + "type": "string", + "enum": [ + "LIVEBOARD", + "ANSWER" + ] + }, + "title": { + "description": "Title of the new object", + "type": "string" + } + }, + "required": [ + "identifier" + ] + }, + "DeleteMetadataRequest": { + "type": "object", + "properties": { + "metadata": { + "description": "Metadata objects.", "type": "array", "items": { - "$ref": "#/components/schemas/FavoriteMetadataItem" - }, - "description": "Metadata objects to be assigned as favorites for the imported user." + "$ref": "#/components/schemas/DeleteMetadataTypeInput" + } + }, + "delete_disabled_objects": { + "description": "Indicates whether to delete disabled metadata objects.", + "default": false, + "type": "boolean", + "nullable": true + } + }, + "required": [ + "metadata" + ] + }, + "ExportMetadataTMLRequest": { + "type": "object", + "properties": { + "metadata": { + "description": "Metadata objects.", + "type": "array", + "items": { + "$ref": "#/components/schemas/ExportMetadataTypeInput" + } + }, + "export_associated": { + "description": "Indicates whether to export associated metadata objects of specified metadata objects.", + "default": false, + "type": "boolean", + "nullable": true + }, + "export_fqn": { + "description": "Adds FQNs of the referenced objects. For example, if you are exporting a Liveboard and its associated objects,\nthe API returns the Liveboard TML data with the FQNs of the referenced worksheet.\nIf the exported TML data includes FQNs, you don't need to manually add FQNs of the referenced objects during TML import.", + "default": false, + "type": "boolean", + "nullable": true + }, + "edoc_format": { + "description": "TML EDOC content format.\n\n**Note: exporting in YAML format currently requires manual formatting of the output. For more details on the workaround, please click [here](https://developers.thoughtspot.com/docs/known-issues#_version_9_12_0_cl)**", + "default": "JSON", + "type": "string", + "enum": [ + "JSON", + "YAML" + ] + }, + "export_schema_version": { + "description": "Indicates whether to export worksheet TML in DEFAULT or V1 or V2 version.", + "default": "DEFAULT", + "type": "string", + "enum": [ + "DEFAULT", + "V1", + "V2" + ] + }, + "export_dependent": { + "description": "Indicates whether to export table while exporting connection.", + "default": false, + "type": "boolean", + "nullable": true + }, + "export_connection_as_dependent": { + "description": "Indicates whether to export connection as dependent while exporting table/worksheet/answer/liveboard.\nThis will only be active when export_associated is true.", + "default": false, + "type": "boolean", + "nullable": true + }, + "all_orgs_override": { + "description": "Indicates whether to export is happening from all orgs context.", + "default": false, + "type": "boolean", + "nullable": true + }, + "export_options": { + "description": "Flags to specify additional options for export.
Version: 10.6.0.cl or later", + "allOf": [ + { + "$ref": "#/components/schemas/Export_Options" + } + ] + } + }, + "required": [ + "metadata" + ] + }, + "ExportMetadataTMLBatchedRequest": { + "type": "object", + "properties": { + "metadata_type": { + "description": "Type of metadata object to export, can be one of USER | ROLE | USER_GROUP", + "type": "string", + "enum": [ + "USER", + "USER_GROUP", + "ROLE" + ] + }, + "batch_offset": { + "description": "Indicates the position within the complete set from where the API should begin returning objects.", + "default": 0, + "type": "integer", + "format": "int32" + }, + "batch_size": { + "description": "Determines the number of objects or items to be retrieved in a single request.", + "default": 20, + "type": "integer", + "format": "int32" + }, + "edoc_format": { + "description": "TML EDOC content format.", + "default": "JSON", + "type": "string", + "enum": [ + "JSON", + "YAML" + ] + }, + "export_dependent": { + "description": "Indicates whether to export dependent metadata objects of specified metadata objects.", + "default": false, + "type": "boolean", + "nullable": true + }, + "all_orgs_override": { + "description": "Indicates whether to export is happening from all orgs context.", + "default": false, + "type": "boolean", + "nullable": true + } + }, + "required": [ + "metadata_type" + ] + }, + "FetchAnswerSqlQueryRequest": { + "type": "object", + "properties": { + "metadata_identifier": { + "description": "ID or name of an Answer.", + "type": "string" + } + }, + "required": [ + "metadata_identifier" + ] + }, + "FetchAsyncImportTaskStatusRequest": { + "type": "object", + "properties": { + "task_ids": { + "description": "List of task IDs to fetch status for.", + "type": "array", + "items": { + "type": "string" + } + }, + "task_status": { + "description": "List of task statuses to filter on. Valid values: [IN_QUEUE, IN_PROGRESS, COMPLETED, FAILED]", + "type": "array", + "items": { + "type": "string", + "enum": [ + "COMPLETED", + "IN_QUEUE", + "IN_PROGRESS", + "FAILED" + ] + } + }, + "author_identifier": { + "description": "Author GUID or name of async import tasks to filter on.", + "type": "string" }, - "first_login_time_in_millis": { - "type": "number", - "format": "float", - "description": "First login time of the user in milliseconds." + "record_offset": { + "description": "The offset point, starting from where the task status should be included in the response.", + "default": 0, + "type": "integer", + "format": "int32" }, - "group_mask": { + "record_size": { + "description": "The number of task statuses that should be included in the response starting from offset position.", + "default": 5, "type": "integer", - "format": "int32", - "description": "Group mask of the user." + "format": "int32" }, - "hidden": { + "include_import_response": { + "description": "Boolean flag to specify whether to include import response in the task status objects.", + "default": false, "type": "boolean", - "description": "Indicates whether the user is hidden." - }, - "home_liveboard": { - "$ref": "#/components/schemas/Object_ID_And_Name", - "description": "Unique ID or name of the users home liveboard." + "nullable": true + } + } + }, + "FetchLiveboardSqlQueryRequest": { + "type": "object", + "properties": { + "metadata_identifier": { + "description": "ID or name of the Liveboard.", + "type": "string" }, - "incomplete_details": { - "type": "object", - "description": "Incomplete details of user if any present." + "visualization_identifiers": { + "description": "Unique ID or name of visualizations.", + "type": "array", + "items": { + "type": "string" + } + } + }, + "required": [ + "metadata_identifier" + ] + }, + "ImportMetadataTMLRequest": { + "type": "object", + "properties": { + "metadata_tmls": { + "description": "Details of TML objects.\n\n**Note: importing TML in YAML format, when coming directly from our Playground, is currently requires manual formatting. For more details on the workaround, please click [here](https://developers.thoughtspot.com/docs/known-issues#_version_9_12_0_cl)**", + "type": "array", + "items": { + "type": "string" + } }, - "is_first_login": { + "import_policy": { + "description": "Specifies the import policy for the TML import.", + "default": "PARTIAL", + "type": "string", + "enum": [ + "PARTIAL", + "ALL_OR_NONE", + "VALIDATE_ONLY", + "PARTIAL_OBJECT" + ] + }, + "create_new": { + "description": "If selected, creates TML objects with new GUIDs.", + "default": false, "type": "boolean", - "description": "Indicates whether it is first login of the user." - }, - "modification_time_in_millis": { - "type": "number", - "format": "float", - "description": "Last modified time of the user in milliseconds." + "nullable": true }, - "modifier_id": { - "type": "string", - "description": "Unique identifier of modifier of the user." + "all_orgs_override": { + "description": "If import is happening from all orgs context.", + "default": false, + "type": "boolean", + "nullable": true }, - "notify_on_share": { + "skip_diff_check": { + "description": "
Version: 10.6.0.cl or later
\n\nBoolean Flag to skip TML diff check before processing object TMLs.", + "default": false, "type": "boolean", - "description": "User preference for receiving email notifications on shared answers or liveboard." + "nullable": true }, - "onboarding_experience_completed": { + "enable_large_metadata_validation": { + "description": "
Version: 10.5.0.cl or later
\n\nBoolean to indicate if the large metadata validation should be enabled.", + "default": false, "type": "boolean", - "description": "The user preference for turning off the onboarding experience." + "nullable": true }, - "orgs": { + "enable_personalized_view_upsert": { + "description": "
Version: 26.8.0.cl or later
\n\nBoolean flag to enable update/insert of personalized views in liveboard.", + "default": false, + "type": "boolean", + "nullable": true + } + }, + "required": [ + "metadata_tmls" + ] + }, + "ImportMetadataTMLAsyncRequest": { + "type": "object", + "properties": { + "metadata_tmls": { + "description": "Details of TML objects.", "type": "array", "items": { - "$ref": "#/components/schemas/Org" - }, - "description": "Organizations in which user exists." + "type": "string" + } }, - "owner_id": { - "type": "string", - "description": "Unique identifier of owner of the user." + "create_new": { + "description": "If selected, creates TML objects with new GUIDs.", + "default": false, + "type": "boolean", + "nullable": true }, - "parent_type": { + "all_orgs_override": { + "description": "If import is happening from all orgs context.", + "default": false, + "type": "boolean", + "nullable": true + }, + "import_policy": { + "description": "
Version: 10.5.0.cl or later
\n\nPolicy to be followed while importing the TML. Valid values are [PARTIAL_OBJECT, PARTIAL, VALIDATE_ONLY, ALL_OR_NONE]", + "default": "PARTIAL_OBJECT", "type": "string", "enum": [ - "USER", - "GROUP" - ], - "description": "Parent type of the user." - }, - "privileges": { - "type": "array", - "items": { - "type": "string", - "enum": [ - "ADMINISTRATION", - "AUTHORING", - "USERDATAUPLOADING", - "DATADOWNLOADING", - "USERMANAGEMENT", - "SECURITYMANAGEMENT", - "LOGICALMODELING", - "DATAMANAGEMENT", - "TAGMANAGEMENT", - "SHAREWITHALL", - "SYSTEMMANAGEMENT", - "JOBSCHEDULING", - "A3ANALYSIS", - "EXPERIMENTALFEATUREPRIVILEGE", - "BYPASSRLS", - "RANALYSIS", - "DISABLE_PINBOARD_CREATION", - "DEVELOPER", - "APPLICATION_ADMINISTRATION", - "USER_ADMINISTRATION", - "GROUP_ADMINISTRATION", - "BACKUP_ADMINISTRATION", - "SYSTEM_INFO_ADMINISTRATION", - "ENABLESPOTAPPCREATION", - "SYNCMANAGEMENT" - ] - }, - "description": "Privileges which are assigned to the user." - }, - "show_onboarding_experience": { + "PARTIAL", + "ALL_OR_NONE", + "VALIDATE_ONLY", + "PARTIAL_OBJECT" + ] + }, + "skip_diff_check": { + "description": "
Version: 10.6.0.cl or later
\n\nBoolean Flag to skip TML diff check before processing object TMLs.", + "default": false, "type": "boolean", - "description": "The user preference for revisiting the onboarding experience." + "nullable": true }, - "super_user": { + "enable_large_metadata_validation": { + "description": "
Version: 10.5.0.cl or later
\n\nBoolean to indicate if the large metadata validation should be enabled.", + "default": false, "type": "boolean", - "description": "Indicates whether the user is a super user." + "nullable": true }, - "system_user": { + "enable_personalized_view_upsert": { + "description": "
Version: 26.8.0.cl or later
\n\nBoolean flag to enable update/insert of personalized views in liveboard.", + "default": false, "type": "boolean", - "description": "Indicates whether the user is a system user." + "nullable": true + } + }, + "required": [ + "metadata_tmls" + ] + }, + "ParameterizeMetadataRequest": { + "type": "object", + "properties": { + "metadata_type": { + "description": "Type of metadata object to parameterize.", + "type": "string", + "enum": [ + "LOGICAL_TABLE", + "CONNECTION", + "CONNECTION_CONFIG" + ] }, - "tags": { - "type": "array", - "items": { - "$ref": "#/components/schemas/Object_ID_And_Name" - }, - "description": "Tags associated with the user." + "metadata_identifier": { + "description": "Unique ID or name of the metadata object to parameterize.", + "type": "string" }, - "tenant_id": { + "field_type": { + "description": "Type of field in the metadata to parameterize.", "type": "string", - "description": "Unique identifier of tenant of the user." - }, - "user_groups": { - "type": "array", - "items": { - "$ref": "#/components/schemas/Object_ID_And_Name" - }, - "description": "User Groups which the user is part of." + "enum": [ + "ATTRIBUTE", + "CONNECTION_PROPERTY" + ] }, - "user_inherited_groups": { - "type": "array", - "items": { - "$ref": "#/components/schemas/Object_ID_And_Name" - }, - "description": "Inherited User Groups which the user is part of." + "field_name": { + "description": "Name of the field which needs to be parameterized.", + "type": "string" }, - "welcome_email_sent": { - "type": "boolean", - "description": "Indicates whether welcome email is sent for the user." + "variable_identifier": { + "description": "Unique ID or name of the variable to use for parameterization", + "type": "string" } - } + }, + "required": [ + "metadata_identifier", + "field_type", + "field_name", + "variable_identifier" + ] }, - "FavoriteMetadataInput": { + "ParameterizeMetadataFieldsRequest": { "type": "object", "properties": { - "identifier": { - "type": "string", - "description": "Unique ID or name of the metadata." - }, - "type": { + "metadata_type": { + "description": "Type of metadata object to parameterize.", "type": "string", "enum": [ - "LIVEBOARD", - "ANSWER", "LOGICAL_TABLE", "CONNECTION", - "DATA_SOURCE" - ], - "description": "Type of metadata." + "CONNECTION_CONFIG" + ] + }, + "metadata_identifier": { + "description": "Unique ID or name of the metadata object to parameterize.", + "type": "string" + }, + "field_type": { + "description": "Type of field in the metadata to parameterize.", + "type": "string", + "enum": [ + "ATTRIBUTE", + "CONNECTION_PROPERTY" + ] + }, + "field_names": { + "description": "JSON array of field names to parameterize. Example: [schemaName, databaseName, tableName]", + "type": "array", + "items": { + "type": "string" + } + }, + "variable_identifier": { + "description": "Unique ID or name of the variable to use for parameterization of these fields.", + "type": "string" } - } + }, + "required": [ + "metadata_identifier", + "field_type", + "field_names", + "variable_identifier" + ] }, - "ImportUser": { + "SearchMetadataRequest": { "type": "object", - "required": [ - "user_identifier", - "display_name" - ], "properties": { - "user_identifier": { - "type": "string", - "description": "Unique ID or name of the user." + "metadata": { + "description": "Metadata objects such as Liveboards, Answers, and Worksheets.", + "type": "array", + "items": { + "$ref": "#/components/schemas/MetadataListItemInput" + } }, - "display_name": { - "type": "string", - "description": "Unique display name of the user." + "permissions": { + "description": "Object permission details to search by.", + "type": "array", + "items": { + "$ref": "#/components/schemas/PermissionInput" + } }, - "password": { - "type": "string", - "description": "Password of the user." + "created_by_user_identifiers": { + "description": "GUID or name of user who created the metadata object.", + "type": "array", + "items": { + "type": "string" + } }, - "account_type": { + "dependent_object_version": { + "description": "Version of the dependent table of the metadata objects like Worksheets.", + "default": "V1", "type": "string", "enum": [ - "LOCAL_USER", - "LDAP_USER", - "SAML_USER", - "OIDC_USER", - "REMOTE_USER" - ], - "description": "Type of the user account." + "V1", + "V2" + ] }, - "account_status": { - "type": "string", - "enum": [ - "ACTIVE", - "INACTIVE", - "EXPIRED", - "LOCKED", - "PENDING" - ], - "description": "Status of the user account." + "exclude_objects": { + "description": "List of metadata objects to exclude from search.", + "type": "array", + "items": { + "$ref": "#/components/schemas/ExcludeMetadataListItemInput" + } }, - "email": { - "type": "string", - "description": "Email of the user." + "favorite_object_options": { + "description": "Options to sort the API response by objects set as favorites\nfor the logged-in user or the users specified in the API request.", + "allOf": [ + { + "$ref": "#/components/schemas/FavoriteObjectOptionsInput" + } + ] }, - "org_identifiers": { + "include_auto_created_objects": { + "description": "Includes system-generated metadata objects.", + "default": false, + "type": "boolean", + "nullable": true + }, + "include_dependent_objects": { + "description": "Includes dependents of the metadata object specified in the API request.\nFor example, a worksheet can consist of dependent objects such as Liveboards or Answers.", + "default": false, + "type": "boolean", + "nullable": true + }, + "dependent_objects_record_size": { + "description": "The maximum number of dependents to include per metadata object.", + "default": 50, + "type": "integer", + "format": "int32" + }, + "include_details": { + "description": "Includes complete details of the metadata objects.", + "default": false, + "type": "boolean", + "nullable": true + }, + "include_personalised_views": { + "description": "When set to true and include_details is also true, includes personalised views\nin the metadata_detail for LIVEBOARD objects.", + "default": false, + "type": "boolean", + "nullable": true + }, + "include_headers": { + "description": "Includes headers of the metadata objects.", + "default": true, + "type": "boolean", + "nullable": true + }, + "include_hidden_objects": { + "description": "Includes details of the hidden objects, such as a column in a worksheet or a table.", + "default": false, + "type": "boolean", + "nullable": true + }, + "include_incomplete_objects": { + "description": "Includes objects with incomplete metadata.", + "default": false, + "type": "boolean", + "nullable": true + }, + "include_visualization_headers": { + "description": "Includes visualization headers of the specified Liveboard object.", + "default": false, + "type": "boolean", + "nullable": true + }, + "include_worksheet_search_assist_data": { + "description": "If search assistance lessons are configured on a worksheet,\nthe API returns the search assist data for Worksheet objects.", + "type": "boolean", + "nullable": true + }, + "modified_by_user_identifiers": { + "description": "Includes ID or names of the users who modified the metadata object.", "type": "array", "items": { "type": "string" - }, - "description": "Unique ID or name of the Orgs for the users." + } }, - "group_identifiers": { + "record_offset": { + "description": "The starting record number from where the records should be included.", + "default": 0, + "type": "integer", + "format": "int32" + }, + "record_size": { + "description": "The number of records that should be included. It is recommended to use a smaller `record_size` when fetching dependent objects or any of the additional metadata detail options.", + "default": 10, + "type": "integer", + "format": "int32" + }, + "sort_options": { + "description": "Sort options to filter metadata details.", + "allOf": [ + { + "$ref": "#/components/schemas/MetadataSearchSortOptions" + } + ] + }, + "tag_identifiers": { + "description": "Tags to filter metadata objects by", "type": "array", "items": { "type": "string" - }, - "description": "Unique ID or name of the User Groups of the users." - }, - "visibility": { - "type": "string", - "enum": [ - "SHARABLE", - "NON_SHARABLE" - ], - "description": "Visibility of the users. The SHARABLE makes a users visible to other users and user groups,\nand thus allows them to share objects." + } }, - "notify_on_share": { + "include_stats": { + "description": "Indicates whether to include stats of the metadata objects.", + "default": false, "type": "boolean", - "description": "User preference for receiving email notifications on shared answers or liveboard." + "nullable": true }, - "show_onboarding_experience": { + "include_discoverable_objects": { + "description": "
Version: 10.7.0.cl or later
\n\nBoolean to indicate whether to include discoverable metadata objects.", + "default": true, "type": "boolean", - "description": "The user preference for revisiting the onboarding experience." + "nullable": true }, - "onboarding_experience_completed": { + "show_resolved_parameters": { + "description": "
Version: 10.9.0.cl or later
\n\nIndicates whether to show resolved parameterised values.", + "default": false, "type": "boolean", - "description": "The user preference for turning off the onboarding experience." + "nullable": true }, - "home_liveboard_identifier": { + "liveboard_response_version": { + "description": "Indicates the model version of Liveboard to be attached in metadata detail.", + "default": "V1", "type": "string", - "description": "Unique ID or name of the users home liveboard." + "enum": [ + "V1", + "V2" + ] }, - "favorite_metadata": { - "type": "array", - "items": { - "$ref": "#/components/schemas/FavoriteMetadataInput" - }, - "description": "Metadata objects to be assigned as favorites for the imported user." + "include_only_published_objects": { + "description": "
Version: 10.11.0.cl or later
\n\nIf only published objects should be returned", + "default": false, + "type": "boolean", + "nullable": true } } }, - "ImportUsersResponse": { + "UnparameterizeMetadataRequest": { "type": "object", "properties": { - "users_added": { - "type": "array", - "items": { - "$ref": "#/components/schemas/ImportUserType" - } + "metadata_type": { + "description": "Type of metadata object to unparameterize.", + "type": "string", + "enum": [ + "LOGICAL_TABLE", + "CONNECTION", + "CONNECTION_CONFIG" + ] }, - "users_updated": { - "type": "array", - "items": { - "$ref": "#/components/schemas/ImportUserType" - } + "metadata_identifier": { + "description": "Unique ID or name of the metadata object to unparameterize.", + "type": "string" }, - "users_deleted": { - "type": "array", - "items": { - "$ref": "#/components/schemas/ImportUserType" - } + "field_type": { + "description": "Type of field in the metadata to unparameterize.", + "type": "string", + "enum": [ + "ATTRIBUTE", + "CONNECTION_PROPERTY" + ] + }, + "field_name": { + "description": "Name of the field which needs to be unparameterized.", + "type": "string" + }, + "value": { + "description": "The value to use in place of the variable for the field", + "type": "string" } - } + }, + "required": [ + "metadata_identifier", + "field_type", + "field_name", + "value" + ] }, - "UserGroup": { + "UpdateMetadataHeaderRequest": { "type": "object", "properties": { - "id": { - "type": "string" + "headers_update": { + "description": "List of header objects to update.", + "type": "array", + "items": { + "$ref": "#/components/schemas/HeaderUpdateInput" + } }, - "name": { + "org_identifier": { + "description": "Unique ID or name of the organization.", "type": "string" } - } + }, + "required": [ + "headers_update" + ] }, - "VisualizationIdentifiersInput": { + "UpdateMetadataObjIdRequest": { "type": "object", "properties": { - "identifier": { - "type": "string", - "description": "Unique ID or name of the visualization." + "metadata": { + "description": "List of metadata objects to update their object IDs.", + "type": "array", + "items": { + "$ref": "#/components/schemas/UpdateObjIdInput" + } } - } + }, + "required": [ + "metadata" + ] }, - "MetadataTypeInput": { + "CreateOrgRequest": { "type": "object", - "required": [ - "type", - "identifier" - ], "properties": { - "type": { - "type": "string", - "enum": [ - "LIVEBOARD", - "ANSWER", - "LOGICAL_TABLE", - "LOGICAL_COLUMN", - "CONNECTION", - "TAG", - "USER", - "USER_GROUP", - "LOGICAL_RELATIONSHIP" - ], - "description": "Type of metadata." + "name": { + "description": "Name of the Org.", + "type": "string" }, - "identifier": { - "type": "string", - "description": "Unique ID or name of the metadata." + "description": { + "description": "Description of the Org.", + "type": "string" } }, - "description": "MetadataType InputType associated in the Product" + "required": [ + "name" + ] }, - "DeleteMetadataTypeInput": { + "SearchOrgsRequest": { "type": "object", - "required": [ - "type", - "identifier" - ], "properties": { - "type": { + "org_identifier": { + "description": "ID or name of the Org", + "type": "string" + }, + "description": { + "description": "Description of the Org", + "type": "string" + }, + "visibility": { + "description": "Visibility of the Org", "type": "string", "enum": [ - "LIVEBOARD", - "ANSWER", - "LOGICAL_TABLE", - "LOGICAL_COLUMN" - ], - "description": "Type of metadata." + "SHOW", + "HIDDEN" + ] }, - "identifier": { + "status": { + "description": "Status of the Org", "type": "string", - "description": "Unique ID or name of the metadata." + "enum": [ + "ACTIVE", + "IN_ACTIVE" + ] + }, + "user_identifiers": { + "description": "GUIDs or names of the users for which you want to retrieve the Orgs data", + "type": "array", + "items": { + "type": "string" + } } - }, - "description": "MetadataType InputType used in Delete MetadataType API's" + } }, - "PrincipalsInput": { + "UpdateOrgRequest": { "type": "object", - "required": [ - "identifier", - "type" - ], "properties": { - "identifier": { - "type": "string", - "description": "Unique ID or name of the principal." + "name": { + "description": "Name of the Org", + "type": "string" }, - "type": { + "description": { + "description": "Description of the Org", + "type": "string" + }, + "user_identifiers": { + "description": "Add Users to an Org", + "type": "array", + "items": { + "type": "string" + } + }, + "group_identifiers": { + "description": "Add Default Groups to an Org", + "type": "array", + "items": { + "type": "string" + } + }, + "operation": { + "description": "Type of update operation. Default operation type is ADD", + "default": "ADD", "type": "string", "enum": [ - "USER", - "USER_GROUP" - ], - "description": "Principal type." + "ADD", + "REMOVE", + "REPLACE" + ] } } }, - "AuthorMetadataTypeInput": { + "ExportAnswerReportRequest": { "type": "object", - "required": [ - "type", - "identifier" - ], "properties": { - "type": { + "metadata_identifier": { + "description": "Unique ID or name of the metadata object.", + "type": "string" + }, + "session_identifier": { + "description": "Unique ID of the answer session.", + "type": "string" + }, + "generation_number": { + "description": "Generation number of the answer session.", + "type": "integer", + "format": "int32" + }, + "file_format": { + "description": "Export file format.", + "default": "CSV", "type": "string", "enum": [ - "LIVEBOARD", - "ANSWER", - "LOGICAL_TABLE" - ], - "description": "Type of metadata." + "CSV", + "PDF", + "XLSX", + "PNG" + ] + }, + "runtime_filter": { + "description": "JSON string representing runtime filter.\n{ col1:region, op1: EQ, val1: northeast }", + "type": "object" + }, + "runtime_sort": { + "description": "JSON string representing runtime sort.\n{ sortCol1: region, asc1 :true, sortCol2 : date }", + "type": "object" + }, + "runtime_param_override": { + "description": "JSON object for setting values of parameters in runtime.", + "type": "object" + }, + "regional_settings": { + "description": "Options for specific region specific overrides to support date/number/string/currency formatting.", + "allOf": [ + { + "$ref": "#/components/schemas/RegionalSettingsInput" + } + ] + }, + "png_options": { + "description": "Options for PNG export.
Beta Version: 26.6.0.cl or later", + "allOf": [ + { + "$ref": "#/components/schemas/AnswerPngOptionsInput" + } + ] + }, + "personalised_view_identifier": { + "description": "GUID or name of the personalised view of the Answer object.
Beta Version: 26.6.0.cl or later", + "type": "string" }, - "identifier": { - "type": "string", - "description": "Unique ID or name of the metadata." - } - }, - "description": "MetadataType InputType used in Author API's" - }, - "PermissionsMetadataTypeInput": { - "type": "object", - "required": [ - "type", - "identifier" - ], - "properties": { "type": { + "description": "Type of the answer being exported.
Beta Version: 26.6.0.cl or later", + "default": "SAVED", "type": "string", "enum": [ - "LIVEBOARD", - "ANSWER", - "LOGICAL_TABLE", - "LOGICAL_COLUMN", - "CONNECTION" - ], - "description": "Type of metadata." - }, - "identifier": { - "type": "string", - "description": "Unique ID or name of the metadata." + "SAVED", + "PINNED" + ] } - }, - "description": "MetadataType InputType used in Permission API's" + } }, - "SharePermissionsInput": { + "ExportLiveboardReportRequest": { "type": "object", - "required": [ - "principal", - "share_mode" - ], "properties": { - "principal": { - "$ref": "#/components/schemas/PrincipalsInput", - "description": "Details of users or user groups." + "metadata_identifier": { + "description": "GUID or name of the Liveboard object.", + "type": "string" }, - "share_mode": { + "tab_identifiers": { + "description": "GUID or name of the tab of the Liveboard object.
Version: 10.9.0.cl or later", + "type": "array", + "items": { + "type": "string" + } + }, + "personalised_view_identifier": { + "description": "GUID or name of the personalised view of the Liveboard object.
Version: 10.9.0.cl or later", + "type": "string" + }, + "visualization_identifiers": { + "description": "GUID or name of visualizations on the Liveboard. If this parameter is\nnot defined, the API returns a report with all visualizations saved on a Liveboard.", + "type": "array", + "items": { + "type": "string" + } + }, + "transient_content": { + "description": "Transient content of the Liveboard.", + "type": "string" + }, + "file_format": { + "description": "Export file format.", + "default": "PDF", "type": "string", "enum": [ - "READ_ONLY", - "MODIFY", - "NO_ACCESS" - ], - "description": "Object share mode." + "PDF", + "PNG", + "CSV", + "XLSX" + ] + }, + "runtime_filter": { + "description": "JSON object with representing filter condition to apply filters at runtime. For example, {\"col1\": \"region\", \"op1\": \"EQ\", \"val1\": \"northeast\" }. You can add multiple keys by incrementing the number at the end, for example, col2, op2, val2. For more information, see [API Documentation](https://developers.thoughtspot.com/docs/fetch-data-and-report-apis#_runtime_filters).", + "type": "object" + }, + "override_filters": { + "description": "Applied to the liveboard and overrides any filters already applied on the same columns in liveboard.\nFollowing example illustrate different kinds of filters:\n{\n \"override_filters\": [\n {\n \"column_name\": \"Color\",\n \"generic_filter\": {\n \"op\": \"IN\",\n \"values\": [\n \"almond\",\n \"turquoise\"\n ]\n },\n \"negate\": false\n },\n {\n \"column_name\": \"Commit Date\",\n \"date_filter\": {\n \"datePeriod\": \"HOUR\",\n \"number\": 3,\n \"type\": \"LAST_N_PERIOD\",\n \"op\": \"EQ\"\n }\n },\n {\n \"column_name\": \"Sales\",\n \"generic_filter\": {\n \"op\": \"BW_INC\",\n \"values\": [\n \"100000\",\n \"70000\"\n ]\n },\n \"negate\": true\n }\n ]\n}", + "type": "object" + }, + "runtime_sort": { + "description": "JSON string representing runtime sort. For example, {\"sortCol1\": \"region\", \"asc1\" : true}. For more information, see [API Documentation](https://developers.thoughtspot.com/docs/fetch-data-and-report-apis#_runtime_sort).", + "type": "object" + }, + "pdf_options": { + "description": "Options for PDF export.", + "allOf": [ + { + "$ref": "#/components/schemas/PdfOptionsInput" + } + ] + }, + "png_options": { + "description": "Options for PNG export.", + "allOf": [ + { + "$ref": "#/components/schemas/PngOptionsInput" + } + ] + }, + "runtime_param_override": { + "description": "JSON object for setting values of parameters at runtime. For example, {\"param1\": \"Double List Param\", \"paramVal1\": 0.5}. You can add multiple keys by incrementing the number at the end, for example, param2, paramVal2. For more information, see [API Documentation](https://developers.thoughtspot.com/docs/fetch-data-and-report-apis#_runtime_parameters).", + "type": "object" + }, + "regional_settings": { + "description": "Options for specific region specific overrides to support date/number/string/currency formatting.", + "allOf": [ + { + "$ref": "#/components/schemas/RegionalSettingsInput" + } + ] } - } - }, - "AnswerDataResponse": { - "type": "object", + }, "required": [ - "metadata_id", - "metadata_name", - "contents" - ], + "metadata_identifier" + ] + }, + "CreateRoleRequest": { + "type": "object", "properties": { - "metadata_id": { - "type": "string", - "description": "The unique identifier of the object" + "name": { + "description": "Unique name of the Role.", + "type": "string" }, - "metadata_name": { - "type": "string", - "description": "Name of the metadata." + "description": { + "description": "Description of the Role.", + "type": "string" }, - "contents": { + "privileges": { + "description": "Privileges granted to the Role. See [Documentation](https://developers.thoughtspot.com/docs/rbac#_role_categories_and_privileges)for supported roles privileges. Note: AUTHORING is a no-op — always inherited via ALL_GROUP, assigning it has no effect.", "type": "array", "items": { - "$ref": "#/components/schemas/AnswerContent" - }, - "description": "Data content of metadata objects." + "type": "string", + "enum": [ + "USERDATAUPLOADING", + "DATADOWNLOADING", + "DATAMANAGEMENT", + "SHAREWITHALL", + "JOBSCHEDULING", + "A3ANALYSIS", + "BYPASSRLS", + "DISABLE_PINBOARD_CREATION", + "DEVELOPER", + "APPLICATION_ADMINISTRATION", + "USER_ADMINISTRATION", + "GROUP_ADMINISTRATION", + "SYSTEM_INFO_ADMINISTRATION", + "SYNCMANAGEMENT", + "ORG_ADMINISTRATION", + "ROLE_ADMINISTRATION", + "AUTHENTICATION_ADMINISTRATION", + "BILLING_INFO_ADMINISTRATION", + "CONTROL_TRUSTED_AUTH", + "TAGMANAGEMENT", + "LIVEBOARD_VERIFIER", + "CAN_MANAGE_CUSTOM_CALENDAR", + "CAN_CREATE_OR_EDIT_CONNECTIONS", + "CAN_MANAGE_WORKSHEET_VIEWS_TABLES", + "CAN_MANAGE_VERSION_CONTROL", + "THIRDPARTY_ANALYSIS", + "CAN_CREATE_CATALOG", + "ALLOW_NON_EMBED_FULL_APP_ACCESS", + "CAN_ACCESS_ANALYST_STUDIO", + "CAN_MANAGE_ANALYST_STUDIO", + "PREVIEW_DOCUMENT_SEARCH", + "CAN_MANAGE_VARIABLES", + "CAN_MODIFY_FOLDERS", + "CAN_VIEW_FOLDERS", + "CAN_MANAGE_AGENTSPOT", + "CAN_ACCESS_AGENTSPOT", + "CAN_SETUP_VERSION_CONTROL", + "PREVIEW_THOUGHTSPOT_SAGE", + "CAN_MANAGE_WEBHOOKS", + "CAN_DOWNLOAD_VISUALS", + "CAN_DOWNLOAD_DETAILED_DATA", + "CAN_USE_SPOTTER", + "CAN_MANAGE_SPOTTER" + ] + } + }, + "read_only": { + "description": "
Version: 10.5.0.cl or later
\n\nIndicates whether the role is read only. A readonly role can neither be updated nor deleted.", + "default": false, + "type": "boolean", + "nullable": true } }, - "description": "Response format associated with fetch data api" + "required": [ + "name" + ] }, - "LiveboardDataResponse": { + "SearchRolesRequest": { "type": "object", - "required": [ - "metadata_id", - "metadata_name", - "contents" - ], "properties": { - "metadata_id": { - "type": "string", - "description": "The unique identifier of the object" + "role_identifiers": { + "description": "unique ID or name of the Roles", + "type": "array", + "items": { + "type": "string" + } }, - "metadata_name": { - "type": "string", - "description": "Name of the metadata." + "org_identifiers": { + "description": "Unique Id or name of the Organisation", + "type": "array", + "items": { + "type": "string" + } }, - "contents": { + "group_identifiers": { + "description": "Unique Id or name of the User Group", "type": "array", "items": { - "$ref": "#/components/schemas/LiveboardContent" + "type": "string" + } + }, + "privileges": { + "description": "Privileges assigned to the Role. See [Documentation](https://developers.thoughtspot.com/docs/rbac#_role_categories_and_privileges)for supported roles privileges.", + "type": "array", + "items": { + "type": "string", + "enum": [ + "UNKNOWN", + "ADMINISTRATION", + "AUTHORING", + "USERDATAUPLOADING", + "DATADOWNLOADING", + "USERMANAGEMENT", + "SECURITYMANAGEMENT", + "LOGICALMODELING", + "DATAMANAGEMENT", + "TAGMANAGEMENT", + "SHAREWITHALL", + "SYSTEMMANAGEMENT", + "JOBSCHEDULING", + "A3ANALYSIS", + "EXPERIMENTALFEATUREPRIVILEGE", + "BYPASSRLS", + "RANALYSIS", + "DISABLE_PINBOARD_CREATION", + "DEVELOPER", + "APPLICATION_ADMINISTRATION", + "USER_ADMINISTRATION", + "GROUP_ADMINISTRATION", + "BACKUP_ADMINISTRATION", + "SYSTEM_INFO_ADMINISTRATION", + "ENABLESPOTAPPCREATION", + "SYNCMANAGEMENT", + "ORG_ADMINISTRATION", + "ROLE_ADMINISTRATION", + "AUTHENTICATION_ADMINISTRATION", + "BILLING_INFO_ADMINISTRATION", + "PREVIEW_THOUGHTSPOT_SAGE", + "LIVEBOARD_VERIFIER", + "CAN_MANAGE_CUSTOM_CALENDAR", + "CAN_CREATE_OR_EDIT_CONNECTIONS", + "CAN_CONFIGURE_CONNECTIONS", + "CAN_MANAGE_WORKSHEET_VIEWS_TABLES", + "CAN_MANAGE_VERSION_CONTROL", + "THIRDPARTY_ANALYSIS", + "CONTROL_TRUSTED_AUTH", + "CAN_CREATE_CATALOG", + "ALLOW_NON_EMBED_FULL_APP_ACCESS", + "CAN_ACCESS_ANALYST_STUDIO", + "CAN_MANAGE_ANALYST_STUDIO", + "CAN_VIEW_FOLDERS", + "CAN_MODIDY_FOLDERS", + "CAN_MANAGE_VARIABLES", + "CAN_MANAGE_AGENTSPOT", + "CAN_ACCESS_AGENTSPOT", + "PREVIEW_DOCUMENT_SEARCH", + "CAN_SETUP_VERSION_CONTROL", + "CAN_MANAGE_WEBHOOKS", + "CAN_DOWNLOAD_VISUALS", + "CAN_DOWNLOAD_DETAILED_DATA", + "CAN_USE_SPOTTER", + "CAN_MANAGE_SPOTTER" + ] + } + }, + "deprecated": { + "description": "Indicates whether the Role is deprecated.", + "type": "boolean", + "deprecated": true, + "nullable": true + }, + "external": { + "description": "Indicates whether the Role is external", + "type": "boolean", + "deprecated": true, + "nullable": true + }, + "shared_via_connection": { + "description": "Indicates whether the Role is shared via connection", + "type": "boolean", + "deprecated": true, + "nullable": true + }, + "permissions": { + "description": "Permission details of the Role", + "type": "array", + "items": { + "type": "string", + "enum": [ + "READ_ONLY", + "MODIFY", + "NO_ACCESS" + ] }, - "description": "Data content of metadata objects." + "deprecated": true } } }, - "RiseSetter": { + "UpdateRoleRequest": { "type": "object", - "required": [ - "field", - "path" - ], "properties": { - "field": { + "name": { + "description": "Name of the Role.", "type": "string" }, - "path": { + "description": { + "description": "Description of the Role.", "type": "string" + }, + "privileges": { + "description": "Privileges granted to the role. See [Documentation](https://developers.thoughtspot.com/docs/rbac#_role_categories_and_privileges)for supported roles privileges. Note: AUTHORING is a no-op — always inherited via ALL_GROUP, assigning it has no effect.", + "type": "array", + "items": { + "type": "string", + "enum": [ + "USERDATAUPLOADING", + "DATADOWNLOADING", + "DATAMANAGEMENT", + "SHAREWITHALL", + "JOBSCHEDULING", + "A3ANALYSIS", + "BYPASSRLS", + "DISABLE_PINBOARD_CREATION", + "DEVELOPER", + "APPLICATION_ADMINISTRATION", + "USER_ADMINISTRATION", + "GROUP_ADMINISTRATION", + "SYSTEM_INFO_ADMINISTRATION", + "SYNCMANAGEMENT", + "ORG_ADMINISTRATION", + "ROLE_ADMINISTRATION", + "AUTHENTICATION_ADMINISTRATION", + "BILLING_INFO_ADMINISTRATION", + "CONTROL_TRUSTED_AUTH", + "TAGMANAGEMENT", + "LIVEBOARD_VERIFIER", + "CAN_MANAGE_CUSTOM_CALENDAR", + "CAN_CREATE_OR_EDIT_CONNECTIONS", + "CAN_MANAGE_WORKSHEET_VIEWS_TABLES", + "CAN_MANAGE_VERSION_CONTROL", + "THIRDPARTY_ANALYSIS", + "CAN_CREATE_CATALOG", + "CAN_ACCESS_ANALYST_STUDIO", + "CAN_MANAGE_ANALYST_STUDIO", + "CAN_MODIFY_FOLDERS", + "CAN_MANAGE_VARIABLES", + "CAN_VIEW_FOLDERS", + "CAN_MANAGE_AGENTSPOT", + "CAN_ACCESS_AGENTSPOT", + "PREVIEW_DOCUMENT_SEARCH", + "PREVIEW_THOUGHTSPOT_SAGE", + "CAN_MANAGE_WEBHOOKS", + "CAN_DOWNLOAD_VISUALS", + "CAN_DOWNLOAD_DETAILED_DATA", + "CAN_USE_SPOTTER", + "CAN_MANAGE_SPOTTER" + ] + } } - } + }, + "required": [ + "name" + ] }, - "SystemInfo": { + "CreateScheduleRequest": { "type": "object", "properties": { - "id": { - "type": "string", - "description": "The unique identifier of the object" - }, "name": { - "type": "string", - "description": "Name of the cluster." - }, - "release_version": { - "type": "string", - "description": "The release version of the cluster." - }, - "time_zone": { - "type": "string", - "description": "The timezone of the cluster." - }, - "locale": { - "type": "string", - "description": "The default locale of the cluster." - }, - "date_format": { - "type": "string", - "description": "The default date format representation of the cluster." - }, - "api_version": { - "type": "string", - "description": "The API version of the cluster." - }, - "type": { - "type": "string", - "description": "The deployment type of the cluster." - }, - "environment": { - "type": "string", - "description": "The deployed environment of the cluster." - }, - "license": { - "type": "string", - "description": "The license applied to the cluster." - }, - "date_time_format": { - "type": "string", - "description": "The default date time format representation of the cluster." - }, - "time_format": { - "type": "string", - "description": "The default time format representation of the cluster." - }, - "system_user_id": { - "type": "string", - "description": "The unique identifier of system user." - }, - "super_user_id": { - "type": "string", - "description": "The unique identifier of super user." - }, - "hidden_object_id": { - "type": "string", - "description": "The unique identifier of hidden object." + "description": "Name of the scheduled job.", + "type": "string" }, - "system_group_id": { - "type": "string", - "description": "The unique identifier of system group." + "description": { + "description": "Description of the job.", + "type": "string" }, - "tsadmin_user_id": { + "metadata_type": { + "description": "Type of the metadata object.", "type": "string", - "description": "The unique identifier of tsadmin user." + "enum": [ + "LIVEBOARD" + ] }, - "admin_group_id": { - "type": "string", - "description": "The unique identifier of admin group." + "metadata_identifier": { + "description": "Unique ID or name of the metadata object.", + "type": "string" }, - "all_tables_connection_id": { + "file_format": { + "description": "Export file format.", + "default": "PDF", "type": "string", - "description": "The unique identifier of all tables connection." + "enum": [ + "CSV", + "PDF", + "XLSX" + ] + }, + "liveboard_options": { + "description": "Options to specify details of Liveboard.", + "allOf": [ + { + "$ref": "#/components/schemas/LiveboardOptionsInput" + } + ] }, - "all_user_group_id": { - "type": "string", - "description": "The unique identifier of ALL user group." + "pdf_options": { + "description": "PDF layout and orientation settings. Applicable only if the `file_format` is specified as `PDF`.", + "allOf": [ + { + "$ref": "#/components/schemas/SchedulesPdfOptionsInput" + } + ] }, - "accept_language": { + "time_zone": { + "description": "Time zone", + "default": "America/Los_Angeles", "type": "string", - "description": "The supported accept language by the cluster." + "enum": [ + "Africa/Abidjan", + "Africa/Accra", + "Africa/Addis_Ababa", + "Africa/Algiers", + "Africa/Asmara", + "Africa/Asmera", + "Africa/Bamako", + "Africa/Bangui", + "Africa/Banjul", + "Africa/Bissau", + "Africa/Blantyre", + "Africa/Brazzaville", + "Africa/Bujumbura", + "Africa/Cairo", + "Africa/Casablanca", + "Africa/Ceuta", + "Africa/Conakry", + "Africa/Dakar", + "Africa/Dar_es_Salaam", + "Africa/Djibouti", + "Africa/Douala", + "Africa/El_Aaiun", + "Africa/Freetown", + "Africa/Gaborone", + "Africa/Harare", + "Africa/Johannesburg", + "Africa/Juba", + "Africa/Kampala", + "Africa/Khartoum", + "Africa/Kigali", + "Africa/Kinshasa", + "Africa/Lagos", + "Africa/Libreville", + "Africa/Lome", + "Africa/Luanda", + "Africa/Lubumbashi", + "Africa/Lusaka", + "Africa/Malabo", + "Africa/Maputo", + "Africa/Maseru", + "Africa/Mbabane", + "Africa/Mogadishu", + "Africa/Monrovia", + "Africa/Nairobi", + "Africa/Ndjamena", + "Africa/Niamey", + "Africa/Nouakchott", + "Africa/Ouagadougou", + "Africa/Porto-Novo", + "Africa/Sao_Tome", + "Africa/Timbuktu", + "Africa/Tripoli", + "Africa/Tunis", + "Africa/Windhoek", + "America/Adak", + "America/Anchorage", + "America/Anguilla", + "America/Antigua", + "America/Araguaina", + "America/Argentina/Buenos_Aires", + "America/Argentina/Catamarca", + "America/Argentina/ComodRivadavia", + "America/Argentina/Cordoba", + "America/Argentina/Jujuy", + "America/Argentina/La_Rioja", + "America/Argentina/Mendoza", + "America/Argentina/Rio_Gallegos", + "America/Argentina/Salta", + "America/Argentina/San_Juan", + "America/Argentina/San_Luis", + "America/Argentina/Tucuman", + "America/Argentina/Ushuaia", + "America/Aruba", + "America/Asuncion", + "America/Atikokan", + "America/Atka", + "America/Bahia", + "America/Bahia_Banderas", + "America/Barbados", + "America/Belem", + "America/Belize", + "America/Blanc-Sablon", + "America/Boa_Vista", + "America/Bogota", + "America/Boise", + "America/Buenos_Aires", + "America/Cambridge_Bay", + "America/Campo_Grande", + "America/Cancun", + "America/Caracas", + "America/Catamarca", + "America/Cayenne", + "America/Cayman", + "America/Chicago", + "America/Chihuahua", + "America/Coral_Harbour", + "America/Cordoba", + "America/Costa_Rica", + "America/Creston", + "America/Cuiaba", + "America/Curacao", + "America/Danmarkshavn", + "America/Dawson", + "America/Dawson_Creek", + "America/Denver", + "America/Detroit", + "America/Dominica", + "America/Edmonton", + "America/Eirunepe", + "America/El_Salvador", + "America/Ensenada", + "America/Fort_Nelson", + "America/Fort_Wayne", + "America/Fortaleza", + "America/Glace_Bay", + "America/Godthab", + "America/Goose_Bay", + "America/Grand_Turk", + "America/Grenada", + "America/Guadeloupe", + "America/Guatemala", + "America/Guayaquil", + "America/Guyana", + "America/Halifax", + "America/Havana", + "America/Hermosillo", + "America/Indiana/Indianapolis", + "America/Indiana/Knox", + "America/Indiana/Marengo", + "America/Indiana/Petersburg", + "America/Indiana/Tell_City", + "America/Indiana/Vevay", + "America/Indiana/Vincennes", + "America/Indiana/Winamac", + "America/Indianapolis", + "America/Inuvik", + "America/Iqaluit", + "America/Jamaica", + "America/Jujuy", + "America/Juneau", + "America/Kentucky/Louisville", + "America/Kentucky/Monticello", + "America/Knox_IN", + "America/Kralendijk", + "America/La_Paz", + "America/Lima", + "America/Los_Angeles", + "America/Louisville", + "America/Lower_Princes", + "America/Maceio", + "America/Managua", + "America/Manaus", + "America/Marigot", + "America/Martinique", + "America/Matamoros", + "America/Mazatlan", + "America/Mendoza", + "America/Menominee", + "America/Merida", + "America/Metlakatla", + "America/Mexico_City", + "America/Miquelon", + "America/Moncton", + "America/Monterrey", + "America/Montevideo", + "America/Montreal", + "America/Montserrat", + "America/Nassau", + "America/New_York", + "America/Nipigon", + "America/Nome", + "America/Noronha", + "America/North_Dakota/Beulah", + "America/North_Dakota/Center", + "America/North_Dakota/New_Salem", + "America/Nuuk", + "America/Ojinaga", + "America/Panama", + "America/Pangnirtung", + "America/Paramaribo", + "America/Phoenix", + "America/Port-au-Prince", + "America/Port_of_Spain", + "America/Porto_Acre", + "America/Porto_Velho", + "America/Puerto_Rico", + "America/Punta_Arenas", + "America/Rainy_River", + "America/Rankin_Inlet", + "America/Recife", + "America/Regina", + "America/Resolute", + "America/Rio_Branco", + "America/Rosario", + "America/Santa_Isabel", + "America/Santarem", + "America/Santiago", + "America/Santo_Domingo", + "America/Sao_Paulo", + "America/Scoresbysund", + "America/Shiprock", + "America/Sitka", + "America/St_Barthelemy", + "America/St_Johns", + "America/St_Kitts", + "America/St_Lucia", + "America/St_Thomas", + "America/St_Vincent", + "America/Swift_Current", + "America/Tegucigalpa", + "America/Thule", + "America/Thunder_Bay", + "America/Tijuana", + "America/Toronto", + "America/Tortola", + "America/Vancouver", + "America/Virgin", + "America/Whitehorse", + "America/Winnipeg", + "America/Yakutat", + "America/Yellowknife", + "Antarctica/Casey", + "Antarctica/Davis", + "Antarctica/DumontDUrville", + "Antarctica/Macquarie", + "Antarctica/Mawson", + "Antarctica/McMurdo", + "Antarctica/Palmer", + "Antarctica/Rothera", + "Antarctica/South_Pole", + "Antarctica/Syowa", + "Antarctica/Troll", + "Antarctica/Vostok", + "Arctic/Longyearbyen", + "Asia/Aden", + "Asia/Almaty", + "Asia/Amman", + "Asia/Anadyr", + "Asia/Aqtau", + "Asia/Aqtobe", + "Asia/Ashgabat", + "Asia/Ashkhabad", + "Asia/Atyrau", + "Asia/Baghdad", + "Asia/Bahrain", + "Asia/Baku", + "Asia/Bangkok", + "Asia/Barnaul", + "Asia/Beirut", + "Asia/Bishkek", + "Asia/Brunei", + "Asia/Calcutta", + "Asia/Chita", + "Asia/Choibalsan", + "Asia/Chongqing", + "Asia/Chungking", + "Asia/Colombo", + "Asia/Dacca", + "Asia/Damascus", + "Asia/Dhaka", + "Asia/Dili", + "Asia/Dubai", + "Asia/Dushanbe", + "Asia/Famagusta", + "Asia/Gaza", + "Asia/Harbin", + "Asia/Hebron", + "Asia/Ho_Chi_Minh", + "Asia/Hong_Kong", + "Asia/Hovd", + "Asia/Irkutsk", + "Asia/Istanbul", + "Asia/Jakarta", + "Asia/Jayapura", + "Asia/Jerusalem", + "Asia/Kabul", + "Asia/Kamchatka", + "Asia/Karachi", + "Asia/Kashgar", + "Asia/Kathmandu", + "Asia/Katmandu", + "Asia/Khandyga", + "Asia/Kolkata", + "Asia/Krasnoyarsk", + "Asia/Kuala_Lumpur", + "Asia/Kuching", + "Asia/Kuwait", + "Asia/Macao", + "Asia/Macau", + "Asia/Magadan", + "Asia/Makassar", + "Asia/Manila", + "Asia/Muscat", + "Asia/Nicosia", + "Asia/Novokuznetsk", + "Asia/Novosibirsk", + "Asia/Omsk", + "Asia/Oral", + "Asia/Phnom_Penh", + "Asia/Pontianak", + "Asia/Pyongyang", + "Asia/Qatar", + "Asia/Qostanay", + "Asia/Qyzylorda", + "Asia/Rangoon", + "Asia/Riyadh", + "Asia/Saigon", + "Asia/Sakhalin", + "Asia/Samarkand", + "Asia/Seoul", + "Asia/Shanghai", + "Asia/Singapore", + "Asia/Srednekolymsk", + "Asia/Taipei", + "Asia/Tashkent", + "Asia/Tbilisi", + "Asia/Tehran", + "Asia/Tel_Aviv", + "Asia/Thimbu", + "Asia/Thimphu", + "Asia/Tokyo", + "Asia/Tomsk", + "Asia/Ujung_Pandang", + "Asia/Ulaanbaatar", + "Asia/Ulan_Bator", + "Asia/Urumqi", + "Asia/Ust-Nera", + "Asia/Vientiane", + "Asia/Vladivostok", + "Asia/Yakutsk", + "Asia/Yangon", + "Asia/Yekaterinburg", + "Asia/Yerevan", + "Atlantic/Azores", + "Atlantic/Bermuda", + "Atlantic/Canary", + "Atlantic/Cape_Verde", + "Atlantic/Faeroe", + "Atlantic/Faroe", + "Atlantic/Jan_Mayen", + "Atlantic/Madeira", + "Atlantic/Reykjavik", + "Atlantic/South_Georgia", + "Atlantic/St_Helena", + "Atlantic/Stanley", + "Australia/ACT", + "Australia/Adelaide", + "Australia/Brisbane", + "Australia/Broken_Hill", + "Australia/Canberra", + "Australia/Currie", + "Australia/Darwin", + "Australia/Eucla", + "Australia/Hobart", + "Australia/LHI", + "Australia/Lindeman", + "Australia/Lord_Howe", + "Australia/Melbourne", + "Australia/NSW", + "Australia/North", + "Australia/Perth", + "Australia/Queensland", + "Australia/South", + "Australia/Sydney", + "Australia/Tasmania", + "Australia/Victoria", + "Australia/West", + "Australia/Yancowinna", + "Brazil/Acre", + "Brazil/DeNoronha", + "Brazil/East", + "Brazil/West", + "CET", + "CST6CDT", + "Canada/Atlantic", + "Canada/Central", + "Canada/Eastern", + "Canada/Mountain", + "Canada/Newfoundland", + "Canada/Pacific", + "Canada/Saskatchewan", + "Canada/Yukon", + "Chile/Continental", + "Chile/EasterIsland", + "Cuba", + "EET", + "EST5EDT", + "Egypt", + "Eire", + "Etc/GMT", + "Etc/GMT+0", + "Etc/GMT+1", + "Etc/GMT+10", + "Etc/GMT+11", + "Etc/GMT+12", + "Etc/GMT+2", + "Etc/GMT+3", + "Etc/GMT+4", + "Etc/GMT+5", + "Etc/GMT+6", + "Etc/GMT+7", + "Etc/GMT+8", + "Etc/GMT+9", + "Etc/GMT-0", + "Etc/GMT-1", + "Etc/GMT-10", + "Etc/GMT-11", + "Etc/GMT-12", + "Etc/GMT-13", + "Etc/GMT-14", + "Etc/GMT-2", + "Etc/GMT-3", + "Etc/GMT-4", + "Etc/GMT-5", + "Etc/GMT-6", + "Etc/GMT-7", + "Etc/GMT-8", + "Etc/GMT-9", + "Etc/GMT0", + "Etc/Greenwich", + "Etc/UCT", + "Etc/UTC", + "Etc/Universal", + "Etc/Zulu", + "Europe/Amsterdam", + "Europe/Andorra", + "Europe/Astrakhan", + "Europe/Athens", + "Europe/Belfast", + "Europe/Belgrade", + "Europe/Berlin", + "Europe/Bratislava", + "Europe/Brussels", + "Europe/Bucharest", + "Europe/Budapest", + "Europe/Busingen", + "Europe/Chisinau", + "Europe/Copenhagen", + "Europe/Dublin", + "Europe/Gibraltar", + "Europe/Guernsey", + "Europe/Helsinki", + "Europe/Isle_of_Man", + "Europe/Istanbul", + "Europe/Jersey", + "Europe/Kaliningrad", + "Europe/Kiev", + "Europe/Kirov", + "Europe/Kyiv", + "Europe/Lisbon", + "Europe/Ljubljana", + "Europe/London", + "Europe/Luxembourg", + "Europe/Madrid", + "Europe/Malta", + "Europe/Mariehamn", + "Europe/Minsk", + "Europe/Monaco", + "Europe/Moscow", + "Europe/Nicosia", + "Europe/Oslo", + "Europe/Paris", + "Europe/Podgorica", + "Europe/Prague", + "Europe/Riga", + "Europe/Rome", + "Europe/Samara", + "Europe/San_Marino", + "Europe/Sarajevo", + "Europe/Saratov", + "Europe/Simferopol", + "Europe/Skopje", + "Europe/Sofia", + "Europe/Stockholm", + "Europe/Tallinn", + "Europe/Tirane", + "Europe/Tiraspol", + "Europe/Ulyanovsk", + "Europe/Uzhgorod", + "Europe/Vaduz", + "Europe/Vatican", + "Europe/Vienna", + "Europe/Vilnius", + "Europe/Volgograd", + "Europe/Warsaw", + "Europe/Zagreb", + "Europe/Zaporozhye", + "Europe/Zurich", + "GB", + "GB-Eire", + "GMT", + "GMT0", + "Greenwich", + "Hongkong", + "Iceland", + "Indian/Antananarivo", + "Indian/Chagos", + "Indian/Christmas", + "Indian/Cocos", + "Indian/Comoro", + "Indian/Kerguelen", + "Indian/Mahe", + "Indian/Maldives", + "Indian/Mauritius", + "Indian/Mayotte", + "Indian/Reunion", + "Iran", + "Israel", + "Jamaica", + "Japan", + "Kwajalein", + "Libya", + "MET", + "MST7MDT", + "Mexico/BajaNorte", + "Mexico/BajaSur", + "Mexico/General", + "NZ", + "NZ-CHAT", + "Navajo", + "PRC", + "PST8PDT", + "Pacific/Apia", + "Pacific/Auckland", + "Pacific/Bougainville", + "Pacific/Chatham", + "Pacific/Chuuk", + "Pacific/Easter", + "Pacific/Efate", + "Pacific/Enderbury", + "Pacific/Fakaofo", + "Pacific/Fiji", + "Pacific/Funafuti", + "Pacific/Galapagos", + "Pacific/Gambier", + "Pacific/Guadalcanal", + "Pacific/Guam", + "Pacific/Honolulu", + "Pacific/Johnston", + "Pacific/Kanton", + "Pacific/Kiritimati", + "Pacific/Kosrae", + "Pacific/Kwajalein", + "Pacific/Majuro", + "Pacific/Marquesas", + "Pacific/Midway", + "Pacific/Nauru", + "Pacific/Niue", + "Pacific/Norfolk", + "Pacific/Noumea", + "Pacific/Pago_Pago", + "Pacific/Palau", + "Pacific/Pitcairn", + "Pacific/Pohnpei", + "Pacific/Ponape", + "Pacific/Port_Moresby", + "Pacific/Rarotonga", + "Pacific/Saipan", + "Pacific/Samoa", + "Pacific/Tahiti", + "Pacific/Tarawa", + "Pacific/Tongatapu", + "Pacific/Truk", + "Pacific/Wake", + "Pacific/Wallis", + "Pacific/Yap", + "Poland", + "Portugal", + "ROK", + "Singapore", + "SystemV/AST4", + "SystemV/AST4ADT", + "SystemV/CST6", + "SystemV/CST6CDT", + "SystemV/EST5", + "SystemV/EST5EDT", + "SystemV/HST10", + "SystemV/MST7", + "SystemV/MST7MDT", + "SystemV/PST8", + "SystemV/PST8PDT", + "SystemV/YST9", + "SystemV/YST9YDT", + "Turkey", + "UCT", + "US/Alaska", + "US/Aleutian", + "US/Arizona", + "US/Central", + "US/East-Indiana", + "US/Eastern", + "US/Hawaii", + "US/Indiana-Starke", + "US/Michigan", + "US/Mountain", + "US/Pacific", + "US/Samoa", + "UTC", + "Universal", + "W-SU", + "WET", + "Zulu", + "EST", + "HST", + "MST", + "ACT", + "AET", + "AGT", + "ART", + "AST", + "BET", + "BST", + "CAT", + "CNT", + "CST", + "CTT", + "EAT", + "ECT", + "IET", + "IST", + "JST", + "MIT", + "NET", + "NST", + "PLT", + "PNT", + "PRT", + "PST", + "SST", + "VST" + ] + }, + "frequency": { + "description": "Frequency settings for the scheduled job.", + "allOf": [ + { + "$ref": "#/components/schemas/FrequencyInput" + } + ] }, - "all_user_group_member_user_count": { - "type": "integer", - "format": "int32", - "description": "The count of users of ALL user group." + "recipient_details": { + "description": "Recipients of the scheduled job notifications. Add the GUID or name of the ThoughtSpot users or groups as recipients in the `principals` array. If a recipient is not a ThoughtSpot user, specify email address.", + "allOf": [ + { + "$ref": "#/components/schemas/RecipientDetailsInput" + } + ] }, - "logical_model_version": { - "type": "integer", - "format": "int32", - "description": "The version number of logical model of the cluster." - } - } - }, - "SystemConfig": { - "type": "object", - "properties": { - "onboarding_content_url": { + "personalised_view_id": { + "description": "Personalised view id of the liveboard to be scheduled.", "type": "string" } - } + }, + "required": [ + "name", + "description", + "metadata_type", + "metadata_identifier", + "time_zone", + "recipient_details" + ] }, - "OrgResponse": { + "SearchSchedulesRequest": { "type": "object", "properties": { - "id": { + "metadata": { + "description": "Metadata objects associated with the scheduled jobs.", + "type": "array", + "items": { + "$ref": "#/components/schemas/MetadataInput" + } + }, + "record_offset": { + "description": "The starting record number from where the records should be included.", "type": "integer", - "format": "int32", - "description": "Unique identifier of the organization." + "format": "int32" }, - "name": { - "type": "string", - "description": "Name of the organization." + "record_size": { + "description": "The number of records that should be included.", + "type": "integer", + "format": "int32" }, - "status": { - "type": "string", - "enum": [ - "ACTIVE", - "IN_ACTIVE" - ], - "description": "Status of the organization." + "sort_options": { + "description": "Sort options.", + "allOf": [ + { + "$ref": "#/components/schemas/SortingOptions" + } + ] }, - "description": { - "type": "string", - "description": "Description of the organization." + "history_runs_options": { + "description": "Options while fetching history runs for the schedule.", + "allOf": [ + { + "$ref": "#/components/schemas/ScheduleHistoryRunsOptionsInput" + } + ] }, - "visibility": { - "type": "string", - "enum": [ - "SHOW", - "HIDDEN" - ], - "description": "Visibility of the organization." + "schedule_identifiers": { + "description": "unique ID or name of the Schedule", + "type": "array", + "items": { + "type": "string" + } } } }, - "Tag": { + "UpdateScheduleRequest": { "type": "object", - "required": [ - "name", - "id", - "color" - ], "properties": { "name": { + "description": "Name of the scheduled job.", "type": "string" }, - "id": { + "description": { + "description": "Description of the scheduled job.", "type": "string" }, - "color": { - "type": "string" + "metadata_type": { + "description": "Type of metadata object.", + "type": "string", + "enum": [ + "LIVEBOARD" + ] }, - "deleted": { - "type": "boolean" + "metadata_identifier": { + "description": "Unique ID or name of the metadata object.", + "type": "string" }, - "hidden": { - "type": "boolean" + "file_format": { + "description": "Export file format.", + "type": "string", + "enum": [ + "CSV", + "PDF", + "XLSX" + ] + }, + "liveboard_options": { + "description": "Options to specify the details of a Liveboard.", + "allOf": [ + { + "$ref": "#/components/schemas/LiveboardOptionsInput" + } + ] }, - "external": { - "type": "boolean" + "pdf_options": { + "description": "Options for PDF export.", + "allOf": [ + { + "$ref": "#/components/schemas/SchedulesPdfOptionsInput" + } + ] }, - "deprecated": { - "type": "boolean" + "time_zone": { + "description": "Time zone", + "type": "string", + "enum": [ + "Africa/Abidjan", + "Africa/Accra", + "Africa/Addis_Ababa", + "Africa/Algiers", + "Africa/Asmara", + "Africa/Asmera", + "Africa/Bamako", + "Africa/Bangui", + "Africa/Banjul", + "Africa/Bissau", + "Africa/Blantyre", + "Africa/Brazzaville", + "Africa/Bujumbura", + "Africa/Cairo", + "Africa/Casablanca", + "Africa/Ceuta", + "Africa/Conakry", + "Africa/Dakar", + "Africa/Dar_es_Salaam", + "Africa/Djibouti", + "Africa/Douala", + "Africa/El_Aaiun", + "Africa/Freetown", + "Africa/Gaborone", + "Africa/Harare", + "Africa/Johannesburg", + "Africa/Juba", + "Africa/Kampala", + "Africa/Khartoum", + "Africa/Kigali", + "Africa/Kinshasa", + "Africa/Lagos", + "Africa/Libreville", + "Africa/Lome", + "Africa/Luanda", + "Africa/Lubumbashi", + "Africa/Lusaka", + "Africa/Malabo", + "Africa/Maputo", + "Africa/Maseru", + "Africa/Mbabane", + "Africa/Mogadishu", + "Africa/Monrovia", + "Africa/Nairobi", + "Africa/Ndjamena", + "Africa/Niamey", + "Africa/Nouakchott", + "Africa/Ouagadougou", + "Africa/Porto-Novo", + "Africa/Sao_Tome", + "Africa/Timbuktu", + "Africa/Tripoli", + "Africa/Tunis", + "Africa/Windhoek", + "America/Adak", + "America/Anchorage", + "America/Anguilla", + "America/Antigua", + "America/Araguaina", + "America/Argentina/Buenos_Aires", + "America/Argentina/Catamarca", + "America/Argentina/ComodRivadavia", + "America/Argentina/Cordoba", + "America/Argentina/Jujuy", + "America/Argentina/La_Rioja", + "America/Argentina/Mendoza", + "America/Argentina/Rio_Gallegos", + "America/Argentina/Salta", + "America/Argentina/San_Juan", + "America/Argentina/San_Luis", + "America/Argentina/Tucuman", + "America/Argentina/Ushuaia", + "America/Aruba", + "America/Asuncion", + "America/Atikokan", + "America/Atka", + "America/Bahia", + "America/Bahia_Banderas", + "America/Barbados", + "America/Belem", + "America/Belize", + "America/Blanc-Sablon", + "America/Boa_Vista", + "America/Bogota", + "America/Boise", + "America/Buenos_Aires", + "America/Cambridge_Bay", + "America/Campo_Grande", + "America/Cancun", + "America/Caracas", + "America/Catamarca", + "America/Cayenne", + "America/Cayman", + "America/Chicago", + "America/Chihuahua", + "America/Coral_Harbour", + "America/Cordoba", + "America/Costa_Rica", + "America/Creston", + "America/Cuiaba", + "America/Curacao", + "America/Danmarkshavn", + "America/Dawson", + "America/Dawson_Creek", + "America/Denver", + "America/Detroit", + "America/Dominica", + "America/Edmonton", + "America/Eirunepe", + "America/El_Salvador", + "America/Ensenada", + "America/Fort_Nelson", + "America/Fort_Wayne", + "America/Fortaleza", + "America/Glace_Bay", + "America/Godthab", + "America/Goose_Bay", + "America/Grand_Turk", + "America/Grenada", + "America/Guadeloupe", + "America/Guatemala", + "America/Guayaquil", + "America/Guyana", + "America/Halifax", + "America/Havana", + "America/Hermosillo", + "America/Indiana/Indianapolis", + "America/Indiana/Knox", + "America/Indiana/Marengo", + "America/Indiana/Petersburg", + "America/Indiana/Tell_City", + "America/Indiana/Vevay", + "America/Indiana/Vincennes", + "America/Indiana/Winamac", + "America/Indianapolis", + "America/Inuvik", + "America/Iqaluit", + "America/Jamaica", + "America/Jujuy", + "America/Juneau", + "America/Kentucky/Louisville", + "America/Kentucky/Monticello", + "America/Knox_IN", + "America/Kralendijk", + "America/La_Paz", + "America/Lima", + "America/Los_Angeles", + "America/Louisville", + "America/Lower_Princes", + "America/Maceio", + "America/Managua", + "America/Manaus", + "America/Marigot", + "America/Martinique", + "America/Matamoros", + "America/Mazatlan", + "America/Mendoza", + "America/Menominee", + "America/Merida", + "America/Metlakatla", + "America/Mexico_City", + "America/Miquelon", + "America/Moncton", + "America/Monterrey", + "America/Montevideo", + "America/Montreal", + "America/Montserrat", + "America/Nassau", + "America/New_York", + "America/Nipigon", + "America/Nome", + "America/Noronha", + "America/North_Dakota/Beulah", + "America/North_Dakota/Center", + "America/North_Dakota/New_Salem", + "America/Nuuk", + "America/Ojinaga", + "America/Panama", + "America/Pangnirtung", + "America/Paramaribo", + "America/Phoenix", + "America/Port-au-Prince", + "America/Port_of_Spain", + "America/Porto_Acre", + "America/Porto_Velho", + "America/Puerto_Rico", + "America/Punta_Arenas", + "America/Rainy_River", + "America/Rankin_Inlet", + "America/Recife", + "America/Regina", + "America/Resolute", + "America/Rio_Branco", + "America/Rosario", + "America/Santa_Isabel", + "America/Santarem", + "America/Santiago", + "America/Santo_Domingo", + "America/Sao_Paulo", + "America/Scoresbysund", + "America/Shiprock", + "America/Sitka", + "America/St_Barthelemy", + "America/St_Johns", + "America/St_Kitts", + "America/St_Lucia", + "America/St_Thomas", + "America/St_Vincent", + "America/Swift_Current", + "America/Tegucigalpa", + "America/Thule", + "America/Thunder_Bay", + "America/Tijuana", + "America/Toronto", + "America/Tortola", + "America/Vancouver", + "America/Virgin", + "America/Whitehorse", + "America/Winnipeg", + "America/Yakutat", + "America/Yellowknife", + "Antarctica/Casey", + "Antarctica/Davis", + "Antarctica/DumontDUrville", + "Antarctica/Macquarie", + "Antarctica/Mawson", + "Antarctica/McMurdo", + "Antarctica/Palmer", + "Antarctica/Rothera", + "Antarctica/South_Pole", + "Antarctica/Syowa", + "Antarctica/Troll", + "Antarctica/Vostok", + "Arctic/Longyearbyen", + "Asia/Aden", + "Asia/Almaty", + "Asia/Amman", + "Asia/Anadyr", + "Asia/Aqtau", + "Asia/Aqtobe", + "Asia/Ashgabat", + "Asia/Ashkhabad", + "Asia/Atyrau", + "Asia/Baghdad", + "Asia/Bahrain", + "Asia/Baku", + "Asia/Bangkok", + "Asia/Barnaul", + "Asia/Beirut", + "Asia/Bishkek", + "Asia/Brunei", + "Asia/Calcutta", + "Asia/Chita", + "Asia/Choibalsan", + "Asia/Chongqing", + "Asia/Chungking", + "Asia/Colombo", + "Asia/Dacca", + "Asia/Damascus", + "Asia/Dhaka", + "Asia/Dili", + "Asia/Dubai", + "Asia/Dushanbe", + "Asia/Famagusta", + "Asia/Gaza", + "Asia/Harbin", + "Asia/Hebron", + "Asia/Ho_Chi_Minh", + "Asia/Hong_Kong", + "Asia/Hovd", + "Asia/Irkutsk", + "Asia/Istanbul", + "Asia/Jakarta", + "Asia/Jayapura", + "Asia/Jerusalem", + "Asia/Kabul", + "Asia/Kamchatka", + "Asia/Karachi", + "Asia/Kashgar", + "Asia/Kathmandu", + "Asia/Katmandu", + "Asia/Khandyga", + "Asia/Kolkata", + "Asia/Krasnoyarsk", + "Asia/Kuala_Lumpur", + "Asia/Kuching", + "Asia/Kuwait", + "Asia/Macao", + "Asia/Macau", + "Asia/Magadan", + "Asia/Makassar", + "Asia/Manila", + "Asia/Muscat", + "Asia/Nicosia", + "Asia/Novokuznetsk", + "Asia/Novosibirsk", + "Asia/Omsk", + "Asia/Oral", + "Asia/Phnom_Penh", + "Asia/Pontianak", + "Asia/Pyongyang", + "Asia/Qatar", + "Asia/Qostanay", + "Asia/Qyzylorda", + "Asia/Rangoon", + "Asia/Riyadh", + "Asia/Saigon", + "Asia/Sakhalin", + "Asia/Samarkand", + "Asia/Seoul", + "Asia/Shanghai", + "Asia/Singapore", + "Asia/Srednekolymsk", + "Asia/Taipei", + "Asia/Tashkent", + "Asia/Tbilisi", + "Asia/Tehran", + "Asia/Tel_Aviv", + "Asia/Thimbu", + "Asia/Thimphu", + "Asia/Tokyo", + "Asia/Tomsk", + "Asia/Ujung_Pandang", + "Asia/Ulaanbaatar", + "Asia/Ulan_Bator", + "Asia/Urumqi", + "Asia/Ust-Nera", + "Asia/Vientiane", + "Asia/Vladivostok", + "Asia/Yakutsk", + "Asia/Yangon", + "Asia/Yekaterinburg", + "Asia/Yerevan", + "Atlantic/Azores", + "Atlantic/Bermuda", + "Atlantic/Canary", + "Atlantic/Cape_Verde", + "Atlantic/Faeroe", + "Atlantic/Faroe", + "Atlantic/Jan_Mayen", + "Atlantic/Madeira", + "Atlantic/Reykjavik", + "Atlantic/South_Georgia", + "Atlantic/St_Helena", + "Atlantic/Stanley", + "Australia/ACT", + "Australia/Adelaide", + "Australia/Brisbane", + "Australia/Broken_Hill", + "Australia/Canberra", + "Australia/Currie", + "Australia/Darwin", + "Australia/Eucla", + "Australia/Hobart", + "Australia/LHI", + "Australia/Lindeman", + "Australia/Lord_Howe", + "Australia/Melbourne", + "Australia/NSW", + "Australia/North", + "Australia/Perth", + "Australia/Queensland", + "Australia/South", + "Australia/Sydney", + "Australia/Tasmania", + "Australia/Victoria", + "Australia/West", + "Australia/Yancowinna", + "Brazil/Acre", + "Brazil/DeNoronha", + "Brazil/East", + "Brazil/West", + "CET", + "CST6CDT", + "Canada/Atlantic", + "Canada/Central", + "Canada/Eastern", + "Canada/Mountain", + "Canada/Newfoundland", + "Canada/Pacific", + "Canada/Saskatchewan", + "Canada/Yukon", + "Chile/Continental", + "Chile/EasterIsland", + "Cuba", + "EET", + "EST5EDT", + "Egypt", + "Eire", + "Etc/GMT", + "Etc/GMT+0", + "Etc/GMT+1", + "Etc/GMT+10", + "Etc/GMT+11", + "Etc/GMT+12", + "Etc/GMT+2", + "Etc/GMT+3", + "Etc/GMT+4", + "Etc/GMT+5", + "Etc/GMT+6", + "Etc/GMT+7", + "Etc/GMT+8", + "Etc/GMT+9", + "Etc/GMT-0", + "Etc/GMT-1", + "Etc/GMT-10", + "Etc/GMT-11", + "Etc/GMT-12", + "Etc/GMT-13", + "Etc/GMT-14", + "Etc/GMT-2", + "Etc/GMT-3", + "Etc/GMT-4", + "Etc/GMT-5", + "Etc/GMT-6", + "Etc/GMT-7", + "Etc/GMT-8", + "Etc/GMT-9", + "Etc/GMT0", + "Etc/Greenwich", + "Etc/UCT", + "Etc/UTC", + "Etc/Universal", + "Etc/Zulu", + "Europe/Amsterdam", + "Europe/Andorra", + "Europe/Astrakhan", + "Europe/Athens", + "Europe/Belfast", + "Europe/Belgrade", + "Europe/Berlin", + "Europe/Bratislava", + "Europe/Brussels", + "Europe/Bucharest", + "Europe/Budapest", + "Europe/Busingen", + "Europe/Chisinau", + "Europe/Copenhagen", + "Europe/Dublin", + "Europe/Gibraltar", + "Europe/Guernsey", + "Europe/Helsinki", + "Europe/Isle_of_Man", + "Europe/Istanbul", + "Europe/Jersey", + "Europe/Kaliningrad", + "Europe/Kiev", + "Europe/Kirov", + "Europe/Kyiv", + "Europe/Lisbon", + "Europe/Ljubljana", + "Europe/London", + "Europe/Luxembourg", + "Europe/Madrid", + "Europe/Malta", + "Europe/Mariehamn", + "Europe/Minsk", + "Europe/Monaco", + "Europe/Moscow", + "Europe/Nicosia", + "Europe/Oslo", + "Europe/Paris", + "Europe/Podgorica", + "Europe/Prague", + "Europe/Riga", + "Europe/Rome", + "Europe/Samara", + "Europe/San_Marino", + "Europe/Sarajevo", + "Europe/Saratov", + "Europe/Simferopol", + "Europe/Skopje", + "Europe/Sofia", + "Europe/Stockholm", + "Europe/Tallinn", + "Europe/Tirane", + "Europe/Tiraspol", + "Europe/Ulyanovsk", + "Europe/Uzhgorod", + "Europe/Vaduz", + "Europe/Vatican", + "Europe/Vienna", + "Europe/Vilnius", + "Europe/Volgograd", + "Europe/Warsaw", + "Europe/Zagreb", + "Europe/Zaporozhye", + "Europe/Zurich", + "GB", + "GB-Eire", + "GMT", + "GMT0", + "Greenwich", + "Hongkong", + "Iceland", + "Indian/Antananarivo", + "Indian/Chagos", + "Indian/Christmas", + "Indian/Cocos", + "Indian/Comoro", + "Indian/Kerguelen", + "Indian/Mahe", + "Indian/Maldives", + "Indian/Mauritius", + "Indian/Mayotte", + "Indian/Reunion", + "Iran", + "Israel", + "Jamaica", + "Japan", + "Kwajalein", + "Libya", + "MET", + "MST7MDT", + "Mexico/BajaNorte", + "Mexico/BajaSur", + "Mexico/General", + "NZ", + "NZ-CHAT", + "Navajo", + "PRC", + "PST8PDT", + "Pacific/Apia", + "Pacific/Auckland", + "Pacific/Bougainville", + "Pacific/Chatham", + "Pacific/Chuuk", + "Pacific/Easter", + "Pacific/Efate", + "Pacific/Enderbury", + "Pacific/Fakaofo", + "Pacific/Fiji", + "Pacific/Funafuti", + "Pacific/Galapagos", + "Pacific/Gambier", + "Pacific/Guadalcanal", + "Pacific/Guam", + "Pacific/Honolulu", + "Pacific/Johnston", + "Pacific/Kanton", + "Pacific/Kiritimati", + "Pacific/Kosrae", + "Pacific/Kwajalein", + "Pacific/Majuro", + "Pacific/Marquesas", + "Pacific/Midway", + "Pacific/Nauru", + "Pacific/Niue", + "Pacific/Norfolk", + "Pacific/Noumea", + "Pacific/Pago_Pago", + "Pacific/Palau", + "Pacific/Pitcairn", + "Pacific/Pohnpei", + "Pacific/Ponape", + "Pacific/Port_Moresby", + "Pacific/Rarotonga", + "Pacific/Saipan", + "Pacific/Samoa", + "Pacific/Tahiti", + "Pacific/Tarawa", + "Pacific/Tongatapu", + "Pacific/Truk", + "Pacific/Wake", + "Pacific/Wallis", + "Pacific/Yap", + "Poland", + "Portugal", + "ROK", + "Singapore", + "SystemV/AST4", + "SystemV/AST4ADT", + "SystemV/CST6", + "SystemV/CST6CDT", + "SystemV/EST5", + "SystemV/EST5EDT", + "SystemV/HST10", + "SystemV/MST7", + "SystemV/MST7MDT", + "SystemV/PST8", + "SystemV/PST8PDT", + "SystemV/YST9", + "SystemV/YST9YDT", + "Turkey", + "UCT", + "US/Alaska", + "US/Aleutian", + "US/Arizona", + "US/Central", + "US/East-Indiana", + "US/Eastern", + "US/Hawaii", + "US/Indiana-Starke", + "US/Michigan", + "US/Mountain", + "US/Pacific", + "US/Samoa", + "UTC", + "Universal", + "W-SU", + "WET", + "Zulu", + "EST", + "HST", + "MST", + "ACT", + "AET", + "AGT", + "ART", + "AST", + "BET", + "BST", + "CAT", + "CNT", + "CST", + "CTT", + "EAT", + "ECT", + "IET", + "IST", + "JST", + "MIT", + "NET", + "NST", + "PLT", + "PNT", + "PRT", + "PST", + "SST", + "VST" + ] + }, + "frequency": { + "description": "Frequency of the scheduled job run.", + "allOf": [ + { + "$ref": "#/components/schemas/FrequencyInput" + } + ] }, - "creation_time_in_millis": { - "type": "number", - "format": "float" + "recipient_details": { + "description": "Recipients of the scheduled job notifications. You can add the ID or name of the ThoughtSpot users or groups as recipients in the `principals` array. If a recipient is not a ThoughtSpot user, specify email address.", + "allOf": [ + { + "$ref": "#/components/schemas/RecipientDetailsInput" + } + ] }, - "modification_time_in_millis": { - "type": "number", - "format": "float" + "status": { + "description": "Status of the schedule", + "type": "string", + "enum": [ + "ACTIVE", + "PAUSE" + ] }, - "author_id": { + "personalised_view_id": { + "description": "Personalised view id of the liveboard to be scheduled.", "type": "string" + } + } + }, + "AssignChangeAuthorRequest": { + "type": "object", + "properties": { + "metadata": { + "description": "GUID or name of the metadata object.", + "type": "array", + "items": { + "$ref": "#/components/schemas/AuthorMetadataTypeInput" + } }, - "modifier_id": { + "user_identifier": { + "description": "GUID or name of the user who you want to assign as the author.", "type": "string" }, - "owner_id": { + "current_owner_identifier": { + "description": "GUID or name of the current author. When defined, the metadata objects\nauthored by the specified owner are filtered for the API operation.", "type": "string" } - } + }, + "required": [ + "metadata", + "user_identifier" + ] }, - "UserGroupResponse": { + "FetchColumnSecurityRulesRequest": { "type": "object", + "properties": { + "tables": { + "description": "Array of table identifier objects for which to fetch column security rules", + "type": "array", + "items": { + "$ref": "#/components/schemas/ColumnSecurityRuleTableInput" + } + } + }, "required": [ - "display_name", - "id", - "name", - "visibility" - ], + "tables" + ] + }, + "FetchObjectPrivilegesRequest": { + "type": "object", "properties": { - "author_id": { - "type": "string", - "description": "The unique identifier of the object" + "metadata": { + "description": "Metadata objects for which you want to fetch object privileges. For now only LOGICAL_TABLE is supported. It may be extended to other metadata types in the future.", + "type": "array", + "items": { + "$ref": "#/components/schemas/ObjectPrivilegesMetadataInput" + } }, - "complete_detail": { - "type": "boolean", - "description": "Indicates whether the response has complete detail of the user group." + "principals": { + "description": "User or group objects for which you want to fetch object privileges.\nIf not specified, the API returns all users and groups that\nhave object privileges on the specified metadata objects.", + "type": "array", + "items": { + "$ref": "#/components/schemas/PrincipalsInput" + } }, - "content": { - "type": "object", - "description": "Content details of the user group." + "record_offset": { + "description": "The starting record number from where the records should be included for each metadata type.", + "default": 0, + "type": "integer", + "format": "int32" }, - "creation_time_in_millis": { - "type": "number", - "format": "float", - "description": "Creation time of the user group in milliseconds." + "record_size": { + "description": "The number of records that should be included for each metadata type.", + "default": 20, + "type": "integer", + "format": "int32" + } + }, + "required": [ + "metadata" + ] + }, + "FetchPermissionsOfPrincipalsRequest": { + "type": "object", + "properties": { + "principals": { + "description": "GUID or name of the user or group.", + "type": "array", + "items": { + "$ref": "#/components/schemas/PrincipalsInput" + } }, - "default_liveboards": { + "metadata": { + "description": "Metadata objects for which you want to fetch permission details.\nIf not specified, the API returns permission details for all\nmetadata objects that the specified users and groups can access.", "type": "array", "items": { - "$ref": "#/components/schemas/UserGroup" - }, - "description": "Liveboards which are assigned as default liveboards to the user group." + "$ref": "#/components/schemas/PermissionsMetadataTypeInput" + } }, - "deleted": { - "type": "boolean", - "description": "Indicates whether the user group is deleted." + "record_offset": { + "description": "The starting record number from where the records should be included for each metadata type.", + "default": 0, + "type": "integer", + "format": "int32" }, - "deprecated": { - "type": "boolean", - "description": "Indicates whether the user group is deprecated." + "record_size": { + "description": "The number of records that should be included for each metadata type.", + "default": -1, + "type": "integer", + "format": "int32" }, - "description": { + "default_metadata_type": { + "description": "When no metadata objects input is passed, metadata objects of this type are fetched.", "type": "string", - "description": "Description of the user group." + "enum": [ + "ALL", + "LIVEBOARD", + "ANSWER", + "LOGICAL_TABLE", + "LOGICAL_COLUMN", + "CONNECTION", + "COLLECTION" + ] + } + }, + "required": [ + "principals" + ] + }, + "FetchPermissionsOnMetadataRequest": { + "type": "object", + "properties": { + "metadata": { + "description": "GUID or name of the metadata object.", + "type": "array", + "items": { + "$ref": "#/components/schemas/PermissionsMetadataTypeInput" + } }, - "display_name": { - "type": "string", - "description": "Display name of the user group." + "principals": { + "description": "User or group objects for which you want to fetch permissions.\nIf not specified, the API returns all users and groups that\ncan access the specified metadata objects.", + "type": "array", + "items": { + "$ref": "#/components/schemas/PrincipalsInput" + } }, - "external": { + "include_dependent_objects": { + "description": "Indicates whether to fetch permissions of dependent metadata objects.", + "default": false, "type": "boolean", - "description": "Indicates whether the user group is external." + "nullable": true }, - "generation_number": { + "record_offset": { + "description": "The starting record number from where the records should be included for each metadata type.", + "default": 0, "type": "integer", - "format": "int32", - "description": "Generation number of the user group." + "format": "int32" }, - "hidden": { - "type": "boolean", - "description": "Indicates whether the user group is hidden." + "record_size": { + "description": "The number of records that should be included for each metadata type.", + "default": -1, + "type": "integer", + "format": "int32" }, - "id": { + "permission_type": { + "description": "
Version: 10.3.0.cl or later
\n\nSpecifies the type of permission. Valid values are:\n EFFECTIVE - If the user permission to the metadata objects is granted by the privileges assigned to the groups to which they belong.\n DEFINED - If a user or user group received access to metadata objects via object sharing by another user.", + "type": "string" + } + }, + "required": [ + "metadata" + ] + }, + "ManageObjectPrivilegeRequest": { + "type": "object", + "properties": { + "operation": { + "description": "Operation to perform to manage object privileges. Available operations are: `ADD`, `REMOVE`.", "type": "string", - "description": "The unique identifier of the object" + "enum": [ + "ADD", + "REMOVE" + ] }, - "index": { - "type": "integer", - "format": "int32", - "description": "Index number of the user group." + "metadata_type": { + "description": "Type of metadata objects on which you want to perform the operation. For now only LOGICAL_TABLE is supported. It may be extended to other metadata types in the future.", + "type": "string", + "enum": [ + "LOGICAL_TABLE" + ] }, - "index_version": { - "type": "integer", - "format": "int32", - "description": "Index version number of the user group." + "object_privilege_types": { + "description": "List of object privilege types on which you want to perform the operation.", + "type": "array", + "items": { + "type": "string", + "enum": [ + "SPOTTER_COACHING_PRIVILEGE" + ] + } }, - "metadata_version": { - "type": "integer", - "format": "int32", - "description": "Metadata version number of the user group." + "metadata_identifiers": { + "description": "List of metadata identifiers (GUID or name) on which you want to perform the operation.", + "type": "array", + "items": { + "type": "string" + } }, - "modification_time_in_millis": { - "type": "number", - "format": "float", - "description": "Last modified time of the user group in milliseconds." + "principals": { + "description": "User or group objects (GUID or name) to which you want to apply the given operation and given object privileges.", + "type": "array", + "items": { + "$ref": "#/components/schemas/PrincipalsInput" + } + } + }, + "required": [ + "operation", + "metadata_type", + "object_privilege_types", + "metadata_identifiers", + "principals" + ] + }, + "PublishMetadataRequest": { + "type": "object", + "properties": { + "metadata": { + "description": "Metadata objects to be published.", + "type": "array", + "items": { + "$ref": "#/components/schemas/PublishMetadataListItem" + } }, - "modifier_id": { - "type": "string", - "description": "The unique identifier of the object" + "org_identifiers": { + "description": "Unique ID or name of orgs to which metadata objects should be published.", + "type": "array", + "items": { + "type": "string" + } }, - "name": { + "skip_validation": { + "description": "Skip validations of objects to be published.", + "type": "boolean", + "nullable": true + } + }, + "required": [ + "metadata", + "org_identifiers" + ] + }, + "ShareMetadataRequest": { + "type": "object", + "properties": { + "metadata_type": { + "description": "Type of metadata. Required if identifier in metadata_identifies is a name.\n1. Liveboard\n2. Answers\n3. LOGICAL_TABLE for any data object such as table, worksheet or view.\n4. LOGICAL_COLUMN\n5. Connection\n6. Collection", "type": "string", - "description": "Name of the user group." + "enum": [ + "LIVEBOARD", + "ANSWER", + "LOGICAL_TABLE", + "LOGICAL_COLUMN", + "CONNECTION", + "COLLECTION" + ] + }, + "metadata_identifiers": { + "description": "Unique ID or name of metadata objects. Note: All the names should belong to same metadata_type", + "type": "array", + "items": { + "type": "string" + } + }, + "metadata": { + "description": "Metadata details for sharing objects.", + "type": "array", + "items": { + "$ref": "#/components/schemas/ShareMetadataTypeInput" + } + }, + "permissions": { + "description": "Permission details for sharing the objects.", + "type": "array", + "items": { + "$ref": "#/components/schemas/SharePermissionsInput" + } + }, + "visualization_identifiers": { + "description": "Options to specify details of Liveboard. First Liveboard encountered in payload is considered to be the corresponding Liveboard.", + "type": "array", + "items": { + "type": "string" + } + }, + "emails": { + "description": "Email IDs to which notifications will be sent.", + "default": [], + "type": "array", + "items": { + "type": "string" + } + }, + "message": { + "description": "Message to be included in notification.", + "type": "string" + }, + "enable_custom_url": { + "description": "Sends object URLs in the customized format in email notifications.", + "default": false, + "type": "boolean", + "nullable": true }, - "orgs": { - "type": "array", - "items": { - "$ref": "#/components/schemas/UserGroup" - }, - "description": "Orgs in which user group exists." + "notify_on_share": { + "description": "Flag to notify user when any object is shared.", + "default": true, + "type": "boolean", + "nullable": true }, - "owner_id": { - "type": "string", - "description": "The unique identifier of the object" + "has_lenient_discoverability": { + "description": "Flag to make the object discoverable.", + "default": false, + "type": "boolean", + "nullable": true + } + }, + "required": [ + "permissions", + "message" + ] + }, + "UnpublishMetadataRequest": { + "type": "object", + "properties": { + "force": { + "description": "Force unpublishes the object. This will break all the dependent objects in the unpublished orgs.", + "type": "boolean", + "nullable": true }, - "parent_type": { - "type": "string", - "enum": [ - "USER", - "GROUP" - ], - "description": "Parent type of the user group." + "include_dependencies": { + "description": "Should we unpublish all the dependencies for the objects specified.\nThe dependencies will be unpublished if no other published object is using it.", + "type": "boolean" }, - "privileges": { + "metadata": { + "description": "Metadata objects.", "type": "array", "items": { - "type": "string", - "enum": [ - "ADMINISTRATION", - "AUTHORING", - "USERDATAUPLOADING", - "DATADOWNLOADING", - "USERMANAGEMENT", - "SECURITYMANAGEMENT", - "LOGICALMODELING", - "DATAMANAGEMENT", - "TAGMANAGEMENT", - "SHAREWITHALL", - "SYSTEMMANAGEMENT", - "JOBSCHEDULING", - "A3ANALYSIS", - "EXPERIMENTALFEATUREPRIVILEGE", - "BYPASSRLS", - "RANALYSIS", - "DISABLE_PINBOARD_CREATION", - "DEVELOPER", - "APPLICATION_ADMINISTRATION", - "USER_ADMINISTRATION", - "GROUP_ADMINISTRATION", - "BACKUP_ADMINISTRATION", - "SYSTEM_INFO_ADMINISTRATION", - "ENABLESPOTAPPCREATION", - "SYNCMANAGEMENT" - ] - }, - "description": "Privileges which are assigned to the user group." + "$ref": "#/components/schemas/PublishMetadataListItem" + } }, - "sub_groups": { + "org_identifiers": { + "description": "Unique ID or name of orgs.", "type": "array", "items": { - "$ref": "#/components/schemas/UserGroup" - }, - "description": "User Groups who are part of the user group." + "type": "string" + } + } + }, + "required": [ + "include_dependencies", + "metadata", + "org_identifiers" + ] + }, + "UpdateColumnSecurityRulesRequest": { + "type": "object", + "properties": { + "identifier": { + "description": "GUID or name of the table for which we want to create column security rules", + "type": "string" }, - "system_group": { + "obj_identifier": { + "description": "The object ID of the table", + "type": "string" + }, + "clear_csr": { + "description": "If true, then all the secured columns will be marked as unprotected, and all the group associations will be removed", "type": "boolean", - "description": "Indicates whether the user group is a system group." + "nullable": true }, - "tags": { + "column_security_rules": { + "description": "Array where each object defines the security rule for a specific column", "type": "array", "items": { - "$ref": "#/components/schemas/UserGroup" - }, - "description": "Tags associated with the user group." - }, - "type": { + "$ref": "#/components/schemas/ColumnSecurityRuleUpdate" + } + } + }, + "required": [ + "column_security_rules" + ] + }, + "DeleteStyleFontsRequest": { + "type": "object", + "properties": { + "scope": { + "description": "Scope of the font library to delete from. CLUSTER deletes from the\ncluster-level library. ORG deletes from the authenticated user's org\nlibrary. Defaults to ORG if omitted.", + "default": "ORG", "type": "string", "enum": [ - "LOCAL_GROUP", - "LDAP_GROUP" - ], - "description": "Type of the user group." + "CLUSTER", + "ORG" + ] }, - "users": { + "font_identifiers": { + "description": "UUIDs or names of the fonts to delete. At least one identifier is\nrequired.", "type": "array", "items": { - "$ref": "#/components/schemas/UserGroup" - }, - "description": "Users who are part of the user group." + "type": "string" + } }, - "visibility": { + "dry_run": { + "description": "When true, returns affected assignments without applying the deletion.\nUse this to preview the impact before committing. Defaults to true if\nomitted.", + "default": true, + "type": "boolean", + "nullable": true + } + }, + "required": [ + "font_identifiers" + ] + }, + "ExportStyleLogosRequest": { + "type": "object", + "properties": { + "scope": { + "description": "Scope of the logos to export. CLUSTER exports cluster-level logos. ORG\nexports logos for the authenticated user's org, falling back to cluster\nor defaults if no custom logo is set. Defaults to ORG if\nomitted.", + "default": "ORG", "type": "string", "enum": [ - "SHARABLE", - "NON_SHARABLE" - ], - "description": "Visibility of the user group. The SHARABLE makes a user group visible to other users and user groups, and thus allows them to share objects." + "CLUSTER", + "ORG" + ] } } }, - "MetadataSearchResponse": { + "SearchStyleCustomizationsRequest": { "type": "object", - "required": [ - "metadata_type" - ], "properties": { - "metadata_id": { - "type": "string", - "description": "Unique identifier of the metadata." - }, - "metadata_name": { + "scope": { + "description": "Scope of the style preferences to retrieve. CLUSTER returns cluster-level\ndefaults. ORG returns preferences for the authenticated user's org, which\nmay override cluster defaults. If not specified, returns both cluster and\norg preferences based on user privileges.", "type": "string", - "description": "Name of the metadata." - }, - "metadata_type": { + "enum": [ + "CLUSTER", + "ORG" + ] + } + } + }, + "SearchStyleFontsRequest": { + "type": "object", + "properties": { + "scope": { + "description": "Scope of the font library to search. CLUSTER searches the cluster-level\nlibrary. ORG searches the authenticated user's org library. Returns both Cluster and Org\nlevel font if omitted.", "type": "string", "enum": [ - "LIVEBOARD", - "ANSWER", - "LOGICAL_TABLE", - "LOGICAL_COLUMN", - "CONNECTION", - "TAG", - "USER", - "USER_GROUP", - "LOGICAL_RELATIONSHIP" - ], - "description": "Type of the metadata." - }, - "dependent_objects": { - "type": "object", - "description": "Details of dependent objects of the metadata objects." - }, - "incomplete_objects": { - "type": "array", - "items": { - "type": "object" - }, - "description": "Details of incomplete information of the metadata objects if any." + "CLUSTER", + "ORG" + ] }, - "metadata_detail": { - "type": "object", - "description": "Complete details of the metadata objects." + "font_identifier": { + "description": "Filter by UUID or name of a specific font.", + "type": "string" }, - "metadata_header": { - "type": "object", - "description": "Header information of the metadata objects." + "name_pattern": { + "description": "Filter by font display name. Supports partial, case-insensitive matching.", + "type": "string" }, - "visualization_headers": { - "type": "array", - "items": { - "type": "object" - }, - "description": "Visualization header information of the metadata objects." + "include_font_assignments": { + "description": "When true, includes visualization areas this font is assigned to in the\nresponse. Defaults to false if omitted.", + "default": false, + "type": "boolean", + "nullable": true } - }, - "description": "Metadata Search Response Object." + } }, - "MetadataListItemInput": { + "UpdateStyleFontRequest": { "type": "object", "properties": { - "identifier": { + "scope": { + "description": "Scope of the font library containing this font. CLUSTER targets the\ncluster-level library. ORG targets the authenticated user's org library.\nDefaults to ORG if omitted.", + "default": "ORG", "type": "string", - "description": "Unique ID or name of the metadata." + "enum": [ + "CLUSTER", + "ORG" + ] }, - "name_pattern": { + "name": { + "description": "New display name for the font. Must be unique within the target scope.", + "type": "string" + }, + "weight": { + "description": "New weight for the font. Supported values: NORMAL, LIGHT, BOLD.", "type": "string", - "description": "A pattern to match case-insensitive name of the metadata object. User % for a wildcard match." + "enum": [ + "NORMAL", + "LIGHT", + "BOLD" + ] }, - "type": { + "style": { + "description": "New style for the font. Supported values: NORMAL, ITALIC, OBLIQUE.", "type": "string", "enum": [ - "LIVEBOARD", - "ANSWER", - "LOGICAL_TABLE", - "LOGICAL_COLUMN", - "CONNECTION", - "TAG", - "USER", - "USER_GROUP", - "LOGICAL_RELATIONSHIP" - ], - "description": "Type of metadata.\n1. Liveboard\n2. Answers\n3. LOGICAL_TABLE for any data object such as table, worksheet or view.\n4. LOGICAL_COLUMN for a column of any data object such as table, worksheet or view.\n5. CONNECTION for creating or modify data connections.\n6. TAG for tag objects.\n7. USER for user objects.\n8. USER_GROUP for user group objects.\n9. LOGICAL_RELATIONSHIP for table or worksheet joins. A join combines from one or several data object by using matching values" + "NORMAL", + "ITALIC", + "OBLIQUE" + ] + }, + "color": { + "description": "New color for the font as a 6-digit hex string (e.g. \"#333333\"). Returns\nan error if the value is malformed.", + "type": "string" } } }, - "PermissionInput": { + "ConfigureCommunicationChannelPreferencesRequest": { "type": "object", - "required": [ - "principal", - "share_mode" - ], "properties": { - "principal": { - "$ref": "#/components/schemas/PrincipalsInput", - "description": "Details of users or user groups." + "cluster_preferences": { + "description": "Cluster-level default configurations.", + "type": "array", + "items": { + "$ref": "#/components/schemas/EventChannelConfigInput" + } }, - "share_mode": { - "type": "string", - "enum": [ - "READ_ONLY", - "MODIFY", - "NO_ACCESS" - ], - "description": "Object share mode." + "org_preferences": { + "description": "Org-specific configurations.", + "type": "array", + "items": { + "$ref": "#/components/schemas/OrgChannelConfigInput" + } } - }, - "description": "Details of users or user groups." + } }, - "ExcludeMetadataListItemInput": { + "ConfigureSecuritySettingsRequest": { "type": "object", - "required": [ - "identifier", - "type" - ], "properties": { - "identifier": { - "type": "string", - "description": "Unique ID or name of the metadata." + "cluster_preferences": { + "description": "Cluster-level security preferences.", + "allOf": [ + { + "$ref": "#/components/schemas/SecuritySettingsClusterPreferencesInput" + } + ] }, - "type": { - "type": "string", - "enum": [ - "LIVEBOARD", - "ANSWER", - "LOGICAL_TABLE", - "LOGICAL_COLUMN", - "CONNECTION", - "TAG", - "USER", - "USER_GROUP", - "LOGICAL_RELATIONSHIP" - ], - "description": "Type of metadata.\n1. Liveboard\n2. Answers\n3. LOGICAL_TABLE for any data object such as table, worksheet or view.\n4. LOGICAL_COLUMN for a column of any data object such as table, worksheet or view.\n5. CONNECTION for creating or modify data connections.\n6. TAG for tag objects.\n7. USER for user objects.\n8. USER_GROUP for user group objects.\n9. LOGICAL_RELATIONSHIP for table or worksheet joins. A join combines from one or several data object by using matching values" + "org_preferences": { + "description": "Org-level security preferences for the current org.", + "type": "array", + "items": { + "$ref": "#/components/schemas/SecuritySettingsOrgPreferencesInput" + } } } }, - "FavoriteObjectOptionsInput": { + "SearchCommunicationChannelPreferencesRequest": { "type": "object", "properties": { - "include": { - "type": "boolean", - "description": "Includes objects marked as favorite for the specified user GUIDs." + "cluster_preferences": { + "description": "Event types to search for in cluster-level preferences.", + "type": "array", + "items": { + "type": "string", + "enum": [ + "LIVEBOARD_SCHEDULE" + ] + } }, - "user_identifiers": { + "org_preferences": { + "description": "Org-specific search criteria.", "type": "array", "items": { - "type": "string" - }, - "description": "Unique ID or name of the users. If not specified then favorite of current logged in user is considered." + "$ref": "#/components/schemas/OrgPreferenceSearchCriteriaInput" + } + } + } + }, + "SearchSecuritySettingsRequest": { + "type": "object", + "properties": { + "scope": { + "description": "Scope of security settings to retrieve. CLUSTER returns cluster-level settings,\nORG returns org-level settings for the current org.\nIf not specified, returns both cluster and org settings based on user privileges.", + "type": "string", + "enum": [ + "CLUSTER", + "ORG" + ] + } + } + }, + "UpdateSystemConfigRequest": { + "type": "object", + "properties": { + "configuration": { + "description": "Configuration JSON with the key-value pair of configuration attributes to be updated.", + "type": "object" } }, - "description": "Favorite object options." + "required": [ + "configuration" + ] }, - "SortOptions": { + "ValidateCommunicationChannelRequest": { "type": "object", "properties": { - "field_name": { + "channel_type": { + "description": "Type of communication channel to validate (e.g., WEBHOOK).", "type": "string", "enum": [ - "NAME", - "DISPLAY_NAME", - "AUTHOR", - "CREATED", - "MODIFIED" - ], - "description": "Name of the field to apply the sort on." + "WEBHOOK" + ] }, - "order": { + "channel_identifier": { + "description": "Unique identifier or name for the communication channel.", + "type": "string" + }, + "event_type": { + "description": "Event type to validate for this channel.", "type": "string", "enum": [ - "ASC", - "DESC" - ], - "description": "Sort order : ASC(Ascending) or DESC(Descending)." + "LIVEBOARD_SCHEDULE" + ] } }, - "description": "Sort options." + "required": [ + "channel_type", + "channel_identifier", + "event_type" + ] }, - "SqlQueryResponse": { + "AssignTagRequest": { "type": "object", - "required": [ - "metadata_id", - "metadata_name", - "metadata_type", - "sql_queries" - ], "properties": { - "metadata_id": { - "type": "string", - "description": "Unique identifier of the metadata." - }, - "metadata_name": { - "type": "string", - "description": "Name of the metadata." - }, - "metadata_type": { - "type": "string", - "enum": [ - "LIVEBOARD", - "ANSWER", - "LOGICAL_TABLE", - "LOGICAL_COLUMN", - "CONNECTION", - "TAG", - "USER", - "USER_GROUP", - "LOGICAL_RELATIONSHIP" - ], - "description": "Type of the metadata." + "metadata": { + "description": "Metadata objects.", + "type": "array", + "items": { + "$ref": "#/components/schemas/TagMetadataTypeInput" + } }, - "sql_queries": { + "tag_identifiers": { + "description": "GUID or name of the tag.", "type": "array", "items": { - "$ref": "#/components/schemas/SqlQuery" - }, - "description": "SQL query details of metadata objects." + "type": "string" + } } - } + }, + "required": [ + "metadata", + "tag_identifiers" + ] }, - "PdfOptionsInput": { + "CreateTagRequest": { "type": "object", "properties": { - "include_cover_page": { - "type": "boolean", - "description": "Indicates whether to include cover page with the Liveboard title." - }, - "include_custom_logo": { - "type": "boolean", - "description": "Indicates whether to include customized wide logo in the footer if available." - }, - "include_filter_page": { - "type": "boolean", - "description": "Indicates whether to include a page with all applied filters." - }, - "include_page_number": { - "type": "boolean", - "description": "Indicates whether to include page number in the footer of each page." + "name": { + "description": "Name of the tag.", + "type": "string" }, - "page_orientation": { - "type": "string", - "enum": [ - "PORTRAIT", - "LANDSCAPE" - ], - "description": "Page orientation of the PDF." + "color": { + "description": "Hex color code to be assigned to the tag. For example, #ff78a9.", + "type": "string" + } + }, + "required": [ + "name" + ] + }, + "SearchTagsRequest": { + "type": "object", + "properties": { + "tag_identifier": { + "description": "Name or Id of the tag.", + "type": "string" }, - "truncate_table": { - "type": "boolean", - "description": "Indicates whether to include only first page of the tables." + "name_pattern": { + "description": "A pattern to match case-insensitive name of the Tag object.", + "type": "string" }, - "page_footer_text": { - "type": "string", - "description": "Text to include in the footer of each page." + "color": { + "description": "Color of the tag.", + "type": "string" } } }, - "SearchDataResponse": { + "UnassignTagRequest": { "type": "object", - "required": [ - "contents" - ], "properties": { - "contents": { + "metadata": { + "description": "Metadata objects.", "type": "array", "items": { - "$ref": "#/components/schemas/AnswerContent" - }, - "description": "Data content of metadata objects." + "$ref": "#/components/schemas/TagMetadataTypeInput" + } + }, + "tag_identifiers": { + "description": "GUID or name of the tag.", + "type": "array", + "items": { + "type": "string" + } } }, - "description": "Response format associated with the search data API." + "required": [ + "metadata", + "tag_identifiers" + ] }, - "LogResponse": { + "UpdateTagRequest": { "type": "object", - "required": [ - "date", - "log" - ], "properties": { - "date": { - "type": "string", - "description": "Date timestamp of the log entry" + "name": { + "description": "Name of the tag.", + "type": "string" }, - "log": { - "type": "string", - "description": "Log data" + "color": { + "description": "Hex color code to be assigned to the tag. For example, #ff78a9.", + "type": "string" } } }, - "RepoConfigObject": { + "ActivateUserRequest": { "type": "object", + "properties": { + "user_identifier": { + "description": "Unique ID or name of the user.", + "type": "string" + }, + "auth_token": { + "description": "Auth token for the user.", + "type": "string" + }, + "password": { + "description": "New password for the user to access the account.", + "type": "string" + }, + "properties": { + "description": "Properties of the user.", + "type": "string" + } + }, "required": [ - "remote_alias" - ], + "user_identifier", + "auth_token", + "password" + ] + }, + "ChangeUserPasswordRequest": { + "type": "object", "properties": { - "repository_url": { + "current_password": { + "description": "Current password of the user.", + "type": "string" + }, + "new_password": { + "description": "New password for the user.", + "type": "string" + }, + "user_identifier": { + "description": "GUID or name of the user.", + "type": "string" + } + }, + "required": [ + "current_password", + "new_password", + "user_identifier" + ] + }, + "CreateUserRequest": { + "type": "object", + "properties": { + "name": { + "description": "Name of the user. The username string must be unique.", + "type": "string" + }, + "display_name": { + "description": "A unique display name string for the user account, usually their first and last name", + "type": "string" + }, + "password": { + "description": "Password for the user account. For IAMv2 users, you must set this password if you do not want to trigger an activation email.", + "type": "string" + }, + "email": { + "description": "Email of the user account", + "type": "string" + }, + "account_type": { + "description": "Type of the account.", + "default": "LOCAL_USER", "type": "string", - "description": "Remote repository URL configured" + "enum": [ + "LOCAL_USER", + "LDAP_USER", + "SAML_USER", + "OIDC_USER", + "REMOTE_USER" + ] }, - "branches": { + "account_status": { + "description": "Current status of the user account. The `SUSPENDED` user state indicates a transitional state applicable to IAMv2 users only.", + "default": "ACTIVE", + "type": "string", + "enum": [ + "ACTIVE", + "INACTIVE", + "EXPIRED", + "LOCKED", + "PENDING", + "SUSPENDED" + ] + }, + "org_identifiers": { + "description": "List of Org IDs to which the user belongs.", "type": "array", "items": { "type": "string" - }, - "description": "Branches that have been pulled in local repository" + } + }, + "group_identifiers": { + "description": "GUIDs or names of the groups to which the newly created user belongs.", + "type": "array", + "items": { + "type": "string" + } }, - "remote_alias": { + "visibility": { + "description": "Visibility of the users. When set to SHARABLE, the user is visible to other users and groups when they try to share an object.", + "default": "SHARABLE", "type": "string", - "description": "Alias name associated with the remote repository" - } - } - }, - "CommitHistoryResponse": { - "type": "object", - "required": [ - "committer", - "author", - "comment", - "commit_time", - "commit_id", - "branch" - ], - "properties": { - "committer": { - "$ref": "#/components/schemas/CommiterType", - "description": "Repository user using which changes were committed" + "enum": [ + "SHARABLE", + "NON_SHARABLE" + ] }, - "author": { - "$ref": "#/components/schemas/AuthorType", - "description": "Thoughtspot user who commits the changes" + "notify_on_share": { + "description": "User preference for receiving email notifications when another ThoughtSpot\nuser shares a metadata object such as Answer, Liveboard, or Worksheet.", + "default": true, + "type": "boolean", + "nullable": true }, - "comment": { + "show_onboarding_experience": { + "description": "The user preference for revisiting the onboarding experience.", + "default": true, + "type": "boolean", + "nullable": true + }, + "onboarding_experience_completed": { + "description": "flag to get the on-boarding experience is completed or not.", + "default": false, + "type": "boolean", + "nullable": true + }, + "home_liveboard_identifier": { + "description": "GUID of the Liveboard to set a default Liveboard for the user.\nThoughtSpot displays this Liveboard on the Home page when the user logs in.", + "type": "string" + }, + "favorite_metadata": { + "description": "Metadata objects to add to the user's favorites list.", + "type": "array", + "items": { + "$ref": "#/components/schemas/FavoriteMetadataInput" + } + }, + "preferred_locale": { + "description": "Locale for the user. When setting this value, do not set use_browser_language\nto true, otherwise the browser's language setting will take precedence and the\npreferred_locale value will be ignored.", "type": "string", - "description": "Comments associated with the commit" + "enum": [ + "en-CA", + "en-GB", + "en-US", + "de-DE", + "ja-JP", + "zh-CN", + "pt-BR", + "fr-FR", + "fr-CA", + "es-US", + "da-DK", + "es-ES", + "fi-FI", + "sv-SE", + "nb-NO", + "pt-PT", + "nl-NL", + "it-IT", + "ru-RU", + "en-IN", + "de-CH", + "en-NZ", + "es-MX", + "en-AU", + "zh-Hant", + "ko-KR", + "en-DE" + ] + }, + "use_browser_language": { + "description": "Flag to indicate whether to use the browser locale for the user in the UI.\nWhen set to true, the preferred_locale value is unset and the browser's\nlanguage setting takes precedence.
Version: 26.3.0.cl or later", + "type": "boolean", + "nullable": true + }, + "extended_properties": { + "description": "Properties for the user", + "type": "object" }, - "commit_time": { - "type": "string", - "description": "Time at which the changes were committed." + "extended_preferences": { + "description": "Preferences for the user", + "type": "object" }, - "commit_id": { - "type": "string", - "description": "SHA id associated with the commit" + "trigger_welcome_email": { + "description": "Flag to indicate whether welcome email should be sent to user. This parameter is applied only on clusters on which IAM is disabled.", + "type": "boolean", + "nullable": true }, - "branch": { - "type": "string", - "description": "Branch where changes were committed" + "trigger_activation_email": { + "description": "Flag to indicate whether activation email should be sent to the user. Default value for IAMv2 users is set to true. Users must either set this to false, or enter a valid \npassword if they do not want to trigger an activation email.", + "type": "boolean", + "nullable": true } - } + }, + "required": [ + "name", + "display_name", + "email" + ] }, - "Token": { + "DeactivateUserRequest": { "type": "object", - "required": [ - "token", - "creation_time_in_millis", - "expiration_time_in_millis", - "scope", - "valid_for_user_id", - "valid_for_username" - ], "properties": { - "token": { - "type": "string", - "description": "Bearer auth token." - }, - "creation_time_in_millis": { - "type": "number", - "format": "float", - "description": "Token creation time in milliseconds." - }, - "expiration_time_in_millis": { - "type": "number", - "format": "float", - "description": "Token expiration time in milliseconds." - }, - "scope": { - "$ref": "#/components/schemas/Scope", - "description": "Token access scope details" - }, - "valid_for_user_id": { - "type": "string", - "description": "Username to whom the token is issued." + "user_identifier": { + "description": "Unique ID or name of the user.", + "type": "string" }, - "valid_for_username": { - "type": "string", - "description": "Unique identifier of the user to whom the token is issued." + "base_url": { + "description": "Base url of the cluster.", + "type": "string" } - } + }, + "required": [ + "user_identifier", + "base_url" + ] }, - "TagMetadataTypeInput": { + "ForceLogoutUsersRequest": { "type": "object", - "required": [ - "type", - "identifier" - ], "properties": { - "type": { - "type": "string", - "enum": [ - "LIVEBOARD", - "ANSWER", - "LOGICAL_TABLE", - "LOGICAL_COLUMN" - ], - "description": "Type of metadata.\n1. LIVEBOARD\n2. ANSWERS\n3. LOGICAL_TABLE for any data object such as table, worksheet or view.\n4. LOGICAL_COLUMN for a column of any data object such as tables, worksheets or views." - }, - "identifier": { - "type": "string", - "description": "Unique ID or name of the metadata." + "user_identifiers": { + "description": "GUID or name of the users for force logging out their sessions.", + "type": "array", + "items": { + "type": "string" + } } } }, - "ImportUserGroupsResponse": { + "ImportUsersRequest": { "type": "object", - "required": [ - "groups_added", - "groups_deleted", - "groups_updated" - ], "properties": { - "groups_added": { + "users": { + "description": "List of users needs to be imported.", "type": "array", "items": { - "$ref": "#/components/schemas/UserGroup" - }, - "description": "The user groups which are added into the system." + "$ref": "#/components/schemas/ImportUser" + } }, - "groups_deleted": { - "type": "array", - "items": { - "$ref": "#/components/schemas/UserGroup" - }, - "description": "The user groups which are deleted from the system." + "default_password": { + "description": "The default password to assign to users if they do not have a password assigned in ThoughtSpot.", + "type": "string" }, - "groups_updated": { - "type": "array", - "items": { - "$ref": "#/components/schemas/UserGroup" - }, - "description": "The user groups which are updated in the system." + "dry_run": { + "description": "If true, the API performs a test operation and returns user IDs whose data will be edited after the import.", + "default": true, + "type": "boolean", + "nullable": true + }, + "delete_unspecified_users": { + "description": "If set to true, removes the users that are not specified in the API request.", + "default": false, + "type": "boolean", + "nullable": true } - } + }, + "required": [ + "users" + ] }, - "GroupsImportListInput": { + "ResetUserPasswordRequest": { "type": "object", + "properties": { + "new_password": { + "description": "New password for the user.", + "type": "string" + }, + "user_identifier": { + "description": "GUID or name of the user.", + "type": "string" + } + }, "required": [ - "display_name", - "group_identifier" - ], + "new_password", + "user_identifier" + ] + }, + "SearchUsersRequest": { + "type": "object", "properties": { + "user_identifier": { + "description": "GUID / name of the user to search", + "type": "string" + }, "display_name": { - "type": "string", - "description": "Unique display name of the user group." + "description": "A unique display name string for the user account, usually their first and last name", + "type": "string" }, - "group_identifier": { + "name_pattern": { + "description": "A pattern to match case-insensitive name of the User object.", + "type": "string" + }, + "visibility": { + "description": "Visibility of the user", "type": "string", - "description": "Unique ID or name of the User Group." + "enum": [ + "SHARABLE", + "NON_SHARABLE" + ] }, - "default_liveboard_identifiers": { + "email": { + "description": "Email of the user account", + "type": "string" + }, + "group_identifiers": { + "description": "GUID or name of the group to which the user belongs", "type": "array", "items": { "type": "string" - }, - "description": "Unique ID of liveboards which will be assigned as default liveboards to the user group." - }, - "description": { - "type": "string", - "description": "Description of the user group." + } }, "privileges": { + "description": "Privileges assigned to the user", "type": "array", "items": { "type": "string", @@ -5442,427 +34661,913 @@ "USERDATAUPLOADING", "DATADOWNLOADING", "USERMANAGEMENT", - "SECURITYMANAGEMENT", - "LOGICALMODELING", "DATAMANAGEMENT", - "TAGMANAGEMENT", "SHAREWITHALL", - "SYSTEMMANAGEMENT", "JOBSCHEDULING", "A3ANALYSIS", "EXPERIMENTALFEATUREPRIVILEGE", "BYPASSRLS", "RANALYSIS", - "DISABLE_PINBOARD_CREATION", "DEVELOPER", - "APPLICATION_ADMINISTRATION", "USER_ADMINISTRATION", "GROUP_ADMINISTRATION", - "BACKUP_ADMINISTRATION", + "SYNCMANAGEMENT", + "CAN_CREATE_CATALOG", + "DISABLE_PINBOARD_CREATION", + "LIVEBOARD_VERIFIER", + "PREVIEW_THOUGHTSPOT_SAGE", + "APPLICATION_ADMINISTRATION", "SYSTEM_INFO_ADMINISTRATION", - "ENABLESPOTAPPCREATION", - "SYNCMANAGEMENT" + "ORG_ADMINISTRATION", + "ROLE_ADMINISTRATION", + "AUTHENTICATION_ADMINISTRATION", + "BILLING_INFO_ADMINISTRATION", + "CAN_MANAGE_CUSTOM_CALENDAR", + "CAN_CREATE_OR_EDIT_CONNECTIONS", + "CAN_MANAGE_WORKSHEET_VIEWS_TABLES", + "CAN_MANAGE_VERSION_CONTROL", + "THIRDPARTY_ANALYSIS", + "ALLOW_NON_EMBED_FULL_APP_ACCESS", + "CAN_ACCESS_ANALYST_STUDIO", + "CAN_MANAGE_ANALYST_STUDIO", + "PREVIEW_DOCUMENT_SEARCH", + "CAN_MODIFY_FOLDERS", + "CAN_MANAGE_VARIABLES", + "CAN_VIEW_FOLDERS", + "CAN_MANAGE_AGENTSPOT", + "CAN_ACCESS_AGENTSPOT", + "CAN_SETUP_VERSION_CONTROL", + "CAN_MANAGE_WEBHOOKS", + "CAN_DOWNLOAD_VISUALS", + "CAN_DOWNLOAD_DETAILED_DATA", + "CAN_USE_SPOTTER", + "CAN_MANAGE_SPOTTER" ] - }, - "description": "Privileges which will be assigned to the user group." + } + }, + "account_type": { + "description": "Type of the account", + "type": "string", + "enum": [ + "LOCAL_USER", + "LDAP_USER", + "SAML_USER", + "OIDC_USER", + "REMOTE_USER" + ] + }, + "account_status": { + "description": "Current status of the user account.", + "type": "string", + "enum": [ + "ACTIVE", + "INACTIVE", + "EXPIRED", + "LOCKED", + "PENDING", + "SUSPENDED" + ] + }, + "notify_on_share": { + "description": "User preference for receiving email notifications when another ThoughtSpot user\nshares a metadata object such as Answer, Liveboard, or Worksheet.", + "type": "boolean", + "nullable": true + }, + "show_onboarding_experience": { + "description": "The user preference for revisiting the onboarding experience", + "type": "boolean", + "nullable": true + }, + "onboarding_experience_completed": { + "description": "Indicates if the user has completed the onboarding walkthrough", + "type": "boolean", + "nullable": true + }, + "org_identifiers": { + "description": "IDs or names of the Orgs to which the user belongs", + "type": "array", + "items": { + "type": "string" + } + }, + "home_liveboard_identifier": { + "description": "Unique ID or name of the user's home Liveboard.", + "type": "string" + }, + "favorite_metadata": { + "description": "Metadata objects which are assigned as favorites of the user.", + "type": "array", + "items": { + "$ref": "#/components/schemas/FavoriteMetadataInput" + } + }, + "record_offset": { + "description": "The starting record number from where the records should be included.", + "default": 0, + "type": "integer", + "format": "int32" + }, + "record_size": { + "description": "The number of records that should be included.", + "default": 10, + "type": "integer", + "format": "int32" + }, + "sort_options": { + "description": "Sort options.", + "allOf": [ + { + "$ref": "#/components/schemas/SortOptions" + } + ] + }, + "role_identifiers": { + "description": "Filters by the role assigned to the user.", + "type": "array", + "items": { + "type": "string" + } + }, + "include_favorite_metadata": { + "description": "Indicates if the user's favorite objects should be displayed.", + "default": false, + "type": "boolean", + "nullable": true + }, + "include_variable_values": { + "description": "Indicates if the user's formula variable values should be included in the response.", + "default": false, + "type": "boolean", + "nullable": true + } + } + }, + "UpdateUserRequest": { + "type": "object", + "properties": { + "name": { + "description": "Name of the user. The username string must be unique.", + "type": "string" + }, + "display_name": { + "description": "A unique display name string for the user account, usually their first and last name", + "type": "string" + }, + "visibility": { + "description": "Visibility of the users. When set to SHARABLE, the user is visible to other users and groups when they try to share an object.", + "type": "string", + "enum": [ + "SHARABLE", + "NON_SHARABLE" + ] + }, + "email": { + "description": "Email of the user account", + "type": "string" + }, + "account_status": { + "description": "Current status of the user account. The `SUSPENDED` user state indicates a transitional state applicable to IAMv2 users only.", + "type": "string", + "enum": [ + "ACTIVE", + "INACTIVE", + "EXPIRED", + "LOCKED", + "PENDING", + "SUSPENDED" + ] + }, + "notify_on_share": { + "description": "User preference for receiving email notifications when another ThoughtSpot user\nshares a metadata object such as Answer, Liveboard, or Worksheet.", + "type": "boolean", + "nullable": true + }, + "show_onboarding_experience": { + "description": "The user preference for revisiting the onboarding experience.", + "type": "boolean", + "nullable": true + }, + "onboarding_experience_completed": { + "description": "Indicates if the user has completed the onboarding and allows turning off the onboarding walkthrough.", + "type": "boolean", + "nullable": true + }, + "account_type": { + "description": "Type of the account.", + "type": "string", + "enum": [ + "LOCAL_USER", + "LDAP_USER", + "SAML_USER", + "OIDC_USER", + "REMOTE_USER" + ] }, - "sub_group_identifiers": { + "group_identifiers": { + "description": "GUIDs or names of the groups.", "type": "array", "items": { "type": "string" - }, - "description": "Unique ID or name of the User Groups who will be part of the user group." + } }, - "type": { - "type": "string", - "enum": [ - "LOCAL_GROUP", - "LDAP_GROUP" - ], - "description": "Type of the user group." + "home_liveboard_identifier": { + "description": "GUID of the Liveboard to set a default Liveboard for the user. ThoughtSpot displays\nthis Liveboard on the Home page when the user logs in.", + "type": "string" }, - "user_identifiers": { + "favorite_metadata": { + "description": "Metadata objects to add to the user's favorites list.", + "type": "array", + "items": { + "$ref": "#/components/schemas/FavoriteMetadataInput" + } + }, + "org_identifiers": { + "description": "IDs of the Orgs.", "type": "array", "items": { "type": "string" - }, - "description": "Unique ID or name of the Users who will be part of the user group." + } }, - "visibility": { + "operation": { + "description": "Type of update operation. Default operation type is REPLACE", + "default": "REPLACE", "type": "string", "enum": [ - "SHARABLE", - "NON_SHARABLE" - ], - "description": "Visibility of the user group. The SHARABLE makes a user group visible to other users and user groups, and thus allows them to share objects." + "ADD", + "REMOVE", + "REPLACE" + ] + }, + "preferred_locale": { + "description": "Locale for the user. When setting this value, do not set use_browser_language\nto true, otherwise the browser's language setting will take precedence and the\npreferred_locale value will be ignored.", + "type": "string", + "enum": [ + "en-CA", + "en-GB", + "en-US", + "de-DE", + "ja-JP", + "zh-CN", + "pt-BR", + "fr-FR", + "fr-CA", + "es-US", + "da-DK", + "es-ES", + "fi-FI", + "sv-SE", + "nb-NO", + "pt-PT", + "nl-NL", + "it-IT", + "ru-RU", + "en-IN", + "de-CH", + "en-NZ", + "es-MX", + "en-AU", + "zh-Hant", + "ko-KR", + "en-DE" + ] + }, + "use_browser_language": { + "description": "Flag to indicate whether to use the browser locale for the user in the UI.\nWhen set to true, the preferred_locale value is unset and the browser's\nlanguage setting takes precedence.
Version: 26.3.0.cl or later", + "type": "boolean", + "nullable": true + }, + "extended_properties": { + "description": "Properties for the user", + "type": "object" + }, + "extended_preferences": { + "description": "Preferences for the user", + "type": "object" } } }, - "CommitResponse": { + "CreateVariableRequest": { "type": "object", - "required": [ - "committer", - "author", - "comment" - ], "properties": { - "committer": { - "$ref": "#/components/schemas/CommiterType", - "description": "Repository user using which changes were committed" - }, - "author": { - "$ref": "#/components/schemas/AuthorType", - "description": "Thoughtspot user who commits the changes" - }, - "comment": { + "type": { + "description": "Type of variable", "type": "string", - "description": "Comments associated with the commit" + "enum": [ + "CONNECTION_PROPERTY", + "TABLE_MAPPING", + "CONNECTION_PROPERTY_PER_PRINCIPAL", + "FORMULA_VARIABLE" + ] }, - "commit_time": { - "type": "string", - "description": "Time at which the changes were committed." + "name": { + "description": "Name of the variable. This is unique across the cluster.", + "type": "string" }, - "commit_id": { - "type": "string", - "description": "SHA id associated with the commit" + "is_sensitive": { + "description": "If the variable contains sensitive values like passwords", + "default": false, + "type": "boolean", + "nullable": true }, - "branch": { + "data_type": { + "description": "Variable Data Type, only for formula_variable type, leave empty for others
Version: 10.15.0.cl or later", "type": "string", - "description": "Branch where changes were committed" - }, - "committed_files": { + "enum": [ + "VARCHAR", + "INT32", + "INT64", + "DOUBLE", + "DATE", + "DATE_TIME" + ] + } + }, + "required": [ + "type", + "name" + ] + }, + "DeleteVariablesRequest": { + "type": "object", + "properties": { + "identifiers": { + "description": "Unique id(s) or name(s) of the variable(s) to delete", "type": "array", "items": { "type": "string" - }, - "description": "Files that were pushed as part of this commit" + } } - } + }, + "required": [ + "identifiers" + ] }, - "MetadataObject": { + "PutVariableValuesRequest": { "type": "object", - "required": [ - "identifier", - "type" - ], "properties": { - "identifier": { - "type": "string", - "description": "Unique ID or name of the metadata" - }, - "type": { + "operation": { + "description": "Operation to perform", "type": "string", "enum": [ - "LIVEBOARD", - "ANSWER", - "LOGICAL_TABLE", - "LOGICAL_COLUMN", - "CONNECTION", - "TAG", - "USER", - "USER_GROUP", - "LOGICAL_RELATIONSHIP" - ], - "description": "Type of metadata." + "ADD", + "REMOVE", + "REPLACE", + "RESET" + ] + }, + "variable_assignment": { + "description": "Variable assignments", + "type": "array", + "items": { + "$ref": "#/components/schemas/VariablePutAssignmentInput" + } } - } + }, + "required": [ + "variable_assignment" + ] }, - "DeployResponse": { + "SearchVariablesRequest": { "type": "object", "properties": { - "file_name": { - "type": "string", - "description": "Name of the file deployed" + "variable_details": { + "description": "Variable details", + "type": "array", + "items": { + "$ref": "#/components/schemas/VariableDetailInput" + } }, - "metadata_name": { - "type": "string", - "description": "Name of the metadata object" + "value_scope": { + "description": "Array of scope filters", + "type": "array", + "items": { + "$ref": "#/components/schemas/ValueScopeInput" + } }, - "metadata_type": { - "type": "string", - "description": "Type of the metadata object" + "record_offset": { + "description": "The starting record number from where the records should be included", + "default": 0, + "type": "integer", + "format": "int32" }, - "status_code": { - "type": "string", - "description": "Indicates the status of deployment for the file" + "record_size": { + "description": "The number of records that should be included", + "default": 10, + "type": "integer", + "format": "int32" }, - "status_message": { + "response_content": { + "description": "Format in which we want the output", + "default": "METADATA", "type": "string", - "description": "Any error or warning with the deployment" + "enum": [ + "METADATA", + "METADATA_AND_VALUES" + ] } } }, - "Org": { + "UpdateVariableRequest": { "type": "object", + "properties": { + "name": { + "description": "New name of the variable.", + "type": "string" + } + }, "required": [ - "id", "name" - ], + ] + }, + "UpdateVariableValuesRequest": { + "type": "object", "properties": { - "id": { - "type": "integer", - "format": "int32", - "description": "The ID of the object." + "variable_assignment": { + "description": "Array of variable assignment objects specifying the variable identifier, values to assign, and the operation type (ADD, REMOVE, REPLACE, or RESET) to perform on each variable.", + "type": "array", + "items": { + "$ref": "#/components/schemas/VariableUpdateAssignmentInput" + } }, - "name": { - "type": "string", - "description": "Name of the object." + "variable_value_scope": { + "description": "Array of scope objects defining where the variable values apply, including organization context, optional principal constraints (user or group), model reference for formula variables, and priority for conflict resolution.", + "type": "array", + "items": { + "$ref": "#/components/schemas/VariableUpdateScopeInput" + } } }, - "description": "Current logged in Organizations of the user." + "required": [ + "variable_assignment", + "variable_value_scope" + ] }, - "FavoriteMetadataItem": { + "CommitBranchRequest": { "type": "object", + "properties": { + "metadata": { + "description": "Metadata objects.", + "type": "array", + "items": { + "$ref": "#/components/schemas/MetadataObject" + } + }, + "delete_aware": { + "description": "Delete the tml files from version control repo if it does not exist in the ThoughSpot instance", + "default": true, + "type": "boolean", + "nullable": true + }, + "branch_name": { + "description": " Name of the remote branch where object should be pushed\n \n\nNote: If no branch_name is specified, then the commit_branch_name will be considered.", + "type": "string" + }, + "comment": { + "description": "Comment to be added to the commit", + "type": "string" + } + }, "required": [ - "id", - "name", - "type" - ], + "metadata", + "comment" + ] + }, + "CreateConfigRequest": { + "type": "object", "properties": { - "id": { - "type": "string", - "description": "Unique ID of the metadata." + "repository_url": { + "description": "URL for connecting to remote repository", + "type": "string" }, - "name": { - "type": "string", - "description": "name of the metadata." + "username": { + "description": "Username to authenticate connection to remote repository", + "type": "string" }, - "type": { - "type": "string", - "enum": [ - "LIVEBOARD", - "ANSWER", - "LOGICAL_TABLE", - "LOGICAL_COLUMN", - "CONNECTION", - "TAG", - "USER", - "USER_GROUP", - "LOGICAL_RELATIONSHIP" - ], - "description": "Type of metadata." + "access_token": { + "description": "Access token corresponding to the user to authenticate connection to remote repository", + "type": "string" + }, + "org_identifier": { + "description": " Applicable when Orgs is enabled in the cluster\n \n\nList of Org ids or name. Provide value -1 for cluster level. Example : [\"OrgID1-or-Name1\", \"OrgID2-or-Name2\"] \n\n\n \n\nNote: If no value is specified, then the configurations will be returned for all orgs the user has access to
Version: 9.5.0.cl or later", + "type": "string" + }, + "branch_names": { + "description": "List the remote branches to configure. Example:[development, production]", + "type": "array", + "items": { + "type": "string" + } + }, + "commit_branch_name": { + "description": "Name of the remote branch where objects from this Thoughtspot instance will be versioned.
Version: 9.7.0.cl or later", + "type": "string" + }, + "enable_guid_mapping": { + "description": "Maintain mapping of guid for the deployment to an instance
Version: 9.4.0.cl or later", + "default": true, + "type": "boolean", + "nullable": true + }, + "configuration_branch_name": { + "description": " Name of the branch where the configuration files related to operations between Thoughtspot and version control repo should be maintained.\n \n\nNote: If no branch name is specified, then by default, ts_config_files branch is considered. Ensure this branch exists before configuration.
Version: 9.7.0.cl or later", + "type": "string" + } + }, + "required": [ + "repository_url", + "username", + "access_token" + ] + }, + "DeleteConfigRequest": { + "type": "object", + "properties": { + "cluster_level": { + "description": " Applicable when Orgs is enabled in the cluster\n \n\nIndicator to consider cluster level or org level config. Set it to false to delete configuration from current org. If set to true, then the configuration at cluster level and orgs that inherited the configuration from cluster level will be deleted.
Version: 9.5.0.cl or later", + "type": "boolean", + "nullable": true } } }, - "Object_ID_And_Name": { + "DeployCommitRequest": { "type": "object", "properties": { - "id": { + "commit_id": { + "description": " Commit_id against which the files should be picked to deploy.\n \n\nNote: If no commit_id is specified, then the head of the branch is considered.", + "type": "string" + }, + "branch_name": { + "description": "Name of the remote branch where changes should be picked", + "type": "string" + }, + "deploy_type": { + "description": "Indicates if all files or only modified file at specified commit point should be considered", + "default": "DELTA", "type": "string", - "description": "The unique identifier of the object." + "enum": [ + "FULL", + "DELTA" + ] }, - "name": { + "deploy_policy": { + "description": "Define the policy to follow while importing TML in the ThoughtSpot environment. Use “ALL_OR_NONE” to cancel the deployment of all ThoughtSpot objects if at least one of them fails to import. Use “Partial” to import ThoughtSpot objects that validate successfully even if other objects in the same deploy operations fail to import.", + "default": "ALL_OR_NONE", "type": "string", - "description": "Name of the object." + "enum": [ + "ALL_OR_NONE", + "PARTIAL", + "VALIDATE_ONLY" + ] } }, - "description": "The object representation with ID and Name." + "required": [ + "branch_name" + ] }, - "ImportUserType": { + "RevertCommitRequest": { "type": "object", - "required": [ - "id", - "name" - ], "properties": { - "id": { - "type": "string", - "description": "Unique identifier of the user." + "metadata": { + "description": "Metadata objects.", + "type": "array", + "items": { + "$ref": "#/components/schemas/MetadataObject" + } + }, + "branch_name": { + "description": " Name of the branch where the reverted version should be committed\n \n\nNote: If no branch_name is specified, then the commit_branch_name will be considered.", + "type": "string" }, - "name": { + "revert_policy": { + "description": "Policy to apply when reverting a commit. Valid values: [ALL_OR_NONE, PARTIAL]", + "default": "ALL_OR_NONE", "type": "string", - "description": "Name of the user." + "enum": [ + "ALL_OR_NONE", + "PARTIAL" + ] } } }, - "AnswerContent": { + "SearchCommitsRequest": { "type": "object", - "required": [ - "available_data_row_count", - "column_names", - "data_rows", - "record_offset", - "record_size", - "returned_data_row_count", - "sampling_ratio" - ], "properties": { - "available_data_row_count": { - "type": "integer", - "format": "int32", - "description": "Total available data row count." + "metadata_identifier": { + "description": "Unique ID or name of the metadata.", + "type": "string" }, - "column_names": { - "type": "array", - "items": { - "type": "string" - }, - "description": "Name of the columns." + "metadata_type": { + "description": "Type of metadata.", + "type": "string", + "enum": [ + "LIVEBOARD", + "ANSWER", + "LOGICAL_TABLE", + "CUSTOM_ACTION" + ] }, - "data_rows": { - "type": "array", - "items": { - "type": "object" - }, - "description": "Rows of data set." + "branch_name": { + "description": " Name of the branch from which commit history needs to be displayed.\n \n\nNote: If no branch_name is specified, then commits will be returned for the default branch for this configuration.", + "type": "string" }, "record_offset": { + "description": " Record offset point in the commit history to display the response.\n \n\nNote: If no record offset is specified, the beginning of the record will be considered.", "type": "integer", - "format": "int32", - "description": "The starting record number from where the records should be included." + "format": "int32" }, "record_size": { + "description": " Number of history records from record offset point to be displayed in the response.\n \n\nNote: If no record size is specified, then all the records will be considered.", "type": "integer", - "format": "int32", - "description": "The number of records that should be included." - }, - "returned_data_row_count": { - "type": "integer", - "format": "int32", - "description": "Total returned data row count." - }, - "sampling_ratio": { - "type": "number", - "format": "float", - "description": "Sampling ratio (0 to 1). If the query was sampled, it is the ratio of keys returned in the data set to the total number of keys expected in the query. If the value is 1.0, this means that the complete result is returned." + "format": "int32" } - } + }, + "required": [ + "metadata_identifier" + ] }, - "LiveboardContent": { + "SearchConfigRequest": { "type": "object", - "required": [ - "available_data_row_count", - "column_names", - "data_rows", - "record_offset", - "record_size", - "returned_data_row_count", - "sampling_ratio" - ], "properties": { - "available_data_row_count": { - "type": "integer", - "format": "int32", - "description": "Total available data row count." - }, - "column_names": { + "org_identifiers": { + "description": " Applicable when Orgs is enabled in the cluster\n \n\nList of Org ids or name. Provide value -1 for cluster level. Example : [\"OrgID1-or-Name1\", \"OrgID2-or-Name2\"] \n\n\n \n\nNote: If no value is specified, then the configurations will be returned for all orgs the user has access to
Version: 9.5.0.cl or later", "type": "array", "items": { "type": "string" - }, - "description": "Name of the columns." - }, - "data_rows": { - "type": "array", - "items": { - "type": "object" - }, - "description": "Rows of data set." + } + } + } + }, + "UpdateConfigRequest": { + "type": "object", + "properties": { + "username": { + "description": "Username to authenticate connection to version control system", + "type": "string" }, - "record_offset": { - "type": "integer", - "format": "int32", - "description": "The starting record number from where the records should be included." + "access_token": { + "description": "Access token corresponding to the user to authenticate connection to version control system", + "type": "string" }, - "record_size": { - "type": "integer", - "format": "int32", - "description": "The number of records that should be included." + "org_identifier": { + "description": " Applicable when Orgs is enabled in the cluster\n \n\nList of Org ids or name. Provide value -1 for cluster level. Example : [\"OrgID1-or-Name1\", \"OrgID2-or-Name2\"] \n\n\n \n\nNote: If no value is specified, then the configurations will be returned for all orgs the user has access to
Version: 9.5.0.cl or later", + "type": "string" }, - "returned_data_row_count": { - "type": "integer", - "format": "int32", - "description": "Total returned data row count." + "branch_names": { + "description": "List the remote branches to configure. Example:[development, production]", + "type": "array", + "items": { + "type": "string" + } }, - "sampling_ratio": { - "type": "number", - "format": "float", - "description": "Sampling ratio (0 to 1). If the query was sampled, it is the ratio of keys returned in the data set to the total number of keys expected in the query. If the value is 1.0, this means that the complete result is returned." + "commit_branch_name": { + "description": "Name of the remote branch where objects from this Thoughtspot instance will be versioned.
Version: 9.7.0.cl or later", + "type": "string" }, - "visualization_id": { - "type": "string", - "description": "Unique ID of the visualization." + "enable_guid_mapping": { + "description": "Maintain mapping of guid for the deployment to an instance
Version: 9.4.0.cl or later", + "type": "boolean", + "nullable": true }, - "visualization_name": { - "type": "string", - "description": "Name of the visualization." + "configuration_branch_name": { + "description": "Name of the branch where the configuration files related to operations between Thoughtspot and version control repo should be maintained.
Version: 9.7.0.cl or later", + "type": "string" } } }, - "SqlQuery": { + "ValidateMergeRequest": { "type": "object", - "required": [ - "metadata_id", - "metadata_name", - "sql_query" - ], "properties": { - "metadata_id": { - "type": "string", - "description": "Unique identifier of the metadata." - }, - "metadata_name": { - "type": "string", - "description": "Name of the metadata." + "source_branch_name": { + "description": "Name of the branch from which changes need to be picked for validation", + "type": "string" }, - "sql_query": { - "type": "string", - "description": "SQL query of a metadata object." + "target_branch_name": { + "description": "Name of the branch where files will be merged", + "type": "string" } }, - "description": "Response format associated with fetch SQL query api" + "required": [ + "source_branch_name", + "target_branch_name" + ] }, - "CommiterType": { + "CreateWebhookConfigurationRequest": { "type": "object", - "required": [ - "username" - ], "properties": { - "email": { - "type": "string", - "description": "Email id of the committer" + "name": { + "description": "Name of the webhook configuration.", + "type": "string" }, - "username": { + "description": { + "description": "Description of the webhook configuration.", + "type": "string" + }, + "url": { + "description": "The webhook endpoint URL.", + "type": "string" + }, + "url_params": { + "description": "Additional URL parameters as key-value pairs.", + "type": "object" + }, + "events": { + "description": "List of events to subscribe to.", + "type": "array", + "items": { + "type": "string", + "enum": [ + "LIVEBOARD_SCHEDULE" + ] + } + }, + "authentication": { + "description": "Authorization configuration for the webhook.", + "allOf": [ + { + "$ref": "#/components/schemas/WebhookAuthenticationInput" + } + ] + }, + "signature_verification": { + "description": "Configuration for webhook signature verification.", + "allOf": [ + { + "$ref": "#/components/schemas/WebhookSignatureVerificationInput" + } + ] + }, + "storage_destination": { + "description": "Configuration for storage destination.\nAWS S3 example: {\"storage_type\": \"AWS_S3\", \"storage_config\": {\"aws_s3_config\": {\"bucket_name\": \"my-webhook-files\", \"region\": \"us-west-2\", \"role_arn\": \"arn:aws:iam::123456789012:role/ThoughtSpotDeliveryRole\", \"external_id\": \"ts-webhook-a1b2c3d4-7890\", \"path_prefix\": \"thoughtspot-webhooks/\"}}}\nGCP GCS example: {\"storage_type\": \"GCP_GCS\", \"storage_config\": {\"gcp_gcs_config\": {\"bucket_name\": \"my-webhook-files\", \"service_account_email\": \"my-sa@my-project.iam.gserviceaccount.com\", \"path_prefix\": \"webhooks/\"}}}
Version: 26.3.0.cl or later", + "allOf": [ + { + "$ref": "#/components/schemas/StorageDestinationInput" + } + ] + }, + "additional_headers": { + "description": "Additional headers as an array of key-value pairs.\nExample: [{\"key\": \"X-Custom-Header\", \"value\": \"custom_value\"}]
Version: 26.4.0.cl or later", + "type": "array", + "items": { + "$ref": "#/components/schemas/WebhookKeyValuePairInput" + } + }, + "status": { + "description": "Status of the webhook (ENABLED or DISABLED). Optional — when omitted,\nstatus is not stored and will be absent from the response.
Version: 26.7.0.cl or later", "type": "string", - "description": "Username of the committer" + "enum": [ + "ENABLED", + "DISABLED" + ] } - } + }, + "required": [ + "name", + "url", + "events" + ] }, - "AuthorType": { + "DeleteWebhookConfigurationsRequest": { "type": "object", + "properties": { + "webhook_identifiers": { + "description": "List of webhook identifiers to delete.", + "type": "array", + "items": { + "type": "string" + } + } + }, "required": [ - "email", - "username" - ], + "webhook_identifiers" + ] + }, + "SearchWebhookConfigurationsRequest": { + "type": "object", "properties": { - "email": { + "org_identifier": { + "description": "Unique ID or name of the org.", + "type": "string" + }, + "webhook_identifier": { + "description": "Unique ID or name of the webhook.", + "type": "string" + }, + "event_type": { + "description": "Type of webhook event to filter by.", "type": "string", - "description": "Email id of the committer" + "enum": [ + "LIVEBOARD_SCHEDULE" + ] }, - "username": { + "record_offset": { + "description": "The offset point, starting from where the webhooks should be included in the response.", + "default": 0, + "type": "integer", + "format": "int32" + }, + "record_size": { + "description": "The number of webhooks that should be included in the response starting from offset position.", + "default": 50, + "type": "integer", + "format": "int32" + }, + "sort_options": { + "description": "Sort option includes sort field and sort order.", + "allOf": [ + { + "$ref": "#/components/schemas/WebhookSortOptionsInput" + } + ] + }, + "status": { + "description": "Filter webhooks by status (ENABLED or DISABLED).
Version: 26.7.0.cl or later", "type": "string", - "description": "Username of the committer" + "enum": [ + "ENABLED", + "DISABLED" + ] } } }, - "Scope": { + "UpdateWebhookConfigurationRequest": { "type": "object", - "required": [ - "access_type" - ], "properties": { - "access_type": { - "type": "string", - "description": "Object access scope type." + "name": { + "description": "Name of the webhook configuration.", + "type": "string" }, - "org_id": { - "type": "integer", - "format": "int32", - "description": "Unique identifier of the metadata." + "description": { + "description": "Description of the webhook configuration.", + "type": "string" }, - "metadata_id": { + "url": { + "description": "The webhook endpoint URL.", + "type": "string" + }, + "url_params": { + "description": "Additional URL parameters as key-value pairs.", + "type": "object" + }, + "events": { + "description": "List of events to subscribe to.", + "type": "array", + "items": { + "type": "string", + "enum": [ + "LIVEBOARD_SCHEDULE" + ] + } + }, + "authentication": { + "description": "Authorization configuration for the webhook.", + "allOf": [ + { + "$ref": "#/components/schemas/WebhookAuthenticationInput" + } + ] + }, + "signature_verification": { + "description": "Configuration for webhook signature verification.", + "allOf": [ + { + "$ref": "#/components/schemas/WebhookSignatureVerificationInput" + } + ] + }, + "storage_destination": { + "description": "Configuration for storage destination.\nAWS S3 example: {\"storage_type\": \"AWS_S3\", \"storage_config\": {\"aws_s3_config\": {\"bucket_name\": \"my-webhook-files\", \"region\": \"us-west-2\", \"role_arn\": \"arn:aws:iam::123456789012:role/ThoughtSpotDeliveryRole\", \"external_id\": \"ts-webhook-a1b2c3d4-7890\", \"path_prefix\": \"thoughtspot-webhooks/\"}}}\nGCP GCS example: {\"storage_type\": \"GCP_GCS\", \"storage_config\": {\"gcp_gcs_config\": {\"bucket_name\": \"my-webhook-files\", \"service_account_email\": \"my-sa@my-project.iam.gserviceaccount.com\", \"path_prefix\": \"webhooks/\"}}}
Version: 26.3.0.cl or later", + "allOf": [ + { + "$ref": "#/components/schemas/StorageDestinationInput" + } + ] + }, + "additional_headers": { + "description": "Additional headers as an array of key-value pairs.\nExample: [{\"key\": \"X-Custom-Header\", \"value\": \"custom_value\"}]
Version: 26.4.0.cl or later", + "type": "array", + "items": { + "$ref": "#/components/schemas/WebhookKeyValuePairInput" + } + }, + "status": { + "description": "Status of the webhook (ENABLED or DISABLED).
Version: 26.7.0.cl or later", "type": "string", - "description": "Unique identifier of the organization." + "enum": [ + "ENABLED", + "DISABLED" + ] + }, + "reset_options": { + "description": "List of optional configuration sections to clear. Each value removes the\ncorresponding configuration entirely from the webhook: AUTHENTICATION\nremoves the authentication config, SIGNATURE_VERIFICATION removes the\nsignature verification config, STORAGE_DESTINATION removes the storage\ndestination config.
Version: 26.7.0.cl or later", + "type": "array", + "items": { + "type": "string", + "enum": [ + "AUTHENTICATION", + "SIGNATURE_VERIFICATION", + "STORAGE_DESTINATION" + ] + } } } } diff --git a/openapi-spec-diff.md b/openapi-spec-diff.md new file mode 100644 index 000000000..c6aad1642 --- /dev/null +++ b/openapi-spec-diff.md @@ -0,0 +1,223 @@ +#### What's Changed +--- + +##### `GET` /api/rest/2.0/auth/session/token + + +##### `POST` /api/rest/2.0/connections/{connection_identifier}/update + + +##### `POST` /api/rest/2.0/metadata/tml/async/import + + +###### Return Type: + +Changed response : **200 OK** +> Async TML Import Task submitted successfully. + + +* Changed content type : `application/json` + + * Added property `author_display_name` (string) + > Display name of the user who initiated the task. + + +##### `POST` /api/rest/2.0/report/answer + + +##### `POST` /api/rest/2.0/schedules/{schedule_identifier}/update + + +###### Request: + +Changed content type : `application/json` + +* Added property `personalised_view_id` (string) + > Personalised view id of the liveboard to be scheduled. + + +##### `GET` /api/rest/2.0/system/config-overrides + + +###### Return Type: + +Changed response : **200 OK** +> Cluster configuration which can be overridden. + + +* Changed content type : `application/json` + + * Added property `config_override_info` (object) + +##### `POST` /api/rest/2.0/vcs/git/config/delete + + +##### `GET` /api/rest/2.0/auth/session/user + + +##### `POST` /api/rest/2.0/metadata/tml/async/status + + +###### Return Type: + +Changed response : **200 OK** +> Async TML Import Task statuses fetched successfully. + + +* Changed content type : `application/json` + + * Changed property `status_list` (array) + > List of task statuses. + + + Changed items (object): + + * Added property `author_display_name` (string) + > Display name of the user who initiated the task. + + +##### `POST` /api/rest/2.0/metadata/search + + +###### Request: + +Changed content type : `application/json` + +* Added property `liveboard_response_version` (string) + > Indicates the model version of Liveboard to be attached in metadata detail. + + + Enum values: + + * `V1` + * `V2` +* Changed property `metadata` (array) + > Metadata objects such as Liveboards, Answers, and Worksheets. + + + Changed items (object): + + * Added property `subtypes` (array) + > List of subtype of metadata. Applies for LOGICAL_TABLE type with the following valid values. + > 1. ONE_TO_ONE_LOGICAL + > 2. WORKSHEET + > 3. PRIVATE_WORKSHEET. + > 4. USER_DEFINED. + > 5. AGGR_WORKSHEET. + > 6. SQL_VIEW
Version: 10.11.0.cl or later + + + Items (string): + + Enum values: + + * `ONE_TO_ONE_LOGICAL` + * `WORKSHEET` + * `PRIVATE_WORKSHEET` + * `USER_DEFINED` + * `AGGR_WORKSHEET` + * `SQL_VIEW` +##### `POST` /api/rest/2.0/template/variables/create + + +###### Return Type: + +Changed response : **200 OK** +> Create variable is successful. + + +* Changed content type : `application/json` + + * Changed property `values` (array) + > Values of the variable + + + Changed items (object): + + New optional properties: + - `value` + + * Changed property `value` (string) + > The value of the variable + + +##### `POST` /api/rest/2.0/template/variables/search + + +###### Return Type: + +Changed response : **200 OK** +> List of variables is successful. + + +* Changed content type : `application/json` + + Changed items (object): + > Variable object + + + * Changed property `values` (array) + > Values of the variable + + + Changed items (object): + + New optional properties: + - `value` + + * Changed property `value` (string) + > The value of the variable + + +##### `POST` /api/rest/2.0/vcs/git/config/create + + +##### `POST` /api/rest/2.0/vcs/git/config/search + + +##### `POST` /api/rest/2.0/vcs/git/config/update + + +##### `POST` /api/rest/2.0/schedules/create + + +###### Request: + +Changed content type : `application/json` + +* Added property `personalised_view_id` (string) + > Personalised view id of the liveboard to be scheduled. + + +###### Return Type: + +Changed response : **200 OK** +> Schedule successfully created. + + +* Changed content type : `application/json` + + * Added property `personalised_view_id` (string) + > Personalised view id of the liveboard to be scheduled. + + +##### `POST` /api/rest/2.0/schedules/search + + +###### Return Type: + +Changed response : **200 OK** +> Schedule search result. + + +* Changed content type : `application/json` + + Changed items (object): + + * Added property `personalised_view_id` (string) + > Personalised view id of the liveboard to be scheduled. + + +##### `POST` /api/rest/2.0/connection/search + + diff --git a/sdks/java/.github/workflows/maven.yml b/sdks/java/.github/workflows/maven.yml new file mode 100644 index 000000000..584f24acb --- /dev/null +++ b/sdks/java/.github/workflows/maven.yml @@ -0,0 +1,30 @@ +# This workflow will build a Java project with Maven, and cache/restore any dependencies to improve the workflow execution time +# For more information see: https://help.github.com/actions/language-and-framework-guides/building-and-testing-java-with-maven +# +# This file is auto-generated by OpenAPI Generator (https://openapi-generator.tech) + +name: Java CI with Maven + +on: + push: + branches: [ main, master ] + pull_request: + branches: [ main, master ] + +jobs: + build: + name: Build ThoughtSpot Public REST API + runs-on: ubuntu-latest + strategy: + matrix: + java: [ 17, 21 ] + steps: + - uses: actions/checkout@v4 + - name: Set up JDK + uses: actions/setup-java@v4 + with: + java-version: ${{ matrix.java }} + distribution: 'temurin' + cache: maven + - name: Build with Maven + run: mvn -B package --no-transfer-progress --file pom.xml diff --git a/sdks/java/.gitignore b/sdks/java/.gitignore new file mode 100644 index 000000000..b7430997d --- /dev/null +++ b/sdks/java/.gitignore @@ -0,0 +1,24 @@ +*.class + +# Mobile Tools for Java (J2ME) +.mtj.tmp/ + +# Package Files # +*.jar +*.war +*.ear + +# exclude jar for gradle wrapper +!gradle/wrapper/*.jar + +# virtual machine crash logs, see http://www.java.com/en/download/help/error_hotspot.xml +hs_err_pid* + +# build files +**/target +target +.gradle +build + +# publishing credentials +**/publishing_credentials/ diff --git a/sdks/java/.openapi-generator-ignore b/sdks/java/.openapi-generator-ignore new file mode 100755 index 000000000..afa4804e9 --- /dev/null +++ b/sdks/java/.openapi-generator-ignore @@ -0,0 +1,7 @@ +# OpenAPI Generator Ignore +# Generated by openapi-generator https://github.com/openapitools/openapi-generator + +# apis/Class[0-9][0-9][0-9]*.* +# Class[0-9][0-9][0-9]*.* + +tests/customTests/**/*.ts diff --git a/sdks/java/.openapi-generator/FILES b/sdks/java/.openapi-generator/FILES new file mode 100644 index 000000000..5dc6e5943 --- /dev/null +++ b/sdks/java/.openapi-generator/FILES @@ -0,0 +1,1382 @@ +.github/workflows/maven.yml +.gitignore +.travis.yml +README.md +api/openapi.yaml +build.gradle +build.sbt +docs/AIContext.md +docs/APIKey.md +docs/APIKeyInput.md +docs/AccessToken.md +docs/ActionConfig.md +docs/ActionConfigInput.md +docs/ActionConfigInputCreate.md +docs/ActionDetails.md +docs/ActionDetailsInput.md +docs/ActionDetailsInputCreate.md +docs/ActivateUserRequest.md +docs/AgentConversation.md +docs/AiApi.md +docs/AnswerContent.md +docs/AnswerDataResponse.md +docs/AnswerPngOptionsInput.md +docs/AssignChangeAuthorRequest.md +docs/AssignTagRequest.md +docs/AssociateMetadataInput.md +docs/AssociateMetadataInputCreate.md +docs/AuthClusterPreferences.md +docs/AuthClusterPreferencesInput.md +docs/AuthOrgInfo.md +docs/AuthOrgPreference.md +docs/AuthOrgPreferenceInput.md +docs/AuthSettingsAccessToken.md +docs/Authentication.md +docs/AuthenticationApi.md +docs/AuthenticationInput.md +docs/Author.md +docs/AuthorMetadataTypeInput.md +docs/AuthorType.md +docs/AwsS3Config.md +docs/AwsS3ConfigInput.md +docs/BasicAuth.md +docs/BasicAuthInput.md +docs/CALLBACK.md +docs/CALLBACKInput.md +docs/CALLBACKInputMandatory.md +docs/CalendarResponse.md +docs/ChangeUserPasswordRequest.md +docs/ChannelHistoryEventInfo.md +docs/ChannelHistoryEventInput.md +docs/ChannelHistoryJob.md +docs/ChannelValidationAwsS3Info.md +docs/ChannelValidationDetail.md +docs/ClusterNonEmbedAccess.md +docs/ClusterNonEmbedAccessInput.md +docs/Collection.md +docs/CollectionDeleteResponse.md +docs/CollectionDeleteTypeIdentifiers.md +docs/CollectionEntityIdentifier.md +docs/CollectionMetadataInput.md +docs/CollectionMetadataItem.md +docs/CollectionSearchResponse.md +docs/CollectionsApi.md +docs/Column.md +docs/ColumnSecurityRule.md +docs/ColumnSecurityRuleColumn.md +docs/ColumnSecurityRuleGroup.md +docs/ColumnSecurityRuleGroupOperation.md +docs/ColumnSecurityRuleResponse.md +docs/ColumnSecurityRuleSourceTable.md +docs/ColumnSecurityRuleTableInput.md +docs/ColumnSecurityRuleUpdate.md +docs/CommitBranchRequest.md +docs/CommitFileType.md +docs/CommitHistoryResponse.md +docs/CommitResponse.md +docs/CommiterType.md +docs/CommunicationChannelPreferencesResponse.md +docs/CommunicationChannelValidateResponse.md +docs/ConfigureAuthSettingsRequest.md +docs/ConfigureCommunicationChannelPreferencesRequest.md +docs/ConfigureSecuritySettingsRequest.md +docs/ConnectionConfigurationResponse.md +docs/ConnectionConfigurationSearchRequest.md +docs/ConnectionConfigurationsApi.md +docs/ConnectionInput.md +docs/ConnectionsApi.md +docs/ContextPayloadV2Input.md +docs/Conversation.md +docs/ConversationSettingsInput.md +docs/ConvertWorksheetToModelRequest.md +docs/CopyObjectRequest.md +docs/CreateAgentConversationRequest.md +docs/CreateCalendarRequest.md +docs/CreateCollectionRequest.md +docs/CreateConfigRequest.md +docs/CreateConnectionConfigurationRequest.md +docs/CreateConnectionRequest.md +docs/CreateConnectionResponse.md +docs/CreateConversationRequest.md +docs/CreateCustomActionRequest.md +docs/CreateEmailCustomizationRequest.md +docs/CreateEmailCustomizationResponse.md +docs/CreateOrgRequest.md +docs/CreateRoleRequest.md +docs/CreateScheduleRequest.md +docs/CreateTagRequest.md +docs/CreateUserGroupRequest.md +docs/CreateUserRequest.md +docs/CreateVariableRequest.md +docs/CreateWebhookConfigurationRequest.md +docs/CronExpression.md +docs/CronExpressionInput.md +docs/CspSettings.md +docs/CspSettingsInput.md +docs/CustomActionApi.md +docs/CustomActionMetadataTypeInput.md +docs/CustomCalendarsApi.md +docs/DataApi.md +docs/DataSource.md +docs/DataSourceContextInput.md +docs/DataWarehouseObjectInput.md +docs/DataWarehouseObjects.md +docs/Database.md +docs/DbtApi.md +docs/DbtSearchResponse.md +docs/DeactivateUserRequest.md +docs/DefaultActionConfig.md +docs/DefaultActionConfigInput.md +docs/DefaultActionConfigInputCreate.md +docs/DefaultActionConfigSearchInput.md +docs/DeleteCollectionRequest.md +docs/DeleteConfigRequest.md +docs/DeleteConnectionConfigurationRequest.md +docs/DeleteConnectionRequest.md +docs/DeleteMetadataRequest.md +docs/DeleteMetadataTypeInput.md +docs/DeleteOrgEmailCustomizationRequest.md +docs/DeleteVariablesRequest.md +docs/DeleteWebhookConfigurationsRequest.md +docs/DeployCommitRequest.md +docs/DeployResponse.md +docs/EmailCustomizationApi.md +docs/EntityHeader.md +docs/ErrorResponse.md +docs/EurekaDataSourceSuggestionResponse.md +docs/EurekaDecomposeQueryResponse.md +docs/EurekaGetNLInstructionsResponse.md +docs/EurekaGetRelevantQuestionsResponse.md +docs/EurekaLLMDecomposeQueryResponse.md +docs/EurekaLLMSuggestedQuery.md +docs/EurekaRelevantQuestion.md +docs/EurekaSetNLInstructionsResponse.md +docs/EventChannelConfig.md +docs/EventChannelConfigInput.md +docs/ExcludeMetadataListItemInput.md +docs/ExportAnswerReportRequest.md +docs/ExportLiveboardReportRequest.md +docs/ExportMetadataTMLBatchedRequest.md +docs/ExportMetadataTMLRequest.md +docs/ExportMetadataTypeInput.md +docs/ExportOptions.md +docs/ExternalTableInput.md +docs/FavoriteMetadataInput.md +docs/FavoriteMetadataItem.md +docs/FavoriteObjectOptionsInput.md +docs/FetchAnswerDataRequest.md +docs/FetchAnswerSqlQueryRequest.md +docs/FetchAsyncImportTaskStatusRequest.md +docs/FetchColumnSecurityRulesRequest.md +docs/FetchConnectionDiffStatusResponse.md +docs/FetchLiveboardDataRequest.md +docs/FetchLiveboardSqlQueryRequest.md +docs/FetchLogsRequest.md +docs/FetchObjectPrivilegesRequest.md +docs/FetchPermissionsOfPrincipalsRequest.md +docs/FetchPermissionsOnMetadataRequest.md +docs/FilterRules.md +docs/ForceLogoutUsersRequest.md +docs/Frequency.md +docs/FrequencyInput.md +docs/GenerateCSVRequest.md +docs/GenericInfo.md +docs/GetAsyncImportStatusResponse.md +docs/GetCustomAccessTokenRequest.md +docs/GetDataSourceSuggestionsRequest.md +docs/GetFullAccessTokenRequest.md +docs/GetNLInstructionsRequest.md +docs/GetObjectAccessTokenRequest.md +docs/GetRelevantQuestionsRequest.md +docs/GetTokenResponse.md +docs/GroupInfo.md +docs/GroupObject.md +docs/GroupsApi.md +docs/GroupsImportListInput.md +docs/HeaderAttributeInput.md +docs/HeaderUpdateInput.md +docs/ImportEPackAsyncTaskStatus.md +docs/ImportMetadataTMLAsyncRequest.md +docs/ImportMetadataTMLRequest.md +docs/ImportUser.md +docs/ImportUserGroupsRequest.md +docs/ImportUserGroupsResponse.md +docs/ImportUserType.md +docs/ImportUsersRequest.md +docs/ImportUsersResponse.md +docs/InputEurekaNLSRequest.md +docs/JWTMetadataObject.md +docs/JWTParameter.md +docs/JWTUserOptions.md +docs/JWTUserOptionsFull.md +docs/JobRecipient.md +docs/JobsApi.md +docs/LiveboardContent.md +docs/LiveboardDataResponse.md +docs/LiveboardOptions.md +docs/LiveboardOptionsInput.md +docs/LogApi.md +docs/LogResponse.md +docs/LoginRequest.md +docs/ManageObjectPrivilegeRequest.md +docs/MetadataApi.md +docs/MetadataAssociationItem.md +docs/MetadataContext.md +docs/MetadataInput.md +docs/MetadataListItemInput.md +docs/MetadataObject.md +docs/MetadataResponse.md +docs/MetadataSearchResponse.md +docs/MetadataSearchSortOptions.md +docs/ModelTableList.md +docs/NLInstructionsInfo.md +docs/NLInstructionsInfoInput.md +docs/ObjectIDAndName.md +docs/ObjectPrivilegesMetadataInput.md +docs/ObjectPrivilegesOfMetadataResponse.md +docs/Org.md +docs/OrgChannelConfigInput.md +docs/OrgChannelConfigResponse.md +docs/OrgDetails.md +docs/OrgInfo.md +docs/OrgNonEmbedAccess.md +docs/OrgNonEmbedAccessInput.md +docs/OrgPreferenceSearchCriteriaInput.md +docs/OrgResponse.md +docs/OrgType.md +docs/OrgsApi.md +docs/ParameterValues.md +docs/ParameterizeMetadataFieldsRequest.md +docs/ParameterizeMetadataRequest.md +docs/ParametersListItem.md +docs/ParametersListItemInput.md +docs/PdfOptions.md +docs/PdfOptionsInput.md +docs/PermissionInput.md +docs/PermissionOfMetadataResponse.md +docs/PermissionOfPrincipalsResponse.md +docs/PermissionsMetadataTypeInput.md +docs/PngOptionsInput.md +docs/PolicyProcessOptions.md +docs/PolicyProcessOptionsInput.md +docs/PrincipalsInput.md +docs/PrincipalsListItem.md +docs/PrincipalsListItemInput.md +docs/PublishMetadataListItem.md +docs/PublishMetadataRequest.md +docs/PutVariableValuesRequest.md +docs/QueryGetDecomposedQueryRequest.md +docs/RecipientDetails.md +docs/RecipientDetailsInput.md +docs/RegionalSettingsInput.md +docs/RepoConfigObject.md +docs/ReportsApi.md +docs/ResetUserPasswordRequest.md +docs/ResponseActivationURL.md +docs/ResponseCopyObject.md +docs/ResponseCustomAction.md +docs/ResponseFailedEntities.md +docs/ResponseFailedEntity.md +docs/ResponseIncompleteEntities.md +docs/ResponseIncompleteEntity.md +docs/ResponseMessage.md +docs/ResponsePostUpgradeFailedEntities.md +docs/ResponsePostUpgradeFailedEntity.md +docs/ResponseSchedule.md +docs/ResponseScheduleRun.md +docs/ResponseSuccessfulEntities.md +docs/ResponseSuccessfulEntity.md +docs/ResponseWorksheetToModelConversion.md +docs/RevertCommitRequest.md +docs/RevertResponse.md +docs/RevertedMetadata.md +docs/RevokeRefreshTokensRequest.md +docs/RevokeRefreshTokensResponse.md +docs/RevokeTokenRequest.md +docs/RiseGQLArgWrapper.md +docs/RiseSetter.md +docs/Role.md +docs/RoleResponse.md +docs/RolesApi.md +docs/RuntimeFilter.md +docs/RuntimeFilters.md +docs/RuntimeParamOverride.md +docs/RuntimeParameters.md +docs/RuntimeSort.md +docs/RuntimeSorts.md +docs/ScheduleHistoryRunsOptionsInput.md +docs/SchedulesApi.md +docs/SchedulesPdfOptionsInput.md +docs/SchemaObject.md +docs/Scope.md +docs/ScriptSrcUrls.md +docs/ScriptSrcUrlsInput.md +docs/SearchAuthSettingsRequest.md +docs/SearchAuthSettingsResponse.md +docs/SearchCalendarsRequest.md +docs/SearchChannelHistoryRequest.md +docs/SearchChannelHistoryResponse.md +docs/SearchCollectionsRequest.md +docs/SearchCommitsRequest.md +docs/SearchCommunicationChannelPreferencesRequest.md +docs/SearchConfigRequest.md +docs/SearchConnectionRequest.md +docs/SearchConnectionResponse.md +docs/SearchCustomActionsRequest.md +docs/SearchDataRequest.md +docs/SearchDataResponse.md +docs/SearchEmailCustomizationRequest.md +docs/SearchMetadataRequest.md +docs/SearchOrgsRequest.md +docs/SearchRoleResponse.md +docs/SearchRolesRequest.md +docs/SearchSchedulesRequest.md +docs/SearchSecuritySettingsRequest.md +docs/SearchTagsRequest.md +docs/SearchUserGroupsRequest.md +docs/SearchUsersRequest.md +docs/SearchVariablesRequest.md +docs/SearchWebhookConfigurationsRequest.md +docs/SecurityApi.md +docs/SecuritySettingsClusterPreferences.md +docs/SecuritySettingsClusterPreferencesInput.md +docs/SecuritySettingsOrgDetails.md +docs/SecuritySettingsOrgPreferences.md +docs/SecuritySettingsOrgPreferencesInput.md +docs/SecuritySettingsResponse.md +docs/SendAgentConversationMessageRequest.md +docs/SendAgentConversationMessageStreamingRequest.md +docs/SendAgentMessageRequest.md +docs/SendAgentMessageResponse.md +docs/SendAgentMessageStreamingRequest.md +docs/SendMessageRequest.md +docs/SetNLInstructionsRequest.md +docs/ShareMetadataRequest.md +docs/ShareMetadataTypeInput.md +docs/SharePermissionsInput.md +docs/SingleAnswerRequest.md +docs/SortOption.md +docs/SortOptionInput.md +docs/SortOptions.md +docs/SortingOptions.md +docs/SqlQuery.md +docs/SqlQueryResponse.md +docs/StorageConfig.md +docs/StorageConfigInput.md +docs/StorageDestination.md +docs/StorageDestinationInput.md +docs/SyncMetadataRequest.md +docs/SyncMetadataResponse.md +docs/SystemApi.md +docs/SystemConfig.md +docs/SystemInfo.md +docs/SystemOverrideInfo.md +docs/Table.md +docs/Tag.md +docs/TagMetadataTypeInput.md +docs/TagsApi.md +docs/TemplatePropertiesInputCreate.md +docs/ThoughtSpotRestApi.md +docs/Token.md +docs/TokenAccessScopeObject.md +docs/TokenValidationResponse.md +docs/URL.md +docs/URLInput.md +docs/URLInputMandatory.md +docs/UnassignTagRequest.md +docs/UnparameterizeMetadataRequest.md +docs/UnpublishMetadataRequest.md +docs/UpdateCalendarRequest.md +docs/UpdateCollectionRequest.md +docs/UpdateColumnSecurityRulesRequest.md +docs/UpdateConfigRequest.md +docs/UpdateConnectionConfigurationRequest.md +docs/UpdateConnectionRequest.md +docs/UpdateConnectionStatusRequest.md +docs/UpdateConnectionV2Request.md +docs/UpdateCustomActionRequest.md +docs/UpdateEmailCustomizationRequest.md +docs/UpdateMetadataHeaderRequest.md +docs/UpdateMetadataObjIdRequest.md +docs/UpdateObjIdInput.md +docs/UpdateOrgRequest.md +docs/UpdateRoleRequest.md +docs/UpdateScheduleRequest.md +docs/UpdateSystemConfigRequest.md +docs/UpdateTagRequest.md +docs/UpdateUserGroupRequest.md +docs/UpdateUserRequest.md +docs/UpdateVariableRequest.md +docs/UpdateVariableValuesRequest.md +docs/UpdateWebhookConfigurationRequest.md +docs/User.md +docs/UserGroup.md +docs/UserGroupResponse.md +docs/UserInfo.md +docs/UserObject.md +docs/UserParameterOptions.md +docs/UserPrincipal.md +docs/UsersApi.md +docs/ValidateCommunicationChannelRequest.md +docs/ValidateMergeRequest.md +docs/ValidateTokenRequest.md +docs/ValueScopeInput.md +docs/Variable.md +docs/VariableApi.md +docs/VariableDetailInput.md +docs/VariableOrgInfo.md +docs/VariablePutAssignmentInput.md +docs/VariableUpdateAssignmentInput.md +docs/VariableUpdateScopeInput.md +docs/VariableValue.md +docs/VariableValues.md +docs/VersionControlApi.md +docs/WebhookAuthApiKey.md +docs/WebhookAuthApiKeyInput.md +docs/WebhookAuthBasicAuth.md +docs/WebhookAuthBasicAuthInput.md +docs/WebhookAuthOAuth2.md +docs/WebhookAuthOAuth2Input.md +docs/WebhookAuthentication.md +docs/WebhookAuthenticationInput.md +docs/WebhookDeleteFailure.md +docs/WebhookDeleteResponse.md +docs/WebhookKeyValuePair.md +docs/WebhookKeyValuePairInput.md +docs/WebhookOrg.md +docs/WebhookPagination.md +docs/WebhookResponse.md +docs/WebhookSearchResponse.md +docs/WebhookSignatureVerification.md +docs/WebhookSignatureVerificationInput.md +docs/WebhookSortOptionsInput.md +docs/WebhookUser.md +docs/WebhooksApi.md +git_push.sh +gradle.properties +gradle/wrapper/gradle-wrapper.jar +gradle/wrapper/gradle-wrapper.properties +gradlew +gradlew.bat +pom.xml +publishing_credentials/ossrh_password.txt +publishing_credentials/ossrh_username.txt +publishing_credentials/signing_key_id.txt +publishing_credentials/signing_password.txt +publishing_credentials/signing_secret_key.asc +settings.gradle +src/main/AndroidManifest.xml +src/main/java/com/thoughtspot/client/ApiCallback.java +src/main/java/com/thoughtspot/client/ApiClient.java +src/main/java/com/thoughtspot/client/ApiClientConfiguration.java +src/main/java/com/thoughtspot/client/ApiException.java +src/main/java/com/thoughtspot/client/ApiResponse.java +src/main/java/com/thoughtspot/client/Configuration.java +src/main/java/com/thoughtspot/client/GzipRequestInterceptor.java +src/main/java/com/thoughtspot/client/JSON.java +src/main/java/com/thoughtspot/client/Pair.java +src/main/java/com/thoughtspot/client/ProgressRequestBody.java +src/main/java/com/thoughtspot/client/ProgressResponseBody.java +src/main/java/com/thoughtspot/client/ServerConfiguration.java +src/main/java/com/thoughtspot/client/ServerVariable.java +src/main/java/com/thoughtspot/client/StringUtil.java +src/main/java/com/thoughtspot/client/api/AiApi.java +src/main/java/com/thoughtspot/client/api/AuthenticationApi.java +src/main/java/com/thoughtspot/client/api/CollectionsApi.java +src/main/java/com/thoughtspot/client/api/ConnectionConfigurationsApi.java +src/main/java/com/thoughtspot/client/api/ConnectionsApi.java +src/main/java/com/thoughtspot/client/api/CustomActionApi.java +src/main/java/com/thoughtspot/client/api/CustomCalendarsApi.java +src/main/java/com/thoughtspot/client/api/DataApi.java +src/main/java/com/thoughtspot/client/api/DbtApi.java +src/main/java/com/thoughtspot/client/api/EmailCustomizationApi.java +src/main/java/com/thoughtspot/client/api/GroupsApi.java +src/main/java/com/thoughtspot/client/api/JobsApi.java +src/main/java/com/thoughtspot/client/api/LogApi.java +src/main/java/com/thoughtspot/client/api/MetadataApi.java +src/main/java/com/thoughtspot/client/api/OrgsApi.java +src/main/java/com/thoughtspot/client/api/ReportsApi.java +src/main/java/com/thoughtspot/client/api/RolesApi.java +src/main/java/com/thoughtspot/client/api/SchedulesApi.java +src/main/java/com/thoughtspot/client/api/SecurityApi.java +src/main/java/com/thoughtspot/client/api/SystemApi.java +src/main/java/com/thoughtspot/client/api/TagsApi.java +src/main/java/com/thoughtspot/client/api/ThoughtSpotRestApi.java +src/main/java/com/thoughtspot/client/api/UsersApi.java +src/main/java/com/thoughtspot/client/api/VariableApi.java +src/main/java/com/thoughtspot/client/api/VersionControlApi.java +src/main/java/com/thoughtspot/client/api/WebhooksApi.java +src/main/java/com/thoughtspot/client/auth/ApiKeyAuth.java +src/main/java/com/thoughtspot/client/auth/Authentication.java +src/main/java/com/thoughtspot/client/auth/HttpBasicAuth.java +src/main/java/com/thoughtspot/client/auth/HttpBearerAuth.java +src/main/java/com/thoughtspot/client/model/AIContext.java +src/main/java/com/thoughtspot/client/model/APIKey.java +src/main/java/com/thoughtspot/client/model/APIKeyInput.java +src/main/java/com/thoughtspot/client/model/AbstractOpenApiSchema.java +src/main/java/com/thoughtspot/client/model/AccessToken.java +src/main/java/com/thoughtspot/client/model/ActionConfig.java +src/main/java/com/thoughtspot/client/model/ActionConfigInput.java +src/main/java/com/thoughtspot/client/model/ActionConfigInputCreate.java +src/main/java/com/thoughtspot/client/model/ActionDetails.java +src/main/java/com/thoughtspot/client/model/ActionDetailsInput.java +src/main/java/com/thoughtspot/client/model/ActionDetailsInputCreate.java +src/main/java/com/thoughtspot/client/model/ActivateUserRequest.java +src/main/java/com/thoughtspot/client/model/AgentConversation.java +src/main/java/com/thoughtspot/client/model/AnswerContent.java +src/main/java/com/thoughtspot/client/model/AnswerDataResponse.java +src/main/java/com/thoughtspot/client/model/AnswerPngOptionsInput.java +src/main/java/com/thoughtspot/client/model/AssignChangeAuthorRequest.java +src/main/java/com/thoughtspot/client/model/AssignTagRequest.java +src/main/java/com/thoughtspot/client/model/AssociateMetadataInput.java +src/main/java/com/thoughtspot/client/model/AssociateMetadataInputCreate.java +src/main/java/com/thoughtspot/client/model/AuthClusterPreferences.java +src/main/java/com/thoughtspot/client/model/AuthClusterPreferencesInput.java +src/main/java/com/thoughtspot/client/model/AuthOrgInfo.java +src/main/java/com/thoughtspot/client/model/AuthOrgPreference.java +src/main/java/com/thoughtspot/client/model/AuthOrgPreferenceInput.java +src/main/java/com/thoughtspot/client/model/AuthSettingsAccessToken.java +src/main/java/com/thoughtspot/client/model/Authentication.java +src/main/java/com/thoughtspot/client/model/AuthenticationInput.java +src/main/java/com/thoughtspot/client/model/Author.java +src/main/java/com/thoughtspot/client/model/AuthorMetadataTypeInput.java +src/main/java/com/thoughtspot/client/model/AuthorType.java +src/main/java/com/thoughtspot/client/model/AwsS3Config.java +src/main/java/com/thoughtspot/client/model/AwsS3ConfigInput.java +src/main/java/com/thoughtspot/client/model/BasicAuth.java +src/main/java/com/thoughtspot/client/model/BasicAuthInput.java +src/main/java/com/thoughtspot/client/model/CALLBACK.java +src/main/java/com/thoughtspot/client/model/CALLBACKInput.java +src/main/java/com/thoughtspot/client/model/CALLBACKInputMandatory.java +src/main/java/com/thoughtspot/client/model/CalendarResponse.java +src/main/java/com/thoughtspot/client/model/ChangeUserPasswordRequest.java +src/main/java/com/thoughtspot/client/model/ChannelHistoryEventInfo.java +src/main/java/com/thoughtspot/client/model/ChannelHistoryEventInput.java +src/main/java/com/thoughtspot/client/model/ChannelHistoryJob.java +src/main/java/com/thoughtspot/client/model/ChannelValidationAwsS3Info.java +src/main/java/com/thoughtspot/client/model/ChannelValidationDetail.java +src/main/java/com/thoughtspot/client/model/ClusterNonEmbedAccess.java +src/main/java/com/thoughtspot/client/model/ClusterNonEmbedAccessInput.java +src/main/java/com/thoughtspot/client/model/Collection.java +src/main/java/com/thoughtspot/client/model/CollectionDeleteResponse.java +src/main/java/com/thoughtspot/client/model/CollectionDeleteTypeIdentifiers.java +src/main/java/com/thoughtspot/client/model/CollectionEntityIdentifier.java +src/main/java/com/thoughtspot/client/model/CollectionMetadataInput.java +src/main/java/com/thoughtspot/client/model/CollectionMetadataItem.java +src/main/java/com/thoughtspot/client/model/CollectionSearchResponse.java +src/main/java/com/thoughtspot/client/model/Column.java +src/main/java/com/thoughtspot/client/model/ColumnSecurityRule.java +src/main/java/com/thoughtspot/client/model/ColumnSecurityRuleColumn.java +src/main/java/com/thoughtspot/client/model/ColumnSecurityRuleGroup.java +src/main/java/com/thoughtspot/client/model/ColumnSecurityRuleGroupOperation.java +src/main/java/com/thoughtspot/client/model/ColumnSecurityRuleResponse.java +src/main/java/com/thoughtspot/client/model/ColumnSecurityRuleSourceTable.java +src/main/java/com/thoughtspot/client/model/ColumnSecurityRuleTableInput.java +src/main/java/com/thoughtspot/client/model/ColumnSecurityRuleUpdate.java +src/main/java/com/thoughtspot/client/model/CommitBranchRequest.java +src/main/java/com/thoughtspot/client/model/CommitFileType.java +src/main/java/com/thoughtspot/client/model/CommitHistoryResponse.java +src/main/java/com/thoughtspot/client/model/CommitResponse.java +src/main/java/com/thoughtspot/client/model/CommiterType.java +src/main/java/com/thoughtspot/client/model/CommunicationChannelPreferencesResponse.java +src/main/java/com/thoughtspot/client/model/CommunicationChannelValidateResponse.java +src/main/java/com/thoughtspot/client/model/ConfigureAuthSettingsRequest.java +src/main/java/com/thoughtspot/client/model/ConfigureCommunicationChannelPreferencesRequest.java +src/main/java/com/thoughtspot/client/model/ConfigureSecuritySettingsRequest.java +src/main/java/com/thoughtspot/client/model/ConnectionConfigurationResponse.java +src/main/java/com/thoughtspot/client/model/ConnectionConfigurationSearchRequest.java +src/main/java/com/thoughtspot/client/model/ConnectionInput.java +src/main/java/com/thoughtspot/client/model/ContextPayloadV2Input.java +src/main/java/com/thoughtspot/client/model/Conversation.java +src/main/java/com/thoughtspot/client/model/ConversationSettingsInput.java +src/main/java/com/thoughtspot/client/model/ConvertWorksheetToModelRequest.java +src/main/java/com/thoughtspot/client/model/CopyObjectRequest.java +src/main/java/com/thoughtspot/client/model/CreateAgentConversationRequest.java +src/main/java/com/thoughtspot/client/model/CreateCalendarRequest.java +src/main/java/com/thoughtspot/client/model/CreateCollectionRequest.java +src/main/java/com/thoughtspot/client/model/CreateConfigRequest.java +src/main/java/com/thoughtspot/client/model/CreateConnectionConfigurationRequest.java +src/main/java/com/thoughtspot/client/model/CreateConnectionRequest.java +src/main/java/com/thoughtspot/client/model/CreateConnectionResponse.java +src/main/java/com/thoughtspot/client/model/CreateConversationRequest.java +src/main/java/com/thoughtspot/client/model/CreateCustomActionRequest.java +src/main/java/com/thoughtspot/client/model/CreateEmailCustomizationRequest.java +src/main/java/com/thoughtspot/client/model/CreateEmailCustomizationResponse.java +src/main/java/com/thoughtspot/client/model/CreateOrgRequest.java +src/main/java/com/thoughtspot/client/model/CreateRoleRequest.java +src/main/java/com/thoughtspot/client/model/CreateScheduleRequest.java +src/main/java/com/thoughtspot/client/model/CreateTagRequest.java +src/main/java/com/thoughtspot/client/model/CreateUserGroupRequest.java +src/main/java/com/thoughtspot/client/model/CreateUserRequest.java +src/main/java/com/thoughtspot/client/model/CreateVariableRequest.java +src/main/java/com/thoughtspot/client/model/CreateWebhookConfigurationRequest.java +src/main/java/com/thoughtspot/client/model/CronExpression.java +src/main/java/com/thoughtspot/client/model/CronExpressionInput.java +src/main/java/com/thoughtspot/client/model/CspSettings.java +src/main/java/com/thoughtspot/client/model/CspSettingsInput.java +src/main/java/com/thoughtspot/client/model/CustomActionMetadataTypeInput.java +src/main/java/com/thoughtspot/client/model/DataSource.java +src/main/java/com/thoughtspot/client/model/DataSourceContextInput.java +src/main/java/com/thoughtspot/client/model/DataWarehouseObjectInput.java +src/main/java/com/thoughtspot/client/model/DataWarehouseObjects.java +src/main/java/com/thoughtspot/client/model/Database.java +src/main/java/com/thoughtspot/client/model/DbtSearchResponse.java +src/main/java/com/thoughtspot/client/model/DeactivateUserRequest.java +src/main/java/com/thoughtspot/client/model/DefaultActionConfig.java +src/main/java/com/thoughtspot/client/model/DefaultActionConfigInput.java +src/main/java/com/thoughtspot/client/model/DefaultActionConfigInputCreate.java +src/main/java/com/thoughtspot/client/model/DefaultActionConfigSearchInput.java +src/main/java/com/thoughtspot/client/model/DeleteCollectionRequest.java +src/main/java/com/thoughtspot/client/model/DeleteConfigRequest.java +src/main/java/com/thoughtspot/client/model/DeleteConnectionConfigurationRequest.java +src/main/java/com/thoughtspot/client/model/DeleteConnectionRequest.java +src/main/java/com/thoughtspot/client/model/DeleteMetadataRequest.java +src/main/java/com/thoughtspot/client/model/DeleteMetadataTypeInput.java +src/main/java/com/thoughtspot/client/model/DeleteOrgEmailCustomizationRequest.java +src/main/java/com/thoughtspot/client/model/DeleteVariablesRequest.java +src/main/java/com/thoughtspot/client/model/DeleteWebhookConfigurationsRequest.java +src/main/java/com/thoughtspot/client/model/DeployCommitRequest.java +src/main/java/com/thoughtspot/client/model/DeployResponse.java +src/main/java/com/thoughtspot/client/model/EntityHeader.java +src/main/java/com/thoughtspot/client/model/ErrorResponse.java +src/main/java/com/thoughtspot/client/model/EurekaDataSourceSuggestionResponse.java +src/main/java/com/thoughtspot/client/model/EurekaDecomposeQueryResponse.java +src/main/java/com/thoughtspot/client/model/EurekaGetNLInstructionsResponse.java +src/main/java/com/thoughtspot/client/model/EurekaGetRelevantQuestionsResponse.java +src/main/java/com/thoughtspot/client/model/EurekaLLMDecomposeQueryResponse.java +src/main/java/com/thoughtspot/client/model/EurekaLLMSuggestedQuery.java +src/main/java/com/thoughtspot/client/model/EurekaRelevantQuestion.java +src/main/java/com/thoughtspot/client/model/EurekaSetNLInstructionsResponse.java +src/main/java/com/thoughtspot/client/model/EventChannelConfig.java +src/main/java/com/thoughtspot/client/model/EventChannelConfigInput.java +src/main/java/com/thoughtspot/client/model/ExcludeMetadataListItemInput.java +src/main/java/com/thoughtspot/client/model/ExportAnswerReportRequest.java +src/main/java/com/thoughtspot/client/model/ExportLiveboardReportRequest.java +src/main/java/com/thoughtspot/client/model/ExportMetadataTMLBatchedRequest.java +src/main/java/com/thoughtspot/client/model/ExportMetadataTMLRequest.java +src/main/java/com/thoughtspot/client/model/ExportMetadataTypeInput.java +src/main/java/com/thoughtspot/client/model/ExportOptions.java +src/main/java/com/thoughtspot/client/model/ExternalTableInput.java +src/main/java/com/thoughtspot/client/model/FavoriteMetadataInput.java +src/main/java/com/thoughtspot/client/model/FavoriteMetadataItem.java +src/main/java/com/thoughtspot/client/model/FavoriteObjectOptionsInput.java +src/main/java/com/thoughtspot/client/model/FetchAnswerDataRequest.java +src/main/java/com/thoughtspot/client/model/FetchAnswerSqlQueryRequest.java +src/main/java/com/thoughtspot/client/model/FetchAsyncImportTaskStatusRequest.java +src/main/java/com/thoughtspot/client/model/FetchColumnSecurityRulesRequest.java +src/main/java/com/thoughtspot/client/model/FetchConnectionDiffStatusResponse.java +src/main/java/com/thoughtspot/client/model/FetchLiveboardDataRequest.java +src/main/java/com/thoughtspot/client/model/FetchLiveboardSqlQueryRequest.java +src/main/java/com/thoughtspot/client/model/FetchLogsRequest.java +src/main/java/com/thoughtspot/client/model/FetchObjectPrivilegesRequest.java +src/main/java/com/thoughtspot/client/model/FetchPermissionsOfPrincipalsRequest.java +src/main/java/com/thoughtspot/client/model/FetchPermissionsOnMetadataRequest.java +src/main/java/com/thoughtspot/client/model/FilterRules.java +src/main/java/com/thoughtspot/client/model/ForceLogoutUsersRequest.java +src/main/java/com/thoughtspot/client/model/Frequency.java +src/main/java/com/thoughtspot/client/model/FrequencyInput.java +src/main/java/com/thoughtspot/client/model/GenerateCSVRequest.java +src/main/java/com/thoughtspot/client/model/GenericInfo.java +src/main/java/com/thoughtspot/client/model/GetAsyncImportStatusResponse.java +src/main/java/com/thoughtspot/client/model/GetCustomAccessTokenRequest.java +src/main/java/com/thoughtspot/client/model/GetDataSourceSuggestionsRequest.java +src/main/java/com/thoughtspot/client/model/GetFullAccessTokenRequest.java +src/main/java/com/thoughtspot/client/model/GetNLInstructionsRequest.java +src/main/java/com/thoughtspot/client/model/GetObjectAccessTokenRequest.java +src/main/java/com/thoughtspot/client/model/GetRelevantQuestionsRequest.java +src/main/java/com/thoughtspot/client/model/GetTokenResponse.java +src/main/java/com/thoughtspot/client/model/GroupInfo.java +src/main/java/com/thoughtspot/client/model/GroupObject.java +src/main/java/com/thoughtspot/client/model/GroupsImportListInput.java +src/main/java/com/thoughtspot/client/model/HeaderAttributeInput.java +src/main/java/com/thoughtspot/client/model/HeaderUpdateInput.java +src/main/java/com/thoughtspot/client/model/ImportEPackAsyncTaskStatus.java +src/main/java/com/thoughtspot/client/model/ImportMetadataTMLAsyncRequest.java +src/main/java/com/thoughtspot/client/model/ImportMetadataTMLRequest.java +src/main/java/com/thoughtspot/client/model/ImportUser.java +src/main/java/com/thoughtspot/client/model/ImportUserGroupsRequest.java +src/main/java/com/thoughtspot/client/model/ImportUserGroupsResponse.java +src/main/java/com/thoughtspot/client/model/ImportUserType.java +src/main/java/com/thoughtspot/client/model/ImportUsersRequest.java +src/main/java/com/thoughtspot/client/model/ImportUsersResponse.java +src/main/java/com/thoughtspot/client/model/InputEurekaNLSRequest.java +src/main/java/com/thoughtspot/client/model/JWTMetadataObject.java +src/main/java/com/thoughtspot/client/model/JWTParameter.java +src/main/java/com/thoughtspot/client/model/JWTUserOptions.java +src/main/java/com/thoughtspot/client/model/JWTUserOptionsFull.java +src/main/java/com/thoughtspot/client/model/JobRecipient.java +src/main/java/com/thoughtspot/client/model/LiveboardContent.java +src/main/java/com/thoughtspot/client/model/LiveboardDataResponse.java +src/main/java/com/thoughtspot/client/model/LiveboardOptions.java +src/main/java/com/thoughtspot/client/model/LiveboardOptionsInput.java +src/main/java/com/thoughtspot/client/model/LogResponse.java +src/main/java/com/thoughtspot/client/model/LoginRequest.java +src/main/java/com/thoughtspot/client/model/ManageObjectPrivilegeRequest.java +src/main/java/com/thoughtspot/client/model/MetadataAssociationItem.java +src/main/java/com/thoughtspot/client/model/MetadataContext.java +src/main/java/com/thoughtspot/client/model/MetadataInput.java +src/main/java/com/thoughtspot/client/model/MetadataListItemInput.java +src/main/java/com/thoughtspot/client/model/MetadataObject.java +src/main/java/com/thoughtspot/client/model/MetadataResponse.java +src/main/java/com/thoughtspot/client/model/MetadataSearchResponse.java +src/main/java/com/thoughtspot/client/model/MetadataSearchSortOptions.java +src/main/java/com/thoughtspot/client/model/ModelTableList.java +src/main/java/com/thoughtspot/client/model/NLInstructionsInfo.java +src/main/java/com/thoughtspot/client/model/NLInstructionsInfoInput.java +src/main/java/com/thoughtspot/client/model/ObjectIDAndName.java +src/main/java/com/thoughtspot/client/model/ObjectPrivilegesMetadataInput.java +src/main/java/com/thoughtspot/client/model/ObjectPrivilegesOfMetadataResponse.java +src/main/java/com/thoughtspot/client/model/Org.java +src/main/java/com/thoughtspot/client/model/OrgChannelConfigInput.java +src/main/java/com/thoughtspot/client/model/OrgChannelConfigResponse.java +src/main/java/com/thoughtspot/client/model/OrgDetails.java +src/main/java/com/thoughtspot/client/model/OrgInfo.java +src/main/java/com/thoughtspot/client/model/OrgNonEmbedAccess.java +src/main/java/com/thoughtspot/client/model/OrgNonEmbedAccessInput.java +src/main/java/com/thoughtspot/client/model/OrgPreferenceSearchCriteriaInput.java +src/main/java/com/thoughtspot/client/model/OrgResponse.java +src/main/java/com/thoughtspot/client/model/OrgType.java +src/main/java/com/thoughtspot/client/model/ParameterValues.java +src/main/java/com/thoughtspot/client/model/ParameterizeMetadataFieldsRequest.java +src/main/java/com/thoughtspot/client/model/ParameterizeMetadataRequest.java +src/main/java/com/thoughtspot/client/model/ParametersListItem.java +src/main/java/com/thoughtspot/client/model/ParametersListItemInput.java +src/main/java/com/thoughtspot/client/model/PdfOptions.java +src/main/java/com/thoughtspot/client/model/PdfOptionsInput.java +src/main/java/com/thoughtspot/client/model/PermissionInput.java +src/main/java/com/thoughtspot/client/model/PermissionOfMetadataResponse.java +src/main/java/com/thoughtspot/client/model/PermissionOfPrincipalsResponse.java +src/main/java/com/thoughtspot/client/model/PermissionsMetadataTypeInput.java +src/main/java/com/thoughtspot/client/model/PngOptionsInput.java +src/main/java/com/thoughtspot/client/model/PolicyProcessOptions.java +src/main/java/com/thoughtspot/client/model/PolicyProcessOptionsInput.java +src/main/java/com/thoughtspot/client/model/PrincipalsInput.java +src/main/java/com/thoughtspot/client/model/PrincipalsListItem.java +src/main/java/com/thoughtspot/client/model/PrincipalsListItemInput.java +src/main/java/com/thoughtspot/client/model/PublishMetadataListItem.java +src/main/java/com/thoughtspot/client/model/PublishMetadataRequest.java +src/main/java/com/thoughtspot/client/model/PutVariableValuesRequest.java +src/main/java/com/thoughtspot/client/model/QueryGetDecomposedQueryRequest.java +src/main/java/com/thoughtspot/client/model/RecipientDetails.java +src/main/java/com/thoughtspot/client/model/RecipientDetailsInput.java +src/main/java/com/thoughtspot/client/model/RegionalSettingsInput.java +src/main/java/com/thoughtspot/client/model/RepoConfigObject.java +src/main/java/com/thoughtspot/client/model/ResetUserPasswordRequest.java +src/main/java/com/thoughtspot/client/model/ResponseActivationURL.java +src/main/java/com/thoughtspot/client/model/ResponseCopyObject.java +src/main/java/com/thoughtspot/client/model/ResponseCustomAction.java +src/main/java/com/thoughtspot/client/model/ResponseFailedEntities.java +src/main/java/com/thoughtspot/client/model/ResponseFailedEntity.java +src/main/java/com/thoughtspot/client/model/ResponseIncompleteEntities.java +src/main/java/com/thoughtspot/client/model/ResponseIncompleteEntity.java +src/main/java/com/thoughtspot/client/model/ResponseMessage.java +src/main/java/com/thoughtspot/client/model/ResponsePostUpgradeFailedEntities.java +src/main/java/com/thoughtspot/client/model/ResponsePostUpgradeFailedEntity.java +src/main/java/com/thoughtspot/client/model/ResponseSchedule.java +src/main/java/com/thoughtspot/client/model/ResponseScheduleRun.java +src/main/java/com/thoughtspot/client/model/ResponseSuccessfulEntities.java +src/main/java/com/thoughtspot/client/model/ResponseSuccessfulEntity.java +src/main/java/com/thoughtspot/client/model/ResponseWorksheetToModelConversion.java +src/main/java/com/thoughtspot/client/model/RevertCommitRequest.java +src/main/java/com/thoughtspot/client/model/RevertResponse.java +src/main/java/com/thoughtspot/client/model/RevertedMetadata.java +src/main/java/com/thoughtspot/client/model/RevokeRefreshTokensRequest.java +src/main/java/com/thoughtspot/client/model/RevokeRefreshTokensResponse.java +src/main/java/com/thoughtspot/client/model/RevokeTokenRequest.java +src/main/java/com/thoughtspot/client/model/RiseGQLArgWrapper.java +src/main/java/com/thoughtspot/client/model/RiseSetter.java +src/main/java/com/thoughtspot/client/model/Role.java +src/main/java/com/thoughtspot/client/model/RoleResponse.java +src/main/java/com/thoughtspot/client/model/RuntimeFilter.java +src/main/java/com/thoughtspot/client/model/RuntimeFilters.java +src/main/java/com/thoughtspot/client/model/RuntimeParamOverride.java +src/main/java/com/thoughtspot/client/model/RuntimeParameters.java +src/main/java/com/thoughtspot/client/model/RuntimeSort.java +src/main/java/com/thoughtspot/client/model/RuntimeSorts.java +src/main/java/com/thoughtspot/client/model/ScheduleHistoryRunsOptionsInput.java +src/main/java/com/thoughtspot/client/model/SchedulesPdfOptionsInput.java +src/main/java/com/thoughtspot/client/model/SchemaObject.java +src/main/java/com/thoughtspot/client/model/Scope.java +src/main/java/com/thoughtspot/client/model/ScriptSrcUrls.java +src/main/java/com/thoughtspot/client/model/ScriptSrcUrlsInput.java +src/main/java/com/thoughtspot/client/model/SearchAuthSettingsRequest.java +src/main/java/com/thoughtspot/client/model/SearchAuthSettingsResponse.java +src/main/java/com/thoughtspot/client/model/SearchCalendarsRequest.java +src/main/java/com/thoughtspot/client/model/SearchChannelHistoryRequest.java +src/main/java/com/thoughtspot/client/model/SearchChannelHistoryResponse.java +src/main/java/com/thoughtspot/client/model/SearchCollectionsRequest.java +src/main/java/com/thoughtspot/client/model/SearchCommitsRequest.java +src/main/java/com/thoughtspot/client/model/SearchCommunicationChannelPreferencesRequest.java +src/main/java/com/thoughtspot/client/model/SearchConfigRequest.java +src/main/java/com/thoughtspot/client/model/SearchConnectionRequest.java +src/main/java/com/thoughtspot/client/model/SearchConnectionResponse.java +src/main/java/com/thoughtspot/client/model/SearchCustomActionsRequest.java +src/main/java/com/thoughtspot/client/model/SearchDataRequest.java +src/main/java/com/thoughtspot/client/model/SearchDataResponse.java +src/main/java/com/thoughtspot/client/model/SearchEmailCustomizationRequest.java +src/main/java/com/thoughtspot/client/model/SearchMetadataRequest.java +src/main/java/com/thoughtspot/client/model/SearchOrgsRequest.java +src/main/java/com/thoughtspot/client/model/SearchRoleResponse.java +src/main/java/com/thoughtspot/client/model/SearchRolesRequest.java +src/main/java/com/thoughtspot/client/model/SearchSchedulesRequest.java +src/main/java/com/thoughtspot/client/model/SearchSecuritySettingsRequest.java +src/main/java/com/thoughtspot/client/model/SearchTagsRequest.java +src/main/java/com/thoughtspot/client/model/SearchUserGroupsRequest.java +src/main/java/com/thoughtspot/client/model/SearchUsersRequest.java +src/main/java/com/thoughtspot/client/model/SearchVariablesRequest.java +src/main/java/com/thoughtspot/client/model/SearchWebhookConfigurationsRequest.java +src/main/java/com/thoughtspot/client/model/SecuritySettingsClusterPreferences.java +src/main/java/com/thoughtspot/client/model/SecuritySettingsClusterPreferencesInput.java +src/main/java/com/thoughtspot/client/model/SecuritySettingsOrgDetails.java +src/main/java/com/thoughtspot/client/model/SecuritySettingsOrgPreferences.java +src/main/java/com/thoughtspot/client/model/SecuritySettingsOrgPreferencesInput.java +src/main/java/com/thoughtspot/client/model/SecuritySettingsResponse.java +src/main/java/com/thoughtspot/client/model/SendAgentConversationMessageRequest.java +src/main/java/com/thoughtspot/client/model/SendAgentConversationMessageStreamingRequest.java +src/main/java/com/thoughtspot/client/model/SendAgentMessageRequest.java +src/main/java/com/thoughtspot/client/model/SendAgentMessageResponse.java +src/main/java/com/thoughtspot/client/model/SendAgentMessageStreamingRequest.java +src/main/java/com/thoughtspot/client/model/SendMessageRequest.java +src/main/java/com/thoughtspot/client/model/SetNLInstructionsRequest.java +src/main/java/com/thoughtspot/client/model/ShareMetadataRequest.java +src/main/java/com/thoughtspot/client/model/ShareMetadataTypeInput.java +src/main/java/com/thoughtspot/client/model/SharePermissionsInput.java +src/main/java/com/thoughtspot/client/model/SingleAnswerRequest.java +src/main/java/com/thoughtspot/client/model/SortOption.java +src/main/java/com/thoughtspot/client/model/SortOptionInput.java +src/main/java/com/thoughtspot/client/model/SortOptions.java +src/main/java/com/thoughtspot/client/model/SortingOptions.java +src/main/java/com/thoughtspot/client/model/SqlQuery.java +src/main/java/com/thoughtspot/client/model/SqlQueryResponse.java +src/main/java/com/thoughtspot/client/model/StorageConfig.java +src/main/java/com/thoughtspot/client/model/StorageConfigInput.java +src/main/java/com/thoughtspot/client/model/StorageDestination.java +src/main/java/com/thoughtspot/client/model/StorageDestinationInput.java +src/main/java/com/thoughtspot/client/model/SyncMetadataRequest.java +src/main/java/com/thoughtspot/client/model/SyncMetadataResponse.java +src/main/java/com/thoughtspot/client/model/SystemConfig.java +src/main/java/com/thoughtspot/client/model/SystemInfo.java +src/main/java/com/thoughtspot/client/model/SystemOverrideInfo.java +src/main/java/com/thoughtspot/client/model/Table.java +src/main/java/com/thoughtspot/client/model/Tag.java +src/main/java/com/thoughtspot/client/model/TagMetadataTypeInput.java +src/main/java/com/thoughtspot/client/model/TemplatePropertiesInputCreate.java +src/main/java/com/thoughtspot/client/model/Token.java +src/main/java/com/thoughtspot/client/model/TokenAccessScopeObject.java +src/main/java/com/thoughtspot/client/model/TokenValidationResponse.java +src/main/java/com/thoughtspot/client/model/URL.java +src/main/java/com/thoughtspot/client/model/URLInput.java +src/main/java/com/thoughtspot/client/model/URLInputMandatory.java +src/main/java/com/thoughtspot/client/model/UnassignTagRequest.java +src/main/java/com/thoughtspot/client/model/UnparameterizeMetadataRequest.java +src/main/java/com/thoughtspot/client/model/UnpublishMetadataRequest.java +src/main/java/com/thoughtspot/client/model/UpdateCalendarRequest.java +src/main/java/com/thoughtspot/client/model/UpdateCollectionRequest.java +src/main/java/com/thoughtspot/client/model/UpdateColumnSecurityRulesRequest.java +src/main/java/com/thoughtspot/client/model/UpdateConfigRequest.java +src/main/java/com/thoughtspot/client/model/UpdateConnectionConfigurationRequest.java +src/main/java/com/thoughtspot/client/model/UpdateConnectionRequest.java +src/main/java/com/thoughtspot/client/model/UpdateConnectionStatusRequest.java +src/main/java/com/thoughtspot/client/model/UpdateConnectionV2Request.java +src/main/java/com/thoughtspot/client/model/UpdateCustomActionRequest.java +src/main/java/com/thoughtspot/client/model/UpdateEmailCustomizationRequest.java +src/main/java/com/thoughtspot/client/model/UpdateMetadataHeaderRequest.java +src/main/java/com/thoughtspot/client/model/UpdateMetadataObjIdRequest.java +src/main/java/com/thoughtspot/client/model/UpdateObjIdInput.java +src/main/java/com/thoughtspot/client/model/UpdateOrgRequest.java +src/main/java/com/thoughtspot/client/model/UpdateRoleRequest.java +src/main/java/com/thoughtspot/client/model/UpdateScheduleRequest.java +src/main/java/com/thoughtspot/client/model/UpdateSystemConfigRequest.java +src/main/java/com/thoughtspot/client/model/UpdateTagRequest.java +src/main/java/com/thoughtspot/client/model/UpdateUserGroupRequest.java +src/main/java/com/thoughtspot/client/model/UpdateUserRequest.java +src/main/java/com/thoughtspot/client/model/UpdateVariableRequest.java +src/main/java/com/thoughtspot/client/model/UpdateVariableValuesRequest.java +src/main/java/com/thoughtspot/client/model/UpdateWebhookConfigurationRequest.java +src/main/java/com/thoughtspot/client/model/User.java +src/main/java/com/thoughtspot/client/model/UserGroup.java +src/main/java/com/thoughtspot/client/model/UserGroupResponse.java +src/main/java/com/thoughtspot/client/model/UserInfo.java +src/main/java/com/thoughtspot/client/model/UserObject.java +src/main/java/com/thoughtspot/client/model/UserParameterOptions.java +src/main/java/com/thoughtspot/client/model/UserPrincipal.java +src/main/java/com/thoughtspot/client/model/ValidateCommunicationChannelRequest.java +src/main/java/com/thoughtspot/client/model/ValidateMergeRequest.java +src/main/java/com/thoughtspot/client/model/ValidateTokenRequest.java +src/main/java/com/thoughtspot/client/model/ValueScopeInput.java +src/main/java/com/thoughtspot/client/model/Variable.java +src/main/java/com/thoughtspot/client/model/VariableDetailInput.java +src/main/java/com/thoughtspot/client/model/VariableOrgInfo.java +src/main/java/com/thoughtspot/client/model/VariablePutAssignmentInput.java +src/main/java/com/thoughtspot/client/model/VariableUpdateAssignmentInput.java +src/main/java/com/thoughtspot/client/model/VariableUpdateScopeInput.java +src/main/java/com/thoughtspot/client/model/VariableValue.java +src/main/java/com/thoughtspot/client/model/VariableValues.java +src/main/java/com/thoughtspot/client/model/WebhookAuthApiKey.java +src/main/java/com/thoughtspot/client/model/WebhookAuthApiKeyInput.java +src/main/java/com/thoughtspot/client/model/WebhookAuthBasicAuth.java +src/main/java/com/thoughtspot/client/model/WebhookAuthBasicAuthInput.java +src/main/java/com/thoughtspot/client/model/WebhookAuthOAuth2.java +src/main/java/com/thoughtspot/client/model/WebhookAuthOAuth2Input.java +src/main/java/com/thoughtspot/client/model/WebhookAuthentication.java +src/main/java/com/thoughtspot/client/model/WebhookAuthenticationInput.java +src/main/java/com/thoughtspot/client/model/WebhookDeleteFailure.java +src/main/java/com/thoughtspot/client/model/WebhookDeleteResponse.java +src/main/java/com/thoughtspot/client/model/WebhookKeyValuePair.java +src/main/java/com/thoughtspot/client/model/WebhookKeyValuePairInput.java +src/main/java/com/thoughtspot/client/model/WebhookOrg.java +src/main/java/com/thoughtspot/client/model/WebhookPagination.java +src/main/java/com/thoughtspot/client/model/WebhookResponse.java +src/main/java/com/thoughtspot/client/model/WebhookSearchResponse.java +src/main/java/com/thoughtspot/client/model/WebhookSignatureVerification.java +src/main/java/com/thoughtspot/client/model/WebhookSignatureVerificationInput.java +src/main/java/com/thoughtspot/client/model/WebhookSortOptionsInput.java +src/main/java/com/thoughtspot/client/model/WebhookUser.java +src/test/java/com/thoughtspot/client/api/AiApiTest.java +src/test/java/com/thoughtspot/client/api/AuthenticationApiTest.java +src/test/java/com/thoughtspot/client/api/CollectionsApiTest.java +src/test/java/com/thoughtspot/client/api/ConnectionConfigurationsApiTest.java +src/test/java/com/thoughtspot/client/api/ConnectionsApiTest.java +src/test/java/com/thoughtspot/client/api/CustomActionApiTest.java +src/test/java/com/thoughtspot/client/api/CustomCalendarsApiTest.java +src/test/java/com/thoughtspot/client/api/DataApiTest.java +src/test/java/com/thoughtspot/client/api/DbtApiTest.java +src/test/java/com/thoughtspot/client/api/EmailCustomizationApiTest.java +src/test/java/com/thoughtspot/client/api/GroupsApiTest.java +src/test/java/com/thoughtspot/client/api/JobsApiTest.java +src/test/java/com/thoughtspot/client/api/LogApiTest.java +src/test/java/com/thoughtspot/client/api/MetadataApiTest.java +src/test/java/com/thoughtspot/client/api/OrgsApiTest.java +src/test/java/com/thoughtspot/client/api/ReportsApiTest.java +src/test/java/com/thoughtspot/client/api/RolesApiTest.java +src/test/java/com/thoughtspot/client/api/SchedulesApiTest.java +src/test/java/com/thoughtspot/client/api/SecurityApiTest.java +src/test/java/com/thoughtspot/client/api/SystemApiTest.java +src/test/java/com/thoughtspot/client/api/TagsApiTest.java +src/test/java/com/thoughtspot/client/api/ThoughtSpotRestApiTest.java +src/test/java/com/thoughtspot/client/api/UsersApiTest.java +src/test/java/com/thoughtspot/client/api/VariableApiTest.java +src/test/java/com/thoughtspot/client/api/VersionControlApiTest.java +src/test/java/com/thoughtspot/client/api/WebhooksApiTest.java +src/test/java/com/thoughtspot/client/model/AIContextTest.java +src/test/java/com/thoughtspot/client/model/APIKeyInputTest.java +src/test/java/com/thoughtspot/client/model/APIKeyTest.java +src/test/java/com/thoughtspot/client/model/AccessTokenTest.java +src/test/java/com/thoughtspot/client/model/ActionConfigInputCreateTest.java +src/test/java/com/thoughtspot/client/model/ActionConfigInputTest.java +src/test/java/com/thoughtspot/client/model/ActionConfigTest.java +src/test/java/com/thoughtspot/client/model/ActionDetailsInputCreateTest.java +src/test/java/com/thoughtspot/client/model/ActionDetailsInputTest.java +src/test/java/com/thoughtspot/client/model/ActionDetailsTest.java +src/test/java/com/thoughtspot/client/model/ActivateUserRequestTest.java +src/test/java/com/thoughtspot/client/model/AgentConversationTest.java +src/test/java/com/thoughtspot/client/model/AnswerContentTest.java +src/test/java/com/thoughtspot/client/model/AnswerDataResponseTest.java +src/test/java/com/thoughtspot/client/model/AnswerPngOptionsInputTest.java +src/test/java/com/thoughtspot/client/model/AssignChangeAuthorRequestTest.java +src/test/java/com/thoughtspot/client/model/AssignTagRequestTest.java +src/test/java/com/thoughtspot/client/model/AssociateMetadataInputCreateTest.java +src/test/java/com/thoughtspot/client/model/AssociateMetadataInputTest.java +src/test/java/com/thoughtspot/client/model/AuthClusterPreferencesInputTest.java +src/test/java/com/thoughtspot/client/model/AuthClusterPreferencesTest.java +src/test/java/com/thoughtspot/client/model/AuthOrgInfoTest.java +src/test/java/com/thoughtspot/client/model/AuthOrgPreferenceInputTest.java +src/test/java/com/thoughtspot/client/model/AuthOrgPreferenceTest.java +src/test/java/com/thoughtspot/client/model/AuthSettingsAccessTokenTest.java +src/test/java/com/thoughtspot/client/model/AuthenticationInputTest.java +src/test/java/com/thoughtspot/client/model/AuthenticationTest.java +src/test/java/com/thoughtspot/client/model/AuthorMetadataTypeInputTest.java +src/test/java/com/thoughtspot/client/model/AuthorTest.java +src/test/java/com/thoughtspot/client/model/AuthorTypeTest.java +src/test/java/com/thoughtspot/client/model/AwsS3ConfigInputTest.java +src/test/java/com/thoughtspot/client/model/AwsS3ConfigTest.java +src/test/java/com/thoughtspot/client/model/BasicAuthInputTest.java +src/test/java/com/thoughtspot/client/model/BasicAuthTest.java +src/test/java/com/thoughtspot/client/model/CALLBACKInputMandatoryTest.java +src/test/java/com/thoughtspot/client/model/CALLBACKInputTest.java +src/test/java/com/thoughtspot/client/model/CALLBACKTest.java +src/test/java/com/thoughtspot/client/model/CalendarResponseTest.java +src/test/java/com/thoughtspot/client/model/ChangeUserPasswordRequestTest.java +src/test/java/com/thoughtspot/client/model/ChannelHistoryEventInfoTest.java +src/test/java/com/thoughtspot/client/model/ChannelHistoryEventInputTest.java +src/test/java/com/thoughtspot/client/model/ChannelHistoryJobTest.java +src/test/java/com/thoughtspot/client/model/ChannelValidationAwsS3InfoTest.java +src/test/java/com/thoughtspot/client/model/ChannelValidationDetailTest.java +src/test/java/com/thoughtspot/client/model/ClusterNonEmbedAccessInputTest.java +src/test/java/com/thoughtspot/client/model/ClusterNonEmbedAccessTest.java +src/test/java/com/thoughtspot/client/model/CollectionDeleteResponseTest.java +src/test/java/com/thoughtspot/client/model/CollectionDeleteTypeIdentifiersTest.java +src/test/java/com/thoughtspot/client/model/CollectionEntityIdentifierTest.java +src/test/java/com/thoughtspot/client/model/CollectionMetadataInputTest.java +src/test/java/com/thoughtspot/client/model/CollectionMetadataItemTest.java +src/test/java/com/thoughtspot/client/model/CollectionSearchResponseTest.java +src/test/java/com/thoughtspot/client/model/CollectionTest.java +src/test/java/com/thoughtspot/client/model/ColumnSecurityRuleColumnTest.java +src/test/java/com/thoughtspot/client/model/ColumnSecurityRuleGroupOperationTest.java +src/test/java/com/thoughtspot/client/model/ColumnSecurityRuleGroupTest.java +src/test/java/com/thoughtspot/client/model/ColumnSecurityRuleResponseTest.java +src/test/java/com/thoughtspot/client/model/ColumnSecurityRuleSourceTableTest.java +src/test/java/com/thoughtspot/client/model/ColumnSecurityRuleTableInputTest.java +src/test/java/com/thoughtspot/client/model/ColumnSecurityRuleTest.java +src/test/java/com/thoughtspot/client/model/ColumnSecurityRuleUpdateTest.java +src/test/java/com/thoughtspot/client/model/ColumnTest.java +src/test/java/com/thoughtspot/client/model/CommitBranchRequestTest.java +src/test/java/com/thoughtspot/client/model/CommitFileTypeTest.java +src/test/java/com/thoughtspot/client/model/CommitHistoryResponseTest.java +src/test/java/com/thoughtspot/client/model/CommitResponseTest.java +src/test/java/com/thoughtspot/client/model/CommiterTypeTest.java +src/test/java/com/thoughtspot/client/model/CommunicationChannelPreferencesResponseTest.java +src/test/java/com/thoughtspot/client/model/CommunicationChannelValidateResponseTest.java +src/test/java/com/thoughtspot/client/model/ConfigureAuthSettingsRequestTest.java +src/test/java/com/thoughtspot/client/model/ConfigureCommunicationChannelPreferencesRequestTest.java +src/test/java/com/thoughtspot/client/model/ConfigureSecuritySettingsRequestTest.java +src/test/java/com/thoughtspot/client/model/ConnectionConfigurationResponseTest.java +src/test/java/com/thoughtspot/client/model/ConnectionConfigurationSearchRequestTest.java +src/test/java/com/thoughtspot/client/model/ConnectionInputTest.java +src/test/java/com/thoughtspot/client/model/ContextPayloadV2InputTest.java +src/test/java/com/thoughtspot/client/model/ConversationSettingsInputTest.java +src/test/java/com/thoughtspot/client/model/ConversationTest.java +src/test/java/com/thoughtspot/client/model/ConvertWorksheetToModelRequestTest.java +src/test/java/com/thoughtspot/client/model/CopyObjectRequestTest.java +src/test/java/com/thoughtspot/client/model/CreateAgentConversationRequestTest.java +src/test/java/com/thoughtspot/client/model/CreateCalendarRequestTest.java +src/test/java/com/thoughtspot/client/model/CreateCollectionRequestTest.java +src/test/java/com/thoughtspot/client/model/CreateConfigRequestTest.java +src/test/java/com/thoughtspot/client/model/CreateConnectionConfigurationRequestTest.java +src/test/java/com/thoughtspot/client/model/CreateConnectionRequestTest.java +src/test/java/com/thoughtspot/client/model/CreateConnectionResponseTest.java +src/test/java/com/thoughtspot/client/model/CreateConversationRequestTest.java +src/test/java/com/thoughtspot/client/model/CreateCustomActionRequestTest.java +src/test/java/com/thoughtspot/client/model/CreateEmailCustomizationRequestTest.java +src/test/java/com/thoughtspot/client/model/CreateEmailCustomizationResponseTest.java +src/test/java/com/thoughtspot/client/model/CreateOrgRequestTest.java +src/test/java/com/thoughtspot/client/model/CreateRoleRequestTest.java +src/test/java/com/thoughtspot/client/model/CreateScheduleRequestTest.java +src/test/java/com/thoughtspot/client/model/CreateTagRequestTest.java +src/test/java/com/thoughtspot/client/model/CreateUserGroupRequestTest.java +src/test/java/com/thoughtspot/client/model/CreateUserRequestTest.java +src/test/java/com/thoughtspot/client/model/CreateVariableRequestTest.java +src/test/java/com/thoughtspot/client/model/CreateWebhookConfigurationRequestTest.java +src/test/java/com/thoughtspot/client/model/CronExpressionInputTest.java +src/test/java/com/thoughtspot/client/model/CronExpressionTest.java +src/test/java/com/thoughtspot/client/model/CspSettingsInputTest.java +src/test/java/com/thoughtspot/client/model/CspSettingsTest.java +src/test/java/com/thoughtspot/client/model/CustomActionMetadataTypeInputTest.java +src/test/java/com/thoughtspot/client/model/DataSourceContextInputTest.java +src/test/java/com/thoughtspot/client/model/DataSourceTest.java +src/test/java/com/thoughtspot/client/model/DataWarehouseObjectInputTest.java +src/test/java/com/thoughtspot/client/model/DataWarehouseObjectsTest.java +src/test/java/com/thoughtspot/client/model/DatabaseTest.java +src/test/java/com/thoughtspot/client/model/DbtSearchResponseTest.java +src/test/java/com/thoughtspot/client/model/DeactivateUserRequestTest.java +src/test/java/com/thoughtspot/client/model/DefaultActionConfigInputCreateTest.java +src/test/java/com/thoughtspot/client/model/DefaultActionConfigInputTest.java +src/test/java/com/thoughtspot/client/model/DefaultActionConfigSearchInputTest.java +src/test/java/com/thoughtspot/client/model/DefaultActionConfigTest.java +src/test/java/com/thoughtspot/client/model/DeleteCollectionRequestTest.java +src/test/java/com/thoughtspot/client/model/DeleteConfigRequestTest.java +src/test/java/com/thoughtspot/client/model/DeleteConnectionConfigurationRequestTest.java +src/test/java/com/thoughtspot/client/model/DeleteConnectionRequestTest.java +src/test/java/com/thoughtspot/client/model/DeleteMetadataRequestTest.java +src/test/java/com/thoughtspot/client/model/DeleteMetadataTypeInputTest.java +src/test/java/com/thoughtspot/client/model/DeleteOrgEmailCustomizationRequestTest.java +src/test/java/com/thoughtspot/client/model/DeleteVariablesRequestTest.java +src/test/java/com/thoughtspot/client/model/DeleteWebhookConfigurationsRequestTest.java +src/test/java/com/thoughtspot/client/model/DeployCommitRequestTest.java +src/test/java/com/thoughtspot/client/model/DeployResponseTest.java +src/test/java/com/thoughtspot/client/model/EntityHeaderTest.java +src/test/java/com/thoughtspot/client/model/ErrorResponseTest.java +src/test/java/com/thoughtspot/client/model/EurekaDataSourceSuggestionResponseTest.java +src/test/java/com/thoughtspot/client/model/EurekaDecomposeQueryResponseTest.java +src/test/java/com/thoughtspot/client/model/EurekaGetNLInstructionsResponseTest.java +src/test/java/com/thoughtspot/client/model/EurekaGetRelevantQuestionsResponseTest.java +src/test/java/com/thoughtspot/client/model/EurekaLLMDecomposeQueryResponseTest.java +src/test/java/com/thoughtspot/client/model/EurekaLLMSuggestedQueryTest.java +src/test/java/com/thoughtspot/client/model/EurekaRelevantQuestionTest.java +src/test/java/com/thoughtspot/client/model/EurekaSetNLInstructionsResponseTest.java +src/test/java/com/thoughtspot/client/model/EventChannelConfigInputTest.java +src/test/java/com/thoughtspot/client/model/EventChannelConfigTest.java +src/test/java/com/thoughtspot/client/model/ExcludeMetadataListItemInputTest.java +src/test/java/com/thoughtspot/client/model/ExportAnswerReportRequestTest.java +src/test/java/com/thoughtspot/client/model/ExportLiveboardReportRequestTest.java +src/test/java/com/thoughtspot/client/model/ExportMetadataTMLBatchedRequestTest.java +src/test/java/com/thoughtspot/client/model/ExportMetadataTMLRequestTest.java +src/test/java/com/thoughtspot/client/model/ExportMetadataTypeInputTest.java +src/test/java/com/thoughtspot/client/model/ExportOptionsTest.java +src/test/java/com/thoughtspot/client/model/ExternalTableInputTest.java +src/test/java/com/thoughtspot/client/model/FavoriteMetadataInputTest.java +src/test/java/com/thoughtspot/client/model/FavoriteMetadataItemTest.java +src/test/java/com/thoughtspot/client/model/FavoriteObjectOptionsInputTest.java +src/test/java/com/thoughtspot/client/model/FetchAnswerDataRequestTest.java +src/test/java/com/thoughtspot/client/model/FetchAnswerSqlQueryRequestTest.java +src/test/java/com/thoughtspot/client/model/FetchAsyncImportTaskStatusRequestTest.java +src/test/java/com/thoughtspot/client/model/FetchColumnSecurityRulesRequestTest.java +src/test/java/com/thoughtspot/client/model/FetchConnectionDiffStatusResponseTest.java +src/test/java/com/thoughtspot/client/model/FetchLiveboardDataRequestTest.java +src/test/java/com/thoughtspot/client/model/FetchLiveboardSqlQueryRequestTest.java +src/test/java/com/thoughtspot/client/model/FetchLogsRequestTest.java +src/test/java/com/thoughtspot/client/model/FetchObjectPrivilegesRequestTest.java +src/test/java/com/thoughtspot/client/model/FetchPermissionsOfPrincipalsRequestTest.java +src/test/java/com/thoughtspot/client/model/FetchPermissionsOnMetadataRequestTest.java +src/test/java/com/thoughtspot/client/model/FilterRulesTest.java +src/test/java/com/thoughtspot/client/model/ForceLogoutUsersRequestTest.java +src/test/java/com/thoughtspot/client/model/FrequencyInputTest.java +src/test/java/com/thoughtspot/client/model/FrequencyTest.java +src/test/java/com/thoughtspot/client/model/GenerateCSVRequestTest.java +src/test/java/com/thoughtspot/client/model/GenericInfoTest.java +src/test/java/com/thoughtspot/client/model/GetAsyncImportStatusResponseTest.java +src/test/java/com/thoughtspot/client/model/GetCustomAccessTokenRequestTest.java +src/test/java/com/thoughtspot/client/model/GetDataSourceSuggestionsRequestTest.java +src/test/java/com/thoughtspot/client/model/GetFullAccessTokenRequestTest.java +src/test/java/com/thoughtspot/client/model/GetNLInstructionsRequestTest.java +src/test/java/com/thoughtspot/client/model/GetObjectAccessTokenRequestTest.java +src/test/java/com/thoughtspot/client/model/GetRelevantQuestionsRequestTest.java +src/test/java/com/thoughtspot/client/model/GetTokenResponseTest.java +src/test/java/com/thoughtspot/client/model/GroupInfoTest.java +src/test/java/com/thoughtspot/client/model/GroupObjectTest.java +src/test/java/com/thoughtspot/client/model/GroupsImportListInputTest.java +src/test/java/com/thoughtspot/client/model/HeaderAttributeInputTest.java +src/test/java/com/thoughtspot/client/model/HeaderUpdateInputTest.java +src/test/java/com/thoughtspot/client/model/ImportEPackAsyncTaskStatusTest.java +src/test/java/com/thoughtspot/client/model/ImportMetadataTMLAsyncRequestTest.java +src/test/java/com/thoughtspot/client/model/ImportMetadataTMLRequestTest.java +src/test/java/com/thoughtspot/client/model/ImportUserGroupsRequestTest.java +src/test/java/com/thoughtspot/client/model/ImportUserGroupsResponseTest.java +src/test/java/com/thoughtspot/client/model/ImportUserTest.java +src/test/java/com/thoughtspot/client/model/ImportUserTypeTest.java +src/test/java/com/thoughtspot/client/model/ImportUsersRequestTest.java +src/test/java/com/thoughtspot/client/model/ImportUsersResponseTest.java +src/test/java/com/thoughtspot/client/model/InputEurekaNLSRequestTest.java +src/test/java/com/thoughtspot/client/model/JWTMetadataObjectTest.java +src/test/java/com/thoughtspot/client/model/JWTParameterTest.java +src/test/java/com/thoughtspot/client/model/JWTUserOptionsFullTest.java +src/test/java/com/thoughtspot/client/model/JWTUserOptionsTest.java +src/test/java/com/thoughtspot/client/model/JobRecipientTest.java +src/test/java/com/thoughtspot/client/model/LiveboardContentTest.java +src/test/java/com/thoughtspot/client/model/LiveboardDataResponseTest.java +src/test/java/com/thoughtspot/client/model/LiveboardOptionsInputTest.java +src/test/java/com/thoughtspot/client/model/LiveboardOptionsTest.java +src/test/java/com/thoughtspot/client/model/LogResponseTest.java +src/test/java/com/thoughtspot/client/model/LoginRequestTest.java +src/test/java/com/thoughtspot/client/model/ManageObjectPrivilegeRequestTest.java +src/test/java/com/thoughtspot/client/model/MetadataAssociationItemTest.java +src/test/java/com/thoughtspot/client/model/MetadataContextTest.java +src/test/java/com/thoughtspot/client/model/MetadataInputTest.java +src/test/java/com/thoughtspot/client/model/MetadataListItemInputTest.java +src/test/java/com/thoughtspot/client/model/MetadataObjectTest.java +src/test/java/com/thoughtspot/client/model/MetadataResponseTest.java +src/test/java/com/thoughtspot/client/model/MetadataSearchResponseTest.java +src/test/java/com/thoughtspot/client/model/MetadataSearchSortOptionsTest.java +src/test/java/com/thoughtspot/client/model/ModelTableListTest.java +src/test/java/com/thoughtspot/client/model/NLInstructionsInfoInputTest.java +src/test/java/com/thoughtspot/client/model/NLInstructionsInfoTest.java +src/test/java/com/thoughtspot/client/model/ObjectIDAndNameTest.java +src/test/java/com/thoughtspot/client/model/ObjectPrivilegesMetadataInputTest.java +src/test/java/com/thoughtspot/client/model/ObjectPrivilegesOfMetadataResponseTest.java +src/test/java/com/thoughtspot/client/model/OrgChannelConfigInputTest.java +src/test/java/com/thoughtspot/client/model/OrgChannelConfigResponseTest.java +src/test/java/com/thoughtspot/client/model/OrgDetailsTest.java +src/test/java/com/thoughtspot/client/model/OrgInfoTest.java +src/test/java/com/thoughtspot/client/model/OrgNonEmbedAccessInputTest.java +src/test/java/com/thoughtspot/client/model/OrgNonEmbedAccessTest.java +src/test/java/com/thoughtspot/client/model/OrgPreferenceSearchCriteriaInputTest.java +src/test/java/com/thoughtspot/client/model/OrgResponseTest.java +src/test/java/com/thoughtspot/client/model/OrgTest.java +src/test/java/com/thoughtspot/client/model/OrgTypeTest.java +src/test/java/com/thoughtspot/client/model/ParameterValuesTest.java +src/test/java/com/thoughtspot/client/model/ParameterizeMetadataFieldsRequestTest.java +src/test/java/com/thoughtspot/client/model/ParameterizeMetadataRequestTest.java +src/test/java/com/thoughtspot/client/model/ParametersListItemInputTest.java +src/test/java/com/thoughtspot/client/model/ParametersListItemTest.java +src/test/java/com/thoughtspot/client/model/PdfOptionsInputTest.java +src/test/java/com/thoughtspot/client/model/PdfOptionsTest.java +src/test/java/com/thoughtspot/client/model/PermissionInputTest.java +src/test/java/com/thoughtspot/client/model/PermissionOfMetadataResponseTest.java +src/test/java/com/thoughtspot/client/model/PermissionOfPrincipalsResponseTest.java +src/test/java/com/thoughtspot/client/model/PermissionsMetadataTypeInputTest.java +src/test/java/com/thoughtspot/client/model/PngOptionsInputTest.java +src/test/java/com/thoughtspot/client/model/PolicyProcessOptionsInputTest.java +src/test/java/com/thoughtspot/client/model/PolicyProcessOptionsTest.java +src/test/java/com/thoughtspot/client/model/PrincipalsInputTest.java +src/test/java/com/thoughtspot/client/model/PrincipalsListItemInputTest.java +src/test/java/com/thoughtspot/client/model/PrincipalsListItemTest.java +src/test/java/com/thoughtspot/client/model/PublishMetadataListItemTest.java +src/test/java/com/thoughtspot/client/model/PublishMetadataRequestTest.java +src/test/java/com/thoughtspot/client/model/PutVariableValuesRequestTest.java +src/test/java/com/thoughtspot/client/model/QueryGetDecomposedQueryRequestTest.java +src/test/java/com/thoughtspot/client/model/RecipientDetailsInputTest.java +src/test/java/com/thoughtspot/client/model/RecipientDetailsTest.java +src/test/java/com/thoughtspot/client/model/RegionalSettingsInputTest.java +src/test/java/com/thoughtspot/client/model/RepoConfigObjectTest.java +src/test/java/com/thoughtspot/client/model/ResetUserPasswordRequestTest.java +src/test/java/com/thoughtspot/client/model/ResponseActivationURLTest.java +src/test/java/com/thoughtspot/client/model/ResponseCopyObjectTest.java +src/test/java/com/thoughtspot/client/model/ResponseCustomActionTest.java +src/test/java/com/thoughtspot/client/model/ResponseFailedEntitiesTest.java +src/test/java/com/thoughtspot/client/model/ResponseFailedEntityTest.java +src/test/java/com/thoughtspot/client/model/ResponseIncompleteEntitiesTest.java +src/test/java/com/thoughtspot/client/model/ResponseIncompleteEntityTest.java +src/test/java/com/thoughtspot/client/model/ResponseMessageTest.java +src/test/java/com/thoughtspot/client/model/ResponsePostUpgradeFailedEntitiesTest.java +src/test/java/com/thoughtspot/client/model/ResponsePostUpgradeFailedEntityTest.java +src/test/java/com/thoughtspot/client/model/ResponseScheduleRunTest.java +src/test/java/com/thoughtspot/client/model/ResponseScheduleTest.java +src/test/java/com/thoughtspot/client/model/ResponseSuccessfulEntitiesTest.java +src/test/java/com/thoughtspot/client/model/ResponseSuccessfulEntityTest.java +src/test/java/com/thoughtspot/client/model/ResponseWorksheetToModelConversionTest.java +src/test/java/com/thoughtspot/client/model/RevertCommitRequestTest.java +src/test/java/com/thoughtspot/client/model/RevertResponseTest.java +src/test/java/com/thoughtspot/client/model/RevertedMetadataTest.java +src/test/java/com/thoughtspot/client/model/RevokeRefreshTokensRequestTest.java +src/test/java/com/thoughtspot/client/model/RevokeRefreshTokensResponseTest.java +src/test/java/com/thoughtspot/client/model/RevokeTokenRequestTest.java +src/test/java/com/thoughtspot/client/model/RiseGQLArgWrapperTest.java +src/test/java/com/thoughtspot/client/model/RiseSetterTest.java +src/test/java/com/thoughtspot/client/model/RoleResponseTest.java +src/test/java/com/thoughtspot/client/model/RoleTest.java +src/test/java/com/thoughtspot/client/model/RuntimeFilterTest.java +src/test/java/com/thoughtspot/client/model/RuntimeFiltersTest.java +src/test/java/com/thoughtspot/client/model/RuntimeParamOverrideTest.java +src/test/java/com/thoughtspot/client/model/RuntimeParametersTest.java +src/test/java/com/thoughtspot/client/model/RuntimeSortTest.java +src/test/java/com/thoughtspot/client/model/RuntimeSortsTest.java +src/test/java/com/thoughtspot/client/model/ScheduleHistoryRunsOptionsInputTest.java +src/test/java/com/thoughtspot/client/model/SchedulesPdfOptionsInputTest.java +src/test/java/com/thoughtspot/client/model/SchemaObjectTest.java +src/test/java/com/thoughtspot/client/model/ScopeTest.java +src/test/java/com/thoughtspot/client/model/ScriptSrcUrlsInputTest.java +src/test/java/com/thoughtspot/client/model/ScriptSrcUrlsTest.java +src/test/java/com/thoughtspot/client/model/SearchAuthSettingsRequestTest.java +src/test/java/com/thoughtspot/client/model/SearchAuthSettingsResponseTest.java +src/test/java/com/thoughtspot/client/model/SearchCalendarsRequestTest.java +src/test/java/com/thoughtspot/client/model/SearchChannelHistoryRequestTest.java +src/test/java/com/thoughtspot/client/model/SearchChannelHistoryResponseTest.java +src/test/java/com/thoughtspot/client/model/SearchCollectionsRequestTest.java +src/test/java/com/thoughtspot/client/model/SearchCommitsRequestTest.java +src/test/java/com/thoughtspot/client/model/SearchCommunicationChannelPreferencesRequestTest.java +src/test/java/com/thoughtspot/client/model/SearchConfigRequestTest.java +src/test/java/com/thoughtspot/client/model/SearchConnectionRequestTest.java +src/test/java/com/thoughtspot/client/model/SearchConnectionResponseTest.java +src/test/java/com/thoughtspot/client/model/SearchCustomActionsRequestTest.java +src/test/java/com/thoughtspot/client/model/SearchDataRequestTest.java +src/test/java/com/thoughtspot/client/model/SearchDataResponseTest.java +src/test/java/com/thoughtspot/client/model/SearchEmailCustomizationRequestTest.java +src/test/java/com/thoughtspot/client/model/SearchMetadataRequestTest.java +src/test/java/com/thoughtspot/client/model/SearchOrgsRequestTest.java +src/test/java/com/thoughtspot/client/model/SearchRoleResponseTest.java +src/test/java/com/thoughtspot/client/model/SearchRolesRequestTest.java +src/test/java/com/thoughtspot/client/model/SearchSchedulesRequestTest.java +src/test/java/com/thoughtspot/client/model/SearchSecuritySettingsRequestTest.java +src/test/java/com/thoughtspot/client/model/SearchTagsRequestTest.java +src/test/java/com/thoughtspot/client/model/SearchUserGroupsRequestTest.java +src/test/java/com/thoughtspot/client/model/SearchUsersRequestTest.java +src/test/java/com/thoughtspot/client/model/SearchVariablesRequestTest.java +src/test/java/com/thoughtspot/client/model/SearchWebhookConfigurationsRequestTest.java +src/test/java/com/thoughtspot/client/model/SecuritySettingsClusterPreferencesInputTest.java +src/test/java/com/thoughtspot/client/model/SecuritySettingsClusterPreferencesTest.java +src/test/java/com/thoughtspot/client/model/SecuritySettingsOrgDetailsTest.java +src/test/java/com/thoughtspot/client/model/SecuritySettingsOrgPreferencesInputTest.java +src/test/java/com/thoughtspot/client/model/SecuritySettingsOrgPreferencesTest.java +src/test/java/com/thoughtspot/client/model/SecuritySettingsResponseTest.java +src/test/java/com/thoughtspot/client/model/SendAgentConversationMessageRequestTest.java +src/test/java/com/thoughtspot/client/model/SendAgentConversationMessageStreamingRequestTest.java +src/test/java/com/thoughtspot/client/model/SendAgentMessageRequestTest.java +src/test/java/com/thoughtspot/client/model/SendAgentMessageResponseTest.java +src/test/java/com/thoughtspot/client/model/SendAgentMessageStreamingRequestTest.java +src/test/java/com/thoughtspot/client/model/SendMessageRequestTest.java +src/test/java/com/thoughtspot/client/model/SetNLInstructionsRequestTest.java +src/test/java/com/thoughtspot/client/model/ShareMetadataRequestTest.java +src/test/java/com/thoughtspot/client/model/ShareMetadataTypeInputTest.java +src/test/java/com/thoughtspot/client/model/SharePermissionsInputTest.java +src/test/java/com/thoughtspot/client/model/SingleAnswerRequestTest.java +src/test/java/com/thoughtspot/client/model/SortOptionInputTest.java +src/test/java/com/thoughtspot/client/model/SortOptionTest.java +src/test/java/com/thoughtspot/client/model/SortOptionsTest.java +src/test/java/com/thoughtspot/client/model/SortingOptionsTest.java +src/test/java/com/thoughtspot/client/model/SqlQueryResponseTest.java +src/test/java/com/thoughtspot/client/model/SqlQueryTest.java +src/test/java/com/thoughtspot/client/model/StorageConfigInputTest.java +src/test/java/com/thoughtspot/client/model/StorageConfigTest.java +src/test/java/com/thoughtspot/client/model/StorageDestinationInputTest.java +src/test/java/com/thoughtspot/client/model/StorageDestinationTest.java +src/test/java/com/thoughtspot/client/model/SyncMetadataRequestTest.java +src/test/java/com/thoughtspot/client/model/SyncMetadataResponseTest.java +src/test/java/com/thoughtspot/client/model/SystemConfigTest.java +src/test/java/com/thoughtspot/client/model/SystemInfoTest.java +src/test/java/com/thoughtspot/client/model/SystemOverrideInfoTest.java +src/test/java/com/thoughtspot/client/model/TableTest.java +src/test/java/com/thoughtspot/client/model/TagMetadataTypeInputTest.java +src/test/java/com/thoughtspot/client/model/TagTest.java +src/test/java/com/thoughtspot/client/model/TemplatePropertiesInputCreateTest.java +src/test/java/com/thoughtspot/client/model/TokenAccessScopeObjectTest.java +src/test/java/com/thoughtspot/client/model/TokenTest.java +src/test/java/com/thoughtspot/client/model/TokenValidationResponseTest.java +src/test/java/com/thoughtspot/client/model/URLInputMandatoryTest.java +src/test/java/com/thoughtspot/client/model/URLInputTest.java +src/test/java/com/thoughtspot/client/model/URLTest.java +src/test/java/com/thoughtspot/client/model/UnassignTagRequestTest.java +src/test/java/com/thoughtspot/client/model/UnparameterizeMetadataRequestTest.java +src/test/java/com/thoughtspot/client/model/UnpublishMetadataRequestTest.java +src/test/java/com/thoughtspot/client/model/UpdateCalendarRequestTest.java +src/test/java/com/thoughtspot/client/model/UpdateCollectionRequestTest.java +src/test/java/com/thoughtspot/client/model/UpdateColumnSecurityRulesRequestTest.java +src/test/java/com/thoughtspot/client/model/UpdateConfigRequestTest.java +src/test/java/com/thoughtspot/client/model/UpdateConnectionConfigurationRequestTest.java +src/test/java/com/thoughtspot/client/model/UpdateConnectionRequestTest.java +src/test/java/com/thoughtspot/client/model/UpdateConnectionStatusRequestTest.java +src/test/java/com/thoughtspot/client/model/UpdateConnectionV2RequestTest.java +src/test/java/com/thoughtspot/client/model/UpdateCustomActionRequestTest.java +src/test/java/com/thoughtspot/client/model/UpdateEmailCustomizationRequestTest.java +src/test/java/com/thoughtspot/client/model/UpdateMetadataHeaderRequestTest.java +src/test/java/com/thoughtspot/client/model/UpdateMetadataObjIdRequestTest.java +src/test/java/com/thoughtspot/client/model/UpdateObjIdInputTest.java +src/test/java/com/thoughtspot/client/model/UpdateOrgRequestTest.java +src/test/java/com/thoughtspot/client/model/UpdateRoleRequestTest.java +src/test/java/com/thoughtspot/client/model/UpdateScheduleRequestTest.java +src/test/java/com/thoughtspot/client/model/UpdateSystemConfigRequestTest.java +src/test/java/com/thoughtspot/client/model/UpdateTagRequestTest.java +src/test/java/com/thoughtspot/client/model/UpdateUserGroupRequestTest.java +src/test/java/com/thoughtspot/client/model/UpdateUserRequestTest.java +src/test/java/com/thoughtspot/client/model/UpdateVariableRequestTest.java +src/test/java/com/thoughtspot/client/model/UpdateVariableValuesRequestTest.java +src/test/java/com/thoughtspot/client/model/UpdateWebhookConfigurationRequestTest.java +src/test/java/com/thoughtspot/client/model/UserGroupResponseTest.java +src/test/java/com/thoughtspot/client/model/UserGroupTest.java +src/test/java/com/thoughtspot/client/model/UserInfoTest.java +src/test/java/com/thoughtspot/client/model/UserObjectTest.java +src/test/java/com/thoughtspot/client/model/UserParameterOptionsTest.java +src/test/java/com/thoughtspot/client/model/UserPrincipalTest.java +src/test/java/com/thoughtspot/client/model/UserTest.java +src/test/java/com/thoughtspot/client/model/ValidateCommunicationChannelRequestTest.java +src/test/java/com/thoughtspot/client/model/ValidateMergeRequestTest.java +src/test/java/com/thoughtspot/client/model/ValidateTokenRequestTest.java +src/test/java/com/thoughtspot/client/model/ValueScopeInputTest.java +src/test/java/com/thoughtspot/client/model/VariableDetailInputTest.java +src/test/java/com/thoughtspot/client/model/VariableOrgInfoTest.java +src/test/java/com/thoughtspot/client/model/VariablePutAssignmentInputTest.java +src/test/java/com/thoughtspot/client/model/VariableTest.java +src/test/java/com/thoughtspot/client/model/VariableUpdateAssignmentInputTest.java +src/test/java/com/thoughtspot/client/model/VariableUpdateScopeInputTest.java +src/test/java/com/thoughtspot/client/model/VariableValueTest.java +src/test/java/com/thoughtspot/client/model/VariableValuesTest.java +src/test/java/com/thoughtspot/client/model/WebhookAuthApiKeyInputTest.java +src/test/java/com/thoughtspot/client/model/WebhookAuthApiKeyTest.java +src/test/java/com/thoughtspot/client/model/WebhookAuthBasicAuthInputTest.java +src/test/java/com/thoughtspot/client/model/WebhookAuthBasicAuthTest.java +src/test/java/com/thoughtspot/client/model/WebhookAuthOAuth2InputTest.java +src/test/java/com/thoughtspot/client/model/WebhookAuthOAuth2Test.java +src/test/java/com/thoughtspot/client/model/WebhookAuthenticationInputTest.java +src/test/java/com/thoughtspot/client/model/WebhookAuthenticationTest.java +src/test/java/com/thoughtspot/client/model/WebhookDeleteFailureTest.java +src/test/java/com/thoughtspot/client/model/WebhookDeleteResponseTest.java +src/test/java/com/thoughtspot/client/model/WebhookKeyValuePairInputTest.java +src/test/java/com/thoughtspot/client/model/WebhookKeyValuePairTest.java +src/test/java/com/thoughtspot/client/model/WebhookOrgTest.java +src/test/java/com/thoughtspot/client/model/WebhookPaginationTest.java +src/test/java/com/thoughtspot/client/model/WebhookResponseTest.java +src/test/java/com/thoughtspot/client/model/WebhookSearchResponseTest.java +src/test/java/com/thoughtspot/client/model/WebhookSignatureVerificationInputTest.java +src/test/java/com/thoughtspot/client/model/WebhookSignatureVerificationTest.java +src/test/java/com/thoughtspot/client/model/WebhookSortOptionsInputTest.java +src/test/java/com/thoughtspot/client/model/WebhookUserTest.java +utils/settings.xml diff --git a/sdks/java/.openapi-generator/VERSION b/sdks/java/.openapi-generator/VERSION new file mode 100644 index 000000000..5f84a81db --- /dev/null +++ b/sdks/java/.openapi-generator/VERSION @@ -0,0 +1 @@ +7.12.0 diff --git a/sdks/java/.travis.yml b/sdks/java/.travis.yml new file mode 100644 index 000000000..1b6741c08 --- /dev/null +++ b/sdks/java/.travis.yml @@ -0,0 +1,22 @@ +# +# Generated by OpenAPI Generator: https://openapi-generator.tech +# +# Ref: https://docs.travis-ci.com/user/languages/java/ +# +language: java +jdk: + - openjdk12 + - openjdk11 + - openjdk10 + - openjdk9 + - openjdk8 +before_install: + # ensure gradlew has proper permission + - chmod a+x ./gradlew +script: + # test using maven + #- mvn test + # test using gradle + - gradle test + # test using sbt + # - sbt test diff --git a/sdks/java/README.md b/sdks/java/README.md new file mode 100644 index 000000000..7157e0d42 --- /dev/null +++ b/sdks/java/README.md @@ -0,0 +1,125 @@ +# rest-api-sdk + +Java client for ThoughtSpot's [v2 Rest APIs](https://developers.thoughtspot.com/docs/rest-api-v2). + +This SDK is compatible with Java 8 and above. + +## Consuming + +### Maven users + +Add this dependency to your project's POM: + +```xml + + com.thoughtspot + rest-api-sdk + 2.25.0 + compile + +``` + +### Gradle users + +Add this dependency to your project's build file: + +```groovy + repositories { + mavenCentral() + } + + dependencies { + implementation "com.thoughtspot:rest-api-sdk:2.25.0" + } +``` + +## Usage + +Below code snippet shows how to create a simple config and use it to call get the user's information: + +```java +package org.example; + +// Import classes: +import com.thoughtspot.client.ApiClientConfiguration; +import com.thoughtspot.client.ApiException; +import com.thoughtspot.client.api.ThoughtSpotRestApi; +import com.thoughtspot.client.model.GetFullAccessTokenRequest; +import com.thoughtspot.client.model.Token; +import com.thoughtspot.client.model.User; + +public class Example { + private static final String BASE_PATH = *CLUSTER_URL*; // https://your-cluster-url.thoughtspot.cloud + private static final String DOWNLOAD_PATH = "." // path to download files + + public static void main(String[] args) { + try { + // Create configuration for the ThoughtSpot API client + ApiClientConfiguration apiClientConfiguration = new ApiClientConfiguration.Builder() + .basePath(BASE_PATH) + .verifyingSsl(false) // Disable SSL verification for testing purposes + .readTimeoutMillis(600000) // Extend read timeout to 10 minutes + .downloadPath(DOWNLOAD_PATH) // Defaults to system download path if not specified + .build(); + + // Create an instance of the ThoughtSpot API client + ThoughtSpotRestApi tsRestApi = new ThoughtSpotRestApi(apiClientConfiguration); + + // Authenticate the user and retrieve the full access token + GetFullAccessTokenRequest getFullAccessTokenRequest = new GetFullAccessTokenRequest() + .username(USERNAME) + .password(PASSWORD); + Token response = tsRestApi.getFullAccessToken(getFullAccessTokenRequest); + + // Update the API client configuration with the access token + apiClientConfiguration = apiClientConfiguration.toBuilder() + .bearerTokenSupplier(response::getToken) // You can pass your own token supplier here + .build(); + + // Apply the updated configuration to the ThoughtSpot API client + tsRestApi.applyApiClientConfiguration(apiClientConfiguration); + + // Current user information + User currentUser = tsRestApi.getCurrentUserInfo(); + System.out.println("Current User: " + currentUser.toJson()); + + // Optionally, use .{REQUEST}WithHttpInfo() to get response details + ApiResponse currentUserResponse = tsRestApi.getCurrentUserInfoWithHttpInfo(); + System.out.println("Current User: " + currentUserResponse.getData().toString()); + System.out.println("Status code: " + currentUserResponse.getStatusCode()); + System.out.println("Response headers: " + currentUserResponse.getHeaders().toString()); + } catch (ApiException e) { + System.err.println("Exception when calling ThoughtSpot API"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +## Live Playground + +We recommend that you browse through the [api playground](https://try-everywhere.thoughtspot.cloud/v2/#/everywhere/api/rest/playgroundV2_0) before you start constructing your API requests. The playground offers an interactive portal with comprehensive information about the API endpoints, request and response workflows. + +## Documentation for API Endpoints + +You can find the full documentation for all available API endpoints in the [ThoughtSpotRestApi](docs/ThoughtSpotRestApi.md) file. + +## Author + +This SDK is developed and maintained by **ThoughtSpot**. + +- **Organization Name**: ThoughtSpot +- **GitHub**: [thoughtspot](https://github.com/thoughtspot) +- **Website**: [www.thoughtspot.com](https://www.thoughtspot.com/) +- **Email**: [support@thoughtspot.com](mailto:support@thoughtspot.com) + +## Contributors + +- [Pallav Pandey](https://github.com/pallavpp) + +## License + +For full details, please refer to the [license documentation](https://github.com/thoughtspot/rest-api-sdk/blob/release/LICENSE.md). \ No newline at end of file diff --git a/sdks/java/api/openapi.yaml b/sdks/java/api/openapi.yaml new file mode 100644 index 000000000..22135101c --- /dev/null +++ b/sdks/java/api/openapi.yaml @@ -0,0 +1,29606 @@ +openapi: 3.0.0 +info: + title: ThoughtSpot Public REST API + version: "2.0" +servers: +- url: "{base-url}" + variables: + base-url: + default: https://localhost:443 +security: +- bearerAuth: [] +paths: + /api/rest/2.0/ai/agent/conversation/create: + post: + description: |2+ + + Version: 26.2.0.cl or later + + + Creates a new Spotter agent conversation based on the provided context and settings. The endpoint was in Beta from 26.2.0.cl through 26.4.0.cl. + + Requires `CAN_USE_SPOTTER` privilege and at least view access to the metadata object specified in the request. + + #### Usage guidelines + + The request must include the `metadata_context` parameter to define the conversation context. The context type can be one of: + + - `DATA_SOURCE` *(available from 26.5.0.cl)*: targets a specific data source. Provide `data_source_identifier` in `data_source_context` for a single data source, or `data_source_identifiers` for multi-data-source context. The deprecated `guid` field is accepted for backwards compatibility. + - `AUTO_MODE` *(available from 26.5.0.cl)*: automatically discovers and selects the most relevant datasets for the user's queries. + + > **Note for callers on versions 26.2.0.cl – 26.4.0.cl (Beta):** use the lowercase `data_source` enum value with the `guid` field instead of the above. Example: `{ "type": "data_source", "data_source_context": { "guid": "" } }`. + + The `conversation_settings` parameter controls which Spotter capabilities are enabled for the conversation: + + - `enable_contextual_change_analysis` (default: `true`, **deprecated from 26.2.0.cl**) — always enabled in Spotter 3; setting this to `false` has no effect on versions >= 26.2.0.cl + - `enable_natural_language_answer_generation` (default: `true`, **deprecated from 26.2.0.cl**) — always enabled in Spotter 3; setting this to `false` has no effect on versions >= 26.2.0.cl + - `enable_reasoning` (default: `true`, **deprecated from 26.2.0.cl**) — always enabled in Spotter 3; setting this to `false` has no effect on versions >= 26.2.0.cl + - `enable_save_chat` (default: `false`, *available from 26.5.0.cl*) — enables saving the conversation for later retrieval via conversation history + + If the request is successful, the response includes a unique `conversation_identifier` that must be passed to `sendAgentConversationMessage` or `sendAgentConversationMessageStreaming` to send messages within this conversation. The response also includes `conversation_id` with the same value for backwards compatibility; use `conversation_identifier` for new integrations. + + #### Example request + + ```json + { + "metadata_context": { + "type": "DATA_SOURCE", + "data_source_context": { + "data_source_identifier": "a1b2c3d4-e5f6-7890-abcd-ef1234567890" + } + }, + "conversation_settings": {} + } + ``` + + #### Error responses + + | Code | Description | + | ---- | --------------------------------------------------------------------------------------------------------------------------------------- | + | 401 | Unauthorized — authentication token is missing, expired, or invalid. | + | 403 | Forbidden — the authenticated user does not have `CAN_USE_SPOTTER` privilege or lacks view permission on the specified metadata object. | + + > ###### Note: + > + > - This endpoint was in Beta from 26.2.0.cl through 26.4.0.cl and is Generally Available from version 26.5.0.cl. + > - This endpoint requires Spotter - please contact ThoughtSpot support to enable Spotter on your cluster. + + + + + + operationId: createAgentConversation + parameters: [] + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/CreateAgentConversationRequest' + required: true + responses: + "200": + content: + application/json: + examples: + example_1: + summary: Create a conversation with a specific data source + value: + conversation_id: wwHQ5j8O8dQC + conversation_identifier: wwHQ5j8O8dQC + example_2: + summary: Create a conversation using auto mode where the agent automatically + discovers and selects the most relevant datasets for the user's + queries + value: + conversation_id: aaHQ5j8O8dQC + conversation_identifier: aaHQ5j8O8dQC + schema: + $ref: '#/components/schemas/AgentConversation' + description: Common successful response + "201": + content: + application/json: + schema: + $ref: '#/components/schemas/AgentConversation' + description: Common error response + "400": + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + description: Operation failed + "401": + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + description: Unauthorized access. + "403": + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + description: Forbidden access. + "500": + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + description: Operation failed + tags: + - AI + - ThoughtSpotRest + x-content-type: application/json + x-accepts: + - application/json + /api/rest/2.0/ai/conversation/create: + post: + description: |2+ + + Version: 10.4.0.cl or later + + + Creates a new conversation session tied to a specific data model for AI-driven natural language querying. + + Requires `CAN_USE_SPOTTER` privilege and at least view access to the metadata object specified in the request. + + #### Usage guidelines + + The request must include: + - `metadata_identifier`: the unique ID of the data source that provides context for the conversation + + Optionally, you can provide: + - `tokens`: a token string to set initial context for the conversation (e.g., `"[sales],[item type],[state]"`) + + If the request is successful, ThoughtSpot returns a unique `conversation_identifier` that must be passed to `sendMessage` to continue the conversation. + + #### Error responses + + | Code | Description | + |------|-------------| + | 401 | Unauthorized — authentication token is missing, expired, or invalid. | + | 403 | Forbidden — the authenticated user does not have `CAN_USE_SPOTTER` privilege or lacks view permission on the specified metadata object. | + + > ###### Note: + > * This endpoint is currently in Beta. Breaking changes may be introduced before the endpoint is made Generally Available. + > * This endpoint requires Spotter - please contact ThoughtSpot support to enable Spotter on your cluster. + + + + + + operationId: createConversation + parameters: [] + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/CreateConversationRequest' + required: true + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/Conversation' + description: Common successful response + "201": + content: + application/json: + schema: + $ref: '#/components/schemas/Conversation' + description: Common error response + "400": + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + description: Operation failed + "401": + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + description: Unauthorized access. + "403": + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + description: Forbidden access. + "500": + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + description: Operation failed + tags: + - AI + - ThoughtSpotRest + x-content-type: application/json + x-accepts: + - application/json + /api/rest/2.0/ai/data-source-suggestions: + post: + description: |2+ + + Version: 10.15.0.cl or later + + + Suggests the most relevant data sources for a given natural language query, ranked by confidence with LLM-generated reasoning. + + Requires `CAN_USE_SPOTTER` privilege and at least view-level access to the underlying metadata entities referenced in the response. + + #### Usage guidelines + + The request must include: + - `query`: the natural language question to find relevant data sources for + + If the request is successful, the API returns a ranked list of suggested data sources, each containing: + - `confidence`: a float score indicating the model's confidence in the relevance of the suggestion + - `details`: metadata about the data source + - `data_source_identifier`: the unique ID of the data source + - `data_source_name`: the display name of the data source + - `description`: a description of the data source + - `reasoning`: LLM-generated rationale explaining why the data source was recommended + + #### Error responses + + | Code | Description | + |------|--------------------------------------------------------------------------------------------------------------------------------------------| + | 401 | Unauthorized — authentication token is missing, expired, or invalid. | + | 403 | Forbidden — the authenticated user does not have `CAN_USE_SPOTTER` privilege or lacks view permission on the underlying metadata entities. | + + > ###### Note: + > * This endpoint is currently in Beta. Breaking changes may be introduced before it is made Generally Available. + > * This endpoint requires Spotter — please contact ThoughtSpot Support to enable Spotter on your cluster. + + + + + + operationId: getDataSourceSuggestions + parameters: [] + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/GetDataSourceSuggestionsRequest' + required: true + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/eureka_DataSourceSuggestionResponse' + description: Common successful response + "201": + content: + application/json: + schema: + $ref: '#/components/schemas/eureka_DataSourceSuggestionResponse' + description: Common error response + "400": + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + description: Operation failed + "401": + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + description: Unauthorized access. + "403": + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + description: Forbidden access. + "500": + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + description: Operation failed + tags: + - AI + - ThoughtSpotRest + x-content-type: application/json + x-accepts: + - application/json + /api/rest/2.0/ai/instructions/get: + post: + description: |2+ + + Version: 10.15.0.cl or later + + + Retrieves existing natural language (NL) instructions configured for a specific data model. These instructions guide the AI system in understanding data context and generating more accurate responses. + + Requires `CAN_USE_SPOTTER` privilege, at least view access on the data model, and a bearer token corresponding to the org where the data model exists. + + #### Usage guidelines + + The request must include: + + - `data_source_identifier`: the unique ID of the data model to retrieve instructions for + + If the request is successful, the API returns: + + - `nl_instructions_info`: an array of instruction objects, each containing: + - `instructions`: the configured text instructions for AI processing + - `scope`: the scope of the instruction — currently only `GLOBAL` is supported + + #### Instructions scope + + - **GLOBAL**: Instructions that apply globally across the system on the given data-model (currently only global instructions are supported) + + #### Error responses + + | Code | Description | + |------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| + | 401 | Unauthorized — authentication token is missing, expired, or invalid. | + | 403 | Forbidden — the authenticated user does not have `CAN_USE_SPOTTER` privilege, lacks view access on the data model, or the bearer token does not correspond to the org where the data model exists. | + + > ###### Note: + > + > - To use this API, the user needs at least view access on the data model, and must use the bearer token corresponding to the org where the data model exists. + > - This endpoint is currently in Beta. Breaking changes may be introduced before the endpoint is made Generally Available. + > - Available from version 10.15.0.cl and later. + > - This endpoint requires Spotter — please contact ThoughtSpot Support to enable Spotter on your cluster. + > - Use this API to review currently configured instructions before modifying them with `setNLInstructions`. + + + + + + operationId: getNLInstructions + parameters: [] + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/GetNLInstructionsRequest' + required: true + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/eureka_GetNLInstructionsResponse' + description: Common successful response + "201": + content: + application/json: + schema: + $ref: '#/components/schemas/eureka_GetNLInstructionsResponse' + description: Common error response + "400": + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + description: Operation failed + "401": + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + description: Unauthorized access. + "403": + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + description: Forbidden access. + "500": + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + description: Operation failed + tags: + - AI + - ThoughtSpotRest + x-content-type: application/json + x-accepts: + - application/json + /api/rest/2.0/ai/relevant-questions/: + post: + description: |2+ + + Version: 10.13.0.cl or later + + + Breaks down a natural language query into a series of smaller analytical sub-questions, each mapped to a relevant data source. + + Requires `CAN_USE_SPOTTER` privilege and at least view-level access to the referenced metadata objects. + + #### Usage guidelines + + The request must include: + - `query`: the natural language question to decompose into analytical sub-questions + - `metadata_context`: at least one of the following context identifiers to guide question generation: + - `conversation_identifier` — an existing conversation session ID + - `answer_identifiers` — a list of Answer GUIDs + - `liveboard_identifiers` — a list of Liveboard GUIDs + - `data_source_identifiers` — a list of data source GUIDs + + Optional parameters for refining the output: + - `ai_context`: additional context to improve response quality + - `content` — supplementary text or CSV data as string input + - `instructions` — custom text instructions for the AI system + - `limit_relevant_questions`: maximum number of questions to return (default: `5`) + - `bypass_cache`: if `true`, forces fresh computation instead of returning cached results + + If the request is successful, the API returns a list of relevant analytical questions, each containing: + - `query`: the generated sub-question + - `data_source_identifier`: the unique ID of the data source the question targets + - `data_source_name`: the display name of the corresponding data source + + #### Error responses + + | Code | Description | + |------|---------------------------------------------------------------------------------------------------------------------------------------| + | 401 | Unauthorized — authentication token is missing, expired, or invalid. | + | 403 | Forbidden — the authenticated user does not have `CAN_USE_SPOTTER` privilege or lacks view access to the referenced metadata objects. | + + > ###### Note: + > * This endpoint is currently in Beta. Breaking changes may be introduced before the endpoint is made Generally Available. + > * This endpoint requires Spotter - please contact ThoughtSpot support to enable Spotter on your cluster. + + + + + + operationId: getRelevantQuestions + parameters: [] + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/GetRelevantQuestionsRequest' + required: true + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/eureka_GetRelevantQuestionsResponse' + description: Common successful response + "201": + content: + application/json: + schema: + $ref: '#/components/schemas/eureka_GetRelevantQuestionsResponse' + description: Common error response + "400": + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + description: Operation failed + "401": + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + description: Unauthorized access. + "403": + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + description: Forbidden access. + "500": + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + description: Operation failed + tags: + - AI + - ThoughtSpotRest + x-content-type: application/json + x-accepts: + - application/json + /api/rest/2.0/ai/analytical-questions: + post: + deprecated: true + description: |2+ + + Version: 10.7.0.cl or later + + + **Deprecated** — Use `getRelevantQuestions` instead (available from 10.13.0.cl). + + Breaks down a topical or goal-oriented natural language question into smaller, actionable analytical sub-questions, each mapped to a relevant data source for independent execution. + + Requires `CAN_USE_SPOTTER` privilege and at least view-level access to the referenced metadata objects. + + #### Usage guidelines + + The request accepts the following parameters: + + - `nlsRequest`: contains the user `query` to decompose, along with optional `instructions` and `bypassCache` flag + - `worksheetIds`: list of data source identifiers to scope the decomposition + - `answerIds`: list of Answer GUIDs whose data guides the response + - `liveboardIds`: list of Liveboard GUIDs whose data guides the response + - `conversationId`: an existing conversation session ID for context continuity + - `content`: supplementary text or CSV data to improve response quality + - `maxDecomposedQueries`: maximum number of sub-questions to return (default: `5`) + + If the request is successful, the API returns a `decomposedQueryResponse` containing a list of `decomposedQueries`, each with: + - `query`: the generated analytical sub-question + - `worksheetId`: the unique ID of the data source the question targets + - `worksheetName`: the display name of the corresponding data source + + #### Error responses + + | Code | Description | + |------|---------------------------------------------------------------------------------------------------------------------------------------| + | 401 | Unauthorized — authentication token is missing, expired, or invalid. | + | 403 | Forbidden — the authenticated user does not have `CAN_USE_SPOTTER` privilege or lacks view access to the referenced metadata objects. | + + > ###### Note: + > * This endpoint is deprecated since 10.13.0.cl. Use `getRelevantQuestions` for new integrations. + > * This endpoint is currently in Beta. Breaking changes may be introduced before the endpoint is made Generally Available. + > * This endpoint requires Spotter — please contact ThoughtSpot support to enable Spotter on your cluster. + + + + + + operationId: queryGetDecomposedQuery + parameters: [] + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/QueryGetDecomposedQueryRequest' + required: true + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/eureka_DecomposeQueryResponse' + description: Common successful response + "201": + content: + application/json: + schema: + $ref: '#/components/schemas/eureka_DecomposeQueryResponse' + description: Common error response + "400": + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + description: Operation failed + "401": + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + description: Unauthorized access. + "403": + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + description: Forbidden access. + "500": + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + description: Operation failed + tags: + - AI + - ThoughtSpotRest + x-content-type: application/json + x-accepts: + - application/json + /api/rest/2.0/ai/agent/conversation/{conversation_identifier}/send: + post: + description: |2+ + + Version: 26.5.0.cl or later + + + Sends natural language messages to an existing Spotter agent conversation and returns the complete response synchronously. + + Requires `CAN_USE_SPOTTER` privilege and access to the metadata object associated with the conversation. The user must have access to the conversation session referenced by `conversation_identifier`. A conversation must first be created using the `createAgentConversation` API. + + #### Usage guidelines + + The request must include: + + - `conversation_identifier`: the unique session ID returned by `createAgentConversation`, used for context continuity and message tracking + - `messages`: an array of one or more text messages to send to the agent + + The API returns an array of response objects, each containing: + + - `type`: the kind of response — `text`, `answer`, or `error` + - `message`: the main content of the response + - `metadata`: additional information depending on the message type (e.g., answer metadata includes analytics and visualization details) + + #### Error responses + + | Code | Description | + |------|----------------------------------------------------------------------------------------------------------------------------------| + | 401 | Unauthorized — authentication token is missing, expired, or invalid. | + | 403 | Forbidden — the authenticated user does not have `CAN_USE_SPOTTER` privilege or lacks permission on the referenced conversation. | + + > ###### Note: + > + > - This endpoint is Generally Available from version 26.5.0.cl. + > - This endpoint requires Spotter - please contact ThoughtSpot support to enable Spotter on your cluster. + > - For real-time streamed responses, use `sendAgentConversationMessageStreaming` instead. + + + + + + operationId: sendAgentConversationMessage + parameters: + - description: Unique identifier for the conversation (used to track context) + explode: false + in: path + name: conversation_identifier + required: true + schema: + type: string + style: simple + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/SendAgentConversationMessageRequest' + required: true + responses: + "200": + content: + application/json: + examples: + example_1: + summary: Send a message to an existing agent conversation + value: + messages: + - metadata: {} + internal: {} + type: text + text: |2- + + + I'll compare sales between 2025 and 2024. First, let me get the dataset context to identify the relevant sales and date columns. + agent_context: "" + - metadata: {} + internal: {} + type: text + text: |- + ```json + {"search_mode": "semantic", "dataset_name": "(Sample) Retail - Apparel", "columns": [{"name": "sales", "type": "MEASURE", "data_type": "double"}, {"name": "date", "type": "ATTRIBUTE", "data_type": "date", "sample_values": ["2025", "2024"]}]} + ``` + agent_context: "" + - metadata: {} + internal: {} + type: text + text: |2- + + + Perfect! I found the sales and date columns. I can see the dataset contains sales data for both 2025 and 2024. Now I'll create a comparison query to show sales for 2025 versus 2024. + agent_context: "" + - metadata: + output: + worksheet_id: cd252e5c-b552-49a8-821d-3eadaa049cca + assumptions: "" + chart_type: KPI + interrupted: false + data_awareness_enabled: true + internal: {} + type: answer + title: Compare total sales for 2025 vs 2024 + description: "" + session_id: 842bb67a-e08e-4861-97e8-8db9538db51d + gen_no: 2 + sage_query: "[sales] [date] = '2025' vs [date] = '2024'" + tml_tokens: + - "[sales]" + - "[date] = '2025' vs [date] = '2024'" + formulas: [] + parameters: [] + subqueries: [] + viz_suggestion: CAEQIBomEiQ2NjE5NzI0Yy1kMjVlLTU4MDItOWNjOC1jNDA3MWY3OWY5MzAoATIA + ac_state: null + - metadata: {} + internal: {} + type: text + text: |2- + + + The visualization shows the side-by-side comparison of total sales (in USD) between the two years, allowing you to see the year-over-year performance. You can see the sales figures for both 2024 and 2025, making it easy to identify growth or decline trends in your retail apparel business. + agent_context: "" + schema: + type: object + description: Common successful response + "201": + content: + application/json: + schema: + type: object + description: Common error response + "400": + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + description: Operation failed + "401": + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + description: Unauthorized access. + "403": + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + description: Forbidden access. + "500": + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + description: Operation failed + tags: + - AI + - ThoughtSpotRest + x-content-type: application/json + x-accepts: + - application/json + /api/rest/2.0/ai/agent/conversation/{conversation_identifier}/send/stream: + post: + description: |2+ + + Version: 26.5.0.cl or later + + + Sends one or more natural language messages to an existing Spotter agent conversation and returns the response as a real-time Server-Sent Events stream. + + Requires `CAN_USE_SPOTTER` privilege and access to the metadata object associated with the conversation. The user must have access to the conversation session referenced by `conversation_identifier`. A conversation must first be created using the `createAgentConversation` API. + + #### Usage guidelines + + The request must include: + + - `conversation_identifier`: the unique session ID returned by `createAgentConversation`, used for context continuity and message tracking + - `messages`: an array of one or more text messages to send to the agent + + If the request is valid, the API returns a Server-Sent Events (SSE) stream. Each line has the form `data: [{"type": "...", ...}]` — a JSON array of event objects. Event types include: + + - `ack`: confirms receipt of the request (`node_id`) + - `conv_title`: conversation title (`title`, `conv_id`) + - `notification`: status updates on operations (`group_id`, `metadata`, `code` — e.g. `TOOL_CALL_NOTIFICATION`, `nls_start`, `FINAL_RESPONSE_NOTIFICATION`) + - `text-chunk`: incremental content chunks (`id`, `group_id`, `metadata` with `format` and `type` such as `thinking` or `text`, `content`) + - `text`: full text block with same structure as `text-chunk` + - `answer`: structured answer with metadata (`id`, `group_id`, `metadata` with `sage_query`, `session_id`, `title`, etc., `title`) + - `error`: if a failure occurs + + #### Error responses + + | Code | Description | + | ---- | -------------------------------------------------------------------------------------------------------------------------------- | + | 401 | Unauthorized — authentication token is missing, expired, or invalid. | + | 403 | Forbidden — the authenticated user does not have `CAN_USE_SPOTTER` privilege or lacks permission on the referenced conversation. | + + > ###### Note: + > + > - This endpoint is Generally Available from version 26.5.0.cl. + > - This endpoint requires Spotter - please contact ThoughtSpot support to enable Spotter on your cluster. + > - The streaming protocol uses Server-Sent Events (SSE). + > - For the complete response in a single payload, use `sendAgentConversationMessage` instead. + + + + + + operationId: sendAgentConversationMessageStreaming + parameters: + - description: Unique identifier for the conversation (used to track context) + explode: false + in: path + name: conversation_identifier + required: true + schema: + type: string + style: simple + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/SendAgentConversationMessageStreamingRequest' + required: true + responses: + "200": + content: + application/json: + examples: + example_1: + summary: "SSE stream — each line is data: [{\"type\": \"...\", ...}].\ + \ Events arrive over time; this example shows a minimal sequence." + value: + - type: ack + node_id: aGxzcFVrtom8 + - type: conv_title + title: Sales 2025 vs 2024 + conv_id: -XIi04l5rrof + - type: notification + group_id: cDEsAQbSnd3J + metadata: + type: thinking + tool_title: "Analyzing Sales Performance: 2025 vs 2024" + code: TOOL_CALL_NOTIFICATION + - id: mNAdvy-NK2l6 + type: text-chunk + group_id: cDEsAQbSnd3J + metadata: + format: markdown + type: thinking + content: |2- + + + I need to compare sales performance between 2025 and 2024. + - id: hxWMDP-pgR3B + type: answer + group_id: m1MTvttEUa7o + metadata: + sage_query: "[sales] [date] = '2025' vs [date] = '2024'" + session_id: 431adcf9-1328-4d8c-81a1-0faa7fa37ba6 + title: Compare sales for 2025 vs 2024 + title: Compare sales for 2025 vs 2024 + schema: + $ref: '#/components/schemas/SendAgentMessageResponse' + description: Common successful response + "201": + content: + application/json: + schema: + $ref: '#/components/schemas/SendAgentMessageResponse' + description: Common error response + "400": + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + description: Operation failed + "401": + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + description: Unauthorized access. + "403": + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + description: Forbidden access. + "500": + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + description: Operation failed + tags: + - AI + - ThoughtSpotRest + x-content-type: application/json + x-accepts: + - application/json + /api/rest/2.0/ai/agent/{conversation_identifier}/converse: + post: + deprecated: true + description: |2+ + + Version: 26.2.0.cl or later + + + **Deprecated** — Use `sendAgentConversationMessage` instead. + + Send natural language messages to an existing Spotter agent conversation and returns the complete response synchronously. + + Requires `CAN_USE_SPOTTER` privilege and access to the metadata object associated with the conversation. The user must have access to the conversation session referenced by `conversation_identifier`. + A conversation must first be created using the `createAgentConversation` API. + + #### Usage guidelines + + The request must include: + + - `conversation_identifier`: the unique session ID returned by `createAgentConversation`, used for context continuity and message tracking + - `messages`: an array of one or more text messages to send to the agent + + The API returns an array of response objects, each containing: + + - `type`: the kind of response — `text`, `answer`, or `error` + - `message`: the main content of the response + - `metadata`: additional information depending on the message type (e.g., answer metadata includes analytics and visualization details) + + #### Error responses + + | Code | Description | + |------|----------------------------------------------------------------------------------------------------------------------------------| + | 401 | Unauthorized — authentication token is missing, expired, or invalid. | + | 403 | Forbidden — the authenticated user does not have `CAN_USE_SPOTTER` privilege or lacks permission on the referenced conversation. | + + > ###### Note: + > + > - This endpoint is deprecated. Use `sendAgentConversationMessage` for new integrations. + > - This endpoint is currently in Beta. Breaking changes may be introduced before the endpoint is made Generally Available. + > - This endpoint requires Spotter - please contact ThoughtSpot support to enable Spotter on your cluster. + + + + + + operationId: sendAgentMessage + parameters: + - description: Unique identifier for the conversation (used to track context) + explode: false + in: path + name: conversation_identifier + required: true + schema: + type: string + style: simple + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/SendAgentMessageRequest' + required: true + responses: + "200": + content: + application/json: + schema: + type: object + description: Common successful response + "201": + content: + application/json: + schema: + type: object + description: Common error response + "400": + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + description: Operation failed + "401": + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + description: Unauthorized access. + "403": + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + description: Forbidden access. + "500": + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + description: Operation failed + tags: + - AI + - ThoughtSpotRest + x-content-type: application/json + x-accepts: + - application/json + /api/rest/2.0/ai/agent/converse/sse: + post: + deprecated: true + description: |2+ + + Version: 26.2.0.cl or later + + + **Deprecated** — Use `sendAgentConversationMessageStreaming` instead. + + Sends one or more natural language messages to an existing Spotter agent conversation and returns the response as a real-time Server-Sent Events stream. + + Requires `CAN_USE_SPOTTER` privilege and access to the metadata object associated with the conversation. The user must have access to the conversation session referenced by `conversation_identifier`. A conversation must first be created using the `createAgentConversation` API. + + #### Usage guidelines + + The request must include: + + - `conversation_identifier`: the unique session ID returned by `createAgentConversation`, used for context continuity and message tracking + - `messages`: an array of one or more text messages to send to the agent + + If the request is valid, the API returns a Server-Sent Events (SSE) stream. Each line has the form `data: [{"type": "...", ...}]` — a JSON array of event objects. Event types include: + + - `ack`: confirms receipt of the request (`node_id`) + - `conv_title`: conversation title (`title`, `conv_id`) + - `notification`: status updates on operations (`group_id`, `metadata`, `code` — e.g. `TOOL_CALL_NOTIFICATION`, `nls_start`, `FINAL_RESPONSE_NOTIFICATION`) + - `text-chunk`: incremental content chunks (`id`, `group_id`, `metadata` with `format` and `type` such as `thinking` or `text`, `content`) + - `text`: full text block with same structure as `text-chunk` + - `answer`: structured answer with metadata (`id`, `group_id`, `metadata` with `sage_query`, `session_id`, `title`, etc., `title`) + - `error`: if a failure occurs + + #### Error responses + + | Code | Description | + |------|----------------------------------------------------------------------------------------------------------------------------------| + | 401 | Unauthorized — authentication token is missing, expired, or invalid. | + | 403 | Forbidden — the authenticated user does not have `CAN_USE_SPOTTER` privilege or lacks permission on the referenced conversation. | + + > ###### Note: + > + > - This endpoint is deprecated. Use `sendAgentConversationMessageStreaming` for new integrations. + > - This endpoint is currently in Beta. Breaking changes may be introduced before the endpoint is made Generally Available. + > - This endpoint requires Spotter - please contact ThoughtSpot support to enable Spotter on your cluster. + > - The streaming protocol uses Server-Sent Events (SSE). + + + + + + operationId: sendAgentMessageStreaming + parameters: [] + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/SendAgentMessageStreamingRequest' + required: true + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/SendAgentMessageResponse' + description: Common successful response + "201": + content: + application/json: + schema: + $ref: '#/components/schemas/SendAgentMessageResponse' + description: Common error response + "400": + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + description: Operation failed + "401": + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + description: Unauthorized access. + "403": + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + description: Forbidden access. + "500": + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + description: Operation failed + tags: + - AI + - ThoughtSpotRest + x-content-type: application/json + x-accepts: + - application/json + /api/rest/2.0/ai/conversation/{conversation_identifier}/converse: + post: + description: |2+ + + Version: 10.4.0.cl or later + + + Sends a follow-up message to an existing conversation within the context of a data model. + + Requires `CAN_USE_SPOTTER` privilege and at least view access to the metadata object specified in the request. A conversation must first be created using the `createConversation` API. + + #### Usage guidelines + + The request must include: + - `conversation_identifier`: the unique session ID returned by `createConversation` + - `metadata_identifier`: the unique ID of the data source used for the conversation + - `message`: a natural language string with the follow-up question + + If the request is successful, the API returns an array of response messages, each containing: + - `session_identifier`: the unique ID of the generated response + - `generation_number`: the generation number of the response + - `message_type`: the type of the response (e.g., `TSAnswer`) + - `visualization_type`: the generated visualization type (`Chart`, `Table`, or `Undefined`) + - `tokens` / `display_tokens`: the search tokens and user-friendly display tokens for the response + + #### Error responses + + | Code | Description | + |------|-----------------------------------------------------------------------------------------------------------------------------------------| + | 401 | Unauthorized — authentication token is missing, expired, or invalid. | + | 403 | Forbidden — the authenticated user does not have `CAN_USE_SPOTTER` privilege or lacks view permission on the specified metadata object. | + + > ###### Note: + > * This endpoint is currently in Beta. Breaking changes may be introduced before the endpoint is made Generally Available. + > * This endpoint requires Spotter - please contact ThoughtSpot support to enable Spotter on your cluster. + + + + + + operationId: sendMessage + parameters: + - description: Unique identifier of the conversation. + explode: false + in: path + name: conversation_identifier + required: true + schema: + type: string + style: simple + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/SendMessageRequest' + required: true + responses: + "200": + content: + application/json: + schema: + items: + $ref: '#/components/schemas/ResponseMessage' + type: array + description: Common successful response + "201": + content: + application/json: + schema: + items: + $ref: '#/components/schemas/ResponseMessage' + type: array + description: Common error response + "400": + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + description: Operation failed + "401": + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + description: Unauthorized access. + "403": + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + description: Forbidden access. + "500": + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + description: Operation failed + tags: + - AI + - ThoughtSpotRest + x-content-type: application/json + x-accepts: + - application/json + /api/rest/2.0/ai/instructions/set: + post: + description: |2+ + + Version: 10.15.0.cl or later + + + This API allows users to set natural language (NL) instructions for a specific data-model to improve AI-generated answers and query processing. These instructions help guide the AI system to better understand the data context and provide more accurate responses. + + Requires `CAN_USE_SPOTTER` privilege, either edit access or `SPOTTER_COACHING_PRIVILEGE` on the data model, and a bearer token corresponding to the org where the data model exists. + + #### Usage guidelines + + To set NL instructions for a data-model, the request must include: + + - `data_source_identifier`: The unique ID of the data-model for which to set NL instructions + - `nl_instructions_info`: An array of instruction objects, each containing: + - `instructions`: Array of text instructions for the LLM + - `scope`: The scope of the instruction (`GLOBAL`). Currently only `GLOBAL` is supported. It can be extended to data-model-user scope in future. + + #### Instructions scope + + - **GLOBAL**: instructions that apply to all users querying this data model + + If the request is successful, the API returns: + + - `success`: a boolean indicating whether the operation completed successfully + + #### Error responses + + | Code | Description | + |------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| + | 401 | Unauthorized — authentication token is missing, expired, or invalid. | + | 403 | Forbidden — the authenticated user does not have `CAN_USE_SPOTTER` privilege, lacks edit access or `SPOTTER_COACHING_PRIVILEGE` on the data model, or the bearer token does not correspond to the org where the data model exists. | + + > ###### Note: + > + > - To use this API, the user needs either edit access or `SPOTTER_COACHING_PRIVILEGE` on the data model, and must use the bearer token corresponding to the org where the data model exists. + > - This endpoint is currently in Beta. Breaking changes may be introduced before the endpoint is made Generally Available. + > - Available from version 10.15.0.cl and later. + > - This endpoint requires Spotter — please contact ThoughtSpot Support to enable Spotter on your cluster. + > - Instructions help improve the accuracy and relevance of AI-generated responses for the specified data-model. + + + + + + operationId: setNLInstructions + parameters: [] + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/SetNLInstructionsRequest' + required: true + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/eureka_SetNLInstructionsResponse' + description: Common successful response + "201": + content: + application/json: + schema: + $ref: '#/components/schemas/eureka_SetNLInstructionsResponse' + description: Common error response + "400": + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + description: Operation failed + "401": + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + description: Unauthorized access. + "403": + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + description: Forbidden access. + "500": + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + description: Operation failed + tags: + - AI + - ThoughtSpotRest + x-content-type: application/json + x-accepts: + - application/json + /api/rest/2.0/ai/answer/create: + post: + description: |2+ + + Version: 10.4.0.cl or later + + + Processes a natural language query against a specified data model and returns a single AI-generated answer without requiring a conversation session. + + Requires `CAN_USE_SPOTTER` privilege and at least view access to the metadata object specified in the request. + + #### Usage guidelines + + The request must include: + - `query`: a natural language question (e.g., "What were total sales last quarter?") + - `metadata_identifier`: the unique ID of the data source to query against + + If the request is successful, the API returns a response message containing: + - `session_identifier`: the unique ID of the generated response + - `generation_number`: the generation number of the response + - `message_type`: the type of the response (e.g., `TSAnswer`) + - `visualization_type`: the generated visualization type (`Chart`, `Table`, or `Undefined`) + - `tokens` / `display_tokens`: the search tokens and user-friendly display tokens for the response + + #### Error responses + + | Code | Description | + |------|-----------------------------------------------------------------------------------------------------------------------------------------| + | 401 | Unauthorized — authentication token is missing, expired, or invalid. | + | 403 | Forbidden — the authenticated user does not have `CAN_USE_SPOTTER` privilege or lacks view permission on the specified metadata object. | + + > ###### Note: + > * This endpoint is currently in Beta. Breaking changes may be introduced before the endpoint is made Generally Available. + > * This endpoint requires Spotter - please contact ThoughtSpot support to enable Spotter on your cluster. + + + + + + operationId: singleAnswer + parameters: [] + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/SingleAnswerRequest' + required: true + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/ResponseMessage' + description: Common successful response + "201": + content: + application/json: + schema: + $ref: '#/components/schemas/ResponseMessage' + description: Common error response + "400": + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + description: Operation failed + "401": + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + description: Unauthorized access. + "403": + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + description: Forbidden access. + "500": + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + description: Operation failed + tags: + - AI + - ThoughtSpotRest + x-content-type: application/json + x-accepts: + - application/json + /api/rest/2.0/ai/agent/conversation/{conversation_identifier}/stop-response: + post: + description: "\nStops an in-progress agent conversation response. \n Version:\ + \ 26.6.0.cl or later\n\n\nVersion: 26.6.0.cl or later\n\n\nStops an\ + \ in-progress agent response for the specified conversation. Use this endpoint\ + \ to cancel a response that is actively being generated — for example, when\ + \ the user navigates away, reformulates their question, or no longer needs\ + \ the current result.\n\nRequires `CAN_USE_SPOTTER` privilege and access to\ + \ the specified conversation.\n\n#### Usage guidelines\n\nThe request must\ + \ include:\n\n- `conversation_identifier` *(path parameter)*: the unique ID\ + \ of the conversation whose active response should be stopped, as returned\ + \ by `createAgentConversation`\n\nA successful request returns an empty `204\ + \ No Content` response. If there is no active response in progress at the\ + \ time of the call, the request is still treated as successful.\n\nAfter stopping\ + \ a response, the conversation session remains active. You can continue sending\ + \ messages using `sendAgentConversationMessage` or `sendAgentConversationMessageStreaming`.\n\ + \n#### Example request\n\n```bash\nPOST /api/rest/2.0/ai/agent/conversation/{conversation_identifier}/stop-response\n\ + ```\n\n#### Typical usage scenario\n\nThis endpoint is useful when integrating\ + \ Spotter into a chat UI where users can cancel a long-running query. For\ + \ example:\n\n1. User sends a message via `sendAgentConversationMessageStreaming`.\n\ + 2. User clicks a \"Stop generating\" button while the response is streaming.\n\ + 3. Your client calls `stopConversation` with the active `conversation_identifier`.\n\ + 4. The stream is terminated and the user can ask a new question.\n\n#### Error\ + \ responses\n\n| Code | Description |\n|------|-------------|\n| 401 | Unauthorized\ + \ — authentication token is missing, expired, or invalid. |\n| 403 | Forbidden\ + \ — the authenticated user does not have `CAN_USE_SPOTTER` privilege or lacks\ + \ access to the specified conversation. |\n\n> ###### Note:\n>\n> - Calling\ + \ this endpoint when no response is in progress does not return an error.\n\ + > - The conversation context is preserved after stopping — previous messages\ + \ and answers remain accessible.\n> - Available from version 26.6.0.cl and\ + \ later.\n> - This endpoint requires Spotter — please contact ThoughtSpot\ + \ Support to enable Spotter on your cluster.\n> - This feature is available\ + \ only for **Spotter 3** (`SPOTTER3`) version.\n\n\n\n\n\n" + operationId: stopConversation + parameters: + - description: Unique identifier of the conversation to stop. + explode: false + in: path + name: conversation_identifier + required: true + schema: + type: string + style: simple + responses: + "204": + description: Successfully stopped the in-progress agent conversation response + for the given. + "400": + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + description: Operation failed + "401": + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + description: Unauthorized access. + "403": + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + description: Forbidden access. + "500": + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + description: Operation failed + tags: + - AI + - ThoughtSpotRest + x-accepts: + - application/json + /api/rest/2.0/auth/configure: + post: + description: |2+ + + Version: 26.6.0.cl or later + + + Enables or disables authentication at cluster or org level for the specified auth type. Currently supports `TRUSTED_AUTH`. + + #### Required privileges + + Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) or `CONTROL_TRUSTED_AUTH` (**Can Enable or Disable Trusted Authentication**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled, the `CONTROL_TRUSTED_AUTH` privilege is required. + + #### Usage guidelines + + Use `cluster_preferences` to enable or disable authentication at the cluster level. Cluster-level settings can only be configured from the Primary Org. + - `ENABLED` — Generates a new access token if one does not exist. An existing token is preserved. + - `DISABLED` — Revokes the existing cluster-level access token. + + Use `org_preferences` to enable or disable authentication for one or more Orgs. Each entry must include an `org_identifier` (unique ID or name) and an `auth_status`. Org-level configuration requires the per-Org authentication feature to be enabled on your instance. + - `ENABLED` — Generates a new org-level access token if one does not exist. + - `DISABLED` — Revokes the existing org-level access token for that Org. + + Both `cluster_preferences` and `org_preferences` are optional. Omitting a field leaves the corresponding settings unchanged. If both are omitted, the API returns `204 No Content` without making any changes. + + **Note**: Cluster-level and org-level settings are independent of each other. Enabling or disabling one does not affect the other. + + + + + + operationId: configureAuthSettings + parameters: [] + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/ConfigureAuthSettingsRequest' + required: true + responses: + "204": + description: Trusted authentication settings configured successfully. + "400": + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + description: Invalid request. + "401": + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + description: Unauthorized access. + "403": + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + description: Forbidden access. + "500": + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + description: Unexpected error + tags: + - Authentication + - ThoughtSpotRest + x-content-type: application/json + x-accepts: + - application/json + /api/rest/2.0/auth/session/user: + get: + description: |2+ + + Version: 9.0.0.cl or later + + + Retrieves details of the current user session for the token provided in the request header. + + Any ThoughtSpot user can access this endpoint and send an API request. The data returned in the API response varies according to user's privilege and object access permissions. + + **NOTE**: In ThoughtSpot, users with cluster administration privileges can access all Orgs by default. However, unless the administrator is explicitly added to an Org, the Orgs list in the session information returned by the API will include only the Primary Org. To include other Orgs in the API response, you must explicitly add the administrator to each Org in the Admin settings page in the UI or via user REST API. + + + + + operationId: getCurrentUserInfo + parameters: [] + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/User' + description: Fetch current session user detail successful. + "400": + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + description: Invalid request. + "401": + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + description: Unauthorized access. + "403": + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + description: Forbidden access. + "500": + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + description: Unexpected error + tags: + - Authentication + - ThoughtSpotRest + x-accepts: + - application/json + /api/rest/2.0/auth/session/token: + get: + description: |2+ + + Version: 9.4.0.cl or later + + + Retrieves details of the current session token for the bearer token provided in the request header. + + This API endpoint does not create a new token. Instead, it returns details about the token, including the token string, creation time, expiration time, and the associated user. + + Use this endpoint to introspect your current session token, debug authentication issues, or when a frontend application needs session token details. + + Any ThoughtSpot user with a valid bearer token can access this endpoint and send an API request + + + + + + operationId: getCurrentUserToken + parameters: [] + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/GetTokenResponse' + description: Fetching token for current user successful. + "400": + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + description: Invalid request. + "401": + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + description: Unauthorized access. + "403": + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + description: Forbidden access. + "500": + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + description: Unexpected error + tags: + - Authentication + - ThoughtSpotRest + x-accepts: + - application/json + /api/rest/2.0/auth/token/custom: + post: + description: |2+ + + Version: 10.4.0.cl or later + + + Creates an authentication token that provides values for the formula variables in the Row Level Security (RLS) rules for a given user. Recommended for use cases that require Attribute-based access control (ABAC) via RLS. + + #### Required privileges + + To add a new user and assign privileges during auto-creation, the `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege is required. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled, the `CONTROL_TRUSTED_AUTH` (**Can Enable or Disable Trusted Authentication**) privilege and edit access to the data source are required. + + To configure formula variables for all Orgs on your instance or the Primary Org, cluster administration privileges are required. Org administrators can configure formula variables for their respective Orgs. If Role-Based Access Control (RBAC) is enabled, users with the `CAN_MANAGE_VARIABLES` (**Can manage variables**) role privilege can also create and manage variables for their Org context. + + #### Usage guidelines + + You can generate a token by providing a `username` and `password`, or by using a `secret_key`. To generate a `secret_key`, the administrator must enable [Trusted authentication](https://developers.thoughtspot.com/docs/trusted-auth-secret-key) in the **Develop** > **Customizations** > **Security Settings** page. + + **Note**: + * When both `password` and `secret_key` are included in the API request, `password` takes precedence. + * If [Multi-Factor Authentication (MFA)](https://docs.thoughtspot.com/cloud/latest/authentication-local-mfa) is enabled on your instance, the API login request with `username` and `password` returns an error. You can switch to token-based authentication with `secret_key` or contact ThoughtSpot Support for assistance. + + The token obtained from ThoughtSpot is valid for 5 minutes by default. You can configure the token expiration time as required. + + #### ABAC via RLS + + To implement ABAC via RLS and assign security entitlements to users during session creation, generate a token with custom variable values. The values set in the authentication token are applied to the formula variables referenced in RLS rules at the table level, which determines the data each user can access based on their entitlements. + + The variable values can be configured to persist for a specific set of Models in user sessions initiated with the token, allowing different RLS rules to be set for different data models. Once defined, the rules are added to the user's `variable_values` object, after which all sessions will use the persisted values. + + For more information, see [ABAC via tokens Documentation](https://developers.thoughtspot.com/docs/abac-via-rls-variables). + + ##### Formula variables + Before defining variable values, ensure the variables are created and available on your instance. To create a formula variable, you can use the **Create variable** (`/api/rest/2.0/template/variables/create`) REST API endpoint, with the variable `type` set as `Formula_Variable` in the API request. + + The API doesn't support `"persist_option": "RESET"` and `"persist_option": "NONE"` when `variable_values` are defined in the request. If you are using `variable_values` for token generation, you must use other supported persist options such as `APPEND` or `REPLACE`. + + If you want to use `RESET` or `NONE`, do not pass any `variable_values`. In such cases, `variable_values` will remain unaffected. + + #### Supported objects + + The supported object type is `LOGICAL_TABLE`. When using `object_id` with `variable_values`, models are supported. + + #### Just-in-time provisioning + + For [just-in-time user creation and provisioning](https://developers.thoughtspot.com/docs/just-in-time-provisioning), specify the following attributes in the API request: + + * `auto_create` + * `username` + * `display_name` + * `email` + * `groups` + + Set `auto_create` to `true` if the username does not exist in ThoughtSpot. If the username already exists in ThoughtSpot and `auto_create` is set to `true`, user properties such as display name, email, Org and group entitlements will not be updated with new values. Setting `auto_create` to `true` does not create formula variables. Hence, this setting will not be applicable to `variable_values`. + + #### Important point to note + All options in the token creation APIs that define user access to data in ThoughtSpot will take effect during token creation, not when the token is used for authentication. For example, `auto_create:true` will create the user when the authentication token is created. Persist options such as `APPEND` and `REPLACE` will persist `variable_values` on the user profile when the token is created. + + + + + + operationId: getCustomAccessToken + parameters: [] + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/GetCustomAccessTokenRequest' + required: true + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/AccessToken' + description: ABAC token creation was successful. + "400": + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + description: Invalid request. This could be due to missing or incorrect + parameters. + "401": + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + description: Unauthorized access. The request could not be authenticated. + "403": + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + description: Forbidden access. The user does not have permission to access + this resource. + "500": + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + description: An unexpected error occurred on the server. + security: [] + tags: + - Authentication + - ThoughtSpotRest + x-content-type: application/json + x-accepts: + - application/json + /api/rest/2.0/auth/token/full: + post: + description: |2+ + + Version: 9.0.0.cl or later + + + Generates an authentication token for creating a full session in ThoughtSpot for a given user. Recommended for use cases that do not require Attribute-based access control (ABAC) via Row Level Security (RLS). + + #### Usage guidelines + + You can generate a token for a user by providing a `username` and `password`, or by using the `secret_key` generated for your instance. To generate a `secret_key`, the administrator must enable [Trusted authentication](https://developers.thoughtspot.com/docs/trusted-auth-secret-key) in the **Develop** > **Customizations** > **Security Settings** page. + + **Note**: + * When both `password` and `secret_key` are included in the API request, `password` takes precedence. + * If [Multi-Factor Authentication (MFA)](https://docs.thoughtspot.com/cloud/latest/authentication-local-mfa) is enabled on your instance, the API login request with `username` and `password` returns an error. You can switch to token-based authentication with `secret_key` or contact ThoughtSpot Support for assistance. + + The token obtained from ThoughtSpot is valid for 5 minutes by default. You can configure the token expiration time as required. + + #### Just-in-time provisioning + + For [just-in-time user creation and provisioning](https://developers.thoughtspot.com/docs/just-in-time-provisioning), specify the following attributes in the API request: + + * `auto_create` + * `username` + * `display_name` + * `email` + * `group_identifiers` + + Set `auto_create` to `true` if the username does not exist in ThoughtSpot. If the user already exists in ThoughtSpot and `auto_create` is set to `true`, user properties such as display name, email and group assignment will be updated. + + To add a new user and assign privileges during auto-creation, the `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege is required. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled, the `CONTROL_TRUSTED_AUTH` (**Can Enable or Disable Trusted Authentication**) privilege is required. + + #### Important point to note + All options in the token creation APIs that define user access to data in ThoughtSpot will take effect during token creation, not when the token is used for authentication. For example, `auto_create:true` will create the user when the authentication token is created. + + + + + + operationId: getFullAccessToken + parameters: [] + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/GetFullAccessTokenRequest' + required: true + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/Token' + description: Bearer auth token creation successful. + "400": + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + description: Invalid request. + "401": + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + description: Unauthorized access. + "403": + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + description: Forbidden access. + "500": + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + description: Unexpected error + security: [] + tags: + - Authentication + - ThoughtSpotRest + x-content-type: application/json + x-accepts: + - application/json + /api/rest/2.0/auth/token/object: + post: + description: |2+ + + Version: 9.0.0.cl or later + + + Generates an authentication token that provides access to a specific metadata object. This object list is intersected with the list of objects the user is allowed to access via group membership. For more information, see [Object security](https://docs.thoughtspot.com/cloud/latest/security-data-object#object_security). + + #### Usage guidelines + + You can generate a token for a user by providing a `username` and `password`, or by using the `secret_key` generated for your instance. To generate a `secret_key`, the administrator must enable [Trusted authentication](https://developers.thoughtspot.com/docs/trusted-auth-secret-key) in the **Develop** > **Customizations** > **Security Settings** page. + + **Note**: + * When both `password` and `secret_key` are included in the API request, `password` takes precedence. + * If [Multi-Factor Authentication (MFA)](https://docs.thoughtspot.com/cloud/latest/authentication-local-mfa) is enabled on your instance, the API login request with `username` and `password` returns an error. You can switch to token-based authentication with `secret_key` or contact ThoughtSpot Support for assistance. + + The token obtained from ThoughtSpot is valid for 5 minutes by default. You can configure the token expiration time as required. + + #### Just-in-time provisioning + + For [just-in-time user creation and provisioning](https://developers.thoughtspot.com/docs/just-in-time-provisioning), specify the following attributes in the API request: + + * `auto_create` + * `username` + * `display_name` + * `email` + * `group_identifiers` + + Set `auto_create` to `true` if the user is not available in ThoughtSpot. If the user already exists in ThoughtSpot and the `auto_create` parameter is set to `true`, user properties such as display name, email, and group assignment will be updated. + + To add a new user and assign privileges, the `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege is required. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled, the `CONTROL_TRUSTED_AUTH`(**Can Enable or Disable Trusted Authentication**) privilege is required. + + #### Important point to note + + All options in the token creation APIs that define user access to data in ThoughtSpot will take effect during token creation, not when the token is used for authentication. For example, `auto_create:true` will create the user when the authentication token is created. + + + + + + operationId: getObjectAccessToken + parameters: [] + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/GetObjectAccessTokenRequest' + required: true + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/Token' + description: Bearer auth token creation successful. + "400": + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + description: Invalid request. + "401": + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + description: Unauthorized access. + "403": + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + description: Forbidden access. + "500": + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + description: Unexpected error + security: [] + tags: + - Authentication + - ThoughtSpotRest + x-content-type: application/json + x-accepts: + - application/json + /api/rest/2.0/auth/session/login: + post: + description: |2+ + + Version: 9.0.0.cl or later + + + Creates a login session for a ThoughtSpot user with Basic authentication. + + In Basic authentication method, REST clients log in to ThoughtSpot using `username` and `password` attributes. On a multi-tenant cluster with Orgs, users can pass the ID of the Org in the API request to log in to a specific Org context. + + **Note**: If Multi-Factor Authentication (MFA) is enabled on your instance, the API login request with basic authentication (`username` and `password` ) returns an error. Contact ThoughtSpot Support for assistance. + + A successful login returns a session cookie that can be used in your subsequent API requests. + + + + + operationId: login + parameters: [] + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/LoginRequest' + required: true + responses: + "204": + description: User login successful. + "400": + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + description: Invalid request. + "401": + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + description: Unauthorized access. + "403": + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + description: Forbidden access. + "500": + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + description: Unexpected error + tags: + - Authentication + - ThoughtSpotRest + x-content-type: application/json + x-accepts: + - application/json + /api/rest/2.0/auth/session/logout: + post: + description: |2+ + + Version: 9.0.0.cl or later + + + + Logs out a user from their current session. + + + + + + operationId: logout + parameters: [] + responses: + "204": + description: User logout successful. + "400": + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + description: Invalid request. + "401": + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + description: Unauthorized access. + "403": + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + description: Forbidden access. + "500": + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + description: Unexpected error + tags: + - Authentication + - ThoughtSpotRest + x-accepts: + - application/json + /api/rest/2.0/auth/token/revoke: + post: + description: |2+ + + Version: 9.0.0.cl or later + + + + Revokes the authentication token issued for current user session. + + The token of your current session expires when you make a call to the `/api/rest/2.0/auth/token/revoke` endpoint. + the users will not be able to access ThoughtSpot objects until a new token is obtained. + + To restart your session, request for a new token from ThoughtSpot. See [Get Full Access Token](#/http/api-endpoints/authentication/get-full-access-token). + + + + + + operationId: revokeToken + parameters: [] + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/RevokeTokenRequest' + required: true + responses: + "204": + description: Token successfully revoked. + "400": + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + description: Invalid request. + "401": + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + description: Unauthorized access. + "403": + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + description: Forbidden access. + "500": + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + description: Unexpected error + tags: + - Authentication + - ThoughtSpotRest + x-content-type: application/json + x-accepts: + - application/json + /api/rest/2.0/auth/search: + post: + description: |2+ + + Version: 26.6.0.cl or later + + + Returns the authentication configuration for the specified auth type at cluster and org level. Currently supports `TRUSTED_AUTH`. + + #### Required privileges + + Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) or `CONTROL_TRUSTED_AUTH` (**Can Enable or Disable Trusted Authentication**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled, the `CONTROL_TRUSTED_AUTH` privilege is required. + + #### Usage guidelines + + Use `scope` to control which level of settings are returned: + - `CLUSTER` — Returns cluster-level authentication status and access tokens. Accessible only from the Primary Org. + - `ORG` — Returns org-level authentication status and access tokens for the current Org. Requires the per-Org authentication feature to be enabled on your instance. + - If `scope` is omitted, both cluster and org-level settings are returned based on the caller's org context and feature availability. + + The `access_tokens` array in `cluster_preferences` or `org_preferences` is omitted when no token is configured at that level. + + **Note**: Access tokens returned in the response are sensitive credentials. Treat them with the same care as passwords. + + + + + + operationId: searchAuthSettings + parameters: [] + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/SearchAuthSettingsRequest' + required: true + responses: + "200": + content: + application/json: + examples: + example_1: + value: + auth_type: TRUSTED_AUTH + cluster_preferences: + auth_status: ENABLED + access_tokens: + - key: a1b2c3d4-e5f6-7890-abcd-ef1234567890 + org_preferences: + - org: + id: 583464508 + name: sales_org + auth_status: ENABLED + access_tokens: + - key: f9e8d7c6-b5a4-3210-fedc-ba9876543210 + schema: + $ref: '#/components/schemas/SearchAuthSettingsResponse' + description: Authentication settings retrieved successfully. + "400": + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + description: Invalid request. + "401": + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + description: Unauthorized access. + "403": + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + description: Forbidden access. + "500": + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + description: Unexpected error + tags: + - Authentication + - ThoughtSpotRest + x-content-type: application/json + x-accepts: + - application/json + /api/rest/2.0/auth/token/validate: + post: + description: |2+ + + Version: 9.12.0.cl or later + + + + Validates the authentication token specified in the API request. + + If your token is not valid, [Get a new token](#/http/api-endpoints/authentication/get-full-access-token). + + + + + + operationId: validateToken + parameters: [] + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/ValidateTokenRequest' + required: true + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/TokenValidationResponse' + description: Token validation successful. + "400": + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + description: Invalid request. + "401": + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + description: Unauthorized access. + "403": + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + description: Forbidden access. + "500": + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + description: Unexpected error + tags: + - Authentication + - ThoughtSpotRest + x-content-type: application/json + x-accepts: + - application/json + /api/rest/2.0/collections/create: + post: + description: |2+ + + Version: 26.4.0.cl or later + + + Creates a new collection in ThoughtSpot. + + Collections allow you to organize and group related metadata objects such as Liveboards, Answers, worksheets, and other data objects. You can also create nested collections (sub-collections) to build a hierarchical structure. + + #### Supported operations + + The API endpoint lets you perform the following operations: + + * Create a new collection + * Add metadata objects (Liveboards, Answers, Logical Tables) to the collection + * Create nested collections by adding sub-collections + + + + + + operationId: createCollection + parameters: [] + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/CreateCollectionRequest' + required: true + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/Collection' + description: Collection created successfully + "400": + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + description: Invalid request. + "401": + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + description: Unauthorized access. + "403": + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + description: Forbidden access. + "500": + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + description: Unexpected error + tags: + - Collections + - ThoughtSpotRest + x-content-type: application/json + x-accepts: + - application/json + /api/rest/2.0/collections/delete: + post: + description: |2+ + + Version: 26.4.0.cl or later + + + Deletes one or more collections from ThoughtSpot. + + #### Delete options + + * **delete_children**: When set to `true`, deletes the child objects (metadata items) within the collection that the user has access to. Objects that the user does not have permission to delete will be skipped. + * **dry_run**: When set to `true`, performs a preview of the deletion operation without actually deleting anything. The response shows what would be deleted, allowing you to review before committing the deletion. + + #### Response + + The response includes: + * **metadata_deleted**: List of metadata objects that were successfully deleted + * **metadata_skipped**: List of metadata objects that were skipped due to lack of permissions or other constraints + + + + + + operationId: deleteCollection + parameters: [] + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/DeleteCollectionRequest' + required: true + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/CollectionDeleteResponse' + description: Collections deleted successfully. + "400": + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + description: Invalid request. + "401": + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + description: Unauthorized access. + "403": + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + description: Forbidden access. + "404": + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + description: Resource not found. + "500": + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + description: Unexpected error + tags: + - Collections + - ThoughtSpotRest + x-content-type: application/json + x-accepts: + - application/json + /api/rest/2.0/collections/search: + post: + description: |2+ + + Version: 26.4.0.cl or later + + + Gets a list of collections available in ThoughtSpot. + + To get details of a specific collection, specify the collection GUID or name. You can also filter the API response based on the collection name pattern, author, and other criteria. + + #### Search options + + * **name_pattern**: Use '%' as a wildcard character to match collection names + * **collection_identifiers**: Search for specific collections by their GUIDs or names + * **include_metadata**: When set to `true`, includes the metadata objects within each collection in the response + + **NOTE**: If the API returns an empty list, consider increasing the value of the `record_size` parameter. To search across all available collections, set `record_size` to `-1`. + + + + + + operationId: searchCollections + parameters: [] + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/SearchCollectionsRequest' + required: true + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/CollectionSearchResponse' + description: Successfully retrieved list of collections + "400": + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + description: Invalid request. + "401": + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + description: Unauthorized access. + "403": + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + description: Forbidden access. + "500": + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + description: Unexpected error + tags: + - Collections + - ThoughtSpotRest + x-content-type: application/json + x-accepts: + - application/json + /api/rest/2.0/collections/{collection_identifier}/update: + post: + description: |2+ + + Version: 26.4.0.cl or later + + + Updates an existing collection in ThoughtSpot. + + #### Supported operations + + This API endpoint lets you perform the following operations: + + * Update collection name and description + * Change visibility settings + * Add metadata objects to the collection (operation: ADD) + * Remove metadata objects from the collection (operation: REMOVE) + * Replace all metadata objects in the collection (operation: REPLACE) + + #### Operation types + + * **ADD**: Adds the specified metadata objects to the existing collection without removing current items + * **REMOVE**: Removes only the specified metadata objects from the collection + * **REPLACE**: Replaces all existing metadata objects with the specified items (default behavior) + + + + + + operationId: updateCollection + parameters: + - description: |- + Unique GUID of the collection. Note: Collection names cannot be used as + identifiers since duplicate names are allowed. + explode: false + in: path + name: collection_identifier + required: true + schema: + type: string + style: simple + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/UpdateCollectionRequest' + required: true + responses: + "204": + description: Collection updated successfully. No content returned. + "400": + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + description: Invalid request. + "401": + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + description: Unauthorized access. + "403": + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + description: Forbidden access. + "404": + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + description: Resource not found. + "500": + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + description: Unexpected error + tags: + - Collections + - ThoughtSpotRest + x-content-type: application/json + x-accepts: + - application/json + /api/rest/2.0/connection-configurations/search: + post: + description: |2+ + + Version: 10.12.0.cl or later + + + Gets connection configuration objects. + + Requires `DATAMANAGEMENT` (**Can manage data**) and edit permissions to the connection object, or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. + + If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) privilege is required. + + #### Usage guidelines + * To get a list of all configurations available in the ThoughtSpot system, send the API request with only the connection name or GUID in the request body. + * To fetch details of a configuration object, specify the configuration object name or GUID. + + + + + + operationId: connectionConfigurationSearch + parameters: [] + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/ConnectionConfigurationSearchRequest' + required: true + responses: + "200": + content: + application/json: + schema: + items: + $ref: '#/components/schemas/ConnectionConfigurationResponse' + type: array + description: Configuration fetched successfully. + "400": + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + description: Invalid request. + "401": + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + description: Unauthorized access. + "403": + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + description: Forbidden access. + "500": + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + description: Unexpected error + tags: + - Connection Configurations + - ThoughtSpotRest + x-content-type: application/json + x-accepts: + - application/json + /api/rest/2.0/connection-configurations/create: + post: + description: "\n Version: 10.12.0.cl or later\n\n\nCreates an additional configuration\ + \ to an existing connection to a data warehouse. \n\nRequires `DATAMANAGEMENT`\ + \ (**Can manage data**) or `ADMINISTRATION` (**Can administer ThoughtSpot**)\ + \ privilege.\n\nIf [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac)\ + \ is enabled on your instance, the `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can\ + \ create/edit Connections**) privilege is required.\n\n#### Usage guidelines\n\ + \n * A JSON map of configuration attributes in `configuration`. The following\ + \ example shows the configuration attributes:\n ```\n {\n \"user\"\ + :\"DEV_USER\",\n \"password\":\"TestConn123\",\n \"role\":\"DEV\"\ + ,\n \"warehouse\":\"DEV_WH\"\n }\n ```\n\n* If the `policy_type` is\ + \ `PRINCIPALS`, then `policy_principals` is a required field.\n* If the `policy_type`\ + \ is `PROCESSES`, then `policy_processes` is a required field.\n* If the `policy_type`\ + \ is `NO_POLICY`, then `policy_principals` and `policy_processes` are not\ + \ required fields.\n\n#### Parameterized Connection Support\nFor parameterized\ + \ connections that use OAuth authentication, only the same_as_parent and policy_process_options\ + \ attributes are allowed in the API request. These attributes are not applicable\ + \ to connections that are not parameterized.\n\n\n\n\n\n\n" + operationId: createConnectionConfiguration + parameters: [] + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/CreateConnectionConfigurationRequest' + required: true + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/ConnectionConfigurationResponse' + description: Connection configuration successfully created. + "400": + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + description: Invalid request. + "401": + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + description: Unauthorized access. + "403": + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + description: Forbidden access. + "500": + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + description: Unexpected error + tags: + - Connection Configurations + - ThoughtSpotRest + x-content-type: application/json + x-accepts: + - application/json + /api/rest/2.0/connection-configurations/delete: + post: + description: |2+ + + Version: 10.12.0.cl or later + + + Deletes connection configuration objects. + + Requires `DATAMANAGEMENT` (**Can manage data**) and edit permissions to the connection object, or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. + + If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) privilege is required. + + + + + + operationId: deleteConnectionConfiguration + parameters: [] + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/DeleteConnectionConfigurationRequest' + required: true + responses: + "204": + description: Connection Configurations successfully deleted. + "400": + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + description: Invalid request. + "401": + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + description: Unauthorized access. + "403": + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + description: Forbidden access. + "500": + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + description: Unexpected error + tags: + - Connection Configurations + - ThoughtSpotRest + x-content-type: application/json + x-accepts: + - application/json + /api/rest/2.0/connection-configurations/{configuration_identifier}/update: + post: + description: |2+ + + Version: 10.12.0.cl or later + + + Updates a connection configuration object. + + Requires `DATAMANAGEMENT` (**Can manage data**) and edit permissions to the connection object, or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. + + If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) privilege is required. + + #### Supported operations + This API endpoint lets you perform the following operations in a single API request: + + * Edit the name or description of the configuration + * Edit the configuration properties + * Edit the `policy_type` + * Edit the type of authentication + * Enable or disable a configuration + + #### Parameterized Connection Support + For parameterized oauth based connections, only the `same_as_parent` and `policy_process_options` attributes are allowed. These attributes are not applicable to connections that are not parameterized. + + **NOTE**: When updating a configuration where `disabled` is `true`, you must reset `disabled` to `true` in your update request payload. If not explicitly set again, the API will default `disabled` to `false`. + + + + + + operationId: updateConnectionConfiguration + parameters: + - description: Unique ID or name of the configuration. + explode: false + in: path + name: configuration_identifier + required: true + schema: + type: string + style: simple + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/UpdateConnectionConfigurationRequest' + required: true + responses: + "204": + description: Connection configuration successfully updated. + "400": + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + description: Invalid request. + "401": + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + description: Unauthorized access. + "403": + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + description: Forbidden access. + "500": + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + description: Unexpected error + tags: + - Connection Configurations + - ThoughtSpotRest + x-content-type: application/json + x-accepts: + - application/json + /api/rest/2.0/connection/create: + post: + description: "\n Version: 9.2.0.cl or later\n\n\nCreates a connection to a data\ + \ warehouse for live query services. \n\nRequires `DATAMANAGEMENT` (**Can\ + \ manage data**) or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege.\n\ + If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac)\ + \ is enabled on your instance, the `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can\ + \ create/edit Connections**) privilege is required.\n\n#### Create a connection\ + \ without tables\n\nTo create a connection without tables:\n\n1. Pass these\ + \ parameters in your API request.\n * Name of the connection.\n * Type of\ + \ the data warehouse to connect to.\n * A JSON map of configuration attributes\ + \ in `data_warehouse_config`. The following example shows the configuration\ + \ attributes for a SnowFlake connection:\n ```\n {\n \"configuration\"\ + :{\n \"accountName\":\"thoughtspot_partner\",\n \"user\":\"\ + tsadmin\",\n \"password\":\"TestConn123\",\n \"role\":\"sysadmin\"\ + ,\n \"warehouse\":\"MEDIUM_WH\"\n },\n \"authenticationType\"\ + : \"SERVICE_ACCOUNT\",\n \"externalDatabases\":[\n\n ]\n }\n ```\n\ + 2. Set `validate` to `false`.\n\n**NOTE:** If the `authentication_type` is\ + \ anything other than SERVICE_ACCOUNT, you must explicitly provide the authenticationType\ + \ property in the payload. If you do not specify authenticationType, the API\ + \ will default to SERVICE_ACCOUNT as the authentication type.\n\n#### Create\ + \ a connection with tables\n\nIf [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac)\ + \ is enabled on your instance, the `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can\ + \ create/edit Connections**) and `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` (**Can\ + \ manage data models**) privilege is required.\n\nTo create a connection with\ + \ tables:\n\n1. Pass these parameters in your API request.\n * Name of the\ + \ connection.\n * Type of the data warehouse to connect to.\n * A JSON map\ + \ of configuration attributes, database details, and table properties in `data_warehouse_config`\ + \ as shown in the following example:\n ```\n {\n \"configuration\":{\n\ + \ \"accountName\":\"thoughtspot_partner\",\n \"user\":\"tsadmin\"\ + ,\n \"password\":\"TestConn123\",\n \"role\":\"sysadmin\",\n\ + \ \"warehouse\":\"MEDIUM_WH\"\n },\n \"authenticationType\"\ + : \"SERVICE_ACCOUNT\",\n \"externalDatabases\":[\n {\n \ + \ \"name\":\"AllDatatypes\",\n \"isAutoCreated\":false,\n \ + \ \"schemas\":[\n {\n \"name\":\"alldatatypes\"\ + ,\n \"tables\":[\n {\n \ + \ \"name\":\"allDatatypes\",\n \"type\":\"TABLE\"\ + ,\n \"description\":\"\",\n \"\ + selected\":true,\n \"linked\":true,\n \ + \ \"columns\":[\n {\n \ + \ \"name\":\"CNUMBER\",\n \"type\":\"\ + INT64\",\n \"canImport\":true,\n \ + \ \"selected\":true,\n \"isLinkedActive\"\ + :true,\n \"isImported\":false,\n \ + \ \"tableName\":\"allDatatypes\",\n \ + \ \"schemaName\":\"alldatatypes\",\n \"dbName\"\ + :\"AllDatatypes\"\n },\n \ + \ {\n \"name\":\"CDECIMAL\",\n \ + \ \"type\":\"INT64\",\n \"canImport\"\ + :true,\n \"selected\":true,\n \ + \ \"isLinkedActive\":true,\n \"isImported\"\ + :false,\n \"tableName\":\"allDatatypes\",\n \ + \ \"schemaName\":\"alldatatypes\",\n \ + \ \"dbName\":\"AllDatatypes\"\n \ + \ }\n ]\n }\n ]\n\ + \ }\n ]\n }\n ]\n }\n ```\n2. Set `validate`\ + \ to `true`.\n\n**NOTE:** If the `authentication_type` is anything other than\ + \ SERVICE_ACCOUNT, you must explicitly provide the authenticationType property\ + \ in the payload. If you do not specify authenticationType, the API will default\ + \ to SERVICE_ACCOUNT as the authentication type.\n\n\n\n\n\n" + operationId: createConnection + parameters: [] + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/CreateConnectionRequest' + required: true + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/CreateConnectionResponse' + description: Connection to the datasource successfully created. + "400": + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + description: Invalid request. + "401": + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + description: Unauthorized access. + "403": + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + description: Forbidden access. + "500": + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + description: Unexpected error + tags: + - Connections + - ThoughtSpotRest + x-content-type: application/json + x-accepts: + - application/json + /api/rest/2.0/connection/delete: + post: + deprecated: true + description: "\n Version: 9.2.0.cl or later\n\n\n\n**Important**: This endpoint\ + \ is deprecated and will be removed from ThoughtSpot in September 2025. ThoughtSpot\ + \ strongly recommends using the\n[Delete Connection V2](#/http/api-endpoints/connections/delete-connection-v2)\ + \ endpoint to delete your connection objects. \n\n#### Usage guidelines\n\ + \nDeletes a connection object.\n\nRequires `DATAMANAGEMENT` (**Can manage\ + \ data**) and edit permissions to the connection object, or `ADMINISTRATION`\ + \ (**Can administer ThoughtSpot**) privilege.\nIf [Role-Based Access Control\ + \ (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your\ + \ instance, the `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**)\ + \ privilege is required.\n\n**Note**: If a connection has dependent objects,\ + \ make sure you remove its associations before the delete operation.\n\n\n\ + \n\n" + operationId: deleteConnection + parameters: [] + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/DeleteConnectionRequest' + required: true + responses: + "204": + description: Connection successfully deleted. + "400": + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + description: Invalid request. + "401": + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + description: Unauthorized access. + "403": + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + description: Forbidden access. + "500": + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + description: Unexpected error + tags: + - Connections + - ThoughtSpotRest + x-content-type: application/json + x-accepts: + - application/json + /api/rest/2.0/connections/{connection_identifier}/delete: + post: + description: |2+ + + Version: 10.4.0.cl or later + + + Deletes a connection object. + + **Note**: If a connection has dependent objects, make sure you remove its associations before the delete operation. + + Requires `DATAMANAGEMENT` (**Can manage data**) and edit permissions to the connection object, or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. + If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) privilege is required. + + + + + + operationId: deleteConnectionV2 + parameters: + - description: Unique ID or name of the connection. + explode: false + in: path + name: connection_identifier + required: true + schema: + type: string + style: simple + responses: + "204": + description: Connection successfully deleted. + "400": + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + description: Invalid request. + "401": + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + description: Unauthorized access. + "403": + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + description: Forbidden access. + "500": + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + description: Unexpected error + tags: + - Connections + - ThoughtSpotRest + x-accepts: + - application/json + /api/rest/2.0/connections/download-connection-metadata-changes/{connection_identifier}: + post: + description: "\n Version: 9.9.0.cl or later\n\n\nExports the difference in connection\ + \ metadata between CDW and ThoughtSpot\n\nRequires `DATAMANAGEMENT` (**Can\ + \ manage data**) privilege.\nIf [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac)\ + \ is enabled on your instance, the following Data control privileges may be\ + \ required: \n- `CAN_MANAGE_CUSTOM_CALENDAR`(**Can manage custom calendars**)\n\ + - `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**)\n- `CAN_MANAGE_WORKSHEET_VIEWS_TABLES`\ + \ (**Can manage data models**)\n\nTo download the connection metadata difference\ + \ between ThoughtSpot and CDW, pass the connection GUID as `connection_identifier`\ + \ in the API request.\n\n\n\n\n\n" + operationId: downloadConnectionMetadataChanges + parameters: + - description: GUID of the connection + explode: false + in: path + name: connection_identifier + required: true + schema: + type: string + style: simple + responses: + "200": + content: + application/octet-stream: + schema: + format: binary + type: string + description: Export metadata changes. + "400": + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + description: Invalid request. + "401": + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + description: Unauthorized access. + "403": + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + description: Forbidden access. + "500": + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + description: Unexpected error + tags: + - Connections + - ThoughtSpotRest + x-accepts: + - application/json + - application/octet-stream + /api/rest/2.0/connections/fetch-connection-diff-status/{connection_identifier}: + post: + description: |2+ + + Version: 9.9.0.cl or later + + + Validates the difference in connection metadata between CDW and ThoughtSpot. + + Requires `DATAMANAGEMENT` (**Can manage data**) privilege. + If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the following Data control privileges may be required: + + - `CAN_MANAGE_CUSTOM_CALENDAR`(**Can manage custom calendars**) + - `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) + - `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` (**Can manage data models**) + + Returns a boolean indicating whether there is any difference between the connection metadata at ThoughtSpot and CDW. + + To get the connection metadata difference status, pass the connection GUID as `connection_identifier` in the API request. + + + + + + operationId: fetchConnectionDiffStatus + parameters: + - description: GUID of the connection + explode: false + in: path + name: connection_identifier + required: true + schema: + type: string + style: simple + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/FetchConnectionDiffStatusResponse' + description: true/false + "400": + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + description: Invalid request. + "401": + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + description: Unauthorized access. + "403": + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + description: Forbidden access. + "500": + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + description: Unexpected error + tags: + - Connections + - ThoughtSpotRest + x-accepts: + - application/json + /api/rest/2.0/connections/{connection_identifier}/revoke-refresh-tokens: + post: + description: |2+ + + Version: 26.2.0.cl or later + + + Revokes OAuth refresh tokens for users who no longer require access to a data warehouse connection. + When a token is revoked, the affected user's session for that connection is terminated, and they must re-authenticate to regain access. + + Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) or `DATAMANAGEMENT` (**Can manage data**) privileges. + If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on the ThoughtSpot instance, users with `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) privilege can also make API requests to revoke tokens for connection users. + + #### Usage guidelines + + You can specify different combinations of identifiers to control which refresh tokens are revoked. + + - **connection_identifier**: Revokes refresh tokens for all users of the connection, except the connection author. + - **connection_identifier** and **user_identifiers**: Revokes refresh tokens only for the users specified in the request. If the name or ID of the connection author is included in the request, their token will also be revoked. + - **connection_identifier** and **configuration_identifiers**: Revokes refresh tokens for all users on the specified configurations, except the configuration author. + - **connection_identifier**, **configuration_identifiers**, and **user_identifiers**: Revokes refresh tokens for the specified users on the specified configurations. + - **connection_identifier** and **org_identifiers**: Revokes refresh tokens for the specified Orgs. Applicable only for published connections. + - **connection_identifier**, **org_identifiers**, and **user_identifiers**: Revokes refresh tokens for the specified users in the specified Orgs. Applicable only for published connections. + + **NOTE**: The `org_identifiers` parameter is only applicable for published connections. Using this parameter for unpublished connections will result in an error. Ensure that the connections are published before making the API request. + + + + + + operationId: revokeRefreshTokens + parameters: + - description: Unique ID or name of the connection whose refresh tokens need + to be revoked. All the users associated with the connection will have their + refresh tokens revoked except the author. + explode: false + in: path + name: connection_identifier + required: true + schema: + type: string + style: simple + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/RevokeRefreshTokensRequest' + required: true + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/RevokeRefreshTokensResponse' + description: Token(s) successfully revoked. + "400": + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + description: Invalid request. + "401": + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + description: Unauthorized access. + "403": + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + description: Forbidden access. + "404": + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + description: Object not found + "409": + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + description: Conflict + "500": + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + description: Unexpected error + tags: + - Connections + - ThoughtSpotRest + x-content-type: application/json + x-accepts: + - application/json + /api/rest/2.0/connection/search: + post: + description: |2+ + + Version: 9.2.0.cl or later + + + Gets connection objects. + Requires `DATAMANAGEMENT` (**Can manage data**) or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. + If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) privilege is required. + + - To get a list of all connections available in the ThoughtSpot system, send the API request without any attributes in the request body. + - To get the connection objects for a specific type of data warehouse, specify the type in `data_warehouse_types`. + - To fetch details of a connection object, specify the connection object GUID or name. The `name_pattern` attribute allows passing partial text with `%` for a wildcard match. + - To get details of the database, schemas, tables, or columns from a data connection object, specify `data_warehouse_object_type`. + - To get a specific database, schema, table, or column from a connection object, define the object type in `data_warehouse_object_type` and object properties in the `data_warehouse_objects` array. For example, to search for a column, you must pass the database, schema, and table names in the API request. + Note that in the following example, object properties are set in a hierarchical order (`database` > `schema` > `table` > `column`). + + ``` + { + "connections": [ + { + "identifier": "b9d1f2ef-fa65-4a4b-994e-30fa2d57b0c2", + "data_warehouse_objects": [ + { + "database": "NEBULADEV", + "schema": "INFORMATION_SCHEMA", + "table": "APPLICABLE_ROLES", + "column": "ROLE_NAME" + } + ] + } + ], + "data_warehouse_object_type": "COLUMN" + } + ``` + + - To fetch data by `configuration`, specify `data_warehouse_object_type`. For example, to fetch columns from the `DEVELOPMENT` database, specify the `data_warehouse_object_type` as `DATABASE` and define the `configuration` string as `{"database":"DEVELOPMENT"}`. To get column data for a specific table, specify the table, for example,`{"database":"RETAILAPPAREL","table":"PIPES"}`. + - To query connections by `authentication_type`, specify `data_warehouse_object_type`. Supported values for `authentication_type` are: + - `SERVICE_ACCOUNT`: For connections that require service account credentials to authenticate to the Cloud Data Warehouse and fetch data. + - `OAUTH`: For connections that require OAuth credentials to authenticate to the Cloud Data Warehouse and fetch data. Teradata, Oracle, and Presto Cloud Data Warehouses do not support the OAuth authentication type. + - `IAM`: For connections that have the IAM OAuth set up. This authentication type is supported on Amazon Redshift connections only. + - `EXTOAUTH`: For connections that have External OAuth set up. ThoughtSpot supports external [OAuth with Microsoft Azure Active Directory (AD)](https://docs.thoughtspot.com/cloud/latest/ connections-snowflake-azure-ad-oauth) and [Okta for Snowflake data connections](https://docs.thoughtspot.com/cloud/latest/connections-snowflake-okta-oauth). + - `KEY_PAIR`: For connections that require Key Pair account credentials to authenticate to the Cloud Data Warehouse and fetch data. This authentication type is supported on Snowflake connections only. + - `OAUTH_WITH_PKCE`: For connections that require OAuth with PKCE account credentials to authenticate to the Cloud Data Warehouse and fetch data. This authentication type is supported on Snowflake, Starburst, Databricks, Denodo connections only. + - `EXTOAUTH_WITH_PKCE`: For connections that require External OAuth With PKCE account credentials to authenticate to the Cloud Data Warehouse and fetch data. This authentication type is supported on Snowflake connections only. + - `OAUTH_WITH_PEZ`: For connections that require OAuth With PEZ account credentials to authenticate to the Cloud Data Warehouse and fetch data. This authentication type is supported on Amazon Redshift connections only. + - `OAUTH_WITH_SERVICE_PRINCIPAL`: For connections that require OAuth With Service Principal account credentials to authenticate to the Cloud Data Warehouse and fetch data. This authentication type is supported on Databricks connections only. + - `PERSONAL_ACCESS_TOKEN`: For connections that require Personal Access Token account credentials to authenticate to the Cloud Data Warehouse and fetch data. This authentication type is supported on Databricks connections only. + - `OAUTH_CLIENT_CREDENTIALS`: For connections that require OAuth Client Credentials to authenticate to the Cloud Data Warehouse and fetch data. This authentication type is supported on Snowflake connections only. + - To include more details about connection objects in the API response, set `include_details` to `true`. + - You can also sort the output by field names and filter connections by tags. + + **NOTE**: When filtering connection records by parameters other than `data_warehouse_types` or `tag_identifiers`, ensure that you set `record_size` to `-1` and `record_offset` to `0` for precise results. + + + + + + operationId: searchConnection + parameters: [] + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/SearchConnectionRequest' + required: true + responses: + "200": + content: + application/json: + schema: + items: + $ref: '#/components/schemas/SearchConnectionResponse' + type: array + description: List of connections to the datasource. + "400": + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + description: Invalid request. + "401": + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + description: Unauthorized access. + "403": + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + description: Forbidden access. + "500": + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + description: Unexpected error + tags: + - Connections + - ThoughtSpotRest + x-content-type: application/json + x-accepts: + - application/json + /api/rest/2.0/connections/{connection_identifier}/resync-metadata: + post: + description: |2+ + + Version: 26.5.0.cl or later + + + Synchronizes connection metadata attributes from your Cloud Data Warehouse (CDW) with ThoughtSpot. + + Requires the `DATAMANAGEMENT` (**Can manage data**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` (**Can manage data models**) privilege is required. + + #### Usage guidelines + + To synchronize attributes from a CDW, specify the connection GUID or name in the `connection_identifier` path parameter and `sync_attributes` in the request body. Default attribute is `["DESCRIPTION"]`. + + ##### Hierarchical schema + + * Connection: The connection object for the sync operation. + * Tables: Tables for the sync operation. When no table is specified, all tables are synchronized. + * Columns: If the table is specified, you can add the columns for the sync operation. If no columns are specified, all columns in the specified table are considered for the sync operation. + + To set the scope for the sync operation: + + * Connection-level: To sync all tables and columns, pass an empty request body, or only the attributes in the request body. + * Table-level: To synchronize specific tables and their columns, specify the table identifiers in the `tables` array. + * Column-level: To synchronize specific columns, specify the table identifier as the key and column identifiers as the value in the `tables` array. + + ``` + { + "tables": [ + {"table-guid-1": ["column-guid-1", "column-guid-2"]}, + "table-guid-2" + ], + "sync_attributes": ["DESCRIPTION"] + } + ``` + + ##### API response + + If the sync operation is successful, the API returns the following information: + + * Status of the sync operation. For example, `SUCCESS`, `PARTIAL_SUCCESS`, or `NO_UPDATE`. + * Number of tables and columns that were updated. + * Number of tables and columns with the sync failed status when the overall sync status is `PARTIAL_SUCCESS`. + * Message text indicating the sync results. + + + + + + operationId: syncMetadata + parameters: + - description: Unique ID or name of the connection. + explode: false + in: path + name: connection_identifier + required: true + schema: + type: string + style: simple + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/SyncMetadataRequest' + required: true + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/SyncMetadataResponse' + description: Metadata synced successfully. + "400": + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + description: Invalid request parameters or hierarchy. + "401": + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + description: Unauthorized access. + "403": + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + description: Forbidden access. + "404": + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + description: "Connection, table, or column not found." + "500": + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + description: Unexpected error + tags: + - Connections + - ThoughtSpotRest + x-content-type: application/json + x-accepts: + - application/json + /api/rest/2.0/connection/update: + post: + deprecated: true + description: "\n Version: 9.2.0.cl or later\n\n\n**Important**: This endpoint\ + \ is deprecated and will be removed from ThoughtSpot in September 2025. ThoughtSpot\ + \ strongly recommends using the\n[Update connection V2](#/http/api-endpoints/connections/update-connection-v2)\ + \ endpoint to update your connection objects.\n\n#### Usage guidelines\n\n\ + Updates a connection object. \n\nRequires `DATAMANAGEMENT` (**Can manage\ + \ data**) and edit permissions to the connection object, or `ADMINISTRATION`\ + \ (**Can administer ThoughtSpot**) privilege.\nIf [Role-Based Access Control\ + \ (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your\ + \ instance, the `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**)\ + \ privilege is required.\n\nTo update a connection object, pass these parameters\ + \ in your API request:\n\n1. GUID of the connection object.\n2. If you are\ + \ updating tables or database schema of a connection object:\n a. Add the\ + \ updated JSON map of metadata with database, schema, and tables in `data_warehouse_config`.\n\ + \ b. Set `validate` to `true`.\n3. If you are updating a configuration attribute,\ + \ connection name, or description, you can set `validate` to `false`.\n\n\n\ + \n\n\n" + operationId: updateConnection + parameters: [] + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/UpdateConnectionRequest' + required: true + responses: + "204": + description: Connection successfully updated. + "400": + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + description: Invalid request. + "401": + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + description: Unauthorized access. + "403": + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + description: Forbidden access. + "500": + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + description: Unexpected error + tags: + - Connections + - ThoughtSpotRest + x-content-type: application/json + x-accepts: + - application/json + /api/rest/2.0/connections/{connection_identifier}/status: + post: + description: |2+ + + Version: 26.6.0.cl or later + + + Activates or deactivates a connection. A deactivated connection cannot be used for queries or operations until it is activated again. + + Requires `DATAMANAGEMENT` (**Can manage data**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) privilege is required. Only the connection owner or an administrator can perform this operation. + + #### Usage guidelines + + To update the status of a connection, specify the connection GUID or name in the `connection_identifier` path parameter and the desired `status` in the request body. + + - **ACTIVATED**: Enables the connection. Queries and operations can resume on an activated connection. + - **DEACTIVATED**: Disables the connection. It does not remove the connection metadata, but only makes the connection unavailable for queries and operations. You can reactivate a deactivated connection by setting "status": "ACTIVATED". + + + + + + + operationId: updateConnectionStatus + parameters: + - description: Unique ID or name of the connection. + explode: false + in: path + name: connection_identifier + required: true + schema: + type: string + style: simple + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/UpdateConnectionStatusRequest' + required: true + responses: + "204": + description: Connection status updated successfully. + "400": + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + description: Invalid request. + "401": + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + description: Unauthorized access. + "403": + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + description: Forbidden access. + "404": + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + description: Object not found + "500": + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + description: Unexpected error + tags: + - Connections + - ThoughtSpotRest + x-content-type: application/json + x-accepts: + - application/json + /api/rest/2.0/connections/{connection_identifier}/update: + post: + description: "\n Version: 10.4.0.cl or later\n\n\nUpdates a connection object.\n\ + \nRequires `DATAMANAGEMENT` (**Can manage data**) and edit permissions to\ + \ the connection object, or `ADMINISTRATION` (**Can administer ThoughtSpot**)\ + \ privilege.\nIf [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac)\ + \ is enabled on your instance, the `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can\ + \ create/edit Connections**) privilege is required.\n\nTo update a connection\ + \ object, pass these parameters in your API request:\n\n1. GUID of the connection\ + \ object.\n2. If you are updating tables or database schema of a connection\ + \ object:\n a. Add the updated JSON map of metadata with database, schema,\ + \ and tables in `data_warehouse_config`.\n b. Set `validate` to `true`.\n\ + \ \n **NOTE:** If the `authentication_type` is anything other than SERVICE_ACCOUNT,\ + \ you must explicitly provide the authenticationType property in the payload.\ + \ If you do not specify authenticationType, the API will default to SERVICE_ACCOUNT\ + \ as the authentication type.\n\n * A JSON map of configuration attributes,\ + \ database details, and table properties in `data_warehouse_config` as shown\ + \ in the following example:\n * This is an example of updating a single\ + \ table in a empty connection:\n \n ```\n {\n \"authenticationType\"\ + : \"SERVICE_ACCOUNT\",\n \"externalDatabases\": [\n {\n \ + \ \"name\": \"DEVELOPMENT\",\n \"isAutoCreated\": false,\n\ + \ \"schemas\": [\n {\n \"name\": \"\ + TS_dataset\",\n \"tables\": [\n {\n \ + \ \"name\": \"DEMORENAME\",\n \"type\": \"\ + TABLE\",\n \"description\": \"\",\n \ + \ \"selected\": true,\n \"linked\": true,\n \ + \ \"gid\": 0,\n \"datasetId\": \"-1\",\n \ + \ \"subType\": \"\",\n \"reportId\": \"\"\ + ,\n \"viewId\": \"\",\n \"columns\"\ + : [\n {\n \"name\": \"Col1\",\n\ + \ \"type\": \"VARCHAR\",\n \"\ + canImport\": true,\n \"selected\": true,\n \ + \ \"description\": \"\",\n \"isLinkedActive\"\ + : true,\n \"isAggregate\": false\n \ + \ },\n {\n \"name\": \"Col2\"\ + ,\n \"type\": \"VARCHAR\",\n \ + \ \"canImport\": true,\n \"selected\": true,\n \ + \ \"description\": \"\",\n \"isLinkedActive\"\ + : true,\n \"isAggregate\": false\n \ + \ },\n {\n \"name\": \"Col3\"\ + ,\n \"type\": \"VARCHAR\",\n \ + \ \"canImport\": true,\n \"selected\": true,\n \ + \ \"description\": \"\",\n \"isLinkedActive\"\ + : true,\n \"isAggregate\": false\n \ + \ },\n {\n \"name\": \"Col312\"\ + ,\n \"type\": \"VARCHAR\",\n \ + \ \"canImport\": true,\n \"selected\": true,\n \ + \ \"description\": \"\",\n \"isLinkedActive\"\ + : true,\n \"isAggregate\": false\n \ + \ },\n {\n \"name\": \"Col4\"\ + ,\n \"type\": \"VARCHAR\",\n \ + \ \"canImport\": true,\n \"selected\": true,\n \ + \ \"description\": \"\",\n \"isLinkedActive\"\ + : true,\n \"isAggregate\": false\n \ + \ }\n ],\n \"relationships\": []\n\ + \ }\n ]\n }\n ]\n\ + \ }\n ],\n \"configuration\": {\n \"password\"\ + : \"\",\n \"database\": \"DEVELOPMENT\",\n \"role\": \"\ + DEV\",\n \"accountName\": \"thoughtspot_partner\",\n \"\ + warehouse\": \"DEMO_WH\",\n \"user\": \"DEV_USER\"\n }\n \ + \ }\n ```\n \n* This is an example of updating a single table\ + \ in an existing connection with tables:\n \n ```\n {\n \ + \ \"authenticationType\": \"SERVICE_ACCOUNT\",\n \"externalDatabases\"\ + : [\n {\n \"name\": \"DEVELOPMENT\",\n \"isAutoCreated\"\ + : false,\n \"schemas\": [\n {\n \"\ + name\": \"TS_dataset\",\n \"tables\": [\n \ + \ {\n \"name\": \"CUSTOMER\",\n \"type\"\ + : \"TABLE\",\n \"description\": \"\",\n \ + \ \"selected\": true,\n \"linked\": true,\n \ + \ \"gid\": 0,\n \"datasetId\": \"-1\",\n \ + \ \"subType\": \"\",\n \"reportId\": \"\ + \",\n \"viewId\": \"\",\n \"columns\"\ + : [],\n \"relationships\": []\n },\n \ + \ {\n \"name\": \"tpch5k_falcon_default_schema_users\"\ + ,\n \"type\": \"TABLE\",\n \"description\"\ + : \"\",\n \"selected\": true,\n \"linked\"\ + : true,\n \"gid\": 0,\n \"datasetId\"\ + : \"-1\",\n \"subType\": \"\",\n \"\ + reportId\": \"\",\n \"viewId\": \"\",\n \ + \ \"columns\": [\n {\n \"\ + name\": \"user_id\",\n \"type\": \"INT64\",\n \ + \ \"canImport\": true,\n \"selected\"\ + : true,\n \"description\": \"\",\n \ + \ \"isLinkedActive\": true,\n \"isAggregate\"\ + : false\n },\n {\n \ + \ \"name\": \"product_id\",\n \"type\": \"\ + INT64\",\n \"canImport\": true,\n \ + \ \"selected\": true,\n \"description\": \"\"\ + ,\n \"isLinkedActive\": true,\n \ + \ \"isAggregate\": false\n },\n \ + \ {\n \"name\": \"user_cost\",\n \ + \ \"type\": \"INT64\",\n \"canImport\": true,\n\ + \ \"selected\": true,\n \"description\"\ + : \"\",\n \"isLinkedActive\": true,\n \ + \ \"isAggregate\": false\n }\n \ + \ ],\n \"relationships\": []\n \ + \ }\n ]\n }\n ]\n }\n \ + \ ],\n \"configuration\": {\n \"password\": \"\",\n \ + \ \"database\": \"DEVELOPMENT\",\n \"role\": \"DEV\",\n \ + \ \"accountName\": \"thoughtspot_partner\",\n \"warehouse\"\ + : \"DEMO_WH\",\n \"user\": \"DEV_USER\"\n }\n }\n \ + \ ```\n\n3. If you are updating a configuration attribute, connection name,\ + \ or description, you can set `validate` to `false`.\n\n **NOTE:** If the\ + \ `authentication_type` is anything other than SERVICE_ACCOUNT, you must explicitly\ + \ provide the authenticationType property in the payload. If you do not specify\ + \ authenticationType, the API will default to SERVICE_ACCOUNT as the authentication\ + \ type.\n\n * A JSON map of configuration attributes in `data_warehouse_config`.\ + \ The following example shows the configuration attributes for a Snowflake\ + \ connection:\n ```\n {\n \"configuration\":{\n \"accountName\"\ + :\"thoughtspot_partner\",\n \"user\":\"tsadmin\",\n \"password\"\ + :\"TestConn123\",\n \"role\":\"sysadmin\",\n \"warehouse\"\ + :\"MEDIUM_WH\"\n },\n \"externalDatabases\":[\n\n ]\n }\n\ + \ ```\n\n\n\n\n\n" + operationId: updateConnectionV2 + parameters: + - description: Unique ID or name of the connection. + explode: false + in: path + name: connection_identifier + required: true + schema: + type: string + style: simple + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/UpdateConnectionV2Request' + required: true + responses: + "204": + description: Connection successfully updated. + "400": + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + description: Invalid request. + "401": + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + description: Unauthorized access. + "403": + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + description: Forbidden access. + "500": + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + description: Unexpected error + tags: + - Connections + - ThoughtSpotRest + x-content-type: application/json + x-accepts: + - application/json + /api/rest/2.0/customization/custom-actions: + post: + description: "\n Version: 9.6.0.cl or later\n\n\nCreates a custom action that\ + \ appears as a menu action on a saved Answer or Liveboard visualization.\n\ + \nRequires `DEVELOPER` (**Has Developer privilege**) or `ADMINISTRATION` (**Can\ + \ administer ThoughtSpot**) privilege.\nIf [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac)\ + \ is enabled on your instance, the `DEVELOPER` (**Has developer privilege**)\ + \ privilege is required.\n\n#### Usage Guidelines\n\nThe API lets you create\ + \ the following types of custom actions:\n\n* URL-based action \n Allows\ + \ pushing data to an external URL.\n* Callback action \n Triggers\ + \ a callback to the host application and initiates a response payload on an\ + \ embedded ThoughtSpot instance.\n\nBy default, custom actions are visible\ + \ to only administrator or developer users. To make a custom action available\ + \ to other users, and specify the groups in `group_identifiers`.\n\nBy default,\ + \ the custom action is set as a _global_ action on all visualizations and\ + \ saved Answers. To assign a custom action to specific Liveboard visualization,\ + \ saved Answer, or Worksheet, set `visibility` to `false` in `default_action_config`\ + \ property and specify the GUID or name of the object in `associate_metadata`.\n\ + \nFor more information, see [Custom actions](https://developers.thoughtspot.com/docs/custom-action-intro).\n\ + \n\n\n\n\n" + operationId: createCustomAction + parameters: [] + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/CreateCustomActionRequest' + required: true + responses: + "200": + content: + application/json: + examples: + example_1: + value: + action_details: + CALLBACK: + reference: customaction + default_action_config: + visibility: true + id: 3d3cad0f-e57b-4faa-8e24-da596c727ee0 + metadata_association: [] + name: customactionsample + user_groups: [] + schema: + $ref: '#/components/schemas/ResponseCustomAction' + description: Custom action created successfully. + "400": + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + description: Invalid request. + "401": + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + description: Unauthorized access. + "403": + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + description: Forbidden access. + "500": + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + description: Unexpected error + tags: + - Custom Action + - ThoughtSpotRest + x-content-type: application/json + x-accepts: + - application/json + /api/rest/2.0/customization/custom-actions/{custom_action_identifier}/delete: + post: + description: |2+ + + Version: 9.6.0.cl or later + + + Removes the custom action specified in the API request. + + Requires `DEVELOPER` (**Has Developer privilege**) or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. + If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `DEVELOPER` (**Has developer privilege**) privilege is required. + + + + + + operationId: deleteCustomAction + parameters: + - description: Unique ID or name of the custom action. + explode: false + in: path + name: custom_action_identifier + required: true + schema: + type: string + style: simple + responses: + "204": + description: Custom action is successfully deleted. + "400": + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + description: Invalid request. + "401": + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + description: Unauthorized access. + "403": + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + description: Forbidden access. + "500": + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + description: Unexpected error + tags: + - Custom Action + - ThoughtSpotRest + x-accepts: + - application/json + /api/rest/2.0/customization/custom-actions/search: + post: + description: |2+ + + Version: 9.6.0.cl or later + + + Gets custom actions configured on the cluster. + + Requires `DEVELOPER` (**Has Developer privilege**) or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. + If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `DEVELOPER` (**Has developer privilege**) privilege is required. + + + + + + operationId: searchCustomActions + parameters: [] + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/SearchCustomActionsRequest' + required: true + responses: + "200": + content: + application/json: + examples: + example_1: + value: + - action_details: + CALLBACK: + reference: LEDE + default_action_config: + visibility: true + id: c59262df-cf9e-4947-96fa-52d494688797 + name: LEDE + schema: + items: + $ref: '#/components/schemas/ResponseCustomAction' + type: array + description: Custom action search is successful. + "400": + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + description: Invalid request. + "401": + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + description: Unauthorized access. + "403": + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + description: Forbidden access. + "500": + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + description: Unexpected error + tags: + - Custom Action + - ThoughtSpotRest + x-content-type: application/json + x-accepts: + - application/json + /api/rest/2.0/customization/custom-actions/{custom_action_identifier}/update: + post: + description: |2+ + + Version: 9.6.0.cl or later + + + Updates a custom action. + + Requires `DEVELOPER` (**Has Developer privilege**) or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. + If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `DEVELOPER` (**Has developer privilege**) privilege is required. + + #### Usage Guidelines + + The API allows you to modify the following properties: + + * Name of the custom action + * Action availability to groups + * Association to metadata objects + * Authentication settings for a URL-based action + + For more information, see [Custom actions](https://developers.thoughtspot.com/docs/custom-action-intro). + + + + + + operationId: updateCustomAction + parameters: + - description: Unique ID or name of the custom action. + explode: false + in: path + name: custom_action_identifier + required: true + schema: + type: string + style: simple + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/UpdateCustomActionRequest' + required: true + responses: + "204": + description: Custom action updated successfully. + "400": + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + description: Invalid request. + "401": + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + description: Unauthorized access. + "403": + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + description: Forbidden access. + "500": + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + description: Unexpected error + tags: + - Custom Action + - ThoughtSpotRest + x-content-type: application/json + x-accepts: + - application/json + /api/rest/2.0/calendars/create: + post: + description: "\n Version: 10.12.0.cl or later\n\n\nCreates a new [custom calendar](https://docs.thoughtspot.com/cloud/latest/connections-cust-cal).\n\ + \nRequires `DATAMANAGEMENT` (**Can manage data**) or `ADMINISTRATION` (**Can\ + \ administer ThoughtSpot**) privilege.\nIf [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac)\ + \ is enabled on your ThoughtSpot instance, the `CAN_MANAGE_CUSTOM_CALENDAR`\ + \ (**Can manage custom calendars**) privilege is required.\n\n\n#### Usage\ + \ guidelines\n\nYou can create a custom calendar from scratch or an existing\ + \ Table in ThoughtSpot. For both methods of calendar creation, the following\ + \ parameters are required:\n\n* Name of the custom calendar.\n* Calendar creation\ + \ method. To create a calendar from an existing table, specify the method:\n\ + \n - `FROM_EXISTING_TABLE` - Creates calendar from the table reference provided\ + \ in the API request.\n - `FROM_INPUT_PARAMS` - Creates a calendar from the\ + \ parameters defined in the API request.\n\n* Connection ID and Table name\n\ + * Database and schema name attributes:\n For most Cloud Data Warehouse (CDW)\ + \ connectors, both `database_name` and `schema_name` attributes are required.\ + \ \n However, the attribute requirements are conditional and vary based\ + \ on the connector type and its metadata structure. For example, for connectors\ + \ such as Teradata, MySQL, SingleSore, Amazon Aurora MySQL, Amazon RDS MySQL,\ + \ Oracle, and GCP_MYSQL, the `schema_name` is required, whereas the `database_name`\ + \ attribute is not.\n Similarly, connectors such as ClickHouse require you\ + \ to specify the `database_name` and the schema specification in such cases\ + \ is optional.\n\n**NOTE**: If you are creating a calendar from an existing\ + \ table, ensure that the referenced table matches the required DDL for custom\ + \ calendars. If the schema does not match, the API returns an error.\n\n#####\ + \ Calendar type\nThe API allows you to create the following types of calendars:\n\ + \n* `MONTH_OFFSET`. The default calendar type. A `MONTH_OFFSET` calendar is\ + \ offset by a few months from the standard calendar months (January to December)\ + \ and the year begins with the month defined in the request. For example,\ + \ if the `month_offset` value is set as `April`, the calendar year begins\ + \ in April.\n\n* `4-4-5`. Each quarter in the calendar will include two 4-week\ + \ months followed by one 5-week month.\n* `4-5-4`. Each quarter in the calendar\ + \ will include two 4-week months with a 5-week month between.\n* `5-4-4`.\ + \ Each quarter begins with a 5-week month, followed by two 4-week months.\n\ + \nTo start and end the calendar on a specific date, specify the dates in the\ + \ `MM/DD/YYYY` format. For `MONTH_OFFSET` calendars, ensure that the `start_date`\ + \ matches the month specified in the `month_offset` attribute.\n\nYou can\ + \ also set the starting day of the week and customize the prefixes for year\ + \ and quarter labels.\n\n#### Examples\n\nTo create a calendar from an existing\ + \ table:\n\n```\n{\n \"name\": \"MyCustomCalendar1\",\n \"table_reference\"\ + : {\n \"connection_identifier\": \"4db8ea22-2ff4-4224-b05a-26674717e468\"\ + ,\n \"table_name\": \"MyCalendarTable\",\n \"database_name\": \"RETAILAPPAREL\"\ + ,\n \"schema_name\": \"PUBLIC\"\n },\n \"creation_method\": \"FROM_EXISTING_TABLE\"\ + ,\n}\n```\n\nTo create a calendar from scratch:\n\n```\n{\n \"name\": \"\ + MyCustomCalendar1\",\n \"table_reference\": {\n \"connection_identifier\"\ + : \"4db8ea22-2ff4-4224-b05a-26674717e468\",\n \"table_name\": \"MyCalendarTable\"\ + ,\n \"database_name\": \"RETAILAPPAREL\",\n \"schema_name\": \"PUBLIC\"\ + \n },\n \"creation_method\": \"FROM_INPUT_PARAMS\",\n \"calendar_type\"\ + : \"MONTH_OFFSET\",\n \"month_offset\": \"April\",\n \"start_day_of_week\"\ + : \"Monday\",\n \"quarter_name_prefix\": \"Q\",\n \"year_name_prefix\":\ + \ \"FY\",\n \"start_date\": \"04/01/2025\",\n \"end_date\": \"04/31/2025\"\ + \n}\n```\n\n\n\n\n\n" + operationId: createCalendar + parameters: [] + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/CreateCalendarRequest' + required: true + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/CalendarResponse' + description: Custom calendar created successfully. + "400": + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + description: Invalid request. + "401": + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + description: Unauthorized access. + "403": + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + description: Forbidden access. + "500": + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + description: Unexpected error + tags: + - Custom Calendars + - ThoughtSpotRest + x-content-type: application/json + x-accepts: + - application/json + /api/rest/2.0/calendars/{calendar_identifier}/delete: + post: + description: "\n Version: 10.12.0.cl or later\n\n\nDeletes a [custom calendar](https://docs.thoughtspot.com/cloud/latest/connections-cust-cal).\n\ + \nRequires `DATAMANAGEMENT` (**Can manage data**) or `ADMINISTRATION` (**Can\ + \ administer ThoughtSpot**) privilege.\nIf [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac)\ + \ is enabled on your ThoughtSpot instance, the `CAN_MANAGE_CUSTOM_CALENDAR`\ + \ (**Can manage custom calendars**) privilege is required.\n\n#### Usage guidelines\n\ + To delete a custom calendar, specify the calendar ID as a path parameter in\ + \ the request URL. \n\n\n\n\n\n" + operationId: deleteCalendar + parameters: + - description: Unique ID or name of the Calendar. + explode: false + in: path + name: calendar_identifier + required: true + schema: + type: string + style: simple + responses: + "204": + description: Custom calendar successfully deleted. + "400": + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + description: Invalid request. + "401": + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + description: Unauthorized access. + "403": + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + description: Forbidden access. + "500": + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + description: Unexpected error + tags: + - Custom Calendars + - ThoughtSpotRest + x-accepts: + - application/json + /api/rest/2.0/calendars/generate-csv: + post: + description: |2+ + + Version: 10.12.0.cl or later + + + Exports a [custom calendar](https://docs.thoughtspot.com/cloud/latest/connections-cust-cal) in the CSV format. + + Requires `DATAMANAGEMENT` (**Can manage data**) or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. + If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your ThoughtSpot instance, the `CAN_MANAGE_CUSTOM_CALENDAR` (**Can manage custom calendars**) privilege is required. + + #### Usage guidelines + + Use this API to download a custom calendar in the CSV file format. In your API request, specify the following parameters. + + * Start and end date of the calendar. For "month offset" calendars, the start date must match the month defined in the `month_offset` attribute. + + You can also specify optional parameters such as the starting day of the week and prefixes for the quarter and year labels. + + + + + + operationId: generateCSV + parameters: [] + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/GenerateCSVRequest' + required: true + responses: + "200": + content: + application/json: + schema: + type: object + description: "Generate custom calendar data based on specifications, as\ + \ a CSV file." + "400": + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + description: Invalid request. + "401": + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + description: Unauthorized access. + "403": + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + description: Forbidden access. + "500": + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + description: Unexpected error + tags: + - Custom Calendars + - ThoughtSpotRest + x-content-type: application/json + x-accepts: + - application/json + /api/rest/2.0/calendars/search: + post: + description: |2+ + + Version: 10.12.0.cl or later + + + Gets a list of [custom calendars](https://docs.thoughtspot.com/cloud/latest/connections-cust-cal). + + Requires `DATAMANAGEMENT` (**Can manage data**) or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. + If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your ThoughtSpot instance, the `CAN_MANAGE_CUSTOM_CALENDAR` (**Can manage custom calendars**) privilege is required. + + #### Usage guidelines + + By default, the API returns a list of custom calendars for all connection objects. To retrieve custom calendar details for a particular connection, specify the connection ID. You can also use other search parameters such as `name_pattern` and `sort_options` as search filters. + + The `name_pattern` parameter filters and returns only those objects that match the specified pattern. Use `%` as a wildcard for pattern matching. + + + + + + operationId: searchCalendars + parameters: [] + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/SearchCalendarsRequest' + required: true + responses: + "200": + content: + application/json: + schema: + items: + $ref: '#/components/schemas/CalendarResponse' + type: array + description: Custom calendar fetched successfully. + "400": + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + description: Invalid request. + "401": + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + description: Unauthorized access. + "403": + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + description: Forbidden access. + "500": + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + description: Unexpected error + tags: + - Custom Calendars + - ThoughtSpotRest + x-content-type: application/json + x-accepts: + - application/json + /api/rest/2.0/calendars/{calendar_identifier}/update: + post: + description: "\n Version: 10.12.0.cl or later\n\n\nUpdates the properties of\ + \ a [custom calendar](https://docs.thoughtspot.com/cloud/latest/connections-cust-cal).\n\ + \nRequires `DATAMANAGEMENT` (**Can manage data**) or `ADMINISTRATION` (**Can\ + \ administer ThoughtSpot**) privilege.\nIf [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac)\ + \ is enabled on your ThoughtSpot instance, the `CAN_MANAGE_CUSTOM_CALENDAR`\ + \ (**Can manage custom calendars**) privilege is required.\n\n#### Usage guidelines\n\ + \nYou can update the properties of a calendar using one of the following methods:\n\ + * `FROM_INPUT_PARAMS` to update the calendar properties with the values defined\ + \ in the API request.\n* `FROM_EXISTING_TABLE` Creates a calendar from the\ + \ parameters defined in the API request.\n\nTo update a custom calendar, specify\ + \ the calendar ID as a path parameter in the request URL and the following\ + \ parameters in the request body: \n\n* Connection ID and Table name\n* Database\ + \ and schema name attributes:\n For most Cloud Data Warehouse (CDW) connectors,\ + \ both `database_name` and `schema_name` attributes are required. \n However,\ + \ the attribute requirements are conditional and vary based on the connector\ + \ type and its metadata structure. For example, for connectors such as Teradata,\ + \ MySQL, SingleSore, Amazon Aurora MySQL, Amazon RDS MySQL, Oracle, and GCP_MYSQL,\ + \ the `schema_name` is required, whereas the `database_name` attribute is\ + \ not.\n Similarly, connectors such as ClickHouse require you to specify\ + \ the `database_name` and the schema specification in such cases is optional.\n\ + \nThe API allows you to modify the calendar type, month offset value, start\ + \ and end date, starting day of the week, and prefixes assigned to the year\ + \ and quarter labels. \n\n#### Examples\n\nUpdate a custom calendar using\ + \ an existing Table in ThoughtSpot:\n\n```\n{\n \"update_method\": \"FROM_EXISTING_TABLE\"\ + ,\n \"table_reference\": {\n \"connection_identifier\": \"Connection1\"\ + ,\n \"database_name\": \"db1\",\n \"table_name\": \"custom_calendar_2025\"\ + ,\n \"schame_name\": \"schemaVar\"\n }\n}\n```\n\nUpdate a custom calendar\ + \ with the attributes defined in the API request:\n\n```\n{\n \"update_method\"\ + : \"FROM_INPUT_PARAMS\",\n \"table_reference\": {\n \"connection_identifier\"\ + : \"Connection1\",\n \"database_name\": \"db1\",\n \"table_name\": \"\ + custom_calendar_2025\",\n \"schame_name\": \"schemaVar\"\n },\n \"month_offset\"\ + : \"August\",\n \"start_day_of_week\": \"Monday\",\n \"start_date\": \"\ + 08/01/2025\",\n \"end_date\": \"07/31/2026\"\n}\n```\n\n\n\n\n\n" + operationId: updateCalendar + parameters: + - description: Unique Id or name of the calendar. + explode: false + in: path + name: calendar_identifier + required: true + schema: + type: string + style: simple + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/UpdateCalendarRequest' + required: true + responses: + "204": + description: Custom calendar updated successfully. + "400": + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + description: Invalid request. + "401": + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + description: Unauthorized access. + "403": + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + description: Forbidden access. + "500": + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + description: Unexpected error + tags: + - Custom Calendars + - ThoughtSpotRest + x-content-type: application/json + x-accepts: + - application/json + /api/rest/2.0/metadata/answer/data: + post: + description: |2+ + + Version: 9.0.0.cl or later + + + Fetches data from a saved Answer. + + Requires at least view access to the saved Answer. + + The `record_size` attribute determines the number of records to retrieve in an API call. For more information about pagination, record size, and maximum row limit, see [Pagination and record size settings](https://developers.thoughtspot.com/docs/fetch-data-and-report-apis#_pagination_settings_for_data_and_report_apis). + + + + + operationId: fetchAnswerData + parameters: [] + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/FetchAnswerDataRequest' + required: true + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/AnswerDataResponse' + description: Fetching data of specified metadata object is successful. + "400": + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + description: Invalid request. + "401": + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + description: Unauthorized access. + "403": + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + description: Forbidden access. + "500": + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + description: Unexpected error + tags: + - Data + - ThoughtSpotRest + x-content-type: application/json + x-accepts: + - application/json + /api/rest/2.0/metadata/liveboard/data: + post: + description: "\n Version: 9.0.0.cl or later\n\n\nGets data from a Liveboard\ + \ object and its visualization. \n\nRequires at least view access to the\ + \ Liveboard.\n\n#### Usage guidelines\n\nIn the request body, specify the\ + \ GUID or name of the Liveboard. To get data for specific visualizations,\ + \ add the GUIDs or names of the visualizations in the API request.\n\nTo include\ + \ unsaved changes in the report, pass the `transient_pinboard_content` script\ + \ generated from the `getExportRequestForCurrentPinboard` method in the Visual\ + \ Embed SDK. Upon successful execution, the API returns the report with unsaved\ + \ changes. If the new Liveboard experience mode, the transient content includes\ + \ ad hoc changes to visualizations such as sorting, toggling of legends, and\ + \ data drill down.\n\nFor more information, and see [Liveboard data API](https://developers.thoughtspot.com/docs/fetch-data-and-report-apis#_fetch_liveboard_data_api).\n\ + \n\n\n\n" + operationId: fetchLiveboardData + parameters: [] + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/FetchLiveboardDataRequest' + required: true + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/LiveboardDataResponse' + description: Fetching data of specified metadata object is successful. + "400": + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + description: Invalid request. + "401": + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + description: Unauthorized access. + "403": + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + description: Forbidden access. + "500": + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + description: Unexpected error + tags: + - Data + - ThoughtSpotRest + x-content-type: application/json + x-accepts: + - application/json + /api/rest/2.0/searchdata: + post: + description: "\n Version: 9.0.0.cl or later\n\n\nGenerates an Answer from a\ + \ given data source.\n\nRequires at least view access to the data source object\ + \ (Worksheet or View).\n\n#### Usage guidelines\n\nTo search data, specify\ + \ the data source GUID in `logical_table_identifier`. The data source can\ + \ be a Worksheet, View, Table, or SQL view.\n\nPass search tokens in the `query_string`\ + \ attribute in the API request as shown in the following example:\n\n```\n\ + {\n \"query_string\": \"[sales] by [store]\",\n \"logical_table_identifier\"\ + : \"cd252e5c-b552-49a8-821d-3eadaa049cca\",\n}\n```\n\nFor more information\ + \ about the `query_string` format and data source attribute, see [Search data\ + \ API](https://developers.thoughtspot.com/docs/fetch-data-and-report-apis#_search_data_api).\ + \ \n\nThe `record_size` attribute determines the number of records to retrieve\ + \ in an API call. For more information about pagination, record size, and\ + \ maximum row limit, see [Pagination and record size settings](https://developers.thoughtspot.com/docs/fetch-data-and-report-apis#_pagination_settings_for_data_and_report_api).\ + \ \n\n\n\n\n" + operationId: searchData + parameters: [] + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/SearchDataRequest' + required: true + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/SearchDataResponse' + description: Fetching data of specified metadata object is successful. + "400": + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + description: Invalid request. + "401": + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + description: Unauthorized access. + "403": + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + description: Forbidden access. + "500": + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + description: Unexpected error + tags: + - Data + - ThoughtSpotRest + x-content-type: application/json + x-accepts: + - application/json + /api/rest/2.0/dbt/dbt-connection: + post: + description: |2+ + + Version: 9.9.0.cl or later + + + Creates a DBT connection object in ThoughtSpot. + + Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege or `DATAMANAGEMENT` (**Can manage data**) privilege. + If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the following Data control privileges may be required: + + - `CAN_MANAGE_CUSTOM_CALENDAR`(**Can manage custom calendars**) + - `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) + - `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` (**Can manage data models**) + + #### About create DBT connection + DBT connection in ThoughtSpot is used by the user to define DBT credentials for cloud . The API needs embrace connection, embrace database name, DBT url, import type, DBT account identifier, DBT project identifier, DBT access token and environment details (or) embrace connection, embrace database name, import type, file_content to create a connection object. To know more about DBT, see ThoughtSpot Product Documentation. + + + + + + operationId: dbtConnection + parameters: [] + requestBody: + content: + multipart/form-data: + schema: + $ref: '#/components/schemas/dbtConnection_request' + required: true + responses: + "200": + content: + application/json: + schema: + type: object + description: Succesfully created DBT Connection. + "400": + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + description: Invalid request. + "401": + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + description: Unauthorized access. + "403": + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + description: Forbidden access. + "500": + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + description: Unexpected error + tags: + - DBT + - ThoughtSpotRest + x-content-type: multipart/form-data + x-accepts: + - application/json + /api/rest/2.0/dbt/generate-sync-tml: + post: + description: |2+ + + Version: 9.9.0.cl or later + + + Resynchronize the existing list of models, tables, worksheet tml’s and import them to Thoughtspot based on the DBT connection object. + + Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege or `DATAMANAGEMENT` (**Can manage data**) privilege, along with an existing DBT connection. + If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the following data control privileges may be required: + + - `CAN_MANAGE_CUSTOM_CALENDAR`(**Can manage custom calendars**) + - `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) + - `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` (**Can manage data models**) + + + + + + operationId: dbtGenerateSyncTml + parameters: [] + requestBody: + content: + multipart/form-data: + schema: + $ref: '#/components/schemas/dbtGenerateSyncTml_request' + required: true + responses: + "200": + content: + application/json: + schema: + type: object + description: Sync Table and Worksheet TML's are successfully generated. + "400": + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + description: Invalid request. + "401": + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + description: Unauthorized access. + "403": + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + description: Forbidden access. + "500": + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + description: Unexpected error + tags: + - DBT + - ThoughtSpotRest + x-content-type: multipart/form-data + x-accepts: + - application/json + /api/rest/2.0/dbt/generate-tml: + post: + description: |2+ + + Version: 9.9.0.cl or later + + + Generate required table and worksheet and import them. + + Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege or `DATAMANAGEMENT` (**Can manage data**) privilege, along with an existing DBT connection. + If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the following data control privileges may be required: + + - `CAN_MANAGE_CUSTOM_CALENDAR`(**Can manage custom calendars**) + - `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) + - `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` (**Can manage data models**) + + #### About generate TML + Models and Worksheets to be imported can be selected by the user as part of the API. + + + + + + operationId: dbtGenerateTml + parameters: [] + requestBody: + content: + multipart/form-data: + schema: + $ref: '#/components/schemas/dbtGenerateTml_request' + required: true + responses: + "200": + content: + application/json: + schema: + type: object + description: Required Table and Worksheet TML's are successfully generated. + "400": + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + description: Invalid request. + "401": + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + description: Unauthorized access. + "403": + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + description: Forbidden access. + "500": + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + description: Unexpected error + tags: + - DBT + - ThoughtSpotRest + x-content-type: multipart/form-data + x-accepts: + - application/json + /api/rest/2.0/dbt/search: + post: + description: |2+ + + Version: 9.9.0.cl or later + + + Gets a list of DBT connection objects by user and organization, available on the ThoughtSpot system. + + Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege or `DATAMANAGEMENT` (**Can manage data**) privilege. + If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the following Data control privileges may be required: + + - `CAN_MANAGE_CUSTOM_CALENDAR`(**Can manage custom calendars**) + - `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) + - `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` (**Can manage data models**) + + #### About search DBT connection + To get details of a specific DBT connection identifier, database connection identifier, database connection name, database name, project name, project identifier, environment identifier , import type and author. + + + + + + operationId: dbtSearch + parameters: [] + responses: + "200": + content: + application/json: + schema: + items: + $ref: '#/components/schemas/DbtSearchResponse' + type: array + description: Retrieved list of DBT connections successfully. + "400": + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + description: Invalid request. + "401": + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + description: Unauthorized access. + "403": + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + description: Forbidden access. + "500": + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + description: Unexpected error + tags: + - DBT + - ThoughtSpotRest + x-accepts: + - application/json + /api/rest/2.0/dbt/{dbt_connection_identifier}/delete: + post: + description: |2+ + + Version: 9.9.0.cl or later + + + Removes the specified DBT connection object from the ThoughtSpot system. + + Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) or `DATAMANAGEMENT` (**Can manage data ThoughtSpot**) privilege. + If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the following Data control privileges may be required: + + - `CAN_MANAGE_CUSTOM_CALENDAR`(**Can manage custom calendars**) + - `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) + - `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` (**Can manage data models**) + + + + + + operationId: deleteDbtConnection + parameters: + - description: Unique ID of the DBT Connection. + explode: false + in: path + name: dbt_connection_identifier + required: true + schema: + type: string + style: simple + responses: + "204": + description: DBT Connection successfully deleted. + "400": + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + description: Invalid request. + "401": + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + description: Unauthorized access. + "403": + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + description: Forbidden access. + "500": + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + description: Unexpected error + tags: + - DBT + - ThoughtSpotRest + x-accepts: + - application/json + /api/rest/2.0/dbt/update-dbt-connection: + post: + description: |2+ + + Version: 9.9.0.cl or later + + + Updates a DBT connection object. + + Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege or `DATAMANAGEMENT` (**Can manage data ThoughtSpot**) privilege, along with an existing DBT connection. + If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the following data control privileges may be required: + + - `CAN_MANAGE_CUSTOM_CALENDAR`(**Can manage custom calendars**) + - `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) + - `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` (**Can manage data models**) + + #### About update DBT connection + You can modify DBT connection object properties such as embrace connection name, embrace database name, import type, account identifier, access token, project identifier and environment (or) embrace connection, embrace database name, import type, file_content settings. + + + + + + operationId: updateDbtConnection + parameters: [] + requestBody: + content: + multipart/form-data: + schema: + $ref: '#/components/schemas/updateDbtConnection_request' + required: true + responses: + "200": + content: + application/json: + schema: + type: object + description: DBT Connection successfully updated. + "400": + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + description: Invalid request. + "401": + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + description: Unauthorized access. + "403": + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + description: Forbidden access. + "500": + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + description: Unexpected error + tags: + - DBT + - ThoughtSpotRest + x-content-type: multipart/form-data + x-accepts: + - application/json + /api/rest/2.0/customization/email: + post: + description: "\nVersion: 10.10.0.cl or later\n\n\nCreates a customization configuration\ + \ for the notification email.\n\n#### Pre-requisites\n\nRequires `DEVELOPER`\ + \ (**has developer privilege**) or `ADMINISTRATION` (**Can administer ThoughtSpot**)\ + \ privilege.\nIf [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac)\ + \ is enabled on your instance, the `DEVELOPER` (**Has developer privilege**)\ + \ privilege is required.\n\n**NOTE**:This endpoint in currently in beta. Contact\ + \ ThoughtSpot support to enable this on your instance.\n\n#### Usage guidelines\n\ + \nTo create a custom configuration pass these parameters in your API request:\n\ + \n- A JSON map of configuration attributes `template_properties`. The following\ + \ example shows a sample set of customization configuration:\n\n```\n{\n \ + \ {\n \"cta_button_bg_color\": \"#444DEA\",\n \"cta_text_font_color\"\ + : \"#FFFFFF\",\n \"primary_bg_color\": \"#D3DEF0\",\n \"logo_url\"\ + : \"https://storage.pardot.com/710713/1642089901EbkRibJq/TS_fullworkmark_darkmode.png\"\ + ,\n \t \"font_family\": \"\",\n \"product_name\": \"ThoughtSpot\",\n\ + \ \"footer_address\": \"444 Castro St, Suite 1000 Mountain View, CA 94041\"\ + ,\n\t \"footer_phone\": \"(800) 508-7008\",\n \"replacement_value_for_liveboard\"\ + : \"Dashboard\",\n \"replacement_value_for_answer\": \"Chart\",\n \ + \ \"replacement_value_for_spot_iq\": \"AI Insights\",\n \t \"hide_footer_phone\"\ + : false,\n \"hide_footer_address\": false,\n \"hide_product_name\"\ + : false,\n \"hide_manage_notification\": false,\n \"hide_mobile_app_nudge\"\ + : false,\n \"hide_privacy_policy\": false,\n \"hide_ts_vocabulary_definitions\"\ + : false,\n \"hide_error_message\": false,\n \"hide_unsubscribe_link\"\ + : false,\n \"hide_notification_status\": false,\n \"hide_modify_alert\"\ + : false,\n \"company_website_url\": \"https://your-website.com/\",\n\ + \ \"company_privacy_policy_url\" : \"https://link-to-privacy-policy.com/\"\ + ,\n \"contact_support_url\": \"https://link-to-contact-support.com/\"\ + ,\n \"hide_contact_support_url\": false,\n\t \"hide_logo_url\" : false\n\ + \ }\n}\n```\n\n\n\n\n\n" + operationId: createEmailCustomization + parameters: [] + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/CreateEmailCustomizationRequest' + required: true + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/CreateEmailCustomizationResponse' + description: OK + "400": + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + description: Invalid request. + "403": + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + description: Unauthorized access. + "500": + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + description: Unexpected error + tags: + - Email Customization + - ThoughtSpotRest + x-content-type: application/json + x-accepts: + - application/json + /api/rest/2.0/customization/email/{template_identifier}/delete: + post: + deprecated: true + description: |2+ + + Version: 10.10.0.cl or later + + + Deletes the configuration for the email customization. + + #### Pre-requisites + + Requires `DEVELOPER` (**has developer privilege**) or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. + If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `DEVELOPER` (**Has developer privilege**) privilege is required. + + **NOTE**:This endpoint in currently in beta. Contact ThoughtSpot support to enable this on your instance. + + #### Usage guidelines + + - Call the search API endpoint to get the `template_identifier` from the response. + - Use that `template_identifier` as a parameter in this API request. + + + + + + operationId: deleteEmailCustomization + parameters: + - description: Unique ID or name of the email customization. + explode: false + in: path + name: template_identifier + required: true + schema: + type: string + style: simple + responses: + "204": + description: Email Customization configuration successfully deleted. + "400": + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + description: Invalid request. + "403": + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + description: Unauthorized access. + "500": + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + description: Unexpected error + tags: + - Email Customization + - ThoughtSpotRest + x-accepts: + - application/json + /api/rest/2.0/customization/email/delete: + post: + description: |2+ + + Version: 10.12.0.cl or later + + + Deletes the configuration for the email customization. + + #### Pre-requisites + + Requires `DEVELOPER` (**has developer privilege**) or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. + If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `DEVELOPER` (**Has developer privilege**) privilege is required. + + **NOTE**:This endpoint in currently in beta. Contact ThoughtSpot support to enable this on your instance. + + #### Usage guidelines + + - Call the search API endpoint to get the `org_identifier` from the response. + - Use that `org_identifier` as a parameter in this API request. + + + + + + operationId: deleteOrgEmailCustomization + parameters: [] + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/DeleteOrgEmailCustomizationRequest' + required: true + responses: + "204": + description: Email Customization configuration successfully deleted. + "400": + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + description: Invalid request. + "401": + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + description: Unauthorized access. + "403": + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + description: Unauthorized access. + "500": + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + description: Unexpected error + tags: + - Email Customization + - ThoughtSpotRest + x-content-type: application/json + x-accepts: + - application/json + /api/rest/2.0/customization/email/search: + post: + description: |2+ + + Version: 10.10.0.cl or later + + + Search the email customization configuration if any set for the ThoughtSpot system. + + #### Pre-requisites + + Requires `DEVELOPER` (**has developer privilege**) or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. + If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `DEVELOPER` (**Has developer privilege**) privilege is required. + + **NOTE**:This endpoint in currently in beta. Contact ThoughtSpot support to enable this on your instance. + + + + + + operationId: searchEmailCustomization + parameters: [] + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/SearchEmailCustomizationRequest' + required: true + responses: + "200": + content: + application/json: + schema: + items: + $ref: '#/components/schemas/CreateEmailCustomizationResponse' + type: array + description: OK + "400": + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + description: Invalid request. + "403": + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + description: Unauthorized access. + "500": + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + description: Unexpected error + tags: + - Email Customization + - ThoughtSpotRest + x-content-type: application/json + x-accepts: + - application/json + /api/rest/2.0/customization/email/update: + post: + description: "\nVersion: 10.12.0.cl or later\n\n\nUpdates a customization configuration\ + \ for the notification email.\n\n#### Pre-requisites\n\nRequires `DEVELOPER`\ + \ (**has developer privilege**) or `ADMINISTRATION` (**Can administer ThoughtSpot**)\ + \ privilege.\nIf [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac)\ + \ is enabled on your instance, the `DEVELOPER` (**Has developer privilege**)\ + \ privilege is required.\n\n**NOTE**:This endpoint in currently in beta. Contact\ + \ ThoughtSpot support to enable this on your instance.\n\n#### Usage guidelines\n\ + \nTo update a custom configuration pass these parameters in your API request:\n\ + \n- A JSON map of configuration attributes `template_properties`. The following\ + \ example shows a sample set of customization configuration:\n\n```\n{\n \ + \ {\n \"cta_button_bg_color\": \"#444DEA\",\n \t\"cta_text_font_color\"\ + : \"#FFFFFF\",\n \t\"primary_bg_color\": \"#D3DEF0\",\n \"logo_url\"\ + : \"https://storage.pardot.com/710713/1642089901EbkRibJq/TS_fullworkmark_darkmode.png\"\ + ,\n \t \"font_family\": \"\",\n \t\"product_name\": \"ThoughtSpot\"\ + ,\n \t\"footer_address\": \"444 Castro St, Suite 1000 Mountain View, CA\ + \ 94041\",\n\t \"footer_phone\": \"(800) 508-7008\",\n \"replacement_value_for_liveboard\"\ + : \"Dashboard\",\n \t\"replacement_value_for_answer\": \"Chart\",\n \ + \ \t\"replacement_value_for_spot_iq\": \"AI Insights\",\n \t \"hide_footer_phone\"\ + : false,\n \"hide_footer_address\": false,\n \"hide_product_name\"\ + : false,\n \t\"hide_manage_notification\": false,\n \t\"hide_mobile_app_nudge\"\ + : false,\n \t\"hide_privacy_policy\": false,\n \t\"hide_ts_vocabulary_definitions\"\ + : false,\n \t\"hide_error_message\": false,\n \t\"hide_unsubscribe_link\"\ + : false,\n \"hide_notification_status\": false,\n \t\"hide_modify_alert\"\ + : false,\n \t\"company_website_url\": \"https://your-website.com/\",\n\ + \ \t\"company_privacy_policy_url\" : \"https://link-to-privacy-policy.com/\"\ + ,\n \"contact_support_url\": \"https://link-to-contact-support.com/\"\ + ,\n \"hide_contact_support_url\": false,\n\t \"hide_logo_url\" :\ + \ false\n }\n}\n```\n\n\n\n\n\n" + operationId: updateEmailCustomization + parameters: [] + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/UpdateEmailCustomizationRequest' + required: true + responses: + "204": + description: Email Customization configuration successfully updated. + "400": + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + description: Invalid request. + "401": + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + description: Unauthorized access. + "403": + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + description: Unauthorized access. + "500": + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + description: Unexpected error + tags: + - Email Customization + - ThoughtSpotRest + x-content-type: application/json + x-accepts: + - application/json + /api/rest/2.0/customization/email/validate: + post: + description: |2+ + + Version: 10.10.0.cl or later + + + Validates the email customization configuration if any set for the ThoughtSpot system. + + #### Pre-requisites + + Requires `DEVELOPER` (**has developer privilege**) or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. + If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `DEVELOPER` (**Has developer privilege**) privilege is required. + + **NOTE**:This endpoint in currently in beta. Contact ThoughtSpot support to enable this on your instance. + + + + + + operationId: validateEmailCustomization + parameters: [] + responses: + "204": + description: Triggered test email for customization configuration + "400": + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + description: Invalid request. + "403": + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + description: Unauthorized access. + "500": + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + description: Unexpected error + tags: + - Email Customization + - ThoughtSpotRest + x-accepts: + - application/json + /api/rest/2.0/groups/create: + post: + description: |2+ + + Version: 9.0.0.cl or later + + + Creates a group object in ThoughtSpot. + + Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. + If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `GROUP_ADMINISTRATION` (**Can manage groups**) privilege is required. + + #### About groups + Groups in ThoughtSpot are used by the administrators to define privileges and organize users based on their roles and access requirements. To know more about groups and privileges, see [ThoughtSpot Product Documentation](https://docs.thoughtspot.com/cloud/latest/groups-privileges). + + #### Supported operations + + The API endpoint lets you perform the following operations: + + * Assign privileges + * Add users + * Define sharing visibility + * Add sub-groups + * Assign a default Liveboard + + + + + + operationId: createUserGroup + parameters: [] + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/CreateUserGroupRequest' + required: true + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/UserGroupResponse' + description: User group successfully created. + "400": + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + description: Invalid request. + "401": + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + description: Unauthorized access. + "403": + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + description: Forbidden access. + "500": + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + description: Unexpected error + tags: + - Groups + - ThoughtSpotRest + x-content-type: application/json + x-accepts: + - application/json + /api/rest/2.0/groups/{group_identifier}/delete: + post: + description: |2+ + + Version: 9.0.0.cl or later + + + Removes the specified group object from the ThoughtSpot system. + + Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. + If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `GROUP_ADMINISTRATION` (**Can manage groups**) privilege is required. + + + + + + operationId: deleteUserGroup + parameters: + - description: GUID or name of the group. + explode: false + in: path + name: group_identifier + required: true + schema: + type: string + style: simple + responses: + "204": + description: User group successfully deleted. + "400": + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + description: Invalid request. + "401": + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + description: Unauthorized access. + "403": + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + description: Forbidden access. + "500": + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + description: Unexpected error + tags: + - Groups + - ThoughtSpotRest + x-accepts: + - application/json + /api/rest/2.0/groups/import: + post: + description: |2+ + + Version: 9.0.0.cl or later + + + Imports group objects from external databases into ThoughtSpot. + + Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. + If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `GROUP_ADMINISTRATION` (**Can manage groups**) privilege is required. + + During the import operation: + + * If the specified group is not available in ThoughtSpot, it will be added to ThoughtSpot. + * If `delete_unspecified_groups` is set to `true`, the groups not specified in the API request, excluding administrator and system user groups, are deleted. + * If the specified groups are already available in ThoughtSpot, the object properties of these groups are modified and synchronized as per the input data in the API request. + + A successful API call returns the object that represents the changes made in the ThoughtSpot system. + + + + + + operationId: importUserGroups + parameters: [] + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/ImportUserGroupsRequest' + required: true + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/ImportUserGroupsResponse' + description: Import user groups operation successful. + "400": + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + description: Invalid request. + "401": + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + description: Unauthorized access. + "403": + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + description: Forbidden access. + "500": + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + description: Unexpected error + tags: + - Groups + - ThoughtSpotRest + x-content-type: application/json + x-accepts: + - application/json + /api/rest/2.0/groups/search: + post: + description: |2+ + + Version: 9.0.0.cl or later + + + Gets a list of user group objects from the ThoughtSpot system. + + To get details of a specific user group, specify the user group GUID or name. You can also filter the API response based on User ID, Org ID, Role ID, type of group, sharing visibility, privileges assigned to the group, and the Liveboard IDs assigned to the users in the group. + + Available to all users. Users with `ADMINISTRATION` (**Can administer ThoughtSpot**) privileges can view all users properties. + + If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `GROUP_ADMINISTRATION` (**Can manage groups**) privilege is required. + + **NOTE**: If you do not get precise results, try setting `record_size` to `-1` and `record_offset` to `0`. + + + + + + operationId: searchUserGroups + parameters: [] + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/SearchUserGroupsRequest' + required: true + responses: + "200": + content: + application/json: + schema: + items: + $ref: '#/components/schemas/UserGroupResponse' + type: array + description: User group search result. + "400": + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + description: Invalid request. + "401": + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + description: Unauthorized access. + "403": + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + description: Forbidden access. + "500": + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + description: Unexpected error + tags: + - Groups + - ThoughtSpotRest + x-content-type: application/json + x-accepts: + - application/json + /api/rest/2.0/groups/{group_identifier}/update: + post: + description: |2+ + + Version: 9.0.0.cl or later + + + Updates the properties of a group object in ThoughtSpot. + + Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. + If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `GROUP_ADMINISTRATION` (**Can manage groups**) privilege is required. + + #### Supported operations + + This API endpoint lets you perform the following operations in a single API request: + + * Edit [privileges](https://developers.thoughtspot.com/docs/?pageid=api-user-management#group-privileges) + * Add or remove users + * Change sharing visibility settings + * Add or remove sub-groups + * Assign a default Liveboard or update the existing settings + + + + + + operationId: updateUserGroup + parameters: + - description: GUID or name of the group. + explode: false + in: path + name: group_identifier + required: true + schema: + type: string + style: simple + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/UpdateUserGroupRequest' + required: true + responses: + "204": + description: User group successfully updated. + "400": + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + description: Invalid request. + "401": + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + description: Unauthorized access. + "403": + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + description: Forbidden access. + "500": + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + description: Unexpected error + tags: + - Groups + - ThoughtSpotRest + x-content-type: application/json + x-accepts: + - application/json + /api/rest/2.0/jobs/history/communication-channels/search: + post: + description: |2+ + + Version: 26.4.0.cl or later + + + Searches delivery history for communication channels such as webhooks. Returns channel-level delivery status for each job execution record. Use this to monitor channel health and delivery success rates across events. + + Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) or `DEVELOPER` (**Has developer privilege**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, users with `CAN_MANAGE_WEBHOOKS` (**Can manage webhooks**) privilege are also authorized to perform this action. + + **NOTE**: When `channel_type` is `WEBHOOK`, the following constraints apply: + + - `job_ids`, `channel_identifiers`, and `events` each accept at most one element. + - When `job_ids` is provided, it is used as the sole lookup key and other filter fields are ignored. + - When `job_ids` is not provided, `channel_identifiers` and `events` are both required, each containing exactly one element. + - Records older than the configured retention period are not returned. + - Use `start_epoch_time_in_millis` and/or `end_epoch_time_in_millis` to narrow results to a specific time window. + + + + + + operationId: searchChannelHistory + parameters: [] + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/SearchChannelHistoryRequest' + required: true + responses: + "200": + content: + application/json: + examples: + example_1: + description: Search webhook channel history by channel identifier + and event + value: + jobs: + - id: n.6170538a-a4d4-4712-91bf-39b353db2b72 + status: SUCCESS + creation_time_in_millis: 1771599720674 + event: + type: LIVEBOARD_SCHEDULE + id: 2bb2ff83-b8d9-4d2b-8913-b2589bb6831b + name: schedule-identifier + run_id: 90c4f1b0-08c9-4a6c-8e61-49cffd9f1550 + recipients: + - type: USER + id: d211f619-8b72-45d3-92a7-69dde41159c7 + name: admin-user + email: admin@example.com + detail: "" + try_count: 1 + - id: n.5c5bbedb-c425-48c0-8b54-a17267b08e7c + status: SUCCESS + creation_time_in_millis: 1771599600508 + event: + type: LIVEBOARD_SCHEDULE + id: 2bb2ff83-b8d9-4d2b-8913-b2589bb6831b + name: schedule-identifier + run_id: b9834966-fe85-4fa9-8a10-9889c01d4826 + recipients: + - type: USER + id: d211f619-8b72-45d3-92a7-69dde41159c7 + name: admin-user + email: admin@example.com + detail: "" + try_count: 1 + example_2: + description: Search webhook channel history by job ID + value: + jobs: + - id: n.5c5bbedb-c425-48c0-8b54-a17267b08e7c + status: SUCCESS + creation_time_in_millis: 1771599600508 + event: + type: LIVEBOARD_SCHEDULE + id: 2bb2ff83-b8d9-4d2b-8913-b2589bb6831b + name: schedule-identifier + run_id: b9834966-fe85-4fa9-8a10-9889c01d4826 + recipients: + - type: USER + id: d211f619-8b72-45d3-92a7-69dde41159c7 + name: admin-user + email: admin@example.com + detail: "" + try_count: 1 + schema: + $ref: '#/components/schemas/SearchChannelHistoryResponse' + description: Channel status logs retrieved successfully. + "400": + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + description: Invalid request. + "401": + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + description: Unauthorized access. + "403": + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + description: Forbidden access. + "500": + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + description: Unexpected error + tags: + - Jobs + - ThoughtSpotRest + x-content-type: application/json + x-accepts: + - application/json + /api/rest/2.0/logs/fetch: + post: + description: "\n Version: 9.0.0.cl or later\n\n\nFetches security audit logs.\ + \ \n\nRequires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege.\n\ + If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac)\ + \ is enabled on your instance, the [Admin Control](https://developers.thoughtspot.com/docs/rbac#_admin_control)\ + \ privileges are required.\n\n\n#### Usage guidelines\n\nBy default, the API\ + \ retrieves logs for the last 24 hours. You can set a custom duration in EPOCH\ + \ time. Make sure the log duration specified in your API request doesn’t exceed\ + \ 24 hours. If you must fetch logs for a longer time range, modify the duration\ + \ and make multiple sequential API requests.\n\nUpon successful execution,\ + \ the API returns logs with the following information:\n* timestamp of the\ + \ event\n* event ID\n* event type\n* name and GUID of the user\n* IP address\ + \ of ThoughtSpot instance\n\nFor more information see [Audit logs Documentation](https://developers.thoughtspot.com/docs/audit-logs).\n\ + \n\n\n\n\n" + operationId: fetchLogs + parameters: [] + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/FetchLogsRequest' + required: true + responses: + "200": + content: + application/json: + schema: + items: + $ref: '#/components/schemas/LogResponse' + type: array + description: Log fetched successfully. + "400": + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + description: Invalid request. + "401": + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + description: Unauthorized access. + "403": + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + description: Forbidden access. + "500": + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + description: Unexpected error + tags: + - Log + - ThoughtSpotRest + x-content-type: application/json + x-accepts: + - application/json + /api/rest/2.0/metadata/worksheets/convert: + post: + description: "\nConvert worksheets to models \n Version: 10.6.0.cl or later\n\ + \n\n## Prerequisites\n- **Privileges Required:**\n - `DATAMANAGEMENT` (Can\ + \ manage data) or `ADMINISTRATION` (Can administer ThoughtSpot).\n- **Additional\ + \ Privileges (if RBAC is enabled):**\n - `CAN_MANAGE_WORKSHEET_VIEWS_TABLES`\ + \ (Can manage data models).\n\n---\n\n## Usage Guidelines\n\n### Parameters\n\ + \n1. **worksheet_ids** \n - **Description:** A comma-separated list of\ + \ GUIDs (Globally Unique Identifiers) specifying the Worksheets to be converted.\ + \ \n - **Usage:** \n - Used only when `convert_all` is set to `false`.\ + \ \n - Leave empty or omit when `convert_all` is set to `true`.\n\n2.\ + \ **exclude_worksheet_ids** \n - **Description:** A comma-separated list\ + \ of GUIDs specifying Worksheets to be excluded from conversion. \n - **Usage:**\ + \ \n - Useful when `convert_all` is set to `true` and specific Worksheets\ + \ should not be converted.\n\n3. **convert_all** \n - **Description:**\ + \ Sets the scope of conversion.\n - **Options:** \n - `true`: Converts\ + \ all Worksheets in the system, except those specified in `exclude_worksheet_ids`.\ + \ \n - `false`: Converts only the Worksheets listed in `worksheet_ids`.\n\ + \n4. **apply_changes** \n - **Description:** Specifies whether to apply\ + \ changes directly to ThoughtSpot or to generate a preview before applying\ + \ any changes.Used for validation of conversion.\n - **Options:** \n \ + \ - `true`: Applies conversion changes directly to ThoughtSpot.\n -\ + \ `false`: Generates only a preview of the changes and does not apply any\ + \ changes to ThoughtSpot\n\n---\n\n## Best Practices\n\n1. **Backup Before\ + \ Conversion:** \n Always export metadata as a backup before initiating\ + \ the conversion process\n\n2. **Partial Conversion for Testing:** \n Test\ + \ the conversion process by setting `convert_all` to `false` and specifying\ + \ a small number of `worksheet_ids`.\n\n3. **Verify Dependencies:** \n \ + \ Check for dependent objects, such as Tables and Connections, to avoid invalid\ + \ references.\n\n4. **Review Changes:** \n Use `apply_changes: false` to\ + \ preview the impact of the conversion before applying changes.\n\n---\n\n\ + ## Examples\n\n### Convert Specific Worksheets\n```json\n{\n \"worksheet_ids\"\ + : [\"guid1\", \"guid2\", \"guid3\"],\n \"exclude_worksheet_ids\": [],\n \ + \ \"convert_all\": false,\n \"apply_changes\": true\n}\n```\n\n### Convert\ + \ All Accessible Worksheets\n```json\n{\n \"worksheet_ids\": [],\n \"exclude_worksheet_ids\"\ + : [],\n \"convert_all\": true,\n \"apply_changes\": true\n}\n```\n\n###\ + \ Exclude Specific Worksheets While Converting All Accessible Worksheets\n\ + ```json\n{\n \"worksheet_ids\": [],\n \"exclude_worksheet_ids\": [\"abc\"\ + ],\n \"convert_all\": true,\n \"apply_changes\": true\n}\n```\n\n\n\n\n" + operationId: convertWorksheetToModel + parameters: [] + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/ConvertWorksheetToModelRequest' + required: true + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/ResponseWorksheetToModelConversion' + description: Conversion of worksheets to model done successfully. + "400": + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + description: Invalid request. + "401": + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + description: Unauthorized access. + "403": + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + description: Forbidden access. + "500": + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + description: Unexpected error + tags: + - Metadata + - ThoughtSpotRest + x-content-type: application/json + x-accepts: + - application/json + /api/rest/2.0/metadata/copyobject: + post: + description: "\nMakes a copy of an Answer or Liveboard \n Version: 10.3.0.cl\ + \ or later\n\n\nCreates a copy of a metadata object.\n\nRequires at least\ + \ view access to the metadata object being copied.\n\nUpon successful execution,\ + \ the API creates a copy of the metadata object specified in the API request\ + \ and returns the ID of the new object.\n\n\n\n\n\n" + operationId: copyObject + parameters: [] + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/CopyObjectRequest' + required: true + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/ResponseCopyObject' + description: Successfully created a copy of the object + "400": + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + description: Invalid request. + "401": + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + description: Unauthorized access. + "403": + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + description: Forbidden access. + "404": + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + description: Object not found + "500": + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + description: Unexpected error + tags: + - Metadata + - ThoughtSpotRest + x-content-type: application/json + x-accepts: + - application/json + /api/rest/2.0/metadata/delete: + post: + description: "\n Version: 9.0.0.cl or later\n\n\nRemoves the specified metadata\ + \ object from the ThoughtSpot system.\n\nRequires edit access to the metadata\ + \ object. \n\n\n\n\n\n" + operationId: deleteMetadata + parameters: [] + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/DeleteMetadataRequest' + required: true + responses: + "204": + description: Metadata objects successfully deleted. + "400": + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + description: Invalid request. + "401": + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + description: Unauthorized access. + "403": + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + description: Forbidden access. + "500": + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + description: Unexpected error + tags: + - Metadata + - ThoughtSpotRest + x-content-type: application/json + x-accepts: + - application/json + /api/rest/2.0/metadata/tml/export: + post: + description: |2+ + + Version: 9.0.0.cl or later + + + Exports the [TML](https://docs.thoughtspot.com/cloud/latest/tml) representation of metadata objects in JSON or YAML format. + + Requires `DATADOWNLOADING` (**Can download Data**) and at least view access to the metadata object. + + #### Usage guidelines + + * You can export one or several objects by passing metadata object GUIDs in the `metadata` array. + * When exporting TML content for a Liveboard or Answer object, you can set `export_associated` to `true` to retrieve TML content for underlying Worksheets, Tables, or Views, including the GUID of each object within the headers. When `export_associated` is set to `true`, consider retrieving one metadata object at a time. + * Set `export_fqns` to `true` to add FQNs of the referenced objects in the TML content. For example, if you send an API request to retrieve TML for a Liveboard and its associated objects, the API returns the TML content with FQNs of the referenced Worksheet. Exporting TML with FQNs is useful if ThoughtSpot has multiple objects with the same name and you want to eliminate ambiguity when importing TML files into ThoughtSpot. It eliminates the need for adding FQNs of the referenced objects manually during the import operation. + * To export only the TML of feedbacks associated with an object, set the GUID of the object as `identifier`, and set the `type` as `FEEDBACK` in the `metadata` array. + * To export the TML of an object along with the feedbacks associated with it, set the GUID of the object as `identifier`, set the `type` as `LOGIAL_TABLE` in the `metadata` array, and set `export_with_associated_feedbacks` in `export_options` to true. + + For more information, see [TML Documentation](https://developers.thoughtspot.com/docs/tml#_export_a_tml). + + For more information on feedbacks, see [Feedback Documentation](https://docs.thoughtspot.com/cloud/latest/sage-feedback). + + + + + operationId: exportMetadataTML + parameters: [] + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/ExportMetadataTMLRequest' + required: true + responses: + "200": + content: + application/json: + schema: + items: + type: object + type: array + description: Export TMLs of specified metadata objects is successful. + "400": + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + description: Invalid request. + "401": + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + description: Unauthorized access. + "403": + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + description: Forbidden access. + "500": + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + description: Unexpected error + tags: + - Metadata + - ThoughtSpotRest + x-content-type: application/json + x-accepts: + - application/json + /api/rest/2.0/metadata/tml/export/batch: + post: + description: |2+ + + Version: 10.1.0.cl or later + + + Exports the [TML](https://docs.thoughtspot.com/cloud/latest/tml) representation of metadata objects in JSON or YAML format. + + ### **Permissions Required** + + Requires `DATAMANAGEMENT` (**Can manage data**) and `USERMANAGEMENT` (**Can manage users**) privileges. + + #### **Usage Guidelines** + + This API is only applicable for `USER`, `GROUP`, and `ROLES` metadata types. + + - `batch_offset` Indicates the starting position within the complete dataset from which the API should begin returning objects. Useful for paginating results efficiently. + - `batch_size` Specifies the number of objects or items to retrieve in a single request. Helps control response size for better performance. + - `edoc_format` Defines the format of the TML content. The exported metadata can be in JSON or YAML format. + - `export_dependent` Specifies whether to include dependent metadata objects in the export. Ensures related objects are also retrieved if needed. + - `all_orgs_override` Indicates whether the export operation applies across all organizations. Useful for multi-tenant environments where cross-org exports are required. + + + + + + operationId: exportMetadataTMLBatched + parameters: [] + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/ExportMetadataTMLBatchedRequest' + required: true + responses: + "200": + content: + application/json: + schema: + type: object + description: Export TMLs of specified metadata objects is successful. + "400": + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + description: Invalid request. + "401": + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + description: Unauthorized access. + "403": + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + description: Forbidden access. + "500": + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + description: Unexpected error + tags: + - Metadata + - ThoughtSpotRest + x-content-type: application/json + x-accepts: + - application/json + /api/rest/2.0/metadata/answer/sql: + post: + description: |2+ + + Version: 9.0.0.cl or later + + + Fetches the underlying SQL query data for an Answer object. + + Requires at least view access to the Answer object. + + Upon successful execution, the API returns the SQL queries for the specified object as shown in this example: + ``` + { + "metadata_id":"8fbe44a8-46ad-4b16-8d39-184b2fada490", + "metadata_name":"Total sales", + "metadata_type":"ANSWER", + "sql_queries":[ + { + "metadata_id":"8fbe44a8-46ad-4b16-8d39-184b2fada490", + "metadata_name":"Total sales -test", + "sql_query":"SELECT \n \"ta_1\".\"REGION\" \"ca_1\", \n \"ta_2\".\"PRODUCTNAME\" \"ca_2\", \n \"ta_1\".\"STORENAME\" \"ca_3\", \n CASE\n WHEN sum(\"ta_3\".\"SALES\") IS NOT NULL THEN sum(\"ta_3\".\"SALES\")\n ELSE 0\n END \"ca_4\", \n CASE\n WHEN sum(\"ta_3\".\"QUANTITYPURCHASED\") IS NOT NULL THEN sum(\"ta_3\".\"QUANTITYPURCHASED\")\n ELSE 0\n END \"ca_5\"\nFROM \"RETAILAPPAREL\".\"PUBLIC\".\"FACT_RETAPP_SALES\" \"ta_3\"\n JOIN \"RETAILAPPAREL\".\"PUBLIC\".\"DIM_RETAPP_STORES\" \"ta_1\"\n ON \"ta_3\".\"STOREID\" = \"ta_1\".\"STOREID\"\n JOIN \"RETAILAPPAREL\".\"PUBLIC\".\"DIM_RETAPP_PRODUCTS\" \"ta_2\"\n ON \"ta_3\".\"PRODUCTID\" = \"ta_2\".\"PRODUCTID\"\nGROUP BY \n \"ca_1\", \n \"ca_2\", \n \"ca_3\"\n" + } + ] + } + ``` + + + + + + operationId: fetchAnswerSqlQuery + parameters: [] + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/FetchAnswerSqlQueryRequest' + required: true + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/SqlQueryResponse' + description: Fetching SQL query of specified metadata object is successful. + "400": + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + description: Invalid request. + "401": + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + description: Unauthorized access. + "403": + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + description: Forbidden access. + "500": + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + description: Unexpected error + tags: + - Metadata + - ThoughtSpotRest + x-content-type: application/json + x-accepts: + - application/json + /api/rest/2.0/metadata/tml/async/status: + post: + description: "\n Version: 10.4.0.cl or later\n\n\nGets information about the\ + \ status of the TML async import task scheduled using the `/api/rest/2.0/metadata/tml/async/import`\ + \ API call.\n\nTo fetch the task details, specify the ID of the TML async\ + \ import task. \n\nRequires access to the task ID. The API allows users who\ + \ initiated the asynchronous TML import via `/api/rest/2.0/metadata/tml/async/import`\ + \ to view the status of their tasks. Users with administration privilege\ + \ can view the status of all import tasks initiated by the users in their\ + \ Org.\n\n#### Usage guidelines\n\nSee [TML API Documentation](https://developers.thoughtspot.com/docs/tml#_fetch_status_of_the_tml_import_task)\ + \ for usage guidelines.\n\n\n\n\n" + operationId: fetchAsyncImportTaskStatus + parameters: [] + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/FetchAsyncImportTaskStatusRequest' + required: true + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/GetAsyncImportStatusResponse' + description: Async TML Import Task statuses fetched successfully. + "400": + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + description: Invalid request. + "401": + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + description: Unauthorized access. + "403": + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + description: Forbidden access. + "500": + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + description: Unexpected error + tags: + - Metadata + - ThoughtSpotRest + x-content-type: application/json + x-accepts: + - application/json + /api/rest/2.0/metadata/liveboard/sql: + post: + description: |2+ + + Version: 9.0.0.cl or later + + + Fetches the underlying SQL query data for a Liveboard object and its visualizations. + + Requires at least view access to the Liveboard object. + + To get SQL query data for a Liveboard, specify the GUID of the Liveboard. Optionally, you can add an array of visualization GUIDs to retrieve the SQL query data for visualizations in the Liveboard. + + Upon successful execution, the API returns the SQL queries for the specified object as shown in this example: + ``` + { + "metadata_id": "fa68ae91-7588-4136-bacd-d71fb12dda69", + "metadata_name": "Total Sales", + "metadata_type": "LIVEBOARD", + "sql_queries": [ + { + "metadata_id": "b3b6d2b9-089a-490c-8e16-b144650b7843", + "metadata_name": "Total quantity purchased, Total sales by region", + "sql_query": "SELECT \n \"ta_1\".\"REGION\" \"ca_1\", \n CASE\n WHEN sum(\"ta_2\".\"QUANTITYPURCHASED\") IS NOT NULL THEN sum(\"ta_2\".\"QUANTITYPURCHASED\")\n ELSE 0\n END \"ca_2\", \n CASE\n WHEN sum(\"ta_2\".\"SALES\") IS NOT NULL THEN sum(\"ta_2\".\"SALES\")\n ELSE 0\n END \"ca_3\"\nFROM \"RETAILAPPAREL\".\"PUBLIC\".\"FACT_RETAPP_SALES\" \"ta_2\"\n JOIN \"RETAILAPPAREL\".\"PUBLIC\".\"DIM_RETAPP_STORES\" \"ta_1\"\n ON \"ta_2\".\"STOREID\" = \"ta_1\".\"STOREID\"\nGROUP BY \"ca_1\"" + } + ] + } + ``` + + + + + + operationId: fetchLiveboardSqlQuery + parameters: [] + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/FetchLiveboardSqlQueryRequest' + required: true + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/SqlQueryResponse' + description: Fetching SQL query of specified metadata object is successful. + "400": + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + description: Invalid request. + "401": + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + description: Unauthorized access. + "403": + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + description: Forbidden access. + "500": + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + description: Unexpected error + tags: + - Metadata + - ThoughtSpotRest + x-content-type: application/json + x-accepts: + - application/json + /api/rest/2.0/metadata/tml/import: + post: + description: |2+ + + Version: 9.0.0.cl or later + + + Imports [TML](https://docs.thoughtspot.com/cloud/latest/tml) files into ThoughtSpot. + + Requires `DATAMANAGEMENT` (**Can manage data**) or `ADMINISTRATION` (**Can administer ThoughtsSpot**) privilege. + + If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the following Data control privileges may be required: + - `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) + - `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` (**Can manage data models**) + + #### Usage guidelines + + * Import all related objects in a single TML Import API call. For example, Tables that use the same Connection object and Worksheets connected to these Tables. + * Include the `fqn` property to distinguish objects that have the same name. + For example, if you have multiple Connections or Worksheets with the same name on ThoughtSpot and the Connection or Worksheet referenced in your TML file does not have a unique name to distinguish, it may result in invalid object references. + Adding `fqn` helps ThoughtSpot differentiate a Table from another with the same name. + We recommend [exporting TML with FQNs](#/http/api-endpoints/metadata/export-metadata-tml) and using these during the import operation. + * You can upload multiple TML files at a time. + If you import a Worksheet along with Liveboards, Answers, and other dependent objects in a single API call, the imported objects will be immediately available for use. + When you import only a Worksheet object, it may take some time for the Worksheet to become available in the ThoughtSpot system. Please wait for a few minutes, and then proceed to create an Answer and Liveboard from the newly imported Worksheet. + + For more information, see [TML Documentation](https://developers.thoughtspot.com/docs/tml#_import_a_tml). + + + + + + operationId: importMetadataTML + parameters: [] + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/ImportMetadataTMLRequest' + required: true + responses: + "200": + content: + application/json: + schema: + items: + type: object + type: array + description: Import metadata objects using specified TMLs is successful. + "400": + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + description: Invalid request. + "401": + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + description: Unauthorized access. + "403": + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + description: Forbidden access. + "500": + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + description: Unexpected error + tags: + - Metadata + - ThoughtSpotRest + x-content-type: application/json + x-accepts: + - application/json + /api/rest/2.0/metadata/tml/async/import: + post: + description: |2+ + + Version: 10.4.0.cl or later + + + Schedules a task to import [TML](https://docs.thoughtspot.com/cloud/latest/tml) files into ThoughtSpot. You can use this API endpoint to process TML objects asynchronously when importing TMLs of large and complex metadata objects into ThoughtSpot. Unlike the synchronous import TML operation, the API processes TML data in the background and returns a task ID, which can be used to check the status of the import task via `/api/rest/2.0/metadata/tml/async/status` API endpoint. + + Requires `DATAMANAGEMENT` (**Can manage data**) or `ADMINISTRATION` (**Can administer ThoughtsSpot**) privilege, and edit access to the TML objects. + + If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the following Data control privileges may be required: + - `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) + - `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` (**Can manage data models**) + + #### Usage guidelines + + See [Async TML API Documentation](https://developers.thoughtspot.com/docs/tml#_import_tml_objects_asynchronously) for usage guidelines. + + + + + + operationId: importMetadataTMLAsync + parameters: [] + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/ImportMetadataTMLAsyncRequest' + required: true + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/ImportEPackAsyncTaskStatus' + description: Async TML Import Task submitted successfully. + "400": + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + description: Invalid request. + "401": + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + description: Unauthorized access. + "403": + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + description: Forbidden access. + "500": + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + description: Unexpected error + tags: + - Metadata + - ThoughtSpotRest + x-content-type: application/json + x-accepts: + - application/json + /api/rest/2.0/metadata/parameterize: + post: + deprecated: true + description: "\nParameterize fields in metadata objects. \n Version: 10.9.0.cl\ + \ or later\n\n\n**Note:** This API endpoint is deprecated and will be removed\ + \ from ThoughtSpot in a future release. Use [POST /api/rest/2.0/metadata/parameterize-fields](/api/rest/2.0/metadata/parameterize-fields)\ + \ instead.\n\nAllows parameterizing fields in metadata objects in ThoughtSpot.\n\ + \nRequires appropriate permissions to modify the metadata object.\n\nThe API\ + \ endpoint allows parameterizing the following types of metadata objects:\n\ + * Logical Tables\n* Connections\n* Connection Configs\n\nFor a Logical Table\ + \ the field type must be `ATTRIBUTE` and field name can be one of:\n* databaseName\n\ + * schemaName\n* tableName\n\nFor a Connection or Connection Config, the field\ + \ type is always `CONNECTION_PROPERTY`. In this case, field_name specifies\ + \ the exact property of the Connection or Connection Config that needs to\ + \ be parameterized.\n\nFor Connection Config, the only supported field name\ + \ is:\n* impersonate_user\n\n\n\n\n\n" + operationId: parameterizeMetadata + parameters: [] + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/ParameterizeMetadataRequest' + required: true + responses: + "204": + description: Parameterize successful. + "400": + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + description: Invalid request. + "401": + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + description: Unauthorized access. + "403": + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + description: Forbidden access. + "500": + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + description: Unexpected error + tags: + - Metadata + - ThoughtSpotRest + x-content-type: application/json + x-accepts: + - application/json + /api/rest/2.0/metadata/parameterize-fields: + post: + description: "\nParameterize multiple fields of metadata objects. For example\ + \ [schemaName, databaseName] for LOGICAL_TABLE. \n Version: 26.5.0.cl or\ + \ later\n\n\nAllows parameterizing multiple fields of metadata objects in\ + \ ThoughtSpot. For example, you can parameterize [schemaName, databaseName]\ + \ for LOGICAL_TABLE.\n\nRequires appropriate permissions to modify the metadata\ + \ object.\n\nThe API endpoint allows parameterizing the following types of\ + \ metadata objects:\n* Logical Tables\n* Connections\n* Connection Configs\n\ + \nFor a Logical Table, the field type must be `ATTRIBUTE` and field names\ + \ can include:\n* databaseName\n* schemaName\n* tableName\n\nFor a Connection\ + \ or Connection Config, the field type is always `CONNECTION_PROPERTY`. In\ + \ this case, field_names specifies the exact properties of the Connection\ + \ or Connection Config that need to be parameterized.\n\nFor Connection Config,\ + \ supported field names include:\n* impersonate_user\n\nYou can parameterize\ + \ multiple fields at once by providing an array of field names.\n\n\n\n\n\n" + operationId: parameterizeMetadataFields + parameters: [] + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/ParameterizeMetadataFieldsRequest' + required: true + responses: + "204": + description: Parameterize successful. + "400": + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + description: Invalid request. + "401": + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + description: Unauthorized access. + "403": + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + description: Forbidden access. + "500": + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + description: Unexpected error + tags: + - Metadata + - ThoughtSpotRest + x-content-type: application/json + x-accepts: + - application/json + /api/rest/2.0/metadata/search: + post: + description: |2+ + + Version: 9.0.0.cl or later + + + Gets a list of metadata objects available on the ThoughtSpot system. + + This API endpoint is available to all users who have view access to the object. Users with `ADMINISTRATION` (**Can administer ThoughtSpot**) privileges can view data for all metadata objects, including users and groups. + + #### Usage guidelines + + - To get all metadata objects, send the API request without any attributes. + - To get metadata objects of a specific type, set the `type` attribute. For example, to fetch a Worksheet, set the type as `LOGICAL_TABLE`. + - To filter metadata objects within type `LOGICAL_TABLE`, set the `subtypes` attribute. For example, to fetch a Worksheet, set the type as `LOGICAL_TABLE` & subtypes as `[WORKSHEET]`. + - To get a specific metadata object, specify the GUID. + - To customize your search and filter the API response, you can use several parameters. + You can search for objects created or modified by specific users, by tags applied to the objects, or by using the include parameters like `include_auto_created_objects`, `include_dependent_objects`, `include_headers`, `include_incomplete_objects`, and so on. + You can also define sorting options to sort the data retrieved in the API response. + - To get discoverable objects when linientmodel is enabled you can use `include_discoverable_objects` as true else false. Default value is true. + - For liveboard metadata type, to get the newer format, set the `liveboard_response_format` as V2. Default value is V1. + - To retrieve only objects that are published, set the `include_only_published_objects` as true. Default value is false. + + **NOTE**: The following parameters support pagination of metadata records: + + - `tag_identifiers` + - `type` + - `subtypes` + - `created_by_user_identifiers` + - `modified_by_user_identifiers` + - `owned_by_user_identifiers` + - `exclude_objects` + - `include_auto_created_objects` + - `favorite_object_options` + - `include_only_published_objects` + If you are using other parameters to search metadata, set `record_size` to `-1` and `record_offset` to `0`. + + + + + + operationId: searchMetadata + parameters: [] + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/SearchMetadataRequest' + required: true + responses: + "200": + content: + application/json: + schema: + items: + $ref: '#/components/schemas/MetadataSearchResponse' + type: array + description: Metadata objects search result. + "400": + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + description: Invalid request. + "401": + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + description: Unauthorized access. + "403": + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + description: Forbidden access. + "500": + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + description: Unexpected error + tags: + - Metadata + - ThoughtSpotRest + x-content-type: application/json + x-accepts: + - application/json + /api/rest/2.0/metadata/unparameterize: + post: + description: "\nRemove parameterization from fields in metadata objects. \n\ + \ Version: 26.5.0.cl or later\n\n\nAllows removing parameterization from\ + \ fields in metadata objects in ThoughtSpot.\n\nRequires appropriate permissions\ + \ to modify the metadata object.\n\nThe API endpoint allows unparameterizing\ + \ the following types of metadata objects:\n* Logical Tables\n* Connections\n\ + * Connection Configs\n\nFor a Logical Table the field type must be `ATTRIBUTE`\ + \ and field name can be one of:\n* databaseName\n* schemaName\n* tableName\n\ + \nFor a Connection or Connection Config, the field type is always `CONNECTION_PROPERTY`.\ + \ In this case, field_name specifies the exact property of the Connection\ + \ or Connection Config that needs to be unparameterized.\n\nFor Connection\ + \ Config, the only supported field name is:\n* impersonate_user\n\n\n\n\n\n" + operationId: unparameterizeMetadata + parameters: [] + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/UnparameterizeMetadataRequest' + required: true + responses: + "204": + description: Successfuly removed parameters. + "400": + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + description: Invalid request. + "401": + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + description: Unauthorized access. + "403": + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + description: Forbidden access. + "500": + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + description: Unexpected error + tags: + - Metadata + - ThoughtSpotRest + x-content-type: application/json + x-accepts: + - application/json + /api/rest/2.0/metadata/headers/update: + post: + description: "\nUpdate header attributes for a given list of header objects.\ + \ \n Version: 10.6.0.cl or later\n\n\n## Prerequisites\n- **Privileges Required:**\n\ + \ - `DATAMANAGEMENT` (Can manage data) or `ADMINISTRATION` (Can administer\ + \ ThoughtSpot).\n- **Additional Privileges (if RBAC is enabled):**\n - `ORG_ADMINISTRATION`\ + \ (Can manage orgs).\n\n---\n\n## Usage Guidelines\n\n### Parameters\n\n1.\ + \ **headers_update** \n - **Description:** List of header objects with\ + \ their attributes to be updated. Each object contains a list of attributes\ + \ to be updated in the header.\n - **Usage:**\n - You must provide\ + \ either `identifier` or `obj_identifier`, but not both. Both fields cannot\ + \ be empty.\n - When `org_identifier` is set to `-1`, only the `identifier`\ + \ value is accepted; `obj_identifier` is not allowed.\n\n2. **org_identifier**\ + \ \n - **Description:** GUID (Globally Unique Identifier) or name of the\ + \ organization. \n - **Usage:**\n - Leaving this field empty assumes\ + \ that the changes should be applied to the current organization \n -\ + \ Provide `org_guid` or `org_name` to uniquely identify the organization where\ + \ changes need to be applied. .\n - Provide `-1` if changes have to be\ + \ applied across all the org.\n\n---\n\n## Note\nCurrently, this API is enabled\ + \ only for updating the `obj_identifier` attribute. Only `text` will be allowed\ + \ in attribute's value.\n\n## Best Practices\n\n1. **Backup Before Conversion:**\ + \ \n Always export metadata as a backup before initiating the update process\n\ + \n---\n\n## Examples\n\n### Only `identifier` is given \n```json\n{\n \"\ + headers_update\":\n [\n {\n \"identifier\": \"guid_1\",\n \"\ + obj_identifier\": \"\",\n \"type\": \"LOGICAL_COLUMN\",\n \"attributes\"\ + :\n [\n {\n \"name\": \"obj_id\",\n \"value\"\ + : \"custom_object_id\"\n }\n ]\n }\n ],\n \"org_identifier\"\ + : \"orgGuid\"\n}\n```\n\n### Only `obj_identifier` is given\n```json\n{\n\ + \ \"headers_update\":\n [\n {\n \"obj_identifier\": \"custom_object_id\"\ + ,\n \"type\": \"ANSWER\",\n \"attributes\":\n [\n {\n\ + \ \"name\": \"obj_id\",\n \"value\": \"custom_object_id\"\ + \n }\n ]\n }\n ],\n \"org_identifier\": \"orgName\"\n}\n\ + ```\n\n### Executing update for all org `-1`\n```json\n{\n \"headers_update\"\ + :\n [\n {\n \"identifier\": \"guid_1\",\n \"type\": \"ANSWER\"\ + ,\n \"attributes\":\n [\n {\n \"name\": \"obj_id\"\ + ,\n \"value\": \"custom_object_id\"\n }\n ]\n }\n\ + \ ],\n \"org_identifier\": -1\n}\n```\n\n### Optional `type` is not provided\n\ + ```json\n{\n \"headers_update\":\n [\n {\n \"identifier\": \"guid_1\"\ + ,\n \"attributes\":\n [\n {\n \"name\": \"obj_id\"\ + ,\n \"value\": \"custom_object_id\"\n }\n ]\n }\n\ + \ ],\n \"org_identifier\": -1\n}\n```\n\n\n\n\n" + operationId: updateMetadataHeader + parameters: [] + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/UpdateMetadataHeaderRequest' + required: true + responses: + "204": + description: Headers update was successful. + "400": + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + description: Invalid request. + "401": + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + description: Unauthorized access. + "403": + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + description: Forbidden access. + "500": + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + description: Unexpected error + tags: + - Metadata + - ThoughtSpotRest + x-content-type: application/json + x-accepts: + - application/json + /api/rest/2.0/metadata/update-obj-id: + post: + description: "\nUpdate object IDs for given metadata objects. \n Version: 10.8.0.cl\ + \ or later\n\n\n## Prerequisites\n- **Privileges Required:**\n - `DATAMANAGEMENT`\ + \ (Can manage data) or `ADMINISTRATION` (Can administer ThoughtSpot).\n- **Additional\ + \ Privileges (if RBAC is enabled):**\n - `ORG_ADMINISTRATION` (Can manage\ + \ orgs).\n\n---\n\n## Usage Guidelines\n\n### Parameters\n\n1. **metadata**\ + \ \n - **Description:** List of metadata objects to update their object\ + \ IDs.\n - **Usage:**\n - Use either `current_obj_id` alone OR use\ + \ `metadata_identifier` with `type` (when needed).\n - When using `metadata_identifier`,\ + \ the `type` field is required if using a name instead of a GUID.\n -\ + \ The `new_obj_id` field is always required.\n\n---\n\n## Note\nThis API is\ + \ specifically designed for updating object IDs of metadata objects. It internally\ + \ uses the header update mechanism to perform the changes.\n\n## Best Practices\n\ + \n1. **Backup Before Update:** \n Always export metadata as a backup before\ + \ initiating the update process.\n\n2. **Validation:**\n - When using `current_obj_id`,\ + \ ensure it matches the existing object ID exactly.\n - When using `metadata_identifier`\ + \ with a name, ensure the `type` is specified correctly.\n - Verify that\ + \ the `new_obj_id` follows your naming conventions and is unique within your\ + \ system.\n\n---\n\n## Examples\n\n### Using current_obj_id\n```json\n{\n\ + \ \"metadata\": [\n {\n \"current_obj_id\": \"existing_object_id\"\ + ,\n \"new_obj_id\": \"new_object_id\"\n }\n ]\n}\n```\n\n### Using\ + \ metadata_identifier with GUID\n```json\n{\n \"metadata\": [\n {\n \ + \ \"metadata_identifier\": \"01234567-89ab-cdef-0123-456789abcdef\",\n\ + \ \"new_obj_id\": \"new_object_id\"\n }\n ]\n}\n```\n\n### Using\ + \ metadata_identifier with name and type\n```json\n{\n \"metadata\": [\n\ + \ {\n \"metadata_identifier\": \"My Answer\",\n \"type\": \"\ + ANSWER\",\n \"new_obj_id\": \"new_object_id\"\n }\n ]\n}\n```\n\n\ + ### Multiple objects update\n```json\n{\n \"metadata\": [\n {\n \"\ + current_obj_id\": \"existing_object_id_1\",\n \"new_obj_id\": \"new_object_id_1\"\ + \n },\n {\n \"metadata_identifier\": \"My Worksheet\",\n \"\ + type\": \"LOGICAL_TABLE\",\n \"new_obj_id\": \"new_object_id_2\"\n \ + \ }\n ]\n}\n```\n\n\n\n\n\n" + operationId: updateMetadataObjId + parameters: [] + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/UpdateMetadataObjIdRequest' + required: true + responses: + "204": + description: Headers update was successful. + "400": + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + description: Invalid request. + "401": + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + description: Unauthorized access. + "403": + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + description: Forbidden access. + "500": + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + description: Unexpected error + tags: + - Metadata + - ThoughtSpotRest + x-content-type: application/json + x-accepts: + - application/json + /api/rest/2.0/orgs/create: + post: + description: |2+ + + Version: 9.0.0.cl or later + + + Creates an Org object. + + To use this API, the [Orgs](https://docs.thoughtspot.com/cloud/latest/orgs-overview) feature must be enabled in your cluster. + + Requires cluster administration (**Can administer Org**) privileges. + If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `ORG_ADMINISTRATION` (**Can manage Orgs**) privilege is required. + + + + + + operationId: createOrg + parameters: [] + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/CreateOrgRequest' + required: true + responses: + "200": + content: + application/json: + examples: + example_1: + value: + id: 1980035173 + name: test_org + status: ACTIVE + description: test_org + visibility: SHOW + schema: + $ref: '#/components/schemas/OrgResponse' + description: Organization successfully created. + "400": + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + description: Invalid request. + "401": + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + description: Unauthorized access. + "403": + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + description: Forbidden access. + "500": + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + description: Unexpected error + tags: + - Orgs + - ThoughtSpotRest + x-content-type: application/json + x-accepts: + - application/json + /api/rest/2.0/orgs/{org_identifier}/delete: + post: + description: |2+ + + Version: 9.0.0.cl or later + + + Deletes an Org object from the ThoughtSpot system. + + Requires cluster administration (**Can administer Org**) privilege. + If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `ORG_ADMINISTRATION` (**Can manage Orgs**) privilege is required. + + When you delete an Org, all its users and objects created in that Org context are removed. However, if the users in the deleted Org also exists in other Orgs, they are removed only from the deleted Org. + + + + + + operationId: deleteOrg + parameters: + - description: ID or name of the Org + explode: false + in: path + name: org_identifier + required: true + schema: + type: string + style: simple + responses: + "204": + description: Organization successfully deleted. + "400": + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + description: Invalid request. + "401": + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + description: Unauthorized access. + "403": + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + description: Forbidden access. + "500": + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + description: Unexpected error + tags: + - Orgs + - ThoughtSpotRest + x-accepts: + - application/json + /api/rest/2.0/orgs/search: + post: + description: |2+ + + Version: 9.0.0.cl or later + + + Gets a list of Orgs configured on the ThoughtSpot system. To get details of a specific Org, specify the Org ID or name. You can also pass parameters such as status, visibility, and user identifiers to get a specific list of Orgs. + + Requires cluster administration (**Can administer Org**) privileges. + If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `ORG_ADMINISTRATION` (**Can manage Orgs**) privilege is required. + + + + + + operationId: searchOrgs + parameters: [] + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/SearchOrgsRequest' + required: true + responses: + "200": + content: + application/json: + examples: + example_1: + value: + - id: 0 + name: Primary + status: ACTIVE + description: Primary Org + visibility: SHOW + - id: 583464508 + name: test_org + status: ACTIVE + description: test_org + visibility: SHOW + schema: + items: + $ref: '#/components/schemas/OrgResponse' + type: array + description: Organization search result. + "400": + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + description: Invalid request. + "401": + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + description: Unauthorized access. + "403": + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + description: Forbidden access. + "500": + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + description: Unexpected error + tags: + - Orgs + - ThoughtSpotRest + x-content-type: application/json + x-accepts: + - application/json + /api/rest/2.0/orgs/{org_identifier}/update: + post: + description: |2+ + + Version: 9.0.0.cl or later + + + Updates an Org object. You can modify Org properties such as name, description, and user associations. + + Requires cluster administration (**Can administer Org**) privileges. + If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `ORG_ADMINISTRATION` (**Can manage Orgs**) privilege is required. + + + + + + operationId: updateOrg + parameters: + - description: ID or name of the Org + explode: false + in: path + name: org_identifier + required: true + schema: + type: string + style: simple + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/UpdateOrgRequest' + required: true + responses: + "204": + description: Organization successfully updated. + "400": + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + description: Invalid request. + "401": + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + description: Unauthorized access. + "403": + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + description: Forbidden access. + "500": + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + description: Unexpected error + tags: + - Orgs + - ThoughtSpotRest + x-content-type: application/json + x-accepts: + - application/json + /api/rest/2.0/report/answer: + post: + description: "\n Version: 9.0.0.cl or later\n\n\nExports an Answer in the given\ + \ file format. You can download the Answer data as a PDF, PNG, CSV, or XLSX\ + \ file.\n\nRequires at least view access to the Answer.\n\n#### Usage guidelines\n\ + \nIn the request body, specify the GUID or name of the Answer and set `file_format`.\ + \ The default file format is CSV.\n\nUse the `type` parameter to specify whether\ + \ the Answer being exported is a saved Answer (`SAVED`) or a pinned Answer\ + \ on a Liveboard (`PINNED`). Defaults to `SAVED`. When using `PINNED`, the\ + \ `metadata_identifier` must be the container id.\n\n**NOTE**:\n* The downloadable\ + \ file returned in API response file is extensionless. Please rename the downloaded\ + \ file by typing in the relevant extension.\n* HTML rendering is not supported\ + \ for PDF exports of Answers with tables.\n\nOptionally, you can define [runtime\ + \ overrides](https://developers.thoughtspot.com/docs/fetch-data-and-report-apis#_runtime_overrides)\ + \ to apply to the Answer data. \n\n\n\n\n" + operationId: exportAnswerReport + parameters: [] + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/ExportAnswerReportRequest' + required: true + responses: + "200": + content: + application/octet-stream: + schema: + format: binary + type: string + description: Export report file of specified metadata object is successful. + "400": + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + description: Invalid request. + "401": + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + description: Unauthorized access. + "403": + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + description: Forbidden access. + "500": + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + description: Unexpected error + tags: + - Reports + - ThoughtSpotRest + x-content-type: application/json + x-accepts: + - application/json + - application/octet-stream + /api/rest/2.0/report/liveboard: + post: + description: "\n Version: 9.0.0.cl or later\n\n\nExports a Liveboard and its\ + \ visualizations in PDF, PNG, CSV, or XLSX file format.\nThe default `file_format`\ + \ is CSV.\n\nRequires at least view access to the Liveboard.\n\n#### Usage\ + \ guidelines\n\nIn the request body, specify the GUID or name of the Liveboard.\ + \ To generate a Liveboard report with specific visualizations, add GUIDs or\ + \ names of the visualizations.\n\n**NOTE**: \n\n* The downloadable file returned\ + \ in API response file is extensionless. Please rename the downloaded file\ + \ by typing in the relevant extension.\n\n* Optionally, you can define [runtime\ + \ overrides](https://developers.thoughtspot.com/docs/fetch-data-and-report-apis#_runtime_overrides)\ + \ to apply to the Answer data.\n\n* To include unsaved changes in the report,\ + \ pass the `transient_pinboard_content` script generated from the `getExportRequestForCurrentPinboard`\ + \ method in the Visual Embed SDK. Upon successful execution, the API returns\ + \ the report with unsaved changes, including ad hoc changes to visualizations.\ + \ For more information, see [Liveboard Report API](https://developers.thoughtspot.com/docs/fetch-data-and-report-apis#_liveboard_report_api).\ + \ \n\n* Starting with ThoughtSpot Cloud 10.9.0.cl release, the Liveboard can\ + \ be exported in the PNG format in the resolution of your choice. To enable\ + \ this on your instance, contact ThoughtSpot support. When this feature is\ + \ enabled, the options `include_cover_page`,`include_filter_page` within the\ + \ `png_options` will not be available for PNG exports.\n\n* Starting with\ + \ the ThoughtSpot Cloud 26.2.0.cl release,\n\n * Liveboards can be exported\ + \ in CSV format. \n * All visualizations within a Liveboard can be exported\ + \ as individual CSV files. \n * When exporting multiple visualizations\ + \ or the entire Liveboard, the system returns the report as a compressed ZIP\ + \ file containing the separate CSV files for each visualization.\n\n * Liveboards\ + \ can also be exported in XLSX format. \n * All selected visualizations\ + \ are consolidated into a single Excel workbook (.xlsx), with each visualization\ + \ placed in its own worksheet (tab). \n * XLSX exports are limited to a\ + \ maximum of 255 worksheets (tabs) per workbook.\n\n\n\n\n" + operationId: exportLiveboardReport + parameters: [] + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/ExportLiveboardReportRequest' + required: true + responses: + "200": + content: + application/octet-stream: + schema: + format: binary + type: string + description: Export report file of specified metadata object is successful. + "400": + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + description: Invalid request. + "401": + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + description: Unauthorized access. + "403": + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + description: Forbidden access. + "500": + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + description: Unexpected error + tags: + - Reports + - ThoughtSpotRest + x-content-type: application/json + x-accepts: + - application/json + - application/octet-stream + /api/rest/2.0/roles/create: + post: + description: |2+ + + Version: 9.5.0.cl or later + + + Creates a Role object in ThoughtSpot. + + Available only if [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance. To create a Role, the `ROLE_ADMINISTRATION` (**Can manage roles**) privilege is required. + + + + + + operationId: createRole + parameters: [] + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/CreateRoleRequest' + required: true + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/RoleResponse' + description: Role successfully created. + "400": + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + description: Invalid parameters. + "401": + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + description: Unauthorized access. + "403": + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + description: Forbidden access. + "500": + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + description: Internal error + tags: + - Roles + - ThoughtSpotRest + x-content-type: application/json + x-accepts: + - application/json + /api/rest/2.0/roles/{role_identifier}/delete: + post: + description: |2+ + + Version: 9.5.0.cl or later + + + Deletes a Role object from the ThoughtSpot system. + + Available only if [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance. To delete a Role, the `ROLE_ADMINISTRATION` (**Can manage roles**) privilege is required. + + + + + + operationId: deleteRole + parameters: + - description: Unique ID or name of the Role. ReadOnly roles cannot be deleted. + explode: false + in: path + name: role_identifier + required: true + schema: + type: string + style: simple + responses: + "204": + description: Role successfully deleted. + "400": + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + description: Invalid request. + "401": + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + description: Unauthorized access. + "403": + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + description: Forbidden access. + "500": + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + description: Internal error + tags: + - Roles + - ThoughtSpotRest + x-accepts: + - application/json + /api/rest/2.0/roles/search: + post: + description: |2+ + + Version: 9.5.0.cl or later + + + Gets a list of Role objects from the ThoughtSpot system. + + Available if [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance. To search for Roles, the `ROLE_ADMINISTRATION` (**Can manage roles**) privilege is required. + + To get details of a specific Role object, specify the GUID or name. You can also filter the API response based on user group and Org identifiers, privileges assigned to the Role, and deprecation status. + + + + + + operationId: searchRoles + parameters: [] + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/SearchRolesRequest' + required: true + responses: + "200": + content: + application/json: + schema: + items: + $ref: '#/components/schemas/SearchRoleResponse' + type: array + description: Roles search result. + "400": + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + description: Invalid request. + "401": + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + description: Unauthorized access. + "403": + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + description: Forbidden access. + "500": + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + description: Internal error + tags: + - Roles + - ThoughtSpotRest + x-content-type: application/json + x-accepts: + - application/json + /api/rest/2.0/roles/{role_identifier}/update: + post: + description: |2+ + + Version: 9.5.0.cl or later + + + Updates the properties of a Role object. + + Available only if [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance. To update a Role, the `ROLE_ADMINISTRATION` (**Can manage roles**) privilege is required. + + + + + + operationId: updateRole + parameters: + - description: Unique ID or name of the Role. + explode: false + in: path + name: role_identifier + required: true + schema: + type: string + style: simple + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/UpdateRoleRequest' + required: true + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/RoleResponse' + description: Role successfully updated. + "400": + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + description: Invalid request. + "401": + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + description: Unauthorized access. + "403": + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + description: Forbidden access. + "500": + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + description: Unexpected error + tags: + - Roles + - ThoughtSpotRest + x-content-type: application/json + x-accepts: + - application/json + /api/rest/2.0/schedules/create: + post: + description: "\nCreate schedule. \n Version: 9.4.0.cl or later\n\n\nCreates\ + \ a Liveboard schedule job.\n\nRequires at least edit access to Liveboards.\ + \ To create a schedule on behalf of another user, you need `ADMINISTRATION`\ + \ (**Can administer Org**) or `JOBSCHEDULING` (**Can schedule for others**)\ + \ privilege and edit access to the Liveboard.\nIf [Role-Based Access Control\ + \ (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your\ + \ instance, the `JOBSCHEDULING` (**Can schedule for others**) privilege is\ + \ required.\n\n#### Usage guidelines\n\n* The description text is mandatory.\ + \ The description text appears as **Description: ** in the\ + \ Liveboard schedule email notifications.\n* For Liveboards with both charts\ + \ and tables, schedule creation is only supported in PDF and XLS formats.\ + \ Schedules created in CSV formats for such Liveboards will fail to run. If\ + \ `PDF` is set as the `file_format`, enable `pdf_options` to get the correct\ + \ attachment. Not doing so may cause the attachment to be rendered empty.\n\ + * To include only specific visualizations, specify the visualization GUIDs\ + \ in the `visualization_identifiers` array.\n* You can schedule a Liveboard\ + \ job to run periodically by setting frequency parameters. You can set the\ + \ schedule to run daily, weekly, monthly or every n minutes or hours. The\ + \ scheduled job can also be configured to run at a specific time of the day\ + \ or on specific days of the week or month. Please ensure that when setting\ + \ the schedule frequency for _minute of the object_, only values that are\ + \ multiples of 5 are included.\n* If the `frequency` parameters are defined,\ + \ you can set the time zone to a value that matches your server's time zone.\ + \ For example, `US/Central`, `Etc/UTC`, `CET`. The default time zone is `America/Los_Angeles`.\n\ + \nFor more information about Liveboard jobs, see [ThoughtSpot Product Documentation](https://docs.thoughtspot.com/cloud/latest/liveboard-schedule).\n\ + \n\n\n\n" + operationId: createSchedule + parameters: [] + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/CreateScheduleRequest' + required: true + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/ResponseSchedule' + description: Schedule successfully created. + "400": + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + description: Invalid request. + "401": + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + description: Unauthorized access. + "403": + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + description: Forbidden access. + "500": + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + description: Unexpected error + tags: + - Schedules + - ThoughtSpotRest + x-content-type: application/json + x-accepts: + - application/json + /api/rest/2.0/schedules/{schedule_identifier}/delete: + post: + description: "\nDeletes a scheduled job. \n Version: 9.4.0.cl or later\n\n\n\ + Deletes a scheduled Liveboard job.\n\nRequires at least edit access to Liveboard\ + \ or `ADMINISTRATION` (**Can administer Org**) privilege. \nIf [Role-Based\ + \ Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is\ + \ enabled on your instance, the `JOBSCHEDULING` (**Can schedule for others**)\ + \ privilege is required.\n\n\n\n\n\n" + operationId: deleteSchedule + parameters: + - description: Unique ID or name of the scheduled job. + explode: false + in: path + name: schedule_identifier + required: true + schema: + type: string + style: simple + responses: + "204": + description: Schedule successfully deleted. + "400": + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + description: Invalid request. + "401": + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + description: Unauthorized access. + "403": + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + description: Forbidden access. + "500": + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + description: Unexpected error + tags: + - Schedules + - ThoughtSpotRest + x-accepts: + - application/json + /api/rest/2.0/schedules/search: + post: + description: "\nSearch Schedules \n Version: 9.4.0.cl or later\n\n\nGets a\ + \ list of scheduled jobs configured for a Liveboard.\n\nTo get details of\ + \ a specific scheduled job, specify the name or GUID of the scheduled job.\n\ + \nRequires at least view access to Liveboards.\n\n**NOTE**: When filtering\ + \ schedules by parameters other than `metadata`, set `record_size` to `-1`\ + \ and `record_offset` to `0` for accurate results.\n\n\n\n\n\n" + operationId: searchSchedules + parameters: [] + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/SearchSchedulesRequest' + required: true + responses: + "200": + content: + application/json: + schema: + items: + $ref: '#/components/schemas/ResponseSchedule' + type: array + description: Schedule search result. + "400": + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + description: Invalid request. + "401": + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + description: Unauthorized access. + "403": + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + description: Forbidden access. + "500": + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + description: Unexpected error + tags: + - Schedules + - ThoughtSpotRest + x-content-type: application/json + x-accepts: + - application/json + /api/rest/2.0/schedules/{schedule_identifier}/update: + post: + description: "\nUpdate schedule. \n Version: 9.4.0.cl or later\n\n\nUpdates\ + \ a scheduled Liveboard job.\n\nRequires at least edit access to Liveboards.\ + \ To update a schedule on behalf of another user, you need `ADMINISTRATION`\ + \ (**Can administer Org**) or `JOBSCHEDULING` (**Can schedule for others**)\ + \ privilege and edit access to the Liveboard.\nIf [Role-Based Access Control\ + \ (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your\ + \ instance, the `JOBSCHEDULING` (**Can schedule for others**) privilege is\ + \ required.\n\nThe API endpoint allows you to pause a scheduled job, change\ + \ the status of a paused job. You can also edit the recipients list, frequency\ + \ of the job, format of the file to send to the recipients in email notifications,\ + \ PDF options, and time zone setting.\n\n\n\n\n\n" + operationId: updateSchedule + parameters: + - description: Unique ID or name of the schedule. + explode: false + in: path + name: schedule_identifier + required: true + schema: + type: string + style: simple + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/UpdateScheduleRequest' + required: true + responses: + "204": + description: Schedule successfully updated. + "400": + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + description: Invalid request. + "401": + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + description: Unauthorized access. + "403": + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + description: Forbidden access. + "500": + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + description: Unexpected error + tags: + - Schedules + - ThoughtSpotRest + x-content-type: application/json + x-accepts: + - application/json + /api/rest/2.0/security/metadata/assign: + post: + description: |2+ + + Version: 9.0.0.cl or later + + + Transfers the ownership of one or several objects from one user to another. + + Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. + + If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `USER_ADMINISTRATION` (**Can manage users**) privilege and edit access to the objects are required. + + + + + + operationId: assignChangeAuthor + parameters: [] + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/AssignChangeAuthorRequest' + required: true + responses: + "204": + description: Author assignment for given metadata objects is successful. + "400": + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + description: Invalid request. + "401": + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + description: Unauthorized access. + "403": + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + description: Forbidden access. + "500": + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + description: Unexpected error + tags: + - Security + - ThoughtSpotRest + x-content-type: application/json + x-accepts: + - application/json + /api/rest/2.0/security/column/rules/fetch: + post: + description: "\nVersion: 10.12.0.cl or later\n\n\nFetches column security rules\ + \ for specified tables.\n\nThis API endpoint retrieves column-level security\ + \ rules configured for tables. It returns information about which columns\ + \ are secured and which groups have access to those columns.\n\n#### Usage\ + \ guidelines\n\n- Provide an array of table identifiers using either `identifier`\ + \ (GUID or name) or `obj_identifier` (object ID)\n- At least one of `identifier`\ + \ or `obj_identifier` must be provided for each table\n- The API returns column\ + \ security rules for all specified tables\n- Users must have appropriate permissions\ + \ to access security rules for the specified tables\n\n#### Required permissions\n\ + \n- `ADMINISTRATION` - Can administer ThoughtSpot\n- `DATAMANAGEMENT` - Can\ + \ manage data\n- `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` - Can manage worksheet\ + \ views and tables\n\n#### Example request\n\n```json\n{\n \"tables\": [\n\ + \ {\n \"identifier\": \"table-guid\",\n \"obj_identifier\": \"\ + table-object-id\"\n }\n ]\n}\n```\n\n#### Response format\n\nThe API returns\ + \ an array of `ColumnSecurityRuleResponse` objects wrapped in a `data` field.\ + \ Each `ColumnSecurityRuleResponse` object contains:\n- Table information\ + \ (GUID and object ID) \n- Array of column security rules with column details,\ + \ group access, and source table information\n\n#### Example response\n\n\ + ```json\n{\n \"data\": [\n {\n \"guid\": \"table-guid\",\n \"\ + objId\": \"table-object-id\",\n \"columnSecurityRules\": [\n {\n\ + \ \"column\": {\n \"id\": \"col_123\",\n \"\ + name\": \"Salary\"\n },\n \"groups\": [\n {\n\ + \ \"id\": \"group_1\",\n \"name\": \"HR Department\"\ + \n }\n ],\n \"sourceTableDetails\": {\n \ + \ \"id\": \"source-table-guid\",\n \"name\": \"Employee_Data\"\ + \n }\n }\n ]\n }\n ]\n}\n```\n\n\n\n\n" + operationId: fetchColumnSecurityRules + parameters: [] + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/FetchColumnSecurityRulesRequest' + required: true + responses: + "200": + content: + application/json: + schema: + items: + $ref: '#/components/schemas/ColumnSecurityRuleResponse' + type: array + description: Successfully fetched column security rules + "400": + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + description: Bad request - Table not found or invalid parameters + "401": + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + description: Unauthorized access. + "403": + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + description: Forbidden - User doesn't have permission to access security + rules for this table + "500": + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + description: Internal server error + tags: + - Security + - ThoughtSpotRest + x-content-type: application/json + x-accepts: + - application/json + /api/rest/2.0/security/metadata/fetch-object-privileges: + post: + description: "\n Version: 26.3.0.cl or later\n\n\nThis API fetches the object\ + \ privileges present for the given list of principals (user or group), on\ + \ the given set of objects. It supports pagination, which can be enabled and\ + \ configured using the request parameters. It provides users access to certain\ + \ features based on privilege based access control.\n\n#### Usage guidelines\n\ + \n- Specify the `type` (`USER` or `USER_GROUP`) and `identifier` (either GUID\ + \ or name) of the principals for which you want to retrieve object privilege\ + \ information in the `principals` array.\n- Specify the `type` (`LOGICAL_TABLE`)\ + \ and `identifier` (either GUID or name) of the metadata objects for which\ + \ you want to retrieve object privilege information in the `metadata` array.\ + \ Only `LOGICAL_TABLE` metadata type is supported for now. It may be extended\ + \ for other metadata types in future.\n- To control the offset from where\ + \ principals have to be fetched, use `record_offset`. When `record_offset`\ + \ is 0, information is fetched from the beginning.\n- To control the number\ + \ of principals to be fetched, use `record_size`. Default `record_size` is\ + \ 20.\n- Ensure `record_offset` for a subsequent request is one more than\ + \ the value of `record_size` of the previous request.\n- Ensure using correct\ + \ Authorization Bearer Token corresponding to specific user & org. \n\n####\ + \ Example request\n\n```json\n{\n \"principals\": [\n {\n \"type\"\ + : \"type-1\",\n \"identifier\": \"principal-guid-or-name-1\"\n },\n\ + \ {\n \"type\": \"type-2\",\n \"identifier\": \"principal-guid-or-name-2\"\ + \n }\n ],\n \"metadata\": [\n {\n \"type\": \"metadata-type-1\"\ + ,\n \"identifier\": \"metadata-guid-or-name-1\"\n },\n {\n \ + \ \"type\": \"metadata-type-2\",\n \"identifier\": \"metadata-guid-or-name-2\"\ + \n }\n ],\n \"record_offset\": 0,\n \"record_size\": 20\n}\n```\n\n\n\ + #### Response format\n\nThe API returns an array of `metadata_object_privileges`\ + \ objects wrapped in JSON. Each `metadata_object_privileges` object contains:\n\ + - Metadata information (GUID, name and type)\n- Array of `principal_object_privilege_info`.\n\ + - Each `principal_object_privilege_info` contains:\n - Principal type. All\ + \ principals of this type are listed as described below.\n - Array of `principal_object_privileges`.\n\ + \ - Each `principal_object_privileges` contains:\n - Principal information\ + \ (GUID, name, subtype)\n - List of applied object level privileges.\n\n\ + #### Example response\n\n```json\n{\n \"metadata_object_privileges\": [\n\ + \ {\n \"metadata_id\": \"metadata-guid-1\",\n \"metadata_name\"\ + : \"metadata-name-1\",\n \"metadata_type\": \"metadata-type-1\",\n\ + \ \"principal_object_privilege_info\": [\n {\n \ + \ \"principal_type\": \"principal-type-1\",\n \"principal_object_privileges\"\ + : [\n {\n \"principal_id\": \"principal-guid-1\"\ + ,\n \"principal_name\": \"principal-name-1\",\n \ + \ \"principal_sub_type\": \"principal-sub-type-1\",\n \"\ + object_privileges\": \"[object-privilege-1, object-privilege-2]\"\n \ + \ },\n {\n \"principal_id\": \"principal-guid-2\"\ + ,\n \"principal_name\": \"principal-name-2\",\n \ + \ \"principal_sub_type\": \"principal-sub-type-2\",\n \"\ + object_privileges\": \"[object-privilege-1, object-privilege-2]\"\n \ + \ }\n ]\n },\n {\n \"principal_type\"\ + : \"principal-type-2\",\n \"principal_object_privileges\": [\n\ + \ {\n \"principal_id\": \"principal-guid-3\",\n\ + \ \"principal_name\": \"principal-guid-4\",\n \ + \ \"principal_sub_type\": \"principal-sub-type-4\",\n \"\ + object_privileges\": \"[object-privilege-1]\"\n }\n \ + \ ]\n }\n ]\n },\n {\n \"metadata_id\"\ + : \"metadata-guid-2\",\n \"metadata_name\": \"metadata-name-2\",\n\ + \ \"metadata_type\": \"metadata-type-2\",\n \"principal_object_privilege_info\"\ + : [\n {\n \"principal_type\": \"principal-type-1\",\n\ + \ \"principal_object_privileges\": [\n {\n \ + \ \"principal_id\": \"principal-guid-1\",\n \"principal_name\"\ + : \"principal-name-1\",\n \"principal_sub_type\": \"principal-sub-type-1\"\ + ,\n \"object_privileges\": \"[object-privilege-3, object-privilege-4]\"\ + \n },\n {\n \"principal_id\": \"\ + principal-guid-2\",\n \"principal_name\": \"principal-name-2\"\ + ,\n \"principal_sub_type\": \"principal-sub-type-2\",\n \ + \ \"object_privileges\": \"[object-privilege-4]\"\n \ + \ }\n ]\n }\n ]\n }\n ]\n}\n```\n\n\n\ + \n\n" + operationId: fetchObjectPrivileges + parameters: [] + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/FetchObjectPrivilegesRequest' + required: true + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/ObjectPrivilegesOfMetadataResponse' + description: Fetching defined object privileges of metadata objects is successful. + "400": + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + description: Invalid request. + "401": + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + description: Unauthorized access. + "403": + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + description: Forbidden access. + "500": + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + description: Unexpected error + tags: + - Security + - ThoughtSpotRest + x-content-type: application/json + x-accepts: + - application/json + /api/rest/2.0/security/principals/fetch-permissions: + post: + description: "\n Version: 9.0.0.cl or later\n\n\nFetches object permission details\ + \ for a given principal object such as a user and group.\n\nRequires view\ + \ access to the metadata object. \n\n#### Usage guidelines\n\n* To get a list\ + \ of all metadata objects that a user or group can access, specify the `type`\ + \ and GUID or name of the principal.\n* To get permission details for a specific\ + \ object, add the `type` and GUID or name of the metadata object to your API\ + \ request.\n\nUpon successful execution, the API returns a list of metadata\ + \ objects and permission details for each object. \n\n\n\n\n\n" + operationId: fetchPermissionsOfPrincipals + parameters: [] + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/FetchPermissionsOfPrincipalsRequest' + required: true + responses: + "200": + content: + application/json: + examples: + example_1: + value: + principal_permission_details: + - principal_id: 7f5e7f87-09a1-487c-a1da-c4bb35e45270 + principal_name: test_user + principal_type: USER + principal_sub_type: LOCAL_USER + metadata_permission_info: + - metadata_type: LIVEBOARD + metadata_permissions: + - metadata_id: 2ff57a24-cf90-485f-8b4b-45fc17474c6f + metadata_name: Learn how to use ThoughtSpot + metadata_owner: + id: 2ff57a24-cf90-485f-8b4b-45fc17474c6f + name: Learn how to use ThoughtSpot + metadata_author: + id: 59481331-ee53-42be-a548-bd87be6ddd4a + name: tsadmin + permission: READ_ONLY + shared_permission: NO_ACCESS + group_permission: [] + schema: + $ref: '#/components/schemas/PermissionOfPrincipalsResponse' + description: Fetching permissions of principals is successful. + "400": + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + description: Invalid request. + "401": + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + description: Unauthorized access. + "403": + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + description: Forbidden access. + "500": + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + description: Unexpected error + tags: + - Security + - ThoughtSpotRest + x-content-type: application/json + x-accepts: + - application/json + /api/rest/2.0/security/metadata/fetch-permissions: + post: + description: |2+ + + Version: 9.0.0.cl or later + + + Fetches permission details for a given metadata object. + + Requires view access to the metadata object. + + #### Usage guidelines + + * To fetch a list of users and groups for a metadata object, specify `type` and GUID or name of the metadata object. + * To get permission details for a specific user or group, add `type` and GUID or name of the principal object to your API request. + + Upon successful execution, the API returns permission details and principal information for the object specified in the API request. + + + + + + operationId: fetchPermissionsOnMetadata + parameters: [] + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/FetchPermissionsOnMetadataRequest' + required: true + responses: + "200": + content: + application/json: + examples: + example_1: + value: + metadata_permission_details: + - metadata_id: a62a5bf3-9f16-45b2-a174-7d30b3b577a9 + metadata_name: testing + metadata_type: LIVEBOARD + metadata_owner: + id: a62a5bf3-9f16-45b2-a174-7d30b3b577a9 + name: testing + metadata_author: + id: 59481331-ee53-42be-a548-bd87be6ddd4a + name: tsadmin + principal_permission_info: + - principal_type: USER_GROUP + principal_sub_type: LOCAL_GROUP + principal_permissions: + - principal_id: d0326b56-ef23-4c8a-8327-a30e99bcc72b + principal_name: Administrator + permission: MODIFY + shared_permission: NO_ACCESS + group_permission: [] + - principal_type: USER + principal_sub_type: LOCAL_USER + principal_permissions: + - principal_id: 0f0dd0f7-7411-4195-a4aa-0dc6b58413c9 + principal_name: su + permission: MODIFY + shared_permission: NO_ACCESS + group_permission: [] + - principal_id: 59481331-ee53-42be-a548-bd87be6ddd4a + principal_name: tsadmin + permission: MODIFY + shared_permission: NO_ACCESS + group_permission: [] + schema: + $ref: '#/components/schemas/PermissionOfMetadataResponse' + description: Fetching permissions of metadata objects is successful. + "400": + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + description: Invalid request. + "401": + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + description: Unauthorized access. + "403": + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + description: Forbidden access. + "500": + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + description: Unexpected error + tags: + - Security + - ThoughtSpotRest + x-content-type: application/json + x-accepts: + - application/json + /api/rest/2.0/security/metadata/manage-object-privilege: + post: + description: "\n Version: 26.3.0.cl or later\n\n\nThis API allows the addition\ + \ or deletion of object level privileges for a set of users and groups, on\ + \ a set of metadata objects. It provides users to access certain features\ + \ based on privilege based access control.\n\n#### Usage guidelines\n\n- Specify\ + \ the `operation`. The supported operations are: `ADD`, `REMOVE`.\n- Specify\ + \ the type of the objects on which the object privileges are being provided\ + \ in `metadata_type`. Only `LOGICAL_TABLE` metadata type is supported for\ + \ now. It may be extended for other metadata types in future.\n- Specify the\ + \ list of object privilege types in the `object_privilege_types` array. The\ + \ supported object privilege types are: `SPOTTER_COACHING_PRIVILEGE`.\n- Specify\ + \ the identifiers (either GUID or name) for the metadata objects in the `metadata_identifiers`\ + \ array.\n- Specify the `type` (`USER` or `USER_GROUP`) and `identifier` (either\ + \ GUID or name) of the principals to which you want to apply the given operation\ + \ and given object privileges in the `principals` array.\n- Ensure using correct\ + \ Authorization Bearer Token corresponding to specific user & org.\n\n####\ + \ Example request\n\n```json\n{\n \"operation\": \"operation-type\",\n \"\ + metadata_type\": \"metadata-type\",\n \"object_privilege_types\": [\"privilege-type-1\"\ + , \"privilege-type-2\"],\n \"metadata_identifiers\": [\"metadata-guid-or-name-1\"\ + , \"metadata-guid-or-name-1\"],\n \"principals\": [\n {\n \"type\"\ + : \"type-1\", \n \"identifier\": \"principal-guid-or-name-1\"\n },\n\ + \ {\n \"type\": \"type-2\",\n \"identifier\": \"principal-guid-or-name-2\"\ + \n }\n ]\n}\n```\n\n> ###### Note:\n> * Only admin users, users with edit\ + \ access and users with coaching privilege on a given data-model can add or\ + \ remove principals related to SPOTTER_COACHING_PRIVILEGE \n\n\n\n\n" + operationId: manageObjectPrivilege + parameters: [] + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/ManageObjectPrivilegeRequest' + required: true + responses: + "204": + description: Object privileges added/removed successfully + "400": + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + description: Invalid request + "401": + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + description: Unauthorized access + "403": + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + description: Forbidden access + "500": + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + description: Unexpected error + tags: + - Security + - ThoughtSpotRest + x-content-type: application/json + x-accepts: + - application/json + /api/rest/2.0/security/metadata/publish: + post: + description: |2+ + + Version: 26.5.0.cl or later + + + Allows publishing metadata objects across organizations in ThoughtSpot. + + Requires ADMINISTRATION role and TENANT scope. + + The API endpoint allows publishing the following types of metadata objects: + * Liveboards + * Answers + * Logical Tables + + This API will essentially share the objects along with it's dependencies to + the org admins of the orgs to which it is being published. + + + + + + operationId: publishMetadata + parameters: [] + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/PublishMetadataRequest' + required: true + responses: + "204": + description: Publishing metadata objects is successful. + "400": + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + description: Invalid request. + "401": + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + description: Unauthorized access. + "403": + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + description: Forbidden access. + "500": + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + description: Unexpected error + tags: + - Security + - ThoughtSpotRest + x-content-type: application/json + x-accepts: + - application/json + /api/rest/2.0/security/metadata/share: + post: + description: |2+ + + Version: 9.0.0.cl or later + + + Allows sharing one or several metadata objects with users and groups in ThoughtSpot. + + Requires edit access to the metadata object. + + #### Supported metadata objects: + * Liveboards + * Visualizations + * Answers + * Models + * Views + * Connections + * Collections + + #### Object permissions + + You can provide `READ_ONLY` or `MODIFY` access when sharing an object with another user or group. The `READ_ONLY` permission grants view access to the shared object, whereas `MODIFY` provides edit access. + + To prevent a user or group from accessing the shared object, specify the GUID or name of the principal and set `shareMode` to `NO_ACCESS`. + + #### Sharing a visualization + + * Sharing a visualization implicitly shares the entire Liveboard with the recipient. + * Object permissions set for a shared visualization also apply to the Liveboard unless overridden by another API request or via UI. + * If email notifications for object sharing are enabled, a notification with a link to the shared visualization will be sent to the recipient’s email address. Although this link opens the shared visualization, recipients can also access other visualizations in the Liveboard. + + #### Sharing a collection + + Collections support **dual permissions** that provide fine-grained control: + + * **Collection permissions** (`share_mode`) - controls access to the collection itself (view, edit, delete the collection) + * **Content permissions** (`content_share_mode`) - controls access to objects within the collection (view, edit objects inside) + + **Default Behavior:** + - If only `share_mode` is specified, the content permissions default to `READ_ONLY` (except when `share_mode` is `NO_ACCESS`, then content also gets `NO_ACCESS`) + - To give users edit access to collection contents, explicitly set `content_share_mode: "MODIFY"` + + ## Examples + + The following JSON examples can be copy-pasted as request bodies for the REST v2 API endpoint: + + ```bash + POST /callosum/v1/v2/security/metadata/share + Content-Type: application/x-www-form-urlencoded + ``` + + ### Basic collection sharing + Share a collection with read-only access: + + ```json + { + "metadata_type": "COLLECTION", + "metadata_identifiers": ["Sales Reports Collection"], + "permissions": [{ + "principal": { + "type": "USER", + "identifier": "alice@company.com" + }, + "share_mode": "READ_ONLY" + }], + "notification": { + "message": "I've shared the Sales Reports collection with you", + "notify_on_share": true + } + } + ``` + + ### Collection sharing with dual permissions + Share a collection with different permissions for the collection vs. its contents: + + ```json + { + "metadata_type": "COLLECTION", + "metadata_identifiers": ["Marketing Analytics"], + "permissions": [{ + "principal": { + "type": "USER", + "identifier": "bob@company.com" + }, + "share_mode": "MODIFY", + "content_share_mode": "READ_ONLY" + }, { + "principal": { + "type": "USER_GROUP", + "identifier": "Marketing Team" + }, + "share_mode": "READ_ONLY", + "content_share_mode": "READ_ONLY" + }], + "notification": { + "emails": ["bob@company.com"], + "message": "You can edit the collection but content is read-only", + "enable_custom_url": false, + "notify_on_share": true + }, + "has_lenient_discoverability": false + } + ``` + + ### Multiple collections sharing + Share multiple collections with different users: + + ```json + { + "metadata": [ + { + "type": "COLLECTION", + "identifier": "Q4 Reports" + }, + { + "type": "COLLECTION", + "identifier": "Executive Dashboard Collection" + } + ], + "permissions": [{ + "principal": { + "type": "USER_GROUP", + "identifier": "Executives" + }, + "share_mode": "MODIFY" + }, { + "principal": { + "type": "USER", + "identifier": "manager@company.com" + }, + "share_mode": "READ_ONLY", + "content_share_mode": "MODIFY" + }], + "notification": { + "message": "Sharing quarterly collections with leadership team", + "notify_on_share": true + } + } + ``` + + ### Remove collection access + Remove access to a collection by setting share_mode to NO_ACCESS: + + ```json + { + "metadata_type": "COLLECTION", + "metadata_identifiers": ["Confidential Reports"], + "permissions": [{ + "principal": { + "type": "USER", + "identifier": "former-employee@company.com" + }, + "share_mode": "NO_ACCESS" + }], + "notification": { + "notify_on_share": false + } + } + ``` + + ### Collection Permission Scenarios + + **Scenario 1: Collection Admin** + - `share_mode: MODIFY` + `content_share_mode: MODIFY` = Full control over collection and its contents + + **Scenario 2: Collection Curator** + - `share_mode: MODIFY` + `content_share_mode: READ_ONLY` = Can manage collection structure but not edit contents + + **Scenario 3: Content Editor** + - `share_mode: READ_ONLY` + `content_share_mode: MODIFY` = Can edit objects within collection but can't change collection itself + + **Scenario 4: Viewer** + - `share_mode: READ_ONLY` + `content_share_mode: READ_ONLY` = View-only access to collection and contents + + + + + + operationId: shareMetadata + parameters: [] + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/ShareMetadataRequest' + required: true + responses: + "204": + description: Sharing metadata objects is successful. + "400": + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + description: Invalid request. + "401": + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + description: Unauthorized access. + "403": + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + description: Forbidden access. + "500": + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + description: Unexpected error + tags: + - Security + - ThoughtSpotRest + x-content-type: application/json + x-accepts: + - application/json + /api/rest/2.0/security/metadata/unpublish: + post: + description: |2+ + + Version: 26.5.0.cl or later + + + Allows unpublishing metadata objects from organizations in ThoughtSpot. + + Requires ADMINISTRATION role and TENANT scope. + + The API endpoint allows unpublishing the following types of metadata objects: + * Liveboards + * Answers + * Logical Tables + + When unpublishing objects, you can: + * Include dependencies by setting `include_dependencies` to true - this will unpublish all dependent objects if no other published object is using them + * Force unpublish by setting `force` to true - this will break all dependent objects in the unpublished organizations + + + + + + operationId: unpublishMetadata + parameters: [] + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/UnpublishMetadataRequest' + required: true + responses: + "204": + description: Unpublishing metadata objects is successful. + "400": + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + description: Invalid request. + "401": + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + description: Unauthorized access. + "403": + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + description: Forbidden access. + "500": + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + description: Unexpected error + tags: + - Security + - ThoughtSpotRest + x-content-type: application/json + x-accepts: + - application/json + /api/rest/2.0/security/column/rules/update: + post: + description: "\nVersion: 10.12.0.cl or later\n\n\nCreates, updates, or deletes\ + \ column security rules for specified tables.\n\nThis API endpoint allows\ + \ you to create, update, or delete column-level security rules on columns\ + \ of a table. The operation follows an \"all or none\" policy: if defining\ + \ security rules for any of the provided columns fails, the entire operation\ + \ will be rolled back, and no rules will be created.\n\n#### Usage guidelines\n\ + \n- Provide table identifier using either `identifier` (GUID or name) or `obj_identifier`\ + \ (object ID)\n- Use `clear_csr: true` to remove all column security rules\ + \ from the table\n- For each column, specify the security rule using `column_security_rules`\ + \ array\n- Use `is_unsecured: true` to mark a specific column as unprotected\n\ + - Use `group_access` operations to manage group associations:\n - `ADD`:\ + \ Add groups to the column's access list\n - `REMOVE`: Remove groups from\ + \ the column's access list\n - `REPLACE`: Replace all existing groups with\ + \ the specified groups\n\n#### Required permissions\n\n- `ADMINISTRATION`\ + \ - Can administer ThoughtSpot\n- `DATAMANAGEMENT` - Can manage data (if RBAC\ + \ is disabled)\n- `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` - Can manage worksheet\ + \ views and tables (if RBAC is enabled)\n\n#### Example request\n\n```json\n\ + {\n \"identifier\": \"table-guid\",\n \"obj_identifier\": \"table-object-id\"\ + ,\n \"clear_csr\": false,\n \"column_security_rules\": [\n {\n \"\ + column_identifier\": \"col id or col name\",\n \"is_unsecured\": false,\n\ + \ \"group_access\": [\n {\n \"operation\": \"ADD\",\n\ + \ \"group_identifiers\": [\"hr_group_id\", \"hr_group_name\", \"\ + finance_group_id\"]\n }\n ]\n },\n {\n \"column_identifier\"\ + : \"col id or col name\",\n \"is_unsecured\": true\n },\n {\n \ + \ \"column_identifier\": \"col id or col name\",\n \"is_unsecured\"\ + : false,\n \"group_access\": [\n {\n \"operation\": \"\ + REPLACE\",\n \"group_identifiers\": [\"management_group_id\", \"\ + management_group_name\"]\n }\n ]\n }\n ]\n}\n```\n\n#### Request\ + \ Body Schema\n\n- `identifier` (string, optional): GUID or name of the table\ + \ for which we want to create column security rules\n- `obj_identifier` (string,\ + \ optional): The object ID of the table\n- `clear_csr` (boolean, optional):\ + \ If true, then all the secured columns will be marked as unprotected, and\ + \ all the group associations will be removed\n- `column_security_rules` (array\ + \ of objects, required): An array where each object defines the security rule\ + \ for a specific column\n\nEach column security rule object contains:\n- `column_identifier`\ + \ (string, required): Column identifier (col_id or name)\n- `is_unsecured`\ + \ (boolean, optional): If true, the column will be marked as unprotected and\ + \ all groups associated with it will be removed\n- `group_access` (array of\ + \ objects, optional): Array of group operation objects\n\nEach group operation\ + \ object contains:\n- `operation` (string, required): Operation type - ADD,\ + \ REMOVE, or REPLACE\n- `group_identifiers` (array of strings, required):\ + \ Array of group identifiers (name or GUID) on which the operation will be\ + \ performed\n\n#### Response\n\nThis API does not return any response body.\ + \ A successful operation returns HTTP 200 status code.\n\n#### Operation Types\n\ + \n- **ADD**: Adds the specified groups to the column's access list\n- **REMOVE**:\ + \ Removes the specified groups from the column's access list \n- **REPLACE**:\ + \ Replaces all existing groups with the specified groups \n\n\n\n\n" + operationId: updateColumnSecurityRules + parameters: [] + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/UpdateColumnSecurityRulesRequest' + required: true + responses: + "204": + description: Successfully updated column security rules + "400": + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + description: Bad request - Invalid parameters or table not found + "401": + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + description: Unauthorized access. + "403": + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + description: Forbidden - User doesn't have permission to modify security + rules for this table + "500": + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + description: Internal server error + tags: + - Security + - ThoughtSpotRest + x-content-type: application/json + x-accepts: + - application/json + /api/rest/2.0/system/preferences/communication-channels/configure: + post: + description: |2+ + + Version: 10.14.0.cl or later + + + Configure communication channel preferences. + - Use `cluster_preferences` to update the default preferences for your ThoughtSpot application instance. + - If your instance has [Orgs](https://docs.thoughtspot.com/cloud/latest/orgs-overview), use `org_preferences` to specify Org-specific preferences that override the defaults. + + Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) or `DEVELOPER` (**Has developer privilege**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, users with `APPLICATION_ADMINISTRATION` (**Can manage application settings**) privilege are also authorized to perform this action. + + + + + + operationId: configureCommunicationChannelPreferences + parameters: [] + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/ConfigureCommunicationChannelPreferencesRequest' + required: true + responses: + "204": + description: Communication channel preferences successfully updated. + "400": + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + description: Invalid request. + "401": + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + description: Unauthorized access. + "403": + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + description: Forbidden access. + "500": + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + description: Unexpected error + tags: + - System + - ThoughtSpotRest + x-content-type: application/json + x-accepts: + - application/json + /api/rest/2.0/system/security-settings/configure: + post: + description: |2+ + + Version: 26.2.0.cl or later + + + Configure security settings for your ThoughtSpot application instance. + - Use `cluster_preferences` to update cluster-level security settings including CORS whitelisted URLs, CSP settings, SAML redirect URLs, partitioned cookies, and non-embed access configuration. + - Use `org_preferences` to configure Org-specific security settings. If your instance has [Orgs](https://docs.thoughtspot.com/cloud/latest/orgs-overview), this allows configuring CORS and non-embed access settings specific to the Org. + + Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) or `DEVELOPER` (**Has developer privilege**) privilege. Cluster-level SAML and script-src settings require `ADMINISTRATION` privilege. + See [Security Settings](https://developers.thoughtspot.com/docs/security-settings) for more details. + + + + + operationId: configureSecuritySettings + parameters: [] + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/ConfigureSecuritySettingsRequest' + required: true + responses: + "204": + description: Successfully configured the security settings. + "400": + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + description: Invalid request. + "401": + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + description: Unauthorized access. + "403": + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + description: Forbidden access. + "500": + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + description: Unexpected error + tags: + - System + - ThoughtSpotRest + x-content-type: application/json + x-accepts: + - application/json + /api/rest/2.0/system/config: + get: + description: |2+ + + Version: 9.0.0.cl or later + + + Retrieves the current configuration details of the cluster. If the request is successful, the API returns a list configuration settings applied on the cluster. + + Requires `ADMINISTRATION`(**Can administer ThoughtSpot**) privilege to view these complete configuration settings of the cluster. + If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `SYSTEM_INFO_ADMINISTRATION` (**Can view system activities**) privilege is required. + + This API does not require any parameters to be passed in the request. + + + + + + operationId: getSystemConfig + parameters: [] + responses: + "200": + content: + application/json: + examples: + example_1: + value: + onboarding_content_url: "" + saml_enabled: false + okta_enabled: false + schema: + $ref: '#/components/schemas/SystemConfig' + description: Cluster config information. + "400": + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + description: Invalid request. + "401": + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + description: Unauthorized access. + "403": + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + description: Forbidden access. + "500": + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + description: Unexpected error + tags: + - System + - ThoughtSpotRest + x-accepts: + - application/json + /api/rest/2.0/system: + get: + description: "\n Version: 9.0.0.cl or later\n\n\nGets system information such\ + \ as the release version, locale, time zone, deployment environment, date\ + \ format, and date time format of the cluster.\n\nRequires `ADMINISTRATION`\ + \ (**Can administer ThoughtSpot**) privileges.\nIf [Role-Based Access Control\ + \ (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your\ + \ instance, the `SYSTEM_INFO_ADMINISTRATION` (**Can view system activities**)\ + \ privilege is required.\n\nThis API does not require any parameters to be\ + \ passed in the request. \n\n\n\n\n\n" + operationId: getSystemInformation + parameters: [] + responses: + "200": + content: + application/json: + examples: + example_1: + value: + id: local + name: local + release_version: test + time_zone: America/Los_Angeles + locale: "" + date_format: MM/dd/yyyy + api_version: v1 + type: SW + environment: DEV + license: EAE + date_time_format: MM/dd/yyyy h:mm a + time_format: HH:mm:ss + system_user_id: 67e15c06-d153-4924-a4cd-ff615393b60f + super_user_id: 0f0dd0f7-7411-4195-a4aa-0dc6b58413c9 + hidden_object_id: 31745bb4-defd-4e8b-8de9-8fd01db78827 + system_group_id: 179d8867-cf36-4a8d-a019-63a226fd3196 + tsadmin_user_id: 59481331-ee53-42be-a548-bd87be6ddd4a + admin_group_id: d0326b56-ef23-4c8a-8327-a30e99bcc72b + all_tables_connection_id: bfc6feb4-8dac-402c-8ae8-78b43d318777 + all_user_group_id: b25ee394-9d13-49e3-9385-cd97f5b253b4 + accept_language: undefined + all_user_group_member_user_count: 13 + logical_model_version: 43 + schema: + $ref: '#/components/schemas/SystemInfo' + description: Cluster information. + "400": + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + description: Invalid request. + "401": + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + description: Unauthorized access. + "403": + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + description: Forbidden access. + "500": + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + description: Unexpected error + tags: + - System + - ThoughtSpotRest + x-accepts: + - application/json + /api/rest/2.0/system/config-overrides: + get: + description: "\n Version: 9.2.0.cl or later\n\n\nGets a list of configuration\ + \ overrides applied on the cluster. \n\nRequires `ADMINISTRATION` (**Can\ + \ administer ThoughtSpot**) privilege.\nIf [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac)\ + \ is enabled on your instance, the `APPLICATION_ADMINISTRATION` (**Can manage\ + \ application settings**) privilege is required.\n\nThis API does not require\ + \ any parameters to be passed in the request. \n\n\n\n\n\n" + operationId: getSystemOverrideInfo + parameters: [] + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/SystemOverrideInfo' + description: Cluster configuration which can be overridden. + "400": + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + description: Invalid request. + "401": + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + description: Unauthorized access. + "403": + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + description: Forbidden access. + "500": + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + description: Unexpected error + tags: + - System + - ThoughtSpotRest + x-accepts: + - application/json + /api/rest/2.0/system/preferences/communication-channels/search: + post: + description: |2+ + + Version: 10.14.0.cl or later + + + Fetch communication channel preferences. + - Use `cluster_preferences` to fetch the default preferences for your ThoughtSpot application instance. + - If your instance has [Orgs](https://docs.thoughtspot.com/cloud/latest/orgs-overview), use `org_preferences` to fetch any Org-specific preferences that override the defaults. + + Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) or `DEVELOPER` (**Has developer privilege**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, users with `APPLICATION_ADMINISTRATION` (**Can manage application settings**) privilege are also authorized to perform this action. + + + + + + operationId: searchCommunicationChannelPreferences + parameters: [] + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/SearchCommunicationChannelPreferencesRequest' + required: true + responses: + "200": + content: + application/json: + examples: + example_1: + value: + cluster_preferences: + - event_type: LIVEBOARD_SCHEDULE + channels: + - WEBHOOK + org_preferences: + - org: + id: "583464508" + name: test_org + preferences: + - event_type: LIVEBOARD_SCHEDULE + channels: + - EMAIL + schema: + $ref: '#/components/schemas/CommunicationChannelPreferencesResponse' + description: Communication channel preferences retrieved successfully. + "400": + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + description: Invalid request. + "401": + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + description: Unauthorized access. + "403": + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + description: Forbidden access. + "500": + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + description: Unexpected error + tags: + - System + - ThoughtSpotRest + x-content-type: application/json + x-accepts: + - application/json + /api/rest/2.0/system/security-settings/search: + post: + description: |2+ + + Version: 26.2.0.cl or later + + + Fetch security settings for your ThoughtSpot application instance. + - Use `scope: CLUSTER` to retrieve cluster-level security settings, including CORS and CSP allowlists, SAML redirect URLs, and settings that control access to non-embedded pages. + - Use `scope: ORG` to retrieve Org-level security settings. If your instance has [Orgs](https://docs.thoughtspot.com/cloud/latest/orgs-overview), this returns CORS and non-embed access settings specific to the Org. + - If `scope` is not specified, returns both cluster and Org-specific settings based on user privileges. + + Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) or `DEVELOPER` (**Has developer privilege**) privilege. + See [Security Settings](https://developers.thoughtspot.com/docs/security-settings) for more details. + + + + + operationId: searchSecuritySettings + parameters: [] + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/SearchSecuritySettingsRequest' + required: true + responses: + "200": + content: + application/json: + examples: + example_1: + value: + cluster_preferences: + enable_partitioned_cookies: false + cors_whitelisted_urls: + - example.com + csp_settings: + connect_src_urls: + - https://connect.example.com + font_src_urls: + - https://font.example.com + visual_embed_hosts: + - https://embed.example.com + iframe_src_urls: + - https://embed.example.com + img_src_urls: + - https://img.example.com + script_src_urls: + enabled: true + urls: + - https://script.example.com + style_src_urls: + - https://style.example.com + saml_redirect_urls: + - https://saml.example.com + non_embed_access: + block_full_app_access: true + org_preferences: + - org: + id: 0 + name: Primary + cors_whitelisted_urls: + - https://cors.example.com + non_embed_access: + block_full_app_access: true + groups_with_access: + - id: "1234567890" + name: Group Name + schema: + $ref: '#/components/schemas/SecuritySettingsResponse' + description: Successfully retrieved the list of security settings. + "400": + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + description: Invalid request. + "401": + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + description: Unauthorized access. + "403": + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + description: Forbidden access. + "500": + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + description: Unexpected error + tags: + - System + - ThoughtSpotRest + x-content-type: application/json + x-accepts: + - application/json + /api/rest/2.0/system/config-update: + post: + description: |2+ + + Version: 9.2.0.cl or later + + + Updates the current configuration of the cluster. You must send the configuration data in JSON format. + + Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privileges. + If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `APPLICATION_ADMINISTRATION` (**Can manage application settings**) privilege is required. + + + + + + operationId: updateSystemConfig + parameters: [] + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/UpdateSystemConfigRequest' + required: true + responses: + "204": + description: Configuration successfully updated. + "400": + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + description: Invalid request. + "401": + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + description: Unauthorized access. + "403": + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + description: Forbidden access. + "500": + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + description: Unexpected error + tags: + - System + - ThoughtSpotRest + x-content-type: application/json + x-accepts: + - application/json + /api/rest/2.0/system/communication-channels/validate: + post: + description: |2+ + + Version: 26.4.0.cl or later + + + Validates a communication channel configuration to ensure it is properly set up and can receive events. + - Use `channel_type` to specify the type of communication channel to validate (e.g., WEBHOOK). + - Use `channel_identifier` to provide the unique identifier or name for the communication channel. + - Use `event_type` to specify the event type to validate for this channel. + + Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) or `DEVELOPER` (**Has developer privilege**) privilege. For webhook channels, users with `CAN_MANAGE_WEBHOOKS` (**Can manage webhooks**) privilege are also authorized to perform this action. + + + + + + operationId: validateCommunicationChannel + parameters: [] + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/ValidateCommunicationChannelRequest' + required: true + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/CommunicationChannelValidateResponse' + description: communication channel configuration validated successfully. + "400": + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + description: Invalid request. + "401": + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + description: Unauthorized access. + "403": + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + description: Forbidden access. + "500": + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + description: Unexpected error + tags: + - System + - ThoughtSpotRest + x-content-type: application/json + x-accepts: + - application/json + /api/rest/2.0/tags/assign: + post: + description: |2+ + + Version: 9.0.0.cl or later + + + Assigns tags to Liveboards, Answers, Tables, and Worksheets. + + Requires edit access to the metadata object. + + + + + + operationId: assignTag + parameters: [] + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/AssignTagRequest' + required: true + responses: + "204": + description: Tags successfully assigned. + "400": + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + description: Invalid request. + "401": + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + description: Unauthorized access. + "403": + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + description: Forbidden access. + "500": + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + description: Unexpected error + tags: + - Tags + - ThoughtSpotRest + x-content-type: application/json + x-accepts: + - application/json + /api/rest/2.0/tags/create: + post: + description: |2+ + + Version: 9.0.0.cl or later + + + Creates a tag object. + + Tags are labels that identify a metadata object. For example, you can create a tag to designate subject areas, such as sales, HR, marketing, and finance. + + Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. + If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `TAGMANAGEMENT` (**Can manage tags**) privilege is required to create, edit, and delete tags. + + + + + + operationId: createTag + parameters: [] + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/CreateTagRequest' + required: true + responses: + "200": + content: + application/json: + examples: + example_1: + value: + name: test5 + id: 6abf5aec-3485-4f83-b25f-8c55b92e2b20 + color: '#342323' + deleted: false + hidden: false + external: false + deprecated: false + creation_time_in_millis: 1685441468684 + modification_time_in_millis: 1685441468684 + author_id: 59481331-ee53-42be-a548-bd87be6ddd4a + modifier_id: 59481331-ee53-42be-a548-bd87be6ddd4a + owner_id: 6abf5aec-3485-4f83-b25f-8c55b92e2b20 + schema: + $ref: '#/components/schemas/Tag' + description: Tag successfully created. + "400": + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + description: Invalid request. + "401": + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + description: Unauthorized access. + "403": + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + description: Forbidden access. + "500": + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + description: Unexpected error + tags: + - Tags + - ThoughtSpotRest + x-content-type: application/json + x-accepts: + - application/json + /api/rest/2.0/tags/{tag_identifier}/delete: + post: + description: |2+ + + Version: 9.0.0.cl or later + + + Deletes a tag object from the ThoughtSpot system + + Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. + If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `TAGMANAGEMENT` (**Can manage tags**) privilege is required to create, edit, and delete tags. + + + + + + operationId: deleteTag + parameters: + - description: Tag identifier Tag name or Tag id. + explode: false + in: path + name: tag_identifier + required: true + schema: + type: string + style: simple + responses: + "204": + description: Tag successfully deleted. + "400": + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + description: Invalid request. + "401": + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + description: Unauthorized access. + "403": + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + description: Forbidden access. + "500": + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + description: Unexpected error + tags: + - Tags + - ThoughtSpotRest + x-accepts: + - application/json + /api/rest/2.0/tags/search: + post: + description: |2+ + + Version: 9.0.0.cl or later + + + Gets a list of tag objects available on the ThoughtSpot system. To get details of a specific tag object, specify the GUID or name. + + Any authenticated user can search for tag objects. + + + + + + operationId: searchTags + parameters: [] + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/SearchTagsRequest' + required: true + responses: + "200": + content: + application/json: + examples: + example_1: + value: + - name: test4 + id: 0935bbb5-17e2-43ab-b657-da6bf347cbb4 + color: '#342323' + deleted: false + hidden: false + external: false + deprecated: false + creation_time_in_millis: 1684937524885 + modification_time_in_millis: 1684937524885 + author_id: 59481331-ee53-42be-a548-bd87be6ddd4a + modifier_id: 59481331-ee53-42be-a548-bd87be6ddd4a + owner_id: 0935bbb5-17e2-43ab-b657-da6bf347cbb4 + - name: test6 + id: 65a5c39a-daf5-4cae-975f-44283628494e + color: '#342323' + deleted: false + hidden: false + external: false + deprecated: false + creation_time_in_millis: 1684988834183 + modification_time_in_millis: 1684988887888 + author_id: 59481331-ee53-42be-a548-bd87be6ddd4a + modifier_id: 59481331-ee53-42be-a548-bd87be6ddd4a + owner_id: 65a5c39a-daf5-4cae-975f-44283628494e + schema: + items: + $ref: '#/components/schemas/Tag' + type: array + description: Tags search result. + "400": + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + description: Invalid request. + "401": + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + description: Unauthorized access. + "403": + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + description: Forbidden access. + "500": + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + description: Unexpected error + tags: + - Tags + - ThoughtSpotRest + x-content-type: application/json + x-accepts: + - application/json + /api/rest/2.0/tags/unassign: + post: + description: |2+ + + Version: 9.0.0.cl or later + + + Removes the tags applied to a Liveboard, Answer, Table, or Worksheet. + + Requires edit access to the metadata object. + + + + + + operationId: unassignTag + parameters: [] + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/UnassignTagRequest' + required: true + responses: + "204": + description: Tags successfully unassigned. + "400": + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + description: Invalid request. + "401": + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + description: Unauthorized access. + "403": + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + description: Forbidden access. + "500": + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + description: Unexpected error + tags: + - Tags + - ThoughtSpotRest + x-content-type: application/json + x-accepts: + - application/json + /api/rest/2.0/tags/{tag_identifier}/update: + post: + description: "\n Version: 9.0.0.cl or later\n\n\nUpdates a tag object.\n\nYou\ + \ can modify the `name` and `color` properties of a tag object. \n\nRequires\ + \ `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege.\nIf [Role-Based\ + \ Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is\ + \ enabled on your instance, the `TAGMANAGEMENT` (**Can manage tags**) privilege\ + \ is required to create, edit, and delete tags.\n\n\n\n\n\n" + operationId: updateTag + parameters: + - description: Name or Id of the tag. + explode: false + in: path + name: tag_identifier + required: true + schema: + type: string + style: simple + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/UpdateTagRequest' + required: true + responses: + "204": + description: Tag successfully updated. + "400": + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + description: Invalid request. + "401": + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + description: Unauthorized access. + "403": + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + description: Forbidden access. + "500": + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + description: Unexpected error + tags: + - Tags + - ThoughtSpotRest + x-content-type: application/json + x-accepts: + - application/json + /api/rest/2.0/users/activate: + post: + description: |2+ + + Version: 9.7.0.cl or later + + + Activates a deactivated user account. + + Requires `ADMINISTRATION` (**Can administer Thoughtspot**) privilege. + If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `USER_ADMINISTRATION` (**Can manage users**) privilege is required. + + To activate an inactive user account, the API request body must include the following information: + + - Username or the GUID of the user account. + - Auth token generated for the deactivated user. The auth token is sent in the API response when a user is deactivated. + - Password for the user account. + + + + + + operationId: activateUser + parameters: [] + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/ActivateUserRequest' + required: true + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/User' + description: User activated successfully. + "400": + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + description: Invalid request. + "401": + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + description: Unauthorized access. + "403": + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + description: Forbidden access. + "500": + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + description: Unexpected error + tags: + - Users + - ThoughtSpotRest + x-content-type: application/json + x-accepts: + - application/json + /api/rest/2.0/users/change-password: + post: + description: |2+ + + Version: 9.0.0.cl or later + + + Updates the current password of the user. + + Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. + If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `USER_ADMINISTRATION` (**Can manage users**) privilege is required. + + + + + + operationId: changeUserPassword + parameters: [] + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/ChangeUserPasswordRequest' + required: true + responses: + "204": + description: User password change operation successful. + "400": + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + description: Invalid request. + "401": + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + description: Unauthorized access. + "403": + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + description: Forbidden access. + "500": + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + description: Unexpected error + tags: + - Users + - ThoughtSpotRest + x-content-type: application/json + x-accepts: + - application/json + /api/rest/2.0/users/create: + post: + description: |2+ + + Version: 9.0.0.cl or later + + + Creates a user in ThoughtSpot. + + The API endpoint allows you to configure several user properties such as email address, account status, share notification preferences, and sharing visibility. You can provision the user to [groups](https://docs.thoughtspot.com/cloud/latest/groups-privileges) and [Orgs](https://docs.thoughtspot.com/cloud/latest/orgs-overview). You can also add Liveboard, Answer, and Worksheet objects to the user’s favorites list, assign a default Liveboard for the user, and set user preferences. + + Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. + If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `USER_ADMINISTRATION` (**Can manage users**) privilege is required. + + + + + + operationId: createUser + parameters: [] + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/CreateUserRequest' + required: true + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/User' + description: User successfully created. + "400": + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + description: Invalid request. + "401": + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + description: Unauthorized access. + "403": + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + description: Forbidden access. + "500": + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + description: Unexpected error + tags: + - Users + - ThoughtSpotRest + x-content-type: application/json + x-accepts: + - application/json + /api/rest/2.0/users/deactivate: + post: + description: |2+ + + Version: 9.7.0.cl or later + + + Deactivates a user account. + + Requires `ADMINISTRATION` (**Can administer Thoughtspot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `USER_ADMINISTRATION` (**Can manage users**) privilege is required. + + To deactivate a user account, the API request body must include the following information: + + - Username or the GUID of the user account + - Base URL of the ThoughtSpot instance + + If the API request is successful, ThoughtSpot returns the activation URL in the response. The activation URL is valid for 14 days and can be used to re-activate the account and reset the password of the deactivated account. + + + + + + operationId: deactivateUser + parameters: [] + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/DeactivateUserRequest' + required: true + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/ResponseActivationURL' + description: User deactivated successfully. + "400": + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + description: Invalid request. + "401": + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + description: Unauthorized access. + "403": + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + description: Forbidden access. + "500": + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + description: Unexpected error + tags: + - Users + - ThoughtSpotRest + x-content-type: application/json + x-accepts: + - application/json + /api/rest/2.0/users/{user_identifier}/delete: + post: + description: |2+ + + Version: 9.0.0.cl or later + + + Deletes a user from the ThoughtSpot system. + + If you want to remove a user from a specific Org but not from ThoughtSpot, update the group and Org mapping properties of the user object via a POST API call to the [/api/rest/2.0/users/{user_identifier}/update](#/http/api-endpoints/users/update-user) endpoint. + + Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. + If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `USER_ADMINISTRATION` (**Can manage users**) privilege is required. + + + + + + operationId: deleteUser + parameters: + - description: GUID / name of the user + explode: false + in: path + name: user_identifier + required: true + schema: + type: string + style: simple + responses: + "204": + description: User successfully deleted. + "400": + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + description: Invalid request. + "401": + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + description: Unauthorized access. + "403": + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + description: Forbidden access. + "500": + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + description: Unexpected error + tags: + - Users + - ThoughtSpotRest + x-accepts: + - application/json + /api/rest/2.0/users/force-logout: + post: + description: "\n Version: 9.0.0.cl or later\n\n\nEnforces logout on current\ + \ user sessions. \n\nUse this API with caution as it may invalidate active\ + \ user sessions and force users to re-login. Make sure you specify the usernames\ + \ or GUIDs. If you pass null values in the API call, all user sessions on\ + \ your cluster become invalid, and the users are forced to re-login.\n\nRequires\ + \ `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege.\nIf [Role-Based\ + \ Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is\ + \ enabled on your instance, the `USER_ADMINISTRATION` (**Can manage users**)\ + \ privilege is required.\n\n\n\n\n\n" + operationId: forceLogoutUsers + parameters: [] + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/ForceLogoutUsersRequest' + required: true + responses: + "204": + description: Force logging out of users operation successful. + "400": + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + description: Invalid request. + "401": + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + description: Unauthorized access. + "403": + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + description: Forbidden access. + "500": + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + description: Unexpected error + tags: + - Users + - ThoughtSpotRest + x-content-type: application/json + x-accepts: + - application/json + /api/rest/2.0/users/import: + post: + description: |2+ + + Version: 9.0.0.cl or later + + + Imports user data from external databases into ThoughtSpot. During the user import operation: + + * If the specified users are not available in ThoughtSpot, the users are created and assigned a default password. Defining a `default_password` in the API request is optional. + * If `delete_unspecified_users` is set to `true`, the users not specified in the API request, excluding the `tsadmin`, `guest`, `system` and `su` users, are deleted. + * If the specified user objects are already available in ThoughtSpot, the object properties are updated and synchronized as per the input data in the API request. + + A successful API call returns the object that represents the changes made in the ThoughtSpot system. + + Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. + If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `USER_ADMINISTRATION` (**Can manage users**) privilege is required. + + + + + + operationId: importUsers + parameters: [] + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/ImportUsersRequest' + required: true + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/ImportUsersResponse' + description: Import users operation successful. + "400": + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + description: Invalid request. + "401": + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + description: Unauthorized access. + "403": + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + description: Forbidden access. + "500": + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + description: Unexpected error + tags: + - Users + - ThoughtSpotRest + x-content-type: application/json + x-accepts: + - application/json + /api/rest/2.0/users/reset-password: + post: + description: |2+ + + Version: 9.0.0.cl or later + + + Resets the password of a user account. Administrators can reset password on behalf of a user. + + Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. + If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `USER_ADMINISTRATION` (**Can manage users**) privilege is required. + + + + + + operationId: resetUserPassword + parameters: [] + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/ResetUserPasswordRequest' + required: true + responses: + "204": + description: User password reset operation successful. + "400": + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + description: Invalid request. + "401": + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + description: Unauthorized access. + "403": + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + description: Forbidden access. + "500": + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + description: Unexpected error + tags: + - Users + - ThoughtSpotRest + x-content-type: application/json + x-accepts: + - application/json + /api/rest/2.0/users/search: + post: + description: |2+ + + Version: 9.0.0.cl or later + + + Gets a list of users available on the ThoughtSpot system. + + To get details of a specific user, specify the user GUID or name. You can also filter the API response based on groups, Org ID, user visibility, account status, user type, and user preference settings and favorites. + + Available to all users. Users with `ADMINISTRATION` (**Can administer ThoughtSpot**) privileges can view all users properties. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `USER_ADMINISTRATION` (**Can manage users**) privilege is required. + + **NOTE**: If the API returns an empty list, consider increasing the value of the `record_size` parameter. To search across all available users, set `record_size` to `-1`. + + + + + + operationId: searchUsers + parameters: [] + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/SearchUsersRequest' + required: true + responses: + "200": + content: + application/json: + schema: + items: + $ref: '#/components/schemas/User' + type: array + description: User search result. + "400": + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + description: Invalid request. + "401": + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + description: Unauthorized access. + "403": + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + description: Forbidden access. + "500": + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + description: Unexpected error + tags: + - Users + - ThoughtSpotRest + x-content-type: application/json + x-accepts: + - application/json + /api/rest/2.0/users/{user_identifier}/update: + post: + description: |2+ + + Version: 9.0.0.cl or later + + + Updates the properties of a user object. + + You can modify user properties such as username, email, and share notification settings. You can also assign new groups and Orgs, remove the user from a group or Org, reset password, and modify user preferences. + + Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. + If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `USER_ADMINISTRATION` (**Can manage users**) privilege is required. + + + + + + operationId: updateUser + parameters: + - description: GUID / name of the user + explode: false + in: path + name: user_identifier + required: true + schema: + type: string + style: simple + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/UpdateUserRequest' + required: true + responses: + "204": + description: User successfully updated. + "400": + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + description: Invalid request. + "401": + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + description: Unauthorized access. + "403": + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + description: Forbidden access. + "500": + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + description: Unexpected error + tags: + - Users + - ThoughtSpotRest + x-content-type: application/json + x-accepts: + - application/json + /api/rest/2.0/template/variables/create: + post: + description: "\nCreate a variable which can be used for parameterizing metadata\ + \ objects \n Version: 26.4.0.cl or later\n\n\nAllows creating a variable\ + \ which can be used for parameterizing metadata objects in ThoughtSpot.\n\n\ + Requires ADMINISTRATION role and TENANT scope.\nThe CAN_MANAGE_VARIABLES permission\ + \ allows you to manage Formula Variables in the current organization scope.\n\ + \nThe API endpoint supports the following types of variables:\n* CONNECTION_PROPERTY\ + \ - For connection properties\n* TABLE_MAPPING - For table mappings\n* CONNECTION_PROPERTY_PER_PRINCIPAL\ + \ - For connection properties per principal. In order to use this please contact\ + \ support to enable this.\n* FORMULA_VARIABLE - For Formula variables, introduced\ + \ in 10.15.0.cl\n\nWhen creating a variable, you need to specify:\n* The variable\ + \ type\n* A unique name for the variable\n* Whether the variable contains\ + \ sensitive values (defaults to false)\n* The data type of the variable, only\ + \ specify for formula variables (defaults to null)\n\nThe operation will fail\ + \ if:\n* The user lacks required permissions\n* The variable name already\ + \ exists\n* The variable type is invalid\n\n\n\n\n" + operationId: createVariable + parameters: [] + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/CreateVariableRequest' + required: true + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/Variable' + description: Create variable is successful. + "400": + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + description: Invalid request. + "401": + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + description: Unauthorized access. + "403": + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + description: Forbidden access. + "500": + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + description: Unexpected error + tags: + - Variable + - ThoughtSpotRest + x-content-type: application/json + x-accepts: + - application/json + /api/rest/2.0/template/variables/{identifier}/delete: + post: + deprecated: true + description: "\nDelete a variable \n Version: 10.14.0.cl or later\n\n\n**Note:**\ + \ This API endpoint is deprecated and will be removed from ThoughtSpot in\ + \ a future release. Use [POST /api/rest/2.0/template/variables/delete](/api/rest/2.0/template/variables/delete)\ + \ instead.\n\nAllows deleting a variable from ThoughtSpot.\n\nRequires ADMINISTRATION\ + \ role and TENANT scope.\nThe CAN_MANAGE_VARIABLES permission allows you to\ + \ manage Formula Variables in the current organization scope.\n\nThe API endpoint\ + \ requires:\n* The variable identifier (ID or name)\n\nThe operation will\ + \ fail if:\n* The user lacks required permissions\n* The variable doesn't\ + \ exist\n* The variable is being used by other objects \n\n\n\n\n" + operationId: deleteVariable + parameters: + - description: Unique id or name of the variable + explode: false + in: path + name: identifier + required: true + schema: + type: string + style: simple + responses: + "204": + description: Deleting the variable is successful. + "400": + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + description: Invalid request. + "401": + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + description: Unauthorized access. + "403": + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + description: Forbidden access. + "500": + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + description: Unexpected error + tags: + - Variable + - ThoughtSpotRest + x-accepts: + - application/json + /api/rest/2.0/template/variables/delete: + post: + description: "\nDelete variable(s) \n Version: 26.4.0.cl or later\n\n\nAllows\ + \ deleting multiple variables from ThoughtSpot.\n\nRequires ADMINISTRATION\ + \ role and TENANT scope.\nThe CAN_MANAGE_VARIABLES permission allows you to\ + \ manage Formula Variables in the current organization scope.\n\nThe API endpoint\ + \ requires:\n* The variable identifiers (IDs or names)\n\nThe operation will\ + \ fail if:\n* The user lacks required permissions\n* Any of the variables\ + \ don't exist\n* Any of the variables are being used by other objects\n\n\n\ + \n\n\n" + operationId: deleteVariables + parameters: [] + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/DeleteVariablesRequest' + required: true + responses: + "204": + description: Deletion of variable(s) is successful. + "400": + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + description: Invalid request. + "401": + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + description: Unauthorized access. + "403": + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + description: Forbidden access. + "500": + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + description: Unexpected error + tags: + - Variable + - ThoughtSpotRest + x-content-type: application/json + x-accepts: + - application/json + /api/rest/2.0/template/variables/{identifier}/update-values: + post: + description: "\nUpdate values for a variable \n Version: 26.4.0.cl or later\n\ + \n\nAllows updating values for a specific variable in ThoughtSpot.\n\nRequires\ + \ ADMINISTRATION role.\nThe CAN_MANAGE_VARIABLES permission allows you to\ + \ manage Formula Variables in the current organization scope.\n\nThe API endpoint\ + \ allows:\n* Adding new values to the variable\n* Replacing existing values\n\ + * Deleting values from the variable\n* Resetting all values\n\nWhen updating\ + \ variable values, you need to specify:\n* The variable identifier (ID or\ + \ name)\n* The values to add/replace/remove\n* The operation to perform (ADD,\ + \ REPLACE, REMOVE, RESET)\n\nBehaviour based on operation type:\n* ADD - Adds\ + \ values to the variable if this is a list type variable, else same as replace.\n\ + * REPLACE - Replaces all values of a given set of constraints with the current\ + \ set of values.\n* REMOVE - Removes any values which match the set of conditions\ + \ of the variables if this is a list type variable, else clears value.\n*\ + \ RESET - Removes all constraints for the given variable, scope is ignored\n\ + \n\n\n\n\n" + operationId: putVariableValues + parameters: + - description: Unique ID or name of the variable + explode: false + in: path + name: identifier + required: true + schema: + type: string + style: simple + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/PutVariableValuesRequest' + required: true + responses: + "204": + description: Variable values updated successfully. + "400": + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + description: Invalid request. + "401": + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + description: Unauthorized access. + "403": + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + description: Forbidden access. + "500": + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + description: Unexpected error + tags: + - Variable + - ThoughtSpotRest + x-content-type: application/json + x-accepts: + - application/json + /api/rest/2.0/template/variables/search: + post: + description: "\nSearch variables \n Version: 26.4.0.cl or later\n\n\nAllows\ + \ searching for variables in ThoughtSpot.\n\nRequires ADMINISTRATION role.\n\ + The CAN_MANAGE_VARIABLES permission allows you to manage Formula Variables\ + \ in the current organization scope.\n\nThe API endpoint supports searching\ + \ variables by:\n* Variable identifier (ID or name)\n* Variable type\n* Name\ + \ pattern (case-insensitive, supports % for wildcard)\n\nThe search results\ + \ can be formatted in three ways:\n* METADATA - Returns only variable metadata\ + \ (default)\n* METADATA_AND_VALUES - Returns variable metadata and values\n\ + \nThe values can be filtered by scope:\n* org_identifier\n* principal_identifier\n\ + * model_identifier\n\n\n\n\n\n" + operationId: searchVariables + parameters: [] + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/SearchVariablesRequest' + required: true + responses: + "200": + content: + application/json: + schema: + items: + $ref: '#/components/schemas/Variable' + type: array + description: List of variables is successful. + "400": + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + description: Invalid request. + "401": + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + description: Unauthorized access. + "403": + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + description: Forbidden access. + "500": + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + description: Unexpected error + tags: + - Variable + - ThoughtSpotRest + x-content-type: application/json + x-accepts: + - application/json + /api/rest/2.0/template/variables/{identifier}/update: + post: + description: "\nUpdate a variable's name \n Version: 26.4.0.cl or later\n\n\ + \nAllows updating a variable's name in ThoughtSpot.\n\nRequires ADMINISTRATION\ + \ role and TENANT scope.\nThe CAN_MANAGE_VARIABLES permission allows you to\ + \ manage Formula Variables in the current organization scope.\n\nThe API endpoint\ + \ allows updating:\n* The variable name\n\n\n\n\n" + operationId: updateVariable + parameters: + - description: Unique id or name of the variable to update. + explode: false + in: path + name: identifier + required: true + schema: + type: string + style: simple + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/UpdateVariableRequest' + required: true + responses: + "204": + description: Variable name updated successfully. + "400": + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + description: Invalid request. + "401": + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + description: Unauthorized access. + "403": + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + description: Forbidden access. + "500": + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + description: Unexpected error + tags: + - Variable + - ThoughtSpotRest + x-content-type: application/json + x-accepts: + - application/json + /api/rest/2.0/template/variables/update-values: + post: + deprecated: true + description: "\nUpdate values for multiple variables \n Version: 10.14.0.cl\ + \ or later\n\n\n**Note:** This API endpoint is deprecated and will be removed\ + \ from ThoughtSpot in a future release. Use [POST /api/rest/2.0/template/variables/{identifier}/update-values](/api/rest/2.0/template/variables/%7Bidentifier%7D/update-values)\ + \ instead.\n\nAllows updating values for multiple variables in ThoughtSpot.\n\ + \nRequires ADMINISTRATION role.\nThe CAN_MANAGE_VARIABLES permission allows\ + \ you to manage Formula Variables in the current organization scope.\n\nThe\ + \ API endpoint allows:\n* Adding new values to variables\n* Replacing existing\ + \ values\n* Deleting values from variables\n\nWhen updating variable values,\ + \ you need to specify:\n* The variable identifiers\n* The values to add/replace/remove\ + \ for each variable\n* The operation to perform (ADD, REPLACE, REMOVE, RESET)\n\ + \nBehaviour based on operation type:\n* ADD - Adds values to the variable\ + \ if this is a list type variable, else same as replace.\n* REPLACE - Replaces\ + \ all values of a given set of constraints with the current set of values.\n\ + * REMOVE - Removes any values which match the set of conditions of the variables\ + \ if this is a list type variable, else clears value.\n* RESET - Removes all\ + \ constrains for a given variable, scope is ignored\n\n\n\n\n\n" + operationId: updateVariableValues + parameters: [] + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/UpdateVariableValuesRequest' + required: true + responses: + "204": + description: Variable values updated successfully. + "400": + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + description: Invalid request. + "401": + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + description: Unauthorized access. + "403": + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + description: Forbidden access. + "500": + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + description: Unexpected error + tags: + - Variable + - ThoughtSpotRest + x-content-type: application/json + x-accepts: + - application/json + /api/rest/2.0/vcs/git/branches/commit: + post: + description: |2+ + + Version: 9.2.0.cl or later + + + Commits TML files of metadata objects to the Git branch configured on your instance. + + Requires at least edit access to objects used in the commit operation. + + Before using this endpoint to push your commits: + + * Enable Git integration on your instance. + * Make sure the Git repository and branch details are configured on your instance. + + For more information, see [Git integration documentation](https://developers.thoughtspot.com/docs/git-integration). + + + + + + operationId: commitBranch + parameters: [] + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/CommitBranchRequest' + required: true + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/CommitResponse' + description: Successfully committed the metadata objects + "400": + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + description: Invalid request. + "401": + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + description: Unauthorized access. + "403": + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + description: Forbidden access. + "500": + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + description: Unexpected error + tags: + - Version Control + - ThoughtSpotRest + x-content-type: application/json + x-accepts: + - application/json + /api/rest/2.0/vcs/git/config/create: + post: + description: |2+ + + Version: 9.2.0.cl or later + + + Allows you to connect a ThoughtSpot instance to a Git repository. + + Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. + + If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance on your instance, the `CAN_SETUP_VERSION_CONTROL` (**Can set up version control**) privilege. + + You can use this API endpoint to connect your ThoughtSpot development and production environments to the development and production branches of a Git repository. + + Before using this endpoint to connect your ThoughtSpot instance to a Git repository, check the following prerequisites: + + * You have a Git repository. If you are using GitHub, make sure you have a valid account and an access token to connect ThoughtSpot to GitHub. For information about generating a token, see [GitHub Documentation](https://docs.github.com/en/authentication/keeping-your-account-and-data-secure/managing-your-personal-access-tokens). + + * Your access token has `repo` scope that grants full access to public and private repositories. + * Your Git repository has a branch that can be configured as a default branch in ThoughtSpot. + + For more information, see [Git integration documentation](https://developers.thoughtspot.com/docs/?pageid=git-integration). + + **Note**: ThoughtSpot supports only GitHub / itHub Enterprise for CI/CD. + + + + + + operationId: createConfig + parameters: [] + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/CreateConfigRequest' + required: true + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/RepoConfigObject' + description: Successfully configured local repository + "400": + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + description: Invalid request. + "401": + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + description: Unauthorized access. + "403": + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + description: Forbidden access. + "500": + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + description: Unexpected error + tags: + - Version Control + - ThoughtSpotRest + x-content-type: application/json + x-accepts: + - application/json + /api/rest/2.0/vcs/git/config/delete: + post: + description: |2+ + + Version: 9.2.0.cl or later + + + Deletes Git repository configuration from your ThoughtSpot instance. + + Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. + + If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance on your instance, the `CAN_SETUP_VERSION_CONTROL` (**Can set up version control**) privilege. + + + + + + operationId: deleteConfig + parameters: [] + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/DeleteConfigRequest' + required: true + responses: + "204": + description: Successfully deleted local repository configuration + "400": + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + description: Invalid request. + "401": + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + description: Unauthorized access. + "403": + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + description: Forbidden access. + "500": + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + description: Unexpected error + tags: + - Version Control + - ThoughtSpotRest + x-content-type: application/json + x-accepts: + - application/json + /api/rest/2.0/vcs/git/commits/deploy: + post: + description: |2+ + + Version: 9.2.0.cl or later + + + Allows you to deploy a commit and publish TML content to your ThoughtSpot instance. + + Requires at least edit access to the objects used in the deploy operation. + + The API deploys the head of the branch unless a `commit_id` is specified in the API request. If the branch name is not defined in the request, the default branch is considered for deploying commits. + + For more information, see [Git integration documentation](https://developers.thoughtspot.com/docs/git-integration). + + + + + + operationId: deployCommit + parameters: [] + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/DeployCommitRequest' + required: true + responses: + "200": + content: + application/json: + schema: + items: + $ref: '#/components/schemas/DeployResponse' + type: array + description: Successfully deployed the changes + "400": + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + description: Invalid request. + "401": + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + description: Unauthorized access. + "403": + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + description: Forbidden access. + "500": + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + description: Unexpected error + tags: + - Version Control + - ThoughtSpotRest + x-content-type: application/json + x-accepts: + - application/json + /api/rest/2.0/vcs/git/commits/{commit_id}/revert: + post: + description: |2+ + + Version: 9.2.0.cl or later + + + Reverts TML objects to a previous commit specified in the API request. + + Requires at least edit access to objects. + + In the API request, specify the `commit_id`. If the branch name is not specified in the request, the API will consider the default branch configured on your instance. + + By default, the API reverts all objects. If the revert operation fails for one of the objects provided in the commit, the API returns an error and does not revert any object. + + For more information, see [Git integration documentation](https://developers.thoughtspot.com/docs/git-integration). + + + + + + operationId: revertCommit + parameters: + - description: Commit id to which the object should be reverted + explode: false + in: path + name: commit_id + required: true + schema: + type: string + style: simple + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/RevertCommitRequest' + required: true + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/RevertResponse' + description: Reverted the object to the commit point specified + "400": + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + description: Invalid request. + "401": + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + description: Unauthorized access. + "403": + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + description: Forbidden access. + "500": + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + description: Unexpected error + tags: + - Version Control + - ThoughtSpotRest + x-content-type: application/json + x-accepts: + - application/json + /api/rest/2.0/vcs/git/commits/search: + post: + description: |2+ + + Version: 9.2.0.cl or later + + + Gets a list of commits for a given metadata object. + + Requires `DATAMANAGEMENT` (**Can manage data**) privilege. + + If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance on your instance, the `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` (**Can manage data models**) privilege and edit access to the metadata objects. + + + + + + operationId: searchCommits + parameters: [] + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/SearchCommitsRequest' + required: true + responses: + "200": + content: + application/json: + schema: + items: + $ref: '#/components/schemas/CommitHistoryResponse' + type: array + description: Commit history of the metadata object + "400": + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + description: Invalid request. + "401": + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + description: Unauthorized access. + "403": + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + description: Forbidden access. + "500": + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + description: Unexpected error + tags: + - Version Control + - ThoughtSpotRest + x-content-type: application/json + x-accepts: + - application/json + /api/rest/2.0/vcs/git/config/search: + post: + description: |2+ + + Version: 9.2.0.cl or later + + + Gets Git repository connections configured on the ThoughtSpot instance. + + Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. + + If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance on your instance, the `CAN_SETUP_VERSION_CONTROL` (**Can set up version control**) privilege. + + + + + + operationId: searchConfig + parameters: [] + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/SearchConfigRequest' + required: true + responses: + "200": + content: + application/json: + schema: + items: + $ref: '#/components/schemas/RepoConfigObject' + type: array + description: Details of local repository configuration + "400": + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + description: Invalid request. + "401": + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + description: Unauthorized access. + "403": + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + description: Forbidden access. + "500": + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + description: Unexpected error + tags: + - Version Control + - ThoughtSpotRest + x-content-type: application/json + x-accepts: + - application/json + /api/rest/2.0/vcs/git/config/update: + post: + description: |2+ + + Version: 9.2.0.cl or later + + + Updates Git repository configuration settings. + + Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. + + If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance on your instance, the `CAN_SETUP_VERSION_CONTROL` (**Can set up version control**) privilege. + + + + + + operationId: updateConfig + parameters: [] + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/UpdateConfigRequest' + required: true + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/RepoConfigObject' + description: Successfully updated local repository configuration + "400": + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + description: Invalid request. + "401": + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + description: Unauthorized access. + "403": + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + description: Forbidden access. + "500": + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + description: Unexpected error + tags: + - Version Control + - ThoughtSpotRest + x-content-type: application/json + x-accepts: + - application/json + /api/rest/2.0/vcs/git/branches/validate: + post: + description: |2+ + + Version: 9.2.0.cl or later + + + Validates the content of your source branch against the objects in your destination environment. + + Before merging content from your source branch to the destination branch, run this API operation from your destination environment and ensure that the changes from the source branch function in the destination environment. + + Requires `DATAMANAGEMENT` (**Can manage data**) privilege. + + If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance on your instance, the `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` (**Can manage data models**) privilege and edit access to the metadata objects. + + + + + + operationId: validateMerge + parameters: [] + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/ValidateMergeRequest' + required: true + responses: + "200": + content: + application/json: + schema: + items: + $ref: '#/components/schemas/DeployResponse' + type: array + description: validation done successfully + "400": + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + description: Invalid request. + "401": + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + description: Unauthorized access. + "403": + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + description: Forbidden access. + "500": + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + description: Unexpected error + tags: + - Version Control + - ThoughtSpotRest + x-content-type: application/json + x-accepts: + - application/json + /api/rest/2.0/webhooks/create: + post: + description: |2+ + + Version: 10.14.0.cl or later + + + Creates a new webhook configuration to receive notifications for specified events. The webhook will be triggered when the configured events occur in the system. + + Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) or `DEVELOPER` (**Has developer privilege**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, users with `CAN_MANAGE_WEBHOOKS` (**Can manage webhooks**) privilege are also authorized to perform this action. + + + + + + operationId: createWebhookConfiguration + parameters: [] + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/CreateWebhookConfigurationRequest' + required: true + responses: + "200": + content: + application/json: + examples: + example_1: + description: Basic webhook with Bearer token authentication + value: + id: f47ac10b-58cc-4372-a567-0e02b2c3d479 + name: My Liveboard Webhook + description: Webhook to notify external system about liveboard + schedules + org: + id: "0" + name: Primary + url: https://myapp.example.com/webhooks/thoughtspot + url_params: + api_key: abc123 + version: v1 + events: + - LIVEBOARD_SCHEDULE + authentication: + BEARER_TOKEN: '***' + signature_verification: + type: HMAC_SHA256 + header: X-Webhook-Signature + algorithm: SHA256 + secret: '***' + creation_time_in_millis: 1724277430243 + modification_time_in_millis: 1724277430243 + additional_headers: + - key: Custom-Header + value: value1 + - key: Custom-Header-2 + value: value2 + created_by: + id: 8e3f2a7b-9c4d-4e5f-8a1b-7c9d3e6f4a2b + name: sarah_chen + last_modified_by: + id: 8e3f2a7b-9c4d-4e5f-8a1b-7c9d3e6f4a2b + name: sarah_chen + example_2: + description: Webhook with OAuth2 authentication + value: + id: a1b2c3d4-e5f6-7890-abcd-ef1234567890 + name: OAuth2 Webhook + description: Webhook with OAuth2 client credentials + org: + id: "0" + name: Primary + url: https://api.example.com/webhooks + events: + - LIVEBOARD_SCHEDULE + authentication: + OAUTH2: + authorization_url: https://auth.example.com/oauth2/authorize + client_id: client_123 + client_secret: '***' + creation_time_in_millis: 1724278530123 + modification_time_in_millis: 1724278530123 + created_by: + id: 7d5e9f2a-4b8c-4d6e-9a3b-5c7e1f4a8b2d + name: mike_rodriguez + example_3: + description: Webhook with GCP GCS storage destination + value: + id: c9d8e7f6-a5b4-4321-9876-fedcba012345 + name: GCS Storage Webhook + description: Webhook that uploads payloads to a GCS bucket + org: + id: "0" + name: Primary + url: https://api.example.com/webhooks + events: + - LIVEBOARD_SCHEDULE + storage_destination: + storage_type: GCP_GCS + storage_config: + gcp_gcs_config: + bucket_name: my-webhook-files + service_account_email: my-sa@my-project.iam.gserviceaccount.com + path_prefix: webhooks/ + creation_time_in_millis: 1724279630456 + modification_time_in_millis: 1724279630456 + created_by: + id: 3a2b1c4d-5e6f-7890-abcd-ef0123456789 + name: priya_sharma + last_modified_by: + id: 3a2b1c4d-5e6f-7890-abcd-ef0123456789 + name: priya_sharma + schema: + $ref: '#/components/schemas/WebhookResponse' + description: Webhook configuration created successfully + "400": + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + description: Invalid request. + "401": + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + description: Unauthorized access. + "403": + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + description: Forbidden access. + "500": + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + description: Unexpected error + tags: + - Webhooks + - ThoughtSpotRest + x-content-type: application/json + x-accepts: + - application/json + /api/rest/2.0/webhooks/delete: + post: + description: |2+ + + Version: 10.14.0.cl or later + + + Deletes one or more webhook configurations by their unique id or name. Returns status of each deletion operation, including successfully deleted webhooks and any failures with error details. + + Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) or `DEVELOPER` (**Has developer privilege**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, users with `CAN_MANAGE_WEBHOOKS` (**Can manage webhooks**) privilege are also authorized to perform this action. + + + + + + operationId: deleteWebhookConfigurations + parameters: [] + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/DeleteWebhookConfigurationsRequest' + required: true + responses: + "200": + content: + application/json: + examples: + example_1: + description: Successful deletion of multiple webhooks + value: + deleted_count: 2 + failed_count: 0 + deleted_webhooks: + - id: b9e3d8f2-4c7a-4e1b-8d3c-5f9a2b7e4c6d + name: Old Webhook 1 + description: First webhook to be deleted + org: + id: "0" + name: Primary + url: https://old-service.example.com/webhook1 + events: + - LIVEBOARD_SCHEDULE + authentication: + BEARER_TOKEN: '***' + creation_time_in_millis: 1724274600000 + modification_time_in_millis: 1724274600000 + created_by: + id: 1f4e7b2d-9c3a-4e6f-8b1d-3e7c5a9b2f4e + name: jennifer_patel + - id: e7c4a1f8-2b5d-4a9e-7c3f-8b1e5d4a7c9b + name: Old Webhook 2 + description: Second webhook to be deleted + org: + id: "0" + name: Primary + url: https://old-service.example.com/webhook2 + events: + - LIVEBOARD_SCHEDULE + authentication: + API_KEY: + key: X-API-Key + value: '***' + creation_time_in_millis: 1724275530123 + modification_time_in_millis: 1724275530123 + created_by: + id: 9a5c2e8f-4b7d-4c1e-9f2a-6c8e3b5d7a4c + name: david_thompson + failed_webhooks: [] + example_2: + description: Partial failure during deletion + value: + deleted_count: 1 + failed_count: 1 + deleted_webhooks: + - id: c8f2a5e9-3d6b-4f1e-a8c2-7e4b1d9f5a3c + name: Successfully Deleted Webhook + description: This webhook was deleted successfully + org: + id: "0" + name: Primary + url: https://service.example.com/webhook + events: + - LIVEBOARD_SCHEDULE + authentication: + NO_AUTH: "" + creation_time_in_millis: 1724276415456 + modification_time_in_millis: 1724276415456 + created_by: + id: 6e9c4f2a-8b5d-4e1f-9c3a-5f8b2e7d4a6c + name: emma_wang + failed_webhooks: + - id: a3f7c1e4-9b2d-4a6e-8f3c-1e5b7a9c4f2e + name: Non-existent Webhook + error_message: Webhook not found or access denied + schema: + $ref: '#/components/schemas/WebhookDeleteResponse' + description: Webhook configurations deleted successfully + "400": + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + description: Invalid request. + "401": + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + description: Unauthorized access. + "403": + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + description: Forbidden access. + "500": + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + description: Unexpected error + tags: + - Webhooks + - ThoughtSpotRest + x-content-type: application/json + x-accepts: + - application/json + /api/rest/2.0/webhooks/search: + post: + description: |2+ + + Version: 10.14.0.cl or later + + + Searches for webhook configurations based on various criteria such as Org, webhook identifier, event type, with support for pagination and sorting. Returns matching webhook configurations with their complete details. + + Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) or `DEVELOPER` (**Has developer privilege**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, users with `CAN_MANAGE_WEBHOOKS` (**Can manage webhooks**) privilege are also authorized to perform this action. + + + + + + operationId: searchWebhookConfigurations + parameters: [] + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/SearchWebhookConfigurationsRequest' + required: true + responses: + "200": + content: + application/json: + examples: + example_1: + description: Search results with multiple webhooks + value: + webhooks: + - id: f47ac10b-58cc-4372-a567-0e02b2c3d479 + name: Liveboard Schedule Webhook + description: Webhook for liveboard schedule notifications + org: + id: "0" + name: Primary + url: https://myapp.example.com/webhooks + url_params: + api_key: abc123 + events: + - LIVEBOARD_SCHEDULE + authentication: + BEARER_TOKEN: '***' + signature_verification: + type: HMAC_SHA256 + header: X-Webhook-Signature + algorithm: SHA256 + secret: '***' + creation_time_in_millis: 1724277430243 + modification_time_in_millis: 1724278215123 + additional_headers: + - key: Custom-Header + value: value1 + - key: Custom-Header-2 + value: value2 + created_by: + id: 8e3f2a7b-9c4d-4e5f-8a1b-7c9d3e6f4a2b + name: sarah_chen + last_modified_by: + id: 2c9a7e4f-6b3d-4a8e-9f1c-5e7a3b9c2d6f + name: alex_kim + - id: a1b2c3d4-e5f6-7890-abcd-ef1234567890 + name: API Key Webhook + description: Webhook with API key authentication + org: + id: "0" + name: Primary + url: https://api.example.com/notifications + events: + - LIVEBOARD_SCHEDULE + authentication: + API_KEY: + key: X-API-Key + value: '***' + creation_time_in_millis: 1724275845987 + modification_time_in_millis: 1724275845987 + created_by: + id: 7d5e9f2a-4b8c-4d6e-9a3b-5c7e1f4a8b2d + name: mike_rodriguez + pagination: + record_offset: 0 + record_size: 50 + total_count: 2 + has_more: false + example_2: + description: Empty search results + value: + webhooks: [] + pagination: + record_offset: 0 + record_size: 50 + total_count: 0 + has_more: false + schema: + $ref: '#/components/schemas/WebhookSearchResponse' + description: Webhook configurations retrieved successfully + "400": + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + description: Invalid request. + "401": + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + description: Unauthorized access. + "403": + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + description: Forbidden access. + "500": + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + description: Unexpected error + tags: + - Webhooks + - ThoughtSpotRest + x-content-type: application/json + x-accepts: + - application/json + /api/rest/2.0/webhooks/{webhook_identifier}/update: + post: + description: |2+ + + Version: 10.14.0.cl or later + + + Updates an existing webhook configuration by its unique id or name. Only the provided fields will be updated. + + Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) or `DEVELOPER` (**Has developer privilege**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, users with `CAN_MANAGE_WEBHOOKS` (**Can manage webhooks**) privilege are also authorized to perform this action. + + + + + + operationId: updateWebhookConfiguration + parameters: + - description: Unique ID or name of the webhook configuration. + explode: false + in: path + name: webhook_identifier + required: true + schema: + type: string + style: simple + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/UpdateWebhookConfigurationRequest' + required: true + responses: + "204": + description: Webhook configuration updated successfully + "400": + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + description: Invalid request. + "401": + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + description: Unauthorized access. + "403": + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + description: Forbidden access. + "500": + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + description: Unexpected error + tags: + - Webhooks + - ThoughtSpotRest + x-content-type: application/json + x-accepts: + - application/json +components: + schemas: + ErrorResponse: + example: + error: "{}" + properties: + error: + nullable: true + type: object + type: object + GetTokenResponse: + example: + creation_time_in_millis: 0.8008282 + valid_for_username: valid_for_username + valid_for_user_id: valid_for_user_id + expiration_time_in_millis: 6.0274563 + token: token + properties: + token: + description: Bearer auth token. + type: string + creation_time_in_millis: + description: Token creation time in milliseconds. + format: float + type: number + expiration_time_in_millis: + description: Token expiration time in milliseconds. + format: float + type: number + valid_for_user_id: + description: Username to whom the token is issued. + type: string + valid_for_username: + description: Unique identifier of the user to whom the token is issued. + type: string + required: + - creation_time_in_millis + - expiration_time_in_millis + - token + - valid_for_user_id + - valid_for_username + type: object + SearchAuthSettingsResponse: + description: Response for searchAuthSettings. Contains auth type and cluster/org-level + preferences. + example: + auth_type: TRUSTED_AUTH + cluster_preferences: + auth_status: ENABLED + access_tokens: + - key: key + - key: key + org_preferences: + - org: + name: name + id: 0 + auth_status: ENABLED + access_tokens: + - key: key + - key: key + - org: + name: name + id: 0 + auth_status: ENABLED + access_tokens: + - key: key + - key: key + properties: + auth_type: + description: Type of authentication mechanism returned. + enum: + - TRUSTED_AUTH + nullable: true + type: string + cluster_preferences: + $ref: '#/components/schemas/AuthClusterPreferences' + org_preferences: + description: Org-level authentication configurations. Present when org scope + was requested and per-org auth feature is enabled. + items: + $ref: '#/components/schemas/AuthOrgPreference' + nullable: true + type: array + type: object + AuthClusterPreferences: + description: Cluster-level authentication preferences. + example: + auth_status: ENABLED + access_tokens: + - key: key + - key: key + properties: + auth_status: + description: Whether authentication is enabled or disabled at the cluster + level. + enum: + - ENABLED + - DISABLED + nullable: true + type: string + access_tokens: + description: Cluster-level access tokens. Absent when no token is configured. + items: + $ref: '#/components/schemas/AuthSettingsAccessToken' + nullable: true + type: array + type: object + AuthSettingsAccessToken: + description: An auth settings access token. + example: + key: key + properties: + key: + description: The plaintext token key value. + type: string + required: + - key + type: object + AuthOrgPreference: + description: Org-level authentication preferences for a single org. + example: + org: + name: name + id: 0 + auth_status: ENABLED + access_tokens: + - key: key + - key: key + properties: + org: + $ref: '#/components/schemas/AuthOrgInfo' + auth_status: + description: Whether authentication is enabled or disabled for this org. + enum: + - ENABLED + - DISABLED + nullable: true + type: string + access_tokens: + description: Org-level access tokens. Absent when no token is configured + or the feature flag is off. + items: + $ref: '#/components/schemas/AuthSettingsAccessToken' + nullable: true + type: array + type: object + AuthOrgInfo: + description: Org identifier returned in auth settings search results. + example: + name: name + id: 0 + properties: + id: + description: Unique identifier of the org. + format: int32 + type: integer + name: + description: Name of the org. + nullable: true + type: string + required: + - id + type: object + RiseSetter: + properties: + field: + type: string + path: + type: string + required: + - field + - path + type: object + User: + example: + first_login_time_in_millis: 5.962134 + tenant_id: tenant_id + privileges: + - privileges + - privileges + preferred_locale: preferred_locale + account_type: LOCAL_USER + group_mask: 5 + onboarding_experience_completed: true + user_inherited_groups: + - name: name + id: id + - name: name + id: id + creation_time_in_millis: 0.8008282 + hidden: true + current_org: + name: name + id: 6 + owner_id: owner_id + deprecated: true + access_control_properties: "{}" + modification_time_in_millis: 2.302136 + account_status: ACTIVE + home_liveboard: + name: name + id: id + favorite_metadata: + - name: name + id: id + type: LIVEBOARD + - name: name + id: id + type: LIVEBOARD + expiration_time_in_millis: 1.4658129 + super_user: true + id: id + system_user: true + incomplete_details: "{}" + extended_preferences: "{}" + email: email + welcome_email_sent: true + org_privileges: "{}" + visibility: SHARABLE + display_name: display_name + parent_type: USER + use_browser_language: true + notify_on_share: true + tags: + - name: name + id: id + - name: name + id: id + show_onboarding_experience: true + is_first_login: true + external: true + user_parameters: "{}" + deleted: true + extended_properties: "{}" + variable_values: "{}" + name: name + modifier_id: modifier_id + complete_detail: true + orgs: + - name: name + id: 6 + - name: name + id: 6 + author_id: author_id + can_change_password: true + user_groups: + - name: name + id: id + - name: name + id: id + properties: + id: + description: Unique identifier of the user. + type: string + name: + description: Name of the user. + type: string + display_name: + description: Display name of the user. + type: string + visibility: + description: "Visibility of the users. The `SHARABLE` property makes a user\ + \ visible to other users and group, who can share objects with the user." + enum: + - SHARABLE + - NON_SHARABLE + type: string + author_id: + description: Unique identifier of author of the user. + nullable: true + type: string + can_change_password: + description: Defines whether the user can change their password. + nullable: true + type: boolean + complete_detail: + description: Defines whether the response has complete detail of the user. + nullable: true + type: boolean + creation_time_in_millis: + description: Creation time of the user in milliseconds. + format: float + nullable: true + type: number + current_org: + $ref: '#/components/schemas/Org' + deleted: + description: Indicates whether the user is deleted. + nullable: true + type: boolean + deprecated: + description: Indicates whether the user is deprecated. + nullable: true + type: boolean + account_type: + description: Type of the user account. + enum: + - LOCAL_USER + - LDAP_USER + - SAML_USER + - OIDC_USER + - REMOTE_USER + nullable: true + type: string + account_status: + description: Status of the user account. + enum: + - ACTIVE + - INACTIVE + - EXPIRED + - LOCKED + - PENDING + - SUSPENDED + nullable: true + type: string + email: + description: Email of the user. + nullable: true + type: string + expiration_time_in_millis: + description: Expiration time of the user in milliseconds. + format: float + nullable: true + type: number + external: + description: Indicates whether the user is external. + nullable: true + type: boolean + favorite_metadata: + description: Metadata objects to add to the users' favorites list. + items: + $ref: '#/components/schemas/FavoriteMetadataItem' + nullable: true + type: array + first_login_time_in_millis: + description: Timestamp of the first login session of the user in milliseconds. + format: float + nullable: true + type: number + group_mask: + description: Group mask of the user. + format: int32 + nullable: true + type: integer + hidden: + description: Indicates whether the user is hidden. + nullable: true + type: boolean + home_liveboard: + $ref: '#/components/schemas/Object_ID_And_Name' + incomplete_details: + description: Incomplete details of user if any present. + nullable: true + type: object + is_first_login: + description: Indicates whether it is first login of the user. + nullable: true + type: boolean + modification_time_in_millis: + description: Last modified time of the user in milliseconds. + format: float + nullable: true + type: number + modifier_id: + description: Unique identifier of modifier of the user. + nullable: true + type: string + notify_on_share: + description: User preference for receiving email notifications on shared + Answers or Liveboard. + nullable: true + type: boolean + onboarding_experience_completed: + description: The user preference for turning off the onboarding experience. + nullable: true + type: boolean + orgs: + description: Orgs to which the user belongs. + items: + $ref: '#/components/schemas/Org' + nullable: true + type: array + owner_id: + description: Unique identifier of owner of the user. + nullable: true + type: string + parent_type: + description: Parent type of the user. + enum: + - USER + - GROUP + nullable: true + type: string + privileges: + description: Privileges which are assigned to the user. + items: + type: string + nullable: true + type: array + show_onboarding_experience: + description: User's preference to revisit the new user onboarding experience. + nullable: true + type: boolean + super_user: + description: Indicates whether the user is a super user. + nullable: true + type: boolean + system_user: + description: Indicates whether the user is a system user. + nullable: true + type: boolean + tags: + description: Tags associated with the user. + items: + $ref: '#/components/schemas/Object_ID_And_Name' + nullable: true + type: array + tenant_id: + description: Unique identifier of tenant of the user. + nullable: true + type: string + user_groups: + description: Groups to which the user is assigned. + items: + $ref: '#/components/schemas/Object_ID_And_Name' + nullable: true + type: array + user_inherited_groups: + description: Inherited User Groups which the user is part of. + items: + $ref: '#/components/schemas/Object_ID_And_Name' + nullable: true + type: array + welcome_email_sent: + description: Indicates whether welcome email is sent for the user. + nullable: true + type: boolean + org_privileges: + description: Privileges which are assigned to the user with org. + nullable: true + type: object + preferred_locale: + description: Locale for the user. + nullable: true + type: string + use_browser_language: + description: "Flag to indicate whether to use the browser locale for the\ + \ user in the UI.\nWhen set to true, the preferred_locale value is unset\ + \ and the browser's\nlanguage setting takes precedence. \n Version: 26.3.0.cl\ + \ or later\n" + nullable: true + type: boolean + extended_properties: + description: Properties for the user + nullable: true + type: object + extended_preferences: + description: Preferences for the user + nullable: true + type: object + user_parameters: + description: User Parameters which are specified for the user via JWToken + nullable: true + type: object + access_control_properties: + description: Access Control Properties which are specified for the user + via JWToken + nullable: true + type: object + variable_values: + description: Formula Variables which are specified for the user via JWToken + nullable: true + type: object + required: + - display_name + - id + - name + - visibility + type: object + Org: + description: The current Org context of the user. + example: + name: name + id: 6 + properties: + id: + description: The ID of the object. + format: int32 + type: integer + name: + description: Name of the object. + type: string + required: + - id + - name + type: object + FavoriteMetadataItem: + example: + name: name + id: id + type: LIVEBOARD + properties: + id: + description: Unique ID of the metadata object. + type: string + name: + description: name of the metadata object. + type: string + type: + description: " Type of metadata object.\n \n\nRequired if the name of\ + \ the object is set as the identifier. This attribute is optional when\ + \ the object GUID is specified as the identifier." + enum: + - LIVEBOARD + - ANSWER + - LOGICAL_TABLE + - LOGICAL_COLUMN + - CONNECTION + - TAG + - USER + - USER_GROUP + - LOGICAL_RELATIONSHIP + type: string + required: + - id + - name + - type + type: object + Object_ID_And_Name: + description: The object representation with ID and Name. + example: + name: name + id: id + properties: + id: + description: The unique identifier of the object. + nullable: true + type: string + name: + description: Name of the object. + nullable: true + type: string + type: object + FavoriteMetadataInput: + example: + identifier: identifier + type: LIVEBOARD + properties: + identifier: + description: Unique ID or name of the metadata object. + nullable: true + type: string + type: + description: " Type of metadata object.\n \n\nRequired if the name of\ + \ the object is set as the identifier. This attribute is optional when\ + \ the object GUID is specified as the identifier." + enum: + - LIVEBOARD + - ANSWER + nullable: true + type: string + type: object + SortOptions: + description: Sort options. + properties: + field_name: + description: Name of the field to apply the sort on. + enum: + - NAME + - DISPLAY_NAME + - AUTHOR + - CREATED + - MODIFIED + nullable: true + type: string + order: + description: "Sort order : ASC(Ascending) or DESC(Descending)." + enum: + - ASC + - DESC + nullable: true + type: string + type: object + SystemInfo: + example: + admin_group_id: admin_group_id + hidden_object_id: hidden_object_id + logical_model_version: 6 + time_format: time_format + all_user_group_member_user_count: 0 + all_user_group_id: all_user_group_id + tsadmin_user_id: tsadmin_user_id + time_zone: time_zone + locale: locale + api_version: api_version + type: type + all_tables_connection_id: all_tables_connection_id + license: license + environment: environment + super_user_id: super_user_id + name: name + system_group_id: system_group_id + accept_language: accept_language + date_format: date_format + system_user_id: system_user_id + id: id + release_version: release_version + date_time_format: date_time_format + properties: + id: + description: The unique identifier of the object + nullable: true + type: string + name: + description: Name of the cluster. + nullable: true + type: string + release_version: + description: The release version of the cluster. + nullable: true + type: string + time_zone: + description: The timezone of the cluster. + nullable: true + type: string + locale: + description: The default locale of the cluster. + nullable: true + type: string + date_format: + description: The default date format representation of the cluster. + nullable: true + type: string + api_version: + description: The API version of the cluster. + nullable: true + type: string + type: + description: The deployment type of the cluster. + nullable: true + type: string + environment: + description: The deployed environment of the cluster. + nullable: true + type: string + license: + description: The license applied to the cluster. + nullable: true + type: string + date_time_format: + description: The default date time format representation of the cluster. + nullable: true + type: string + time_format: + description: The default time format representation of the cluster. + nullable: true + type: string + system_user_id: + description: The unique identifier of system user. + nullable: true + type: string + super_user_id: + description: The unique identifier of super user. + nullable: true + type: string + hidden_object_id: + description: The unique identifier of hidden object. + nullable: true + type: string + system_group_id: + description: The unique identifier of system group. + nullable: true + type: string + tsadmin_user_id: + description: The unique identifier of tsadmin user. + nullable: true + type: string + admin_group_id: + description: The unique identifier of admin group. + nullable: true + type: string + all_tables_connection_id: + description: The unique identifier of all tables connection. + nullable: true + type: string + all_user_group_id: + description: The unique identifier of ALL group. + nullable: true + type: string + accept_language: + description: The supported accept language by the cluster. + nullable: true + type: string + all_user_group_member_user_count: + description: The count of users of ALL group. + format: int32 + nullable: true + type: integer + logical_model_version: + description: The version number of logical model of the cluster. + format: int32 + nullable: true + type: integer + type: object + SystemConfig: + example: + onboarding_content_url: onboarding_content_url + saml_enabled: true + okta_enabled: true + properties: + onboarding_content_url: + nullable: true + type: string + saml_enabled: + nullable: true + type: boolean + okta_enabled: + nullable: true + type: boolean + type: object + SystemOverrideInfo: + example: + config_override_info: "{}" + properties: + config_override_info: + nullable: true + type: object + type: object + OrgPreferenceSearchCriteriaInput: + example: + event_types: + - LIVEBOARD_SCHEDULE + - LIVEBOARD_SCHEDULE + org_identifier: org_identifier + properties: + org_identifier: + description: Unique identifier or name of the org + type: string + event_types: + description: "Event types to search for. If not provided, all event types\ + \ for this org are returned." + items: + enum: + - LIVEBOARD_SCHEDULE + type: string + nullable: true + type: array + required: + - org_identifier + type: object + CommunicationChannelPreferencesResponse: + example: + cluster_preferences: + - event_type: LIVEBOARD_SCHEDULE + channels: + - EMAIL + - EMAIL + - event_type: LIVEBOARD_SCHEDULE + channels: + - EMAIL + - EMAIL + org_preferences: + - preferences: + - event_type: LIVEBOARD_SCHEDULE + channels: + - EMAIL + - EMAIL + - event_type: LIVEBOARD_SCHEDULE + channels: + - EMAIL + - EMAIL + org: + name: name + id: id + - preferences: + - event_type: LIVEBOARD_SCHEDULE + channels: + - EMAIL + - EMAIL + - event_type: LIVEBOARD_SCHEDULE + channels: + - EMAIL + - EMAIL + org: + name: name + id: id + properties: + cluster_preferences: + description: Cluster-level default configurations. + items: + $ref: '#/components/schemas/EventChannelConfig' + nullable: true + type: array + org_preferences: + description: Org-specific configurations. + items: + $ref: '#/components/schemas/OrgChannelConfigResponse' + nullable: true + type: array + type: object + EventChannelConfig: + example: + event_type: LIVEBOARD_SCHEDULE + channels: + - EMAIL + - EMAIL + properties: + event_type: + description: Type of event for which communication channels are configured + enum: + - LIVEBOARD_SCHEDULE + type: string + channels: + description: Communication channels enabled for this event type. Empty array + indicates no channels are enabled. + items: + enum: + - EMAIL + - WEBHOOK + type: string + type: array + required: + - channels + - event_type + type: object + OrgChannelConfigResponse: + example: + preferences: + - event_type: LIVEBOARD_SCHEDULE + channels: + - EMAIL + - EMAIL + - event_type: LIVEBOARD_SCHEDULE + channels: + - EMAIL + - EMAIL + org: + name: name + id: id + properties: + org: + $ref: '#/components/schemas/OrgDetails' + preferences: + description: Event-specific communication channel configurations for this + org + items: + $ref: '#/components/schemas/EventChannelConfig' + type: array + required: + - org + - preferences + type: object + OrgDetails: + example: + name: name + id: id + properties: + id: + description: Unique id of the org + type: string + name: + description: Name of the org + type: string + required: + - id + - name + type: object + SecuritySettingsResponse: + description: Response type for security settings search. + example: + cluster_preferences: + cors_whitelisted_urls: + - cors_whitelisted_urls + - cors_whitelisted_urls + non_embed_access: + block_full_app_access: true + groups_with_access: + - name: name + id: id + - name: name + id: id + saml_redirect_urls: + - saml_redirect_urls + - saml_redirect_urls + csp_settings: + visual_embed_hosts: + - visual_embed_hosts + - visual_embed_hosts + font_src_urls: + - font_src_urls + - font_src_urls + img_src_urls: + - img_src_urls + - img_src_urls + script_src_urls: + urls: + - urls + - urls + enabled: true + iframe_src_urls: + - iframe_src_urls + - iframe_src_urls + connect_src_urls: + - connect_src_urls + - connect_src_urls + style_src_urls: + - style_src_urls + - style_src_urls + enable_partitioned_cookies: true + trusted_auth_status: ENABLED + org_preferences: + - cors_whitelisted_urls: + - cors_whitelisted_urls + - cors_whitelisted_urls + non_embed_access: + block_full_app_access: true + groups_with_access: + - name: name + id: id + - name: name + id: id + org: + name: name + id: 0 + trusted_auth_status: ENABLED + - cors_whitelisted_urls: + - cors_whitelisted_urls + - cors_whitelisted_urls + non_embed_access: + block_full_app_access: true + groups_with_access: + - name: name + id: id + - name: name + id: id + org: + name: name + id: 0 + trusted_auth_status: ENABLED + properties: + cluster_preferences: + $ref: '#/components/schemas/SecuritySettingsClusterPreferences' + org_preferences: + description: Org-level security preferences. + items: + $ref: '#/components/schemas/SecuritySettingsOrgPreferences' + nullable: true + type: array + type: object + SecuritySettingsClusterPreferences: + description: Cluster-level security preferences. + example: + cors_whitelisted_urls: + - cors_whitelisted_urls + - cors_whitelisted_urls + non_embed_access: + block_full_app_access: true + groups_with_access: + - name: name + id: id + - name: name + id: id + saml_redirect_urls: + - saml_redirect_urls + - saml_redirect_urls + csp_settings: + visual_embed_hosts: + - visual_embed_hosts + - visual_embed_hosts + font_src_urls: + - font_src_urls + - font_src_urls + img_src_urls: + - img_src_urls + - img_src_urls + script_src_urls: + urls: + - urls + - urls + enabled: true + iframe_src_urls: + - iframe_src_urls + - iframe_src_urls + connect_src_urls: + - connect_src_urls + - connect_src_urls + style_src_urls: + - style_src_urls + - style_src_urls + enable_partitioned_cookies: true + trusted_auth_status: ENABLED + properties: + enable_partitioned_cookies: + description: Support embedded access when third-party cookies are blocked. + nullable: true + type: boolean + cors_whitelisted_urls: + description: Allowed origins for CORS. + items: + type: string + nullable: true + type: array + csp_settings: + $ref: '#/components/schemas/CspSettings' + saml_redirect_urls: + description: Allowed redirect hosts for SAML login. + items: + type: string + nullable: true + type: array + non_embed_access: + $ref: '#/components/schemas/ClusterNonEmbedAccess' + trusted_auth_status: + description: "Trusted authentication status at the cluster level. \n Version:\ + \ 26.6.0.cl or later\n" + enum: + - ENABLED + - DISABLED + nullable: true + type: string + type: object + CspSettings: + description: CSP (Content Security Policy) settings. + example: + visual_embed_hosts: + - visual_embed_hosts + - visual_embed_hosts + font_src_urls: + - font_src_urls + - font_src_urls + img_src_urls: + - img_src_urls + - img_src_urls + script_src_urls: + urls: + - urls + - urls + enabled: true + iframe_src_urls: + - iframe_src_urls + - iframe_src_urls + connect_src_urls: + - connect_src_urls + - connect_src_urls + style_src_urls: + - style_src_urls + - style_src_urls + properties: + connect_src_urls: + description: Allowed URLs for connect-src directive. + items: + type: string + nullable: true + type: array + font_src_urls: + description: Allowed URLs for font-src directive. + items: + type: string + nullable: true + type: array + visual_embed_hosts: + description: Allowed hosts for visual embed (frame-ancestors directive). + items: + type: string + nullable: true + type: array + iframe_src_urls: + description: Allowed URLs for frame-src directive. + items: + type: string + nullable: true + type: array + img_src_urls: + description: Allowed URLs for img-src directive. + items: + type: string + nullable: true + type: array + script_src_urls: + $ref: '#/components/schemas/ScriptSrcUrls' + style_src_urls: + description: Allowed URLs for style-src directive. + items: + type: string + nullable: true + type: array + type: object + ScriptSrcUrls: + description: Script-src CSP settings. + example: + urls: + - urls + - urls + enabled: true + properties: + enabled: + description: Whether script-src customization is enabled. + nullable: true + type: boolean + urls: + description: Allowed URLs for script-src directive. Can only be set if enabled + is true. + items: + type: string + nullable: true + type: array + type: object + ClusterNonEmbedAccess: + description: Cluster-level non-embed access configuration. + example: + block_full_app_access: true + groups_with_access: + - name: name + id: id + - name: name + id: id + properties: + block_full_app_access: + description: Block full application access for non-embedded usage. + nullable: true + type: boolean + groups_with_access: + description: |- + Groups that have non-embed full app access. + Only applicable when orgs feature is disabled. Use org_preferences when org feature is enabled. + items: + $ref: '#/components/schemas/GroupInfo' + nullable: true + type: array + type: object + GroupInfo: + description: Group information for non-embed access. + example: + name: name + id: id + properties: + id: + description: Unique identifier of the group. + nullable: true + type: string + name: + description: Name of the group. + nullable: true + type: string + type: object + SecuritySettingsOrgPreferences: + description: Org-level security preferences. + example: + cors_whitelisted_urls: + - cors_whitelisted_urls + - cors_whitelisted_urls + non_embed_access: + block_full_app_access: true + groups_with_access: + - name: name + id: id + - name: name + id: id + org: + name: name + id: 0 + trusted_auth_status: ENABLED + properties: + org: + $ref: '#/components/schemas/SecuritySettingsOrgDetails' + cors_whitelisted_urls: + description: Allowed origins for CORS for this org. + items: + type: string + nullable: true + type: array + non_embed_access: + $ref: '#/components/schemas/OrgNonEmbedAccess' + trusted_auth_status: + description: "Trusted authentication status for this org. \n Version: 26.6.0.cl\ + \ or later\n" + enum: + - ENABLED + - DISABLED + nullable: true + type: string + type: object + SecuritySettingsOrgDetails: + description: Org details for security settings. + example: + name: name + id: 0 + properties: + id: + description: Unique identifier of the org. + format: int32 + nullable: true + type: integer + name: + description: Name of the org. + nullable: true + type: string + type: object + OrgNonEmbedAccess: + description: Org-level non-embed access configuration. + example: + block_full_app_access: true + groups_with_access: + - name: name + id: id + - name: name + id: id + properties: + block_full_app_access: + description: Block full application access for non-embedded usage. + nullable: true + type: boolean + groups_with_access: + description: Groups that have non-embed full app access. + items: + $ref: '#/components/schemas/GroupInfo' + nullable: true + type: array + type: object + OrgResponse: + example: + visibility: SHOW + name: name + description: description + id: 0 + status: ACTIVE + properties: + id: + description: Unique identifier of the Org. + format: int32 + nullable: true + type: integer + name: + description: Name of the Org. + nullable: true + type: string + status: + description: Status of the Org. + enum: + - ACTIVE + - IN_ACTIVE + nullable: true + type: string + description: + description: Description of the Org. + nullable: true + type: string + visibility: + description: Visibility of the Org. + enum: + - SHOW + - HIDDEN + nullable: true + type: string + type: object + Tag: + example: + external: true + deleted: true + color: color + hidden: true + creation_time_in_millis: 0.8008282 + owner_id: owner_id + deprecated: true + name: name + modifier_id: modifier_id + modification_time_in_millis: 6.0274563 + id: id + author_id: author_id + properties: + name: + type: string + id: + type: string + color: + nullable: true + type: string + deleted: + nullable: true + type: boolean + hidden: + nullable: true + type: boolean + external: + nullable: true + type: boolean + deprecated: + nullable: true + type: boolean + creation_time_in_millis: + format: float + nullable: true + type: number + modification_time_in_millis: + format: float + nullable: true + type: number + author_id: + nullable: true + type: string + modifier_id: + nullable: true + type: string + owner_id: + nullable: true + type: string + required: + - id + - name + type: object + UserGroupResponse: + example: + privileges: + - privileges + - privileges + default_liveboards: + - name: name + id: id + - name: name + id: id + creation_time_in_millis: 0.8008282 + hidden: true + owner_id: owner_id + deprecated: true + roles: + - name: name + id: id + - name: name + id: id + description: description + modification_time_in_millis: 2.302136 + type: LOCAL_GROUP + content: "{}" + index_version: 5 + sub_groups: + - name: name + id: id + - name: name + id: id + id: id + generation_number: 6 + metadata_version: 5 + visibility: SHARABLE + index: 1 + display_name: display_name + parent_type: USER + system_group: true + users: + - name: name + id: id + - name: name + id: id + tags: + - name: name + id: id + - name: name + id: id + external: true + deleted: true + modifier_id: modifier_id + name: name + complete_detail: true + orgs: + - name: name + id: id + - name: name + id: id + author_id: author_id + properties: + author_id: + description: The unique identifier of the object + nullable: true + type: string + complete_detail: + description: Indicates whether the response has complete detail of the group. + nullable: true + type: boolean + content: + description: Content details of the group + nullable: true + type: object + creation_time_in_millis: + description: Creation time of the group in milliseconds + format: float + nullable: true + type: number + default_liveboards: + description: Liveboards that are assigned as default Liveboards to the group. + items: + $ref: '#/components/schemas/UserGroup' + nullable: true + type: array + deleted: + description: Indicates whether the group is deleted + nullable: true + type: boolean + deprecated: + description: Indicates whether the group is deprecated + nullable: true + type: boolean + description: + description: Description of the group + nullable: true + type: string + display_name: + description: Display name of the group. + type: string + external: + description: Indicates whether the group is external + nullable: true + type: boolean + generation_number: + description: Generation number of the group + format: int32 + nullable: true + type: integer + hidden: + description: Indicates whether the group is hidden + nullable: true + type: boolean + id: + description: The unique identifier of the object + type: string + index: + description: Index number of the group + format: int32 + nullable: true + type: integer + index_version: + description: Index version number of the group + format: int32 + nullable: true + type: integer + metadata_version: + description: Metadata version number of the group + format: int32 + nullable: true + type: integer + modification_time_in_millis: + description: Last modified time of the group in milliseconds. + format: float + nullable: true + type: number + modifier_id: + description: The unique identifier of the object + nullable: true + type: string + name: + description: Name of the group. + type: string + orgs: + description: Orgs in which group exists. + items: + $ref: '#/components/schemas/UserGroup' + nullable: true + type: array + owner_id: + description: The unique identifier of the object + nullable: true + type: string + parent_type: + description: Parent type of the group. + enum: + - USER + - GROUP + nullable: true + type: string + privileges: + description: Privileges which are assigned to the group + items: + type: string + nullable: true + type: array + sub_groups: + description: Groups who are part of the group + items: + $ref: '#/components/schemas/UserGroup' + nullable: true + type: array + system_group: + description: Indicates whether the group is a system group. + nullable: true + type: boolean + tags: + description: Tags associated with the group. + items: + $ref: '#/components/schemas/UserGroup' + nullable: true + type: array + type: + description: Type of the group. + enum: + - LOCAL_GROUP + - LDAP_GROUP + - TEAM_GROUP + - TENANT_GROUP + nullable: true + type: string + users: + description: Users who are part of the group. + items: + $ref: '#/components/schemas/UserGroup' + nullable: true + type: array + visibility: + description: "Visibility of the group. The SHARABLE makes a group visible\ + \ to other users and groups, and thus allows them to share objects." + enum: + - SHARABLE + - NON_SHARABLE + type: string + roles: + description: List of roles assgined to the user + items: + $ref: '#/components/schemas/Role' + nullable: true + type: array + required: + - display_name + - id + - name + - visibility + type: object + Role: + example: + name: name + id: id + properties: + id: + description: id of the role + nullable: true + type: string + name: + description: name of the role + nullable: true + type: string + type: object + MetadataListItemInput: + example: + identifier: identifier + name_pattern: name_pattern + obj_identifier: obj_identifier + type: LIVEBOARD + subtypes: + - ONE_TO_ONE_LOGICAL + - ONE_TO_ONE_LOGICAL + properties: + identifier: + description: Unique ID or name of the metadata. + nullable: true + type: string + obj_identifier: + description: CustomObjectId of the metadata. + nullable: true + type: string + name_pattern: + description: A pattern to match the case-insensitive name of the metadata + object. User % for a wildcard match. + nullable: true + type: string + type: + description: |- + Type of metadata. Required if the name of the object is set as identifier. This attribute is optional when the object GUID is specified as identifier. + 1. Liveboard + 2. Answers + 3. LOGICAL_TABLE for any data object such as table, worksheet or view. + 4. LOGICAL_COLUMN for a column of any data object such as table, worksheet or view. + 5. CONNECTION for creating or modify data connections. + 6. TAG for tag objects. + 7. USER for user objects. + 8. USER_GROUP for group objects. + 9. LOGICAL_RELATIONSHIP for table or worksheet joins. A join combines from one or several data object by using matching values + 10. INSIGHT_SPEC for SpotIQ objects + enum: + - LIVEBOARD + - ANSWER + - LOGICAL_TABLE + - LOGICAL_COLUMN + - CONNECTION + - TAG + - USER + - USER_GROUP + - LOGICAL_RELATIONSHIP + - INSIGHT_SPEC + nullable: true + type: string + subtypes: + description: "List of subtype of metadata. Applies for LOGICAL_TABLE type\ + \ with the following valid values.\n1. ONE_TO_ONE_LOGICAL\n2. WORKSHEET\n\ + 3. PRIVATE_WORKSHEET.\n4. USER_DEFINED.\n5. AGGR_WORKSHEET.\n6. SQL_VIEW\ + \ \n Version: 10.11.0.cl or later\n" + items: + enum: + - ONE_TO_ONE_LOGICAL + - WORKSHEET + - PRIVATE_WORKSHEET + - USER_DEFINED + - AGGR_WORKSHEET + - SQL_VIEW + type: string + nullable: true + type: array + type: object + PermissionInput: + description: Details of users or groups. + example: + principal: + identifier: identifier + type: USER + share_mode: READ_ONLY + properties: + principal: + $ref: '#/components/schemas/PrincipalsInput' + share_mode: + description: Object share mode. + enum: + - READ_ONLY + - MODIFY + - NO_ACCESS + type: string + required: + - principal + - share_mode + type: object + ExcludeMetadataListItemInput: + example: + identifier: identifier + type: LIVEBOARD + properties: + identifier: + description: Unique ID or name of the metadata. + type: string + type: + description: |- + Type of metadata. Required if the name of the object is set as identifier. This attribute is optional when the object GUID is specified as identifier. + 1. Liveboard + 2. Answers + 3. LOGICAL_TABLE for any data object such as table, worksheet or view + 4. LOGICAL_COLUMN for a column of any data object such as table, worksheet or view + 5. CONNECTION for connection objects + 6. TAG for tag objects + 7. USER for user objects + 8. USER_GROUP for group objects + 9. LOGICAL_RELATIONSHIP for table or worksheet joins. A join combines from one or several data object by using matching values. + 10. INSIGHT_SPEC for SpotIQ objects + enum: + - LIVEBOARD + - ANSWER + - LOGICAL_TABLE + - LOGICAL_COLUMN + - CONNECTION + - TAG + - USER + - USER_GROUP + - LOGICAL_RELATIONSHIP + - INSIGHT_SPEC + type: string + required: + - identifier + - type + type: object + FavoriteObjectOptionsInput: + description: Favorite object options. + properties: + include: + default: false + description: Includes objects marked as favorite for the specified users. + nullable: true + type: boolean + user_identifiers: + description: "Unique ID or name of the users. If not specified, the favorite\ + \ objects of current logged in user are returned." + items: + type: string + nullable: true + type: array + type: object + MetadataSearchSortOptions: + description: Sort options. + properties: + field_name: + description: Name of the field to apply the sort on. + enum: + - NAME + - DISPLAY_NAME + - AUTHOR + - CREATED + - MODIFIED + - VIEWS + - FAVORITES + - LAST_ACCESSED + nullable: true + type: string + order: + description: "Sort order : ASC(Ascending) or DESC(Descending)." + enum: + - ASC + - DESC + nullable: true + type: string + type: object + MetadataSearchResponse: + description: Metadata Search Response Object. + example: + metadata_name: metadata_name + dependent_objects: "{}" + metadata_detail: "{}" + metadata_header: "{}" + visualization_headers: + - "{}" + - "{}" + incomplete_objects: + - "{}" + - "{}" + stats: "{}" + metadata_type: LIVEBOARD + metadata_id: metadata_id + metadata_obj_id: metadata_obj_id + properties: + metadata_id: + description: Unique identifier of the metadata. + nullable: true + type: string + metadata_name: + description: Name of the metadata. + nullable: true + type: string + metadata_type: + description: Type of the metadata. + enum: + - LIVEBOARD + - ANSWER + - LOGICAL_TABLE + - LOGICAL_COLUMN + - CONNECTION + - TAG + - USER + - USER_GROUP + - LOGICAL_RELATIONSHIP + - INSIGHT_SPEC + type: string + metadata_obj_id: + description: |- + Custom identifier of the metadata. + (Available from 10.8.0.cl onwards) + nullable: true + type: string + dependent_objects: + description: Details of dependent objects of the metadata objects. + nullable: true + type: object + incomplete_objects: + description: Details of incomplete information of the metadata objects if + any. + items: + type: object + nullable: true + type: array + metadata_detail: + description: Complete details of the metadata objects. + nullable: true + type: object + metadata_header: + description: Header information of the metadata objects. + nullable: true + type: object + visualization_headers: + description: Visualization header information of the metadata objects. + items: + type: object + nullable: true + type: array + stats: + description: "Stats of the metadata object. Includes views, favorites, last_accessed." + nullable: true + type: object + required: + - metadata_type + type: object + GetAsyncImportStatusResponse: + example: + last_batch: true + status_list: + - tenant_id: tenant_id + task_name: task_name + task_status: COMPLETED + created_at: 6.0274563 + in_progress_at: 1.4658129 + task_id: task_id + import_policy: PARTIAL + object_processed_count: 2 + completed_at: 5.962134 + org_id: 0 + import_response: "{}" + author_id: author_id + modified_at: 7.0614014 + author_display_name: author_display_name + total_object_count: 5 + - tenant_id: tenant_id + task_name: task_name + task_status: COMPLETED + created_at: 6.0274563 + in_progress_at: 1.4658129 + task_id: task_id + import_policy: PARTIAL + object_processed_count: 2 + completed_at: 5.962134 + org_id: 0 + import_response: "{}" + author_id: author_id + modified_at: 7.0614014 + author_display_name: author_display_name + total_object_count: 5 + properties: + status_list: + description: List of task statuses. + items: + $ref: '#/components/schemas/ImportEPackAsyncTaskStatus' + nullable: true + type: array + last_batch: + description: Indicates whether there are more task statuses to fetch. + nullable: true + type: boolean + type: object + ImportEPackAsyncTaskStatus: + example: + tenant_id: tenant_id + task_name: task_name + task_status: COMPLETED + created_at: 6.0274563 + in_progress_at: 1.4658129 + task_id: task_id + import_policy: PARTIAL + object_processed_count: 2 + completed_at: 5.962134 + org_id: 0 + import_response: "{}" + author_id: author_id + modified_at: 7.0614014 + author_display_name: author_display_name + total_object_count: 5 + properties: + tenant_id: + description: GUID of tenant from which the task is initiated. + nullable: true + type: string + org_id: + description: Organisation ID of the user who initiated the task. + format: int32 + nullable: true + type: integer + task_id: + description: Unique identifier for the task. + nullable: true + type: string + task_name: + description: Name of the task. + nullable: true + type: string + import_response: + description: Response of imported objects so far. + nullable: true + type: object + task_status: + description: Current status of the task. + enum: + - COMPLETED + - IN_QUEUE + - IN_PROGRESS + - FAILED + nullable: true + type: string + author_id: + description: ID of the user who initiated the task. + nullable: true + type: string + import_policy: + description: Policy used for the import task. + enum: + - PARTIAL + - ALL_OR_NONE + - VALIDATE_ONLY + - PARTIAL_OBJECT + nullable: true + type: string + created_at: + description: Time when the task was created (in ms since epoch). + format: float + nullable: true + type: number + in_progress_at: + description: Time when the task started (in ms since epoch). + format: float + nullable: true + type: number + completed_at: + description: Time when the task was completed (in ms since epoch). + format: float + nullable: true + type: number + total_object_count: + description: Total number of objects to process. + format: int32 + nullable: true + type: integer + object_processed_count: + description: Number of objects processed so far. + format: int32 + nullable: true + type: integer + modified_at: + description: Last time the task status was updated (in ms since epoch). + format: float + nullable: true + type: number + author_display_name: + description: Display name of the user who initiated the task. + nullable: true + type: string + type: object + SqlQueryResponse: + example: + metadata_name: metadata_name + sql_queries: + - metadata_name: metadata_name + metadata_id: metadata_id + sql_query: sql_query + - metadata_name: metadata_name + metadata_id: metadata_id + sql_query: sql_query + metadata_type: LIVEBOARD + metadata_id: metadata_id + properties: + metadata_id: + description: Unique identifier of the metadata. + type: string + metadata_name: + description: Name of the metadata. + type: string + metadata_type: + description: Type of the metadata. + enum: + - LIVEBOARD + - ANSWER + - LOGICAL_TABLE + - LOGICAL_COLUMN + - CONNECTION + - TAG + - USER + - USER_GROUP + - LOGICAL_RELATIONSHIP + type: string + sql_queries: + description: SQL query details of metadata objects. + items: + $ref: '#/components/schemas/SqlQuery' + type: array + required: + - metadata_id + - metadata_name + - metadata_type + - sql_queries + type: object + SqlQuery: + description: Response format associated with fetch SQL query api + example: + metadata_name: metadata_name + metadata_id: metadata_id + sql_query: sql_query + properties: + metadata_id: + description: Unique identifier of the metadata. + type: string + metadata_name: + description: Name of the metadata. + type: string + sql_query: + description: SQL query of a metadata object. + type: string + required: + - metadata_id + - metadata_name + - sql_query + type: object + PdfOptionsInput: + properties: + page_size: + description: "Size of PDF page. `A4` generates a paginated A4 PDF. `CONTINUOUS`\ + \ generates a continuous PDF that matches the Liveboard layout. Each Liveboard\ + \ tab has its own page of variable length. Defaults to `A4` if not specified.\ + \ \n Version: 26.5.0.cl or later\n" + enum: + - A4 + - CONTINUOUS + nullable: true + type: string + zoom_level: + description: "Zoom level percentage for the PDF. Only applicable when `page_size`\ + \ is `CONTINUOUS`. Acceptable values are integers in the range [45, 175].\ + \ Defaults to 100 if not specified. \n Version: 26.5.0.cl or later\n" + format: int32 + nullable: true + type: integer + include_cover_page: + default: true + description: Indicates whether to include the cover page with the Liveboard + title. + nullable: true + type: boolean + include_custom_logo: + default: true + description: Indicates whether to include customized wide logo in the footer + if available. + nullable: true + type: boolean + include_filter_page: + default: true + description: "Indicates whether to include a page with all applied filters.\ + \ For `CONTINUOUS` page_size, this parameter indicates whether to include\ + \ the filter header." + nullable: true + type: boolean + include_page_number: + default: true + description: Indicates whether to include page number in the footer of each + page. + nullable: true + type: boolean + page_orientation: + default: PORTRAIT + description: Page orientation of the PDF. + enum: + - PORTRAIT + - LANDSCAPE + nullable: true + type: string + truncate_table: + default: false + description: Indicates whether to include only the first page of the tables. + nullable: true + type: boolean + page_footer_text: + description: Text to include in the footer of each page. + nullable: true + type: string + type: object + PngOptionsInput: + properties: + include_cover_page: + default: false + description: Indicates whether to include the cover page with the Liveboard + title. + nullable: true + type: boolean + include_filter_page: + default: false + description: Indicates whether to include a page with all applied filters. + nullable: true + type: boolean + personalised_view_id: + description: Indicates personalised view of the Liveboard in case of png + nullable: true + type: string + image_resolution: + description: "Desired width of the Liveboard image in pixels. Ex. 1920 for\ + \ Full HD image \n Version: 10.9.0.cl or later\n" + format: int32 + nullable: true + type: integer + image_scale: + description: "The scale of the image in percentage. Ex. 100 for 100% scale.\ + \ \n Version: 10.9.0.cl or later\n" + format: int32 + nullable: true + type: integer + include_header: + default: false + description: "Indicates whether to include the header of the liveboard.\ + \ \n Version: 10.9.0.cl or later\n" + nullable: true + type: boolean + type: object + RegionalSettingsInput: + properties: + currency_format: + description: ISO code to be appended with currency values. + enum: + - ADP + - AED + - AFN + - ALL + - AMD + - ANG + - AOA + - ARA + - ARS + - ATS + - AUD + - AWG + - AZN + - BAM + - BBD + - BDT + - BEF + - BGL + - BGM + - BGN + - BHD + - BIF + - BMD + - BND + - BOB + - BOP + - BOV + - BRL + - BSD + - BTN + - BUK + - BWP + - BYN + - BZD + - CAD + - CDF + - CHE + - CHF + - CHW + - CLE + - CLP + - CNX + - CNY + - COP + - COU + - CRC + - CSK + - CUC + - CUP + - CVE + - CYP + - CZK + - DDM + - DEM + - DJF + - DKK + - DOP + - DZD + - ECS + - ECV + - EEK + - EGP + - ERN + - ESP + - ETB + - EUR + - FIM + - FJD + - FKP + - FRF + - GBP + - GEK + - GEL + - GHS + - GIP + - GMD + - GNF + - GNS + - GQE + - GRD + - GTQ + - GWE + - GWP + - GYD + - HKD + - HNL + - HRD + - HRK + - HTG + - HUF + - IDR + - IEP + - ILP + - ILS + - INR + - IQD + - IRR + - ISK + - ITL + - JMD + - JOD + - JPY + - KES + - KGS + - KHR + - KMF + - KPW + - KRW + - KWD + - KYD + - KZT + - LAK + - LBP + - LKR + - LRD + - LSL + - LTL + - LTT + - LUC + - LUF + - LUL + - LVL + - LVR + - LYD + - MAD + - MAF + - MCF + - MDC + - MDL + - MGA + - MGF + - MKD + - MLF + - MMK + - MNT + - MOP + - MRU + - MTL + - MTP + - MUR + - MVR + - MWK + - MXN + - MXV + - MYR + - MZE + - MZN + - NAD + - NGN + - NIO + - NLG + - NOK + - NPR + - NZD + - OMR + - PAB + - PEI + - PEN + - PGK + - PHP + - PKR + - PLN + - PTE + - PYG + - QAR + - RHD + - RON + - RSD + - RUB + - RWF + - SAR + - SBD + - SCR + - SDG + - SEK + - SGD + - SHP + - SIT + - SKK + - SLL + - SOS + - SRD + - SRG + - SSP + - STN + - SUR + - SVC + - SYP + - SZL + - THB + - TJR + - TJS + - TMT + - TND + - TOP + - TPE + - TRY + - TTD + - TWD + - TZS + - UAH + - UAK + - UGX + - USD + - UYU + - UYW + - UZS + - VES + - VND + - VUV + - WST + - XAF + - XAG + - XAU + - XBA + - XBB + - XCD + - XDR + - XEU + - XFO + - XFU + - XOF + - XPD + - XPF + - XPT + - XRE + - XSU + - XTS + - XUA + - XXX + - YDD + - YER + - ZAR + - ZMW + nullable: true + type: string + user_locale: + description: Indicates the locale to be used for all formattings. + enum: + - en-CA + - en-GB + - en-US + - de-DE + - ja-JP + - zh-CN + - pt-BR + - fr-FR + - fr-CA + - es-US + - da-DK + - es-ES + - fi-FI + - sv-SE + - nb-NO + - pt-PT + - nl-NL + - it-IT + - ru-RU + - en-IN + - de-CH + - en-NZ + - es-MX + - en-AU + - zh-Hant + - ko-KR + - en-DE + nullable: true + type: string + number_format_locale: + description: Indicates the locale to be used for number formatting. + enum: + - en-CA + - en-GB + - en-US + - de-DE + - ja-JP + - zh-CN + - pt-BR + - fr-FR + - fr-CA + - es-US + - da-DK + - es-ES + - fi-FI + - sv-SE + - nb-NO + - pt-PT + - nl-NL + - it-IT + - ru-RU + - en-IN + - de-CH + - en-NZ + - es-MX + - en-AU + - zh-Hant + - ko-KR + - en-DE + nullable: true + type: string + date_format_locale: + description: Indicates the locale to be used for date formatting. + enum: + - en-CA + - en-GB + - en-US + - de-DE + - ja-JP + - zh-CN + - pt-BR + - fr-FR + - fr-CA + - es-US + - da-DK + - es-ES + - fi-FI + - sv-SE + - nb-NO + - pt-PT + - nl-NL + - it-IT + - ru-RU + - en-IN + - de-CH + - en-NZ + - es-MX + - en-AU + - zh-Hant + - ko-KR + - en-DE + nullable: true + type: string + type: object + AnswerPngOptionsInput: + properties: + x_resolution: + description: "Desired width of the answer image in pixels. Ex. 1920 for\ + \ Full HD image \n Version: 26.6.0.cl or later\n" + format: int32 + nullable: true + type: integer + y_resolution: + description: "Desired height of the answer image in pixels. Ex. 1080 for\ + \ Full HD image \n Version: 26.6.0.cl or later\n" + format: int32 + nullable: true + type: integer + scaling: + description: "The scale of the image in percentage. Ex. 100 for 100% scale.\ + \ \n Version: 26.6.0.cl or later\n" + format: int32 + nullable: true + type: integer + type: object + PermissionOfPrincipalsResponse: + example: + principal_permission_details: "{}" + properties: + principal_permission_details: + nullable: true + type: object + type: object + PermissionOfMetadataResponse: + example: + metadata_permission_details: "{}" + properties: + metadata_permission_details: + nullable: true + type: object + type: object + ObjectPrivilegesMetadataInput: + example: + identifier: identifier + type: LOGICAL_TABLE + properties: + type: + description: |- + Type of metadata object. + Required if the name of the object is set as the identifier. This attribute is optional when the object GUID is specified as the identifier. + enum: + - LOGICAL_TABLE + nullable: true + type: string + identifier: + description: Unique ID or name of the metadata object. + type: string + required: + - identifier + type: object + ObjectPrivilegesOfMetadataResponse: + example: + metadata_object_privileges: "{}" + properties: + metadata_object_privileges: + nullable: true + type: object + type: object + PrincipalsInput: + example: + identifier: identifier + type: USER + properties: + identifier: + description: Unique ID or name of the principal object such as a user or + group. + type: string + type: + description: Principal type. + enum: + - USER + - USER_GROUP + nullable: true + type: string + required: + - identifier + type: object + PermissionsMetadataTypeInput: + description: MetadataType InputType used in Permission API's + example: + identifier: identifier + type: LIVEBOARD + properties: + type: + description: " Type of metadata object.\n \n\nRequired if the name of\ + \ the object is set as the identifier. This attribute is optional when\ + \ the object GUID is specified as the identifier." + enum: + - LIVEBOARD + - ANSWER + - LOGICAL_TABLE + - LOGICAL_COLUMN + - CONNECTION + - COLLECTION + nullable: true + type: string + identifier: + description: Unique ID or name of the metadata object. + type: string + required: + - identifier + type: object + ColumnSecurityRuleTableInput: + example: + identifier: identifier + obj_identifier: obj_identifier + properties: + identifier: + description: Name or GUID of the table + nullable: true + type: string + obj_identifier: + description: Object ID of the table + nullable: true + type: string + type: object + ColumnSecurityRuleResponse: + example: + column_security_rules: + - source_table_details: + name: name + id: id + column: + name: name + id: id + groups: + - name: name + id: id + - name: name + id: id + - source_table_details: + name: name + id: id + column: + name: name + id: id + groups: + - name: name + id: id + - name: name + id: id + obj_id: obj_id + table_guid: table_guid + properties: + table_guid: + description: GUID of the table for which the column security rules are fetched + nullable: true + type: string + obj_id: + description: Object ID of the table for which the column security rules + are fetched + nullable: true + type: string + column_security_rules: + description: Array containing column security rule objects + items: + $ref: '#/components/schemas/ColumnSecurityRule' + nullable: true + type: array + type: object + ColumnSecurityRule: + example: + source_table_details: + name: name + id: id + column: + name: name + id: id + groups: + - name: name + id: id + - name: name + id: id + properties: + column: + $ref: '#/components/schemas/ColumnSecurityRuleColumn' + groups: + description: Array of groups that have access to this column + items: + $ref: '#/components/schemas/ColumnSecurityRuleGroup' + nullable: true + type: array + source_table_details: + $ref: '#/components/schemas/ColumnSecurityRuleSourceTable' + required: + - column + type: object + ColumnSecurityRuleColumn: + example: + name: name + id: id + properties: + id: + description: The unique identifier of the column + type: string + name: + description: The name of the column + type: string + required: + - id + - name + type: object + ColumnSecurityRuleGroup: + example: + name: name + id: id + properties: + id: + description: The unique identifier of the group + type: string + name: + description: The name of the group + type: string + required: + - id + - name + type: object + ColumnSecurityRuleSourceTable: + example: + name: name + id: id + properties: + id: + description: The unique identifier of the source table + type: string + name: + description: The name of the source table + type: string + required: + - id + - name + type: object + SearchDataResponse: + description: Response format associated with the search data API. + example: + contents: + - data_rows: + - "{}" + - "{}" + record_size: 1 + available_data_row_count: 0 + sampling_ratio: 5.637377 + column_names: + - column_names + - column_names + returned_data_row_count: 5 + record_offset: 6 + - data_rows: + - "{}" + - "{}" + record_size: 1 + available_data_row_count: 0 + sampling_ratio: 5.637377 + column_names: + - column_names + - column_names + returned_data_row_count: 5 + record_offset: 6 + properties: + contents: + description: Data content of metadata objects + items: + $ref: '#/components/schemas/AnswerContent' + type: array + required: + - contents + type: object + AnswerContent: + example: + data_rows: + - "{}" + - "{}" + record_size: 1 + available_data_row_count: 0 + sampling_ratio: 5.637377 + column_names: + - column_names + - column_names + returned_data_row_count: 5 + record_offset: 6 + properties: + available_data_row_count: + description: Total available data row count. + format: int32 + type: integer + column_names: + description: Name of the columns. + items: + type: string + type: array + data_rows: + description: Rows of data set. + items: + type: object + type: array + record_offset: + description: The starting record number from where the records should be + included. + format: int32 + type: integer + record_size: + description: The number of records that should be included. + format: int32 + type: integer + returned_data_row_count: + description: Total returned data row count. + format: int32 + type: integer + sampling_ratio: + description: "Sampling ratio (0 to 1). If the query was sampled, it is the\ + \ ratio of keys returned in the data set to the total number of keys expected\ + \ in the query. If the value is 1.0, this means that the complete result\ + \ is returned." + format: float + type: number + required: + - available_data_row_count + - column_names + - data_rows + - record_offset + - record_size + - returned_data_row_count + - sampling_ratio + type: object + LiveboardDataResponse: + example: + metadata_name: metadata_name + contents: + - visualization_id: visualization_id + data_rows: + - "{}" + - "{}" + record_size: 1 + available_data_row_count: 0 + sampling_ratio: 5.637377 + column_names: + - column_names + - column_names + returned_data_row_count: 5 + visualization_name: visualization_name + record_offset: 6 + - visualization_id: visualization_id + data_rows: + - "{}" + - "{}" + record_size: 1 + available_data_row_count: 0 + sampling_ratio: 5.637377 + column_names: + - column_names + - column_names + returned_data_row_count: 5 + visualization_name: visualization_name + record_offset: 6 + metadata_id: metadata_id + properties: + metadata_id: + description: The unique identifier of the object + type: string + metadata_name: + description: Name of the metadata object + type: string + contents: + description: Data content of metadata objects + items: + $ref: '#/components/schemas/LiveboardContent' + type: array + required: + - contents + - metadata_id + - metadata_name + type: object + LiveboardContent: + example: + visualization_id: visualization_id + data_rows: + - "{}" + - "{}" + record_size: 1 + available_data_row_count: 0 + sampling_ratio: 5.637377 + column_names: + - column_names + - column_names + returned_data_row_count: 5 + visualization_name: visualization_name + record_offset: 6 + properties: + available_data_row_count: + description: Total available data row count. + format: int32 + type: integer + column_names: + description: Name of the columns. + items: + type: string + type: array + data_rows: + description: Rows of data set. + items: + type: object + type: array + record_offset: + description: The starting record number from where the records should be + included. + format: int32 + type: integer + record_size: + description: The number of records that should be included. + format: int32 + type: integer + returned_data_row_count: + description: Total returned data row count. + format: int32 + type: integer + sampling_ratio: + description: "Sampling ratio (0 to 1). If the query was sampled, it is the\ + \ ratio of keys returned in the data set to the total number of keys expected\ + \ in the query. If the value is 1.0, this means that the complete result\ + \ is returned." + format: float + type: number + visualization_id: + description: Unique ID of the visualization. + nullable: true + type: string + visualization_name: + description: Name of the visualization. + nullable: true + type: string + required: + - available_data_row_count + - column_names + - data_rows + - record_offset + - record_size + - returned_data_row_count + - sampling_ratio + type: object + AnswerDataResponse: + description: Response format associated with fetch data api + example: + metadata_name: metadata_name + contents: + - data_rows: + - "{}" + - "{}" + record_size: 1 + available_data_row_count: 0 + sampling_ratio: 5.637377 + column_names: + - column_names + - column_names + returned_data_row_count: 5 + record_offset: 6 + - data_rows: + - "{}" + - "{}" + record_size: 1 + available_data_row_count: 0 + sampling_ratio: 5.637377 + column_names: + - column_names + - column_names + returned_data_row_count: 5 + record_offset: 6 + metadata_id: metadata_id + properties: + metadata_id: + description: The unique identifier of the object + type: string + metadata_name: + description: Name of the metadata object + type: string + contents: + description: Data content of metadata objects + items: + $ref: '#/components/schemas/AnswerContent' + type: array + required: + - contents + - metadata_id + - metadata_name + type: object + LogResponse: + example: + date: date + log: log + properties: + date: + description: Date timestamp of the log entry + type: string + log: + description: Log data + type: string + required: + - date + - log + type: object + RepoConfigObject: + example: + org: + name: name + id: 6 + enable_guid_mapping: true + configuration_branch_name: configuration_branch_name + repository_url: repository_url + commit_branch_name: commit_branch_name + branches: + - branches + - branches + username: username + properties: + repository_url: + description: Remote repository URL configured + nullable: true + type: string + username: + description: Username to authenticate connection to the version control + system + nullable: true + type: string + commit_branch_name: + description: Name of the remote branch where objects from this Thoughtspot + instance will be versioned. + nullable: true + type: string + branches: + description: Branches that have been pulled in local repository + items: + type: string + nullable: true + type: array + enable_guid_mapping: + description: Maintain mapping of guid for the deployment to an instance + nullable: true + type: boolean + configuration_branch_name: + description: Name of the branch where the configuration files related to + operations between Thoughtspot and version control repo should be maintained. + nullable: true + type: string + org: + $ref: '#/components/schemas/Org' + type: object + CommitHistoryResponse: + example: + committer: + email: email + username: username + author: + email: email + username: username + comment: comment + commit_time: commit_time + commit_id: commit_id + branch: branch + properties: + committer: + $ref: '#/components/schemas/CommiterType' + author: + $ref: '#/components/schemas/AuthorType' + comment: + description: Comments associated with the commit + type: string + commit_time: + description: Time at which the changes were committed. + type: string + commit_id: + description: SHA id associated with the commit + type: string + branch: + description: Branch where changes were committed + type: string + required: + - author + - branch + - comment + - commit_id + - commit_time + - committer + type: object + CommiterType: + example: + email: email + username: username + properties: + email: + description: Email id of the committer + nullable: true + type: string + username: + description: Username of the committer + nullable: true + type: string + type: object + AuthorType: + example: + email: email + username: username + properties: + email: + description: Email id of the committer + nullable: true + type: string + username: + description: Username of the committer + nullable: true + type: string + type: object + ConnectionInput: + example: + identifier: identifier + data_warehouse_objects: + - schema: schema + database: database + column: column + table: table + - schema: schema + database: database + column: column + table: table + name_pattern: name_pattern + properties: + identifier: + description: Unique ID or name of the connection. + nullable: true + type: string + name_pattern: + description: A pattern to match case-insensitive name of the connection + object. User `%` for a wildcard match. + nullable: true + type: string + data_warehouse_objects: + description: "Filter options for databases, schemas, tables and columns." + items: + $ref: '#/components/schemas/DataWarehouseObjectInput' + nullable: true + type: array + type: object + DataWarehouseObjectInput: + example: + schema: schema + database: database + column: column + table: table + properties: + database: + description: Name of the database. + nullable: true + type: string + schema: + description: Name of the schema within the database. + nullable: true + type: string + table: + description: Name of the table within the schema. + nullable: true + type: string + column: + description: Name of the column within the table. + nullable: true + type: string + type: object + SortOptionInput: + properties: + field_name: + description: Name of the field to apply the sort on. + enum: + - NAME + - DISPLAY_NAME + - AUTHOR + - CREATED + - MODIFIED + - LAST_ACCESSED + - SYNCED + - VIEWS + - USER_STATE + - ROW_COUNT + nullable: true + type: string + order: + description: "Sort order : ASC(Ascending) or DESC(Descending)." + enum: + - ASC + - DESC + nullable: true + type: string + type: object + SearchConnectionResponse: + example: + data_warehouse_objects: + databases: + - schemas: + - tables: + - relationships: + - "{}" + - "{}" + columns: + - is_aggregate: is_aggregate + can_import: true + is_linked_active: true + name: name + data_type: data_type + selected: true + - is_aggregate: is_aggregate + can_import: true + is_linked_active: true + name: name + data_type: data_type + selected: true + name: name + description: description + type: type + selected: true + linked: true + - relationships: + - "{}" + - "{}" + columns: + - is_aggregate: is_aggregate + can_import: true + is_linked_active: true + name: name + data_type: data_type + selected: true + - is_aggregate: is_aggregate + can_import: true + is_linked_active: true + name: name + data_type: data_type + selected: true + name: name + description: description + type: type + selected: true + linked: true + name: name + - tables: + - relationships: + - "{}" + - "{}" + columns: + - is_aggregate: is_aggregate + can_import: true + is_linked_active: true + name: name + data_type: data_type + selected: true + - is_aggregate: is_aggregate + can_import: true + is_linked_active: true + name: name + data_type: data_type + selected: true + name: name + description: description + type: type + selected: true + linked: true + - relationships: + - "{}" + - "{}" + columns: + - is_aggregate: is_aggregate + can_import: true + is_linked_active: true + name: name + data_type: data_type + selected: true + - is_aggregate: is_aggregate + can_import: true + is_linked_active: true + name: name + data_type: data_type + selected: true + name: name + description: description + type: type + selected: true + linked: true + name: name + name: name + auto_created: true + - schemas: + - tables: + - relationships: + - "{}" + - "{}" + columns: + - is_aggregate: is_aggregate + can_import: true + is_linked_active: true + name: name + data_type: data_type + selected: true + - is_aggregate: is_aggregate + can_import: true + is_linked_active: true + name: name + data_type: data_type + selected: true + name: name + description: description + type: type + selected: true + linked: true + - relationships: + - "{}" + - "{}" + columns: + - is_aggregate: is_aggregate + can_import: true + is_linked_active: true + name: name + data_type: data_type + selected: true + - is_aggregate: is_aggregate + can_import: true + is_linked_active: true + name: name + data_type: data_type + selected: true + name: name + description: description + type: type + selected: true + linked: true + name: name + - tables: + - relationships: + - "{}" + - "{}" + columns: + - is_aggregate: is_aggregate + can_import: true + is_linked_active: true + name: name + data_type: data_type + selected: true + - is_aggregate: is_aggregate + can_import: true + is_linked_active: true + name: name + data_type: data_type + selected: true + name: name + description: description + type: type + selected: true + linked: true + - relationships: + - "{}" + - "{}" + columns: + - is_aggregate: is_aggregate + can_import: true + is_linked_active: true + name: name + data_type: data_type + selected: true + - is_aggregate: is_aggregate + can_import: true + is_linked_active: true + name: name + data_type: data_type + selected: true + name: name + description: description + type: type + selected: true + linked: true + name: name + name: name + auto_created: true + name: name + description: description + details: "{}" + id: id + data_warehouse_type: SNOWFLAKE + properties: + id: + description: Unique ID of the connection. + type: string + name: + description: Name of the connection. + type: string + description: + description: Description of the connection. + nullable: true + type: string + data_warehouse_type: + description: Type of data warehouse. + enum: + - SNOWFLAKE + - AMAZON_REDSHIFT + - GOOGLE_BIGQUERY + - AZURE_SYNAPSE + - TERADATA + - SAP_HANA + - STARBURST + - ORACLE_ADW + - DATABRICKS + - DENODO + - DREMIO + - TRINO + - PRESTO + - POSTGRES + - SQLSERVER + - MYSQL + - GENERIC_JDBC + - AMAZON_RDS_POSTGRESQL + - AMAZON_AURORA_POSTGRESQL + - AMAZON_RDS_MYSQL + - AMAZON_AURORA_MYSQL + - LOOKER + - AMAZON_ATHENA + - SINGLESTORE + - GCP_SQLSERVER + - GCP_ALLOYDB_POSTGRESQL + - GCP_POSTGRESQL + - GCP_MYSQL + - MODE + - GOOGLE_SHEETS + - FALCON + - FALCON_ONPREM + - CLICKHOUSE + - IOMETE + type: string + data_warehouse_objects: + $ref: '#/components/schemas/DataWarehouseObjects' + details: + description: Details of the connection. + nullable: true + type: object + required: + - data_warehouse_type + - id + - name + type: object + DataWarehouseObjects: + example: + databases: + - schemas: + - tables: + - relationships: + - "{}" + - "{}" + columns: + - is_aggregate: is_aggregate + can_import: true + is_linked_active: true + name: name + data_type: data_type + selected: true + - is_aggregate: is_aggregate + can_import: true + is_linked_active: true + name: name + data_type: data_type + selected: true + name: name + description: description + type: type + selected: true + linked: true + - relationships: + - "{}" + - "{}" + columns: + - is_aggregate: is_aggregate + can_import: true + is_linked_active: true + name: name + data_type: data_type + selected: true + - is_aggregate: is_aggregate + can_import: true + is_linked_active: true + name: name + data_type: data_type + selected: true + name: name + description: description + type: type + selected: true + linked: true + name: name + - tables: + - relationships: + - "{}" + - "{}" + columns: + - is_aggregate: is_aggregate + can_import: true + is_linked_active: true + name: name + data_type: data_type + selected: true + - is_aggregate: is_aggregate + can_import: true + is_linked_active: true + name: name + data_type: data_type + selected: true + name: name + description: description + type: type + selected: true + linked: true + - relationships: + - "{}" + - "{}" + columns: + - is_aggregate: is_aggregate + can_import: true + is_linked_active: true + name: name + data_type: data_type + selected: true + - is_aggregate: is_aggregate + can_import: true + is_linked_active: true + name: name + data_type: data_type + selected: true + name: name + description: description + type: type + selected: true + linked: true + name: name + name: name + auto_created: true + - schemas: + - tables: + - relationships: + - "{}" + - "{}" + columns: + - is_aggregate: is_aggregate + can_import: true + is_linked_active: true + name: name + data_type: data_type + selected: true + - is_aggregate: is_aggregate + can_import: true + is_linked_active: true + name: name + data_type: data_type + selected: true + name: name + description: description + type: type + selected: true + linked: true + - relationships: + - "{}" + - "{}" + columns: + - is_aggregate: is_aggregate + can_import: true + is_linked_active: true + name: name + data_type: data_type + selected: true + - is_aggregate: is_aggregate + can_import: true + is_linked_active: true + name: name + data_type: data_type + selected: true + name: name + description: description + type: type + selected: true + linked: true + name: name + - tables: + - relationships: + - "{}" + - "{}" + columns: + - is_aggregate: is_aggregate + can_import: true + is_linked_active: true + name: name + data_type: data_type + selected: true + - is_aggregate: is_aggregate + can_import: true + is_linked_active: true + name: name + data_type: data_type + selected: true + name: name + description: description + type: type + selected: true + linked: true + - relationships: + - "{}" + - "{}" + columns: + - is_aggregate: is_aggregate + can_import: true + is_linked_active: true + name: name + data_type: data_type + selected: true + - is_aggregate: is_aggregate + can_import: true + is_linked_active: true + name: name + data_type: data_type + selected: true + name: name + description: description + type: type + selected: true + linked: true + name: name + name: name + auto_created: true + properties: + databases: + description: Databases of the connection. + items: + $ref: '#/components/schemas/Database' + type: array + required: + - databases + type: object + Database: + example: + schemas: + - tables: + - relationships: + - "{}" + - "{}" + columns: + - is_aggregate: is_aggregate + can_import: true + is_linked_active: true + name: name + data_type: data_type + selected: true + - is_aggregate: is_aggregate + can_import: true + is_linked_active: true + name: name + data_type: data_type + selected: true + name: name + description: description + type: type + selected: true + linked: true + - relationships: + - "{}" + - "{}" + columns: + - is_aggregate: is_aggregate + can_import: true + is_linked_active: true + name: name + data_type: data_type + selected: true + - is_aggregate: is_aggregate + can_import: true + is_linked_active: true + name: name + data_type: data_type + selected: true + name: name + description: description + type: type + selected: true + linked: true + name: name + - tables: + - relationships: + - "{}" + - "{}" + columns: + - is_aggregate: is_aggregate + can_import: true + is_linked_active: true + name: name + data_type: data_type + selected: true + - is_aggregate: is_aggregate + can_import: true + is_linked_active: true + name: name + data_type: data_type + selected: true + name: name + description: description + type: type + selected: true + linked: true + - relationships: + - "{}" + - "{}" + columns: + - is_aggregate: is_aggregate + can_import: true + is_linked_active: true + name: name + data_type: data_type + selected: true + - is_aggregate: is_aggregate + can_import: true + is_linked_active: true + name: name + data_type: data_type + selected: true + name: name + description: description + type: type + selected: true + linked: true + name: name + name: name + auto_created: true + properties: + name: + description: Name of the database. + type: string + schemas: + description: Schemas of the database. + items: + $ref: '#/components/schemas/SchemaObject' + nullable: true + type: array + auto_created: + description: Determines if the object is auto created. + nullable: true + type: boolean + required: + - name + type: object + SchemaObject: + example: + tables: + - relationships: + - "{}" + - "{}" + columns: + - is_aggregate: is_aggregate + can_import: true + is_linked_active: true + name: name + data_type: data_type + selected: true + - is_aggregate: is_aggregate + can_import: true + is_linked_active: true + name: name + data_type: data_type + selected: true + name: name + description: description + type: type + selected: true + linked: true + - relationships: + - "{}" + - "{}" + columns: + - is_aggregate: is_aggregate + can_import: true + is_linked_active: true + name: name + data_type: data_type + selected: true + - is_aggregate: is_aggregate + can_import: true + is_linked_active: true + name: name + data_type: data_type + selected: true + name: name + description: description + type: type + selected: true + linked: true + name: name + properties: + name: + description: Name of the schema. + type: string + tables: + description: Tables in the schema. + items: + $ref: '#/components/schemas/Table' + nullable: true + type: array + required: + - name + type: object + Table: + example: + relationships: + - "{}" + - "{}" + columns: + - is_aggregate: is_aggregate + can_import: true + is_linked_active: true + name: name + data_type: data_type + selected: true + - is_aggregate: is_aggregate + can_import: true + is_linked_active: true + name: name + data_type: data_type + selected: true + name: name + description: description + type: type + selected: true + linked: true + properties: + name: + description: Name of the table. + type: string + columns: + description: Columns of the table. + items: + $ref: '#/components/schemas/Column' + nullable: true + type: array + type: + description: Type of table. Either view or table + nullable: true + type: string + description: + description: Description of the table + nullable: true + type: string + selected: + description: Determines if the table is selected + nullable: true + type: boolean + linked: + description: Determines if the table is linked + nullable: true + type: boolean + relationships: + description: List of relationships for the table + items: + type: object + nullable: true + type: array + required: + - name + type: object + Column: + example: + is_aggregate: is_aggregate + can_import: true + is_linked_active: true + name: name + data_type: data_type + selected: true + properties: + name: + description: Name of the column + type: string + data_type: + description: Data type of the column + type: string + is_aggregate: + description: Determines if the column schema is an aggregate + nullable: true + type: string + can_import: + description: Determines if the column schema can be imported + nullable: true + type: boolean + selected: + description: Determines if the table is selected + nullable: true + type: boolean + is_linked_active: + description: Determines if the table is linked + nullable: true + type: boolean + required: + - data_type + - name + type: object + SearchRoleResponse: + description: Response for search role api should handle hidden privileges as + well. + example: + privileges: + - UNKNOWN + - UNKNOWN + groups_assigned_count: 0 + creation_time_in_millis: "{}" + hidden: true + deprecated: true + description: description + groups: + - name: name + id: id + - name: name + id: id + permission: READ_ONLY + modification_time_in_millis: "{}" + external: true + deleted: true + name: name + modifier_id: modifier_id + shared_via_connection: true + id: id + orgs: + - name: name + id: id + - name: name + id: id + author_id: author_id + properties: + id: + description: Unique Id of the role. + type: string + name: + description: Name of the role + type: string + description: + description: Description of the role + type: string + groups_assigned_count: + description: number of groups assigned with this role + format: int32 + nullable: true + type: integer + orgs: + description: Orgs in which role exists. + items: + $ref: '#/components/schemas/GenericInfo' + nullable: true + type: array + groups: + description: Details of groups assigned with this role + items: + $ref: '#/components/schemas/GenericInfo' + nullable: true + type: array + privileges: + description: Privileges granted to the role. + items: + enum: + - UNKNOWN + - ADMINISTRATION + - AUTHORING + - USERDATAUPLOADING + - DATADOWNLOADING + - USERMANAGEMENT + - SECURITYMANAGEMENT + - LOGICALMODELING + - DATAMANAGEMENT + - TAGMANAGEMENT + - SHAREWITHALL + - SYSTEMMANAGEMENT + - JOBSCHEDULING + - A3ANALYSIS + - EXPERIMENTALFEATUREPRIVILEGE + - BYPASSRLS + - RANALYSIS + - DISABLE_PINBOARD_CREATION + - DEVELOPER + - APPLICATION_ADMINISTRATION + - USER_ADMINISTRATION + - GROUP_ADMINISTRATION + - BACKUP_ADMINISTRATION + - SYSTEM_INFO_ADMINISTRATION + - ENABLESPOTAPPCREATION + - SYNCMANAGEMENT + - ORG_ADMINISTRATION + - ROLE_ADMINISTRATION + - AUTHENTICATION_ADMINISTRATION + - BILLING_INFO_ADMINISTRATION + - PREVIEW_THOUGHTSPOT_SAGE + - LIVEBOARD_VERIFIER + - CAN_MANAGE_CUSTOM_CALENDAR + - CAN_CREATE_OR_EDIT_CONNECTIONS + - CAN_CONFIGURE_CONNECTIONS + - CAN_MANAGE_WORKSHEET_VIEWS_TABLES + - CAN_MANAGE_VERSION_CONTROL + - THIRDPARTY_ANALYSIS + - CONTROL_TRUSTED_AUTH + - CAN_CREATE_CATALOG + - ALLOW_NON_EMBED_FULL_APP_ACCESS + - CAN_ACCESS_ANALYST_STUDIO + - CAN_MANAGE_ANALYST_STUDIO + - CAN_VIEW_FOLDERS + - CAN_MODIDY_FOLDERS + - CAN_MANAGE_VARIABLES + - CAN_MANAGE_AGENTSPOT + - CAN_ACCESS_AGENTSPOT + - PREVIEW_DOCUMENT_SEARCH + - CAN_SETUP_VERSION_CONTROL + - CAN_MANAGE_WEBHOOKS + - CAN_DOWNLOAD_VISUALS + - CAN_DOWNLOAD_DETAILED_DATA + - CAN_USE_SPOTTER + type: string + type: array + permission: + description: Permission details of the Role + enum: + - READ_ONLY + - MODIFY + - NO_ACCESS + nullable: true + type: string + author_id: + description: Unique identifier of author of the role. + nullable: true + type: string + modifier_id: + description: Unique identifier of modifier of the role. + nullable: true + type: string + creation_time_in_millis: + description: Creation time of the role in milliseconds. + nullable: true + type: object + modification_time_in_millis: + description: Last modified time of the role in milliseconds. + nullable: true + type: object + deleted: + description: Indicates whether the role is deleted. + nullable: true + type: boolean + deprecated: + description: Indicates whether the role is deprecated. + nullable: true + type: boolean + external: + description: Indicates whether the role is external. + nullable: true + type: boolean + hidden: + description: Indicates whether the role is hidden. + nullable: true + type: boolean + shared_via_connection: + description: Indicates whether the role is shared via connection + nullable: true + type: boolean + required: + - description + - id + - name + - privileges + type: object + Default_Action_Config_Search_Input: + description: "Default Custom action configuration. This includes the custom\ + \ action's visibility across all visualizations and Answers. By default, a\ + \ custom action is added to all visualizations and Answers." + properties: + visibility: + description: "Custom action is available on all visualizations. Earlier\ + \ naming convention: LOCAL/GLOBAL. TRUE signifies GLOBAL for backward\ + \ compatibility." + nullable: true + type: boolean + type: object + ResponseCustomAction: + description: Custom action details + example: + action_details: + CALLBACK: + reference: reference + URL: + reference: reference + parameters: + - value: value + key: key + - value: value + key: key + url: url + authentication: + API_Key: + value: value + key: key + Basic_Auth: + password: password + username: username + Bearer_Token: Bearer_Token + No_Auth: No_Auth + metadata_association: + - identifier: identifier + type: type + action_config: + visibility: true + position: position + - identifier: identifier + type: type + action_config: + visibility: true + position: position + default_action_config: + visibility: true + name: name + id: id + user_groups: + - name: name + id: id + - name: name + id: id + properties: + action_details: + $ref: '#/components/schemas/Action_details' + default_action_config: + $ref: '#/components/schemas/Default_action_config' + id: + description: Unique Id of the custom action. + type: string + metadata_association: + description: Metadata objects to assign the the custom action to. + items: + $ref: '#/components/schemas/Metadata_Association_Item' + nullable: true + type: array + name: + description: Unique name of the custom action. + type: string + user_groups: + description: Unique ID or name of the User groups which are associated with + the custom action. + items: + $ref: '#/components/schemas/Object_ID_And_Name' + nullable: true + type: array + required: + - action_details + - default_action_config + - id + - name + type: object + Action_details: + description: Type and Configuration for Custom Actions + example: + CALLBACK: + reference: reference + URL: + reference: reference + parameters: + - value: value + key: key + - value: value + key: key + url: url + authentication: + API_Key: + value: value + key: key + Basic_Auth: + password: password + username: username + Bearer_Token: Bearer_Token + No_Auth: No_Auth + properties: + CALLBACK: + $ref: '#/components/schemas/CALLBACK' + URL: + $ref: '#/components/schemas/URL' + type: object + CALLBACK: + description: CALLBACK Custom Action Type + example: + reference: reference + properties: + reference: + description: "Reference name of the SDK. By default, the value will be set\ + \ to action name." + nullable: true + type: string + type: object + URL: + description: URL Custom Action Type + example: + reference: reference + parameters: + - value: value + key: key + - value: value + key: key + url: url + authentication: + API_Key: + value: value + key: key + Basic_Auth: + password: password + username: username + Bearer_Token: Bearer_Token + No_Auth: No_Auth + properties: + authentication: + $ref: '#/components/schemas/Authentication' + parameters: + description: Query parameters for url. + items: + $ref: '#/components/schemas/ParametersListItem' + nullable: true + type: array + url: + description: Request Url for the Custom action. + type: string + reference: + description: "Reference name of the SDK. By default, the value will be set\ + \ to action name." + nullable: true + type: string + required: + - url + type: object + Authentication: + description: Authorization type for the custom action. + example: + API_Key: + value: value + key: key + Basic_Auth: + password: password + username: username + Bearer_Token: Bearer_Token + No_Auth: No_Auth + properties: + API_Key: + $ref: '#/components/schemas/API_Key' + Basic_Auth: + $ref: '#/components/schemas/Basic_Auth' + Bearer_Token: + description: Bearer tokens enable requests to authenticate using an access + key. + nullable: true + type: string + No_Auth: + description: No authorization. If your request doesn't require authorization. + nullable: true + type: string + type: object + API_Key: + description: "With API key auth, you send a key-value pair to the API either\ + \ in the request headers or query parameters." + example: + value: value + key: key + properties: + key: + description: Enter your key name + nullable: true + type: string + value: + description: Enter you key value + nullable: true + type: string + type: object + Basic_Auth: + description: "Basic Auth: Basic authentication involves sending a verified username\ + \ and password with your request." + example: + password: password + username: username + properties: + password: + description: Password for the basic authentication + nullable: true + type: string + username: + description: Username for the basic authentication + nullable: true + type: string + type: object + ParametersListItem: + example: + value: value + key: key + properties: + key: + description: Key for the url query parameter + nullable: true + type: string + value: + description: Value for the url query parameter + nullable: true + type: string + type: object + Default_action_config: + description: "Default Custom action configuration. This includes the custom\ + \ action's visibility across all visualizations and Answers. By default, a\ + \ custom action is added to all visualizations and Answers." + example: + visibility: true + properties: + visibility: + description: "Custom action is available on all visualizations. Earlier\ + \ , the naming convention: LOCAL/GLOBAL. TRUE signifies GLOBAL for backward\ + \ compatibility." + nullable: true + type: boolean + type: object + Metadata_Association_Item: + example: + identifier: identifier + type: type + action_config: + visibility: true + position: position + properties: + action_config: + $ref: '#/components/schemas/Action_config' + identifier: + description: Unique ID or name of the metadata. + type: string + type: + description: " Type of metadata.\n \n\nRequired if the name of the object\ + \ is set as the identifier. This attribute is optional when the object\ + \ GUID is specified as the identifier." + type: string + required: + - action_config + - identifier + - type + type: object + Action_config: + description: Specify that the association is enabled for the metadata object + example: + visibility: true + position: position + properties: + position: + description: "Position of the Custom action on the Metadata object. Earlier\ + \ naming convention: context." + nullable: true + type: string + visibility: + description: "Visibility of the metadata association with custom action.\ + \ Earlier naming convention: enabled" + nullable: true + type: boolean + type: object + CustomActionMetadataTypeInput: + description: MetadataType InputType used in Custom Action API's + example: + identifier: identifier + type: VISUALIZATION + properties: + type: + description: " Type of metadata object.\n \n\nRequired if the name of\ + \ the object is set as the identifier. This attribute is optional when\ + \ the object GUID is specified as the identifier." + enum: + - VISUALIZATION + - ANSWER + - WORKSHEET + nullable: true + type: string + identifier: + description: Unique ID or name of the metadata object. + type: string + required: + - identifier + type: object + MetadataContext: + properties: + data_source_identifiers: + description: List of data_source_identifiers to provide context for breaking + down user query into analytical queries that can be run on them. + items: + type: string + nullable: true + type: array + answer_identifiers: + description: List of answer unique identifiers (GUIDs) whose data will be + used to guide the response. + items: + type: string + nullable: true + type: array + conversation_identifier: + description: Unique identifier to denote current conversation. + nullable: true + type: string + liveboard_identifiers: + description: List of liveboard unique identifiers (GUIDs) whose data will + be used to guide the response. + items: + type: string + nullable: true + type: array + type: object + AIContext: + properties: + instructions: + description: User specific text instructions sent to AI system for processing + the query. + items: + type: string + nullable: true + type: array + content: + description: "User provided content like text data, csv data as a string\ + \ message to provide context & potentially improve the quality of the\ + \ response." + items: + type: string + nullable: true + type: array + type: object + eureka_GetRelevantQuestionsResponse: + example: + relevant_questions: + - data_source_identifier: data_source_identifier + query: query + data_source_name: data_source_name + - data_source_identifier: data_source_identifier + query: query + data_source_name: data_source_name + properties: + relevant_questions: + description: List of relevant questions that can be run on their respective + data sources. + items: + $ref: '#/components/schemas/eureka_RelevantQuestion' + nullable: true + type: array + type: object + eureka_RelevantQuestion: + example: + data_source_identifier: data_source_identifier + query: query + data_source_name: data_source_name + properties: + query: + description: NL query that can be run using spotter aka natural language + search to get an AI generated answer. + nullable: true + type: string + data_source_identifier: + description: Unique identifier of the data source on which this query can + be run on. + nullable: true + type: string + data_source_name: + description: Display name of the data source on which this query can be + run on. + nullable: true + type: string + type: object + Input_eureka_NLSRequest: + properties: + agentVersion: + description: "Cluster version like 10.4.0.cl, 10.5.0.cl, so on." + format: int32 + nullable: true + type: integer + bypassCache: + description: "If true, results are not returned from cache & calculated\ + \ every time. Can incur high costs & latency." + nullable: true + type: boolean + instructions: + description: User specific instructions for processing the @query. + items: + type: string + nullable: true + type: array + query: + description: User query which is a topical/goal oriented question that needs + to be broken down into smaller simple analytical questions. + nullable: true + type: string + type: object + eureka_DecomposeQueryResponse: + example: + decomposedQueryResponse: + decomposedQueries: + - query: query + worksheetId: worksheetId + worksheetName: worksheetName + - query: query + worksheetId: worksheetId + worksheetName: worksheetName + properties: + decomposedQueryResponse: + $ref: '#/components/schemas/eureka_LLMDecomposeQueryResponse' + type: object + eureka_LLMDecomposeQueryResponse: + example: + decomposedQueries: + - query: query + worksheetId: worksheetId + worksheetName: worksheetName + - query: query + worksheetId: worksheetId + worksheetName: worksheetName + properties: + decomposedQueries: + description: List of analytical questions that can be run on their respective + worksheet/data sources. + items: + $ref: '#/components/schemas/eureka_LLMSuggestedQuery' + nullable: true + type: array + type: object + eureka_LLMSuggestedQuery: + example: + query: query + worksheetId: worksheetId + worksheetName: worksheetName + properties: + query: + description: NL query that can be run using spotter aka natural language + search to get an AI generated answer. + nullable: true + type: string + worksheetId: + description: Unique identifier of the worksheet on which this query can + be run on. + nullable: true + type: string + worksheetName: + description: Display name of the worksheet on which this query can be run + on. + nullable: true + type: string + type: object + eureka_DataSourceSuggestionResponse: + example: + data_sources: + - confidence: 0.8008282 + reasoning: reasoning + details: + data_source_identifier: data_source_identifier + description: description + data_source_name: data_source_name + - confidence: 0.8008282 + reasoning: reasoning + details: + data_source_identifier: data_source_identifier + description: description + data_source_name: data_source_name + properties: + data_sources: + description: List of data sources suggested. + items: + $ref: '#/components/schemas/DataSource' + nullable: true + type: array + type: object + DataSource: + example: + confidence: 0.8008282 + reasoning: reasoning + details: + data_source_identifier: data_source_identifier + description: description + data_source_name: data_source_name + properties: + confidence: + description: Confidence score for the data source suggestion. + format: float + nullable: true + type: number + details: + $ref: '#/components/schemas/EntityHeader' + reasoning: + description: LLM reasoning for the data source. + nullable: true + type: string + type: object + EntityHeader: + example: + data_source_identifier: data_source_identifier + description: description + data_source_name: data_source_name + properties: + description: + description: Description of the data source. + nullable: true + type: string + data_source_name: + description: Display name of the data source. + nullable: true + type: string + data_source_identifier: + description: Unique identifier of the data source. + nullable: true + type: string + type: object + eureka_GetNLInstructionsResponse: + example: + nl_instructions_info: + - instructions: + - instructions + - instructions + scope: GLOBAL + - instructions: + - instructions + - instructions + scope: GLOBAL + properties: + nl_instructions_info: + description: List of NL instructions with their scopes. + items: + $ref: '#/components/schemas/NLInstructionsInfo' + type: array + required: + - nl_instructions_info + type: object + NLInstructionsInfo: + example: + instructions: + - instructions + - instructions + scope: GLOBAL + properties: + instructions: + description: User instructions for natural language processing. + items: + type: string + type: array + scope: + description: Scope of the instruction. + enum: + - GLOBAL + type: string + required: + - instructions + - scope + type: object + RiseGQLArgWrapper: + properties: + name: + type: string + type: + type: string + required: + - name + - type + type: object + VariableDetailInput: + description: Input for variable details in search + example: + identifier: identifier + name_pattern: name_pattern + type: CONNECTION_PROPERTY + properties: + identifier: + description: Unique ID or name of the variable + nullable: true + type: string + type: + description: Type of variable + enum: + - CONNECTION_PROPERTY + - TABLE_MAPPING + - CONNECTION_PROPERTY_PER_PRINCIPAL + - FORMULA_VARIABLE + - USER_PROPERTY + nullable: true + type: string + name_pattern: + description: A pattern to match case-insensitive name of the variable. User + % for a wildcard match + nullable: true + type: string + type: object + ValueScopeInput: + description: Input for filtering variable values by scope in search operations + example: + principal_identifier: principal_identifier + model_identifier: model_identifier + org_identifier: org_identifier + principal_type: USER + properties: + org_identifier: + description: The unique name of the org + nullable: true + type: string + principal_type: + description: "Type of principal to filter by. Use USER to filter values\ + \ assigned to specific users, or USER_GROUP to filter values assigned\ + \ to groups." + enum: + - USER + - USER_GROUP + nullable: true + type: string + principal_identifier: + description: Unique ID or name of the principal + nullable: true + type: string + model_identifier: + description: Unique ID or name of the model to filter by. Applicable only + for FORMULA_VARIABLE type. + nullable: true + type: string + type: object + Variable: + description: Variable object + example: + variable_type: CONNECTION_PROPERTY + org: + name: name + id: 6 + values: + - principal_identifier: principal_identifier + model_identifier: model_identifier + org_identifier: org_identifier + value_list: + - value_list + - value_list + principal_type: USER + priority: 0 + value: value + - principal_identifier: principal_identifier + model_identifier: model_identifier + org_identifier: org_identifier + value_list: + - value_list + - value_list + principal_type: USER + priority: 0 + value: value + name: name + id: id + sensitive: true + properties: + id: + description: Unique identifier of the variable + type: string + name: + description: Name of the variable + type: string + variable_type: + description: Type of the variable + enum: + - CONNECTION_PROPERTY + - TABLE_MAPPING + - CONNECTION_PROPERTY_PER_PRINCIPAL + - FORMULA_VARIABLE + - USER_PROPERTY + nullable: true + type: string + sensitive: + description: If the variable is sensitive + nullable: true + type: boolean + values: + description: Values of the variable + items: + $ref: '#/components/schemas/VariableValue' + nullable: true + type: array + org: + $ref: '#/components/schemas/VariableOrgInfo' + required: + - id + - name + type: object + VariableValue: + example: + principal_identifier: principal_identifier + model_identifier: model_identifier + org_identifier: org_identifier + value_list: + - value_list + - value_list + principal_type: USER + priority: 0 + value: value + properties: + value: + description: The value of the variable + nullable: true + type: string + value_list: + description: The value of the variable if it is a list type + items: + type: string + nullable: true + type: array + org_identifier: + description: The unique name of the org + type: string + principal_type: + description: "Type of principal to which this value applies. Use USER to\ + \ assign the value to a specific user, or USER_GROUP to assign it to a\ + \ group." + enum: + - USER + - USER_GROUP + nullable: true + type: string + principal_identifier: + description: Unique ID or name of the principal + nullable: true + type: string + model_identifier: + description: "Unique ID of the model \n Version: 26.3.0.cl or later\n" + nullable: true + type: string + priority: + description: "The priority assigned to this value. If there are 2 matching\ + \ values, the one with the higher priority will be picked." + format: int32 + nullable: true + type: integer + required: + - org_identifier + type: object + VariableOrgInfo: + example: + name: name + id: 6 + properties: + id: + description: ID of the Org. + format: int32 + type: integer + name: + description: Name of the Org. + type: string + required: + - id + - name + type: object + SortOption: + properties: + field_name: + default: DEFAULT + description: Name of the field to apply the sort on. + enum: + - DEFAULT + - NAME + - DISPLAY_NAME + - AUTHOR + - CREATED + - MODIFIED + nullable: true + type: string + order: + default: ASC + description: "Sort order : ASC(Ascending) or DESC(Descending)." + enum: + - ASC + - DESC + nullable: true + type: string + type: object + CalendarResponse: + example: + connection_name: connection_name + author_name: author_name + calendar_id: calendar_id + connection_id: connection_id + modification_time_in_millis: modification_time_in_millis + calendar_name: calendar_name + data_warehouse_type: data_warehouse_type + properties: + calendar_name: + description: Name of the calendar + nullable: true + type: string + connection_name: + description: Name of the connection + nullable: true + type: string + data_warehouse_type: + description: Type of data warehouse + nullable: true + type: string + modification_time_in_millis: + description: Last modification time in milliseconds + nullable: true + type: string + author_name: + description: Name of the author who created the calendar + nullable: true + type: string + connection_id: + description: Unique ID of the connection + nullable: true + type: string + calendar_id: + description: Unique ID of the calendar + nullable: true + type: string + type: object + ConnectionConfigurationResponse: + example: + policy_type: NO_POLICY + policy_process_options: + impersonate_user: impersonate_user + configuration_identifier: configuration_identifier + configuration: "{}" + name: name + same_as_parent: true + description: description + disabled: true + policy_principals: + - name: name + id: id + type: type + - name: name + id: id + type: type + data_warehouse_type: SNOWFLAKE + policy_processes: + - SAGE_INDEXING + - SAGE_INDEXING + properties: + configuration_identifier: + nullable: true + type: string + name: + nullable: true + type: string + description: + nullable: true + type: string + configuration: + nullable: true + type: object + policy_principals: + items: + $ref: '#/components/schemas/UserPrincipal' + nullable: true + type: array + policy_processes: + items: + enum: + - SAGE_INDEXING + - ROW_COUNT_STATS + type: string + nullable: true + type: array + disabled: + nullable: true + type: boolean + data_warehouse_type: + enum: + - SNOWFLAKE + - AMAZON_REDSHIFT + - GOOGLE_BIGQUERY + - AZURE_SYNAPSE + - TERADATA + - SAP_HANA + - STARBURST + - ORACLE_ADW + - DATABRICKS + - DENODO + - DREMIO + - TRINO + - PRESTO + - POSTGRES + - SQLSERVER + - MYSQL + - GENERIC_JDBC + - AMAZON_RDS_POSTGRESQL + - AMAZON_AURORA_POSTGRESQL + - AMAZON_RDS_MYSQL + - AMAZON_AURORA_MYSQL + - LOOKER + - AMAZON_ATHENA + - SINGLESTORE + - GCP_SQLSERVER + - GCP_ALLOYDB_POSTGRESQL + - GCP_POSTGRESQL + - GCP_MYSQL + - MODE + - GOOGLE_SHEETS + - FALCON + - FALCON_ONPREM + - CLICKHOUSE + - IOMETE + nullable: true + type: string + policy_type: + enum: + - NO_POLICY + - PRINCIPALS + - PROCESSES + nullable: true + type: string + same_as_parent: + nullable: true + type: boolean + policy_process_options: + $ref: '#/components/schemas/PolicyProcessOptions' + type: object + UserPrincipal: + example: + name: name + id: id + type: type + properties: + id: + nullable: true + type: string + name: + nullable: true + type: string + type: + nullable: true + type: string + type: object + PolicyProcessOptions: + example: + impersonate_user: impersonate_user + properties: + impersonate_user: + nullable: true + type: string + type: object + WebhookSortOptionsInput: + properties: + field_name: + default: CREATED + description: Name of the field to apply the sort on. + enum: + - CREATED + - MODIFIED + - NAME + nullable: true + type: string + order: + default: DESC + description: "Sort order: ASC (Ascending) or DESC (Descending)." + enum: + - ASC + - DESC + nullable: true + type: string + type: object + WebhookSearchResponse: + example: + pagination: + total_count: 1 + record_size: 6 + has_more: true + record_offset: 0 + webhooks: + - additional_headers: + - value: value + key: key + - value: value + key: key + creation_time_in_millis: 0.8008282 + org: + name: name + id: id + signature_verification: + header: header + secret: secret + type: HMAC_SHA256 + algorithm: SHA256 + description: description + modification_time_in_millis: 6.0274563 + last_modified_by: + name: name + id: id + created_by: + name: name + id: id + url: url + storage_destination: + storage_type: AWS_S3 + storage_config: + aws_s3_config: + role_arn: role_arn + bucket_name: bucket_name + external_id: external_id + region: region + path_prefix: path_prefix + url_params: "{}" + name: name + id: id + events: + - LIVEBOARD_SCHEDULE + - LIVEBOARD_SCHEDULE + authentication: + OAUTH2: + authorization_url: authorization_url + client_secret: client_secret + client_id: client_id + API_KEY: + value: value + key: key + BEARER_TOKEN: BEARER_TOKEN + BASIC_AUTH: + password: password + username: username + - additional_headers: + - value: value + key: key + - value: value + key: key + creation_time_in_millis: 0.8008282 + org: + name: name + id: id + signature_verification: + header: header + secret: secret + type: HMAC_SHA256 + algorithm: SHA256 + description: description + modification_time_in_millis: 6.0274563 + last_modified_by: + name: name + id: id + created_by: + name: name + id: id + url: url + storage_destination: + storage_type: AWS_S3 + storage_config: + aws_s3_config: + role_arn: role_arn + bucket_name: bucket_name + external_id: external_id + region: region + path_prefix: path_prefix + url_params: "{}" + name: name + id: id + events: + - LIVEBOARD_SCHEDULE + - LIVEBOARD_SCHEDULE + authentication: + OAUTH2: + authorization_url: authorization_url + client_secret: client_secret + client_id: client_id + API_KEY: + value: value + key: key + BEARER_TOKEN: BEARER_TOKEN + BASIC_AUTH: + password: password + username: username + properties: + webhooks: + description: List of webhook configurations matching the search criteria. + items: + $ref: '#/components/schemas/WebhookResponse' + type: array + pagination: + $ref: '#/components/schemas/WebhookPagination' + required: + - pagination + - webhooks + type: object + WebhookResponse: + example: + additional_headers: + - value: value + key: key + - value: value + key: key + creation_time_in_millis: 0.8008282 + org: + name: name + id: id + signature_verification: + header: header + secret: secret + type: HMAC_SHA256 + algorithm: SHA256 + description: description + modification_time_in_millis: 6.0274563 + last_modified_by: + name: name + id: id + created_by: + name: name + id: id + url: url + storage_destination: + storage_type: AWS_S3 + storage_config: + aws_s3_config: + role_arn: role_arn + bucket_name: bucket_name + external_id: external_id + region: region + path_prefix: path_prefix + url_params: "{}" + name: name + id: id + events: + - LIVEBOARD_SCHEDULE + - LIVEBOARD_SCHEDULE + authentication: + OAUTH2: + authorization_url: authorization_url + client_secret: client_secret + client_id: client_id + API_KEY: + value: value + key: key + BEARER_TOKEN: BEARER_TOKEN + BASIC_AUTH: + password: password + username: username + properties: + id: + description: Unique identifier of the webhook configuration. + type: string + name: + description: Name of the webhook configuration. + type: string + description: + description: Description of the webhook configuration. + nullable: true + type: string + org: + $ref: '#/components/schemas/WebhookOrg' + url: + description: The webhook endpoint URL. + type: string + url_params: + description: Additional URL parameters as key-value pairs. + nullable: true + type: object + events: + description: List of events this webhook subscribes to. + items: + enum: + - LIVEBOARD_SCHEDULE + type: string + type: array + authentication: + $ref: '#/components/schemas/WebhookAuthentication' + signature_verification: + $ref: '#/components/schemas/WebhookSignatureVerification' + additional_headers: + description: "Additional headers as an array of key-value pairs. \n Version:\ + \ 26.4.0.cl or later\n" + items: + $ref: '#/components/schemas/WebhookKeyValuePair' + nullable: true + type: array + creation_time_in_millis: + description: Creation time of the webhook configuration in milliseconds. + format: float + type: number + modification_time_in_millis: + description: Last modified time of the webhook configuration in milliseconds. + format: float + type: number + created_by: + $ref: '#/components/schemas/WebhookUser' + last_modified_by: + $ref: '#/components/schemas/WebhookUser' + storage_destination: + $ref: '#/components/schemas/StorageDestination' + required: + - creation_time_in_millis + - events + - id + - modification_time_in_millis + - name + - url + type: object + WebhookOrg: + example: + name: name + id: id + properties: + id: + description: Unique identifier of the org. + type: string + name: + description: Name of the org. + type: string + required: + - id + - name + type: object + WebhookAuthentication: + example: + OAUTH2: + authorization_url: authorization_url + client_secret: client_secret + client_id: client_id + API_KEY: + value: value + key: key + BEARER_TOKEN: BEARER_TOKEN + BASIC_AUTH: + password: password + username: username + properties: + API_KEY: + $ref: '#/components/schemas/WebhookAuthApiKey' + BASIC_AUTH: + $ref: '#/components/schemas/WebhookAuthBasicAuth' + BEARER_TOKEN: + description: Redacted Bearer token authentication configuration. + nullable: true + type: string + OAUTH2: + $ref: '#/components/schemas/WebhookAuthOAuth2' + type: object + WebhookAuthApiKey: + example: + value: value + key: key + properties: + key: + description: The header or query parameter name for the API key. + type: string + value: + description: The API key value. + type: string + required: + - key + - value + type: object + WebhookAuthBasicAuth: + example: + password: password + username: username + properties: + username: + description: Username for basic authentication. + type: string + password: + description: Password for basic authentication. + type: string + required: + - password + - username + type: object + WebhookAuthOAuth2: + example: + authorization_url: authorization_url + client_secret: client_secret + client_id: client_id + properties: + authorization_url: + description: OAuth2 authorization server URL. + type: string + client_id: + description: OAuth2 client identifier. + type: string + client_secret: + description: OAuth2 client secret key. + type: string + required: + - authorization_url + - client_id + - client_secret + type: object + WebhookSignatureVerification: + example: + header: header + secret: secret + type: HMAC_SHA256 + algorithm: SHA256 + properties: + type: + description: Signature verification method type. + enum: + - HMAC_SHA256 + type: string + header: + description: HTTP header where the signature is sent. + type: string + algorithm: + description: Hash algorithm used for signature verification. + enum: + - SHA256 + type: string + secret: + description: Shared secret used for HMAC signature generation. + type: string + required: + - algorithm + - header + - secret + - type + type: object + WebhookKeyValuePair: + description: Key-value pair for additional webhook headers. + example: + value: value + key: key + properties: + key: + description: Header name. + type: string + value: + description: Header value. + type: string + required: + - key + - value + type: object + WebhookUser: + example: + name: name + id: id + properties: + id: + description: Unique identifier of the user. + type: string + name: + description: Name of the user. + type: string + required: + - id + - name + type: object + StorageDestination: + description: Storage destination configuration for webhook payload delivery. + example: + storage_type: AWS_S3 + storage_config: + aws_s3_config: + role_arn: role_arn + bucket_name: bucket_name + external_id: external_id + region: region + path_prefix: path_prefix + properties: + storage_type: + description: "Type of storage destination (e.g., AWS_S3)." + enum: + - AWS_S3 + type: string + storage_config: + $ref: '#/components/schemas/StorageConfig' + required: + - storage_config + - storage_type + type: object + StorageConfig: + description: Storage configuration containing provider-specific settings. + example: + aws_s3_config: + role_arn: role_arn + bucket_name: bucket_name + external_id: external_id + region: region + path_prefix: path_prefix + properties: + aws_s3_config: + $ref: '#/components/schemas/AwsS3Config' + type: object + AwsS3Config: + description: AWS S3 storage configuration details. + example: + role_arn: role_arn + bucket_name: bucket_name + external_id: external_id + region: region + path_prefix: path_prefix + properties: + bucket_name: + description: Name of the S3 bucket where webhook payloads are stored. + type: string + region: + description: AWS region where the S3 bucket is located. + type: string + role_arn: + description: ARN of the IAM role used for S3 access. + type: string + external_id: + description: External ID for secure cross-account role assumption. + nullable: true + type: string + path_prefix: + description: Path prefix for organizing objects within the bucket. + nullable: true + type: string + required: + - bucket_name + - region + - role_arn + type: object + WebhookPagination: + example: + total_count: 1 + record_size: 6 + has_more: true + record_offset: 0 + properties: + record_offset: + description: The starting record number from where the records are included. + format: int32 + type: integer + record_size: + description: The number of records included in the response. + format: int32 + type: integer + total_count: + description: Total number of webhook configurations available. + format: int32 + type: integer + has_more: + description: Indicates whether more records are available beyond the current + response. + type: boolean + required: + - has_more + - record_offset + - record_size + - total_count + type: object + CollectionSearchResponse: + description: Response object for search collections operation. + example: + collections: + - author_name: author_name + metadata: + - identifiers: + - identifier: identifier + name: name + - identifier: identifier + name: name + type: type + - identifiers: + - identifier: identifier + name: name + - identifier: identifier + name: name + type: type + updated_at: updated_at + org: + identifier: identifier + name: name + name: name + description: description + created_at: created_at + id: id + author_id: author_id + - author_name: author_name + metadata: + - identifiers: + - identifier: identifier + name: name + - identifier: identifier + name: name + type: type + - identifiers: + - identifier: identifier + name: name + - identifier: identifier + name: name + type: type + updated_at: updated_at + org: + identifier: identifier + name: name + name: name + description: description + created_at: created_at + id: id + author_id: author_id + count: 1 + record_size: 6 + is_last_batch: true + record_offset: 0 + properties: + collections: + description: List of collections matching the search criteria. + items: + $ref: '#/components/schemas/Collection' + type: array + record_offset: + description: The starting record number from where the records are included. + format: int32 + nullable: true + type: integer + record_size: + description: The number of records returned. + format: int32 + nullable: true + type: integer + is_last_batch: + description: Indicates if this is the last batch of results. + nullable: true + type: boolean + count: + description: Total count of records returned. + format: int32 + nullable: true + type: integer + required: + - collections + type: object + Collection: + description: Response object for a collection. + example: + author_name: author_name + metadata: + - identifiers: + - identifier: identifier + name: name + - identifier: identifier + name: name + type: type + - identifiers: + - identifier: identifier + name: name + - identifier: identifier + name: name + type: type + updated_at: updated_at + org: + identifier: identifier + name: name + name: name + description: description + created_at: created_at + id: id + author_id: author_id + properties: + id: + description: Unique identifier of the collection. + type: string + name: + description: Name of the collection. + type: string + description: + description: Description of the collection. + nullable: true + type: string + metadata: + description: Metadata objects in the collection. + items: + $ref: '#/components/schemas/CollectionMetadataItem' + nullable: true + type: array + created_at: + description: Creation timestamp in milliseconds. + nullable: true + type: string + updated_at: + description: Last updated timestamp in milliseconds. + nullable: true + type: string + author_name: + description: Name of the author who created the collection. + nullable: true + type: string + author_id: + description: Unique identifier of the author. + nullable: true + type: string + org: + $ref: '#/components/schemas/CollectionEntityIdentifier' + required: + - id + - name + type: object + CollectionMetadataItem: + description: Metadata item in a collection response. + example: + identifiers: + - identifier: identifier + name: name + - identifier: identifier + name: name + type: type + properties: + type: + description: Type of the metadata object. + nullable: true + type: string + identifiers: + description: List of identifiers for this metadata type. + items: + $ref: '#/components/schemas/CollectionEntityIdentifier' + nullable: true + type: array + type: object + CollectionEntityIdentifier: + description: Entity identifier with name. + example: + identifier: identifier + name: name + properties: + identifier: + description: Unique identifier of the entity. + nullable: true + type: string + name: + description: Name of the entity. + nullable: true + type: string + type: object + ChannelHistoryEventInput: + description: Event specification for channel history search. + example: + identifier: identifier + type: LIVEBOARD_SCHEDULE + properties: + type: + description: Type of the event. + enum: + - LIVEBOARD_SCHEDULE + type: string + identifier: + description: Unique ID or name of the event. + nullable: true + type: string + required: + - type + type: object + SearchChannelHistoryResponse: + description: Response wrapper for channel delivery history. + example: + jobs: + - creation_time_in_millis: 0.8008282 + recipients: + - name: name + id: id + type: USER + email: email + - name: name + id: id + type: USER + email: email + try_count: 6 + id: id + detail: detail + event: + run_id: run_id + name: name + id: id + type: LIVEBOARD_SCHEDULE + status: PENDING + - creation_time_in_millis: 0.8008282 + recipients: + - name: name + id: id + type: USER + email: email + - name: name + id: id + type: USER + email: email + try_count: 6 + id: id + detail: detail + event: + run_id: run_id + name: name + id: id + type: LIVEBOARD_SCHEDULE + status: PENDING + properties: + jobs: + description: List of job execution records. + items: + $ref: '#/components/schemas/ChannelHistoryJob' + type: array + required: + - jobs + type: object + ChannelHistoryJob: + description: A single job execution record for a channel. + example: + creation_time_in_millis: 0.8008282 + recipients: + - name: name + id: id + type: USER + email: email + - name: name + id: id + type: USER + email: email + try_count: 6 + id: id + detail: detail + event: + run_id: run_id + name: name + id: id + type: LIVEBOARD_SCHEDULE + status: PENDING + properties: + id: + description: Unique identifier for this job. + type: string + status: + description: Delivery status of this job. + enum: + - PENDING + - RETRY + - SUCCESS + - FAILED + type: string + creation_time_in_millis: + description: Timestamp when this job was created (epoch milliseconds). + format: float + type: number + event: + $ref: '#/components/schemas/ChannelHistoryEventInfo' + recipients: + description: "The users, groups or external recipients for this job." + items: + $ref: '#/components/schemas/JobRecipient' + nullable: true + type: array + detail: + description: Additional delivery details such as HTTP response code or error + message. + nullable: true + type: string + try_count: + description: Number of attempts made. 1 indicates first attempt. + format: int32 + nullable: true + type: integer + required: + - creation_time_in_millis + - id + - status + type: object + ChannelHistoryEventInfo: + description: Event metadata for the triggering event associated with a job. + example: + run_id: run_id + name: name + id: id + type: LIVEBOARD_SCHEDULE + properties: + type: + description: Type of the event. + enum: + - LIVEBOARD_SCHEDULE + type: string + id: + description: Unique ID of the event. + type: string + name: + description: Name of the event. + nullable: true + type: string + run_id: + description: Unique run ID for this event execution. + nullable: true + type: string + required: + - id + - type + type: object + JobRecipient: + description: "A recipient (user, group, or external) for a job execution." + example: + name: name + id: id + type: USER + email: email + properties: + type: + description: Type of the recipient. + enum: + - USER + - EXTERNAL + type: string + id: + description: Unique ID of the recipient. + nullable: true + type: string + name: + description: Name of the recipient. + nullable: true + type: string + email: + description: Email of the recipient. + nullable: true + type: string + required: + - type + type: object + GenericInfo: + example: + name: name + id: id + properties: + id: + nullable: true + type: string + name: + nullable: true + type: string + type: object + UserGroup: + example: + name: name + id: id + properties: + id: + nullable: true + type: string + name: + nullable: true + type: string + type: object + JWT_User_Options: + description: |- + JWT user options to create a JWT token given the payload. + + + *Deprecated in 9.12.0.cl. Use user_parameters instead.* + properties: + parameters: + items: + type: object + type: array + metadata: + items: + $ref: '#/components/schemas/JWT_Metadata_Object' + nullable: true + type: array + type: object + JWT_Parameter: + description: List of runtime parameters need to set during the session. + properties: + runtime_filter: + description: Runtime filter parameter type in JWT. + nullable: true + type: object + runtime_sort: + description: Runtime sort parameter type in JWT. + nullable: true + type: object + runtime_param_override: + description: Runtime param override type in JWT. + nullable: true + type: object + type: object + JWT_Metadata_Object: + description: Metadata objects. + properties: + identifier: + nullable: true + type: string + type: + enum: + - LOGICAL_TABLE + nullable: true + type: string + type: object + User_Parameter_Options: + description: | + Define attributes such as Runtime filters and Runtime parameters to send security entitlements to a user session. For more information, see [Documentation](https://developers.thoughtspot.com/docs/abac-user-parameters). + properties: + objects: + items: + $ref: '#/components/schemas/User_Object' + nullable: true + type: array + runtime_filters: + description: |- + Objects to apply the User_Runtime_Filters. + + Examples to set the `runtime_filters` : + ```json + { "column_name": "Color", "operator": "EQ", "values": ["red"], "persist": false } + ``` + items: + $ref: '#/components/schemas/Runtime_Filters' + nullable: true + type: array + runtime_sorts: + description: |- + Objects to apply the User_Runtime_Sorts. + + Examples to set the `runtime_sorts` : + ```json + { "column_name": "Color", "order": "ASC", "persist": false } + ``` + items: + $ref: '#/components/schemas/Runtime_Sorts' + nullable: true + type: array + parameters: + description: |- + Objects to apply the Runtime_Parameters. + + Examples to set the `parameters` : + ```json + { "name": "Color", "values": ["Blue"], "persist": false } + ``` + items: + $ref: '#/components/schemas/Runtime_Parameters' + nullable: true + type: array + type: object + User_Object: + description: Objects to apply the User_Object. + properties: + type: + description: " Type of object.\n \n\nRequired if the name of the object\ + \ is set as the identifier. This attribute is optional when the object\ + \ GUID is specified as the identifier.\n \n\n Specify the object type\ + \ as `LOGICAL_TABLE`." + enum: + - LOGICAL_TABLE + nullable: true + type: string + identifier: + description: Unique name/id of the object. + type: string + required: + - identifier + type: object + Runtime_Filters: + description: Objects to apply the Runtime_Filters. + properties: + column_name: + description: The column name to apply filter. + type: string + values: + description: Value of the filters. + items: + type: string + type: array + operator: + description: "Operator value. Example: EQ" + enum: + - EQ + - NE + - LT + - LE + - GT + - GE + - IN + - BW + - CONTAINS + - BEGINS_WITH + - ENDS_WITH + - BW_INC + - BW_INC_MIN + - BW_INC_MAX + - LIKE + - NOT_IN + type: string + persist: + default: false + description: "Flag to persist the runtime filters. \n Version: 9.12.0.cl\ + \ or later\n" + nullable: true + type: boolean + objects: + description: Object to apply the runtime filter. + items: + $ref: '#/components/schemas/User_Object' + nullable: true + type: array + required: + - column_name + - operator + - values + type: object + Runtime_Sorts: + description: Objects to apply the Runtime_Sorts. + properties: + column_name: + description: The column name to apply filter. + nullable: true + type: string + order: + description: Order for the sort. + enum: + - ASC + - DESC + nullable: true + type: string + persist: + default: false + description: "Flag to persist the runtime sorts. \n Version: 9.12.0.cl\ + \ or later\n" + nullable: true + type: boolean + objects: + description: Object to apply the runtime sort. + items: + $ref: '#/components/schemas/User_Object' + nullable: true + type: array + type: object + Runtime_Parameters: + description: Objects to apply the Runtime_Parameters. + properties: + name: + description: The name of the parameter. + type: string + values: + description: The array of values. + items: + type: string + type: array + persist: + default: false + description: "Flag to persist the parameters. \n Version: 9.12.0.cl or\ + \ later\n" + nullable: true + type: boolean + objects: + description: Object to apply the runtime parameter. + items: + $ref: '#/components/schemas/User_Object' + nullable: true + type: array + required: + - name + - values + type: object + Token: + example: + creation_time_in_millis: 0.8008282 + valid_for_username: valid_for_username + valid_for_user_id: valid_for_user_id + expiration_time_in_millis: 6.0274563 + scope: + access_type: access_type + org_id: 1 + metadata_id: metadata_id + token: token + properties: + token: + description: Bearer auth token. + type: string + creation_time_in_millis: + description: Token creation time in milliseconds. + format: float + type: number + expiration_time_in_millis: + description: Token expiration time in milliseconds. + format: float + type: number + scope: + $ref: '#/components/schemas/Scope' + valid_for_user_id: + description: Username to whom the token is issued. + type: string + valid_for_username: + description: Unique identifier of the user to whom the token is issued. + type: string + required: + - creation_time_in_millis + - expiration_time_in_millis + - scope + - token + - valid_for_user_id + - valid_for_username + type: object + Scope: + example: + access_type: access_type + org_id: 1 + metadata_id: metadata_id + properties: + access_type: + description: Object access scope type. + type: string + org_id: + description: Unique identifier of the metadata. + format: int32 + nullable: true + type: integer + metadata_id: + description: Unique identifier of the Org. + nullable: true + type: string + required: + - access_type + type: object + JWT_User_Options_Full: + description: |- + JWT user options to create a JWT token given the payload. + + + *Deprecated in 9.12.0.cl. Use user_parameters instead.* + properties: + parameters: + items: + $ref: '#/components/schemas/JWT_Parameter' + nullable: true + type: array + type: object + TokenValidationResponse: + example: + creation_time_in_millis: 0.8008282 + valid_for_user_id: valid_for_user_id + expiration_time_in_millis: 6.0274563 + scope: + access_type: access_type + org_id: 1 + metadata_id: metadata_id + token_type: token_type + properties: + creation_time_in_millis: + description: Token creation time in milliseconds. + format: float + type: number + expiration_time_in_millis: + description: Token expiration time in milliseconds. + format: float + type: number + scope: + $ref: '#/components/schemas/Scope' + valid_for_user_id: + description: Username to whom the token is issued. + type: string + token_type: + description: Type of token. + type: string + required: + - creation_time_in_millis + - expiration_time_in_millis + - scope + - token_type + - valid_for_user_id + type: object + FilterRules: + description: Filter Rules to be applied on Objects. + example: + values: + - "{}" + - "{}" + column_name: column_name + operator: EQ + properties: + column_name: + description: The name of the column to apply the filter on. + type: string + operator: + description: "The operator to use for filtering. Example: EQ (equals), GT(greater\ + \ than), etc." + enum: + - EQ + - NE + - LT + - LE + - GT + - GE + - IN + - BW + - CONTAINS + - BEGINS_WITH + - ENDS_WITH + - BW_INC + - BW_INC_MIN + - BW_INC_MAX + - LIKE + - NOT_IN + type: string + values: + description: "The values to filter on. To get all records, use TS_WILDCARD_ALL\ + \ as values." + items: + type: object + type: array + required: + - column_name + - operator + - values + type: object + ParameterValues: + description: Filter Rules to be applied on Objects. + example: + values: + - "{}" + - "{}" + name: name + properties: + name: + description: The name of the column to apply the filter on. + type: string + values: + description: The values to filter on. Only single value is supported currently. + items: + type: object + type: array + required: + - name + - values + type: object + VariableValues: + description: Variable values. + example: + values: + - "{}" + - "{}" + name: name + properties: + name: + description: The name of the existing formula variable. + type: string + values: + description: The values to filter on. + items: + type: object + type: array + required: + - name + - values + type: object + TokenAccessScopeObject: + description: Objects on which the filter rules and parameters values should + be applied to + example: + identifier: identifier + type: LOGICAL_TABLE + properties: + type: + description: " Type of object.\n \n\nRequired if the name of the object\ + \ is set as the identifier. This attribute is optional when the object\ + \ GUID is specified as the identifier.\n \n\n Specify the object type\ + \ as `LOGICAL_TABLE`." + enum: + - LOGICAL_TABLE + nullable: true + type: string + identifier: + description: Unique name/id of the object. + type: string + required: + - identifier + type: object + Group_Object: + description: Groups objects. + example: + identifier: identifier + properties: + identifier: + nullable: true + type: string + type: object + AccessToken: + example: + creation_time_in_millis: 6.0274563 + org: + name: name + id: 0 + expiration_time_in_millis: 1.4658129 + id: id + user: + name: name + id: id + token: token + properties: + id: + description: GUID of the auth token. + nullable: true + type: string + token: + description: Bearer auth token. + type: string + org: + $ref: '#/components/schemas/OrgInfo' + user: + $ref: '#/components/schemas/UserInfo' + creation_time_in_millis: + description: Token creation time in milliseconds. + format: float + type: number + expiration_time_in_millis: + description: Token expiration time in milliseconds. + format: float + type: number + required: + - creation_time_in_millis + - expiration_time_in_millis + - org + - token + - user + type: object + OrgInfo: + example: + name: name + id: 0 + properties: + id: + description: Id. + format: int32 + type: integer + name: + description: Name. + nullable: true + type: string + required: + - id + type: object + UserInfo: + example: + name: name + id: id + properties: + id: + description: Id. + type: string + name: + description: Name. + nullable: true + type: string + required: + - id + type: object + AuthClusterPreferencesInput: + description: Input for cluster-level auth configuration. + properties: + auth_status: + description: "Enable or disable authentication at the cluster level. When\ + \ enabled, a new token is generated if one does not exist. When disabled,\ + \ the existing token is revoked." + enum: + - ENABLED + - DISABLED + nullable: true + type: string + type: object + AuthOrgPreferenceInput: + description: Input for org-level auth configuration. + example: + org_identifier: org_identifier + auth_status: ENABLED + properties: + org_identifier: + description: Unique ID or name of the org to configure. + type: string + auth_status: + description: "Enable or disable authentication for this org. When enabled,\ + \ a new token is generated if one does not exist. When disabled, the existing\ + \ token is revoked." + enum: + - ENABLED + - DISABLED + nullable: true + type: string + required: + - org_identifier + type: object + ResponseActivationURL: + description: The object representation with activation link. + example: + activation_link: activation_link + properties: + activation_link: + description: Activation link to activate the user. + nullable: true + type: string + type: object + ImportUser: + example: + user_identifier: user_identifier + preferred_locale: en-CA + account_type: LOCAL_USER + onboarding_experience_completed: true + visibility: SHARABLE + account_status: ACTIVE + display_name: display_name + use_browser_language: true + home_liveboard_identifier: home_liveboard_identifier + notify_on_share: true + show_onboarding_experience: true + favorite_metadata: + - identifier: identifier + type: LIVEBOARD + - identifier: identifier + type: LIVEBOARD + password: password + group_identifiers: + - group_identifiers + - group_identifiers + org_identifiers: + - org_identifiers + - org_identifiers + email: email + properties: + user_identifier: + description: Unique ID or name of the user. + type: string + display_name: + description: Display name of the user. + type: string + password: + description: Password of the user. + nullable: true + type: string + account_type: + description: Type of the user account. + enum: + - LOCAL_USER + - LDAP_USER + - SAML_USER + - OIDC_USER + - REMOTE_USER + nullable: true + type: string + account_status: + description: Status of the user account. + enum: + - ACTIVE + - INACTIVE + - EXPIRED + - LOCKED + - PENDING + - SUSPENDED + nullable: true + type: string + email: + description: Email address of the user. + nullable: true + type: string + org_identifiers: + description: ID or name of the Orgs to which the user belongs. + items: + type: string + nullable: true + type: array + group_identifiers: + description: ID or name of the groups to which the user belongs. + items: + type: string + nullable: true + type: array + visibility: + description: "Visibility of the users. The SHARABLE property makes a user\ + \ visible to other users and group, who can share objects with the user." + enum: + - SHARABLE + - NON_SHARABLE + nullable: true + type: string + notify_on_share: + default: true + description: Notify user when other users or groups share metadata objects + nullable: true + type: boolean + show_onboarding_experience: + description: Show or hide the new user onboarding walkthroughs + nullable: true + type: boolean + onboarding_experience_completed: + description: Revisit the new user onboarding walkthroughs + nullable: true + type: boolean + home_liveboard_identifier: + description: Unique ID or name of the default Liveboard assigned to the + user. + nullable: true + type: string + favorite_metadata: + description: Metadata objects to add to the user's favorites list. + items: + $ref: '#/components/schemas/FavoriteMetadataInput' + nullable: true + type: array + preferred_locale: + description: "Locale for the user. When setting this value, do not set use_browser_language\ + \ to true, otherwise the browser's language setting will take precedence\ + \ and the preferred_locale value will be ignored." + enum: + - en-CA + - en-GB + - en-US + - de-DE + - ja-JP + - zh-CN + - pt-BR + - fr-FR + - fr-CA + - es-US + - da-DK + - es-ES + - fi-FI + - sv-SE + - nb-NO + - pt-PT + - nl-NL + - it-IT + - ru-RU + - en-IN + - de-CH + - en-NZ + - es-MX + - en-AU + - zh-Hant + - ko-KR + - en-DE + nullable: true + type: string + use_browser_language: + description: "Flag to indicate whether to use the browser locale for the\ + \ user in the UI.\nWhen set to true, the preferred_locale value is unset\ + \ and the browser's\nlanguage setting takes precedence. \n Version: 26.3.0.cl\ + \ or later\n" + nullable: true + type: boolean + required: + - display_name + - user_identifier + type: object + ImportUsersResponse: + example: + users_added: + - name: name + id: id + - name: name + id: id + users_updated: + - name: name + id: id + - name: name + id: id + users_deleted: + - name: name + id: id + - name: name + id: id + properties: + users_added: + items: + $ref: '#/components/schemas/ImportUserType' + nullable: true + type: array + users_updated: + items: + $ref: '#/components/schemas/ImportUserType' + nullable: true + type: array + users_deleted: + items: + $ref: '#/components/schemas/ImportUserType' + nullable: true + type: array + type: object + ImportUserType: + example: + name: name + id: id + properties: + id: + description: Unique identifier of the user. + nullable: true + type: string + name: + description: Name of the user. + type: string + required: + - name + type: object + EventChannelConfigInput: + example: + event_type: LIVEBOARD_SCHEDULE + channels: + - EMAIL + - EMAIL + properties: + event_type: + description: Type of event for which communication channels are configured + enum: + - LIVEBOARD_SCHEDULE + type: string + channels: + description: Communication channels enabled for this event type. Empty array + disables all channels for this event. + items: + enum: + - EMAIL + - WEBHOOK + type: string + type: array + required: + - channels + - event_type + type: object + OrgChannelConfigInput: + example: + preferences: + - event_type: LIVEBOARD_SCHEDULE + channels: + - EMAIL + - EMAIL + - event_type: LIVEBOARD_SCHEDULE + channels: + - EMAIL + - EMAIL + org_identifier: org_identifier + reset_events: + - LIVEBOARD_SCHEDULE + - LIVEBOARD_SCHEDULE + operation: REPLACE + properties: + org_identifier: + description: Unique identifier or name of the org + type: string + operation: + default: REPLACE + description: "Operation to perform. REPLACE: Update preferences (default).\ + \ RESET: Remove org-specific configurations, causing fallback to cluster-level\ + \ preferences." + enum: + - REPLACE + - RESET + nullable: true + type: string + preferences: + description: Event-specific configurations. Required for REPLACE operation. + items: + $ref: '#/components/schemas/EventChannelConfigInput' + nullable: true + type: array + reset_events: + description: "Event types to reset. Required for RESET operation. Org-specific\ + \ configurations for these events will be removed, causing fallback to\ + \ cluster-level preferences." + items: + enum: + - LIVEBOARD_SCHEDULE + type: string + nullable: true + type: array + required: + - org_identifier + type: object + SecuritySettingsClusterPreferencesInput: + description: Input for cluster-level security preferences configuration. + properties: + enable_partitioned_cookies: + description: Support embedded access when third-party cookies are blocked. + nullable: true + type: boolean + cors_whitelisted_urls: + description: Allowed origins for CORS. + items: + type: string + nullable: true + type: array + csp_settings: + $ref: '#/components/schemas/CspSettingsInput' + saml_redirect_urls: + description: Allowed redirect hosts for SAML login. + items: + type: string + nullable: true + type: array + non_embed_access: + $ref: '#/components/schemas/ClusterNonEmbedAccessInput' + type: object + CspSettingsInput: + description: Input for CSP (Content Security Policy) settings. + properties: + connect_src_urls: + description: Allowed URLs for connect-src directive. + items: + type: string + nullable: true + type: array + font_src_urls: + description: Allowed URLs for font-src directive. + items: + type: string + nullable: true + type: array + visual_embed_hosts: + description: Allowed hosts for visual embed (frame-ancestors directive). + items: + type: string + nullable: true + type: array + iframe_src_urls: + description: Allowed URLs for frame-src directive. + items: + type: string + nullable: true + type: array + img_src_urls: + description: Allowed URLs for img-src directive. + items: + type: string + nullable: true + type: array + script_src_urls: + $ref: '#/components/schemas/ScriptSrcUrlsInput' + style_src_urls: + description: Allowed URLs for style-src directive. + items: + type: string + nullable: true + type: array + type: object + ScriptSrcUrlsInput: + description: Input for script-src CSP settings. + properties: + enabled: + description: Whether script-src customization is enabled. + nullable: true + type: boolean + urls: + description: Allowed URLs for script-src directive. Can only be set if enabled + is true. + items: + type: string + nullable: true + type: array + type: object + ClusterNonEmbedAccessInput: + description: Input for cluster-level non-embed access configuration. + properties: + block_full_app_access: + description: Block full application access for non-embedded usage. + nullable: true + type: boolean + groups_identifiers_with_access: + description: |- + Group identifiers that are allowed non-embed full app access. + Can only be set when orgs feature is disabled and block_full_app_access is true. + items: + type: string + nullable: true + type: array + type: object + SecuritySettingsOrgPreferencesInput: + description: |- + Input for org-level security preferences configuration. + Note: cross-org operations are not supported currently. + example: + cors_whitelisted_urls: + - cors_whitelisted_urls + - cors_whitelisted_urls + non_embed_access: + block_full_app_access: true + groups_identifiers_with_access: + - groups_identifiers_with_access + - groups_identifiers_with_access + org_identifier: org_identifier + properties: + org_identifier: + description: Unique identifier or name of the org + type: string + cors_whitelisted_urls: + description: Allowed origins for CORS for this org. + items: + type: string + nullable: true + type: array + non_embed_access: + $ref: '#/components/schemas/OrgNonEmbedAccessInput' + required: + - org_identifier + type: object + OrgNonEmbedAccessInput: + description: Input for org-level non-embed access configuration. + example: + block_full_app_access: true + groups_identifiers_with_access: + - groups_identifiers_with_access + - groups_identifiers_with_access + properties: + block_full_app_access: + description: Block full application access for non-embedded usage. + nullable: true + type: boolean + groups_identifiers_with_access: + description: Group identifiers that are allowed non-embed full app access. + Can only be set if block_full_app_access is true. + items: + type: string + nullable: true + type: array + type: object + CommunicationChannelValidateResponse: + description: Response containing validation results for communication channel + configuration. + example: + channel_name: channel_name + event_type: LIVEBOARD_SCHEDULE + job_id: job_id + result_code: SUCCESS + details: + - error_message: error_message + validation_step: HTTP_CONNECTION_CHECK + aws_s3_info: + object_key: object_key + file_name: file_name + bucket_name: bucket_name + http_status: 0 + status: SUCCESS + - error_message: error_message + validation_step: HTTP_CONNECTION_CHECK + aws_s3_info: + object_key: object_key + file_name: file_name + bucket_name: bucket_name + http_status: 0 + status: SUCCESS + channel_type: WEBHOOK + channel_id: channel_id + properties: + channel_type: + description: Type of communication channel that was validated. + enum: + - WEBHOOK + type: string + channel_id: + description: "ID of the communication channel (e.g., webhook_id)." + type: string + channel_name: + description: "Name of the communication channel (e.g., webhook name)." + nullable: true + type: string + event_type: + description: Event type that was validated. + enum: + - LIVEBOARD_SCHEDULE + type: string + job_id: + description: Unique Job Id of the validation. + type: string + result_code: + description: Overall result of the validation. + enum: + - SUCCESS + - FAILED + - PARTIAL_SUCCESS + type: string + details: + description: Detailed results of various validation sub-steps. + items: + $ref: '#/components/schemas/ChannelValidationDetail' + nullable: true + type: array + required: + - channel_id + - channel_type + - event_type + - job_id + - result_code + type: object + ChannelValidationDetail: + description: Validation detail result for a sub-step. + example: + error_message: error_message + validation_step: HTTP_CONNECTION_CHECK + aws_s3_info: + object_key: object_key + file_name: file_name + bucket_name: bucket_name + http_status: 0 + status: SUCCESS + properties: + validation_step: + description: The validation step that was performed. + enum: + - HTTP_CONNECTION_CHECK + - STORAGE_FILE_UPLOAD_CHECK + type: string + status: + description: Status of this validation step. + enum: + - SUCCESS + - FAILED + type: string + http_status: + description: HTTP status code returned by the channel (if applicable). + format: int32 + nullable: true + type: integer + error_message: + description: Error message from the channel or validation process. + nullable: true + type: string + aws_s3_info: + $ref: '#/components/schemas/ChannelValidationAwsS3Info' + required: + - status + - validation_step + type: object + ChannelValidationAwsS3Info: + description: AWS S3 storage information returned from a validation step. + example: + object_key: object_key + file_name: file_name + bucket_name: bucket_name + properties: + bucket_name: + description: Name of the S3 bucket. + nullable: true + type: string + file_name: + description: Name of the uploaded file. + nullable: true + type: string + object_key: + description: Key of the object in S3 storage. + nullable: true + type: string + type: object + TagMetadataTypeInput: + example: + identifier: identifier + type: LIVEBOARD + properties: + type: + description: " Type of metadata.\n \n\nRequired if the name of the object\ + \ is set as the identifier. This attribute is optional when the object\ + \ GUID is specified as the identifier.\n 1. LIVEBOARD\n 2. ANSWERS\n\ + \ 3. LOGICAL_TABLE for any data object such as table, worksheet or view.\n\ + \ 4. LOGICAL_COLUMN for a column of any data object such as tables, worksheets\ + \ or views." + enum: + - LIVEBOARD + - ANSWER + - LOGICAL_TABLE + - LOGICAL_COLUMN + - CONNECTION + - COLLECTION + nullable: true + type: string + identifier: + description: Unique ID or name of the metadata. + type: string + required: + - identifier + type: object + GroupsImportListInput: + example: + privileges: + - ADMINISTRATION + - ADMINISTRATION + visibility: SHARABLE + group_identifier: group_identifier + sub_group_identifiers: + - sub_group_identifiers + - sub_group_identifiers + description: description + default_liveboard_identifiers: + - default_liveboard_identifiers + - default_liveboard_identifiers + user_identifiers: + - user_identifiers + - user_identifiers + display_name: display_name + type: LOCAL_GROUP + properties: + display_name: + description: Unique display name of the group. + type: string + group_identifier: + description: Unique ID or name of the group. + type: string + default_liveboard_identifiers: + description: Unique ID of Liveboards that will be assigned as default Liveboards + to the users in the group. + items: + type: string + nullable: true + type: array + description: + description: Description of the group. + nullable: true + type: string + privileges: + description: Privileges that will be assigned to the group. + items: + enum: + - ADMINISTRATION + - AUTHORING + - USERDATAUPLOADING + - DATADOWNLOADING + - USERMANAGEMENT + - DATAMANAGEMENT + - SHAREWITHALL + - JOBSCHEDULING + - A3ANALYSIS + - EXPERIMENTALFEATUREPRIVILEGE + - BYPASSRLS + - RANALYSIS + - DEVELOPER + - USER_ADMINISTRATION + - GROUP_ADMINISTRATION + - SYNCMANAGEMENT + - CAN_CREATE_CATALOG + - DISABLE_PINBOARD_CREATION + - LIVEBOARD_VERIFIER + - PREVIEW_THOUGHTSPOT_SAGE + - CAN_MANAGE_VERSION_CONTROL + - THIRDPARTY_ANALYSIS + - ALLOW_NON_EMBED_FULL_APP_ACCESS + - CAN_ACCESS_ANALYST_STUDIO + - CAN_MANAGE_ANALYST_STUDIO + - CAN_MODIFY_FOLDERS + - CAN_MANAGE_VARIABLES + - CAN_VIEW_FOLDERS + - CAN_MANAGE_AGENTSPOT + - CAN_ACCESS_AGENTSPOT + - PREVIEW_DOCUMENT_SEARCH + - CAN_SETUP_VERSION_CONTROL + - CAN_DOWNLOAD_VISUALS + - CAN_DOWNLOAD_DETAILED_DATA + - CAN_USE_SPOTTER + type: string + nullable: true + type: array + sub_group_identifiers: + description: Unique ID or name of the sub-groups to add to the group. + items: + type: string + nullable: true + type: array + type: + description: Type of the group. + enum: + - LOCAL_GROUP + - LDAP_GROUP + - TEAM_GROUP + - TENANT_GROUP + nullable: true + type: string + user_identifiers: + description: Unique ID or name of the users to assign to the group. + items: + type: string + nullable: true + type: array + visibility: + description: "Visibility of the group. The SHARABLE makes a group visible\ + \ to other users and groups, and thus allows them to share objects." + enum: + - SHARABLE + - NON_SHARABLE + nullable: true + type: string + required: + - display_name + - group_identifier + type: object + ImportUserGroupsResponse: + example: + groups_deleted: + - name: name + id: id + - name: name + id: id + groups_added: + - name: name + id: id + - name: name + id: id + groups_updated: + - name: name + id: id + - name: name + id: id + properties: + groups_added: + description: The groups which are added into the system. + items: + $ref: '#/components/schemas/UserGroup' + type: array + groups_deleted: + description: The groups which are deleted from the system. + items: + $ref: '#/components/schemas/UserGroup' + type: array + groups_updated: + description: The groups which are updated in the system. + items: + $ref: '#/components/schemas/UserGroup' + type: array + required: + - groups_added + - groups_deleted + - groups_updated + type: object + Export_Options: + description: Flags to specify additional options for export. This will only + be active when UserDefinedId in TML is enabled. + properties: + include_obj_id_ref: + default: false + description: Boolean Flag to export Object ID of referenced object. This + flag will work only after the Object ID feature has been enabled. Please + contact support to enable the feature. + nullable: true + type: boolean + include_guid: + default: true + description: Boolean flag to export guid of the object. This flag will work + only after the Object ID feature has been enabled. Please contact support + to enable the feature. + nullable: true + type: boolean + include_obj_id: + default: false + description: Boolean flag to export Object ID of the object. This flag will + work only after the Object ID feature has been enabled. Please contact + support to enable the feature. + nullable: true + type: boolean + export_with_associated_feedbacks: + default: false + description: "Boolean flag indicating whether to export associated feedbacks\ + \ of the object. This will only be respected when the object can have\ + \ feedbacks. \n Version: 10.7.0.cl or later\n" + nullable: true + type: boolean + export_column_security_rules: + default: false + description: "Boolean flag indicating whether to export column security\ + \ rules of the object. This will only be respected when the object can\ + \ have column security rules and export_associated is true. \n Version:\ + \ 10.12.0.cl or later\n" + nullable: true + type: boolean + export_with_column_aliases: + default: false + description: "Boolean flag indicating whether to export column aliases of\ + \ the model. This will only be respected when the object can have column\ + \ aliases. \n Version: 10.13.0.cl or later\n" + nullable: true + type: boolean + type: object + ResponseCopyObject: + example: + metadata_id: metadata_id + properties: + metadata_id: + description: The unique identifier of the object. + nullable: true + type: string + type: object + ResponseWorksheetToModelConversion: + description: "Name of the conversion process, which involves converting worksheets\ + \ to models." + example: + incomplete_count: 1 + post_upgrade_failed_count: 5 + incomplete_entities: + data: + - name: name + id: id + error: error + - name: name + id: id + error: error + total_time_in_millis: 5 + post_upgrade_failed_entities: + data: + - name: name + id: id + error: error + - name: name + id: id + error: error + successful_entities: + data: + - name: name + id: id + - name: name + id: id + name: name + success_count: 0 + failure_count: 6 + failed_entities: + data: + - name: name + id: id + error: error + - name: name + id: id + error: error + properties: + name: + type: string + success_count: + description: The number of worksheets successfully converted to models. + format: int32 + type: integer + failure_count: + description: The number of worksheets that failed to convert. + format: int32 + type: integer + incomplete_count: + description: The number of worksheets that were incomplete during the conversion + process. + format: int32 + type: integer + post_upgrade_failed_count: + description: The number of worksheets that failed after an upgrade during + the conversion process. + format: int32 + type: integer + total_time_in_millis: + description: The total time taken to complete the conversion process in + milliseconds. + format: int32 + type: integer + successful_entities: + $ref: '#/components/schemas/ResponseSuccessfulEntities' + failed_entities: + $ref: '#/components/schemas/ResponseFailedEntities' + incomplete_entities: + $ref: '#/components/schemas/ResponseIncompleteEntities' + post_upgrade_failed_entities: + $ref: '#/components/schemas/ResponsePostUpgradeFailedEntities' + required: + - failed_entities + - failure_count + - incomplete_count + - incomplete_entities + - name + - post_upgrade_failed_count + - post_upgrade_failed_entities + - success_count + - successful_entities + - total_time_in_millis + type: object + ResponseSuccessfulEntities: + description: "Wrapper for the successful entities, as they are inside a 'data'\ + \ field in the response." + example: + data: + - name: name + id: id + - name: name + id: id + properties: + data: + items: + $ref: '#/components/schemas/ResponseSuccessfulEntity' + type: array + required: + - data + type: object + ResponseSuccessfulEntity: + description: Unique ID of the worksheet. + example: + name: name + id: id + properties: + id: + type: string + name: + description: Name of the worksheet. + type: string + required: + - id + - name + type: object + ResponseFailedEntities: + description: "Wrapper for the failed entities, as they are inside a 'data' field\ + \ in the response." + example: + data: + - name: name + id: id + error: error + - name: name + id: id + error: error + properties: + data: + items: + $ref: '#/components/schemas/ResponseFailedEntity' + type: array + required: + - data + type: object + ResponseFailedEntity: + description: Unique ID of the failed worksheet. + example: + name: name + id: id + error: error + properties: + id: + type: string + name: + description: Name of the worksheet that failed to convert. + type: string + error: + description: Error details related to the failed conversion. + type: string + required: + - error + - id + - name + type: object + ResponseIncompleteEntities: + description: "Wrapper for the incomplete entities, as they are inside a 'data'\ + \ field in the response." + example: + data: + - name: name + id: id + error: error + - name: name + id: id + error: error + properties: + data: + items: + $ref: '#/components/schemas/ResponseIncompleteEntity' + type: array + required: + - data + type: object + ResponseIncompleteEntity: + description: Unique ID of the incomplete worksheet. + example: + name: name + id: id + error: error + properties: + id: + type: string + name: + description: Name of the incomplete worksheet. + type: string + error: + description: Error details related to the incomplete conversion. + type: string + required: + - error + - id + - name + type: object + ResponsePostUpgradeFailedEntities: + description: "Wrapper for the post-upgrade failed entities, as they are inside\ + \ a 'data' field in the response." + example: + data: + - name: name + id: id + error: error + - name: name + id: id + error: error + properties: + data: + items: + $ref: '#/components/schemas/ResponsePostUpgradeFailedEntity' + type: array + required: + - data + type: object + ResponsePostUpgradeFailedEntity: + description: Unique ID of the worksheet that failed post-upgrade. + example: + name: name + id: id + error: error + properties: + id: + type: string + name: + description: Name of the worksheet that failed post-upgrade. + type: string + error: + description: Error details related to the post-upgrade failure. + type: string + required: + - error + - id + - name + type: object + HeaderUpdateInput: + description: Favorite object options. + example: + identifier: identifier + obj_identifier: obj_identifier + attributes: + - name: name + value: value + - name: name + value: value + type: ANSWER + properties: + identifier: + description: Unique ID of a specified type to identify the header. + nullable: true + type: string + obj_identifier: + description: Custom object identifier to uniquely identify header. + nullable: true + type: string + type: + description: Optional type of the header object. + enum: + - ANSWER + - LOGICAL_TABLE + - LOGICAL_COLUMN + - LIVEBOARD + - ACTION_OBJECT + - DATA_SOURCE + - USER + - USER_GROUP + nullable: true + type: string + attributes: + description: List of attributes to update + items: + $ref: '#/components/schemas/HeaderAttributeInput' + type: array + required: + - attributes + type: object + HeaderAttributeInput: + description: Attribute to update in a header. + example: + name: name + value: value + properties: + name: + description: Attribute name to be updated. + type: string + value: + description: Attribute's new value. + type: string + required: + - name + - value + type: object + UpdateObjIdInput: + description: Input for updating object ID of a metadata object. + example: + metadata_identifier: metadata_identifier + new_obj_id: new_obj_id + type: ANSWER + current_obj_id: current_obj_id + properties: + metadata_identifier: + description: GUID or name of the metadata object. + nullable: true + type: string + type: + description: Type of metadata. Required if metadata_identifier is name of + the object. + enum: + - ANSWER + - LOGICAL_TABLE + - LOGICAL_COLUMN + - LIVEBOARD + - ACTION_OBJECT + - DATA_SOURCE + - USER + - USER_GROUP + nullable: true + type: string + current_obj_id: + description: Current object ID value. + nullable: true + type: string + new_obj_id: + description: New object ID value to set. + type: string + required: + - new_obj_id + type: object + ExportMetadataTypeInput: + description: MetadataType InputType used in Export MetadataType API + example: + identifier: identifier + session_identifier: session_identifier + type: LIVEBOARD + generation_number: 0 + properties: + type: + description: " Type of metadata.\n \n\nRequired if the name of the object\ + \ is set as the identifier. This attribute is optional when the object\ + \ GUID is specified as the identifier." + enum: + - LIVEBOARD + - ANSWER + - LOGICAL_TABLE + - CONNECTION + - CUSTOM_ACTION + - USER + - USER_GROUP + - ROLE + - FEEDBACK + nullable: true + type: string + identifier: + description: Unique ID or name of the metadata object. Not required if the + metadata type is ANSWER when session_id and generation_number is set. + nullable: true + type: string + session_identifier: + description: Unique ID of the Answer session. Required if the metadata type + is ANSWER and identifier is not set. + nullable: true + type: string + generation_number: + description: Generation Number of the Answer session. Required if the metadata + type is ANSWER and identifier is not set. + format: int32 + nullable: true + type: integer + type: object + DeleteMetadataTypeInput: + description: MetadataType InputType used in Delete MetadataType API + example: + identifier: identifier + type: LIVEBOARD + properties: + type: + description: " Type of metadata.\n \n\nRequired if the name of the object\ + \ is set as the identifier. This attribute is optional when the object\ + \ GUID is specified as the identifier." + enum: + - LIVEBOARD + - ANSWER + - LOGICAL_TABLE + - LOGICAL_COLUMN + - LOGICAL_RELATIONSHIP + nullable: true + type: string + identifier: + description: Unique ID or name of the metadata object. + type: string + required: + - identifier + type: object + PublishMetadataListItem: + example: + identifier: identifier + type: LIVEBOARD + properties: + identifier: + description: Unique ID or name of the metadata. + type: string + type: + description: Type of metadata. Required if identifier is name. + enum: + - LIVEBOARD + - ANSWER + - LOGICAL_TABLE + nullable: true + type: string + required: + - identifier + type: object + AuthorMetadataTypeInput: + description: MetadataType InputType used in Author API's + example: + identifier: identifier + type: LIVEBOARD + properties: + type: + description: " Type of metadata.\n \n\nRequired if the name of the object\ + \ is set as the identifier. This attribute is optional when the object\ + \ GUID is specified as the identifier." + enum: + - LIVEBOARD + - ANSWER + - LOGICAL_TABLE + - CONNECTION + nullable: true + type: string + identifier: + description: Unique ID or name of the metadata object. + type: string + required: + - identifier + type: object + ShareMetadataTypeInput: + example: + identifier: identifier + type: LIVEBOARD + properties: + type: + description: " Type of metadata.\n \n\nType of metadata. Required if the\ + \ name of the object is set as the identifier. This attribute is optional\ + \ when the object GUID is specified as the identifier." + enum: + - LIVEBOARD + - ANSWER + - LOGICAL_TABLE + - LOGICAL_COLUMN + - CONNECTION + - COLLECTION + nullable: true + type: string + identifier: + description: Unique ID or name of the metadata object. + type: string + required: + - identifier + type: object + SharePermissionsInput: + example: + principal: + identifier: identifier + type: USER + share_mode: READ_ONLY + content_share_mode: READ_ONLY + properties: + principal: + $ref: '#/components/schemas/PrincipalsInput' + share_mode: + description: Type of access to the shared object + enum: + - READ_ONLY + - MODIFY + - NO_ACCESS + type: string + content_share_mode: + description: Content share mode for collections. Controls access to objects + within the collection. Only applicable when sharing COLLECTION metadata + type. + enum: + - READ_ONLY + - MODIFY + nullable: true + type: string + required: + - principal + - share_mode + type: object + ColumnSecurityRuleUpdate: + example: + column_identifier: column_identifier + is_unsecured: true + group_access: + - group_identifiers: + - group_identifiers + - group_identifiers + operation: ADD + - group_identifiers: + - group_identifiers + - group_identifiers + operation: ADD + properties: + column_identifier: + description: Column identifier (col_id or name) + type: string + is_unsecured: + description: "If true, the column will be marked as unprotected and all\ + \ groups associated with it will be removed" + nullable: true + type: boolean + group_access: + description: Array of group operation objects that specifies the actions + for groups to be associated with a column + items: + $ref: '#/components/schemas/ColumnSecurityRuleGroupOperation' + nullable: true + type: array + required: + - column_identifier + type: object + ColumnSecurityRuleGroupOperation: + example: + group_identifiers: + - group_identifiers + - group_identifiers + operation: ADD + properties: + operation: + description: Type of operation to be performed on the groups + enum: + - ADD + - REMOVE + - REPLACE + type: string + group_identifiers: + description: Array of group identifiers (name or GUID) on which the operation + will be performed + items: + type: string + type: array + required: + - group_identifiers + - operation + type: object + MetadataObject: + example: + identifier: identifier + type: LIVEBOARD + properties: + identifier: + description: Unique ID or name of the metadata + type: string + type: + description: " Type of metadata.\n \n\nRequired if the name of the object\ + \ is set as the identifier. This attribute is optional when the object\ + \ GUID is specified as the identifier." + enum: + - LIVEBOARD + - ANSWER + - LOGICAL_TABLE + - CUSTOM_ACTION + nullable: true + type: string + required: + - identifier + type: object + CommitResponse: + example: + committer: + email: email + username: username + author: + email: email + username: username + comment: comment + commit_time: commit_time + commit_id: commit_id + branch: branch + committed_files: + - status_message: status_message + status_code: status_code + file_name: file_name + - status_message: status_message + status_code: status_code + file_name: file_name + properties: + committer: + $ref: '#/components/schemas/CommiterType' + author: + $ref: '#/components/schemas/AuthorType' + comment: + description: Comments associated with the commit + nullable: true + type: string + commit_time: + description: Time at which the changes were committed. + nullable: true + type: string + commit_id: + description: SHA id associated with the commit + nullable: true + type: string + branch: + description: Branch where changes were committed + nullable: true + type: string + committed_files: + description: Files that were pushed as part of this commit + items: + $ref: '#/components/schemas/CommitFileType' + nullable: true + type: array + type: object + CommitFileType: + example: + status_message: status_message + status_code: status_code + file_name: file_name + properties: + file_name: + description: Name of the file deployed + type: string + status_code: + description: Indicates the status of deployment for the file + type: string + status_message: + description: Any error or warning with the deployment + nullable: true + type: string + required: + - file_name + - status_code + type: object + RevertResponse: + example: + reverted_metadata: + - status_message: status_message + metadata_name: metadata_name + status_code: status_code + file_name: file_name + metadata_type: metadata_type + - status_message: status_message + metadata_name: metadata_name + status_code: status_code + file_name: file_name + metadata_type: metadata_type + committer: + email: email + username: username + author: + email: email + username: username + comment: comment + commit_time: commit_time + commit_id: commit_id + branch: branch + committed_files: + - status_message: status_message + status_code: status_code + file_name: file_name + - status_message: status_message + status_code: status_code + file_name: file_name + properties: + committer: + $ref: '#/components/schemas/CommiterType' + author: + $ref: '#/components/schemas/AuthorType' + comment: + description: Comments associated with the commit + nullable: true + type: string + commit_time: + description: Time at which the changes were committed. + nullable: true + type: string + commit_id: + description: SHA id associated with the commit + nullable: true + type: string + branch: + description: Branch where changes were committed + nullable: true + type: string + committed_files: + description: Files that were pushed as part of this commit + items: + $ref: '#/components/schemas/CommitFileType' + nullable: true + type: array + reverted_metadata: + description: Metadata of reverted file of this commit + items: + $ref: '#/components/schemas/RevertedMetadata' + nullable: true + type: array + type: object + RevertedMetadata: + example: + status_message: status_message + metadata_name: metadata_name + status_code: status_code + file_name: file_name + metadata_type: metadata_type + properties: + file_name: + description: Name of the file deployed + type: string + metadata_name: + description: Name of the metadata object + type: string + metadata_type: + description: Type of the metadata object + type: string + status_code: + description: Indicates the status of deployment for the file + type: string + status_message: + description: Any error or warning with the deployment + type: string + required: + - file_name + - metadata_name + - metadata_type + - status_code + - status_message + type: object + DeployResponse: + example: + status_message: status_message + metadata_name: metadata_name + status_code: status_code + file_name: file_name + metadata_type: metadata_type + properties: + file_name: + description: Name of the file deployed + nullable: true + type: string + metadata_name: + description: Name of the metadata object + nullable: true + type: string + metadata_type: + description: Type of the metadata object + nullable: true + type: string + status_code: + description: Indicates the status of deployment for the file + nullable: true + type: string + status_message: + description: Any error or warning with the deployment + nullable: true + type: string + type: object + CreateConnectionResponse: + example: + name: name + details: "{}" + id: id + data_warehouse_type: SNOWFLAKE + properties: + id: + description: ID of the connection created. + type: string + name: + description: Name of the connection. + type: string + data_warehouse_type: + description: Type of data warehouse. + enum: + - SNOWFLAKE + - AMAZON_REDSHIFT + - GOOGLE_BIGQUERY + - AZURE_SYNAPSE + - TERADATA + - SAP_HANA + - STARBURST + - ORACLE_ADW + - DATABRICKS + - DENODO + - DREMIO + - TRINO + - PRESTO + - POSTGRES + - SQLSERVER + - MYSQL + - GENERIC_JDBC + - AMAZON_RDS_POSTGRESQL + - AMAZON_AURORA_POSTGRESQL + - AMAZON_RDS_MYSQL + - AMAZON_AURORA_MYSQL + - LOOKER + - AMAZON_ATHENA + - SINGLESTORE + - GCP_SQLSERVER + - GCP_ALLOYDB_POSTGRESQL + - GCP_POSTGRESQL + - GCP_MYSQL + - MODE + - GOOGLE_SHEETS + - FALCON + - FALCON_ONPREM + - CLICKHOUSE + - IOMETE + type: string + details: + description: Details of the connection. + nullable: true + type: object + required: + - data_warehouse_type + - id + - name + type: object + FetchConnectionDiffStatusResponse: + example: + status: true + properties: + status: + description: Status of the connection diff. + nullable: true + type: boolean + type: object + RevokeRefreshTokensResponse: + example: + data: data + properties: + data: + description: Result message describing the outcome of the refresh token + revocation operation. + type: string + required: + - data + type: object + SyncMetadataResponse: + description: Response from sync metadata operation. + example: + tables_failed: 1 + columns_updated: 6 + columns_failed: 5 + message: message + tables_updated: 0 + status: SUCCESS + properties: + status: + description: Overall status of the sync operation. + enum: + - SUCCESS + - PARTIAL_SUCCESS + - NO_UPDATE + nullable: true + type: string + tables_updated: + description: Number of tables with metadata updates. + format: int32 + nullable: true + type: integer + columns_updated: + description: Number of columns with metadata updates. + format: int32 + nullable: true + type: integer + tables_failed: + description: Number of tables that failed to sync (for PARTIAL_SUCCESS). + format: int32 + nullable: true + type: integer + columns_failed: + description: Number of columns that failed to sync (for PARTIAL_SUCCESS). + format: int32 + nullable: true + type: integer + message: + description: Message describing the result. + nullable: true + type: string + type: object + RoleResponse: + example: + privileges: + - USERDATAUPLOADING + - USERDATAUPLOADING + groups_assigned_count: 0 + creation_time_in_millis: "{}" + hidden: true + deprecated: true + description: description + groups: + - name: name + id: id + - name: name + id: id + permission: READ_ONLY + modification_time_in_millis: "{}" + external: true + deleted: true + name: name + modifier_id: modifier_id + shared_via_connection: true + id: id + orgs: + - name: name + id: id + - name: name + id: id + author_id: author_id + properties: + id: + description: Unique Id of the role. + type: string + name: + description: Name of the role + type: string + description: + description: Description of the role + type: string + groups_assigned_count: + description: number of groups assigned with this role + format: int32 + nullable: true + type: integer + orgs: + description: Orgs in which role exists. + items: + $ref: '#/components/schemas/GenericInfo' + nullable: true + type: array + groups: + description: Details of groups assigned with this role + items: + $ref: '#/components/schemas/GenericInfo' + nullable: true + type: array + privileges: + description: Privileges granted to the role. + items: + enum: + - USERDATAUPLOADING + - DATADOWNLOADING + - DATAMANAGEMENT + - SHAREWITHALL + - JOBSCHEDULING + - A3ANALYSIS + - BYPASSRLS + - DISABLE_PINBOARD_CREATION + - DEVELOPER + - APPLICATION_ADMINISTRATION + - USER_ADMINISTRATION + - GROUP_ADMINISTRATION + - SYSTEM_INFO_ADMINISTRATION + - SYNCMANAGEMENT + - ORG_ADMINISTRATION + - ROLE_ADMINISTRATION + - AUTHENTICATION_ADMINISTRATION + - BILLING_INFO_ADMINISTRATION + - CONTROL_TRUSTED_AUTH + - TAGMANAGEMENT + - LIVEBOARD_VERIFIER + - CAN_MANAGE_CUSTOM_CALENDAR + - CAN_CREATE_OR_EDIT_CONNECTIONS + - CAN_MANAGE_WORKSHEET_VIEWS_TABLES + - CAN_MANAGE_VERSION_CONTROL + - THIRDPARTY_ANALYSIS + - CAN_CREATE_CATALOG + - ALLOW_NON_EMBED_FULL_APP_ACCESS + - CAN_ACCESS_ANALYST_STUDIO + - CAN_MANAGE_ANALYST_STUDIO + - PREVIEW_DOCUMENT_SEARCH + - CAN_MANAGE_VARIABLES + - CAN_MODIFY_FOLDERS + - CAN_VIEW_FOLDERS + - CAN_MANAGE_AGENTSPOT + - CAN_ACCESS_AGENTSPOT + - CAN_SETUP_VERSION_CONTROL + - PREVIEW_THOUGHTSPOT_SAGE + - CAN_MANAGE_WEBHOOKS + - CAN_DOWNLOAD_VISUALS + - CAN_DOWNLOAD_DETAILED_DATA + - CAN_USE_SPOTTER + type: string + type: array + permission: + description: Permission details of the Role + enum: + - READ_ONLY + - MODIFY + - NO_ACCESS + nullable: true + type: string + author_id: + description: Unique identifier of author of the role. + nullable: true + type: string + modifier_id: + description: Unique identifier of modifier of the role. + nullable: true + type: string + creation_time_in_millis: + description: Creation time of the role in milliseconds. + nullable: true + type: object + modification_time_in_millis: + description: Last modified time of the role in milliseconds. + nullable: true + type: object + deleted: + description: Indicates whether the role is deleted. + nullable: true + type: boolean + deprecated: + description: Indicates whether the role is deprecated. + nullable: true + type: boolean + external: + description: Indicates whether the role is external. + nullable: true + type: boolean + hidden: + description: Indicates whether the role is hidden. + nullable: true + type: boolean + shared_via_connection: + description: Indicates whether the role is shared via connection + nullable: true + type: boolean + required: + - description + - id + - name + - privileges + type: object + LiveboardOptionsInput: + description: Options to specify details of Liveboard. + properties: + visualization_identifiers: + description: Unique ID or name of visualizations. + items: + type: string + type: array + required: + - visualization_identifiers + type: object + SchedulesPdfOptionsInput: + description: Options for PDF export. + properties: + complete_liveboard: + description: Indicates whether to include complete Liveboard. + nullable: true + type: boolean + include_cover_page: + description: Indicates whether to include cover page with the Liveboard + title. + nullable: true + type: boolean + include_custom_logo: + description: Indicates whether to include customized wide logo in the footer + if available. + nullable: true + type: boolean + include_filter_page: + description: Indicates whether to include a page with all applied filters. + nullable: true + type: boolean + include_page_number: + description: Indicates whether to include page number in the footer of each + page + nullable: true + type: boolean + page_footer_text: + description: Text to include in the footer of each page. + nullable: true + type: string + page_orientation: + description: Page orientation of the PDF. + nullable: true + type: string + page_size: + description: Page size. + enum: + - A4 + - TAB_BASED + nullable: true + type: string + truncate_table: + description: Indicates whether to include only first page of the tables. + nullable: true + type: boolean + type: object + FrequencyInput: + description: Configuration of schedule with cron expression + properties: + cron_expression: + $ref: '#/components/schemas/CronExpressionInput' + required: + - cron_expression + type: object + CronExpressionInput: + description: Schedule selected cron expression. + properties: + day_of_month: + description: Day of month of the object. + type: string + day_of_week: + description: Day of Week of the object. + type: string + hour: + description: Hour of the object. + type: string + minute: + description: Minute of the object. + type: string + month: + description: Month of the object. + type: string + second: + description: Second of the object. + type: string + required: + - day_of_month + - day_of_week + - hour + - minute + - month + - second + type: object + RecipientDetailsInput: + description: Recipients of the scheduled job notification. + properties: + emails: + description: Emails of the recipients. + items: + type: string + nullable: true + type: array + principals: + description: User or groups to be set as recipients of the schedule notifications. + items: + $ref: '#/components/schemas/PrincipalsListItemInput' + nullable: true + type: array + type: object + PrincipalsListItemInput: + properties: + identifier: + description: Unique ID or name of the user or group. + type: string + type: + description: Principal type. + type: string + required: + - identifier + - type + type: object + ResponseSchedule: + example: + metadata: + name: name + id: id + type: LIVEBOARD + creation_time_in_millis: "{}" + author: + name: name + id: id + liveboard_options: + visualization_identifiers: + - visualization_identifiers + - visualization_identifiers + description: description + pdf_options: + complete_liveboard: true + page_orientation: page_orientation + include_cover_page: true + include_filter_page: true + page_footer_text: page_footer_text + truncate_table: true + include_page_number: true + include_custom_logo: true + page_size: A4 + time_zone: time_zone + personalised_view_id: personalised_view_id + frequency: + cron_expression: + hour: hour + month: month + day_of_month: day_of_month + day_of_week: day_of_week + minute: minute + second: second + name: name + recipient_details: + emails: + - emails + - emails + principals: + - identifier: identifier + type: type + - identifier: identifier + type: type + id: id + file_format: file_format + status: status + history_runs: + - start_time_in_millis: 0 + id: id + detail: detail + end_time_in_millis: 6 + status: status + - start_time_in_millis: 0 + id: id + detail: detail + end_time_in_millis: 6 + status: status + properties: + author: + $ref: '#/components/schemas/Author' + creation_time_in_millis: + description: Schedule creation time in milliseconds. + type: object + description: + description: Description of the job. + nullable: true + type: string + file_format: + description: Export file format. + type: string + frequency: + $ref: '#/components/schemas/Frequency' + id: + description: GUID of the scheduled job. + type: string + liveboard_options: + $ref: '#/components/schemas/LiveboardOptions' + metadata: + $ref: '#/components/schemas/MetadataResponse' + name: + description: Name of the scheduled job. + type: string + pdf_options: + $ref: '#/components/schemas/PdfOptions' + recipient_details: + $ref: '#/components/schemas/RecipientDetails' + status: + description: Status of the job + nullable: true + type: string + time_zone: + description: Time zone + type: string + history_runs: + description: Schedule runs history records. + items: + $ref: '#/components/schemas/ResponseScheduleRun' + nullable: true + type: array + personalised_view_id: + description: Personalised view id of the liveboard to be scheduled. + nullable: true + type: string + required: + - author + - creation_time_in_millis + - file_format + - frequency + - id + - metadata + - name + - recipient_details + - time_zone + type: object + Author: + description: Author of the schedule. + example: + name: name + id: id + properties: + id: + description: The unique identifier of the object. + type: string + name: + description: Name of the object. + type: string + required: + - id + - name + type: object + Frequency: + description: Configuration of schedule with cron expression + example: + cron_expression: + hour: hour + month: month + day_of_month: day_of_month + day_of_week: day_of_week + minute: minute + second: second + properties: + cron_expression: + $ref: '#/components/schemas/CronExpression' + required: + - cron_expression + type: object + CronExpression: + description: Schedule selected cron expression. + example: + hour: hour + month: month + day_of_month: day_of_month + day_of_week: day_of_week + minute: minute + second: second + properties: + day_of_month: + description: Day of month of the object. + type: string + day_of_week: + description: Day of Week of the object. + type: string + hour: + description: Hour of the object. + type: string + minute: + description: Minute of the object. + type: string + month: + description: Month of the object. + type: string + second: + description: Second of the object. + type: string + required: + - day_of_month + - day_of_week + - hour + - minute + - month + - second + type: object + LiveboardOptions: + description: Options to specify details of Liveboard. + example: + visualization_identifiers: + - visualization_identifiers + - visualization_identifiers + properties: + visualization_identifiers: + description: Unique ID or name of visualizations. + items: + type: string + type: array + required: + - visualization_identifiers + type: object + MetadataResponse: + example: + name: name + id: id + type: LIVEBOARD + properties: + name: + nullable: true + type: string + id: + type: string + type: + enum: + - LIVEBOARD + type: string + required: + - id + - type + type: object + PdfOptions: + description: Options for PDF export. + example: + complete_liveboard: true + page_orientation: page_orientation + include_cover_page: true + include_filter_page: true + page_footer_text: page_footer_text + truncate_table: true + include_page_number: true + include_custom_logo: true + page_size: A4 + properties: + complete_liveboard: + description: Indicates whether to include complete Liveboard. + nullable: true + type: boolean + include_cover_page: + description: Indicates whether to include cover page with the Liveboard + title. + nullable: true + type: boolean + include_custom_logo: + description: Indicates whether to include customized wide logo in the footer + if available. + nullable: true + type: boolean + include_filter_page: + description: Indicates whether to include a page with all applied filters. + nullable: true + type: boolean + include_page_number: + description: Indicates whether to include page number in the footer of each + page + nullable: true + type: boolean + page_footer_text: + description: Text to include in the footer of each page. + nullable: true + type: string + page_orientation: + description: Page orientation of the PDF. + nullable: true + type: string + page_size: + description: Page size. + enum: + - A4 + - TAB_BASED + nullable: true + type: string + truncate_table: + description: Indicates whether to include only first page of the tables. + nullable: true + type: boolean + type: object + RecipientDetails: + description: "Recipient configuration which includes email address, ID or name\ + \ of the users and groups." + example: + emails: + - emails + - emails + principals: + - identifier: identifier + type: type + - identifier: identifier + type: type + properties: + emails: + description: Emails of the recipients. Specify email address if the recipient + is not a ThoughtSpot user. + items: + type: string + nullable: true + type: array + principals: + description: List of user or groups to subscribe for the scheduled job notifications. + items: + $ref: '#/components/schemas/PrincipalsListItem' + nullable: true + type: array + type: object + PrincipalsListItem: + example: + identifier: identifier + type: type + properties: + identifier: + description: Unique ID or name of the user or group. + type: string + type: + description: Principal type. Valid values are + type: string + required: + - identifier + - type + type: object + ResponseScheduleRun: + description: Schedule run response object + example: + start_time_in_millis: 0 + id: id + detail: detail + end_time_in_millis: 6 + status: status + properties: + id: + description: GUID of the scheduled job. + type: string + start_time_in_millis: + description: Schedule run start time in milliseconds. + format: int32 + type: integer + end_time_in_millis: + description: Schedule run end time in milliseconds. + format: int32 + type: integer + status: + description: Status of the schedule run. + type: string + detail: + description: Message details related to the schedule run. + nullable: true + type: string + required: + - end_time_in_millis + - id + - start_time_in_millis + - status + type: object + MetadataInput: + example: + identifier: identifier + type: LIVEBOARD + properties: + identifier: + nullable: true + type: string + type: + enum: + - LIVEBOARD + nullable: true + type: string + type: object + SortingOptions: + description: Sort options. + properties: + field_name: + description: Name of the field to apply the sort on. + nullable: true + type: string + order: + description: "Sort order : ASC(Ascending) or DESC(Descending)." + nullable: true + type: string + type: object + ScheduleHistoryRunsOptionsInput: + properties: + include_history_runs: + default: false + description: Indicates whether to fetch history runs for the scheduled notification. + nullable: true + type: boolean + record_size: + default: 10 + description: Indicates the max number of records that can be fetched as + past runs of any scheduled job. + format: int32 + nullable: true + type: integer + record_offset: + default: 0 + description: Indicates the starting record number from where history runs + records should be fetched. + format: int32 + nullable: true + type: integer + type: object + Action_Details_Input_Create: + description: |- + Action details includes Type and Configuration for Custom Actions, either Callback or URL is required. + When both callback and url are provided, callback would be considered + properties: + CALLBACK: + $ref: '#/components/schemas/CALLBACKInputMandatory' + URL: + $ref: '#/components/schemas/URLInputMandatory' + type: object + CALLBACKInputMandatory: + description: CALLBACK Custom Action Type + properties: + reference: + description: "Reference name. By default, the value will be set to action\ + \ name." + nullable: true + type: string + type: object + URLInputMandatory: + description: URL Custom Action Type + properties: + authentication: + $ref: '#/components/schemas/AuthenticationInput' + parameters: + description: Query parameters for url. + items: + $ref: '#/components/schemas/ParametersListItemInput' + nullable: true + type: array + url: + description: Request Url for the Custom action. + type: string + reference: + description: Reference name. By default the value will be set to action + name + nullable: true + type: string + required: + - url + type: object + AuthenticationInput: + description: Authorization type for the custom action. + properties: + API_Key: + $ref: '#/components/schemas/API_KeyInput' + Basic_Auth: + $ref: '#/components/schemas/Basic_AuthInput' + Bearer_Token: + description: Bearer tokens enable requests to authenticate using an access + key. + nullable: true + type: string + No_Auth: + description: No authorization. If your request doesn't require authorization. + nullable: true + type: string + type: object + API_KeyInput: + description: "With API key auth, you send a key-value pair to the API either\ + \ in the request headers or query parameters." + properties: + key: + description: Enter your key name + nullable: true + type: string + value: + description: Enter you key value + nullable: true + type: string + type: object + Basic_AuthInput: + description: "Basic Auth: Basic authentication involves sending a verified username\ + \ and password with your request." + properties: + password: + description: Password for the basic authentication + nullable: true + type: string + username: + description: Username for the basic authentication + nullable: true + type: string + type: object + ParametersListItemInput: + properties: + key: + description: Key for the url query parameter + nullable: true + type: string + value: + description: Value for the url query parameter + nullable: true + type: string + type: object + Associate_Metadata_Input_Create: + example: + identifier: identifier + type: VISUALIZATION + action_config: + visibility: true + position: MENU + properties: + action_config: + $ref: '#/components/schemas/ActionConfigInputCreate' + identifier: + description: Unique ID or name of the metadata. + type: string + type: + description: " Type of metadata.\n \n\nRequired if the name of the object\ + \ is set as the identifier. This attribute is optional when the object\ + \ GUID is specified as the identifier." + enum: + - VISUALIZATION + - ANSWER + - WORKSHEET + nullable: true + type: string + required: + - identifier + type: object + ActionConfigInputCreate: + description: Specify that the association is enabled for the metadata object + Default + example: + visibility: true + position: MENU + properties: + position: + default: MENU + description: "Position of the Custom action on the Metadata object. Earlier\ + \ naming convention: context." + enum: + - MENU + - PRIMARY + - CONTEXT_MENU + nullable: true + type: string + visibility: + default: true + description: "Visibility of the metadata association with custom action.\ + \ Earlier naming convention: enabled" + nullable: true + type: boolean + type: object + Default_Action_Config_Input_Create: + description: "Default Custom action configuration. This includes the custom\ + \ action's visibility across all visualizations and Answers. By default, a\ + \ custom action is added to all visualizations and Answers." + properties: + visibility: + default: true + description: |- + Custom action is available on all visualizations. Earlier naming convention: LOCAL/GLOBAL. TRUE signifies GLOBAL for backward compatibility. + Default: true + nullable: true + type: boolean + type: object + Action_Details_Input: + description: Action details includes `Type` and configuration details of Custom + Actions. Either Callback or URL is required. + properties: + CALLBACK: + $ref: '#/components/schemas/CALLBACKInput' + URL: + $ref: '#/components/schemas/URLInput' + type: object + CALLBACKInput: + description: CALLBACK Custom Action Type + properties: + reference: + description: "Reference name. By default, the value will be set to action\ + \ name." + nullable: true + type: string + type: object + URLInput: + description: URL Custom Action Type + properties: + authentication: + $ref: '#/components/schemas/AuthenticationInput' + parameters: + description: Query parameters for url. + items: + $ref: '#/components/schemas/ParametersListItemInput' + nullable: true + type: array + url: + description: Request Url for the Custom action. + nullable: true + type: string + reference: + description: Reference name. By default the value will be set to action + name + nullable: true + type: string + type: object + Associate_Metadata_Input: + example: + identifier: identifier + type: VISUALIZATION + action_config: + visibility: true + position: MENU + properties: + action_config: + $ref: '#/components/schemas/ActionConfigInput' + identifier: + description: Unique ID or name of the metadata. + nullable: true + type: string + type: + description: " Type of metadata.\n \n\nRequired if the name of the object\ + \ is set as the identifier. This attribute is optional when the object\ + \ GUID is specified as the identifier." + enum: + - VISUALIZATION + - ANSWER + - WORKSHEET + nullable: true + type: string + type: object + ActionConfigInput: + description: Specify that the association is enabled for the metadata object + Default + example: + visibility: true + position: MENU + properties: + position: + description: "Position of the Custom action on the Metadata object. Earlier\ + \ naming convention: context." + enum: + - MENU + - PRIMARY + - CONTEXT_MENU + nullable: true + type: string + visibility: + description: "Visibility of the metadata association with custom action.\ + \ Earlier naming convention: enabled" + nullable: true + type: boolean + type: object + Default_Action_Config_Input: + description: "Default Custom action configuration. This includes the custom\ + \ action's visibility across all visualizations and Answers. By default, a\ + \ custom action is added to all visualizations and Answers." + properties: + visibility: + description: "Custom action is available on all visualizations. Earlier\ + \ naming convention: LOCAL/GLOBAL. TRUE signifies GLOBAL for backward\ + \ compatibility." + nullable: true + type: boolean + type: object + ModelTableList: + properties: + model_name: + description: Name of the Model. + type: string + model_path: + description: "Model directory path, this is optional param and required\ + \ if there are duplicate models with the same name." + nullable: true + type: string + tables: + description: List of Tables. + items: + type: string + type: array + required: + - model_name + - tables + type: object + DbtSearchResponse: + example: + connection_name: connection_name + author_name: author_name + dbt_connection_identifier: dbt_connection_identifier + connection_id: connection_id + import_type: import_type + project_name: project_name + cdw_database: cdw_database + properties: + dbt_connection_identifier: + nullable: true + type: string + project_name: + nullable: true + type: string + connection_id: + nullable: true + type: string + connection_name: + nullable: true + type: string + cdw_database: + nullable: true + type: string + import_type: + nullable: true + type: string + author_name: + nullable: true + type: string + type: object + Conversation: + example: + conversation_identifier: conversation_identifier + properties: + conversation_identifier: + description: Unique identifier of the conversation. + type: string + required: + - conversation_identifier + type: object + ResponseMessage: + example: + display_tokens: display_tokens + session_identifier: session_identifier + message_type: TSAnswer + tokens: tokens + visualization_type: Chart + generation_number: 0 + properties: + session_identifier: + description: Unique identifier of the generated response. + nullable: true + type: string + generation_number: + description: Generate number of the response. + format: int32 + nullable: true + type: integer + message_type: + description: Type of the generated response. + enum: + - TSAnswer + type: string + visualization_type: + description: Generated visualization type. + enum: + - Chart + - Table + - Undefined + nullable: true + type: string + tokens: + description: Tokens for the response. + nullable: true + type: string + display_tokens: + description: User friendly tokens for the response. + nullable: true + type: string + required: + - message_type + type: object + ContextPayloadV2Input: + properties: + type: + description: Type of the context. + enum: + - data_source + - DATA_SOURCE + - AUTO_MODE + nullable: true + type: string + data_source_context: + $ref: '#/components/schemas/DataSourceContextInput' + type: object + DataSourceContextInput: + properties: + data_source_identifier: + description: "Unique identifier of the data source.\nRequired when context\ + \ type is DATA_SOURCE and `data_source_identifiers` is not provided.\n\ + At least one of `data_source_identifier` or `data_source_identifiers`\ + \ must be supplied for DATA_SOURCE context;\nomit only when context type\ + \ is AUTO_MODE. \n Version: 26.5.0.cl or later\n" + nullable: true + type: string + data_source_identifiers: + description: "Unique identifiers of data sources for multi-data-source context.\n\ + Required when context type is DATA_SOURCE and `data_source_identifier`\ + \ is not provided. \n Version: 26.5.0.cl or later\n" + items: + type: string + nullable: true + type: array + guid: + description: "Deprecated. Use `data_source_identifier` instead.\nPreviously\ + \ required when neither `data_source_identifier` nor `data_source_identifiers`\ + \ was provided for DATA_SOURCE context. \n Version: 26.2.0.cl or later\n" + nullable: true + type: string + type: object + ConversationSettingsInput: + properties: + enable_contextual_change_analysis: + default: true + description: "Enable contextual change analysis.\nDefault changed from `false`\ + \ to `true` in 26.2.0.cl.\nIgnored on versions >= 26.2.0.cl where it is\ + \ always enabled. \n Version: 10.4.0.cl or later\n" + nullable: true + type: boolean + enable_natural_language_answer_generation: + default: true + description: "Enable natural language to answer generation.\nDefault changed\ + \ from `false` to `true` in 26.2.0.cl.\nIgnored on versions >= 26.2.0.cl\ + \ where it is always enabled. \n Version: 10.4.0.cl or later\n" + nullable: true + type: boolean + enable_reasoning: + default: true + description: "Enable reasoning.\nDefault changed from `false` to `true`\ + \ in 26.2.0.cl.\nIgnored on versions >= 26.2.0.cl where it is always enabled.\ + \ \n Version: 10.4.0.cl or later\n" + nullable: true + type: boolean + enable_save_chat: + default: false + description: "Enable save conversation. When `true`, the conversation is\ + \ persisted\nand can be retrieved later via conversation history. \n \ + \ Version: 26.5.0.cl or later\n" + nullable: true + type: boolean + type: object + AgentConversation: + example: + conversation_id: conversation_id + conversation_identifier: conversation_identifier + properties: + conversation_id: + description: Unique identifier of the conversation. + type: string + conversation_identifier: + description: "Unique identifier of the conversation. \n Version: 26.5.0.cl\ + \ or later\n" + type: string + required: + - conversation_id + - conversation_identifier + type: object + SendAgentMessageResponse: + example: + success: true + message: message + properties: + success: + description: Indicates whether the agent response was received and processed + successfully. + type: boolean + message: + description: Optional message providing additional context about the operation + outcome. + nullable: true + type: string + required: + - success + type: object + NLInstructionsInfoInput: + example: + instructions: + - instructions + - instructions + scope: GLOBAL + properties: + instructions: + description: User instructions for natural language processing. + items: + type: string + type: array + scope: + description: Scope of the instruction (USER or GLOBAL). Defaults to GLOBAL. + enum: + - GLOBAL + type: string + required: + - instructions + - scope + type: object + eureka_SetNLInstructionsResponse: + example: + success: true + properties: + success: + description: Success status of the operation. + type: boolean + required: + - success + type: object + VariableUpdateAssignmentInput: + description: Input for variable value update in batch operations + example: + variable_values: + - variable_values + - variable_values + variable_identifier: variable_identifier + operation: ADD + properties: + variable_identifier: + description: ID or Name of the variable + type: string + variable_values: + description: Values of the variable + items: + type: string + type: array + operation: + description: Operation to perform + enum: + - ADD + - REMOVE + - REPLACE + - RESET + type: string + required: + - operation + - variable_identifier + - variable_values + type: object + VariableUpdateScopeInput: + description: Input for defining the scope of variable value assignments in batch + update operations + example: + principal_identifier: principal_identifier + model_identifier: model_identifier + org_identifier: org_identifier + principal_type: USER + priority: 0 + properties: + org_identifier: + description: The unique name of the org + type: string + principal_type: + description: "Type of principal to which the variable value applies. Use\ + \ USER to assign values to a specific user, or USER_GROUP to assign values\ + \ to a group." + enum: + - USER + - USER_GROUP + nullable: true + type: string + principal_identifier: + description: Unique ID or name of the principal + nullable: true + type: string + model_identifier: + description: Unique ID or name of the model. Required for FORMULA_VARIABLE + type to scope the variable value to a specific worksheet. + nullable: true + type: string + priority: + description: "The priority level for this scope assignment, used for conflict\ + \ resolution when multiple values match. Higher priority values (larger\ + \ numbers) take precedence." + format: int32 + nullable: true + type: integer + required: + - org_identifier + type: object + VariablePutAssignmentInput: + description: Input for variable value put operations + example: + principal_identifier: principal_identifier + model_identifier: model_identifier + org_identifier: org_identifier + assigned_values: + - assigned_values + - assigned_values + principal_type: USER + priority: 0 + properties: + assigned_values: + description: Values of the variable + items: + type: string + type: array + org_identifier: + description: The unique name of the org + nullable: true + type: string + principal_type: + description: Principal type + enum: + - USER + - USER_GROUP + nullable: true + type: string + principal_identifier: + description: Unique ID or name of the principal + nullable: true + type: string + model_identifier: + description: Unique ID of the model + nullable: true + type: string + priority: + description: Priority level + format: int32 + nullable: true + type: integer + required: + - assigned_values + type: object + CreateEmailCustomizationResponse: + example: + tenant_id: tenant_id + org: + name: name + id: 0 + name: name + template_properties: "{}" + properties: + tenant_id: + description: Tenant ID + type: string + org: + $ref: '#/components/schemas/OrgType' + name: + description: Email customization name. + type: string + template_properties: + description: Customization configuration for the email + type: object + required: + - name + - org + - template_properties + - tenant_id + type: object + OrgType: + example: + name: name + id: 0 + properties: + name: + nullable: true + type: string + id: + format: int32 + nullable: true + type: integer + type: object + Template_Properties_Input_Create: + description: Email customization configuration properties + properties: + cta_button_bg_color: + description: Background color for call-to-action button in hex format + nullable: true + type: string + cta_text_font_color: + description: Text color for call-to-action button in hex format + nullable: true + type: string + primary_bg_color: + description: Primary background color in hex format + nullable: true + type: string + home_url: + description: Home page URL (HTTP/HTTPS only) + nullable: true + type: string + logo_url: + description: Logo image URL (HTTP/HTTPS only) + nullable: true + type: string + font_family: + description: "Font family for email content (e.g., Arial, sans-serif)" + nullable: true + type: string + product_name: + description: Product name to display + nullable: true + type: string + footer_address: + description: Footer address text + nullable: true + type: string + footer_phone: + description: Footer phone number + nullable: true + type: string + replacement_value_for_liveboard: + description: Replacement value for Liveboard + nullable: true + type: string + replacement_value_for_answer: + description: Replacement value for Answer + nullable: true + type: string + replacement_value_for_spot_iq: + description: Replacement value for SpotIQ + nullable: true + type: string + hide_footer_address: + description: Whether to hide footer address + nullable: true + type: boolean + hide_footer_phone: + description: Whether to hide footer phone number + nullable: true + type: boolean + hide_manage_notification: + description: Whether to hide manage notification link + nullable: true + type: boolean + hide_mobile_app_nudge: + description: Whether to hide mobile app nudge + nullable: true + type: boolean + hide_privacy_policy: + description: Whether to hide privacy policy link + nullable: true + type: boolean + hide_product_name: + description: Whether to hide product name + nullable: true + type: boolean + hide_ts_vocabulary_definitions: + description: Whether to hide ThoughtSpot vocabulary definitions + nullable: true + type: boolean + hide_notification_status: + description: Whether to hide notification status + nullable: true + type: boolean + hide_error_message: + description: Whether to hide error message + nullable: true + type: boolean + hide_unsubscribe_link: + description: Whether to hide unsubscribe link + nullable: true + type: boolean + hide_modify_alert: + description: Whether to hide modify alert + nullable: true + type: boolean + company_privacy_policy_url: + description: Company privacy policy URL (HTTP/HTTPS only) + nullable: true + type: string + company_website_url: + description: Company website URL (HTTP/HTTPS only) + nullable: true + type: string + contact_support_url: + description: "Contact support url (HTTP/HTTPS only). \n Version: 26.2.0.cl\ + \ or later\n" + nullable: true + type: string + hide_contact_support_url: + description: "Whether to hide contact support url. \n Version: 26.2.0.cl\ + \ or later\n" + nullable: true + type: boolean + hide_logo_url: + description: "Whether to hide logo \n Version: 26.4.0.cl or later\n" + nullable: true + type: boolean + type: object + ExternalTableInput: + properties: + connection_identifier: + description: Unique ID or name of the connection. + type: string + database_name: + default: "" + description: Name of the database. + nullable: true + type: string + schema_name: + default: "" + description: Name of the schema. + nullable: true + type: string + table_name: + description: Name of the table. Table names may be case-sensitive depending + on the database system. + type: string + required: + - connection_identifier + - table_name + type: object + PolicyProcessOptionsInput: + properties: + impersonate_user: + nullable: true + type: string + type: object + WebhookAuthenticationInput: + properties: + API_KEY: + $ref: '#/components/schemas/WebhookAuthApiKeyInput' + BASIC_AUTH: + $ref: '#/components/schemas/WebhookAuthBasicAuthInput' + BEARER_TOKEN: + description: Bearer token authentication configuration. + nullable: true + type: string + OAUTH2: + $ref: '#/components/schemas/WebhookAuthOAuth2Input' + type: object + WebhookAuthApiKeyInput: + properties: + key: + description: The header or query parameter name for the API key. + type: string + value: + description: The API key value. + type: string + required: + - key + - value + type: object + WebhookAuthBasicAuthInput: + properties: + username: + description: Username for basic authentication. + type: string + password: + description: Password for basic authentication. + type: string + required: + - password + - username + type: object + WebhookAuthOAuth2Input: + properties: + authorization_url: + description: OAuth2 authorization server URL. + type: string + client_id: + description: OAuth2 client identifier. + type: string + client_secret: + description: OAuth2 client secret key. + type: string + required: + - authorization_url + - client_id + - client_secret + type: object + WebhookSignatureVerificationInput: + properties: + type: + description: Signature verification method type. + enum: + - HMAC_SHA256 + type: string + header: + description: HTTP header where the signature is sent. + type: string + algorithm: + description: Hash algorithm used for signature verification. + enum: + - SHA256 + type: string + secret: + description: Shared secret used for HMAC signature generation. + type: string + required: + - algorithm + - header + - secret + - type + type: object + StorageDestinationInput: + description: Input type for storage destination configuration. + properties: + storage_type: + description: |- + Type of storage destination. + Example: "AWS_S3" + enum: + - AWS_S3 + type: string + storage_config: + $ref: '#/components/schemas/StorageConfigInput' + required: + - storage_config + - storage_type + type: object + StorageConfigInput: + description: Input type for storage configuration. + properties: + aws_s3_config: + $ref: '#/components/schemas/AwsS3ConfigInput' + type: object + AwsS3ConfigInput: + description: Input type for AWS S3 storage configuration. + properties: + bucket_name: + description: |- + Name of the S3 bucket where webhook payloads will be stored. + Example: "my-webhook-files" + type: string + region: + description: |- + AWS region where the S3 bucket is located. + Example: "us-west-2" + type: string + role_arn: + description: |- + ARN of the IAM role to assume for S3 access. + Example: "arn:aws:iam::123456789012:role/ThoughtSpotDeliveryRole" + type: string + external_id: + description: |- + External ID for secure cross-account role assumption. + Example: "ts-webhook-a1b2c3d4-7890" + nullable: true + type: string + path_prefix: + description: |- + Optional path prefix for organizing objects within the bucket. + Example: "thoughtspot-webhooks/" + nullable: true + type: string + required: + - bucket_name + - region + - role_arn + type: object + WebhookKeyValuePairInput: + description: Key-value pair input for additional webhook headers. + example: + value: value + key: key + properties: + key: + description: Header name. + type: string + value: + description: Header value. + type: string + required: + - key + - value + type: object + WebhookDeleteResponse: + example: + failed_webhooks: + - name: name + id: id + error: error + - name: name + id: id + error: error + deleted_webhooks: + - additional_headers: + - value: value + key: key + - value: value + key: key + creation_time_in_millis: 0.8008282 + org: + name: name + id: id + signature_verification: + header: header + secret: secret + type: HMAC_SHA256 + algorithm: SHA256 + description: description + modification_time_in_millis: 6.0274563 + last_modified_by: + name: name + id: id + created_by: + name: name + id: id + url: url + storage_destination: + storage_type: AWS_S3 + storage_config: + aws_s3_config: + role_arn: role_arn + bucket_name: bucket_name + external_id: external_id + region: region + path_prefix: path_prefix + url_params: "{}" + name: name + id: id + events: + - LIVEBOARD_SCHEDULE + - LIVEBOARD_SCHEDULE + authentication: + OAUTH2: + authorization_url: authorization_url + client_secret: client_secret + client_id: client_id + API_KEY: + value: value + key: key + BEARER_TOKEN: BEARER_TOKEN + BASIC_AUTH: + password: password + username: username + - additional_headers: + - value: value + key: key + - value: value + key: key + creation_time_in_millis: 0.8008282 + org: + name: name + id: id + signature_verification: + header: header + secret: secret + type: HMAC_SHA256 + algorithm: SHA256 + description: description + modification_time_in_millis: 6.0274563 + last_modified_by: + name: name + id: id + created_by: + name: name + id: id + url: url + storage_destination: + storage_type: AWS_S3 + storage_config: + aws_s3_config: + role_arn: role_arn + bucket_name: bucket_name + external_id: external_id + region: region + path_prefix: path_prefix + url_params: "{}" + name: name + id: id + events: + - LIVEBOARD_SCHEDULE + - LIVEBOARD_SCHEDULE + authentication: + OAUTH2: + authorization_url: authorization_url + client_secret: client_secret + client_id: client_id + API_KEY: + value: value + key: key + BEARER_TOKEN: BEARER_TOKEN + BASIC_AUTH: + password: password + username: username + failed_count: 6 + deleted_count: 0 + properties: + deleted_count: + description: Number of webhooks successfully deleted. + format: int32 + type: integer + failed_count: + description: Number of webhooks that failed to delete. + format: int32 + type: integer + deleted_webhooks: + description: List of successfully deleted webhooks. + items: + $ref: '#/components/schemas/WebhookResponse' + type: array + failed_webhooks: + description: List of webhooks that failed to delete with error details. + items: + $ref: '#/components/schemas/WebhookDeleteFailure' + type: array + required: + - deleted_count + - deleted_webhooks + - failed_count + - failed_webhooks + type: object + WebhookDeleteFailure: + example: + name: name + id: id + error: error + properties: + id: + description: Unique identifier of the webhook that failed to delete. + type: string + name: + description: Name of the webhook that failed to delete. + type: string + error: + description: Error message describing why the deletion failed. + type: string + required: + - error + - id + - name + type: object + CollectionMetadataInput: + description: Input type for metadata to be added to a collection. + example: + identifiers: + - identifiers + - identifiers + type: LIVEBOARD + properties: + type: + description: Type of metadata object. + enum: + - LIVEBOARD + - ANSWER + - LOGICAL_TABLE + - COLLECTION + type: string + identifiers: + description: List of unique IDs or names of metadata objects. + items: + type: string + type: array + required: + - identifiers + - type + type: object + CollectionDeleteResponse: + description: Response object for delete collection operation. + example: + metadata_skipped: + - identifiers: + - name: name + id: id + - name: name + id: id + type: type + - identifiers: + - name: name + id: id + - name: name + id: id + type: type + metadata_deleted: + - identifiers: + - name: name + id: id + - name: name + id: id + type: type + - identifiers: + - name: name + id: id + - name: name + id: id + type: type + properties: + metadata_deleted: + description: List of metadata objects that were successfully deleted. + items: + $ref: '#/components/schemas/CollectionDeleteTypeIdentifiers' + nullable: true + type: array + metadata_skipped: + description: |- + List of metadata objects that were skipped during deletion. + Objects may be skipped due to lack of permissions, dependencies, or other constraints. + items: + $ref: '#/components/schemas/CollectionDeleteTypeIdentifiers' + nullable: true + type: array + type: object + CollectionDeleteTypeIdentifiers: + description: Group of metadata objects identified by type. + example: + identifiers: + - name: name + id: id + - name: name + id: id + type: type + properties: + type: + description: "Type of the metadata object (e.g., Collection, Worksheet,\ + \ Table)." + nullable: true + type: string + identifiers: + description: List of metadata identifiers belonging to the given type. + items: + $ref: '#/components/schemas/GenericInfo' + nullable: true + type: array + type: object + Runtime_Filter: + description: List of runtime parameters need to set during the session. + properties: + runtime_filter: + description: Runtime filter parameter type in JWT. + type: object + type: object + Runtime_Sort: + description: List of runtime parameters need to set during the session. + properties: + runtime_sort: + description: Runtime sort parameter type in JWT. + type: object + type: object + Runtime_Param_Override: + description: List of runtime parameters need to set during the session. + properties: + runtime_param_override: + description: Runtime param override type in JWT. + type: object + type: object + CreateAgentConversationRequest: + example: + metadata_context: "" + conversation_settings: "" + properties: + metadata_context: + allOf: + - $ref: '#/components/schemas/ContextPayloadV2Input' + description: Context for the conversation. + conversation_settings: + allOf: + - $ref: '#/components/schemas/ConversationSettingsInput' + description: Conversation settings. + required: + - conversation_settings + - metadata_context + type: object + CreateConversationRequest: + example: + metadata_identifier: metadata_identifier + tokens: tokens + properties: + metadata_identifier: + description: "ID of the metadata object, such as a Worksheet or Model, to\ + \ use as a data source for the conversation." + type: string + tokens: + description: "Token string to set the context for the conversation. For\ + \ example,`[sales],[item type],[state]`." + type: string + required: + - metadata_identifier + type: object + GetDataSourceSuggestionsRequest: + example: + query: query + properties: + query: + description: User query used to suggest data sources. + type: string + required: + - query + type: object + GetNLInstructionsRequest: + example: + data_source_identifier: data_source_identifier + properties: + data_source_identifier: + description: Unique ID or name of the data-model for which to retrieve NL + instructions. + type: string + required: + - data_source_identifier + type: object + GetRelevantQuestionsRequest: + example: + limit_relevant_questions: 0 + bypass_cache: true + ai_context: "" + metadata_context: "" + query: query + properties: + metadata_context: + allOf: + - $ref: '#/components/schemas/MetadataContext' + description: metadata for the query to enable generation of relevant sub-questions; + at least one context identifier is required. + limit_relevant_questions: + description: "Maximum number of relevant questions that is allowed in the\ + \ response, default = 5." + format: int32 + type: integer + bypass_cache: + description: "If true, results are not returned from cache & calculated\ + \ every time." + nullable: true + type: boolean + query: + description: "A user query that requires breaking down into smaller, more\ + \ manageable analytical questions to facilitate better understanding and\ + \ analysis." + type: string + ai_context: + allOf: + - $ref: '#/components/schemas/AIContext' + description: Additional context to guide the response. + required: + - metadata_context + - query + type: object + QueryGetDecomposedQueryRequest: + example: + maxDecomposedQueries: 0 + worksheetIds: + - worksheetIds + - worksheetIds + liveboardIds: + - liveboardIds + - liveboardIds + conversationId: conversationId + nlsRequest: "" + answerIds: + - answerIds + - answerIds + content: + - content + - content + properties: + answerIds: + description: List of answer unique identifiers (GUIDs) whose data will be + used to guide the response. + items: + type: string + type: array + content: + description: "User provided content like text data, csv data as a string\ + \ message to provide context & potentially improve the quality of the\ + \ response." + items: + type: string + type: array + conversationId: + description: Unique identifier to denote current conversation. + type: string + liveboardIds: + description: List of liveboard unique identifiers (GUIDs) whose data will + be used to guide the response. + items: + type: string + type: array + maxDecomposedQueries: + description: "Maximum number of decomposed queries that is allowed in the\ + \ response, default = 5." + format: int32 + type: integer + nlsRequest: + allOf: + - $ref: '#/components/schemas/Input_eureka_NLSRequest' + description: NLSRequest object containing user query & instructions. + worksheetIds: + description: List of worksheetIds to provide context for decomposing user + query into analytical queries that can be run on them. + items: + type: string + type: array + type: object + SendAgentConversationMessageRequest: + example: + messages: + - messages + - messages + properties: + messages: + description: messages to be sent to the agent + items: + type: string + type: array + required: + - messages + type: object + SendAgentConversationMessageStreamingRequest: + example: + messages: + - messages + - messages + properties: + messages: + description: messages to be sent to the agent + items: + type: string + type: array + required: + - messages + type: object + SendAgentMessageRequest: + example: + messages: + - messages + - messages + properties: + messages: + description: messages to be sent to the agent + items: + type: string + type: array + required: + - messages + type: object + SendAgentMessageStreamingRequest: + example: + messages: + - messages + - messages + conversation_identifier: conversation_identifier + properties: + conversation_identifier: + description: Unique identifier for the conversation (used to track context) + type: string + messages: + description: messages to be sent to the agent + items: + type: string + type: array + required: + - conversation_identifier + - messages + type: object + SendMessageRequest: + example: + metadata_identifier: metadata_identifier + message: message + properties: + metadata_identifier: + description: "ID of the metadata object, such as a Worksheet or Model, to\ + \ use as a data source for the conversation." + type: string + message: + description: A message string with the follow-up question to continue the + conversation. + type: string + required: + - message + - metadata_identifier + type: object + SetNLInstructionsRequest: + example: + data_source_identifier: data_source_identifier + nl_instructions_info: + - instructions: + - instructions + - instructions + scope: GLOBAL + - instructions: + - instructions + - instructions + scope: GLOBAL + properties: + data_source_identifier: + description: Unique ID or name of the data-model for which to set NL instructions. + type: string + nl_instructions_info: + description: List of NL instructions to set for the data-model. + items: + $ref: '#/components/schemas/NLInstructionsInfoInput' + type: array + required: + - data_source_identifier + - nl_instructions_info + type: object + SingleAnswerRequest: + example: + metadata_identifier: metadata_identifier + query: query + properties: + query: + description: A natural language query string to generate the Answer. + type: string + metadata_identifier: + description: "ID of the metadata object, such as a Worksheet or Model, to\ + \ use as a data source for the query." + type: string + required: + - metadata_identifier + - query + type: object + ConfigureAuthSettingsRequest: + example: + auth_type: TRUSTED_AUTH + cluster_preferences: "" + org_preferences: + - org_identifier: org_identifier + auth_status: ENABLED + - org_identifier: org_identifier + auth_status: ENABLED + properties: + auth_type: + description: Type of authentication mechanism to configure. Currently supports + TRUSTED_AUTH. + enum: + - TRUSTED_AUTH + type: string + cluster_preferences: + allOf: + - $ref: '#/components/schemas/AuthClusterPreferencesInput' + description: Cluster-level authentication preferences. Omit to leave the + existing cluster setting unchanged. + org_preferences: + description: Org-level authentication preferences. Each entry identifies + an org and the desired status. Omit to leave existing org settings unchanged. + items: + $ref: '#/components/schemas/AuthOrgPreferenceInput' + type: array + required: + - auth_type + type: object + GetCustomAccessTokenRequest: + example: + parameter_values: + - values: + - "{}" + - "{}" + name: name + - values: + - "{}" + - "{}" + name: name + org_identifier: org_identifier + objects: + - identifier: identifier + type: LOGICAL_TABLE + - identifier: identifier + type: LOGICAL_TABLE + groups: + - identifier: identifier + - identifier: identifier + display_name: display_name + secret_key: "" + persist_option: REPLACE + password: "" + variable_values: + - values: + - "{}" + - "{}" + name: name + - values: + - "{}" + - "{}" + name: name + validity_time_in_sec: 0 + filter_rules: + - values: + - "{}" + - "{}" + column_name: column_name + operator: EQ + - values: + - "{}" + - "{}" + column_name: column_name + operator: EQ + email: email + auto_create: true + username: username + properties: + username: + description: Username of the ThoughtSpot user. The username is stored in + the `name` attribute of the user object. + type: string + password: + default: "" + description: Password of the user account + type: string + secret_key: + default: "" + description: The secret key string provided by the ThoughtSpot application + server. ThoughtSpot generates a secret key when Trusted authentication + is enabled. + type: string + validity_time_in_sec: + default: 300 + description: Token validity duration in seconds + format: int32 + type: integer + org_identifier: + description: "ID or name of the Org context to log in to. If the Org ID\ + \ or name is not specified but a secret key is provided, the user will\ + \ be logged into the Org associated with the secret key. If neither the\ + \ Org ID/name nor the secret key is provided, the user will be logged\ + \ into the Org context from their previous login session." + type: string + persist_option: + description: Indicates whether the specified attributes should be persisted + or not. RESET and NONE are not applicable if you are setting variable_values. + enum: + - REPLACE + - APPEND + - NONE + - RESET + type: string + filter_rules: + description: Filter rules. + items: + $ref: '#/components/schemas/FilterRules' + type: array + parameter_values: + description: "Allows developers to assign parameter values for existing\ + \ parameters to a user at login. Note: Using parameter values for row\ + \ level security use cases will ultimately be deprecated. Developers can\ + \ still pass data security values via the Custom Access token via the\ + \ variable_values field and create RLS rules based on custom variables.\ + \ Please refer to the [ABAC via RLS documentation](https://developers.thoughtspot.com/docs/abac-user-parameters)\ + \ for more details." + items: + $ref: '#/components/schemas/ParameterValues' + type: array + variable_values: + description: "List of variable values where `name` references an existing\ + \ formula variable and `values` is any value from the corresponding column.\ + \ \n Version: 10.14.0.cl or later\n" + items: + $ref: '#/components/schemas/VariableValues' + type: array + objects: + description: Objects on which the parameter and variable values should be + applied to + items: + $ref: '#/components/schemas/TokenAccessScopeObject' + type: array + email: + description: (just-in-time (JIT) provisioning)Email address of the user. + Specify this attribute when creating a new user. + type: string + display_name: + description: (just-in-time (JIT) provisioning) Indicates display name of + the user. Specify this attribute when creating a new user. + type: string + groups: + description: (just-in-time (JIT) provisioning) ID or name of the groups + to which the newly created user belongs. Specify this attribute when creating + a new user. + items: + $ref: '#/components/schemas/Group_Object' + type: array + auto_create: + default: true + description: " Creates a new user if the specified username does not exist\ + \ in ThoughtSpot. To provision a user just-in-time (JIT), set this attribute\ + \ to true.\n \n\nNote: For JIT provisioning of a user, the secret_key\ + \ is required. New formula variables won't be created. \n Version: 10.5.0.cl\ + \ or later\n" + nullable: true + type: boolean + required: + - persist_option + - username + type: object + GetFullAccessTokenRequest: + example: + secret_key: "" + password: "" + user_parameters: "" + group_identifiers: + - group_identifiers + - group_identifiers + org_id: 6 + validity_time_in_sec: 0 + display_name: display_name + email: email + auto_create: false + username: username + properties: + username: + description: Username of the ThoughtSpot user. The username is stored in + the `name` attribute of the user object. + type: string + password: + default: "" + description: Password of the user account + type: string + secret_key: + default: "" + description: The secret key string provided by the ThoughtSpot application + server. ThoughtSpot generates a secret key when Trusted authentication + is enabled. + type: string + validity_time_in_sec: + default: 300 + description: Token validity duration in seconds + format: int32 + type: integer + org_id: + description: "ID of the Org context to log in to. If the Org ID is not specified\ + \ and secret key is provided then user will be logged into the org corresponding\ + \ to the secret key, and if secret key is not provided then user will\ + \ be logged in to the Org context of their previous login session." + format: int32 + type: integer + email: + description: Email address of the user. Specify this attribute when creating + a new user (just-in-time (JIT) provisioning). + type: string + display_name: + description: Indicates display name of the user. Use this parameter to provision + a user just-in-time (JIT). + type: string + auto_create: + default: false + description: " Creates a new user if the specified username does not already\ + \ exist in ThoughtSpot. To provision a user just-in-time (JIT), set this\ + \ attribute to true.\n \n\nNote: For JIT provisioning of a user, the\ + \ secret_key is required. " + nullable: true + type: boolean + group_identifiers: + description: ID or name of the groups to which the newly created user belongs. + Use this parameter to provision a user just-in-time (JIT). + items: + type: string + type: array + user_parameters: + allOf: + - $ref: '#/components/schemas/User_Parameter_Options' + description: |- +
Deprecated: 10.4.0.cl and later +
+ + Define attributes such as Runtime filters and Runtime parameters to send security entitlements to a user session. For more information, see [Documentation](https://developers.thoughtspot.com/docs/abac-user-parameters). + required: + - username + type: object + GetObjectAccessTokenRequest: + example: + secret_key: "" + password: "" + user_parameters: "" + group_identifiers: + - group_identifiers + - group_identifiers + org_id: 6 + validity_time_in_sec: 0 + display_name: display_name + object_id: object_id + email: email + auto_create: false + username: username + properties: + username: + description: Username of the ThoughtSpot user. The username is stored in + the `name` attribute of the user object. + type: string + object_id: + description: GUID of the ThoughtSpot metadata object that the user can access. + The bearer will only have access to the object specified in the API request. + type: string + password: + default: "" + description: Password of the user account + type: string + secret_key: + default: "" + description: The secret key string provided by the ThoughtSpot application + server. ThoughtSpot generates a secret key when Trusted authentication + is enabled. + type: string + validity_time_in_sec: + default: 300 + description: Token validity duration in seconds + format: int32 + type: integer + org_id: + description: "ID of the Org context to log in to. If the Org ID is not specified\ + \ and secret key is provided then user will be logged into the org corresponding\ + \ to the secret key, and if secret key is not provided then user will\ + \ be logged in to the Org context of their previous login session." + format: int32 + type: integer + email: + description: Email address of the user. Specify this attribute when creating + a new user (just-in-time (JIT) provisioning). + type: string + display_name: + description: Display name of the user. Specify this attribute when creating + a new user (just-in-time (JIT) provisioning). + type: string + auto_create: + default: false + description: " Creates a new user if the specified username does not exist\ + \ in ThoughtSpot. To provision a user just-in-time (JIT), set this attribute\ + \ to true.\n \n\nNote: For JIT provisioning of a user, the secret_key\ + \ is required. " + nullable: true + type: boolean + group_identifiers: + description: Unique ID or name of the groups to which you want to assign + the new user. You can specify this attribute to dynamically assign privileges + during just-in-time (JIT) provisioning. + items: + type: string + type: array + user_parameters: + allOf: + - $ref: '#/components/schemas/User_Parameter_Options' + description: |- +
Deprecated: 10.4.0.cl and later +
+ + Define attributes such as Runtime filters and Runtime parameters to send security entitlements to a user session. For more information, see [Documentation](https://developers.thoughtspot.com/docs/abac-user-parameters). + required: + - username + type: object + LoginRequest: + example: + password: password + org_identifier: org_identifier + remember_me: false + username: username + properties: + username: + description: Username of the ThoughtSpot user + type: string + password: + description: Password of the user account + type: string + org_identifier: + description: "ID of the Org context to log in to. If Org ID is not specified,\ + \ the user will be logged in to the Org context of their previous login\ + \ session." + type: string + remember_me: + default: false + description: "A flag to remember the user session. When set to true, a session\ + \ cookie is created and used in subsequent API requests." + nullable: true + type: boolean + type: object + RevokeTokenRequest: + example: + user_identifier: user_identifier + token: token + properties: + user_identifier: + type: string + token: + type: string + type: object + SearchAuthSettingsRequest: + example: + auth_type: TRUSTED_AUTH + scope: CLUSTER + properties: + auth_type: + description: Type of authentication mechanism to retrieve settings for. + Currently supports TRUSTED_AUTH. + enum: + - TRUSTED_AUTH + type: string + scope: + description: "Scope of auth settings to retrieve. When absent, both cluster\ + \ and org settings are returned (subject to caller privileges). Set to\ + \ CLUSTER to retrieve only cluster-level settings, or ORG to retrieve\ + \ only org-level settings." + enum: + - CLUSTER + - ORG + type: string + required: + - auth_type + type: object + ValidateTokenRequest: + example: + token: token + properties: + token: + type: string + required: + - token + type: object + CreateCollectionRequest: + example: + metadata: + - identifiers: + - identifiers + - identifiers + type: LIVEBOARD + - identifiers: + - identifiers + - identifiers + type: LIVEBOARD + name: name + description: description + properties: + name: + description: Name of the collection. + type: string + description: + description: Description of the collection. + type: string + metadata: + description: Metadata objects to add to the collection. + items: + $ref: '#/components/schemas/CollectionMetadataInput' + type: array + required: + - name + type: object + DeleteCollectionRequest: + example: + dry_run: false + collection_identifiers: + - collection_identifiers + - collection_identifiers + delete_children: false + properties: + collection_identifiers: + description: |- + Unique GUIDs of collections to delete. Note: Collection names cannot be + used as identifiers since duplicate names are allowed. + items: + type: string + type: array + delete_children: + default: false + description: Flag to delete child objects of the collection that the user + has access to. + nullable: true + type: boolean + dry_run: + default: false + description: |- + Preview deletion without actually deleting. When set to true, returns + what would be deleted without performing the actual deletion. + nullable: true + type: boolean + required: + - collection_identifiers + type: object + SearchCollectionsRequest: + example: + created_by_user_identifiers: + - created_by_user_identifiers + - created_by_user_identifiers + name_pattern: name_pattern + record_size: 6 + include_metadata: false + collection_identifiers: + - collection_identifiers + - collection_identifiers + sort_options: "" + record_offset: 0 + properties: + name_pattern: + description: |- + A pattern to match case-insensitive name of the Collection object. + Use '%' for wildcard match. + type: string + record_offset: + default: 0 + description: The starting record number from where the records should be + included. + format: int32 + type: integer + record_size: + default: 10 + description: |- + The number of records that should be included. + -1 implies no pagination. + format: int32 + type: integer + collection_identifiers: + description: |- + Unique GUIDs of collections to search. Note: Collection names cannot be + used as identifiers since duplicate names are allowed. + items: + type: string + type: array + created_by_user_identifiers: + description: |- + Filter collections by author. Provide unique IDs or names of users + who created the collections. + items: + type: string + type: array + include_metadata: + default: false + description: Include collection metadata items in the response. + nullable: true + type: boolean + sort_options: + allOf: + - $ref: '#/components/schemas/SortOptions' + description: Sort options. + type: object + UpdateCollectionRequest: + example: + metadata: + - identifiers: + - identifiers + - identifiers + type: LIVEBOARD + - identifiers: + - identifiers + - identifiers + type: LIVEBOARD + name: name + description: description + operation: REPLACE + properties: + name: + description: Name of the collection. + type: string + description: + description: Description of the collection. + type: string + metadata: + description: "Metadata objects to add, remove, or replace in the collection." + items: + $ref: '#/components/schemas/CollectionMetadataInput' + type: array + operation: + default: REPLACE + description: Type of update operation. Default operation type is REPLACE. + enum: + - ADD + - REMOVE + - REPLACE + type: string + type: object + ConnectionConfigurationSearchRequest: + example: + policy_type: NO_POLICY + configuration_identifier: configuration_identifier + connection_identifier: connection_identifier + properties: + connection_identifier: + description: Unique ID or name of the connection. + type: string + configuration_identifier: + description: Unique ID or name of the configuration. + type: string + policy_type: + description: Type of policy. + enum: + - NO_POLICY + - PRINCIPALS + - PROCESSES + type: string + required: + - connection_identifier + type: object + CreateConnectionConfigurationRequest: + example: + policy_process_options: "" + policy_type: NO_POLICY + configuration: "{}" + name: name + same_as_parent: false + description: description + policy_principals: + - policy_principals + - policy_principals + authentication_type: SERVICE_ACCOUNT + policy_processes: + - SAGE_INDEXING + - SAGE_INDEXING + connection_identifier: connection_identifier + properties: + name: + description: Unique name for the configuration. + type: string + description: + description: Description of the configuration. + type: string + connection_identifier: + description: Unique ID or name of the connection. + type: string + same_as_parent: + default: false + description: "Specifies whether the connection configuration should inherit\ + \ all properties and authentication\ntype from its parent connection.\ + \ This attribute is only applicable to parameterized connections.\nWhen\ + \ set to true, the configuration uses only the connection properties and\ + \ authentication type\ninherited from the parent. \n Version: 26.2.0.cl\ + \ or later\n" + nullable: true + type: boolean + policy_process_options: + allOf: + - $ref: '#/components/schemas/PolicyProcessOptionsInput' + description: "This attribute is only applicable to parameterized connections.\ + \ Ensure that the policy is\nset to Processes to allow the configuration\ + \ to be used exclusively for system processes. \n Version: 26.2.0.cl\ + \ or later\n" + authentication_type: + default: SERVICE_ACCOUNT + description: Type of authentication used for the connection. + enum: + - SERVICE_ACCOUNT + - KEY_PAIR + - PERSONAL_ACCESS_TOKEN + - OAUTH_WITH_SERVICE_PRINCIPAL + - OAUTH_CLIENT_CREDENTIALS + type: string + configuration: + description: Configuration properties in JSON. + type: object + policy_type: + default: NO_POLICY + description: Type of policy. + enum: + - NO_POLICY + - PRINCIPALS + - PROCESSES + type: string + policy_principals: + description: Unique ID or name of the User and User Groups. + items: + type: string + type: array + policy_processes: + description: "Action that the query performed on the data warehouse, such\ + \ as SAGE_INDEXING and ROW_COUNT_STATS." + items: + enum: + - SAGE_INDEXING + - ROW_COUNT_STATS + type: string + type: array + required: + - configuration + - connection_identifier + - name + type: object + DeleteConnectionConfigurationRequest: + example: + configuration_identifier: configuration_identifier + connection_identifier: connection_identifier + properties: + configuration_identifier: + description: Unique ID or name of the configuration. + type: string + connection_identifier: + description: Unique ID or name of the connection. + type: string + required: + - configuration_identifier + - connection_identifier + type: object + UpdateConnectionConfigurationRequest: + example: + policy_process_options: "" + policy_type: NO_POLICY + configuration: "{}" + disable: false + name: name + same_as_parent: false + description: description + policy_principals: + - policy_principals + - policy_principals + authentication_type: SERVICE_ACCOUNT + policy_processes: + - SAGE_INDEXING + - SAGE_INDEXING + connection_identifier: connection_identifier + properties: + connection_identifier: + description: Unique ID or name of the connection. + type: string + name: + description: Name of the configuration to update. + type: string + description: + description: Description of the configuration. + type: string + same_as_parent: + default: false + description: "Specifies whether the connection configuration should inherit\ + \ all properties and authentication\ntype from its parent connection.\ + \ This attribute is only applicable to parameterized connections.\nWhen\ + \ set to true, the configuration uses only the connection properties and\ + \ authentication type\ninherited from the parent. \n Version: 26.2.0.cl\ + \ or later\n" + nullable: true + type: boolean + policy_process_options: + allOf: + - $ref: '#/components/schemas/PolicyProcessOptionsInput' + description: "This attribute is only applicable to parameterized connections.\ + \ Ensure that the policy is\nset to Processes to allow the configuration\ + \ to be used exclusively for system processes. \n Version: 26.2.0.cl\ + \ or later\n" + authentication_type: + description: Type of authentication. + enum: + - SERVICE_ACCOUNT + - OAUTH + - OAUTH_WITH_SERVICE_PRINCIPAL + - EXTOAUTH + - KEY_PAIR + - EXTOAUTH_WITH_PKCE + - OAUTH_WITH_PKCE + - PERSONAL_ACCESS_TOKEN + - OAUTH_CLIENT_CREDENTIALS + type: string + configuration: + description: Configuration properties in JSON. + type: object + policy_type: + description: Type of policy. + enum: + - NO_POLICY + - PRINCIPALS + - PROCESSES + type: string + policy_principals: + description: Unique ID or name of the User and User Groups. + items: + type: string + type: array + policy_processes: + description: "Action that the query performed on the data warehouse, such\ + \ as SAGE_INDEXING and ROW_COUNT_STATS." + items: + enum: + - SAGE_INDEXING + - ROW_COUNT_STATS + type: string + type: array + disable: + default: false + description: Indicates whether the configuration enable/disable. + nullable: true + type: boolean + required: + - connection_identifier + type: object + CreateConnectionRequest: + example: + data_warehouse_config: "{}" + name: name + description: description + data_warehouse_type: SNOWFLAKE + validate: true + properties: + name: + description: Unique name for the connection. + type: string + description: + description: Description of the connection. + type: string + data_warehouse_type: + description: Type of the data warehouse. + enum: + - SNOWFLAKE + - AMAZON_REDSHIFT + - GOOGLE_BIGQUERY + - AZURE_SYNAPSE + - TERADATA + - SAP_HANA + - STARBURST + - ORACLE_ADW + - DATABRICKS + - DENODO + - DREMIO + - TRINO + - PRESTO + - POSTGRES + - SQLSERVER + - MYSQL + - GENERIC_JDBC + - AMAZON_RDS_POSTGRESQL + - AMAZON_AURORA_POSTGRESQL + - AMAZON_RDS_MYSQL + - AMAZON_AURORA_MYSQL + - LOOKER + - AMAZON_ATHENA + - SINGLESTORE + - GCP_SQLSERVER + - GCP_ALLOYDB_POSTGRESQL + - GCP_POSTGRESQL + - GCP_MYSQL + - MODE + - GOOGLE_SHEETS + - FALCON + - FALCON_ONPREM + - CLICKHOUSE + - IOMETE + type: string + data_warehouse_config: + description: "Connection configuration attributes in JSON format. To create\ + \ a connection with tables, include table attributes. See the documentation\ + \ above for sample JSON." + type: object + validate: + default: true + description: "Validates the connection metadata if tables are included.\ + \ If you are creating a connection without tables, specify `false`." + nullable: true + type: boolean + required: + - data_warehouse_config + - data_warehouse_type + - name + type: object + DeleteConnectionRequest: + example: + connection_identifier: connection_identifier + properties: + connection_identifier: + description: Unique ID or name of the connection. + type: string + required: + - connection_identifier + type: object + RevokeRefreshTokensRequest: + example: + configuration_identifiers: + - configuration_identifiers + - configuration_identifiers + org_identifiers: + - org_identifiers + - org_identifiers + user_identifiers: + - user_identifiers + - user_identifiers + properties: + configuration_identifiers: + description: "Unique ID or name of the configuration. When provided, the\ + \ refresh tokens of the users associated with the connection configuration\ + \ will be revoked." + items: + type: string + type: array + user_identifiers: + description: "Unique ID or name of the users. When provided, the refresh\ + \ tokens of the specified users will be revoked. If the request includes\ + \ the user ID or name of the connection author, their token will also\ + \ be revoked." + items: + type: string + type: array + org_identifiers: + description: "Unique ID or name of the Org. When provided, the refresh tokens\ + \ of all users associated with the published connection in the Org will\ + \ be revoked. This parameter is valid only for published connections.\ + \ Using it with unpublished connections will result in an error." + items: + type: string + type: array + type: object + SearchConnectionRequest: + example: + tag_identifiers: + - tag_identifiers + - tag_identifiers + configuration: "{}" + record_size: 6 + data_warehouse_types: + - SNOWFLAKE + - SNOWFLAKE + data_warehouse_object_type: DATABASE + include_details: true + authentication_type: SERVICE_ACCOUNT + connections: + - identifier: identifier + data_warehouse_objects: + - schema: schema + database: database + column: column + table: table + - schema: schema + database: database + column: column + table: table + name_pattern: name_pattern + - identifier: identifier + data_warehouse_objects: + - schema: schema + database: database + column: column + table: table + - schema: schema + database: database + column: column + table: table + name_pattern: name_pattern + sort_options: "" + show_resolved_parameters: false + record_offset: 0 + properties: + connections: + description: List of connections and name pattern + items: + $ref: '#/components/schemas/ConnectionInput' + type: array + data_warehouse_types: + description: Array of types of data warehouse defined for the connection. + items: + enum: + - SNOWFLAKE + - AMAZON_REDSHIFT + - GOOGLE_BIGQUERY + - AZURE_SYNAPSE + - TERADATA + - SAP_HANA + - STARBURST + - ORACLE_ADW + - DATABRICKS + - DENODO + - DREMIO + - TRINO + - PRESTO + - POSTGRES + - SQLSERVER + - MYSQL + - GENERIC_JDBC + - AMAZON_RDS_POSTGRESQL + - AMAZON_AURORA_POSTGRESQL + - AMAZON_RDS_MYSQL + - AMAZON_AURORA_MYSQL + - LOOKER + - AMAZON_ATHENA + - SINGLESTORE + - GCP_SQLSERVER + - GCP_ALLOYDB_POSTGRESQL + - GCP_POSTGRESQL + - GCP_MYSQL + - MODE + - GOOGLE_SHEETS + - FALCON + - FALCON_ONPREM + - CLICKHOUSE + - IOMETE + type: string + type: array + record_offset: + default: 0 + description: The starting record number from where the records should be + included. + format: int32 + type: integer + record_size: + default: 10 + description: The number of records that should be included. + format: int32 + type: integer + tag_identifiers: + description: Unique ID or name of tags. + items: + type: string + type: array + data_warehouse_object_type: + description: Data warehouse object type. + enum: + - DATABASE + - SCHEMA + - TABLE + - COLUMN + type: string + sort_options: + allOf: + - $ref: '#/components/schemas/SortOptionInput' + description: Sort options. + include_details: + description: Indicates whether to include complete details of the connection + objects. + nullable: true + type: boolean + configuration: + description: "Configuration values. If empty we are fetching configuration\ + \ from datasource based on given connection id. If required you can provide\ + \ config details to fetch specific details. Example input: {}, {\"warehouse\"\ + :\"SMALL_WH\",\"database\":\"DEVELOPMENT\"}. This is only applicable when\ + \ data_warehouse_object_type is selected." + type: object + authentication_type: + default: SERVICE_ACCOUNT + description: List of authentication types to fetch data_ware_house_objects + from external Data warehouse. This is only applicable when data_warehouse_object_type + is selected. + enum: + - SERVICE_ACCOUNT + - OAUTH + - IAM + - EXTOAUTH + - OAUTH_WITH_SERVICE_PRINCIPAL + - PERSONAL_ACCESS_TOKEN + - KEY_PAIR + - OAUTH_WITH_PKCE + - EXTOAUTH_WITH_PKCE + - OAUTH_WITH_PEZ + - OAUTH_CLIENT_CREDENTIALS + type: string + show_resolved_parameters: + default: false + description: |- +
Version: 10.9.0.cl or later +
+ + Indicates whether to show resolved parameterised values. + nullable: true + type: boolean + type: object + SyncMetadataRequest: + example: + tables: "{}" + sync_attributes: + - DESCRIPTION + - DESCRIPTION + properties: + tables: + description: |- + Array of tables to sync. Each element can be: + - String: Table identifier (GUID or name) to sync + all columns for that table. + - Object: {tableId: [columnIds]} to sync specific + columns. + If not provided, syncs all tables in the connection. + type: object + sync_attributes: + default: + - DESCRIPTION + description: |- + List of sync_attributes to sync from CDW. + The default value is DESCRIPTION. + items: + enum: + - DESCRIPTION + type: string + type: array + type: object + UpdateConnectionRequest: + example: + data_warehouse_config: "{}" + name: name + description: description + connection_identifier: connection_identifier + validate: true + properties: + connection_identifier: + description: Unique ID or name of the connection. + type: string + name: + description: Updated name of the connection. + type: string + description: + description: Updated description of the connection. + type: string + data_warehouse_config: + description: Configuration of the data warehouse in JSON. + type: object + validate: + default: true + description: Indicates whether to validate the connection details. + nullable: true + type: boolean + required: + - connection_identifier + type: object + UpdateConnectionStatusRequest: + example: + status: ACTIVATED + properties: + status: + default: ACTIVATED + description: Status to set for the connection. Use ACTIVATED to enable the + connection or DEACTIVATED to disable it. + enum: + - ACTIVATED + - DEACTIVATED + type: string + type: object + UpdateConnectionV2Request: + example: + data_warehouse_config: "{}" + name: name + description: description + validate: true + properties: + name: + description: Updated name of the connection. + type: string + description: + description: Updated description of the connection. + type: string + data_warehouse_config: + description: Configuration of the data warehouse in JSON. + type: object + validate: + default: true + description: Indicates whether to validate the connection details. + nullable: true + type: boolean + type: object + CreateCustomActionRequest: + example: + action_details: "" + default_action_config: "" + group_identifiers: + - group_identifiers + - group_identifiers + name: name + associate_metadata: + - identifier: identifier + type: VISUALIZATION + action_config: + visibility: true + position: MENU + - identifier: identifier + type: VISUALIZATION + action_config: + visibility: true + position: MENU + properties: + name: + description: Name of the custom action. The custom action name must be unique. + type: string + action_details: + allOf: + - $ref: '#/components/schemas/Action_Details_Input_Create' + description: "Action details includes `Type` and Configuration data for\ + \ Custom Actions, either Callback or URL is required." + associate_metadata: + description: Metadata objects to which the custom action needs to be associated. + items: + $ref: '#/components/schemas/Associate_Metadata_Input_Create' + type: array + default_action_config: + allOf: + - $ref: '#/components/schemas/Default_Action_Config_Input_Create' + description: "Default Custom action configuration. This includes if the\ + \ custom action is available on all visualizations. By default, a custom\ + \ action is added to all visualizations and Answers." + group_identifiers: + description: Unique ID or name of the groups that can view and access the + custom action. + items: + type: string + type: array + required: + - action_details + - name + type: object + SearchCustomActionsRequest: + example: + include_metadata_associations: false + metadata: + - identifier: identifier + type: VISUALIZATION + - identifier: identifier + type: VISUALIZATION + custom_action_identifier: custom_action_identifier + default_action_config: "" + name_pattern: name_pattern + include_group_associations: false + type: CALLBACK + properties: + custom_action_identifier: + description: Name or ID of the custom action. + type: string + name_pattern: + description: A pattern to match case-insensitive name of the custom-action + object. + type: string + default_action_config: + allOf: + - $ref: '#/components/schemas/Default_Action_Config_Search_Input' + description: "Default Custom action configuration. This includes if the\ + \ custom action is available on all visualizations. By default, a custom\ + \ action is added to all visualizations and Answers." + include_group_associations: + default: false + description: "When set to true, returns the associated groups for a custom\ + \ action." + nullable: true + type: boolean + include_metadata_associations: + default: false + description: "When set to true, returns the associated metadata for a custom\ + \ action." + nullable: true + type: boolean + metadata: + description: Search with a given metadata identifier. + items: + $ref: '#/components/schemas/CustomActionMetadataTypeInput' + type: array + type: + description: Filter the action objects based on type + enum: + - CALLBACK + - URL + type: string + type: object + UpdateCustomActionRequest: + example: + action_details: "" + default_action_config: "" + group_identifiers: + - group_identifiers + - group_identifiers + name: name + operation: ADD + associate_metadata: + - identifier: identifier + type: VISUALIZATION + action_config: + visibility: true + position: MENU + - identifier: identifier + type: VISUALIZATION + action_config: + visibility: true + position: MENU + properties: + action_details: + allOf: + - $ref: '#/components/schemas/Action_Details_Input' + description: "Action details includes `Type` and Configuration for Custom\ + \ Actions, either Callback or URL is required." + associate_metadata: + description: Metadata objects to which the custom action needs to be associated. + items: + $ref: '#/components/schemas/Associate_Metadata_Input' + type: array + default_action_config: + allOf: + - $ref: '#/components/schemas/Default_Action_Config_Input' + description: "Default Custom action configuration. This includes if the\ + \ custom action available on visualizations and Answers. By default, a\ + \ custom action is added to all visualizations and Answers." + group_identifiers: + description: Unique ID or name of the groups that can view and access the + custom action. + items: + type: string + type: array + name: + description: Name of the custom action. The custom action name must be unique. + type: string + operation: + default: ADD + description: Type of update operation. Default operation type is ADD + enum: + - ADD + - REMOVE + type: string + type: object + CreateCalendarRequest: + example: + end_date: end_date + creation_method: FROM_INPUT_PARAMS + start_day_of_week: Sunday + name: name + calendar_type: MONTH_OFFSET + table_reference: "" + year_name_prefix: "" + month_offset: January + start_date: start_date + quarter_name_prefix: "" + properties: + name: + description: Name of the custom calendar. + type: string + creation_method: + description: Type of create operation. + enum: + - FROM_INPUT_PARAMS + - FROM_EXISTING_TABLE + type: string + table_reference: + allOf: + - $ref: '#/components/schemas/ExternalTableInput' + description: "Table reference containing connection identifier and table\ + \ details in this format: `{\"connection_identifier\":\"conn1\", \"database_name\"\ + :\"db1\", \"schema_name\":\"sc1\", \"table_name\":\"tb1\"}`. The given\ + \ table will be created if `creation_method` is set as `FROM_INPUT_PARAMS`." + start_date: + description: Start date for the calendar in `MM/dd/yyyy` format. This parameter + is mandatory if `creation_method` is set as `FROM_INPUT_PARAMS`. + type: string + end_date: + description: End date for the calendar in `MM/dd/yyyy` format. This parameter + is mandatory if `creation_method` is set as `FROM_INPUT_PARAMS`. + type: string + calendar_type: + default: MONTH_OFFSET + description: Type of the calendar. + enum: + - MONTH_OFFSET + - FOUR_FOUR_FIVE + - FOUR_FIVE_FOUR + - FIVE_FOUR_FOUR + type: string + month_offset: + default: January + description: "Specify the month in which the fiscal or custom calendar year\ + \ should start. For example, if you set `month_offset` to \"April\", the\ + \ custom calendar will treat \"April\" as the first month of the year,\ + \ and the related attributes such as quarters and start date will be based\ + \ on this offset. The default value is `January`, which represents the\ + \ standard calendar year (January to December)." + enum: + - January + - February + - March + - April + - May + - June + - July + - August + - September + - October + - November + - December + type: string + start_day_of_week: + default: Sunday + description: Specify the starting day of the week. + enum: + - Sunday + - Monday + - Tuesday + - Wednesday + - Thursday + - Friday + - Saturday + type: string + quarter_name_prefix: + default: "" + description: Prefix to add before the quarter. + type: string + year_name_prefix: + default: "" + description: Prefix to add before the year. + type: string + required: + - creation_method + - name + - table_reference + type: object + GenerateCSVRequest: + example: + end_date: end_date + start_day_of_week: Sunday + calendar_type: MONTH_OFFSET + year_name_prefix: year_name_prefix + month_offset: January + start_date: start_date + quarter_name_prefix: quarter_name_prefix + properties: + start_date: + description: Start date for the calendar in `MM/dd/yyyy` format. + type: string + end_date: + description: End date for the calendar in `MM/dd/yyyy` format. + type: string + calendar_type: + default: MONTH_OFFSET + description: Type of the calendar. + enum: + - MONTH_OFFSET + - FOUR_FOUR_FIVE + - FOUR_FIVE_FOUR + - FIVE_FOUR_FOUR + type: string + month_offset: + default: January + description: Month offset to start calendar from `January`. + enum: + - January + - February + - March + - April + - May + - June + - July + - August + - September + - October + - November + - December + type: string + start_day_of_week: + default: Sunday + description: Specify the starting day of the week. + enum: + - Sunday + - Monday + - Tuesday + - Wednesday + - Thursday + - Friday + - Saturday + type: string + quarter_name_prefix: + description: Prefix to add before the quarter. + type: string + year_name_prefix: + description: Prefix to add before the year. + type: string + required: + - end_date + - start_date + type: object + SearchCalendarsRequest: + example: + name_pattern: name_pattern + record_size: 6 + sort_options: "" + connection_identifier: connection_identifier + record_offset: 0 + properties: + connection_identifier: + description: Unique ID or name of the connection. + type: string + name_pattern: + description: Pattern to match for calendar names (use '%' for wildcard match). + type: string + record_offset: + default: 0 + description: The starting record number from where the records should be + included. + format: int32 + type: integer + record_size: + default: 10 + description: The number of records that should be included. + format: int32 + type: integer + sort_options: + allOf: + - $ref: '#/components/schemas/SortOption' + description: Sort options. + type: object + UpdateCalendarRequest: + example: + end_date: end_date + start_day_of_week: Sunday + update_method: FROM_INPUT_PARAMS + calendar_type: MONTH_OFFSET + table_reference: "" + year_name_prefix: "" + month_offset: January + start_date: start_date + quarter_name_prefix: "" + properties: + update_method: + default: FROM_INPUT_PARAMS + description: Type of update operation. + enum: + - FROM_INPUT_PARAMS + - FROM_EXISTING_TABLE + type: string + table_reference: + allOf: + - $ref: '#/components/schemas/ExternalTableInput' + description: "Table reference containing connection identifier and table\ + \ details in this format: `{\"connection_identifier\":\"conn1\", \"database_name\"\ + :\"db1\", \"schema_name\":\"sc1\", \"table_name\":\"tb1\"}`." + start_date: + description: Start date for the calendar in `MM/dd/yyyy` format. This parameter + is mandatory if `update_method` is set as `FROM_INPUT_PARAMS`. + type: string + end_date: + description: End date for the calendar in `MM/dd/yyyy` format. This parameter + is mandatory if `update_method` is set as `FROM_INPUT_PARAMS`. + type: string + calendar_type: + default: MONTH_OFFSET + description: Type of the calendar. + enum: + - MONTH_OFFSET + - FOUR_FOUR_FIVE + - FOUR_FIVE_FOUR + - FIVE_FOUR_FOUR + type: string + month_offset: + default: January + description: "Specify the month in which the fiscal or custom calendar year\ + \ should start. For example, if you set `month_offset` to \"April\", the\ + \ custom calendar will treat \"April\" as the first month of the year,\ + \ and the related attributes such as quarters and start date will be based\ + \ on this offset. The default value is `January`, which represents the\ + \ standard calendar year (January to December)." + enum: + - January + - February + - March + - April + - May + - June + - July + - August + - September + - October + - November + - December + type: string + start_day_of_week: + default: Sunday + description: Specify the starting day of the week + enum: + - Sunday + - Monday + - Tuesday + - Wednesday + - Thursday + - Friday + - Saturday + type: string + quarter_name_prefix: + default: "" + description: Prefix to add before the quarter. + type: string + year_name_prefix: + default: "" + description: Prefix to add before the year. + type: string + required: + - table_reference + type: object + FetchAnswerDataRequest: + example: + data_format: COMPACT + runtime_filter: "{}" + metadata_identifier: metadata_identifier + record_size: 6 + runtime_sort: "{}" + runtime_param_override: "{}" + record_offset: 0 + properties: + metadata_identifier: + description: GUID or name of the Answer. + type: string + data_format: + default: COMPACT + description: JSON output in compact or full format. The FULL option is available + in 9.12.5.cl or later. + enum: + - FULL + - COMPACT + type: string + record_offset: + default: 0 + description: The starting record number from where the records should be + included. + format: int32 + type: integer + record_size: + default: 10 + description: The number of records to include in a batch. + format: int32 + type: integer + runtime_filter: + description: "JSON object with representing filter condition to apply filters\ + \ at runtime. For example, {\"col1\": \"item type\", \"op1\": \"\ + EQ\", \"val1\": \"Bags\"} . You can add multiple keys by incrementing\ + \ the number at the end, for example, col2, op2, val2, and col3, op3,\ + \ val3. For more information, see [API Documentation](https://developers.thoughtspot.com/docs/fetch-data-and-report-apis#_runtime_filters)." + type: object + runtime_sort: + description: "JSON object representing columns to sort data at runtime.\ + \ For example, {\"sortCol1\": \"sales\", \"asc1\": true} .\ + \ You can add multiple keys by incrementing the number at the end, for\ + \ example, sortCol1, asc2. For more information, see [API Documentation](https://developers.thoughtspot.com/docs/fetch-data-and-report-apis#_runtime_sort)." + type: object + runtime_param_override: + description: "JSON object for setting values of parameters at runtime. For\ + \ example, {\"param1\": \"Double List Param\", \"paramVal1\": 0.5}.\ + \ You can add multiple keys by incrementing the number at the end, for\ + \ example, param2, paramVal2. For more information, see [API Documentation](https://developers.thoughtspot.com/docs/fetch-data-and-report-apis#_runtime_parameters)." + type: object + required: + - metadata_identifier + type: object + FetchLiveboardDataRequest: + example: + data_format: COMPACT + runtime_filter: "{}" + metadata_identifier: metadata_identifier + record_size: 6 + visualization_identifiers: + - visualization_identifiers + - visualization_identifiers + runtime_sort: "{}" + transient_content: transient_content + runtime_param_override: "{}" + record_offset: 0 + properties: + metadata_identifier: + description: GUID or name of the Liveboard. + type: string + visualization_identifiers: + description: GUIDs or names of the visualizations on the Liveboard. + items: + type: string + type: array + transient_content: + description: Transient content of the Liveboard. + type: string + data_format: + default: COMPACT + description: JSON output in compact or full format. The FULL option is available + in 9.12.5.cl or later. + enum: + - FULL + - COMPACT + type: string + record_offset: + default: 0 + description: The starting record number from where the records should be + included. + format: int32 + type: integer + record_size: + default: 10 + description: The number of records to include in a batch. + format: int32 + type: integer + runtime_filter: + description: "JSON object with representing filter condition to apply filters\ + \ at runtime. For example, {\"col1\": \"item type\", \"op1\": \"\ + EQ\", \"val1\": \"Bags\"} . You can add multiple keys by incrementing\ + \ the number at the end, for example, col2, op2, val2, and col3, op3,\ + \ val3. For more information, see [API Documentation](https://developers.thoughtspot.com/docs/fetch-data-and-report-apis#_runtime_filters)." + type: object + runtime_sort: + description: "JSON object representing columns to sort data at runtime.\ + \ For example, {\"sortCol1\": \"sales\", \"asc1\": true} .\ + \ You can add multiple keys by incrementing the number at the end, for\ + \ example, sortCol1, asc2. For more information, see [API Documentation](https://developers.thoughtspot.com/docs/fetch-data-and-report-apis#_runtime_sort)." + type: object + runtime_param_override: + description: "JSON object for setting values of parameters at runtime. For\ + \ example, {\"param1\": \"Double List Param\", \"paramVal1\": 0.5}.\ + \ You can add multiple keys by incrementing the number at the end, for\ + \ example, param2, paramVal2. For more information, see [API Documentation](https://developers.thoughtspot.com/docs/fetch-data-and-report-apis#_runtime_parameters)." + type: object + required: + - metadata_identifier + type: object + SearchDataRequest: + example: + data_format: COMPACT + runtime_filter: "{}" + logical_table_identifier: logical_table_identifier + record_size: 6 + runtime_sort: "{}" + runtime_param_override: "{}" + query_string: query_string + record_offset: 0 + properties: + query_string: + description: "Query string with search tokens. For example, [Sales][Region].\ + \ See [API Documentation](https://developers.thoughtspot.com/docs/fetch-data-and-report-apis#_search_data_api)" + type: string + logical_table_identifier: + description: "GUID of the data source object, such as a Worksheet, View,\ + \ or Table. You can find the GUID of a data object from the UI or via\ + \ API. See [API Documentation](https://developers.thoughtspot.com/docs/fetch-data-and-report-apis#_search_query)\ + \ for more details." + type: string + data_format: + default: COMPACT + description: JSON output in compact or full format. The FULL option is available + in 9.12.5.cl or later. + enum: + - FULL + - COMPACT + type: string + record_offset: + default: 0 + description: The starting record number from where the records should be + included. + format: int32 + type: integer + record_size: + default: 10 + description: The number of records to include in a batch. + format: int32 + type: integer + runtime_filter: + description: "JSON object with representing filter condition to apply filters\ + \ at runtime. For example, {\"col1\": \"item type\", \"op1\": \"\ + EQ\", \"val1\": \"Bags\"} . You can add multiple keys by incrementing\ + \ the number at the end, for example, col2, op2, val2, and col3, op3,\ + \ val3. For more information, see [API Documentation](https://developers.thoughtspot.com/docs/fetch-data-and-report-apis#_runtime_filters)." + type: object + runtime_sort: + description: "JSON object representing columns to sort data at runtime.\ + \ For example, {\"sortCol1\": \"sales\", \"asc1\": true} .\ + \ You can add multiple keys by incrementing the number at the end, for\ + \ example, sortCol1, asc2. For more information, see [API Documentation](https://developers.thoughtspot.com/docs/fetch-data-and-report-apis#_runtime_sort)." + type: object + runtime_param_override: + description: "JSON object for setting values of parameters at runtime. For\ + \ example, {\"param1\": \"Double List Param\", \"paramVal1\": 0.5}.\ + \ You can add multiple keys by incrementing the number at the end, for\ + \ example, param2, paramVal2. For more information, see [API Documentation](https://developers.thoughtspot.com/docs/fetch-data-and-report-apis#_runtime_parameters)." + type: object + required: + - logical_table_identifier + - query_string + type: object + CreateEmailCustomizationRequest: + example: + org_identifier: org_identifier + template_properties: "" + properties: + template_properties: + allOf: + - $ref: '#/components/schemas/Template_Properties_Input_Create' + description: Email customization configuration as key value pair + org_identifier: + description: "Unique ID or name of org \n Version: 10.12.0.cl or later\n" + type: string + required: + - template_properties + type: object + DeleteOrgEmailCustomizationRequest: + example: + org_identifiers: + - org_identifiers + - org_identifiers + properties: + org_identifiers: + description: Unique identifier of the organization. + items: + type: string + type: array + type: object + SearchEmailCustomizationRequest: + example: + org_identifiers: + - org_identifiers + - org_identifiers + properties: + org_identifiers: + description: "Unique ID or name of org \n Version: 10.12.0.cl or later\n" + items: + type: string + type: array + type: object + UpdateEmailCustomizationRequest: + example: + org_identifier: org_identifier + template_properties: "" + properties: + template_properties: + allOf: + - $ref: '#/components/schemas/Template_Properties_Input_Create' + description: Email customization configuration as key value pair + org_identifier: + description: Unique ID or name of org + type: string + required: + - template_properties + type: object + CreateUserGroupRequest: + example: + privileges: + - ADMINISTRATION + - ADMINISTRATION + role_identifiers: + - role_identifiers + - role_identifiers + visibility: SHARABLE + name: name + sub_group_identifiers: + - sub_group_identifiers + - sub_group_identifiers + description: description + default_liveboard_identifiers: + - default_liveboard_identifiers + - default_liveboard_identifiers + user_identifiers: + - user_identifiers + - user_identifiers + display_name: display_name + type: LOCAL_GROUP + properties: + name: + description: Name of the group. The group name must be unique. + type: string + display_name: + description: Display name for the group. + type: string + default_liveboard_identifiers: + description: GUID of the Liveboards to assign as default Liveboards to the + users in the group. + items: + type: string + type: array + description: + description: Description of the group + type: string + privileges: + description: Privileges to assign to the group + items: + enum: + - ADMINISTRATION + - AUTHORING + - USERDATAUPLOADING + - DATADOWNLOADING + - USERMANAGEMENT + - DATAMANAGEMENT + - SHAREWITHALL + - JOBSCHEDULING + - A3ANALYSIS + - EXPERIMENTALFEATUREPRIVILEGE + - BYPASSRLS + - RANALYSIS + - DEVELOPER + - USER_ADMINISTRATION + - GROUP_ADMINISTRATION + - SYNCMANAGEMENT + - CAN_CREATE_CATALOG + - DISABLE_PINBOARD_CREATION + - LIVEBOARD_VERIFIER + - PREVIEW_THOUGHTSPOT_SAGE + - CAN_MANAGE_VERSION_CONTROL + - THIRDPARTY_ANALYSIS + - ALLOW_NON_EMBED_FULL_APP_ACCESS + - CAN_ACCESS_ANALYST_STUDIO + - CAN_MANAGE_ANALYST_STUDIO + - CAN_MODIFY_FOLDERS + - CAN_MANAGE_VARIABLES + - CAN_VIEW_FOLDERS + - CAN_MANAGE_AGENTSPOT + - CAN_ACCESS_AGENTSPOT + - PREVIEW_DOCUMENT_SEARCH + - CAN_SETUP_VERSION_CONTROL + - CAN_DOWNLOAD_VISUALS + - CAN_DOWNLOAD_DETAILED_DATA + - CAN_USE_SPOTTER + type: string + type: array + sub_group_identifiers: + description: GUID or name of the sub groups. A subgroup is a group assigned + to a parent group. + items: + type: string + type: array + type: + default: LOCAL_GROUP + description: Group type. + enum: + - LOCAL_GROUP + - LDAP_GROUP + - TEAM_GROUP + - TENANT_GROUP + type: string + user_identifiers: + description: GUID or name of the users to assign to the group. + items: + type: string + type: array + visibility: + default: SHARABLE + description: |- + Visibility of the group. To make a group visible to other users and groups, + set the visibility to SHAREABLE. + enum: + - SHARABLE + - NON_SHARABLE + type: string + role_identifiers: + description: Role identifiers of the roles that should be assigned to the + group. + items: + type: string + type: array + required: + - display_name + - name + type: object + ImportUserGroupsRequest: + example: + delete_unspecified_groups: false + groups: + - privileges: + - ADMINISTRATION + - ADMINISTRATION + visibility: SHARABLE + group_identifier: group_identifier + sub_group_identifiers: + - sub_group_identifiers + - sub_group_identifiers + description: description + default_liveboard_identifiers: + - default_liveboard_identifiers + - default_liveboard_identifiers + user_identifiers: + - user_identifiers + - user_identifiers + display_name: display_name + type: LOCAL_GROUP + - privileges: + - ADMINISTRATION + - ADMINISTRATION + visibility: SHARABLE + group_identifier: group_identifier + sub_group_identifiers: + - sub_group_identifiers + - sub_group_identifiers + description: description + default_liveboard_identifiers: + - default_liveboard_identifiers + - default_liveboard_identifiers + user_identifiers: + - user_identifiers + - user_identifiers + display_name: display_name + type: LOCAL_GROUP + dry_run: true + properties: + groups: + description: Details of groups which are to be imported + items: + $ref: '#/components/schemas/GroupsImportListInput' + type: array + delete_unspecified_groups: + default: false + description: "If set to true, removes groups that are not specified in the\ + \ API request." + nullable: true + type: boolean + dry_run: + default: true + description: |- + If true, the API performs a test operation and returns user IDs whose + data will be edited after the import. + nullable: true + type: boolean + type: object + SearchUserGroupsRequest: + example: + privileges: + - ADMINISTRATION + - ADMINISTRATION + visibility: SHARABLE + include_users: true + sub_group_identifiers: + - sub_group_identifiers + - sub_group_identifiers + description: description + record_size: 6 + display_name: display_name + type: LOCAL_GROUP + record_offset: 0 + role_identifiers: + - role_identifiers + - role_identifiers + name_pattern: name_pattern + group_identifier: group_identifier + org_identifiers: + - org_identifiers + - org_identifiers + include_sub_groups: true + default_liveboard_identifiers: + - default_liveboard_identifiers + - default_liveboard_identifiers + user_identifiers: + - user_identifiers + - user_identifiers + sort_options: "" + properties: + default_liveboard_identifiers: + description: GUID of Liveboards that are assigned as default Liveboards + to the users in the group. + items: + type: string + type: array + description: + description: Description of the group + type: string + display_name: + description: Display name of the group + type: string + name_pattern: + description: A pattern to match case-insensitive name of the Group object. + type: string + group_identifier: + description: GUID or name of the group + type: string + org_identifiers: + description: ID or name of the Org to which the group belongs + items: + type: string + type: array + privileges: + description: Privileges assigned to the group. + items: + enum: + - ADMINISTRATION + - AUTHORING + - USERDATAUPLOADING + - DATADOWNLOADING + - USERMANAGEMENT + - DATAMANAGEMENT + - SHAREWITHALL + - JOBSCHEDULING + - A3ANALYSIS + - EXPERIMENTALFEATUREPRIVILEGE + - BYPASSRLS + - RANALYSIS + - DEVELOPER + - USER_ADMINISTRATION + - GROUP_ADMINISTRATION + - SYNCMANAGEMENT + - CAN_CREATE_CATALOG + - DISABLE_PINBOARD_CREATION + - LIVEBOARD_VERIFIER + - PREVIEW_THOUGHTSPOT_SAGE + - APPLICATION_ADMINISTRATION + - SYSTEM_INFO_ADMINISTRATION + - ORG_ADMINISTRATION + - ROLE_ADMINISTRATION + - AUTHENTICATION_ADMINISTRATION + - BILLING_INFO_ADMINISTRATION + - CAN_MANAGE_CUSTOM_CALENDAR + - CAN_CREATE_OR_EDIT_CONNECTIONS + - CAN_MANAGE_WORKSHEET_VIEWS_TABLES + - CAN_MANAGE_VERSION_CONTROL + - THIRDPARTY_ANALYSIS + - ALLOW_NON_EMBED_FULL_APP_ACCESS + - CAN_ACCESS_ANALYST_STUDIO + - CAN_MANAGE_ANALYST_STUDIO + - PREVIEW_DOCUMENT_SEARCH + - CAN_MODIFY_FOLDERS + - CAN_MANAGE_VARIABLES + - CAN_VIEW_FOLDERS + - CAN_MANAGE_AGENTSPOT + - CAN_ACCESS_AGENTSPOT + - CAN_SETUP_VERSION_CONTROL + - CAN_MANAGE_WEBHOOKS + - CAN_DOWNLOAD_VISUALS + - CAN_DOWNLOAD_DETAILED_DATA + - CAN_USE_SPOTTER + type: string + type: array + sub_group_identifiers: + description: GUID or name of the sub groups. A subgroup is a group assigned + to a parent group. + items: + type: string + type: array + type: + description: Group type. + enum: + - LOCAL_GROUP + - LDAP_GROUP + - TEAM_GROUP + - TENANT_GROUP + type: string + user_identifiers: + description: GUID or name of the users assigned to the group. + items: + type: string + type: array + visibility: + description: |- + Visibility of the group. To make a group visible to other users and groups, + set the visibility to SHAREABLE. + enum: + - SHARABLE + - NON_SHARABLE + type: string + role_identifiers: + description: Filter groups with a list of Roles assigned to a group + items: + type: string + type: array + record_offset: + default: 0 + description: The starting record number from where the records should be + included. + format: int32 + type: integer + record_size: + default: 10 + description: The number of records that should be included. + format: int32 + type: integer + sort_options: + allOf: + - $ref: '#/components/schemas/SortOptions' + description: Sort options to filter group details. + include_users: + default: true + description: |- +
Version: 10.10.0.cl or later +
+ + Define Parameter to consider if the users should be included in group search response. + nullable: true + type: boolean + include_sub_groups: + default: true + description: |- +
Version: 10.10.0.cl or later +
+ + Define Parameter to consider if the sub groups should be included in group search response. + nullable: true + type: boolean + type: object + UpdateUserGroupRequest: + example: + privileges: + - ADMINISTRATION + - ADMINISTRATION + role_identifiers: + - role_identifiers + - role_identifiers + visibility: SHARABLE + name: name + sub_group_identifiers: + - sub_group_identifiers + - sub_group_identifiers + description: description + default_liveboard_identifiers: + - default_liveboard_identifiers + - default_liveboard_identifiers + user_identifiers: + - user_identifiers + - user_identifiers + display_name: display_name + type: LOCAL_GROUP + operation: REPLACE + properties: + name: + description: Name of the group to modify. + type: string + default_liveboard_identifiers: + description: ID of the Liveboards to be assigned as default Liveboards to + the users in the group. + items: + type: string + type: array + description: + description: Description for the group. + type: string + display_name: + description: Display name of the group. + type: string + privileges: + description: Privileges to assign to the group. + items: + enum: + - ADMINISTRATION + - AUTHORING + - USERDATAUPLOADING + - DATADOWNLOADING + - USERMANAGEMENT + - DATAMANAGEMENT + - SHAREWITHALL + - JOBSCHEDULING + - A3ANALYSIS + - EXPERIMENTALFEATUREPRIVILEGE + - BYPASSRLS + - RANALYSIS + - DEVELOPER + - USER_ADMINISTRATION + - GROUP_ADMINISTRATION + - SYNCMANAGEMENT + - CAN_CREATE_CATALOG + - DISABLE_PINBOARD_CREATION + - LIVEBOARD_VERIFIER + - PREVIEW_THOUGHTSPOT_SAGE + - CAN_MANAGE_VERSION_CONTROL + - THIRDPARTY_ANALYSIS + - ALLOW_NON_EMBED_FULL_APP_ACCESS + - CAN_ACCESS_ANALYST_STUDIO + - CAN_MANAGE_ANALYST_STUDIO + - CAN_MODIFY_FOLDERS + - CAN_MANAGE_VARIABLES + - CAN_VIEW_FOLDERS + - CAN_MANAGE_AGENTSPOT + - CAN_ACCESS_AGENTSPOT + - PREVIEW_DOCUMENT_SEARCH + - CAN_SETUP_VERSION_CONTROL + - CAN_DOWNLOAD_VISUALS + - CAN_DOWNLOAD_DETAILED_DATA + - CAN_USE_SPOTTER + type: string + type: array + sub_group_identifiers: + description: GUID or name of the sub groups. A subgroup is a group assigned + to a parent group. + items: + type: string + type: array + type: + description: Type of the group + enum: + - LOCAL_GROUP + - LDAP_GROUP + - TEAM_GROUP + - TENANT_GROUP + type: string + user_identifiers: + description: GUID or name of the users to assign to the group. + items: + type: string + type: array + visibility: + description: |- + Visibility of the group. To make a group visible to other users and + groups, set the visibility to SHAREABLE. + enum: + - SHARABLE + - NON_SHARABLE + type: string + role_identifiers: + description: Role identifiers of the Roles that should be assigned to the + group. + items: + type: string + type: array + operation: + default: REPLACE + description: Type of update operation. Default operation type is REPLACE + enum: + - ADD + - REMOVE + - REPLACE + type: string + type: object + SearchChannelHistoryRequest: + example: + channel_status: PENDING + channel_identifiers: + - channel_identifiers + - channel_identifiers + job_ids: + - job_ids + - job_ids + start_epoch_time_in_millis: 0.8008282 + channel_type: WEBHOOK + events: + - identifier: identifier + type: LIVEBOARD_SCHEDULE + - identifier: identifier + type: LIVEBOARD_SCHEDULE + properties: + channel_type: + description: Type of communication channel to search history for. + enum: + - WEBHOOK + type: string + job_ids: + description: List of job execution record IDs to retrieve. + items: + type: string + type: array + channel_identifiers: + description: List of channel IDs or names to filter by. + items: + type: string + type: array + channel_status: + description: Filter by channel delivery status. + enum: + - PENDING + - RETRY + - SUCCESS + - FAILED + type: string + events: + description: Filter by events that triggered the channel. + items: + $ref: '#/components/schemas/ChannelHistoryEventInput' + type: array + start_epoch_time_in_millis: + description: Filter records created on or after this time (epoch milliseconds). + format: float + type: number + required: + - channel_type + type: object + FetchLogsRequest: + example: + log_type: SECURITY_AUDIT + end_epoch_time_in_millis: 6.0274563 + get_all_logs: true + start_epoch_time_in_millis: 0.8008282 + properties: + log_type: + description: Name of the log type + enum: + - SECURITY_AUDIT + type: string + start_epoch_time_in_millis: + description: Start time in EPOCH format + format: float + type: number + end_epoch_time_in_millis: + description: End time in EPOCH format + format: float + type: number + get_all_logs: + default: true + description: Fetch all the logs. This is available from 9.10.5.cl + nullable: true + type: boolean + required: + - log_type + type: object + ConvertWorksheetToModelRequest: + example: + worksheet_ids: + - worksheet_ids + - worksheet_ids + apply_changes: false + exclude_worksheet_ids: + - exclude_worksheet_ids + - exclude_worksheet_ids + convert_all: false + properties: + worksheet_ids: + description: List of Worksheet IDs. + items: + type: string + type: array + exclude_worksheet_ids: + description: List of Worksheet IDs to be excluded. + items: + type: string + type: array + convert_all: + default: false + description: Indicates whether all the worksheet needs to be converted to + models. + nullable: true + type: boolean + apply_changes: + default: false + description: Indicates whether the changes should be applied to database. + nullable: true + type: boolean + type: object + CopyObjectRequest: + example: + identifier: identifier + description: description + type: LIVEBOARD + title: title + properties: + description: + description: Description of the new object + type: string + identifier: + description: GUID of metadata object to be copied (answer id or liveboard + id) + type: string + type: + description: Type of metadata object + enum: + - LIVEBOARD + - ANSWER + type: string + title: + description: Title of the new object + type: string + required: + - identifier + type: object + DeleteMetadataRequest: + example: + delete_disabled_objects: false + metadata: + - identifier: identifier + type: LIVEBOARD + - identifier: identifier + type: LIVEBOARD + properties: + metadata: + description: Metadata objects. + items: + $ref: '#/components/schemas/DeleteMetadataTypeInput' + type: array + delete_disabled_objects: + default: false + description: Indicates whether to delete disabled metadata objects. + nullable: true + type: boolean + required: + - metadata + type: object + ExportMetadataTMLRequest: + example: + export_schema_version: DEFAULT + all_orgs_override: false + metadata: + - identifier: identifier + session_identifier: session_identifier + type: LIVEBOARD + generation_number: 0 + - identifier: identifier + session_identifier: session_identifier + type: LIVEBOARD + generation_number: 0 + export_associated: false + export_fqn: false + edoc_format: JSON + export_options: "" + export_dependent: false + export_connection_as_dependent: false + properties: + metadata: + description: Metadata objects. + items: + $ref: '#/components/schemas/ExportMetadataTypeInput' + type: array + export_associated: + default: false + description: Indicates whether to export associated metadata objects of + specified metadata objects. + nullable: true + type: boolean + export_fqn: + default: false + description: |- + Adds FQNs of the referenced objects. For example, if you are exporting a Liveboard and its associated objects, + the API returns the Liveboard TML data with the FQNs of the referenced worksheet. + If the exported TML data includes FQNs, you don't need to manually add FQNs of the referenced objects during TML import. + nullable: true + type: boolean + edoc_format: + default: JSON + description: |- + TML EDOC content format. + + **Note: exporting in YAML format currently requires manual formatting of the output. For more details on the workaround, please click [here](https://developers.thoughtspot.com/docs/known-issues#_version_9_12_0_cl)** + enum: + - JSON + - YAML + type: string + export_schema_version: + default: DEFAULT + description: Indicates whether to export worksheet TML in DEFAULT or V1 + or V2 version. + enum: + - DEFAULT + - V1 + - V2 + type: string + export_dependent: + default: false + description: Indicates whether to export table while exporting connection. + nullable: true + type: boolean + export_connection_as_dependent: + default: false + description: |- + Indicates whether to export connection as dependent while exporting table/worksheet/answer/liveboard. + This will only be active when export_associated is true. + nullable: true + type: boolean + all_orgs_override: + default: false + description: Indicates whether to export is happening from all orgs context. + nullable: true + type: boolean + export_options: + allOf: + - $ref: '#/components/schemas/Export_Options' + description: "Flags to specify additional options for export. \n Version:\ + \ 10.6.0.cl or later\n" + required: + - metadata + type: object + ExportMetadataTMLBatchedRequest: + example: + batch_offset: 0 + all_orgs_override: false + batch_size: 6 + metadata_type: USER + edoc_format: JSON + export_dependent: false + properties: + metadata_type: + description: "Type of metadata object to export, can be one of USER | ROLE\ + \ | USER_GROUP" + enum: + - USER + - USER_GROUP + - ROLE + type: string + batch_offset: + default: 0 + description: Indicates the position within the complete set from where the + API should begin returning objects. + format: int32 + type: integer + batch_size: + default: 20 + description: Determines the number of objects or items to be retrieved in + a single request. + format: int32 + type: integer + edoc_format: + default: JSON + description: TML EDOC content format. + enum: + - JSON + - YAML + type: string + export_dependent: + default: false + description: Indicates whether to export dependent metadata objects of specified + metadata objects. + nullable: true + type: boolean + all_orgs_override: + default: false + description: Indicates whether to export is happening from all orgs context. + nullable: true + type: boolean + required: + - metadata_type + type: object + FetchAnswerSqlQueryRequest: + example: + metadata_identifier: metadata_identifier + properties: + metadata_identifier: + description: ID or name of an Answer. + type: string + required: + - metadata_identifier + type: object + FetchAsyncImportTaskStatusRequest: + example: + task_status: + - COMPLETED + - COMPLETED + record_size: 6 + include_import_response: false + task_ids: + - task_ids + - task_ids + author_identifier: author_identifier + record_offset: 0 + properties: + task_ids: + description: List of task IDs to fetch status for. + items: + type: string + type: array + task_status: + description: "List of task statuses to filter on. Valid values: [IN_QUEUE,\ + \ IN_PROGRESS, COMPLETED, FAILED]" + items: + enum: + - COMPLETED + - IN_QUEUE + - IN_PROGRESS + - FAILED + type: string + type: array + author_identifier: + description: Author GUID or name of async import tasks to filter on. + type: string + record_offset: + default: 0 + description: "The offset point, starting from where the task status should\ + \ be included in the response." + format: int32 + type: integer + record_size: + default: 5 + description: The number of task statuses that should be included in the + response starting from offset position. + format: int32 + type: integer + include_import_response: + default: false + description: Boolean flag to specify whether to include import response + in the task status objects. + nullable: true + type: boolean + type: object + FetchLiveboardSqlQueryRequest: + example: + metadata_identifier: metadata_identifier + visualization_identifiers: + - visualization_identifiers + - visualization_identifiers + properties: + metadata_identifier: + description: ID or name of the Liveboard. + type: string + visualization_identifiers: + description: Unique ID or name of visualizations. + items: + type: string + type: array + required: + - metadata_identifier + type: object + ImportMetadataTMLRequest: + example: + all_orgs_override: false + skip_diff_check: false + enable_large_metadata_validation: false + import_policy: PARTIAL + metadata_tmls: + - metadata_tmls + - metadata_tmls + create_new: false + properties: + metadata_tmls: + description: |- + Details of TML objects. + + **Note: importing TML in YAML format, when coming directly from our Playground, is currently requires manual formatting. For more details on the workaround, please click [here](https://developers.thoughtspot.com/docs/known-issues#_version_9_12_0_cl)** + items: + type: string + type: array + import_policy: + default: PARTIAL + description: Specifies the import policy for the TML import. + enum: + - PARTIAL + - ALL_OR_NONE + - VALIDATE_ONLY + - PARTIAL_OBJECT + type: string + create_new: + default: false + description: "If selected, creates TML objects with new GUIDs." + nullable: true + type: boolean + all_orgs_override: + default: false + description: If import is happening from all orgs context. + nullable: true + type: boolean + skip_diff_check: + default: false + description: |- +
Version: 10.6.0.cl or later +
+ + Boolean Flag to skip TML diff check before processing object TMLs. + nullable: true + type: boolean + enable_large_metadata_validation: + default: false + description: |- +
Version: 10.5.0.cl or later +
+ + Boolean to indicate if the large metadata validation should be enabled. + nullable: true + type: boolean + required: + - metadata_tmls + type: object + ImportMetadataTMLAsyncRequest: + example: + all_orgs_override: false + skip_diff_check: false + enable_large_metadata_validation: false + import_policy: PARTIAL_OBJECT + metadata_tmls: + - metadata_tmls + - metadata_tmls + create_new: false + properties: + metadata_tmls: + description: Details of TML objects. + items: + type: string + type: array + create_new: + default: false + description: "If selected, creates TML objects with new GUIDs." + nullable: true + type: boolean + all_orgs_override: + default: false + description: If import is happening from all orgs context. + nullable: true + type: boolean + import_policy: + default: PARTIAL_OBJECT + description: |- +
Version: 10.5.0.cl or later +
+ + Policy to be followed while importing the TML. Valid values are [PARTIAL_OBJECT, PARTIAL, VALIDATE_ONLY, ALL_OR_NONE] + enum: + - PARTIAL + - ALL_OR_NONE + - VALIDATE_ONLY + - PARTIAL_OBJECT + type: string + skip_diff_check: + default: false + description: |- +
Version: 10.6.0.cl or later +
+ + Boolean Flag to skip TML diff check before processing object TMLs. + nullable: true + type: boolean + enable_large_metadata_validation: + default: false + description: |- +
Version: 10.5.0.cl or later +
+ + Boolean to indicate if the large metadata validation should be enabled. + nullable: true + type: boolean + required: + - metadata_tmls + type: object + ParameterizeMetadataRequest: + example: + metadata_identifier: metadata_identifier + metadata_type: LOGICAL_TABLE + variable_identifier: variable_identifier + field_type: ATTRIBUTE + field_name: field_name + properties: + metadata_type: + description: Type of metadata object to parameterize. + enum: + - LOGICAL_TABLE + - CONNECTION + - CONNECTION_CONFIG + type: string + metadata_identifier: + description: Unique ID or name of the metadata object to parameterize. + type: string + field_type: + description: Type of field in the metadata to parameterize. + enum: + - ATTRIBUTE + - CONNECTION_PROPERTY + type: string + field_name: + description: Name of the field which needs to be parameterized. + type: string + variable_identifier: + description: Unique ID or name of the variable to use for parameterization + type: string + required: + - field_name + - field_type + - metadata_identifier + - variable_identifier + type: object + ParameterizeMetadataFieldsRequest: + example: + metadata_identifier: metadata_identifier + metadata_type: LOGICAL_TABLE + field_names: + - field_names + - field_names + variable_identifier: variable_identifier + field_type: ATTRIBUTE + properties: + metadata_type: + description: Type of metadata object to parameterize. + enum: + - LOGICAL_TABLE + - CONNECTION + - CONNECTION_CONFIG + type: string + metadata_identifier: + description: Unique ID or name of the metadata object to parameterize. + type: string + field_type: + description: Type of field in the metadata to parameterize. + enum: + - ATTRIBUTE + - CONNECTION_PROPERTY + type: string + field_names: + description: "JSON array of field names to parameterize. Example: [schemaName,\ + \ databaseName, tableName]" + items: + type: string + type: array + variable_identifier: + description: Unique ID or name of the variable to use for parameterization + of these fields. + type: string + required: + - field_names + - field_type + - metadata_identifier + - variable_identifier + type: object + SearchMetadataRequest: + example: + metadata: + - identifier: identifier + name_pattern: name_pattern + obj_identifier: obj_identifier + type: LIVEBOARD + subtypes: + - ONE_TO_ONE_LOGICAL + - ONE_TO_ONE_LOGICAL + - identifier: identifier + name_pattern: name_pattern + obj_identifier: obj_identifier + type: LIVEBOARD + subtypes: + - ONE_TO_ONE_LOGICAL + - ONE_TO_ONE_LOGICAL + include_personalised_views: false + include_visualization_headers: false + include_only_published_objects: false + modified_by_user_identifiers: + - modified_by_user_identifiers + - modified_by_user_identifiers + record_offset: 6 + created_by_user_identifiers: + - created_by_user_identifiers + - created_by_user_identifiers + exclude_objects: + - identifier: identifier + type: LIVEBOARD + - identifier: identifier + type: LIVEBOARD + permissions: + - principal: + identifier: identifier + type: USER + share_mode: READ_ONLY + - principal: + identifier: identifier + type: USER + share_mode: READ_ONLY + include_hidden_objects: false + show_resolved_parameters: false + include_auto_created_objects: false + dependent_object_version: V1 + dependent_objects_record_size: 0 + tag_identifiers: + - tag_identifiers + - tag_identifiers + include_dependent_objects: false + record_size: 1 + include_details: false + include_discoverable_objects: true + include_stats: false + liveboard_response_version: V1 + include_worksheet_search_assist_data: true + include_headers: true + favorite_object_options: "" + include_incomplete_objects: false + sort_options: "" + properties: + metadata: + description: "Metadata objects such as Liveboards, Answers, and Worksheets." + items: + $ref: '#/components/schemas/MetadataListItemInput' + type: array + permissions: + description: Object permission details to search by. + items: + $ref: '#/components/schemas/PermissionInput' + type: array + created_by_user_identifiers: + description: GUID or name of user who created the metadata object. + items: + type: string + type: array + dependent_object_version: + default: V1 + description: Version of the dependent table of the metadata objects like + Worksheets. + enum: + - V1 + - V2 + type: string + exclude_objects: + description: List of metadata objects to exclude from search. + items: + $ref: '#/components/schemas/ExcludeMetadataListItemInput' + type: array + favorite_object_options: + allOf: + - $ref: '#/components/schemas/FavoriteObjectOptionsInput' + description: |- + Options to sort the API response by objects set as favorites + for the logged-in user or the users specified in the API request. + include_auto_created_objects: + default: false + description: Includes system-generated metadata objects. + nullable: true + type: boolean + include_dependent_objects: + default: false + description: |- + Includes dependents of the metadata object specified in the API request. + For example, a worksheet can consist of dependent objects such as Liveboards or Answers. + nullable: true + type: boolean + dependent_objects_record_size: + default: 50 + description: The maximum number of dependents to include per metadata object. + format: int32 + type: integer + include_details: + default: false + description: Includes complete details of the metadata objects. + nullable: true + type: boolean + include_personalised_views: + default: false + description: |- + When set to true and include_details is also true, includes personalised views + in the metadata_detail for LIVEBOARD objects. + nullable: true + type: boolean + include_headers: + default: true + description: Includes headers of the metadata objects. + nullable: true + type: boolean + include_hidden_objects: + default: false + description: "Includes details of the hidden objects, such as a column in\ + \ a worksheet or a table." + nullable: true + type: boolean + include_incomplete_objects: + default: false + description: Includes objects with incomplete metadata. + nullable: true + type: boolean + include_visualization_headers: + default: false + description: Includes visualization headers of the specified Liveboard object. + nullable: true + type: boolean + include_worksheet_search_assist_data: + description: |- + If search assistance lessons are configured on a worksheet, + the API returns the search assist data for Worksheet objects. + nullable: true + type: boolean + modified_by_user_identifiers: + description: Includes ID or names of the users who modified the metadata + object. + items: + type: string + type: array + record_offset: + default: 0 + description: The starting record number from where the records should be + included. + format: int32 + type: integer + record_size: + default: 10 + description: The number of records that should be included. It is recommended + to use a smaller `record_size` when fetching dependent objects or any + of the additional metadata detail options. + format: int32 + type: integer + sort_options: + allOf: + - $ref: '#/components/schemas/MetadataSearchSortOptions' + description: Sort options to filter metadata details. + tag_identifiers: + description: Tags to filter metadata objects by + items: + type: string + type: array + include_stats: + default: false + description: Indicates whether to include stats of the metadata objects. + nullable: true + type: boolean + include_discoverable_objects: + default: true + description: |- +
Version: 10.7.0.cl or later +
+ + Boolean to indicate whether to include discoverable metadata objects. + nullable: true + type: boolean + show_resolved_parameters: + default: false + description: |- +
Version: 10.9.0.cl or later +
+ + Indicates whether to show resolved parameterised values. + nullable: true + type: boolean + liveboard_response_version: + default: V1 + description: Indicates the model version of Liveboard to be attached in + metadata detail. + enum: + - V1 + - V2 + type: string + include_only_published_objects: + default: false + description: |- +
Version: 10.11.0.cl or later +
+ + If only published objects should be returned + nullable: true + type: boolean + type: object + UnparameterizeMetadataRequest: + example: + metadata_identifier: metadata_identifier + metadata_type: LOGICAL_TABLE + field_type: ATTRIBUTE + value: value + field_name: field_name + properties: + metadata_type: + description: Type of metadata object to unparameterize. + enum: + - LOGICAL_TABLE + - CONNECTION + - CONNECTION_CONFIG + type: string + metadata_identifier: + description: Unique ID or name of the metadata object to unparameterize. + type: string + field_type: + description: Type of field in the metadata to unparameterize. + enum: + - ATTRIBUTE + - CONNECTION_PROPERTY + type: string + field_name: + description: Name of the field which needs to be unparameterized. + type: string + value: + description: The value to use in place of the variable for the field + type: string + required: + - field_name + - field_type + - metadata_identifier + - value + type: object + UpdateMetadataHeaderRequest: + example: + org_identifier: org_identifier + headers_update: + - identifier: identifier + obj_identifier: obj_identifier + attributes: + - name: name + value: value + - name: name + value: value + type: ANSWER + - identifier: identifier + obj_identifier: obj_identifier + attributes: + - name: name + value: value + - name: name + value: value + type: ANSWER + properties: + headers_update: + description: List of header objects to update. + items: + $ref: '#/components/schemas/HeaderUpdateInput' + type: array + org_identifier: + description: Unique ID or name of the organization. + type: string + required: + - headers_update + type: object + UpdateMetadataObjIdRequest: + example: + metadata: + - metadata_identifier: metadata_identifier + new_obj_id: new_obj_id + type: ANSWER + current_obj_id: current_obj_id + - metadata_identifier: metadata_identifier + new_obj_id: new_obj_id + type: ANSWER + current_obj_id: current_obj_id + properties: + metadata: + description: List of metadata objects to update their object IDs. + items: + $ref: '#/components/schemas/UpdateObjIdInput' + type: array + required: + - metadata + type: object + CreateOrgRequest: + example: + name: name + description: description + properties: + name: + description: Name of the Org. + type: string + description: + description: Description of the Org. + type: string + required: + - name + type: object + SearchOrgsRequest: + example: + visibility: SHOW + org_identifier: org_identifier + description: description + user_identifiers: + - user_identifiers + - user_identifiers + status: ACTIVE + properties: + org_identifier: + description: ID or name of the Org + type: string + description: + description: Description of the Org + type: string + visibility: + description: Visibility of the Org + enum: + - SHOW + - HIDDEN + type: string + status: + description: Status of the Org + enum: + - ACTIVE + - IN_ACTIVE + type: string + user_identifiers: + description: GUIDs or names of the users for which you want to retrieve + the Orgs data + items: + type: string + type: array + type: object + UpdateOrgRequest: + example: + group_identifiers: + - group_identifiers + - group_identifiers + name: name + description: description + user_identifiers: + - user_identifiers + - user_identifiers + operation: ADD + properties: + name: + description: Name of the Org + type: string + description: + description: Description of the Org + type: string + user_identifiers: + description: Add Users to an Org + items: + type: string + type: array + group_identifiers: + description: Add Default Groups to an Org + items: + type: string + type: array + operation: + default: ADD + description: Type of update operation. Default operation type is ADD + enum: + - ADD + - REMOVE + - REPLACE + type: string + type: object + ExportAnswerReportRequest: + example: + runtime_filter: "{}" + regional_settings: "" + png_options: "" + metadata_identifier: metadata_identifier + personalised_view_identifier: personalised_view_identifier + session_identifier: session_identifier + runtime_sort: "{}" + generation_number: 0 + type: SAVED + runtime_param_override: "{}" + file_format: CSV + properties: + metadata_identifier: + description: Unique ID or name of the metadata object. + type: string + session_identifier: + description: Unique ID of the answer session. + type: string + generation_number: + description: Generation number of the answer session. + format: int32 + type: integer + file_format: + default: CSV + description: Export file format. + enum: + - CSV + - PDF + - XLSX + - PNG + type: string + runtime_filter: + description: |- + JSON string representing runtime filter. + { col1:region, op1: EQ, val1: northeast } + type: object + runtime_sort: + description: |- + JSON string representing runtime sort. + { sortCol1: region, asc1 :true, sortCol2 : date } + type: object + runtime_param_override: + description: JSON object for setting values of parameters in runtime. + type: object + regional_settings: + allOf: + - $ref: '#/components/schemas/RegionalSettingsInput' + description: Options for specific region specific overrides to support date/number/string/currency + formatting. + png_options: + allOf: + - $ref: '#/components/schemas/AnswerPngOptionsInput' + description: "Options for PNG export. \n Version: 26.6.0.cl or later\n" + personalised_view_identifier: + description: "GUID or name of the personalised view of the Answer object.\ + \ \n Version: 26.6.0.cl or later\n" + type: string + type: + default: SAVED + description: "Type of the answer being exported. \n Version: 26.6.0.cl or\ + \ later\n" + enum: + - SAVED + - PINNED + type: string + type: object + ExportLiveboardReportRequest: + example: + regional_settings: "" + pdf_options: "" + transient_content: transient_content + runtime_param_override: "{}" + runtime_filter: "{}" + png_options: "" + metadata_identifier: metadata_identifier + tab_identifiers: + - tab_identifiers + - tab_identifiers + personalised_view_identifier: personalised_view_identifier + visualization_identifiers: + - visualization_identifiers + - visualization_identifiers + runtime_sort: "{}" + override_filters: "{}" + file_format: PDF + properties: + metadata_identifier: + description: GUID or name of the Liveboard object. + type: string + tab_identifiers: + description: "GUID or name of the tab of the Liveboard object. \n Version:\ + \ 10.9.0.cl or later\n" + items: + type: string + type: array + personalised_view_identifier: + description: "GUID or name of the personalised view of the Liveboard object.\ + \ \n Version: 10.9.0.cl or later\n" + type: string + visualization_identifiers: + description: |- + GUID or name of visualizations on the Liveboard. If this parameter is + not defined, the API returns a report with all visualizations saved on a Liveboard. + items: + type: string + type: array + transient_content: + description: Transient content of the Liveboard. + type: string + file_format: + default: PDF + description: Export file format. + enum: + - PDF + - PNG + - CSV + - XLSX + type: string + runtime_filter: + description: "JSON object with representing filter condition to apply filters\ + \ at runtime. For example, {\"col1\": \"region\", \"op1\": \"EQ\", \"\ + val1\": \"northeast\" }. You can add multiple keys by incrementing the\ + \ number at the end, for example, col2, op2, val2. For more information,\ + \ see [API Documentation](https://developers.thoughtspot.com/docs/fetch-data-and-report-apis#_runtime_filters)." + type: object + override_filters: + description: |- + Applied to the liveboard and overrides any filters already applied on the same columns in liveboard. + Following example illustrate different kinds of filters: + { + "override_filters": [ + { + "column_name": "Color", + "generic_filter": { + "op": "IN", + "values": [ + "almond", + "turquoise" + ] + }, + "negate": false + }, + { + "column_name": "Commit Date", + "date_filter": { + "datePeriod": "HOUR", + "number": 3, + "type": "LAST_N_PERIOD", + "op": "EQ" + } + }, + { + "column_name": "Sales", + "generic_filter": { + "op": "BW_INC", + "values": [ + "100000", + "70000" + ] + }, + "negate": true + } + ] + } + type: object + runtime_sort: + description: "JSON string representing runtime sort. For example, {\"sortCol1\"\ + : \"region\", \"asc1\" : true}. For more information, see [API Documentation](https://developers.thoughtspot.com/docs/fetch-data-and-report-apis#_runtime_sort)." + type: object + pdf_options: + allOf: + - $ref: '#/components/schemas/PdfOptionsInput' + description: Options for PDF export. + png_options: + allOf: + - $ref: '#/components/schemas/PngOptionsInput' + description: Options for PNG export. + runtime_param_override: + description: "JSON object for setting values of parameters at runtime. For\ + \ example, {\"param1\": \"Double List Param\", \"paramVal1\": 0.5}.\ + \ You can add multiple keys by incrementing the number at the end, for\ + \ example, param2, paramVal2. For more information, see [API Documentation](https://developers.thoughtspot.com/docs/fetch-data-and-report-apis#_runtime_parameters)." + type: object + regional_settings: + allOf: + - $ref: '#/components/schemas/RegionalSettingsInput' + description: Options for specific region specific overrides to support date/number/string/currency + formatting. + required: + - metadata_identifier + type: object + CreateRoleRequest: + example: + privileges: + - USERDATAUPLOADING + - USERDATAUPLOADING + read_only: false + name: name + description: description + properties: + name: + description: Unique name of the Role. + type: string + description: + description: Description of the Role. + type: string + privileges: + description: "Privileges granted to the Role. See [Documentation](https://developers.thoughtspot.com/docs/rbac#_role_categories_and_privileges)for\ + \ supported roles privileges." + items: + enum: + - USERDATAUPLOADING + - DATADOWNLOADING + - DATAMANAGEMENT + - SHAREWITHALL + - JOBSCHEDULING + - A3ANALYSIS + - BYPASSRLS + - DISABLE_PINBOARD_CREATION + - DEVELOPER + - APPLICATION_ADMINISTRATION + - USER_ADMINISTRATION + - GROUP_ADMINISTRATION + - SYSTEM_INFO_ADMINISTRATION + - SYNCMANAGEMENT + - ORG_ADMINISTRATION + - ROLE_ADMINISTRATION + - AUTHENTICATION_ADMINISTRATION + - BILLING_INFO_ADMINISTRATION + - CONTROL_TRUSTED_AUTH + - TAGMANAGEMENT + - LIVEBOARD_VERIFIER + - CAN_MANAGE_CUSTOM_CALENDAR + - CAN_CREATE_OR_EDIT_CONNECTIONS + - CAN_MANAGE_WORKSHEET_VIEWS_TABLES + - CAN_MANAGE_VERSION_CONTROL + - THIRDPARTY_ANALYSIS + - CAN_CREATE_CATALOG + - ALLOW_NON_EMBED_FULL_APP_ACCESS + - CAN_ACCESS_ANALYST_STUDIO + - CAN_MANAGE_ANALYST_STUDIO + - PREVIEW_DOCUMENT_SEARCH + - CAN_MANAGE_VARIABLES + - CAN_MODIFY_FOLDERS + - CAN_VIEW_FOLDERS + - CAN_MANAGE_AGENTSPOT + - CAN_ACCESS_AGENTSPOT + - CAN_SETUP_VERSION_CONTROL + - PREVIEW_THOUGHTSPOT_SAGE + - CAN_MANAGE_WEBHOOKS + - CAN_DOWNLOAD_VISUALS + - CAN_DOWNLOAD_DETAILED_DATA + - CAN_USE_SPOTTER + type: string + type: array + read_only: + default: false + description: |- +
Version: 10.5.0.cl or later +
+ + Indicates whether the role is read only. A readonly role can neither be updated nor deleted. + nullable: true + type: boolean + required: + - name + type: object + SearchRolesRequest: + example: + privileges: + - UNKNOWN + - UNKNOWN + role_identifiers: + - role_identifiers + - role_identifiers + external: true + group_identifiers: + - group_identifiers + - group_identifiers + permissions: + - READ_ONLY + - READ_ONLY + deprecated: true + org_identifiers: + - org_identifiers + - org_identifiers + shared_via_connection: true + properties: + role_identifiers: + description: unique ID or name of the Roles + items: + type: string + type: array + org_identifiers: + description: Unique Id or name of the Organisation + items: + type: string + type: array + group_identifiers: + description: Unique Id or name of the User Group + items: + type: string + type: array + privileges: + description: "Privileges assigned to the Role. See [Documentation](https://developers.thoughtspot.com/docs/rbac#_role_categories_and_privileges)for\ + \ supported roles privileges." + items: + enum: + - UNKNOWN + - ADMINISTRATION + - AUTHORING + - USERDATAUPLOADING + - DATADOWNLOADING + - USERMANAGEMENT + - SECURITYMANAGEMENT + - LOGICALMODELING + - DATAMANAGEMENT + - TAGMANAGEMENT + - SHAREWITHALL + - SYSTEMMANAGEMENT + - JOBSCHEDULING + - A3ANALYSIS + - EXPERIMENTALFEATUREPRIVILEGE + - BYPASSRLS + - RANALYSIS + - DISABLE_PINBOARD_CREATION + - DEVELOPER + - APPLICATION_ADMINISTRATION + - USER_ADMINISTRATION + - GROUP_ADMINISTRATION + - BACKUP_ADMINISTRATION + - SYSTEM_INFO_ADMINISTRATION + - ENABLESPOTAPPCREATION + - SYNCMANAGEMENT + - ORG_ADMINISTRATION + - ROLE_ADMINISTRATION + - AUTHENTICATION_ADMINISTRATION + - BILLING_INFO_ADMINISTRATION + - PREVIEW_THOUGHTSPOT_SAGE + - LIVEBOARD_VERIFIER + - CAN_MANAGE_CUSTOM_CALENDAR + - CAN_CREATE_OR_EDIT_CONNECTIONS + - CAN_CONFIGURE_CONNECTIONS + - CAN_MANAGE_WORKSHEET_VIEWS_TABLES + - CAN_MANAGE_VERSION_CONTROL + - THIRDPARTY_ANALYSIS + - CONTROL_TRUSTED_AUTH + - CAN_CREATE_CATALOG + - ALLOW_NON_EMBED_FULL_APP_ACCESS + - CAN_ACCESS_ANALYST_STUDIO + - CAN_MANAGE_ANALYST_STUDIO + - CAN_VIEW_FOLDERS + - CAN_MODIDY_FOLDERS + - CAN_MANAGE_VARIABLES + - CAN_MANAGE_AGENTSPOT + - CAN_ACCESS_AGENTSPOT + - PREVIEW_DOCUMENT_SEARCH + - CAN_SETUP_VERSION_CONTROL + - CAN_MANAGE_WEBHOOKS + - CAN_DOWNLOAD_VISUALS + - CAN_DOWNLOAD_DETAILED_DATA + - CAN_USE_SPOTTER + type: string + type: array + deprecated: + deprecated: true + description: Indicates whether the Role is deprecated. + nullable: true + type: boolean + external: + deprecated: true + description: Indicates whether the Role is external + nullable: true + type: boolean + shared_via_connection: + deprecated: true + description: Indicates whether the Role is shared via connection + nullable: true + type: boolean + permissions: + deprecated: true + description: Permission details of the Role + items: + enum: + - READ_ONLY + - MODIFY + - NO_ACCESS + type: string + type: array + type: object + UpdateRoleRequest: + example: + privileges: + - USERDATAUPLOADING + - USERDATAUPLOADING + name: name + description: description + properties: + name: + description: Name of the Role. + type: string + description: + description: Description of the Role. + type: string + privileges: + description: "Privileges granted to the role. See [Documentation](https://developers.thoughtspot.com/docs/rbac#_role_categories_and_privileges)for\ + \ supported roles privileges." + items: + enum: + - USERDATAUPLOADING + - DATADOWNLOADING + - DATAMANAGEMENT + - SHAREWITHALL + - JOBSCHEDULING + - A3ANALYSIS + - BYPASSRLS + - DISABLE_PINBOARD_CREATION + - DEVELOPER + - APPLICATION_ADMINISTRATION + - USER_ADMINISTRATION + - GROUP_ADMINISTRATION + - SYSTEM_INFO_ADMINISTRATION + - SYNCMANAGEMENT + - ORG_ADMINISTRATION + - ROLE_ADMINISTRATION + - AUTHENTICATION_ADMINISTRATION + - BILLING_INFO_ADMINISTRATION + - CONTROL_TRUSTED_AUTH + - TAGMANAGEMENT + - LIVEBOARD_VERIFIER + - CAN_MANAGE_CUSTOM_CALENDAR + - CAN_CREATE_OR_EDIT_CONNECTIONS + - CAN_MANAGE_WORKSHEET_VIEWS_TABLES + - CAN_MANAGE_VERSION_CONTROL + - THIRDPARTY_ANALYSIS + - CAN_CREATE_CATALOG + - CAN_ACCESS_ANALYST_STUDIO + - CAN_MANAGE_ANALYST_STUDIO + - CAN_MODIFY_FOLDERS + - CAN_MANAGE_VARIABLES + - CAN_VIEW_FOLDERS + - CAN_MANAGE_AGENTSPOT + - CAN_ACCESS_AGENTSPOT + - PREVIEW_DOCUMENT_SEARCH + - PREVIEW_THOUGHTSPOT_SAGE + - CAN_MANAGE_WEBHOOKS + - CAN_DOWNLOAD_VISUALS + - CAN_DOWNLOAD_DETAILED_DATA + - CAN_USE_SPOTTER + type: string + type: array + required: + - name + type: object + CreateScheduleRequest: + example: + metadata_identifier: metadata_identifier + metadata_type: LIVEBOARD + liveboard_options: "" + name: name + description: description + pdf_options: "" + recipient_details: "" + time_zone: America/Los_Angeles + personalised_view_id: personalised_view_id + file_format: PDF + frequency: "" + properties: + name: + description: Name of the scheduled job. + type: string + description: + description: Description of the job. + type: string + metadata_type: + description: Type of the metadata object. + enum: + - LIVEBOARD + type: string + metadata_identifier: + description: Unique ID or name of the metadata object. + type: string + file_format: + default: PDF + description: Export file format. + enum: + - CSV + - PDF + - XLSX + type: string + liveboard_options: + allOf: + - $ref: '#/components/schemas/LiveboardOptionsInput' + description: Options to specify details of Liveboard. + pdf_options: + allOf: + - $ref: '#/components/schemas/SchedulesPdfOptionsInput' + description: PDF layout and orientation settings. Applicable only if the + `file_format` is specified as `PDF`. + time_zone: + default: America/Los_Angeles + description: Time zone + enum: + - Africa/Abidjan + - Africa/Accra + - Africa/Addis_Ababa + - Africa/Algiers + - Africa/Asmara + - Africa/Asmera + - Africa/Bamako + - Africa/Bangui + - Africa/Banjul + - Africa/Bissau + - Africa/Blantyre + - Africa/Brazzaville + - Africa/Bujumbura + - Africa/Cairo + - Africa/Casablanca + - Africa/Ceuta + - Africa/Conakry + - Africa/Dakar + - Africa/Dar_es_Salaam + - Africa/Djibouti + - Africa/Douala + - Africa/El_Aaiun + - Africa/Freetown + - Africa/Gaborone + - Africa/Harare + - Africa/Johannesburg + - Africa/Juba + - Africa/Kampala + - Africa/Khartoum + - Africa/Kigali + - Africa/Kinshasa + - Africa/Lagos + - Africa/Libreville + - Africa/Lome + - Africa/Luanda + - Africa/Lubumbashi + - Africa/Lusaka + - Africa/Malabo + - Africa/Maputo + - Africa/Maseru + - Africa/Mbabane + - Africa/Mogadishu + - Africa/Monrovia + - Africa/Nairobi + - Africa/Ndjamena + - Africa/Niamey + - Africa/Nouakchott + - Africa/Ouagadougou + - Africa/Porto-Novo + - Africa/Sao_Tome + - Africa/Timbuktu + - Africa/Tripoli + - Africa/Tunis + - Africa/Windhoek + - America/Adak + - America/Anchorage + - America/Anguilla + - America/Antigua + - America/Araguaina + - America/Argentina/Buenos_Aires + - America/Argentina/Catamarca + - America/Argentina/ComodRivadavia + - America/Argentina/Cordoba + - America/Argentina/Jujuy + - America/Argentina/La_Rioja + - America/Argentina/Mendoza + - America/Argentina/Rio_Gallegos + - America/Argentina/Salta + - America/Argentina/San_Juan + - America/Argentina/San_Luis + - America/Argentina/Tucuman + - America/Argentina/Ushuaia + - America/Aruba + - America/Asuncion + - America/Atikokan + - America/Atka + - America/Bahia + - America/Bahia_Banderas + - America/Barbados + - America/Belem + - America/Belize + - America/Blanc-Sablon + - America/Boa_Vista + - America/Bogota + - America/Boise + - America/Buenos_Aires + - America/Cambridge_Bay + - America/Campo_Grande + - America/Cancun + - America/Caracas + - America/Catamarca + - America/Cayenne + - America/Cayman + - America/Chicago + - America/Chihuahua + - America/Coral_Harbour + - America/Cordoba + - America/Costa_Rica + - America/Creston + - America/Cuiaba + - America/Curacao + - America/Danmarkshavn + - America/Dawson + - America/Dawson_Creek + - America/Denver + - America/Detroit + - America/Dominica + - America/Edmonton + - America/Eirunepe + - America/El_Salvador + - America/Ensenada + - America/Fort_Nelson + - America/Fort_Wayne + - America/Fortaleza + - America/Glace_Bay + - America/Godthab + - America/Goose_Bay + - America/Grand_Turk + - America/Grenada + - America/Guadeloupe + - America/Guatemala + - America/Guayaquil + - America/Guyana + - America/Halifax + - America/Havana + - America/Hermosillo + - America/Indiana/Indianapolis + - America/Indiana/Knox + - America/Indiana/Marengo + - America/Indiana/Petersburg + - America/Indiana/Tell_City + - America/Indiana/Vevay + - America/Indiana/Vincennes + - America/Indiana/Winamac + - America/Indianapolis + - America/Inuvik + - America/Iqaluit + - America/Jamaica + - America/Jujuy + - America/Juneau + - America/Kentucky/Louisville + - America/Kentucky/Monticello + - America/Knox_IN + - America/Kralendijk + - America/La_Paz + - America/Lima + - America/Los_Angeles + - America/Louisville + - America/Lower_Princes + - America/Maceio + - America/Managua + - America/Manaus + - America/Marigot + - America/Martinique + - America/Matamoros + - America/Mazatlan + - America/Mendoza + - America/Menominee + - America/Merida + - America/Metlakatla + - America/Mexico_City + - America/Miquelon + - America/Moncton + - America/Monterrey + - America/Montevideo + - America/Montreal + - America/Montserrat + - America/Nassau + - America/New_York + - America/Nipigon + - America/Nome + - America/Noronha + - America/North_Dakota/Beulah + - America/North_Dakota/Center + - America/North_Dakota/New_Salem + - America/Nuuk + - America/Ojinaga + - America/Panama + - America/Pangnirtung + - America/Paramaribo + - America/Phoenix + - America/Port-au-Prince + - America/Port_of_Spain + - America/Porto_Acre + - America/Porto_Velho + - America/Puerto_Rico + - America/Punta_Arenas + - America/Rainy_River + - America/Rankin_Inlet + - America/Recife + - America/Regina + - America/Resolute + - America/Rio_Branco + - America/Rosario + - America/Santa_Isabel + - America/Santarem + - America/Santiago + - America/Santo_Domingo + - America/Sao_Paulo + - America/Scoresbysund + - America/Shiprock + - America/Sitka + - America/St_Barthelemy + - America/St_Johns + - America/St_Kitts + - America/St_Lucia + - America/St_Thomas + - America/St_Vincent + - America/Swift_Current + - America/Tegucigalpa + - America/Thule + - America/Thunder_Bay + - America/Tijuana + - America/Toronto + - America/Tortola + - America/Vancouver + - America/Virgin + - America/Whitehorse + - America/Winnipeg + - America/Yakutat + - America/Yellowknife + - Antarctica/Casey + - Antarctica/Davis + - Antarctica/DumontDUrville + - Antarctica/Macquarie + - Antarctica/Mawson + - Antarctica/McMurdo + - Antarctica/Palmer + - Antarctica/Rothera + - Antarctica/South_Pole + - Antarctica/Syowa + - Antarctica/Troll + - Antarctica/Vostok + - Arctic/Longyearbyen + - Asia/Aden + - Asia/Almaty + - Asia/Amman + - Asia/Anadyr + - Asia/Aqtau + - Asia/Aqtobe + - Asia/Ashgabat + - Asia/Ashkhabad + - Asia/Atyrau + - Asia/Baghdad + - Asia/Bahrain + - Asia/Baku + - Asia/Bangkok + - Asia/Barnaul + - Asia/Beirut + - Asia/Bishkek + - Asia/Brunei + - Asia/Calcutta + - Asia/Chita + - Asia/Choibalsan + - Asia/Chongqing + - Asia/Chungking + - Asia/Colombo + - Asia/Dacca + - Asia/Damascus + - Asia/Dhaka + - Asia/Dili + - Asia/Dubai + - Asia/Dushanbe + - Asia/Famagusta + - Asia/Gaza + - Asia/Harbin + - Asia/Hebron + - Asia/Ho_Chi_Minh + - Asia/Hong_Kong + - Asia/Hovd + - Asia/Irkutsk + - Asia/Istanbul + - Asia/Jakarta + - Asia/Jayapura + - Asia/Jerusalem + - Asia/Kabul + - Asia/Kamchatka + - Asia/Karachi + - Asia/Kashgar + - Asia/Kathmandu + - Asia/Katmandu + - Asia/Khandyga + - Asia/Kolkata + - Asia/Krasnoyarsk + - Asia/Kuala_Lumpur + - Asia/Kuching + - Asia/Kuwait + - Asia/Macao + - Asia/Macau + - Asia/Magadan + - Asia/Makassar + - Asia/Manila + - Asia/Muscat + - Asia/Nicosia + - Asia/Novokuznetsk + - Asia/Novosibirsk + - Asia/Omsk + - Asia/Oral + - Asia/Phnom_Penh + - Asia/Pontianak + - Asia/Pyongyang + - Asia/Qatar + - Asia/Qostanay + - Asia/Qyzylorda + - Asia/Rangoon + - Asia/Riyadh + - Asia/Saigon + - Asia/Sakhalin + - Asia/Samarkand + - Asia/Seoul + - Asia/Shanghai + - Asia/Singapore + - Asia/Srednekolymsk + - Asia/Taipei + - Asia/Tashkent + - Asia/Tbilisi + - Asia/Tehran + - Asia/Tel_Aviv + - Asia/Thimbu + - Asia/Thimphu + - Asia/Tokyo + - Asia/Tomsk + - Asia/Ujung_Pandang + - Asia/Ulaanbaatar + - Asia/Ulan_Bator + - Asia/Urumqi + - Asia/Ust-Nera + - Asia/Vientiane + - Asia/Vladivostok + - Asia/Yakutsk + - Asia/Yangon + - Asia/Yekaterinburg + - Asia/Yerevan + - Atlantic/Azores + - Atlantic/Bermuda + - Atlantic/Canary + - Atlantic/Cape_Verde + - Atlantic/Faeroe + - Atlantic/Faroe + - Atlantic/Jan_Mayen + - Atlantic/Madeira + - Atlantic/Reykjavik + - Atlantic/South_Georgia + - Atlantic/St_Helena + - Atlantic/Stanley + - Australia/ACT + - Australia/Adelaide + - Australia/Brisbane + - Australia/Broken_Hill + - Australia/Canberra + - Australia/Currie + - Australia/Darwin + - Australia/Eucla + - Australia/Hobart + - Australia/LHI + - Australia/Lindeman + - Australia/Lord_Howe + - Australia/Melbourne + - Australia/NSW + - Australia/North + - Australia/Perth + - Australia/Queensland + - Australia/South + - Australia/Sydney + - Australia/Tasmania + - Australia/Victoria + - Australia/West + - Australia/Yancowinna + - Brazil/Acre + - Brazil/DeNoronha + - Brazil/East + - Brazil/West + - CET + - CST6CDT + - Canada/Atlantic + - Canada/Central + - Canada/Eastern + - Canada/Mountain + - Canada/Newfoundland + - Canada/Pacific + - Canada/Saskatchewan + - Canada/Yukon + - Chile/Continental + - Chile/EasterIsland + - Cuba + - EET + - EST5EDT + - Egypt + - Eire + - Etc/GMT + - Etc/GMT+0 + - Etc/GMT+1 + - Etc/GMT+10 + - Etc/GMT+11 + - Etc/GMT+12 + - Etc/GMT+2 + - Etc/GMT+3 + - Etc/GMT+4 + - Etc/GMT+5 + - Etc/GMT+6 + - Etc/GMT+7 + - Etc/GMT+8 + - Etc/GMT+9 + - Etc/GMT-0 + - Etc/GMT-1 + - Etc/GMT-10 + - Etc/GMT-11 + - Etc/GMT-12 + - Etc/GMT-13 + - Etc/GMT-14 + - Etc/GMT-2 + - Etc/GMT-3 + - Etc/GMT-4 + - Etc/GMT-5 + - Etc/GMT-6 + - Etc/GMT-7 + - Etc/GMT-8 + - Etc/GMT-9 + - Etc/GMT0 + - Etc/Greenwich + - Etc/UCT + - Etc/UTC + - Etc/Universal + - Etc/Zulu + - Europe/Amsterdam + - Europe/Andorra + - Europe/Astrakhan + - Europe/Athens + - Europe/Belfast + - Europe/Belgrade + - Europe/Berlin + - Europe/Bratislava + - Europe/Brussels + - Europe/Bucharest + - Europe/Budapest + - Europe/Busingen + - Europe/Chisinau + - Europe/Copenhagen + - Europe/Dublin + - Europe/Gibraltar + - Europe/Guernsey + - Europe/Helsinki + - Europe/Isle_of_Man + - Europe/Istanbul + - Europe/Jersey + - Europe/Kaliningrad + - Europe/Kiev + - Europe/Kirov + - Europe/Kyiv + - Europe/Lisbon + - Europe/Ljubljana + - Europe/London + - Europe/Luxembourg + - Europe/Madrid + - Europe/Malta + - Europe/Mariehamn + - Europe/Minsk + - Europe/Monaco + - Europe/Moscow + - Europe/Nicosia + - Europe/Oslo + - Europe/Paris + - Europe/Podgorica + - Europe/Prague + - Europe/Riga + - Europe/Rome + - Europe/Samara + - Europe/San_Marino + - Europe/Sarajevo + - Europe/Saratov + - Europe/Simferopol + - Europe/Skopje + - Europe/Sofia + - Europe/Stockholm + - Europe/Tallinn + - Europe/Tirane + - Europe/Tiraspol + - Europe/Ulyanovsk + - Europe/Uzhgorod + - Europe/Vaduz + - Europe/Vatican + - Europe/Vienna + - Europe/Vilnius + - Europe/Volgograd + - Europe/Warsaw + - Europe/Zagreb + - Europe/Zaporozhye + - Europe/Zurich + - GB + - GB-Eire + - GMT + - GMT0 + - Greenwich + - Hongkong + - Iceland + - Indian/Antananarivo + - Indian/Chagos + - Indian/Christmas + - Indian/Cocos + - Indian/Comoro + - Indian/Kerguelen + - Indian/Mahe + - Indian/Maldives + - Indian/Mauritius + - Indian/Mayotte + - Indian/Reunion + - Iran + - Israel + - Jamaica + - Japan + - Kwajalein + - Libya + - MET + - MST7MDT + - Mexico/BajaNorte + - Mexico/BajaSur + - Mexico/General + - NZ + - NZ-CHAT + - Navajo + - PRC + - PST8PDT + - Pacific/Apia + - Pacific/Auckland + - Pacific/Bougainville + - Pacific/Chatham + - Pacific/Chuuk + - Pacific/Easter + - Pacific/Efate + - Pacific/Enderbury + - Pacific/Fakaofo + - Pacific/Fiji + - Pacific/Funafuti + - Pacific/Galapagos + - Pacific/Gambier + - Pacific/Guadalcanal + - Pacific/Guam + - Pacific/Honolulu + - Pacific/Johnston + - Pacific/Kanton + - Pacific/Kiritimati + - Pacific/Kosrae + - Pacific/Kwajalein + - Pacific/Majuro + - Pacific/Marquesas + - Pacific/Midway + - Pacific/Nauru + - Pacific/Niue + - Pacific/Norfolk + - Pacific/Noumea + - Pacific/Pago_Pago + - Pacific/Palau + - Pacific/Pitcairn + - Pacific/Pohnpei + - Pacific/Ponape + - Pacific/Port_Moresby + - Pacific/Rarotonga + - Pacific/Saipan + - Pacific/Samoa + - Pacific/Tahiti + - Pacific/Tarawa + - Pacific/Tongatapu + - Pacific/Truk + - Pacific/Wake + - Pacific/Wallis + - Pacific/Yap + - Poland + - Portugal + - ROK + - Singapore + - SystemV/AST4 + - SystemV/AST4ADT + - SystemV/CST6 + - SystemV/CST6CDT + - SystemV/EST5 + - SystemV/EST5EDT + - SystemV/HST10 + - SystemV/MST7 + - SystemV/MST7MDT + - SystemV/PST8 + - SystemV/PST8PDT + - SystemV/YST9 + - SystemV/YST9YDT + - Turkey + - UCT + - US/Alaska + - US/Aleutian + - US/Arizona + - US/Central + - US/East-Indiana + - US/Eastern + - US/Hawaii + - US/Indiana-Starke + - US/Michigan + - US/Mountain + - US/Pacific + - US/Samoa + - UTC + - Universal + - W-SU + - WET + - Zulu + - EST + - HST + - MST + - ACT + - AET + - AGT + - ART + - AST + - BET + - BST + - CAT + - CNT + - CST + - CTT + - EAT + - ECT + - IET + - IST + - JST + - MIT + - NET + - NST + - PLT + - PNT + - PRT + - PST + - SST + - VST + type: string + frequency: + allOf: + - $ref: '#/components/schemas/FrequencyInput' + description: Frequency settings for the scheduled job. + recipient_details: + allOf: + - $ref: '#/components/schemas/RecipientDetailsInput' + description: "Recipients of the scheduled job notifications. Add the GUID\ + \ or name of the ThoughtSpot users or groups as recipients in the `principals`\ + \ array. If a recipient is not a ThoughtSpot user, specify email address." + personalised_view_id: + description: Personalised view id of the liveboard to be scheduled. + type: string + required: + - description + - metadata_identifier + - metadata_type + - name + - recipient_details + - time_zone + type: object + SearchSchedulesRequest: + example: + metadata: + - identifier: identifier + type: LIVEBOARD + - identifier: identifier + type: LIVEBOARD + record_size: 6 + history_runs_options: "" + sort_options: "" + record_offset: 0 + schedule_identifiers: + - schedule_identifiers + - schedule_identifiers + properties: + metadata: + description: Metadata objects associated with the scheduled jobs. + items: + $ref: '#/components/schemas/MetadataInput' + type: array + record_offset: + description: The starting record number from where the records should be + included. + format: int32 + type: integer + record_size: + description: The number of records that should be included. + format: int32 + type: integer + sort_options: + allOf: + - $ref: '#/components/schemas/SortingOptions' + description: Sort options. + history_runs_options: + allOf: + - $ref: '#/components/schemas/ScheduleHistoryRunsOptionsInput' + description: Options while fetching history runs for the schedule. + schedule_identifiers: + description: unique ID or name of the Schedule + items: + type: string + type: array + type: object + UpdateScheduleRequest: + example: + metadata_identifier: metadata_identifier + metadata_type: LIVEBOARD + liveboard_options: "" + name: name + description: description + pdf_options: "" + recipient_details: "" + time_zone: Africa/Abidjan + personalised_view_id: personalised_view_id + file_format: CSV + frequency: "" + status: ACTIVE + properties: + name: + description: Name of the scheduled job. + type: string + description: + description: Description of the scheduled job. + type: string + metadata_type: + description: Type of metadata object. + enum: + - LIVEBOARD + type: string + metadata_identifier: + description: Unique ID or name of the metadata object. + type: string + file_format: + description: Export file format. + enum: + - CSV + - PDF + - XLSX + type: string + liveboard_options: + allOf: + - $ref: '#/components/schemas/LiveboardOptionsInput' + description: Options to specify the details of a Liveboard. + pdf_options: + allOf: + - $ref: '#/components/schemas/SchedulesPdfOptionsInput' + description: Options for PDF export. + time_zone: + description: Time zone + enum: + - Africa/Abidjan + - Africa/Accra + - Africa/Addis_Ababa + - Africa/Algiers + - Africa/Asmara + - Africa/Asmera + - Africa/Bamako + - Africa/Bangui + - Africa/Banjul + - Africa/Bissau + - Africa/Blantyre + - Africa/Brazzaville + - Africa/Bujumbura + - Africa/Cairo + - Africa/Casablanca + - Africa/Ceuta + - Africa/Conakry + - Africa/Dakar + - Africa/Dar_es_Salaam + - Africa/Djibouti + - Africa/Douala + - Africa/El_Aaiun + - Africa/Freetown + - Africa/Gaborone + - Africa/Harare + - Africa/Johannesburg + - Africa/Juba + - Africa/Kampala + - Africa/Khartoum + - Africa/Kigali + - Africa/Kinshasa + - Africa/Lagos + - Africa/Libreville + - Africa/Lome + - Africa/Luanda + - Africa/Lubumbashi + - Africa/Lusaka + - Africa/Malabo + - Africa/Maputo + - Africa/Maseru + - Africa/Mbabane + - Africa/Mogadishu + - Africa/Monrovia + - Africa/Nairobi + - Africa/Ndjamena + - Africa/Niamey + - Africa/Nouakchott + - Africa/Ouagadougou + - Africa/Porto-Novo + - Africa/Sao_Tome + - Africa/Timbuktu + - Africa/Tripoli + - Africa/Tunis + - Africa/Windhoek + - America/Adak + - America/Anchorage + - America/Anguilla + - America/Antigua + - America/Araguaina + - America/Argentina/Buenos_Aires + - America/Argentina/Catamarca + - America/Argentina/ComodRivadavia + - America/Argentina/Cordoba + - America/Argentina/Jujuy + - America/Argentina/La_Rioja + - America/Argentina/Mendoza + - America/Argentina/Rio_Gallegos + - America/Argentina/Salta + - America/Argentina/San_Juan + - America/Argentina/San_Luis + - America/Argentina/Tucuman + - America/Argentina/Ushuaia + - America/Aruba + - America/Asuncion + - America/Atikokan + - America/Atka + - America/Bahia + - America/Bahia_Banderas + - America/Barbados + - America/Belem + - America/Belize + - America/Blanc-Sablon + - America/Boa_Vista + - America/Bogota + - America/Boise + - America/Buenos_Aires + - America/Cambridge_Bay + - America/Campo_Grande + - America/Cancun + - America/Caracas + - America/Catamarca + - America/Cayenne + - America/Cayman + - America/Chicago + - America/Chihuahua + - America/Coral_Harbour + - America/Cordoba + - America/Costa_Rica + - America/Creston + - America/Cuiaba + - America/Curacao + - America/Danmarkshavn + - America/Dawson + - America/Dawson_Creek + - America/Denver + - America/Detroit + - America/Dominica + - America/Edmonton + - America/Eirunepe + - America/El_Salvador + - America/Ensenada + - America/Fort_Nelson + - America/Fort_Wayne + - America/Fortaleza + - America/Glace_Bay + - America/Godthab + - America/Goose_Bay + - America/Grand_Turk + - America/Grenada + - America/Guadeloupe + - America/Guatemala + - America/Guayaquil + - America/Guyana + - America/Halifax + - America/Havana + - America/Hermosillo + - America/Indiana/Indianapolis + - America/Indiana/Knox + - America/Indiana/Marengo + - America/Indiana/Petersburg + - America/Indiana/Tell_City + - America/Indiana/Vevay + - America/Indiana/Vincennes + - America/Indiana/Winamac + - America/Indianapolis + - America/Inuvik + - America/Iqaluit + - America/Jamaica + - America/Jujuy + - America/Juneau + - America/Kentucky/Louisville + - America/Kentucky/Monticello + - America/Knox_IN + - America/Kralendijk + - America/La_Paz + - America/Lima + - America/Los_Angeles + - America/Louisville + - America/Lower_Princes + - America/Maceio + - America/Managua + - America/Manaus + - America/Marigot + - America/Martinique + - America/Matamoros + - America/Mazatlan + - America/Mendoza + - America/Menominee + - America/Merida + - America/Metlakatla + - America/Mexico_City + - America/Miquelon + - America/Moncton + - America/Monterrey + - America/Montevideo + - America/Montreal + - America/Montserrat + - America/Nassau + - America/New_York + - America/Nipigon + - America/Nome + - America/Noronha + - America/North_Dakota/Beulah + - America/North_Dakota/Center + - America/North_Dakota/New_Salem + - America/Nuuk + - America/Ojinaga + - America/Panama + - America/Pangnirtung + - America/Paramaribo + - America/Phoenix + - America/Port-au-Prince + - America/Port_of_Spain + - America/Porto_Acre + - America/Porto_Velho + - America/Puerto_Rico + - America/Punta_Arenas + - America/Rainy_River + - America/Rankin_Inlet + - America/Recife + - America/Regina + - America/Resolute + - America/Rio_Branco + - America/Rosario + - America/Santa_Isabel + - America/Santarem + - America/Santiago + - America/Santo_Domingo + - America/Sao_Paulo + - America/Scoresbysund + - America/Shiprock + - America/Sitka + - America/St_Barthelemy + - America/St_Johns + - America/St_Kitts + - America/St_Lucia + - America/St_Thomas + - America/St_Vincent + - America/Swift_Current + - America/Tegucigalpa + - America/Thule + - America/Thunder_Bay + - America/Tijuana + - America/Toronto + - America/Tortola + - America/Vancouver + - America/Virgin + - America/Whitehorse + - America/Winnipeg + - America/Yakutat + - America/Yellowknife + - Antarctica/Casey + - Antarctica/Davis + - Antarctica/DumontDUrville + - Antarctica/Macquarie + - Antarctica/Mawson + - Antarctica/McMurdo + - Antarctica/Palmer + - Antarctica/Rothera + - Antarctica/South_Pole + - Antarctica/Syowa + - Antarctica/Troll + - Antarctica/Vostok + - Arctic/Longyearbyen + - Asia/Aden + - Asia/Almaty + - Asia/Amman + - Asia/Anadyr + - Asia/Aqtau + - Asia/Aqtobe + - Asia/Ashgabat + - Asia/Ashkhabad + - Asia/Atyrau + - Asia/Baghdad + - Asia/Bahrain + - Asia/Baku + - Asia/Bangkok + - Asia/Barnaul + - Asia/Beirut + - Asia/Bishkek + - Asia/Brunei + - Asia/Calcutta + - Asia/Chita + - Asia/Choibalsan + - Asia/Chongqing + - Asia/Chungking + - Asia/Colombo + - Asia/Dacca + - Asia/Damascus + - Asia/Dhaka + - Asia/Dili + - Asia/Dubai + - Asia/Dushanbe + - Asia/Famagusta + - Asia/Gaza + - Asia/Harbin + - Asia/Hebron + - Asia/Ho_Chi_Minh + - Asia/Hong_Kong + - Asia/Hovd + - Asia/Irkutsk + - Asia/Istanbul + - Asia/Jakarta + - Asia/Jayapura + - Asia/Jerusalem + - Asia/Kabul + - Asia/Kamchatka + - Asia/Karachi + - Asia/Kashgar + - Asia/Kathmandu + - Asia/Katmandu + - Asia/Khandyga + - Asia/Kolkata + - Asia/Krasnoyarsk + - Asia/Kuala_Lumpur + - Asia/Kuching + - Asia/Kuwait + - Asia/Macao + - Asia/Macau + - Asia/Magadan + - Asia/Makassar + - Asia/Manila + - Asia/Muscat + - Asia/Nicosia + - Asia/Novokuznetsk + - Asia/Novosibirsk + - Asia/Omsk + - Asia/Oral + - Asia/Phnom_Penh + - Asia/Pontianak + - Asia/Pyongyang + - Asia/Qatar + - Asia/Qostanay + - Asia/Qyzylorda + - Asia/Rangoon + - Asia/Riyadh + - Asia/Saigon + - Asia/Sakhalin + - Asia/Samarkand + - Asia/Seoul + - Asia/Shanghai + - Asia/Singapore + - Asia/Srednekolymsk + - Asia/Taipei + - Asia/Tashkent + - Asia/Tbilisi + - Asia/Tehran + - Asia/Tel_Aviv + - Asia/Thimbu + - Asia/Thimphu + - Asia/Tokyo + - Asia/Tomsk + - Asia/Ujung_Pandang + - Asia/Ulaanbaatar + - Asia/Ulan_Bator + - Asia/Urumqi + - Asia/Ust-Nera + - Asia/Vientiane + - Asia/Vladivostok + - Asia/Yakutsk + - Asia/Yangon + - Asia/Yekaterinburg + - Asia/Yerevan + - Atlantic/Azores + - Atlantic/Bermuda + - Atlantic/Canary + - Atlantic/Cape_Verde + - Atlantic/Faeroe + - Atlantic/Faroe + - Atlantic/Jan_Mayen + - Atlantic/Madeira + - Atlantic/Reykjavik + - Atlantic/South_Georgia + - Atlantic/St_Helena + - Atlantic/Stanley + - Australia/ACT + - Australia/Adelaide + - Australia/Brisbane + - Australia/Broken_Hill + - Australia/Canberra + - Australia/Currie + - Australia/Darwin + - Australia/Eucla + - Australia/Hobart + - Australia/LHI + - Australia/Lindeman + - Australia/Lord_Howe + - Australia/Melbourne + - Australia/NSW + - Australia/North + - Australia/Perth + - Australia/Queensland + - Australia/South + - Australia/Sydney + - Australia/Tasmania + - Australia/Victoria + - Australia/West + - Australia/Yancowinna + - Brazil/Acre + - Brazil/DeNoronha + - Brazil/East + - Brazil/West + - CET + - CST6CDT + - Canada/Atlantic + - Canada/Central + - Canada/Eastern + - Canada/Mountain + - Canada/Newfoundland + - Canada/Pacific + - Canada/Saskatchewan + - Canada/Yukon + - Chile/Continental + - Chile/EasterIsland + - Cuba + - EET + - EST5EDT + - Egypt + - Eire + - Etc/GMT + - Etc/GMT+0 + - Etc/GMT+1 + - Etc/GMT+10 + - Etc/GMT+11 + - Etc/GMT+12 + - Etc/GMT+2 + - Etc/GMT+3 + - Etc/GMT+4 + - Etc/GMT+5 + - Etc/GMT+6 + - Etc/GMT+7 + - Etc/GMT+8 + - Etc/GMT+9 + - Etc/GMT-0 + - Etc/GMT-1 + - Etc/GMT-10 + - Etc/GMT-11 + - Etc/GMT-12 + - Etc/GMT-13 + - Etc/GMT-14 + - Etc/GMT-2 + - Etc/GMT-3 + - Etc/GMT-4 + - Etc/GMT-5 + - Etc/GMT-6 + - Etc/GMT-7 + - Etc/GMT-8 + - Etc/GMT-9 + - Etc/GMT0 + - Etc/Greenwich + - Etc/UCT + - Etc/UTC + - Etc/Universal + - Etc/Zulu + - Europe/Amsterdam + - Europe/Andorra + - Europe/Astrakhan + - Europe/Athens + - Europe/Belfast + - Europe/Belgrade + - Europe/Berlin + - Europe/Bratislava + - Europe/Brussels + - Europe/Bucharest + - Europe/Budapest + - Europe/Busingen + - Europe/Chisinau + - Europe/Copenhagen + - Europe/Dublin + - Europe/Gibraltar + - Europe/Guernsey + - Europe/Helsinki + - Europe/Isle_of_Man + - Europe/Istanbul + - Europe/Jersey + - Europe/Kaliningrad + - Europe/Kiev + - Europe/Kirov + - Europe/Kyiv + - Europe/Lisbon + - Europe/Ljubljana + - Europe/London + - Europe/Luxembourg + - Europe/Madrid + - Europe/Malta + - Europe/Mariehamn + - Europe/Minsk + - Europe/Monaco + - Europe/Moscow + - Europe/Nicosia + - Europe/Oslo + - Europe/Paris + - Europe/Podgorica + - Europe/Prague + - Europe/Riga + - Europe/Rome + - Europe/Samara + - Europe/San_Marino + - Europe/Sarajevo + - Europe/Saratov + - Europe/Simferopol + - Europe/Skopje + - Europe/Sofia + - Europe/Stockholm + - Europe/Tallinn + - Europe/Tirane + - Europe/Tiraspol + - Europe/Ulyanovsk + - Europe/Uzhgorod + - Europe/Vaduz + - Europe/Vatican + - Europe/Vienna + - Europe/Vilnius + - Europe/Volgograd + - Europe/Warsaw + - Europe/Zagreb + - Europe/Zaporozhye + - Europe/Zurich + - GB + - GB-Eire + - GMT + - GMT0 + - Greenwich + - Hongkong + - Iceland + - Indian/Antananarivo + - Indian/Chagos + - Indian/Christmas + - Indian/Cocos + - Indian/Comoro + - Indian/Kerguelen + - Indian/Mahe + - Indian/Maldives + - Indian/Mauritius + - Indian/Mayotte + - Indian/Reunion + - Iran + - Israel + - Jamaica + - Japan + - Kwajalein + - Libya + - MET + - MST7MDT + - Mexico/BajaNorte + - Mexico/BajaSur + - Mexico/General + - NZ + - NZ-CHAT + - Navajo + - PRC + - PST8PDT + - Pacific/Apia + - Pacific/Auckland + - Pacific/Bougainville + - Pacific/Chatham + - Pacific/Chuuk + - Pacific/Easter + - Pacific/Efate + - Pacific/Enderbury + - Pacific/Fakaofo + - Pacific/Fiji + - Pacific/Funafuti + - Pacific/Galapagos + - Pacific/Gambier + - Pacific/Guadalcanal + - Pacific/Guam + - Pacific/Honolulu + - Pacific/Johnston + - Pacific/Kanton + - Pacific/Kiritimati + - Pacific/Kosrae + - Pacific/Kwajalein + - Pacific/Majuro + - Pacific/Marquesas + - Pacific/Midway + - Pacific/Nauru + - Pacific/Niue + - Pacific/Norfolk + - Pacific/Noumea + - Pacific/Pago_Pago + - Pacific/Palau + - Pacific/Pitcairn + - Pacific/Pohnpei + - Pacific/Ponape + - Pacific/Port_Moresby + - Pacific/Rarotonga + - Pacific/Saipan + - Pacific/Samoa + - Pacific/Tahiti + - Pacific/Tarawa + - Pacific/Tongatapu + - Pacific/Truk + - Pacific/Wake + - Pacific/Wallis + - Pacific/Yap + - Poland + - Portugal + - ROK + - Singapore + - SystemV/AST4 + - SystemV/AST4ADT + - SystemV/CST6 + - SystemV/CST6CDT + - SystemV/EST5 + - SystemV/EST5EDT + - SystemV/HST10 + - SystemV/MST7 + - SystemV/MST7MDT + - SystemV/PST8 + - SystemV/PST8PDT + - SystemV/YST9 + - SystemV/YST9YDT + - Turkey + - UCT + - US/Alaska + - US/Aleutian + - US/Arizona + - US/Central + - US/East-Indiana + - US/Eastern + - US/Hawaii + - US/Indiana-Starke + - US/Michigan + - US/Mountain + - US/Pacific + - US/Samoa + - UTC + - Universal + - W-SU + - WET + - Zulu + - EST + - HST + - MST + - ACT + - AET + - AGT + - ART + - AST + - BET + - BST + - CAT + - CNT + - CST + - CTT + - EAT + - ECT + - IET + - IST + - JST + - MIT + - NET + - NST + - PLT + - PNT + - PRT + - PST + - SST + - VST + type: string + frequency: + allOf: + - $ref: '#/components/schemas/FrequencyInput' + description: Frequency of the scheduled job run. + recipient_details: + allOf: + - $ref: '#/components/schemas/RecipientDetailsInput' + description: "Recipients of the scheduled job notifications. You can add\ + \ the ID or name of the ThoughtSpot users or groups as recipients in the\ + \ `principals` array. If a recipient is not a ThoughtSpot user, specify\ + \ email address." + status: + description: Status of the schedule + enum: + - ACTIVE + - PAUSE + type: string + personalised_view_id: + description: Personalised view id of the liveboard to be scheduled. + type: string + type: object + AssignChangeAuthorRequest: + example: + user_identifier: user_identifier + metadata: + - identifier: identifier + type: LIVEBOARD + - identifier: identifier + type: LIVEBOARD + current_owner_identifier: current_owner_identifier + properties: + metadata: + description: GUID or name of the metadata object. + items: + $ref: '#/components/schemas/AuthorMetadataTypeInput' + type: array + user_identifier: + description: GUID or name of the user who you want to assign as the author. + type: string + current_owner_identifier: + description: |- + GUID or name of the current author. When defined, the metadata objects + authored by the specified owner are filtered for the API operation. + type: string + required: + - metadata + - user_identifier + type: object + FetchColumnSecurityRulesRequest: + example: + tables: + - identifier: identifier + obj_identifier: obj_identifier + - identifier: identifier + obj_identifier: obj_identifier + properties: + tables: + description: Array of table identifier objects for which to fetch column + security rules + items: + $ref: '#/components/schemas/ColumnSecurityRuleTableInput' + type: array + required: + - tables + type: object + FetchObjectPrivilegesRequest: + example: + metadata: + - identifier: identifier + type: LOGICAL_TABLE + - identifier: identifier + type: LOGICAL_TABLE + record_size: 6 + principals: + - identifier: identifier + type: USER + - identifier: identifier + type: USER + record_offset: 0 + properties: + metadata: + description: Metadata objects for which you want to fetch object privileges. + For now only LOGICAL_TABLE is supported. It may be extended to other metadata + types in the future. + items: + $ref: '#/components/schemas/ObjectPrivilegesMetadataInput' + type: array + principals: + description: |- + User or group objects for which you want to fetch object privileges. + If not specified, the API returns all users and groups that + have object privileges on the specified metadata objects. + items: + $ref: '#/components/schemas/PrincipalsInput' + type: array + record_offset: + default: 0 + description: The starting record number from where the records should be + included for each metadata type. + format: int32 + type: integer + record_size: + default: 20 + description: The number of records that should be included for each metadata + type. + format: int32 + type: integer + required: + - metadata + type: object + FetchPermissionsOfPrincipalsRequest: + example: + metadata: + - identifier: identifier + type: LIVEBOARD + - identifier: identifier + type: LIVEBOARD + record_size: 6 + default_metadata_type: ALL + principals: + - identifier: identifier + type: USER + - identifier: identifier + type: USER + record_offset: 0 + properties: + principals: + description: GUID or name of the user or group. + items: + $ref: '#/components/schemas/PrincipalsInput' + type: array + metadata: + description: |- + Metadata objects for which you want to fetch permission details. + If not specified, the API returns permission details for all + metadata objects that the specified users and groups can access. + items: + $ref: '#/components/schemas/PermissionsMetadataTypeInput' + type: array + record_offset: + default: 0 + description: The starting record number from where the records should be + included for each metadata type. + format: int32 + type: integer + record_size: + default: -1 + description: The number of records that should be included for each metadata + type. + format: int32 + type: integer + default_metadata_type: + description: "When no metadata objects input is passed, metadata objects\ + \ of this type are fetched." + enum: + - ALL + - LIVEBOARD + - ANSWER + - LOGICAL_TABLE + - LOGICAL_COLUMN + - CONNECTION + - COLLECTION + type: string + required: + - principals + type: object + FetchPermissionsOnMetadataRequest: + example: + metadata: + - identifier: identifier + type: LIVEBOARD + - identifier: identifier + type: LIVEBOARD + permission_type: permission_type + include_dependent_objects: false + record_size: 6 + principals: + - identifier: identifier + type: USER + - identifier: identifier + type: USER + record_offset: 0 + properties: + metadata: + description: GUID or name of the metadata object. + items: + $ref: '#/components/schemas/PermissionsMetadataTypeInput' + type: array + principals: + description: |- + User or group objects for which you want to fetch permissions. + If not specified, the API returns all users and groups that + can access the specified metadata objects. + items: + $ref: '#/components/schemas/PrincipalsInput' + type: array + include_dependent_objects: + default: false + description: Indicates whether to fetch permissions of dependent metadata + objects. + nullable: true + type: boolean + record_offset: + default: 0 + description: The starting record number from where the records should be + included for each metadata type. + format: int32 + type: integer + record_size: + default: -1 + description: The number of records that should be included for each metadata + type. + format: int32 + type: integer + permission_type: + description: |- +
Version: 10.3.0.cl or later +
+ + Specifies the type of permission. Valid values are: + EFFECTIVE - If the user permission to the metadata objects is granted by the privileges assigned to the groups to which they belong. + DEFINED - If a user or user group received access to metadata objects via object sharing by another user. + type: string + required: + - metadata + type: object + ManageObjectPrivilegeRequest: + example: + object_privilege_types: + - SPOTTER_COACHING_PRIVILEGE + - SPOTTER_COACHING_PRIVILEGE + metadata_type: LOGICAL_TABLE + principals: + - identifier: identifier + type: USER + - identifier: identifier + type: USER + operation: ADD + metadata_identifiers: + - metadata_identifiers + - metadata_identifiers + properties: + operation: + description: "Operation to perform to manage object privileges. Available\ + \ operations are: `ADD`, `REMOVE`." + enum: + - ADD + - REMOVE + type: string + metadata_type: + description: Type of metadata objects on which you want to perform the operation. + For now only LOGICAL_TABLE is supported. It may be extended to other metadata + types in the future. + enum: + - LOGICAL_TABLE + type: string + object_privilege_types: + description: List of object privilege types on which you want to perform + the operation. + items: + enum: + - SPOTTER_COACHING_PRIVILEGE + type: string + type: array + metadata_identifiers: + description: List of metadata identifiers (GUID or name) on which you want + to perform the operation. + items: + type: string + type: array + principals: + description: User or group objects (GUID or name) to which you want to apply + the given operation and given object privileges. + items: + $ref: '#/components/schemas/PrincipalsInput' + type: array + required: + - metadata_identifiers + - metadata_type + - object_privilege_types + - operation + - principals + type: object + PublishMetadataRequest: + example: + metadata: + - identifier: identifier + type: LIVEBOARD + - identifier: identifier + type: LIVEBOARD + skip_validation: true + org_identifiers: + - org_identifiers + - org_identifiers + properties: + metadata: + description: Metadata objects to be published. + items: + $ref: '#/components/schemas/PublishMetadataListItem' + type: array + org_identifiers: + description: Unique ID or name of orgs to which metadata objects should + be published. + items: + type: string + type: array + skip_validation: + description: Skip validations of objects to be published. + nullable: true + type: boolean + required: + - metadata + - org_identifiers + type: object + ShareMetadataRequest: + example: + emails: + - emails + - emails + metadata: + - identifier: identifier + type: LIVEBOARD + - identifier: identifier + type: LIVEBOARD + has_lenient_discoverability: false + metadata_type: LIVEBOARD + permissions: + - principal: + identifier: identifier + type: USER + share_mode: READ_ONLY + content_share_mode: READ_ONLY + - principal: + identifier: identifier + type: USER + share_mode: READ_ONLY + content_share_mode: READ_ONLY + visualization_identifiers: + - visualization_identifiers + - visualization_identifiers + enable_custom_url: false + message: message + metadata_identifiers: + - metadata_identifiers + - metadata_identifiers + notify_on_share: true + properties: + metadata_type: + description: |- + Type of metadata. Required if identifier in metadata_identifies is a name. + 1. Liveboard + 2. Answers + 3. LOGICAL_TABLE for any data object such as table, worksheet or view. + 4. LOGICAL_COLUMN + 5. Connection + 6. Collection + enum: + - LIVEBOARD + - ANSWER + - LOGICAL_TABLE + - LOGICAL_COLUMN + - CONNECTION + - COLLECTION + type: string + metadata_identifiers: + description: "Unique ID or name of metadata objects. Note: All the names\ + \ should belong to same metadata_type" + items: + type: string + type: array + metadata: + description: Metadata details for sharing objects. + items: + $ref: '#/components/schemas/ShareMetadataTypeInput' + type: array + permissions: + description: Permission details for sharing the objects. + items: + $ref: '#/components/schemas/SharePermissionsInput' + type: array + visualization_identifiers: + description: Options to specify details of Liveboard. First Liveboard encountered + in payload is considered to be the corresponding Liveboard. + items: + type: string + type: array + emails: + default: [] + description: Email IDs to which notifications will be sent. + items: + type: string + type: array + message: + description: Message to be included in notification. + type: string + enable_custom_url: + default: false + description: Sends object URLs in the customized format in email notifications. + nullable: true + type: boolean + notify_on_share: + default: true + description: Flag to notify user when any object is shared. + nullable: true + type: boolean + has_lenient_discoverability: + default: false + description: Flag to make the object discoverable. + nullable: true + type: boolean + required: + - message + - permissions + type: object + UnpublishMetadataRequest: + example: + include_dependencies: true + metadata: + - identifier: identifier + type: LIVEBOARD + - identifier: identifier + type: LIVEBOARD + org_identifiers: + - org_identifiers + - org_identifiers + force: true + properties: + force: + description: Force unpublishes the object. This will break all the dependent + objects in the unpublished orgs. + nullable: true + type: boolean + include_dependencies: + description: |- + Should we unpublish all the dependencies for the objects specified. + The dependencies will be unpublished if no other published object is using it. + type: boolean + metadata: + description: Metadata objects. + items: + $ref: '#/components/schemas/PublishMetadataListItem' + type: array + org_identifiers: + description: Unique ID or name of orgs. + items: + type: string + type: array + required: + - include_dependencies + - metadata + - org_identifiers + type: object + UpdateColumnSecurityRulesRequest: + example: + identifier: identifier + column_security_rules: + - column_identifier: column_identifier + is_unsecured: true + group_access: + - group_identifiers: + - group_identifiers + - group_identifiers + operation: ADD + - group_identifiers: + - group_identifiers + - group_identifiers + operation: ADD + - column_identifier: column_identifier + is_unsecured: true + group_access: + - group_identifiers: + - group_identifiers + - group_identifiers + operation: ADD + - group_identifiers: + - group_identifiers + - group_identifiers + operation: ADD + clear_csr: true + obj_identifier: obj_identifier + properties: + identifier: + description: GUID or name of the table for which we want to create column + security rules + type: string + obj_identifier: + description: The object ID of the table + type: string + clear_csr: + description: "If true, then all the secured columns will be marked as unprotected,\ + \ and all the group associations will be removed" + nullable: true + type: boolean + column_security_rules: + description: Array where each object defines the security rule for a specific + column + items: + $ref: '#/components/schemas/ColumnSecurityRuleUpdate' + type: array + required: + - column_security_rules + type: object + ConfigureCommunicationChannelPreferencesRequest: + example: + cluster_preferences: + - event_type: LIVEBOARD_SCHEDULE + channels: + - EMAIL + - EMAIL + - event_type: LIVEBOARD_SCHEDULE + channels: + - EMAIL + - EMAIL + org_preferences: + - preferences: + - event_type: LIVEBOARD_SCHEDULE + channels: + - EMAIL + - EMAIL + - event_type: LIVEBOARD_SCHEDULE + channels: + - EMAIL + - EMAIL + org_identifier: org_identifier + reset_events: + - LIVEBOARD_SCHEDULE + - LIVEBOARD_SCHEDULE + operation: REPLACE + - preferences: + - event_type: LIVEBOARD_SCHEDULE + channels: + - EMAIL + - EMAIL + - event_type: LIVEBOARD_SCHEDULE + channels: + - EMAIL + - EMAIL + org_identifier: org_identifier + reset_events: + - LIVEBOARD_SCHEDULE + - LIVEBOARD_SCHEDULE + operation: REPLACE + properties: + cluster_preferences: + description: Cluster-level default configurations. + items: + $ref: '#/components/schemas/EventChannelConfigInput' + type: array + org_preferences: + description: Org-specific configurations. + items: + $ref: '#/components/schemas/OrgChannelConfigInput' + type: array + type: object + ConfigureSecuritySettingsRequest: + example: + cluster_preferences: "" + org_preferences: + - cors_whitelisted_urls: + - cors_whitelisted_urls + - cors_whitelisted_urls + non_embed_access: + block_full_app_access: true + groups_identifiers_with_access: + - groups_identifiers_with_access + - groups_identifiers_with_access + org_identifier: org_identifier + - cors_whitelisted_urls: + - cors_whitelisted_urls + - cors_whitelisted_urls + non_embed_access: + block_full_app_access: true + groups_identifiers_with_access: + - groups_identifiers_with_access + - groups_identifiers_with_access + org_identifier: org_identifier + properties: + cluster_preferences: + allOf: + - $ref: '#/components/schemas/SecuritySettingsClusterPreferencesInput' + description: Cluster-level security preferences. + org_preferences: + description: Org-level security preferences for the current org. + items: + $ref: '#/components/schemas/SecuritySettingsOrgPreferencesInput' + type: array + type: object + SearchCommunicationChannelPreferencesRequest: + example: + cluster_preferences: + - LIVEBOARD_SCHEDULE + - LIVEBOARD_SCHEDULE + org_preferences: + - event_types: + - LIVEBOARD_SCHEDULE + - LIVEBOARD_SCHEDULE + org_identifier: org_identifier + - event_types: + - LIVEBOARD_SCHEDULE + - LIVEBOARD_SCHEDULE + org_identifier: org_identifier + properties: + cluster_preferences: + description: Event types to search for in cluster-level preferences. + items: + enum: + - LIVEBOARD_SCHEDULE + type: string + type: array + org_preferences: + description: Org-specific search criteria. + items: + $ref: '#/components/schemas/OrgPreferenceSearchCriteriaInput' + type: array + type: object + SearchSecuritySettingsRequest: + example: + scope: CLUSTER + properties: + scope: + description: |- + Scope of security settings to retrieve. CLUSTER returns cluster-level settings, + ORG returns org-level settings for the current org. + If not specified, returns both cluster and org settings based on user privileges. + enum: + - CLUSTER + - ORG + type: string + type: object + UpdateSystemConfigRequest: + example: + configuration: "{}" + properties: + configuration: + description: Configuration JSON with the key-value pair of configuration + attributes to be updated. + type: object + required: + - configuration + type: object + ValidateCommunicationChannelRequest: + example: + event_type: LIVEBOARD_SCHEDULE + channel_identifier: channel_identifier + channel_type: WEBHOOK + properties: + channel_type: + description: "Type of communication channel to validate (e.g., WEBHOOK)." + enum: + - WEBHOOK + type: string + channel_identifier: + description: Unique identifier or name for the communication channel. + type: string + event_type: + description: Event type to validate for this channel. + enum: + - LIVEBOARD_SCHEDULE + type: string + required: + - channel_identifier + - channel_type + - event_type + type: object + AssignTagRequest: + example: + metadata: + - identifier: identifier + type: LIVEBOARD + - identifier: identifier + type: LIVEBOARD + tag_identifiers: + - tag_identifiers + - tag_identifiers + properties: + metadata: + description: Metadata objects. + items: + $ref: '#/components/schemas/TagMetadataTypeInput' + type: array + tag_identifiers: + description: GUID or name of the tag. + items: + type: string + type: array + required: + - metadata + - tag_identifiers + type: object + CreateTagRequest: + example: + color: color + name: name + properties: + name: + description: Name of the tag. + type: string + color: + description: "Hex color code to be assigned to the tag. For example, #ff78a9." + type: string + required: + - name + type: object + SearchTagsRequest: + example: + color: color + name_pattern: name_pattern + tag_identifier: tag_identifier + properties: + tag_identifier: + description: Name or Id of the tag. + type: string + name_pattern: + description: A pattern to match case-insensitive name of the Tag object. + type: string + color: + description: Color of the tag. + type: string + type: object + UnassignTagRequest: + example: + metadata: + - identifier: identifier + type: LIVEBOARD + - identifier: identifier + type: LIVEBOARD + tag_identifiers: + - tag_identifiers + - tag_identifiers + properties: + metadata: + description: Metadata objects. + items: + $ref: '#/components/schemas/TagMetadataTypeInput' + type: array + tag_identifiers: + description: GUID or name of the tag. + items: + type: string + type: array + required: + - metadata + - tag_identifiers + type: object + UpdateTagRequest: + example: + color: color + name: name + properties: + name: + description: Name of the tag. + type: string + color: + description: "Hex color code to be assigned to the tag. For example, #ff78a9." + type: string + type: object + ActivateUserRequest: + example: + user_identifier: user_identifier + password: password + auth_token: auth_token + properties: properties + properties: + user_identifier: + description: Unique ID or name of the user. + type: string + auth_token: + description: Auth token for the user. + type: string + password: + description: New password for the user to access the account. + type: string + properties: + description: Properties of the user. + type: string + required: + - auth_token + - password + - user_identifier + type: object + ChangeUserPasswordRequest: + example: + user_identifier: user_identifier + new_password: new_password + current_password: current_password + properties: + current_password: + description: Current password of the user. + type: string + new_password: + description: New password for the user. + type: string + user_identifier: + description: GUID or name of the user. + type: string + required: + - current_password + - new_password + - user_identifier + type: object + CreateUserRequest: + example: + preferred_locale: en-CA + account_type: LOCAL_USER + onboarding_experience_completed: false + visibility: SHARABLE + trigger_welcome_email: true + trigger_activation_email: true + account_status: ACTIVE + display_name: display_name + use_browser_language: true + home_liveboard_identifier: home_liveboard_identifier + notify_on_share: true + show_onboarding_experience: true + favorite_metadata: + - identifier: identifier + type: LIVEBOARD + - identifier: identifier + type: LIVEBOARD + password: password + group_identifiers: + - group_identifiers + - group_identifiers + extended_properties: "{}" + name: name + org_identifiers: + - org_identifiers + - org_identifiers + extended_preferences: "{}" + email: email + properties: + name: + description: Name of the user. The username string must be unique. + type: string + display_name: + description: "A unique display name string for the user account, usually\ + \ their first and last name" + type: string + password: + description: "Password for the user account. For IAMv2 users, you must set\ + \ this password if you do not want to trigger an activation email." + type: string + email: + description: Email of the user account + type: string + account_type: + default: LOCAL_USER + description: Type of the account. + enum: + - LOCAL_USER + - LDAP_USER + - SAML_USER + - OIDC_USER + - REMOTE_USER + type: string + account_status: + default: ACTIVE + description: Current status of the user account. The `SUSPENDED` user state + indicates a transitional state applicable to IAMv2 users only. + enum: + - ACTIVE + - INACTIVE + - EXPIRED + - LOCKED + - PENDING + - SUSPENDED + type: string + org_identifiers: + description: List of Org IDs to which the user belongs. + items: + type: string + type: array + group_identifiers: + description: GUIDs or names of the groups to which the newly created user + belongs. + items: + type: string + type: array + visibility: + default: SHARABLE + description: "Visibility of the users. When set to SHARABLE, the user is\ + \ visible to other users and groups when they try to share an object." + enum: + - SHARABLE + - NON_SHARABLE + type: string + notify_on_share: + default: true + description: |- + User preference for receiving email notifications when another ThoughtSpot + user shares a metadata object such as Answer, Liveboard, or Worksheet. + nullable: true + type: boolean + show_onboarding_experience: + default: true + description: The user preference for revisiting the onboarding experience. + nullable: true + type: boolean + onboarding_experience_completed: + default: false + description: flag to get the on-boarding experience is completed or not. + nullable: true + type: boolean + home_liveboard_identifier: + description: |- + GUID of the Liveboard to set a default Liveboard for the user. + ThoughtSpot displays this Liveboard on the Home page when the user logs in. + type: string + favorite_metadata: + description: Metadata objects to add to the user's favorites list. + items: + $ref: '#/components/schemas/FavoriteMetadataInput' + type: array + preferred_locale: + description: |- + Locale for the user. When setting this value, do not set use_browser_language + to true, otherwise the browser's language setting will take precedence and the + preferred_locale value will be ignored. + enum: + - en-CA + - en-GB + - en-US + - de-DE + - ja-JP + - zh-CN + - pt-BR + - fr-FR + - fr-CA + - es-US + - da-DK + - es-ES + - fi-FI + - sv-SE + - nb-NO + - pt-PT + - nl-NL + - it-IT + - ru-RU + - en-IN + - de-CH + - en-NZ + - es-MX + - en-AU + - zh-Hant + - ko-KR + - en-DE + type: string + use_browser_language: + description: "Flag to indicate whether to use the browser locale for the\ + \ user in the UI.\nWhen set to true, the preferred_locale value is unset\ + \ and the browser's\nlanguage setting takes precedence. \n Version: 26.3.0.cl\ + \ or later\n" + nullable: true + type: boolean + extended_properties: + description: Properties for the user + type: object + extended_preferences: + description: Preferences for the user + type: object + trigger_welcome_email: + description: Flag to indicate whether welcome email should be sent to user. + This parameter is applied only on clusters on which IAM is disabled. + nullable: true + type: boolean + trigger_activation_email: + description: "Flag to indicate whether activation email should be sent to\ + \ the user. Default value for IAMv2 users is set to true. Users must either\ + \ set this to false, or enter a valid \npassword if they do not want to\ + \ trigger an activation email." + nullable: true + type: boolean + required: + - display_name + - email + - name + type: object + DeactivateUserRequest: + example: + user_identifier: user_identifier + base_url: base_url + properties: + user_identifier: + description: Unique ID or name of the user. + type: string + base_url: + description: Base url of the cluster. + type: string + required: + - base_url + - user_identifier + type: object + ForceLogoutUsersRequest: + example: + user_identifiers: + - user_identifiers + - user_identifiers + properties: + user_identifiers: + description: GUID or name of the users for force logging out their sessions. + items: + type: string + type: array + type: object + ImportUsersRequest: + example: + delete_unspecified_users: false + default_password: default_password + dry_run: true + users: + - user_identifier: user_identifier + preferred_locale: en-CA + account_type: LOCAL_USER + onboarding_experience_completed: true + visibility: SHARABLE + account_status: ACTIVE + display_name: display_name + use_browser_language: true + home_liveboard_identifier: home_liveboard_identifier + notify_on_share: true + show_onboarding_experience: true + favorite_metadata: + - identifier: identifier + type: LIVEBOARD + - identifier: identifier + type: LIVEBOARD + password: password + group_identifiers: + - group_identifiers + - group_identifiers + org_identifiers: + - org_identifiers + - org_identifiers + email: email + - user_identifier: user_identifier + preferred_locale: en-CA + account_type: LOCAL_USER + onboarding_experience_completed: true + visibility: SHARABLE + account_status: ACTIVE + display_name: display_name + use_browser_language: true + home_liveboard_identifier: home_liveboard_identifier + notify_on_share: true + show_onboarding_experience: true + favorite_metadata: + - identifier: identifier + type: LIVEBOARD + - identifier: identifier + type: LIVEBOARD + password: password + group_identifiers: + - group_identifiers + - group_identifiers + org_identifiers: + - org_identifiers + - org_identifiers + email: email + properties: + users: + description: List of users needs to be imported. + items: + $ref: '#/components/schemas/ImportUser' + type: array + default_password: + description: The default password to assign to users if they do not have + a password assigned in ThoughtSpot. + type: string + dry_run: + default: true + description: "If true, the API performs a test operation and returns user\ + \ IDs whose data will be edited after the import." + nullable: true + type: boolean + delete_unspecified_users: + default: false + description: "If set to true, removes the users that are not specified in\ + \ the API request." + nullable: true + type: boolean + required: + - users + type: object + ResetUserPasswordRequest: + example: + user_identifier: user_identifier + new_password: new_password + properties: + new_password: + description: New password for the user. + type: string + user_identifier: + description: GUID or name of the user. + type: string + required: + - new_password + - user_identifier + type: object + SearchUsersRequest: + example: + user_identifier: user_identifier + include_variable_values: false + privileges: + - ADMINISTRATION + - ADMINISTRATION + account_type: LOCAL_USER + onboarding_experience_completed: true + visibility: SHARABLE + include_favorite_metadata: false + record_size: 6 + account_status: ACTIVE + display_name: display_name + home_liveboard_identifier: home_liveboard_identifier + notify_on_share: true + record_offset: 0 + show_onboarding_experience: true + favorite_metadata: + - identifier: identifier + type: LIVEBOARD + - identifier: identifier + type: LIVEBOARD + role_identifiers: + - role_identifiers + - role_identifiers + group_identifiers: + - group_identifiers + - group_identifiers + name_pattern: name_pattern + org_identifiers: + - org_identifiers + - org_identifiers + email: email + sort_options: "" + properties: + user_identifier: + description: GUID / name of the user to search + type: string + display_name: + description: "A unique display name string for the user account, usually\ + \ their first and last name" + type: string + name_pattern: + description: A pattern to match case-insensitive name of the User object. + type: string + visibility: + description: Visibility of the user + enum: + - SHARABLE + - NON_SHARABLE + type: string + email: + description: Email of the user account + type: string + group_identifiers: + description: GUID or name of the group to which the user belongs + items: + type: string + type: array + privileges: + description: Privileges assigned to the user + items: + enum: + - ADMINISTRATION + - AUTHORING + - USERDATAUPLOADING + - DATADOWNLOADING + - USERMANAGEMENT + - DATAMANAGEMENT + - SHAREWITHALL + - JOBSCHEDULING + - A3ANALYSIS + - EXPERIMENTALFEATUREPRIVILEGE + - BYPASSRLS + - RANALYSIS + - DEVELOPER + - USER_ADMINISTRATION + - GROUP_ADMINISTRATION + - SYNCMANAGEMENT + - CAN_CREATE_CATALOG + - DISABLE_PINBOARD_CREATION + - LIVEBOARD_VERIFIER + - PREVIEW_THOUGHTSPOT_SAGE + - APPLICATION_ADMINISTRATION + - SYSTEM_INFO_ADMINISTRATION + - ORG_ADMINISTRATION + - ROLE_ADMINISTRATION + - AUTHENTICATION_ADMINISTRATION + - BILLING_INFO_ADMINISTRATION + - CAN_MANAGE_CUSTOM_CALENDAR + - CAN_CREATE_OR_EDIT_CONNECTIONS + - CAN_MANAGE_WORKSHEET_VIEWS_TABLES + - CAN_MANAGE_VERSION_CONTROL + - THIRDPARTY_ANALYSIS + - ALLOW_NON_EMBED_FULL_APP_ACCESS + - CAN_ACCESS_ANALYST_STUDIO + - CAN_MANAGE_ANALYST_STUDIO + - PREVIEW_DOCUMENT_SEARCH + - CAN_MODIFY_FOLDERS + - CAN_MANAGE_VARIABLES + - CAN_VIEW_FOLDERS + - CAN_MANAGE_AGENTSPOT + - CAN_ACCESS_AGENTSPOT + - CAN_SETUP_VERSION_CONTROL + - CAN_MANAGE_WEBHOOKS + - CAN_DOWNLOAD_VISUALS + - CAN_DOWNLOAD_DETAILED_DATA + - CAN_USE_SPOTTER + type: string + type: array + account_type: + description: Type of the account + enum: + - LOCAL_USER + - LDAP_USER + - SAML_USER + - OIDC_USER + - REMOTE_USER + type: string + account_status: + description: Current status of the user account. + enum: + - ACTIVE + - INACTIVE + - EXPIRED + - LOCKED + - PENDING + - SUSPENDED + type: string + notify_on_share: + description: |- + User preference for receiving email notifications when another ThoughtSpot user + shares a metadata object such as Answer, Liveboard, or Worksheet. + nullable: true + type: boolean + show_onboarding_experience: + description: The user preference for revisiting the onboarding experience + nullable: true + type: boolean + onboarding_experience_completed: + description: Indicates if the user has completed the onboarding walkthrough + nullable: true + type: boolean + org_identifiers: + description: IDs or names of the Orgs to which the user belongs + items: + type: string + type: array + home_liveboard_identifier: + description: Unique ID or name of the user's home Liveboard. + type: string + favorite_metadata: + description: Metadata objects which are assigned as favorites of the user. + items: + $ref: '#/components/schemas/FavoriteMetadataInput' + type: array + record_offset: + default: 0 + description: The starting record number from where the records should be + included. + format: int32 + type: integer + record_size: + default: 10 + description: The number of records that should be included. + format: int32 + type: integer + sort_options: + allOf: + - $ref: '#/components/schemas/SortOptions' + description: Sort options. + role_identifiers: + description: Filters by the role assigned to the user. + items: + type: string + type: array + include_favorite_metadata: + default: false + description: Indicates if the user's favorite objects should be displayed. + nullable: true + type: boolean + include_variable_values: + default: false + description: Indicates if the user's formula variable values should be included + in the response. + nullable: true + type: boolean + type: object + UpdateUserRequest: + example: + preferred_locale: en-CA + onboarding_experience_completed: true + account_type: LOCAL_USER + visibility: SHARABLE + account_status: ACTIVE + display_name: display_name + use_browser_language: true + home_liveboard_identifier: home_liveboard_identifier + notify_on_share: true + show_onboarding_experience: true + favorite_metadata: + - identifier: identifier + type: LIVEBOARD + - identifier: identifier + type: LIVEBOARD + group_identifiers: + - group_identifiers + - group_identifiers + extended_properties: "{}" + name: name + org_identifiers: + - org_identifiers + - org_identifiers + operation: REPLACE + extended_preferences: "{}" + email: email + properties: + name: + description: Name of the user. The username string must be unique. + type: string + display_name: + description: "A unique display name string for the user account, usually\ + \ their first and last name" + type: string + visibility: + description: "Visibility of the users. When set to SHARABLE, the user is\ + \ visible to other users and groups when they try to share an object." + enum: + - SHARABLE + - NON_SHARABLE + type: string + email: + description: Email of the user account + type: string + account_status: + description: Current status of the user account. The `SUSPENDED` user state + indicates a transitional state applicable to IAMv2 users only. + enum: + - ACTIVE + - INACTIVE + - EXPIRED + - LOCKED + - PENDING + - SUSPENDED + type: string + notify_on_share: + description: |- + User preference for receiving email notifications when another ThoughtSpot user + shares a metadata object such as Answer, Liveboard, or Worksheet. + nullable: true + type: boolean + show_onboarding_experience: + description: The user preference for revisiting the onboarding experience. + nullable: true + type: boolean + onboarding_experience_completed: + description: Indicates if the user has completed the onboarding and allows + turning off the onboarding walkthrough. + nullable: true + type: boolean + account_type: + description: Type of the account. + enum: + - LOCAL_USER + - LDAP_USER + - SAML_USER + - OIDC_USER + - REMOTE_USER + type: string + group_identifiers: + description: GUIDs or names of the groups. + items: + type: string + type: array + home_liveboard_identifier: + description: |- + GUID of the Liveboard to set a default Liveboard for the user. ThoughtSpot displays + this Liveboard on the Home page when the user logs in. + type: string + favorite_metadata: + description: Metadata objects to add to the user's favorites list. + items: + $ref: '#/components/schemas/FavoriteMetadataInput' + type: array + org_identifiers: + description: IDs of the Orgs. + items: + type: string + type: array + operation: + default: REPLACE + description: Type of update operation. Default operation type is REPLACE + enum: + - ADD + - REMOVE + - REPLACE + type: string + preferred_locale: + description: |- + Locale for the user. When setting this value, do not set use_browser_language + to true, otherwise the browser's language setting will take precedence and the + preferred_locale value will be ignored. + enum: + - en-CA + - en-GB + - en-US + - de-DE + - ja-JP + - zh-CN + - pt-BR + - fr-FR + - fr-CA + - es-US + - da-DK + - es-ES + - fi-FI + - sv-SE + - nb-NO + - pt-PT + - nl-NL + - it-IT + - ru-RU + - en-IN + - de-CH + - en-NZ + - es-MX + - en-AU + - zh-Hant + - ko-KR + - en-DE + type: string + use_browser_language: + description: "Flag to indicate whether to use the browser locale for the\ + \ user in the UI.\nWhen set to true, the preferred_locale value is unset\ + \ and the browser's\nlanguage setting takes precedence. \n Version: 26.3.0.cl\ + \ or later\n" + nullable: true + type: boolean + extended_properties: + description: Properties for the user + type: object + extended_preferences: + description: Preferences for the user + type: object + type: object + CreateVariableRequest: + example: + is_sensitive: false + name: name + data_type: VARCHAR + type: CONNECTION_PROPERTY + properties: + type: + description: Type of variable + enum: + - CONNECTION_PROPERTY + - TABLE_MAPPING + - CONNECTION_PROPERTY_PER_PRINCIPAL + - FORMULA_VARIABLE + type: string + name: + description: Name of the variable. This is unique across the cluster. + type: string + is_sensitive: + default: false + description: If the variable contains sensitive values like passwords + nullable: true + type: boolean + data_type: + description: "Variable Data Type, only for formula_variable type, leave\ + \ empty for others \n Version: 10.15.0.cl or later\n" + enum: + - VARCHAR + - INT32 + - INT64 + - DOUBLE + - DATE + - DATE_TIME + type: string + required: + - name + - type + type: object + DeleteVariablesRequest: + example: + identifiers: + - identifiers + - identifiers + properties: + identifiers: + description: Unique id(s) or name(s) of the variable(s) to delete + items: + type: string + type: array + required: + - identifiers + type: object + PutVariableValuesRequest: + example: + variable_assignment: + - principal_identifier: principal_identifier + model_identifier: model_identifier + org_identifier: org_identifier + assigned_values: + - assigned_values + - assigned_values + principal_type: USER + priority: 0 + - principal_identifier: principal_identifier + model_identifier: model_identifier + org_identifier: org_identifier + assigned_values: + - assigned_values + - assigned_values + principal_type: USER + priority: 0 + operation: ADD + properties: + operation: + description: Operation to perform + enum: + - ADD + - REMOVE + - REPLACE + - RESET + type: string + variable_assignment: + description: Variable assignments + items: + $ref: '#/components/schemas/VariablePutAssignmentInput' + type: array + required: + - variable_assignment + type: object + SearchVariablesRequest: + example: + response_content: METADATA + record_size: 6 + value_scope: + - principal_identifier: principal_identifier + model_identifier: model_identifier + org_identifier: org_identifier + principal_type: USER + - principal_identifier: principal_identifier + model_identifier: model_identifier + org_identifier: org_identifier + principal_type: USER + variable_details: + - identifier: identifier + name_pattern: name_pattern + type: CONNECTION_PROPERTY + - identifier: identifier + name_pattern: name_pattern + type: CONNECTION_PROPERTY + record_offset: 0 + properties: + variable_details: + description: Variable details + items: + $ref: '#/components/schemas/VariableDetailInput' + type: array + value_scope: + description: Array of scope filters + items: + $ref: '#/components/schemas/ValueScopeInput' + type: array + record_offset: + default: 0 + description: The starting record number from where the records should be + included + format: int32 + type: integer + record_size: + default: 10 + description: The number of records that should be included + format: int32 + type: integer + response_content: + default: METADATA + description: Format in which we want the output + enum: + - METADATA + - METADATA_AND_VALUES + type: string + type: object + UpdateVariableRequest: + example: + name: name + properties: + name: + description: New name of the variable. + type: string + required: + - name + type: object + UpdateVariableValuesRequest: + example: + variable_assignment: + - variable_values: + - variable_values + - variable_values + variable_identifier: variable_identifier + operation: ADD + - variable_values: + - variable_values + - variable_values + variable_identifier: variable_identifier + operation: ADD + variable_value_scope: + - principal_identifier: principal_identifier + model_identifier: model_identifier + org_identifier: org_identifier + principal_type: USER + priority: 0 + - principal_identifier: principal_identifier + model_identifier: model_identifier + org_identifier: org_identifier + principal_type: USER + priority: 0 + properties: + variable_assignment: + description: "Array of variable assignment objects specifying the variable\ + \ identifier, values to assign, and the operation type (ADD, REMOVE, REPLACE,\ + \ or RESET) to perform on each variable." + items: + $ref: '#/components/schemas/VariableUpdateAssignmentInput' + type: array + variable_value_scope: + description: "Array of scope objects defining where the variable values\ + \ apply, including organization context, optional principal constraints\ + \ (user or group), model reference for formula variables, and priority\ + \ for conflict resolution." + items: + $ref: '#/components/schemas/VariableUpdateScopeInput' + type: array + required: + - variable_assignment + - variable_value_scope + type: object + CommitBranchRequest: + example: + metadata: + - identifier: identifier + type: LIVEBOARD + - identifier: identifier + type: LIVEBOARD + branch_name: branch_name + delete_aware: true + comment: comment + properties: + metadata: + description: Metadata objects. + items: + $ref: '#/components/schemas/MetadataObject' + type: array + delete_aware: + default: true + description: Delete the tml files from version control repo if it does not + exist in the ThoughSpot instance + nullable: true + type: boolean + branch_name: + description: " Name of the remote branch where object should be pushed\n\ + \ \n\nNote: If no branch_name is specified, then the commit_branch_name\ + \ will be considered." + type: string + comment: + description: Comment to be added to the commit + type: string + required: + - comment + - metadata + type: object + CreateConfigRequest: + example: + access_token: access_token + branch_names: + - branch_names + - branch_names + enable_guid_mapping: true + configuration_branch_name: configuration_branch_name + org_identifier: org_identifier + repository_url: repository_url + commit_branch_name: commit_branch_name + username: username + properties: + repository_url: + description: URL for connecting to remote repository + type: string + username: + description: Username to authenticate connection to remote repository + type: string + access_token: + description: Access token corresponding to the user to authenticate connection + to remote repository + type: string + org_identifier: + description: " Applicable when Orgs is enabled in the cluster\n \n\n\ + List of Org ids or name. Provide value -1 for cluster level. Example :\ + \ [\"OrgID1-or-Name1\", \"OrgID2-or-Name2\"] \n\n\n \n\nNote: If no\ + \ value is specified, then the configurations will be returned for all\ + \ orgs the user has access to \n Version: 9.5.0.cl or later\n" + type: string + branch_names: + description: "List the remote branches to configure. Example:[development,\ + \ production]" + items: + type: string + type: array + commit_branch_name: + description: "Name of the remote branch where objects from this Thoughtspot\ + \ instance will be versioned. \n Version: 9.7.0.cl or later\n" + type: string + enable_guid_mapping: + default: true + description: "Maintain mapping of guid for the deployment to an instance\ + \ \n Version: 9.4.0.cl or later\n" + nullable: true + type: boolean + configuration_branch_name: + description: " Name of the branch where the configuration files related\ + \ to operations between Thoughtspot and version control repo should be\ + \ maintained.\n \n\nNote: If no branch name is specified, then by default,\ + \ ts_config_files branch is considered. Ensure this branch exists before\ + \ configuration. \n Version: 9.7.0.cl or later\n" + type: string + required: + - access_token + - repository_url + - username + type: object + DeleteConfigRequest: + example: + cluster_level: true + properties: + cluster_level: + description: " Applicable when Orgs is enabled in the cluster\n \n\n\ + Indicator to consider cluster level or org level config. Set it to false\ + \ to delete configuration from current org. If set to true, then the configuration\ + \ at cluster level and orgs that inherited the configuration from cluster\ + \ level will be deleted. \n Version: 9.5.0.cl or later\n" + nullable: true + type: boolean + type: object + DeployCommitRequest: + example: + branch_name: branch_name + deploy_type: DELTA + deploy_policy: ALL_OR_NONE + commit_id: commit_id + properties: + commit_id: + description: " Commit_id against which the files should be picked to deploy.\n\ + \ \n\nNote: If no commit_id is specified, then the head of the branch\ + \ is considered." + type: string + branch_name: + description: Name of the remote branch where changes should be picked + type: string + deploy_type: + default: DELTA + description: Indicates if all files or only modified file at specified commit + point should be considered + enum: + - FULL + - DELTA + type: string + deploy_policy: + default: ALL_OR_NONE + description: Define the policy to follow while importing TML in the ThoughtSpot + environment. Use “ALL_OR_NONE” to cancel the deployment of all ThoughtSpot + objects if at least one of them fails to import. Use “Partial” to import + ThoughtSpot objects that validate successfully even if other objects in + the same deploy operations fail to import. + enum: + - ALL_OR_NONE + - PARTIAL + - VALIDATE_ONLY + type: string + required: + - branch_name + type: object + RevertCommitRequest: + example: + metadata: + - identifier: identifier + type: LIVEBOARD + - identifier: identifier + type: LIVEBOARD + branch_name: branch_name + revert_policy: ALL_OR_NONE + properties: + metadata: + description: Metadata objects. + items: + $ref: '#/components/schemas/MetadataObject' + type: array + branch_name: + description: " Name of the branch where the reverted version should be\ + \ committed\n \n\nNote: If no branch_name is specified, then the commit_branch_name\ + \ will be considered." + type: string + revert_policy: + default: ALL_OR_NONE + description: "Policy to apply when reverting a commit. Valid values: [ALL_OR_NONE,\ + \ PARTIAL]" + enum: + - ALL_OR_NONE + - PARTIAL + type: string + type: object + SearchCommitsRequest: + example: + metadata_identifier: metadata_identifier + metadata_type: LIVEBOARD + branch_name: branch_name + record_size: 6 + record_offset: 0 + properties: + metadata_identifier: + description: Unique ID or name of the metadata. + type: string + metadata_type: + description: Type of metadata. + enum: + - LIVEBOARD + - ANSWER + - LOGICAL_TABLE + - CUSTOM_ACTION + type: string + branch_name: + description: " Name of the branch from which commit history needs to be\ + \ displayed.\n \n\nNote: If no branch_name is specified, then commits\ + \ will be returned for the default branch for this configuration." + type: string + record_offset: + description: " Record offset point in the commit history to display the\ + \ response.\n \n\nNote: If no record offset is specified, the beginning\ + \ of the record will be considered." + format: int32 + type: integer + record_size: + description: " Number of history records from record offset point to\ + \ be displayed in the response.\n \n\nNote: If no record size is specified,\ + \ then all the records will be considered." + format: int32 + type: integer + required: + - metadata_identifier + type: object + SearchConfigRequest: + example: + org_identifiers: + - org_identifiers + - org_identifiers + properties: + org_identifiers: + description: " Applicable when Orgs is enabled in the cluster\n \n\n\ + List of Org ids or name. Provide value -1 for cluster level. Example :\ + \ [\"OrgID1-or-Name1\", \"OrgID2-or-Name2\"] \n\n\n \n\nNote: If no\ + \ value is specified, then the configurations will be returned for all\ + \ orgs the user has access to \n Version: 9.5.0.cl or later\n" + items: + type: string + type: array + type: object + UpdateConfigRequest: + example: + access_token: access_token + branch_names: + - branch_names + - branch_names + enable_guid_mapping: true + configuration_branch_name: configuration_branch_name + org_identifier: org_identifier + commit_branch_name: commit_branch_name + username: username + properties: + username: + description: Username to authenticate connection to version control system + type: string + access_token: + description: Access token corresponding to the user to authenticate connection + to version control system + type: string + org_identifier: + description: " Applicable when Orgs is enabled in the cluster\n \n\n\ + List of Org ids or name. Provide value -1 for cluster level. Example :\ + \ [\"OrgID1-or-Name1\", \"OrgID2-or-Name2\"] \n\n\n \n\nNote: If no\ + \ value is specified, then the configurations will be returned for all\ + \ orgs the user has access to \n Version: 9.5.0.cl or later\n" + type: string + branch_names: + description: "List the remote branches to configure. Example:[development,\ + \ production]" + items: + type: string + type: array + commit_branch_name: + description: "Name of the remote branch where objects from this Thoughtspot\ + \ instance will be versioned. \n Version: 9.7.0.cl or later\n" + type: string + enable_guid_mapping: + description: "Maintain mapping of guid for the deployment to an instance\ + \ \n Version: 9.4.0.cl or later\n" + nullable: true + type: boolean + configuration_branch_name: + description: "Name of the branch where the configuration files related to\ + \ operations between Thoughtspot and version control repo should be maintained.\ + \ \n Version: 9.7.0.cl or later\n" + type: string + type: object + ValidateMergeRequest: + example: + source_branch_name: source_branch_name + target_branch_name: target_branch_name + properties: + source_branch_name: + description: Name of the branch from which changes need to be picked for + validation + type: string + target_branch_name: + description: Name of the branch where files will be merged + type: string + required: + - source_branch_name + - target_branch_name + type: object + CreateWebhookConfigurationRequest: + example: + url_params: "{}" + additional_headers: + - value: value + key: key + - value: value + key: key + signature_verification: "" + name: name + description: description + url: url + events: + - LIVEBOARD_SCHEDULE + - LIVEBOARD_SCHEDULE + storage_destination: "" + authentication: "" + properties: + name: + description: Name of the webhook configuration. + type: string + description: + description: Description of the webhook configuration. + type: string + url: + description: The webhook endpoint URL. + type: string + url_params: + description: Additional URL parameters as key-value pairs. + type: object + events: + description: List of events to subscribe to. + items: + enum: + - LIVEBOARD_SCHEDULE + type: string + type: array + authentication: + allOf: + - $ref: '#/components/schemas/WebhookAuthenticationInput' + description: Authorization configuration for the webhook. + signature_verification: + allOf: + - $ref: '#/components/schemas/WebhookSignatureVerificationInput' + description: Configuration for webhook signature verification. + storage_destination: + allOf: + - $ref: '#/components/schemas/StorageDestinationInput' + description: "Configuration for storage destination.\nExample: {\"storage_type\"\ + : \"AWS_S3\", \"storage_config\": {\"aws_s3_config\": {\"bucket_name\"\ + : \"my-webhook-files\", \"region\": \"us-west-2\", \"role_arn\": \"arn:aws:iam::123456789012:role/ThoughtSpotDeliveryRole\"\ + , \"external_id\": \"ts-webhook-a1b2c3d4-7890\", \"path_prefix\": \"thoughtspot-webhooks/\"\ + }}} \n Version: 26.3.0.cl or later\n" + additional_headers: + description: "Additional headers as an array of key-value pairs.\nExample:\ + \ [{\"key\": \"X-Custom-Header\", \"value\": \"custom_value\"}] \n Version:\ + \ 26.4.0.cl or later\n" + items: + $ref: '#/components/schemas/WebhookKeyValuePairInput' + type: array + required: + - events + - name + - url + type: object + DeleteWebhookConfigurationsRequest: + example: + webhook_identifiers: + - webhook_identifiers + - webhook_identifiers + properties: + webhook_identifiers: + description: List of webhook identifiers to delete. + items: + type: string + type: array + required: + - webhook_identifiers + type: object + SearchWebhookConfigurationsRequest: + example: + webhook_identifier: webhook_identifier + event_type: LIVEBOARD_SCHEDULE + org_identifier: org_identifier + record_size: 6 + sort_options: "" + record_offset: 0 + properties: + org_identifier: + description: Unique ID or name of the org. + type: string + webhook_identifier: + description: Unique ID or name of the webhook. + type: string + event_type: + description: Type of webhook event to filter by. + enum: + - LIVEBOARD_SCHEDULE + type: string + record_offset: + default: 0 + description: "The offset point, starting from where the webhooks should\ + \ be included in the response." + format: int32 + type: integer + record_size: + default: 50 + description: The number of webhooks that should be included in the response + starting from offset position. + format: int32 + type: integer + sort_options: + allOf: + - $ref: '#/components/schemas/WebhookSortOptionsInput' + description: Sort option includes sort field and sort order. + type: object + UpdateWebhookConfigurationRequest: + example: + url_params: "{}" + additional_headers: + - value: value + key: key + - value: value + key: key + signature_verification: "" + name: name + description: description + url: url + events: + - LIVEBOARD_SCHEDULE + - LIVEBOARD_SCHEDULE + storage_destination: "" + authentication: "" + properties: + name: + description: Name of the webhook configuration. + type: string + description: + description: Description of the webhook configuration. + type: string + url: + description: The webhook endpoint URL. + type: string + url_params: + description: Additional URL parameters as key-value pairs. + type: object + events: + description: List of events to subscribe to. + items: + enum: + - LIVEBOARD_SCHEDULE + type: string + type: array + authentication: + allOf: + - $ref: '#/components/schemas/WebhookAuthenticationInput' + description: Authorization configuration for the webhook. + signature_verification: + allOf: + - $ref: '#/components/schemas/WebhookSignatureVerificationInput' + description: Configuration for webhook signature verification. + storage_destination: + allOf: + - $ref: '#/components/schemas/StorageDestinationInput' + description: "Configuration for storage destination.\nExample: {\"storage_type\"\ + : \"AWS_S3\", \"storage_config\": {\"aws_s3_config\": {\"bucket_name\"\ + : \"my-webhook-files\", \"region\": \"us-west-2\", \"role_arn\": \"arn:aws:iam::123456789012:role/ThoughtSpotDeliveryRole\"\ + , \"external_id\": \"ts-webhook-a1b2c3d4-7890\", \"path_prefix\": \"thoughtspot-webhooks/\"\ + }}} \n Version: 26.3.0.cl or later\n" + additional_headers: + description: "Additional headers as an array of key-value pairs.\nExample:\ + \ [{\"key\": \"X-Custom-Header\", \"value\": \"custom_value\"}] \n Version:\ + \ 26.4.0.cl or later\n" + items: + $ref: '#/components/schemas/WebhookKeyValuePairInput' + type: array + type: object + dbtConnection_request: + properties: + connection_name: + description: Name of the connection. + type: string + database_name: + description: Name of the Database. + type: string + import_type: + default: DBT_CLOUD + description: Mention type of Import + enum: + - DBT_CLOUD + - ZIP_FILE + type: string + access_token: + description: Access token is mandatory when Import_Type is DBT_CLOUD. + type: string + dbt_url: + description: DBT URL is mandatory when Import_Type is DBT_CLOUD. + type: string + account_id: + description: Account ID is mandatory when Import_Type is DBT_CLOUD + type: string + project_id: + description: Project ID is mandatory when Import_Type is DBT_CLOUD + type: string + dbt_env_id: + description: DBT Environment ID" + type: string + project_name: + description: Name of the project + type: string + file_content: + description: Upload DBT Manifest and Catalog artifact files as a ZIP file. + This field is Mandatory when Import Type is 'ZIP_FILE' + format: binary + type: string + required: + - connection_name + - database_name + type: object + dbtGenerateSyncTml_request: + properties: + dbt_connection_identifier: + description: Unique ID of the DBT connection. + type: string + file_content: + description: Upload DBT Manifest and Catalog artifact files as a ZIP file. + This field is mandatory if the connection was created with import_type + ‘ZIP_FILE’ + format: binary + type: string + required: + - dbt_connection_identifier + type: object + dbtGenerateTml_request: + properties: + dbt_connection_identifier: + description: Unique ID of the DBT connection. + type: string + model_tables: + description: |- + List of Models and their respective Tables + Example: '[{"model_name": "model_name", "tables": ["table_name"]}]' + format: json + type: string + import_worksheets: + description: Mention the worksheet tmls to import + enum: + - ALL + - NONE + - SELECTED + type: string + worksheets: + description: |- + List of worksheets is mandatory when import_Worksheets is type SELECTED + Example: ["worksheet_name"] + format: json + type: string + file_content: + description: Upload DBT Manifest and Catalog artifact files as a ZIP file. + This field is mandatory if the connection was created with import_type + ‘ZIP_FILE’ + format: binary + type: string + required: + - dbt_connection_identifier + - import_worksheets + - model_tables + type: object + updateDbtConnection_request: + properties: + dbt_connection_identifier: + description: Unique ID of the DBT Connection. + type: string + connection_name: + description: Name of the connection. + type: string + database_name: + description: Name of the Database. + type: string + import_type: + default: DBT_CLOUD + description: Mention type of Import + enum: + - DBT_CLOUD + - ZIP_FILE + type: string + access_token: + description: Access token is mandatory when Import_Type is DBT_CLOUD. + type: string + dbt_url: + description: DBT URL is mandatory when Import_Type is DBT_CLOUD. + type: string + account_id: + description: Account ID is mandatory when Import_Type is DBT_CLOUD + type: string + project_id: + description: Project ID is mandatory when Import_Type is DBT_CLOUD + type: string + dbt_env_id: + description: DBT Environment ID" + type: string + project_name: + description: Name of the project + type: string + file_content: + description: Upload DBT Manifest and Catalog artifact files as a ZIP file. + This field is Mandatory when Import Type is 'ZIP_FILE' + format: binary + type: string + required: + - dbt_connection_identifier + type: object + securitySchemes: + bearerAuth: + scheme: bearer + type: http +x-roles: +- name: 26.2.0.cl + id: 26.2.0.cl + tags: + - 26.2.0.cl + description: Roles for version 26.2.0.cl +- name: 10.4.0.cl + id: 10.4.0.cl + tags: + - 10.4.0.cl + description: Roles for version 10.4.0.cl +- name: 10.15.0.cl + id: 10.15.0.cl + tags: + - 10.15.0.cl + description: Roles for version 10.15.0.cl +- name: 10.13.0.cl + id: 10.13.0.cl + tags: + - 10.13.0.cl + description: Roles for version 10.13.0.cl +- name: 10.7.0.cl + id: 10.7.0.cl + tags: + - 10.7.0.cl + description: Roles for version 10.7.0.cl +- name: 26.5.0.cl + id: 26.5.0.cl + tags: + - 26.5.0.cl + description: Roles for version 26.5.0.cl +- name: 26.6.0.cl + id: 26.6.0.cl + tags: + - 26.6.0.cl + description: Roles for version 26.6.0.cl +- name: 9.0.0.cl + id: 9.0.0.cl + tags: + - 9.0.0.cl + description: Roles for version 9.0.0.cl +- name: 9.4.0.cl + id: 9.4.0.cl + tags: + - 9.4.0.cl + description: Roles for version 9.4.0.cl +- name: 9.12.0.cl + id: 9.12.0.cl + tags: + - 9.12.0.cl + description: Roles for version 9.12.0.cl +- name: 26.4.0.cl + id: 26.4.0.cl + tags: + - 26.4.0.cl + description: Roles for version 26.4.0.cl +- name: 10.12.0.cl + id: 10.12.0.cl + tags: + - 10.12.0.cl + description: Roles for version 10.12.0.cl +- name: 9.2.0.cl + id: 9.2.0.cl + tags: + - 9.2.0.cl + description: Roles for version 9.2.0.cl +- name: 9.9.0.cl + id: 9.9.0.cl + tags: + - 9.9.0.cl + description: Roles for version 9.9.0.cl +- name: 9.6.0.cl + id: 9.6.0.cl + tags: + - 9.6.0.cl + description: Roles for version 9.6.0.cl +- name: 10.10.0.cl + id: 10.10.0.cl + tags: + - 10.10.0.cl + description: Roles for version 10.10.0.cl +- name: 10.6.0.cl + id: 10.6.0.cl + tags: + - 10.6.0.cl + description: Roles for version 10.6.0.cl +- name: 10.3.0.cl + id: 10.3.0.cl + tags: + - 10.3.0.cl + description: Roles for version 10.3.0.cl +- name: 10.1.0.cl + id: 10.1.0.cl + tags: + - 10.1.0.cl + description: Roles for version 10.1.0.cl +- name: 10.9.0.cl + id: 10.9.0.cl + tags: + - 10.9.0.cl + description: Roles for version 10.9.0.cl +- name: 10.8.0.cl + id: 10.8.0.cl + tags: + - 10.8.0.cl + description: Roles for version 10.8.0.cl +- name: 9.5.0.cl + id: 9.5.0.cl + tags: + - 9.5.0.cl + description: Roles for version 9.5.0.cl +- name: 26.3.0.cl + id: 26.3.0.cl + tags: + - 26.3.0.cl + description: Roles for version 26.3.0.cl +- name: 10.14.0.cl + id: 10.14.0.cl + tags: + - 10.14.0.cl + description: Roles for version 10.14.0.cl +- name: 9.7.0.cl + id: 9.7.0.cl + tags: + - 9.7.0.cl + description: Roles for version 9.7.0.cl + diff --git a/sdks/java/build.gradle b/sdks/java/build.gradle new file mode 100644 index 000000000..d5ad6bdd0 --- /dev/null +++ b/sdks/java/build.gradle @@ -0,0 +1,229 @@ +apply plugin: 'idea' +apply plugin: 'eclipse' +apply plugin: 'java' +apply plugin: 'com.diffplug.spotless' + +group = 'com.thoughtspot' +version = '2.25.0' + +buildscript { + repositories { + mavenCentral() + } + dependencies { + classpath 'com.android.tools.build:gradle:2.3.+' + classpath 'com.github.dcendents:android-maven-gradle-plugin:2.1' + classpath 'com.diffplug.spotless:spotless-plugin-gradle:6.11.0' + } +} + +repositories { + mavenCentral() +} +sourceSets { + main.java.srcDirs = ['src/main/java'] +} + +if (hasProperty('target') && target == 'android') { + apply plugin: 'com.android.library' + apply plugin: 'com.github.dcendents.android-maven' + + android { + compileSdkVersion 25 + buildToolsVersion '25.0.2' + defaultConfig { + minSdkVersion 14 + targetSdkVersion 25 + } + compileOptions { + sourceCompatibility JavaVersion.VERSION_1_8 + targetCompatibility JavaVersion.VERSION_1_8 + } + + // Rename the aar correctly + libraryVariants.all { variant -> + variant.outputs.each { output -> + def outputFile = output.outputFile + if (outputFile != null && outputFile.name.endsWith('.aar')) { + def fileName = "${project.name}-${variant.baseName}-${version}.aar" + output.outputFile = new File(outputFile.parent, fileName) + } + } + } + + dependencies { + provided "jakarta.annotation:jakarta.annotation-api:$jakarta_annotation_version" + } + } + + afterEvaluate { + android.libraryVariants.all { variant -> + def task = project.tasks.create "jar${variant.name.capitalize()}", Jar + task.description = "Create jar artifact for ${variant.name}" + task.dependsOn variant.javaCompile + task.from variant.javaCompile.destinationDirectory + task.destinationDirectory = project.file("${project.buildDir}/outputs/jar") + task.archiveFileName = "${project.name}-${variant.baseName}-${version}.jar" + artifacts.add('archives', task) + } + } + + task sourcesJar(type: Jar) { + from android.sourceSets.main.java.srcDirs + classifier = 'sources' + } + + artifacts { + archives sourcesJar + } +} else { + apply plugin: 'java' + apply plugin: 'maven-publish' + apply plugin: 'signing' + + sourceCompatibility = JavaVersion.VERSION_1_8 + targetCompatibility = JavaVersion.VERSION_1_8 + + java { + withJavadocJar() + withSourcesJar() + } + + publishing { + publications { + mavenJava(MavenPublication) { + artifactId = 'rest-api-sdk' + from components.java + + pom { + name = 'rest-api-sdk' + description = 'ThoughtSpot Java Rest API SDK' + url = 'https://github.com/thoughtspot/rest-api-sdk/tree/release/sdks/java' + + scm { + connection = 'scm:git:git://github.com/thoughtspot/rest-api-sdk.git' + developerConnection = 'scm:git:ssh://git@github.com/thoughtspot/rest-api-sdk.git' + url = 'https://github.com/thoughtspot/rest-api-sdk' + } + + licenses { + license { + name = 'ThoughtSpot Development Tools End User License Agreement' + url = 'https://github.com/thoughtspot/rest-api-sdk/blob/release/LICENSE.md' + distribution = 'repo' + } + } + + developers { + developer { + name = 'ThoughtSpot' + email = 'support@thoughtspot.com' + organization = 'ThoughtSpot, Inc. 2025' + organizationUrl = 'https://www.thoughtspot.com/' + } + } + } + } + } + + repositories { + maven { + name = "OSSRH" + url = version.endsWith("-SNAPSHOT") ? + uri("https://s01.oss.sonatype.org/content/repositories/snapshots/") : + uri("https://s01.oss.sonatype.org/service/local/staging/deploy/maven2/") + + def ossrhUsernameFile = project.findProperty("ossrhUsernameFile") ?: System.getenv("OSSRH_USERNAME_FILE") + def ossrhPasswordFile = project.findProperty("ossrhPasswordFile") ?: System.getenv("OSSRH_PASSWORD_FILE") + + credentials { + username = ossrhUsernameFile && file(ossrhUsernameFile).exists() ? file(ossrhUsernameFile).text.trim() : null + password = ossrhPasswordFile && file(ossrhPasswordFile).exists() ? file(ossrhPasswordFile).text.trim() : null + } + } + } + } + + signing { + def signingKeyIdFile = project.findProperty('signing.keyIdFile') ?: System.getenv("SIGNING_KEY_ID_FILE") + def signingSecretKeyFile = project.findProperty('signing.secretKeyFile') ?: System.getenv("SIGNING_KEY_FILE") + def signingPasswordFile = project.findProperty('signing.passwordFile') ?: System.getenv("SIGNING_PASSWORD_FILE") + + def signingKeyId = signingKeyIdFile && file(signingKeyIdFile).exists() ? file(signingKeyIdFile).text.trim() : null + def signingSecretKey = signingSecretKeyFile && file(signingSecretKeyFile).exists() ? file(signingSecretKeyFile).text : null + def signingPassword = signingPasswordFile && file(signingPasswordFile).exists() ? file(signingPasswordFile).text.trim() : null + + useInMemoryPgpKeys(signingKeyId, signingSecretKey, signingPassword) + sign publishing.publications.mavenJava + } + + task execute(type:JavaExec) { + main = System.getProperty('mainClass') + classpath = sourceSets.main.runtimeClasspath + } +} + +ext { + jakarta_annotation_version = "1.3.5" +} + +dependencies { + implementation 'io.swagger:swagger-annotations:1.6.8' + implementation "com.google.code.findbugs:jsr305:3.0.2" + implementation 'com.squareup.okhttp3:okhttp:4.12.0' + implementation 'com.squareup.okhttp3:logging-interceptor:4.12.0' + implementation 'com.google.code.gson:gson:2.9.1' + implementation 'io.gsonfire:gson-fire:1.9.0' + implementation 'jakarta.ws.rs:jakarta.ws.rs-api:2.1.6' + implementation 'org.openapitools:jackson-databind-nullable:0.2.6' + implementation group: 'org.apache.commons', name: 'commons-lang3', version: '3.17.0' + implementation "jakarta.annotation:jakarta.annotation-api:$jakarta_annotation_version" + testImplementation 'org.junit.jupiter:junit-jupiter-api:5.10.3' + testImplementation 'org.mockito:mockito-core:3.12.4' + testRuntimeOnly 'org.junit.jupiter:junit-jupiter-engine:5.10.3' +} + +javadoc { + options.tags = [ "http.response.details:a:Http Response Details" ] +} + +// Use spotless plugin to automatically format code, remove unused import, etc +// To apply changes directly to the file, run `gradlew spotlessApply` +// Ref: https://github.com/diffplug/spotless/tree/main/plugin-gradle +spotless { + // comment out below to run spotless as part of the `check` task + enforceCheck false + + format 'misc', { + // define the files (e.g. '*.gradle', '*.md') to apply `misc` to + target '.gitignore' + + // define the steps to apply to those files + trimTrailingWhitespace() + indentWithSpaces() // Takes an integer argument if you don't like 4 + endWithNewline() + } + java { + // don't need to set target, it is inferred from java + + // apply a specific flavor of google-java-format + googleJavaFormat('1.8').aosp().reflowLongStrings() + + removeUnusedImports() + importOrder() + } +} + +test { + // Enable JUnit 5 (Gradle 4.6+). + useJUnitPlatform() + + // Always run tests, even when nothing changed. + dependsOn 'cleanTest' + + // Show test results. + testLogging { + events "passed", "skipped", "failed" + } + +} diff --git a/sdks/java/build.sbt b/sdks/java/build.sbt new file mode 100644 index 000000000..5e03ac079 --- /dev/null +++ b/sdks/java/build.sbt @@ -0,0 +1,27 @@ +lazy val root = (project in file(".")). + settings( + organization := "com.thoughtspot", + name := "rest-api-sdk", + version := "2.25.0", + scalaVersion := "2.11.4", + scalacOptions ++= Seq("-feature"), + javacOptions in compile ++= Seq("-Xlint:deprecation"), + publishArtifact in (Compile, packageDoc) := false, + resolvers += Resolver.mavenLocal, + libraryDependencies ++= Seq( + "io.swagger" % "swagger-annotations" % "1.6.5", + "com.squareup.okhttp3" % "okhttp" % "4.12.0", + "com.squareup.okhttp3" % "logging-interceptor" % "4.12.0", + "com.google.code.gson" % "gson" % "2.9.1", + "org.apache.commons" % "commons-lang3" % "3.17.0", + "jakarta.ws.rs" % "jakarta.ws.rs-api" % "2.1.6", + "org.openapitools" % "jackson-databind-nullable" % "0.2.6", + "io.gsonfire" % "gson-fire" % "1.9.0" % "compile", + "jakarta.annotation" % "jakarta.annotation-api" % "1.3.5" % "compile", + "com.google.code.findbugs" % "jsr305" % "3.0.2" % "compile", + "jakarta.annotation" % "jakarta.annotation-api" % "1.3.5" % "compile", + "org.junit.jupiter" % "junit-jupiter-api" % "5.10.3" % "test", + "com.novocode" % "junit-interface" % "0.10" % "test", + "org.mockito" % "mockito-core" % "3.12.4" % "test" + ) + ) diff --git a/sdks/java/docs/AIContext.md b/sdks/java/docs/AIContext.md new file mode 100644 index 000000000..8c2bf90b9 --- /dev/null +++ b/sdks/java/docs/AIContext.md @@ -0,0 +1,18 @@ + + +# AIContext + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**instructions** | **List<String>** | User specific text instructions sent to AI system for processing the query. | [optional] | +|**content** | **List<String>** | User provided content like text data, csv data as a string message to provide context & potentially improve the quality of the response. | [optional] | + + +## Implemented Interfaces + +* Serializable + + diff --git a/sdks/java/docs/APIKey.md b/sdks/java/docs/APIKey.md new file mode 100644 index 000000000..4c74657b8 --- /dev/null +++ b/sdks/java/docs/APIKey.md @@ -0,0 +1,19 @@ + + +# APIKey + +With API key auth, you send a key-value pair to the API either in the request headers or query parameters. + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**key** | **String** | Enter your key name | [optional] | +|**value** | **String** | Enter you key value | [optional] | + + +## Implemented Interfaces + +* Serializable + + diff --git a/sdks/java/docs/APIKeyInput.md b/sdks/java/docs/APIKeyInput.md new file mode 100644 index 000000000..601e06b34 --- /dev/null +++ b/sdks/java/docs/APIKeyInput.md @@ -0,0 +1,19 @@ + + +# APIKeyInput + +With API key auth, you send a key-value pair to the API either in the request headers or query parameters. + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**key** | **String** | Enter your key name | [optional] | +|**value** | **String** | Enter you key value | [optional] | + + +## Implemented Interfaces + +* Serializable + + diff --git a/sdks/java/docs/AccessToken.md b/sdks/java/docs/AccessToken.md new file mode 100644 index 000000000..d9781f737 --- /dev/null +++ b/sdks/java/docs/AccessToken.md @@ -0,0 +1,22 @@ + + +# AccessToken + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**id** | **String** | GUID of the auth token. | [optional] | +|**token** | **String** | Bearer auth token. | | +|**org** | [**OrgInfo**](OrgInfo.md) | | | +|**user** | [**UserInfo**](UserInfo.md) | | | +|**creationTimeInMillis** | **Float** | Token creation time in milliseconds. | | +|**expirationTimeInMillis** | **Float** | Token expiration time in milliseconds. | | + + +## Implemented Interfaces + +* Serializable + + diff --git a/sdks/java/docs/ActionConfig.md b/sdks/java/docs/ActionConfig.md new file mode 100644 index 000000000..ec870608e --- /dev/null +++ b/sdks/java/docs/ActionConfig.md @@ -0,0 +1,19 @@ + + +# ActionConfig + +Specify that the association is enabled for the metadata object + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**position** | **String** | Position of the Custom action on the Metadata object. Earlier naming convention: context. | [optional] | +|**visibility** | **Boolean** | Visibility of the metadata association with custom action. Earlier naming convention: enabled | [optional] | + + +## Implemented Interfaces + +* Serializable + + diff --git a/sdks/java/docs/ActionConfigInput.md b/sdks/java/docs/ActionConfigInput.md new file mode 100644 index 000000000..e7a307089 --- /dev/null +++ b/sdks/java/docs/ActionConfigInput.md @@ -0,0 +1,29 @@ + + +# ActionConfigInput + +Specify that the association is enabled for the metadata object Default + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**position** | [**PositionEnum**](#PositionEnum) | Position of the Custom action on the Metadata object. Earlier naming convention: context. | [optional] | +|**visibility** | **Boolean** | Visibility of the metadata association with custom action. Earlier naming convention: enabled | [optional] | + + + +## Enum: PositionEnum + +| Name | Value | +|---- | -----| +| MENU | "MENU" | +| PRIMARY | "PRIMARY" | +| CONTEXT_MENU | "CONTEXT_MENU" | + + +## Implemented Interfaces + +* Serializable + + diff --git a/sdks/java/docs/ActionConfigInputCreate.md b/sdks/java/docs/ActionConfigInputCreate.md new file mode 100644 index 000000000..710ea8b26 --- /dev/null +++ b/sdks/java/docs/ActionConfigInputCreate.md @@ -0,0 +1,29 @@ + + +# ActionConfigInputCreate + +Specify that the association is enabled for the metadata object Default + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**position** | [**PositionEnum**](#PositionEnum) | Position of the Custom action on the Metadata object. Earlier naming convention: context. | [optional] | +|**visibility** | **Boolean** | Visibility of the metadata association with custom action. Earlier naming convention: enabled | [optional] | + + + +## Enum: PositionEnum + +| Name | Value | +|---- | -----| +| MENU | "MENU" | +| PRIMARY | "PRIMARY" | +| CONTEXT_MENU | "CONTEXT_MENU" | + + +## Implemented Interfaces + +* Serializable + + diff --git a/sdks/java/docs/ActionDetails.md b/sdks/java/docs/ActionDetails.md new file mode 100644 index 000000000..47a53f84e --- /dev/null +++ b/sdks/java/docs/ActionDetails.md @@ -0,0 +1,19 @@ + + +# ActionDetails + +Type and Configuration for Custom Actions + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**callback** | [**CALLBACK**](CALLBACK.md) | | [optional] | +|**url** | [**URL**](URL.md) | | [optional] | + + +## Implemented Interfaces + +* Serializable + + diff --git a/sdks/java/docs/ActionDetailsInput.md b/sdks/java/docs/ActionDetailsInput.md new file mode 100644 index 000000000..d6681f222 --- /dev/null +++ b/sdks/java/docs/ActionDetailsInput.md @@ -0,0 +1,19 @@ + + +# ActionDetailsInput + +Action details includes `Type` and configuration details of Custom Actions. Either Callback or URL is required. + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**CALLBACK** | [**CALLBACKInput**](CALLBACKInput.md) | | [optional] | +|**URL** | [**URLInput**](URLInput.md) | | [optional] | + + +## Implemented Interfaces + +* Serializable + + diff --git a/sdks/java/docs/ActionDetailsInputCreate.md b/sdks/java/docs/ActionDetailsInputCreate.md new file mode 100644 index 000000000..8947c7263 --- /dev/null +++ b/sdks/java/docs/ActionDetailsInputCreate.md @@ -0,0 +1,19 @@ + + +# ActionDetailsInputCreate + +Action details includes Type and Configuration for Custom Actions, either Callback or URL is required. When both callback and url are provided, callback would be considered + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**CALLBACK** | [**CALLBACKInputMandatory**](CALLBACKInputMandatory.md) | | [optional] | +|**URL** | [**URLInputMandatory**](URLInputMandatory.md) | | [optional] | + + +## Implemented Interfaces + +* Serializable + + diff --git a/sdks/java/docs/ActivateUserRequest.md b/sdks/java/docs/ActivateUserRequest.md new file mode 100644 index 000000000..d33c371b7 --- /dev/null +++ b/sdks/java/docs/ActivateUserRequest.md @@ -0,0 +1,20 @@ + + +# ActivateUserRequest + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**userIdentifier** | **String** | Unique ID or name of the user. | | +|**authToken** | **String** | Auth token for the user. | | +|**password** | **String** | New password for the user to access the account. | | +|**properties** | **String** | Properties of the user. | [optional] | + + +## Implemented Interfaces + +* Serializable + + diff --git a/sdks/java/docs/AgentConversation.md b/sdks/java/docs/AgentConversation.md new file mode 100644 index 000000000..ea8658c1d --- /dev/null +++ b/sdks/java/docs/AgentConversation.md @@ -0,0 +1,18 @@ + + +# AgentConversation + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**conversationId** | **String** | Unique identifier of the conversation. | | +|**conversationIdentifier** | **String** | Unique identifier of the conversation. Version: 26.5.0.cl or later | | + + +## Implemented Interfaces + +* Serializable + + diff --git a/sdks/java/docs/AiApi.md b/sdks/java/docs/AiApi.md new file mode 100644 index 000000000..d005dce59 --- /dev/null +++ b/sdks/java/docs/AiApi.md @@ -0,0 +1,543 @@ +# AiApi + +All URIs are relative to *CLUSTER_URL* + +| Method | HTTP request | +|------------- | ------------- | +| [**createAgentConversation**](AiApi.md#createAgentConversation) | **POST** /api/rest/2.0/ai/agent/conversation/create | +| [**createConversation**](AiApi.md#createConversation) | **POST** /api/rest/2.0/ai/conversation/create | +| [**getDataSourceSuggestions**](AiApi.md#getDataSourceSuggestions) | **POST** /api/rest/2.0/ai/data-source-suggestions | +| [**getNLInstructions**](AiApi.md#getNLInstructions) | **POST** /api/rest/2.0/ai/instructions/get | +| [**getRelevantQuestions**](AiApi.md#getRelevantQuestions) | **POST** /api/rest/2.0/ai/relevant-questions/ | +| [**queryGetDecomposedQuery**](AiApi.md#queryGetDecomposedQuery) | **POST** /api/rest/2.0/ai/analytical-questions | +| [**sendAgentConversationMessage**](AiApi.md#sendAgentConversationMessage) | **POST** /api/rest/2.0/ai/agent/conversation/{conversation_identifier}/send | +| [**sendAgentConversationMessageStreaming**](AiApi.md#sendAgentConversationMessageStreaming) | **POST** /api/rest/2.0/ai/agent/conversation/{conversation_identifier}/send/stream | +| [**sendAgentMessage**](AiApi.md#sendAgentMessage) | **POST** /api/rest/2.0/ai/agent/{conversation_identifier}/converse | +| [**sendAgentMessageStreaming**](AiApi.md#sendAgentMessageStreaming) | **POST** /api/rest/2.0/ai/agent/converse/sse | +| [**sendMessage**](AiApi.md#sendMessage) | **POST** /api/rest/2.0/ai/conversation/{conversation_identifier}/converse | +| [**setNLInstructions**](AiApi.md#setNLInstructions) | **POST** /api/rest/2.0/ai/instructions/set | +| [**singleAnswer**](AiApi.md#singleAnswer) | **POST** /api/rest/2.0/ai/answer/create | +| [**stopConversation**](AiApi.md#stopConversation) | **POST** /api/rest/2.0/ai/agent/conversation/{conversation_identifier}/stop-response | + + + +# **createAgentConversation** +> AgentConversation createAgentConversation(createAgentConversationRequest) + + + + Version: 26.2.0.cl or later Creates a new Spotter agent conversation based on the provided context and settings. The endpoint was in Beta from 26.2.0.cl through 26.4.0.cl. Requires `CAN_USE_SPOTTER` privilege and at least view access to the metadata object specified in the request. #### Usage guidelines The request must include the `metadata_context` parameter to define the conversation context. The context type can be one of: - `DATA_SOURCE` *(available from 26.5.0.cl)*: targets a specific data source. Provide `data_source_identifier` in `data_source_context` for a single data source, or `data_source_identifiers` for multi-data-source context. The deprecated `guid` field is accepted for backwards compatibility. - `AUTO_MODE` *(available from 26.5.0.cl)*: automatically discovers and selects the most relevant datasets for the user's queries. > **Note for callers on versions 26.2.0.cl – 26.4.0.cl (Beta):** use the lowercase `data_source` enum value with the `guid` field instead of the above. Example: `{ \"type\": \"data_source\", \"data_source_context\": { \"guid\": \"<worksheet-id>\" } }`. The `conversation_settings` parameter controls which Spotter capabilities are enabled for the conversation: - `enable_contextual_change_analysis` (default: `true`, **deprecated from 26.2.0.cl**) — always enabled in Spotter 3; setting this to `false` has no effect on versions >= 26.2.0.cl - `enable_natural_language_answer_generation` (default: `true`, **deprecated from 26.2.0.cl**) — always enabled in Spotter 3; setting this to `false` has no effect on versions >= 26.2.0.cl - `enable_reasoning` (default: `true`, **deprecated from 26.2.0.cl**) — always enabled in Spotter 3; setting this to `false` has no effect on versions >= 26.2.0.cl - `enable_save_chat` (default: `false`, *available from 26.5.0.cl*) — enables saving the conversation for later retrieval via conversation history If the request is successful, the response includes a unique `conversation_identifier` that must be passed to `sendAgentConversationMessage` or `sendAgentConversationMessageStreaming` to send messages within this conversation. The response also includes `conversation_id` with the same value for backwards compatibility; use `conversation_identifier` for new integrations. #### Example request ```json { \"metadata_context\": { \"type\": \"DATA_SOURCE\", \"data_source_context\": { \"data_source_identifier\": \"a1b2c3d4-e5f6-7890-abcd-ef1234567890\" } }, \"conversation_settings\": {} } ``` #### Error responses | Code | Description | | ---- | --------------------------------------------------------------------------------------------------------------------------------------- | | 401 | Unauthorized — authentication token is missing, expired, or invalid. | | 403 | Forbidden — the authenticated user does not have `CAN_USE_SPOTTER` privilege or lacks view permission on the specified metadata object. | > ###### Note: > > - This endpoint was in Beta from 26.2.0.cl through 26.4.0.cl and is Generally Available from version 26.5.0.cl. > - This endpoint requires Spotter - please contact ThoughtSpot support to enable Spotter on your cluster. + +### Parameters + +| Name | Type | +|------------- | ------------- | +| **createAgentConversationRequest** | [**CreateAgentConversationRequest**](CreateAgentConversationRequest.md) + +### Return type + +[**AgentConversation**](AgentConversation.md) + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Common successful response | - | +| **201** | Common error response | - | +| **400** | Operation failed | - | +| **401** | Unauthorized access. | - | +| **403** | Forbidden access. | - | +| **500** | Operation failed | - | + + +# **createConversation** +> Conversation createConversation(createConversationRequest) + + + + Version: 10.4.0.cl or later Creates a new conversation session tied to a specific data model for AI-driven natural language querying. Requires `CAN_USE_SPOTTER` privilege and at least view access to the metadata object specified in the request. #### Usage guidelines The request must include: - `metadata_identifier`: the unique ID of the data source that provides context for the conversation Optionally, you can provide: - `tokens`: a token string to set initial context for the conversation (e.g., `\"[sales],[item type],[state]\"`) If the request is successful, ThoughtSpot returns a unique `conversation_identifier` that must be passed to `sendMessage` to continue the conversation. #### Error responses | Code | Description | |------|-------------| | 401 | Unauthorized — authentication token is missing, expired, or invalid. | | 403 | Forbidden — the authenticated user does not have `CAN_USE_SPOTTER` privilege or lacks view permission on the specified metadata object. | > ###### Note: > * This endpoint is currently in Beta. Breaking changes may be introduced before the endpoint is made Generally Available. > * This endpoint requires Spotter - please contact ThoughtSpot support to enable Spotter on your cluster. + +### Parameters + +| Name | Type | +|------------- | ------------- | +| **createConversationRequest** | [**CreateConversationRequest**](CreateConversationRequest.md) + +### Return type + +[**Conversation**](Conversation.md) + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Common successful response | - | +| **201** | Common error response | - | +| **400** | Operation failed | - | +| **401** | Unauthorized access. | - | +| **403** | Forbidden access. | - | +| **500** | Operation failed | - | + + +# **getDataSourceSuggestions** +> EurekaDataSourceSuggestionResponse getDataSourceSuggestions(getDataSourceSuggestionsRequest) + + + + Version: 10.15.0.cl or later Suggests the most relevant data sources for a given natural language query, ranked by confidence with LLM-generated reasoning. Requires `CAN_USE_SPOTTER` privilege and at least view-level access to the underlying metadata entities referenced in the response. #### Usage guidelines The request must include: - `query`: the natural language question to find relevant data sources for If the request is successful, the API returns a ranked list of suggested data sources, each containing: - `confidence`: a float score indicating the model's confidence in the relevance of the suggestion - `details`: metadata about the data source - `data_source_identifier`: the unique ID of the data source - `data_source_name`: the display name of the data source - `description`: a description of the data source - `reasoning`: LLM-generated rationale explaining why the data source was recommended #### Error responses | Code | Description | |------|--------------------------------------------------------------------------------------------------------------------------------------------| | 401 | Unauthorized — authentication token is missing, expired, or invalid. | | 403 | Forbidden — the authenticated user does not have `CAN_USE_SPOTTER` privilege or lacks view permission on the underlying metadata entities. | > ###### Note: > * This endpoint is currently in Beta. Breaking changes may be introduced before it is made Generally Available. > * This endpoint requires Spotter — please contact ThoughtSpot Support to enable Spotter on your cluster. + +### Parameters + +| Name | Type | +|------------- | ------------- | +| **getDataSourceSuggestionsRequest** | [**GetDataSourceSuggestionsRequest**](GetDataSourceSuggestionsRequest.md) + +### Return type + +[**EurekaDataSourceSuggestionResponse**](EurekaDataSourceSuggestionResponse.md) + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Common successful response | - | +| **201** | Common error response | - | +| **400** | Operation failed | - | +| **401** | Unauthorized access. | - | +| **403** | Forbidden access. | - | +| **500** | Operation failed | - | + + +# **getNLInstructions** +> EurekaGetNLInstructionsResponse getNLInstructions(getNLInstructionsRequest) + + + + Version: 10.15.0.cl or later Retrieves existing natural language (NL) instructions configured for a specific data model. These instructions guide the AI system in understanding data context and generating more accurate responses. Requires `CAN_USE_SPOTTER` privilege, at least view access on the data model, and a bearer token corresponding to the org where the data model exists. #### Usage guidelines The request must include: - `data_source_identifier`: the unique ID of the data model to retrieve instructions for If the request is successful, the API returns: - `nl_instructions_info`: an array of instruction objects, each containing: - `instructions`: the configured text instructions for AI processing - `scope`: the scope of the instruction — currently only `GLOBAL` is supported #### Instructions scope - **GLOBAL**: Instructions that apply globally across the system on the given data-model (currently only global instructions are supported) #### Error responses | Code | Description | |------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| | 401 | Unauthorized — authentication token is missing, expired, or invalid. | | 403 | Forbidden — the authenticated user does not have `CAN_USE_SPOTTER` privilege, lacks view access on the data model, or the bearer token does not correspond to the org where the data model exists. | > ###### Note: > > - To use this API, the user needs at least view access on the data model, and must use the bearer token corresponding to the org where the data model exists. > - This endpoint is currently in Beta. Breaking changes may be introduced before the endpoint is made Generally Available. > - Available from version 10.15.0.cl and later. > - This endpoint requires Spotter — please contact ThoughtSpot Support to enable Spotter on your cluster. > - Use this API to review currently configured instructions before modifying them with `setNLInstructions`. + +### Parameters + +| Name | Type | +|------------- | ------------- | +| **getNLInstructionsRequest** | [**GetNLInstructionsRequest**](GetNLInstructionsRequest.md) + +### Return type + +[**EurekaGetNLInstructionsResponse**](EurekaGetNLInstructionsResponse.md) + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Common successful response | - | +| **201** | Common error response | - | +| **400** | Operation failed | - | +| **401** | Unauthorized access. | - | +| **403** | Forbidden access. | - | +| **500** | Operation failed | - | + + +# **getRelevantQuestions** +> EurekaGetRelevantQuestionsResponse getRelevantQuestions(getRelevantQuestionsRequest) + + + + Version: 10.13.0.cl or later Breaks down a natural language query into a series of smaller analytical sub-questions, each mapped to a relevant data source. Requires `CAN_USE_SPOTTER` privilege and at least view-level access to the referenced metadata objects. #### Usage guidelines The request must include: - `query`: the natural language question to decompose into analytical sub-questions - `metadata_context`: at least one of the following context identifiers to guide question generation: - `conversation_identifier` — an existing conversation session ID - `answer_identifiers` — a list of Answer GUIDs - `liveboard_identifiers` — a list of Liveboard GUIDs - `data_source_identifiers` — a list of data source GUIDs Optional parameters for refining the output: - `ai_context`: additional context to improve response quality - `content` — supplementary text or CSV data as string input - `instructions` — custom text instructions for the AI system - `limit_relevant_questions`: maximum number of questions to return (default: `5`) - `bypass_cache`: if `true`, forces fresh computation instead of returning cached results If the request is successful, the API returns a list of relevant analytical questions, each containing: - `query`: the generated sub-question - `data_source_identifier`: the unique ID of the data source the question targets - `data_source_name`: the display name of the corresponding data source #### Error responses | Code | Description | |------|---------------------------------------------------------------------------------------------------------------------------------------| | 401 | Unauthorized — authentication token is missing, expired, or invalid. | | 403 | Forbidden — the authenticated user does not have `CAN_USE_SPOTTER` privilege or lacks view access to the referenced metadata objects. | > ###### Note: > * This endpoint is currently in Beta. Breaking changes may be introduced before the endpoint is made Generally Available. > * This endpoint requires Spotter - please contact ThoughtSpot support to enable Spotter on your cluster. + +### Parameters + +| Name | Type | +|------------- | ------------- | +| **getRelevantQuestionsRequest** | [**GetRelevantQuestionsRequest**](GetRelevantQuestionsRequest.md) + +### Return type + +[**EurekaGetRelevantQuestionsResponse**](EurekaGetRelevantQuestionsResponse.md) + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Common successful response | - | +| **201** | Common error response | - | +| **400** | Operation failed | - | +| **401** | Unauthorized access. | - | +| **403** | Forbidden access. | - | +| **500** | Operation failed | - | + + +# **queryGetDecomposedQuery** +> EurekaDecomposeQueryResponse queryGetDecomposedQuery(queryGetDecomposedQueryRequest) + + + + Version: 10.7.0.cl or later **Deprecated** — Use `getRelevantQuestions` instead (available from 10.13.0.cl). Breaks down a topical or goal-oriented natural language question into smaller, actionable analytical sub-questions, each mapped to a relevant data source for independent execution. Requires `CAN_USE_SPOTTER` privilege and at least view-level access to the referenced metadata objects. #### Usage guidelines The request accepts the following parameters: - `nlsRequest`: contains the user `query` to decompose, along with optional `instructions` and `bypassCache` flag - `worksheetIds`: list of data source identifiers to scope the decomposition - `answerIds`: list of Answer GUIDs whose data guides the response - `liveboardIds`: list of Liveboard GUIDs whose data guides the response - `conversationId`: an existing conversation session ID for context continuity - `content`: supplementary text or CSV data to improve response quality - `maxDecomposedQueries`: maximum number of sub-questions to return (default: `5`) If the request is successful, the API returns a `decomposedQueryResponse` containing a list of `decomposedQueries`, each with: - `query`: the generated analytical sub-question - `worksheetId`: the unique ID of the data source the question targets - `worksheetName`: the display name of the corresponding data source #### Error responses | Code | Description | |------|---------------------------------------------------------------------------------------------------------------------------------------| | 401 | Unauthorized — authentication token is missing, expired, or invalid. | | 403 | Forbidden — the authenticated user does not have `CAN_USE_SPOTTER` privilege or lacks view access to the referenced metadata objects. | > ###### Note: > * This endpoint is deprecated since 10.13.0.cl. Use `getRelevantQuestions` for new integrations. > * This endpoint is currently in Beta. Breaking changes may be introduced before the endpoint is made Generally Available. > * This endpoint requires Spotter — please contact ThoughtSpot support to enable Spotter on your cluster. + +### Parameters + +| Name | Type | +|------------- | ------------- | +| **queryGetDecomposedQueryRequest** | [**QueryGetDecomposedQueryRequest**](QueryGetDecomposedQueryRequest.md) + +### Return type + +[**EurekaDecomposeQueryResponse**](EurekaDecomposeQueryResponse.md) + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Common successful response | - | +| **201** | Common error response | - | +| **400** | Operation failed | - | +| **401** | Unauthorized access. | - | +| **403** | Forbidden access. | - | +| **500** | Operation failed | - | + + +# **sendAgentConversationMessage** +> Object sendAgentConversationMessage(conversationIdentifier, sendAgentConversationMessageRequest) + + + + Version: 26.5.0.cl or later Sends natural language messages to an existing Spotter agent conversation and returns the complete response synchronously. Requires `CAN_USE_SPOTTER` privilege and access to the metadata object associated with the conversation. The user must have access to the conversation session referenced by `conversation_identifier`. A conversation must first be created using the `createAgentConversation` API. #### Usage guidelines The request must include: - `conversation_identifier`: the unique session ID returned by `createAgentConversation`, used for context continuity and message tracking - `messages`: an array of one or more text messages to send to the agent The API returns an array of response objects, each containing: - `type`: the kind of response — `text`, `answer`, or `error` - `message`: the main content of the response - `metadata`: additional information depending on the message type (e.g., answer metadata includes analytics and visualization details) #### Error responses | Code | Description | |------|----------------------------------------------------------------------------------------------------------------------------------| | 401 | Unauthorized — authentication token is missing, expired, or invalid. | | 403 | Forbidden — the authenticated user does not have `CAN_USE_SPOTTER` privilege or lacks permission on the referenced conversation. | > ###### Note: > > - This endpoint is Generally Available from version 26.5.0.cl. > - This endpoint requires Spotter - please contact ThoughtSpot support to enable Spotter on your cluster. > - For real-time streamed responses, use `sendAgentConversationMessageStreaming` instead. + +### Parameters + +| Name | Type | +|------------- | ------------- | +| **conversationIdentifier** | **String** +| **sendAgentConversationMessageRequest** | [**SendAgentConversationMessageRequest**](SendAgentConversationMessageRequest.md) + +### Return type + +**Object** + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Common successful response | - | +| **201** | Common error response | - | +| **400** | Operation failed | - | +| **401** | Unauthorized access. | - | +| **403** | Forbidden access. | - | +| **500** | Operation failed | - | + + +# **sendAgentConversationMessageStreaming** +> SendAgentMessageResponse sendAgentConversationMessageStreaming(conversationIdentifier, sendAgentConversationMessageStreamingRequest) + + + + Version: 26.5.0.cl or later Sends one or more natural language messages to an existing Spotter agent conversation and returns the response as a real-time Server-Sent Events stream. Requires `CAN_USE_SPOTTER` privilege and access to the metadata object associated with the conversation. The user must have access to the conversation session referenced by `conversation_identifier`. A conversation must first be created using the `createAgentConversation` API. #### Usage guidelines The request must include: - `conversation_identifier`: the unique session ID returned by `createAgentConversation`, used for context continuity and message tracking - `messages`: an array of one or more text messages to send to the agent If the request is valid, the API returns a Server-Sent Events (SSE) stream. Each line has the form `data: [{\"type\": \"...\", ...}]` — a JSON array of event objects. Event types include: - `ack`: confirms receipt of the request (`node_id`) - `conv_title`: conversation title (`title`, `conv_id`) - `notification`: status updates on operations (`group_id`, `metadata`, `code` — e.g. `TOOL_CALL_NOTIFICATION`, `nls_start`, `FINAL_RESPONSE_NOTIFICATION`) - `text-chunk`: incremental content chunks (`id`, `group_id`, `metadata` with `format` and `type` such as `thinking` or `text`, `content`) - `text`: full text block with same structure as `text-chunk` - `answer`: structured answer with metadata (`id`, `group_id`, `metadata` with `sage_query`, `session_id`, `title`, etc., `title`) - `error`: if a failure occurs #### Error responses | Code | Description | | ---- | -------------------------------------------------------------------------------------------------------------------------------- | | 401 | Unauthorized — authentication token is missing, expired, or invalid. | | 403 | Forbidden — the authenticated user does not have `CAN_USE_SPOTTER` privilege or lacks permission on the referenced conversation. | > ###### Note: > > - This endpoint is Generally Available from version 26.5.0.cl. > - This endpoint requires Spotter - please contact ThoughtSpot support to enable Spotter on your cluster. > - The streaming protocol uses Server-Sent Events (SSE). > - For the complete response in a single payload, use `sendAgentConversationMessage` instead. + +### Parameters + +| Name | Type | +|------------- | ------------- | +| **conversationIdentifier** | **String** +| **sendAgentConversationMessageStreamingRequest** | [**SendAgentConversationMessageStreamingRequest**](SendAgentConversationMessageStreamingRequest.md) + +### Return type + +[**SendAgentMessageResponse**](SendAgentMessageResponse.md) + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Common successful response | - | +| **201** | Common error response | - | +| **400** | Operation failed | - | +| **401** | Unauthorized access. | - | +| **403** | Forbidden access. | - | +| **500** | Operation failed | - | + + +# **sendAgentMessage** +> Object sendAgentMessage(conversationIdentifier, sendAgentMessageRequest) + + + + Version: 26.2.0.cl or later **Deprecated** — Use `sendAgentConversationMessage` instead. Send natural language messages to an existing Spotter agent conversation and returns the complete response synchronously. Requires `CAN_USE_SPOTTER` privilege and access to the metadata object associated with the conversation. The user must have access to the conversation session referenced by `conversation_identifier`. A conversation must first be created using the `createAgentConversation` API. #### Usage guidelines The request must include: - `conversation_identifier`: the unique session ID returned by `createAgentConversation`, used for context continuity and message tracking - `messages`: an array of one or more text messages to send to the agent The API returns an array of response objects, each containing: - `type`: the kind of response — `text`, `answer`, or `error` - `message`: the main content of the response - `metadata`: additional information depending on the message type (e.g., answer metadata includes analytics and visualization details) #### Error responses | Code | Description | |------|----------------------------------------------------------------------------------------------------------------------------------| | 401 | Unauthorized — authentication token is missing, expired, or invalid. | | 403 | Forbidden — the authenticated user does not have `CAN_USE_SPOTTER` privilege or lacks permission on the referenced conversation. | > ###### Note: > > - This endpoint is deprecated. Use `sendAgentConversationMessage` for new integrations. > - This endpoint is currently in Beta. Breaking changes may be introduced before the endpoint is made Generally Available. > - This endpoint requires Spotter - please contact ThoughtSpot support to enable Spotter on your cluster. + +### Parameters + +| Name | Type | +|------------- | ------------- | +| **conversationIdentifier** | **String** +| **sendAgentMessageRequest** | [**SendAgentMessageRequest**](SendAgentMessageRequest.md) + +### Return type + +**Object** + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Common successful response | - | +| **201** | Common error response | - | +| **400** | Operation failed | - | +| **401** | Unauthorized access. | - | +| **403** | Forbidden access. | - | +| **500** | Operation failed | - | + + +# **sendAgentMessageStreaming** +> SendAgentMessageResponse sendAgentMessageStreaming(sendAgentMessageStreamingRequest) + + + + Version: 26.2.0.cl or later **Deprecated** — Use `sendAgentConversationMessageStreaming` instead. Sends one or more natural language messages to an existing Spotter agent conversation and returns the response as a real-time Server-Sent Events stream. Requires `CAN_USE_SPOTTER` privilege and access to the metadata object associated with the conversation. The user must have access to the conversation session referenced by `conversation_identifier`. A conversation must first be created using the `createAgentConversation` API. #### Usage guidelines The request must include: - `conversation_identifier`: the unique session ID returned by `createAgentConversation`, used for context continuity and message tracking - `messages`: an array of one or more text messages to send to the agent If the request is valid, the API returns a Server-Sent Events (SSE) stream. Each line has the form `data: [{\"type\": \"...\", ...}]` — a JSON array of event objects. Event types include: - `ack`: confirms receipt of the request (`node_id`) - `conv_title`: conversation title (`title`, `conv_id`) - `notification`: status updates on operations (`group_id`, `metadata`, `code` — e.g. `TOOL_CALL_NOTIFICATION`, `nls_start`, `FINAL_RESPONSE_NOTIFICATION`) - `text-chunk`: incremental content chunks (`id`, `group_id`, `metadata` with `format` and `type` such as `thinking` or `text`, `content`) - `text`: full text block with same structure as `text-chunk` - `answer`: structured answer with metadata (`id`, `group_id`, `metadata` with `sage_query`, `session_id`, `title`, etc., `title`) - `error`: if a failure occurs #### Error responses | Code | Description | |------|----------------------------------------------------------------------------------------------------------------------------------| | 401 | Unauthorized — authentication token is missing, expired, or invalid. | | 403 | Forbidden — the authenticated user does not have `CAN_USE_SPOTTER` privilege or lacks permission on the referenced conversation. | > ###### Note: > > - This endpoint is deprecated. Use `sendAgentConversationMessageStreaming` for new integrations. > - This endpoint is currently in Beta. Breaking changes may be introduced before the endpoint is made Generally Available. > - This endpoint requires Spotter - please contact ThoughtSpot support to enable Spotter on your cluster. > - The streaming protocol uses Server-Sent Events (SSE). + +### Parameters + +| Name | Type | +|------------- | ------------- | +| **sendAgentMessageStreamingRequest** | [**SendAgentMessageStreamingRequest**](SendAgentMessageStreamingRequest.md) + +### Return type + +[**SendAgentMessageResponse**](SendAgentMessageResponse.md) + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Common successful response | - | +| **201** | Common error response | - | +| **400** | Operation failed | - | +| **401** | Unauthorized access. | - | +| **403** | Forbidden access. | - | +| **500** | Operation failed | - | + + +# **sendMessage** +> List<ResponseMessage> sendMessage(conversationIdentifier, sendMessageRequest) + + + + Version: 10.4.0.cl or later Sends a follow-up message to an existing conversation within the context of a data model. Requires `CAN_USE_SPOTTER` privilege and at least view access to the metadata object specified in the request. A conversation must first be created using the `createConversation` API. #### Usage guidelines The request must include: - `conversation_identifier`: the unique session ID returned by `createConversation` - `metadata_identifier`: the unique ID of the data source used for the conversation - `message`: a natural language string with the follow-up question If the request is successful, the API returns an array of response messages, each containing: - `session_identifier`: the unique ID of the generated response - `generation_number`: the generation number of the response - `message_type`: the type of the response (e.g., `TSAnswer`) - `visualization_type`: the generated visualization type (`Chart`, `Table`, or `Undefined`) - `tokens` / `display_tokens`: the search tokens and user-friendly display tokens for the response #### Error responses | Code | Description | |------|-----------------------------------------------------------------------------------------------------------------------------------------| | 401 | Unauthorized — authentication token is missing, expired, or invalid. | | 403 | Forbidden — the authenticated user does not have `CAN_USE_SPOTTER` privilege or lacks view permission on the specified metadata object. | > ###### Note: > * This endpoint is currently in Beta. Breaking changes may be introduced before the endpoint is made Generally Available. > * This endpoint requires Spotter - please contact ThoughtSpot support to enable Spotter on your cluster. + +### Parameters + +| Name | Type | +|------------- | ------------- | +| **conversationIdentifier** | **String** +| **sendMessageRequest** | [**SendMessageRequest**](SendMessageRequest.md) + +### Return type + +[**List<ResponseMessage>**](ResponseMessage.md) + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Common successful response | - | +| **201** | Common error response | - | +| **400** | Operation failed | - | +| **401** | Unauthorized access. | - | +| **403** | Forbidden access. | - | +| **500** | Operation failed | - | + + +# **setNLInstructions** +> EurekaSetNLInstructionsResponse setNLInstructions(setNLInstructionsRequest) + + + + Version: 10.15.0.cl or later This API allows users to set natural language (NL) instructions for a specific data-model to improve AI-generated answers and query processing. These instructions help guide the AI system to better understand the data context and provide more accurate responses. Requires `CAN_USE_SPOTTER` privilege, either edit access or `SPOTTER_COACHING_PRIVILEGE` on the data model, and a bearer token corresponding to the org where the data model exists. #### Usage guidelines To set NL instructions for a data-model, the request must include: - `data_source_identifier`: The unique ID of the data-model for which to set NL instructions - `nl_instructions_info`: An array of instruction objects, each containing: - `instructions`: Array of text instructions for the LLM - `scope`: The scope of the instruction (`GLOBAL`). Currently only `GLOBAL` is supported. It can be extended to data-model-user scope in future. #### Instructions scope - **GLOBAL**: instructions that apply to all users querying this data model If the request is successful, the API returns: - `success`: a boolean indicating whether the operation completed successfully #### Error responses | Code | Description | |------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| | 401 | Unauthorized — authentication token is missing, expired, or invalid. | | 403 | Forbidden — the authenticated user does not have `CAN_USE_SPOTTER` privilege, lacks edit access or `SPOTTER_COACHING_PRIVILEGE` on the data model, or the bearer token does not correspond to the org where the data model exists. | > ###### Note: > > - To use this API, the user needs either edit access or `SPOTTER_COACHING_PRIVILEGE` on the data model, and must use the bearer token corresponding to the org where the data model exists. > - This endpoint is currently in Beta. Breaking changes may be introduced before the endpoint is made Generally Available. > - Available from version 10.15.0.cl and later. > - This endpoint requires Spotter — please contact ThoughtSpot Support to enable Spotter on your cluster. > - Instructions help improve the accuracy and relevance of AI-generated responses for the specified data-model. + +### Parameters + +| Name | Type | +|------------- | ------------- | +| **setNLInstructionsRequest** | [**SetNLInstructionsRequest**](SetNLInstructionsRequest.md) + +### Return type + +[**EurekaSetNLInstructionsResponse**](EurekaSetNLInstructionsResponse.md) + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Common successful response | - | +| **201** | Common error response | - | +| **400** | Operation failed | - | +| **401** | Unauthorized access. | - | +| **403** | Forbidden access. | - | +| **500** | Operation failed | - | + + +# **singleAnswer** +> ResponseMessage singleAnswer(singleAnswerRequest) + + + + Version: 10.4.0.cl or later Processes a natural language query against a specified data model and returns a single AI-generated answer without requiring a conversation session. Requires `CAN_USE_SPOTTER` privilege and at least view access to the metadata object specified in the request. #### Usage guidelines The request must include: - `query`: a natural language question (e.g., \"What were total sales last quarter?\") - `metadata_identifier`: the unique ID of the data source to query against If the request is successful, the API returns a response message containing: - `session_identifier`: the unique ID of the generated response - `generation_number`: the generation number of the response - `message_type`: the type of the response (e.g., `TSAnswer`) - `visualization_type`: the generated visualization type (`Chart`, `Table`, or `Undefined`) - `tokens` / `display_tokens`: the search tokens and user-friendly display tokens for the response #### Error responses | Code | Description | |------|-----------------------------------------------------------------------------------------------------------------------------------------| | 401 | Unauthorized — authentication token is missing, expired, or invalid. | | 403 | Forbidden — the authenticated user does not have `CAN_USE_SPOTTER` privilege or lacks view permission on the specified metadata object. | > ###### Note: > * This endpoint is currently in Beta. Breaking changes may be introduced before the endpoint is made Generally Available. > * This endpoint requires Spotter - please contact ThoughtSpot support to enable Spotter on your cluster. + +### Parameters + +| Name | Type | +|------------- | ------------- | +| **singleAnswerRequest** | [**SingleAnswerRequest**](SingleAnswerRequest.md) + +### Return type + +[**ResponseMessage**](ResponseMessage.md) + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Common successful response | - | +| **201** | Common error response | - | +| **400** | Operation failed | - | +| **401** | Unauthorized access. | - | +| **403** | Forbidden access. | - | +| **500** | Operation failed | - | + + +# **stopConversation** +> stopConversation(conversationIdentifier) + + + + Stops an in-progress agent conversation response. Version: 26.6.0.cl or later <span>Version: 26.6.0.cl or later Stops an in-progress agent response for the specified conversation. Use this endpoint to cancel a response that is actively being generated — for example, when the user navigates away, reformulates their question, or no longer needs the current result. Requires `CAN_USE_SPOTTER` privilege and access to the specified conversation. #### Usage guidelines The request must include: - `conversation_identifier` *(path parameter)*: the unique ID of the conversation whose active response should be stopped, as returned by `createAgentConversation` A successful request returns an empty `204 No Content` response. If there is no active response in progress at the time of the call, the request is still treated as successful. After stopping a response, the conversation session remains active. You can continue sending messages using `sendAgentConversationMessage` or `sendAgentConversationMessageStreaming`. #### Example request ```bash POST /api/rest/2.0/ai/agent/conversation/{conversation_identifier}/stop-response ``` #### Typical usage scenario This endpoint is useful when integrating Spotter into a chat UI where users can cancel a long-running query. For example: 1. User sends a message via `sendAgentConversationMessageStreaming`. 2. User clicks a \"Stop generating\" button while the response is streaming. 3. Your client calls `stopConversation` with the active `conversation_identifier`. 4. The stream is terminated and the user can ask a new question. #### Error responses | Code | Description | |------|-------------| | 401 | Unauthorized — authentication token is missing, expired, or invalid. | | 403 | Forbidden — the authenticated user does not have `CAN_USE_SPOTTER` privilege or lacks access to the specified conversation. | > ###### Note: > > - Calling this endpoint when no response is in progress does not return an error. > - The conversation context is preserved after stopping — previous messages and answers remain accessible. > - Available from version 26.6.0.cl and later. > - This endpoint requires Spotter — please contact ThoughtSpot Support to enable Spotter on your cluster. > - This feature is available only for **Spotter 3** (`SPOTTER3`) version. + +### Parameters + +| Name | Type | +|------------- | ------------- | +| **conversationIdentifier** | **String** + +### Return type + +null (empty response body) + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **204** | Successfully stopped the in-progress agent conversation response for the given. | - | +| **400** | Operation failed | - | +| **401** | Unauthorized access. | - | +| **403** | Forbidden access. | - | +| **500** | Operation failed | - | + diff --git a/sdks/java/docs/AnswerContent.md b/sdks/java/docs/AnswerContent.md new file mode 100644 index 000000000..371e41af9 --- /dev/null +++ b/sdks/java/docs/AnswerContent.md @@ -0,0 +1,23 @@ + + +# AnswerContent + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**availableDataRowCount** | **Integer** | Total available data row count. | | +|**columnNames** | **List<String>** | Name of the columns. | | +|**dataRows** | **List<Object>** | Rows of data set. | | +|**recordOffset** | **Integer** | The starting record number from where the records should be included. | | +|**recordSize** | **Integer** | The number of records that should be included. | | +|**returnedDataRowCount** | **Integer** | Total returned data row count. | | +|**samplingRatio** | **Float** | Sampling ratio (0 to 1). If the query was sampled, it is the ratio of keys returned in the data set to the total number of keys expected in the query. If the value is 1.0, this means that the complete result is returned. | | + + +## Implemented Interfaces + +* Serializable + + diff --git a/sdks/java/docs/AnswerDataResponse.md b/sdks/java/docs/AnswerDataResponse.md new file mode 100644 index 000000000..21dc0729b --- /dev/null +++ b/sdks/java/docs/AnswerDataResponse.md @@ -0,0 +1,20 @@ + + +# AnswerDataResponse + +Response format associated with fetch data api + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**metadataId** | **String** | The unique identifier of the object | | +|**metadataName** | **String** | Name of the metadata object | | +|**contents** | [**List<AnswerContent>**](AnswerContent.md) | Data content of metadata objects | | + + +## Implemented Interfaces + +* Serializable + + diff --git a/sdks/java/docs/AnswerPngOptionsInput.md b/sdks/java/docs/AnswerPngOptionsInput.md new file mode 100644 index 000000000..59a9754a2 --- /dev/null +++ b/sdks/java/docs/AnswerPngOptionsInput.md @@ -0,0 +1,19 @@ + + +# AnswerPngOptionsInput + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**xResolution** | **Integer** | Desired width of the answer image in pixels. Ex. 1920 for Full HD image Version: 26.6.0.cl or later | [optional] | +|**yResolution** | **Integer** | Desired height of the answer image in pixels. Ex. 1080 for Full HD image Version: 26.6.0.cl or later | [optional] | +|**scaling** | **Integer** | The scale of the image in percentage. Ex. 100 for 100% scale. Version: 26.6.0.cl or later | [optional] | + + +## Implemented Interfaces + +* Serializable + + diff --git a/sdks/java/docs/AssignChangeAuthorRequest.md b/sdks/java/docs/AssignChangeAuthorRequest.md new file mode 100644 index 000000000..d954d9abe --- /dev/null +++ b/sdks/java/docs/AssignChangeAuthorRequest.md @@ -0,0 +1,19 @@ + + +# AssignChangeAuthorRequest + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**metadata** | [**List<AuthorMetadataTypeInput>**](AuthorMetadataTypeInput.md) | GUID or name of the metadata object. | | +|**userIdentifier** | **String** | GUID or name of the user who you want to assign as the author. | | +|**currentOwnerIdentifier** | **String** | GUID or name of the current author. When defined, the metadata objects authored by the specified owner are filtered for the API operation. | [optional] | + + +## Implemented Interfaces + +* Serializable + + diff --git a/sdks/java/docs/AssignTagRequest.md b/sdks/java/docs/AssignTagRequest.md new file mode 100644 index 000000000..937adbc25 --- /dev/null +++ b/sdks/java/docs/AssignTagRequest.md @@ -0,0 +1,18 @@ + + +# AssignTagRequest + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**metadata** | [**List<TagMetadataTypeInput>**](TagMetadataTypeInput.md) | Metadata objects. | | +|**tagIdentifiers** | **List<String>** | GUID or name of the tag. | | + + +## Implemented Interfaces + +* Serializable + + diff --git a/sdks/java/docs/AssociateMetadataInput.md b/sdks/java/docs/AssociateMetadataInput.md new file mode 100644 index 000000000..e54ad54fc --- /dev/null +++ b/sdks/java/docs/AssociateMetadataInput.md @@ -0,0 +1,29 @@ + + +# AssociateMetadataInput + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**actionConfig** | [**ActionConfigInput**](ActionConfigInput.md) | | [optional] | +|**identifier** | **String** | Unique ID or name of the metadata. | [optional] | +|**type** | [**TypeEnum**](#TypeEnum) | Type of metadata. Required if the name of the object is set as the identifier. This attribute is optional when the object GUID is specified as the identifier. | [optional] | + + + +## Enum: TypeEnum + +| Name | Value | +|---- | -----| +| VISUALIZATION | "VISUALIZATION" | +| ANSWER | "ANSWER" | +| WORKSHEET | "WORKSHEET" | + + +## Implemented Interfaces + +* Serializable + + diff --git a/sdks/java/docs/AssociateMetadataInputCreate.md b/sdks/java/docs/AssociateMetadataInputCreate.md new file mode 100644 index 000000000..0d028f587 --- /dev/null +++ b/sdks/java/docs/AssociateMetadataInputCreate.md @@ -0,0 +1,29 @@ + + +# AssociateMetadataInputCreate + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**actionConfig** | [**ActionConfigInputCreate**](ActionConfigInputCreate.md) | | [optional] | +|**identifier** | **String** | Unique ID or name of the metadata. | | +|**type** | [**TypeEnum**](#TypeEnum) | Type of metadata. Required if the name of the object is set as the identifier. This attribute is optional when the object GUID is specified as the identifier. | [optional] | + + + +## Enum: TypeEnum + +| Name | Value | +|---- | -----| +| VISUALIZATION | "VISUALIZATION" | +| ANSWER | "ANSWER" | +| WORKSHEET | "WORKSHEET" | + + +## Implemented Interfaces + +* Serializable + + diff --git a/sdks/java/docs/AuthClusterPreferences.md b/sdks/java/docs/AuthClusterPreferences.md new file mode 100644 index 000000000..e547e6b28 --- /dev/null +++ b/sdks/java/docs/AuthClusterPreferences.md @@ -0,0 +1,28 @@ + + +# AuthClusterPreferences + +Cluster-level authentication preferences. + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**authStatus** | [**AuthStatusEnum**](#AuthStatusEnum) | Whether authentication is enabled or disabled at the cluster level. | [optional] | +|**accessTokens** | [**List<AuthSettingsAccessToken>**](AuthSettingsAccessToken.md) | Cluster-level access tokens. Absent when no token is configured. | [optional] | + + + +## Enum: AuthStatusEnum + +| Name | Value | +|---- | -----| +| ENABLED | "ENABLED" | +| DISABLED | "DISABLED" | + + +## Implemented Interfaces + +* Serializable + + diff --git a/sdks/java/docs/AuthClusterPreferencesInput.md b/sdks/java/docs/AuthClusterPreferencesInput.md new file mode 100644 index 000000000..9ff971fce --- /dev/null +++ b/sdks/java/docs/AuthClusterPreferencesInput.md @@ -0,0 +1,27 @@ + + +# AuthClusterPreferencesInput + +Input for cluster-level auth configuration. + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**authStatus** | [**AuthStatusEnum**](#AuthStatusEnum) | Enable or disable authentication at the cluster level. When enabled, a new token is generated if one does not exist. When disabled, the existing token is revoked. | [optional] | + + + +## Enum: AuthStatusEnum + +| Name | Value | +|---- | -----| +| ENABLED | "ENABLED" | +| DISABLED | "DISABLED" | + + +## Implemented Interfaces + +* Serializable + + diff --git a/sdks/java/docs/AuthOrgInfo.md b/sdks/java/docs/AuthOrgInfo.md new file mode 100644 index 000000000..1c06d190e --- /dev/null +++ b/sdks/java/docs/AuthOrgInfo.md @@ -0,0 +1,19 @@ + + +# AuthOrgInfo + +Org identifier returned in auth settings search results. + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**id** | **Integer** | Unique identifier of the org. | | +|**name** | **String** | Name of the org. | [optional] | + + +## Implemented Interfaces + +* Serializable + + diff --git a/sdks/java/docs/AuthOrgPreference.md b/sdks/java/docs/AuthOrgPreference.md new file mode 100644 index 000000000..8c29b5c84 --- /dev/null +++ b/sdks/java/docs/AuthOrgPreference.md @@ -0,0 +1,29 @@ + + +# AuthOrgPreference + +Org-level authentication preferences for a single org. + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**org** | [**AuthOrgInfo**](AuthOrgInfo.md) | | [optional] | +|**authStatus** | [**AuthStatusEnum**](#AuthStatusEnum) | Whether authentication is enabled or disabled for this org. | [optional] | +|**accessTokens** | [**List<AuthSettingsAccessToken>**](AuthSettingsAccessToken.md) | Org-level access tokens. Absent when no token is configured or the feature flag is off. | [optional] | + + + +## Enum: AuthStatusEnum + +| Name | Value | +|---- | -----| +| ENABLED | "ENABLED" | +| DISABLED | "DISABLED" | + + +## Implemented Interfaces + +* Serializable + + diff --git a/sdks/java/docs/AuthOrgPreferenceInput.md b/sdks/java/docs/AuthOrgPreferenceInput.md new file mode 100644 index 000000000..f31532b8d --- /dev/null +++ b/sdks/java/docs/AuthOrgPreferenceInput.md @@ -0,0 +1,28 @@ + + +# AuthOrgPreferenceInput + +Input for org-level auth configuration. + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**orgIdentifier** | **String** | Unique ID or name of the org to configure. | | +|**authStatus** | [**AuthStatusEnum**](#AuthStatusEnum) | Enable or disable authentication for this org. When enabled, a new token is generated if one does not exist. When disabled, the existing token is revoked. | [optional] | + + + +## Enum: AuthStatusEnum + +| Name | Value | +|---- | -----| +| ENABLED | "ENABLED" | +| DISABLED | "DISABLED" | + + +## Implemented Interfaces + +* Serializable + + diff --git a/sdks/java/docs/AuthSettingsAccessToken.md b/sdks/java/docs/AuthSettingsAccessToken.md new file mode 100644 index 000000000..5388bcd9d --- /dev/null +++ b/sdks/java/docs/AuthSettingsAccessToken.md @@ -0,0 +1,18 @@ + + +# AuthSettingsAccessToken + +An auth settings access token. + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**key** | **String** | The plaintext token key value. | | + + +## Implemented Interfaces + +* Serializable + + diff --git a/sdks/java/docs/Authentication.md b/sdks/java/docs/Authentication.md new file mode 100644 index 000000000..a1ae00e7e --- /dev/null +++ b/sdks/java/docs/Authentication.md @@ -0,0 +1,21 @@ + + +# Authentication + +Authorization type for the custom action. + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**apIKey** | [**APIKey**](APIKey.md) | | [optional] | +|**basicAuth** | [**BasicAuth**](BasicAuth.md) | | [optional] | +|**bearerToken** | **String** | Bearer tokens enable requests to authenticate using an access key. | [optional] | +|**noAuth** | **String** | No authorization. If your request doesn't require authorization. | [optional] | + + +## Implemented Interfaces + +* Serializable + + diff --git a/sdks/java/docs/AuthenticationApi.md b/sdks/java/docs/AuthenticationApi.md new file mode 100644 index 000000000..b4428254e --- /dev/null +++ b/sdks/java/docs/AuthenticationApi.md @@ -0,0 +1,406 @@ +# AuthenticationApi + +All URIs are relative to *CLUSTER_URL* + +| Method | HTTP request | +|------------- | ------------- | +| [**configureAuthSettings**](AuthenticationApi.md#configureAuthSettings) | **POST** /api/rest/2.0/auth/configure | +| [**getCurrentUserInfo**](AuthenticationApi.md#getCurrentUserInfo) | **GET** /api/rest/2.0/auth/session/user | +| [**getCurrentUserToken**](AuthenticationApi.md#getCurrentUserToken) | **GET** /api/rest/2.0/auth/session/token | +| [**getCustomAccessToken**](AuthenticationApi.md#getCustomAccessToken) | **POST** /api/rest/2.0/auth/token/custom | +| [**getFullAccessToken**](AuthenticationApi.md#getFullAccessToken) | **POST** /api/rest/2.0/auth/token/full | +| [**getObjectAccessToken**](AuthenticationApi.md#getObjectAccessToken) | **POST** /api/rest/2.0/auth/token/object | +| [**login**](AuthenticationApi.md#login) | **POST** /api/rest/2.0/auth/session/login | +| [**logout**](AuthenticationApi.md#logout) | **POST** /api/rest/2.0/auth/session/logout | +| [**revokeToken**](AuthenticationApi.md#revokeToken) | **POST** /api/rest/2.0/auth/token/revoke | +| [**searchAuthSettings**](AuthenticationApi.md#searchAuthSettings) | **POST** /api/rest/2.0/auth/search | +| [**validateToken**](AuthenticationApi.md#validateToken) | **POST** /api/rest/2.0/auth/token/validate | + + + +# **configureAuthSettings** +> configureAuthSettings(configureAuthSettingsRequest) + + + + Version: 26.6.0.cl or later Enables or disables authentication at cluster or org level for the specified auth type. Currently supports `TRUSTED_AUTH`. #### Required privileges Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) or `CONTROL_TRUSTED_AUTH` (**Can Enable or Disable Trusted Authentication**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled, the `CONTROL_TRUSTED_AUTH` privilege is required. #### Usage guidelines Use `cluster_preferences` to enable or disable authentication at the cluster level. Cluster-level settings can only be configured from the Primary Org. - `ENABLED` — Generates a new access token if one does not exist. An existing token is preserved. - `DISABLED` — Revokes the existing cluster-level access token. Use `org_preferences` to enable or disable authentication for one or more Orgs. Each entry must include an `org_identifier` (unique ID or name) and an `auth_status`. Org-level configuration requires the per-Org authentication feature to be enabled on your instance. - `ENABLED` — Generates a new org-level access token if one does not exist. - `DISABLED` — Revokes the existing org-level access token for that Org. Both `cluster_preferences` and `org_preferences` are optional. Omitting a field leaves the corresponding settings unchanged. If both are omitted, the API returns `204 No Content` without making any changes. **Note**: Cluster-level and org-level settings are independent of each other. Enabling or disabling one does not affect the other. + +### Parameters + +| Name | Type | +|------------- | ------------- | +| **configureAuthSettingsRequest** | [**ConfigureAuthSettingsRequest**](ConfigureAuthSettingsRequest.md) + +### Return type + +null (empty response body) + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **204** | Trusted authentication settings configured successfully. | - | +| **400** | Invalid request. | - | +| **401** | Unauthorized access. | - | +| **403** | Forbidden access. | - | +| **500** | Unexpected error | - | + + +# **getCurrentUserInfo** +> User getCurrentUserInfo() + + + + Version: 9.0.0.cl or later Retrieves details of the current user session for the token provided in the request header. Any ThoughtSpot user can access this endpoint and send an API request. The data returned in the API response varies according to user's privilege and object access permissions. **NOTE**: In ThoughtSpot, users with cluster administration privileges can access all Orgs by default. However, unless the administrator is explicitly added to an Org, the Orgs list in the session information returned by the API will include only the Primary Org. To include other Orgs in the API response, you must explicitly add the administrator to each Org in the Admin settings page in the UI or via user REST API. + +### Parameters +This endpoint does not need any parameter. + +### Return type + +[**User**](User.md) + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Fetch current session user detail successful. | - | +| **400** | Invalid request. | - | +| **401** | Unauthorized access. | - | +| **403** | Forbidden access. | - | +| **500** | Unexpected error | - | + + +# **getCurrentUserToken** +> GetTokenResponse getCurrentUserToken() + + + + Version: 9.4.0.cl or later Retrieves details of the current session token for the bearer token provided in the request header. This API endpoint does not create a new token. Instead, it returns details about the token, including the token string, creation time, expiration time, and the associated user. Use this endpoint to introspect your current session token, debug authentication issues, or when a frontend application needs session token details. Any ThoughtSpot user with a valid bearer token can access this endpoint and send an API request + +### Parameters +This endpoint does not need any parameter. + +### Return type + +[**GetTokenResponse**](GetTokenResponse.md) + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Fetching token for current user successful. | - | +| **400** | Invalid request. | - | +| **401** | Unauthorized access. | - | +| **403** | Forbidden access. | - | +| **500** | Unexpected error | - | + + +# **getCustomAccessToken** +> AccessToken getCustomAccessToken(getCustomAccessTokenRequest) + + + + Version: 10.4.0.cl or later Creates an authentication token that provides values for the formula variables in the Row Level Security (RLS) rules for a given user. Recommended for use cases that require Attribute-based access control (ABAC) via RLS. #### Required privileges To add a new user and assign privileges during auto-creation, the `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege is required. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled, the `CONTROL_TRUSTED_AUTH` (**Can Enable or Disable Trusted Authentication**) privilege and edit access to the data source are required. To configure formula variables for all Orgs on your instance or the Primary Org, cluster administration privileges are required. Org administrators can configure formula variables for their respective Orgs. If Role-Based Access Control (RBAC) is enabled, users with the `CAN_MANAGE_VARIABLES` (**Can manage variables**) role privilege can also create and manage variables for their Org context. #### Usage guidelines You can generate a token by providing a `username` and `password`, or by using a `secret_key`. To generate a `secret_key`, the administrator must enable [Trusted authentication](https://developers.thoughtspot.com/docs/trusted-auth-secret-key) in the **Develop** > **Customizations** > **Security Settings** page. **Note**: * When both `password` and `secret_key` are included in the API request, `password` takes precedence. * If [Multi-Factor Authentication (MFA)](https://docs.thoughtspot.com/cloud/latest/authentication-local-mfa) is enabled on your instance, the API login request with `username` and `password` returns an error. You can switch to token-based authentication with `secret_key` or contact ThoughtSpot Support for assistance. The token obtained from ThoughtSpot is valid for 5 minutes by default. You can configure the token expiration time as required. #### ABAC via RLS To implement ABAC via RLS and assign security entitlements to users during session creation, generate a token with custom variable values. The values set in the authentication token are applied to the formula variables referenced in RLS rules at the table level, which determines the data each user can access based on their entitlements. The variable values can be configured to persist for a specific set of Models in user sessions initiated with the token, allowing different RLS rules to be set for different data models. Once defined, the rules are added to the user's `variable_values` object, after which all sessions will use the persisted values. For more information, see [ABAC via tokens Documentation](https://developers.thoughtspot.com/docs/abac-via-rls-variables). ##### Formula variables Before defining variable values, ensure the variables are created and available on your instance. To create a formula variable, you can use the **Create variable** (`/api/rest/2.0/template/variables/create`) REST API endpoint, with the variable `type` set as `Formula_Variable` in the API request. The API doesn't support `\"persist_option\": \"RESET\"` and `\"persist_option\": \"NONE\"` when `variable_values` are defined in the request. If you are using `variable_values` for token generation, you must use other supported persist options such as `APPEND` or `REPLACE`. If you want to use `RESET` or `NONE`, do not pass any `variable_values`. In such cases, `variable_values` will remain unaffected. #### Supported objects The supported object type is `LOGICAL_TABLE`. When using `object_id` with `variable_values`, models are supported. #### Just-in-time provisioning For [just-in-time user creation and provisioning](https://developers.thoughtspot.com/docs/just-in-time-provisioning), specify the following attributes in the API request: * `auto_create` * `username` * `display_name` * `email` * `groups` Set `auto_create` to `true` if the username does not exist in ThoughtSpot. If the username already exists in ThoughtSpot and `auto_create` is set to `true`, user properties such as display name, email, Org and group entitlements will not be updated with new values. Setting `auto_create` to `true` does not create formula variables. Hence, this setting will not be applicable to `variable_values`. #### Important point to note All options in the token creation APIs that define user access to data in ThoughtSpot will take effect during token creation, not when the token is used for authentication. For example, `auto_create:true` will create the user when the authentication token is created. Persist options such as `APPEND` and `REPLACE` will persist `variable_values` on the user profile when the token is created. + +### Parameters + +| Name | Type | +|------------- | ------------- | +| **getCustomAccessTokenRequest** | [**GetCustomAccessTokenRequest**](GetCustomAccessTokenRequest.md) + +### Return type + +[**AccessToken**](AccessToken.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | ABAC token creation was successful. | - | +| **400** | Invalid request. This could be due to missing or incorrect parameters. | - | +| **401** | Unauthorized access. The request could not be authenticated. | - | +| **403** | Forbidden access. The user does not have permission to access this resource. | - | +| **500** | An unexpected error occurred on the server. | - | + + +# **getFullAccessToken** +> Token getFullAccessToken(getFullAccessTokenRequest) + + + + Version: 9.0.0.cl or later Generates an authentication token for creating a full session in ThoughtSpot for a given user. Recommended for use cases that do not require Attribute-based access control (ABAC) via Row Level Security (RLS). #### Usage guidelines You can generate a token for a user by providing a `username` and `password`, or by using the `secret_key` generated for your instance. To generate a `secret_key`, the administrator must enable [Trusted authentication](https://developers.thoughtspot.com/docs/trusted-auth-secret-key) in the **Develop** > **Customizations** > **Security Settings** page. **Note**: * When both `password` and `secret_key` are included in the API request, `password` takes precedence. * If [Multi-Factor Authentication (MFA)](https://docs.thoughtspot.com/cloud/latest/authentication-local-mfa) is enabled on your instance, the API login request with `username` and `password` returns an error. You can switch to token-based authentication with `secret_key` or contact ThoughtSpot Support for assistance. The token obtained from ThoughtSpot is valid for 5 minutes by default. You can configure the token expiration time as required. #### Just-in-time provisioning For [just-in-time user creation and provisioning](https://developers.thoughtspot.com/docs/just-in-time-provisioning), specify the following attributes in the API request: * `auto_create` * `username` * `display_name` * `email` * `group_identifiers` Set `auto_create` to `true` if the username does not exist in ThoughtSpot. If the user already exists in ThoughtSpot and `auto_create` is set to `true`, user properties such as display name, email and group assignment will be updated. To add a new user and assign privileges during auto-creation, the `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege is required. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled, the `CONTROL_TRUSTED_AUTH` (**Can Enable or Disable Trusted Authentication**) privilege is required. #### Important point to note All options in the token creation APIs that define user access to data in ThoughtSpot will take effect during token creation, not when the token is used for authentication. For example, `auto_create:true` will create the user when the authentication token is created. + +### Parameters + +| Name | Type | +|------------- | ------------- | +| **getFullAccessTokenRequest** | [**GetFullAccessTokenRequest**](GetFullAccessTokenRequest.md) + +### Return type + +[**Token**](Token.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Bearer auth token creation successful. | - | +| **400** | Invalid request. | - | +| **401** | Unauthorized access. | - | +| **403** | Forbidden access. | - | +| **500** | Unexpected error | - | + + +# **getObjectAccessToken** +> Token getObjectAccessToken(getObjectAccessTokenRequest) + + + + Version: 9.0.0.cl or later Generates an authentication token that provides access to a specific metadata object. This object list is intersected with the list of objects the user is allowed to access via group membership. For more information, see [Object security](https://docs.thoughtspot.com/cloud/latest/security-data-object#object_security). #### Usage guidelines You can generate a token for a user by providing a `username` and `password`, or by using the `secret_key` generated for your instance. To generate a `secret_key`, the administrator must enable [Trusted authentication](https://developers.thoughtspot.com/docs/trusted-auth-secret-key) in the **Develop** > **Customizations** > **Security Settings** page. **Note**: * When both `password` and `secret_key` are included in the API request, `password` takes precedence. * If [Multi-Factor Authentication (MFA)](https://docs.thoughtspot.com/cloud/latest/authentication-local-mfa) is enabled on your instance, the API login request with `username` and `password` returns an error. You can switch to token-based authentication with `secret_key` or contact ThoughtSpot Support for assistance. The token obtained from ThoughtSpot is valid for 5 minutes by default. You can configure the token expiration time as required. #### Just-in-time provisioning For [just-in-time user creation and provisioning](https://developers.thoughtspot.com/docs/just-in-time-provisioning), specify the following attributes in the API request: * `auto_create` * `username` * `display_name` * `email` * `group_identifiers` Set `auto_create` to `true` if the user is not available in ThoughtSpot. If the user already exists in ThoughtSpot and the `auto_create` parameter is set to `true`, user properties such as display name, email, and group assignment will be updated. To add a new user and assign privileges, the `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege is required. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled, the `CONTROL_TRUSTED_AUTH`(**Can Enable or Disable Trusted Authentication**) privilege is required. #### Important point to note All options in the token creation APIs that define user access to data in ThoughtSpot will take effect during token creation, not when the token is used for authentication. For example, `auto_create:true` will create the user when the authentication token is created. + +### Parameters + +| Name | Type | +|------------- | ------------- | +| **getObjectAccessTokenRequest** | [**GetObjectAccessTokenRequest**](GetObjectAccessTokenRequest.md) + +### Return type + +[**Token**](Token.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Bearer auth token creation successful. | - | +| **400** | Invalid request. | - | +| **401** | Unauthorized access. | - | +| **403** | Forbidden access. | - | +| **500** | Unexpected error | - | + + +# **login** +> login(loginRequest) + + + + Version: 9.0.0.cl or later Creates a login session for a ThoughtSpot user with Basic authentication. In Basic authentication method, REST clients log in to ThoughtSpot using `username` and `password` attributes. On a multi-tenant cluster with Orgs, users can pass the ID of the Org in the API request to log in to a specific Org context. **Note**: If Multi-Factor Authentication (MFA) is enabled on your instance, the API login request with basic authentication (`username` and `password` ) returns an error. Contact ThoughtSpot Support for assistance. A successful login returns a session cookie that can be used in your subsequent API requests. + +### Parameters + +| Name | Type | +|------------- | ------------- | +| **loginRequest** | [**LoginRequest**](LoginRequest.md) + +### Return type + +null (empty response body) + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **204** | User login successful. | - | +| **400** | Invalid request. | - | +| **401** | Unauthorized access. | - | +| **403** | Forbidden access. | - | +| **500** | Unexpected error | - | + + +# **logout** +> logout() + + + + Version: 9.0.0.cl or later Logs out a user from their current session. + +### Parameters +This endpoint does not need any parameter. + +### Return type + +null (empty response body) + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **204** | User logout successful. | - | +| **400** | Invalid request. | - | +| **401** | Unauthorized access. | - | +| **403** | Forbidden access. | - | +| **500** | Unexpected error | - | + + +# **revokeToken** +> revokeToken(revokeTokenRequest) + + + + Version: 9.0.0.cl or later Revokes the authentication token issued for current user session. The token of your current session expires when you make a call to the `/api/rest/2.0/auth/token/revoke` endpoint. the users will not be able to access ThoughtSpot objects until a new token is obtained. To restart your session, request for a new token from ThoughtSpot. See [Get Full Access Token](#/http/api-endpoints/authentication/get-full-access-token). + +### Parameters + +| Name | Type | +|------------- | ------------- | +| **revokeTokenRequest** | [**RevokeTokenRequest**](RevokeTokenRequest.md) + +### Return type + +null (empty response body) + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **204** | Token successfully revoked. | - | +| **400** | Invalid request. | - | +| **401** | Unauthorized access. | - | +| **403** | Forbidden access. | - | +| **500** | Unexpected error | - | + + +# **searchAuthSettings** +> SearchAuthSettingsResponse searchAuthSettings(searchAuthSettingsRequest) + + + + Version: 26.6.0.cl or later Returns the authentication configuration for the specified auth type at cluster and org level. Currently supports `TRUSTED_AUTH`. #### Required privileges Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) or `CONTROL_TRUSTED_AUTH` (**Can Enable or Disable Trusted Authentication**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled, the `CONTROL_TRUSTED_AUTH` privilege is required. #### Usage guidelines Use `scope` to control which level of settings are returned: - `CLUSTER` — Returns cluster-level authentication status and access tokens. Accessible only from the Primary Org. - `ORG` — Returns org-level authentication status and access tokens for the current Org. Requires the per-Org authentication feature to be enabled on your instance. - If `scope` is omitted, both cluster and org-level settings are returned based on the caller's org context and feature availability. The `access_tokens` array in `cluster_preferences` or `org_preferences` is omitted when no token is configured at that level. **Note**: Access tokens returned in the response are sensitive credentials. Treat them with the same care as passwords. + +### Parameters + +| Name | Type | +|------------- | ------------- | +| **searchAuthSettingsRequest** | [**SearchAuthSettingsRequest**](SearchAuthSettingsRequest.md) + +### Return type + +[**SearchAuthSettingsResponse**](SearchAuthSettingsResponse.md) + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Authentication settings retrieved successfully. | - | +| **400** | Invalid request. | - | +| **401** | Unauthorized access. | - | +| **403** | Forbidden access. | - | +| **500** | Unexpected error | - | + + +# **validateToken** +> TokenValidationResponse validateToken(validateTokenRequest) + + + + Version: 9.12.0.cl or later Validates the authentication token specified in the API request. If your token is not valid, [Get a new token](#/http/api-endpoints/authentication/get-full-access-token). + +### Parameters + +| Name | Type | +|------------- | ------------- | +| **validateTokenRequest** | [**ValidateTokenRequest**](ValidateTokenRequest.md) + +### Return type + +[**TokenValidationResponse**](TokenValidationResponse.md) + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Token validation successful. | - | +| **400** | Invalid request. | - | +| **401** | Unauthorized access. | - | +| **403** | Forbidden access. | - | +| **500** | Unexpected error | - | + diff --git a/sdks/java/docs/AuthenticationInput.md b/sdks/java/docs/AuthenticationInput.md new file mode 100644 index 000000000..07746a4b6 --- /dev/null +++ b/sdks/java/docs/AuthenticationInput.md @@ -0,0 +1,21 @@ + + +# AuthenticationInput + +Authorization type for the custom action. + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**apIKey** | [**APIKeyInput**](APIKeyInput.md) | | [optional] | +|**basicAuth** | [**BasicAuthInput**](BasicAuthInput.md) | | [optional] | +|**bearerToken** | **String** | Bearer tokens enable requests to authenticate using an access key. | [optional] | +|**noAuth** | **String** | No authorization. If your request doesn't require authorization. | [optional] | + + +## Implemented Interfaces + +* Serializable + + diff --git a/sdks/java/docs/Author.md b/sdks/java/docs/Author.md new file mode 100644 index 000000000..c5d6cb350 --- /dev/null +++ b/sdks/java/docs/Author.md @@ -0,0 +1,19 @@ + + +# Author + +Author of the schedule. + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**id** | **String** | The unique identifier of the object. | | +|**name** | **String** | Name of the object. | | + + +## Implemented Interfaces + +* Serializable + + diff --git a/sdks/java/docs/AuthorMetadataTypeInput.md b/sdks/java/docs/AuthorMetadataTypeInput.md new file mode 100644 index 000000000..ed087d55f --- /dev/null +++ b/sdks/java/docs/AuthorMetadataTypeInput.md @@ -0,0 +1,30 @@ + + +# AuthorMetadataTypeInput + +MetadataType InputType used in Author API's + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**type** | [**TypeEnum**](#TypeEnum) | Type of metadata. Required if the name of the object is set as the identifier. This attribute is optional when the object GUID is specified as the identifier. | [optional] | +|**identifier** | **String** | Unique ID or name of the metadata object. | | + + + +## Enum: TypeEnum + +| Name | Value | +|---- | -----| +| LIVEBOARD | "LIVEBOARD" | +| ANSWER | "ANSWER" | +| LOGICAL_TABLE | "LOGICAL_TABLE" | +| CONNECTION | "CONNECTION" | + + +## Implemented Interfaces + +* Serializable + + diff --git a/sdks/java/docs/AuthorType.md b/sdks/java/docs/AuthorType.md new file mode 100644 index 000000000..38f72a40e --- /dev/null +++ b/sdks/java/docs/AuthorType.md @@ -0,0 +1,18 @@ + + +# AuthorType + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**email** | **String** | Email id of the committer | [optional] | +|**username** | **String** | Username of the committer | [optional] | + + +## Implemented Interfaces + +* Serializable + + diff --git a/sdks/java/docs/AwsS3Config.md b/sdks/java/docs/AwsS3Config.md new file mode 100644 index 000000000..6bb31080b --- /dev/null +++ b/sdks/java/docs/AwsS3Config.md @@ -0,0 +1,22 @@ + + +# AwsS3Config + +AWS S3 storage configuration details. + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**bucketName** | **String** | Name of the S3 bucket where webhook payloads are stored. | | +|**region** | **String** | AWS region where the S3 bucket is located. | | +|**roleArn** | **String** | ARN of the IAM role used for S3 access. | | +|**externalId** | **String** | External ID for secure cross-account role assumption. | [optional] | +|**pathPrefix** | **String** | Path prefix for organizing objects within the bucket. | [optional] | + + +## Implemented Interfaces + +* Serializable + + diff --git a/sdks/java/docs/AwsS3ConfigInput.md b/sdks/java/docs/AwsS3ConfigInput.md new file mode 100644 index 000000000..da29dd84f --- /dev/null +++ b/sdks/java/docs/AwsS3ConfigInput.md @@ -0,0 +1,22 @@ + + +# AwsS3ConfigInput + +Input type for AWS S3 storage configuration. + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**bucketName** | **String** | Name of the S3 bucket where webhook payloads will be stored. Example: \"my-webhook-files\" | | +|**region** | **String** | AWS region where the S3 bucket is located. Example: \"us-west-2\" | | +|**roleArn** | **String** | ARN of the IAM role to assume for S3 access. Example: \"arn:aws:iam::123456789012:role/ThoughtSpotDeliveryRole\" | | +|**externalId** | **String** | External ID for secure cross-account role assumption. Example: \"ts-webhook-a1b2c3d4-7890\" | [optional] | +|**pathPrefix** | **String** | Optional path prefix for organizing objects within the bucket. Example: \"thoughtspot-webhooks/\" | [optional] | + + +## Implemented Interfaces + +* Serializable + + diff --git a/sdks/java/docs/BasicAuth.md b/sdks/java/docs/BasicAuth.md new file mode 100644 index 000000000..4fe88490a --- /dev/null +++ b/sdks/java/docs/BasicAuth.md @@ -0,0 +1,19 @@ + + +# BasicAuth + +Basic Auth: Basic authentication involves sending a verified username and password with your request. + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**password** | **String** | Password for the basic authentication | [optional] | +|**username** | **String** | Username for the basic authentication | [optional] | + + +## Implemented Interfaces + +* Serializable + + diff --git a/sdks/java/docs/BasicAuthInput.md b/sdks/java/docs/BasicAuthInput.md new file mode 100644 index 000000000..197e3b35e --- /dev/null +++ b/sdks/java/docs/BasicAuthInput.md @@ -0,0 +1,19 @@ + + +# BasicAuthInput + +Basic Auth: Basic authentication involves sending a verified username and password with your request. + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**password** | **String** | Password for the basic authentication | [optional] | +|**username** | **String** | Username for the basic authentication | [optional] | + + +## Implemented Interfaces + +* Serializable + + diff --git a/sdks/java/docs/CALLBACK.md b/sdks/java/docs/CALLBACK.md new file mode 100644 index 000000000..fb84e325d --- /dev/null +++ b/sdks/java/docs/CALLBACK.md @@ -0,0 +1,18 @@ + + +# CALLBACK + +CALLBACK Custom Action Type + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**reference** | **String** | Reference name of the SDK. By default, the value will be set to action name. | [optional] | + + +## Implemented Interfaces + +* Serializable + + diff --git a/sdks/java/docs/CALLBACKInput.md b/sdks/java/docs/CALLBACKInput.md new file mode 100644 index 000000000..5439cf266 --- /dev/null +++ b/sdks/java/docs/CALLBACKInput.md @@ -0,0 +1,18 @@ + + +# CALLBACKInput + +CALLBACK Custom Action Type + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**reference** | **String** | Reference name. By default, the value will be set to action name. | [optional] | + + +## Implemented Interfaces + +* Serializable + + diff --git a/sdks/java/docs/CALLBACKInputMandatory.md b/sdks/java/docs/CALLBACKInputMandatory.md new file mode 100644 index 000000000..d4d4d4b46 --- /dev/null +++ b/sdks/java/docs/CALLBACKInputMandatory.md @@ -0,0 +1,18 @@ + + +# CALLBACKInputMandatory + +CALLBACK Custom Action Type + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**reference** | **String** | Reference name. By default, the value will be set to action name. | [optional] | + + +## Implemented Interfaces + +* Serializable + + diff --git a/sdks/java/docs/CalendarResponse.md b/sdks/java/docs/CalendarResponse.md new file mode 100644 index 000000000..1b49b2bb9 --- /dev/null +++ b/sdks/java/docs/CalendarResponse.md @@ -0,0 +1,23 @@ + + +# CalendarResponse + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**calendarName** | **String** | Name of the calendar | [optional] | +|**connectionName** | **String** | Name of the connection | [optional] | +|**dataWarehouseType** | **String** | Type of data warehouse | [optional] | +|**modificationTimeInMillis** | **String** | Last modification time in milliseconds | [optional] | +|**authorName** | **String** | Name of the author who created the calendar | [optional] | +|**connectionId** | **String** | Unique ID of the connection | [optional] | +|**calendarId** | **String** | Unique ID of the calendar | [optional] | + + +## Implemented Interfaces + +* Serializable + + diff --git a/sdks/java/docs/ChangeUserPasswordRequest.md b/sdks/java/docs/ChangeUserPasswordRequest.md new file mode 100644 index 000000000..42238f8c6 --- /dev/null +++ b/sdks/java/docs/ChangeUserPasswordRequest.md @@ -0,0 +1,19 @@ + + +# ChangeUserPasswordRequest + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**currentPassword** | **String** | Current password of the user. | | +|**newPassword** | **String** | New password for the user. | | +|**userIdentifier** | **String** | GUID or name of the user. | | + + +## Implemented Interfaces + +* Serializable + + diff --git a/sdks/java/docs/ChannelHistoryEventInfo.md b/sdks/java/docs/ChannelHistoryEventInfo.md new file mode 100644 index 000000000..fa27d9263 --- /dev/null +++ b/sdks/java/docs/ChannelHistoryEventInfo.md @@ -0,0 +1,29 @@ + + +# ChannelHistoryEventInfo + +Event metadata for the triggering event associated with a job. + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**type** | [**TypeEnum**](#TypeEnum) | Type of the event. | | +|**id** | **String** | Unique ID of the event. | | +|**name** | **String** | Name of the event. | [optional] | +|**runId** | **String** | Unique run ID for this event execution. | [optional] | + + + +## Enum: TypeEnum + +| Name | Value | +|---- | -----| +| LIVEBOARD_SCHEDULE | "LIVEBOARD_SCHEDULE" | + + +## Implemented Interfaces + +* Serializable + + diff --git a/sdks/java/docs/ChannelHistoryEventInput.md b/sdks/java/docs/ChannelHistoryEventInput.md new file mode 100644 index 000000000..3d7044a0f --- /dev/null +++ b/sdks/java/docs/ChannelHistoryEventInput.md @@ -0,0 +1,27 @@ + + +# ChannelHistoryEventInput + +Event specification for channel history search. + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**type** | [**TypeEnum**](#TypeEnum) | Type of the event. | | +|**identifier** | **String** | Unique ID or name of the event. | [optional] | + + + +## Enum: TypeEnum + +| Name | Value | +|---- | -----| +| LIVEBOARD_SCHEDULE | "LIVEBOARD_SCHEDULE" | + + +## Implemented Interfaces + +* Serializable + + diff --git a/sdks/java/docs/ChannelHistoryJob.md b/sdks/java/docs/ChannelHistoryJob.md new file mode 100644 index 000000000..94497bb59 --- /dev/null +++ b/sdks/java/docs/ChannelHistoryJob.md @@ -0,0 +1,35 @@ + + +# ChannelHistoryJob + +A single job execution record for a channel. + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**id** | **String** | Unique identifier for this job. | | +|**status** | [**StatusEnum**](#StatusEnum) | Delivery status of this job. | | +|**creationTimeInMillis** | **Float** | Timestamp when this job was created (epoch milliseconds). | | +|**event** | [**ChannelHistoryEventInfo**](ChannelHistoryEventInfo.md) | | [optional] | +|**recipients** | [**List<JobRecipient>**](JobRecipient.md) | The users, groups or external recipients for this job. | [optional] | +|**detail** | **String** | Additional delivery details such as HTTP response code or error message. | [optional] | +|**tryCount** | **Integer** | Number of attempts made. 1 indicates first attempt. | [optional] | + + + +## Enum: StatusEnum + +| Name | Value | +|---- | -----| +| PENDING | "PENDING" | +| RETRY | "RETRY" | +| SUCCESS | "SUCCESS" | +| FAILED | "FAILED" | + + +## Implemented Interfaces + +* Serializable + + diff --git a/sdks/java/docs/ChannelValidationAwsS3Info.md b/sdks/java/docs/ChannelValidationAwsS3Info.md new file mode 100644 index 000000000..602a23de9 --- /dev/null +++ b/sdks/java/docs/ChannelValidationAwsS3Info.md @@ -0,0 +1,20 @@ + + +# ChannelValidationAwsS3Info + +AWS S3 storage information returned from a validation step. + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**bucketName** | **String** | Name of the S3 bucket. | [optional] | +|**fileName** | **String** | Name of the uploaded file. | [optional] | +|**objectKey** | **String** | Key of the object in S3 storage. | [optional] | + + +## Implemented Interfaces + +* Serializable + + diff --git a/sdks/java/docs/ChannelValidationDetail.md b/sdks/java/docs/ChannelValidationDetail.md new file mode 100644 index 000000000..e04917f0e --- /dev/null +++ b/sdks/java/docs/ChannelValidationDetail.md @@ -0,0 +1,40 @@ + + +# ChannelValidationDetail + +Validation detail result for a sub-step. + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**validationStep** | [**ValidationStepEnum**](#ValidationStepEnum) | The validation step that was performed. | | +|**status** | [**StatusEnum**](#StatusEnum) | Status of this validation step. | | +|**httpStatus** | **Integer** | HTTP status code returned by the channel (if applicable). | [optional] | +|**errorMessage** | **String** | Error message from the channel or validation process. | [optional] | +|**awsS3Info** | [**ChannelValidationAwsS3Info**](ChannelValidationAwsS3Info.md) | | [optional] | + + + +## Enum: ValidationStepEnum + +| Name | Value | +|---- | -----| +| HTTP_CONNECTION_CHECK | "HTTP_CONNECTION_CHECK" | +| STORAGE_FILE_UPLOAD_CHECK | "STORAGE_FILE_UPLOAD_CHECK" | + + + +## Enum: StatusEnum + +| Name | Value | +|---- | -----| +| SUCCESS | "SUCCESS" | +| FAILED | "FAILED" | + + +## Implemented Interfaces + +* Serializable + + diff --git a/sdks/java/docs/ClusterNonEmbedAccess.md b/sdks/java/docs/ClusterNonEmbedAccess.md new file mode 100644 index 000000000..ed4986dac --- /dev/null +++ b/sdks/java/docs/ClusterNonEmbedAccess.md @@ -0,0 +1,19 @@ + + +# ClusterNonEmbedAccess + +Cluster-level non-embed access configuration. + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**blockFullAppAccess** | **Boolean** | Block full application access for non-embedded usage. | [optional] | +|**groupsWithAccess** | [**List<GroupInfo>**](GroupInfo.md) | Groups that have non-embed full app access. Only applicable when orgs feature is disabled. Use org_preferences when org feature is enabled. | [optional] | + + +## Implemented Interfaces + +* Serializable + + diff --git a/sdks/java/docs/ClusterNonEmbedAccessInput.md b/sdks/java/docs/ClusterNonEmbedAccessInput.md new file mode 100644 index 000000000..1aef00a43 --- /dev/null +++ b/sdks/java/docs/ClusterNonEmbedAccessInput.md @@ -0,0 +1,19 @@ + + +# ClusterNonEmbedAccessInput + +Input for cluster-level non-embed access configuration. + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**blockFullAppAccess** | **Boolean** | Block full application access for non-embedded usage. | [optional] | +|**groupsIdentifiersWithAccess** | **List<String>** | Group identifiers that are allowed non-embed full app access. Can only be set when orgs feature is disabled and block_full_app_access is true. | [optional] | + + +## Implemented Interfaces + +* Serializable + + diff --git a/sdks/java/docs/Collection.md b/sdks/java/docs/Collection.md new file mode 100644 index 000000000..f08e52742 --- /dev/null +++ b/sdks/java/docs/Collection.md @@ -0,0 +1,26 @@ + + +# Collection + +Response object for a collection. + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**id** | **String** | Unique identifier of the collection. | | +|**name** | **String** | Name of the collection. | | +|**description** | **String** | Description of the collection. | [optional] | +|**metadata** | [**List<CollectionMetadataItem>**](CollectionMetadataItem.md) | Metadata objects in the collection. | [optional] | +|**createdAt** | **String** | Creation timestamp in milliseconds. | [optional] | +|**updatedAt** | **String** | Last updated timestamp in milliseconds. | [optional] | +|**authorName** | **String** | Name of the author who created the collection. | [optional] | +|**authorId** | **String** | Unique identifier of the author. | [optional] | +|**org** | [**CollectionEntityIdentifier**](CollectionEntityIdentifier.md) | | [optional] | + + +## Implemented Interfaces + +* Serializable + + diff --git a/sdks/java/docs/CollectionDeleteResponse.md b/sdks/java/docs/CollectionDeleteResponse.md new file mode 100644 index 000000000..1bd5cdba5 --- /dev/null +++ b/sdks/java/docs/CollectionDeleteResponse.md @@ -0,0 +1,19 @@ + + +# CollectionDeleteResponse + +Response object for delete collection operation. + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**metadataDeleted** | [**List<CollectionDeleteTypeIdentifiers>**](CollectionDeleteTypeIdentifiers.md) | List of metadata objects that were successfully deleted. | [optional] | +|**metadataSkipped** | [**List<CollectionDeleteTypeIdentifiers>**](CollectionDeleteTypeIdentifiers.md) | List of metadata objects that were skipped during deletion. Objects may be skipped due to lack of permissions, dependencies, or other constraints. | [optional] | + + +## Implemented Interfaces + +* Serializable + + diff --git a/sdks/java/docs/CollectionDeleteTypeIdentifiers.md b/sdks/java/docs/CollectionDeleteTypeIdentifiers.md new file mode 100644 index 000000000..f7a9e81d9 --- /dev/null +++ b/sdks/java/docs/CollectionDeleteTypeIdentifiers.md @@ -0,0 +1,19 @@ + + +# CollectionDeleteTypeIdentifiers + +Group of metadata objects identified by type. + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**type** | **String** | Type of the metadata object (e.g., Collection, Worksheet, Table). | [optional] | +|**identifiers** | [**List<GenericInfo>**](GenericInfo.md) | List of metadata identifiers belonging to the given type. | [optional] | + + +## Implemented Interfaces + +* Serializable + + diff --git a/sdks/java/docs/CollectionEntityIdentifier.md b/sdks/java/docs/CollectionEntityIdentifier.md new file mode 100644 index 000000000..5c1355e61 --- /dev/null +++ b/sdks/java/docs/CollectionEntityIdentifier.md @@ -0,0 +1,19 @@ + + +# CollectionEntityIdentifier + +Entity identifier with name. + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**identifier** | **String** | Unique identifier of the entity. | [optional] | +|**name** | **String** | Name of the entity. | [optional] | + + +## Implemented Interfaces + +* Serializable + + diff --git a/sdks/java/docs/CollectionMetadataInput.md b/sdks/java/docs/CollectionMetadataInput.md new file mode 100644 index 000000000..a8333de04 --- /dev/null +++ b/sdks/java/docs/CollectionMetadataInput.md @@ -0,0 +1,30 @@ + + +# CollectionMetadataInput + +Input type for metadata to be added to a collection. + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**type** | [**TypeEnum**](#TypeEnum) | Type of metadata object. | | +|**identifiers** | **List<String>** | List of unique IDs or names of metadata objects. | | + + + +## Enum: TypeEnum + +| Name | Value | +|---- | -----| +| LIVEBOARD | "LIVEBOARD" | +| ANSWER | "ANSWER" | +| LOGICAL_TABLE | "LOGICAL_TABLE" | +| COLLECTION | "COLLECTION" | + + +## Implemented Interfaces + +* Serializable + + diff --git a/sdks/java/docs/CollectionMetadataItem.md b/sdks/java/docs/CollectionMetadataItem.md new file mode 100644 index 000000000..d083e1459 --- /dev/null +++ b/sdks/java/docs/CollectionMetadataItem.md @@ -0,0 +1,19 @@ + + +# CollectionMetadataItem + +Metadata item in a collection response. + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**type** | **String** | Type of the metadata object. | [optional] | +|**identifiers** | [**List<CollectionEntityIdentifier>**](CollectionEntityIdentifier.md) | List of identifiers for this metadata type. | [optional] | + + +## Implemented Interfaces + +* Serializable + + diff --git a/sdks/java/docs/CollectionSearchResponse.md b/sdks/java/docs/CollectionSearchResponse.md new file mode 100644 index 000000000..a07eabba3 --- /dev/null +++ b/sdks/java/docs/CollectionSearchResponse.md @@ -0,0 +1,22 @@ + + +# CollectionSearchResponse + +Response object for search collections operation. + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**collections** | [**List<Collection>**](Collection.md) | List of collections matching the search criteria. | | +|**recordOffset** | **Integer** | The starting record number from where the records are included. | [optional] | +|**recordSize** | **Integer** | The number of records returned. | [optional] | +|**isLastBatch** | **Boolean** | Indicates if this is the last batch of results. | [optional] | +|**count** | **Integer** | Total count of records returned. | [optional] | + + +## Implemented Interfaces + +* Serializable + + diff --git a/sdks/java/docs/CollectionsApi.md b/sdks/java/docs/CollectionsApi.md new file mode 100644 index 000000000..07c6619d1 --- /dev/null +++ b/sdks/java/docs/CollectionsApi.md @@ -0,0 +1,159 @@ +# CollectionsApi + +All URIs are relative to *CLUSTER_URL* + +| Method | HTTP request | +|------------- | ------------- | +| [**createCollection**](CollectionsApi.md#createCollection) | **POST** /api/rest/2.0/collections/create | +| [**deleteCollection**](CollectionsApi.md#deleteCollection) | **POST** /api/rest/2.0/collections/delete | +| [**searchCollections**](CollectionsApi.md#searchCollections) | **POST** /api/rest/2.0/collections/search | +| [**updateCollection**](CollectionsApi.md#updateCollection) | **POST** /api/rest/2.0/collections/{collection_identifier}/update | + + + +# **createCollection** +> Collection createCollection(createCollectionRequest) + + + + Version: 26.4.0.cl or later Creates a new collection in ThoughtSpot. Collections allow you to organize and group related metadata objects such as Liveboards, Answers, worksheets, and other data objects. You can also create nested collections (sub-collections) to build a hierarchical structure. #### Supported operations The API endpoint lets you perform the following operations: * Create a new collection * Add metadata objects (Liveboards, Answers, Logical Tables) to the collection * Create nested collections by adding sub-collections + +### Parameters + +| Name | Type | +|------------- | ------------- | +| **createCollectionRequest** | [**CreateCollectionRequest**](CreateCollectionRequest.md) + +### Return type + +[**Collection**](Collection.md) + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Collection created successfully | - | +| **400** | Invalid request. | - | +| **401** | Unauthorized access. | - | +| **403** | Forbidden access. | - | +| **500** | Unexpected error | - | + + +# **deleteCollection** +> CollectionDeleteResponse deleteCollection(deleteCollectionRequest) + + + + Version: 26.4.0.cl or later Deletes one or more collections from ThoughtSpot. #### Delete options * **delete_children**: When set to `true`, deletes the child objects (metadata items) within the collection that the user has access to. Objects that the user does not have permission to delete will be skipped. * **dry_run**: When set to `true`, performs a preview of the deletion operation without actually deleting anything. The response shows what would be deleted, allowing you to review before committing the deletion. #### Response The response includes: * **metadata_deleted**: List of metadata objects that were successfully deleted * **metadata_skipped**: List of metadata objects that were skipped due to lack of permissions or other constraints + +### Parameters + +| Name | Type | +|------------- | ------------- | +| **deleteCollectionRequest** | [**DeleteCollectionRequest**](DeleteCollectionRequest.md) + +### Return type + +[**CollectionDeleteResponse**](CollectionDeleteResponse.md) + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Collections deleted successfully. | - | +| **400** | Invalid request. | - | +| **401** | Unauthorized access. | - | +| **403** | Forbidden access. | - | +| **404** | Resource not found. | - | +| **500** | Unexpected error | - | + + +# **searchCollections** +> CollectionSearchResponse searchCollections(searchCollectionsRequest) + + + + Version: 26.4.0.cl or later Gets a list of collections available in ThoughtSpot. To get details of a specific collection, specify the collection GUID or name. You can also filter the API response based on the collection name pattern, author, and other criteria. #### Search options * **name_pattern**: Use '%' as a wildcard character to match collection names * **collection_identifiers**: Search for specific collections by their GUIDs or names * **include_metadata**: When set to `true`, includes the metadata objects within each collection in the response **NOTE**: If the API returns an empty list, consider increasing the value of the `record_size` parameter. To search across all available collections, set `record_size` to `-1`. + +### Parameters + +| Name | Type | +|------------- | ------------- | +| **searchCollectionsRequest** | [**SearchCollectionsRequest**](SearchCollectionsRequest.md) + +### Return type + +[**CollectionSearchResponse**](CollectionSearchResponse.md) + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Successfully retrieved list of collections | - | +| **400** | Invalid request. | - | +| **401** | Unauthorized access. | - | +| **403** | Forbidden access. | - | +| **500** | Unexpected error | - | + + +# **updateCollection** +> updateCollection(collectionIdentifier, updateCollectionRequest) + + + + Version: 26.4.0.cl or later Updates an existing collection in ThoughtSpot. #### Supported operations This API endpoint lets you perform the following operations: * Update collection name and description * Change visibility settings * Add metadata objects to the collection (operation: ADD) * Remove metadata objects from the collection (operation: REMOVE) * Replace all metadata objects in the collection (operation: REPLACE) #### Operation types * **ADD**: Adds the specified metadata objects to the existing collection without removing current items * **REMOVE**: Removes only the specified metadata objects from the collection * **REPLACE**: Replaces all existing metadata objects with the specified items (default behavior) + +### Parameters + +| Name | Type | +|------------- | ------------- | +| **collectionIdentifier** | **String** +| **updateCollectionRequest** | [**UpdateCollectionRequest**](UpdateCollectionRequest.md) + +### Return type + +null (empty response body) + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **204** | Collection updated successfully. No content returned. | - | +| **400** | Invalid request. | - | +| **401** | Unauthorized access. | - | +| **403** | Forbidden access. | - | +| **404** | Resource not found. | - | +| **500** | Unexpected error | - | + diff --git a/sdks/java/docs/Column.md b/sdks/java/docs/Column.md new file mode 100644 index 000000000..78fb731d5 --- /dev/null +++ b/sdks/java/docs/Column.md @@ -0,0 +1,22 @@ + + +# Column + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**name** | **String** | Name of the column | | +|**dataType** | **String** | Data type of the column | | +|**isAggregate** | **String** | Determines if the column schema is an aggregate | [optional] | +|**canImport** | **Boolean** | Determines if the column schema can be imported | [optional] | +|**selected** | **Boolean** | Determines if the table is selected | [optional] | +|**isLinkedActive** | **Boolean** | Determines if the table is linked | [optional] | + + +## Implemented Interfaces + +* Serializable + + diff --git a/sdks/java/docs/ColumnSecurityRule.md b/sdks/java/docs/ColumnSecurityRule.md new file mode 100644 index 000000000..ee9fdfd05 --- /dev/null +++ b/sdks/java/docs/ColumnSecurityRule.md @@ -0,0 +1,19 @@ + + +# ColumnSecurityRule + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**column** | [**ColumnSecurityRuleColumn**](ColumnSecurityRuleColumn.md) | | | +|**groups** | [**List<ColumnSecurityRuleGroup>**](ColumnSecurityRuleGroup.md) | Array of groups that have access to this column | [optional] | +|**sourceTableDetails** | [**ColumnSecurityRuleSourceTable**](ColumnSecurityRuleSourceTable.md) | | [optional] | + + +## Implemented Interfaces + +* Serializable + + diff --git a/sdks/java/docs/ColumnSecurityRuleColumn.md b/sdks/java/docs/ColumnSecurityRuleColumn.md new file mode 100644 index 000000000..e66235801 --- /dev/null +++ b/sdks/java/docs/ColumnSecurityRuleColumn.md @@ -0,0 +1,18 @@ + + +# ColumnSecurityRuleColumn + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**id** | **String** | The unique identifier of the column | | +|**name** | **String** | The name of the column | | + + +## Implemented Interfaces + +* Serializable + + diff --git a/sdks/java/docs/ColumnSecurityRuleGroup.md b/sdks/java/docs/ColumnSecurityRuleGroup.md new file mode 100644 index 000000000..3df8cd1f1 --- /dev/null +++ b/sdks/java/docs/ColumnSecurityRuleGroup.md @@ -0,0 +1,18 @@ + + +# ColumnSecurityRuleGroup + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**id** | **String** | The unique identifier of the group | | +|**name** | **String** | The name of the group | | + + +## Implemented Interfaces + +* Serializable + + diff --git a/sdks/java/docs/ColumnSecurityRuleGroupOperation.md b/sdks/java/docs/ColumnSecurityRuleGroupOperation.md new file mode 100644 index 000000000..90809b3aa --- /dev/null +++ b/sdks/java/docs/ColumnSecurityRuleGroupOperation.md @@ -0,0 +1,28 @@ + + +# ColumnSecurityRuleGroupOperation + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**operation** | [**OperationEnum**](#OperationEnum) | Type of operation to be performed on the groups | | +|**groupIdentifiers** | **List<String>** | Array of group identifiers (name or GUID) on which the operation will be performed | | + + + +## Enum: OperationEnum + +| Name | Value | +|---- | -----| +| ADD | "ADD" | +| REMOVE | "REMOVE" | +| REPLACE | "REPLACE" | + + +## Implemented Interfaces + +* Serializable + + diff --git a/sdks/java/docs/ColumnSecurityRuleResponse.md b/sdks/java/docs/ColumnSecurityRuleResponse.md new file mode 100644 index 000000000..6e79864f0 --- /dev/null +++ b/sdks/java/docs/ColumnSecurityRuleResponse.md @@ -0,0 +1,19 @@ + + +# ColumnSecurityRuleResponse + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**tableGuid** | **String** | GUID of the table for which the column security rules are fetched | [optional] | +|**objId** | **String** | Object ID of the table for which the column security rules are fetched | [optional] | +|**columnSecurityRules** | [**List<ColumnSecurityRule>**](ColumnSecurityRule.md) | Array containing column security rule objects | [optional] | + + +## Implemented Interfaces + +* Serializable + + diff --git a/sdks/java/docs/ColumnSecurityRuleSourceTable.md b/sdks/java/docs/ColumnSecurityRuleSourceTable.md new file mode 100644 index 000000000..cd4543fc9 --- /dev/null +++ b/sdks/java/docs/ColumnSecurityRuleSourceTable.md @@ -0,0 +1,18 @@ + + +# ColumnSecurityRuleSourceTable + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**id** | **String** | The unique identifier of the source table | | +|**name** | **String** | The name of the source table | | + + +## Implemented Interfaces + +* Serializable + + diff --git a/sdks/java/docs/ColumnSecurityRuleTableInput.md b/sdks/java/docs/ColumnSecurityRuleTableInput.md new file mode 100644 index 000000000..f0b8221d8 --- /dev/null +++ b/sdks/java/docs/ColumnSecurityRuleTableInput.md @@ -0,0 +1,18 @@ + + +# ColumnSecurityRuleTableInput + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**identifier** | **String** | Name or GUID of the table | [optional] | +|**objIdentifier** | **String** | Object ID of the table | [optional] | + + +## Implemented Interfaces + +* Serializable + + diff --git a/sdks/java/docs/ColumnSecurityRuleUpdate.md b/sdks/java/docs/ColumnSecurityRuleUpdate.md new file mode 100644 index 000000000..ae628032f --- /dev/null +++ b/sdks/java/docs/ColumnSecurityRuleUpdate.md @@ -0,0 +1,19 @@ + + +# ColumnSecurityRuleUpdate + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**columnIdentifier** | **String** | Column identifier (col_id or name) | | +|**isUnsecured** | **Boolean** | If true, the column will be marked as unprotected and all groups associated with it will be removed | [optional] | +|**groupAccess** | [**List<ColumnSecurityRuleGroupOperation>**](ColumnSecurityRuleGroupOperation.md) | Array of group operation objects that specifies the actions for groups to be associated with a column | [optional] | + + +## Implemented Interfaces + +* Serializable + + diff --git a/sdks/java/docs/CommitBranchRequest.md b/sdks/java/docs/CommitBranchRequest.md new file mode 100644 index 000000000..151c7b954 --- /dev/null +++ b/sdks/java/docs/CommitBranchRequest.md @@ -0,0 +1,20 @@ + + +# CommitBranchRequest + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**metadata** | [**List<MetadataObject>**](MetadataObject.md) | Metadata objects. | | +|**deleteAware** | **Boolean** | Delete the tml files from version control repo if it does not exist in the ThoughSpot instance | [optional] | +|**branchName** | **String** | Name of the remote branch where object should be pushed Note: If no branch_name is specified, then the commit_branch_name will be considered. | [optional] | +|**comment** | **String** | Comment to be added to the commit | | + + +## Implemented Interfaces + +* Serializable + + diff --git a/sdks/java/docs/CommitFileType.md b/sdks/java/docs/CommitFileType.md new file mode 100644 index 000000000..0f87e4bbe --- /dev/null +++ b/sdks/java/docs/CommitFileType.md @@ -0,0 +1,19 @@ + + +# CommitFileType + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**fileName** | **String** | Name of the file deployed | | +|**statusCode** | **String** | Indicates the status of deployment for the file | | +|**statusMessage** | **String** | Any error or warning with the deployment | [optional] | + + +## Implemented Interfaces + +* Serializable + + diff --git a/sdks/java/docs/CommitHistoryResponse.md b/sdks/java/docs/CommitHistoryResponse.md new file mode 100644 index 000000000..61f394747 --- /dev/null +++ b/sdks/java/docs/CommitHistoryResponse.md @@ -0,0 +1,22 @@ + + +# CommitHistoryResponse + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**committer** | [**CommiterType**](CommiterType.md) | | | +|**author** | [**AuthorType**](AuthorType.md) | | | +|**comment** | **String** | Comments associated with the commit | | +|**commitTime** | **String** | Time at which the changes were committed. | | +|**commitId** | **String** | SHA id associated with the commit | | +|**branch** | **String** | Branch where changes were committed | | + + +## Implemented Interfaces + +* Serializable + + diff --git a/sdks/java/docs/CommitResponse.md b/sdks/java/docs/CommitResponse.md new file mode 100644 index 000000000..bebf88352 --- /dev/null +++ b/sdks/java/docs/CommitResponse.md @@ -0,0 +1,23 @@ + + +# CommitResponse + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**committer** | [**CommiterType**](CommiterType.md) | | [optional] | +|**author** | [**AuthorType**](AuthorType.md) | | [optional] | +|**comment** | **String** | Comments associated with the commit | [optional] | +|**commitTime** | **String** | Time at which the changes were committed. | [optional] | +|**commitId** | **String** | SHA id associated with the commit | [optional] | +|**branch** | **String** | Branch where changes were committed | [optional] | +|**committedFiles** | [**List<CommitFileType>**](CommitFileType.md) | Files that were pushed as part of this commit | [optional] | + + +## Implemented Interfaces + +* Serializable + + diff --git a/sdks/java/docs/CommiterType.md b/sdks/java/docs/CommiterType.md new file mode 100644 index 000000000..f8a3b8f79 --- /dev/null +++ b/sdks/java/docs/CommiterType.md @@ -0,0 +1,18 @@ + + +# CommiterType + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**email** | **String** | Email id of the committer | [optional] | +|**username** | **String** | Username of the committer | [optional] | + + +## Implemented Interfaces + +* Serializable + + diff --git a/sdks/java/docs/CommunicationChannelPreferencesResponse.md b/sdks/java/docs/CommunicationChannelPreferencesResponse.md new file mode 100644 index 000000000..1760d0312 --- /dev/null +++ b/sdks/java/docs/CommunicationChannelPreferencesResponse.md @@ -0,0 +1,18 @@ + + +# CommunicationChannelPreferencesResponse + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**clusterPreferences** | [**List<EventChannelConfig>**](EventChannelConfig.md) | Cluster-level default configurations. | [optional] | +|**orgPreferences** | [**List<OrgChannelConfigResponse>**](OrgChannelConfigResponse.md) | Org-specific configurations. | [optional] | + + +## Implemented Interfaces + +* Serializable + + diff --git a/sdks/java/docs/CommunicationChannelValidateResponse.md b/sdks/java/docs/CommunicationChannelValidateResponse.md new file mode 100644 index 000000000..aff309088 --- /dev/null +++ b/sdks/java/docs/CommunicationChannelValidateResponse.md @@ -0,0 +1,50 @@ + + +# CommunicationChannelValidateResponse + +Response containing validation results for communication channel configuration. + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**channelType** | [**ChannelTypeEnum**](#ChannelTypeEnum) | Type of communication channel that was validated. | | +|**channelId** | **String** | ID of the communication channel (e.g., webhook_id). | | +|**channelName** | **String** | Name of the communication channel (e.g., webhook name). | [optional] | +|**eventType** | [**EventTypeEnum**](#EventTypeEnum) | Event type that was validated. | | +|**jobId** | **String** | Unique Job Id of the validation. | | +|**resultCode** | [**ResultCodeEnum**](#ResultCodeEnum) | Overall result of the validation. | | +|**details** | [**List<ChannelValidationDetail>**](ChannelValidationDetail.md) | Detailed results of various validation sub-steps. | [optional] | + + + +## Enum: ChannelTypeEnum + +| Name | Value | +|---- | -----| +| WEBHOOK | "WEBHOOK" | + + + +## Enum: EventTypeEnum + +| Name | Value | +|---- | -----| +| LIVEBOARD_SCHEDULE | "LIVEBOARD_SCHEDULE" | + + + +## Enum: ResultCodeEnum + +| Name | Value | +|---- | -----| +| SUCCESS | "SUCCESS" | +| FAILED | "FAILED" | +| PARTIAL_SUCCESS | "PARTIAL_SUCCESS" | + + +## Implemented Interfaces + +* Serializable + + diff --git a/sdks/java/docs/ConfigureAuthSettingsRequest.md b/sdks/java/docs/ConfigureAuthSettingsRequest.md new file mode 100644 index 000000000..055e5174b --- /dev/null +++ b/sdks/java/docs/ConfigureAuthSettingsRequest.md @@ -0,0 +1,27 @@ + + +# ConfigureAuthSettingsRequest + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**authType** | [**AuthTypeEnum**](#AuthTypeEnum) | Type of authentication mechanism to configure. Currently supports TRUSTED_AUTH. | | +|**clusterPreferences** | [**AuthClusterPreferencesInput**](AuthClusterPreferencesInput.md) | Cluster-level authentication preferences. Omit to leave the existing cluster setting unchanged. | [optional] | +|**orgPreferences** | [**List<AuthOrgPreferenceInput>**](AuthOrgPreferenceInput.md) | Org-level authentication preferences. Each entry identifies an org and the desired status. Omit to leave existing org settings unchanged. | [optional] | + + + +## Enum: AuthTypeEnum + +| Name | Value | +|---- | -----| +| TRUSTED_AUTH | "TRUSTED_AUTH" | + + +## Implemented Interfaces + +* Serializable + + diff --git a/sdks/java/docs/ConfigureCommunicationChannelPreferencesRequest.md b/sdks/java/docs/ConfigureCommunicationChannelPreferencesRequest.md new file mode 100644 index 000000000..e98175e00 --- /dev/null +++ b/sdks/java/docs/ConfigureCommunicationChannelPreferencesRequest.md @@ -0,0 +1,18 @@ + + +# ConfigureCommunicationChannelPreferencesRequest + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**clusterPreferences** | [**List<EventChannelConfigInput>**](EventChannelConfigInput.md) | Cluster-level default configurations. | [optional] | +|**orgPreferences** | [**List<OrgChannelConfigInput>**](OrgChannelConfigInput.md) | Org-specific configurations. | [optional] | + + +## Implemented Interfaces + +* Serializable + + diff --git a/sdks/java/docs/ConfigureSecuritySettingsRequest.md b/sdks/java/docs/ConfigureSecuritySettingsRequest.md new file mode 100644 index 000000000..44426dd0a --- /dev/null +++ b/sdks/java/docs/ConfigureSecuritySettingsRequest.md @@ -0,0 +1,18 @@ + + +# ConfigureSecuritySettingsRequest + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**clusterPreferences** | [**SecuritySettingsClusterPreferencesInput**](SecuritySettingsClusterPreferencesInput.md) | Cluster-level security preferences. | [optional] | +|**orgPreferences** | [**List<SecuritySettingsOrgPreferencesInput>**](SecuritySettingsOrgPreferencesInput.md) | Org-level security preferences for the current org. | [optional] | + + +## Implemented Interfaces + +* Serializable + + diff --git a/sdks/java/docs/ConnectionConfigurationResponse.md b/sdks/java/docs/ConnectionConfigurationResponse.md new file mode 100644 index 000000000..f23a54b14 --- /dev/null +++ b/sdks/java/docs/ConnectionConfigurationResponse.md @@ -0,0 +1,87 @@ + + +# ConnectionConfigurationResponse + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**configurationIdentifier** | **String** | | [optional] | +|**name** | **String** | | [optional] | +|**description** | **String** | | [optional] | +|**_configuration** | **Object** | | [optional] | +|**policyPrincipals** | [**List<UserPrincipal>**](UserPrincipal.md) | | [optional] | +|**policyProcesses** | [**List<PolicyProcessesEnum>**](#List<PolicyProcessesEnum>) | | [optional] | +|**disabled** | **Boolean** | | [optional] | +|**dataWarehouseType** | [**DataWarehouseTypeEnum**](#DataWarehouseTypeEnum) | | [optional] | +|**policyType** | [**PolicyTypeEnum**](#PolicyTypeEnum) | | [optional] | +|**sameAsParent** | **Boolean** | | [optional] | +|**policyProcessOptions** | [**PolicyProcessOptions**](PolicyProcessOptions.md) | | [optional] | + + + +## Enum: List<PolicyProcessesEnum> + +| Name | Value | +|---- | -----| +| SAGE_INDEXING | "SAGE_INDEXING" | +| ROW_COUNT_STATS | "ROW_COUNT_STATS" | + + + +## Enum: DataWarehouseTypeEnum + +| Name | Value | +|---- | -----| +| SNOWFLAKE | "SNOWFLAKE" | +| AMAZON_REDSHIFT | "AMAZON_REDSHIFT" | +| GOOGLE_BIGQUERY | "GOOGLE_BIGQUERY" | +| AZURE_SYNAPSE | "AZURE_SYNAPSE" | +| TERADATA | "TERADATA" | +| SAP_HANA | "SAP_HANA" | +| STARBURST | "STARBURST" | +| ORACLE_ADW | "ORACLE_ADW" | +| DATABRICKS | "DATABRICKS" | +| DENODO | "DENODO" | +| DREMIO | "DREMIO" | +| TRINO | "TRINO" | +| PRESTO | "PRESTO" | +| POSTGRES | "POSTGRES" | +| SQLSERVER | "SQLSERVER" | +| MYSQL | "MYSQL" | +| GENERIC_JDBC | "GENERIC_JDBC" | +| AMAZON_RDS_POSTGRESQL | "AMAZON_RDS_POSTGRESQL" | +| AMAZON_AURORA_POSTGRESQL | "AMAZON_AURORA_POSTGRESQL" | +| AMAZON_RDS_MYSQL | "AMAZON_RDS_MYSQL" | +| AMAZON_AURORA_MYSQL | "AMAZON_AURORA_MYSQL" | +| LOOKER | "LOOKER" | +| AMAZON_ATHENA | "AMAZON_ATHENA" | +| SINGLESTORE | "SINGLESTORE" | +| GCP_SQLSERVER | "GCP_SQLSERVER" | +| GCP_ALLOYDB_POSTGRESQL | "GCP_ALLOYDB_POSTGRESQL" | +| GCP_POSTGRESQL | "GCP_POSTGRESQL" | +| GCP_MYSQL | "GCP_MYSQL" | +| MODE | "MODE" | +| GOOGLE_SHEETS | "GOOGLE_SHEETS" | +| FALCON | "FALCON" | +| FALCON_ONPREM | "FALCON_ONPREM" | +| CLICKHOUSE | "CLICKHOUSE" | +| IOMETE | "IOMETE" | + + + +## Enum: PolicyTypeEnum + +| Name | Value | +|---- | -----| +| NO_POLICY | "NO_POLICY" | +| PRINCIPALS | "PRINCIPALS" | +| PROCESSES | "PROCESSES" | + + +## Implemented Interfaces + +* Serializable + + diff --git a/sdks/java/docs/ConnectionConfigurationSearchRequest.md b/sdks/java/docs/ConnectionConfigurationSearchRequest.md new file mode 100644 index 000000000..df32bb1a2 --- /dev/null +++ b/sdks/java/docs/ConnectionConfigurationSearchRequest.md @@ -0,0 +1,29 @@ + + +# ConnectionConfigurationSearchRequest + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**connectionIdentifier** | **String** | Unique ID or name of the connection. | | +|**configurationIdentifier** | **String** | Unique ID or name of the configuration. | [optional] | +|**policyType** | [**PolicyTypeEnum**](#PolicyTypeEnum) | Type of policy. | [optional] | + + + +## Enum: PolicyTypeEnum + +| Name | Value | +|---- | -----| +| NO_POLICY | "NO_POLICY" | +| PRINCIPALS | "PRINCIPALS" | +| PROCESSES | "PROCESSES" | + + +## Implemented Interfaces + +* Serializable + + diff --git a/sdks/java/docs/ConnectionConfigurationsApi.md b/sdks/java/docs/ConnectionConfigurationsApi.md new file mode 100644 index 000000000..8ae911d60 --- /dev/null +++ b/sdks/java/docs/ConnectionConfigurationsApi.md @@ -0,0 +1,157 @@ +# ConnectionConfigurationsApi + +All URIs are relative to *CLUSTER_URL* + +| Method | HTTP request | +|------------- | ------------- | +| [**connectionConfigurationSearch**](ConnectionConfigurationsApi.md#connectionConfigurationSearch) | **POST** /api/rest/2.0/connection-configurations/search | +| [**createConnectionConfiguration**](ConnectionConfigurationsApi.md#createConnectionConfiguration) | **POST** /api/rest/2.0/connection-configurations/create | +| [**deleteConnectionConfiguration**](ConnectionConfigurationsApi.md#deleteConnectionConfiguration) | **POST** /api/rest/2.0/connection-configurations/delete | +| [**updateConnectionConfiguration**](ConnectionConfigurationsApi.md#updateConnectionConfiguration) | **POST** /api/rest/2.0/connection-configurations/{configuration_identifier}/update | + + + +# **connectionConfigurationSearch** +> List<ConnectionConfigurationResponse> connectionConfigurationSearch(connectionConfigurationSearchRequest) + + + + Version: 10.12.0.cl or later Gets connection configuration objects. Requires `DATAMANAGEMENT` (**Can manage data**) and edit permissions to the connection object, or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) privilege is required. #### Usage guidelines * To get a list of all configurations available in the ThoughtSpot system, send the API request with only the connection name or GUID in the request body. * To fetch details of a configuration object, specify the configuration object name or GUID. + +### Parameters + +| Name | Type | +|------------- | ------------- | +| **connectionConfigurationSearchRequest** | [**ConnectionConfigurationSearchRequest**](ConnectionConfigurationSearchRequest.md) + +### Return type + +[**List<ConnectionConfigurationResponse>**](ConnectionConfigurationResponse.md) + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Configuration fetched successfully. | - | +| **400** | Invalid request. | - | +| **401** | Unauthorized access. | - | +| **403** | Forbidden access. | - | +| **500** | Unexpected error | - | + + +# **createConnectionConfiguration** +> ConnectionConfigurationResponse createConnectionConfiguration(createConnectionConfigurationRequest) + + + + Version: 10.12.0.cl or later Creates an additional configuration to an existing connection to a data warehouse. Requires `DATAMANAGEMENT` (**Can manage data**) or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) privilege is required. #### Usage guidelines * A JSON map of configuration attributes in `configuration`. The following example shows the configuration attributes: ``` { \"user\":\"DEV_USER\", \"password\":\"TestConn123\", \"role\":\"DEV\", \"warehouse\":\"DEV_WH\" } ``` * If the `policy_type` is `PRINCIPALS`, then `policy_principals` is a required field. * If the `policy_type` is `PROCESSES`, then `policy_processes` is a required field. * If the `policy_type` is `NO_POLICY`, then `policy_principals` and `policy_processes` are not required fields. #### Parameterized Connection Support For parameterized connections that use OAuth authentication, only the same_as_parent and policy_process_options attributes are allowed in the API request. These attributes are not applicable to connections that are not parameterized. + +### Parameters + +| Name | Type | +|------------- | ------------- | +| **createConnectionConfigurationRequest** | [**CreateConnectionConfigurationRequest**](CreateConnectionConfigurationRequest.md) + +### Return type + +[**ConnectionConfigurationResponse**](ConnectionConfigurationResponse.md) + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Connection configuration successfully created. | - | +| **400** | Invalid request. | - | +| **401** | Unauthorized access. | - | +| **403** | Forbidden access. | - | +| **500** | Unexpected error | - | + + +# **deleteConnectionConfiguration** +> deleteConnectionConfiguration(deleteConnectionConfigurationRequest) + + + + Version: 10.12.0.cl or later Deletes connection configuration objects. Requires `DATAMANAGEMENT` (**Can manage data**) and edit permissions to the connection object, or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) privilege is required. + +### Parameters + +| Name | Type | +|------------- | ------------- | +| **deleteConnectionConfigurationRequest** | [**DeleteConnectionConfigurationRequest**](DeleteConnectionConfigurationRequest.md) + +### Return type + +null (empty response body) + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **204** | Connection Configurations successfully deleted. | - | +| **400** | Invalid request. | - | +| **401** | Unauthorized access. | - | +| **403** | Forbidden access. | - | +| **500** | Unexpected error | - | + + +# **updateConnectionConfiguration** +> updateConnectionConfiguration(configurationIdentifier, updateConnectionConfigurationRequest) + + + + Version: 10.12.0.cl or later Updates a connection configuration object. Requires `DATAMANAGEMENT` (**Can manage data**) and edit permissions to the connection object, or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) privilege is required. #### Supported operations This API endpoint lets you perform the following operations in a single API request: * Edit the name or description of the configuration * Edit the configuration properties * Edit the `policy_type` * Edit the type of authentication * Enable or disable a configuration #### Parameterized Connection Support For parameterized oauth based connections, only the `same_as_parent` and `policy_process_options` attributes are allowed. These attributes are not applicable to connections that are not parameterized. **NOTE**: When updating a configuration where `disabled` is `true`, you must reset `disabled` to `true` in your update request payload. If not explicitly set again, the API will default `disabled` to `false`. + +### Parameters + +| Name | Type | +|------------- | ------------- | +| **configurationIdentifier** | **String** +| **updateConnectionConfigurationRequest** | [**UpdateConnectionConfigurationRequest**](UpdateConnectionConfigurationRequest.md) + +### Return type + +null (empty response body) + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **204** | Connection configuration successfully updated. | - | +| **400** | Invalid request. | - | +| **401** | Unauthorized access. | - | +| **403** | Forbidden access. | - | +| **500** | Unexpected error | - | + diff --git a/sdks/java/docs/ConnectionInput.md b/sdks/java/docs/ConnectionInput.md new file mode 100644 index 000000000..b3d3d355b --- /dev/null +++ b/sdks/java/docs/ConnectionInput.md @@ -0,0 +1,19 @@ + + +# ConnectionInput + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**identifier** | **String** | Unique ID or name of the connection. | [optional] | +|**namePattern** | **String** | A pattern to match case-insensitive name of the connection object. User `%` for a wildcard match. | [optional] | +|**dataWarehouseObjects** | [**List<DataWarehouseObjectInput>**](DataWarehouseObjectInput.md) | Filter options for databases, schemas, tables and columns. | [optional] | + + +## Implemented Interfaces + +* Serializable + + diff --git a/sdks/java/docs/ConnectionsApi.md b/sdks/java/docs/ConnectionsApi.md new file mode 100644 index 000000000..9c4beb222 --- /dev/null +++ b/sdks/java/docs/ConnectionsApi.md @@ -0,0 +1,423 @@ +# ConnectionsApi + +All URIs are relative to *CLUSTER_URL* + +| Method | HTTP request | +|------------- | ------------- | +| [**createConnection**](ConnectionsApi.md#createConnection) | **POST** /api/rest/2.0/connection/create | +| [**deleteConnection**](ConnectionsApi.md#deleteConnection) | **POST** /api/rest/2.0/connection/delete | +| [**deleteConnectionV2**](ConnectionsApi.md#deleteConnectionV2) | **POST** /api/rest/2.0/connections/{connection_identifier}/delete | +| [**downloadConnectionMetadataChanges**](ConnectionsApi.md#downloadConnectionMetadataChanges) | **POST** /api/rest/2.0/connections/download-connection-metadata-changes/{connection_identifier} | +| [**fetchConnectionDiffStatus**](ConnectionsApi.md#fetchConnectionDiffStatus) | **POST** /api/rest/2.0/connections/fetch-connection-diff-status/{connection_identifier} | +| [**revokeRefreshTokens**](ConnectionsApi.md#revokeRefreshTokens) | **POST** /api/rest/2.0/connections/{connection_identifier}/revoke-refresh-tokens | +| [**searchConnection**](ConnectionsApi.md#searchConnection) | **POST** /api/rest/2.0/connection/search | +| [**syncMetadata**](ConnectionsApi.md#syncMetadata) | **POST** /api/rest/2.0/connections/{connection_identifier}/resync-metadata | +| [**updateConnection**](ConnectionsApi.md#updateConnection) | **POST** /api/rest/2.0/connection/update | +| [**updateConnectionStatus**](ConnectionsApi.md#updateConnectionStatus) | **POST** /api/rest/2.0/connections/{connection_identifier}/status | +| [**updateConnectionV2**](ConnectionsApi.md#updateConnectionV2) | **POST** /api/rest/2.0/connections/{connection_identifier}/update | + + + +# **createConnection** +> CreateConnectionResponse createConnection(createConnectionRequest) + + + + Version: 9.2.0.cl or later Creates a connection to a data warehouse for live query services. Requires `DATAMANAGEMENT` (**Can manage data**) or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) privilege is required. #### Create a connection without tables To create a connection without tables: 1. Pass these parameters in your API request. * Name of the connection. * Type of the data warehouse to connect to. * A JSON map of configuration attributes in `data_warehouse_config`. The following example shows the configuration attributes for a SnowFlake connection: ``` { \"configuration\":{ \"accountName\":\"thoughtspot_partner\", \"user\":\"tsadmin\", \"password\":\"TestConn123\", \"role\":\"sysadmin\", \"warehouse\":\"MEDIUM_WH\" }, \"authenticationType\": \"SERVICE_ACCOUNT\", \"externalDatabases\":[ ] } ``` 2. Set `validate` to `false`. **NOTE:** If the `authentication_type` is anything other than SERVICE_ACCOUNT, you must explicitly provide the authenticationType property in the payload. If you do not specify authenticationType, the API will default to SERVICE_ACCOUNT as the authentication type. #### Create a connection with tables If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) and `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` (**Can manage data models**) privilege is required. To create a connection with tables: 1. Pass these parameters in your API request. * Name of the connection. * Type of the data warehouse to connect to. * A JSON map of configuration attributes, database details, and table properties in `data_warehouse_config` as shown in the following example: ``` { \"configuration\":{ \"accountName\":\"thoughtspot_partner\", \"user\":\"tsadmin\", \"password\":\"TestConn123\", \"role\":\"sysadmin\", \"warehouse\":\"MEDIUM_WH\" }, \"authenticationType\": \"SERVICE_ACCOUNT\", \"externalDatabases\":[ { \"name\":\"AllDatatypes\", \"isAutoCreated\":false, \"schemas\":[ { \"name\":\"alldatatypes\", \"tables\":[ { \"name\":\"allDatatypes\", \"type\":\"TABLE\", \"description\":\"\", \"selected\":true, \"linked\":true, \"columns\":[ { \"name\":\"CNUMBER\", \"type\":\"INT64\", \"canImport\":true, \"selected\":true, \"isLinkedActive\":true, \"isImported\":false, \"tableName\":\"allDatatypes\", \"schemaName\":\"alldatatypes\", \"dbName\":\"AllDatatypes\" }, { \"name\":\"CDECIMAL\", \"type\":\"INT64\", \"canImport\":true, \"selected\":true, \"isLinkedActive\":true, \"isImported\":false, \"tableName\":\"allDatatypes\", \"schemaName\":\"alldatatypes\", \"dbName\":\"AllDatatypes\" } ] } ] } ] } ] } ``` 2. Set `validate` to `true`. **NOTE:** If the `authentication_type` is anything other than SERVICE_ACCOUNT, you must explicitly provide the authenticationType property in the payload. If you do not specify authenticationType, the API will default to SERVICE_ACCOUNT as the authentication type. + +### Parameters + +| Name | Type | +|------------- | ------------- | +| **createConnectionRequest** | [**CreateConnectionRequest**](CreateConnectionRequest.md) + +### Return type + +[**CreateConnectionResponse**](CreateConnectionResponse.md) + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Connection to the datasource successfully created. | - | +| **400** | Invalid request. | - | +| **401** | Unauthorized access. | - | +| **403** | Forbidden access. | - | +| **500** | Unexpected error | - | + + +# **deleteConnection** +> deleteConnection(deleteConnectionRequest) + + + + Version: 9.2.0.cl or later **Important**: This endpoint is deprecated and will be removed from ThoughtSpot in September 2025. ThoughtSpot strongly recommends using the [Delete Connection V2](#/http/api-endpoints/connections/delete-connection-v2) endpoint to delete your connection objects. #### Usage guidelines Deletes a connection object. Requires `DATAMANAGEMENT` (**Can manage data**) and edit permissions to the connection object, or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) privilege is required. **Note**: If a connection has dependent objects, make sure you remove its associations before the delete operation. + +### Parameters + +| Name | Type | +|------------- | ------------- | +| **deleteConnectionRequest** | [**DeleteConnectionRequest**](DeleteConnectionRequest.md) + +### Return type + +null (empty response body) + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **204** | Connection successfully deleted. | - | +| **400** | Invalid request. | - | +| **401** | Unauthorized access. | - | +| **403** | Forbidden access. | - | +| **500** | Unexpected error | - | + + +# **deleteConnectionV2** +> deleteConnectionV2(connectionIdentifier) + + + + Version: 10.4.0.cl or later Deletes a connection object. **Note**: If a connection has dependent objects, make sure you remove its associations before the delete operation. Requires `DATAMANAGEMENT` (**Can manage data**) and edit permissions to the connection object, or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) privilege is required. + +### Parameters + +| Name | Type | +|------------- | ------------- | +| **connectionIdentifier** | **String** + +### Return type + +null (empty response body) + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **204** | Connection successfully deleted. | - | +| **400** | Invalid request. | - | +| **401** | Unauthorized access. | - | +| **403** | Forbidden access. | - | +| **500** | Unexpected error | - | + + +# **downloadConnectionMetadataChanges** +> File downloadConnectionMetadataChanges(connectionIdentifier) + + + + Version: 9.9.0.cl or later Exports the difference in connection metadata between CDW and ThoughtSpot Requires `DATAMANAGEMENT` (**Can manage data**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the following Data control privileges may be required: - `CAN_MANAGE_CUSTOM_CALENDAR`(**Can manage custom calendars**) - `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) - `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` (**Can manage data models**) To download the connection metadata difference between ThoughtSpot and CDW, pass the connection GUID as `connection_identifier` in the API request. + +### Parameters + +| Name | Type | +|------------- | ------------- | +| **connectionIdentifier** | **String** + +### Return type + +[**File**](File.md) + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/octet-stream, application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Export metadata changes. | - | +| **400** | Invalid request. | - | +| **401** | Unauthorized access. | - | +| **403** | Forbidden access. | - | +| **500** | Unexpected error | - | + + +# **fetchConnectionDiffStatus** +> FetchConnectionDiffStatusResponse fetchConnectionDiffStatus(connectionIdentifier) + + + + Version: 9.9.0.cl or later Validates the difference in connection metadata between CDW and ThoughtSpot. Requires `DATAMANAGEMENT` (**Can manage data**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the following Data control privileges may be required: - `CAN_MANAGE_CUSTOM_CALENDAR`(**Can manage custom calendars**) - `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) - `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` (**Can manage data models**) Returns a boolean indicating whether there is any difference between the connection metadata at ThoughtSpot and CDW. To get the connection metadata difference status, pass the connection GUID as `connection_identifier` in the API request. + +### Parameters + +| Name | Type | +|------------- | ------------- | +| **connectionIdentifier** | **String** + +### Return type + +[**FetchConnectionDiffStatusResponse**](FetchConnectionDiffStatusResponse.md) + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | true/false | - | +| **400** | Invalid request. | - | +| **401** | Unauthorized access. | - | +| **403** | Forbidden access. | - | +| **500** | Unexpected error | - | + + +# **revokeRefreshTokens** +> RevokeRefreshTokensResponse revokeRefreshTokens(connectionIdentifier, revokeRefreshTokensRequest) + + + + Version: 26.2.0.cl or later Revokes OAuth refresh tokens for users who no longer require access to a data warehouse connection. When a token is revoked, the affected user's session for that connection is terminated, and they must re-authenticate to regain access. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) or `DATAMANAGEMENT` (**Can manage data**) privileges. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on the ThoughtSpot instance, users with `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) privilege can also make API requests to revoke tokens for connection users. #### Usage guidelines You can specify different combinations of identifiers to control which refresh tokens are revoked. - **connection_identifier**: Revokes refresh tokens for all users of the connection, except the connection author. - **connection_identifier** and **user_identifiers**: Revokes refresh tokens only for the users specified in the request. If the name or ID of the connection author is included in the request, their token will also be revoked. - **connection_identifier** and **configuration_identifiers**: Revokes refresh tokens for all users on the specified configurations, except the configuration author. - **connection_identifier**, **configuration_identifiers**, and **user_identifiers**: Revokes refresh tokens for the specified users on the specified configurations. - **connection_identifier** and **org_identifiers**: Revokes refresh tokens for the specified Orgs. Applicable only for published connections. - **connection_identifier**, **org_identifiers**, and **user_identifiers**: Revokes refresh tokens for the specified users in the specified Orgs. Applicable only for published connections. **NOTE**: The `org_identifiers` parameter is only applicable for published connections. Using this parameter for unpublished connections will result in an error. Ensure that the connections are published before making the API request. + +### Parameters + +| Name | Type | +|------------- | ------------- | +| **connectionIdentifier** | **String** +| **revokeRefreshTokensRequest** | [**RevokeRefreshTokensRequest**](RevokeRefreshTokensRequest.md) + +### Return type + +[**RevokeRefreshTokensResponse**](RevokeRefreshTokensResponse.md) + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Token(s) successfully revoked. | - | +| **400** | Invalid request. | - | +| **401** | Unauthorized access. | - | +| **403** | Forbidden access. | - | +| **404** | Object not found | - | +| **409** | Conflict | - | +| **500** | Unexpected error | - | + + +# **searchConnection** +> List<SearchConnectionResponse> searchConnection(searchConnectionRequest) + + + + Version: 9.2.0.cl or later Gets connection objects. Requires `DATAMANAGEMENT` (**Can manage data**) or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) privilege is required. - To get a list of all connections available in the ThoughtSpot system, send the API request without any attributes in the request body. - To get the connection objects for a specific type of data warehouse, specify the type in `data_warehouse_types`. - To fetch details of a connection object, specify the connection object GUID or name. The `name_pattern` attribute allows passing partial text with `%` for a wildcard match. - To get details of the database, schemas, tables, or columns from a data connection object, specify `data_warehouse_object_type`. - To get a specific database, schema, table, or column from a connection object, define the object type in `data_warehouse_object_type` and object properties in the `data_warehouse_objects` array. For example, to search for a column, you must pass the database, schema, and table names in the API request. Note that in the following example, object properties are set in a hierarchical order (`database` > `schema` > `table` > `column`). ``` { \"connections\": [ { \"identifier\": \"b9d1f2ef-fa65-4a4b-994e-30fa2d57b0c2\", \"data_warehouse_objects\": [ { \"database\": \"NEBULADEV\", \"schema\": \"INFORMATION_SCHEMA\", \"table\": \"APPLICABLE_ROLES\", \"column\": \"ROLE_NAME\" } ] } ], \"data_warehouse_object_type\": \"COLUMN\" } ``` - To fetch data by `configuration`, specify `data_warehouse_object_type`. For example, to fetch columns from the `DEVELOPMENT` database, specify the `data_warehouse_object_type` as `DATABASE` and define the `configuration` string as `{\"database\":\"DEVELOPMENT\"}`. To get column data for a specific table, specify the table, for example,`{\"database\":\"RETAILAPPAREL\",\"table\":\"PIPES\"}`. - To query connections by `authentication_type`, specify `data_warehouse_object_type`. Supported values for `authentication_type` are: - `SERVICE_ACCOUNT`: For connections that require service account credentials to authenticate to the Cloud Data Warehouse and fetch data. - `OAUTH`: For connections that require OAuth credentials to authenticate to the Cloud Data Warehouse and fetch data. Teradata, Oracle, and Presto Cloud Data Warehouses do not support the OAuth authentication type. - `IAM`: For connections that have the IAM OAuth set up. This authentication type is supported on Amazon Redshift connections only. - `EXTOAUTH`: For connections that have External OAuth set up. ThoughtSpot supports external [OAuth with Microsoft Azure Active Directory (AD)](https://docs.thoughtspot.com/cloud/latest/ connections-snowflake-azure-ad-oauth) and [Okta for Snowflake data connections](https://docs.thoughtspot.com/cloud/latest/connections-snowflake-okta-oauth). - `KEY_PAIR`: For connections that require Key Pair account credentials to authenticate to the Cloud Data Warehouse and fetch data. This authentication type is supported on Snowflake connections only. - `OAUTH_WITH_PKCE`: For connections that require OAuth with PKCE account credentials to authenticate to the Cloud Data Warehouse and fetch data. This authentication type is supported on Snowflake, Starburst, Databricks, Denodo connections only. - `EXTOAUTH_WITH_PKCE`: For connections that require External OAuth With PKCE account credentials to authenticate to the Cloud Data Warehouse and fetch data. This authentication type is supported on Snowflake connections only. - `OAUTH_WITH_PEZ`: For connections that require OAuth With PEZ account credentials to authenticate to the Cloud Data Warehouse and fetch data. This authentication type is supported on Amazon Redshift connections only. - `OAUTH_WITH_SERVICE_PRINCIPAL`: For connections that require OAuth With Service Principal account credentials to authenticate to the Cloud Data Warehouse and fetch data. This authentication type is supported on Databricks connections only. - `PERSONAL_ACCESS_TOKEN`: For connections that require Personal Access Token account credentials to authenticate to the Cloud Data Warehouse and fetch data. This authentication type is supported on Databricks connections only. - `OAUTH_CLIENT_CREDENTIALS`: For connections that require OAuth Client Credentials to authenticate to the Cloud Data Warehouse and fetch data. This authentication type is supported on Snowflake connections only. - To include more details about connection objects in the API response, set `include_details` to `true`. - You can also sort the output by field names and filter connections by tags. **NOTE**: When filtering connection records by parameters other than `data_warehouse_types` or `tag_identifiers`, ensure that you set `record_size` to `-1` and `record_offset` to `0` for precise results. + +### Parameters + +| Name | Type | +|------------- | ------------- | +| **searchConnectionRequest** | [**SearchConnectionRequest**](SearchConnectionRequest.md) + +### Return type + +[**List<SearchConnectionResponse>**](SearchConnectionResponse.md) + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | List of connections to the datasource. | - | +| **400** | Invalid request. | - | +| **401** | Unauthorized access. | - | +| **403** | Forbidden access. | - | +| **500** | Unexpected error | - | + + +# **syncMetadata** +> SyncMetadataResponse syncMetadata(connectionIdentifier, syncMetadataRequest) + + + + Version: 26.5.0.cl or later Synchronizes connection metadata attributes from your Cloud Data Warehouse (CDW) with ThoughtSpot. Requires the `DATAMANAGEMENT` (**Can manage data**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` (**Can manage data models**) privilege is required. #### Usage guidelines To synchronize attributes from a CDW, specify the connection GUID or name in the `connection_identifier` path parameter and `sync_attributes` in the request body. Default attribute is `[\"DESCRIPTION\"]`. ##### Hierarchical schema * Connection: The connection object for the sync operation. * Tables: Tables for the sync operation. When no table is specified, all tables are synchronized. * Columns: If the table is specified, you can add the columns for the sync operation. If no columns are specified, all columns in the specified table are considered for the sync operation. To set the scope for the sync operation: * Connection-level: To sync all tables and columns, pass an empty request body, or only the attributes in the request body. * Table-level: To synchronize specific tables and their columns, specify the table identifiers in the `tables` array. * Column-level: To synchronize specific columns, specify the table identifier as the key and column identifiers as the value in the `tables` array. ``` { \"tables\": [ {\"table-guid-1\": [\"column-guid-1\", \"column-guid-2\"]}, \"table-guid-2\" ], \"sync_attributes\": [\"DESCRIPTION\"] } ``` ##### API response If the sync operation is successful, the API returns the following information: * Status of the sync operation. For example, `SUCCESS`, `PARTIAL_SUCCESS`, or `NO_UPDATE`. * Number of tables and columns that were updated. * Number of tables and columns with the sync failed status when the overall sync status is `PARTIAL_SUCCESS`. * Message text indicating the sync results. + +### Parameters + +| Name | Type | +|------------- | ------------- | +| **connectionIdentifier** | **String** +| **syncMetadataRequest** | [**SyncMetadataRequest**](SyncMetadataRequest.md) + +### Return type + +[**SyncMetadataResponse**](SyncMetadataResponse.md) + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Metadata synced successfully. | - | +| **400** | Invalid request parameters or hierarchy. | - | +| **401** | Unauthorized access. | - | +| **403** | Forbidden access. | - | +| **404** | Connection, table, or column not found. | - | +| **500** | Unexpected error | - | + + +# **updateConnection** +> updateConnection(updateConnectionRequest) + + + + Version: 9.2.0.cl or later **Important**: This endpoint is deprecated and will be removed from ThoughtSpot in September 2025. ThoughtSpot strongly recommends using the [Update connection V2](#/http/api-endpoints/connections/update-connection-v2) endpoint to update your connection objects. #### Usage guidelines Updates a connection object. Requires `DATAMANAGEMENT` (**Can manage data**) and edit permissions to the connection object, or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) privilege is required. To update a connection object, pass these parameters in your API request: 1. GUID of the connection object. 2. If you are updating tables or database schema of a connection object: a. Add the updated JSON map of metadata with database, schema, and tables in `data_warehouse_config`. b. Set `validate` to `true`. 3. If you are updating a configuration attribute, connection name, or description, you can set `validate` to `false`. + +### Parameters + +| Name | Type | +|------------- | ------------- | +| **updateConnectionRequest** | [**UpdateConnectionRequest**](UpdateConnectionRequest.md) + +### Return type + +null (empty response body) + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **204** | Connection successfully updated. | - | +| **400** | Invalid request. | - | +| **401** | Unauthorized access. | - | +| **403** | Forbidden access. | - | +| **500** | Unexpected error | - | + + +# **updateConnectionStatus** +> updateConnectionStatus(connectionIdentifier, updateConnectionStatusRequest) + + + + Version: 26.6.0.cl or later Activates or deactivates a connection. A deactivated connection cannot be used for queries or operations until it is activated again. Requires `DATAMANAGEMENT` (**Can manage data**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) privilege is required. Only the connection owner or an administrator can perform this operation. #### Usage guidelines To update the status of a connection, specify the connection GUID or name in the `connection_identifier` path parameter and the desired `status` in the request body. - **ACTIVATED**: Enables the connection. Queries and operations can resume on an activated connection. - **DEACTIVATED**: Disables the connection. It does not remove the connection metadata, but only makes the connection unavailable for queries and operations. You can reactivate a deactivated connection by setting \"status\": \"ACTIVATED\". + +### Parameters + +| Name | Type | +|------------- | ------------- | +| **connectionIdentifier** | **String** +| **updateConnectionStatusRequest** | [**UpdateConnectionStatusRequest**](UpdateConnectionStatusRequest.md) + +### Return type + +null (empty response body) + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **204** | Connection status updated successfully. | - | +| **400** | Invalid request. | - | +| **401** | Unauthorized access. | - | +| **403** | Forbidden access. | - | +| **404** | Object not found | - | +| **500** | Unexpected error | - | + + +# **updateConnectionV2** +> updateConnectionV2(connectionIdentifier, updateConnectionV2Request) + + + + Version: 10.4.0.cl or later Updates a connection object. Requires `DATAMANAGEMENT` (**Can manage data**) and edit permissions to the connection object, or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) privilege is required. To update a connection object, pass these parameters in your API request: 1. GUID of the connection object. 2. If you are updating tables or database schema of a connection object: a. Add the updated JSON map of metadata with database, schema, and tables in `data_warehouse_config`. b. Set `validate` to `true`. **NOTE:** If the `authentication_type` is anything other than SERVICE_ACCOUNT, you must explicitly provide the authenticationType property in the payload. If you do not specify authenticationType, the API will default to SERVICE_ACCOUNT as the authentication type. * A JSON map of configuration attributes, database details, and table properties in `data_warehouse_config` as shown in the following example: * This is an example of updating a single table in a empty connection: ``` { \"authenticationType\": \"SERVICE_ACCOUNT\", \"externalDatabases\": [ { \"name\": \"DEVELOPMENT\", \"isAutoCreated\": false, \"schemas\": [ { \"name\": \"TS_dataset\", \"tables\": [ { \"name\": \"DEMORENAME\", \"type\": \"TABLE\", \"description\": \"\", \"selected\": true, \"linked\": true, \"gid\": 0, \"datasetId\": \"-1\", \"subType\": \"\", \"reportId\": \"\", \"viewId\": \"\", \"columns\": [ { \"name\": \"Col1\", \"type\": \"VARCHAR\", \"canImport\": true, \"selected\": true, \"description\": \"\", \"isLinkedActive\": true, \"isAggregate\": false }, { \"name\": \"Col2\", \"type\": \"VARCHAR\", \"canImport\": true, \"selected\": true, \"description\": \"\", \"isLinkedActive\": true, \"isAggregate\": false }, { \"name\": \"Col3\", \"type\": \"VARCHAR\", \"canImport\": true, \"selected\": true, \"description\": \"\", \"isLinkedActive\": true, \"isAggregate\": false }, { \"name\": \"Col312\", \"type\": \"VARCHAR\", \"canImport\": true, \"selected\": true, \"description\": \"\", \"isLinkedActive\": true, \"isAggregate\": false }, { \"name\": \"Col4\", \"type\": \"VARCHAR\", \"canImport\": true, \"selected\": true, \"description\": \"\", \"isLinkedActive\": true, \"isAggregate\": false } ], \"relationships\": [] } ] } ] } ], \"configuration\": { \"password\": \"\", \"database\": \"DEVELOPMENT\", \"role\": \"DEV\", \"accountName\": \"thoughtspot_partner\", \"warehouse\": \"DEMO_WH\", \"user\": \"DEV_USER\" } } ``` * This is an example of updating a single table in an existing connection with tables: ``` { \"authenticationType\": \"SERVICE_ACCOUNT\", \"externalDatabases\": [ { \"name\": \"DEVELOPMENT\", \"isAutoCreated\": false, \"schemas\": [ { \"name\": \"TS_dataset\", \"tables\": [ { \"name\": \"CUSTOMER\", \"type\": \"TABLE\", \"description\": \"\", \"selected\": true, \"linked\": true, \"gid\": 0, \"datasetId\": \"-1\", \"subType\": \"\", \"reportId\": \"\", \"viewId\": \"\", \"columns\": [], \"relationships\": [] }, { \"name\": \"tpch5k_falcon_default_schema_users\", \"type\": \"TABLE\", \"description\": \"\", \"selected\": true, \"linked\": true, \"gid\": 0, \"datasetId\": \"-1\", \"subType\": \"\", \"reportId\": \"\", \"viewId\": \"\", \"columns\": [ { \"name\": \"user_id\", \"type\": \"INT64\", \"canImport\": true, \"selected\": true, \"description\": \"\", \"isLinkedActive\": true, \"isAggregate\": false }, { \"name\": \"product_id\", \"type\": \"INT64\", \"canImport\": true, \"selected\": true, \"description\": \"\", \"isLinkedActive\": true, \"isAggregate\": false }, { \"name\": \"user_cost\", \"type\": \"INT64\", \"canImport\": true, \"selected\": true, \"description\": \"\", \"isLinkedActive\": true, \"isAggregate\": false } ], \"relationships\": [] } ] } ] } ], \"configuration\": { \"password\": \"\", \"database\": \"DEVELOPMENT\", \"role\": \"DEV\", \"accountName\": \"thoughtspot_partner\", \"warehouse\": \"DEMO_WH\", \"user\": \"DEV_USER\" } } ``` 3. If you are updating a configuration attribute, connection name, or description, you can set `validate` to `false`. **NOTE:** If the `authentication_type` is anything other than SERVICE_ACCOUNT, you must explicitly provide the authenticationType property in the payload. If you do not specify authenticationType, the API will default to SERVICE_ACCOUNT as the authentication type. * A JSON map of configuration attributes in `data_warehouse_config`. The following example shows the configuration attributes for a Snowflake connection: ``` { \"configuration\":{ \"accountName\":\"thoughtspot_partner\", \"user\":\"tsadmin\", \"password\":\"TestConn123\", \"role\":\"sysadmin\", \"warehouse\":\"MEDIUM_WH\" }, \"externalDatabases\":[ ] } ``` + +### Parameters + +| Name | Type | +|------------- | ------------- | +| **connectionIdentifier** | **String** +| **updateConnectionV2Request** | [**UpdateConnectionV2Request**](UpdateConnectionV2Request.md) + +### Return type + +null (empty response body) + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **204** | Connection successfully updated. | - | +| **400** | Invalid request. | - | +| **401** | Unauthorized access. | - | +| **403** | Forbidden access. | - | +| **500** | Unexpected error | - | + diff --git a/sdks/java/docs/ContextPayloadV2Input.md b/sdks/java/docs/ContextPayloadV2Input.md new file mode 100644 index 000000000..7613a4531 --- /dev/null +++ b/sdks/java/docs/ContextPayloadV2Input.md @@ -0,0 +1,28 @@ + + +# ContextPayloadV2Input + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**type** | [**TypeEnum**](#TypeEnum) | Type of the context. | [optional] | +|**dataSourceContext** | [**DataSourceContextInput**](DataSourceContextInput.md) | | [optional] | + + + +## Enum: TypeEnum + +| Name | Value | +|---- | -----| +| DATA_SOURCE | "data_source" | +| DATA_SOURCE2 | "DATA_SOURCE" | +| AUTO_MODE | "AUTO_MODE" | + + +## Implemented Interfaces + +* Serializable + + diff --git a/sdks/java/docs/Conversation.md b/sdks/java/docs/Conversation.md new file mode 100644 index 000000000..badda7d49 --- /dev/null +++ b/sdks/java/docs/Conversation.md @@ -0,0 +1,17 @@ + + +# Conversation + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**conversationIdentifier** | **String** | Unique identifier of the conversation. | | + + +## Implemented Interfaces + +* Serializable + + diff --git a/sdks/java/docs/ConversationSettingsInput.md b/sdks/java/docs/ConversationSettingsInput.md new file mode 100644 index 000000000..b96fb3e20 --- /dev/null +++ b/sdks/java/docs/ConversationSettingsInput.md @@ -0,0 +1,20 @@ + + +# ConversationSettingsInput + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**enableContextualChangeAnalysis** | **Boolean** | Enable contextual change analysis. Default changed from `false` to `true` in 26.2.0.cl. Ignored on versions >= 26.2.0.cl where it is always enabled. Version: 10.4.0.cl or later | [optional] | +|**enableNaturalLanguageAnswerGeneration** | **Boolean** | Enable natural language to answer generation. Default changed from `false` to `true` in 26.2.0.cl. Ignored on versions >= 26.2.0.cl where it is always enabled. Version: 10.4.0.cl or later | [optional] | +|**enableReasoning** | **Boolean** | Enable reasoning. Default changed from `false` to `true` in 26.2.0.cl. Ignored on versions >= 26.2.0.cl where it is always enabled. Version: 10.4.0.cl or later | [optional] | +|**enableSaveChat** | **Boolean** | Enable save conversation. When `true`, the conversation is persisted and can be retrieved later via conversation history. Version: 26.5.0.cl or later | [optional] | + + +## Implemented Interfaces + +* Serializable + + diff --git a/sdks/java/docs/ConvertWorksheetToModelRequest.md b/sdks/java/docs/ConvertWorksheetToModelRequest.md new file mode 100644 index 000000000..73ef90aff --- /dev/null +++ b/sdks/java/docs/ConvertWorksheetToModelRequest.md @@ -0,0 +1,20 @@ + + +# ConvertWorksheetToModelRequest + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**worksheetIds** | **List<String>** | List of Worksheet IDs. | [optional] | +|**excludeWorksheetIds** | **List<String>** | List of Worksheet IDs to be excluded. | [optional] | +|**convertAll** | **Boolean** | Indicates whether all the worksheet needs to be converted to models. | [optional] | +|**applyChanges** | **Boolean** | Indicates whether the changes should be applied to database. | [optional] | + + +## Implemented Interfaces + +* Serializable + + diff --git a/sdks/java/docs/CopyObjectRequest.md b/sdks/java/docs/CopyObjectRequest.md new file mode 100644 index 000000000..ddc6cca03 --- /dev/null +++ b/sdks/java/docs/CopyObjectRequest.md @@ -0,0 +1,29 @@ + + +# CopyObjectRequest + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**description** | **String** | Description of the new object | [optional] | +|**identifier** | **String** | GUID of metadata object to be copied (answer id or liveboard id) | | +|**type** | [**TypeEnum**](#TypeEnum) | Type of metadata object | [optional] | +|**title** | **String** | Title of the new object | [optional] | + + + +## Enum: TypeEnum + +| Name | Value | +|---- | -----| +| LIVEBOARD | "LIVEBOARD" | +| ANSWER | "ANSWER" | + + +## Implemented Interfaces + +* Serializable + + diff --git a/sdks/java/docs/CreateAgentConversationRequest.md b/sdks/java/docs/CreateAgentConversationRequest.md new file mode 100644 index 000000000..a77d7d04f --- /dev/null +++ b/sdks/java/docs/CreateAgentConversationRequest.md @@ -0,0 +1,18 @@ + + +# CreateAgentConversationRequest + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**metadataContext** | [**ContextPayloadV2Input**](ContextPayloadV2Input.md) | Context for the conversation. | | +|**conversationSettings** | [**ConversationSettingsInput**](ConversationSettingsInput.md) | Conversation settings. | | + + +## Implemented Interfaces + +* Serializable + + diff --git a/sdks/java/docs/CreateCalendarRequest.md b/sdks/java/docs/CreateCalendarRequest.md new file mode 100644 index 000000000..e225512da --- /dev/null +++ b/sdks/java/docs/CreateCalendarRequest.md @@ -0,0 +1,79 @@ + + +# CreateCalendarRequest + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**name** | **String** | Name of the custom calendar. | | +|**creationMethod** | [**CreationMethodEnum**](#CreationMethodEnum) | Type of create operation. | | +|**tableReference** | [**ExternalTableInput**](ExternalTableInput.md) | Table reference containing connection identifier and table details in this format: `{\"connection_identifier\":\"conn1\", \"database_name\":\"db1\", \"schema_name\":\"sc1\", \"table_name\":\"tb1\"}`. The given table will be created if `creation_method` is set as `FROM_INPUT_PARAMS`. | | +|**startDate** | **String** | Start date for the calendar in `MM/dd/yyyy` format. This parameter is mandatory if `creation_method` is set as `FROM_INPUT_PARAMS`. | [optional] | +|**endDate** | **String** | End date for the calendar in `MM/dd/yyyy` format. This parameter is mandatory if `creation_method` is set as `FROM_INPUT_PARAMS`. | [optional] | +|**calendarType** | [**CalendarTypeEnum**](#CalendarTypeEnum) | Type of the calendar. | [optional] | +|**monthOffset** | [**MonthOffsetEnum**](#MonthOffsetEnum) | Specify the month in which the fiscal or custom calendar year should start. For example, if you set `month_offset` to \"April\", the custom calendar will treat \"April\" as the first month of the year, and the related attributes such as quarters and start date will be based on this offset. The default value is `January`, which represents the standard calendar year (January to December). | [optional] | +|**startDayOfWeek** | [**StartDayOfWeekEnum**](#StartDayOfWeekEnum) | Specify the starting day of the week. | [optional] | +|**quarterNamePrefix** | **String** | Prefix to add before the quarter. | [optional] | +|**yearNamePrefix** | **String** | Prefix to add before the year. | [optional] | + + + +## Enum: CreationMethodEnum + +| Name | Value | +|---- | -----| +| FROM_INPUT_PARAMS | "FROM_INPUT_PARAMS" | +| FROM_EXISTING_TABLE | "FROM_EXISTING_TABLE" | + + + +## Enum: CalendarTypeEnum + +| Name | Value | +|---- | -----| +| MONTH_OFFSET | "MONTH_OFFSET" | +| FOUR_FOUR_FIVE | "FOUR_FOUR_FIVE" | +| FOUR_FIVE_FOUR | "FOUR_FIVE_FOUR" | +| FIVE_FOUR_FOUR | "FIVE_FOUR_FOUR" | + + + +## Enum: MonthOffsetEnum + +| Name | Value | +|---- | -----| +| JANUARY | "January" | +| FEBRUARY | "February" | +| MARCH | "March" | +| APRIL | "April" | +| MAY | "May" | +| JUNE | "June" | +| JULY | "July" | +| AUGUST | "August" | +| SEPTEMBER | "September" | +| OCTOBER | "October" | +| NOVEMBER | "November" | +| DECEMBER | "December" | + + + +## Enum: StartDayOfWeekEnum + +| Name | Value | +|---- | -----| +| SUNDAY | "Sunday" | +| MONDAY | "Monday" | +| TUESDAY | "Tuesday" | +| WEDNESDAY | "Wednesday" | +| THURSDAY | "Thursday" | +| FRIDAY | "Friday" | +| SATURDAY | "Saturday" | + + +## Implemented Interfaces + +* Serializable + + diff --git a/sdks/java/docs/CreateCollectionRequest.md b/sdks/java/docs/CreateCollectionRequest.md new file mode 100644 index 000000000..452f83352 --- /dev/null +++ b/sdks/java/docs/CreateCollectionRequest.md @@ -0,0 +1,19 @@ + + +# CreateCollectionRequest + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**name** | **String** | Name of the collection. | | +|**description** | **String** | Description of the collection. | [optional] | +|**metadata** | [**List<CollectionMetadataInput>**](CollectionMetadataInput.md) | Metadata objects to add to the collection. | [optional] | + + +## Implemented Interfaces + +* Serializable + + diff --git a/sdks/java/docs/CreateConfigRequest.md b/sdks/java/docs/CreateConfigRequest.md new file mode 100644 index 000000000..cc6fe955d --- /dev/null +++ b/sdks/java/docs/CreateConfigRequest.md @@ -0,0 +1,24 @@ + + +# CreateConfigRequest + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**repositoryUrl** | **String** | URL for connecting to remote repository | | +|**username** | **String** | Username to authenticate connection to remote repository | | +|**accessToken** | **String** | Access token corresponding to the user to authenticate connection to remote repository | | +|**orgIdentifier** | **String** | Applicable when Orgs is enabled in the cluster List of Org ids or name. Provide value -1 for cluster level. Example : [\"OrgID1-or-Name1\", \"OrgID2-or-Name2\"] Note: If no value is specified, then the configurations will be returned for all orgs the user has access to Version: 9.5.0.cl or later | [optional] | +|**branchNames** | **List<String>** | List the remote branches to configure. Example:[development, production] | [optional] | +|**commitBranchName** | **String** | Name of the remote branch where objects from this Thoughtspot instance will be versioned. Version: 9.7.0.cl or later | [optional] | +|**enableGuidMapping** | **Boolean** | Maintain mapping of guid for the deployment to an instance Version: 9.4.0.cl or later | [optional] | +|**configurationBranchName** | **String** | Name of the branch where the configuration files related to operations between Thoughtspot and version control repo should be maintained. Note: If no branch name is specified, then by default, ts_config_files branch is considered. Ensure this branch exists before configuration. Version: 9.7.0.cl or later | [optional] | + + +## Implemented Interfaces + +* Serializable + + diff --git a/sdks/java/docs/CreateConnectionConfigurationRequest.md b/sdks/java/docs/CreateConnectionConfigurationRequest.md new file mode 100644 index 000000000..643934461 --- /dev/null +++ b/sdks/java/docs/CreateConnectionConfigurationRequest.md @@ -0,0 +1,57 @@ + + +# CreateConnectionConfigurationRequest + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**name** | **String** | Unique name for the configuration. | | +|**description** | **String** | Description of the configuration. | [optional] | +|**connectionIdentifier** | **String** | Unique ID or name of the connection. | | +|**sameAsParent** | **Boolean** | Specifies whether the connection configuration should inherit all properties and authentication type from its parent connection. This attribute is only applicable to parameterized connections. When set to true, the configuration uses only the connection properties and authentication type inherited from the parent. Version: 26.2.0.cl or later | [optional] | +|**policyProcessOptions** | [**PolicyProcessOptionsInput**](PolicyProcessOptionsInput.md) | This attribute is only applicable to parameterized connections. Ensure that the policy is set to Processes to allow the configuration to be used exclusively for system processes. Version: 26.2.0.cl or later | [optional] | +|**authenticationType** | [**AuthenticationTypeEnum**](#AuthenticationTypeEnum) | Type of authentication used for the connection. | [optional] | +|**_configuration** | **Object** | Configuration properties in JSON. | | +|**policyType** | [**PolicyTypeEnum**](#PolicyTypeEnum) | Type of policy. | [optional] | +|**policyPrincipals** | **List<String>** | Unique ID or name of the User and User Groups. | [optional] | +|**policyProcesses** | [**List<PolicyProcessesEnum>**](#List<PolicyProcessesEnum>) | Action that the query performed on the data warehouse, such as SAGE_INDEXING and ROW_COUNT_STATS. | [optional] | + + + +## Enum: AuthenticationTypeEnum + +| Name | Value | +|---- | -----| +| SERVICE_ACCOUNT | "SERVICE_ACCOUNT" | +| KEY_PAIR | "KEY_PAIR" | +| PERSONAL_ACCESS_TOKEN | "PERSONAL_ACCESS_TOKEN" | +| OAUTH_WITH_SERVICE_PRINCIPAL | "OAUTH_WITH_SERVICE_PRINCIPAL" | +| OAUTH_CLIENT_CREDENTIALS | "OAUTH_CLIENT_CREDENTIALS" | + + + +## Enum: PolicyTypeEnum + +| Name | Value | +|---- | -----| +| NO_POLICY | "NO_POLICY" | +| PRINCIPALS | "PRINCIPALS" | +| PROCESSES | "PROCESSES" | + + + +## Enum: List<PolicyProcessesEnum> + +| Name | Value | +|---- | -----| +| SAGE_INDEXING | "SAGE_INDEXING" | +| ROW_COUNT_STATS | "ROW_COUNT_STATS" | + + +## Implemented Interfaces + +* Serializable + + diff --git a/sdks/java/docs/CreateConnectionRequest.md b/sdks/java/docs/CreateConnectionRequest.md new file mode 100644 index 000000000..0a23b98a0 --- /dev/null +++ b/sdks/java/docs/CreateConnectionRequest.md @@ -0,0 +1,62 @@ + + +# CreateConnectionRequest + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**name** | **String** | Unique name for the connection. | | +|**description** | **String** | Description of the connection. | [optional] | +|**dataWarehouseType** | [**DataWarehouseTypeEnum**](#DataWarehouseTypeEnum) | Type of the data warehouse. | | +|**dataWarehouseConfig** | **Object** | Connection configuration attributes in JSON format. To create a connection with tables, include table attributes. See the documentation above for sample JSON. | | +|**validate** | **Boolean** | Validates the connection metadata if tables are included. If you are creating a connection without tables, specify `false`. | [optional] | + + + +## Enum: DataWarehouseTypeEnum + +| Name | Value | +|---- | -----| +| SNOWFLAKE | "SNOWFLAKE" | +| AMAZON_REDSHIFT | "AMAZON_REDSHIFT" | +| GOOGLE_BIGQUERY | "GOOGLE_BIGQUERY" | +| AZURE_SYNAPSE | "AZURE_SYNAPSE" | +| TERADATA | "TERADATA" | +| SAP_HANA | "SAP_HANA" | +| STARBURST | "STARBURST" | +| ORACLE_ADW | "ORACLE_ADW" | +| DATABRICKS | "DATABRICKS" | +| DENODO | "DENODO" | +| DREMIO | "DREMIO" | +| TRINO | "TRINO" | +| PRESTO | "PRESTO" | +| POSTGRES | "POSTGRES" | +| SQLSERVER | "SQLSERVER" | +| MYSQL | "MYSQL" | +| GENERIC_JDBC | "GENERIC_JDBC" | +| AMAZON_RDS_POSTGRESQL | "AMAZON_RDS_POSTGRESQL" | +| AMAZON_AURORA_POSTGRESQL | "AMAZON_AURORA_POSTGRESQL" | +| AMAZON_RDS_MYSQL | "AMAZON_RDS_MYSQL" | +| AMAZON_AURORA_MYSQL | "AMAZON_AURORA_MYSQL" | +| LOOKER | "LOOKER" | +| AMAZON_ATHENA | "AMAZON_ATHENA" | +| SINGLESTORE | "SINGLESTORE" | +| GCP_SQLSERVER | "GCP_SQLSERVER" | +| GCP_ALLOYDB_POSTGRESQL | "GCP_ALLOYDB_POSTGRESQL" | +| GCP_POSTGRESQL | "GCP_POSTGRESQL" | +| GCP_MYSQL | "GCP_MYSQL" | +| MODE | "MODE" | +| GOOGLE_SHEETS | "GOOGLE_SHEETS" | +| FALCON | "FALCON" | +| FALCON_ONPREM | "FALCON_ONPREM" | +| CLICKHOUSE | "CLICKHOUSE" | +| IOMETE | "IOMETE" | + + +## Implemented Interfaces + +* Serializable + + diff --git a/sdks/java/docs/CreateConnectionResponse.md b/sdks/java/docs/CreateConnectionResponse.md new file mode 100644 index 000000000..e2bd33d53 --- /dev/null +++ b/sdks/java/docs/CreateConnectionResponse.md @@ -0,0 +1,61 @@ + + +# CreateConnectionResponse + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**id** | **String** | ID of the connection created. | | +|**name** | **String** | Name of the connection. | | +|**dataWarehouseType** | [**DataWarehouseTypeEnum**](#DataWarehouseTypeEnum) | Type of data warehouse. | | +|**details** | **Object** | Details of the connection. | [optional] | + + + +## Enum: DataWarehouseTypeEnum + +| Name | Value | +|---- | -----| +| SNOWFLAKE | "SNOWFLAKE" | +| AMAZON_REDSHIFT | "AMAZON_REDSHIFT" | +| GOOGLE_BIGQUERY | "GOOGLE_BIGQUERY" | +| AZURE_SYNAPSE | "AZURE_SYNAPSE" | +| TERADATA | "TERADATA" | +| SAP_HANA | "SAP_HANA" | +| STARBURST | "STARBURST" | +| ORACLE_ADW | "ORACLE_ADW" | +| DATABRICKS | "DATABRICKS" | +| DENODO | "DENODO" | +| DREMIO | "DREMIO" | +| TRINO | "TRINO" | +| PRESTO | "PRESTO" | +| POSTGRES | "POSTGRES" | +| SQLSERVER | "SQLSERVER" | +| MYSQL | "MYSQL" | +| GENERIC_JDBC | "GENERIC_JDBC" | +| AMAZON_RDS_POSTGRESQL | "AMAZON_RDS_POSTGRESQL" | +| AMAZON_AURORA_POSTGRESQL | "AMAZON_AURORA_POSTGRESQL" | +| AMAZON_RDS_MYSQL | "AMAZON_RDS_MYSQL" | +| AMAZON_AURORA_MYSQL | "AMAZON_AURORA_MYSQL" | +| LOOKER | "LOOKER" | +| AMAZON_ATHENA | "AMAZON_ATHENA" | +| SINGLESTORE | "SINGLESTORE" | +| GCP_SQLSERVER | "GCP_SQLSERVER" | +| GCP_ALLOYDB_POSTGRESQL | "GCP_ALLOYDB_POSTGRESQL" | +| GCP_POSTGRESQL | "GCP_POSTGRESQL" | +| GCP_MYSQL | "GCP_MYSQL" | +| MODE | "MODE" | +| GOOGLE_SHEETS | "GOOGLE_SHEETS" | +| FALCON | "FALCON" | +| FALCON_ONPREM | "FALCON_ONPREM" | +| CLICKHOUSE | "CLICKHOUSE" | +| IOMETE | "IOMETE" | + + +## Implemented Interfaces + +* Serializable + + diff --git a/sdks/java/docs/CreateConversationRequest.md b/sdks/java/docs/CreateConversationRequest.md new file mode 100644 index 000000000..e6a4aee45 --- /dev/null +++ b/sdks/java/docs/CreateConversationRequest.md @@ -0,0 +1,18 @@ + + +# CreateConversationRequest + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**metadataIdentifier** | **String** | ID of the metadata object, such as a Worksheet or Model, to use as a data source for the conversation. | | +|**tokens** | **String** | Token string to set the context for the conversation. For example,`[sales],[item type],[state]`. | [optional] | + + +## Implemented Interfaces + +* Serializable + + diff --git a/sdks/java/docs/CreateCustomActionRequest.md b/sdks/java/docs/CreateCustomActionRequest.md new file mode 100644 index 000000000..7dea5e6ad --- /dev/null +++ b/sdks/java/docs/CreateCustomActionRequest.md @@ -0,0 +1,21 @@ + + +# CreateCustomActionRequest + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**name** | **String** | Name of the custom action. The custom action name must be unique. | | +|**actionDetails** | [**ActionDetailsInputCreate**](ActionDetailsInputCreate.md) | Action details includes `Type` and Configuration data for Custom Actions, either Callback or URL is required. | | +|**associateMetadata** | [**List<AssociateMetadataInputCreate>**](AssociateMetadataInputCreate.md) | Metadata objects to which the custom action needs to be associated. | [optional] | +|**defaultActionConfig** | [**DefaultActionConfigInputCreate**](DefaultActionConfigInputCreate.md) | Default Custom action configuration. This includes if the custom action is available on all visualizations. By default, a custom action is added to all visualizations and Answers. | [optional] | +|**groupIdentifiers** | **List<String>** | Unique ID or name of the groups that can view and access the custom action. | [optional] | + + +## Implemented Interfaces + +* Serializable + + diff --git a/sdks/java/docs/CreateEmailCustomizationRequest.md b/sdks/java/docs/CreateEmailCustomizationRequest.md new file mode 100644 index 000000000..5b1275bd3 --- /dev/null +++ b/sdks/java/docs/CreateEmailCustomizationRequest.md @@ -0,0 +1,18 @@ + + +# CreateEmailCustomizationRequest + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**templateProperties** | [**TemplatePropertiesInputCreate**](TemplatePropertiesInputCreate.md) | Email customization configuration as key value pair | | +|**orgIdentifier** | **String** | Unique ID or name of org Version: 10.12.0.cl or later | [optional] | + + +## Implemented Interfaces + +* Serializable + + diff --git a/sdks/java/docs/CreateEmailCustomizationResponse.md b/sdks/java/docs/CreateEmailCustomizationResponse.md new file mode 100644 index 000000000..3ae5925f9 --- /dev/null +++ b/sdks/java/docs/CreateEmailCustomizationResponse.md @@ -0,0 +1,20 @@ + + +# CreateEmailCustomizationResponse + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**tenantId** | **String** | Tenant ID | | +|**org** | [**OrgType**](OrgType.md) | | | +|**name** | **String** | Email customization name. | | +|**templateProperties** | **Object** | Customization configuration for the email | | + + +## Implemented Interfaces + +* Serializable + + diff --git a/sdks/java/docs/CreateOrgRequest.md b/sdks/java/docs/CreateOrgRequest.md new file mode 100644 index 000000000..405ba6ac8 --- /dev/null +++ b/sdks/java/docs/CreateOrgRequest.md @@ -0,0 +1,18 @@ + + +# CreateOrgRequest + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**name** | **String** | Name of the Org. | | +|**description** | **String** | Description of the Org. | [optional] | + + +## Implemented Interfaces + +* Serializable + + diff --git a/sdks/java/docs/CreateRoleRequest.md b/sdks/java/docs/CreateRoleRequest.md new file mode 100644 index 000000000..a43602c8f --- /dev/null +++ b/sdks/java/docs/CreateRoleRequest.md @@ -0,0 +1,69 @@ + + +# CreateRoleRequest + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**name** | **String** | Unique name of the Role. | | +|**description** | **String** | Description of the Role. | [optional] | +|**privileges** | [**List<PrivilegesEnum>**](#List<PrivilegesEnum>) | Privileges granted to the Role. See [Documentation](https://developers.thoughtspot.com/docs/rbac#_role_categories_and_privileges)for supported roles privileges. | [optional] | +|**readOnly** | **Boolean** | <div>Version: 10.5.0.cl or later </div> Indicates whether the role is read only. A readonly role can neither be updated nor deleted. | [optional] | + + + +## Enum: List<PrivilegesEnum> + +| Name | Value | +|---- | -----| +| USERDATAUPLOADING | "USERDATAUPLOADING" | +| DATADOWNLOADING | "DATADOWNLOADING" | +| DATAMANAGEMENT | "DATAMANAGEMENT" | +| SHAREWITHALL | "SHAREWITHALL" | +| JOBSCHEDULING | "JOBSCHEDULING" | +| A3_ANALYSIS | "A3ANALYSIS" | +| BYPASSRLS | "BYPASSRLS" | +| DISABLE_PINBOARD_CREATION | "DISABLE_PINBOARD_CREATION" | +| DEVELOPER | "DEVELOPER" | +| APPLICATION_ADMINISTRATION | "APPLICATION_ADMINISTRATION" | +| USER_ADMINISTRATION | "USER_ADMINISTRATION" | +| GROUP_ADMINISTRATION | "GROUP_ADMINISTRATION" | +| SYSTEM_INFO_ADMINISTRATION | "SYSTEM_INFO_ADMINISTRATION" | +| SYNCMANAGEMENT | "SYNCMANAGEMENT" | +| ORG_ADMINISTRATION | "ORG_ADMINISTRATION" | +| ROLE_ADMINISTRATION | "ROLE_ADMINISTRATION" | +| AUTHENTICATION_ADMINISTRATION | "AUTHENTICATION_ADMINISTRATION" | +| BILLING_INFO_ADMINISTRATION | "BILLING_INFO_ADMINISTRATION" | +| CONTROL_TRUSTED_AUTH | "CONTROL_TRUSTED_AUTH" | +| TAGMANAGEMENT | "TAGMANAGEMENT" | +| LIVEBOARD_VERIFIER | "LIVEBOARD_VERIFIER" | +| CAN_MANAGE_CUSTOM_CALENDAR | "CAN_MANAGE_CUSTOM_CALENDAR" | +| CAN_CREATE_OR_EDIT_CONNECTIONS | "CAN_CREATE_OR_EDIT_CONNECTIONS" | +| CAN_MANAGE_WORKSHEET_VIEWS_TABLES | "CAN_MANAGE_WORKSHEET_VIEWS_TABLES" | +| CAN_MANAGE_VERSION_CONTROL | "CAN_MANAGE_VERSION_CONTROL" | +| THIRDPARTY_ANALYSIS | "THIRDPARTY_ANALYSIS" | +| CAN_CREATE_CATALOG | "CAN_CREATE_CATALOG" | +| ALLOW_NON_EMBED_FULL_APP_ACCESS | "ALLOW_NON_EMBED_FULL_APP_ACCESS" | +| CAN_ACCESS_ANALYST_STUDIO | "CAN_ACCESS_ANALYST_STUDIO" | +| CAN_MANAGE_ANALYST_STUDIO | "CAN_MANAGE_ANALYST_STUDIO" | +| PREVIEW_DOCUMENT_SEARCH | "PREVIEW_DOCUMENT_SEARCH" | +| CAN_MANAGE_VARIABLES | "CAN_MANAGE_VARIABLES" | +| CAN_MODIFY_FOLDERS | "CAN_MODIFY_FOLDERS" | +| CAN_VIEW_FOLDERS | "CAN_VIEW_FOLDERS" | +| CAN_MANAGE_AGENTSPOT | "CAN_MANAGE_AGENTSPOT" | +| CAN_ACCESS_AGENTSPOT | "CAN_ACCESS_AGENTSPOT" | +| CAN_SETUP_VERSION_CONTROL | "CAN_SETUP_VERSION_CONTROL" | +| PREVIEW_THOUGHTSPOT_SAGE | "PREVIEW_THOUGHTSPOT_SAGE" | +| CAN_MANAGE_WEBHOOKS | "CAN_MANAGE_WEBHOOKS" | +| CAN_DOWNLOAD_VISUALS | "CAN_DOWNLOAD_VISUALS" | +| CAN_DOWNLOAD_DETAILED_DATA | "CAN_DOWNLOAD_DETAILED_DATA" | +| CAN_USE_SPOTTER | "CAN_USE_SPOTTER" | + + +## Implemented Interfaces + +* Serializable + + diff --git a/sdks/java/docs/CreateScheduleRequest.md b/sdks/java/docs/CreateScheduleRequest.md new file mode 100644 index 000000000..5dfe018ac --- /dev/null +++ b/sdks/java/docs/CreateScheduleRequest.md @@ -0,0 +1,682 @@ + + +# CreateScheduleRequest + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**name** | **String** | Name of the scheduled job. | | +|**description** | **String** | Description of the job. | | +|**metadataType** | [**MetadataTypeEnum**](#MetadataTypeEnum) | Type of the metadata object. | | +|**metadataIdentifier** | **String** | Unique ID or name of the metadata object. | | +|**fileFormat** | [**FileFormatEnum**](#FileFormatEnum) | Export file format. | [optional] | +|**liveboardOptions** | [**LiveboardOptionsInput**](LiveboardOptionsInput.md) | Options to specify details of Liveboard. | [optional] | +|**pdfOptions** | [**SchedulesPdfOptionsInput**](SchedulesPdfOptionsInput.md) | PDF layout and orientation settings. Applicable only if the `file_format` is specified as `PDF`. | [optional] | +|**timeZone** | [**TimeZoneEnum**](#TimeZoneEnum) | Time zone | | +|**frequency** | [**FrequencyInput**](FrequencyInput.md) | Frequency settings for the scheduled job. | [optional] | +|**recipientDetails** | [**RecipientDetailsInput**](RecipientDetailsInput.md) | Recipients of the scheduled job notifications. Add the GUID or name of the ThoughtSpot users or groups as recipients in the `principals` array. If a recipient is not a ThoughtSpot user, specify email address. | | +|**personalisedViewId** | **String** | Personalised view id of the liveboard to be scheduled. | [optional] | + + + +## Enum: MetadataTypeEnum + +| Name | Value | +|---- | -----| +| LIVEBOARD | "LIVEBOARD" | + + + +## Enum: FileFormatEnum + +| Name | Value | +|---- | -----| +| CSV | "CSV" | +| PDF | "PDF" | +| XLSX | "XLSX" | + + + +## Enum: TimeZoneEnum + +| Name | Value | +|---- | -----| +| AFRICA_ABIDJAN | "Africa/Abidjan" | +| AFRICA_ACCRA | "Africa/Accra" | +| AFRICA_ADDIS_ABABA | "Africa/Addis_Ababa" | +| AFRICA_ALGIERS | "Africa/Algiers" | +| AFRICA_ASMARA | "Africa/Asmara" | +| AFRICA_ASMERA | "Africa/Asmera" | +| AFRICA_BAMAKO | "Africa/Bamako" | +| AFRICA_BANGUI | "Africa/Bangui" | +| AFRICA_BANJUL | "Africa/Banjul" | +| AFRICA_BISSAU | "Africa/Bissau" | +| AFRICA_BLANTYRE | "Africa/Blantyre" | +| AFRICA_BRAZZAVILLE | "Africa/Brazzaville" | +| AFRICA_BUJUMBURA | "Africa/Bujumbura" | +| AFRICA_CAIRO | "Africa/Cairo" | +| AFRICA_CASABLANCA | "Africa/Casablanca" | +| AFRICA_CEUTA | "Africa/Ceuta" | +| AFRICA_CONAKRY | "Africa/Conakry" | +| AFRICA_DAKAR | "Africa/Dakar" | +| AFRICA_DAR_ES_SALAAM | "Africa/Dar_es_Salaam" | +| AFRICA_DJIBOUTI | "Africa/Djibouti" | +| AFRICA_DOUALA | "Africa/Douala" | +| AFRICA_EL_AAIUN | "Africa/El_Aaiun" | +| AFRICA_FREETOWN | "Africa/Freetown" | +| AFRICA_GABORONE | "Africa/Gaborone" | +| AFRICA_HARARE | "Africa/Harare" | +| AFRICA_JOHANNESBURG | "Africa/Johannesburg" | +| AFRICA_JUBA | "Africa/Juba" | +| AFRICA_KAMPALA | "Africa/Kampala" | +| AFRICA_KHARTOUM | "Africa/Khartoum" | +| AFRICA_KIGALI | "Africa/Kigali" | +| AFRICA_KINSHASA | "Africa/Kinshasa" | +| AFRICA_LAGOS | "Africa/Lagos" | +| AFRICA_LIBREVILLE | "Africa/Libreville" | +| AFRICA_LOME | "Africa/Lome" | +| AFRICA_LUANDA | "Africa/Luanda" | +| AFRICA_LUBUMBASHI | "Africa/Lubumbashi" | +| AFRICA_LUSAKA | "Africa/Lusaka" | +| AFRICA_MALABO | "Africa/Malabo" | +| AFRICA_MAPUTO | "Africa/Maputo" | +| AFRICA_MASERU | "Africa/Maseru" | +| AFRICA_MBABANE | "Africa/Mbabane" | +| AFRICA_MOGADISHU | "Africa/Mogadishu" | +| AFRICA_MONROVIA | "Africa/Monrovia" | +| AFRICA_NAIROBI | "Africa/Nairobi" | +| AFRICA_NDJAMENA | "Africa/Ndjamena" | +| AFRICA_NIAMEY | "Africa/Niamey" | +| AFRICA_NOUAKCHOTT | "Africa/Nouakchott" | +| AFRICA_OUAGADOUGOU | "Africa/Ouagadougou" | +| AFRICA_PORTO_NOVO | "Africa/Porto-Novo" | +| AFRICA_SAO_TOME | "Africa/Sao_Tome" | +| AFRICA_TIMBUKTU | "Africa/Timbuktu" | +| AFRICA_TRIPOLI | "Africa/Tripoli" | +| AFRICA_TUNIS | "Africa/Tunis" | +| AFRICA_WINDHOEK | "Africa/Windhoek" | +| AMERICA_ADAK | "America/Adak" | +| AMERICA_ANCHORAGE | "America/Anchorage" | +| AMERICA_ANGUILLA | "America/Anguilla" | +| AMERICA_ANTIGUA | "America/Antigua" | +| AMERICA_ARAGUAINA | "America/Araguaina" | +| AMERICA_ARGENTINA_BUENOS_AIRES | "America/Argentina/Buenos_Aires" | +| AMERICA_ARGENTINA_CATAMARCA | "America/Argentina/Catamarca" | +| AMERICA_ARGENTINA_COMOD_RIVADAVIA | "America/Argentina/ComodRivadavia" | +| AMERICA_ARGENTINA_CORDOBA | "America/Argentina/Cordoba" | +| AMERICA_ARGENTINA_JUJUY | "America/Argentina/Jujuy" | +| AMERICA_ARGENTINA_LA_RIOJA | "America/Argentina/La_Rioja" | +| AMERICA_ARGENTINA_MENDOZA | "America/Argentina/Mendoza" | +| AMERICA_ARGENTINA_RIO_GALLEGOS | "America/Argentina/Rio_Gallegos" | +| AMERICA_ARGENTINA_SALTA | "America/Argentina/Salta" | +| AMERICA_ARGENTINA_SAN_JUAN | "America/Argentina/San_Juan" | +| AMERICA_ARGENTINA_SAN_LUIS | "America/Argentina/San_Luis" | +| AMERICA_ARGENTINA_TUCUMAN | "America/Argentina/Tucuman" | +| AMERICA_ARGENTINA_USHUAIA | "America/Argentina/Ushuaia" | +| AMERICA_ARUBA | "America/Aruba" | +| AMERICA_ASUNCION | "America/Asuncion" | +| AMERICA_ATIKOKAN | "America/Atikokan" | +| AMERICA_ATKA | "America/Atka" | +| AMERICA_BAHIA | "America/Bahia" | +| AMERICA_BAHIA_BANDERAS | "America/Bahia_Banderas" | +| AMERICA_BARBADOS | "America/Barbados" | +| AMERICA_BELEM | "America/Belem" | +| AMERICA_BELIZE | "America/Belize" | +| AMERICA_BLANC_SABLON | "America/Blanc-Sablon" | +| AMERICA_BOA_VISTA | "America/Boa_Vista" | +| AMERICA_BOGOTA | "America/Bogota" | +| AMERICA_BOISE | "America/Boise" | +| AMERICA_BUENOS_AIRES | "America/Buenos_Aires" | +| AMERICA_CAMBRIDGE_BAY | "America/Cambridge_Bay" | +| AMERICA_CAMPO_GRANDE | "America/Campo_Grande" | +| AMERICA_CANCUN | "America/Cancun" | +| AMERICA_CARACAS | "America/Caracas" | +| AMERICA_CATAMARCA | "America/Catamarca" | +| AMERICA_CAYENNE | "America/Cayenne" | +| AMERICA_CAYMAN | "America/Cayman" | +| AMERICA_CHICAGO | "America/Chicago" | +| AMERICA_CHIHUAHUA | "America/Chihuahua" | +| AMERICA_CORAL_HARBOUR | "America/Coral_Harbour" | +| AMERICA_CORDOBA | "America/Cordoba" | +| AMERICA_COSTA_RICA | "America/Costa_Rica" | +| AMERICA_CRESTON | "America/Creston" | +| AMERICA_CUIABA | "America/Cuiaba" | +| AMERICA_CURACAO | "America/Curacao" | +| AMERICA_DANMARKSHAVN | "America/Danmarkshavn" | +| AMERICA_DAWSON | "America/Dawson" | +| AMERICA_DAWSON_CREEK | "America/Dawson_Creek" | +| AMERICA_DENVER | "America/Denver" | +| AMERICA_DETROIT | "America/Detroit" | +| AMERICA_DOMINICA | "America/Dominica" | +| AMERICA_EDMONTON | "America/Edmonton" | +| AMERICA_EIRUNEPE | "America/Eirunepe" | +| AMERICA_EL_SALVADOR | "America/El_Salvador" | +| AMERICA_ENSENADA | "America/Ensenada" | +| AMERICA_FORT_NELSON | "America/Fort_Nelson" | +| AMERICA_FORT_WAYNE | "America/Fort_Wayne" | +| AMERICA_FORTALEZA | "America/Fortaleza" | +| AMERICA_GLACE_BAY | "America/Glace_Bay" | +| AMERICA_GODTHAB | "America/Godthab" | +| AMERICA_GOOSE_BAY | "America/Goose_Bay" | +| AMERICA_GRAND_TURK | "America/Grand_Turk" | +| AMERICA_GRENADA | "America/Grenada" | +| AMERICA_GUADELOUPE | "America/Guadeloupe" | +| AMERICA_GUATEMALA | "America/Guatemala" | +| AMERICA_GUAYAQUIL | "America/Guayaquil" | +| AMERICA_GUYANA | "America/Guyana" | +| AMERICA_HALIFAX | "America/Halifax" | +| AMERICA_HAVANA | "America/Havana" | +| AMERICA_HERMOSILLO | "America/Hermosillo" | +| AMERICA_INDIANA_INDIANAPOLIS | "America/Indiana/Indianapolis" | +| AMERICA_INDIANA_KNOX | "America/Indiana/Knox" | +| AMERICA_INDIANA_MARENGO | "America/Indiana/Marengo" | +| AMERICA_INDIANA_PETERSBURG | "America/Indiana/Petersburg" | +| AMERICA_INDIANA_TELL_CITY | "America/Indiana/Tell_City" | +| AMERICA_INDIANA_VEVAY | "America/Indiana/Vevay" | +| AMERICA_INDIANA_VINCENNES | "America/Indiana/Vincennes" | +| AMERICA_INDIANA_WINAMAC | "America/Indiana/Winamac" | +| AMERICA_INDIANAPOLIS | "America/Indianapolis" | +| AMERICA_INUVIK | "America/Inuvik" | +| AMERICA_IQALUIT | "America/Iqaluit" | +| AMERICA_JAMAICA | "America/Jamaica" | +| AMERICA_JUJUY | "America/Jujuy" | +| AMERICA_JUNEAU | "America/Juneau" | +| AMERICA_KENTUCKY_LOUISVILLE | "America/Kentucky/Louisville" | +| AMERICA_KENTUCKY_MONTICELLO | "America/Kentucky/Monticello" | +| AMERICA_KNOX_IN | "America/Knox_IN" | +| AMERICA_KRALENDIJK | "America/Kralendijk" | +| AMERICA_LA_PAZ | "America/La_Paz" | +| AMERICA_LIMA | "America/Lima" | +| AMERICA_LOS_ANGELES | "America/Los_Angeles" | +| AMERICA_LOUISVILLE | "America/Louisville" | +| AMERICA_LOWER_PRINCES | "America/Lower_Princes" | +| AMERICA_MACEIO | "America/Maceio" | +| AMERICA_MANAGUA | "America/Managua" | +| AMERICA_MANAUS | "America/Manaus" | +| AMERICA_MARIGOT | "America/Marigot" | +| AMERICA_MARTINIQUE | "America/Martinique" | +| AMERICA_MATAMOROS | "America/Matamoros" | +| AMERICA_MAZATLAN | "America/Mazatlan" | +| AMERICA_MENDOZA | "America/Mendoza" | +| AMERICA_MENOMINEE | "America/Menominee" | +| AMERICA_MERIDA | "America/Merida" | +| AMERICA_METLAKATLA | "America/Metlakatla" | +| AMERICA_MEXICO_CITY | "America/Mexico_City" | +| AMERICA_MIQUELON | "America/Miquelon" | +| AMERICA_MONCTON | "America/Moncton" | +| AMERICA_MONTERREY | "America/Monterrey" | +| AMERICA_MONTEVIDEO | "America/Montevideo" | +| AMERICA_MONTREAL | "America/Montreal" | +| AMERICA_MONTSERRAT | "America/Montserrat" | +| AMERICA_NASSAU | "America/Nassau" | +| AMERICA_NEW_YORK | "America/New_York" | +| AMERICA_NIPIGON | "America/Nipigon" | +| AMERICA_NOME | "America/Nome" | +| AMERICA_NORONHA | "America/Noronha" | +| AMERICA_NORTH_DAKOTA_BEULAH | "America/North_Dakota/Beulah" | +| AMERICA_NORTH_DAKOTA_CENTER | "America/North_Dakota/Center" | +| AMERICA_NORTH_DAKOTA_NEW_SALEM | "America/North_Dakota/New_Salem" | +| AMERICA_NUUK | "America/Nuuk" | +| AMERICA_OJINAGA | "America/Ojinaga" | +| AMERICA_PANAMA | "America/Panama" | +| AMERICA_PANGNIRTUNG | "America/Pangnirtung" | +| AMERICA_PARAMARIBO | "America/Paramaribo" | +| AMERICA_PHOENIX | "America/Phoenix" | +| AMERICA_PORT_AU_PRINCE | "America/Port-au-Prince" | +| AMERICA_PORT_OF_SPAIN | "America/Port_of_Spain" | +| AMERICA_PORTO_ACRE | "America/Porto_Acre" | +| AMERICA_PORTO_VELHO | "America/Porto_Velho" | +| AMERICA_PUERTO_RICO | "America/Puerto_Rico" | +| AMERICA_PUNTA_ARENAS | "America/Punta_Arenas" | +| AMERICA_RAINY_RIVER | "America/Rainy_River" | +| AMERICA_RANKIN_INLET | "America/Rankin_Inlet" | +| AMERICA_RECIFE | "America/Recife" | +| AMERICA_REGINA | "America/Regina" | +| AMERICA_RESOLUTE | "America/Resolute" | +| AMERICA_RIO_BRANCO | "America/Rio_Branco" | +| AMERICA_ROSARIO | "America/Rosario" | +| AMERICA_SANTA_ISABEL | "America/Santa_Isabel" | +| AMERICA_SANTAREM | "America/Santarem" | +| AMERICA_SANTIAGO | "America/Santiago" | +| AMERICA_SANTO_DOMINGO | "America/Santo_Domingo" | +| AMERICA_SAO_PAULO | "America/Sao_Paulo" | +| AMERICA_SCORESBYSUND | "America/Scoresbysund" | +| AMERICA_SHIPROCK | "America/Shiprock" | +| AMERICA_SITKA | "America/Sitka" | +| AMERICA_ST_BARTHELEMY | "America/St_Barthelemy" | +| AMERICA_ST_JOHNS | "America/St_Johns" | +| AMERICA_ST_KITTS | "America/St_Kitts" | +| AMERICA_ST_LUCIA | "America/St_Lucia" | +| AMERICA_ST_THOMAS | "America/St_Thomas" | +| AMERICA_ST_VINCENT | "America/St_Vincent" | +| AMERICA_SWIFT_CURRENT | "America/Swift_Current" | +| AMERICA_TEGUCIGALPA | "America/Tegucigalpa" | +| AMERICA_THULE | "America/Thule" | +| AMERICA_THUNDER_BAY | "America/Thunder_Bay" | +| AMERICA_TIJUANA | "America/Tijuana" | +| AMERICA_TORONTO | "America/Toronto" | +| AMERICA_TORTOLA | "America/Tortola" | +| AMERICA_VANCOUVER | "America/Vancouver" | +| AMERICA_VIRGIN | "America/Virgin" | +| AMERICA_WHITEHORSE | "America/Whitehorse" | +| AMERICA_WINNIPEG | "America/Winnipeg" | +| AMERICA_YAKUTAT | "America/Yakutat" | +| AMERICA_YELLOWKNIFE | "America/Yellowknife" | +| ANTARCTICA_CASEY | "Antarctica/Casey" | +| ANTARCTICA_DAVIS | "Antarctica/Davis" | +| ANTARCTICA_DUMONT_D_URVILLE | "Antarctica/DumontDUrville" | +| ANTARCTICA_MACQUARIE | "Antarctica/Macquarie" | +| ANTARCTICA_MAWSON | "Antarctica/Mawson" | +| ANTARCTICA_MC_MURDO | "Antarctica/McMurdo" | +| ANTARCTICA_PALMER | "Antarctica/Palmer" | +| ANTARCTICA_ROTHERA | "Antarctica/Rothera" | +| ANTARCTICA_SOUTH_POLE | "Antarctica/South_Pole" | +| ANTARCTICA_SYOWA | "Antarctica/Syowa" | +| ANTARCTICA_TROLL | "Antarctica/Troll" | +| ANTARCTICA_VOSTOK | "Antarctica/Vostok" | +| ARCTIC_LONGYEARBYEN | "Arctic/Longyearbyen" | +| ASIA_ADEN | "Asia/Aden" | +| ASIA_ALMATY | "Asia/Almaty" | +| ASIA_AMMAN | "Asia/Amman" | +| ASIA_ANADYR | "Asia/Anadyr" | +| ASIA_AQTAU | "Asia/Aqtau" | +| ASIA_AQTOBE | "Asia/Aqtobe" | +| ASIA_ASHGABAT | "Asia/Ashgabat" | +| ASIA_ASHKHABAD | "Asia/Ashkhabad" | +| ASIA_ATYRAU | "Asia/Atyrau" | +| ASIA_BAGHDAD | "Asia/Baghdad" | +| ASIA_BAHRAIN | "Asia/Bahrain" | +| ASIA_BAKU | "Asia/Baku" | +| ASIA_BANGKOK | "Asia/Bangkok" | +| ASIA_BARNAUL | "Asia/Barnaul" | +| ASIA_BEIRUT | "Asia/Beirut" | +| ASIA_BISHKEK | "Asia/Bishkek" | +| ASIA_BRUNEI | "Asia/Brunei" | +| ASIA_CALCUTTA | "Asia/Calcutta" | +| ASIA_CHITA | "Asia/Chita" | +| ASIA_CHOIBALSAN | "Asia/Choibalsan" | +| ASIA_CHONGQING | "Asia/Chongqing" | +| ASIA_CHUNGKING | "Asia/Chungking" | +| ASIA_COLOMBO | "Asia/Colombo" | +| ASIA_DACCA | "Asia/Dacca" | +| ASIA_DAMASCUS | "Asia/Damascus" | +| ASIA_DHAKA | "Asia/Dhaka" | +| ASIA_DILI | "Asia/Dili" | +| ASIA_DUBAI | "Asia/Dubai" | +| ASIA_DUSHANBE | "Asia/Dushanbe" | +| ASIA_FAMAGUSTA | "Asia/Famagusta" | +| ASIA_GAZA | "Asia/Gaza" | +| ASIA_HARBIN | "Asia/Harbin" | +| ASIA_HEBRON | "Asia/Hebron" | +| ASIA_HO_CHI_MINH | "Asia/Ho_Chi_Minh" | +| ASIA_HONG_KONG | "Asia/Hong_Kong" | +| ASIA_HOVD | "Asia/Hovd" | +| ASIA_IRKUTSK | "Asia/Irkutsk" | +| ASIA_ISTANBUL | "Asia/Istanbul" | +| ASIA_JAKARTA | "Asia/Jakarta" | +| ASIA_JAYAPURA | "Asia/Jayapura" | +| ASIA_JERUSALEM | "Asia/Jerusalem" | +| ASIA_KABUL | "Asia/Kabul" | +| ASIA_KAMCHATKA | "Asia/Kamchatka" | +| ASIA_KARACHI | "Asia/Karachi" | +| ASIA_KASHGAR | "Asia/Kashgar" | +| ASIA_KATHMANDU | "Asia/Kathmandu" | +| ASIA_KATMANDU | "Asia/Katmandu" | +| ASIA_KHANDYGA | "Asia/Khandyga" | +| ASIA_KOLKATA | "Asia/Kolkata" | +| ASIA_KRASNOYARSK | "Asia/Krasnoyarsk" | +| ASIA_KUALA_LUMPUR | "Asia/Kuala_Lumpur" | +| ASIA_KUCHING | "Asia/Kuching" | +| ASIA_KUWAIT | "Asia/Kuwait" | +| ASIA_MACAO | "Asia/Macao" | +| ASIA_MACAU | "Asia/Macau" | +| ASIA_MAGADAN | "Asia/Magadan" | +| ASIA_MAKASSAR | "Asia/Makassar" | +| ASIA_MANILA | "Asia/Manila" | +| ASIA_MUSCAT | "Asia/Muscat" | +| ASIA_NICOSIA | "Asia/Nicosia" | +| ASIA_NOVOKUZNETSK | "Asia/Novokuznetsk" | +| ASIA_NOVOSIBIRSK | "Asia/Novosibirsk" | +| ASIA_OMSK | "Asia/Omsk" | +| ASIA_ORAL | "Asia/Oral" | +| ASIA_PHNOM_PENH | "Asia/Phnom_Penh" | +| ASIA_PONTIANAK | "Asia/Pontianak" | +| ASIA_PYONGYANG | "Asia/Pyongyang" | +| ASIA_QATAR | "Asia/Qatar" | +| ASIA_QOSTANAY | "Asia/Qostanay" | +| ASIA_QYZYLORDA | "Asia/Qyzylorda" | +| ASIA_RANGOON | "Asia/Rangoon" | +| ASIA_RIYADH | "Asia/Riyadh" | +| ASIA_SAIGON | "Asia/Saigon" | +| ASIA_SAKHALIN | "Asia/Sakhalin" | +| ASIA_SAMARKAND | "Asia/Samarkand" | +| ASIA_SEOUL | "Asia/Seoul" | +| ASIA_SHANGHAI | "Asia/Shanghai" | +| ASIA_SINGAPORE | "Asia/Singapore" | +| ASIA_SREDNEKOLYMSK | "Asia/Srednekolymsk" | +| ASIA_TAIPEI | "Asia/Taipei" | +| ASIA_TASHKENT | "Asia/Tashkent" | +| ASIA_TBILISI | "Asia/Tbilisi" | +| ASIA_TEHRAN | "Asia/Tehran" | +| ASIA_TEL_AVIV | "Asia/Tel_Aviv" | +| ASIA_THIMBU | "Asia/Thimbu" | +| ASIA_THIMPHU | "Asia/Thimphu" | +| ASIA_TOKYO | "Asia/Tokyo" | +| ASIA_TOMSK | "Asia/Tomsk" | +| ASIA_UJUNG_PANDANG | "Asia/Ujung_Pandang" | +| ASIA_ULAANBAATAR | "Asia/Ulaanbaatar" | +| ASIA_ULAN_BATOR | "Asia/Ulan_Bator" | +| ASIA_URUMQI | "Asia/Urumqi" | +| ASIA_UST_NERA | "Asia/Ust-Nera" | +| ASIA_VIENTIANE | "Asia/Vientiane" | +| ASIA_VLADIVOSTOK | "Asia/Vladivostok" | +| ASIA_YAKUTSK | "Asia/Yakutsk" | +| ASIA_YANGON | "Asia/Yangon" | +| ASIA_YEKATERINBURG | "Asia/Yekaterinburg" | +| ASIA_YEREVAN | "Asia/Yerevan" | +| ATLANTIC_AZORES | "Atlantic/Azores" | +| ATLANTIC_BERMUDA | "Atlantic/Bermuda" | +| ATLANTIC_CANARY | "Atlantic/Canary" | +| ATLANTIC_CAPE_VERDE | "Atlantic/Cape_Verde" | +| ATLANTIC_FAEROE | "Atlantic/Faeroe" | +| ATLANTIC_FAROE | "Atlantic/Faroe" | +| ATLANTIC_JAN_MAYEN | "Atlantic/Jan_Mayen" | +| ATLANTIC_MADEIRA | "Atlantic/Madeira" | +| ATLANTIC_REYKJAVIK | "Atlantic/Reykjavik" | +| ATLANTIC_SOUTH_GEORGIA | "Atlantic/South_Georgia" | +| ATLANTIC_ST_HELENA | "Atlantic/St_Helena" | +| ATLANTIC_STANLEY | "Atlantic/Stanley" | +| AUSTRALIA_ACT | "Australia/ACT" | +| AUSTRALIA_ADELAIDE | "Australia/Adelaide" | +| AUSTRALIA_BRISBANE | "Australia/Brisbane" | +| AUSTRALIA_BROKEN_HILL | "Australia/Broken_Hill" | +| AUSTRALIA_CANBERRA | "Australia/Canberra" | +| AUSTRALIA_CURRIE | "Australia/Currie" | +| AUSTRALIA_DARWIN | "Australia/Darwin" | +| AUSTRALIA_EUCLA | "Australia/Eucla" | +| AUSTRALIA_HOBART | "Australia/Hobart" | +| AUSTRALIA_LHI | "Australia/LHI" | +| AUSTRALIA_LINDEMAN | "Australia/Lindeman" | +| AUSTRALIA_LORD_HOWE | "Australia/Lord_Howe" | +| AUSTRALIA_MELBOURNE | "Australia/Melbourne" | +| AUSTRALIA_NSW | "Australia/NSW" | +| AUSTRALIA_NORTH | "Australia/North" | +| AUSTRALIA_PERTH | "Australia/Perth" | +| AUSTRALIA_QUEENSLAND | "Australia/Queensland" | +| AUSTRALIA_SOUTH | "Australia/South" | +| AUSTRALIA_SYDNEY | "Australia/Sydney" | +| AUSTRALIA_TASMANIA | "Australia/Tasmania" | +| AUSTRALIA_VICTORIA | "Australia/Victoria" | +| AUSTRALIA_WEST | "Australia/West" | +| AUSTRALIA_YANCOWINNA | "Australia/Yancowinna" | +| BRAZIL_ACRE | "Brazil/Acre" | +| BRAZIL_DE_NORONHA | "Brazil/DeNoronha" | +| BRAZIL_EAST | "Brazil/East" | +| BRAZIL_WEST | "Brazil/West" | +| CET | "CET" | +| CST6_CDT | "CST6CDT" | +| CANADA_ATLANTIC | "Canada/Atlantic" | +| CANADA_CENTRAL | "Canada/Central" | +| CANADA_EASTERN | "Canada/Eastern" | +| CANADA_MOUNTAIN | "Canada/Mountain" | +| CANADA_NEWFOUNDLAND | "Canada/Newfoundland" | +| CANADA_PACIFIC | "Canada/Pacific" | +| CANADA_SASKATCHEWAN | "Canada/Saskatchewan" | +| CANADA_YUKON | "Canada/Yukon" | +| CHILE_CONTINENTAL | "Chile/Continental" | +| CHILE_EASTER_ISLAND | "Chile/EasterIsland" | +| CUBA | "Cuba" | +| EET | "EET" | +| EST5_EDT | "EST5EDT" | +| EGYPT | "Egypt" | +| EIRE | "Eire" | +| ETC_GMT | "Etc/GMT" | +| ETC_GMT_0 | "Etc/GMT+0" | +| ETC_GMT_1 | "Etc/GMT+1" | +| ETC_GMT_10 | "Etc/GMT+10" | +| ETC_GMT_11 | "Etc/GMT+11" | +| ETC_GMT_122 | "Etc/GMT+12" | +| ETC_GMT_2 | "Etc/GMT+2" | +| ETC_GMT_3 | "Etc/GMT+3" | +| ETC_GMT_4 | "Etc/GMT+4" | +| ETC_GMT_5 | "Etc/GMT+5" | +| ETC_GMT_6 | "Etc/GMT+6" | +| ETC_GMT_7 | "Etc/GMT+7" | +| ETC_GMT_8 | "Etc/GMT+8" | +| ETC_GMT_9 | "Etc/GMT+9" | +| ETC_GMT_02 | "Etc/GMT-0" | +| ETC_GMT_12 | "Etc/GMT-1" | +| ETC_GMT_102 | "Etc/GMT-10" | +| ETC_GMT_112 | "Etc/GMT-11" | +| ETC_GMT_122 | "Etc/GMT-12" | +| ETC_GMT_13 | "Etc/GMT-13" | +| ETC_GMT_14 | "Etc/GMT-14" | +| ETC_GMT_22 | "Etc/GMT-2" | +| ETC_GMT_32 | "Etc/GMT-3" | +| ETC_GMT_42 | "Etc/GMT-4" | +| ETC_GMT_52 | "Etc/GMT-5" | +| ETC_GMT_62 | "Etc/GMT-6" | +| ETC_GMT_72 | "Etc/GMT-7" | +| ETC_GMT_82 | "Etc/GMT-8" | +| ETC_GMT_92 | "Etc/GMT-9" | +| ETC_GMT0 | "Etc/GMT0" | +| ETC_GREENWICH | "Etc/Greenwich" | +| ETC_UCT | "Etc/UCT" | +| ETC_UTC | "Etc/UTC" | +| ETC_UNIVERSAL | "Etc/Universal" | +| ETC_ZULU | "Etc/Zulu" | +| EUROPE_AMSTERDAM | "Europe/Amsterdam" | +| EUROPE_ANDORRA | "Europe/Andorra" | +| EUROPE_ASTRAKHAN | "Europe/Astrakhan" | +| EUROPE_ATHENS | "Europe/Athens" | +| EUROPE_BELFAST | "Europe/Belfast" | +| EUROPE_BELGRADE | "Europe/Belgrade" | +| EUROPE_BERLIN | "Europe/Berlin" | +| EUROPE_BRATISLAVA | "Europe/Bratislava" | +| EUROPE_BRUSSELS | "Europe/Brussels" | +| EUROPE_BUCHAREST | "Europe/Bucharest" | +| EUROPE_BUDAPEST | "Europe/Budapest" | +| EUROPE_BUSINGEN | "Europe/Busingen" | +| EUROPE_CHISINAU | "Europe/Chisinau" | +| EUROPE_COPENHAGEN | "Europe/Copenhagen" | +| EUROPE_DUBLIN | "Europe/Dublin" | +| EUROPE_GIBRALTAR | "Europe/Gibraltar" | +| EUROPE_GUERNSEY | "Europe/Guernsey" | +| EUROPE_HELSINKI | "Europe/Helsinki" | +| EUROPE_ISLE_OF_MAN | "Europe/Isle_of_Man" | +| EUROPE_ISTANBUL | "Europe/Istanbul" | +| EUROPE_JERSEY | "Europe/Jersey" | +| EUROPE_KALININGRAD | "Europe/Kaliningrad" | +| EUROPE_KIEV | "Europe/Kiev" | +| EUROPE_KIROV | "Europe/Kirov" | +| EUROPE_KYIV | "Europe/Kyiv" | +| EUROPE_LISBON | "Europe/Lisbon" | +| EUROPE_LJUBLJANA | "Europe/Ljubljana" | +| EUROPE_LONDON | "Europe/London" | +| EUROPE_LUXEMBOURG | "Europe/Luxembourg" | +| EUROPE_MADRID | "Europe/Madrid" | +| EUROPE_MALTA | "Europe/Malta" | +| EUROPE_MARIEHAMN | "Europe/Mariehamn" | +| EUROPE_MINSK | "Europe/Minsk" | +| EUROPE_MONACO | "Europe/Monaco" | +| EUROPE_MOSCOW | "Europe/Moscow" | +| EUROPE_NICOSIA | "Europe/Nicosia" | +| EUROPE_OSLO | "Europe/Oslo" | +| EUROPE_PARIS | "Europe/Paris" | +| EUROPE_PODGORICA | "Europe/Podgorica" | +| EUROPE_PRAGUE | "Europe/Prague" | +| EUROPE_RIGA | "Europe/Riga" | +| EUROPE_ROME | "Europe/Rome" | +| EUROPE_SAMARA | "Europe/Samara" | +| EUROPE_SAN_MARINO | "Europe/San_Marino" | +| EUROPE_SARAJEVO | "Europe/Sarajevo" | +| EUROPE_SARATOV | "Europe/Saratov" | +| EUROPE_SIMFEROPOL | "Europe/Simferopol" | +| EUROPE_SKOPJE | "Europe/Skopje" | +| EUROPE_SOFIA | "Europe/Sofia" | +| EUROPE_STOCKHOLM | "Europe/Stockholm" | +| EUROPE_TALLINN | "Europe/Tallinn" | +| EUROPE_TIRANE | "Europe/Tirane" | +| EUROPE_TIRASPOL | "Europe/Tiraspol" | +| EUROPE_ULYANOVSK | "Europe/Ulyanovsk" | +| EUROPE_UZHGOROD | "Europe/Uzhgorod" | +| EUROPE_VADUZ | "Europe/Vaduz" | +| EUROPE_VATICAN | "Europe/Vatican" | +| EUROPE_VIENNA | "Europe/Vienna" | +| EUROPE_VILNIUS | "Europe/Vilnius" | +| EUROPE_VOLGOGRAD | "Europe/Volgograd" | +| EUROPE_WARSAW | "Europe/Warsaw" | +| EUROPE_ZAGREB | "Europe/Zagreb" | +| EUROPE_ZAPOROZHYE | "Europe/Zaporozhye" | +| EUROPE_ZURICH | "Europe/Zurich" | +| GB | "GB" | +| GB_EIRE | "GB-Eire" | +| GMT | "GMT" | +| GMT0 | "GMT0" | +| GREENWICH | "Greenwich" | +| HONGKONG | "Hongkong" | +| ICELAND | "Iceland" | +| INDIAN_ANTANANARIVO | "Indian/Antananarivo" | +| INDIAN_CHAGOS | "Indian/Chagos" | +| INDIAN_CHRISTMAS | "Indian/Christmas" | +| INDIAN_COCOS | "Indian/Cocos" | +| INDIAN_COMORO | "Indian/Comoro" | +| INDIAN_KERGUELEN | "Indian/Kerguelen" | +| INDIAN_MAHE | "Indian/Mahe" | +| INDIAN_MALDIVES | "Indian/Maldives" | +| INDIAN_MAURITIUS | "Indian/Mauritius" | +| INDIAN_MAYOTTE | "Indian/Mayotte" | +| INDIAN_REUNION | "Indian/Reunion" | +| IRAN | "Iran" | +| ISRAEL | "Israel" | +| JAMAICA | "Jamaica" | +| JAPAN | "Japan" | +| KWAJALEIN | "Kwajalein" | +| LIBYA | "Libya" | +| MET | "MET" | +| MST7_MDT | "MST7MDT" | +| MEXICO_BAJA_NORTE | "Mexico/BajaNorte" | +| MEXICO_BAJA_SUR | "Mexico/BajaSur" | +| MEXICO_GENERAL | "Mexico/General" | +| NZ | "NZ" | +| NZ_CHAT | "NZ-CHAT" | +| NAVAJO | "Navajo" | +| PRC | "PRC" | +| PST8_PDT | "PST8PDT" | +| PACIFIC_APIA | "Pacific/Apia" | +| PACIFIC_AUCKLAND | "Pacific/Auckland" | +| PACIFIC_BOUGAINVILLE | "Pacific/Bougainville" | +| PACIFIC_CHATHAM | "Pacific/Chatham" | +| PACIFIC_CHUUK | "Pacific/Chuuk" | +| PACIFIC_EASTER | "Pacific/Easter" | +| PACIFIC_EFATE | "Pacific/Efate" | +| PACIFIC_ENDERBURY | "Pacific/Enderbury" | +| PACIFIC_FAKAOFO | "Pacific/Fakaofo" | +| PACIFIC_FIJI | "Pacific/Fiji" | +| PACIFIC_FUNAFUTI | "Pacific/Funafuti" | +| PACIFIC_GALAPAGOS | "Pacific/Galapagos" | +| PACIFIC_GAMBIER | "Pacific/Gambier" | +| PACIFIC_GUADALCANAL | "Pacific/Guadalcanal" | +| PACIFIC_GUAM | "Pacific/Guam" | +| PACIFIC_HONOLULU | "Pacific/Honolulu" | +| PACIFIC_JOHNSTON | "Pacific/Johnston" | +| PACIFIC_KANTON | "Pacific/Kanton" | +| PACIFIC_KIRITIMATI | "Pacific/Kiritimati" | +| PACIFIC_KOSRAE | "Pacific/Kosrae" | +| PACIFIC_KWAJALEIN | "Pacific/Kwajalein" | +| PACIFIC_MAJURO | "Pacific/Majuro" | +| PACIFIC_MARQUESAS | "Pacific/Marquesas" | +| PACIFIC_MIDWAY | "Pacific/Midway" | +| PACIFIC_NAURU | "Pacific/Nauru" | +| PACIFIC_NIUE | "Pacific/Niue" | +| PACIFIC_NORFOLK | "Pacific/Norfolk" | +| PACIFIC_NOUMEA | "Pacific/Noumea" | +| PACIFIC_PAGO_PAGO | "Pacific/Pago_Pago" | +| PACIFIC_PALAU | "Pacific/Palau" | +| PACIFIC_PITCAIRN | "Pacific/Pitcairn" | +| PACIFIC_POHNPEI | "Pacific/Pohnpei" | +| PACIFIC_PONAPE | "Pacific/Ponape" | +| PACIFIC_PORT_MORESBY | "Pacific/Port_Moresby" | +| PACIFIC_RAROTONGA | "Pacific/Rarotonga" | +| PACIFIC_SAIPAN | "Pacific/Saipan" | +| PACIFIC_SAMOA | "Pacific/Samoa" | +| PACIFIC_TAHITI | "Pacific/Tahiti" | +| PACIFIC_TARAWA | "Pacific/Tarawa" | +| PACIFIC_TONGATAPU | "Pacific/Tongatapu" | +| PACIFIC_TRUK | "Pacific/Truk" | +| PACIFIC_WAKE | "Pacific/Wake" | +| PACIFIC_WALLIS | "Pacific/Wallis" | +| PACIFIC_YAP | "Pacific/Yap" | +| POLAND | "Poland" | +| PORTUGAL | "Portugal" | +| ROK | "ROK" | +| SINGAPORE | "Singapore" | +| SYSTEM_V_AST4 | "SystemV/AST4" | +| SYSTEM_V_AST4_ADT | "SystemV/AST4ADT" | +| SYSTEM_V_CST6 | "SystemV/CST6" | +| SYSTEM_V_CST6_CDT | "SystemV/CST6CDT" | +| SYSTEM_V_EST5 | "SystemV/EST5" | +| SYSTEM_V_EST5_EDT | "SystemV/EST5EDT" | +| SYSTEM_V_HST10 | "SystemV/HST10" | +| SYSTEM_V_MST7 | "SystemV/MST7" | +| SYSTEM_V_MST7_MDT | "SystemV/MST7MDT" | +| SYSTEM_V_PST8 | "SystemV/PST8" | +| SYSTEM_V_PST8_PDT | "SystemV/PST8PDT" | +| SYSTEM_V_YST9 | "SystemV/YST9" | +| SYSTEM_V_YST9_YDT | "SystemV/YST9YDT" | +| TURKEY | "Turkey" | +| UCT | "UCT" | +| US_ALASKA | "US/Alaska" | +| US_ALEUTIAN | "US/Aleutian" | +| US_ARIZONA | "US/Arizona" | +| US_CENTRAL | "US/Central" | +| US_EAST_INDIANA | "US/East-Indiana" | +| US_EASTERN | "US/Eastern" | +| US_HAWAII | "US/Hawaii" | +| US_INDIANA_STARKE | "US/Indiana-Starke" | +| US_MICHIGAN | "US/Michigan" | +| US_MOUNTAIN | "US/Mountain" | +| US_PACIFIC | "US/Pacific" | +| US_SAMOA | "US/Samoa" | +| UTC | "UTC" | +| UNIVERSAL | "Universal" | +| W_SU | "W-SU" | +| WET | "WET" | +| ZULU | "Zulu" | +| EST | "EST" | +| HST | "HST" | +| MST | "MST" | +| ACT | "ACT" | +| AET | "AET" | +| AGT | "AGT" | +| ART | "ART" | +| AST | "AST" | +| BET | "BET" | +| BST | "BST" | +| CAT | "CAT" | +| CNT | "CNT" | +| CST | "CST" | +| CTT | "CTT" | +| EAT | "EAT" | +| ECT | "ECT" | +| IET | "IET" | +| IST | "IST" | +| JST | "JST" | +| MIT | "MIT" | +| NET | "NET" | +| NST | "NST" | +| PLT | "PLT" | +| PNT | "PNT" | +| PRT | "PRT" | +| PST | "PST" | +| SST | "SST" | +| VST | "VST" | + + +## Implemented Interfaces + +* Serializable + + diff --git a/sdks/java/docs/CreateTagRequest.md b/sdks/java/docs/CreateTagRequest.md new file mode 100644 index 000000000..76fff371f --- /dev/null +++ b/sdks/java/docs/CreateTagRequest.md @@ -0,0 +1,18 @@ + + +# CreateTagRequest + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**name** | **String** | Name of the tag. | | +|**color** | **String** | Hex color code to be assigned to the tag. For example, #ff78a9. | [optional] | + + +## Implemented Interfaces + +* Serializable + + diff --git a/sdks/java/docs/CreateUserGroupRequest.md b/sdks/java/docs/CreateUserGroupRequest.md new file mode 100644 index 000000000..29a80fdec --- /dev/null +++ b/sdks/java/docs/CreateUserGroupRequest.md @@ -0,0 +1,88 @@ + + +# CreateUserGroupRequest + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**name** | **String** | Name of the group. The group name must be unique. | | +|**displayName** | **String** | Display name for the group. | | +|**defaultLiveboardIdentifiers** | **List<String>** | GUID of the Liveboards to assign as default Liveboards to the users in the group. | [optional] | +|**description** | **String** | Description of the group | [optional] | +|**privileges** | [**List<PrivilegesEnum>**](#List<PrivilegesEnum>) | Privileges to assign to the group | [optional] | +|**subGroupIdentifiers** | **List<String>** | GUID or name of the sub groups. A subgroup is a group assigned to a parent group. | [optional] | +|**type** | [**TypeEnum**](#TypeEnum) | Group type. | [optional] | +|**userIdentifiers** | **List<String>** | GUID or name of the users to assign to the group. | [optional] | +|**visibility** | [**VisibilityEnum**](#VisibilityEnum) | Visibility of the group. To make a group visible to other users and groups, set the visibility to SHAREABLE. | [optional] | +|**roleIdentifiers** | **List<String>** | Role identifiers of the roles that should be assigned to the group. | [optional] | + + + +## Enum: List<PrivilegesEnum> + +| Name | Value | +|---- | -----| +| ADMINISTRATION | "ADMINISTRATION" | +| AUTHORING | "AUTHORING" | +| USERDATAUPLOADING | "USERDATAUPLOADING" | +| DATADOWNLOADING | "DATADOWNLOADING" | +| USERMANAGEMENT | "USERMANAGEMENT" | +| DATAMANAGEMENT | "DATAMANAGEMENT" | +| SHAREWITHALL | "SHAREWITHALL" | +| JOBSCHEDULING | "JOBSCHEDULING" | +| A3_ANALYSIS | "A3ANALYSIS" | +| EXPERIMENTALFEATUREPRIVILEGE | "EXPERIMENTALFEATUREPRIVILEGE" | +| BYPASSRLS | "BYPASSRLS" | +| RANALYSIS | "RANALYSIS" | +| DEVELOPER | "DEVELOPER" | +| USER_ADMINISTRATION | "USER_ADMINISTRATION" | +| GROUP_ADMINISTRATION | "GROUP_ADMINISTRATION" | +| SYNCMANAGEMENT | "SYNCMANAGEMENT" | +| CAN_CREATE_CATALOG | "CAN_CREATE_CATALOG" | +| DISABLE_PINBOARD_CREATION | "DISABLE_PINBOARD_CREATION" | +| LIVEBOARD_VERIFIER | "LIVEBOARD_VERIFIER" | +| PREVIEW_THOUGHTSPOT_SAGE | "PREVIEW_THOUGHTSPOT_SAGE" | +| CAN_MANAGE_VERSION_CONTROL | "CAN_MANAGE_VERSION_CONTROL" | +| THIRDPARTY_ANALYSIS | "THIRDPARTY_ANALYSIS" | +| ALLOW_NON_EMBED_FULL_APP_ACCESS | "ALLOW_NON_EMBED_FULL_APP_ACCESS" | +| CAN_ACCESS_ANALYST_STUDIO | "CAN_ACCESS_ANALYST_STUDIO" | +| CAN_MANAGE_ANALYST_STUDIO | "CAN_MANAGE_ANALYST_STUDIO" | +| CAN_MODIFY_FOLDERS | "CAN_MODIFY_FOLDERS" | +| CAN_MANAGE_VARIABLES | "CAN_MANAGE_VARIABLES" | +| CAN_VIEW_FOLDERS | "CAN_VIEW_FOLDERS" | +| CAN_MANAGE_AGENTSPOT | "CAN_MANAGE_AGENTSPOT" | +| CAN_ACCESS_AGENTSPOT | "CAN_ACCESS_AGENTSPOT" | +| PREVIEW_DOCUMENT_SEARCH | "PREVIEW_DOCUMENT_SEARCH" | +| CAN_SETUP_VERSION_CONTROL | "CAN_SETUP_VERSION_CONTROL" | +| CAN_DOWNLOAD_VISUALS | "CAN_DOWNLOAD_VISUALS" | +| CAN_DOWNLOAD_DETAILED_DATA | "CAN_DOWNLOAD_DETAILED_DATA" | +| CAN_USE_SPOTTER | "CAN_USE_SPOTTER" | + + + +## Enum: TypeEnum + +| Name | Value | +|---- | -----| +| LOCAL_GROUP | "LOCAL_GROUP" | +| LDAP_GROUP | "LDAP_GROUP" | +| TEAM_GROUP | "TEAM_GROUP" | +| TENANT_GROUP | "TENANT_GROUP" | + + + +## Enum: VisibilityEnum + +| Name | Value | +|---- | -----| +| SHARABLE | "SHARABLE" | +| NON_SHARABLE | "NON_SHARABLE" | + + +## Implemented Interfaces + +* Serializable + + diff --git a/sdks/java/docs/CreateUserRequest.md b/sdks/java/docs/CreateUserRequest.md new file mode 100644 index 000000000..6ed6f612b --- /dev/null +++ b/sdks/java/docs/CreateUserRequest.md @@ -0,0 +1,104 @@ + + +# CreateUserRequest + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**name** | **String** | Name of the user. The username string must be unique. | | +|**displayName** | **String** | A unique display name string for the user account, usually their first and last name | | +|**password** | **String** | Password for the user account. For IAMv2 users, you must set this password if you do not want to trigger an activation email. | [optional] | +|**email** | **String** | Email of the user account | | +|**accountType** | [**AccountTypeEnum**](#AccountTypeEnum) | Type of the account. | [optional] | +|**accountStatus** | [**AccountStatusEnum**](#AccountStatusEnum) | Current status of the user account. The `SUSPENDED` user state indicates a transitional state applicable to IAMv2 users only. | [optional] | +|**orgIdentifiers** | **List<String>** | List of Org IDs to which the user belongs. | [optional] | +|**groupIdentifiers** | **List<String>** | GUIDs or names of the groups to which the newly created user belongs. | [optional] | +|**visibility** | [**VisibilityEnum**](#VisibilityEnum) | Visibility of the users. When set to SHARABLE, the user is visible to other users and groups when they try to share an object. | [optional] | +|**notifyOnShare** | **Boolean** | User preference for receiving email notifications when another ThoughtSpot user shares a metadata object such as Answer, Liveboard, or Worksheet. | [optional] | +|**showOnboardingExperience** | **Boolean** | The user preference for revisiting the onboarding experience. | [optional] | +|**onboardingExperienceCompleted** | **Boolean** | flag to get the on-boarding experience is completed or not. | [optional] | +|**homeLiveboardIdentifier** | **String** | GUID of the Liveboard to set a default Liveboard for the user. ThoughtSpot displays this Liveboard on the Home page when the user logs in. | [optional] | +|**favoriteMetadata** | [**List<FavoriteMetadataInput>**](FavoriteMetadataInput.md) | Metadata objects to add to the user's favorites list. | [optional] | +|**preferredLocale** | [**PreferredLocaleEnum**](#PreferredLocaleEnum) | Locale for the user. When setting this value, do not set use_browser_language to true, otherwise the browser's language setting will take precedence and the preferred_locale value will be ignored. | [optional] | +|**useBrowserLanguage** | **Boolean** | Flag to indicate whether to use the browser locale for the user in the UI. When set to true, the preferred_locale value is unset and the browser's language setting takes precedence. Version: 26.3.0.cl or later | [optional] | +|**extendedProperties** | **Object** | Properties for the user | [optional] | +|**extendedPreferences** | **Object** | Preferences for the user | [optional] | +|**triggerWelcomeEmail** | **Boolean** | Flag to indicate whether welcome email should be sent to user. This parameter is applied only on clusters on which IAM is disabled. | [optional] | +|**triggerActivationEmail** | **Boolean** | Flag to indicate whether activation email should be sent to the user. Default value for IAMv2 users is set to true. Users must either set this to false, or enter a valid password if they do not want to trigger an activation email. | [optional] | + + + +## Enum: AccountTypeEnum + +| Name | Value | +|---- | -----| +| LOCAL_USER | "LOCAL_USER" | +| LDAP_USER | "LDAP_USER" | +| SAML_USER | "SAML_USER" | +| OIDC_USER | "OIDC_USER" | +| REMOTE_USER | "REMOTE_USER" | + + + +## Enum: AccountStatusEnum + +| Name | Value | +|---- | -----| +| ACTIVE | "ACTIVE" | +| INACTIVE | "INACTIVE" | +| EXPIRED | "EXPIRED" | +| LOCKED | "LOCKED" | +| PENDING | "PENDING" | +| SUSPENDED | "SUSPENDED" | + + + +## Enum: VisibilityEnum + +| Name | Value | +|---- | -----| +| SHARABLE | "SHARABLE" | +| NON_SHARABLE | "NON_SHARABLE" | + + + +## Enum: PreferredLocaleEnum + +| Name | Value | +|---- | -----| +| EN_CA | "en-CA" | +| EN_GB | "en-GB" | +| EN_US | "en-US" | +| DE_DE | "de-DE" | +| JA_JP | "ja-JP" | +| ZH_CN | "zh-CN" | +| PT_BR | "pt-BR" | +| FR_FR | "fr-FR" | +| FR_CA | "fr-CA" | +| ES_US | "es-US" | +| DA_DK | "da-DK" | +| ES_ES | "es-ES" | +| FI_FI | "fi-FI" | +| SV_SE | "sv-SE" | +| NB_NO | "nb-NO" | +| PT_PT | "pt-PT" | +| NL_NL | "nl-NL" | +| IT_IT | "it-IT" | +| RU_RU | "ru-RU" | +| EN_IN | "en-IN" | +| DE_CH | "de-CH" | +| EN_NZ | "en-NZ" | +| ES_MX | "es-MX" | +| EN_AU | "en-AU" | +| ZH_HANT | "zh-Hant" | +| KO_KR | "ko-KR" | +| EN_DE | "en-DE" | + + +## Implemented Interfaces + +* Serializable + + diff --git a/sdks/java/docs/CreateVariableRequest.md b/sdks/java/docs/CreateVariableRequest.md new file mode 100644 index 000000000..fa085062c --- /dev/null +++ b/sdks/java/docs/CreateVariableRequest.md @@ -0,0 +1,44 @@ + + +# CreateVariableRequest + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**type** | [**TypeEnum**](#TypeEnum) | Type of variable | | +|**name** | **String** | Name of the variable. This is unique across the cluster. | | +|**isSensitive** | **Boolean** | If the variable contains sensitive values like passwords | [optional] | +|**dataType** | [**DataTypeEnum**](#DataTypeEnum) | Variable Data Type, only for formula_variable type, leave empty for others Version: 10.15.0.cl or later | [optional] | + + + +## Enum: TypeEnum + +| Name | Value | +|---- | -----| +| CONNECTION_PROPERTY | "CONNECTION_PROPERTY" | +| TABLE_MAPPING | "TABLE_MAPPING" | +| CONNECTION_PROPERTY_PER_PRINCIPAL | "CONNECTION_PROPERTY_PER_PRINCIPAL" | +| FORMULA_VARIABLE | "FORMULA_VARIABLE" | + + + +## Enum: DataTypeEnum + +| Name | Value | +|---- | -----| +| VARCHAR | "VARCHAR" | +| INT32 | "INT32" | +| INT64 | "INT64" | +| DOUBLE | "DOUBLE" | +| DATE | "DATE" | +| DATE_TIME | "DATE_TIME" | + + +## Implemented Interfaces + +* Serializable + + diff --git a/sdks/java/docs/CreateWebhookConfigurationRequest.md b/sdks/java/docs/CreateWebhookConfigurationRequest.md new file mode 100644 index 000000000..41e7327ce --- /dev/null +++ b/sdks/java/docs/CreateWebhookConfigurationRequest.md @@ -0,0 +1,33 @@ + + +# CreateWebhookConfigurationRequest + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**name** | **String** | Name of the webhook configuration. | | +|**description** | **String** | Description of the webhook configuration. | [optional] | +|**url** | **String** | The webhook endpoint URL. | | +|**urlParams** | **Object** | Additional URL parameters as key-value pairs. | [optional] | +|**events** | [**List<EventsEnum>**](#List<EventsEnum>) | List of events to subscribe to. | | +|**authentication** | [**WebhookAuthenticationInput**](WebhookAuthenticationInput.md) | Authorization configuration for the webhook. | [optional] | +|**signatureVerification** | [**WebhookSignatureVerificationInput**](WebhookSignatureVerificationInput.md) | Configuration for webhook signature verification. | [optional] | +|**storageDestination** | [**StorageDestinationInput**](StorageDestinationInput.md) | Configuration for storage destination. Example: {\"storage_type\": \"AWS_S3\", \"storage_config\": {\"aws_s3_config\": {\"bucket_name\": \"my-webhook-files\", \"region\": \"us-west-2\", \"role_arn\": \"arn:aws:iam::123456789012:role/ThoughtSpotDeliveryRole\", \"external_id\": \"ts-webhook-a1b2c3d4-7890\", \"path_prefix\": \"thoughtspot-webhooks/\"}}} Version: 26.3.0.cl or later | [optional] | +|**additionalHeaders** | [**List<WebhookKeyValuePairInput>**](WebhookKeyValuePairInput.md) | Additional headers as an array of key-value pairs. Example: [{\"key\": \"X-Custom-Header\", \"value\": \"custom_value\"}] Version: 26.4.0.cl or later | [optional] | + + + +## Enum: List<EventsEnum> + +| Name | Value | +|---- | -----| +| LIVEBOARD_SCHEDULE | "LIVEBOARD_SCHEDULE" | + + +## Implemented Interfaces + +* Serializable + + diff --git a/sdks/java/docs/CronExpression.md b/sdks/java/docs/CronExpression.md new file mode 100644 index 000000000..a365d8593 --- /dev/null +++ b/sdks/java/docs/CronExpression.md @@ -0,0 +1,23 @@ + + +# CronExpression + +Schedule selected cron expression. + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**dayOfMonth** | **String** | Day of month of the object. | | +|**dayOfWeek** | **String** | Day of Week of the object. | | +|**hour** | **String** | Hour of the object. | | +|**minute** | **String** | Minute of the object. | | +|**month** | **String** | Month of the object. | | +|**second** | **String** | Second of the object. | | + + +## Implemented Interfaces + +* Serializable + + diff --git a/sdks/java/docs/CronExpressionInput.md b/sdks/java/docs/CronExpressionInput.md new file mode 100644 index 000000000..d253e6ce7 --- /dev/null +++ b/sdks/java/docs/CronExpressionInput.md @@ -0,0 +1,23 @@ + + +# CronExpressionInput + +Schedule selected cron expression. + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**dayOfMonth** | **String** | Day of month of the object. | | +|**dayOfWeek** | **String** | Day of Week of the object. | | +|**hour** | **String** | Hour of the object. | | +|**minute** | **String** | Minute of the object. | | +|**month** | **String** | Month of the object. | | +|**second** | **String** | Second of the object. | | + + +## Implemented Interfaces + +* Serializable + + diff --git a/sdks/java/docs/CspSettings.md b/sdks/java/docs/CspSettings.md new file mode 100644 index 000000000..55a062f71 --- /dev/null +++ b/sdks/java/docs/CspSettings.md @@ -0,0 +1,24 @@ + + +# CspSettings + +CSP (Content Security Policy) settings. + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**connectSrcUrls** | **List<String>** | Allowed URLs for connect-src directive. | [optional] | +|**fontSrcUrls** | **List<String>** | Allowed URLs for font-src directive. | [optional] | +|**visualEmbedHosts** | **List<String>** | Allowed hosts for visual embed (frame-ancestors directive). | [optional] | +|**iframeSrcUrls** | **List<String>** | Allowed URLs for frame-src directive. | [optional] | +|**imgSrcUrls** | **List<String>** | Allowed URLs for img-src directive. | [optional] | +|**scriptSrcUrls** | [**ScriptSrcUrls**](ScriptSrcUrls.md) | | [optional] | +|**styleSrcUrls** | **List<String>** | Allowed URLs for style-src directive. | [optional] | + + +## Implemented Interfaces + +* Serializable + + diff --git a/sdks/java/docs/CspSettingsInput.md b/sdks/java/docs/CspSettingsInput.md new file mode 100644 index 000000000..0988adc48 --- /dev/null +++ b/sdks/java/docs/CspSettingsInput.md @@ -0,0 +1,24 @@ + + +# CspSettingsInput + +Input for CSP (Content Security Policy) settings. + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**connectSrcUrls** | **List<String>** | Allowed URLs for connect-src directive. | [optional] | +|**fontSrcUrls** | **List<String>** | Allowed URLs for font-src directive. | [optional] | +|**visualEmbedHosts** | **List<String>** | Allowed hosts for visual embed (frame-ancestors directive). | [optional] | +|**iframeSrcUrls** | **List<String>** | Allowed URLs for frame-src directive. | [optional] | +|**imgSrcUrls** | **List<String>** | Allowed URLs for img-src directive. | [optional] | +|**scriptSrcUrls** | [**ScriptSrcUrlsInput**](ScriptSrcUrlsInput.md) | | [optional] | +|**styleSrcUrls** | **List<String>** | Allowed URLs for style-src directive. | [optional] | + + +## Implemented Interfaces + +* Serializable + + diff --git a/sdks/java/docs/CustomActionApi.md b/sdks/java/docs/CustomActionApi.md new file mode 100644 index 000000000..423ed0350 --- /dev/null +++ b/sdks/java/docs/CustomActionApi.md @@ -0,0 +1,157 @@ +# CustomActionApi + +All URIs are relative to *CLUSTER_URL* + +| Method | HTTP request | +|------------- | ------------- | +| [**createCustomAction**](CustomActionApi.md#createCustomAction) | **POST** /api/rest/2.0/customization/custom-actions | +| [**deleteCustomAction**](CustomActionApi.md#deleteCustomAction) | **POST** /api/rest/2.0/customization/custom-actions/{custom_action_identifier}/delete | +| [**searchCustomActions**](CustomActionApi.md#searchCustomActions) | **POST** /api/rest/2.0/customization/custom-actions/search | +| [**updateCustomAction**](CustomActionApi.md#updateCustomAction) | **POST** /api/rest/2.0/customization/custom-actions/{custom_action_identifier}/update | + + + +# **createCustomAction** +> ResponseCustomAction createCustomAction(createCustomActionRequest) + + + + Version: 9.6.0.cl or later Creates a custom action that appears as a menu action on a saved Answer or Liveboard visualization. Requires `DEVELOPER` (**Has Developer privilege**) or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `DEVELOPER` (**Has developer privilege**) privilege is required. #### Usage Guidelines The API lets you create the following types of custom actions: * URL-based action Allows pushing data to an external URL. * Callback action Triggers a callback to the host application and initiates a response payload on an embedded ThoughtSpot instance. By default, custom actions are visible to only administrator or developer users. To make a custom action available to other users, and specify the groups in `group_identifiers`. By default, the custom action is set as a _global_ action on all visualizations and saved Answers. To assign a custom action to specific Liveboard visualization, saved Answer, or Worksheet, set `visibility` to `false` in `default_action_config` property and specify the GUID or name of the object in `associate_metadata`. For more information, see [Custom actions](https://developers.thoughtspot.com/docs/custom-action-intro). + +### Parameters + +| Name | Type | +|------------- | ------------- | +| **createCustomActionRequest** | [**CreateCustomActionRequest**](CreateCustomActionRequest.md) + +### Return type + +[**ResponseCustomAction**](ResponseCustomAction.md) + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Custom action created successfully. | - | +| **400** | Invalid request. | - | +| **401** | Unauthorized access. | - | +| **403** | Forbidden access. | - | +| **500** | Unexpected error | - | + + +# **deleteCustomAction** +> deleteCustomAction(customActionIdentifier) + + + + Version: 9.6.0.cl or later Removes the custom action specified in the API request. Requires `DEVELOPER` (**Has Developer privilege**) or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `DEVELOPER` (**Has developer privilege**) privilege is required. + +### Parameters + +| Name | Type | +|------------- | ------------- | +| **customActionIdentifier** | **String** + +### Return type + +null (empty response body) + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **204** | Custom action is successfully deleted. | - | +| **400** | Invalid request. | - | +| **401** | Unauthorized access. | - | +| **403** | Forbidden access. | - | +| **500** | Unexpected error | - | + + +# **searchCustomActions** +> List<ResponseCustomAction> searchCustomActions(searchCustomActionsRequest) + + + + Version: 9.6.0.cl or later Gets custom actions configured on the cluster. Requires `DEVELOPER` (**Has Developer privilege**) or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `DEVELOPER` (**Has developer privilege**) privilege is required. + +### Parameters + +| Name | Type | +|------------- | ------------- | +| **searchCustomActionsRequest** | [**SearchCustomActionsRequest**](SearchCustomActionsRequest.md) + +### Return type + +[**List<ResponseCustomAction>**](ResponseCustomAction.md) + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Custom action search is successful. | - | +| **400** | Invalid request. | - | +| **401** | Unauthorized access. | - | +| **403** | Forbidden access. | - | +| **500** | Unexpected error | - | + + +# **updateCustomAction** +> updateCustomAction(customActionIdentifier, updateCustomActionRequest) + + + + Version: 9.6.0.cl or later Updates a custom action. Requires `DEVELOPER` (**Has Developer privilege**) or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `DEVELOPER` (**Has developer privilege**) privilege is required. #### Usage Guidelines The API allows you to modify the following properties: * Name of the custom action * Action availability to groups * Association to metadata objects * Authentication settings for a URL-based action For more information, see [Custom actions](https://developers.thoughtspot.com/docs/custom-action-intro). + +### Parameters + +| Name | Type | +|------------- | ------------- | +| **customActionIdentifier** | **String** +| **updateCustomActionRequest** | [**UpdateCustomActionRequest**](UpdateCustomActionRequest.md) + +### Return type + +null (empty response body) + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **204** | Custom action updated successfully. | - | +| **400** | Invalid request. | - | +| **401** | Unauthorized access. | - | +| **403** | Forbidden access. | - | +| **500** | Unexpected error | - | + diff --git a/sdks/java/docs/CustomActionMetadataTypeInput.md b/sdks/java/docs/CustomActionMetadataTypeInput.md new file mode 100644 index 000000000..afba8aebf --- /dev/null +++ b/sdks/java/docs/CustomActionMetadataTypeInput.md @@ -0,0 +1,29 @@ + + +# CustomActionMetadataTypeInput + +MetadataType InputType used in Custom Action API's + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**type** | [**TypeEnum**](#TypeEnum) | Type of metadata object. Required if the name of the object is set as the identifier. This attribute is optional when the object GUID is specified as the identifier. | [optional] | +|**identifier** | **String** | Unique ID or name of the metadata object. | | + + + +## Enum: TypeEnum + +| Name | Value | +|---- | -----| +| VISUALIZATION | "VISUALIZATION" | +| ANSWER | "ANSWER" | +| WORKSHEET | "WORKSHEET" | + + +## Implemented Interfaces + +* Serializable + + diff --git a/sdks/java/docs/CustomCalendarsApi.md b/sdks/java/docs/CustomCalendarsApi.md new file mode 100644 index 000000000..e53c33b2f --- /dev/null +++ b/sdks/java/docs/CustomCalendarsApi.md @@ -0,0 +1,194 @@ +# CustomCalendarsApi + +All URIs are relative to *CLUSTER_URL* + +| Method | HTTP request | +|------------- | ------------- | +| [**createCalendar**](CustomCalendarsApi.md#createCalendar) | **POST** /api/rest/2.0/calendars/create | +| [**deleteCalendar**](CustomCalendarsApi.md#deleteCalendar) | **POST** /api/rest/2.0/calendars/{calendar_identifier}/delete | +| [**generateCSV**](CustomCalendarsApi.md#generateCSV) | **POST** /api/rest/2.0/calendars/generate-csv | +| [**searchCalendars**](CustomCalendarsApi.md#searchCalendars) | **POST** /api/rest/2.0/calendars/search | +| [**updateCalendar**](CustomCalendarsApi.md#updateCalendar) | **POST** /api/rest/2.0/calendars/{calendar_identifier}/update | + + + +# **createCalendar** +> CalendarResponse createCalendar(createCalendarRequest) + + + + Version: 10.12.0.cl or later Creates a new [custom calendar](https://docs.thoughtspot.com/cloud/latest/connections-cust-cal). Requires `DATAMANAGEMENT` (**Can manage data**) or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your ThoughtSpot instance, the `CAN_MANAGE_CUSTOM_CALENDAR` (**Can manage custom calendars**) privilege is required. #### Usage guidelines You can create a custom calendar from scratch or an existing Table in ThoughtSpot. For both methods of calendar creation, the following parameters are required: * Name of the custom calendar. * Calendar creation method. To create a calendar from an existing table, specify the method: - `FROM_EXISTING_TABLE` - Creates calendar from the table reference provided in the API request. - `FROM_INPUT_PARAMS` - Creates a calendar from the parameters defined in the API request. * Connection ID and Table name * Database and schema name attributes: For most Cloud Data Warehouse (CDW) connectors, both `database_name` and `schema_name` attributes are required. However, the attribute requirements are conditional and vary based on the connector type and its metadata structure. For example, for connectors such as Teradata, MySQL, SingleSore, Amazon Aurora MySQL, Amazon RDS MySQL, Oracle, and GCP_MYSQL, the `schema_name` is required, whereas the `database_name` attribute is not. Similarly, connectors such as ClickHouse require you to specify the `database_name` and the schema specification in such cases is optional. **NOTE**: If you are creating a calendar from an existing table, ensure that the referenced table matches the required DDL for custom calendars. If the schema does not match, the API returns an error. ##### Calendar type The API allows you to create the following types of calendars: * `MONTH_OFFSET`. The default calendar type. A `MONTH_OFFSET` calendar is offset by a few months from the standard calendar months (January to December) and the year begins with the month defined in the request. For example, if the `month_offset` value is set as `April`, the calendar year begins in April. * `4-4-5`. Each quarter in the calendar will include two 4-week months followed by one 5-week month. * `4-5-4`. Each quarter in the calendar will include two 4-week months with a 5-week month between. * `5-4-4`. Each quarter begins with a 5-week month, followed by two 4-week months. To start and end the calendar on a specific date, specify the dates in the `MM/DD/YYYY` format. For `MONTH_OFFSET` calendars, ensure that the `start_date` matches the month specified in the `month_offset` attribute. You can also set the starting day of the week and customize the prefixes for year and quarter labels. #### Examples To create a calendar from an existing table: ``` { \"name\": \"MyCustomCalendar1\", \"table_reference\": { \"connection_identifier\": \"4db8ea22-2ff4-4224-b05a-26674717e468\", \"table_name\": \"MyCalendarTable\", \"database_name\": \"RETAILAPPAREL\", \"schema_name\": \"PUBLIC\" }, \"creation_method\": \"FROM_EXISTING_TABLE\", } ``` To create a calendar from scratch: ``` { \"name\": \"MyCustomCalendar1\", \"table_reference\": { \"connection_identifier\": \"4db8ea22-2ff4-4224-b05a-26674717e468\", \"table_name\": \"MyCalendarTable\", \"database_name\": \"RETAILAPPAREL\", \"schema_name\": \"PUBLIC\" }, \"creation_method\": \"FROM_INPUT_PARAMS\", \"calendar_type\": \"MONTH_OFFSET\", \"month_offset\": \"April\", \"start_day_of_week\": \"Monday\", \"quarter_name_prefix\": \"Q\", \"year_name_prefix\": \"FY\", \"start_date\": \"04/01/2025\", \"end_date\": \"04/31/2025\" } ``` + +### Parameters + +| Name | Type | +|------------- | ------------- | +| **createCalendarRequest** | [**CreateCalendarRequest**](CreateCalendarRequest.md) + +### Return type + +[**CalendarResponse**](CalendarResponse.md) + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Custom calendar created successfully. | - | +| **400** | Invalid request. | - | +| **401** | Unauthorized access. | - | +| **403** | Forbidden access. | - | +| **500** | Unexpected error | - | + + +# **deleteCalendar** +> deleteCalendar(calendarIdentifier) + + + + Version: 10.12.0.cl or later Deletes a [custom calendar](https://docs.thoughtspot.com/cloud/latest/connections-cust-cal). Requires `DATAMANAGEMENT` (**Can manage data**) or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your ThoughtSpot instance, the `CAN_MANAGE_CUSTOM_CALENDAR` (**Can manage custom calendars**) privilege is required. #### Usage guidelines To delete a custom calendar, specify the calendar ID as a path parameter in the request URL. + +### Parameters + +| Name | Type | +|------------- | ------------- | +| **calendarIdentifier** | **String** + +### Return type + +null (empty response body) + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **204** | Custom calendar successfully deleted. | - | +| **400** | Invalid request. | - | +| **401** | Unauthorized access. | - | +| **403** | Forbidden access. | - | +| **500** | Unexpected error | - | + + +# **generateCSV** +> Object generateCSV(generateCSVRequest) + + + + Version: 10.12.0.cl or later Exports a [custom calendar](https://docs.thoughtspot.com/cloud/latest/connections-cust-cal) in the CSV format. Requires `DATAMANAGEMENT` (**Can manage data**) or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your ThoughtSpot instance, the `CAN_MANAGE_CUSTOM_CALENDAR` (**Can manage custom calendars**) privilege is required. #### Usage guidelines Use this API to download a custom calendar in the CSV file format. In your API request, specify the following parameters. * Start and end date of the calendar. For \"month offset\" calendars, the start date must match the month defined in the `month_offset` attribute. You can also specify optional parameters such as the starting day of the week and prefixes for the quarter and year labels. + +### Parameters + +| Name | Type | +|------------- | ------------- | +| **generateCSVRequest** | [**GenerateCSVRequest**](GenerateCSVRequest.md) + +### Return type + +**Object** + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Generate custom calendar data based on specifications, as a CSV file. | - | +| **400** | Invalid request. | - | +| **401** | Unauthorized access. | - | +| **403** | Forbidden access. | - | +| **500** | Unexpected error | - | + + +# **searchCalendars** +> List<CalendarResponse> searchCalendars(searchCalendarsRequest) + + + + Version: 10.12.0.cl or later Gets a list of [custom calendars](https://docs.thoughtspot.com/cloud/latest/connections-cust-cal). Requires `DATAMANAGEMENT` (**Can manage data**) or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your ThoughtSpot instance, the `CAN_MANAGE_CUSTOM_CALENDAR` (**Can manage custom calendars**) privilege is required. #### Usage guidelines By default, the API returns a list of custom calendars for all connection objects. To retrieve custom calendar details for a particular connection, specify the connection ID. You can also use other search parameters such as `name_pattern` and `sort_options` as search filters. The `name_pattern` parameter filters and returns only those objects that match the specified pattern. Use `%` as a wildcard for pattern matching. + +### Parameters + +| Name | Type | +|------------- | ------------- | +| **searchCalendarsRequest** | [**SearchCalendarsRequest**](SearchCalendarsRequest.md) + +### Return type + +[**List<CalendarResponse>**](CalendarResponse.md) + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Custom calendar fetched successfully. | - | +| **400** | Invalid request. | - | +| **401** | Unauthorized access. | - | +| **403** | Forbidden access. | - | +| **500** | Unexpected error | - | + + +# **updateCalendar** +> updateCalendar(calendarIdentifier, updateCalendarRequest) + + + + Version: 10.12.0.cl or later Updates the properties of a [custom calendar](https://docs.thoughtspot.com/cloud/latest/connections-cust-cal). Requires `DATAMANAGEMENT` (**Can manage data**) or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your ThoughtSpot instance, the `CAN_MANAGE_CUSTOM_CALENDAR` (**Can manage custom calendars**) privilege is required. #### Usage guidelines You can update the properties of a calendar using one of the following methods: * `FROM_INPUT_PARAMS` to update the calendar properties with the values defined in the API request. * `FROM_EXISTING_TABLE` Creates a calendar from the parameters defined in the API request. To update a custom calendar, specify the calendar ID as a path parameter in the request URL and the following parameters in the request body: * Connection ID and Table name * Database and schema name attributes: For most Cloud Data Warehouse (CDW) connectors, both `database_name` and `schema_name` attributes are required. However, the attribute requirements are conditional and vary based on the connector type and its metadata structure. For example, for connectors such as Teradata, MySQL, SingleSore, Amazon Aurora MySQL, Amazon RDS MySQL, Oracle, and GCP_MYSQL, the `schema_name` is required, whereas the `database_name` attribute is not. Similarly, connectors such as ClickHouse require you to specify the `database_name` and the schema specification in such cases is optional. The API allows you to modify the calendar type, month offset value, start and end date, starting day of the week, and prefixes assigned to the year and quarter labels. #### Examples Update a custom calendar using an existing Table in ThoughtSpot: ``` { \"update_method\": \"FROM_EXISTING_TABLE\", \"table_reference\": { \"connection_identifier\": \"Connection1\", \"database_name\": \"db1\", \"table_name\": \"custom_calendar_2025\", \"schame_name\": \"schemaVar\" } } ``` Update a custom calendar with the attributes defined in the API request: ``` { \"update_method\": \"FROM_INPUT_PARAMS\", \"table_reference\": { \"connection_identifier\": \"Connection1\", \"database_name\": \"db1\", \"table_name\": \"custom_calendar_2025\", \"schame_name\": \"schemaVar\" }, \"month_offset\": \"August\", \"start_day_of_week\": \"Monday\", \"start_date\": \"08/01/2025\", \"end_date\": \"07/31/2026\" } ``` + +### Parameters + +| Name | Type | +|------------- | ------------- | +| **calendarIdentifier** | **String** +| **updateCalendarRequest** | [**UpdateCalendarRequest**](UpdateCalendarRequest.md) + +### Return type + +null (empty response body) + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **204** | Custom calendar updated successfully. | - | +| **400** | Invalid request. | - | +| **401** | Unauthorized access. | - | +| **403** | Forbidden access. | - | +| **500** | Unexpected error | - | + diff --git a/sdks/java/docs/DataApi.md b/sdks/java/docs/DataApi.md new file mode 100644 index 000000000..507db9f32 --- /dev/null +++ b/sdks/java/docs/DataApi.md @@ -0,0 +1,119 @@ +# DataApi + +All URIs are relative to *CLUSTER_URL* + +| Method | HTTP request | +|------------- | ------------- | +| [**fetchAnswerData**](DataApi.md#fetchAnswerData) | **POST** /api/rest/2.0/metadata/answer/data | +| [**fetchLiveboardData**](DataApi.md#fetchLiveboardData) | **POST** /api/rest/2.0/metadata/liveboard/data | +| [**searchData**](DataApi.md#searchData) | **POST** /api/rest/2.0/searchdata | + + + +# **fetchAnswerData** +> AnswerDataResponse fetchAnswerData(fetchAnswerDataRequest) + + + + Version: 9.0.0.cl or later Fetches data from a saved Answer. Requires at least view access to the saved Answer. The `record_size` attribute determines the number of records to retrieve in an API call. For more information about pagination, record size, and maximum row limit, see [Pagination and record size settings](https://developers.thoughtspot.com/docs/fetch-data-and-report-apis#_pagination_settings_for_data_and_report_apis). + +### Parameters + +| Name | Type | +|------------- | ------------- | +| **fetchAnswerDataRequest** | [**FetchAnswerDataRequest**](FetchAnswerDataRequest.md) + +### Return type + +[**AnswerDataResponse**](AnswerDataResponse.md) + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Fetching data of specified metadata object is successful. | - | +| **400** | Invalid request. | - | +| **401** | Unauthorized access. | - | +| **403** | Forbidden access. | - | +| **500** | Unexpected error | - | + + +# **fetchLiveboardData** +> LiveboardDataResponse fetchLiveboardData(fetchLiveboardDataRequest) + + + + Version: 9.0.0.cl or later Gets data from a Liveboard object and its visualization. Requires at least view access to the Liveboard. #### Usage guidelines In the request body, specify the GUID or name of the Liveboard. To get data for specific visualizations, add the GUIDs or names of the visualizations in the API request. To include unsaved changes in the report, pass the `transient_pinboard_content` script generated from the `getExportRequestForCurrentPinboard` method in the Visual Embed SDK. Upon successful execution, the API returns the report with unsaved changes. If the new Liveboard experience mode, the transient content includes ad hoc changes to visualizations such as sorting, toggling of legends, and data drill down. For more information, and see [Liveboard data API](https://developers.thoughtspot.com/docs/fetch-data-and-report-apis#_fetch_liveboard_data_api). + +### Parameters + +| Name | Type | +|------------- | ------------- | +| **fetchLiveboardDataRequest** | [**FetchLiveboardDataRequest**](FetchLiveboardDataRequest.md) + +### Return type + +[**LiveboardDataResponse**](LiveboardDataResponse.md) + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Fetching data of specified metadata object is successful. | - | +| **400** | Invalid request. | - | +| **401** | Unauthorized access. | - | +| **403** | Forbidden access. | - | +| **500** | Unexpected error | - | + + +# **searchData** +> SearchDataResponse searchData(searchDataRequest) + + + + Version: 9.0.0.cl or later Generates an Answer from a given data source. Requires at least view access to the data source object (Worksheet or View). #### Usage guidelines To search data, specify the data source GUID in `logical_table_identifier`. The data source can be a Worksheet, View, Table, or SQL view. Pass search tokens in the `query_string` attribute in the API request as shown in the following example: ``` { \"query_string\": \"[sales] by [store]\", \"logical_table_identifier\": \"cd252e5c-b552-49a8-821d-3eadaa049cca\", } ``` For more information about the `query_string` format and data source attribute, see [Search data API](https://developers.thoughtspot.com/docs/fetch-data-and-report-apis#_search_data_api). The `record_size` attribute determines the number of records to retrieve in an API call. For more information about pagination, record size, and maximum row limit, see [Pagination and record size settings](https://developers.thoughtspot.com/docs/fetch-data-and-report-apis#_pagination_settings_for_data_and_report_api). + +### Parameters + +| Name | Type | +|------------- | ------------- | +| **searchDataRequest** | [**SearchDataRequest**](SearchDataRequest.md) + +### Return type + +[**SearchDataResponse**](SearchDataResponse.md) + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Fetching data of specified metadata object is successful. | - | +| **400** | Invalid request. | - | +| **401** | Unauthorized access. | - | +| **403** | Forbidden access. | - | +| **500** | Unexpected error | - | + diff --git a/sdks/java/docs/DataSource.md b/sdks/java/docs/DataSource.md new file mode 100644 index 000000000..6d18ec0b3 --- /dev/null +++ b/sdks/java/docs/DataSource.md @@ -0,0 +1,19 @@ + + +# DataSource + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**confidence** | **Float** | Confidence score for the data source suggestion. | [optional] | +|**details** | [**EntityHeader**](EntityHeader.md) | | [optional] | +|**reasoning** | **String** | LLM reasoning for the data source. | [optional] | + + +## Implemented Interfaces + +* Serializable + + diff --git a/sdks/java/docs/DataSourceContextInput.md b/sdks/java/docs/DataSourceContextInput.md new file mode 100644 index 000000000..9fba85c3a --- /dev/null +++ b/sdks/java/docs/DataSourceContextInput.md @@ -0,0 +1,19 @@ + + +# DataSourceContextInput + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**dataSourceIdentifier** | **String** | Unique identifier of the data source. Required when context type is DATA_SOURCE and `data_source_identifiers` is not provided. At least one of `data_source_identifier` or `data_source_identifiers` must be supplied for DATA_SOURCE context; omit only when context type is AUTO_MODE. Version: 26.5.0.cl or later | [optional] | +|**dataSourceIdentifiers** | **List<String>** | Unique identifiers of data sources for multi-data-source context. Required when context type is DATA_SOURCE and `data_source_identifier` is not provided. Version: 26.5.0.cl or later | [optional] | +|**guid** | **String** | Deprecated. Use `data_source_identifier` instead. Previously required when neither `data_source_identifier` nor `data_source_identifiers` was provided for DATA_SOURCE context. Version: 26.2.0.cl or later | [optional] | + + +## Implemented Interfaces + +* Serializable + + diff --git a/sdks/java/docs/DataWarehouseObjectInput.md b/sdks/java/docs/DataWarehouseObjectInput.md new file mode 100644 index 000000000..9a7af171b --- /dev/null +++ b/sdks/java/docs/DataWarehouseObjectInput.md @@ -0,0 +1,20 @@ + + +# DataWarehouseObjectInput + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**database** | **String** | Name of the database. | [optional] | +|**schema** | **String** | Name of the schema within the database. | [optional] | +|**table** | **String** | Name of the table within the schema. | [optional] | +|**column** | **String** | Name of the column within the table. | [optional] | + + +## Implemented Interfaces + +* Serializable + + diff --git a/sdks/java/docs/DataWarehouseObjects.md b/sdks/java/docs/DataWarehouseObjects.md new file mode 100644 index 000000000..88fc67642 --- /dev/null +++ b/sdks/java/docs/DataWarehouseObjects.md @@ -0,0 +1,17 @@ + + +# DataWarehouseObjects + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**databases** | [**List<Database>**](Database.md) | Databases of the connection. | | + + +## Implemented Interfaces + +* Serializable + + diff --git a/sdks/java/docs/Database.md b/sdks/java/docs/Database.md new file mode 100644 index 000000000..1b3d058f8 --- /dev/null +++ b/sdks/java/docs/Database.md @@ -0,0 +1,19 @@ + + +# Database + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**name** | **String** | Name of the database. | | +|**schemas** | [**List<SchemaObject>**](SchemaObject.md) | Schemas of the database. | [optional] | +|**autoCreated** | **Boolean** | Determines if the object is auto created. | [optional] | + + +## Implemented Interfaces + +* Serializable + + diff --git a/sdks/java/docs/DbtApi.md b/sdks/java/docs/DbtApi.md new file mode 100644 index 000000000..56aca016e --- /dev/null +++ b/sdks/java/docs/DbtApi.md @@ -0,0 +1,251 @@ +# DbtApi + +All URIs are relative to *CLUSTER_URL* + +| Method | HTTP request | +|------------- | ------------- | +| [**dbtConnection**](DbtApi.md#dbtConnection) | **POST** /api/rest/2.0/dbt/dbt-connection | +| [**dbtGenerateSyncTml**](DbtApi.md#dbtGenerateSyncTml) | **POST** /api/rest/2.0/dbt/generate-sync-tml | +| [**dbtGenerateTml**](DbtApi.md#dbtGenerateTml) | **POST** /api/rest/2.0/dbt/generate-tml | +| [**dbtSearch**](DbtApi.md#dbtSearch) | **POST** /api/rest/2.0/dbt/search | +| [**deleteDbtConnection**](DbtApi.md#deleteDbtConnection) | **POST** /api/rest/2.0/dbt/{dbt_connection_identifier}/delete | +| [**updateDbtConnection**](DbtApi.md#updateDbtConnection) | **POST** /api/rest/2.0/dbt/update-dbt-connection | + + + +# **dbtConnection** +> Object dbtConnection(connectionName, databaseName, importType, accessToken, dbtUrl, accountId, projectId, dbtEnvId, projectName, fileContent) + + + + Version: 9.9.0.cl or later Creates a DBT connection object in ThoughtSpot. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege or `DATAMANAGEMENT` (**Can manage data**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the following Data control privileges may be required: - `CAN_MANAGE_CUSTOM_CALENDAR`(**Can manage custom calendars**) - `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) - `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` (**Can manage data models**) #### About create DBT connection DBT connection in ThoughtSpot is used by the user to define DBT credentials for cloud . The API needs embrace connection, embrace database name, DBT url, import type, DBT account identifier, DBT project identifier, DBT access token and environment details (or) embrace connection, embrace database name, import type, file_content to create a connection object. To know more about DBT, see ThoughtSpot Product Documentation. + +### Parameters + +| Name | Type | +|------------- | ------------- | +| **connectionName** | **String** +| **databaseName** | **String** +| **importType** | **String** +| **accessToken** | **String** +| **dbtUrl** | **String** +| **accountId** | **String** +| **projectId** | **String** +| **dbtEnvId** | **String** +| **projectName** | **String** +| **fileContent** | **File** + +### Return type + +**Object** + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + + - **Content-Type**: multipart/form-data + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Succesfully created DBT Connection. | - | +| **400** | Invalid request. | - | +| **401** | Unauthorized access. | - | +| **403** | Forbidden access. | - | +| **500** | Unexpected error | - | + + +# **dbtGenerateSyncTml** +> Object dbtGenerateSyncTml(dbtConnectionIdentifier, fileContent) + + + + Version: 9.9.0.cl or later Resynchronize the existing list of models, tables, worksheet tml’s and import them to Thoughtspot based on the DBT connection object. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege or `DATAMANAGEMENT` (**Can manage data**) privilege, along with an existing DBT connection. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the following data control privileges may be required: - `CAN_MANAGE_CUSTOM_CALENDAR`(**Can manage custom calendars**) - `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) - `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` (**Can manage data models**) + +### Parameters + +| Name | Type | +|------------- | ------------- | +| **dbtConnectionIdentifier** | **String** +| **fileContent** | **File** + +### Return type + +**Object** + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + + - **Content-Type**: multipart/form-data + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Sync Table and Worksheet TML's are successfully generated. | - | +| **400** | Invalid request. | - | +| **401** | Unauthorized access. | - | +| **403** | Forbidden access. | - | +| **500** | Unexpected error | - | + + +# **dbtGenerateTml** +> Object dbtGenerateTml(dbtConnectionIdentifier, modelTables, importWorksheets, worksheets, fileContent) + + + + Version: 9.9.0.cl or later Generate required table and worksheet and import them. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege or `DATAMANAGEMENT` (**Can manage data**) privilege, along with an existing DBT connection. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the following data control privileges may be required: - `CAN_MANAGE_CUSTOM_CALENDAR`(**Can manage custom calendars**) - `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) - `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` (**Can manage data models**) #### About generate TML Models and Worksheets to be imported can be selected by the user as part of the API. + +### Parameters + +| Name | Type | +|------------- | ------------- | +| **dbtConnectionIdentifier** | **String** +| **modelTables** | **String** +| **importWorksheets** | **String** +| **worksheets** | **String** +| **fileContent** | **File** + +### Return type + +**Object** + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + + - **Content-Type**: multipart/form-data + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Required Table and Worksheet TML's are successfully generated. | - | +| **400** | Invalid request. | - | +| **401** | Unauthorized access. | - | +| **403** | Forbidden access. | - | +| **500** | Unexpected error | - | + + +# **dbtSearch** +> List<DbtSearchResponse> dbtSearch() + + + + Version: 9.9.0.cl or later Gets a list of DBT connection objects by user and organization, available on the ThoughtSpot system. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege or `DATAMANAGEMENT` (**Can manage data**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the following Data control privileges may be required: - `CAN_MANAGE_CUSTOM_CALENDAR`(**Can manage custom calendars**) - `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) - `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` (**Can manage data models**) #### About search DBT connection To get details of a specific DBT connection identifier, database connection identifier, database connection name, database name, project name, project identifier, environment identifier , import type and author. + +### Parameters +This endpoint does not need any parameter. + +### Return type + +[**List<DbtSearchResponse>**](DbtSearchResponse.md) + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Retrieved list of DBT connections successfully. | - | +| **400** | Invalid request. | - | +| **401** | Unauthorized access. | - | +| **403** | Forbidden access. | - | +| **500** | Unexpected error | - | + + +# **deleteDbtConnection** +> deleteDbtConnection(dbtConnectionIdentifier) + + + + Version: 9.9.0.cl or later Removes the specified DBT connection object from the ThoughtSpot system. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) or `DATAMANAGEMENT` (**Can manage data ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the following Data control privileges may be required: - `CAN_MANAGE_CUSTOM_CALENDAR`(**Can manage custom calendars**) - `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) - `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` (**Can manage data models**) + +### Parameters + +| Name | Type | +|------------- | ------------- | +| **dbtConnectionIdentifier** | **String** + +### Return type + +null (empty response body) + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **204** | DBT Connection successfully deleted. | - | +| **400** | Invalid request. | - | +| **401** | Unauthorized access. | - | +| **403** | Forbidden access. | - | +| **500** | Unexpected error | - | + + +# **updateDbtConnection** +> Object updateDbtConnection(dbtConnectionIdentifier, connectionName, databaseName, importType, accessToken, dbtUrl, accountId, projectId, dbtEnvId, projectName, fileContent) + + + + Version: 9.9.0.cl or later Updates a DBT connection object. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege or `DATAMANAGEMENT` (**Can manage data ThoughtSpot**) privilege, along with an existing DBT connection. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the following data control privileges may be required: - `CAN_MANAGE_CUSTOM_CALENDAR`(**Can manage custom calendars**) - `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) - `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` (**Can manage data models**) #### About update DBT connection You can modify DBT connection object properties such as embrace connection name, embrace database name, import type, account identifier, access token, project identifier and environment (or) embrace connection, embrace database name, import type, file_content settings. + +### Parameters + +| Name | Type | +|------------- | ------------- | +| **dbtConnectionIdentifier** | **String** +| **connectionName** | **String** +| **databaseName** | **String** +| **importType** | **String** +| **accessToken** | **String** +| **dbtUrl** | **String** +| **accountId** | **String** +| **projectId** | **String** +| **dbtEnvId** | **String** +| **projectName** | **String** +| **fileContent** | **File** + +### Return type + +**Object** + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + + - **Content-Type**: multipart/form-data + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | DBT Connection successfully updated. | - | +| **400** | Invalid request. | - | +| **401** | Unauthorized access. | - | +| **403** | Forbidden access. | - | +| **500** | Unexpected error | - | + diff --git a/sdks/java/docs/DbtSearchResponse.md b/sdks/java/docs/DbtSearchResponse.md new file mode 100644 index 000000000..8c9901dd9 --- /dev/null +++ b/sdks/java/docs/DbtSearchResponse.md @@ -0,0 +1,23 @@ + + +# DbtSearchResponse + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**dbtConnectionIdentifier** | **String** | | [optional] | +|**projectName** | **String** | | [optional] | +|**connectionId** | **String** | | [optional] | +|**connectionName** | **String** | | [optional] | +|**cdwDatabase** | **String** | | [optional] | +|**importType** | **String** | | [optional] | +|**authorName** | **String** | | [optional] | + + +## Implemented Interfaces + +* Serializable + + diff --git a/sdks/java/docs/DeactivateUserRequest.md b/sdks/java/docs/DeactivateUserRequest.md new file mode 100644 index 000000000..f334fe9f8 --- /dev/null +++ b/sdks/java/docs/DeactivateUserRequest.md @@ -0,0 +1,18 @@ + + +# DeactivateUserRequest + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**userIdentifier** | **String** | Unique ID or name of the user. | | +|**baseUrl** | **String** | Base url of the cluster. | | + + +## Implemented Interfaces + +* Serializable + + diff --git a/sdks/java/docs/DefaultActionConfig.md b/sdks/java/docs/DefaultActionConfig.md new file mode 100644 index 000000000..d7dcdf1c7 --- /dev/null +++ b/sdks/java/docs/DefaultActionConfig.md @@ -0,0 +1,18 @@ + + +# DefaultActionConfig + +Default Custom action configuration. This includes the custom action's visibility across all visualizations and Answers. By default, a custom action is added to all visualizations and Answers. + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**visibility** | **Boolean** | Custom action is available on all visualizations. Earlier , the naming convention: LOCAL/GLOBAL. TRUE signifies GLOBAL for backward compatibility. | [optional] | + + +## Implemented Interfaces + +* Serializable + + diff --git a/sdks/java/docs/DefaultActionConfigInput.md b/sdks/java/docs/DefaultActionConfigInput.md new file mode 100644 index 000000000..983126e53 --- /dev/null +++ b/sdks/java/docs/DefaultActionConfigInput.md @@ -0,0 +1,18 @@ + + +# DefaultActionConfigInput + +Default Custom action configuration. This includes the custom action's visibility across all visualizations and Answers. By default, a custom action is added to all visualizations and Answers. + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**visibility** | **Boolean** | Custom action is available on all visualizations. Earlier naming convention: LOCAL/GLOBAL. TRUE signifies GLOBAL for backward compatibility. | [optional] | + + +## Implemented Interfaces + +* Serializable + + diff --git a/sdks/java/docs/DefaultActionConfigInputCreate.md b/sdks/java/docs/DefaultActionConfigInputCreate.md new file mode 100644 index 000000000..c71e922ad --- /dev/null +++ b/sdks/java/docs/DefaultActionConfigInputCreate.md @@ -0,0 +1,18 @@ + + +# DefaultActionConfigInputCreate + +Default Custom action configuration. This includes the custom action's visibility across all visualizations and Answers. By default, a custom action is added to all visualizations and Answers. + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**visibility** | **Boolean** | Custom action is available on all visualizations. Earlier naming convention: LOCAL/GLOBAL. TRUE signifies GLOBAL for backward compatibility. Default: true | [optional] | + + +## Implemented Interfaces + +* Serializable + + diff --git a/sdks/java/docs/DefaultActionConfigSearchInput.md b/sdks/java/docs/DefaultActionConfigSearchInput.md new file mode 100644 index 000000000..33bcddecf --- /dev/null +++ b/sdks/java/docs/DefaultActionConfigSearchInput.md @@ -0,0 +1,18 @@ + + +# DefaultActionConfigSearchInput + +Default Custom action configuration. This includes the custom action's visibility across all visualizations and Answers. By default, a custom action is added to all visualizations and Answers. + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**visibility** | **Boolean** | Custom action is available on all visualizations. Earlier naming convention: LOCAL/GLOBAL. TRUE signifies GLOBAL for backward compatibility. | [optional] | + + +## Implemented Interfaces + +* Serializable + + diff --git a/sdks/java/docs/DeleteCollectionRequest.md b/sdks/java/docs/DeleteCollectionRequest.md new file mode 100644 index 000000000..98dbcd5f8 --- /dev/null +++ b/sdks/java/docs/DeleteCollectionRequest.md @@ -0,0 +1,19 @@ + + +# DeleteCollectionRequest + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**collectionIdentifiers** | **List<String>** | Unique GUIDs of collections to delete. Note: Collection names cannot be used as identifiers since duplicate names are allowed. | | +|**deleteChildren** | **Boolean** | Flag to delete child objects of the collection that the user has access to. | [optional] | +|**dryRun** | **Boolean** | Preview deletion without actually deleting. When set to true, returns what would be deleted without performing the actual deletion. | [optional] | + + +## Implemented Interfaces + +* Serializable + + diff --git a/sdks/java/docs/DeleteConfigRequest.md b/sdks/java/docs/DeleteConfigRequest.md new file mode 100644 index 000000000..b13b516d0 --- /dev/null +++ b/sdks/java/docs/DeleteConfigRequest.md @@ -0,0 +1,17 @@ + + +# DeleteConfigRequest + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**clusterLevel** | **Boolean** | Applicable when Orgs is enabled in the cluster Indicator to consider cluster level or org level config. Set it to false to delete configuration from current org. If set to true, then the configuration at cluster level and orgs that inherited the configuration from cluster level will be deleted. Version: 9.5.0.cl or later | [optional] | + + +## Implemented Interfaces + +* Serializable + + diff --git a/sdks/java/docs/DeleteConnectionConfigurationRequest.md b/sdks/java/docs/DeleteConnectionConfigurationRequest.md new file mode 100644 index 000000000..0a5737873 --- /dev/null +++ b/sdks/java/docs/DeleteConnectionConfigurationRequest.md @@ -0,0 +1,18 @@ + + +# DeleteConnectionConfigurationRequest + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**configurationIdentifier** | **String** | Unique ID or name of the configuration. | | +|**connectionIdentifier** | **String** | Unique ID or name of the connection. | | + + +## Implemented Interfaces + +* Serializable + + diff --git a/sdks/java/docs/DeleteConnectionRequest.md b/sdks/java/docs/DeleteConnectionRequest.md new file mode 100644 index 000000000..7f2fc2705 --- /dev/null +++ b/sdks/java/docs/DeleteConnectionRequest.md @@ -0,0 +1,17 @@ + + +# DeleteConnectionRequest + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**connectionIdentifier** | **String** | Unique ID or name of the connection. | | + + +## Implemented Interfaces + +* Serializable + + diff --git a/sdks/java/docs/DeleteMetadataRequest.md b/sdks/java/docs/DeleteMetadataRequest.md new file mode 100644 index 000000000..87d38da62 --- /dev/null +++ b/sdks/java/docs/DeleteMetadataRequest.md @@ -0,0 +1,18 @@ + + +# DeleteMetadataRequest + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**metadata** | [**List<DeleteMetadataTypeInput>**](DeleteMetadataTypeInput.md) | Metadata objects. | | +|**deleteDisabledObjects** | **Boolean** | Indicates whether to delete disabled metadata objects. | [optional] | + + +## Implemented Interfaces + +* Serializable + + diff --git a/sdks/java/docs/DeleteMetadataTypeInput.md b/sdks/java/docs/DeleteMetadataTypeInput.md new file mode 100644 index 000000000..0e31a1109 --- /dev/null +++ b/sdks/java/docs/DeleteMetadataTypeInput.md @@ -0,0 +1,31 @@ + + +# DeleteMetadataTypeInput + +MetadataType InputType used in Delete MetadataType API + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**type** | [**TypeEnum**](#TypeEnum) | Type of metadata. Required if the name of the object is set as the identifier. This attribute is optional when the object GUID is specified as the identifier. | [optional] | +|**identifier** | **String** | Unique ID or name of the metadata object. | | + + + +## Enum: TypeEnum + +| Name | Value | +|---- | -----| +| LIVEBOARD | "LIVEBOARD" | +| ANSWER | "ANSWER" | +| LOGICAL_TABLE | "LOGICAL_TABLE" | +| LOGICAL_COLUMN | "LOGICAL_COLUMN" | +| LOGICAL_RELATIONSHIP | "LOGICAL_RELATIONSHIP" | + + +## Implemented Interfaces + +* Serializable + + diff --git a/sdks/java/docs/DeleteOrgEmailCustomizationRequest.md b/sdks/java/docs/DeleteOrgEmailCustomizationRequest.md new file mode 100644 index 000000000..0c3019079 --- /dev/null +++ b/sdks/java/docs/DeleteOrgEmailCustomizationRequest.md @@ -0,0 +1,17 @@ + + +# DeleteOrgEmailCustomizationRequest + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**orgIdentifiers** | **List<String>** | Unique identifier of the organization. | [optional] | + + +## Implemented Interfaces + +* Serializable + + diff --git a/sdks/java/docs/DeleteVariablesRequest.md b/sdks/java/docs/DeleteVariablesRequest.md new file mode 100644 index 000000000..2db48ede4 --- /dev/null +++ b/sdks/java/docs/DeleteVariablesRequest.md @@ -0,0 +1,17 @@ + + +# DeleteVariablesRequest + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**identifiers** | **List<String>** | Unique id(s) or name(s) of the variable(s) to delete | | + + +## Implemented Interfaces + +* Serializable + + diff --git a/sdks/java/docs/DeleteWebhookConfigurationsRequest.md b/sdks/java/docs/DeleteWebhookConfigurationsRequest.md new file mode 100644 index 000000000..bf03ae0d3 --- /dev/null +++ b/sdks/java/docs/DeleteWebhookConfigurationsRequest.md @@ -0,0 +1,17 @@ + + +# DeleteWebhookConfigurationsRequest + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**webhookIdentifiers** | **List<String>** | List of webhook identifiers to delete. | | + + +## Implemented Interfaces + +* Serializable + + diff --git a/sdks/java/docs/DeployCommitRequest.md b/sdks/java/docs/DeployCommitRequest.md new file mode 100644 index 000000000..362fc94d1 --- /dev/null +++ b/sdks/java/docs/DeployCommitRequest.md @@ -0,0 +1,39 @@ + + +# DeployCommitRequest + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**commitId** | **String** | Commit_id against which the files should be picked to deploy. Note: If no commit_id is specified, then the head of the branch is considered. | [optional] | +|**branchName** | **String** | Name of the remote branch where changes should be picked | | +|**deployType** | [**DeployTypeEnum**](#DeployTypeEnum) | Indicates if all files or only modified file at specified commit point should be considered | [optional] | +|**deployPolicy** | [**DeployPolicyEnum**](#DeployPolicyEnum) | Define the policy to follow while importing TML in the ThoughtSpot environment. Use “ALL_OR_NONE” to cancel the deployment of all ThoughtSpot objects if at least one of them fails to import. Use “Partial” to import ThoughtSpot objects that validate successfully even if other objects in the same deploy operations fail to import. | [optional] | + + + +## Enum: DeployTypeEnum + +| Name | Value | +|---- | -----| +| FULL | "FULL" | +| DELTA | "DELTA" | + + + +## Enum: DeployPolicyEnum + +| Name | Value | +|---- | -----| +| ALL_OR_NONE | "ALL_OR_NONE" | +| PARTIAL | "PARTIAL" | +| VALIDATE_ONLY | "VALIDATE_ONLY" | + + +## Implemented Interfaces + +* Serializable + + diff --git a/sdks/java/docs/DeployResponse.md b/sdks/java/docs/DeployResponse.md new file mode 100644 index 000000000..044cd9d46 --- /dev/null +++ b/sdks/java/docs/DeployResponse.md @@ -0,0 +1,21 @@ + + +# DeployResponse + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**fileName** | **String** | Name of the file deployed | [optional] | +|**metadataName** | **String** | Name of the metadata object | [optional] | +|**metadataType** | **String** | Type of the metadata object | [optional] | +|**statusCode** | **String** | Indicates the status of deployment for the file | [optional] | +|**statusMessage** | **String** | Any error or warning with the deployment | [optional] | + + +## Implemented Interfaces + +* Serializable + + diff --git a/sdks/java/docs/EmailCustomizationApi.md b/sdks/java/docs/EmailCustomizationApi.md new file mode 100644 index 000000000..b2f6e55c5 --- /dev/null +++ b/sdks/java/docs/EmailCustomizationApi.md @@ -0,0 +1,223 @@ +# EmailCustomizationApi + +All URIs are relative to *CLUSTER_URL* + +| Method | HTTP request | +|------------- | ------------- | +| [**createEmailCustomization**](EmailCustomizationApi.md#createEmailCustomization) | **POST** /api/rest/2.0/customization/email | +| [**deleteEmailCustomization**](EmailCustomizationApi.md#deleteEmailCustomization) | **POST** /api/rest/2.0/customization/email/{template_identifier}/delete | +| [**deleteOrgEmailCustomization**](EmailCustomizationApi.md#deleteOrgEmailCustomization) | **POST** /api/rest/2.0/customization/email/delete | +| [**searchEmailCustomization**](EmailCustomizationApi.md#searchEmailCustomization) | **POST** /api/rest/2.0/customization/email/search | +| [**updateEmailCustomization**](EmailCustomizationApi.md#updateEmailCustomization) | **POST** /api/rest/2.0/customization/email/update | +| [**validateEmailCustomization**](EmailCustomizationApi.md#validateEmailCustomization) | **POST** /api/rest/2.0/customization/email/validate | + + + +# **createEmailCustomization** +> CreateEmailCustomizationResponse createEmailCustomization(createEmailCustomizationRequest) + + + + Version: 10.10.0.cl or later Creates a customization configuration for the notification email. #### Pre-requisites Requires `DEVELOPER` (**has developer privilege**) or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `DEVELOPER` (**Has developer privilege**) privilege is required. **NOTE**:This endpoint in currently in beta. Contact ThoughtSpot support to enable this on your instance. #### Usage guidelines To create a custom configuration pass these parameters in your API request: - A JSON map of configuration attributes `template_properties`. The following example shows a sample set of customization configuration: ``` { { \"cta_button_bg_color\": \"#444DEA\", \"cta_text_font_color\": \"#FFFFFF\", \"primary_bg_color\": \"#D3DEF0\", \"logo_url\": \"https://storage.pardot.com/710713/1642089901EbkRibJq/TS_fullworkmark_darkmode.png\", \"font_family\": \"\", \"product_name\": \"ThoughtSpot\", \"footer_address\": \"444 Castro St, Suite 1000 Mountain View, CA 94041\", \"footer_phone\": \"(800) 508-7008\", \"replacement_value_for_liveboard\": \"Dashboard\", \"replacement_value_for_answer\": \"Chart\", \"replacement_value_for_spot_iq\": \"AI Insights\", \"hide_footer_phone\": false, \"hide_footer_address\": false, \"hide_product_name\": false, \"hide_manage_notification\": false, \"hide_mobile_app_nudge\": false, \"hide_privacy_policy\": false, \"hide_ts_vocabulary_definitions\": false, \"hide_error_message\": false, \"hide_unsubscribe_link\": false, \"hide_notification_status\": false, \"hide_modify_alert\": false, \"company_website_url\": \"https://your-website.com/\", \"company_privacy_policy_url\" : \"https://link-to-privacy-policy.com/\", \"contact_support_url\": \"https://link-to-contact-support.com/\", \"hide_contact_support_url\": false, \"hide_logo_url\" : false } } ``` + +### Parameters + +| Name | Type | +|------------- | ------------- | +| **createEmailCustomizationRequest** | [**CreateEmailCustomizationRequest**](CreateEmailCustomizationRequest.md) + +### Return type + +[**CreateEmailCustomizationResponse**](CreateEmailCustomizationResponse.md) + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | OK | - | +| **400** | Invalid request. | - | +| **403** | Unauthorized access. | - | +| **500** | Unexpected error | - | + + +# **deleteEmailCustomization** +> deleteEmailCustomization(templateIdentifier) + + + + Version: 10.10.0.cl or later Deletes the configuration for the email customization. #### Pre-requisites Requires `DEVELOPER` (**has developer privilege**) or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `DEVELOPER` (**Has developer privilege**) privilege is required. **NOTE**:This endpoint in currently in beta. Contact ThoughtSpot support to enable this on your instance. #### Usage guidelines - Call the search API endpoint to get the `template_identifier` from the response. - Use that `template_identifier` as a parameter in this API request. + +### Parameters + +| Name | Type | +|------------- | ------------- | +| **templateIdentifier** | **String** + +### Return type + +null (empty response body) + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **204** | Email Customization configuration successfully deleted. | - | +| **400** | Invalid request. | - | +| **403** | Unauthorized access. | - | +| **500** | Unexpected error | - | + + +# **deleteOrgEmailCustomization** +> deleteOrgEmailCustomization(deleteOrgEmailCustomizationRequest) + + + + Version: 10.12.0.cl or later Deletes the configuration for the email customization. #### Pre-requisites Requires `DEVELOPER` (**has developer privilege**) or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `DEVELOPER` (**Has developer privilege**) privilege is required. **NOTE**:This endpoint in currently in beta. Contact ThoughtSpot support to enable this on your instance. #### Usage guidelines - Call the search API endpoint to get the `org_identifier` from the response. - Use that `org_identifier` as a parameter in this API request. + +### Parameters + +| Name | Type | +|------------- | ------------- | +| **deleteOrgEmailCustomizationRequest** | [**DeleteOrgEmailCustomizationRequest**](DeleteOrgEmailCustomizationRequest.md) + +### Return type + +null (empty response body) + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **204** | Email Customization configuration successfully deleted. | - | +| **400** | Invalid request. | - | +| **401** | Unauthorized access. | - | +| **403** | Unauthorized access. | - | +| **500** | Unexpected error | - | + + +# **searchEmailCustomization** +> List<CreateEmailCustomizationResponse> searchEmailCustomization(searchEmailCustomizationRequest) + + + + Version: 10.10.0.cl or later Search the email customization configuration if any set for the ThoughtSpot system. #### Pre-requisites Requires `DEVELOPER` (**has developer privilege**) or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `DEVELOPER` (**Has developer privilege**) privilege is required. **NOTE**:This endpoint in currently in beta. Contact ThoughtSpot support to enable this on your instance. + +### Parameters + +| Name | Type | +|------------- | ------------- | +| **searchEmailCustomizationRequest** | [**SearchEmailCustomizationRequest**](SearchEmailCustomizationRequest.md) + +### Return type + +[**List<CreateEmailCustomizationResponse>**](CreateEmailCustomizationResponse.md) + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | OK | - | +| **400** | Invalid request. | - | +| **403** | Unauthorized access. | - | +| **500** | Unexpected error | - | + + +# **updateEmailCustomization** +> updateEmailCustomization(updateEmailCustomizationRequest) + + + + Version: 10.12.0.cl or later Updates a customization configuration for the notification email. #### Pre-requisites Requires `DEVELOPER` (**has developer privilege**) or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `DEVELOPER` (**Has developer privilege**) privilege is required. **NOTE**:This endpoint in currently in beta. Contact ThoughtSpot support to enable this on your instance. #### Usage guidelines To update a custom configuration pass these parameters in your API request: - A JSON map of configuration attributes `template_properties`. The following example shows a sample set of customization configuration: ``` { { \"cta_button_bg_color\": \"#444DEA\", \"cta_text_font_color\": \"#FFFFFF\", \"primary_bg_color\": \"#D3DEF0\", \"logo_url\": \"https://storage.pardot.com/710713/1642089901EbkRibJq/TS_fullworkmark_darkmode.png\", \"font_family\": \"\", \"product_name\": \"ThoughtSpot\", \"footer_address\": \"444 Castro St, Suite 1000 Mountain View, CA 94041\", \"footer_phone\": \"(800) 508-7008\", \"replacement_value_for_liveboard\": \"Dashboard\", \"replacement_value_for_answer\": \"Chart\", \"replacement_value_for_spot_iq\": \"AI Insights\", \"hide_footer_phone\": false, \"hide_footer_address\": false, \"hide_product_name\": false, \"hide_manage_notification\": false, \"hide_mobile_app_nudge\": false, \"hide_privacy_policy\": false, \"hide_ts_vocabulary_definitions\": false, \"hide_error_message\": false, \"hide_unsubscribe_link\": false, \"hide_notification_status\": false, \"hide_modify_alert\": false, \"company_website_url\": \"https://your-website.com/\", \"company_privacy_policy_url\" : \"https://link-to-privacy-policy.com/\", \"contact_support_url\": \"https://link-to-contact-support.com/\", \"hide_contact_support_url\": false, \"hide_logo_url\" : false } } ``` + +### Parameters + +| Name | Type | +|------------- | ------------- | +| **updateEmailCustomizationRequest** | [**UpdateEmailCustomizationRequest**](UpdateEmailCustomizationRequest.md) + +### Return type + +null (empty response body) + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **204** | Email Customization configuration successfully updated. | - | +| **400** | Invalid request. | - | +| **401** | Unauthorized access. | - | +| **403** | Unauthorized access. | - | +| **500** | Unexpected error | - | + + +# **validateEmailCustomization** +> validateEmailCustomization() + + + + Version: 10.10.0.cl or later Validates the email customization configuration if any set for the ThoughtSpot system. #### Pre-requisites Requires `DEVELOPER` (**has developer privilege**) or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `DEVELOPER` (**Has developer privilege**) privilege is required. **NOTE**:This endpoint in currently in beta. Contact ThoughtSpot support to enable this on your instance. + +### Parameters +This endpoint does not need any parameter. + +### Return type + +null (empty response body) + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **204** | Triggered test email for customization configuration | - | +| **400** | Invalid request. | - | +| **403** | Unauthorized access. | - | +| **500** | Unexpected error | - | + diff --git a/sdks/java/docs/EntityHeader.md b/sdks/java/docs/EntityHeader.md new file mode 100644 index 000000000..6816ec30f --- /dev/null +++ b/sdks/java/docs/EntityHeader.md @@ -0,0 +1,19 @@ + + +# EntityHeader + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**description** | **String** | Description of the data source. | [optional] | +|**dataSourceName** | **String** | Display name of the data source. | [optional] | +|**dataSourceIdentifier** | **String** | Unique identifier of the data source. | [optional] | + + +## Implemented Interfaces + +* Serializable + + diff --git a/sdks/java/docs/ErrorResponse.md b/sdks/java/docs/ErrorResponse.md new file mode 100644 index 000000000..04945e38f --- /dev/null +++ b/sdks/java/docs/ErrorResponse.md @@ -0,0 +1,17 @@ + + +# ErrorResponse + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**error** | **Object** | | [optional] | + + +## Implemented Interfaces + +* Serializable + + diff --git a/sdks/java/docs/EurekaDataSourceSuggestionResponse.md b/sdks/java/docs/EurekaDataSourceSuggestionResponse.md new file mode 100644 index 000000000..3c3f4c47a --- /dev/null +++ b/sdks/java/docs/EurekaDataSourceSuggestionResponse.md @@ -0,0 +1,17 @@ + + +# EurekaDataSourceSuggestionResponse + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**dataSources** | [**List<DataSource>**](DataSource.md) | List of data sources suggested. | [optional] | + + +## Implemented Interfaces + +* Serializable + + diff --git a/sdks/java/docs/EurekaDecomposeQueryResponse.md b/sdks/java/docs/EurekaDecomposeQueryResponse.md new file mode 100644 index 000000000..72db9fc23 --- /dev/null +++ b/sdks/java/docs/EurekaDecomposeQueryResponse.md @@ -0,0 +1,17 @@ + + +# EurekaDecomposeQueryResponse + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**decomposedQueryResponse** | [**EurekaLLMDecomposeQueryResponse**](EurekaLLMDecomposeQueryResponse.md) | | [optional] | + + +## Implemented Interfaces + +* Serializable + + diff --git a/sdks/java/docs/EurekaGetNLInstructionsResponse.md b/sdks/java/docs/EurekaGetNLInstructionsResponse.md new file mode 100644 index 000000000..2fb5f6a5f --- /dev/null +++ b/sdks/java/docs/EurekaGetNLInstructionsResponse.md @@ -0,0 +1,17 @@ + + +# EurekaGetNLInstructionsResponse + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**nlInstructionsInfo** | [**List<NLInstructionsInfo>**](NLInstructionsInfo.md) | List of NL instructions with their scopes. | | + + +## Implemented Interfaces + +* Serializable + + diff --git a/sdks/java/docs/EurekaGetRelevantQuestionsResponse.md b/sdks/java/docs/EurekaGetRelevantQuestionsResponse.md new file mode 100644 index 000000000..66e45ddb3 --- /dev/null +++ b/sdks/java/docs/EurekaGetRelevantQuestionsResponse.md @@ -0,0 +1,17 @@ + + +# EurekaGetRelevantQuestionsResponse + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**relevantQuestions** | [**List<EurekaRelevantQuestion>**](EurekaRelevantQuestion.md) | List of relevant questions that can be run on their respective data sources. | [optional] | + + +## Implemented Interfaces + +* Serializable + + diff --git a/sdks/java/docs/EurekaLLMDecomposeQueryResponse.md b/sdks/java/docs/EurekaLLMDecomposeQueryResponse.md new file mode 100644 index 000000000..6738b40cd --- /dev/null +++ b/sdks/java/docs/EurekaLLMDecomposeQueryResponse.md @@ -0,0 +1,17 @@ + + +# EurekaLLMDecomposeQueryResponse + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**decomposedQueries** | [**List<EurekaLLMSuggestedQuery>**](EurekaLLMSuggestedQuery.md) | List of analytical questions that can be run on their respective worksheet/data sources. | [optional] | + + +## Implemented Interfaces + +* Serializable + + diff --git a/sdks/java/docs/EurekaLLMSuggestedQuery.md b/sdks/java/docs/EurekaLLMSuggestedQuery.md new file mode 100644 index 000000000..231b9668c --- /dev/null +++ b/sdks/java/docs/EurekaLLMSuggestedQuery.md @@ -0,0 +1,19 @@ + + +# EurekaLLMSuggestedQuery + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**query** | **String** | NL query that can be run using spotter aka natural language search to get an AI generated answer. | [optional] | +|**worksheetId** | **String** | Unique identifier of the worksheet on which this query can be run on. | [optional] | +|**worksheetName** | **String** | Display name of the worksheet on which this query can be run on. | [optional] | + + +## Implemented Interfaces + +* Serializable + + diff --git a/sdks/java/docs/EurekaRelevantQuestion.md b/sdks/java/docs/EurekaRelevantQuestion.md new file mode 100644 index 000000000..f6a70033c --- /dev/null +++ b/sdks/java/docs/EurekaRelevantQuestion.md @@ -0,0 +1,19 @@ + + +# EurekaRelevantQuestion + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**query** | **String** | NL query that can be run using spotter aka natural language search to get an AI generated answer. | [optional] | +|**dataSourceIdentifier** | **String** | Unique identifier of the data source on which this query can be run on. | [optional] | +|**dataSourceName** | **String** | Display name of the data source on which this query can be run on. | [optional] | + + +## Implemented Interfaces + +* Serializable + + diff --git a/sdks/java/docs/EurekaSetNLInstructionsResponse.md b/sdks/java/docs/EurekaSetNLInstructionsResponse.md new file mode 100644 index 000000000..5d256d873 --- /dev/null +++ b/sdks/java/docs/EurekaSetNLInstructionsResponse.md @@ -0,0 +1,17 @@ + + +# EurekaSetNLInstructionsResponse + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**success** | **Boolean** | Success status of the operation. | | + + +## Implemented Interfaces + +* Serializable + + diff --git a/sdks/java/docs/EventChannelConfig.md b/sdks/java/docs/EventChannelConfig.md new file mode 100644 index 000000000..d98d2689e --- /dev/null +++ b/sdks/java/docs/EventChannelConfig.md @@ -0,0 +1,35 @@ + + +# EventChannelConfig + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**eventType** | [**EventTypeEnum**](#EventTypeEnum) | Type of event for which communication channels are configured | | +|**channels** | [**List<ChannelsEnum>**](#List<ChannelsEnum>) | Communication channels enabled for this event type. Empty array indicates no channels are enabled. | | + + + +## Enum: EventTypeEnum + +| Name | Value | +|---- | -----| +| LIVEBOARD_SCHEDULE | "LIVEBOARD_SCHEDULE" | + + + +## Enum: List<ChannelsEnum> + +| Name | Value | +|---- | -----| +| EMAIL | "EMAIL" | +| WEBHOOK | "WEBHOOK" | + + +## Implemented Interfaces + +* Serializable + + diff --git a/sdks/java/docs/EventChannelConfigInput.md b/sdks/java/docs/EventChannelConfigInput.md new file mode 100644 index 000000000..3b66c6518 --- /dev/null +++ b/sdks/java/docs/EventChannelConfigInput.md @@ -0,0 +1,35 @@ + + +# EventChannelConfigInput + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**eventType** | [**EventTypeEnum**](#EventTypeEnum) | Type of event for which communication channels are configured | | +|**channels** | [**List<ChannelsEnum>**](#List<ChannelsEnum>) | Communication channels enabled for this event type. Empty array disables all channels for this event. | | + + + +## Enum: EventTypeEnum + +| Name | Value | +|---- | -----| +| LIVEBOARD_SCHEDULE | "LIVEBOARD_SCHEDULE" | + + + +## Enum: List<ChannelsEnum> + +| Name | Value | +|---- | -----| +| EMAIL | "EMAIL" | +| WEBHOOK | "WEBHOOK" | + + +## Implemented Interfaces + +* Serializable + + diff --git a/sdks/java/docs/ExcludeMetadataListItemInput.md b/sdks/java/docs/ExcludeMetadataListItemInput.md new file mode 100644 index 000000000..a5c6aad11 --- /dev/null +++ b/sdks/java/docs/ExcludeMetadataListItemInput.md @@ -0,0 +1,35 @@ + + +# ExcludeMetadataListItemInput + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**identifier** | **String** | Unique ID or name of the metadata. | | +|**type** | [**TypeEnum**](#TypeEnum) | Type of metadata. Required if the name of the object is set as identifier. This attribute is optional when the object GUID is specified as identifier. 1. Liveboard 2. Answers 3. LOGICAL_TABLE for any data object such as table, worksheet or view 4. LOGICAL_COLUMN for a column of any data object such as table, worksheet or view 5. CONNECTION for connection objects 6. TAG for tag objects 7. USER for user objects 8. USER_GROUP for group objects 9. LOGICAL_RELATIONSHIP for table or worksheet joins. A join combines from one or several data object by using matching values. 10. INSIGHT_SPEC for SpotIQ objects | | + + + +## Enum: TypeEnum + +| Name | Value | +|---- | -----| +| LIVEBOARD | "LIVEBOARD" | +| ANSWER | "ANSWER" | +| LOGICAL_TABLE | "LOGICAL_TABLE" | +| LOGICAL_COLUMN | "LOGICAL_COLUMN" | +| CONNECTION | "CONNECTION" | +| TAG | "TAG" | +| USER | "USER" | +| USER_GROUP | "USER_GROUP" | +| LOGICAL_RELATIONSHIP | "LOGICAL_RELATIONSHIP" | +| INSIGHT_SPEC | "INSIGHT_SPEC" | + + +## Implemented Interfaces + +* Serializable + + diff --git a/sdks/java/docs/ExportAnswerReportRequest.md b/sdks/java/docs/ExportAnswerReportRequest.md new file mode 100644 index 000000000..cfcdf99b1 --- /dev/null +++ b/sdks/java/docs/ExportAnswerReportRequest.md @@ -0,0 +1,47 @@ + + +# ExportAnswerReportRequest + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**metadataIdentifier** | **String** | Unique ID or name of the metadata object. | [optional] | +|**sessionIdentifier** | **String** | Unique ID of the answer session. | [optional] | +|**generationNumber** | **Integer** | Generation number of the answer session. | [optional] | +|**fileFormat** | [**FileFormatEnum**](#FileFormatEnum) | Export file format. | [optional] | +|**runtimeFilter** | **Object** | JSON string representing runtime filter. { col1:region, op1: EQ, val1: northeast } | [optional] | +|**runtimeSort** | **Object** | JSON string representing runtime sort. { sortCol1: region, asc1 :true, sortCol2 : date } | [optional] | +|**runtimeParamOverride** | **Object** | JSON object for setting values of parameters in runtime. | [optional] | +|**regionalSettings** | [**RegionalSettingsInput**](RegionalSettingsInput.md) | Options for specific region specific overrides to support date/number/string/currency formatting. | [optional] | +|**pngOptions** | [**AnswerPngOptionsInput**](AnswerPngOptionsInput.md) | Options for PNG export. Version: 26.6.0.cl or later | [optional] | +|**personalisedViewIdentifier** | **String** | GUID or name of the personalised view of the Answer object. Version: 26.6.0.cl or later | [optional] | +|**type** | [**TypeEnum**](#TypeEnum) | Type of the answer being exported. Version: 26.6.0.cl or later | [optional] | + + + +## Enum: FileFormatEnum + +| Name | Value | +|---- | -----| +| CSV | "CSV" | +| PDF | "PDF" | +| XLSX | "XLSX" | +| PNG | "PNG" | + + + +## Enum: TypeEnum + +| Name | Value | +|---- | -----| +| SAVED | "SAVED" | +| PINNED | "PINNED" | + + +## Implemented Interfaces + +* Serializable + + diff --git a/sdks/java/docs/ExportLiveboardReportRequest.md b/sdks/java/docs/ExportLiveboardReportRequest.md new file mode 100644 index 000000000..db278a497 --- /dev/null +++ b/sdks/java/docs/ExportLiveboardReportRequest.md @@ -0,0 +1,40 @@ + + +# ExportLiveboardReportRequest + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**metadataIdentifier** | **String** | GUID or name of the Liveboard object. | | +|**tabIdentifiers** | **List<String>** | GUID or name of the tab of the Liveboard object. Version: 10.9.0.cl or later | [optional] | +|**personalisedViewIdentifier** | **String** | GUID or name of the personalised view of the Liveboard object. Version: 10.9.0.cl or later | [optional] | +|**visualizationIdentifiers** | **List<String>** | GUID or name of visualizations on the Liveboard. If this parameter is not defined, the API returns a report with all visualizations saved on a Liveboard. | [optional] | +|**transientContent** | **String** | Transient content of the Liveboard. | [optional] | +|**fileFormat** | [**FileFormatEnum**](#FileFormatEnum) | Export file format. | [optional] | +|**runtimeFilter** | **Object** | JSON object with representing filter condition to apply filters at runtime. For example, {\"col1\": \"region\", \"op1\": \"EQ\", \"val1\": \"northeast\" }. You can add multiple keys by incrementing the number at the end, for example, col2, op2, val2. For more information, see [API Documentation](https://developers.thoughtspot.com/docs/fetch-data-and-report-apis#_runtime_filters). | [optional] | +|**overrideFilters** | **Object** | Applied to the liveboard and overrides any filters already applied on the same columns in liveboard. Following example illustrate different kinds of filters: { \"override_filters\": [ { \"column_name\": \"Color\", \"generic_filter\": { \"op\": \"IN\", \"values\": [ \"almond\", \"turquoise\" ] }, \"negate\": false }, { \"column_name\": \"Commit Date\", \"date_filter\": { \"datePeriod\": \"HOUR\", \"number\": 3, \"type\": \"LAST_N_PERIOD\", \"op\": \"EQ\" } }, { \"column_name\": \"Sales\", \"generic_filter\": { \"op\": \"BW_INC\", \"values\": [ \"100000\", \"70000\" ] }, \"negate\": true } ] } | [optional] | +|**runtimeSort** | **Object** | JSON string representing runtime sort. For example, {\"sortCol1\": \"region\", \"asc1\" : true}. For more information, see [API Documentation](https://developers.thoughtspot.com/docs/fetch-data-and-report-apis#_runtime_sort). | [optional] | +|**pdfOptions** | [**PdfOptionsInput**](PdfOptionsInput.md) | Options for PDF export. | [optional] | +|**pngOptions** | [**PngOptionsInput**](PngOptionsInput.md) | Options for PNG export. | [optional] | +|**runtimeParamOverride** | **Object** | JSON object for setting values of parameters at runtime. For example, <code> {\"param1\": \"Double List Param\", \"paramVal1\": 0.5}</code>. You can add multiple keys by incrementing the number at the end, for example, param2, paramVal2. For more information, see [API Documentation](https://developers.thoughtspot.com/docs/fetch-data-and-report-apis#_runtime_parameters). | [optional] | +|**regionalSettings** | [**RegionalSettingsInput**](RegionalSettingsInput.md) | Options for specific region specific overrides to support date/number/string/currency formatting. | [optional] | + + + +## Enum: FileFormatEnum + +| Name | Value | +|---- | -----| +| PDF | "PDF" | +| PNG | "PNG" | +| CSV | "CSV" | +| XLSX | "XLSX" | + + +## Implemented Interfaces + +* Serializable + + diff --git a/sdks/java/docs/ExportMetadataTMLBatchedRequest.md b/sdks/java/docs/ExportMetadataTMLBatchedRequest.md new file mode 100644 index 000000000..2e0ff9e16 --- /dev/null +++ b/sdks/java/docs/ExportMetadataTMLBatchedRequest.md @@ -0,0 +1,41 @@ + + +# ExportMetadataTMLBatchedRequest + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**metadataType** | [**MetadataTypeEnum**](#MetadataTypeEnum) | Type of metadata object to export, can be one of USER | ROLE | USER_GROUP | | +|**batchOffset** | **Integer** | Indicates the position within the complete set from where the API should begin returning objects. | [optional] | +|**batchSize** | **Integer** | Determines the number of objects or items to be retrieved in a single request. | [optional] | +|**edocFormat** | [**EdocFormatEnum**](#EdocFormatEnum) | TML EDOC content format. | [optional] | +|**exportDependent** | **Boolean** | Indicates whether to export dependent metadata objects of specified metadata objects. | [optional] | +|**allOrgsOverride** | **Boolean** | Indicates whether to export is happening from all orgs context. | [optional] | + + + +## Enum: MetadataTypeEnum + +| Name | Value | +|---- | -----| +| USER | "USER" | +| USER_GROUP | "USER_GROUP" | +| ROLE | "ROLE" | + + + +## Enum: EdocFormatEnum + +| Name | Value | +|---- | -----| +| JSON | "JSON" | +| YAML | "YAML" | + + +## Implemented Interfaces + +* Serializable + + diff --git a/sdks/java/docs/ExportMetadataTMLRequest.md b/sdks/java/docs/ExportMetadataTMLRequest.md new file mode 100644 index 000000000..ecce3bab1 --- /dev/null +++ b/sdks/java/docs/ExportMetadataTMLRequest.md @@ -0,0 +1,44 @@ + + +# ExportMetadataTMLRequest + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**metadata** | [**List<ExportMetadataTypeInput>**](ExportMetadataTypeInput.md) | Metadata objects. | | +|**exportAssociated** | **Boolean** | Indicates whether to export associated metadata objects of specified metadata objects. | [optional] | +|**exportFqn** | **Boolean** | Adds FQNs of the referenced objects. For example, if you are exporting a Liveboard and its associated objects, the API returns the Liveboard TML data with the FQNs of the referenced worksheet. If the exported TML data includes FQNs, you don't need to manually add FQNs of the referenced objects during TML import. | [optional] | +|**edocFormat** | [**EdocFormatEnum**](#EdocFormatEnum) | TML EDOC content format. **Note: exporting in YAML format currently requires manual formatting of the output. For more details on the workaround, please click [here](https://developers.thoughtspot.com/docs/known-issues#_version_9_12_0_cl)** | [optional] | +|**exportSchemaVersion** | [**ExportSchemaVersionEnum**](#ExportSchemaVersionEnum) | Indicates whether to export worksheet TML in DEFAULT or V1 or V2 version. | [optional] | +|**exportDependent** | **Boolean** | Indicates whether to export table while exporting connection. | [optional] | +|**exportConnectionAsDependent** | **Boolean** | Indicates whether to export connection as dependent while exporting table/worksheet/answer/liveboard. This will only be active when export_associated is true. | [optional] | +|**allOrgsOverride** | **Boolean** | Indicates whether to export is happening from all orgs context. | [optional] | +|**exportOptions** | [**ExportOptions**](ExportOptions.md) | Flags to specify additional options for export. Version: 10.6.0.cl or later | [optional] | + + + +## Enum: EdocFormatEnum + +| Name | Value | +|---- | -----| +| JSON | "JSON" | +| YAML | "YAML" | + + + +## Enum: ExportSchemaVersionEnum + +| Name | Value | +|---- | -----| +| DEFAULT | "DEFAULT" | +| V1 | "V1" | +| V2 | "V2" | + + +## Implemented Interfaces + +* Serializable + + diff --git a/sdks/java/docs/ExportMetadataTypeInput.md b/sdks/java/docs/ExportMetadataTypeInput.md new file mode 100644 index 000000000..2fcd3dfe2 --- /dev/null +++ b/sdks/java/docs/ExportMetadataTypeInput.md @@ -0,0 +1,37 @@ + + +# ExportMetadataTypeInput + +MetadataType InputType used in Export MetadataType API + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**type** | [**TypeEnum**](#TypeEnum) | Type of metadata. Required if the name of the object is set as the identifier. This attribute is optional when the object GUID is specified as the identifier. | [optional] | +|**identifier** | **String** | Unique ID or name of the metadata object. Not required if the metadata type is ANSWER when session_id and generation_number is set. | [optional] | +|**sessionIdentifier** | **String** | Unique ID of the Answer session. Required if the metadata type is ANSWER and identifier is not set. | [optional] | +|**generationNumber** | **Integer** | Generation Number of the Answer session. Required if the metadata type is ANSWER and identifier is not set. | [optional] | + + + +## Enum: TypeEnum + +| Name | Value | +|---- | -----| +| LIVEBOARD | "LIVEBOARD" | +| ANSWER | "ANSWER" | +| LOGICAL_TABLE | "LOGICAL_TABLE" | +| CONNECTION | "CONNECTION" | +| CUSTOM_ACTION | "CUSTOM_ACTION" | +| USER | "USER" | +| USER_GROUP | "USER_GROUP" | +| ROLE | "ROLE" | +| FEEDBACK | "FEEDBACK" | + + +## Implemented Interfaces + +* Serializable + + diff --git a/sdks/java/docs/ExportOptions.md b/sdks/java/docs/ExportOptions.md new file mode 100644 index 000000000..c961d8bb1 --- /dev/null +++ b/sdks/java/docs/ExportOptions.md @@ -0,0 +1,23 @@ + + +# ExportOptions + +Flags to specify additional options for export. This will only be active when UserDefinedId in TML is enabled. + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**includeObjIdRef** | **Boolean** | Boolean Flag to export Object ID of referenced object. This flag will work only after the Object ID feature has been enabled. Please contact support to enable the feature. | [optional] | +|**includeGuid** | **Boolean** | Boolean flag to export guid of the object. This flag will work only after the Object ID feature has been enabled. Please contact support to enable the feature. | [optional] | +|**includeObjId** | **Boolean** | Boolean flag to export Object ID of the object. This flag will work only after the Object ID feature has been enabled. Please contact support to enable the feature. | [optional] | +|**exportWithAssociatedFeedbacks** | **Boolean** | Boolean flag indicating whether to export associated feedbacks of the object. This will only be respected when the object can have feedbacks. Version: 10.7.0.cl or later | [optional] | +|**exportColumnSecurityRules** | **Boolean** | Boolean flag indicating whether to export column security rules of the object. This will only be respected when the object can have column security rules and export_associated is true. Version: 10.12.0.cl or later | [optional] | +|**exportWithColumnAliases** | **Boolean** | Boolean flag indicating whether to export column aliases of the model. This will only be respected when the object can have column aliases. Version: 10.13.0.cl or later | [optional] | + + +## Implemented Interfaces + +* Serializable + + diff --git a/sdks/java/docs/ExternalTableInput.md b/sdks/java/docs/ExternalTableInput.md new file mode 100644 index 000000000..36fd0ca23 --- /dev/null +++ b/sdks/java/docs/ExternalTableInput.md @@ -0,0 +1,20 @@ + + +# ExternalTableInput + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**connectionIdentifier** | **String** | Unique ID or name of the connection. | | +|**databaseName** | **String** | Name of the database. | [optional] | +|**schemaName** | **String** | Name of the schema. | [optional] | +|**tableName** | **String** | Name of the table. Table names may be case-sensitive depending on the database system. | | + + +## Implemented Interfaces + +* Serializable + + diff --git a/sdks/java/docs/FavoriteMetadataInput.md b/sdks/java/docs/FavoriteMetadataInput.md new file mode 100644 index 000000000..972c63fbe --- /dev/null +++ b/sdks/java/docs/FavoriteMetadataInput.md @@ -0,0 +1,27 @@ + + +# FavoriteMetadataInput + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**identifier** | **String** | Unique ID or name of the metadata object. | [optional] | +|**type** | [**TypeEnum**](#TypeEnum) | Type of metadata object. Required if the name of the object is set as the identifier. This attribute is optional when the object GUID is specified as the identifier. | [optional] | + + + +## Enum: TypeEnum + +| Name | Value | +|---- | -----| +| LIVEBOARD | "LIVEBOARD" | +| ANSWER | "ANSWER" | + + +## Implemented Interfaces + +* Serializable + + diff --git a/sdks/java/docs/FavoriteMetadataItem.md b/sdks/java/docs/FavoriteMetadataItem.md new file mode 100644 index 000000000..746f1db57 --- /dev/null +++ b/sdks/java/docs/FavoriteMetadataItem.md @@ -0,0 +1,35 @@ + + +# FavoriteMetadataItem + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**id** | **String** | Unique ID of the metadata object. | | +|**name** | **String** | name of the metadata object. | | +|**type** | [**TypeEnum**](#TypeEnum) | Type of metadata object. Required if the name of the object is set as the identifier. This attribute is optional when the object GUID is specified as the identifier. | | + + + +## Enum: TypeEnum + +| Name | Value | +|---- | -----| +| LIVEBOARD | "LIVEBOARD" | +| ANSWER | "ANSWER" | +| LOGICAL_TABLE | "LOGICAL_TABLE" | +| LOGICAL_COLUMN | "LOGICAL_COLUMN" | +| CONNECTION | "CONNECTION" | +| TAG | "TAG" | +| USER | "USER" | +| USER_GROUP | "USER_GROUP" | +| LOGICAL_RELATIONSHIP | "LOGICAL_RELATIONSHIP" | + + +## Implemented Interfaces + +* Serializable + + diff --git a/sdks/java/docs/FavoriteObjectOptionsInput.md b/sdks/java/docs/FavoriteObjectOptionsInput.md new file mode 100644 index 000000000..d732bb5a7 --- /dev/null +++ b/sdks/java/docs/FavoriteObjectOptionsInput.md @@ -0,0 +1,19 @@ + + +# FavoriteObjectOptionsInput + +Favorite object options. + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**include** | **Boolean** | Includes objects marked as favorite for the specified users. | [optional] | +|**userIdentifiers** | **List<String>** | Unique ID or name of the users. If not specified, the favorite objects of current logged in user are returned. | [optional] | + + +## Implemented Interfaces + +* Serializable + + diff --git a/sdks/java/docs/FetchAnswerDataRequest.md b/sdks/java/docs/FetchAnswerDataRequest.md new file mode 100644 index 000000000..f9d1428f6 --- /dev/null +++ b/sdks/java/docs/FetchAnswerDataRequest.md @@ -0,0 +1,32 @@ + + +# FetchAnswerDataRequest + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**metadataIdentifier** | **String** | GUID or name of the Answer. | | +|**dataFormat** | [**DataFormatEnum**](#DataFormatEnum) | JSON output in compact or full format. The FULL option is available in 9.12.5.cl or later. | [optional] | +|**recordOffset** | **Integer** | The starting record number from where the records should be included. | [optional] | +|**recordSize** | **Integer** | The number of records to include in a batch. | [optional] | +|**runtimeFilter** | **Object** | JSON object with representing filter condition to apply filters at runtime. For example, <code> {\"col1\": \"item type\", \"op1\": \"EQ\", \"val1\": \"Bags\"} </code>. You can add multiple keys by incrementing the number at the end, for example, col2, op2, val2, and col3, op3, val3. For more information, see [API Documentation](https://developers.thoughtspot.com/docs/fetch-data-and-report-apis#_runtime_filters). | [optional] | +|**runtimeSort** | **Object** | JSON object representing columns to sort data at runtime. For example, <code> {\"sortCol1\": \"sales\", \"asc1\": true} </code>. You can add multiple keys by incrementing the number at the end, for example, sortCol1, asc2. For more information, see [API Documentation](https://developers.thoughtspot.com/docs/fetch-data-and-report-apis#_runtime_sort). | [optional] | +|**runtimeParamOverride** | **Object** | JSON object for setting values of parameters at runtime. For example, <code> {\"param1\": \"Double List Param\", \"paramVal1\": 0.5}</code>. You can add multiple keys by incrementing the number at the end, for example, param2, paramVal2. For more information, see [API Documentation](https://developers.thoughtspot.com/docs/fetch-data-and-report-apis#_runtime_parameters). | [optional] | + + + +## Enum: DataFormatEnum + +| Name | Value | +|---- | -----| +| FULL | "FULL" | +| COMPACT | "COMPACT" | + + +## Implemented Interfaces + +* Serializable + + diff --git a/sdks/java/docs/FetchAnswerSqlQueryRequest.md b/sdks/java/docs/FetchAnswerSqlQueryRequest.md new file mode 100644 index 000000000..ea302af75 --- /dev/null +++ b/sdks/java/docs/FetchAnswerSqlQueryRequest.md @@ -0,0 +1,17 @@ + + +# FetchAnswerSqlQueryRequest + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**metadataIdentifier** | **String** | ID or name of an Answer. | | + + +## Implemented Interfaces + +* Serializable + + diff --git a/sdks/java/docs/FetchAsyncImportTaskStatusRequest.md b/sdks/java/docs/FetchAsyncImportTaskStatusRequest.md new file mode 100644 index 000000000..333735be7 --- /dev/null +++ b/sdks/java/docs/FetchAsyncImportTaskStatusRequest.md @@ -0,0 +1,33 @@ + + +# FetchAsyncImportTaskStatusRequest + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**taskIds** | **List<String>** | List of task IDs to fetch status for. | [optional] | +|**taskStatus** | [**List<TaskStatusEnum>**](#List<TaskStatusEnum>) | List of task statuses to filter on. Valid values: [IN_QUEUE, IN_PROGRESS, COMPLETED, FAILED] | [optional] | +|**authorIdentifier** | **String** | Author GUID or name of async import tasks to filter on. | [optional] | +|**recordOffset** | **Integer** | The offset point, starting from where the task status should be included in the response. | [optional] | +|**recordSize** | **Integer** | The number of task statuses that should be included in the response starting from offset position. | [optional] | +|**includeImportResponse** | **Boolean** | Boolean flag to specify whether to include import response in the task status objects. | [optional] | + + + +## Enum: List<TaskStatusEnum> + +| Name | Value | +|---- | -----| +| COMPLETED | "COMPLETED" | +| IN_QUEUE | "IN_QUEUE" | +| IN_PROGRESS | "IN_PROGRESS" | +| FAILED | "FAILED" | + + +## Implemented Interfaces + +* Serializable + + diff --git a/sdks/java/docs/FetchColumnSecurityRulesRequest.md b/sdks/java/docs/FetchColumnSecurityRulesRequest.md new file mode 100644 index 000000000..6dbddf319 --- /dev/null +++ b/sdks/java/docs/FetchColumnSecurityRulesRequest.md @@ -0,0 +1,17 @@ + + +# FetchColumnSecurityRulesRequest + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**tables** | [**List<ColumnSecurityRuleTableInput>**](ColumnSecurityRuleTableInput.md) | Array of table identifier objects for which to fetch column security rules | | + + +## Implemented Interfaces + +* Serializable + + diff --git a/sdks/java/docs/FetchConnectionDiffStatusResponse.md b/sdks/java/docs/FetchConnectionDiffStatusResponse.md new file mode 100644 index 000000000..d6357538f --- /dev/null +++ b/sdks/java/docs/FetchConnectionDiffStatusResponse.md @@ -0,0 +1,17 @@ + + +# FetchConnectionDiffStatusResponse + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**status** | **Boolean** | Status of the connection diff. | [optional] | + + +## Implemented Interfaces + +* Serializable + + diff --git a/sdks/java/docs/FetchLiveboardDataRequest.md b/sdks/java/docs/FetchLiveboardDataRequest.md new file mode 100644 index 000000000..5eb966836 --- /dev/null +++ b/sdks/java/docs/FetchLiveboardDataRequest.md @@ -0,0 +1,34 @@ + + +# FetchLiveboardDataRequest + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**metadataIdentifier** | **String** | GUID or name of the Liveboard. | | +|**visualizationIdentifiers** | **List<String>** | GUIDs or names of the visualizations on the Liveboard. | [optional] | +|**transientContent** | **String** | Transient content of the Liveboard. | [optional] | +|**dataFormat** | [**DataFormatEnum**](#DataFormatEnum) | JSON output in compact or full format. The FULL option is available in 9.12.5.cl or later. | [optional] | +|**recordOffset** | **Integer** | The starting record number from where the records should be included. | [optional] | +|**recordSize** | **Integer** | The number of records to include in a batch. | [optional] | +|**runtimeFilter** | **Object** | JSON object with representing filter condition to apply filters at runtime. For example, <code> {\"col1\": \"item type\", \"op1\": \"EQ\", \"val1\": \"Bags\"} </code>. You can add multiple keys by incrementing the number at the end, for example, col2, op2, val2, and col3, op3, val3. For more information, see [API Documentation](https://developers.thoughtspot.com/docs/fetch-data-and-report-apis#_runtime_filters). | [optional] | +|**runtimeSort** | **Object** | JSON object representing columns to sort data at runtime. For example, <code> {\"sortCol1\": \"sales\", \"asc1\": true} </code>. You can add multiple keys by incrementing the number at the end, for example, sortCol1, asc2. For more information, see [API Documentation](https://developers.thoughtspot.com/docs/fetch-data-and-report-apis#_runtime_sort). | [optional] | +|**runtimeParamOverride** | **Object** | JSON object for setting values of parameters at runtime. For example, <code> {\"param1\": \"Double List Param\", \"paramVal1\": 0.5}</code>. You can add multiple keys by incrementing the number at the end, for example, param2, paramVal2. For more information, see [API Documentation](https://developers.thoughtspot.com/docs/fetch-data-and-report-apis#_runtime_parameters). | [optional] | + + + +## Enum: DataFormatEnum + +| Name | Value | +|---- | -----| +| FULL | "FULL" | +| COMPACT | "COMPACT" | + + +## Implemented Interfaces + +* Serializable + + diff --git a/sdks/java/docs/FetchLiveboardSqlQueryRequest.md b/sdks/java/docs/FetchLiveboardSqlQueryRequest.md new file mode 100644 index 000000000..fce1e7a65 --- /dev/null +++ b/sdks/java/docs/FetchLiveboardSqlQueryRequest.md @@ -0,0 +1,18 @@ + + +# FetchLiveboardSqlQueryRequest + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**metadataIdentifier** | **String** | ID or name of the Liveboard. | | +|**visualizationIdentifiers** | **List<String>** | Unique ID or name of visualizations. | [optional] | + + +## Implemented Interfaces + +* Serializable + + diff --git a/sdks/java/docs/FetchLogsRequest.md b/sdks/java/docs/FetchLogsRequest.md new file mode 100644 index 000000000..ac92cc434 --- /dev/null +++ b/sdks/java/docs/FetchLogsRequest.md @@ -0,0 +1,28 @@ + + +# FetchLogsRequest + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**logType** | [**LogTypeEnum**](#LogTypeEnum) | Name of the log type | | +|**startEpochTimeInMillis** | **Float** | Start time in EPOCH format | [optional] | +|**endEpochTimeInMillis** | **Float** | End time in EPOCH format | [optional] | +|**getAllLogs** | **Boolean** | Fetch all the logs. This is available from 9.10.5.cl | [optional] | + + + +## Enum: LogTypeEnum + +| Name | Value | +|---- | -----| +| SECURITY_AUDIT | "SECURITY_AUDIT" | + + +## Implemented Interfaces + +* Serializable + + diff --git a/sdks/java/docs/FetchObjectPrivilegesRequest.md b/sdks/java/docs/FetchObjectPrivilegesRequest.md new file mode 100644 index 000000000..025017665 --- /dev/null +++ b/sdks/java/docs/FetchObjectPrivilegesRequest.md @@ -0,0 +1,20 @@ + + +# FetchObjectPrivilegesRequest + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**metadata** | [**List<ObjectPrivilegesMetadataInput>**](ObjectPrivilegesMetadataInput.md) | Metadata objects for which you want to fetch object privileges. For now only LOGICAL_TABLE is supported. It may be extended to other metadata types in the future. | | +|**principals** | [**List<PrincipalsInput>**](PrincipalsInput.md) | User or group objects for which you want to fetch object privileges. If not specified, the API returns all users and groups that have object privileges on the specified metadata objects. | [optional] | +|**recordOffset** | **Integer** | The starting record number from where the records should be included for each metadata type. | [optional] | +|**recordSize** | **Integer** | The number of records that should be included for each metadata type. | [optional] | + + +## Implemented Interfaces + +* Serializable + + diff --git a/sdks/java/docs/FetchPermissionsOfPrincipalsRequest.md b/sdks/java/docs/FetchPermissionsOfPrincipalsRequest.md new file mode 100644 index 000000000..c4c7fadb6 --- /dev/null +++ b/sdks/java/docs/FetchPermissionsOfPrincipalsRequest.md @@ -0,0 +1,35 @@ + + +# FetchPermissionsOfPrincipalsRequest + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**principals** | [**List<PrincipalsInput>**](PrincipalsInput.md) | GUID or name of the user or group. | | +|**metadata** | [**List<PermissionsMetadataTypeInput>**](PermissionsMetadataTypeInput.md) | Metadata objects for which you want to fetch permission details. If not specified, the API returns permission details for all metadata objects that the specified users and groups can access. | [optional] | +|**recordOffset** | **Integer** | The starting record number from where the records should be included for each metadata type. | [optional] | +|**recordSize** | **Integer** | The number of records that should be included for each metadata type. | [optional] | +|**defaultMetadataType** | [**DefaultMetadataTypeEnum**](#DefaultMetadataTypeEnum) | When no metadata objects input is passed, metadata objects of this type are fetched. | [optional] | + + + +## Enum: DefaultMetadataTypeEnum + +| Name | Value | +|---- | -----| +| ALL | "ALL" | +| LIVEBOARD | "LIVEBOARD" | +| ANSWER | "ANSWER" | +| LOGICAL_TABLE | "LOGICAL_TABLE" | +| LOGICAL_COLUMN | "LOGICAL_COLUMN" | +| CONNECTION | "CONNECTION" | +| COLLECTION | "COLLECTION" | + + +## Implemented Interfaces + +* Serializable + + diff --git a/sdks/java/docs/FetchPermissionsOnMetadataRequest.md b/sdks/java/docs/FetchPermissionsOnMetadataRequest.md new file mode 100644 index 000000000..f15c1654f --- /dev/null +++ b/sdks/java/docs/FetchPermissionsOnMetadataRequest.md @@ -0,0 +1,22 @@ + + +# FetchPermissionsOnMetadataRequest + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**metadata** | [**List<PermissionsMetadataTypeInput>**](PermissionsMetadataTypeInput.md) | GUID or name of the metadata object. | | +|**principals** | [**List<PrincipalsInput>**](PrincipalsInput.md) | User or group objects for which you want to fetch permissions. If not specified, the API returns all users and groups that can access the specified metadata objects. | [optional] | +|**includeDependentObjects** | **Boolean** | Indicates whether to fetch permissions of dependent metadata objects. | [optional] | +|**recordOffset** | **Integer** | The starting record number from where the records should be included for each metadata type. | [optional] | +|**recordSize** | **Integer** | The number of records that should be included for each metadata type. | [optional] | +|**permissionType** | **String** | <div>Version: 10.3.0.cl or later </div> Specifies the type of permission. Valid values are: EFFECTIVE - If the user permission to the metadata objects is granted by the privileges assigned to the groups to which they belong. DEFINED - If a user or user group received access to metadata objects via object sharing by another user. | [optional] | + + +## Implemented Interfaces + +* Serializable + + diff --git a/sdks/java/docs/FilterRules.md b/sdks/java/docs/FilterRules.md new file mode 100644 index 000000000..ef208d488 --- /dev/null +++ b/sdks/java/docs/FilterRules.md @@ -0,0 +1,43 @@ + + +# FilterRules + +Filter Rules to be applied on Objects. + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**columnName** | **String** | The name of the column to apply the filter on. | | +|**operator** | [**OperatorEnum**](#OperatorEnum) | The operator to use for filtering. Example: EQ (equals), GT(greater than), etc. | | +|**values** | **List<Object>** | The values to filter on. To get all records, use TS_WILDCARD_ALL as values. | | + + + +## Enum: OperatorEnum + +| Name | Value | +|---- | -----| +| EQ | "EQ" | +| NE | "NE" | +| LT | "LT" | +| LE | "LE" | +| GT | "GT" | +| GE | "GE" | +| IN | "IN" | +| BW | "BW" | +| CONTAINS | "CONTAINS" | +| BEGINS_WITH | "BEGINS_WITH" | +| ENDS_WITH | "ENDS_WITH" | +| BW_INC | "BW_INC" | +| BW_INC_MIN | "BW_INC_MIN" | +| BW_INC_MAX | "BW_INC_MAX" | +| LIKE | "LIKE" | +| NOT_IN | "NOT_IN" | + + +## Implemented Interfaces + +* Serializable + + diff --git a/sdks/java/docs/ForceLogoutUsersRequest.md b/sdks/java/docs/ForceLogoutUsersRequest.md new file mode 100644 index 000000000..7b7c4d071 --- /dev/null +++ b/sdks/java/docs/ForceLogoutUsersRequest.md @@ -0,0 +1,17 @@ + + +# ForceLogoutUsersRequest + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**userIdentifiers** | **List<String>** | GUID or name of the users for force logging out their sessions. | [optional] | + + +## Implemented Interfaces + +* Serializable + + diff --git a/sdks/java/docs/Frequency.md b/sdks/java/docs/Frequency.md new file mode 100644 index 000000000..2ef64b7b3 --- /dev/null +++ b/sdks/java/docs/Frequency.md @@ -0,0 +1,18 @@ + + +# Frequency + +Configuration of schedule with cron expression + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**cronExpression** | [**CronExpression**](CronExpression.md) | | | + + +## Implemented Interfaces + +* Serializable + + diff --git a/sdks/java/docs/FrequencyInput.md b/sdks/java/docs/FrequencyInput.md new file mode 100644 index 000000000..2cc49cb06 --- /dev/null +++ b/sdks/java/docs/FrequencyInput.md @@ -0,0 +1,18 @@ + + +# FrequencyInput + +Configuration of schedule with cron expression + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**cronExpression** | [**CronExpressionInput**](CronExpressionInput.md) | | | + + +## Implemented Interfaces + +* Serializable + + diff --git a/sdks/java/docs/GenerateCSVRequest.md b/sdks/java/docs/GenerateCSVRequest.md new file mode 100644 index 000000000..5bffcda57 --- /dev/null +++ b/sdks/java/docs/GenerateCSVRequest.md @@ -0,0 +1,67 @@ + + +# GenerateCSVRequest + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**startDate** | **String** | Start date for the calendar in `MM/dd/yyyy` format. | | +|**endDate** | **String** | End date for the calendar in `MM/dd/yyyy` format. | | +|**calendarType** | [**CalendarTypeEnum**](#CalendarTypeEnum) | Type of the calendar. | [optional] | +|**monthOffset** | [**MonthOffsetEnum**](#MonthOffsetEnum) | Month offset to start calendar from `January`. | [optional] | +|**startDayOfWeek** | [**StartDayOfWeekEnum**](#StartDayOfWeekEnum) | Specify the starting day of the week. | [optional] | +|**quarterNamePrefix** | **String** | Prefix to add before the quarter. | [optional] | +|**yearNamePrefix** | **String** | Prefix to add before the year. | [optional] | + + + +## Enum: CalendarTypeEnum + +| Name | Value | +|---- | -----| +| MONTH_OFFSET | "MONTH_OFFSET" | +| FOUR_FOUR_FIVE | "FOUR_FOUR_FIVE" | +| FOUR_FIVE_FOUR | "FOUR_FIVE_FOUR" | +| FIVE_FOUR_FOUR | "FIVE_FOUR_FOUR" | + + + +## Enum: MonthOffsetEnum + +| Name | Value | +|---- | -----| +| JANUARY | "January" | +| FEBRUARY | "February" | +| MARCH | "March" | +| APRIL | "April" | +| MAY | "May" | +| JUNE | "June" | +| JULY | "July" | +| AUGUST | "August" | +| SEPTEMBER | "September" | +| OCTOBER | "October" | +| NOVEMBER | "November" | +| DECEMBER | "December" | + + + +## Enum: StartDayOfWeekEnum + +| Name | Value | +|---- | -----| +| SUNDAY | "Sunday" | +| MONDAY | "Monday" | +| TUESDAY | "Tuesday" | +| WEDNESDAY | "Wednesday" | +| THURSDAY | "Thursday" | +| FRIDAY | "Friday" | +| SATURDAY | "Saturday" | + + +## Implemented Interfaces + +* Serializable + + diff --git a/sdks/java/docs/GenericInfo.md b/sdks/java/docs/GenericInfo.md new file mode 100644 index 000000000..6bb186283 --- /dev/null +++ b/sdks/java/docs/GenericInfo.md @@ -0,0 +1,18 @@ + + +# GenericInfo + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**id** | **String** | | [optional] | +|**name** | **String** | | [optional] | + + +## Implemented Interfaces + +* Serializable + + diff --git a/sdks/java/docs/GetAsyncImportStatusResponse.md b/sdks/java/docs/GetAsyncImportStatusResponse.md new file mode 100644 index 000000000..4125b578b --- /dev/null +++ b/sdks/java/docs/GetAsyncImportStatusResponse.md @@ -0,0 +1,18 @@ + + +# GetAsyncImportStatusResponse + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**statusList** | [**List<ImportEPackAsyncTaskStatus>**](ImportEPackAsyncTaskStatus.md) | List of task statuses. | [optional] | +|**lastBatch** | **Boolean** | Indicates whether there are more task statuses to fetch. | [optional] | + + +## Implemented Interfaces + +* Serializable + + diff --git a/sdks/java/docs/GetCustomAccessTokenRequest.md b/sdks/java/docs/GetCustomAccessTokenRequest.md new file mode 100644 index 000000000..2b97f3296 --- /dev/null +++ b/sdks/java/docs/GetCustomAccessTokenRequest.md @@ -0,0 +1,41 @@ + + +# GetCustomAccessTokenRequest + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**username** | **String** | Username of the ThoughtSpot user. The username is stored in the `name` attribute of the user object. | | +|**password** | **String** | Password of the user account | [optional] | +|**secretKey** | **String** | The secret key string provided by the ThoughtSpot application server. ThoughtSpot generates a secret key when Trusted authentication is enabled. | [optional] | +|**validityTimeInSec** | **Integer** | Token validity duration in seconds | [optional] | +|**orgIdentifier** | **String** | ID or name of the Org context to log in to. If the Org ID or name is not specified but a secret key is provided, the user will be logged into the Org associated with the secret key. If neither the Org ID/name nor the secret key is provided, the user will be logged into the Org context from their previous login session. | [optional] | +|**persistOption** | [**PersistOptionEnum**](#PersistOptionEnum) | Indicates whether the specified attributes should be persisted or not. RESET and NONE are not applicable if you are setting variable_values. | | +|**filterRules** | [**List<FilterRules>**](FilterRules.md) | Filter rules. | [optional] | +|**parameterValues** | [**List<ParameterValues>**](ParameterValues.md) | Allows developers to assign parameter values for existing parameters to a user at login. Note: Using parameter values for row level security use cases will ultimately be deprecated. Developers can still pass data security values via the Custom Access token via the variable_values field and create RLS rules based on custom variables. Please refer to the [ABAC via RLS documentation](https://developers.thoughtspot.com/docs/abac-user-parameters) for more details. | [optional] | +|**variableValues** | [**List<VariableValues>**](VariableValues.md) | List of variable values where `name` references an existing formula variable and `values` is any value from the corresponding column. Version: 10.14.0.cl or later | [optional] | +|**objects** | [**List<TokenAccessScopeObject>**](TokenAccessScopeObject.md) | Objects on which the parameter and variable values should be applied to | [optional] | +|**email** | **String** | (just-in-time (JIT) provisioning)Email address of the user. Specify this attribute when creating a new user. | [optional] | +|**displayName** | **String** | (just-in-time (JIT) provisioning) Indicates display name of the user. Specify this attribute when creating a new user. | [optional] | +|**groups** | [**List<GroupObject>**](GroupObject.md) | (just-in-time (JIT) provisioning) ID or name of the groups to which the newly created user belongs. Specify this attribute when creating a new user. | [optional] | +|**autoCreate** | **Boolean** | Creates a new user if the specified username does not exist in ThoughtSpot. To provision a user just-in-time (JIT), set this attribute to true. Note: For JIT provisioning of a user, the secret_key is required. New formula variables won't be created. Version: 10.5.0.cl or later | [optional] | + + + +## Enum: PersistOptionEnum + +| Name | Value | +|---- | -----| +| REPLACE | "REPLACE" | +| APPEND | "APPEND" | +| NONE | "NONE" | +| RESET | "RESET" | + + +## Implemented Interfaces + +* Serializable + + diff --git a/sdks/java/docs/GetDataSourceSuggestionsRequest.md b/sdks/java/docs/GetDataSourceSuggestionsRequest.md new file mode 100644 index 000000000..5eedc6197 --- /dev/null +++ b/sdks/java/docs/GetDataSourceSuggestionsRequest.md @@ -0,0 +1,17 @@ + + +# GetDataSourceSuggestionsRequest + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**query** | **String** | User query used to suggest data sources. | | + + +## Implemented Interfaces + +* Serializable + + diff --git a/sdks/java/docs/GetFullAccessTokenRequest.md b/sdks/java/docs/GetFullAccessTokenRequest.md new file mode 100644 index 000000000..e21d60cdb --- /dev/null +++ b/sdks/java/docs/GetFullAccessTokenRequest.md @@ -0,0 +1,26 @@ + + +# GetFullAccessTokenRequest + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**username** | **String** | Username of the ThoughtSpot user. The username is stored in the `name` attribute of the user object. | | +|**password** | **String** | Password of the user account | [optional] | +|**secretKey** | **String** | The secret key string provided by the ThoughtSpot application server. ThoughtSpot generates a secret key when Trusted authentication is enabled. | [optional] | +|**validityTimeInSec** | **Integer** | Token validity duration in seconds | [optional] | +|**orgId** | **Integer** | ID of the Org context to log in to. If the Org ID is not specified and secret key is provided then user will be logged into the org corresponding to the secret key, and if secret key is not provided then user will be logged in to the Org context of their previous login session. | [optional] | +|**email** | **String** | Email address of the user. Specify this attribute when creating a new user (just-in-time (JIT) provisioning). | [optional] | +|**displayName** | **String** | Indicates display name of the user. Use this parameter to provision a user just-in-time (JIT). | [optional] | +|**autoCreate** | **Boolean** | Creates a new user if the specified username does not already exist in ThoughtSpot. To provision a user just-in-time (JIT), set this attribute to true. Note: For JIT provisioning of a user, the secret_key is required. | [optional] | +|**groupIdentifiers** | **List<String>** | ID or name of the groups to which the newly created user belongs. Use this parameter to provision a user just-in-time (JIT). | [optional] | +|**userParameters** | [**UserParameterOptions**](UserParameterOptions.md) | <div>Deprecated: 10.4.0.cl and later </div> Define attributes such as Runtime filters and Runtime parameters to send security entitlements to a user session. For more information, see [Documentation](https://developers.thoughtspot.com/docs/abac-user-parameters). | [optional] | + + +## Implemented Interfaces + +* Serializable + + diff --git a/sdks/java/docs/GetNLInstructionsRequest.md b/sdks/java/docs/GetNLInstructionsRequest.md new file mode 100644 index 000000000..6166b497a --- /dev/null +++ b/sdks/java/docs/GetNLInstructionsRequest.md @@ -0,0 +1,17 @@ + + +# GetNLInstructionsRequest + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**dataSourceIdentifier** | **String** | Unique ID or name of the data-model for which to retrieve NL instructions. | | + + +## Implemented Interfaces + +* Serializable + + diff --git a/sdks/java/docs/GetObjectAccessTokenRequest.md b/sdks/java/docs/GetObjectAccessTokenRequest.md new file mode 100644 index 000000000..1ad301910 --- /dev/null +++ b/sdks/java/docs/GetObjectAccessTokenRequest.md @@ -0,0 +1,27 @@ + + +# GetObjectAccessTokenRequest + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**username** | **String** | Username of the ThoughtSpot user. The username is stored in the `name` attribute of the user object. | | +|**objectId** | **String** | GUID of the ThoughtSpot metadata object that the user can access. The bearer will only have access to the object specified in the API request. | [optional] | +|**password** | **String** | Password of the user account | [optional] | +|**secretKey** | **String** | The secret key string provided by the ThoughtSpot application server. ThoughtSpot generates a secret key when Trusted authentication is enabled. | [optional] | +|**validityTimeInSec** | **Integer** | Token validity duration in seconds | [optional] | +|**orgId** | **Integer** | ID of the Org context to log in to. If the Org ID is not specified and secret key is provided then user will be logged into the org corresponding to the secret key, and if secret key is not provided then user will be logged in to the Org context of their previous login session. | [optional] | +|**email** | **String** | Email address of the user. Specify this attribute when creating a new user (just-in-time (JIT) provisioning). | [optional] | +|**displayName** | **String** | Display name of the user. Specify this attribute when creating a new user (just-in-time (JIT) provisioning). | [optional] | +|**autoCreate** | **Boolean** | Creates a new user if the specified username does not exist in ThoughtSpot. To provision a user just-in-time (JIT), set this attribute to true. Note: For JIT provisioning of a user, the secret_key is required. | [optional] | +|**groupIdentifiers** | **List<String>** | Unique ID or name of the groups to which you want to assign the new user. You can specify this attribute to dynamically assign privileges during just-in-time (JIT) provisioning. | [optional] | +|**userParameters** | [**UserParameterOptions**](UserParameterOptions.md) | <div>Deprecated: 10.4.0.cl and later </div> Define attributes such as Runtime filters and Runtime parameters to send security entitlements to a user session. For more information, see [Documentation](https://developers.thoughtspot.com/docs/abac-user-parameters). | [optional] | + + +## Implemented Interfaces + +* Serializable + + diff --git a/sdks/java/docs/GetRelevantQuestionsRequest.md b/sdks/java/docs/GetRelevantQuestionsRequest.md new file mode 100644 index 000000000..694a52fb2 --- /dev/null +++ b/sdks/java/docs/GetRelevantQuestionsRequest.md @@ -0,0 +1,21 @@ + + +# GetRelevantQuestionsRequest + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**metadataContext** | [**MetadataContext**](MetadataContext.md) | metadata for the query to enable generation of relevant sub-questions; at least one context identifier is required. | | +|**limitRelevantQuestions** | **Integer** | Maximum number of relevant questions that is allowed in the response, default = 5. | [optional] | +|**bypassCache** | **Boolean** | If true, results are not returned from cache & calculated every time. | [optional] | +|**query** | **String** | A user query that requires breaking down into smaller, more manageable analytical questions to facilitate better understanding and analysis. | | +|**aiContext** | [**AIContext**](AIContext.md) | Additional context to guide the response. | [optional] | + + +## Implemented Interfaces + +* Serializable + + diff --git a/sdks/java/docs/GetTokenResponse.md b/sdks/java/docs/GetTokenResponse.md new file mode 100644 index 000000000..8a453eee5 --- /dev/null +++ b/sdks/java/docs/GetTokenResponse.md @@ -0,0 +1,21 @@ + + +# GetTokenResponse + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**token** | **String** | Bearer auth token. | | +|**creationTimeInMillis** | **Float** | Token creation time in milliseconds. | | +|**expirationTimeInMillis** | **Float** | Token expiration time in milliseconds. | | +|**validForUserId** | **String** | Username to whom the token is issued. | | +|**validForUsername** | **String** | Unique identifier of the user to whom the token is issued. | | + + +## Implemented Interfaces + +* Serializable + + diff --git a/sdks/java/docs/GroupInfo.md b/sdks/java/docs/GroupInfo.md new file mode 100644 index 000000000..b6d9c2a29 --- /dev/null +++ b/sdks/java/docs/GroupInfo.md @@ -0,0 +1,19 @@ + + +# GroupInfo + +Group information for non-embed access. + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**id** | **String** | Unique identifier of the group. | [optional] | +|**name** | **String** | Name of the group. | [optional] | + + +## Implemented Interfaces + +* Serializable + + diff --git a/sdks/java/docs/GroupObject.md b/sdks/java/docs/GroupObject.md new file mode 100644 index 000000000..c2719b8d2 --- /dev/null +++ b/sdks/java/docs/GroupObject.md @@ -0,0 +1,18 @@ + + +# GroupObject + +Groups objects. + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**identifier** | **String** | | [optional] | + + +## Implemented Interfaces + +* Serializable + + diff --git a/sdks/java/docs/GroupsApi.md b/sdks/java/docs/GroupsApi.md new file mode 100644 index 000000000..063ed77db --- /dev/null +++ b/sdks/java/docs/GroupsApi.md @@ -0,0 +1,194 @@ +# GroupsApi + +All URIs are relative to *CLUSTER_URL* + +| Method | HTTP request | +|------------- | ------------- | +| [**createUserGroup**](GroupsApi.md#createUserGroup) | **POST** /api/rest/2.0/groups/create | +| [**deleteUserGroup**](GroupsApi.md#deleteUserGroup) | **POST** /api/rest/2.0/groups/{group_identifier}/delete | +| [**importUserGroups**](GroupsApi.md#importUserGroups) | **POST** /api/rest/2.0/groups/import | +| [**searchUserGroups**](GroupsApi.md#searchUserGroups) | **POST** /api/rest/2.0/groups/search | +| [**updateUserGroup**](GroupsApi.md#updateUserGroup) | **POST** /api/rest/2.0/groups/{group_identifier}/update | + + + +# **createUserGroup** +> UserGroupResponse createUserGroup(createUserGroupRequest) + + + + Version: 9.0.0.cl or later Creates a group object in ThoughtSpot. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `GROUP_ADMINISTRATION` (**Can manage groups**) privilege is required. #### About groups Groups in ThoughtSpot are used by the administrators to define privileges and organize users based on their roles and access requirements. To know more about groups and privileges, see [ThoughtSpot Product Documentation](https://docs.thoughtspot.com/cloud/latest/groups-privileges). #### Supported operations The API endpoint lets you perform the following operations: * Assign privileges * Add users * Define sharing visibility * Add sub-groups * Assign a default Liveboard + +### Parameters + +| Name | Type | +|------------- | ------------- | +| **createUserGroupRequest** | [**CreateUserGroupRequest**](CreateUserGroupRequest.md) + +### Return type + +[**UserGroupResponse**](UserGroupResponse.md) + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | User group successfully created. | - | +| **400** | Invalid request. | - | +| **401** | Unauthorized access. | - | +| **403** | Forbidden access. | - | +| **500** | Unexpected error | - | + + +# **deleteUserGroup** +> deleteUserGroup(groupIdentifier) + + + + Version: 9.0.0.cl or later Removes the specified group object from the ThoughtSpot system. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `GROUP_ADMINISTRATION` (**Can manage groups**) privilege is required. + +### Parameters + +| Name | Type | +|------------- | ------------- | +| **groupIdentifier** | **String** + +### Return type + +null (empty response body) + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **204** | User group successfully deleted. | - | +| **400** | Invalid request. | - | +| **401** | Unauthorized access. | - | +| **403** | Forbidden access. | - | +| **500** | Unexpected error | - | + + +# **importUserGroups** +> ImportUserGroupsResponse importUserGroups(importUserGroupsRequest) + + + + Version: 9.0.0.cl or later Imports group objects from external databases into ThoughtSpot. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `GROUP_ADMINISTRATION` (**Can manage groups**) privilege is required. During the import operation: * If the specified group is not available in ThoughtSpot, it will be added to ThoughtSpot. * If `delete_unspecified_groups` is set to `true`, the groups not specified in the API request, excluding administrator and system user groups, are deleted. * If the specified groups are already available in ThoughtSpot, the object properties of these groups are modified and synchronized as per the input data in the API request. A successful API call returns the object that represents the changes made in the ThoughtSpot system. + +### Parameters + +| Name | Type | +|------------- | ------------- | +| **importUserGroupsRequest** | [**ImportUserGroupsRequest**](ImportUserGroupsRequest.md) + +### Return type + +[**ImportUserGroupsResponse**](ImportUserGroupsResponse.md) + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Import user groups operation successful. | - | +| **400** | Invalid request. | - | +| **401** | Unauthorized access. | - | +| **403** | Forbidden access. | - | +| **500** | Unexpected error | - | + + +# **searchUserGroups** +> List<UserGroupResponse> searchUserGroups(searchUserGroupsRequest) + + + + Version: 9.0.0.cl or later Gets a list of user group objects from the ThoughtSpot system. To get details of a specific user group, specify the user group GUID or name. You can also filter the API response based on User ID, Org ID, Role ID, type of group, sharing visibility, privileges assigned to the group, and the Liveboard IDs assigned to the users in the group. Available to all users. Users with `ADMINISTRATION` (**Can administer ThoughtSpot**) privileges can view all users properties. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `GROUP_ADMINISTRATION` (**Can manage groups**) privilege is required. **NOTE**: If you do not get precise results, try setting `record_size` to `-1` and `record_offset` to `0`. + +### Parameters + +| Name | Type | +|------------- | ------------- | +| **searchUserGroupsRequest** | [**SearchUserGroupsRequest**](SearchUserGroupsRequest.md) + +### Return type + +[**List<UserGroupResponse>**](UserGroupResponse.md) + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | User group search result. | - | +| **400** | Invalid request. | - | +| **401** | Unauthorized access. | - | +| **403** | Forbidden access. | - | +| **500** | Unexpected error | - | + + +# **updateUserGroup** +> updateUserGroup(groupIdentifier, updateUserGroupRequest) + + + + Version: 9.0.0.cl or later Updates the properties of a group object in ThoughtSpot. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `GROUP_ADMINISTRATION` (**Can manage groups**) privilege is required. #### Supported operations This API endpoint lets you perform the following operations in a single API request: * Edit [privileges](https://developers.thoughtspot.com/docs/?pageid=api-user-management#group-privileges) * Add or remove users * Change sharing visibility settings * Add or remove sub-groups * Assign a default Liveboard or update the existing settings + +### Parameters + +| Name | Type | +|------------- | ------------- | +| **groupIdentifier** | **String** +| **updateUserGroupRequest** | [**UpdateUserGroupRequest**](UpdateUserGroupRequest.md) + +### Return type + +null (empty response body) + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **204** | User group successfully updated. | - | +| **400** | Invalid request. | - | +| **401** | Unauthorized access. | - | +| **403** | Forbidden access. | - | +| **500** | Unexpected error | - | + diff --git a/sdks/java/docs/GroupsImportListInput.md b/sdks/java/docs/GroupsImportListInput.md new file mode 100644 index 000000000..c34b16adb --- /dev/null +++ b/sdks/java/docs/GroupsImportListInput.md @@ -0,0 +1,87 @@ + + +# GroupsImportListInput + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**displayName** | **String** | Unique display name of the group. | | +|**groupIdentifier** | **String** | Unique ID or name of the group. | | +|**defaultLiveboardIdentifiers** | **List<String>** | Unique ID of Liveboards that will be assigned as default Liveboards to the users in the group. | [optional] | +|**description** | **String** | Description of the group. | [optional] | +|**privileges** | [**List<PrivilegesEnum>**](#List<PrivilegesEnum>) | Privileges that will be assigned to the group. | [optional] | +|**subGroupIdentifiers** | **List<String>** | Unique ID or name of the sub-groups to add to the group. | [optional] | +|**type** | [**TypeEnum**](#TypeEnum) | Type of the group. | [optional] | +|**userIdentifiers** | **List<String>** | Unique ID or name of the users to assign to the group. | [optional] | +|**visibility** | [**VisibilityEnum**](#VisibilityEnum) | Visibility of the group. The SHARABLE makes a group visible to other users and groups, and thus allows them to share objects. | [optional] | + + + +## Enum: List<PrivilegesEnum> + +| Name | Value | +|---- | -----| +| ADMINISTRATION | "ADMINISTRATION" | +| AUTHORING | "AUTHORING" | +| USERDATAUPLOADING | "USERDATAUPLOADING" | +| DATADOWNLOADING | "DATADOWNLOADING" | +| USERMANAGEMENT | "USERMANAGEMENT" | +| DATAMANAGEMENT | "DATAMANAGEMENT" | +| SHAREWITHALL | "SHAREWITHALL" | +| JOBSCHEDULING | "JOBSCHEDULING" | +| A3_ANALYSIS | "A3ANALYSIS" | +| EXPERIMENTALFEATUREPRIVILEGE | "EXPERIMENTALFEATUREPRIVILEGE" | +| BYPASSRLS | "BYPASSRLS" | +| RANALYSIS | "RANALYSIS" | +| DEVELOPER | "DEVELOPER" | +| USER_ADMINISTRATION | "USER_ADMINISTRATION" | +| GROUP_ADMINISTRATION | "GROUP_ADMINISTRATION" | +| SYNCMANAGEMENT | "SYNCMANAGEMENT" | +| CAN_CREATE_CATALOG | "CAN_CREATE_CATALOG" | +| DISABLE_PINBOARD_CREATION | "DISABLE_PINBOARD_CREATION" | +| LIVEBOARD_VERIFIER | "LIVEBOARD_VERIFIER" | +| PREVIEW_THOUGHTSPOT_SAGE | "PREVIEW_THOUGHTSPOT_SAGE" | +| CAN_MANAGE_VERSION_CONTROL | "CAN_MANAGE_VERSION_CONTROL" | +| THIRDPARTY_ANALYSIS | "THIRDPARTY_ANALYSIS" | +| ALLOW_NON_EMBED_FULL_APP_ACCESS | "ALLOW_NON_EMBED_FULL_APP_ACCESS" | +| CAN_ACCESS_ANALYST_STUDIO | "CAN_ACCESS_ANALYST_STUDIO" | +| CAN_MANAGE_ANALYST_STUDIO | "CAN_MANAGE_ANALYST_STUDIO" | +| CAN_MODIFY_FOLDERS | "CAN_MODIFY_FOLDERS" | +| CAN_MANAGE_VARIABLES | "CAN_MANAGE_VARIABLES" | +| CAN_VIEW_FOLDERS | "CAN_VIEW_FOLDERS" | +| CAN_MANAGE_AGENTSPOT | "CAN_MANAGE_AGENTSPOT" | +| CAN_ACCESS_AGENTSPOT | "CAN_ACCESS_AGENTSPOT" | +| PREVIEW_DOCUMENT_SEARCH | "PREVIEW_DOCUMENT_SEARCH" | +| CAN_SETUP_VERSION_CONTROL | "CAN_SETUP_VERSION_CONTROL" | +| CAN_DOWNLOAD_VISUALS | "CAN_DOWNLOAD_VISUALS" | +| CAN_DOWNLOAD_DETAILED_DATA | "CAN_DOWNLOAD_DETAILED_DATA" | +| CAN_USE_SPOTTER | "CAN_USE_SPOTTER" | + + + +## Enum: TypeEnum + +| Name | Value | +|---- | -----| +| LOCAL_GROUP | "LOCAL_GROUP" | +| LDAP_GROUP | "LDAP_GROUP" | +| TEAM_GROUP | "TEAM_GROUP" | +| TENANT_GROUP | "TENANT_GROUP" | + + + +## Enum: VisibilityEnum + +| Name | Value | +|---- | -----| +| SHARABLE | "SHARABLE" | +| NON_SHARABLE | "NON_SHARABLE" | + + +## Implemented Interfaces + +* Serializable + + diff --git a/sdks/java/docs/HeaderAttributeInput.md b/sdks/java/docs/HeaderAttributeInput.md new file mode 100644 index 000000000..dedb87170 --- /dev/null +++ b/sdks/java/docs/HeaderAttributeInput.md @@ -0,0 +1,19 @@ + + +# HeaderAttributeInput + +Attribute to update in a header. + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**name** | **String** | Attribute name to be updated. | | +|**value** | **String** | Attribute's new value. | | + + +## Implemented Interfaces + +* Serializable + + diff --git a/sdks/java/docs/HeaderUpdateInput.md b/sdks/java/docs/HeaderUpdateInput.md new file mode 100644 index 000000000..ae8bbf192 --- /dev/null +++ b/sdks/java/docs/HeaderUpdateInput.md @@ -0,0 +1,36 @@ + + +# HeaderUpdateInput + +Favorite object options. + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**identifier** | **String** | Unique ID of a specified type to identify the header. | [optional] | +|**objIdentifier** | **String** | Custom object identifier to uniquely identify header. | [optional] | +|**type** | [**TypeEnum**](#TypeEnum) | Optional type of the header object. | [optional] | +|**attributes** | [**List<HeaderAttributeInput>**](HeaderAttributeInput.md) | List of attributes to update | | + + + +## Enum: TypeEnum + +| Name | Value | +|---- | -----| +| ANSWER | "ANSWER" | +| LOGICAL_TABLE | "LOGICAL_TABLE" | +| LOGICAL_COLUMN | "LOGICAL_COLUMN" | +| LIVEBOARD | "LIVEBOARD" | +| ACTION_OBJECT | "ACTION_OBJECT" | +| DATA_SOURCE | "DATA_SOURCE" | +| USER | "USER" | +| USER_GROUP | "USER_GROUP" | + + +## Implemented Interfaces + +* Serializable + + diff --git a/sdks/java/docs/ImportEPackAsyncTaskStatus.md b/sdks/java/docs/ImportEPackAsyncTaskStatus.md new file mode 100644 index 000000000..51fa5928b --- /dev/null +++ b/sdks/java/docs/ImportEPackAsyncTaskStatus.md @@ -0,0 +1,53 @@ + + +# ImportEPackAsyncTaskStatus + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**tenantId** | **String** | GUID of tenant from which the task is initiated. | [optional] | +|**orgId** | **Integer** | Organisation ID of the user who initiated the task. | [optional] | +|**taskId** | **String** | Unique identifier for the task. | [optional] | +|**taskName** | **String** | Name of the task. | [optional] | +|**importResponse** | **Object** | Response of imported objects so far. | [optional] | +|**taskStatus** | [**TaskStatusEnum**](#TaskStatusEnum) | Current status of the task. | [optional] | +|**authorId** | **String** | ID of the user who initiated the task. | [optional] | +|**importPolicy** | [**ImportPolicyEnum**](#ImportPolicyEnum) | Policy used for the import task. | [optional] | +|**createdAt** | **Float** | Time when the task was created (in ms since epoch). | [optional] | +|**inProgressAt** | **Float** | Time when the task started (in ms since epoch). | [optional] | +|**completedAt** | **Float** | Time when the task was completed (in ms since epoch). | [optional] | +|**totalObjectCount** | **Integer** | Total number of objects to process. | [optional] | +|**objectProcessedCount** | **Integer** | Number of objects processed so far. | [optional] | +|**modifiedAt** | **Float** | Last time the task status was updated (in ms since epoch). | [optional] | +|**authorDisplayName** | **String** | Display name of the user who initiated the task. | [optional] | + + + +## Enum: TaskStatusEnum + +| Name | Value | +|---- | -----| +| COMPLETED | "COMPLETED" | +| IN_QUEUE | "IN_QUEUE" | +| IN_PROGRESS | "IN_PROGRESS" | +| FAILED | "FAILED" | + + + +## Enum: ImportPolicyEnum + +| Name | Value | +|---- | -----| +| PARTIAL | "PARTIAL" | +| ALL_OR_NONE | "ALL_OR_NONE" | +| VALIDATE_ONLY | "VALIDATE_ONLY" | +| PARTIAL_OBJECT | "PARTIAL_OBJECT" | + + +## Implemented Interfaces + +* Serializable + + diff --git a/sdks/java/docs/ImportMetadataTMLAsyncRequest.md b/sdks/java/docs/ImportMetadataTMLAsyncRequest.md new file mode 100644 index 000000000..1e9b1eee9 --- /dev/null +++ b/sdks/java/docs/ImportMetadataTMLAsyncRequest.md @@ -0,0 +1,33 @@ + + +# ImportMetadataTMLAsyncRequest + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**metadataTmls** | **List<String>** | Details of TML objects. | | +|**createNew** | **Boolean** | If selected, creates TML objects with new GUIDs. | [optional] | +|**allOrgsOverride** | **Boolean** | If import is happening from all orgs context. | [optional] | +|**importPolicy** | [**ImportPolicyEnum**](#ImportPolicyEnum) | <div>Version: 10.5.0.cl or later </div> Policy to be followed while importing the TML. Valid values are [PARTIAL_OBJECT, PARTIAL, VALIDATE_ONLY, ALL_OR_NONE] | [optional] | +|**skipDiffCheck** | **Boolean** | <div>Version: 10.6.0.cl or later </div> Boolean Flag to skip TML diff check before processing object TMLs. | [optional] | +|**enableLargeMetadataValidation** | **Boolean** | <div>Version: 10.5.0.cl or later </div> Boolean to indicate if the large metadata validation should be enabled. | [optional] | + + + +## Enum: ImportPolicyEnum + +| Name | Value | +|---- | -----| +| PARTIAL | "PARTIAL" | +| ALL_OR_NONE | "ALL_OR_NONE" | +| VALIDATE_ONLY | "VALIDATE_ONLY" | +| PARTIAL_OBJECT | "PARTIAL_OBJECT" | + + +## Implemented Interfaces + +* Serializable + + diff --git a/sdks/java/docs/ImportMetadataTMLRequest.md b/sdks/java/docs/ImportMetadataTMLRequest.md new file mode 100644 index 000000000..b4278df28 --- /dev/null +++ b/sdks/java/docs/ImportMetadataTMLRequest.md @@ -0,0 +1,33 @@ + + +# ImportMetadataTMLRequest + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**metadataTmls** | **List<String>** | Details of TML objects. **Note: importing TML in YAML format, when coming directly from our Playground, is currently requires manual formatting. For more details on the workaround, please click [here](https://developers.thoughtspot.com/docs/known-issues#_version_9_12_0_cl)** | | +|**importPolicy** | [**ImportPolicyEnum**](#ImportPolicyEnum) | Specifies the import policy for the TML import. | [optional] | +|**createNew** | **Boolean** | If selected, creates TML objects with new GUIDs. | [optional] | +|**allOrgsOverride** | **Boolean** | If import is happening from all orgs context. | [optional] | +|**skipDiffCheck** | **Boolean** | <div>Version: 10.6.0.cl or later </div> Boolean Flag to skip TML diff check before processing object TMLs. | [optional] | +|**enableLargeMetadataValidation** | **Boolean** | <div>Version: 10.5.0.cl or later </div> Boolean to indicate if the large metadata validation should be enabled. | [optional] | + + + +## Enum: ImportPolicyEnum + +| Name | Value | +|---- | -----| +| PARTIAL | "PARTIAL" | +| ALL_OR_NONE | "ALL_OR_NONE" | +| VALIDATE_ONLY | "VALIDATE_ONLY" | +| PARTIAL_OBJECT | "PARTIAL_OBJECT" | + + +## Implemented Interfaces + +* Serializable + + diff --git a/sdks/java/docs/ImportUser.md b/sdks/java/docs/ImportUser.md new file mode 100644 index 000000000..5b5822a13 --- /dev/null +++ b/sdks/java/docs/ImportUser.md @@ -0,0 +1,100 @@ + + +# ImportUser + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**userIdentifier** | **String** | Unique ID or name of the user. | | +|**displayName** | **String** | Display name of the user. | | +|**password** | **String** | Password of the user. | [optional] | +|**accountType** | [**AccountTypeEnum**](#AccountTypeEnum) | Type of the user account. | [optional] | +|**accountStatus** | [**AccountStatusEnum**](#AccountStatusEnum) | Status of the user account. | [optional] | +|**email** | **String** | Email address of the user. | [optional] | +|**orgIdentifiers** | **List<String>** | ID or name of the Orgs to which the user belongs. | [optional] | +|**groupIdentifiers** | **List<String>** | ID or name of the groups to which the user belongs. | [optional] | +|**visibility** | [**VisibilityEnum**](#VisibilityEnum) | Visibility of the users. The SHARABLE property makes a user visible to other users and group, who can share objects with the user. | [optional] | +|**notifyOnShare** | **Boolean** | Notify user when other users or groups share metadata objects | [optional] | +|**showOnboardingExperience** | **Boolean** | Show or hide the new user onboarding walkthroughs | [optional] | +|**onboardingExperienceCompleted** | **Boolean** | Revisit the new user onboarding walkthroughs | [optional] | +|**homeLiveboardIdentifier** | **String** | Unique ID or name of the default Liveboard assigned to the user. | [optional] | +|**favoriteMetadata** | [**List<FavoriteMetadataInput>**](FavoriteMetadataInput.md) | Metadata objects to add to the user's favorites list. | [optional] | +|**preferredLocale** | [**PreferredLocaleEnum**](#PreferredLocaleEnum) | Locale for the user. When setting this value, do not set use_browser_language to true, otherwise the browser's language setting will take precedence and the preferred_locale value will be ignored. | [optional] | +|**useBrowserLanguage** | **Boolean** | Flag to indicate whether to use the browser locale for the user in the UI. When set to true, the preferred_locale value is unset and the browser's language setting takes precedence. Version: 26.3.0.cl or later | [optional] | + + + +## Enum: AccountTypeEnum + +| Name | Value | +|---- | -----| +| LOCAL_USER | "LOCAL_USER" | +| LDAP_USER | "LDAP_USER" | +| SAML_USER | "SAML_USER" | +| OIDC_USER | "OIDC_USER" | +| REMOTE_USER | "REMOTE_USER" | + + + +## Enum: AccountStatusEnum + +| Name | Value | +|---- | -----| +| ACTIVE | "ACTIVE" | +| INACTIVE | "INACTIVE" | +| EXPIRED | "EXPIRED" | +| LOCKED | "LOCKED" | +| PENDING | "PENDING" | +| SUSPENDED | "SUSPENDED" | + + + +## Enum: VisibilityEnum + +| Name | Value | +|---- | -----| +| SHARABLE | "SHARABLE" | +| NON_SHARABLE | "NON_SHARABLE" | + + + +## Enum: PreferredLocaleEnum + +| Name | Value | +|---- | -----| +| EN_CA | "en-CA" | +| EN_GB | "en-GB" | +| EN_US | "en-US" | +| DE_DE | "de-DE" | +| JA_JP | "ja-JP" | +| ZH_CN | "zh-CN" | +| PT_BR | "pt-BR" | +| FR_FR | "fr-FR" | +| FR_CA | "fr-CA" | +| ES_US | "es-US" | +| DA_DK | "da-DK" | +| ES_ES | "es-ES" | +| FI_FI | "fi-FI" | +| SV_SE | "sv-SE" | +| NB_NO | "nb-NO" | +| PT_PT | "pt-PT" | +| NL_NL | "nl-NL" | +| IT_IT | "it-IT" | +| RU_RU | "ru-RU" | +| EN_IN | "en-IN" | +| DE_CH | "de-CH" | +| EN_NZ | "en-NZ" | +| ES_MX | "es-MX" | +| EN_AU | "en-AU" | +| ZH_HANT | "zh-Hant" | +| KO_KR | "ko-KR" | +| EN_DE | "en-DE" | + + +## Implemented Interfaces + +* Serializable + + diff --git a/sdks/java/docs/ImportUserGroupsRequest.md b/sdks/java/docs/ImportUserGroupsRequest.md new file mode 100644 index 000000000..1566e534f --- /dev/null +++ b/sdks/java/docs/ImportUserGroupsRequest.md @@ -0,0 +1,19 @@ + + +# ImportUserGroupsRequest + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**groups** | [**List<GroupsImportListInput>**](GroupsImportListInput.md) | Details of groups which are to be imported | [optional] | +|**deleteUnspecifiedGroups** | **Boolean** | If set to true, removes groups that are not specified in the API request. | [optional] | +|**dryRun** | **Boolean** | If true, the API performs a test operation and returns user IDs whose data will be edited after the import. | [optional] | + + +## Implemented Interfaces + +* Serializable + + diff --git a/sdks/java/docs/ImportUserGroupsResponse.md b/sdks/java/docs/ImportUserGroupsResponse.md new file mode 100644 index 000000000..cda2a7b22 --- /dev/null +++ b/sdks/java/docs/ImportUserGroupsResponse.md @@ -0,0 +1,19 @@ + + +# ImportUserGroupsResponse + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**groupsAdded** | [**List<UserGroup>**](UserGroup.md) | The groups which are added into the system. | | +|**groupsDeleted** | [**List<UserGroup>**](UserGroup.md) | The groups which are deleted from the system. | | +|**groupsUpdated** | [**List<UserGroup>**](UserGroup.md) | The groups which are updated in the system. | | + + +## Implemented Interfaces + +* Serializable + + diff --git a/sdks/java/docs/ImportUserType.md b/sdks/java/docs/ImportUserType.md new file mode 100644 index 000000000..f0653a6cc --- /dev/null +++ b/sdks/java/docs/ImportUserType.md @@ -0,0 +1,18 @@ + + +# ImportUserType + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**id** | **String** | Unique identifier of the user. | [optional] | +|**name** | **String** | Name of the user. | | + + +## Implemented Interfaces + +* Serializable + + diff --git a/sdks/java/docs/ImportUsersRequest.md b/sdks/java/docs/ImportUsersRequest.md new file mode 100644 index 000000000..40a603587 --- /dev/null +++ b/sdks/java/docs/ImportUsersRequest.md @@ -0,0 +1,20 @@ + + +# ImportUsersRequest + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**users** | [**List<ImportUser>**](ImportUser.md) | List of users needs to be imported. | | +|**defaultPassword** | **String** | The default password to assign to users if they do not have a password assigned in ThoughtSpot. | [optional] | +|**dryRun** | **Boolean** | If true, the API performs a test operation and returns user IDs whose data will be edited after the import. | [optional] | +|**deleteUnspecifiedUsers** | **Boolean** | If set to true, removes the users that are not specified in the API request. | [optional] | + + +## Implemented Interfaces + +* Serializable + + diff --git a/sdks/java/docs/ImportUsersResponse.md b/sdks/java/docs/ImportUsersResponse.md new file mode 100644 index 000000000..6d9681ed1 --- /dev/null +++ b/sdks/java/docs/ImportUsersResponse.md @@ -0,0 +1,19 @@ + + +# ImportUsersResponse + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**usersAdded** | [**List<ImportUserType>**](ImportUserType.md) | | [optional] | +|**usersUpdated** | [**List<ImportUserType>**](ImportUserType.md) | | [optional] | +|**usersDeleted** | [**List<ImportUserType>**](ImportUserType.md) | | [optional] | + + +## Implemented Interfaces + +* Serializable + + diff --git a/sdks/java/docs/InputEurekaNLSRequest.md b/sdks/java/docs/InputEurekaNLSRequest.md new file mode 100644 index 000000000..1e4c792a6 --- /dev/null +++ b/sdks/java/docs/InputEurekaNLSRequest.md @@ -0,0 +1,20 @@ + + +# InputEurekaNLSRequest + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**agentVersion** | **Integer** | Cluster version like 10.4.0.cl, 10.5.0.cl, so on. | [optional] | +|**bypassCache** | **Boolean** | If true, results are not returned from cache & calculated every time. Can incur high costs & latency. | [optional] | +|**instructions** | **List<String>** | User specific instructions for processing the @query. | [optional] | +|**query** | **String** | User query which is a topical/goal oriented question that needs to be broken down into smaller simple analytical questions. | [optional] | + + +## Implemented Interfaces + +* Serializable + + diff --git a/sdks/java/docs/JWTMetadataObject.md b/sdks/java/docs/JWTMetadataObject.md new file mode 100644 index 000000000..851d989d9 --- /dev/null +++ b/sdks/java/docs/JWTMetadataObject.md @@ -0,0 +1,27 @@ + + +# JWTMetadataObject + +Metadata objects. + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**identifier** | **String** | | [optional] | +|**type** | [**TypeEnum**](#TypeEnum) | | [optional] | + + + +## Enum: TypeEnum + +| Name | Value | +|---- | -----| +| LOGICAL_TABLE | "LOGICAL_TABLE" | + + +## Implemented Interfaces + +* Serializable + + diff --git a/sdks/java/docs/JWTParameter.md b/sdks/java/docs/JWTParameter.md new file mode 100644 index 000000000..9ccaf175e --- /dev/null +++ b/sdks/java/docs/JWTParameter.md @@ -0,0 +1,20 @@ + + +# JWTParameter + +List of runtime parameters need to set during the session. + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**runtimeFilter** | **Object** | Runtime filter parameter type in JWT. | [optional] | +|**runtimeSort** | **Object** | Runtime sort parameter type in JWT. | [optional] | +|**runtimeParamOverride** | **Object** | Runtime param override type in JWT. | [optional] | + + +## Implemented Interfaces + +* Serializable + + diff --git a/sdks/java/docs/JWTUserOptions.md b/sdks/java/docs/JWTUserOptions.md new file mode 100644 index 000000000..3e3e4ffec --- /dev/null +++ b/sdks/java/docs/JWTUserOptions.md @@ -0,0 +1,19 @@ + + +# JWTUserOptions + +JWT user options to create a JWT token given the payload. *Deprecated in 9.12.0.cl. Use user_parameters instead.* + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**parameters** | **List<Object>** | | [optional] | +|**metadata** | [**List<JWTMetadataObject>**](JWTMetadataObject.md) | | [optional] | + + +## Implemented Interfaces + +* Serializable + + diff --git a/sdks/java/docs/JWTUserOptionsFull.md b/sdks/java/docs/JWTUserOptionsFull.md new file mode 100644 index 000000000..8a7e3cd4c --- /dev/null +++ b/sdks/java/docs/JWTUserOptionsFull.md @@ -0,0 +1,18 @@ + + +# JWTUserOptionsFull + +JWT user options to create a JWT token given the payload. *Deprecated in 9.12.0.cl. Use user_parameters instead.* + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**parameters** | [**List<JWTParameter>**](JWTParameter.md) | | [optional] | + + +## Implemented Interfaces + +* Serializable + + diff --git a/sdks/java/docs/JobRecipient.md b/sdks/java/docs/JobRecipient.md new file mode 100644 index 000000000..0528c7af9 --- /dev/null +++ b/sdks/java/docs/JobRecipient.md @@ -0,0 +1,30 @@ + + +# JobRecipient + +A recipient (user, group, or external) for a job execution. + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**type** | [**TypeEnum**](#TypeEnum) | Type of the recipient. | | +|**id** | **String** | Unique ID of the recipient. | [optional] | +|**name** | **String** | Name of the recipient. | [optional] | +|**email** | **String** | Email of the recipient. | [optional] | + + + +## Enum: TypeEnum + +| Name | Value | +|---- | -----| +| USER | "USER" | +| EXTERNAL | "EXTERNAL" | + + +## Implemented Interfaces + +* Serializable + + diff --git a/sdks/java/docs/JobsApi.md b/sdks/java/docs/JobsApi.md new file mode 100644 index 000000000..88a074a5b --- /dev/null +++ b/sdks/java/docs/JobsApi.md @@ -0,0 +1,45 @@ +# JobsApi + +All URIs are relative to *CLUSTER_URL* + +| Method | HTTP request | +|------------- | ------------- | +| [**searchChannelHistory**](JobsApi.md#searchChannelHistory) | **POST** /api/rest/2.0/jobs/history/communication-channels/search | + + + +# **searchChannelHistory** +> SearchChannelHistoryResponse searchChannelHistory(searchChannelHistoryRequest) + + + + Version: 26.4.0.cl or later Searches delivery history for communication channels such as webhooks. Returns channel-level delivery status for each job execution record. Use this to monitor channel health and delivery success rates across events. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) or `DEVELOPER` (**Has developer privilege**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, users with `CAN_MANAGE_WEBHOOKS` (**Can manage webhooks**) privilege are also authorized to perform this action. **NOTE**: When `channel_type` is `WEBHOOK`, the following constraints apply: - `job_ids`, `channel_identifiers`, and `events` each accept at most one element. - When `job_ids` is provided, it is used as the sole lookup key and other filter fields are ignored. - When `job_ids` is not provided, `channel_identifiers` and `events` are both required, each containing exactly one element. - Records older than the configured retention period are not returned. - Use `start_epoch_time_in_millis` and/or `end_epoch_time_in_millis` to narrow results to a specific time window. + +### Parameters + +| Name | Type | +|------------- | ------------- | +| **searchChannelHistoryRequest** | [**SearchChannelHistoryRequest**](SearchChannelHistoryRequest.md) + +### Return type + +[**SearchChannelHistoryResponse**](SearchChannelHistoryResponse.md) + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Channel status logs retrieved successfully. | - | +| **400** | Invalid request. | - | +| **401** | Unauthorized access. | - | +| **403** | Forbidden access. | - | +| **500** | Unexpected error | - | + diff --git a/sdks/java/docs/LiveboardContent.md b/sdks/java/docs/LiveboardContent.md new file mode 100644 index 000000000..ca669a6a8 --- /dev/null +++ b/sdks/java/docs/LiveboardContent.md @@ -0,0 +1,25 @@ + + +# LiveboardContent + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**availableDataRowCount** | **Integer** | Total available data row count. | | +|**columnNames** | **List<String>** | Name of the columns. | | +|**dataRows** | **List<Object>** | Rows of data set. | | +|**recordOffset** | **Integer** | The starting record number from where the records should be included. | | +|**recordSize** | **Integer** | The number of records that should be included. | | +|**returnedDataRowCount** | **Integer** | Total returned data row count. | | +|**samplingRatio** | **Float** | Sampling ratio (0 to 1). If the query was sampled, it is the ratio of keys returned in the data set to the total number of keys expected in the query. If the value is 1.0, this means that the complete result is returned. | | +|**visualizationId** | **String** | Unique ID of the visualization. | [optional] | +|**visualizationName** | **String** | Name of the visualization. | [optional] | + + +## Implemented Interfaces + +* Serializable + + diff --git a/sdks/java/docs/LiveboardDataResponse.md b/sdks/java/docs/LiveboardDataResponse.md new file mode 100644 index 000000000..6cda8600b --- /dev/null +++ b/sdks/java/docs/LiveboardDataResponse.md @@ -0,0 +1,19 @@ + + +# LiveboardDataResponse + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**metadataId** | **String** | The unique identifier of the object | | +|**metadataName** | **String** | Name of the metadata object | | +|**contents** | [**List<LiveboardContent>**](LiveboardContent.md) | Data content of metadata objects | | + + +## Implemented Interfaces + +* Serializable + + diff --git a/sdks/java/docs/LiveboardOptions.md b/sdks/java/docs/LiveboardOptions.md new file mode 100644 index 000000000..9ceda9ed4 --- /dev/null +++ b/sdks/java/docs/LiveboardOptions.md @@ -0,0 +1,18 @@ + + +# LiveboardOptions + +Options to specify details of Liveboard. + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**visualizationIdentifiers** | **List<String>** | Unique ID or name of visualizations. | | + + +## Implemented Interfaces + +* Serializable + + diff --git a/sdks/java/docs/LiveboardOptionsInput.md b/sdks/java/docs/LiveboardOptionsInput.md new file mode 100644 index 000000000..4bfddfd71 --- /dev/null +++ b/sdks/java/docs/LiveboardOptionsInput.md @@ -0,0 +1,18 @@ + + +# LiveboardOptionsInput + +Options to specify details of Liveboard. + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**visualizationIdentifiers** | **List<String>** | Unique ID or name of visualizations. | | + + +## Implemented Interfaces + +* Serializable + + diff --git a/sdks/java/docs/LogApi.md b/sdks/java/docs/LogApi.md new file mode 100644 index 000000000..ea83d4a1d --- /dev/null +++ b/sdks/java/docs/LogApi.md @@ -0,0 +1,45 @@ +# LogApi + +All URIs are relative to *CLUSTER_URL* + +| Method | HTTP request | +|------------- | ------------- | +| [**fetchLogs**](LogApi.md#fetchLogs) | **POST** /api/rest/2.0/logs/fetch | + + + +# **fetchLogs** +> List<LogResponse> fetchLogs(fetchLogsRequest) + + + + Version: 9.0.0.cl or later Fetches security audit logs. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the [Admin Control](https://developers.thoughtspot.com/docs/rbac#_admin_control) privileges are required. #### Usage guidelines By default, the API retrieves logs for the last 24 hours. You can set a custom duration in EPOCH time. Make sure the log duration specified in your API request doesn’t exceed 24 hours. If you must fetch logs for a longer time range, modify the duration and make multiple sequential API requests. Upon successful execution, the API returns logs with the following information: * timestamp of the event * event ID * event type * name and GUID of the user * IP address of ThoughtSpot instance For more information see [Audit logs Documentation](https://developers.thoughtspot.com/docs/audit-logs). + +### Parameters + +| Name | Type | +|------------- | ------------- | +| **fetchLogsRequest** | [**FetchLogsRequest**](FetchLogsRequest.md) + +### Return type + +[**List<LogResponse>**](LogResponse.md) + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Log fetched successfully. | - | +| **400** | Invalid request. | - | +| **401** | Unauthorized access. | - | +| **403** | Forbidden access. | - | +| **500** | Unexpected error | - | + diff --git a/sdks/java/docs/LogResponse.md b/sdks/java/docs/LogResponse.md new file mode 100644 index 000000000..9d5e7ea8c --- /dev/null +++ b/sdks/java/docs/LogResponse.md @@ -0,0 +1,18 @@ + + +# LogResponse + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**date** | **String** | Date timestamp of the log entry | | +|**log** | **String** | Log data | | + + +## Implemented Interfaces + +* Serializable + + diff --git a/sdks/java/docs/LoginRequest.md b/sdks/java/docs/LoginRequest.md new file mode 100644 index 000000000..6330e679f --- /dev/null +++ b/sdks/java/docs/LoginRequest.md @@ -0,0 +1,20 @@ + + +# LoginRequest + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**username** | **String** | Username of the ThoughtSpot user | [optional] | +|**password** | **String** | Password of the user account | [optional] | +|**orgIdentifier** | **String** | ID of the Org context to log in to. If Org ID is not specified, the user will be logged in to the Org context of their previous login session. | [optional] | +|**rememberMe** | **Boolean** | A flag to remember the user session. When set to true, a session cookie is created and used in subsequent API requests. | [optional] | + + +## Implemented Interfaces + +* Serializable + + diff --git a/sdks/java/docs/ManageObjectPrivilegeRequest.md b/sdks/java/docs/ManageObjectPrivilegeRequest.md new file mode 100644 index 000000000..cba61157e --- /dev/null +++ b/sdks/java/docs/ManageObjectPrivilegeRequest.md @@ -0,0 +1,46 @@ + + +# ManageObjectPrivilegeRequest + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**operation** | [**OperationEnum**](#OperationEnum) | Operation to perform to manage object privileges. Available operations are: `ADD`, `REMOVE`. | | +|**metadataType** | [**MetadataTypeEnum**](#MetadataTypeEnum) | Type of metadata objects on which you want to perform the operation. For now only LOGICAL_TABLE is supported. It may be extended to other metadata types in the future. | | +|**objectPrivilegeTypes** | [**List<ObjectPrivilegeTypesEnum>**](#List<ObjectPrivilegeTypesEnum>) | List of object privilege types on which you want to perform the operation. | | +|**metadataIdentifiers** | **List<String>** | List of metadata identifiers (GUID or name) on which you want to perform the operation. | | +|**principals** | [**List<PrincipalsInput>**](PrincipalsInput.md) | User or group objects (GUID or name) to which you want to apply the given operation and given object privileges. | | + + + +## Enum: OperationEnum + +| Name | Value | +|---- | -----| +| ADD | "ADD" | +| REMOVE | "REMOVE" | + + + +## Enum: MetadataTypeEnum + +| Name | Value | +|---- | -----| +| LOGICAL_TABLE | "LOGICAL_TABLE" | + + + +## Enum: List<ObjectPrivilegeTypesEnum> + +| Name | Value | +|---- | -----| +| SPOTTER_COACHING_PRIVILEGE | "SPOTTER_COACHING_PRIVILEGE" | + + +## Implemented Interfaces + +* Serializable + + diff --git a/sdks/java/docs/MetadataApi.md b/sdks/java/docs/MetadataApi.md new file mode 100644 index 000000000..cb2c5e42f --- /dev/null +++ b/sdks/java/docs/MetadataApi.md @@ -0,0 +1,601 @@ +# MetadataApi + +All URIs are relative to *CLUSTER_URL* + +| Method | HTTP request | +|------------- | ------------- | +| [**convertWorksheetToModel**](MetadataApi.md#convertWorksheetToModel) | **POST** /api/rest/2.0/metadata/worksheets/convert | +| [**copyObject**](MetadataApi.md#copyObject) | **POST** /api/rest/2.0/metadata/copyobject | +| [**deleteMetadata**](MetadataApi.md#deleteMetadata) | **POST** /api/rest/2.0/metadata/delete | +| [**exportMetadataTML**](MetadataApi.md#exportMetadataTML) | **POST** /api/rest/2.0/metadata/tml/export | +| [**exportMetadataTMLBatched**](MetadataApi.md#exportMetadataTMLBatched) | **POST** /api/rest/2.0/metadata/tml/export/batch | +| [**fetchAnswerSqlQuery**](MetadataApi.md#fetchAnswerSqlQuery) | **POST** /api/rest/2.0/metadata/answer/sql | +| [**fetchAsyncImportTaskStatus**](MetadataApi.md#fetchAsyncImportTaskStatus) | **POST** /api/rest/2.0/metadata/tml/async/status | +| [**fetchLiveboardSqlQuery**](MetadataApi.md#fetchLiveboardSqlQuery) | **POST** /api/rest/2.0/metadata/liveboard/sql | +| [**importMetadataTML**](MetadataApi.md#importMetadataTML) | **POST** /api/rest/2.0/metadata/tml/import | +| [**importMetadataTMLAsync**](MetadataApi.md#importMetadataTMLAsync) | **POST** /api/rest/2.0/metadata/tml/async/import | +| [**parameterizeMetadata**](MetadataApi.md#parameterizeMetadata) | **POST** /api/rest/2.0/metadata/parameterize | +| [**parameterizeMetadataFields**](MetadataApi.md#parameterizeMetadataFields) | **POST** /api/rest/2.0/metadata/parameterize-fields | +| [**searchMetadata**](MetadataApi.md#searchMetadata) | **POST** /api/rest/2.0/metadata/search | +| [**unparameterizeMetadata**](MetadataApi.md#unparameterizeMetadata) | **POST** /api/rest/2.0/metadata/unparameterize | +| [**updateMetadataHeader**](MetadataApi.md#updateMetadataHeader) | **POST** /api/rest/2.0/metadata/headers/update | +| [**updateMetadataObjId**](MetadataApi.md#updateMetadataObjId) | **POST** /api/rest/2.0/metadata/update-obj-id | + + + +# **convertWorksheetToModel** +> ResponseWorksheetToModelConversion convertWorksheetToModel(convertWorksheetToModelRequest) + + + + Convert worksheets to models Version: 10.6.0.cl or later ## Prerequisites - **Privileges Required:** - `DATAMANAGEMENT` (Can manage data) or `ADMINISTRATION` (Can administer ThoughtSpot). - **Additional Privileges (if RBAC is enabled):** - `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` (Can manage data models). --- ## Usage Guidelines ### Parameters 1. **worksheet_ids** - **Description:** A comma-separated list of GUIDs (Globally Unique Identifiers) specifying the Worksheets to be converted. - **Usage:** - Used only when `convert_all` is set to `false`. - Leave empty or omit when `convert_all` is set to `true`. 2. **exclude_worksheet_ids** - **Description:** A comma-separated list of GUIDs specifying Worksheets to be excluded from conversion. - **Usage:** - Useful when `convert_all` is set to `true` and specific Worksheets should not be converted. 3. **convert_all** - **Description:** Sets the scope of conversion. - **Options:** - `true`: Converts all Worksheets in the system, except those specified in `exclude_worksheet_ids`. - `false`: Converts only the Worksheets listed in `worksheet_ids`. 4. **apply_changes** - **Description:** Specifies whether to apply changes directly to ThoughtSpot or to generate a preview before applying any changes.Used for validation of conversion. - **Options:** - `true`: Applies conversion changes directly to ThoughtSpot. - `false`: Generates only a preview of the changes and does not apply any changes to ThoughtSpot --- ## Best Practices 1. **Backup Before Conversion:** Always export metadata as a backup before initiating the conversion process 2. **Partial Conversion for Testing:** Test the conversion process by setting `convert_all` to `false` and specifying a small number of `worksheet_ids`. 3. **Verify Dependencies:** Check for dependent objects, such as Tables and Connections, to avoid invalid references. 4. **Review Changes:** Use `apply_changes: false` to preview the impact of the conversion before applying changes. --- ## Examples ### Convert Specific Worksheets ```json { \"worksheet_ids\": [\"guid1\", \"guid2\", \"guid3\"], \"exclude_worksheet_ids\": [], \"convert_all\": false, \"apply_changes\": true } ``` ### Convert All Accessible Worksheets ```json { \"worksheet_ids\": [], \"exclude_worksheet_ids\": [], \"convert_all\": true, \"apply_changes\": true } ``` ### Exclude Specific Worksheets While Converting All Accessible Worksheets ```json { \"worksheet_ids\": [], \"exclude_worksheet_ids\": [\"abc\"], \"convert_all\": true, \"apply_changes\": true } ``` + +### Parameters + +| Name | Type | +|------------- | ------------- | +| **convertWorksheetToModelRequest** | [**ConvertWorksheetToModelRequest**](ConvertWorksheetToModelRequest.md) + +### Return type + +[**ResponseWorksheetToModelConversion**](ResponseWorksheetToModelConversion.md) + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Conversion of worksheets to model done successfully. | - | +| **400** | Invalid request. | - | +| **401** | Unauthorized access. | - | +| **403** | Forbidden access. | - | +| **500** | Unexpected error | - | + + +# **copyObject** +> ResponseCopyObject copyObject(copyObjectRequest) + + + + Makes a copy of an Answer or Liveboard Version: 10.3.0.cl or later Creates a copy of a metadata object. Requires at least view access to the metadata object being copied. Upon successful execution, the API creates a copy of the metadata object specified in the API request and returns the ID of the new object. + +### Parameters + +| Name | Type | +|------------- | ------------- | +| **copyObjectRequest** | [**CopyObjectRequest**](CopyObjectRequest.md) + +### Return type + +[**ResponseCopyObject**](ResponseCopyObject.md) + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Successfully created a copy of the object | - | +| **400** | Invalid request. | - | +| **401** | Unauthorized access. | - | +| **403** | Forbidden access. | - | +| **404** | Object not found | - | +| **500** | Unexpected error | - | + + +# **deleteMetadata** +> deleteMetadata(deleteMetadataRequest) + + + + Version: 9.0.0.cl or later Removes the specified metadata object from the ThoughtSpot system. Requires edit access to the metadata object. + +### Parameters + +| Name | Type | +|------------- | ------------- | +| **deleteMetadataRequest** | [**DeleteMetadataRequest**](DeleteMetadataRequest.md) + +### Return type + +null (empty response body) + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **204** | Metadata objects successfully deleted. | - | +| **400** | Invalid request. | - | +| **401** | Unauthorized access. | - | +| **403** | Forbidden access. | - | +| **500** | Unexpected error | - | + + +# **exportMetadataTML** +> List<Object> exportMetadataTML(exportMetadataTMLRequest) + + + + Version: 9.0.0.cl or later Exports the [TML](https://docs.thoughtspot.com/cloud/latest/tml) representation of metadata objects in JSON or YAML format. Requires `DATADOWNLOADING` (**Can download Data**) and at least view access to the metadata object. #### Usage guidelines * You can export one or several objects by passing metadata object GUIDs in the `metadata` array. * When exporting TML content for a Liveboard or Answer object, you can set `export_associated` to `true` to retrieve TML content for underlying Worksheets, Tables, or Views, including the GUID of each object within the headers. When `export_associated` is set to `true`, consider retrieving one metadata object at a time. * Set `export_fqns` to `true` to add FQNs of the referenced objects in the TML content. For example, if you send an API request to retrieve TML for a Liveboard and its associated objects, the API returns the TML content with FQNs of the referenced Worksheet. Exporting TML with FQNs is useful if ThoughtSpot has multiple objects with the same name and you want to eliminate ambiguity when importing TML files into ThoughtSpot. It eliminates the need for adding FQNs of the referenced objects manually during the import operation. * To export only the TML of feedbacks associated with an object, set the GUID of the object as `identifier`, and set the `type` as `FEEDBACK` in the `metadata` array. * To export the TML of an object along with the feedbacks associated with it, set the GUID of the object as `identifier`, set the `type` as `LOGIAL_TABLE` in the `metadata` array, and set `export_with_associated_feedbacks` in `export_options` to true. For more information, see [TML Documentation](https://developers.thoughtspot.com/docs/tml#_export_a_tml). For more information on feedbacks, see [Feedback Documentation](https://docs.thoughtspot.com/cloud/latest/sage-feedback). + +### Parameters + +| Name | Type | +|------------- | ------------- | +| **exportMetadataTMLRequest** | [**ExportMetadataTMLRequest**](ExportMetadataTMLRequest.md) + +### Return type + +**List<Object>** + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Export TMLs of specified metadata objects is successful. | - | +| **400** | Invalid request. | - | +| **401** | Unauthorized access. | - | +| **403** | Forbidden access. | - | +| **500** | Unexpected error | - | + + +# **exportMetadataTMLBatched** +> Object exportMetadataTMLBatched(exportMetadataTMLBatchedRequest) + + + + Version: 10.1.0.cl or later Exports the [TML](https://docs.thoughtspot.com/cloud/latest/tml) representation of metadata objects in JSON or YAML format. ### **Permissions Required** Requires `DATAMANAGEMENT` (**Can manage data**) and `USERMANAGEMENT` (**Can manage users**) privileges. #### **Usage Guidelines** This API is only applicable for `USER`, `GROUP`, and `ROLES` metadata types. - `batch_offset` Indicates the starting position within the complete dataset from which the API should begin returning objects. Useful for paginating results efficiently. - `batch_size` Specifies the number of objects or items to retrieve in a single request. Helps control response size for better performance. - `edoc_format` Defines the format of the TML content. The exported metadata can be in JSON or YAML format. - `export_dependent` Specifies whether to include dependent metadata objects in the export. Ensures related objects are also retrieved if needed. - `all_orgs_override` Indicates whether the export operation applies across all organizations. Useful for multi-tenant environments where cross-org exports are required. + +### Parameters + +| Name | Type | +|------------- | ------------- | +| **exportMetadataTMLBatchedRequest** | [**ExportMetadataTMLBatchedRequest**](ExportMetadataTMLBatchedRequest.md) + +### Return type + +**Object** + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Export TMLs of specified metadata objects is successful. | - | +| **400** | Invalid request. | - | +| **401** | Unauthorized access. | - | +| **403** | Forbidden access. | - | +| **500** | Unexpected error | - | + + +# **fetchAnswerSqlQuery** +> SqlQueryResponse fetchAnswerSqlQuery(fetchAnswerSqlQueryRequest) + + + + Version: 9.0.0.cl or later Fetches the underlying SQL query data for an Answer object. Requires at least view access to the Answer object. Upon successful execution, the API returns the SQL queries for the specified object as shown in this example: ``` { \"metadata_id\":\"8fbe44a8-46ad-4b16-8d39-184b2fada490\", \"metadata_name\":\"Total sales\", \"metadata_type\":\"ANSWER\", \"sql_queries\":[ { \"metadata_id\":\"8fbe44a8-46ad-4b16-8d39-184b2fada490\", \"metadata_name\":\"Total sales -test\", \"sql_query\":\"SELECT \\n \\\"ta_1\\\".\\\"REGION\\\" \\\"ca_1\\\", \\n \\\"ta_2\\\".\\\"PRODUCTNAME\\\" \\\"ca_2\\\", \\n \\\"ta_1\\\".\\\"STORENAME\\\" \\\"ca_3\\\", \\n CASE\\n WHEN sum(\\\"ta_3\\\".\\\"SALES\\\") IS NOT NULL THEN sum(\\\"ta_3\\\".\\\"SALES\\\")\\n ELSE 0\\n END \\\"ca_4\\\", \\n CASE\\n WHEN sum(\\\"ta_3\\\".\\\"QUANTITYPURCHASED\\\") IS NOT NULL THEN sum(\\\"ta_3\\\".\\\"QUANTITYPURCHASED\\\")\\n ELSE 0\\n END \\\"ca_5\\\"\\nFROM \\\"RETAILAPPAREL\\\".\\\"PUBLIC\\\".\\\"FACT_RETAPP_SALES\\\" \\\"ta_3\\\"\\n JOIN \\\"RETAILAPPAREL\\\".\\\"PUBLIC\\\".\\\"DIM_RETAPP_STORES\\\" \\\"ta_1\\\"\\n ON \\\"ta_3\\\".\\\"STOREID\\\" = \\\"ta_1\\\".\\\"STOREID\\\"\\n JOIN \\\"RETAILAPPAREL\\\".\\\"PUBLIC\\\".\\\"DIM_RETAPP_PRODUCTS\\\" \\\"ta_2\\\"\\n ON \\\"ta_3\\\".\\\"PRODUCTID\\\" = \\\"ta_2\\\".\\\"PRODUCTID\\\"\\nGROUP BY \\n \\\"ca_1\\\", \\n \\\"ca_2\\\", \\n \\\"ca_3\\\"\\n\" } ] } ``` + +### Parameters + +| Name | Type | +|------------- | ------------- | +| **fetchAnswerSqlQueryRequest** | [**FetchAnswerSqlQueryRequest**](FetchAnswerSqlQueryRequest.md) + +### Return type + +[**SqlQueryResponse**](SqlQueryResponse.md) + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Fetching SQL query of specified metadata object is successful. | - | +| **400** | Invalid request. | - | +| **401** | Unauthorized access. | - | +| **403** | Forbidden access. | - | +| **500** | Unexpected error | - | + + +# **fetchAsyncImportTaskStatus** +> GetAsyncImportStatusResponse fetchAsyncImportTaskStatus(fetchAsyncImportTaskStatusRequest) + + + + Version: 10.4.0.cl or later Gets information about the status of the TML async import task scheduled using the `/api/rest/2.0/metadata/tml/async/import` API call. To fetch the task details, specify the ID of the TML async import task. Requires access to the task ID. The API allows users who initiated the asynchronous TML import via `/api/rest/2.0/metadata/tml/async/import` to view the status of their tasks. Users with administration privilege can view the status of all import tasks initiated by the users in their Org. #### Usage guidelines See [TML API Documentation](https://developers.thoughtspot.com/docs/tml#_fetch_status_of_the_tml_import_task) for usage guidelines. + +### Parameters + +| Name | Type | +|------------- | ------------- | +| **fetchAsyncImportTaskStatusRequest** | [**FetchAsyncImportTaskStatusRequest**](FetchAsyncImportTaskStatusRequest.md) + +### Return type + +[**GetAsyncImportStatusResponse**](GetAsyncImportStatusResponse.md) + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Async TML Import Task statuses fetched successfully. | - | +| **400** | Invalid request. | - | +| **401** | Unauthorized access. | - | +| **403** | Forbidden access. | - | +| **500** | Unexpected error | - | + + +# **fetchLiveboardSqlQuery** +> SqlQueryResponse fetchLiveboardSqlQuery(fetchLiveboardSqlQueryRequest) + + + + Version: 9.0.0.cl or later Fetches the underlying SQL query data for a Liveboard object and its visualizations. Requires at least view access to the Liveboard object. To get SQL query data for a Liveboard, specify the GUID of the Liveboard. Optionally, you can add an array of visualization GUIDs to retrieve the SQL query data for visualizations in the Liveboard. Upon successful execution, the API returns the SQL queries for the specified object as shown in this example: ``` { \"metadata_id\": \"fa68ae91-7588-4136-bacd-d71fb12dda69\", \"metadata_name\": \"Total Sales\", \"metadata_type\": \"LIVEBOARD\", \"sql_queries\": [ { \"metadata_id\": \"b3b6d2b9-089a-490c-8e16-b144650b7843\", \"metadata_name\": \"Total quantity purchased, Total sales by region\", \"sql_query\": \"SELECT \\n \\\"ta_1\\\".\\\"REGION\\\" \\\"ca_1\\\", \\n CASE\\n WHEN sum(\\\"ta_2\\\".\\\"QUANTITYPURCHASED\\\") IS NOT NULL THEN sum(\\\"ta_2\\\".\\\"QUANTITYPURCHASED\\\")\\n ELSE 0\\n END \\\"ca_2\\\", \\n CASE\\n WHEN sum(\\\"ta_2\\\".\\\"SALES\\\") IS NOT NULL THEN sum(\\\"ta_2\\\".\\\"SALES\\\")\\n ELSE 0\\n END \\\"ca_3\\\"\\nFROM \\\"RETAILAPPAREL\\\".\\\"PUBLIC\\\".\\\"FACT_RETAPP_SALES\\\" \\\"ta_2\\\"\\n JOIN \\\"RETAILAPPAREL\\\".\\\"PUBLIC\\\".\\\"DIM_RETAPP_STORES\\\" \\\"ta_1\\\"\\n ON \\\"ta_2\\\".\\\"STOREID\\\" = \\\"ta_1\\\".\\\"STOREID\\\"\\nGROUP BY \\\"ca_1\\\"\" } ] } ``` + +### Parameters + +| Name | Type | +|------------- | ------------- | +| **fetchLiveboardSqlQueryRequest** | [**FetchLiveboardSqlQueryRequest**](FetchLiveboardSqlQueryRequest.md) + +### Return type + +[**SqlQueryResponse**](SqlQueryResponse.md) + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Fetching SQL query of specified metadata object is successful. | - | +| **400** | Invalid request. | - | +| **401** | Unauthorized access. | - | +| **403** | Forbidden access. | - | +| **500** | Unexpected error | - | + + +# **importMetadataTML** +> List<Object> importMetadataTML(importMetadataTMLRequest) + + + + Version: 9.0.0.cl or later Imports [TML](https://docs.thoughtspot.com/cloud/latest/tml) files into ThoughtSpot. Requires `DATAMANAGEMENT` (**Can manage data**) or `ADMINISTRATION` (**Can administer ThoughtsSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the following Data control privileges may be required: - `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) - `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` (**Can manage data models**) #### Usage guidelines * Import all related objects in a single TML Import API call. For example, Tables that use the same Connection object and Worksheets connected to these Tables. * Include the `fqn` property to distinguish objects that have the same name. For example, if you have multiple Connections or Worksheets with the same name on ThoughtSpot and the Connection or Worksheet referenced in your TML file does not have a unique name to distinguish, it may result in invalid object references. Adding `fqn` helps ThoughtSpot differentiate a Table from another with the same name. We recommend [exporting TML with FQNs](#/http/api-endpoints/metadata/export-metadata-tml) and using these during the import operation. * You can upload multiple TML files at a time. If you import a Worksheet along with Liveboards, Answers, and other dependent objects in a single API call, the imported objects will be immediately available for use. When you import only a Worksheet object, it may take some time for the Worksheet to become available in the ThoughtSpot system. Please wait for a few minutes, and then proceed to create an Answer and Liveboard from the newly imported Worksheet. For more information, see [TML Documentation](https://developers.thoughtspot.com/docs/tml#_import_a_tml). + +### Parameters + +| Name | Type | +|------------- | ------------- | +| **importMetadataTMLRequest** | [**ImportMetadataTMLRequest**](ImportMetadataTMLRequest.md) + +### Return type + +**List<Object>** + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Import metadata objects using specified TMLs is successful. | - | +| **400** | Invalid request. | - | +| **401** | Unauthorized access. | - | +| **403** | Forbidden access. | - | +| **500** | Unexpected error | - | + + +# **importMetadataTMLAsync** +> ImportEPackAsyncTaskStatus importMetadataTMLAsync(importMetadataTMLAsyncRequest) + + + + Version: 10.4.0.cl or later Schedules a task to import [TML](https://docs.thoughtspot.com/cloud/latest/tml) files into ThoughtSpot. You can use this API endpoint to process TML objects asynchronously when importing TMLs of large and complex metadata objects into ThoughtSpot. Unlike the synchronous import TML operation, the API processes TML data in the background and returns a task ID, which can be used to check the status of the import task via `/api/rest/2.0/metadata/tml/async/status` API endpoint. Requires `DATAMANAGEMENT` (**Can manage data**) or `ADMINISTRATION` (**Can administer ThoughtsSpot**) privilege, and edit access to the TML objects. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the following Data control privileges may be required: - `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) - `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` (**Can manage data models**) #### Usage guidelines See [Async TML API Documentation](https://developers.thoughtspot.com/docs/tml#_import_tml_objects_asynchronously) for usage guidelines. + +### Parameters + +| Name | Type | +|------------- | ------------- | +| **importMetadataTMLAsyncRequest** | [**ImportMetadataTMLAsyncRequest**](ImportMetadataTMLAsyncRequest.md) + +### Return type + +[**ImportEPackAsyncTaskStatus**](ImportEPackAsyncTaskStatus.md) + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Async TML Import Task submitted successfully. | - | +| **400** | Invalid request. | - | +| **401** | Unauthorized access. | - | +| **403** | Forbidden access. | - | +| **500** | Unexpected error | - | + + +# **parameterizeMetadata** +> parameterizeMetadata(parameterizeMetadataRequest) + + + + Parameterize fields in metadata objects. Version: 10.9.0.cl or later **Note:** This API endpoint is deprecated and will be removed from ThoughtSpot in a future release. Use [POST /api/rest/2.0/metadata/parameterize-fields](/api/rest/2.0/metadata/parameterize-fields) instead. Allows parameterizing fields in metadata objects in ThoughtSpot. Requires appropriate permissions to modify the metadata object. The API endpoint allows parameterizing the following types of metadata objects: * Logical Tables * Connections * Connection Configs For a Logical Table the field type must be `ATTRIBUTE` and field name can be one of: * databaseName * schemaName * tableName For a Connection or Connection Config, the field type is always `CONNECTION_PROPERTY`. In this case, field_name specifies the exact property of the Connection or Connection Config that needs to be parameterized. For Connection Config, the only supported field name is: * impersonate_user + +### Parameters + +| Name | Type | +|------------- | ------------- | +| **parameterizeMetadataRequest** | [**ParameterizeMetadataRequest**](ParameterizeMetadataRequest.md) + +### Return type + +null (empty response body) + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **204** | Parameterize successful. | - | +| **400** | Invalid request. | - | +| **401** | Unauthorized access. | - | +| **403** | Forbidden access. | - | +| **500** | Unexpected error | - | + + +# **parameterizeMetadataFields** +> parameterizeMetadataFields(parameterizeMetadataFieldsRequest) + + + + Parameterize multiple fields of metadata objects. For example [schemaName, databaseName] for LOGICAL_TABLE. Version: 26.5.0.cl or later Allows parameterizing multiple fields of metadata objects in ThoughtSpot. For example, you can parameterize [schemaName, databaseName] for LOGICAL_TABLE. Requires appropriate permissions to modify the metadata object. The API endpoint allows parameterizing the following types of metadata objects: * Logical Tables * Connections * Connection Configs For a Logical Table, the field type must be `ATTRIBUTE` and field names can include: * databaseName * schemaName * tableName For a Connection or Connection Config, the field type is always `CONNECTION_PROPERTY`. In this case, field_names specifies the exact properties of the Connection or Connection Config that need to be parameterized. For Connection Config, supported field names include: * impersonate_user You can parameterize multiple fields at once by providing an array of field names. + +### Parameters + +| Name | Type | +|------------- | ------------- | +| **parameterizeMetadataFieldsRequest** | [**ParameterizeMetadataFieldsRequest**](ParameterizeMetadataFieldsRequest.md) + +### Return type + +null (empty response body) + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **204** | Parameterize successful. | - | +| **400** | Invalid request. | - | +| **401** | Unauthorized access. | - | +| **403** | Forbidden access. | - | +| **500** | Unexpected error | - | + + +# **searchMetadata** +> List<MetadataSearchResponse> searchMetadata(searchMetadataRequest) + + + + Version: 9.0.0.cl or later Gets a list of metadata objects available on the ThoughtSpot system. This API endpoint is available to all users who have view access to the object. Users with `ADMINISTRATION` (**Can administer ThoughtSpot**) privileges can view data for all metadata objects, including users and groups. #### Usage guidelines - To get all metadata objects, send the API request without any attributes. - To get metadata objects of a specific type, set the `type` attribute. For example, to fetch a Worksheet, set the type as `LOGICAL_TABLE`. - To filter metadata objects within type `LOGICAL_TABLE`, set the `subtypes` attribute. For example, to fetch a Worksheet, set the type as `LOGICAL_TABLE` & subtypes as `[WORKSHEET]`. - To get a specific metadata object, specify the GUID. - To customize your search and filter the API response, you can use several parameters. You can search for objects created or modified by specific users, by tags applied to the objects, or by using the include parameters like `include_auto_created_objects`, `include_dependent_objects`, `include_headers`, `include_incomplete_objects`, and so on. You can also define sorting options to sort the data retrieved in the API response. - To get discoverable objects when linientmodel is enabled you can use `include_discoverable_objects` as true else false. Default value is true. - For liveboard metadata type, to get the newer format, set the `liveboard_response_format` as V2. Default value is V1. - To retrieve only objects that are published, set the `include_only_published_objects` as true. Default value is false. **NOTE**: The following parameters support pagination of metadata records: - `tag_identifiers` - `type` - `subtypes` - `created_by_user_identifiers` - `modified_by_user_identifiers` - `owned_by_user_identifiers` - `exclude_objects` - `include_auto_created_objects` - `favorite_object_options` - `include_only_published_objects` If you are using other parameters to search metadata, set `record_size` to `-1` and `record_offset` to `0`. + +### Parameters + +| Name | Type | +|------------- | ------------- | +| **searchMetadataRequest** | [**SearchMetadataRequest**](SearchMetadataRequest.md) + +### Return type + +[**List<MetadataSearchResponse>**](MetadataSearchResponse.md) + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Metadata objects search result. | - | +| **400** | Invalid request. | - | +| **401** | Unauthorized access. | - | +| **403** | Forbidden access. | - | +| **500** | Unexpected error | - | + + +# **unparameterizeMetadata** +> unparameterizeMetadata(unparameterizeMetadataRequest) + + + + Remove parameterization from fields in metadata objects. Version: 26.5.0.cl or later Allows removing parameterization from fields in metadata objects in ThoughtSpot. Requires appropriate permissions to modify the metadata object. The API endpoint allows unparameterizing the following types of metadata objects: * Logical Tables * Connections * Connection Configs For a Logical Table the field type must be `ATTRIBUTE` and field name can be one of: * databaseName * schemaName * tableName For a Connection or Connection Config, the field type is always `CONNECTION_PROPERTY`. In this case, field_name specifies the exact property of the Connection or Connection Config that needs to be unparameterized. For Connection Config, the only supported field name is: * impersonate_user + +### Parameters + +| Name | Type | +|------------- | ------------- | +| **unparameterizeMetadataRequest** | [**UnparameterizeMetadataRequest**](UnparameterizeMetadataRequest.md) + +### Return type + +null (empty response body) + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **204** | Successfuly removed parameters. | - | +| **400** | Invalid request. | - | +| **401** | Unauthorized access. | - | +| **403** | Forbidden access. | - | +| **500** | Unexpected error | - | + + +# **updateMetadataHeader** +> updateMetadataHeader(updateMetadataHeaderRequest) + + + + Update header attributes for a given list of header objects. Version: 10.6.0.cl or later ## Prerequisites - **Privileges Required:** - `DATAMANAGEMENT` (Can manage data) or `ADMINISTRATION` (Can administer ThoughtSpot). - **Additional Privileges (if RBAC is enabled):** - `ORG_ADMINISTRATION` (Can manage orgs). --- ## Usage Guidelines ### Parameters 1. **headers_update** - **Description:** List of header objects with their attributes to be updated. Each object contains a list of attributes to be updated in the header. - **Usage:** - You must provide either `identifier` or `obj_identifier`, but not both. Both fields cannot be empty. - When `org_identifier` is set to `-1`, only the `identifier` value is accepted; `obj_identifier` is not allowed. 2. **org_identifier** - **Description:** GUID (Globally Unique Identifier) or name of the organization. - **Usage:** - Leaving this field empty assumes that the changes should be applied to the current organization - Provide `org_guid` or `org_name` to uniquely identify the organization where changes need to be applied. . - Provide `-1` if changes have to be applied across all the org. --- ## Note Currently, this API is enabled only for updating the `obj_identifier` attribute. Only `text` will be allowed in attribute's value. ## Best Practices 1. **Backup Before Conversion:** Always export metadata as a backup before initiating the update process --- ## Examples ### Only `identifier` is given ```json { \"headers_update\": [ { \"identifier\": \"guid_1\", \"obj_identifier\": \"\", \"type\": \"LOGICAL_COLUMN\", \"attributes\": [ { \"name\": \"obj_id\", \"value\": \"custom_object_id\" } ] } ], \"org_identifier\": \"orgGuid\" } ``` ### Only `obj_identifier` is given ```json { \"headers_update\": [ { \"obj_identifier\": \"custom_object_id\", \"type\": \"ANSWER\", \"attributes\": [ { \"name\": \"obj_id\", \"value\": \"custom_object_id\" } ] } ], \"org_identifier\": \"orgName\" } ``` ### Executing update for all org `-1` ```json { \"headers_update\": [ { \"identifier\": \"guid_1\", \"type\": \"ANSWER\", \"attributes\": [ { \"name\": \"obj_id\", \"value\": \"custom_object_id\" } ] } ], \"org_identifier\": -1 } ``` ### Optional `type` is not provided ```json { \"headers_update\": [ { \"identifier\": \"guid_1\", \"attributes\": [ { \"name\": \"obj_id\", \"value\": \"custom_object_id\" } ] } ], \"org_identifier\": -1 } ``` + +### Parameters + +| Name | Type | +|------------- | ------------- | +| **updateMetadataHeaderRequest** | [**UpdateMetadataHeaderRequest**](UpdateMetadataHeaderRequest.md) + +### Return type + +null (empty response body) + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **204** | Headers update was successful. | - | +| **400** | Invalid request. | - | +| **401** | Unauthorized access. | - | +| **403** | Forbidden access. | - | +| **500** | Unexpected error | - | + + +# **updateMetadataObjId** +> updateMetadataObjId(updateMetadataObjIdRequest) + + + + Update object IDs for given metadata objects. Version: 10.8.0.cl or later ## Prerequisites - **Privileges Required:** - `DATAMANAGEMENT` (Can manage data) or `ADMINISTRATION` (Can administer ThoughtSpot). - **Additional Privileges (if RBAC is enabled):** - `ORG_ADMINISTRATION` (Can manage orgs). --- ## Usage Guidelines ### Parameters 1. **metadata** - **Description:** List of metadata objects to update their object IDs. - **Usage:** - Use either `current_obj_id` alone OR use `metadata_identifier` with `type` (when needed). - When using `metadata_identifier`, the `type` field is required if using a name instead of a GUID. - The `new_obj_id` field is always required. --- ## Note This API is specifically designed for updating object IDs of metadata objects. It internally uses the header update mechanism to perform the changes. ## Best Practices 1. **Backup Before Update:** Always export metadata as a backup before initiating the update process. 2. **Validation:** - When using `current_obj_id`, ensure it matches the existing object ID exactly. - When using `metadata_identifier` with a name, ensure the `type` is specified correctly. - Verify that the `new_obj_id` follows your naming conventions and is unique within your system. --- ## Examples ### Using current_obj_id ```json { \"metadata\": [ { \"current_obj_id\": \"existing_object_id\", \"new_obj_id\": \"new_object_id\" } ] } ``` ### Using metadata_identifier with GUID ```json { \"metadata\": [ { \"metadata_identifier\": \"01234567-89ab-cdef-0123-456789abcdef\", \"new_obj_id\": \"new_object_id\" } ] } ``` ### Using metadata_identifier with name and type ```json { \"metadata\": [ { \"metadata_identifier\": \"My Answer\", \"type\": \"ANSWER\", \"new_obj_id\": \"new_object_id\" } ] } ``` ### Multiple objects update ```json { \"metadata\": [ { \"current_obj_id\": \"existing_object_id_1\", \"new_obj_id\": \"new_object_id_1\" }, { \"metadata_identifier\": \"My Worksheet\", \"type\": \"LOGICAL_TABLE\", \"new_obj_id\": \"new_object_id_2\" } ] } ``` + +### Parameters + +| Name | Type | +|------------- | ------------- | +| **updateMetadataObjIdRequest** | [**UpdateMetadataObjIdRequest**](UpdateMetadataObjIdRequest.md) + +### Return type + +null (empty response body) + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **204** | Headers update was successful. | - | +| **400** | Invalid request. | - | +| **401** | Unauthorized access. | - | +| **403** | Forbidden access. | - | +| **500** | Unexpected error | - | + diff --git a/sdks/java/docs/MetadataAssociationItem.md b/sdks/java/docs/MetadataAssociationItem.md new file mode 100644 index 000000000..edac26646 --- /dev/null +++ b/sdks/java/docs/MetadataAssociationItem.md @@ -0,0 +1,19 @@ + + +# MetadataAssociationItem + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**actionConfig** | [**ActionConfig**](ActionConfig.md) | | | +|**identifier** | **String** | Unique ID or name of the metadata. | | +|**type** | **String** | Type of metadata. Required if the name of the object is set as the identifier. This attribute is optional when the object GUID is specified as the identifier. | | + + +## Implemented Interfaces + +* Serializable + + diff --git a/sdks/java/docs/MetadataContext.md b/sdks/java/docs/MetadataContext.md new file mode 100644 index 000000000..1bcf93f17 --- /dev/null +++ b/sdks/java/docs/MetadataContext.md @@ -0,0 +1,20 @@ + + +# MetadataContext + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**dataSourceIdentifiers** | **List<String>** | List of data_source_identifiers to provide context for breaking down user query into analytical queries that can be run on them. | [optional] | +|**answerIdentifiers** | **List<String>** | List of answer unique identifiers (GUIDs) whose data will be used to guide the response. | [optional] | +|**conversationIdentifier** | **String** | Unique identifier to denote current conversation. | [optional] | +|**liveboardIdentifiers** | **List<String>** | List of liveboard unique identifiers (GUIDs) whose data will be used to guide the response. | [optional] | + + +## Implemented Interfaces + +* Serializable + + diff --git a/sdks/java/docs/MetadataInput.md b/sdks/java/docs/MetadataInput.md new file mode 100644 index 000000000..c8ab2c4f8 --- /dev/null +++ b/sdks/java/docs/MetadataInput.md @@ -0,0 +1,26 @@ + + +# MetadataInput + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**identifier** | **String** | | [optional] | +|**type** | [**TypeEnum**](#TypeEnum) | | [optional] | + + + +## Enum: TypeEnum + +| Name | Value | +|---- | -----| +| LIVEBOARD | "LIVEBOARD" | + + +## Implemented Interfaces + +* Serializable + + diff --git a/sdks/java/docs/MetadataListItemInput.md b/sdks/java/docs/MetadataListItemInput.md new file mode 100644 index 000000000..237f1e487 --- /dev/null +++ b/sdks/java/docs/MetadataListItemInput.md @@ -0,0 +1,51 @@ + + +# MetadataListItemInput + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**identifier** | **String** | Unique ID or name of the metadata. | [optional] | +|**objIdentifier** | **String** | CustomObjectId of the metadata. | [optional] | +|**namePattern** | **String** | A pattern to match the case-insensitive name of the metadata object. User % for a wildcard match. | [optional] | +|**type** | [**TypeEnum**](#TypeEnum) | Type of metadata. Required if the name of the object is set as identifier. This attribute is optional when the object GUID is specified as identifier. 1. Liveboard 2. Answers 3. LOGICAL_TABLE for any data object such as table, worksheet or view. 4. LOGICAL_COLUMN for a column of any data object such as table, worksheet or view. 5. CONNECTION for creating or modify data connections. 6. TAG for tag objects. 7. USER for user objects. 8. USER_GROUP for group objects. 9. LOGICAL_RELATIONSHIP for table or worksheet joins. A join combines from one or several data object by using matching values 10. INSIGHT_SPEC for SpotIQ objects | [optional] | +|**subtypes** | [**List<SubtypesEnum>**](#List<SubtypesEnum>) | List of subtype of metadata. Applies for LOGICAL_TABLE type with the following valid values. 1. ONE_TO_ONE_LOGICAL 2. WORKSHEET 3. PRIVATE_WORKSHEET. 4. USER_DEFINED. 5. AGGR_WORKSHEET. 6. SQL_VIEW Version: 10.11.0.cl or later | [optional] | + + + +## Enum: TypeEnum + +| Name | Value | +|---- | -----| +| LIVEBOARD | "LIVEBOARD" | +| ANSWER | "ANSWER" | +| LOGICAL_TABLE | "LOGICAL_TABLE" | +| LOGICAL_COLUMN | "LOGICAL_COLUMN" | +| CONNECTION | "CONNECTION" | +| TAG | "TAG" | +| USER | "USER" | +| USER_GROUP | "USER_GROUP" | +| LOGICAL_RELATIONSHIP | "LOGICAL_RELATIONSHIP" | +| INSIGHT_SPEC | "INSIGHT_SPEC" | + + + +## Enum: List<SubtypesEnum> + +| Name | Value | +|---- | -----| +| ONE_TO_ONE_LOGICAL | "ONE_TO_ONE_LOGICAL" | +| WORKSHEET | "WORKSHEET" | +| PRIVATE_WORKSHEET | "PRIVATE_WORKSHEET" | +| USER_DEFINED | "USER_DEFINED" | +| AGGR_WORKSHEET | "AGGR_WORKSHEET" | +| SQL_VIEW | "SQL_VIEW" | + + +## Implemented Interfaces + +* Serializable + + diff --git a/sdks/java/docs/MetadataObject.md b/sdks/java/docs/MetadataObject.md new file mode 100644 index 000000000..b55650ee7 --- /dev/null +++ b/sdks/java/docs/MetadataObject.md @@ -0,0 +1,29 @@ + + +# MetadataObject + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**identifier** | **String** | Unique ID or name of the metadata | | +|**type** | [**TypeEnum**](#TypeEnum) | Type of metadata. Required if the name of the object is set as the identifier. This attribute is optional when the object GUID is specified as the identifier. | [optional] | + + + +## Enum: TypeEnum + +| Name | Value | +|---- | -----| +| LIVEBOARD | "LIVEBOARD" | +| ANSWER | "ANSWER" | +| LOGICAL_TABLE | "LOGICAL_TABLE" | +| CUSTOM_ACTION | "CUSTOM_ACTION" | + + +## Implemented Interfaces + +* Serializable + + diff --git a/sdks/java/docs/MetadataResponse.md b/sdks/java/docs/MetadataResponse.md new file mode 100644 index 000000000..4e4fd8e4e --- /dev/null +++ b/sdks/java/docs/MetadataResponse.md @@ -0,0 +1,27 @@ + + +# MetadataResponse + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**name** | **String** | | [optional] | +|**id** | **String** | | | +|**type** | [**TypeEnum**](#TypeEnum) | | | + + + +## Enum: TypeEnum + +| Name | Value | +|---- | -----| +| LIVEBOARD | "LIVEBOARD" | + + +## Implemented Interfaces + +* Serializable + + diff --git a/sdks/java/docs/MetadataSearchResponse.md b/sdks/java/docs/MetadataSearchResponse.md new file mode 100644 index 000000000..0d86de33e --- /dev/null +++ b/sdks/java/docs/MetadataSearchResponse.md @@ -0,0 +1,44 @@ + + +# MetadataSearchResponse + +Metadata Search Response Object. + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**metadataId** | **String** | Unique identifier of the metadata. | [optional] | +|**metadataName** | **String** | Name of the metadata. | [optional] | +|**metadataType** | [**MetadataTypeEnum**](#MetadataTypeEnum) | Type of the metadata. | | +|**metadataObjId** | **String** | Custom identifier of the metadata. (Available from 10.8.0.cl onwards) | [optional] | +|**dependentObjects** | **Object** | Details of dependent objects of the metadata objects. | [optional] | +|**incompleteObjects** | **List<Object>** | Details of incomplete information of the metadata objects if any. | [optional] | +|**metadataDetail** | **Object** | Complete details of the metadata objects. | [optional] | +|**metadataHeader** | **Object** | Header information of the metadata objects. | [optional] | +|**visualizationHeaders** | **List<Object>** | Visualization header information of the metadata objects. | [optional] | +|**stats** | **Object** | Stats of the metadata object. Includes views, favorites, last_accessed. | [optional] | + + + +## Enum: MetadataTypeEnum + +| Name | Value | +|---- | -----| +| LIVEBOARD | "LIVEBOARD" | +| ANSWER | "ANSWER" | +| LOGICAL_TABLE | "LOGICAL_TABLE" | +| LOGICAL_COLUMN | "LOGICAL_COLUMN" | +| CONNECTION | "CONNECTION" | +| TAG | "TAG" | +| USER | "USER" | +| USER_GROUP | "USER_GROUP" | +| LOGICAL_RELATIONSHIP | "LOGICAL_RELATIONSHIP" | +| INSIGHT_SPEC | "INSIGHT_SPEC" | + + +## Implemented Interfaces + +* Serializable + + diff --git a/sdks/java/docs/MetadataSearchSortOptions.md b/sdks/java/docs/MetadataSearchSortOptions.md new file mode 100644 index 000000000..1dec1296c --- /dev/null +++ b/sdks/java/docs/MetadataSearchSortOptions.md @@ -0,0 +1,43 @@ + + +# MetadataSearchSortOptions + +Sort options. + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**fieldName** | [**FieldNameEnum**](#FieldNameEnum) | Name of the field to apply the sort on. | [optional] | +|**order** | [**OrderEnum**](#OrderEnum) | Sort order : ASC(Ascending) or DESC(Descending). | [optional] | + + + +## Enum: FieldNameEnum + +| Name | Value | +|---- | -----| +| NAME | "NAME" | +| DISPLAY_NAME | "DISPLAY_NAME" | +| AUTHOR | "AUTHOR" | +| CREATED | "CREATED" | +| MODIFIED | "MODIFIED" | +| VIEWS | "VIEWS" | +| FAVORITES | "FAVORITES" | +| LAST_ACCESSED | "LAST_ACCESSED" | + + + +## Enum: OrderEnum + +| Name | Value | +|---- | -----| +| ASC | "ASC" | +| DESC | "DESC" | + + +## Implemented Interfaces + +* Serializable + + diff --git a/sdks/java/docs/ModelTableList.md b/sdks/java/docs/ModelTableList.md new file mode 100644 index 000000000..719ebd62d --- /dev/null +++ b/sdks/java/docs/ModelTableList.md @@ -0,0 +1,19 @@ + + +# ModelTableList + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**modelName** | **String** | Name of the Model. | | +|**modelPath** | **String** | Model directory path, this is optional param and required if there are duplicate models with the same name. | [optional] | +|**tables** | **List<String>** | List of Tables. | | + + +## Implemented Interfaces + +* Serializable + + diff --git a/sdks/java/docs/NLInstructionsInfo.md b/sdks/java/docs/NLInstructionsInfo.md new file mode 100644 index 000000000..e781721a1 --- /dev/null +++ b/sdks/java/docs/NLInstructionsInfo.md @@ -0,0 +1,26 @@ + + +# NLInstructionsInfo + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**instructions** | **List<String>** | User instructions for natural language processing. | | +|**scope** | [**ScopeEnum**](#ScopeEnum) | Scope of the instruction. | | + + + +## Enum: ScopeEnum + +| Name | Value | +|---- | -----| +| GLOBAL | "GLOBAL" | + + +## Implemented Interfaces + +* Serializable + + diff --git a/sdks/java/docs/NLInstructionsInfoInput.md b/sdks/java/docs/NLInstructionsInfoInput.md new file mode 100644 index 000000000..5d8acffd2 --- /dev/null +++ b/sdks/java/docs/NLInstructionsInfoInput.md @@ -0,0 +1,26 @@ + + +# NLInstructionsInfoInput + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**instructions** | **List<String>** | User instructions for natural language processing. | | +|**scope** | [**ScopeEnum**](#ScopeEnum) | Scope of the instruction (USER or GLOBAL). Defaults to GLOBAL. | | + + + +## Enum: ScopeEnum + +| Name | Value | +|---- | -----| +| GLOBAL | "GLOBAL" | + + +## Implemented Interfaces + +* Serializable + + diff --git a/sdks/java/docs/ObjectIDAndName.md b/sdks/java/docs/ObjectIDAndName.md new file mode 100644 index 000000000..296901d58 --- /dev/null +++ b/sdks/java/docs/ObjectIDAndName.md @@ -0,0 +1,19 @@ + + +# ObjectIDAndName + +The object representation with ID and Name. + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**id** | **String** | The unique identifier of the object. | [optional] | +|**name** | **String** | Name of the object. | [optional] | + + +## Implemented Interfaces + +* Serializable + + diff --git a/sdks/java/docs/ObjectPrivilegesMetadataInput.md b/sdks/java/docs/ObjectPrivilegesMetadataInput.md new file mode 100644 index 000000000..cd43f7fd4 --- /dev/null +++ b/sdks/java/docs/ObjectPrivilegesMetadataInput.md @@ -0,0 +1,26 @@ + + +# ObjectPrivilegesMetadataInput + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**type** | [**TypeEnum**](#TypeEnum) | Type of metadata object. Required if the name of the object is set as the identifier. This attribute is optional when the object GUID is specified as the identifier. | [optional] | +|**identifier** | **String** | Unique ID or name of the metadata object. | | + + + +## Enum: TypeEnum + +| Name | Value | +|---- | -----| +| LOGICAL_TABLE | "LOGICAL_TABLE" | + + +## Implemented Interfaces + +* Serializable + + diff --git a/sdks/java/docs/ObjectPrivilegesOfMetadataResponse.md b/sdks/java/docs/ObjectPrivilegesOfMetadataResponse.md new file mode 100644 index 000000000..3022002bb --- /dev/null +++ b/sdks/java/docs/ObjectPrivilegesOfMetadataResponse.md @@ -0,0 +1,17 @@ + + +# ObjectPrivilegesOfMetadataResponse + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**metadataObjectPrivileges** | **Object** | | [optional] | + + +## Implemented Interfaces + +* Serializable + + diff --git a/sdks/java/docs/Org.md b/sdks/java/docs/Org.md new file mode 100644 index 000000000..32122c2c1 --- /dev/null +++ b/sdks/java/docs/Org.md @@ -0,0 +1,19 @@ + + +# Org + +The current Org context of the user. + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**id** | **Integer** | The ID of the object. | | +|**name** | **String** | Name of the object. | | + + +## Implemented Interfaces + +* Serializable + + diff --git a/sdks/java/docs/OrgChannelConfigInput.md b/sdks/java/docs/OrgChannelConfigInput.md new file mode 100644 index 000000000..5be89c869 --- /dev/null +++ b/sdks/java/docs/OrgChannelConfigInput.md @@ -0,0 +1,37 @@ + + +# OrgChannelConfigInput + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**orgIdentifier** | **String** | Unique identifier or name of the org | | +|**operation** | [**OperationEnum**](#OperationEnum) | Operation to perform. REPLACE: Update preferences (default). RESET: Remove org-specific configurations, causing fallback to cluster-level preferences. | [optional] | +|**preferences** | [**List<EventChannelConfigInput>**](EventChannelConfigInput.md) | Event-specific configurations. Required for REPLACE operation. | [optional] | +|**resetEvents** | [**List<ResetEventsEnum>**](#List<ResetEventsEnum>) | Event types to reset. Required for RESET operation. Org-specific configurations for these events will be removed, causing fallback to cluster-level preferences. | [optional] | + + + +## Enum: OperationEnum + +| Name | Value | +|---- | -----| +| REPLACE | "REPLACE" | +| RESET | "RESET" | + + + +## Enum: List<ResetEventsEnum> + +| Name | Value | +|---- | -----| +| LIVEBOARD_SCHEDULE | "LIVEBOARD_SCHEDULE" | + + +## Implemented Interfaces + +* Serializable + + diff --git a/sdks/java/docs/OrgChannelConfigResponse.md b/sdks/java/docs/OrgChannelConfigResponse.md new file mode 100644 index 000000000..77dbbb45b --- /dev/null +++ b/sdks/java/docs/OrgChannelConfigResponse.md @@ -0,0 +1,18 @@ + + +# OrgChannelConfigResponse + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**org** | [**OrgDetails**](OrgDetails.md) | | | +|**preferences** | [**List<EventChannelConfig>**](EventChannelConfig.md) | Event-specific communication channel configurations for this org | | + + +## Implemented Interfaces + +* Serializable + + diff --git a/sdks/java/docs/OrgDetails.md b/sdks/java/docs/OrgDetails.md new file mode 100644 index 000000000..0e22f8f2f --- /dev/null +++ b/sdks/java/docs/OrgDetails.md @@ -0,0 +1,18 @@ + + +# OrgDetails + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**id** | **String** | Unique id of the org | | +|**name** | **String** | Name of the org | | + + +## Implemented Interfaces + +* Serializable + + diff --git a/sdks/java/docs/OrgInfo.md b/sdks/java/docs/OrgInfo.md new file mode 100644 index 000000000..d21317487 --- /dev/null +++ b/sdks/java/docs/OrgInfo.md @@ -0,0 +1,18 @@ + + +# OrgInfo + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**id** | **Integer** | Id. | | +|**name** | **String** | Name. | [optional] | + + +## Implemented Interfaces + +* Serializable + + diff --git a/sdks/java/docs/OrgNonEmbedAccess.md b/sdks/java/docs/OrgNonEmbedAccess.md new file mode 100644 index 000000000..ff6d6b7c0 --- /dev/null +++ b/sdks/java/docs/OrgNonEmbedAccess.md @@ -0,0 +1,19 @@ + + +# OrgNonEmbedAccess + +Org-level non-embed access configuration. + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**blockFullAppAccess** | **Boolean** | Block full application access for non-embedded usage. | [optional] | +|**groupsWithAccess** | [**List<GroupInfo>**](GroupInfo.md) | Groups that have non-embed full app access. | [optional] | + + +## Implemented Interfaces + +* Serializable + + diff --git a/sdks/java/docs/OrgNonEmbedAccessInput.md b/sdks/java/docs/OrgNonEmbedAccessInput.md new file mode 100644 index 000000000..1aec1e0e9 --- /dev/null +++ b/sdks/java/docs/OrgNonEmbedAccessInput.md @@ -0,0 +1,19 @@ + + +# OrgNonEmbedAccessInput + +Input for org-level non-embed access configuration. + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**blockFullAppAccess** | **Boolean** | Block full application access for non-embedded usage. | [optional] | +|**groupsIdentifiersWithAccess** | **List<String>** | Group identifiers that are allowed non-embed full app access. Can only be set if block_full_app_access is true. | [optional] | + + +## Implemented Interfaces + +* Serializable + + diff --git a/sdks/java/docs/OrgPreferenceSearchCriteriaInput.md b/sdks/java/docs/OrgPreferenceSearchCriteriaInput.md new file mode 100644 index 000000000..8c842c00f --- /dev/null +++ b/sdks/java/docs/OrgPreferenceSearchCriteriaInput.md @@ -0,0 +1,26 @@ + + +# OrgPreferenceSearchCriteriaInput + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**orgIdentifier** | **String** | Unique identifier or name of the org | | +|**eventTypes** | [**List<EventTypesEnum>**](#List<EventTypesEnum>) | Event types to search for. If not provided, all event types for this org are returned. | [optional] | + + + +## Enum: List<EventTypesEnum> + +| Name | Value | +|---- | -----| +| LIVEBOARD_SCHEDULE | "LIVEBOARD_SCHEDULE" | + + +## Implemented Interfaces + +* Serializable + + diff --git a/sdks/java/docs/OrgResponse.md b/sdks/java/docs/OrgResponse.md new file mode 100644 index 000000000..072e49dbd --- /dev/null +++ b/sdks/java/docs/OrgResponse.md @@ -0,0 +1,39 @@ + + +# OrgResponse + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**id** | **Integer** | Unique identifier of the Org. | [optional] | +|**name** | **String** | Name of the Org. | [optional] | +|**status** | [**StatusEnum**](#StatusEnum) | Status of the Org. | [optional] | +|**description** | **String** | Description of the Org. | [optional] | +|**visibility** | [**VisibilityEnum**](#VisibilityEnum) | Visibility of the Org. | [optional] | + + + +## Enum: StatusEnum + +| Name | Value | +|---- | -----| +| ACTIVE | "ACTIVE" | +| IN_ACTIVE | "IN_ACTIVE" | + + + +## Enum: VisibilityEnum + +| Name | Value | +|---- | -----| +| SHOW | "SHOW" | +| HIDDEN | "HIDDEN" | + + +## Implemented Interfaces + +* Serializable + + diff --git a/sdks/java/docs/OrgType.md b/sdks/java/docs/OrgType.md new file mode 100644 index 000000000..0addf4c1d --- /dev/null +++ b/sdks/java/docs/OrgType.md @@ -0,0 +1,18 @@ + + +# OrgType + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**name** | **String** | | [optional] | +|**id** | **Integer** | | [optional] | + + +## Implemented Interfaces + +* Serializable + + diff --git a/sdks/java/docs/OrgsApi.md b/sdks/java/docs/OrgsApi.md new file mode 100644 index 000000000..3ba591f30 --- /dev/null +++ b/sdks/java/docs/OrgsApi.md @@ -0,0 +1,157 @@ +# OrgsApi + +All URIs are relative to *CLUSTER_URL* + +| Method | HTTP request | +|------------- | ------------- | +| [**createOrg**](OrgsApi.md#createOrg) | **POST** /api/rest/2.0/orgs/create | +| [**deleteOrg**](OrgsApi.md#deleteOrg) | **POST** /api/rest/2.0/orgs/{org_identifier}/delete | +| [**searchOrgs**](OrgsApi.md#searchOrgs) | **POST** /api/rest/2.0/orgs/search | +| [**updateOrg**](OrgsApi.md#updateOrg) | **POST** /api/rest/2.0/orgs/{org_identifier}/update | + + + +# **createOrg** +> OrgResponse createOrg(createOrgRequest) + + + + Version: 9.0.0.cl or later Creates an Org object. To use this API, the [Orgs](https://docs.thoughtspot.com/cloud/latest/orgs-overview) feature must be enabled in your cluster. Requires cluster administration (**Can administer Org**) privileges. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `ORG_ADMINISTRATION` (**Can manage Orgs**) privilege is required. + +### Parameters + +| Name | Type | +|------------- | ------------- | +| **createOrgRequest** | [**CreateOrgRequest**](CreateOrgRequest.md) + +### Return type + +[**OrgResponse**](OrgResponse.md) + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Organization successfully created. | - | +| **400** | Invalid request. | - | +| **401** | Unauthorized access. | - | +| **403** | Forbidden access. | - | +| **500** | Unexpected error | - | + + +# **deleteOrg** +> deleteOrg(orgIdentifier) + + + + Version: 9.0.0.cl or later Deletes an Org object from the ThoughtSpot system. Requires cluster administration (**Can administer Org**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `ORG_ADMINISTRATION` (**Can manage Orgs**) privilege is required. When you delete an Org, all its users and objects created in that Org context are removed. However, if the users in the deleted Org also exists in other Orgs, they are removed only from the deleted Org. + +### Parameters + +| Name | Type | +|------------- | ------------- | +| **orgIdentifier** | **String** + +### Return type + +null (empty response body) + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **204** | Organization successfully deleted. | - | +| **400** | Invalid request. | - | +| **401** | Unauthorized access. | - | +| **403** | Forbidden access. | - | +| **500** | Unexpected error | - | + + +# **searchOrgs** +> List<OrgResponse> searchOrgs(searchOrgsRequest) + + + + Version: 9.0.0.cl or later Gets a list of Orgs configured on the ThoughtSpot system. To get details of a specific Org, specify the Org ID or name. You can also pass parameters such as status, visibility, and user identifiers to get a specific list of Orgs. Requires cluster administration (**Can administer Org**) privileges. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `ORG_ADMINISTRATION` (**Can manage Orgs**) privilege is required. + +### Parameters + +| Name | Type | +|------------- | ------------- | +| **searchOrgsRequest** | [**SearchOrgsRequest**](SearchOrgsRequest.md) + +### Return type + +[**List<OrgResponse>**](OrgResponse.md) + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Organization search result. | - | +| **400** | Invalid request. | - | +| **401** | Unauthorized access. | - | +| **403** | Forbidden access. | - | +| **500** | Unexpected error | - | + + +# **updateOrg** +> updateOrg(orgIdentifier, updateOrgRequest) + + + + Version: 9.0.0.cl or later Updates an Org object. You can modify Org properties such as name, description, and user associations. Requires cluster administration (**Can administer Org**) privileges. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `ORG_ADMINISTRATION` (**Can manage Orgs**) privilege is required. + +### Parameters + +| Name | Type | +|------------- | ------------- | +| **orgIdentifier** | **String** +| **updateOrgRequest** | [**UpdateOrgRequest**](UpdateOrgRequest.md) + +### Return type + +null (empty response body) + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **204** | Organization successfully updated. | - | +| **400** | Invalid request. | - | +| **401** | Unauthorized access. | - | +| **403** | Forbidden access. | - | +| **500** | Unexpected error | - | + diff --git a/sdks/java/docs/ParameterValues.md b/sdks/java/docs/ParameterValues.md new file mode 100644 index 000000000..4f07a3aa7 --- /dev/null +++ b/sdks/java/docs/ParameterValues.md @@ -0,0 +1,19 @@ + + +# ParameterValues + +Filter Rules to be applied on Objects. + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**name** | **String** | The name of the column to apply the filter on. | | +|**values** | **List<Object>** | The values to filter on. Only single value is supported currently. | | + + +## Implemented Interfaces + +* Serializable + + diff --git a/sdks/java/docs/ParameterizeMetadataFieldsRequest.md b/sdks/java/docs/ParameterizeMetadataFieldsRequest.md new file mode 100644 index 000000000..58929cd14 --- /dev/null +++ b/sdks/java/docs/ParameterizeMetadataFieldsRequest.md @@ -0,0 +1,40 @@ + + +# ParameterizeMetadataFieldsRequest + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**metadataType** | [**MetadataTypeEnum**](#MetadataTypeEnum) | Type of metadata object to parameterize. | [optional] | +|**metadataIdentifier** | **String** | Unique ID or name of the metadata object to parameterize. | | +|**fieldType** | [**FieldTypeEnum**](#FieldTypeEnum) | Type of field in the metadata to parameterize. | | +|**fieldNames** | **List<String>** | JSON array of field names to parameterize. Example: [schemaName, databaseName, tableName] | | +|**variableIdentifier** | **String** | Unique ID or name of the variable to use for parameterization of these fields. | | + + + +## Enum: MetadataTypeEnum + +| Name | Value | +|---- | -----| +| LOGICAL_TABLE | "LOGICAL_TABLE" | +| CONNECTION | "CONNECTION" | +| CONNECTION_CONFIG | "CONNECTION_CONFIG" | + + + +## Enum: FieldTypeEnum + +| Name | Value | +|---- | -----| +| ATTRIBUTE | "ATTRIBUTE" | +| CONNECTION_PROPERTY | "CONNECTION_PROPERTY" | + + +## Implemented Interfaces + +* Serializable + + diff --git a/sdks/java/docs/ParameterizeMetadataRequest.md b/sdks/java/docs/ParameterizeMetadataRequest.md new file mode 100644 index 000000000..296532add --- /dev/null +++ b/sdks/java/docs/ParameterizeMetadataRequest.md @@ -0,0 +1,40 @@ + + +# ParameterizeMetadataRequest + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**metadataType** | [**MetadataTypeEnum**](#MetadataTypeEnum) | Type of metadata object to parameterize. | [optional] | +|**metadataIdentifier** | **String** | Unique ID or name of the metadata object to parameterize. | | +|**fieldType** | [**FieldTypeEnum**](#FieldTypeEnum) | Type of field in the metadata to parameterize. | | +|**fieldName** | **String** | Name of the field which needs to be parameterized. | | +|**variableIdentifier** | **String** | Unique ID or name of the variable to use for parameterization | | + + + +## Enum: MetadataTypeEnum + +| Name | Value | +|---- | -----| +| LOGICAL_TABLE | "LOGICAL_TABLE" | +| CONNECTION | "CONNECTION" | +| CONNECTION_CONFIG | "CONNECTION_CONFIG" | + + + +## Enum: FieldTypeEnum + +| Name | Value | +|---- | -----| +| ATTRIBUTE | "ATTRIBUTE" | +| CONNECTION_PROPERTY | "CONNECTION_PROPERTY" | + + +## Implemented Interfaces + +* Serializable + + diff --git a/sdks/java/docs/ParametersListItem.md b/sdks/java/docs/ParametersListItem.md new file mode 100644 index 000000000..bb142b60c --- /dev/null +++ b/sdks/java/docs/ParametersListItem.md @@ -0,0 +1,18 @@ + + +# ParametersListItem + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**key** | **String** | Key for the url query parameter | [optional] | +|**value** | **String** | Value for the url query parameter | [optional] | + + +## Implemented Interfaces + +* Serializable + + diff --git a/sdks/java/docs/ParametersListItemInput.md b/sdks/java/docs/ParametersListItemInput.md new file mode 100644 index 000000000..54926075e --- /dev/null +++ b/sdks/java/docs/ParametersListItemInput.md @@ -0,0 +1,18 @@ + + +# ParametersListItemInput + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**key** | **String** | Key for the url query parameter | [optional] | +|**value** | **String** | Value for the url query parameter | [optional] | + + +## Implemented Interfaces + +* Serializable + + diff --git a/sdks/java/docs/PdfOptions.md b/sdks/java/docs/PdfOptions.md new file mode 100644 index 000000000..0fc8b45cf --- /dev/null +++ b/sdks/java/docs/PdfOptions.md @@ -0,0 +1,35 @@ + + +# PdfOptions + +Options for PDF export. + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**completeLiveboard** | **Boolean** | Indicates whether to include complete Liveboard. | [optional] | +|**includeCoverPage** | **Boolean** | Indicates whether to include cover page with the Liveboard title. | [optional] | +|**includeCustomLogo** | **Boolean** | Indicates whether to include customized wide logo in the footer if available. | [optional] | +|**includeFilterPage** | **Boolean** | Indicates whether to include a page with all applied filters. | [optional] | +|**includePageNumber** | **Boolean** | Indicates whether to include page number in the footer of each page | [optional] | +|**pageFooterText** | **String** | Text to include in the footer of each page. | [optional] | +|**pageOrientation** | **String** | Page orientation of the PDF. | [optional] | +|**pageSize** | [**PageSizeEnum**](#PageSizeEnum) | Page size. | [optional] | +|**truncateTable** | **Boolean** | Indicates whether to include only first page of the tables. | [optional] | + + + +## Enum: PageSizeEnum + +| Name | Value | +|---- | -----| +| A4 | "A4" | +| TAB_BASED | "TAB_BASED" | + + +## Implemented Interfaces + +* Serializable + + diff --git a/sdks/java/docs/PdfOptionsInput.md b/sdks/java/docs/PdfOptionsInput.md new file mode 100644 index 000000000..251d97bbf --- /dev/null +++ b/sdks/java/docs/PdfOptionsInput.md @@ -0,0 +1,43 @@ + + +# PdfOptionsInput + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**pageSize** | [**PageSizeEnum**](#PageSizeEnum) | Size of PDF page. `A4` generates a paginated A4 PDF. `CONTINUOUS` generates a continuous PDF that matches the Liveboard layout. Each Liveboard tab has its own page of variable length. Defaults to `A4` if not specified. Version: 26.5.0.cl or later | [optional] | +|**zoomLevel** | **Integer** | Zoom level percentage for the PDF. Only applicable when `page_size` is `CONTINUOUS`. Acceptable values are integers in the range [45, 175]. Defaults to 100 if not specified. Version: 26.5.0.cl or later | [optional] | +|**includeCoverPage** | **Boolean** | Indicates whether to include the cover page with the Liveboard title. | [optional] | +|**includeCustomLogo** | **Boolean** | Indicates whether to include customized wide logo in the footer if available. | [optional] | +|**includeFilterPage** | **Boolean** | Indicates whether to include a page with all applied filters. For `CONTINUOUS` page_size, this parameter indicates whether to include the filter header. | [optional] | +|**includePageNumber** | **Boolean** | Indicates whether to include page number in the footer of each page. | [optional] | +|**pageOrientation** | [**PageOrientationEnum**](#PageOrientationEnum) | Page orientation of the PDF. | [optional] | +|**truncateTable** | **Boolean** | Indicates whether to include only the first page of the tables. | [optional] | +|**pageFooterText** | **String** | Text to include in the footer of each page. | [optional] | + + + +## Enum: PageSizeEnum + +| Name | Value | +|---- | -----| +| A4 | "A4" | +| CONTINUOUS | "CONTINUOUS" | + + + +## Enum: PageOrientationEnum + +| Name | Value | +|---- | -----| +| PORTRAIT | "PORTRAIT" | +| LANDSCAPE | "LANDSCAPE" | + + +## Implemented Interfaces + +* Serializable + + diff --git a/sdks/java/docs/PermissionInput.md b/sdks/java/docs/PermissionInput.md new file mode 100644 index 000000000..522ed3146 --- /dev/null +++ b/sdks/java/docs/PermissionInput.md @@ -0,0 +1,29 @@ + + +# PermissionInput + +Details of users or groups. + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**principal** | [**PrincipalsInput**](PrincipalsInput.md) | | | +|**shareMode** | [**ShareModeEnum**](#ShareModeEnum) | Object share mode. | | + + + +## Enum: ShareModeEnum + +| Name | Value | +|---- | -----| +| READ_ONLY | "READ_ONLY" | +| MODIFY | "MODIFY" | +| NO_ACCESS | "NO_ACCESS" | + + +## Implemented Interfaces + +* Serializable + + diff --git a/sdks/java/docs/PermissionOfMetadataResponse.md b/sdks/java/docs/PermissionOfMetadataResponse.md new file mode 100644 index 000000000..113e7616c --- /dev/null +++ b/sdks/java/docs/PermissionOfMetadataResponse.md @@ -0,0 +1,17 @@ + + +# PermissionOfMetadataResponse + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**metadataPermissionDetails** | **Object** | | [optional] | + + +## Implemented Interfaces + +* Serializable + + diff --git a/sdks/java/docs/PermissionOfPrincipalsResponse.md b/sdks/java/docs/PermissionOfPrincipalsResponse.md new file mode 100644 index 000000000..0d5536aba --- /dev/null +++ b/sdks/java/docs/PermissionOfPrincipalsResponse.md @@ -0,0 +1,17 @@ + + +# PermissionOfPrincipalsResponse + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**principalPermissionDetails** | **Object** | | [optional] | + + +## Implemented Interfaces + +* Serializable + + diff --git a/sdks/java/docs/PermissionsMetadataTypeInput.md b/sdks/java/docs/PermissionsMetadataTypeInput.md new file mode 100644 index 000000000..e5ffe4e98 --- /dev/null +++ b/sdks/java/docs/PermissionsMetadataTypeInput.md @@ -0,0 +1,32 @@ + + +# PermissionsMetadataTypeInput + +MetadataType InputType used in Permission API's + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**type** | [**TypeEnum**](#TypeEnum) | Type of metadata object. Required if the name of the object is set as the identifier. This attribute is optional when the object GUID is specified as the identifier. | [optional] | +|**identifier** | **String** | Unique ID or name of the metadata object. | | + + + +## Enum: TypeEnum + +| Name | Value | +|---- | -----| +| LIVEBOARD | "LIVEBOARD" | +| ANSWER | "ANSWER" | +| LOGICAL_TABLE | "LOGICAL_TABLE" | +| LOGICAL_COLUMN | "LOGICAL_COLUMN" | +| CONNECTION | "CONNECTION" | +| COLLECTION | "COLLECTION" | + + +## Implemented Interfaces + +* Serializable + + diff --git a/sdks/java/docs/PngOptionsInput.md b/sdks/java/docs/PngOptionsInput.md new file mode 100644 index 000000000..cde174b93 --- /dev/null +++ b/sdks/java/docs/PngOptionsInput.md @@ -0,0 +1,22 @@ + + +# PngOptionsInput + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**includeCoverPage** | **Boolean** | Indicates whether to include the cover page with the Liveboard title. | [optional] | +|**includeFilterPage** | **Boolean** | Indicates whether to include a page with all applied filters. | [optional] | +|**personalisedViewId** | **String** | Indicates personalised view of the Liveboard in case of png | [optional] | +|**imageResolution** | **Integer** | Desired width of the Liveboard image in pixels. Ex. 1920 for Full HD image Version: 10.9.0.cl or later | [optional] | +|**imageScale** | **Integer** | The scale of the image in percentage. Ex. 100 for 100% scale. Version: 10.9.0.cl or later | [optional] | +|**includeHeader** | **Boolean** | Indicates whether to include the header of the liveboard. Version: 10.9.0.cl or later | [optional] | + + +## Implemented Interfaces + +* Serializable + + diff --git a/sdks/java/docs/PolicyProcessOptions.md b/sdks/java/docs/PolicyProcessOptions.md new file mode 100644 index 000000000..73eccfced --- /dev/null +++ b/sdks/java/docs/PolicyProcessOptions.md @@ -0,0 +1,17 @@ + + +# PolicyProcessOptions + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**impersonateUser** | **String** | | [optional] | + + +## Implemented Interfaces + +* Serializable + + diff --git a/sdks/java/docs/PolicyProcessOptionsInput.md b/sdks/java/docs/PolicyProcessOptionsInput.md new file mode 100644 index 000000000..e7ebc5d3c --- /dev/null +++ b/sdks/java/docs/PolicyProcessOptionsInput.md @@ -0,0 +1,17 @@ + + +# PolicyProcessOptionsInput + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**impersonateUser** | **String** | | [optional] | + + +## Implemented Interfaces + +* Serializable + + diff --git a/sdks/java/docs/PrincipalsInput.md b/sdks/java/docs/PrincipalsInput.md new file mode 100644 index 000000000..a7b1da1d1 --- /dev/null +++ b/sdks/java/docs/PrincipalsInput.md @@ -0,0 +1,27 @@ + + +# PrincipalsInput + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**identifier** | **String** | Unique ID or name of the principal object such as a user or group. | | +|**type** | [**TypeEnum**](#TypeEnum) | Principal type. | [optional] | + + + +## Enum: TypeEnum + +| Name | Value | +|---- | -----| +| USER | "USER" | +| USER_GROUP | "USER_GROUP" | + + +## Implemented Interfaces + +* Serializable + + diff --git a/sdks/java/docs/PrincipalsListItem.md b/sdks/java/docs/PrincipalsListItem.md new file mode 100644 index 000000000..c272cbc20 --- /dev/null +++ b/sdks/java/docs/PrincipalsListItem.md @@ -0,0 +1,18 @@ + + +# PrincipalsListItem + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**identifier** | **String** | Unique ID or name of the user or group. | | +|**type** | **String** | Principal type. Valid values are | | + + +## Implemented Interfaces + +* Serializable + + diff --git a/sdks/java/docs/PrincipalsListItemInput.md b/sdks/java/docs/PrincipalsListItemInput.md new file mode 100644 index 000000000..eded10a64 --- /dev/null +++ b/sdks/java/docs/PrincipalsListItemInput.md @@ -0,0 +1,18 @@ + + +# PrincipalsListItemInput + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**identifier** | **String** | Unique ID or name of the user or group. | | +|**type** | **String** | Principal type. | | + + +## Implemented Interfaces + +* Serializable + + diff --git a/sdks/java/docs/PublishMetadataListItem.md b/sdks/java/docs/PublishMetadataListItem.md new file mode 100644 index 000000000..9f48cdb95 --- /dev/null +++ b/sdks/java/docs/PublishMetadataListItem.md @@ -0,0 +1,28 @@ + + +# PublishMetadataListItem + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**identifier** | **String** | Unique ID or name of the metadata. | | +|**type** | [**TypeEnum**](#TypeEnum) | Type of metadata. Required if identifier is name. | [optional] | + + + +## Enum: TypeEnum + +| Name | Value | +|---- | -----| +| LIVEBOARD | "LIVEBOARD" | +| ANSWER | "ANSWER" | +| LOGICAL_TABLE | "LOGICAL_TABLE" | + + +## Implemented Interfaces + +* Serializable + + diff --git a/sdks/java/docs/PublishMetadataRequest.md b/sdks/java/docs/PublishMetadataRequest.md new file mode 100644 index 000000000..ef47dd109 --- /dev/null +++ b/sdks/java/docs/PublishMetadataRequest.md @@ -0,0 +1,19 @@ + + +# PublishMetadataRequest + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**metadata** | [**List<PublishMetadataListItem>**](PublishMetadataListItem.md) | Metadata objects to be published. | | +|**orgIdentifiers** | **List<String>** | Unique ID or name of orgs to which metadata objects should be published. | | +|**skipValidation** | **Boolean** | Skip validations of objects to be published. | [optional] | + + +## Implemented Interfaces + +* Serializable + + diff --git a/sdks/java/docs/PutVariableValuesRequest.md b/sdks/java/docs/PutVariableValuesRequest.md new file mode 100644 index 000000000..54fe19689 --- /dev/null +++ b/sdks/java/docs/PutVariableValuesRequest.md @@ -0,0 +1,29 @@ + + +# PutVariableValuesRequest + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**operation** | [**OperationEnum**](#OperationEnum) | Operation to perform | [optional] | +|**variableAssignment** | [**List<VariablePutAssignmentInput>**](VariablePutAssignmentInput.md) | Variable assignments | | + + + +## Enum: OperationEnum + +| Name | Value | +|---- | -----| +| ADD | "ADD" | +| REMOVE | "REMOVE" | +| REPLACE | "REPLACE" | +| RESET | "RESET" | + + +## Implemented Interfaces + +* Serializable + + diff --git a/sdks/java/docs/QueryGetDecomposedQueryRequest.md b/sdks/java/docs/QueryGetDecomposedQueryRequest.md new file mode 100644 index 000000000..742226878 --- /dev/null +++ b/sdks/java/docs/QueryGetDecomposedQueryRequest.md @@ -0,0 +1,23 @@ + + +# QueryGetDecomposedQueryRequest + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**answerIds** | **List<String>** | List of answer unique identifiers (GUIDs) whose data will be used to guide the response. | [optional] | +|**content** | **List<String>** | User provided content like text data, csv data as a string message to provide context & potentially improve the quality of the response. | [optional] | +|**conversationId** | **String** | Unique identifier to denote current conversation. | [optional] | +|**liveboardIds** | **List<String>** | List of liveboard unique identifiers (GUIDs) whose data will be used to guide the response. | [optional] | +|**maxDecomposedQueries** | **Integer** | Maximum number of decomposed queries that is allowed in the response, default = 5. | [optional] | +|**nlsRequest** | [**InputEurekaNLSRequest**](InputEurekaNLSRequest.md) | NLSRequest object containing user query & instructions. | [optional] | +|**worksheetIds** | **List<String>** | List of worksheetIds to provide context for decomposing user query into analytical queries that can be run on them. | [optional] | + + +## Implemented Interfaces + +* Serializable + + diff --git a/sdks/java/docs/RecipientDetails.md b/sdks/java/docs/RecipientDetails.md new file mode 100644 index 000000000..4ba1c1fa0 --- /dev/null +++ b/sdks/java/docs/RecipientDetails.md @@ -0,0 +1,19 @@ + + +# RecipientDetails + +Recipient configuration which includes email address, ID or name of the users and groups. + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**emails** | **List<String>** | Emails of the recipients. Specify email address if the recipient is not a ThoughtSpot user. | [optional] | +|**principals** | [**List<PrincipalsListItem>**](PrincipalsListItem.md) | List of user or groups to subscribe for the scheduled job notifications. | [optional] | + + +## Implemented Interfaces + +* Serializable + + diff --git a/sdks/java/docs/RecipientDetailsInput.md b/sdks/java/docs/RecipientDetailsInput.md new file mode 100644 index 000000000..61c2c5946 --- /dev/null +++ b/sdks/java/docs/RecipientDetailsInput.md @@ -0,0 +1,19 @@ + + +# RecipientDetailsInput + +Recipients of the scheduled job notification. + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**emails** | **List<String>** | Emails of the recipients. | [optional] | +|**principals** | [**List<PrincipalsListItemInput>**](PrincipalsListItemInput.md) | User or groups to be set as recipients of the schedule notifications. | [optional] | + + +## Implemented Interfaces + +* Serializable + + diff --git a/sdks/java/docs/RegionalSettingsInput.md b/sdks/java/docs/RegionalSettingsInput.md new file mode 100644 index 000000000..de3098ee4 --- /dev/null +++ b/sdks/java/docs/RegionalSettingsInput.md @@ -0,0 +1,363 @@ + + +# RegionalSettingsInput + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**currencyFormat** | [**CurrencyFormatEnum**](#CurrencyFormatEnum) | ISO code to be appended with currency values. | [optional] | +|**userLocale** | [**UserLocaleEnum**](#UserLocaleEnum) | Indicates the locale to be used for all formattings. | [optional] | +|**numberFormatLocale** | [**NumberFormatLocaleEnum**](#NumberFormatLocaleEnum) | Indicates the locale to be used for number formatting. | [optional] | +|**dateFormatLocale** | [**DateFormatLocaleEnum**](#DateFormatLocaleEnum) | Indicates the locale to be used for date formatting. | [optional] | + + + +## Enum: CurrencyFormatEnum + +| Name | Value | +|---- | -----| +| ADP | "ADP" | +| AED | "AED" | +| AFN | "AFN" | +| ALL | "ALL" | +| AMD | "AMD" | +| ANG | "ANG" | +| AOA | "AOA" | +| ARA | "ARA" | +| ARS | "ARS" | +| ATS | "ATS" | +| AUD | "AUD" | +| AWG | "AWG" | +| AZN | "AZN" | +| BAM | "BAM" | +| BBD | "BBD" | +| BDT | "BDT" | +| BEF | "BEF" | +| BGL | "BGL" | +| BGM | "BGM" | +| BGN | "BGN" | +| BHD | "BHD" | +| BIF | "BIF" | +| BMD | "BMD" | +| BND | "BND" | +| BOB | "BOB" | +| BOP | "BOP" | +| BOV | "BOV" | +| BRL | "BRL" | +| BSD | "BSD" | +| BTN | "BTN" | +| BUK | "BUK" | +| BWP | "BWP" | +| BYN | "BYN" | +| BZD | "BZD" | +| CAD | "CAD" | +| CDF | "CDF" | +| CHE | "CHE" | +| CHF | "CHF" | +| CHW | "CHW" | +| CLE | "CLE" | +| CLP | "CLP" | +| CNX | "CNX" | +| CNY | "CNY" | +| COP | "COP" | +| COU | "COU" | +| CRC | "CRC" | +| CSK | "CSK" | +| CUC | "CUC" | +| CUP | "CUP" | +| CVE | "CVE" | +| CYP | "CYP" | +| CZK | "CZK" | +| DDM | "DDM" | +| DEM | "DEM" | +| DJF | "DJF" | +| DKK | "DKK" | +| DOP | "DOP" | +| DZD | "DZD" | +| ECS | "ECS" | +| ECV | "ECV" | +| EEK | "EEK" | +| EGP | "EGP" | +| ERN | "ERN" | +| ESP | "ESP" | +| ETB | "ETB" | +| EUR | "EUR" | +| FIM | "FIM" | +| FJD | "FJD" | +| FKP | "FKP" | +| FRF | "FRF" | +| GBP | "GBP" | +| GEK | "GEK" | +| GEL | "GEL" | +| GHS | "GHS" | +| GIP | "GIP" | +| GMD | "GMD" | +| GNF | "GNF" | +| GNS | "GNS" | +| GQE | "GQE" | +| GRD | "GRD" | +| GTQ | "GTQ" | +| GWE | "GWE" | +| GWP | "GWP" | +| GYD | "GYD" | +| HKD | "HKD" | +| HNL | "HNL" | +| HRD | "HRD" | +| HRK | "HRK" | +| HTG | "HTG" | +| HUF | "HUF" | +| IDR | "IDR" | +| IEP | "IEP" | +| ILP | "ILP" | +| ILS | "ILS" | +| INR | "INR" | +| IQD | "IQD" | +| IRR | "IRR" | +| ISK | "ISK" | +| ITL | "ITL" | +| JMD | "JMD" | +| JOD | "JOD" | +| JPY | "JPY" | +| KES | "KES" | +| KGS | "KGS" | +| KHR | "KHR" | +| KMF | "KMF" | +| KPW | "KPW" | +| KRW | "KRW" | +| KWD | "KWD" | +| KYD | "KYD" | +| KZT | "KZT" | +| LAK | "LAK" | +| LBP | "LBP" | +| LKR | "LKR" | +| LRD | "LRD" | +| LSL | "LSL" | +| LTL | "LTL" | +| LTT | "LTT" | +| LUC | "LUC" | +| LUF | "LUF" | +| LUL | "LUL" | +| LVL | "LVL" | +| LVR | "LVR" | +| LYD | "LYD" | +| MAD | "MAD" | +| MAF | "MAF" | +| MCF | "MCF" | +| MDC | "MDC" | +| MDL | "MDL" | +| MGA | "MGA" | +| MGF | "MGF" | +| MKD | "MKD" | +| MLF | "MLF" | +| MMK | "MMK" | +| MNT | "MNT" | +| MOP | "MOP" | +| MRU | "MRU" | +| MTL | "MTL" | +| MTP | "MTP" | +| MUR | "MUR" | +| MVR | "MVR" | +| MWK | "MWK" | +| MXN | "MXN" | +| MXV | "MXV" | +| MYR | "MYR" | +| MZE | "MZE" | +| MZN | "MZN" | +| NAD | "NAD" | +| NGN | "NGN" | +| NIO | "NIO" | +| NLG | "NLG" | +| NOK | "NOK" | +| NPR | "NPR" | +| NZD | "NZD" | +| OMR | "OMR" | +| PAB | "PAB" | +| PEI | "PEI" | +| PEN | "PEN" | +| PGK | "PGK" | +| PHP | "PHP" | +| PKR | "PKR" | +| PLN | "PLN" | +| PTE | "PTE" | +| PYG | "PYG" | +| QAR | "QAR" | +| RHD | "RHD" | +| RON | "RON" | +| RSD | "RSD" | +| RUB | "RUB" | +| RWF | "RWF" | +| SAR | "SAR" | +| SBD | "SBD" | +| SCR | "SCR" | +| SDG | "SDG" | +| SEK | "SEK" | +| SGD | "SGD" | +| SHP | "SHP" | +| SIT | "SIT" | +| SKK | "SKK" | +| SLL | "SLL" | +| SOS | "SOS" | +| SRD | "SRD" | +| SRG | "SRG" | +| SSP | "SSP" | +| STN | "STN" | +| SUR | "SUR" | +| SVC | "SVC" | +| SYP | "SYP" | +| SZL | "SZL" | +| THB | "THB" | +| TJR | "TJR" | +| TJS | "TJS" | +| TMT | "TMT" | +| TND | "TND" | +| TOP | "TOP" | +| TPE | "TPE" | +| TRY | "TRY" | +| TTD | "TTD" | +| TWD | "TWD" | +| TZS | "TZS" | +| UAH | "UAH" | +| UAK | "UAK" | +| UGX | "UGX" | +| USD | "USD" | +| UYU | "UYU" | +| UYW | "UYW" | +| UZS | "UZS" | +| VES | "VES" | +| VND | "VND" | +| VUV | "VUV" | +| WST | "WST" | +| XAF | "XAF" | +| XAG | "XAG" | +| XAU | "XAU" | +| XBA | "XBA" | +| XBB | "XBB" | +| XCD | "XCD" | +| XDR | "XDR" | +| XEU | "XEU" | +| XFO | "XFO" | +| XFU | "XFU" | +| XOF | "XOF" | +| XPD | "XPD" | +| XPF | "XPF" | +| XPT | "XPT" | +| XRE | "XRE" | +| XSU | "XSU" | +| XTS | "XTS" | +| XUA | "XUA" | +| XXX | "XXX" | +| YDD | "YDD" | +| YER | "YER" | +| ZAR | "ZAR" | +| ZMW | "ZMW" | + + + +## Enum: UserLocaleEnum + +| Name | Value | +|---- | -----| +| EN_CA | "en-CA" | +| EN_GB | "en-GB" | +| EN_US | "en-US" | +| DE_DE | "de-DE" | +| JA_JP | "ja-JP" | +| ZH_CN | "zh-CN" | +| PT_BR | "pt-BR" | +| FR_FR | "fr-FR" | +| FR_CA | "fr-CA" | +| ES_US | "es-US" | +| DA_DK | "da-DK" | +| ES_ES | "es-ES" | +| FI_FI | "fi-FI" | +| SV_SE | "sv-SE" | +| NB_NO | "nb-NO" | +| PT_PT | "pt-PT" | +| NL_NL | "nl-NL" | +| IT_IT | "it-IT" | +| RU_RU | "ru-RU" | +| EN_IN | "en-IN" | +| DE_CH | "de-CH" | +| EN_NZ | "en-NZ" | +| ES_MX | "es-MX" | +| EN_AU | "en-AU" | +| ZH_HANT | "zh-Hant" | +| KO_KR | "ko-KR" | +| EN_DE | "en-DE" | + + + +## Enum: NumberFormatLocaleEnum + +| Name | Value | +|---- | -----| +| EN_CA | "en-CA" | +| EN_GB | "en-GB" | +| EN_US | "en-US" | +| DE_DE | "de-DE" | +| JA_JP | "ja-JP" | +| ZH_CN | "zh-CN" | +| PT_BR | "pt-BR" | +| FR_FR | "fr-FR" | +| FR_CA | "fr-CA" | +| ES_US | "es-US" | +| DA_DK | "da-DK" | +| ES_ES | "es-ES" | +| FI_FI | "fi-FI" | +| SV_SE | "sv-SE" | +| NB_NO | "nb-NO" | +| PT_PT | "pt-PT" | +| NL_NL | "nl-NL" | +| IT_IT | "it-IT" | +| RU_RU | "ru-RU" | +| EN_IN | "en-IN" | +| DE_CH | "de-CH" | +| EN_NZ | "en-NZ" | +| ES_MX | "es-MX" | +| EN_AU | "en-AU" | +| ZH_HANT | "zh-Hant" | +| KO_KR | "ko-KR" | +| EN_DE | "en-DE" | + + + +## Enum: DateFormatLocaleEnum + +| Name | Value | +|---- | -----| +| EN_CA | "en-CA" | +| EN_GB | "en-GB" | +| EN_US | "en-US" | +| DE_DE | "de-DE" | +| JA_JP | "ja-JP" | +| ZH_CN | "zh-CN" | +| PT_BR | "pt-BR" | +| FR_FR | "fr-FR" | +| FR_CA | "fr-CA" | +| ES_US | "es-US" | +| DA_DK | "da-DK" | +| ES_ES | "es-ES" | +| FI_FI | "fi-FI" | +| SV_SE | "sv-SE" | +| NB_NO | "nb-NO" | +| PT_PT | "pt-PT" | +| NL_NL | "nl-NL" | +| IT_IT | "it-IT" | +| RU_RU | "ru-RU" | +| EN_IN | "en-IN" | +| DE_CH | "de-CH" | +| EN_NZ | "en-NZ" | +| ES_MX | "es-MX" | +| EN_AU | "en-AU" | +| ZH_HANT | "zh-Hant" | +| KO_KR | "ko-KR" | +| EN_DE | "en-DE" | + + +## Implemented Interfaces + +* Serializable + + diff --git a/sdks/java/docs/RepoConfigObject.md b/sdks/java/docs/RepoConfigObject.md new file mode 100644 index 000000000..4b5751b3f --- /dev/null +++ b/sdks/java/docs/RepoConfigObject.md @@ -0,0 +1,23 @@ + + +# RepoConfigObject + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**repositoryUrl** | **String** | Remote repository URL configured | [optional] | +|**username** | **String** | Username to authenticate connection to the version control system | [optional] | +|**commitBranchName** | **String** | Name of the remote branch where objects from this Thoughtspot instance will be versioned. | [optional] | +|**branches** | **List<String>** | Branches that have been pulled in local repository | [optional] | +|**enableGuidMapping** | **Boolean** | Maintain mapping of guid for the deployment to an instance | [optional] | +|**configurationBranchName** | **String** | Name of the branch where the configuration files related to operations between Thoughtspot and version control repo should be maintained. | [optional] | +|**org** | [**Org**](Org.md) | | [optional] | + + +## Implemented Interfaces + +* Serializable + + diff --git a/sdks/java/docs/ReportsApi.md b/sdks/java/docs/ReportsApi.md new file mode 100644 index 000000000..250d054d0 --- /dev/null +++ b/sdks/java/docs/ReportsApi.md @@ -0,0 +1,82 @@ +# ReportsApi + +All URIs are relative to *CLUSTER_URL* + +| Method | HTTP request | +|------------- | ------------- | +| [**exportAnswerReport**](ReportsApi.md#exportAnswerReport) | **POST** /api/rest/2.0/report/answer | +| [**exportLiveboardReport**](ReportsApi.md#exportLiveboardReport) | **POST** /api/rest/2.0/report/liveboard | + + + +# **exportAnswerReport** +> File exportAnswerReport(exportAnswerReportRequest) + + + + Version: 9.0.0.cl or later Exports an Answer in the given file format. You can download the Answer data as a PDF, PNG, CSV, or XLSX file. Requires at least view access to the Answer. #### Usage guidelines In the request body, specify the GUID or name of the Answer and set `file_format`. The default file format is CSV. Use the `type` parameter to specify whether the Answer being exported is a saved Answer (`SAVED`) or a pinned Answer on a Liveboard (`PINNED`). Defaults to `SAVED`. When using `PINNED`, the `metadata_identifier` must be the container id. **NOTE**: * The downloadable file returned in API response file is extensionless. Please rename the downloaded file by typing in the relevant extension. * HTML rendering is not supported for PDF exports of Answers with tables. Optionally, you can define [runtime overrides](https://developers.thoughtspot.com/docs/fetch-data-and-report-apis#_runtime_overrides) to apply to the Answer data. + +### Parameters + +| Name | Type | +|------------- | ------------- | +| **exportAnswerReportRequest** | [**ExportAnswerReportRequest**](ExportAnswerReportRequest.md) + +### Return type + +[**File**](File.md) + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/octet-stream, application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Export report file of specified metadata object is successful. | - | +| **400** | Invalid request. | - | +| **401** | Unauthorized access. | - | +| **403** | Forbidden access. | - | +| **500** | Unexpected error | - | + + +# **exportLiveboardReport** +> File exportLiveboardReport(exportLiveboardReportRequest) + + + + Version: 9.0.0.cl or later Exports a Liveboard and its visualizations in PDF, PNG, CSV, or XLSX file format. The default `file_format` is CSV. Requires at least view access to the Liveboard. #### Usage guidelines In the request body, specify the GUID or name of the Liveboard. To generate a Liveboard report with specific visualizations, add GUIDs or names of the visualizations. **NOTE**: * The downloadable file returned in API response file is extensionless. Please rename the downloaded file by typing in the relevant extension. * Optionally, you can define [runtime overrides](https://developers.thoughtspot.com/docs/fetch-data-and-report-apis#_runtime_overrides) to apply to the Answer data. * To include unsaved changes in the report, pass the `transient_pinboard_content` script generated from the `getExportRequestForCurrentPinboard` method in the Visual Embed SDK. Upon successful execution, the API returns the report with unsaved changes, including ad hoc changes to visualizations. For more information, see [Liveboard Report API](https://developers.thoughtspot.com/docs/fetch-data-and-report-apis#_liveboard_report_api). * Starting with ThoughtSpot Cloud 10.9.0.cl release, the Liveboard can be exported in the PNG format in the resolution of your choice. To enable this on your instance, contact ThoughtSpot support. When this feature is enabled, the options `include_cover_page`,`include_filter_page` within the `png_options` will not be available for PNG exports. * Starting with the ThoughtSpot Cloud 26.2.0.cl release, * Liveboards can be exported in CSV format. * All visualizations within a Liveboard can be exported as individual CSV files. * When exporting multiple visualizations or the entire Liveboard, the system returns the report as a compressed ZIP file containing the separate CSV files for each visualization. * Liveboards can also be exported in XLSX format. * All selected visualizations are consolidated into a single Excel workbook (.xlsx), with each visualization placed in its own worksheet (tab). * XLSX exports are limited to a maximum of 255 worksheets (tabs) per workbook. + +### Parameters + +| Name | Type | +|------------- | ------------- | +| **exportLiveboardReportRequest** | [**ExportLiveboardReportRequest**](ExportLiveboardReportRequest.md) + +### Return type + +[**File**](File.md) + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/octet-stream, application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Export report file of specified metadata object is successful. | - | +| **400** | Invalid request. | - | +| **401** | Unauthorized access. | - | +| **403** | Forbidden access. | - | +| **500** | Unexpected error | - | + diff --git a/sdks/java/docs/ResetUserPasswordRequest.md b/sdks/java/docs/ResetUserPasswordRequest.md new file mode 100644 index 000000000..fb401e476 --- /dev/null +++ b/sdks/java/docs/ResetUserPasswordRequest.md @@ -0,0 +1,18 @@ + + +# ResetUserPasswordRequest + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**newPassword** | **String** | New password for the user. | | +|**userIdentifier** | **String** | GUID or name of the user. | | + + +## Implemented Interfaces + +* Serializable + + diff --git a/sdks/java/docs/ResponseActivationURL.md b/sdks/java/docs/ResponseActivationURL.md new file mode 100644 index 000000000..414990840 --- /dev/null +++ b/sdks/java/docs/ResponseActivationURL.md @@ -0,0 +1,18 @@ + + +# ResponseActivationURL + +The object representation with activation link. + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**activationLink** | **String** | Activation link to activate the user. | [optional] | + + +## Implemented Interfaces + +* Serializable + + diff --git a/sdks/java/docs/ResponseCopyObject.md b/sdks/java/docs/ResponseCopyObject.md new file mode 100644 index 000000000..beae7a0d1 --- /dev/null +++ b/sdks/java/docs/ResponseCopyObject.md @@ -0,0 +1,17 @@ + + +# ResponseCopyObject + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**metadataId** | **String** | The unique identifier of the object. | [optional] | + + +## Implemented Interfaces + +* Serializable + + diff --git a/sdks/java/docs/ResponseCustomAction.md b/sdks/java/docs/ResponseCustomAction.md new file mode 100644 index 000000000..10a07fdb9 --- /dev/null +++ b/sdks/java/docs/ResponseCustomAction.md @@ -0,0 +1,23 @@ + + +# ResponseCustomAction + +Custom action details + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**actionDetails** | [**ActionDetails**](ActionDetails.md) | | | +|**defaultActionConfig** | [**DefaultActionConfig**](DefaultActionConfig.md) | | | +|**id** | **String** | Unique Id of the custom action. | | +|**metadataAssociation** | [**List<MetadataAssociationItem>**](MetadataAssociationItem.md) | Metadata objects to assign the the custom action to. | [optional] | +|**name** | **String** | Unique name of the custom action. | | +|**userGroups** | [**List<ObjectIDAndName>**](ObjectIDAndName.md) | Unique ID or name of the User groups which are associated with the custom action. | [optional] | + + +## Implemented Interfaces + +* Serializable + + diff --git a/sdks/java/docs/ResponseFailedEntities.md b/sdks/java/docs/ResponseFailedEntities.md new file mode 100644 index 000000000..09e801646 --- /dev/null +++ b/sdks/java/docs/ResponseFailedEntities.md @@ -0,0 +1,18 @@ + + +# ResponseFailedEntities + +Wrapper for the failed entities, as they are inside a 'data' field in the response. + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**data** | [**List<ResponseFailedEntity>**](ResponseFailedEntity.md) | | | + + +## Implemented Interfaces + +* Serializable + + diff --git a/sdks/java/docs/ResponseFailedEntity.md b/sdks/java/docs/ResponseFailedEntity.md new file mode 100644 index 000000000..8f7e41ced --- /dev/null +++ b/sdks/java/docs/ResponseFailedEntity.md @@ -0,0 +1,20 @@ + + +# ResponseFailedEntity + +Unique ID of the failed worksheet. + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**id** | **String** | | | +|**name** | **String** | Name of the worksheet that failed to convert. | | +|**error** | **String** | Error details related to the failed conversion. | | + + +## Implemented Interfaces + +* Serializable + + diff --git a/sdks/java/docs/ResponseIncompleteEntities.md b/sdks/java/docs/ResponseIncompleteEntities.md new file mode 100644 index 000000000..9bc00d3f5 --- /dev/null +++ b/sdks/java/docs/ResponseIncompleteEntities.md @@ -0,0 +1,18 @@ + + +# ResponseIncompleteEntities + +Wrapper for the incomplete entities, as they are inside a 'data' field in the response. + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**data** | [**List<ResponseIncompleteEntity>**](ResponseIncompleteEntity.md) | | | + + +## Implemented Interfaces + +* Serializable + + diff --git a/sdks/java/docs/ResponseIncompleteEntity.md b/sdks/java/docs/ResponseIncompleteEntity.md new file mode 100644 index 000000000..dd4ada238 --- /dev/null +++ b/sdks/java/docs/ResponseIncompleteEntity.md @@ -0,0 +1,20 @@ + + +# ResponseIncompleteEntity + +Unique ID of the incomplete worksheet. + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**id** | **String** | | | +|**name** | **String** | Name of the incomplete worksheet. | | +|**error** | **String** | Error details related to the incomplete conversion. | | + + +## Implemented Interfaces + +* Serializable + + diff --git a/sdks/java/docs/ResponseMessage.md b/sdks/java/docs/ResponseMessage.md new file mode 100644 index 000000000..18b0c6f9c --- /dev/null +++ b/sdks/java/docs/ResponseMessage.md @@ -0,0 +1,40 @@ + + +# ResponseMessage + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**sessionIdentifier** | **String** | Unique identifier of the generated response. | [optional] | +|**generationNumber** | **Integer** | Generate number of the response. | [optional] | +|**messageType** | [**MessageTypeEnum**](#MessageTypeEnum) | Type of the generated response. | | +|**visualizationType** | [**VisualizationTypeEnum**](#VisualizationTypeEnum) | Generated visualization type. | [optional] | +|**tokens** | **String** | Tokens for the response. | [optional] | +|**displayTokens** | **String** | User friendly tokens for the response. | [optional] | + + + +## Enum: MessageTypeEnum + +| Name | Value | +|---- | -----| +| TS_ANSWER | "TSAnswer" | + + + +## Enum: VisualizationTypeEnum + +| Name | Value | +|---- | -----| +| CHART | "Chart" | +| TABLE | "Table" | +| UNDEFINED | "Undefined" | + + +## Implemented Interfaces + +* Serializable + + diff --git a/sdks/java/docs/ResponsePostUpgradeFailedEntities.md b/sdks/java/docs/ResponsePostUpgradeFailedEntities.md new file mode 100644 index 000000000..9a806c837 --- /dev/null +++ b/sdks/java/docs/ResponsePostUpgradeFailedEntities.md @@ -0,0 +1,18 @@ + + +# ResponsePostUpgradeFailedEntities + +Wrapper for the post-upgrade failed entities, as they are inside a 'data' field in the response. + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**data** | [**List<ResponsePostUpgradeFailedEntity>**](ResponsePostUpgradeFailedEntity.md) | | | + + +## Implemented Interfaces + +* Serializable + + diff --git a/sdks/java/docs/ResponsePostUpgradeFailedEntity.md b/sdks/java/docs/ResponsePostUpgradeFailedEntity.md new file mode 100644 index 000000000..2ade3fa95 --- /dev/null +++ b/sdks/java/docs/ResponsePostUpgradeFailedEntity.md @@ -0,0 +1,20 @@ + + +# ResponsePostUpgradeFailedEntity + +Unique ID of the worksheet that failed post-upgrade. + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**id** | **String** | | | +|**name** | **String** | Name of the worksheet that failed post-upgrade. | | +|**error** | **String** | Error details related to the post-upgrade failure. | | + + +## Implemented Interfaces + +* Serializable + + diff --git a/sdks/java/docs/ResponseSchedule.md b/sdks/java/docs/ResponseSchedule.md new file mode 100644 index 000000000..946240ce3 --- /dev/null +++ b/sdks/java/docs/ResponseSchedule.md @@ -0,0 +1,31 @@ + + +# ResponseSchedule + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**author** | [**Author**](Author.md) | | | +|**creationTimeInMillis** | **Object** | Schedule creation time in milliseconds. | | +|**description** | **String** | Description of the job. | [optional] | +|**fileFormat** | **String** | Export file format. | | +|**frequency** | [**Frequency**](Frequency.md) | | | +|**id** | **String** | GUID of the scheduled job. | | +|**liveboardOptions** | [**LiveboardOptions**](LiveboardOptions.md) | | [optional] | +|**metadata** | [**MetadataResponse**](MetadataResponse.md) | | | +|**name** | **String** | Name of the scheduled job. | | +|**pdfOptions** | [**PdfOptions**](PdfOptions.md) | | [optional] | +|**recipientDetails** | [**RecipientDetails**](RecipientDetails.md) | | | +|**status** | **String** | Status of the job | [optional] | +|**timeZone** | **String** | Time zone | | +|**historyRuns** | [**List<ResponseScheduleRun>**](ResponseScheduleRun.md) | Schedule runs history records. | [optional] | +|**personalisedViewId** | **String** | Personalised view id of the liveboard to be scheduled. | [optional] | + + +## Implemented Interfaces + +* Serializable + + diff --git a/sdks/java/docs/ResponseScheduleRun.md b/sdks/java/docs/ResponseScheduleRun.md new file mode 100644 index 000000000..b482b7e6c --- /dev/null +++ b/sdks/java/docs/ResponseScheduleRun.md @@ -0,0 +1,22 @@ + + +# ResponseScheduleRun + +Schedule run response object + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**id** | **String** | GUID of the scheduled job. | | +|**startTimeInMillis** | **Integer** | Schedule run start time in milliseconds. | | +|**endTimeInMillis** | **Integer** | Schedule run end time in milliseconds. | | +|**status** | **String** | Status of the schedule run. | | +|**detail** | **String** | Message details related to the schedule run. | [optional] | + + +## Implemented Interfaces + +* Serializable + + diff --git a/sdks/java/docs/ResponseSuccessfulEntities.md b/sdks/java/docs/ResponseSuccessfulEntities.md new file mode 100644 index 000000000..2ee38f27a --- /dev/null +++ b/sdks/java/docs/ResponseSuccessfulEntities.md @@ -0,0 +1,18 @@ + + +# ResponseSuccessfulEntities + +Wrapper for the successful entities, as they are inside a 'data' field in the response. + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**data** | [**List<ResponseSuccessfulEntity>**](ResponseSuccessfulEntity.md) | | | + + +## Implemented Interfaces + +* Serializable + + diff --git a/sdks/java/docs/ResponseSuccessfulEntity.md b/sdks/java/docs/ResponseSuccessfulEntity.md new file mode 100644 index 000000000..6fe095286 --- /dev/null +++ b/sdks/java/docs/ResponseSuccessfulEntity.md @@ -0,0 +1,19 @@ + + +# ResponseSuccessfulEntity + +Unique ID of the worksheet. + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**id** | **String** | | | +|**name** | **String** | Name of the worksheet. | | + + +## Implemented Interfaces + +* Serializable + + diff --git a/sdks/java/docs/ResponseWorksheetToModelConversion.md b/sdks/java/docs/ResponseWorksheetToModelConversion.md new file mode 100644 index 000000000..7d38c278a --- /dev/null +++ b/sdks/java/docs/ResponseWorksheetToModelConversion.md @@ -0,0 +1,27 @@ + + +# ResponseWorksheetToModelConversion + +Name of the conversion process, which involves converting worksheets to models. + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**name** | **String** | | | +|**successCount** | **Integer** | The number of worksheets successfully converted to models. | | +|**failureCount** | **Integer** | The number of worksheets that failed to convert. | | +|**incompleteCount** | **Integer** | The number of worksheets that were incomplete during the conversion process. | | +|**postUpgradeFailedCount** | **Integer** | The number of worksheets that failed after an upgrade during the conversion process. | | +|**totalTimeInMillis** | **Integer** | The total time taken to complete the conversion process in milliseconds. | | +|**successfulEntities** | [**ResponseSuccessfulEntities**](ResponseSuccessfulEntities.md) | | | +|**failedEntities** | [**ResponseFailedEntities**](ResponseFailedEntities.md) | | | +|**incompleteEntities** | [**ResponseIncompleteEntities**](ResponseIncompleteEntities.md) | | | +|**postUpgradeFailedEntities** | [**ResponsePostUpgradeFailedEntities**](ResponsePostUpgradeFailedEntities.md) | | | + + +## Implemented Interfaces + +* Serializable + + diff --git a/sdks/java/docs/RevertCommitRequest.md b/sdks/java/docs/RevertCommitRequest.md new file mode 100644 index 000000000..d31e8323c --- /dev/null +++ b/sdks/java/docs/RevertCommitRequest.md @@ -0,0 +1,28 @@ + + +# RevertCommitRequest + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**metadata** | [**List<MetadataObject>**](MetadataObject.md) | Metadata objects. | [optional] | +|**branchName** | **String** | Name of the branch where the reverted version should be committed Note: If no branch_name is specified, then the commit_branch_name will be considered. | [optional] | +|**revertPolicy** | [**RevertPolicyEnum**](#RevertPolicyEnum) | Policy to apply when reverting a commit. Valid values: [ALL_OR_NONE, PARTIAL] | [optional] | + + + +## Enum: RevertPolicyEnum + +| Name | Value | +|---- | -----| +| ALL_OR_NONE | "ALL_OR_NONE" | +| PARTIAL | "PARTIAL" | + + +## Implemented Interfaces + +* Serializable + + diff --git a/sdks/java/docs/RevertResponse.md b/sdks/java/docs/RevertResponse.md new file mode 100644 index 000000000..4fe3a2faf --- /dev/null +++ b/sdks/java/docs/RevertResponse.md @@ -0,0 +1,24 @@ + + +# RevertResponse + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**committer** | [**CommiterType**](CommiterType.md) | | [optional] | +|**author** | [**AuthorType**](AuthorType.md) | | [optional] | +|**comment** | **String** | Comments associated with the commit | [optional] | +|**commitTime** | **String** | Time at which the changes were committed. | [optional] | +|**commitId** | **String** | SHA id associated with the commit | [optional] | +|**branch** | **String** | Branch where changes were committed | [optional] | +|**committedFiles** | [**List<CommitFileType>**](CommitFileType.md) | Files that were pushed as part of this commit | [optional] | +|**revertedMetadata** | [**List<RevertedMetadata>**](RevertedMetadata.md) | Metadata of reverted file of this commit | [optional] | + + +## Implemented Interfaces + +* Serializable + + diff --git a/sdks/java/docs/RevertedMetadata.md b/sdks/java/docs/RevertedMetadata.md new file mode 100644 index 000000000..c43cc954f --- /dev/null +++ b/sdks/java/docs/RevertedMetadata.md @@ -0,0 +1,21 @@ + + +# RevertedMetadata + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**fileName** | **String** | Name of the file deployed | | +|**metadataName** | **String** | Name of the metadata object | | +|**metadataType** | **String** | Type of the metadata object | | +|**statusCode** | **String** | Indicates the status of deployment for the file | | +|**statusMessage** | **String** | Any error or warning with the deployment | | + + +## Implemented Interfaces + +* Serializable + + diff --git a/sdks/java/docs/RevokeRefreshTokensRequest.md b/sdks/java/docs/RevokeRefreshTokensRequest.md new file mode 100644 index 000000000..c1f01c664 --- /dev/null +++ b/sdks/java/docs/RevokeRefreshTokensRequest.md @@ -0,0 +1,19 @@ + + +# RevokeRefreshTokensRequest + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**configurationIdentifiers** | **List<String>** | Unique ID or name of the configuration. When provided, the refresh tokens of the users associated with the connection configuration will be revoked. | [optional] | +|**userIdentifiers** | **List<String>** | Unique ID or name of the users. When provided, the refresh tokens of the specified users will be revoked. If the request includes the user ID or name of the connection author, their token will also be revoked. | [optional] | +|**orgIdentifiers** | **List<String>** | Unique ID or name of the Org. When provided, the refresh tokens of all users associated with the published connection in the Org will be revoked. This parameter is valid only for published connections. Using it with unpublished connections will result in an error. | [optional] | + + +## Implemented Interfaces + +* Serializable + + diff --git a/sdks/java/docs/RevokeRefreshTokensResponse.md b/sdks/java/docs/RevokeRefreshTokensResponse.md new file mode 100644 index 000000000..981010e58 --- /dev/null +++ b/sdks/java/docs/RevokeRefreshTokensResponse.md @@ -0,0 +1,17 @@ + + +# RevokeRefreshTokensResponse + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**data** | **String** | Result message describing the outcome of the refresh token revocation operation. | | + + +## Implemented Interfaces + +* Serializable + + diff --git a/sdks/java/docs/RevokeTokenRequest.md b/sdks/java/docs/RevokeTokenRequest.md new file mode 100644 index 000000000..362ded727 --- /dev/null +++ b/sdks/java/docs/RevokeTokenRequest.md @@ -0,0 +1,18 @@ + + +# RevokeTokenRequest + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**userIdentifier** | **String** | | [optional] | +|**token** | **String** | | [optional] | + + +## Implemented Interfaces + +* Serializable + + diff --git a/sdks/java/docs/RiseGQLArgWrapper.md b/sdks/java/docs/RiseGQLArgWrapper.md new file mode 100644 index 000000000..6ae5639d6 --- /dev/null +++ b/sdks/java/docs/RiseGQLArgWrapper.md @@ -0,0 +1,18 @@ + + +# RiseGQLArgWrapper + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**name** | **String** | | | +|**type** | **String** | | | + + +## Implemented Interfaces + +* Serializable + + diff --git a/sdks/java/docs/RiseSetter.md b/sdks/java/docs/RiseSetter.md new file mode 100644 index 000000000..76e9e8a68 --- /dev/null +++ b/sdks/java/docs/RiseSetter.md @@ -0,0 +1,18 @@ + + +# RiseSetter + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**field** | **String** | | | +|**path** | **String** | | | + + +## Implemented Interfaces + +* Serializable + + diff --git a/sdks/java/docs/Role.md b/sdks/java/docs/Role.md new file mode 100644 index 000000000..a2c90cd7f --- /dev/null +++ b/sdks/java/docs/Role.md @@ -0,0 +1,18 @@ + + +# Role + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**id** | **String** | id of the role | [optional] | +|**name** | **String** | name of the role | [optional] | + + +## Implemented Interfaces + +* Serializable + + diff --git a/sdks/java/docs/RoleResponse.md b/sdks/java/docs/RoleResponse.md new file mode 100644 index 000000000..b4386d257 --- /dev/null +++ b/sdks/java/docs/RoleResponse.md @@ -0,0 +1,92 @@ + + +# RoleResponse + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**id** | **String** | Unique Id of the role. | | +|**name** | **String** | Name of the role | | +|**description** | **String** | Description of the role | | +|**groupsAssignedCount** | **Integer** | number of groups assigned with this role | [optional] | +|**orgs** | [**List<GenericInfo>**](GenericInfo.md) | Orgs in which role exists. | [optional] | +|**groups** | [**List<GenericInfo>**](GenericInfo.md) | Details of groups assigned with this role | [optional] | +|**privileges** | [**List<PrivilegesEnum>**](#List<PrivilegesEnum>) | Privileges granted to the role. | | +|**permission** | [**PermissionEnum**](#PermissionEnum) | Permission details of the Role | [optional] | +|**authorId** | **String** | Unique identifier of author of the role. | [optional] | +|**modifierId** | **String** | Unique identifier of modifier of the role. | [optional] | +|**creationTimeInMillis** | **Object** | Creation time of the role in milliseconds. | [optional] | +|**modificationTimeInMillis** | **Object** | Last modified time of the role in milliseconds. | [optional] | +|**deleted** | **Boolean** | Indicates whether the role is deleted. | [optional] | +|**deprecated** | **Boolean** | Indicates whether the role is deprecated. | [optional] | +|**external** | **Boolean** | Indicates whether the role is external. | [optional] | +|**hidden** | **Boolean** | Indicates whether the role is hidden. | [optional] | +|**sharedViaConnection** | **Boolean** | Indicates whether the role is shared via connection | [optional] | + + + +## Enum: List<PrivilegesEnum> + +| Name | Value | +|---- | -----| +| USERDATAUPLOADING | "USERDATAUPLOADING" | +| DATADOWNLOADING | "DATADOWNLOADING" | +| DATAMANAGEMENT | "DATAMANAGEMENT" | +| SHAREWITHALL | "SHAREWITHALL" | +| JOBSCHEDULING | "JOBSCHEDULING" | +| A3_ANALYSIS | "A3ANALYSIS" | +| BYPASSRLS | "BYPASSRLS" | +| DISABLE_PINBOARD_CREATION | "DISABLE_PINBOARD_CREATION" | +| DEVELOPER | "DEVELOPER" | +| APPLICATION_ADMINISTRATION | "APPLICATION_ADMINISTRATION" | +| USER_ADMINISTRATION | "USER_ADMINISTRATION" | +| GROUP_ADMINISTRATION | "GROUP_ADMINISTRATION" | +| SYSTEM_INFO_ADMINISTRATION | "SYSTEM_INFO_ADMINISTRATION" | +| SYNCMANAGEMENT | "SYNCMANAGEMENT" | +| ORG_ADMINISTRATION | "ORG_ADMINISTRATION" | +| ROLE_ADMINISTRATION | "ROLE_ADMINISTRATION" | +| AUTHENTICATION_ADMINISTRATION | "AUTHENTICATION_ADMINISTRATION" | +| BILLING_INFO_ADMINISTRATION | "BILLING_INFO_ADMINISTRATION" | +| CONTROL_TRUSTED_AUTH | "CONTROL_TRUSTED_AUTH" | +| TAGMANAGEMENT | "TAGMANAGEMENT" | +| LIVEBOARD_VERIFIER | "LIVEBOARD_VERIFIER" | +| CAN_MANAGE_CUSTOM_CALENDAR | "CAN_MANAGE_CUSTOM_CALENDAR" | +| CAN_CREATE_OR_EDIT_CONNECTIONS | "CAN_CREATE_OR_EDIT_CONNECTIONS" | +| CAN_MANAGE_WORKSHEET_VIEWS_TABLES | "CAN_MANAGE_WORKSHEET_VIEWS_TABLES" | +| CAN_MANAGE_VERSION_CONTROL | "CAN_MANAGE_VERSION_CONTROL" | +| THIRDPARTY_ANALYSIS | "THIRDPARTY_ANALYSIS" | +| CAN_CREATE_CATALOG | "CAN_CREATE_CATALOG" | +| ALLOW_NON_EMBED_FULL_APP_ACCESS | "ALLOW_NON_EMBED_FULL_APP_ACCESS" | +| CAN_ACCESS_ANALYST_STUDIO | "CAN_ACCESS_ANALYST_STUDIO" | +| CAN_MANAGE_ANALYST_STUDIO | "CAN_MANAGE_ANALYST_STUDIO" | +| PREVIEW_DOCUMENT_SEARCH | "PREVIEW_DOCUMENT_SEARCH" | +| CAN_MANAGE_VARIABLES | "CAN_MANAGE_VARIABLES" | +| CAN_MODIFY_FOLDERS | "CAN_MODIFY_FOLDERS" | +| CAN_VIEW_FOLDERS | "CAN_VIEW_FOLDERS" | +| CAN_MANAGE_AGENTSPOT | "CAN_MANAGE_AGENTSPOT" | +| CAN_ACCESS_AGENTSPOT | "CAN_ACCESS_AGENTSPOT" | +| CAN_SETUP_VERSION_CONTROL | "CAN_SETUP_VERSION_CONTROL" | +| PREVIEW_THOUGHTSPOT_SAGE | "PREVIEW_THOUGHTSPOT_SAGE" | +| CAN_MANAGE_WEBHOOKS | "CAN_MANAGE_WEBHOOKS" | +| CAN_DOWNLOAD_VISUALS | "CAN_DOWNLOAD_VISUALS" | +| CAN_DOWNLOAD_DETAILED_DATA | "CAN_DOWNLOAD_DETAILED_DATA" | +| CAN_USE_SPOTTER | "CAN_USE_SPOTTER" | + + + +## Enum: PermissionEnum + +| Name | Value | +|---- | -----| +| READ_ONLY | "READ_ONLY" | +| MODIFY | "MODIFY" | +| NO_ACCESS | "NO_ACCESS" | + + +## Implemented Interfaces + +* Serializable + + diff --git a/sdks/java/docs/RolesApi.md b/sdks/java/docs/RolesApi.md new file mode 100644 index 000000000..628ad789d --- /dev/null +++ b/sdks/java/docs/RolesApi.md @@ -0,0 +1,157 @@ +# RolesApi + +All URIs are relative to *CLUSTER_URL* + +| Method | HTTP request | +|------------- | ------------- | +| [**createRole**](RolesApi.md#createRole) | **POST** /api/rest/2.0/roles/create | +| [**deleteRole**](RolesApi.md#deleteRole) | **POST** /api/rest/2.0/roles/{role_identifier}/delete | +| [**searchRoles**](RolesApi.md#searchRoles) | **POST** /api/rest/2.0/roles/search | +| [**updateRole**](RolesApi.md#updateRole) | **POST** /api/rest/2.0/roles/{role_identifier}/update | + + + +# **createRole** +> RoleResponse createRole(createRoleRequest) + + + + Version: 9.5.0.cl or later Creates a Role object in ThoughtSpot. Available only if [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance. To create a Role, the `ROLE_ADMINISTRATION` (**Can manage roles**) privilege is required. + +### Parameters + +| Name | Type | +|------------- | ------------- | +| **createRoleRequest** | [**CreateRoleRequest**](CreateRoleRequest.md) + +### Return type + +[**RoleResponse**](RoleResponse.md) + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Role successfully created. | - | +| **400** | Invalid parameters. | - | +| **401** | Unauthorized access. | - | +| **403** | Forbidden access. | - | +| **500** | Internal error | - | + + +# **deleteRole** +> deleteRole(roleIdentifier) + + + + Version: 9.5.0.cl or later Deletes a Role object from the ThoughtSpot system. Available only if [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance. To delete a Role, the `ROLE_ADMINISTRATION` (**Can manage roles**) privilege is required. + +### Parameters + +| Name | Type | +|------------- | ------------- | +| **roleIdentifier** | **String** + +### Return type + +null (empty response body) + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **204** | Role successfully deleted. | - | +| **400** | Invalid request. | - | +| **401** | Unauthorized access. | - | +| **403** | Forbidden access. | - | +| **500** | Internal error | - | + + +# **searchRoles** +> List<SearchRoleResponse> searchRoles(searchRolesRequest) + + + + Version: 9.5.0.cl or later Gets a list of Role objects from the ThoughtSpot system. Available if [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance. To search for Roles, the `ROLE_ADMINISTRATION` (**Can manage roles**) privilege is required. To get details of a specific Role object, specify the GUID or name. You can also filter the API response based on user group and Org identifiers, privileges assigned to the Role, and deprecation status. + +### Parameters + +| Name | Type | +|------------- | ------------- | +| **searchRolesRequest** | [**SearchRolesRequest**](SearchRolesRequest.md) + +### Return type + +[**List<SearchRoleResponse>**](SearchRoleResponse.md) + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Roles search result. | - | +| **400** | Invalid request. | - | +| **401** | Unauthorized access. | - | +| **403** | Forbidden access. | - | +| **500** | Internal error | - | + + +# **updateRole** +> RoleResponse updateRole(roleIdentifier, updateRoleRequest) + + + + Version: 9.5.0.cl or later Updates the properties of a Role object. Available only if [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance. To update a Role, the `ROLE_ADMINISTRATION` (**Can manage roles**) privilege is required. + +### Parameters + +| Name | Type | +|------------- | ------------- | +| **roleIdentifier** | **String** +| **updateRoleRequest** | [**UpdateRoleRequest**](UpdateRoleRequest.md) + +### Return type + +[**RoleResponse**](RoleResponse.md) + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Role successfully updated. | - | +| **400** | Invalid request. | - | +| **401** | Unauthorized access. | - | +| **403** | Forbidden access. | - | +| **500** | Unexpected error | - | + diff --git a/sdks/java/docs/RuntimeFilter.md b/sdks/java/docs/RuntimeFilter.md new file mode 100644 index 000000000..58efd7fac --- /dev/null +++ b/sdks/java/docs/RuntimeFilter.md @@ -0,0 +1,18 @@ + + +# RuntimeFilter + +List of runtime parameters need to set during the session. + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**runtimeFilter** | **Object** | Runtime filter parameter type in JWT. | [optional] | + + +## Implemented Interfaces + +* Serializable + + diff --git a/sdks/java/docs/RuntimeFilters.md b/sdks/java/docs/RuntimeFilters.md new file mode 100644 index 000000000..58c9eef28 --- /dev/null +++ b/sdks/java/docs/RuntimeFilters.md @@ -0,0 +1,45 @@ + + +# RuntimeFilters + +Objects to apply the Runtime_Filters. + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**columnName** | **String** | The column name to apply filter. | | +|**values** | **List<String>** | Value of the filters. | | +|**operator** | [**OperatorEnum**](#OperatorEnum) | Operator value. Example: EQ | | +|**persist** | **Boolean** | Flag to persist the runtime filters. Version: 9.12.0.cl or later | [optional] | +|**objects** | [**List<UserObject>**](UserObject.md) | Object to apply the runtime filter. | [optional] | + + + +## Enum: OperatorEnum + +| Name | Value | +|---- | -----| +| EQ | "EQ" | +| NE | "NE" | +| LT | "LT" | +| LE | "LE" | +| GT | "GT" | +| GE | "GE" | +| IN | "IN" | +| BW | "BW" | +| CONTAINS | "CONTAINS" | +| BEGINS_WITH | "BEGINS_WITH" | +| ENDS_WITH | "ENDS_WITH" | +| BW_INC | "BW_INC" | +| BW_INC_MIN | "BW_INC_MIN" | +| BW_INC_MAX | "BW_INC_MAX" | +| LIKE | "LIKE" | +| NOT_IN | "NOT_IN" | + + +## Implemented Interfaces + +* Serializable + + diff --git a/sdks/java/docs/RuntimeParamOverride.md b/sdks/java/docs/RuntimeParamOverride.md new file mode 100644 index 000000000..3cbf2857c --- /dev/null +++ b/sdks/java/docs/RuntimeParamOverride.md @@ -0,0 +1,18 @@ + + +# RuntimeParamOverride + +List of runtime parameters need to set during the session. + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**runtimeParamOverride** | **Object** | Runtime param override type in JWT. | [optional] | + + +## Implemented Interfaces + +* Serializable + + diff --git a/sdks/java/docs/RuntimeParameters.md b/sdks/java/docs/RuntimeParameters.md new file mode 100644 index 000000000..0327587ba --- /dev/null +++ b/sdks/java/docs/RuntimeParameters.md @@ -0,0 +1,21 @@ + + +# RuntimeParameters + +Objects to apply the Runtime_Parameters. + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**name** | **String** | The name of the parameter. | | +|**values** | **List<String>** | The array of values. | | +|**persist** | **Boolean** | Flag to persist the parameters. Version: 9.12.0.cl or later | [optional] | +|**objects** | [**List<UserObject>**](UserObject.md) | Object to apply the runtime parameter. | [optional] | + + +## Implemented Interfaces + +* Serializable + + diff --git a/sdks/java/docs/RuntimeSort.md b/sdks/java/docs/RuntimeSort.md new file mode 100644 index 000000000..16b1f8bc1 --- /dev/null +++ b/sdks/java/docs/RuntimeSort.md @@ -0,0 +1,18 @@ + + +# RuntimeSort + +List of runtime parameters need to set during the session. + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**runtimeSort** | **Object** | Runtime sort parameter type in JWT. | [optional] | + + +## Implemented Interfaces + +* Serializable + + diff --git a/sdks/java/docs/RuntimeSorts.md b/sdks/java/docs/RuntimeSorts.md new file mode 100644 index 000000000..94a224875 --- /dev/null +++ b/sdks/java/docs/RuntimeSorts.md @@ -0,0 +1,30 @@ + + +# RuntimeSorts + +Objects to apply the Runtime_Sorts. + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**columnName** | **String** | The column name to apply filter. | [optional] | +|**order** | [**OrderEnum**](#OrderEnum) | Order for the sort. | [optional] | +|**persist** | **Boolean** | Flag to persist the runtime sorts. Version: 9.12.0.cl or later | [optional] | +|**objects** | [**List<UserObject>**](UserObject.md) | Object to apply the runtime sort. | [optional] | + + + +## Enum: OrderEnum + +| Name | Value | +|---- | -----| +| ASC | "ASC" | +| DESC | "DESC" | + + +## Implemented Interfaces + +* Serializable + + diff --git a/sdks/java/docs/ScheduleHistoryRunsOptionsInput.md b/sdks/java/docs/ScheduleHistoryRunsOptionsInput.md new file mode 100644 index 000000000..cdfd74793 --- /dev/null +++ b/sdks/java/docs/ScheduleHistoryRunsOptionsInput.md @@ -0,0 +1,19 @@ + + +# ScheduleHistoryRunsOptionsInput + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**includeHistoryRuns** | **Boolean** | Indicates whether to fetch history runs for the scheduled notification. | [optional] | +|**recordSize** | **Integer** | Indicates the max number of records that can be fetched as past runs of any scheduled job. | [optional] | +|**recordOffset** | **Integer** | Indicates the starting record number from where history runs records should be fetched. | [optional] | + + +## Implemented Interfaces + +* Serializable + + diff --git a/sdks/java/docs/SchedulesApi.md b/sdks/java/docs/SchedulesApi.md new file mode 100644 index 000000000..46186d701 --- /dev/null +++ b/sdks/java/docs/SchedulesApi.md @@ -0,0 +1,157 @@ +# SchedulesApi + +All URIs are relative to *CLUSTER_URL* + +| Method | HTTP request | +|------------- | ------------- | +| [**createSchedule**](SchedulesApi.md#createSchedule) | **POST** /api/rest/2.0/schedules/create | +| [**deleteSchedule**](SchedulesApi.md#deleteSchedule) | **POST** /api/rest/2.0/schedules/{schedule_identifier}/delete | +| [**searchSchedules**](SchedulesApi.md#searchSchedules) | **POST** /api/rest/2.0/schedules/search | +| [**updateSchedule**](SchedulesApi.md#updateSchedule) | **POST** /api/rest/2.0/schedules/{schedule_identifier}/update | + + + +# **createSchedule** +> ResponseSchedule createSchedule(createScheduleRequest) + + + + Create schedule. Version: 9.4.0.cl or later Creates a Liveboard schedule job. Requires at least edit access to Liveboards. To create a schedule on behalf of another user, you need `ADMINISTRATION` (**Can administer Org**) or `JOBSCHEDULING` (**Can schedule for others**) privilege and edit access to the Liveboard. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `JOBSCHEDULING` (**Can schedule for others**) privilege is required. #### Usage guidelines * The description text is mandatory. The description text appears as **Description: <your content>** in the Liveboard schedule email notifications. * For Liveboards with both charts and tables, schedule creation is only supported in PDF and XLS formats. Schedules created in CSV formats for such Liveboards will fail to run. If `PDF` is set as the `file_format`, enable `pdf_options` to get the correct attachment. Not doing so may cause the attachment to be rendered empty. * To include only specific visualizations, specify the visualization GUIDs in the `visualization_identifiers` array. * You can schedule a Liveboard job to run periodically by setting frequency parameters. You can set the schedule to run daily, weekly, monthly or every n minutes or hours. The scheduled job can also be configured to run at a specific time of the day or on specific days of the week or month. Please ensure that when setting the schedule frequency for _minute of the object_, only values that are multiples of 5 are included. * If the `frequency` parameters are defined, you can set the time zone to a value that matches your server's time zone. For example, `US/Central`, `Etc/UTC`, `CET`. The default time zone is `America/Los_Angeles`. For more information about Liveboard jobs, see [ThoughtSpot Product Documentation](https://docs.thoughtspot.com/cloud/latest/liveboard-schedule). + +### Parameters + +| Name | Type | +|------------- | ------------- | +| **createScheduleRequest** | [**CreateScheduleRequest**](CreateScheduleRequest.md) + +### Return type + +[**ResponseSchedule**](ResponseSchedule.md) + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Schedule successfully created. | - | +| **400** | Invalid request. | - | +| **401** | Unauthorized access. | - | +| **403** | Forbidden access. | - | +| **500** | Unexpected error | - | + + +# **deleteSchedule** +> deleteSchedule(scheduleIdentifier) + + + + Deletes a scheduled job. Version: 9.4.0.cl or later Deletes a scheduled Liveboard job. Requires at least edit access to Liveboard or `ADMINISTRATION` (**Can administer Org**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `JOBSCHEDULING` (**Can schedule for others**) privilege is required. + +### Parameters + +| Name | Type | +|------------- | ------------- | +| **scheduleIdentifier** | **String** + +### Return type + +null (empty response body) + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **204** | Schedule successfully deleted. | - | +| **400** | Invalid request. | - | +| **401** | Unauthorized access. | - | +| **403** | Forbidden access. | - | +| **500** | Unexpected error | - | + + +# **searchSchedules** +> List<ResponseSchedule> searchSchedules(searchSchedulesRequest) + + + + Search Schedules Version: 9.4.0.cl or later Gets a list of scheduled jobs configured for a Liveboard. To get details of a specific scheduled job, specify the name or GUID of the scheduled job. Requires at least view access to Liveboards. **NOTE**: When filtering schedules by parameters other than `metadata`, set `record_size` to `-1` and `record_offset` to `0` for accurate results. + +### Parameters + +| Name | Type | +|------------- | ------------- | +| **searchSchedulesRequest** | [**SearchSchedulesRequest**](SearchSchedulesRequest.md) + +### Return type + +[**List<ResponseSchedule>**](ResponseSchedule.md) + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Schedule search result. | - | +| **400** | Invalid request. | - | +| **401** | Unauthorized access. | - | +| **403** | Forbidden access. | - | +| **500** | Unexpected error | - | + + +# **updateSchedule** +> updateSchedule(scheduleIdentifier, updateScheduleRequest) + + + + Update schedule. Version: 9.4.0.cl or later Updates a scheduled Liveboard job. Requires at least edit access to Liveboards. To update a schedule on behalf of another user, you need `ADMINISTRATION` (**Can administer Org**) or `JOBSCHEDULING` (**Can schedule for others**) privilege and edit access to the Liveboard. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `JOBSCHEDULING` (**Can schedule for others**) privilege is required. The API endpoint allows you to pause a scheduled job, change the status of a paused job. You can also edit the recipients list, frequency of the job, format of the file to send to the recipients in email notifications, PDF options, and time zone setting. + +### Parameters + +| Name | Type | +|------------- | ------------- | +| **scheduleIdentifier** | **String** +| **updateScheduleRequest** | [**UpdateScheduleRequest**](UpdateScheduleRequest.md) + +### Return type + +null (empty response body) + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **204** | Schedule successfully updated. | - | +| **400** | Invalid request. | - | +| **401** | Unauthorized access. | - | +| **403** | Forbidden access. | - | +| **500** | Unexpected error | - | + diff --git a/sdks/java/docs/SchedulesPdfOptionsInput.md b/sdks/java/docs/SchedulesPdfOptionsInput.md new file mode 100644 index 000000000..b6d5cbc56 --- /dev/null +++ b/sdks/java/docs/SchedulesPdfOptionsInput.md @@ -0,0 +1,35 @@ + + +# SchedulesPdfOptionsInput + +Options for PDF export. + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**completeLiveboard** | **Boolean** | Indicates whether to include complete Liveboard. | [optional] | +|**includeCoverPage** | **Boolean** | Indicates whether to include cover page with the Liveboard title. | [optional] | +|**includeCustomLogo** | **Boolean** | Indicates whether to include customized wide logo in the footer if available. | [optional] | +|**includeFilterPage** | **Boolean** | Indicates whether to include a page with all applied filters. | [optional] | +|**includePageNumber** | **Boolean** | Indicates whether to include page number in the footer of each page | [optional] | +|**pageFooterText** | **String** | Text to include in the footer of each page. | [optional] | +|**pageOrientation** | **String** | Page orientation of the PDF. | [optional] | +|**pageSize** | [**PageSizeEnum**](#PageSizeEnum) | Page size. | [optional] | +|**truncateTable** | **Boolean** | Indicates whether to include only first page of the tables. | [optional] | + + + +## Enum: PageSizeEnum + +| Name | Value | +|---- | -----| +| A4 | "A4" | +| TAB_BASED | "TAB_BASED" | + + +## Implemented Interfaces + +* Serializable + + diff --git a/sdks/java/docs/SchemaObject.md b/sdks/java/docs/SchemaObject.md new file mode 100644 index 000000000..66e862932 --- /dev/null +++ b/sdks/java/docs/SchemaObject.md @@ -0,0 +1,18 @@ + + +# SchemaObject + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**name** | **String** | Name of the schema. | | +|**tables** | [**List<Table>**](Table.md) | Tables in the schema. | [optional] | + + +## Implemented Interfaces + +* Serializable + + diff --git a/sdks/java/docs/Scope.md b/sdks/java/docs/Scope.md new file mode 100644 index 000000000..d4c45d428 --- /dev/null +++ b/sdks/java/docs/Scope.md @@ -0,0 +1,19 @@ + + +# Scope + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**accessType** | **String** | Object access scope type. | | +|**orgId** | **Integer** | Unique identifier of the metadata. | [optional] | +|**metadataId** | **String** | Unique identifier of the Org. | [optional] | + + +## Implemented Interfaces + +* Serializable + + diff --git a/sdks/java/docs/ScriptSrcUrls.md b/sdks/java/docs/ScriptSrcUrls.md new file mode 100644 index 000000000..ea0202dd1 --- /dev/null +++ b/sdks/java/docs/ScriptSrcUrls.md @@ -0,0 +1,19 @@ + + +# ScriptSrcUrls + +Script-src CSP settings. + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**enabled** | **Boolean** | Whether script-src customization is enabled. | [optional] | +|**urls** | **List<String>** | Allowed URLs for script-src directive. Can only be set if enabled is true. | [optional] | + + +## Implemented Interfaces + +* Serializable + + diff --git a/sdks/java/docs/ScriptSrcUrlsInput.md b/sdks/java/docs/ScriptSrcUrlsInput.md new file mode 100644 index 000000000..60c0499e7 --- /dev/null +++ b/sdks/java/docs/ScriptSrcUrlsInput.md @@ -0,0 +1,19 @@ + + +# ScriptSrcUrlsInput + +Input for script-src CSP settings. + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**enabled** | **Boolean** | Whether script-src customization is enabled. | [optional] | +|**urls** | **List<String>** | Allowed URLs for script-src directive. Can only be set if enabled is true. | [optional] | + + +## Implemented Interfaces + +* Serializable + + diff --git a/sdks/java/docs/SearchAuthSettingsRequest.md b/sdks/java/docs/SearchAuthSettingsRequest.md new file mode 100644 index 000000000..068aa79ad --- /dev/null +++ b/sdks/java/docs/SearchAuthSettingsRequest.md @@ -0,0 +1,35 @@ + + +# SearchAuthSettingsRequest + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**authType** | [**AuthTypeEnum**](#AuthTypeEnum) | Type of authentication mechanism to retrieve settings for. Currently supports TRUSTED_AUTH. | | +|**scope** | [**ScopeEnum**](#ScopeEnum) | Scope of auth settings to retrieve. When absent, both cluster and org settings are returned (subject to caller privileges). Set to CLUSTER to retrieve only cluster-level settings, or ORG to retrieve only org-level settings. | [optional] | + + + +## Enum: AuthTypeEnum + +| Name | Value | +|---- | -----| +| TRUSTED_AUTH | "TRUSTED_AUTH" | + + + +## Enum: ScopeEnum + +| Name | Value | +|---- | -----| +| CLUSTER | "CLUSTER" | +| ORG | "ORG" | + + +## Implemented Interfaces + +* Serializable + + diff --git a/sdks/java/docs/SearchAuthSettingsResponse.md b/sdks/java/docs/SearchAuthSettingsResponse.md new file mode 100644 index 000000000..edc6d370c --- /dev/null +++ b/sdks/java/docs/SearchAuthSettingsResponse.md @@ -0,0 +1,28 @@ + + +# SearchAuthSettingsResponse + +Response for searchAuthSettings. Contains auth type and cluster/org-level preferences. + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**authType** | [**AuthTypeEnum**](#AuthTypeEnum) | Type of authentication mechanism returned. | [optional] | +|**clusterPreferences** | [**AuthClusterPreferences**](AuthClusterPreferences.md) | | [optional] | +|**orgPreferences** | [**List<AuthOrgPreference>**](AuthOrgPreference.md) | Org-level authentication configurations. Present when org scope was requested and per-org auth feature is enabled. | [optional] | + + + +## Enum: AuthTypeEnum + +| Name | Value | +|---- | -----| +| TRUSTED_AUTH | "TRUSTED_AUTH" | + + +## Implemented Interfaces + +* Serializable + + diff --git a/sdks/java/docs/SearchCalendarsRequest.md b/sdks/java/docs/SearchCalendarsRequest.md new file mode 100644 index 000000000..67976690d --- /dev/null +++ b/sdks/java/docs/SearchCalendarsRequest.md @@ -0,0 +1,21 @@ + + +# SearchCalendarsRequest + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**connectionIdentifier** | **String** | Unique ID or name of the connection. | [optional] | +|**namePattern** | **String** | Pattern to match for calendar names (use '%' for wildcard match). | [optional] | +|**recordOffset** | **Integer** | The starting record number from where the records should be included. | [optional] | +|**recordSize** | **Integer** | The number of records that should be included. | [optional] | +|**sortOptions** | [**SortOption**](SortOption.md) | Sort options. | [optional] | + + +## Implemented Interfaces + +* Serializable + + diff --git a/sdks/java/docs/SearchChannelHistoryRequest.md b/sdks/java/docs/SearchChannelHistoryRequest.md new file mode 100644 index 000000000..b29800ca9 --- /dev/null +++ b/sdks/java/docs/SearchChannelHistoryRequest.md @@ -0,0 +1,41 @@ + + +# SearchChannelHistoryRequest + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**channelType** | [**ChannelTypeEnum**](#ChannelTypeEnum) | Type of communication channel to search history for. | | +|**jobIds** | **List<String>** | List of job execution record IDs to retrieve. | [optional] | +|**channelIdentifiers** | **List<String>** | List of channel IDs or names to filter by. | [optional] | +|**channelStatus** | [**ChannelStatusEnum**](#ChannelStatusEnum) | Filter by channel delivery status. | [optional] | +|**events** | [**List<ChannelHistoryEventInput>**](ChannelHistoryEventInput.md) | Filter by events that triggered the channel. | [optional] | +|**startEpochTimeInMillis** | **Float** | Filter records created on or after this time (epoch milliseconds). | [optional] | + + + +## Enum: ChannelTypeEnum + +| Name | Value | +|---- | -----| +| WEBHOOK | "WEBHOOK" | + + + +## Enum: ChannelStatusEnum + +| Name | Value | +|---- | -----| +| PENDING | "PENDING" | +| RETRY | "RETRY" | +| SUCCESS | "SUCCESS" | +| FAILED | "FAILED" | + + +## Implemented Interfaces + +* Serializable + + diff --git a/sdks/java/docs/SearchChannelHistoryResponse.md b/sdks/java/docs/SearchChannelHistoryResponse.md new file mode 100644 index 000000000..0de44f5d7 --- /dev/null +++ b/sdks/java/docs/SearchChannelHistoryResponse.md @@ -0,0 +1,18 @@ + + +# SearchChannelHistoryResponse + +Response wrapper for channel delivery history. + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**jobs** | [**List<ChannelHistoryJob>**](ChannelHistoryJob.md) | List of job execution records. | | + + +## Implemented Interfaces + +* Serializable + + diff --git a/sdks/java/docs/SearchCollectionsRequest.md b/sdks/java/docs/SearchCollectionsRequest.md new file mode 100644 index 000000000..f9e5f5ead --- /dev/null +++ b/sdks/java/docs/SearchCollectionsRequest.md @@ -0,0 +1,23 @@ + + +# SearchCollectionsRequest + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**namePattern** | **String** | A pattern to match case-insensitive name of the Collection object. Use '%' for wildcard match. | [optional] | +|**recordOffset** | **Integer** | The starting record number from where the records should be included. | [optional] | +|**recordSize** | **Integer** | The number of records that should be included. -1 implies no pagination. | [optional] | +|**collectionIdentifiers** | **List<String>** | Unique GUIDs of collections to search. Note: Collection names cannot be used as identifiers since duplicate names are allowed. | [optional] | +|**createdByUserIdentifiers** | **List<String>** | Filter collections by author. Provide unique IDs or names of users who created the collections. | [optional] | +|**includeMetadata** | **Boolean** | Include collection metadata items in the response. | [optional] | +|**sortOptions** | [**SortOptions**](SortOptions.md) | Sort options. | [optional] | + + +## Implemented Interfaces + +* Serializable + + diff --git a/sdks/java/docs/SearchCommitsRequest.md b/sdks/java/docs/SearchCommitsRequest.md new file mode 100644 index 000000000..77dc51e55 --- /dev/null +++ b/sdks/java/docs/SearchCommitsRequest.md @@ -0,0 +1,32 @@ + + +# SearchCommitsRequest + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**metadataIdentifier** | **String** | Unique ID or name of the metadata. | | +|**metadataType** | [**MetadataTypeEnum**](#MetadataTypeEnum) | Type of metadata. | [optional] | +|**branchName** | **String** | Name of the branch from which commit history needs to be displayed. Note: If no branch_name is specified, then commits will be returned for the default branch for this configuration. | [optional] | +|**recordOffset** | **Integer** | Record offset point in the commit history to display the response. Note: If no record offset is specified, the beginning of the record will be considered. | [optional] | +|**recordSize** | **Integer** | Number of history records from record offset point to be displayed in the response. Note: If no record size is specified, then all the records will be considered. | [optional] | + + + +## Enum: MetadataTypeEnum + +| Name | Value | +|---- | -----| +| LIVEBOARD | "LIVEBOARD" | +| ANSWER | "ANSWER" | +| LOGICAL_TABLE | "LOGICAL_TABLE" | +| CUSTOM_ACTION | "CUSTOM_ACTION" | + + +## Implemented Interfaces + +* Serializable + + diff --git a/sdks/java/docs/SearchCommunicationChannelPreferencesRequest.md b/sdks/java/docs/SearchCommunicationChannelPreferencesRequest.md new file mode 100644 index 000000000..20dea32ea --- /dev/null +++ b/sdks/java/docs/SearchCommunicationChannelPreferencesRequest.md @@ -0,0 +1,26 @@ + + +# SearchCommunicationChannelPreferencesRequest + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**clusterPreferences** | [**List<ClusterPreferencesEnum>**](#List<ClusterPreferencesEnum>) | Event types to search for in cluster-level preferences. | [optional] | +|**orgPreferences** | [**List<OrgPreferenceSearchCriteriaInput>**](OrgPreferenceSearchCriteriaInput.md) | Org-specific search criteria. | [optional] | + + + +## Enum: List<ClusterPreferencesEnum> + +| Name | Value | +|---- | -----| +| LIVEBOARD_SCHEDULE | "LIVEBOARD_SCHEDULE" | + + +## Implemented Interfaces + +* Serializable + + diff --git a/sdks/java/docs/SearchConfigRequest.md b/sdks/java/docs/SearchConfigRequest.md new file mode 100644 index 000000000..b6096e2ac --- /dev/null +++ b/sdks/java/docs/SearchConfigRequest.md @@ -0,0 +1,17 @@ + + +# SearchConfigRequest + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**orgIdentifiers** | **List<String>** | Applicable when Orgs is enabled in the cluster List of Org ids or name. Provide value -1 for cluster level. Example : [\"OrgID1-or-Name1\", \"OrgID2-or-Name2\"] Note: If no value is specified, then the configurations will be returned for all orgs the user has access to Version: 9.5.0.cl or later | [optional] | + + +## Implemented Interfaces + +* Serializable + + diff --git a/sdks/java/docs/SearchConnectionRequest.md b/sdks/java/docs/SearchConnectionRequest.md new file mode 100644 index 000000000..3d1f95cb6 --- /dev/null +++ b/sdks/java/docs/SearchConnectionRequest.md @@ -0,0 +1,97 @@ + + +# SearchConnectionRequest + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**connections** | [**List<ConnectionInput>**](ConnectionInput.md) | List of connections and name pattern | [optional] | +|**dataWarehouseTypes** | [**List<DataWarehouseTypesEnum>**](#List<DataWarehouseTypesEnum>) | Array of types of data warehouse defined for the connection. | [optional] | +|**recordOffset** | **Integer** | The starting record number from where the records should be included. | [optional] | +|**recordSize** | **Integer** | The number of records that should be included. | [optional] | +|**tagIdentifiers** | **List<String>** | Unique ID or name of tags. | [optional] | +|**dataWarehouseObjectType** | [**DataWarehouseObjectTypeEnum**](#DataWarehouseObjectTypeEnum) | Data warehouse object type. | [optional] | +|**sortOptions** | [**SortOptionInput**](SortOptionInput.md) | Sort options. | [optional] | +|**includeDetails** | **Boolean** | Indicates whether to include complete details of the connection objects. | [optional] | +|**_configuration** | **Object** | Configuration values. If empty we are fetching configuration from datasource based on given connection id. If required you can provide config details to fetch specific details. Example input: {}, {\"warehouse\":\"SMALL_WH\",\"database\":\"DEVELOPMENT\"}. This is only applicable when data_warehouse_object_type is selected. | [optional] | +|**authenticationType** | [**AuthenticationTypeEnum**](#AuthenticationTypeEnum) | List of authentication types to fetch data_ware_house_objects from external Data warehouse. This is only applicable when data_warehouse_object_type is selected. | [optional] | +|**showResolvedParameters** | **Boolean** | <div>Version: 10.9.0.cl or later </div> Indicates whether to show resolved parameterised values. | [optional] | + + + +## Enum: List<DataWarehouseTypesEnum> + +| Name | Value | +|---- | -----| +| SNOWFLAKE | "SNOWFLAKE" | +| AMAZON_REDSHIFT | "AMAZON_REDSHIFT" | +| GOOGLE_BIGQUERY | "GOOGLE_BIGQUERY" | +| AZURE_SYNAPSE | "AZURE_SYNAPSE" | +| TERADATA | "TERADATA" | +| SAP_HANA | "SAP_HANA" | +| STARBURST | "STARBURST" | +| ORACLE_ADW | "ORACLE_ADW" | +| DATABRICKS | "DATABRICKS" | +| DENODO | "DENODO" | +| DREMIO | "DREMIO" | +| TRINO | "TRINO" | +| PRESTO | "PRESTO" | +| POSTGRES | "POSTGRES" | +| SQLSERVER | "SQLSERVER" | +| MYSQL | "MYSQL" | +| GENERIC_JDBC | "GENERIC_JDBC" | +| AMAZON_RDS_POSTGRESQL | "AMAZON_RDS_POSTGRESQL" | +| AMAZON_AURORA_POSTGRESQL | "AMAZON_AURORA_POSTGRESQL" | +| AMAZON_RDS_MYSQL | "AMAZON_RDS_MYSQL" | +| AMAZON_AURORA_MYSQL | "AMAZON_AURORA_MYSQL" | +| LOOKER | "LOOKER" | +| AMAZON_ATHENA | "AMAZON_ATHENA" | +| SINGLESTORE | "SINGLESTORE" | +| GCP_SQLSERVER | "GCP_SQLSERVER" | +| GCP_ALLOYDB_POSTGRESQL | "GCP_ALLOYDB_POSTGRESQL" | +| GCP_POSTGRESQL | "GCP_POSTGRESQL" | +| GCP_MYSQL | "GCP_MYSQL" | +| MODE | "MODE" | +| GOOGLE_SHEETS | "GOOGLE_SHEETS" | +| FALCON | "FALCON" | +| FALCON_ONPREM | "FALCON_ONPREM" | +| CLICKHOUSE | "CLICKHOUSE" | +| IOMETE | "IOMETE" | + + + +## Enum: DataWarehouseObjectTypeEnum + +| Name | Value | +|---- | -----| +| DATABASE | "DATABASE" | +| SCHEMA | "SCHEMA" | +| TABLE | "TABLE" | +| COLUMN | "COLUMN" | + + + +## Enum: AuthenticationTypeEnum + +| Name | Value | +|---- | -----| +| SERVICE_ACCOUNT | "SERVICE_ACCOUNT" | +| OAUTH | "OAUTH" | +| IAM | "IAM" | +| EXTOAUTH | "EXTOAUTH" | +| OAUTH_WITH_SERVICE_PRINCIPAL | "OAUTH_WITH_SERVICE_PRINCIPAL" | +| PERSONAL_ACCESS_TOKEN | "PERSONAL_ACCESS_TOKEN" | +| KEY_PAIR | "KEY_PAIR" | +| OAUTH_WITH_PKCE | "OAUTH_WITH_PKCE" | +| EXTOAUTH_WITH_PKCE | "EXTOAUTH_WITH_PKCE" | +| OAUTH_WITH_PEZ | "OAUTH_WITH_PEZ" | +| OAUTH_CLIENT_CREDENTIALS | "OAUTH_CLIENT_CREDENTIALS" | + + +## Implemented Interfaces + +* Serializable + + diff --git a/sdks/java/docs/SearchConnectionResponse.md b/sdks/java/docs/SearchConnectionResponse.md new file mode 100644 index 000000000..e60900412 --- /dev/null +++ b/sdks/java/docs/SearchConnectionResponse.md @@ -0,0 +1,63 @@ + + +# SearchConnectionResponse + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**id** | **String** | Unique ID of the connection. | | +|**name** | **String** | Name of the connection. | | +|**description** | **String** | Description of the connection. | [optional] | +|**dataWarehouseType** | [**DataWarehouseTypeEnum**](#DataWarehouseTypeEnum) | Type of data warehouse. | | +|**dataWarehouseObjects** | [**DataWarehouseObjects**](DataWarehouseObjects.md) | | [optional] | +|**details** | **Object** | Details of the connection. | [optional] | + + + +## Enum: DataWarehouseTypeEnum + +| Name | Value | +|---- | -----| +| SNOWFLAKE | "SNOWFLAKE" | +| AMAZON_REDSHIFT | "AMAZON_REDSHIFT" | +| GOOGLE_BIGQUERY | "GOOGLE_BIGQUERY" | +| AZURE_SYNAPSE | "AZURE_SYNAPSE" | +| TERADATA | "TERADATA" | +| SAP_HANA | "SAP_HANA" | +| STARBURST | "STARBURST" | +| ORACLE_ADW | "ORACLE_ADW" | +| DATABRICKS | "DATABRICKS" | +| DENODO | "DENODO" | +| DREMIO | "DREMIO" | +| TRINO | "TRINO" | +| PRESTO | "PRESTO" | +| POSTGRES | "POSTGRES" | +| SQLSERVER | "SQLSERVER" | +| MYSQL | "MYSQL" | +| GENERIC_JDBC | "GENERIC_JDBC" | +| AMAZON_RDS_POSTGRESQL | "AMAZON_RDS_POSTGRESQL" | +| AMAZON_AURORA_POSTGRESQL | "AMAZON_AURORA_POSTGRESQL" | +| AMAZON_RDS_MYSQL | "AMAZON_RDS_MYSQL" | +| AMAZON_AURORA_MYSQL | "AMAZON_AURORA_MYSQL" | +| LOOKER | "LOOKER" | +| AMAZON_ATHENA | "AMAZON_ATHENA" | +| SINGLESTORE | "SINGLESTORE" | +| GCP_SQLSERVER | "GCP_SQLSERVER" | +| GCP_ALLOYDB_POSTGRESQL | "GCP_ALLOYDB_POSTGRESQL" | +| GCP_POSTGRESQL | "GCP_POSTGRESQL" | +| GCP_MYSQL | "GCP_MYSQL" | +| MODE | "MODE" | +| GOOGLE_SHEETS | "GOOGLE_SHEETS" | +| FALCON | "FALCON" | +| FALCON_ONPREM | "FALCON_ONPREM" | +| CLICKHOUSE | "CLICKHOUSE" | +| IOMETE | "IOMETE" | + + +## Implemented Interfaces + +* Serializable + + diff --git a/sdks/java/docs/SearchCustomActionsRequest.md b/sdks/java/docs/SearchCustomActionsRequest.md new file mode 100644 index 000000000..b41b4806d --- /dev/null +++ b/sdks/java/docs/SearchCustomActionsRequest.md @@ -0,0 +1,32 @@ + + +# SearchCustomActionsRequest + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**customActionIdentifier** | **String** | Name or ID of the custom action. | [optional] | +|**namePattern** | **String** | A pattern to match case-insensitive name of the custom-action object. | [optional] | +|**defaultActionConfig** | [**DefaultActionConfigSearchInput**](DefaultActionConfigSearchInput.md) | Default Custom action configuration. This includes if the custom action is available on all visualizations. By default, a custom action is added to all visualizations and Answers. | [optional] | +|**includeGroupAssociations** | **Boolean** | When set to true, returns the associated groups for a custom action. | [optional] | +|**includeMetadataAssociations** | **Boolean** | When set to true, returns the associated metadata for a custom action. | [optional] | +|**metadata** | [**List<CustomActionMetadataTypeInput>**](CustomActionMetadataTypeInput.md) | Search with a given metadata identifier. | [optional] | +|**type** | [**TypeEnum**](#TypeEnum) | Filter the action objects based on type | [optional] | + + + +## Enum: TypeEnum + +| Name | Value | +|---- | -----| +| CALLBACK | "CALLBACK" | +| URL | "URL" | + + +## Implemented Interfaces + +* Serializable + + diff --git a/sdks/java/docs/SearchDataRequest.md b/sdks/java/docs/SearchDataRequest.md new file mode 100644 index 000000000..99043e2fe --- /dev/null +++ b/sdks/java/docs/SearchDataRequest.md @@ -0,0 +1,33 @@ + + +# SearchDataRequest + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**queryString** | **String** | Query string with search tokens. For example, <code>[Sales][Region]</code>. See [API Documentation](https://developers.thoughtspot.com/docs/fetch-data-and-report-apis#_search_data_api) | | +|**logicalTableIdentifier** | **String** | GUID of the data source object, such as a Worksheet, View, or Table. You can find the GUID of a data object from the UI or via API. See [API Documentation](https://developers.thoughtspot.com/docs/fetch-data-and-report-apis#_search_query) for more details. | | +|**dataFormat** | [**DataFormatEnum**](#DataFormatEnum) | JSON output in compact or full format. The FULL option is available in 9.12.5.cl or later. | [optional] | +|**recordOffset** | **Integer** | The starting record number from where the records should be included. | [optional] | +|**recordSize** | **Integer** | The number of records to include in a batch. | [optional] | +|**runtimeFilter** | **Object** | JSON object with representing filter condition to apply filters at runtime. For example, <code> {\"col1\": \"item type\", \"op1\": \"EQ\", \"val1\": \"Bags\"} </code>. You can add multiple keys by incrementing the number at the end, for example, col2, op2, val2, and col3, op3, val3. For more information, see [API Documentation](https://developers.thoughtspot.com/docs/fetch-data-and-report-apis#_runtime_filters). | [optional] | +|**runtimeSort** | **Object** | JSON object representing columns to sort data at runtime. For example, <code> {\"sortCol1\": \"sales\", \"asc1\": true} </code>. You can add multiple keys by incrementing the number at the end, for example, sortCol1, asc2. For more information, see [API Documentation](https://developers.thoughtspot.com/docs/fetch-data-and-report-apis#_runtime_sort). | [optional] | +|**runtimeParamOverride** | **Object** | JSON object for setting values of parameters at runtime. For example, <code> {\"param1\": \"Double List Param\", \"paramVal1\": 0.5}</code>. You can add multiple keys by incrementing the number at the end, for example, param2, paramVal2. For more information, see [API Documentation](https://developers.thoughtspot.com/docs/fetch-data-and-report-apis#_runtime_parameters). | [optional] | + + + +## Enum: DataFormatEnum + +| Name | Value | +|---- | -----| +| FULL | "FULL" | +| COMPACT | "COMPACT" | + + +## Implemented Interfaces + +* Serializable + + diff --git a/sdks/java/docs/SearchDataResponse.md b/sdks/java/docs/SearchDataResponse.md new file mode 100644 index 000000000..7c743fd19 --- /dev/null +++ b/sdks/java/docs/SearchDataResponse.md @@ -0,0 +1,18 @@ + + +# SearchDataResponse + +Response format associated with the search data API. + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**contents** | [**List<AnswerContent>**](AnswerContent.md) | Data content of metadata objects | | + + +## Implemented Interfaces + +* Serializable + + diff --git a/sdks/java/docs/SearchEmailCustomizationRequest.md b/sdks/java/docs/SearchEmailCustomizationRequest.md new file mode 100644 index 000000000..9b96e4498 --- /dev/null +++ b/sdks/java/docs/SearchEmailCustomizationRequest.md @@ -0,0 +1,17 @@ + + +# SearchEmailCustomizationRequest + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**orgIdentifiers** | **List<String>** | Unique ID or name of org Version: 10.12.0.cl or later | [optional] | + + +## Implemented Interfaces + +* Serializable + + diff --git a/sdks/java/docs/SearchMetadataRequest.md b/sdks/java/docs/SearchMetadataRequest.md new file mode 100644 index 000000000..13a102a7c --- /dev/null +++ b/sdks/java/docs/SearchMetadataRequest.md @@ -0,0 +1,60 @@ + + +# SearchMetadataRequest + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**metadata** | [**List<MetadataListItemInput>**](MetadataListItemInput.md) | Metadata objects such as Liveboards, Answers, and Worksheets. | [optional] | +|**permissions** | [**List<PermissionInput>**](PermissionInput.md) | Object permission details to search by. | [optional] | +|**createdByUserIdentifiers** | **List<String>** | GUID or name of user who created the metadata object. | [optional] | +|**dependentObjectVersion** | [**DependentObjectVersionEnum**](#DependentObjectVersionEnum) | Version of the dependent table of the metadata objects like Worksheets. | [optional] | +|**excludeObjects** | [**List<ExcludeMetadataListItemInput>**](ExcludeMetadataListItemInput.md) | List of metadata objects to exclude from search. | [optional] | +|**favoriteObjectOptions** | [**FavoriteObjectOptionsInput**](FavoriteObjectOptionsInput.md) | Options to sort the API response by objects set as favorites for the logged-in user or the users specified in the API request. | [optional] | +|**includeAutoCreatedObjects** | **Boolean** | Includes system-generated metadata objects. | [optional] | +|**includeDependentObjects** | **Boolean** | Includes dependents of the metadata object specified in the API request. For example, a worksheet can consist of dependent objects such as Liveboards or Answers. | [optional] | +|**dependentObjectsRecordSize** | **Integer** | The maximum number of dependents to include per metadata object. | [optional] | +|**includeDetails** | **Boolean** | Includes complete details of the metadata objects. | [optional] | +|**includePersonalisedViews** | **Boolean** | When set to true and include_details is also true, includes personalised views in the metadata_detail for LIVEBOARD objects. | [optional] | +|**includeHeaders** | **Boolean** | Includes headers of the metadata objects. | [optional] | +|**includeHiddenObjects** | **Boolean** | Includes details of the hidden objects, such as a column in a worksheet or a table. | [optional] | +|**includeIncompleteObjects** | **Boolean** | Includes objects with incomplete metadata. | [optional] | +|**includeVisualizationHeaders** | **Boolean** | Includes visualization headers of the specified Liveboard object. | [optional] | +|**includeWorksheetSearchAssistData** | **Boolean** | If search assistance lessons are configured on a worksheet, the API returns the search assist data for Worksheet objects. | [optional] | +|**modifiedByUserIdentifiers** | **List<String>** | Includes ID or names of the users who modified the metadata object. | [optional] | +|**recordOffset** | **Integer** | The starting record number from where the records should be included. | [optional] | +|**recordSize** | **Integer** | The number of records that should be included. It is recommended to use a smaller `record_size` when fetching dependent objects or any of the additional metadata detail options. | [optional] | +|**sortOptions** | [**MetadataSearchSortOptions**](MetadataSearchSortOptions.md) | Sort options to filter metadata details. | [optional] | +|**tagIdentifiers** | **List<String>** | Tags to filter metadata objects by | [optional] | +|**includeStats** | **Boolean** | Indicates whether to include stats of the metadata objects. | [optional] | +|**includeDiscoverableObjects** | **Boolean** | <div>Version: 10.7.0.cl or later </div> Boolean to indicate whether to include discoverable metadata objects. | [optional] | +|**showResolvedParameters** | **Boolean** | <div>Version: 10.9.0.cl or later </div> Indicates whether to show resolved parameterised values. | [optional] | +|**liveboardResponseVersion** | [**LiveboardResponseVersionEnum**](#LiveboardResponseVersionEnum) | Indicates the model version of Liveboard to be attached in metadata detail. | [optional] | +|**includeOnlyPublishedObjects** | **Boolean** | <div>Version: 10.11.0.cl or later </div> If only published objects should be returned | [optional] | + + + +## Enum: DependentObjectVersionEnum + +| Name | Value | +|---- | -----| +| V1 | "V1" | +| V2 | "V2" | + + + +## Enum: LiveboardResponseVersionEnum + +| Name | Value | +|---- | -----| +| V1 | "V1" | +| V2 | "V2" | + + +## Implemented Interfaces + +* Serializable + + diff --git a/sdks/java/docs/SearchOrgsRequest.md b/sdks/java/docs/SearchOrgsRequest.md new file mode 100644 index 000000000..417c7724c --- /dev/null +++ b/sdks/java/docs/SearchOrgsRequest.md @@ -0,0 +1,39 @@ + + +# SearchOrgsRequest + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**orgIdentifier** | **String** | ID or name of the Org | [optional] | +|**description** | **String** | Description of the Org | [optional] | +|**visibility** | [**VisibilityEnum**](#VisibilityEnum) | Visibility of the Org | [optional] | +|**status** | [**StatusEnum**](#StatusEnum) | Status of the Org | [optional] | +|**userIdentifiers** | **List<String>** | GUIDs or names of the users for which you want to retrieve the Orgs data | [optional] | + + + +## Enum: VisibilityEnum + +| Name | Value | +|---- | -----| +| SHOW | "SHOW" | +| HIDDEN | "HIDDEN" | + + + +## Enum: StatusEnum + +| Name | Value | +|---- | -----| +| ACTIVE | "ACTIVE" | +| IN_ACTIVE | "IN_ACTIVE" | + + +## Implemented Interfaces + +* Serializable + + diff --git a/sdks/java/docs/SearchRoleResponse.md b/sdks/java/docs/SearchRoleResponse.md new file mode 100644 index 000000000..3d636cc41 --- /dev/null +++ b/sdks/java/docs/SearchRoleResponse.md @@ -0,0 +1,105 @@ + + +# SearchRoleResponse + +Response for search role api should handle hidden privileges as well. + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**id** | **String** | Unique Id of the role. | | +|**name** | **String** | Name of the role | | +|**description** | **String** | Description of the role | | +|**groupsAssignedCount** | **Integer** | number of groups assigned with this role | [optional] | +|**orgs** | [**List<GenericInfo>**](GenericInfo.md) | Orgs in which role exists. | [optional] | +|**groups** | [**List<GenericInfo>**](GenericInfo.md) | Details of groups assigned with this role | [optional] | +|**privileges** | [**List<PrivilegesEnum>**](#List<PrivilegesEnum>) | Privileges granted to the role. | | +|**permission** | [**PermissionEnum**](#PermissionEnum) | Permission details of the Role | [optional] | +|**authorId** | **String** | Unique identifier of author of the role. | [optional] | +|**modifierId** | **String** | Unique identifier of modifier of the role. | [optional] | +|**creationTimeInMillis** | **Object** | Creation time of the role in milliseconds. | [optional] | +|**modificationTimeInMillis** | **Object** | Last modified time of the role in milliseconds. | [optional] | +|**deleted** | **Boolean** | Indicates whether the role is deleted. | [optional] | +|**deprecated** | **Boolean** | Indicates whether the role is deprecated. | [optional] | +|**external** | **Boolean** | Indicates whether the role is external. | [optional] | +|**hidden** | **Boolean** | Indicates whether the role is hidden. | [optional] | +|**sharedViaConnection** | **Boolean** | Indicates whether the role is shared via connection | [optional] | + + + +## Enum: List<PrivilegesEnum> + +| Name | Value | +|---- | -----| +| UNKNOWN | "UNKNOWN" | +| ADMINISTRATION | "ADMINISTRATION" | +| AUTHORING | "AUTHORING" | +| USERDATAUPLOADING | "USERDATAUPLOADING" | +| DATADOWNLOADING | "DATADOWNLOADING" | +| USERMANAGEMENT | "USERMANAGEMENT" | +| SECURITYMANAGEMENT | "SECURITYMANAGEMENT" | +| LOGICALMODELING | "LOGICALMODELING" | +| DATAMANAGEMENT | "DATAMANAGEMENT" | +| TAGMANAGEMENT | "TAGMANAGEMENT" | +| SHAREWITHALL | "SHAREWITHALL" | +| SYSTEMMANAGEMENT | "SYSTEMMANAGEMENT" | +| JOBSCHEDULING | "JOBSCHEDULING" | +| A3_ANALYSIS | "A3ANALYSIS" | +| EXPERIMENTALFEATUREPRIVILEGE | "EXPERIMENTALFEATUREPRIVILEGE" | +| BYPASSRLS | "BYPASSRLS" | +| RANALYSIS | "RANALYSIS" | +| DISABLE_PINBOARD_CREATION | "DISABLE_PINBOARD_CREATION" | +| DEVELOPER | "DEVELOPER" | +| APPLICATION_ADMINISTRATION | "APPLICATION_ADMINISTRATION" | +| USER_ADMINISTRATION | "USER_ADMINISTRATION" | +| GROUP_ADMINISTRATION | "GROUP_ADMINISTRATION" | +| BACKUP_ADMINISTRATION | "BACKUP_ADMINISTRATION" | +| SYSTEM_INFO_ADMINISTRATION | "SYSTEM_INFO_ADMINISTRATION" | +| ENABLESPOTAPPCREATION | "ENABLESPOTAPPCREATION" | +| SYNCMANAGEMENT | "SYNCMANAGEMENT" | +| ORG_ADMINISTRATION | "ORG_ADMINISTRATION" | +| ROLE_ADMINISTRATION | "ROLE_ADMINISTRATION" | +| AUTHENTICATION_ADMINISTRATION | "AUTHENTICATION_ADMINISTRATION" | +| BILLING_INFO_ADMINISTRATION | "BILLING_INFO_ADMINISTRATION" | +| PREVIEW_THOUGHTSPOT_SAGE | "PREVIEW_THOUGHTSPOT_SAGE" | +| LIVEBOARD_VERIFIER | "LIVEBOARD_VERIFIER" | +| CAN_MANAGE_CUSTOM_CALENDAR | "CAN_MANAGE_CUSTOM_CALENDAR" | +| CAN_CREATE_OR_EDIT_CONNECTIONS | "CAN_CREATE_OR_EDIT_CONNECTIONS" | +| CAN_CONFIGURE_CONNECTIONS | "CAN_CONFIGURE_CONNECTIONS" | +| CAN_MANAGE_WORKSHEET_VIEWS_TABLES | "CAN_MANAGE_WORKSHEET_VIEWS_TABLES" | +| CAN_MANAGE_VERSION_CONTROL | "CAN_MANAGE_VERSION_CONTROL" | +| THIRDPARTY_ANALYSIS | "THIRDPARTY_ANALYSIS" | +| CONTROL_TRUSTED_AUTH | "CONTROL_TRUSTED_AUTH" | +| CAN_CREATE_CATALOG | "CAN_CREATE_CATALOG" | +| ALLOW_NON_EMBED_FULL_APP_ACCESS | "ALLOW_NON_EMBED_FULL_APP_ACCESS" | +| CAN_ACCESS_ANALYST_STUDIO | "CAN_ACCESS_ANALYST_STUDIO" | +| CAN_MANAGE_ANALYST_STUDIO | "CAN_MANAGE_ANALYST_STUDIO" | +| CAN_VIEW_FOLDERS | "CAN_VIEW_FOLDERS" | +| CAN_MODIDY_FOLDERS | "CAN_MODIDY_FOLDERS" | +| CAN_MANAGE_VARIABLES | "CAN_MANAGE_VARIABLES" | +| CAN_MANAGE_AGENTSPOT | "CAN_MANAGE_AGENTSPOT" | +| CAN_ACCESS_AGENTSPOT | "CAN_ACCESS_AGENTSPOT" | +| PREVIEW_DOCUMENT_SEARCH | "PREVIEW_DOCUMENT_SEARCH" | +| CAN_SETUP_VERSION_CONTROL | "CAN_SETUP_VERSION_CONTROL" | +| CAN_MANAGE_WEBHOOKS | "CAN_MANAGE_WEBHOOKS" | +| CAN_DOWNLOAD_VISUALS | "CAN_DOWNLOAD_VISUALS" | +| CAN_DOWNLOAD_DETAILED_DATA | "CAN_DOWNLOAD_DETAILED_DATA" | +| CAN_USE_SPOTTER | "CAN_USE_SPOTTER" | + + + +## Enum: PermissionEnum + +| Name | Value | +|---- | -----| +| READ_ONLY | "READ_ONLY" | +| MODIFY | "MODIFY" | +| NO_ACCESS | "NO_ACCESS" | + + +## Implemented Interfaces + +* Serializable + + diff --git a/sdks/java/docs/SearchRolesRequest.md b/sdks/java/docs/SearchRolesRequest.md new file mode 100644 index 000000000..ce8076d7c --- /dev/null +++ b/sdks/java/docs/SearchRolesRequest.md @@ -0,0 +1,95 @@ + + +# SearchRolesRequest + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**roleIdentifiers** | **List<String>** | unique ID or name of the Roles | [optional] | +|**orgIdentifiers** | **List<String>** | Unique Id or name of the Organisation | [optional] | +|**groupIdentifiers** | **List<String>** | Unique Id or name of the User Group | [optional] | +|**privileges** | [**List<PrivilegesEnum>**](#List<PrivilegesEnum>) | Privileges assigned to the Role. See [Documentation](https://developers.thoughtspot.com/docs/rbac#_role_categories_and_privileges)for supported roles privileges. | [optional] | +|**deprecated** | **Boolean** | Indicates whether the Role is deprecated. | [optional] | +|**external** | **Boolean** | Indicates whether the Role is external | [optional] | +|**sharedViaConnection** | **Boolean** | Indicates whether the Role is shared via connection | [optional] | +|**permissions** | [**List<PermissionsEnum>**](#List<PermissionsEnum>) | Permission details of the Role | [optional] | + + + +## Enum: List<PrivilegesEnum> + +| Name | Value | +|---- | -----| +| UNKNOWN | "UNKNOWN" | +| ADMINISTRATION | "ADMINISTRATION" | +| AUTHORING | "AUTHORING" | +| USERDATAUPLOADING | "USERDATAUPLOADING" | +| DATADOWNLOADING | "DATADOWNLOADING" | +| USERMANAGEMENT | "USERMANAGEMENT" | +| SECURITYMANAGEMENT | "SECURITYMANAGEMENT" | +| LOGICALMODELING | "LOGICALMODELING" | +| DATAMANAGEMENT | "DATAMANAGEMENT" | +| TAGMANAGEMENT | "TAGMANAGEMENT" | +| SHAREWITHALL | "SHAREWITHALL" | +| SYSTEMMANAGEMENT | "SYSTEMMANAGEMENT" | +| JOBSCHEDULING | "JOBSCHEDULING" | +| A3_ANALYSIS | "A3ANALYSIS" | +| EXPERIMENTALFEATUREPRIVILEGE | "EXPERIMENTALFEATUREPRIVILEGE" | +| BYPASSRLS | "BYPASSRLS" | +| RANALYSIS | "RANALYSIS" | +| DISABLE_PINBOARD_CREATION | "DISABLE_PINBOARD_CREATION" | +| DEVELOPER | "DEVELOPER" | +| APPLICATION_ADMINISTRATION | "APPLICATION_ADMINISTRATION" | +| USER_ADMINISTRATION | "USER_ADMINISTRATION" | +| GROUP_ADMINISTRATION | "GROUP_ADMINISTRATION" | +| BACKUP_ADMINISTRATION | "BACKUP_ADMINISTRATION" | +| SYSTEM_INFO_ADMINISTRATION | "SYSTEM_INFO_ADMINISTRATION" | +| ENABLESPOTAPPCREATION | "ENABLESPOTAPPCREATION" | +| SYNCMANAGEMENT | "SYNCMANAGEMENT" | +| ORG_ADMINISTRATION | "ORG_ADMINISTRATION" | +| ROLE_ADMINISTRATION | "ROLE_ADMINISTRATION" | +| AUTHENTICATION_ADMINISTRATION | "AUTHENTICATION_ADMINISTRATION" | +| BILLING_INFO_ADMINISTRATION | "BILLING_INFO_ADMINISTRATION" | +| PREVIEW_THOUGHTSPOT_SAGE | "PREVIEW_THOUGHTSPOT_SAGE" | +| LIVEBOARD_VERIFIER | "LIVEBOARD_VERIFIER" | +| CAN_MANAGE_CUSTOM_CALENDAR | "CAN_MANAGE_CUSTOM_CALENDAR" | +| CAN_CREATE_OR_EDIT_CONNECTIONS | "CAN_CREATE_OR_EDIT_CONNECTIONS" | +| CAN_CONFIGURE_CONNECTIONS | "CAN_CONFIGURE_CONNECTIONS" | +| CAN_MANAGE_WORKSHEET_VIEWS_TABLES | "CAN_MANAGE_WORKSHEET_VIEWS_TABLES" | +| CAN_MANAGE_VERSION_CONTROL | "CAN_MANAGE_VERSION_CONTROL" | +| THIRDPARTY_ANALYSIS | "THIRDPARTY_ANALYSIS" | +| CONTROL_TRUSTED_AUTH | "CONTROL_TRUSTED_AUTH" | +| CAN_CREATE_CATALOG | "CAN_CREATE_CATALOG" | +| ALLOW_NON_EMBED_FULL_APP_ACCESS | "ALLOW_NON_EMBED_FULL_APP_ACCESS" | +| CAN_ACCESS_ANALYST_STUDIO | "CAN_ACCESS_ANALYST_STUDIO" | +| CAN_MANAGE_ANALYST_STUDIO | "CAN_MANAGE_ANALYST_STUDIO" | +| CAN_VIEW_FOLDERS | "CAN_VIEW_FOLDERS" | +| CAN_MODIDY_FOLDERS | "CAN_MODIDY_FOLDERS" | +| CAN_MANAGE_VARIABLES | "CAN_MANAGE_VARIABLES" | +| CAN_MANAGE_AGENTSPOT | "CAN_MANAGE_AGENTSPOT" | +| CAN_ACCESS_AGENTSPOT | "CAN_ACCESS_AGENTSPOT" | +| PREVIEW_DOCUMENT_SEARCH | "PREVIEW_DOCUMENT_SEARCH" | +| CAN_SETUP_VERSION_CONTROL | "CAN_SETUP_VERSION_CONTROL" | +| CAN_MANAGE_WEBHOOKS | "CAN_MANAGE_WEBHOOKS" | +| CAN_DOWNLOAD_VISUALS | "CAN_DOWNLOAD_VISUALS" | +| CAN_DOWNLOAD_DETAILED_DATA | "CAN_DOWNLOAD_DETAILED_DATA" | +| CAN_USE_SPOTTER | "CAN_USE_SPOTTER" | + + + +## Enum: List<PermissionsEnum> + +| Name | Value | +|---- | -----| +| READ_ONLY | "READ_ONLY" | +| MODIFY | "MODIFY" | +| NO_ACCESS | "NO_ACCESS" | + + +## Implemented Interfaces + +* Serializable + + diff --git a/sdks/java/docs/SearchSchedulesRequest.md b/sdks/java/docs/SearchSchedulesRequest.md new file mode 100644 index 000000000..cacacfc17 --- /dev/null +++ b/sdks/java/docs/SearchSchedulesRequest.md @@ -0,0 +1,22 @@ + + +# SearchSchedulesRequest + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**metadata** | [**List<MetadataInput>**](MetadataInput.md) | Metadata objects associated with the scheduled jobs. | [optional] | +|**recordOffset** | **Integer** | The starting record number from where the records should be included. | [optional] | +|**recordSize** | **Integer** | The number of records that should be included. | [optional] | +|**sortOptions** | [**SortingOptions**](SortingOptions.md) | Sort options. | [optional] | +|**historyRunsOptions** | [**ScheduleHistoryRunsOptionsInput**](ScheduleHistoryRunsOptionsInput.md) | Options while fetching history runs for the schedule. | [optional] | +|**scheduleIdentifiers** | **List<String>** | unique ID or name of the Schedule | [optional] | + + +## Implemented Interfaces + +* Serializable + + diff --git a/sdks/java/docs/SearchSecuritySettingsRequest.md b/sdks/java/docs/SearchSecuritySettingsRequest.md new file mode 100644 index 000000000..190c6b190 --- /dev/null +++ b/sdks/java/docs/SearchSecuritySettingsRequest.md @@ -0,0 +1,26 @@ + + +# SearchSecuritySettingsRequest + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**scope** | [**ScopeEnum**](#ScopeEnum) | Scope of security settings to retrieve. CLUSTER returns cluster-level settings, ORG returns org-level settings for the current org. If not specified, returns both cluster and org settings based on user privileges. | [optional] | + + + +## Enum: ScopeEnum + +| Name | Value | +|---- | -----| +| CLUSTER | "CLUSTER" | +| ORG | "ORG" | + + +## Implemented Interfaces + +* Serializable + + diff --git a/sdks/java/docs/SearchTagsRequest.md b/sdks/java/docs/SearchTagsRequest.md new file mode 100644 index 000000000..3eafe1f97 --- /dev/null +++ b/sdks/java/docs/SearchTagsRequest.md @@ -0,0 +1,19 @@ + + +# SearchTagsRequest + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**tagIdentifier** | **String** | Name or Id of the tag. | [optional] | +|**namePattern** | **String** | A pattern to match case-insensitive name of the Tag object. | [optional] | +|**color** | **String** | Color of the tag. | [optional] | + + +## Implemented Interfaces + +* Serializable + + diff --git a/sdks/java/docs/SearchUserGroupsRequest.md b/sdks/java/docs/SearchUserGroupsRequest.md new file mode 100644 index 000000000..d0d78d706 --- /dev/null +++ b/sdks/java/docs/SearchUserGroupsRequest.md @@ -0,0 +1,105 @@ + + +# SearchUserGroupsRequest + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**defaultLiveboardIdentifiers** | **List<String>** | GUID of Liveboards that are assigned as default Liveboards to the users in the group. | [optional] | +|**description** | **String** | Description of the group | [optional] | +|**displayName** | **String** | Display name of the group | [optional] | +|**namePattern** | **String** | A pattern to match case-insensitive name of the Group object. | [optional] | +|**groupIdentifier** | **String** | GUID or name of the group | [optional] | +|**orgIdentifiers** | **List<String>** | ID or name of the Org to which the group belongs | [optional] | +|**privileges** | [**List<PrivilegesEnum>**](#List<PrivilegesEnum>) | Privileges assigned to the group. | [optional] | +|**subGroupIdentifiers** | **List<String>** | GUID or name of the sub groups. A subgroup is a group assigned to a parent group. | [optional] | +|**type** | [**TypeEnum**](#TypeEnum) | Group type. | [optional] | +|**userIdentifiers** | **List<String>** | GUID or name of the users assigned to the group. | [optional] | +|**visibility** | [**VisibilityEnum**](#VisibilityEnum) | Visibility of the group. To make a group visible to other users and groups, set the visibility to SHAREABLE. | [optional] | +|**roleIdentifiers** | **List<String>** | Filter groups with a list of Roles assigned to a group | [optional] | +|**recordOffset** | **Integer** | The starting record number from where the records should be included. | [optional] | +|**recordSize** | **Integer** | The number of records that should be included. | [optional] | +|**sortOptions** | [**SortOptions**](SortOptions.md) | Sort options to filter group details. | [optional] | +|**includeUsers** | **Boolean** | <div>Version: 10.10.0.cl or later </div> Define Parameter to consider if the users should be included in group search response. | [optional] | +|**includeSubGroups** | **Boolean** | <div>Version: 10.10.0.cl or later </div> Define Parameter to consider if the sub groups should be included in group search response. | [optional] | + + + +## Enum: List<PrivilegesEnum> + +| Name | Value | +|---- | -----| +| ADMINISTRATION | "ADMINISTRATION" | +| AUTHORING | "AUTHORING" | +| USERDATAUPLOADING | "USERDATAUPLOADING" | +| DATADOWNLOADING | "DATADOWNLOADING" | +| USERMANAGEMENT | "USERMANAGEMENT" | +| DATAMANAGEMENT | "DATAMANAGEMENT" | +| SHAREWITHALL | "SHAREWITHALL" | +| JOBSCHEDULING | "JOBSCHEDULING" | +| A3_ANALYSIS | "A3ANALYSIS" | +| EXPERIMENTALFEATUREPRIVILEGE | "EXPERIMENTALFEATUREPRIVILEGE" | +| BYPASSRLS | "BYPASSRLS" | +| RANALYSIS | "RANALYSIS" | +| DEVELOPER | "DEVELOPER" | +| USER_ADMINISTRATION | "USER_ADMINISTRATION" | +| GROUP_ADMINISTRATION | "GROUP_ADMINISTRATION" | +| SYNCMANAGEMENT | "SYNCMANAGEMENT" | +| CAN_CREATE_CATALOG | "CAN_CREATE_CATALOG" | +| DISABLE_PINBOARD_CREATION | "DISABLE_PINBOARD_CREATION" | +| LIVEBOARD_VERIFIER | "LIVEBOARD_VERIFIER" | +| PREVIEW_THOUGHTSPOT_SAGE | "PREVIEW_THOUGHTSPOT_SAGE" | +| APPLICATION_ADMINISTRATION | "APPLICATION_ADMINISTRATION" | +| SYSTEM_INFO_ADMINISTRATION | "SYSTEM_INFO_ADMINISTRATION" | +| ORG_ADMINISTRATION | "ORG_ADMINISTRATION" | +| ROLE_ADMINISTRATION | "ROLE_ADMINISTRATION" | +| AUTHENTICATION_ADMINISTRATION | "AUTHENTICATION_ADMINISTRATION" | +| BILLING_INFO_ADMINISTRATION | "BILLING_INFO_ADMINISTRATION" | +| CAN_MANAGE_CUSTOM_CALENDAR | "CAN_MANAGE_CUSTOM_CALENDAR" | +| CAN_CREATE_OR_EDIT_CONNECTIONS | "CAN_CREATE_OR_EDIT_CONNECTIONS" | +| CAN_MANAGE_WORKSHEET_VIEWS_TABLES | "CAN_MANAGE_WORKSHEET_VIEWS_TABLES" | +| CAN_MANAGE_VERSION_CONTROL | "CAN_MANAGE_VERSION_CONTROL" | +| THIRDPARTY_ANALYSIS | "THIRDPARTY_ANALYSIS" | +| ALLOW_NON_EMBED_FULL_APP_ACCESS | "ALLOW_NON_EMBED_FULL_APP_ACCESS" | +| CAN_ACCESS_ANALYST_STUDIO | "CAN_ACCESS_ANALYST_STUDIO" | +| CAN_MANAGE_ANALYST_STUDIO | "CAN_MANAGE_ANALYST_STUDIO" | +| PREVIEW_DOCUMENT_SEARCH | "PREVIEW_DOCUMENT_SEARCH" | +| CAN_MODIFY_FOLDERS | "CAN_MODIFY_FOLDERS" | +| CAN_MANAGE_VARIABLES | "CAN_MANAGE_VARIABLES" | +| CAN_VIEW_FOLDERS | "CAN_VIEW_FOLDERS" | +| CAN_MANAGE_AGENTSPOT | "CAN_MANAGE_AGENTSPOT" | +| CAN_ACCESS_AGENTSPOT | "CAN_ACCESS_AGENTSPOT" | +| CAN_SETUP_VERSION_CONTROL | "CAN_SETUP_VERSION_CONTROL" | +| CAN_MANAGE_WEBHOOKS | "CAN_MANAGE_WEBHOOKS" | +| CAN_DOWNLOAD_VISUALS | "CAN_DOWNLOAD_VISUALS" | +| CAN_DOWNLOAD_DETAILED_DATA | "CAN_DOWNLOAD_DETAILED_DATA" | +| CAN_USE_SPOTTER | "CAN_USE_SPOTTER" | + + + +## Enum: TypeEnum + +| Name | Value | +|---- | -----| +| LOCAL_GROUP | "LOCAL_GROUP" | +| LDAP_GROUP | "LDAP_GROUP" | +| TEAM_GROUP | "TEAM_GROUP" | +| TENANT_GROUP | "TENANT_GROUP" | + + + +## Enum: VisibilityEnum + +| Name | Value | +|---- | -----| +| SHARABLE | "SHARABLE" | +| NON_SHARABLE | "NON_SHARABLE" | + + +## Implemented Interfaces + +* Serializable + + diff --git a/sdks/java/docs/SearchUsersRequest.md b/sdks/java/docs/SearchUsersRequest.md new file mode 100644 index 000000000..740ce056a --- /dev/null +++ b/sdks/java/docs/SearchUsersRequest.md @@ -0,0 +1,123 @@ + + +# SearchUsersRequest + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**userIdentifier** | **String** | GUID / name of the user to search | [optional] | +|**displayName** | **String** | A unique display name string for the user account, usually their first and last name | [optional] | +|**namePattern** | **String** | A pattern to match case-insensitive name of the User object. | [optional] | +|**visibility** | [**VisibilityEnum**](#VisibilityEnum) | Visibility of the user | [optional] | +|**email** | **String** | Email of the user account | [optional] | +|**groupIdentifiers** | **List<String>** | GUID or name of the group to which the user belongs | [optional] | +|**privileges** | [**List<PrivilegesEnum>**](#List<PrivilegesEnum>) | Privileges assigned to the user | [optional] | +|**accountType** | [**AccountTypeEnum**](#AccountTypeEnum) | Type of the account | [optional] | +|**accountStatus** | [**AccountStatusEnum**](#AccountStatusEnum) | Current status of the user account. | [optional] | +|**notifyOnShare** | **Boolean** | User preference for receiving email notifications when another ThoughtSpot user shares a metadata object such as Answer, Liveboard, or Worksheet. | [optional] | +|**showOnboardingExperience** | **Boolean** | The user preference for revisiting the onboarding experience | [optional] | +|**onboardingExperienceCompleted** | **Boolean** | Indicates if the user has completed the onboarding walkthrough | [optional] | +|**orgIdentifiers** | **List<String>** | IDs or names of the Orgs to which the user belongs | [optional] | +|**homeLiveboardIdentifier** | **String** | Unique ID or name of the user's home Liveboard. | [optional] | +|**favoriteMetadata** | [**List<FavoriteMetadataInput>**](FavoriteMetadataInput.md) | Metadata objects which are assigned as favorites of the user. | [optional] | +|**recordOffset** | **Integer** | The starting record number from where the records should be included. | [optional] | +|**recordSize** | **Integer** | The number of records that should be included. | [optional] | +|**sortOptions** | [**SortOptions**](SortOptions.md) | Sort options. | [optional] | +|**roleIdentifiers** | **List<String>** | Filters by the role assigned to the user. | [optional] | +|**includeFavoriteMetadata** | **Boolean** | Indicates if the user's favorite objects should be displayed. | [optional] | +|**includeVariableValues** | **Boolean** | Indicates if the user's formula variable values should be included in the response. | [optional] | + + + +## Enum: VisibilityEnum + +| Name | Value | +|---- | -----| +| SHARABLE | "SHARABLE" | +| NON_SHARABLE | "NON_SHARABLE" | + + + +## Enum: List<PrivilegesEnum> + +| Name | Value | +|---- | -----| +| ADMINISTRATION | "ADMINISTRATION" | +| AUTHORING | "AUTHORING" | +| USERDATAUPLOADING | "USERDATAUPLOADING" | +| DATADOWNLOADING | "DATADOWNLOADING" | +| USERMANAGEMENT | "USERMANAGEMENT" | +| DATAMANAGEMENT | "DATAMANAGEMENT" | +| SHAREWITHALL | "SHAREWITHALL" | +| JOBSCHEDULING | "JOBSCHEDULING" | +| A3_ANALYSIS | "A3ANALYSIS" | +| EXPERIMENTALFEATUREPRIVILEGE | "EXPERIMENTALFEATUREPRIVILEGE" | +| BYPASSRLS | "BYPASSRLS" | +| RANALYSIS | "RANALYSIS" | +| DEVELOPER | "DEVELOPER" | +| USER_ADMINISTRATION | "USER_ADMINISTRATION" | +| GROUP_ADMINISTRATION | "GROUP_ADMINISTRATION" | +| SYNCMANAGEMENT | "SYNCMANAGEMENT" | +| CAN_CREATE_CATALOG | "CAN_CREATE_CATALOG" | +| DISABLE_PINBOARD_CREATION | "DISABLE_PINBOARD_CREATION" | +| LIVEBOARD_VERIFIER | "LIVEBOARD_VERIFIER" | +| PREVIEW_THOUGHTSPOT_SAGE | "PREVIEW_THOUGHTSPOT_SAGE" | +| APPLICATION_ADMINISTRATION | "APPLICATION_ADMINISTRATION" | +| SYSTEM_INFO_ADMINISTRATION | "SYSTEM_INFO_ADMINISTRATION" | +| ORG_ADMINISTRATION | "ORG_ADMINISTRATION" | +| ROLE_ADMINISTRATION | "ROLE_ADMINISTRATION" | +| AUTHENTICATION_ADMINISTRATION | "AUTHENTICATION_ADMINISTRATION" | +| BILLING_INFO_ADMINISTRATION | "BILLING_INFO_ADMINISTRATION" | +| CAN_MANAGE_CUSTOM_CALENDAR | "CAN_MANAGE_CUSTOM_CALENDAR" | +| CAN_CREATE_OR_EDIT_CONNECTIONS | "CAN_CREATE_OR_EDIT_CONNECTIONS" | +| CAN_MANAGE_WORKSHEET_VIEWS_TABLES | "CAN_MANAGE_WORKSHEET_VIEWS_TABLES" | +| CAN_MANAGE_VERSION_CONTROL | "CAN_MANAGE_VERSION_CONTROL" | +| THIRDPARTY_ANALYSIS | "THIRDPARTY_ANALYSIS" | +| ALLOW_NON_EMBED_FULL_APP_ACCESS | "ALLOW_NON_EMBED_FULL_APP_ACCESS" | +| CAN_ACCESS_ANALYST_STUDIO | "CAN_ACCESS_ANALYST_STUDIO" | +| CAN_MANAGE_ANALYST_STUDIO | "CAN_MANAGE_ANALYST_STUDIO" | +| PREVIEW_DOCUMENT_SEARCH | "PREVIEW_DOCUMENT_SEARCH" | +| CAN_MODIFY_FOLDERS | "CAN_MODIFY_FOLDERS" | +| CAN_MANAGE_VARIABLES | "CAN_MANAGE_VARIABLES" | +| CAN_VIEW_FOLDERS | "CAN_VIEW_FOLDERS" | +| CAN_MANAGE_AGENTSPOT | "CAN_MANAGE_AGENTSPOT" | +| CAN_ACCESS_AGENTSPOT | "CAN_ACCESS_AGENTSPOT" | +| CAN_SETUP_VERSION_CONTROL | "CAN_SETUP_VERSION_CONTROL" | +| CAN_MANAGE_WEBHOOKS | "CAN_MANAGE_WEBHOOKS" | +| CAN_DOWNLOAD_VISUALS | "CAN_DOWNLOAD_VISUALS" | +| CAN_DOWNLOAD_DETAILED_DATA | "CAN_DOWNLOAD_DETAILED_DATA" | +| CAN_USE_SPOTTER | "CAN_USE_SPOTTER" | + + + +## Enum: AccountTypeEnum + +| Name | Value | +|---- | -----| +| LOCAL_USER | "LOCAL_USER" | +| LDAP_USER | "LDAP_USER" | +| SAML_USER | "SAML_USER" | +| OIDC_USER | "OIDC_USER" | +| REMOTE_USER | "REMOTE_USER" | + + + +## Enum: AccountStatusEnum + +| Name | Value | +|---- | -----| +| ACTIVE | "ACTIVE" | +| INACTIVE | "INACTIVE" | +| EXPIRED | "EXPIRED" | +| LOCKED | "LOCKED" | +| PENDING | "PENDING" | +| SUSPENDED | "SUSPENDED" | + + +## Implemented Interfaces + +* Serializable + + diff --git a/sdks/java/docs/SearchVariablesRequest.md b/sdks/java/docs/SearchVariablesRequest.md new file mode 100644 index 000000000..d23ce40fe --- /dev/null +++ b/sdks/java/docs/SearchVariablesRequest.md @@ -0,0 +1,30 @@ + + +# SearchVariablesRequest + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**variableDetails** | [**List<VariableDetailInput>**](VariableDetailInput.md) | Variable details | [optional] | +|**valueScope** | [**List<ValueScopeInput>**](ValueScopeInput.md) | Array of scope filters | [optional] | +|**recordOffset** | **Integer** | The starting record number from where the records should be included | [optional] | +|**recordSize** | **Integer** | The number of records that should be included | [optional] | +|**responseContent** | [**ResponseContentEnum**](#ResponseContentEnum) | Format in which we want the output | [optional] | + + + +## Enum: ResponseContentEnum + +| Name | Value | +|---- | -----| +| METADATA | "METADATA" | +| METADATA_AND_VALUES | "METADATA_AND_VALUES" | + + +## Implemented Interfaces + +* Serializable + + diff --git a/sdks/java/docs/SearchWebhookConfigurationsRequest.md b/sdks/java/docs/SearchWebhookConfigurationsRequest.md new file mode 100644 index 000000000..a81f9afd7 --- /dev/null +++ b/sdks/java/docs/SearchWebhookConfigurationsRequest.md @@ -0,0 +1,30 @@ + + +# SearchWebhookConfigurationsRequest + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**orgIdentifier** | **String** | Unique ID or name of the org. | [optional] | +|**webhookIdentifier** | **String** | Unique ID or name of the webhook. | [optional] | +|**eventType** | [**EventTypeEnum**](#EventTypeEnum) | Type of webhook event to filter by. | [optional] | +|**recordOffset** | **Integer** | The offset point, starting from where the webhooks should be included in the response. | [optional] | +|**recordSize** | **Integer** | The number of webhooks that should be included in the response starting from offset position. | [optional] | +|**sortOptions** | [**WebhookSortOptionsInput**](WebhookSortOptionsInput.md) | Sort option includes sort field and sort order. | [optional] | + + + +## Enum: EventTypeEnum + +| Name | Value | +|---- | -----| +| LIVEBOARD_SCHEDULE | "LIVEBOARD_SCHEDULE" | + + +## Implemented Interfaces + +* Serializable + + diff --git a/sdks/java/docs/SecurityApi.md b/sdks/java/docs/SecurityApi.md new file mode 100644 index 000000000..d4ea5e849 --- /dev/null +++ b/sdks/java/docs/SecurityApi.md @@ -0,0 +1,378 @@ +# SecurityApi + +All URIs are relative to *CLUSTER_URL* + +| Method | HTTP request | +|------------- | ------------- | +| [**assignChangeAuthor**](SecurityApi.md#assignChangeAuthor) | **POST** /api/rest/2.0/security/metadata/assign | +| [**fetchColumnSecurityRules**](SecurityApi.md#fetchColumnSecurityRules) | **POST** /api/rest/2.0/security/column/rules/fetch | +| [**fetchObjectPrivileges**](SecurityApi.md#fetchObjectPrivileges) | **POST** /api/rest/2.0/security/metadata/fetch-object-privileges | +| [**fetchPermissionsOfPrincipals**](SecurityApi.md#fetchPermissionsOfPrincipals) | **POST** /api/rest/2.0/security/principals/fetch-permissions | +| [**fetchPermissionsOnMetadata**](SecurityApi.md#fetchPermissionsOnMetadata) | **POST** /api/rest/2.0/security/metadata/fetch-permissions | +| [**manageObjectPrivilege**](SecurityApi.md#manageObjectPrivilege) | **POST** /api/rest/2.0/security/metadata/manage-object-privilege | +| [**publishMetadata**](SecurityApi.md#publishMetadata) | **POST** /api/rest/2.0/security/metadata/publish | +| [**shareMetadata**](SecurityApi.md#shareMetadata) | **POST** /api/rest/2.0/security/metadata/share | +| [**unpublishMetadata**](SecurityApi.md#unpublishMetadata) | **POST** /api/rest/2.0/security/metadata/unpublish | +| [**updateColumnSecurityRules**](SecurityApi.md#updateColumnSecurityRules) | **POST** /api/rest/2.0/security/column/rules/update | + + + +# **assignChangeAuthor** +> assignChangeAuthor(assignChangeAuthorRequest) + + + + Version: 9.0.0.cl or later Transfers the ownership of one or several objects from one user to another. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `USER_ADMINISTRATION` (**Can manage users**) privilege and edit access to the objects are required. + +### Parameters + +| Name | Type | +|------------- | ------------- | +| **assignChangeAuthorRequest** | [**AssignChangeAuthorRequest**](AssignChangeAuthorRequest.md) + +### Return type + +null (empty response body) + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **204** | Author assignment for given metadata objects is successful. | - | +| **400** | Invalid request. | - | +| **401** | Unauthorized access. | - | +| **403** | Forbidden access. | - | +| **500** | Unexpected error | - | + + +# **fetchColumnSecurityRules** +> List<ColumnSecurityRuleResponse> fetchColumnSecurityRules(fetchColumnSecurityRulesRequest) + + + + Version: 10.12.0.cl or later Fetches column security rules for specified tables. This API endpoint retrieves column-level security rules configured for tables. It returns information about which columns are secured and which groups have access to those columns. #### Usage guidelines - Provide an array of table identifiers using either `identifier` (GUID or name) or `obj_identifier` (object ID) - At least one of `identifier` or `obj_identifier` must be provided for each table - The API returns column security rules for all specified tables - Users must have appropriate permissions to access security rules for the specified tables #### Required permissions - `ADMINISTRATION` - Can administer ThoughtSpot - `DATAMANAGEMENT` - Can manage data - `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` - Can manage worksheet views and tables #### Example request ```json { \"tables\": [ { \"identifier\": \"table-guid\", \"obj_identifier\": \"table-object-id\" } ] } ``` #### Response format The API returns an array of `ColumnSecurityRuleResponse` objects wrapped in a `data` field. Each `ColumnSecurityRuleResponse` object contains: - Table information (GUID and object ID) - Array of column security rules with column details, group access, and source table information #### Example response ```json { \"data\": [ { \"guid\": \"table-guid\", \"objId\": \"table-object-id\", \"columnSecurityRules\": [ { \"column\": { \"id\": \"col_123\", \"name\": \"Salary\" }, \"groups\": [ { \"id\": \"group_1\", \"name\": \"HR Department\" } ], \"sourceTableDetails\": { \"id\": \"source-table-guid\", \"name\": \"Employee_Data\" } } ] } ] } ``` + +### Parameters + +| Name | Type | +|------------- | ------------- | +| **fetchColumnSecurityRulesRequest** | [**FetchColumnSecurityRulesRequest**](FetchColumnSecurityRulesRequest.md) + +### Return type + +[**List<ColumnSecurityRuleResponse>**](ColumnSecurityRuleResponse.md) + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Successfully fetched column security rules | - | +| **400** | Bad request - Table not found or invalid parameters | - | +| **401** | Unauthorized access. | - | +| **403** | Forbidden - User doesn't have permission to access security rules for this table | - | +| **500** | Internal server error | - | + + +# **fetchObjectPrivileges** +> ObjectPrivilegesOfMetadataResponse fetchObjectPrivileges(fetchObjectPrivilegesRequest) + + + + Version: 26.3.0.cl or later This API fetches the object privileges present for the given list of principals (user or group), on the given set of objects. It supports pagination, which can be enabled and configured using the request parameters. It provides users access to certain features based on privilege based access control. #### Usage guidelines - Specify the `type` (`USER` or `USER_GROUP`) and `identifier` (either GUID or name) of the principals for which you want to retrieve object privilege information in the `principals` array. - Specify the `type` (`LOGICAL_TABLE`) and `identifier` (either GUID or name) of the metadata objects for which you want to retrieve object privilege information in the `metadata` array. Only `LOGICAL_TABLE` metadata type is supported for now. It may be extended for other metadata types in future. - To control the offset from where principals have to be fetched, use `record_offset`. When `record_offset` is 0, information is fetched from the beginning. - To control the number of principals to be fetched, use `record_size`. Default `record_size` is 20. - Ensure `record_offset` for a subsequent request is one more than the value of `record_size` of the previous request. - Ensure using correct Authorization Bearer Token corresponding to specific user & org. #### Example request ```json { \"principals\": [ { \"type\": \"type-1\", \"identifier\": \"principal-guid-or-name-1\" }, { \"type\": \"type-2\", \"identifier\": \"principal-guid-or-name-2\" } ], \"metadata\": [ { \"type\": \"metadata-type-1\", \"identifier\": \"metadata-guid-or-name-1\" }, { \"type\": \"metadata-type-2\", \"identifier\": \"metadata-guid-or-name-2\" } ], \"record_offset\": 0, \"record_size\": 20 } ``` #### Response format The API returns an array of `metadata_object_privileges` objects wrapped in JSON. Each `metadata_object_privileges` object contains: - Metadata information (GUID, name and type) - Array of `principal_object_privilege_info`. - Each `principal_object_privilege_info` contains: - Principal type. All principals of this type are listed as described below. - Array of `principal_object_privileges`. - Each `principal_object_privileges` contains: - Principal information (GUID, name, subtype) - List of applied object level privileges. #### Example response ```json { \"metadata_object_privileges\": [ { \"metadata_id\": \"metadata-guid-1\", \"metadata_name\": \"metadata-name-1\", \"metadata_type\": \"metadata-type-1\", \"principal_object_privilege_info\": [ { \"principal_type\": \"principal-type-1\", \"principal_object_privileges\": [ { \"principal_id\": \"principal-guid-1\", \"principal_name\": \"principal-name-1\", \"principal_sub_type\": \"principal-sub-type-1\", \"object_privileges\": \"[object-privilege-1, object-privilege-2]\" }, { \"principal_id\": \"principal-guid-2\", \"principal_name\": \"principal-name-2\", \"principal_sub_type\": \"principal-sub-type-2\", \"object_privileges\": \"[object-privilege-1, object-privilege-2]\" } ] }, { \"principal_type\": \"principal-type-2\", \"principal_object_privileges\": [ { \"principal_id\": \"principal-guid-3\", \"principal_name\": \"principal-guid-4\", \"principal_sub_type\": \"principal-sub-type-4\", \"object_privileges\": \"[object-privilege-1]\" } ] } ] }, { \"metadata_id\": \"metadata-guid-2\", \"metadata_name\": \"metadata-name-2\", \"metadata_type\": \"metadata-type-2\", \"principal_object_privilege_info\": [ { \"principal_type\": \"principal-type-1\", \"principal_object_privileges\": [ { \"principal_id\": \"principal-guid-1\", \"principal_name\": \"principal-name-1\", \"principal_sub_type\": \"principal-sub-type-1\", \"object_privileges\": \"[object-privilege-3, object-privilege-4]\" }, { \"principal_id\": \"principal-guid-2\", \"principal_name\": \"principal-name-2\", \"principal_sub_type\": \"principal-sub-type-2\", \"object_privileges\": \"[object-privilege-4]\" } ] } ] } ] } ``` + +### Parameters + +| Name | Type | +|------------- | ------------- | +| **fetchObjectPrivilegesRequest** | [**FetchObjectPrivilegesRequest**](FetchObjectPrivilegesRequest.md) + +### Return type + +[**ObjectPrivilegesOfMetadataResponse**](ObjectPrivilegesOfMetadataResponse.md) + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Fetching defined object privileges of metadata objects is successful. | - | +| **400** | Invalid request. | - | +| **401** | Unauthorized access. | - | +| **403** | Forbidden access. | - | +| **500** | Unexpected error | - | + + +# **fetchPermissionsOfPrincipals** +> PermissionOfPrincipalsResponse fetchPermissionsOfPrincipals(fetchPermissionsOfPrincipalsRequest) + + + + Version: 9.0.0.cl or later Fetches object permission details for a given principal object such as a user and group. Requires view access to the metadata object. #### Usage guidelines * To get a list of all metadata objects that a user or group can access, specify the `type` and GUID or name of the principal. * To get permission details for a specific object, add the `type` and GUID or name of the metadata object to your API request. Upon successful execution, the API returns a list of metadata objects and permission details for each object. + +### Parameters + +| Name | Type | +|------------- | ------------- | +| **fetchPermissionsOfPrincipalsRequest** | [**FetchPermissionsOfPrincipalsRequest**](FetchPermissionsOfPrincipalsRequest.md) + +### Return type + +[**PermissionOfPrincipalsResponse**](PermissionOfPrincipalsResponse.md) + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Fetching permissions of principals is successful. | - | +| **400** | Invalid request. | - | +| **401** | Unauthorized access. | - | +| **403** | Forbidden access. | - | +| **500** | Unexpected error | - | + + +# **fetchPermissionsOnMetadata** +> PermissionOfMetadataResponse fetchPermissionsOnMetadata(fetchPermissionsOnMetadataRequest) + + + + Version: 9.0.0.cl or later Fetches permission details for a given metadata object. Requires view access to the metadata object. #### Usage guidelines * To fetch a list of users and groups for a metadata object, specify `type` and GUID or name of the metadata object. * To get permission details for a specific user or group, add `type` and GUID or name of the principal object to your API request. Upon successful execution, the API returns permission details and principal information for the object specified in the API request. + +### Parameters + +| Name | Type | +|------------- | ------------- | +| **fetchPermissionsOnMetadataRequest** | [**FetchPermissionsOnMetadataRequest**](FetchPermissionsOnMetadataRequest.md) + +### Return type + +[**PermissionOfMetadataResponse**](PermissionOfMetadataResponse.md) + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Fetching permissions of metadata objects is successful. | - | +| **400** | Invalid request. | - | +| **401** | Unauthorized access. | - | +| **403** | Forbidden access. | - | +| **500** | Unexpected error | - | + + +# **manageObjectPrivilege** +> manageObjectPrivilege(manageObjectPrivilegeRequest) + + + + Version: 26.3.0.cl or later This API allows the addition or deletion of object level privileges for a set of users and groups, on a set of metadata objects. It provides users to access certain features based on privilege based access control. #### Usage guidelines - Specify the `operation`. The supported operations are: `ADD`, `REMOVE`. - Specify the type of the objects on which the object privileges are being provided in `metadata_type`. Only `LOGICAL_TABLE` metadata type is supported for now. It may be extended for other metadata types in future. - Specify the list of object privilege types in the `object_privilege_types` array. The supported object privilege types are: `SPOTTER_COACHING_PRIVILEGE`. - Specify the identifiers (either GUID or name) for the metadata objects in the `metadata_identifiers` array. - Specify the `type` (`USER` or `USER_GROUP`) and `identifier` (either GUID or name) of the principals to which you want to apply the given operation and given object privileges in the `principals` array. - Ensure using correct Authorization Bearer Token corresponding to specific user & org. #### Example request ```json { \"operation\": \"operation-type\", \"metadata_type\": \"metadata-type\", \"object_privilege_types\": [\"privilege-type-1\", \"privilege-type-2\"], \"metadata_identifiers\": [\"metadata-guid-or-name-1\", \"metadata-guid-or-name-1\"], \"principals\": [ { \"type\": \"type-1\", \"identifier\": \"principal-guid-or-name-1\" }, { \"type\": \"type-2\", \"identifier\": \"principal-guid-or-name-2\" } ] } ``` > ###### Note: > * Only admin users, users with edit access and users with coaching privilege on a given data-model can add or remove principals related to SPOTTER_COACHING_PRIVILEGE + +### Parameters + +| Name | Type | +|------------- | ------------- | +| **manageObjectPrivilegeRequest** | [**ManageObjectPrivilegeRequest**](ManageObjectPrivilegeRequest.md) + +### Return type + +null (empty response body) + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **204** | Object privileges added/removed successfully | - | +| **400** | Invalid request | - | +| **401** | Unauthorized access | - | +| **403** | Forbidden access | - | +| **500** | Unexpected error | - | + + +# **publishMetadata** +> publishMetadata(publishMetadataRequest) + + + + Version: 26.5.0.cl or later Allows publishing metadata objects across organizations in ThoughtSpot. Requires ADMINISTRATION role and TENANT scope. The API endpoint allows publishing the following types of metadata objects: * Liveboards * Answers * Logical Tables This API will essentially share the objects along with it's dependencies to the org admins of the orgs to which it is being published. + +### Parameters + +| Name | Type | +|------------- | ------------- | +| **publishMetadataRequest** | [**PublishMetadataRequest**](PublishMetadataRequest.md) + +### Return type + +null (empty response body) + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **204** | Publishing metadata objects is successful. | - | +| **400** | Invalid request. | - | +| **401** | Unauthorized access. | - | +| **403** | Forbidden access. | - | +| **500** | Unexpected error | - | + + +# **shareMetadata** +> shareMetadata(shareMetadataRequest) + + + + Version: 9.0.0.cl or later Allows sharing one or several metadata objects with users and groups in ThoughtSpot. Requires edit access to the metadata object. #### Supported metadata objects: * Liveboards * Visualizations * Answers * Models * Views * Connections * Collections #### Object permissions You can provide `READ_ONLY` or `MODIFY` access when sharing an object with another user or group. The `READ_ONLY` permission grants view access to the shared object, whereas `MODIFY` provides edit access. To prevent a user or group from accessing the shared object, specify the GUID or name of the principal and set `shareMode` to `NO_ACCESS`. #### Sharing a visualization * Sharing a visualization implicitly shares the entire Liveboard with the recipient. * Object permissions set for a shared visualization also apply to the Liveboard unless overridden by another API request or via UI. * If email notifications for object sharing are enabled, a notification with a link to the shared visualization will be sent to the recipient’s email address. Although this link opens the shared visualization, recipients can also access other visualizations in the Liveboard. #### Sharing a collection Collections support **dual permissions** that provide fine-grained control: * **Collection permissions** (`share_mode`) - controls access to the collection itself (view, edit, delete the collection) * **Content permissions** (`content_share_mode`) - controls access to objects within the collection (view, edit objects inside) **Default Behavior:** - If only `share_mode` is specified, the content permissions default to `READ_ONLY` (except when `share_mode` is `NO_ACCESS`, then content also gets `NO_ACCESS`) - To give users edit access to collection contents, explicitly set `content_share_mode: \"MODIFY\"` ## Examples The following JSON examples can be copy-pasted as request bodies for the REST v2 API endpoint: ```bash POST /callosum/v1/v2/security/metadata/share Content-Type: application/x-www-form-urlencoded ``` ### Basic collection sharing Share a collection with read-only access: ```json { \"metadata_type\": \"COLLECTION\", \"metadata_identifiers\": [\"Sales Reports Collection\"], \"permissions\": [{ \"principal\": { \"type\": \"USER\", \"identifier\": \"alice@company.com\" }, \"share_mode\": \"READ_ONLY\" }], \"notification\": { \"message\": \"I've shared the Sales Reports collection with you\", \"notify_on_share\": true } } ``` ### Collection sharing with dual permissions Share a collection with different permissions for the collection vs. its contents: ```json { \"metadata_type\": \"COLLECTION\", \"metadata_identifiers\": [\"Marketing Analytics\"], \"permissions\": [{ \"principal\": { \"type\": \"USER\", \"identifier\": \"bob@company.com\" }, \"share_mode\": \"MODIFY\", \"content_share_mode\": \"READ_ONLY\" }, { \"principal\": { \"type\": \"USER_GROUP\", \"identifier\": \"Marketing Team\" }, \"share_mode\": \"READ_ONLY\", \"content_share_mode\": \"READ_ONLY\" }], \"notification\": { \"emails\": [\"bob@company.com\"], \"message\": \"You can edit the collection but content is read-only\", \"enable_custom_url\": false, \"notify_on_share\": true }, \"has_lenient_discoverability\": false } ``` ### Multiple collections sharing Share multiple collections with different users: ```json { \"metadata\": [ { \"type\": \"COLLECTION\", \"identifier\": \"Q4 Reports\" }, { \"type\": \"COLLECTION\", \"identifier\": \"Executive Dashboard Collection\" } ], \"permissions\": [{ \"principal\": { \"type\": \"USER_GROUP\", \"identifier\": \"Executives\" }, \"share_mode\": \"MODIFY\" }, { \"principal\": { \"type\": \"USER\", \"identifier\": \"manager@company.com\" }, \"share_mode\": \"READ_ONLY\", \"content_share_mode\": \"MODIFY\" }], \"notification\": { \"message\": \"Sharing quarterly collections with leadership team\", \"notify_on_share\": true } } ``` ### Remove collection access Remove access to a collection by setting share_mode to NO_ACCESS: ```json { \"metadata_type\": \"COLLECTION\", \"metadata_identifiers\": [\"Confidential Reports\"], \"permissions\": [{ \"principal\": { \"type\": \"USER\", \"identifier\": \"former-employee@company.com\" }, \"share_mode\": \"NO_ACCESS\" }], \"notification\": { \"notify_on_share\": false } } ``` ### Collection Permission Scenarios **Scenario 1: Collection Admin** - `share_mode: MODIFY` + `content_share_mode: MODIFY` = Full control over collection and its contents **Scenario 2: Collection Curator** - `share_mode: MODIFY` + `content_share_mode: READ_ONLY` = Can manage collection structure but not edit contents **Scenario 3: Content Editor** - `share_mode: READ_ONLY` + `content_share_mode: MODIFY` = Can edit objects within collection but can't change collection itself **Scenario 4: Viewer** - `share_mode: READ_ONLY` + `content_share_mode: READ_ONLY` = View-only access to collection and contents + +### Parameters + +| Name | Type | +|------------- | ------------- | +| **shareMetadataRequest** | [**ShareMetadataRequest**](ShareMetadataRequest.md) + +### Return type + +null (empty response body) + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **204** | Sharing metadata objects is successful. | - | +| **400** | Invalid request. | - | +| **401** | Unauthorized access. | - | +| **403** | Forbidden access. | - | +| **500** | Unexpected error | - | + + +# **unpublishMetadata** +> unpublishMetadata(unpublishMetadataRequest) + + + + Version: 26.5.0.cl or later Allows unpublishing metadata objects from organizations in ThoughtSpot. Requires ADMINISTRATION role and TENANT scope. The API endpoint allows unpublishing the following types of metadata objects: * Liveboards * Answers * Logical Tables When unpublishing objects, you can: * Include dependencies by setting `include_dependencies` to true - this will unpublish all dependent objects if no other published object is using them * Force unpublish by setting `force` to true - this will break all dependent objects in the unpublished organizations + +### Parameters + +| Name | Type | +|------------- | ------------- | +| **unpublishMetadataRequest** | [**UnpublishMetadataRequest**](UnpublishMetadataRequest.md) + +### Return type + +null (empty response body) + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **204** | Unpublishing metadata objects is successful. | - | +| **400** | Invalid request. | - | +| **401** | Unauthorized access. | - | +| **403** | Forbidden access. | - | +| **500** | Unexpected error | - | + + +# **updateColumnSecurityRules** +> updateColumnSecurityRules(updateColumnSecurityRulesRequest) + + + + Version: 10.12.0.cl or later Creates, updates, or deletes column security rules for specified tables. This API endpoint allows you to create, update, or delete column-level security rules on columns of a table. The operation follows an \"all or none\" policy: if defining security rules for any of the provided columns fails, the entire operation will be rolled back, and no rules will be created. #### Usage guidelines - Provide table identifier using either `identifier` (GUID or name) or `obj_identifier` (object ID) - Use `clear_csr: true` to remove all column security rules from the table - For each column, specify the security rule using `column_security_rules` array - Use `is_unsecured: true` to mark a specific column as unprotected - Use `group_access` operations to manage group associations: - `ADD`: Add groups to the column's access list - `REMOVE`: Remove groups from the column's access list - `REPLACE`: Replace all existing groups with the specified groups #### Required permissions - `ADMINISTRATION` - Can administer ThoughtSpot - `DATAMANAGEMENT` - Can manage data (if RBAC is disabled) - `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` - Can manage worksheet views and tables (if RBAC is enabled) #### Example request ```json { \"identifier\": \"table-guid\", \"obj_identifier\": \"table-object-id\", \"clear_csr\": false, \"column_security_rules\": [ { \"column_identifier\": \"col id or col name\", \"is_unsecured\": false, \"group_access\": [ { \"operation\": \"ADD\", \"group_identifiers\": [\"hr_group_id\", \"hr_group_name\", \"finance_group_id\"] } ] }, { \"column_identifier\": \"col id or col name\", \"is_unsecured\": true }, { \"column_identifier\": \"col id or col name\", \"is_unsecured\": false, \"group_access\": [ { \"operation\": \"REPLACE\", \"group_identifiers\": [\"management_group_id\", \"management_group_name\"] } ] } ] } ``` #### Request Body Schema - `identifier` (string, optional): GUID or name of the table for which we want to create column security rules - `obj_identifier` (string, optional): The object ID of the table - `clear_csr` (boolean, optional): If true, then all the secured columns will be marked as unprotected, and all the group associations will be removed - `column_security_rules` (array of objects, required): An array where each object defines the security rule for a specific column Each column security rule object contains: - `column_identifier` (string, required): Column identifier (col_id or name) - `is_unsecured` (boolean, optional): If true, the column will be marked as unprotected and all groups associated with it will be removed - `group_access` (array of objects, optional): Array of group operation objects Each group operation object contains: - `operation` (string, required): Operation type - ADD, REMOVE, or REPLACE - `group_identifiers` (array of strings, required): Array of group identifiers (name or GUID) on which the operation will be performed #### Response This API does not return any response body. A successful operation returns HTTP 200 status code. #### Operation Types - **ADD**: Adds the specified groups to the column's access list - **REMOVE**: Removes the specified groups from the column's access list - **REPLACE**: Replaces all existing groups with the specified groups + +### Parameters + +| Name | Type | +|------------- | ------------- | +| **updateColumnSecurityRulesRequest** | [**UpdateColumnSecurityRulesRequest**](UpdateColumnSecurityRulesRequest.md) + +### Return type + +null (empty response body) + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **204** | Successfully updated column security rules | - | +| **400** | Bad request - Invalid parameters or table not found | - | +| **401** | Unauthorized access. | - | +| **403** | Forbidden - User doesn't have permission to modify security rules for this table | - | +| **500** | Internal server error | - | + diff --git a/sdks/java/docs/SecuritySettingsClusterPreferences.md b/sdks/java/docs/SecuritySettingsClusterPreferences.md new file mode 100644 index 000000000..07fe4568b --- /dev/null +++ b/sdks/java/docs/SecuritySettingsClusterPreferences.md @@ -0,0 +1,32 @@ + + +# SecuritySettingsClusterPreferences + +Cluster-level security preferences. + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**enablePartitionedCookies** | **Boolean** | Support embedded access when third-party cookies are blocked. | [optional] | +|**corsWhitelistedUrls** | **List<String>** | Allowed origins for CORS. | [optional] | +|**cspSettings** | [**CspSettings**](CspSettings.md) | | [optional] | +|**samlRedirectUrls** | **List<String>** | Allowed redirect hosts for SAML login. | [optional] | +|**nonEmbedAccess** | [**ClusterNonEmbedAccess**](ClusterNonEmbedAccess.md) | | [optional] | +|**trustedAuthStatus** | [**TrustedAuthStatusEnum**](#TrustedAuthStatusEnum) | Trusted authentication status at the cluster level. Version: 26.6.0.cl or later | [optional] | + + + +## Enum: TrustedAuthStatusEnum + +| Name | Value | +|---- | -----| +| ENABLED | "ENABLED" | +| DISABLED | "DISABLED" | + + +## Implemented Interfaces + +* Serializable + + diff --git a/sdks/java/docs/SecuritySettingsClusterPreferencesInput.md b/sdks/java/docs/SecuritySettingsClusterPreferencesInput.md new file mode 100644 index 000000000..bae61d58f --- /dev/null +++ b/sdks/java/docs/SecuritySettingsClusterPreferencesInput.md @@ -0,0 +1,22 @@ + + +# SecuritySettingsClusterPreferencesInput + +Input for cluster-level security preferences configuration. + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**enablePartitionedCookies** | **Boolean** | Support embedded access when third-party cookies are blocked. | [optional] | +|**corsWhitelistedUrls** | **List<String>** | Allowed origins for CORS. | [optional] | +|**cspSettings** | [**CspSettingsInput**](CspSettingsInput.md) | | [optional] | +|**samlRedirectUrls** | **List<String>** | Allowed redirect hosts for SAML login. | [optional] | +|**nonEmbedAccess** | [**ClusterNonEmbedAccessInput**](ClusterNonEmbedAccessInput.md) | | [optional] | + + +## Implemented Interfaces + +* Serializable + + diff --git a/sdks/java/docs/SecuritySettingsOrgDetails.md b/sdks/java/docs/SecuritySettingsOrgDetails.md new file mode 100644 index 000000000..e85ce44f6 --- /dev/null +++ b/sdks/java/docs/SecuritySettingsOrgDetails.md @@ -0,0 +1,19 @@ + + +# SecuritySettingsOrgDetails + +Org details for security settings. + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**id** | **Integer** | Unique identifier of the org. | [optional] | +|**name** | **String** | Name of the org. | [optional] | + + +## Implemented Interfaces + +* Serializable + + diff --git a/sdks/java/docs/SecuritySettingsOrgPreferences.md b/sdks/java/docs/SecuritySettingsOrgPreferences.md new file mode 100644 index 000000000..3b2ac1301 --- /dev/null +++ b/sdks/java/docs/SecuritySettingsOrgPreferences.md @@ -0,0 +1,30 @@ + + +# SecuritySettingsOrgPreferences + +Org-level security preferences. + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**org** | [**SecuritySettingsOrgDetails**](SecuritySettingsOrgDetails.md) | | [optional] | +|**corsWhitelistedUrls** | **List<String>** | Allowed origins for CORS for this org. | [optional] | +|**nonEmbedAccess** | [**OrgNonEmbedAccess**](OrgNonEmbedAccess.md) | | [optional] | +|**trustedAuthStatus** | [**TrustedAuthStatusEnum**](#TrustedAuthStatusEnum) | Trusted authentication status for this org. Version: 26.6.0.cl or later | [optional] | + + + +## Enum: TrustedAuthStatusEnum + +| Name | Value | +|---- | -----| +| ENABLED | "ENABLED" | +| DISABLED | "DISABLED" | + + +## Implemented Interfaces + +* Serializable + + diff --git a/sdks/java/docs/SecuritySettingsOrgPreferencesInput.md b/sdks/java/docs/SecuritySettingsOrgPreferencesInput.md new file mode 100644 index 000000000..de77416c4 --- /dev/null +++ b/sdks/java/docs/SecuritySettingsOrgPreferencesInput.md @@ -0,0 +1,20 @@ + + +# SecuritySettingsOrgPreferencesInput + +Input for org-level security preferences configuration. Note: cross-org operations are not supported currently. + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**orgIdentifier** | **String** | Unique identifier or name of the org | | +|**corsWhitelistedUrls** | **List<String>** | Allowed origins for CORS for this org. | [optional] | +|**nonEmbedAccess** | [**OrgNonEmbedAccessInput**](OrgNonEmbedAccessInput.md) | | [optional] | + + +## Implemented Interfaces + +* Serializable + + diff --git a/sdks/java/docs/SecuritySettingsResponse.md b/sdks/java/docs/SecuritySettingsResponse.md new file mode 100644 index 000000000..9289db4e4 --- /dev/null +++ b/sdks/java/docs/SecuritySettingsResponse.md @@ -0,0 +1,19 @@ + + +# SecuritySettingsResponse + +Response type for security settings search. + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**clusterPreferences** | [**SecuritySettingsClusterPreferences**](SecuritySettingsClusterPreferences.md) | | [optional] | +|**orgPreferences** | [**List<SecuritySettingsOrgPreferences>**](SecuritySettingsOrgPreferences.md) | Org-level security preferences. | [optional] | + + +## Implemented Interfaces + +* Serializable + + diff --git a/sdks/java/docs/SendAgentConversationMessageRequest.md b/sdks/java/docs/SendAgentConversationMessageRequest.md new file mode 100644 index 000000000..457e01146 --- /dev/null +++ b/sdks/java/docs/SendAgentConversationMessageRequest.md @@ -0,0 +1,17 @@ + + +# SendAgentConversationMessageRequest + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**messages** | **List<String>** | messages to be sent to the agent | | + + +## Implemented Interfaces + +* Serializable + + diff --git a/sdks/java/docs/SendAgentConversationMessageStreamingRequest.md b/sdks/java/docs/SendAgentConversationMessageStreamingRequest.md new file mode 100644 index 000000000..2d9aba840 --- /dev/null +++ b/sdks/java/docs/SendAgentConversationMessageStreamingRequest.md @@ -0,0 +1,17 @@ + + +# SendAgentConversationMessageStreamingRequest + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**messages** | **List<String>** | messages to be sent to the agent | | + + +## Implemented Interfaces + +* Serializable + + diff --git a/sdks/java/docs/SendAgentMessageRequest.md b/sdks/java/docs/SendAgentMessageRequest.md new file mode 100644 index 000000000..64766553c --- /dev/null +++ b/sdks/java/docs/SendAgentMessageRequest.md @@ -0,0 +1,17 @@ + + +# SendAgentMessageRequest + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**messages** | **List<String>** | messages to be sent to the agent | | + + +## Implemented Interfaces + +* Serializable + + diff --git a/sdks/java/docs/SendAgentMessageResponse.md b/sdks/java/docs/SendAgentMessageResponse.md new file mode 100644 index 000000000..aa6ce0bc8 --- /dev/null +++ b/sdks/java/docs/SendAgentMessageResponse.md @@ -0,0 +1,18 @@ + + +# SendAgentMessageResponse + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**success** | **Boolean** | Indicates whether the agent response was received and processed successfully. | | +|**message** | **String** | Optional message providing additional context about the operation outcome. | [optional] | + + +## Implemented Interfaces + +* Serializable + + diff --git a/sdks/java/docs/SendAgentMessageStreamingRequest.md b/sdks/java/docs/SendAgentMessageStreamingRequest.md new file mode 100644 index 000000000..75f345dd2 --- /dev/null +++ b/sdks/java/docs/SendAgentMessageStreamingRequest.md @@ -0,0 +1,18 @@ + + +# SendAgentMessageStreamingRequest + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**conversationIdentifier** | **String** | Unique identifier for the conversation (used to track context) | | +|**messages** | **List<String>** | messages to be sent to the agent | | + + +## Implemented Interfaces + +* Serializable + + diff --git a/sdks/java/docs/SendMessageRequest.md b/sdks/java/docs/SendMessageRequest.md new file mode 100644 index 000000000..050230895 --- /dev/null +++ b/sdks/java/docs/SendMessageRequest.md @@ -0,0 +1,18 @@ + + +# SendMessageRequest + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**metadataIdentifier** | **String** | ID of the metadata object, such as a Worksheet or Model, to use as a data source for the conversation. | | +|**message** | **String** | A message string with the follow-up question to continue the conversation. | | + + +## Implemented Interfaces + +* Serializable + + diff --git a/sdks/java/docs/SetNLInstructionsRequest.md b/sdks/java/docs/SetNLInstructionsRequest.md new file mode 100644 index 000000000..1ff983a0e --- /dev/null +++ b/sdks/java/docs/SetNLInstructionsRequest.md @@ -0,0 +1,18 @@ + + +# SetNLInstructionsRequest + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**dataSourceIdentifier** | **String** | Unique ID or name of the data-model for which to set NL instructions. | | +|**nlInstructionsInfo** | [**List<NLInstructionsInfoInput>**](NLInstructionsInfoInput.md) | List of NL instructions to set for the data-model. | | + + +## Implemented Interfaces + +* Serializable + + diff --git a/sdks/java/docs/ShareMetadataRequest.md b/sdks/java/docs/ShareMetadataRequest.md new file mode 100644 index 000000000..6be36db41 --- /dev/null +++ b/sdks/java/docs/ShareMetadataRequest.md @@ -0,0 +1,39 @@ + + +# ShareMetadataRequest + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**metadataType** | [**MetadataTypeEnum**](#MetadataTypeEnum) | Type of metadata. Required if identifier in metadata_identifies is a name. 1. Liveboard 2. Answers 3. LOGICAL_TABLE for any data object such as table, worksheet or view. 4. LOGICAL_COLUMN 5. Connection 6. Collection | [optional] | +|**metadataIdentifiers** | **List<String>** | Unique ID or name of metadata objects. Note: All the names should belong to same metadata_type | [optional] | +|**metadata** | [**List<ShareMetadataTypeInput>**](ShareMetadataTypeInput.md) | Metadata details for sharing objects. | [optional] | +|**permissions** | [**List<SharePermissionsInput>**](SharePermissionsInput.md) | Permission details for sharing the objects. | | +|**visualizationIdentifiers** | **List<String>** | Options to specify details of Liveboard. First Liveboard encountered in payload is considered to be the corresponding Liveboard. | [optional] | +|**emails** | **List<String>** | Email IDs to which notifications will be sent. | [optional] | +|**message** | **String** | Message to be included in notification. | | +|**enableCustomUrl** | **Boolean** | Sends object URLs in the customized format in email notifications. | [optional] | +|**notifyOnShare** | **Boolean** | Flag to notify user when any object is shared. | [optional] | +|**hasLenientDiscoverability** | **Boolean** | Flag to make the object discoverable. | [optional] | + + + +## Enum: MetadataTypeEnum + +| Name | Value | +|---- | -----| +| LIVEBOARD | "LIVEBOARD" | +| ANSWER | "ANSWER" | +| LOGICAL_TABLE | "LOGICAL_TABLE" | +| LOGICAL_COLUMN | "LOGICAL_COLUMN" | +| CONNECTION | "CONNECTION" | +| COLLECTION | "COLLECTION" | + + +## Implemented Interfaces + +* Serializable + + diff --git a/sdks/java/docs/ShareMetadataTypeInput.md b/sdks/java/docs/ShareMetadataTypeInput.md new file mode 100644 index 000000000..2bceb4602 --- /dev/null +++ b/sdks/java/docs/ShareMetadataTypeInput.md @@ -0,0 +1,31 @@ + + +# ShareMetadataTypeInput + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**type** | [**TypeEnum**](#TypeEnum) | Type of metadata. Type of metadata. Required if the name of the object is set as the identifier. This attribute is optional when the object GUID is specified as the identifier. | [optional] | +|**identifier** | **String** | Unique ID or name of the metadata object. | | + + + +## Enum: TypeEnum + +| Name | Value | +|---- | -----| +| LIVEBOARD | "LIVEBOARD" | +| ANSWER | "ANSWER" | +| LOGICAL_TABLE | "LOGICAL_TABLE" | +| LOGICAL_COLUMN | "LOGICAL_COLUMN" | +| CONNECTION | "CONNECTION" | +| COLLECTION | "COLLECTION" | + + +## Implemented Interfaces + +* Serializable + + diff --git a/sdks/java/docs/SharePermissionsInput.md b/sdks/java/docs/SharePermissionsInput.md new file mode 100644 index 000000000..d99e7008a --- /dev/null +++ b/sdks/java/docs/SharePermissionsInput.md @@ -0,0 +1,38 @@ + + +# SharePermissionsInput + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**principal** | [**PrincipalsInput**](PrincipalsInput.md) | | | +|**shareMode** | [**ShareModeEnum**](#ShareModeEnum) | Type of access to the shared object | | +|**contentShareMode** | [**ContentShareModeEnum**](#ContentShareModeEnum) | Content share mode for collections. Controls access to objects within the collection. Only applicable when sharing COLLECTION metadata type. | [optional] | + + + +## Enum: ShareModeEnum + +| Name | Value | +|---- | -----| +| READ_ONLY | "READ_ONLY" | +| MODIFY | "MODIFY" | +| NO_ACCESS | "NO_ACCESS" | + + + +## Enum: ContentShareModeEnum + +| Name | Value | +|---- | -----| +| READ_ONLY | "READ_ONLY" | +| MODIFY | "MODIFY" | + + +## Implemented Interfaces + +* Serializable + + diff --git a/sdks/java/docs/SingleAnswerRequest.md b/sdks/java/docs/SingleAnswerRequest.md new file mode 100644 index 000000000..119b79bb5 --- /dev/null +++ b/sdks/java/docs/SingleAnswerRequest.md @@ -0,0 +1,18 @@ + + +# SingleAnswerRequest + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**query** | **String** | A natural language query string to generate the Answer. | | +|**metadataIdentifier** | **String** | ID of the metadata object, such as a Worksheet or Model, to use as a data source for the query. | | + + +## Implemented Interfaces + +* Serializable + + diff --git a/sdks/java/docs/SortOption.md b/sdks/java/docs/SortOption.md new file mode 100644 index 000000000..fad82add6 --- /dev/null +++ b/sdks/java/docs/SortOption.md @@ -0,0 +1,40 @@ + + +# SortOption + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**fieldName** | [**FieldNameEnum**](#FieldNameEnum) | Name of the field to apply the sort on. | [optional] | +|**order** | [**OrderEnum**](#OrderEnum) | Sort order : ASC(Ascending) or DESC(Descending). | [optional] | + + + +## Enum: FieldNameEnum + +| Name | Value | +|---- | -----| +| DEFAULT | "DEFAULT" | +| NAME | "NAME" | +| DISPLAY_NAME | "DISPLAY_NAME" | +| AUTHOR | "AUTHOR" | +| CREATED | "CREATED" | +| MODIFIED | "MODIFIED" | + + + +## Enum: OrderEnum + +| Name | Value | +|---- | -----| +| ASC | "ASC" | +| DESC | "DESC" | + + +## Implemented Interfaces + +* Serializable + + diff --git a/sdks/java/docs/SortOptionInput.md b/sdks/java/docs/SortOptionInput.md new file mode 100644 index 000000000..530ea56f7 --- /dev/null +++ b/sdks/java/docs/SortOptionInput.md @@ -0,0 +1,44 @@ + + +# SortOptionInput + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**fieldName** | [**FieldNameEnum**](#FieldNameEnum) | Name of the field to apply the sort on. | [optional] | +|**order** | [**OrderEnum**](#OrderEnum) | Sort order : ASC(Ascending) or DESC(Descending). | [optional] | + + + +## Enum: FieldNameEnum + +| Name | Value | +|---- | -----| +| NAME | "NAME" | +| DISPLAY_NAME | "DISPLAY_NAME" | +| AUTHOR | "AUTHOR" | +| CREATED | "CREATED" | +| MODIFIED | "MODIFIED" | +| LAST_ACCESSED | "LAST_ACCESSED" | +| SYNCED | "SYNCED" | +| VIEWS | "VIEWS" | +| USER_STATE | "USER_STATE" | +| ROW_COUNT | "ROW_COUNT" | + + + +## Enum: OrderEnum + +| Name | Value | +|---- | -----| +| ASC | "ASC" | +| DESC | "DESC" | + + +## Implemented Interfaces + +* Serializable + + diff --git a/sdks/java/docs/SortOptions.md b/sdks/java/docs/SortOptions.md new file mode 100644 index 000000000..07ac9e297 --- /dev/null +++ b/sdks/java/docs/SortOptions.md @@ -0,0 +1,40 @@ + + +# SortOptions + +Sort options. + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**fieldName** | [**FieldNameEnum**](#FieldNameEnum) | Name of the field to apply the sort on. | [optional] | +|**order** | [**OrderEnum**](#OrderEnum) | Sort order : ASC(Ascending) or DESC(Descending). | [optional] | + + + +## Enum: FieldNameEnum + +| Name | Value | +|---- | -----| +| NAME | "NAME" | +| DISPLAY_NAME | "DISPLAY_NAME" | +| AUTHOR | "AUTHOR" | +| CREATED | "CREATED" | +| MODIFIED | "MODIFIED" | + + + +## Enum: OrderEnum + +| Name | Value | +|---- | -----| +| ASC | "ASC" | +| DESC | "DESC" | + + +## Implemented Interfaces + +* Serializable + + diff --git a/sdks/java/docs/SortingOptions.md b/sdks/java/docs/SortingOptions.md new file mode 100644 index 000000000..b68dada0b --- /dev/null +++ b/sdks/java/docs/SortingOptions.md @@ -0,0 +1,19 @@ + + +# SortingOptions + +Sort options. + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**fieldName** | **String** | Name of the field to apply the sort on. | [optional] | +|**order** | **String** | Sort order : ASC(Ascending) or DESC(Descending). | [optional] | + + +## Implemented Interfaces + +* Serializable + + diff --git a/sdks/java/docs/SqlQuery.md b/sdks/java/docs/SqlQuery.md new file mode 100644 index 000000000..712af7268 --- /dev/null +++ b/sdks/java/docs/SqlQuery.md @@ -0,0 +1,20 @@ + + +# SqlQuery + +Response format associated with fetch SQL query api + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**metadataId** | **String** | Unique identifier of the metadata. | | +|**metadataName** | **String** | Name of the metadata. | | +|**sqlQuery** | **String** | SQL query of a metadata object. | | + + +## Implemented Interfaces + +* Serializable + + diff --git a/sdks/java/docs/SqlQueryResponse.md b/sdks/java/docs/SqlQueryResponse.md new file mode 100644 index 000000000..dc1f8f3a1 --- /dev/null +++ b/sdks/java/docs/SqlQueryResponse.md @@ -0,0 +1,36 @@ + + +# SqlQueryResponse + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**metadataId** | **String** | Unique identifier of the metadata. | | +|**metadataName** | **String** | Name of the metadata. | | +|**metadataType** | [**MetadataTypeEnum**](#MetadataTypeEnum) | Type of the metadata. | | +|**sqlQueries** | [**List<SqlQuery>**](SqlQuery.md) | SQL query details of metadata objects. | | + + + +## Enum: MetadataTypeEnum + +| Name | Value | +|---- | -----| +| LIVEBOARD | "LIVEBOARD" | +| ANSWER | "ANSWER" | +| LOGICAL_TABLE | "LOGICAL_TABLE" | +| LOGICAL_COLUMN | "LOGICAL_COLUMN" | +| CONNECTION | "CONNECTION" | +| TAG | "TAG" | +| USER | "USER" | +| USER_GROUP | "USER_GROUP" | +| LOGICAL_RELATIONSHIP | "LOGICAL_RELATIONSHIP" | + + +## Implemented Interfaces + +* Serializable + + diff --git a/sdks/java/docs/StorageConfig.md b/sdks/java/docs/StorageConfig.md new file mode 100644 index 000000000..cb69a7ef8 --- /dev/null +++ b/sdks/java/docs/StorageConfig.md @@ -0,0 +1,18 @@ + + +# StorageConfig + +Storage configuration containing provider-specific settings. + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**awsS3Config** | [**AwsS3Config**](AwsS3Config.md) | | [optional] | + + +## Implemented Interfaces + +* Serializable + + diff --git a/sdks/java/docs/StorageConfigInput.md b/sdks/java/docs/StorageConfigInput.md new file mode 100644 index 000000000..5d5a70ac8 --- /dev/null +++ b/sdks/java/docs/StorageConfigInput.md @@ -0,0 +1,18 @@ + + +# StorageConfigInput + +Input type for storage configuration. + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**awsS3Config** | [**AwsS3ConfigInput**](AwsS3ConfigInput.md) | | [optional] | + + +## Implemented Interfaces + +* Serializable + + diff --git a/sdks/java/docs/StorageDestination.md b/sdks/java/docs/StorageDestination.md new file mode 100644 index 000000000..cf62a4b78 --- /dev/null +++ b/sdks/java/docs/StorageDestination.md @@ -0,0 +1,27 @@ + + +# StorageDestination + +Storage destination configuration for webhook payload delivery. + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**storageType** | [**StorageTypeEnum**](#StorageTypeEnum) | Type of storage destination (e.g., AWS_S3). | | +|**storageConfig** | [**StorageConfig**](StorageConfig.md) | | | + + + +## Enum: StorageTypeEnum + +| Name | Value | +|---- | -----| +| AWS_S3 | "AWS_S3" | + + +## Implemented Interfaces + +* Serializable + + diff --git a/sdks/java/docs/StorageDestinationInput.md b/sdks/java/docs/StorageDestinationInput.md new file mode 100644 index 000000000..17702c6c7 --- /dev/null +++ b/sdks/java/docs/StorageDestinationInput.md @@ -0,0 +1,27 @@ + + +# StorageDestinationInput + +Input type for storage destination configuration. + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**storageType** | [**StorageTypeEnum**](#StorageTypeEnum) | Type of storage destination. Example: \"AWS_S3\" | | +|**storageConfig** | [**StorageConfigInput**](StorageConfigInput.md) | | | + + + +## Enum: StorageTypeEnum + +| Name | Value | +|---- | -----| +| AWS_S3 | "AWS_S3" | + + +## Implemented Interfaces + +* Serializable + + diff --git a/sdks/java/docs/SyncMetadataRequest.md b/sdks/java/docs/SyncMetadataRequest.md new file mode 100644 index 000000000..2c0b8244c --- /dev/null +++ b/sdks/java/docs/SyncMetadataRequest.md @@ -0,0 +1,26 @@ + + +# SyncMetadataRequest + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**tables** | **Object** | Array of tables to sync. Each element can be: - String: Table identifier (GUID or name) to sync all columns for that table. - Object: {tableId: [columnIds]} to sync specific columns. If not provided, syncs all tables in the connection. | [optional] | +|**syncAttributes** | [**List<SyncAttributesEnum>**](#List<SyncAttributesEnum>) | List of sync_attributes to sync from CDW. The default value is DESCRIPTION. | [optional] | + + + +## Enum: List<SyncAttributesEnum> + +| Name | Value | +|---- | -----| +| DESCRIPTION | "DESCRIPTION" | + + +## Implemented Interfaces + +* Serializable + + diff --git a/sdks/java/docs/SyncMetadataResponse.md b/sdks/java/docs/SyncMetadataResponse.md new file mode 100644 index 000000000..4ff582295 --- /dev/null +++ b/sdks/java/docs/SyncMetadataResponse.md @@ -0,0 +1,33 @@ + + +# SyncMetadataResponse + +Response from sync metadata operation. + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**status** | [**StatusEnum**](#StatusEnum) | Overall status of the sync operation. | [optional] | +|**tablesUpdated** | **Integer** | Number of tables with metadata updates. | [optional] | +|**columnsUpdated** | **Integer** | Number of columns with metadata updates. | [optional] | +|**tablesFailed** | **Integer** | Number of tables that failed to sync (for PARTIAL_SUCCESS). | [optional] | +|**columnsFailed** | **Integer** | Number of columns that failed to sync (for PARTIAL_SUCCESS). | [optional] | +|**message** | **String** | Message describing the result. | [optional] | + + + +## Enum: StatusEnum + +| Name | Value | +|---- | -----| +| SUCCESS | "SUCCESS" | +| PARTIAL_SUCCESS | "PARTIAL_SUCCESS" | +| NO_UPDATE | "NO_UPDATE" | + + +## Implemented Interfaces + +* Serializable + + diff --git a/sdks/java/docs/SystemApi.md b/sdks/java/docs/SystemApi.md new file mode 100644 index 000000000..ab77934a8 --- /dev/null +++ b/sdks/java/docs/SystemApi.md @@ -0,0 +1,332 @@ +# SystemApi + +All URIs are relative to *CLUSTER_URL* + +| Method | HTTP request | +|------------- | ------------- | +| [**configureCommunicationChannelPreferences**](SystemApi.md#configureCommunicationChannelPreferences) | **POST** /api/rest/2.0/system/preferences/communication-channels/configure | +| [**configureSecuritySettings**](SystemApi.md#configureSecuritySettings) | **POST** /api/rest/2.0/system/security-settings/configure | +| [**getSystemConfig**](SystemApi.md#getSystemConfig) | **GET** /api/rest/2.0/system/config | +| [**getSystemInformation**](SystemApi.md#getSystemInformation) | **GET** /api/rest/2.0/system | +| [**getSystemOverrideInfo**](SystemApi.md#getSystemOverrideInfo) | **GET** /api/rest/2.0/system/config-overrides | +| [**searchCommunicationChannelPreferences**](SystemApi.md#searchCommunicationChannelPreferences) | **POST** /api/rest/2.0/system/preferences/communication-channels/search | +| [**searchSecuritySettings**](SystemApi.md#searchSecuritySettings) | **POST** /api/rest/2.0/system/security-settings/search | +| [**updateSystemConfig**](SystemApi.md#updateSystemConfig) | **POST** /api/rest/2.0/system/config-update | +| [**validateCommunicationChannel**](SystemApi.md#validateCommunicationChannel) | **POST** /api/rest/2.0/system/communication-channels/validate | + + + +# **configureCommunicationChannelPreferences** +> configureCommunicationChannelPreferences(configureCommunicationChannelPreferencesRequest) + + + + Version: 10.14.0.cl or later Configure communication channel preferences. - Use `cluster_preferences` to update the default preferences for your ThoughtSpot application instance. - If your instance has [Orgs](https://docs.thoughtspot.com/cloud/latest/orgs-overview), use `org_preferences` to specify Org-specific preferences that override the defaults. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) or `DEVELOPER` (**Has developer privilege**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, users with `APPLICATION_ADMINISTRATION` (**Can manage application settings**) privilege are also authorized to perform this action. + +### Parameters + +| Name | Type | +|------------- | ------------- | +| **configureCommunicationChannelPreferencesRequest** | [**ConfigureCommunicationChannelPreferencesRequest**](ConfigureCommunicationChannelPreferencesRequest.md) + +### Return type + +null (empty response body) + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **204** | Communication channel preferences successfully updated. | - | +| **400** | Invalid request. | - | +| **401** | Unauthorized access. | - | +| **403** | Forbidden access. | - | +| **500** | Unexpected error | - | + + +# **configureSecuritySettings** +> configureSecuritySettings(configureSecuritySettingsRequest) + + + + Version: 26.2.0.cl or later Configure security settings for your ThoughtSpot application instance. - Use `cluster_preferences` to update cluster-level security settings including CORS whitelisted URLs, CSP settings, SAML redirect URLs, partitioned cookies, and non-embed access configuration. - Use `org_preferences` to configure Org-specific security settings. If your instance has [Orgs](https://docs.thoughtspot.com/cloud/latest/orgs-overview), this allows configuring CORS and non-embed access settings specific to the Org. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) or `DEVELOPER` (**Has developer privilege**) privilege. Cluster-level SAML and script-src settings require `ADMINISTRATION` privilege. See [Security Settings](https://developers.thoughtspot.com/docs/security-settings) for more details. + +### Parameters + +| Name | Type | +|------------- | ------------- | +| **configureSecuritySettingsRequest** | [**ConfigureSecuritySettingsRequest**](ConfigureSecuritySettingsRequest.md) + +### Return type + +null (empty response body) + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **204** | Successfully configured the security settings. | - | +| **400** | Invalid request. | - | +| **401** | Unauthorized access. | - | +| **403** | Forbidden access. | - | +| **500** | Unexpected error | - | + + +# **getSystemConfig** +> SystemConfig getSystemConfig() + + + + Version: 9.0.0.cl or later Retrieves the current configuration details of the cluster. If the request is successful, the API returns a list configuration settings applied on the cluster. Requires `ADMINISTRATION`(**Can administer ThoughtSpot**) privilege to view these complete configuration settings of the cluster. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `SYSTEM_INFO_ADMINISTRATION` (**Can view system activities**) privilege is required. This API does not require any parameters to be passed in the request. + +### Parameters +This endpoint does not need any parameter. + +### Return type + +[**SystemConfig**](SystemConfig.md) + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Cluster config information. | - | +| **400** | Invalid request. | - | +| **401** | Unauthorized access. | - | +| **403** | Forbidden access. | - | +| **500** | Unexpected error | - | + + +# **getSystemInformation** +> SystemInfo getSystemInformation() + + + + Version: 9.0.0.cl or later Gets system information such as the release version, locale, time zone, deployment environment, date format, and date time format of the cluster. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privileges. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `SYSTEM_INFO_ADMINISTRATION` (**Can view system activities**) privilege is required. This API does not require any parameters to be passed in the request. + +### Parameters +This endpoint does not need any parameter. + +### Return type + +[**SystemInfo**](SystemInfo.md) + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Cluster information. | - | +| **400** | Invalid request. | - | +| **401** | Unauthorized access. | - | +| **403** | Forbidden access. | - | +| **500** | Unexpected error | - | + + +# **getSystemOverrideInfo** +> SystemOverrideInfo getSystemOverrideInfo() + + + + Version: 9.2.0.cl or later Gets a list of configuration overrides applied on the cluster. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `APPLICATION_ADMINISTRATION` (**Can manage application settings**) privilege is required. This API does not require any parameters to be passed in the request. + +### Parameters +This endpoint does not need any parameter. + +### Return type + +[**SystemOverrideInfo**](SystemOverrideInfo.md) + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Cluster configuration which can be overridden. | - | +| **400** | Invalid request. | - | +| **401** | Unauthorized access. | - | +| **403** | Forbidden access. | - | +| **500** | Unexpected error | - | + + +# **searchCommunicationChannelPreferences** +> CommunicationChannelPreferencesResponse searchCommunicationChannelPreferences(searchCommunicationChannelPreferencesRequest) + + + + Version: 10.14.0.cl or later Fetch communication channel preferences. - Use `cluster_preferences` to fetch the default preferences for your ThoughtSpot application instance. - If your instance has [Orgs](https://docs.thoughtspot.com/cloud/latest/orgs-overview), use `org_preferences` to fetch any Org-specific preferences that override the defaults. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) or `DEVELOPER` (**Has developer privilege**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, users with `APPLICATION_ADMINISTRATION` (**Can manage application settings**) privilege are also authorized to perform this action. + +### Parameters + +| Name | Type | +|------------- | ------------- | +| **searchCommunicationChannelPreferencesRequest** | [**SearchCommunicationChannelPreferencesRequest**](SearchCommunicationChannelPreferencesRequest.md) + +### Return type + +[**CommunicationChannelPreferencesResponse**](CommunicationChannelPreferencesResponse.md) + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Communication channel preferences retrieved successfully. | - | +| **400** | Invalid request. | - | +| **401** | Unauthorized access. | - | +| **403** | Forbidden access. | - | +| **500** | Unexpected error | - | + + +# **searchSecuritySettings** +> SecuritySettingsResponse searchSecuritySettings(searchSecuritySettingsRequest) + + + + Version: 26.2.0.cl or later Fetch security settings for your ThoughtSpot application instance. - Use `scope: CLUSTER` to retrieve cluster-level security settings, including CORS and CSP allowlists, SAML redirect URLs, and settings that control access to non-embedded pages. - Use `scope: ORG` to retrieve Org-level security settings. If your instance has [Orgs](https://docs.thoughtspot.com/cloud/latest/orgs-overview), this returns CORS and non-embed access settings specific to the Org. - If `scope` is not specified, returns both cluster and Org-specific settings based on user privileges. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) or `DEVELOPER` (**Has developer privilege**) privilege. See [Security Settings](https://developers.thoughtspot.com/docs/security-settings) for more details. + +### Parameters + +| Name | Type | +|------------- | ------------- | +| **searchSecuritySettingsRequest** | [**SearchSecuritySettingsRequest**](SearchSecuritySettingsRequest.md) + +### Return type + +[**SecuritySettingsResponse**](SecuritySettingsResponse.md) + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Successfully retrieved the list of security settings. | - | +| **400** | Invalid request. | - | +| **401** | Unauthorized access. | - | +| **403** | Forbidden access. | - | +| **500** | Unexpected error | - | + + +# **updateSystemConfig** +> updateSystemConfig(updateSystemConfigRequest) + + + + Version: 9.2.0.cl or later Updates the current configuration of the cluster. You must send the configuration data in JSON format. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privileges. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `APPLICATION_ADMINISTRATION` (**Can manage application settings**) privilege is required. + +### Parameters + +| Name | Type | +|------------- | ------------- | +| **updateSystemConfigRequest** | [**UpdateSystemConfigRequest**](UpdateSystemConfigRequest.md) + +### Return type + +null (empty response body) + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **204** | Configuration successfully updated. | - | +| **400** | Invalid request. | - | +| **401** | Unauthorized access. | - | +| **403** | Forbidden access. | - | +| **500** | Unexpected error | - | + + +# **validateCommunicationChannel** +> CommunicationChannelValidateResponse validateCommunicationChannel(validateCommunicationChannelRequest) + + + + Version: 26.4.0.cl or later Validates a communication channel configuration to ensure it is properly set up and can receive events. - Use `channel_type` to specify the type of communication channel to validate (e.g., WEBHOOK). - Use `channel_identifier` to provide the unique identifier or name for the communication channel. - Use `event_type` to specify the event type to validate for this channel. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) or `DEVELOPER` (**Has developer privilege**) privilege. For webhook channels, users with `CAN_MANAGE_WEBHOOKS` (**Can manage webhooks**) privilege are also authorized to perform this action. + +### Parameters + +| Name | Type | +|------------- | ------------- | +| **validateCommunicationChannelRequest** | [**ValidateCommunicationChannelRequest**](ValidateCommunicationChannelRequest.md) + +### Return type + +[**CommunicationChannelValidateResponse**](CommunicationChannelValidateResponse.md) + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | communication channel configuration validated successfully. | - | +| **400** | Invalid request. | - | +| **401** | Unauthorized access. | - | +| **403** | Forbidden access. | - | +| **500** | Unexpected error | - | + diff --git a/sdks/java/docs/SystemConfig.md b/sdks/java/docs/SystemConfig.md new file mode 100644 index 000000000..4530bb616 --- /dev/null +++ b/sdks/java/docs/SystemConfig.md @@ -0,0 +1,19 @@ + + +# SystemConfig + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**onboardingContentUrl** | **String** | | [optional] | +|**samlEnabled** | **Boolean** | | [optional] | +|**oktaEnabled** | **Boolean** | | [optional] | + + +## Implemented Interfaces + +* Serializable + + diff --git a/sdks/java/docs/SystemInfo.md b/sdks/java/docs/SystemInfo.md new file mode 100644 index 000000000..b78316817 --- /dev/null +++ b/sdks/java/docs/SystemInfo.md @@ -0,0 +1,39 @@ + + +# SystemInfo + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**id** | **String** | The unique identifier of the object | [optional] | +|**name** | **String** | Name of the cluster. | [optional] | +|**releaseVersion** | **String** | The release version of the cluster. | [optional] | +|**timeZone** | **String** | The timezone of the cluster. | [optional] | +|**locale** | **String** | The default locale of the cluster. | [optional] | +|**dateFormat** | **String** | The default date format representation of the cluster. | [optional] | +|**apiVersion** | **String** | The API version of the cluster. | [optional] | +|**type** | **String** | The deployment type of the cluster. | [optional] | +|**environment** | **String** | The deployed environment of the cluster. | [optional] | +|**license** | **String** | The license applied to the cluster. | [optional] | +|**dateTimeFormat** | **String** | The default date time format representation of the cluster. | [optional] | +|**timeFormat** | **String** | The default time format representation of the cluster. | [optional] | +|**systemUserId** | **String** | The unique identifier of system user. | [optional] | +|**superUserId** | **String** | The unique identifier of super user. | [optional] | +|**hiddenObjectId** | **String** | The unique identifier of hidden object. | [optional] | +|**systemGroupId** | **String** | The unique identifier of system group. | [optional] | +|**tsadminUserId** | **String** | The unique identifier of tsadmin user. | [optional] | +|**adminGroupId** | **String** | The unique identifier of admin group. | [optional] | +|**allTablesConnectionId** | **String** | The unique identifier of all tables connection. | [optional] | +|**allUserGroupId** | **String** | The unique identifier of ALL group. | [optional] | +|**acceptLanguage** | **String** | The supported accept language by the cluster. | [optional] | +|**allUserGroupMemberUserCount** | **Integer** | The count of users of ALL group. | [optional] | +|**logicalModelVersion** | **Integer** | The version number of logical model of the cluster. | [optional] | + + +## Implemented Interfaces + +* Serializable + + diff --git a/sdks/java/docs/SystemOverrideInfo.md b/sdks/java/docs/SystemOverrideInfo.md new file mode 100644 index 000000000..850633824 --- /dev/null +++ b/sdks/java/docs/SystemOverrideInfo.md @@ -0,0 +1,17 @@ + + +# SystemOverrideInfo + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**configOverrideInfo** | **Object** | | [optional] | + + +## Implemented Interfaces + +* Serializable + + diff --git a/sdks/java/docs/Table.md b/sdks/java/docs/Table.md new file mode 100644 index 000000000..033b87ab2 --- /dev/null +++ b/sdks/java/docs/Table.md @@ -0,0 +1,23 @@ + + +# Table + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**name** | **String** | Name of the table. | | +|**columns** | [**List<Column>**](Column.md) | Columns of the table. | [optional] | +|**type** | **String** | Type of table. Either view or table | [optional] | +|**description** | **String** | Description of the table | [optional] | +|**selected** | **Boolean** | Determines if the table is selected | [optional] | +|**linked** | **Boolean** | Determines if the table is linked | [optional] | +|**relationships** | **List<Object>** | List of relationships for the table | [optional] | + + +## Implemented Interfaces + +* Serializable + + diff --git a/sdks/java/docs/Tag.md b/sdks/java/docs/Tag.md new file mode 100644 index 000000000..d15c6a746 --- /dev/null +++ b/sdks/java/docs/Tag.md @@ -0,0 +1,28 @@ + + +# Tag + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**name** | **String** | | | +|**id** | **String** | | | +|**color** | **String** | | [optional] | +|**deleted** | **Boolean** | | [optional] | +|**hidden** | **Boolean** | | [optional] | +|**external** | **Boolean** | | [optional] | +|**deprecated** | **Boolean** | | [optional] | +|**creationTimeInMillis** | **Float** | | [optional] | +|**modificationTimeInMillis** | **Float** | | [optional] | +|**authorId** | **String** | | [optional] | +|**modifierId** | **String** | | [optional] | +|**ownerId** | **String** | | [optional] | + + +## Implemented Interfaces + +* Serializable + + diff --git a/sdks/java/docs/TagMetadataTypeInput.md b/sdks/java/docs/TagMetadataTypeInput.md new file mode 100644 index 000000000..42f5972ca --- /dev/null +++ b/sdks/java/docs/TagMetadataTypeInput.md @@ -0,0 +1,31 @@ + + +# TagMetadataTypeInput + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**type** | [**TypeEnum**](#TypeEnum) | Type of metadata. Required if the name of the object is set as the identifier. This attribute is optional when the object GUID is specified as the identifier. 1. LIVEBOARD 2. ANSWERS 3. LOGICAL_TABLE for any data object such as table, worksheet or view. 4. LOGICAL_COLUMN for a column of any data object such as tables, worksheets or views. | [optional] | +|**identifier** | **String** | Unique ID or name of the metadata. | | + + + +## Enum: TypeEnum + +| Name | Value | +|---- | -----| +| LIVEBOARD | "LIVEBOARD" | +| ANSWER | "ANSWER" | +| LOGICAL_TABLE | "LOGICAL_TABLE" | +| LOGICAL_COLUMN | "LOGICAL_COLUMN" | +| CONNECTION | "CONNECTION" | +| COLLECTION | "COLLECTION" | + + +## Implemented Interfaces + +* Serializable + + diff --git a/sdks/java/docs/TagsApi.md b/sdks/java/docs/TagsApi.md new file mode 100644 index 000000000..0a573022e --- /dev/null +++ b/sdks/java/docs/TagsApi.md @@ -0,0 +1,231 @@ +# TagsApi + +All URIs are relative to *CLUSTER_URL* + +| Method | HTTP request | +|------------- | ------------- | +| [**assignTag**](TagsApi.md#assignTag) | **POST** /api/rest/2.0/tags/assign | +| [**createTag**](TagsApi.md#createTag) | **POST** /api/rest/2.0/tags/create | +| [**deleteTag**](TagsApi.md#deleteTag) | **POST** /api/rest/2.0/tags/{tag_identifier}/delete | +| [**searchTags**](TagsApi.md#searchTags) | **POST** /api/rest/2.0/tags/search | +| [**unassignTag**](TagsApi.md#unassignTag) | **POST** /api/rest/2.0/tags/unassign | +| [**updateTag**](TagsApi.md#updateTag) | **POST** /api/rest/2.0/tags/{tag_identifier}/update | + + + +# **assignTag** +> assignTag(assignTagRequest) + + + + Version: 9.0.0.cl or later Assigns tags to Liveboards, Answers, Tables, and Worksheets. Requires edit access to the metadata object. + +### Parameters + +| Name | Type | +|------------- | ------------- | +| **assignTagRequest** | [**AssignTagRequest**](AssignTagRequest.md) + +### Return type + +null (empty response body) + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **204** | Tags successfully assigned. | - | +| **400** | Invalid request. | - | +| **401** | Unauthorized access. | - | +| **403** | Forbidden access. | - | +| **500** | Unexpected error | - | + + +# **createTag** +> Tag createTag(createTagRequest) + + + + Version: 9.0.0.cl or later Creates a tag object. Tags are labels that identify a metadata object. For example, you can create a tag to designate subject areas, such as sales, HR, marketing, and finance. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `TAGMANAGEMENT` (**Can manage tags**) privilege is required to create, edit, and delete tags. + +### Parameters + +| Name | Type | +|------------- | ------------- | +| **createTagRequest** | [**CreateTagRequest**](CreateTagRequest.md) + +### Return type + +[**Tag**](Tag.md) + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Tag successfully created. | - | +| **400** | Invalid request. | - | +| **401** | Unauthorized access. | - | +| **403** | Forbidden access. | - | +| **500** | Unexpected error | - | + + +# **deleteTag** +> deleteTag(tagIdentifier) + + + + Version: 9.0.0.cl or later Deletes a tag object from the ThoughtSpot system Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `TAGMANAGEMENT` (**Can manage tags**) privilege is required to create, edit, and delete tags. + +### Parameters + +| Name | Type | +|------------- | ------------- | +| **tagIdentifier** | **String** + +### Return type + +null (empty response body) + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **204** | Tag successfully deleted. | - | +| **400** | Invalid request. | - | +| **401** | Unauthorized access. | - | +| **403** | Forbidden access. | - | +| **500** | Unexpected error | - | + + +# **searchTags** +> List<Tag> searchTags(searchTagsRequest) + + + + Version: 9.0.0.cl or later Gets a list of tag objects available on the ThoughtSpot system. To get details of a specific tag object, specify the GUID or name. Any authenticated user can search for tag objects. + +### Parameters + +| Name | Type | +|------------- | ------------- | +| **searchTagsRequest** | [**SearchTagsRequest**](SearchTagsRequest.md) + +### Return type + +[**List<Tag>**](Tag.md) + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Tags search result. | - | +| **400** | Invalid request. | - | +| **401** | Unauthorized access. | - | +| **403** | Forbidden access. | - | +| **500** | Unexpected error | - | + + +# **unassignTag** +> unassignTag(unassignTagRequest) + + + + Version: 9.0.0.cl or later Removes the tags applied to a Liveboard, Answer, Table, or Worksheet. Requires edit access to the metadata object. + +### Parameters + +| Name | Type | +|------------- | ------------- | +| **unassignTagRequest** | [**UnassignTagRequest**](UnassignTagRequest.md) + +### Return type + +null (empty response body) + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **204** | Tags successfully unassigned. | - | +| **400** | Invalid request. | - | +| **401** | Unauthorized access. | - | +| **403** | Forbidden access. | - | +| **500** | Unexpected error | - | + + +# **updateTag** +> updateTag(tagIdentifier, updateTagRequest) + + + + Version: 9.0.0.cl or later Updates a tag object. You can modify the `name` and `color` properties of a tag object. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `TAGMANAGEMENT` (**Can manage tags**) privilege is required to create, edit, and delete tags. + +### Parameters + +| Name | Type | +|------------- | ------------- | +| **tagIdentifier** | **String** +| **updateTagRequest** | [**UpdateTagRequest**](UpdateTagRequest.md) + +### Return type + +null (empty response body) + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **204** | Tag successfully updated. | - | +| **400** | Invalid request. | - | +| **401** | Unauthorized access. | - | +| **403** | Forbidden access. | - | +| **500** | Unexpected error | - | + diff --git a/sdks/java/docs/TemplatePropertiesInputCreate.md b/sdks/java/docs/TemplatePropertiesInputCreate.md new file mode 100644 index 000000000..a55b11333 --- /dev/null +++ b/sdks/java/docs/TemplatePropertiesInputCreate.md @@ -0,0 +1,45 @@ + + +# TemplatePropertiesInputCreate + +Email customization configuration properties + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**ctaButtonBgColor** | **String** | Background color for call-to-action button in hex format | [optional] | +|**ctaTextFontColor** | **String** | Text color for call-to-action button in hex format | [optional] | +|**primaryBgColor** | **String** | Primary background color in hex format | [optional] | +|**homeUrl** | **String** | Home page URL (HTTP/HTTPS only) | [optional] | +|**logoUrl** | **String** | Logo image URL (HTTP/HTTPS only) | [optional] | +|**fontFamily** | **String** | Font family for email content (e.g., Arial, sans-serif) | [optional] | +|**productName** | **String** | Product name to display | [optional] | +|**footerAddress** | **String** | Footer address text | [optional] | +|**footerPhone** | **String** | Footer phone number | [optional] | +|**replacementValueForLiveboard** | **String** | Replacement value for Liveboard | [optional] | +|**replacementValueForAnswer** | **String** | Replacement value for Answer | [optional] | +|**replacementValueForSpotIq** | **String** | Replacement value for SpotIQ | [optional] | +|**hideFooterAddress** | **Boolean** | Whether to hide footer address | [optional] | +|**hideFooterPhone** | **Boolean** | Whether to hide footer phone number | [optional] | +|**hideManageNotification** | **Boolean** | Whether to hide manage notification link | [optional] | +|**hideMobileAppNudge** | **Boolean** | Whether to hide mobile app nudge | [optional] | +|**hidePrivacyPolicy** | **Boolean** | Whether to hide privacy policy link | [optional] | +|**hideProductName** | **Boolean** | Whether to hide product name | [optional] | +|**hideTsVocabularyDefinitions** | **Boolean** | Whether to hide ThoughtSpot vocabulary definitions | [optional] | +|**hideNotificationStatus** | **Boolean** | Whether to hide notification status | [optional] | +|**hideErrorMessage** | **Boolean** | Whether to hide error message | [optional] | +|**hideUnsubscribeLink** | **Boolean** | Whether to hide unsubscribe link | [optional] | +|**hideModifyAlert** | **Boolean** | Whether to hide modify alert | [optional] | +|**companyPrivacyPolicyUrl** | **String** | Company privacy policy URL (HTTP/HTTPS only) | [optional] | +|**companyWebsiteUrl** | **String** | Company website URL (HTTP/HTTPS only) | [optional] | +|**contactSupportUrl** | **String** | Contact support url (HTTP/HTTPS only). Version: 26.2.0.cl or later | [optional] | +|**hideContactSupportUrl** | **Boolean** | Whether to hide contact support url. Version: 26.2.0.cl or later | [optional] | +|**hideLogoUrl** | **Boolean** | Whether to hide logo Version: 26.4.0.cl or later | [optional] | + + +## Implemented Interfaces + +* Serializable + + diff --git a/sdks/java/docs/ThoughtSpotRestApi.md b/sdks/java/docs/ThoughtSpotRestApi.md new file mode 100644 index 000000000..5ac65023e --- /dev/null +++ b/sdks/java/docs/ThoughtSpotRestApi.md @@ -0,0 +1,5966 @@ +# ThoughtSpotRestApi + +All URIs are relative to *CLUSTER_URL* + +| Method | HTTP request | +|------------- | ------------- | +| [**activateUser**](ThoughtSpotRestApi.md#activateUser) | **POST** /api/rest/2.0/users/activate | +| [**assignChangeAuthor**](ThoughtSpotRestApi.md#assignChangeAuthor) | **POST** /api/rest/2.0/security/metadata/assign | +| [**assignTag**](ThoughtSpotRestApi.md#assignTag) | **POST** /api/rest/2.0/tags/assign | +| [**changeUserPassword**](ThoughtSpotRestApi.md#changeUserPassword) | **POST** /api/rest/2.0/users/change-password | +| [**commitBranch**](ThoughtSpotRestApi.md#commitBranch) | **POST** /api/rest/2.0/vcs/git/branches/commit | +| [**configureAuthSettings**](ThoughtSpotRestApi.md#configureAuthSettings) | **POST** /api/rest/2.0/auth/configure | +| [**configureCommunicationChannelPreferences**](ThoughtSpotRestApi.md#configureCommunicationChannelPreferences) | **POST** /api/rest/2.0/system/preferences/communication-channels/configure | +| [**configureSecuritySettings**](ThoughtSpotRestApi.md#configureSecuritySettings) | **POST** /api/rest/2.0/system/security-settings/configure | +| [**connectionConfigurationSearch**](ThoughtSpotRestApi.md#connectionConfigurationSearch) | **POST** /api/rest/2.0/connection-configurations/search | +| [**convertWorksheetToModel**](ThoughtSpotRestApi.md#convertWorksheetToModel) | **POST** /api/rest/2.0/metadata/worksheets/convert | +| [**copyObject**](ThoughtSpotRestApi.md#copyObject) | **POST** /api/rest/2.0/metadata/copyobject | +| [**createAgentConversation**](ThoughtSpotRestApi.md#createAgentConversation) | **POST** /api/rest/2.0/ai/agent/conversation/create | +| [**createCalendar**](ThoughtSpotRestApi.md#createCalendar) | **POST** /api/rest/2.0/calendars/create | +| [**createCollection**](ThoughtSpotRestApi.md#createCollection) | **POST** /api/rest/2.0/collections/create | +| [**createConfig**](ThoughtSpotRestApi.md#createConfig) | **POST** /api/rest/2.0/vcs/git/config/create | +| [**createConnection**](ThoughtSpotRestApi.md#createConnection) | **POST** /api/rest/2.0/connection/create | +| [**createConnectionConfiguration**](ThoughtSpotRestApi.md#createConnectionConfiguration) | **POST** /api/rest/2.0/connection-configurations/create | +| [**createConversation**](ThoughtSpotRestApi.md#createConversation) | **POST** /api/rest/2.0/ai/conversation/create | +| [**createCustomAction**](ThoughtSpotRestApi.md#createCustomAction) | **POST** /api/rest/2.0/customization/custom-actions | +| [**createEmailCustomization**](ThoughtSpotRestApi.md#createEmailCustomization) | **POST** /api/rest/2.0/customization/email | +| [**createOrg**](ThoughtSpotRestApi.md#createOrg) | **POST** /api/rest/2.0/orgs/create | +| [**createRole**](ThoughtSpotRestApi.md#createRole) | **POST** /api/rest/2.0/roles/create | +| [**createSchedule**](ThoughtSpotRestApi.md#createSchedule) | **POST** /api/rest/2.0/schedules/create | +| [**createTag**](ThoughtSpotRestApi.md#createTag) | **POST** /api/rest/2.0/tags/create | +| [**createUser**](ThoughtSpotRestApi.md#createUser) | **POST** /api/rest/2.0/users/create | +| [**createUserGroup**](ThoughtSpotRestApi.md#createUserGroup) | **POST** /api/rest/2.0/groups/create | +| [**createVariable**](ThoughtSpotRestApi.md#createVariable) | **POST** /api/rest/2.0/template/variables/create | +| [**createWebhookConfiguration**](ThoughtSpotRestApi.md#createWebhookConfiguration) | **POST** /api/rest/2.0/webhooks/create | +| [**dbtConnection**](ThoughtSpotRestApi.md#dbtConnection) | **POST** /api/rest/2.0/dbt/dbt-connection | +| [**dbtGenerateSyncTml**](ThoughtSpotRestApi.md#dbtGenerateSyncTml) | **POST** /api/rest/2.0/dbt/generate-sync-tml | +| [**dbtGenerateTml**](ThoughtSpotRestApi.md#dbtGenerateTml) | **POST** /api/rest/2.0/dbt/generate-tml | +| [**dbtSearch**](ThoughtSpotRestApi.md#dbtSearch) | **POST** /api/rest/2.0/dbt/search | +| [**deactivateUser**](ThoughtSpotRestApi.md#deactivateUser) | **POST** /api/rest/2.0/users/deactivate | +| [**deleteCalendar**](ThoughtSpotRestApi.md#deleteCalendar) | **POST** /api/rest/2.0/calendars/{calendar_identifier}/delete | +| [**deleteCollection**](ThoughtSpotRestApi.md#deleteCollection) | **POST** /api/rest/2.0/collections/delete | +| [**deleteConfig**](ThoughtSpotRestApi.md#deleteConfig) | **POST** /api/rest/2.0/vcs/git/config/delete | +| [**deleteConnection**](ThoughtSpotRestApi.md#deleteConnection) | **POST** /api/rest/2.0/connection/delete | +| [**deleteConnectionConfiguration**](ThoughtSpotRestApi.md#deleteConnectionConfiguration) | **POST** /api/rest/2.0/connection-configurations/delete | +| [**deleteConnectionV2**](ThoughtSpotRestApi.md#deleteConnectionV2) | **POST** /api/rest/2.0/connections/{connection_identifier}/delete | +| [**deleteCustomAction**](ThoughtSpotRestApi.md#deleteCustomAction) | **POST** /api/rest/2.0/customization/custom-actions/{custom_action_identifier}/delete | +| [**deleteDbtConnection**](ThoughtSpotRestApi.md#deleteDbtConnection) | **POST** /api/rest/2.0/dbt/{dbt_connection_identifier}/delete | +| [**deleteEmailCustomization**](ThoughtSpotRestApi.md#deleteEmailCustomization) | **POST** /api/rest/2.0/customization/email/{template_identifier}/delete | +| [**deleteMetadata**](ThoughtSpotRestApi.md#deleteMetadata) | **POST** /api/rest/2.0/metadata/delete | +| [**deleteOrg**](ThoughtSpotRestApi.md#deleteOrg) | **POST** /api/rest/2.0/orgs/{org_identifier}/delete | +| [**deleteOrgEmailCustomization**](ThoughtSpotRestApi.md#deleteOrgEmailCustomization) | **POST** /api/rest/2.0/customization/email/delete | +| [**deleteRole**](ThoughtSpotRestApi.md#deleteRole) | **POST** /api/rest/2.0/roles/{role_identifier}/delete | +| [**deleteSchedule**](ThoughtSpotRestApi.md#deleteSchedule) | **POST** /api/rest/2.0/schedules/{schedule_identifier}/delete | +| [**deleteTag**](ThoughtSpotRestApi.md#deleteTag) | **POST** /api/rest/2.0/tags/{tag_identifier}/delete | +| [**deleteUser**](ThoughtSpotRestApi.md#deleteUser) | **POST** /api/rest/2.0/users/{user_identifier}/delete | +| [**deleteUserGroup**](ThoughtSpotRestApi.md#deleteUserGroup) | **POST** /api/rest/2.0/groups/{group_identifier}/delete | +| [**deleteVariable**](ThoughtSpotRestApi.md#deleteVariable) | **POST** /api/rest/2.0/template/variables/{identifier}/delete | +| [**deleteVariables**](ThoughtSpotRestApi.md#deleteVariables) | **POST** /api/rest/2.0/template/variables/delete | +| [**deleteWebhookConfigurations**](ThoughtSpotRestApi.md#deleteWebhookConfigurations) | **POST** /api/rest/2.0/webhooks/delete | +| [**deployCommit**](ThoughtSpotRestApi.md#deployCommit) | **POST** /api/rest/2.0/vcs/git/commits/deploy | +| [**downloadConnectionMetadataChanges**](ThoughtSpotRestApi.md#downloadConnectionMetadataChanges) | **POST** /api/rest/2.0/connections/download-connection-metadata-changes/{connection_identifier} | +| [**exportAnswerReport**](ThoughtSpotRestApi.md#exportAnswerReport) | **POST** /api/rest/2.0/report/answer | +| [**exportLiveboardReport**](ThoughtSpotRestApi.md#exportLiveboardReport) | **POST** /api/rest/2.0/report/liveboard | +| [**exportMetadataTML**](ThoughtSpotRestApi.md#exportMetadataTML) | **POST** /api/rest/2.0/metadata/tml/export | +| [**exportMetadataTMLBatched**](ThoughtSpotRestApi.md#exportMetadataTMLBatched) | **POST** /api/rest/2.0/metadata/tml/export/batch | +| [**fetchAnswerData**](ThoughtSpotRestApi.md#fetchAnswerData) | **POST** /api/rest/2.0/metadata/answer/data | +| [**fetchAnswerSqlQuery**](ThoughtSpotRestApi.md#fetchAnswerSqlQuery) | **POST** /api/rest/2.0/metadata/answer/sql | +| [**fetchAsyncImportTaskStatus**](ThoughtSpotRestApi.md#fetchAsyncImportTaskStatus) | **POST** /api/rest/2.0/metadata/tml/async/status | +| [**fetchColumnSecurityRules**](ThoughtSpotRestApi.md#fetchColumnSecurityRules) | **POST** /api/rest/2.0/security/column/rules/fetch | +| [**fetchConnectionDiffStatus**](ThoughtSpotRestApi.md#fetchConnectionDiffStatus) | **POST** /api/rest/2.0/connections/fetch-connection-diff-status/{connection_identifier} | +| [**fetchLiveboardData**](ThoughtSpotRestApi.md#fetchLiveboardData) | **POST** /api/rest/2.0/metadata/liveboard/data | +| [**fetchLiveboardSqlQuery**](ThoughtSpotRestApi.md#fetchLiveboardSqlQuery) | **POST** /api/rest/2.0/metadata/liveboard/sql | +| [**fetchLogs**](ThoughtSpotRestApi.md#fetchLogs) | **POST** /api/rest/2.0/logs/fetch | +| [**fetchObjectPrivileges**](ThoughtSpotRestApi.md#fetchObjectPrivileges) | **POST** /api/rest/2.0/security/metadata/fetch-object-privileges | +| [**fetchPermissionsOfPrincipals**](ThoughtSpotRestApi.md#fetchPermissionsOfPrincipals) | **POST** /api/rest/2.0/security/principals/fetch-permissions | +| [**fetchPermissionsOnMetadata**](ThoughtSpotRestApi.md#fetchPermissionsOnMetadata) | **POST** /api/rest/2.0/security/metadata/fetch-permissions | +| [**forceLogoutUsers**](ThoughtSpotRestApi.md#forceLogoutUsers) | **POST** /api/rest/2.0/users/force-logout | +| [**generateCSV**](ThoughtSpotRestApi.md#generateCSV) | **POST** /api/rest/2.0/calendars/generate-csv | +| [**getCurrentUserInfo**](ThoughtSpotRestApi.md#getCurrentUserInfo) | **GET** /api/rest/2.0/auth/session/user | +| [**getCurrentUserToken**](ThoughtSpotRestApi.md#getCurrentUserToken) | **GET** /api/rest/2.0/auth/session/token | +| [**getCustomAccessToken**](ThoughtSpotRestApi.md#getCustomAccessToken) | **POST** /api/rest/2.0/auth/token/custom | +| [**getDataSourceSuggestions**](ThoughtSpotRestApi.md#getDataSourceSuggestions) | **POST** /api/rest/2.0/ai/data-source-suggestions | +| [**getFullAccessToken**](ThoughtSpotRestApi.md#getFullAccessToken) | **POST** /api/rest/2.0/auth/token/full | +| [**getNLInstructions**](ThoughtSpotRestApi.md#getNLInstructions) | **POST** /api/rest/2.0/ai/instructions/get | +| [**getObjectAccessToken**](ThoughtSpotRestApi.md#getObjectAccessToken) | **POST** /api/rest/2.0/auth/token/object | +| [**getRelevantQuestions**](ThoughtSpotRestApi.md#getRelevantQuestions) | **POST** /api/rest/2.0/ai/relevant-questions/ | +| [**getSystemConfig**](ThoughtSpotRestApi.md#getSystemConfig) | **GET** /api/rest/2.0/system/config | +| [**getSystemInformation**](ThoughtSpotRestApi.md#getSystemInformation) | **GET** /api/rest/2.0/system | +| [**getSystemOverrideInfo**](ThoughtSpotRestApi.md#getSystemOverrideInfo) | **GET** /api/rest/2.0/system/config-overrides | +| [**importMetadataTML**](ThoughtSpotRestApi.md#importMetadataTML) | **POST** /api/rest/2.0/metadata/tml/import | +| [**importMetadataTMLAsync**](ThoughtSpotRestApi.md#importMetadataTMLAsync) | **POST** /api/rest/2.0/metadata/tml/async/import | +| [**importUserGroups**](ThoughtSpotRestApi.md#importUserGroups) | **POST** /api/rest/2.0/groups/import | +| [**importUsers**](ThoughtSpotRestApi.md#importUsers) | **POST** /api/rest/2.0/users/import | +| [**login**](ThoughtSpotRestApi.md#login) | **POST** /api/rest/2.0/auth/session/login | +| [**logout**](ThoughtSpotRestApi.md#logout) | **POST** /api/rest/2.0/auth/session/logout | +| [**manageObjectPrivilege**](ThoughtSpotRestApi.md#manageObjectPrivilege) | **POST** /api/rest/2.0/security/metadata/manage-object-privilege | +| [**parameterizeMetadata**](ThoughtSpotRestApi.md#parameterizeMetadata) | **POST** /api/rest/2.0/metadata/parameterize | +| [**parameterizeMetadataFields**](ThoughtSpotRestApi.md#parameterizeMetadataFields) | **POST** /api/rest/2.0/metadata/parameterize-fields | +| [**publishMetadata**](ThoughtSpotRestApi.md#publishMetadata) | **POST** /api/rest/2.0/security/metadata/publish | +| [**putVariableValues**](ThoughtSpotRestApi.md#putVariableValues) | **POST** /api/rest/2.0/template/variables/{identifier}/update-values | +| [**queryGetDecomposedQuery**](ThoughtSpotRestApi.md#queryGetDecomposedQuery) | **POST** /api/rest/2.0/ai/analytical-questions | +| [**resetUserPassword**](ThoughtSpotRestApi.md#resetUserPassword) | **POST** /api/rest/2.0/users/reset-password | +| [**revertCommit**](ThoughtSpotRestApi.md#revertCommit) | **POST** /api/rest/2.0/vcs/git/commits/{commit_id}/revert | +| [**revokeRefreshTokens**](ThoughtSpotRestApi.md#revokeRefreshTokens) | **POST** /api/rest/2.0/connections/{connection_identifier}/revoke-refresh-tokens | +| [**revokeToken**](ThoughtSpotRestApi.md#revokeToken) | **POST** /api/rest/2.0/auth/token/revoke | +| [**searchAuthSettings**](ThoughtSpotRestApi.md#searchAuthSettings) | **POST** /api/rest/2.0/auth/search | +| [**searchCalendars**](ThoughtSpotRestApi.md#searchCalendars) | **POST** /api/rest/2.0/calendars/search | +| [**searchChannelHistory**](ThoughtSpotRestApi.md#searchChannelHistory) | **POST** /api/rest/2.0/jobs/history/communication-channels/search | +| [**searchCollections**](ThoughtSpotRestApi.md#searchCollections) | **POST** /api/rest/2.0/collections/search | +| [**searchCommits**](ThoughtSpotRestApi.md#searchCommits) | **POST** /api/rest/2.0/vcs/git/commits/search | +| [**searchCommunicationChannelPreferences**](ThoughtSpotRestApi.md#searchCommunicationChannelPreferences) | **POST** /api/rest/2.0/system/preferences/communication-channels/search | +| [**searchConfig**](ThoughtSpotRestApi.md#searchConfig) | **POST** /api/rest/2.0/vcs/git/config/search | +| [**searchConnection**](ThoughtSpotRestApi.md#searchConnection) | **POST** /api/rest/2.0/connection/search | +| [**searchCustomActions**](ThoughtSpotRestApi.md#searchCustomActions) | **POST** /api/rest/2.0/customization/custom-actions/search | +| [**searchData**](ThoughtSpotRestApi.md#searchData) | **POST** /api/rest/2.0/searchdata | +| [**searchEmailCustomization**](ThoughtSpotRestApi.md#searchEmailCustomization) | **POST** /api/rest/2.0/customization/email/search | +| [**searchMetadata**](ThoughtSpotRestApi.md#searchMetadata) | **POST** /api/rest/2.0/metadata/search | +| [**searchOrgs**](ThoughtSpotRestApi.md#searchOrgs) | **POST** /api/rest/2.0/orgs/search | +| [**searchRoles**](ThoughtSpotRestApi.md#searchRoles) | **POST** /api/rest/2.0/roles/search | +| [**searchSchedules**](ThoughtSpotRestApi.md#searchSchedules) | **POST** /api/rest/2.0/schedules/search | +| [**searchSecuritySettings**](ThoughtSpotRestApi.md#searchSecuritySettings) | **POST** /api/rest/2.0/system/security-settings/search | +| [**searchTags**](ThoughtSpotRestApi.md#searchTags) | **POST** /api/rest/2.0/tags/search | +| [**searchUserGroups**](ThoughtSpotRestApi.md#searchUserGroups) | **POST** /api/rest/2.0/groups/search | +| [**searchUsers**](ThoughtSpotRestApi.md#searchUsers) | **POST** /api/rest/2.0/users/search | +| [**searchVariables**](ThoughtSpotRestApi.md#searchVariables) | **POST** /api/rest/2.0/template/variables/search | +| [**searchWebhookConfigurations**](ThoughtSpotRestApi.md#searchWebhookConfigurations) | **POST** /api/rest/2.0/webhooks/search | +| [**sendAgentConversationMessage**](ThoughtSpotRestApi.md#sendAgentConversationMessage) | **POST** /api/rest/2.0/ai/agent/conversation/{conversation_identifier}/send | +| [**sendAgentConversationMessageStreaming**](ThoughtSpotRestApi.md#sendAgentConversationMessageStreaming) | **POST** /api/rest/2.0/ai/agent/conversation/{conversation_identifier}/send/stream | +| [**sendAgentMessage**](ThoughtSpotRestApi.md#sendAgentMessage) | **POST** /api/rest/2.0/ai/agent/{conversation_identifier}/converse | +| [**sendAgentMessageStreaming**](ThoughtSpotRestApi.md#sendAgentMessageStreaming) | **POST** /api/rest/2.0/ai/agent/converse/sse | +| [**sendMessage**](ThoughtSpotRestApi.md#sendMessage) | **POST** /api/rest/2.0/ai/conversation/{conversation_identifier}/converse | +| [**setNLInstructions**](ThoughtSpotRestApi.md#setNLInstructions) | **POST** /api/rest/2.0/ai/instructions/set | +| [**shareMetadata**](ThoughtSpotRestApi.md#shareMetadata) | **POST** /api/rest/2.0/security/metadata/share | +| [**singleAnswer**](ThoughtSpotRestApi.md#singleAnswer) | **POST** /api/rest/2.0/ai/answer/create | +| [**stopConversation**](ThoughtSpotRestApi.md#stopConversation) | **POST** /api/rest/2.0/ai/agent/conversation/{conversation_identifier}/stop-response | +| [**syncMetadata**](ThoughtSpotRestApi.md#syncMetadata) | **POST** /api/rest/2.0/connections/{connection_identifier}/resync-metadata | +| [**unassignTag**](ThoughtSpotRestApi.md#unassignTag) | **POST** /api/rest/2.0/tags/unassign | +| [**unparameterizeMetadata**](ThoughtSpotRestApi.md#unparameterizeMetadata) | **POST** /api/rest/2.0/metadata/unparameterize | +| [**unpublishMetadata**](ThoughtSpotRestApi.md#unpublishMetadata) | **POST** /api/rest/2.0/security/metadata/unpublish | +| [**updateCalendar**](ThoughtSpotRestApi.md#updateCalendar) | **POST** /api/rest/2.0/calendars/{calendar_identifier}/update | +| [**updateCollection**](ThoughtSpotRestApi.md#updateCollection) | **POST** /api/rest/2.0/collections/{collection_identifier}/update | +| [**updateColumnSecurityRules**](ThoughtSpotRestApi.md#updateColumnSecurityRules) | **POST** /api/rest/2.0/security/column/rules/update | +| [**updateConfig**](ThoughtSpotRestApi.md#updateConfig) | **POST** /api/rest/2.0/vcs/git/config/update | +| [**updateConnection**](ThoughtSpotRestApi.md#updateConnection) | **POST** /api/rest/2.0/connection/update | +| [**updateConnectionConfiguration**](ThoughtSpotRestApi.md#updateConnectionConfiguration) | **POST** /api/rest/2.0/connection-configurations/{configuration_identifier}/update | +| [**updateConnectionStatus**](ThoughtSpotRestApi.md#updateConnectionStatus) | **POST** /api/rest/2.0/connections/{connection_identifier}/status | +| [**updateConnectionV2**](ThoughtSpotRestApi.md#updateConnectionV2) | **POST** /api/rest/2.0/connections/{connection_identifier}/update | +| [**updateCustomAction**](ThoughtSpotRestApi.md#updateCustomAction) | **POST** /api/rest/2.0/customization/custom-actions/{custom_action_identifier}/update | +| [**updateDbtConnection**](ThoughtSpotRestApi.md#updateDbtConnection) | **POST** /api/rest/2.0/dbt/update-dbt-connection | +| [**updateEmailCustomization**](ThoughtSpotRestApi.md#updateEmailCustomization) | **POST** /api/rest/2.0/customization/email/update | +| [**updateMetadataHeader**](ThoughtSpotRestApi.md#updateMetadataHeader) | **POST** /api/rest/2.0/metadata/headers/update | +| [**updateMetadataObjId**](ThoughtSpotRestApi.md#updateMetadataObjId) | **POST** /api/rest/2.0/metadata/update-obj-id | +| [**updateOrg**](ThoughtSpotRestApi.md#updateOrg) | **POST** /api/rest/2.0/orgs/{org_identifier}/update | +| [**updateRole**](ThoughtSpotRestApi.md#updateRole) | **POST** /api/rest/2.0/roles/{role_identifier}/update | +| [**updateSchedule**](ThoughtSpotRestApi.md#updateSchedule) | **POST** /api/rest/2.0/schedules/{schedule_identifier}/update | +| [**updateSystemConfig**](ThoughtSpotRestApi.md#updateSystemConfig) | **POST** /api/rest/2.0/system/config-update | +| [**updateTag**](ThoughtSpotRestApi.md#updateTag) | **POST** /api/rest/2.0/tags/{tag_identifier}/update | +| [**updateUser**](ThoughtSpotRestApi.md#updateUser) | **POST** /api/rest/2.0/users/{user_identifier}/update | +| [**updateUserGroup**](ThoughtSpotRestApi.md#updateUserGroup) | **POST** /api/rest/2.0/groups/{group_identifier}/update | +| [**updateVariable**](ThoughtSpotRestApi.md#updateVariable) | **POST** /api/rest/2.0/template/variables/{identifier}/update | +| [**updateVariableValues**](ThoughtSpotRestApi.md#updateVariableValues) | **POST** /api/rest/2.0/template/variables/update-values | +| [**updateWebhookConfiguration**](ThoughtSpotRestApi.md#updateWebhookConfiguration) | **POST** /api/rest/2.0/webhooks/{webhook_identifier}/update | +| [**validateCommunicationChannel**](ThoughtSpotRestApi.md#validateCommunicationChannel) | **POST** /api/rest/2.0/system/communication-channels/validate | +| [**validateEmailCustomization**](ThoughtSpotRestApi.md#validateEmailCustomization) | **POST** /api/rest/2.0/customization/email/validate | +| [**validateMerge**](ThoughtSpotRestApi.md#validateMerge) | **POST** /api/rest/2.0/vcs/git/branches/validate | +| [**validateToken**](ThoughtSpotRestApi.md#validateToken) | **POST** /api/rest/2.0/auth/token/validate | + + + +# **activateUser** +> User activateUser(activateUserRequest) + + + + Version: 9.7.0.cl or later Activates a deactivated user account. Requires `ADMINISTRATION` (**Can administer Thoughtspot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `USER_ADMINISTRATION` (**Can manage users**) privilege is required. To activate an inactive user account, the API request body must include the following information: - Username or the GUID of the user account. - Auth token generated for the deactivated user. The auth token is sent in the API response when a user is deactivated. - Password for the user account. + +### Parameters + +| Name | Type | +|------------- | ------------- | +| **activateUserRequest** | [**ActivateUserRequest**](ActivateUserRequest.md) + +### Return type + +[**User**](User.md) + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | User activated successfully. | - | +| **400** | Invalid request. | - | +| **401** | Unauthorized access. | - | +| **403** | Forbidden access. | - | +| **500** | Unexpected error | - | + + +# **assignChangeAuthor** +> assignChangeAuthor(assignChangeAuthorRequest) + + + + Version: 9.0.0.cl or later Transfers the ownership of one or several objects from one user to another. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `USER_ADMINISTRATION` (**Can manage users**) privilege and edit access to the objects are required. + +### Parameters + +| Name | Type | +|------------- | ------------- | +| **assignChangeAuthorRequest** | [**AssignChangeAuthorRequest**](AssignChangeAuthorRequest.md) + +### Return type + +null (empty response body) + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **204** | Author assignment for given metadata objects is successful. | - | +| **400** | Invalid request. | - | +| **401** | Unauthorized access. | - | +| **403** | Forbidden access. | - | +| **500** | Unexpected error | - | + + +# **assignTag** +> assignTag(assignTagRequest) + + + + Version: 9.0.0.cl or later Assigns tags to Liveboards, Answers, Tables, and Worksheets. Requires edit access to the metadata object. + +### Parameters + +| Name | Type | +|------------- | ------------- | +| **assignTagRequest** | [**AssignTagRequest**](AssignTagRequest.md) + +### Return type + +null (empty response body) + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **204** | Tags successfully assigned. | - | +| **400** | Invalid request. | - | +| **401** | Unauthorized access. | - | +| **403** | Forbidden access. | - | +| **500** | Unexpected error | - | + + +# **changeUserPassword** +> changeUserPassword(changeUserPasswordRequest) + + + + Version: 9.0.0.cl or later Updates the current password of the user. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `USER_ADMINISTRATION` (**Can manage users**) privilege is required. + +### Parameters + +| Name | Type | +|------------- | ------------- | +| **changeUserPasswordRequest** | [**ChangeUserPasswordRequest**](ChangeUserPasswordRequest.md) + +### Return type + +null (empty response body) + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **204** | User password change operation successful. | - | +| **400** | Invalid request. | - | +| **401** | Unauthorized access. | - | +| **403** | Forbidden access. | - | +| **500** | Unexpected error | - | + + +# **commitBranch** +> CommitResponse commitBranch(commitBranchRequest) + + + + Version: 9.2.0.cl or later Commits TML files of metadata objects to the Git branch configured on your instance. Requires at least edit access to objects used in the commit operation. Before using this endpoint to push your commits: * Enable Git integration on your instance. * Make sure the Git repository and branch details are configured on your instance. For more information, see [Git integration documentation](https://developers.thoughtspot.com/docs/git-integration). + +### Parameters + +| Name | Type | +|------------- | ------------- | +| **commitBranchRequest** | [**CommitBranchRequest**](CommitBranchRequest.md) + +### Return type + +[**CommitResponse**](CommitResponse.md) + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Successfully committed the metadata objects | - | +| **400** | Invalid request. | - | +| **401** | Unauthorized access. | - | +| **403** | Forbidden access. | - | +| **500** | Unexpected error | - | + + +# **configureAuthSettings** +> configureAuthSettings(configureAuthSettingsRequest) + + + + Version: 26.6.0.cl or later Enables or disables authentication at cluster or org level for the specified auth type. Currently supports `TRUSTED_AUTH`. #### Required privileges Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) or `CONTROL_TRUSTED_AUTH` (**Can Enable or Disable Trusted Authentication**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled, the `CONTROL_TRUSTED_AUTH` privilege is required. #### Usage guidelines Use `cluster_preferences` to enable or disable authentication at the cluster level. Cluster-level settings can only be configured from the Primary Org. - `ENABLED` — Generates a new access token if one does not exist. An existing token is preserved. - `DISABLED` — Revokes the existing cluster-level access token. Use `org_preferences` to enable or disable authentication for one or more Orgs. Each entry must include an `org_identifier` (unique ID or name) and an `auth_status`. Org-level configuration requires the per-Org authentication feature to be enabled on your instance. - `ENABLED` — Generates a new org-level access token if one does not exist. - `DISABLED` — Revokes the existing org-level access token for that Org. Both `cluster_preferences` and `org_preferences` are optional. Omitting a field leaves the corresponding settings unchanged. If both are omitted, the API returns `204 No Content` without making any changes. **Note**: Cluster-level and org-level settings are independent of each other. Enabling or disabling one does not affect the other. + +### Parameters + +| Name | Type | +|------------- | ------------- | +| **configureAuthSettingsRequest** | [**ConfigureAuthSettingsRequest**](ConfigureAuthSettingsRequest.md) + +### Return type + +null (empty response body) + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **204** | Trusted authentication settings configured successfully. | - | +| **400** | Invalid request. | - | +| **401** | Unauthorized access. | - | +| **403** | Forbidden access. | - | +| **500** | Unexpected error | - | + + +# **configureCommunicationChannelPreferences** +> configureCommunicationChannelPreferences(configureCommunicationChannelPreferencesRequest) + + + + Version: 10.14.0.cl or later Configure communication channel preferences. - Use `cluster_preferences` to update the default preferences for your ThoughtSpot application instance. - If your instance has [Orgs](https://docs.thoughtspot.com/cloud/latest/orgs-overview), use `org_preferences` to specify Org-specific preferences that override the defaults. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) or `DEVELOPER` (**Has developer privilege**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, users with `APPLICATION_ADMINISTRATION` (**Can manage application settings**) privilege are also authorized to perform this action. + +### Parameters + +| Name | Type | +|------------- | ------------- | +| **configureCommunicationChannelPreferencesRequest** | [**ConfigureCommunicationChannelPreferencesRequest**](ConfigureCommunicationChannelPreferencesRequest.md) + +### Return type + +null (empty response body) + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **204** | Communication channel preferences successfully updated. | - | +| **400** | Invalid request. | - | +| **401** | Unauthorized access. | - | +| **403** | Forbidden access. | - | +| **500** | Unexpected error | - | + + +# **configureSecuritySettings** +> configureSecuritySettings(configureSecuritySettingsRequest) + + + + Version: 26.2.0.cl or later Configure security settings for your ThoughtSpot application instance. - Use `cluster_preferences` to update cluster-level security settings including CORS whitelisted URLs, CSP settings, SAML redirect URLs, partitioned cookies, and non-embed access configuration. - Use `org_preferences` to configure Org-specific security settings. If your instance has [Orgs](https://docs.thoughtspot.com/cloud/latest/orgs-overview), this allows configuring CORS and non-embed access settings specific to the Org. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) or `DEVELOPER` (**Has developer privilege**) privilege. Cluster-level SAML and script-src settings require `ADMINISTRATION` privilege. See [Security Settings](https://developers.thoughtspot.com/docs/security-settings) for more details. + +### Parameters + +| Name | Type | +|------------- | ------------- | +| **configureSecuritySettingsRequest** | [**ConfigureSecuritySettingsRequest**](ConfigureSecuritySettingsRequest.md) + +### Return type + +null (empty response body) + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **204** | Successfully configured the security settings. | - | +| **400** | Invalid request. | - | +| **401** | Unauthorized access. | - | +| **403** | Forbidden access. | - | +| **500** | Unexpected error | - | + + +# **connectionConfigurationSearch** +> List<ConnectionConfigurationResponse> connectionConfigurationSearch(connectionConfigurationSearchRequest) + + + + Version: 10.12.0.cl or later Gets connection configuration objects. Requires `DATAMANAGEMENT` (**Can manage data**) and edit permissions to the connection object, or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) privilege is required. #### Usage guidelines * To get a list of all configurations available in the ThoughtSpot system, send the API request with only the connection name or GUID in the request body. * To fetch details of a configuration object, specify the configuration object name or GUID. + +### Parameters + +| Name | Type | +|------------- | ------------- | +| **connectionConfigurationSearchRequest** | [**ConnectionConfigurationSearchRequest**](ConnectionConfigurationSearchRequest.md) + +### Return type + +[**List<ConnectionConfigurationResponse>**](ConnectionConfigurationResponse.md) + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Configuration fetched successfully. | - | +| **400** | Invalid request. | - | +| **401** | Unauthorized access. | - | +| **403** | Forbidden access. | - | +| **500** | Unexpected error | - | + + +# **convertWorksheetToModel** +> ResponseWorksheetToModelConversion convertWorksheetToModel(convertWorksheetToModelRequest) + + + + Convert worksheets to models Version: 10.6.0.cl or later ## Prerequisites - **Privileges Required:** - `DATAMANAGEMENT` (Can manage data) or `ADMINISTRATION` (Can administer ThoughtSpot). - **Additional Privileges (if RBAC is enabled):** - `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` (Can manage data models). --- ## Usage Guidelines ### Parameters 1. **worksheet_ids** - **Description:** A comma-separated list of GUIDs (Globally Unique Identifiers) specifying the Worksheets to be converted. - **Usage:** - Used only when `convert_all` is set to `false`. - Leave empty or omit when `convert_all` is set to `true`. 2. **exclude_worksheet_ids** - **Description:** A comma-separated list of GUIDs specifying Worksheets to be excluded from conversion. - **Usage:** - Useful when `convert_all` is set to `true` and specific Worksheets should not be converted. 3. **convert_all** - **Description:** Sets the scope of conversion. - **Options:** - `true`: Converts all Worksheets in the system, except those specified in `exclude_worksheet_ids`. - `false`: Converts only the Worksheets listed in `worksheet_ids`. 4. **apply_changes** - **Description:** Specifies whether to apply changes directly to ThoughtSpot or to generate a preview before applying any changes.Used for validation of conversion. - **Options:** - `true`: Applies conversion changes directly to ThoughtSpot. - `false`: Generates only a preview of the changes and does not apply any changes to ThoughtSpot --- ## Best Practices 1. **Backup Before Conversion:** Always export metadata as a backup before initiating the conversion process 2. **Partial Conversion for Testing:** Test the conversion process by setting `convert_all` to `false` and specifying a small number of `worksheet_ids`. 3. **Verify Dependencies:** Check for dependent objects, such as Tables and Connections, to avoid invalid references. 4. **Review Changes:** Use `apply_changes: false` to preview the impact of the conversion before applying changes. --- ## Examples ### Convert Specific Worksheets ```json { \"worksheet_ids\": [\"guid1\", \"guid2\", \"guid3\"], \"exclude_worksheet_ids\": [], \"convert_all\": false, \"apply_changes\": true } ``` ### Convert All Accessible Worksheets ```json { \"worksheet_ids\": [], \"exclude_worksheet_ids\": [], \"convert_all\": true, \"apply_changes\": true } ``` ### Exclude Specific Worksheets While Converting All Accessible Worksheets ```json { \"worksheet_ids\": [], \"exclude_worksheet_ids\": [\"abc\"], \"convert_all\": true, \"apply_changes\": true } ``` + +### Parameters + +| Name | Type | +|------------- | ------------- | +| **convertWorksheetToModelRequest** | [**ConvertWorksheetToModelRequest**](ConvertWorksheetToModelRequest.md) + +### Return type + +[**ResponseWorksheetToModelConversion**](ResponseWorksheetToModelConversion.md) + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Conversion of worksheets to model done successfully. | - | +| **400** | Invalid request. | - | +| **401** | Unauthorized access. | - | +| **403** | Forbidden access. | - | +| **500** | Unexpected error | - | + + +# **copyObject** +> ResponseCopyObject copyObject(copyObjectRequest) + + + + Makes a copy of an Answer or Liveboard Version: 10.3.0.cl or later Creates a copy of a metadata object. Requires at least view access to the metadata object being copied. Upon successful execution, the API creates a copy of the metadata object specified in the API request and returns the ID of the new object. + +### Parameters + +| Name | Type | +|------------- | ------------- | +| **copyObjectRequest** | [**CopyObjectRequest**](CopyObjectRequest.md) + +### Return type + +[**ResponseCopyObject**](ResponseCopyObject.md) + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Successfully created a copy of the object | - | +| **400** | Invalid request. | - | +| **401** | Unauthorized access. | - | +| **403** | Forbidden access. | - | +| **404** | Object not found | - | +| **500** | Unexpected error | - | + + +# **createAgentConversation** +> AgentConversation createAgentConversation(createAgentConversationRequest) + + + + Version: 26.2.0.cl or later Creates a new Spotter agent conversation based on the provided context and settings. The endpoint was in Beta from 26.2.0.cl through 26.4.0.cl. Requires `CAN_USE_SPOTTER` privilege and at least view access to the metadata object specified in the request. #### Usage guidelines The request must include the `metadata_context` parameter to define the conversation context. The context type can be one of: - `DATA_SOURCE` *(available from 26.5.0.cl)*: targets a specific data source. Provide `data_source_identifier` in `data_source_context` for a single data source, or `data_source_identifiers` for multi-data-source context. The deprecated `guid` field is accepted for backwards compatibility. - `AUTO_MODE` *(available from 26.5.0.cl)*: automatically discovers and selects the most relevant datasets for the user's queries. > **Note for callers on versions 26.2.0.cl – 26.4.0.cl (Beta):** use the lowercase `data_source` enum value with the `guid` field instead of the above. Example: `{ \"type\": \"data_source\", \"data_source_context\": { \"guid\": \"<worksheet-id>\" } }`. The `conversation_settings` parameter controls which Spotter capabilities are enabled for the conversation: - `enable_contextual_change_analysis` (default: `true`, **deprecated from 26.2.0.cl**) — always enabled in Spotter 3; setting this to `false` has no effect on versions >= 26.2.0.cl - `enable_natural_language_answer_generation` (default: `true`, **deprecated from 26.2.0.cl**) — always enabled in Spotter 3; setting this to `false` has no effect on versions >= 26.2.0.cl - `enable_reasoning` (default: `true`, **deprecated from 26.2.0.cl**) — always enabled in Spotter 3; setting this to `false` has no effect on versions >= 26.2.0.cl - `enable_save_chat` (default: `false`, *available from 26.5.0.cl*) — enables saving the conversation for later retrieval via conversation history If the request is successful, the response includes a unique `conversation_identifier` that must be passed to `sendAgentConversationMessage` or `sendAgentConversationMessageStreaming` to send messages within this conversation. The response also includes `conversation_id` with the same value for backwards compatibility; use `conversation_identifier` for new integrations. #### Example request ```json { \"metadata_context\": { \"type\": \"DATA_SOURCE\", \"data_source_context\": { \"data_source_identifier\": \"a1b2c3d4-e5f6-7890-abcd-ef1234567890\" } }, \"conversation_settings\": {} } ``` #### Error responses | Code | Description | | ---- | --------------------------------------------------------------------------------------------------------------------------------------- | | 401 | Unauthorized — authentication token is missing, expired, or invalid. | | 403 | Forbidden — the authenticated user does not have `CAN_USE_SPOTTER` privilege or lacks view permission on the specified metadata object. | > ###### Note: > > - This endpoint was in Beta from 26.2.0.cl through 26.4.0.cl and is Generally Available from version 26.5.0.cl. > - This endpoint requires Spotter - please contact ThoughtSpot support to enable Spotter on your cluster. + +### Parameters + +| Name | Type | +|------------- | ------------- | +| **createAgentConversationRequest** | [**CreateAgentConversationRequest**](CreateAgentConversationRequest.md) + +### Return type + +[**AgentConversation**](AgentConversation.md) + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Common successful response | - | +| **201** | Common error response | - | +| **400** | Operation failed | - | +| **401** | Unauthorized access. | - | +| **403** | Forbidden access. | - | +| **500** | Operation failed | - | + + +# **createCalendar** +> CalendarResponse createCalendar(createCalendarRequest) + + + + Version: 10.12.0.cl or later Creates a new [custom calendar](https://docs.thoughtspot.com/cloud/latest/connections-cust-cal). Requires `DATAMANAGEMENT` (**Can manage data**) or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your ThoughtSpot instance, the `CAN_MANAGE_CUSTOM_CALENDAR` (**Can manage custom calendars**) privilege is required. #### Usage guidelines You can create a custom calendar from scratch or an existing Table in ThoughtSpot. For both methods of calendar creation, the following parameters are required: * Name of the custom calendar. * Calendar creation method. To create a calendar from an existing table, specify the method: - `FROM_EXISTING_TABLE` - Creates calendar from the table reference provided in the API request. - `FROM_INPUT_PARAMS` - Creates a calendar from the parameters defined in the API request. * Connection ID and Table name * Database and schema name attributes: For most Cloud Data Warehouse (CDW) connectors, both `database_name` and `schema_name` attributes are required. However, the attribute requirements are conditional and vary based on the connector type and its metadata structure. For example, for connectors such as Teradata, MySQL, SingleSore, Amazon Aurora MySQL, Amazon RDS MySQL, Oracle, and GCP_MYSQL, the `schema_name` is required, whereas the `database_name` attribute is not. Similarly, connectors such as ClickHouse require you to specify the `database_name` and the schema specification in such cases is optional. **NOTE**: If you are creating a calendar from an existing table, ensure that the referenced table matches the required DDL for custom calendars. If the schema does not match, the API returns an error. ##### Calendar type The API allows you to create the following types of calendars: * `MONTH_OFFSET`. The default calendar type. A `MONTH_OFFSET` calendar is offset by a few months from the standard calendar months (January to December) and the year begins with the month defined in the request. For example, if the `month_offset` value is set as `April`, the calendar year begins in April. * `4-4-5`. Each quarter in the calendar will include two 4-week months followed by one 5-week month. * `4-5-4`. Each quarter in the calendar will include two 4-week months with a 5-week month between. * `5-4-4`. Each quarter begins with a 5-week month, followed by two 4-week months. To start and end the calendar on a specific date, specify the dates in the `MM/DD/YYYY` format. For `MONTH_OFFSET` calendars, ensure that the `start_date` matches the month specified in the `month_offset` attribute. You can also set the starting day of the week and customize the prefixes for year and quarter labels. #### Examples To create a calendar from an existing table: ``` { \"name\": \"MyCustomCalendar1\", \"table_reference\": { \"connection_identifier\": \"4db8ea22-2ff4-4224-b05a-26674717e468\", \"table_name\": \"MyCalendarTable\", \"database_name\": \"RETAILAPPAREL\", \"schema_name\": \"PUBLIC\" }, \"creation_method\": \"FROM_EXISTING_TABLE\", } ``` To create a calendar from scratch: ``` { \"name\": \"MyCustomCalendar1\", \"table_reference\": { \"connection_identifier\": \"4db8ea22-2ff4-4224-b05a-26674717e468\", \"table_name\": \"MyCalendarTable\", \"database_name\": \"RETAILAPPAREL\", \"schema_name\": \"PUBLIC\" }, \"creation_method\": \"FROM_INPUT_PARAMS\", \"calendar_type\": \"MONTH_OFFSET\", \"month_offset\": \"April\", \"start_day_of_week\": \"Monday\", \"quarter_name_prefix\": \"Q\", \"year_name_prefix\": \"FY\", \"start_date\": \"04/01/2025\", \"end_date\": \"04/31/2025\" } ``` + +### Parameters + +| Name | Type | +|------------- | ------------- | +| **createCalendarRequest** | [**CreateCalendarRequest**](CreateCalendarRequest.md) + +### Return type + +[**CalendarResponse**](CalendarResponse.md) + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Custom calendar created successfully. | - | +| **400** | Invalid request. | - | +| **401** | Unauthorized access. | - | +| **403** | Forbidden access. | - | +| **500** | Unexpected error | - | + + +# **createCollection** +> Collection createCollection(createCollectionRequest) + + + + Version: 26.4.0.cl or later Creates a new collection in ThoughtSpot. Collections allow you to organize and group related metadata objects such as Liveboards, Answers, worksheets, and other data objects. You can also create nested collections (sub-collections) to build a hierarchical structure. #### Supported operations The API endpoint lets you perform the following operations: * Create a new collection * Add metadata objects (Liveboards, Answers, Logical Tables) to the collection * Create nested collections by adding sub-collections + +### Parameters + +| Name | Type | +|------------- | ------------- | +| **createCollectionRequest** | [**CreateCollectionRequest**](CreateCollectionRequest.md) + +### Return type + +[**Collection**](Collection.md) + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Collection created successfully | - | +| **400** | Invalid request. | - | +| **401** | Unauthorized access. | - | +| **403** | Forbidden access. | - | +| **500** | Unexpected error | - | + + +# **createConfig** +> RepoConfigObject createConfig(createConfigRequest) + + + + Version: 9.2.0.cl or later Allows you to connect a ThoughtSpot instance to a Git repository. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance on your instance, the `CAN_SETUP_VERSION_CONTROL` (**Can set up version control**) privilege. You can use this API endpoint to connect your ThoughtSpot development and production environments to the development and production branches of a Git repository. Before using this endpoint to connect your ThoughtSpot instance to a Git repository, check the following prerequisites: * You have a Git repository. If you are using GitHub, make sure you have a valid account and an access token to connect ThoughtSpot to GitHub. For information about generating a token, see [GitHub Documentation](https://docs.github.com/en/authentication/keeping-your-account-and-data-secure/managing-your-personal-access-tokens). * Your access token has `repo` scope that grants full access to public and private repositories. * Your Git repository has a branch that can be configured as a default branch in ThoughtSpot. For more information, see [Git integration documentation](https://developers.thoughtspot.com/docs/?pageid=git-integration). **Note**: ThoughtSpot supports only GitHub / itHub Enterprise for CI/CD. + +### Parameters + +| Name | Type | +|------------- | ------------- | +| **createConfigRequest** | [**CreateConfigRequest**](CreateConfigRequest.md) + +### Return type + +[**RepoConfigObject**](RepoConfigObject.md) + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Successfully configured local repository | - | +| **400** | Invalid request. | - | +| **401** | Unauthorized access. | - | +| **403** | Forbidden access. | - | +| **500** | Unexpected error | - | + + +# **createConnection** +> CreateConnectionResponse createConnection(createConnectionRequest) + + + + Version: 9.2.0.cl or later Creates a connection to a data warehouse for live query services. Requires `DATAMANAGEMENT` (**Can manage data**) or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) privilege is required. #### Create a connection without tables To create a connection without tables: 1. Pass these parameters in your API request. * Name of the connection. * Type of the data warehouse to connect to. * A JSON map of configuration attributes in `data_warehouse_config`. The following example shows the configuration attributes for a SnowFlake connection: ``` { \"configuration\":{ \"accountName\":\"thoughtspot_partner\", \"user\":\"tsadmin\", \"password\":\"TestConn123\", \"role\":\"sysadmin\", \"warehouse\":\"MEDIUM_WH\" }, \"authenticationType\": \"SERVICE_ACCOUNT\", \"externalDatabases\":[ ] } ``` 2. Set `validate` to `false`. **NOTE:** If the `authentication_type` is anything other than SERVICE_ACCOUNT, you must explicitly provide the authenticationType property in the payload. If you do not specify authenticationType, the API will default to SERVICE_ACCOUNT as the authentication type. #### Create a connection with tables If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) and `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` (**Can manage data models**) privilege is required. To create a connection with tables: 1. Pass these parameters in your API request. * Name of the connection. * Type of the data warehouse to connect to. * A JSON map of configuration attributes, database details, and table properties in `data_warehouse_config` as shown in the following example: ``` { \"configuration\":{ \"accountName\":\"thoughtspot_partner\", \"user\":\"tsadmin\", \"password\":\"TestConn123\", \"role\":\"sysadmin\", \"warehouse\":\"MEDIUM_WH\" }, \"authenticationType\": \"SERVICE_ACCOUNT\", \"externalDatabases\":[ { \"name\":\"AllDatatypes\", \"isAutoCreated\":false, \"schemas\":[ { \"name\":\"alldatatypes\", \"tables\":[ { \"name\":\"allDatatypes\", \"type\":\"TABLE\", \"description\":\"\", \"selected\":true, \"linked\":true, \"columns\":[ { \"name\":\"CNUMBER\", \"type\":\"INT64\", \"canImport\":true, \"selected\":true, \"isLinkedActive\":true, \"isImported\":false, \"tableName\":\"allDatatypes\", \"schemaName\":\"alldatatypes\", \"dbName\":\"AllDatatypes\" }, { \"name\":\"CDECIMAL\", \"type\":\"INT64\", \"canImport\":true, \"selected\":true, \"isLinkedActive\":true, \"isImported\":false, \"tableName\":\"allDatatypes\", \"schemaName\":\"alldatatypes\", \"dbName\":\"AllDatatypes\" } ] } ] } ] } ] } ``` 2. Set `validate` to `true`. **NOTE:** If the `authentication_type` is anything other than SERVICE_ACCOUNT, you must explicitly provide the authenticationType property in the payload. If you do not specify authenticationType, the API will default to SERVICE_ACCOUNT as the authentication type. + +### Parameters + +| Name | Type | +|------------- | ------------- | +| **createConnectionRequest** | [**CreateConnectionRequest**](CreateConnectionRequest.md) + +### Return type + +[**CreateConnectionResponse**](CreateConnectionResponse.md) + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Connection to the datasource successfully created. | - | +| **400** | Invalid request. | - | +| **401** | Unauthorized access. | - | +| **403** | Forbidden access. | - | +| **500** | Unexpected error | - | + + +# **createConnectionConfiguration** +> ConnectionConfigurationResponse createConnectionConfiguration(createConnectionConfigurationRequest) + + + + Version: 10.12.0.cl or later Creates an additional configuration to an existing connection to a data warehouse. Requires `DATAMANAGEMENT` (**Can manage data**) or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) privilege is required. #### Usage guidelines * A JSON map of configuration attributes in `configuration`. The following example shows the configuration attributes: ``` { \"user\":\"DEV_USER\", \"password\":\"TestConn123\", \"role\":\"DEV\", \"warehouse\":\"DEV_WH\" } ``` * If the `policy_type` is `PRINCIPALS`, then `policy_principals` is a required field. * If the `policy_type` is `PROCESSES`, then `policy_processes` is a required field. * If the `policy_type` is `NO_POLICY`, then `policy_principals` and `policy_processes` are not required fields. #### Parameterized Connection Support For parameterized connections that use OAuth authentication, only the same_as_parent and policy_process_options attributes are allowed in the API request. These attributes are not applicable to connections that are not parameterized. + +### Parameters + +| Name | Type | +|------------- | ------------- | +| **createConnectionConfigurationRequest** | [**CreateConnectionConfigurationRequest**](CreateConnectionConfigurationRequest.md) + +### Return type + +[**ConnectionConfigurationResponse**](ConnectionConfigurationResponse.md) + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Connection configuration successfully created. | - | +| **400** | Invalid request. | - | +| **401** | Unauthorized access. | - | +| **403** | Forbidden access. | - | +| **500** | Unexpected error | - | + + +# **createConversation** +> Conversation createConversation(createConversationRequest) + + + + Version: 10.4.0.cl or later Creates a new conversation session tied to a specific data model for AI-driven natural language querying. Requires `CAN_USE_SPOTTER` privilege and at least view access to the metadata object specified in the request. #### Usage guidelines The request must include: - `metadata_identifier`: the unique ID of the data source that provides context for the conversation Optionally, you can provide: - `tokens`: a token string to set initial context for the conversation (e.g., `\"[sales],[item type],[state]\"`) If the request is successful, ThoughtSpot returns a unique `conversation_identifier` that must be passed to `sendMessage` to continue the conversation. #### Error responses | Code | Description | |------|-------------| | 401 | Unauthorized — authentication token is missing, expired, or invalid. | | 403 | Forbidden — the authenticated user does not have `CAN_USE_SPOTTER` privilege or lacks view permission on the specified metadata object. | > ###### Note: > * This endpoint is currently in Beta. Breaking changes may be introduced before the endpoint is made Generally Available. > * This endpoint requires Spotter - please contact ThoughtSpot support to enable Spotter on your cluster. + +### Parameters + +| Name | Type | +|------------- | ------------- | +| **createConversationRequest** | [**CreateConversationRequest**](CreateConversationRequest.md) + +### Return type + +[**Conversation**](Conversation.md) + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Common successful response | - | +| **201** | Common error response | - | +| **400** | Operation failed | - | +| **401** | Unauthorized access. | - | +| **403** | Forbidden access. | - | +| **500** | Operation failed | - | + + +# **createCustomAction** +> ResponseCustomAction createCustomAction(createCustomActionRequest) + + + + Version: 9.6.0.cl or later Creates a custom action that appears as a menu action on a saved Answer or Liveboard visualization. Requires `DEVELOPER` (**Has Developer privilege**) or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `DEVELOPER` (**Has developer privilege**) privilege is required. #### Usage Guidelines The API lets you create the following types of custom actions: * URL-based action Allows pushing data to an external URL. * Callback action Triggers a callback to the host application and initiates a response payload on an embedded ThoughtSpot instance. By default, custom actions are visible to only administrator or developer users. To make a custom action available to other users, and specify the groups in `group_identifiers`. By default, the custom action is set as a _global_ action on all visualizations and saved Answers. To assign a custom action to specific Liveboard visualization, saved Answer, or Worksheet, set `visibility` to `false` in `default_action_config` property and specify the GUID or name of the object in `associate_metadata`. For more information, see [Custom actions](https://developers.thoughtspot.com/docs/custom-action-intro). + +### Parameters + +| Name | Type | +|------------- | ------------- | +| **createCustomActionRequest** | [**CreateCustomActionRequest**](CreateCustomActionRequest.md) + +### Return type + +[**ResponseCustomAction**](ResponseCustomAction.md) + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Custom action created successfully. | - | +| **400** | Invalid request. | - | +| **401** | Unauthorized access. | - | +| **403** | Forbidden access. | - | +| **500** | Unexpected error | - | + + +# **createEmailCustomization** +> CreateEmailCustomizationResponse createEmailCustomization(createEmailCustomizationRequest) + + + + Version: 10.10.0.cl or later Creates a customization configuration for the notification email. #### Pre-requisites Requires `DEVELOPER` (**has developer privilege**) or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `DEVELOPER` (**Has developer privilege**) privilege is required. **NOTE**:This endpoint in currently in beta. Contact ThoughtSpot support to enable this on your instance. #### Usage guidelines To create a custom configuration pass these parameters in your API request: - A JSON map of configuration attributes `template_properties`. The following example shows a sample set of customization configuration: ``` { { \"cta_button_bg_color\": \"#444DEA\", \"cta_text_font_color\": \"#FFFFFF\", \"primary_bg_color\": \"#D3DEF0\", \"logo_url\": \"https://storage.pardot.com/710713/1642089901EbkRibJq/TS_fullworkmark_darkmode.png\", \"font_family\": \"\", \"product_name\": \"ThoughtSpot\", \"footer_address\": \"444 Castro St, Suite 1000 Mountain View, CA 94041\", \"footer_phone\": \"(800) 508-7008\", \"replacement_value_for_liveboard\": \"Dashboard\", \"replacement_value_for_answer\": \"Chart\", \"replacement_value_for_spot_iq\": \"AI Insights\", \"hide_footer_phone\": false, \"hide_footer_address\": false, \"hide_product_name\": false, \"hide_manage_notification\": false, \"hide_mobile_app_nudge\": false, \"hide_privacy_policy\": false, \"hide_ts_vocabulary_definitions\": false, \"hide_error_message\": false, \"hide_unsubscribe_link\": false, \"hide_notification_status\": false, \"hide_modify_alert\": false, \"company_website_url\": \"https://your-website.com/\", \"company_privacy_policy_url\" : \"https://link-to-privacy-policy.com/\", \"contact_support_url\": \"https://link-to-contact-support.com/\", \"hide_contact_support_url\": false, \"hide_logo_url\" : false } } ``` + +### Parameters + +| Name | Type | +|------------- | ------------- | +| **createEmailCustomizationRequest** | [**CreateEmailCustomizationRequest**](CreateEmailCustomizationRequest.md) + +### Return type + +[**CreateEmailCustomizationResponse**](CreateEmailCustomizationResponse.md) + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | OK | - | +| **400** | Invalid request. | - | +| **403** | Unauthorized access. | - | +| **500** | Unexpected error | - | + + +# **createOrg** +> OrgResponse createOrg(createOrgRequest) + + + + Version: 9.0.0.cl or later Creates an Org object. To use this API, the [Orgs](https://docs.thoughtspot.com/cloud/latest/orgs-overview) feature must be enabled in your cluster. Requires cluster administration (**Can administer Org**) privileges. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `ORG_ADMINISTRATION` (**Can manage Orgs**) privilege is required. + +### Parameters + +| Name | Type | +|------------- | ------------- | +| **createOrgRequest** | [**CreateOrgRequest**](CreateOrgRequest.md) + +### Return type + +[**OrgResponse**](OrgResponse.md) + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Organization successfully created. | - | +| **400** | Invalid request. | - | +| **401** | Unauthorized access. | - | +| **403** | Forbidden access. | - | +| **500** | Unexpected error | - | + + +# **createRole** +> RoleResponse createRole(createRoleRequest) + + + + Version: 9.5.0.cl or later Creates a Role object in ThoughtSpot. Available only if [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance. To create a Role, the `ROLE_ADMINISTRATION` (**Can manage roles**) privilege is required. + +### Parameters + +| Name | Type | +|------------- | ------------- | +| **createRoleRequest** | [**CreateRoleRequest**](CreateRoleRequest.md) + +### Return type + +[**RoleResponse**](RoleResponse.md) + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Role successfully created. | - | +| **400** | Invalid parameters. | - | +| **401** | Unauthorized access. | - | +| **403** | Forbidden access. | - | +| **500** | Internal error | - | + + +# **createSchedule** +> ResponseSchedule createSchedule(createScheduleRequest) + + + + Create schedule. Version: 9.4.0.cl or later Creates a Liveboard schedule job. Requires at least edit access to Liveboards. To create a schedule on behalf of another user, you need `ADMINISTRATION` (**Can administer Org**) or `JOBSCHEDULING` (**Can schedule for others**) privilege and edit access to the Liveboard. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `JOBSCHEDULING` (**Can schedule for others**) privilege is required. #### Usage guidelines * The description text is mandatory. The description text appears as **Description: <your content>** in the Liveboard schedule email notifications. * For Liveboards with both charts and tables, schedule creation is only supported in PDF and XLS formats. Schedules created in CSV formats for such Liveboards will fail to run. If `PDF` is set as the `file_format`, enable `pdf_options` to get the correct attachment. Not doing so may cause the attachment to be rendered empty. * To include only specific visualizations, specify the visualization GUIDs in the `visualization_identifiers` array. * You can schedule a Liveboard job to run periodically by setting frequency parameters. You can set the schedule to run daily, weekly, monthly or every n minutes or hours. The scheduled job can also be configured to run at a specific time of the day or on specific days of the week or month. Please ensure that when setting the schedule frequency for _minute of the object_, only values that are multiples of 5 are included. * If the `frequency` parameters are defined, you can set the time zone to a value that matches your server's time zone. For example, `US/Central`, `Etc/UTC`, `CET`. The default time zone is `America/Los_Angeles`. For more information about Liveboard jobs, see [ThoughtSpot Product Documentation](https://docs.thoughtspot.com/cloud/latest/liveboard-schedule). + +### Parameters + +| Name | Type | +|------------- | ------------- | +| **createScheduleRequest** | [**CreateScheduleRequest**](CreateScheduleRequest.md) + +### Return type + +[**ResponseSchedule**](ResponseSchedule.md) + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Schedule successfully created. | - | +| **400** | Invalid request. | - | +| **401** | Unauthorized access. | - | +| **403** | Forbidden access. | - | +| **500** | Unexpected error | - | + + +# **createTag** +> Tag createTag(createTagRequest) + + + + Version: 9.0.0.cl or later Creates a tag object. Tags are labels that identify a metadata object. For example, you can create a tag to designate subject areas, such as sales, HR, marketing, and finance. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `TAGMANAGEMENT` (**Can manage tags**) privilege is required to create, edit, and delete tags. + +### Parameters + +| Name | Type | +|------------- | ------------- | +| **createTagRequest** | [**CreateTagRequest**](CreateTagRequest.md) + +### Return type + +[**Tag**](Tag.md) + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Tag successfully created. | - | +| **400** | Invalid request. | - | +| **401** | Unauthorized access. | - | +| **403** | Forbidden access. | - | +| **500** | Unexpected error | - | + + +# **createUser** +> User createUser(createUserRequest) + + + + Version: 9.0.0.cl or later Creates a user in ThoughtSpot. The API endpoint allows you to configure several user properties such as email address, account status, share notification preferences, and sharing visibility. You can provision the user to [groups](https://docs.thoughtspot.com/cloud/latest/groups-privileges) and [Orgs](https://docs.thoughtspot.com/cloud/latest/orgs-overview). You can also add Liveboard, Answer, and Worksheet objects to the user’s favorites list, assign a default Liveboard for the user, and set user preferences. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `USER_ADMINISTRATION` (**Can manage users**) privilege is required. + +### Parameters + +| Name | Type | +|------------- | ------------- | +| **createUserRequest** | [**CreateUserRequest**](CreateUserRequest.md) + +### Return type + +[**User**](User.md) + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | User successfully created. | - | +| **400** | Invalid request. | - | +| **401** | Unauthorized access. | - | +| **403** | Forbidden access. | - | +| **500** | Unexpected error | - | + + +# **createUserGroup** +> UserGroupResponse createUserGroup(createUserGroupRequest) + + + + Version: 9.0.0.cl or later Creates a group object in ThoughtSpot. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `GROUP_ADMINISTRATION` (**Can manage groups**) privilege is required. #### About groups Groups in ThoughtSpot are used by the administrators to define privileges and organize users based on their roles and access requirements. To know more about groups and privileges, see [ThoughtSpot Product Documentation](https://docs.thoughtspot.com/cloud/latest/groups-privileges). #### Supported operations The API endpoint lets you perform the following operations: * Assign privileges * Add users * Define sharing visibility * Add sub-groups * Assign a default Liveboard + +### Parameters + +| Name | Type | +|------------- | ------------- | +| **createUserGroupRequest** | [**CreateUserGroupRequest**](CreateUserGroupRequest.md) + +### Return type + +[**UserGroupResponse**](UserGroupResponse.md) + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | User group successfully created. | - | +| **400** | Invalid request. | - | +| **401** | Unauthorized access. | - | +| **403** | Forbidden access. | - | +| **500** | Unexpected error | - | + + +# **createVariable** +> Variable createVariable(createVariableRequest) + + + + Create a variable which can be used for parameterizing metadata objects Version: 26.4.0.cl or later Allows creating a variable which can be used for parameterizing metadata objects in ThoughtSpot. Requires ADMINISTRATION role and TENANT scope. The CAN_MANAGE_VARIABLES permission allows you to manage Formula Variables in the current organization scope. The API endpoint supports the following types of variables: * CONNECTION_PROPERTY - For connection properties * TABLE_MAPPING - For table mappings * CONNECTION_PROPERTY_PER_PRINCIPAL - For connection properties per principal. In order to use this please contact support to enable this. * FORMULA_VARIABLE - For Formula variables, introduced in 10.15.0.cl When creating a variable, you need to specify: * The variable type * A unique name for the variable * Whether the variable contains sensitive values (defaults to false) * The data type of the variable, only specify for formula variables (defaults to null) The operation will fail if: * The user lacks required permissions * The variable name already exists * The variable type is invalid + +### Parameters + +| Name | Type | +|------------- | ------------- | +| **createVariableRequest** | [**CreateVariableRequest**](CreateVariableRequest.md) + +### Return type + +[**Variable**](Variable.md) + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Create variable is successful. | - | +| **400** | Invalid request. | - | +| **401** | Unauthorized access. | - | +| **403** | Forbidden access. | - | +| **500** | Unexpected error | - | + + +# **createWebhookConfiguration** +> WebhookResponse createWebhookConfiguration(createWebhookConfigurationRequest) + + + + Version: 10.14.0.cl or later Creates a new webhook configuration to receive notifications for specified events. The webhook will be triggered when the configured events occur in the system. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) or `DEVELOPER` (**Has developer privilege**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, users with `CAN_MANAGE_WEBHOOKS` (**Can manage webhooks**) privilege are also authorized to perform this action. + +### Parameters + +| Name | Type | +|------------- | ------------- | +| **createWebhookConfigurationRequest** | [**CreateWebhookConfigurationRequest**](CreateWebhookConfigurationRequest.md) + +### Return type + +[**WebhookResponse**](WebhookResponse.md) + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Webhook configuration created successfully | - | +| **400** | Invalid request. | - | +| **401** | Unauthorized access. | - | +| **403** | Forbidden access. | - | +| **500** | Unexpected error | - | + + +# **dbtConnection** +> Object dbtConnection(connectionName, databaseName, importType, accessToken, dbtUrl, accountId, projectId, dbtEnvId, projectName, fileContent) + + + + Version: 9.9.0.cl or later Creates a DBT connection object in ThoughtSpot. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege or `DATAMANAGEMENT` (**Can manage data**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the following Data control privileges may be required: - `CAN_MANAGE_CUSTOM_CALENDAR`(**Can manage custom calendars**) - `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) - `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` (**Can manage data models**) #### About create DBT connection DBT connection in ThoughtSpot is used by the user to define DBT credentials for cloud . The API needs embrace connection, embrace database name, DBT url, import type, DBT account identifier, DBT project identifier, DBT access token and environment details (or) embrace connection, embrace database name, import type, file_content to create a connection object. To know more about DBT, see ThoughtSpot Product Documentation. + +### Parameters + +| Name | Type | +|------------- | ------------- | +| **connectionName** | **String** +| **databaseName** | **String** +| **importType** | **String** +| **accessToken** | **String** +| **dbtUrl** | **String** +| **accountId** | **String** +| **projectId** | **String** +| **dbtEnvId** | **String** +| **projectName** | **String** +| **fileContent** | **File** + +### Return type + +**Object** + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + + - **Content-Type**: multipart/form-data + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Succesfully created DBT Connection. | - | +| **400** | Invalid request. | - | +| **401** | Unauthorized access. | - | +| **403** | Forbidden access. | - | +| **500** | Unexpected error | - | + + +# **dbtGenerateSyncTml** +> Object dbtGenerateSyncTml(dbtConnectionIdentifier, fileContent) + + + + Version: 9.9.0.cl or later Resynchronize the existing list of models, tables, worksheet tml’s and import them to Thoughtspot based on the DBT connection object. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege or `DATAMANAGEMENT` (**Can manage data**) privilege, along with an existing DBT connection. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the following data control privileges may be required: - `CAN_MANAGE_CUSTOM_CALENDAR`(**Can manage custom calendars**) - `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) - `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` (**Can manage data models**) + +### Parameters + +| Name | Type | +|------------- | ------------- | +| **dbtConnectionIdentifier** | **String** +| **fileContent** | **File** + +### Return type + +**Object** + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + + - **Content-Type**: multipart/form-data + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Sync Table and Worksheet TML's are successfully generated. | - | +| **400** | Invalid request. | - | +| **401** | Unauthorized access. | - | +| **403** | Forbidden access. | - | +| **500** | Unexpected error | - | + + +# **dbtGenerateTml** +> Object dbtGenerateTml(dbtConnectionIdentifier, modelTables, importWorksheets, worksheets, fileContent) + + + + Version: 9.9.0.cl or later Generate required table and worksheet and import them. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege or `DATAMANAGEMENT` (**Can manage data**) privilege, along with an existing DBT connection. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the following data control privileges may be required: - `CAN_MANAGE_CUSTOM_CALENDAR`(**Can manage custom calendars**) - `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) - `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` (**Can manage data models**) #### About generate TML Models and Worksheets to be imported can be selected by the user as part of the API. + +### Parameters + +| Name | Type | +|------------- | ------------- | +| **dbtConnectionIdentifier** | **String** +| **modelTables** | **String** +| **importWorksheets** | **String** +| **worksheets** | **String** +| **fileContent** | **File** + +### Return type + +**Object** + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + + - **Content-Type**: multipart/form-data + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Required Table and Worksheet TML's are successfully generated. | - | +| **400** | Invalid request. | - | +| **401** | Unauthorized access. | - | +| **403** | Forbidden access. | - | +| **500** | Unexpected error | - | + + +# **dbtSearch** +> List<DbtSearchResponse> dbtSearch() + + + + Version: 9.9.0.cl or later Gets a list of DBT connection objects by user and organization, available on the ThoughtSpot system. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege or `DATAMANAGEMENT` (**Can manage data**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the following Data control privileges may be required: - `CAN_MANAGE_CUSTOM_CALENDAR`(**Can manage custom calendars**) - `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) - `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` (**Can manage data models**) #### About search DBT connection To get details of a specific DBT connection identifier, database connection identifier, database connection name, database name, project name, project identifier, environment identifier , import type and author. + +### Parameters +This endpoint does not need any parameter. + +### Return type + +[**List<DbtSearchResponse>**](DbtSearchResponse.md) + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Retrieved list of DBT connections successfully. | - | +| **400** | Invalid request. | - | +| **401** | Unauthorized access. | - | +| **403** | Forbidden access. | - | +| **500** | Unexpected error | - | + + +# **deactivateUser** +> ResponseActivationURL deactivateUser(deactivateUserRequest) + + + + Version: 9.7.0.cl or later Deactivates a user account. Requires `ADMINISTRATION` (**Can administer Thoughtspot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `USER_ADMINISTRATION` (**Can manage users**) privilege is required. To deactivate a user account, the API request body must include the following information: - Username or the GUID of the user account - Base URL of the ThoughtSpot instance If the API request is successful, ThoughtSpot returns the activation URL in the response. The activation URL is valid for 14 days and can be used to re-activate the account and reset the password of the deactivated account. + +### Parameters + +| Name | Type | +|------------- | ------------- | +| **deactivateUserRequest** | [**DeactivateUserRequest**](DeactivateUserRequest.md) + +### Return type + +[**ResponseActivationURL**](ResponseActivationURL.md) + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | User deactivated successfully. | - | +| **400** | Invalid request. | - | +| **401** | Unauthorized access. | - | +| **403** | Forbidden access. | - | +| **500** | Unexpected error | - | + + +# **deleteCalendar** +> deleteCalendar(calendarIdentifier) + + + + Version: 10.12.0.cl or later Deletes a [custom calendar](https://docs.thoughtspot.com/cloud/latest/connections-cust-cal). Requires `DATAMANAGEMENT` (**Can manage data**) or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your ThoughtSpot instance, the `CAN_MANAGE_CUSTOM_CALENDAR` (**Can manage custom calendars**) privilege is required. #### Usage guidelines To delete a custom calendar, specify the calendar ID as a path parameter in the request URL. + +### Parameters + +| Name | Type | +|------------- | ------------- | +| **calendarIdentifier** | **String** + +### Return type + +null (empty response body) + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **204** | Custom calendar successfully deleted. | - | +| **400** | Invalid request. | - | +| **401** | Unauthorized access. | - | +| **403** | Forbidden access. | - | +| **500** | Unexpected error | - | + + +# **deleteCollection** +> CollectionDeleteResponse deleteCollection(deleteCollectionRequest) + + + + Version: 26.4.0.cl or later Deletes one or more collections from ThoughtSpot. #### Delete options * **delete_children**: When set to `true`, deletes the child objects (metadata items) within the collection that the user has access to. Objects that the user does not have permission to delete will be skipped. * **dry_run**: When set to `true`, performs a preview of the deletion operation without actually deleting anything. The response shows what would be deleted, allowing you to review before committing the deletion. #### Response The response includes: * **metadata_deleted**: List of metadata objects that were successfully deleted * **metadata_skipped**: List of metadata objects that were skipped due to lack of permissions or other constraints + +### Parameters + +| Name | Type | +|------------- | ------------- | +| **deleteCollectionRequest** | [**DeleteCollectionRequest**](DeleteCollectionRequest.md) + +### Return type + +[**CollectionDeleteResponse**](CollectionDeleteResponse.md) + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Collections deleted successfully. | - | +| **400** | Invalid request. | - | +| **401** | Unauthorized access. | - | +| **403** | Forbidden access. | - | +| **404** | Resource not found. | - | +| **500** | Unexpected error | - | + + +# **deleteConfig** +> deleteConfig(deleteConfigRequest) + + + + Version: 9.2.0.cl or later Deletes Git repository configuration from your ThoughtSpot instance. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance on your instance, the `CAN_SETUP_VERSION_CONTROL` (**Can set up version control**) privilege. + +### Parameters + +| Name | Type | +|------------- | ------------- | +| **deleteConfigRequest** | [**DeleteConfigRequest**](DeleteConfigRequest.md) + +### Return type + +null (empty response body) + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **204** | Successfully deleted local repository configuration | - | +| **400** | Invalid request. | - | +| **401** | Unauthorized access. | - | +| **403** | Forbidden access. | - | +| **500** | Unexpected error | - | + + +# **deleteConnection** +> deleteConnection(deleteConnectionRequest) + + + + Version: 9.2.0.cl or later **Important**: This endpoint is deprecated and will be removed from ThoughtSpot in September 2025. ThoughtSpot strongly recommends using the [Delete Connection V2](#/http/api-endpoints/connections/delete-connection-v2) endpoint to delete your connection objects. #### Usage guidelines Deletes a connection object. Requires `DATAMANAGEMENT` (**Can manage data**) and edit permissions to the connection object, or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) privilege is required. **Note**: If a connection has dependent objects, make sure you remove its associations before the delete operation. + +### Parameters + +| Name | Type | +|------------- | ------------- | +| **deleteConnectionRequest** | [**DeleteConnectionRequest**](DeleteConnectionRequest.md) + +### Return type + +null (empty response body) + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **204** | Connection successfully deleted. | - | +| **400** | Invalid request. | - | +| **401** | Unauthorized access. | - | +| **403** | Forbidden access. | - | +| **500** | Unexpected error | - | + + +# **deleteConnectionConfiguration** +> deleteConnectionConfiguration(deleteConnectionConfigurationRequest) + + + + Version: 10.12.0.cl or later Deletes connection configuration objects. Requires `DATAMANAGEMENT` (**Can manage data**) and edit permissions to the connection object, or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) privilege is required. + +### Parameters + +| Name | Type | +|------------- | ------------- | +| **deleteConnectionConfigurationRequest** | [**DeleteConnectionConfigurationRequest**](DeleteConnectionConfigurationRequest.md) + +### Return type + +null (empty response body) + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **204** | Connection Configurations successfully deleted. | - | +| **400** | Invalid request. | - | +| **401** | Unauthorized access. | - | +| **403** | Forbidden access. | - | +| **500** | Unexpected error | - | + + +# **deleteConnectionV2** +> deleteConnectionV2(connectionIdentifier) + + + + Version: 10.4.0.cl or later Deletes a connection object. **Note**: If a connection has dependent objects, make sure you remove its associations before the delete operation. Requires `DATAMANAGEMENT` (**Can manage data**) and edit permissions to the connection object, or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) privilege is required. + +### Parameters + +| Name | Type | +|------------- | ------------- | +| **connectionIdentifier** | **String** + +### Return type + +null (empty response body) + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **204** | Connection successfully deleted. | - | +| **400** | Invalid request. | - | +| **401** | Unauthorized access. | - | +| **403** | Forbidden access. | - | +| **500** | Unexpected error | - | + + +# **deleteCustomAction** +> deleteCustomAction(customActionIdentifier) + + + + Version: 9.6.0.cl or later Removes the custom action specified in the API request. Requires `DEVELOPER` (**Has Developer privilege**) or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `DEVELOPER` (**Has developer privilege**) privilege is required. + +### Parameters + +| Name | Type | +|------------- | ------------- | +| **customActionIdentifier** | **String** + +### Return type + +null (empty response body) + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **204** | Custom action is successfully deleted. | - | +| **400** | Invalid request. | - | +| **401** | Unauthorized access. | - | +| **403** | Forbidden access. | - | +| **500** | Unexpected error | - | + + +# **deleteDbtConnection** +> deleteDbtConnection(dbtConnectionIdentifier) + + + + Version: 9.9.0.cl or later Removes the specified DBT connection object from the ThoughtSpot system. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) or `DATAMANAGEMENT` (**Can manage data ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the following Data control privileges may be required: - `CAN_MANAGE_CUSTOM_CALENDAR`(**Can manage custom calendars**) - `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) - `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` (**Can manage data models**) + +### Parameters + +| Name | Type | +|------------- | ------------- | +| **dbtConnectionIdentifier** | **String** + +### Return type + +null (empty response body) + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **204** | DBT Connection successfully deleted. | - | +| **400** | Invalid request. | - | +| **401** | Unauthorized access. | - | +| **403** | Forbidden access. | - | +| **500** | Unexpected error | - | + + +# **deleteEmailCustomization** +> deleteEmailCustomization(templateIdentifier) + + + + Version: 10.10.0.cl or later Deletes the configuration for the email customization. #### Pre-requisites Requires `DEVELOPER` (**has developer privilege**) or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `DEVELOPER` (**Has developer privilege**) privilege is required. **NOTE**:This endpoint in currently in beta. Contact ThoughtSpot support to enable this on your instance. #### Usage guidelines - Call the search API endpoint to get the `template_identifier` from the response. - Use that `template_identifier` as a parameter in this API request. + +### Parameters + +| Name | Type | +|------------- | ------------- | +| **templateIdentifier** | **String** + +### Return type + +null (empty response body) + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **204** | Email Customization configuration successfully deleted. | - | +| **400** | Invalid request. | - | +| **403** | Unauthorized access. | - | +| **500** | Unexpected error | - | + + +# **deleteMetadata** +> deleteMetadata(deleteMetadataRequest) + + + + Version: 9.0.0.cl or later Removes the specified metadata object from the ThoughtSpot system. Requires edit access to the metadata object. + +### Parameters + +| Name | Type | +|------------- | ------------- | +| **deleteMetadataRequest** | [**DeleteMetadataRequest**](DeleteMetadataRequest.md) + +### Return type + +null (empty response body) + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **204** | Metadata objects successfully deleted. | - | +| **400** | Invalid request. | - | +| **401** | Unauthorized access. | - | +| **403** | Forbidden access. | - | +| **500** | Unexpected error | - | + + +# **deleteOrg** +> deleteOrg(orgIdentifier) + + + + Version: 9.0.0.cl or later Deletes an Org object from the ThoughtSpot system. Requires cluster administration (**Can administer Org**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `ORG_ADMINISTRATION` (**Can manage Orgs**) privilege is required. When you delete an Org, all its users and objects created in that Org context are removed. However, if the users in the deleted Org also exists in other Orgs, they are removed only from the deleted Org. + +### Parameters + +| Name | Type | +|------------- | ------------- | +| **orgIdentifier** | **String** + +### Return type + +null (empty response body) + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **204** | Organization successfully deleted. | - | +| **400** | Invalid request. | - | +| **401** | Unauthorized access. | - | +| **403** | Forbidden access. | - | +| **500** | Unexpected error | - | + + +# **deleteOrgEmailCustomization** +> deleteOrgEmailCustomization(deleteOrgEmailCustomizationRequest) + + + + Version: 10.12.0.cl or later Deletes the configuration for the email customization. #### Pre-requisites Requires `DEVELOPER` (**has developer privilege**) or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `DEVELOPER` (**Has developer privilege**) privilege is required. **NOTE**:This endpoint in currently in beta. Contact ThoughtSpot support to enable this on your instance. #### Usage guidelines - Call the search API endpoint to get the `org_identifier` from the response. - Use that `org_identifier` as a parameter in this API request. + +### Parameters + +| Name | Type | +|------------- | ------------- | +| **deleteOrgEmailCustomizationRequest** | [**DeleteOrgEmailCustomizationRequest**](DeleteOrgEmailCustomizationRequest.md) + +### Return type + +null (empty response body) + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **204** | Email Customization configuration successfully deleted. | - | +| **400** | Invalid request. | - | +| **401** | Unauthorized access. | - | +| **403** | Unauthorized access. | - | +| **500** | Unexpected error | - | + + +# **deleteRole** +> deleteRole(roleIdentifier) + + + + Version: 9.5.0.cl or later Deletes a Role object from the ThoughtSpot system. Available only if [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance. To delete a Role, the `ROLE_ADMINISTRATION` (**Can manage roles**) privilege is required. + +### Parameters + +| Name | Type | +|------------- | ------------- | +| **roleIdentifier** | **String** + +### Return type + +null (empty response body) + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **204** | Role successfully deleted. | - | +| **400** | Invalid request. | - | +| **401** | Unauthorized access. | - | +| **403** | Forbidden access. | - | +| **500** | Internal error | - | + + +# **deleteSchedule** +> deleteSchedule(scheduleIdentifier) + + + + Deletes a scheduled job. Version: 9.4.0.cl or later Deletes a scheduled Liveboard job. Requires at least edit access to Liveboard or `ADMINISTRATION` (**Can administer Org**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `JOBSCHEDULING` (**Can schedule for others**) privilege is required. + +### Parameters + +| Name | Type | +|------------- | ------------- | +| **scheduleIdentifier** | **String** + +### Return type + +null (empty response body) + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **204** | Schedule successfully deleted. | - | +| **400** | Invalid request. | - | +| **401** | Unauthorized access. | - | +| **403** | Forbidden access. | - | +| **500** | Unexpected error | - | + + +# **deleteTag** +> deleteTag(tagIdentifier) + + + + Version: 9.0.0.cl or later Deletes a tag object from the ThoughtSpot system Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `TAGMANAGEMENT` (**Can manage tags**) privilege is required to create, edit, and delete tags. + +### Parameters + +| Name | Type | +|------------- | ------------- | +| **tagIdentifier** | **String** + +### Return type + +null (empty response body) + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **204** | Tag successfully deleted. | - | +| **400** | Invalid request. | - | +| **401** | Unauthorized access. | - | +| **403** | Forbidden access. | - | +| **500** | Unexpected error | - | + + +# **deleteUser** +> deleteUser(userIdentifier) + + + + Version: 9.0.0.cl or later Deletes a user from the ThoughtSpot system. If you want to remove a user from a specific Org but not from ThoughtSpot, update the group and Org mapping properties of the user object via a POST API call to the [/api/rest/2.0/users/{user_identifier}/update](#/http/api-endpoints/users/update-user) endpoint. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `USER_ADMINISTRATION` (**Can manage users**) privilege is required. + +### Parameters + +| Name | Type | +|------------- | ------------- | +| **userIdentifier** | **String** + +### Return type + +null (empty response body) + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **204** | User successfully deleted. | - | +| **400** | Invalid request. | - | +| **401** | Unauthorized access. | - | +| **403** | Forbidden access. | - | +| **500** | Unexpected error | - | + + +# **deleteUserGroup** +> deleteUserGroup(groupIdentifier) + + + + Version: 9.0.0.cl or later Removes the specified group object from the ThoughtSpot system. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `GROUP_ADMINISTRATION` (**Can manage groups**) privilege is required. + +### Parameters + +| Name | Type | +|------------- | ------------- | +| **groupIdentifier** | **String** + +### Return type + +null (empty response body) + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **204** | User group successfully deleted. | - | +| **400** | Invalid request. | - | +| **401** | Unauthorized access. | - | +| **403** | Forbidden access. | - | +| **500** | Unexpected error | - | + + +# **deleteVariable** +> deleteVariable(identifier) + + + + Delete a variable Version: 10.14.0.cl or later **Note:** This API endpoint is deprecated and will be removed from ThoughtSpot in a future release. Use [POST /api/rest/2.0/template/variables/delete](/api/rest/2.0/template/variables/delete) instead. Allows deleting a variable from ThoughtSpot. Requires ADMINISTRATION role and TENANT scope. The CAN_MANAGE_VARIABLES permission allows you to manage Formula Variables in the current organization scope. The API endpoint requires: * The variable identifier (ID or name) The operation will fail if: * The user lacks required permissions * The variable doesn't exist * The variable is being used by other objects + +### Parameters + +| Name | Type | +|------------- | ------------- | +| **identifier** | **String** + +### Return type + +null (empty response body) + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **204** | Deleting the variable is successful. | - | +| **400** | Invalid request. | - | +| **401** | Unauthorized access. | - | +| **403** | Forbidden access. | - | +| **500** | Unexpected error | - | + + +# **deleteVariables** +> deleteVariables(deleteVariablesRequest) + + + + Delete variable(s) Version: 26.4.0.cl or later Allows deleting multiple variables from ThoughtSpot. Requires ADMINISTRATION role and TENANT scope. The CAN_MANAGE_VARIABLES permission allows you to manage Formula Variables in the current organization scope. The API endpoint requires: * The variable identifiers (IDs or names) The operation will fail if: * The user lacks required permissions * Any of the variables don't exist * Any of the variables are being used by other objects + +### Parameters + +| Name | Type | +|------------- | ------------- | +| **deleteVariablesRequest** | [**DeleteVariablesRequest**](DeleteVariablesRequest.md) + +### Return type + +null (empty response body) + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **204** | Deletion of variable(s) is successful. | - | +| **400** | Invalid request. | - | +| **401** | Unauthorized access. | - | +| **403** | Forbidden access. | - | +| **500** | Unexpected error | - | + + +# **deleteWebhookConfigurations** +> WebhookDeleteResponse deleteWebhookConfigurations(deleteWebhookConfigurationsRequest) + + + + Version: 10.14.0.cl or later Deletes one or more webhook configurations by their unique id or name. Returns status of each deletion operation, including successfully deleted webhooks and any failures with error details. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) or `DEVELOPER` (**Has developer privilege**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, users with `CAN_MANAGE_WEBHOOKS` (**Can manage webhooks**) privilege are also authorized to perform this action. + +### Parameters + +| Name | Type | +|------------- | ------------- | +| **deleteWebhookConfigurationsRequest** | [**DeleteWebhookConfigurationsRequest**](DeleteWebhookConfigurationsRequest.md) + +### Return type + +[**WebhookDeleteResponse**](WebhookDeleteResponse.md) + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Webhook configurations deleted successfully | - | +| **400** | Invalid request. | - | +| **401** | Unauthorized access. | - | +| **403** | Forbidden access. | - | +| **500** | Unexpected error | - | + + +# **deployCommit** +> List<DeployResponse> deployCommit(deployCommitRequest) + + + + Version: 9.2.0.cl or later Allows you to deploy a commit and publish TML content to your ThoughtSpot instance. Requires at least edit access to the objects used in the deploy operation. The API deploys the head of the branch unless a `commit_id` is specified in the API request. If the branch name is not defined in the request, the default branch is considered for deploying commits. For more information, see [Git integration documentation](https://developers.thoughtspot.com/docs/git-integration). + +### Parameters + +| Name | Type | +|------------- | ------------- | +| **deployCommitRequest** | [**DeployCommitRequest**](DeployCommitRequest.md) + +### Return type + +[**List<DeployResponse>**](DeployResponse.md) + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Successfully deployed the changes | - | +| **400** | Invalid request. | - | +| **401** | Unauthorized access. | - | +| **403** | Forbidden access. | - | +| **500** | Unexpected error | - | + + +# **downloadConnectionMetadataChanges** +> File downloadConnectionMetadataChanges(connectionIdentifier) + + + + Version: 9.9.0.cl or later Exports the difference in connection metadata between CDW and ThoughtSpot Requires `DATAMANAGEMENT` (**Can manage data**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the following Data control privileges may be required: - `CAN_MANAGE_CUSTOM_CALENDAR`(**Can manage custom calendars**) - `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) - `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` (**Can manage data models**) To download the connection metadata difference between ThoughtSpot and CDW, pass the connection GUID as `connection_identifier` in the API request. + +### Parameters + +| Name | Type | +|------------- | ------------- | +| **connectionIdentifier** | **String** + +### Return type + +[**File**](File.md) + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/octet-stream, application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Export metadata changes. | - | +| **400** | Invalid request. | - | +| **401** | Unauthorized access. | - | +| **403** | Forbidden access. | - | +| **500** | Unexpected error | - | + + +# **exportAnswerReport** +> File exportAnswerReport(exportAnswerReportRequest) + + + + Version: 9.0.0.cl or later Exports an Answer in the given file format. You can download the Answer data as a PDF, PNG, CSV, or XLSX file. Requires at least view access to the Answer. #### Usage guidelines In the request body, specify the GUID or name of the Answer and set `file_format`. The default file format is CSV. Use the `type` parameter to specify whether the Answer being exported is a saved Answer (`SAVED`) or a pinned Answer on a Liveboard (`PINNED`). Defaults to `SAVED`. When using `PINNED`, the `metadata_identifier` must be the container id. **NOTE**: * The downloadable file returned in API response file is extensionless. Please rename the downloaded file by typing in the relevant extension. * HTML rendering is not supported for PDF exports of Answers with tables. Optionally, you can define [runtime overrides](https://developers.thoughtspot.com/docs/fetch-data-and-report-apis#_runtime_overrides) to apply to the Answer data. + +### Parameters + +| Name | Type | +|------------- | ------------- | +| **exportAnswerReportRequest** | [**ExportAnswerReportRequest**](ExportAnswerReportRequest.md) + +### Return type + +[**File**](File.md) + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/octet-stream, application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Export report file of specified metadata object is successful. | - | +| **400** | Invalid request. | - | +| **401** | Unauthorized access. | - | +| **403** | Forbidden access. | - | +| **500** | Unexpected error | - | + + +# **exportLiveboardReport** +> File exportLiveboardReport(exportLiveboardReportRequest) + + + + Version: 9.0.0.cl or later Exports a Liveboard and its visualizations in PDF, PNG, CSV, or XLSX file format. The default `file_format` is CSV. Requires at least view access to the Liveboard. #### Usage guidelines In the request body, specify the GUID or name of the Liveboard. To generate a Liveboard report with specific visualizations, add GUIDs or names of the visualizations. **NOTE**: * The downloadable file returned in API response file is extensionless. Please rename the downloaded file by typing in the relevant extension. * Optionally, you can define [runtime overrides](https://developers.thoughtspot.com/docs/fetch-data-and-report-apis#_runtime_overrides) to apply to the Answer data. * To include unsaved changes in the report, pass the `transient_pinboard_content` script generated from the `getExportRequestForCurrentPinboard` method in the Visual Embed SDK. Upon successful execution, the API returns the report with unsaved changes, including ad hoc changes to visualizations. For more information, see [Liveboard Report API](https://developers.thoughtspot.com/docs/fetch-data-and-report-apis#_liveboard_report_api). * Starting with ThoughtSpot Cloud 10.9.0.cl release, the Liveboard can be exported in the PNG format in the resolution of your choice. To enable this on your instance, contact ThoughtSpot support. When this feature is enabled, the options `include_cover_page`,`include_filter_page` within the `png_options` will not be available for PNG exports. * Starting with the ThoughtSpot Cloud 26.2.0.cl release, * Liveboards can be exported in CSV format. * All visualizations within a Liveboard can be exported as individual CSV files. * When exporting multiple visualizations or the entire Liveboard, the system returns the report as a compressed ZIP file containing the separate CSV files for each visualization. * Liveboards can also be exported in XLSX format. * All selected visualizations are consolidated into a single Excel workbook (.xlsx), with each visualization placed in its own worksheet (tab). * XLSX exports are limited to a maximum of 255 worksheets (tabs) per workbook. + +### Parameters + +| Name | Type | +|------------- | ------------- | +| **exportLiveboardReportRequest** | [**ExportLiveboardReportRequest**](ExportLiveboardReportRequest.md) + +### Return type + +[**File**](File.md) + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/octet-stream, application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Export report file of specified metadata object is successful. | - | +| **400** | Invalid request. | - | +| **401** | Unauthorized access. | - | +| **403** | Forbidden access. | - | +| **500** | Unexpected error | - | + + +# **exportMetadataTML** +> List<Object> exportMetadataTML(exportMetadataTMLRequest) + + + + Version: 9.0.0.cl or later Exports the [TML](https://docs.thoughtspot.com/cloud/latest/tml) representation of metadata objects in JSON or YAML format. Requires `DATADOWNLOADING` (**Can download Data**) and at least view access to the metadata object. #### Usage guidelines * You can export one or several objects by passing metadata object GUIDs in the `metadata` array. * When exporting TML content for a Liveboard or Answer object, you can set `export_associated` to `true` to retrieve TML content for underlying Worksheets, Tables, or Views, including the GUID of each object within the headers. When `export_associated` is set to `true`, consider retrieving one metadata object at a time. * Set `export_fqns` to `true` to add FQNs of the referenced objects in the TML content. For example, if you send an API request to retrieve TML for a Liveboard and its associated objects, the API returns the TML content with FQNs of the referenced Worksheet. Exporting TML with FQNs is useful if ThoughtSpot has multiple objects with the same name and you want to eliminate ambiguity when importing TML files into ThoughtSpot. It eliminates the need for adding FQNs of the referenced objects manually during the import operation. * To export only the TML of feedbacks associated with an object, set the GUID of the object as `identifier`, and set the `type` as `FEEDBACK` in the `metadata` array. * To export the TML of an object along with the feedbacks associated with it, set the GUID of the object as `identifier`, set the `type` as `LOGIAL_TABLE` in the `metadata` array, and set `export_with_associated_feedbacks` in `export_options` to true. For more information, see [TML Documentation](https://developers.thoughtspot.com/docs/tml#_export_a_tml). For more information on feedbacks, see [Feedback Documentation](https://docs.thoughtspot.com/cloud/latest/sage-feedback). + +### Parameters + +| Name | Type | +|------------- | ------------- | +| **exportMetadataTMLRequest** | [**ExportMetadataTMLRequest**](ExportMetadataTMLRequest.md) + +### Return type + +**List<Object>** + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Export TMLs of specified metadata objects is successful. | - | +| **400** | Invalid request. | - | +| **401** | Unauthorized access. | - | +| **403** | Forbidden access. | - | +| **500** | Unexpected error | - | + + +# **exportMetadataTMLBatched** +> Object exportMetadataTMLBatched(exportMetadataTMLBatchedRequest) + + + + Version: 10.1.0.cl or later Exports the [TML](https://docs.thoughtspot.com/cloud/latest/tml) representation of metadata objects in JSON or YAML format. ### **Permissions Required** Requires `DATAMANAGEMENT` (**Can manage data**) and `USERMANAGEMENT` (**Can manage users**) privileges. #### **Usage Guidelines** This API is only applicable for `USER`, `GROUP`, and `ROLES` metadata types. - `batch_offset` Indicates the starting position within the complete dataset from which the API should begin returning objects. Useful for paginating results efficiently. - `batch_size` Specifies the number of objects or items to retrieve in a single request. Helps control response size for better performance. - `edoc_format` Defines the format of the TML content. The exported metadata can be in JSON or YAML format. - `export_dependent` Specifies whether to include dependent metadata objects in the export. Ensures related objects are also retrieved if needed. - `all_orgs_override` Indicates whether the export operation applies across all organizations. Useful for multi-tenant environments where cross-org exports are required. + +### Parameters + +| Name | Type | +|------------- | ------------- | +| **exportMetadataTMLBatchedRequest** | [**ExportMetadataTMLBatchedRequest**](ExportMetadataTMLBatchedRequest.md) + +### Return type + +**Object** + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Export TMLs of specified metadata objects is successful. | - | +| **400** | Invalid request. | - | +| **401** | Unauthorized access. | - | +| **403** | Forbidden access. | - | +| **500** | Unexpected error | - | + + +# **fetchAnswerData** +> AnswerDataResponse fetchAnswerData(fetchAnswerDataRequest) + + + + Version: 9.0.0.cl or later Fetches data from a saved Answer. Requires at least view access to the saved Answer. The `record_size` attribute determines the number of records to retrieve in an API call. For more information about pagination, record size, and maximum row limit, see [Pagination and record size settings](https://developers.thoughtspot.com/docs/fetch-data-and-report-apis#_pagination_settings_for_data_and_report_apis). + +### Parameters + +| Name | Type | +|------------- | ------------- | +| **fetchAnswerDataRequest** | [**FetchAnswerDataRequest**](FetchAnswerDataRequest.md) + +### Return type + +[**AnswerDataResponse**](AnswerDataResponse.md) + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Fetching data of specified metadata object is successful. | - | +| **400** | Invalid request. | - | +| **401** | Unauthorized access. | - | +| **403** | Forbidden access. | - | +| **500** | Unexpected error | - | + + +# **fetchAnswerSqlQuery** +> SqlQueryResponse fetchAnswerSqlQuery(fetchAnswerSqlQueryRequest) + + + + Version: 9.0.0.cl or later Fetches the underlying SQL query data for an Answer object. Requires at least view access to the Answer object. Upon successful execution, the API returns the SQL queries for the specified object as shown in this example: ``` { \"metadata_id\":\"8fbe44a8-46ad-4b16-8d39-184b2fada490\", \"metadata_name\":\"Total sales\", \"metadata_type\":\"ANSWER\", \"sql_queries\":[ { \"metadata_id\":\"8fbe44a8-46ad-4b16-8d39-184b2fada490\", \"metadata_name\":\"Total sales -test\", \"sql_query\":\"SELECT \\n \\\"ta_1\\\".\\\"REGION\\\" \\\"ca_1\\\", \\n \\\"ta_2\\\".\\\"PRODUCTNAME\\\" \\\"ca_2\\\", \\n \\\"ta_1\\\".\\\"STORENAME\\\" \\\"ca_3\\\", \\n CASE\\n WHEN sum(\\\"ta_3\\\".\\\"SALES\\\") IS NOT NULL THEN sum(\\\"ta_3\\\".\\\"SALES\\\")\\n ELSE 0\\n END \\\"ca_4\\\", \\n CASE\\n WHEN sum(\\\"ta_3\\\".\\\"QUANTITYPURCHASED\\\") IS NOT NULL THEN sum(\\\"ta_3\\\".\\\"QUANTITYPURCHASED\\\")\\n ELSE 0\\n END \\\"ca_5\\\"\\nFROM \\\"RETAILAPPAREL\\\".\\\"PUBLIC\\\".\\\"FACT_RETAPP_SALES\\\" \\\"ta_3\\\"\\n JOIN \\\"RETAILAPPAREL\\\".\\\"PUBLIC\\\".\\\"DIM_RETAPP_STORES\\\" \\\"ta_1\\\"\\n ON \\\"ta_3\\\".\\\"STOREID\\\" = \\\"ta_1\\\".\\\"STOREID\\\"\\n JOIN \\\"RETAILAPPAREL\\\".\\\"PUBLIC\\\".\\\"DIM_RETAPP_PRODUCTS\\\" \\\"ta_2\\\"\\n ON \\\"ta_3\\\".\\\"PRODUCTID\\\" = \\\"ta_2\\\".\\\"PRODUCTID\\\"\\nGROUP BY \\n \\\"ca_1\\\", \\n \\\"ca_2\\\", \\n \\\"ca_3\\\"\\n\" } ] } ``` + +### Parameters + +| Name | Type | +|------------- | ------------- | +| **fetchAnswerSqlQueryRequest** | [**FetchAnswerSqlQueryRequest**](FetchAnswerSqlQueryRequest.md) + +### Return type + +[**SqlQueryResponse**](SqlQueryResponse.md) + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Fetching SQL query of specified metadata object is successful. | - | +| **400** | Invalid request. | - | +| **401** | Unauthorized access. | - | +| **403** | Forbidden access. | - | +| **500** | Unexpected error | - | + + +# **fetchAsyncImportTaskStatus** +> GetAsyncImportStatusResponse fetchAsyncImportTaskStatus(fetchAsyncImportTaskStatusRequest) + + + + Version: 10.4.0.cl or later Gets information about the status of the TML async import task scheduled using the `/api/rest/2.0/metadata/tml/async/import` API call. To fetch the task details, specify the ID of the TML async import task. Requires access to the task ID. The API allows users who initiated the asynchronous TML import via `/api/rest/2.0/metadata/tml/async/import` to view the status of their tasks. Users with administration privilege can view the status of all import tasks initiated by the users in their Org. #### Usage guidelines See [TML API Documentation](https://developers.thoughtspot.com/docs/tml#_fetch_status_of_the_tml_import_task) for usage guidelines. + +### Parameters + +| Name | Type | +|------------- | ------------- | +| **fetchAsyncImportTaskStatusRequest** | [**FetchAsyncImportTaskStatusRequest**](FetchAsyncImportTaskStatusRequest.md) + +### Return type + +[**GetAsyncImportStatusResponse**](GetAsyncImportStatusResponse.md) + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Async TML Import Task statuses fetched successfully. | - | +| **400** | Invalid request. | - | +| **401** | Unauthorized access. | - | +| **403** | Forbidden access. | - | +| **500** | Unexpected error | - | + + +# **fetchColumnSecurityRules** +> List<ColumnSecurityRuleResponse> fetchColumnSecurityRules(fetchColumnSecurityRulesRequest) + + + + Version: 10.12.0.cl or later Fetches column security rules for specified tables. This API endpoint retrieves column-level security rules configured for tables. It returns information about which columns are secured and which groups have access to those columns. #### Usage guidelines - Provide an array of table identifiers using either `identifier` (GUID or name) or `obj_identifier` (object ID) - At least one of `identifier` or `obj_identifier` must be provided for each table - The API returns column security rules for all specified tables - Users must have appropriate permissions to access security rules for the specified tables #### Required permissions - `ADMINISTRATION` - Can administer ThoughtSpot - `DATAMANAGEMENT` - Can manage data - `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` - Can manage worksheet views and tables #### Example request ```json { \"tables\": [ { \"identifier\": \"table-guid\", \"obj_identifier\": \"table-object-id\" } ] } ``` #### Response format The API returns an array of `ColumnSecurityRuleResponse` objects wrapped in a `data` field. Each `ColumnSecurityRuleResponse` object contains: - Table information (GUID and object ID) - Array of column security rules with column details, group access, and source table information #### Example response ```json { \"data\": [ { \"guid\": \"table-guid\", \"objId\": \"table-object-id\", \"columnSecurityRules\": [ { \"column\": { \"id\": \"col_123\", \"name\": \"Salary\" }, \"groups\": [ { \"id\": \"group_1\", \"name\": \"HR Department\" } ], \"sourceTableDetails\": { \"id\": \"source-table-guid\", \"name\": \"Employee_Data\" } } ] } ] } ``` + +### Parameters + +| Name | Type | +|------------- | ------------- | +| **fetchColumnSecurityRulesRequest** | [**FetchColumnSecurityRulesRequest**](FetchColumnSecurityRulesRequest.md) + +### Return type + +[**List<ColumnSecurityRuleResponse>**](ColumnSecurityRuleResponse.md) + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Successfully fetched column security rules | - | +| **400** | Bad request - Table not found or invalid parameters | - | +| **401** | Unauthorized access. | - | +| **403** | Forbidden - User doesn't have permission to access security rules for this table | - | +| **500** | Internal server error | - | + + +# **fetchConnectionDiffStatus** +> FetchConnectionDiffStatusResponse fetchConnectionDiffStatus(connectionIdentifier) + + + + Version: 9.9.0.cl or later Validates the difference in connection metadata between CDW and ThoughtSpot. Requires `DATAMANAGEMENT` (**Can manage data**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the following Data control privileges may be required: - `CAN_MANAGE_CUSTOM_CALENDAR`(**Can manage custom calendars**) - `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) - `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` (**Can manage data models**) Returns a boolean indicating whether there is any difference between the connection metadata at ThoughtSpot and CDW. To get the connection metadata difference status, pass the connection GUID as `connection_identifier` in the API request. + +### Parameters + +| Name | Type | +|------------- | ------------- | +| **connectionIdentifier** | **String** + +### Return type + +[**FetchConnectionDiffStatusResponse**](FetchConnectionDiffStatusResponse.md) + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | true/false | - | +| **400** | Invalid request. | - | +| **401** | Unauthorized access. | - | +| **403** | Forbidden access. | - | +| **500** | Unexpected error | - | + + +# **fetchLiveboardData** +> LiveboardDataResponse fetchLiveboardData(fetchLiveboardDataRequest) + + + + Version: 9.0.0.cl or later Gets data from a Liveboard object and its visualization. Requires at least view access to the Liveboard. #### Usage guidelines In the request body, specify the GUID or name of the Liveboard. To get data for specific visualizations, add the GUIDs or names of the visualizations in the API request. To include unsaved changes in the report, pass the `transient_pinboard_content` script generated from the `getExportRequestForCurrentPinboard` method in the Visual Embed SDK. Upon successful execution, the API returns the report with unsaved changes. If the new Liveboard experience mode, the transient content includes ad hoc changes to visualizations such as sorting, toggling of legends, and data drill down. For more information, and see [Liveboard data API](https://developers.thoughtspot.com/docs/fetch-data-and-report-apis#_fetch_liveboard_data_api). + +### Parameters + +| Name | Type | +|------------- | ------------- | +| **fetchLiveboardDataRequest** | [**FetchLiveboardDataRequest**](FetchLiveboardDataRequest.md) + +### Return type + +[**LiveboardDataResponse**](LiveboardDataResponse.md) + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Fetching data of specified metadata object is successful. | - | +| **400** | Invalid request. | - | +| **401** | Unauthorized access. | - | +| **403** | Forbidden access. | - | +| **500** | Unexpected error | - | + + +# **fetchLiveboardSqlQuery** +> SqlQueryResponse fetchLiveboardSqlQuery(fetchLiveboardSqlQueryRequest) + + + + Version: 9.0.0.cl or later Fetches the underlying SQL query data for a Liveboard object and its visualizations. Requires at least view access to the Liveboard object. To get SQL query data for a Liveboard, specify the GUID of the Liveboard. Optionally, you can add an array of visualization GUIDs to retrieve the SQL query data for visualizations in the Liveboard. Upon successful execution, the API returns the SQL queries for the specified object as shown in this example: ``` { \"metadata_id\": \"fa68ae91-7588-4136-bacd-d71fb12dda69\", \"metadata_name\": \"Total Sales\", \"metadata_type\": \"LIVEBOARD\", \"sql_queries\": [ { \"metadata_id\": \"b3b6d2b9-089a-490c-8e16-b144650b7843\", \"metadata_name\": \"Total quantity purchased, Total sales by region\", \"sql_query\": \"SELECT \\n \\\"ta_1\\\".\\\"REGION\\\" \\\"ca_1\\\", \\n CASE\\n WHEN sum(\\\"ta_2\\\".\\\"QUANTITYPURCHASED\\\") IS NOT NULL THEN sum(\\\"ta_2\\\".\\\"QUANTITYPURCHASED\\\")\\n ELSE 0\\n END \\\"ca_2\\\", \\n CASE\\n WHEN sum(\\\"ta_2\\\".\\\"SALES\\\") IS NOT NULL THEN sum(\\\"ta_2\\\".\\\"SALES\\\")\\n ELSE 0\\n END \\\"ca_3\\\"\\nFROM \\\"RETAILAPPAREL\\\".\\\"PUBLIC\\\".\\\"FACT_RETAPP_SALES\\\" \\\"ta_2\\\"\\n JOIN \\\"RETAILAPPAREL\\\".\\\"PUBLIC\\\".\\\"DIM_RETAPP_STORES\\\" \\\"ta_1\\\"\\n ON \\\"ta_2\\\".\\\"STOREID\\\" = \\\"ta_1\\\".\\\"STOREID\\\"\\nGROUP BY \\\"ca_1\\\"\" } ] } ``` + +### Parameters + +| Name | Type | +|------------- | ------------- | +| **fetchLiveboardSqlQueryRequest** | [**FetchLiveboardSqlQueryRequest**](FetchLiveboardSqlQueryRequest.md) + +### Return type + +[**SqlQueryResponse**](SqlQueryResponse.md) + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Fetching SQL query of specified metadata object is successful. | - | +| **400** | Invalid request. | - | +| **401** | Unauthorized access. | - | +| **403** | Forbidden access. | - | +| **500** | Unexpected error | - | + + +# **fetchLogs** +> List<LogResponse> fetchLogs(fetchLogsRequest) + + + + Version: 9.0.0.cl or later Fetches security audit logs. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the [Admin Control](https://developers.thoughtspot.com/docs/rbac#_admin_control) privileges are required. #### Usage guidelines By default, the API retrieves logs for the last 24 hours. You can set a custom duration in EPOCH time. Make sure the log duration specified in your API request doesn’t exceed 24 hours. If you must fetch logs for a longer time range, modify the duration and make multiple sequential API requests. Upon successful execution, the API returns logs with the following information: * timestamp of the event * event ID * event type * name and GUID of the user * IP address of ThoughtSpot instance For more information see [Audit logs Documentation](https://developers.thoughtspot.com/docs/audit-logs). + +### Parameters + +| Name | Type | +|------------- | ------------- | +| **fetchLogsRequest** | [**FetchLogsRequest**](FetchLogsRequest.md) + +### Return type + +[**List<LogResponse>**](LogResponse.md) + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Log fetched successfully. | - | +| **400** | Invalid request. | - | +| **401** | Unauthorized access. | - | +| **403** | Forbidden access. | - | +| **500** | Unexpected error | - | + + +# **fetchObjectPrivileges** +> ObjectPrivilegesOfMetadataResponse fetchObjectPrivileges(fetchObjectPrivilegesRequest) + + + + Version: 26.3.0.cl or later This API fetches the object privileges present for the given list of principals (user or group), on the given set of objects. It supports pagination, which can be enabled and configured using the request parameters. It provides users access to certain features based on privilege based access control. #### Usage guidelines - Specify the `type` (`USER` or `USER_GROUP`) and `identifier` (either GUID or name) of the principals for which you want to retrieve object privilege information in the `principals` array. - Specify the `type` (`LOGICAL_TABLE`) and `identifier` (either GUID or name) of the metadata objects for which you want to retrieve object privilege information in the `metadata` array. Only `LOGICAL_TABLE` metadata type is supported for now. It may be extended for other metadata types in future. - To control the offset from where principals have to be fetched, use `record_offset`. When `record_offset` is 0, information is fetched from the beginning. - To control the number of principals to be fetched, use `record_size`. Default `record_size` is 20. - Ensure `record_offset` for a subsequent request is one more than the value of `record_size` of the previous request. - Ensure using correct Authorization Bearer Token corresponding to specific user & org. #### Example request ```json { \"principals\": [ { \"type\": \"type-1\", \"identifier\": \"principal-guid-or-name-1\" }, { \"type\": \"type-2\", \"identifier\": \"principal-guid-or-name-2\" } ], \"metadata\": [ { \"type\": \"metadata-type-1\", \"identifier\": \"metadata-guid-or-name-1\" }, { \"type\": \"metadata-type-2\", \"identifier\": \"metadata-guid-or-name-2\" } ], \"record_offset\": 0, \"record_size\": 20 } ``` #### Response format The API returns an array of `metadata_object_privileges` objects wrapped in JSON. Each `metadata_object_privileges` object contains: - Metadata information (GUID, name and type) - Array of `principal_object_privilege_info`. - Each `principal_object_privilege_info` contains: - Principal type. All principals of this type are listed as described below. - Array of `principal_object_privileges`. - Each `principal_object_privileges` contains: - Principal information (GUID, name, subtype) - List of applied object level privileges. #### Example response ```json { \"metadata_object_privileges\": [ { \"metadata_id\": \"metadata-guid-1\", \"metadata_name\": \"metadata-name-1\", \"metadata_type\": \"metadata-type-1\", \"principal_object_privilege_info\": [ { \"principal_type\": \"principal-type-1\", \"principal_object_privileges\": [ { \"principal_id\": \"principal-guid-1\", \"principal_name\": \"principal-name-1\", \"principal_sub_type\": \"principal-sub-type-1\", \"object_privileges\": \"[object-privilege-1, object-privilege-2]\" }, { \"principal_id\": \"principal-guid-2\", \"principal_name\": \"principal-name-2\", \"principal_sub_type\": \"principal-sub-type-2\", \"object_privileges\": \"[object-privilege-1, object-privilege-2]\" } ] }, { \"principal_type\": \"principal-type-2\", \"principal_object_privileges\": [ { \"principal_id\": \"principal-guid-3\", \"principal_name\": \"principal-guid-4\", \"principal_sub_type\": \"principal-sub-type-4\", \"object_privileges\": \"[object-privilege-1]\" } ] } ] }, { \"metadata_id\": \"metadata-guid-2\", \"metadata_name\": \"metadata-name-2\", \"metadata_type\": \"metadata-type-2\", \"principal_object_privilege_info\": [ { \"principal_type\": \"principal-type-1\", \"principal_object_privileges\": [ { \"principal_id\": \"principal-guid-1\", \"principal_name\": \"principal-name-1\", \"principal_sub_type\": \"principal-sub-type-1\", \"object_privileges\": \"[object-privilege-3, object-privilege-4]\" }, { \"principal_id\": \"principal-guid-2\", \"principal_name\": \"principal-name-2\", \"principal_sub_type\": \"principal-sub-type-2\", \"object_privileges\": \"[object-privilege-4]\" } ] } ] } ] } ``` + +### Parameters + +| Name | Type | +|------------- | ------------- | +| **fetchObjectPrivilegesRequest** | [**FetchObjectPrivilegesRequest**](FetchObjectPrivilegesRequest.md) + +### Return type + +[**ObjectPrivilegesOfMetadataResponse**](ObjectPrivilegesOfMetadataResponse.md) + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Fetching defined object privileges of metadata objects is successful. | - | +| **400** | Invalid request. | - | +| **401** | Unauthorized access. | - | +| **403** | Forbidden access. | - | +| **500** | Unexpected error | - | + + +# **fetchPermissionsOfPrincipals** +> PermissionOfPrincipalsResponse fetchPermissionsOfPrincipals(fetchPermissionsOfPrincipalsRequest) + + + + Version: 9.0.0.cl or later Fetches object permission details for a given principal object such as a user and group. Requires view access to the metadata object. #### Usage guidelines * To get a list of all metadata objects that a user or group can access, specify the `type` and GUID or name of the principal. * To get permission details for a specific object, add the `type` and GUID or name of the metadata object to your API request. Upon successful execution, the API returns a list of metadata objects and permission details for each object. + +### Parameters + +| Name | Type | +|------------- | ------------- | +| **fetchPermissionsOfPrincipalsRequest** | [**FetchPermissionsOfPrincipalsRequest**](FetchPermissionsOfPrincipalsRequest.md) + +### Return type + +[**PermissionOfPrincipalsResponse**](PermissionOfPrincipalsResponse.md) + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Fetching permissions of principals is successful. | - | +| **400** | Invalid request. | - | +| **401** | Unauthorized access. | - | +| **403** | Forbidden access. | - | +| **500** | Unexpected error | - | + + +# **fetchPermissionsOnMetadata** +> PermissionOfMetadataResponse fetchPermissionsOnMetadata(fetchPermissionsOnMetadataRequest) + + + + Version: 9.0.0.cl or later Fetches permission details for a given metadata object. Requires view access to the metadata object. #### Usage guidelines * To fetch a list of users and groups for a metadata object, specify `type` and GUID or name of the metadata object. * To get permission details for a specific user or group, add `type` and GUID or name of the principal object to your API request. Upon successful execution, the API returns permission details and principal information for the object specified in the API request. + +### Parameters + +| Name | Type | +|------------- | ------------- | +| **fetchPermissionsOnMetadataRequest** | [**FetchPermissionsOnMetadataRequest**](FetchPermissionsOnMetadataRequest.md) + +### Return type + +[**PermissionOfMetadataResponse**](PermissionOfMetadataResponse.md) + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Fetching permissions of metadata objects is successful. | - | +| **400** | Invalid request. | - | +| **401** | Unauthorized access. | - | +| **403** | Forbidden access. | - | +| **500** | Unexpected error | - | + + +# **forceLogoutUsers** +> forceLogoutUsers(forceLogoutUsersRequest) + + + + Version: 9.0.0.cl or later Enforces logout on current user sessions. Use this API with caution as it may invalidate active user sessions and force users to re-login. Make sure you specify the usernames or GUIDs. If you pass null values in the API call, all user sessions on your cluster become invalid, and the users are forced to re-login. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `USER_ADMINISTRATION` (**Can manage users**) privilege is required. + +### Parameters + +| Name | Type | +|------------- | ------------- | +| **forceLogoutUsersRequest** | [**ForceLogoutUsersRequest**](ForceLogoutUsersRequest.md) + +### Return type + +null (empty response body) + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **204** | Force logging out of users operation successful. | - | +| **400** | Invalid request. | - | +| **401** | Unauthorized access. | - | +| **403** | Forbidden access. | - | +| **500** | Unexpected error | - | + + +# **generateCSV** +> Object generateCSV(generateCSVRequest) + + + + Version: 10.12.0.cl or later Exports a [custom calendar](https://docs.thoughtspot.com/cloud/latest/connections-cust-cal) in the CSV format. Requires `DATAMANAGEMENT` (**Can manage data**) or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your ThoughtSpot instance, the `CAN_MANAGE_CUSTOM_CALENDAR` (**Can manage custom calendars**) privilege is required. #### Usage guidelines Use this API to download a custom calendar in the CSV file format. In your API request, specify the following parameters. * Start and end date of the calendar. For \"month offset\" calendars, the start date must match the month defined in the `month_offset` attribute. You can also specify optional parameters such as the starting day of the week and prefixes for the quarter and year labels. + +### Parameters + +| Name | Type | +|------------- | ------------- | +| **generateCSVRequest** | [**GenerateCSVRequest**](GenerateCSVRequest.md) + +### Return type + +**Object** + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Generate custom calendar data based on specifications, as a CSV file. | - | +| **400** | Invalid request. | - | +| **401** | Unauthorized access. | - | +| **403** | Forbidden access. | - | +| **500** | Unexpected error | - | + + +# **getCurrentUserInfo** +> User getCurrentUserInfo() + + + + Version: 9.0.0.cl or later Retrieves details of the current user session for the token provided in the request header. Any ThoughtSpot user can access this endpoint and send an API request. The data returned in the API response varies according to user's privilege and object access permissions. **NOTE**: In ThoughtSpot, users with cluster administration privileges can access all Orgs by default. However, unless the administrator is explicitly added to an Org, the Orgs list in the session information returned by the API will include only the Primary Org. To include other Orgs in the API response, you must explicitly add the administrator to each Org in the Admin settings page in the UI or via user REST API. + +### Parameters +This endpoint does not need any parameter. + +### Return type + +[**User**](User.md) + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Fetch current session user detail successful. | - | +| **400** | Invalid request. | - | +| **401** | Unauthorized access. | - | +| **403** | Forbidden access. | - | +| **500** | Unexpected error | - | + + +# **getCurrentUserToken** +> GetTokenResponse getCurrentUserToken() + + + + Version: 9.4.0.cl or later Retrieves details of the current session token for the bearer token provided in the request header. This API endpoint does not create a new token. Instead, it returns details about the token, including the token string, creation time, expiration time, and the associated user. Use this endpoint to introspect your current session token, debug authentication issues, or when a frontend application needs session token details. Any ThoughtSpot user with a valid bearer token can access this endpoint and send an API request + +### Parameters +This endpoint does not need any parameter. + +### Return type + +[**GetTokenResponse**](GetTokenResponse.md) + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Fetching token for current user successful. | - | +| **400** | Invalid request. | - | +| **401** | Unauthorized access. | - | +| **403** | Forbidden access. | - | +| **500** | Unexpected error | - | + + +# **getCustomAccessToken** +> AccessToken getCustomAccessToken(getCustomAccessTokenRequest) + + + + Version: 10.4.0.cl or later Creates an authentication token that provides values for the formula variables in the Row Level Security (RLS) rules for a given user. Recommended for use cases that require Attribute-based access control (ABAC) via RLS. #### Required privileges To add a new user and assign privileges during auto-creation, the `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege is required. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled, the `CONTROL_TRUSTED_AUTH` (**Can Enable or Disable Trusted Authentication**) privilege and edit access to the data source are required. To configure formula variables for all Orgs on your instance or the Primary Org, cluster administration privileges are required. Org administrators can configure formula variables for their respective Orgs. If Role-Based Access Control (RBAC) is enabled, users with the `CAN_MANAGE_VARIABLES` (**Can manage variables**) role privilege can also create and manage variables for their Org context. #### Usage guidelines You can generate a token by providing a `username` and `password`, or by using a `secret_key`. To generate a `secret_key`, the administrator must enable [Trusted authentication](https://developers.thoughtspot.com/docs/trusted-auth-secret-key) in the **Develop** > **Customizations** > **Security Settings** page. **Note**: * When both `password` and `secret_key` are included in the API request, `password` takes precedence. * If [Multi-Factor Authentication (MFA)](https://docs.thoughtspot.com/cloud/latest/authentication-local-mfa) is enabled on your instance, the API login request with `username` and `password` returns an error. You can switch to token-based authentication with `secret_key` or contact ThoughtSpot Support for assistance. The token obtained from ThoughtSpot is valid for 5 minutes by default. You can configure the token expiration time as required. #### ABAC via RLS To implement ABAC via RLS and assign security entitlements to users during session creation, generate a token with custom variable values. The values set in the authentication token are applied to the formula variables referenced in RLS rules at the table level, which determines the data each user can access based on their entitlements. The variable values can be configured to persist for a specific set of Models in user sessions initiated with the token, allowing different RLS rules to be set for different data models. Once defined, the rules are added to the user's `variable_values` object, after which all sessions will use the persisted values. For more information, see [ABAC via tokens Documentation](https://developers.thoughtspot.com/docs/abac-via-rls-variables). ##### Formula variables Before defining variable values, ensure the variables are created and available on your instance. To create a formula variable, you can use the **Create variable** (`/api/rest/2.0/template/variables/create`) REST API endpoint, with the variable `type` set as `Formula_Variable` in the API request. The API doesn't support `\"persist_option\": \"RESET\"` and `\"persist_option\": \"NONE\"` when `variable_values` are defined in the request. If you are using `variable_values` for token generation, you must use other supported persist options such as `APPEND` or `REPLACE`. If you want to use `RESET` or `NONE`, do not pass any `variable_values`. In such cases, `variable_values` will remain unaffected. #### Supported objects The supported object type is `LOGICAL_TABLE`. When using `object_id` with `variable_values`, models are supported. #### Just-in-time provisioning For [just-in-time user creation and provisioning](https://developers.thoughtspot.com/docs/just-in-time-provisioning), specify the following attributes in the API request: * `auto_create` * `username` * `display_name` * `email` * `groups` Set `auto_create` to `true` if the username does not exist in ThoughtSpot. If the username already exists in ThoughtSpot and `auto_create` is set to `true`, user properties such as display name, email, Org and group entitlements will not be updated with new values. Setting `auto_create` to `true` does not create formula variables. Hence, this setting will not be applicable to `variable_values`. #### Important point to note All options in the token creation APIs that define user access to data in ThoughtSpot will take effect during token creation, not when the token is used for authentication. For example, `auto_create:true` will create the user when the authentication token is created. Persist options such as `APPEND` and `REPLACE` will persist `variable_values` on the user profile when the token is created. + +### Parameters + +| Name | Type | +|------------- | ------------- | +| **getCustomAccessTokenRequest** | [**GetCustomAccessTokenRequest**](GetCustomAccessTokenRequest.md) + +### Return type + +[**AccessToken**](AccessToken.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | ABAC token creation was successful. | - | +| **400** | Invalid request. This could be due to missing or incorrect parameters. | - | +| **401** | Unauthorized access. The request could not be authenticated. | - | +| **403** | Forbidden access. The user does not have permission to access this resource. | - | +| **500** | An unexpected error occurred on the server. | - | + + +# **getDataSourceSuggestions** +> EurekaDataSourceSuggestionResponse getDataSourceSuggestions(getDataSourceSuggestionsRequest) + + + + Version: 10.15.0.cl or later Suggests the most relevant data sources for a given natural language query, ranked by confidence with LLM-generated reasoning. Requires `CAN_USE_SPOTTER` privilege and at least view-level access to the underlying metadata entities referenced in the response. #### Usage guidelines The request must include: - `query`: the natural language question to find relevant data sources for If the request is successful, the API returns a ranked list of suggested data sources, each containing: - `confidence`: a float score indicating the model's confidence in the relevance of the suggestion - `details`: metadata about the data source - `data_source_identifier`: the unique ID of the data source - `data_source_name`: the display name of the data source - `description`: a description of the data source - `reasoning`: LLM-generated rationale explaining why the data source was recommended #### Error responses | Code | Description | |------|--------------------------------------------------------------------------------------------------------------------------------------------| | 401 | Unauthorized — authentication token is missing, expired, or invalid. | | 403 | Forbidden — the authenticated user does not have `CAN_USE_SPOTTER` privilege or lacks view permission on the underlying metadata entities. | > ###### Note: > * This endpoint is currently in Beta. Breaking changes may be introduced before it is made Generally Available. > * This endpoint requires Spotter — please contact ThoughtSpot Support to enable Spotter on your cluster. + +### Parameters + +| Name | Type | +|------------- | ------------- | +| **getDataSourceSuggestionsRequest** | [**GetDataSourceSuggestionsRequest**](GetDataSourceSuggestionsRequest.md) + +### Return type + +[**EurekaDataSourceSuggestionResponse**](EurekaDataSourceSuggestionResponse.md) + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Common successful response | - | +| **201** | Common error response | - | +| **400** | Operation failed | - | +| **401** | Unauthorized access. | - | +| **403** | Forbidden access. | - | +| **500** | Operation failed | - | + + +# **getFullAccessToken** +> Token getFullAccessToken(getFullAccessTokenRequest) + + + + Version: 9.0.0.cl or later Generates an authentication token for creating a full session in ThoughtSpot for a given user. Recommended for use cases that do not require Attribute-based access control (ABAC) via Row Level Security (RLS). #### Usage guidelines You can generate a token for a user by providing a `username` and `password`, or by using the `secret_key` generated for your instance. To generate a `secret_key`, the administrator must enable [Trusted authentication](https://developers.thoughtspot.com/docs/trusted-auth-secret-key) in the **Develop** > **Customizations** > **Security Settings** page. **Note**: * When both `password` and `secret_key` are included in the API request, `password` takes precedence. * If [Multi-Factor Authentication (MFA)](https://docs.thoughtspot.com/cloud/latest/authentication-local-mfa) is enabled on your instance, the API login request with `username` and `password` returns an error. You can switch to token-based authentication with `secret_key` or contact ThoughtSpot Support for assistance. The token obtained from ThoughtSpot is valid for 5 minutes by default. You can configure the token expiration time as required. #### Just-in-time provisioning For [just-in-time user creation and provisioning](https://developers.thoughtspot.com/docs/just-in-time-provisioning), specify the following attributes in the API request: * `auto_create` * `username` * `display_name` * `email` * `group_identifiers` Set `auto_create` to `true` if the username does not exist in ThoughtSpot. If the user already exists in ThoughtSpot and `auto_create` is set to `true`, user properties such as display name, email and group assignment will be updated. To add a new user and assign privileges during auto-creation, the `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege is required. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled, the `CONTROL_TRUSTED_AUTH` (**Can Enable or Disable Trusted Authentication**) privilege is required. #### Important point to note All options in the token creation APIs that define user access to data in ThoughtSpot will take effect during token creation, not when the token is used for authentication. For example, `auto_create:true` will create the user when the authentication token is created. + +### Parameters + +| Name | Type | +|------------- | ------------- | +| **getFullAccessTokenRequest** | [**GetFullAccessTokenRequest**](GetFullAccessTokenRequest.md) + +### Return type + +[**Token**](Token.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Bearer auth token creation successful. | - | +| **400** | Invalid request. | - | +| **401** | Unauthorized access. | - | +| **403** | Forbidden access. | - | +| **500** | Unexpected error | - | + + +# **getNLInstructions** +> EurekaGetNLInstructionsResponse getNLInstructions(getNLInstructionsRequest) + + + + Version: 10.15.0.cl or later Retrieves existing natural language (NL) instructions configured for a specific data model. These instructions guide the AI system in understanding data context and generating more accurate responses. Requires `CAN_USE_SPOTTER` privilege, at least view access on the data model, and a bearer token corresponding to the org where the data model exists. #### Usage guidelines The request must include: - `data_source_identifier`: the unique ID of the data model to retrieve instructions for If the request is successful, the API returns: - `nl_instructions_info`: an array of instruction objects, each containing: - `instructions`: the configured text instructions for AI processing - `scope`: the scope of the instruction — currently only `GLOBAL` is supported #### Instructions scope - **GLOBAL**: Instructions that apply globally across the system on the given data-model (currently only global instructions are supported) #### Error responses | Code | Description | |------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| | 401 | Unauthorized — authentication token is missing, expired, or invalid. | | 403 | Forbidden — the authenticated user does not have `CAN_USE_SPOTTER` privilege, lacks view access on the data model, or the bearer token does not correspond to the org where the data model exists. | > ###### Note: > > - To use this API, the user needs at least view access on the data model, and must use the bearer token corresponding to the org where the data model exists. > - This endpoint is currently in Beta. Breaking changes may be introduced before the endpoint is made Generally Available. > - Available from version 10.15.0.cl and later. > - This endpoint requires Spotter — please contact ThoughtSpot Support to enable Spotter on your cluster. > - Use this API to review currently configured instructions before modifying them with `setNLInstructions`. + +### Parameters + +| Name | Type | +|------------- | ------------- | +| **getNLInstructionsRequest** | [**GetNLInstructionsRequest**](GetNLInstructionsRequest.md) + +### Return type + +[**EurekaGetNLInstructionsResponse**](EurekaGetNLInstructionsResponse.md) + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Common successful response | - | +| **201** | Common error response | - | +| **400** | Operation failed | - | +| **401** | Unauthorized access. | - | +| **403** | Forbidden access. | - | +| **500** | Operation failed | - | + + +# **getObjectAccessToken** +> Token getObjectAccessToken(getObjectAccessTokenRequest) + + + + Version: 9.0.0.cl or later Generates an authentication token that provides access to a specific metadata object. This object list is intersected with the list of objects the user is allowed to access via group membership. For more information, see [Object security](https://docs.thoughtspot.com/cloud/latest/security-data-object#object_security). #### Usage guidelines You can generate a token for a user by providing a `username` and `password`, or by using the `secret_key` generated for your instance. To generate a `secret_key`, the administrator must enable [Trusted authentication](https://developers.thoughtspot.com/docs/trusted-auth-secret-key) in the **Develop** > **Customizations** > **Security Settings** page. **Note**: * When both `password` and `secret_key` are included in the API request, `password` takes precedence. * If [Multi-Factor Authentication (MFA)](https://docs.thoughtspot.com/cloud/latest/authentication-local-mfa) is enabled on your instance, the API login request with `username` and `password` returns an error. You can switch to token-based authentication with `secret_key` or contact ThoughtSpot Support for assistance. The token obtained from ThoughtSpot is valid for 5 minutes by default. You can configure the token expiration time as required. #### Just-in-time provisioning For [just-in-time user creation and provisioning](https://developers.thoughtspot.com/docs/just-in-time-provisioning), specify the following attributes in the API request: * `auto_create` * `username` * `display_name` * `email` * `group_identifiers` Set `auto_create` to `true` if the user is not available in ThoughtSpot. If the user already exists in ThoughtSpot and the `auto_create` parameter is set to `true`, user properties such as display name, email, and group assignment will be updated. To add a new user and assign privileges, the `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege is required. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled, the `CONTROL_TRUSTED_AUTH`(**Can Enable or Disable Trusted Authentication**) privilege is required. #### Important point to note All options in the token creation APIs that define user access to data in ThoughtSpot will take effect during token creation, not when the token is used for authentication. For example, `auto_create:true` will create the user when the authentication token is created. + +### Parameters + +| Name | Type | +|------------- | ------------- | +| **getObjectAccessTokenRequest** | [**GetObjectAccessTokenRequest**](GetObjectAccessTokenRequest.md) + +### Return type + +[**Token**](Token.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Bearer auth token creation successful. | - | +| **400** | Invalid request. | - | +| **401** | Unauthorized access. | - | +| **403** | Forbidden access. | - | +| **500** | Unexpected error | - | + + +# **getRelevantQuestions** +> EurekaGetRelevantQuestionsResponse getRelevantQuestions(getRelevantQuestionsRequest) + + + + Version: 10.13.0.cl or later Breaks down a natural language query into a series of smaller analytical sub-questions, each mapped to a relevant data source. Requires `CAN_USE_SPOTTER` privilege and at least view-level access to the referenced metadata objects. #### Usage guidelines The request must include: - `query`: the natural language question to decompose into analytical sub-questions - `metadata_context`: at least one of the following context identifiers to guide question generation: - `conversation_identifier` — an existing conversation session ID - `answer_identifiers` — a list of Answer GUIDs - `liveboard_identifiers` — a list of Liveboard GUIDs - `data_source_identifiers` — a list of data source GUIDs Optional parameters for refining the output: - `ai_context`: additional context to improve response quality - `content` — supplementary text or CSV data as string input - `instructions` — custom text instructions for the AI system - `limit_relevant_questions`: maximum number of questions to return (default: `5`) - `bypass_cache`: if `true`, forces fresh computation instead of returning cached results If the request is successful, the API returns a list of relevant analytical questions, each containing: - `query`: the generated sub-question - `data_source_identifier`: the unique ID of the data source the question targets - `data_source_name`: the display name of the corresponding data source #### Error responses | Code | Description | |------|---------------------------------------------------------------------------------------------------------------------------------------| | 401 | Unauthorized — authentication token is missing, expired, or invalid. | | 403 | Forbidden — the authenticated user does not have `CAN_USE_SPOTTER` privilege or lacks view access to the referenced metadata objects. | > ###### Note: > * This endpoint is currently in Beta. Breaking changes may be introduced before the endpoint is made Generally Available. > * This endpoint requires Spotter - please contact ThoughtSpot support to enable Spotter on your cluster. + +### Parameters + +| Name | Type | +|------------- | ------------- | +| **getRelevantQuestionsRequest** | [**GetRelevantQuestionsRequest**](GetRelevantQuestionsRequest.md) + +### Return type + +[**EurekaGetRelevantQuestionsResponse**](EurekaGetRelevantQuestionsResponse.md) + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Common successful response | - | +| **201** | Common error response | - | +| **400** | Operation failed | - | +| **401** | Unauthorized access. | - | +| **403** | Forbidden access. | - | +| **500** | Operation failed | - | + + +# **getSystemConfig** +> SystemConfig getSystemConfig() + + + + Version: 9.0.0.cl or later Retrieves the current configuration details of the cluster. If the request is successful, the API returns a list configuration settings applied on the cluster. Requires `ADMINISTRATION`(**Can administer ThoughtSpot**) privilege to view these complete configuration settings of the cluster. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `SYSTEM_INFO_ADMINISTRATION` (**Can view system activities**) privilege is required. This API does not require any parameters to be passed in the request. + +### Parameters +This endpoint does not need any parameter. + +### Return type + +[**SystemConfig**](SystemConfig.md) + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Cluster config information. | - | +| **400** | Invalid request. | - | +| **401** | Unauthorized access. | - | +| **403** | Forbidden access. | - | +| **500** | Unexpected error | - | + + +# **getSystemInformation** +> SystemInfo getSystemInformation() + + + + Version: 9.0.0.cl or later Gets system information such as the release version, locale, time zone, deployment environment, date format, and date time format of the cluster. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privileges. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `SYSTEM_INFO_ADMINISTRATION` (**Can view system activities**) privilege is required. This API does not require any parameters to be passed in the request. + +### Parameters +This endpoint does not need any parameter. + +### Return type + +[**SystemInfo**](SystemInfo.md) + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Cluster information. | - | +| **400** | Invalid request. | - | +| **401** | Unauthorized access. | - | +| **403** | Forbidden access. | - | +| **500** | Unexpected error | - | + + +# **getSystemOverrideInfo** +> SystemOverrideInfo getSystemOverrideInfo() + + + + Version: 9.2.0.cl or later Gets a list of configuration overrides applied on the cluster. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `APPLICATION_ADMINISTRATION` (**Can manage application settings**) privilege is required. This API does not require any parameters to be passed in the request. + +### Parameters +This endpoint does not need any parameter. + +### Return type + +[**SystemOverrideInfo**](SystemOverrideInfo.md) + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Cluster configuration which can be overridden. | - | +| **400** | Invalid request. | - | +| **401** | Unauthorized access. | - | +| **403** | Forbidden access. | - | +| **500** | Unexpected error | - | + + +# **importMetadataTML** +> List<Object> importMetadataTML(importMetadataTMLRequest) + + + + Version: 9.0.0.cl or later Imports [TML](https://docs.thoughtspot.com/cloud/latest/tml) files into ThoughtSpot. Requires `DATAMANAGEMENT` (**Can manage data**) or `ADMINISTRATION` (**Can administer ThoughtsSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the following Data control privileges may be required: - `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) - `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` (**Can manage data models**) #### Usage guidelines * Import all related objects in a single TML Import API call. For example, Tables that use the same Connection object and Worksheets connected to these Tables. * Include the `fqn` property to distinguish objects that have the same name. For example, if you have multiple Connections or Worksheets with the same name on ThoughtSpot and the Connection or Worksheet referenced in your TML file does not have a unique name to distinguish, it may result in invalid object references. Adding `fqn` helps ThoughtSpot differentiate a Table from another with the same name. We recommend [exporting TML with FQNs](#/http/api-endpoints/metadata/export-metadata-tml) and using these during the import operation. * You can upload multiple TML files at a time. If you import a Worksheet along with Liveboards, Answers, and other dependent objects in a single API call, the imported objects will be immediately available for use. When you import only a Worksheet object, it may take some time for the Worksheet to become available in the ThoughtSpot system. Please wait for a few minutes, and then proceed to create an Answer and Liveboard from the newly imported Worksheet. For more information, see [TML Documentation](https://developers.thoughtspot.com/docs/tml#_import_a_tml). + +### Parameters + +| Name | Type | +|------------- | ------------- | +| **importMetadataTMLRequest** | [**ImportMetadataTMLRequest**](ImportMetadataTMLRequest.md) + +### Return type + +**List<Object>** + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Import metadata objects using specified TMLs is successful. | - | +| **400** | Invalid request. | - | +| **401** | Unauthorized access. | - | +| **403** | Forbidden access. | - | +| **500** | Unexpected error | - | + + +# **importMetadataTMLAsync** +> ImportEPackAsyncTaskStatus importMetadataTMLAsync(importMetadataTMLAsyncRequest) + + + + Version: 10.4.0.cl or later Schedules a task to import [TML](https://docs.thoughtspot.com/cloud/latest/tml) files into ThoughtSpot. You can use this API endpoint to process TML objects asynchronously when importing TMLs of large and complex metadata objects into ThoughtSpot. Unlike the synchronous import TML operation, the API processes TML data in the background and returns a task ID, which can be used to check the status of the import task via `/api/rest/2.0/metadata/tml/async/status` API endpoint. Requires `DATAMANAGEMENT` (**Can manage data**) or `ADMINISTRATION` (**Can administer ThoughtsSpot**) privilege, and edit access to the TML objects. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the following Data control privileges may be required: - `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) - `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` (**Can manage data models**) #### Usage guidelines See [Async TML API Documentation](https://developers.thoughtspot.com/docs/tml#_import_tml_objects_asynchronously) for usage guidelines. + +### Parameters + +| Name | Type | +|------------- | ------------- | +| **importMetadataTMLAsyncRequest** | [**ImportMetadataTMLAsyncRequest**](ImportMetadataTMLAsyncRequest.md) + +### Return type + +[**ImportEPackAsyncTaskStatus**](ImportEPackAsyncTaskStatus.md) + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Async TML Import Task submitted successfully. | - | +| **400** | Invalid request. | - | +| **401** | Unauthorized access. | - | +| **403** | Forbidden access. | - | +| **500** | Unexpected error | - | + + +# **importUserGroups** +> ImportUserGroupsResponse importUserGroups(importUserGroupsRequest) + + + + Version: 9.0.0.cl or later Imports group objects from external databases into ThoughtSpot. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `GROUP_ADMINISTRATION` (**Can manage groups**) privilege is required. During the import operation: * If the specified group is not available in ThoughtSpot, it will be added to ThoughtSpot. * If `delete_unspecified_groups` is set to `true`, the groups not specified in the API request, excluding administrator and system user groups, are deleted. * If the specified groups are already available in ThoughtSpot, the object properties of these groups are modified and synchronized as per the input data in the API request. A successful API call returns the object that represents the changes made in the ThoughtSpot system. + +### Parameters + +| Name | Type | +|------------- | ------------- | +| **importUserGroupsRequest** | [**ImportUserGroupsRequest**](ImportUserGroupsRequest.md) + +### Return type + +[**ImportUserGroupsResponse**](ImportUserGroupsResponse.md) + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Import user groups operation successful. | - | +| **400** | Invalid request. | - | +| **401** | Unauthorized access. | - | +| **403** | Forbidden access. | - | +| **500** | Unexpected error | - | + + +# **importUsers** +> ImportUsersResponse importUsers(importUsersRequest) + + + + Version: 9.0.0.cl or later Imports user data from external databases into ThoughtSpot. During the user import operation: * If the specified users are not available in ThoughtSpot, the users are created and assigned a default password. Defining a `default_password` in the API request is optional. * If `delete_unspecified_users` is set to `true`, the users not specified in the API request, excluding the `tsadmin`, `guest`, `system` and `su` users, are deleted. * If the specified user objects are already available in ThoughtSpot, the object properties are updated and synchronized as per the input data in the API request. A successful API call returns the object that represents the changes made in the ThoughtSpot system. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `USER_ADMINISTRATION` (**Can manage users**) privilege is required. + +### Parameters + +| Name | Type | +|------------- | ------------- | +| **importUsersRequest** | [**ImportUsersRequest**](ImportUsersRequest.md) + +### Return type + +[**ImportUsersResponse**](ImportUsersResponse.md) + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Import users operation successful. | - | +| **400** | Invalid request. | - | +| **401** | Unauthorized access. | - | +| **403** | Forbidden access. | - | +| **500** | Unexpected error | - | + + +# **login** +> login(loginRequest) + + + + Version: 9.0.0.cl or later Creates a login session for a ThoughtSpot user with Basic authentication. In Basic authentication method, REST clients log in to ThoughtSpot using `username` and `password` attributes. On a multi-tenant cluster with Orgs, users can pass the ID of the Org in the API request to log in to a specific Org context. **Note**: If Multi-Factor Authentication (MFA) is enabled on your instance, the API login request with basic authentication (`username` and `password` ) returns an error. Contact ThoughtSpot Support for assistance. A successful login returns a session cookie that can be used in your subsequent API requests. + +### Parameters + +| Name | Type | +|------------- | ------------- | +| **loginRequest** | [**LoginRequest**](LoginRequest.md) + +### Return type + +null (empty response body) + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **204** | User login successful. | - | +| **400** | Invalid request. | - | +| **401** | Unauthorized access. | - | +| **403** | Forbidden access. | - | +| **500** | Unexpected error | - | + + +# **logout** +> logout() + + + + Version: 9.0.0.cl or later Logs out a user from their current session. + +### Parameters +This endpoint does not need any parameter. + +### Return type + +null (empty response body) + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **204** | User logout successful. | - | +| **400** | Invalid request. | - | +| **401** | Unauthorized access. | - | +| **403** | Forbidden access. | - | +| **500** | Unexpected error | - | + + +# **manageObjectPrivilege** +> manageObjectPrivilege(manageObjectPrivilegeRequest) + + + + Version: 26.3.0.cl or later This API allows the addition or deletion of object level privileges for a set of users and groups, on a set of metadata objects. It provides users to access certain features based on privilege based access control. #### Usage guidelines - Specify the `operation`. The supported operations are: `ADD`, `REMOVE`. - Specify the type of the objects on which the object privileges are being provided in `metadata_type`. Only `LOGICAL_TABLE` metadata type is supported for now. It may be extended for other metadata types in future. - Specify the list of object privilege types in the `object_privilege_types` array. The supported object privilege types are: `SPOTTER_COACHING_PRIVILEGE`. - Specify the identifiers (either GUID or name) for the metadata objects in the `metadata_identifiers` array. - Specify the `type` (`USER` or `USER_GROUP`) and `identifier` (either GUID or name) of the principals to which you want to apply the given operation and given object privileges in the `principals` array. - Ensure using correct Authorization Bearer Token corresponding to specific user & org. #### Example request ```json { \"operation\": \"operation-type\", \"metadata_type\": \"metadata-type\", \"object_privilege_types\": [\"privilege-type-1\", \"privilege-type-2\"], \"metadata_identifiers\": [\"metadata-guid-or-name-1\", \"metadata-guid-or-name-1\"], \"principals\": [ { \"type\": \"type-1\", \"identifier\": \"principal-guid-or-name-1\" }, { \"type\": \"type-2\", \"identifier\": \"principal-guid-or-name-2\" } ] } ``` > ###### Note: > * Only admin users, users with edit access and users with coaching privilege on a given data-model can add or remove principals related to SPOTTER_COACHING_PRIVILEGE + +### Parameters + +| Name | Type | +|------------- | ------------- | +| **manageObjectPrivilegeRequest** | [**ManageObjectPrivilegeRequest**](ManageObjectPrivilegeRequest.md) + +### Return type + +null (empty response body) + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **204** | Object privileges added/removed successfully | - | +| **400** | Invalid request | - | +| **401** | Unauthorized access | - | +| **403** | Forbidden access | - | +| **500** | Unexpected error | - | + + +# **parameterizeMetadata** +> parameterizeMetadata(parameterizeMetadataRequest) + + + + Parameterize fields in metadata objects. Version: 10.9.0.cl or later **Note:** This API endpoint is deprecated and will be removed from ThoughtSpot in a future release. Use [POST /api/rest/2.0/metadata/parameterize-fields](/api/rest/2.0/metadata/parameterize-fields) instead. Allows parameterizing fields in metadata objects in ThoughtSpot. Requires appropriate permissions to modify the metadata object. The API endpoint allows parameterizing the following types of metadata objects: * Logical Tables * Connections * Connection Configs For a Logical Table the field type must be `ATTRIBUTE` and field name can be one of: * databaseName * schemaName * tableName For a Connection or Connection Config, the field type is always `CONNECTION_PROPERTY`. In this case, field_name specifies the exact property of the Connection or Connection Config that needs to be parameterized. For Connection Config, the only supported field name is: * impersonate_user + +### Parameters + +| Name | Type | +|------------- | ------------- | +| **parameterizeMetadataRequest** | [**ParameterizeMetadataRequest**](ParameterizeMetadataRequest.md) + +### Return type + +null (empty response body) + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **204** | Parameterize successful. | - | +| **400** | Invalid request. | - | +| **401** | Unauthorized access. | - | +| **403** | Forbidden access. | - | +| **500** | Unexpected error | - | + + +# **parameterizeMetadataFields** +> parameterizeMetadataFields(parameterizeMetadataFieldsRequest) + + + + Parameterize multiple fields of metadata objects. For example [schemaName, databaseName] for LOGICAL_TABLE. Version: 26.5.0.cl or later Allows parameterizing multiple fields of metadata objects in ThoughtSpot. For example, you can parameterize [schemaName, databaseName] for LOGICAL_TABLE. Requires appropriate permissions to modify the metadata object. The API endpoint allows parameterizing the following types of metadata objects: * Logical Tables * Connections * Connection Configs For a Logical Table, the field type must be `ATTRIBUTE` and field names can include: * databaseName * schemaName * tableName For a Connection or Connection Config, the field type is always `CONNECTION_PROPERTY`. In this case, field_names specifies the exact properties of the Connection or Connection Config that need to be parameterized. For Connection Config, supported field names include: * impersonate_user You can parameterize multiple fields at once by providing an array of field names. + +### Parameters + +| Name | Type | +|------------- | ------------- | +| **parameterizeMetadataFieldsRequest** | [**ParameterizeMetadataFieldsRequest**](ParameterizeMetadataFieldsRequest.md) + +### Return type + +null (empty response body) + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **204** | Parameterize successful. | - | +| **400** | Invalid request. | - | +| **401** | Unauthorized access. | - | +| **403** | Forbidden access. | - | +| **500** | Unexpected error | - | + + +# **publishMetadata** +> publishMetadata(publishMetadataRequest) + + + + Version: 26.5.0.cl or later Allows publishing metadata objects across organizations in ThoughtSpot. Requires ADMINISTRATION role and TENANT scope. The API endpoint allows publishing the following types of metadata objects: * Liveboards * Answers * Logical Tables This API will essentially share the objects along with it's dependencies to the org admins of the orgs to which it is being published. + +### Parameters + +| Name | Type | +|------------- | ------------- | +| **publishMetadataRequest** | [**PublishMetadataRequest**](PublishMetadataRequest.md) + +### Return type + +null (empty response body) + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **204** | Publishing metadata objects is successful. | - | +| **400** | Invalid request. | - | +| **401** | Unauthorized access. | - | +| **403** | Forbidden access. | - | +| **500** | Unexpected error | - | + + +# **putVariableValues** +> putVariableValues(identifier, putVariableValuesRequest) + + + + Update values for a variable Version: 26.4.0.cl or later Allows updating values for a specific variable in ThoughtSpot. Requires ADMINISTRATION role. The CAN_MANAGE_VARIABLES permission allows you to manage Formula Variables in the current organization scope. The API endpoint allows: * Adding new values to the variable * Replacing existing values * Deleting values from the variable * Resetting all values When updating variable values, you need to specify: * The variable identifier (ID or name) * The values to add/replace/remove * The operation to perform (ADD, REPLACE, REMOVE, RESET) Behaviour based on operation type: * ADD - Adds values to the variable if this is a list type variable, else same as replace. * REPLACE - Replaces all values of a given set of constraints with the current set of values. * REMOVE - Removes any values which match the set of conditions of the variables if this is a list type variable, else clears value. * RESET - Removes all constraints for the given variable, scope is ignored + +### Parameters + +| Name | Type | +|------------- | ------------- | +| **identifier** | **String** +| **putVariableValuesRequest** | [**PutVariableValuesRequest**](PutVariableValuesRequest.md) + +### Return type + +null (empty response body) + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **204** | Variable values updated successfully. | - | +| **400** | Invalid request. | - | +| **401** | Unauthorized access. | - | +| **403** | Forbidden access. | - | +| **500** | Unexpected error | - | + + +# **queryGetDecomposedQuery** +> EurekaDecomposeQueryResponse queryGetDecomposedQuery(queryGetDecomposedQueryRequest) + + + + Version: 10.7.0.cl or later **Deprecated** — Use `getRelevantQuestions` instead (available from 10.13.0.cl). Breaks down a topical or goal-oriented natural language question into smaller, actionable analytical sub-questions, each mapped to a relevant data source for independent execution. Requires `CAN_USE_SPOTTER` privilege and at least view-level access to the referenced metadata objects. #### Usage guidelines The request accepts the following parameters: - `nlsRequest`: contains the user `query` to decompose, along with optional `instructions` and `bypassCache` flag - `worksheetIds`: list of data source identifiers to scope the decomposition - `answerIds`: list of Answer GUIDs whose data guides the response - `liveboardIds`: list of Liveboard GUIDs whose data guides the response - `conversationId`: an existing conversation session ID for context continuity - `content`: supplementary text or CSV data to improve response quality - `maxDecomposedQueries`: maximum number of sub-questions to return (default: `5`) If the request is successful, the API returns a `decomposedQueryResponse` containing a list of `decomposedQueries`, each with: - `query`: the generated analytical sub-question - `worksheetId`: the unique ID of the data source the question targets - `worksheetName`: the display name of the corresponding data source #### Error responses | Code | Description | |------|---------------------------------------------------------------------------------------------------------------------------------------| | 401 | Unauthorized — authentication token is missing, expired, or invalid. | | 403 | Forbidden — the authenticated user does not have `CAN_USE_SPOTTER` privilege or lacks view access to the referenced metadata objects. | > ###### Note: > * This endpoint is deprecated since 10.13.0.cl. Use `getRelevantQuestions` for new integrations. > * This endpoint is currently in Beta. Breaking changes may be introduced before the endpoint is made Generally Available. > * This endpoint requires Spotter — please contact ThoughtSpot support to enable Spotter on your cluster. + +### Parameters + +| Name | Type | +|------------- | ------------- | +| **queryGetDecomposedQueryRequest** | [**QueryGetDecomposedQueryRequest**](QueryGetDecomposedQueryRequest.md) + +### Return type + +[**EurekaDecomposeQueryResponse**](EurekaDecomposeQueryResponse.md) + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Common successful response | - | +| **201** | Common error response | - | +| **400** | Operation failed | - | +| **401** | Unauthorized access. | - | +| **403** | Forbidden access. | - | +| **500** | Operation failed | - | + + +# **resetUserPassword** +> resetUserPassword(resetUserPasswordRequest) + + + + Version: 9.0.0.cl or later Resets the password of a user account. Administrators can reset password on behalf of a user. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `USER_ADMINISTRATION` (**Can manage users**) privilege is required. + +### Parameters + +| Name | Type | +|------------- | ------------- | +| **resetUserPasswordRequest** | [**ResetUserPasswordRequest**](ResetUserPasswordRequest.md) + +### Return type + +null (empty response body) + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **204** | User password reset operation successful. | - | +| **400** | Invalid request. | - | +| **401** | Unauthorized access. | - | +| **403** | Forbidden access. | - | +| **500** | Unexpected error | - | + + +# **revertCommit** +> RevertResponse revertCommit(commitId, revertCommitRequest) + + + + Version: 9.2.0.cl or later Reverts TML objects to a previous commit specified in the API request. Requires at least edit access to objects. In the API request, specify the `commit_id`. If the branch name is not specified in the request, the API will consider the default branch configured on your instance. By default, the API reverts all objects. If the revert operation fails for one of the objects provided in the commit, the API returns an error and does not revert any object. For more information, see [Git integration documentation](https://developers.thoughtspot.com/docs/git-integration). + +### Parameters + +| Name | Type | +|------------- | ------------- | +| **commitId** | **String** +| **revertCommitRequest** | [**RevertCommitRequest**](RevertCommitRequest.md) + +### Return type + +[**RevertResponse**](RevertResponse.md) + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Reverted the object to the commit point specified | - | +| **400** | Invalid request. | - | +| **401** | Unauthorized access. | - | +| **403** | Forbidden access. | - | +| **500** | Unexpected error | - | + + +# **revokeRefreshTokens** +> RevokeRefreshTokensResponse revokeRefreshTokens(connectionIdentifier, revokeRefreshTokensRequest) + + + + Version: 26.2.0.cl or later Revokes OAuth refresh tokens for users who no longer require access to a data warehouse connection. When a token is revoked, the affected user's session for that connection is terminated, and they must re-authenticate to regain access. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) or `DATAMANAGEMENT` (**Can manage data**) privileges. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on the ThoughtSpot instance, users with `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) privilege can also make API requests to revoke tokens for connection users. #### Usage guidelines You can specify different combinations of identifiers to control which refresh tokens are revoked. - **connection_identifier**: Revokes refresh tokens for all users of the connection, except the connection author. - **connection_identifier** and **user_identifiers**: Revokes refresh tokens only for the users specified in the request. If the name or ID of the connection author is included in the request, their token will also be revoked. - **connection_identifier** and **configuration_identifiers**: Revokes refresh tokens for all users on the specified configurations, except the configuration author. - **connection_identifier**, **configuration_identifiers**, and **user_identifiers**: Revokes refresh tokens for the specified users on the specified configurations. - **connection_identifier** and **org_identifiers**: Revokes refresh tokens for the specified Orgs. Applicable only for published connections. - **connection_identifier**, **org_identifiers**, and **user_identifiers**: Revokes refresh tokens for the specified users in the specified Orgs. Applicable only for published connections. **NOTE**: The `org_identifiers` parameter is only applicable for published connections. Using this parameter for unpublished connections will result in an error. Ensure that the connections are published before making the API request. + +### Parameters + +| Name | Type | +|------------- | ------------- | +| **connectionIdentifier** | **String** +| **revokeRefreshTokensRequest** | [**RevokeRefreshTokensRequest**](RevokeRefreshTokensRequest.md) + +### Return type + +[**RevokeRefreshTokensResponse**](RevokeRefreshTokensResponse.md) + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Token(s) successfully revoked. | - | +| **400** | Invalid request. | - | +| **401** | Unauthorized access. | - | +| **403** | Forbidden access. | - | +| **404** | Object not found | - | +| **409** | Conflict | - | +| **500** | Unexpected error | - | + + +# **revokeToken** +> revokeToken(revokeTokenRequest) + + + + Version: 9.0.0.cl or later Revokes the authentication token issued for current user session. The token of your current session expires when you make a call to the `/api/rest/2.0/auth/token/revoke` endpoint. the users will not be able to access ThoughtSpot objects until a new token is obtained. To restart your session, request for a new token from ThoughtSpot. See [Get Full Access Token](#/http/api-endpoints/authentication/get-full-access-token). + +### Parameters + +| Name | Type | +|------------- | ------------- | +| **revokeTokenRequest** | [**RevokeTokenRequest**](RevokeTokenRequest.md) + +### Return type + +null (empty response body) + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **204** | Token successfully revoked. | - | +| **400** | Invalid request. | - | +| **401** | Unauthorized access. | - | +| **403** | Forbidden access. | - | +| **500** | Unexpected error | - | + + +# **searchAuthSettings** +> SearchAuthSettingsResponse searchAuthSettings(searchAuthSettingsRequest) + + + + Version: 26.6.0.cl or later Returns the authentication configuration for the specified auth type at cluster and org level. Currently supports `TRUSTED_AUTH`. #### Required privileges Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) or `CONTROL_TRUSTED_AUTH` (**Can Enable or Disable Trusted Authentication**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled, the `CONTROL_TRUSTED_AUTH` privilege is required. #### Usage guidelines Use `scope` to control which level of settings are returned: - `CLUSTER` — Returns cluster-level authentication status and access tokens. Accessible only from the Primary Org. - `ORG` — Returns org-level authentication status and access tokens for the current Org. Requires the per-Org authentication feature to be enabled on your instance. - If `scope` is omitted, both cluster and org-level settings are returned based on the caller's org context and feature availability. The `access_tokens` array in `cluster_preferences` or `org_preferences` is omitted when no token is configured at that level. **Note**: Access tokens returned in the response are sensitive credentials. Treat them with the same care as passwords. + +### Parameters + +| Name | Type | +|------------- | ------------- | +| **searchAuthSettingsRequest** | [**SearchAuthSettingsRequest**](SearchAuthSettingsRequest.md) + +### Return type + +[**SearchAuthSettingsResponse**](SearchAuthSettingsResponse.md) + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Authentication settings retrieved successfully. | - | +| **400** | Invalid request. | - | +| **401** | Unauthorized access. | - | +| **403** | Forbidden access. | - | +| **500** | Unexpected error | - | + + +# **searchCalendars** +> List<CalendarResponse> searchCalendars(searchCalendarsRequest) + + + + Version: 10.12.0.cl or later Gets a list of [custom calendars](https://docs.thoughtspot.com/cloud/latest/connections-cust-cal). Requires `DATAMANAGEMENT` (**Can manage data**) or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your ThoughtSpot instance, the `CAN_MANAGE_CUSTOM_CALENDAR` (**Can manage custom calendars**) privilege is required. #### Usage guidelines By default, the API returns a list of custom calendars for all connection objects. To retrieve custom calendar details for a particular connection, specify the connection ID. You can also use other search parameters such as `name_pattern` and `sort_options` as search filters. The `name_pattern` parameter filters and returns only those objects that match the specified pattern. Use `%` as a wildcard for pattern matching. + +### Parameters + +| Name | Type | +|------------- | ------------- | +| **searchCalendarsRequest** | [**SearchCalendarsRequest**](SearchCalendarsRequest.md) + +### Return type + +[**List<CalendarResponse>**](CalendarResponse.md) + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Custom calendar fetched successfully. | - | +| **400** | Invalid request. | - | +| **401** | Unauthorized access. | - | +| **403** | Forbidden access. | - | +| **500** | Unexpected error | - | + + +# **searchChannelHistory** +> SearchChannelHistoryResponse searchChannelHistory(searchChannelHistoryRequest) + + + + Version: 26.4.0.cl or later Searches delivery history for communication channels such as webhooks. Returns channel-level delivery status for each job execution record. Use this to monitor channel health and delivery success rates across events. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) or `DEVELOPER` (**Has developer privilege**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, users with `CAN_MANAGE_WEBHOOKS` (**Can manage webhooks**) privilege are also authorized to perform this action. **NOTE**: When `channel_type` is `WEBHOOK`, the following constraints apply: - `job_ids`, `channel_identifiers`, and `events` each accept at most one element. - When `job_ids` is provided, it is used as the sole lookup key and other filter fields are ignored. - When `job_ids` is not provided, `channel_identifiers` and `events` are both required, each containing exactly one element. - Records older than the configured retention period are not returned. - Use `start_epoch_time_in_millis` and/or `end_epoch_time_in_millis` to narrow results to a specific time window. + +### Parameters + +| Name | Type | +|------------- | ------------- | +| **searchChannelHistoryRequest** | [**SearchChannelHistoryRequest**](SearchChannelHistoryRequest.md) + +### Return type + +[**SearchChannelHistoryResponse**](SearchChannelHistoryResponse.md) + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Channel status logs retrieved successfully. | - | +| **400** | Invalid request. | - | +| **401** | Unauthorized access. | - | +| **403** | Forbidden access. | - | +| **500** | Unexpected error | - | + + +# **searchCollections** +> CollectionSearchResponse searchCollections(searchCollectionsRequest) + + + + Version: 26.4.0.cl or later Gets a list of collections available in ThoughtSpot. To get details of a specific collection, specify the collection GUID or name. You can also filter the API response based on the collection name pattern, author, and other criteria. #### Search options * **name_pattern**: Use '%' as a wildcard character to match collection names * **collection_identifiers**: Search for specific collections by their GUIDs or names * **include_metadata**: When set to `true`, includes the metadata objects within each collection in the response **NOTE**: If the API returns an empty list, consider increasing the value of the `record_size` parameter. To search across all available collections, set `record_size` to `-1`. + +### Parameters + +| Name | Type | +|------------- | ------------- | +| **searchCollectionsRequest** | [**SearchCollectionsRequest**](SearchCollectionsRequest.md) + +### Return type + +[**CollectionSearchResponse**](CollectionSearchResponse.md) + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Successfully retrieved list of collections | - | +| **400** | Invalid request. | - | +| **401** | Unauthorized access. | - | +| **403** | Forbidden access. | - | +| **500** | Unexpected error | - | + + +# **searchCommits** +> List<CommitHistoryResponse> searchCommits(searchCommitsRequest) + + + + Version: 9.2.0.cl or later Gets a list of commits for a given metadata object. Requires `DATAMANAGEMENT` (**Can manage data**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance on your instance, the `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` (**Can manage data models**) privilege and edit access to the metadata objects. + +### Parameters + +| Name | Type | +|------------- | ------------- | +| **searchCommitsRequest** | [**SearchCommitsRequest**](SearchCommitsRequest.md) + +### Return type + +[**List<CommitHistoryResponse>**](CommitHistoryResponse.md) + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Commit history of the metadata object | - | +| **400** | Invalid request. | - | +| **401** | Unauthorized access. | - | +| **403** | Forbidden access. | - | +| **500** | Unexpected error | - | + + +# **searchCommunicationChannelPreferences** +> CommunicationChannelPreferencesResponse searchCommunicationChannelPreferences(searchCommunicationChannelPreferencesRequest) + + + + Version: 10.14.0.cl or later Fetch communication channel preferences. - Use `cluster_preferences` to fetch the default preferences for your ThoughtSpot application instance. - If your instance has [Orgs](https://docs.thoughtspot.com/cloud/latest/orgs-overview), use `org_preferences` to fetch any Org-specific preferences that override the defaults. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) or `DEVELOPER` (**Has developer privilege**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, users with `APPLICATION_ADMINISTRATION` (**Can manage application settings**) privilege are also authorized to perform this action. + +### Parameters + +| Name | Type | +|------------- | ------------- | +| **searchCommunicationChannelPreferencesRequest** | [**SearchCommunicationChannelPreferencesRequest**](SearchCommunicationChannelPreferencesRequest.md) + +### Return type + +[**CommunicationChannelPreferencesResponse**](CommunicationChannelPreferencesResponse.md) + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Communication channel preferences retrieved successfully. | - | +| **400** | Invalid request. | - | +| **401** | Unauthorized access. | - | +| **403** | Forbidden access. | - | +| **500** | Unexpected error | - | + + +# **searchConfig** +> List<RepoConfigObject> searchConfig(searchConfigRequest) + + + + Version: 9.2.0.cl or later Gets Git repository connections configured on the ThoughtSpot instance. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance on your instance, the `CAN_SETUP_VERSION_CONTROL` (**Can set up version control**) privilege. + +### Parameters + +| Name | Type | +|------------- | ------------- | +| **searchConfigRequest** | [**SearchConfigRequest**](SearchConfigRequest.md) + +### Return type + +[**List<RepoConfigObject>**](RepoConfigObject.md) + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Details of local repository configuration | - | +| **400** | Invalid request. | - | +| **401** | Unauthorized access. | - | +| **403** | Forbidden access. | - | +| **500** | Unexpected error | - | + + +# **searchConnection** +> List<SearchConnectionResponse> searchConnection(searchConnectionRequest) + + + + Version: 9.2.0.cl or later Gets connection objects. Requires `DATAMANAGEMENT` (**Can manage data**) or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) privilege is required. - To get a list of all connections available in the ThoughtSpot system, send the API request without any attributes in the request body. - To get the connection objects for a specific type of data warehouse, specify the type in `data_warehouse_types`. - To fetch details of a connection object, specify the connection object GUID or name. The `name_pattern` attribute allows passing partial text with `%` for a wildcard match. - To get details of the database, schemas, tables, or columns from a data connection object, specify `data_warehouse_object_type`. - To get a specific database, schema, table, or column from a connection object, define the object type in `data_warehouse_object_type` and object properties in the `data_warehouse_objects` array. For example, to search for a column, you must pass the database, schema, and table names in the API request. Note that in the following example, object properties are set in a hierarchical order (`database` > `schema` > `table` > `column`). ``` { \"connections\": [ { \"identifier\": \"b9d1f2ef-fa65-4a4b-994e-30fa2d57b0c2\", \"data_warehouse_objects\": [ { \"database\": \"NEBULADEV\", \"schema\": \"INFORMATION_SCHEMA\", \"table\": \"APPLICABLE_ROLES\", \"column\": \"ROLE_NAME\" } ] } ], \"data_warehouse_object_type\": \"COLUMN\" } ``` - To fetch data by `configuration`, specify `data_warehouse_object_type`. For example, to fetch columns from the `DEVELOPMENT` database, specify the `data_warehouse_object_type` as `DATABASE` and define the `configuration` string as `{\"database\":\"DEVELOPMENT\"}`. To get column data for a specific table, specify the table, for example,`{\"database\":\"RETAILAPPAREL\",\"table\":\"PIPES\"}`. - To query connections by `authentication_type`, specify `data_warehouse_object_type`. Supported values for `authentication_type` are: - `SERVICE_ACCOUNT`: For connections that require service account credentials to authenticate to the Cloud Data Warehouse and fetch data. - `OAUTH`: For connections that require OAuth credentials to authenticate to the Cloud Data Warehouse and fetch data. Teradata, Oracle, and Presto Cloud Data Warehouses do not support the OAuth authentication type. - `IAM`: For connections that have the IAM OAuth set up. This authentication type is supported on Amazon Redshift connections only. - `EXTOAUTH`: For connections that have External OAuth set up. ThoughtSpot supports external [OAuth with Microsoft Azure Active Directory (AD)](https://docs.thoughtspot.com/cloud/latest/ connections-snowflake-azure-ad-oauth) and [Okta for Snowflake data connections](https://docs.thoughtspot.com/cloud/latest/connections-snowflake-okta-oauth). - `KEY_PAIR`: For connections that require Key Pair account credentials to authenticate to the Cloud Data Warehouse and fetch data. This authentication type is supported on Snowflake connections only. - `OAUTH_WITH_PKCE`: For connections that require OAuth with PKCE account credentials to authenticate to the Cloud Data Warehouse and fetch data. This authentication type is supported on Snowflake, Starburst, Databricks, Denodo connections only. - `EXTOAUTH_WITH_PKCE`: For connections that require External OAuth With PKCE account credentials to authenticate to the Cloud Data Warehouse and fetch data. This authentication type is supported on Snowflake connections only. - `OAUTH_WITH_PEZ`: For connections that require OAuth With PEZ account credentials to authenticate to the Cloud Data Warehouse and fetch data. This authentication type is supported on Amazon Redshift connections only. - `OAUTH_WITH_SERVICE_PRINCIPAL`: For connections that require OAuth With Service Principal account credentials to authenticate to the Cloud Data Warehouse and fetch data. This authentication type is supported on Databricks connections only. - `PERSONAL_ACCESS_TOKEN`: For connections that require Personal Access Token account credentials to authenticate to the Cloud Data Warehouse and fetch data. This authentication type is supported on Databricks connections only. - `OAUTH_CLIENT_CREDENTIALS`: For connections that require OAuth Client Credentials to authenticate to the Cloud Data Warehouse and fetch data. This authentication type is supported on Snowflake connections only. - To include more details about connection objects in the API response, set `include_details` to `true`. - You can also sort the output by field names and filter connections by tags. **NOTE**: When filtering connection records by parameters other than `data_warehouse_types` or `tag_identifiers`, ensure that you set `record_size` to `-1` and `record_offset` to `0` for precise results. + +### Parameters + +| Name | Type | +|------------- | ------------- | +| **searchConnectionRequest** | [**SearchConnectionRequest**](SearchConnectionRequest.md) + +### Return type + +[**List<SearchConnectionResponse>**](SearchConnectionResponse.md) + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | List of connections to the datasource. | - | +| **400** | Invalid request. | - | +| **401** | Unauthorized access. | - | +| **403** | Forbidden access. | - | +| **500** | Unexpected error | - | + + +# **searchCustomActions** +> List<ResponseCustomAction> searchCustomActions(searchCustomActionsRequest) + + + + Version: 9.6.0.cl or later Gets custom actions configured on the cluster. Requires `DEVELOPER` (**Has Developer privilege**) or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `DEVELOPER` (**Has developer privilege**) privilege is required. + +### Parameters + +| Name | Type | +|------------- | ------------- | +| **searchCustomActionsRequest** | [**SearchCustomActionsRequest**](SearchCustomActionsRequest.md) + +### Return type + +[**List<ResponseCustomAction>**](ResponseCustomAction.md) + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Custom action search is successful. | - | +| **400** | Invalid request. | - | +| **401** | Unauthorized access. | - | +| **403** | Forbidden access. | - | +| **500** | Unexpected error | - | + + +# **searchData** +> SearchDataResponse searchData(searchDataRequest) + + + + Version: 9.0.0.cl or later Generates an Answer from a given data source. Requires at least view access to the data source object (Worksheet or View). #### Usage guidelines To search data, specify the data source GUID in `logical_table_identifier`. The data source can be a Worksheet, View, Table, or SQL view. Pass search tokens in the `query_string` attribute in the API request as shown in the following example: ``` { \"query_string\": \"[sales] by [store]\", \"logical_table_identifier\": \"cd252e5c-b552-49a8-821d-3eadaa049cca\", } ``` For more information about the `query_string` format and data source attribute, see [Search data API](https://developers.thoughtspot.com/docs/fetch-data-and-report-apis#_search_data_api). The `record_size` attribute determines the number of records to retrieve in an API call. For more information about pagination, record size, and maximum row limit, see [Pagination and record size settings](https://developers.thoughtspot.com/docs/fetch-data-and-report-apis#_pagination_settings_for_data_and_report_api). + +### Parameters + +| Name | Type | +|------------- | ------------- | +| **searchDataRequest** | [**SearchDataRequest**](SearchDataRequest.md) + +### Return type + +[**SearchDataResponse**](SearchDataResponse.md) + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Fetching data of specified metadata object is successful. | - | +| **400** | Invalid request. | - | +| **401** | Unauthorized access. | - | +| **403** | Forbidden access. | - | +| **500** | Unexpected error | - | + + +# **searchEmailCustomization** +> List<CreateEmailCustomizationResponse> searchEmailCustomization(searchEmailCustomizationRequest) + + + + Version: 10.10.0.cl or later Search the email customization configuration if any set for the ThoughtSpot system. #### Pre-requisites Requires `DEVELOPER` (**has developer privilege**) or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `DEVELOPER` (**Has developer privilege**) privilege is required. **NOTE**:This endpoint in currently in beta. Contact ThoughtSpot support to enable this on your instance. + +### Parameters + +| Name | Type | +|------------- | ------------- | +| **searchEmailCustomizationRequest** | [**SearchEmailCustomizationRequest**](SearchEmailCustomizationRequest.md) + +### Return type + +[**List<CreateEmailCustomizationResponse>**](CreateEmailCustomizationResponse.md) + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | OK | - | +| **400** | Invalid request. | - | +| **403** | Unauthorized access. | - | +| **500** | Unexpected error | - | + + +# **searchMetadata** +> List<MetadataSearchResponse> searchMetadata(searchMetadataRequest) + + + + Version: 9.0.0.cl or later Gets a list of metadata objects available on the ThoughtSpot system. This API endpoint is available to all users who have view access to the object. Users with `ADMINISTRATION` (**Can administer ThoughtSpot**) privileges can view data for all metadata objects, including users and groups. #### Usage guidelines - To get all metadata objects, send the API request without any attributes. - To get metadata objects of a specific type, set the `type` attribute. For example, to fetch a Worksheet, set the type as `LOGICAL_TABLE`. - To filter metadata objects within type `LOGICAL_TABLE`, set the `subtypes` attribute. For example, to fetch a Worksheet, set the type as `LOGICAL_TABLE` & subtypes as `[WORKSHEET]`. - To get a specific metadata object, specify the GUID. - To customize your search and filter the API response, you can use several parameters. You can search for objects created or modified by specific users, by tags applied to the objects, or by using the include parameters like `include_auto_created_objects`, `include_dependent_objects`, `include_headers`, `include_incomplete_objects`, and so on. You can also define sorting options to sort the data retrieved in the API response. - To get discoverable objects when linientmodel is enabled you can use `include_discoverable_objects` as true else false. Default value is true. - For liveboard metadata type, to get the newer format, set the `liveboard_response_format` as V2. Default value is V1. - To retrieve only objects that are published, set the `include_only_published_objects` as true. Default value is false. **NOTE**: The following parameters support pagination of metadata records: - `tag_identifiers` - `type` - `subtypes` - `created_by_user_identifiers` - `modified_by_user_identifiers` - `owned_by_user_identifiers` - `exclude_objects` - `include_auto_created_objects` - `favorite_object_options` - `include_only_published_objects` If you are using other parameters to search metadata, set `record_size` to `-1` and `record_offset` to `0`. + +### Parameters + +| Name | Type | +|------------- | ------------- | +| **searchMetadataRequest** | [**SearchMetadataRequest**](SearchMetadataRequest.md) + +### Return type + +[**List<MetadataSearchResponse>**](MetadataSearchResponse.md) + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Metadata objects search result. | - | +| **400** | Invalid request. | - | +| **401** | Unauthorized access. | - | +| **403** | Forbidden access. | - | +| **500** | Unexpected error | - | + + +# **searchOrgs** +> List<OrgResponse> searchOrgs(searchOrgsRequest) + + + + Version: 9.0.0.cl or later Gets a list of Orgs configured on the ThoughtSpot system. To get details of a specific Org, specify the Org ID or name. You can also pass parameters such as status, visibility, and user identifiers to get a specific list of Orgs. Requires cluster administration (**Can administer Org**) privileges. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `ORG_ADMINISTRATION` (**Can manage Orgs**) privilege is required. + +### Parameters + +| Name | Type | +|------------- | ------------- | +| **searchOrgsRequest** | [**SearchOrgsRequest**](SearchOrgsRequest.md) + +### Return type + +[**List<OrgResponse>**](OrgResponse.md) + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Organization search result. | - | +| **400** | Invalid request. | - | +| **401** | Unauthorized access. | - | +| **403** | Forbidden access. | - | +| **500** | Unexpected error | - | + + +# **searchRoles** +> List<SearchRoleResponse> searchRoles(searchRolesRequest) + + + + Version: 9.5.0.cl or later Gets a list of Role objects from the ThoughtSpot system. Available if [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance. To search for Roles, the `ROLE_ADMINISTRATION` (**Can manage roles**) privilege is required. To get details of a specific Role object, specify the GUID or name. You can also filter the API response based on user group and Org identifiers, privileges assigned to the Role, and deprecation status. + +### Parameters + +| Name | Type | +|------------- | ------------- | +| **searchRolesRequest** | [**SearchRolesRequest**](SearchRolesRequest.md) + +### Return type + +[**List<SearchRoleResponse>**](SearchRoleResponse.md) + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Roles search result. | - | +| **400** | Invalid request. | - | +| **401** | Unauthorized access. | - | +| **403** | Forbidden access. | - | +| **500** | Internal error | - | + + +# **searchSchedules** +> List<ResponseSchedule> searchSchedules(searchSchedulesRequest) + + + + Search Schedules Version: 9.4.0.cl or later Gets a list of scheduled jobs configured for a Liveboard. To get details of a specific scheduled job, specify the name or GUID of the scheduled job. Requires at least view access to Liveboards. **NOTE**: When filtering schedules by parameters other than `metadata`, set `record_size` to `-1` and `record_offset` to `0` for accurate results. + +### Parameters + +| Name | Type | +|------------- | ------------- | +| **searchSchedulesRequest** | [**SearchSchedulesRequest**](SearchSchedulesRequest.md) + +### Return type + +[**List<ResponseSchedule>**](ResponseSchedule.md) + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Schedule search result. | - | +| **400** | Invalid request. | - | +| **401** | Unauthorized access. | - | +| **403** | Forbidden access. | - | +| **500** | Unexpected error | - | + + +# **searchSecuritySettings** +> SecuritySettingsResponse searchSecuritySettings(searchSecuritySettingsRequest) + + + + Version: 26.2.0.cl or later Fetch security settings for your ThoughtSpot application instance. - Use `scope: CLUSTER` to retrieve cluster-level security settings, including CORS and CSP allowlists, SAML redirect URLs, and settings that control access to non-embedded pages. - Use `scope: ORG` to retrieve Org-level security settings. If your instance has [Orgs](https://docs.thoughtspot.com/cloud/latest/orgs-overview), this returns CORS and non-embed access settings specific to the Org. - If `scope` is not specified, returns both cluster and Org-specific settings based on user privileges. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) or `DEVELOPER` (**Has developer privilege**) privilege. See [Security Settings](https://developers.thoughtspot.com/docs/security-settings) for more details. + +### Parameters + +| Name | Type | +|------------- | ------------- | +| **searchSecuritySettingsRequest** | [**SearchSecuritySettingsRequest**](SearchSecuritySettingsRequest.md) + +### Return type + +[**SecuritySettingsResponse**](SecuritySettingsResponse.md) + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Successfully retrieved the list of security settings. | - | +| **400** | Invalid request. | - | +| **401** | Unauthorized access. | - | +| **403** | Forbidden access. | - | +| **500** | Unexpected error | - | + + +# **searchTags** +> List<Tag> searchTags(searchTagsRequest) + + + + Version: 9.0.0.cl or later Gets a list of tag objects available on the ThoughtSpot system. To get details of a specific tag object, specify the GUID or name. Any authenticated user can search for tag objects. + +### Parameters + +| Name | Type | +|------------- | ------------- | +| **searchTagsRequest** | [**SearchTagsRequest**](SearchTagsRequest.md) + +### Return type + +[**List<Tag>**](Tag.md) + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Tags search result. | - | +| **400** | Invalid request. | - | +| **401** | Unauthorized access. | - | +| **403** | Forbidden access. | - | +| **500** | Unexpected error | - | + + +# **searchUserGroups** +> List<UserGroupResponse> searchUserGroups(searchUserGroupsRequest) + + + + Version: 9.0.0.cl or later Gets a list of user group objects from the ThoughtSpot system. To get details of a specific user group, specify the user group GUID or name. You can also filter the API response based on User ID, Org ID, Role ID, type of group, sharing visibility, privileges assigned to the group, and the Liveboard IDs assigned to the users in the group. Available to all users. Users with `ADMINISTRATION` (**Can administer ThoughtSpot**) privileges can view all users properties. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `GROUP_ADMINISTRATION` (**Can manage groups**) privilege is required. **NOTE**: If you do not get precise results, try setting `record_size` to `-1` and `record_offset` to `0`. + +### Parameters + +| Name | Type | +|------------- | ------------- | +| **searchUserGroupsRequest** | [**SearchUserGroupsRequest**](SearchUserGroupsRequest.md) + +### Return type + +[**List<UserGroupResponse>**](UserGroupResponse.md) + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | User group search result. | - | +| **400** | Invalid request. | - | +| **401** | Unauthorized access. | - | +| **403** | Forbidden access. | - | +| **500** | Unexpected error | - | + + +# **searchUsers** +> List<User> searchUsers(searchUsersRequest) + + + + Version: 9.0.0.cl or later Gets a list of users available on the ThoughtSpot system. To get details of a specific user, specify the user GUID or name. You can also filter the API response based on groups, Org ID, user visibility, account status, user type, and user preference settings and favorites. Available to all users. Users with `ADMINISTRATION` (**Can administer ThoughtSpot**) privileges can view all users properties. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `USER_ADMINISTRATION` (**Can manage users**) privilege is required. **NOTE**: If the API returns an empty list, consider increasing the value of the `record_size` parameter. To search across all available users, set `record_size` to `-1`. + +### Parameters + +| Name | Type | +|------------- | ------------- | +| **searchUsersRequest** | [**SearchUsersRequest**](SearchUsersRequest.md) + +### Return type + +[**List<User>**](User.md) + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | User search result. | - | +| **400** | Invalid request. | - | +| **401** | Unauthorized access. | - | +| **403** | Forbidden access. | - | +| **500** | Unexpected error | - | + + +# **searchVariables** +> List<Variable> searchVariables(searchVariablesRequest) + + + + Search variables Version: 26.4.0.cl or later Allows searching for variables in ThoughtSpot. Requires ADMINISTRATION role. The CAN_MANAGE_VARIABLES permission allows you to manage Formula Variables in the current organization scope. The API endpoint supports searching variables by: * Variable identifier (ID or name) * Variable type * Name pattern (case-insensitive, supports % for wildcard) The search results can be formatted in three ways: * METADATA - Returns only variable metadata (default) * METADATA_AND_VALUES - Returns variable metadata and values The values can be filtered by scope: * org_identifier * principal_identifier * model_identifier + +### Parameters + +| Name | Type | +|------------- | ------------- | +| **searchVariablesRequest** | [**SearchVariablesRequest**](SearchVariablesRequest.md) + +### Return type + +[**List<Variable>**](Variable.md) + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | List of variables is successful. | - | +| **400** | Invalid request. | - | +| **401** | Unauthorized access. | - | +| **403** | Forbidden access. | - | +| **500** | Unexpected error | - | + + +# **searchWebhookConfigurations** +> WebhookSearchResponse searchWebhookConfigurations(searchWebhookConfigurationsRequest) + + + + Version: 10.14.0.cl or later Searches for webhook configurations based on various criteria such as Org, webhook identifier, event type, with support for pagination and sorting. Returns matching webhook configurations with their complete details. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) or `DEVELOPER` (**Has developer privilege**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, users with `CAN_MANAGE_WEBHOOKS` (**Can manage webhooks**) privilege are also authorized to perform this action. + +### Parameters + +| Name | Type | +|------------- | ------------- | +| **searchWebhookConfigurationsRequest** | [**SearchWebhookConfigurationsRequest**](SearchWebhookConfigurationsRequest.md) + +### Return type + +[**WebhookSearchResponse**](WebhookSearchResponse.md) + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Webhook configurations retrieved successfully | - | +| **400** | Invalid request. | - | +| **401** | Unauthorized access. | - | +| **403** | Forbidden access. | - | +| **500** | Unexpected error | - | + + +# **sendAgentConversationMessage** +> Object sendAgentConversationMessage(conversationIdentifier, sendAgentConversationMessageRequest) + + + + Version: 26.5.0.cl or later Sends natural language messages to an existing Spotter agent conversation and returns the complete response synchronously. Requires `CAN_USE_SPOTTER` privilege and access to the metadata object associated with the conversation. The user must have access to the conversation session referenced by `conversation_identifier`. A conversation must first be created using the `createAgentConversation` API. #### Usage guidelines The request must include: - `conversation_identifier`: the unique session ID returned by `createAgentConversation`, used for context continuity and message tracking - `messages`: an array of one or more text messages to send to the agent The API returns an array of response objects, each containing: - `type`: the kind of response — `text`, `answer`, or `error` - `message`: the main content of the response - `metadata`: additional information depending on the message type (e.g., answer metadata includes analytics and visualization details) #### Error responses | Code | Description | |------|----------------------------------------------------------------------------------------------------------------------------------| | 401 | Unauthorized — authentication token is missing, expired, or invalid. | | 403 | Forbidden — the authenticated user does not have `CAN_USE_SPOTTER` privilege or lacks permission on the referenced conversation. | > ###### Note: > > - This endpoint is Generally Available from version 26.5.0.cl. > - This endpoint requires Spotter - please contact ThoughtSpot support to enable Spotter on your cluster. > - For real-time streamed responses, use `sendAgentConversationMessageStreaming` instead. + +### Parameters + +| Name | Type | +|------------- | ------------- | +| **conversationIdentifier** | **String** +| **sendAgentConversationMessageRequest** | [**SendAgentConversationMessageRequest**](SendAgentConversationMessageRequest.md) + +### Return type + +**Object** + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Common successful response | - | +| **201** | Common error response | - | +| **400** | Operation failed | - | +| **401** | Unauthorized access. | - | +| **403** | Forbidden access. | - | +| **500** | Operation failed | - | + + +# **sendAgentConversationMessageStreaming** +> SendAgentMessageResponse sendAgentConversationMessageStreaming(conversationIdentifier, sendAgentConversationMessageStreamingRequest) + + + + Version: 26.5.0.cl or later Sends one or more natural language messages to an existing Spotter agent conversation and returns the response as a real-time Server-Sent Events stream. Requires `CAN_USE_SPOTTER` privilege and access to the metadata object associated with the conversation. The user must have access to the conversation session referenced by `conversation_identifier`. A conversation must first be created using the `createAgentConversation` API. #### Usage guidelines The request must include: - `conversation_identifier`: the unique session ID returned by `createAgentConversation`, used for context continuity and message tracking - `messages`: an array of one or more text messages to send to the agent If the request is valid, the API returns a Server-Sent Events (SSE) stream. Each line has the form `data: [{\"type\": \"...\", ...}]` — a JSON array of event objects. Event types include: - `ack`: confirms receipt of the request (`node_id`) - `conv_title`: conversation title (`title`, `conv_id`) - `notification`: status updates on operations (`group_id`, `metadata`, `code` — e.g. `TOOL_CALL_NOTIFICATION`, `nls_start`, `FINAL_RESPONSE_NOTIFICATION`) - `text-chunk`: incremental content chunks (`id`, `group_id`, `metadata` with `format` and `type` such as `thinking` or `text`, `content`) - `text`: full text block with same structure as `text-chunk` - `answer`: structured answer with metadata (`id`, `group_id`, `metadata` with `sage_query`, `session_id`, `title`, etc., `title`) - `error`: if a failure occurs #### Error responses | Code | Description | | ---- | -------------------------------------------------------------------------------------------------------------------------------- | | 401 | Unauthorized — authentication token is missing, expired, or invalid. | | 403 | Forbidden — the authenticated user does not have `CAN_USE_SPOTTER` privilege or lacks permission on the referenced conversation. | > ###### Note: > > - This endpoint is Generally Available from version 26.5.0.cl. > - This endpoint requires Spotter - please contact ThoughtSpot support to enable Spotter on your cluster. > - The streaming protocol uses Server-Sent Events (SSE). > - For the complete response in a single payload, use `sendAgentConversationMessage` instead. + +### Parameters + +| Name | Type | +|------------- | ------------- | +| **conversationIdentifier** | **String** +| **sendAgentConversationMessageStreamingRequest** | [**SendAgentConversationMessageStreamingRequest**](SendAgentConversationMessageStreamingRequest.md) + +### Return type + +[**SendAgentMessageResponse**](SendAgentMessageResponse.md) + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Common successful response | - | +| **201** | Common error response | - | +| **400** | Operation failed | - | +| **401** | Unauthorized access. | - | +| **403** | Forbidden access. | - | +| **500** | Operation failed | - | + + +# **sendAgentMessage** +> Object sendAgentMessage(conversationIdentifier, sendAgentMessageRequest) + + + + Version: 26.2.0.cl or later **Deprecated** — Use `sendAgentConversationMessage` instead. Send natural language messages to an existing Spotter agent conversation and returns the complete response synchronously. Requires `CAN_USE_SPOTTER` privilege and access to the metadata object associated with the conversation. The user must have access to the conversation session referenced by `conversation_identifier`. A conversation must first be created using the `createAgentConversation` API. #### Usage guidelines The request must include: - `conversation_identifier`: the unique session ID returned by `createAgentConversation`, used for context continuity and message tracking - `messages`: an array of one or more text messages to send to the agent The API returns an array of response objects, each containing: - `type`: the kind of response — `text`, `answer`, or `error` - `message`: the main content of the response - `metadata`: additional information depending on the message type (e.g., answer metadata includes analytics and visualization details) #### Error responses | Code | Description | |------|----------------------------------------------------------------------------------------------------------------------------------| | 401 | Unauthorized — authentication token is missing, expired, or invalid. | | 403 | Forbidden — the authenticated user does not have `CAN_USE_SPOTTER` privilege or lacks permission on the referenced conversation. | > ###### Note: > > - This endpoint is deprecated. Use `sendAgentConversationMessage` for new integrations. > - This endpoint is currently in Beta. Breaking changes may be introduced before the endpoint is made Generally Available. > - This endpoint requires Spotter - please contact ThoughtSpot support to enable Spotter on your cluster. + +### Parameters + +| Name | Type | +|------------- | ------------- | +| **conversationIdentifier** | **String** +| **sendAgentMessageRequest** | [**SendAgentMessageRequest**](SendAgentMessageRequest.md) + +### Return type + +**Object** + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Common successful response | - | +| **201** | Common error response | - | +| **400** | Operation failed | - | +| **401** | Unauthorized access. | - | +| **403** | Forbidden access. | - | +| **500** | Operation failed | - | + + +# **sendAgentMessageStreaming** +> SendAgentMessageResponse sendAgentMessageStreaming(sendAgentMessageStreamingRequest) + + + + Version: 26.2.0.cl or later **Deprecated** — Use `sendAgentConversationMessageStreaming` instead. Sends one or more natural language messages to an existing Spotter agent conversation and returns the response as a real-time Server-Sent Events stream. Requires `CAN_USE_SPOTTER` privilege and access to the metadata object associated with the conversation. The user must have access to the conversation session referenced by `conversation_identifier`. A conversation must first be created using the `createAgentConversation` API. #### Usage guidelines The request must include: - `conversation_identifier`: the unique session ID returned by `createAgentConversation`, used for context continuity and message tracking - `messages`: an array of one or more text messages to send to the agent If the request is valid, the API returns a Server-Sent Events (SSE) stream. Each line has the form `data: [{\"type\": \"...\", ...}]` — a JSON array of event objects. Event types include: - `ack`: confirms receipt of the request (`node_id`) - `conv_title`: conversation title (`title`, `conv_id`) - `notification`: status updates on operations (`group_id`, `metadata`, `code` — e.g. `TOOL_CALL_NOTIFICATION`, `nls_start`, `FINAL_RESPONSE_NOTIFICATION`) - `text-chunk`: incremental content chunks (`id`, `group_id`, `metadata` with `format` and `type` such as `thinking` or `text`, `content`) - `text`: full text block with same structure as `text-chunk` - `answer`: structured answer with metadata (`id`, `group_id`, `metadata` with `sage_query`, `session_id`, `title`, etc., `title`) - `error`: if a failure occurs #### Error responses | Code | Description | |------|----------------------------------------------------------------------------------------------------------------------------------| | 401 | Unauthorized — authentication token is missing, expired, or invalid. | | 403 | Forbidden — the authenticated user does not have `CAN_USE_SPOTTER` privilege or lacks permission on the referenced conversation. | > ###### Note: > > - This endpoint is deprecated. Use `sendAgentConversationMessageStreaming` for new integrations. > - This endpoint is currently in Beta. Breaking changes may be introduced before the endpoint is made Generally Available. > - This endpoint requires Spotter - please contact ThoughtSpot support to enable Spotter on your cluster. > - The streaming protocol uses Server-Sent Events (SSE). + +### Parameters + +| Name | Type | +|------------- | ------------- | +| **sendAgentMessageStreamingRequest** | [**SendAgentMessageStreamingRequest**](SendAgentMessageStreamingRequest.md) + +### Return type + +[**SendAgentMessageResponse**](SendAgentMessageResponse.md) + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Common successful response | - | +| **201** | Common error response | - | +| **400** | Operation failed | - | +| **401** | Unauthorized access. | - | +| **403** | Forbidden access. | - | +| **500** | Operation failed | - | + + +# **sendMessage** +> List<ResponseMessage> sendMessage(conversationIdentifier, sendMessageRequest) + + + + Version: 10.4.0.cl or later Sends a follow-up message to an existing conversation within the context of a data model. Requires `CAN_USE_SPOTTER` privilege and at least view access to the metadata object specified in the request. A conversation must first be created using the `createConversation` API. #### Usage guidelines The request must include: - `conversation_identifier`: the unique session ID returned by `createConversation` - `metadata_identifier`: the unique ID of the data source used for the conversation - `message`: a natural language string with the follow-up question If the request is successful, the API returns an array of response messages, each containing: - `session_identifier`: the unique ID of the generated response - `generation_number`: the generation number of the response - `message_type`: the type of the response (e.g., `TSAnswer`) - `visualization_type`: the generated visualization type (`Chart`, `Table`, or `Undefined`) - `tokens` / `display_tokens`: the search tokens and user-friendly display tokens for the response #### Error responses | Code | Description | |------|-----------------------------------------------------------------------------------------------------------------------------------------| | 401 | Unauthorized — authentication token is missing, expired, or invalid. | | 403 | Forbidden — the authenticated user does not have `CAN_USE_SPOTTER` privilege or lacks view permission on the specified metadata object. | > ###### Note: > * This endpoint is currently in Beta. Breaking changes may be introduced before the endpoint is made Generally Available. > * This endpoint requires Spotter - please contact ThoughtSpot support to enable Spotter on your cluster. + +### Parameters + +| Name | Type | +|------------- | ------------- | +| **conversationIdentifier** | **String** +| **sendMessageRequest** | [**SendMessageRequest**](SendMessageRequest.md) + +### Return type + +[**List<ResponseMessage>**](ResponseMessage.md) + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Common successful response | - | +| **201** | Common error response | - | +| **400** | Operation failed | - | +| **401** | Unauthorized access. | - | +| **403** | Forbidden access. | - | +| **500** | Operation failed | - | + + +# **setNLInstructions** +> EurekaSetNLInstructionsResponse setNLInstructions(setNLInstructionsRequest) + + + + Version: 10.15.0.cl or later This API allows users to set natural language (NL) instructions for a specific data-model to improve AI-generated answers and query processing. These instructions help guide the AI system to better understand the data context and provide more accurate responses. Requires `CAN_USE_SPOTTER` privilege, either edit access or `SPOTTER_COACHING_PRIVILEGE` on the data model, and a bearer token corresponding to the org where the data model exists. #### Usage guidelines To set NL instructions for a data-model, the request must include: - `data_source_identifier`: The unique ID of the data-model for which to set NL instructions - `nl_instructions_info`: An array of instruction objects, each containing: - `instructions`: Array of text instructions for the LLM - `scope`: The scope of the instruction (`GLOBAL`). Currently only `GLOBAL` is supported. It can be extended to data-model-user scope in future. #### Instructions scope - **GLOBAL**: instructions that apply to all users querying this data model If the request is successful, the API returns: - `success`: a boolean indicating whether the operation completed successfully #### Error responses | Code | Description | |------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| | 401 | Unauthorized — authentication token is missing, expired, or invalid. | | 403 | Forbidden — the authenticated user does not have `CAN_USE_SPOTTER` privilege, lacks edit access or `SPOTTER_COACHING_PRIVILEGE` on the data model, or the bearer token does not correspond to the org where the data model exists. | > ###### Note: > > - To use this API, the user needs either edit access or `SPOTTER_COACHING_PRIVILEGE` on the data model, and must use the bearer token corresponding to the org where the data model exists. > - This endpoint is currently in Beta. Breaking changes may be introduced before the endpoint is made Generally Available. > - Available from version 10.15.0.cl and later. > - This endpoint requires Spotter — please contact ThoughtSpot Support to enable Spotter on your cluster. > - Instructions help improve the accuracy and relevance of AI-generated responses for the specified data-model. + +### Parameters + +| Name | Type | +|------------- | ------------- | +| **setNLInstructionsRequest** | [**SetNLInstructionsRequest**](SetNLInstructionsRequest.md) + +### Return type + +[**EurekaSetNLInstructionsResponse**](EurekaSetNLInstructionsResponse.md) + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Common successful response | - | +| **201** | Common error response | - | +| **400** | Operation failed | - | +| **401** | Unauthorized access. | - | +| **403** | Forbidden access. | - | +| **500** | Operation failed | - | + + +# **shareMetadata** +> shareMetadata(shareMetadataRequest) + + + + Version: 9.0.0.cl or later Allows sharing one or several metadata objects with users and groups in ThoughtSpot. Requires edit access to the metadata object. #### Supported metadata objects: * Liveboards * Visualizations * Answers * Models * Views * Connections * Collections #### Object permissions You can provide `READ_ONLY` or `MODIFY` access when sharing an object with another user or group. The `READ_ONLY` permission grants view access to the shared object, whereas `MODIFY` provides edit access. To prevent a user or group from accessing the shared object, specify the GUID or name of the principal and set `shareMode` to `NO_ACCESS`. #### Sharing a visualization * Sharing a visualization implicitly shares the entire Liveboard with the recipient. * Object permissions set for a shared visualization also apply to the Liveboard unless overridden by another API request or via UI. * If email notifications for object sharing are enabled, a notification with a link to the shared visualization will be sent to the recipient’s email address. Although this link opens the shared visualization, recipients can also access other visualizations in the Liveboard. #### Sharing a collection Collections support **dual permissions** that provide fine-grained control: * **Collection permissions** (`share_mode`) - controls access to the collection itself (view, edit, delete the collection) * **Content permissions** (`content_share_mode`) - controls access to objects within the collection (view, edit objects inside) **Default Behavior:** - If only `share_mode` is specified, the content permissions default to `READ_ONLY` (except when `share_mode` is `NO_ACCESS`, then content also gets `NO_ACCESS`) - To give users edit access to collection contents, explicitly set `content_share_mode: \"MODIFY\"` ## Examples The following JSON examples can be copy-pasted as request bodies for the REST v2 API endpoint: ```bash POST /callosum/v1/v2/security/metadata/share Content-Type: application/x-www-form-urlencoded ``` ### Basic collection sharing Share a collection with read-only access: ```json { \"metadata_type\": \"COLLECTION\", \"metadata_identifiers\": [\"Sales Reports Collection\"], \"permissions\": [{ \"principal\": { \"type\": \"USER\", \"identifier\": \"alice@company.com\" }, \"share_mode\": \"READ_ONLY\" }], \"notification\": { \"message\": \"I've shared the Sales Reports collection with you\", \"notify_on_share\": true } } ``` ### Collection sharing with dual permissions Share a collection with different permissions for the collection vs. its contents: ```json { \"metadata_type\": \"COLLECTION\", \"metadata_identifiers\": [\"Marketing Analytics\"], \"permissions\": [{ \"principal\": { \"type\": \"USER\", \"identifier\": \"bob@company.com\" }, \"share_mode\": \"MODIFY\", \"content_share_mode\": \"READ_ONLY\" }, { \"principal\": { \"type\": \"USER_GROUP\", \"identifier\": \"Marketing Team\" }, \"share_mode\": \"READ_ONLY\", \"content_share_mode\": \"READ_ONLY\" }], \"notification\": { \"emails\": [\"bob@company.com\"], \"message\": \"You can edit the collection but content is read-only\", \"enable_custom_url\": false, \"notify_on_share\": true }, \"has_lenient_discoverability\": false } ``` ### Multiple collections sharing Share multiple collections with different users: ```json { \"metadata\": [ { \"type\": \"COLLECTION\", \"identifier\": \"Q4 Reports\" }, { \"type\": \"COLLECTION\", \"identifier\": \"Executive Dashboard Collection\" } ], \"permissions\": [{ \"principal\": { \"type\": \"USER_GROUP\", \"identifier\": \"Executives\" }, \"share_mode\": \"MODIFY\" }, { \"principal\": { \"type\": \"USER\", \"identifier\": \"manager@company.com\" }, \"share_mode\": \"READ_ONLY\", \"content_share_mode\": \"MODIFY\" }], \"notification\": { \"message\": \"Sharing quarterly collections with leadership team\", \"notify_on_share\": true } } ``` ### Remove collection access Remove access to a collection by setting share_mode to NO_ACCESS: ```json { \"metadata_type\": \"COLLECTION\", \"metadata_identifiers\": [\"Confidential Reports\"], \"permissions\": [{ \"principal\": { \"type\": \"USER\", \"identifier\": \"former-employee@company.com\" }, \"share_mode\": \"NO_ACCESS\" }], \"notification\": { \"notify_on_share\": false } } ``` ### Collection Permission Scenarios **Scenario 1: Collection Admin** - `share_mode: MODIFY` + `content_share_mode: MODIFY` = Full control over collection and its contents **Scenario 2: Collection Curator** - `share_mode: MODIFY` + `content_share_mode: READ_ONLY` = Can manage collection structure but not edit contents **Scenario 3: Content Editor** - `share_mode: READ_ONLY` + `content_share_mode: MODIFY` = Can edit objects within collection but can't change collection itself **Scenario 4: Viewer** - `share_mode: READ_ONLY` + `content_share_mode: READ_ONLY` = View-only access to collection and contents + +### Parameters + +| Name | Type | +|------------- | ------------- | +| **shareMetadataRequest** | [**ShareMetadataRequest**](ShareMetadataRequest.md) + +### Return type + +null (empty response body) + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **204** | Sharing metadata objects is successful. | - | +| **400** | Invalid request. | - | +| **401** | Unauthorized access. | - | +| **403** | Forbidden access. | - | +| **500** | Unexpected error | - | + + +# **singleAnswer** +> ResponseMessage singleAnswer(singleAnswerRequest) + + + + Version: 10.4.0.cl or later Processes a natural language query against a specified data model and returns a single AI-generated answer without requiring a conversation session. Requires `CAN_USE_SPOTTER` privilege and at least view access to the metadata object specified in the request. #### Usage guidelines The request must include: - `query`: a natural language question (e.g., \"What were total sales last quarter?\") - `metadata_identifier`: the unique ID of the data source to query against If the request is successful, the API returns a response message containing: - `session_identifier`: the unique ID of the generated response - `generation_number`: the generation number of the response - `message_type`: the type of the response (e.g., `TSAnswer`) - `visualization_type`: the generated visualization type (`Chart`, `Table`, or `Undefined`) - `tokens` / `display_tokens`: the search tokens and user-friendly display tokens for the response #### Error responses | Code | Description | |------|-----------------------------------------------------------------------------------------------------------------------------------------| | 401 | Unauthorized — authentication token is missing, expired, or invalid. | | 403 | Forbidden — the authenticated user does not have `CAN_USE_SPOTTER` privilege or lacks view permission on the specified metadata object. | > ###### Note: > * This endpoint is currently in Beta. Breaking changes may be introduced before the endpoint is made Generally Available. > * This endpoint requires Spotter - please contact ThoughtSpot support to enable Spotter on your cluster. + +### Parameters + +| Name | Type | +|------------- | ------------- | +| **singleAnswerRequest** | [**SingleAnswerRequest**](SingleAnswerRequest.md) + +### Return type + +[**ResponseMessage**](ResponseMessage.md) + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Common successful response | - | +| **201** | Common error response | - | +| **400** | Operation failed | - | +| **401** | Unauthorized access. | - | +| **403** | Forbidden access. | - | +| **500** | Operation failed | - | + + +# **stopConversation** +> stopConversation(conversationIdentifier) + + + + Stops an in-progress agent conversation response. Version: 26.6.0.cl or later <span>Version: 26.6.0.cl or later Stops an in-progress agent response for the specified conversation. Use this endpoint to cancel a response that is actively being generated — for example, when the user navigates away, reformulates their question, or no longer needs the current result. Requires `CAN_USE_SPOTTER` privilege and access to the specified conversation. #### Usage guidelines The request must include: - `conversation_identifier` *(path parameter)*: the unique ID of the conversation whose active response should be stopped, as returned by `createAgentConversation` A successful request returns an empty `204 No Content` response. If there is no active response in progress at the time of the call, the request is still treated as successful. After stopping a response, the conversation session remains active. You can continue sending messages using `sendAgentConversationMessage` or `sendAgentConversationMessageStreaming`. #### Example request ```bash POST /api/rest/2.0/ai/agent/conversation/{conversation_identifier}/stop-response ``` #### Typical usage scenario This endpoint is useful when integrating Spotter into a chat UI where users can cancel a long-running query. For example: 1. User sends a message via `sendAgentConversationMessageStreaming`. 2. User clicks a \"Stop generating\" button while the response is streaming. 3. Your client calls `stopConversation` with the active `conversation_identifier`. 4. The stream is terminated and the user can ask a new question. #### Error responses | Code | Description | |------|-------------| | 401 | Unauthorized — authentication token is missing, expired, or invalid. | | 403 | Forbidden — the authenticated user does not have `CAN_USE_SPOTTER` privilege or lacks access to the specified conversation. | > ###### Note: > > - Calling this endpoint when no response is in progress does not return an error. > - The conversation context is preserved after stopping — previous messages and answers remain accessible. > - Available from version 26.6.0.cl and later. > - This endpoint requires Spotter — please contact ThoughtSpot Support to enable Spotter on your cluster. > - This feature is available only for **Spotter 3** (`SPOTTER3`) version. + +### Parameters + +| Name | Type | +|------------- | ------------- | +| **conversationIdentifier** | **String** + +### Return type + +null (empty response body) + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **204** | Successfully stopped the in-progress agent conversation response for the given. | - | +| **400** | Operation failed | - | +| **401** | Unauthorized access. | - | +| **403** | Forbidden access. | - | +| **500** | Operation failed | - | + + +# **syncMetadata** +> SyncMetadataResponse syncMetadata(connectionIdentifier, syncMetadataRequest) + + + + Version: 26.5.0.cl or later Synchronizes connection metadata attributes from your Cloud Data Warehouse (CDW) with ThoughtSpot. Requires the `DATAMANAGEMENT` (**Can manage data**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` (**Can manage data models**) privilege is required. #### Usage guidelines To synchronize attributes from a CDW, specify the connection GUID or name in the `connection_identifier` path parameter and `sync_attributes` in the request body. Default attribute is `[\"DESCRIPTION\"]`. ##### Hierarchical schema * Connection: The connection object for the sync operation. * Tables: Tables for the sync operation. When no table is specified, all tables are synchronized. * Columns: If the table is specified, you can add the columns for the sync operation. If no columns are specified, all columns in the specified table are considered for the sync operation. To set the scope for the sync operation: * Connection-level: To sync all tables and columns, pass an empty request body, or only the attributes in the request body. * Table-level: To synchronize specific tables and their columns, specify the table identifiers in the `tables` array. * Column-level: To synchronize specific columns, specify the table identifier as the key and column identifiers as the value in the `tables` array. ``` { \"tables\": [ {\"table-guid-1\": [\"column-guid-1\", \"column-guid-2\"]}, \"table-guid-2\" ], \"sync_attributes\": [\"DESCRIPTION\"] } ``` ##### API response If the sync operation is successful, the API returns the following information: * Status of the sync operation. For example, `SUCCESS`, `PARTIAL_SUCCESS`, or `NO_UPDATE`. * Number of tables and columns that were updated. * Number of tables and columns with the sync failed status when the overall sync status is `PARTIAL_SUCCESS`. * Message text indicating the sync results. + +### Parameters + +| Name | Type | +|------------- | ------------- | +| **connectionIdentifier** | **String** +| **syncMetadataRequest** | [**SyncMetadataRequest**](SyncMetadataRequest.md) + +### Return type + +[**SyncMetadataResponse**](SyncMetadataResponse.md) + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Metadata synced successfully. | - | +| **400** | Invalid request parameters or hierarchy. | - | +| **401** | Unauthorized access. | - | +| **403** | Forbidden access. | - | +| **404** | Connection, table, or column not found. | - | +| **500** | Unexpected error | - | + + +# **unassignTag** +> unassignTag(unassignTagRequest) + + + + Version: 9.0.0.cl or later Removes the tags applied to a Liveboard, Answer, Table, or Worksheet. Requires edit access to the metadata object. + +### Parameters + +| Name | Type | +|------------- | ------------- | +| **unassignTagRequest** | [**UnassignTagRequest**](UnassignTagRequest.md) + +### Return type + +null (empty response body) + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **204** | Tags successfully unassigned. | - | +| **400** | Invalid request. | - | +| **401** | Unauthorized access. | - | +| **403** | Forbidden access. | - | +| **500** | Unexpected error | - | + + +# **unparameterizeMetadata** +> unparameterizeMetadata(unparameterizeMetadataRequest) + + + + Remove parameterization from fields in metadata objects. Version: 26.5.0.cl or later Allows removing parameterization from fields in metadata objects in ThoughtSpot. Requires appropriate permissions to modify the metadata object. The API endpoint allows unparameterizing the following types of metadata objects: * Logical Tables * Connections * Connection Configs For a Logical Table the field type must be `ATTRIBUTE` and field name can be one of: * databaseName * schemaName * tableName For a Connection or Connection Config, the field type is always `CONNECTION_PROPERTY`. In this case, field_name specifies the exact property of the Connection or Connection Config that needs to be unparameterized. For Connection Config, the only supported field name is: * impersonate_user + +### Parameters + +| Name | Type | +|------------- | ------------- | +| **unparameterizeMetadataRequest** | [**UnparameterizeMetadataRequest**](UnparameterizeMetadataRequest.md) + +### Return type + +null (empty response body) + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **204** | Successfuly removed parameters. | - | +| **400** | Invalid request. | - | +| **401** | Unauthorized access. | - | +| **403** | Forbidden access. | - | +| **500** | Unexpected error | - | + + +# **unpublishMetadata** +> unpublishMetadata(unpublishMetadataRequest) + + + + Version: 26.5.0.cl or later Allows unpublishing metadata objects from organizations in ThoughtSpot. Requires ADMINISTRATION role and TENANT scope. The API endpoint allows unpublishing the following types of metadata objects: * Liveboards * Answers * Logical Tables When unpublishing objects, you can: * Include dependencies by setting `include_dependencies` to true - this will unpublish all dependent objects if no other published object is using them * Force unpublish by setting `force` to true - this will break all dependent objects in the unpublished organizations + +### Parameters + +| Name | Type | +|------------- | ------------- | +| **unpublishMetadataRequest** | [**UnpublishMetadataRequest**](UnpublishMetadataRequest.md) + +### Return type + +null (empty response body) + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **204** | Unpublishing metadata objects is successful. | - | +| **400** | Invalid request. | - | +| **401** | Unauthorized access. | - | +| **403** | Forbidden access. | - | +| **500** | Unexpected error | - | + + +# **updateCalendar** +> updateCalendar(calendarIdentifier, updateCalendarRequest) + + + + Version: 10.12.0.cl or later Updates the properties of a [custom calendar](https://docs.thoughtspot.com/cloud/latest/connections-cust-cal). Requires `DATAMANAGEMENT` (**Can manage data**) or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your ThoughtSpot instance, the `CAN_MANAGE_CUSTOM_CALENDAR` (**Can manage custom calendars**) privilege is required. #### Usage guidelines You can update the properties of a calendar using one of the following methods: * `FROM_INPUT_PARAMS` to update the calendar properties with the values defined in the API request. * `FROM_EXISTING_TABLE` Creates a calendar from the parameters defined in the API request. To update a custom calendar, specify the calendar ID as a path parameter in the request URL and the following parameters in the request body: * Connection ID and Table name * Database and schema name attributes: For most Cloud Data Warehouse (CDW) connectors, both `database_name` and `schema_name` attributes are required. However, the attribute requirements are conditional and vary based on the connector type and its metadata structure. For example, for connectors such as Teradata, MySQL, SingleSore, Amazon Aurora MySQL, Amazon RDS MySQL, Oracle, and GCP_MYSQL, the `schema_name` is required, whereas the `database_name` attribute is not. Similarly, connectors such as ClickHouse require you to specify the `database_name` and the schema specification in such cases is optional. The API allows you to modify the calendar type, month offset value, start and end date, starting day of the week, and prefixes assigned to the year and quarter labels. #### Examples Update a custom calendar using an existing Table in ThoughtSpot: ``` { \"update_method\": \"FROM_EXISTING_TABLE\", \"table_reference\": { \"connection_identifier\": \"Connection1\", \"database_name\": \"db1\", \"table_name\": \"custom_calendar_2025\", \"schame_name\": \"schemaVar\" } } ``` Update a custom calendar with the attributes defined in the API request: ``` { \"update_method\": \"FROM_INPUT_PARAMS\", \"table_reference\": { \"connection_identifier\": \"Connection1\", \"database_name\": \"db1\", \"table_name\": \"custom_calendar_2025\", \"schame_name\": \"schemaVar\" }, \"month_offset\": \"August\", \"start_day_of_week\": \"Monday\", \"start_date\": \"08/01/2025\", \"end_date\": \"07/31/2026\" } ``` + +### Parameters + +| Name | Type | +|------------- | ------------- | +| **calendarIdentifier** | **String** +| **updateCalendarRequest** | [**UpdateCalendarRequest**](UpdateCalendarRequest.md) + +### Return type + +null (empty response body) + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **204** | Custom calendar updated successfully. | - | +| **400** | Invalid request. | - | +| **401** | Unauthorized access. | - | +| **403** | Forbidden access. | - | +| **500** | Unexpected error | - | + + +# **updateCollection** +> updateCollection(collectionIdentifier, updateCollectionRequest) + + + + Version: 26.4.0.cl or later Updates an existing collection in ThoughtSpot. #### Supported operations This API endpoint lets you perform the following operations: * Update collection name and description * Change visibility settings * Add metadata objects to the collection (operation: ADD) * Remove metadata objects from the collection (operation: REMOVE) * Replace all metadata objects in the collection (operation: REPLACE) #### Operation types * **ADD**: Adds the specified metadata objects to the existing collection without removing current items * **REMOVE**: Removes only the specified metadata objects from the collection * **REPLACE**: Replaces all existing metadata objects with the specified items (default behavior) + +### Parameters + +| Name | Type | +|------------- | ------------- | +| **collectionIdentifier** | **String** +| **updateCollectionRequest** | [**UpdateCollectionRequest**](UpdateCollectionRequest.md) + +### Return type + +null (empty response body) + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **204** | Collection updated successfully. No content returned. | - | +| **400** | Invalid request. | - | +| **401** | Unauthorized access. | - | +| **403** | Forbidden access. | - | +| **404** | Resource not found. | - | +| **500** | Unexpected error | - | + + +# **updateColumnSecurityRules** +> updateColumnSecurityRules(updateColumnSecurityRulesRequest) + + + + Version: 10.12.0.cl or later Creates, updates, or deletes column security rules for specified tables. This API endpoint allows you to create, update, or delete column-level security rules on columns of a table. The operation follows an \"all or none\" policy: if defining security rules for any of the provided columns fails, the entire operation will be rolled back, and no rules will be created. #### Usage guidelines - Provide table identifier using either `identifier` (GUID or name) or `obj_identifier` (object ID) - Use `clear_csr: true` to remove all column security rules from the table - For each column, specify the security rule using `column_security_rules` array - Use `is_unsecured: true` to mark a specific column as unprotected - Use `group_access` operations to manage group associations: - `ADD`: Add groups to the column's access list - `REMOVE`: Remove groups from the column's access list - `REPLACE`: Replace all existing groups with the specified groups #### Required permissions - `ADMINISTRATION` - Can administer ThoughtSpot - `DATAMANAGEMENT` - Can manage data (if RBAC is disabled) - `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` - Can manage worksheet views and tables (if RBAC is enabled) #### Example request ```json { \"identifier\": \"table-guid\", \"obj_identifier\": \"table-object-id\", \"clear_csr\": false, \"column_security_rules\": [ { \"column_identifier\": \"col id or col name\", \"is_unsecured\": false, \"group_access\": [ { \"operation\": \"ADD\", \"group_identifiers\": [\"hr_group_id\", \"hr_group_name\", \"finance_group_id\"] } ] }, { \"column_identifier\": \"col id or col name\", \"is_unsecured\": true }, { \"column_identifier\": \"col id or col name\", \"is_unsecured\": false, \"group_access\": [ { \"operation\": \"REPLACE\", \"group_identifiers\": [\"management_group_id\", \"management_group_name\"] } ] } ] } ``` #### Request Body Schema - `identifier` (string, optional): GUID or name of the table for which we want to create column security rules - `obj_identifier` (string, optional): The object ID of the table - `clear_csr` (boolean, optional): If true, then all the secured columns will be marked as unprotected, and all the group associations will be removed - `column_security_rules` (array of objects, required): An array where each object defines the security rule for a specific column Each column security rule object contains: - `column_identifier` (string, required): Column identifier (col_id or name) - `is_unsecured` (boolean, optional): If true, the column will be marked as unprotected and all groups associated with it will be removed - `group_access` (array of objects, optional): Array of group operation objects Each group operation object contains: - `operation` (string, required): Operation type - ADD, REMOVE, or REPLACE - `group_identifiers` (array of strings, required): Array of group identifiers (name or GUID) on which the operation will be performed #### Response This API does not return any response body. A successful operation returns HTTP 200 status code. #### Operation Types - **ADD**: Adds the specified groups to the column's access list - **REMOVE**: Removes the specified groups from the column's access list - **REPLACE**: Replaces all existing groups with the specified groups + +### Parameters + +| Name | Type | +|------------- | ------------- | +| **updateColumnSecurityRulesRequest** | [**UpdateColumnSecurityRulesRequest**](UpdateColumnSecurityRulesRequest.md) + +### Return type + +null (empty response body) + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **204** | Successfully updated column security rules | - | +| **400** | Bad request - Invalid parameters or table not found | - | +| **401** | Unauthorized access. | - | +| **403** | Forbidden - User doesn't have permission to modify security rules for this table | - | +| **500** | Internal server error | - | + + +# **updateConfig** +> RepoConfigObject updateConfig(updateConfigRequest) + + + + Version: 9.2.0.cl or later Updates Git repository configuration settings. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance on your instance, the `CAN_SETUP_VERSION_CONTROL` (**Can set up version control**) privilege. + +### Parameters + +| Name | Type | +|------------- | ------------- | +| **updateConfigRequest** | [**UpdateConfigRequest**](UpdateConfigRequest.md) + +### Return type + +[**RepoConfigObject**](RepoConfigObject.md) + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Successfully updated local repository configuration | - | +| **400** | Invalid request. | - | +| **401** | Unauthorized access. | - | +| **403** | Forbidden access. | - | +| **500** | Unexpected error | - | + + +# **updateConnection** +> updateConnection(updateConnectionRequest) + + + + Version: 9.2.0.cl or later **Important**: This endpoint is deprecated and will be removed from ThoughtSpot in September 2025. ThoughtSpot strongly recommends using the [Update connection V2](#/http/api-endpoints/connections/update-connection-v2) endpoint to update your connection objects. #### Usage guidelines Updates a connection object. Requires `DATAMANAGEMENT` (**Can manage data**) and edit permissions to the connection object, or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) privilege is required. To update a connection object, pass these parameters in your API request: 1. GUID of the connection object. 2. If you are updating tables or database schema of a connection object: a. Add the updated JSON map of metadata with database, schema, and tables in `data_warehouse_config`. b. Set `validate` to `true`. 3. If you are updating a configuration attribute, connection name, or description, you can set `validate` to `false`. + +### Parameters + +| Name | Type | +|------------- | ------------- | +| **updateConnectionRequest** | [**UpdateConnectionRequest**](UpdateConnectionRequest.md) + +### Return type + +null (empty response body) + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **204** | Connection successfully updated. | - | +| **400** | Invalid request. | - | +| **401** | Unauthorized access. | - | +| **403** | Forbidden access. | - | +| **500** | Unexpected error | - | + + +# **updateConnectionConfiguration** +> updateConnectionConfiguration(configurationIdentifier, updateConnectionConfigurationRequest) + + + + Version: 10.12.0.cl or later Updates a connection configuration object. Requires `DATAMANAGEMENT` (**Can manage data**) and edit permissions to the connection object, or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) privilege is required. #### Supported operations This API endpoint lets you perform the following operations in a single API request: * Edit the name or description of the configuration * Edit the configuration properties * Edit the `policy_type` * Edit the type of authentication * Enable or disable a configuration #### Parameterized Connection Support For parameterized oauth based connections, only the `same_as_parent` and `policy_process_options` attributes are allowed. These attributes are not applicable to connections that are not parameterized. **NOTE**: When updating a configuration where `disabled` is `true`, you must reset `disabled` to `true` in your update request payload. If not explicitly set again, the API will default `disabled` to `false`. + +### Parameters + +| Name | Type | +|------------- | ------------- | +| **configurationIdentifier** | **String** +| **updateConnectionConfigurationRequest** | [**UpdateConnectionConfigurationRequest**](UpdateConnectionConfigurationRequest.md) + +### Return type + +null (empty response body) + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **204** | Connection configuration successfully updated. | - | +| **400** | Invalid request. | - | +| **401** | Unauthorized access. | - | +| **403** | Forbidden access. | - | +| **500** | Unexpected error | - | + + +# **updateConnectionStatus** +> updateConnectionStatus(connectionIdentifier, updateConnectionStatusRequest) + + + + Version: 26.6.0.cl or later Activates or deactivates a connection. A deactivated connection cannot be used for queries or operations until it is activated again. Requires `DATAMANAGEMENT` (**Can manage data**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) privilege is required. Only the connection owner or an administrator can perform this operation. #### Usage guidelines To update the status of a connection, specify the connection GUID or name in the `connection_identifier` path parameter and the desired `status` in the request body. - **ACTIVATED**: Enables the connection. Queries and operations can resume on an activated connection. - **DEACTIVATED**: Disables the connection. It does not remove the connection metadata, but only makes the connection unavailable for queries and operations. You can reactivate a deactivated connection by setting \"status\": \"ACTIVATED\". + +### Parameters + +| Name | Type | +|------------- | ------------- | +| **connectionIdentifier** | **String** +| **updateConnectionStatusRequest** | [**UpdateConnectionStatusRequest**](UpdateConnectionStatusRequest.md) + +### Return type + +null (empty response body) + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **204** | Connection status updated successfully. | - | +| **400** | Invalid request. | - | +| **401** | Unauthorized access. | - | +| **403** | Forbidden access. | - | +| **404** | Object not found | - | +| **500** | Unexpected error | - | + + +# **updateConnectionV2** +> updateConnectionV2(connectionIdentifier, updateConnectionV2Request) + + + + Version: 10.4.0.cl or later Updates a connection object. Requires `DATAMANAGEMENT` (**Can manage data**) and edit permissions to the connection object, or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) privilege is required. To update a connection object, pass these parameters in your API request: 1. GUID of the connection object. 2. If you are updating tables or database schema of a connection object: a. Add the updated JSON map of metadata with database, schema, and tables in `data_warehouse_config`. b. Set `validate` to `true`. **NOTE:** If the `authentication_type` is anything other than SERVICE_ACCOUNT, you must explicitly provide the authenticationType property in the payload. If you do not specify authenticationType, the API will default to SERVICE_ACCOUNT as the authentication type. * A JSON map of configuration attributes, database details, and table properties in `data_warehouse_config` as shown in the following example: * This is an example of updating a single table in a empty connection: ``` { \"authenticationType\": \"SERVICE_ACCOUNT\", \"externalDatabases\": [ { \"name\": \"DEVELOPMENT\", \"isAutoCreated\": false, \"schemas\": [ { \"name\": \"TS_dataset\", \"tables\": [ { \"name\": \"DEMORENAME\", \"type\": \"TABLE\", \"description\": \"\", \"selected\": true, \"linked\": true, \"gid\": 0, \"datasetId\": \"-1\", \"subType\": \"\", \"reportId\": \"\", \"viewId\": \"\", \"columns\": [ { \"name\": \"Col1\", \"type\": \"VARCHAR\", \"canImport\": true, \"selected\": true, \"description\": \"\", \"isLinkedActive\": true, \"isAggregate\": false }, { \"name\": \"Col2\", \"type\": \"VARCHAR\", \"canImport\": true, \"selected\": true, \"description\": \"\", \"isLinkedActive\": true, \"isAggregate\": false }, { \"name\": \"Col3\", \"type\": \"VARCHAR\", \"canImport\": true, \"selected\": true, \"description\": \"\", \"isLinkedActive\": true, \"isAggregate\": false }, { \"name\": \"Col312\", \"type\": \"VARCHAR\", \"canImport\": true, \"selected\": true, \"description\": \"\", \"isLinkedActive\": true, \"isAggregate\": false }, { \"name\": \"Col4\", \"type\": \"VARCHAR\", \"canImport\": true, \"selected\": true, \"description\": \"\", \"isLinkedActive\": true, \"isAggregate\": false } ], \"relationships\": [] } ] } ] } ], \"configuration\": { \"password\": \"\", \"database\": \"DEVELOPMENT\", \"role\": \"DEV\", \"accountName\": \"thoughtspot_partner\", \"warehouse\": \"DEMO_WH\", \"user\": \"DEV_USER\" } } ``` * This is an example of updating a single table in an existing connection with tables: ``` { \"authenticationType\": \"SERVICE_ACCOUNT\", \"externalDatabases\": [ { \"name\": \"DEVELOPMENT\", \"isAutoCreated\": false, \"schemas\": [ { \"name\": \"TS_dataset\", \"tables\": [ { \"name\": \"CUSTOMER\", \"type\": \"TABLE\", \"description\": \"\", \"selected\": true, \"linked\": true, \"gid\": 0, \"datasetId\": \"-1\", \"subType\": \"\", \"reportId\": \"\", \"viewId\": \"\", \"columns\": [], \"relationships\": [] }, { \"name\": \"tpch5k_falcon_default_schema_users\", \"type\": \"TABLE\", \"description\": \"\", \"selected\": true, \"linked\": true, \"gid\": 0, \"datasetId\": \"-1\", \"subType\": \"\", \"reportId\": \"\", \"viewId\": \"\", \"columns\": [ { \"name\": \"user_id\", \"type\": \"INT64\", \"canImport\": true, \"selected\": true, \"description\": \"\", \"isLinkedActive\": true, \"isAggregate\": false }, { \"name\": \"product_id\", \"type\": \"INT64\", \"canImport\": true, \"selected\": true, \"description\": \"\", \"isLinkedActive\": true, \"isAggregate\": false }, { \"name\": \"user_cost\", \"type\": \"INT64\", \"canImport\": true, \"selected\": true, \"description\": \"\", \"isLinkedActive\": true, \"isAggregate\": false } ], \"relationships\": [] } ] } ] } ], \"configuration\": { \"password\": \"\", \"database\": \"DEVELOPMENT\", \"role\": \"DEV\", \"accountName\": \"thoughtspot_partner\", \"warehouse\": \"DEMO_WH\", \"user\": \"DEV_USER\" } } ``` 3. If you are updating a configuration attribute, connection name, or description, you can set `validate` to `false`. **NOTE:** If the `authentication_type` is anything other than SERVICE_ACCOUNT, you must explicitly provide the authenticationType property in the payload. If you do not specify authenticationType, the API will default to SERVICE_ACCOUNT as the authentication type. * A JSON map of configuration attributes in `data_warehouse_config`. The following example shows the configuration attributes for a Snowflake connection: ``` { \"configuration\":{ \"accountName\":\"thoughtspot_partner\", \"user\":\"tsadmin\", \"password\":\"TestConn123\", \"role\":\"sysadmin\", \"warehouse\":\"MEDIUM_WH\" }, \"externalDatabases\":[ ] } ``` + +### Parameters + +| Name | Type | +|------------- | ------------- | +| **connectionIdentifier** | **String** +| **updateConnectionV2Request** | [**UpdateConnectionV2Request**](UpdateConnectionV2Request.md) + +### Return type + +null (empty response body) + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **204** | Connection successfully updated. | - | +| **400** | Invalid request. | - | +| **401** | Unauthorized access. | - | +| **403** | Forbidden access. | - | +| **500** | Unexpected error | - | + + +# **updateCustomAction** +> updateCustomAction(customActionIdentifier, updateCustomActionRequest) + + + + Version: 9.6.0.cl or later Updates a custom action. Requires `DEVELOPER` (**Has Developer privilege**) or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `DEVELOPER` (**Has developer privilege**) privilege is required. #### Usage Guidelines The API allows you to modify the following properties: * Name of the custom action * Action availability to groups * Association to metadata objects * Authentication settings for a URL-based action For more information, see [Custom actions](https://developers.thoughtspot.com/docs/custom-action-intro). + +### Parameters + +| Name | Type | +|------------- | ------------- | +| **customActionIdentifier** | **String** +| **updateCustomActionRequest** | [**UpdateCustomActionRequest**](UpdateCustomActionRequest.md) + +### Return type + +null (empty response body) + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **204** | Custom action updated successfully. | - | +| **400** | Invalid request. | - | +| **401** | Unauthorized access. | - | +| **403** | Forbidden access. | - | +| **500** | Unexpected error | - | + + +# **updateDbtConnection** +> Object updateDbtConnection(dbtConnectionIdentifier, connectionName, databaseName, importType, accessToken, dbtUrl, accountId, projectId, dbtEnvId, projectName, fileContent) + + + + Version: 9.9.0.cl or later Updates a DBT connection object. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege or `DATAMANAGEMENT` (**Can manage data ThoughtSpot**) privilege, along with an existing DBT connection. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the following data control privileges may be required: - `CAN_MANAGE_CUSTOM_CALENDAR`(**Can manage custom calendars**) - `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) - `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` (**Can manage data models**) #### About update DBT connection You can modify DBT connection object properties such as embrace connection name, embrace database name, import type, account identifier, access token, project identifier and environment (or) embrace connection, embrace database name, import type, file_content settings. + +### Parameters + +| Name | Type | +|------------- | ------------- | +| **dbtConnectionIdentifier** | **String** +| **connectionName** | **String** +| **databaseName** | **String** +| **importType** | **String** +| **accessToken** | **String** +| **dbtUrl** | **String** +| **accountId** | **String** +| **projectId** | **String** +| **dbtEnvId** | **String** +| **projectName** | **String** +| **fileContent** | **File** + +### Return type + +**Object** + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + + - **Content-Type**: multipart/form-data + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | DBT Connection successfully updated. | - | +| **400** | Invalid request. | - | +| **401** | Unauthorized access. | - | +| **403** | Forbidden access. | - | +| **500** | Unexpected error | - | + + +# **updateEmailCustomization** +> updateEmailCustomization(updateEmailCustomizationRequest) + + + + Version: 10.12.0.cl or later Updates a customization configuration for the notification email. #### Pre-requisites Requires `DEVELOPER` (**has developer privilege**) or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `DEVELOPER` (**Has developer privilege**) privilege is required. **NOTE**:This endpoint in currently in beta. Contact ThoughtSpot support to enable this on your instance. #### Usage guidelines To update a custom configuration pass these parameters in your API request: - A JSON map of configuration attributes `template_properties`. The following example shows a sample set of customization configuration: ``` { { \"cta_button_bg_color\": \"#444DEA\", \"cta_text_font_color\": \"#FFFFFF\", \"primary_bg_color\": \"#D3DEF0\", \"logo_url\": \"https://storage.pardot.com/710713/1642089901EbkRibJq/TS_fullworkmark_darkmode.png\", \"font_family\": \"\", \"product_name\": \"ThoughtSpot\", \"footer_address\": \"444 Castro St, Suite 1000 Mountain View, CA 94041\", \"footer_phone\": \"(800) 508-7008\", \"replacement_value_for_liveboard\": \"Dashboard\", \"replacement_value_for_answer\": \"Chart\", \"replacement_value_for_spot_iq\": \"AI Insights\", \"hide_footer_phone\": false, \"hide_footer_address\": false, \"hide_product_name\": false, \"hide_manage_notification\": false, \"hide_mobile_app_nudge\": false, \"hide_privacy_policy\": false, \"hide_ts_vocabulary_definitions\": false, \"hide_error_message\": false, \"hide_unsubscribe_link\": false, \"hide_notification_status\": false, \"hide_modify_alert\": false, \"company_website_url\": \"https://your-website.com/\", \"company_privacy_policy_url\" : \"https://link-to-privacy-policy.com/\", \"contact_support_url\": \"https://link-to-contact-support.com/\", \"hide_contact_support_url\": false, \"hide_logo_url\" : false } } ``` + +### Parameters + +| Name | Type | +|------------- | ------------- | +| **updateEmailCustomizationRequest** | [**UpdateEmailCustomizationRequest**](UpdateEmailCustomizationRequest.md) + +### Return type + +null (empty response body) + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **204** | Email Customization configuration successfully updated. | - | +| **400** | Invalid request. | - | +| **401** | Unauthorized access. | - | +| **403** | Unauthorized access. | - | +| **500** | Unexpected error | - | + + +# **updateMetadataHeader** +> updateMetadataHeader(updateMetadataHeaderRequest) + + + + Update header attributes for a given list of header objects. Version: 10.6.0.cl or later ## Prerequisites - **Privileges Required:** - `DATAMANAGEMENT` (Can manage data) or `ADMINISTRATION` (Can administer ThoughtSpot). - **Additional Privileges (if RBAC is enabled):** - `ORG_ADMINISTRATION` (Can manage orgs). --- ## Usage Guidelines ### Parameters 1. **headers_update** - **Description:** List of header objects with their attributes to be updated. Each object contains a list of attributes to be updated in the header. - **Usage:** - You must provide either `identifier` or `obj_identifier`, but not both. Both fields cannot be empty. - When `org_identifier` is set to `-1`, only the `identifier` value is accepted; `obj_identifier` is not allowed. 2. **org_identifier** - **Description:** GUID (Globally Unique Identifier) or name of the organization. - **Usage:** - Leaving this field empty assumes that the changes should be applied to the current organization - Provide `org_guid` or `org_name` to uniquely identify the organization where changes need to be applied. . - Provide `-1` if changes have to be applied across all the org. --- ## Note Currently, this API is enabled only for updating the `obj_identifier` attribute. Only `text` will be allowed in attribute's value. ## Best Practices 1. **Backup Before Conversion:** Always export metadata as a backup before initiating the update process --- ## Examples ### Only `identifier` is given ```json { \"headers_update\": [ { \"identifier\": \"guid_1\", \"obj_identifier\": \"\", \"type\": \"LOGICAL_COLUMN\", \"attributes\": [ { \"name\": \"obj_id\", \"value\": \"custom_object_id\" } ] } ], \"org_identifier\": \"orgGuid\" } ``` ### Only `obj_identifier` is given ```json { \"headers_update\": [ { \"obj_identifier\": \"custom_object_id\", \"type\": \"ANSWER\", \"attributes\": [ { \"name\": \"obj_id\", \"value\": \"custom_object_id\" } ] } ], \"org_identifier\": \"orgName\" } ``` ### Executing update for all org `-1` ```json { \"headers_update\": [ { \"identifier\": \"guid_1\", \"type\": \"ANSWER\", \"attributes\": [ { \"name\": \"obj_id\", \"value\": \"custom_object_id\" } ] } ], \"org_identifier\": -1 } ``` ### Optional `type` is not provided ```json { \"headers_update\": [ { \"identifier\": \"guid_1\", \"attributes\": [ { \"name\": \"obj_id\", \"value\": \"custom_object_id\" } ] } ], \"org_identifier\": -1 } ``` + +### Parameters + +| Name | Type | +|------------- | ------------- | +| **updateMetadataHeaderRequest** | [**UpdateMetadataHeaderRequest**](UpdateMetadataHeaderRequest.md) + +### Return type + +null (empty response body) + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **204** | Headers update was successful. | - | +| **400** | Invalid request. | - | +| **401** | Unauthorized access. | - | +| **403** | Forbidden access. | - | +| **500** | Unexpected error | - | + + +# **updateMetadataObjId** +> updateMetadataObjId(updateMetadataObjIdRequest) + + + + Update object IDs for given metadata objects. Version: 10.8.0.cl or later ## Prerequisites - **Privileges Required:** - `DATAMANAGEMENT` (Can manage data) or `ADMINISTRATION` (Can administer ThoughtSpot). - **Additional Privileges (if RBAC is enabled):** - `ORG_ADMINISTRATION` (Can manage orgs). --- ## Usage Guidelines ### Parameters 1. **metadata** - **Description:** List of metadata objects to update their object IDs. - **Usage:** - Use either `current_obj_id` alone OR use `metadata_identifier` with `type` (when needed). - When using `metadata_identifier`, the `type` field is required if using a name instead of a GUID. - The `new_obj_id` field is always required. --- ## Note This API is specifically designed for updating object IDs of metadata objects. It internally uses the header update mechanism to perform the changes. ## Best Practices 1. **Backup Before Update:** Always export metadata as a backup before initiating the update process. 2. **Validation:** - When using `current_obj_id`, ensure it matches the existing object ID exactly. - When using `metadata_identifier` with a name, ensure the `type` is specified correctly. - Verify that the `new_obj_id` follows your naming conventions and is unique within your system. --- ## Examples ### Using current_obj_id ```json { \"metadata\": [ { \"current_obj_id\": \"existing_object_id\", \"new_obj_id\": \"new_object_id\" } ] } ``` ### Using metadata_identifier with GUID ```json { \"metadata\": [ { \"metadata_identifier\": \"01234567-89ab-cdef-0123-456789abcdef\", \"new_obj_id\": \"new_object_id\" } ] } ``` ### Using metadata_identifier with name and type ```json { \"metadata\": [ { \"metadata_identifier\": \"My Answer\", \"type\": \"ANSWER\", \"new_obj_id\": \"new_object_id\" } ] } ``` ### Multiple objects update ```json { \"metadata\": [ { \"current_obj_id\": \"existing_object_id_1\", \"new_obj_id\": \"new_object_id_1\" }, { \"metadata_identifier\": \"My Worksheet\", \"type\": \"LOGICAL_TABLE\", \"new_obj_id\": \"new_object_id_2\" } ] } ``` + +### Parameters + +| Name | Type | +|------------- | ------------- | +| **updateMetadataObjIdRequest** | [**UpdateMetadataObjIdRequest**](UpdateMetadataObjIdRequest.md) + +### Return type + +null (empty response body) + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **204** | Headers update was successful. | - | +| **400** | Invalid request. | - | +| **401** | Unauthorized access. | - | +| **403** | Forbidden access. | - | +| **500** | Unexpected error | - | + + +# **updateOrg** +> updateOrg(orgIdentifier, updateOrgRequest) + + + + Version: 9.0.0.cl or later Updates an Org object. You can modify Org properties such as name, description, and user associations. Requires cluster administration (**Can administer Org**) privileges. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `ORG_ADMINISTRATION` (**Can manage Orgs**) privilege is required. + +### Parameters + +| Name | Type | +|------------- | ------------- | +| **orgIdentifier** | **String** +| **updateOrgRequest** | [**UpdateOrgRequest**](UpdateOrgRequest.md) + +### Return type + +null (empty response body) + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **204** | Organization successfully updated. | - | +| **400** | Invalid request. | - | +| **401** | Unauthorized access. | - | +| **403** | Forbidden access. | - | +| **500** | Unexpected error | - | + + +# **updateRole** +> RoleResponse updateRole(roleIdentifier, updateRoleRequest) + + + + Version: 9.5.0.cl or later Updates the properties of a Role object. Available only if [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance. To update a Role, the `ROLE_ADMINISTRATION` (**Can manage roles**) privilege is required. + +### Parameters + +| Name | Type | +|------------- | ------------- | +| **roleIdentifier** | **String** +| **updateRoleRequest** | [**UpdateRoleRequest**](UpdateRoleRequest.md) + +### Return type + +[**RoleResponse**](RoleResponse.md) + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Role successfully updated. | - | +| **400** | Invalid request. | - | +| **401** | Unauthorized access. | - | +| **403** | Forbidden access. | - | +| **500** | Unexpected error | - | + + +# **updateSchedule** +> updateSchedule(scheduleIdentifier, updateScheduleRequest) + + + + Update schedule. Version: 9.4.0.cl or later Updates a scheduled Liveboard job. Requires at least edit access to Liveboards. To update a schedule on behalf of another user, you need `ADMINISTRATION` (**Can administer Org**) or `JOBSCHEDULING` (**Can schedule for others**) privilege and edit access to the Liveboard. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `JOBSCHEDULING` (**Can schedule for others**) privilege is required. The API endpoint allows you to pause a scheduled job, change the status of a paused job. You can also edit the recipients list, frequency of the job, format of the file to send to the recipients in email notifications, PDF options, and time zone setting. + +### Parameters + +| Name | Type | +|------------- | ------------- | +| **scheduleIdentifier** | **String** +| **updateScheduleRequest** | [**UpdateScheduleRequest**](UpdateScheduleRequest.md) + +### Return type + +null (empty response body) + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **204** | Schedule successfully updated. | - | +| **400** | Invalid request. | - | +| **401** | Unauthorized access. | - | +| **403** | Forbidden access. | - | +| **500** | Unexpected error | - | + + +# **updateSystemConfig** +> updateSystemConfig(updateSystemConfigRequest) + + + + Version: 9.2.0.cl or later Updates the current configuration of the cluster. You must send the configuration data in JSON format. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privileges. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `APPLICATION_ADMINISTRATION` (**Can manage application settings**) privilege is required. + +### Parameters + +| Name | Type | +|------------- | ------------- | +| **updateSystemConfigRequest** | [**UpdateSystemConfigRequest**](UpdateSystemConfigRequest.md) + +### Return type + +null (empty response body) + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **204** | Configuration successfully updated. | - | +| **400** | Invalid request. | - | +| **401** | Unauthorized access. | - | +| **403** | Forbidden access. | - | +| **500** | Unexpected error | - | + + +# **updateTag** +> updateTag(tagIdentifier, updateTagRequest) + + + + Version: 9.0.0.cl or later Updates a tag object. You can modify the `name` and `color` properties of a tag object. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `TAGMANAGEMENT` (**Can manage tags**) privilege is required to create, edit, and delete tags. + +### Parameters + +| Name | Type | +|------------- | ------------- | +| **tagIdentifier** | **String** +| **updateTagRequest** | [**UpdateTagRequest**](UpdateTagRequest.md) + +### Return type + +null (empty response body) + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **204** | Tag successfully updated. | - | +| **400** | Invalid request. | - | +| **401** | Unauthorized access. | - | +| **403** | Forbidden access. | - | +| **500** | Unexpected error | - | + + +# **updateUser** +> updateUser(userIdentifier, updateUserRequest) + + + + Version: 9.0.0.cl or later Updates the properties of a user object. You can modify user properties such as username, email, and share notification settings. You can also assign new groups and Orgs, remove the user from a group or Org, reset password, and modify user preferences. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `USER_ADMINISTRATION` (**Can manage users**) privilege is required. + +### Parameters + +| Name | Type | +|------------- | ------------- | +| **userIdentifier** | **String** +| **updateUserRequest** | [**UpdateUserRequest**](UpdateUserRequest.md) + +### Return type + +null (empty response body) + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **204** | User successfully updated. | - | +| **400** | Invalid request. | - | +| **401** | Unauthorized access. | - | +| **403** | Forbidden access. | - | +| **500** | Unexpected error | - | + + +# **updateUserGroup** +> updateUserGroup(groupIdentifier, updateUserGroupRequest) + + + + Version: 9.0.0.cl or later Updates the properties of a group object in ThoughtSpot. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `GROUP_ADMINISTRATION` (**Can manage groups**) privilege is required. #### Supported operations This API endpoint lets you perform the following operations in a single API request: * Edit [privileges](https://developers.thoughtspot.com/docs/?pageid=api-user-management#group-privileges) * Add or remove users * Change sharing visibility settings * Add or remove sub-groups * Assign a default Liveboard or update the existing settings + +### Parameters + +| Name | Type | +|------------- | ------------- | +| **groupIdentifier** | **String** +| **updateUserGroupRequest** | [**UpdateUserGroupRequest**](UpdateUserGroupRequest.md) + +### Return type + +null (empty response body) + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **204** | User group successfully updated. | - | +| **400** | Invalid request. | - | +| **401** | Unauthorized access. | - | +| **403** | Forbidden access. | - | +| **500** | Unexpected error | - | + + +# **updateVariable** +> updateVariable(identifier, updateVariableRequest) + + + + Update a variable's name Version: 26.4.0.cl or later Allows updating a variable's name in ThoughtSpot. Requires ADMINISTRATION role and TENANT scope. The CAN_MANAGE_VARIABLES permission allows you to manage Formula Variables in the current organization scope. The API endpoint allows updating: * The variable name + +### Parameters + +| Name | Type | +|------------- | ------------- | +| **identifier** | **String** +| **updateVariableRequest** | [**UpdateVariableRequest**](UpdateVariableRequest.md) + +### Return type + +null (empty response body) + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **204** | Variable name updated successfully. | - | +| **400** | Invalid request. | - | +| **401** | Unauthorized access. | - | +| **403** | Forbidden access. | - | +| **500** | Unexpected error | - | + + +# **updateVariableValues** +> updateVariableValues(updateVariableValuesRequest) + + + + Update values for multiple variables Version: 10.14.0.cl or later **Note:** This API endpoint is deprecated and will be removed from ThoughtSpot in a future release. Use [POST /api/rest/2.0/template/variables/{identifier}/update-values](/api/rest/2.0/template/variables/%7Bidentifier%7D/update-values) instead. Allows updating values for multiple variables in ThoughtSpot. Requires ADMINISTRATION role. The CAN_MANAGE_VARIABLES permission allows you to manage Formula Variables in the current organization scope. The API endpoint allows: * Adding new values to variables * Replacing existing values * Deleting values from variables When updating variable values, you need to specify: * The variable identifiers * The values to add/replace/remove for each variable * The operation to perform (ADD, REPLACE, REMOVE, RESET) Behaviour based on operation type: * ADD - Adds values to the variable if this is a list type variable, else same as replace. * REPLACE - Replaces all values of a given set of constraints with the current set of values. * REMOVE - Removes any values which match the set of conditions of the variables if this is a list type variable, else clears value. * RESET - Removes all constrains for a given variable, scope is ignored + +### Parameters + +| Name | Type | +|------------- | ------------- | +| **updateVariableValuesRequest** | [**UpdateVariableValuesRequest**](UpdateVariableValuesRequest.md) + +### Return type + +null (empty response body) + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **204** | Variable values updated successfully. | - | +| **400** | Invalid request. | - | +| **401** | Unauthorized access. | - | +| **403** | Forbidden access. | - | +| **500** | Unexpected error | - | + + +# **updateWebhookConfiguration** +> updateWebhookConfiguration(webhookIdentifier, updateWebhookConfigurationRequest) + + + + Version: 10.14.0.cl or later Updates an existing webhook configuration by its unique id or name. Only the provided fields will be updated. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) or `DEVELOPER` (**Has developer privilege**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, users with `CAN_MANAGE_WEBHOOKS` (**Can manage webhooks**) privilege are also authorized to perform this action. + +### Parameters + +| Name | Type | +|------------- | ------------- | +| **webhookIdentifier** | **String** +| **updateWebhookConfigurationRequest** | [**UpdateWebhookConfigurationRequest**](UpdateWebhookConfigurationRequest.md) + +### Return type + +null (empty response body) + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **204** | Webhook configuration updated successfully | - | +| **400** | Invalid request. | - | +| **401** | Unauthorized access. | - | +| **403** | Forbidden access. | - | +| **500** | Unexpected error | - | + + +# **validateCommunicationChannel** +> CommunicationChannelValidateResponse validateCommunicationChannel(validateCommunicationChannelRequest) + + + + Version: 26.4.0.cl or later Validates a communication channel configuration to ensure it is properly set up and can receive events. - Use `channel_type` to specify the type of communication channel to validate (e.g., WEBHOOK). - Use `channel_identifier` to provide the unique identifier or name for the communication channel. - Use `event_type` to specify the event type to validate for this channel. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) or `DEVELOPER` (**Has developer privilege**) privilege. For webhook channels, users with `CAN_MANAGE_WEBHOOKS` (**Can manage webhooks**) privilege are also authorized to perform this action. + +### Parameters + +| Name | Type | +|------------- | ------------- | +| **validateCommunicationChannelRequest** | [**ValidateCommunicationChannelRequest**](ValidateCommunicationChannelRequest.md) + +### Return type + +[**CommunicationChannelValidateResponse**](CommunicationChannelValidateResponse.md) + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | communication channel configuration validated successfully. | - | +| **400** | Invalid request. | - | +| **401** | Unauthorized access. | - | +| **403** | Forbidden access. | - | +| **500** | Unexpected error | - | + + +# **validateEmailCustomization** +> validateEmailCustomization() + + + + Version: 10.10.0.cl or later Validates the email customization configuration if any set for the ThoughtSpot system. #### Pre-requisites Requires `DEVELOPER` (**has developer privilege**) or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `DEVELOPER` (**Has developer privilege**) privilege is required. **NOTE**:This endpoint in currently in beta. Contact ThoughtSpot support to enable this on your instance. + +### Parameters +This endpoint does not need any parameter. + +### Return type + +null (empty response body) + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **204** | Triggered test email for customization configuration | - | +| **400** | Invalid request. | - | +| **403** | Unauthorized access. | - | +| **500** | Unexpected error | - | + + +# **validateMerge** +> List<DeployResponse> validateMerge(validateMergeRequest) + + + + Version: 9.2.0.cl or later Validates the content of your source branch against the objects in your destination environment. Before merging content from your source branch to the destination branch, run this API operation from your destination environment and ensure that the changes from the source branch function in the destination environment. Requires `DATAMANAGEMENT` (**Can manage data**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance on your instance, the `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` (**Can manage data models**) privilege and edit access to the metadata objects. + +### Parameters + +| Name | Type | +|------------- | ------------- | +| **validateMergeRequest** | [**ValidateMergeRequest**](ValidateMergeRequest.md) + +### Return type + +[**List<DeployResponse>**](DeployResponse.md) + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | validation done successfully | - | +| **400** | Invalid request. | - | +| **401** | Unauthorized access. | - | +| **403** | Forbidden access. | - | +| **500** | Unexpected error | - | + + +# **validateToken** +> TokenValidationResponse validateToken(validateTokenRequest) + + + + Version: 9.12.0.cl or later Validates the authentication token specified in the API request. If your token is not valid, [Get a new token](#/http/api-endpoints/authentication/get-full-access-token). + +### Parameters + +| Name | Type | +|------------- | ------------- | +| **validateTokenRequest** | [**ValidateTokenRequest**](ValidateTokenRequest.md) + +### Return type + +[**TokenValidationResponse**](TokenValidationResponse.md) + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Token validation successful. | - | +| **400** | Invalid request. | - | +| **401** | Unauthorized access. | - | +| **403** | Forbidden access. | - | +| **500** | Unexpected error | - | + diff --git a/sdks/java/docs/Token.md b/sdks/java/docs/Token.md new file mode 100644 index 000000000..a78d2e9e0 --- /dev/null +++ b/sdks/java/docs/Token.md @@ -0,0 +1,22 @@ + + +# Token + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**token** | **String** | Bearer auth token. | | +|**creationTimeInMillis** | **Float** | Token creation time in milliseconds. | | +|**expirationTimeInMillis** | **Float** | Token expiration time in milliseconds. | | +|**scope** | [**Scope**](Scope.md) | | | +|**validForUserId** | **String** | Username to whom the token is issued. | | +|**validForUsername** | **String** | Unique identifier of the user to whom the token is issued. | | + + +## Implemented Interfaces + +* Serializable + + diff --git a/sdks/java/docs/TokenAccessScopeObject.md b/sdks/java/docs/TokenAccessScopeObject.md new file mode 100644 index 000000000..0e232d0bb --- /dev/null +++ b/sdks/java/docs/TokenAccessScopeObject.md @@ -0,0 +1,27 @@ + + +# TokenAccessScopeObject + +Objects on which the filter rules and parameters values should be applied to + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**type** | [**TypeEnum**](#TypeEnum) | Type of object. Required if the name of the object is set as the identifier. This attribute is optional when the object GUID is specified as the identifier. Specify the object type as `LOGICAL_TABLE`. | [optional] | +|**identifier** | **String** | Unique name/id of the object. | | + + + +## Enum: TypeEnum + +| Name | Value | +|---- | -----| +| LOGICAL_TABLE | "LOGICAL_TABLE" | + + +## Implemented Interfaces + +* Serializable + + diff --git a/sdks/java/docs/TokenValidationResponse.md b/sdks/java/docs/TokenValidationResponse.md new file mode 100644 index 000000000..b48612f93 --- /dev/null +++ b/sdks/java/docs/TokenValidationResponse.md @@ -0,0 +1,21 @@ + + +# TokenValidationResponse + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**creationTimeInMillis** | **Float** | Token creation time in milliseconds. | | +|**expirationTimeInMillis** | **Float** | Token expiration time in milliseconds. | | +|**scope** | [**Scope**](Scope.md) | | | +|**validForUserId** | **String** | Username to whom the token is issued. | | +|**tokenType** | **String** | Type of token. | | + + +## Implemented Interfaces + +* Serializable + + diff --git a/sdks/java/docs/URL.md b/sdks/java/docs/URL.md new file mode 100644 index 000000000..922f14dfd --- /dev/null +++ b/sdks/java/docs/URL.md @@ -0,0 +1,21 @@ + + +# URL + +URL Custom Action Type + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**authentication** | [**Authentication**](Authentication.md) | | [optional] | +|**parameters** | [**List<ParametersListItem>**](ParametersListItem.md) | Query parameters for url. | [optional] | +|**url** | **String** | Request Url for the Custom action. | | +|**reference** | **String** | Reference name of the SDK. By default, the value will be set to action name. | [optional] | + + +## Implemented Interfaces + +* Serializable + + diff --git a/sdks/java/docs/URLInput.md b/sdks/java/docs/URLInput.md new file mode 100644 index 000000000..64066c03d --- /dev/null +++ b/sdks/java/docs/URLInput.md @@ -0,0 +1,21 @@ + + +# URLInput + +URL Custom Action Type + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**authentication** | [**AuthenticationInput**](AuthenticationInput.md) | | [optional] | +|**parameters** | [**List<ParametersListItemInput>**](ParametersListItemInput.md) | Query parameters for url. | [optional] | +|**url** | **String** | Request Url for the Custom action. | [optional] | +|**reference** | **String** | Reference name. By default the value will be set to action name | [optional] | + + +## Implemented Interfaces + +* Serializable + + diff --git a/sdks/java/docs/URLInputMandatory.md b/sdks/java/docs/URLInputMandatory.md new file mode 100644 index 000000000..7f3b1358e --- /dev/null +++ b/sdks/java/docs/URLInputMandatory.md @@ -0,0 +1,21 @@ + + +# URLInputMandatory + +URL Custom Action Type + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**authentication** | [**AuthenticationInput**](AuthenticationInput.md) | | [optional] | +|**parameters** | [**List<ParametersListItemInput>**](ParametersListItemInput.md) | Query parameters for url. | [optional] | +|**url** | **String** | Request Url for the Custom action. | | +|**reference** | **String** | Reference name. By default the value will be set to action name | [optional] | + + +## Implemented Interfaces + +* Serializable + + diff --git a/sdks/java/docs/UnassignTagRequest.md b/sdks/java/docs/UnassignTagRequest.md new file mode 100644 index 000000000..0cf3b18e8 --- /dev/null +++ b/sdks/java/docs/UnassignTagRequest.md @@ -0,0 +1,18 @@ + + +# UnassignTagRequest + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**metadata** | [**List<TagMetadataTypeInput>**](TagMetadataTypeInput.md) | Metadata objects. | | +|**tagIdentifiers** | **List<String>** | GUID or name of the tag. | | + + +## Implemented Interfaces + +* Serializable + + diff --git a/sdks/java/docs/UnparameterizeMetadataRequest.md b/sdks/java/docs/UnparameterizeMetadataRequest.md new file mode 100644 index 000000000..7076b9157 --- /dev/null +++ b/sdks/java/docs/UnparameterizeMetadataRequest.md @@ -0,0 +1,40 @@ + + +# UnparameterizeMetadataRequest + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**metadataType** | [**MetadataTypeEnum**](#MetadataTypeEnum) | Type of metadata object to unparameterize. | [optional] | +|**metadataIdentifier** | **String** | Unique ID or name of the metadata object to unparameterize. | | +|**fieldType** | [**FieldTypeEnum**](#FieldTypeEnum) | Type of field in the metadata to unparameterize. | | +|**fieldName** | **String** | Name of the field which needs to be unparameterized. | | +|**value** | **String** | The value to use in place of the variable for the field | | + + + +## Enum: MetadataTypeEnum + +| Name | Value | +|---- | -----| +| LOGICAL_TABLE | "LOGICAL_TABLE" | +| CONNECTION | "CONNECTION" | +| CONNECTION_CONFIG | "CONNECTION_CONFIG" | + + + +## Enum: FieldTypeEnum + +| Name | Value | +|---- | -----| +| ATTRIBUTE | "ATTRIBUTE" | +| CONNECTION_PROPERTY | "CONNECTION_PROPERTY" | + + +## Implemented Interfaces + +* Serializable + + diff --git a/sdks/java/docs/UnpublishMetadataRequest.md b/sdks/java/docs/UnpublishMetadataRequest.md new file mode 100644 index 000000000..1c5bee5bd --- /dev/null +++ b/sdks/java/docs/UnpublishMetadataRequest.md @@ -0,0 +1,20 @@ + + +# UnpublishMetadataRequest + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**force** | **Boolean** | Force unpublishes the object. This will break all the dependent objects in the unpublished orgs. | [optional] | +|**includeDependencies** | **Boolean** | Should we unpublish all the dependencies for the objects specified. The dependencies will be unpublished if no other published object is using it. | | +|**metadata** | [**List<PublishMetadataListItem>**](PublishMetadataListItem.md) | Metadata objects. | | +|**orgIdentifiers** | **List<String>** | Unique ID or name of orgs. | | + + +## Implemented Interfaces + +* Serializable + + diff --git a/sdks/java/docs/UpdateCalendarRequest.md b/sdks/java/docs/UpdateCalendarRequest.md new file mode 100644 index 000000000..e85cee470 --- /dev/null +++ b/sdks/java/docs/UpdateCalendarRequest.md @@ -0,0 +1,78 @@ + + +# UpdateCalendarRequest + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**updateMethod** | [**UpdateMethodEnum**](#UpdateMethodEnum) | Type of update operation. | [optional] | +|**tableReference** | [**ExternalTableInput**](ExternalTableInput.md) | Table reference containing connection identifier and table details in this format: `{\"connection_identifier\":\"conn1\", \"database_name\":\"db1\", \"schema_name\":\"sc1\", \"table_name\":\"tb1\"}`. | | +|**startDate** | **String** | Start date for the calendar in `MM/dd/yyyy` format. This parameter is mandatory if `update_method` is set as `FROM_INPUT_PARAMS`. | [optional] | +|**endDate** | **String** | End date for the calendar in `MM/dd/yyyy` format. This parameter is mandatory if `update_method` is set as `FROM_INPUT_PARAMS`. | [optional] | +|**calendarType** | [**CalendarTypeEnum**](#CalendarTypeEnum) | Type of the calendar. | [optional] | +|**monthOffset** | [**MonthOffsetEnum**](#MonthOffsetEnum) | Specify the month in which the fiscal or custom calendar year should start. For example, if you set `month_offset` to \"April\", the custom calendar will treat \"April\" as the first month of the year, and the related attributes such as quarters and start date will be based on this offset. The default value is `January`, which represents the standard calendar year (January to December). | [optional] | +|**startDayOfWeek** | [**StartDayOfWeekEnum**](#StartDayOfWeekEnum) | Specify the starting day of the week | [optional] | +|**quarterNamePrefix** | **String** | Prefix to add before the quarter. | [optional] | +|**yearNamePrefix** | **String** | Prefix to add before the year. | [optional] | + + + +## Enum: UpdateMethodEnum + +| Name | Value | +|---- | -----| +| FROM_INPUT_PARAMS | "FROM_INPUT_PARAMS" | +| FROM_EXISTING_TABLE | "FROM_EXISTING_TABLE" | + + + +## Enum: CalendarTypeEnum + +| Name | Value | +|---- | -----| +| MONTH_OFFSET | "MONTH_OFFSET" | +| FOUR_FOUR_FIVE | "FOUR_FOUR_FIVE" | +| FOUR_FIVE_FOUR | "FOUR_FIVE_FOUR" | +| FIVE_FOUR_FOUR | "FIVE_FOUR_FOUR" | + + + +## Enum: MonthOffsetEnum + +| Name | Value | +|---- | -----| +| JANUARY | "January" | +| FEBRUARY | "February" | +| MARCH | "March" | +| APRIL | "April" | +| MAY | "May" | +| JUNE | "June" | +| JULY | "July" | +| AUGUST | "August" | +| SEPTEMBER | "September" | +| OCTOBER | "October" | +| NOVEMBER | "November" | +| DECEMBER | "December" | + + + +## Enum: StartDayOfWeekEnum + +| Name | Value | +|---- | -----| +| SUNDAY | "Sunday" | +| MONDAY | "Monday" | +| TUESDAY | "Tuesday" | +| WEDNESDAY | "Wednesday" | +| THURSDAY | "Thursday" | +| FRIDAY | "Friday" | +| SATURDAY | "Saturday" | + + +## Implemented Interfaces + +* Serializable + + diff --git a/sdks/java/docs/UpdateCollectionRequest.md b/sdks/java/docs/UpdateCollectionRequest.md new file mode 100644 index 000000000..b1d6187f6 --- /dev/null +++ b/sdks/java/docs/UpdateCollectionRequest.md @@ -0,0 +1,30 @@ + + +# UpdateCollectionRequest + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**name** | **String** | Name of the collection. | [optional] | +|**description** | **String** | Description of the collection. | [optional] | +|**metadata** | [**List<CollectionMetadataInput>**](CollectionMetadataInput.md) | Metadata objects to add, remove, or replace in the collection. | [optional] | +|**operation** | [**OperationEnum**](#OperationEnum) | Type of update operation. Default operation type is REPLACE. | [optional] | + + + +## Enum: OperationEnum + +| Name | Value | +|---- | -----| +| ADD | "ADD" | +| REMOVE | "REMOVE" | +| REPLACE | "REPLACE" | + + +## Implemented Interfaces + +* Serializable + + diff --git a/sdks/java/docs/UpdateColumnSecurityRulesRequest.md b/sdks/java/docs/UpdateColumnSecurityRulesRequest.md new file mode 100644 index 000000000..83c59b4b5 --- /dev/null +++ b/sdks/java/docs/UpdateColumnSecurityRulesRequest.md @@ -0,0 +1,20 @@ + + +# UpdateColumnSecurityRulesRequest + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**identifier** | **String** | GUID or name of the table for which we want to create column security rules | [optional] | +|**objIdentifier** | **String** | The object ID of the table | [optional] | +|**clearCsr** | **Boolean** | If true, then all the secured columns will be marked as unprotected, and all the group associations will be removed | [optional] | +|**columnSecurityRules** | [**List<ColumnSecurityRuleUpdate>**](ColumnSecurityRuleUpdate.md) | Array where each object defines the security rule for a specific column | | + + +## Implemented Interfaces + +* Serializable + + diff --git a/sdks/java/docs/UpdateConfigRequest.md b/sdks/java/docs/UpdateConfigRequest.md new file mode 100644 index 000000000..d7ab761b9 --- /dev/null +++ b/sdks/java/docs/UpdateConfigRequest.md @@ -0,0 +1,23 @@ + + +# UpdateConfigRequest + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**username** | **String** | Username to authenticate connection to version control system | [optional] | +|**accessToken** | **String** | Access token corresponding to the user to authenticate connection to version control system | [optional] | +|**orgIdentifier** | **String** | Applicable when Orgs is enabled in the cluster List of Org ids or name. Provide value -1 for cluster level. Example : [\"OrgID1-or-Name1\", \"OrgID2-or-Name2\"] Note: If no value is specified, then the configurations will be returned for all orgs the user has access to Version: 9.5.0.cl or later | [optional] | +|**branchNames** | **List<String>** | List the remote branches to configure. Example:[development, production] | [optional] | +|**commitBranchName** | **String** | Name of the remote branch where objects from this Thoughtspot instance will be versioned. Version: 9.7.0.cl or later | [optional] | +|**enableGuidMapping** | **Boolean** | Maintain mapping of guid for the deployment to an instance Version: 9.4.0.cl or later | [optional] | +|**configurationBranchName** | **String** | Name of the branch where the configuration files related to operations between Thoughtspot and version control repo should be maintained. Version: 9.7.0.cl or later | [optional] | + + +## Implemented Interfaces + +* Serializable + + diff --git a/sdks/java/docs/UpdateConnectionConfigurationRequest.md b/sdks/java/docs/UpdateConnectionConfigurationRequest.md new file mode 100644 index 000000000..9258d43f1 --- /dev/null +++ b/sdks/java/docs/UpdateConnectionConfigurationRequest.md @@ -0,0 +1,62 @@ + + +# UpdateConnectionConfigurationRequest + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**connectionIdentifier** | **String** | Unique ID or name of the connection. | | +|**name** | **String** | Name of the configuration to update. | [optional] | +|**description** | **String** | Description of the configuration. | [optional] | +|**sameAsParent** | **Boolean** | Specifies whether the connection configuration should inherit all properties and authentication type from its parent connection. This attribute is only applicable to parameterized connections. When set to true, the configuration uses only the connection properties and authentication type inherited from the parent. Version: 26.2.0.cl or later | [optional] | +|**policyProcessOptions** | [**PolicyProcessOptionsInput**](PolicyProcessOptionsInput.md) | This attribute is only applicable to parameterized connections. Ensure that the policy is set to Processes to allow the configuration to be used exclusively for system processes. Version: 26.2.0.cl or later | [optional] | +|**authenticationType** | [**AuthenticationTypeEnum**](#AuthenticationTypeEnum) | Type of authentication. | [optional] | +|**_configuration** | **Object** | Configuration properties in JSON. | [optional] | +|**policyType** | [**PolicyTypeEnum**](#PolicyTypeEnum) | Type of policy. | [optional] | +|**policyPrincipals** | **List<String>** | Unique ID or name of the User and User Groups. | [optional] | +|**policyProcesses** | [**List<PolicyProcessesEnum>**](#List<PolicyProcessesEnum>) | Action that the query performed on the data warehouse, such as SAGE_INDEXING and ROW_COUNT_STATS. | [optional] | +|**disable** | **Boolean** | Indicates whether the configuration enable/disable. | [optional] | + + + +## Enum: AuthenticationTypeEnum + +| Name | Value | +|---- | -----| +| SERVICE_ACCOUNT | "SERVICE_ACCOUNT" | +| OAUTH | "OAUTH" | +| OAUTH_WITH_SERVICE_PRINCIPAL | "OAUTH_WITH_SERVICE_PRINCIPAL" | +| EXTOAUTH | "EXTOAUTH" | +| KEY_PAIR | "KEY_PAIR" | +| EXTOAUTH_WITH_PKCE | "EXTOAUTH_WITH_PKCE" | +| OAUTH_WITH_PKCE | "OAUTH_WITH_PKCE" | +| PERSONAL_ACCESS_TOKEN | "PERSONAL_ACCESS_TOKEN" | +| OAUTH_CLIENT_CREDENTIALS | "OAUTH_CLIENT_CREDENTIALS" | + + + +## Enum: PolicyTypeEnum + +| Name | Value | +|---- | -----| +| NO_POLICY | "NO_POLICY" | +| PRINCIPALS | "PRINCIPALS" | +| PROCESSES | "PROCESSES" | + + + +## Enum: List<PolicyProcessesEnum> + +| Name | Value | +|---- | -----| +| SAGE_INDEXING | "SAGE_INDEXING" | +| ROW_COUNT_STATS | "ROW_COUNT_STATS" | + + +## Implemented Interfaces + +* Serializable + + diff --git a/sdks/java/docs/UpdateConnectionRequest.md b/sdks/java/docs/UpdateConnectionRequest.md new file mode 100644 index 000000000..48b7cf632 --- /dev/null +++ b/sdks/java/docs/UpdateConnectionRequest.md @@ -0,0 +1,21 @@ + + +# UpdateConnectionRequest + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**connectionIdentifier** | **String** | Unique ID or name of the connection. | | +|**name** | **String** | Updated name of the connection. | [optional] | +|**description** | **String** | Updated description of the connection. | [optional] | +|**dataWarehouseConfig** | **Object** | Configuration of the data warehouse in JSON. | [optional] | +|**validate** | **Boolean** | Indicates whether to validate the connection details. | [optional] | + + +## Implemented Interfaces + +* Serializable + + diff --git a/sdks/java/docs/UpdateConnectionStatusRequest.md b/sdks/java/docs/UpdateConnectionStatusRequest.md new file mode 100644 index 000000000..378abcfb0 --- /dev/null +++ b/sdks/java/docs/UpdateConnectionStatusRequest.md @@ -0,0 +1,26 @@ + + +# UpdateConnectionStatusRequest + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**status** | [**StatusEnum**](#StatusEnum) | Status to set for the connection. Use ACTIVATED to enable the connection or DEACTIVATED to disable it. | [optional] | + + + +## Enum: StatusEnum + +| Name | Value | +|---- | -----| +| ACTIVATED | "ACTIVATED" | +| DEACTIVATED | "DEACTIVATED" | + + +## Implemented Interfaces + +* Serializable + + diff --git a/sdks/java/docs/UpdateConnectionV2Request.md b/sdks/java/docs/UpdateConnectionV2Request.md new file mode 100644 index 000000000..8fe29575f --- /dev/null +++ b/sdks/java/docs/UpdateConnectionV2Request.md @@ -0,0 +1,20 @@ + + +# UpdateConnectionV2Request + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**name** | **String** | Updated name of the connection. | [optional] | +|**description** | **String** | Updated description of the connection. | [optional] | +|**dataWarehouseConfig** | **Object** | Configuration of the data warehouse in JSON. | [optional] | +|**validate** | **Boolean** | Indicates whether to validate the connection details. | [optional] | + + +## Implemented Interfaces + +* Serializable + + diff --git a/sdks/java/docs/UpdateCustomActionRequest.md b/sdks/java/docs/UpdateCustomActionRequest.md new file mode 100644 index 000000000..17d868511 --- /dev/null +++ b/sdks/java/docs/UpdateCustomActionRequest.md @@ -0,0 +1,31 @@ + + +# UpdateCustomActionRequest + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**actionDetails** | [**ActionDetailsInput**](ActionDetailsInput.md) | Action details includes `Type` and Configuration for Custom Actions, either Callback or URL is required. | [optional] | +|**associateMetadata** | [**List<AssociateMetadataInput>**](AssociateMetadataInput.md) | Metadata objects to which the custom action needs to be associated. | [optional] | +|**defaultActionConfig** | [**DefaultActionConfigInput**](DefaultActionConfigInput.md) | Default Custom action configuration. This includes if the custom action available on visualizations and Answers. By default, a custom action is added to all visualizations and Answers. | [optional] | +|**groupIdentifiers** | **List<String>** | Unique ID or name of the groups that can view and access the custom action. | [optional] | +|**name** | **String** | Name of the custom action. The custom action name must be unique. | [optional] | +|**operation** | [**OperationEnum**](#OperationEnum) | Type of update operation. Default operation type is ADD | [optional] | + + + +## Enum: OperationEnum + +| Name | Value | +|---- | -----| +| ADD | "ADD" | +| REMOVE | "REMOVE" | + + +## Implemented Interfaces + +* Serializable + + diff --git a/sdks/java/docs/UpdateEmailCustomizationRequest.md b/sdks/java/docs/UpdateEmailCustomizationRequest.md new file mode 100644 index 000000000..3bffc382e --- /dev/null +++ b/sdks/java/docs/UpdateEmailCustomizationRequest.md @@ -0,0 +1,18 @@ + + +# UpdateEmailCustomizationRequest + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**templateProperties** | [**TemplatePropertiesInputCreate**](TemplatePropertiesInputCreate.md) | Email customization configuration as key value pair | | +|**orgIdentifier** | **String** | Unique ID or name of org | [optional] | + + +## Implemented Interfaces + +* Serializable + + diff --git a/sdks/java/docs/UpdateMetadataHeaderRequest.md b/sdks/java/docs/UpdateMetadataHeaderRequest.md new file mode 100644 index 000000000..3017c11de --- /dev/null +++ b/sdks/java/docs/UpdateMetadataHeaderRequest.md @@ -0,0 +1,18 @@ + + +# UpdateMetadataHeaderRequest + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**headersUpdate** | [**List<HeaderUpdateInput>**](HeaderUpdateInput.md) | List of header objects to update. | | +|**orgIdentifier** | **String** | Unique ID or name of the organization. | [optional] | + + +## Implemented Interfaces + +* Serializable + + diff --git a/sdks/java/docs/UpdateMetadataObjIdRequest.md b/sdks/java/docs/UpdateMetadataObjIdRequest.md new file mode 100644 index 000000000..cb1098e54 --- /dev/null +++ b/sdks/java/docs/UpdateMetadataObjIdRequest.md @@ -0,0 +1,17 @@ + + +# UpdateMetadataObjIdRequest + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**metadata** | [**List<UpdateObjIdInput>**](UpdateObjIdInput.md) | List of metadata objects to update their object IDs. | | + + +## Implemented Interfaces + +* Serializable + + diff --git a/sdks/java/docs/UpdateObjIdInput.md b/sdks/java/docs/UpdateObjIdInput.md new file mode 100644 index 000000000..ea56fa496 --- /dev/null +++ b/sdks/java/docs/UpdateObjIdInput.md @@ -0,0 +1,36 @@ + + +# UpdateObjIdInput + +Input for updating object ID of a metadata object. + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**metadataIdentifier** | **String** | GUID or name of the metadata object. | [optional] | +|**type** | [**TypeEnum**](#TypeEnum) | Type of metadata. Required if metadata_identifier is name of the object. | [optional] | +|**currentObjId** | **String** | Current object ID value. | [optional] | +|**newObjId** | **String** | New object ID value to set. | | + + + +## Enum: TypeEnum + +| Name | Value | +|---- | -----| +| ANSWER | "ANSWER" | +| LOGICAL_TABLE | "LOGICAL_TABLE" | +| LOGICAL_COLUMN | "LOGICAL_COLUMN" | +| LIVEBOARD | "LIVEBOARD" | +| ACTION_OBJECT | "ACTION_OBJECT" | +| DATA_SOURCE | "DATA_SOURCE" | +| USER | "USER" | +| USER_GROUP | "USER_GROUP" | + + +## Implemented Interfaces + +* Serializable + + diff --git a/sdks/java/docs/UpdateOrgRequest.md b/sdks/java/docs/UpdateOrgRequest.md new file mode 100644 index 000000000..06ce51503 --- /dev/null +++ b/sdks/java/docs/UpdateOrgRequest.md @@ -0,0 +1,31 @@ + + +# UpdateOrgRequest + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**name** | **String** | Name of the Org | [optional] | +|**description** | **String** | Description of the Org | [optional] | +|**userIdentifiers** | **List<String>** | Add Users to an Org | [optional] | +|**groupIdentifiers** | **List<String>** | Add Default Groups to an Org | [optional] | +|**operation** | [**OperationEnum**](#OperationEnum) | Type of update operation. Default operation type is ADD | [optional] | + + + +## Enum: OperationEnum + +| Name | Value | +|---- | -----| +| ADD | "ADD" | +| REMOVE | "REMOVE" | +| REPLACE | "REPLACE" | + + +## Implemented Interfaces + +* Serializable + + diff --git a/sdks/java/docs/UpdateRoleRequest.md b/sdks/java/docs/UpdateRoleRequest.md new file mode 100644 index 000000000..41ba3dd7c --- /dev/null +++ b/sdks/java/docs/UpdateRoleRequest.md @@ -0,0 +1,66 @@ + + +# UpdateRoleRequest + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**name** | **String** | Name of the Role. | | +|**description** | **String** | Description of the Role. | [optional] | +|**privileges** | [**List<PrivilegesEnum>**](#List<PrivilegesEnum>) | Privileges granted to the role. See [Documentation](https://developers.thoughtspot.com/docs/rbac#_role_categories_and_privileges)for supported roles privileges. | [optional] | + + + +## Enum: List<PrivilegesEnum> + +| Name | Value | +|---- | -----| +| USERDATAUPLOADING | "USERDATAUPLOADING" | +| DATADOWNLOADING | "DATADOWNLOADING" | +| DATAMANAGEMENT | "DATAMANAGEMENT" | +| SHAREWITHALL | "SHAREWITHALL" | +| JOBSCHEDULING | "JOBSCHEDULING" | +| A3_ANALYSIS | "A3ANALYSIS" | +| BYPASSRLS | "BYPASSRLS" | +| DISABLE_PINBOARD_CREATION | "DISABLE_PINBOARD_CREATION" | +| DEVELOPER | "DEVELOPER" | +| APPLICATION_ADMINISTRATION | "APPLICATION_ADMINISTRATION" | +| USER_ADMINISTRATION | "USER_ADMINISTRATION" | +| GROUP_ADMINISTRATION | "GROUP_ADMINISTRATION" | +| SYSTEM_INFO_ADMINISTRATION | "SYSTEM_INFO_ADMINISTRATION" | +| SYNCMANAGEMENT | "SYNCMANAGEMENT" | +| ORG_ADMINISTRATION | "ORG_ADMINISTRATION" | +| ROLE_ADMINISTRATION | "ROLE_ADMINISTRATION" | +| AUTHENTICATION_ADMINISTRATION | "AUTHENTICATION_ADMINISTRATION" | +| BILLING_INFO_ADMINISTRATION | "BILLING_INFO_ADMINISTRATION" | +| CONTROL_TRUSTED_AUTH | "CONTROL_TRUSTED_AUTH" | +| TAGMANAGEMENT | "TAGMANAGEMENT" | +| LIVEBOARD_VERIFIER | "LIVEBOARD_VERIFIER" | +| CAN_MANAGE_CUSTOM_CALENDAR | "CAN_MANAGE_CUSTOM_CALENDAR" | +| CAN_CREATE_OR_EDIT_CONNECTIONS | "CAN_CREATE_OR_EDIT_CONNECTIONS" | +| CAN_MANAGE_WORKSHEET_VIEWS_TABLES | "CAN_MANAGE_WORKSHEET_VIEWS_TABLES" | +| CAN_MANAGE_VERSION_CONTROL | "CAN_MANAGE_VERSION_CONTROL" | +| THIRDPARTY_ANALYSIS | "THIRDPARTY_ANALYSIS" | +| CAN_CREATE_CATALOG | "CAN_CREATE_CATALOG" | +| CAN_ACCESS_ANALYST_STUDIO | "CAN_ACCESS_ANALYST_STUDIO" | +| CAN_MANAGE_ANALYST_STUDIO | "CAN_MANAGE_ANALYST_STUDIO" | +| CAN_MODIFY_FOLDERS | "CAN_MODIFY_FOLDERS" | +| CAN_MANAGE_VARIABLES | "CAN_MANAGE_VARIABLES" | +| CAN_VIEW_FOLDERS | "CAN_VIEW_FOLDERS" | +| CAN_MANAGE_AGENTSPOT | "CAN_MANAGE_AGENTSPOT" | +| CAN_ACCESS_AGENTSPOT | "CAN_ACCESS_AGENTSPOT" | +| PREVIEW_DOCUMENT_SEARCH | "PREVIEW_DOCUMENT_SEARCH" | +| PREVIEW_THOUGHTSPOT_SAGE | "PREVIEW_THOUGHTSPOT_SAGE" | +| CAN_MANAGE_WEBHOOKS | "CAN_MANAGE_WEBHOOKS" | +| CAN_DOWNLOAD_VISUALS | "CAN_DOWNLOAD_VISUALS" | +| CAN_DOWNLOAD_DETAILED_DATA | "CAN_DOWNLOAD_DETAILED_DATA" | +| CAN_USE_SPOTTER | "CAN_USE_SPOTTER" | + + +## Implemented Interfaces + +* Serializable + + diff --git a/sdks/java/docs/UpdateScheduleRequest.md b/sdks/java/docs/UpdateScheduleRequest.md new file mode 100644 index 000000000..91d946a6b --- /dev/null +++ b/sdks/java/docs/UpdateScheduleRequest.md @@ -0,0 +1,692 @@ + + +# UpdateScheduleRequest + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**name** | **String** | Name of the scheduled job. | [optional] | +|**description** | **String** | Description of the scheduled job. | [optional] | +|**metadataType** | [**MetadataTypeEnum**](#MetadataTypeEnum) | Type of metadata object. | [optional] | +|**metadataIdentifier** | **String** | Unique ID or name of the metadata object. | [optional] | +|**fileFormat** | [**FileFormatEnum**](#FileFormatEnum) | Export file format. | [optional] | +|**liveboardOptions** | [**LiveboardOptionsInput**](LiveboardOptionsInput.md) | Options to specify the details of a Liveboard. | [optional] | +|**pdfOptions** | [**SchedulesPdfOptionsInput**](SchedulesPdfOptionsInput.md) | Options for PDF export. | [optional] | +|**timeZone** | [**TimeZoneEnum**](#TimeZoneEnum) | Time zone | [optional] | +|**frequency** | [**FrequencyInput**](FrequencyInput.md) | Frequency of the scheduled job run. | [optional] | +|**recipientDetails** | [**RecipientDetailsInput**](RecipientDetailsInput.md) | Recipients of the scheduled job notifications. You can add the ID or name of the ThoughtSpot users or groups as recipients in the `principals` array. If a recipient is not a ThoughtSpot user, specify email address. | [optional] | +|**status** | [**StatusEnum**](#StatusEnum) | Status of the schedule | [optional] | +|**personalisedViewId** | **String** | Personalised view id of the liveboard to be scheduled. | [optional] | + + + +## Enum: MetadataTypeEnum + +| Name | Value | +|---- | -----| +| LIVEBOARD | "LIVEBOARD" | + + + +## Enum: FileFormatEnum + +| Name | Value | +|---- | -----| +| CSV | "CSV" | +| PDF | "PDF" | +| XLSX | "XLSX" | + + + +## Enum: TimeZoneEnum + +| Name | Value | +|---- | -----| +| AFRICA_ABIDJAN | "Africa/Abidjan" | +| AFRICA_ACCRA | "Africa/Accra" | +| AFRICA_ADDIS_ABABA | "Africa/Addis_Ababa" | +| AFRICA_ALGIERS | "Africa/Algiers" | +| AFRICA_ASMARA | "Africa/Asmara" | +| AFRICA_ASMERA | "Africa/Asmera" | +| AFRICA_BAMAKO | "Africa/Bamako" | +| AFRICA_BANGUI | "Africa/Bangui" | +| AFRICA_BANJUL | "Africa/Banjul" | +| AFRICA_BISSAU | "Africa/Bissau" | +| AFRICA_BLANTYRE | "Africa/Blantyre" | +| AFRICA_BRAZZAVILLE | "Africa/Brazzaville" | +| AFRICA_BUJUMBURA | "Africa/Bujumbura" | +| AFRICA_CAIRO | "Africa/Cairo" | +| AFRICA_CASABLANCA | "Africa/Casablanca" | +| AFRICA_CEUTA | "Africa/Ceuta" | +| AFRICA_CONAKRY | "Africa/Conakry" | +| AFRICA_DAKAR | "Africa/Dakar" | +| AFRICA_DAR_ES_SALAAM | "Africa/Dar_es_Salaam" | +| AFRICA_DJIBOUTI | "Africa/Djibouti" | +| AFRICA_DOUALA | "Africa/Douala" | +| AFRICA_EL_AAIUN | "Africa/El_Aaiun" | +| AFRICA_FREETOWN | "Africa/Freetown" | +| AFRICA_GABORONE | "Africa/Gaborone" | +| AFRICA_HARARE | "Africa/Harare" | +| AFRICA_JOHANNESBURG | "Africa/Johannesburg" | +| AFRICA_JUBA | "Africa/Juba" | +| AFRICA_KAMPALA | "Africa/Kampala" | +| AFRICA_KHARTOUM | "Africa/Khartoum" | +| AFRICA_KIGALI | "Africa/Kigali" | +| AFRICA_KINSHASA | "Africa/Kinshasa" | +| AFRICA_LAGOS | "Africa/Lagos" | +| AFRICA_LIBREVILLE | "Africa/Libreville" | +| AFRICA_LOME | "Africa/Lome" | +| AFRICA_LUANDA | "Africa/Luanda" | +| AFRICA_LUBUMBASHI | "Africa/Lubumbashi" | +| AFRICA_LUSAKA | "Africa/Lusaka" | +| AFRICA_MALABO | "Africa/Malabo" | +| AFRICA_MAPUTO | "Africa/Maputo" | +| AFRICA_MASERU | "Africa/Maseru" | +| AFRICA_MBABANE | "Africa/Mbabane" | +| AFRICA_MOGADISHU | "Africa/Mogadishu" | +| AFRICA_MONROVIA | "Africa/Monrovia" | +| AFRICA_NAIROBI | "Africa/Nairobi" | +| AFRICA_NDJAMENA | "Africa/Ndjamena" | +| AFRICA_NIAMEY | "Africa/Niamey" | +| AFRICA_NOUAKCHOTT | "Africa/Nouakchott" | +| AFRICA_OUAGADOUGOU | "Africa/Ouagadougou" | +| AFRICA_PORTO_NOVO | "Africa/Porto-Novo" | +| AFRICA_SAO_TOME | "Africa/Sao_Tome" | +| AFRICA_TIMBUKTU | "Africa/Timbuktu" | +| AFRICA_TRIPOLI | "Africa/Tripoli" | +| AFRICA_TUNIS | "Africa/Tunis" | +| AFRICA_WINDHOEK | "Africa/Windhoek" | +| AMERICA_ADAK | "America/Adak" | +| AMERICA_ANCHORAGE | "America/Anchorage" | +| AMERICA_ANGUILLA | "America/Anguilla" | +| AMERICA_ANTIGUA | "America/Antigua" | +| AMERICA_ARAGUAINA | "America/Araguaina" | +| AMERICA_ARGENTINA_BUENOS_AIRES | "America/Argentina/Buenos_Aires" | +| AMERICA_ARGENTINA_CATAMARCA | "America/Argentina/Catamarca" | +| AMERICA_ARGENTINA_COMOD_RIVADAVIA | "America/Argentina/ComodRivadavia" | +| AMERICA_ARGENTINA_CORDOBA | "America/Argentina/Cordoba" | +| AMERICA_ARGENTINA_JUJUY | "America/Argentina/Jujuy" | +| AMERICA_ARGENTINA_LA_RIOJA | "America/Argentina/La_Rioja" | +| AMERICA_ARGENTINA_MENDOZA | "America/Argentina/Mendoza" | +| AMERICA_ARGENTINA_RIO_GALLEGOS | "America/Argentina/Rio_Gallegos" | +| AMERICA_ARGENTINA_SALTA | "America/Argentina/Salta" | +| AMERICA_ARGENTINA_SAN_JUAN | "America/Argentina/San_Juan" | +| AMERICA_ARGENTINA_SAN_LUIS | "America/Argentina/San_Luis" | +| AMERICA_ARGENTINA_TUCUMAN | "America/Argentina/Tucuman" | +| AMERICA_ARGENTINA_USHUAIA | "America/Argentina/Ushuaia" | +| AMERICA_ARUBA | "America/Aruba" | +| AMERICA_ASUNCION | "America/Asuncion" | +| AMERICA_ATIKOKAN | "America/Atikokan" | +| AMERICA_ATKA | "America/Atka" | +| AMERICA_BAHIA | "America/Bahia" | +| AMERICA_BAHIA_BANDERAS | "America/Bahia_Banderas" | +| AMERICA_BARBADOS | "America/Barbados" | +| AMERICA_BELEM | "America/Belem" | +| AMERICA_BELIZE | "America/Belize" | +| AMERICA_BLANC_SABLON | "America/Blanc-Sablon" | +| AMERICA_BOA_VISTA | "America/Boa_Vista" | +| AMERICA_BOGOTA | "America/Bogota" | +| AMERICA_BOISE | "America/Boise" | +| AMERICA_BUENOS_AIRES | "America/Buenos_Aires" | +| AMERICA_CAMBRIDGE_BAY | "America/Cambridge_Bay" | +| AMERICA_CAMPO_GRANDE | "America/Campo_Grande" | +| AMERICA_CANCUN | "America/Cancun" | +| AMERICA_CARACAS | "America/Caracas" | +| AMERICA_CATAMARCA | "America/Catamarca" | +| AMERICA_CAYENNE | "America/Cayenne" | +| AMERICA_CAYMAN | "America/Cayman" | +| AMERICA_CHICAGO | "America/Chicago" | +| AMERICA_CHIHUAHUA | "America/Chihuahua" | +| AMERICA_CORAL_HARBOUR | "America/Coral_Harbour" | +| AMERICA_CORDOBA | "America/Cordoba" | +| AMERICA_COSTA_RICA | "America/Costa_Rica" | +| AMERICA_CRESTON | "America/Creston" | +| AMERICA_CUIABA | "America/Cuiaba" | +| AMERICA_CURACAO | "America/Curacao" | +| AMERICA_DANMARKSHAVN | "America/Danmarkshavn" | +| AMERICA_DAWSON | "America/Dawson" | +| AMERICA_DAWSON_CREEK | "America/Dawson_Creek" | +| AMERICA_DENVER | "America/Denver" | +| AMERICA_DETROIT | "America/Detroit" | +| AMERICA_DOMINICA | "America/Dominica" | +| AMERICA_EDMONTON | "America/Edmonton" | +| AMERICA_EIRUNEPE | "America/Eirunepe" | +| AMERICA_EL_SALVADOR | "America/El_Salvador" | +| AMERICA_ENSENADA | "America/Ensenada" | +| AMERICA_FORT_NELSON | "America/Fort_Nelson" | +| AMERICA_FORT_WAYNE | "America/Fort_Wayne" | +| AMERICA_FORTALEZA | "America/Fortaleza" | +| AMERICA_GLACE_BAY | "America/Glace_Bay" | +| AMERICA_GODTHAB | "America/Godthab" | +| AMERICA_GOOSE_BAY | "America/Goose_Bay" | +| AMERICA_GRAND_TURK | "America/Grand_Turk" | +| AMERICA_GRENADA | "America/Grenada" | +| AMERICA_GUADELOUPE | "America/Guadeloupe" | +| AMERICA_GUATEMALA | "America/Guatemala" | +| AMERICA_GUAYAQUIL | "America/Guayaquil" | +| AMERICA_GUYANA | "America/Guyana" | +| AMERICA_HALIFAX | "America/Halifax" | +| AMERICA_HAVANA | "America/Havana" | +| AMERICA_HERMOSILLO | "America/Hermosillo" | +| AMERICA_INDIANA_INDIANAPOLIS | "America/Indiana/Indianapolis" | +| AMERICA_INDIANA_KNOX | "America/Indiana/Knox" | +| AMERICA_INDIANA_MARENGO | "America/Indiana/Marengo" | +| AMERICA_INDIANA_PETERSBURG | "America/Indiana/Petersburg" | +| AMERICA_INDIANA_TELL_CITY | "America/Indiana/Tell_City" | +| AMERICA_INDIANA_VEVAY | "America/Indiana/Vevay" | +| AMERICA_INDIANA_VINCENNES | "America/Indiana/Vincennes" | +| AMERICA_INDIANA_WINAMAC | "America/Indiana/Winamac" | +| AMERICA_INDIANAPOLIS | "America/Indianapolis" | +| AMERICA_INUVIK | "America/Inuvik" | +| AMERICA_IQALUIT | "America/Iqaluit" | +| AMERICA_JAMAICA | "America/Jamaica" | +| AMERICA_JUJUY | "America/Jujuy" | +| AMERICA_JUNEAU | "America/Juneau" | +| AMERICA_KENTUCKY_LOUISVILLE | "America/Kentucky/Louisville" | +| AMERICA_KENTUCKY_MONTICELLO | "America/Kentucky/Monticello" | +| AMERICA_KNOX_IN | "America/Knox_IN" | +| AMERICA_KRALENDIJK | "America/Kralendijk" | +| AMERICA_LA_PAZ | "America/La_Paz" | +| AMERICA_LIMA | "America/Lima" | +| AMERICA_LOS_ANGELES | "America/Los_Angeles" | +| AMERICA_LOUISVILLE | "America/Louisville" | +| AMERICA_LOWER_PRINCES | "America/Lower_Princes" | +| AMERICA_MACEIO | "America/Maceio" | +| AMERICA_MANAGUA | "America/Managua" | +| AMERICA_MANAUS | "America/Manaus" | +| AMERICA_MARIGOT | "America/Marigot" | +| AMERICA_MARTINIQUE | "America/Martinique" | +| AMERICA_MATAMOROS | "America/Matamoros" | +| AMERICA_MAZATLAN | "America/Mazatlan" | +| AMERICA_MENDOZA | "America/Mendoza" | +| AMERICA_MENOMINEE | "America/Menominee" | +| AMERICA_MERIDA | "America/Merida" | +| AMERICA_METLAKATLA | "America/Metlakatla" | +| AMERICA_MEXICO_CITY | "America/Mexico_City" | +| AMERICA_MIQUELON | "America/Miquelon" | +| AMERICA_MONCTON | "America/Moncton" | +| AMERICA_MONTERREY | "America/Monterrey" | +| AMERICA_MONTEVIDEO | "America/Montevideo" | +| AMERICA_MONTREAL | "America/Montreal" | +| AMERICA_MONTSERRAT | "America/Montserrat" | +| AMERICA_NASSAU | "America/Nassau" | +| AMERICA_NEW_YORK | "America/New_York" | +| AMERICA_NIPIGON | "America/Nipigon" | +| AMERICA_NOME | "America/Nome" | +| AMERICA_NORONHA | "America/Noronha" | +| AMERICA_NORTH_DAKOTA_BEULAH | "America/North_Dakota/Beulah" | +| AMERICA_NORTH_DAKOTA_CENTER | "America/North_Dakota/Center" | +| AMERICA_NORTH_DAKOTA_NEW_SALEM | "America/North_Dakota/New_Salem" | +| AMERICA_NUUK | "America/Nuuk" | +| AMERICA_OJINAGA | "America/Ojinaga" | +| AMERICA_PANAMA | "America/Panama" | +| AMERICA_PANGNIRTUNG | "America/Pangnirtung" | +| AMERICA_PARAMARIBO | "America/Paramaribo" | +| AMERICA_PHOENIX | "America/Phoenix" | +| AMERICA_PORT_AU_PRINCE | "America/Port-au-Prince" | +| AMERICA_PORT_OF_SPAIN | "America/Port_of_Spain" | +| AMERICA_PORTO_ACRE | "America/Porto_Acre" | +| AMERICA_PORTO_VELHO | "America/Porto_Velho" | +| AMERICA_PUERTO_RICO | "America/Puerto_Rico" | +| AMERICA_PUNTA_ARENAS | "America/Punta_Arenas" | +| AMERICA_RAINY_RIVER | "America/Rainy_River" | +| AMERICA_RANKIN_INLET | "America/Rankin_Inlet" | +| AMERICA_RECIFE | "America/Recife" | +| AMERICA_REGINA | "America/Regina" | +| AMERICA_RESOLUTE | "America/Resolute" | +| AMERICA_RIO_BRANCO | "America/Rio_Branco" | +| AMERICA_ROSARIO | "America/Rosario" | +| AMERICA_SANTA_ISABEL | "America/Santa_Isabel" | +| AMERICA_SANTAREM | "America/Santarem" | +| AMERICA_SANTIAGO | "America/Santiago" | +| AMERICA_SANTO_DOMINGO | "America/Santo_Domingo" | +| AMERICA_SAO_PAULO | "America/Sao_Paulo" | +| AMERICA_SCORESBYSUND | "America/Scoresbysund" | +| AMERICA_SHIPROCK | "America/Shiprock" | +| AMERICA_SITKA | "America/Sitka" | +| AMERICA_ST_BARTHELEMY | "America/St_Barthelemy" | +| AMERICA_ST_JOHNS | "America/St_Johns" | +| AMERICA_ST_KITTS | "America/St_Kitts" | +| AMERICA_ST_LUCIA | "America/St_Lucia" | +| AMERICA_ST_THOMAS | "America/St_Thomas" | +| AMERICA_ST_VINCENT | "America/St_Vincent" | +| AMERICA_SWIFT_CURRENT | "America/Swift_Current" | +| AMERICA_TEGUCIGALPA | "America/Tegucigalpa" | +| AMERICA_THULE | "America/Thule" | +| AMERICA_THUNDER_BAY | "America/Thunder_Bay" | +| AMERICA_TIJUANA | "America/Tijuana" | +| AMERICA_TORONTO | "America/Toronto" | +| AMERICA_TORTOLA | "America/Tortola" | +| AMERICA_VANCOUVER | "America/Vancouver" | +| AMERICA_VIRGIN | "America/Virgin" | +| AMERICA_WHITEHORSE | "America/Whitehorse" | +| AMERICA_WINNIPEG | "America/Winnipeg" | +| AMERICA_YAKUTAT | "America/Yakutat" | +| AMERICA_YELLOWKNIFE | "America/Yellowknife" | +| ANTARCTICA_CASEY | "Antarctica/Casey" | +| ANTARCTICA_DAVIS | "Antarctica/Davis" | +| ANTARCTICA_DUMONT_D_URVILLE | "Antarctica/DumontDUrville" | +| ANTARCTICA_MACQUARIE | "Antarctica/Macquarie" | +| ANTARCTICA_MAWSON | "Antarctica/Mawson" | +| ANTARCTICA_MC_MURDO | "Antarctica/McMurdo" | +| ANTARCTICA_PALMER | "Antarctica/Palmer" | +| ANTARCTICA_ROTHERA | "Antarctica/Rothera" | +| ANTARCTICA_SOUTH_POLE | "Antarctica/South_Pole" | +| ANTARCTICA_SYOWA | "Antarctica/Syowa" | +| ANTARCTICA_TROLL | "Antarctica/Troll" | +| ANTARCTICA_VOSTOK | "Antarctica/Vostok" | +| ARCTIC_LONGYEARBYEN | "Arctic/Longyearbyen" | +| ASIA_ADEN | "Asia/Aden" | +| ASIA_ALMATY | "Asia/Almaty" | +| ASIA_AMMAN | "Asia/Amman" | +| ASIA_ANADYR | "Asia/Anadyr" | +| ASIA_AQTAU | "Asia/Aqtau" | +| ASIA_AQTOBE | "Asia/Aqtobe" | +| ASIA_ASHGABAT | "Asia/Ashgabat" | +| ASIA_ASHKHABAD | "Asia/Ashkhabad" | +| ASIA_ATYRAU | "Asia/Atyrau" | +| ASIA_BAGHDAD | "Asia/Baghdad" | +| ASIA_BAHRAIN | "Asia/Bahrain" | +| ASIA_BAKU | "Asia/Baku" | +| ASIA_BANGKOK | "Asia/Bangkok" | +| ASIA_BARNAUL | "Asia/Barnaul" | +| ASIA_BEIRUT | "Asia/Beirut" | +| ASIA_BISHKEK | "Asia/Bishkek" | +| ASIA_BRUNEI | "Asia/Brunei" | +| ASIA_CALCUTTA | "Asia/Calcutta" | +| ASIA_CHITA | "Asia/Chita" | +| ASIA_CHOIBALSAN | "Asia/Choibalsan" | +| ASIA_CHONGQING | "Asia/Chongqing" | +| ASIA_CHUNGKING | "Asia/Chungking" | +| ASIA_COLOMBO | "Asia/Colombo" | +| ASIA_DACCA | "Asia/Dacca" | +| ASIA_DAMASCUS | "Asia/Damascus" | +| ASIA_DHAKA | "Asia/Dhaka" | +| ASIA_DILI | "Asia/Dili" | +| ASIA_DUBAI | "Asia/Dubai" | +| ASIA_DUSHANBE | "Asia/Dushanbe" | +| ASIA_FAMAGUSTA | "Asia/Famagusta" | +| ASIA_GAZA | "Asia/Gaza" | +| ASIA_HARBIN | "Asia/Harbin" | +| ASIA_HEBRON | "Asia/Hebron" | +| ASIA_HO_CHI_MINH | "Asia/Ho_Chi_Minh" | +| ASIA_HONG_KONG | "Asia/Hong_Kong" | +| ASIA_HOVD | "Asia/Hovd" | +| ASIA_IRKUTSK | "Asia/Irkutsk" | +| ASIA_ISTANBUL | "Asia/Istanbul" | +| ASIA_JAKARTA | "Asia/Jakarta" | +| ASIA_JAYAPURA | "Asia/Jayapura" | +| ASIA_JERUSALEM | "Asia/Jerusalem" | +| ASIA_KABUL | "Asia/Kabul" | +| ASIA_KAMCHATKA | "Asia/Kamchatka" | +| ASIA_KARACHI | "Asia/Karachi" | +| ASIA_KASHGAR | "Asia/Kashgar" | +| ASIA_KATHMANDU | "Asia/Kathmandu" | +| ASIA_KATMANDU | "Asia/Katmandu" | +| ASIA_KHANDYGA | "Asia/Khandyga" | +| ASIA_KOLKATA | "Asia/Kolkata" | +| ASIA_KRASNOYARSK | "Asia/Krasnoyarsk" | +| ASIA_KUALA_LUMPUR | "Asia/Kuala_Lumpur" | +| ASIA_KUCHING | "Asia/Kuching" | +| ASIA_KUWAIT | "Asia/Kuwait" | +| ASIA_MACAO | "Asia/Macao" | +| ASIA_MACAU | "Asia/Macau" | +| ASIA_MAGADAN | "Asia/Magadan" | +| ASIA_MAKASSAR | "Asia/Makassar" | +| ASIA_MANILA | "Asia/Manila" | +| ASIA_MUSCAT | "Asia/Muscat" | +| ASIA_NICOSIA | "Asia/Nicosia" | +| ASIA_NOVOKUZNETSK | "Asia/Novokuznetsk" | +| ASIA_NOVOSIBIRSK | "Asia/Novosibirsk" | +| ASIA_OMSK | "Asia/Omsk" | +| ASIA_ORAL | "Asia/Oral" | +| ASIA_PHNOM_PENH | "Asia/Phnom_Penh" | +| ASIA_PONTIANAK | "Asia/Pontianak" | +| ASIA_PYONGYANG | "Asia/Pyongyang" | +| ASIA_QATAR | "Asia/Qatar" | +| ASIA_QOSTANAY | "Asia/Qostanay" | +| ASIA_QYZYLORDA | "Asia/Qyzylorda" | +| ASIA_RANGOON | "Asia/Rangoon" | +| ASIA_RIYADH | "Asia/Riyadh" | +| ASIA_SAIGON | "Asia/Saigon" | +| ASIA_SAKHALIN | "Asia/Sakhalin" | +| ASIA_SAMARKAND | "Asia/Samarkand" | +| ASIA_SEOUL | "Asia/Seoul" | +| ASIA_SHANGHAI | "Asia/Shanghai" | +| ASIA_SINGAPORE | "Asia/Singapore" | +| ASIA_SREDNEKOLYMSK | "Asia/Srednekolymsk" | +| ASIA_TAIPEI | "Asia/Taipei" | +| ASIA_TASHKENT | "Asia/Tashkent" | +| ASIA_TBILISI | "Asia/Tbilisi" | +| ASIA_TEHRAN | "Asia/Tehran" | +| ASIA_TEL_AVIV | "Asia/Tel_Aviv" | +| ASIA_THIMBU | "Asia/Thimbu" | +| ASIA_THIMPHU | "Asia/Thimphu" | +| ASIA_TOKYO | "Asia/Tokyo" | +| ASIA_TOMSK | "Asia/Tomsk" | +| ASIA_UJUNG_PANDANG | "Asia/Ujung_Pandang" | +| ASIA_ULAANBAATAR | "Asia/Ulaanbaatar" | +| ASIA_ULAN_BATOR | "Asia/Ulan_Bator" | +| ASIA_URUMQI | "Asia/Urumqi" | +| ASIA_UST_NERA | "Asia/Ust-Nera" | +| ASIA_VIENTIANE | "Asia/Vientiane" | +| ASIA_VLADIVOSTOK | "Asia/Vladivostok" | +| ASIA_YAKUTSK | "Asia/Yakutsk" | +| ASIA_YANGON | "Asia/Yangon" | +| ASIA_YEKATERINBURG | "Asia/Yekaterinburg" | +| ASIA_YEREVAN | "Asia/Yerevan" | +| ATLANTIC_AZORES | "Atlantic/Azores" | +| ATLANTIC_BERMUDA | "Atlantic/Bermuda" | +| ATLANTIC_CANARY | "Atlantic/Canary" | +| ATLANTIC_CAPE_VERDE | "Atlantic/Cape_Verde" | +| ATLANTIC_FAEROE | "Atlantic/Faeroe" | +| ATLANTIC_FAROE | "Atlantic/Faroe" | +| ATLANTIC_JAN_MAYEN | "Atlantic/Jan_Mayen" | +| ATLANTIC_MADEIRA | "Atlantic/Madeira" | +| ATLANTIC_REYKJAVIK | "Atlantic/Reykjavik" | +| ATLANTIC_SOUTH_GEORGIA | "Atlantic/South_Georgia" | +| ATLANTIC_ST_HELENA | "Atlantic/St_Helena" | +| ATLANTIC_STANLEY | "Atlantic/Stanley" | +| AUSTRALIA_ACT | "Australia/ACT" | +| AUSTRALIA_ADELAIDE | "Australia/Adelaide" | +| AUSTRALIA_BRISBANE | "Australia/Brisbane" | +| AUSTRALIA_BROKEN_HILL | "Australia/Broken_Hill" | +| AUSTRALIA_CANBERRA | "Australia/Canberra" | +| AUSTRALIA_CURRIE | "Australia/Currie" | +| AUSTRALIA_DARWIN | "Australia/Darwin" | +| AUSTRALIA_EUCLA | "Australia/Eucla" | +| AUSTRALIA_HOBART | "Australia/Hobart" | +| AUSTRALIA_LHI | "Australia/LHI" | +| AUSTRALIA_LINDEMAN | "Australia/Lindeman" | +| AUSTRALIA_LORD_HOWE | "Australia/Lord_Howe" | +| AUSTRALIA_MELBOURNE | "Australia/Melbourne" | +| AUSTRALIA_NSW | "Australia/NSW" | +| AUSTRALIA_NORTH | "Australia/North" | +| AUSTRALIA_PERTH | "Australia/Perth" | +| AUSTRALIA_QUEENSLAND | "Australia/Queensland" | +| AUSTRALIA_SOUTH | "Australia/South" | +| AUSTRALIA_SYDNEY | "Australia/Sydney" | +| AUSTRALIA_TASMANIA | "Australia/Tasmania" | +| AUSTRALIA_VICTORIA | "Australia/Victoria" | +| AUSTRALIA_WEST | "Australia/West" | +| AUSTRALIA_YANCOWINNA | "Australia/Yancowinna" | +| BRAZIL_ACRE | "Brazil/Acre" | +| BRAZIL_DE_NORONHA | "Brazil/DeNoronha" | +| BRAZIL_EAST | "Brazil/East" | +| BRAZIL_WEST | "Brazil/West" | +| CET | "CET" | +| CST6_CDT | "CST6CDT" | +| CANADA_ATLANTIC | "Canada/Atlantic" | +| CANADA_CENTRAL | "Canada/Central" | +| CANADA_EASTERN | "Canada/Eastern" | +| CANADA_MOUNTAIN | "Canada/Mountain" | +| CANADA_NEWFOUNDLAND | "Canada/Newfoundland" | +| CANADA_PACIFIC | "Canada/Pacific" | +| CANADA_SASKATCHEWAN | "Canada/Saskatchewan" | +| CANADA_YUKON | "Canada/Yukon" | +| CHILE_CONTINENTAL | "Chile/Continental" | +| CHILE_EASTER_ISLAND | "Chile/EasterIsland" | +| CUBA | "Cuba" | +| EET | "EET" | +| EST5_EDT | "EST5EDT" | +| EGYPT | "Egypt" | +| EIRE | "Eire" | +| ETC_GMT | "Etc/GMT" | +| ETC_GMT_0 | "Etc/GMT+0" | +| ETC_GMT_1 | "Etc/GMT+1" | +| ETC_GMT_10 | "Etc/GMT+10" | +| ETC_GMT_11 | "Etc/GMT+11" | +| ETC_GMT_122 | "Etc/GMT+12" | +| ETC_GMT_2 | "Etc/GMT+2" | +| ETC_GMT_3 | "Etc/GMT+3" | +| ETC_GMT_4 | "Etc/GMT+4" | +| ETC_GMT_5 | "Etc/GMT+5" | +| ETC_GMT_6 | "Etc/GMT+6" | +| ETC_GMT_7 | "Etc/GMT+7" | +| ETC_GMT_8 | "Etc/GMT+8" | +| ETC_GMT_9 | "Etc/GMT+9" | +| ETC_GMT_02 | "Etc/GMT-0" | +| ETC_GMT_12 | "Etc/GMT-1" | +| ETC_GMT_102 | "Etc/GMT-10" | +| ETC_GMT_112 | "Etc/GMT-11" | +| ETC_GMT_122 | "Etc/GMT-12" | +| ETC_GMT_13 | "Etc/GMT-13" | +| ETC_GMT_14 | "Etc/GMT-14" | +| ETC_GMT_22 | "Etc/GMT-2" | +| ETC_GMT_32 | "Etc/GMT-3" | +| ETC_GMT_42 | "Etc/GMT-4" | +| ETC_GMT_52 | "Etc/GMT-5" | +| ETC_GMT_62 | "Etc/GMT-6" | +| ETC_GMT_72 | "Etc/GMT-7" | +| ETC_GMT_82 | "Etc/GMT-8" | +| ETC_GMT_92 | "Etc/GMT-9" | +| ETC_GMT0 | "Etc/GMT0" | +| ETC_GREENWICH | "Etc/Greenwich" | +| ETC_UCT | "Etc/UCT" | +| ETC_UTC | "Etc/UTC" | +| ETC_UNIVERSAL | "Etc/Universal" | +| ETC_ZULU | "Etc/Zulu" | +| EUROPE_AMSTERDAM | "Europe/Amsterdam" | +| EUROPE_ANDORRA | "Europe/Andorra" | +| EUROPE_ASTRAKHAN | "Europe/Astrakhan" | +| EUROPE_ATHENS | "Europe/Athens" | +| EUROPE_BELFAST | "Europe/Belfast" | +| EUROPE_BELGRADE | "Europe/Belgrade" | +| EUROPE_BERLIN | "Europe/Berlin" | +| EUROPE_BRATISLAVA | "Europe/Bratislava" | +| EUROPE_BRUSSELS | "Europe/Brussels" | +| EUROPE_BUCHAREST | "Europe/Bucharest" | +| EUROPE_BUDAPEST | "Europe/Budapest" | +| EUROPE_BUSINGEN | "Europe/Busingen" | +| EUROPE_CHISINAU | "Europe/Chisinau" | +| EUROPE_COPENHAGEN | "Europe/Copenhagen" | +| EUROPE_DUBLIN | "Europe/Dublin" | +| EUROPE_GIBRALTAR | "Europe/Gibraltar" | +| EUROPE_GUERNSEY | "Europe/Guernsey" | +| EUROPE_HELSINKI | "Europe/Helsinki" | +| EUROPE_ISLE_OF_MAN | "Europe/Isle_of_Man" | +| EUROPE_ISTANBUL | "Europe/Istanbul" | +| EUROPE_JERSEY | "Europe/Jersey" | +| EUROPE_KALININGRAD | "Europe/Kaliningrad" | +| EUROPE_KIEV | "Europe/Kiev" | +| EUROPE_KIROV | "Europe/Kirov" | +| EUROPE_KYIV | "Europe/Kyiv" | +| EUROPE_LISBON | "Europe/Lisbon" | +| EUROPE_LJUBLJANA | "Europe/Ljubljana" | +| EUROPE_LONDON | "Europe/London" | +| EUROPE_LUXEMBOURG | "Europe/Luxembourg" | +| EUROPE_MADRID | "Europe/Madrid" | +| EUROPE_MALTA | "Europe/Malta" | +| EUROPE_MARIEHAMN | "Europe/Mariehamn" | +| EUROPE_MINSK | "Europe/Minsk" | +| EUROPE_MONACO | "Europe/Monaco" | +| EUROPE_MOSCOW | "Europe/Moscow" | +| EUROPE_NICOSIA | "Europe/Nicosia" | +| EUROPE_OSLO | "Europe/Oslo" | +| EUROPE_PARIS | "Europe/Paris" | +| EUROPE_PODGORICA | "Europe/Podgorica" | +| EUROPE_PRAGUE | "Europe/Prague" | +| EUROPE_RIGA | "Europe/Riga" | +| EUROPE_ROME | "Europe/Rome" | +| EUROPE_SAMARA | "Europe/Samara" | +| EUROPE_SAN_MARINO | "Europe/San_Marino" | +| EUROPE_SARAJEVO | "Europe/Sarajevo" | +| EUROPE_SARATOV | "Europe/Saratov" | +| EUROPE_SIMFEROPOL | "Europe/Simferopol" | +| EUROPE_SKOPJE | "Europe/Skopje" | +| EUROPE_SOFIA | "Europe/Sofia" | +| EUROPE_STOCKHOLM | "Europe/Stockholm" | +| EUROPE_TALLINN | "Europe/Tallinn" | +| EUROPE_TIRANE | "Europe/Tirane" | +| EUROPE_TIRASPOL | "Europe/Tiraspol" | +| EUROPE_ULYANOVSK | "Europe/Ulyanovsk" | +| EUROPE_UZHGOROD | "Europe/Uzhgorod" | +| EUROPE_VADUZ | "Europe/Vaduz" | +| EUROPE_VATICAN | "Europe/Vatican" | +| EUROPE_VIENNA | "Europe/Vienna" | +| EUROPE_VILNIUS | "Europe/Vilnius" | +| EUROPE_VOLGOGRAD | "Europe/Volgograd" | +| EUROPE_WARSAW | "Europe/Warsaw" | +| EUROPE_ZAGREB | "Europe/Zagreb" | +| EUROPE_ZAPOROZHYE | "Europe/Zaporozhye" | +| EUROPE_ZURICH | "Europe/Zurich" | +| GB | "GB" | +| GB_EIRE | "GB-Eire" | +| GMT | "GMT" | +| GMT0 | "GMT0" | +| GREENWICH | "Greenwich" | +| HONGKONG | "Hongkong" | +| ICELAND | "Iceland" | +| INDIAN_ANTANANARIVO | "Indian/Antananarivo" | +| INDIAN_CHAGOS | "Indian/Chagos" | +| INDIAN_CHRISTMAS | "Indian/Christmas" | +| INDIAN_COCOS | "Indian/Cocos" | +| INDIAN_COMORO | "Indian/Comoro" | +| INDIAN_KERGUELEN | "Indian/Kerguelen" | +| INDIAN_MAHE | "Indian/Mahe" | +| INDIAN_MALDIVES | "Indian/Maldives" | +| INDIAN_MAURITIUS | "Indian/Mauritius" | +| INDIAN_MAYOTTE | "Indian/Mayotte" | +| INDIAN_REUNION | "Indian/Reunion" | +| IRAN | "Iran" | +| ISRAEL | "Israel" | +| JAMAICA | "Jamaica" | +| JAPAN | "Japan" | +| KWAJALEIN | "Kwajalein" | +| LIBYA | "Libya" | +| MET | "MET" | +| MST7_MDT | "MST7MDT" | +| MEXICO_BAJA_NORTE | "Mexico/BajaNorte" | +| MEXICO_BAJA_SUR | "Mexico/BajaSur" | +| MEXICO_GENERAL | "Mexico/General" | +| NZ | "NZ" | +| NZ_CHAT | "NZ-CHAT" | +| NAVAJO | "Navajo" | +| PRC | "PRC" | +| PST8_PDT | "PST8PDT" | +| PACIFIC_APIA | "Pacific/Apia" | +| PACIFIC_AUCKLAND | "Pacific/Auckland" | +| PACIFIC_BOUGAINVILLE | "Pacific/Bougainville" | +| PACIFIC_CHATHAM | "Pacific/Chatham" | +| PACIFIC_CHUUK | "Pacific/Chuuk" | +| PACIFIC_EASTER | "Pacific/Easter" | +| PACIFIC_EFATE | "Pacific/Efate" | +| PACIFIC_ENDERBURY | "Pacific/Enderbury" | +| PACIFIC_FAKAOFO | "Pacific/Fakaofo" | +| PACIFIC_FIJI | "Pacific/Fiji" | +| PACIFIC_FUNAFUTI | "Pacific/Funafuti" | +| PACIFIC_GALAPAGOS | "Pacific/Galapagos" | +| PACIFIC_GAMBIER | "Pacific/Gambier" | +| PACIFIC_GUADALCANAL | "Pacific/Guadalcanal" | +| PACIFIC_GUAM | "Pacific/Guam" | +| PACIFIC_HONOLULU | "Pacific/Honolulu" | +| PACIFIC_JOHNSTON | "Pacific/Johnston" | +| PACIFIC_KANTON | "Pacific/Kanton" | +| PACIFIC_KIRITIMATI | "Pacific/Kiritimati" | +| PACIFIC_KOSRAE | "Pacific/Kosrae" | +| PACIFIC_KWAJALEIN | "Pacific/Kwajalein" | +| PACIFIC_MAJURO | "Pacific/Majuro" | +| PACIFIC_MARQUESAS | "Pacific/Marquesas" | +| PACIFIC_MIDWAY | "Pacific/Midway" | +| PACIFIC_NAURU | "Pacific/Nauru" | +| PACIFIC_NIUE | "Pacific/Niue" | +| PACIFIC_NORFOLK | "Pacific/Norfolk" | +| PACIFIC_NOUMEA | "Pacific/Noumea" | +| PACIFIC_PAGO_PAGO | "Pacific/Pago_Pago" | +| PACIFIC_PALAU | "Pacific/Palau" | +| PACIFIC_PITCAIRN | "Pacific/Pitcairn" | +| PACIFIC_POHNPEI | "Pacific/Pohnpei" | +| PACIFIC_PONAPE | "Pacific/Ponape" | +| PACIFIC_PORT_MORESBY | "Pacific/Port_Moresby" | +| PACIFIC_RAROTONGA | "Pacific/Rarotonga" | +| PACIFIC_SAIPAN | "Pacific/Saipan" | +| PACIFIC_SAMOA | "Pacific/Samoa" | +| PACIFIC_TAHITI | "Pacific/Tahiti" | +| PACIFIC_TARAWA | "Pacific/Tarawa" | +| PACIFIC_TONGATAPU | "Pacific/Tongatapu" | +| PACIFIC_TRUK | "Pacific/Truk" | +| PACIFIC_WAKE | "Pacific/Wake" | +| PACIFIC_WALLIS | "Pacific/Wallis" | +| PACIFIC_YAP | "Pacific/Yap" | +| POLAND | "Poland" | +| PORTUGAL | "Portugal" | +| ROK | "ROK" | +| SINGAPORE | "Singapore" | +| SYSTEM_V_AST4 | "SystemV/AST4" | +| SYSTEM_V_AST4_ADT | "SystemV/AST4ADT" | +| SYSTEM_V_CST6 | "SystemV/CST6" | +| SYSTEM_V_CST6_CDT | "SystemV/CST6CDT" | +| SYSTEM_V_EST5 | "SystemV/EST5" | +| SYSTEM_V_EST5_EDT | "SystemV/EST5EDT" | +| SYSTEM_V_HST10 | "SystemV/HST10" | +| SYSTEM_V_MST7 | "SystemV/MST7" | +| SYSTEM_V_MST7_MDT | "SystemV/MST7MDT" | +| SYSTEM_V_PST8 | "SystemV/PST8" | +| SYSTEM_V_PST8_PDT | "SystemV/PST8PDT" | +| SYSTEM_V_YST9 | "SystemV/YST9" | +| SYSTEM_V_YST9_YDT | "SystemV/YST9YDT" | +| TURKEY | "Turkey" | +| UCT | "UCT" | +| US_ALASKA | "US/Alaska" | +| US_ALEUTIAN | "US/Aleutian" | +| US_ARIZONA | "US/Arizona" | +| US_CENTRAL | "US/Central" | +| US_EAST_INDIANA | "US/East-Indiana" | +| US_EASTERN | "US/Eastern" | +| US_HAWAII | "US/Hawaii" | +| US_INDIANA_STARKE | "US/Indiana-Starke" | +| US_MICHIGAN | "US/Michigan" | +| US_MOUNTAIN | "US/Mountain" | +| US_PACIFIC | "US/Pacific" | +| US_SAMOA | "US/Samoa" | +| UTC | "UTC" | +| UNIVERSAL | "Universal" | +| W_SU | "W-SU" | +| WET | "WET" | +| ZULU | "Zulu" | +| EST | "EST" | +| HST | "HST" | +| MST | "MST" | +| ACT | "ACT" | +| AET | "AET" | +| AGT | "AGT" | +| ART | "ART" | +| AST | "AST" | +| BET | "BET" | +| BST | "BST" | +| CAT | "CAT" | +| CNT | "CNT" | +| CST | "CST" | +| CTT | "CTT" | +| EAT | "EAT" | +| ECT | "ECT" | +| IET | "IET" | +| IST | "IST" | +| JST | "JST" | +| MIT | "MIT" | +| NET | "NET" | +| NST | "NST" | +| PLT | "PLT" | +| PNT | "PNT" | +| PRT | "PRT" | +| PST | "PST" | +| SST | "SST" | +| VST | "VST" | + + + +## Enum: StatusEnum + +| Name | Value | +|---- | -----| +| ACTIVE | "ACTIVE" | +| PAUSE | "PAUSE" | + + +## Implemented Interfaces + +* Serializable + + diff --git a/sdks/java/docs/UpdateSystemConfigRequest.md b/sdks/java/docs/UpdateSystemConfigRequest.md new file mode 100644 index 000000000..59c0b83b2 --- /dev/null +++ b/sdks/java/docs/UpdateSystemConfigRequest.md @@ -0,0 +1,17 @@ + + +# UpdateSystemConfigRequest + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**_configuration** | **Object** | Configuration JSON with the key-value pair of configuration attributes to be updated. | | + + +## Implemented Interfaces + +* Serializable + + diff --git a/sdks/java/docs/UpdateTagRequest.md b/sdks/java/docs/UpdateTagRequest.md new file mode 100644 index 000000000..7c5b9c271 --- /dev/null +++ b/sdks/java/docs/UpdateTagRequest.md @@ -0,0 +1,18 @@ + + +# UpdateTagRequest + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**name** | **String** | Name of the tag. | [optional] | +|**color** | **String** | Hex color code to be assigned to the tag. For example, #ff78a9. | [optional] | + + +## Implemented Interfaces + +* Serializable + + diff --git a/sdks/java/docs/UpdateUserGroupRequest.md b/sdks/java/docs/UpdateUserGroupRequest.md new file mode 100644 index 000000000..e0991fd33 --- /dev/null +++ b/sdks/java/docs/UpdateUserGroupRequest.md @@ -0,0 +1,99 @@ + + +# UpdateUserGroupRequest + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**name** | **String** | Name of the group to modify. | [optional] | +|**defaultLiveboardIdentifiers** | **List<String>** | ID of the Liveboards to be assigned as default Liveboards to the users in the group. | [optional] | +|**description** | **String** | Description for the group. | [optional] | +|**displayName** | **String** | Display name of the group. | [optional] | +|**privileges** | [**List<PrivilegesEnum>**](#List<PrivilegesEnum>) | Privileges to assign to the group. | [optional] | +|**subGroupIdentifiers** | **List<String>** | GUID or name of the sub groups. A subgroup is a group assigned to a parent group. | [optional] | +|**type** | [**TypeEnum**](#TypeEnum) | Type of the group | [optional] | +|**userIdentifiers** | **List<String>** | GUID or name of the users to assign to the group. | [optional] | +|**visibility** | [**VisibilityEnum**](#VisibilityEnum) | Visibility of the group. To make a group visible to other users and groups, set the visibility to SHAREABLE. | [optional] | +|**roleIdentifiers** | **List<String>** | Role identifiers of the Roles that should be assigned to the group. | [optional] | +|**operation** | [**OperationEnum**](#OperationEnum) | Type of update operation. Default operation type is REPLACE | [optional] | + + + +## Enum: List<PrivilegesEnum> + +| Name | Value | +|---- | -----| +| ADMINISTRATION | "ADMINISTRATION" | +| AUTHORING | "AUTHORING" | +| USERDATAUPLOADING | "USERDATAUPLOADING" | +| DATADOWNLOADING | "DATADOWNLOADING" | +| USERMANAGEMENT | "USERMANAGEMENT" | +| DATAMANAGEMENT | "DATAMANAGEMENT" | +| SHAREWITHALL | "SHAREWITHALL" | +| JOBSCHEDULING | "JOBSCHEDULING" | +| A3_ANALYSIS | "A3ANALYSIS" | +| EXPERIMENTALFEATUREPRIVILEGE | "EXPERIMENTALFEATUREPRIVILEGE" | +| BYPASSRLS | "BYPASSRLS" | +| RANALYSIS | "RANALYSIS" | +| DEVELOPER | "DEVELOPER" | +| USER_ADMINISTRATION | "USER_ADMINISTRATION" | +| GROUP_ADMINISTRATION | "GROUP_ADMINISTRATION" | +| SYNCMANAGEMENT | "SYNCMANAGEMENT" | +| CAN_CREATE_CATALOG | "CAN_CREATE_CATALOG" | +| DISABLE_PINBOARD_CREATION | "DISABLE_PINBOARD_CREATION" | +| LIVEBOARD_VERIFIER | "LIVEBOARD_VERIFIER" | +| PREVIEW_THOUGHTSPOT_SAGE | "PREVIEW_THOUGHTSPOT_SAGE" | +| CAN_MANAGE_VERSION_CONTROL | "CAN_MANAGE_VERSION_CONTROL" | +| THIRDPARTY_ANALYSIS | "THIRDPARTY_ANALYSIS" | +| ALLOW_NON_EMBED_FULL_APP_ACCESS | "ALLOW_NON_EMBED_FULL_APP_ACCESS" | +| CAN_ACCESS_ANALYST_STUDIO | "CAN_ACCESS_ANALYST_STUDIO" | +| CAN_MANAGE_ANALYST_STUDIO | "CAN_MANAGE_ANALYST_STUDIO" | +| CAN_MODIFY_FOLDERS | "CAN_MODIFY_FOLDERS" | +| CAN_MANAGE_VARIABLES | "CAN_MANAGE_VARIABLES" | +| CAN_VIEW_FOLDERS | "CAN_VIEW_FOLDERS" | +| CAN_MANAGE_AGENTSPOT | "CAN_MANAGE_AGENTSPOT" | +| CAN_ACCESS_AGENTSPOT | "CAN_ACCESS_AGENTSPOT" | +| PREVIEW_DOCUMENT_SEARCH | "PREVIEW_DOCUMENT_SEARCH" | +| CAN_SETUP_VERSION_CONTROL | "CAN_SETUP_VERSION_CONTROL" | +| CAN_DOWNLOAD_VISUALS | "CAN_DOWNLOAD_VISUALS" | +| CAN_DOWNLOAD_DETAILED_DATA | "CAN_DOWNLOAD_DETAILED_DATA" | +| CAN_USE_SPOTTER | "CAN_USE_SPOTTER" | + + + +## Enum: TypeEnum + +| Name | Value | +|---- | -----| +| LOCAL_GROUP | "LOCAL_GROUP" | +| LDAP_GROUP | "LDAP_GROUP" | +| TEAM_GROUP | "TEAM_GROUP" | +| TENANT_GROUP | "TENANT_GROUP" | + + + +## Enum: VisibilityEnum + +| Name | Value | +|---- | -----| +| SHARABLE | "SHARABLE" | +| NON_SHARABLE | "NON_SHARABLE" | + + + +## Enum: OperationEnum + +| Name | Value | +|---- | -----| +| ADD | "ADD" | +| REMOVE | "REMOVE" | +| REPLACE | "REPLACE" | + + +## Implemented Interfaces + +* Serializable + + diff --git a/sdks/java/docs/UpdateUserRequest.md b/sdks/java/docs/UpdateUserRequest.md new file mode 100644 index 000000000..8b8693ca8 --- /dev/null +++ b/sdks/java/docs/UpdateUserRequest.md @@ -0,0 +1,112 @@ + + +# UpdateUserRequest + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**name** | **String** | Name of the user. The username string must be unique. | [optional] | +|**displayName** | **String** | A unique display name string for the user account, usually their first and last name | [optional] | +|**visibility** | [**VisibilityEnum**](#VisibilityEnum) | Visibility of the users. When set to SHARABLE, the user is visible to other users and groups when they try to share an object. | [optional] | +|**email** | **String** | Email of the user account | [optional] | +|**accountStatus** | [**AccountStatusEnum**](#AccountStatusEnum) | Current status of the user account. The `SUSPENDED` user state indicates a transitional state applicable to IAMv2 users only. | [optional] | +|**notifyOnShare** | **Boolean** | User preference for receiving email notifications when another ThoughtSpot user shares a metadata object such as Answer, Liveboard, or Worksheet. | [optional] | +|**showOnboardingExperience** | **Boolean** | The user preference for revisiting the onboarding experience. | [optional] | +|**onboardingExperienceCompleted** | **Boolean** | Indicates if the user has completed the onboarding and allows turning off the onboarding walkthrough. | [optional] | +|**accountType** | [**AccountTypeEnum**](#AccountTypeEnum) | Type of the account. | [optional] | +|**groupIdentifiers** | **List<String>** | GUIDs or names of the groups. | [optional] | +|**homeLiveboardIdentifier** | **String** | GUID of the Liveboard to set a default Liveboard for the user. ThoughtSpot displays this Liveboard on the Home page when the user logs in. | [optional] | +|**favoriteMetadata** | [**List<FavoriteMetadataInput>**](FavoriteMetadataInput.md) | Metadata objects to add to the user's favorites list. | [optional] | +|**orgIdentifiers** | **List<String>** | IDs of the Orgs. | [optional] | +|**operation** | [**OperationEnum**](#OperationEnum) | Type of update operation. Default operation type is REPLACE | [optional] | +|**preferredLocale** | [**PreferredLocaleEnum**](#PreferredLocaleEnum) | Locale for the user. When setting this value, do not set use_browser_language to true, otherwise the browser's language setting will take precedence and the preferred_locale value will be ignored. | [optional] | +|**useBrowserLanguage** | **Boolean** | Flag to indicate whether to use the browser locale for the user in the UI. When set to true, the preferred_locale value is unset and the browser's language setting takes precedence. Version: 26.3.0.cl or later | [optional] | +|**extendedProperties** | **Object** | Properties for the user | [optional] | +|**extendedPreferences** | **Object** | Preferences for the user | [optional] | + + + +## Enum: VisibilityEnum + +| Name | Value | +|---- | -----| +| SHARABLE | "SHARABLE" | +| NON_SHARABLE | "NON_SHARABLE" | + + + +## Enum: AccountStatusEnum + +| Name | Value | +|---- | -----| +| ACTIVE | "ACTIVE" | +| INACTIVE | "INACTIVE" | +| EXPIRED | "EXPIRED" | +| LOCKED | "LOCKED" | +| PENDING | "PENDING" | +| SUSPENDED | "SUSPENDED" | + + + +## Enum: AccountTypeEnum + +| Name | Value | +|---- | -----| +| LOCAL_USER | "LOCAL_USER" | +| LDAP_USER | "LDAP_USER" | +| SAML_USER | "SAML_USER" | +| OIDC_USER | "OIDC_USER" | +| REMOTE_USER | "REMOTE_USER" | + + + +## Enum: OperationEnum + +| Name | Value | +|---- | -----| +| ADD | "ADD" | +| REMOVE | "REMOVE" | +| REPLACE | "REPLACE" | + + + +## Enum: PreferredLocaleEnum + +| Name | Value | +|---- | -----| +| EN_CA | "en-CA" | +| EN_GB | "en-GB" | +| EN_US | "en-US" | +| DE_DE | "de-DE" | +| JA_JP | "ja-JP" | +| ZH_CN | "zh-CN" | +| PT_BR | "pt-BR" | +| FR_FR | "fr-FR" | +| FR_CA | "fr-CA" | +| ES_US | "es-US" | +| DA_DK | "da-DK" | +| ES_ES | "es-ES" | +| FI_FI | "fi-FI" | +| SV_SE | "sv-SE" | +| NB_NO | "nb-NO" | +| PT_PT | "pt-PT" | +| NL_NL | "nl-NL" | +| IT_IT | "it-IT" | +| RU_RU | "ru-RU" | +| EN_IN | "en-IN" | +| DE_CH | "de-CH" | +| EN_NZ | "en-NZ" | +| ES_MX | "es-MX" | +| EN_AU | "en-AU" | +| ZH_HANT | "zh-Hant" | +| KO_KR | "ko-KR" | +| EN_DE | "en-DE" | + + +## Implemented Interfaces + +* Serializable + + diff --git a/sdks/java/docs/UpdateVariableRequest.md b/sdks/java/docs/UpdateVariableRequest.md new file mode 100644 index 000000000..47ca6fb7d --- /dev/null +++ b/sdks/java/docs/UpdateVariableRequest.md @@ -0,0 +1,17 @@ + + +# UpdateVariableRequest + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**name** | **String** | New name of the variable. | | + + +## Implemented Interfaces + +* Serializable + + diff --git a/sdks/java/docs/UpdateVariableValuesRequest.md b/sdks/java/docs/UpdateVariableValuesRequest.md new file mode 100644 index 000000000..3d31ca8dc --- /dev/null +++ b/sdks/java/docs/UpdateVariableValuesRequest.md @@ -0,0 +1,18 @@ + + +# UpdateVariableValuesRequest + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**variableAssignment** | [**List<VariableUpdateAssignmentInput>**](VariableUpdateAssignmentInput.md) | Array of variable assignment objects specifying the variable identifier, values to assign, and the operation type (ADD, REMOVE, REPLACE, or RESET) to perform on each variable. | | +|**variableValueScope** | [**List<VariableUpdateScopeInput>**](VariableUpdateScopeInput.md) | Array of scope objects defining where the variable values apply, including organization context, optional principal constraints (user or group), model reference for formula variables, and priority for conflict resolution. | | + + +## Implemented Interfaces + +* Serializable + + diff --git a/sdks/java/docs/UpdateWebhookConfigurationRequest.md b/sdks/java/docs/UpdateWebhookConfigurationRequest.md new file mode 100644 index 000000000..bd860ec7e --- /dev/null +++ b/sdks/java/docs/UpdateWebhookConfigurationRequest.md @@ -0,0 +1,33 @@ + + +# UpdateWebhookConfigurationRequest + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**name** | **String** | Name of the webhook configuration. | [optional] | +|**description** | **String** | Description of the webhook configuration. | [optional] | +|**url** | **String** | The webhook endpoint URL. | [optional] | +|**urlParams** | **Object** | Additional URL parameters as key-value pairs. | [optional] | +|**events** | [**List<EventsEnum>**](#List<EventsEnum>) | List of events to subscribe to. | [optional] | +|**authentication** | [**WebhookAuthenticationInput**](WebhookAuthenticationInput.md) | Authorization configuration for the webhook. | [optional] | +|**signatureVerification** | [**WebhookSignatureVerificationInput**](WebhookSignatureVerificationInput.md) | Configuration for webhook signature verification. | [optional] | +|**storageDestination** | [**StorageDestinationInput**](StorageDestinationInput.md) | Configuration for storage destination. Example: {\"storage_type\": \"AWS_S3\", \"storage_config\": {\"aws_s3_config\": {\"bucket_name\": \"my-webhook-files\", \"region\": \"us-west-2\", \"role_arn\": \"arn:aws:iam::123456789012:role/ThoughtSpotDeliveryRole\", \"external_id\": \"ts-webhook-a1b2c3d4-7890\", \"path_prefix\": \"thoughtspot-webhooks/\"}}} Version: 26.3.0.cl or later | [optional] | +|**additionalHeaders** | [**List<WebhookKeyValuePairInput>**](WebhookKeyValuePairInput.md) | Additional headers as an array of key-value pairs. Example: [{\"key\": \"X-Custom-Header\", \"value\": \"custom_value\"}] Version: 26.4.0.cl or later | [optional] | + + + +## Enum: List<EventsEnum> + +| Name | Value | +|---- | -----| +| LIVEBOARD_SCHEDULE | "LIVEBOARD_SCHEDULE" | + + +## Implemented Interfaces + +* Serializable + + diff --git a/sdks/java/docs/User.md b/sdks/java/docs/User.md new file mode 100644 index 000000000..55000d2a8 --- /dev/null +++ b/sdks/java/docs/User.md @@ -0,0 +1,106 @@ + + +# User + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**id** | **String** | Unique identifier of the user. | | +|**name** | **String** | Name of the user. | | +|**displayName** | **String** | Display name of the user. | | +|**visibility** | [**VisibilityEnum**](#VisibilityEnum) | Visibility of the users. The `SHARABLE` property makes a user visible to other users and group, who can share objects with the user. | | +|**authorId** | **String** | Unique identifier of author of the user. | [optional] | +|**canChangePassword** | **Boolean** | Defines whether the user can change their password. | [optional] | +|**completeDetail** | **Boolean** | Defines whether the response has complete detail of the user. | [optional] | +|**creationTimeInMillis** | **Float** | Creation time of the user in milliseconds. | [optional] | +|**currentOrg** | [**Org**](Org.md) | | [optional] | +|**deleted** | **Boolean** | Indicates whether the user is deleted. | [optional] | +|**deprecated** | **Boolean** | Indicates whether the user is deprecated. | [optional] | +|**accountType** | [**AccountTypeEnum**](#AccountTypeEnum) | Type of the user account. | [optional] | +|**accountStatus** | [**AccountStatusEnum**](#AccountStatusEnum) | Status of the user account. | [optional] | +|**email** | **String** | Email of the user. | [optional] | +|**expirationTimeInMillis** | **Float** | Expiration time of the user in milliseconds. | [optional] | +|**external** | **Boolean** | Indicates whether the user is external. | [optional] | +|**favoriteMetadata** | [**List<FavoriteMetadataItem>**](FavoriteMetadataItem.md) | Metadata objects to add to the users' favorites list. | [optional] | +|**firstLoginTimeInMillis** | **Float** | Timestamp of the first login session of the user in milliseconds. | [optional] | +|**groupMask** | **Integer** | Group mask of the user. | [optional] | +|**hidden** | **Boolean** | Indicates whether the user is hidden. | [optional] | +|**homeLiveboard** | [**ObjectIDAndName**](ObjectIDAndName.md) | | [optional] | +|**incompleteDetails** | **Object** | Incomplete details of user if any present. | [optional] | +|**isFirstLogin** | **Boolean** | Indicates whether it is first login of the user. | [optional] | +|**modificationTimeInMillis** | **Float** | Last modified time of the user in milliseconds. | [optional] | +|**modifierId** | **String** | Unique identifier of modifier of the user. | [optional] | +|**notifyOnShare** | **Boolean** | User preference for receiving email notifications on shared Answers or Liveboard. | [optional] | +|**onboardingExperienceCompleted** | **Boolean** | The user preference for turning off the onboarding experience. | [optional] | +|**orgs** | [**List<Org>**](Org.md) | Orgs to which the user belongs. | [optional] | +|**ownerId** | **String** | Unique identifier of owner of the user. | [optional] | +|**parentType** | [**ParentTypeEnum**](#ParentTypeEnum) | Parent type of the user. | [optional] | +|**privileges** | **List<String>** | Privileges which are assigned to the user. | [optional] | +|**showOnboardingExperience** | **Boolean** | User's preference to revisit the new user onboarding experience. | [optional] | +|**superUser** | **Boolean** | Indicates whether the user is a super user. | [optional] | +|**systemUser** | **Boolean** | Indicates whether the user is a system user. | [optional] | +|**tags** | [**List<ObjectIDAndName>**](ObjectIDAndName.md) | Tags associated with the user. | [optional] | +|**tenantId** | **String** | Unique identifier of tenant of the user. | [optional] | +|**userGroups** | [**List<ObjectIDAndName>**](ObjectIDAndName.md) | Groups to which the user is assigned. | [optional] | +|**userInheritedGroups** | [**List<ObjectIDAndName>**](ObjectIDAndName.md) | Inherited User Groups which the user is part of. | [optional] | +|**welcomeEmailSent** | **Boolean** | Indicates whether welcome email is sent for the user. | [optional] | +|**orgPrivileges** | **Object** | Privileges which are assigned to the user with org. | [optional] | +|**preferredLocale** | **String** | Locale for the user. | [optional] | +|**useBrowserLanguage** | **Boolean** | Flag to indicate whether to use the browser locale for the user in the UI. When set to true, the preferred_locale value is unset and the browser's language setting takes precedence. Version: 26.3.0.cl or later | [optional] | +|**extendedProperties** | **Object** | Properties for the user | [optional] | +|**extendedPreferences** | **Object** | Preferences for the user | [optional] | +|**userParameters** | **Object** | User Parameters which are specified for the user via JWToken | [optional] | +|**accessControlProperties** | **Object** | Access Control Properties which are specified for the user via JWToken | [optional] | +|**variableValues** | **Object** | Formula Variables which are specified for the user via JWToken | [optional] | + + + +## Enum: VisibilityEnum + +| Name | Value | +|---- | -----| +| SHARABLE | "SHARABLE" | +| NON_SHARABLE | "NON_SHARABLE" | + + + +## Enum: AccountTypeEnum + +| Name | Value | +|---- | -----| +| LOCAL_USER | "LOCAL_USER" | +| LDAP_USER | "LDAP_USER" | +| SAML_USER | "SAML_USER" | +| OIDC_USER | "OIDC_USER" | +| REMOTE_USER | "REMOTE_USER" | + + + +## Enum: AccountStatusEnum + +| Name | Value | +|---- | -----| +| ACTIVE | "ACTIVE" | +| INACTIVE | "INACTIVE" | +| EXPIRED | "EXPIRED" | +| LOCKED | "LOCKED" | +| PENDING | "PENDING" | +| SUSPENDED | "SUSPENDED" | + + + +## Enum: ParentTypeEnum + +| Name | Value | +|---- | -----| +| USER | "USER" | +| GROUP | "GROUP" | + + +## Implemented Interfaces + +* Serializable + + diff --git a/sdks/java/docs/UserGroup.md b/sdks/java/docs/UserGroup.md new file mode 100644 index 000000000..5ea3bda22 --- /dev/null +++ b/sdks/java/docs/UserGroup.md @@ -0,0 +1,18 @@ + + +# UserGroup + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**id** | **String** | | [optional] | +|**name** | **String** | | [optional] | + + +## Implemented Interfaces + +* Serializable + + diff --git a/sdks/java/docs/UserGroupResponse.md b/sdks/java/docs/UserGroupResponse.md new file mode 100644 index 000000000..ef58b09ff --- /dev/null +++ b/sdks/java/docs/UserGroupResponse.md @@ -0,0 +1,75 @@ + + +# UserGroupResponse + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**authorId** | **String** | The unique identifier of the object | [optional] | +|**completeDetail** | **Boolean** | Indicates whether the response has complete detail of the group. | [optional] | +|**content** | **Object** | Content details of the group | [optional] | +|**creationTimeInMillis** | **Float** | Creation time of the group in milliseconds | [optional] | +|**defaultLiveboards** | [**List<UserGroup>**](UserGroup.md) | Liveboards that are assigned as default Liveboards to the group. | [optional] | +|**deleted** | **Boolean** | Indicates whether the group is deleted | [optional] | +|**deprecated** | **Boolean** | Indicates whether the group is deprecated | [optional] | +|**description** | **String** | Description of the group | [optional] | +|**displayName** | **String** | Display name of the group. | | +|**external** | **Boolean** | Indicates whether the group is external | [optional] | +|**generationNumber** | **Integer** | Generation number of the group | [optional] | +|**hidden** | **Boolean** | Indicates whether the group is hidden | [optional] | +|**id** | **String** | The unique identifier of the object | | +|**index** | **Integer** | Index number of the group | [optional] | +|**indexVersion** | **Integer** | Index version number of the group | [optional] | +|**metadataVersion** | **Integer** | Metadata version number of the group | [optional] | +|**modificationTimeInMillis** | **Float** | Last modified time of the group in milliseconds. | [optional] | +|**modifierId** | **String** | The unique identifier of the object | [optional] | +|**name** | **String** | Name of the group. | | +|**orgs** | [**List<UserGroup>**](UserGroup.md) | Orgs in which group exists. | [optional] | +|**ownerId** | **String** | The unique identifier of the object | [optional] | +|**parentType** | [**ParentTypeEnum**](#ParentTypeEnum) | Parent type of the group. | [optional] | +|**privileges** | **List<String>** | Privileges which are assigned to the group | [optional] | +|**subGroups** | [**List<UserGroup>**](UserGroup.md) | Groups who are part of the group | [optional] | +|**systemGroup** | **Boolean** | Indicates whether the group is a system group. | [optional] | +|**tags** | [**List<UserGroup>**](UserGroup.md) | Tags associated with the group. | [optional] | +|**type** | [**TypeEnum**](#TypeEnum) | Type of the group. | [optional] | +|**users** | [**List<UserGroup>**](UserGroup.md) | Users who are part of the group. | [optional] | +|**visibility** | [**VisibilityEnum**](#VisibilityEnum) | Visibility of the group. The SHARABLE makes a group visible to other users and groups, and thus allows them to share objects. | | +|**roles** | [**List<Role>**](Role.md) | List of roles assgined to the user | [optional] | + + + +## Enum: ParentTypeEnum + +| Name | Value | +|---- | -----| +| USER | "USER" | +| GROUP | "GROUP" | + + + +## Enum: TypeEnum + +| Name | Value | +|---- | -----| +| LOCAL_GROUP | "LOCAL_GROUP" | +| LDAP_GROUP | "LDAP_GROUP" | +| TEAM_GROUP | "TEAM_GROUP" | +| TENANT_GROUP | "TENANT_GROUP" | + + + +## Enum: VisibilityEnum + +| Name | Value | +|---- | -----| +| SHARABLE | "SHARABLE" | +| NON_SHARABLE | "NON_SHARABLE" | + + +## Implemented Interfaces + +* Serializable + + diff --git a/sdks/java/docs/UserInfo.md b/sdks/java/docs/UserInfo.md new file mode 100644 index 000000000..d2572e28e --- /dev/null +++ b/sdks/java/docs/UserInfo.md @@ -0,0 +1,18 @@ + + +# UserInfo + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**id** | **String** | Id. | | +|**name** | **String** | Name. | [optional] | + + +## Implemented Interfaces + +* Serializable + + diff --git a/sdks/java/docs/UserObject.md b/sdks/java/docs/UserObject.md new file mode 100644 index 000000000..4ee8b7fe0 --- /dev/null +++ b/sdks/java/docs/UserObject.md @@ -0,0 +1,27 @@ + + +# UserObject + +Objects to apply the User_Object. + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**type** | [**TypeEnum**](#TypeEnum) | Type of object. Required if the name of the object is set as the identifier. This attribute is optional when the object GUID is specified as the identifier. Specify the object type as `LOGICAL_TABLE`. | [optional] | +|**identifier** | **String** | Unique name/id of the object. | | + + + +## Enum: TypeEnum + +| Name | Value | +|---- | -----| +| LOGICAL_TABLE | "LOGICAL_TABLE" | + + +## Implemented Interfaces + +* Serializable + + diff --git a/sdks/java/docs/UserParameterOptions.md b/sdks/java/docs/UserParameterOptions.md new file mode 100644 index 000000000..2a0f9af02 --- /dev/null +++ b/sdks/java/docs/UserParameterOptions.md @@ -0,0 +1,21 @@ + + +# UserParameterOptions + +Define attributes such as Runtime filters and Runtime parameters to send security entitlements to a user session. For more information, see [Documentation](https://developers.thoughtspot.com/docs/abac-user-parameters). + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**objects** | [**List<UserObject>**](UserObject.md) | | [optional] | +|**runtimeFilters** | [**List<RuntimeFilters>**](RuntimeFilters.md) | Objects to apply the User_Runtime_Filters. Examples to set the `runtime_filters` : ```json { \"column_name\": \"Color\", \"operator\": \"EQ\", \"values\": [\"red\"], \"persist\": false } ``` | [optional] | +|**runtimeSorts** | [**List<RuntimeSorts>**](RuntimeSorts.md) | Objects to apply the User_Runtime_Sorts. Examples to set the `runtime_sorts` : ```json { \"column_name\": \"Color\", \"order\": \"ASC\", \"persist\": false } ``` | [optional] | +|**parameters** | [**List<RuntimeParameters>**](RuntimeParameters.md) | Objects to apply the Runtime_Parameters. Examples to set the `parameters` : ```json { \"name\": \"Color\", \"values\": [\"Blue\"], \"persist\": false } ``` | [optional] | + + +## Implemented Interfaces + +* Serializable + + diff --git a/sdks/java/docs/UserPrincipal.md b/sdks/java/docs/UserPrincipal.md new file mode 100644 index 000000000..0ab5a0a35 --- /dev/null +++ b/sdks/java/docs/UserPrincipal.md @@ -0,0 +1,19 @@ + + +# UserPrincipal + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**id** | **String** | | [optional] | +|**name** | **String** | | [optional] | +|**type** | **String** | | [optional] | + + +## Implemented Interfaces + +* Serializable + + diff --git a/sdks/java/docs/UsersApi.md b/sdks/java/docs/UsersApi.md new file mode 100644 index 000000000..bfb076bd6 --- /dev/null +++ b/sdks/java/docs/UsersApi.md @@ -0,0 +1,379 @@ +# UsersApi + +All URIs are relative to *CLUSTER_URL* + +| Method | HTTP request | +|------------- | ------------- | +| [**activateUser**](UsersApi.md#activateUser) | **POST** /api/rest/2.0/users/activate | +| [**changeUserPassword**](UsersApi.md#changeUserPassword) | **POST** /api/rest/2.0/users/change-password | +| [**createUser**](UsersApi.md#createUser) | **POST** /api/rest/2.0/users/create | +| [**deactivateUser**](UsersApi.md#deactivateUser) | **POST** /api/rest/2.0/users/deactivate | +| [**deleteUser**](UsersApi.md#deleteUser) | **POST** /api/rest/2.0/users/{user_identifier}/delete | +| [**forceLogoutUsers**](UsersApi.md#forceLogoutUsers) | **POST** /api/rest/2.0/users/force-logout | +| [**importUsers**](UsersApi.md#importUsers) | **POST** /api/rest/2.0/users/import | +| [**resetUserPassword**](UsersApi.md#resetUserPassword) | **POST** /api/rest/2.0/users/reset-password | +| [**searchUsers**](UsersApi.md#searchUsers) | **POST** /api/rest/2.0/users/search | +| [**updateUser**](UsersApi.md#updateUser) | **POST** /api/rest/2.0/users/{user_identifier}/update | + + + +# **activateUser** +> User activateUser(activateUserRequest) + + + + Version: 9.7.0.cl or later Activates a deactivated user account. Requires `ADMINISTRATION` (**Can administer Thoughtspot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `USER_ADMINISTRATION` (**Can manage users**) privilege is required. To activate an inactive user account, the API request body must include the following information: - Username or the GUID of the user account. - Auth token generated for the deactivated user. The auth token is sent in the API response when a user is deactivated. - Password for the user account. + +### Parameters + +| Name | Type | +|------------- | ------------- | +| **activateUserRequest** | [**ActivateUserRequest**](ActivateUserRequest.md) + +### Return type + +[**User**](User.md) + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | User activated successfully. | - | +| **400** | Invalid request. | - | +| **401** | Unauthorized access. | - | +| **403** | Forbidden access. | - | +| **500** | Unexpected error | - | + + +# **changeUserPassword** +> changeUserPassword(changeUserPasswordRequest) + + + + Version: 9.0.0.cl or later Updates the current password of the user. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `USER_ADMINISTRATION` (**Can manage users**) privilege is required. + +### Parameters + +| Name | Type | +|------------- | ------------- | +| **changeUserPasswordRequest** | [**ChangeUserPasswordRequest**](ChangeUserPasswordRequest.md) + +### Return type + +null (empty response body) + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **204** | User password change operation successful. | - | +| **400** | Invalid request. | - | +| **401** | Unauthorized access. | - | +| **403** | Forbidden access. | - | +| **500** | Unexpected error | - | + + +# **createUser** +> User createUser(createUserRequest) + + + + Version: 9.0.0.cl or later Creates a user in ThoughtSpot. The API endpoint allows you to configure several user properties such as email address, account status, share notification preferences, and sharing visibility. You can provision the user to [groups](https://docs.thoughtspot.com/cloud/latest/groups-privileges) and [Orgs](https://docs.thoughtspot.com/cloud/latest/orgs-overview). You can also add Liveboard, Answer, and Worksheet objects to the user’s favorites list, assign a default Liveboard for the user, and set user preferences. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `USER_ADMINISTRATION` (**Can manage users**) privilege is required. + +### Parameters + +| Name | Type | +|------------- | ------------- | +| **createUserRequest** | [**CreateUserRequest**](CreateUserRequest.md) + +### Return type + +[**User**](User.md) + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | User successfully created. | - | +| **400** | Invalid request. | - | +| **401** | Unauthorized access. | - | +| **403** | Forbidden access. | - | +| **500** | Unexpected error | - | + + +# **deactivateUser** +> ResponseActivationURL deactivateUser(deactivateUserRequest) + + + + Version: 9.7.0.cl or later Deactivates a user account. Requires `ADMINISTRATION` (**Can administer Thoughtspot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `USER_ADMINISTRATION` (**Can manage users**) privilege is required. To deactivate a user account, the API request body must include the following information: - Username or the GUID of the user account - Base URL of the ThoughtSpot instance If the API request is successful, ThoughtSpot returns the activation URL in the response. The activation URL is valid for 14 days and can be used to re-activate the account and reset the password of the deactivated account. + +### Parameters + +| Name | Type | +|------------- | ------------- | +| **deactivateUserRequest** | [**DeactivateUserRequest**](DeactivateUserRequest.md) + +### Return type + +[**ResponseActivationURL**](ResponseActivationURL.md) + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | User deactivated successfully. | - | +| **400** | Invalid request. | - | +| **401** | Unauthorized access. | - | +| **403** | Forbidden access. | - | +| **500** | Unexpected error | - | + + +# **deleteUser** +> deleteUser(userIdentifier) + + + + Version: 9.0.0.cl or later Deletes a user from the ThoughtSpot system. If you want to remove a user from a specific Org but not from ThoughtSpot, update the group and Org mapping properties of the user object via a POST API call to the [/api/rest/2.0/users/{user_identifier}/update](#/http/api-endpoints/users/update-user) endpoint. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `USER_ADMINISTRATION` (**Can manage users**) privilege is required. + +### Parameters + +| Name | Type | +|------------- | ------------- | +| **userIdentifier** | **String** + +### Return type + +null (empty response body) + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **204** | User successfully deleted. | - | +| **400** | Invalid request. | - | +| **401** | Unauthorized access. | - | +| **403** | Forbidden access. | - | +| **500** | Unexpected error | - | + + +# **forceLogoutUsers** +> forceLogoutUsers(forceLogoutUsersRequest) + + + + Version: 9.0.0.cl or later Enforces logout on current user sessions. Use this API with caution as it may invalidate active user sessions and force users to re-login. Make sure you specify the usernames or GUIDs. If you pass null values in the API call, all user sessions on your cluster become invalid, and the users are forced to re-login. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `USER_ADMINISTRATION` (**Can manage users**) privilege is required. + +### Parameters + +| Name | Type | +|------------- | ------------- | +| **forceLogoutUsersRequest** | [**ForceLogoutUsersRequest**](ForceLogoutUsersRequest.md) + +### Return type + +null (empty response body) + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **204** | Force logging out of users operation successful. | - | +| **400** | Invalid request. | - | +| **401** | Unauthorized access. | - | +| **403** | Forbidden access. | - | +| **500** | Unexpected error | - | + + +# **importUsers** +> ImportUsersResponse importUsers(importUsersRequest) + + + + Version: 9.0.0.cl or later Imports user data from external databases into ThoughtSpot. During the user import operation: * If the specified users are not available in ThoughtSpot, the users are created and assigned a default password. Defining a `default_password` in the API request is optional. * If `delete_unspecified_users` is set to `true`, the users not specified in the API request, excluding the `tsadmin`, `guest`, `system` and `su` users, are deleted. * If the specified user objects are already available in ThoughtSpot, the object properties are updated and synchronized as per the input data in the API request. A successful API call returns the object that represents the changes made in the ThoughtSpot system. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `USER_ADMINISTRATION` (**Can manage users**) privilege is required. + +### Parameters + +| Name | Type | +|------------- | ------------- | +| **importUsersRequest** | [**ImportUsersRequest**](ImportUsersRequest.md) + +### Return type + +[**ImportUsersResponse**](ImportUsersResponse.md) + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Import users operation successful. | - | +| **400** | Invalid request. | - | +| **401** | Unauthorized access. | - | +| **403** | Forbidden access. | - | +| **500** | Unexpected error | - | + + +# **resetUserPassword** +> resetUserPassword(resetUserPasswordRequest) + + + + Version: 9.0.0.cl or later Resets the password of a user account. Administrators can reset password on behalf of a user. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `USER_ADMINISTRATION` (**Can manage users**) privilege is required. + +### Parameters + +| Name | Type | +|------------- | ------------- | +| **resetUserPasswordRequest** | [**ResetUserPasswordRequest**](ResetUserPasswordRequest.md) + +### Return type + +null (empty response body) + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **204** | User password reset operation successful. | - | +| **400** | Invalid request. | - | +| **401** | Unauthorized access. | - | +| **403** | Forbidden access. | - | +| **500** | Unexpected error | - | + + +# **searchUsers** +> List<User> searchUsers(searchUsersRequest) + + + + Version: 9.0.0.cl or later Gets a list of users available on the ThoughtSpot system. To get details of a specific user, specify the user GUID or name. You can also filter the API response based on groups, Org ID, user visibility, account status, user type, and user preference settings and favorites. Available to all users. Users with `ADMINISTRATION` (**Can administer ThoughtSpot**) privileges can view all users properties. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `USER_ADMINISTRATION` (**Can manage users**) privilege is required. **NOTE**: If the API returns an empty list, consider increasing the value of the `record_size` parameter. To search across all available users, set `record_size` to `-1`. + +### Parameters + +| Name | Type | +|------------- | ------------- | +| **searchUsersRequest** | [**SearchUsersRequest**](SearchUsersRequest.md) + +### Return type + +[**List<User>**](User.md) + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | User search result. | - | +| **400** | Invalid request. | - | +| **401** | Unauthorized access. | - | +| **403** | Forbidden access. | - | +| **500** | Unexpected error | - | + + +# **updateUser** +> updateUser(userIdentifier, updateUserRequest) + + + + Version: 9.0.0.cl or later Updates the properties of a user object. You can modify user properties such as username, email, and share notification settings. You can also assign new groups and Orgs, remove the user from a group or Org, reset password, and modify user preferences. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `USER_ADMINISTRATION` (**Can manage users**) privilege is required. + +### Parameters + +| Name | Type | +|------------- | ------------- | +| **userIdentifier** | **String** +| **updateUserRequest** | [**UpdateUserRequest**](UpdateUserRequest.md) + +### Return type + +null (empty response body) + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **204** | User successfully updated. | - | +| **400** | Invalid request. | - | +| **401** | Unauthorized access. | - | +| **403** | Forbidden access. | - | +| **500** | Unexpected error | - | + diff --git a/sdks/java/docs/ValidateCommunicationChannelRequest.md b/sdks/java/docs/ValidateCommunicationChannelRequest.md new file mode 100644 index 000000000..f8714d772 --- /dev/null +++ b/sdks/java/docs/ValidateCommunicationChannelRequest.md @@ -0,0 +1,35 @@ + + +# ValidateCommunicationChannelRequest + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**channelType** | [**ChannelTypeEnum**](#ChannelTypeEnum) | Type of communication channel to validate (e.g., WEBHOOK). | | +|**channelIdentifier** | **String** | Unique identifier or name for the communication channel. | | +|**eventType** | [**EventTypeEnum**](#EventTypeEnum) | Event type to validate for this channel. | | + + + +## Enum: ChannelTypeEnum + +| Name | Value | +|---- | -----| +| WEBHOOK | "WEBHOOK" | + + + +## Enum: EventTypeEnum + +| Name | Value | +|---- | -----| +| LIVEBOARD_SCHEDULE | "LIVEBOARD_SCHEDULE" | + + +## Implemented Interfaces + +* Serializable + + diff --git a/sdks/java/docs/ValidateMergeRequest.md b/sdks/java/docs/ValidateMergeRequest.md new file mode 100644 index 000000000..de35ace10 --- /dev/null +++ b/sdks/java/docs/ValidateMergeRequest.md @@ -0,0 +1,18 @@ + + +# ValidateMergeRequest + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**sourceBranchName** | **String** | Name of the branch from which changes need to be picked for validation | | +|**targetBranchName** | **String** | Name of the branch where files will be merged | | + + +## Implemented Interfaces + +* Serializable + + diff --git a/sdks/java/docs/ValidateTokenRequest.md b/sdks/java/docs/ValidateTokenRequest.md new file mode 100644 index 000000000..057ee42dd --- /dev/null +++ b/sdks/java/docs/ValidateTokenRequest.md @@ -0,0 +1,17 @@ + + +# ValidateTokenRequest + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**token** | **String** | | | + + +## Implemented Interfaces + +* Serializable + + diff --git a/sdks/java/docs/ValueScopeInput.md b/sdks/java/docs/ValueScopeInput.md new file mode 100644 index 000000000..10e2a8a94 --- /dev/null +++ b/sdks/java/docs/ValueScopeInput.md @@ -0,0 +1,30 @@ + + +# ValueScopeInput + +Input for filtering variable values by scope in search operations + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**orgIdentifier** | **String** | The unique name of the org | [optional] | +|**principalType** | [**PrincipalTypeEnum**](#PrincipalTypeEnum) | Type of principal to filter by. Use USER to filter values assigned to specific users, or USER_GROUP to filter values assigned to groups. | [optional] | +|**principalIdentifier** | **String** | Unique ID or name of the principal | [optional] | +|**modelIdentifier** | **String** | Unique ID or name of the model to filter by. Applicable only for FORMULA_VARIABLE type. | [optional] | + + + +## Enum: PrincipalTypeEnum + +| Name | Value | +|---- | -----| +| USER | "USER" | +| USER_GROUP | "USER_GROUP" | + + +## Implemented Interfaces + +* Serializable + + diff --git a/sdks/java/docs/Variable.md b/sdks/java/docs/Variable.md new file mode 100644 index 000000000..fa90d3ba4 --- /dev/null +++ b/sdks/java/docs/Variable.md @@ -0,0 +1,35 @@ + + +# Variable + +Variable object + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**id** | **String** | Unique identifier of the variable | | +|**name** | **String** | Name of the variable | | +|**variableType** | [**VariableTypeEnum**](#VariableTypeEnum) | Type of the variable | [optional] | +|**sensitive** | **Boolean** | If the variable is sensitive | [optional] | +|**values** | [**List<VariableValue>**](VariableValue.md) | Values of the variable | [optional] | +|**org** | [**VariableOrgInfo**](VariableOrgInfo.md) | | [optional] | + + + +## Enum: VariableTypeEnum + +| Name | Value | +|---- | -----| +| CONNECTION_PROPERTY | "CONNECTION_PROPERTY" | +| TABLE_MAPPING | "TABLE_MAPPING" | +| CONNECTION_PROPERTY_PER_PRINCIPAL | "CONNECTION_PROPERTY_PER_PRINCIPAL" | +| FORMULA_VARIABLE | "FORMULA_VARIABLE" | +| USER_PROPERTY | "USER_PROPERTY" | + + +## Implemented Interfaces + +* Serializable + + diff --git a/sdks/java/docs/VariableApi.md b/sdks/java/docs/VariableApi.md new file mode 100644 index 000000000..ad79a9aba --- /dev/null +++ b/sdks/java/docs/VariableApi.md @@ -0,0 +1,269 @@ +# VariableApi + +All URIs are relative to *CLUSTER_URL* + +| Method | HTTP request | +|------------- | ------------- | +| [**createVariable**](VariableApi.md#createVariable) | **POST** /api/rest/2.0/template/variables/create | +| [**deleteVariable**](VariableApi.md#deleteVariable) | **POST** /api/rest/2.0/template/variables/{identifier}/delete | +| [**deleteVariables**](VariableApi.md#deleteVariables) | **POST** /api/rest/2.0/template/variables/delete | +| [**putVariableValues**](VariableApi.md#putVariableValues) | **POST** /api/rest/2.0/template/variables/{identifier}/update-values | +| [**searchVariables**](VariableApi.md#searchVariables) | **POST** /api/rest/2.0/template/variables/search | +| [**updateVariable**](VariableApi.md#updateVariable) | **POST** /api/rest/2.0/template/variables/{identifier}/update | +| [**updateVariableValues**](VariableApi.md#updateVariableValues) | **POST** /api/rest/2.0/template/variables/update-values | + + + +# **createVariable** +> Variable createVariable(createVariableRequest) + + + + Create a variable which can be used for parameterizing metadata objects Version: 26.4.0.cl or later Allows creating a variable which can be used for parameterizing metadata objects in ThoughtSpot. Requires ADMINISTRATION role and TENANT scope. The CAN_MANAGE_VARIABLES permission allows you to manage Formula Variables in the current organization scope. The API endpoint supports the following types of variables: * CONNECTION_PROPERTY - For connection properties * TABLE_MAPPING - For table mappings * CONNECTION_PROPERTY_PER_PRINCIPAL - For connection properties per principal. In order to use this please contact support to enable this. * FORMULA_VARIABLE - For Formula variables, introduced in 10.15.0.cl When creating a variable, you need to specify: * The variable type * A unique name for the variable * Whether the variable contains sensitive values (defaults to false) * The data type of the variable, only specify for formula variables (defaults to null) The operation will fail if: * The user lacks required permissions * The variable name already exists * The variable type is invalid + +### Parameters + +| Name | Type | +|------------- | ------------- | +| **createVariableRequest** | [**CreateVariableRequest**](CreateVariableRequest.md) + +### Return type + +[**Variable**](Variable.md) + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Create variable is successful. | - | +| **400** | Invalid request. | - | +| **401** | Unauthorized access. | - | +| **403** | Forbidden access. | - | +| **500** | Unexpected error | - | + + +# **deleteVariable** +> deleteVariable(identifier) + + + + Delete a variable Version: 10.14.0.cl or later **Note:** This API endpoint is deprecated and will be removed from ThoughtSpot in a future release. Use [POST /api/rest/2.0/template/variables/delete](/api/rest/2.0/template/variables/delete) instead. Allows deleting a variable from ThoughtSpot. Requires ADMINISTRATION role and TENANT scope. The CAN_MANAGE_VARIABLES permission allows you to manage Formula Variables in the current organization scope. The API endpoint requires: * The variable identifier (ID or name) The operation will fail if: * The user lacks required permissions * The variable doesn't exist * The variable is being used by other objects + +### Parameters + +| Name | Type | +|------------- | ------------- | +| **identifier** | **String** + +### Return type + +null (empty response body) + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **204** | Deleting the variable is successful. | - | +| **400** | Invalid request. | - | +| **401** | Unauthorized access. | - | +| **403** | Forbidden access. | - | +| **500** | Unexpected error | - | + + +# **deleteVariables** +> deleteVariables(deleteVariablesRequest) + + + + Delete variable(s) Version: 26.4.0.cl or later Allows deleting multiple variables from ThoughtSpot. Requires ADMINISTRATION role and TENANT scope. The CAN_MANAGE_VARIABLES permission allows you to manage Formula Variables in the current organization scope. The API endpoint requires: * The variable identifiers (IDs or names) The operation will fail if: * The user lacks required permissions * Any of the variables don't exist * Any of the variables are being used by other objects + +### Parameters + +| Name | Type | +|------------- | ------------- | +| **deleteVariablesRequest** | [**DeleteVariablesRequest**](DeleteVariablesRequest.md) + +### Return type + +null (empty response body) + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **204** | Deletion of variable(s) is successful. | - | +| **400** | Invalid request. | - | +| **401** | Unauthorized access. | - | +| **403** | Forbidden access. | - | +| **500** | Unexpected error | - | + + +# **putVariableValues** +> putVariableValues(identifier, putVariableValuesRequest) + + + + Update values for a variable Version: 26.4.0.cl or later Allows updating values for a specific variable in ThoughtSpot. Requires ADMINISTRATION role. The CAN_MANAGE_VARIABLES permission allows you to manage Formula Variables in the current organization scope. The API endpoint allows: * Adding new values to the variable * Replacing existing values * Deleting values from the variable * Resetting all values When updating variable values, you need to specify: * The variable identifier (ID or name) * The values to add/replace/remove * The operation to perform (ADD, REPLACE, REMOVE, RESET) Behaviour based on operation type: * ADD - Adds values to the variable if this is a list type variable, else same as replace. * REPLACE - Replaces all values of a given set of constraints with the current set of values. * REMOVE - Removes any values which match the set of conditions of the variables if this is a list type variable, else clears value. * RESET - Removes all constraints for the given variable, scope is ignored + +### Parameters + +| Name | Type | +|------------- | ------------- | +| **identifier** | **String** +| **putVariableValuesRequest** | [**PutVariableValuesRequest**](PutVariableValuesRequest.md) + +### Return type + +null (empty response body) + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **204** | Variable values updated successfully. | - | +| **400** | Invalid request. | - | +| **401** | Unauthorized access. | - | +| **403** | Forbidden access. | - | +| **500** | Unexpected error | - | + + +# **searchVariables** +> List<Variable> searchVariables(searchVariablesRequest) + + + + Search variables Version: 26.4.0.cl or later Allows searching for variables in ThoughtSpot. Requires ADMINISTRATION role. The CAN_MANAGE_VARIABLES permission allows you to manage Formula Variables in the current organization scope. The API endpoint supports searching variables by: * Variable identifier (ID or name) * Variable type * Name pattern (case-insensitive, supports % for wildcard) The search results can be formatted in three ways: * METADATA - Returns only variable metadata (default) * METADATA_AND_VALUES - Returns variable metadata and values The values can be filtered by scope: * org_identifier * principal_identifier * model_identifier + +### Parameters + +| Name | Type | +|------------- | ------------- | +| **searchVariablesRequest** | [**SearchVariablesRequest**](SearchVariablesRequest.md) + +### Return type + +[**List<Variable>**](Variable.md) + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | List of variables is successful. | - | +| **400** | Invalid request. | - | +| **401** | Unauthorized access. | - | +| **403** | Forbidden access. | - | +| **500** | Unexpected error | - | + + +# **updateVariable** +> updateVariable(identifier, updateVariableRequest) + + + + Update a variable's name Version: 26.4.0.cl or later Allows updating a variable's name in ThoughtSpot. Requires ADMINISTRATION role and TENANT scope. The CAN_MANAGE_VARIABLES permission allows you to manage Formula Variables in the current organization scope. The API endpoint allows updating: * The variable name + +### Parameters + +| Name | Type | +|------------- | ------------- | +| **identifier** | **String** +| **updateVariableRequest** | [**UpdateVariableRequest**](UpdateVariableRequest.md) + +### Return type + +null (empty response body) + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **204** | Variable name updated successfully. | - | +| **400** | Invalid request. | - | +| **401** | Unauthorized access. | - | +| **403** | Forbidden access. | - | +| **500** | Unexpected error | - | + + +# **updateVariableValues** +> updateVariableValues(updateVariableValuesRequest) + + + + Update values for multiple variables Version: 10.14.0.cl or later **Note:** This API endpoint is deprecated and will be removed from ThoughtSpot in a future release. Use [POST /api/rest/2.0/template/variables/{identifier}/update-values](/api/rest/2.0/template/variables/%7Bidentifier%7D/update-values) instead. Allows updating values for multiple variables in ThoughtSpot. Requires ADMINISTRATION role. The CAN_MANAGE_VARIABLES permission allows you to manage Formula Variables in the current organization scope. The API endpoint allows: * Adding new values to variables * Replacing existing values * Deleting values from variables When updating variable values, you need to specify: * The variable identifiers * The values to add/replace/remove for each variable * The operation to perform (ADD, REPLACE, REMOVE, RESET) Behaviour based on operation type: * ADD - Adds values to the variable if this is a list type variable, else same as replace. * REPLACE - Replaces all values of a given set of constraints with the current set of values. * REMOVE - Removes any values which match the set of conditions of the variables if this is a list type variable, else clears value. * RESET - Removes all constrains for a given variable, scope is ignored + +### Parameters + +| Name | Type | +|------------- | ------------- | +| **updateVariableValuesRequest** | [**UpdateVariableValuesRequest**](UpdateVariableValuesRequest.md) + +### Return type + +null (empty response body) + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **204** | Variable values updated successfully. | - | +| **400** | Invalid request. | - | +| **401** | Unauthorized access. | - | +| **403** | Forbidden access. | - | +| **500** | Unexpected error | - | + diff --git a/sdks/java/docs/VariableDetailInput.md b/sdks/java/docs/VariableDetailInput.md new file mode 100644 index 000000000..e2825e97d --- /dev/null +++ b/sdks/java/docs/VariableDetailInput.md @@ -0,0 +1,32 @@ + + +# VariableDetailInput + +Input for variable details in search + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**identifier** | **String** | Unique ID or name of the variable | [optional] | +|**type** | [**TypeEnum**](#TypeEnum) | Type of variable | [optional] | +|**namePattern** | **String** | A pattern to match case-insensitive name of the variable. User % for a wildcard match | [optional] | + + + +## Enum: TypeEnum + +| Name | Value | +|---- | -----| +| CONNECTION_PROPERTY | "CONNECTION_PROPERTY" | +| TABLE_MAPPING | "TABLE_MAPPING" | +| CONNECTION_PROPERTY_PER_PRINCIPAL | "CONNECTION_PROPERTY_PER_PRINCIPAL" | +| FORMULA_VARIABLE | "FORMULA_VARIABLE" | +| USER_PROPERTY | "USER_PROPERTY" | + + +## Implemented Interfaces + +* Serializable + + diff --git a/sdks/java/docs/VariableOrgInfo.md b/sdks/java/docs/VariableOrgInfo.md new file mode 100644 index 000000000..875701854 --- /dev/null +++ b/sdks/java/docs/VariableOrgInfo.md @@ -0,0 +1,18 @@ + + +# VariableOrgInfo + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**id** | **Integer** | ID of the Org. | | +|**name** | **String** | Name of the Org. | | + + +## Implemented Interfaces + +* Serializable + + diff --git a/sdks/java/docs/VariablePutAssignmentInput.md b/sdks/java/docs/VariablePutAssignmentInput.md new file mode 100644 index 000000000..0f174601f --- /dev/null +++ b/sdks/java/docs/VariablePutAssignmentInput.md @@ -0,0 +1,32 @@ + + +# VariablePutAssignmentInput + +Input for variable value put operations + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**assignedValues** | **List<String>** | Values of the variable | | +|**orgIdentifier** | **String** | The unique name of the org | [optional] | +|**principalType** | [**PrincipalTypeEnum**](#PrincipalTypeEnum) | Principal type | [optional] | +|**principalIdentifier** | **String** | Unique ID or name of the principal | [optional] | +|**modelIdentifier** | **String** | Unique ID of the model | [optional] | +|**priority** | **Integer** | Priority level | [optional] | + + + +## Enum: PrincipalTypeEnum + +| Name | Value | +|---- | -----| +| USER | "USER" | +| USER_GROUP | "USER_GROUP" | + + +## Implemented Interfaces + +* Serializable + + diff --git a/sdks/java/docs/VariableUpdateAssignmentInput.md b/sdks/java/docs/VariableUpdateAssignmentInput.md new file mode 100644 index 000000000..1812149da --- /dev/null +++ b/sdks/java/docs/VariableUpdateAssignmentInput.md @@ -0,0 +1,31 @@ + + +# VariableUpdateAssignmentInput + +Input for variable value update in batch operations + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**variableIdentifier** | **String** | ID or Name of the variable | | +|**variableValues** | **List<String>** | Values of the variable | | +|**operation** | [**OperationEnum**](#OperationEnum) | Operation to perform | | + + + +## Enum: OperationEnum + +| Name | Value | +|---- | -----| +| ADD | "ADD" | +| REMOVE | "REMOVE" | +| REPLACE | "REPLACE" | +| RESET | "RESET" | + + +## Implemented Interfaces + +* Serializable + + diff --git a/sdks/java/docs/VariableUpdateScopeInput.md b/sdks/java/docs/VariableUpdateScopeInput.md new file mode 100644 index 000000000..79ebe6efd --- /dev/null +++ b/sdks/java/docs/VariableUpdateScopeInput.md @@ -0,0 +1,31 @@ + + +# VariableUpdateScopeInput + +Input for defining the scope of variable value assignments in batch update operations + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**orgIdentifier** | **String** | The unique name of the org | | +|**principalType** | [**PrincipalTypeEnum**](#PrincipalTypeEnum) | Type of principal to which the variable value applies. Use USER to assign values to a specific user, or USER_GROUP to assign values to a group. | [optional] | +|**principalIdentifier** | **String** | Unique ID or name of the principal | [optional] | +|**modelIdentifier** | **String** | Unique ID or name of the model. Required for FORMULA_VARIABLE type to scope the variable value to a specific worksheet. | [optional] | +|**priority** | **Integer** | The priority level for this scope assignment, used for conflict resolution when multiple values match. Higher priority values (larger numbers) take precedence. | [optional] | + + + +## Enum: PrincipalTypeEnum + +| Name | Value | +|---- | -----| +| USER | "USER" | +| USER_GROUP | "USER_GROUP" | + + +## Implemented Interfaces + +* Serializable + + diff --git a/sdks/java/docs/VariableValue.md b/sdks/java/docs/VariableValue.md new file mode 100644 index 000000000..521e15cc0 --- /dev/null +++ b/sdks/java/docs/VariableValue.md @@ -0,0 +1,32 @@ + + +# VariableValue + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**value** | **String** | The value of the variable | [optional] | +|**valueList** | **List<String>** | The value of the variable if it is a list type | [optional] | +|**orgIdentifier** | **String** | The unique name of the org | | +|**principalType** | [**PrincipalTypeEnum**](#PrincipalTypeEnum) | Type of principal to which this value applies. Use USER to assign the value to a specific user, or USER_GROUP to assign it to a group. | [optional] | +|**principalIdentifier** | **String** | Unique ID or name of the principal | [optional] | +|**modelIdentifier** | **String** | Unique ID of the model Version: 26.3.0.cl or later | [optional] | +|**priority** | **Integer** | The priority assigned to this value. If there are 2 matching values, the one with the higher priority will be picked. | [optional] | + + + +## Enum: PrincipalTypeEnum + +| Name | Value | +|---- | -----| +| USER | "USER" | +| USER_GROUP | "USER_GROUP" | + + +## Implemented Interfaces + +* Serializable + + diff --git a/sdks/java/docs/VariableValues.md b/sdks/java/docs/VariableValues.md new file mode 100644 index 000000000..77cf8e2c8 --- /dev/null +++ b/sdks/java/docs/VariableValues.md @@ -0,0 +1,19 @@ + + +# VariableValues + +Variable values. + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**name** | **String** | The name of the existing formula variable. | | +|**values** | **List<Object>** | The values to filter on. | | + + +## Implemented Interfaces + +* Serializable + + diff --git a/sdks/java/docs/VersionControlApi.md b/sdks/java/docs/VersionControlApi.md new file mode 100644 index 000000000..fe8807a30 --- /dev/null +++ b/sdks/java/docs/VersionControlApi.md @@ -0,0 +1,342 @@ +# VersionControlApi + +All URIs are relative to *CLUSTER_URL* + +| Method | HTTP request | +|------------- | ------------- | +| [**commitBranch**](VersionControlApi.md#commitBranch) | **POST** /api/rest/2.0/vcs/git/branches/commit | +| [**createConfig**](VersionControlApi.md#createConfig) | **POST** /api/rest/2.0/vcs/git/config/create | +| [**deleteConfig**](VersionControlApi.md#deleteConfig) | **POST** /api/rest/2.0/vcs/git/config/delete | +| [**deployCommit**](VersionControlApi.md#deployCommit) | **POST** /api/rest/2.0/vcs/git/commits/deploy | +| [**revertCommit**](VersionControlApi.md#revertCommit) | **POST** /api/rest/2.0/vcs/git/commits/{commit_id}/revert | +| [**searchCommits**](VersionControlApi.md#searchCommits) | **POST** /api/rest/2.0/vcs/git/commits/search | +| [**searchConfig**](VersionControlApi.md#searchConfig) | **POST** /api/rest/2.0/vcs/git/config/search | +| [**updateConfig**](VersionControlApi.md#updateConfig) | **POST** /api/rest/2.0/vcs/git/config/update | +| [**validateMerge**](VersionControlApi.md#validateMerge) | **POST** /api/rest/2.0/vcs/git/branches/validate | + + + +# **commitBranch** +> CommitResponse commitBranch(commitBranchRequest) + + + + Version: 9.2.0.cl or later Commits TML files of metadata objects to the Git branch configured on your instance. Requires at least edit access to objects used in the commit operation. Before using this endpoint to push your commits: * Enable Git integration on your instance. * Make sure the Git repository and branch details are configured on your instance. For more information, see [Git integration documentation](https://developers.thoughtspot.com/docs/git-integration). + +### Parameters + +| Name | Type | +|------------- | ------------- | +| **commitBranchRequest** | [**CommitBranchRequest**](CommitBranchRequest.md) + +### Return type + +[**CommitResponse**](CommitResponse.md) + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Successfully committed the metadata objects | - | +| **400** | Invalid request. | - | +| **401** | Unauthorized access. | - | +| **403** | Forbidden access. | - | +| **500** | Unexpected error | - | + + +# **createConfig** +> RepoConfigObject createConfig(createConfigRequest) + + + + Version: 9.2.0.cl or later Allows you to connect a ThoughtSpot instance to a Git repository. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance on your instance, the `CAN_SETUP_VERSION_CONTROL` (**Can set up version control**) privilege. You can use this API endpoint to connect your ThoughtSpot development and production environments to the development and production branches of a Git repository. Before using this endpoint to connect your ThoughtSpot instance to a Git repository, check the following prerequisites: * You have a Git repository. If you are using GitHub, make sure you have a valid account and an access token to connect ThoughtSpot to GitHub. For information about generating a token, see [GitHub Documentation](https://docs.github.com/en/authentication/keeping-your-account-and-data-secure/managing-your-personal-access-tokens). * Your access token has `repo` scope that grants full access to public and private repositories. * Your Git repository has a branch that can be configured as a default branch in ThoughtSpot. For more information, see [Git integration documentation](https://developers.thoughtspot.com/docs/?pageid=git-integration). **Note**: ThoughtSpot supports only GitHub / itHub Enterprise for CI/CD. + +### Parameters + +| Name | Type | +|------------- | ------------- | +| **createConfigRequest** | [**CreateConfigRequest**](CreateConfigRequest.md) + +### Return type + +[**RepoConfigObject**](RepoConfigObject.md) + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Successfully configured local repository | - | +| **400** | Invalid request. | - | +| **401** | Unauthorized access. | - | +| **403** | Forbidden access. | - | +| **500** | Unexpected error | - | + + +# **deleteConfig** +> deleteConfig(deleteConfigRequest) + + + + Version: 9.2.0.cl or later Deletes Git repository configuration from your ThoughtSpot instance. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance on your instance, the `CAN_SETUP_VERSION_CONTROL` (**Can set up version control**) privilege. + +### Parameters + +| Name | Type | +|------------- | ------------- | +| **deleteConfigRequest** | [**DeleteConfigRequest**](DeleteConfigRequest.md) + +### Return type + +null (empty response body) + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **204** | Successfully deleted local repository configuration | - | +| **400** | Invalid request. | - | +| **401** | Unauthorized access. | - | +| **403** | Forbidden access. | - | +| **500** | Unexpected error | - | + + +# **deployCommit** +> List<DeployResponse> deployCommit(deployCommitRequest) + + + + Version: 9.2.0.cl or later Allows you to deploy a commit and publish TML content to your ThoughtSpot instance. Requires at least edit access to the objects used in the deploy operation. The API deploys the head of the branch unless a `commit_id` is specified in the API request. If the branch name is not defined in the request, the default branch is considered for deploying commits. For more information, see [Git integration documentation](https://developers.thoughtspot.com/docs/git-integration). + +### Parameters + +| Name | Type | +|------------- | ------------- | +| **deployCommitRequest** | [**DeployCommitRequest**](DeployCommitRequest.md) + +### Return type + +[**List<DeployResponse>**](DeployResponse.md) + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Successfully deployed the changes | - | +| **400** | Invalid request. | - | +| **401** | Unauthorized access. | - | +| **403** | Forbidden access. | - | +| **500** | Unexpected error | - | + + +# **revertCommit** +> RevertResponse revertCommit(commitId, revertCommitRequest) + + + + Version: 9.2.0.cl or later Reverts TML objects to a previous commit specified in the API request. Requires at least edit access to objects. In the API request, specify the `commit_id`. If the branch name is not specified in the request, the API will consider the default branch configured on your instance. By default, the API reverts all objects. If the revert operation fails for one of the objects provided in the commit, the API returns an error and does not revert any object. For more information, see [Git integration documentation](https://developers.thoughtspot.com/docs/git-integration). + +### Parameters + +| Name | Type | +|------------- | ------------- | +| **commitId** | **String** +| **revertCommitRequest** | [**RevertCommitRequest**](RevertCommitRequest.md) + +### Return type + +[**RevertResponse**](RevertResponse.md) + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Reverted the object to the commit point specified | - | +| **400** | Invalid request. | - | +| **401** | Unauthorized access. | - | +| **403** | Forbidden access. | - | +| **500** | Unexpected error | - | + + +# **searchCommits** +> List<CommitHistoryResponse> searchCommits(searchCommitsRequest) + + + + Version: 9.2.0.cl or later Gets a list of commits for a given metadata object. Requires `DATAMANAGEMENT` (**Can manage data**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance on your instance, the `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` (**Can manage data models**) privilege and edit access to the metadata objects. + +### Parameters + +| Name | Type | +|------------- | ------------- | +| **searchCommitsRequest** | [**SearchCommitsRequest**](SearchCommitsRequest.md) + +### Return type + +[**List<CommitHistoryResponse>**](CommitHistoryResponse.md) + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Commit history of the metadata object | - | +| **400** | Invalid request. | - | +| **401** | Unauthorized access. | - | +| **403** | Forbidden access. | - | +| **500** | Unexpected error | - | + + +# **searchConfig** +> List<RepoConfigObject> searchConfig(searchConfigRequest) + + + + Version: 9.2.0.cl or later Gets Git repository connections configured on the ThoughtSpot instance. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance on your instance, the `CAN_SETUP_VERSION_CONTROL` (**Can set up version control**) privilege. + +### Parameters + +| Name | Type | +|------------- | ------------- | +| **searchConfigRequest** | [**SearchConfigRequest**](SearchConfigRequest.md) + +### Return type + +[**List<RepoConfigObject>**](RepoConfigObject.md) + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Details of local repository configuration | - | +| **400** | Invalid request. | - | +| **401** | Unauthorized access. | - | +| **403** | Forbidden access. | - | +| **500** | Unexpected error | - | + + +# **updateConfig** +> RepoConfigObject updateConfig(updateConfigRequest) + + + + Version: 9.2.0.cl or later Updates Git repository configuration settings. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance on your instance, the `CAN_SETUP_VERSION_CONTROL` (**Can set up version control**) privilege. + +### Parameters + +| Name | Type | +|------------- | ------------- | +| **updateConfigRequest** | [**UpdateConfigRequest**](UpdateConfigRequest.md) + +### Return type + +[**RepoConfigObject**](RepoConfigObject.md) + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Successfully updated local repository configuration | - | +| **400** | Invalid request. | - | +| **401** | Unauthorized access. | - | +| **403** | Forbidden access. | - | +| **500** | Unexpected error | - | + + +# **validateMerge** +> List<DeployResponse> validateMerge(validateMergeRequest) + + + + Version: 9.2.0.cl or later Validates the content of your source branch against the objects in your destination environment. Before merging content from your source branch to the destination branch, run this API operation from your destination environment and ensure that the changes from the source branch function in the destination environment. Requires `DATAMANAGEMENT` (**Can manage data**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance on your instance, the `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` (**Can manage data models**) privilege and edit access to the metadata objects. + +### Parameters + +| Name | Type | +|------------- | ------------- | +| **validateMergeRequest** | [**ValidateMergeRequest**](ValidateMergeRequest.md) + +### Return type + +[**List<DeployResponse>**](DeployResponse.md) + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | validation done successfully | - | +| **400** | Invalid request. | - | +| **401** | Unauthorized access. | - | +| **403** | Forbidden access. | - | +| **500** | Unexpected error | - | + diff --git a/sdks/java/docs/WebhookAuthApiKey.md b/sdks/java/docs/WebhookAuthApiKey.md new file mode 100644 index 000000000..759cb58b4 --- /dev/null +++ b/sdks/java/docs/WebhookAuthApiKey.md @@ -0,0 +1,18 @@ + + +# WebhookAuthApiKey + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**key** | **String** | The header or query parameter name for the API key. | | +|**value** | **String** | The API key value. | | + + +## Implemented Interfaces + +* Serializable + + diff --git a/sdks/java/docs/WebhookAuthApiKeyInput.md b/sdks/java/docs/WebhookAuthApiKeyInput.md new file mode 100644 index 000000000..5593646ee --- /dev/null +++ b/sdks/java/docs/WebhookAuthApiKeyInput.md @@ -0,0 +1,18 @@ + + +# WebhookAuthApiKeyInput + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**key** | **String** | The header or query parameter name for the API key. | | +|**value** | **String** | The API key value. | | + + +## Implemented Interfaces + +* Serializable + + diff --git a/sdks/java/docs/WebhookAuthBasicAuth.md b/sdks/java/docs/WebhookAuthBasicAuth.md new file mode 100644 index 000000000..7b608a5f9 --- /dev/null +++ b/sdks/java/docs/WebhookAuthBasicAuth.md @@ -0,0 +1,18 @@ + + +# WebhookAuthBasicAuth + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**username** | **String** | Username for basic authentication. | | +|**password** | **String** | Password for basic authentication. | | + + +## Implemented Interfaces + +* Serializable + + diff --git a/sdks/java/docs/WebhookAuthBasicAuthInput.md b/sdks/java/docs/WebhookAuthBasicAuthInput.md new file mode 100644 index 000000000..8189a3b42 --- /dev/null +++ b/sdks/java/docs/WebhookAuthBasicAuthInput.md @@ -0,0 +1,18 @@ + + +# WebhookAuthBasicAuthInput + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**username** | **String** | Username for basic authentication. | | +|**password** | **String** | Password for basic authentication. | | + + +## Implemented Interfaces + +* Serializable + + diff --git a/sdks/java/docs/WebhookAuthOAuth2.md b/sdks/java/docs/WebhookAuthOAuth2.md new file mode 100644 index 000000000..404cc9e23 --- /dev/null +++ b/sdks/java/docs/WebhookAuthOAuth2.md @@ -0,0 +1,19 @@ + + +# WebhookAuthOAuth2 + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**authorizationUrl** | **String** | OAuth2 authorization server URL. | | +|**clientId** | **String** | OAuth2 client identifier. | | +|**clientSecret** | **String** | OAuth2 client secret key. | | + + +## Implemented Interfaces + +* Serializable + + diff --git a/sdks/java/docs/WebhookAuthOAuth2Input.md b/sdks/java/docs/WebhookAuthOAuth2Input.md new file mode 100644 index 000000000..e87ed43a0 --- /dev/null +++ b/sdks/java/docs/WebhookAuthOAuth2Input.md @@ -0,0 +1,19 @@ + + +# WebhookAuthOAuth2Input + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**authorizationUrl** | **String** | OAuth2 authorization server URL. | | +|**clientId** | **String** | OAuth2 client identifier. | | +|**clientSecret** | **String** | OAuth2 client secret key. | | + + +## Implemented Interfaces + +* Serializable + + diff --git a/sdks/java/docs/WebhookAuthentication.md b/sdks/java/docs/WebhookAuthentication.md new file mode 100644 index 000000000..7bf197c4d --- /dev/null +++ b/sdks/java/docs/WebhookAuthentication.md @@ -0,0 +1,20 @@ + + +# WebhookAuthentication + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**API_KEY** | [**WebhookAuthApiKey**](WebhookAuthApiKey.md) | | [optional] | +|**BASIC_AUTH** | [**WebhookAuthBasicAuth**](WebhookAuthBasicAuth.md) | | [optional] | +|**BEARER_TOKEN** | **String** | Redacted Bearer token authentication configuration. | [optional] | +|**OAUTH2** | [**WebhookAuthOAuth2**](WebhookAuthOAuth2.md) | | [optional] | + + +## Implemented Interfaces + +* Serializable + + diff --git a/sdks/java/docs/WebhookAuthenticationInput.md b/sdks/java/docs/WebhookAuthenticationInput.md new file mode 100644 index 000000000..f0884b70c --- /dev/null +++ b/sdks/java/docs/WebhookAuthenticationInput.md @@ -0,0 +1,20 @@ + + +# WebhookAuthenticationInput + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**API_KEY** | [**WebhookAuthApiKeyInput**](WebhookAuthApiKeyInput.md) | | [optional] | +|**BASIC_AUTH** | [**WebhookAuthBasicAuthInput**](WebhookAuthBasicAuthInput.md) | | [optional] | +|**BEARER_TOKEN** | **String** | Bearer token authentication configuration. | [optional] | +|**OAUTH2** | [**WebhookAuthOAuth2Input**](WebhookAuthOAuth2Input.md) | | [optional] | + + +## Implemented Interfaces + +* Serializable + + diff --git a/sdks/java/docs/WebhookDeleteFailure.md b/sdks/java/docs/WebhookDeleteFailure.md new file mode 100644 index 000000000..e4bf99daa --- /dev/null +++ b/sdks/java/docs/WebhookDeleteFailure.md @@ -0,0 +1,19 @@ + + +# WebhookDeleteFailure + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**id** | **String** | Unique identifier of the webhook that failed to delete. | | +|**name** | **String** | Name of the webhook that failed to delete. | | +|**error** | **String** | Error message describing why the deletion failed. | | + + +## Implemented Interfaces + +* Serializable + + diff --git a/sdks/java/docs/WebhookDeleteResponse.md b/sdks/java/docs/WebhookDeleteResponse.md new file mode 100644 index 000000000..c1917dab4 --- /dev/null +++ b/sdks/java/docs/WebhookDeleteResponse.md @@ -0,0 +1,20 @@ + + +# WebhookDeleteResponse + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**deletedCount** | **Integer** | Number of webhooks successfully deleted. | | +|**failedCount** | **Integer** | Number of webhooks that failed to delete. | | +|**deletedWebhooks** | [**List<WebhookResponse>**](WebhookResponse.md) | List of successfully deleted webhooks. | | +|**failedWebhooks** | [**List<WebhookDeleteFailure>**](WebhookDeleteFailure.md) | List of webhooks that failed to delete with error details. | | + + +## Implemented Interfaces + +* Serializable + + diff --git a/sdks/java/docs/WebhookKeyValuePair.md b/sdks/java/docs/WebhookKeyValuePair.md new file mode 100644 index 000000000..f1377db02 --- /dev/null +++ b/sdks/java/docs/WebhookKeyValuePair.md @@ -0,0 +1,19 @@ + + +# WebhookKeyValuePair + +Key-value pair for additional webhook headers. + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**key** | **String** | Header name. | | +|**value** | **String** | Header value. | | + + +## Implemented Interfaces + +* Serializable + + diff --git a/sdks/java/docs/WebhookKeyValuePairInput.md b/sdks/java/docs/WebhookKeyValuePairInput.md new file mode 100644 index 000000000..1764c3c37 --- /dev/null +++ b/sdks/java/docs/WebhookKeyValuePairInput.md @@ -0,0 +1,19 @@ + + +# WebhookKeyValuePairInput + +Key-value pair input for additional webhook headers. + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**key** | **String** | Header name. | | +|**value** | **String** | Header value. | | + + +## Implemented Interfaces + +* Serializable + + diff --git a/sdks/java/docs/WebhookOrg.md b/sdks/java/docs/WebhookOrg.md new file mode 100644 index 000000000..d30367ea4 --- /dev/null +++ b/sdks/java/docs/WebhookOrg.md @@ -0,0 +1,18 @@ + + +# WebhookOrg + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**id** | **String** | Unique identifier of the org. | | +|**name** | **String** | Name of the org. | | + + +## Implemented Interfaces + +* Serializable + + diff --git a/sdks/java/docs/WebhookPagination.md b/sdks/java/docs/WebhookPagination.md new file mode 100644 index 000000000..ace33df0b --- /dev/null +++ b/sdks/java/docs/WebhookPagination.md @@ -0,0 +1,20 @@ + + +# WebhookPagination + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**recordOffset** | **Integer** | The starting record number from where the records are included. | | +|**recordSize** | **Integer** | The number of records included in the response. | | +|**totalCount** | **Integer** | Total number of webhook configurations available. | | +|**hasMore** | **Boolean** | Indicates whether more records are available beyond the current response. | | + + +## Implemented Interfaces + +* Serializable + + diff --git a/sdks/java/docs/WebhookResponse.md b/sdks/java/docs/WebhookResponse.md new file mode 100644 index 000000000..82e9cf6d3 --- /dev/null +++ b/sdks/java/docs/WebhookResponse.md @@ -0,0 +1,39 @@ + + +# WebhookResponse + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**id** | **String** | Unique identifier of the webhook configuration. | | +|**name** | **String** | Name of the webhook configuration. | | +|**description** | **String** | Description of the webhook configuration. | [optional] | +|**org** | [**WebhookOrg**](WebhookOrg.md) | | [optional] | +|**url** | **String** | The webhook endpoint URL. | | +|**urlParams** | **Object** | Additional URL parameters as key-value pairs. | [optional] | +|**events** | [**List<EventsEnum>**](#List<EventsEnum>) | List of events this webhook subscribes to. | | +|**authentication** | [**WebhookAuthentication**](WebhookAuthentication.md) | | [optional] | +|**signatureVerification** | [**WebhookSignatureVerification**](WebhookSignatureVerification.md) | | [optional] | +|**additionalHeaders** | [**List<WebhookKeyValuePair>**](WebhookKeyValuePair.md) | Additional headers as an array of key-value pairs. Version: 26.4.0.cl or later | [optional] | +|**creationTimeInMillis** | **Float** | Creation time of the webhook configuration in milliseconds. | | +|**modificationTimeInMillis** | **Float** | Last modified time of the webhook configuration in milliseconds. | | +|**createdBy** | [**WebhookUser**](WebhookUser.md) | | [optional] | +|**lastModifiedBy** | [**WebhookUser**](WebhookUser.md) | | [optional] | +|**storageDestination** | [**StorageDestination**](StorageDestination.md) | | [optional] | + + + +## Enum: List<EventsEnum> + +| Name | Value | +|---- | -----| +| LIVEBOARD_SCHEDULE | "LIVEBOARD_SCHEDULE" | + + +## Implemented Interfaces + +* Serializable + + diff --git a/sdks/java/docs/WebhookSearchResponse.md b/sdks/java/docs/WebhookSearchResponse.md new file mode 100644 index 000000000..567508a64 --- /dev/null +++ b/sdks/java/docs/WebhookSearchResponse.md @@ -0,0 +1,18 @@ + + +# WebhookSearchResponse + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**webhooks** | [**List<WebhookResponse>**](WebhookResponse.md) | List of webhook configurations matching the search criteria. | | +|**pagination** | [**WebhookPagination**](WebhookPagination.md) | | | + + +## Implemented Interfaces + +* Serializable + + diff --git a/sdks/java/docs/WebhookSignatureVerification.md b/sdks/java/docs/WebhookSignatureVerification.md new file mode 100644 index 000000000..ccd41f0bf --- /dev/null +++ b/sdks/java/docs/WebhookSignatureVerification.md @@ -0,0 +1,36 @@ + + +# WebhookSignatureVerification + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**type** | [**TypeEnum**](#TypeEnum) | Signature verification method type. | | +|**header** | **String** | HTTP header where the signature is sent. | | +|**algorithm** | [**AlgorithmEnum**](#AlgorithmEnum) | Hash algorithm used for signature verification. | | +|**secret** | **String** | Shared secret used for HMAC signature generation. | | + + + +## Enum: TypeEnum + +| Name | Value | +|---- | -----| +| HMAC_SHA256 | "HMAC_SHA256" | + + + +## Enum: AlgorithmEnum + +| Name | Value | +|---- | -----| +| SHA256 | "SHA256" | + + +## Implemented Interfaces + +* Serializable + + diff --git a/sdks/java/docs/WebhookSignatureVerificationInput.md b/sdks/java/docs/WebhookSignatureVerificationInput.md new file mode 100644 index 000000000..5e11d7891 --- /dev/null +++ b/sdks/java/docs/WebhookSignatureVerificationInput.md @@ -0,0 +1,36 @@ + + +# WebhookSignatureVerificationInput + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**type** | [**TypeEnum**](#TypeEnum) | Signature verification method type. | | +|**header** | **String** | HTTP header where the signature is sent. | | +|**algorithm** | [**AlgorithmEnum**](#AlgorithmEnum) | Hash algorithm used for signature verification. | | +|**secret** | **String** | Shared secret used for HMAC signature generation. | | + + + +## Enum: TypeEnum + +| Name | Value | +|---- | -----| +| HMAC_SHA256 | "HMAC_SHA256" | + + + +## Enum: AlgorithmEnum + +| Name | Value | +|---- | -----| +| SHA256 | "SHA256" | + + +## Implemented Interfaces + +* Serializable + + diff --git a/sdks/java/docs/WebhookSortOptionsInput.md b/sdks/java/docs/WebhookSortOptionsInput.md new file mode 100644 index 000000000..68ff44bb3 --- /dev/null +++ b/sdks/java/docs/WebhookSortOptionsInput.md @@ -0,0 +1,37 @@ + + +# WebhookSortOptionsInput + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**fieldName** | [**FieldNameEnum**](#FieldNameEnum) | Name of the field to apply the sort on. | [optional] | +|**order** | [**OrderEnum**](#OrderEnum) | Sort order: ASC (Ascending) or DESC (Descending). | [optional] | + + + +## Enum: FieldNameEnum + +| Name | Value | +|---- | -----| +| CREATED | "CREATED" | +| MODIFIED | "MODIFIED" | +| NAME | "NAME" | + + + +## Enum: OrderEnum + +| Name | Value | +|---- | -----| +| ASC | "ASC" | +| DESC | "DESC" | + + +## Implemented Interfaces + +* Serializable + + diff --git a/sdks/java/docs/WebhookUser.md b/sdks/java/docs/WebhookUser.md new file mode 100644 index 000000000..0d0b95beb --- /dev/null +++ b/sdks/java/docs/WebhookUser.md @@ -0,0 +1,18 @@ + + +# WebhookUser + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**id** | **String** | Unique identifier of the user. | | +|**name** | **String** | Name of the user. | | + + +## Implemented Interfaces + +* Serializable + + diff --git a/sdks/java/docs/WebhooksApi.md b/sdks/java/docs/WebhooksApi.md new file mode 100644 index 000000000..9b43fb478 --- /dev/null +++ b/sdks/java/docs/WebhooksApi.md @@ -0,0 +1,157 @@ +# WebhooksApi + +All URIs are relative to *CLUSTER_URL* + +| Method | HTTP request | +|------------- | ------------- | +| [**createWebhookConfiguration**](WebhooksApi.md#createWebhookConfiguration) | **POST** /api/rest/2.0/webhooks/create | +| [**deleteWebhookConfigurations**](WebhooksApi.md#deleteWebhookConfigurations) | **POST** /api/rest/2.0/webhooks/delete | +| [**searchWebhookConfigurations**](WebhooksApi.md#searchWebhookConfigurations) | **POST** /api/rest/2.0/webhooks/search | +| [**updateWebhookConfiguration**](WebhooksApi.md#updateWebhookConfiguration) | **POST** /api/rest/2.0/webhooks/{webhook_identifier}/update | + + + +# **createWebhookConfiguration** +> WebhookResponse createWebhookConfiguration(createWebhookConfigurationRequest) + + + + Version: 10.14.0.cl or later Creates a new webhook configuration to receive notifications for specified events. The webhook will be triggered when the configured events occur in the system. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) or `DEVELOPER` (**Has developer privilege**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, users with `CAN_MANAGE_WEBHOOKS` (**Can manage webhooks**) privilege are also authorized to perform this action. + +### Parameters + +| Name | Type | +|------------- | ------------- | +| **createWebhookConfigurationRequest** | [**CreateWebhookConfigurationRequest**](CreateWebhookConfigurationRequest.md) + +### Return type + +[**WebhookResponse**](WebhookResponse.md) + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Webhook configuration created successfully | - | +| **400** | Invalid request. | - | +| **401** | Unauthorized access. | - | +| **403** | Forbidden access. | - | +| **500** | Unexpected error | - | + + +# **deleteWebhookConfigurations** +> WebhookDeleteResponse deleteWebhookConfigurations(deleteWebhookConfigurationsRequest) + + + + Version: 10.14.0.cl or later Deletes one or more webhook configurations by their unique id or name. Returns status of each deletion operation, including successfully deleted webhooks and any failures with error details. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) or `DEVELOPER` (**Has developer privilege**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, users with `CAN_MANAGE_WEBHOOKS` (**Can manage webhooks**) privilege are also authorized to perform this action. + +### Parameters + +| Name | Type | +|------------- | ------------- | +| **deleteWebhookConfigurationsRequest** | [**DeleteWebhookConfigurationsRequest**](DeleteWebhookConfigurationsRequest.md) + +### Return type + +[**WebhookDeleteResponse**](WebhookDeleteResponse.md) + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Webhook configurations deleted successfully | - | +| **400** | Invalid request. | - | +| **401** | Unauthorized access. | - | +| **403** | Forbidden access. | - | +| **500** | Unexpected error | - | + + +# **searchWebhookConfigurations** +> WebhookSearchResponse searchWebhookConfigurations(searchWebhookConfigurationsRequest) + + + + Version: 10.14.0.cl or later Searches for webhook configurations based on various criteria such as Org, webhook identifier, event type, with support for pagination and sorting. Returns matching webhook configurations with their complete details. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) or `DEVELOPER` (**Has developer privilege**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, users with `CAN_MANAGE_WEBHOOKS` (**Can manage webhooks**) privilege are also authorized to perform this action. + +### Parameters + +| Name | Type | +|------------- | ------------- | +| **searchWebhookConfigurationsRequest** | [**SearchWebhookConfigurationsRequest**](SearchWebhookConfigurationsRequest.md) + +### Return type + +[**WebhookSearchResponse**](WebhookSearchResponse.md) + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Webhook configurations retrieved successfully | - | +| **400** | Invalid request. | - | +| **401** | Unauthorized access. | - | +| **403** | Forbidden access. | - | +| **500** | Unexpected error | - | + + +# **updateWebhookConfiguration** +> updateWebhookConfiguration(webhookIdentifier, updateWebhookConfigurationRequest) + + + + Version: 10.14.0.cl or later Updates an existing webhook configuration by its unique id or name. Only the provided fields will be updated. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) or `DEVELOPER` (**Has developer privilege**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, users with `CAN_MANAGE_WEBHOOKS` (**Can manage webhooks**) privilege are also authorized to perform this action. + +### Parameters + +| Name | Type | +|------------- | ------------- | +| **webhookIdentifier** | **String** +| **updateWebhookConfigurationRequest** | [**UpdateWebhookConfigurationRequest**](UpdateWebhookConfigurationRequest.md) + +### Return type + +null (empty response body) + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **204** | Webhook configuration updated successfully | - | +| **400** | Invalid request. | - | +| **401** | Unauthorized access. | - | +| **403** | Forbidden access. | - | +| **500** | Unexpected error | - | + diff --git a/sdks/java/git_push.sh b/sdks/java/git_push.sh new file mode 100644 index 000000000..f53a75d4f --- /dev/null +++ b/sdks/java/git_push.sh @@ -0,0 +1,57 @@ +#!/bin/sh +# ref: https://help.github.com/articles/adding-an-existing-project-to-github-using-the-command-line/ +# +# Usage example: /bin/sh ./git_push.sh wing328 openapi-petstore-perl "minor update" "gitlab.com" + +git_user_id=$1 +git_repo_id=$2 +release_note=$3 +git_host=$4 + +if [ "$git_host" = "" ]; then + git_host="github.com" + echo "[INFO] No command line input provided. Set \$git_host to $git_host" +fi + +if [ "$git_user_id" = "" ]; then + git_user_id="GIT_USER_ID" + echo "[INFO] No command line input provided. Set \$git_user_id to $git_user_id" +fi + +if [ "$git_repo_id" = "" ]; then + git_repo_id="GIT_REPO_ID" + echo "[INFO] No command line input provided. Set \$git_repo_id to $git_repo_id" +fi + +if [ "$release_note" = "" ]; then + release_note="Minor update" + echo "[INFO] No command line input provided. Set \$release_note to $release_note" +fi + +# Initialize the local directory as a Git repository +git init + +# Adds the files in the local repository and stages them for commit. +git add . + +# Commits the tracked changes and prepares them to be pushed to a remote repository. +git commit -m "$release_note" + +# Sets the new remote +git_remote=$(git remote) +if [ "$git_remote" = "" ]; then # git remote not defined + + if [ "$GIT_TOKEN" = "" ]; then + echo "[INFO] \$GIT_TOKEN (environment variable) is not set. Using the git credential in your environment." + git remote add origin https://${git_host}/${git_user_id}/${git_repo_id}.git + else + git remote add origin https://${git_user_id}:"${GIT_TOKEN}"@${git_host}/${git_user_id}/${git_repo_id}.git + fi + +fi + +git pull origin master + +# Pushes (Forces) the changes in the local repository up to the remote repository +echo "Git pushing to https://${git_host}/${git_user_id}/${git_repo_id}.git" +git push origin master 2>&1 | grep -v 'To https' diff --git a/sdks/java/gradle.properties b/sdks/java/gradle.properties new file mode 100644 index 000000000..9db964178 --- /dev/null +++ b/sdks/java/gradle.properties @@ -0,0 +1,5 @@ +ossrhUsernameFile = publishing_credentials/ossrh_username.txt +ossrhPasswordFile = publishing_credentials/ossrh_password.txt +signing.keyIdFile = publishing_credentials/signing_key_id.txt +signing.passwordFile = publishing_credentials/signing_password.txt +signing.secretKeyFile = publishing_credentials/signing_secret_key.asc diff --git a/sdks/java/gradle/wrapper/gradle-wrapper.jar b/sdks/java/gradle/wrapper/gradle-wrapper.jar new file mode 100644 index 000000000..e6441136f Binary files /dev/null and b/sdks/java/gradle/wrapper/gradle-wrapper.jar differ diff --git a/sdks/java/gradle/wrapper/gradle-wrapper.properties b/sdks/java/gradle/wrapper/gradle-wrapper.properties new file mode 100644 index 000000000..b82aa23a4 --- /dev/null +++ b/sdks/java/gradle/wrapper/gradle-wrapper.properties @@ -0,0 +1,7 @@ +distributionBase=GRADLE_USER_HOME +distributionPath=wrapper/dists +distributionUrl=https\://services.gradle.org/distributions/gradle-8.7-bin.zip +networkTimeout=10000 +validateDistributionUrl=true +zipStoreBase=GRADLE_USER_HOME +zipStorePath=wrapper/dists diff --git a/sdks/java/gradlew b/sdks/java/gradlew new file mode 100644 index 000000000..9d0ce634c --- /dev/null +++ b/sdks/java/gradlew @@ -0,0 +1,249 @@ +#!/bin/sh + +# +# Copyright © 2015-2021 the original authors. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +############################################################################## +# +# Gradle start up script for POSIX generated by Gradle. +# +# Important for running: +# +# (1) You need a POSIX-compliant shell to run this script. If your /bin/sh is +# noncompliant, but you have some other compliant shell such as ksh or +# bash, then to run this script, type that shell name before the whole +# command line, like: +# +# ksh Gradle +# +# Busybox and similar reduced shells will NOT work, because this script +# requires all of these POSIX shell features: +# * functions; +# * expansions «$var», «${var}», «${var:-default}», «${var+SET}», +# «${var#prefix}», «${var%suffix}», and «$( cmd )»; +# * compound commands having a testable exit status, especially «case»; +# * various built-in commands including «command», «set», and «ulimit». +# +# Important for patching: +# +# (2) This script targets any POSIX shell, so it avoids extensions provided +# by Bash, Ksh, etc; in particular arrays are avoided. +# +# The "traditional" practice of packing multiple parameters into a +# space-separated string is a well documented source of bugs and security +# problems, so this is (mostly) avoided, by progressively accumulating +# options in "$@", and eventually passing that to Java. +# +# Where the inherited environment variables (DEFAULT_JVM_OPTS, JAVA_OPTS, +# and GRADLE_OPTS) rely on word-splitting, this is performed explicitly; +# see the in-line comments for details. +# +# There are tweaks for specific operating systems such as AIX, CygWin, +# Darwin, MinGW, and NonStop. +# +# (3) This script is generated from the Groovy template +# https://github.com/gradle/gradle/blob/HEAD/subprojects/plugins/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt +# within the Gradle project. +# +# You can find Gradle at https://github.com/gradle/gradle/. +# +############################################################################## + +# Attempt to set APP_HOME + +# Resolve links: $0 may be a link +app_path=$0 + +# Need this for daisy-chained symlinks. +while +APP_HOME=${app_path%"${app_path##*/}"} # leaves a trailing /; empty if no leading path +[ -h "$app_path" ] +do +ls=$( ls -ld "$app_path" ) +link=${ls#*' -> '} +case $link in #( +/*) app_path=$link ;; #( +*) app_path=$APP_HOME$link ;; +esac +done + +# This is normally unused +# shellcheck disable=SC2034 +APP_BASE_NAME=${0##*/} +# Discard cd standard output in case $CDPATH is set (https://github.com/gradle/gradle/issues/25036) +APP_HOME=$( cd "${APP_HOME:-./}" > /dev/null && pwd -P ) || exit + +# Use the maximum available, or set MAX_FD != -1 to use that value. +MAX_FD=maximum + +warn () { +echo "$*" +} >&2 + +die () { +echo +echo "$*" +echo +exit 1 +} >&2 + +# OS specific support (must be 'true' or 'false'). +cygwin=false +msys=false +darwin=false +nonstop=false +case "$( uname )" in #( +CYGWIN* ) cygwin=true ;; #( +Darwin* ) darwin=true ;; #( +MSYS* | MINGW* ) msys=true ;; #( +NONSTOP* ) nonstop=true ;; +esac + +CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar + + +# Determine the Java command to use to start the JVM. +if [ -n "$JAVA_HOME" ] ; then +if [ -x "$JAVA_HOME/jre/sh/java" ] ; then +# IBM's JDK on AIX uses strange locations for the executables +JAVACMD=$JAVA_HOME/jre/sh/java +else +JAVACMD=$JAVA_HOME/bin/java +fi +if [ ! -x "$JAVACMD" ] ; then +die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME + +Please set the JAVA_HOME variable in your environment to match the +location of your Java installation." +fi +else +JAVACMD=java +if ! command -v java >/dev/null 2>&1 +then +die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. + +Please set the JAVA_HOME variable in your environment to match the +location of your Java installation." +fi +fi + +# Increase the maximum file descriptors if we can. +if ! "$cygwin" && ! "$darwin" && ! "$nonstop" ; then +case $MAX_FD in #( +max*) +# In POSIX sh, ulimit -H is undefined. That's why the result is checked to see if it worked. +# shellcheck disable=SC2039,SC3045 +MAX_FD=$( ulimit -H -n ) || +warn "Could not query maximum file descriptor limit" +esac +case $MAX_FD in #( +'' | soft) :;; #( +*) +# In POSIX sh, ulimit -n is undefined. That's why the result is checked to see if it worked. +# shellcheck disable=SC2039,SC3045 +ulimit -n "$MAX_FD" || +warn "Could not set maximum file descriptor limit to $MAX_FD" +esac +fi + +# Collect all arguments for the java command, stacking in reverse order: +# * args from the command line +# * the main class name +# * -classpath +# * -D...appname settings +# * --module-path (only if needed) +# * DEFAULT_JVM_OPTS, JAVA_OPTS, and GRADLE_OPTS environment variables. + +# For Cygwin or MSYS, switch paths to Windows format before running java +if "$cygwin" || "$msys" ; then +APP_HOME=$( cygpath --path --mixed "$APP_HOME" ) +CLASSPATH=$( cygpath --path --mixed "$CLASSPATH" ) + +JAVACMD=$( cygpath --unix "$JAVACMD" ) + +# Now convert the arguments - kludge to limit ourselves to /bin/sh +for arg do +if +case $arg in #( +-*) false ;; # don't mess with options #( +/?*) t=${arg#/} t=/${t%%/*} # looks like a POSIX filepath +[ -e "$t" ] ;; #( +*) false ;; +esac +then +arg=$( cygpath --path --ignore --mixed "$arg" ) +fi +# Roll the args list around exactly as many times as the number of +# args, so each arg winds up back in the position where it started, but +# possibly modified. +# +# NB: a `for` loop captures its iteration list before it begins, so +# changing the positional parameters here affects neither the number of +# iterations, nor the values presented in `arg`. +shift # remove old arg +set -- "$@" "$arg" # push replacement arg +done +fi + + +# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. +DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"' + +# Collect all arguments for the java command: +# * DEFAULT_JVM_OPTS, JAVA_OPTS, JAVA_OPTS, and optsEnvironmentVar are not allowed to contain shell fragments, +# and any embedded shellness will be escaped. +# * For example: A user cannot expect ${Hostname} to be expanded, as it is an environment variable and will be +# treated as '${Hostname}' itself on the command line. + +set -- \ +"-Dorg.gradle.appname=$APP_BASE_NAME" \ +-classpath "$CLASSPATH" \ +org.gradle.wrapper.GradleWrapperMain \ +"$@" + +# Stop when "xargs" is not available. +if ! command -v xargs >/dev/null 2>&1 +then +die "xargs is not available" +fi + +# Use "xargs" to parse quoted args. +# +# With -n1 it outputs one arg per line, with the quotes and backslashes removed. +# +# In Bash we could simply go: +# +# readarray ARGS < <( xargs -n1 <<<"$var" ) && +# set -- "${ARGS[@]}" "$@" +# +# but POSIX shell has neither arrays nor command substitution, so instead we +# post-process each arg (as a line of input to sed) to backslash-escape any +# character that might be a shell metacharacter, then use eval to reverse +# that process (while maintaining the separation between arguments), and wrap +# the whole thing up as a single "set" statement. +# +# This will of course break if any of these variables contains a newline or +# an unmatched quote. +# + +eval "set -- $( +printf '%s\n' "$DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS" | +xargs -n1 | +sed ' s~[^-[:alnum:]+,./:=@_]~\\&~g; ' | +tr '\n' ' ' +)" '"$@"' + +exec "$JAVACMD" "$@" diff --git a/sdks/java/gradlew.bat b/sdks/java/gradlew.bat new file mode 100644 index 000000000..25da30dbd --- /dev/null +++ b/sdks/java/gradlew.bat @@ -0,0 +1,92 @@ +@rem +@rem Copyright 2015 the original author or authors. +@rem +@rem Licensed under the Apache License, Version 2.0 (the "License"); +@rem you may not use this file except in compliance with the License. +@rem You may obtain a copy of the License at +@rem +@rem https://www.apache.org/licenses/LICENSE-2.0 +@rem +@rem Unless required by applicable law or agreed to in writing, software +@rem distributed under the License is distributed on an "AS IS" BASIS, +@rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +@rem See the License for the specific language governing permissions and +@rem limitations under the License. +@rem + +@if "%DEBUG%"=="" @echo off +@rem ########################################################################## +@rem +@rem Gradle startup script for Windows +@rem +@rem ########################################################################## + +@rem Set local scope for the variables with windows NT shell +if "%OS%"=="Windows_NT" setlocal + +set DIRNAME=%~dp0 +if "%DIRNAME%"=="" set DIRNAME=. +@rem This is normally unused +set APP_BASE_NAME=%~n0 +set APP_HOME=%DIRNAME% + +@rem Resolve any "." and ".." in APP_HOME to make it shorter. +for %%i in ("%APP_HOME%") do set APP_HOME=%%~fi + +@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. +set DEFAULT_JVM_OPTS="-Xmx64m" "-Xms64m" + +@rem Find java.exe +if defined JAVA_HOME goto findJavaFromJavaHome + +set JAVA_EXE=java.exe +%JAVA_EXE% -version >NUL 2>&1 +if %ERRORLEVEL% equ 0 goto execute + +echo. 1>&2 +echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. 1>&2 +echo. 1>&2 +echo Please set the JAVA_HOME variable in your environment to match the 1>&2 +echo location of your Java installation. 1>&2 + +goto fail + +:findJavaFromJavaHome +set JAVA_HOME=%JAVA_HOME:"=% +set JAVA_EXE=%JAVA_HOME%/bin/java.exe + +if exist "%JAVA_EXE%" goto execute + +echo. 1>&2 +echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% 1>&2 +echo. 1>&2 +echo Please set the JAVA_HOME variable in your environment to match the 1>&2 +echo location of your Java installation. 1>&2 + +goto fail + +:execute +@rem Setup the command line + +set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar + + +@rem Execute Gradle +"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %* + +:end +@rem End local scope for the variables with windows NT shell +if %ERRORLEVEL% equ 0 goto mainEnd + +:fail +rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of +rem the _cmd.exe /c_ return code! +set EXIT_CODE=%ERRORLEVEL% +if %EXIT_CODE% equ 0 set EXIT_CODE=1 +if not ""=="%GRADLE_EXIT_CONSOLE%" exit %EXIT_CODE% +exit /b %EXIT_CODE% + +:mainEnd +if "%OS%"=="Windows_NT" endlocal + +:omega diff --git a/sdks/java/pom.xml b/sdks/java/pom.xml new file mode 100644 index 000000000..773695dfe --- /dev/null +++ b/sdks/java/pom.xml @@ -0,0 +1,364 @@ + + 4.0.0 + + com.thoughtspot + rest-api-sdk + 2.25.0 + jar + + rest-api-sdk + ThoughtSpot Java Rest API SDK + https://github.com/thoughtspot/rest-api-sdk/tree/release/sdks/java + + + scm:git:git://github.com/thoughtspot/rest-api-sdk.git + scm:git:ssh://git@github.com/thoughtspot/rest-api-sdk.git + https://github.com/thoughtspot/rest-api-sdk + + + + + ThoughtSpot Development Tools End User License Agreement + https://github.com/thoughtspot/rest-api-sdk/blob/release/LICENSE.md + repo + + + + + + ThoughtSpot + support@thoughtspot.com + ThoughtSpot, Inc. 2025 + https://www.thoughtspot.com/ + + + + + + + org.apache.maven.plugins + maven-compiler-plugin + 3.8.1 + + true + 128m + 512m + + -Xlint:all + -J-Xss4m + + + + + org.apache.maven.plugins + maven-enforcer-plugin + 3.4.1 + + + enforce-maven + + enforce + + + + + 2.2.0 + + + + + + + + org.apache.maven.plugins + maven-surefire-plugin + 2.22.2 + + + + loggerPath + conf/log4j.properties + + + -Xms512m -Xmx1500m + methods + 10 + + + + + org.junit.jupiter + junit-jupiter-engine + ${junit-version} + + + + + maven-dependency-plugin + 3.6.1 + + + package + + copy-dependencies + + + ${project.build.directory}/lib + + + + + + + + org.codehaus.mojo + build-helper-maven-plugin + 3.5.0 + + + add_sources + generate-sources + + add-source + + + + src/main/java + + + + + add_test_sources + generate-test-sources + + add-test-source + + + + src/test/java + + + + + + + org.apache.maven.plugins + maven-javadoc-plugin + 3.6.3 + + + attach-javadocs + + jar + + + + + none + + + http.response.details + a + Http Response Details: + + + + + + org.apache.maven.plugins + maven-source-plugin + 3.3.0 + + + attach-sources + + jar-no-fork + + + + + + + com.diffplug.spotless + spotless-maven-plugin + ${spotless.version} + + + + + + + .gitignore + + + + + + true + 4 + + + + + + + + + + 1.8 + + true + + + + + + + + + + org.sonatype.central + central-publishing-maven-plugin + 0.8.0 + true + + false + ThoughtSpot Java Rest API SDK + central + published + + + + + + + + sign-artifacts + + + + org.apache.maven.plugins + maven-gpg-plugin + 3.2.1 + + + sign-artifacts + verify + + sign + + + ${gpg.keyname} + ${gpg.keyname} + + + + + + + + + + + + + com.google.code.findbugs + jsr305 + 3.0.2 + + + com.squareup.okhttp3 + okhttp + ${okhttp-version} + + + com.squareup.okhttp3 + logging-interceptor + ${okhttp-version} + + + com.google.code.gson + gson + ${gson-version} + + + io.gsonfire + gson-fire + ${gson-fire-version} + + + org.apache.commons + commons-lang3 + ${commons-lang3-version} + + + jakarta.annotation + jakarta.annotation-api + ${jakarta-annotation-version} + provided + + + org.openapitools + jackson-databind-nullable + ${jackson-databind-nullable-version} + + + jakarta.ws.rs + jakarta.ws.rs-api + ${jakarta.ws.rs-api-version} + + + + org.junit.jupiter + junit-jupiter-engine + ${junit-version} + test + + + org.junit.platform + junit-platform-runner + ${junit-platform-runner.version} + test + + + + + 1.8 + ${java.version} + ${java.version} + 1.9.0 + 4.12.0 + 2.10.1 + 3.17.0 + 0.2.6 + 1.3.5 + 2.0.2 + 5.10.3 + 1.10.0 + 2.1.6 + 1.1.1 + UTF-8 + 2.43.0 + + diff --git a/sdks/java/settings.gradle b/sdks/java/settings.gradle new file mode 100644 index 000000000..51dc962fe --- /dev/null +++ b/sdks/java/settings.gradle @@ -0,0 +1 @@ +rootProject.name = "rest-api-sdk" \ No newline at end of file diff --git a/sdks/java/src/main/AndroidManifest.xml b/sdks/java/src/main/AndroidManifest.xml new file mode 100644 index 000000000..96eed37b5 --- /dev/null +++ b/sdks/java/src/main/AndroidManifest.xml @@ -0,0 +1,3 @@ + + + diff --git a/sdks/java/src/main/java/com/thoughtspot/client/ApiCallback.java b/sdks/java/src/main/java/com/thoughtspot/client/ApiCallback.java new file mode 100644 index 000000000..06d8f5141 --- /dev/null +++ b/sdks/java/src/main/java/com/thoughtspot/client/ApiCallback.java @@ -0,0 +1,51 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client; + +import java.util.List; +import java.util.Map; + +/** + * Callback for asynchronous API call. + * + * @param The return type + */ +public interface ApiCallback { + /** + * This is called when the API call fails. + * + * @param e The exception causing the failure + * @param statusCode Status code of the response if available, otherwise it would be 0 + * @param responseHeaders Headers of the response if available, otherwise it would be null + */ + void onFailure(ApiException e, int statusCode, Map> responseHeaders); + + /** + * This is called when the API call succeeded. + * + * @param result The result deserialized from response + * @param statusCode Status code of the response + * @param responseHeaders Headers of the response + */ + void onSuccess(T result, int statusCode, Map> responseHeaders); + + /** + * This is called when the API upload processing. + * + * @param bytesWritten bytes Written + * @param contentLength content length of request body + * @param done write end + */ + void onUploadProgress(long bytesWritten, long contentLength, boolean done); + + /** + * This is called when the API download processing. + * + * @param bytesRead bytes Read + * @param contentLength content length of the response + * @param done Read end + */ + void onDownloadProgress(long bytesRead, long contentLength, boolean done); +} diff --git a/sdks/java/src/main/java/com/thoughtspot/client/ApiClient.java b/sdks/java/src/main/java/com/thoughtspot/client/ApiClient.java new file mode 100644 index 000000000..bb25f7da4 --- /dev/null +++ b/sdks/java/src/main/java/com/thoughtspot/client/ApiClient.java @@ -0,0 +1,1786 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client; + +import com.thoughtspot.client.auth.ApiKeyAuth; +import com.thoughtspot.client.auth.Authentication; +import com.thoughtspot.client.auth.HttpBasicAuth; +import com.thoughtspot.client.auth.HttpBearerAuth; +import java.io.ByteArrayInputStream; +import java.io.File; +import java.io.IOException; +import java.io.InputStream; +import java.io.UnsupportedEncodingException; +import java.lang.reflect.Type; +import java.net.URI; +import java.net.URLConnection; +import java.net.URLEncoder; +import java.nio.file.Files; +import java.nio.file.Paths; +import java.security.GeneralSecurityException; +import java.security.KeyStore; +import java.security.SecureRandom; +import java.security.cert.Certificate; +import java.security.cert.CertificateException; +import java.security.cert.CertificateFactory; +import java.text.DateFormat; +import java.time.LocalDate; +import java.time.OffsetDateTime; +import java.time.format.DateTimeFormatter; +import java.util.*; +import java.util.Map.Entry; +import java.util.concurrent.TimeUnit; +import java.util.function.Supplier; +import java.util.regex.Matcher; +import java.util.regex.Pattern; +import javax.net.ssl.*; +import okhttp3.*; +import okhttp3.internal.http.HttpMethod; +import okhttp3.internal.tls.OkHostnameVerifier; +import okhttp3.logging.HttpLoggingInterceptor; +import okhttp3.logging.HttpLoggingInterceptor.Level; +import okio.Buffer; +import okio.BufferedSink; +import okio.Okio; + +/** ApiClient class. */ +@javax.annotation.Generated( + value = "org.openapitools.codegen.languages.JavaClientCodegen", + comments = "Generator version: 7.12.0") +public class ApiClient { + + private String basePath = "https://localhost:443"; + protected List servers = + new ArrayList( + Arrays.asList( + new ServerConfiguration( + "{base-url}", + "No description provided", + new HashMap() { + { + put( + "base-url", + new ServerVariable( + "No description provided", + "https://localhost:443", + new HashSet())); + } + }))); + protected Integer serverIndex = 0; + protected Map serverVariables = null; + private boolean debugging = false; + private Map defaultHeaderMap = new HashMap(); + private Map defaultCookieMap = new HashMap(); + private String tempFolderPath = null; + + private Map authentications; + + private DateFormat dateFormat; + private DateFormat datetimeFormat; + private boolean lenientDatetimeFormat; + private int dateLength; + + private boolean verifyingSsl; + private byte[] sslCaCert; + private boolean hostnameVerification; + private KeyManager[] keyManagers; + + private OkHttpClient httpClient; + private JSON json; + + private HttpLoggingInterceptor loggingInterceptor; + + /** Basic constructor for ApiClient */ + public ApiClient() { + this((ApiClientConfiguration) null, (OkHttpClient) null); + } + + /** + * Basic constructor with custom OkHttpClient + * + * @param client a {@link okhttp3.OkHttpClient} object + */ + public ApiClient(OkHttpClient client) { + this((ApiClientConfiguration) null, client); + } + + /** + * Basic constructor with custom ApiClientConfiguration + * + * @param apiClientConfiguration a {@link com.thoughtspot.client.ApiClientConfiguration} object + */ + public ApiClient(ApiClientConfiguration apiClientConfiguration) { + this(apiClientConfiguration, (OkHttpClient) null); + } + + /** + * Basic constructor with custom ApiClientConfiguration and OkHttpClient + * + * @param apiClientConfiguration a {@link com.thoughtspot.client.ApiClientConfiguration} object + * @param client a {@link okhttp3.OkHttpClient} object + */ + public ApiClient(ApiClientConfiguration apiClientConfiguration, OkHttpClient client) { + init(); + + if (client != null) { + httpClient = client; + } else { + initHttpClient(); + } + + // Setup authentications (key: authentication name, value: authentication). + authentications.put("bearerAuth", new HttpBearerAuth("bearer")); + // Prevent the authentications from being modified. + authentications = Collections.unmodifiableMap(authentications); + + applyApiClientConfiguration(apiClientConfiguration); + } + + /** + * Apply the ApiClientConfiguration to the ApiClient + * + * @param apiClientConfiguration a {@link com.thoughtspot.client.ApiClientConfiguration} object + */ + public void applyApiClientConfiguration(ApiClientConfiguration apiClientConfiguration) { + if (apiClientConfiguration != null) { + setBasePath(apiClientConfiguration.getBasePath()); + setBearerToken(apiClientConfiguration.getBearerTokenSupplier()); + apiClientConfiguration.getDefaultHeaderMap().forEach(this::addDefaultHeader); + apiClientConfiguration.getDefaultCookieMap().forEach(this::addDefaultCookie); + setVerifyingSsl(apiClientConfiguration.isVerifyingSsl()); + setSslCaCert(apiClientConfiguration.getSslCaCert()); + setHostnameVerification(apiClientConfiguration.isHostnameVerification()); + setKeyManagers(apiClientConfiguration.getKeyManagers().toArray(new KeyManager[0])); + setTempFolderPath(apiClientConfiguration.getDownloadPath()); + setConnectTimeout(apiClientConfiguration.getConnectTimeoutMillis()); + setReadTimeout(apiClientConfiguration.getReadTimeoutMillis()); + setWriteTimeout(apiClientConfiguration.getWriteTimeoutMillis()); + } + } + + private void initHttpClient() { + initHttpClient(Collections.emptyList()); + } + + private void initHttpClient(List interceptors) { + OkHttpClient.Builder builder = new OkHttpClient.Builder(); + builder.addNetworkInterceptor(getProgressInterceptor()); + for (Interceptor interceptor : interceptors) { + builder.addInterceptor(interceptor); + } + + httpClient = builder.build(); + } + + private void init() { + verifyingSsl = true; + + hostnameVerification = true; + + json = new JSON(); + + // Set default User-Agent. + setUserAgent("ThoughtSpot-Client/java/2.25.0"); + + authentications = new HashMap(); + } + + /** + * Get base path + * + * @return Base path + */ + public String getBasePath() { + return basePath; + } + + /** + * Set base path + * + * @param basePath Base path of the URL (e.g https://localhost:443 + * @return An instance of OkHttpClient + */ + public ApiClient setBasePath(String basePath) { + this.basePath = basePath; + this.serverIndex = null; + return this; + } + + public List getServers() { + return servers; + } + + public ApiClient setServers(List servers) { + this.servers = servers; + return this; + } + + public Integer getServerIndex() { + return serverIndex; + } + + public ApiClient setServerIndex(Integer serverIndex) { + this.serverIndex = serverIndex; + return this; + } + + public Map getServerVariables() { + return serverVariables; + } + + public ApiClient setServerVariables(Map serverVariables) { + this.serverVariables = serverVariables; + return this; + } + + /** + * Get HTTP client + * + * @return An instance of OkHttpClient + */ + public OkHttpClient getHttpClient() { + return httpClient; + } + + /** + * Set HTTP client, which must never be null. + * + * @param newHttpClient An instance of OkHttpClient + * @return Api Client + * @throws java.lang.NullPointerException when newHttpClient is null + */ + public ApiClient setHttpClient(OkHttpClient newHttpClient) { + this.httpClient = Objects.requireNonNull(newHttpClient, "HttpClient must not be null!"); + return this; + } + + /** + * Get JSON + * + * @return JSON object + */ + public JSON getJSON() { + return json; + } + + /** + * Set JSON + * + * @param json JSON object + * @return Api client + */ + public ApiClient setJSON(JSON json) { + this.json = json; + return this; + } + + /** + * True if isVerifyingSsl flag is on + * + * @return True if isVerifySsl flag is on + */ + public boolean isVerifyingSsl() { + return verifyingSsl; + } + + /** + * Configure whether to verify certificate and hostname when making https requests. Default to + * true. NOTE: Do NOT set to false in production code, otherwise you would face multiple types + * of cryptographic attacks. + * + * @param verifyingSsl True to verify TLS/SSL connection + * @return ApiClient + */ + public ApiClient setVerifyingSsl(boolean verifyingSsl) { + this.verifyingSsl = verifyingSsl; + applySslSettings(); + return this; + } + + /** + * Get SSL CA cert. + * + * @return Input stream to the SSL CA cert + */ + public InputStream getSslCaCert() { + return sslCaCert != null ? new ByteArrayInputStream(sslCaCert) : null; + } + + /** + * Configure the CA certificate to be trusted when making https requests. Use null to reset to + * default. + * + * @param sslCaCert input stream for SSL CA cert + * @return ApiClient + */ + public ApiClient setSslCaCert(InputStream sslCaCert) { + if (sslCaCert == null) { + this.sslCaCert = null; + } else { + try { + this.sslCaCert = sslCaCert.readAllBytes(); + } catch (IOException e) { + throw new RuntimeException("Failed to read SSL CA certificate input stream", e); + } + } + applySslSettings(); + return this; + } + + /** + * True if host name verification is enabled + * + * @return True if host name verification is enabled + */ + public boolean isHostnameVerification() { + return hostnameVerification; + } + + /** + * Configure whether to verify hostname when making https requests. Default to true. + * + * @param hostnameVerification True to verify hostname + * @return ApiClient + */ + public ApiClient setHostnameVerification(boolean hostnameVerification) { + this.hostnameVerification = hostnameVerification; + applySslSettings(); + return this; + } + + /** + * Getter for the field keyManagers. + * + * @return an array of {@link javax.net.ssl.KeyManager} objects + */ + public KeyManager[] getKeyManagers() { + return keyManagers; + } + + /** + * Configure client keys to use for authorization in an SSL session. Use null to reset to + * default. + * + * @param managers The KeyManagers to use + * @return ApiClient + */ + public ApiClient setKeyManagers(KeyManager[] managers) { + this.keyManagers = managers; + applySslSettings(); + return this; + } + + /** + * Getter for the field dateFormat. + * + * @return a {@link java.text.DateFormat} object + */ + public DateFormat getDateFormat() { + return dateFormat; + } + + /** + * Setter for the field dateFormat. + * + * @param dateFormat a {@link java.text.DateFormat} object + * @return a {@link com.thoughtspot.client.ApiClient} object + */ + public ApiClient setDateFormat(DateFormat dateFormat) { + JSON.setDateFormat(dateFormat); + return this; + } + + /** + * Set SqlDateFormat. + * + * @param dateFormat a {@link java.text.DateFormat} object + * @return a {@link com.thoughtspot.client.ApiClient} object + */ + public ApiClient setSqlDateFormat(DateFormat dateFormat) { + JSON.setSqlDateFormat(dateFormat); + return this; + } + + /** + * Set OffsetDateTimeFormat. + * + * @param dateFormat a {@link java.time.format.DateTimeFormatter} object + * @return a {@link com.thoughtspot.client.ApiClient} object + */ + public ApiClient setOffsetDateTimeFormat(DateTimeFormatter dateFormat) { + JSON.setOffsetDateTimeFormat(dateFormat); + return this; + } + + /** + * Set LocalDateFormat. + * + * @param dateFormat a {@link java.time.format.DateTimeFormatter} object + * @return a {@link com.thoughtspot.client.ApiClient} object + */ + public ApiClient setLocalDateFormat(DateTimeFormatter dateFormat) { + JSON.setLocalDateFormat(dateFormat); + return this; + } + + /** + * Set LenientOnJson. + * + * @param lenientOnJson a boolean + * @return a {@link com.thoughtspot.client.ApiClient} object + */ + public ApiClient setLenientOnJson(boolean lenientOnJson) { + JSON.setLenientOnJson(lenientOnJson); + return this; + } + + /** + * Get authentications (key: authentication name, value: authentication). + * + * @return Map of authentication objects + */ + public Map getAuthentications() { + return authentications; + } + + /** + * Get authentication for the given name. + * + * @param authName The authentication name + * @return The authentication, null if not found + */ + public Authentication getAuthentication(String authName) { + return authentications.get(authName); + } + + /** + * Helper method to set access token for the first Bearer authentication. + * + * @param bearerToken Bearer token + */ + public void setBearerToken(String bearerToken) { + setBearerToken(() -> bearerToken); + } + + /** + * Helper method to set the supplier of access tokens for Bearer authentication. + * + * @param tokenSupplier The supplier of bearer tokens + */ + public void setBearerToken(Supplier tokenSupplier) { + for (Authentication auth : authentications.values()) { + if (auth instanceof HttpBearerAuth) { + ((HttpBearerAuth) auth).setBearerToken(tokenSupplier); + return; + } + } + throw new RuntimeException("No Bearer authentication configured!"); + } + + /** + * Helper method to set username for the first HTTP basic authentication. + * + * @param username Username + */ + public void setUsername(String username) { + for (Authentication auth : authentications.values()) { + if (auth instanceof HttpBasicAuth) { + ((HttpBasicAuth) auth).setUsername(username); + return; + } + } + throw new RuntimeException("No HTTP basic authentication configured!"); + } + + /** + * Helper method to set password for the first HTTP basic authentication. + * + * @param password Password + */ + public void setPassword(String password) { + for (Authentication auth : authentications.values()) { + if (auth instanceof HttpBasicAuth) { + ((HttpBasicAuth) auth).setPassword(password); + return; + } + } + throw new RuntimeException("No HTTP basic authentication configured!"); + } + + /** + * Helper method to set API key value for the first API key authentication. + * + * @param apiKey API key + */ + public void setApiKey(String apiKey) { + for (Authentication auth : authentications.values()) { + if (auth instanceof ApiKeyAuth) { + ((ApiKeyAuth) auth).setApiKey(apiKey); + return; + } + } + throw new RuntimeException("No API key authentication configured!"); + } + + /** + * Helper method to set API key prefix for the first API key authentication. + * + * @param apiKeyPrefix API key prefix + */ + public void setApiKeyPrefix(String apiKeyPrefix) { + for (Authentication auth : authentications.values()) { + if (auth instanceof ApiKeyAuth) { + ((ApiKeyAuth) auth).setApiKeyPrefix(apiKeyPrefix); + return; + } + } + throw new RuntimeException("No API key authentication configured!"); + } + + /** + * Helper method to set access token for the first OAuth2 authentication. + * + * @param accessToken Access token + */ + public void setAccessToken(String accessToken) { + throw new RuntimeException("No OAuth2 authentication configured!"); + } + + /** + * Helper method to set credentials for AWSV4 Signature + * + * @param accessKey Access Key + * @param secretKey Secret Key + * @param region Region + * @param service Service to access to + */ + public void setAWS4Configuration( + String accessKey, String secretKey, String region, String service) { + throw new RuntimeException("No AWS4 authentication configured!"); + } + + /** + * Helper method to set credentials for AWSV4 Signature + * + * @param accessKey Access Key + * @param secretKey Secret Key + * @param sessionToken Session Token + * @param region Region + * @param service Service to access to + */ + public void setAWS4Configuration( + String accessKey, + String secretKey, + String sessionToken, + String region, + String service) { + throw new RuntimeException("No AWS4 authentication configured!"); + } + + /** + * Set the User-Agent header's value (by adding to the default header map). + * + * @param userAgent HTTP request's user agent + * @return ApiClient + */ + public ApiClient setUserAgent(String userAgent) { + addDefaultHeader("User-Agent", userAgent); + return this; + } + + /** + * Add a default header. + * + * @param key The header's key + * @param value The header's value + * @return ApiClient + */ + public ApiClient addDefaultHeader(String key, String value) { + defaultHeaderMap.put(key, value); + return this; + } + + /** + * Add a default cookie. + * + * @param key The cookie's key + * @param value The cookie's value + * @return ApiClient + */ + public ApiClient addDefaultCookie(String key, String value) { + defaultCookieMap.put(key, value); + return this; + } + + /** + * Check that whether debugging is enabled for this API client. + * + * @return True if debugging is enabled, false otherwise. + */ + public boolean isDebugging() { + return debugging; + } + + /** + * Enable/disable debugging for this API client. + * + * @param debugging To enable (true) or disable (false) debugging + * @return ApiClient + */ + public ApiClient setDebugging(boolean debugging) { + if (debugging != this.debugging) { + if (debugging) { + loggingInterceptor = new HttpLoggingInterceptor(); + loggingInterceptor.setLevel(Level.BODY); + httpClient = httpClient.newBuilder().addInterceptor(loggingInterceptor).build(); + } else { + final OkHttpClient.Builder builder = httpClient.newBuilder(); + builder.interceptors().remove(loggingInterceptor); + httpClient = builder.build(); + loggingInterceptor = null; + } + } + this.debugging = debugging; + return this; + } + + /** + * The path of temporary folder used to store downloaded files from endpoints with file + * response. The default value is null, i.e. using the system's default temporary + * folder. + * + * @see createTempFile + * @return Temporary folder path + */ + public String getTempFolderPath() { + return tempFolderPath; + } + + /** + * Set the temporary folder path (for downloading files) + * + * @param tempFolderPath Temporary folder path + * @return ApiClient + */ + public ApiClient setTempFolderPath(String tempFolderPath) { + this.tempFolderPath = tempFolderPath; + return this; + } + + /** + * Get connection timeout (in milliseconds). + * + * @return Timeout in milliseconds + */ + public int getConnectTimeout() { + return httpClient.connectTimeoutMillis(); + } + + /** + * Sets the connect timeout (in milliseconds). A value of 0 means no timeout, otherwise values + * must be between 1 and {@link java.lang.Integer#MAX_VALUE}. + * + * @param connectionTimeout connection timeout in milliseconds + * @return Api client + */ + public ApiClient setConnectTimeout(int connectionTimeout) { + httpClient = + httpClient + .newBuilder() + .connectTimeout(connectionTimeout, TimeUnit.MILLISECONDS) + .build(); + return this; + } + + /** + * Get read timeout (in milliseconds). + * + * @return Timeout in milliseconds + */ + public int getReadTimeout() { + return httpClient.readTimeoutMillis(); + } + + /** + * Sets the read timeout (in milliseconds). A value of 0 means no timeout, otherwise values must + * be between 1 and {@link java.lang.Integer#MAX_VALUE}. + * + * @param readTimeout read timeout in milliseconds + * @return Api client + */ + public ApiClient setReadTimeout(int readTimeout) { + httpClient = + httpClient.newBuilder().readTimeout(readTimeout, TimeUnit.MILLISECONDS).build(); + return this; + } + + /** + * Get write timeout (in milliseconds). + * + * @return Timeout in milliseconds + */ + public int getWriteTimeout() { + return httpClient.writeTimeoutMillis(); + } + + /** + * Sets the write timeout (in milliseconds). A value of 0 means no timeout, otherwise values + * must be between 1 and {@link java.lang.Integer#MAX_VALUE}. + * + * @param writeTimeout connection timeout in milliseconds + * @return Api client + */ + public ApiClient setWriteTimeout(int writeTimeout) { + httpClient = + httpClient.newBuilder().writeTimeout(writeTimeout, TimeUnit.MILLISECONDS).build(); + return this; + } + + /** + * Format the given parameter object into string. + * + * @param param Parameter + * @return String representation of the parameter + */ + public String parameterToString(Object param) { + if (param == null) { + return ""; + } else if (param instanceof Date + || param instanceof OffsetDateTime + || param instanceof LocalDate) { + // Serialize to json string and remove the " enclosing characters + String jsonStr = JSON.serialize(param); + return jsonStr.substring(1, jsonStr.length() - 1); + } else if (param instanceof Collection) { + StringBuilder b = new StringBuilder(); + for (Object o : (Collection) param) { + if (b.length() > 0) { + b.append(","); + } + b.append(o); + } + return b.toString(); + } else { + return String.valueOf(param); + } + } + + /** + * Formats the specified query parameter to a list containing a single {@code Pair} object. + * + *

Note that {@code value} must not be a collection. + * + * @param name The name of the parameter. + * @param value The value of the parameter. + * @return A list containing a single {@code Pair} object. + */ + public List parameterToPair(String name, Object value) { + List params = new ArrayList(); + + // preconditions + if (name == null || name.isEmpty() || value == null || value instanceof Collection) { + return params; + } + + params.add(new Pair(name, parameterToString(value))); + return params; + } + + /** + * Formats the specified collection query parameters to a list of {@code Pair} objects. + * + *

Note that the values of each of the returned Pair objects are percent-encoded. + * + * @param collectionFormat The collection format of the parameter. + * @param name The name of the parameter. + * @param value The value of the parameter. + * @return A list of {@code Pair} objects. + */ + public List parameterToPairs(String collectionFormat, String name, Collection value) { + List params = new ArrayList(); + + // preconditions + if (name == null || name.isEmpty() || value == null || value.isEmpty()) { + return params; + } + + // create the params based on the collection format + if ("multi".equals(collectionFormat)) { + for (Object item : value) { + params.add(new Pair(name, escapeString(parameterToString(item)))); + } + return params; + } + + // collectionFormat is assumed to be "csv" by default + String delimiter = ","; + + // escape all delimiters except commas, which are URI reserved + // characters + if ("ssv".equals(collectionFormat)) { + delimiter = escapeString(" "); + } else if ("tsv".equals(collectionFormat)) { + delimiter = escapeString("\t"); + } else if ("pipes".equals(collectionFormat)) { + delimiter = escapeString("|"); + } + + StringBuilder sb = new StringBuilder(); + for (Object item : value) { + sb.append(delimiter); + sb.append(escapeString(parameterToString(item))); + } + + params.add(new Pair(name, sb.substring(delimiter.length()))); + + return params; + } + + /** + * Formats the specified free-form query parameters to a list of {@code Pair} objects. + * + * @param value The free-form query parameters. + * @return A list of {@code Pair} objects. + */ + public List freeFormParameterToPairs(Object value) { + List params = new ArrayList<>(); + + // preconditions + if (value == null || !(value instanceof Map)) { + return params; + } + + @SuppressWarnings("unchecked") + final Map valuesMap = (Map) value; + + for (Map.Entry entry : valuesMap.entrySet()) { + params.add(new Pair(entry.getKey(), parameterToString(entry.getValue()))); + } + + return params; + } + + /** + * Formats the specified collection path parameter to a string value. + * + * @param collectionFormat The collection format of the parameter. + * @param value The value of the parameter. + * @return String representation of the parameter + */ + public String collectionPathParameterToString(String collectionFormat, Collection value) { + // create the value based on the collection format + if ("multi".equals(collectionFormat)) { + // not valid for path params + return parameterToString(value); + } + + // collectionFormat is assumed to be "csv" by default + String delimiter = ","; + + if ("ssv".equals(collectionFormat)) { + delimiter = " "; + } else if ("tsv".equals(collectionFormat)) { + delimiter = "\t"; + } else if ("pipes".equals(collectionFormat)) { + delimiter = "|"; + } + + StringBuilder sb = new StringBuilder(); + for (Object item : value) { + sb.append(delimiter); + sb.append(parameterToString(item)); + } + + return sb.substring(delimiter.length()); + } + + /** + * Sanitize filename by removing path. e.g. ../../sun.gif becomes sun.gif + * + * @param filename The filename to be sanitized + * @return The sanitized filename + */ + public String sanitizeFilename(String filename) { + return filename.replaceAll(".*[/\\\\]", ""); + } + + /** + * Check if the given MIME is a JSON MIME. JSON MIME examples: application/json + * application/json; charset=UTF8 APPLICATION/JSON application/vnd.company+json "* / *" is also + * default to JSON + * + * @param mime MIME (Multipurpose Internet Mail Extensions) + * @return True if the given MIME is JSON, false otherwise. + */ + public boolean isJsonMime(String mime) { + String jsonMime = "(?i)^(application/json|[^;/ \t]+/[^;/ \t]+[+]json)[ \t]*(;.*)?$"; + return mime != null && (mime.matches(jsonMime) || mime.equals("*/*")); + } + + /** + * Select the Accept header's value from the given accepts array: if JSON exists in the given + * array, use it; otherwise use all of them (joining into a string) + * + * @param accepts The accepts array to select from + * @return The Accept header to use. If the given array is empty, null will be returned (not to + * set the Accept header explicitly). + */ + public String selectHeaderAccept(String[] accepts) { + if (accepts.length == 0) { + return null; + } + return StringUtil.join(accepts, ","); + } + + /** + * Select the Content-Type header's value from the given array: if JSON exists in the given + * array, use it; otherwise use the first one of the array. + * + * @param contentTypes The Content-Type array to select from + * @return The Content-Type header to use. If the given array is empty, returns null. If it + * matches "any", JSON will be used. + */ + public String selectHeaderContentType(String[] contentTypes) { + if (contentTypes.length == 0) { + return null; + } + + if (contentTypes[0].equals("*/*")) { + return "application/json"; + } + + for (String contentType : contentTypes) { + if (isJsonMime(contentType)) { + return contentType; + } + } + + return contentTypes[0]; + } + + /** + * Escape the given string to be used as URL query value. + * + * @param str String to be escaped + * @return Escaped string + */ + public String escapeString(String str) { + try { + return URLEncoder.encode(str, "utf8").replaceAll("\\+", "%20"); + } catch (UnsupportedEncodingException e) { + return str; + } + } + + /** + * Deserialize response body to Java object, according to the return type and the Content-Type + * response header. + * + * @param Type + * @param response HTTP response + * @param returnType The type of the Java object + * @return The deserialized Java object + * @throws com.thoughtspot.client.ApiException If fail to deserialize response body, i.e. cannot + * read response body or the Content-Type of the response is not supported. + */ + @SuppressWarnings("unchecked") + public T deserialize(Response response, Type returnType) throws ApiException { + if (response == null || returnType == null) { + return null; + } + + if ("byte[]".equals(returnType.toString())) { + // Handle binary response (byte array). + try { + return (T) response.body().bytes(); + } catch (IOException e) { + throw new ApiException(e); + } + } else if (returnType.equals(File.class)) { + // Handle file downloading. + return (T) downloadFileFromResponse(response); + } + + String respBody; + try { + if (response.body() != null) respBody = response.body().string(); + else respBody = null; + } catch (IOException e) { + throw new ApiException(e); + } + + if (respBody == null || "".equals(respBody)) { + return null; + } + + String contentType = response.headers().get("Content-Type"); + if (contentType == null) { + // ensuring a default content type + contentType = "application/json"; + } + if (isJsonMime(contentType)) { + return JSON.deserialize(respBody, returnType); + } else if (returnType.equals(String.class)) { + // Expecting string, return the raw response body. + return (T) respBody; + } else { + throw new ApiException( + "Content type \"" + contentType + "\" is not supported for type: " + returnType, + response.code(), + response.headers().toMultimap(), + respBody); + } + } + + /** + * Serialize the given Java object into request body according to the object's class and the + * request Content-Type. + * + * @param obj The Java object + * @param contentType The request Content-Type + * @return The serialized request body + * @throws com.thoughtspot.client.ApiException If fail to serialize the given object + */ + public RequestBody serialize(Object obj, String contentType) throws ApiException { + if (obj instanceof byte[]) { + // Binary (byte array) body parameter support. + return RequestBody.create((byte[]) obj, MediaType.parse(contentType)); + } else if (obj instanceof File) { + // File body parameter support. + return RequestBody.create((File) obj, MediaType.parse(contentType)); + } else if ("text/plain".equals(contentType) && obj instanceof String) { + return RequestBody.create((String) obj, MediaType.parse(contentType)); + } else if (isJsonMime(contentType)) { + String content; + if (obj != null) { + content = JSON.serialize(obj); + } else { + content = null; + } + return RequestBody.create(content, MediaType.parse(contentType)); + } else if (obj instanceof String) { + return RequestBody.create((String) obj, MediaType.parse(contentType)); + } else { + throw new ApiException("Content type \"" + contentType + "\" is not supported"); + } + } + + /** + * Download file from the given response. + * + * @param response An instance of the Response object + * @throws com.thoughtspot.client.ApiException If fail to read file content from response and + * write to disk + * @return Downloaded file + */ + public File downloadFileFromResponse(Response response) throws ApiException { + try { + File file = prepareDownloadFile(response); + BufferedSink sink = Okio.buffer(Okio.sink(file)); + sink.writeAll(response.body().source()); + sink.close(); + return file; + } catch (IOException e) { + throw new ApiException(e); + } + } + + /** + * Prepare file for download + * + * @param response An instance of the Response object + * @return Prepared file for the download + * @throws java.io.IOException If fail to prepare file for download + */ + public File prepareDownloadFile(Response response) throws IOException { + String filename = null; + String contentDisposition = response.header("Content-Disposition"); + if (contentDisposition != null && !"".equals(contentDisposition)) { + // Get filename from the Content-Disposition header. + Pattern pattern = Pattern.compile("filename=['\"]?([^'\"\\s]+)['\"]?"); + Matcher matcher = pattern.matcher(contentDisposition); + if (matcher.find()) { + filename = sanitizeFilename(matcher.group(1)); + } + } + + String prefix = null; + String suffix = null; + if (filename == null) { + prefix = "download-"; + suffix = ""; + } else { + int pos = filename.lastIndexOf("."); + if (pos == -1) { + prefix = filename + "-"; + } else { + prefix = filename.substring(0, pos) + "-"; + suffix = filename.substring(pos); + } + // Files.createTempFile requires the prefix to be at least three characters long + if (prefix.length() < 3) prefix = "download-"; + } + + if (tempFolderPath == null) return Files.createTempFile(prefix, suffix).toFile(); + else return Files.createTempFile(Paths.get(tempFolderPath), prefix, suffix).toFile(); + } + + /** + * {@link #execute(Call, Type)} + * + * @param Type + * @param call An instance of the Call object + * @return ApiResponse<T> + * @throws com.thoughtspot.client.ApiException If fail to execute the call + */ + public ApiResponse execute(Call call) throws ApiException { + return execute(call, null); + } + + /** + * Execute HTTP call and deserialize the HTTP response body into the given return type. + * + * @param returnType The return type used to deserialize HTTP response body + * @param The return type corresponding to (same with) returnType + * @param call Call + * @return ApiResponse object containing response status, headers and data, which is a Java + * object deserialized from response body and would be null when returnType is null. + * @throws com.thoughtspot.client.ApiException If fail to execute the call + */ + public ApiResponse execute(Call call, Type returnType) throws ApiException { + try { + Response response = call.execute(); + T data = handleResponse(response, returnType); + return new ApiResponse(response.code(), response.headers().toMultimap(), data); + } catch (IOException e) { + throw new ApiException(e); + } + } + + /** + * {@link #executeAsync(Call, Type, ApiCallback)} + * + * @param Type + * @param call An instance of the Call object + * @param callback ApiCallback<T> + */ + public void executeAsync(Call call, ApiCallback callback) { + executeAsync(call, null, callback); + } + + /** + * Execute HTTP call asynchronously. + * + * @param Type + * @param call The callback to be executed when the API call finishes + * @param returnType Return type + * @param callback ApiCallback + * @see #execute(Call, Type) + */ + @SuppressWarnings("unchecked") + public void executeAsync(Call call, final Type returnType, final ApiCallback callback) { + call.enqueue( + new Callback() { + @Override + public void onFailure(Call call, IOException e) { + callback.onFailure(new ApiException(e), 0, null); + } + + @Override + public void onResponse(Call call, Response response) throws IOException { + T result; + try { + result = (T) handleResponse(response, returnType); + } catch (ApiException e) { + callback.onFailure(e, response.code(), response.headers().toMultimap()); + return; + } catch (Exception e) { + callback.onFailure( + new ApiException(e), + response.code(), + response.headers().toMultimap()); + return; + } + callback.onSuccess( + result, response.code(), response.headers().toMultimap()); + } + }); + } + + /** + * Handle the given response, return the deserialized object when the response is successful. + * + * @param Type + * @param response Response + * @param returnType Return type + * @return Type + * @throws com.thoughtspot.client.ApiException If the response has an unsuccessful status code + * or fail to deserialize the response body + */ + public T handleResponse(Response response, Type returnType) throws ApiException { + if (response.isSuccessful()) { + if (returnType == null || response.code() == 204) { + // returning null if the returnType is not defined, + // or the status code is 204 (No Content) + if (response.body() != null) { + try { + response.body().close(); + } catch (Exception e) { + throw new ApiException( + response.message(), + e, + response.code(), + response.headers().toMultimap()); + } + } + return null; + } else { + return deserialize(response, returnType); + } + } else { + String respBody = null; + if (response.body() != null) { + try { + respBody = response.body().string(); + } catch (IOException e) { + throw new ApiException( + response.message(), + e, + response.code(), + response.headers().toMultimap()); + } + } + throw new ApiException( + response.message(), response.code(), response.headers().toMultimap(), respBody); + } + } + + /** + * Build HTTP call with the given options. + * + * @param baseUrl The base URL + * @param path The sub-path of the HTTP URL + * @param method The request method, one of "GET", "HEAD", "OPTIONS", "POST", "PUT", "PATCH" and + * "DELETE" + * @param queryParams The query parameters + * @param collectionQueryParams The collection query parameters + * @param body The request body object + * @param headerParams The header parameters + * @param cookieParams The cookie parameters + * @param formParams The form parameters + * @param authNames The authentications to apply + * @param callback Callback for upload/download progress + * @return The HTTP call + * @throws com.thoughtspot.client.ApiException If fail to serialize the request body object + */ + public Call buildCall( + String baseUrl, + String path, + String method, + List queryParams, + List collectionQueryParams, + Object body, + Map headerParams, + Map cookieParams, + Map formParams, + String[] authNames, + ApiCallback callback) + throws ApiException { + Request request = + buildRequest( + baseUrl, + path, + method, + queryParams, + collectionQueryParams, + body, + headerParams, + cookieParams, + formParams, + authNames, + callback); + + return httpClient.newCall(request); + } + + /** + * Build an HTTP request with the given options. + * + * @param baseUrl The base URL + * @param path The sub-path of the HTTP URL + * @param method The request method, one of "GET", "HEAD", "OPTIONS", "POST", "PUT", "PATCH" and + * "DELETE" + * @param queryParams The query parameters + * @param collectionQueryParams The collection query parameters + * @param body The request body object + * @param headerParams The header parameters + * @param cookieParams The cookie parameters + * @param formParams The form parameters + * @param authNames The authentications to apply + * @param callback Callback for upload/download progress + * @return The HTTP request + * @throws com.thoughtspot.client.ApiException If fail to serialize the request body object + */ + public Request buildRequest( + String baseUrl, + String path, + String method, + List queryParams, + List collectionQueryParams, + Object body, + Map headerParams, + Map cookieParams, + Map formParams, + String[] authNames, + ApiCallback callback) + throws ApiException { + final String url = buildUrl(baseUrl, path, queryParams, collectionQueryParams); + + // prepare HTTP request body + RequestBody reqBody; + String contentType = headerParams.get("Content-Type"); + String contentTypePure = contentType; + if (contentTypePure != null && contentTypePure.contains(";")) { + contentTypePure = contentType.substring(0, contentType.indexOf(";")); + } + if (!HttpMethod.permitsRequestBody(method)) { + reqBody = null; + } else if ("application/x-www-form-urlencoded".equals(contentTypePure)) { + reqBody = buildRequestBodyFormEncoding(formParams); + } else if ("multipart/form-data".equals(contentTypePure)) { + reqBody = buildRequestBodyMultipart(formParams); + } else if (body == null) { + if ("DELETE".equals(method)) { + // allow calling DELETE without sending a request body + reqBody = null; + } else { + // use an empty request body (for POST, PUT and PATCH) + reqBody = + RequestBody.create( + "", contentType == null ? null : MediaType.parse(contentType)); + } + } else { + reqBody = serialize(body, contentType); + } + + List updatedQueryParams = new ArrayList<>(queryParams); + + // update parameters with authentication settings + updateParamsForAuth( + authNames, + updatedQueryParams, + headerParams, + cookieParams, + requestBodyToString(reqBody), + method, + URI.create(url)); + + final Request.Builder reqBuilder = + new Request.Builder() + .url(buildUrl(baseUrl, path, updatedQueryParams, collectionQueryParams)); + processHeaderParams(headerParams, reqBuilder); + processCookieParams(cookieParams, reqBuilder); + + // Associate callback with request (if not null) so interceptor can + // access it when creating ProgressResponseBody + reqBuilder.tag(callback); + + Request request = null; + + if (callback != null && reqBody != null) { + ProgressRequestBody progressRequestBody = new ProgressRequestBody(reqBody, callback); + request = reqBuilder.method(method, progressRequestBody).build(); + } else { + request = reqBuilder.method(method, reqBody).build(); + } + + return request; + } + + /** + * Build full URL by concatenating base path, the given sub path and query parameters. + * + * @param baseUrl The base URL + * @param path The sub path + * @param queryParams The query parameters + * @param collectionQueryParams The collection query parameters + * @return The full URL + */ + public String buildUrl( + String baseUrl, String path, List queryParams, List collectionQueryParams) { + final StringBuilder url = new StringBuilder(); + if (baseUrl != null) { + url.append(baseUrl).append(path); + } else { + String baseURL; + if (serverIndex != null) { + if (serverIndex < 0 || serverIndex >= servers.size()) { + throw new ArrayIndexOutOfBoundsException( + String.format( + "Invalid index %d when selecting the host settings. Must be" + + " less than %d", + serverIndex, servers.size())); + } + baseURL = servers.get(serverIndex).URL(serverVariables); + } else { + baseURL = basePath; + } + url.append(baseURL).append(path); + } + + if (queryParams != null && !queryParams.isEmpty()) { + // support (constant) query string in `path`, e.g. "/posts?draft=1" + String prefix = path.contains("?") ? "&" : "?"; + for (Pair param : queryParams) { + if (param.getValue() != null) { + if (prefix != null) { + url.append(prefix); + prefix = null; + } else { + url.append("&"); + } + String value = parameterToString(param.getValue()); + url.append(escapeString(param.getName())) + .append("=") + .append(escapeString(value)); + } + } + } + + if (collectionQueryParams != null && !collectionQueryParams.isEmpty()) { + String prefix = url.toString().contains("?") ? "&" : "?"; + for (Pair param : collectionQueryParams) { + if (param.getValue() != null) { + if (prefix != null) { + url.append(prefix); + prefix = null; + } else { + url.append("&"); + } + String value = parameterToString(param.getValue()); + // collection query parameter value already escaped as part of parameterToPairs + url.append(escapeString(param.getName())).append("=").append(value); + } + } + } + + return url.toString(); + } + + /** + * Set header parameters to the request builder, including default headers. + * + * @param headerParams Header parameters in the form of Map + * @param reqBuilder Request.Builder + */ + public void processHeaderParams(Map headerParams, Request.Builder reqBuilder) { + for (Entry param : headerParams.entrySet()) { + reqBuilder.header(param.getKey(), parameterToString(param.getValue())); + } + for (Entry header : defaultHeaderMap.entrySet()) { + if (!headerParams.containsKey(header.getKey())) { + reqBuilder.header(header.getKey(), parameterToString(header.getValue())); + } + } + } + + /** + * Set cookie parameters to the request builder, including default cookies. + * + * @param cookieParams Cookie parameters in the form of Map + * @param reqBuilder Request.Builder + */ + public void processCookieParams(Map cookieParams, Request.Builder reqBuilder) { + for (Entry param : cookieParams.entrySet()) { + reqBuilder.addHeader( + "Cookie", String.format("%s=%s", param.getKey(), param.getValue())); + } + for (Entry param : defaultCookieMap.entrySet()) { + if (!cookieParams.containsKey(param.getKey())) { + reqBuilder.addHeader( + "Cookie", String.format("%s=%s", param.getKey(), param.getValue())); + } + } + } + + /** + * Update query and header parameters based on authentication settings. + * + * @param authNames The authentications to apply + * @param queryParams List of query parameters + * @param headerParams Map of header parameters + * @param cookieParams Map of cookie parameters + * @param payload HTTP request body + * @param method HTTP method + * @param uri URI + * @throws com.thoughtspot.client.ApiException If fails to update the parameters + */ + public void updateParamsForAuth( + String[] authNames, + List queryParams, + Map headerParams, + Map cookieParams, + String payload, + String method, + URI uri) + throws ApiException { + for (String authName : authNames) { + Authentication auth = authentications.get(authName); + if (auth == null) { + throw new RuntimeException("Authentication undefined: " + authName); + } + auth.applyToParams(queryParams, headerParams, cookieParams, payload, method, uri); + } + } + + /** + * Build a form-encoding request body with the given form parameters. + * + * @param formParams Form parameters in the form of Map + * @return RequestBody + */ + public RequestBody buildRequestBodyFormEncoding(Map formParams) { + okhttp3.FormBody.Builder formBuilder = new okhttp3.FormBody.Builder(); + for (Entry param : formParams.entrySet()) { + formBuilder.add(param.getKey(), parameterToString(param.getValue())); + } + return formBuilder.build(); + } + + /** + * Build a multipart (file uploading) request body with the given form parameters, which could + * contain text fields and file fields. + * + * @param formParams Form parameters in the form of Map + * @return RequestBody + */ + public RequestBody buildRequestBodyMultipart(Map formParams) { + MultipartBody.Builder mpBuilder = new MultipartBody.Builder().setType(MultipartBody.FORM); + for (Entry param : formParams.entrySet()) { + if (param.getValue() instanceof File) { + File file = (File) param.getValue(); + addPartToMultiPartBuilder(mpBuilder, param.getKey(), file); + } else if (param.getValue() instanceof List) { + List list = (List) param.getValue(); + for (Object item : list) { + if (item instanceof File) { + addPartToMultiPartBuilder(mpBuilder, param.getKey(), (File) item); + } else { + addPartToMultiPartBuilder(mpBuilder, param.getKey(), param.getValue()); + } + } + } else { + addPartToMultiPartBuilder(mpBuilder, param.getKey(), param.getValue()); + } + } + return mpBuilder.build(); + } + + /** + * Guess Content-Type header from the given file (defaults to "application/octet-stream"). + * + * @param file The given file + * @return The guessed Content-Type + */ + public String guessContentTypeFromFile(File file) { + String contentType = URLConnection.guessContentTypeFromName(file.getName()); + if (contentType == null) { + return "application/octet-stream"; + } else { + return contentType; + } + } + + /** + * Add a Content-Disposition Header for the given key and file to the MultipartBody Builder. + * + * @param mpBuilder MultipartBody.Builder + * @param key The key of the Header element + * @param file The file to add to the Header + */ + private void addPartToMultiPartBuilder(MultipartBody.Builder mpBuilder, String key, File file) { + Headers partHeaders = + Headers.of( + "Content-Disposition", + "form-data; name=\"" + key + "\"; filename=\"" + file.getName() + "\""); + MediaType mediaType = MediaType.parse(guessContentTypeFromFile(file)); + mpBuilder.addPart(partHeaders, RequestBody.create(file, mediaType)); + } + + /** + * Add a Content-Disposition Header for the given key and complex object to the MultipartBody + * Builder. + * + * @param mpBuilder MultipartBody.Builder + * @param key The key of the Header element + * @param obj The complex object to add to the Header + */ + private void addPartToMultiPartBuilder( + MultipartBody.Builder mpBuilder, String key, Object obj) { + RequestBody requestBody; + if (obj instanceof String) { + requestBody = RequestBody.create((String) obj, MediaType.parse("text/plain")); + } else { + String content; + if (obj != null) { + content = JSON.serialize(obj); + } else { + content = null; + } + requestBody = RequestBody.create(content, MediaType.parse("application/json")); + } + + Headers partHeaders = Headers.of("Content-Disposition", "form-data; name=\"" + key + "\""); + mpBuilder.addPart(partHeaders, requestBody); + } + + /** + * Get network interceptor to add it to the httpClient to track download progress for async + * requests. + */ + private Interceptor getProgressInterceptor() { + return new Interceptor() { + @Override + public Response intercept(Interceptor.Chain chain) throws IOException { + final Request request = chain.request(); + final Response originalResponse = chain.proceed(request); + if (request.tag() instanceof ApiCallback) { + final ApiCallback callback = (ApiCallback) request.tag(); + return originalResponse + .newBuilder() + .body(new ProgressResponseBody(originalResponse.body(), callback)) + .build(); + } + return originalResponse; + } + }; + } + + /** + * Apply SSL related settings to httpClient according to the current values of verifyingSsl and + * sslCaCert. + */ + private void applySslSettings() { + try { + TrustManager[] trustManagers; + HostnameVerifier hostnameVerifier; + if (!verifyingSsl) { + trustManagers = + new TrustManager[] { + new X509TrustManager() { + @Override + public void checkClientTrusted( + java.security.cert.X509Certificate[] chain, String authType) + throws CertificateException {} + + @Override + public void checkServerTrusted( + java.security.cert.X509Certificate[] chain, String authType) + throws CertificateException {} + + @Override + public java.security.cert.X509Certificate[] getAcceptedIssuers() { + return new java.security.cert.X509Certificate[] {}; + } + } + }; + hostnameVerifier = getHostnameVerifier(false); + } else { + TrustManagerFactory trustManagerFactory = + TrustManagerFactory.getInstance(TrustManagerFactory.getDefaultAlgorithm()); + + InputStream sslCaCertStream = getSslCaCert(); + if (sslCaCertStream == null) { + trustManagerFactory.init((KeyStore) null); + } else { + char[] password = null; // Any password will work. + CertificateFactory certificateFactory = CertificateFactory.getInstance("X.509"); + Collection certificates = + certificateFactory.generateCertificates(sslCaCertStream); + if (certificates.isEmpty()) { + throw new IllegalArgumentException( + "expected non-empty set of trusted certificates"); + } + KeyStore caKeyStore = newEmptyKeyStore(password); + int index = 0; + for (Certificate certificate : certificates) { + String certificateAlias = "ca" + (index++); + caKeyStore.setCertificateEntry(certificateAlias, certificate); + } + trustManagerFactory.init(caKeyStore); + } + trustManagers = trustManagerFactory.getTrustManagers(); + hostnameVerifier = getHostnameVerifier(hostnameVerification); + } + + SSLContext sslContext = SSLContext.getInstance("TLS"); + sslContext.init(keyManagers, trustManagers, new SecureRandom()); + httpClient = + httpClient + .newBuilder() + .sslSocketFactory( + sslContext.getSocketFactory(), + (X509TrustManager) trustManagers[0]) + .hostnameVerifier(hostnameVerifier) + .build(); + } catch (GeneralSecurityException e) { + throw new RuntimeException(e); + } + } + + private KeyStore newEmptyKeyStore(char[] password) throws GeneralSecurityException { + try { + KeyStore keyStore = KeyStore.getInstance(KeyStore.getDefaultType()); + keyStore.load(null, password); + return keyStore; + } catch (IOException e) { + throw new AssertionError(e); + } + } + + /** + * Returns the appropriate hostname verifier based on verification setting. + * + * @param enableVerification whether to enable hostname verification + * @return OkHostnameVerifier.INSTANCE if verification is enabled, anonymous HostnameVerifier + * that accepts all hostnames if disabled + */ + private static HostnameVerifier getHostnameVerifier(boolean enableVerification) { + if (enableVerification) { + return OkHostnameVerifier.INSTANCE; + } else { + return new HostnameVerifier() { + @Override + public boolean verify(String hostname, SSLSession session) { + return true; + } + }; + } + } + + /** + * Convert the HTTP request body to a string. + * + * @param requestBody The HTTP request object + * @return The string representation of the HTTP request body + * @throws com.thoughtspot.client.ApiException If fail to serialize the request body object into + * a string + */ + private String requestBodyToString(RequestBody requestBody) throws ApiException { + if (requestBody != null) { + try { + final Buffer buffer = new Buffer(); + requestBody.writeTo(buffer); + return buffer.readUtf8(); + } catch (final IOException e) { + throw new ApiException(e); + } + } + + // empty http request body + return ""; + } +} diff --git a/sdks/java/src/main/java/com/thoughtspot/client/ApiClientConfiguration.java b/sdks/java/src/main/java/com/thoughtspot/client/ApiClientConfiguration.java new file mode 100644 index 000000000..fbf382d89 --- /dev/null +++ b/sdks/java/src/main/java/com/thoughtspot/client/ApiClientConfiguration.java @@ -0,0 +1,568 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client; + +import java.io.InputStream; +import java.util.ArrayList; +import java.util.Collections; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.function.Supplier; +import javax.net.ssl.KeyManager; + +/** + * Configuration class for the ThoughtSpot client. This class holds various configuration options + * such as base path, bearer token, default headers, cookies, SSL verification, hostname + * verification, and key managers. + */ +@javax.annotation.Generated( + value = "org.openapitools.codegen.languages.JavaClientCodegen", + comments = "Generator version: 7.12.0") +public class ApiClientConfiguration { + private static final String DEFAULT_BASE_PATH = "https://localhost:443"; + private static final int DEFAULT_CONNECT_TIMEOUT_MILLIS = 60000; // 1 minute + private static final int DEFAULT_READ_WRITE_TIMEOUT_MILLIS = 300000; // 5 minutes + + private final String basePath; + private final Supplier bearerTokenSupplier; + private final Map defaultHeaderMap; + private final Map defaultCookieMap; + private final boolean verifyingSsl; + private final InputStream sslCaCert; + private final boolean hostnameVerification; + private final List keyManagers; + private final String downloadPath; + private final int connectTimeoutMillis; + private final int readTimeoutMillis; + private final int writeTimeoutMillis; + + /** + * Default constructor that initializes the configuration with default values. Sets base path to + * {@link #DEFAULT_BASE_PATH}, connect timeout to {@link #DEFAULT_CONNECT_TIMEOUT_MILLIS}, and + * read/write timeouts to {@link #DEFAULT_READ_WRITE_TIMEOUT_MILLIS}. + */ + public ApiClientConfiguration() { + this( + DEFAULT_BASE_PATH, + () -> (String) null, + Collections.emptyMap(), + Collections.emptyMap(), + true, + null, + true, + Collections.emptyList(), + null, + DEFAULT_CONNECT_TIMEOUT_MILLIS, + DEFAULT_READ_WRITE_TIMEOUT_MILLIS, + DEFAULT_READ_WRITE_TIMEOUT_MILLIS); + } + + /** + * Constructor that initializes the configuration with a specified base path. Sets connect + * timeout to {@link #DEFAULT_CONNECT_TIMEOUT_MILLIS}, and read/write timeouts to {@link + * #DEFAULT_READ_WRITE_TIMEOUT_MILLIS}. + * + * @param basePath The base path for the API. + */ + public ApiClientConfiguration(String basePath) { + this( + basePath, + () -> (String) null, + Collections.emptyMap(), + Collections.emptyMap(), + true, + null, + true, + Collections.emptyList(), + null, + DEFAULT_CONNECT_TIMEOUT_MILLIS, + DEFAULT_READ_WRITE_TIMEOUT_MILLIS, + DEFAULT_READ_WRITE_TIMEOUT_MILLIS); + } + + /** + * Constructor that initializes the configuration with all parameters. + * + * @param basePath The base path for the API. + * @param bearerToken The bearer token for authentication. + * @param defaultHeaderMap Default headers to include in requests. + * @param defaultCookieMap Default cookies to include in requests. + * @param verifyingSsl Whether to verify SSL certificates. + * @param sslCaCert The SSL CA certificate input stream. + * @param hostnameVerification Whether to verify hostname when making https requests. + * @param keyManagers List of key managers for SSL configuration. + * @param downloadPath The path for downloading files. If null, system's default temporary + * folder will be used. + * @param connectTimeoutMillis Connection timeout in milliseconds. Must be between 1 and {@link + * Integer#MAX_VALUE}. + * @param readTimeoutMillis Read timeout in milliseconds. Must be between 1 and {@link + * Integer#MAX_VALUE}. + * @param writeTimeoutMillis Write timeout in milliseconds. Must be between 1 and {@link + * Integer#MAX_VALUE}. + */ + public ApiClientConfiguration( + final String basePath, + final String bearerToken, + final Map defaultHeaderMap, + final Map defaultCookieMap, + final boolean verifyingSsl, + final InputStream sslCaCert, + final boolean hostnameVerification, + final List keyManagers, + final String downloadPath, + final int connectTimeoutMillis, + final int readTimeoutMillis, + final int writeTimeoutMillis) { + this( + basePath, + () -> bearerToken, + defaultHeaderMap, + defaultCookieMap, + verifyingSsl, + sslCaCert, + hostnameVerification, + keyManagers, + downloadPath, + connectTimeoutMillis, + readTimeoutMillis, + writeTimeoutMillis); + } + + /** + * Constructor that initializes the configuration with all parameters. + * + * @param basePath The base path for the API. + * @param bearerTokenSupplier The bearer token supplier for authentication. + * @param defaultHeaderMap Default headers to include in requests. + * @param defaultCookieMap Default cookies to include in requests. + * @param verifyingSsl Whether to verify SSL certificates. + * @param sslCaCert The SSL CA certificate input stream. + * @param hostnameVerification Whether to verify hostname when making https requests. + * @param keyManagers List of key managers for SSL configuration. + * @param downloadPath The path for downloading files. If null, system's default temporary + * folder will be used. + * @param connectTimeoutMillis Connection timeout in milliseconds. Must be between 1 and {@link + * Integer#MAX_VALUE}. + * @param readTimeoutMillis Read timeout in milliseconds. Must be between 1 and {@link + * Integer#MAX_VALUE}. + * @param writeTimeoutMillis Write timeout in milliseconds. Must be between 1 and {@link + * Integer#MAX_VALUE}. + */ + public ApiClientConfiguration( + final String basePath, + final Supplier bearerTokenSupplier, + final Map defaultHeaderMap, + final Map defaultCookieMap, + final boolean verifyingSsl, + final InputStream sslCaCert, + final boolean hostnameVerification, + final List keyManagers, + final String downloadPath, + final int connectTimeoutMillis, + final int readTimeoutMillis, + final int writeTimeoutMillis) { + this.basePath = normalizeBasePath(basePath); + this.bearerTokenSupplier = bearerTokenSupplier; + this.defaultHeaderMap = + defaultHeaderMap != null + ? Collections.unmodifiableMap(new HashMap<>(defaultHeaderMap)) + : Collections.emptyMap(); + this.defaultCookieMap = + defaultCookieMap != null + ? Collections.unmodifiableMap(new HashMap<>(defaultCookieMap)) + : Collections.emptyMap(); + this.verifyingSsl = verifyingSsl; + this.sslCaCert = sslCaCert; + this.hostnameVerification = hostnameVerification; + this.keyManagers = + keyManagers != null + ? Collections.unmodifiableList(new ArrayList<>(keyManagers)) + : Collections.emptyList(); + this.downloadPath = downloadPath; + this.connectTimeoutMillis = connectTimeoutMillis; + this.readTimeoutMillis = readTimeoutMillis; + this.writeTimeoutMillis = writeTimeoutMillis; + } + + /** + * Normalizes the base path by removing any trailing slashes. + * + * @param basePath The base path to normalize + * @return The normalized base path + */ + private static String normalizeBasePath(String basePath) { + if (basePath == null) { + return DEFAULT_BASE_PATH; + } + return basePath.replaceAll("/+$", ""); + } + + /** @return The base path for the API. */ + public String getBasePath() { + return basePath; + } + + /** @return The bearer token for authentication. */ + public String getBearerToken() { + return bearerTokenSupplier.get(); + } + + /** @return The bearer token supplier for authentication. */ + public Supplier getBearerTokenSupplier() { + return bearerTokenSupplier; + } + + /** @return An unmodifiable map of default headers. */ + public Map getDefaultHeaderMap() { + return defaultHeaderMap; + } + + /** @return An unmodifiable map of default cookies. */ + public Map getDefaultCookieMap() { + return defaultCookieMap; + } + + /** @return Whether SSL verification is enabled. */ + public boolean isVerifyingSsl() { + return verifyingSsl; + } + + /** @return The SSL CA certificate input stream. */ + public InputStream getSslCaCert() { + return sslCaCert; + } + + /** @return Whether hostname verification is enabled. */ + public boolean isHostnameVerification() { + return hostnameVerification; + } + + /** @return An unmodifiable list of key managers. */ + public List getKeyManagers() { + return keyManagers; + } + + /** + * @return The download path for files. If null, system's default temporary folder will be used. + */ + public String getDownloadPath() { + return downloadPath; + } + + /** @return The connection timeout in milliseconds. */ + public int getConnectTimeoutMillis() { + return connectTimeoutMillis; + } + + /** @return The read timeout in milliseconds. */ + public int getReadTimeoutMillis() { + return readTimeoutMillis; + } + + /** @return The write timeout in milliseconds. */ + public int getWriteTimeoutMillis() { + return writeTimeoutMillis; + } + + /** @return A string representation of the client configuration. */ + @Override + public String toString() { + return "ApiClientConfiguration{" + + "basePath='" + + basePath + + '\'' + + ", defaultHeaderMap=" + + defaultHeaderMap + + ", defaultCookieMap=" + + defaultCookieMap + + ", verifyingSsl=" + + verifyingSsl + + ", sslCaCert=" + + sslCaCert + + ", hostnameVerification=" + + hostnameVerification + + ", keyManagers=" + + keyManagers + + ", downloadPath='" + + downloadPath + + '\'' + + ", connectTimeoutMillis=" + + connectTimeoutMillis + + ", readTimeoutMillis=" + + readTimeoutMillis + + ", writeTimeoutMillis=" + + writeTimeoutMillis + + '}'; + } + + /** + * Converts the current configuration to a builder for modification. + * + * @return A builder initialized with the current configuration. + */ + public Builder toBuilder() { + return new Builder(this); + } + + /** Builder class for constructing a {@link ApiClientConfiguration} instance. */ + public static class Builder { + private String basePath; + private Supplier bearerTokenSupplier; + private Map defaultHeaderMap; + private Map defaultCookieMap; + private boolean verifyingSsl; + private InputStream sslCaCert; + private boolean hostnameVerification; + private List keyManagers; + private String downloadPath; + private int connectTimeoutMillis; + private int readTimeoutMillis; + private int writeTimeoutMillis; + + /** + * Default constructor that initializes the builder with default values. Sets base path to + * {@link #DEFAULT_BASE_PATH}, connect timeout to {@link #DEFAULT_CONNECT_TIMEOUT_MILLIS}, + * and read/write timeouts to {@link #DEFAULT_READ_WRITE_TIMEOUT_MILLIS}. + */ + public Builder() { + this.basePath = DEFAULT_BASE_PATH; + this.bearerTokenSupplier = () -> null; + this.defaultHeaderMap = new HashMap<>(); + this.defaultCookieMap = new HashMap<>(); + this.verifyingSsl = true; + this.hostnameVerification = true; + this.keyManagers = new ArrayList<>(); + this.downloadPath = null; + this.connectTimeoutMillis = DEFAULT_CONNECT_TIMEOUT_MILLIS; + this.readTimeoutMillis = DEFAULT_READ_WRITE_TIMEOUT_MILLIS; + this.writeTimeoutMillis = DEFAULT_READ_WRITE_TIMEOUT_MILLIS; + } + + /** + * Constructor that initializes the builder with an existing configuration. + * + * @param config The existing {@link ApiClientConfiguration}. + */ + public Builder(ApiClientConfiguration config) { + this.basePath = config.getBasePath(); + this.bearerTokenSupplier = config.getBearerTokenSupplier(); + this.defaultHeaderMap = new HashMap<>(config.getDefaultHeaderMap()); + this.defaultCookieMap = new HashMap<>(config.getDefaultCookieMap()); + this.verifyingSsl = config.isVerifyingSsl(); + this.sslCaCert = config.getSslCaCert(); + this.hostnameVerification = config.isHostnameVerification(); + this.keyManagers = new ArrayList<>(config.getKeyManagers()); + this.downloadPath = config.getDownloadPath(); + this.connectTimeoutMillis = config.getConnectTimeoutMillis(); + this.readTimeoutMillis = config.getReadTimeoutMillis(); + this.writeTimeoutMillis = config.getWriteTimeoutMillis(); + } + + /** + * Sets the base path for the API. + * + * @param basePath The base path. + * @return The builder instance. + */ + public Builder basePath(String basePath) { + this.basePath = basePath; + return this; + } + + /** + * Sets the bearer token for authentication. + * + * @param bearerToken The bearer token. + * @return The builder instance. + */ + public Builder bearerToken(String bearerToken) { + this.bearerTokenSupplier = () -> bearerToken; + return this; + } + + /** + * Sets the bearer token supplier for authentication. + * + * @param bearerTokenSupplier The bearer token supplier. + * @return The builder instance. + */ + public Builder bearerTokenSupplier(Supplier bearerTokenSupplier) { + this.bearerTokenSupplier = bearerTokenSupplier; + return this; + } + + /** + * Adds a default header to the configuration. + * + * @param key The header key. + * @param value The header value. + * @return The builder instance. + */ + public Builder defaultHeader(String key, String value) { + this.defaultHeaderMap.put(key, value); + return this; + } + + /** + * Sets the default headers map. + * + * @param map The headers map. + * @return The builder instance. + */ + public Builder defaultHeaderMap(Map map) { + this.defaultHeaderMap = map != null ? new HashMap<>(map) : new HashMap<>(); + return this; + } + + /** + * Adds a default cookie to the configuration. + * + * @param key The cookie key. + * @param value The cookie value. + * @return The builder instance. + */ + public Builder defaultCookie(String key, String value) { + this.defaultCookieMap.put(key, value); + return this; + } + + /** + * Sets the default cookies map. + * + * @param map The cookies map. + * @return The builder instance. + */ + public Builder defaultCookieMap(Map map) { + this.defaultCookieMap = map != null ? new HashMap<>(map) : new HashMap<>(); + return this; + } + + /** + * Sets whether SSL verification is enabled. + * + * @param verifyingSsl True to enable SSL verification, false otherwise. + * @return The builder instance. + */ + public Builder verifyingSsl(boolean verifyingSsl) { + this.verifyingSsl = verifyingSsl; + return this; + } + + /** + * Sets the SSL CA certificate input stream. + * + * @param sslCaCert The input stream. + * @return The builder instance. + */ + public Builder sslCaCert(InputStream sslCaCert) { + this.sslCaCert = sslCaCert; + return this; + } + + /** + * Sets whether hostname verification is enabled. + * + * @param hostnameVerification True to enable hostname verification, false otherwise. + * @return The builder instance. + */ + public Builder hostnameVerification(boolean hostnameVerification) { + this.hostnameVerification = hostnameVerification; + return this; + } + + /** + * Adds a key manager to the configuration. + * + * @param keyManager The key manager. + * @return The builder instance. + */ + public Builder keyManager(KeyManager keyManager) { + this.keyManagers.add(keyManager); + return this; + } + + /** + * Sets the list of key managers. + * + * @param keyManagers The list of key managers. + * @return The builder instance. + */ + public Builder keyManagers(List keyManagers) { + this.keyManagers = + keyManagers != null ? new ArrayList<>(keyManagers) : new ArrayList<>(); + return this; + } + + /** + * Sets the download path for files. + * + * @param downloadPath The path for downloading files. If null, system's default temporary + * folder will be used. + * @return The builder instance. + */ + public Builder downloadPath(String downloadPath) { + this.downloadPath = downloadPath; + return this; + } + + /** + * Sets the connection timeout. + * + * @param connectTimeoutMillis Connection timeout in milliseconds. Must be between 1 and + * {@link Integer#MAX_VALUE}. + * @return The builder instance. + */ + public Builder connectTimeoutMillis(int connectTimeoutMillis) { + this.connectTimeoutMillis = connectTimeoutMillis; + return this; + } + + /** + * Sets the read timeout. + * + * @param readTimeoutMillis Read timeout in milliseconds. Must be between 1 and {@link + * Integer#MAX_VALUE}. + * @return The builder instance. + */ + public Builder readTimeoutMillis(int readTimeoutMillis) { + this.readTimeoutMillis = readTimeoutMillis; + return this; + } + + /** + * Sets the write timeout. + * + * @param writeTimeoutMillis Write timeout in milliseconds. Must be between 1 and {@link + * Integer#MAX_VALUE}. + * @return The builder instance. + */ + public Builder writeTimeoutMillis(int writeTimeoutMillis) { + this.writeTimeoutMillis = writeTimeoutMillis; + return this; + } + + /** + * Builds a {@link ApiClientConfiguration} instance with the current builder values. + * + * @return A new {@link ApiClientConfiguration} instance. + */ + public ApiClientConfiguration build() { + return new ApiClientConfiguration( + basePath, + bearerTokenSupplier, + defaultHeaderMap, + defaultCookieMap, + verifyingSsl, + sslCaCert, + hostnameVerification, + keyManagers, + downloadPath, + connectTimeoutMillis, + readTimeoutMillis, + writeTimeoutMillis); + } + } +} diff --git a/sdks/java/src/main/java/com/thoughtspot/client/ApiException.java b/sdks/java/src/main/java/com/thoughtspot/client/ApiException.java new file mode 100644 index 000000000..bbc8cccb5 --- /dev/null +++ b/sdks/java/src/main/java/com/thoughtspot/client/ApiException.java @@ -0,0 +1,182 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client; + +import java.util.List; +import java.util.Map; + +/** ApiException class. */ +@SuppressWarnings("serial") +@javax.annotation.Generated( + value = "org.openapitools.codegen.languages.JavaClientCodegen", + comments = "Generator version: 7.12.0") +public class ApiException extends Exception { + private static final long serialVersionUID = 1L; + + private int code = 0; + private Map> responseHeaders = null; + private String responseBody = null; + + /** Constructor for ApiException. */ + public ApiException() {} + + /** + * Constructor for ApiException. + * + * @param throwable a {@link java.lang.Throwable} object + */ + public ApiException(Throwable throwable) { + super(throwable); + } + + /** + * Constructor for ApiException. + * + * @param message the error message + */ + public ApiException(String message) { + super(message); + } + + /** + * Constructor for ApiException. + * + * @param message the error message + * @param throwable a {@link java.lang.Throwable} object + * @param code HTTP status code + * @param responseHeaders a {@link java.util.Map} of HTTP response headers + * @param responseBody the response body + */ + public ApiException( + String message, + Throwable throwable, + int code, + Map> responseHeaders, + String responseBody) { + super(message, throwable); + this.code = code; + this.responseHeaders = responseHeaders; + this.responseBody = responseBody; + } + + /** + * Constructor for ApiException. + * + * @param message the error message + * @param code HTTP status code + * @param responseHeaders a {@link java.util.Map} of HTTP response headers + * @param responseBody the response body + */ + public ApiException( + String message, + int code, + Map> responseHeaders, + String responseBody) { + this(message, (Throwable) null, code, responseHeaders, responseBody); + } + + /** + * Constructor for ApiException. + * + * @param message the error message + * @param throwable a {@link java.lang.Throwable} object + * @param code HTTP status code + * @param responseHeaders a {@link java.util.Map} of HTTP response headers + */ + public ApiException( + String message, + Throwable throwable, + int code, + Map> responseHeaders) { + this(message, throwable, code, responseHeaders, null); + } + + /** + * Constructor for ApiException. + * + * @param code HTTP status code + * @param responseHeaders a {@link java.util.Map} of HTTP response headers + * @param responseBody the response body + */ + public ApiException(int code, Map> responseHeaders, String responseBody) { + this( + "Response Code: " + code + " Response Body: " + responseBody, + (Throwable) null, + code, + responseHeaders, + responseBody); + } + + /** + * Constructor for ApiException. + * + * @param code HTTP status code + * @param message a {@link java.lang.String} object + */ + public ApiException(int code, String message) { + super(message); + this.code = code; + } + + /** + * Constructor for ApiException. + * + * @param code HTTP status code + * @param message the error message + * @param responseHeaders a {@link java.util.Map} of HTTP response headers + * @param responseBody the response body + */ + public ApiException( + int code, + String message, + Map> responseHeaders, + String responseBody) { + this(code, message); + this.responseHeaders = responseHeaders; + this.responseBody = responseBody; + } + + /** + * Get the HTTP status code. + * + * @return HTTP status code + */ + public int getCode() { + return code; + } + + /** + * Get the HTTP response headers. + * + * @return A map of list of string + */ + public Map> getResponseHeaders() { + return responseHeaders; + } + + /** + * Get the HTTP response body. + * + * @return Response body in the form of string + */ + public String getResponseBody() { + return responseBody; + } + + /** + * Get the exception message including HTTP response data. + * + * @return The exception message + */ + public String getMessage() { + return String.format( + "Message: %s%nHTTP response code: %s%nHTTP response body: %s%nHTTP response" + + " headers: %s", + super.getMessage(), + this.getCode(), + this.getResponseBody(), + this.getResponseHeaders()); + } +} diff --git a/sdks/java/src/main/java/com/thoughtspot/client/ApiResponse.java b/sdks/java/src/main/java/com/thoughtspot/client/ApiResponse.java new file mode 100644 index 000000000..5ab3d1a5c --- /dev/null +++ b/sdks/java/src/main/java/com/thoughtspot/client/ApiResponse.java @@ -0,0 +1,65 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client; + +import java.util.List; +import java.util.Map; + +/** API response returned by API call. */ +public class ApiResponse { + private final int statusCode; + private final Map> headers; + private final T data; + + /** + * Constructor for ApiResponse. + * + * @param statusCode The status code of HTTP response + * @param headers The headers of HTTP response + */ + public ApiResponse(int statusCode, Map> headers) { + this(statusCode, headers, null); + } + + /** + * Constructor for ApiResponse. + * + * @param statusCode The status code of HTTP response + * @param headers The headers of HTTP response + * @param data The object deserialized from response bod + */ + public ApiResponse(int statusCode, Map> headers, T data) { + this.statusCode = statusCode; + this.headers = headers; + this.data = data; + } + + /** + * Get the status code. + * + * @return the status code + */ + public int getStatusCode() { + return statusCode; + } + + /** + * Get the headers. + * + * @return a {@link java.util.Map} of headers + */ + public Map> getHeaders() { + return headers; + } + + /** + * Get the data. + * + * @return the data + */ + public T getData() { + return data; + } +} diff --git a/sdks/java/src/main/java/com/thoughtspot/client/Configuration.java b/sdks/java/src/main/java/com/thoughtspot/client/Configuration.java new file mode 100644 index 000000000..ffeb6e025 --- /dev/null +++ b/sdks/java/src/main/java/com/thoughtspot/client/Configuration.java @@ -0,0 +1,34 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client; + +@javax.annotation.Generated( + value = "org.openapitools.codegen.languages.JavaClientCodegen", + comments = "Generator version: 7.12.0") +public class Configuration { + public static final String VERSION = "2.25.0"; + + private static volatile ApiClient defaultApiClient = new ApiClient(); + + /** + * Get the default API client, which would be used when creating API instances without providing + * an API client. + * + * @return Default API client + */ + public static ApiClient getDefaultApiClient() { + return defaultApiClient; + } + + /** + * Set the default API client, which would be used when creating API instances without providing + * an API client. + * + * @param apiClient API client + */ + public static void setDefaultApiClient(ApiClient apiClient) { + defaultApiClient = apiClient; + } +} diff --git a/sdks/java/src/main/java/com/thoughtspot/client/GzipRequestInterceptor.java b/sdks/java/src/main/java/com/thoughtspot/client/GzipRequestInterceptor.java new file mode 100644 index 000000000..3795cdc77 --- /dev/null +++ b/sdks/java/src/main/java/com/thoughtspot/client/GzipRequestInterceptor.java @@ -0,0 +1,79 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client; + +import java.io.IOException; +import okhttp3.*; +import okio.Buffer; +import okio.BufferedSink; +import okio.GzipSink; +import okio.Okio; + +/** + * Encodes request bodies using gzip. + * + *

Taken from https://github.com/square/okhttp/issues/350 + */ +class GzipRequestInterceptor implements Interceptor { + @Override + public Response intercept(Chain chain) throws IOException { + Request originalRequest = chain.request(); + if (originalRequest.body() == null || originalRequest.header("Content-Encoding") != null) { + return chain.proceed(originalRequest); + } + + Request compressedRequest = + originalRequest + .newBuilder() + .header("Content-Encoding", "gzip") + .method( + originalRequest.method(), + forceContentLength(gzip(originalRequest.body()))) + .build(); + return chain.proceed(compressedRequest); + } + + private RequestBody forceContentLength(final RequestBody requestBody) throws IOException { + final Buffer buffer = new Buffer(); + requestBody.writeTo(buffer); + return new RequestBody() { + @Override + public MediaType contentType() { + return requestBody.contentType(); + } + + @Override + public long contentLength() { + return buffer.size(); + } + + @Override + public void writeTo(BufferedSink sink) throws IOException { + sink.write(buffer.snapshot()); + } + }; + } + + private RequestBody gzip(final RequestBody body) { + return new RequestBody() { + @Override + public MediaType contentType() { + return body.contentType(); + } + + @Override + public long contentLength() { + return -1; // We don't know the compressed length in advance! + } + + @Override + public void writeTo(BufferedSink sink) throws IOException { + BufferedSink gzipSink = Okio.buffer(new GzipSink(sink)); + body.writeTo(gzipSink); + gzipSink.close(); + } + }; + } +} diff --git a/sdks/java/src/main/java/com/thoughtspot/client/JSON.java b/sdks/java/src/main/java/com/thoughtspot/client/JSON.java new file mode 100644 index 000000000..7c3e5af1b --- /dev/null +++ b/sdks/java/src/main/java/com/thoughtspot/client/JSON.java @@ -0,0 +1,1404 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonElement; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapter; +import com.google.gson.internal.bind.util.ISO8601Utils; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import io.gsonfire.GsonFireBuilder; +import java.io.IOException; +import java.io.StringReader; +import java.lang.reflect.Type; +import java.text.DateFormat; +import java.text.ParseException; +import java.text.ParsePosition; +import java.time.LocalDate; +import java.time.OffsetDateTime; +import java.time.format.DateTimeFormatter; +import java.util.Date; +import java.util.Map; +import okio.ByteString; + +/* + * A JSON utility class + * + * NOTE: in the future, this class may be converted to static, which may break + * backward-compatibility + */ +public class JSON { + private static Gson gson; + private static boolean isLenientOnJson = false; + private static DateTypeAdapter dateTypeAdapter = new DateTypeAdapter(); + private static SqlDateTypeAdapter sqlDateTypeAdapter = new SqlDateTypeAdapter(); + private static OffsetDateTimeTypeAdapter offsetDateTimeTypeAdapter = + new OffsetDateTimeTypeAdapter(); + private static LocalDateTypeAdapter localDateTypeAdapter = new LocalDateTypeAdapter(); + private static ByteArrayAdapter byteArrayAdapter = new ByteArrayAdapter(); + + @SuppressWarnings("unchecked") + public static GsonBuilder createGson() { + GsonFireBuilder fireBuilder = new GsonFireBuilder(); + GsonBuilder builder = fireBuilder.createGsonBuilder(); + return builder; + } + + private static String getDiscriminatorValue( + JsonElement readElement, String discriminatorField) { + JsonElement element = readElement.getAsJsonObject().get(discriminatorField); + if (null == element) { + throw new IllegalArgumentException( + "missing discriminator field: <" + discriminatorField + ">"); + } + return element.getAsString(); + } + + /** + * Returns the Java class that implements the OpenAPI schema for the specified discriminator + * value. + * + * @param classByDiscriminatorValue The map of discriminator values to Java classes. + * @param discriminatorValue The value of the OpenAPI discriminator in the input data. + * @return The Java class that implements the OpenAPI schema + */ + private static Class getClassByDiscriminator( + Map classByDiscriminatorValue, String discriminatorValue) { + Class clazz = (Class) classByDiscriminatorValue.get(discriminatorValue); + if (null == clazz) { + throw new IllegalArgumentException( + "cannot determine model class of name: <" + discriminatorValue + ">"); + } + return clazz; + } + + static { + GsonBuilder gsonBuilder = createGson(); + gsonBuilder.registerTypeAdapter(Date.class, dateTypeAdapter); + gsonBuilder.registerTypeAdapter(java.sql.Date.class, sqlDateTypeAdapter); + gsonBuilder.registerTypeAdapter(OffsetDateTime.class, offsetDateTimeTypeAdapter); + gsonBuilder.registerTypeAdapter(LocalDate.class, localDateTypeAdapter); + gsonBuilder.registerTypeAdapter(byte[].class, byteArrayAdapter); + gsonBuilder.registerTypeAdapterFactory( + new com.thoughtspot.client.model.AIContext.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory( + new com.thoughtspot.client.model.APIKey.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory( + new com.thoughtspot.client.model.APIKeyInput.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory( + new com.thoughtspot.client.model.AccessToken.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory( + new com.thoughtspot.client.model.ActionConfig.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory( + new com.thoughtspot.client.model.ActionConfigInput.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory( + new com.thoughtspot.client.model.ActionConfigInputCreate + .CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory( + new com.thoughtspot.client.model.ActionDetails.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory( + new com.thoughtspot.client.model.ActionDetailsInput.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory( + new com.thoughtspot.client.model.ActionDetailsInputCreate + .CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory( + new com.thoughtspot.client.model.ActivateUserRequest.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory( + new com.thoughtspot.client.model.AgentConversation.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory( + new com.thoughtspot.client.model.AnswerContent.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory( + new com.thoughtspot.client.model.AnswerDataResponse.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory( + new com.thoughtspot.client.model.AnswerPngOptionsInput.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory( + new com.thoughtspot.client.model.AssignChangeAuthorRequest + .CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory( + new com.thoughtspot.client.model.AssignTagRequest.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory( + new com.thoughtspot.client.model.AssociateMetadataInput.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory( + new com.thoughtspot.client.model.AssociateMetadataInputCreate + .CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory( + new com.thoughtspot.client.model.AuthClusterPreferences.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory( + new com.thoughtspot.client.model.AuthClusterPreferencesInput + .CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory( + new com.thoughtspot.client.model.AuthOrgInfo.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory( + new com.thoughtspot.client.model.AuthOrgPreference.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory( + new com.thoughtspot.client.model.AuthOrgPreferenceInput.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory( + new com.thoughtspot.client.model.AuthSettingsAccessToken + .CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory( + new com.thoughtspot.client.model.Authentication.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory( + new com.thoughtspot.client.model.AuthenticationInput.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory( + new com.thoughtspot.client.model.Author.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory( + new com.thoughtspot.client.model.AuthorMetadataTypeInput + .CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory( + new com.thoughtspot.client.model.AuthorType.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory( + new com.thoughtspot.client.model.AwsS3Config.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory( + new com.thoughtspot.client.model.AwsS3ConfigInput.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory( + new com.thoughtspot.client.model.BasicAuth.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory( + new com.thoughtspot.client.model.BasicAuthInput.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory( + new com.thoughtspot.client.model.CALLBACK.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory( + new com.thoughtspot.client.model.CALLBACKInput.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory( + new com.thoughtspot.client.model.CALLBACKInputMandatory.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory( + new com.thoughtspot.client.model.CalendarResponse.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory( + new com.thoughtspot.client.model.ChangeUserPasswordRequest + .CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory( + new com.thoughtspot.client.model.ChannelHistoryEventInfo + .CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory( + new com.thoughtspot.client.model.ChannelHistoryEventInput + .CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory( + new com.thoughtspot.client.model.ChannelHistoryJob.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory( + new com.thoughtspot.client.model.ChannelValidationAwsS3Info + .CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory( + new com.thoughtspot.client.model.ChannelValidationDetail + .CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory( + new com.thoughtspot.client.model.ClusterNonEmbedAccess.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory( + new com.thoughtspot.client.model.ClusterNonEmbedAccessInput + .CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory( + new com.thoughtspot.client.model.Collection.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory( + new com.thoughtspot.client.model.CollectionDeleteResponse + .CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory( + new com.thoughtspot.client.model.CollectionDeleteTypeIdentifiers + .CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory( + new com.thoughtspot.client.model.CollectionEntityIdentifier + .CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory( + new com.thoughtspot.client.model.CollectionMetadataInput + .CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory( + new com.thoughtspot.client.model.CollectionMetadataItem.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory( + new com.thoughtspot.client.model.CollectionSearchResponse + .CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory( + new com.thoughtspot.client.model.Column.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory( + new com.thoughtspot.client.model.ColumnSecurityRule.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory( + new com.thoughtspot.client.model.ColumnSecurityRuleColumn + .CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory( + new com.thoughtspot.client.model.ColumnSecurityRuleGroup + .CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory( + new com.thoughtspot.client.model.ColumnSecurityRuleGroupOperation + .CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory( + new com.thoughtspot.client.model.ColumnSecurityRuleResponse + .CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory( + new com.thoughtspot.client.model.ColumnSecurityRuleSourceTable + .CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory( + new com.thoughtspot.client.model.ColumnSecurityRuleTableInput + .CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory( + new com.thoughtspot.client.model.ColumnSecurityRuleUpdate + .CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory( + new com.thoughtspot.client.model.CommitBranchRequest.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory( + new com.thoughtspot.client.model.CommitFileType.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory( + new com.thoughtspot.client.model.CommitHistoryResponse.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory( + new com.thoughtspot.client.model.CommitResponse.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory( + new com.thoughtspot.client.model.CommiterType.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory( + new com.thoughtspot.client.model.CommunicationChannelPreferencesResponse + .CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory( + new com.thoughtspot.client.model.CommunicationChannelValidateResponse + .CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory( + new com.thoughtspot.client.model.ConfigureAuthSettingsRequest + .CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory( + new com.thoughtspot.client.model.ConfigureCommunicationChannelPreferencesRequest + .CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory( + new com.thoughtspot.client.model.ConfigureSecuritySettingsRequest + .CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory( + new com.thoughtspot.client.model.ConnectionConfigurationResponse + .CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory( + new com.thoughtspot.client.model.ConnectionConfigurationSearchRequest + .CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory( + new com.thoughtspot.client.model.ConnectionInput.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory( + new com.thoughtspot.client.model.ContextPayloadV2Input.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory( + new com.thoughtspot.client.model.Conversation.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory( + new com.thoughtspot.client.model.ConversationSettingsInput + .CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory( + new com.thoughtspot.client.model.ConvertWorksheetToModelRequest + .CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory( + new com.thoughtspot.client.model.CopyObjectRequest.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory( + new com.thoughtspot.client.model.CreateAgentConversationRequest + .CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory( + new com.thoughtspot.client.model.CreateCalendarRequest.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory( + new com.thoughtspot.client.model.CreateCollectionRequest + .CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory( + new com.thoughtspot.client.model.CreateConfigRequest.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory( + new com.thoughtspot.client.model.CreateConnectionConfigurationRequest + .CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory( + new com.thoughtspot.client.model.CreateConnectionRequest + .CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory( + new com.thoughtspot.client.model.CreateConnectionResponse + .CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory( + new com.thoughtspot.client.model.CreateConversationRequest + .CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory( + new com.thoughtspot.client.model.CreateCustomActionRequest + .CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory( + new com.thoughtspot.client.model.CreateEmailCustomizationRequest + .CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory( + new com.thoughtspot.client.model.CreateEmailCustomizationResponse + .CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory( + new com.thoughtspot.client.model.CreateOrgRequest.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory( + new com.thoughtspot.client.model.CreateRoleRequest.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory( + new com.thoughtspot.client.model.CreateScheduleRequest.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory( + new com.thoughtspot.client.model.CreateTagRequest.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory( + new com.thoughtspot.client.model.CreateUserGroupRequest.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory( + new com.thoughtspot.client.model.CreateUserRequest.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory( + new com.thoughtspot.client.model.CreateVariableRequest.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory( + new com.thoughtspot.client.model.CreateWebhookConfigurationRequest + .CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory( + new com.thoughtspot.client.model.CronExpression.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory( + new com.thoughtspot.client.model.CronExpressionInput.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory( + new com.thoughtspot.client.model.CspSettings.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory( + new com.thoughtspot.client.model.CspSettingsInput.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory( + new com.thoughtspot.client.model.CustomActionMetadataTypeInput + .CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory( + new com.thoughtspot.client.model.DataSource.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory( + new com.thoughtspot.client.model.DataSourceContextInput.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory( + new com.thoughtspot.client.model.DataWarehouseObjectInput + .CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory( + new com.thoughtspot.client.model.DataWarehouseObjects.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory( + new com.thoughtspot.client.model.Database.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory( + new com.thoughtspot.client.model.DbtSearchResponse.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory( + new com.thoughtspot.client.model.DeactivateUserRequest.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory( + new com.thoughtspot.client.model.DefaultActionConfig.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory( + new com.thoughtspot.client.model.DefaultActionConfigInput + .CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory( + new com.thoughtspot.client.model.DefaultActionConfigInputCreate + .CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory( + new com.thoughtspot.client.model.DefaultActionConfigSearchInput + .CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory( + new com.thoughtspot.client.model.DeleteCollectionRequest + .CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory( + new com.thoughtspot.client.model.DeleteConfigRequest.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory( + new com.thoughtspot.client.model.DeleteConnectionConfigurationRequest + .CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory( + new com.thoughtspot.client.model.DeleteConnectionRequest + .CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory( + new com.thoughtspot.client.model.DeleteMetadataRequest.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory( + new com.thoughtspot.client.model.DeleteMetadataTypeInput + .CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory( + new com.thoughtspot.client.model.DeleteOrgEmailCustomizationRequest + .CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory( + new com.thoughtspot.client.model.DeleteVariablesRequest.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory( + new com.thoughtspot.client.model.DeleteWebhookConfigurationsRequest + .CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory( + new com.thoughtspot.client.model.DeployCommitRequest.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory( + new com.thoughtspot.client.model.DeployResponse.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory( + new com.thoughtspot.client.model.EntityHeader.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory( + new com.thoughtspot.client.model.ErrorResponse.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory( + new com.thoughtspot.client.model.EurekaDataSourceSuggestionResponse + .CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory( + new com.thoughtspot.client.model.EurekaDecomposeQueryResponse + .CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory( + new com.thoughtspot.client.model.EurekaGetNLInstructionsResponse + .CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory( + new com.thoughtspot.client.model.EurekaGetRelevantQuestionsResponse + .CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory( + new com.thoughtspot.client.model.EurekaLLMDecomposeQueryResponse + .CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory( + new com.thoughtspot.client.model.EurekaLLMSuggestedQuery + .CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory( + new com.thoughtspot.client.model.EurekaRelevantQuestion.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory( + new com.thoughtspot.client.model.EurekaSetNLInstructionsResponse + .CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory( + new com.thoughtspot.client.model.EventChannelConfig.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory( + new com.thoughtspot.client.model.EventChannelConfigInput + .CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory( + new com.thoughtspot.client.model.ExcludeMetadataListItemInput + .CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory( + new com.thoughtspot.client.model.ExportAnswerReportRequest + .CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory( + new com.thoughtspot.client.model.ExportLiveboardReportRequest + .CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory( + new com.thoughtspot.client.model.ExportMetadataTMLBatchedRequest + .CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory( + new com.thoughtspot.client.model.ExportMetadataTMLRequest + .CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory( + new com.thoughtspot.client.model.ExportMetadataTypeInput + .CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory( + new com.thoughtspot.client.model.ExportOptions.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory( + new com.thoughtspot.client.model.ExternalTableInput.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory( + new com.thoughtspot.client.model.FavoriteMetadataInput.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory( + new com.thoughtspot.client.model.FavoriteMetadataItem.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory( + new com.thoughtspot.client.model.FavoriteObjectOptionsInput + .CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory( + new com.thoughtspot.client.model.FetchAnswerDataRequest.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory( + new com.thoughtspot.client.model.FetchAnswerSqlQueryRequest + .CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory( + new com.thoughtspot.client.model.FetchAsyncImportTaskStatusRequest + .CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory( + new com.thoughtspot.client.model.FetchColumnSecurityRulesRequest + .CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory( + new com.thoughtspot.client.model.FetchConnectionDiffStatusResponse + .CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory( + new com.thoughtspot.client.model.FetchLiveboardDataRequest + .CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory( + new com.thoughtspot.client.model.FetchLiveboardSqlQueryRequest + .CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory( + new com.thoughtspot.client.model.FetchLogsRequest.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory( + new com.thoughtspot.client.model.FetchObjectPrivilegesRequest + .CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory( + new com.thoughtspot.client.model.FetchPermissionsOfPrincipalsRequest + .CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory( + new com.thoughtspot.client.model.FetchPermissionsOnMetadataRequest + .CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory( + new com.thoughtspot.client.model.FilterRules.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory( + new com.thoughtspot.client.model.ForceLogoutUsersRequest + .CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory( + new com.thoughtspot.client.model.Frequency.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory( + new com.thoughtspot.client.model.FrequencyInput.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory( + new com.thoughtspot.client.model.GenerateCSVRequest.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory( + new com.thoughtspot.client.model.GenericInfo.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory( + new com.thoughtspot.client.model.GetAsyncImportStatusResponse + .CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory( + new com.thoughtspot.client.model.GetCustomAccessTokenRequest + .CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory( + new com.thoughtspot.client.model.GetDataSourceSuggestionsRequest + .CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory( + new com.thoughtspot.client.model.GetFullAccessTokenRequest + .CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory( + new com.thoughtspot.client.model.GetNLInstructionsRequest + .CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory( + new com.thoughtspot.client.model.GetObjectAccessTokenRequest + .CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory( + new com.thoughtspot.client.model.GetRelevantQuestionsRequest + .CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory( + new com.thoughtspot.client.model.GetTokenResponse.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory( + new com.thoughtspot.client.model.GroupInfo.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory( + new com.thoughtspot.client.model.GroupObject.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory( + new com.thoughtspot.client.model.GroupsImportListInput.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory( + new com.thoughtspot.client.model.HeaderAttributeInput.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory( + new com.thoughtspot.client.model.HeaderUpdateInput.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory( + new com.thoughtspot.client.model.ImportEPackAsyncTaskStatus + .CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory( + new com.thoughtspot.client.model.ImportMetadataTMLAsyncRequest + .CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory( + new com.thoughtspot.client.model.ImportMetadataTMLRequest + .CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory( + new com.thoughtspot.client.model.ImportUser.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory( + new com.thoughtspot.client.model.ImportUserGroupsRequest + .CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory( + new com.thoughtspot.client.model.ImportUserGroupsResponse + .CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory( + new com.thoughtspot.client.model.ImportUserType.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory( + new com.thoughtspot.client.model.ImportUsersRequest.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory( + new com.thoughtspot.client.model.ImportUsersResponse.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory( + new com.thoughtspot.client.model.InputEurekaNLSRequest.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory( + new com.thoughtspot.client.model.JWTMetadataObject.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory( + new com.thoughtspot.client.model.JWTParameter.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory( + new com.thoughtspot.client.model.JWTUserOptions.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory( + new com.thoughtspot.client.model.JWTUserOptionsFull.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory( + new com.thoughtspot.client.model.JobRecipient.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory( + new com.thoughtspot.client.model.LiveboardContent.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory( + new com.thoughtspot.client.model.LiveboardDataResponse.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory( + new com.thoughtspot.client.model.LiveboardOptions.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory( + new com.thoughtspot.client.model.LiveboardOptionsInput.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory( + new com.thoughtspot.client.model.LogResponse.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory( + new com.thoughtspot.client.model.LoginRequest.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory( + new com.thoughtspot.client.model.ManageObjectPrivilegeRequest + .CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory( + new com.thoughtspot.client.model.MetadataAssociationItem + .CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory( + new com.thoughtspot.client.model.MetadataContext.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory( + new com.thoughtspot.client.model.MetadataInput.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory( + new com.thoughtspot.client.model.MetadataListItemInput.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory( + new com.thoughtspot.client.model.MetadataObject.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory( + new com.thoughtspot.client.model.MetadataResponse.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory( + new com.thoughtspot.client.model.MetadataSearchResponse.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory( + new com.thoughtspot.client.model.MetadataSearchSortOptions + .CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory( + new com.thoughtspot.client.model.ModelTableList.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory( + new com.thoughtspot.client.model.NLInstructionsInfo.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory( + new com.thoughtspot.client.model.NLInstructionsInfoInput + .CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory( + new com.thoughtspot.client.model.ObjectIDAndName.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory( + new com.thoughtspot.client.model.ObjectPrivilegesMetadataInput + .CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory( + new com.thoughtspot.client.model.ObjectPrivilegesOfMetadataResponse + .CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory( + new com.thoughtspot.client.model.Org.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory( + new com.thoughtspot.client.model.OrgChannelConfigInput.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory( + new com.thoughtspot.client.model.OrgChannelConfigResponse + .CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory( + new com.thoughtspot.client.model.OrgDetails.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory( + new com.thoughtspot.client.model.OrgInfo.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory( + new com.thoughtspot.client.model.OrgNonEmbedAccess.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory( + new com.thoughtspot.client.model.OrgNonEmbedAccessInput.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory( + new com.thoughtspot.client.model.OrgPreferenceSearchCriteriaInput + .CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory( + new com.thoughtspot.client.model.OrgResponse.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory( + new com.thoughtspot.client.model.OrgType.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory( + new com.thoughtspot.client.model.ParameterValues.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory( + new com.thoughtspot.client.model.ParameterizeMetadataFieldsRequest + .CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory( + new com.thoughtspot.client.model.ParameterizeMetadataRequest + .CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory( + new com.thoughtspot.client.model.ParametersListItem.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory( + new com.thoughtspot.client.model.ParametersListItemInput + .CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory( + new com.thoughtspot.client.model.PdfOptions.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory( + new com.thoughtspot.client.model.PdfOptionsInput.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory( + new com.thoughtspot.client.model.PermissionInput.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory( + new com.thoughtspot.client.model.PermissionOfMetadataResponse + .CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory( + new com.thoughtspot.client.model.PermissionOfPrincipalsResponse + .CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory( + new com.thoughtspot.client.model.PermissionsMetadataTypeInput + .CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory( + new com.thoughtspot.client.model.PngOptionsInput.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory( + new com.thoughtspot.client.model.PolicyProcessOptions.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory( + new com.thoughtspot.client.model.PolicyProcessOptionsInput + .CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory( + new com.thoughtspot.client.model.PrincipalsInput.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory( + new com.thoughtspot.client.model.PrincipalsListItem.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory( + new com.thoughtspot.client.model.PrincipalsListItemInput + .CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory( + new com.thoughtspot.client.model.PublishMetadataListItem + .CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory( + new com.thoughtspot.client.model.PublishMetadataRequest.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory( + new com.thoughtspot.client.model.PutVariableValuesRequest + .CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory( + new com.thoughtspot.client.model.QueryGetDecomposedQueryRequest + .CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory( + new com.thoughtspot.client.model.RecipientDetails.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory( + new com.thoughtspot.client.model.RecipientDetailsInput.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory( + new com.thoughtspot.client.model.RegionalSettingsInput.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory( + new com.thoughtspot.client.model.RepoConfigObject.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory( + new com.thoughtspot.client.model.ResetUserPasswordRequest + .CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory( + new com.thoughtspot.client.model.ResponseActivationURL.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory( + new com.thoughtspot.client.model.ResponseCopyObject.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory( + new com.thoughtspot.client.model.ResponseCustomAction.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory( + new com.thoughtspot.client.model.ResponseFailedEntities.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory( + new com.thoughtspot.client.model.ResponseFailedEntity.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory( + new com.thoughtspot.client.model.ResponseIncompleteEntities + .CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory( + new com.thoughtspot.client.model.ResponseIncompleteEntity + .CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory( + new com.thoughtspot.client.model.ResponseMessage.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory( + new com.thoughtspot.client.model.ResponsePostUpgradeFailedEntities + .CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory( + new com.thoughtspot.client.model.ResponsePostUpgradeFailedEntity + .CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory( + new com.thoughtspot.client.model.ResponseSchedule.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory( + new com.thoughtspot.client.model.ResponseScheduleRun.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory( + new com.thoughtspot.client.model.ResponseSuccessfulEntities + .CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory( + new com.thoughtspot.client.model.ResponseSuccessfulEntity + .CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory( + new com.thoughtspot.client.model.ResponseWorksheetToModelConversion + .CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory( + new com.thoughtspot.client.model.RevertCommitRequest.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory( + new com.thoughtspot.client.model.RevertResponse.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory( + new com.thoughtspot.client.model.RevertedMetadata.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory( + new com.thoughtspot.client.model.RevokeRefreshTokensRequest + .CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory( + new com.thoughtspot.client.model.RevokeRefreshTokensResponse + .CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory( + new com.thoughtspot.client.model.RevokeTokenRequest.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory( + new com.thoughtspot.client.model.RiseGQLArgWrapper.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory( + new com.thoughtspot.client.model.RiseSetter.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory( + new com.thoughtspot.client.model.Role.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory( + new com.thoughtspot.client.model.RoleResponse.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory( + new com.thoughtspot.client.model.RuntimeFilter.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory( + new com.thoughtspot.client.model.RuntimeFilters.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory( + new com.thoughtspot.client.model.RuntimeParamOverride.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory( + new com.thoughtspot.client.model.RuntimeParameters.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory( + new com.thoughtspot.client.model.RuntimeSort.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory( + new com.thoughtspot.client.model.RuntimeSorts.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory( + new com.thoughtspot.client.model.ScheduleHistoryRunsOptionsInput + .CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory( + new com.thoughtspot.client.model.SchedulesPdfOptionsInput + .CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory( + new com.thoughtspot.client.model.SchemaObject.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory( + new com.thoughtspot.client.model.Scope.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory( + new com.thoughtspot.client.model.ScriptSrcUrls.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory( + new com.thoughtspot.client.model.ScriptSrcUrlsInput.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory( + new com.thoughtspot.client.model.SearchAuthSettingsRequest + .CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory( + new com.thoughtspot.client.model.SearchAuthSettingsResponse + .CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory( + new com.thoughtspot.client.model.SearchCalendarsRequest.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory( + new com.thoughtspot.client.model.SearchChannelHistoryRequest + .CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory( + new com.thoughtspot.client.model.SearchChannelHistoryResponse + .CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory( + new com.thoughtspot.client.model.SearchCollectionsRequest + .CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory( + new com.thoughtspot.client.model.SearchCommitsRequest.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory( + new com.thoughtspot.client.model.SearchCommunicationChannelPreferencesRequest + .CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory( + new com.thoughtspot.client.model.SearchConfigRequest.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory( + new com.thoughtspot.client.model.SearchConnectionRequest + .CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory( + new com.thoughtspot.client.model.SearchConnectionResponse + .CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory( + new com.thoughtspot.client.model.SearchCustomActionsRequest + .CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory( + new com.thoughtspot.client.model.SearchDataRequest.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory( + new com.thoughtspot.client.model.SearchDataResponse.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory( + new com.thoughtspot.client.model.SearchEmailCustomizationRequest + .CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory( + new com.thoughtspot.client.model.SearchMetadataRequest.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory( + new com.thoughtspot.client.model.SearchOrgsRequest.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory( + new com.thoughtspot.client.model.SearchRoleResponse.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory( + new com.thoughtspot.client.model.SearchRolesRequest.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory( + new com.thoughtspot.client.model.SearchSchedulesRequest.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory( + new com.thoughtspot.client.model.SearchSecuritySettingsRequest + .CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory( + new com.thoughtspot.client.model.SearchTagsRequest.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory( + new com.thoughtspot.client.model.SearchUserGroupsRequest + .CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory( + new com.thoughtspot.client.model.SearchUsersRequest.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory( + new com.thoughtspot.client.model.SearchVariablesRequest.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory( + new com.thoughtspot.client.model.SearchWebhookConfigurationsRequest + .CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory( + new com.thoughtspot.client.model.SecuritySettingsClusterPreferences + .CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory( + new com.thoughtspot.client.model.SecuritySettingsClusterPreferencesInput + .CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory( + new com.thoughtspot.client.model.SecuritySettingsOrgDetails + .CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory( + new com.thoughtspot.client.model.SecuritySettingsOrgPreferences + .CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory( + new com.thoughtspot.client.model.SecuritySettingsOrgPreferencesInput + .CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory( + new com.thoughtspot.client.model.SecuritySettingsResponse + .CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory( + new com.thoughtspot.client.model.SendAgentConversationMessageRequest + .CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory( + new com.thoughtspot.client.model.SendAgentConversationMessageStreamingRequest + .CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory( + new com.thoughtspot.client.model.SendAgentMessageRequest + .CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory( + new com.thoughtspot.client.model.SendAgentMessageResponse + .CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory( + new com.thoughtspot.client.model.SendAgentMessageStreamingRequest + .CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory( + new com.thoughtspot.client.model.SendMessageRequest.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory( + new com.thoughtspot.client.model.SetNLInstructionsRequest + .CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory( + new com.thoughtspot.client.model.ShareMetadataRequest.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory( + new com.thoughtspot.client.model.ShareMetadataTypeInput.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory( + new com.thoughtspot.client.model.SharePermissionsInput.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory( + new com.thoughtspot.client.model.SingleAnswerRequest.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory( + new com.thoughtspot.client.model.SortOption.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory( + new com.thoughtspot.client.model.SortOptionInput.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory( + new com.thoughtspot.client.model.SortOptions.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory( + new com.thoughtspot.client.model.SortingOptions.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory( + new com.thoughtspot.client.model.SqlQuery.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory( + new com.thoughtspot.client.model.SqlQueryResponse.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory( + new com.thoughtspot.client.model.StorageConfig.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory( + new com.thoughtspot.client.model.StorageConfigInput.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory( + new com.thoughtspot.client.model.StorageDestination.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory( + new com.thoughtspot.client.model.StorageDestinationInput + .CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory( + new com.thoughtspot.client.model.SyncMetadataRequest.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory( + new com.thoughtspot.client.model.SyncMetadataResponse.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory( + new com.thoughtspot.client.model.SystemConfig.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory( + new com.thoughtspot.client.model.SystemInfo.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory( + new com.thoughtspot.client.model.SystemOverrideInfo.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory( + new com.thoughtspot.client.model.Table.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory( + new com.thoughtspot.client.model.Tag.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory( + new com.thoughtspot.client.model.TagMetadataTypeInput.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory( + new com.thoughtspot.client.model.TemplatePropertiesInputCreate + .CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory( + new com.thoughtspot.client.model.Token.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory( + new com.thoughtspot.client.model.TokenAccessScopeObject.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory( + new com.thoughtspot.client.model.TokenValidationResponse + .CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory( + new com.thoughtspot.client.model.URL.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory( + new com.thoughtspot.client.model.URLInput.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory( + new com.thoughtspot.client.model.URLInputMandatory.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory( + new com.thoughtspot.client.model.UnassignTagRequest.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory( + new com.thoughtspot.client.model.UnparameterizeMetadataRequest + .CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory( + new com.thoughtspot.client.model.UnpublishMetadataRequest + .CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory( + new com.thoughtspot.client.model.UpdateCalendarRequest.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory( + new com.thoughtspot.client.model.UpdateCollectionRequest + .CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory( + new com.thoughtspot.client.model.UpdateColumnSecurityRulesRequest + .CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory( + new com.thoughtspot.client.model.UpdateConfigRequest.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory( + new com.thoughtspot.client.model.UpdateConnectionConfigurationRequest + .CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory( + new com.thoughtspot.client.model.UpdateConnectionRequest + .CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory( + new com.thoughtspot.client.model.UpdateConnectionStatusRequest + .CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory( + new com.thoughtspot.client.model.UpdateConnectionV2Request + .CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory( + new com.thoughtspot.client.model.UpdateCustomActionRequest + .CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory( + new com.thoughtspot.client.model.UpdateEmailCustomizationRequest + .CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory( + new com.thoughtspot.client.model.UpdateMetadataHeaderRequest + .CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory( + new com.thoughtspot.client.model.UpdateMetadataObjIdRequest + .CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory( + new com.thoughtspot.client.model.UpdateObjIdInput.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory( + new com.thoughtspot.client.model.UpdateOrgRequest.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory( + new com.thoughtspot.client.model.UpdateRoleRequest.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory( + new com.thoughtspot.client.model.UpdateScheduleRequest.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory( + new com.thoughtspot.client.model.UpdateSystemConfigRequest + .CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory( + new com.thoughtspot.client.model.UpdateTagRequest.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory( + new com.thoughtspot.client.model.UpdateUserGroupRequest.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory( + new com.thoughtspot.client.model.UpdateUserRequest.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory( + new com.thoughtspot.client.model.UpdateVariableRequest.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory( + new com.thoughtspot.client.model.UpdateVariableValuesRequest + .CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory( + new com.thoughtspot.client.model.UpdateWebhookConfigurationRequest + .CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory( + new com.thoughtspot.client.model.User.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory( + new com.thoughtspot.client.model.UserGroup.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory( + new com.thoughtspot.client.model.UserGroupResponse.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory( + new com.thoughtspot.client.model.UserInfo.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory( + new com.thoughtspot.client.model.UserObject.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory( + new com.thoughtspot.client.model.UserParameterOptions.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory( + new com.thoughtspot.client.model.UserPrincipal.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory( + new com.thoughtspot.client.model.ValidateCommunicationChannelRequest + .CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory( + new com.thoughtspot.client.model.ValidateMergeRequest.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory( + new com.thoughtspot.client.model.ValidateTokenRequest.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory( + new com.thoughtspot.client.model.ValueScopeInput.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory( + new com.thoughtspot.client.model.Variable.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory( + new com.thoughtspot.client.model.VariableDetailInput.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory( + new com.thoughtspot.client.model.VariableOrgInfo.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory( + new com.thoughtspot.client.model.VariablePutAssignmentInput + .CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory( + new com.thoughtspot.client.model.VariableUpdateAssignmentInput + .CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory( + new com.thoughtspot.client.model.VariableUpdateScopeInput + .CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory( + new com.thoughtspot.client.model.VariableValue.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory( + new com.thoughtspot.client.model.VariableValues.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory( + new com.thoughtspot.client.model.WebhookAuthApiKey.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory( + new com.thoughtspot.client.model.WebhookAuthApiKeyInput.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory( + new com.thoughtspot.client.model.WebhookAuthBasicAuth.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory( + new com.thoughtspot.client.model.WebhookAuthBasicAuthInput + .CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory( + new com.thoughtspot.client.model.WebhookAuthOAuth2.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory( + new com.thoughtspot.client.model.WebhookAuthOAuth2Input.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory( + new com.thoughtspot.client.model.WebhookAuthentication.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory( + new com.thoughtspot.client.model.WebhookAuthenticationInput + .CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory( + new com.thoughtspot.client.model.WebhookDeleteFailure.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory( + new com.thoughtspot.client.model.WebhookDeleteResponse.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory( + new com.thoughtspot.client.model.WebhookKeyValuePair.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory( + new com.thoughtspot.client.model.WebhookKeyValuePairInput + .CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory( + new com.thoughtspot.client.model.WebhookOrg.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory( + new com.thoughtspot.client.model.WebhookPagination.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory( + new com.thoughtspot.client.model.WebhookResponse.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory( + new com.thoughtspot.client.model.WebhookSearchResponse.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory( + new com.thoughtspot.client.model.WebhookSignatureVerification + .CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory( + new com.thoughtspot.client.model.WebhookSignatureVerificationInput + .CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory( + new com.thoughtspot.client.model.WebhookSortOptionsInput + .CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory( + new com.thoughtspot.client.model.WebhookUser.CustomTypeAdapterFactory()); + gson = gsonBuilder.create(); + } + + /** + * Get Gson. + * + * @return Gson + */ + public static Gson getGson() { + return gson; + } + + /** + * Set Gson. + * + * @param gson Gson + */ + public static void setGson(Gson gson) { + JSON.gson = gson; + } + + public static void setLenientOnJson(boolean lenientOnJson) { + isLenientOnJson = lenientOnJson; + } + + /** + * Serialize the given Java object into JSON string. + * + * @param obj Object + * @return String representation of the JSON + */ + public static String serialize(Object obj) { + return gson.toJson(obj); + } + + /** + * Deserialize the given JSON string to Java object. + * + * @param Type + * @param body The JSON string + * @param returnType The type to deserialize into + * @return The deserialized Java object + */ + @SuppressWarnings("unchecked") + public static T deserialize(String body, Type returnType) { + try { + if (isLenientOnJson) { + JsonReader jsonReader = new JsonReader(new StringReader(body)); + // see + // https://google-gson.googlecode.com/svn/trunk/gson/docs/javadocs/com/google/gson/stream/JsonReader.html#setLenient(boolean) + jsonReader.setLenient(true); + return gson.fromJson(jsonReader, returnType); + } else { + return gson.fromJson(body, returnType); + } + } catch (JsonParseException e) { + // Fallback processing when failed to parse JSON form response body: + // return the response body string directly for the String return type; + if (returnType.equals(String.class)) { + return (T) body; + } else { + throw (e); + } + } + } + + /** Gson TypeAdapter for Byte Array type */ + public static class ByteArrayAdapter extends TypeAdapter { + + @Override + public void write(JsonWriter out, byte[] value) throws IOException { + if (value == null) { + out.nullValue(); + } else { + out.value(ByteString.of(value).base64()); + } + } + + @Override + public byte[] read(JsonReader in) throws IOException { + switch (in.peek()) { + case NULL: + in.nextNull(); + return null; + default: + String bytesAsBase64 = in.nextString(); + ByteString byteString = ByteString.decodeBase64(bytesAsBase64); + return byteString.toByteArray(); + } + } + } + + /** Gson TypeAdapter for JSR310 OffsetDateTime type */ + public static class OffsetDateTimeTypeAdapter extends TypeAdapter { + + private DateTimeFormatter formatter; + + public OffsetDateTimeTypeAdapter() { + this(DateTimeFormatter.ISO_OFFSET_DATE_TIME); + } + + public OffsetDateTimeTypeAdapter(DateTimeFormatter formatter) { + this.formatter = formatter; + } + + public void setFormat(DateTimeFormatter dateFormat) { + this.formatter = dateFormat; + } + + @Override + public void write(JsonWriter out, OffsetDateTime date) throws IOException { + if (date == null) { + out.nullValue(); + } else { + out.value(formatter.format(date)); + } + } + + @Override + public OffsetDateTime read(JsonReader in) throws IOException { + switch (in.peek()) { + case NULL: + in.nextNull(); + return null; + default: + String date = in.nextString(); + if (date.endsWith("+0000")) { + date = date.substring(0, date.length() - 5) + "Z"; + } + return OffsetDateTime.parse(date, formatter); + } + } + } + + /** Gson TypeAdapter for JSR310 LocalDate type */ + public static class LocalDateTypeAdapter extends TypeAdapter { + + private DateTimeFormatter formatter; + + public LocalDateTypeAdapter() { + this(DateTimeFormatter.ISO_LOCAL_DATE); + } + + public LocalDateTypeAdapter(DateTimeFormatter formatter) { + this.formatter = formatter; + } + + public void setFormat(DateTimeFormatter dateFormat) { + this.formatter = dateFormat; + } + + @Override + public void write(JsonWriter out, LocalDate date) throws IOException { + if (date == null) { + out.nullValue(); + } else { + out.value(formatter.format(date)); + } + } + + @Override + public LocalDate read(JsonReader in) throws IOException { + switch (in.peek()) { + case NULL: + in.nextNull(); + return null; + default: + String date = in.nextString(); + return LocalDate.parse(date, formatter); + } + } + } + + public static void setOffsetDateTimeFormat(DateTimeFormatter dateFormat) { + offsetDateTimeTypeAdapter.setFormat(dateFormat); + } + + public static void setLocalDateFormat(DateTimeFormatter dateFormat) { + localDateTypeAdapter.setFormat(dateFormat); + } + + /** + * Gson TypeAdapter for java.sql.Date type If the dateFormat is null, a simple "yyyy-MM-dd" + * format will be used (more efficient than SimpleDateFormat). + */ + public static class SqlDateTypeAdapter extends TypeAdapter { + + private DateFormat dateFormat; + + public SqlDateTypeAdapter() {} + + public SqlDateTypeAdapter(DateFormat dateFormat) { + this.dateFormat = dateFormat; + } + + public void setFormat(DateFormat dateFormat) { + this.dateFormat = dateFormat; + } + + @Override + public void write(JsonWriter out, java.sql.Date date) throws IOException { + if (date == null) { + out.nullValue(); + } else { + String value; + if (dateFormat != null) { + value = dateFormat.format(date); + } else { + value = date.toString(); + } + out.value(value); + } + } + + @Override + public java.sql.Date read(JsonReader in) throws IOException { + switch (in.peek()) { + case NULL: + in.nextNull(); + return null; + default: + String date = in.nextString(); + try { + if (dateFormat != null) { + return new java.sql.Date(dateFormat.parse(date).getTime()); + } + return new java.sql.Date( + ISO8601Utils.parse(date, new ParsePosition(0)).getTime()); + } catch (ParseException e) { + throw new JsonParseException(e); + } + } + } + } + + /** + * Gson TypeAdapter for java.util.Date type If the dateFormat is null, ISO8601Utils will be + * used. + */ + public static class DateTypeAdapter extends TypeAdapter { + + private DateFormat dateFormat; + + public DateTypeAdapter() {} + + public DateTypeAdapter(DateFormat dateFormat) { + this.dateFormat = dateFormat; + } + + public void setFormat(DateFormat dateFormat) { + this.dateFormat = dateFormat; + } + + @Override + public void write(JsonWriter out, Date date) throws IOException { + if (date == null) { + out.nullValue(); + } else { + String value; + if (dateFormat != null) { + value = dateFormat.format(date); + } else { + value = ISO8601Utils.format(date, true); + } + out.value(value); + } + } + + @Override + public Date read(JsonReader in) throws IOException { + try { + switch (in.peek()) { + case NULL: + in.nextNull(); + return null; + default: + String date = in.nextString(); + try { + if (dateFormat != null) { + return dateFormat.parse(date); + } + return ISO8601Utils.parse(date, new ParsePosition(0)); + } catch (ParseException e) { + throw new JsonParseException(e); + } + } + } catch (IllegalArgumentException e) { + throw new JsonParseException(e); + } + } + } + + public static void setDateFormat(DateFormat dateFormat) { + dateTypeAdapter.setFormat(dateFormat); + } + + public static void setSqlDateFormat(DateFormat dateFormat) { + sqlDateTypeAdapter.setFormat(dateFormat); + } +} diff --git a/sdks/java/src/main/java/com/thoughtspot/client/Pair.java b/sdks/java/src/main/java/com/thoughtspot/client/Pair.java new file mode 100644 index 000000000..eea3e222d --- /dev/null +++ b/sdks/java/src/main/java/com/thoughtspot/client/Pair.java @@ -0,0 +1,50 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client; + +@javax.annotation.Generated( + value = "org.openapitools.codegen.languages.JavaClientCodegen", + comments = "Generator version: 7.12.0") +public class Pair { + private String name = ""; + private String value = ""; + + public Pair(String name, String value) { + setName(name); + setValue(value); + } + + private void setName(String name) { + if (!isValidString(name)) { + return; + } + + this.name = name; + } + + private void setValue(String value) { + if (!isValidString(value)) { + return; + } + + this.value = value; + } + + public String getName() { + return this.name; + } + + public String getValue() { + return this.value; + } + + private boolean isValidString(String arg) { + if (arg == null) { + return false; + } + + return true; + } +} diff --git a/sdks/java/src/main/java/com/thoughtspot/client/ProgressRequestBody.java b/sdks/java/src/main/java/com/thoughtspot/client/ProgressRequestBody.java new file mode 100644 index 000000000..53b13b80d --- /dev/null +++ b/sdks/java/src/main/java/com/thoughtspot/client/ProgressRequestBody.java @@ -0,0 +1,63 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client; + +import java.io.IOException; +import okhttp3.MediaType; +import okhttp3.RequestBody; +import okio.Buffer; +import okio.BufferedSink; +import okio.ForwardingSink; +import okio.Okio; +import okio.Sink; + +public class ProgressRequestBody extends RequestBody { + + private final RequestBody requestBody; + + private final ApiCallback callback; + + public ProgressRequestBody(RequestBody requestBody, ApiCallback callback) { + this.requestBody = requestBody; + this.callback = callback; + } + + @Override + public MediaType contentType() { + return requestBody.contentType(); + } + + @Override + public long contentLength() throws IOException { + return requestBody.contentLength(); + } + + @Override + public void writeTo(BufferedSink sink) throws IOException { + BufferedSink bufferedSink = Okio.buffer(sink(sink)); + requestBody.writeTo(bufferedSink); + bufferedSink.flush(); + } + + private Sink sink(Sink sink) { + return new ForwardingSink(sink) { + + long bytesWritten = 0L; + long contentLength = 0L; + + @Override + public void write(Buffer source, long byteCount) throws IOException { + super.write(source, byteCount); + if (contentLength == 0) { + contentLength = contentLength(); + } + + bytesWritten += byteCount; + callback.onUploadProgress( + bytesWritten, contentLength, bytesWritten == contentLength); + } + }; + } +} diff --git a/sdks/java/src/main/java/com/thoughtspot/client/ProgressResponseBody.java b/sdks/java/src/main/java/com/thoughtspot/client/ProgressResponseBody.java new file mode 100644 index 000000000..970f9ac98 --- /dev/null +++ b/sdks/java/src/main/java/com/thoughtspot/client/ProgressResponseBody.java @@ -0,0 +1,60 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client; + +import java.io.IOException; +import okhttp3.MediaType; +import okhttp3.ResponseBody; +import okio.Buffer; +import okio.BufferedSource; +import okio.ForwardingSource; +import okio.Okio; +import okio.Source; + +public class ProgressResponseBody extends ResponseBody { + + private final ResponseBody responseBody; + private final ApiCallback callback; + private BufferedSource bufferedSource; + + public ProgressResponseBody(ResponseBody responseBody, ApiCallback callback) { + this.responseBody = responseBody; + this.callback = callback; + } + + @Override + public MediaType contentType() { + return responseBody.contentType(); + } + + @Override + public long contentLength() { + return responseBody.contentLength(); + } + + @Override + public BufferedSource source() { + if (bufferedSource == null) { + bufferedSource = Okio.buffer(source(responseBody.source())); + } + return bufferedSource; + } + + private Source source(Source source) { + return new ForwardingSource(source) { + long totalBytesRead = 0L; + + @Override + public long read(Buffer sink, long byteCount) throws IOException { + long bytesRead = super.read(sink, byteCount); + // read() returns the number of bytes read, or -1 if this source is exhausted. + totalBytesRead += bytesRead != -1 ? bytesRead : 0; + callback.onDownloadProgress( + totalBytesRead, responseBody.contentLength(), bytesRead == -1); + return bytesRead; + } + }; + } +} diff --git a/sdks/java/src/main/java/com/thoughtspot/client/ServerConfiguration.java b/sdks/java/src/main/java/com/thoughtspot/client/ServerConfiguration.java new file mode 100644 index 000000000..d840ac1f8 --- /dev/null +++ b/sdks/java/src/main/java/com/thoughtspot/client/ServerConfiguration.java @@ -0,0 +1,71 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client; + +import java.util.Map; + +/** Representing a Server configuration. */ +@javax.annotation.Generated( + value = "org.openapitools.codegen.languages.JavaClientCodegen", + comments = "Generator version: 7.12.0") +public class ServerConfiguration { + public String URL; + public String description; + public Map variables; + + /** + * @param URL A URL to the target host. + * @param description A description of the host designated by the URL. + * @param variables A map between a variable name and its value. The value is used for + * substitution in the server's URL template. + */ + public ServerConfiguration( + String URL, String description, Map variables) { + this.URL = URL; + this.description = description; + this.variables = variables; + } + + /** + * Format URL template using given variables. + * + * @param variables A map between a variable name and its value. + * @return Formatted URL. + */ + public String URL(Map variables) { + String url = this.URL; + + // go through variables and replace placeholders + for (Map.Entry variable : this.variables.entrySet()) { + String name = variable.getKey(); + ServerVariable serverVariable = variable.getValue(); + String value = serverVariable.defaultValue; + + if (variables != null && variables.containsKey(name)) { + value = variables.get(name); + if (serverVariable.enumValues.size() > 0 + && !serverVariable.enumValues.contains(value)) { + throw new IllegalArgumentException( + "The variable " + + name + + " in the server URL has invalid value " + + value + + "."); + } + } + url = url.replace("{" + name + "}", value); + } + return url; + } + + /** + * Format URL template using default server variables. + * + * @return Formatted URL. + */ + public String URL() { + return URL(null); + } +} diff --git a/sdks/java/src/main/java/com/thoughtspot/client/ServerVariable.java b/sdks/java/src/main/java/com/thoughtspot/client/ServerVariable.java new file mode 100644 index 000000000..bd78a124f --- /dev/null +++ b/sdks/java/src/main/java/com/thoughtspot/client/ServerVariable.java @@ -0,0 +1,29 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client; + +import java.util.HashSet; + +/** Representing a Server Variable for server URL template substitution. */ +@javax.annotation.Generated( + value = "org.openapitools.codegen.languages.JavaClientCodegen", + comments = "Generator version: 7.12.0") +public class ServerVariable { + public String description; + public String defaultValue; + public HashSet enumValues = null; + + /** + * @param description A description for the server variable. + * @param defaultValue The default value to use for substitution. + * @param enumValues An enumeration of string values to be used if the substitution options are + * from a limited set. + */ + public ServerVariable(String description, String defaultValue, HashSet enumValues) { + this.description = description; + this.defaultValue = defaultValue; + this.enumValues = enumValues; + } +} diff --git a/sdks/java/src/main/java/com/thoughtspot/client/StringUtil.java b/sdks/java/src/main/java/com/thoughtspot/client/StringUtil.java new file mode 100644 index 000000000..e5b8997a5 --- /dev/null +++ b/sdks/java/src/main/java/com/thoughtspot/client/StringUtil.java @@ -0,0 +1,75 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client; + +import java.util.Collection; +import java.util.Iterator; + +@javax.annotation.Generated( + value = "org.openapitools.codegen.languages.JavaClientCodegen", + comments = "Generator version: 7.12.0") +public class StringUtil { + /** + * Check if the given array contains the given value (with case-insensitive comparison). + * + * @param array The array + * @param value The value to search + * @return true if the array contains the value + */ + public static boolean containsIgnoreCase(String[] array, String value) { + for (String str : array) { + if (value == null && str == null) { + return true; + } + if (value != null && value.equalsIgnoreCase(str)) { + return true; + } + } + return false; + } + + /** + * Join an array of strings with the given separator. + * + *

Note: This might be replaced by utility method from commons-lang or guava someday if one + * of those libraries is added as dependency. + * + * @param array The array of strings + * @param separator The separator + * @return the resulting string + */ + public static String join(String[] array, String separator) { + int len = array.length; + if (len == 0) { + return ""; + } + + StringBuilder out = new StringBuilder(); + out.append(array[0]); + for (int i = 1; i < len; i++) { + out.append(separator).append(array[i]); + } + return out.toString(); + } + + /** + * Join a list of strings with the given separator. + * + * @param list The list of strings + * @param separator The separator + * @return the resulting string + */ + public static String join(Collection list, String separator) { + Iterator iterator = list.iterator(); + StringBuilder out = new StringBuilder(); + if (iterator.hasNext()) { + out.append(iterator.next()); + } + while (iterator.hasNext()) { + out.append(separator).append(iterator.next()); + } + return out.toString(); + } +} diff --git a/sdks/java/src/main/java/com/thoughtspot/client/api/AiApi.java b/sdks/java/src/main/java/com/thoughtspot/client/api/AiApi.java new file mode 100644 index 000000000..6e7c7635a --- /dev/null +++ b/sdks/java/src/main/java/com/thoughtspot/client/api/AiApi.java @@ -0,0 +1,3717 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client.api; + +import com.google.gson.reflect.TypeToken; +import com.thoughtspot.client.ApiCallback; +import com.thoughtspot.client.ApiClient; +import com.thoughtspot.client.ApiClientConfiguration; +import com.thoughtspot.client.ApiException; +import com.thoughtspot.client.ApiResponse; +import com.thoughtspot.client.Configuration; +import com.thoughtspot.client.Pair; +import com.thoughtspot.client.model.AgentConversation; +import com.thoughtspot.client.model.Conversation; +import com.thoughtspot.client.model.CreateAgentConversationRequest; +import com.thoughtspot.client.model.CreateConversationRequest; +import com.thoughtspot.client.model.EurekaDataSourceSuggestionResponse; +import com.thoughtspot.client.model.EurekaDecomposeQueryResponse; +import com.thoughtspot.client.model.EurekaGetNLInstructionsResponse; +import com.thoughtspot.client.model.EurekaGetRelevantQuestionsResponse; +import com.thoughtspot.client.model.EurekaSetNLInstructionsResponse; +import com.thoughtspot.client.model.GetDataSourceSuggestionsRequest; +import com.thoughtspot.client.model.GetNLInstructionsRequest; +import com.thoughtspot.client.model.GetRelevantQuestionsRequest; +import com.thoughtspot.client.model.QueryGetDecomposedQueryRequest; +import com.thoughtspot.client.model.ResponseMessage; +import com.thoughtspot.client.model.SendAgentConversationMessageRequest; +import com.thoughtspot.client.model.SendAgentConversationMessageStreamingRequest; +import com.thoughtspot.client.model.SendAgentMessageRequest; +import com.thoughtspot.client.model.SendAgentMessageResponse; +import com.thoughtspot.client.model.SendAgentMessageStreamingRequest; +import com.thoughtspot.client.model.SendMessageRequest; +import com.thoughtspot.client.model.SetNLInstructionsRequest; +import com.thoughtspot.client.model.SingleAnswerRequest; +import java.lang.reflect.Type; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +@javax.annotation.Generated( + value = "org.openapitools.codegen.languages.JavaClientCodegen", + comments = "Generator version: 7.12.0") +public class AiApi { + private ApiClient localVarApiClient; + private ApiClientConfiguration localVarApiClientConfiguration; + private int localHostIndex; + private String localCustomBaseUrl; + + public AiApi() { + this(Configuration.getDefaultApiClient()); + } + + public AiApi(ApiClient apiClient) { + this.localVarApiClient = apiClient; + } + + public AiApi(ApiClientConfiguration apiClientConfiguration) { + this.localVarApiClientConfiguration = apiClientConfiguration; + this.localVarApiClient = new ApiClient(apiClientConfiguration); + } + + public ApiClient getApiClient() { + return localVarApiClient; + } + + public void setApiClient(ApiClient apiClient) { + this.localVarApiClient = apiClient; + } + + public ApiClientConfiguration getApiClientConfiguration() { + return localVarApiClientConfiguration; + } + + public void applyApiClientConfiguration(ApiClientConfiguration apiClientConfiguration) { + this.localVarApiClientConfiguration = apiClientConfiguration; + if (localVarApiClient != null) { + localVarApiClient.applyApiClientConfiguration(apiClientConfiguration); + } else { + localVarApiClient = new ApiClient(apiClientConfiguration); + } + } + + public int getHostIndex() { + return localHostIndex; + } + + public void setHostIndex(int hostIndex) { + this.localHostIndex = hostIndex; + } + + public String getCustomBaseUrl() { + return localCustomBaseUrl; + } + + public void setCustomBaseUrl(String customBaseUrl) { + this.localCustomBaseUrl = customBaseUrl; + } + + /** + * Build call for createAgentConversation + * + * @param createAgentConversationRequest (required) + * @param _callback Callback for upload/download progress + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + * @http.response.details + * + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 Common successful response -
201 Common error response -
400 Operation failed -
401 Unauthorized access. -
403 Forbidden access. -
500 Operation failed -
+ */ + public okhttp3.Call createAgentConversationCall( + CreateAgentConversationRequest createAgentConversationRequest, + final ApiCallback _callback) + throws ApiException { + String basePath = null; + // Operation Servers + String[] localBasePaths = new String[] {}; + + // Determine Base Path to Use + if (localCustomBaseUrl != null) { + basePath = localCustomBaseUrl; + } else if (localBasePaths.length > 0) { + basePath = localBasePaths[localHostIndex]; + } else { + basePath = null; + } + + Object localVarPostBody = createAgentConversationRequest; + + // create path and map variables + String localVarPath = "/api/rest/2.0/ai/agent/conversation/create"; + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + final String[] localVarAccepts = {"application/json"}; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = {"application/json"}; + final String localVarContentType = + localVarApiClient.selectHeaderContentType(localVarContentTypes); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } + + String[] localVarAuthNames = new String[] {"bearerAuth"}; + return localVarApiClient.buildCall( + basePath, + localVarPath, + "POST", + localVarQueryParams, + localVarCollectionQueryParams, + localVarPostBody, + localVarHeaderParams, + localVarCookieParams, + localVarFormParams, + localVarAuthNames, + _callback); + } + + @SuppressWarnings("rawtypes") + private okhttp3.Call createAgentConversationValidateBeforeCall( + CreateAgentConversationRequest createAgentConversationRequest, + final ApiCallback _callback) + throws ApiException { + // verify the required parameter 'createAgentConversationRequest' is set + if (createAgentConversationRequest == null) { + throw new ApiException( + "Missing the required parameter 'createAgentConversationRequest' when calling" + + " createAgentConversation(Async)"); + } + + return createAgentConversationCall(createAgentConversationRequest, _callback); + } + + /** + * Version: 26.2.0.cl or later Creates a new Spotter agent conversation based on the provided + * context and settings. The endpoint was in Beta from 26.2.0.cl through 26.4.0.cl. Requires + * `CAN_USE_SPOTTER` privilege and at least view access to the metadata object + * specified in the request. #### Usage guidelines The request must include the + * `metadata_context` parameter to define the conversation context. The context type + * can be one of: - `DATA_SOURCE` *(available from 26.5.0.cl)*: targets a specific + * data source. Provide `data_source_identifier` in `data_source_context` + * for a single data source, or `data_source_identifiers` for multi-data-source + * context. The deprecated `guid` field is accepted for backwards compatibility. - + * `AUTO_MODE` *(available from 26.5.0.cl)*: automatically discovers and selects the + * most relevant datasets for the user's queries. > **Note for callers on versions + * 26.2.0.cl – 26.4.0.cl (Beta):** use the lowercase `data_source` enum value with the + * `guid` field instead of the above. Example: `{ \"type\": + * \"data_source\", \"data_source_context\": { \"guid\": + * \"<worksheet-id>\" } }`. The `conversation_settings` parameter + * controls which Spotter capabilities are enabled for the conversation: - + * `enable_contextual_change_analysis` (default: `true`, **deprecated from + * 26.2.0.cl**) — always enabled in Spotter 3; setting this to `false` has no effect + * on versions >= 26.2.0.cl - `enable_natural_language_answer_generation` + * (default: `true`, **deprecated from 26.2.0.cl**) — always enabled in Spotter 3; + * setting this to `false` has no effect on versions >= 26.2.0.cl - + * `enable_reasoning` (default: `true`, **deprecated from 26.2.0.cl**) — + * always enabled in Spotter 3; setting this to `false` has no effect on versions + * >= 26.2.0.cl - `enable_save_chat` (default: `false`, *available + * from 26.5.0.cl*) — enables saving the conversation for later retrieval via conversation + * history If the request is successful, the response includes a unique + * `conversation_identifier` that must be passed to + * `sendAgentConversationMessage` or `sendAgentConversationMessageStreaming` + * to send messages within this conversation. The response also includes + * `conversation_id` with the same value for backwards compatibility; use + * `conversation_identifier` for new integrations. #### Example request + * ```json { \"metadata_context\": { \"type\": + * \"DATA_SOURCE\", \"data_source_context\": { + * \"data_source_identifier\": \"a1b2c3d4-e5f6-7890-abcd-ef1234567890\" } }, + * \"conversation_settings\": {} } ``` #### Error responses | Code | + * Description | | ---- | + * --------------------------------------------------------------------------------------------------------------------------------------- + * | | 401 | Unauthorized — authentication token is missing, expired, or invalid. | | 403 | + * Forbidden — the authenticated user does not have `CAN_USE_SPOTTER` privilege or + * lacks view permission on the specified metadata object. | > ###### Note: > > - This + * endpoint was in Beta from 26.2.0.cl through 26.4.0.cl and is Generally Available from version + * 26.5.0.cl. > - This endpoint requires Spotter - please contact ThoughtSpot support to + * enable Spotter on your cluster. + * + * @param createAgentConversationRequest (required) + * @return AgentConversation + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the + * response body + * @http.response.details + * + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 Common successful response -
201 Common error response -
400 Operation failed -
401 Unauthorized access. -
403 Forbidden access. -
500 Operation failed -
+ */ + public AgentConversation createAgentConversation( + CreateAgentConversationRequest createAgentConversationRequest) throws ApiException { + ApiResponse localVarResp = + createAgentConversationWithHttpInfo(createAgentConversationRequest); + return localVarResp.getData(); + } + + /** + * Version: 26.2.0.cl or later Creates a new Spotter agent conversation based on the provided + * context and settings. The endpoint was in Beta from 26.2.0.cl through 26.4.0.cl. Requires + * `CAN_USE_SPOTTER` privilege and at least view access to the metadata object + * specified in the request. #### Usage guidelines The request must include the + * `metadata_context` parameter to define the conversation context. The context type + * can be one of: - `DATA_SOURCE` *(available from 26.5.0.cl)*: targets a specific + * data source. Provide `data_source_identifier` in `data_source_context` + * for a single data source, or `data_source_identifiers` for multi-data-source + * context. The deprecated `guid` field is accepted for backwards compatibility. - + * `AUTO_MODE` *(available from 26.5.0.cl)*: automatically discovers and selects the + * most relevant datasets for the user's queries. > **Note for callers on versions + * 26.2.0.cl – 26.4.0.cl (Beta):** use the lowercase `data_source` enum value with the + * `guid` field instead of the above. Example: `{ \"type\": + * \"data_source\", \"data_source_context\": { \"guid\": + * \"<worksheet-id>\" } }`. The `conversation_settings` parameter + * controls which Spotter capabilities are enabled for the conversation: - + * `enable_contextual_change_analysis` (default: `true`, **deprecated from + * 26.2.0.cl**) — always enabled in Spotter 3; setting this to `false` has no effect + * on versions >= 26.2.0.cl - `enable_natural_language_answer_generation` + * (default: `true`, **deprecated from 26.2.0.cl**) — always enabled in Spotter 3; + * setting this to `false` has no effect on versions >= 26.2.0.cl - + * `enable_reasoning` (default: `true`, **deprecated from 26.2.0.cl**) — + * always enabled in Spotter 3; setting this to `false` has no effect on versions + * >= 26.2.0.cl - `enable_save_chat` (default: `false`, *available + * from 26.5.0.cl*) — enables saving the conversation for later retrieval via conversation + * history If the request is successful, the response includes a unique + * `conversation_identifier` that must be passed to + * `sendAgentConversationMessage` or `sendAgentConversationMessageStreaming` + * to send messages within this conversation. The response also includes + * `conversation_id` with the same value for backwards compatibility; use + * `conversation_identifier` for new integrations. #### Example request + * ```json { \"metadata_context\": { \"type\": + * \"DATA_SOURCE\", \"data_source_context\": { + * \"data_source_identifier\": \"a1b2c3d4-e5f6-7890-abcd-ef1234567890\" } }, + * \"conversation_settings\": {} } ``` #### Error responses | Code | + * Description | | ---- | + * --------------------------------------------------------------------------------------------------------------------------------------- + * | | 401 | Unauthorized — authentication token is missing, expired, or invalid. | | 403 | + * Forbidden — the authenticated user does not have `CAN_USE_SPOTTER` privilege or + * lacks view permission on the specified metadata object. | > ###### Note: > > - This + * endpoint was in Beta from 26.2.0.cl through 26.4.0.cl and is Generally Available from version + * 26.5.0.cl. > - This endpoint requires Spotter - please contact ThoughtSpot support to + * enable Spotter on your cluster. + * + * @param createAgentConversationRequest (required) + * @return ApiResponse<AgentConversation> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the + * response body + * @http.response.details + * + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 Common successful response -
201 Common error response -
400 Operation failed -
401 Unauthorized access. -
403 Forbidden access. -
500 Operation failed -
+ */ + public ApiResponse createAgentConversationWithHttpInfo( + CreateAgentConversationRequest createAgentConversationRequest) throws ApiException { + okhttp3.Call localVarCall = + createAgentConversationValidateBeforeCall(createAgentConversationRequest, null); + Type localVarReturnType = new TypeToken() {}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); + } + + /** + * (asynchronously) Version: 26.2.0.cl or later Creates a new Spotter agent conversation based + * on the provided context and settings. The endpoint was in Beta from 26.2.0.cl through + * 26.4.0.cl. Requires `CAN_USE_SPOTTER` privilege and at least view access to the + * metadata object specified in the request. #### Usage guidelines The request must include the + * `metadata_context` parameter to define the conversation context. The context type + * can be one of: - `DATA_SOURCE` *(available from 26.5.0.cl)*: targets a specific + * data source. Provide `data_source_identifier` in `data_source_context` + * for a single data source, or `data_source_identifiers` for multi-data-source + * context. The deprecated `guid` field is accepted for backwards compatibility. - + * `AUTO_MODE` *(available from 26.5.0.cl)*: automatically discovers and selects the + * most relevant datasets for the user's queries. > **Note for callers on versions + * 26.2.0.cl – 26.4.0.cl (Beta):** use the lowercase `data_source` enum value with the + * `guid` field instead of the above. Example: `{ \"type\": + * \"data_source\", \"data_source_context\": { \"guid\": + * \"<worksheet-id>\" } }`. The `conversation_settings` parameter + * controls which Spotter capabilities are enabled for the conversation: - + * `enable_contextual_change_analysis` (default: `true`, **deprecated from + * 26.2.0.cl**) — always enabled in Spotter 3; setting this to `false` has no effect + * on versions >= 26.2.0.cl - `enable_natural_language_answer_generation` + * (default: `true`, **deprecated from 26.2.0.cl**) — always enabled in Spotter 3; + * setting this to `false` has no effect on versions >= 26.2.0.cl - + * `enable_reasoning` (default: `true`, **deprecated from 26.2.0.cl**) — + * always enabled in Spotter 3; setting this to `false` has no effect on versions + * >= 26.2.0.cl - `enable_save_chat` (default: `false`, *available + * from 26.5.0.cl*) — enables saving the conversation for later retrieval via conversation + * history If the request is successful, the response includes a unique + * `conversation_identifier` that must be passed to + * `sendAgentConversationMessage` or `sendAgentConversationMessageStreaming` + * to send messages within this conversation. The response also includes + * `conversation_id` with the same value for backwards compatibility; use + * `conversation_identifier` for new integrations. #### Example request + * ```json { \"metadata_context\": { \"type\": + * \"DATA_SOURCE\", \"data_source_context\": { + * \"data_source_identifier\": \"a1b2c3d4-e5f6-7890-abcd-ef1234567890\" } }, + * \"conversation_settings\": {} } ``` #### Error responses | Code | + * Description | | ---- | + * --------------------------------------------------------------------------------------------------------------------------------------- + * | | 401 | Unauthorized — authentication token is missing, expired, or invalid. | | 403 | + * Forbidden — the authenticated user does not have `CAN_USE_SPOTTER` privilege or + * lacks view permission on the specified metadata object. | > ###### Note: > > - This + * endpoint was in Beta from 26.2.0.cl through 26.4.0.cl and is Generally Available from version + * 26.5.0.cl. > - This endpoint requires Spotter - please contact ThoughtSpot support to + * enable Spotter on your cluster. + * + * @param createAgentConversationRequest (required) + * @param _callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body + * object + * @http.response.details + * + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 Common successful response -
201 Common error response -
400 Operation failed -
401 Unauthorized access. -
403 Forbidden access. -
500 Operation failed -
+ */ + public okhttp3.Call createAgentConversationAsync( + CreateAgentConversationRequest createAgentConversationRequest, + final ApiCallback _callback) + throws ApiException { + + okhttp3.Call localVarCall = + createAgentConversationValidateBeforeCall( + createAgentConversationRequest, _callback); + Type localVarReturnType = new TypeToken() {}.getType(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; + } + /** + * Build call for createConversation + * + * @param createConversationRequest (required) + * @param _callback Callback for upload/download progress + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + * @http.response.details + * + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 Common successful response -
201 Common error response -
400 Operation failed -
401 Unauthorized access. -
403 Forbidden access. -
500 Operation failed -
+ */ + public okhttp3.Call createConversationCall( + CreateConversationRequest createConversationRequest, final ApiCallback _callback) + throws ApiException { + String basePath = null; + // Operation Servers + String[] localBasePaths = new String[] {}; + + // Determine Base Path to Use + if (localCustomBaseUrl != null) { + basePath = localCustomBaseUrl; + } else if (localBasePaths.length > 0) { + basePath = localBasePaths[localHostIndex]; + } else { + basePath = null; + } + + Object localVarPostBody = createConversationRequest; + + // create path and map variables + String localVarPath = "/api/rest/2.0/ai/conversation/create"; + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + final String[] localVarAccepts = {"application/json"}; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = {"application/json"}; + final String localVarContentType = + localVarApiClient.selectHeaderContentType(localVarContentTypes); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } + + String[] localVarAuthNames = new String[] {"bearerAuth"}; + return localVarApiClient.buildCall( + basePath, + localVarPath, + "POST", + localVarQueryParams, + localVarCollectionQueryParams, + localVarPostBody, + localVarHeaderParams, + localVarCookieParams, + localVarFormParams, + localVarAuthNames, + _callback); + } + + @SuppressWarnings("rawtypes") + private okhttp3.Call createConversationValidateBeforeCall( + CreateConversationRequest createConversationRequest, final ApiCallback _callback) + throws ApiException { + // verify the required parameter 'createConversationRequest' is set + if (createConversationRequest == null) { + throw new ApiException( + "Missing the required parameter 'createConversationRequest' when calling" + + " createConversation(Async)"); + } + + return createConversationCall(createConversationRequest, _callback); + } + + /** + * Version: 10.4.0.cl or later Creates a new conversation session tied to a specific data model + * for AI-driven natural language querying. Requires `CAN_USE_SPOTTER` privilege and + * at least view access to the metadata object specified in the request. #### Usage guidelines + * The request must include: - `metadata_identifier`: the unique ID of the data source + * that provides context for the conversation Optionally, you can provide: - `tokens`: + * a token string to set initial context for the conversation (e.g., `\"[sales],[item + * type],[state]\"`) If the request is successful, ThoughtSpot returns a unique + * `conversation_identifier` that must be passed to `sendMessage` to + * continue the conversation. #### Error responses | Code | Description | |------|-------------| + * | 401 | Unauthorized — authentication token is missing, expired, or invalid. | | 403 | + * Forbidden — the authenticated user does not have `CAN_USE_SPOTTER` privilege or + * lacks view permission on the specified metadata object. | > ###### Note: > * This + * endpoint is currently in Beta. Breaking changes may be introduced before the endpoint is made + * Generally Available. > * This endpoint requires Spotter - please contact ThoughtSpot + * support to enable Spotter on your cluster. + * + * @param createConversationRequest (required) + * @return Conversation + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the + * response body + * @http.response.details + * + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 Common successful response -
201 Common error response -
400 Operation failed -
401 Unauthorized access. -
403 Forbidden access. -
500 Operation failed -
+ */ + public Conversation createConversation(CreateConversationRequest createConversationRequest) + throws ApiException { + ApiResponse localVarResp = + createConversationWithHttpInfo(createConversationRequest); + return localVarResp.getData(); + } + + /** + * Version: 10.4.0.cl or later Creates a new conversation session tied to a specific data model + * for AI-driven natural language querying. Requires `CAN_USE_SPOTTER` privilege and + * at least view access to the metadata object specified in the request. #### Usage guidelines + * The request must include: - `metadata_identifier`: the unique ID of the data source + * that provides context for the conversation Optionally, you can provide: - `tokens`: + * a token string to set initial context for the conversation (e.g., `\"[sales],[item + * type],[state]\"`) If the request is successful, ThoughtSpot returns a unique + * `conversation_identifier` that must be passed to `sendMessage` to + * continue the conversation. #### Error responses | Code | Description | |------|-------------| + * | 401 | Unauthorized — authentication token is missing, expired, or invalid. | | 403 | + * Forbidden — the authenticated user does not have `CAN_USE_SPOTTER` privilege or + * lacks view permission on the specified metadata object. | > ###### Note: > * This + * endpoint is currently in Beta. Breaking changes may be introduced before the endpoint is made + * Generally Available. > * This endpoint requires Spotter - please contact ThoughtSpot + * support to enable Spotter on your cluster. + * + * @param createConversationRequest (required) + * @return ApiResponse<Conversation> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the + * response body + * @http.response.details + * + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 Common successful response -
201 Common error response -
400 Operation failed -
401 Unauthorized access. -
403 Forbidden access. -
500 Operation failed -
+ */ + public ApiResponse createConversationWithHttpInfo( + CreateConversationRequest createConversationRequest) throws ApiException { + okhttp3.Call localVarCall = + createConversationValidateBeforeCall(createConversationRequest, null); + Type localVarReturnType = new TypeToken() {}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); + } + + /** + * (asynchronously) Version: 10.4.0.cl or later Creates a new conversation session tied to a + * specific data model for AI-driven natural language querying. Requires + * `CAN_USE_SPOTTER` privilege and at least view access to the metadata object + * specified in the request. #### Usage guidelines The request must include: - + * `metadata_identifier`: the unique ID of the data source that provides context for + * the conversation Optionally, you can provide: - `tokens`: a token string to set + * initial context for the conversation (e.g., `\"[sales],[item + * type],[state]\"`) If the request is successful, ThoughtSpot returns a unique + * `conversation_identifier` that must be passed to `sendMessage` to + * continue the conversation. #### Error responses | Code | Description | |------|-------------| + * | 401 | Unauthorized — authentication token is missing, expired, or invalid. | | 403 | + * Forbidden — the authenticated user does not have `CAN_USE_SPOTTER` privilege or + * lacks view permission on the specified metadata object. | > ###### Note: > * This + * endpoint is currently in Beta. Breaking changes may be introduced before the endpoint is made + * Generally Available. > * This endpoint requires Spotter - please contact ThoughtSpot + * support to enable Spotter on your cluster. + * + * @param createConversationRequest (required) + * @param _callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body + * object + * @http.response.details + * + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 Common successful response -
201 Common error response -
400 Operation failed -
401 Unauthorized access. -
403 Forbidden access. -
500 Operation failed -
+ */ + public okhttp3.Call createConversationAsync( + CreateConversationRequest createConversationRequest, + final ApiCallback _callback) + throws ApiException { + + okhttp3.Call localVarCall = + createConversationValidateBeforeCall(createConversationRequest, _callback); + Type localVarReturnType = new TypeToken() {}.getType(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; + } + /** + * Build call for getDataSourceSuggestions + * + * @param getDataSourceSuggestionsRequest (required) + * @param _callback Callback for upload/download progress + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + * @http.response.details + * + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 Common successful response -
201 Common error response -
400 Operation failed -
401 Unauthorized access. -
403 Forbidden access. -
500 Operation failed -
+ */ + public okhttp3.Call getDataSourceSuggestionsCall( + GetDataSourceSuggestionsRequest getDataSourceSuggestionsRequest, + final ApiCallback _callback) + throws ApiException { + String basePath = null; + // Operation Servers + String[] localBasePaths = new String[] {}; + + // Determine Base Path to Use + if (localCustomBaseUrl != null) { + basePath = localCustomBaseUrl; + } else if (localBasePaths.length > 0) { + basePath = localBasePaths[localHostIndex]; + } else { + basePath = null; + } + + Object localVarPostBody = getDataSourceSuggestionsRequest; + + // create path and map variables + String localVarPath = "/api/rest/2.0/ai/data-source-suggestions"; + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + final String[] localVarAccepts = {"application/json"}; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = {"application/json"}; + final String localVarContentType = + localVarApiClient.selectHeaderContentType(localVarContentTypes); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } + + String[] localVarAuthNames = new String[] {"bearerAuth"}; + return localVarApiClient.buildCall( + basePath, + localVarPath, + "POST", + localVarQueryParams, + localVarCollectionQueryParams, + localVarPostBody, + localVarHeaderParams, + localVarCookieParams, + localVarFormParams, + localVarAuthNames, + _callback); + } + + @SuppressWarnings("rawtypes") + private okhttp3.Call getDataSourceSuggestionsValidateBeforeCall( + GetDataSourceSuggestionsRequest getDataSourceSuggestionsRequest, + final ApiCallback _callback) + throws ApiException { + // verify the required parameter 'getDataSourceSuggestionsRequest' is set + if (getDataSourceSuggestionsRequest == null) { + throw new ApiException( + "Missing the required parameter 'getDataSourceSuggestionsRequest' when calling" + + " getDataSourceSuggestions(Async)"); + } + + return getDataSourceSuggestionsCall(getDataSourceSuggestionsRequest, _callback); + } + + /** + * Version: 10.15.0.cl or later Suggests the most relevant data sources for a given natural + * language query, ranked by confidence with LLM-generated reasoning. Requires + * `CAN_USE_SPOTTER` privilege and at least view-level access to the underlying + * metadata entities referenced in the response. #### Usage guidelines The request must include: + * - `query`: the natural language question to find relevant data sources for If the + * request is successful, the API returns a ranked list of suggested data sources, each + * containing: - `confidence`: a float score indicating the model's confidence in + * the relevance of the suggestion - `details`: metadata about the data source - + * `data_source_identifier`: the unique ID of the data source - + * `data_source_name`: the display name of the data source - `description`: + * a description of the data source - `reasoning`: LLM-generated rationale explaining + * why the data source was recommended #### Error responses | Code | Description | + * |------|--------------------------------------------------------------------------------------------------------------------------------------------| + * | 401 | Unauthorized — authentication token is missing, expired, or invalid. | | 403 | + * Forbidden — the authenticated user does not have `CAN_USE_SPOTTER` privilege or + * lacks view permission on the underlying metadata entities. | > ###### Note: > * This + * endpoint is currently in Beta. Breaking changes may be introduced before it is made Generally + * Available. > * This endpoint requires Spotter — please contact ThoughtSpot Support to + * enable Spotter on your cluster. + * + * @param getDataSourceSuggestionsRequest (required) + * @return EurekaDataSourceSuggestionResponse + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the + * response body + * @http.response.details + * + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 Common successful response -
201 Common error response -
400 Operation failed -
401 Unauthorized access. -
403 Forbidden access. -
500 Operation failed -
+ */ + public EurekaDataSourceSuggestionResponse getDataSourceSuggestions( + GetDataSourceSuggestionsRequest getDataSourceSuggestionsRequest) throws ApiException { + ApiResponse localVarResp = + getDataSourceSuggestionsWithHttpInfo(getDataSourceSuggestionsRequest); + return localVarResp.getData(); + } + + /** + * Version: 10.15.0.cl or later Suggests the most relevant data sources for a given natural + * language query, ranked by confidence with LLM-generated reasoning. Requires + * `CAN_USE_SPOTTER` privilege and at least view-level access to the underlying + * metadata entities referenced in the response. #### Usage guidelines The request must include: + * - `query`: the natural language question to find relevant data sources for If the + * request is successful, the API returns a ranked list of suggested data sources, each + * containing: - `confidence`: a float score indicating the model's confidence in + * the relevance of the suggestion - `details`: metadata about the data source - + * `data_source_identifier`: the unique ID of the data source - + * `data_source_name`: the display name of the data source - `description`: + * a description of the data source - `reasoning`: LLM-generated rationale explaining + * why the data source was recommended #### Error responses | Code | Description | + * |------|--------------------------------------------------------------------------------------------------------------------------------------------| + * | 401 | Unauthorized — authentication token is missing, expired, or invalid. | | 403 | + * Forbidden — the authenticated user does not have `CAN_USE_SPOTTER` privilege or + * lacks view permission on the underlying metadata entities. | > ###### Note: > * This + * endpoint is currently in Beta. Breaking changes may be introduced before it is made Generally + * Available. > * This endpoint requires Spotter — please contact ThoughtSpot Support to + * enable Spotter on your cluster. + * + * @param getDataSourceSuggestionsRequest (required) + * @return ApiResponse<EurekaDataSourceSuggestionResponse> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the + * response body + * @http.response.details + * + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 Common successful response -
201 Common error response -
400 Operation failed -
401 Unauthorized access. -
403 Forbidden access. -
500 Operation failed -
+ */ + public ApiResponse getDataSourceSuggestionsWithHttpInfo( + GetDataSourceSuggestionsRequest getDataSourceSuggestionsRequest) throws ApiException { + okhttp3.Call localVarCall = + getDataSourceSuggestionsValidateBeforeCall(getDataSourceSuggestionsRequest, null); + Type localVarReturnType = new TypeToken() {}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); + } + + /** + * (asynchronously) Version: 10.15.0.cl or later Suggests the most relevant data sources for a + * given natural language query, ranked by confidence with LLM-generated reasoning. Requires + * `CAN_USE_SPOTTER` privilege and at least view-level access to the underlying + * metadata entities referenced in the response. #### Usage guidelines The request must include: + * - `query`: the natural language question to find relevant data sources for If the + * request is successful, the API returns a ranked list of suggested data sources, each + * containing: - `confidence`: a float score indicating the model's confidence in + * the relevance of the suggestion - `details`: metadata about the data source - + * `data_source_identifier`: the unique ID of the data source - + * `data_source_name`: the display name of the data source - `description`: + * a description of the data source - `reasoning`: LLM-generated rationale explaining + * why the data source was recommended #### Error responses | Code | Description | + * |------|--------------------------------------------------------------------------------------------------------------------------------------------| + * | 401 | Unauthorized — authentication token is missing, expired, or invalid. | | 403 | + * Forbidden — the authenticated user does not have `CAN_USE_SPOTTER` privilege or + * lacks view permission on the underlying metadata entities. | > ###### Note: > * This + * endpoint is currently in Beta. Breaking changes may be introduced before it is made Generally + * Available. > * This endpoint requires Spotter — please contact ThoughtSpot Support to + * enable Spotter on your cluster. + * + * @param getDataSourceSuggestionsRequest (required) + * @param _callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body + * object + * @http.response.details + * + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 Common successful response -
201 Common error response -
400 Operation failed -
401 Unauthorized access. -
403 Forbidden access. -
500 Operation failed -
+ */ + public okhttp3.Call getDataSourceSuggestionsAsync( + GetDataSourceSuggestionsRequest getDataSourceSuggestionsRequest, + final ApiCallback _callback) + throws ApiException { + + okhttp3.Call localVarCall = + getDataSourceSuggestionsValidateBeforeCall( + getDataSourceSuggestionsRequest, _callback); + Type localVarReturnType = new TypeToken() {}.getType(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; + } + /** + * Build call for getNLInstructions + * + * @param getNLInstructionsRequest (required) + * @param _callback Callback for upload/download progress + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + * @http.response.details + * + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 Common successful response -
201 Common error response -
400 Operation failed -
401 Unauthorized access. -
403 Forbidden access. -
500 Operation failed -
+ */ + public okhttp3.Call getNLInstructionsCall( + GetNLInstructionsRequest getNLInstructionsRequest, final ApiCallback _callback) + throws ApiException { + String basePath = null; + // Operation Servers + String[] localBasePaths = new String[] {}; + + // Determine Base Path to Use + if (localCustomBaseUrl != null) { + basePath = localCustomBaseUrl; + } else if (localBasePaths.length > 0) { + basePath = localBasePaths[localHostIndex]; + } else { + basePath = null; + } + + Object localVarPostBody = getNLInstructionsRequest; + + // create path and map variables + String localVarPath = "/api/rest/2.0/ai/instructions/get"; + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + final String[] localVarAccepts = {"application/json"}; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = {"application/json"}; + final String localVarContentType = + localVarApiClient.selectHeaderContentType(localVarContentTypes); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } + + String[] localVarAuthNames = new String[] {"bearerAuth"}; + return localVarApiClient.buildCall( + basePath, + localVarPath, + "POST", + localVarQueryParams, + localVarCollectionQueryParams, + localVarPostBody, + localVarHeaderParams, + localVarCookieParams, + localVarFormParams, + localVarAuthNames, + _callback); + } + + @SuppressWarnings("rawtypes") + private okhttp3.Call getNLInstructionsValidateBeforeCall( + GetNLInstructionsRequest getNLInstructionsRequest, final ApiCallback _callback) + throws ApiException { + // verify the required parameter 'getNLInstructionsRequest' is set + if (getNLInstructionsRequest == null) { + throw new ApiException( + "Missing the required parameter 'getNLInstructionsRequest' when calling" + + " getNLInstructions(Async)"); + } + + return getNLInstructionsCall(getNLInstructionsRequest, _callback); + } + + /** + * Version: 10.15.0.cl or later Retrieves existing natural language (NL) instructions configured + * for a specific data model. These instructions guide the AI system in understanding data + * context and generating more accurate responses. Requires `CAN_USE_SPOTTER` + * privilege, at least view access on the data model, and a bearer token corresponding to the + * org where the data model exists. #### Usage guidelines The request must include: - + * `data_source_identifier`: the unique ID of the data model to retrieve instructions + * for If the request is successful, the API returns: - `nl_instructions_info`: an + * array of instruction objects, each containing: - `instructions`: the configured + * text instructions for AI processing - `scope`: the scope of the instruction — + * currently only `GLOBAL` is supported #### Instructions scope - **GLOBAL**: + * Instructions that apply globally across the system on the given data-model (currently only + * global instructions are supported) #### Error responses | Code | Description | + * |------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| + * | 401 | Unauthorized — authentication token is missing, expired, or invalid. | | 403 | + * Forbidden — the authenticated user does not have `CAN_USE_SPOTTER` privilege, lacks + * view access on the data model, or the bearer token does not correspond to the org where the + * data model exists. | > ###### Note: > > - To use this API, the user needs at least + * view access on the data model, and must use the bearer token corresponding to the org where + * the data model exists. > - This endpoint is currently in Beta. Breaking changes may be + * introduced before the endpoint is made Generally Available. > - Available from version + * 10.15.0.cl and later. > - This endpoint requires Spotter — please contact ThoughtSpot + * Support to enable Spotter on your cluster. > - Use this API to review currently configured + * instructions before modifying them with `setNLInstructions`. + * + * @param getNLInstructionsRequest (required) + * @return EurekaGetNLInstructionsResponse + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the + * response body + * @http.response.details + * + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 Common successful response -
201 Common error response -
400 Operation failed -
401 Unauthorized access. -
403 Forbidden access. -
500 Operation failed -
+ */ + public EurekaGetNLInstructionsResponse getNLInstructions( + GetNLInstructionsRequest getNLInstructionsRequest) throws ApiException { + ApiResponse localVarResp = + getNLInstructionsWithHttpInfo(getNLInstructionsRequest); + return localVarResp.getData(); + } + + /** + * Version: 10.15.0.cl or later Retrieves existing natural language (NL) instructions configured + * for a specific data model. These instructions guide the AI system in understanding data + * context and generating more accurate responses. Requires `CAN_USE_SPOTTER` + * privilege, at least view access on the data model, and a bearer token corresponding to the + * org where the data model exists. #### Usage guidelines The request must include: - + * `data_source_identifier`: the unique ID of the data model to retrieve instructions + * for If the request is successful, the API returns: - `nl_instructions_info`: an + * array of instruction objects, each containing: - `instructions`: the configured + * text instructions for AI processing - `scope`: the scope of the instruction — + * currently only `GLOBAL` is supported #### Instructions scope - **GLOBAL**: + * Instructions that apply globally across the system on the given data-model (currently only + * global instructions are supported) #### Error responses | Code | Description | + * |------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| + * | 401 | Unauthorized — authentication token is missing, expired, or invalid. | | 403 | + * Forbidden — the authenticated user does not have `CAN_USE_SPOTTER` privilege, lacks + * view access on the data model, or the bearer token does not correspond to the org where the + * data model exists. | > ###### Note: > > - To use this API, the user needs at least + * view access on the data model, and must use the bearer token corresponding to the org where + * the data model exists. > - This endpoint is currently in Beta. Breaking changes may be + * introduced before the endpoint is made Generally Available. > - Available from version + * 10.15.0.cl and later. > - This endpoint requires Spotter — please contact ThoughtSpot + * Support to enable Spotter on your cluster. > - Use this API to review currently configured + * instructions before modifying them with `setNLInstructions`. + * + * @param getNLInstructionsRequest (required) + * @return ApiResponse<EurekaGetNLInstructionsResponse> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the + * response body + * @http.response.details + * + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 Common successful response -
201 Common error response -
400 Operation failed -
401 Unauthorized access. -
403 Forbidden access. -
500 Operation failed -
+ */ + public ApiResponse getNLInstructionsWithHttpInfo( + GetNLInstructionsRequest getNLInstructionsRequest) throws ApiException { + okhttp3.Call localVarCall = + getNLInstructionsValidateBeforeCall(getNLInstructionsRequest, null); + Type localVarReturnType = new TypeToken() {}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); + } + + /** + * (asynchronously) Version: 10.15.0.cl or later Retrieves existing natural language (NL) + * instructions configured for a specific data model. These instructions guide the AI system in + * understanding data context and generating more accurate responses. Requires + * `CAN_USE_SPOTTER` privilege, at least view access on the data model, and a bearer + * token corresponding to the org where the data model exists. #### Usage guidelines The request + * must include: - `data_source_identifier`: the unique ID of the data model to + * retrieve instructions for If the request is successful, the API returns: - + * `nl_instructions_info`: an array of instruction objects, each containing: - + * `instructions`: the configured text instructions for AI processing - + * `scope`: the scope of the instruction — currently only `GLOBAL` is + * supported #### Instructions scope - **GLOBAL**: Instructions that apply globally across the + * system on the given data-model (currently only global instructions are supported) #### Error + * responses | Code | Description | + * |------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| + * | 401 | Unauthorized — authentication token is missing, expired, or invalid. | | 403 | + * Forbidden — the authenticated user does not have `CAN_USE_SPOTTER` privilege, lacks + * view access on the data model, or the bearer token does not correspond to the org where the + * data model exists. | > ###### Note: > > - To use this API, the user needs at least + * view access on the data model, and must use the bearer token corresponding to the org where + * the data model exists. > - This endpoint is currently in Beta. Breaking changes may be + * introduced before the endpoint is made Generally Available. > - Available from version + * 10.15.0.cl and later. > - This endpoint requires Spotter — please contact ThoughtSpot + * Support to enable Spotter on your cluster. > - Use this API to review currently configured + * instructions before modifying them with `setNLInstructions`. + * + * @param getNLInstructionsRequest (required) + * @param _callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body + * object + * @http.response.details + * + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 Common successful response -
201 Common error response -
400 Operation failed -
401 Unauthorized access. -
403 Forbidden access. -
500 Operation failed -
+ */ + public okhttp3.Call getNLInstructionsAsync( + GetNLInstructionsRequest getNLInstructionsRequest, + final ApiCallback _callback) + throws ApiException { + + okhttp3.Call localVarCall = + getNLInstructionsValidateBeforeCall(getNLInstructionsRequest, _callback); + Type localVarReturnType = new TypeToken() {}.getType(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; + } + /** + * Build call for getRelevantQuestions + * + * @param getRelevantQuestionsRequest (required) + * @param _callback Callback for upload/download progress + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + * @http.response.details + * + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 Common successful response -
201 Common error response -
400 Operation failed -
401 Unauthorized access. -
403 Forbidden access. -
500 Operation failed -
+ */ + public okhttp3.Call getRelevantQuestionsCall( + GetRelevantQuestionsRequest getRelevantQuestionsRequest, final ApiCallback _callback) + throws ApiException { + String basePath = null; + // Operation Servers + String[] localBasePaths = new String[] {}; + + // Determine Base Path to Use + if (localCustomBaseUrl != null) { + basePath = localCustomBaseUrl; + } else if (localBasePaths.length > 0) { + basePath = localBasePaths[localHostIndex]; + } else { + basePath = null; + } + + Object localVarPostBody = getRelevantQuestionsRequest; + + // create path and map variables + String localVarPath = "/api/rest/2.0/ai/relevant-questions/"; + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + final String[] localVarAccepts = {"application/json"}; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = {"application/json"}; + final String localVarContentType = + localVarApiClient.selectHeaderContentType(localVarContentTypes); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } + + String[] localVarAuthNames = new String[] {"bearerAuth"}; + return localVarApiClient.buildCall( + basePath, + localVarPath, + "POST", + localVarQueryParams, + localVarCollectionQueryParams, + localVarPostBody, + localVarHeaderParams, + localVarCookieParams, + localVarFormParams, + localVarAuthNames, + _callback); + } + + @SuppressWarnings("rawtypes") + private okhttp3.Call getRelevantQuestionsValidateBeforeCall( + GetRelevantQuestionsRequest getRelevantQuestionsRequest, final ApiCallback _callback) + throws ApiException { + // verify the required parameter 'getRelevantQuestionsRequest' is set + if (getRelevantQuestionsRequest == null) { + throw new ApiException( + "Missing the required parameter 'getRelevantQuestionsRequest' when calling" + + " getRelevantQuestions(Async)"); + } + + return getRelevantQuestionsCall(getRelevantQuestionsRequest, _callback); + } + + /** + * Version: 10.13.0.cl or later Breaks down a natural language query into a series of smaller + * analytical sub-questions, each mapped to a relevant data source. Requires + * `CAN_USE_SPOTTER` privilege and at least view-level access to the referenced + * metadata objects. #### Usage guidelines The request must include: - `query`: the + * natural language question to decompose into analytical sub-questions - + * `metadata_context`: at least one of the following context identifiers to guide + * question generation: - `conversation_identifier` — an existing conversation session + * ID - `answer_identifiers` — a list of Answer GUIDs - + * `liveboard_identifiers` — a list of Liveboard GUIDs - + * `data_source_identifiers` — a list of data source GUIDs Optional parameters for + * refining the output: - `ai_context`: additional context to improve response quality + * - `content` — supplementary text or CSV data as string input - + * `instructions` — custom text instructions for the AI system - + * `limit_relevant_questions`: maximum number of questions to return (default: + * `5`) - `bypass_cache`: if `true`, forces fresh computation + * instead of returning cached results If the request is successful, the API returns a list of + * relevant analytical questions, each containing: - `query`: the generated + * sub-question - `data_source_identifier`: the unique ID of the data source the + * question targets - `data_source_name`: the display name of the corresponding data + * source #### Error responses | Code | Description | + * |------|---------------------------------------------------------------------------------------------------------------------------------------| + * | 401 | Unauthorized — authentication token is missing, expired, or invalid. | | 403 | + * Forbidden — the authenticated user does not have `CAN_USE_SPOTTER` privilege or + * lacks view access to the referenced metadata objects. | > ###### Note: > * This + * endpoint is currently in Beta. Breaking changes may be introduced before the endpoint is made + * Generally Available. > * This endpoint requires Spotter - please contact ThoughtSpot + * support to enable Spotter on your cluster. + * + * @param getRelevantQuestionsRequest (required) + * @return EurekaGetRelevantQuestionsResponse + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the + * response body + * @http.response.details + * + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 Common successful response -
201 Common error response -
400 Operation failed -
401 Unauthorized access. -
403 Forbidden access. -
500 Operation failed -
+ */ + public EurekaGetRelevantQuestionsResponse getRelevantQuestions( + GetRelevantQuestionsRequest getRelevantQuestionsRequest) throws ApiException { + ApiResponse localVarResp = + getRelevantQuestionsWithHttpInfo(getRelevantQuestionsRequest); + return localVarResp.getData(); + } + + /** + * Version: 10.13.0.cl or later Breaks down a natural language query into a series of smaller + * analytical sub-questions, each mapped to a relevant data source. Requires + * `CAN_USE_SPOTTER` privilege and at least view-level access to the referenced + * metadata objects. #### Usage guidelines The request must include: - `query`: the + * natural language question to decompose into analytical sub-questions - + * `metadata_context`: at least one of the following context identifiers to guide + * question generation: - `conversation_identifier` — an existing conversation session + * ID - `answer_identifiers` — a list of Answer GUIDs - + * `liveboard_identifiers` — a list of Liveboard GUIDs - + * `data_source_identifiers` — a list of data source GUIDs Optional parameters for + * refining the output: - `ai_context`: additional context to improve response quality + * - `content` — supplementary text or CSV data as string input - + * `instructions` — custom text instructions for the AI system - + * `limit_relevant_questions`: maximum number of questions to return (default: + * `5`) - `bypass_cache`: if `true`, forces fresh computation + * instead of returning cached results If the request is successful, the API returns a list of + * relevant analytical questions, each containing: - `query`: the generated + * sub-question - `data_source_identifier`: the unique ID of the data source the + * question targets - `data_source_name`: the display name of the corresponding data + * source #### Error responses | Code | Description | + * |------|---------------------------------------------------------------------------------------------------------------------------------------| + * | 401 | Unauthorized — authentication token is missing, expired, or invalid. | | 403 | + * Forbidden — the authenticated user does not have `CAN_USE_SPOTTER` privilege or + * lacks view access to the referenced metadata objects. | > ###### Note: > * This + * endpoint is currently in Beta. Breaking changes may be introduced before the endpoint is made + * Generally Available. > * This endpoint requires Spotter - please contact ThoughtSpot + * support to enable Spotter on your cluster. + * + * @param getRelevantQuestionsRequest (required) + * @return ApiResponse<EurekaGetRelevantQuestionsResponse> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the + * response body + * @http.response.details + * + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 Common successful response -
201 Common error response -
400 Operation failed -
401 Unauthorized access. -
403 Forbidden access. -
500 Operation failed -
+ */ + public ApiResponse getRelevantQuestionsWithHttpInfo( + GetRelevantQuestionsRequest getRelevantQuestionsRequest) throws ApiException { + okhttp3.Call localVarCall = + getRelevantQuestionsValidateBeforeCall(getRelevantQuestionsRequest, null); + Type localVarReturnType = new TypeToken() {}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); + } + + /** + * (asynchronously) Version: 10.13.0.cl or later Breaks down a natural language query into a + * series of smaller analytical sub-questions, each mapped to a relevant data source. Requires + * `CAN_USE_SPOTTER` privilege and at least view-level access to the referenced + * metadata objects. #### Usage guidelines The request must include: - `query`: the + * natural language question to decompose into analytical sub-questions - + * `metadata_context`: at least one of the following context identifiers to guide + * question generation: - `conversation_identifier` — an existing conversation session + * ID - `answer_identifiers` — a list of Answer GUIDs - + * `liveboard_identifiers` — a list of Liveboard GUIDs - + * `data_source_identifiers` — a list of data source GUIDs Optional parameters for + * refining the output: - `ai_context`: additional context to improve response quality + * - `content` — supplementary text or CSV data as string input - + * `instructions` — custom text instructions for the AI system - + * `limit_relevant_questions`: maximum number of questions to return (default: + * `5`) - `bypass_cache`: if `true`, forces fresh computation + * instead of returning cached results If the request is successful, the API returns a list of + * relevant analytical questions, each containing: - `query`: the generated + * sub-question - `data_source_identifier`: the unique ID of the data source the + * question targets - `data_source_name`: the display name of the corresponding data + * source #### Error responses | Code | Description | + * |------|---------------------------------------------------------------------------------------------------------------------------------------| + * | 401 | Unauthorized — authentication token is missing, expired, or invalid. | | 403 | + * Forbidden — the authenticated user does not have `CAN_USE_SPOTTER` privilege or + * lacks view access to the referenced metadata objects. | > ###### Note: > * This + * endpoint is currently in Beta. Breaking changes may be introduced before the endpoint is made + * Generally Available. > * This endpoint requires Spotter - please contact ThoughtSpot + * support to enable Spotter on your cluster. + * + * @param getRelevantQuestionsRequest (required) + * @param _callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body + * object + * @http.response.details + * + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 Common successful response -
201 Common error response -
400 Operation failed -
401 Unauthorized access. -
403 Forbidden access. -
500 Operation failed -
+ */ + public okhttp3.Call getRelevantQuestionsAsync( + GetRelevantQuestionsRequest getRelevantQuestionsRequest, + final ApiCallback _callback) + throws ApiException { + + okhttp3.Call localVarCall = + getRelevantQuestionsValidateBeforeCall(getRelevantQuestionsRequest, _callback); + Type localVarReturnType = new TypeToken() {}.getType(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; + } + /** + * Build call for queryGetDecomposedQuery + * + * @param queryGetDecomposedQueryRequest (required) + * @param _callback Callback for upload/download progress + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + * @http.response.details + * + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 Common successful response -
201 Common error response -
400 Operation failed -
401 Unauthorized access. -
403 Forbidden access. -
500 Operation failed -
+ * + * @deprecated + */ + @Deprecated + public okhttp3.Call queryGetDecomposedQueryCall( + QueryGetDecomposedQueryRequest queryGetDecomposedQueryRequest, + final ApiCallback _callback) + throws ApiException { + String basePath = null; + // Operation Servers + String[] localBasePaths = new String[] {}; + + // Determine Base Path to Use + if (localCustomBaseUrl != null) { + basePath = localCustomBaseUrl; + } else if (localBasePaths.length > 0) { + basePath = localBasePaths[localHostIndex]; + } else { + basePath = null; + } + + Object localVarPostBody = queryGetDecomposedQueryRequest; + + // create path and map variables + String localVarPath = "/api/rest/2.0/ai/analytical-questions"; + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + final String[] localVarAccepts = {"application/json"}; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = {"application/json"}; + final String localVarContentType = + localVarApiClient.selectHeaderContentType(localVarContentTypes); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } + + String[] localVarAuthNames = new String[] {"bearerAuth"}; + return localVarApiClient.buildCall( + basePath, + localVarPath, + "POST", + localVarQueryParams, + localVarCollectionQueryParams, + localVarPostBody, + localVarHeaderParams, + localVarCookieParams, + localVarFormParams, + localVarAuthNames, + _callback); + } + + @Deprecated + @SuppressWarnings("rawtypes") + private okhttp3.Call queryGetDecomposedQueryValidateBeforeCall( + QueryGetDecomposedQueryRequest queryGetDecomposedQueryRequest, + final ApiCallback _callback) + throws ApiException { + // verify the required parameter 'queryGetDecomposedQueryRequest' is set + if (queryGetDecomposedQueryRequest == null) { + throw new ApiException( + "Missing the required parameter 'queryGetDecomposedQueryRequest' when calling" + + " queryGetDecomposedQuery(Async)"); + } + + return queryGetDecomposedQueryCall(queryGetDecomposedQueryRequest, _callback); + } + + /** + * Version: 10.7.0.cl or later **Deprecated** — Use `getRelevantQuestions` instead + * (available from 10.13.0.cl). Breaks down a topical or goal-oriented natural language question + * into smaller, actionable analytical sub-questions, each mapped to a relevant data source for + * independent execution. Requires `CAN_USE_SPOTTER` privilege and at least view-level + * access to the referenced metadata objects. #### Usage guidelines The request accepts the + * following parameters: - `nlsRequest`: contains the user `query` to + * decompose, along with optional `instructions` and `bypassCache` flag - + * `worksheetIds`: list of data source identifiers to scope the decomposition - + * `answerIds`: list of Answer GUIDs whose data guides the response - + * `liveboardIds`: list of Liveboard GUIDs whose data guides the response - + * `conversationId`: an existing conversation session ID for context continuity - + * `content`: supplementary text or CSV data to improve response quality - + * `maxDecomposedQueries`: maximum number of sub-questions to return (default: + * `5`) If the request is successful, the API returns a + * `decomposedQueryResponse` containing a list of `decomposedQueries`, each + * with: - `query`: the generated analytical sub-question - `worksheetId`: + * the unique ID of the data source the question targets - `worksheetName`: the + * display name of the corresponding data source #### Error responses | Code | Description | + * |------|---------------------------------------------------------------------------------------------------------------------------------------| + * | 401 | Unauthorized — authentication token is missing, expired, or invalid. | | 403 | + * Forbidden — the authenticated user does not have `CAN_USE_SPOTTER` privilege or + * lacks view access to the referenced metadata objects. | > ###### Note: > * This + * endpoint is deprecated since 10.13.0.cl. Use `getRelevantQuestions` for new + * integrations. > * This endpoint is currently in Beta. Breaking changes may be introduced + * before the endpoint is made Generally Available. > * This endpoint requires Spotter — + * please contact ThoughtSpot support to enable Spotter on your cluster. + * + * @param queryGetDecomposedQueryRequest (required) + * @return EurekaDecomposeQueryResponse + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the + * response body + * @http.response.details + * + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 Common successful response -
201 Common error response -
400 Operation failed -
401 Unauthorized access. -
403 Forbidden access. -
500 Operation failed -
+ * + * @deprecated + */ + @Deprecated + public EurekaDecomposeQueryResponse queryGetDecomposedQuery( + QueryGetDecomposedQueryRequest queryGetDecomposedQueryRequest) throws ApiException { + ApiResponse localVarResp = + queryGetDecomposedQueryWithHttpInfo(queryGetDecomposedQueryRequest); + return localVarResp.getData(); + } + + /** + * Version: 10.7.0.cl or later **Deprecated** — Use `getRelevantQuestions` instead + * (available from 10.13.0.cl). Breaks down a topical or goal-oriented natural language question + * into smaller, actionable analytical sub-questions, each mapped to a relevant data source for + * independent execution. Requires `CAN_USE_SPOTTER` privilege and at least view-level + * access to the referenced metadata objects. #### Usage guidelines The request accepts the + * following parameters: - `nlsRequest`: contains the user `query` to + * decompose, along with optional `instructions` and `bypassCache` flag - + * `worksheetIds`: list of data source identifiers to scope the decomposition - + * `answerIds`: list of Answer GUIDs whose data guides the response - + * `liveboardIds`: list of Liveboard GUIDs whose data guides the response - + * `conversationId`: an existing conversation session ID for context continuity - + * `content`: supplementary text or CSV data to improve response quality - + * `maxDecomposedQueries`: maximum number of sub-questions to return (default: + * `5`) If the request is successful, the API returns a + * `decomposedQueryResponse` containing a list of `decomposedQueries`, each + * with: - `query`: the generated analytical sub-question - `worksheetId`: + * the unique ID of the data source the question targets - `worksheetName`: the + * display name of the corresponding data source #### Error responses | Code | Description | + * |------|---------------------------------------------------------------------------------------------------------------------------------------| + * | 401 | Unauthorized — authentication token is missing, expired, or invalid. | | 403 | + * Forbidden — the authenticated user does not have `CAN_USE_SPOTTER` privilege or + * lacks view access to the referenced metadata objects. | > ###### Note: > * This + * endpoint is deprecated since 10.13.0.cl. Use `getRelevantQuestions` for new + * integrations. > * This endpoint is currently in Beta. Breaking changes may be introduced + * before the endpoint is made Generally Available. > * This endpoint requires Spotter — + * please contact ThoughtSpot support to enable Spotter on your cluster. + * + * @param queryGetDecomposedQueryRequest (required) + * @return ApiResponse<EurekaDecomposeQueryResponse> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the + * response body + * @http.response.details + * + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 Common successful response -
201 Common error response -
400 Operation failed -
401 Unauthorized access. -
403 Forbidden access. -
500 Operation failed -
+ * + * @deprecated + */ + @Deprecated + public ApiResponse queryGetDecomposedQueryWithHttpInfo( + QueryGetDecomposedQueryRequest queryGetDecomposedQueryRequest) throws ApiException { + okhttp3.Call localVarCall = + queryGetDecomposedQueryValidateBeforeCall(queryGetDecomposedQueryRequest, null); + Type localVarReturnType = new TypeToken() {}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); + } + + /** + * (asynchronously) Version: 10.7.0.cl or later **Deprecated** — Use + * `getRelevantQuestions` instead (available from 10.13.0.cl). Breaks down a topical + * or goal-oriented natural language question into smaller, actionable analytical sub-questions, + * each mapped to a relevant data source for independent execution. Requires + * `CAN_USE_SPOTTER` privilege and at least view-level access to the referenced + * metadata objects. #### Usage guidelines The request accepts the following parameters: - + * `nlsRequest`: contains the user `query` to decompose, along with optional + * `instructions` and `bypassCache` flag - `worksheetIds`: list of + * data source identifiers to scope the decomposition - `answerIds`: list of Answer + * GUIDs whose data guides the response - `liveboardIds`: list of Liveboard GUIDs + * whose data guides the response - `conversationId`: an existing conversation session + * ID for context continuity - `content`: supplementary text or CSV data to improve + * response quality - `maxDecomposedQueries`: maximum number of sub-questions to + * return (default: `5`) If the request is successful, the API returns a + * `decomposedQueryResponse` containing a list of `decomposedQueries`, each + * with: - `query`: the generated analytical sub-question - `worksheetId`: + * the unique ID of the data source the question targets - `worksheetName`: the + * display name of the corresponding data source #### Error responses | Code | Description | + * |------|---------------------------------------------------------------------------------------------------------------------------------------| + * | 401 | Unauthorized — authentication token is missing, expired, or invalid. | | 403 | + * Forbidden — the authenticated user does not have `CAN_USE_SPOTTER` privilege or + * lacks view access to the referenced metadata objects. | > ###### Note: > * This + * endpoint is deprecated since 10.13.0.cl. Use `getRelevantQuestions` for new + * integrations. > * This endpoint is currently in Beta. Breaking changes may be introduced + * before the endpoint is made Generally Available. > * This endpoint requires Spotter — + * please contact ThoughtSpot support to enable Spotter on your cluster. + * + * @param queryGetDecomposedQueryRequest (required) + * @param _callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body + * object + * @http.response.details + * + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 Common successful response -
201 Common error response -
400 Operation failed -
401 Unauthorized access. -
403 Forbidden access. -
500 Operation failed -
+ * + * @deprecated + */ + @Deprecated + public okhttp3.Call queryGetDecomposedQueryAsync( + QueryGetDecomposedQueryRequest queryGetDecomposedQueryRequest, + final ApiCallback _callback) + throws ApiException { + + okhttp3.Call localVarCall = + queryGetDecomposedQueryValidateBeforeCall( + queryGetDecomposedQueryRequest, _callback); + Type localVarReturnType = new TypeToken() {}.getType(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; + } + /** + * Build call for sendAgentConversationMessage + * + * @param conversationIdentifier Unique identifier for the conversation (used to track context) + * (required) + * @param sendAgentConversationMessageRequest (required) + * @param _callback Callback for upload/download progress + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + * @http.response.details + * + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 Common successful response -
201 Common error response -
400 Operation failed -
401 Unauthorized access. -
403 Forbidden access. -
500 Operation failed -
+ */ + public okhttp3.Call sendAgentConversationMessageCall( + String conversationIdentifier, + SendAgentConversationMessageRequest sendAgentConversationMessageRequest, + final ApiCallback _callback) + throws ApiException { + String basePath = null; + // Operation Servers + String[] localBasePaths = new String[] {}; + + // Determine Base Path to Use + if (localCustomBaseUrl != null) { + basePath = localCustomBaseUrl; + } else if (localBasePaths.length > 0) { + basePath = localBasePaths[localHostIndex]; + } else { + basePath = null; + } + + Object localVarPostBody = sendAgentConversationMessageRequest; + + // create path and map variables + String localVarPath = + "/api/rest/2.0/ai/agent/conversation/{conversation_identifier}/send" + .replace( + "{" + "conversation_identifier" + "}", + localVarApiClient.escapeString(conversationIdentifier.toString())); + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + final String[] localVarAccepts = {"application/json"}; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = {"application/json"}; + final String localVarContentType = + localVarApiClient.selectHeaderContentType(localVarContentTypes); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } + + String[] localVarAuthNames = new String[] {"bearerAuth"}; + return localVarApiClient.buildCall( + basePath, + localVarPath, + "POST", + localVarQueryParams, + localVarCollectionQueryParams, + localVarPostBody, + localVarHeaderParams, + localVarCookieParams, + localVarFormParams, + localVarAuthNames, + _callback); + } + + @SuppressWarnings("rawtypes") + private okhttp3.Call sendAgentConversationMessageValidateBeforeCall( + String conversationIdentifier, + SendAgentConversationMessageRequest sendAgentConversationMessageRequest, + final ApiCallback _callback) + throws ApiException { + // verify the required parameter 'conversationIdentifier' is set + if (conversationIdentifier == null) { + throw new ApiException( + "Missing the required parameter 'conversationIdentifier' when calling" + + " sendAgentConversationMessage(Async)"); + } + + // verify the required parameter 'sendAgentConversationMessageRequest' is set + if (sendAgentConversationMessageRequest == null) { + throw new ApiException( + "Missing the required parameter 'sendAgentConversationMessageRequest' when" + + " calling sendAgentConversationMessage(Async)"); + } + + return sendAgentConversationMessageCall( + conversationIdentifier, sendAgentConversationMessageRequest, _callback); + } + + /** + * Version: 26.5.0.cl or later Sends natural language messages to an existing Spotter agent + * conversation and returns the complete response synchronously. Requires + * `CAN_USE_SPOTTER` privilege and access to the metadata object associated with the + * conversation. The user must have access to the conversation session referenced by + * `conversation_identifier`. A conversation must first be created using the + * `createAgentConversation` API. #### Usage guidelines The request must include: - + * `conversation_identifier`: the unique session ID returned by + * `createAgentConversation`, used for context continuity and message tracking - + * `messages`: an array of one or more text messages to send to the agent The API + * returns an array of response objects, each containing: - `type`: the kind of + * response — `text`, `answer`, or `error` - `message`: + * the main content of the response - `metadata`: additional information depending on + * the message type (e.g., answer metadata includes analytics and visualization details) #### + * Error responses | Code | Description | + * |------|----------------------------------------------------------------------------------------------------------------------------------| + * | 401 | Unauthorized — authentication token is missing, expired, or invalid. | | 403 | + * Forbidden — the authenticated user does not have `CAN_USE_SPOTTER` privilege or + * lacks permission on the referenced conversation. | > ###### Note: > > - This + * endpoint is Generally Available from version 26.5.0.cl. > - This endpoint requires Spotter + * - please contact ThoughtSpot support to enable Spotter on your cluster. > - For real-time + * streamed responses, use `sendAgentConversationMessageStreaming` instead. + * + * @param conversationIdentifier Unique identifier for the conversation (used to track context) + * (required) + * @param sendAgentConversationMessageRequest (required) + * @return Object + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the + * response body + * @http.response.details + * + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 Common successful response -
201 Common error response -
400 Operation failed -
401 Unauthorized access. -
403 Forbidden access. -
500 Operation failed -
+ */ + public Object sendAgentConversationMessage( + String conversationIdentifier, + SendAgentConversationMessageRequest sendAgentConversationMessageRequest) + throws ApiException { + ApiResponse localVarResp = + sendAgentConversationMessageWithHttpInfo( + conversationIdentifier, sendAgentConversationMessageRequest); + return localVarResp.getData(); + } + + /** + * Version: 26.5.0.cl or later Sends natural language messages to an existing Spotter agent + * conversation and returns the complete response synchronously. Requires + * `CAN_USE_SPOTTER` privilege and access to the metadata object associated with the + * conversation. The user must have access to the conversation session referenced by + * `conversation_identifier`. A conversation must first be created using the + * `createAgentConversation` API. #### Usage guidelines The request must include: - + * `conversation_identifier`: the unique session ID returned by + * `createAgentConversation`, used for context continuity and message tracking - + * `messages`: an array of one or more text messages to send to the agent The API + * returns an array of response objects, each containing: - `type`: the kind of + * response — `text`, `answer`, or `error` - `message`: + * the main content of the response - `metadata`: additional information depending on + * the message type (e.g., answer metadata includes analytics and visualization details) #### + * Error responses | Code | Description | + * |------|----------------------------------------------------------------------------------------------------------------------------------| + * | 401 | Unauthorized — authentication token is missing, expired, or invalid. | | 403 | + * Forbidden — the authenticated user does not have `CAN_USE_SPOTTER` privilege or + * lacks permission on the referenced conversation. | > ###### Note: > > - This + * endpoint is Generally Available from version 26.5.0.cl. > - This endpoint requires Spotter + * - please contact ThoughtSpot support to enable Spotter on your cluster. > - For real-time + * streamed responses, use `sendAgentConversationMessageStreaming` instead. + * + * @param conversationIdentifier Unique identifier for the conversation (used to track context) + * (required) + * @param sendAgentConversationMessageRequest (required) + * @return ApiResponse<Object> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the + * response body + * @http.response.details + * + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 Common successful response -
201 Common error response -
400 Operation failed -
401 Unauthorized access. -
403 Forbidden access. -
500 Operation failed -
+ */ + public ApiResponse sendAgentConversationMessageWithHttpInfo( + String conversationIdentifier, + SendAgentConversationMessageRequest sendAgentConversationMessageRequest) + throws ApiException { + okhttp3.Call localVarCall = + sendAgentConversationMessageValidateBeforeCall( + conversationIdentifier, sendAgentConversationMessageRequest, null); + Type localVarReturnType = new TypeToken() {}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); + } + + /** + * (asynchronously) Version: 26.5.0.cl or later Sends natural language messages to an existing + * Spotter agent conversation and returns the complete response synchronously. Requires + * `CAN_USE_SPOTTER` privilege and access to the metadata object associated with the + * conversation. The user must have access to the conversation session referenced by + * `conversation_identifier`. A conversation must first be created using the + * `createAgentConversation` API. #### Usage guidelines The request must include: - + * `conversation_identifier`: the unique session ID returned by + * `createAgentConversation`, used for context continuity and message tracking - + * `messages`: an array of one or more text messages to send to the agent The API + * returns an array of response objects, each containing: - `type`: the kind of + * response — `text`, `answer`, or `error` - `message`: + * the main content of the response - `metadata`: additional information depending on + * the message type (e.g., answer metadata includes analytics and visualization details) #### + * Error responses | Code | Description | + * |------|----------------------------------------------------------------------------------------------------------------------------------| + * | 401 | Unauthorized — authentication token is missing, expired, or invalid. | | 403 | + * Forbidden — the authenticated user does not have `CAN_USE_SPOTTER` privilege or + * lacks permission on the referenced conversation. | > ###### Note: > > - This + * endpoint is Generally Available from version 26.5.0.cl. > - This endpoint requires Spotter + * - please contact ThoughtSpot support to enable Spotter on your cluster. > - For real-time + * streamed responses, use `sendAgentConversationMessageStreaming` instead. + * + * @param conversationIdentifier Unique identifier for the conversation (used to track context) + * (required) + * @param sendAgentConversationMessageRequest (required) + * @param _callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body + * object + * @http.response.details + * + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 Common successful response -
201 Common error response -
400 Operation failed -
401 Unauthorized access. -
403 Forbidden access. -
500 Operation failed -
+ */ + public okhttp3.Call sendAgentConversationMessageAsync( + String conversationIdentifier, + SendAgentConversationMessageRequest sendAgentConversationMessageRequest, + final ApiCallback _callback) + throws ApiException { + + okhttp3.Call localVarCall = + sendAgentConversationMessageValidateBeforeCall( + conversationIdentifier, sendAgentConversationMessageRequest, _callback); + Type localVarReturnType = new TypeToken() {}.getType(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; + } + /** + * Build call for sendAgentConversationMessageStreaming + * + * @param conversationIdentifier Unique identifier for the conversation (used to track context) + * (required) + * @param sendAgentConversationMessageStreamingRequest (required) + * @param _callback Callback for upload/download progress + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + * @http.response.details + * + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 Common successful response -
201 Common error response -
400 Operation failed -
401 Unauthorized access. -
403 Forbidden access. -
500 Operation failed -
+ */ + public okhttp3.Call sendAgentConversationMessageStreamingCall( + String conversationIdentifier, + SendAgentConversationMessageStreamingRequest + sendAgentConversationMessageStreamingRequest, + final ApiCallback _callback) + throws ApiException { + String basePath = null; + // Operation Servers + String[] localBasePaths = new String[] {}; + + // Determine Base Path to Use + if (localCustomBaseUrl != null) { + basePath = localCustomBaseUrl; + } else if (localBasePaths.length > 0) { + basePath = localBasePaths[localHostIndex]; + } else { + basePath = null; + } + + Object localVarPostBody = sendAgentConversationMessageStreamingRequest; + + // create path and map variables + String localVarPath = + "/api/rest/2.0/ai/agent/conversation/{conversation_identifier}/send/stream" + .replace( + "{" + "conversation_identifier" + "}", + localVarApiClient.escapeString(conversationIdentifier.toString())); + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + final String[] localVarAccepts = {"application/json"}; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = {"application/json"}; + final String localVarContentType = + localVarApiClient.selectHeaderContentType(localVarContentTypes); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } + + String[] localVarAuthNames = new String[] {"bearerAuth"}; + return localVarApiClient.buildCall( + basePath, + localVarPath, + "POST", + localVarQueryParams, + localVarCollectionQueryParams, + localVarPostBody, + localVarHeaderParams, + localVarCookieParams, + localVarFormParams, + localVarAuthNames, + _callback); + } + + @SuppressWarnings("rawtypes") + private okhttp3.Call sendAgentConversationMessageStreamingValidateBeforeCall( + String conversationIdentifier, + SendAgentConversationMessageStreamingRequest + sendAgentConversationMessageStreamingRequest, + final ApiCallback _callback) + throws ApiException { + // verify the required parameter 'conversationIdentifier' is set + if (conversationIdentifier == null) { + throw new ApiException( + "Missing the required parameter 'conversationIdentifier' when calling" + + " sendAgentConversationMessageStreaming(Async)"); + } + + // verify the required parameter 'sendAgentConversationMessageStreamingRequest' is set + if (sendAgentConversationMessageStreamingRequest == null) { + throw new ApiException( + "Missing the required parameter 'sendAgentConversationMessageStreamingRequest'" + + " when calling sendAgentConversationMessageStreaming(Async)"); + } + + return sendAgentConversationMessageStreamingCall( + conversationIdentifier, sendAgentConversationMessageStreamingRequest, _callback); + } + + /** + * Version: 26.5.0.cl or later Sends one or more natural language messages to an existing + * Spotter agent conversation and returns the response as a real-time Server-Sent Events stream. + * Requires `CAN_USE_SPOTTER` privilege and access to the metadata object associated + * with the conversation. The user must have access to the conversation session referenced by + * `conversation_identifier`. A conversation must first be created using the + * `createAgentConversation` API. #### Usage guidelines The request must include: - + * `conversation_identifier`: the unique session ID returned by + * `createAgentConversation`, used for context continuity and message tracking - + * `messages`: an array of one or more text messages to send to the agent If the + * request is valid, the API returns a Server-Sent Events (SSE) stream. Each line has the form + * `data: [{\"type\": \"...\", ...}]` — a JSON array of event + * objects. Event types include: - `ack`: confirms receipt of the request + * (`node_id`) - `conv_title`: conversation title (`title`, + * `conv_id`) - `notification`: status updates on operations + * (`group_id`, `metadata`, `code` — e.g. + * `TOOL_CALL_NOTIFICATION`, `nls_start`, + * `FINAL_RESPONSE_NOTIFICATION`) - `text-chunk`: incremental content chunks + * (`id`, `group_id`, `metadata` with `format` and + * `type` such as `thinking` or `text`, `content`) - + * `text`: full text block with same structure as `text-chunk` - + * `answer`: structured answer with metadata (`id`, `group_id`, + * `metadata` with `sage_query`, `session_id`, `title`, + * etc., `title`) - `error`: if a failure occurs #### Error responses | Code + * | Description | | ---- | + * -------------------------------------------------------------------------------------------------------------------------------- + * | | 401 | Unauthorized — authentication token is missing, expired, or invalid. | | 403 | + * Forbidden — the authenticated user does not have `CAN_USE_SPOTTER` privilege or + * lacks permission on the referenced conversation. | > ###### Note: > > - This + * endpoint is Generally Available from version 26.5.0.cl. > - This endpoint requires Spotter + * - please contact ThoughtSpot support to enable Spotter on your cluster. > - The streaming + * protocol uses Server-Sent Events (SSE). > - For the complete response in a single payload, + * use `sendAgentConversationMessage` instead. + * + * @param conversationIdentifier Unique identifier for the conversation (used to track context) + * (required) + * @param sendAgentConversationMessageStreamingRequest (required) + * @return SendAgentMessageResponse + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the + * response body + * @http.response.details + * + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 Common successful response -
201 Common error response -
400 Operation failed -
401 Unauthorized access. -
403 Forbidden access. -
500 Operation failed -
+ */ + public SendAgentMessageResponse sendAgentConversationMessageStreaming( + String conversationIdentifier, + SendAgentConversationMessageStreamingRequest + sendAgentConversationMessageStreamingRequest) + throws ApiException { + ApiResponse localVarResp = + sendAgentConversationMessageStreamingWithHttpInfo( + conversationIdentifier, sendAgentConversationMessageStreamingRequest); + return localVarResp.getData(); + } + + /** + * Version: 26.5.0.cl or later Sends one or more natural language messages to an existing + * Spotter agent conversation and returns the response as a real-time Server-Sent Events stream. + * Requires `CAN_USE_SPOTTER` privilege and access to the metadata object associated + * with the conversation. The user must have access to the conversation session referenced by + * `conversation_identifier`. A conversation must first be created using the + * `createAgentConversation` API. #### Usage guidelines The request must include: - + * `conversation_identifier`: the unique session ID returned by + * `createAgentConversation`, used for context continuity and message tracking - + * `messages`: an array of one or more text messages to send to the agent If the + * request is valid, the API returns a Server-Sent Events (SSE) stream. Each line has the form + * `data: [{\"type\": \"...\", ...}]` — a JSON array of event + * objects. Event types include: - `ack`: confirms receipt of the request + * (`node_id`) - `conv_title`: conversation title (`title`, + * `conv_id`) - `notification`: status updates on operations + * (`group_id`, `metadata`, `code` — e.g. + * `TOOL_CALL_NOTIFICATION`, `nls_start`, + * `FINAL_RESPONSE_NOTIFICATION`) - `text-chunk`: incremental content chunks + * (`id`, `group_id`, `metadata` with `format` and + * `type` such as `thinking` or `text`, `content`) - + * `text`: full text block with same structure as `text-chunk` - + * `answer`: structured answer with metadata (`id`, `group_id`, + * `metadata` with `sage_query`, `session_id`, `title`, + * etc., `title`) - `error`: if a failure occurs #### Error responses | Code + * | Description | | ---- | + * -------------------------------------------------------------------------------------------------------------------------------- + * | | 401 | Unauthorized — authentication token is missing, expired, or invalid. | | 403 | + * Forbidden — the authenticated user does not have `CAN_USE_SPOTTER` privilege or + * lacks permission on the referenced conversation. | > ###### Note: > > - This + * endpoint is Generally Available from version 26.5.0.cl. > - This endpoint requires Spotter + * - please contact ThoughtSpot support to enable Spotter on your cluster. > - The streaming + * protocol uses Server-Sent Events (SSE). > - For the complete response in a single payload, + * use `sendAgentConversationMessage` instead. + * + * @param conversationIdentifier Unique identifier for the conversation (used to track context) + * (required) + * @param sendAgentConversationMessageStreamingRequest (required) + * @return ApiResponse<SendAgentMessageResponse> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the + * response body + * @http.response.details + * + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 Common successful response -
201 Common error response -
400 Operation failed -
401 Unauthorized access. -
403 Forbidden access. -
500 Operation failed -
+ */ + public ApiResponse sendAgentConversationMessageStreamingWithHttpInfo( + String conversationIdentifier, + SendAgentConversationMessageStreamingRequest + sendAgentConversationMessageStreamingRequest) + throws ApiException { + okhttp3.Call localVarCall = + sendAgentConversationMessageStreamingValidateBeforeCall( + conversationIdentifier, sendAgentConversationMessageStreamingRequest, null); + Type localVarReturnType = new TypeToken() {}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); + } + + /** + * (asynchronously) Version: 26.5.0.cl or later Sends one or more natural language messages to + * an existing Spotter agent conversation and returns the response as a real-time Server-Sent + * Events stream. Requires `CAN_USE_SPOTTER` privilege and access to the metadata + * object associated with the conversation. The user must have access to the conversation + * session referenced by `conversation_identifier`. A conversation must first be + * created using the `createAgentConversation` API. #### Usage guidelines The request + * must include: - `conversation_identifier`: the unique session ID returned by + * `createAgentConversation`, used for context continuity and message tracking - + * `messages`: an array of one or more text messages to send to the agent If the + * request is valid, the API returns a Server-Sent Events (SSE) stream. Each line has the form + * `data: [{\"type\": \"...\", ...}]` — a JSON array of event + * objects. Event types include: - `ack`: confirms receipt of the request + * (`node_id`) - `conv_title`: conversation title (`title`, + * `conv_id`) - `notification`: status updates on operations + * (`group_id`, `metadata`, `code` — e.g. + * `TOOL_CALL_NOTIFICATION`, `nls_start`, + * `FINAL_RESPONSE_NOTIFICATION`) - `text-chunk`: incremental content chunks + * (`id`, `group_id`, `metadata` with `format` and + * `type` such as `thinking` or `text`, `content`) - + * `text`: full text block with same structure as `text-chunk` - + * `answer`: structured answer with metadata (`id`, `group_id`, + * `metadata` with `sage_query`, `session_id`, `title`, + * etc., `title`) - `error`: if a failure occurs #### Error responses | Code + * | Description | | ---- | + * -------------------------------------------------------------------------------------------------------------------------------- + * | | 401 | Unauthorized — authentication token is missing, expired, or invalid. | | 403 | + * Forbidden — the authenticated user does not have `CAN_USE_SPOTTER` privilege or + * lacks permission on the referenced conversation. | > ###### Note: > > - This + * endpoint is Generally Available from version 26.5.0.cl. > - This endpoint requires Spotter + * - please contact ThoughtSpot support to enable Spotter on your cluster. > - The streaming + * protocol uses Server-Sent Events (SSE). > - For the complete response in a single payload, + * use `sendAgentConversationMessage` instead. + * + * @param conversationIdentifier Unique identifier for the conversation (used to track context) + * (required) + * @param sendAgentConversationMessageStreamingRequest (required) + * @param _callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body + * object + * @http.response.details + * + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 Common successful response -
201 Common error response -
400 Operation failed -
401 Unauthorized access. -
403 Forbidden access. -
500 Operation failed -
+ */ + public okhttp3.Call sendAgentConversationMessageStreamingAsync( + String conversationIdentifier, + SendAgentConversationMessageStreamingRequest + sendAgentConversationMessageStreamingRequest, + final ApiCallback _callback) + throws ApiException { + + okhttp3.Call localVarCall = + sendAgentConversationMessageStreamingValidateBeforeCall( + conversationIdentifier, + sendAgentConversationMessageStreamingRequest, + _callback); + Type localVarReturnType = new TypeToken() {}.getType(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; + } + /** + * Build call for sendAgentMessage + * + * @param conversationIdentifier Unique identifier for the conversation (used to track context) + * (required) + * @param sendAgentMessageRequest (required) + * @param _callback Callback for upload/download progress + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + * @http.response.details + * + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 Common successful response -
201 Common error response -
400 Operation failed -
401 Unauthorized access. -
403 Forbidden access. -
500 Operation failed -
+ * + * @deprecated + */ + @Deprecated + public okhttp3.Call sendAgentMessageCall( + String conversationIdentifier, + SendAgentMessageRequest sendAgentMessageRequest, + final ApiCallback _callback) + throws ApiException { + String basePath = null; + // Operation Servers + String[] localBasePaths = new String[] {}; + + // Determine Base Path to Use + if (localCustomBaseUrl != null) { + basePath = localCustomBaseUrl; + } else if (localBasePaths.length > 0) { + basePath = localBasePaths[localHostIndex]; + } else { + basePath = null; + } + + Object localVarPostBody = sendAgentMessageRequest; + + // create path and map variables + String localVarPath = + "/api/rest/2.0/ai/agent/{conversation_identifier}/converse" + .replace( + "{" + "conversation_identifier" + "}", + localVarApiClient.escapeString(conversationIdentifier.toString())); + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + final String[] localVarAccepts = {"application/json"}; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = {"application/json"}; + final String localVarContentType = + localVarApiClient.selectHeaderContentType(localVarContentTypes); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } + + String[] localVarAuthNames = new String[] {"bearerAuth"}; + return localVarApiClient.buildCall( + basePath, + localVarPath, + "POST", + localVarQueryParams, + localVarCollectionQueryParams, + localVarPostBody, + localVarHeaderParams, + localVarCookieParams, + localVarFormParams, + localVarAuthNames, + _callback); + } + + @Deprecated + @SuppressWarnings("rawtypes") + private okhttp3.Call sendAgentMessageValidateBeforeCall( + String conversationIdentifier, + SendAgentMessageRequest sendAgentMessageRequest, + final ApiCallback _callback) + throws ApiException { + // verify the required parameter 'conversationIdentifier' is set + if (conversationIdentifier == null) { + throw new ApiException( + "Missing the required parameter 'conversationIdentifier' when calling" + + " sendAgentMessage(Async)"); + } + + // verify the required parameter 'sendAgentMessageRequest' is set + if (sendAgentMessageRequest == null) { + throw new ApiException( + "Missing the required parameter 'sendAgentMessageRequest' when calling" + + " sendAgentMessage(Async)"); + } + + return sendAgentMessageCall(conversationIdentifier, sendAgentMessageRequest, _callback); + } + + /** + * Version: 26.2.0.cl or later **Deprecated** — Use `sendAgentConversationMessage` + * instead. Send natural language messages to an existing Spotter agent conversation and returns + * the complete response synchronously. Requires `CAN_USE_SPOTTER` privilege and + * access to the metadata object associated with the conversation. The user must have access to + * the conversation session referenced by `conversation_identifier`. A conversation + * must first be created using the `createAgentConversation` API. #### Usage + * guidelines The request must include: - `conversation_identifier`: the unique + * session ID returned by `createAgentConversation`, used for context continuity and + * message tracking - `messages`: an array of one or more text messages to send to the + * agent The API returns an array of response objects, each containing: - `type`: the + * kind of response — `text`, `answer`, or `error` - + * `message`: the main content of the response - `metadata`: additional + * information depending on the message type (e.g., answer metadata includes analytics and + * visualization details) #### Error responses | Code | Description | + * |------|----------------------------------------------------------------------------------------------------------------------------------| + * | 401 | Unauthorized — authentication token is missing, expired, or invalid. | | 403 | + * Forbidden — the authenticated user does not have `CAN_USE_SPOTTER` privilege or + * lacks permission on the referenced conversation. | > ###### Note: > > - This + * endpoint is deprecated. Use `sendAgentConversationMessage` for new integrations. + * > - This endpoint is currently in Beta. Breaking changes may be introduced before the + * endpoint is made Generally Available. > - This endpoint requires Spotter - please contact + * ThoughtSpot support to enable Spotter on your cluster. + * + * @param conversationIdentifier Unique identifier for the conversation (used to track context) + * (required) + * @param sendAgentMessageRequest (required) + * @return Object + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the + * response body + * @http.response.details + * + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 Common successful response -
201 Common error response -
400 Operation failed -
401 Unauthorized access. -
403 Forbidden access. -
500 Operation failed -
+ * + * @deprecated + */ + @Deprecated + public Object sendAgentMessage( + String conversationIdentifier, SendAgentMessageRequest sendAgentMessageRequest) + throws ApiException { + ApiResponse localVarResp = + sendAgentMessageWithHttpInfo(conversationIdentifier, sendAgentMessageRequest); + return localVarResp.getData(); + } + + /** + * Version: 26.2.0.cl or later **Deprecated** — Use `sendAgentConversationMessage` + * instead. Send natural language messages to an existing Spotter agent conversation and returns + * the complete response synchronously. Requires `CAN_USE_SPOTTER` privilege and + * access to the metadata object associated with the conversation. The user must have access to + * the conversation session referenced by `conversation_identifier`. A conversation + * must first be created using the `createAgentConversation` API. #### Usage + * guidelines The request must include: - `conversation_identifier`: the unique + * session ID returned by `createAgentConversation`, used for context continuity and + * message tracking - `messages`: an array of one or more text messages to send to the + * agent The API returns an array of response objects, each containing: - `type`: the + * kind of response — `text`, `answer`, or `error` - + * `message`: the main content of the response - `metadata`: additional + * information depending on the message type (e.g., answer metadata includes analytics and + * visualization details) #### Error responses | Code | Description | + * |------|----------------------------------------------------------------------------------------------------------------------------------| + * | 401 | Unauthorized — authentication token is missing, expired, or invalid. | | 403 | + * Forbidden — the authenticated user does not have `CAN_USE_SPOTTER` privilege or + * lacks permission on the referenced conversation. | > ###### Note: > > - This + * endpoint is deprecated. Use `sendAgentConversationMessage` for new integrations. + * > - This endpoint is currently in Beta. Breaking changes may be introduced before the + * endpoint is made Generally Available. > - This endpoint requires Spotter - please contact + * ThoughtSpot support to enable Spotter on your cluster. + * + * @param conversationIdentifier Unique identifier for the conversation (used to track context) + * (required) + * @param sendAgentMessageRequest (required) + * @return ApiResponse<Object> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the + * response body + * @http.response.details + * + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 Common successful response -
201 Common error response -
400 Operation failed -
401 Unauthorized access. -
403 Forbidden access. -
500 Operation failed -
+ * + * @deprecated + */ + @Deprecated + public ApiResponse sendAgentMessageWithHttpInfo( + String conversationIdentifier, SendAgentMessageRequest sendAgentMessageRequest) + throws ApiException { + okhttp3.Call localVarCall = + sendAgentMessageValidateBeforeCall( + conversationIdentifier, sendAgentMessageRequest, null); + Type localVarReturnType = new TypeToken() {}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); + } + + /** + * (asynchronously) Version: 26.2.0.cl or later **Deprecated** — Use + * `sendAgentConversationMessage` instead. Send natural language messages to an + * existing Spotter agent conversation and returns the complete response synchronously. Requires + * `CAN_USE_SPOTTER` privilege and access to the metadata object associated with the + * conversation. The user must have access to the conversation session referenced by + * `conversation_identifier`. A conversation must first be created using the + * `createAgentConversation` API. #### Usage guidelines The request must include: - + * `conversation_identifier`: the unique session ID returned by + * `createAgentConversation`, used for context continuity and message tracking - + * `messages`: an array of one or more text messages to send to the agent The API + * returns an array of response objects, each containing: - `type`: the kind of + * response — `text`, `answer`, or `error` - `message`: + * the main content of the response - `metadata`: additional information depending on + * the message type (e.g., answer metadata includes analytics and visualization details) #### + * Error responses | Code | Description | + * |------|----------------------------------------------------------------------------------------------------------------------------------| + * | 401 | Unauthorized — authentication token is missing, expired, or invalid. | | 403 | + * Forbidden — the authenticated user does not have `CAN_USE_SPOTTER` privilege or + * lacks permission on the referenced conversation. | > ###### Note: > > - This + * endpoint is deprecated. Use `sendAgentConversationMessage` for new integrations. + * > - This endpoint is currently in Beta. Breaking changes may be introduced before the + * endpoint is made Generally Available. > - This endpoint requires Spotter - please contact + * ThoughtSpot support to enable Spotter on your cluster. + * + * @param conversationIdentifier Unique identifier for the conversation (used to track context) + * (required) + * @param sendAgentMessageRequest (required) + * @param _callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body + * object + * @http.response.details + * + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 Common successful response -
201 Common error response -
400 Operation failed -
401 Unauthorized access. -
403 Forbidden access. -
500 Operation failed -
+ * + * @deprecated + */ + @Deprecated + public okhttp3.Call sendAgentMessageAsync( + String conversationIdentifier, + SendAgentMessageRequest sendAgentMessageRequest, + final ApiCallback _callback) + throws ApiException { + + okhttp3.Call localVarCall = + sendAgentMessageValidateBeforeCall( + conversationIdentifier, sendAgentMessageRequest, _callback); + Type localVarReturnType = new TypeToken() {}.getType(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; + } + /** + * Build call for sendAgentMessageStreaming + * + * @param sendAgentMessageStreamingRequest (required) + * @param _callback Callback for upload/download progress + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + * @http.response.details + * + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 Common successful response -
201 Common error response -
400 Operation failed -
401 Unauthorized access. -
403 Forbidden access. -
500 Operation failed -
+ * + * @deprecated + */ + @Deprecated + public okhttp3.Call sendAgentMessageStreamingCall( + SendAgentMessageStreamingRequest sendAgentMessageStreamingRequest, + final ApiCallback _callback) + throws ApiException { + String basePath = null; + // Operation Servers + String[] localBasePaths = new String[] {}; + + // Determine Base Path to Use + if (localCustomBaseUrl != null) { + basePath = localCustomBaseUrl; + } else if (localBasePaths.length > 0) { + basePath = localBasePaths[localHostIndex]; + } else { + basePath = null; + } + + Object localVarPostBody = sendAgentMessageStreamingRequest; + + // create path and map variables + String localVarPath = "/api/rest/2.0/ai/agent/converse/sse"; + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + final String[] localVarAccepts = {"application/json"}; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = {"application/json"}; + final String localVarContentType = + localVarApiClient.selectHeaderContentType(localVarContentTypes); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } + + String[] localVarAuthNames = new String[] {"bearerAuth"}; + return localVarApiClient.buildCall( + basePath, + localVarPath, + "POST", + localVarQueryParams, + localVarCollectionQueryParams, + localVarPostBody, + localVarHeaderParams, + localVarCookieParams, + localVarFormParams, + localVarAuthNames, + _callback); + } + + @Deprecated + @SuppressWarnings("rawtypes") + private okhttp3.Call sendAgentMessageStreamingValidateBeforeCall( + SendAgentMessageStreamingRequest sendAgentMessageStreamingRequest, + final ApiCallback _callback) + throws ApiException { + // verify the required parameter 'sendAgentMessageStreamingRequest' is set + if (sendAgentMessageStreamingRequest == null) { + throw new ApiException( + "Missing the required parameter 'sendAgentMessageStreamingRequest' when" + + " calling sendAgentMessageStreaming(Async)"); + } + + return sendAgentMessageStreamingCall(sendAgentMessageStreamingRequest, _callback); + } + + /** + * Version: 26.2.0.cl or later **Deprecated** — Use + * `sendAgentConversationMessageStreaming` instead. Sends one or more natural language + * messages to an existing Spotter agent conversation and returns the response as a real-time + * Server-Sent Events stream. Requires `CAN_USE_SPOTTER` privilege and access to the + * metadata object associated with the conversation. The user must have access to the + * conversation session referenced by `conversation_identifier`. A conversation must + * first be created using the `createAgentConversation` API. #### Usage guidelines The + * request must include: - `conversation_identifier`: the unique session ID returned + * by `createAgentConversation`, used for context continuity and message tracking - + * `messages`: an array of one or more text messages to send to the agent If the + * request is valid, the API returns a Server-Sent Events (SSE) stream. Each line has the form + * `data: [{\"type\": \"...\", ...}]` — a JSON array of event + * objects. Event types include: - `ack`: confirms receipt of the request + * (`node_id`) - `conv_title`: conversation title (`title`, + * `conv_id`) - `notification`: status updates on operations + * (`group_id`, `metadata`, `code` — e.g. + * `TOOL_CALL_NOTIFICATION`, `nls_start`, + * `FINAL_RESPONSE_NOTIFICATION`) - `text-chunk`: incremental content chunks + * (`id`, `group_id`, `metadata` with `format` and + * `type` such as `thinking` or `text`, `content`) - + * `text`: full text block with same structure as `text-chunk` - + * `answer`: structured answer with metadata (`id`, `group_id`, + * `metadata` with `sage_query`, `session_id`, `title`, + * etc., `title`) - `error`: if a failure occurs #### Error responses | Code + * | Description | + * |------|----------------------------------------------------------------------------------------------------------------------------------| + * | 401 | Unauthorized — authentication token is missing, expired, or invalid. | | 403 | + * Forbidden — the authenticated user does not have `CAN_USE_SPOTTER` privilege or + * lacks permission on the referenced conversation. | > ###### Note: > > - This + * endpoint is deprecated. Use `sendAgentConversationMessageStreaming` for new + * integrations. > - This endpoint is currently in Beta. Breaking changes may be introduced + * before the endpoint is made Generally Available. > - This endpoint requires Spotter - + * please contact ThoughtSpot support to enable Spotter on your cluster. > - The streaming + * protocol uses Server-Sent Events (SSE). + * + * @param sendAgentMessageStreamingRequest (required) + * @return SendAgentMessageResponse + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the + * response body + * @http.response.details + * + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 Common successful response -
201 Common error response -
400 Operation failed -
401 Unauthorized access. -
403 Forbidden access. -
500 Operation failed -
+ * + * @deprecated + */ + @Deprecated + public SendAgentMessageResponse sendAgentMessageStreaming( + SendAgentMessageStreamingRequest sendAgentMessageStreamingRequest) throws ApiException { + ApiResponse localVarResp = + sendAgentMessageStreamingWithHttpInfo(sendAgentMessageStreamingRequest); + return localVarResp.getData(); + } + + /** + * Version: 26.2.0.cl or later **Deprecated** — Use + * `sendAgentConversationMessageStreaming` instead. Sends one or more natural language + * messages to an existing Spotter agent conversation and returns the response as a real-time + * Server-Sent Events stream. Requires `CAN_USE_SPOTTER` privilege and access to the + * metadata object associated with the conversation. The user must have access to the + * conversation session referenced by `conversation_identifier`. A conversation must + * first be created using the `createAgentConversation` API. #### Usage guidelines The + * request must include: - `conversation_identifier`: the unique session ID returned + * by `createAgentConversation`, used for context continuity and message tracking - + * `messages`: an array of one or more text messages to send to the agent If the + * request is valid, the API returns a Server-Sent Events (SSE) stream. Each line has the form + * `data: [{\"type\": \"...\", ...}]` — a JSON array of event + * objects. Event types include: - `ack`: confirms receipt of the request + * (`node_id`) - `conv_title`: conversation title (`title`, + * `conv_id`) - `notification`: status updates on operations + * (`group_id`, `metadata`, `code` — e.g. + * `TOOL_CALL_NOTIFICATION`, `nls_start`, + * `FINAL_RESPONSE_NOTIFICATION`) - `text-chunk`: incremental content chunks + * (`id`, `group_id`, `metadata` with `format` and + * `type` such as `thinking` or `text`, `content`) - + * `text`: full text block with same structure as `text-chunk` - + * `answer`: structured answer with metadata (`id`, `group_id`, + * `metadata` with `sage_query`, `session_id`, `title`, + * etc., `title`) - `error`: if a failure occurs #### Error responses | Code + * | Description | + * |------|----------------------------------------------------------------------------------------------------------------------------------| + * | 401 | Unauthorized — authentication token is missing, expired, or invalid. | | 403 | + * Forbidden — the authenticated user does not have `CAN_USE_SPOTTER` privilege or + * lacks permission on the referenced conversation. | > ###### Note: > > - This + * endpoint is deprecated. Use `sendAgentConversationMessageStreaming` for new + * integrations. > - This endpoint is currently in Beta. Breaking changes may be introduced + * before the endpoint is made Generally Available. > - This endpoint requires Spotter - + * please contact ThoughtSpot support to enable Spotter on your cluster. > - The streaming + * protocol uses Server-Sent Events (SSE). + * + * @param sendAgentMessageStreamingRequest (required) + * @return ApiResponse<SendAgentMessageResponse> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the + * response body + * @http.response.details + * + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 Common successful response -
201 Common error response -
400 Operation failed -
401 Unauthorized access. -
403 Forbidden access. -
500 Operation failed -
+ * + * @deprecated + */ + @Deprecated + public ApiResponse sendAgentMessageStreamingWithHttpInfo( + SendAgentMessageStreamingRequest sendAgentMessageStreamingRequest) throws ApiException { + okhttp3.Call localVarCall = + sendAgentMessageStreamingValidateBeforeCall(sendAgentMessageStreamingRequest, null); + Type localVarReturnType = new TypeToken() {}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); + } + + /** + * (asynchronously) Version: 26.2.0.cl or later **Deprecated** — Use + * `sendAgentConversationMessageStreaming` instead. Sends one or more natural language + * messages to an existing Spotter agent conversation and returns the response as a real-time + * Server-Sent Events stream. Requires `CAN_USE_SPOTTER` privilege and access to the + * metadata object associated with the conversation. The user must have access to the + * conversation session referenced by `conversation_identifier`. A conversation must + * first be created using the `createAgentConversation` API. #### Usage guidelines The + * request must include: - `conversation_identifier`: the unique session ID returned + * by `createAgentConversation`, used for context continuity and message tracking - + * `messages`: an array of one or more text messages to send to the agent If the + * request is valid, the API returns a Server-Sent Events (SSE) stream. Each line has the form + * `data: [{\"type\": \"...\", ...}]` — a JSON array of event + * objects. Event types include: - `ack`: confirms receipt of the request + * (`node_id`) - `conv_title`: conversation title (`title`, + * `conv_id`) - `notification`: status updates on operations + * (`group_id`, `metadata`, `code` — e.g. + * `TOOL_CALL_NOTIFICATION`, `nls_start`, + * `FINAL_RESPONSE_NOTIFICATION`) - `text-chunk`: incremental content chunks + * (`id`, `group_id`, `metadata` with `format` and + * `type` such as `thinking` or `text`, `content`) - + * `text`: full text block with same structure as `text-chunk` - + * `answer`: structured answer with metadata (`id`, `group_id`, + * `metadata` with `sage_query`, `session_id`, `title`, + * etc., `title`) - `error`: if a failure occurs #### Error responses | Code + * | Description | + * |------|----------------------------------------------------------------------------------------------------------------------------------| + * | 401 | Unauthorized — authentication token is missing, expired, or invalid. | | 403 | + * Forbidden — the authenticated user does not have `CAN_USE_SPOTTER` privilege or + * lacks permission on the referenced conversation. | > ###### Note: > > - This + * endpoint is deprecated. Use `sendAgentConversationMessageStreaming` for new + * integrations. > - This endpoint is currently in Beta. Breaking changes may be introduced + * before the endpoint is made Generally Available. > - This endpoint requires Spotter - + * please contact ThoughtSpot support to enable Spotter on your cluster. > - The streaming + * protocol uses Server-Sent Events (SSE). + * + * @param sendAgentMessageStreamingRequest (required) + * @param _callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body + * object + * @http.response.details + * + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 Common successful response -
201 Common error response -
400 Operation failed -
401 Unauthorized access. -
403 Forbidden access. -
500 Operation failed -
+ * + * @deprecated + */ + @Deprecated + public okhttp3.Call sendAgentMessageStreamingAsync( + SendAgentMessageStreamingRequest sendAgentMessageStreamingRequest, + final ApiCallback _callback) + throws ApiException { + + okhttp3.Call localVarCall = + sendAgentMessageStreamingValidateBeforeCall( + sendAgentMessageStreamingRequest, _callback); + Type localVarReturnType = new TypeToken() {}.getType(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; + } + /** + * Build call for sendMessage + * + * @param conversationIdentifier Unique identifier of the conversation. (required) + * @param sendMessageRequest (required) + * @param _callback Callback for upload/download progress + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + * @http.response.details + * + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 Common successful response -
201 Common error response -
400 Operation failed -
401 Unauthorized access. -
403 Forbidden access. -
500 Operation failed -
+ */ + public okhttp3.Call sendMessageCall( + String conversationIdentifier, + SendMessageRequest sendMessageRequest, + final ApiCallback _callback) + throws ApiException { + String basePath = null; + // Operation Servers + String[] localBasePaths = new String[] {}; + + // Determine Base Path to Use + if (localCustomBaseUrl != null) { + basePath = localCustomBaseUrl; + } else if (localBasePaths.length > 0) { + basePath = localBasePaths[localHostIndex]; + } else { + basePath = null; + } + + Object localVarPostBody = sendMessageRequest; + + // create path and map variables + String localVarPath = + "/api/rest/2.0/ai/conversation/{conversation_identifier}/converse" + .replace( + "{" + "conversation_identifier" + "}", + localVarApiClient.escapeString(conversationIdentifier.toString())); + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + final String[] localVarAccepts = {"application/json"}; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = {"application/json"}; + final String localVarContentType = + localVarApiClient.selectHeaderContentType(localVarContentTypes); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } + + String[] localVarAuthNames = new String[] {"bearerAuth"}; + return localVarApiClient.buildCall( + basePath, + localVarPath, + "POST", + localVarQueryParams, + localVarCollectionQueryParams, + localVarPostBody, + localVarHeaderParams, + localVarCookieParams, + localVarFormParams, + localVarAuthNames, + _callback); + } + + @SuppressWarnings("rawtypes") + private okhttp3.Call sendMessageValidateBeforeCall( + String conversationIdentifier, + SendMessageRequest sendMessageRequest, + final ApiCallback _callback) + throws ApiException { + // verify the required parameter 'conversationIdentifier' is set + if (conversationIdentifier == null) { + throw new ApiException( + "Missing the required parameter 'conversationIdentifier' when calling" + + " sendMessage(Async)"); + } + + // verify the required parameter 'sendMessageRequest' is set + if (sendMessageRequest == null) { + throw new ApiException( + "Missing the required parameter 'sendMessageRequest' when calling" + + " sendMessage(Async)"); + } + + return sendMessageCall(conversationIdentifier, sendMessageRequest, _callback); + } + + /** + * Version: 10.4.0.cl or later Sends a follow-up message to an existing conversation within the + * context of a data model. Requires `CAN_USE_SPOTTER` privilege and at least view + * access to the metadata object specified in the request. A conversation must first be created + * using the `createConversation` API. #### Usage guidelines The request must include: + * - `conversation_identifier`: the unique session ID returned by + * `createConversation` - `metadata_identifier`: the unique ID of the data + * source used for the conversation - `message`: a natural language string with the + * follow-up question If the request is successful, the API returns an array of response + * messages, each containing: - `session_identifier`: the unique ID of the generated + * response - `generation_number`: the generation number of the response - + * `message_type`: the type of the response (e.g., `TSAnswer`) - + * `visualization_type`: the generated visualization type (`Chart`, + * `Table`, or `Undefined`) - `tokens` / + * `display_tokens`: the search tokens and user-friendly display tokens for the + * response #### Error responses | Code | Description | + * |------|-----------------------------------------------------------------------------------------------------------------------------------------| + * | 401 | Unauthorized — authentication token is missing, expired, or invalid. | | 403 | + * Forbidden — the authenticated user does not have `CAN_USE_SPOTTER` privilege or + * lacks view permission on the specified metadata object. | > ###### Note: > * This + * endpoint is currently in Beta. Breaking changes may be introduced before the endpoint is made + * Generally Available. > * This endpoint requires Spotter - please contact ThoughtSpot + * support to enable Spotter on your cluster. + * + * @param conversationIdentifier Unique identifier of the conversation. (required) + * @param sendMessageRequest (required) + * @return List<ResponseMessage> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the + * response body + * @http.response.details + * + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 Common successful response -
201 Common error response -
400 Operation failed -
401 Unauthorized access. -
403 Forbidden access. -
500 Operation failed -
+ */ + public List sendMessage( + String conversationIdentifier, SendMessageRequest sendMessageRequest) + throws ApiException { + ApiResponse> localVarResp = + sendMessageWithHttpInfo(conversationIdentifier, sendMessageRequest); + return localVarResp.getData(); + } + + /** + * Version: 10.4.0.cl or later Sends a follow-up message to an existing conversation within the + * context of a data model. Requires `CAN_USE_SPOTTER` privilege and at least view + * access to the metadata object specified in the request. A conversation must first be created + * using the `createConversation` API. #### Usage guidelines The request must include: + * - `conversation_identifier`: the unique session ID returned by + * `createConversation` - `metadata_identifier`: the unique ID of the data + * source used for the conversation - `message`: a natural language string with the + * follow-up question If the request is successful, the API returns an array of response + * messages, each containing: - `session_identifier`: the unique ID of the generated + * response - `generation_number`: the generation number of the response - + * `message_type`: the type of the response (e.g., `TSAnswer`) - + * `visualization_type`: the generated visualization type (`Chart`, + * `Table`, or `Undefined`) - `tokens` / + * `display_tokens`: the search tokens and user-friendly display tokens for the + * response #### Error responses | Code | Description | + * |------|-----------------------------------------------------------------------------------------------------------------------------------------| + * | 401 | Unauthorized — authentication token is missing, expired, or invalid. | | 403 | + * Forbidden — the authenticated user does not have `CAN_USE_SPOTTER` privilege or + * lacks view permission on the specified metadata object. | > ###### Note: > * This + * endpoint is currently in Beta. Breaking changes may be introduced before the endpoint is made + * Generally Available. > * This endpoint requires Spotter - please contact ThoughtSpot + * support to enable Spotter on your cluster. + * + * @param conversationIdentifier Unique identifier of the conversation. (required) + * @param sendMessageRequest (required) + * @return ApiResponse<List<ResponseMessage>> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the + * response body + * @http.response.details + * + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 Common successful response -
201 Common error response -
400 Operation failed -
401 Unauthorized access. -
403 Forbidden access. -
500 Operation failed -
+ */ + public ApiResponse> sendMessageWithHttpInfo( + String conversationIdentifier, SendMessageRequest sendMessageRequest) + throws ApiException { + okhttp3.Call localVarCall = + sendMessageValidateBeforeCall(conversationIdentifier, sendMessageRequest, null); + Type localVarReturnType = new TypeToken>() {}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); + } + + /** + * (asynchronously) Version: 10.4.0.cl or later Sends a follow-up message to an existing + * conversation within the context of a data model. Requires `CAN_USE_SPOTTER` + * privilege and at least view access to the metadata object specified in the request. A + * conversation must first be created using the `createConversation` API. #### Usage + * guidelines The request must include: - `conversation_identifier`: the unique + * session ID returned by `createConversation` - `metadata_identifier`: the + * unique ID of the data source used for the conversation - `message`: a natural + * language string with the follow-up question If the request is successful, the API returns an + * array of response messages, each containing: - `session_identifier`: the unique ID + * of the generated response - `generation_number`: the generation number of the + * response - `message_type`: the type of the response (e.g., `TSAnswer`) - + * `visualization_type`: the generated visualization type (`Chart`, + * `Table`, or `Undefined`) - `tokens` / + * `display_tokens`: the search tokens and user-friendly display tokens for the + * response #### Error responses | Code | Description | + * |------|-----------------------------------------------------------------------------------------------------------------------------------------| + * | 401 | Unauthorized — authentication token is missing, expired, or invalid. | | 403 | + * Forbidden — the authenticated user does not have `CAN_USE_SPOTTER` privilege or + * lacks view permission on the specified metadata object. | > ###### Note: > * This + * endpoint is currently in Beta. Breaking changes may be introduced before the endpoint is made + * Generally Available. > * This endpoint requires Spotter - please contact ThoughtSpot + * support to enable Spotter on your cluster. + * + * @param conversationIdentifier Unique identifier of the conversation. (required) + * @param sendMessageRequest (required) + * @param _callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body + * object + * @http.response.details + * + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 Common successful response -
201 Common error response -
400 Operation failed -
401 Unauthorized access. -
403 Forbidden access. -
500 Operation failed -
+ */ + public okhttp3.Call sendMessageAsync( + String conversationIdentifier, + SendMessageRequest sendMessageRequest, + final ApiCallback> _callback) + throws ApiException { + + okhttp3.Call localVarCall = + sendMessageValidateBeforeCall( + conversationIdentifier, sendMessageRequest, _callback); + Type localVarReturnType = new TypeToken>() {}.getType(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; + } + /** + * Build call for setNLInstructions + * + * @param setNLInstructionsRequest (required) + * @param _callback Callback for upload/download progress + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + * @http.response.details + * + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 Common successful response -
201 Common error response -
400 Operation failed -
401 Unauthorized access. -
403 Forbidden access. -
500 Operation failed -
+ */ + public okhttp3.Call setNLInstructionsCall( + SetNLInstructionsRequest setNLInstructionsRequest, final ApiCallback _callback) + throws ApiException { + String basePath = null; + // Operation Servers + String[] localBasePaths = new String[] {}; + + // Determine Base Path to Use + if (localCustomBaseUrl != null) { + basePath = localCustomBaseUrl; + } else if (localBasePaths.length > 0) { + basePath = localBasePaths[localHostIndex]; + } else { + basePath = null; + } + + Object localVarPostBody = setNLInstructionsRequest; + + // create path and map variables + String localVarPath = "/api/rest/2.0/ai/instructions/set"; + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + final String[] localVarAccepts = {"application/json"}; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = {"application/json"}; + final String localVarContentType = + localVarApiClient.selectHeaderContentType(localVarContentTypes); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } + + String[] localVarAuthNames = new String[] {"bearerAuth"}; + return localVarApiClient.buildCall( + basePath, + localVarPath, + "POST", + localVarQueryParams, + localVarCollectionQueryParams, + localVarPostBody, + localVarHeaderParams, + localVarCookieParams, + localVarFormParams, + localVarAuthNames, + _callback); + } + + @SuppressWarnings("rawtypes") + private okhttp3.Call setNLInstructionsValidateBeforeCall( + SetNLInstructionsRequest setNLInstructionsRequest, final ApiCallback _callback) + throws ApiException { + // verify the required parameter 'setNLInstructionsRequest' is set + if (setNLInstructionsRequest == null) { + throw new ApiException( + "Missing the required parameter 'setNLInstructionsRequest' when calling" + + " setNLInstructions(Async)"); + } + + return setNLInstructionsCall(setNLInstructionsRequest, _callback); + } + + /** + * Version: 10.15.0.cl or later This API allows users to set natural language (NL) instructions + * for a specific data-model to improve AI-generated answers and query processing. These + * instructions help guide the AI system to better understand the data context and provide more + * accurate responses. Requires `CAN_USE_SPOTTER` privilege, either edit access or + * `SPOTTER_COACHING_PRIVILEGE` on the data model, and a bearer token corresponding to + * the org where the data model exists. #### Usage guidelines To set NL instructions for a + * data-model, the request must include: - `data_source_identifier`: The unique ID of + * the data-model for which to set NL instructions - `nl_instructions_info`: An array + * of instruction objects, each containing: - `instructions`: Array of text + * instructions for the LLM - `scope`: The scope of the instruction + * (`GLOBAL`). Currently only `GLOBAL` is supported. It can be extended to + * data-model-user scope in future. #### Instructions scope - **GLOBAL**: instructions that + * apply to all users querying this data model If the request is successful, the API returns: - + * `success`: a boolean indicating whether the operation completed successfully #### + * Error responses | Code | Description | + * |------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| + * | 401 | Unauthorized — authentication token is missing, expired, or invalid. | | 403 | + * Forbidden — the authenticated user does not have `CAN_USE_SPOTTER` privilege, lacks + * edit access or `SPOTTER_COACHING_PRIVILEGE` on the data model, or the bearer token + * does not correspond to the org where the data model exists. | > ###### Note: > > - + * To use this API, the user needs either edit access or `SPOTTER_COACHING_PRIVILEGE` + * on the data model, and must use the bearer token corresponding to the org where the data + * model exists. > - This endpoint is currently in Beta. Breaking changes may be introduced + * before the endpoint is made Generally Available. > - Available from version 10.15.0.cl and + * later. > - This endpoint requires Spotter — please contact ThoughtSpot Support to enable + * Spotter on your cluster. > - Instructions help improve the accuracy and relevance of + * AI-generated responses for the specified data-model. + * + * @param setNLInstructionsRequest (required) + * @return EurekaSetNLInstructionsResponse + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the + * response body + * @http.response.details + * + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 Common successful response -
201 Common error response -
400 Operation failed -
401 Unauthorized access. -
403 Forbidden access. -
500 Operation failed -
+ */ + public EurekaSetNLInstructionsResponse setNLInstructions( + SetNLInstructionsRequest setNLInstructionsRequest) throws ApiException { + ApiResponse localVarResp = + setNLInstructionsWithHttpInfo(setNLInstructionsRequest); + return localVarResp.getData(); + } + + /** + * Version: 10.15.0.cl or later This API allows users to set natural language (NL) instructions + * for a specific data-model to improve AI-generated answers and query processing. These + * instructions help guide the AI system to better understand the data context and provide more + * accurate responses. Requires `CAN_USE_SPOTTER` privilege, either edit access or + * `SPOTTER_COACHING_PRIVILEGE` on the data model, and a bearer token corresponding to + * the org where the data model exists. #### Usage guidelines To set NL instructions for a + * data-model, the request must include: - `data_source_identifier`: The unique ID of + * the data-model for which to set NL instructions - `nl_instructions_info`: An array + * of instruction objects, each containing: - `instructions`: Array of text + * instructions for the LLM - `scope`: The scope of the instruction + * (`GLOBAL`). Currently only `GLOBAL` is supported. It can be extended to + * data-model-user scope in future. #### Instructions scope - **GLOBAL**: instructions that + * apply to all users querying this data model If the request is successful, the API returns: - + * `success`: a boolean indicating whether the operation completed successfully #### + * Error responses | Code | Description | + * |------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| + * | 401 | Unauthorized — authentication token is missing, expired, or invalid. | | 403 | + * Forbidden — the authenticated user does not have `CAN_USE_SPOTTER` privilege, lacks + * edit access or `SPOTTER_COACHING_PRIVILEGE` on the data model, or the bearer token + * does not correspond to the org where the data model exists. | > ###### Note: > > - + * To use this API, the user needs either edit access or `SPOTTER_COACHING_PRIVILEGE` + * on the data model, and must use the bearer token corresponding to the org where the data + * model exists. > - This endpoint is currently in Beta. Breaking changes may be introduced + * before the endpoint is made Generally Available. > - Available from version 10.15.0.cl and + * later. > - This endpoint requires Spotter — please contact ThoughtSpot Support to enable + * Spotter on your cluster. > - Instructions help improve the accuracy and relevance of + * AI-generated responses for the specified data-model. + * + * @param setNLInstructionsRequest (required) + * @return ApiResponse<EurekaSetNLInstructionsResponse> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the + * response body + * @http.response.details + * + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 Common successful response -
201 Common error response -
400 Operation failed -
401 Unauthorized access. -
403 Forbidden access. -
500 Operation failed -
+ */ + public ApiResponse setNLInstructionsWithHttpInfo( + SetNLInstructionsRequest setNLInstructionsRequest) throws ApiException { + okhttp3.Call localVarCall = + setNLInstructionsValidateBeforeCall(setNLInstructionsRequest, null); + Type localVarReturnType = new TypeToken() {}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); + } + + /** + * (asynchronously) Version: 10.15.0.cl or later This API allows users to set natural language + * (NL) instructions for a specific data-model to improve AI-generated answers and query + * processing. These instructions help guide the AI system to better understand the data context + * and provide more accurate responses. Requires `CAN_USE_SPOTTER` privilege, either + * edit access or `SPOTTER_COACHING_PRIVILEGE` on the data model, and a bearer token + * corresponding to the org where the data model exists. #### Usage guidelines To set NL + * instructions for a data-model, the request must include: - + * `data_source_identifier`: The unique ID of the data-model for which to set NL + * instructions - `nl_instructions_info`: An array of instruction objects, each + * containing: - `instructions`: Array of text instructions for the LLM - + * `scope`: The scope of the instruction (`GLOBAL`). Currently only + * `GLOBAL` is supported. It can be extended to data-model-user scope in future. #### + * Instructions scope - **GLOBAL**: instructions that apply to all users querying this data + * model If the request is successful, the API returns: - `success`: a boolean + * indicating whether the operation completed successfully #### Error responses | Code | + * Description | + * |------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| + * | 401 | Unauthorized — authentication token is missing, expired, or invalid. | | 403 | + * Forbidden — the authenticated user does not have `CAN_USE_SPOTTER` privilege, lacks + * edit access or `SPOTTER_COACHING_PRIVILEGE` on the data model, or the bearer token + * does not correspond to the org where the data model exists. | > ###### Note: > > - + * To use this API, the user needs either edit access or `SPOTTER_COACHING_PRIVILEGE` + * on the data model, and must use the bearer token corresponding to the org where the data + * model exists. > - This endpoint is currently in Beta. Breaking changes may be introduced + * before the endpoint is made Generally Available. > - Available from version 10.15.0.cl and + * later. > - This endpoint requires Spotter — please contact ThoughtSpot Support to enable + * Spotter on your cluster. > - Instructions help improve the accuracy and relevance of + * AI-generated responses for the specified data-model. + * + * @param setNLInstructionsRequest (required) + * @param _callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body + * object + * @http.response.details + * + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 Common successful response -
201 Common error response -
400 Operation failed -
401 Unauthorized access. -
403 Forbidden access. -
500 Operation failed -
+ */ + public okhttp3.Call setNLInstructionsAsync( + SetNLInstructionsRequest setNLInstructionsRequest, + final ApiCallback _callback) + throws ApiException { + + okhttp3.Call localVarCall = + setNLInstructionsValidateBeforeCall(setNLInstructionsRequest, _callback); + Type localVarReturnType = new TypeToken() {}.getType(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; + } + /** + * Build call for singleAnswer + * + * @param singleAnswerRequest (required) + * @param _callback Callback for upload/download progress + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + * @http.response.details + * + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 Common successful response -
201 Common error response -
400 Operation failed -
401 Unauthorized access. -
403 Forbidden access. -
500 Operation failed -
+ */ + public okhttp3.Call singleAnswerCall( + SingleAnswerRequest singleAnswerRequest, final ApiCallback _callback) + throws ApiException { + String basePath = null; + // Operation Servers + String[] localBasePaths = new String[] {}; + + // Determine Base Path to Use + if (localCustomBaseUrl != null) { + basePath = localCustomBaseUrl; + } else if (localBasePaths.length > 0) { + basePath = localBasePaths[localHostIndex]; + } else { + basePath = null; + } + + Object localVarPostBody = singleAnswerRequest; + + // create path and map variables + String localVarPath = "/api/rest/2.0/ai/answer/create"; + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + final String[] localVarAccepts = {"application/json"}; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = {"application/json"}; + final String localVarContentType = + localVarApiClient.selectHeaderContentType(localVarContentTypes); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } + + String[] localVarAuthNames = new String[] {"bearerAuth"}; + return localVarApiClient.buildCall( + basePath, + localVarPath, + "POST", + localVarQueryParams, + localVarCollectionQueryParams, + localVarPostBody, + localVarHeaderParams, + localVarCookieParams, + localVarFormParams, + localVarAuthNames, + _callback); + } + + @SuppressWarnings("rawtypes") + private okhttp3.Call singleAnswerValidateBeforeCall( + SingleAnswerRequest singleAnswerRequest, final ApiCallback _callback) + throws ApiException { + // verify the required parameter 'singleAnswerRequest' is set + if (singleAnswerRequest == null) { + throw new ApiException( + "Missing the required parameter 'singleAnswerRequest' when calling" + + " singleAnswer(Async)"); + } + + return singleAnswerCall(singleAnswerRequest, _callback); + } + + /** + * Version: 10.4.0.cl or later Processes a natural language query against a specified data model + * and returns a single AI-generated answer without requiring a conversation session. Requires + * `CAN_USE_SPOTTER` privilege and at least view access to the metadata object + * specified in the request. #### Usage guidelines The request must include: - + * `query`: a natural language question (e.g., \"What were total sales last + * quarter?\") - `metadata_identifier`: the unique ID of the data source to query + * against If the request is successful, the API returns a response message containing: - + * `session_identifier`: the unique ID of the generated response - + * `generation_number`: the generation number of the response - + * `message_type`: the type of the response (e.g., `TSAnswer`) - + * `visualization_type`: the generated visualization type (`Chart`, + * `Table`, or `Undefined`) - `tokens` / + * `display_tokens`: the search tokens and user-friendly display tokens for the + * response #### Error responses | Code | Description | + * |------|-----------------------------------------------------------------------------------------------------------------------------------------| + * | 401 | Unauthorized — authentication token is missing, expired, or invalid. | | 403 | + * Forbidden — the authenticated user does not have `CAN_USE_SPOTTER` privilege or + * lacks view permission on the specified metadata object. | > ###### Note: > * This + * endpoint is currently in Beta. Breaking changes may be introduced before the endpoint is made + * Generally Available. > * This endpoint requires Spotter - please contact ThoughtSpot + * support to enable Spotter on your cluster. + * + * @param singleAnswerRequest (required) + * @return ResponseMessage + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the + * response body + * @http.response.details + * + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 Common successful response -
201 Common error response -
400 Operation failed -
401 Unauthorized access. -
403 Forbidden access. -
500 Operation failed -
+ */ + public ResponseMessage singleAnswer(SingleAnswerRequest singleAnswerRequest) + throws ApiException { + ApiResponse localVarResp = singleAnswerWithHttpInfo(singleAnswerRequest); + return localVarResp.getData(); + } + + /** + * Version: 10.4.0.cl or later Processes a natural language query against a specified data model + * and returns a single AI-generated answer without requiring a conversation session. Requires + * `CAN_USE_SPOTTER` privilege and at least view access to the metadata object + * specified in the request. #### Usage guidelines The request must include: - + * `query`: a natural language question (e.g., \"What were total sales last + * quarter?\") - `metadata_identifier`: the unique ID of the data source to query + * against If the request is successful, the API returns a response message containing: - + * `session_identifier`: the unique ID of the generated response - + * `generation_number`: the generation number of the response - + * `message_type`: the type of the response (e.g., `TSAnswer`) - + * `visualization_type`: the generated visualization type (`Chart`, + * `Table`, or `Undefined`) - `tokens` / + * `display_tokens`: the search tokens and user-friendly display tokens for the + * response #### Error responses | Code | Description | + * |------|-----------------------------------------------------------------------------------------------------------------------------------------| + * | 401 | Unauthorized — authentication token is missing, expired, or invalid. | | 403 | + * Forbidden — the authenticated user does not have `CAN_USE_SPOTTER` privilege or + * lacks view permission on the specified metadata object. | > ###### Note: > * This + * endpoint is currently in Beta. Breaking changes may be introduced before the endpoint is made + * Generally Available. > * This endpoint requires Spotter - please contact ThoughtSpot + * support to enable Spotter on your cluster. + * + * @param singleAnswerRequest (required) + * @return ApiResponse<ResponseMessage> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the + * response body + * @http.response.details + * + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 Common successful response -
201 Common error response -
400 Operation failed -
401 Unauthorized access. -
403 Forbidden access. -
500 Operation failed -
+ */ + public ApiResponse singleAnswerWithHttpInfo( + SingleAnswerRequest singleAnswerRequest) throws ApiException { + okhttp3.Call localVarCall = singleAnswerValidateBeforeCall(singleAnswerRequest, null); + Type localVarReturnType = new TypeToken() {}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); + } + + /** + * (asynchronously) Version: 10.4.0.cl or later Processes a natural language query against a + * specified data model and returns a single AI-generated answer without requiring a + * conversation session. Requires `CAN_USE_SPOTTER` privilege and at least view access + * to the metadata object specified in the request. #### Usage guidelines The request must + * include: - `query`: a natural language question (e.g., \"What were total sales + * last quarter?\") - `metadata_identifier`: the unique ID of the data source to + * query against If the request is successful, the API returns a response message containing: - + * `session_identifier`: the unique ID of the generated response - + * `generation_number`: the generation number of the response - + * `message_type`: the type of the response (e.g., `TSAnswer`) - + * `visualization_type`: the generated visualization type (`Chart`, + * `Table`, or `Undefined`) - `tokens` / + * `display_tokens`: the search tokens and user-friendly display tokens for the + * response #### Error responses | Code | Description | + * |------|-----------------------------------------------------------------------------------------------------------------------------------------| + * | 401 | Unauthorized — authentication token is missing, expired, or invalid. | | 403 | + * Forbidden — the authenticated user does not have `CAN_USE_SPOTTER` privilege or + * lacks view permission on the specified metadata object. | > ###### Note: > * This + * endpoint is currently in Beta. Breaking changes may be introduced before the endpoint is made + * Generally Available. > * This endpoint requires Spotter - please contact ThoughtSpot + * support to enable Spotter on your cluster. + * + * @param singleAnswerRequest (required) + * @param _callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body + * object + * @http.response.details + * + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 Common successful response -
201 Common error response -
400 Operation failed -
401 Unauthorized access. -
403 Forbidden access. -
500 Operation failed -
+ */ + public okhttp3.Call singleAnswerAsync( + SingleAnswerRequest singleAnswerRequest, final ApiCallback _callback) + throws ApiException { + + okhttp3.Call localVarCall = singleAnswerValidateBeforeCall(singleAnswerRequest, _callback); + Type localVarReturnType = new TypeToken() {}.getType(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; + } + /** + * Build call for stopConversation + * + * @param conversationIdentifier Unique identifier of the conversation to stop. (required) + * @param _callback Callback for upload/download progress + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
204 Successfully stopped the in-progress agent conversation response for the given. -
400 Operation failed -
401 Unauthorized access. -
403 Forbidden access. -
500 Operation failed -
+ */ + public okhttp3.Call stopConversationCall( + String conversationIdentifier, final ApiCallback _callback) throws ApiException { + String basePath = null; + // Operation Servers + String[] localBasePaths = new String[] {}; + + // Determine Base Path to Use + if (localCustomBaseUrl != null) { + basePath = localCustomBaseUrl; + } else if (localBasePaths.length > 0) { + basePath = localBasePaths[localHostIndex]; + } else { + basePath = null; + } + + Object localVarPostBody = null; + + // create path and map variables + String localVarPath = + "/api/rest/2.0/ai/agent/conversation/{conversation_identifier}/stop-response" + .replace( + "{" + "conversation_identifier" + "}", + localVarApiClient.escapeString(conversationIdentifier.toString())); + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + final String[] localVarAccepts = {"application/json"}; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = {}; + final String localVarContentType = + localVarApiClient.selectHeaderContentType(localVarContentTypes); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } + + String[] localVarAuthNames = new String[] {"bearerAuth"}; + return localVarApiClient.buildCall( + basePath, + localVarPath, + "POST", + localVarQueryParams, + localVarCollectionQueryParams, + localVarPostBody, + localVarHeaderParams, + localVarCookieParams, + localVarFormParams, + localVarAuthNames, + _callback); + } + + @SuppressWarnings("rawtypes") + private okhttp3.Call stopConversationValidateBeforeCall( + String conversationIdentifier, final ApiCallback _callback) throws ApiException { + // verify the required parameter 'conversationIdentifier' is set + if (conversationIdentifier == null) { + throw new ApiException( + "Missing the required parameter 'conversationIdentifier' when calling" + + " stopConversation(Async)"); + } + + return stopConversationCall(conversationIdentifier, _callback); + } + + /** + * Stops an in-progress agent conversation response. Version: 26.6.0.cl or later + * <span>Version: 26.6.0.cl or later Stops an in-progress agent response for the specified + * conversation. Use this endpoint to cancel a response that is actively being generated — for + * example, when the user navigates away, reformulates their question, or no longer needs the + * current result. Requires `CAN_USE_SPOTTER` privilege and access to the specified + * conversation. #### Usage guidelines The request must include: - + * `conversation_identifier` *(path parameter)*: the unique ID of the conversation + * whose active response should be stopped, as returned by `createAgentConversation` A + * successful request returns an empty `204 No Content` response. If there is no + * active response in progress at the time of the call, the request is still treated as + * successful. After stopping a response, the conversation session remains active. You can + * continue sending messages using `sendAgentConversationMessage` or + * `sendAgentConversationMessageStreaming`. #### Example request + * ```bash POST + * /api/rest/2.0/ai/agent/conversation/{conversation_identifier}/stop-response + * ``` #### Typical usage scenario This endpoint is useful when integrating + * Spotter into a chat UI where users can cancel a long-running query. For example: 1. User + * sends a message via `sendAgentConversationMessageStreaming`. 2. User clicks a + * \"Stop generating\" button while the response is streaming. 3. Your client calls + * `stopConversation` with the active `conversation_identifier`. 4. The + * stream is terminated and the user can ask a new question. #### Error responses | Code | + * Description | |------|-------------| | 401 | Unauthorized — authentication token is missing, + * expired, or invalid. | | 403 | Forbidden — the authenticated user does not have + * `CAN_USE_SPOTTER` privilege or lacks access to the specified conversation. | > + * ###### Note: > > - Calling this endpoint when no response is in progress does not + * return an error. > - The conversation context is preserved after stopping — previous + * messages and answers remain accessible. > - Available from version 26.6.0.cl and later. + * > - This endpoint requires Spotter — please contact ThoughtSpot Support to enable Spotter + * on your cluster. > - This feature is available only for **Spotter 3** + * (`SPOTTER3`) version. + * + * @param conversationIdentifier Unique identifier of the conversation to stop. (required) + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the + * response body + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
204 Successfully stopped the in-progress agent conversation response for the given. -
400 Operation failed -
401 Unauthorized access. -
403 Forbidden access. -
500 Operation failed -
+ */ + public void stopConversation(String conversationIdentifier) throws ApiException { + stopConversationWithHttpInfo(conversationIdentifier); + } + + /** + * Stops an in-progress agent conversation response. Version: 26.6.0.cl or later + * <span>Version: 26.6.0.cl or later Stops an in-progress agent response for the specified + * conversation. Use this endpoint to cancel a response that is actively being generated — for + * example, when the user navigates away, reformulates their question, or no longer needs the + * current result. Requires `CAN_USE_SPOTTER` privilege and access to the specified + * conversation. #### Usage guidelines The request must include: - + * `conversation_identifier` *(path parameter)*: the unique ID of the conversation + * whose active response should be stopped, as returned by `createAgentConversation` A + * successful request returns an empty `204 No Content` response. If there is no + * active response in progress at the time of the call, the request is still treated as + * successful. After stopping a response, the conversation session remains active. You can + * continue sending messages using `sendAgentConversationMessage` or + * `sendAgentConversationMessageStreaming`. #### Example request + * ```bash POST + * /api/rest/2.0/ai/agent/conversation/{conversation_identifier}/stop-response + * ``` #### Typical usage scenario This endpoint is useful when integrating + * Spotter into a chat UI where users can cancel a long-running query. For example: 1. User + * sends a message via `sendAgentConversationMessageStreaming`. 2. User clicks a + * \"Stop generating\" button while the response is streaming. 3. Your client calls + * `stopConversation` with the active `conversation_identifier`. 4. The + * stream is terminated and the user can ask a new question. #### Error responses | Code | + * Description | |------|-------------| | 401 | Unauthorized — authentication token is missing, + * expired, or invalid. | | 403 | Forbidden — the authenticated user does not have + * `CAN_USE_SPOTTER` privilege or lacks access to the specified conversation. | > + * ###### Note: > > - Calling this endpoint when no response is in progress does not + * return an error. > - The conversation context is preserved after stopping — previous + * messages and answers remain accessible. > - Available from version 26.6.0.cl and later. + * > - This endpoint requires Spotter — please contact ThoughtSpot Support to enable Spotter + * on your cluster. > - This feature is available only for **Spotter 3** + * (`SPOTTER3`) version. + * + * @param conversationIdentifier Unique identifier of the conversation to stop. (required) + * @return ApiResponse<Void> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the + * response body + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
204 Successfully stopped the in-progress agent conversation response for the given. -
400 Operation failed -
401 Unauthorized access. -
403 Forbidden access. -
500 Operation failed -
+ */ + public ApiResponse stopConversationWithHttpInfo(String conversationIdentifier) + throws ApiException { + okhttp3.Call localVarCall = + stopConversationValidateBeforeCall(conversationIdentifier, null); + return localVarApiClient.execute(localVarCall); + } + + /** + * (asynchronously) Stops an in-progress agent conversation response. Version: 26.6.0.cl or + * later <span>Version: 26.6.0.cl or later Stops an in-progress agent response for the + * specified conversation. Use this endpoint to cancel a response that is actively being + * generated — for example, when the user navigates away, reformulates their question, or no + * longer needs the current result. Requires `CAN_USE_SPOTTER` privilege and access to + * the specified conversation. #### Usage guidelines The request must include: - + * `conversation_identifier` *(path parameter)*: the unique ID of the conversation + * whose active response should be stopped, as returned by `createAgentConversation` A + * successful request returns an empty `204 No Content` response. If there is no + * active response in progress at the time of the call, the request is still treated as + * successful. After stopping a response, the conversation session remains active. You can + * continue sending messages using `sendAgentConversationMessage` or + * `sendAgentConversationMessageStreaming`. #### Example request + * ```bash POST + * /api/rest/2.0/ai/agent/conversation/{conversation_identifier}/stop-response + * ``` #### Typical usage scenario This endpoint is useful when integrating + * Spotter into a chat UI where users can cancel a long-running query. For example: 1. User + * sends a message via `sendAgentConversationMessageStreaming`. 2. User clicks a + * \"Stop generating\" button while the response is streaming. 3. Your client calls + * `stopConversation` with the active `conversation_identifier`. 4. The + * stream is terminated and the user can ask a new question. #### Error responses | Code | + * Description | |------|-------------| | 401 | Unauthorized — authentication token is missing, + * expired, or invalid. | | 403 | Forbidden — the authenticated user does not have + * `CAN_USE_SPOTTER` privilege or lacks access to the specified conversation. | > + * ###### Note: > > - Calling this endpoint when no response is in progress does not + * return an error. > - The conversation context is preserved after stopping — previous + * messages and answers remain accessible. > - Available from version 26.6.0.cl and later. + * > - This endpoint requires Spotter — please contact ThoughtSpot Support to enable Spotter + * on your cluster. > - This feature is available only for **Spotter 3** + * (`SPOTTER3`) version. + * + * @param conversationIdentifier Unique identifier of the conversation to stop. (required) + * @param _callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body + * object + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
204 Successfully stopped the in-progress agent conversation response for the given. -
400 Operation failed -
401 Unauthorized access. -
403 Forbidden access. -
500 Operation failed -
+ */ + public okhttp3.Call stopConversationAsync( + String conversationIdentifier, final ApiCallback _callback) throws ApiException { + + okhttp3.Call localVarCall = + stopConversationValidateBeforeCall(conversationIdentifier, _callback); + localVarApiClient.executeAsync(localVarCall, _callback); + return localVarCall; + } +} diff --git a/sdks/java/src/main/java/com/thoughtspot/client/api/AuthenticationApi.java b/sdks/java/src/main/java/com/thoughtspot/client/api/AuthenticationApi.java new file mode 100644 index 000000000..7dc0c92a0 --- /dev/null +++ b/sdks/java/src/main/java/com/thoughtspot/client/api/AuthenticationApi.java @@ -0,0 +1,2378 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client.api; + +import com.google.gson.reflect.TypeToken; +import com.thoughtspot.client.ApiCallback; +import com.thoughtspot.client.ApiClient; +import com.thoughtspot.client.ApiClientConfiguration; +import com.thoughtspot.client.ApiException; +import com.thoughtspot.client.ApiResponse; +import com.thoughtspot.client.Configuration; +import com.thoughtspot.client.Pair; +import com.thoughtspot.client.model.AccessToken; +import com.thoughtspot.client.model.ConfigureAuthSettingsRequest; +import com.thoughtspot.client.model.GetCustomAccessTokenRequest; +import com.thoughtspot.client.model.GetFullAccessTokenRequest; +import com.thoughtspot.client.model.GetObjectAccessTokenRequest; +import com.thoughtspot.client.model.GetTokenResponse; +import com.thoughtspot.client.model.LoginRequest; +import com.thoughtspot.client.model.RevokeTokenRequest; +import com.thoughtspot.client.model.SearchAuthSettingsRequest; +import com.thoughtspot.client.model.SearchAuthSettingsResponse; +import com.thoughtspot.client.model.Token; +import com.thoughtspot.client.model.TokenValidationResponse; +import com.thoughtspot.client.model.User; +import com.thoughtspot.client.model.ValidateTokenRequest; +import java.lang.reflect.Type; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +@javax.annotation.Generated( + value = "org.openapitools.codegen.languages.JavaClientCodegen", + comments = "Generator version: 7.12.0") +public class AuthenticationApi { + private ApiClient localVarApiClient; + private ApiClientConfiguration localVarApiClientConfiguration; + private int localHostIndex; + private String localCustomBaseUrl; + + public AuthenticationApi() { + this(Configuration.getDefaultApiClient()); + } + + public AuthenticationApi(ApiClient apiClient) { + this.localVarApiClient = apiClient; + } + + public AuthenticationApi(ApiClientConfiguration apiClientConfiguration) { + this.localVarApiClientConfiguration = apiClientConfiguration; + this.localVarApiClient = new ApiClient(apiClientConfiguration); + } + + public ApiClient getApiClient() { + return localVarApiClient; + } + + public void setApiClient(ApiClient apiClient) { + this.localVarApiClient = apiClient; + } + + public ApiClientConfiguration getApiClientConfiguration() { + return localVarApiClientConfiguration; + } + + public void applyApiClientConfiguration(ApiClientConfiguration apiClientConfiguration) { + this.localVarApiClientConfiguration = apiClientConfiguration; + if (localVarApiClient != null) { + localVarApiClient.applyApiClientConfiguration(apiClientConfiguration); + } else { + localVarApiClient = new ApiClient(apiClientConfiguration); + } + } + + public int getHostIndex() { + return localHostIndex; + } + + public void setHostIndex(int hostIndex) { + this.localHostIndex = hostIndex; + } + + public String getCustomBaseUrl() { + return localCustomBaseUrl; + } + + public void setCustomBaseUrl(String customBaseUrl) { + this.localCustomBaseUrl = customBaseUrl; + } + + /** + * Build call for configureAuthSettings + * + * @param configureAuthSettingsRequest (required) + * @param _callback Callback for upload/download progress + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
204 Trusted authentication settings configured successfully. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public okhttp3.Call configureAuthSettingsCall( + ConfigureAuthSettingsRequest configureAuthSettingsRequest, final ApiCallback _callback) + throws ApiException { + String basePath = null; + // Operation Servers + String[] localBasePaths = new String[] {}; + + // Determine Base Path to Use + if (localCustomBaseUrl != null) { + basePath = localCustomBaseUrl; + } else if (localBasePaths.length > 0) { + basePath = localBasePaths[localHostIndex]; + } else { + basePath = null; + } + + Object localVarPostBody = configureAuthSettingsRequest; + + // create path and map variables + String localVarPath = "/api/rest/2.0/auth/configure"; + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + final String[] localVarAccepts = {"application/json"}; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = {"application/json"}; + final String localVarContentType = + localVarApiClient.selectHeaderContentType(localVarContentTypes); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } + + String[] localVarAuthNames = new String[] {"bearerAuth"}; + return localVarApiClient.buildCall( + basePath, + localVarPath, + "POST", + localVarQueryParams, + localVarCollectionQueryParams, + localVarPostBody, + localVarHeaderParams, + localVarCookieParams, + localVarFormParams, + localVarAuthNames, + _callback); + } + + @SuppressWarnings("rawtypes") + private okhttp3.Call configureAuthSettingsValidateBeforeCall( + ConfigureAuthSettingsRequest configureAuthSettingsRequest, final ApiCallback _callback) + throws ApiException { + // verify the required parameter 'configureAuthSettingsRequest' is set + if (configureAuthSettingsRequest == null) { + throw new ApiException( + "Missing the required parameter 'configureAuthSettingsRequest' when calling" + + " configureAuthSettings(Async)"); + } + + return configureAuthSettingsCall(configureAuthSettingsRequest, _callback); + } + + /** + * Version: 26.6.0.cl or later Enables or disables authentication at cluster or org level for + * the specified auth type. Currently supports `TRUSTED_AUTH`. #### Required + * privileges Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) or + * `CONTROL_TRUSTED_AUTH` (**Can Enable or Disable Trusted Authentication**) + * privilege. If [Role-Based Access Control + * (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled, the + * `CONTROL_TRUSTED_AUTH` privilege is required. #### Usage guidelines Use + * `cluster_preferences` to enable or disable authentication at the cluster level. + * Cluster-level settings can only be configured from the Primary Org. - `ENABLED` — + * Generates a new access token if one does not exist. An existing token is preserved. - + * `DISABLED` — Revokes the existing cluster-level access token. Use + * `org_preferences` to enable or disable authentication for one or more Orgs. Each + * entry must include an `org_identifier` (unique ID or name) and an + * `auth_status`. Org-level configuration requires the per-Org authentication feature + * to be enabled on your instance. - `ENABLED` — Generates a new org-level access + * token if one does not exist. - `DISABLED` — Revokes the existing org-level access + * token for that Org. Both `cluster_preferences` and `org_preferences` are + * optional. Omitting a field leaves the corresponding settings unchanged. If both are omitted, + * the API returns `204 No Content` without making any changes. **Note**: + * Cluster-level and org-level settings are independent of each other. Enabling or disabling one + * does not affect the other. + * + * @param configureAuthSettingsRequest (required) + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the + * response body + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
204 Trusted authentication settings configured successfully. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public void configureAuthSettings(ConfigureAuthSettingsRequest configureAuthSettingsRequest) + throws ApiException { + configureAuthSettingsWithHttpInfo(configureAuthSettingsRequest); + } + + /** + * Version: 26.6.0.cl or later Enables or disables authentication at cluster or org level for + * the specified auth type. Currently supports `TRUSTED_AUTH`. #### Required + * privileges Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) or + * `CONTROL_TRUSTED_AUTH` (**Can Enable or Disable Trusted Authentication**) + * privilege. If [Role-Based Access Control + * (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled, the + * `CONTROL_TRUSTED_AUTH` privilege is required. #### Usage guidelines Use + * `cluster_preferences` to enable or disable authentication at the cluster level. + * Cluster-level settings can only be configured from the Primary Org. - `ENABLED` — + * Generates a new access token if one does not exist. An existing token is preserved. - + * `DISABLED` — Revokes the existing cluster-level access token. Use + * `org_preferences` to enable or disable authentication for one or more Orgs. Each + * entry must include an `org_identifier` (unique ID or name) and an + * `auth_status`. Org-level configuration requires the per-Org authentication feature + * to be enabled on your instance. - `ENABLED` — Generates a new org-level access + * token if one does not exist. - `DISABLED` — Revokes the existing org-level access + * token for that Org. Both `cluster_preferences` and `org_preferences` are + * optional. Omitting a field leaves the corresponding settings unchanged. If both are omitted, + * the API returns `204 No Content` without making any changes. **Note**: + * Cluster-level and org-level settings are independent of each other. Enabling or disabling one + * does not affect the other. + * + * @param configureAuthSettingsRequest (required) + * @return ApiResponse<Void> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the + * response body + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
204 Trusted authentication settings configured successfully. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public ApiResponse configureAuthSettingsWithHttpInfo( + ConfigureAuthSettingsRequest configureAuthSettingsRequest) throws ApiException { + okhttp3.Call localVarCall = + configureAuthSettingsValidateBeforeCall(configureAuthSettingsRequest, null); + return localVarApiClient.execute(localVarCall); + } + + /** + * (asynchronously) Version: 26.6.0.cl or later Enables or disables authentication at cluster or + * org level for the specified auth type. Currently supports `TRUSTED_AUTH`. #### + * Required privileges Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) or + * `CONTROL_TRUSTED_AUTH` (**Can Enable or Disable Trusted Authentication**) + * privilege. If [Role-Based Access Control + * (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled, the + * `CONTROL_TRUSTED_AUTH` privilege is required. #### Usage guidelines Use + * `cluster_preferences` to enable or disable authentication at the cluster level. + * Cluster-level settings can only be configured from the Primary Org. - `ENABLED` — + * Generates a new access token if one does not exist. An existing token is preserved. - + * `DISABLED` — Revokes the existing cluster-level access token. Use + * `org_preferences` to enable or disable authentication for one or more Orgs. Each + * entry must include an `org_identifier` (unique ID or name) and an + * `auth_status`. Org-level configuration requires the per-Org authentication feature + * to be enabled on your instance. - `ENABLED` — Generates a new org-level access + * token if one does not exist. - `DISABLED` — Revokes the existing org-level access + * token for that Org. Both `cluster_preferences` and `org_preferences` are + * optional. Omitting a field leaves the corresponding settings unchanged. If both are omitted, + * the API returns `204 No Content` without making any changes. **Note**: + * Cluster-level and org-level settings are independent of each other. Enabling or disabling one + * does not affect the other. + * + * @param configureAuthSettingsRequest (required) + * @param _callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body + * object + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
204 Trusted authentication settings configured successfully. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public okhttp3.Call configureAuthSettingsAsync( + ConfigureAuthSettingsRequest configureAuthSettingsRequest, + final ApiCallback _callback) + throws ApiException { + + okhttp3.Call localVarCall = + configureAuthSettingsValidateBeforeCall(configureAuthSettingsRequest, _callback); + localVarApiClient.executeAsync(localVarCall, _callback); + return localVarCall; + } + /** + * Build call for getCurrentUserInfo + * + * @param _callback Callback for upload/download progress + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 Fetch current session user detail successful. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public okhttp3.Call getCurrentUserInfoCall(final ApiCallback _callback) throws ApiException { + String basePath = null; + // Operation Servers + String[] localBasePaths = new String[] {}; + + // Determine Base Path to Use + if (localCustomBaseUrl != null) { + basePath = localCustomBaseUrl; + } else if (localBasePaths.length > 0) { + basePath = localBasePaths[localHostIndex]; + } else { + basePath = null; + } + + Object localVarPostBody = null; + + // create path and map variables + String localVarPath = "/api/rest/2.0/auth/session/user"; + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + final String[] localVarAccepts = {"application/json"}; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = {}; + final String localVarContentType = + localVarApiClient.selectHeaderContentType(localVarContentTypes); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } + + String[] localVarAuthNames = new String[] {"bearerAuth"}; + return localVarApiClient.buildCall( + basePath, + localVarPath, + "GET", + localVarQueryParams, + localVarCollectionQueryParams, + localVarPostBody, + localVarHeaderParams, + localVarCookieParams, + localVarFormParams, + localVarAuthNames, + _callback); + } + + @SuppressWarnings("rawtypes") + private okhttp3.Call getCurrentUserInfoValidateBeforeCall(final ApiCallback _callback) + throws ApiException { + return getCurrentUserInfoCall(_callback); + } + + /** + * Version: 9.0.0.cl or later Retrieves details of the current user session for the token + * provided in the request header. Any ThoughtSpot user can access this endpoint and send an API + * request. The data returned in the API response varies according to user's privilege and + * object access permissions. **NOTE**: In ThoughtSpot, users with cluster administration + * privileges can access all Orgs by default. However, unless the administrator is explicitly + * added to an Org, the Orgs list in the session information returned by the API will include + * only the Primary Org. To include other Orgs in the API response, you must explicitly add the + * administrator to each Org in the Admin settings page in the UI or via user REST API. + * + * @return User + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the + * response body + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 Fetch current session user detail successful. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public User getCurrentUserInfo() throws ApiException { + ApiResponse localVarResp = getCurrentUserInfoWithHttpInfo(); + return localVarResp.getData(); + } + + /** + * Version: 9.0.0.cl or later Retrieves details of the current user session for the token + * provided in the request header. Any ThoughtSpot user can access this endpoint and send an API + * request. The data returned in the API response varies according to user's privilege and + * object access permissions. **NOTE**: In ThoughtSpot, users with cluster administration + * privileges can access all Orgs by default. However, unless the administrator is explicitly + * added to an Org, the Orgs list in the session information returned by the API will include + * only the Primary Org. To include other Orgs in the API response, you must explicitly add the + * administrator to each Org in the Admin settings page in the UI or via user REST API. + * + * @return ApiResponse<User> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the + * response body + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 Fetch current session user detail successful. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public ApiResponse getCurrentUserInfoWithHttpInfo() throws ApiException { + okhttp3.Call localVarCall = getCurrentUserInfoValidateBeforeCall(null); + Type localVarReturnType = new TypeToken() {}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); + } + + /** + * (asynchronously) Version: 9.0.0.cl or later Retrieves details of the current user session for + * the token provided in the request header. Any ThoughtSpot user can access this endpoint and + * send an API request. The data returned in the API response varies according to user's + * privilege and object access permissions. **NOTE**: In ThoughtSpot, users with cluster + * administration privileges can access all Orgs by default. However, unless the administrator + * is explicitly added to an Org, the Orgs list in the session information returned by the API + * will include only the Primary Org. To include other Orgs in the API response, you must + * explicitly add the administrator to each Org in the Admin settings page in the UI or via user + * REST API. + * + * @param _callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body + * object + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 Fetch current session user detail successful. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public okhttp3.Call getCurrentUserInfoAsync(final ApiCallback _callback) + throws ApiException { + + okhttp3.Call localVarCall = getCurrentUserInfoValidateBeforeCall(_callback); + Type localVarReturnType = new TypeToken() {}.getType(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; + } + /** + * Build call for getCurrentUserToken + * + * @param _callback Callback for upload/download progress + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 Fetching token for current user successful. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public okhttp3.Call getCurrentUserTokenCall(final ApiCallback _callback) throws ApiException { + String basePath = null; + // Operation Servers + String[] localBasePaths = new String[] {}; + + // Determine Base Path to Use + if (localCustomBaseUrl != null) { + basePath = localCustomBaseUrl; + } else if (localBasePaths.length > 0) { + basePath = localBasePaths[localHostIndex]; + } else { + basePath = null; + } + + Object localVarPostBody = null; + + // create path and map variables + String localVarPath = "/api/rest/2.0/auth/session/token"; + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + final String[] localVarAccepts = {"application/json"}; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = {}; + final String localVarContentType = + localVarApiClient.selectHeaderContentType(localVarContentTypes); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } + + String[] localVarAuthNames = new String[] {"bearerAuth"}; + return localVarApiClient.buildCall( + basePath, + localVarPath, + "GET", + localVarQueryParams, + localVarCollectionQueryParams, + localVarPostBody, + localVarHeaderParams, + localVarCookieParams, + localVarFormParams, + localVarAuthNames, + _callback); + } + + @SuppressWarnings("rawtypes") + private okhttp3.Call getCurrentUserTokenValidateBeforeCall(final ApiCallback _callback) + throws ApiException { + return getCurrentUserTokenCall(_callback); + } + + /** + * Version: 9.4.0.cl or later Retrieves details of the current session token for the bearer + * token provided in the request header. This API endpoint does not create a new token. Instead, + * it returns details about the token, including the token string, creation time, expiration + * time, and the associated user. Use this endpoint to introspect your current session token, + * debug authentication issues, or when a frontend application needs session token details. Any + * ThoughtSpot user with a valid bearer token can access this endpoint and send an API request + * + * @return GetTokenResponse + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the + * response body + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 Fetching token for current user successful. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public GetTokenResponse getCurrentUserToken() throws ApiException { + ApiResponse localVarResp = getCurrentUserTokenWithHttpInfo(); + return localVarResp.getData(); + } + + /** + * Version: 9.4.0.cl or later Retrieves details of the current session token for the bearer + * token provided in the request header. This API endpoint does not create a new token. Instead, + * it returns details about the token, including the token string, creation time, expiration + * time, and the associated user. Use this endpoint to introspect your current session token, + * debug authentication issues, or when a frontend application needs session token details. Any + * ThoughtSpot user with a valid bearer token can access this endpoint and send an API request + * + * @return ApiResponse<GetTokenResponse> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the + * response body + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 Fetching token for current user successful. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public ApiResponse getCurrentUserTokenWithHttpInfo() throws ApiException { + okhttp3.Call localVarCall = getCurrentUserTokenValidateBeforeCall(null); + Type localVarReturnType = new TypeToken() {}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); + } + + /** + * (asynchronously) Version: 9.4.0.cl or later Retrieves details of the current session token + * for the bearer token provided in the request header. This API endpoint does not create a new + * token. Instead, it returns details about the token, including the token string, creation + * time, expiration time, and the associated user. Use this endpoint to introspect your current + * session token, debug authentication issues, or when a frontend application needs session + * token details. Any ThoughtSpot user with a valid bearer token can access this endpoint and + * send an API request + * + * @param _callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body + * object + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 Fetching token for current user successful. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public okhttp3.Call getCurrentUserTokenAsync(final ApiCallback _callback) + throws ApiException { + + okhttp3.Call localVarCall = getCurrentUserTokenValidateBeforeCall(_callback); + Type localVarReturnType = new TypeToken() {}.getType(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; + } + /** + * Build call for getCustomAccessToken + * + * @param getCustomAccessTokenRequest (required) + * @param _callback Callback for upload/download progress + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 ABAC token creation was successful. -
400 Invalid request. This could be due to missing or incorrect parameters. -
401 Unauthorized access. The request could not be authenticated. -
403 Forbidden access. The user does not have permission to access this resource. -
500 An unexpected error occurred on the server. -
+ */ + public okhttp3.Call getCustomAccessTokenCall( + GetCustomAccessTokenRequest getCustomAccessTokenRequest, final ApiCallback _callback) + throws ApiException { + String basePath = null; + // Operation Servers + String[] localBasePaths = new String[] {}; + + // Determine Base Path to Use + if (localCustomBaseUrl != null) { + basePath = localCustomBaseUrl; + } else if (localBasePaths.length > 0) { + basePath = localBasePaths[localHostIndex]; + } else { + basePath = null; + } + + Object localVarPostBody = getCustomAccessTokenRequest; + + // create path and map variables + String localVarPath = "/api/rest/2.0/auth/token/custom"; + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + final String[] localVarAccepts = {"application/json"}; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = {"application/json"}; + final String localVarContentType = + localVarApiClient.selectHeaderContentType(localVarContentTypes); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } + + String[] localVarAuthNames = new String[] {}; + return localVarApiClient.buildCall( + basePath, + localVarPath, + "POST", + localVarQueryParams, + localVarCollectionQueryParams, + localVarPostBody, + localVarHeaderParams, + localVarCookieParams, + localVarFormParams, + localVarAuthNames, + _callback); + } + + @SuppressWarnings("rawtypes") + private okhttp3.Call getCustomAccessTokenValidateBeforeCall( + GetCustomAccessTokenRequest getCustomAccessTokenRequest, final ApiCallback _callback) + throws ApiException { + // verify the required parameter 'getCustomAccessTokenRequest' is set + if (getCustomAccessTokenRequest == null) { + throw new ApiException( + "Missing the required parameter 'getCustomAccessTokenRequest' when calling" + + " getCustomAccessToken(Async)"); + } + + return getCustomAccessTokenCall(getCustomAccessTokenRequest, _callback); + } + + /** + * Version: 10.4.0.cl or later Creates an authentication token that provides values for the + * formula variables in the Row Level Security (RLS) rules for a given user. Recommended for use + * cases that require Attribute-based access control (ABAC) via RLS. #### Required privileges To + * add a new user and assign privileges during auto-creation, the `ADMINISTRATION` + * (**Can administer ThoughtSpot**) privilege is required. If [Role-Based Access Control + * (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled, the + * `CONTROL_TRUSTED_AUTH` (**Can Enable or Disable Trusted Authentication**) privilege + * and edit access to the data source are required. To configure formula variables for all Orgs + * on your instance or the Primary Org, cluster administration privileges are required. Org + * administrators can configure formula variables for their respective Orgs. If Role-Based + * Access Control (RBAC) is enabled, users with the `CAN_MANAGE_VARIABLES` (**Can + * manage variables**) role privilege can also create and manage variables for their Org + * context. #### Usage guidelines You can generate a token by providing a `username` + * and `password`, or by using a `secret_key`. To generate a + * `secret_key`, the administrator must enable [Trusted + * authentication](https://developers.thoughtspot.com/docs/trusted-auth-secret-key) in the + * **Develop** > **Customizations** > **Security Settings** page. **Note**: * When both + * `password` and `secret_key` are included in the API request, + * `password` takes precedence. * If [Multi-Factor Authentication + * (MFA)](https://docs.thoughtspot.com/cloud/latest/authentication-local-mfa) is enabled on your + * instance, the API login request with `username` and `password` returns an + * error. You can switch to token-based authentication with `secret_key` or contact + * ThoughtSpot Support for assistance. The token obtained from ThoughtSpot is valid for 5 + * minutes by default. You can configure the token expiration time as required. #### ABAC via + * RLS To implement ABAC via RLS and assign security entitlements to users during session + * creation, generate a token with custom variable values. The values set in the authentication + * token are applied to the formula variables referenced in RLS rules at the table level, which + * determines the data each user can access based on their entitlements. The variable values can + * be configured to persist for a specific set of Models in user sessions initiated with the + * token, allowing different RLS rules to be set for different data models. Once defined, the + * rules are added to the user's `variable_values` object, after which all + * sessions will use the persisted values. For more information, see [ABAC via tokens + * Documentation](https://developers.thoughtspot.com/docs/abac-via-rls-variables). ##### Formula + * variables Before defining variable values, ensure the variables are created and available on + * your instance. To create a formula variable, you can use the **Create variable** + * (`/api/rest/2.0/template/variables/create`) REST API endpoint, with the variable + * `type` set as `Formula_Variable` in the API request. The API doesn't + * support `\"persist_option\": \"RESET\"` and + * `\"persist_option\": \"NONE\"` when `variable_values` + * are defined in the request. If you are using `variable_values` for token + * generation, you must use other supported persist options such as `APPEND` or + * `REPLACE`. If you want to use `RESET` or `NONE`, do not pass + * any `variable_values`. In such cases, `variable_values` will remain + * unaffected. #### Supported objects The supported object type is `LOGICAL_TABLE`. + * When using `object_id` with `variable_values`, models are supported. #### + * Just-in-time provisioning For [just-in-time user creation and + * provisioning](https://developers.thoughtspot.com/docs/just-in-time-provisioning), specify the + * following attributes in the API request: * `auto_create` * `username` * + * `display_name` * `email` * `groups` Set `auto_create` + * to `true` if the username does not exist in ThoughtSpot. If the username already + * exists in ThoughtSpot and `auto_create` is set to `true`, user properties + * such as display name, email, Org and group entitlements will not be updated with new values. + * Setting `auto_create` to `true` does not create formula variables. Hence, + * this setting will not be applicable to `variable_values`. #### Important point to + * note All options in the token creation APIs that define user access to data in ThoughtSpot + * will take effect during token creation, not when the token is used for authentication. For + * example, `auto_create:true` will create the user when the authentication token is + * created. Persist options such as `APPEND` and `REPLACE` will persist + * `variable_values` on the user profile when the token is created. + * + * @param getCustomAccessTokenRequest (required) + * @return AccessToken + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the + * response body + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 ABAC token creation was successful. -
400 Invalid request. This could be due to missing or incorrect parameters. -
401 Unauthorized access. The request could not be authenticated. -
403 Forbidden access. The user does not have permission to access this resource. -
500 An unexpected error occurred on the server. -
+ */ + public AccessToken getCustomAccessToken(GetCustomAccessTokenRequest getCustomAccessTokenRequest) + throws ApiException { + ApiResponse localVarResp = + getCustomAccessTokenWithHttpInfo(getCustomAccessTokenRequest); + return localVarResp.getData(); + } + + /** + * Version: 10.4.0.cl or later Creates an authentication token that provides values for the + * formula variables in the Row Level Security (RLS) rules for a given user. Recommended for use + * cases that require Attribute-based access control (ABAC) via RLS. #### Required privileges To + * add a new user and assign privileges during auto-creation, the `ADMINISTRATION` + * (**Can administer ThoughtSpot**) privilege is required. If [Role-Based Access Control + * (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled, the + * `CONTROL_TRUSTED_AUTH` (**Can Enable or Disable Trusted Authentication**) privilege + * and edit access to the data source are required. To configure formula variables for all Orgs + * on your instance or the Primary Org, cluster administration privileges are required. Org + * administrators can configure formula variables for their respective Orgs. If Role-Based + * Access Control (RBAC) is enabled, users with the `CAN_MANAGE_VARIABLES` (**Can + * manage variables**) role privilege can also create and manage variables for their Org + * context. #### Usage guidelines You can generate a token by providing a `username` + * and `password`, or by using a `secret_key`. To generate a + * `secret_key`, the administrator must enable [Trusted + * authentication](https://developers.thoughtspot.com/docs/trusted-auth-secret-key) in the + * **Develop** > **Customizations** > **Security Settings** page. **Note**: * When both + * `password` and `secret_key` are included in the API request, + * `password` takes precedence. * If [Multi-Factor Authentication + * (MFA)](https://docs.thoughtspot.com/cloud/latest/authentication-local-mfa) is enabled on your + * instance, the API login request with `username` and `password` returns an + * error. You can switch to token-based authentication with `secret_key` or contact + * ThoughtSpot Support for assistance. The token obtained from ThoughtSpot is valid for 5 + * minutes by default. You can configure the token expiration time as required. #### ABAC via + * RLS To implement ABAC via RLS and assign security entitlements to users during session + * creation, generate a token with custom variable values. The values set in the authentication + * token are applied to the formula variables referenced in RLS rules at the table level, which + * determines the data each user can access based on their entitlements. The variable values can + * be configured to persist for a specific set of Models in user sessions initiated with the + * token, allowing different RLS rules to be set for different data models. Once defined, the + * rules are added to the user's `variable_values` object, after which all + * sessions will use the persisted values. For more information, see [ABAC via tokens + * Documentation](https://developers.thoughtspot.com/docs/abac-via-rls-variables). ##### Formula + * variables Before defining variable values, ensure the variables are created and available on + * your instance. To create a formula variable, you can use the **Create variable** + * (`/api/rest/2.0/template/variables/create`) REST API endpoint, with the variable + * `type` set as `Formula_Variable` in the API request. The API doesn't + * support `\"persist_option\": \"RESET\"` and + * `\"persist_option\": \"NONE\"` when `variable_values` + * are defined in the request. If you are using `variable_values` for token + * generation, you must use other supported persist options such as `APPEND` or + * `REPLACE`. If you want to use `RESET` or `NONE`, do not pass + * any `variable_values`. In such cases, `variable_values` will remain + * unaffected. #### Supported objects The supported object type is `LOGICAL_TABLE`. + * When using `object_id` with `variable_values`, models are supported. #### + * Just-in-time provisioning For [just-in-time user creation and + * provisioning](https://developers.thoughtspot.com/docs/just-in-time-provisioning), specify the + * following attributes in the API request: * `auto_create` * `username` * + * `display_name` * `email` * `groups` Set `auto_create` + * to `true` if the username does not exist in ThoughtSpot. If the username already + * exists in ThoughtSpot and `auto_create` is set to `true`, user properties + * such as display name, email, Org and group entitlements will not be updated with new values. + * Setting `auto_create` to `true` does not create formula variables. Hence, + * this setting will not be applicable to `variable_values`. #### Important point to + * note All options in the token creation APIs that define user access to data in ThoughtSpot + * will take effect during token creation, not when the token is used for authentication. For + * example, `auto_create:true` will create the user when the authentication token is + * created. Persist options such as `APPEND` and `REPLACE` will persist + * `variable_values` on the user profile when the token is created. + * + * @param getCustomAccessTokenRequest (required) + * @return ApiResponse<AccessToken> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the + * response body + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 ABAC token creation was successful. -
400 Invalid request. This could be due to missing or incorrect parameters. -
401 Unauthorized access. The request could not be authenticated. -
403 Forbidden access. The user does not have permission to access this resource. -
500 An unexpected error occurred on the server. -
+ */ + public ApiResponse getCustomAccessTokenWithHttpInfo( + GetCustomAccessTokenRequest getCustomAccessTokenRequest) throws ApiException { + okhttp3.Call localVarCall = + getCustomAccessTokenValidateBeforeCall(getCustomAccessTokenRequest, null); + Type localVarReturnType = new TypeToken() {}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); + } + + /** + * (asynchronously) Version: 10.4.0.cl or later Creates an authentication token that provides + * values for the formula variables in the Row Level Security (RLS) rules for a given user. + * Recommended for use cases that require Attribute-based access control (ABAC) via RLS. #### + * Required privileges To add a new user and assign privileges during auto-creation, the + * `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege is required. If + * [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled, + * the `CONTROL_TRUSTED_AUTH` (**Can Enable or Disable Trusted Authentication**) + * privilege and edit access to the data source are required. To configure formula variables for + * all Orgs on your instance or the Primary Org, cluster administration privileges are required. + * Org administrators can configure formula variables for their respective Orgs. If Role-Based + * Access Control (RBAC) is enabled, users with the `CAN_MANAGE_VARIABLES` (**Can + * manage variables**) role privilege can also create and manage variables for their Org + * context. #### Usage guidelines You can generate a token by providing a `username` + * and `password`, or by using a `secret_key`. To generate a + * `secret_key`, the administrator must enable [Trusted + * authentication](https://developers.thoughtspot.com/docs/trusted-auth-secret-key) in the + * **Develop** > **Customizations** > **Security Settings** page. **Note**: * When both + * `password` and `secret_key` are included in the API request, + * `password` takes precedence. * If [Multi-Factor Authentication + * (MFA)](https://docs.thoughtspot.com/cloud/latest/authentication-local-mfa) is enabled on your + * instance, the API login request with `username` and `password` returns an + * error. You can switch to token-based authentication with `secret_key` or contact + * ThoughtSpot Support for assistance. The token obtained from ThoughtSpot is valid for 5 + * minutes by default. You can configure the token expiration time as required. #### ABAC via + * RLS To implement ABAC via RLS and assign security entitlements to users during session + * creation, generate a token with custom variable values. The values set in the authentication + * token are applied to the formula variables referenced in RLS rules at the table level, which + * determines the data each user can access based on their entitlements. The variable values can + * be configured to persist for a specific set of Models in user sessions initiated with the + * token, allowing different RLS rules to be set for different data models. Once defined, the + * rules are added to the user's `variable_values` object, after which all + * sessions will use the persisted values. For more information, see [ABAC via tokens + * Documentation](https://developers.thoughtspot.com/docs/abac-via-rls-variables). ##### Formula + * variables Before defining variable values, ensure the variables are created and available on + * your instance. To create a formula variable, you can use the **Create variable** + * (`/api/rest/2.0/template/variables/create`) REST API endpoint, with the variable + * `type` set as `Formula_Variable` in the API request. The API doesn't + * support `\"persist_option\": \"RESET\"` and + * `\"persist_option\": \"NONE\"` when `variable_values` + * are defined in the request. If you are using `variable_values` for token + * generation, you must use other supported persist options such as `APPEND` or + * `REPLACE`. If you want to use `RESET` or `NONE`, do not pass + * any `variable_values`. In such cases, `variable_values` will remain + * unaffected. #### Supported objects The supported object type is `LOGICAL_TABLE`. + * When using `object_id` with `variable_values`, models are supported. #### + * Just-in-time provisioning For [just-in-time user creation and + * provisioning](https://developers.thoughtspot.com/docs/just-in-time-provisioning), specify the + * following attributes in the API request: * `auto_create` * `username` * + * `display_name` * `email` * `groups` Set `auto_create` + * to `true` if the username does not exist in ThoughtSpot. If the username already + * exists in ThoughtSpot and `auto_create` is set to `true`, user properties + * such as display name, email, Org and group entitlements will not be updated with new values. + * Setting `auto_create` to `true` does not create formula variables. Hence, + * this setting will not be applicable to `variable_values`. #### Important point to + * note All options in the token creation APIs that define user access to data in ThoughtSpot + * will take effect during token creation, not when the token is used for authentication. For + * example, `auto_create:true` will create the user when the authentication token is + * created. Persist options such as `APPEND` and `REPLACE` will persist + * `variable_values` on the user profile when the token is created. + * + * @param getCustomAccessTokenRequest (required) + * @param _callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body + * object + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 ABAC token creation was successful. -
400 Invalid request. This could be due to missing or incorrect parameters. -
401 Unauthorized access. The request could not be authenticated. -
403 Forbidden access. The user does not have permission to access this resource. -
500 An unexpected error occurred on the server. -
+ */ + public okhttp3.Call getCustomAccessTokenAsync( + GetCustomAccessTokenRequest getCustomAccessTokenRequest, + final ApiCallback _callback) + throws ApiException { + + okhttp3.Call localVarCall = + getCustomAccessTokenValidateBeforeCall(getCustomAccessTokenRequest, _callback); + Type localVarReturnType = new TypeToken() {}.getType(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; + } + /** + * Build call for getFullAccessToken + * + * @param getFullAccessTokenRequest (required) + * @param _callback Callback for upload/download progress + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 Bearer auth token creation successful. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public okhttp3.Call getFullAccessTokenCall( + GetFullAccessTokenRequest getFullAccessTokenRequest, final ApiCallback _callback) + throws ApiException { + String basePath = null; + // Operation Servers + String[] localBasePaths = new String[] {}; + + // Determine Base Path to Use + if (localCustomBaseUrl != null) { + basePath = localCustomBaseUrl; + } else if (localBasePaths.length > 0) { + basePath = localBasePaths[localHostIndex]; + } else { + basePath = null; + } + + Object localVarPostBody = getFullAccessTokenRequest; + + // create path and map variables + String localVarPath = "/api/rest/2.0/auth/token/full"; + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + final String[] localVarAccepts = {"application/json"}; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = {"application/json"}; + final String localVarContentType = + localVarApiClient.selectHeaderContentType(localVarContentTypes); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } + + String[] localVarAuthNames = new String[] {}; + return localVarApiClient.buildCall( + basePath, + localVarPath, + "POST", + localVarQueryParams, + localVarCollectionQueryParams, + localVarPostBody, + localVarHeaderParams, + localVarCookieParams, + localVarFormParams, + localVarAuthNames, + _callback); + } + + @SuppressWarnings("rawtypes") + private okhttp3.Call getFullAccessTokenValidateBeforeCall( + GetFullAccessTokenRequest getFullAccessTokenRequest, final ApiCallback _callback) + throws ApiException { + // verify the required parameter 'getFullAccessTokenRequest' is set + if (getFullAccessTokenRequest == null) { + throw new ApiException( + "Missing the required parameter 'getFullAccessTokenRequest' when calling" + + " getFullAccessToken(Async)"); + } + + return getFullAccessTokenCall(getFullAccessTokenRequest, _callback); + } + + /** + * Version: 9.0.0.cl or later Generates an authentication token for creating a full session in + * ThoughtSpot for a given user. Recommended for use cases that do not require Attribute-based + * access control (ABAC) via Row Level Security (RLS). #### Usage guidelines You can generate a + * token for a user by providing a `username` and `password`, or by using + * the `secret_key` generated for your instance. To generate a `secret_key`, + * the administrator must enable [Trusted + * authentication](https://developers.thoughtspot.com/docs/trusted-auth-secret-key) in the + * **Develop** > **Customizations** > **Security Settings** page. **Note**: * When both + * `password` and `secret_key` are included in the API request, + * `password` takes precedence. * If [Multi-Factor Authentication + * (MFA)](https://docs.thoughtspot.com/cloud/latest/authentication-local-mfa) is enabled on your + * instance, the API login request with `username` and `password` returns an + * error. You can switch to token-based authentication with `secret_key` or contact + * ThoughtSpot Support for assistance. The token obtained from ThoughtSpot is valid for 5 + * minutes by default. You can configure the token expiration time as required. #### + * Just-in-time provisioning For [just-in-time user creation and + * provisioning](https://developers.thoughtspot.com/docs/just-in-time-provisioning), specify the + * following attributes in the API request: * `auto_create` * `username` * + * `display_name` * `email` * `group_identifiers` Set + * `auto_create` to `true` if the username does not exist in ThoughtSpot. If + * the user already exists in ThoughtSpot and `auto_create` is set to + * `true`, user properties such as display name, email and group assignment will be + * updated. To add a new user and assign privileges during auto-creation, the + * `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege is required. If + * [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled, + * the `CONTROL_TRUSTED_AUTH` (**Can Enable or Disable Trusted Authentication**) + * privilege is required. #### Important point to note All options in the token creation APIs + * that define user access to data in ThoughtSpot will take effect during token creation, not + * when the token is used for authentication. For example, `auto_create:true` will + * create the user when the authentication token is created. + * + * @param getFullAccessTokenRequest (required) + * @return Token + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the + * response body + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 Bearer auth token creation successful. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public Token getFullAccessToken(GetFullAccessTokenRequest getFullAccessTokenRequest) + throws ApiException { + ApiResponse localVarResp = getFullAccessTokenWithHttpInfo(getFullAccessTokenRequest); + return localVarResp.getData(); + } + + /** + * Version: 9.0.0.cl or later Generates an authentication token for creating a full session in + * ThoughtSpot for a given user. Recommended for use cases that do not require Attribute-based + * access control (ABAC) via Row Level Security (RLS). #### Usage guidelines You can generate a + * token for a user by providing a `username` and `password`, or by using + * the `secret_key` generated for your instance. To generate a `secret_key`, + * the administrator must enable [Trusted + * authentication](https://developers.thoughtspot.com/docs/trusted-auth-secret-key) in the + * **Develop** > **Customizations** > **Security Settings** page. **Note**: * When both + * `password` and `secret_key` are included in the API request, + * `password` takes precedence. * If [Multi-Factor Authentication + * (MFA)](https://docs.thoughtspot.com/cloud/latest/authentication-local-mfa) is enabled on your + * instance, the API login request with `username` and `password` returns an + * error. You can switch to token-based authentication with `secret_key` or contact + * ThoughtSpot Support for assistance. The token obtained from ThoughtSpot is valid for 5 + * minutes by default. You can configure the token expiration time as required. #### + * Just-in-time provisioning For [just-in-time user creation and + * provisioning](https://developers.thoughtspot.com/docs/just-in-time-provisioning), specify the + * following attributes in the API request: * `auto_create` * `username` * + * `display_name` * `email` * `group_identifiers` Set + * `auto_create` to `true` if the username does not exist in ThoughtSpot. If + * the user already exists in ThoughtSpot and `auto_create` is set to + * `true`, user properties such as display name, email and group assignment will be + * updated. To add a new user and assign privileges during auto-creation, the + * `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege is required. If + * [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled, + * the `CONTROL_TRUSTED_AUTH` (**Can Enable or Disable Trusted Authentication**) + * privilege is required. #### Important point to note All options in the token creation APIs + * that define user access to data in ThoughtSpot will take effect during token creation, not + * when the token is used for authentication. For example, `auto_create:true` will + * create the user when the authentication token is created. + * + * @param getFullAccessTokenRequest (required) + * @return ApiResponse<Token> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the + * response body + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 Bearer auth token creation successful. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public ApiResponse getFullAccessTokenWithHttpInfo( + GetFullAccessTokenRequest getFullAccessTokenRequest) throws ApiException { + okhttp3.Call localVarCall = + getFullAccessTokenValidateBeforeCall(getFullAccessTokenRequest, null); + Type localVarReturnType = new TypeToken() {}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); + } + + /** + * (asynchronously) Version: 9.0.0.cl or later Generates an authentication token for creating a + * full session in ThoughtSpot for a given user. Recommended for use cases that do not require + * Attribute-based access control (ABAC) via Row Level Security (RLS). #### Usage guidelines You + * can generate a token for a user by providing a `username` and `password`, + * or by using the `secret_key` generated for your instance. To generate a + * `secret_key`, the administrator must enable [Trusted + * authentication](https://developers.thoughtspot.com/docs/trusted-auth-secret-key) in the + * **Develop** > **Customizations** > **Security Settings** page. **Note**: * When both + * `password` and `secret_key` are included in the API request, + * `password` takes precedence. * If [Multi-Factor Authentication + * (MFA)](https://docs.thoughtspot.com/cloud/latest/authentication-local-mfa) is enabled on your + * instance, the API login request with `username` and `password` returns an + * error. You can switch to token-based authentication with `secret_key` or contact + * ThoughtSpot Support for assistance. The token obtained from ThoughtSpot is valid for 5 + * minutes by default. You can configure the token expiration time as required. #### + * Just-in-time provisioning For [just-in-time user creation and + * provisioning](https://developers.thoughtspot.com/docs/just-in-time-provisioning), specify the + * following attributes in the API request: * `auto_create` * `username` * + * `display_name` * `email` * `group_identifiers` Set + * `auto_create` to `true` if the username does not exist in ThoughtSpot. If + * the user already exists in ThoughtSpot and `auto_create` is set to + * `true`, user properties such as display name, email and group assignment will be + * updated. To add a new user and assign privileges during auto-creation, the + * `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege is required. If + * [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled, + * the `CONTROL_TRUSTED_AUTH` (**Can Enable or Disable Trusted Authentication**) + * privilege is required. #### Important point to note All options in the token creation APIs + * that define user access to data in ThoughtSpot will take effect during token creation, not + * when the token is used for authentication. For example, `auto_create:true` will + * create the user when the authentication token is created. + * + * @param getFullAccessTokenRequest (required) + * @param _callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body + * object + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 Bearer auth token creation successful. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public okhttp3.Call getFullAccessTokenAsync( + GetFullAccessTokenRequest getFullAccessTokenRequest, final ApiCallback _callback) + throws ApiException { + + okhttp3.Call localVarCall = + getFullAccessTokenValidateBeforeCall(getFullAccessTokenRequest, _callback); + Type localVarReturnType = new TypeToken() {}.getType(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; + } + /** + * Build call for getObjectAccessToken + * + * @param getObjectAccessTokenRequest (required) + * @param _callback Callback for upload/download progress + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 Bearer auth token creation successful. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public okhttp3.Call getObjectAccessTokenCall( + GetObjectAccessTokenRequest getObjectAccessTokenRequest, final ApiCallback _callback) + throws ApiException { + String basePath = null; + // Operation Servers + String[] localBasePaths = new String[] {}; + + // Determine Base Path to Use + if (localCustomBaseUrl != null) { + basePath = localCustomBaseUrl; + } else if (localBasePaths.length > 0) { + basePath = localBasePaths[localHostIndex]; + } else { + basePath = null; + } + + Object localVarPostBody = getObjectAccessTokenRequest; + + // create path and map variables + String localVarPath = "/api/rest/2.0/auth/token/object"; + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + final String[] localVarAccepts = {"application/json"}; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = {"application/json"}; + final String localVarContentType = + localVarApiClient.selectHeaderContentType(localVarContentTypes); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } + + String[] localVarAuthNames = new String[] {}; + return localVarApiClient.buildCall( + basePath, + localVarPath, + "POST", + localVarQueryParams, + localVarCollectionQueryParams, + localVarPostBody, + localVarHeaderParams, + localVarCookieParams, + localVarFormParams, + localVarAuthNames, + _callback); + } + + @SuppressWarnings("rawtypes") + private okhttp3.Call getObjectAccessTokenValidateBeforeCall( + GetObjectAccessTokenRequest getObjectAccessTokenRequest, final ApiCallback _callback) + throws ApiException { + // verify the required parameter 'getObjectAccessTokenRequest' is set + if (getObjectAccessTokenRequest == null) { + throw new ApiException( + "Missing the required parameter 'getObjectAccessTokenRequest' when calling" + + " getObjectAccessToken(Async)"); + } + + return getObjectAccessTokenCall(getObjectAccessTokenRequest, _callback); + } + + /** + * Version: 9.0.0.cl or later Generates an authentication token that provides access to a + * specific metadata object. This object list is intersected with the list of objects the user + * is allowed to access via group membership. For more information, see [Object + * security](https://docs.thoughtspot.com/cloud/latest/security-data-object#object_security). + * #### Usage guidelines You can generate a token for a user by providing a `username` + * and `password`, or by using the `secret_key` generated for your instance. + * To generate a `secret_key`, the administrator must enable [Trusted + * authentication](https://developers.thoughtspot.com/docs/trusted-auth-secret-key) in the + * **Develop** > **Customizations** > **Security Settings** page. **Note**: * When both + * `password` and `secret_key` are included in the API request, + * `password` takes precedence. * If [Multi-Factor Authentication + * (MFA)](https://docs.thoughtspot.com/cloud/latest/authentication-local-mfa) is enabled on your + * instance, the API login request with `username` and `password` returns an + * error. You can switch to token-based authentication with `secret_key` or contact + * ThoughtSpot Support for assistance. The token obtained from ThoughtSpot is valid for 5 + * minutes by default. You can configure the token expiration time as required. #### + * Just-in-time provisioning For [just-in-time user creation and + * provisioning](https://developers.thoughtspot.com/docs/just-in-time-provisioning), specify the + * following attributes in the API request: * `auto_create` * `username` * + * `display_name` * `email` * `group_identifiers` Set + * `auto_create` to `true` if the user is not available in ThoughtSpot. If + * the user already exists in ThoughtSpot and the `auto_create` parameter is set to + * `true`, user properties such as display name, email, and group assignment will be + * updated. To add a new user and assign privileges, the `ADMINISTRATION` (**Can + * administer ThoughtSpot**) privilege is required. If [Role-Based Access Control + * (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled, the + * `CONTROL_TRUSTED_AUTH`(**Can Enable or Disable Trusted Authentication**) privilege + * is required. #### Important point to note All options in the token creation APIs that define + * user access to data in ThoughtSpot will take effect during token creation, not when the token + * is used for authentication. For example, `auto_create:true` will create the user + * when the authentication token is created. + * + * @param getObjectAccessTokenRequest (required) + * @return Token + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the + * response body + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 Bearer auth token creation successful. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public Token getObjectAccessToken(GetObjectAccessTokenRequest getObjectAccessTokenRequest) + throws ApiException { + ApiResponse localVarResp = + getObjectAccessTokenWithHttpInfo(getObjectAccessTokenRequest); + return localVarResp.getData(); + } + + /** + * Version: 9.0.0.cl or later Generates an authentication token that provides access to a + * specific metadata object. This object list is intersected with the list of objects the user + * is allowed to access via group membership. For more information, see [Object + * security](https://docs.thoughtspot.com/cloud/latest/security-data-object#object_security). + * #### Usage guidelines You can generate a token for a user by providing a `username` + * and `password`, or by using the `secret_key` generated for your instance. + * To generate a `secret_key`, the administrator must enable [Trusted + * authentication](https://developers.thoughtspot.com/docs/trusted-auth-secret-key) in the + * **Develop** > **Customizations** > **Security Settings** page. **Note**: * When both + * `password` and `secret_key` are included in the API request, + * `password` takes precedence. * If [Multi-Factor Authentication + * (MFA)](https://docs.thoughtspot.com/cloud/latest/authentication-local-mfa) is enabled on your + * instance, the API login request with `username` and `password` returns an + * error. You can switch to token-based authentication with `secret_key` or contact + * ThoughtSpot Support for assistance. The token obtained from ThoughtSpot is valid for 5 + * minutes by default. You can configure the token expiration time as required. #### + * Just-in-time provisioning For [just-in-time user creation and + * provisioning](https://developers.thoughtspot.com/docs/just-in-time-provisioning), specify the + * following attributes in the API request: * `auto_create` * `username` * + * `display_name` * `email` * `group_identifiers` Set + * `auto_create` to `true` if the user is not available in ThoughtSpot. If + * the user already exists in ThoughtSpot and the `auto_create` parameter is set to + * `true`, user properties such as display name, email, and group assignment will be + * updated. To add a new user and assign privileges, the `ADMINISTRATION` (**Can + * administer ThoughtSpot**) privilege is required. If [Role-Based Access Control + * (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled, the + * `CONTROL_TRUSTED_AUTH`(**Can Enable or Disable Trusted Authentication**) privilege + * is required. #### Important point to note All options in the token creation APIs that define + * user access to data in ThoughtSpot will take effect during token creation, not when the token + * is used for authentication. For example, `auto_create:true` will create the user + * when the authentication token is created. + * + * @param getObjectAccessTokenRequest (required) + * @return ApiResponse<Token> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the + * response body + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 Bearer auth token creation successful. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public ApiResponse getObjectAccessTokenWithHttpInfo( + GetObjectAccessTokenRequest getObjectAccessTokenRequest) throws ApiException { + okhttp3.Call localVarCall = + getObjectAccessTokenValidateBeforeCall(getObjectAccessTokenRequest, null); + Type localVarReturnType = new TypeToken() {}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); + } + + /** + * (asynchronously) Version: 9.0.0.cl or later Generates an authentication token that provides + * access to a specific metadata object. This object list is intersected with the list of + * objects the user is allowed to access via group membership. For more information, see [Object + * security](https://docs.thoughtspot.com/cloud/latest/security-data-object#object_security). + * #### Usage guidelines You can generate a token for a user by providing a `username` + * and `password`, or by using the `secret_key` generated for your instance. + * To generate a `secret_key`, the administrator must enable [Trusted + * authentication](https://developers.thoughtspot.com/docs/trusted-auth-secret-key) in the + * **Develop** > **Customizations** > **Security Settings** page. **Note**: * When both + * `password` and `secret_key` are included in the API request, + * `password` takes precedence. * If [Multi-Factor Authentication + * (MFA)](https://docs.thoughtspot.com/cloud/latest/authentication-local-mfa) is enabled on your + * instance, the API login request with `username` and `password` returns an + * error. You can switch to token-based authentication with `secret_key` or contact + * ThoughtSpot Support for assistance. The token obtained from ThoughtSpot is valid for 5 + * minutes by default. You can configure the token expiration time as required. #### + * Just-in-time provisioning For [just-in-time user creation and + * provisioning](https://developers.thoughtspot.com/docs/just-in-time-provisioning), specify the + * following attributes in the API request: * `auto_create` * `username` * + * `display_name` * `email` * `group_identifiers` Set + * `auto_create` to `true` if the user is not available in ThoughtSpot. If + * the user already exists in ThoughtSpot and the `auto_create` parameter is set to + * `true`, user properties such as display name, email, and group assignment will be + * updated. To add a new user and assign privileges, the `ADMINISTRATION` (**Can + * administer ThoughtSpot**) privilege is required. If [Role-Based Access Control + * (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled, the + * `CONTROL_TRUSTED_AUTH`(**Can Enable or Disable Trusted Authentication**) privilege + * is required. #### Important point to note All options in the token creation APIs that define + * user access to data in ThoughtSpot will take effect during token creation, not when the token + * is used for authentication. For example, `auto_create:true` will create the user + * when the authentication token is created. + * + * @param getObjectAccessTokenRequest (required) + * @param _callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body + * object + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 Bearer auth token creation successful. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public okhttp3.Call getObjectAccessTokenAsync( + GetObjectAccessTokenRequest getObjectAccessTokenRequest, + final ApiCallback _callback) + throws ApiException { + + okhttp3.Call localVarCall = + getObjectAccessTokenValidateBeforeCall(getObjectAccessTokenRequest, _callback); + Type localVarReturnType = new TypeToken() {}.getType(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; + } + /** + * Build call for login + * + * @param loginRequest (required) + * @param _callback Callback for upload/download progress + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
204 User login successful. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public okhttp3.Call loginCall(LoginRequest loginRequest, final ApiCallback _callback) + throws ApiException { + String basePath = null; + // Operation Servers + String[] localBasePaths = new String[] {}; + + // Determine Base Path to Use + if (localCustomBaseUrl != null) { + basePath = localCustomBaseUrl; + } else if (localBasePaths.length > 0) { + basePath = localBasePaths[localHostIndex]; + } else { + basePath = null; + } + + Object localVarPostBody = loginRequest; + + // create path and map variables + String localVarPath = "/api/rest/2.0/auth/session/login"; + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + final String[] localVarAccepts = {"application/json"}; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = {"application/json"}; + final String localVarContentType = + localVarApiClient.selectHeaderContentType(localVarContentTypes); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } + + String[] localVarAuthNames = new String[] {"bearerAuth"}; + return localVarApiClient.buildCall( + basePath, + localVarPath, + "POST", + localVarQueryParams, + localVarCollectionQueryParams, + localVarPostBody, + localVarHeaderParams, + localVarCookieParams, + localVarFormParams, + localVarAuthNames, + _callback); + } + + @SuppressWarnings("rawtypes") + private okhttp3.Call loginValidateBeforeCall( + LoginRequest loginRequest, final ApiCallback _callback) throws ApiException { + // verify the required parameter 'loginRequest' is set + if (loginRequest == null) { + throw new ApiException( + "Missing the required parameter 'loginRequest' when calling login(Async)"); + } + + return loginCall(loginRequest, _callback); + } + + /** + * Version: 9.0.0.cl or later Creates a login session for a ThoughtSpot user with Basic + * authentication. In Basic authentication method, REST clients log in to ThoughtSpot using + * `username` and `password` attributes. On a multi-tenant cluster with + * Orgs, users can pass the ID of the Org in the API request to log in to a specific Org + * context. **Note**: If Multi-Factor Authentication (MFA) is enabled on your instance, the API + * login request with basic authentication (`username` and `password` ) + * returns an error. Contact ThoughtSpot Support for assistance. A successful login returns a + * session cookie that can be used in your subsequent API requests. + * + * @param loginRequest (required) + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the + * response body + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
204 User login successful. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public void login(LoginRequest loginRequest) throws ApiException { + loginWithHttpInfo(loginRequest); + } + + /** + * Version: 9.0.0.cl or later Creates a login session for a ThoughtSpot user with Basic + * authentication. In Basic authentication method, REST clients log in to ThoughtSpot using + * `username` and `password` attributes. On a multi-tenant cluster with + * Orgs, users can pass the ID of the Org in the API request to log in to a specific Org + * context. **Note**: If Multi-Factor Authentication (MFA) is enabled on your instance, the API + * login request with basic authentication (`username` and `password` ) + * returns an error. Contact ThoughtSpot Support for assistance. A successful login returns a + * session cookie that can be used in your subsequent API requests. + * + * @param loginRequest (required) + * @return ApiResponse<Void> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the + * response body + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
204 User login successful. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public ApiResponse loginWithHttpInfo(LoginRequest loginRequest) throws ApiException { + okhttp3.Call localVarCall = loginValidateBeforeCall(loginRequest, null); + return localVarApiClient.execute(localVarCall); + } + + /** + * (asynchronously) Version: 9.0.0.cl or later Creates a login session for a ThoughtSpot user + * with Basic authentication. In Basic authentication method, REST clients log in to ThoughtSpot + * using `username` and `password` attributes. On a multi-tenant cluster + * with Orgs, users can pass the ID of the Org in the API request to log in to a specific Org + * context. **Note**: If Multi-Factor Authentication (MFA) is enabled on your instance, the API + * login request with basic authentication (`username` and `password` ) + * returns an error. Contact ThoughtSpot Support for assistance. A successful login returns a + * session cookie that can be used in your subsequent API requests. + * + * @param loginRequest (required) + * @param _callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body + * object + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
204 User login successful. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public okhttp3.Call loginAsync(LoginRequest loginRequest, final ApiCallback _callback) + throws ApiException { + + okhttp3.Call localVarCall = loginValidateBeforeCall(loginRequest, _callback); + localVarApiClient.executeAsync(localVarCall, _callback); + return localVarCall; + } + /** + * Build call for logout + * + * @param _callback Callback for upload/download progress + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
204 User logout successful. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public okhttp3.Call logoutCall(final ApiCallback _callback) throws ApiException { + String basePath = null; + // Operation Servers + String[] localBasePaths = new String[] {}; + + // Determine Base Path to Use + if (localCustomBaseUrl != null) { + basePath = localCustomBaseUrl; + } else if (localBasePaths.length > 0) { + basePath = localBasePaths[localHostIndex]; + } else { + basePath = null; + } + + Object localVarPostBody = null; + + // create path and map variables + String localVarPath = "/api/rest/2.0/auth/session/logout"; + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + final String[] localVarAccepts = {"application/json"}; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = {}; + final String localVarContentType = + localVarApiClient.selectHeaderContentType(localVarContentTypes); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } + + String[] localVarAuthNames = new String[] {"bearerAuth"}; + return localVarApiClient.buildCall( + basePath, + localVarPath, + "POST", + localVarQueryParams, + localVarCollectionQueryParams, + localVarPostBody, + localVarHeaderParams, + localVarCookieParams, + localVarFormParams, + localVarAuthNames, + _callback); + } + + @SuppressWarnings("rawtypes") + private okhttp3.Call logoutValidateBeforeCall(final ApiCallback _callback) throws ApiException { + return logoutCall(_callback); + } + + /** + * Version: 9.0.0.cl or later Logs out a user from their current session. + * + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the + * response body + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
204 User logout successful. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public void logout() throws ApiException { + logoutWithHttpInfo(); + } + + /** + * Version: 9.0.0.cl or later Logs out a user from their current session. + * + * @return ApiResponse<Void> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the + * response body + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
204 User logout successful. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public ApiResponse logoutWithHttpInfo() throws ApiException { + okhttp3.Call localVarCall = logoutValidateBeforeCall(null); + return localVarApiClient.execute(localVarCall); + } + + /** + * (asynchronously) Version: 9.0.0.cl or later Logs out a user from their current session. + * + * @param _callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body + * object + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
204 User logout successful. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public okhttp3.Call logoutAsync(final ApiCallback _callback) throws ApiException { + + okhttp3.Call localVarCall = logoutValidateBeforeCall(_callback); + localVarApiClient.executeAsync(localVarCall, _callback); + return localVarCall; + } + /** + * Build call for revokeToken + * + * @param revokeTokenRequest (required) + * @param _callback Callback for upload/download progress + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
204 Token successfully revoked. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public okhttp3.Call revokeTokenCall( + RevokeTokenRequest revokeTokenRequest, final ApiCallback _callback) + throws ApiException { + String basePath = null; + // Operation Servers + String[] localBasePaths = new String[] {}; + + // Determine Base Path to Use + if (localCustomBaseUrl != null) { + basePath = localCustomBaseUrl; + } else if (localBasePaths.length > 0) { + basePath = localBasePaths[localHostIndex]; + } else { + basePath = null; + } + + Object localVarPostBody = revokeTokenRequest; + + // create path and map variables + String localVarPath = "/api/rest/2.0/auth/token/revoke"; + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + final String[] localVarAccepts = {"application/json"}; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = {"application/json"}; + final String localVarContentType = + localVarApiClient.selectHeaderContentType(localVarContentTypes); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } + + String[] localVarAuthNames = new String[] {"bearerAuth"}; + return localVarApiClient.buildCall( + basePath, + localVarPath, + "POST", + localVarQueryParams, + localVarCollectionQueryParams, + localVarPostBody, + localVarHeaderParams, + localVarCookieParams, + localVarFormParams, + localVarAuthNames, + _callback); + } + + @SuppressWarnings("rawtypes") + private okhttp3.Call revokeTokenValidateBeforeCall( + RevokeTokenRequest revokeTokenRequest, final ApiCallback _callback) + throws ApiException { + // verify the required parameter 'revokeTokenRequest' is set + if (revokeTokenRequest == null) { + throw new ApiException( + "Missing the required parameter 'revokeTokenRequest' when calling" + + " revokeToken(Async)"); + } + + return revokeTokenCall(revokeTokenRequest, _callback); + } + + /** + * Version: 9.0.0.cl or later Revokes the authentication token issued for current user session. + * The token of your current session expires when you make a call to the + * `/api/rest/2.0/auth/token/revoke` endpoint. the users will not be able to access + * ThoughtSpot objects until a new token is obtained. To restart your session, request for a new + * token from ThoughtSpot. See [Get Full Access + * Token](#/http/api-endpoints/authentication/get-full-access-token). + * + * @param revokeTokenRequest (required) + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the + * response body + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
204 Token successfully revoked. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public void revokeToken(RevokeTokenRequest revokeTokenRequest) throws ApiException { + revokeTokenWithHttpInfo(revokeTokenRequest); + } + + /** + * Version: 9.0.0.cl or later Revokes the authentication token issued for current user session. + * The token of your current session expires when you make a call to the + * `/api/rest/2.0/auth/token/revoke` endpoint. the users will not be able to access + * ThoughtSpot objects until a new token is obtained. To restart your session, request for a new + * token from ThoughtSpot. See [Get Full Access + * Token](#/http/api-endpoints/authentication/get-full-access-token). + * + * @param revokeTokenRequest (required) + * @return ApiResponse<Void> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the + * response body + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
204 Token successfully revoked. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public ApiResponse revokeTokenWithHttpInfo(RevokeTokenRequest revokeTokenRequest) + throws ApiException { + okhttp3.Call localVarCall = revokeTokenValidateBeforeCall(revokeTokenRequest, null); + return localVarApiClient.execute(localVarCall); + } + + /** + * (asynchronously) Version: 9.0.0.cl or later Revokes the authentication token issued for + * current user session. The token of your current session expires when you make a call to the + * `/api/rest/2.0/auth/token/revoke` endpoint. the users will not be able to access + * ThoughtSpot objects until a new token is obtained. To restart your session, request for a new + * token from ThoughtSpot. See [Get Full Access + * Token](#/http/api-endpoints/authentication/get-full-access-token). + * + * @param revokeTokenRequest (required) + * @param _callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body + * object + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
204 Token successfully revoked. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public okhttp3.Call revokeTokenAsync( + RevokeTokenRequest revokeTokenRequest, final ApiCallback _callback) + throws ApiException { + + okhttp3.Call localVarCall = revokeTokenValidateBeforeCall(revokeTokenRequest, _callback); + localVarApiClient.executeAsync(localVarCall, _callback); + return localVarCall; + } + /** + * Build call for searchAuthSettings + * + * @param searchAuthSettingsRequest (required) + * @param _callback Callback for upload/download progress + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 Authentication settings retrieved successfully. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public okhttp3.Call searchAuthSettingsCall( + SearchAuthSettingsRequest searchAuthSettingsRequest, final ApiCallback _callback) + throws ApiException { + String basePath = null; + // Operation Servers + String[] localBasePaths = new String[] {}; + + // Determine Base Path to Use + if (localCustomBaseUrl != null) { + basePath = localCustomBaseUrl; + } else if (localBasePaths.length > 0) { + basePath = localBasePaths[localHostIndex]; + } else { + basePath = null; + } + + Object localVarPostBody = searchAuthSettingsRequest; + + // create path and map variables + String localVarPath = "/api/rest/2.0/auth/search"; + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + final String[] localVarAccepts = {"application/json"}; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = {"application/json"}; + final String localVarContentType = + localVarApiClient.selectHeaderContentType(localVarContentTypes); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } + + String[] localVarAuthNames = new String[] {"bearerAuth"}; + return localVarApiClient.buildCall( + basePath, + localVarPath, + "POST", + localVarQueryParams, + localVarCollectionQueryParams, + localVarPostBody, + localVarHeaderParams, + localVarCookieParams, + localVarFormParams, + localVarAuthNames, + _callback); + } + + @SuppressWarnings("rawtypes") + private okhttp3.Call searchAuthSettingsValidateBeforeCall( + SearchAuthSettingsRequest searchAuthSettingsRequest, final ApiCallback _callback) + throws ApiException { + // verify the required parameter 'searchAuthSettingsRequest' is set + if (searchAuthSettingsRequest == null) { + throw new ApiException( + "Missing the required parameter 'searchAuthSettingsRequest' when calling" + + " searchAuthSettings(Async)"); + } + + return searchAuthSettingsCall(searchAuthSettingsRequest, _callback); + } + + /** + * Version: 26.6.0.cl or later Returns the authentication configuration for the specified auth + * type at cluster and org level. Currently supports `TRUSTED_AUTH`. #### Required + * privileges Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) or + * `CONTROL_TRUSTED_AUTH` (**Can Enable or Disable Trusted Authentication**) + * privilege. If [Role-Based Access Control + * (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled, the + * `CONTROL_TRUSTED_AUTH` privilege is required. #### Usage guidelines Use + * `scope` to control which level of settings are returned: - `CLUSTER` — + * Returns cluster-level authentication status and access tokens. Accessible only from the + * Primary Org. - `ORG` — Returns org-level authentication status and access tokens + * for the current Org. Requires the per-Org authentication feature to be enabled on your + * instance. - If `scope` is omitted, both cluster and org-level settings are returned + * based on the caller's org context and feature availability. The `access_tokens` + * array in `cluster_preferences` or `org_preferences` is omitted when no + * token is configured at that level. **Note**: Access tokens returned in the response are + * sensitive credentials. Treat them with the same care as passwords. + * + * @param searchAuthSettingsRequest (required) + * @return SearchAuthSettingsResponse + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the + * response body + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 Authentication settings retrieved successfully. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public SearchAuthSettingsResponse searchAuthSettings( + SearchAuthSettingsRequest searchAuthSettingsRequest) throws ApiException { + ApiResponse localVarResp = + searchAuthSettingsWithHttpInfo(searchAuthSettingsRequest); + return localVarResp.getData(); + } + + /** + * Version: 26.6.0.cl or later Returns the authentication configuration for the specified auth + * type at cluster and org level. Currently supports `TRUSTED_AUTH`. #### Required + * privileges Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) or + * `CONTROL_TRUSTED_AUTH` (**Can Enable or Disable Trusted Authentication**) + * privilege. If [Role-Based Access Control + * (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled, the + * `CONTROL_TRUSTED_AUTH` privilege is required. #### Usage guidelines Use + * `scope` to control which level of settings are returned: - `CLUSTER` — + * Returns cluster-level authentication status and access tokens. Accessible only from the + * Primary Org. - `ORG` — Returns org-level authentication status and access tokens + * for the current Org. Requires the per-Org authentication feature to be enabled on your + * instance. - If `scope` is omitted, both cluster and org-level settings are returned + * based on the caller's org context and feature availability. The `access_tokens` + * array in `cluster_preferences` or `org_preferences` is omitted when no + * token is configured at that level. **Note**: Access tokens returned in the response are + * sensitive credentials. Treat them with the same care as passwords. + * + * @param searchAuthSettingsRequest (required) + * @return ApiResponse<SearchAuthSettingsResponse> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the + * response body + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 Authentication settings retrieved successfully. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public ApiResponse searchAuthSettingsWithHttpInfo( + SearchAuthSettingsRequest searchAuthSettingsRequest) throws ApiException { + okhttp3.Call localVarCall = + searchAuthSettingsValidateBeforeCall(searchAuthSettingsRequest, null); + Type localVarReturnType = new TypeToken() {}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); + } + + /** + * (asynchronously) Version: 26.6.0.cl or later Returns the authentication configuration for the + * specified auth type at cluster and org level. Currently supports `TRUSTED_AUTH`. + * #### Required privileges Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) + * or `CONTROL_TRUSTED_AUTH` (**Can Enable or Disable Trusted Authentication**) + * privilege. If [Role-Based Access Control + * (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled, the + * `CONTROL_TRUSTED_AUTH` privilege is required. #### Usage guidelines Use + * `scope` to control which level of settings are returned: - `CLUSTER` — + * Returns cluster-level authentication status and access tokens. Accessible only from the + * Primary Org. - `ORG` — Returns org-level authentication status and access tokens + * for the current Org. Requires the per-Org authentication feature to be enabled on your + * instance. - If `scope` is omitted, both cluster and org-level settings are returned + * based on the caller's org context and feature availability. The `access_tokens` + * array in `cluster_preferences` or `org_preferences` is omitted when no + * token is configured at that level. **Note**: Access tokens returned in the response are + * sensitive credentials. Treat them with the same care as passwords. + * + * @param searchAuthSettingsRequest (required) + * @param _callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body + * object + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 Authentication settings retrieved successfully. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public okhttp3.Call searchAuthSettingsAsync( + SearchAuthSettingsRequest searchAuthSettingsRequest, + final ApiCallback _callback) + throws ApiException { + + okhttp3.Call localVarCall = + searchAuthSettingsValidateBeforeCall(searchAuthSettingsRequest, _callback); + Type localVarReturnType = new TypeToken() {}.getType(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; + } + /** + * Build call for validateToken + * + * @param validateTokenRequest (required) + * @param _callback Callback for upload/download progress + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 Token validation successful. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public okhttp3.Call validateTokenCall( + ValidateTokenRequest validateTokenRequest, final ApiCallback _callback) + throws ApiException { + String basePath = null; + // Operation Servers + String[] localBasePaths = new String[] {}; + + // Determine Base Path to Use + if (localCustomBaseUrl != null) { + basePath = localCustomBaseUrl; + } else if (localBasePaths.length > 0) { + basePath = localBasePaths[localHostIndex]; + } else { + basePath = null; + } + + Object localVarPostBody = validateTokenRequest; + + // create path and map variables + String localVarPath = "/api/rest/2.0/auth/token/validate"; + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + final String[] localVarAccepts = {"application/json"}; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = {"application/json"}; + final String localVarContentType = + localVarApiClient.selectHeaderContentType(localVarContentTypes); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } + + String[] localVarAuthNames = new String[] {"bearerAuth"}; + return localVarApiClient.buildCall( + basePath, + localVarPath, + "POST", + localVarQueryParams, + localVarCollectionQueryParams, + localVarPostBody, + localVarHeaderParams, + localVarCookieParams, + localVarFormParams, + localVarAuthNames, + _callback); + } + + @SuppressWarnings("rawtypes") + private okhttp3.Call validateTokenValidateBeforeCall( + ValidateTokenRequest validateTokenRequest, final ApiCallback _callback) + throws ApiException { + // verify the required parameter 'validateTokenRequest' is set + if (validateTokenRequest == null) { + throw new ApiException( + "Missing the required parameter 'validateTokenRequest' when calling" + + " validateToken(Async)"); + } + + return validateTokenCall(validateTokenRequest, _callback); + } + + /** + * Version: 9.12.0.cl or later Validates the authentication token specified in the API request. + * If your token is not valid, [Get a new + * token](#/http/api-endpoints/authentication/get-full-access-token). + * + * @param validateTokenRequest (required) + * @return TokenValidationResponse + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the + * response body + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 Token validation successful. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public TokenValidationResponse validateToken(ValidateTokenRequest validateTokenRequest) + throws ApiException { + ApiResponse localVarResp = + validateTokenWithHttpInfo(validateTokenRequest); + return localVarResp.getData(); + } + + /** + * Version: 9.12.0.cl or later Validates the authentication token specified in the API request. + * If your token is not valid, [Get a new + * token](#/http/api-endpoints/authentication/get-full-access-token). + * + * @param validateTokenRequest (required) + * @return ApiResponse<TokenValidationResponse> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the + * response body + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 Token validation successful. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public ApiResponse validateTokenWithHttpInfo( + ValidateTokenRequest validateTokenRequest) throws ApiException { + okhttp3.Call localVarCall = validateTokenValidateBeforeCall(validateTokenRequest, null); + Type localVarReturnType = new TypeToken() {}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); + } + + /** + * (asynchronously) Version: 9.12.0.cl or later Validates the authentication token specified in + * the API request. If your token is not valid, [Get a new + * token](#/http/api-endpoints/authentication/get-full-access-token). + * + * @param validateTokenRequest (required) + * @param _callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body + * object + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 Token validation successful. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public okhttp3.Call validateTokenAsync( + ValidateTokenRequest validateTokenRequest, + final ApiCallback _callback) + throws ApiException { + + okhttp3.Call localVarCall = + validateTokenValidateBeforeCall(validateTokenRequest, _callback); + Type localVarReturnType = new TypeToken() {}.getType(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; + } +} diff --git a/sdks/java/src/main/java/com/thoughtspot/client/api/CollectionsApi.java b/sdks/java/src/main/java/com/thoughtspot/client/api/CollectionsApi.java new file mode 100644 index 000000000..a4ed256ae --- /dev/null +++ b/sdks/java/src/main/java/com/thoughtspot/client/api/CollectionsApi.java @@ -0,0 +1,876 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client.api; + +import com.google.gson.reflect.TypeToken; +import com.thoughtspot.client.ApiCallback; +import com.thoughtspot.client.ApiClient; +import com.thoughtspot.client.ApiClientConfiguration; +import com.thoughtspot.client.ApiException; +import com.thoughtspot.client.ApiResponse; +import com.thoughtspot.client.Configuration; +import com.thoughtspot.client.Pair; +import com.thoughtspot.client.model.Collection; +import com.thoughtspot.client.model.CollectionDeleteResponse; +import com.thoughtspot.client.model.CollectionSearchResponse; +import com.thoughtspot.client.model.CreateCollectionRequest; +import com.thoughtspot.client.model.DeleteCollectionRequest; +import com.thoughtspot.client.model.SearchCollectionsRequest; +import com.thoughtspot.client.model.UpdateCollectionRequest; +import java.lang.reflect.Type; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +@javax.annotation.Generated( + value = "org.openapitools.codegen.languages.JavaClientCodegen", + comments = "Generator version: 7.12.0") +public class CollectionsApi { + private ApiClient localVarApiClient; + private ApiClientConfiguration localVarApiClientConfiguration; + private int localHostIndex; + private String localCustomBaseUrl; + + public CollectionsApi() { + this(Configuration.getDefaultApiClient()); + } + + public CollectionsApi(ApiClient apiClient) { + this.localVarApiClient = apiClient; + } + + public CollectionsApi(ApiClientConfiguration apiClientConfiguration) { + this.localVarApiClientConfiguration = apiClientConfiguration; + this.localVarApiClient = new ApiClient(apiClientConfiguration); + } + + public ApiClient getApiClient() { + return localVarApiClient; + } + + public void setApiClient(ApiClient apiClient) { + this.localVarApiClient = apiClient; + } + + public ApiClientConfiguration getApiClientConfiguration() { + return localVarApiClientConfiguration; + } + + public void applyApiClientConfiguration(ApiClientConfiguration apiClientConfiguration) { + this.localVarApiClientConfiguration = apiClientConfiguration; + if (localVarApiClient != null) { + localVarApiClient.applyApiClientConfiguration(apiClientConfiguration); + } else { + localVarApiClient = new ApiClient(apiClientConfiguration); + } + } + + public int getHostIndex() { + return localHostIndex; + } + + public void setHostIndex(int hostIndex) { + this.localHostIndex = hostIndex; + } + + public String getCustomBaseUrl() { + return localCustomBaseUrl; + } + + public void setCustomBaseUrl(String customBaseUrl) { + this.localCustomBaseUrl = customBaseUrl; + } + + /** + * Build call for createCollection + * + * @param createCollectionRequest (required) + * @param _callback Callback for upload/download progress + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 Collection created successfully -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public okhttp3.Call createCollectionCall( + CreateCollectionRequest createCollectionRequest, final ApiCallback _callback) + throws ApiException { + String basePath = null; + // Operation Servers + String[] localBasePaths = new String[] {}; + + // Determine Base Path to Use + if (localCustomBaseUrl != null) { + basePath = localCustomBaseUrl; + } else if (localBasePaths.length > 0) { + basePath = localBasePaths[localHostIndex]; + } else { + basePath = null; + } + + Object localVarPostBody = createCollectionRequest; + + // create path and map variables + String localVarPath = "/api/rest/2.0/collections/create"; + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + final String[] localVarAccepts = {"application/json"}; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = {"application/json"}; + final String localVarContentType = + localVarApiClient.selectHeaderContentType(localVarContentTypes); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } + + String[] localVarAuthNames = new String[] {"bearerAuth"}; + return localVarApiClient.buildCall( + basePath, + localVarPath, + "POST", + localVarQueryParams, + localVarCollectionQueryParams, + localVarPostBody, + localVarHeaderParams, + localVarCookieParams, + localVarFormParams, + localVarAuthNames, + _callback); + } + + @SuppressWarnings("rawtypes") + private okhttp3.Call createCollectionValidateBeforeCall( + CreateCollectionRequest createCollectionRequest, final ApiCallback _callback) + throws ApiException { + // verify the required parameter 'createCollectionRequest' is set + if (createCollectionRequest == null) { + throw new ApiException( + "Missing the required parameter 'createCollectionRequest' when calling" + + " createCollection(Async)"); + } + + return createCollectionCall(createCollectionRequest, _callback); + } + + /** + * Version: 26.4.0.cl or later Creates a new collection in ThoughtSpot. Collections allow you to + * organize and group related metadata objects such as Liveboards, Answers, worksheets, and + * other data objects. You can also create nested collections (sub-collections) to build a + * hierarchical structure. #### Supported operations The API endpoint lets you perform the + * following operations: * Create a new collection * Add metadata objects (Liveboards, Answers, + * Logical Tables) to the collection * Create nested collections by adding sub-collections + * + * @param createCollectionRequest (required) + * @return Collection + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the + * response body + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 Collection created successfully -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public Collection createCollection(CreateCollectionRequest createCollectionRequest) + throws ApiException { + ApiResponse localVarResp = + createCollectionWithHttpInfo(createCollectionRequest); + return localVarResp.getData(); + } + + /** + * Version: 26.4.0.cl or later Creates a new collection in ThoughtSpot. Collections allow you to + * organize and group related metadata objects such as Liveboards, Answers, worksheets, and + * other data objects. You can also create nested collections (sub-collections) to build a + * hierarchical structure. #### Supported operations The API endpoint lets you perform the + * following operations: * Create a new collection * Add metadata objects (Liveboards, Answers, + * Logical Tables) to the collection * Create nested collections by adding sub-collections + * + * @param createCollectionRequest (required) + * @return ApiResponse<Collection> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the + * response body + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 Collection created successfully -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public ApiResponse createCollectionWithHttpInfo( + CreateCollectionRequest createCollectionRequest) throws ApiException { + okhttp3.Call localVarCall = + createCollectionValidateBeforeCall(createCollectionRequest, null); + Type localVarReturnType = new TypeToken() {}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); + } + + /** + * (asynchronously) Version: 26.4.0.cl or later Creates a new collection in ThoughtSpot. + * Collections allow you to organize and group related metadata objects such as Liveboards, + * Answers, worksheets, and other data objects. You can also create nested collections + * (sub-collections) to build a hierarchical structure. #### Supported operations The API + * endpoint lets you perform the following operations: * Create a new collection * Add metadata + * objects (Liveboards, Answers, Logical Tables) to the collection * Create nested collections + * by adding sub-collections + * + * @param createCollectionRequest (required) + * @param _callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body + * object + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 Collection created successfully -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public okhttp3.Call createCollectionAsync( + CreateCollectionRequest createCollectionRequest, + final ApiCallback _callback) + throws ApiException { + + okhttp3.Call localVarCall = + createCollectionValidateBeforeCall(createCollectionRequest, _callback); + Type localVarReturnType = new TypeToken() {}.getType(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; + } + /** + * Build call for deleteCollection + * + * @param deleteCollectionRequest (required) + * @param _callback Callback for upload/download progress + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + * @http.response.details + * + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 Collections deleted successfully. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
404 Resource not found. -
500 Unexpected error -
+ */ + public okhttp3.Call deleteCollectionCall( + DeleteCollectionRequest deleteCollectionRequest, final ApiCallback _callback) + throws ApiException { + String basePath = null; + // Operation Servers + String[] localBasePaths = new String[] {}; + + // Determine Base Path to Use + if (localCustomBaseUrl != null) { + basePath = localCustomBaseUrl; + } else if (localBasePaths.length > 0) { + basePath = localBasePaths[localHostIndex]; + } else { + basePath = null; + } + + Object localVarPostBody = deleteCollectionRequest; + + // create path and map variables + String localVarPath = "/api/rest/2.0/collections/delete"; + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + final String[] localVarAccepts = {"application/json"}; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = {"application/json"}; + final String localVarContentType = + localVarApiClient.selectHeaderContentType(localVarContentTypes); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } + + String[] localVarAuthNames = new String[] {"bearerAuth"}; + return localVarApiClient.buildCall( + basePath, + localVarPath, + "POST", + localVarQueryParams, + localVarCollectionQueryParams, + localVarPostBody, + localVarHeaderParams, + localVarCookieParams, + localVarFormParams, + localVarAuthNames, + _callback); + } + + @SuppressWarnings("rawtypes") + private okhttp3.Call deleteCollectionValidateBeforeCall( + DeleteCollectionRequest deleteCollectionRequest, final ApiCallback _callback) + throws ApiException { + // verify the required parameter 'deleteCollectionRequest' is set + if (deleteCollectionRequest == null) { + throw new ApiException( + "Missing the required parameter 'deleteCollectionRequest' when calling" + + " deleteCollection(Async)"); + } + + return deleteCollectionCall(deleteCollectionRequest, _callback); + } + + /** + * Version: 26.4.0.cl or later Deletes one or more collections from ThoughtSpot. #### Delete + * options * **delete_children**: When set to `true`, deletes the child objects + * (metadata items) within the collection that the user has access to. Objects that the user + * does not have permission to delete will be skipped. * **dry_run**: When set to + * `true`, performs a preview of the deletion operation without actually deleting + * anything. The response shows what would be deleted, allowing you to review before committing + * the deletion. #### Response The response includes: * **metadata_deleted**: List of metadata + * objects that were successfully deleted * **metadata_skipped**: List of metadata objects that + * were skipped due to lack of permissions or other constraints + * + * @param deleteCollectionRequest (required) + * @return CollectionDeleteResponse + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the + * response body + * @http.response.details + * + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 Collections deleted successfully. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
404 Resource not found. -
500 Unexpected error -
+ */ + public CollectionDeleteResponse deleteCollection( + DeleteCollectionRequest deleteCollectionRequest) throws ApiException { + ApiResponse localVarResp = + deleteCollectionWithHttpInfo(deleteCollectionRequest); + return localVarResp.getData(); + } + + /** + * Version: 26.4.0.cl or later Deletes one or more collections from ThoughtSpot. #### Delete + * options * **delete_children**: When set to `true`, deletes the child objects + * (metadata items) within the collection that the user has access to. Objects that the user + * does not have permission to delete will be skipped. * **dry_run**: When set to + * `true`, performs a preview of the deletion operation without actually deleting + * anything. The response shows what would be deleted, allowing you to review before committing + * the deletion. #### Response The response includes: * **metadata_deleted**: List of metadata + * objects that were successfully deleted * **metadata_skipped**: List of metadata objects that + * were skipped due to lack of permissions or other constraints + * + * @param deleteCollectionRequest (required) + * @return ApiResponse<CollectionDeleteResponse> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the + * response body + * @http.response.details + * + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 Collections deleted successfully. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
404 Resource not found. -
500 Unexpected error -
+ */ + public ApiResponse deleteCollectionWithHttpInfo( + DeleteCollectionRequest deleteCollectionRequest) throws ApiException { + okhttp3.Call localVarCall = + deleteCollectionValidateBeforeCall(deleteCollectionRequest, null); + Type localVarReturnType = new TypeToken() {}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); + } + + /** + * (asynchronously) Version: 26.4.0.cl or later Deletes one or more collections from + * ThoughtSpot. #### Delete options * **delete_children**: When set to `true`, deletes + * the child objects (metadata items) within the collection that the user has access to. Objects + * that the user does not have permission to delete will be skipped. * **dry_run**: When set to + * `true`, performs a preview of the deletion operation without actually deleting + * anything. The response shows what would be deleted, allowing you to review before committing + * the deletion. #### Response The response includes: * **metadata_deleted**: List of metadata + * objects that were successfully deleted * **metadata_skipped**: List of metadata objects that + * were skipped due to lack of permissions or other constraints + * + * @param deleteCollectionRequest (required) + * @param _callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body + * object + * @http.response.details + * + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 Collections deleted successfully. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
404 Resource not found. -
500 Unexpected error -
+ */ + public okhttp3.Call deleteCollectionAsync( + DeleteCollectionRequest deleteCollectionRequest, + final ApiCallback _callback) + throws ApiException { + + okhttp3.Call localVarCall = + deleteCollectionValidateBeforeCall(deleteCollectionRequest, _callback); + Type localVarReturnType = new TypeToken() {}.getType(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; + } + /** + * Build call for searchCollections + * + * @param searchCollectionsRequest (required) + * @param _callback Callback for upload/download progress + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 Successfully retrieved list of collections -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public okhttp3.Call searchCollectionsCall( + SearchCollectionsRequest searchCollectionsRequest, final ApiCallback _callback) + throws ApiException { + String basePath = null; + // Operation Servers + String[] localBasePaths = new String[] {}; + + // Determine Base Path to Use + if (localCustomBaseUrl != null) { + basePath = localCustomBaseUrl; + } else if (localBasePaths.length > 0) { + basePath = localBasePaths[localHostIndex]; + } else { + basePath = null; + } + + Object localVarPostBody = searchCollectionsRequest; + + // create path and map variables + String localVarPath = "/api/rest/2.0/collections/search"; + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + final String[] localVarAccepts = {"application/json"}; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = {"application/json"}; + final String localVarContentType = + localVarApiClient.selectHeaderContentType(localVarContentTypes); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } + + String[] localVarAuthNames = new String[] {"bearerAuth"}; + return localVarApiClient.buildCall( + basePath, + localVarPath, + "POST", + localVarQueryParams, + localVarCollectionQueryParams, + localVarPostBody, + localVarHeaderParams, + localVarCookieParams, + localVarFormParams, + localVarAuthNames, + _callback); + } + + @SuppressWarnings("rawtypes") + private okhttp3.Call searchCollectionsValidateBeforeCall( + SearchCollectionsRequest searchCollectionsRequest, final ApiCallback _callback) + throws ApiException { + // verify the required parameter 'searchCollectionsRequest' is set + if (searchCollectionsRequest == null) { + throw new ApiException( + "Missing the required parameter 'searchCollectionsRequest' when calling" + + " searchCollections(Async)"); + } + + return searchCollectionsCall(searchCollectionsRequest, _callback); + } + + /** + * Version: 26.4.0.cl or later Gets a list of collections available in ThoughtSpot. To get + * details of a specific collection, specify the collection GUID or name. You can also filter + * the API response based on the collection name pattern, author, and other criteria. #### + * Search options * **name_pattern**: Use '%' as a wildcard character to match + * collection names * **collection_identifiers**: Search for specific collections by their GUIDs + * or names * **include_metadata**: When set to `true`, includes the metadata objects + * within each collection in the response **NOTE**: If the API returns an empty list, consider + * increasing the value of the `record_size` parameter. To search across all available + * collections, set `record_size` to `-1`. + * + * @param searchCollectionsRequest (required) + * @return CollectionSearchResponse + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the + * response body + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 Successfully retrieved list of collections -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public CollectionSearchResponse searchCollections( + SearchCollectionsRequest searchCollectionsRequest) throws ApiException { + ApiResponse localVarResp = + searchCollectionsWithHttpInfo(searchCollectionsRequest); + return localVarResp.getData(); + } + + /** + * Version: 26.4.0.cl or later Gets a list of collections available in ThoughtSpot. To get + * details of a specific collection, specify the collection GUID or name. You can also filter + * the API response based on the collection name pattern, author, and other criteria. #### + * Search options * **name_pattern**: Use '%' as a wildcard character to match + * collection names * **collection_identifiers**: Search for specific collections by their GUIDs + * or names * **include_metadata**: When set to `true`, includes the metadata objects + * within each collection in the response **NOTE**: If the API returns an empty list, consider + * increasing the value of the `record_size` parameter. To search across all available + * collections, set `record_size` to `-1`. + * + * @param searchCollectionsRequest (required) + * @return ApiResponse<CollectionSearchResponse> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the + * response body + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 Successfully retrieved list of collections -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public ApiResponse searchCollectionsWithHttpInfo( + SearchCollectionsRequest searchCollectionsRequest) throws ApiException { + okhttp3.Call localVarCall = + searchCollectionsValidateBeforeCall(searchCollectionsRequest, null); + Type localVarReturnType = new TypeToken() {}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); + } + + /** + * (asynchronously) Version: 26.4.0.cl or later Gets a list of collections available in + * ThoughtSpot. To get details of a specific collection, specify the collection GUID or name. + * You can also filter the API response based on the collection name pattern, author, and other + * criteria. #### Search options * **name_pattern**: Use '%' as a wildcard character to + * match collection names * **collection_identifiers**: Search for specific collections by their + * GUIDs or names * **include_metadata**: When set to `true`, includes the metadata + * objects within each collection in the response **NOTE**: If the API returns an empty list, + * consider increasing the value of the `record_size` parameter. To search across all + * available collections, set `record_size` to `-1`. + * + * @param searchCollectionsRequest (required) + * @param _callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body + * object + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 Successfully retrieved list of collections -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public okhttp3.Call searchCollectionsAsync( + SearchCollectionsRequest searchCollectionsRequest, + final ApiCallback _callback) + throws ApiException { + + okhttp3.Call localVarCall = + searchCollectionsValidateBeforeCall(searchCollectionsRequest, _callback); + Type localVarReturnType = new TypeToken() {}.getType(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; + } + /** + * Build call for updateCollection + * + * @param collectionIdentifier Unique GUID of the collection. Note: Collection names cannot be + * used as identifiers since duplicate names are allowed. (required) + * @param updateCollectionRequest (required) + * @param _callback Callback for upload/download progress + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + * @http.response.details + * + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
204 Collection updated successfully. No content returned. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
404 Resource not found. -
500 Unexpected error -
+ */ + public okhttp3.Call updateCollectionCall( + String collectionIdentifier, + UpdateCollectionRequest updateCollectionRequest, + final ApiCallback _callback) + throws ApiException { + String basePath = null; + // Operation Servers + String[] localBasePaths = new String[] {}; + + // Determine Base Path to Use + if (localCustomBaseUrl != null) { + basePath = localCustomBaseUrl; + } else if (localBasePaths.length > 0) { + basePath = localBasePaths[localHostIndex]; + } else { + basePath = null; + } + + Object localVarPostBody = updateCollectionRequest; + + // create path and map variables + String localVarPath = + "/api/rest/2.0/collections/{collection_identifier}/update" + .replace( + "{" + "collection_identifier" + "}", + localVarApiClient.escapeString(collectionIdentifier.toString())); + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + final String[] localVarAccepts = {"application/json"}; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = {"application/json"}; + final String localVarContentType = + localVarApiClient.selectHeaderContentType(localVarContentTypes); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } + + String[] localVarAuthNames = new String[] {"bearerAuth"}; + return localVarApiClient.buildCall( + basePath, + localVarPath, + "POST", + localVarQueryParams, + localVarCollectionQueryParams, + localVarPostBody, + localVarHeaderParams, + localVarCookieParams, + localVarFormParams, + localVarAuthNames, + _callback); + } + + @SuppressWarnings("rawtypes") + private okhttp3.Call updateCollectionValidateBeforeCall( + String collectionIdentifier, + UpdateCollectionRequest updateCollectionRequest, + final ApiCallback _callback) + throws ApiException { + // verify the required parameter 'collectionIdentifier' is set + if (collectionIdentifier == null) { + throw new ApiException( + "Missing the required parameter 'collectionIdentifier' when calling" + + " updateCollection(Async)"); + } + + // verify the required parameter 'updateCollectionRequest' is set + if (updateCollectionRequest == null) { + throw new ApiException( + "Missing the required parameter 'updateCollectionRequest' when calling" + + " updateCollection(Async)"); + } + + return updateCollectionCall(collectionIdentifier, updateCollectionRequest, _callback); + } + + /** + * Version: 26.4.0.cl or later Updates an existing collection in ThoughtSpot. #### Supported + * operations This API endpoint lets you perform the following operations: * Update collection + * name and description * Change visibility settings * Add metadata objects to the collection + * (operation: ADD) * Remove metadata objects from the collection (operation: REMOVE) * Replace + * all metadata objects in the collection (operation: REPLACE) #### Operation types * **ADD**: + * Adds the specified metadata objects to the existing collection without removing current items + * * **REMOVE**: Removes only the specified metadata objects from the collection * **REPLACE**: + * Replaces all existing metadata objects with the specified items (default behavior) + * + * @param collectionIdentifier Unique GUID of the collection. Note: Collection names cannot be + * used as identifiers since duplicate names are allowed. (required) + * @param updateCollectionRequest (required) + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the + * response body + * @http.response.details + * + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
204 Collection updated successfully. No content returned. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
404 Resource not found. -
500 Unexpected error -
+ */ + public void updateCollection( + String collectionIdentifier, UpdateCollectionRequest updateCollectionRequest) + throws ApiException { + updateCollectionWithHttpInfo(collectionIdentifier, updateCollectionRequest); + } + + /** + * Version: 26.4.0.cl or later Updates an existing collection in ThoughtSpot. #### Supported + * operations This API endpoint lets you perform the following operations: * Update collection + * name and description * Change visibility settings * Add metadata objects to the collection + * (operation: ADD) * Remove metadata objects from the collection (operation: REMOVE) * Replace + * all metadata objects in the collection (operation: REPLACE) #### Operation types * **ADD**: + * Adds the specified metadata objects to the existing collection without removing current items + * * **REMOVE**: Removes only the specified metadata objects from the collection * **REPLACE**: + * Replaces all existing metadata objects with the specified items (default behavior) + * + * @param collectionIdentifier Unique GUID of the collection. Note: Collection names cannot be + * used as identifiers since duplicate names are allowed. (required) + * @param updateCollectionRequest (required) + * @return ApiResponse<Void> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the + * response body + * @http.response.details + * + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
204 Collection updated successfully. No content returned. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
404 Resource not found. -
500 Unexpected error -
+ */ + public ApiResponse updateCollectionWithHttpInfo( + String collectionIdentifier, UpdateCollectionRequest updateCollectionRequest) + throws ApiException { + okhttp3.Call localVarCall = + updateCollectionValidateBeforeCall( + collectionIdentifier, updateCollectionRequest, null); + return localVarApiClient.execute(localVarCall); + } + + /** + * (asynchronously) Version: 26.4.0.cl or later Updates an existing collection in ThoughtSpot. + * #### Supported operations This API endpoint lets you perform the following operations: * + * Update collection name and description * Change visibility settings * Add metadata objects to + * the collection (operation: ADD) * Remove metadata objects from the collection (operation: + * REMOVE) * Replace all metadata objects in the collection (operation: REPLACE) #### Operation + * types * **ADD**: Adds the specified metadata objects to the existing collection without + * removing current items * **REMOVE**: Removes only the specified metadata objects from the + * collection * **REPLACE**: Replaces all existing metadata objects with the specified items + * (default behavior) + * + * @param collectionIdentifier Unique GUID of the collection. Note: Collection names cannot be + * used as identifiers since duplicate names are allowed. (required) + * @param updateCollectionRequest (required) + * @param _callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body + * object + * @http.response.details + * + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
204 Collection updated successfully. No content returned. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
404 Resource not found. -
500 Unexpected error -
+ */ + public okhttp3.Call updateCollectionAsync( + String collectionIdentifier, + UpdateCollectionRequest updateCollectionRequest, + final ApiCallback _callback) + throws ApiException { + + okhttp3.Call localVarCall = + updateCollectionValidateBeforeCall( + collectionIdentifier, updateCollectionRequest, _callback); + localVarApiClient.executeAsync(localVarCall, _callback); + return localVarCall; + } +} diff --git a/sdks/java/src/main/java/com/thoughtspot/client/api/ConnectionConfigurationsApi.java b/sdks/java/src/main/java/com/thoughtspot/client/api/ConnectionConfigurationsApi.java new file mode 100644 index 000000000..fe3c87d37 --- /dev/null +++ b/sdks/java/src/main/java/com/thoughtspot/client/api/ConnectionConfigurationsApi.java @@ -0,0 +1,928 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client.api; + +import com.google.gson.reflect.TypeToken; +import com.thoughtspot.client.ApiCallback; +import com.thoughtspot.client.ApiClient; +import com.thoughtspot.client.ApiClientConfiguration; +import com.thoughtspot.client.ApiException; +import com.thoughtspot.client.ApiResponse; +import com.thoughtspot.client.Configuration; +import com.thoughtspot.client.Pair; +import com.thoughtspot.client.model.ConnectionConfigurationResponse; +import com.thoughtspot.client.model.ConnectionConfigurationSearchRequest; +import com.thoughtspot.client.model.CreateConnectionConfigurationRequest; +import com.thoughtspot.client.model.DeleteConnectionConfigurationRequest; +import com.thoughtspot.client.model.UpdateConnectionConfigurationRequest; +import java.lang.reflect.Type; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +@javax.annotation.Generated( + value = "org.openapitools.codegen.languages.JavaClientCodegen", + comments = "Generator version: 7.12.0") +public class ConnectionConfigurationsApi { + private ApiClient localVarApiClient; + private ApiClientConfiguration localVarApiClientConfiguration; + private int localHostIndex; + private String localCustomBaseUrl; + + public ConnectionConfigurationsApi() { + this(Configuration.getDefaultApiClient()); + } + + public ConnectionConfigurationsApi(ApiClient apiClient) { + this.localVarApiClient = apiClient; + } + + public ConnectionConfigurationsApi(ApiClientConfiguration apiClientConfiguration) { + this.localVarApiClientConfiguration = apiClientConfiguration; + this.localVarApiClient = new ApiClient(apiClientConfiguration); + } + + public ApiClient getApiClient() { + return localVarApiClient; + } + + public void setApiClient(ApiClient apiClient) { + this.localVarApiClient = apiClient; + } + + public ApiClientConfiguration getApiClientConfiguration() { + return localVarApiClientConfiguration; + } + + public void applyApiClientConfiguration(ApiClientConfiguration apiClientConfiguration) { + this.localVarApiClientConfiguration = apiClientConfiguration; + if (localVarApiClient != null) { + localVarApiClient.applyApiClientConfiguration(apiClientConfiguration); + } else { + localVarApiClient = new ApiClient(apiClientConfiguration); + } + } + + public int getHostIndex() { + return localHostIndex; + } + + public void setHostIndex(int hostIndex) { + this.localHostIndex = hostIndex; + } + + public String getCustomBaseUrl() { + return localCustomBaseUrl; + } + + public void setCustomBaseUrl(String customBaseUrl) { + this.localCustomBaseUrl = customBaseUrl; + } + + /** + * Build call for connectionConfigurationSearch + * + * @param connectionConfigurationSearchRequest (required) + * @param _callback Callback for upload/download progress + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 Configuration fetched successfully. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public okhttp3.Call connectionConfigurationSearchCall( + ConnectionConfigurationSearchRequest connectionConfigurationSearchRequest, + final ApiCallback _callback) + throws ApiException { + String basePath = null; + // Operation Servers + String[] localBasePaths = new String[] {}; + + // Determine Base Path to Use + if (localCustomBaseUrl != null) { + basePath = localCustomBaseUrl; + } else if (localBasePaths.length > 0) { + basePath = localBasePaths[localHostIndex]; + } else { + basePath = null; + } + + Object localVarPostBody = connectionConfigurationSearchRequest; + + // create path and map variables + String localVarPath = "/api/rest/2.0/connection-configurations/search"; + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + final String[] localVarAccepts = {"application/json"}; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = {"application/json"}; + final String localVarContentType = + localVarApiClient.selectHeaderContentType(localVarContentTypes); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } + + String[] localVarAuthNames = new String[] {"bearerAuth"}; + return localVarApiClient.buildCall( + basePath, + localVarPath, + "POST", + localVarQueryParams, + localVarCollectionQueryParams, + localVarPostBody, + localVarHeaderParams, + localVarCookieParams, + localVarFormParams, + localVarAuthNames, + _callback); + } + + @SuppressWarnings("rawtypes") + private okhttp3.Call connectionConfigurationSearchValidateBeforeCall( + ConnectionConfigurationSearchRequest connectionConfigurationSearchRequest, + final ApiCallback _callback) + throws ApiException { + // verify the required parameter 'connectionConfigurationSearchRequest' is set + if (connectionConfigurationSearchRequest == null) { + throw new ApiException( + "Missing the required parameter 'connectionConfigurationSearchRequest' when" + + " calling connectionConfigurationSearch(Async)"); + } + + return connectionConfigurationSearchCall(connectionConfigurationSearchRequest, _callback); + } + + /** + * Version: 10.12.0.cl or later Gets connection configuration objects. Requires + * `DATAMANAGEMENT` (**Can manage data**) and edit permissions to the connection + * object, or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If + * [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled + * on your instance, the `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit + * Connections**) privilege is required. #### Usage guidelines * To get a list of all + * configurations available in the ThoughtSpot system, send the API request with only the + * connection name or GUID in the request body. * To fetch details of a configuration object, + * specify the configuration object name or GUID. + * + * @param connectionConfigurationSearchRequest (required) + * @return List<ConnectionConfigurationResponse> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the + * response body + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 Configuration fetched successfully. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public List connectionConfigurationSearch( + ConnectionConfigurationSearchRequest connectionConfigurationSearchRequest) + throws ApiException { + ApiResponse> localVarResp = + connectionConfigurationSearchWithHttpInfo(connectionConfigurationSearchRequest); + return localVarResp.getData(); + } + + /** + * Version: 10.12.0.cl or later Gets connection configuration objects. Requires + * `DATAMANAGEMENT` (**Can manage data**) and edit permissions to the connection + * object, or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If + * [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled + * on your instance, the `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit + * Connections**) privilege is required. #### Usage guidelines * To get a list of all + * configurations available in the ThoughtSpot system, send the API request with only the + * connection name or GUID in the request body. * To fetch details of a configuration object, + * specify the configuration object name or GUID. + * + * @param connectionConfigurationSearchRequest (required) + * @return ApiResponse<List<ConnectionConfigurationResponse>> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the + * response body + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 Configuration fetched successfully. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public ApiResponse> + connectionConfigurationSearchWithHttpInfo( + ConnectionConfigurationSearchRequest connectionConfigurationSearchRequest) + throws ApiException { + okhttp3.Call localVarCall = + connectionConfigurationSearchValidateBeforeCall( + connectionConfigurationSearchRequest, null); + Type localVarReturnType = + new TypeToken>() {}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); + } + + /** + * (asynchronously) Version: 10.12.0.cl or later Gets connection configuration objects. Requires + * `DATAMANAGEMENT` (**Can manage data**) and edit permissions to the connection + * object, or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If + * [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled + * on your instance, the `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit + * Connections**) privilege is required. #### Usage guidelines * To get a list of all + * configurations available in the ThoughtSpot system, send the API request with only the + * connection name or GUID in the request body. * To fetch details of a configuration object, + * specify the configuration object name or GUID. + * + * @param connectionConfigurationSearchRequest (required) + * @param _callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body + * object + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 Configuration fetched successfully. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public okhttp3.Call connectionConfigurationSearchAsync( + ConnectionConfigurationSearchRequest connectionConfigurationSearchRequest, + final ApiCallback> _callback) + throws ApiException { + + okhttp3.Call localVarCall = + connectionConfigurationSearchValidateBeforeCall( + connectionConfigurationSearchRequest, _callback); + Type localVarReturnType = + new TypeToken>() {}.getType(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; + } + /** + * Build call for createConnectionConfiguration + * + * @param createConnectionConfigurationRequest (required) + * @param _callback Callback for upload/download progress + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 Connection configuration successfully created. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public okhttp3.Call createConnectionConfigurationCall( + CreateConnectionConfigurationRequest createConnectionConfigurationRequest, + final ApiCallback _callback) + throws ApiException { + String basePath = null; + // Operation Servers + String[] localBasePaths = new String[] {}; + + // Determine Base Path to Use + if (localCustomBaseUrl != null) { + basePath = localCustomBaseUrl; + } else if (localBasePaths.length > 0) { + basePath = localBasePaths[localHostIndex]; + } else { + basePath = null; + } + + Object localVarPostBody = createConnectionConfigurationRequest; + + // create path and map variables + String localVarPath = "/api/rest/2.0/connection-configurations/create"; + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + final String[] localVarAccepts = {"application/json"}; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = {"application/json"}; + final String localVarContentType = + localVarApiClient.selectHeaderContentType(localVarContentTypes); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } + + String[] localVarAuthNames = new String[] {"bearerAuth"}; + return localVarApiClient.buildCall( + basePath, + localVarPath, + "POST", + localVarQueryParams, + localVarCollectionQueryParams, + localVarPostBody, + localVarHeaderParams, + localVarCookieParams, + localVarFormParams, + localVarAuthNames, + _callback); + } + + @SuppressWarnings("rawtypes") + private okhttp3.Call createConnectionConfigurationValidateBeforeCall( + CreateConnectionConfigurationRequest createConnectionConfigurationRequest, + final ApiCallback _callback) + throws ApiException { + // verify the required parameter 'createConnectionConfigurationRequest' is set + if (createConnectionConfigurationRequest == null) { + throw new ApiException( + "Missing the required parameter 'createConnectionConfigurationRequest' when" + + " calling createConnectionConfiguration(Async)"); + } + + return createConnectionConfigurationCall(createConnectionConfigurationRequest, _callback); + } + + /** + * Version: 10.12.0.cl or later Creates an additional configuration to an existing connection to + * a data warehouse. Requires `DATAMANAGEMENT` (**Can manage data**) or + * `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access + * Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, + * the `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) privilege is + * required. #### Usage guidelines * A JSON map of configuration attributes in + * `configuration`. The following example shows the configuration attributes: + * ``` { \"user\":\"DEV_USER\", + * \"password\":\"TestConn123\", \"role\":\"DEV\", + * \"warehouse\":\"DEV_WH\" } ``` * If the + * `policy_type` is `PRINCIPALS`, then `policy_principals` is a + * required field. * If the `policy_type` is `PROCESSES`, then + * `policy_processes` is a required field. * If the `policy_type` is + * `NO_POLICY`, then `policy_principals` and `policy_processes` + * are not required fields. #### Parameterized Connection Support For parameterized connections + * that use OAuth authentication, only the same_as_parent and policy_process_options attributes + * are allowed in the API request. These attributes are not applicable to connections that are + * not parameterized. + * + * @param createConnectionConfigurationRequest (required) + * @return ConnectionConfigurationResponse + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the + * response body + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 Connection configuration successfully created. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public ConnectionConfigurationResponse createConnectionConfiguration( + CreateConnectionConfigurationRequest createConnectionConfigurationRequest) + throws ApiException { + ApiResponse localVarResp = + createConnectionConfigurationWithHttpInfo(createConnectionConfigurationRequest); + return localVarResp.getData(); + } + + /** + * Version: 10.12.0.cl or later Creates an additional configuration to an existing connection to + * a data warehouse. Requires `DATAMANAGEMENT` (**Can manage data**) or + * `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access + * Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, + * the `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) privilege is + * required. #### Usage guidelines * A JSON map of configuration attributes in + * `configuration`. The following example shows the configuration attributes: + * ``` { \"user\":\"DEV_USER\", + * \"password\":\"TestConn123\", \"role\":\"DEV\", + * \"warehouse\":\"DEV_WH\" } ``` * If the + * `policy_type` is `PRINCIPALS`, then `policy_principals` is a + * required field. * If the `policy_type` is `PROCESSES`, then + * `policy_processes` is a required field. * If the `policy_type` is + * `NO_POLICY`, then `policy_principals` and `policy_processes` + * are not required fields. #### Parameterized Connection Support For parameterized connections + * that use OAuth authentication, only the same_as_parent and policy_process_options attributes + * are allowed in the API request. These attributes are not applicable to connections that are + * not parameterized. + * + * @param createConnectionConfigurationRequest (required) + * @return ApiResponse<ConnectionConfigurationResponse> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the + * response body + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 Connection configuration successfully created. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public ApiResponse createConnectionConfigurationWithHttpInfo( + CreateConnectionConfigurationRequest createConnectionConfigurationRequest) + throws ApiException { + okhttp3.Call localVarCall = + createConnectionConfigurationValidateBeforeCall( + createConnectionConfigurationRequest, null); + Type localVarReturnType = new TypeToken() {}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); + } + + /** + * (asynchronously) Version: 10.12.0.cl or later Creates an additional configuration to an + * existing connection to a data warehouse. Requires `DATAMANAGEMENT` (**Can manage + * data**) or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If + * [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled + * on your instance, the `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit + * Connections**) privilege is required. #### Usage guidelines * A JSON map of configuration + * attributes in `configuration`. The following example shows the configuration + * attributes: ``` { \"user\":\"DEV_USER\", + * \"password\":\"TestConn123\", \"role\":\"DEV\", + * \"warehouse\":\"DEV_WH\" } ``` * If the + * `policy_type` is `PRINCIPALS`, then `policy_principals` is a + * required field. * If the `policy_type` is `PROCESSES`, then + * `policy_processes` is a required field. * If the `policy_type` is + * `NO_POLICY`, then `policy_principals` and `policy_processes` + * are not required fields. #### Parameterized Connection Support For parameterized connections + * that use OAuth authentication, only the same_as_parent and policy_process_options attributes + * are allowed in the API request. These attributes are not applicable to connections that are + * not parameterized. + * + * @param createConnectionConfigurationRequest (required) + * @param _callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body + * object + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 Connection configuration successfully created. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public okhttp3.Call createConnectionConfigurationAsync( + CreateConnectionConfigurationRequest createConnectionConfigurationRequest, + final ApiCallback _callback) + throws ApiException { + + okhttp3.Call localVarCall = + createConnectionConfigurationValidateBeforeCall( + createConnectionConfigurationRequest, _callback); + Type localVarReturnType = new TypeToken() {}.getType(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; + } + /** + * Build call for deleteConnectionConfiguration + * + * @param deleteConnectionConfigurationRequest (required) + * @param _callback Callback for upload/download progress + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
204 Connection Configurations successfully deleted. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public okhttp3.Call deleteConnectionConfigurationCall( + DeleteConnectionConfigurationRequest deleteConnectionConfigurationRequest, + final ApiCallback _callback) + throws ApiException { + String basePath = null; + // Operation Servers + String[] localBasePaths = new String[] {}; + + // Determine Base Path to Use + if (localCustomBaseUrl != null) { + basePath = localCustomBaseUrl; + } else if (localBasePaths.length > 0) { + basePath = localBasePaths[localHostIndex]; + } else { + basePath = null; + } + + Object localVarPostBody = deleteConnectionConfigurationRequest; + + // create path and map variables + String localVarPath = "/api/rest/2.0/connection-configurations/delete"; + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + final String[] localVarAccepts = {"application/json"}; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = {"application/json"}; + final String localVarContentType = + localVarApiClient.selectHeaderContentType(localVarContentTypes); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } + + String[] localVarAuthNames = new String[] {"bearerAuth"}; + return localVarApiClient.buildCall( + basePath, + localVarPath, + "POST", + localVarQueryParams, + localVarCollectionQueryParams, + localVarPostBody, + localVarHeaderParams, + localVarCookieParams, + localVarFormParams, + localVarAuthNames, + _callback); + } + + @SuppressWarnings("rawtypes") + private okhttp3.Call deleteConnectionConfigurationValidateBeforeCall( + DeleteConnectionConfigurationRequest deleteConnectionConfigurationRequest, + final ApiCallback _callback) + throws ApiException { + // verify the required parameter 'deleteConnectionConfigurationRequest' is set + if (deleteConnectionConfigurationRequest == null) { + throw new ApiException( + "Missing the required parameter 'deleteConnectionConfigurationRequest' when" + + " calling deleteConnectionConfiguration(Async)"); + } + + return deleteConnectionConfigurationCall(deleteConnectionConfigurationRequest, _callback); + } + + /** + * Version: 10.12.0.cl or later Deletes connection configuration objects. Requires + * `DATAMANAGEMENT` (**Can manage data**) and edit permissions to the connection + * object, or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If + * [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled + * on your instance, the `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit + * Connections**) privilege is required. + * + * @param deleteConnectionConfigurationRequest (required) + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the + * response body + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
204 Connection Configurations successfully deleted. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public void deleteConnectionConfiguration( + DeleteConnectionConfigurationRequest deleteConnectionConfigurationRequest) + throws ApiException { + deleteConnectionConfigurationWithHttpInfo(deleteConnectionConfigurationRequest); + } + + /** + * Version: 10.12.0.cl or later Deletes connection configuration objects. Requires + * `DATAMANAGEMENT` (**Can manage data**) and edit permissions to the connection + * object, or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If + * [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled + * on your instance, the `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit + * Connections**) privilege is required. + * + * @param deleteConnectionConfigurationRequest (required) + * @return ApiResponse<Void> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the + * response body + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
204 Connection Configurations successfully deleted. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public ApiResponse deleteConnectionConfigurationWithHttpInfo( + DeleteConnectionConfigurationRequest deleteConnectionConfigurationRequest) + throws ApiException { + okhttp3.Call localVarCall = + deleteConnectionConfigurationValidateBeforeCall( + deleteConnectionConfigurationRequest, null); + return localVarApiClient.execute(localVarCall); + } + + /** + * (asynchronously) Version: 10.12.0.cl or later Deletes connection configuration objects. + * Requires `DATAMANAGEMENT` (**Can manage data**) and edit permissions to the + * connection object, or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. + * If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is + * enabled on your instance, the `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit + * Connections**) privilege is required. + * + * @param deleteConnectionConfigurationRequest (required) + * @param _callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body + * object + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
204 Connection Configurations successfully deleted. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public okhttp3.Call deleteConnectionConfigurationAsync( + DeleteConnectionConfigurationRequest deleteConnectionConfigurationRequest, + final ApiCallback _callback) + throws ApiException { + + okhttp3.Call localVarCall = + deleteConnectionConfigurationValidateBeforeCall( + deleteConnectionConfigurationRequest, _callback); + localVarApiClient.executeAsync(localVarCall, _callback); + return localVarCall; + } + /** + * Build call for updateConnectionConfiguration + * + * @param configurationIdentifier Unique ID or name of the configuration. (required) + * @param updateConnectionConfigurationRequest (required) + * @param _callback Callback for upload/download progress + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
204 Connection configuration successfully updated. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public okhttp3.Call updateConnectionConfigurationCall( + String configurationIdentifier, + UpdateConnectionConfigurationRequest updateConnectionConfigurationRequest, + final ApiCallback _callback) + throws ApiException { + String basePath = null; + // Operation Servers + String[] localBasePaths = new String[] {}; + + // Determine Base Path to Use + if (localCustomBaseUrl != null) { + basePath = localCustomBaseUrl; + } else if (localBasePaths.length > 0) { + basePath = localBasePaths[localHostIndex]; + } else { + basePath = null; + } + + Object localVarPostBody = updateConnectionConfigurationRequest; + + // create path and map variables + String localVarPath = + "/api/rest/2.0/connection-configurations/{configuration_identifier}/update" + .replace( + "{" + "configuration_identifier" + "}", + localVarApiClient.escapeString(configurationIdentifier.toString())); + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + final String[] localVarAccepts = {"application/json"}; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = {"application/json"}; + final String localVarContentType = + localVarApiClient.selectHeaderContentType(localVarContentTypes); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } + + String[] localVarAuthNames = new String[] {"bearerAuth"}; + return localVarApiClient.buildCall( + basePath, + localVarPath, + "POST", + localVarQueryParams, + localVarCollectionQueryParams, + localVarPostBody, + localVarHeaderParams, + localVarCookieParams, + localVarFormParams, + localVarAuthNames, + _callback); + } + + @SuppressWarnings("rawtypes") + private okhttp3.Call updateConnectionConfigurationValidateBeforeCall( + String configurationIdentifier, + UpdateConnectionConfigurationRequest updateConnectionConfigurationRequest, + final ApiCallback _callback) + throws ApiException { + // verify the required parameter 'configurationIdentifier' is set + if (configurationIdentifier == null) { + throw new ApiException( + "Missing the required parameter 'configurationIdentifier' when calling" + + " updateConnectionConfiguration(Async)"); + } + + // verify the required parameter 'updateConnectionConfigurationRequest' is set + if (updateConnectionConfigurationRequest == null) { + throw new ApiException( + "Missing the required parameter 'updateConnectionConfigurationRequest' when" + + " calling updateConnectionConfiguration(Async)"); + } + + return updateConnectionConfigurationCall( + configurationIdentifier, updateConnectionConfigurationRequest, _callback); + } + + /** + * Version: 10.12.0.cl or later Updates a connection configuration object. Requires + * `DATAMANAGEMENT` (**Can manage data**) and edit permissions to the connection + * object, or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If + * [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled + * on your instance, the `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit + * Connections**) privilege is required. #### Supported operations This API endpoint lets you + * perform the following operations in a single API request: * Edit the name or description of + * the configuration * Edit the configuration properties * Edit the `policy_type` * + * Edit the type of authentication * Enable or disable a configuration #### Parameterized + * Connection Support For parameterized oauth based connections, only the + * `same_as_parent` and `policy_process_options` attributes are allowed. + * These attributes are not applicable to connections that are not parameterized. **NOTE**: When + * updating a configuration where `disabled` is `true`, you must reset + * `disabled` to `true` in your update request payload. If not explicitly + * set again, the API will default `disabled` to `false`. + * + * @param configurationIdentifier Unique ID or name of the configuration. (required) + * @param updateConnectionConfigurationRequest (required) + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the + * response body + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
204 Connection configuration successfully updated. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public void updateConnectionConfiguration( + String configurationIdentifier, + UpdateConnectionConfigurationRequest updateConnectionConfigurationRequest) + throws ApiException { + updateConnectionConfigurationWithHttpInfo( + configurationIdentifier, updateConnectionConfigurationRequest); + } + + /** + * Version: 10.12.0.cl or later Updates a connection configuration object. Requires + * `DATAMANAGEMENT` (**Can manage data**) and edit permissions to the connection + * object, or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If + * [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled + * on your instance, the `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit + * Connections**) privilege is required. #### Supported operations This API endpoint lets you + * perform the following operations in a single API request: * Edit the name or description of + * the configuration * Edit the configuration properties * Edit the `policy_type` * + * Edit the type of authentication * Enable or disable a configuration #### Parameterized + * Connection Support For parameterized oauth based connections, only the + * `same_as_parent` and `policy_process_options` attributes are allowed. + * These attributes are not applicable to connections that are not parameterized. **NOTE**: When + * updating a configuration where `disabled` is `true`, you must reset + * `disabled` to `true` in your update request payload. If not explicitly + * set again, the API will default `disabled` to `false`. + * + * @param configurationIdentifier Unique ID or name of the configuration. (required) + * @param updateConnectionConfigurationRequest (required) + * @return ApiResponse<Void> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the + * response body + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
204 Connection configuration successfully updated. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public ApiResponse updateConnectionConfigurationWithHttpInfo( + String configurationIdentifier, + UpdateConnectionConfigurationRequest updateConnectionConfigurationRequest) + throws ApiException { + okhttp3.Call localVarCall = + updateConnectionConfigurationValidateBeforeCall( + configurationIdentifier, updateConnectionConfigurationRequest, null); + return localVarApiClient.execute(localVarCall); + } + + /** + * (asynchronously) Version: 10.12.0.cl or later Updates a connection configuration object. + * Requires `DATAMANAGEMENT` (**Can manage data**) and edit permissions to the + * connection object, or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. + * If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is + * enabled on your instance, the `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit + * Connections**) privilege is required. #### Supported operations This API endpoint lets you + * perform the following operations in a single API request: * Edit the name or description of + * the configuration * Edit the configuration properties * Edit the `policy_type` * + * Edit the type of authentication * Enable or disable a configuration #### Parameterized + * Connection Support For parameterized oauth based connections, only the + * `same_as_parent` and `policy_process_options` attributes are allowed. + * These attributes are not applicable to connections that are not parameterized. **NOTE**: When + * updating a configuration where `disabled` is `true`, you must reset + * `disabled` to `true` in your update request payload. If not explicitly + * set again, the API will default `disabled` to `false`. + * + * @param configurationIdentifier Unique ID or name of the configuration. (required) + * @param updateConnectionConfigurationRequest (required) + * @param _callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body + * object + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
204 Connection configuration successfully updated. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public okhttp3.Call updateConnectionConfigurationAsync( + String configurationIdentifier, + UpdateConnectionConfigurationRequest updateConnectionConfigurationRequest, + final ApiCallback _callback) + throws ApiException { + + okhttp3.Call localVarCall = + updateConnectionConfigurationValidateBeforeCall( + configurationIdentifier, updateConnectionConfigurationRequest, _callback); + localVarApiClient.executeAsync(localVarCall, _callback); + return localVarCall; + } +} diff --git a/sdks/java/src/main/java/com/thoughtspot/client/api/ConnectionsApi.java b/sdks/java/src/main/java/com/thoughtspot/client/api/ConnectionsApi.java new file mode 100644 index 000000000..546451f22 --- /dev/null +++ b/sdks/java/src/main/java/com/thoughtspot/client/api/ConnectionsApi.java @@ -0,0 +1,2976 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client.api; + +import com.google.gson.reflect.TypeToken; +import com.thoughtspot.client.ApiCallback; +import com.thoughtspot.client.ApiClient; +import com.thoughtspot.client.ApiClientConfiguration; +import com.thoughtspot.client.ApiException; +import com.thoughtspot.client.ApiResponse; +import com.thoughtspot.client.Configuration; +import com.thoughtspot.client.Pair; +import com.thoughtspot.client.model.CreateConnectionRequest; +import com.thoughtspot.client.model.CreateConnectionResponse; +import com.thoughtspot.client.model.DeleteConnectionRequest; +import com.thoughtspot.client.model.FetchConnectionDiffStatusResponse; +import com.thoughtspot.client.model.RevokeRefreshTokensRequest; +import com.thoughtspot.client.model.RevokeRefreshTokensResponse; +import com.thoughtspot.client.model.SearchConnectionRequest; +import com.thoughtspot.client.model.SearchConnectionResponse; +import com.thoughtspot.client.model.SyncMetadataRequest; +import com.thoughtspot.client.model.SyncMetadataResponse; +import com.thoughtspot.client.model.UpdateConnectionRequest; +import com.thoughtspot.client.model.UpdateConnectionStatusRequest; +import com.thoughtspot.client.model.UpdateConnectionV2Request; +import java.io.File; +import java.lang.reflect.Type; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +@javax.annotation.Generated( + value = "org.openapitools.codegen.languages.JavaClientCodegen", + comments = "Generator version: 7.12.0") +public class ConnectionsApi { + private ApiClient localVarApiClient; + private ApiClientConfiguration localVarApiClientConfiguration; + private int localHostIndex; + private String localCustomBaseUrl; + + public ConnectionsApi() { + this(Configuration.getDefaultApiClient()); + } + + public ConnectionsApi(ApiClient apiClient) { + this.localVarApiClient = apiClient; + } + + public ConnectionsApi(ApiClientConfiguration apiClientConfiguration) { + this.localVarApiClientConfiguration = apiClientConfiguration; + this.localVarApiClient = new ApiClient(apiClientConfiguration); + } + + public ApiClient getApiClient() { + return localVarApiClient; + } + + public void setApiClient(ApiClient apiClient) { + this.localVarApiClient = apiClient; + } + + public ApiClientConfiguration getApiClientConfiguration() { + return localVarApiClientConfiguration; + } + + public void applyApiClientConfiguration(ApiClientConfiguration apiClientConfiguration) { + this.localVarApiClientConfiguration = apiClientConfiguration; + if (localVarApiClient != null) { + localVarApiClient.applyApiClientConfiguration(apiClientConfiguration); + } else { + localVarApiClient = new ApiClient(apiClientConfiguration); + } + } + + public int getHostIndex() { + return localHostIndex; + } + + public void setHostIndex(int hostIndex) { + this.localHostIndex = hostIndex; + } + + public String getCustomBaseUrl() { + return localCustomBaseUrl; + } + + public void setCustomBaseUrl(String customBaseUrl) { + this.localCustomBaseUrl = customBaseUrl; + } + + /** + * Build call for createConnection + * + * @param createConnectionRequest (required) + * @param _callback Callback for upload/download progress + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 Connection to the datasource successfully created. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public okhttp3.Call createConnectionCall( + CreateConnectionRequest createConnectionRequest, final ApiCallback _callback) + throws ApiException { + String basePath = null; + // Operation Servers + String[] localBasePaths = new String[] {}; + + // Determine Base Path to Use + if (localCustomBaseUrl != null) { + basePath = localCustomBaseUrl; + } else if (localBasePaths.length > 0) { + basePath = localBasePaths[localHostIndex]; + } else { + basePath = null; + } + + Object localVarPostBody = createConnectionRequest; + + // create path and map variables + String localVarPath = "/api/rest/2.0/connection/create"; + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + final String[] localVarAccepts = {"application/json"}; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = {"application/json"}; + final String localVarContentType = + localVarApiClient.selectHeaderContentType(localVarContentTypes); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } + + String[] localVarAuthNames = new String[] {"bearerAuth"}; + return localVarApiClient.buildCall( + basePath, + localVarPath, + "POST", + localVarQueryParams, + localVarCollectionQueryParams, + localVarPostBody, + localVarHeaderParams, + localVarCookieParams, + localVarFormParams, + localVarAuthNames, + _callback); + } + + @SuppressWarnings("rawtypes") + private okhttp3.Call createConnectionValidateBeforeCall( + CreateConnectionRequest createConnectionRequest, final ApiCallback _callback) + throws ApiException { + // verify the required parameter 'createConnectionRequest' is set + if (createConnectionRequest == null) { + throw new ApiException( + "Missing the required parameter 'createConnectionRequest' when calling" + + " createConnection(Async)"); + } + + return createConnectionCall(createConnectionRequest, _callback); + } + + /** + * Version: 9.2.0.cl or later Creates a connection to a data warehouse for live query services. + * Requires `DATAMANAGEMENT` (**Can manage data**) or `ADMINISTRATION` + * (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control + * (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the + * `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) privilege is + * required. #### Create a connection without tables To create a connection without tables: 1. + * Pass these parameters in your API request. * Name of the connection. * Type of the data + * warehouse to connect to. * A JSON map of configuration attributes in + * `data_warehouse_config`. The following example shows the configuration attributes + * for a SnowFlake connection: ``` { \"configuration\":{ + * \"accountName\":\"thoughtspot_partner\", + * \"user\":\"tsadmin\", \"password\":\"TestConn123\", + * \"role\":\"sysadmin\", \"warehouse\":\"MEDIUM_WH\" }, + * \"authenticationType\": \"SERVICE_ACCOUNT\", + * \"externalDatabases\":[ ] } ``` 2. Set `validate` to + * `false`. **NOTE:** If the `authentication_type` is anything other than + * SERVICE_ACCOUNT, you must explicitly provide the authenticationType property in the payload. + * If you do not specify authenticationType, the API will default to SERVICE_ACCOUNT as the + * authentication type. #### Create a connection with tables If [Role-Based Access Control + * (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the + * `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) and + * `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` (**Can manage data models**) privilege is + * required. To create a connection with tables: 1. Pass these parameters in your API request. * + * Name of the connection. * Type of the data warehouse to connect to. * A JSON map of + * configuration attributes, database details, and table properties in + * `data_warehouse_config` as shown in the following example: ``` { + * \"configuration\":{ \"accountName\":\"thoughtspot_partner\", + * \"user\":\"tsadmin\", \"password\":\"TestConn123\", + * \"role\":\"sysadmin\", \"warehouse\":\"MEDIUM_WH\" }, + * \"authenticationType\": \"SERVICE_ACCOUNT\", + * \"externalDatabases\":[ { \"name\":\"AllDatatypes\", + * \"isAutoCreated\":false, \"schemas\":[ { + * \"name\":\"alldatatypes\", \"tables\":[ { + * \"name\":\"allDatatypes\", \"type\":\"TABLE\", + * \"description\":\"\", \"selected\":true, + * \"linked\":true, \"columns\":[ { + * \"name\":\"CNUMBER\", \"type\":\"INT64\", + * \"canImport\":true, \"selected\":true, \"isLinkedActive\":true, + * \"isImported\":false, \"tableName\":\"allDatatypes\", + * \"schemaName\":\"alldatatypes\", + * \"dbName\":\"AllDatatypes\" }, { + * \"name\":\"CDECIMAL\", \"type\":\"INT64\", + * \"canImport\":true, \"selected\":true, \"isLinkedActive\":true, + * \"isImported\":false, \"tableName\":\"allDatatypes\", + * \"schemaName\":\"alldatatypes\", + * \"dbName\":\"AllDatatypes\" } ] } ] } ] } ] } ``` 2. Set + * `validate` to `true`. **NOTE:** If the `authentication_type` is + * anything other than SERVICE_ACCOUNT, you must explicitly provide the authenticationType + * property in the payload. If you do not specify authenticationType, the API will default to + * SERVICE_ACCOUNT as the authentication type. + * + * @param createConnectionRequest (required) + * @return CreateConnectionResponse + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the + * response body + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 Connection to the datasource successfully created. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public CreateConnectionResponse createConnection( + CreateConnectionRequest createConnectionRequest) throws ApiException { + ApiResponse localVarResp = + createConnectionWithHttpInfo(createConnectionRequest); + return localVarResp.getData(); + } + + /** + * Version: 9.2.0.cl or later Creates a connection to a data warehouse for live query services. + * Requires `DATAMANAGEMENT` (**Can manage data**) or `ADMINISTRATION` + * (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control + * (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the + * `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) privilege is + * required. #### Create a connection without tables To create a connection without tables: 1. + * Pass these parameters in your API request. * Name of the connection. * Type of the data + * warehouse to connect to. * A JSON map of configuration attributes in + * `data_warehouse_config`. The following example shows the configuration attributes + * for a SnowFlake connection: ``` { \"configuration\":{ + * \"accountName\":\"thoughtspot_partner\", + * \"user\":\"tsadmin\", \"password\":\"TestConn123\", + * \"role\":\"sysadmin\", \"warehouse\":\"MEDIUM_WH\" }, + * \"authenticationType\": \"SERVICE_ACCOUNT\", + * \"externalDatabases\":[ ] } ``` 2. Set `validate` to + * `false`. **NOTE:** If the `authentication_type` is anything other than + * SERVICE_ACCOUNT, you must explicitly provide the authenticationType property in the payload. + * If you do not specify authenticationType, the API will default to SERVICE_ACCOUNT as the + * authentication type. #### Create a connection with tables If [Role-Based Access Control + * (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the + * `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) and + * `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` (**Can manage data models**) privilege is + * required. To create a connection with tables: 1. Pass these parameters in your API request. * + * Name of the connection. * Type of the data warehouse to connect to. * A JSON map of + * configuration attributes, database details, and table properties in + * `data_warehouse_config` as shown in the following example: ``` { + * \"configuration\":{ \"accountName\":\"thoughtspot_partner\", + * \"user\":\"tsadmin\", \"password\":\"TestConn123\", + * \"role\":\"sysadmin\", \"warehouse\":\"MEDIUM_WH\" }, + * \"authenticationType\": \"SERVICE_ACCOUNT\", + * \"externalDatabases\":[ { \"name\":\"AllDatatypes\", + * \"isAutoCreated\":false, \"schemas\":[ { + * \"name\":\"alldatatypes\", \"tables\":[ { + * \"name\":\"allDatatypes\", \"type\":\"TABLE\", + * \"description\":\"\", \"selected\":true, + * \"linked\":true, \"columns\":[ { + * \"name\":\"CNUMBER\", \"type\":\"INT64\", + * \"canImport\":true, \"selected\":true, \"isLinkedActive\":true, + * \"isImported\":false, \"tableName\":\"allDatatypes\", + * \"schemaName\":\"alldatatypes\", + * \"dbName\":\"AllDatatypes\" }, { + * \"name\":\"CDECIMAL\", \"type\":\"INT64\", + * \"canImport\":true, \"selected\":true, \"isLinkedActive\":true, + * \"isImported\":false, \"tableName\":\"allDatatypes\", + * \"schemaName\":\"alldatatypes\", + * \"dbName\":\"AllDatatypes\" } ] } ] } ] } ] } ``` 2. Set + * `validate` to `true`. **NOTE:** If the `authentication_type` is + * anything other than SERVICE_ACCOUNT, you must explicitly provide the authenticationType + * property in the payload. If you do not specify authenticationType, the API will default to + * SERVICE_ACCOUNT as the authentication type. + * + * @param createConnectionRequest (required) + * @return ApiResponse<CreateConnectionResponse> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the + * response body + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 Connection to the datasource successfully created. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public ApiResponse createConnectionWithHttpInfo( + CreateConnectionRequest createConnectionRequest) throws ApiException { + okhttp3.Call localVarCall = + createConnectionValidateBeforeCall(createConnectionRequest, null); + Type localVarReturnType = new TypeToken() {}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); + } + + /** + * (asynchronously) Version: 9.2.0.cl or later Creates a connection to a data warehouse for live + * query services. Requires `DATAMANAGEMENT` (**Can manage data**) or + * `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access + * Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, + * the `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) privilege is + * required. #### Create a connection without tables To create a connection without tables: 1. + * Pass these parameters in your API request. * Name of the connection. * Type of the data + * warehouse to connect to. * A JSON map of configuration attributes in + * `data_warehouse_config`. The following example shows the configuration attributes + * for a SnowFlake connection: ``` { \"configuration\":{ + * \"accountName\":\"thoughtspot_partner\", + * \"user\":\"tsadmin\", \"password\":\"TestConn123\", + * \"role\":\"sysadmin\", \"warehouse\":\"MEDIUM_WH\" }, + * \"authenticationType\": \"SERVICE_ACCOUNT\", + * \"externalDatabases\":[ ] } ``` 2. Set `validate` to + * `false`. **NOTE:** If the `authentication_type` is anything other than + * SERVICE_ACCOUNT, you must explicitly provide the authenticationType property in the payload. + * If you do not specify authenticationType, the API will default to SERVICE_ACCOUNT as the + * authentication type. #### Create a connection with tables If [Role-Based Access Control + * (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the + * `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) and + * `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` (**Can manage data models**) privilege is + * required. To create a connection with tables: 1. Pass these parameters in your API request. * + * Name of the connection. * Type of the data warehouse to connect to. * A JSON map of + * configuration attributes, database details, and table properties in + * `data_warehouse_config` as shown in the following example: ``` { + * \"configuration\":{ \"accountName\":\"thoughtspot_partner\", + * \"user\":\"tsadmin\", \"password\":\"TestConn123\", + * \"role\":\"sysadmin\", \"warehouse\":\"MEDIUM_WH\" }, + * \"authenticationType\": \"SERVICE_ACCOUNT\", + * \"externalDatabases\":[ { \"name\":\"AllDatatypes\", + * \"isAutoCreated\":false, \"schemas\":[ { + * \"name\":\"alldatatypes\", \"tables\":[ { + * \"name\":\"allDatatypes\", \"type\":\"TABLE\", + * \"description\":\"\", \"selected\":true, + * \"linked\":true, \"columns\":[ { + * \"name\":\"CNUMBER\", \"type\":\"INT64\", + * \"canImport\":true, \"selected\":true, \"isLinkedActive\":true, + * \"isImported\":false, \"tableName\":\"allDatatypes\", + * \"schemaName\":\"alldatatypes\", + * \"dbName\":\"AllDatatypes\" }, { + * \"name\":\"CDECIMAL\", \"type\":\"INT64\", + * \"canImport\":true, \"selected\":true, \"isLinkedActive\":true, + * \"isImported\":false, \"tableName\":\"allDatatypes\", + * \"schemaName\":\"alldatatypes\", + * \"dbName\":\"AllDatatypes\" } ] } ] } ] } ] } ``` 2. Set + * `validate` to `true`. **NOTE:** If the `authentication_type` is + * anything other than SERVICE_ACCOUNT, you must explicitly provide the authenticationType + * property in the payload. If you do not specify authenticationType, the API will default to + * SERVICE_ACCOUNT as the authentication type. + * + * @param createConnectionRequest (required) + * @param _callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body + * object + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 Connection to the datasource successfully created. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public okhttp3.Call createConnectionAsync( + CreateConnectionRequest createConnectionRequest, + final ApiCallback _callback) + throws ApiException { + + okhttp3.Call localVarCall = + createConnectionValidateBeforeCall(createConnectionRequest, _callback); + Type localVarReturnType = new TypeToken() {}.getType(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; + } + /** + * Build call for deleteConnection + * + * @param deleteConnectionRequest (required) + * @param _callback Callback for upload/download progress + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
204 Connection successfully deleted. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ * + * @deprecated + */ + @Deprecated + public okhttp3.Call deleteConnectionCall( + DeleteConnectionRequest deleteConnectionRequest, final ApiCallback _callback) + throws ApiException { + String basePath = null; + // Operation Servers + String[] localBasePaths = new String[] {}; + + // Determine Base Path to Use + if (localCustomBaseUrl != null) { + basePath = localCustomBaseUrl; + } else if (localBasePaths.length > 0) { + basePath = localBasePaths[localHostIndex]; + } else { + basePath = null; + } + + Object localVarPostBody = deleteConnectionRequest; + + // create path and map variables + String localVarPath = "/api/rest/2.0/connection/delete"; + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + final String[] localVarAccepts = {"application/json"}; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = {"application/json"}; + final String localVarContentType = + localVarApiClient.selectHeaderContentType(localVarContentTypes); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } + + String[] localVarAuthNames = new String[] {"bearerAuth"}; + return localVarApiClient.buildCall( + basePath, + localVarPath, + "POST", + localVarQueryParams, + localVarCollectionQueryParams, + localVarPostBody, + localVarHeaderParams, + localVarCookieParams, + localVarFormParams, + localVarAuthNames, + _callback); + } + + @Deprecated + @SuppressWarnings("rawtypes") + private okhttp3.Call deleteConnectionValidateBeforeCall( + DeleteConnectionRequest deleteConnectionRequest, final ApiCallback _callback) + throws ApiException { + // verify the required parameter 'deleteConnectionRequest' is set + if (deleteConnectionRequest == null) { + throw new ApiException( + "Missing the required parameter 'deleteConnectionRequest' when calling" + + " deleteConnection(Async)"); + } + + return deleteConnectionCall(deleteConnectionRequest, _callback); + } + + /** + * Version: 9.2.0.cl or later **Important**: This endpoint is deprecated and will be removed + * from ThoughtSpot in September 2025. ThoughtSpot strongly recommends using the [Delete + * Connection V2](#/http/api-endpoints/connections/delete-connection-v2) endpoint to delete your + * connection objects. #### Usage guidelines Deletes a connection object. Requires + * `DATAMANAGEMENT` (**Can manage data**) and edit permissions to the connection + * object, or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If + * [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled + * on your instance, the `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit + * Connections**) privilege is required. **Note**: If a connection has dependent objects, make + * sure you remove its associations before the delete operation. + * + * @param deleteConnectionRequest (required) + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the + * response body + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
204 Connection successfully deleted. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ * + * @deprecated + */ + @Deprecated + public void deleteConnection(DeleteConnectionRequest deleteConnectionRequest) + throws ApiException { + deleteConnectionWithHttpInfo(deleteConnectionRequest); + } + + /** + * Version: 9.2.0.cl or later **Important**: This endpoint is deprecated and will be removed + * from ThoughtSpot in September 2025. ThoughtSpot strongly recommends using the [Delete + * Connection V2](#/http/api-endpoints/connections/delete-connection-v2) endpoint to delete your + * connection objects. #### Usage guidelines Deletes a connection object. Requires + * `DATAMANAGEMENT` (**Can manage data**) and edit permissions to the connection + * object, or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If + * [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled + * on your instance, the `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit + * Connections**) privilege is required. **Note**: If a connection has dependent objects, make + * sure you remove its associations before the delete operation. + * + * @param deleteConnectionRequest (required) + * @return ApiResponse<Void> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the + * response body + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
204 Connection successfully deleted. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ * + * @deprecated + */ + @Deprecated + public ApiResponse deleteConnectionWithHttpInfo( + DeleteConnectionRequest deleteConnectionRequest) throws ApiException { + okhttp3.Call localVarCall = + deleteConnectionValidateBeforeCall(deleteConnectionRequest, null); + return localVarApiClient.execute(localVarCall); + } + + /** + * (asynchronously) Version: 9.2.0.cl or later **Important**: This endpoint is deprecated and + * will be removed from ThoughtSpot in September 2025. ThoughtSpot strongly recommends using the + * [Delete Connection V2](#/http/api-endpoints/connections/delete-connection-v2) endpoint to + * delete your connection objects. #### Usage guidelines Deletes a connection object. Requires + * `DATAMANAGEMENT` (**Can manage data**) and edit permissions to the connection + * object, or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If + * [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled + * on your instance, the `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit + * Connections**) privilege is required. **Note**: If a connection has dependent objects, make + * sure you remove its associations before the delete operation. + * + * @param deleteConnectionRequest (required) + * @param _callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body + * object + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
204 Connection successfully deleted. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ * + * @deprecated + */ + @Deprecated + public okhttp3.Call deleteConnectionAsync( + DeleteConnectionRequest deleteConnectionRequest, final ApiCallback _callback) + throws ApiException { + + okhttp3.Call localVarCall = + deleteConnectionValidateBeforeCall(deleteConnectionRequest, _callback); + localVarApiClient.executeAsync(localVarCall, _callback); + return localVarCall; + } + /** + * Build call for deleteConnectionV2 + * + * @param connectionIdentifier Unique ID or name of the connection. (required) + * @param _callback Callback for upload/download progress + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
204 Connection successfully deleted. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public okhttp3.Call deleteConnectionV2Call( + String connectionIdentifier, final ApiCallback _callback) throws ApiException { + String basePath = null; + // Operation Servers + String[] localBasePaths = new String[] {}; + + // Determine Base Path to Use + if (localCustomBaseUrl != null) { + basePath = localCustomBaseUrl; + } else if (localBasePaths.length > 0) { + basePath = localBasePaths[localHostIndex]; + } else { + basePath = null; + } + + Object localVarPostBody = null; + + // create path and map variables + String localVarPath = + "/api/rest/2.0/connections/{connection_identifier}/delete" + .replace( + "{" + "connection_identifier" + "}", + localVarApiClient.escapeString(connectionIdentifier.toString())); + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + final String[] localVarAccepts = {"application/json"}; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = {}; + final String localVarContentType = + localVarApiClient.selectHeaderContentType(localVarContentTypes); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } + + String[] localVarAuthNames = new String[] {"bearerAuth"}; + return localVarApiClient.buildCall( + basePath, + localVarPath, + "POST", + localVarQueryParams, + localVarCollectionQueryParams, + localVarPostBody, + localVarHeaderParams, + localVarCookieParams, + localVarFormParams, + localVarAuthNames, + _callback); + } + + @SuppressWarnings("rawtypes") + private okhttp3.Call deleteConnectionV2ValidateBeforeCall( + String connectionIdentifier, final ApiCallback _callback) throws ApiException { + // verify the required parameter 'connectionIdentifier' is set + if (connectionIdentifier == null) { + throw new ApiException( + "Missing the required parameter 'connectionIdentifier' when calling" + + " deleteConnectionV2(Async)"); + } + + return deleteConnectionV2Call(connectionIdentifier, _callback); + } + + /** + * Version: 10.4.0.cl or later Deletes a connection object. **Note**: If a connection has + * dependent objects, make sure you remove its associations before the delete operation. + * Requires `DATAMANAGEMENT` (**Can manage data**) and edit permissions to the + * connection object, or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. + * If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is + * enabled on your instance, the `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit + * Connections**) privilege is required. + * + * @param connectionIdentifier Unique ID or name of the connection. (required) + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the + * response body + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
204 Connection successfully deleted. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public void deleteConnectionV2(String connectionIdentifier) throws ApiException { + deleteConnectionV2WithHttpInfo(connectionIdentifier); + } + + /** + * Version: 10.4.0.cl or later Deletes a connection object. **Note**: If a connection has + * dependent objects, make sure you remove its associations before the delete operation. + * Requires `DATAMANAGEMENT` (**Can manage data**) and edit permissions to the + * connection object, or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. + * If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is + * enabled on your instance, the `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit + * Connections**) privilege is required. + * + * @param connectionIdentifier Unique ID or name of the connection. (required) + * @return ApiResponse<Void> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the + * response body + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
204 Connection successfully deleted. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public ApiResponse deleteConnectionV2WithHttpInfo(String connectionIdentifier) + throws ApiException { + okhttp3.Call localVarCall = + deleteConnectionV2ValidateBeforeCall(connectionIdentifier, null); + return localVarApiClient.execute(localVarCall); + } + + /** + * (asynchronously) Version: 10.4.0.cl or later Deletes a connection object. **Note**: If a + * connection has dependent objects, make sure you remove its associations before the delete + * operation. Requires `DATAMANAGEMENT` (**Can manage data**) and edit permissions to + * the connection object, or `ADMINISTRATION` (**Can administer ThoughtSpot**) + * privilege. If [Role-Based Access Control + * (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the + * `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) privilege is + * required. + * + * @param connectionIdentifier Unique ID or name of the connection. (required) + * @param _callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body + * object + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
204 Connection successfully deleted. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public okhttp3.Call deleteConnectionV2Async( + String connectionIdentifier, final ApiCallback _callback) throws ApiException { + + okhttp3.Call localVarCall = + deleteConnectionV2ValidateBeforeCall(connectionIdentifier, _callback); + localVarApiClient.executeAsync(localVarCall, _callback); + return localVarCall; + } + /** + * Build call for downloadConnectionMetadataChanges + * + * @param connectionIdentifier GUID of the connection (required) + * @param _callback Callback for upload/download progress + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 Export metadata changes. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public okhttp3.Call downloadConnectionMetadataChangesCall( + String connectionIdentifier, final ApiCallback _callback) throws ApiException { + String basePath = null; + // Operation Servers + String[] localBasePaths = new String[] {}; + + // Determine Base Path to Use + if (localCustomBaseUrl != null) { + basePath = localCustomBaseUrl; + } else if (localBasePaths.length > 0) { + basePath = localBasePaths[localHostIndex]; + } else { + basePath = null; + } + + Object localVarPostBody = null; + + // create path and map variables + String localVarPath = + "/api/rest/2.0/connections/download-connection-metadata-changes/{connection_identifier}" + .replace( + "{" + "connection_identifier" + "}", + localVarApiClient.escapeString(connectionIdentifier.toString())); + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + final String[] localVarAccepts = {"application/octet-stream", "application/json"}; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = {}; + final String localVarContentType = + localVarApiClient.selectHeaderContentType(localVarContentTypes); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } + + String[] localVarAuthNames = new String[] {"bearerAuth"}; + return localVarApiClient.buildCall( + basePath, + localVarPath, + "POST", + localVarQueryParams, + localVarCollectionQueryParams, + localVarPostBody, + localVarHeaderParams, + localVarCookieParams, + localVarFormParams, + localVarAuthNames, + _callback); + } + + @SuppressWarnings("rawtypes") + private okhttp3.Call downloadConnectionMetadataChangesValidateBeforeCall( + String connectionIdentifier, final ApiCallback _callback) throws ApiException { + // verify the required parameter 'connectionIdentifier' is set + if (connectionIdentifier == null) { + throw new ApiException( + "Missing the required parameter 'connectionIdentifier' when calling" + + " downloadConnectionMetadataChanges(Async)"); + } + + return downloadConnectionMetadataChangesCall(connectionIdentifier, _callback); + } + + /** + * Version: 9.9.0.cl or later Exports the difference in connection metadata between CDW and + * ThoughtSpot Requires `DATAMANAGEMENT` (**Can manage data**) privilege. If + * [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled + * on your instance, the following Data control privileges may be required: - + * `CAN_MANAGE_CUSTOM_CALENDAR`(**Can manage custom calendars**) - + * `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) - + * `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` (**Can manage data models**) To download the + * connection metadata difference between ThoughtSpot and CDW, pass the connection GUID as + * `connection_identifier` in the API request. + * + * @param connectionIdentifier GUID of the connection (required) + * @return File + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the + * response body + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 Export metadata changes. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public File downloadConnectionMetadataChanges(String connectionIdentifier) throws ApiException { + ApiResponse localVarResp = + downloadConnectionMetadataChangesWithHttpInfo(connectionIdentifier); + return localVarResp.getData(); + } + + /** + * Version: 9.9.0.cl or later Exports the difference in connection metadata between CDW and + * ThoughtSpot Requires `DATAMANAGEMENT` (**Can manage data**) privilege. If + * [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled + * on your instance, the following Data control privileges may be required: - + * `CAN_MANAGE_CUSTOM_CALENDAR`(**Can manage custom calendars**) - + * `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) - + * `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` (**Can manage data models**) To download the + * connection metadata difference between ThoughtSpot and CDW, pass the connection GUID as + * `connection_identifier` in the API request. + * + * @param connectionIdentifier GUID of the connection (required) + * @return ApiResponse<File> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the + * response body + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 Export metadata changes. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public ApiResponse downloadConnectionMetadataChangesWithHttpInfo( + String connectionIdentifier) throws ApiException { + okhttp3.Call localVarCall = + downloadConnectionMetadataChangesValidateBeforeCall(connectionIdentifier, null); + Type localVarReturnType = new TypeToken() {}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); + } + + /** + * (asynchronously) Version: 9.9.0.cl or later Exports the difference in connection metadata + * between CDW and ThoughtSpot Requires `DATAMANAGEMENT` (**Can manage data**) + * privilege. If [Role-Based Access Control + * (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the + * following Data control privileges may be required: - + * `CAN_MANAGE_CUSTOM_CALENDAR`(**Can manage custom calendars**) - + * `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) - + * `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` (**Can manage data models**) To download the + * connection metadata difference between ThoughtSpot and CDW, pass the connection GUID as + * `connection_identifier` in the API request. + * + * @param connectionIdentifier GUID of the connection (required) + * @param _callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body + * object + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 Export metadata changes. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public okhttp3.Call downloadConnectionMetadataChangesAsync( + String connectionIdentifier, final ApiCallback _callback) throws ApiException { + + okhttp3.Call localVarCall = + downloadConnectionMetadataChangesValidateBeforeCall( + connectionIdentifier, _callback); + Type localVarReturnType = new TypeToken() {}.getType(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; + } + /** + * Build call for fetchConnectionDiffStatus + * + * @param connectionIdentifier GUID of the connection (required) + * @param _callback Callback for upload/download progress + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 true/false -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public okhttp3.Call fetchConnectionDiffStatusCall( + String connectionIdentifier, final ApiCallback _callback) throws ApiException { + String basePath = null; + // Operation Servers + String[] localBasePaths = new String[] {}; + + // Determine Base Path to Use + if (localCustomBaseUrl != null) { + basePath = localCustomBaseUrl; + } else if (localBasePaths.length > 0) { + basePath = localBasePaths[localHostIndex]; + } else { + basePath = null; + } + + Object localVarPostBody = null; + + // create path and map variables + String localVarPath = + "/api/rest/2.0/connections/fetch-connection-diff-status/{connection_identifier}" + .replace( + "{" + "connection_identifier" + "}", + localVarApiClient.escapeString(connectionIdentifier.toString())); + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + final String[] localVarAccepts = {"application/json"}; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = {}; + final String localVarContentType = + localVarApiClient.selectHeaderContentType(localVarContentTypes); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } + + String[] localVarAuthNames = new String[] {"bearerAuth"}; + return localVarApiClient.buildCall( + basePath, + localVarPath, + "POST", + localVarQueryParams, + localVarCollectionQueryParams, + localVarPostBody, + localVarHeaderParams, + localVarCookieParams, + localVarFormParams, + localVarAuthNames, + _callback); + } + + @SuppressWarnings("rawtypes") + private okhttp3.Call fetchConnectionDiffStatusValidateBeforeCall( + String connectionIdentifier, final ApiCallback _callback) throws ApiException { + // verify the required parameter 'connectionIdentifier' is set + if (connectionIdentifier == null) { + throw new ApiException( + "Missing the required parameter 'connectionIdentifier' when calling" + + " fetchConnectionDiffStatus(Async)"); + } + + return fetchConnectionDiffStatusCall(connectionIdentifier, _callback); + } + + /** + * Version: 9.9.0.cl or later Validates the difference in connection metadata between CDW and + * ThoughtSpot. Requires `DATAMANAGEMENT` (**Can manage data**) privilege. If + * [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled + * on your instance, the following Data control privileges may be required: - + * `CAN_MANAGE_CUSTOM_CALENDAR`(**Can manage custom calendars**) - + * `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) - + * `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` (**Can manage data models**) Returns a boolean + * indicating whether there is any difference between the connection metadata at ThoughtSpot and + * CDW. To get the connection metadata difference status, pass the connection GUID as + * `connection_identifier` in the API request. + * + * @param connectionIdentifier GUID of the connection (required) + * @return FetchConnectionDiffStatusResponse + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the + * response body + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 true/false -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public FetchConnectionDiffStatusResponse fetchConnectionDiffStatus(String connectionIdentifier) + throws ApiException { + ApiResponse localVarResp = + fetchConnectionDiffStatusWithHttpInfo(connectionIdentifier); + return localVarResp.getData(); + } + + /** + * Version: 9.9.0.cl or later Validates the difference in connection metadata between CDW and + * ThoughtSpot. Requires `DATAMANAGEMENT` (**Can manage data**) privilege. If + * [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled + * on your instance, the following Data control privileges may be required: - + * `CAN_MANAGE_CUSTOM_CALENDAR`(**Can manage custom calendars**) - + * `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) - + * `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` (**Can manage data models**) Returns a boolean + * indicating whether there is any difference between the connection metadata at ThoughtSpot and + * CDW. To get the connection metadata difference status, pass the connection GUID as + * `connection_identifier` in the API request. + * + * @param connectionIdentifier GUID of the connection (required) + * @return ApiResponse<FetchConnectionDiffStatusResponse> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the + * response body + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 true/false -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public ApiResponse fetchConnectionDiffStatusWithHttpInfo( + String connectionIdentifier) throws ApiException { + okhttp3.Call localVarCall = + fetchConnectionDiffStatusValidateBeforeCall(connectionIdentifier, null); + Type localVarReturnType = new TypeToken() {}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); + } + + /** + * (asynchronously) Version: 9.9.0.cl or later Validates the difference in connection metadata + * between CDW and ThoughtSpot. Requires `DATAMANAGEMENT` (**Can manage data**) + * privilege. If [Role-Based Access Control + * (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the + * following Data control privileges may be required: - + * `CAN_MANAGE_CUSTOM_CALENDAR`(**Can manage custom calendars**) - + * `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) - + * `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` (**Can manage data models**) Returns a boolean + * indicating whether there is any difference between the connection metadata at ThoughtSpot and + * CDW. To get the connection metadata difference status, pass the connection GUID as + * `connection_identifier` in the API request. + * + * @param connectionIdentifier GUID of the connection (required) + * @param _callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body + * object + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 true/false -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public okhttp3.Call fetchConnectionDiffStatusAsync( + String connectionIdentifier, + final ApiCallback _callback) + throws ApiException { + + okhttp3.Call localVarCall = + fetchConnectionDiffStatusValidateBeforeCall(connectionIdentifier, _callback); + Type localVarReturnType = new TypeToken() {}.getType(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; + } + /** + * Build call for revokeRefreshTokens + * + * @param connectionIdentifier Unique ID or name of the connection whose refresh tokens need to + * be revoked. All the users associated with the connection will have their refresh tokens + * revoked except the author. (required) + * @param revokeRefreshTokensRequest (required) + * @param _callback Callback for upload/download progress + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + * @http.response.details + * + * + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 Token(s) successfully revoked. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
404 Object not found -
409 Conflict -
500 Unexpected error -
+ */ + public okhttp3.Call revokeRefreshTokensCall( + String connectionIdentifier, + RevokeRefreshTokensRequest revokeRefreshTokensRequest, + final ApiCallback _callback) + throws ApiException { + String basePath = null; + // Operation Servers + String[] localBasePaths = new String[] {}; + + // Determine Base Path to Use + if (localCustomBaseUrl != null) { + basePath = localCustomBaseUrl; + } else if (localBasePaths.length > 0) { + basePath = localBasePaths[localHostIndex]; + } else { + basePath = null; + } + + Object localVarPostBody = revokeRefreshTokensRequest; + + // create path and map variables + String localVarPath = + "/api/rest/2.0/connections/{connection_identifier}/revoke-refresh-tokens" + .replace( + "{" + "connection_identifier" + "}", + localVarApiClient.escapeString(connectionIdentifier.toString())); + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + final String[] localVarAccepts = {"application/json"}; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = {"application/json"}; + final String localVarContentType = + localVarApiClient.selectHeaderContentType(localVarContentTypes); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } + + String[] localVarAuthNames = new String[] {"bearerAuth"}; + return localVarApiClient.buildCall( + basePath, + localVarPath, + "POST", + localVarQueryParams, + localVarCollectionQueryParams, + localVarPostBody, + localVarHeaderParams, + localVarCookieParams, + localVarFormParams, + localVarAuthNames, + _callback); + } + + @SuppressWarnings("rawtypes") + private okhttp3.Call revokeRefreshTokensValidateBeforeCall( + String connectionIdentifier, + RevokeRefreshTokensRequest revokeRefreshTokensRequest, + final ApiCallback _callback) + throws ApiException { + // verify the required parameter 'connectionIdentifier' is set + if (connectionIdentifier == null) { + throw new ApiException( + "Missing the required parameter 'connectionIdentifier' when calling" + + " revokeRefreshTokens(Async)"); + } + + // verify the required parameter 'revokeRefreshTokensRequest' is set + if (revokeRefreshTokensRequest == null) { + throw new ApiException( + "Missing the required parameter 'revokeRefreshTokensRequest' when calling" + + " revokeRefreshTokens(Async)"); + } + + return revokeRefreshTokensCall(connectionIdentifier, revokeRefreshTokensRequest, _callback); + } + + /** + * Version: 26.2.0.cl or later Revokes OAuth refresh tokens for users who no longer require + * access to a data warehouse connection. When a token is revoked, the affected user's + * session for that connection is terminated, and they must re-authenticate to regain access. + * Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) or + * `DATAMANAGEMENT` (**Can manage data**) privileges. If [Role-Based Access Control + * (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on the ThoughtSpot instance, + * users with `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) + * privilege can also make API requests to revoke tokens for connection users. #### Usage + * guidelines You can specify different combinations of identifiers to control which refresh + * tokens are revoked. - **connection_identifier**: Revokes refresh tokens for all users of the + * connection, except the connection author. - **connection_identifier** and + * **user_identifiers**: Revokes refresh tokens only for the users specified in the request. If + * the name or ID of the connection author is included in the request, their token will also be + * revoked. - **connection_identifier** and **configuration_identifiers**: Revokes refresh + * tokens for all users on the specified configurations, except the configuration author. - + * **connection_identifier**, **configuration_identifiers**, and **user_identifiers**: Revokes + * refresh tokens for the specified users on the specified configurations. - + * **connection_identifier** and **org_identifiers**: Revokes refresh tokens for the specified + * Orgs. Applicable only for published connections. - **connection_identifier**, + * **org_identifiers**, and **user_identifiers**: Revokes refresh tokens for the specified users + * in the specified Orgs. Applicable only for published connections. **NOTE**: The + * `org_identifiers` parameter is only applicable for published connections. Using + * this parameter for unpublished connections will result in an error. Ensure that the + * connections are published before making the API request. + * + * @param connectionIdentifier Unique ID or name of the connection whose refresh tokens need to + * be revoked. All the users associated with the connection will have their refresh tokens + * revoked except the author. (required) + * @param revokeRefreshTokensRequest (required) + * @return RevokeRefreshTokensResponse + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the + * response body + * @http.response.details + * + * + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 Token(s) successfully revoked. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
404 Object not found -
409 Conflict -
500 Unexpected error -
+ */ + public RevokeRefreshTokensResponse revokeRefreshTokens( + String connectionIdentifier, RevokeRefreshTokensRequest revokeRefreshTokensRequest) + throws ApiException { + ApiResponse localVarResp = + revokeRefreshTokensWithHttpInfo(connectionIdentifier, revokeRefreshTokensRequest); + return localVarResp.getData(); + } + + /** + * Version: 26.2.0.cl or later Revokes OAuth refresh tokens for users who no longer require + * access to a data warehouse connection. When a token is revoked, the affected user's + * session for that connection is terminated, and they must re-authenticate to regain access. + * Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) or + * `DATAMANAGEMENT` (**Can manage data**) privileges. If [Role-Based Access Control + * (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on the ThoughtSpot instance, + * users with `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) + * privilege can also make API requests to revoke tokens for connection users. #### Usage + * guidelines You can specify different combinations of identifiers to control which refresh + * tokens are revoked. - **connection_identifier**: Revokes refresh tokens for all users of the + * connection, except the connection author. - **connection_identifier** and + * **user_identifiers**: Revokes refresh tokens only for the users specified in the request. If + * the name or ID of the connection author is included in the request, their token will also be + * revoked. - **connection_identifier** and **configuration_identifiers**: Revokes refresh + * tokens for all users on the specified configurations, except the configuration author. - + * **connection_identifier**, **configuration_identifiers**, and **user_identifiers**: Revokes + * refresh tokens for the specified users on the specified configurations. - + * **connection_identifier** and **org_identifiers**: Revokes refresh tokens for the specified + * Orgs. Applicable only for published connections. - **connection_identifier**, + * **org_identifiers**, and **user_identifiers**: Revokes refresh tokens for the specified users + * in the specified Orgs. Applicable only for published connections. **NOTE**: The + * `org_identifiers` parameter is only applicable for published connections. Using + * this parameter for unpublished connections will result in an error. Ensure that the + * connections are published before making the API request. + * + * @param connectionIdentifier Unique ID or name of the connection whose refresh tokens need to + * be revoked. All the users associated with the connection will have their refresh tokens + * revoked except the author. (required) + * @param revokeRefreshTokensRequest (required) + * @return ApiResponse<RevokeRefreshTokensResponse> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the + * response body + * @http.response.details + * + * + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 Token(s) successfully revoked. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
404 Object not found -
409 Conflict -
500 Unexpected error -
+ */ + public ApiResponse revokeRefreshTokensWithHttpInfo( + String connectionIdentifier, RevokeRefreshTokensRequest revokeRefreshTokensRequest) + throws ApiException { + okhttp3.Call localVarCall = + revokeRefreshTokensValidateBeforeCall( + connectionIdentifier, revokeRefreshTokensRequest, null); + Type localVarReturnType = new TypeToken() {}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); + } + + /** + * (asynchronously) Version: 26.2.0.cl or later Revokes OAuth refresh tokens for users who no + * longer require access to a data warehouse connection. When a token is revoked, the affected + * user's session for that connection is terminated, and they must re-authenticate to regain + * access. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) or + * `DATAMANAGEMENT` (**Can manage data**) privileges. If [Role-Based Access Control + * (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on the ThoughtSpot instance, + * users with `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) + * privilege can also make API requests to revoke tokens for connection users. #### Usage + * guidelines You can specify different combinations of identifiers to control which refresh + * tokens are revoked. - **connection_identifier**: Revokes refresh tokens for all users of the + * connection, except the connection author. - **connection_identifier** and + * **user_identifiers**: Revokes refresh tokens only for the users specified in the request. If + * the name or ID of the connection author is included in the request, their token will also be + * revoked. - **connection_identifier** and **configuration_identifiers**: Revokes refresh + * tokens for all users on the specified configurations, except the configuration author. - + * **connection_identifier**, **configuration_identifiers**, and **user_identifiers**: Revokes + * refresh tokens for the specified users on the specified configurations. - + * **connection_identifier** and **org_identifiers**: Revokes refresh tokens for the specified + * Orgs. Applicable only for published connections. - **connection_identifier**, + * **org_identifiers**, and **user_identifiers**: Revokes refresh tokens for the specified users + * in the specified Orgs. Applicable only for published connections. **NOTE**: The + * `org_identifiers` parameter is only applicable for published connections. Using + * this parameter for unpublished connections will result in an error. Ensure that the + * connections are published before making the API request. + * + * @param connectionIdentifier Unique ID or name of the connection whose refresh tokens need to + * be revoked. All the users associated with the connection will have their refresh tokens + * revoked except the author. (required) + * @param revokeRefreshTokensRequest (required) + * @param _callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body + * object + * @http.response.details + * + * + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 Token(s) successfully revoked. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
404 Object not found -
409 Conflict -
500 Unexpected error -
+ */ + public okhttp3.Call revokeRefreshTokensAsync( + String connectionIdentifier, + RevokeRefreshTokensRequest revokeRefreshTokensRequest, + final ApiCallback _callback) + throws ApiException { + + okhttp3.Call localVarCall = + revokeRefreshTokensValidateBeforeCall( + connectionIdentifier, revokeRefreshTokensRequest, _callback); + Type localVarReturnType = new TypeToken() {}.getType(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; + } + /** + * Build call for searchConnection + * + * @param searchConnectionRequest (required) + * @param _callback Callback for upload/download progress + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 List of connections to the datasource. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public okhttp3.Call searchConnectionCall( + SearchConnectionRequest searchConnectionRequest, final ApiCallback _callback) + throws ApiException { + String basePath = null; + // Operation Servers + String[] localBasePaths = new String[] {}; + + // Determine Base Path to Use + if (localCustomBaseUrl != null) { + basePath = localCustomBaseUrl; + } else if (localBasePaths.length > 0) { + basePath = localBasePaths[localHostIndex]; + } else { + basePath = null; + } + + Object localVarPostBody = searchConnectionRequest; + + // create path and map variables + String localVarPath = "/api/rest/2.0/connection/search"; + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + final String[] localVarAccepts = {"application/json"}; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = {"application/json"}; + final String localVarContentType = + localVarApiClient.selectHeaderContentType(localVarContentTypes); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } + + String[] localVarAuthNames = new String[] {"bearerAuth"}; + return localVarApiClient.buildCall( + basePath, + localVarPath, + "POST", + localVarQueryParams, + localVarCollectionQueryParams, + localVarPostBody, + localVarHeaderParams, + localVarCookieParams, + localVarFormParams, + localVarAuthNames, + _callback); + } + + @SuppressWarnings("rawtypes") + private okhttp3.Call searchConnectionValidateBeforeCall( + SearchConnectionRequest searchConnectionRequest, final ApiCallback _callback) + throws ApiException { + // verify the required parameter 'searchConnectionRequest' is set + if (searchConnectionRequest == null) { + throw new ApiException( + "Missing the required parameter 'searchConnectionRequest' when calling" + + " searchConnection(Async)"); + } + + return searchConnectionCall(searchConnectionRequest, _callback); + } + + /** + * Version: 9.2.0.cl or later Gets connection objects. Requires `DATAMANAGEMENT` + * (**Can manage data**) or `ADMINISTRATION` (**Can administer ThoughtSpot**) + * privilege. If [Role-Based Access Control + * (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the + * `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) privilege is + * required. - To get a list of all connections available in the ThoughtSpot system, send the + * API request without any attributes in the request body. - To get the connection objects for a + * specific type of data warehouse, specify the type in `data_warehouse_types`. - To + * fetch details of a connection object, specify the connection object GUID or name. The + * `name_pattern` attribute allows passing partial text with `%` for a + * wildcard match. - To get details of the database, schemas, tables, or columns from a data + * connection object, specify `data_warehouse_object_type`. - To get a specific + * database, schema, table, or column from a connection object, define the object type in + * `data_warehouse_object_type` and object properties in the + * `data_warehouse_objects` array. For example, to search for a column, you must pass + * the database, schema, and table names in the API request. Note that in the following example, + * object properties are set in a hierarchical order (`database` > + * `schema` > `table` > `column`). ``` { + * \"connections\": [ { \"identifier\": + * \"b9d1f2ef-fa65-4a4b-994e-30fa2d57b0c2\", \"data_warehouse_objects\": [ { + * \"database\": \"NEBULADEV\", \"schema\": + * \"INFORMATION_SCHEMA\", \"table\": \"APPLICABLE_ROLES\", + * \"column\": \"ROLE_NAME\" } ] } ], + * \"data_warehouse_object_type\": \"COLUMN\" } ``` - To + * fetch data by `configuration`, specify `data_warehouse_object_type`. For + * example, to fetch columns from the `DEVELOPMENT` database, specify the + * `data_warehouse_object_type` as `DATABASE` and define the + * `configuration` string as + * `{\"database\":\"DEVELOPMENT\"}`. To get column data for a + * specific table, specify the table, for + * example,`{\"database\":\"RETAILAPPAREL\",\"table\":\"PIPES\"}`. + * - To query connections by `authentication_type`, specify + * `data_warehouse_object_type`. Supported values for `authentication_type` + * are: - `SERVICE_ACCOUNT`: For connections that require service account credentials + * to authenticate to the Cloud Data Warehouse and fetch data. - `OAUTH`: For + * connections that require OAuth credentials to authenticate to the Cloud Data Warehouse and + * fetch data. Teradata, Oracle, and Presto Cloud Data Warehouses do not support the OAuth + * authentication type. - `IAM`: For connections that have the IAM OAuth set up. This + * authentication type is supported on Amazon Redshift connections only. - `EXTOAUTH`: + * For connections that have External OAuth set up. ThoughtSpot supports external [OAuth with + * Microsoft Azure Active Directory (AD)](https://docs.thoughtspot.com/cloud/latest/ + * connections-snowflake-azure-ad-oauth) and [Okta for Snowflake data + * connections](https://docs.thoughtspot.com/cloud/latest/connections-snowflake-okta-oauth). - + * `KEY_PAIR`: For connections that require Key Pair account credentials to + * authenticate to the Cloud Data Warehouse and fetch data. This authentication type is + * supported on Snowflake connections only. - `OAUTH_WITH_PKCE`: For connections that + * require OAuth with PKCE account credentials to authenticate to the Cloud Data Warehouse and + * fetch data. This authentication type is supported on Snowflake, Starburst, Databricks, Denodo + * connections only. - `EXTOAUTH_WITH_PKCE`: For connections that require External + * OAuth With PKCE account credentials to authenticate to the Cloud Data Warehouse and fetch + * data. This authentication type is supported on Snowflake connections only. - + * `OAUTH_WITH_PEZ`: For connections that require OAuth With PEZ account credentials + * to authenticate to the Cloud Data Warehouse and fetch data. This authentication type is + * supported on Amazon Redshift connections only. - `OAUTH_WITH_SERVICE_PRINCIPAL`: + * For connections that require OAuth With Service Principal account credentials to authenticate + * to the Cloud Data Warehouse and fetch data. This authentication type is supported on + * Databricks connections only. - `PERSONAL_ACCESS_TOKEN`: For connections that + * require Personal Access Token account credentials to authenticate to the Cloud Data Warehouse + * and fetch data. This authentication type is supported on Databricks connections only. - + * `OAUTH_CLIENT_CREDENTIALS`: For connections that require OAuth Client Credentials + * to authenticate to the Cloud Data Warehouse and fetch data. This authentication type is + * supported on Snowflake connections only. - To include more details about connection objects + * in the API response, set `include_details` to `true`. - You can also sort + * the output by field names and filter connections by tags. **NOTE**: When filtering connection + * records by parameters other than `data_warehouse_types` or + * `tag_identifiers`, ensure that you set `record_size` to `-1` + * and `record_offset` to `0` for precise results. + * + * @param searchConnectionRequest (required) + * @return List<SearchConnectionResponse> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the + * response body + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 List of connections to the datasource. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public List searchConnection( + SearchConnectionRequest searchConnectionRequest) throws ApiException { + ApiResponse> localVarResp = + searchConnectionWithHttpInfo(searchConnectionRequest); + return localVarResp.getData(); + } + + /** + * Version: 9.2.0.cl or later Gets connection objects. Requires `DATAMANAGEMENT` + * (**Can manage data**) or `ADMINISTRATION` (**Can administer ThoughtSpot**) + * privilege. If [Role-Based Access Control + * (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the + * `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) privilege is + * required. - To get a list of all connections available in the ThoughtSpot system, send the + * API request without any attributes in the request body. - To get the connection objects for a + * specific type of data warehouse, specify the type in `data_warehouse_types`. - To + * fetch details of a connection object, specify the connection object GUID or name. The + * `name_pattern` attribute allows passing partial text with `%` for a + * wildcard match. - To get details of the database, schemas, tables, or columns from a data + * connection object, specify `data_warehouse_object_type`. - To get a specific + * database, schema, table, or column from a connection object, define the object type in + * `data_warehouse_object_type` and object properties in the + * `data_warehouse_objects` array. For example, to search for a column, you must pass + * the database, schema, and table names in the API request. Note that in the following example, + * object properties are set in a hierarchical order (`database` > + * `schema` > `table` > `column`). ``` { + * \"connections\": [ { \"identifier\": + * \"b9d1f2ef-fa65-4a4b-994e-30fa2d57b0c2\", \"data_warehouse_objects\": [ { + * \"database\": \"NEBULADEV\", \"schema\": + * \"INFORMATION_SCHEMA\", \"table\": \"APPLICABLE_ROLES\", + * \"column\": \"ROLE_NAME\" } ] } ], + * \"data_warehouse_object_type\": \"COLUMN\" } ``` - To + * fetch data by `configuration`, specify `data_warehouse_object_type`. For + * example, to fetch columns from the `DEVELOPMENT` database, specify the + * `data_warehouse_object_type` as `DATABASE` and define the + * `configuration` string as + * `{\"database\":\"DEVELOPMENT\"}`. To get column data for a + * specific table, specify the table, for + * example,`{\"database\":\"RETAILAPPAREL\",\"table\":\"PIPES\"}`. + * - To query connections by `authentication_type`, specify + * `data_warehouse_object_type`. Supported values for `authentication_type` + * are: - `SERVICE_ACCOUNT`: For connections that require service account credentials + * to authenticate to the Cloud Data Warehouse and fetch data. - `OAUTH`: For + * connections that require OAuth credentials to authenticate to the Cloud Data Warehouse and + * fetch data. Teradata, Oracle, and Presto Cloud Data Warehouses do not support the OAuth + * authentication type. - `IAM`: For connections that have the IAM OAuth set up. This + * authentication type is supported on Amazon Redshift connections only. - `EXTOAUTH`: + * For connections that have External OAuth set up. ThoughtSpot supports external [OAuth with + * Microsoft Azure Active Directory (AD)](https://docs.thoughtspot.com/cloud/latest/ + * connections-snowflake-azure-ad-oauth) and [Okta for Snowflake data + * connections](https://docs.thoughtspot.com/cloud/latest/connections-snowflake-okta-oauth). - + * `KEY_PAIR`: For connections that require Key Pair account credentials to + * authenticate to the Cloud Data Warehouse and fetch data. This authentication type is + * supported on Snowflake connections only. - `OAUTH_WITH_PKCE`: For connections that + * require OAuth with PKCE account credentials to authenticate to the Cloud Data Warehouse and + * fetch data. This authentication type is supported on Snowflake, Starburst, Databricks, Denodo + * connections only. - `EXTOAUTH_WITH_PKCE`: For connections that require External + * OAuth With PKCE account credentials to authenticate to the Cloud Data Warehouse and fetch + * data. This authentication type is supported on Snowflake connections only. - + * `OAUTH_WITH_PEZ`: For connections that require OAuth With PEZ account credentials + * to authenticate to the Cloud Data Warehouse and fetch data. This authentication type is + * supported on Amazon Redshift connections only. - `OAUTH_WITH_SERVICE_PRINCIPAL`: + * For connections that require OAuth With Service Principal account credentials to authenticate + * to the Cloud Data Warehouse and fetch data. This authentication type is supported on + * Databricks connections only. - `PERSONAL_ACCESS_TOKEN`: For connections that + * require Personal Access Token account credentials to authenticate to the Cloud Data Warehouse + * and fetch data. This authentication type is supported on Databricks connections only. - + * `OAUTH_CLIENT_CREDENTIALS`: For connections that require OAuth Client Credentials + * to authenticate to the Cloud Data Warehouse and fetch data. This authentication type is + * supported on Snowflake connections only. - To include more details about connection objects + * in the API response, set `include_details` to `true`. - You can also sort + * the output by field names and filter connections by tags. **NOTE**: When filtering connection + * records by parameters other than `data_warehouse_types` or + * `tag_identifiers`, ensure that you set `record_size` to `-1` + * and `record_offset` to `0` for precise results. + * + * @param searchConnectionRequest (required) + * @return ApiResponse<List<SearchConnectionResponse>> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the + * response body + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 List of connections to the datasource. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public ApiResponse> searchConnectionWithHttpInfo( + SearchConnectionRequest searchConnectionRequest) throws ApiException { + okhttp3.Call localVarCall = + searchConnectionValidateBeforeCall(searchConnectionRequest, null); + Type localVarReturnType = new TypeToken>() {}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); + } + + /** + * (asynchronously) Version: 9.2.0.cl or later Gets connection objects. Requires + * `DATAMANAGEMENT` (**Can manage data**) or `ADMINISTRATION` (**Can + * administer ThoughtSpot**) privilege. If [Role-Based Access Control + * (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the + * `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) privilege is + * required. - To get a list of all connections available in the ThoughtSpot system, send the + * API request without any attributes in the request body. - To get the connection objects for a + * specific type of data warehouse, specify the type in `data_warehouse_types`. - To + * fetch details of a connection object, specify the connection object GUID or name. The + * `name_pattern` attribute allows passing partial text with `%` for a + * wildcard match. - To get details of the database, schemas, tables, or columns from a data + * connection object, specify `data_warehouse_object_type`. - To get a specific + * database, schema, table, or column from a connection object, define the object type in + * `data_warehouse_object_type` and object properties in the + * `data_warehouse_objects` array. For example, to search for a column, you must pass + * the database, schema, and table names in the API request. Note that in the following example, + * object properties are set in a hierarchical order (`database` > + * `schema` > `table` > `column`). ``` { + * \"connections\": [ { \"identifier\": + * \"b9d1f2ef-fa65-4a4b-994e-30fa2d57b0c2\", \"data_warehouse_objects\": [ { + * \"database\": \"NEBULADEV\", \"schema\": + * \"INFORMATION_SCHEMA\", \"table\": \"APPLICABLE_ROLES\", + * \"column\": \"ROLE_NAME\" } ] } ], + * \"data_warehouse_object_type\": \"COLUMN\" } ``` - To + * fetch data by `configuration`, specify `data_warehouse_object_type`. For + * example, to fetch columns from the `DEVELOPMENT` database, specify the + * `data_warehouse_object_type` as `DATABASE` and define the + * `configuration` string as + * `{\"database\":\"DEVELOPMENT\"}`. To get column data for a + * specific table, specify the table, for + * example,`{\"database\":\"RETAILAPPAREL\",\"table\":\"PIPES\"}`. + * - To query connections by `authentication_type`, specify + * `data_warehouse_object_type`. Supported values for `authentication_type` + * are: - `SERVICE_ACCOUNT`: For connections that require service account credentials + * to authenticate to the Cloud Data Warehouse and fetch data. - `OAUTH`: For + * connections that require OAuth credentials to authenticate to the Cloud Data Warehouse and + * fetch data. Teradata, Oracle, and Presto Cloud Data Warehouses do not support the OAuth + * authentication type. - `IAM`: For connections that have the IAM OAuth set up. This + * authentication type is supported on Amazon Redshift connections only. - `EXTOAUTH`: + * For connections that have External OAuth set up. ThoughtSpot supports external [OAuth with + * Microsoft Azure Active Directory (AD)](https://docs.thoughtspot.com/cloud/latest/ + * connections-snowflake-azure-ad-oauth) and [Okta for Snowflake data + * connections](https://docs.thoughtspot.com/cloud/latest/connections-snowflake-okta-oauth). - + * `KEY_PAIR`: For connections that require Key Pair account credentials to + * authenticate to the Cloud Data Warehouse and fetch data. This authentication type is + * supported on Snowflake connections only. - `OAUTH_WITH_PKCE`: For connections that + * require OAuth with PKCE account credentials to authenticate to the Cloud Data Warehouse and + * fetch data. This authentication type is supported on Snowflake, Starburst, Databricks, Denodo + * connections only. - `EXTOAUTH_WITH_PKCE`: For connections that require External + * OAuth With PKCE account credentials to authenticate to the Cloud Data Warehouse and fetch + * data. This authentication type is supported on Snowflake connections only. - + * `OAUTH_WITH_PEZ`: For connections that require OAuth With PEZ account credentials + * to authenticate to the Cloud Data Warehouse and fetch data. This authentication type is + * supported on Amazon Redshift connections only. - `OAUTH_WITH_SERVICE_PRINCIPAL`: + * For connections that require OAuth With Service Principal account credentials to authenticate + * to the Cloud Data Warehouse and fetch data. This authentication type is supported on + * Databricks connections only. - `PERSONAL_ACCESS_TOKEN`: For connections that + * require Personal Access Token account credentials to authenticate to the Cloud Data Warehouse + * and fetch data. This authentication type is supported on Databricks connections only. - + * `OAUTH_CLIENT_CREDENTIALS`: For connections that require OAuth Client Credentials + * to authenticate to the Cloud Data Warehouse and fetch data. This authentication type is + * supported on Snowflake connections only. - To include more details about connection objects + * in the API response, set `include_details` to `true`. - You can also sort + * the output by field names and filter connections by tags. **NOTE**: When filtering connection + * records by parameters other than `data_warehouse_types` or + * `tag_identifiers`, ensure that you set `record_size` to `-1` + * and `record_offset` to `0` for precise results. + * + * @param searchConnectionRequest (required) + * @param _callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body + * object + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 List of connections to the datasource. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public okhttp3.Call searchConnectionAsync( + SearchConnectionRequest searchConnectionRequest, + final ApiCallback> _callback) + throws ApiException { + + okhttp3.Call localVarCall = + searchConnectionValidateBeforeCall(searchConnectionRequest, _callback); + Type localVarReturnType = new TypeToken>() {}.getType(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; + } + /** + * Build call for syncMetadata + * + * @param connectionIdentifier Unique ID or name of the connection. (required) + * @param syncMetadataRequest (required) + * @param _callback Callback for upload/download progress + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + * @http.response.details + * + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 Metadata synced successfully. -
400 Invalid request parameters or hierarchy. -
401 Unauthorized access. -
403 Forbidden access. -
404 Connection, table, or column not found. -
500 Unexpected error -
+ */ + public okhttp3.Call syncMetadataCall( + String connectionIdentifier, + SyncMetadataRequest syncMetadataRequest, + final ApiCallback _callback) + throws ApiException { + String basePath = null; + // Operation Servers + String[] localBasePaths = new String[] {}; + + // Determine Base Path to Use + if (localCustomBaseUrl != null) { + basePath = localCustomBaseUrl; + } else if (localBasePaths.length > 0) { + basePath = localBasePaths[localHostIndex]; + } else { + basePath = null; + } + + Object localVarPostBody = syncMetadataRequest; + + // create path and map variables + String localVarPath = + "/api/rest/2.0/connections/{connection_identifier}/resync-metadata" + .replace( + "{" + "connection_identifier" + "}", + localVarApiClient.escapeString(connectionIdentifier.toString())); + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + final String[] localVarAccepts = {"application/json"}; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = {"application/json"}; + final String localVarContentType = + localVarApiClient.selectHeaderContentType(localVarContentTypes); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } + + String[] localVarAuthNames = new String[] {"bearerAuth"}; + return localVarApiClient.buildCall( + basePath, + localVarPath, + "POST", + localVarQueryParams, + localVarCollectionQueryParams, + localVarPostBody, + localVarHeaderParams, + localVarCookieParams, + localVarFormParams, + localVarAuthNames, + _callback); + } + + @SuppressWarnings("rawtypes") + private okhttp3.Call syncMetadataValidateBeforeCall( + String connectionIdentifier, + SyncMetadataRequest syncMetadataRequest, + final ApiCallback _callback) + throws ApiException { + // verify the required parameter 'connectionIdentifier' is set + if (connectionIdentifier == null) { + throw new ApiException( + "Missing the required parameter 'connectionIdentifier' when calling" + + " syncMetadata(Async)"); + } + + // verify the required parameter 'syncMetadataRequest' is set + if (syncMetadataRequest == null) { + throw new ApiException( + "Missing the required parameter 'syncMetadataRequest' when calling" + + " syncMetadata(Async)"); + } + + return syncMetadataCall(connectionIdentifier, syncMetadataRequest, _callback); + } + + /** + * Version: 26.5.0.cl or later Synchronizes connection metadata attributes from your Cloud Data + * Warehouse (CDW) with ThoughtSpot. Requires the `DATAMANAGEMENT` (**Can manage + * data**) privilege. If [Role-Based Access Control + * (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the + * `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` (**Can manage data models**) privilege is + * required. #### Usage guidelines To synchronize attributes from a CDW, specify the connection + * GUID or name in the `connection_identifier` path parameter and + * `sync_attributes` in the request body. Default attribute is + * `[\"DESCRIPTION\"]`. ##### Hierarchical schema * Connection: The + * connection object for the sync operation. * Tables: Tables for the sync operation. When no + * table is specified, all tables are synchronized. * Columns: If the table is specified, you + * can add the columns for the sync operation. If no columns are specified, all columns in the + * specified table are considered for the sync operation. To set the scope for the sync + * operation: * Connection-level: To sync all tables and columns, pass an empty request body, or + * only the attributes in the request body. * Table-level: To synchronize specific tables and + * their columns, specify the table identifiers in the `tables` array. * Column-level: + * To synchronize specific columns, specify the table identifier as the key and column + * identifiers as the value in the `tables` array. ``` { + * \"tables\": [ {\"table-guid-1\": [\"column-guid-1\", + * \"column-guid-2\"]}, \"table-guid-2\" ], \"sync_attributes\": + * [\"DESCRIPTION\"] } ``` ##### API response If the sync operation is + * successful, the API returns the following information: * Status of the sync operation. For + * example, `SUCCESS`, `PARTIAL_SUCCESS`, or `NO_UPDATE`. * Number + * of tables and columns that were updated. * Number of tables and columns with the sync failed + * status when the overall sync status is `PARTIAL_SUCCESS`. * Message text indicating + * the sync results. + * + * @param connectionIdentifier Unique ID or name of the connection. (required) + * @param syncMetadataRequest (required) + * @return SyncMetadataResponse + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the + * response body + * @http.response.details + * + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 Metadata synced successfully. -
400 Invalid request parameters or hierarchy. -
401 Unauthorized access. -
403 Forbidden access. -
404 Connection, table, or column not found. -
500 Unexpected error -
+ */ + public SyncMetadataResponse syncMetadata( + String connectionIdentifier, SyncMetadataRequest syncMetadataRequest) + throws ApiException { + ApiResponse localVarResp = + syncMetadataWithHttpInfo(connectionIdentifier, syncMetadataRequest); + return localVarResp.getData(); + } + + /** + * Version: 26.5.0.cl or later Synchronizes connection metadata attributes from your Cloud Data + * Warehouse (CDW) with ThoughtSpot. Requires the `DATAMANAGEMENT` (**Can manage + * data**) privilege. If [Role-Based Access Control + * (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the + * `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` (**Can manage data models**) privilege is + * required. #### Usage guidelines To synchronize attributes from a CDW, specify the connection + * GUID or name in the `connection_identifier` path parameter and + * `sync_attributes` in the request body. Default attribute is + * `[\"DESCRIPTION\"]`. ##### Hierarchical schema * Connection: The + * connection object for the sync operation. * Tables: Tables for the sync operation. When no + * table is specified, all tables are synchronized. * Columns: If the table is specified, you + * can add the columns for the sync operation. If no columns are specified, all columns in the + * specified table are considered for the sync operation. To set the scope for the sync + * operation: * Connection-level: To sync all tables and columns, pass an empty request body, or + * only the attributes in the request body. * Table-level: To synchronize specific tables and + * their columns, specify the table identifiers in the `tables` array. * Column-level: + * To synchronize specific columns, specify the table identifier as the key and column + * identifiers as the value in the `tables` array. ``` { + * \"tables\": [ {\"table-guid-1\": [\"column-guid-1\", + * \"column-guid-2\"]}, \"table-guid-2\" ], \"sync_attributes\": + * [\"DESCRIPTION\"] } ``` ##### API response If the sync operation is + * successful, the API returns the following information: * Status of the sync operation. For + * example, `SUCCESS`, `PARTIAL_SUCCESS`, or `NO_UPDATE`. * Number + * of tables and columns that were updated. * Number of tables and columns with the sync failed + * status when the overall sync status is `PARTIAL_SUCCESS`. * Message text indicating + * the sync results. + * + * @param connectionIdentifier Unique ID or name of the connection. (required) + * @param syncMetadataRequest (required) + * @return ApiResponse<SyncMetadataResponse> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the + * response body + * @http.response.details + * + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 Metadata synced successfully. -
400 Invalid request parameters or hierarchy. -
401 Unauthorized access. -
403 Forbidden access. -
404 Connection, table, or column not found. -
500 Unexpected error -
+ */ + public ApiResponse syncMetadataWithHttpInfo( + String connectionIdentifier, SyncMetadataRequest syncMetadataRequest) + throws ApiException { + okhttp3.Call localVarCall = + syncMetadataValidateBeforeCall(connectionIdentifier, syncMetadataRequest, null); + Type localVarReturnType = new TypeToken() {}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); + } + + /** + * (asynchronously) Version: 26.5.0.cl or later Synchronizes connection metadata attributes from + * your Cloud Data Warehouse (CDW) with ThoughtSpot. Requires the `DATAMANAGEMENT` + * (**Can manage data**) privilege. If [Role-Based Access Control + * (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the + * `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` (**Can manage data models**) privilege is + * required. #### Usage guidelines To synchronize attributes from a CDW, specify the connection + * GUID or name in the `connection_identifier` path parameter and + * `sync_attributes` in the request body. Default attribute is + * `[\"DESCRIPTION\"]`. ##### Hierarchical schema * Connection: The + * connection object for the sync operation. * Tables: Tables for the sync operation. When no + * table is specified, all tables are synchronized. * Columns: If the table is specified, you + * can add the columns for the sync operation. If no columns are specified, all columns in the + * specified table are considered for the sync operation. To set the scope for the sync + * operation: * Connection-level: To sync all tables and columns, pass an empty request body, or + * only the attributes in the request body. * Table-level: To synchronize specific tables and + * their columns, specify the table identifiers in the `tables` array. * Column-level: + * To synchronize specific columns, specify the table identifier as the key and column + * identifiers as the value in the `tables` array. ``` { + * \"tables\": [ {\"table-guid-1\": [\"column-guid-1\", + * \"column-guid-2\"]}, \"table-guid-2\" ], \"sync_attributes\": + * [\"DESCRIPTION\"] } ``` ##### API response If the sync operation is + * successful, the API returns the following information: * Status of the sync operation. For + * example, `SUCCESS`, `PARTIAL_SUCCESS`, or `NO_UPDATE`. * Number + * of tables and columns that were updated. * Number of tables and columns with the sync failed + * status when the overall sync status is `PARTIAL_SUCCESS`. * Message text indicating + * the sync results. + * + * @param connectionIdentifier Unique ID or name of the connection. (required) + * @param syncMetadataRequest (required) + * @param _callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body + * object + * @http.response.details + * + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 Metadata synced successfully. -
400 Invalid request parameters or hierarchy. -
401 Unauthorized access. -
403 Forbidden access. -
404 Connection, table, or column not found. -
500 Unexpected error -
+ */ + public okhttp3.Call syncMetadataAsync( + String connectionIdentifier, + SyncMetadataRequest syncMetadataRequest, + final ApiCallback _callback) + throws ApiException { + + okhttp3.Call localVarCall = + syncMetadataValidateBeforeCall( + connectionIdentifier, syncMetadataRequest, _callback); + Type localVarReturnType = new TypeToken() {}.getType(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; + } + /** + * Build call for updateConnection + * + * @param updateConnectionRequest (required) + * @param _callback Callback for upload/download progress + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
204 Connection successfully updated. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ * + * @deprecated + */ + @Deprecated + public okhttp3.Call updateConnectionCall( + UpdateConnectionRequest updateConnectionRequest, final ApiCallback _callback) + throws ApiException { + String basePath = null; + // Operation Servers + String[] localBasePaths = new String[] {}; + + // Determine Base Path to Use + if (localCustomBaseUrl != null) { + basePath = localCustomBaseUrl; + } else if (localBasePaths.length > 0) { + basePath = localBasePaths[localHostIndex]; + } else { + basePath = null; + } + + Object localVarPostBody = updateConnectionRequest; + + // create path and map variables + String localVarPath = "/api/rest/2.0/connection/update"; + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + final String[] localVarAccepts = {"application/json"}; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = {"application/json"}; + final String localVarContentType = + localVarApiClient.selectHeaderContentType(localVarContentTypes); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } + + String[] localVarAuthNames = new String[] {"bearerAuth"}; + return localVarApiClient.buildCall( + basePath, + localVarPath, + "POST", + localVarQueryParams, + localVarCollectionQueryParams, + localVarPostBody, + localVarHeaderParams, + localVarCookieParams, + localVarFormParams, + localVarAuthNames, + _callback); + } + + @Deprecated + @SuppressWarnings("rawtypes") + private okhttp3.Call updateConnectionValidateBeforeCall( + UpdateConnectionRequest updateConnectionRequest, final ApiCallback _callback) + throws ApiException { + // verify the required parameter 'updateConnectionRequest' is set + if (updateConnectionRequest == null) { + throw new ApiException( + "Missing the required parameter 'updateConnectionRequest' when calling" + + " updateConnection(Async)"); + } + + return updateConnectionCall(updateConnectionRequest, _callback); + } + + /** + * Version: 9.2.0.cl or later **Important**: This endpoint is deprecated and will be removed + * from ThoughtSpot in September 2025. ThoughtSpot strongly recommends using the [Update + * connection V2](#/http/api-endpoints/connections/update-connection-v2) endpoint to update your + * connection objects. #### Usage guidelines Updates a connection object. Requires + * `DATAMANAGEMENT` (**Can manage data**) and edit permissions to the connection + * object, or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If + * [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled + * on your instance, the `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit + * Connections**) privilege is required. To update a connection object, pass these parameters in + * your API request: 1. GUID of the connection object. 2. If you are updating tables or database + * schema of a connection object: a. Add the updated JSON map of metadata with database, schema, + * and tables in `data_warehouse_config`. b. Set `validate` to + * `true`. 3. If you are updating a configuration attribute, connection name, or + * description, you can set `validate` to `false`. + * + * @param updateConnectionRequest (required) + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the + * response body + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
204 Connection successfully updated. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ * + * @deprecated + */ + @Deprecated + public void updateConnection(UpdateConnectionRequest updateConnectionRequest) + throws ApiException { + updateConnectionWithHttpInfo(updateConnectionRequest); + } + + /** + * Version: 9.2.0.cl or later **Important**: This endpoint is deprecated and will be removed + * from ThoughtSpot in September 2025. ThoughtSpot strongly recommends using the [Update + * connection V2](#/http/api-endpoints/connections/update-connection-v2) endpoint to update your + * connection objects. #### Usage guidelines Updates a connection object. Requires + * `DATAMANAGEMENT` (**Can manage data**) and edit permissions to the connection + * object, or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If + * [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled + * on your instance, the `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit + * Connections**) privilege is required. To update a connection object, pass these parameters in + * your API request: 1. GUID of the connection object. 2. If you are updating tables or database + * schema of a connection object: a. Add the updated JSON map of metadata with database, schema, + * and tables in `data_warehouse_config`. b. Set `validate` to + * `true`. 3. If you are updating a configuration attribute, connection name, or + * description, you can set `validate` to `false`. + * + * @param updateConnectionRequest (required) + * @return ApiResponse<Void> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the + * response body + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
204 Connection successfully updated. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ * + * @deprecated + */ + @Deprecated + public ApiResponse updateConnectionWithHttpInfo( + UpdateConnectionRequest updateConnectionRequest) throws ApiException { + okhttp3.Call localVarCall = + updateConnectionValidateBeforeCall(updateConnectionRequest, null); + return localVarApiClient.execute(localVarCall); + } + + /** + * (asynchronously) Version: 9.2.0.cl or later **Important**: This endpoint is deprecated and + * will be removed from ThoughtSpot in September 2025. ThoughtSpot strongly recommends using the + * [Update connection V2](#/http/api-endpoints/connections/update-connection-v2) endpoint to + * update your connection objects. #### Usage guidelines Updates a connection object. Requires + * `DATAMANAGEMENT` (**Can manage data**) and edit permissions to the connection + * object, or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If + * [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled + * on your instance, the `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit + * Connections**) privilege is required. To update a connection object, pass these parameters in + * your API request: 1. GUID of the connection object. 2. If you are updating tables or database + * schema of a connection object: a. Add the updated JSON map of metadata with database, schema, + * and tables in `data_warehouse_config`. b. Set `validate` to + * `true`. 3. If you are updating a configuration attribute, connection name, or + * description, you can set `validate` to `false`. + * + * @param updateConnectionRequest (required) + * @param _callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body + * object + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
204 Connection successfully updated. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ * + * @deprecated + */ + @Deprecated + public okhttp3.Call updateConnectionAsync( + UpdateConnectionRequest updateConnectionRequest, final ApiCallback _callback) + throws ApiException { + + okhttp3.Call localVarCall = + updateConnectionValidateBeforeCall(updateConnectionRequest, _callback); + localVarApiClient.executeAsync(localVarCall, _callback); + return localVarCall; + } + /** + * Build call for updateConnectionStatus + * + * @param connectionIdentifier Unique ID or name of the connection. (required) + * @param updateConnectionStatusRequest (required) + * @param _callback Callback for upload/download progress + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + * @http.response.details + * + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
204 Connection status updated successfully. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
404 Object not found -
500 Unexpected error -
+ */ + public okhttp3.Call updateConnectionStatusCall( + String connectionIdentifier, + UpdateConnectionStatusRequest updateConnectionStatusRequest, + final ApiCallback _callback) + throws ApiException { + String basePath = null; + // Operation Servers + String[] localBasePaths = new String[] {}; + + // Determine Base Path to Use + if (localCustomBaseUrl != null) { + basePath = localCustomBaseUrl; + } else if (localBasePaths.length > 0) { + basePath = localBasePaths[localHostIndex]; + } else { + basePath = null; + } + + Object localVarPostBody = updateConnectionStatusRequest; + + // create path and map variables + String localVarPath = + "/api/rest/2.0/connections/{connection_identifier}/status" + .replace( + "{" + "connection_identifier" + "}", + localVarApiClient.escapeString(connectionIdentifier.toString())); + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + final String[] localVarAccepts = {"application/json"}; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = {"application/json"}; + final String localVarContentType = + localVarApiClient.selectHeaderContentType(localVarContentTypes); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } + + String[] localVarAuthNames = new String[] {"bearerAuth"}; + return localVarApiClient.buildCall( + basePath, + localVarPath, + "POST", + localVarQueryParams, + localVarCollectionQueryParams, + localVarPostBody, + localVarHeaderParams, + localVarCookieParams, + localVarFormParams, + localVarAuthNames, + _callback); + } + + @SuppressWarnings("rawtypes") + private okhttp3.Call updateConnectionStatusValidateBeforeCall( + String connectionIdentifier, + UpdateConnectionStatusRequest updateConnectionStatusRequest, + final ApiCallback _callback) + throws ApiException { + // verify the required parameter 'connectionIdentifier' is set + if (connectionIdentifier == null) { + throw new ApiException( + "Missing the required parameter 'connectionIdentifier' when calling" + + " updateConnectionStatus(Async)"); + } + + // verify the required parameter 'updateConnectionStatusRequest' is set + if (updateConnectionStatusRequest == null) { + throw new ApiException( + "Missing the required parameter 'updateConnectionStatusRequest' when calling" + + " updateConnectionStatus(Async)"); + } + + return updateConnectionStatusCall( + connectionIdentifier, updateConnectionStatusRequest, _callback); + } + + /** + * Version: 26.6.0.cl or later Activates or deactivates a connection. A deactivated connection + * cannot be used for queries or operations until it is activated again. Requires + * `DATAMANAGEMENT` (**Can manage data**) privilege. If [Role-Based Access Control + * (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the + * `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) privilege is + * required. Only the connection owner or an administrator can perform this operation. #### + * Usage guidelines To update the status of a connection, specify the connection GUID or name in + * the `connection_identifier` path parameter and the desired `status` in + * the request body. - **ACTIVATED**: Enables the connection. Queries and operations can resume + * on an activated connection. - **DEACTIVATED**: Disables the connection. It does not remove + * the connection metadata, but only makes the connection unavailable for queries and + * operations. You can reactivate a deactivated connection by setting \"status\": + * \"ACTIVATED\". + * + * @param connectionIdentifier Unique ID or name of the connection. (required) + * @param updateConnectionStatusRequest (required) + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the + * response body + * @http.response.details + * + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
204 Connection status updated successfully. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
404 Object not found -
500 Unexpected error -
+ */ + public void updateConnectionStatus( + String connectionIdentifier, + UpdateConnectionStatusRequest updateConnectionStatusRequest) + throws ApiException { + updateConnectionStatusWithHttpInfo(connectionIdentifier, updateConnectionStatusRequest); + } + + /** + * Version: 26.6.0.cl or later Activates or deactivates a connection. A deactivated connection + * cannot be used for queries or operations until it is activated again. Requires + * `DATAMANAGEMENT` (**Can manage data**) privilege. If [Role-Based Access Control + * (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the + * `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) privilege is + * required. Only the connection owner or an administrator can perform this operation. #### + * Usage guidelines To update the status of a connection, specify the connection GUID or name in + * the `connection_identifier` path parameter and the desired `status` in + * the request body. - **ACTIVATED**: Enables the connection. Queries and operations can resume + * on an activated connection. - **DEACTIVATED**: Disables the connection. It does not remove + * the connection metadata, but only makes the connection unavailable for queries and + * operations. You can reactivate a deactivated connection by setting \"status\": + * \"ACTIVATED\". + * + * @param connectionIdentifier Unique ID or name of the connection. (required) + * @param updateConnectionStatusRequest (required) + * @return ApiResponse<Void> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the + * response body + * @http.response.details + * + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
204 Connection status updated successfully. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
404 Object not found -
500 Unexpected error -
+ */ + public ApiResponse updateConnectionStatusWithHttpInfo( + String connectionIdentifier, + UpdateConnectionStatusRequest updateConnectionStatusRequest) + throws ApiException { + okhttp3.Call localVarCall = + updateConnectionStatusValidateBeforeCall( + connectionIdentifier, updateConnectionStatusRequest, null); + return localVarApiClient.execute(localVarCall); + } + + /** + * (asynchronously) Version: 26.6.0.cl or later Activates or deactivates a connection. A + * deactivated connection cannot be used for queries or operations until it is activated again. + * Requires `DATAMANAGEMENT` (**Can manage data**) privilege. If [Role-Based Access + * Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, + * the `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) privilege is + * required. Only the connection owner or an administrator can perform this operation. #### + * Usage guidelines To update the status of a connection, specify the connection GUID or name in + * the `connection_identifier` path parameter and the desired `status` in + * the request body. - **ACTIVATED**: Enables the connection. Queries and operations can resume + * on an activated connection. - **DEACTIVATED**: Disables the connection. It does not remove + * the connection metadata, but only makes the connection unavailable for queries and + * operations. You can reactivate a deactivated connection by setting \"status\": + * \"ACTIVATED\". + * + * @param connectionIdentifier Unique ID or name of the connection. (required) + * @param updateConnectionStatusRequest (required) + * @param _callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body + * object + * @http.response.details + * + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
204 Connection status updated successfully. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
404 Object not found -
500 Unexpected error -
+ */ + public okhttp3.Call updateConnectionStatusAsync( + String connectionIdentifier, + UpdateConnectionStatusRequest updateConnectionStatusRequest, + final ApiCallback _callback) + throws ApiException { + + okhttp3.Call localVarCall = + updateConnectionStatusValidateBeforeCall( + connectionIdentifier, updateConnectionStatusRequest, _callback); + localVarApiClient.executeAsync(localVarCall, _callback); + return localVarCall; + } + /** + * Build call for updateConnectionV2 + * + * @param connectionIdentifier Unique ID or name of the connection. (required) + * @param updateConnectionV2Request (required) + * @param _callback Callback for upload/download progress + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
204 Connection successfully updated. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public okhttp3.Call updateConnectionV2Call( + String connectionIdentifier, + UpdateConnectionV2Request updateConnectionV2Request, + final ApiCallback _callback) + throws ApiException { + String basePath = null; + // Operation Servers + String[] localBasePaths = new String[] {}; + + // Determine Base Path to Use + if (localCustomBaseUrl != null) { + basePath = localCustomBaseUrl; + } else if (localBasePaths.length > 0) { + basePath = localBasePaths[localHostIndex]; + } else { + basePath = null; + } + + Object localVarPostBody = updateConnectionV2Request; + + // create path and map variables + String localVarPath = + "/api/rest/2.0/connections/{connection_identifier}/update" + .replace( + "{" + "connection_identifier" + "}", + localVarApiClient.escapeString(connectionIdentifier.toString())); + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + final String[] localVarAccepts = {"application/json"}; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = {"application/json"}; + final String localVarContentType = + localVarApiClient.selectHeaderContentType(localVarContentTypes); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } + + String[] localVarAuthNames = new String[] {"bearerAuth"}; + return localVarApiClient.buildCall( + basePath, + localVarPath, + "POST", + localVarQueryParams, + localVarCollectionQueryParams, + localVarPostBody, + localVarHeaderParams, + localVarCookieParams, + localVarFormParams, + localVarAuthNames, + _callback); + } + + @SuppressWarnings("rawtypes") + private okhttp3.Call updateConnectionV2ValidateBeforeCall( + String connectionIdentifier, + UpdateConnectionV2Request updateConnectionV2Request, + final ApiCallback _callback) + throws ApiException { + // verify the required parameter 'connectionIdentifier' is set + if (connectionIdentifier == null) { + throw new ApiException( + "Missing the required parameter 'connectionIdentifier' when calling" + + " updateConnectionV2(Async)"); + } + + // verify the required parameter 'updateConnectionV2Request' is set + if (updateConnectionV2Request == null) { + throw new ApiException( + "Missing the required parameter 'updateConnectionV2Request' when calling" + + " updateConnectionV2(Async)"); + } + + return updateConnectionV2Call(connectionIdentifier, updateConnectionV2Request, _callback); + } + + /** + * Version: 10.4.0.cl or later Updates a connection object. Requires `DATAMANAGEMENT` + * (**Can manage data**) and edit permissions to the connection object, or + * `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access + * Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, + * the `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) privilege is + * required. To update a connection object, pass these parameters in your API request: 1. GUID + * of the connection object. 2. If you are updating tables or database schema of a connection + * object: a. Add the updated JSON map of metadata with database, schema, and tables in + * `data_warehouse_config`. b. Set `validate` to `true`. **NOTE:** + * If the `authentication_type` is anything other than SERVICE_ACCOUNT, you must + * explicitly provide the authenticationType property in the payload. If you do not specify + * authenticationType, the API will default to SERVICE_ACCOUNT as the authentication type. * A + * JSON map of configuration attributes, database details, and table properties in + * `data_warehouse_config` as shown in the following example: * This is an example of + * updating a single table in a empty connection: ``` { + * \"authenticationType\": \"SERVICE_ACCOUNT\", + * \"externalDatabases\": [ { \"name\": \"DEVELOPMENT\", + * \"isAutoCreated\": false, \"schemas\": [ { \"name\": + * \"TS_dataset\", \"tables\": [ { \"name\": + * \"DEMORENAME\", \"type\": \"TABLE\", \"description\": + * \"\", \"selected\": true, \"linked\": true, \"gid\": + * 0, \"datasetId\": \"-1\", \"subType\": \"\", + * \"reportId\": \"\", \"viewId\": \"\", + * \"columns\": [ { \"name\": \"Col1\", \"type\": + * \"VARCHAR\", \"canImport\": true, \"selected\": true, + * \"description\": \"\", \"isLinkedActive\": true, + * \"isAggregate\": false }, { \"name\": \"Col2\", + * \"type\": \"VARCHAR\", \"canImport\": true, + * \"selected\": true, \"description\": \"\", + * \"isLinkedActive\": true, \"isAggregate\": false }, { \"name\": + * \"Col3\", \"type\": \"VARCHAR\", \"canImport\": true, + * \"selected\": true, \"description\": \"\", + * \"isLinkedActive\": true, \"isAggregate\": false }, { \"name\": + * \"Col312\", \"type\": \"VARCHAR\", \"canImport\": + * true, \"selected\": true, \"description\": \"\", + * \"isLinkedActive\": true, \"isAggregate\": false }, { \"name\": + * \"Col4\", \"type\": \"VARCHAR\", \"canImport\": true, + * \"selected\": true, \"description\": \"\", + * \"isLinkedActive\": true, \"isAggregate\": false } ], + * \"relationships\": [] } ] } ] } ], \"configuration\": { + * \"password\": \"\", \"database\": \"DEVELOPMENT\", + * \"role\": \"DEV\", \"accountName\": + * \"thoughtspot_partner\", \"warehouse\": \"DEMO_WH\", + * \"user\": \"DEV_USER\" } } ``` * This is an example of + * updating a single table in an existing connection with tables: ``` { + * \"authenticationType\": \"SERVICE_ACCOUNT\", + * \"externalDatabases\": [ { \"name\": \"DEVELOPMENT\", + * \"isAutoCreated\": false, \"schemas\": [ { \"name\": + * \"TS_dataset\", \"tables\": [ { \"name\": + * \"CUSTOMER\", \"type\": \"TABLE\", \"description\": + * \"\", \"selected\": true, \"linked\": true, \"gid\": + * 0, \"datasetId\": \"-1\", \"subType\": \"\", + * \"reportId\": \"\", \"viewId\": \"\", + * \"columns\": [], \"relationships\": [] }, { \"name\": + * \"tpch5k_falcon_default_schema_users\", \"type\": \"TABLE\", + * \"description\": \"\", \"selected\": true, + * \"linked\": true, \"gid\": 0, \"datasetId\": \"-1\", + * \"subType\": \"\", \"reportId\": \"\", + * \"viewId\": \"\", \"columns\": [ { \"name\": + * \"user_id\", \"type\": \"INT64\", \"canImport\": + * true, \"selected\": true, \"description\": \"\", + * \"isLinkedActive\": true, \"isAggregate\": false }, { \"name\": + * \"product_id\", \"type\": \"INT64\", \"canImport\": + * true, \"selected\": true, \"description\": \"\", + * \"isLinkedActive\": true, \"isAggregate\": false }, { \"name\": + * \"user_cost\", \"type\": \"INT64\", \"canImport\": + * true, \"selected\": true, \"description\": \"\", + * \"isLinkedActive\": true, \"isAggregate\": false } ], + * \"relationships\": [] } ] } ] } ], \"configuration\": { + * \"password\": \"\", \"database\": \"DEVELOPMENT\", + * \"role\": \"DEV\", \"accountName\": + * \"thoughtspot_partner\", \"warehouse\": \"DEMO_WH\", + * \"user\": \"DEV_USER\" } } ``` 3. If you are updating a + * configuration attribute, connection name, or description, you can set `validate` to + * `false`. **NOTE:** If the `authentication_type` is anything other than + * SERVICE_ACCOUNT, you must explicitly provide the authenticationType property in the payload. + * If you do not specify authenticationType, the API will default to SERVICE_ACCOUNT as the + * authentication type. * A JSON map of configuration attributes in + * `data_warehouse_config`. The following example shows the configuration attributes + * for a Snowflake connection: ``` { \"configuration\":{ + * \"accountName\":\"thoughtspot_partner\", + * \"user\":\"tsadmin\", \"password\":\"TestConn123\", + * \"role\":\"sysadmin\", \"warehouse\":\"MEDIUM_WH\" }, + * \"externalDatabases\":[ ] } ``` + * + * @param connectionIdentifier Unique ID or name of the connection. (required) + * @param updateConnectionV2Request (required) + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the + * response body + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
204 Connection successfully updated. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public void updateConnectionV2( + String connectionIdentifier, UpdateConnectionV2Request updateConnectionV2Request) + throws ApiException { + updateConnectionV2WithHttpInfo(connectionIdentifier, updateConnectionV2Request); + } + + /** + * Version: 10.4.0.cl or later Updates a connection object. Requires `DATAMANAGEMENT` + * (**Can manage data**) and edit permissions to the connection object, or + * `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access + * Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, + * the `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) privilege is + * required. To update a connection object, pass these parameters in your API request: 1. GUID + * of the connection object. 2. If you are updating tables or database schema of a connection + * object: a. Add the updated JSON map of metadata with database, schema, and tables in + * `data_warehouse_config`. b. Set `validate` to `true`. **NOTE:** + * If the `authentication_type` is anything other than SERVICE_ACCOUNT, you must + * explicitly provide the authenticationType property in the payload. If you do not specify + * authenticationType, the API will default to SERVICE_ACCOUNT as the authentication type. * A + * JSON map of configuration attributes, database details, and table properties in + * `data_warehouse_config` as shown in the following example: * This is an example of + * updating a single table in a empty connection: ``` { + * \"authenticationType\": \"SERVICE_ACCOUNT\", + * \"externalDatabases\": [ { \"name\": \"DEVELOPMENT\", + * \"isAutoCreated\": false, \"schemas\": [ { \"name\": + * \"TS_dataset\", \"tables\": [ { \"name\": + * \"DEMORENAME\", \"type\": \"TABLE\", \"description\": + * \"\", \"selected\": true, \"linked\": true, \"gid\": + * 0, \"datasetId\": \"-1\", \"subType\": \"\", + * \"reportId\": \"\", \"viewId\": \"\", + * \"columns\": [ { \"name\": \"Col1\", \"type\": + * \"VARCHAR\", \"canImport\": true, \"selected\": true, + * \"description\": \"\", \"isLinkedActive\": true, + * \"isAggregate\": false }, { \"name\": \"Col2\", + * \"type\": \"VARCHAR\", \"canImport\": true, + * \"selected\": true, \"description\": \"\", + * \"isLinkedActive\": true, \"isAggregate\": false }, { \"name\": + * \"Col3\", \"type\": \"VARCHAR\", \"canImport\": true, + * \"selected\": true, \"description\": \"\", + * \"isLinkedActive\": true, \"isAggregate\": false }, { \"name\": + * \"Col312\", \"type\": \"VARCHAR\", \"canImport\": + * true, \"selected\": true, \"description\": \"\", + * \"isLinkedActive\": true, \"isAggregate\": false }, { \"name\": + * \"Col4\", \"type\": \"VARCHAR\", \"canImport\": true, + * \"selected\": true, \"description\": \"\", + * \"isLinkedActive\": true, \"isAggregate\": false } ], + * \"relationships\": [] } ] } ] } ], \"configuration\": { + * \"password\": \"\", \"database\": \"DEVELOPMENT\", + * \"role\": \"DEV\", \"accountName\": + * \"thoughtspot_partner\", \"warehouse\": \"DEMO_WH\", + * \"user\": \"DEV_USER\" } } ``` * This is an example of + * updating a single table in an existing connection with tables: ``` { + * \"authenticationType\": \"SERVICE_ACCOUNT\", + * \"externalDatabases\": [ { \"name\": \"DEVELOPMENT\", + * \"isAutoCreated\": false, \"schemas\": [ { \"name\": + * \"TS_dataset\", \"tables\": [ { \"name\": + * \"CUSTOMER\", \"type\": \"TABLE\", \"description\": + * \"\", \"selected\": true, \"linked\": true, \"gid\": + * 0, \"datasetId\": \"-1\", \"subType\": \"\", + * \"reportId\": \"\", \"viewId\": \"\", + * \"columns\": [], \"relationships\": [] }, { \"name\": + * \"tpch5k_falcon_default_schema_users\", \"type\": \"TABLE\", + * \"description\": \"\", \"selected\": true, + * \"linked\": true, \"gid\": 0, \"datasetId\": \"-1\", + * \"subType\": \"\", \"reportId\": \"\", + * \"viewId\": \"\", \"columns\": [ { \"name\": + * \"user_id\", \"type\": \"INT64\", \"canImport\": + * true, \"selected\": true, \"description\": \"\", + * \"isLinkedActive\": true, \"isAggregate\": false }, { \"name\": + * \"product_id\", \"type\": \"INT64\", \"canImport\": + * true, \"selected\": true, \"description\": \"\", + * \"isLinkedActive\": true, \"isAggregate\": false }, { \"name\": + * \"user_cost\", \"type\": \"INT64\", \"canImport\": + * true, \"selected\": true, \"description\": \"\", + * \"isLinkedActive\": true, \"isAggregate\": false } ], + * \"relationships\": [] } ] } ] } ], \"configuration\": { + * \"password\": \"\", \"database\": \"DEVELOPMENT\", + * \"role\": \"DEV\", \"accountName\": + * \"thoughtspot_partner\", \"warehouse\": \"DEMO_WH\", + * \"user\": \"DEV_USER\" } } ``` 3. If you are updating a + * configuration attribute, connection name, or description, you can set `validate` to + * `false`. **NOTE:** If the `authentication_type` is anything other than + * SERVICE_ACCOUNT, you must explicitly provide the authenticationType property in the payload. + * If you do not specify authenticationType, the API will default to SERVICE_ACCOUNT as the + * authentication type. * A JSON map of configuration attributes in + * `data_warehouse_config`. The following example shows the configuration attributes + * for a Snowflake connection: ``` { \"configuration\":{ + * \"accountName\":\"thoughtspot_partner\", + * \"user\":\"tsadmin\", \"password\":\"TestConn123\", + * \"role\":\"sysadmin\", \"warehouse\":\"MEDIUM_WH\" }, + * \"externalDatabases\":[ ] } ``` + * + * @param connectionIdentifier Unique ID or name of the connection. (required) + * @param updateConnectionV2Request (required) + * @return ApiResponse<Void> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the + * response body + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
204 Connection successfully updated. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public ApiResponse updateConnectionV2WithHttpInfo( + String connectionIdentifier, UpdateConnectionV2Request updateConnectionV2Request) + throws ApiException { + okhttp3.Call localVarCall = + updateConnectionV2ValidateBeforeCall( + connectionIdentifier, updateConnectionV2Request, null); + return localVarApiClient.execute(localVarCall); + } + + /** + * (asynchronously) Version: 10.4.0.cl or later Updates a connection object. Requires + * `DATAMANAGEMENT` (**Can manage data**) and edit permissions to the connection + * object, or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If + * [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled + * on your instance, the `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit + * Connections**) privilege is required. To update a connection object, pass these parameters in + * your API request: 1. GUID of the connection object. 2. If you are updating tables or database + * schema of a connection object: a. Add the updated JSON map of metadata with database, schema, + * and tables in `data_warehouse_config`. b. Set `validate` to + * `true`. **NOTE:** If the `authentication_type` is anything other than + * SERVICE_ACCOUNT, you must explicitly provide the authenticationType property in the payload. + * If you do not specify authenticationType, the API will default to SERVICE_ACCOUNT as the + * authentication type. * A JSON map of configuration attributes, database details, and table + * properties in `data_warehouse_config` as shown in the following example: * This is + * an example of updating a single table in a empty connection: ``` { + * \"authenticationType\": \"SERVICE_ACCOUNT\", + * \"externalDatabases\": [ { \"name\": \"DEVELOPMENT\", + * \"isAutoCreated\": false, \"schemas\": [ { \"name\": + * \"TS_dataset\", \"tables\": [ { \"name\": + * \"DEMORENAME\", \"type\": \"TABLE\", \"description\": + * \"\", \"selected\": true, \"linked\": true, \"gid\": + * 0, \"datasetId\": \"-1\", \"subType\": \"\", + * \"reportId\": \"\", \"viewId\": \"\", + * \"columns\": [ { \"name\": \"Col1\", \"type\": + * \"VARCHAR\", \"canImport\": true, \"selected\": true, + * \"description\": \"\", \"isLinkedActive\": true, + * \"isAggregate\": false }, { \"name\": \"Col2\", + * \"type\": \"VARCHAR\", \"canImport\": true, + * \"selected\": true, \"description\": \"\", + * \"isLinkedActive\": true, \"isAggregate\": false }, { \"name\": + * \"Col3\", \"type\": \"VARCHAR\", \"canImport\": true, + * \"selected\": true, \"description\": \"\", + * \"isLinkedActive\": true, \"isAggregate\": false }, { \"name\": + * \"Col312\", \"type\": \"VARCHAR\", \"canImport\": + * true, \"selected\": true, \"description\": \"\", + * \"isLinkedActive\": true, \"isAggregate\": false }, { \"name\": + * \"Col4\", \"type\": \"VARCHAR\", \"canImport\": true, + * \"selected\": true, \"description\": \"\", + * \"isLinkedActive\": true, \"isAggregate\": false } ], + * \"relationships\": [] } ] } ] } ], \"configuration\": { + * \"password\": \"\", \"database\": \"DEVELOPMENT\", + * \"role\": \"DEV\", \"accountName\": + * \"thoughtspot_partner\", \"warehouse\": \"DEMO_WH\", + * \"user\": \"DEV_USER\" } } ``` * This is an example of + * updating a single table in an existing connection with tables: ``` { + * \"authenticationType\": \"SERVICE_ACCOUNT\", + * \"externalDatabases\": [ { \"name\": \"DEVELOPMENT\", + * \"isAutoCreated\": false, \"schemas\": [ { \"name\": + * \"TS_dataset\", \"tables\": [ { \"name\": + * \"CUSTOMER\", \"type\": \"TABLE\", \"description\": + * \"\", \"selected\": true, \"linked\": true, \"gid\": + * 0, \"datasetId\": \"-1\", \"subType\": \"\", + * \"reportId\": \"\", \"viewId\": \"\", + * \"columns\": [], \"relationships\": [] }, { \"name\": + * \"tpch5k_falcon_default_schema_users\", \"type\": \"TABLE\", + * \"description\": \"\", \"selected\": true, + * \"linked\": true, \"gid\": 0, \"datasetId\": \"-1\", + * \"subType\": \"\", \"reportId\": \"\", + * \"viewId\": \"\", \"columns\": [ { \"name\": + * \"user_id\", \"type\": \"INT64\", \"canImport\": + * true, \"selected\": true, \"description\": \"\", + * \"isLinkedActive\": true, \"isAggregate\": false }, { \"name\": + * \"product_id\", \"type\": \"INT64\", \"canImport\": + * true, \"selected\": true, \"description\": \"\", + * \"isLinkedActive\": true, \"isAggregate\": false }, { \"name\": + * \"user_cost\", \"type\": \"INT64\", \"canImport\": + * true, \"selected\": true, \"description\": \"\", + * \"isLinkedActive\": true, \"isAggregate\": false } ], + * \"relationships\": [] } ] } ] } ], \"configuration\": { + * \"password\": \"\", \"database\": \"DEVELOPMENT\", + * \"role\": \"DEV\", \"accountName\": + * \"thoughtspot_partner\", \"warehouse\": \"DEMO_WH\", + * \"user\": \"DEV_USER\" } } ``` 3. If you are updating a + * configuration attribute, connection name, or description, you can set `validate` to + * `false`. **NOTE:** If the `authentication_type` is anything other than + * SERVICE_ACCOUNT, you must explicitly provide the authenticationType property in the payload. + * If you do not specify authenticationType, the API will default to SERVICE_ACCOUNT as the + * authentication type. * A JSON map of configuration attributes in + * `data_warehouse_config`. The following example shows the configuration attributes + * for a Snowflake connection: ``` { \"configuration\":{ + * \"accountName\":\"thoughtspot_partner\", + * \"user\":\"tsadmin\", \"password\":\"TestConn123\", + * \"role\":\"sysadmin\", \"warehouse\":\"MEDIUM_WH\" }, + * \"externalDatabases\":[ ] } ``` + * + * @param connectionIdentifier Unique ID or name of the connection. (required) + * @param updateConnectionV2Request (required) + * @param _callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body + * object + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
204 Connection successfully updated. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public okhttp3.Call updateConnectionV2Async( + String connectionIdentifier, + UpdateConnectionV2Request updateConnectionV2Request, + final ApiCallback _callback) + throws ApiException { + + okhttp3.Call localVarCall = + updateConnectionV2ValidateBeforeCall( + connectionIdentifier, updateConnectionV2Request, _callback); + localVarApiClient.executeAsync(localVarCall, _callback); + return localVarCall; + } +} diff --git a/sdks/java/src/main/java/com/thoughtspot/client/api/CustomActionApi.java b/sdks/java/src/main/java/com/thoughtspot/client/api/CustomActionApi.java new file mode 100644 index 000000000..ea8c279d6 --- /dev/null +++ b/sdks/java/src/main/java/com/thoughtspot/client/api/CustomActionApi.java @@ -0,0 +1,863 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client.api; + +import com.google.gson.reflect.TypeToken; +import com.thoughtspot.client.ApiCallback; +import com.thoughtspot.client.ApiClient; +import com.thoughtspot.client.ApiClientConfiguration; +import com.thoughtspot.client.ApiException; +import com.thoughtspot.client.ApiResponse; +import com.thoughtspot.client.Configuration; +import com.thoughtspot.client.Pair; +import com.thoughtspot.client.model.CreateCustomActionRequest; +import com.thoughtspot.client.model.ResponseCustomAction; +import com.thoughtspot.client.model.SearchCustomActionsRequest; +import com.thoughtspot.client.model.UpdateCustomActionRequest; +import java.lang.reflect.Type; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +@javax.annotation.Generated( + value = "org.openapitools.codegen.languages.JavaClientCodegen", + comments = "Generator version: 7.12.0") +public class CustomActionApi { + private ApiClient localVarApiClient; + private ApiClientConfiguration localVarApiClientConfiguration; + private int localHostIndex; + private String localCustomBaseUrl; + + public CustomActionApi() { + this(Configuration.getDefaultApiClient()); + } + + public CustomActionApi(ApiClient apiClient) { + this.localVarApiClient = apiClient; + } + + public CustomActionApi(ApiClientConfiguration apiClientConfiguration) { + this.localVarApiClientConfiguration = apiClientConfiguration; + this.localVarApiClient = new ApiClient(apiClientConfiguration); + } + + public ApiClient getApiClient() { + return localVarApiClient; + } + + public void setApiClient(ApiClient apiClient) { + this.localVarApiClient = apiClient; + } + + public ApiClientConfiguration getApiClientConfiguration() { + return localVarApiClientConfiguration; + } + + public void applyApiClientConfiguration(ApiClientConfiguration apiClientConfiguration) { + this.localVarApiClientConfiguration = apiClientConfiguration; + if (localVarApiClient != null) { + localVarApiClient.applyApiClientConfiguration(apiClientConfiguration); + } else { + localVarApiClient = new ApiClient(apiClientConfiguration); + } + } + + public int getHostIndex() { + return localHostIndex; + } + + public void setHostIndex(int hostIndex) { + this.localHostIndex = hostIndex; + } + + public String getCustomBaseUrl() { + return localCustomBaseUrl; + } + + public void setCustomBaseUrl(String customBaseUrl) { + this.localCustomBaseUrl = customBaseUrl; + } + + /** + * Build call for createCustomAction + * + * @param createCustomActionRequest (required) + * @param _callback Callback for upload/download progress + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 Custom action created successfully. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public okhttp3.Call createCustomActionCall( + CreateCustomActionRequest createCustomActionRequest, final ApiCallback _callback) + throws ApiException { + String basePath = null; + // Operation Servers + String[] localBasePaths = new String[] {}; + + // Determine Base Path to Use + if (localCustomBaseUrl != null) { + basePath = localCustomBaseUrl; + } else if (localBasePaths.length > 0) { + basePath = localBasePaths[localHostIndex]; + } else { + basePath = null; + } + + Object localVarPostBody = createCustomActionRequest; + + // create path and map variables + String localVarPath = "/api/rest/2.0/customization/custom-actions"; + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + final String[] localVarAccepts = {"application/json"}; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = {"application/json"}; + final String localVarContentType = + localVarApiClient.selectHeaderContentType(localVarContentTypes); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } + + String[] localVarAuthNames = new String[] {"bearerAuth"}; + return localVarApiClient.buildCall( + basePath, + localVarPath, + "POST", + localVarQueryParams, + localVarCollectionQueryParams, + localVarPostBody, + localVarHeaderParams, + localVarCookieParams, + localVarFormParams, + localVarAuthNames, + _callback); + } + + @SuppressWarnings("rawtypes") + private okhttp3.Call createCustomActionValidateBeforeCall( + CreateCustomActionRequest createCustomActionRequest, final ApiCallback _callback) + throws ApiException { + // verify the required parameter 'createCustomActionRequest' is set + if (createCustomActionRequest == null) { + throw new ApiException( + "Missing the required parameter 'createCustomActionRequest' when calling" + + " createCustomAction(Async)"); + } + + return createCustomActionCall(createCustomActionRequest, _callback); + } + + /** + * Version: 9.6.0.cl or later Creates a custom action that appears as a menu action on a saved + * Answer or Liveboard visualization. Requires `DEVELOPER` (**Has Developer + * privilege**) or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If + * [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled + * on your instance, the `DEVELOPER` (**Has developer privilege**) privilege is + * required. #### Usage Guidelines The API lets you create the following types of custom + * actions: * URL-based action Allows pushing data to an external URL. * Callback action + * Triggers a callback to the host application and initiates a response payload on an embedded + * ThoughtSpot instance. By default, custom actions are visible to only administrator or + * developer users. To make a custom action available to other users, and specify the groups in + * `group_identifiers`. By default, the custom action is set as a _global_ action on + * all visualizations and saved Answers. To assign a custom action to specific Liveboard + * visualization, saved Answer, or Worksheet, set `visibility` to `false` in + * `default_action_config` property and specify the GUID or name of the object in + * `associate_metadata`. For more information, see [Custom + * actions](https://developers.thoughtspot.com/docs/custom-action-intro). + * + * @param createCustomActionRequest (required) + * @return ResponseCustomAction + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the + * response body + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 Custom action created successfully. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public ResponseCustomAction createCustomAction( + CreateCustomActionRequest createCustomActionRequest) throws ApiException { + ApiResponse localVarResp = + createCustomActionWithHttpInfo(createCustomActionRequest); + return localVarResp.getData(); + } + + /** + * Version: 9.6.0.cl or later Creates a custom action that appears as a menu action on a saved + * Answer or Liveboard visualization. Requires `DEVELOPER` (**Has Developer + * privilege**) or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If + * [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled + * on your instance, the `DEVELOPER` (**Has developer privilege**) privilege is + * required. #### Usage Guidelines The API lets you create the following types of custom + * actions: * URL-based action Allows pushing data to an external URL. * Callback action + * Triggers a callback to the host application and initiates a response payload on an embedded + * ThoughtSpot instance. By default, custom actions are visible to only administrator or + * developer users. To make a custom action available to other users, and specify the groups in + * `group_identifiers`. By default, the custom action is set as a _global_ action on + * all visualizations and saved Answers. To assign a custom action to specific Liveboard + * visualization, saved Answer, or Worksheet, set `visibility` to `false` in + * `default_action_config` property and specify the GUID or name of the object in + * `associate_metadata`. For more information, see [Custom + * actions](https://developers.thoughtspot.com/docs/custom-action-intro). + * + * @param createCustomActionRequest (required) + * @return ApiResponse<ResponseCustomAction> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the + * response body + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 Custom action created successfully. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public ApiResponse createCustomActionWithHttpInfo( + CreateCustomActionRequest createCustomActionRequest) throws ApiException { + okhttp3.Call localVarCall = + createCustomActionValidateBeforeCall(createCustomActionRequest, null); + Type localVarReturnType = new TypeToken() {}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); + } + + /** + * (asynchronously) Version: 9.6.0.cl or later Creates a custom action that appears as a menu + * action on a saved Answer or Liveboard visualization. Requires `DEVELOPER` (**Has + * Developer privilege**) or `ADMINISTRATION` (**Can administer ThoughtSpot**) + * privilege. If [Role-Based Access Control + * (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the + * `DEVELOPER` (**Has developer privilege**) privilege is required. #### Usage + * Guidelines The API lets you create the following types of custom actions: * URL-based action + * Allows pushing data to an external URL. * Callback action Triggers a callback to the host + * application and initiates a response payload on an embedded ThoughtSpot instance. By default, + * custom actions are visible to only administrator or developer users. To make a custom action + * available to other users, and specify the groups in `group_identifiers`. By + * default, the custom action is set as a _global_ action on all visualizations and saved + * Answers. To assign a custom action to specific Liveboard visualization, saved Answer, or + * Worksheet, set `visibility` to `false` in + * `default_action_config` property and specify the GUID or name of the object in + * `associate_metadata`. For more information, see [Custom + * actions](https://developers.thoughtspot.com/docs/custom-action-intro). + * + * @param createCustomActionRequest (required) + * @param _callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body + * object + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 Custom action created successfully. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public okhttp3.Call createCustomActionAsync( + CreateCustomActionRequest createCustomActionRequest, + final ApiCallback _callback) + throws ApiException { + + okhttp3.Call localVarCall = + createCustomActionValidateBeforeCall(createCustomActionRequest, _callback); + Type localVarReturnType = new TypeToken() {}.getType(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; + } + /** + * Build call for deleteCustomAction + * + * @param customActionIdentifier Unique ID or name of the custom action. (required) + * @param _callback Callback for upload/download progress + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
204 Custom action is successfully deleted. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public okhttp3.Call deleteCustomActionCall( + String customActionIdentifier, final ApiCallback _callback) throws ApiException { + String basePath = null; + // Operation Servers + String[] localBasePaths = new String[] {}; + + // Determine Base Path to Use + if (localCustomBaseUrl != null) { + basePath = localCustomBaseUrl; + } else if (localBasePaths.length > 0) { + basePath = localBasePaths[localHostIndex]; + } else { + basePath = null; + } + + Object localVarPostBody = null; + + // create path and map variables + String localVarPath = + "/api/rest/2.0/customization/custom-actions/{custom_action_identifier}/delete" + .replace( + "{" + "custom_action_identifier" + "}", + localVarApiClient.escapeString(customActionIdentifier.toString())); + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + final String[] localVarAccepts = {"application/json"}; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = {}; + final String localVarContentType = + localVarApiClient.selectHeaderContentType(localVarContentTypes); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } + + String[] localVarAuthNames = new String[] {"bearerAuth"}; + return localVarApiClient.buildCall( + basePath, + localVarPath, + "POST", + localVarQueryParams, + localVarCollectionQueryParams, + localVarPostBody, + localVarHeaderParams, + localVarCookieParams, + localVarFormParams, + localVarAuthNames, + _callback); + } + + @SuppressWarnings("rawtypes") + private okhttp3.Call deleteCustomActionValidateBeforeCall( + String customActionIdentifier, final ApiCallback _callback) throws ApiException { + // verify the required parameter 'customActionIdentifier' is set + if (customActionIdentifier == null) { + throw new ApiException( + "Missing the required parameter 'customActionIdentifier' when calling" + + " deleteCustomAction(Async)"); + } + + return deleteCustomActionCall(customActionIdentifier, _callback); + } + + /** + * Version: 9.6.0.cl or later Removes the custom action specified in the API request. Requires + * `DEVELOPER` (**Has Developer privilege**) or `ADMINISTRATION` (**Can + * administer ThoughtSpot**) privilege. If [Role-Based Access Control + * (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the + * `DEVELOPER` (**Has developer privilege**) privilege is required. + * + * @param customActionIdentifier Unique ID or name of the custom action. (required) + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the + * response body + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
204 Custom action is successfully deleted. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public void deleteCustomAction(String customActionIdentifier) throws ApiException { + deleteCustomActionWithHttpInfo(customActionIdentifier); + } + + /** + * Version: 9.6.0.cl or later Removes the custom action specified in the API request. Requires + * `DEVELOPER` (**Has Developer privilege**) or `ADMINISTRATION` (**Can + * administer ThoughtSpot**) privilege. If [Role-Based Access Control + * (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the + * `DEVELOPER` (**Has developer privilege**) privilege is required. + * + * @param customActionIdentifier Unique ID or name of the custom action. (required) + * @return ApiResponse<Void> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the + * response body + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
204 Custom action is successfully deleted. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public ApiResponse deleteCustomActionWithHttpInfo(String customActionIdentifier) + throws ApiException { + okhttp3.Call localVarCall = + deleteCustomActionValidateBeforeCall(customActionIdentifier, null); + return localVarApiClient.execute(localVarCall); + } + + /** + * (asynchronously) Version: 9.6.0.cl or later Removes the custom action specified in the API + * request. Requires `DEVELOPER` (**Has Developer privilege**) or + * `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access + * Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, + * the `DEVELOPER` (**Has developer privilege**) privilege is required. + * + * @param customActionIdentifier Unique ID or name of the custom action. (required) + * @param _callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body + * object + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
204 Custom action is successfully deleted. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public okhttp3.Call deleteCustomActionAsync( + String customActionIdentifier, final ApiCallback _callback) throws ApiException { + + okhttp3.Call localVarCall = + deleteCustomActionValidateBeforeCall(customActionIdentifier, _callback); + localVarApiClient.executeAsync(localVarCall, _callback); + return localVarCall; + } + /** + * Build call for searchCustomActions + * + * @param searchCustomActionsRequest (required) + * @param _callback Callback for upload/download progress + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 Custom action search is successful. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public okhttp3.Call searchCustomActionsCall( + SearchCustomActionsRequest searchCustomActionsRequest, final ApiCallback _callback) + throws ApiException { + String basePath = null; + // Operation Servers + String[] localBasePaths = new String[] {}; + + // Determine Base Path to Use + if (localCustomBaseUrl != null) { + basePath = localCustomBaseUrl; + } else if (localBasePaths.length > 0) { + basePath = localBasePaths[localHostIndex]; + } else { + basePath = null; + } + + Object localVarPostBody = searchCustomActionsRequest; + + // create path and map variables + String localVarPath = "/api/rest/2.0/customization/custom-actions/search"; + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + final String[] localVarAccepts = {"application/json"}; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = {"application/json"}; + final String localVarContentType = + localVarApiClient.selectHeaderContentType(localVarContentTypes); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } + + String[] localVarAuthNames = new String[] {"bearerAuth"}; + return localVarApiClient.buildCall( + basePath, + localVarPath, + "POST", + localVarQueryParams, + localVarCollectionQueryParams, + localVarPostBody, + localVarHeaderParams, + localVarCookieParams, + localVarFormParams, + localVarAuthNames, + _callback); + } + + @SuppressWarnings("rawtypes") + private okhttp3.Call searchCustomActionsValidateBeforeCall( + SearchCustomActionsRequest searchCustomActionsRequest, final ApiCallback _callback) + throws ApiException { + // verify the required parameter 'searchCustomActionsRequest' is set + if (searchCustomActionsRequest == null) { + throw new ApiException( + "Missing the required parameter 'searchCustomActionsRequest' when calling" + + " searchCustomActions(Async)"); + } + + return searchCustomActionsCall(searchCustomActionsRequest, _callback); + } + + /** + * Version: 9.6.0.cl or later Gets custom actions configured on the cluster. Requires + * `DEVELOPER` (**Has Developer privilege**) or `ADMINISTRATION` (**Can + * administer ThoughtSpot**) privilege. If [Role-Based Access Control + * (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the + * `DEVELOPER` (**Has developer privilege**) privilege is required. + * + * @param searchCustomActionsRequest (required) + * @return List<ResponseCustomAction> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the + * response body + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 Custom action search is successful. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public List searchCustomActions( + SearchCustomActionsRequest searchCustomActionsRequest) throws ApiException { + ApiResponse> localVarResp = + searchCustomActionsWithHttpInfo(searchCustomActionsRequest); + return localVarResp.getData(); + } + + /** + * Version: 9.6.0.cl or later Gets custom actions configured on the cluster. Requires + * `DEVELOPER` (**Has Developer privilege**) or `ADMINISTRATION` (**Can + * administer ThoughtSpot**) privilege. If [Role-Based Access Control + * (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the + * `DEVELOPER` (**Has developer privilege**) privilege is required. + * + * @param searchCustomActionsRequest (required) + * @return ApiResponse<List<ResponseCustomAction>> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the + * response body + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 Custom action search is successful. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public ApiResponse> searchCustomActionsWithHttpInfo( + SearchCustomActionsRequest searchCustomActionsRequest) throws ApiException { + okhttp3.Call localVarCall = + searchCustomActionsValidateBeforeCall(searchCustomActionsRequest, null); + Type localVarReturnType = new TypeToken>() {}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); + } + + /** + * (asynchronously) Version: 9.6.0.cl or later Gets custom actions configured on the cluster. + * Requires `DEVELOPER` (**Has Developer privilege**) or `ADMINISTRATION` + * (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control + * (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the + * `DEVELOPER` (**Has developer privilege**) privilege is required. + * + * @param searchCustomActionsRequest (required) + * @param _callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body + * object + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 Custom action search is successful. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public okhttp3.Call searchCustomActionsAsync( + SearchCustomActionsRequest searchCustomActionsRequest, + final ApiCallback> _callback) + throws ApiException { + + okhttp3.Call localVarCall = + searchCustomActionsValidateBeforeCall(searchCustomActionsRequest, _callback); + Type localVarReturnType = new TypeToken>() {}.getType(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; + } + /** + * Build call for updateCustomAction + * + * @param customActionIdentifier Unique ID or name of the custom action. (required) + * @param updateCustomActionRequest (required) + * @param _callback Callback for upload/download progress + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
204 Custom action updated successfully. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public okhttp3.Call updateCustomActionCall( + String customActionIdentifier, + UpdateCustomActionRequest updateCustomActionRequest, + final ApiCallback _callback) + throws ApiException { + String basePath = null; + // Operation Servers + String[] localBasePaths = new String[] {}; + + // Determine Base Path to Use + if (localCustomBaseUrl != null) { + basePath = localCustomBaseUrl; + } else if (localBasePaths.length > 0) { + basePath = localBasePaths[localHostIndex]; + } else { + basePath = null; + } + + Object localVarPostBody = updateCustomActionRequest; + + // create path and map variables + String localVarPath = + "/api/rest/2.0/customization/custom-actions/{custom_action_identifier}/update" + .replace( + "{" + "custom_action_identifier" + "}", + localVarApiClient.escapeString(customActionIdentifier.toString())); + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + final String[] localVarAccepts = {"application/json"}; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = {"application/json"}; + final String localVarContentType = + localVarApiClient.selectHeaderContentType(localVarContentTypes); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } + + String[] localVarAuthNames = new String[] {"bearerAuth"}; + return localVarApiClient.buildCall( + basePath, + localVarPath, + "POST", + localVarQueryParams, + localVarCollectionQueryParams, + localVarPostBody, + localVarHeaderParams, + localVarCookieParams, + localVarFormParams, + localVarAuthNames, + _callback); + } + + @SuppressWarnings("rawtypes") + private okhttp3.Call updateCustomActionValidateBeforeCall( + String customActionIdentifier, + UpdateCustomActionRequest updateCustomActionRequest, + final ApiCallback _callback) + throws ApiException { + // verify the required parameter 'customActionIdentifier' is set + if (customActionIdentifier == null) { + throw new ApiException( + "Missing the required parameter 'customActionIdentifier' when calling" + + " updateCustomAction(Async)"); + } + + // verify the required parameter 'updateCustomActionRequest' is set + if (updateCustomActionRequest == null) { + throw new ApiException( + "Missing the required parameter 'updateCustomActionRequest' when calling" + + " updateCustomAction(Async)"); + } + + return updateCustomActionCall(customActionIdentifier, updateCustomActionRequest, _callback); + } + + /** + * Version: 9.6.0.cl or later Updates a custom action. Requires `DEVELOPER` (**Has + * Developer privilege**) or `ADMINISTRATION` (**Can administer ThoughtSpot**) + * privilege. If [Role-Based Access Control + * (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the + * `DEVELOPER` (**Has developer privilege**) privilege is required. #### Usage + * Guidelines The API allows you to modify the following properties: * Name of the custom action + * * Action availability to groups * Association to metadata objects * Authentication settings + * for a URL-based action For more information, see [Custom + * actions](https://developers.thoughtspot.com/docs/custom-action-intro). + * + * @param customActionIdentifier Unique ID or name of the custom action. (required) + * @param updateCustomActionRequest (required) + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the + * response body + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
204 Custom action updated successfully. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public void updateCustomAction( + String customActionIdentifier, UpdateCustomActionRequest updateCustomActionRequest) + throws ApiException { + updateCustomActionWithHttpInfo(customActionIdentifier, updateCustomActionRequest); + } + + /** + * Version: 9.6.0.cl or later Updates a custom action. Requires `DEVELOPER` (**Has + * Developer privilege**) or `ADMINISTRATION` (**Can administer ThoughtSpot**) + * privilege. If [Role-Based Access Control + * (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the + * `DEVELOPER` (**Has developer privilege**) privilege is required. #### Usage + * Guidelines The API allows you to modify the following properties: * Name of the custom action + * * Action availability to groups * Association to metadata objects * Authentication settings + * for a URL-based action For more information, see [Custom + * actions](https://developers.thoughtspot.com/docs/custom-action-intro). + * + * @param customActionIdentifier Unique ID or name of the custom action. (required) + * @param updateCustomActionRequest (required) + * @return ApiResponse<Void> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the + * response body + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
204 Custom action updated successfully. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public ApiResponse updateCustomActionWithHttpInfo( + String customActionIdentifier, UpdateCustomActionRequest updateCustomActionRequest) + throws ApiException { + okhttp3.Call localVarCall = + updateCustomActionValidateBeforeCall( + customActionIdentifier, updateCustomActionRequest, null); + return localVarApiClient.execute(localVarCall); + } + + /** + * (asynchronously) Version: 9.6.0.cl or later Updates a custom action. Requires + * `DEVELOPER` (**Has Developer privilege**) or `ADMINISTRATION` (**Can + * administer ThoughtSpot**) privilege. If [Role-Based Access Control + * (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the + * `DEVELOPER` (**Has developer privilege**) privilege is required. #### Usage + * Guidelines The API allows you to modify the following properties: * Name of the custom action + * * Action availability to groups * Association to metadata objects * Authentication settings + * for a URL-based action For more information, see [Custom + * actions](https://developers.thoughtspot.com/docs/custom-action-intro). + * + * @param customActionIdentifier Unique ID or name of the custom action. (required) + * @param updateCustomActionRequest (required) + * @param _callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body + * object + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
204 Custom action updated successfully. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public okhttp3.Call updateCustomActionAsync( + String customActionIdentifier, + UpdateCustomActionRequest updateCustomActionRequest, + final ApiCallback _callback) + throws ApiException { + + okhttp3.Call localVarCall = + updateCustomActionValidateBeforeCall( + customActionIdentifier, updateCustomActionRequest, _callback); + localVarApiClient.executeAsync(localVarCall, _callback); + return localVarCall; + } +} diff --git a/sdks/java/src/main/java/com/thoughtspot/client/api/CustomCalendarsApi.java b/sdks/java/src/main/java/com/thoughtspot/client/api/CustomCalendarsApi.java new file mode 100644 index 000000000..dda116379 --- /dev/null +++ b/sdks/java/src/main/java/com/thoughtspot/client/api/CustomCalendarsApi.java @@ -0,0 +1,1264 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client.api; + +import com.google.gson.reflect.TypeToken; +import com.thoughtspot.client.ApiCallback; +import com.thoughtspot.client.ApiClient; +import com.thoughtspot.client.ApiClientConfiguration; +import com.thoughtspot.client.ApiException; +import com.thoughtspot.client.ApiResponse; +import com.thoughtspot.client.Configuration; +import com.thoughtspot.client.Pair; +import com.thoughtspot.client.model.CalendarResponse; +import com.thoughtspot.client.model.CreateCalendarRequest; +import com.thoughtspot.client.model.GenerateCSVRequest; +import com.thoughtspot.client.model.SearchCalendarsRequest; +import com.thoughtspot.client.model.UpdateCalendarRequest; +import java.lang.reflect.Type; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +@javax.annotation.Generated( + value = "org.openapitools.codegen.languages.JavaClientCodegen", + comments = "Generator version: 7.12.0") +public class CustomCalendarsApi { + private ApiClient localVarApiClient; + private ApiClientConfiguration localVarApiClientConfiguration; + private int localHostIndex; + private String localCustomBaseUrl; + + public CustomCalendarsApi() { + this(Configuration.getDefaultApiClient()); + } + + public CustomCalendarsApi(ApiClient apiClient) { + this.localVarApiClient = apiClient; + } + + public CustomCalendarsApi(ApiClientConfiguration apiClientConfiguration) { + this.localVarApiClientConfiguration = apiClientConfiguration; + this.localVarApiClient = new ApiClient(apiClientConfiguration); + } + + public ApiClient getApiClient() { + return localVarApiClient; + } + + public void setApiClient(ApiClient apiClient) { + this.localVarApiClient = apiClient; + } + + public ApiClientConfiguration getApiClientConfiguration() { + return localVarApiClientConfiguration; + } + + public void applyApiClientConfiguration(ApiClientConfiguration apiClientConfiguration) { + this.localVarApiClientConfiguration = apiClientConfiguration; + if (localVarApiClient != null) { + localVarApiClient.applyApiClientConfiguration(apiClientConfiguration); + } else { + localVarApiClient = new ApiClient(apiClientConfiguration); + } + } + + public int getHostIndex() { + return localHostIndex; + } + + public void setHostIndex(int hostIndex) { + this.localHostIndex = hostIndex; + } + + public String getCustomBaseUrl() { + return localCustomBaseUrl; + } + + public void setCustomBaseUrl(String customBaseUrl) { + this.localCustomBaseUrl = customBaseUrl; + } + + /** + * Build call for createCalendar + * + * @param createCalendarRequest (required) + * @param _callback Callback for upload/download progress + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 Custom calendar created successfully. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public okhttp3.Call createCalendarCall( + CreateCalendarRequest createCalendarRequest, final ApiCallback _callback) + throws ApiException { + String basePath = null; + // Operation Servers + String[] localBasePaths = new String[] {}; + + // Determine Base Path to Use + if (localCustomBaseUrl != null) { + basePath = localCustomBaseUrl; + } else if (localBasePaths.length > 0) { + basePath = localBasePaths[localHostIndex]; + } else { + basePath = null; + } + + Object localVarPostBody = createCalendarRequest; + + // create path and map variables + String localVarPath = "/api/rest/2.0/calendars/create"; + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + final String[] localVarAccepts = {"application/json"}; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = {"application/json"}; + final String localVarContentType = + localVarApiClient.selectHeaderContentType(localVarContentTypes); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } + + String[] localVarAuthNames = new String[] {"bearerAuth"}; + return localVarApiClient.buildCall( + basePath, + localVarPath, + "POST", + localVarQueryParams, + localVarCollectionQueryParams, + localVarPostBody, + localVarHeaderParams, + localVarCookieParams, + localVarFormParams, + localVarAuthNames, + _callback); + } + + @SuppressWarnings("rawtypes") + private okhttp3.Call createCalendarValidateBeforeCall( + CreateCalendarRequest createCalendarRequest, final ApiCallback _callback) + throws ApiException { + // verify the required parameter 'createCalendarRequest' is set + if (createCalendarRequest == null) { + throw new ApiException( + "Missing the required parameter 'createCalendarRequest' when calling" + + " createCalendar(Async)"); + } + + return createCalendarCall(createCalendarRequest, _callback); + } + + /** + * Version: 10.12.0.cl or later Creates a new [custom + * calendar](https://docs.thoughtspot.com/cloud/latest/connections-cust-cal). Requires + * `DATAMANAGEMENT` (**Can manage data**) or `ADMINISTRATION` (**Can + * administer ThoughtSpot**) privilege. If [Role-Based Access Control + * (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your ThoughtSpot + * instance, the `CAN_MANAGE_CUSTOM_CALENDAR` (**Can manage custom calendars**) + * privilege is required. #### Usage guidelines You can create a custom calendar from scratch or + * an existing Table in ThoughtSpot. For both methods of calendar creation, the following + * parameters are required: * Name of the custom calendar. * Calendar creation method. To create + * a calendar from an existing table, specify the method: - `FROM_EXISTING_TABLE` - + * Creates calendar from the table reference provided in the API request. - + * `FROM_INPUT_PARAMS` - Creates a calendar from the parameters defined in the API + * request. * Connection ID and Table name * Database and schema name attributes: For most Cloud + * Data Warehouse (CDW) connectors, both `database_name` and `schema_name` + * attributes are required. However, the attribute requirements are conditional and vary based + * on the connector type and its metadata structure. For example, for connectors such as + * Teradata, MySQL, SingleSore, Amazon Aurora MySQL, Amazon RDS MySQL, Oracle, and GCP_MYSQL, + * the `schema_name` is required, whereas the `database_name` attribute is + * not. Similarly, connectors such as ClickHouse require you to specify the + * `database_name` and the schema specification in such cases is optional. **NOTE**: + * If you are creating a calendar from an existing table, ensure that the referenced table + * matches the required DDL for custom calendars. If the schema does not match, the API returns + * an error. ##### Calendar type The API allows you to create the following types of calendars: + * * `MONTH_OFFSET`. The default calendar type. A `MONTH_OFFSET` calendar is + * offset by a few months from the standard calendar months (January to December) and the year + * begins with the month defined in the request. For example, if the `month_offset` + * value is set as `April`, the calendar year begins in April. * `4-4-5`. + * Each quarter in the calendar will include two 4-week months followed by one 5-week month. * + * `4-5-4`. Each quarter in the calendar will include two 4-week months with a 5-week + * month between. * `5-4-4`. Each quarter begins with a 5-week month, followed by two + * 4-week months. To start and end the calendar on a specific date, specify the dates in the + * `MM/DD/YYYY` format. For `MONTH_OFFSET` calendars, ensure that the + * `start_date` matches the month specified in the `month_offset` attribute. + * You can also set the starting day of the week and customize the prefixes for year and quarter + * labels. #### Examples To create a calendar from an existing table: ``` { + * \"name\": \"MyCustomCalendar1\", \"table_reference\": { + * \"connection_identifier\": \"4db8ea22-2ff4-4224-b05a-26674717e468\", + * \"table_name\": \"MyCalendarTable\", \"database_name\": + * \"RETAILAPPAREL\", \"schema_name\": \"PUBLIC\" }, + * \"creation_method\": \"FROM_EXISTING_TABLE\", } ``` To + * create a calendar from scratch: ``` { \"name\": + * \"MyCustomCalendar1\", \"table_reference\": { + * \"connection_identifier\": \"4db8ea22-2ff4-4224-b05a-26674717e468\", + * \"table_name\": \"MyCalendarTable\", \"database_name\": + * \"RETAILAPPAREL\", \"schema_name\": \"PUBLIC\" }, + * \"creation_method\": \"FROM_INPUT_PARAMS\", \"calendar_type\": + * \"MONTH_OFFSET\", \"month_offset\": \"April\", + * \"start_day_of_week\": \"Monday\", \"quarter_name_prefix\": + * \"Q\", \"year_name_prefix\": \"FY\", \"start_date\": + * \"04/01/2025\", \"end_date\": \"04/31/2025\" } + * ``` + * + * @param createCalendarRequest (required) + * @return CalendarResponse + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the + * response body + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 Custom calendar created successfully. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public CalendarResponse createCalendar(CreateCalendarRequest createCalendarRequest) + throws ApiException { + ApiResponse localVarResp = + createCalendarWithHttpInfo(createCalendarRequest); + return localVarResp.getData(); + } + + /** + * Version: 10.12.0.cl or later Creates a new [custom + * calendar](https://docs.thoughtspot.com/cloud/latest/connections-cust-cal). Requires + * `DATAMANAGEMENT` (**Can manage data**) or `ADMINISTRATION` (**Can + * administer ThoughtSpot**) privilege. If [Role-Based Access Control + * (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your ThoughtSpot + * instance, the `CAN_MANAGE_CUSTOM_CALENDAR` (**Can manage custom calendars**) + * privilege is required. #### Usage guidelines You can create a custom calendar from scratch or + * an existing Table in ThoughtSpot. For both methods of calendar creation, the following + * parameters are required: * Name of the custom calendar. * Calendar creation method. To create + * a calendar from an existing table, specify the method: - `FROM_EXISTING_TABLE` - + * Creates calendar from the table reference provided in the API request. - + * `FROM_INPUT_PARAMS` - Creates a calendar from the parameters defined in the API + * request. * Connection ID and Table name * Database and schema name attributes: For most Cloud + * Data Warehouse (CDW) connectors, both `database_name` and `schema_name` + * attributes are required. However, the attribute requirements are conditional and vary based + * on the connector type and its metadata structure. For example, for connectors such as + * Teradata, MySQL, SingleSore, Amazon Aurora MySQL, Amazon RDS MySQL, Oracle, and GCP_MYSQL, + * the `schema_name` is required, whereas the `database_name` attribute is + * not. Similarly, connectors such as ClickHouse require you to specify the + * `database_name` and the schema specification in such cases is optional. **NOTE**: + * If you are creating a calendar from an existing table, ensure that the referenced table + * matches the required DDL for custom calendars. If the schema does not match, the API returns + * an error. ##### Calendar type The API allows you to create the following types of calendars: + * * `MONTH_OFFSET`. The default calendar type. A `MONTH_OFFSET` calendar is + * offset by a few months from the standard calendar months (January to December) and the year + * begins with the month defined in the request. For example, if the `month_offset` + * value is set as `April`, the calendar year begins in April. * `4-4-5`. + * Each quarter in the calendar will include two 4-week months followed by one 5-week month. * + * `4-5-4`. Each quarter in the calendar will include two 4-week months with a 5-week + * month between. * `5-4-4`. Each quarter begins with a 5-week month, followed by two + * 4-week months. To start and end the calendar on a specific date, specify the dates in the + * `MM/DD/YYYY` format. For `MONTH_OFFSET` calendars, ensure that the + * `start_date` matches the month specified in the `month_offset` attribute. + * You can also set the starting day of the week and customize the prefixes for year and quarter + * labels. #### Examples To create a calendar from an existing table: ``` { + * \"name\": \"MyCustomCalendar1\", \"table_reference\": { + * \"connection_identifier\": \"4db8ea22-2ff4-4224-b05a-26674717e468\", + * \"table_name\": \"MyCalendarTable\", \"database_name\": + * \"RETAILAPPAREL\", \"schema_name\": \"PUBLIC\" }, + * \"creation_method\": \"FROM_EXISTING_TABLE\", } ``` To + * create a calendar from scratch: ``` { \"name\": + * \"MyCustomCalendar1\", \"table_reference\": { + * \"connection_identifier\": \"4db8ea22-2ff4-4224-b05a-26674717e468\", + * \"table_name\": \"MyCalendarTable\", \"database_name\": + * \"RETAILAPPAREL\", \"schema_name\": \"PUBLIC\" }, + * \"creation_method\": \"FROM_INPUT_PARAMS\", \"calendar_type\": + * \"MONTH_OFFSET\", \"month_offset\": \"April\", + * \"start_day_of_week\": \"Monday\", \"quarter_name_prefix\": + * \"Q\", \"year_name_prefix\": \"FY\", \"start_date\": + * \"04/01/2025\", \"end_date\": \"04/31/2025\" } + * ``` + * + * @param createCalendarRequest (required) + * @return ApiResponse<CalendarResponse> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the + * response body + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 Custom calendar created successfully. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public ApiResponse createCalendarWithHttpInfo( + CreateCalendarRequest createCalendarRequest) throws ApiException { + okhttp3.Call localVarCall = createCalendarValidateBeforeCall(createCalendarRequest, null); + Type localVarReturnType = new TypeToken() {}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); + } + + /** + * (asynchronously) Version: 10.12.0.cl or later Creates a new [custom + * calendar](https://docs.thoughtspot.com/cloud/latest/connections-cust-cal). Requires + * `DATAMANAGEMENT` (**Can manage data**) or `ADMINISTRATION` (**Can + * administer ThoughtSpot**) privilege. If [Role-Based Access Control + * (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your ThoughtSpot + * instance, the `CAN_MANAGE_CUSTOM_CALENDAR` (**Can manage custom calendars**) + * privilege is required. #### Usage guidelines You can create a custom calendar from scratch or + * an existing Table in ThoughtSpot. For both methods of calendar creation, the following + * parameters are required: * Name of the custom calendar. * Calendar creation method. To create + * a calendar from an existing table, specify the method: - `FROM_EXISTING_TABLE` - + * Creates calendar from the table reference provided in the API request. - + * `FROM_INPUT_PARAMS` - Creates a calendar from the parameters defined in the API + * request. * Connection ID and Table name * Database and schema name attributes: For most Cloud + * Data Warehouse (CDW) connectors, both `database_name` and `schema_name` + * attributes are required. However, the attribute requirements are conditional and vary based + * on the connector type and its metadata structure. For example, for connectors such as + * Teradata, MySQL, SingleSore, Amazon Aurora MySQL, Amazon RDS MySQL, Oracle, and GCP_MYSQL, + * the `schema_name` is required, whereas the `database_name` attribute is + * not. Similarly, connectors such as ClickHouse require you to specify the + * `database_name` and the schema specification in such cases is optional. **NOTE**: + * If you are creating a calendar from an existing table, ensure that the referenced table + * matches the required DDL for custom calendars. If the schema does not match, the API returns + * an error. ##### Calendar type The API allows you to create the following types of calendars: + * * `MONTH_OFFSET`. The default calendar type. A `MONTH_OFFSET` calendar is + * offset by a few months from the standard calendar months (January to December) and the year + * begins with the month defined in the request. For example, if the `month_offset` + * value is set as `April`, the calendar year begins in April. * `4-4-5`. + * Each quarter in the calendar will include two 4-week months followed by one 5-week month. * + * `4-5-4`. Each quarter in the calendar will include two 4-week months with a 5-week + * month between. * `5-4-4`. Each quarter begins with a 5-week month, followed by two + * 4-week months. To start and end the calendar on a specific date, specify the dates in the + * `MM/DD/YYYY` format. For `MONTH_OFFSET` calendars, ensure that the + * `start_date` matches the month specified in the `month_offset` attribute. + * You can also set the starting day of the week and customize the prefixes for year and quarter + * labels. #### Examples To create a calendar from an existing table: ``` { + * \"name\": \"MyCustomCalendar1\", \"table_reference\": { + * \"connection_identifier\": \"4db8ea22-2ff4-4224-b05a-26674717e468\", + * \"table_name\": \"MyCalendarTable\", \"database_name\": + * \"RETAILAPPAREL\", \"schema_name\": \"PUBLIC\" }, + * \"creation_method\": \"FROM_EXISTING_TABLE\", } ``` To + * create a calendar from scratch: ``` { \"name\": + * \"MyCustomCalendar1\", \"table_reference\": { + * \"connection_identifier\": \"4db8ea22-2ff4-4224-b05a-26674717e468\", + * \"table_name\": \"MyCalendarTable\", \"database_name\": + * \"RETAILAPPAREL\", \"schema_name\": \"PUBLIC\" }, + * \"creation_method\": \"FROM_INPUT_PARAMS\", \"calendar_type\": + * \"MONTH_OFFSET\", \"month_offset\": \"April\", + * \"start_day_of_week\": \"Monday\", \"quarter_name_prefix\": + * \"Q\", \"year_name_prefix\": \"FY\", \"start_date\": + * \"04/01/2025\", \"end_date\": \"04/31/2025\" } + * ``` + * + * @param createCalendarRequest (required) + * @param _callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body + * object + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 Custom calendar created successfully. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public okhttp3.Call createCalendarAsync( + CreateCalendarRequest createCalendarRequest, + final ApiCallback _callback) + throws ApiException { + + okhttp3.Call localVarCall = + createCalendarValidateBeforeCall(createCalendarRequest, _callback); + Type localVarReturnType = new TypeToken() {}.getType(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; + } + /** + * Build call for deleteCalendar + * + * @param calendarIdentifier Unique ID or name of the Calendar. (required) + * @param _callback Callback for upload/download progress + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
204 Custom calendar successfully deleted. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public okhttp3.Call deleteCalendarCall(String calendarIdentifier, final ApiCallback _callback) + throws ApiException { + String basePath = null; + // Operation Servers + String[] localBasePaths = new String[] {}; + + // Determine Base Path to Use + if (localCustomBaseUrl != null) { + basePath = localCustomBaseUrl; + } else if (localBasePaths.length > 0) { + basePath = localBasePaths[localHostIndex]; + } else { + basePath = null; + } + + Object localVarPostBody = null; + + // create path and map variables + String localVarPath = + "/api/rest/2.0/calendars/{calendar_identifier}/delete" + .replace( + "{" + "calendar_identifier" + "}", + localVarApiClient.escapeString(calendarIdentifier.toString())); + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + final String[] localVarAccepts = {"application/json"}; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = {}; + final String localVarContentType = + localVarApiClient.selectHeaderContentType(localVarContentTypes); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } + + String[] localVarAuthNames = new String[] {"bearerAuth"}; + return localVarApiClient.buildCall( + basePath, + localVarPath, + "POST", + localVarQueryParams, + localVarCollectionQueryParams, + localVarPostBody, + localVarHeaderParams, + localVarCookieParams, + localVarFormParams, + localVarAuthNames, + _callback); + } + + @SuppressWarnings("rawtypes") + private okhttp3.Call deleteCalendarValidateBeforeCall( + String calendarIdentifier, final ApiCallback _callback) throws ApiException { + // verify the required parameter 'calendarIdentifier' is set + if (calendarIdentifier == null) { + throw new ApiException( + "Missing the required parameter 'calendarIdentifier' when calling" + + " deleteCalendar(Async)"); + } + + return deleteCalendarCall(calendarIdentifier, _callback); + } + + /** + * Version: 10.12.0.cl or later Deletes a [custom + * calendar](https://docs.thoughtspot.com/cloud/latest/connections-cust-cal). Requires + * `DATAMANAGEMENT` (**Can manage data**) or `ADMINISTRATION` (**Can + * administer ThoughtSpot**) privilege. If [Role-Based Access Control + * (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your ThoughtSpot + * instance, the `CAN_MANAGE_CUSTOM_CALENDAR` (**Can manage custom calendars**) + * privilege is required. #### Usage guidelines To delete a custom calendar, specify the + * calendar ID as a path parameter in the request URL. + * + * @param calendarIdentifier Unique ID or name of the Calendar. (required) + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the + * response body + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
204 Custom calendar successfully deleted. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public void deleteCalendar(String calendarIdentifier) throws ApiException { + deleteCalendarWithHttpInfo(calendarIdentifier); + } + + /** + * Version: 10.12.0.cl or later Deletes a [custom + * calendar](https://docs.thoughtspot.com/cloud/latest/connections-cust-cal). Requires + * `DATAMANAGEMENT` (**Can manage data**) or `ADMINISTRATION` (**Can + * administer ThoughtSpot**) privilege. If [Role-Based Access Control + * (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your ThoughtSpot + * instance, the `CAN_MANAGE_CUSTOM_CALENDAR` (**Can manage custom calendars**) + * privilege is required. #### Usage guidelines To delete a custom calendar, specify the + * calendar ID as a path parameter in the request URL. + * + * @param calendarIdentifier Unique ID or name of the Calendar. (required) + * @return ApiResponse<Void> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the + * response body + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
204 Custom calendar successfully deleted. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public ApiResponse deleteCalendarWithHttpInfo(String calendarIdentifier) + throws ApiException { + okhttp3.Call localVarCall = deleteCalendarValidateBeforeCall(calendarIdentifier, null); + return localVarApiClient.execute(localVarCall); + } + + /** + * (asynchronously) Version: 10.12.0.cl or later Deletes a [custom + * calendar](https://docs.thoughtspot.com/cloud/latest/connections-cust-cal). Requires + * `DATAMANAGEMENT` (**Can manage data**) or `ADMINISTRATION` (**Can + * administer ThoughtSpot**) privilege. If [Role-Based Access Control + * (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your ThoughtSpot + * instance, the `CAN_MANAGE_CUSTOM_CALENDAR` (**Can manage custom calendars**) + * privilege is required. #### Usage guidelines To delete a custom calendar, specify the + * calendar ID as a path parameter in the request URL. + * + * @param calendarIdentifier Unique ID or name of the Calendar. (required) + * @param _callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body + * object + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
204 Custom calendar successfully deleted. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public okhttp3.Call deleteCalendarAsync( + String calendarIdentifier, final ApiCallback _callback) throws ApiException { + + okhttp3.Call localVarCall = deleteCalendarValidateBeforeCall(calendarIdentifier, _callback); + localVarApiClient.executeAsync(localVarCall, _callback); + return localVarCall; + } + /** + * Build call for generateCSV + * + * @param generateCSVRequest (required) + * @param _callback Callback for upload/download progress + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 Generate custom calendar data based on specifications, as a CSV file. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public okhttp3.Call generateCSVCall( + GenerateCSVRequest generateCSVRequest, final ApiCallback _callback) + throws ApiException { + String basePath = null; + // Operation Servers + String[] localBasePaths = new String[] {}; + + // Determine Base Path to Use + if (localCustomBaseUrl != null) { + basePath = localCustomBaseUrl; + } else if (localBasePaths.length > 0) { + basePath = localBasePaths[localHostIndex]; + } else { + basePath = null; + } + + Object localVarPostBody = generateCSVRequest; + + // create path and map variables + String localVarPath = "/api/rest/2.0/calendars/generate-csv"; + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + final String[] localVarAccepts = {"application/json"}; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = {"application/json"}; + final String localVarContentType = + localVarApiClient.selectHeaderContentType(localVarContentTypes); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } + + String[] localVarAuthNames = new String[] {"bearerAuth"}; + return localVarApiClient.buildCall( + basePath, + localVarPath, + "POST", + localVarQueryParams, + localVarCollectionQueryParams, + localVarPostBody, + localVarHeaderParams, + localVarCookieParams, + localVarFormParams, + localVarAuthNames, + _callback); + } + + @SuppressWarnings("rawtypes") + private okhttp3.Call generateCSVValidateBeforeCall( + GenerateCSVRequest generateCSVRequest, final ApiCallback _callback) + throws ApiException { + // verify the required parameter 'generateCSVRequest' is set + if (generateCSVRequest == null) { + throw new ApiException( + "Missing the required parameter 'generateCSVRequest' when calling" + + " generateCSV(Async)"); + } + + return generateCSVCall(generateCSVRequest, _callback); + } + + /** + * Version: 10.12.0.cl or later Exports a [custom + * calendar](https://docs.thoughtspot.com/cloud/latest/connections-cust-cal) in the CSV format. + * Requires `DATAMANAGEMENT` (**Can manage data**) or `ADMINISTRATION` + * (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control + * (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your ThoughtSpot + * instance, the `CAN_MANAGE_CUSTOM_CALENDAR` (**Can manage custom calendars**) + * privilege is required. #### Usage guidelines Use this API to download a custom calendar in + * the CSV file format. In your API request, specify the following parameters. * Start and end + * date of the calendar. For \"month offset\" calendars, the start date must match the + * month defined in the `month_offset` attribute. You can also specify optional + * parameters such as the starting day of the week and prefixes for the quarter and year labels. + * + * @param generateCSVRequest (required) + * @return Object + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the + * response body + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 Generate custom calendar data based on specifications, as a CSV file. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public Object generateCSV(GenerateCSVRequest generateCSVRequest) throws ApiException { + ApiResponse localVarResp = generateCSVWithHttpInfo(generateCSVRequest); + return localVarResp.getData(); + } + + /** + * Version: 10.12.0.cl or later Exports a [custom + * calendar](https://docs.thoughtspot.com/cloud/latest/connections-cust-cal) in the CSV format. + * Requires `DATAMANAGEMENT` (**Can manage data**) or `ADMINISTRATION` + * (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control + * (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your ThoughtSpot + * instance, the `CAN_MANAGE_CUSTOM_CALENDAR` (**Can manage custom calendars**) + * privilege is required. #### Usage guidelines Use this API to download a custom calendar in + * the CSV file format. In your API request, specify the following parameters. * Start and end + * date of the calendar. For \"month offset\" calendars, the start date must match the + * month defined in the `month_offset` attribute. You can also specify optional + * parameters such as the starting day of the week and prefixes for the quarter and year labels. + * + * @param generateCSVRequest (required) + * @return ApiResponse<Object> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the + * response body + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 Generate custom calendar data based on specifications, as a CSV file. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public ApiResponse generateCSVWithHttpInfo(GenerateCSVRequest generateCSVRequest) + throws ApiException { + okhttp3.Call localVarCall = generateCSVValidateBeforeCall(generateCSVRequest, null); + Type localVarReturnType = new TypeToken() {}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); + } + + /** + * (asynchronously) Version: 10.12.0.cl or later Exports a [custom + * calendar](https://docs.thoughtspot.com/cloud/latest/connections-cust-cal) in the CSV format. + * Requires `DATAMANAGEMENT` (**Can manage data**) or `ADMINISTRATION` + * (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control + * (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your ThoughtSpot + * instance, the `CAN_MANAGE_CUSTOM_CALENDAR` (**Can manage custom calendars**) + * privilege is required. #### Usage guidelines Use this API to download a custom calendar in + * the CSV file format. In your API request, specify the following parameters. * Start and end + * date of the calendar. For \"month offset\" calendars, the start date must match the + * month defined in the `month_offset` attribute. You can also specify optional + * parameters such as the starting day of the week and prefixes for the quarter and year labels. + * + * @param generateCSVRequest (required) + * @param _callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body + * object + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 Generate custom calendar data based on specifications, as a CSV file. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public okhttp3.Call generateCSVAsync( + GenerateCSVRequest generateCSVRequest, final ApiCallback _callback) + throws ApiException { + + okhttp3.Call localVarCall = generateCSVValidateBeforeCall(generateCSVRequest, _callback); + Type localVarReturnType = new TypeToken() {}.getType(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; + } + /** + * Build call for searchCalendars + * + * @param searchCalendarsRequest (required) + * @param _callback Callback for upload/download progress + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 Custom calendar fetched successfully. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public okhttp3.Call searchCalendarsCall( + SearchCalendarsRequest searchCalendarsRequest, final ApiCallback _callback) + throws ApiException { + String basePath = null; + // Operation Servers + String[] localBasePaths = new String[] {}; + + // Determine Base Path to Use + if (localCustomBaseUrl != null) { + basePath = localCustomBaseUrl; + } else if (localBasePaths.length > 0) { + basePath = localBasePaths[localHostIndex]; + } else { + basePath = null; + } + + Object localVarPostBody = searchCalendarsRequest; + + // create path and map variables + String localVarPath = "/api/rest/2.0/calendars/search"; + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + final String[] localVarAccepts = {"application/json"}; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = {"application/json"}; + final String localVarContentType = + localVarApiClient.selectHeaderContentType(localVarContentTypes); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } + + String[] localVarAuthNames = new String[] {"bearerAuth"}; + return localVarApiClient.buildCall( + basePath, + localVarPath, + "POST", + localVarQueryParams, + localVarCollectionQueryParams, + localVarPostBody, + localVarHeaderParams, + localVarCookieParams, + localVarFormParams, + localVarAuthNames, + _callback); + } + + @SuppressWarnings("rawtypes") + private okhttp3.Call searchCalendarsValidateBeforeCall( + SearchCalendarsRequest searchCalendarsRequest, final ApiCallback _callback) + throws ApiException { + // verify the required parameter 'searchCalendarsRequest' is set + if (searchCalendarsRequest == null) { + throw new ApiException( + "Missing the required parameter 'searchCalendarsRequest' when calling" + + " searchCalendars(Async)"); + } + + return searchCalendarsCall(searchCalendarsRequest, _callback); + } + + /** + * Version: 10.12.0.cl or later Gets a list of [custom + * calendars](https://docs.thoughtspot.com/cloud/latest/connections-cust-cal). Requires + * `DATAMANAGEMENT` (**Can manage data**) or `ADMINISTRATION` (**Can + * administer ThoughtSpot**) privilege. If [Role-Based Access Control + * (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your ThoughtSpot + * instance, the `CAN_MANAGE_CUSTOM_CALENDAR` (**Can manage custom calendars**) + * privilege is required. #### Usage guidelines By default, the API returns a list of custom + * calendars for all connection objects. To retrieve custom calendar details for a particular + * connection, specify the connection ID. You can also use other search parameters such as + * `name_pattern` and `sort_options` as search filters. The + * `name_pattern` parameter filters and returns only those objects that match the + * specified pattern. Use `%` as a wildcard for pattern matching. + * + * @param searchCalendarsRequest (required) + * @return List<CalendarResponse> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the + * response body + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 Custom calendar fetched successfully. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public List searchCalendars(SearchCalendarsRequest searchCalendarsRequest) + throws ApiException { + ApiResponse> localVarResp = + searchCalendarsWithHttpInfo(searchCalendarsRequest); + return localVarResp.getData(); + } + + /** + * Version: 10.12.0.cl or later Gets a list of [custom + * calendars](https://docs.thoughtspot.com/cloud/latest/connections-cust-cal). Requires + * `DATAMANAGEMENT` (**Can manage data**) or `ADMINISTRATION` (**Can + * administer ThoughtSpot**) privilege. If [Role-Based Access Control + * (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your ThoughtSpot + * instance, the `CAN_MANAGE_CUSTOM_CALENDAR` (**Can manage custom calendars**) + * privilege is required. #### Usage guidelines By default, the API returns a list of custom + * calendars for all connection objects. To retrieve custom calendar details for a particular + * connection, specify the connection ID. You can also use other search parameters such as + * `name_pattern` and `sort_options` as search filters. The + * `name_pattern` parameter filters and returns only those objects that match the + * specified pattern. Use `%` as a wildcard for pattern matching. + * + * @param searchCalendarsRequest (required) + * @return ApiResponse<List<CalendarResponse>> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the + * response body + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 Custom calendar fetched successfully. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public ApiResponse> searchCalendarsWithHttpInfo( + SearchCalendarsRequest searchCalendarsRequest) throws ApiException { + okhttp3.Call localVarCall = searchCalendarsValidateBeforeCall(searchCalendarsRequest, null); + Type localVarReturnType = new TypeToken>() {}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); + } + + /** + * (asynchronously) Version: 10.12.0.cl or later Gets a list of [custom + * calendars](https://docs.thoughtspot.com/cloud/latest/connections-cust-cal). Requires + * `DATAMANAGEMENT` (**Can manage data**) or `ADMINISTRATION` (**Can + * administer ThoughtSpot**) privilege. If [Role-Based Access Control + * (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your ThoughtSpot + * instance, the `CAN_MANAGE_CUSTOM_CALENDAR` (**Can manage custom calendars**) + * privilege is required. #### Usage guidelines By default, the API returns a list of custom + * calendars for all connection objects. To retrieve custom calendar details for a particular + * connection, specify the connection ID. You can also use other search parameters such as + * `name_pattern` and `sort_options` as search filters. The + * `name_pattern` parameter filters and returns only those objects that match the + * specified pattern. Use `%` as a wildcard for pattern matching. + * + * @param searchCalendarsRequest (required) + * @param _callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body + * object + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 Custom calendar fetched successfully. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public okhttp3.Call searchCalendarsAsync( + SearchCalendarsRequest searchCalendarsRequest, + final ApiCallback> _callback) + throws ApiException { + + okhttp3.Call localVarCall = + searchCalendarsValidateBeforeCall(searchCalendarsRequest, _callback); + Type localVarReturnType = new TypeToken>() {}.getType(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; + } + /** + * Build call for updateCalendar + * + * @param calendarIdentifier Unique Id or name of the calendar. (required) + * @param updateCalendarRequest (required) + * @param _callback Callback for upload/download progress + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
204 Custom calendar updated successfully. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public okhttp3.Call updateCalendarCall( + String calendarIdentifier, + UpdateCalendarRequest updateCalendarRequest, + final ApiCallback _callback) + throws ApiException { + String basePath = null; + // Operation Servers + String[] localBasePaths = new String[] {}; + + // Determine Base Path to Use + if (localCustomBaseUrl != null) { + basePath = localCustomBaseUrl; + } else if (localBasePaths.length > 0) { + basePath = localBasePaths[localHostIndex]; + } else { + basePath = null; + } + + Object localVarPostBody = updateCalendarRequest; + + // create path and map variables + String localVarPath = + "/api/rest/2.0/calendars/{calendar_identifier}/update" + .replace( + "{" + "calendar_identifier" + "}", + localVarApiClient.escapeString(calendarIdentifier.toString())); + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + final String[] localVarAccepts = {"application/json"}; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = {"application/json"}; + final String localVarContentType = + localVarApiClient.selectHeaderContentType(localVarContentTypes); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } + + String[] localVarAuthNames = new String[] {"bearerAuth"}; + return localVarApiClient.buildCall( + basePath, + localVarPath, + "POST", + localVarQueryParams, + localVarCollectionQueryParams, + localVarPostBody, + localVarHeaderParams, + localVarCookieParams, + localVarFormParams, + localVarAuthNames, + _callback); + } + + @SuppressWarnings("rawtypes") + private okhttp3.Call updateCalendarValidateBeforeCall( + String calendarIdentifier, + UpdateCalendarRequest updateCalendarRequest, + final ApiCallback _callback) + throws ApiException { + // verify the required parameter 'calendarIdentifier' is set + if (calendarIdentifier == null) { + throw new ApiException( + "Missing the required parameter 'calendarIdentifier' when calling" + + " updateCalendar(Async)"); + } + + // verify the required parameter 'updateCalendarRequest' is set + if (updateCalendarRequest == null) { + throw new ApiException( + "Missing the required parameter 'updateCalendarRequest' when calling" + + " updateCalendar(Async)"); + } + + return updateCalendarCall(calendarIdentifier, updateCalendarRequest, _callback); + } + + /** + * Version: 10.12.0.cl or later Updates the properties of a [custom + * calendar](https://docs.thoughtspot.com/cloud/latest/connections-cust-cal). Requires + * `DATAMANAGEMENT` (**Can manage data**) or `ADMINISTRATION` (**Can + * administer ThoughtSpot**) privilege. If [Role-Based Access Control + * (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your ThoughtSpot + * instance, the `CAN_MANAGE_CUSTOM_CALENDAR` (**Can manage custom calendars**) + * privilege is required. #### Usage guidelines You can update the properties of a calendar + * using one of the following methods: * `FROM_INPUT_PARAMS` to update the calendar + * properties with the values defined in the API request. * `FROM_EXISTING_TABLE` + * Creates a calendar from the parameters defined in the API request. To update a custom + * calendar, specify the calendar ID as a path parameter in the request URL and the following + * parameters in the request body: * Connection ID and Table name * Database and schema name + * attributes: For most Cloud Data Warehouse (CDW) connectors, both `database_name` + * and `schema_name` attributes are required. However, the attribute requirements are + * conditional and vary based on the connector type and its metadata structure. For example, for + * connectors such as Teradata, MySQL, SingleSore, Amazon Aurora MySQL, Amazon RDS MySQL, + * Oracle, and GCP_MYSQL, the `schema_name` is required, whereas the + * `database_name` attribute is not. Similarly, connectors such as ClickHouse require + * you to specify the `database_name` and the schema specification in such cases is + * optional. The API allows you to modify the calendar type, month offset value, start and end + * date, starting day of the week, and prefixes assigned to the year and quarter labels. #### + * Examples Update a custom calendar using an existing Table in ThoughtSpot: ``` + * { \"update_method\": \"FROM_EXISTING_TABLE\", + * \"table_reference\": { \"connection_identifier\": + * \"Connection1\", \"database_name\": \"db1\", + * \"table_name\": \"custom_calendar_2025\", \"schame_name\": + * \"schemaVar\" } } ``` Update a custom calendar with the attributes + * defined in the API request: ``` { \"update_method\": + * \"FROM_INPUT_PARAMS\", \"table_reference\": { + * \"connection_identifier\": \"Connection1\", \"database_name\": + * \"db1\", \"table_name\": \"custom_calendar_2025\", + * \"schame_name\": \"schemaVar\" }, \"month_offset\": + * \"August\", \"start_day_of_week\": \"Monday\", + * \"start_date\": \"08/01/2025\", \"end_date\": + * \"07/31/2026\" } ``` + * + * @param calendarIdentifier Unique Id or name of the calendar. (required) + * @param updateCalendarRequest (required) + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the + * response body + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
204 Custom calendar updated successfully. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public void updateCalendar( + String calendarIdentifier, UpdateCalendarRequest updateCalendarRequest) + throws ApiException { + updateCalendarWithHttpInfo(calendarIdentifier, updateCalendarRequest); + } + + /** + * Version: 10.12.0.cl or later Updates the properties of a [custom + * calendar](https://docs.thoughtspot.com/cloud/latest/connections-cust-cal). Requires + * `DATAMANAGEMENT` (**Can manage data**) or `ADMINISTRATION` (**Can + * administer ThoughtSpot**) privilege. If [Role-Based Access Control + * (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your ThoughtSpot + * instance, the `CAN_MANAGE_CUSTOM_CALENDAR` (**Can manage custom calendars**) + * privilege is required. #### Usage guidelines You can update the properties of a calendar + * using one of the following methods: * `FROM_INPUT_PARAMS` to update the calendar + * properties with the values defined in the API request. * `FROM_EXISTING_TABLE` + * Creates a calendar from the parameters defined in the API request. To update a custom + * calendar, specify the calendar ID as a path parameter in the request URL and the following + * parameters in the request body: * Connection ID and Table name * Database and schema name + * attributes: For most Cloud Data Warehouse (CDW) connectors, both `database_name` + * and `schema_name` attributes are required. However, the attribute requirements are + * conditional and vary based on the connector type and its metadata structure. For example, for + * connectors such as Teradata, MySQL, SingleSore, Amazon Aurora MySQL, Amazon RDS MySQL, + * Oracle, and GCP_MYSQL, the `schema_name` is required, whereas the + * `database_name` attribute is not. Similarly, connectors such as ClickHouse require + * you to specify the `database_name` and the schema specification in such cases is + * optional. The API allows you to modify the calendar type, month offset value, start and end + * date, starting day of the week, and prefixes assigned to the year and quarter labels. #### + * Examples Update a custom calendar using an existing Table in ThoughtSpot: ``` + * { \"update_method\": \"FROM_EXISTING_TABLE\", + * \"table_reference\": { \"connection_identifier\": + * \"Connection1\", \"database_name\": \"db1\", + * \"table_name\": \"custom_calendar_2025\", \"schame_name\": + * \"schemaVar\" } } ``` Update a custom calendar with the attributes + * defined in the API request: ``` { \"update_method\": + * \"FROM_INPUT_PARAMS\", \"table_reference\": { + * \"connection_identifier\": \"Connection1\", \"database_name\": + * \"db1\", \"table_name\": \"custom_calendar_2025\", + * \"schame_name\": \"schemaVar\" }, \"month_offset\": + * \"August\", \"start_day_of_week\": \"Monday\", + * \"start_date\": \"08/01/2025\", \"end_date\": + * \"07/31/2026\" } ``` + * + * @param calendarIdentifier Unique Id or name of the calendar. (required) + * @param updateCalendarRequest (required) + * @return ApiResponse<Void> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the + * response body + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
204 Custom calendar updated successfully. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public ApiResponse updateCalendarWithHttpInfo( + String calendarIdentifier, UpdateCalendarRequest updateCalendarRequest) + throws ApiException { + okhttp3.Call localVarCall = + updateCalendarValidateBeforeCall(calendarIdentifier, updateCalendarRequest, null); + return localVarApiClient.execute(localVarCall); + } + + /** + * (asynchronously) Version: 10.12.0.cl or later Updates the properties of a [custom + * calendar](https://docs.thoughtspot.com/cloud/latest/connections-cust-cal). Requires + * `DATAMANAGEMENT` (**Can manage data**) or `ADMINISTRATION` (**Can + * administer ThoughtSpot**) privilege. If [Role-Based Access Control + * (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your ThoughtSpot + * instance, the `CAN_MANAGE_CUSTOM_CALENDAR` (**Can manage custom calendars**) + * privilege is required. #### Usage guidelines You can update the properties of a calendar + * using one of the following methods: * `FROM_INPUT_PARAMS` to update the calendar + * properties with the values defined in the API request. * `FROM_EXISTING_TABLE` + * Creates a calendar from the parameters defined in the API request. To update a custom + * calendar, specify the calendar ID as a path parameter in the request URL and the following + * parameters in the request body: * Connection ID and Table name * Database and schema name + * attributes: For most Cloud Data Warehouse (CDW) connectors, both `database_name` + * and `schema_name` attributes are required. However, the attribute requirements are + * conditional and vary based on the connector type and its metadata structure. For example, for + * connectors such as Teradata, MySQL, SingleSore, Amazon Aurora MySQL, Amazon RDS MySQL, + * Oracle, and GCP_MYSQL, the `schema_name` is required, whereas the + * `database_name` attribute is not. Similarly, connectors such as ClickHouse require + * you to specify the `database_name` and the schema specification in such cases is + * optional. The API allows you to modify the calendar type, month offset value, start and end + * date, starting day of the week, and prefixes assigned to the year and quarter labels. #### + * Examples Update a custom calendar using an existing Table in ThoughtSpot: ``` + * { \"update_method\": \"FROM_EXISTING_TABLE\", + * \"table_reference\": { \"connection_identifier\": + * \"Connection1\", \"database_name\": \"db1\", + * \"table_name\": \"custom_calendar_2025\", \"schame_name\": + * \"schemaVar\" } } ``` Update a custom calendar with the attributes + * defined in the API request: ``` { \"update_method\": + * \"FROM_INPUT_PARAMS\", \"table_reference\": { + * \"connection_identifier\": \"Connection1\", \"database_name\": + * \"db1\", \"table_name\": \"custom_calendar_2025\", + * \"schame_name\": \"schemaVar\" }, \"month_offset\": + * \"August\", \"start_day_of_week\": \"Monday\", + * \"start_date\": \"08/01/2025\", \"end_date\": + * \"07/31/2026\" } ``` + * + * @param calendarIdentifier Unique Id or name of the calendar. (required) + * @param updateCalendarRequest (required) + * @param _callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body + * object + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
204 Custom calendar updated successfully. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public okhttp3.Call updateCalendarAsync( + String calendarIdentifier, + UpdateCalendarRequest updateCalendarRequest, + final ApiCallback _callback) + throws ApiException { + + okhttp3.Call localVarCall = + updateCalendarValidateBeforeCall( + calendarIdentifier, updateCalendarRequest, _callback); + localVarApiClient.executeAsync(localVarCall, _callback); + return localVarCall; + } +} diff --git a/sdks/java/src/main/java/com/thoughtspot/client/api/DataApi.java b/sdks/java/src/main/java/com/thoughtspot/client/api/DataApi.java new file mode 100644 index 000000000..88521c355 --- /dev/null +++ b/sdks/java/src/main/java/com/thoughtspot/client/api/DataApi.java @@ -0,0 +1,663 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client.api; + +import com.google.gson.reflect.TypeToken; +import com.thoughtspot.client.ApiCallback; +import com.thoughtspot.client.ApiClient; +import com.thoughtspot.client.ApiClientConfiguration; +import com.thoughtspot.client.ApiException; +import com.thoughtspot.client.ApiResponse; +import com.thoughtspot.client.Configuration; +import com.thoughtspot.client.Pair; +import com.thoughtspot.client.model.AnswerDataResponse; +import com.thoughtspot.client.model.FetchAnswerDataRequest; +import com.thoughtspot.client.model.FetchLiveboardDataRequest; +import com.thoughtspot.client.model.LiveboardDataResponse; +import com.thoughtspot.client.model.SearchDataRequest; +import com.thoughtspot.client.model.SearchDataResponse; +import java.lang.reflect.Type; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +@javax.annotation.Generated( + value = "org.openapitools.codegen.languages.JavaClientCodegen", + comments = "Generator version: 7.12.0") +public class DataApi { + private ApiClient localVarApiClient; + private ApiClientConfiguration localVarApiClientConfiguration; + private int localHostIndex; + private String localCustomBaseUrl; + + public DataApi() { + this(Configuration.getDefaultApiClient()); + } + + public DataApi(ApiClient apiClient) { + this.localVarApiClient = apiClient; + } + + public DataApi(ApiClientConfiguration apiClientConfiguration) { + this.localVarApiClientConfiguration = apiClientConfiguration; + this.localVarApiClient = new ApiClient(apiClientConfiguration); + } + + public ApiClient getApiClient() { + return localVarApiClient; + } + + public void setApiClient(ApiClient apiClient) { + this.localVarApiClient = apiClient; + } + + public ApiClientConfiguration getApiClientConfiguration() { + return localVarApiClientConfiguration; + } + + public void applyApiClientConfiguration(ApiClientConfiguration apiClientConfiguration) { + this.localVarApiClientConfiguration = apiClientConfiguration; + if (localVarApiClient != null) { + localVarApiClient.applyApiClientConfiguration(apiClientConfiguration); + } else { + localVarApiClient = new ApiClient(apiClientConfiguration); + } + } + + public int getHostIndex() { + return localHostIndex; + } + + public void setHostIndex(int hostIndex) { + this.localHostIndex = hostIndex; + } + + public String getCustomBaseUrl() { + return localCustomBaseUrl; + } + + public void setCustomBaseUrl(String customBaseUrl) { + this.localCustomBaseUrl = customBaseUrl; + } + + /** + * Build call for fetchAnswerData + * + * @param fetchAnswerDataRequest (required) + * @param _callback Callback for upload/download progress + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 Fetching data of specified metadata object is successful. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public okhttp3.Call fetchAnswerDataCall( + FetchAnswerDataRequest fetchAnswerDataRequest, final ApiCallback _callback) + throws ApiException { + String basePath = null; + // Operation Servers + String[] localBasePaths = new String[] {}; + + // Determine Base Path to Use + if (localCustomBaseUrl != null) { + basePath = localCustomBaseUrl; + } else if (localBasePaths.length > 0) { + basePath = localBasePaths[localHostIndex]; + } else { + basePath = null; + } + + Object localVarPostBody = fetchAnswerDataRequest; + + // create path and map variables + String localVarPath = "/api/rest/2.0/metadata/answer/data"; + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + final String[] localVarAccepts = {"application/json"}; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = {"application/json"}; + final String localVarContentType = + localVarApiClient.selectHeaderContentType(localVarContentTypes); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } + + String[] localVarAuthNames = new String[] {"bearerAuth"}; + return localVarApiClient.buildCall( + basePath, + localVarPath, + "POST", + localVarQueryParams, + localVarCollectionQueryParams, + localVarPostBody, + localVarHeaderParams, + localVarCookieParams, + localVarFormParams, + localVarAuthNames, + _callback); + } + + @SuppressWarnings("rawtypes") + private okhttp3.Call fetchAnswerDataValidateBeforeCall( + FetchAnswerDataRequest fetchAnswerDataRequest, final ApiCallback _callback) + throws ApiException { + // verify the required parameter 'fetchAnswerDataRequest' is set + if (fetchAnswerDataRequest == null) { + throw new ApiException( + "Missing the required parameter 'fetchAnswerDataRequest' when calling" + + " fetchAnswerData(Async)"); + } + + return fetchAnswerDataCall(fetchAnswerDataRequest, _callback); + } + + /** + * Version: 9.0.0.cl or later Fetches data from a saved Answer. Requires at least view access to + * the saved Answer. The `record_size` attribute determines the number of records to + * retrieve in an API call. For more information about pagination, record size, and maximum row + * limit, see [Pagination and record size + * settings](https://developers.thoughtspot.com/docs/fetch-data-and-report-apis#_pagination_settings_for_data_and_report_apis). + * + * @param fetchAnswerDataRequest (required) + * @return AnswerDataResponse + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the + * response body + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 Fetching data of specified metadata object is successful. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public AnswerDataResponse fetchAnswerData(FetchAnswerDataRequest fetchAnswerDataRequest) + throws ApiException { + ApiResponse localVarResp = + fetchAnswerDataWithHttpInfo(fetchAnswerDataRequest); + return localVarResp.getData(); + } + + /** + * Version: 9.0.0.cl or later Fetches data from a saved Answer. Requires at least view access to + * the saved Answer. The `record_size` attribute determines the number of records to + * retrieve in an API call. For more information about pagination, record size, and maximum row + * limit, see [Pagination and record size + * settings](https://developers.thoughtspot.com/docs/fetch-data-and-report-apis#_pagination_settings_for_data_and_report_apis). + * + * @param fetchAnswerDataRequest (required) + * @return ApiResponse<AnswerDataResponse> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the + * response body + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 Fetching data of specified metadata object is successful. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public ApiResponse fetchAnswerDataWithHttpInfo( + FetchAnswerDataRequest fetchAnswerDataRequest) throws ApiException { + okhttp3.Call localVarCall = fetchAnswerDataValidateBeforeCall(fetchAnswerDataRequest, null); + Type localVarReturnType = new TypeToken() {}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); + } + + /** + * (asynchronously) Version: 9.0.0.cl or later Fetches data from a saved Answer. Requires at + * least view access to the saved Answer. The `record_size` attribute determines the + * number of records to retrieve in an API call. For more information about pagination, record + * size, and maximum row limit, see [Pagination and record size + * settings](https://developers.thoughtspot.com/docs/fetch-data-and-report-apis#_pagination_settings_for_data_and_report_apis). + * + * @param fetchAnswerDataRequest (required) + * @param _callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body + * object + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 Fetching data of specified metadata object is successful. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public okhttp3.Call fetchAnswerDataAsync( + FetchAnswerDataRequest fetchAnswerDataRequest, + final ApiCallback _callback) + throws ApiException { + + okhttp3.Call localVarCall = + fetchAnswerDataValidateBeforeCall(fetchAnswerDataRequest, _callback); + Type localVarReturnType = new TypeToken() {}.getType(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; + } + /** + * Build call for fetchLiveboardData + * + * @param fetchLiveboardDataRequest (required) + * @param _callback Callback for upload/download progress + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 Fetching data of specified metadata object is successful. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public okhttp3.Call fetchLiveboardDataCall( + FetchLiveboardDataRequest fetchLiveboardDataRequest, final ApiCallback _callback) + throws ApiException { + String basePath = null; + // Operation Servers + String[] localBasePaths = new String[] {}; + + // Determine Base Path to Use + if (localCustomBaseUrl != null) { + basePath = localCustomBaseUrl; + } else if (localBasePaths.length > 0) { + basePath = localBasePaths[localHostIndex]; + } else { + basePath = null; + } + + Object localVarPostBody = fetchLiveboardDataRequest; + + // create path and map variables + String localVarPath = "/api/rest/2.0/metadata/liveboard/data"; + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + final String[] localVarAccepts = {"application/json"}; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = {"application/json"}; + final String localVarContentType = + localVarApiClient.selectHeaderContentType(localVarContentTypes); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } + + String[] localVarAuthNames = new String[] {"bearerAuth"}; + return localVarApiClient.buildCall( + basePath, + localVarPath, + "POST", + localVarQueryParams, + localVarCollectionQueryParams, + localVarPostBody, + localVarHeaderParams, + localVarCookieParams, + localVarFormParams, + localVarAuthNames, + _callback); + } + + @SuppressWarnings("rawtypes") + private okhttp3.Call fetchLiveboardDataValidateBeforeCall( + FetchLiveboardDataRequest fetchLiveboardDataRequest, final ApiCallback _callback) + throws ApiException { + // verify the required parameter 'fetchLiveboardDataRequest' is set + if (fetchLiveboardDataRequest == null) { + throw new ApiException( + "Missing the required parameter 'fetchLiveboardDataRequest' when calling" + + " fetchLiveboardData(Async)"); + } + + return fetchLiveboardDataCall(fetchLiveboardDataRequest, _callback); + } + + /** + * Version: 9.0.0.cl or later Gets data from a Liveboard object and its visualization. Requires + * at least view access to the Liveboard. #### Usage guidelines In the request body, specify the + * GUID or name of the Liveboard. To get data for specific visualizations, add the GUIDs or + * names of the visualizations in the API request. To include unsaved changes in the report, + * pass the `transient_pinboard_content` script generated from the + * `getExportRequestForCurrentPinboard` method in the Visual Embed SDK. Upon + * successful execution, the API returns the report with unsaved changes. If the new Liveboard + * experience mode, the transient content includes ad hoc changes to visualizations such as + * sorting, toggling of legends, and data drill down. For more information, and see [Liveboard + * data + * API](https://developers.thoughtspot.com/docs/fetch-data-and-report-apis#_fetch_liveboard_data_api). + * + * @param fetchLiveboardDataRequest (required) + * @return LiveboardDataResponse + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the + * response body + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 Fetching data of specified metadata object is successful. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public LiveboardDataResponse fetchLiveboardData( + FetchLiveboardDataRequest fetchLiveboardDataRequest) throws ApiException { + ApiResponse localVarResp = + fetchLiveboardDataWithHttpInfo(fetchLiveboardDataRequest); + return localVarResp.getData(); + } + + /** + * Version: 9.0.0.cl or later Gets data from a Liveboard object and its visualization. Requires + * at least view access to the Liveboard. #### Usage guidelines In the request body, specify the + * GUID or name of the Liveboard. To get data for specific visualizations, add the GUIDs or + * names of the visualizations in the API request. To include unsaved changes in the report, + * pass the `transient_pinboard_content` script generated from the + * `getExportRequestForCurrentPinboard` method in the Visual Embed SDK. Upon + * successful execution, the API returns the report with unsaved changes. If the new Liveboard + * experience mode, the transient content includes ad hoc changes to visualizations such as + * sorting, toggling of legends, and data drill down. For more information, and see [Liveboard + * data + * API](https://developers.thoughtspot.com/docs/fetch-data-and-report-apis#_fetch_liveboard_data_api). + * + * @param fetchLiveboardDataRequest (required) + * @return ApiResponse<LiveboardDataResponse> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the + * response body + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 Fetching data of specified metadata object is successful. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public ApiResponse fetchLiveboardDataWithHttpInfo( + FetchLiveboardDataRequest fetchLiveboardDataRequest) throws ApiException { + okhttp3.Call localVarCall = + fetchLiveboardDataValidateBeforeCall(fetchLiveboardDataRequest, null); + Type localVarReturnType = new TypeToken() {}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); + } + + /** + * (asynchronously) Version: 9.0.0.cl or later Gets data from a Liveboard object and its + * visualization. Requires at least view access to the Liveboard. #### Usage guidelines In the + * request body, specify the GUID or name of the Liveboard. To get data for specific + * visualizations, add the GUIDs or names of the visualizations in the API request. To include + * unsaved changes in the report, pass the `transient_pinboard_content` script + * generated from the `getExportRequestForCurrentPinboard` method in the Visual Embed + * SDK. Upon successful execution, the API returns the report with unsaved changes. If the new + * Liveboard experience mode, the transient content includes ad hoc changes to visualizations + * such as sorting, toggling of legends, and data drill down. For more information, and see + * [Liveboard data + * API](https://developers.thoughtspot.com/docs/fetch-data-and-report-apis#_fetch_liveboard_data_api). + * + * @param fetchLiveboardDataRequest (required) + * @param _callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body + * object + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 Fetching data of specified metadata object is successful. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public okhttp3.Call fetchLiveboardDataAsync( + FetchLiveboardDataRequest fetchLiveboardDataRequest, + final ApiCallback _callback) + throws ApiException { + + okhttp3.Call localVarCall = + fetchLiveboardDataValidateBeforeCall(fetchLiveboardDataRequest, _callback); + Type localVarReturnType = new TypeToken() {}.getType(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; + } + /** + * Build call for searchData + * + * @param searchDataRequest (required) + * @param _callback Callback for upload/download progress + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 Fetching data of specified metadata object is successful. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public okhttp3.Call searchDataCall( + SearchDataRequest searchDataRequest, final ApiCallback _callback) throws ApiException { + String basePath = null; + // Operation Servers + String[] localBasePaths = new String[] {}; + + // Determine Base Path to Use + if (localCustomBaseUrl != null) { + basePath = localCustomBaseUrl; + } else if (localBasePaths.length > 0) { + basePath = localBasePaths[localHostIndex]; + } else { + basePath = null; + } + + Object localVarPostBody = searchDataRequest; + + // create path and map variables + String localVarPath = "/api/rest/2.0/searchdata"; + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + final String[] localVarAccepts = {"application/json"}; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = {"application/json"}; + final String localVarContentType = + localVarApiClient.selectHeaderContentType(localVarContentTypes); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } + + String[] localVarAuthNames = new String[] {"bearerAuth"}; + return localVarApiClient.buildCall( + basePath, + localVarPath, + "POST", + localVarQueryParams, + localVarCollectionQueryParams, + localVarPostBody, + localVarHeaderParams, + localVarCookieParams, + localVarFormParams, + localVarAuthNames, + _callback); + } + + @SuppressWarnings("rawtypes") + private okhttp3.Call searchDataValidateBeforeCall( + SearchDataRequest searchDataRequest, final ApiCallback _callback) throws ApiException { + // verify the required parameter 'searchDataRequest' is set + if (searchDataRequest == null) { + throw new ApiException( + "Missing the required parameter 'searchDataRequest' when calling" + + " searchData(Async)"); + } + + return searchDataCall(searchDataRequest, _callback); + } + + /** + * Version: 9.0.0.cl or later Generates an Answer from a given data source. Requires at least + * view access to the data source object (Worksheet or View). #### Usage guidelines To search + * data, specify the data source GUID in `logical_table_identifier`. The data source + * can be a Worksheet, View, Table, or SQL view. Pass search tokens in the + * `query_string` attribute in the API request as shown in the following example: + * ``` { \"query_string\": \"[sales] by [store]\", + * \"logical_table_identifier\": \"cd252e5c-b552-49a8-821d-3eadaa049cca\", } + * ``` For more information about the `query_string` format and data + * source attribute, see [Search data + * API](https://developers.thoughtspot.com/docs/fetch-data-and-report-apis#_search_data_api). + * The `record_size` attribute determines the number of records to retrieve in an API + * call. For more information about pagination, record size, and maximum row limit, see + * [Pagination and record size + * settings](https://developers.thoughtspot.com/docs/fetch-data-and-report-apis#_pagination_settings_for_data_and_report_api). + * + * @param searchDataRequest (required) + * @return SearchDataResponse + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the + * response body + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 Fetching data of specified metadata object is successful. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public SearchDataResponse searchData(SearchDataRequest searchDataRequest) throws ApiException { + ApiResponse localVarResp = searchDataWithHttpInfo(searchDataRequest); + return localVarResp.getData(); + } + + /** + * Version: 9.0.0.cl or later Generates an Answer from a given data source. Requires at least + * view access to the data source object (Worksheet or View). #### Usage guidelines To search + * data, specify the data source GUID in `logical_table_identifier`. The data source + * can be a Worksheet, View, Table, or SQL view. Pass search tokens in the + * `query_string` attribute in the API request as shown in the following example: + * ``` { \"query_string\": \"[sales] by [store]\", + * \"logical_table_identifier\": \"cd252e5c-b552-49a8-821d-3eadaa049cca\", } + * ``` For more information about the `query_string` format and data + * source attribute, see [Search data + * API](https://developers.thoughtspot.com/docs/fetch-data-and-report-apis#_search_data_api). + * The `record_size` attribute determines the number of records to retrieve in an API + * call. For more information about pagination, record size, and maximum row limit, see + * [Pagination and record size + * settings](https://developers.thoughtspot.com/docs/fetch-data-and-report-apis#_pagination_settings_for_data_and_report_api). + * + * @param searchDataRequest (required) + * @return ApiResponse<SearchDataResponse> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the + * response body + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 Fetching data of specified metadata object is successful. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public ApiResponse searchDataWithHttpInfo( + SearchDataRequest searchDataRequest) throws ApiException { + okhttp3.Call localVarCall = searchDataValidateBeforeCall(searchDataRequest, null); + Type localVarReturnType = new TypeToken() {}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); + } + + /** + * (asynchronously) Version: 9.0.0.cl or later Generates an Answer from a given data source. + * Requires at least view access to the data source object (Worksheet or View). #### Usage + * guidelines To search data, specify the data source GUID in + * `logical_table_identifier`. The data source can be a Worksheet, View, Table, or SQL + * view. Pass search tokens in the `query_string` attribute in the API request as + * shown in the following example: ``` { \"query_string\": + * \"[sales] by [store]\", \"logical_table_identifier\": + * \"cd252e5c-b552-49a8-821d-3eadaa049cca\", } ``` For more information + * about the `query_string` format and data source attribute, see [Search data + * API](https://developers.thoughtspot.com/docs/fetch-data-and-report-apis#_search_data_api). + * The `record_size` attribute determines the number of records to retrieve in an API + * call. For more information about pagination, record size, and maximum row limit, see + * [Pagination and record size + * settings](https://developers.thoughtspot.com/docs/fetch-data-and-report-apis#_pagination_settings_for_data_and_report_api). + * + * @param searchDataRequest (required) + * @param _callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body + * object + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 Fetching data of specified metadata object is successful. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public okhttp3.Call searchDataAsync( + SearchDataRequest searchDataRequest, final ApiCallback _callback) + throws ApiException { + + okhttp3.Call localVarCall = searchDataValidateBeforeCall(searchDataRequest, _callback); + Type localVarReturnType = new TypeToken() {}.getType(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; + } +} diff --git a/sdks/java/src/main/java/com/thoughtspot/client/api/DbtApi.java b/sdks/java/src/main/java/com/thoughtspot/client/api/DbtApi.java new file mode 100644 index 000000000..c5a0ec798 --- /dev/null +++ b/sdks/java/src/main/java/com/thoughtspot/client/api/DbtApi.java @@ -0,0 +1,1741 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client.api; + +import com.google.gson.reflect.TypeToken; +import com.thoughtspot.client.ApiCallback; +import com.thoughtspot.client.ApiClient; +import com.thoughtspot.client.ApiClientConfiguration; +import com.thoughtspot.client.ApiException; +import com.thoughtspot.client.ApiResponse; +import com.thoughtspot.client.Configuration; +import com.thoughtspot.client.Pair; +import com.thoughtspot.client.model.DbtSearchResponse; +import java.io.File; +import java.lang.reflect.Type; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +@javax.annotation.Generated( + value = "org.openapitools.codegen.languages.JavaClientCodegen", + comments = "Generator version: 7.12.0") +public class DbtApi { + private ApiClient localVarApiClient; + private ApiClientConfiguration localVarApiClientConfiguration; + private int localHostIndex; + private String localCustomBaseUrl; + + public DbtApi() { + this(Configuration.getDefaultApiClient()); + } + + public DbtApi(ApiClient apiClient) { + this.localVarApiClient = apiClient; + } + + public DbtApi(ApiClientConfiguration apiClientConfiguration) { + this.localVarApiClientConfiguration = apiClientConfiguration; + this.localVarApiClient = new ApiClient(apiClientConfiguration); + } + + public ApiClient getApiClient() { + return localVarApiClient; + } + + public void setApiClient(ApiClient apiClient) { + this.localVarApiClient = apiClient; + } + + public ApiClientConfiguration getApiClientConfiguration() { + return localVarApiClientConfiguration; + } + + public void applyApiClientConfiguration(ApiClientConfiguration apiClientConfiguration) { + this.localVarApiClientConfiguration = apiClientConfiguration; + if (localVarApiClient != null) { + localVarApiClient.applyApiClientConfiguration(apiClientConfiguration); + } else { + localVarApiClient = new ApiClient(apiClientConfiguration); + } + } + + public int getHostIndex() { + return localHostIndex; + } + + public void setHostIndex(int hostIndex) { + this.localHostIndex = hostIndex; + } + + public String getCustomBaseUrl() { + return localCustomBaseUrl; + } + + public void setCustomBaseUrl(String customBaseUrl) { + this.localCustomBaseUrl = customBaseUrl; + } + + /** + * Build call for dbtConnection + * + * @param connectionName Name of the connection. (required) + * @param databaseName Name of the Database. (required) + * @param importType Mention type of Import (optional, default to DBT_CLOUD) + * @param accessToken Access token is mandatory when Import_Type is DBT_CLOUD. (optional) + * @param dbtUrl DBT URL is mandatory when Import_Type is DBT_CLOUD. (optional) + * @param accountId Account ID is mandatory when Import_Type is DBT_CLOUD (optional) + * @param projectId Project ID is mandatory when Import_Type is DBT_CLOUD (optional) + * @param dbtEnvId DBT Environment ID\\\" (optional) + * @param projectName Name of the project (optional) + * @param fileContent Upload DBT Manifest and Catalog artifact files as a ZIP file. This field + * is Mandatory when Import Type is 'ZIP_FILE' (optional) + * @param _callback Callback for upload/download progress + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 Succesfully created DBT Connection. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public okhttp3.Call dbtConnectionCall( + String connectionName, + String databaseName, + String importType, + String accessToken, + String dbtUrl, + String accountId, + String projectId, + String dbtEnvId, + String projectName, + File fileContent, + final ApiCallback _callback) + throws ApiException { + String basePath = null; + // Operation Servers + String[] localBasePaths = new String[] {}; + + // Determine Base Path to Use + if (localCustomBaseUrl != null) { + basePath = localCustomBaseUrl; + } else if (localBasePaths.length > 0) { + basePath = localBasePaths[localHostIndex]; + } else { + basePath = null; + } + + Object localVarPostBody = null; + + // create path and map variables + String localVarPath = "/api/rest/2.0/dbt/dbt-connection"; + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + if (connectionName != null) { + localVarFormParams.put("connection_name", connectionName); + } + + if (databaseName != null) { + localVarFormParams.put("database_name", databaseName); + } + + if (importType != null) { + localVarFormParams.put("import_type", importType); + } + + if (accessToken != null) { + localVarFormParams.put("access_token", accessToken); + } + + if (dbtUrl != null) { + localVarFormParams.put("dbt_url", dbtUrl); + } + + if (accountId != null) { + localVarFormParams.put("account_id", accountId); + } + + if (projectId != null) { + localVarFormParams.put("project_id", projectId); + } + + if (dbtEnvId != null) { + localVarFormParams.put("dbt_env_id", dbtEnvId); + } + + if (projectName != null) { + localVarFormParams.put("project_name", projectName); + } + + if (fileContent != null) { + localVarFormParams.put("file_content", fileContent); + } + + final String[] localVarAccepts = {"application/json"}; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = {"multipart/form-data"}; + final String localVarContentType = + localVarApiClient.selectHeaderContentType(localVarContentTypes); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } + + String[] localVarAuthNames = new String[] {"bearerAuth"}; + return localVarApiClient.buildCall( + basePath, + localVarPath, + "POST", + localVarQueryParams, + localVarCollectionQueryParams, + localVarPostBody, + localVarHeaderParams, + localVarCookieParams, + localVarFormParams, + localVarAuthNames, + _callback); + } + + @SuppressWarnings("rawtypes") + private okhttp3.Call dbtConnectionValidateBeforeCall( + String connectionName, + String databaseName, + String importType, + String accessToken, + String dbtUrl, + String accountId, + String projectId, + String dbtEnvId, + String projectName, + File fileContent, + final ApiCallback _callback) + throws ApiException { + // verify the required parameter 'connectionName' is set + if (connectionName == null) { + throw new ApiException( + "Missing the required parameter 'connectionName' when calling" + + " dbtConnection(Async)"); + } + + // verify the required parameter 'databaseName' is set + if (databaseName == null) { + throw new ApiException( + "Missing the required parameter 'databaseName' when calling" + + " dbtConnection(Async)"); + } + + return dbtConnectionCall( + connectionName, + databaseName, + importType, + accessToken, + dbtUrl, + accountId, + projectId, + dbtEnvId, + projectName, + fileContent, + _callback); + } + + /** + * Version: 9.9.0.cl or later Creates a DBT connection object in ThoughtSpot. Requires + * `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege or + * `DATAMANAGEMENT` (**Can manage data**) privilege. If [Role-Based Access Control + * (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the + * following Data control privileges may be required: - + * `CAN_MANAGE_CUSTOM_CALENDAR`(**Can manage custom calendars**) - + * `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) - + * `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` (**Can manage data models**) #### About create + * DBT connection DBT connection in ThoughtSpot is used by the user to define DBT credentials + * for cloud . The API needs embrace connection, embrace database name, DBT url, import type, + * DBT account identifier, DBT project identifier, DBT access token and environment details (or) + * embrace connection, embrace database name, import type, file_content to create a connection + * object. To know more about DBT, see ThoughtSpot Product Documentation. + * + * @param connectionName Name of the connection. (required) + * @param databaseName Name of the Database. (required) + * @param importType Mention type of Import (optional, default to DBT_CLOUD) + * @param accessToken Access token is mandatory when Import_Type is DBT_CLOUD. (optional) + * @param dbtUrl DBT URL is mandatory when Import_Type is DBT_CLOUD. (optional) + * @param accountId Account ID is mandatory when Import_Type is DBT_CLOUD (optional) + * @param projectId Project ID is mandatory when Import_Type is DBT_CLOUD (optional) + * @param dbtEnvId DBT Environment ID\\\" (optional) + * @param projectName Name of the project (optional) + * @param fileContent Upload DBT Manifest and Catalog artifact files as a ZIP file. This field + * is Mandatory when Import Type is 'ZIP_FILE' (optional) + * @return Object + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the + * response body + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 Succesfully created DBT Connection. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public Object dbtConnection( + String connectionName, + String databaseName, + String importType, + String accessToken, + String dbtUrl, + String accountId, + String projectId, + String dbtEnvId, + String projectName, + File fileContent) + throws ApiException { + ApiResponse localVarResp = + dbtConnectionWithHttpInfo( + connectionName, + databaseName, + importType, + accessToken, + dbtUrl, + accountId, + projectId, + dbtEnvId, + projectName, + fileContent); + return localVarResp.getData(); + } + + /** + * Version: 9.9.0.cl or later Creates a DBT connection object in ThoughtSpot. Requires + * `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege or + * `DATAMANAGEMENT` (**Can manage data**) privilege. If [Role-Based Access Control + * (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the + * following Data control privileges may be required: - + * `CAN_MANAGE_CUSTOM_CALENDAR`(**Can manage custom calendars**) - + * `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) - + * `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` (**Can manage data models**) #### About create + * DBT connection DBT connection in ThoughtSpot is used by the user to define DBT credentials + * for cloud . The API needs embrace connection, embrace database name, DBT url, import type, + * DBT account identifier, DBT project identifier, DBT access token and environment details (or) + * embrace connection, embrace database name, import type, file_content to create a connection + * object. To know more about DBT, see ThoughtSpot Product Documentation. + * + * @param connectionName Name of the connection. (required) + * @param databaseName Name of the Database. (required) + * @param importType Mention type of Import (optional, default to DBT_CLOUD) + * @param accessToken Access token is mandatory when Import_Type is DBT_CLOUD. (optional) + * @param dbtUrl DBT URL is mandatory when Import_Type is DBT_CLOUD. (optional) + * @param accountId Account ID is mandatory when Import_Type is DBT_CLOUD (optional) + * @param projectId Project ID is mandatory when Import_Type is DBT_CLOUD (optional) + * @param dbtEnvId DBT Environment ID\\\" (optional) + * @param projectName Name of the project (optional) + * @param fileContent Upload DBT Manifest and Catalog artifact files as a ZIP file. This field + * is Mandatory when Import Type is 'ZIP_FILE' (optional) + * @return ApiResponse<Object> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the + * response body + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 Succesfully created DBT Connection. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public ApiResponse dbtConnectionWithHttpInfo( + String connectionName, + String databaseName, + String importType, + String accessToken, + String dbtUrl, + String accountId, + String projectId, + String dbtEnvId, + String projectName, + File fileContent) + throws ApiException { + okhttp3.Call localVarCall = + dbtConnectionValidateBeforeCall( + connectionName, + databaseName, + importType, + accessToken, + dbtUrl, + accountId, + projectId, + dbtEnvId, + projectName, + fileContent, + null); + Type localVarReturnType = new TypeToken() {}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); + } + + /** + * (asynchronously) Version: 9.9.0.cl or later Creates a DBT connection object in ThoughtSpot. + * Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege or + * `DATAMANAGEMENT` (**Can manage data**) privilege. If [Role-Based Access Control + * (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the + * following Data control privileges may be required: - + * `CAN_MANAGE_CUSTOM_CALENDAR`(**Can manage custom calendars**) - + * `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) - + * `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` (**Can manage data models**) #### About create + * DBT connection DBT connection in ThoughtSpot is used by the user to define DBT credentials + * for cloud . The API needs embrace connection, embrace database name, DBT url, import type, + * DBT account identifier, DBT project identifier, DBT access token and environment details (or) + * embrace connection, embrace database name, import type, file_content to create a connection + * object. To know more about DBT, see ThoughtSpot Product Documentation. + * + * @param connectionName Name of the connection. (required) + * @param databaseName Name of the Database. (required) + * @param importType Mention type of Import (optional, default to DBT_CLOUD) + * @param accessToken Access token is mandatory when Import_Type is DBT_CLOUD. (optional) + * @param dbtUrl DBT URL is mandatory when Import_Type is DBT_CLOUD. (optional) + * @param accountId Account ID is mandatory when Import_Type is DBT_CLOUD (optional) + * @param projectId Project ID is mandatory when Import_Type is DBT_CLOUD (optional) + * @param dbtEnvId DBT Environment ID\\\" (optional) + * @param projectName Name of the project (optional) + * @param fileContent Upload DBT Manifest and Catalog artifact files as a ZIP file. This field + * is Mandatory when Import Type is 'ZIP_FILE' (optional) + * @param _callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body + * object + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 Succesfully created DBT Connection. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public okhttp3.Call dbtConnectionAsync( + String connectionName, + String databaseName, + String importType, + String accessToken, + String dbtUrl, + String accountId, + String projectId, + String dbtEnvId, + String projectName, + File fileContent, + final ApiCallback _callback) + throws ApiException { + + okhttp3.Call localVarCall = + dbtConnectionValidateBeforeCall( + connectionName, + databaseName, + importType, + accessToken, + dbtUrl, + accountId, + projectId, + dbtEnvId, + projectName, + fileContent, + _callback); + Type localVarReturnType = new TypeToken() {}.getType(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; + } + /** + * Build call for dbtGenerateSyncTml + * + * @param dbtConnectionIdentifier Unique ID of the DBT connection. (required) + * @param fileContent Upload DBT Manifest and Catalog artifact files as a ZIP file. This field + * is mandatory if the connection was created with import_type ‘ZIP_FILE’ (optional) + * @param _callback Callback for upload/download progress + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 Sync Table and Worksheet TML's are successfully generated. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public okhttp3.Call dbtGenerateSyncTmlCall( + String dbtConnectionIdentifier, File fileContent, final ApiCallback _callback) + throws ApiException { + String basePath = null; + // Operation Servers + String[] localBasePaths = new String[] {}; + + // Determine Base Path to Use + if (localCustomBaseUrl != null) { + basePath = localCustomBaseUrl; + } else if (localBasePaths.length > 0) { + basePath = localBasePaths[localHostIndex]; + } else { + basePath = null; + } + + Object localVarPostBody = null; + + // create path and map variables + String localVarPath = "/api/rest/2.0/dbt/generate-sync-tml"; + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + if (dbtConnectionIdentifier != null) { + localVarFormParams.put("dbt_connection_identifier", dbtConnectionIdentifier); + } + + if (fileContent != null) { + localVarFormParams.put("file_content", fileContent); + } + + final String[] localVarAccepts = {"application/json"}; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = {"multipart/form-data"}; + final String localVarContentType = + localVarApiClient.selectHeaderContentType(localVarContentTypes); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } + + String[] localVarAuthNames = new String[] {"bearerAuth"}; + return localVarApiClient.buildCall( + basePath, + localVarPath, + "POST", + localVarQueryParams, + localVarCollectionQueryParams, + localVarPostBody, + localVarHeaderParams, + localVarCookieParams, + localVarFormParams, + localVarAuthNames, + _callback); + } + + @SuppressWarnings("rawtypes") + private okhttp3.Call dbtGenerateSyncTmlValidateBeforeCall( + String dbtConnectionIdentifier, File fileContent, final ApiCallback _callback) + throws ApiException { + // verify the required parameter 'dbtConnectionIdentifier' is set + if (dbtConnectionIdentifier == null) { + throw new ApiException( + "Missing the required parameter 'dbtConnectionIdentifier' when calling" + + " dbtGenerateSyncTml(Async)"); + } + + return dbtGenerateSyncTmlCall(dbtConnectionIdentifier, fileContent, _callback); + } + + /** + * Version: 9.9.0.cl or later Resynchronize the existing list of models, tables, worksheet tml’s + * and import them to Thoughtspot based on the DBT connection object. Requires + * `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege or + * `DATAMANAGEMENT` (**Can manage data**) privilege, along with an existing DBT + * connection. If [Role-Based Access Control + * (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the + * following data control privileges may be required: - + * `CAN_MANAGE_CUSTOM_CALENDAR`(**Can manage custom calendars**) - + * `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) - + * `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` (**Can manage data models**) + * + * @param dbtConnectionIdentifier Unique ID of the DBT connection. (required) + * @param fileContent Upload DBT Manifest and Catalog artifact files as a ZIP file. This field + * is mandatory if the connection was created with import_type ‘ZIP_FILE’ (optional) + * @return Object + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the + * response body + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 Sync Table and Worksheet TML's are successfully generated. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public Object dbtGenerateSyncTml(String dbtConnectionIdentifier, File fileContent) + throws ApiException { + ApiResponse localVarResp = + dbtGenerateSyncTmlWithHttpInfo(dbtConnectionIdentifier, fileContent); + return localVarResp.getData(); + } + + /** + * Version: 9.9.0.cl or later Resynchronize the existing list of models, tables, worksheet tml’s + * and import them to Thoughtspot based on the DBT connection object. Requires + * `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege or + * `DATAMANAGEMENT` (**Can manage data**) privilege, along with an existing DBT + * connection. If [Role-Based Access Control + * (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the + * following data control privileges may be required: - + * `CAN_MANAGE_CUSTOM_CALENDAR`(**Can manage custom calendars**) - + * `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) - + * `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` (**Can manage data models**) + * + * @param dbtConnectionIdentifier Unique ID of the DBT connection. (required) + * @param fileContent Upload DBT Manifest and Catalog artifact files as a ZIP file. This field + * is mandatory if the connection was created with import_type ‘ZIP_FILE’ (optional) + * @return ApiResponse<Object> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the + * response body + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 Sync Table and Worksheet TML's are successfully generated. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public ApiResponse dbtGenerateSyncTmlWithHttpInfo( + String dbtConnectionIdentifier, File fileContent) throws ApiException { + okhttp3.Call localVarCall = + dbtGenerateSyncTmlValidateBeforeCall(dbtConnectionIdentifier, fileContent, null); + Type localVarReturnType = new TypeToken() {}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); + } + + /** + * (asynchronously) Version: 9.9.0.cl or later Resynchronize the existing list of models, + * tables, worksheet tml’s and import them to Thoughtspot based on the DBT connection object. + * Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege or + * `DATAMANAGEMENT` (**Can manage data**) privilege, along with an existing DBT + * connection. If [Role-Based Access Control + * (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the + * following data control privileges may be required: - + * `CAN_MANAGE_CUSTOM_CALENDAR`(**Can manage custom calendars**) - + * `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) - + * `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` (**Can manage data models**) + * + * @param dbtConnectionIdentifier Unique ID of the DBT connection. (required) + * @param fileContent Upload DBT Manifest and Catalog artifact files as a ZIP file. This field + * is mandatory if the connection was created with import_type ‘ZIP_FILE’ (optional) + * @param _callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body + * object + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 Sync Table and Worksheet TML's are successfully generated. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public okhttp3.Call dbtGenerateSyncTmlAsync( + String dbtConnectionIdentifier, File fileContent, final ApiCallback _callback) + throws ApiException { + + okhttp3.Call localVarCall = + dbtGenerateSyncTmlValidateBeforeCall( + dbtConnectionIdentifier, fileContent, _callback); + Type localVarReturnType = new TypeToken() {}.getType(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; + } + /** + * Build call for dbtGenerateTml + * + * @param dbtConnectionIdentifier Unique ID of the DBT connection. (required) + * @param modelTables List of Models and their respective Tables Example: + * '[{\\\"model_name\\\": \\\"model_name\\\", + * \\\"tables\\\": [\\\"table_name\\\"]}]' (required) + * @param importWorksheets Mention the worksheet tmls to import (required) + * @param worksheets List of worksheets is mandatory when import_Worksheets is type SELECTED + * Example: [\\\"worksheet_name\\\"] (optional) + * @param fileContent Upload DBT Manifest and Catalog artifact files as a ZIP file. This field + * is mandatory if the connection was created with import_type ‘ZIP_FILE’ (optional) + * @param _callback Callback for upload/download progress + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 Required Table and Worksheet TML's are successfully generated. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public okhttp3.Call dbtGenerateTmlCall( + String dbtConnectionIdentifier, + String modelTables, + String importWorksheets, + String worksheets, + File fileContent, + final ApiCallback _callback) + throws ApiException { + String basePath = null; + // Operation Servers + String[] localBasePaths = new String[] {}; + + // Determine Base Path to Use + if (localCustomBaseUrl != null) { + basePath = localCustomBaseUrl; + } else if (localBasePaths.length > 0) { + basePath = localBasePaths[localHostIndex]; + } else { + basePath = null; + } + + Object localVarPostBody = null; + + // create path and map variables + String localVarPath = "/api/rest/2.0/dbt/generate-tml"; + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + if (dbtConnectionIdentifier != null) { + localVarFormParams.put("dbt_connection_identifier", dbtConnectionIdentifier); + } + + if (modelTables != null) { + localVarFormParams.put("model_tables", modelTables); + } + + if (importWorksheets != null) { + localVarFormParams.put("import_worksheets", importWorksheets); + } + + if (worksheets != null) { + localVarFormParams.put("worksheets", worksheets); + } + + if (fileContent != null) { + localVarFormParams.put("file_content", fileContent); + } + + final String[] localVarAccepts = {"application/json"}; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = {"multipart/form-data"}; + final String localVarContentType = + localVarApiClient.selectHeaderContentType(localVarContentTypes); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } + + String[] localVarAuthNames = new String[] {"bearerAuth"}; + return localVarApiClient.buildCall( + basePath, + localVarPath, + "POST", + localVarQueryParams, + localVarCollectionQueryParams, + localVarPostBody, + localVarHeaderParams, + localVarCookieParams, + localVarFormParams, + localVarAuthNames, + _callback); + } + + @SuppressWarnings("rawtypes") + private okhttp3.Call dbtGenerateTmlValidateBeforeCall( + String dbtConnectionIdentifier, + String modelTables, + String importWorksheets, + String worksheets, + File fileContent, + final ApiCallback _callback) + throws ApiException { + // verify the required parameter 'dbtConnectionIdentifier' is set + if (dbtConnectionIdentifier == null) { + throw new ApiException( + "Missing the required parameter 'dbtConnectionIdentifier' when calling" + + " dbtGenerateTml(Async)"); + } + + // verify the required parameter 'modelTables' is set + if (modelTables == null) { + throw new ApiException( + "Missing the required parameter 'modelTables' when calling" + + " dbtGenerateTml(Async)"); + } + + // verify the required parameter 'importWorksheets' is set + if (importWorksheets == null) { + throw new ApiException( + "Missing the required parameter 'importWorksheets' when calling" + + " dbtGenerateTml(Async)"); + } + + return dbtGenerateTmlCall( + dbtConnectionIdentifier, + modelTables, + importWorksheets, + worksheets, + fileContent, + _callback); + } + + /** + * Version: 9.9.0.cl or later Generate required table and worksheet and import them. Requires + * `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege or + * `DATAMANAGEMENT` (**Can manage data**) privilege, along with an existing DBT + * connection. If [Role-Based Access Control + * (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the + * following data control privileges may be required: - + * `CAN_MANAGE_CUSTOM_CALENDAR`(**Can manage custom calendars**) - + * `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) - + * `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` (**Can manage data models**) #### About + * generate TML Models and Worksheets to be imported can be selected by the user as part of the + * API. + * + * @param dbtConnectionIdentifier Unique ID of the DBT connection. (required) + * @param modelTables List of Models and their respective Tables Example: + * '[{\\\"model_name\\\": \\\"model_name\\\", + * \\\"tables\\\": [\\\"table_name\\\"]}]' (required) + * @param importWorksheets Mention the worksheet tmls to import (required) + * @param worksheets List of worksheets is mandatory when import_Worksheets is type SELECTED + * Example: [\\\"worksheet_name\\\"] (optional) + * @param fileContent Upload DBT Manifest and Catalog artifact files as a ZIP file. This field + * is mandatory if the connection was created with import_type ‘ZIP_FILE’ (optional) + * @return Object + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the + * response body + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 Required Table and Worksheet TML's are successfully generated. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public Object dbtGenerateTml( + String dbtConnectionIdentifier, + String modelTables, + String importWorksheets, + String worksheets, + File fileContent) + throws ApiException { + ApiResponse localVarResp = + dbtGenerateTmlWithHttpInfo( + dbtConnectionIdentifier, + modelTables, + importWorksheets, + worksheets, + fileContent); + return localVarResp.getData(); + } + + /** + * Version: 9.9.0.cl or later Generate required table and worksheet and import them. Requires + * `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege or + * `DATAMANAGEMENT` (**Can manage data**) privilege, along with an existing DBT + * connection. If [Role-Based Access Control + * (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the + * following data control privileges may be required: - + * `CAN_MANAGE_CUSTOM_CALENDAR`(**Can manage custom calendars**) - + * `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) - + * `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` (**Can manage data models**) #### About + * generate TML Models and Worksheets to be imported can be selected by the user as part of the + * API. + * + * @param dbtConnectionIdentifier Unique ID of the DBT connection. (required) + * @param modelTables List of Models and their respective Tables Example: + * '[{\\\"model_name\\\": \\\"model_name\\\", + * \\\"tables\\\": [\\\"table_name\\\"]}]' (required) + * @param importWorksheets Mention the worksheet tmls to import (required) + * @param worksheets List of worksheets is mandatory when import_Worksheets is type SELECTED + * Example: [\\\"worksheet_name\\\"] (optional) + * @param fileContent Upload DBT Manifest and Catalog artifact files as a ZIP file. This field + * is mandatory if the connection was created with import_type ‘ZIP_FILE’ (optional) + * @return ApiResponse<Object> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the + * response body + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 Required Table and Worksheet TML's are successfully generated. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public ApiResponse dbtGenerateTmlWithHttpInfo( + String dbtConnectionIdentifier, + String modelTables, + String importWorksheets, + String worksheets, + File fileContent) + throws ApiException { + okhttp3.Call localVarCall = + dbtGenerateTmlValidateBeforeCall( + dbtConnectionIdentifier, + modelTables, + importWorksheets, + worksheets, + fileContent, + null); + Type localVarReturnType = new TypeToken() {}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); + } + + /** + * (asynchronously) Version: 9.9.0.cl or later Generate required table and worksheet and import + * them. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege or + * `DATAMANAGEMENT` (**Can manage data**) privilege, along with an existing DBT + * connection. If [Role-Based Access Control + * (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the + * following data control privileges may be required: - + * `CAN_MANAGE_CUSTOM_CALENDAR`(**Can manage custom calendars**) - + * `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) - + * `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` (**Can manage data models**) #### About + * generate TML Models and Worksheets to be imported can be selected by the user as part of the + * API. + * + * @param dbtConnectionIdentifier Unique ID of the DBT connection. (required) + * @param modelTables List of Models and their respective Tables Example: + * '[{\\\"model_name\\\": \\\"model_name\\\", + * \\\"tables\\\": [\\\"table_name\\\"]}]' (required) + * @param importWorksheets Mention the worksheet tmls to import (required) + * @param worksheets List of worksheets is mandatory when import_Worksheets is type SELECTED + * Example: [\\\"worksheet_name\\\"] (optional) + * @param fileContent Upload DBT Manifest and Catalog artifact files as a ZIP file. This field + * is mandatory if the connection was created with import_type ‘ZIP_FILE’ (optional) + * @param _callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body + * object + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 Required Table and Worksheet TML's are successfully generated. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public okhttp3.Call dbtGenerateTmlAsync( + String dbtConnectionIdentifier, + String modelTables, + String importWorksheets, + String worksheets, + File fileContent, + final ApiCallback _callback) + throws ApiException { + + okhttp3.Call localVarCall = + dbtGenerateTmlValidateBeforeCall( + dbtConnectionIdentifier, + modelTables, + importWorksheets, + worksheets, + fileContent, + _callback); + Type localVarReturnType = new TypeToken() {}.getType(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; + } + /** + * Build call for dbtSearch + * + * @param _callback Callback for upload/download progress + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 Retrieved list of DBT connections successfully. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public okhttp3.Call dbtSearchCall(final ApiCallback _callback) throws ApiException { + String basePath = null; + // Operation Servers + String[] localBasePaths = new String[] {}; + + // Determine Base Path to Use + if (localCustomBaseUrl != null) { + basePath = localCustomBaseUrl; + } else if (localBasePaths.length > 0) { + basePath = localBasePaths[localHostIndex]; + } else { + basePath = null; + } + + Object localVarPostBody = null; + + // create path and map variables + String localVarPath = "/api/rest/2.0/dbt/search"; + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + final String[] localVarAccepts = {"application/json"}; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = {}; + final String localVarContentType = + localVarApiClient.selectHeaderContentType(localVarContentTypes); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } + + String[] localVarAuthNames = new String[] {"bearerAuth"}; + return localVarApiClient.buildCall( + basePath, + localVarPath, + "POST", + localVarQueryParams, + localVarCollectionQueryParams, + localVarPostBody, + localVarHeaderParams, + localVarCookieParams, + localVarFormParams, + localVarAuthNames, + _callback); + } + + @SuppressWarnings("rawtypes") + private okhttp3.Call dbtSearchValidateBeforeCall(final ApiCallback _callback) + throws ApiException { + return dbtSearchCall(_callback); + } + + /** + * Version: 9.9.0.cl or later Gets a list of DBT connection objects by user and organization, + * available on the ThoughtSpot system. Requires `ADMINISTRATION` (**Can administer + * ThoughtSpot**) privilege or `DATAMANAGEMENT` (**Can manage data**) privilege. If + * [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled + * on your instance, the following Data control privileges may be required: - + * `CAN_MANAGE_CUSTOM_CALENDAR`(**Can manage custom calendars**) - + * `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) - + * `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` (**Can manage data models**) #### About search + * DBT connection To get details of a specific DBT connection identifier, database connection + * identifier, database connection name, database name, project name, project identifier, + * environment identifier , import type and author. + * + * @return List<DbtSearchResponse> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the + * response body + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 Retrieved list of DBT connections successfully. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public List dbtSearch() throws ApiException { + ApiResponse> localVarResp = dbtSearchWithHttpInfo(); + return localVarResp.getData(); + } + + /** + * Version: 9.9.0.cl or later Gets a list of DBT connection objects by user and organization, + * available on the ThoughtSpot system. Requires `ADMINISTRATION` (**Can administer + * ThoughtSpot**) privilege or `DATAMANAGEMENT` (**Can manage data**) privilege. If + * [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled + * on your instance, the following Data control privileges may be required: - + * `CAN_MANAGE_CUSTOM_CALENDAR`(**Can manage custom calendars**) - + * `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) - + * `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` (**Can manage data models**) #### About search + * DBT connection To get details of a specific DBT connection identifier, database connection + * identifier, database connection name, database name, project name, project identifier, + * environment identifier , import type and author. + * + * @return ApiResponse<List<DbtSearchResponse>> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the + * response body + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 Retrieved list of DBT connections successfully. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public ApiResponse> dbtSearchWithHttpInfo() throws ApiException { + okhttp3.Call localVarCall = dbtSearchValidateBeforeCall(null); + Type localVarReturnType = new TypeToken>() {}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); + } + + /** + * (asynchronously) Version: 9.9.0.cl or later Gets a list of DBT connection objects by user and + * organization, available on the ThoughtSpot system. Requires `ADMINISTRATION` (**Can + * administer ThoughtSpot**) privilege or `DATAMANAGEMENT` (**Can manage data**) + * privilege. If [Role-Based Access Control + * (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the + * following Data control privileges may be required: - + * `CAN_MANAGE_CUSTOM_CALENDAR`(**Can manage custom calendars**) - + * `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) - + * `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` (**Can manage data models**) #### About search + * DBT connection To get details of a specific DBT connection identifier, database connection + * identifier, database connection name, database name, project name, project identifier, + * environment identifier , import type and author. + * + * @param _callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body + * object + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 Retrieved list of DBT connections successfully. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public okhttp3.Call dbtSearchAsync(final ApiCallback> _callback) + throws ApiException { + + okhttp3.Call localVarCall = dbtSearchValidateBeforeCall(_callback); + Type localVarReturnType = new TypeToken>() {}.getType(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; + } + /** + * Build call for deleteDbtConnection + * + * @param dbtConnectionIdentifier Unique ID of the DBT Connection. (required) + * @param _callback Callback for upload/download progress + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
204 DBT Connection successfully deleted. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public okhttp3.Call deleteDbtConnectionCall( + String dbtConnectionIdentifier, final ApiCallback _callback) throws ApiException { + String basePath = null; + // Operation Servers + String[] localBasePaths = new String[] {}; + + // Determine Base Path to Use + if (localCustomBaseUrl != null) { + basePath = localCustomBaseUrl; + } else if (localBasePaths.length > 0) { + basePath = localBasePaths[localHostIndex]; + } else { + basePath = null; + } + + Object localVarPostBody = null; + + // create path and map variables + String localVarPath = + "/api/rest/2.0/dbt/{dbt_connection_identifier}/delete" + .replace( + "{" + "dbt_connection_identifier" + "}", + localVarApiClient.escapeString(dbtConnectionIdentifier.toString())); + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + final String[] localVarAccepts = {"application/json"}; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = {}; + final String localVarContentType = + localVarApiClient.selectHeaderContentType(localVarContentTypes); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } + + String[] localVarAuthNames = new String[] {"bearerAuth"}; + return localVarApiClient.buildCall( + basePath, + localVarPath, + "POST", + localVarQueryParams, + localVarCollectionQueryParams, + localVarPostBody, + localVarHeaderParams, + localVarCookieParams, + localVarFormParams, + localVarAuthNames, + _callback); + } + + @SuppressWarnings("rawtypes") + private okhttp3.Call deleteDbtConnectionValidateBeforeCall( + String dbtConnectionIdentifier, final ApiCallback _callback) throws ApiException { + // verify the required parameter 'dbtConnectionIdentifier' is set + if (dbtConnectionIdentifier == null) { + throw new ApiException( + "Missing the required parameter 'dbtConnectionIdentifier' when calling" + + " deleteDbtConnection(Async)"); + } + + return deleteDbtConnectionCall(dbtConnectionIdentifier, _callback); + } + + /** + * Version: 9.9.0.cl or later Removes the specified DBT connection object from the ThoughtSpot + * system. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) or + * `DATAMANAGEMENT` (**Can manage data ThoughtSpot**) privilege. If [Role-Based Access + * Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, + * the following Data control privileges may be required: - + * `CAN_MANAGE_CUSTOM_CALENDAR`(**Can manage custom calendars**) - + * `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) - + * `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` (**Can manage data models**) + * + * @param dbtConnectionIdentifier Unique ID of the DBT Connection. (required) + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the + * response body + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
204 DBT Connection successfully deleted. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public void deleteDbtConnection(String dbtConnectionIdentifier) throws ApiException { + deleteDbtConnectionWithHttpInfo(dbtConnectionIdentifier); + } + + /** + * Version: 9.9.0.cl or later Removes the specified DBT connection object from the ThoughtSpot + * system. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) or + * `DATAMANAGEMENT` (**Can manage data ThoughtSpot**) privilege. If [Role-Based Access + * Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, + * the following Data control privileges may be required: - + * `CAN_MANAGE_CUSTOM_CALENDAR`(**Can manage custom calendars**) - + * `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) - + * `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` (**Can manage data models**) + * + * @param dbtConnectionIdentifier Unique ID of the DBT Connection. (required) + * @return ApiResponse<Void> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the + * response body + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
204 DBT Connection successfully deleted. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public ApiResponse deleteDbtConnectionWithHttpInfo(String dbtConnectionIdentifier) + throws ApiException { + okhttp3.Call localVarCall = + deleteDbtConnectionValidateBeforeCall(dbtConnectionIdentifier, null); + return localVarApiClient.execute(localVarCall); + } + + /** + * (asynchronously) Version: 9.9.0.cl or later Removes the specified DBT connection object from + * the ThoughtSpot system. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) + * or `DATAMANAGEMENT` (**Can manage data ThoughtSpot**) privilege. If [Role-Based + * Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your + * instance, the following Data control privileges may be required: - + * `CAN_MANAGE_CUSTOM_CALENDAR`(**Can manage custom calendars**) - + * `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) - + * `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` (**Can manage data models**) + * + * @param dbtConnectionIdentifier Unique ID of the DBT Connection. (required) + * @param _callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body + * object + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
204 DBT Connection successfully deleted. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public okhttp3.Call deleteDbtConnectionAsync( + String dbtConnectionIdentifier, final ApiCallback _callback) throws ApiException { + + okhttp3.Call localVarCall = + deleteDbtConnectionValidateBeforeCall(dbtConnectionIdentifier, _callback); + localVarApiClient.executeAsync(localVarCall, _callback); + return localVarCall; + } + /** + * Build call for updateDbtConnection + * + * @param dbtConnectionIdentifier Unique ID of the DBT Connection. (required) + * @param connectionName Name of the connection. (optional) + * @param databaseName Name of the Database. (optional) + * @param importType Mention type of Import (optional, default to DBT_CLOUD) + * @param accessToken Access token is mandatory when Import_Type is DBT_CLOUD. (optional) + * @param dbtUrl DBT URL is mandatory when Import_Type is DBT_CLOUD. (optional) + * @param accountId Account ID is mandatory when Import_Type is DBT_CLOUD (optional) + * @param projectId Project ID is mandatory when Import_Type is DBT_CLOUD (optional) + * @param dbtEnvId DBT Environment ID\\\" (optional) + * @param projectName Name of the project (optional) + * @param fileContent Upload DBT Manifest and Catalog artifact files as a ZIP file. This field + * is Mandatory when Import Type is 'ZIP_FILE' (optional) + * @param _callback Callback for upload/download progress + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 DBT Connection successfully updated. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public okhttp3.Call updateDbtConnectionCall( + String dbtConnectionIdentifier, + String connectionName, + String databaseName, + String importType, + String accessToken, + String dbtUrl, + String accountId, + String projectId, + String dbtEnvId, + String projectName, + File fileContent, + final ApiCallback _callback) + throws ApiException { + String basePath = null; + // Operation Servers + String[] localBasePaths = new String[] {}; + + // Determine Base Path to Use + if (localCustomBaseUrl != null) { + basePath = localCustomBaseUrl; + } else if (localBasePaths.length > 0) { + basePath = localBasePaths[localHostIndex]; + } else { + basePath = null; + } + + Object localVarPostBody = null; + + // create path and map variables + String localVarPath = "/api/rest/2.0/dbt/update-dbt-connection"; + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + if (dbtConnectionIdentifier != null) { + localVarFormParams.put("dbt_connection_identifier", dbtConnectionIdentifier); + } + + if (connectionName != null) { + localVarFormParams.put("connection_name", connectionName); + } + + if (databaseName != null) { + localVarFormParams.put("database_name", databaseName); + } + + if (importType != null) { + localVarFormParams.put("import_type", importType); + } + + if (accessToken != null) { + localVarFormParams.put("access_token", accessToken); + } + + if (dbtUrl != null) { + localVarFormParams.put("dbt_url", dbtUrl); + } + + if (accountId != null) { + localVarFormParams.put("account_id", accountId); + } + + if (projectId != null) { + localVarFormParams.put("project_id", projectId); + } + + if (dbtEnvId != null) { + localVarFormParams.put("dbt_env_id", dbtEnvId); + } + + if (projectName != null) { + localVarFormParams.put("project_name", projectName); + } + + if (fileContent != null) { + localVarFormParams.put("file_content", fileContent); + } + + final String[] localVarAccepts = {"application/json"}; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = {"multipart/form-data"}; + final String localVarContentType = + localVarApiClient.selectHeaderContentType(localVarContentTypes); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } + + String[] localVarAuthNames = new String[] {"bearerAuth"}; + return localVarApiClient.buildCall( + basePath, + localVarPath, + "POST", + localVarQueryParams, + localVarCollectionQueryParams, + localVarPostBody, + localVarHeaderParams, + localVarCookieParams, + localVarFormParams, + localVarAuthNames, + _callback); + } + + @SuppressWarnings("rawtypes") + private okhttp3.Call updateDbtConnectionValidateBeforeCall( + String dbtConnectionIdentifier, + String connectionName, + String databaseName, + String importType, + String accessToken, + String dbtUrl, + String accountId, + String projectId, + String dbtEnvId, + String projectName, + File fileContent, + final ApiCallback _callback) + throws ApiException { + // verify the required parameter 'dbtConnectionIdentifier' is set + if (dbtConnectionIdentifier == null) { + throw new ApiException( + "Missing the required parameter 'dbtConnectionIdentifier' when calling" + + " updateDbtConnection(Async)"); + } + + return updateDbtConnectionCall( + dbtConnectionIdentifier, + connectionName, + databaseName, + importType, + accessToken, + dbtUrl, + accountId, + projectId, + dbtEnvId, + projectName, + fileContent, + _callback); + } + + /** + * Version: 9.9.0.cl or later Updates a DBT connection object. Requires + * `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege or + * `DATAMANAGEMENT` (**Can manage data ThoughtSpot**) privilege, along with an + * existing DBT connection. If [Role-Based Access Control + * (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the + * following data control privileges may be required: - + * `CAN_MANAGE_CUSTOM_CALENDAR`(**Can manage custom calendars**) - + * `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) - + * `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` (**Can manage data models**) #### About update + * DBT connection You can modify DBT connection object properties such as embrace connection + * name, embrace database name, import type, account identifier, access token, project + * identifier and environment (or) embrace connection, embrace database name, import type, + * file_content settings. + * + * @param dbtConnectionIdentifier Unique ID of the DBT Connection. (required) + * @param connectionName Name of the connection. (optional) + * @param databaseName Name of the Database. (optional) + * @param importType Mention type of Import (optional, default to DBT_CLOUD) + * @param accessToken Access token is mandatory when Import_Type is DBT_CLOUD. (optional) + * @param dbtUrl DBT URL is mandatory when Import_Type is DBT_CLOUD. (optional) + * @param accountId Account ID is mandatory when Import_Type is DBT_CLOUD (optional) + * @param projectId Project ID is mandatory when Import_Type is DBT_CLOUD (optional) + * @param dbtEnvId DBT Environment ID\\\" (optional) + * @param projectName Name of the project (optional) + * @param fileContent Upload DBT Manifest and Catalog artifact files as a ZIP file. This field + * is Mandatory when Import Type is 'ZIP_FILE' (optional) + * @return Object + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the + * response body + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 DBT Connection successfully updated. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public Object updateDbtConnection( + String dbtConnectionIdentifier, + String connectionName, + String databaseName, + String importType, + String accessToken, + String dbtUrl, + String accountId, + String projectId, + String dbtEnvId, + String projectName, + File fileContent) + throws ApiException { + ApiResponse localVarResp = + updateDbtConnectionWithHttpInfo( + dbtConnectionIdentifier, + connectionName, + databaseName, + importType, + accessToken, + dbtUrl, + accountId, + projectId, + dbtEnvId, + projectName, + fileContent); + return localVarResp.getData(); + } + + /** + * Version: 9.9.0.cl or later Updates a DBT connection object. Requires + * `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege or + * `DATAMANAGEMENT` (**Can manage data ThoughtSpot**) privilege, along with an + * existing DBT connection. If [Role-Based Access Control + * (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the + * following data control privileges may be required: - + * `CAN_MANAGE_CUSTOM_CALENDAR`(**Can manage custom calendars**) - + * `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) - + * `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` (**Can manage data models**) #### About update + * DBT connection You can modify DBT connection object properties such as embrace connection + * name, embrace database name, import type, account identifier, access token, project + * identifier and environment (or) embrace connection, embrace database name, import type, + * file_content settings. + * + * @param dbtConnectionIdentifier Unique ID of the DBT Connection. (required) + * @param connectionName Name of the connection. (optional) + * @param databaseName Name of the Database. (optional) + * @param importType Mention type of Import (optional, default to DBT_CLOUD) + * @param accessToken Access token is mandatory when Import_Type is DBT_CLOUD. (optional) + * @param dbtUrl DBT URL is mandatory when Import_Type is DBT_CLOUD. (optional) + * @param accountId Account ID is mandatory when Import_Type is DBT_CLOUD (optional) + * @param projectId Project ID is mandatory when Import_Type is DBT_CLOUD (optional) + * @param dbtEnvId DBT Environment ID\\\" (optional) + * @param projectName Name of the project (optional) + * @param fileContent Upload DBT Manifest and Catalog artifact files as a ZIP file. This field + * is Mandatory when Import Type is 'ZIP_FILE' (optional) + * @return ApiResponse<Object> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the + * response body + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 DBT Connection successfully updated. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public ApiResponse updateDbtConnectionWithHttpInfo( + String dbtConnectionIdentifier, + String connectionName, + String databaseName, + String importType, + String accessToken, + String dbtUrl, + String accountId, + String projectId, + String dbtEnvId, + String projectName, + File fileContent) + throws ApiException { + okhttp3.Call localVarCall = + updateDbtConnectionValidateBeforeCall( + dbtConnectionIdentifier, + connectionName, + databaseName, + importType, + accessToken, + dbtUrl, + accountId, + projectId, + dbtEnvId, + projectName, + fileContent, + null); + Type localVarReturnType = new TypeToken() {}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); + } + + /** + * (asynchronously) Version: 9.9.0.cl or later Updates a DBT connection object. Requires + * `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege or + * `DATAMANAGEMENT` (**Can manage data ThoughtSpot**) privilege, along with an + * existing DBT connection. If [Role-Based Access Control + * (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the + * following data control privileges may be required: - + * `CAN_MANAGE_CUSTOM_CALENDAR`(**Can manage custom calendars**) - + * `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) - + * `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` (**Can manage data models**) #### About update + * DBT connection You can modify DBT connection object properties such as embrace connection + * name, embrace database name, import type, account identifier, access token, project + * identifier and environment (or) embrace connection, embrace database name, import type, + * file_content settings. + * + * @param dbtConnectionIdentifier Unique ID of the DBT Connection. (required) + * @param connectionName Name of the connection. (optional) + * @param databaseName Name of the Database. (optional) + * @param importType Mention type of Import (optional, default to DBT_CLOUD) + * @param accessToken Access token is mandatory when Import_Type is DBT_CLOUD. (optional) + * @param dbtUrl DBT URL is mandatory when Import_Type is DBT_CLOUD. (optional) + * @param accountId Account ID is mandatory when Import_Type is DBT_CLOUD (optional) + * @param projectId Project ID is mandatory when Import_Type is DBT_CLOUD (optional) + * @param dbtEnvId DBT Environment ID\\\" (optional) + * @param projectName Name of the project (optional) + * @param fileContent Upload DBT Manifest and Catalog artifact files as a ZIP file. This field + * is Mandatory when Import Type is 'ZIP_FILE' (optional) + * @param _callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body + * object + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 DBT Connection successfully updated. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public okhttp3.Call updateDbtConnectionAsync( + String dbtConnectionIdentifier, + String connectionName, + String databaseName, + String importType, + String accessToken, + String dbtUrl, + String accountId, + String projectId, + String dbtEnvId, + String projectName, + File fileContent, + final ApiCallback _callback) + throws ApiException { + + okhttp3.Call localVarCall = + updateDbtConnectionValidateBeforeCall( + dbtConnectionIdentifier, + connectionName, + databaseName, + importType, + accessToken, + dbtUrl, + accountId, + projectId, + dbtEnvId, + projectName, + fileContent, + _callback); + Type localVarReturnType = new TypeToken() {}.getType(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; + } +} diff --git a/sdks/java/src/main/java/com/thoughtspot/client/api/EmailCustomizationApi.java b/sdks/java/src/main/java/com/thoughtspot/client/api/EmailCustomizationApi.java new file mode 100644 index 000000000..81363ee37 --- /dev/null +++ b/sdks/java/src/main/java/com/thoughtspot/client/api/EmailCustomizationApi.java @@ -0,0 +1,1317 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client.api; + +import com.google.gson.reflect.TypeToken; +import com.thoughtspot.client.ApiCallback; +import com.thoughtspot.client.ApiClient; +import com.thoughtspot.client.ApiClientConfiguration; +import com.thoughtspot.client.ApiException; +import com.thoughtspot.client.ApiResponse; +import com.thoughtspot.client.Configuration; +import com.thoughtspot.client.Pair; +import com.thoughtspot.client.model.CreateEmailCustomizationRequest; +import com.thoughtspot.client.model.CreateEmailCustomizationResponse; +import com.thoughtspot.client.model.DeleteOrgEmailCustomizationRequest; +import com.thoughtspot.client.model.SearchEmailCustomizationRequest; +import com.thoughtspot.client.model.UpdateEmailCustomizationRequest; +import java.lang.reflect.Type; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +@javax.annotation.Generated( + value = "org.openapitools.codegen.languages.JavaClientCodegen", + comments = "Generator version: 7.12.0") +public class EmailCustomizationApi { + private ApiClient localVarApiClient; + private ApiClientConfiguration localVarApiClientConfiguration; + private int localHostIndex; + private String localCustomBaseUrl; + + public EmailCustomizationApi() { + this(Configuration.getDefaultApiClient()); + } + + public EmailCustomizationApi(ApiClient apiClient) { + this.localVarApiClient = apiClient; + } + + public EmailCustomizationApi(ApiClientConfiguration apiClientConfiguration) { + this.localVarApiClientConfiguration = apiClientConfiguration; + this.localVarApiClient = new ApiClient(apiClientConfiguration); + } + + public ApiClient getApiClient() { + return localVarApiClient; + } + + public void setApiClient(ApiClient apiClient) { + this.localVarApiClient = apiClient; + } + + public ApiClientConfiguration getApiClientConfiguration() { + return localVarApiClientConfiguration; + } + + public void applyApiClientConfiguration(ApiClientConfiguration apiClientConfiguration) { + this.localVarApiClientConfiguration = apiClientConfiguration; + if (localVarApiClient != null) { + localVarApiClient.applyApiClientConfiguration(apiClientConfiguration); + } else { + localVarApiClient = new ApiClient(apiClientConfiguration); + } + } + + public int getHostIndex() { + return localHostIndex; + } + + public void setHostIndex(int hostIndex) { + this.localHostIndex = hostIndex; + } + + public String getCustomBaseUrl() { + return localCustomBaseUrl; + } + + public void setCustomBaseUrl(String customBaseUrl) { + this.localCustomBaseUrl = customBaseUrl; + } + + /** + * Build call for createEmailCustomization + * + * @param createEmailCustomizationRequest (required) + * @param _callback Callback for upload/download progress + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + * @http.response.details + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 OK -
400 Invalid request. -
403 Unauthorized access. -
500 Unexpected error -
+ */ + public okhttp3.Call createEmailCustomizationCall( + CreateEmailCustomizationRequest createEmailCustomizationRequest, + final ApiCallback _callback) + throws ApiException { + String basePath = null; + // Operation Servers + String[] localBasePaths = new String[] {}; + + // Determine Base Path to Use + if (localCustomBaseUrl != null) { + basePath = localCustomBaseUrl; + } else if (localBasePaths.length > 0) { + basePath = localBasePaths[localHostIndex]; + } else { + basePath = null; + } + + Object localVarPostBody = createEmailCustomizationRequest; + + // create path and map variables + String localVarPath = "/api/rest/2.0/customization/email"; + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + final String[] localVarAccepts = {"application/json"}; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = {"application/json"}; + final String localVarContentType = + localVarApiClient.selectHeaderContentType(localVarContentTypes); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } + + String[] localVarAuthNames = new String[] {"bearerAuth"}; + return localVarApiClient.buildCall( + basePath, + localVarPath, + "POST", + localVarQueryParams, + localVarCollectionQueryParams, + localVarPostBody, + localVarHeaderParams, + localVarCookieParams, + localVarFormParams, + localVarAuthNames, + _callback); + } + + @SuppressWarnings("rawtypes") + private okhttp3.Call createEmailCustomizationValidateBeforeCall( + CreateEmailCustomizationRequest createEmailCustomizationRequest, + final ApiCallback _callback) + throws ApiException { + // verify the required parameter 'createEmailCustomizationRequest' is set + if (createEmailCustomizationRequest == null) { + throw new ApiException( + "Missing the required parameter 'createEmailCustomizationRequest' when calling" + + " createEmailCustomization(Async)"); + } + + return createEmailCustomizationCall(createEmailCustomizationRequest, _callback); + } + + /** + * Version: 10.10.0.cl or later Creates a customization configuration for the notification + * email. #### Pre-requisites Requires `DEVELOPER` (**has developer privilege**) or + * `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access + * Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, + * the `DEVELOPER` (**Has developer privilege**) privilege is required. **NOTE**:This + * endpoint in currently in beta. Contact ThoughtSpot support to enable this on your instance. + * #### Usage guidelines To create a custom configuration pass these parameters in your API + * request: - A JSON map of configuration attributes `template_properties`. The + * following example shows a sample set of customization configuration: ``` { { + * \"cta_button_bg_color\": \"#444DEA\", \"cta_text_font_color\": + * \"#FFFFFF\", \"primary_bg_color\": \"#D3DEF0\", + * \"logo_url\": + * \"https://storage.pardot.com/710713/1642089901EbkRibJq/TS_fullworkmark_darkmode.png\", + * \"font_family\": \"\", \"product_name\": + * \"ThoughtSpot\", \"footer_address\": \"444 Castro St, Suite 1000 + * Mountain View, CA 94041\", \"footer_phone\": \"(800) 508-7008\", + * \"replacement_value_for_liveboard\": \"Dashboard\", + * \"replacement_value_for_answer\": \"Chart\", + * \"replacement_value_for_spot_iq\": \"AI Insights\", + * \"hide_footer_phone\": false, \"hide_footer_address\": false, + * \"hide_product_name\": false, \"hide_manage_notification\": false, + * \"hide_mobile_app_nudge\": false, \"hide_privacy_policy\": false, + * \"hide_ts_vocabulary_definitions\": false, \"hide_error_message\": false, + * \"hide_unsubscribe_link\": false, \"hide_notification_status\": false, + * \"hide_modify_alert\": false, \"company_website_url\": + * \"https://your-website.com/\", \"company_privacy_policy_url\" : + * \"https://link-to-privacy-policy.com/\", \"contact_support_url\": + * \"https://link-to-contact-support.com/\", \"hide_contact_support_url\": + * false, \"hide_logo_url\" : false } } ``` + * + * @param createEmailCustomizationRequest (required) + * @return CreateEmailCustomizationResponse + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the + * response body + * @http.response.details + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 OK -
400 Invalid request. -
403 Unauthorized access. -
500 Unexpected error -
+ */ + public CreateEmailCustomizationResponse createEmailCustomization( + CreateEmailCustomizationRequest createEmailCustomizationRequest) throws ApiException { + ApiResponse localVarResp = + createEmailCustomizationWithHttpInfo(createEmailCustomizationRequest); + return localVarResp.getData(); + } + + /** + * Version: 10.10.0.cl or later Creates a customization configuration for the notification + * email. #### Pre-requisites Requires `DEVELOPER` (**has developer privilege**) or + * `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access + * Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, + * the `DEVELOPER` (**Has developer privilege**) privilege is required. **NOTE**:This + * endpoint in currently in beta. Contact ThoughtSpot support to enable this on your instance. + * #### Usage guidelines To create a custom configuration pass these parameters in your API + * request: - A JSON map of configuration attributes `template_properties`. The + * following example shows a sample set of customization configuration: ``` { { + * \"cta_button_bg_color\": \"#444DEA\", \"cta_text_font_color\": + * \"#FFFFFF\", \"primary_bg_color\": \"#D3DEF0\", + * \"logo_url\": + * \"https://storage.pardot.com/710713/1642089901EbkRibJq/TS_fullworkmark_darkmode.png\", + * \"font_family\": \"\", \"product_name\": + * \"ThoughtSpot\", \"footer_address\": \"444 Castro St, Suite 1000 + * Mountain View, CA 94041\", \"footer_phone\": \"(800) 508-7008\", + * \"replacement_value_for_liveboard\": \"Dashboard\", + * \"replacement_value_for_answer\": \"Chart\", + * \"replacement_value_for_spot_iq\": \"AI Insights\", + * \"hide_footer_phone\": false, \"hide_footer_address\": false, + * \"hide_product_name\": false, \"hide_manage_notification\": false, + * \"hide_mobile_app_nudge\": false, \"hide_privacy_policy\": false, + * \"hide_ts_vocabulary_definitions\": false, \"hide_error_message\": false, + * \"hide_unsubscribe_link\": false, \"hide_notification_status\": false, + * \"hide_modify_alert\": false, \"company_website_url\": + * \"https://your-website.com/\", \"company_privacy_policy_url\" : + * \"https://link-to-privacy-policy.com/\", \"contact_support_url\": + * \"https://link-to-contact-support.com/\", \"hide_contact_support_url\": + * false, \"hide_logo_url\" : false } } ``` + * + * @param createEmailCustomizationRequest (required) + * @return ApiResponse<CreateEmailCustomizationResponse> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the + * response body + * @http.response.details + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 OK -
400 Invalid request. -
403 Unauthorized access. -
500 Unexpected error -
+ */ + public ApiResponse createEmailCustomizationWithHttpInfo( + CreateEmailCustomizationRequest createEmailCustomizationRequest) throws ApiException { + okhttp3.Call localVarCall = + createEmailCustomizationValidateBeforeCall(createEmailCustomizationRequest, null); + Type localVarReturnType = new TypeToken() {}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); + } + + /** + * (asynchronously) Version: 10.10.0.cl or later Creates a customization configuration for the + * notification email. #### Pre-requisites Requires `DEVELOPER` (**has developer + * privilege**) or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If + * [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled + * on your instance, the `DEVELOPER` (**Has developer privilege**) privilege is + * required. **NOTE**:This endpoint in currently in beta. Contact ThoughtSpot support to enable + * this on your instance. #### Usage guidelines To create a custom configuration pass these + * parameters in your API request: - A JSON map of configuration attributes + * `template_properties`. The following example shows a sample set of customization + * configuration: ``` { { \"cta_button_bg_color\": + * \"#444DEA\", \"cta_text_font_color\": \"#FFFFFF\", + * \"primary_bg_color\": \"#D3DEF0\", \"logo_url\": + * \"https://storage.pardot.com/710713/1642089901EbkRibJq/TS_fullworkmark_darkmode.png\", + * \"font_family\": \"\", \"product_name\": + * \"ThoughtSpot\", \"footer_address\": \"444 Castro St, Suite 1000 + * Mountain View, CA 94041\", \"footer_phone\": \"(800) 508-7008\", + * \"replacement_value_for_liveboard\": \"Dashboard\", + * \"replacement_value_for_answer\": \"Chart\", + * \"replacement_value_for_spot_iq\": \"AI Insights\", + * \"hide_footer_phone\": false, \"hide_footer_address\": false, + * \"hide_product_name\": false, \"hide_manage_notification\": false, + * \"hide_mobile_app_nudge\": false, \"hide_privacy_policy\": false, + * \"hide_ts_vocabulary_definitions\": false, \"hide_error_message\": false, + * \"hide_unsubscribe_link\": false, \"hide_notification_status\": false, + * \"hide_modify_alert\": false, \"company_website_url\": + * \"https://your-website.com/\", \"company_privacy_policy_url\" : + * \"https://link-to-privacy-policy.com/\", \"contact_support_url\": + * \"https://link-to-contact-support.com/\", \"hide_contact_support_url\": + * false, \"hide_logo_url\" : false } } ``` + * + * @param createEmailCustomizationRequest (required) + * @param _callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body + * object + * @http.response.details + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 OK -
400 Invalid request. -
403 Unauthorized access. -
500 Unexpected error -
+ */ + public okhttp3.Call createEmailCustomizationAsync( + CreateEmailCustomizationRequest createEmailCustomizationRequest, + final ApiCallback _callback) + throws ApiException { + + okhttp3.Call localVarCall = + createEmailCustomizationValidateBeforeCall( + createEmailCustomizationRequest, _callback); + Type localVarReturnType = new TypeToken() {}.getType(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; + } + /** + * Build call for deleteEmailCustomization + * + * @param templateIdentifier Unique ID or name of the email customization. (required) + * @param _callback Callback for upload/download progress + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + * @http.response.details + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
204 Email Customization configuration successfully deleted. -
400 Invalid request. -
403 Unauthorized access. -
500 Unexpected error -
+ * + * @deprecated + */ + @Deprecated + public okhttp3.Call deleteEmailCustomizationCall( + String templateIdentifier, final ApiCallback _callback) throws ApiException { + String basePath = null; + // Operation Servers + String[] localBasePaths = new String[] {}; + + // Determine Base Path to Use + if (localCustomBaseUrl != null) { + basePath = localCustomBaseUrl; + } else if (localBasePaths.length > 0) { + basePath = localBasePaths[localHostIndex]; + } else { + basePath = null; + } + + Object localVarPostBody = null; + + // create path and map variables + String localVarPath = + "/api/rest/2.0/customization/email/{template_identifier}/delete" + .replace( + "{" + "template_identifier" + "}", + localVarApiClient.escapeString(templateIdentifier.toString())); + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + final String[] localVarAccepts = {"application/json"}; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = {}; + final String localVarContentType = + localVarApiClient.selectHeaderContentType(localVarContentTypes); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } + + String[] localVarAuthNames = new String[] {"bearerAuth"}; + return localVarApiClient.buildCall( + basePath, + localVarPath, + "POST", + localVarQueryParams, + localVarCollectionQueryParams, + localVarPostBody, + localVarHeaderParams, + localVarCookieParams, + localVarFormParams, + localVarAuthNames, + _callback); + } + + @Deprecated + @SuppressWarnings("rawtypes") + private okhttp3.Call deleteEmailCustomizationValidateBeforeCall( + String templateIdentifier, final ApiCallback _callback) throws ApiException { + // verify the required parameter 'templateIdentifier' is set + if (templateIdentifier == null) { + throw new ApiException( + "Missing the required parameter 'templateIdentifier' when calling" + + " deleteEmailCustomization(Async)"); + } + + return deleteEmailCustomizationCall(templateIdentifier, _callback); + } + + /** + * Version: 10.10.0.cl or later Deletes the configuration for the email customization. #### + * Pre-requisites Requires `DEVELOPER` (**has developer privilege**) or + * `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access + * Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, + * the `DEVELOPER` (**Has developer privilege**) privilege is required. **NOTE**:This + * endpoint in currently in beta. Contact ThoughtSpot support to enable this on your instance. + * #### Usage guidelines - Call the search API endpoint to get the + * `template_identifier` from the response. - Use that `template_identifier` + * as a parameter in this API request. + * + * @param templateIdentifier Unique ID or name of the email customization. (required) + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the + * response body + * @http.response.details + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
204 Email Customization configuration successfully deleted. -
400 Invalid request. -
403 Unauthorized access. -
500 Unexpected error -
+ * + * @deprecated + */ + @Deprecated + public void deleteEmailCustomization(String templateIdentifier) throws ApiException { + deleteEmailCustomizationWithHttpInfo(templateIdentifier); + } + + /** + * Version: 10.10.0.cl or later Deletes the configuration for the email customization. #### + * Pre-requisites Requires `DEVELOPER` (**has developer privilege**) or + * `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access + * Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, + * the `DEVELOPER` (**Has developer privilege**) privilege is required. **NOTE**:This + * endpoint in currently in beta. Contact ThoughtSpot support to enable this on your instance. + * #### Usage guidelines - Call the search API endpoint to get the + * `template_identifier` from the response. - Use that `template_identifier` + * as a parameter in this API request. + * + * @param templateIdentifier Unique ID or name of the email customization. (required) + * @return ApiResponse<Void> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the + * response body + * @http.response.details + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
204 Email Customization configuration successfully deleted. -
400 Invalid request. -
403 Unauthorized access. -
500 Unexpected error -
+ * + * @deprecated + */ + @Deprecated + public ApiResponse deleteEmailCustomizationWithHttpInfo(String templateIdentifier) + throws ApiException { + okhttp3.Call localVarCall = + deleteEmailCustomizationValidateBeforeCall(templateIdentifier, null); + return localVarApiClient.execute(localVarCall); + } + + /** + * (asynchronously) Version: 10.10.0.cl or later Deletes the configuration for the email + * customization. #### Pre-requisites Requires `DEVELOPER` (**has developer + * privilege**) or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If + * [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled + * on your instance, the `DEVELOPER` (**Has developer privilege**) privilege is + * required. **NOTE**:This endpoint in currently in beta. Contact ThoughtSpot support to enable + * this on your instance. #### Usage guidelines - Call the search API endpoint to get the + * `template_identifier` from the response. - Use that `template_identifier` + * as a parameter in this API request. + * + * @param templateIdentifier Unique ID or name of the email customization. (required) + * @param _callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body + * object + * @http.response.details + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
204 Email Customization configuration successfully deleted. -
400 Invalid request. -
403 Unauthorized access. -
500 Unexpected error -
+ * + * @deprecated + */ + @Deprecated + public okhttp3.Call deleteEmailCustomizationAsync( + String templateIdentifier, final ApiCallback _callback) throws ApiException { + + okhttp3.Call localVarCall = + deleteEmailCustomizationValidateBeforeCall(templateIdentifier, _callback); + localVarApiClient.executeAsync(localVarCall, _callback); + return localVarCall; + } + /** + * Build call for deleteOrgEmailCustomization + * + * @param deleteOrgEmailCustomizationRequest (required) + * @param _callback Callback for upload/download progress + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
204 Email Customization configuration successfully deleted. -
400 Invalid request. -
401 Unauthorized access. -
403 Unauthorized access. -
500 Unexpected error -
+ */ + public okhttp3.Call deleteOrgEmailCustomizationCall( + DeleteOrgEmailCustomizationRequest deleteOrgEmailCustomizationRequest, + final ApiCallback _callback) + throws ApiException { + String basePath = null; + // Operation Servers + String[] localBasePaths = new String[] {}; + + // Determine Base Path to Use + if (localCustomBaseUrl != null) { + basePath = localCustomBaseUrl; + } else if (localBasePaths.length > 0) { + basePath = localBasePaths[localHostIndex]; + } else { + basePath = null; + } + + Object localVarPostBody = deleteOrgEmailCustomizationRequest; + + // create path and map variables + String localVarPath = "/api/rest/2.0/customization/email/delete"; + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + final String[] localVarAccepts = {"application/json"}; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = {"application/json"}; + final String localVarContentType = + localVarApiClient.selectHeaderContentType(localVarContentTypes); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } + + String[] localVarAuthNames = new String[] {"bearerAuth"}; + return localVarApiClient.buildCall( + basePath, + localVarPath, + "POST", + localVarQueryParams, + localVarCollectionQueryParams, + localVarPostBody, + localVarHeaderParams, + localVarCookieParams, + localVarFormParams, + localVarAuthNames, + _callback); + } + + @SuppressWarnings("rawtypes") + private okhttp3.Call deleteOrgEmailCustomizationValidateBeforeCall( + DeleteOrgEmailCustomizationRequest deleteOrgEmailCustomizationRequest, + final ApiCallback _callback) + throws ApiException { + // verify the required parameter 'deleteOrgEmailCustomizationRequest' is set + if (deleteOrgEmailCustomizationRequest == null) { + throw new ApiException( + "Missing the required parameter 'deleteOrgEmailCustomizationRequest' when" + + " calling deleteOrgEmailCustomization(Async)"); + } + + return deleteOrgEmailCustomizationCall(deleteOrgEmailCustomizationRequest, _callback); + } + + /** + * Version: 10.12.0.cl or later Deletes the configuration for the email customization. #### + * Pre-requisites Requires `DEVELOPER` (**has developer privilege**) or + * `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access + * Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, + * the `DEVELOPER` (**Has developer privilege**) privilege is required. **NOTE**:This + * endpoint in currently in beta. Contact ThoughtSpot support to enable this on your instance. + * #### Usage guidelines - Call the search API endpoint to get the `org_identifier` + * from the response. - Use that `org_identifier` as a parameter in this API request. + * + * @param deleteOrgEmailCustomizationRequest (required) + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the + * response body + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
204 Email Customization configuration successfully deleted. -
400 Invalid request. -
401 Unauthorized access. -
403 Unauthorized access. -
500 Unexpected error -
+ */ + public void deleteOrgEmailCustomization( + DeleteOrgEmailCustomizationRequest deleteOrgEmailCustomizationRequest) + throws ApiException { + deleteOrgEmailCustomizationWithHttpInfo(deleteOrgEmailCustomizationRequest); + } + + /** + * Version: 10.12.0.cl or later Deletes the configuration for the email customization. #### + * Pre-requisites Requires `DEVELOPER` (**has developer privilege**) or + * `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access + * Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, + * the `DEVELOPER` (**Has developer privilege**) privilege is required. **NOTE**:This + * endpoint in currently in beta. Contact ThoughtSpot support to enable this on your instance. + * #### Usage guidelines - Call the search API endpoint to get the `org_identifier` + * from the response. - Use that `org_identifier` as a parameter in this API request. + * + * @param deleteOrgEmailCustomizationRequest (required) + * @return ApiResponse<Void> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the + * response body + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
204 Email Customization configuration successfully deleted. -
400 Invalid request. -
401 Unauthorized access. -
403 Unauthorized access. -
500 Unexpected error -
+ */ + public ApiResponse deleteOrgEmailCustomizationWithHttpInfo( + DeleteOrgEmailCustomizationRequest deleteOrgEmailCustomizationRequest) + throws ApiException { + okhttp3.Call localVarCall = + deleteOrgEmailCustomizationValidateBeforeCall( + deleteOrgEmailCustomizationRequest, null); + return localVarApiClient.execute(localVarCall); + } + + /** + * (asynchronously) Version: 10.12.0.cl or later Deletes the configuration for the email + * customization. #### Pre-requisites Requires `DEVELOPER` (**has developer + * privilege**) or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If + * [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled + * on your instance, the `DEVELOPER` (**Has developer privilege**) privilege is + * required. **NOTE**:This endpoint in currently in beta. Contact ThoughtSpot support to enable + * this on your instance. #### Usage guidelines - Call the search API endpoint to get the + * `org_identifier` from the response. - Use that `org_identifier` as a + * parameter in this API request. + * + * @param deleteOrgEmailCustomizationRequest (required) + * @param _callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body + * object + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
204 Email Customization configuration successfully deleted. -
400 Invalid request. -
401 Unauthorized access. -
403 Unauthorized access. -
500 Unexpected error -
+ */ + public okhttp3.Call deleteOrgEmailCustomizationAsync( + DeleteOrgEmailCustomizationRequest deleteOrgEmailCustomizationRequest, + final ApiCallback _callback) + throws ApiException { + + okhttp3.Call localVarCall = + deleteOrgEmailCustomizationValidateBeforeCall( + deleteOrgEmailCustomizationRequest, _callback); + localVarApiClient.executeAsync(localVarCall, _callback); + return localVarCall; + } + /** + * Build call for searchEmailCustomization + * + * @param searchEmailCustomizationRequest (required) + * @param _callback Callback for upload/download progress + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + * @http.response.details + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 OK -
400 Invalid request. -
403 Unauthorized access. -
500 Unexpected error -
+ */ + public okhttp3.Call searchEmailCustomizationCall( + SearchEmailCustomizationRequest searchEmailCustomizationRequest, + final ApiCallback _callback) + throws ApiException { + String basePath = null; + // Operation Servers + String[] localBasePaths = new String[] {}; + + // Determine Base Path to Use + if (localCustomBaseUrl != null) { + basePath = localCustomBaseUrl; + } else if (localBasePaths.length > 0) { + basePath = localBasePaths[localHostIndex]; + } else { + basePath = null; + } + + Object localVarPostBody = searchEmailCustomizationRequest; + + // create path and map variables + String localVarPath = "/api/rest/2.0/customization/email/search"; + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + final String[] localVarAccepts = {"application/json"}; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = {"application/json"}; + final String localVarContentType = + localVarApiClient.selectHeaderContentType(localVarContentTypes); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } + + String[] localVarAuthNames = new String[] {"bearerAuth"}; + return localVarApiClient.buildCall( + basePath, + localVarPath, + "POST", + localVarQueryParams, + localVarCollectionQueryParams, + localVarPostBody, + localVarHeaderParams, + localVarCookieParams, + localVarFormParams, + localVarAuthNames, + _callback); + } + + @SuppressWarnings("rawtypes") + private okhttp3.Call searchEmailCustomizationValidateBeforeCall( + SearchEmailCustomizationRequest searchEmailCustomizationRequest, + final ApiCallback _callback) + throws ApiException { + // verify the required parameter 'searchEmailCustomizationRequest' is set + if (searchEmailCustomizationRequest == null) { + throw new ApiException( + "Missing the required parameter 'searchEmailCustomizationRequest' when calling" + + " searchEmailCustomization(Async)"); + } + + return searchEmailCustomizationCall(searchEmailCustomizationRequest, _callback); + } + + /** + * Version: 10.10.0.cl or later Search the email customization configuration if any set for the + * ThoughtSpot system. #### Pre-requisites Requires `DEVELOPER` (**has developer + * privilege**) or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If + * [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled + * on your instance, the `DEVELOPER` (**Has developer privilege**) privilege is + * required. **NOTE**:This endpoint in currently in beta. Contact ThoughtSpot support to enable + * this on your instance. + * + * @param searchEmailCustomizationRequest (required) + * @return List<CreateEmailCustomizationResponse> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the + * response body + * @http.response.details + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 OK -
400 Invalid request. -
403 Unauthorized access. -
500 Unexpected error -
+ */ + public List searchEmailCustomization( + SearchEmailCustomizationRequest searchEmailCustomizationRequest) throws ApiException { + ApiResponse> localVarResp = + searchEmailCustomizationWithHttpInfo(searchEmailCustomizationRequest); + return localVarResp.getData(); + } + + /** + * Version: 10.10.0.cl or later Search the email customization configuration if any set for the + * ThoughtSpot system. #### Pre-requisites Requires `DEVELOPER` (**has developer + * privilege**) or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If + * [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled + * on your instance, the `DEVELOPER` (**Has developer privilege**) privilege is + * required. **NOTE**:This endpoint in currently in beta. Contact ThoughtSpot support to enable + * this on your instance. + * + * @param searchEmailCustomizationRequest (required) + * @return ApiResponse<List<CreateEmailCustomizationResponse>> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the + * response body + * @http.response.details + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 OK -
400 Invalid request. -
403 Unauthorized access. -
500 Unexpected error -
+ */ + public ApiResponse> searchEmailCustomizationWithHttpInfo( + SearchEmailCustomizationRequest searchEmailCustomizationRequest) throws ApiException { + okhttp3.Call localVarCall = + searchEmailCustomizationValidateBeforeCall(searchEmailCustomizationRequest, null); + Type localVarReturnType = + new TypeToken>() {}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); + } + + /** + * (asynchronously) Version: 10.10.0.cl or later Search the email customization configuration if + * any set for the ThoughtSpot system. #### Pre-requisites Requires `DEVELOPER` (**has + * developer privilege**) or `ADMINISTRATION` (**Can administer ThoughtSpot**) + * privilege. If [Role-Based Access Control + * (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the + * `DEVELOPER` (**Has developer privilege**) privilege is required. **NOTE**:This + * endpoint in currently in beta. Contact ThoughtSpot support to enable this on your instance. + * + * @param searchEmailCustomizationRequest (required) + * @param _callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body + * object + * @http.response.details + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 OK -
400 Invalid request. -
403 Unauthorized access. -
500 Unexpected error -
+ */ + public okhttp3.Call searchEmailCustomizationAsync( + SearchEmailCustomizationRequest searchEmailCustomizationRequest, + final ApiCallback> _callback) + throws ApiException { + + okhttp3.Call localVarCall = + searchEmailCustomizationValidateBeforeCall( + searchEmailCustomizationRequest, _callback); + Type localVarReturnType = + new TypeToken>() {}.getType(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; + } + /** + * Build call for updateEmailCustomization + * + * @param updateEmailCustomizationRequest (required) + * @param _callback Callback for upload/download progress + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
204 Email Customization configuration successfully updated. -
400 Invalid request. -
401 Unauthorized access. -
403 Unauthorized access. -
500 Unexpected error -
+ */ + public okhttp3.Call updateEmailCustomizationCall( + UpdateEmailCustomizationRequest updateEmailCustomizationRequest, + final ApiCallback _callback) + throws ApiException { + String basePath = null; + // Operation Servers + String[] localBasePaths = new String[] {}; + + // Determine Base Path to Use + if (localCustomBaseUrl != null) { + basePath = localCustomBaseUrl; + } else if (localBasePaths.length > 0) { + basePath = localBasePaths[localHostIndex]; + } else { + basePath = null; + } + + Object localVarPostBody = updateEmailCustomizationRequest; + + // create path and map variables + String localVarPath = "/api/rest/2.0/customization/email/update"; + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + final String[] localVarAccepts = {"application/json"}; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = {"application/json"}; + final String localVarContentType = + localVarApiClient.selectHeaderContentType(localVarContentTypes); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } + + String[] localVarAuthNames = new String[] {"bearerAuth"}; + return localVarApiClient.buildCall( + basePath, + localVarPath, + "POST", + localVarQueryParams, + localVarCollectionQueryParams, + localVarPostBody, + localVarHeaderParams, + localVarCookieParams, + localVarFormParams, + localVarAuthNames, + _callback); + } + + @SuppressWarnings("rawtypes") + private okhttp3.Call updateEmailCustomizationValidateBeforeCall( + UpdateEmailCustomizationRequest updateEmailCustomizationRequest, + final ApiCallback _callback) + throws ApiException { + // verify the required parameter 'updateEmailCustomizationRequest' is set + if (updateEmailCustomizationRequest == null) { + throw new ApiException( + "Missing the required parameter 'updateEmailCustomizationRequest' when calling" + + " updateEmailCustomization(Async)"); + } + + return updateEmailCustomizationCall(updateEmailCustomizationRequest, _callback); + } + + /** + * Version: 10.12.0.cl or later Updates a customization configuration for the notification + * email. #### Pre-requisites Requires `DEVELOPER` (**has developer privilege**) or + * `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access + * Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, + * the `DEVELOPER` (**Has developer privilege**) privilege is required. **NOTE**:This + * endpoint in currently in beta. Contact ThoughtSpot support to enable this on your instance. + * #### Usage guidelines To update a custom configuration pass these parameters in your API + * request: - A JSON map of configuration attributes `template_properties`. The + * following example shows a sample set of customization configuration: ``` { { + * \"cta_button_bg_color\": \"#444DEA\", \"cta_text_font_color\": + * \"#FFFFFF\", \"primary_bg_color\": \"#D3DEF0\", + * \"logo_url\": + * \"https://storage.pardot.com/710713/1642089901EbkRibJq/TS_fullworkmark_darkmode.png\", + * \"font_family\": \"\", \"product_name\": + * \"ThoughtSpot\", \"footer_address\": \"444 Castro St, Suite 1000 + * Mountain View, CA 94041\", \"footer_phone\": \"(800) 508-7008\", + * \"replacement_value_for_liveboard\": \"Dashboard\", + * \"replacement_value_for_answer\": \"Chart\", + * \"replacement_value_for_spot_iq\": \"AI Insights\", + * \"hide_footer_phone\": false, \"hide_footer_address\": false, + * \"hide_product_name\": false, \"hide_manage_notification\": false, + * \"hide_mobile_app_nudge\": false, \"hide_privacy_policy\": false, + * \"hide_ts_vocabulary_definitions\": false, \"hide_error_message\": false, + * \"hide_unsubscribe_link\": false, \"hide_notification_status\": false, + * \"hide_modify_alert\": false, \"company_website_url\": + * \"https://your-website.com/\", \"company_privacy_policy_url\" : + * \"https://link-to-privacy-policy.com/\", \"contact_support_url\": + * \"https://link-to-contact-support.com/\", \"hide_contact_support_url\": + * false, \"hide_logo_url\" : false } } ``` + * + * @param updateEmailCustomizationRequest (required) + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the + * response body + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
204 Email Customization configuration successfully updated. -
400 Invalid request. -
401 Unauthorized access. -
403 Unauthorized access. -
500 Unexpected error -
+ */ + public void updateEmailCustomization( + UpdateEmailCustomizationRequest updateEmailCustomizationRequest) throws ApiException { + updateEmailCustomizationWithHttpInfo(updateEmailCustomizationRequest); + } + + /** + * Version: 10.12.0.cl or later Updates a customization configuration for the notification + * email. #### Pre-requisites Requires `DEVELOPER` (**has developer privilege**) or + * `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access + * Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, + * the `DEVELOPER` (**Has developer privilege**) privilege is required. **NOTE**:This + * endpoint in currently in beta. Contact ThoughtSpot support to enable this on your instance. + * #### Usage guidelines To update a custom configuration pass these parameters in your API + * request: - A JSON map of configuration attributes `template_properties`. The + * following example shows a sample set of customization configuration: ``` { { + * \"cta_button_bg_color\": \"#444DEA\", \"cta_text_font_color\": + * \"#FFFFFF\", \"primary_bg_color\": \"#D3DEF0\", + * \"logo_url\": + * \"https://storage.pardot.com/710713/1642089901EbkRibJq/TS_fullworkmark_darkmode.png\", + * \"font_family\": \"\", \"product_name\": + * \"ThoughtSpot\", \"footer_address\": \"444 Castro St, Suite 1000 + * Mountain View, CA 94041\", \"footer_phone\": \"(800) 508-7008\", + * \"replacement_value_for_liveboard\": \"Dashboard\", + * \"replacement_value_for_answer\": \"Chart\", + * \"replacement_value_for_spot_iq\": \"AI Insights\", + * \"hide_footer_phone\": false, \"hide_footer_address\": false, + * \"hide_product_name\": false, \"hide_manage_notification\": false, + * \"hide_mobile_app_nudge\": false, \"hide_privacy_policy\": false, + * \"hide_ts_vocabulary_definitions\": false, \"hide_error_message\": false, + * \"hide_unsubscribe_link\": false, \"hide_notification_status\": false, + * \"hide_modify_alert\": false, \"company_website_url\": + * \"https://your-website.com/\", \"company_privacy_policy_url\" : + * \"https://link-to-privacy-policy.com/\", \"contact_support_url\": + * \"https://link-to-contact-support.com/\", \"hide_contact_support_url\": + * false, \"hide_logo_url\" : false } } ``` + * + * @param updateEmailCustomizationRequest (required) + * @return ApiResponse<Void> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the + * response body + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
204 Email Customization configuration successfully updated. -
400 Invalid request. -
401 Unauthorized access. -
403 Unauthorized access. -
500 Unexpected error -
+ */ + public ApiResponse updateEmailCustomizationWithHttpInfo( + UpdateEmailCustomizationRequest updateEmailCustomizationRequest) throws ApiException { + okhttp3.Call localVarCall = + updateEmailCustomizationValidateBeforeCall(updateEmailCustomizationRequest, null); + return localVarApiClient.execute(localVarCall); + } + + /** + * (asynchronously) Version: 10.12.0.cl or later Updates a customization configuration for the + * notification email. #### Pre-requisites Requires `DEVELOPER` (**has developer + * privilege**) or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If + * [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled + * on your instance, the `DEVELOPER` (**Has developer privilege**) privilege is + * required. **NOTE**:This endpoint in currently in beta. Contact ThoughtSpot support to enable + * this on your instance. #### Usage guidelines To update a custom configuration pass these + * parameters in your API request: - A JSON map of configuration attributes + * `template_properties`. The following example shows a sample set of customization + * configuration: ``` { { \"cta_button_bg_color\": + * \"#444DEA\", \"cta_text_font_color\": \"#FFFFFF\", + * \"primary_bg_color\": \"#D3DEF0\", \"logo_url\": + * \"https://storage.pardot.com/710713/1642089901EbkRibJq/TS_fullworkmark_darkmode.png\", + * \"font_family\": \"\", \"product_name\": + * \"ThoughtSpot\", \"footer_address\": \"444 Castro St, Suite 1000 + * Mountain View, CA 94041\", \"footer_phone\": \"(800) 508-7008\", + * \"replacement_value_for_liveboard\": \"Dashboard\", + * \"replacement_value_for_answer\": \"Chart\", + * \"replacement_value_for_spot_iq\": \"AI Insights\", + * \"hide_footer_phone\": false, \"hide_footer_address\": false, + * \"hide_product_name\": false, \"hide_manage_notification\": false, + * \"hide_mobile_app_nudge\": false, \"hide_privacy_policy\": false, + * \"hide_ts_vocabulary_definitions\": false, \"hide_error_message\": false, + * \"hide_unsubscribe_link\": false, \"hide_notification_status\": false, + * \"hide_modify_alert\": false, \"company_website_url\": + * \"https://your-website.com/\", \"company_privacy_policy_url\" : + * \"https://link-to-privacy-policy.com/\", \"contact_support_url\": + * \"https://link-to-contact-support.com/\", \"hide_contact_support_url\": + * false, \"hide_logo_url\" : false } } ``` + * + * @param updateEmailCustomizationRequest (required) + * @param _callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body + * object + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
204 Email Customization configuration successfully updated. -
400 Invalid request. -
401 Unauthorized access. -
403 Unauthorized access. -
500 Unexpected error -
+ */ + public okhttp3.Call updateEmailCustomizationAsync( + UpdateEmailCustomizationRequest updateEmailCustomizationRequest, + final ApiCallback _callback) + throws ApiException { + + okhttp3.Call localVarCall = + updateEmailCustomizationValidateBeforeCall( + updateEmailCustomizationRequest, _callback); + localVarApiClient.executeAsync(localVarCall, _callback); + return localVarCall; + } + /** + * Build call for validateEmailCustomization + * + * @param _callback Callback for upload/download progress + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + * @http.response.details + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
204 Triggered test email for customization configuration -
400 Invalid request. -
403 Unauthorized access. -
500 Unexpected error -
+ */ + public okhttp3.Call validateEmailCustomizationCall(final ApiCallback _callback) + throws ApiException { + String basePath = null; + // Operation Servers + String[] localBasePaths = new String[] {}; + + // Determine Base Path to Use + if (localCustomBaseUrl != null) { + basePath = localCustomBaseUrl; + } else if (localBasePaths.length > 0) { + basePath = localBasePaths[localHostIndex]; + } else { + basePath = null; + } + + Object localVarPostBody = null; + + // create path and map variables + String localVarPath = "/api/rest/2.0/customization/email/validate"; + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + final String[] localVarAccepts = {"application/json"}; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = {}; + final String localVarContentType = + localVarApiClient.selectHeaderContentType(localVarContentTypes); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } + + String[] localVarAuthNames = new String[] {"bearerAuth"}; + return localVarApiClient.buildCall( + basePath, + localVarPath, + "POST", + localVarQueryParams, + localVarCollectionQueryParams, + localVarPostBody, + localVarHeaderParams, + localVarCookieParams, + localVarFormParams, + localVarAuthNames, + _callback); + } + + @SuppressWarnings("rawtypes") + private okhttp3.Call validateEmailCustomizationValidateBeforeCall(final ApiCallback _callback) + throws ApiException { + return validateEmailCustomizationCall(_callback); + } + + /** + * Version: 10.10.0.cl or later Validates the email customization configuration if any set for + * the ThoughtSpot system. #### Pre-requisites Requires `DEVELOPER` (**has developer + * privilege**) or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If + * [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled + * on your instance, the `DEVELOPER` (**Has developer privilege**) privilege is + * required. **NOTE**:This endpoint in currently in beta. Contact ThoughtSpot support to enable + * this on your instance. + * + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the + * response body + * @http.response.details + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
204 Triggered test email for customization configuration -
400 Invalid request. -
403 Unauthorized access. -
500 Unexpected error -
+ */ + public void validateEmailCustomization() throws ApiException { + validateEmailCustomizationWithHttpInfo(); + } + + /** + * Version: 10.10.0.cl or later Validates the email customization configuration if any set for + * the ThoughtSpot system. #### Pre-requisites Requires `DEVELOPER` (**has developer + * privilege**) or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If + * [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled + * on your instance, the `DEVELOPER` (**Has developer privilege**) privilege is + * required. **NOTE**:This endpoint in currently in beta. Contact ThoughtSpot support to enable + * this on your instance. + * + * @return ApiResponse<Void> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the + * response body + * @http.response.details + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
204 Triggered test email for customization configuration -
400 Invalid request. -
403 Unauthorized access. -
500 Unexpected error -
+ */ + public ApiResponse validateEmailCustomizationWithHttpInfo() throws ApiException { + okhttp3.Call localVarCall = validateEmailCustomizationValidateBeforeCall(null); + return localVarApiClient.execute(localVarCall); + } + + /** + * (asynchronously) Version: 10.10.0.cl or later Validates the email customization configuration + * if any set for the ThoughtSpot system. #### Pre-requisites Requires `DEVELOPER` + * (**has developer privilege**) or `ADMINISTRATION` (**Can administer ThoughtSpot**) + * privilege. If [Role-Based Access Control + * (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the + * `DEVELOPER` (**Has developer privilege**) privilege is required. **NOTE**:This + * endpoint in currently in beta. Contact ThoughtSpot support to enable this on your instance. + * + * @param _callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body + * object + * @http.response.details + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
204 Triggered test email for customization configuration -
400 Invalid request. -
403 Unauthorized access. -
500 Unexpected error -
+ */ + public okhttp3.Call validateEmailCustomizationAsync(final ApiCallback _callback) + throws ApiException { + + okhttp3.Call localVarCall = validateEmailCustomizationValidateBeforeCall(_callback); + localVarApiClient.executeAsync(localVarCall, _callback); + return localVarCall; + } +} diff --git a/sdks/java/src/main/java/com/thoughtspot/client/api/GroupsApi.java b/sdks/java/src/main/java/com/thoughtspot/client/api/GroupsApi.java new file mode 100644 index 000000000..53d8d0131 --- /dev/null +++ b/sdks/java/src/main/java/com/thoughtspot/client/api/GroupsApi.java @@ -0,0 +1,1056 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client.api; + +import com.google.gson.reflect.TypeToken; +import com.thoughtspot.client.ApiCallback; +import com.thoughtspot.client.ApiClient; +import com.thoughtspot.client.ApiClientConfiguration; +import com.thoughtspot.client.ApiException; +import com.thoughtspot.client.ApiResponse; +import com.thoughtspot.client.Configuration; +import com.thoughtspot.client.Pair; +import com.thoughtspot.client.model.CreateUserGroupRequest; +import com.thoughtspot.client.model.ImportUserGroupsRequest; +import com.thoughtspot.client.model.ImportUserGroupsResponse; +import com.thoughtspot.client.model.SearchUserGroupsRequest; +import com.thoughtspot.client.model.UpdateUserGroupRequest; +import com.thoughtspot.client.model.UserGroupResponse; +import java.lang.reflect.Type; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +@javax.annotation.Generated( + value = "org.openapitools.codegen.languages.JavaClientCodegen", + comments = "Generator version: 7.12.0") +public class GroupsApi { + private ApiClient localVarApiClient; + private ApiClientConfiguration localVarApiClientConfiguration; + private int localHostIndex; + private String localCustomBaseUrl; + + public GroupsApi() { + this(Configuration.getDefaultApiClient()); + } + + public GroupsApi(ApiClient apiClient) { + this.localVarApiClient = apiClient; + } + + public GroupsApi(ApiClientConfiguration apiClientConfiguration) { + this.localVarApiClientConfiguration = apiClientConfiguration; + this.localVarApiClient = new ApiClient(apiClientConfiguration); + } + + public ApiClient getApiClient() { + return localVarApiClient; + } + + public void setApiClient(ApiClient apiClient) { + this.localVarApiClient = apiClient; + } + + public ApiClientConfiguration getApiClientConfiguration() { + return localVarApiClientConfiguration; + } + + public void applyApiClientConfiguration(ApiClientConfiguration apiClientConfiguration) { + this.localVarApiClientConfiguration = apiClientConfiguration; + if (localVarApiClient != null) { + localVarApiClient.applyApiClientConfiguration(apiClientConfiguration); + } else { + localVarApiClient = new ApiClient(apiClientConfiguration); + } + } + + public int getHostIndex() { + return localHostIndex; + } + + public void setHostIndex(int hostIndex) { + this.localHostIndex = hostIndex; + } + + public String getCustomBaseUrl() { + return localCustomBaseUrl; + } + + public void setCustomBaseUrl(String customBaseUrl) { + this.localCustomBaseUrl = customBaseUrl; + } + + /** + * Build call for createUserGroup + * + * @param createUserGroupRequest (required) + * @param _callback Callback for upload/download progress + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 User group successfully created. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public okhttp3.Call createUserGroupCall( + CreateUserGroupRequest createUserGroupRequest, final ApiCallback _callback) + throws ApiException { + String basePath = null; + // Operation Servers + String[] localBasePaths = new String[] {}; + + // Determine Base Path to Use + if (localCustomBaseUrl != null) { + basePath = localCustomBaseUrl; + } else if (localBasePaths.length > 0) { + basePath = localBasePaths[localHostIndex]; + } else { + basePath = null; + } + + Object localVarPostBody = createUserGroupRequest; + + // create path and map variables + String localVarPath = "/api/rest/2.0/groups/create"; + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + final String[] localVarAccepts = {"application/json"}; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = {"application/json"}; + final String localVarContentType = + localVarApiClient.selectHeaderContentType(localVarContentTypes); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } + + String[] localVarAuthNames = new String[] {"bearerAuth"}; + return localVarApiClient.buildCall( + basePath, + localVarPath, + "POST", + localVarQueryParams, + localVarCollectionQueryParams, + localVarPostBody, + localVarHeaderParams, + localVarCookieParams, + localVarFormParams, + localVarAuthNames, + _callback); + } + + @SuppressWarnings("rawtypes") + private okhttp3.Call createUserGroupValidateBeforeCall( + CreateUserGroupRequest createUserGroupRequest, final ApiCallback _callback) + throws ApiException { + // verify the required parameter 'createUserGroupRequest' is set + if (createUserGroupRequest == null) { + throw new ApiException( + "Missing the required parameter 'createUserGroupRequest' when calling" + + " createUserGroup(Async)"); + } + + return createUserGroupCall(createUserGroupRequest, _callback); + } + + /** + * Version: 9.0.0.cl or later Creates a group object in ThoughtSpot. Requires + * `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access + * Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, + * the `GROUP_ADMINISTRATION` (**Can manage groups**) privilege is required. #### + * About groups Groups in ThoughtSpot are used by the administrators to define privileges and + * organize users based on their roles and access requirements. To know more about groups and + * privileges, see [ThoughtSpot Product + * Documentation](https://docs.thoughtspot.com/cloud/latest/groups-privileges). #### Supported + * operations The API endpoint lets you perform the following operations: * Assign privileges * + * Add users * Define sharing visibility * Add sub-groups * Assign a default Liveboard + * + * @param createUserGroupRequest (required) + * @return UserGroupResponse + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the + * response body + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 User group successfully created. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public UserGroupResponse createUserGroup(CreateUserGroupRequest createUserGroupRequest) + throws ApiException { + ApiResponse localVarResp = + createUserGroupWithHttpInfo(createUserGroupRequest); + return localVarResp.getData(); + } + + /** + * Version: 9.0.0.cl or later Creates a group object in ThoughtSpot. Requires + * `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access + * Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, + * the `GROUP_ADMINISTRATION` (**Can manage groups**) privilege is required. #### + * About groups Groups in ThoughtSpot are used by the administrators to define privileges and + * organize users based on their roles and access requirements. To know more about groups and + * privileges, see [ThoughtSpot Product + * Documentation](https://docs.thoughtspot.com/cloud/latest/groups-privileges). #### Supported + * operations The API endpoint lets you perform the following operations: * Assign privileges * + * Add users * Define sharing visibility * Add sub-groups * Assign a default Liveboard + * + * @param createUserGroupRequest (required) + * @return ApiResponse<UserGroupResponse> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the + * response body + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 User group successfully created. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public ApiResponse createUserGroupWithHttpInfo( + CreateUserGroupRequest createUserGroupRequest) throws ApiException { + okhttp3.Call localVarCall = createUserGroupValidateBeforeCall(createUserGroupRequest, null); + Type localVarReturnType = new TypeToken() {}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); + } + + /** + * (asynchronously) Version: 9.0.0.cl or later Creates a group object in ThoughtSpot. Requires + * `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access + * Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, + * the `GROUP_ADMINISTRATION` (**Can manage groups**) privilege is required. #### + * About groups Groups in ThoughtSpot are used by the administrators to define privileges and + * organize users based on their roles and access requirements. To know more about groups and + * privileges, see [ThoughtSpot Product + * Documentation](https://docs.thoughtspot.com/cloud/latest/groups-privileges). #### Supported + * operations The API endpoint lets you perform the following operations: * Assign privileges * + * Add users * Define sharing visibility * Add sub-groups * Assign a default Liveboard + * + * @param createUserGroupRequest (required) + * @param _callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body + * object + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 User group successfully created. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public okhttp3.Call createUserGroupAsync( + CreateUserGroupRequest createUserGroupRequest, + final ApiCallback _callback) + throws ApiException { + + okhttp3.Call localVarCall = + createUserGroupValidateBeforeCall(createUserGroupRequest, _callback); + Type localVarReturnType = new TypeToken() {}.getType(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; + } + /** + * Build call for deleteUserGroup + * + * @param groupIdentifier GUID or name of the group. (required) + * @param _callback Callback for upload/download progress + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
204 User group successfully deleted. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public okhttp3.Call deleteUserGroupCall(String groupIdentifier, final ApiCallback _callback) + throws ApiException { + String basePath = null; + // Operation Servers + String[] localBasePaths = new String[] {}; + + // Determine Base Path to Use + if (localCustomBaseUrl != null) { + basePath = localCustomBaseUrl; + } else if (localBasePaths.length > 0) { + basePath = localBasePaths[localHostIndex]; + } else { + basePath = null; + } + + Object localVarPostBody = null; + + // create path and map variables + String localVarPath = + "/api/rest/2.0/groups/{group_identifier}/delete" + .replace( + "{" + "group_identifier" + "}", + localVarApiClient.escapeString(groupIdentifier.toString())); + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + final String[] localVarAccepts = {"application/json"}; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = {}; + final String localVarContentType = + localVarApiClient.selectHeaderContentType(localVarContentTypes); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } + + String[] localVarAuthNames = new String[] {"bearerAuth"}; + return localVarApiClient.buildCall( + basePath, + localVarPath, + "POST", + localVarQueryParams, + localVarCollectionQueryParams, + localVarPostBody, + localVarHeaderParams, + localVarCookieParams, + localVarFormParams, + localVarAuthNames, + _callback); + } + + @SuppressWarnings("rawtypes") + private okhttp3.Call deleteUserGroupValidateBeforeCall( + String groupIdentifier, final ApiCallback _callback) throws ApiException { + // verify the required parameter 'groupIdentifier' is set + if (groupIdentifier == null) { + throw new ApiException( + "Missing the required parameter 'groupIdentifier' when calling" + + " deleteUserGroup(Async)"); + } + + return deleteUserGroupCall(groupIdentifier, _callback); + } + + /** + * Version: 9.0.0.cl or later Removes the specified group object from the ThoughtSpot system. + * Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If + * [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled + * on your instance, the `GROUP_ADMINISTRATION` (**Can manage groups**) privilege is + * required. + * + * @param groupIdentifier GUID or name of the group. (required) + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the + * response body + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
204 User group successfully deleted. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public void deleteUserGroup(String groupIdentifier) throws ApiException { + deleteUserGroupWithHttpInfo(groupIdentifier); + } + + /** + * Version: 9.0.0.cl or later Removes the specified group object from the ThoughtSpot system. + * Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If + * [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled + * on your instance, the `GROUP_ADMINISTRATION` (**Can manage groups**) privilege is + * required. + * + * @param groupIdentifier GUID or name of the group. (required) + * @return ApiResponse<Void> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the + * response body + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
204 User group successfully deleted. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public ApiResponse deleteUserGroupWithHttpInfo(String groupIdentifier) + throws ApiException { + okhttp3.Call localVarCall = deleteUserGroupValidateBeforeCall(groupIdentifier, null); + return localVarApiClient.execute(localVarCall); + } + + /** + * (asynchronously) Version: 9.0.0.cl or later Removes the specified group object from the + * ThoughtSpot system. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) + * privilege. If [Role-Based Access Control + * (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the + * `GROUP_ADMINISTRATION` (**Can manage groups**) privilege is required. + * + * @param groupIdentifier GUID or name of the group. (required) + * @param _callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body + * object + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
204 User group successfully deleted. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public okhttp3.Call deleteUserGroupAsync( + String groupIdentifier, final ApiCallback _callback) throws ApiException { + + okhttp3.Call localVarCall = deleteUserGroupValidateBeforeCall(groupIdentifier, _callback); + localVarApiClient.executeAsync(localVarCall, _callback); + return localVarCall; + } + /** + * Build call for importUserGroups + * + * @param importUserGroupsRequest (required) + * @param _callback Callback for upload/download progress + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 Import user groups operation successful. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public okhttp3.Call importUserGroupsCall( + ImportUserGroupsRequest importUserGroupsRequest, final ApiCallback _callback) + throws ApiException { + String basePath = null; + // Operation Servers + String[] localBasePaths = new String[] {}; + + // Determine Base Path to Use + if (localCustomBaseUrl != null) { + basePath = localCustomBaseUrl; + } else if (localBasePaths.length > 0) { + basePath = localBasePaths[localHostIndex]; + } else { + basePath = null; + } + + Object localVarPostBody = importUserGroupsRequest; + + // create path and map variables + String localVarPath = "/api/rest/2.0/groups/import"; + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + final String[] localVarAccepts = {"application/json"}; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = {"application/json"}; + final String localVarContentType = + localVarApiClient.selectHeaderContentType(localVarContentTypes); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } + + String[] localVarAuthNames = new String[] {"bearerAuth"}; + return localVarApiClient.buildCall( + basePath, + localVarPath, + "POST", + localVarQueryParams, + localVarCollectionQueryParams, + localVarPostBody, + localVarHeaderParams, + localVarCookieParams, + localVarFormParams, + localVarAuthNames, + _callback); + } + + @SuppressWarnings("rawtypes") + private okhttp3.Call importUserGroupsValidateBeforeCall( + ImportUserGroupsRequest importUserGroupsRequest, final ApiCallback _callback) + throws ApiException { + // verify the required parameter 'importUserGroupsRequest' is set + if (importUserGroupsRequest == null) { + throw new ApiException( + "Missing the required parameter 'importUserGroupsRequest' when calling" + + " importUserGroups(Async)"); + } + + return importUserGroupsCall(importUserGroupsRequest, _callback); + } + + /** + * Version: 9.0.0.cl or later Imports group objects from external databases into ThoughtSpot. + * Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If + * [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled + * on your instance, the `GROUP_ADMINISTRATION` (**Can manage groups**) privilege is + * required. During the import operation: * If the specified group is not available in + * ThoughtSpot, it will be added to ThoughtSpot. * If `delete_unspecified_groups` is + * set to `true`, the groups not specified in the API request, excluding administrator + * and system user groups, are deleted. * If the specified groups are already available in + * ThoughtSpot, the object properties of these groups are modified and synchronized as per the + * input data in the API request. A successful API call returns the object that represents the + * changes made in the ThoughtSpot system. + * + * @param importUserGroupsRequest (required) + * @return ImportUserGroupsResponse + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the + * response body + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 Import user groups operation successful. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public ImportUserGroupsResponse importUserGroups( + ImportUserGroupsRequest importUserGroupsRequest) throws ApiException { + ApiResponse localVarResp = + importUserGroupsWithHttpInfo(importUserGroupsRequest); + return localVarResp.getData(); + } + + /** + * Version: 9.0.0.cl or later Imports group objects from external databases into ThoughtSpot. + * Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If + * [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled + * on your instance, the `GROUP_ADMINISTRATION` (**Can manage groups**) privilege is + * required. During the import operation: * If the specified group is not available in + * ThoughtSpot, it will be added to ThoughtSpot. * If `delete_unspecified_groups` is + * set to `true`, the groups not specified in the API request, excluding administrator + * and system user groups, are deleted. * If the specified groups are already available in + * ThoughtSpot, the object properties of these groups are modified and synchronized as per the + * input data in the API request. A successful API call returns the object that represents the + * changes made in the ThoughtSpot system. + * + * @param importUserGroupsRequest (required) + * @return ApiResponse<ImportUserGroupsResponse> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the + * response body + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 Import user groups operation successful. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public ApiResponse importUserGroupsWithHttpInfo( + ImportUserGroupsRequest importUserGroupsRequest) throws ApiException { + okhttp3.Call localVarCall = + importUserGroupsValidateBeforeCall(importUserGroupsRequest, null); + Type localVarReturnType = new TypeToken() {}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); + } + + /** + * (asynchronously) Version: 9.0.0.cl or later Imports group objects from external databases + * into ThoughtSpot. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) + * privilege. If [Role-Based Access Control + * (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the + * `GROUP_ADMINISTRATION` (**Can manage groups**) privilege is required. During the + * import operation: * If the specified group is not available in ThoughtSpot, it will be added + * to ThoughtSpot. * If `delete_unspecified_groups` is set to `true`, the + * groups not specified in the API request, excluding administrator and system user groups, are + * deleted. * If the specified groups are already available in ThoughtSpot, the object + * properties of these groups are modified and synchronized as per the input data in the API + * request. A successful API call returns the object that represents the changes made in the + * ThoughtSpot system. + * + * @param importUserGroupsRequest (required) + * @param _callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body + * object + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 Import user groups operation successful. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public okhttp3.Call importUserGroupsAsync( + ImportUserGroupsRequest importUserGroupsRequest, + final ApiCallback _callback) + throws ApiException { + + okhttp3.Call localVarCall = + importUserGroupsValidateBeforeCall(importUserGroupsRequest, _callback); + Type localVarReturnType = new TypeToken() {}.getType(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; + } + /** + * Build call for searchUserGroups + * + * @param searchUserGroupsRequest (required) + * @param _callback Callback for upload/download progress + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 User group search result. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public okhttp3.Call searchUserGroupsCall( + SearchUserGroupsRequest searchUserGroupsRequest, final ApiCallback _callback) + throws ApiException { + String basePath = null; + // Operation Servers + String[] localBasePaths = new String[] {}; + + // Determine Base Path to Use + if (localCustomBaseUrl != null) { + basePath = localCustomBaseUrl; + } else if (localBasePaths.length > 0) { + basePath = localBasePaths[localHostIndex]; + } else { + basePath = null; + } + + Object localVarPostBody = searchUserGroupsRequest; + + // create path and map variables + String localVarPath = "/api/rest/2.0/groups/search"; + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + final String[] localVarAccepts = {"application/json"}; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = {"application/json"}; + final String localVarContentType = + localVarApiClient.selectHeaderContentType(localVarContentTypes); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } + + String[] localVarAuthNames = new String[] {"bearerAuth"}; + return localVarApiClient.buildCall( + basePath, + localVarPath, + "POST", + localVarQueryParams, + localVarCollectionQueryParams, + localVarPostBody, + localVarHeaderParams, + localVarCookieParams, + localVarFormParams, + localVarAuthNames, + _callback); + } + + @SuppressWarnings("rawtypes") + private okhttp3.Call searchUserGroupsValidateBeforeCall( + SearchUserGroupsRequest searchUserGroupsRequest, final ApiCallback _callback) + throws ApiException { + // verify the required parameter 'searchUserGroupsRequest' is set + if (searchUserGroupsRequest == null) { + throw new ApiException( + "Missing the required parameter 'searchUserGroupsRequest' when calling" + + " searchUserGroups(Async)"); + } + + return searchUserGroupsCall(searchUserGroupsRequest, _callback); + } + + /** + * Version: 9.0.0.cl or later Gets a list of user group objects from the ThoughtSpot system. To + * get details of a specific user group, specify the user group GUID or name. You can also + * filter the API response based on User ID, Org ID, Role ID, type of group, sharing visibility, + * privileges assigned to the group, and the Liveboard IDs assigned to the users in the group. + * Available to all users. Users with `ADMINISTRATION` (**Can administer + * ThoughtSpot**) privileges can view all users properties. If [Role-Based Access Control + * (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the + * `GROUP_ADMINISTRATION` (**Can manage groups**) privilege is required. **NOTE**: If + * you do not get precise results, try setting `record_size` to `-1` and + * `record_offset` to `0`. + * + * @param searchUserGroupsRequest (required) + * @return List<UserGroupResponse> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the + * response body + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 User group search result. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public List searchUserGroups(SearchUserGroupsRequest searchUserGroupsRequest) + throws ApiException { + ApiResponse> localVarResp = + searchUserGroupsWithHttpInfo(searchUserGroupsRequest); + return localVarResp.getData(); + } + + /** + * Version: 9.0.0.cl or later Gets a list of user group objects from the ThoughtSpot system. To + * get details of a specific user group, specify the user group GUID or name. You can also + * filter the API response based on User ID, Org ID, Role ID, type of group, sharing visibility, + * privileges assigned to the group, and the Liveboard IDs assigned to the users in the group. + * Available to all users. Users with `ADMINISTRATION` (**Can administer + * ThoughtSpot**) privileges can view all users properties. If [Role-Based Access Control + * (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the + * `GROUP_ADMINISTRATION` (**Can manage groups**) privilege is required. **NOTE**: If + * you do not get precise results, try setting `record_size` to `-1` and + * `record_offset` to `0`. + * + * @param searchUserGroupsRequest (required) + * @return ApiResponse<List<UserGroupResponse>> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the + * response body + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 User group search result. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public ApiResponse> searchUserGroupsWithHttpInfo( + SearchUserGroupsRequest searchUserGroupsRequest) throws ApiException { + okhttp3.Call localVarCall = + searchUserGroupsValidateBeforeCall(searchUserGroupsRequest, null); + Type localVarReturnType = new TypeToken>() {}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); + } + + /** + * (asynchronously) Version: 9.0.0.cl or later Gets a list of user group objects from the + * ThoughtSpot system. To get details of a specific user group, specify the user group GUID or + * name. You can also filter the API response based on User ID, Org ID, Role ID, type of group, + * sharing visibility, privileges assigned to the group, and the Liveboard IDs assigned to the + * users in the group. Available to all users. Users with `ADMINISTRATION` (**Can + * administer ThoughtSpot**) privileges can view all users properties. If [Role-Based Access + * Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, + * the `GROUP_ADMINISTRATION` (**Can manage groups**) privilege is required. **NOTE**: + * If you do not get precise results, try setting `record_size` to `-1` and + * `record_offset` to `0`. + * + * @param searchUserGroupsRequest (required) + * @param _callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body + * object + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 User group search result. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public okhttp3.Call searchUserGroupsAsync( + SearchUserGroupsRequest searchUserGroupsRequest, + final ApiCallback> _callback) + throws ApiException { + + okhttp3.Call localVarCall = + searchUserGroupsValidateBeforeCall(searchUserGroupsRequest, _callback); + Type localVarReturnType = new TypeToken>() {}.getType(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; + } + /** + * Build call for updateUserGroup + * + * @param groupIdentifier GUID or name of the group. (required) + * @param updateUserGroupRequest (required) + * @param _callback Callback for upload/download progress + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
204 User group successfully updated. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public okhttp3.Call updateUserGroupCall( + String groupIdentifier, + UpdateUserGroupRequest updateUserGroupRequest, + final ApiCallback _callback) + throws ApiException { + String basePath = null; + // Operation Servers + String[] localBasePaths = new String[] {}; + + // Determine Base Path to Use + if (localCustomBaseUrl != null) { + basePath = localCustomBaseUrl; + } else if (localBasePaths.length > 0) { + basePath = localBasePaths[localHostIndex]; + } else { + basePath = null; + } + + Object localVarPostBody = updateUserGroupRequest; + + // create path and map variables + String localVarPath = + "/api/rest/2.0/groups/{group_identifier}/update" + .replace( + "{" + "group_identifier" + "}", + localVarApiClient.escapeString(groupIdentifier.toString())); + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + final String[] localVarAccepts = {"application/json"}; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = {"application/json"}; + final String localVarContentType = + localVarApiClient.selectHeaderContentType(localVarContentTypes); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } + + String[] localVarAuthNames = new String[] {"bearerAuth"}; + return localVarApiClient.buildCall( + basePath, + localVarPath, + "POST", + localVarQueryParams, + localVarCollectionQueryParams, + localVarPostBody, + localVarHeaderParams, + localVarCookieParams, + localVarFormParams, + localVarAuthNames, + _callback); + } + + @SuppressWarnings("rawtypes") + private okhttp3.Call updateUserGroupValidateBeforeCall( + String groupIdentifier, + UpdateUserGroupRequest updateUserGroupRequest, + final ApiCallback _callback) + throws ApiException { + // verify the required parameter 'groupIdentifier' is set + if (groupIdentifier == null) { + throw new ApiException( + "Missing the required parameter 'groupIdentifier' when calling" + + " updateUserGroup(Async)"); + } + + // verify the required parameter 'updateUserGroupRequest' is set + if (updateUserGroupRequest == null) { + throw new ApiException( + "Missing the required parameter 'updateUserGroupRequest' when calling" + + " updateUserGroup(Async)"); + } + + return updateUserGroupCall(groupIdentifier, updateUserGroupRequest, _callback); + } + + /** + * Version: 9.0.0.cl or later Updates the properties of a group object in ThoughtSpot. Requires + * `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access + * Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, + * the `GROUP_ADMINISTRATION` (**Can manage groups**) privilege is required. #### + * Supported operations This API endpoint lets you perform the following operations in a single + * API request: * Edit + * [privileges](https://developers.thoughtspot.com/docs/?pageid=api-user-management#group-privileges) + * * Add or remove users * Change sharing visibility settings * Add or remove sub-groups * + * Assign a default Liveboard or update the existing settings + * + * @param groupIdentifier GUID or name of the group. (required) + * @param updateUserGroupRequest (required) + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the + * response body + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
204 User group successfully updated. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public void updateUserGroup( + String groupIdentifier, UpdateUserGroupRequest updateUserGroupRequest) + throws ApiException { + updateUserGroupWithHttpInfo(groupIdentifier, updateUserGroupRequest); + } + + /** + * Version: 9.0.0.cl or later Updates the properties of a group object in ThoughtSpot. Requires + * `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access + * Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, + * the `GROUP_ADMINISTRATION` (**Can manage groups**) privilege is required. #### + * Supported operations This API endpoint lets you perform the following operations in a single + * API request: * Edit + * [privileges](https://developers.thoughtspot.com/docs/?pageid=api-user-management#group-privileges) + * * Add or remove users * Change sharing visibility settings * Add or remove sub-groups * + * Assign a default Liveboard or update the existing settings + * + * @param groupIdentifier GUID or name of the group. (required) + * @param updateUserGroupRequest (required) + * @return ApiResponse<Void> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the + * response body + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
204 User group successfully updated. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public ApiResponse updateUserGroupWithHttpInfo( + String groupIdentifier, UpdateUserGroupRequest updateUserGroupRequest) + throws ApiException { + okhttp3.Call localVarCall = + updateUserGroupValidateBeforeCall(groupIdentifier, updateUserGroupRequest, null); + return localVarApiClient.execute(localVarCall); + } + + /** + * (asynchronously) Version: 9.0.0.cl or later Updates the properties of a group object in + * ThoughtSpot. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. + * If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is + * enabled on your instance, the `GROUP_ADMINISTRATION` (**Can manage groups**) + * privilege is required. #### Supported operations This API endpoint lets you perform the + * following operations in a single API request: * Edit + * [privileges](https://developers.thoughtspot.com/docs/?pageid=api-user-management#group-privileges) + * * Add or remove users * Change sharing visibility settings * Add or remove sub-groups * + * Assign a default Liveboard or update the existing settings + * + * @param groupIdentifier GUID or name of the group. (required) + * @param updateUserGroupRequest (required) + * @param _callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body + * object + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
204 User group successfully updated. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public okhttp3.Call updateUserGroupAsync( + String groupIdentifier, + UpdateUserGroupRequest updateUserGroupRequest, + final ApiCallback _callback) + throws ApiException { + + okhttp3.Call localVarCall = + updateUserGroupValidateBeforeCall( + groupIdentifier, updateUserGroupRequest, _callback); + localVarApiClient.executeAsync(localVarCall, _callback); + return localVarCall; + } +} diff --git a/sdks/java/src/main/java/com/thoughtspot/client/api/JobsApi.java b/sdks/java/src/main/java/com/thoughtspot/client/api/JobsApi.java new file mode 100644 index 000000000..82df5e105 --- /dev/null +++ b/sdks/java/src/main/java/com/thoughtspot/client/api/JobsApi.java @@ -0,0 +1,292 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client.api; + +import com.google.gson.reflect.TypeToken; +import com.thoughtspot.client.ApiCallback; +import com.thoughtspot.client.ApiClient; +import com.thoughtspot.client.ApiClientConfiguration; +import com.thoughtspot.client.ApiException; +import com.thoughtspot.client.ApiResponse; +import com.thoughtspot.client.Configuration; +import com.thoughtspot.client.Pair; +import com.thoughtspot.client.model.SearchChannelHistoryRequest; +import com.thoughtspot.client.model.SearchChannelHistoryResponse; +import java.lang.reflect.Type; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +@javax.annotation.Generated( + value = "org.openapitools.codegen.languages.JavaClientCodegen", + comments = "Generator version: 7.12.0") +public class JobsApi { + private ApiClient localVarApiClient; + private ApiClientConfiguration localVarApiClientConfiguration; + private int localHostIndex; + private String localCustomBaseUrl; + + public JobsApi() { + this(Configuration.getDefaultApiClient()); + } + + public JobsApi(ApiClient apiClient) { + this.localVarApiClient = apiClient; + } + + public JobsApi(ApiClientConfiguration apiClientConfiguration) { + this.localVarApiClientConfiguration = apiClientConfiguration; + this.localVarApiClient = new ApiClient(apiClientConfiguration); + } + + public ApiClient getApiClient() { + return localVarApiClient; + } + + public void setApiClient(ApiClient apiClient) { + this.localVarApiClient = apiClient; + } + + public ApiClientConfiguration getApiClientConfiguration() { + return localVarApiClientConfiguration; + } + + public void applyApiClientConfiguration(ApiClientConfiguration apiClientConfiguration) { + this.localVarApiClientConfiguration = apiClientConfiguration; + if (localVarApiClient != null) { + localVarApiClient.applyApiClientConfiguration(apiClientConfiguration); + } else { + localVarApiClient = new ApiClient(apiClientConfiguration); + } + } + + public int getHostIndex() { + return localHostIndex; + } + + public void setHostIndex(int hostIndex) { + this.localHostIndex = hostIndex; + } + + public String getCustomBaseUrl() { + return localCustomBaseUrl; + } + + public void setCustomBaseUrl(String customBaseUrl) { + this.localCustomBaseUrl = customBaseUrl; + } + + /** + * Build call for searchChannelHistory + * + * @param searchChannelHistoryRequest (required) + * @param _callback Callback for upload/download progress + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 Channel status logs retrieved successfully. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public okhttp3.Call searchChannelHistoryCall( + SearchChannelHistoryRequest searchChannelHistoryRequest, final ApiCallback _callback) + throws ApiException { + String basePath = null; + // Operation Servers + String[] localBasePaths = new String[] {}; + + // Determine Base Path to Use + if (localCustomBaseUrl != null) { + basePath = localCustomBaseUrl; + } else if (localBasePaths.length > 0) { + basePath = localBasePaths[localHostIndex]; + } else { + basePath = null; + } + + Object localVarPostBody = searchChannelHistoryRequest; + + // create path and map variables + String localVarPath = "/api/rest/2.0/jobs/history/communication-channels/search"; + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + final String[] localVarAccepts = {"application/json"}; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = {"application/json"}; + final String localVarContentType = + localVarApiClient.selectHeaderContentType(localVarContentTypes); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } + + String[] localVarAuthNames = new String[] {"bearerAuth"}; + return localVarApiClient.buildCall( + basePath, + localVarPath, + "POST", + localVarQueryParams, + localVarCollectionQueryParams, + localVarPostBody, + localVarHeaderParams, + localVarCookieParams, + localVarFormParams, + localVarAuthNames, + _callback); + } + + @SuppressWarnings("rawtypes") + private okhttp3.Call searchChannelHistoryValidateBeforeCall( + SearchChannelHistoryRequest searchChannelHistoryRequest, final ApiCallback _callback) + throws ApiException { + // verify the required parameter 'searchChannelHistoryRequest' is set + if (searchChannelHistoryRequest == null) { + throw new ApiException( + "Missing the required parameter 'searchChannelHistoryRequest' when calling" + + " searchChannelHistory(Async)"); + } + + return searchChannelHistoryCall(searchChannelHistoryRequest, _callback); + } + + /** + * Version: 26.4.0.cl or later Searches delivery history for communication channels such as + * webhooks. Returns channel-level delivery status for each job execution record. Use this to + * monitor channel health and delivery success rates across events. Requires + * `ADMINISTRATION` (**Can administer ThoughtSpot**) or `DEVELOPER` (**Has + * developer privilege**) privilege. If [Role-Based Access Control + * (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, users with + * `CAN_MANAGE_WEBHOOKS` (**Can manage webhooks**) privilege are also authorized to + * perform this action. **NOTE**: When `channel_type` is `WEBHOOK`, the + * following constraints apply: - `job_ids`, `channel_identifiers`, and + * `events` each accept at most one element. - When `job_ids` is provided, + * it is used as the sole lookup key and other filter fields are ignored. - When + * `job_ids` is not provided, `channel_identifiers` and `events` + * are both required, each containing exactly one element. - Records older than the configured + * retention period are not returned. - Use `start_epoch_time_in_millis` and/or + * `end_epoch_time_in_millis` to narrow results to a specific time window. + * + * @param searchChannelHistoryRequest (required) + * @return SearchChannelHistoryResponse + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the + * response body + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 Channel status logs retrieved successfully. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public SearchChannelHistoryResponse searchChannelHistory( + SearchChannelHistoryRequest searchChannelHistoryRequest) throws ApiException { + ApiResponse localVarResp = + searchChannelHistoryWithHttpInfo(searchChannelHistoryRequest); + return localVarResp.getData(); + } + + /** + * Version: 26.4.0.cl or later Searches delivery history for communication channels such as + * webhooks. Returns channel-level delivery status for each job execution record. Use this to + * monitor channel health and delivery success rates across events. Requires + * `ADMINISTRATION` (**Can administer ThoughtSpot**) or `DEVELOPER` (**Has + * developer privilege**) privilege. If [Role-Based Access Control + * (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, users with + * `CAN_MANAGE_WEBHOOKS` (**Can manage webhooks**) privilege are also authorized to + * perform this action. **NOTE**: When `channel_type` is `WEBHOOK`, the + * following constraints apply: - `job_ids`, `channel_identifiers`, and + * `events` each accept at most one element. - When `job_ids` is provided, + * it is used as the sole lookup key and other filter fields are ignored. - When + * `job_ids` is not provided, `channel_identifiers` and `events` + * are both required, each containing exactly one element. - Records older than the configured + * retention period are not returned. - Use `start_epoch_time_in_millis` and/or + * `end_epoch_time_in_millis` to narrow results to a specific time window. + * + * @param searchChannelHistoryRequest (required) + * @return ApiResponse<SearchChannelHistoryResponse> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the + * response body + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 Channel status logs retrieved successfully. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public ApiResponse searchChannelHistoryWithHttpInfo( + SearchChannelHistoryRequest searchChannelHistoryRequest) throws ApiException { + okhttp3.Call localVarCall = + searchChannelHistoryValidateBeforeCall(searchChannelHistoryRequest, null); + Type localVarReturnType = new TypeToken() {}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); + } + + /** + * (asynchronously) Version: 26.4.0.cl or later Searches delivery history for communication + * channels such as webhooks. Returns channel-level delivery status for each job execution + * record. Use this to monitor channel health and delivery success rates across events. Requires + * `ADMINISTRATION` (**Can administer ThoughtSpot**) or `DEVELOPER` (**Has + * developer privilege**) privilege. If [Role-Based Access Control + * (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, users with + * `CAN_MANAGE_WEBHOOKS` (**Can manage webhooks**) privilege are also authorized to + * perform this action. **NOTE**: When `channel_type` is `WEBHOOK`, the + * following constraints apply: - `job_ids`, `channel_identifiers`, and + * `events` each accept at most one element. - When `job_ids` is provided, + * it is used as the sole lookup key and other filter fields are ignored. - When + * `job_ids` is not provided, `channel_identifiers` and `events` + * are both required, each containing exactly one element. - Records older than the configured + * retention period are not returned. - Use `start_epoch_time_in_millis` and/or + * `end_epoch_time_in_millis` to narrow results to a specific time window. + * + * @param searchChannelHistoryRequest (required) + * @param _callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body + * object + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 Channel status logs retrieved successfully. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public okhttp3.Call searchChannelHistoryAsync( + SearchChannelHistoryRequest searchChannelHistoryRequest, + final ApiCallback _callback) + throws ApiException { + + okhttp3.Call localVarCall = + searchChannelHistoryValidateBeforeCall(searchChannelHistoryRequest, _callback); + Type localVarReturnType = new TypeToken() {}.getType(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; + } +} diff --git a/sdks/java/src/main/java/com/thoughtspot/client/api/LogApi.java b/sdks/java/src/main/java/com/thoughtspot/client/api/LogApi.java new file mode 100644 index 000000000..eb26c1ebc --- /dev/null +++ b/sdks/java/src/main/java/com/thoughtspot/client/api/LogApi.java @@ -0,0 +1,273 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client.api; + +import com.google.gson.reflect.TypeToken; +import com.thoughtspot.client.ApiCallback; +import com.thoughtspot.client.ApiClient; +import com.thoughtspot.client.ApiClientConfiguration; +import com.thoughtspot.client.ApiException; +import com.thoughtspot.client.ApiResponse; +import com.thoughtspot.client.Configuration; +import com.thoughtspot.client.Pair; +import com.thoughtspot.client.model.FetchLogsRequest; +import com.thoughtspot.client.model.LogResponse; +import java.lang.reflect.Type; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +@javax.annotation.Generated( + value = "org.openapitools.codegen.languages.JavaClientCodegen", + comments = "Generator version: 7.12.0") +public class LogApi { + private ApiClient localVarApiClient; + private ApiClientConfiguration localVarApiClientConfiguration; + private int localHostIndex; + private String localCustomBaseUrl; + + public LogApi() { + this(Configuration.getDefaultApiClient()); + } + + public LogApi(ApiClient apiClient) { + this.localVarApiClient = apiClient; + } + + public LogApi(ApiClientConfiguration apiClientConfiguration) { + this.localVarApiClientConfiguration = apiClientConfiguration; + this.localVarApiClient = new ApiClient(apiClientConfiguration); + } + + public ApiClient getApiClient() { + return localVarApiClient; + } + + public void setApiClient(ApiClient apiClient) { + this.localVarApiClient = apiClient; + } + + public ApiClientConfiguration getApiClientConfiguration() { + return localVarApiClientConfiguration; + } + + public void applyApiClientConfiguration(ApiClientConfiguration apiClientConfiguration) { + this.localVarApiClientConfiguration = apiClientConfiguration; + if (localVarApiClient != null) { + localVarApiClient.applyApiClientConfiguration(apiClientConfiguration); + } else { + localVarApiClient = new ApiClient(apiClientConfiguration); + } + } + + public int getHostIndex() { + return localHostIndex; + } + + public void setHostIndex(int hostIndex) { + this.localHostIndex = hostIndex; + } + + public String getCustomBaseUrl() { + return localCustomBaseUrl; + } + + public void setCustomBaseUrl(String customBaseUrl) { + this.localCustomBaseUrl = customBaseUrl; + } + + /** + * Build call for fetchLogs + * + * @param fetchLogsRequest (required) + * @param _callback Callback for upload/download progress + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 Log fetched successfully. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public okhttp3.Call fetchLogsCall( + FetchLogsRequest fetchLogsRequest, final ApiCallback _callback) throws ApiException { + String basePath = null; + // Operation Servers + String[] localBasePaths = new String[] {}; + + // Determine Base Path to Use + if (localCustomBaseUrl != null) { + basePath = localCustomBaseUrl; + } else if (localBasePaths.length > 0) { + basePath = localBasePaths[localHostIndex]; + } else { + basePath = null; + } + + Object localVarPostBody = fetchLogsRequest; + + // create path and map variables + String localVarPath = "/api/rest/2.0/logs/fetch"; + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + final String[] localVarAccepts = {"application/json"}; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = {"application/json"}; + final String localVarContentType = + localVarApiClient.selectHeaderContentType(localVarContentTypes); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } + + String[] localVarAuthNames = new String[] {"bearerAuth"}; + return localVarApiClient.buildCall( + basePath, + localVarPath, + "POST", + localVarQueryParams, + localVarCollectionQueryParams, + localVarPostBody, + localVarHeaderParams, + localVarCookieParams, + localVarFormParams, + localVarAuthNames, + _callback); + } + + @SuppressWarnings("rawtypes") + private okhttp3.Call fetchLogsValidateBeforeCall( + FetchLogsRequest fetchLogsRequest, final ApiCallback _callback) throws ApiException { + // verify the required parameter 'fetchLogsRequest' is set + if (fetchLogsRequest == null) { + throw new ApiException( + "Missing the required parameter 'fetchLogsRequest' when calling" + + " fetchLogs(Async)"); + } + + return fetchLogsCall(fetchLogsRequest, _callback); + } + + /** + * Version: 9.0.0.cl or later Fetches security audit logs. Requires `ADMINISTRATION` + * (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control + * (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the [Admin + * Control](https://developers.thoughtspot.com/docs/rbac#_admin_control) privileges are + * required. #### Usage guidelines By default, the API retrieves logs for the last 24 hours. You + * can set a custom duration in EPOCH time. Make sure the log duration specified in your API + * request doesn’t exceed 24 hours. If you must fetch logs for a longer time range, modify the + * duration and make multiple sequential API requests. Upon successful execution, the API + * returns logs with the following information: * timestamp of the event * event ID * event type + * * name and GUID of the user * IP address of ThoughtSpot instance For more information see + * [Audit logs Documentation](https://developers.thoughtspot.com/docs/audit-logs). + * + * @param fetchLogsRequest (required) + * @return List<LogResponse> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the + * response body + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 Log fetched successfully. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public List fetchLogs(FetchLogsRequest fetchLogsRequest) throws ApiException { + ApiResponse> localVarResp = fetchLogsWithHttpInfo(fetchLogsRequest); + return localVarResp.getData(); + } + + /** + * Version: 9.0.0.cl or later Fetches security audit logs. Requires `ADMINISTRATION` + * (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control + * (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the [Admin + * Control](https://developers.thoughtspot.com/docs/rbac#_admin_control) privileges are + * required. #### Usage guidelines By default, the API retrieves logs for the last 24 hours. You + * can set a custom duration in EPOCH time. Make sure the log duration specified in your API + * request doesn’t exceed 24 hours. If you must fetch logs for a longer time range, modify the + * duration and make multiple sequential API requests. Upon successful execution, the API + * returns logs with the following information: * timestamp of the event * event ID * event type + * * name and GUID of the user * IP address of ThoughtSpot instance For more information see + * [Audit logs Documentation](https://developers.thoughtspot.com/docs/audit-logs). + * + * @param fetchLogsRequest (required) + * @return ApiResponse<List<LogResponse>> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the + * response body + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 Log fetched successfully. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public ApiResponse> fetchLogsWithHttpInfo(FetchLogsRequest fetchLogsRequest) + throws ApiException { + okhttp3.Call localVarCall = fetchLogsValidateBeforeCall(fetchLogsRequest, null); + Type localVarReturnType = new TypeToken>() {}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); + } + + /** + * (asynchronously) Version: 9.0.0.cl or later Fetches security audit logs. Requires + * `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access + * Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, + * the [Admin Control](https://developers.thoughtspot.com/docs/rbac#_admin_control) privileges + * are required. #### Usage guidelines By default, the API retrieves logs for the last 24 hours. + * You can set a custom duration in EPOCH time. Make sure the log duration specified in your API + * request doesn’t exceed 24 hours. If you must fetch logs for a longer time range, modify the + * duration and make multiple sequential API requests. Upon successful execution, the API + * returns logs with the following information: * timestamp of the event * event ID * event type + * * name and GUID of the user * IP address of ThoughtSpot instance For more information see + * [Audit logs Documentation](https://developers.thoughtspot.com/docs/audit-logs). + * + * @param fetchLogsRequest (required) + * @param _callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body + * object + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 Log fetched successfully. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public okhttp3.Call fetchLogsAsync( + FetchLogsRequest fetchLogsRequest, final ApiCallback> _callback) + throws ApiException { + + okhttp3.Call localVarCall = fetchLogsValidateBeforeCall(fetchLogsRequest, _callback); + Type localVarReturnType = new TypeToken>() {}.getType(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; + } +} diff --git a/sdks/java/src/main/java/com/thoughtspot/client/api/MetadataApi.java b/sdks/java/src/main/java/com/thoughtspot/client/api/MetadataApi.java new file mode 100644 index 000000000..53c9cb9c1 --- /dev/null +++ b/sdks/java/src/main/java/com/thoughtspot/client/api/MetadataApi.java @@ -0,0 +1,3650 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client.api; + +import com.google.gson.reflect.TypeToken; +import com.thoughtspot.client.ApiCallback; +import com.thoughtspot.client.ApiClient; +import com.thoughtspot.client.ApiClientConfiguration; +import com.thoughtspot.client.ApiException; +import com.thoughtspot.client.ApiResponse; +import com.thoughtspot.client.Configuration; +import com.thoughtspot.client.Pair; +import com.thoughtspot.client.model.ConvertWorksheetToModelRequest; +import com.thoughtspot.client.model.CopyObjectRequest; +import com.thoughtspot.client.model.DeleteMetadataRequest; +import com.thoughtspot.client.model.ExportMetadataTMLBatchedRequest; +import com.thoughtspot.client.model.ExportMetadataTMLRequest; +import com.thoughtspot.client.model.FetchAnswerSqlQueryRequest; +import com.thoughtspot.client.model.FetchAsyncImportTaskStatusRequest; +import com.thoughtspot.client.model.FetchLiveboardSqlQueryRequest; +import com.thoughtspot.client.model.GetAsyncImportStatusResponse; +import com.thoughtspot.client.model.ImportEPackAsyncTaskStatus; +import com.thoughtspot.client.model.ImportMetadataTMLAsyncRequest; +import com.thoughtspot.client.model.ImportMetadataTMLRequest; +import com.thoughtspot.client.model.MetadataSearchResponse; +import com.thoughtspot.client.model.ParameterizeMetadataFieldsRequest; +import com.thoughtspot.client.model.ParameterizeMetadataRequest; +import com.thoughtspot.client.model.ResponseCopyObject; +import com.thoughtspot.client.model.ResponseWorksheetToModelConversion; +import com.thoughtspot.client.model.SearchMetadataRequest; +import com.thoughtspot.client.model.SqlQueryResponse; +import com.thoughtspot.client.model.UnparameterizeMetadataRequest; +import com.thoughtspot.client.model.UpdateMetadataHeaderRequest; +import com.thoughtspot.client.model.UpdateMetadataObjIdRequest; +import java.lang.reflect.Type; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +@javax.annotation.Generated( + value = "org.openapitools.codegen.languages.JavaClientCodegen", + comments = "Generator version: 7.12.0") +public class MetadataApi { + private ApiClient localVarApiClient; + private ApiClientConfiguration localVarApiClientConfiguration; + private int localHostIndex; + private String localCustomBaseUrl; + + public MetadataApi() { + this(Configuration.getDefaultApiClient()); + } + + public MetadataApi(ApiClient apiClient) { + this.localVarApiClient = apiClient; + } + + public MetadataApi(ApiClientConfiguration apiClientConfiguration) { + this.localVarApiClientConfiguration = apiClientConfiguration; + this.localVarApiClient = new ApiClient(apiClientConfiguration); + } + + public ApiClient getApiClient() { + return localVarApiClient; + } + + public void setApiClient(ApiClient apiClient) { + this.localVarApiClient = apiClient; + } + + public ApiClientConfiguration getApiClientConfiguration() { + return localVarApiClientConfiguration; + } + + public void applyApiClientConfiguration(ApiClientConfiguration apiClientConfiguration) { + this.localVarApiClientConfiguration = apiClientConfiguration; + if (localVarApiClient != null) { + localVarApiClient.applyApiClientConfiguration(apiClientConfiguration); + } else { + localVarApiClient = new ApiClient(apiClientConfiguration); + } + } + + public int getHostIndex() { + return localHostIndex; + } + + public void setHostIndex(int hostIndex) { + this.localHostIndex = hostIndex; + } + + public String getCustomBaseUrl() { + return localCustomBaseUrl; + } + + public void setCustomBaseUrl(String customBaseUrl) { + this.localCustomBaseUrl = customBaseUrl; + } + + /** + * Build call for convertWorksheetToModel + * + * @param convertWorksheetToModelRequest (required) + * @param _callback Callback for upload/download progress + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 Conversion of worksheets to model done successfully. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public okhttp3.Call convertWorksheetToModelCall( + ConvertWorksheetToModelRequest convertWorksheetToModelRequest, + final ApiCallback _callback) + throws ApiException { + String basePath = null; + // Operation Servers + String[] localBasePaths = new String[] {}; + + // Determine Base Path to Use + if (localCustomBaseUrl != null) { + basePath = localCustomBaseUrl; + } else if (localBasePaths.length > 0) { + basePath = localBasePaths[localHostIndex]; + } else { + basePath = null; + } + + Object localVarPostBody = convertWorksheetToModelRequest; + + // create path and map variables + String localVarPath = "/api/rest/2.0/metadata/worksheets/convert"; + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + final String[] localVarAccepts = {"application/json"}; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = {"application/json"}; + final String localVarContentType = + localVarApiClient.selectHeaderContentType(localVarContentTypes); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } + + String[] localVarAuthNames = new String[] {"bearerAuth"}; + return localVarApiClient.buildCall( + basePath, + localVarPath, + "POST", + localVarQueryParams, + localVarCollectionQueryParams, + localVarPostBody, + localVarHeaderParams, + localVarCookieParams, + localVarFormParams, + localVarAuthNames, + _callback); + } + + @SuppressWarnings("rawtypes") + private okhttp3.Call convertWorksheetToModelValidateBeforeCall( + ConvertWorksheetToModelRequest convertWorksheetToModelRequest, + final ApiCallback _callback) + throws ApiException { + // verify the required parameter 'convertWorksheetToModelRequest' is set + if (convertWorksheetToModelRequest == null) { + throw new ApiException( + "Missing the required parameter 'convertWorksheetToModelRequest' when calling" + + " convertWorksheetToModel(Async)"); + } + + return convertWorksheetToModelCall(convertWorksheetToModelRequest, _callback); + } + + /** + * Convert worksheets to models Version: 10.6.0.cl or later ## Prerequisites - **Privileges + * Required:** - `DATAMANAGEMENT` (Can manage data) or `ADMINISTRATION` (Can + * administer ThoughtSpot). - **Additional Privileges (if RBAC is enabled):** - + * `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` (Can manage data models). --- ## Usage + * Guidelines ### Parameters 1. **worksheet_ids** - **Description:** A comma-separated list of + * GUIDs (Globally Unique Identifiers) specifying the Worksheets to be converted. - **Usage:** - + * Used only when `convert_all` is set to `false`. - Leave empty or omit + * when `convert_all` is set to `true`. 2. **exclude_worksheet_ids** - + * **Description:** A comma-separated list of GUIDs specifying Worksheets to be excluded from + * conversion. - **Usage:** - Useful when `convert_all` is set to `true` and + * specific Worksheets should not be converted. 3. **convert_all** - **Description:** Sets the + * scope of conversion. - **Options:** - `true`: Converts all Worksheets in the + * system, except those specified in `exclude_worksheet_ids`. - `false`: + * Converts only the Worksheets listed in `worksheet_ids`. 4. **apply_changes** - + * **Description:** Specifies whether to apply changes directly to ThoughtSpot or to generate a + * preview before applying any changes.Used for validation of conversion. - **Options:** - + * `true`: Applies conversion changes directly to ThoughtSpot. - `false`: + * Generates only a preview of the changes and does not apply any changes to ThoughtSpot --- ## + * Best Practices 1. **Backup Before Conversion:** Always export metadata as a backup before + * initiating the conversion process 2. **Partial Conversion for Testing:** Test the conversion + * process by setting `convert_all` to `false` and specifying a small number + * of `worksheet_ids`. 3. **Verify Dependencies:** Check for dependent objects, such + * as Tables and Connections, to avoid invalid references. 4. **Review Changes:** Use + * `apply_changes: false` to preview the impact of the conversion before applying + * changes. --- ## Examples ### Convert Specific Worksheets ```json { + * \"worksheet_ids\": [\"guid1\", \"guid2\", \"guid3\"], + * \"exclude_worksheet_ids\": [], \"convert_all\": false, + * \"apply_changes\": true } ``` ### Convert All Accessible Worksheets + * ```json { \"worksheet_ids\": [], + * \"exclude_worksheet_ids\": [], \"convert_all\": true, + * \"apply_changes\": true } ``` ### Exclude Specific Worksheets While + * Converting All Accessible Worksheets ```json { \"worksheet_ids\": + * [], \"exclude_worksheet_ids\": [\"abc\"], \"convert_all\": + * true, \"apply_changes\": true } ``` + * + * @param convertWorksheetToModelRequest (required) + * @return ResponseWorksheetToModelConversion + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the + * response body + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 Conversion of worksheets to model done successfully. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public ResponseWorksheetToModelConversion convertWorksheetToModel( + ConvertWorksheetToModelRequest convertWorksheetToModelRequest) throws ApiException { + ApiResponse localVarResp = + convertWorksheetToModelWithHttpInfo(convertWorksheetToModelRequest); + return localVarResp.getData(); + } + + /** + * Convert worksheets to models Version: 10.6.0.cl or later ## Prerequisites - **Privileges + * Required:** - `DATAMANAGEMENT` (Can manage data) or `ADMINISTRATION` (Can + * administer ThoughtSpot). - **Additional Privileges (if RBAC is enabled):** - + * `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` (Can manage data models). --- ## Usage + * Guidelines ### Parameters 1. **worksheet_ids** - **Description:** A comma-separated list of + * GUIDs (Globally Unique Identifiers) specifying the Worksheets to be converted. - **Usage:** - + * Used only when `convert_all` is set to `false`. - Leave empty or omit + * when `convert_all` is set to `true`. 2. **exclude_worksheet_ids** - + * **Description:** A comma-separated list of GUIDs specifying Worksheets to be excluded from + * conversion. - **Usage:** - Useful when `convert_all` is set to `true` and + * specific Worksheets should not be converted. 3. **convert_all** - **Description:** Sets the + * scope of conversion. - **Options:** - `true`: Converts all Worksheets in the + * system, except those specified in `exclude_worksheet_ids`. - `false`: + * Converts only the Worksheets listed in `worksheet_ids`. 4. **apply_changes** - + * **Description:** Specifies whether to apply changes directly to ThoughtSpot or to generate a + * preview before applying any changes.Used for validation of conversion. - **Options:** - + * `true`: Applies conversion changes directly to ThoughtSpot. - `false`: + * Generates only a preview of the changes and does not apply any changes to ThoughtSpot --- ## + * Best Practices 1. **Backup Before Conversion:** Always export metadata as a backup before + * initiating the conversion process 2. **Partial Conversion for Testing:** Test the conversion + * process by setting `convert_all` to `false` and specifying a small number + * of `worksheet_ids`. 3. **Verify Dependencies:** Check for dependent objects, such + * as Tables and Connections, to avoid invalid references. 4. **Review Changes:** Use + * `apply_changes: false` to preview the impact of the conversion before applying + * changes. --- ## Examples ### Convert Specific Worksheets ```json { + * \"worksheet_ids\": [\"guid1\", \"guid2\", \"guid3\"], + * \"exclude_worksheet_ids\": [], \"convert_all\": false, + * \"apply_changes\": true } ``` ### Convert All Accessible Worksheets + * ```json { \"worksheet_ids\": [], + * \"exclude_worksheet_ids\": [], \"convert_all\": true, + * \"apply_changes\": true } ``` ### Exclude Specific Worksheets While + * Converting All Accessible Worksheets ```json { \"worksheet_ids\": + * [], \"exclude_worksheet_ids\": [\"abc\"], \"convert_all\": + * true, \"apply_changes\": true } ``` + * + * @param convertWorksheetToModelRequest (required) + * @return ApiResponse<ResponseWorksheetToModelConversion> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the + * response body + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 Conversion of worksheets to model done successfully. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public ApiResponse convertWorksheetToModelWithHttpInfo( + ConvertWorksheetToModelRequest convertWorksheetToModelRequest) throws ApiException { + okhttp3.Call localVarCall = + convertWorksheetToModelValidateBeforeCall(convertWorksheetToModelRequest, null); + Type localVarReturnType = new TypeToken() {}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); + } + + /** + * (asynchronously) Convert worksheets to models Version: 10.6.0.cl or later ## Prerequisites - + * **Privileges Required:** - `DATAMANAGEMENT` (Can manage data) or + * `ADMINISTRATION` (Can administer ThoughtSpot). - **Additional Privileges (if RBAC + * is enabled):** - `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` (Can manage data models). --- + * ## Usage Guidelines ### Parameters 1. **worksheet_ids** - **Description:** A comma-separated + * list of GUIDs (Globally Unique Identifiers) specifying the Worksheets to be converted. - + * **Usage:** - Used only when `convert_all` is set to `false`. - Leave + * empty or omit when `convert_all` is set to `true`. 2. + * **exclude_worksheet_ids** - **Description:** A comma-separated list of GUIDs specifying + * Worksheets to be excluded from conversion. - **Usage:** - Useful when `convert_all` + * is set to `true` and specific Worksheets should not be converted. 3. + * **convert_all** - **Description:** Sets the scope of conversion. - **Options:** - + * `true`: Converts all Worksheets in the system, except those specified in + * `exclude_worksheet_ids`. - `false`: Converts only the Worksheets listed + * in `worksheet_ids`. 4. **apply_changes** - **Description:** Specifies whether to + * apply changes directly to ThoughtSpot or to generate a preview before applying any + * changes.Used for validation of conversion. - **Options:** - `true`: Applies + * conversion changes directly to ThoughtSpot. - `false`: Generates only a preview of + * the changes and does not apply any changes to ThoughtSpot --- ## Best Practices 1. **Backup + * Before Conversion:** Always export metadata as a backup before initiating the conversion + * process 2. **Partial Conversion for Testing:** Test the conversion process by setting + * `convert_all` to `false` and specifying a small number of + * `worksheet_ids`. 3. **Verify Dependencies:** Check for dependent objects, such as + * Tables and Connections, to avoid invalid references. 4. **Review Changes:** Use + * `apply_changes: false` to preview the impact of the conversion before applying + * changes. --- ## Examples ### Convert Specific Worksheets ```json { + * \"worksheet_ids\": [\"guid1\", \"guid2\", \"guid3\"], + * \"exclude_worksheet_ids\": [], \"convert_all\": false, + * \"apply_changes\": true } ``` ### Convert All Accessible Worksheets + * ```json { \"worksheet_ids\": [], + * \"exclude_worksheet_ids\": [], \"convert_all\": true, + * \"apply_changes\": true } ``` ### Exclude Specific Worksheets While + * Converting All Accessible Worksheets ```json { \"worksheet_ids\": + * [], \"exclude_worksheet_ids\": [\"abc\"], \"convert_all\": + * true, \"apply_changes\": true } ``` + * + * @param convertWorksheetToModelRequest (required) + * @param _callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body + * object + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 Conversion of worksheets to model done successfully. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public okhttp3.Call convertWorksheetToModelAsync( + ConvertWorksheetToModelRequest convertWorksheetToModelRequest, + final ApiCallback _callback) + throws ApiException { + + okhttp3.Call localVarCall = + convertWorksheetToModelValidateBeforeCall( + convertWorksheetToModelRequest, _callback); + Type localVarReturnType = new TypeToken() {}.getType(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; + } + /** + * Build call for copyObject + * + * @param copyObjectRequest (required) + * @param _callback Callback for upload/download progress + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + * @http.response.details + * + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 Successfully created a copy of the object -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
404 Object not found -
500 Unexpected error -
+ */ + public okhttp3.Call copyObjectCall( + CopyObjectRequest copyObjectRequest, final ApiCallback _callback) throws ApiException { + String basePath = null; + // Operation Servers + String[] localBasePaths = new String[] {}; + + // Determine Base Path to Use + if (localCustomBaseUrl != null) { + basePath = localCustomBaseUrl; + } else if (localBasePaths.length > 0) { + basePath = localBasePaths[localHostIndex]; + } else { + basePath = null; + } + + Object localVarPostBody = copyObjectRequest; + + // create path and map variables + String localVarPath = "/api/rest/2.0/metadata/copyobject"; + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + final String[] localVarAccepts = {"application/json"}; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = {"application/json"}; + final String localVarContentType = + localVarApiClient.selectHeaderContentType(localVarContentTypes); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } + + String[] localVarAuthNames = new String[] {"bearerAuth"}; + return localVarApiClient.buildCall( + basePath, + localVarPath, + "POST", + localVarQueryParams, + localVarCollectionQueryParams, + localVarPostBody, + localVarHeaderParams, + localVarCookieParams, + localVarFormParams, + localVarAuthNames, + _callback); + } + + @SuppressWarnings("rawtypes") + private okhttp3.Call copyObjectValidateBeforeCall( + CopyObjectRequest copyObjectRequest, final ApiCallback _callback) throws ApiException { + // verify the required parameter 'copyObjectRequest' is set + if (copyObjectRequest == null) { + throw new ApiException( + "Missing the required parameter 'copyObjectRequest' when calling" + + " copyObject(Async)"); + } + + return copyObjectCall(copyObjectRequest, _callback); + } + + /** + * Makes a copy of an Answer or Liveboard Version: 10.3.0.cl or later Creates a copy of a + * metadata object. Requires at least view access to the metadata object being copied. Upon + * successful execution, the API creates a copy of the metadata object specified in the API + * request and returns the ID of the new object. + * + * @param copyObjectRequest (required) + * @return ResponseCopyObject + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the + * response body + * @http.response.details + * + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 Successfully created a copy of the object -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
404 Object not found -
500 Unexpected error -
+ */ + public ResponseCopyObject copyObject(CopyObjectRequest copyObjectRequest) throws ApiException { + ApiResponse localVarResp = copyObjectWithHttpInfo(copyObjectRequest); + return localVarResp.getData(); + } + + /** + * Makes a copy of an Answer or Liveboard Version: 10.3.0.cl or later Creates a copy of a + * metadata object. Requires at least view access to the metadata object being copied. Upon + * successful execution, the API creates a copy of the metadata object specified in the API + * request and returns the ID of the new object. + * + * @param copyObjectRequest (required) + * @return ApiResponse<ResponseCopyObject> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the + * response body + * @http.response.details + * + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 Successfully created a copy of the object -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
404 Object not found -
500 Unexpected error -
+ */ + public ApiResponse copyObjectWithHttpInfo( + CopyObjectRequest copyObjectRequest) throws ApiException { + okhttp3.Call localVarCall = copyObjectValidateBeforeCall(copyObjectRequest, null); + Type localVarReturnType = new TypeToken() {}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); + } + + /** + * (asynchronously) Makes a copy of an Answer or Liveboard Version: 10.3.0.cl or later Creates a + * copy of a metadata object. Requires at least view access to the metadata object being copied. + * Upon successful execution, the API creates a copy of the metadata object specified in the API + * request and returns the ID of the new object. + * + * @param copyObjectRequest (required) + * @param _callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body + * object + * @http.response.details + * + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 Successfully created a copy of the object -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
404 Object not found -
500 Unexpected error -
+ */ + public okhttp3.Call copyObjectAsync( + CopyObjectRequest copyObjectRequest, final ApiCallback _callback) + throws ApiException { + + okhttp3.Call localVarCall = copyObjectValidateBeforeCall(copyObjectRequest, _callback); + Type localVarReturnType = new TypeToken() {}.getType(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; + } + /** + * Build call for deleteMetadata + * + * @param deleteMetadataRequest (required) + * @param _callback Callback for upload/download progress + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
204 Metadata objects successfully deleted. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public okhttp3.Call deleteMetadataCall( + DeleteMetadataRequest deleteMetadataRequest, final ApiCallback _callback) + throws ApiException { + String basePath = null; + // Operation Servers + String[] localBasePaths = new String[] {}; + + // Determine Base Path to Use + if (localCustomBaseUrl != null) { + basePath = localCustomBaseUrl; + } else if (localBasePaths.length > 0) { + basePath = localBasePaths[localHostIndex]; + } else { + basePath = null; + } + + Object localVarPostBody = deleteMetadataRequest; + + // create path and map variables + String localVarPath = "/api/rest/2.0/metadata/delete"; + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + final String[] localVarAccepts = {"application/json"}; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = {"application/json"}; + final String localVarContentType = + localVarApiClient.selectHeaderContentType(localVarContentTypes); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } + + String[] localVarAuthNames = new String[] {"bearerAuth"}; + return localVarApiClient.buildCall( + basePath, + localVarPath, + "POST", + localVarQueryParams, + localVarCollectionQueryParams, + localVarPostBody, + localVarHeaderParams, + localVarCookieParams, + localVarFormParams, + localVarAuthNames, + _callback); + } + + @SuppressWarnings("rawtypes") + private okhttp3.Call deleteMetadataValidateBeforeCall( + DeleteMetadataRequest deleteMetadataRequest, final ApiCallback _callback) + throws ApiException { + // verify the required parameter 'deleteMetadataRequest' is set + if (deleteMetadataRequest == null) { + throw new ApiException( + "Missing the required parameter 'deleteMetadataRequest' when calling" + + " deleteMetadata(Async)"); + } + + return deleteMetadataCall(deleteMetadataRequest, _callback); + } + + /** + * Version: 9.0.0.cl or later Removes the specified metadata object from the ThoughtSpot system. + * Requires edit access to the metadata object. + * + * @param deleteMetadataRequest (required) + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the + * response body + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
204 Metadata objects successfully deleted. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public void deleteMetadata(DeleteMetadataRequest deleteMetadataRequest) throws ApiException { + deleteMetadataWithHttpInfo(deleteMetadataRequest); + } + + /** + * Version: 9.0.0.cl or later Removes the specified metadata object from the ThoughtSpot system. + * Requires edit access to the metadata object. + * + * @param deleteMetadataRequest (required) + * @return ApiResponse<Void> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the + * response body + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
204 Metadata objects successfully deleted. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public ApiResponse deleteMetadataWithHttpInfo(DeleteMetadataRequest deleteMetadataRequest) + throws ApiException { + okhttp3.Call localVarCall = deleteMetadataValidateBeforeCall(deleteMetadataRequest, null); + return localVarApiClient.execute(localVarCall); + } + + /** + * (asynchronously) Version: 9.0.0.cl or later Removes the specified metadata object from the + * ThoughtSpot system. Requires edit access to the metadata object. + * + * @param deleteMetadataRequest (required) + * @param _callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body + * object + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
204 Metadata objects successfully deleted. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public okhttp3.Call deleteMetadataAsync( + DeleteMetadataRequest deleteMetadataRequest, final ApiCallback _callback) + throws ApiException { + + okhttp3.Call localVarCall = + deleteMetadataValidateBeforeCall(deleteMetadataRequest, _callback); + localVarApiClient.executeAsync(localVarCall, _callback); + return localVarCall; + } + /** + * Build call for exportMetadataTML + * + * @param exportMetadataTMLRequest (required) + * @param _callback Callback for upload/download progress + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 Export TMLs of specified metadata objects is successful. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public okhttp3.Call exportMetadataTMLCall( + ExportMetadataTMLRequest exportMetadataTMLRequest, final ApiCallback _callback) + throws ApiException { + String basePath = null; + // Operation Servers + String[] localBasePaths = new String[] {}; + + // Determine Base Path to Use + if (localCustomBaseUrl != null) { + basePath = localCustomBaseUrl; + } else if (localBasePaths.length > 0) { + basePath = localBasePaths[localHostIndex]; + } else { + basePath = null; + } + + Object localVarPostBody = exportMetadataTMLRequest; + + // create path and map variables + String localVarPath = "/api/rest/2.0/metadata/tml/export"; + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + final String[] localVarAccepts = {"application/json"}; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = {"application/json"}; + final String localVarContentType = + localVarApiClient.selectHeaderContentType(localVarContentTypes); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } + + String[] localVarAuthNames = new String[] {"bearerAuth"}; + return localVarApiClient.buildCall( + basePath, + localVarPath, + "POST", + localVarQueryParams, + localVarCollectionQueryParams, + localVarPostBody, + localVarHeaderParams, + localVarCookieParams, + localVarFormParams, + localVarAuthNames, + _callback); + } + + @SuppressWarnings("rawtypes") + private okhttp3.Call exportMetadataTMLValidateBeforeCall( + ExportMetadataTMLRequest exportMetadataTMLRequest, final ApiCallback _callback) + throws ApiException { + // verify the required parameter 'exportMetadataTMLRequest' is set + if (exportMetadataTMLRequest == null) { + throw new ApiException( + "Missing the required parameter 'exportMetadataTMLRequest' when calling" + + " exportMetadataTML(Async)"); + } + + return exportMetadataTMLCall(exportMetadataTMLRequest, _callback); + } + + /** + * Version: 9.0.0.cl or later Exports the [TML](https://docs.thoughtspot.com/cloud/latest/tml) + * representation of metadata objects in JSON or YAML format. Requires + * `DATADOWNLOADING` (**Can download Data**) and at least view access to the metadata + * object. #### Usage guidelines * You can export one or several objects by passing metadata + * object GUIDs in the `metadata` array. * When exporting TML content for a Liveboard + * or Answer object, you can set `export_associated` to `true` to retrieve + * TML content for underlying Worksheets, Tables, or Views, including the GUID of each object + * within the headers. When `export_associated` is set to `true`, consider + * retrieving one metadata object at a time. * Set `export_fqns` to `true` + * to add FQNs of the referenced objects in the TML content. For example, if you send an API + * request to retrieve TML for a Liveboard and its associated objects, the API returns the TML + * content with FQNs of the referenced Worksheet. Exporting TML with FQNs is useful if + * ThoughtSpot has multiple objects with the same name and you want to eliminate ambiguity when + * importing TML files into ThoughtSpot. It eliminates the need for adding FQNs of the + * referenced objects manually during the import operation. * To export only the TML of + * feedbacks associated with an object, set the GUID of the object as `identifier`, + * and set the `type` as `FEEDBACK` in the `metadata` array. * To + * export the TML of an object along with the feedbacks associated with it, set the GUID of the + * object as `identifier`, set the `type` as `LOGIAL_TABLE` in the + * `metadata` array, and set `export_with_associated_feedbacks` in + * `export_options` to true. For more information, see [TML + * Documentation](https://developers.thoughtspot.com/docs/tml#_export_a_tml). For more + * information on feedbacks, see [Feedback + * Documentation](https://docs.thoughtspot.com/cloud/latest/sage-feedback). + * + * @param exportMetadataTMLRequest (required) + * @return List<Object> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the + * response body + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 Export TMLs of specified metadata objects is successful. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public List exportMetadataTML(ExportMetadataTMLRequest exportMetadataTMLRequest) + throws ApiException { + ApiResponse> localVarResp = + exportMetadataTMLWithHttpInfo(exportMetadataTMLRequest); + return localVarResp.getData(); + } + + /** + * Version: 9.0.0.cl or later Exports the [TML](https://docs.thoughtspot.com/cloud/latest/tml) + * representation of metadata objects in JSON or YAML format. Requires + * `DATADOWNLOADING` (**Can download Data**) and at least view access to the metadata + * object. #### Usage guidelines * You can export one or several objects by passing metadata + * object GUIDs in the `metadata` array. * When exporting TML content for a Liveboard + * or Answer object, you can set `export_associated` to `true` to retrieve + * TML content for underlying Worksheets, Tables, or Views, including the GUID of each object + * within the headers. When `export_associated` is set to `true`, consider + * retrieving one metadata object at a time. * Set `export_fqns` to `true` + * to add FQNs of the referenced objects in the TML content. For example, if you send an API + * request to retrieve TML for a Liveboard and its associated objects, the API returns the TML + * content with FQNs of the referenced Worksheet. Exporting TML with FQNs is useful if + * ThoughtSpot has multiple objects with the same name and you want to eliminate ambiguity when + * importing TML files into ThoughtSpot. It eliminates the need for adding FQNs of the + * referenced objects manually during the import operation. * To export only the TML of + * feedbacks associated with an object, set the GUID of the object as `identifier`, + * and set the `type` as `FEEDBACK` in the `metadata` array. * To + * export the TML of an object along with the feedbacks associated with it, set the GUID of the + * object as `identifier`, set the `type` as `LOGIAL_TABLE` in the + * `metadata` array, and set `export_with_associated_feedbacks` in + * `export_options` to true. For more information, see [TML + * Documentation](https://developers.thoughtspot.com/docs/tml#_export_a_tml). For more + * information on feedbacks, see [Feedback + * Documentation](https://docs.thoughtspot.com/cloud/latest/sage-feedback). + * + * @param exportMetadataTMLRequest (required) + * @return ApiResponse<List<Object>> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the + * response body + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 Export TMLs of specified metadata objects is successful. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public ApiResponse> exportMetadataTMLWithHttpInfo( + ExportMetadataTMLRequest exportMetadataTMLRequest) throws ApiException { + okhttp3.Call localVarCall = + exportMetadataTMLValidateBeforeCall(exportMetadataTMLRequest, null); + Type localVarReturnType = new TypeToken>() {}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); + } + + /** + * (asynchronously) Version: 9.0.0.cl or later Exports the + * [TML](https://docs.thoughtspot.com/cloud/latest/tml) representation of metadata objects in + * JSON or YAML format. Requires `DATADOWNLOADING` (**Can download Data**) and at + * least view access to the metadata object. #### Usage guidelines * You can export one or + * several objects by passing metadata object GUIDs in the `metadata` array. * When + * exporting TML content for a Liveboard or Answer object, you can set + * `export_associated` to `true` to retrieve TML content for underlying + * Worksheets, Tables, or Views, including the GUID of each object within the headers. When + * `export_associated` is set to `true`, consider retrieving one metadata + * object at a time. * Set `export_fqns` to `true` to add FQNs of the + * referenced objects in the TML content. For example, if you send an API request to retrieve + * TML for a Liveboard and its associated objects, the API returns the TML content with FQNs of + * the referenced Worksheet. Exporting TML with FQNs is useful if ThoughtSpot has multiple + * objects with the same name and you want to eliminate ambiguity when importing TML files into + * ThoughtSpot. It eliminates the need for adding FQNs of the referenced objects manually during + * the import operation. * To export only the TML of feedbacks associated with an object, set + * the GUID of the object as `identifier`, and set the `type` as + * `FEEDBACK` in the `metadata` array. * To export the TML of an object + * along with the feedbacks associated with it, set the GUID of the object as + * `identifier`, set the `type` as `LOGIAL_TABLE` in the + * `metadata` array, and set `export_with_associated_feedbacks` in + * `export_options` to true. For more information, see [TML + * Documentation](https://developers.thoughtspot.com/docs/tml#_export_a_tml). For more + * information on feedbacks, see [Feedback + * Documentation](https://docs.thoughtspot.com/cloud/latest/sage-feedback). + * + * @param exportMetadataTMLRequest (required) + * @param _callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body + * object + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 Export TMLs of specified metadata objects is successful. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public okhttp3.Call exportMetadataTMLAsync( + ExportMetadataTMLRequest exportMetadataTMLRequest, + final ApiCallback> _callback) + throws ApiException { + + okhttp3.Call localVarCall = + exportMetadataTMLValidateBeforeCall(exportMetadataTMLRequest, _callback); + Type localVarReturnType = new TypeToken>() {}.getType(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; + } + /** + * Build call for exportMetadataTMLBatched + * + * @param exportMetadataTMLBatchedRequest (required) + * @param _callback Callback for upload/download progress + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 Export TMLs of specified metadata objects is successful. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public okhttp3.Call exportMetadataTMLBatchedCall( + ExportMetadataTMLBatchedRequest exportMetadataTMLBatchedRequest, + final ApiCallback _callback) + throws ApiException { + String basePath = null; + // Operation Servers + String[] localBasePaths = new String[] {}; + + // Determine Base Path to Use + if (localCustomBaseUrl != null) { + basePath = localCustomBaseUrl; + } else if (localBasePaths.length > 0) { + basePath = localBasePaths[localHostIndex]; + } else { + basePath = null; + } + + Object localVarPostBody = exportMetadataTMLBatchedRequest; + + // create path and map variables + String localVarPath = "/api/rest/2.0/metadata/tml/export/batch"; + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + final String[] localVarAccepts = {"application/json"}; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = {"application/json"}; + final String localVarContentType = + localVarApiClient.selectHeaderContentType(localVarContentTypes); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } + + String[] localVarAuthNames = new String[] {"bearerAuth"}; + return localVarApiClient.buildCall( + basePath, + localVarPath, + "POST", + localVarQueryParams, + localVarCollectionQueryParams, + localVarPostBody, + localVarHeaderParams, + localVarCookieParams, + localVarFormParams, + localVarAuthNames, + _callback); + } + + @SuppressWarnings("rawtypes") + private okhttp3.Call exportMetadataTMLBatchedValidateBeforeCall( + ExportMetadataTMLBatchedRequest exportMetadataTMLBatchedRequest, + final ApiCallback _callback) + throws ApiException { + // verify the required parameter 'exportMetadataTMLBatchedRequest' is set + if (exportMetadataTMLBatchedRequest == null) { + throw new ApiException( + "Missing the required parameter 'exportMetadataTMLBatchedRequest' when calling" + + " exportMetadataTMLBatched(Async)"); + } + + return exportMetadataTMLBatchedCall(exportMetadataTMLBatchedRequest, _callback); + } + + /** + * Version: 10.1.0.cl or later Exports the [TML](https://docs.thoughtspot.com/cloud/latest/tml) + * representation of metadata objects in JSON or YAML format. ### **Permissions Required** + * Requires `DATAMANAGEMENT` (**Can manage data**) and `USERMANAGEMENT` + * (**Can manage users**) privileges. #### **Usage Guidelines** This API is only applicable for + * `USER`, `GROUP`, and `ROLES` metadata types. - + * `batch_offset` Indicates the starting position within the complete dataset from + * which the API should begin returning objects. Useful for paginating results efficiently. - + * `batch_size` Specifies the number of objects or items to retrieve in a single + * request. Helps control response size for better performance. - `edoc_format` + * Defines the format of the TML content. The exported metadata can be in JSON or YAML format. - + * `export_dependent` Specifies whether to include dependent metadata objects in the + * export. Ensures related objects are also retrieved if needed. - `all_orgs_override` + * Indicates whether the export operation applies across all organizations. Useful for + * multi-tenant environments where cross-org exports are required. + * + * @param exportMetadataTMLBatchedRequest (required) + * @return Object + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the + * response body + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 Export TMLs of specified metadata objects is successful. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public Object exportMetadataTMLBatched( + ExportMetadataTMLBatchedRequest exportMetadataTMLBatchedRequest) throws ApiException { + ApiResponse localVarResp = + exportMetadataTMLBatchedWithHttpInfo(exportMetadataTMLBatchedRequest); + return localVarResp.getData(); + } + + /** + * Version: 10.1.0.cl or later Exports the [TML](https://docs.thoughtspot.com/cloud/latest/tml) + * representation of metadata objects in JSON or YAML format. ### **Permissions Required** + * Requires `DATAMANAGEMENT` (**Can manage data**) and `USERMANAGEMENT` + * (**Can manage users**) privileges. #### **Usage Guidelines** This API is only applicable for + * `USER`, `GROUP`, and `ROLES` metadata types. - + * `batch_offset` Indicates the starting position within the complete dataset from + * which the API should begin returning objects. Useful for paginating results efficiently. - + * `batch_size` Specifies the number of objects or items to retrieve in a single + * request. Helps control response size for better performance. - `edoc_format` + * Defines the format of the TML content. The exported metadata can be in JSON or YAML format. - + * `export_dependent` Specifies whether to include dependent metadata objects in the + * export. Ensures related objects are also retrieved if needed. - `all_orgs_override` + * Indicates whether the export operation applies across all organizations. Useful for + * multi-tenant environments where cross-org exports are required. + * + * @param exportMetadataTMLBatchedRequest (required) + * @return ApiResponse<Object> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the + * response body + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 Export TMLs of specified metadata objects is successful. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public ApiResponse exportMetadataTMLBatchedWithHttpInfo( + ExportMetadataTMLBatchedRequest exportMetadataTMLBatchedRequest) throws ApiException { + okhttp3.Call localVarCall = + exportMetadataTMLBatchedValidateBeforeCall(exportMetadataTMLBatchedRequest, null); + Type localVarReturnType = new TypeToken() {}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); + } + + /** + * (asynchronously) Version: 10.1.0.cl or later Exports the + * [TML](https://docs.thoughtspot.com/cloud/latest/tml) representation of metadata objects in + * JSON or YAML format. ### **Permissions Required** Requires `DATAMANAGEMENT` (**Can + * manage data**) and `USERMANAGEMENT` (**Can manage users**) privileges. #### **Usage + * Guidelines** This API is only applicable for `USER`, `GROUP`, and + * `ROLES` metadata types. - `batch_offset` Indicates the starting position + * within the complete dataset from which the API should begin returning objects. Useful for + * paginating results efficiently. - `batch_size` Specifies the number of objects or + * items to retrieve in a single request. Helps control response size for better performance. - + * `edoc_format` Defines the format of the TML content. The exported metadata can be + * in JSON or YAML format. - `export_dependent` Specifies whether to include dependent + * metadata objects in the export. Ensures related objects are also retrieved if needed. - + * `all_orgs_override` Indicates whether the export operation applies across all + * organizations. Useful for multi-tenant environments where cross-org exports are required. + * + * @param exportMetadataTMLBatchedRequest (required) + * @param _callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body + * object + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 Export TMLs of specified metadata objects is successful. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public okhttp3.Call exportMetadataTMLBatchedAsync( + ExportMetadataTMLBatchedRequest exportMetadataTMLBatchedRequest, + final ApiCallback _callback) + throws ApiException { + + okhttp3.Call localVarCall = + exportMetadataTMLBatchedValidateBeforeCall( + exportMetadataTMLBatchedRequest, _callback); + Type localVarReturnType = new TypeToken() {}.getType(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; + } + /** + * Build call for fetchAnswerSqlQuery + * + * @param fetchAnswerSqlQueryRequest (required) + * @param _callback Callback for upload/download progress + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 Fetching SQL query of specified metadata object is successful. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public okhttp3.Call fetchAnswerSqlQueryCall( + FetchAnswerSqlQueryRequest fetchAnswerSqlQueryRequest, final ApiCallback _callback) + throws ApiException { + String basePath = null; + // Operation Servers + String[] localBasePaths = new String[] {}; + + // Determine Base Path to Use + if (localCustomBaseUrl != null) { + basePath = localCustomBaseUrl; + } else if (localBasePaths.length > 0) { + basePath = localBasePaths[localHostIndex]; + } else { + basePath = null; + } + + Object localVarPostBody = fetchAnswerSqlQueryRequest; + + // create path and map variables + String localVarPath = "/api/rest/2.0/metadata/answer/sql"; + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + final String[] localVarAccepts = {"application/json"}; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = {"application/json"}; + final String localVarContentType = + localVarApiClient.selectHeaderContentType(localVarContentTypes); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } + + String[] localVarAuthNames = new String[] {"bearerAuth"}; + return localVarApiClient.buildCall( + basePath, + localVarPath, + "POST", + localVarQueryParams, + localVarCollectionQueryParams, + localVarPostBody, + localVarHeaderParams, + localVarCookieParams, + localVarFormParams, + localVarAuthNames, + _callback); + } + + @SuppressWarnings("rawtypes") + private okhttp3.Call fetchAnswerSqlQueryValidateBeforeCall( + FetchAnswerSqlQueryRequest fetchAnswerSqlQueryRequest, final ApiCallback _callback) + throws ApiException { + // verify the required parameter 'fetchAnswerSqlQueryRequest' is set + if (fetchAnswerSqlQueryRequest == null) { + throw new ApiException( + "Missing the required parameter 'fetchAnswerSqlQueryRequest' when calling" + + " fetchAnswerSqlQuery(Async)"); + } + + return fetchAnswerSqlQueryCall(fetchAnswerSqlQueryRequest, _callback); + } + + /** + * Version: 9.0.0.cl or later Fetches the underlying SQL query data for an Answer object. + * Requires at least view access to the Answer object. Upon successful execution, the API + * returns the SQL queries for the specified object as shown in this example: ``` + * { \"metadata_id\":\"8fbe44a8-46ad-4b16-8d39-184b2fada490\", + * \"metadata_name\":\"Total sales\", + * \"metadata_type\":\"ANSWER\", \"sql_queries\":[ { + * \"metadata_id\":\"8fbe44a8-46ad-4b16-8d39-184b2fada490\", + * \"metadata_name\":\"Total sales -test\", + * \"sql_query\":\"SELECT \\n \\\"ta_1\\\".\\\"REGION\\\" + * \\\"ca_1\\\", \\n \\\"ta_2\\\".\\\"PRODUCTNAME\\\" + * \\\"ca_2\\\", \\n \\\"ta_1\\\".\\\"STORENAME\\\" + * \\\"ca_3\\\", \\n CASE\\n WHEN sum(\\\"ta_3\\\".\\\"SALES\\\") + * IS NOT NULL THEN sum(\\\"ta_3\\\".\\\"SALES\\\")\\n ELSE 0\\n END + * \\\"ca_4\\\", \\n CASE\\n WHEN + * sum(\\\"ta_3\\\".\\\"QUANTITYPURCHASED\\\") IS NOT NULL THEN + * sum(\\\"ta_3\\\".\\\"QUANTITYPURCHASED\\\")\\n ELSE 0\\n END + * \\\"ca_5\\\"\\nFROM + * \\\"RETAILAPPAREL\\\".\\\"PUBLIC\\\".\\\"FACT_RETAPP_SALES\\\" + * \\\"ta_3\\\"\\n JOIN + * \\\"RETAILAPPAREL\\\".\\\"PUBLIC\\\".\\\"DIM_RETAPP_STORES\\\" + * \\\"ta_1\\\"\\n ON \\\"ta_3\\\".\\\"STOREID\\\" = + * \\\"ta_1\\\".\\\"STOREID\\\"\\n JOIN + * \\\"RETAILAPPAREL\\\".\\\"PUBLIC\\\".\\\"DIM_RETAPP_PRODUCTS\\\" + * \\\"ta_2\\\"\\n ON \\\"ta_3\\\".\\\"PRODUCTID\\\" = + * \\\"ta_2\\\".\\\"PRODUCTID\\\"\\nGROUP BY \\n \\\"ca_1\\\", \\n + * \\\"ca_2\\\", \\n \\\"ca_3\\\"\\n\" } ] } ``` + * + * @param fetchAnswerSqlQueryRequest (required) + * @return SqlQueryResponse + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the + * response body + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 Fetching SQL query of specified metadata object is successful. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public SqlQueryResponse fetchAnswerSqlQuery( + FetchAnswerSqlQueryRequest fetchAnswerSqlQueryRequest) throws ApiException { + ApiResponse localVarResp = + fetchAnswerSqlQueryWithHttpInfo(fetchAnswerSqlQueryRequest); + return localVarResp.getData(); + } + + /** + * Version: 9.0.0.cl or later Fetches the underlying SQL query data for an Answer object. + * Requires at least view access to the Answer object. Upon successful execution, the API + * returns the SQL queries for the specified object as shown in this example: ``` + * { \"metadata_id\":\"8fbe44a8-46ad-4b16-8d39-184b2fada490\", + * \"metadata_name\":\"Total sales\", + * \"metadata_type\":\"ANSWER\", \"sql_queries\":[ { + * \"metadata_id\":\"8fbe44a8-46ad-4b16-8d39-184b2fada490\", + * \"metadata_name\":\"Total sales -test\", + * \"sql_query\":\"SELECT \\n \\\"ta_1\\\".\\\"REGION\\\" + * \\\"ca_1\\\", \\n \\\"ta_2\\\".\\\"PRODUCTNAME\\\" + * \\\"ca_2\\\", \\n \\\"ta_1\\\".\\\"STORENAME\\\" + * \\\"ca_3\\\", \\n CASE\\n WHEN sum(\\\"ta_3\\\".\\\"SALES\\\") + * IS NOT NULL THEN sum(\\\"ta_3\\\".\\\"SALES\\\")\\n ELSE 0\\n END + * \\\"ca_4\\\", \\n CASE\\n WHEN + * sum(\\\"ta_3\\\".\\\"QUANTITYPURCHASED\\\") IS NOT NULL THEN + * sum(\\\"ta_3\\\".\\\"QUANTITYPURCHASED\\\")\\n ELSE 0\\n END + * \\\"ca_5\\\"\\nFROM + * \\\"RETAILAPPAREL\\\".\\\"PUBLIC\\\".\\\"FACT_RETAPP_SALES\\\" + * \\\"ta_3\\\"\\n JOIN + * \\\"RETAILAPPAREL\\\".\\\"PUBLIC\\\".\\\"DIM_RETAPP_STORES\\\" + * \\\"ta_1\\\"\\n ON \\\"ta_3\\\".\\\"STOREID\\\" = + * \\\"ta_1\\\".\\\"STOREID\\\"\\n JOIN + * \\\"RETAILAPPAREL\\\".\\\"PUBLIC\\\".\\\"DIM_RETAPP_PRODUCTS\\\" + * \\\"ta_2\\\"\\n ON \\\"ta_3\\\".\\\"PRODUCTID\\\" = + * \\\"ta_2\\\".\\\"PRODUCTID\\\"\\nGROUP BY \\n \\\"ca_1\\\", \\n + * \\\"ca_2\\\", \\n \\\"ca_3\\\"\\n\" } ] } ``` + * + * @param fetchAnswerSqlQueryRequest (required) + * @return ApiResponse<SqlQueryResponse> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the + * response body + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 Fetching SQL query of specified metadata object is successful. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public ApiResponse fetchAnswerSqlQueryWithHttpInfo( + FetchAnswerSqlQueryRequest fetchAnswerSqlQueryRequest) throws ApiException { + okhttp3.Call localVarCall = + fetchAnswerSqlQueryValidateBeforeCall(fetchAnswerSqlQueryRequest, null); + Type localVarReturnType = new TypeToken() {}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); + } + + /** + * (asynchronously) Version: 9.0.0.cl or later Fetches the underlying SQL query data for an + * Answer object. Requires at least view access to the Answer object. Upon successful execution, + * the API returns the SQL queries for the specified object as shown in this example: + * ``` { + * \"metadata_id\":\"8fbe44a8-46ad-4b16-8d39-184b2fada490\", + * \"metadata_name\":\"Total sales\", + * \"metadata_type\":\"ANSWER\", \"sql_queries\":[ { + * \"metadata_id\":\"8fbe44a8-46ad-4b16-8d39-184b2fada490\", + * \"metadata_name\":\"Total sales -test\", + * \"sql_query\":\"SELECT \\n \\\"ta_1\\\".\\\"REGION\\\" + * \\\"ca_1\\\", \\n \\\"ta_2\\\".\\\"PRODUCTNAME\\\" + * \\\"ca_2\\\", \\n \\\"ta_1\\\".\\\"STORENAME\\\" + * \\\"ca_3\\\", \\n CASE\\n WHEN sum(\\\"ta_3\\\".\\\"SALES\\\") + * IS NOT NULL THEN sum(\\\"ta_3\\\".\\\"SALES\\\")\\n ELSE 0\\n END + * \\\"ca_4\\\", \\n CASE\\n WHEN + * sum(\\\"ta_3\\\".\\\"QUANTITYPURCHASED\\\") IS NOT NULL THEN + * sum(\\\"ta_3\\\".\\\"QUANTITYPURCHASED\\\")\\n ELSE 0\\n END + * \\\"ca_5\\\"\\nFROM + * \\\"RETAILAPPAREL\\\".\\\"PUBLIC\\\".\\\"FACT_RETAPP_SALES\\\" + * \\\"ta_3\\\"\\n JOIN + * \\\"RETAILAPPAREL\\\".\\\"PUBLIC\\\".\\\"DIM_RETAPP_STORES\\\" + * \\\"ta_1\\\"\\n ON \\\"ta_3\\\".\\\"STOREID\\\" = + * \\\"ta_1\\\".\\\"STOREID\\\"\\n JOIN + * \\\"RETAILAPPAREL\\\".\\\"PUBLIC\\\".\\\"DIM_RETAPP_PRODUCTS\\\" + * \\\"ta_2\\\"\\n ON \\\"ta_3\\\".\\\"PRODUCTID\\\" = + * \\\"ta_2\\\".\\\"PRODUCTID\\\"\\nGROUP BY \\n \\\"ca_1\\\", \\n + * \\\"ca_2\\\", \\n \\\"ca_3\\\"\\n\" } ] } ``` + * + * @param fetchAnswerSqlQueryRequest (required) + * @param _callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body + * object + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 Fetching SQL query of specified metadata object is successful. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public okhttp3.Call fetchAnswerSqlQueryAsync( + FetchAnswerSqlQueryRequest fetchAnswerSqlQueryRequest, + final ApiCallback _callback) + throws ApiException { + + okhttp3.Call localVarCall = + fetchAnswerSqlQueryValidateBeforeCall(fetchAnswerSqlQueryRequest, _callback); + Type localVarReturnType = new TypeToken() {}.getType(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; + } + /** + * Build call for fetchAsyncImportTaskStatus + * + * @param fetchAsyncImportTaskStatusRequest (required) + * @param _callback Callback for upload/download progress + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 Async TML Import Task statuses fetched successfully. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public okhttp3.Call fetchAsyncImportTaskStatusCall( + FetchAsyncImportTaskStatusRequest fetchAsyncImportTaskStatusRequest, + final ApiCallback _callback) + throws ApiException { + String basePath = null; + // Operation Servers + String[] localBasePaths = new String[] {}; + + // Determine Base Path to Use + if (localCustomBaseUrl != null) { + basePath = localCustomBaseUrl; + } else if (localBasePaths.length > 0) { + basePath = localBasePaths[localHostIndex]; + } else { + basePath = null; + } + + Object localVarPostBody = fetchAsyncImportTaskStatusRequest; + + // create path and map variables + String localVarPath = "/api/rest/2.0/metadata/tml/async/status"; + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + final String[] localVarAccepts = {"application/json"}; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = {"application/json"}; + final String localVarContentType = + localVarApiClient.selectHeaderContentType(localVarContentTypes); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } + + String[] localVarAuthNames = new String[] {"bearerAuth"}; + return localVarApiClient.buildCall( + basePath, + localVarPath, + "POST", + localVarQueryParams, + localVarCollectionQueryParams, + localVarPostBody, + localVarHeaderParams, + localVarCookieParams, + localVarFormParams, + localVarAuthNames, + _callback); + } + + @SuppressWarnings("rawtypes") + private okhttp3.Call fetchAsyncImportTaskStatusValidateBeforeCall( + FetchAsyncImportTaskStatusRequest fetchAsyncImportTaskStatusRequest, + final ApiCallback _callback) + throws ApiException { + // verify the required parameter 'fetchAsyncImportTaskStatusRequest' is set + if (fetchAsyncImportTaskStatusRequest == null) { + throw new ApiException( + "Missing the required parameter 'fetchAsyncImportTaskStatusRequest' when" + + " calling fetchAsyncImportTaskStatus(Async)"); + } + + return fetchAsyncImportTaskStatusCall(fetchAsyncImportTaskStatusRequest, _callback); + } + + /** + * Version: 10.4.0.cl or later Gets information about the status of the TML async import task + * scheduled using the `/api/rest/2.0/metadata/tml/async/import` API call. To fetch + * the task details, specify the ID of the TML async import task. Requires access to the task + * ID. The API allows users who initiated the asynchronous TML import via + * `/api/rest/2.0/metadata/tml/async/import` to view the status of their tasks. Users + * with administration privilege can view the status of all import tasks initiated by the users + * in their Org. #### Usage guidelines See [TML API + * Documentation](https://developers.thoughtspot.com/docs/tml#_fetch_status_of_the_tml_import_task) + * for usage guidelines. + * + * @param fetchAsyncImportTaskStatusRequest (required) + * @return GetAsyncImportStatusResponse + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the + * response body + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 Async TML Import Task statuses fetched successfully. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public GetAsyncImportStatusResponse fetchAsyncImportTaskStatus( + FetchAsyncImportTaskStatusRequest fetchAsyncImportTaskStatusRequest) + throws ApiException { + ApiResponse localVarResp = + fetchAsyncImportTaskStatusWithHttpInfo(fetchAsyncImportTaskStatusRequest); + return localVarResp.getData(); + } + + /** + * Version: 10.4.0.cl or later Gets information about the status of the TML async import task + * scheduled using the `/api/rest/2.0/metadata/tml/async/import` API call. To fetch + * the task details, specify the ID of the TML async import task. Requires access to the task + * ID. The API allows users who initiated the asynchronous TML import via + * `/api/rest/2.0/metadata/tml/async/import` to view the status of their tasks. Users + * with administration privilege can view the status of all import tasks initiated by the users + * in their Org. #### Usage guidelines See [TML API + * Documentation](https://developers.thoughtspot.com/docs/tml#_fetch_status_of_the_tml_import_task) + * for usage guidelines. + * + * @param fetchAsyncImportTaskStatusRequest (required) + * @return ApiResponse<GetAsyncImportStatusResponse> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the + * response body + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 Async TML Import Task statuses fetched successfully. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public ApiResponse fetchAsyncImportTaskStatusWithHttpInfo( + FetchAsyncImportTaskStatusRequest fetchAsyncImportTaskStatusRequest) + throws ApiException { + okhttp3.Call localVarCall = + fetchAsyncImportTaskStatusValidateBeforeCall( + fetchAsyncImportTaskStatusRequest, null); + Type localVarReturnType = new TypeToken() {}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); + } + + /** + * (asynchronously) Version: 10.4.0.cl or later Gets information about the status of the TML + * async import task scheduled using the `/api/rest/2.0/metadata/tml/async/import` API + * call. To fetch the task details, specify the ID of the TML async import task. Requires access + * to the task ID. The API allows users who initiated the asynchronous TML import via + * `/api/rest/2.0/metadata/tml/async/import` to view the status of their tasks. Users + * with administration privilege can view the status of all import tasks initiated by the users + * in their Org. #### Usage guidelines See [TML API + * Documentation](https://developers.thoughtspot.com/docs/tml#_fetch_status_of_the_tml_import_task) + * for usage guidelines. + * + * @param fetchAsyncImportTaskStatusRequest (required) + * @param _callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body + * object + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 Async TML Import Task statuses fetched successfully. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public okhttp3.Call fetchAsyncImportTaskStatusAsync( + FetchAsyncImportTaskStatusRequest fetchAsyncImportTaskStatusRequest, + final ApiCallback _callback) + throws ApiException { + + okhttp3.Call localVarCall = + fetchAsyncImportTaskStatusValidateBeforeCall( + fetchAsyncImportTaskStatusRequest, _callback); + Type localVarReturnType = new TypeToken() {}.getType(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; + } + /** + * Build call for fetchLiveboardSqlQuery + * + * @param fetchLiveboardSqlQueryRequest (required) + * @param _callback Callback for upload/download progress + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 Fetching SQL query of specified metadata object is successful. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public okhttp3.Call fetchLiveboardSqlQueryCall( + FetchLiveboardSqlQueryRequest fetchLiveboardSqlQueryRequest, + final ApiCallback _callback) + throws ApiException { + String basePath = null; + // Operation Servers + String[] localBasePaths = new String[] {}; + + // Determine Base Path to Use + if (localCustomBaseUrl != null) { + basePath = localCustomBaseUrl; + } else if (localBasePaths.length > 0) { + basePath = localBasePaths[localHostIndex]; + } else { + basePath = null; + } + + Object localVarPostBody = fetchLiveboardSqlQueryRequest; + + // create path and map variables + String localVarPath = "/api/rest/2.0/metadata/liveboard/sql"; + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + final String[] localVarAccepts = {"application/json"}; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = {"application/json"}; + final String localVarContentType = + localVarApiClient.selectHeaderContentType(localVarContentTypes); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } + + String[] localVarAuthNames = new String[] {"bearerAuth"}; + return localVarApiClient.buildCall( + basePath, + localVarPath, + "POST", + localVarQueryParams, + localVarCollectionQueryParams, + localVarPostBody, + localVarHeaderParams, + localVarCookieParams, + localVarFormParams, + localVarAuthNames, + _callback); + } + + @SuppressWarnings("rawtypes") + private okhttp3.Call fetchLiveboardSqlQueryValidateBeforeCall( + FetchLiveboardSqlQueryRequest fetchLiveboardSqlQueryRequest, + final ApiCallback _callback) + throws ApiException { + // verify the required parameter 'fetchLiveboardSqlQueryRequest' is set + if (fetchLiveboardSqlQueryRequest == null) { + throw new ApiException( + "Missing the required parameter 'fetchLiveboardSqlQueryRequest' when calling" + + " fetchLiveboardSqlQuery(Async)"); + } + + return fetchLiveboardSqlQueryCall(fetchLiveboardSqlQueryRequest, _callback); + } + + /** + * Version: 9.0.0.cl or later Fetches the underlying SQL query data for a Liveboard object and + * its visualizations. Requires at least view access to the Liveboard object. To get SQL query + * data for a Liveboard, specify the GUID of the Liveboard. Optionally, you can add an array of + * visualization GUIDs to retrieve the SQL query data for visualizations in the Liveboard. Upon + * successful execution, the API returns the SQL queries for the specified object as shown in + * this example: ``` { \"metadata_id\": + * \"fa68ae91-7588-4136-bacd-d71fb12dda69\", \"metadata_name\": \"Total + * Sales\", \"metadata_type\": \"LIVEBOARD\", + * \"sql_queries\": [ { \"metadata_id\": + * \"b3b6d2b9-089a-490c-8e16-b144650b7843\", \"metadata_name\": \"Total + * quantity purchased, Total sales by region\", \"sql_query\": \"SELECT \\n + * \\\"ta_1\\\".\\\"REGION\\\" \\\"ca_1\\\", \\n CASE\\n WHEN + * sum(\\\"ta_2\\\".\\\"QUANTITYPURCHASED\\\") IS NOT NULL THEN + * sum(\\\"ta_2\\\".\\\"QUANTITYPURCHASED\\\")\\n ELSE 0\\n END + * \\\"ca_2\\\", \\n CASE\\n WHEN sum(\\\"ta_2\\\".\\\"SALES\\\") + * IS NOT NULL THEN sum(\\\"ta_2\\\".\\\"SALES\\\")\\n ELSE 0\\n END + * \\\"ca_3\\\"\\nFROM + * \\\"RETAILAPPAREL\\\".\\\"PUBLIC\\\".\\\"FACT_RETAPP_SALES\\\" + * \\\"ta_2\\\"\\n JOIN + * \\\"RETAILAPPAREL\\\".\\\"PUBLIC\\\".\\\"DIM_RETAPP_STORES\\\" + * \\\"ta_1\\\"\\n ON \\\"ta_2\\\".\\\"STOREID\\\" = + * \\\"ta_1\\\".\\\"STOREID\\\"\\nGROUP BY \\\"ca_1\\\"\" } ] + * } ``` + * + * @param fetchLiveboardSqlQueryRequest (required) + * @return SqlQueryResponse + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the + * response body + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 Fetching SQL query of specified metadata object is successful. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public SqlQueryResponse fetchLiveboardSqlQuery( + FetchLiveboardSqlQueryRequest fetchLiveboardSqlQueryRequest) throws ApiException { + ApiResponse localVarResp = + fetchLiveboardSqlQueryWithHttpInfo(fetchLiveboardSqlQueryRequest); + return localVarResp.getData(); + } + + /** + * Version: 9.0.0.cl or later Fetches the underlying SQL query data for a Liveboard object and + * its visualizations. Requires at least view access to the Liveboard object. To get SQL query + * data for a Liveboard, specify the GUID of the Liveboard. Optionally, you can add an array of + * visualization GUIDs to retrieve the SQL query data for visualizations in the Liveboard. Upon + * successful execution, the API returns the SQL queries for the specified object as shown in + * this example: ``` { \"metadata_id\": + * \"fa68ae91-7588-4136-bacd-d71fb12dda69\", \"metadata_name\": \"Total + * Sales\", \"metadata_type\": \"LIVEBOARD\", + * \"sql_queries\": [ { \"metadata_id\": + * \"b3b6d2b9-089a-490c-8e16-b144650b7843\", \"metadata_name\": \"Total + * quantity purchased, Total sales by region\", \"sql_query\": \"SELECT \\n + * \\\"ta_1\\\".\\\"REGION\\\" \\\"ca_1\\\", \\n CASE\\n WHEN + * sum(\\\"ta_2\\\".\\\"QUANTITYPURCHASED\\\") IS NOT NULL THEN + * sum(\\\"ta_2\\\".\\\"QUANTITYPURCHASED\\\")\\n ELSE 0\\n END + * \\\"ca_2\\\", \\n CASE\\n WHEN sum(\\\"ta_2\\\".\\\"SALES\\\") + * IS NOT NULL THEN sum(\\\"ta_2\\\".\\\"SALES\\\")\\n ELSE 0\\n END + * \\\"ca_3\\\"\\nFROM + * \\\"RETAILAPPAREL\\\".\\\"PUBLIC\\\".\\\"FACT_RETAPP_SALES\\\" + * \\\"ta_2\\\"\\n JOIN + * \\\"RETAILAPPAREL\\\".\\\"PUBLIC\\\".\\\"DIM_RETAPP_STORES\\\" + * \\\"ta_1\\\"\\n ON \\\"ta_2\\\".\\\"STOREID\\\" = + * \\\"ta_1\\\".\\\"STOREID\\\"\\nGROUP BY \\\"ca_1\\\"\" } ] + * } ``` + * + * @param fetchLiveboardSqlQueryRequest (required) + * @return ApiResponse<SqlQueryResponse> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the + * response body + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 Fetching SQL query of specified metadata object is successful. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public ApiResponse fetchLiveboardSqlQueryWithHttpInfo( + FetchLiveboardSqlQueryRequest fetchLiveboardSqlQueryRequest) throws ApiException { + okhttp3.Call localVarCall = + fetchLiveboardSqlQueryValidateBeforeCall(fetchLiveboardSqlQueryRequest, null); + Type localVarReturnType = new TypeToken() {}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); + } + + /** + * (asynchronously) Version: 9.0.0.cl or later Fetches the underlying SQL query data for a + * Liveboard object and its visualizations. Requires at least view access to the Liveboard + * object. To get SQL query data for a Liveboard, specify the GUID of the Liveboard. Optionally, + * you can add an array of visualization GUIDs to retrieve the SQL query data for visualizations + * in the Liveboard. Upon successful execution, the API returns the SQL queries for the + * specified object as shown in this example: ``` { \"metadata_id\": + * \"fa68ae91-7588-4136-bacd-d71fb12dda69\", \"metadata_name\": \"Total + * Sales\", \"metadata_type\": \"LIVEBOARD\", + * \"sql_queries\": [ { \"metadata_id\": + * \"b3b6d2b9-089a-490c-8e16-b144650b7843\", \"metadata_name\": \"Total + * quantity purchased, Total sales by region\", \"sql_query\": \"SELECT \\n + * \\\"ta_1\\\".\\\"REGION\\\" \\\"ca_1\\\", \\n CASE\\n WHEN + * sum(\\\"ta_2\\\".\\\"QUANTITYPURCHASED\\\") IS NOT NULL THEN + * sum(\\\"ta_2\\\".\\\"QUANTITYPURCHASED\\\")\\n ELSE 0\\n END + * \\\"ca_2\\\", \\n CASE\\n WHEN sum(\\\"ta_2\\\".\\\"SALES\\\") + * IS NOT NULL THEN sum(\\\"ta_2\\\".\\\"SALES\\\")\\n ELSE 0\\n END + * \\\"ca_3\\\"\\nFROM + * \\\"RETAILAPPAREL\\\".\\\"PUBLIC\\\".\\\"FACT_RETAPP_SALES\\\" + * \\\"ta_2\\\"\\n JOIN + * \\\"RETAILAPPAREL\\\".\\\"PUBLIC\\\".\\\"DIM_RETAPP_STORES\\\" + * \\\"ta_1\\\"\\n ON \\\"ta_2\\\".\\\"STOREID\\\" = + * \\\"ta_1\\\".\\\"STOREID\\\"\\nGROUP BY \\\"ca_1\\\"\" } ] + * } ``` + * + * @param fetchLiveboardSqlQueryRequest (required) + * @param _callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body + * object + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 Fetching SQL query of specified metadata object is successful. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public okhttp3.Call fetchLiveboardSqlQueryAsync( + FetchLiveboardSqlQueryRequest fetchLiveboardSqlQueryRequest, + final ApiCallback _callback) + throws ApiException { + + okhttp3.Call localVarCall = + fetchLiveboardSqlQueryValidateBeforeCall(fetchLiveboardSqlQueryRequest, _callback); + Type localVarReturnType = new TypeToken() {}.getType(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; + } + /** + * Build call for importMetadataTML + * + * @param importMetadataTMLRequest (required) + * @param _callback Callback for upload/download progress + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 Import metadata objects using specified TMLs is successful. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public okhttp3.Call importMetadataTMLCall( + ImportMetadataTMLRequest importMetadataTMLRequest, final ApiCallback _callback) + throws ApiException { + String basePath = null; + // Operation Servers + String[] localBasePaths = new String[] {}; + + // Determine Base Path to Use + if (localCustomBaseUrl != null) { + basePath = localCustomBaseUrl; + } else if (localBasePaths.length > 0) { + basePath = localBasePaths[localHostIndex]; + } else { + basePath = null; + } + + Object localVarPostBody = importMetadataTMLRequest; + + // create path and map variables + String localVarPath = "/api/rest/2.0/metadata/tml/import"; + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + final String[] localVarAccepts = {"application/json"}; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = {"application/json"}; + final String localVarContentType = + localVarApiClient.selectHeaderContentType(localVarContentTypes); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } + + String[] localVarAuthNames = new String[] {"bearerAuth"}; + return localVarApiClient.buildCall( + basePath, + localVarPath, + "POST", + localVarQueryParams, + localVarCollectionQueryParams, + localVarPostBody, + localVarHeaderParams, + localVarCookieParams, + localVarFormParams, + localVarAuthNames, + _callback); + } + + @SuppressWarnings("rawtypes") + private okhttp3.Call importMetadataTMLValidateBeforeCall( + ImportMetadataTMLRequest importMetadataTMLRequest, final ApiCallback _callback) + throws ApiException { + // verify the required parameter 'importMetadataTMLRequest' is set + if (importMetadataTMLRequest == null) { + throw new ApiException( + "Missing the required parameter 'importMetadataTMLRequest' when calling" + + " importMetadataTML(Async)"); + } + + return importMetadataTMLCall(importMetadataTMLRequest, _callback); + } + + /** + * Version: 9.0.0.cl or later Imports [TML](https://docs.thoughtspot.com/cloud/latest/tml) files + * into ThoughtSpot. Requires `DATAMANAGEMENT` (**Can manage data**) or + * `ADMINISTRATION` (**Can administer ThoughtsSpot**) privilege. If [Role-Based Access + * Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, + * the following Data control privileges may be required: - + * `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) - + * `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` (**Can manage data models**) #### Usage + * guidelines * Import all related objects in a single TML Import API call. For example, Tables + * that use the same Connection object and Worksheets connected to these Tables. * Include the + * `fqn` property to distinguish objects that have the same name. For example, if you + * have multiple Connections or Worksheets with the same name on ThoughtSpot and the Connection + * or Worksheet referenced in your TML file does not have a unique name to distinguish, it may + * result in invalid object references. Adding `fqn` helps ThoughtSpot differentiate a + * Table from another with the same name. We recommend [exporting TML with + * FQNs](#/http/api-endpoints/metadata/export-metadata-tml) and using these during the import + * operation. * You can upload multiple TML files at a time. If you import a Worksheet along + * with Liveboards, Answers, and other dependent objects in a single API call, the imported + * objects will be immediately available for use. When you import only a Worksheet object, it + * may take some time for the Worksheet to become available in the ThoughtSpot system. Please + * wait for a few minutes, and then proceed to create an Answer and Liveboard from the newly + * imported Worksheet. For more information, see [TML + * Documentation](https://developers.thoughtspot.com/docs/tml#_import_a_tml). + * + * @param importMetadataTMLRequest (required) + * @return List<Object> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the + * response body + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 Import metadata objects using specified TMLs is successful. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public List importMetadataTML(ImportMetadataTMLRequest importMetadataTMLRequest) + throws ApiException { + ApiResponse> localVarResp = + importMetadataTMLWithHttpInfo(importMetadataTMLRequest); + return localVarResp.getData(); + } + + /** + * Version: 9.0.0.cl or later Imports [TML](https://docs.thoughtspot.com/cloud/latest/tml) files + * into ThoughtSpot. Requires `DATAMANAGEMENT` (**Can manage data**) or + * `ADMINISTRATION` (**Can administer ThoughtsSpot**) privilege. If [Role-Based Access + * Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, + * the following Data control privileges may be required: - + * `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) - + * `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` (**Can manage data models**) #### Usage + * guidelines * Import all related objects in a single TML Import API call. For example, Tables + * that use the same Connection object and Worksheets connected to these Tables. * Include the + * `fqn` property to distinguish objects that have the same name. For example, if you + * have multiple Connections or Worksheets with the same name on ThoughtSpot and the Connection + * or Worksheet referenced in your TML file does not have a unique name to distinguish, it may + * result in invalid object references. Adding `fqn` helps ThoughtSpot differentiate a + * Table from another with the same name. We recommend [exporting TML with + * FQNs](#/http/api-endpoints/metadata/export-metadata-tml) and using these during the import + * operation. * You can upload multiple TML files at a time. If you import a Worksheet along + * with Liveboards, Answers, and other dependent objects in a single API call, the imported + * objects will be immediately available for use. When you import only a Worksheet object, it + * may take some time for the Worksheet to become available in the ThoughtSpot system. Please + * wait for a few minutes, and then proceed to create an Answer and Liveboard from the newly + * imported Worksheet. For more information, see [TML + * Documentation](https://developers.thoughtspot.com/docs/tml#_import_a_tml). + * + * @param importMetadataTMLRequest (required) + * @return ApiResponse<List<Object>> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the + * response body + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 Import metadata objects using specified TMLs is successful. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public ApiResponse> importMetadataTMLWithHttpInfo( + ImportMetadataTMLRequest importMetadataTMLRequest) throws ApiException { + okhttp3.Call localVarCall = + importMetadataTMLValidateBeforeCall(importMetadataTMLRequest, null); + Type localVarReturnType = new TypeToken>() {}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); + } + + /** + * (asynchronously) Version: 9.0.0.cl or later Imports + * [TML](https://docs.thoughtspot.com/cloud/latest/tml) files into ThoughtSpot. Requires + * `DATAMANAGEMENT` (**Can manage data**) or `ADMINISTRATION` (**Can + * administer ThoughtsSpot**) privilege. If [Role-Based Access Control + * (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the + * following Data control privileges may be required: - + * `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) - + * `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` (**Can manage data models**) #### Usage + * guidelines * Import all related objects in a single TML Import API call. For example, Tables + * that use the same Connection object and Worksheets connected to these Tables. * Include the + * `fqn` property to distinguish objects that have the same name. For example, if you + * have multiple Connections or Worksheets with the same name on ThoughtSpot and the Connection + * or Worksheet referenced in your TML file does not have a unique name to distinguish, it may + * result in invalid object references. Adding `fqn` helps ThoughtSpot differentiate a + * Table from another with the same name. We recommend [exporting TML with + * FQNs](#/http/api-endpoints/metadata/export-metadata-tml) and using these during the import + * operation. * You can upload multiple TML files at a time. If you import a Worksheet along + * with Liveboards, Answers, and other dependent objects in a single API call, the imported + * objects will be immediately available for use. When you import only a Worksheet object, it + * may take some time for the Worksheet to become available in the ThoughtSpot system. Please + * wait for a few minutes, and then proceed to create an Answer and Liveboard from the newly + * imported Worksheet. For more information, see [TML + * Documentation](https://developers.thoughtspot.com/docs/tml#_import_a_tml). + * + * @param importMetadataTMLRequest (required) + * @param _callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body + * object + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 Import metadata objects using specified TMLs is successful. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public okhttp3.Call importMetadataTMLAsync( + ImportMetadataTMLRequest importMetadataTMLRequest, + final ApiCallback> _callback) + throws ApiException { + + okhttp3.Call localVarCall = + importMetadataTMLValidateBeforeCall(importMetadataTMLRequest, _callback); + Type localVarReturnType = new TypeToken>() {}.getType(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; + } + /** + * Build call for importMetadataTMLAsync + * + * @param importMetadataTMLAsyncRequest (required) + * @param _callback Callback for upload/download progress + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 Async TML Import Task submitted successfully. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public okhttp3.Call importMetadataTMLAsyncCall( + ImportMetadataTMLAsyncRequest importMetadataTMLAsyncRequest, + final ApiCallback _callback) + throws ApiException { + String basePath = null; + // Operation Servers + String[] localBasePaths = new String[] {}; + + // Determine Base Path to Use + if (localCustomBaseUrl != null) { + basePath = localCustomBaseUrl; + } else if (localBasePaths.length > 0) { + basePath = localBasePaths[localHostIndex]; + } else { + basePath = null; + } + + Object localVarPostBody = importMetadataTMLAsyncRequest; + + // create path and map variables + String localVarPath = "/api/rest/2.0/metadata/tml/async/import"; + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + final String[] localVarAccepts = {"application/json"}; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = {"application/json"}; + final String localVarContentType = + localVarApiClient.selectHeaderContentType(localVarContentTypes); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } + + String[] localVarAuthNames = new String[] {"bearerAuth"}; + return localVarApiClient.buildCall( + basePath, + localVarPath, + "POST", + localVarQueryParams, + localVarCollectionQueryParams, + localVarPostBody, + localVarHeaderParams, + localVarCookieParams, + localVarFormParams, + localVarAuthNames, + _callback); + } + + @SuppressWarnings("rawtypes") + private okhttp3.Call importMetadataTMLAsyncValidateBeforeCall( + ImportMetadataTMLAsyncRequest importMetadataTMLAsyncRequest, + final ApiCallback _callback) + throws ApiException { + // verify the required parameter 'importMetadataTMLAsyncRequest' is set + if (importMetadataTMLAsyncRequest == null) { + throw new ApiException( + "Missing the required parameter 'importMetadataTMLAsyncRequest' when calling" + + " importMetadataTMLAsync(Async)"); + } + + return importMetadataTMLAsyncCall(importMetadataTMLAsyncRequest, _callback); + } + + /** + * Version: 10.4.0.cl or later Schedules a task to import + * [TML](https://docs.thoughtspot.com/cloud/latest/tml) files into ThoughtSpot. You can use this + * API endpoint to process TML objects asynchronously when importing TMLs of large and complex + * metadata objects into ThoughtSpot. Unlike the synchronous import TML operation, the API + * processes TML data in the background and returns a task ID, which can be used to check the + * status of the import task via `/api/rest/2.0/metadata/tml/async/status` API + * endpoint. Requires `DATAMANAGEMENT` (**Can manage data**) or + * `ADMINISTRATION` (**Can administer ThoughtsSpot**) privilege, and edit access to + * the TML objects. If [Role-Based Access Control + * (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the + * following Data control privileges may be required: - + * `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) - + * `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` (**Can manage data models**) #### Usage + * guidelines See [Async TML API + * Documentation](https://developers.thoughtspot.com/docs/tml#_import_tml_objects_asynchronously) + * for usage guidelines. + * + * @param importMetadataTMLAsyncRequest (required) + * @return ImportEPackAsyncTaskStatus + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the + * response body + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 Async TML Import Task submitted successfully. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public ImportEPackAsyncTaskStatus importMetadataTMLAsync( + ImportMetadataTMLAsyncRequest importMetadataTMLAsyncRequest) throws ApiException { + ApiResponse localVarResp = + importMetadataTMLAsyncWithHttpInfo(importMetadataTMLAsyncRequest); + return localVarResp.getData(); + } + + /** + * Version: 10.4.0.cl or later Schedules a task to import + * [TML](https://docs.thoughtspot.com/cloud/latest/tml) files into ThoughtSpot. You can use this + * API endpoint to process TML objects asynchronously when importing TMLs of large and complex + * metadata objects into ThoughtSpot. Unlike the synchronous import TML operation, the API + * processes TML data in the background and returns a task ID, which can be used to check the + * status of the import task via `/api/rest/2.0/metadata/tml/async/status` API + * endpoint. Requires `DATAMANAGEMENT` (**Can manage data**) or + * `ADMINISTRATION` (**Can administer ThoughtsSpot**) privilege, and edit access to + * the TML objects. If [Role-Based Access Control + * (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the + * following Data control privileges may be required: - + * `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) - + * `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` (**Can manage data models**) #### Usage + * guidelines See [Async TML API + * Documentation](https://developers.thoughtspot.com/docs/tml#_import_tml_objects_asynchronously) + * for usage guidelines. + * + * @param importMetadataTMLAsyncRequest (required) + * @return ApiResponse<ImportEPackAsyncTaskStatus> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the + * response body + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 Async TML Import Task submitted successfully. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public ApiResponse importMetadataTMLAsyncWithHttpInfo( + ImportMetadataTMLAsyncRequest importMetadataTMLAsyncRequest) throws ApiException { + okhttp3.Call localVarCall = + importMetadataTMLAsyncValidateBeforeCall(importMetadataTMLAsyncRequest, null); + Type localVarReturnType = new TypeToken() {}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); + } + + /** + * (asynchronously) Version: 10.4.0.cl or later Schedules a task to import + * [TML](https://docs.thoughtspot.com/cloud/latest/tml) files into ThoughtSpot. You can use this + * API endpoint to process TML objects asynchronously when importing TMLs of large and complex + * metadata objects into ThoughtSpot. Unlike the synchronous import TML operation, the API + * processes TML data in the background and returns a task ID, which can be used to check the + * status of the import task via `/api/rest/2.0/metadata/tml/async/status` API + * endpoint. Requires `DATAMANAGEMENT` (**Can manage data**) or + * `ADMINISTRATION` (**Can administer ThoughtsSpot**) privilege, and edit access to + * the TML objects. If [Role-Based Access Control + * (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the + * following Data control privileges may be required: - + * `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) - + * `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` (**Can manage data models**) #### Usage + * guidelines See [Async TML API + * Documentation](https://developers.thoughtspot.com/docs/tml#_import_tml_objects_asynchronously) + * for usage guidelines. + * + * @param importMetadataTMLAsyncRequest (required) + * @param _callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body + * object + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 Async TML Import Task submitted successfully. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public okhttp3.Call importMetadataTMLAsyncAsync( + ImportMetadataTMLAsyncRequest importMetadataTMLAsyncRequest, + final ApiCallback _callback) + throws ApiException { + + okhttp3.Call localVarCall = + importMetadataTMLAsyncValidateBeforeCall(importMetadataTMLAsyncRequest, _callback); + Type localVarReturnType = new TypeToken() {}.getType(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; + } + /** + * Build call for parameterizeMetadata + * + * @param parameterizeMetadataRequest (required) + * @param _callback Callback for upload/download progress + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
204 Parameterize successful. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ * + * @deprecated + */ + @Deprecated + public okhttp3.Call parameterizeMetadataCall( + ParameterizeMetadataRequest parameterizeMetadataRequest, final ApiCallback _callback) + throws ApiException { + String basePath = null; + // Operation Servers + String[] localBasePaths = new String[] {}; + + // Determine Base Path to Use + if (localCustomBaseUrl != null) { + basePath = localCustomBaseUrl; + } else if (localBasePaths.length > 0) { + basePath = localBasePaths[localHostIndex]; + } else { + basePath = null; + } + + Object localVarPostBody = parameterizeMetadataRequest; + + // create path and map variables + String localVarPath = "/api/rest/2.0/metadata/parameterize"; + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + final String[] localVarAccepts = {"application/json"}; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = {"application/json"}; + final String localVarContentType = + localVarApiClient.selectHeaderContentType(localVarContentTypes); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } + + String[] localVarAuthNames = new String[] {"bearerAuth"}; + return localVarApiClient.buildCall( + basePath, + localVarPath, + "POST", + localVarQueryParams, + localVarCollectionQueryParams, + localVarPostBody, + localVarHeaderParams, + localVarCookieParams, + localVarFormParams, + localVarAuthNames, + _callback); + } + + @Deprecated + @SuppressWarnings("rawtypes") + private okhttp3.Call parameterizeMetadataValidateBeforeCall( + ParameterizeMetadataRequest parameterizeMetadataRequest, final ApiCallback _callback) + throws ApiException { + // verify the required parameter 'parameterizeMetadataRequest' is set + if (parameterizeMetadataRequest == null) { + throw new ApiException( + "Missing the required parameter 'parameterizeMetadataRequest' when calling" + + " parameterizeMetadata(Async)"); + } + + return parameterizeMetadataCall(parameterizeMetadataRequest, _callback); + } + + /** + * Parameterize fields in metadata objects. Version: 10.9.0.cl or later **Note:** This API + * endpoint is deprecated and will be removed from ThoughtSpot in a future release. Use [POST + * /api/rest/2.0/metadata/parameterize-fields](/api/rest/2.0/metadata/parameterize-fields) + * instead. Allows parameterizing fields in metadata objects in ThoughtSpot. Requires + * appropriate permissions to modify the metadata object. The API endpoint allows parameterizing + * the following types of metadata objects: * Logical Tables * Connections * Connection Configs + * For a Logical Table the field type must be `ATTRIBUTE` and field name can be one + * of: * databaseName * schemaName * tableName For a Connection or Connection Config, the field + * type is always `CONNECTION_PROPERTY`. In this case, field_name specifies the exact + * property of the Connection or Connection Config that needs to be parameterized. For + * Connection Config, the only supported field name is: * impersonate_user + * + * @param parameterizeMetadataRequest (required) + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the + * response body + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
204 Parameterize successful. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ * + * @deprecated + */ + @Deprecated + public void parameterizeMetadata(ParameterizeMetadataRequest parameterizeMetadataRequest) + throws ApiException { + parameterizeMetadataWithHttpInfo(parameterizeMetadataRequest); + } + + /** + * Parameterize fields in metadata objects. Version: 10.9.0.cl or later **Note:** This API + * endpoint is deprecated and will be removed from ThoughtSpot in a future release. Use [POST + * /api/rest/2.0/metadata/parameterize-fields](/api/rest/2.0/metadata/parameterize-fields) + * instead. Allows parameterizing fields in metadata objects in ThoughtSpot. Requires + * appropriate permissions to modify the metadata object. The API endpoint allows parameterizing + * the following types of metadata objects: * Logical Tables * Connections * Connection Configs + * For a Logical Table the field type must be `ATTRIBUTE` and field name can be one + * of: * databaseName * schemaName * tableName For a Connection or Connection Config, the field + * type is always `CONNECTION_PROPERTY`. In this case, field_name specifies the exact + * property of the Connection or Connection Config that needs to be parameterized. For + * Connection Config, the only supported field name is: * impersonate_user + * + * @param parameterizeMetadataRequest (required) + * @return ApiResponse<Void> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the + * response body + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
204 Parameterize successful. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ * + * @deprecated + */ + @Deprecated + public ApiResponse parameterizeMetadataWithHttpInfo( + ParameterizeMetadataRequest parameterizeMetadataRequest) throws ApiException { + okhttp3.Call localVarCall = + parameterizeMetadataValidateBeforeCall(parameterizeMetadataRequest, null); + return localVarApiClient.execute(localVarCall); + } + + /** + * (asynchronously) Parameterize fields in metadata objects. Version: 10.9.0.cl or later + * **Note:** This API endpoint is deprecated and will be removed from ThoughtSpot in a future + * release. Use [POST + * /api/rest/2.0/metadata/parameterize-fields](/api/rest/2.0/metadata/parameterize-fields) + * instead. Allows parameterizing fields in metadata objects in ThoughtSpot. Requires + * appropriate permissions to modify the metadata object. The API endpoint allows parameterizing + * the following types of metadata objects: * Logical Tables * Connections * Connection Configs + * For a Logical Table the field type must be `ATTRIBUTE` and field name can be one + * of: * databaseName * schemaName * tableName For a Connection or Connection Config, the field + * type is always `CONNECTION_PROPERTY`. In this case, field_name specifies the exact + * property of the Connection or Connection Config that needs to be parameterized. For + * Connection Config, the only supported field name is: * impersonate_user + * + * @param parameterizeMetadataRequest (required) + * @param _callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body + * object + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
204 Parameterize successful. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ * + * @deprecated + */ + @Deprecated + public okhttp3.Call parameterizeMetadataAsync( + ParameterizeMetadataRequest parameterizeMetadataRequest, + final ApiCallback _callback) + throws ApiException { + + okhttp3.Call localVarCall = + parameterizeMetadataValidateBeforeCall(parameterizeMetadataRequest, _callback); + localVarApiClient.executeAsync(localVarCall, _callback); + return localVarCall; + } + /** + * Build call for parameterizeMetadataFields + * + * @param parameterizeMetadataFieldsRequest (required) + * @param _callback Callback for upload/download progress + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
204 Parameterize successful. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public okhttp3.Call parameterizeMetadataFieldsCall( + ParameterizeMetadataFieldsRequest parameterizeMetadataFieldsRequest, + final ApiCallback _callback) + throws ApiException { + String basePath = null; + // Operation Servers + String[] localBasePaths = new String[] {}; + + // Determine Base Path to Use + if (localCustomBaseUrl != null) { + basePath = localCustomBaseUrl; + } else if (localBasePaths.length > 0) { + basePath = localBasePaths[localHostIndex]; + } else { + basePath = null; + } + + Object localVarPostBody = parameterizeMetadataFieldsRequest; + + // create path and map variables + String localVarPath = "/api/rest/2.0/metadata/parameterize-fields"; + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + final String[] localVarAccepts = {"application/json"}; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = {"application/json"}; + final String localVarContentType = + localVarApiClient.selectHeaderContentType(localVarContentTypes); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } + + String[] localVarAuthNames = new String[] {"bearerAuth"}; + return localVarApiClient.buildCall( + basePath, + localVarPath, + "POST", + localVarQueryParams, + localVarCollectionQueryParams, + localVarPostBody, + localVarHeaderParams, + localVarCookieParams, + localVarFormParams, + localVarAuthNames, + _callback); + } + + @SuppressWarnings("rawtypes") + private okhttp3.Call parameterizeMetadataFieldsValidateBeforeCall( + ParameterizeMetadataFieldsRequest parameterizeMetadataFieldsRequest, + final ApiCallback _callback) + throws ApiException { + // verify the required parameter 'parameterizeMetadataFieldsRequest' is set + if (parameterizeMetadataFieldsRequest == null) { + throw new ApiException( + "Missing the required parameter 'parameterizeMetadataFieldsRequest' when" + + " calling parameterizeMetadataFields(Async)"); + } + + return parameterizeMetadataFieldsCall(parameterizeMetadataFieldsRequest, _callback); + } + + /** + * Parameterize multiple fields of metadata objects. For example [schemaName, databaseName] for + * LOGICAL_TABLE. Version: 26.5.0.cl or later Allows parameterizing multiple fields of metadata + * objects in ThoughtSpot. For example, you can parameterize [schemaName, databaseName] for + * LOGICAL_TABLE. Requires appropriate permissions to modify the metadata object. The API + * endpoint allows parameterizing the following types of metadata objects: * Logical Tables * + * Connections * Connection Configs For a Logical Table, the field type must be + * `ATTRIBUTE` and field names can include: * databaseName * schemaName * tableName + * For a Connection or Connection Config, the field type is always + * `CONNECTION_PROPERTY`. In this case, field_names specifies the exact properties of + * the Connection or Connection Config that need to be parameterized. For Connection Config, + * supported field names include: * impersonate_user You can parameterize multiple fields at + * once by providing an array of field names. + * + * @param parameterizeMetadataFieldsRequest (required) + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the + * response body + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
204 Parameterize successful. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public void parameterizeMetadataFields( + ParameterizeMetadataFieldsRequest parameterizeMetadataFieldsRequest) + throws ApiException { + parameterizeMetadataFieldsWithHttpInfo(parameterizeMetadataFieldsRequest); + } + + /** + * Parameterize multiple fields of metadata objects. For example [schemaName, databaseName] for + * LOGICAL_TABLE. Version: 26.5.0.cl or later Allows parameterizing multiple fields of metadata + * objects in ThoughtSpot. For example, you can parameterize [schemaName, databaseName] for + * LOGICAL_TABLE. Requires appropriate permissions to modify the metadata object. The API + * endpoint allows parameterizing the following types of metadata objects: * Logical Tables * + * Connections * Connection Configs For a Logical Table, the field type must be + * `ATTRIBUTE` and field names can include: * databaseName * schemaName * tableName + * For a Connection or Connection Config, the field type is always + * `CONNECTION_PROPERTY`. In this case, field_names specifies the exact properties of + * the Connection or Connection Config that need to be parameterized. For Connection Config, + * supported field names include: * impersonate_user You can parameterize multiple fields at + * once by providing an array of field names. + * + * @param parameterizeMetadataFieldsRequest (required) + * @return ApiResponse<Void> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the + * response body + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
204 Parameterize successful. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public ApiResponse parameterizeMetadataFieldsWithHttpInfo( + ParameterizeMetadataFieldsRequest parameterizeMetadataFieldsRequest) + throws ApiException { + okhttp3.Call localVarCall = + parameterizeMetadataFieldsValidateBeforeCall( + parameterizeMetadataFieldsRequest, null); + return localVarApiClient.execute(localVarCall); + } + + /** + * (asynchronously) Parameterize multiple fields of metadata objects. For example [schemaName, + * databaseName] for LOGICAL_TABLE. Version: 26.5.0.cl or later Allows parameterizing multiple + * fields of metadata objects in ThoughtSpot. For example, you can parameterize [schemaName, + * databaseName] for LOGICAL_TABLE. Requires appropriate permissions to modify the metadata + * object. The API endpoint allows parameterizing the following types of metadata objects: * + * Logical Tables * Connections * Connection Configs For a Logical Table, the field type must be + * `ATTRIBUTE` and field names can include: * databaseName * schemaName * tableName + * For a Connection or Connection Config, the field type is always + * `CONNECTION_PROPERTY`. In this case, field_names specifies the exact properties of + * the Connection or Connection Config that need to be parameterized. For Connection Config, + * supported field names include: * impersonate_user You can parameterize multiple fields at + * once by providing an array of field names. + * + * @param parameterizeMetadataFieldsRequest (required) + * @param _callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body + * object + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
204 Parameterize successful. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public okhttp3.Call parameterizeMetadataFieldsAsync( + ParameterizeMetadataFieldsRequest parameterizeMetadataFieldsRequest, + final ApiCallback _callback) + throws ApiException { + + okhttp3.Call localVarCall = + parameterizeMetadataFieldsValidateBeforeCall( + parameterizeMetadataFieldsRequest, _callback); + localVarApiClient.executeAsync(localVarCall, _callback); + return localVarCall; + } + /** + * Build call for searchMetadata + * + * @param searchMetadataRequest (required) + * @param _callback Callback for upload/download progress + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 Metadata objects search result. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public okhttp3.Call searchMetadataCall( + SearchMetadataRequest searchMetadataRequest, final ApiCallback _callback) + throws ApiException { + String basePath = null; + // Operation Servers + String[] localBasePaths = new String[] {}; + + // Determine Base Path to Use + if (localCustomBaseUrl != null) { + basePath = localCustomBaseUrl; + } else if (localBasePaths.length > 0) { + basePath = localBasePaths[localHostIndex]; + } else { + basePath = null; + } + + Object localVarPostBody = searchMetadataRequest; + + // create path and map variables + String localVarPath = "/api/rest/2.0/metadata/search"; + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + final String[] localVarAccepts = {"application/json"}; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = {"application/json"}; + final String localVarContentType = + localVarApiClient.selectHeaderContentType(localVarContentTypes); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } + + String[] localVarAuthNames = new String[] {"bearerAuth"}; + return localVarApiClient.buildCall( + basePath, + localVarPath, + "POST", + localVarQueryParams, + localVarCollectionQueryParams, + localVarPostBody, + localVarHeaderParams, + localVarCookieParams, + localVarFormParams, + localVarAuthNames, + _callback); + } + + @SuppressWarnings("rawtypes") + private okhttp3.Call searchMetadataValidateBeforeCall( + SearchMetadataRequest searchMetadataRequest, final ApiCallback _callback) + throws ApiException { + // verify the required parameter 'searchMetadataRequest' is set + if (searchMetadataRequest == null) { + throw new ApiException( + "Missing the required parameter 'searchMetadataRequest' when calling" + + " searchMetadata(Async)"); + } + + return searchMetadataCall(searchMetadataRequest, _callback); + } + + /** + * Version: 9.0.0.cl or later Gets a list of metadata objects available on the ThoughtSpot + * system. This API endpoint is available to all users who have view access to the object. Users + * with `ADMINISTRATION` (**Can administer ThoughtSpot**) privileges can view data for + * all metadata objects, including users and groups. #### Usage guidelines - To get all metadata + * objects, send the API request without any attributes. - To get metadata objects of a specific + * type, set the `type` attribute. For example, to fetch a Worksheet, set the type as + * `LOGICAL_TABLE`. - To filter metadata objects within type + * `LOGICAL_TABLE`, set the `subtypes` attribute. For example, to fetch a + * Worksheet, set the type as `LOGICAL_TABLE` & subtypes as + * `[WORKSHEET]`. - To get a specific metadata object, specify the GUID. - To + * customize your search and filter the API response, you can use several parameters. You can + * search for objects created or modified by specific users, by tags applied to the objects, or + * by using the include parameters like `include_auto_created_objects`, + * `include_dependent_objects`, `include_headers`, + * `include_incomplete_objects`, and so on. You can also define sorting options to + * sort the data retrieved in the API response. - To get discoverable objects when linientmodel + * is enabled you can use `include_discoverable_objects` as true else false. Default + * value is true. - For liveboard metadata type, to get the newer format, set the + * `liveboard_response_format` as V2. Default value is V1. - To retrieve only objects + * that are published, set the `include_only_published_objects` as true. Default value + * is false. **NOTE**: The following parameters support pagination of metadata records: - + * `tag_identifiers` - `type` - `subtypes` - + * `created_by_user_identifiers` - `modified_by_user_identifiers` - + * `owned_by_user_identifiers` - `exclude_objects` - + * `include_auto_created_objects` - `favorite_object_options` - + * `include_only_published_objects` If you are using other parameters to search + * metadata, set `record_size` to `-1` and `record_offset` to + * `0`. + * + * @param searchMetadataRequest (required) + * @return List<MetadataSearchResponse> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the + * response body + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 Metadata objects search result. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public List searchMetadata(SearchMetadataRequest searchMetadataRequest) + throws ApiException { + ApiResponse> localVarResp = + searchMetadataWithHttpInfo(searchMetadataRequest); + return localVarResp.getData(); + } + + /** + * Version: 9.0.0.cl or later Gets a list of metadata objects available on the ThoughtSpot + * system. This API endpoint is available to all users who have view access to the object. Users + * with `ADMINISTRATION` (**Can administer ThoughtSpot**) privileges can view data for + * all metadata objects, including users and groups. #### Usage guidelines - To get all metadata + * objects, send the API request without any attributes. - To get metadata objects of a specific + * type, set the `type` attribute. For example, to fetch a Worksheet, set the type as + * `LOGICAL_TABLE`. - To filter metadata objects within type + * `LOGICAL_TABLE`, set the `subtypes` attribute. For example, to fetch a + * Worksheet, set the type as `LOGICAL_TABLE` & subtypes as + * `[WORKSHEET]`. - To get a specific metadata object, specify the GUID. - To + * customize your search and filter the API response, you can use several parameters. You can + * search for objects created or modified by specific users, by tags applied to the objects, or + * by using the include parameters like `include_auto_created_objects`, + * `include_dependent_objects`, `include_headers`, + * `include_incomplete_objects`, and so on. You can also define sorting options to + * sort the data retrieved in the API response. - To get discoverable objects when linientmodel + * is enabled you can use `include_discoverable_objects` as true else false. Default + * value is true. - For liveboard metadata type, to get the newer format, set the + * `liveboard_response_format` as V2. Default value is V1. - To retrieve only objects + * that are published, set the `include_only_published_objects` as true. Default value + * is false. **NOTE**: The following parameters support pagination of metadata records: - + * `tag_identifiers` - `type` - `subtypes` - + * `created_by_user_identifiers` - `modified_by_user_identifiers` - + * `owned_by_user_identifiers` - `exclude_objects` - + * `include_auto_created_objects` - `favorite_object_options` - + * `include_only_published_objects` If you are using other parameters to search + * metadata, set `record_size` to `-1` and `record_offset` to + * `0`. + * + * @param searchMetadataRequest (required) + * @return ApiResponse<List<MetadataSearchResponse>> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the + * response body + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 Metadata objects search result. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public ApiResponse> searchMetadataWithHttpInfo( + SearchMetadataRequest searchMetadataRequest) throws ApiException { + okhttp3.Call localVarCall = searchMetadataValidateBeforeCall(searchMetadataRequest, null); + Type localVarReturnType = new TypeToken>() {}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); + } + + /** + * (asynchronously) Version: 9.0.0.cl or later Gets a list of metadata objects available on the + * ThoughtSpot system. This API endpoint is available to all users who have view access to the + * object. Users with `ADMINISTRATION` (**Can administer ThoughtSpot**) privileges can + * view data for all metadata objects, including users and groups. #### Usage guidelines - To + * get all metadata objects, send the API request without any attributes. - To get metadata + * objects of a specific type, set the `type` attribute. For example, to fetch a + * Worksheet, set the type as `LOGICAL_TABLE`. - To filter metadata objects within + * type `LOGICAL_TABLE`, set the `subtypes` attribute. For example, to fetch + * a Worksheet, set the type as `LOGICAL_TABLE` & subtypes as + * `[WORKSHEET]`. - To get a specific metadata object, specify the GUID. - To + * customize your search and filter the API response, you can use several parameters. You can + * search for objects created or modified by specific users, by tags applied to the objects, or + * by using the include parameters like `include_auto_created_objects`, + * `include_dependent_objects`, `include_headers`, + * `include_incomplete_objects`, and so on. You can also define sorting options to + * sort the data retrieved in the API response. - To get discoverable objects when linientmodel + * is enabled you can use `include_discoverable_objects` as true else false. Default + * value is true. - For liveboard metadata type, to get the newer format, set the + * `liveboard_response_format` as V2. Default value is V1. - To retrieve only objects + * that are published, set the `include_only_published_objects` as true. Default value + * is false. **NOTE**: The following parameters support pagination of metadata records: - + * `tag_identifiers` - `type` - `subtypes` - + * `created_by_user_identifiers` - `modified_by_user_identifiers` - + * `owned_by_user_identifiers` - `exclude_objects` - + * `include_auto_created_objects` - `favorite_object_options` - + * `include_only_published_objects` If you are using other parameters to search + * metadata, set `record_size` to `-1` and `record_offset` to + * `0`. + * + * @param searchMetadataRequest (required) + * @param _callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body + * object + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 Metadata objects search result. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public okhttp3.Call searchMetadataAsync( + SearchMetadataRequest searchMetadataRequest, + final ApiCallback> _callback) + throws ApiException { + + okhttp3.Call localVarCall = + searchMetadataValidateBeforeCall(searchMetadataRequest, _callback); + Type localVarReturnType = new TypeToken>() {}.getType(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; + } + /** + * Build call for unparameterizeMetadata + * + * @param unparameterizeMetadataRequest (required) + * @param _callback Callback for upload/download progress + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
204 Successfuly removed parameters. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public okhttp3.Call unparameterizeMetadataCall( + UnparameterizeMetadataRequest unparameterizeMetadataRequest, + final ApiCallback _callback) + throws ApiException { + String basePath = null; + // Operation Servers + String[] localBasePaths = new String[] {}; + + // Determine Base Path to Use + if (localCustomBaseUrl != null) { + basePath = localCustomBaseUrl; + } else if (localBasePaths.length > 0) { + basePath = localBasePaths[localHostIndex]; + } else { + basePath = null; + } + + Object localVarPostBody = unparameterizeMetadataRequest; + + // create path and map variables + String localVarPath = "/api/rest/2.0/metadata/unparameterize"; + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + final String[] localVarAccepts = {"application/json"}; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = {"application/json"}; + final String localVarContentType = + localVarApiClient.selectHeaderContentType(localVarContentTypes); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } + + String[] localVarAuthNames = new String[] {"bearerAuth"}; + return localVarApiClient.buildCall( + basePath, + localVarPath, + "POST", + localVarQueryParams, + localVarCollectionQueryParams, + localVarPostBody, + localVarHeaderParams, + localVarCookieParams, + localVarFormParams, + localVarAuthNames, + _callback); + } + + @SuppressWarnings("rawtypes") + private okhttp3.Call unparameterizeMetadataValidateBeforeCall( + UnparameterizeMetadataRequest unparameterizeMetadataRequest, + final ApiCallback _callback) + throws ApiException { + // verify the required parameter 'unparameterizeMetadataRequest' is set + if (unparameterizeMetadataRequest == null) { + throw new ApiException( + "Missing the required parameter 'unparameterizeMetadataRequest' when calling" + + " unparameterizeMetadata(Async)"); + } + + return unparameterizeMetadataCall(unparameterizeMetadataRequest, _callback); + } + + /** + * Remove parameterization from fields in metadata objects. Version: 26.5.0.cl or later Allows + * removing parameterization from fields in metadata objects in ThoughtSpot. Requires + * appropriate permissions to modify the metadata object. The API endpoint allows + * unparameterizing the following types of metadata objects: * Logical Tables * Connections * + * Connection Configs For a Logical Table the field type must be `ATTRIBUTE` and field + * name can be one of: * databaseName * schemaName * tableName For a Connection or Connection + * Config, the field type is always `CONNECTION_PROPERTY`. In this case, field_name + * specifies the exact property of the Connection or Connection Config that needs to be + * unparameterized. For Connection Config, the only supported field name is: * impersonate_user + * + * @param unparameterizeMetadataRequest (required) + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the + * response body + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
204 Successfuly removed parameters. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public void unparameterizeMetadata(UnparameterizeMetadataRequest unparameterizeMetadataRequest) + throws ApiException { + unparameterizeMetadataWithHttpInfo(unparameterizeMetadataRequest); + } + + /** + * Remove parameterization from fields in metadata objects. Version: 26.5.0.cl or later Allows + * removing parameterization from fields in metadata objects in ThoughtSpot. Requires + * appropriate permissions to modify the metadata object. The API endpoint allows + * unparameterizing the following types of metadata objects: * Logical Tables * Connections * + * Connection Configs For a Logical Table the field type must be `ATTRIBUTE` and field + * name can be one of: * databaseName * schemaName * tableName For a Connection or Connection + * Config, the field type is always `CONNECTION_PROPERTY`. In this case, field_name + * specifies the exact property of the Connection or Connection Config that needs to be + * unparameterized. For Connection Config, the only supported field name is: * impersonate_user + * + * @param unparameterizeMetadataRequest (required) + * @return ApiResponse<Void> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the + * response body + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
204 Successfuly removed parameters. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public ApiResponse unparameterizeMetadataWithHttpInfo( + UnparameterizeMetadataRequest unparameterizeMetadataRequest) throws ApiException { + okhttp3.Call localVarCall = + unparameterizeMetadataValidateBeforeCall(unparameterizeMetadataRequest, null); + return localVarApiClient.execute(localVarCall); + } + + /** + * (asynchronously) Remove parameterization from fields in metadata objects. Version: 26.5.0.cl + * or later Allows removing parameterization from fields in metadata objects in ThoughtSpot. + * Requires appropriate permissions to modify the metadata object. The API endpoint allows + * unparameterizing the following types of metadata objects: * Logical Tables * Connections * + * Connection Configs For a Logical Table the field type must be `ATTRIBUTE` and field + * name can be one of: * databaseName * schemaName * tableName For a Connection or Connection + * Config, the field type is always `CONNECTION_PROPERTY`. In this case, field_name + * specifies the exact property of the Connection or Connection Config that needs to be + * unparameterized. For Connection Config, the only supported field name is: * impersonate_user + * + * @param unparameterizeMetadataRequest (required) + * @param _callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body + * object + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
204 Successfuly removed parameters. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public okhttp3.Call unparameterizeMetadataAsync( + UnparameterizeMetadataRequest unparameterizeMetadataRequest, + final ApiCallback _callback) + throws ApiException { + + okhttp3.Call localVarCall = + unparameterizeMetadataValidateBeforeCall(unparameterizeMetadataRequest, _callback); + localVarApiClient.executeAsync(localVarCall, _callback); + return localVarCall; + } + /** + * Build call for updateMetadataHeader + * + * @param updateMetadataHeaderRequest (required) + * @param _callback Callback for upload/download progress + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
204 Headers update was successful. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public okhttp3.Call updateMetadataHeaderCall( + UpdateMetadataHeaderRequest updateMetadataHeaderRequest, final ApiCallback _callback) + throws ApiException { + String basePath = null; + // Operation Servers + String[] localBasePaths = new String[] {}; + + // Determine Base Path to Use + if (localCustomBaseUrl != null) { + basePath = localCustomBaseUrl; + } else if (localBasePaths.length > 0) { + basePath = localBasePaths[localHostIndex]; + } else { + basePath = null; + } + + Object localVarPostBody = updateMetadataHeaderRequest; + + // create path and map variables + String localVarPath = "/api/rest/2.0/metadata/headers/update"; + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + final String[] localVarAccepts = {"application/json"}; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = {"application/json"}; + final String localVarContentType = + localVarApiClient.selectHeaderContentType(localVarContentTypes); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } + + String[] localVarAuthNames = new String[] {"bearerAuth"}; + return localVarApiClient.buildCall( + basePath, + localVarPath, + "POST", + localVarQueryParams, + localVarCollectionQueryParams, + localVarPostBody, + localVarHeaderParams, + localVarCookieParams, + localVarFormParams, + localVarAuthNames, + _callback); + } + + @SuppressWarnings("rawtypes") + private okhttp3.Call updateMetadataHeaderValidateBeforeCall( + UpdateMetadataHeaderRequest updateMetadataHeaderRequest, final ApiCallback _callback) + throws ApiException { + // verify the required parameter 'updateMetadataHeaderRequest' is set + if (updateMetadataHeaderRequest == null) { + throw new ApiException( + "Missing the required parameter 'updateMetadataHeaderRequest' when calling" + + " updateMetadataHeader(Async)"); + } + + return updateMetadataHeaderCall(updateMetadataHeaderRequest, _callback); + } + + /** + * Update header attributes for a given list of header objects. Version: 10.6.0.cl or later ## + * Prerequisites - **Privileges Required:** - `DATAMANAGEMENT` (Can manage data) or + * `ADMINISTRATION` (Can administer ThoughtSpot). - **Additional Privileges (if RBAC + * is enabled):** - `ORG_ADMINISTRATION` (Can manage orgs). --- ## Usage Guidelines + * ### Parameters 1. **headers_update** - **Description:** List of header objects with their + * attributes to be updated. Each object contains a list of attributes to be updated in the + * header. - **Usage:** - You must provide either `identifier` or + * `obj_identifier`, but not both. Both fields cannot be empty. - When + * `org_identifier` is set to `-1`, only the `identifier` value is + * accepted; `obj_identifier` is not allowed. 2. **org_identifier** - **Description:** + * GUID (Globally Unique Identifier) or name of the organization. - **Usage:** - Leaving this + * field empty assumes that the changes should be applied to the current organization - Provide + * `org_guid` or `org_name` to uniquely identify the organization where + * changes need to be applied. . - Provide `-1` if changes have to be applied across + * all the org. --- ## Note Currently, this API is enabled only for updating the + * `obj_identifier` attribute. Only `text` will be allowed in + * attribute's value. ## Best Practices 1. **Backup Before Conversion:** Always export + * metadata as a backup before initiating the update process --- ## Examples ### Only + * `identifier` is given ```json { \"headers_update\": [ { + * \"identifier\": \"guid_1\", \"obj_identifier\": \"\", + * \"type\": \"LOGICAL_COLUMN\", \"attributes\": [ { + * \"name\": \"obj_id\", \"value\": \"custom_object_id\" + * } ] } ], \"org_identifier\": \"orgGuid\" } ``` ### Only + * `obj_identifier` is given ```json { \"headers_update\": [ + * { \"obj_identifier\": \"custom_object_id\", \"type\": + * \"ANSWER\", \"attributes\": [ { \"name\": \"obj_id\", + * \"value\": \"custom_object_id\" } ] } ], \"org_identifier\": + * \"orgName\" } ``` ### Executing update for all org `-1` + * ```json { \"headers_update\": [ { \"identifier\": + * \"guid_1\", \"type\": \"ANSWER\", \"attributes\": [ { + * \"name\": \"obj_id\", \"value\": \"custom_object_id\" + * } ] } ], \"org_identifier\": -1 } ``` ### Optional `type` + * is not provided ```json { \"headers_update\": [ { + * \"identifier\": \"guid_1\", \"attributes\": [ { + * \"name\": \"obj_id\", \"value\": \"custom_object_id\" + * } ] } ], \"org_identifier\": -1 } ``` + * + * @param updateMetadataHeaderRequest (required) + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the + * response body + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
204 Headers update was successful. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public void updateMetadataHeader(UpdateMetadataHeaderRequest updateMetadataHeaderRequest) + throws ApiException { + updateMetadataHeaderWithHttpInfo(updateMetadataHeaderRequest); + } + + /** + * Update header attributes for a given list of header objects. Version: 10.6.0.cl or later ## + * Prerequisites - **Privileges Required:** - `DATAMANAGEMENT` (Can manage data) or + * `ADMINISTRATION` (Can administer ThoughtSpot). - **Additional Privileges (if RBAC + * is enabled):** - `ORG_ADMINISTRATION` (Can manage orgs). --- ## Usage Guidelines + * ### Parameters 1. **headers_update** - **Description:** List of header objects with their + * attributes to be updated. Each object contains a list of attributes to be updated in the + * header. - **Usage:** - You must provide either `identifier` or + * `obj_identifier`, but not both. Both fields cannot be empty. - When + * `org_identifier` is set to `-1`, only the `identifier` value is + * accepted; `obj_identifier` is not allowed. 2. **org_identifier** - **Description:** + * GUID (Globally Unique Identifier) or name of the organization. - **Usage:** - Leaving this + * field empty assumes that the changes should be applied to the current organization - Provide + * `org_guid` or `org_name` to uniquely identify the organization where + * changes need to be applied. . - Provide `-1` if changes have to be applied across + * all the org. --- ## Note Currently, this API is enabled only for updating the + * `obj_identifier` attribute. Only `text` will be allowed in + * attribute's value. ## Best Practices 1. **Backup Before Conversion:** Always export + * metadata as a backup before initiating the update process --- ## Examples ### Only + * `identifier` is given ```json { \"headers_update\": [ { + * \"identifier\": \"guid_1\", \"obj_identifier\": \"\", + * \"type\": \"LOGICAL_COLUMN\", \"attributes\": [ { + * \"name\": \"obj_id\", \"value\": \"custom_object_id\" + * } ] } ], \"org_identifier\": \"orgGuid\" } ``` ### Only + * `obj_identifier` is given ```json { \"headers_update\": [ + * { \"obj_identifier\": \"custom_object_id\", \"type\": + * \"ANSWER\", \"attributes\": [ { \"name\": \"obj_id\", + * \"value\": \"custom_object_id\" } ] } ], \"org_identifier\": + * \"orgName\" } ``` ### Executing update for all org `-1` + * ```json { \"headers_update\": [ { \"identifier\": + * \"guid_1\", \"type\": \"ANSWER\", \"attributes\": [ { + * \"name\": \"obj_id\", \"value\": \"custom_object_id\" + * } ] } ], \"org_identifier\": -1 } ``` ### Optional `type` + * is not provided ```json { \"headers_update\": [ { + * \"identifier\": \"guid_1\", \"attributes\": [ { + * \"name\": \"obj_id\", \"value\": \"custom_object_id\" + * } ] } ], \"org_identifier\": -1 } ``` + * + * @param updateMetadataHeaderRequest (required) + * @return ApiResponse<Void> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the + * response body + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
204 Headers update was successful. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public ApiResponse updateMetadataHeaderWithHttpInfo( + UpdateMetadataHeaderRequest updateMetadataHeaderRequest) throws ApiException { + okhttp3.Call localVarCall = + updateMetadataHeaderValidateBeforeCall(updateMetadataHeaderRequest, null); + return localVarApiClient.execute(localVarCall); + } + + /** + * (asynchronously) Update header attributes for a given list of header objects. Version: + * 10.6.0.cl or later ## Prerequisites - **Privileges Required:** - `DATAMANAGEMENT` + * (Can manage data) or `ADMINISTRATION` (Can administer ThoughtSpot). - **Additional + * Privileges (if RBAC is enabled):** - `ORG_ADMINISTRATION` (Can manage orgs). --- ## + * Usage Guidelines ### Parameters 1. **headers_update** - **Description:** List of header + * objects with their attributes to be updated. Each object contains a list of attributes to be + * updated in the header. - **Usage:** - You must provide either `identifier` or + * `obj_identifier`, but not both. Both fields cannot be empty. - When + * `org_identifier` is set to `-1`, only the `identifier` value is + * accepted; `obj_identifier` is not allowed. 2. **org_identifier** - **Description:** + * GUID (Globally Unique Identifier) or name of the organization. - **Usage:** - Leaving this + * field empty assumes that the changes should be applied to the current organization - Provide + * `org_guid` or `org_name` to uniquely identify the organization where + * changes need to be applied. . - Provide `-1` if changes have to be applied across + * all the org. --- ## Note Currently, this API is enabled only for updating the + * `obj_identifier` attribute. Only `text` will be allowed in + * attribute's value. ## Best Practices 1. **Backup Before Conversion:** Always export + * metadata as a backup before initiating the update process --- ## Examples ### Only + * `identifier` is given ```json { \"headers_update\": [ { + * \"identifier\": \"guid_1\", \"obj_identifier\": \"\", + * \"type\": \"LOGICAL_COLUMN\", \"attributes\": [ { + * \"name\": \"obj_id\", \"value\": \"custom_object_id\" + * } ] } ], \"org_identifier\": \"orgGuid\" } ``` ### Only + * `obj_identifier` is given ```json { \"headers_update\": [ + * { \"obj_identifier\": \"custom_object_id\", \"type\": + * \"ANSWER\", \"attributes\": [ { \"name\": \"obj_id\", + * \"value\": \"custom_object_id\" } ] } ], \"org_identifier\": + * \"orgName\" } ``` ### Executing update for all org `-1` + * ```json { \"headers_update\": [ { \"identifier\": + * \"guid_1\", \"type\": \"ANSWER\", \"attributes\": [ { + * \"name\": \"obj_id\", \"value\": \"custom_object_id\" + * } ] } ], \"org_identifier\": -1 } ``` ### Optional `type` + * is not provided ```json { \"headers_update\": [ { + * \"identifier\": \"guid_1\", \"attributes\": [ { + * \"name\": \"obj_id\", \"value\": \"custom_object_id\" + * } ] } ], \"org_identifier\": -1 } ``` + * + * @param updateMetadataHeaderRequest (required) + * @param _callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body + * object + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
204 Headers update was successful. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public okhttp3.Call updateMetadataHeaderAsync( + UpdateMetadataHeaderRequest updateMetadataHeaderRequest, + final ApiCallback _callback) + throws ApiException { + + okhttp3.Call localVarCall = + updateMetadataHeaderValidateBeforeCall(updateMetadataHeaderRequest, _callback); + localVarApiClient.executeAsync(localVarCall, _callback); + return localVarCall; + } + /** + * Build call for updateMetadataObjId + * + * @param updateMetadataObjIdRequest (required) + * @param _callback Callback for upload/download progress + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
204 Headers update was successful. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public okhttp3.Call updateMetadataObjIdCall( + UpdateMetadataObjIdRequest updateMetadataObjIdRequest, final ApiCallback _callback) + throws ApiException { + String basePath = null; + // Operation Servers + String[] localBasePaths = new String[] {}; + + // Determine Base Path to Use + if (localCustomBaseUrl != null) { + basePath = localCustomBaseUrl; + } else if (localBasePaths.length > 0) { + basePath = localBasePaths[localHostIndex]; + } else { + basePath = null; + } + + Object localVarPostBody = updateMetadataObjIdRequest; + + // create path and map variables + String localVarPath = "/api/rest/2.0/metadata/update-obj-id"; + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + final String[] localVarAccepts = {"application/json"}; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = {"application/json"}; + final String localVarContentType = + localVarApiClient.selectHeaderContentType(localVarContentTypes); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } + + String[] localVarAuthNames = new String[] {"bearerAuth"}; + return localVarApiClient.buildCall( + basePath, + localVarPath, + "POST", + localVarQueryParams, + localVarCollectionQueryParams, + localVarPostBody, + localVarHeaderParams, + localVarCookieParams, + localVarFormParams, + localVarAuthNames, + _callback); + } + + @SuppressWarnings("rawtypes") + private okhttp3.Call updateMetadataObjIdValidateBeforeCall( + UpdateMetadataObjIdRequest updateMetadataObjIdRequest, final ApiCallback _callback) + throws ApiException { + // verify the required parameter 'updateMetadataObjIdRequest' is set + if (updateMetadataObjIdRequest == null) { + throw new ApiException( + "Missing the required parameter 'updateMetadataObjIdRequest' when calling" + + " updateMetadataObjId(Async)"); + } + + return updateMetadataObjIdCall(updateMetadataObjIdRequest, _callback); + } + + /** + * Update object IDs for given metadata objects. Version: 10.8.0.cl or later ## Prerequisites - + * **Privileges Required:** - `DATAMANAGEMENT` (Can manage data) or + * `ADMINISTRATION` (Can administer ThoughtSpot). - **Additional Privileges (if RBAC + * is enabled):** - `ORG_ADMINISTRATION` (Can manage orgs). --- ## Usage Guidelines + * ### Parameters 1. **metadata** - **Description:** List of metadata objects to update their + * object IDs. - **Usage:** - Use either `current_obj_id` alone OR use + * `metadata_identifier` with `type` (when needed). - When using + * `metadata_identifier`, the `type` field is required if using a name + * instead of a GUID. - The `new_obj_id` field is always required. --- ## Note This + * API is specifically designed for updating object IDs of metadata objects. It internally uses + * the header update mechanism to perform the changes. ## Best Practices 1. **Backup Before + * Update:** Always export metadata as a backup before initiating the update process. 2. + * **Validation:** - When using `current_obj_id`, ensure it matches the existing + * object ID exactly. - When using `metadata_identifier` with a name, ensure the + * `type` is specified correctly. - Verify that the `new_obj_id` follows + * your naming conventions and is unique within your system. --- ## Examples ### Using + * current_obj_id ```json { \"metadata\": [ { + * \"current_obj_id\": \"existing_object_id\", \"new_obj_id\": + * \"new_object_id\" } ] } ``` ### Using metadata_identifier with GUID + * ```json { \"metadata\": [ { \"metadata_identifier\": + * \"01234567-89ab-cdef-0123-456789abcdef\", \"new_obj_id\": + * \"new_object_id\" } ] } ``` ### Using metadata_identifier with name + * and type ```json { \"metadata\": [ { + * \"metadata_identifier\": \"My Answer\", \"type\": + * \"ANSWER\", \"new_obj_id\": \"new_object_id\" } ] } + * ``` ### Multiple objects update ```json { + * \"metadata\": [ { \"current_obj_id\": \"existing_object_id_1\", + * \"new_obj_id\": \"new_object_id_1\" }, { + * \"metadata_identifier\": \"My Worksheet\", \"type\": + * \"LOGICAL_TABLE\", \"new_obj_id\": \"new_object_id_2\" } ] } + * ``` + * + * @param updateMetadataObjIdRequest (required) + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the + * response body + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
204 Headers update was successful. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public void updateMetadataObjId(UpdateMetadataObjIdRequest updateMetadataObjIdRequest) + throws ApiException { + updateMetadataObjIdWithHttpInfo(updateMetadataObjIdRequest); + } + + /** + * Update object IDs for given metadata objects. Version: 10.8.0.cl or later ## Prerequisites - + * **Privileges Required:** - `DATAMANAGEMENT` (Can manage data) or + * `ADMINISTRATION` (Can administer ThoughtSpot). - **Additional Privileges (if RBAC + * is enabled):** - `ORG_ADMINISTRATION` (Can manage orgs). --- ## Usage Guidelines + * ### Parameters 1. **metadata** - **Description:** List of metadata objects to update their + * object IDs. - **Usage:** - Use either `current_obj_id` alone OR use + * `metadata_identifier` with `type` (when needed). - When using + * `metadata_identifier`, the `type` field is required if using a name + * instead of a GUID. - The `new_obj_id` field is always required. --- ## Note This + * API is specifically designed for updating object IDs of metadata objects. It internally uses + * the header update mechanism to perform the changes. ## Best Practices 1. **Backup Before + * Update:** Always export metadata as a backup before initiating the update process. 2. + * **Validation:** - When using `current_obj_id`, ensure it matches the existing + * object ID exactly. - When using `metadata_identifier` with a name, ensure the + * `type` is specified correctly. - Verify that the `new_obj_id` follows + * your naming conventions and is unique within your system. --- ## Examples ### Using + * current_obj_id ```json { \"metadata\": [ { + * \"current_obj_id\": \"existing_object_id\", \"new_obj_id\": + * \"new_object_id\" } ] } ``` ### Using metadata_identifier with GUID + * ```json { \"metadata\": [ { \"metadata_identifier\": + * \"01234567-89ab-cdef-0123-456789abcdef\", \"new_obj_id\": + * \"new_object_id\" } ] } ``` ### Using metadata_identifier with name + * and type ```json { \"metadata\": [ { + * \"metadata_identifier\": \"My Answer\", \"type\": + * \"ANSWER\", \"new_obj_id\": \"new_object_id\" } ] } + * ``` ### Multiple objects update ```json { + * \"metadata\": [ { \"current_obj_id\": \"existing_object_id_1\", + * \"new_obj_id\": \"new_object_id_1\" }, { + * \"metadata_identifier\": \"My Worksheet\", \"type\": + * \"LOGICAL_TABLE\", \"new_obj_id\": \"new_object_id_2\" } ] } + * ``` + * + * @param updateMetadataObjIdRequest (required) + * @return ApiResponse<Void> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the + * response body + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
204 Headers update was successful. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public ApiResponse updateMetadataObjIdWithHttpInfo( + UpdateMetadataObjIdRequest updateMetadataObjIdRequest) throws ApiException { + okhttp3.Call localVarCall = + updateMetadataObjIdValidateBeforeCall(updateMetadataObjIdRequest, null); + return localVarApiClient.execute(localVarCall); + } + + /** + * (asynchronously) Update object IDs for given metadata objects. Version: 10.8.0.cl or later ## + * Prerequisites - **Privileges Required:** - `DATAMANAGEMENT` (Can manage data) or + * `ADMINISTRATION` (Can administer ThoughtSpot). - **Additional Privileges (if RBAC + * is enabled):** - `ORG_ADMINISTRATION` (Can manage orgs). --- ## Usage Guidelines + * ### Parameters 1. **metadata** - **Description:** List of metadata objects to update their + * object IDs. - **Usage:** - Use either `current_obj_id` alone OR use + * `metadata_identifier` with `type` (when needed). - When using + * `metadata_identifier`, the `type` field is required if using a name + * instead of a GUID. - The `new_obj_id` field is always required. --- ## Note This + * API is specifically designed for updating object IDs of metadata objects. It internally uses + * the header update mechanism to perform the changes. ## Best Practices 1. **Backup Before + * Update:** Always export metadata as a backup before initiating the update process. 2. + * **Validation:** - When using `current_obj_id`, ensure it matches the existing + * object ID exactly. - When using `metadata_identifier` with a name, ensure the + * `type` is specified correctly. - Verify that the `new_obj_id` follows + * your naming conventions and is unique within your system. --- ## Examples ### Using + * current_obj_id ```json { \"metadata\": [ { + * \"current_obj_id\": \"existing_object_id\", \"new_obj_id\": + * \"new_object_id\" } ] } ``` ### Using metadata_identifier with GUID + * ```json { \"metadata\": [ { \"metadata_identifier\": + * \"01234567-89ab-cdef-0123-456789abcdef\", \"new_obj_id\": + * \"new_object_id\" } ] } ``` ### Using metadata_identifier with name + * and type ```json { \"metadata\": [ { + * \"metadata_identifier\": \"My Answer\", \"type\": + * \"ANSWER\", \"new_obj_id\": \"new_object_id\" } ] } + * ``` ### Multiple objects update ```json { + * \"metadata\": [ { \"current_obj_id\": \"existing_object_id_1\", + * \"new_obj_id\": \"new_object_id_1\" }, { + * \"metadata_identifier\": \"My Worksheet\", \"type\": + * \"LOGICAL_TABLE\", \"new_obj_id\": \"new_object_id_2\" } ] } + * ``` + * + * @param updateMetadataObjIdRequest (required) + * @param _callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body + * object + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
204 Headers update was successful. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public okhttp3.Call updateMetadataObjIdAsync( + UpdateMetadataObjIdRequest updateMetadataObjIdRequest, + final ApiCallback _callback) + throws ApiException { + + okhttp3.Call localVarCall = + updateMetadataObjIdValidateBeforeCall(updateMetadataObjIdRequest, _callback); + localVarApiClient.executeAsync(localVarCall, _callback); + return localVarCall; + } +} diff --git a/sdks/java/src/main/java/com/thoughtspot/client/api/OrgsApi.java b/sdks/java/src/main/java/com/thoughtspot/client/api/OrgsApi.java new file mode 100644 index 000000000..8733272e5 --- /dev/null +++ b/sdks/java/src/main/java/com/thoughtspot/client/api/OrgsApi.java @@ -0,0 +1,802 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client.api; + +import com.google.gson.reflect.TypeToken; +import com.thoughtspot.client.ApiCallback; +import com.thoughtspot.client.ApiClient; +import com.thoughtspot.client.ApiClientConfiguration; +import com.thoughtspot.client.ApiException; +import com.thoughtspot.client.ApiResponse; +import com.thoughtspot.client.Configuration; +import com.thoughtspot.client.Pair; +import com.thoughtspot.client.model.CreateOrgRequest; +import com.thoughtspot.client.model.OrgResponse; +import com.thoughtspot.client.model.SearchOrgsRequest; +import com.thoughtspot.client.model.UpdateOrgRequest; +import java.lang.reflect.Type; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +@javax.annotation.Generated( + value = "org.openapitools.codegen.languages.JavaClientCodegen", + comments = "Generator version: 7.12.0") +public class OrgsApi { + private ApiClient localVarApiClient; + private ApiClientConfiguration localVarApiClientConfiguration; + private int localHostIndex; + private String localCustomBaseUrl; + + public OrgsApi() { + this(Configuration.getDefaultApiClient()); + } + + public OrgsApi(ApiClient apiClient) { + this.localVarApiClient = apiClient; + } + + public OrgsApi(ApiClientConfiguration apiClientConfiguration) { + this.localVarApiClientConfiguration = apiClientConfiguration; + this.localVarApiClient = new ApiClient(apiClientConfiguration); + } + + public ApiClient getApiClient() { + return localVarApiClient; + } + + public void setApiClient(ApiClient apiClient) { + this.localVarApiClient = apiClient; + } + + public ApiClientConfiguration getApiClientConfiguration() { + return localVarApiClientConfiguration; + } + + public void applyApiClientConfiguration(ApiClientConfiguration apiClientConfiguration) { + this.localVarApiClientConfiguration = apiClientConfiguration; + if (localVarApiClient != null) { + localVarApiClient.applyApiClientConfiguration(apiClientConfiguration); + } else { + localVarApiClient = new ApiClient(apiClientConfiguration); + } + } + + public int getHostIndex() { + return localHostIndex; + } + + public void setHostIndex(int hostIndex) { + this.localHostIndex = hostIndex; + } + + public String getCustomBaseUrl() { + return localCustomBaseUrl; + } + + public void setCustomBaseUrl(String customBaseUrl) { + this.localCustomBaseUrl = customBaseUrl; + } + + /** + * Build call for createOrg + * + * @param createOrgRequest (required) + * @param _callback Callback for upload/download progress + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 Organization successfully created. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public okhttp3.Call createOrgCall( + CreateOrgRequest createOrgRequest, final ApiCallback _callback) throws ApiException { + String basePath = null; + // Operation Servers + String[] localBasePaths = new String[] {}; + + // Determine Base Path to Use + if (localCustomBaseUrl != null) { + basePath = localCustomBaseUrl; + } else if (localBasePaths.length > 0) { + basePath = localBasePaths[localHostIndex]; + } else { + basePath = null; + } + + Object localVarPostBody = createOrgRequest; + + // create path and map variables + String localVarPath = "/api/rest/2.0/orgs/create"; + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + final String[] localVarAccepts = {"application/json"}; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = {"application/json"}; + final String localVarContentType = + localVarApiClient.selectHeaderContentType(localVarContentTypes); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } + + String[] localVarAuthNames = new String[] {"bearerAuth"}; + return localVarApiClient.buildCall( + basePath, + localVarPath, + "POST", + localVarQueryParams, + localVarCollectionQueryParams, + localVarPostBody, + localVarHeaderParams, + localVarCookieParams, + localVarFormParams, + localVarAuthNames, + _callback); + } + + @SuppressWarnings("rawtypes") + private okhttp3.Call createOrgValidateBeforeCall( + CreateOrgRequest createOrgRequest, final ApiCallback _callback) throws ApiException { + // verify the required parameter 'createOrgRequest' is set + if (createOrgRequest == null) { + throw new ApiException( + "Missing the required parameter 'createOrgRequest' when calling" + + " createOrg(Async)"); + } + + return createOrgCall(createOrgRequest, _callback); + } + + /** + * Version: 9.0.0.cl or later Creates an Org object. To use this API, the + * [Orgs](https://docs.thoughtspot.com/cloud/latest/orgs-overview) feature must be enabled in + * your cluster. Requires cluster administration (**Can administer Org**) privileges. If + * [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled + * on your instance, the `ORG_ADMINISTRATION` (**Can manage Orgs**) privilege is + * required. + * + * @param createOrgRequest (required) + * @return OrgResponse + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the + * response body + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 Organization successfully created. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public OrgResponse createOrg(CreateOrgRequest createOrgRequest) throws ApiException { + ApiResponse localVarResp = createOrgWithHttpInfo(createOrgRequest); + return localVarResp.getData(); + } + + /** + * Version: 9.0.0.cl or later Creates an Org object. To use this API, the + * [Orgs](https://docs.thoughtspot.com/cloud/latest/orgs-overview) feature must be enabled in + * your cluster. Requires cluster administration (**Can administer Org**) privileges. If + * [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled + * on your instance, the `ORG_ADMINISTRATION` (**Can manage Orgs**) privilege is + * required. + * + * @param createOrgRequest (required) + * @return ApiResponse<OrgResponse> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the + * response body + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 Organization successfully created. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public ApiResponse createOrgWithHttpInfo(CreateOrgRequest createOrgRequest) + throws ApiException { + okhttp3.Call localVarCall = createOrgValidateBeforeCall(createOrgRequest, null); + Type localVarReturnType = new TypeToken() {}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); + } + + /** + * (asynchronously) Version: 9.0.0.cl or later Creates an Org object. To use this API, the + * [Orgs](https://docs.thoughtspot.com/cloud/latest/orgs-overview) feature must be enabled in + * your cluster. Requires cluster administration (**Can administer Org**) privileges. If + * [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled + * on your instance, the `ORG_ADMINISTRATION` (**Can manage Orgs**) privilege is + * required. + * + * @param createOrgRequest (required) + * @param _callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body + * object + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 Organization successfully created. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public okhttp3.Call createOrgAsync( + CreateOrgRequest createOrgRequest, final ApiCallback _callback) + throws ApiException { + + okhttp3.Call localVarCall = createOrgValidateBeforeCall(createOrgRequest, _callback); + Type localVarReturnType = new TypeToken() {}.getType(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; + } + /** + * Build call for deleteOrg + * + * @param orgIdentifier ID or name of the Org (required) + * @param _callback Callback for upload/download progress + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
204 Organization successfully deleted. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public okhttp3.Call deleteOrgCall(String orgIdentifier, final ApiCallback _callback) + throws ApiException { + String basePath = null; + // Operation Servers + String[] localBasePaths = new String[] {}; + + // Determine Base Path to Use + if (localCustomBaseUrl != null) { + basePath = localCustomBaseUrl; + } else if (localBasePaths.length > 0) { + basePath = localBasePaths[localHostIndex]; + } else { + basePath = null; + } + + Object localVarPostBody = null; + + // create path and map variables + String localVarPath = + "/api/rest/2.0/orgs/{org_identifier}/delete" + .replace( + "{" + "org_identifier" + "}", + localVarApiClient.escapeString(orgIdentifier.toString())); + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + final String[] localVarAccepts = {"application/json"}; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = {}; + final String localVarContentType = + localVarApiClient.selectHeaderContentType(localVarContentTypes); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } + + String[] localVarAuthNames = new String[] {"bearerAuth"}; + return localVarApiClient.buildCall( + basePath, + localVarPath, + "POST", + localVarQueryParams, + localVarCollectionQueryParams, + localVarPostBody, + localVarHeaderParams, + localVarCookieParams, + localVarFormParams, + localVarAuthNames, + _callback); + } + + @SuppressWarnings("rawtypes") + private okhttp3.Call deleteOrgValidateBeforeCall( + String orgIdentifier, final ApiCallback _callback) throws ApiException { + // verify the required parameter 'orgIdentifier' is set + if (orgIdentifier == null) { + throw new ApiException( + "Missing the required parameter 'orgIdentifier' when calling deleteOrg(Async)"); + } + + return deleteOrgCall(orgIdentifier, _callback); + } + + /** + * Version: 9.0.0.cl or later Deletes an Org object from the ThoughtSpot system. Requires + * cluster administration (**Can administer Org**) privilege. If [Role-Based Access Control + * (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the + * `ORG_ADMINISTRATION` (**Can manage Orgs**) privilege is required. When you delete + * an Org, all its users and objects created in that Org context are removed. However, if the + * users in the deleted Org also exists in other Orgs, they are removed only from the deleted + * Org. + * + * @param orgIdentifier ID or name of the Org (required) + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the + * response body + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
204 Organization successfully deleted. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public void deleteOrg(String orgIdentifier) throws ApiException { + deleteOrgWithHttpInfo(orgIdentifier); + } + + /** + * Version: 9.0.0.cl or later Deletes an Org object from the ThoughtSpot system. Requires + * cluster administration (**Can administer Org**) privilege. If [Role-Based Access Control + * (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the + * `ORG_ADMINISTRATION` (**Can manage Orgs**) privilege is required. When you delete + * an Org, all its users and objects created in that Org context are removed. However, if the + * users in the deleted Org also exists in other Orgs, they are removed only from the deleted + * Org. + * + * @param orgIdentifier ID or name of the Org (required) + * @return ApiResponse<Void> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the + * response body + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
204 Organization successfully deleted. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public ApiResponse deleteOrgWithHttpInfo(String orgIdentifier) throws ApiException { + okhttp3.Call localVarCall = deleteOrgValidateBeforeCall(orgIdentifier, null); + return localVarApiClient.execute(localVarCall); + } + + /** + * (asynchronously) Version: 9.0.0.cl or later Deletes an Org object from the ThoughtSpot + * system. Requires cluster administration (**Can administer Org**) privilege. If [Role-Based + * Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your + * instance, the `ORG_ADMINISTRATION` (**Can manage Orgs**) privilege is required. + * When you delete an Org, all its users and objects created in that Org context are removed. + * However, if the users in the deleted Org also exists in other Orgs, they are removed only + * from the deleted Org. + * + * @param orgIdentifier ID or name of the Org (required) + * @param _callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body + * object + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
204 Organization successfully deleted. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public okhttp3.Call deleteOrgAsync(String orgIdentifier, final ApiCallback _callback) + throws ApiException { + + okhttp3.Call localVarCall = deleteOrgValidateBeforeCall(orgIdentifier, _callback); + localVarApiClient.executeAsync(localVarCall, _callback); + return localVarCall; + } + /** + * Build call for searchOrgs + * + * @param searchOrgsRequest (required) + * @param _callback Callback for upload/download progress + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 Organization search result. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public okhttp3.Call searchOrgsCall( + SearchOrgsRequest searchOrgsRequest, final ApiCallback _callback) throws ApiException { + String basePath = null; + // Operation Servers + String[] localBasePaths = new String[] {}; + + // Determine Base Path to Use + if (localCustomBaseUrl != null) { + basePath = localCustomBaseUrl; + } else if (localBasePaths.length > 0) { + basePath = localBasePaths[localHostIndex]; + } else { + basePath = null; + } + + Object localVarPostBody = searchOrgsRequest; + + // create path and map variables + String localVarPath = "/api/rest/2.0/orgs/search"; + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + final String[] localVarAccepts = {"application/json"}; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = {"application/json"}; + final String localVarContentType = + localVarApiClient.selectHeaderContentType(localVarContentTypes); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } + + String[] localVarAuthNames = new String[] {"bearerAuth"}; + return localVarApiClient.buildCall( + basePath, + localVarPath, + "POST", + localVarQueryParams, + localVarCollectionQueryParams, + localVarPostBody, + localVarHeaderParams, + localVarCookieParams, + localVarFormParams, + localVarAuthNames, + _callback); + } + + @SuppressWarnings("rawtypes") + private okhttp3.Call searchOrgsValidateBeforeCall( + SearchOrgsRequest searchOrgsRequest, final ApiCallback _callback) throws ApiException { + // verify the required parameter 'searchOrgsRequest' is set + if (searchOrgsRequest == null) { + throw new ApiException( + "Missing the required parameter 'searchOrgsRequest' when calling" + + " searchOrgs(Async)"); + } + + return searchOrgsCall(searchOrgsRequest, _callback); + } + + /** + * Version: 9.0.0.cl or later Gets a list of Orgs configured on the ThoughtSpot system. To get + * details of a specific Org, specify the Org ID or name. You can also pass parameters such as + * status, visibility, and user identifiers to get a specific list of Orgs. Requires cluster + * administration (**Can administer Org**) privileges. If [Role-Based Access Control + * (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the + * `ORG_ADMINISTRATION` (**Can manage Orgs**) privilege is required. + * + * @param searchOrgsRequest (required) + * @return List<OrgResponse> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the + * response body + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 Organization search result. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public List searchOrgs(SearchOrgsRequest searchOrgsRequest) throws ApiException { + ApiResponse> localVarResp = searchOrgsWithHttpInfo(searchOrgsRequest); + return localVarResp.getData(); + } + + /** + * Version: 9.0.0.cl or later Gets a list of Orgs configured on the ThoughtSpot system. To get + * details of a specific Org, specify the Org ID or name. You can also pass parameters such as + * status, visibility, and user identifiers to get a specific list of Orgs. Requires cluster + * administration (**Can administer Org**) privileges. If [Role-Based Access Control + * (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the + * `ORG_ADMINISTRATION` (**Can manage Orgs**) privilege is required. + * + * @param searchOrgsRequest (required) + * @return ApiResponse<List<OrgResponse>> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the + * response body + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 Organization search result. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public ApiResponse> searchOrgsWithHttpInfo( + SearchOrgsRequest searchOrgsRequest) throws ApiException { + okhttp3.Call localVarCall = searchOrgsValidateBeforeCall(searchOrgsRequest, null); + Type localVarReturnType = new TypeToken>() {}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); + } + + /** + * (asynchronously) Version: 9.0.0.cl or later Gets a list of Orgs configured on the ThoughtSpot + * system. To get details of a specific Org, specify the Org ID or name. You can also pass + * parameters such as status, visibility, and user identifiers to get a specific list of Orgs. + * Requires cluster administration (**Can administer Org**) privileges. If [Role-Based Access + * Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, + * the `ORG_ADMINISTRATION` (**Can manage Orgs**) privilege is required. + * + * @param searchOrgsRequest (required) + * @param _callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body + * object + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 Organization search result. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public okhttp3.Call searchOrgsAsync( + SearchOrgsRequest searchOrgsRequest, final ApiCallback> _callback) + throws ApiException { + + okhttp3.Call localVarCall = searchOrgsValidateBeforeCall(searchOrgsRequest, _callback); + Type localVarReturnType = new TypeToken>() {}.getType(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; + } + /** + * Build call for updateOrg + * + * @param orgIdentifier ID or name of the Org (required) + * @param updateOrgRequest (required) + * @param _callback Callback for upload/download progress + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
204 Organization successfully updated. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public okhttp3.Call updateOrgCall( + String orgIdentifier, UpdateOrgRequest updateOrgRequest, final ApiCallback _callback) + throws ApiException { + String basePath = null; + // Operation Servers + String[] localBasePaths = new String[] {}; + + // Determine Base Path to Use + if (localCustomBaseUrl != null) { + basePath = localCustomBaseUrl; + } else if (localBasePaths.length > 0) { + basePath = localBasePaths[localHostIndex]; + } else { + basePath = null; + } + + Object localVarPostBody = updateOrgRequest; + + // create path and map variables + String localVarPath = + "/api/rest/2.0/orgs/{org_identifier}/update" + .replace( + "{" + "org_identifier" + "}", + localVarApiClient.escapeString(orgIdentifier.toString())); + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + final String[] localVarAccepts = {"application/json"}; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = {"application/json"}; + final String localVarContentType = + localVarApiClient.selectHeaderContentType(localVarContentTypes); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } + + String[] localVarAuthNames = new String[] {"bearerAuth"}; + return localVarApiClient.buildCall( + basePath, + localVarPath, + "POST", + localVarQueryParams, + localVarCollectionQueryParams, + localVarPostBody, + localVarHeaderParams, + localVarCookieParams, + localVarFormParams, + localVarAuthNames, + _callback); + } + + @SuppressWarnings("rawtypes") + private okhttp3.Call updateOrgValidateBeforeCall( + String orgIdentifier, UpdateOrgRequest updateOrgRequest, final ApiCallback _callback) + throws ApiException { + // verify the required parameter 'orgIdentifier' is set + if (orgIdentifier == null) { + throw new ApiException( + "Missing the required parameter 'orgIdentifier' when calling updateOrg(Async)"); + } + + // verify the required parameter 'updateOrgRequest' is set + if (updateOrgRequest == null) { + throw new ApiException( + "Missing the required parameter 'updateOrgRequest' when calling" + + " updateOrg(Async)"); + } + + return updateOrgCall(orgIdentifier, updateOrgRequest, _callback); + } + + /** + * Version: 9.0.0.cl or later Updates an Org object. You can modify Org properties such as name, + * description, and user associations. Requires cluster administration (**Can administer Org**) + * privileges. If [Role-Based Access Control + * (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the + * `ORG_ADMINISTRATION` (**Can manage Orgs**) privilege is required. + * + * @param orgIdentifier ID or name of the Org (required) + * @param updateOrgRequest (required) + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the + * response body + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
204 Organization successfully updated. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public void updateOrg(String orgIdentifier, UpdateOrgRequest updateOrgRequest) + throws ApiException { + updateOrgWithHttpInfo(orgIdentifier, updateOrgRequest); + } + + /** + * Version: 9.0.0.cl or later Updates an Org object. You can modify Org properties such as name, + * description, and user associations. Requires cluster administration (**Can administer Org**) + * privileges. If [Role-Based Access Control + * (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the + * `ORG_ADMINISTRATION` (**Can manage Orgs**) privilege is required. + * + * @param orgIdentifier ID or name of the Org (required) + * @param updateOrgRequest (required) + * @return ApiResponse<Void> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the + * response body + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
204 Organization successfully updated. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public ApiResponse updateOrgWithHttpInfo( + String orgIdentifier, UpdateOrgRequest updateOrgRequest) throws ApiException { + okhttp3.Call localVarCall = + updateOrgValidateBeforeCall(orgIdentifier, updateOrgRequest, null); + return localVarApiClient.execute(localVarCall); + } + + /** + * (asynchronously) Version: 9.0.0.cl or later Updates an Org object. You can modify Org + * properties such as name, description, and user associations. Requires cluster administration + * (**Can administer Org**) privileges. If [Role-Based Access Control + * (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the + * `ORG_ADMINISTRATION` (**Can manage Orgs**) privilege is required. + * + * @param orgIdentifier ID or name of the Org (required) + * @param updateOrgRequest (required) + * @param _callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body + * object + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
204 Organization successfully updated. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public okhttp3.Call updateOrgAsync( + String orgIdentifier, + UpdateOrgRequest updateOrgRequest, + final ApiCallback _callback) + throws ApiException { + + okhttp3.Call localVarCall = + updateOrgValidateBeforeCall(orgIdentifier, updateOrgRequest, _callback); + localVarApiClient.executeAsync(localVarCall, _callback); + return localVarCall; + } +} diff --git a/sdks/java/src/main/java/com/thoughtspot/client/api/ReportsApi.java b/sdks/java/src/main/java/com/thoughtspot/client/api/ReportsApi.java new file mode 100644 index 000000000..e853f98b5 --- /dev/null +++ b/sdks/java/src/main/java/com/thoughtspot/client/api/ReportsApi.java @@ -0,0 +1,526 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client.api; + +import com.google.gson.reflect.TypeToken; +import com.thoughtspot.client.ApiCallback; +import com.thoughtspot.client.ApiClient; +import com.thoughtspot.client.ApiClientConfiguration; +import com.thoughtspot.client.ApiException; +import com.thoughtspot.client.ApiResponse; +import com.thoughtspot.client.Configuration; +import com.thoughtspot.client.Pair; +import com.thoughtspot.client.model.ExportAnswerReportRequest; +import com.thoughtspot.client.model.ExportLiveboardReportRequest; +import java.io.File; +import java.lang.reflect.Type; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +@javax.annotation.Generated( + value = "org.openapitools.codegen.languages.JavaClientCodegen", + comments = "Generator version: 7.12.0") +public class ReportsApi { + private ApiClient localVarApiClient; + private ApiClientConfiguration localVarApiClientConfiguration; + private int localHostIndex; + private String localCustomBaseUrl; + + public ReportsApi() { + this(Configuration.getDefaultApiClient()); + } + + public ReportsApi(ApiClient apiClient) { + this.localVarApiClient = apiClient; + } + + public ReportsApi(ApiClientConfiguration apiClientConfiguration) { + this.localVarApiClientConfiguration = apiClientConfiguration; + this.localVarApiClient = new ApiClient(apiClientConfiguration); + } + + public ApiClient getApiClient() { + return localVarApiClient; + } + + public void setApiClient(ApiClient apiClient) { + this.localVarApiClient = apiClient; + } + + public ApiClientConfiguration getApiClientConfiguration() { + return localVarApiClientConfiguration; + } + + public void applyApiClientConfiguration(ApiClientConfiguration apiClientConfiguration) { + this.localVarApiClientConfiguration = apiClientConfiguration; + if (localVarApiClient != null) { + localVarApiClient.applyApiClientConfiguration(apiClientConfiguration); + } else { + localVarApiClient = new ApiClient(apiClientConfiguration); + } + } + + public int getHostIndex() { + return localHostIndex; + } + + public void setHostIndex(int hostIndex) { + this.localHostIndex = hostIndex; + } + + public String getCustomBaseUrl() { + return localCustomBaseUrl; + } + + public void setCustomBaseUrl(String customBaseUrl) { + this.localCustomBaseUrl = customBaseUrl; + } + + /** + * Build call for exportAnswerReport + * + * @param exportAnswerReportRequest (required) + * @param _callback Callback for upload/download progress + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 Export report file of specified metadata object is successful. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public okhttp3.Call exportAnswerReportCall( + ExportAnswerReportRequest exportAnswerReportRequest, final ApiCallback _callback) + throws ApiException { + String basePath = null; + // Operation Servers + String[] localBasePaths = new String[] {}; + + // Determine Base Path to Use + if (localCustomBaseUrl != null) { + basePath = localCustomBaseUrl; + } else if (localBasePaths.length > 0) { + basePath = localBasePaths[localHostIndex]; + } else { + basePath = null; + } + + Object localVarPostBody = exportAnswerReportRequest; + + // create path and map variables + String localVarPath = "/api/rest/2.0/report/answer"; + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + final String[] localVarAccepts = {"application/octet-stream", "application/json"}; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = {"application/json"}; + final String localVarContentType = + localVarApiClient.selectHeaderContentType(localVarContentTypes); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } + + String[] localVarAuthNames = new String[] {"bearerAuth"}; + return localVarApiClient.buildCall( + basePath, + localVarPath, + "POST", + localVarQueryParams, + localVarCollectionQueryParams, + localVarPostBody, + localVarHeaderParams, + localVarCookieParams, + localVarFormParams, + localVarAuthNames, + _callback); + } + + @SuppressWarnings("rawtypes") + private okhttp3.Call exportAnswerReportValidateBeforeCall( + ExportAnswerReportRequest exportAnswerReportRequest, final ApiCallback _callback) + throws ApiException { + // verify the required parameter 'exportAnswerReportRequest' is set + if (exportAnswerReportRequest == null) { + throw new ApiException( + "Missing the required parameter 'exportAnswerReportRequest' when calling" + + " exportAnswerReport(Async)"); + } + + return exportAnswerReportCall(exportAnswerReportRequest, _callback); + } + + /** + * Version: 9.0.0.cl or later Exports an Answer in the given file format. You can download the + * Answer data as a PDF, PNG, CSV, or XLSX file. Requires at least view access to the Answer. + * #### Usage guidelines In the request body, specify the GUID or name of the Answer and set + * `file_format`. The default file format is CSV. Use the `type` parameter + * to specify whether the Answer being exported is a saved Answer (`SAVED`) or a + * pinned Answer on a Liveboard (`PINNED`). Defaults to `SAVED`. When using + * `PINNED`, the `metadata_identifier` must be the container id. **NOTE**: * + * The downloadable file returned in API response file is extensionless. Please rename the + * downloaded file by typing in the relevant extension. * HTML rendering is not supported for + * PDF exports of Answers with tables. Optionally, you can define [runtime + * overrides](https://developers.thoughtspot.com/docs/fetch-data-and-report-apis#_runtime_overrides) + * to apply to the Answer data. + * + * @param exportAnswerReportRequest (required) + * @return File + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the + * response body + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 Export report file of specified metadata object is successful. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public File exportAnswerReport(ExportAnswerReportRequest exportAnswerReportRequest) + throws ApiException { + ApiResponse localVarResp = exportAnswerReportWithHttpInfo(exportAnswerReportRequest); + return localVarResp.getData(); + } + + /** + * Version: 9.0.0.cl or later Exports an Answer in the given file format. You can download the + * Answer data as a PDF, PNG, CSV, or XLSX file. Requires at least view access to the Answer. + * #### Usage guidelines In the request body, specify the GUID or name of the Answer and set + * `file_format`. The default file format is CSV. Use the `type` parameter + * to specify whether the Answer being exported is a saved Answer (`SAVED`) or a + * pinned Answer on a Liveboard (`PINNED`). Defaults to `SAVED`. When using + * `PINNED`, the `metadata_identifier` must be the container id. **NOTE**: * + * The downloadable file returned in API response file is extensionless. Please rename the + * downloaded file by typing in the relevant extension. * HTML rendering is not supported for + * PDF exports of Answers with tables. Optionally, you can define [runtime + * overrides](https://developers.thoughtspot.com/docs/fetch-data-and-report-apis#_runtime_overrides) + * to apply to the Answer data. + * + * @param exportAnswerReportRequest (required) + * @return ApiResponse<File> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the + * response body + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 Export report file of specified metadata object is successful. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public ApiResponse exportAnswerReportWithHttpInfo( + ExportAnswerReportRequest exportAnswerReportRequest) throws ApiException { + okhttp3.Call localVarCall = + exportAnswerReportValidateBeforeCall(exportAnswerReportRequest, null); + Type localVarReturnType = new TypeToken() {}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); + } + + /** + * (asynchronously) Version: 9.0.0.cl or later Exports an Answer in the given file format. You + * can download the Answer data as a PDF, PNG, CSV, or XLSX file. Requires at least view access + * to the Answer. #### Usage guidelines In the request body, specify the GUID or name of the + * Answer and set `file_format`. The default file format is CSV. Use the + * `type` parameter to specify whether the Answer being exported is a saved Answer + * (`SAVED`) or a pinned Answer on a Liveboard (`PINNED`). Defaults to + * `SAVED`. When using `PINNED`, the `metadata_identifier` must be + * the container id. **NOTE**: * The downloadable file returned in API response file is + * extensionless. Please rename the downloaded file by typing in the relevant extension. * HTML + * rendering is not supported for PDF exports of Answers with tables. Optionally, you can define + * [runtime + * overrides](https://developers.thoughtspot.com/docs/fetch-data-and-report-apis#_runtime_overrides) + * to apply to the Answer data. + * + * @param exportAnswerReportRequest (required) + * @param _callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body + * object + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 Export report file of specified metadata object is successful. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public okhttp3.Call exportAnswerReportAsync( + ExportAnswerReportRequest exportAnswerReportRequest, final ApiCallback _callback) + throws ApiException { + + okhttp3.Call localVarCall = + exportAnswerReportValidateBeforeCall(exportAnswerReportRequest, _callback); + Type localVarReturnType = new TypeToken() {}.getType(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; + } + /** + * Build call for exportLiveboardReport + * + * @param exportLiveboardReportRequest (required) + * @param _callback Callback for upload/download progress + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 Export report file of specified metadata object is successful. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public okhttp3.Call exportLiveboardReportCall( + ExportLiveboardReportRequest exportLiveboardReportRequest, final ApiCallback _callback) + throws ApiException { + String basePath = null; + // Operation Servers + String[] localBasePaths = new String[] {}; + + // Determine Base Path to Use + if (localCustomBaseUrl != null) { + basePath = localCustomBaseUrl; + } else if (localBasePaths.length > 0) { + basePath = localBasePaths[localHostIndex]; + } else { + basePath = null; + } + + Object localVarPostBody = exportLiveboardReportRequest; + + // create path and map variables + String localVarPath = "/api/rest/2.0/report/liveboard"; + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + final String[] localVarAccepts = {"application/octet-stream", "application/json"}; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = {"application/json"}; + final String localVarContentType = + localVarApiClient.selectHeaderContentType(localVarContentTypes); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } + + String[] localVarAuthNames = new String[] {"bearerAuth"}; + return localVarApiClient.buildCall( + basePath, + localVarPath, + "POST", + localVarQueryParams, + localVarCollectionQueryParams, + localVarPostBody, + localVarHeaderParams, + localVarCookieParams, + localVarFormParams, + localVarAuthNames, + _callback); + } + + @SuppressWarnings("rawtypes") + private okhttp3.Call exportLiveboardReportValidateBeforeCall( + ExportLiveboardReportRequest exportLiveboardReportRequest, final ApiCallback _callback) + throws ApiException { + // verify the required parameter 'exportLiveboardReportRequest' is set + if (exportLiveboardReportRequest == null) { + throw new ApiException( + "Missing the required parameter 'exportLiveboardReportRequest' when calling" + + " exportLiveboardReport(Async)"); + } + + return exportLiveboardReportCall(exportLiveboardReportRequest, _callback); + } + + /** + * Version: 9.0.0.cl or later Exports a Liveboard and its visualizations in PDF, PNG, CSV, or + * XLSX file format. The default `file_format` is CSV. Requires at least view access + * to the Liveboard. #### Usage guidelines In the request body, specify the GUID or name of the + * Liveboard. To generate a Liveboard report with specific visualizations, add GUIDs or names of + * the visualizations. **NOTE**: * The downloadable file returned in API response file is + * extensionless. Please rename the downloaded file by typing in the relevant extension. * + * Optionally, you can define [runtime + * overrides](https://developers.thoughtspot.com/docs/fetch-data-and-report-apis#_runtime_overrides) + * to apply to the Answer data. * To include unsaved changes in the report, pass the + * `transient_pinboard_content` script generated from the + * `getExportRequestForCurrentPinboard` method in the Visual Embed SDK. Upon + * successful execution, the API returns the report with unsaved changes, including ad hoc + * changes to visualizations. For more information, see [Liveboard Report + * API](https://developers.thoughtspot.com/docs/fetch-data-and-report-apis#_liveboard_report_api). + * * Starting with ThoughtSpot Cloud 10.9.0.cl release, the Liveboard can be exported in the PNG + * format in the resolution of your choice. To enable this on your instance, contact ThoughtSpot + * support. When this feature is enabled, the options + * `include_cover_page`,`include_filter_page` within the + * `png_options` will not be available for PNG exports. * Starting with the + * ThoughtSpot Cloud 26.2.0.cl release, * Liveboards can be exported in CSV format. * All + * visualizations within a Liveboard can be exported as individual CSV files. * When exporting + * multiple visualizations or the entire Liveboard, the system returns the report as a + * compressed ZIP file containing the separate CSV files for each visualization. * Liveboards + * can also be exported in XLSX format. * All selected visualizations are consolidated into a + * single Excel workbook (.xlsx), with each visualization placed in its own worksheet (tab). * + * XLSX exports are limited to a maximum of 255 worksheets (tabs) per workbook. + * + * @param exportLiveboardReportRequest (required) + * @return File + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the + * response body + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 Export report file of specified metadata object is successful. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public File exportLiveboardReport(ExportLiveboardReportRequest exportLiveboardReportRequest) + throws ApiException { + ApiResponse localVarResp = + exportLiveboardReportWithHttpInfo(exportLiveboardReportRequest); + return localVarResp.getData(); + } + + /** + * Version: 9.0.0.cl or later Exports a Liveboard and its visualizations in PDF, PNG, CSV, or + * XLSX file format. The default `file_format` is CSV. Requires at least view access + * to the Liveboard. #### Usage guidelines In the request body, specify the GUID or name of the + * Liveboard. To generate a Liveboard report with specific visualizations, add GUIDs or names of + * the visualizations. **NOTE**: * The downloadable file returned in API response file is + * extensionless. Please rename the downloaded file by typing in the relevant extension. * + * Optionally, you can define [runtime + * overrides](https://developers.thoughtspot.com/docs/fetch-data-and-report-apis#_runtime_overrides) + * to apply to the Answer data. * To include unsaved changes in the report, pass the + * `transient_pinboard_content` script generated from the + * `getExportRequestForCurrentPinboard` method in the Visual Embed SDK. Upon + * successful execution, the API returns the report with unsaved changes, including ad hoc + * changes to visualizations. For more information, see [Liveboard Report + * API](https://developers.thoughtspot.com/docs/fetch-data-and-report-apis#_liveboard_report_api). + * * Starting with ThoughtSpot Cloud 10.9.0.cl release, the Liveboard can be exported in the PNG + * format in the resolution of your choice. To enable this on your instance, contact ThoughtSpot + * support. When this feature is enabled, the options + * `include_cover_page`,`include_filter_page` within the + * `png_options` will not be available for PNG exports. * Starting with the + * ThoughtSpot Cloud 26.2.0.cl release, * Liveboards can be exported in CSV format. * All + * visualizations within a Liveboard can be exported as individual CSV files. * When exporting + * multiple visualizations or the entire Liveboard, the system returns the report as a + * compressed ZIP file containing the separate CSV files for each visualization. * Liveboards + * can also be exported in XLSX format. * All selected visualizations are consolidated into a + * single Excel workbook (.xlsx), with each visualization placed in its own worksheet (tab). * + * XLSX exports are limited to a maximum of 255 worksheets (tabs) per workbook. + * + * @param exportLiveboardReportRequest (required) + * @return ApiResponse<File> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the + * response body + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 Export report file of specified metadata object is successful. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public ApiResponse exportLiveboardReportWithHttpInfo( + ExportLiveboardReportRequest exportLiveboardReportRequest) throws ApiException { + okhttp3.Call localVarCall = + exportLiveboardReportValidateBeforeCall(exportLiveboardReportRequest, null); + Type localVarReturnType = new TypeToken() {}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); + } + + /** + * (asynchronously) Version: 9.0.0.cl or later Exports a Liveboard and its visualizations in + * PDF, PNG, CSV, or XLSX file format. The default `file_format` is CSV. Requires at + * least view access to the Liveboard. #### Usage guidelines In the request body, specify the + * GUID or name of the Liveboard. To generate a Liveboard report with specific visualizations, + * add GUIDs or names of the visualizations. **NOTE**: * The downloadable file returned in API + * response file is extensionless. Please rename the downloaded file by typing in the relevant + * extension. * Optionally, you can define [runtime + * overrides](https://developers.thoughtspot.com/docs/fetch-data-and-report-apis#_runtime_overrides) + * to apply to the Answer data. * To include unsaved changes in the report, pass the + * `transient_pinboard_content` script generated from the + * `getExportRequestForCurrentPinboard` method in the Visual Embed SDK. Upon + * successful execution, the API returns the report with unsaved changes, including ad hoc + * changes to visualizations. For more information, see [Liveboard Report + * API](https://developers.thoughtspot.com/docs/fetch-data-and-report-apis#_liveboard_report_api). + * * Starting with ThoughtSpot Cloud 10.9.0.cl release, the Liveboard can be exported in the PNG + * format in the resolution of your choice. To enable this on your instance, contact ThoughtSpot + * support. When this feature is enabled, the options + * `include_cover_page`,`include_filter_page` within the + * `png_options` will not be available for PNG exports. * Starting with the + * ThoughtSpot Cloud 26.2.0.cl release, * Liveboards can be exported in CSV format. * All + * visualizations within a Liveboard can be exported as individual CSV files. * When exporting + * multiple visualizations or the entire Liveboard, the system returns the report as a + * compressed ZIP file containing the separate CSV files for each visualization. * Liveboards + * can also be exported in XLSX format. * All selected visualizations are consolidated into a + * single Excel workbook (.xlsx), with each visualization placed in its own worksheet (tab). * + * XLSX exports are limited to a maximum of 255 worksheets (tabs) per workbook. + * + * @param exportLiveboardReportRequest (required) + * @param _callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body + * object + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 Export report file of specified metadata object is successful. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public okhttp3.Call exportLiveboardReportAsync( + ExportLiveboardReportRequest exportLiveboardReportRequest, + final ApiCallback _callback) + throws ApiException { + + okhttp3.Call localVarCall = + exportLiveboardReportValidateBeforeCall(exportLiveboardReportRequest, _callback); + Type localVarReturnType = new TypeToken() {}.getType(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; + } +} diff --git a/sdks/java/src/main/java/com/thoughtspot/client/api/RolesApi.java b/sdks/java/src/main/java/com/thoughtspot/client/api/RolesApi.java new file mode 100644 index 000000000..63c7d2bb1 --- /dev/null +++ b/sdks/java/src/main/java/com/thoughtspot/client/api/RolesApi.java @@ -0,0 +1,802 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client.api; + +import com.google.gson.reflect.TypeToken; +import com.thoughtspot.client.ApiCallback; +import com.thoughtspot.client.ApiClient; +import com.thoughtspot.client.ApiClientConfiguration; +import com.thoughtspot.client.ApiException; +import com.thoughtspot.client.ApiResponse; +import com.thoughtspot.client.Configuration; +import com.thoughtspot.client.Pair; +import com.thoughtspot.client.model.CreateRoleRequest; +import com.thoughtspot.client.model.RoleResponse; +import com.thoughtspot.client.model.SearchRoleResponse; +import com.thoughtspot.client.model.SearchRolesRequest; +import com.thoughtspot.client.model.UpdateRoleRequest; +import java.lang.reflect.Type; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +@javax.annotation.Generated( + value = "org.openapitools.codegen.languages.JavaClientCodegen", + comments = "Generator version: 7.12.0") +public class RolesApi { + private ApiClient localVarApiClient; + private ApiClientConfiguration localVarApiClientConfiguration; + private int localHostIndex; + private String localCustomBaseUrl; + + public RolesApi() { + this(Configuration.getDefaultApiClient()); + } + + public RolesApi(ApiClient apiClient) { + this.localVarApiClient = apiClient; + } + + public RolesApi(ApiClientConfiguration apiClientConfiguration) { + this.localVarApiClientConfiguration = apiClientConfiguration; + this.localVarApiClient = new ApiClient(apiClientConfiguration); + } + + public ApiClient getApiClient() { + return localVarApiClient; + } + + public void setApiClient(ApiClient apiClient) { + this.localVarApiClient = apiClient; + } + + public ApiClientConfiguration getApiClientConfiguration() { + return localVarApiClientConfiguration; + } + + public void applyApiClientConfiguration(ApiClientConfiguration apiClientConfiguration) { + this.localVarApiClientConfiguration = apiClientConfiguration; + if (localVarApiClient != null) { + localVarApiClient.applyApiClientConfiguration(apiClientConfiguration); + } else { + localVarApiClient = new ApiClient(apiClientConfiguration); + } + } + + public int getHostIndex() { + return localHostIndex; + } + + public void setHostIndex(int hostIndex) { + this.localHostIndex = hostIndex; + } + + public String getCustomBaseUrl() { + return localCustomBaseUrl; + } + + public void setCustomBaseUrl(String customBaseUrl) { + this.localCustomBaseUrl = customBaseUrl; + } + + /** + * Build call for createRole + * + * @param createRoleRequest (required) + * @param _callback Callback for upload/download progress + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 Role successfully created. -
400 Invalid parameters. -
401 Unauthorized access. -
403 Forbidden access. -
500 Internal error -
+ */ + public okhttp3.Call createRoleCall( + CreateRoleRequest createRoleRequest, final ApiCallback _callback) throws ApiException { + String basePath = null; + // Operation Servers + String[] localBasePaths = new String[] {}; + + // Determine Base Path to Use + if (localCustomBaseUrl != null) { + basePath = localCustomBaseUrl; + } else if (localBasePaths.length > 0) { + basePath = localBasePaths[localHostIndex]; + } else { + basePath = null; + } + + Object localVarPostBody = createRoleRequest; + + // create path and map variables + String localVarPath = "/api/rest/2.0/roles/create"; + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + final String[] localVarAccepts = {"application/json"}; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = {"application/json"}; + final String localVarContentType = + localVarApiClient.selectHeaderContentType(localVarContentTypes); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } + + String[] localVarAuthNames = new String[] {"bearerAuth"}; + return localVarApiClient.buildCall( + basePath, + localVarPath, + "POST", + localVarQueryParams, + localVarCollectionQueryParams, + localVarPostBody, + localVarHeaderParams, + localVarCookieParams, + localVarFormParams, + localVarAuthNames, + _callback); + } + + @SuppressWarnings("rawtypes") + private okhttp3.Call createRoleValidateBeforeCall( + CreateRoleRequest createRoleRequest, final ApiCallback _callback) throws ApiException { + // verify the required parameter 'createRoleRequest' is set + if (createRoleRequest == null) { + throw new ApiException( + "Missing the required parameter 'createRoleRequest' when calling" + + " createRole(Async)"); + } + + return createRoleCall(createRoleRequest, _callback); + } + + /** + * Version: 9.5.0.cl or later Creates a Role object in ThoughtSpot. Available only if + * [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled + * on your instance. To create a Role, the `ROLE_ADMINISTRATION` (**Can manage + * roles**) privilege is required. + * + * @param createRoleRequest (required) + * @return RoleResponse + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the + * response body + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 Role successfully created. -
400 Invalid parameters. -
401 Unauthorized access. -
403 Forbidden access. -
500 Internal error -
+ */ + public RoleResponse createRole(CreateRoleRequest createRoleRequest) throws ApiException { + ApiResponse localVarResp = createRoleWithHttpInfo(createRoleRequest); + return localVarResp.getData(); + } + + /** + * Version: 9.5.0.cl or later Creates a Role object in ThoughtSpot. Available only if + * [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled + * on your instance. To create a Role, the `ROLE_ADMINISTRATION` (**Can manage + * roles**) privilege is required. + * + * @param createRoleRequest (required) + * @return ApiResponse<RoleResponse> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the + * response body + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 Role successfully created. -
400 Invalid parameters. -
401 Unauthorized access. -
403 Forbidden access. -
500 Internal error -
+ */ + public ApiResponse createRoleWithHttpInfo(CreateRoleRequest createRoleRequest) + throws ApiException { + okhttp3.Call localVarCall = createRoleValidateBeforeCall(createRoleRequest, null); + Type localVarReturnType = new TypeToken() {}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); + } + + /** + * (asynchronously) Version: 9.5.0.cl or later Creates a Role object in ThoughtSpot. Available + * only if [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is + * enabled on your instance. To create a Role, the `ROLE_ADMINISTRATION` (**Can manage + * roles**) privilege is required. + * + * @param createRoleRequest (required) + * @param _callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body + * object + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 Role successfully created. -
400 Invalid parameters. -
401 Unauthorized access. -
403 Forbidden access. -
500 Internal error -
+ */ + public okhttp3.Call createRoleAsync( + CreateRoleRequest createRoleRequest, final ApiCallback _callback) + throws ApiException { + + okhttp3.Call localVarCall = createRoleValidateBeforeCall(createRoleRequest, _callback); + Type localVarReturnType = new TypeToken() {}.getType(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; + } + /** + * Build call for deleteRole + * + * @param roleIdentifier Unique ID or name of the Role. ReadOnly roles cannot be deleted. + * (required) + * @param _callback Callback for upload/download progress + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
204 Role successfully deleted. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Internal error -
+ */ + public okhttp3.Call deleteRoleCall(String roleIdentifier, final ApiCallback _callback) + throws ApiException { + String basePath = null; + // Operation Servers + String[] localBasePaths = new String[] {}; + + // Determine Base Path to Use + if (localCustomBaseUrl != null) { + basePath = localCustomBaseUrl; + } else if (localBasePaths.length > 0) { + basePath = localBasePaths[localHostIndex]; + } else { + basePath = null; + } + + Object localVarPostBody = null; + + // create path and map variables + String localVarPath = + "/api/rest/2.0/roles/{role_identifier}/delete" + .replace( + "{" + "role_identifier" + "}", + localVarApiClient.escapeString(roleIdentifier.toString())); + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + final String[] localVarAccepts = {"application/json"}; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = {}; + final String localVarContentType = + localVarApiClient.selectHeaderContentType(localVarContentTypes); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } + + String[] localVarAuthNames = new String[] {"bearerAuth"}; + return localVarApiClient.buildCall( + basePath, + localVarPath, + "POST", + localVarQueryParams, + localVarCollectionQueryParams, + localVarPostBody, + localVarHeaderParams, + localVarCookieParams, + localVarFormParams, + localVarAuthNames, + _callback); + } + + @SuppressWarnings("rawtypes") + private okhttp3.Call deleteRoleValidateBeforeCall( + String roleIdentifier, final ApiCallback _callback) throws ApiException { + // verify the required parameter 'roleIdentifier' is set + if (roleIdentifier == null) { + throw new ApiException( + "Missing the required parameter 'roleIdentifier' when calling" + + " deleteRole(Async)"); + } + + return deleteRoleCall(roleIdentifier, _callback); + } + + /** + * Version: 9.5.0.cl or later Deletes a Role object from the ThoughtSpot system. Available only + * if [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is + * enabled on your instance. To delete a Role, the `ROLE_ADMINISTRATION` (**Can manage + * roles**) privilege is required. + * + * @param roleIdentifier Unique ID or name of the Role. ReadOnly roles cannot be deleted. + * (required) + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the + * response body + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
204 Role successfully deleted. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Internal error -
+ */ + public void deleteRole(String roleIdentifier) throws ApiException { + deleteRoleWithHttpInfo(roleIdentifier); + } + + /** + * Version: 9.5.0.cl or later Deletes a Role object from the ThoughtSpot system. Available only + * if [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is + * enabled on your instance. To delete a Role, the `ROLE_ADMINISTRATION` (**Can manage + * roles**) privilege is required. + * + * @param roleIdentifier Unique ID or name of the Role. ReadOnly roles cannot be deleted. + * (required) + * @return ApiResponse<Void> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the + * response body + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
204 Role successfully deleted. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Internal error -
+ */ + public ApiResponse deleteRoleWithHttpInfo(String roleIdentifier) throws ApiException { + okhttp3.Call localVarCall = deleteRoleValidateBeforeCall(roleIdentifier, null); + return localVarApiClient.execute(localVarCall); + } + + /** + * (asynchronously) Version: 9.5.0.cl or later Deletes a Role object from the ThoughtSpot + * system. Available only if [Role-Based Access Control + * (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance. To delete + * a Role, the `ROLE_ADMINISTRATION` (**Can manage roles**) privilege is required. + * + * @param roleIdentifier Unique ID or name of the Role. ReadOnly roles cannot be deleted. + * (required) + * @param _callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body + * object + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
204 Role successfully deleted. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Internal error -
+ */ + public okhttp3.Call deleteRoleAsync(String roleIdentifier, final ApiCallback _callback) + throws ApiException { + + okhttp3.Call localVarCall = deleteRoleValidateBeforeCall(roleIdentifier, _callback); + localVarApiClient.executeAsync(localVarCall, _callback); + return localVarCall; + } + /** + * Build call for searchRoles + * + * @param searchRolesRequest (required) + * @param _callback Callback for upload/download progress + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 Roles search result. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Internal error -
+ */ + public okhttp3.Call searchRolesCall( + SearchRolesRequest searchRolesRequest, final ApiCallback _callback) + throws ApiException { + String basePath = null; + // Operation Servers + String[] localBasePaths = new String[] {}; + + // Determine Base Path to Use + if (localCustomBaseUrl != null) { + basePath = localCustomBaseUrl; + } else if (localBasePaths.length > 0) { + basePath = localBasePaths[localHostIndex]; + } else { + basePath = null; + } + + Object localVarPostBody = searchRolesRequest; + + // create path and map variables + String localVarPath = "/api/rest/2.0/roles/search"; + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + final String[] localVarAccepts = {"application/json"}; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = {"application/json"}; + final String localVarContentType = + localVarApiClient.selectHeaderContentType(localVarContentTypes); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } + + String[] localVarAuthNames = new String[] {"bearerAuth"}; + return localVarApiClient.buildCall( + basePath, + localVarPath, + "POST", + localVarQueryParams, + localVarCollectionQueryParams, + localVarPostBody, + localVarHeaderParams, + localVarCookieParams, + localVarFormParams, + localVarAuthNames, + _callback); + } + + @SuppressWarnings("rawtypes") + private okhttp3.Call searchRolesValidateBeforeCall( + SearchRolesRequest searchRolesRequest, final ApiCallback _callback) + throws ApiException { + // verify the required parameter 'searchRolesRequest' is set + if (searchRolesRequest == null) { + throw new ApiException( + "Missing the required parameter 'searchRolesRequest' when calling" + + " searchRoles(Async)"); + } + + return searchRolesCall(searchRolesRequest, _callback); + } + + /** + * Version: 9.5.0.cl or later Gets a list of Role objects from the ThoughtSpot system. Available + * if [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is + * enabled on your instance. To search for Roles, the `ROLE_ADMINISTRATION` (**Can + * manage roles**) privilege is required. To get details of a specific Role object, specify the + * GUID or name. You can also filter the API response based on user group and Org identifiers, + * privileges assigned to the Role, and deprecation status. + * + * @param searchRolesRequest (required) + * @return List<SearchRoleResponse> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the + * response body + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 Roles search result. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Internal error -
+ */ + public List searchRoles(SearchRolesRequest searchRolesRequest) + throws ApiException { + ApiResponse> localVarResp = + searchRolesWithHttpInfo(searchRolesRequest); + return localVarResp.getData(); + } + + /** + * Version: 9.5.0.cl or later Gets a list of Role objects from the ThoughtSpot system. Available + * if [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is + * enabled on your instance. To search for Roles, the `ROLE_ADMINISTRATION` (**Can + * manage roles**) privilege is required. To get details of a specific Role object, specify the + * GUID or name. You can also filter the API response based on user group and Org identifiers, + * privileges assigned to the Role, and deprecation status. + * + * @param searchRolesRequest (required) + * @return ApiResponse<List<SearchRoleResponse>> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the + * response body + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 Roles search result. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Internal error -
+ */ + public ApiResponse> searchRolesWithHttpInfo( + SearchRolesRequest searchRolesRequest) throws ApiException { + okhttp3.Call localVarCall = searchRolesValidateBeforeCall(searchRolesRequest, null); + Type localVarReturnType = new TypeToken>() {}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); + } + + /** + * (asynchronously) Version: 9.5.0.cl or later Gets a list of Role objects from the ThoughtSpot + * system. Available if [Role-Based Access Control + * (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance. To search + * for Roles, the `ROLE_ADMINISTRATION` (**Can manage roles**) privilege is required. + * To get details of a specific Role object, specify the GUID or name. You can also filter the + * API response based on user group and Org identifiers, privileges assigned to the Role, and + * deprecation status. + * + * @param searchRolesRequest (required) + * @param _callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body + * object + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 Roles search result. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Internal error -
+ */ + public okhttp3.Call searchRolesAsync( + SearchRolesRequest searchRolesRequest, + final ApiCallback> _callback) + throws ApiException { + + okhttp3.Call localVarCall = searchRolesValidateBeforeCall(searchRolesRequest, _callback); + Type localVarReturnType = new TypeToken>() {}.getType(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; + } + /** + * Build call for updateRole + * + * @param roleIdentifier Unique ID or name of the Role. (required) + * @param updateRoleRequest (required) + * @param _callback Callback for upload/download progress + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 Role successfully updated. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public okhttp3.Call updateRoleCall( + String roleIdentifier, UpdateRoleRequest updateRoleRequest, final ApiCallback _callback) + throws ApiException { + String basePath = null; + // Operation Servers + String[] localBasePaths = new String[] {}; + + // Determine Base Path to Use + if (localCustomBaseUrl != null) { + basePath = localCustomBaseUrl; + } else if (localBasePaths.length > 0) { + basePath = localBasePaths[localHostIndex]; + } else { + basePath = null; + } + + Object localVarPostBody = updateRoleRequest; + + // create path and map variables + String localVarPath = + "/api/rest/2.0/roles/{role_identifier}/update" + .replace( + "{" + "role_identifier" + "}", + localVarApiClient.escapeString(roleIdentifier.toString())); + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + final String[] localVarAccepts = {"application/json"}; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = {"application/json"}; + final String localVarContentType = + localVarApiClient.selectHeaderContentType(localVarContentTypes); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } + + String[] localVarAuthNames = new String[] {"bearerAuth"}; + return localVarApiClient.buildCall( + basePath, + localVarPath, + "POST", + localVarQueryParams, + localVarCollectionQueryParams, + localVarPostBody, + localVarHeaderParams, + localVarCookieParams, + localVarFormParams, + localVarAuthNames, + _callback); + } + + @SuppressWarnings("rawtypes") + private okhttp3.Call updateRoleValidateBeforeCall( + String roleIdentifier, UpdateRoleRequest updateRoleRequest, final ApiCallback _callback) + throws ApiException { + // verify the required parameter 'roleIdentifier' is set + if (roleIdentifier == null) { + throw new ApiException( + "Missing the required parameter 'roleIdentifier' when calling" + + " updateRole(Async)"); + } + + // verify the required parameter 'updateRoleRequest' is set + if (updateRoleRequest == null) { + throw new ApiException( + "Missing the required parameter 'updateRoleRequest' when calling" + + " updateRole(Async)"); + } + + return updateRoleCall(roleIdentifier, updateRoleRequest, _callback); + } + + /** + * Version: 9.5.0.cl or later Updates the properties of a Role object. Available only if + * [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled + * on your instance. To update a Role, the `ROLE_ADMINISTRATION` (**Can manage + * roles**) privilege is required. + * + * @param roleIdentifier Unique ID or name of the Role. (required) + * @param updateRoleRequest (required) + * @return RoleResponse + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the + * response body + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 Role successfully updated. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public RoleResponse updateRole(String roleIdentifier, UpdateRoleRequest updateRoleRequest) + throws ApiException { + ApiResponse localVarResp = + updateRoleWithHttpInfo(roleIdentifier, updateRoleRequest); + return localVarResp.getData(); + } + + /** + * Version: 9.5.0.cl or later Updates the properties of a Role object. Available only if + * [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled + * on your instance. To update a Role, the `ROLE_ADMINISTRATION` (**Can manage + * roles**) privilege is required. + * + * @param roleIdentifier Unique ID or name of the Role. (required) + * @param updateRoleRequest (required) + * @return ApiResponse<RoleResponse> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the + * response body + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 Role successfully updated. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public ApiResponse updateRoleWithHttpInfo( + String roleIdentifier, UpdateRoleRequest updateRoleRequest) throws ApiException { + okhttp3.Call localVarCall = + updateRoleValidateBeforeCall(roleIdentifier, updateRoleRequest, null); + Type localVarReturnType = new TypeToken() {}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); + } + + /** + * (asynchronously) Version: 9.5.0.cl or later Updates the properties of a Role object. + * Available only if [Role-Based Access Control + * (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance. To update + * a Role, the `ROLE_ADMINISTRATION` (**Can manage roles**) privilege is required. + * + * @param roleIdentifier Unique ID or name of the Role. (required) + * @param updateRoleRequest (required) + * @param _callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body + * object + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 Role successfully updated. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public okhttp3.Call updateRoleAsync( + String roleIdentifier, + UpdateRoleRequest updateRoleRequest, + final ApiCallback _callback) + throws ApiException { + + okhttp3.Call localVarCall = + updateRoleValidateBeforeCall(roleIdentifier, updateRoleRequest, _callback); + Type localVarReturnType = new TypeToken() {}.getType(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; + } +} diff --git a/sdks/java/src/main/java/com/thoughtspot/client/api/SchedulesApi.java b/sdks/java/src/main/java/com/thoughtspot/client/api/SchedulesApi.java new file mode 100644 index 000000000..c06687ee3 --- /dev/null +++ b/sdks/java/src/main/java/com/thoughtspot/client/api/SchedulesApi.java @@ -0,0 +1,881 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client.api; + +import com.google.gson.reflect.TypeToken; +import com.thoughtspot.client.ApiCallback; +import com.thoughtspot.client.ApiClient; +import com.thoughtspot.client.ApiClientConfiguration; +import com.thoughtspot.client.ApiException; +import com.thoughtspot.client.ApiResponse; +import com.thoughtspot.client.Configuration; +import com.thoughtspot.client.Pair; +import com.thoughtspot.client.model.CreateScheduleRequest; +import com.thoughtspot.client.model.ResponseSchedule; +import com.thoughtspot.client.model.SearchSchedulesRequest; +import com.thoughtspot.client.model.UpdateScheduleRequest; +import java.lang.reflect.Type; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +@javax.annotation.Generated( + value = "org.openapitools.codegen.languages.JavaClientCodegen", + comments = "Generator version: 7.12.0") +public class SchedulesApi { + private ApiClient localVarApiClient; + private ApiClientConfiguration localVarApiClientConfiguration; + private int localHostIndex; + private String localCustomBaseUrl; + + public SchedulesApi() { + this(Configuration.getDefaultApiClient()); + } + + public SchedulesApi(ApiClient apiClient) { + this.localVarApiClient = apiClient; + } + + public SchedulesApi(ApiClientConfiguration apiClientConfiguration) { + this.localVarApiClientConfiguration = apiClientConfiguration; + this.localVarApiClient = new ApiClient(apiClientConfiguration); + } + + public ApiClient getApiClient() { + return localVarApiClient; + } + + public void setApiClient(ApiClient apiClient) { + this.localVarApiClient = apiClient; + } + + public ApiClientConfiguration getApiClientConfiguration() { + return localVarApiClientConfiguration; + } + + public void applyApiClientConfiguration(ApiClientConfiguration apiClientConfiguration) { + this.localVarApiClientConfiguration = apiClientConfiguration; + if (localVarApiClient != null) { + localVarApiClient.applyApiClientConfiguration(apiClientConfiguration); + } else { + localVarApiClient = new ApiClient(apiClientConfiguration); + } + } + + public int getHostIndex() { + return localHostIndex; + } + + public void setHostIndex(int hostIndex) { + this.localHostIndex = hostIndex; + } + + public String getCustomBaseUrl() { + return localCustomBaseUrl; + } + + public void setCustomBaseUrl(String customBaseUrl) { + this.localCustomBaseUrl = customBaseUrl; + } + + /** + * Build call for createSchedule + * + * @param createScheduleRequest (required) + * @param _callback Callback for upload/download progress + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 Schedule successfully created. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public okhttp3.Call createScheduleCall( + CreateScheduleRequest createScheduleRequest, final ApiCallback _callback) + throws ApiException { + String basePath = null; + // Operation Servers + String[] localBasePaths = new String[] {}; + + // Determine Base Path to Use + if (localCustomBaseUrl != null) { + basePath = localCustomBaseUrl; + } else if (localBasePaths.length > 0) { + basePath = localBasePaths[localHostIndex]; + } else { + basePath = null; + } + + Object localVarPostBody = createScheduleRequest; + + // create path and map variables + String localVarPath = "/api/rest/2.0/schedules/create"; + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + final String[] localVarAccepts = {"application/json"}; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = {"application/json"}; + final String localVarContentType = + localVarApiClient.selectHeaderContentType(localVarContentTypes); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } + + String[] localVarAuthNames = new String[] {"bearerAuth"}; + return localVarApiClient.buildCall( + basePath, + localVarPath, + "POST", + localVarQueryParams, + localVarCollectionQueryParams, + localVarPostBody, + localVarHeaderParams, + localVarCookieParams, + localVarFormParams, + localVarAuthNames, + _callback); + } + + @SuppressWarnings("rawtypes") + private okhttp3.Call createScheduleValidateBeforeCall( + CreateScheduleRequest createScheduleRequest, final ApiCallback _callback) + throws ApiException { + // verify the required parameter 'createScheduleRequest' is set + if (createScheduleRequest == null) { + throw new ApiException( + "Missing the required parameter 'createScheduleRequest' when calling" + + " createSchedule(Async)"); + } + + return createScheduleCall(createScheduleRequest, _callback); + } + + /** + * Create schedule. Version: 9.4.0.cl or later Creates a Liveboard schedule job. Requires at + * least edit access to Liveboards. To create a schedule on behalf of another user, you need + * `ADMINISTRATION` (**Can administer Org**) or `JOBSCHEDULING` (**Can + * schedule for others**) privilege and edit access to the Liveboard. If [Role-Based Access + * Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, + * the `JOBSCHEDULING` (**Can schedule for others**) privilege is required. #### Usage + * guidelines * The description text is mandatory. The description text appears as + * **Description: <your content>** in the Liveboard schedule email notifications. * For + * Liveboards with both charts and tables, schedule creation is only supported in PDF and XLS + * formats. Schedules created in CSV formats for such Liveboards will fail to run. If + * `PDF` is set as the `file_format`, enable `pdf_options` to get + * the correct attachment. Not doing so may cause the attachment to be rendered empty. * To + * include only specific visualizations, specify the visualization GUIDs in the + * `visualization_identifiers` array. * You can schedule a Liveboard job to run + * periodically by setting frequency parameters. You can set the schedule to run daily, weekly, + * monthly or every n minutes or hours. The scheduled job can also be configured to run at a + * specific time of the day or on specific days of the week or month. Please ensure that when + * setting the schedule frequency for _minute of the object_, only values that are multiples of + * 5 are included. * If the `frequency` parameters are defined, you can set the time + * zone to a value that matches your server's time zone. For example, + * `US/Central`, `Etc/UTC`, `CET`. The default time zone is + * `America/Los_Angeles`. For more information about Liveboard jobs, see [ThoughtSpot + * Product Documentation](https://docs.thoughtspot.com/cloud/latest/liveboard-schedule). + * + * @param createScheduleRequest (required) + * @return ResponseSchedule + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the + * response body + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 Schedule successfully created. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public ResponseSchedule createSchedule(CreateScheduleRequest createScheduleRequest) + throws ApiException { + ApiResponse localVarResp = + createScheduleWithHttpInfo(createScheduleRequest); + return localVarResp.getData(); + } + + /** + * Create schedule. Version: 9.4.0.cl or later Creates a Liveboard schedule job. Requires at + * least edit access to Liveboards. To create a schedule on behalf of another user, you need + * `ADMINISTRATION` (**Can administer Org**) or `JOBSCHEDULING` (**Can + * schedule for others**) privilege and edit access to the Liveboard. If [Role-Based Access + * Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, + * the `JOBSCHEDULING` (**Can schedule for others**) privilege is required. #### Usage + * guidelines * The description text is mandatory. The description text appears as + * **Description: <your content>** in the Liveboard schedule email notifications. * For + * Liveboards with both charts and tables, schedule creation is only supported in PDF and XLS + * formats. Schedules created in CSV formats for such Liveboards will fail to run. If + * `PDF` is set as the `file_format`, enable `pdf_options` to get + * the correct attachment. Not doing so may cause the attachment to be rendered empty. * To + * include only specific visualizations, specify the visualization GUIDs in the + * `visualization_identifiers` array. * You can schedule a Liveboard job to run + * periodically by setting frequency parameters. You can set the schedule to run daily, weekly, + * monthly or every n minutes or hours. The scheduled job can also be configured to run at a + * specific time of the day or on specific days of the week or month. Please ensure that when + * setting the schedule frequency for _minute of the object_, only values that are multiples of + * 5 are included. * If the `frequency` parameters are defined, you can set the time + * zone to a value that matches your server's time zone. For example, + * `US/Central`, `Etc/UTC`, `CET`. The default time zone is + * `America/Los_Angeles`. For more information about Liveboard jobs, see [ThoughtSpot + * Product Documentation](https://docs.thoughtspot.com/cloud/latest/liveboard-schedule). + * + * @param createScheduleRequest (required) + * @return ApiResponse<ResponseSchedule> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the + * response body + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 Schedule successfully created. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public ApiResponse createScheduleWithHttpInfo( + CreateScheduleRequest createScheduleRequest) throws ApiException { + okhttp3.Call localVarCall = createScheduleValidateBeforeCall(createScheduleRequest, null); + Type localVarReturnType = new TypeToken() {}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); + } + + /** + * (asynchronously) Create schedule. Version: 9.4.0.cl or later Creates a Liveboard schedule + * job. Requires at least edit access to Liveboards. To create a schedule on behalf of another + * user, you need `ADMINISTRATION` (**Can administer Org**) or + * `JOBSCHEDULING` (**Can schedule for others**) privilege and edit access to the + * Liveboard. If [Role-Based Access Control + * (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the + * `JOBSCHEDULING` (**Can schedule for others**) privilege is required. #### Usage + * guidelines * The description text is mandatory. The description text appears as + * **Description: <your content>** in the Liveboard schedule email notifications. * For + * Liveboards with both charts and tables, schedule creation is only supported in PDF and XLS + * formats. Schedules created in CSV formats for such Liveboards will fail to run. If + * `PDF` is set as the `file_format`, enable `pdf_options` to get + * the correct attachment. Not doing so may cause the attachment to be rendered empty. * To + * include only specific visualizations, specify the visualization GUIDs in the + * `visualization_identifiers` array. * You can schedule a Liveboard job to run + * periodically by setting frequency parameters. You can set the schedule to run daily, weekly, + * monthly or every n minutes or hours. The scheduled job can also be configured to run at a + * specific time of the day or on specific days of the week or month. Please ensure that when + * setting the schedule frequency for _minute of the object_, only values that are multiples of + * 5 are included. * If the `frequency` parameters are defined, you can set the time + * zone to a value that matches your server's time zone. For example, + * `US/Central`, `Etc/UTC`, `CET`. The default time zone is + * `America/Los_Angeles`. For more information about Liveboard jobs, see [ThoughtSpot + * Product Documentation](https://docs.thoughtspot.com/cloud/latest/liveboard-schedule). + * + * @param createScheduleRequest (required) + * @param _callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body + * object + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 Schedule successfully created. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public okhttp3.Call createScheduleAsync( + CreateScheduleRequest createScheduleRequest, + final ApiCallback _callback) + throws ApiException { + + okhttp3.Call localVarCall = + createScheduleValidateBeforeCall(createScheduleRequest, _callback); + Type localVarReturnType = new TypeToken() {}.getType(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; + } + /** + * Build call for deleteSchedule + * + * @param scheduleIdentifier Unique ID or name of the scheduled job. (required) + * @param _callback Callback for upload/download progress + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
204 Schedule successfully deleted. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public okhttp3.Call deleteScheduleCall(String scheduleIdentifier, final ApiCallback _callback) + throws ApiException { + String basePath = null; + // Operation Servers + String[] localBasePaths = new String[] {}; + + // Determine Base Path to Use + if (localCustomBaseUrl != null) { + basePath = localCustomBaseUrl; + } else if (localBasePaths.length > 0) { + basePath = localBasePaths[localHostIndex]; + } else { + basePath = null; + } + + Object localVarPostBody = null; + + // create path and map variables + String localVarPath = + "/api/rest/2.0/schedules/{schedule_identifier}/delete" + .replace( + "{" + "schedule_identifier" + "}", + localVarApiClient.escapeString(scheduleIdentifier.toString())); + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + final String[] localVarAccepts = {"application/json"}; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = {}; + final String localVarContentType = + localVarApiClient.selectHeaderContentType(localVarContentTypes); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } + + String[] localVarAuthNames = new String[] {"bearerAuth"}; + return localVarApiClient.buildCall( + basePath, + localVarPath, + "POST", + localVarQueryParams, + localVarCollectionQueryParams, + localVarPostBody, + localVarHeaderParams, + localVarCookieParams, + localVarFormParams, + localVarAuthNames, + _callback); + } + + @SuppressWarnings("rawtypes") + private okhttp3.Call deleteScheduleValidateBeforeCall( + String scheduleIdentifier, final ApiCallback _callback) throws ApiException { + // verify the required parameter 'scheduleIdentifier' is set + if (scheduleIdentifier == null) { + throw new ApiException( + "Missing the required parameter 'scheduleIdentifier' when calling" + + " deleteSchedule(Async)"); + } + + return deleteScheduleCall(scheduleIdentifier, _callback); + } + + /** + * Deletes a scheduled job. Version: 9.4.0.cl or later Deletes a scheduled Liveboard job. + * Requires at least edit access to Liveboard or `ADMINISTRATION` (**Can administer + * Org**) privilege. If [Role-Based Access Control + * (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the + * `JOBSCHEDULING` (**Can schedule for others**) privilege is required. + * + * @param scheduleIdentifier Unique ID or name of the scheduled job. (required) + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the + * response body + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
204 Schedule successfully deleted. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public void deleteSchedule(String scheduleIdentifier) throws ApiException { + deleteScheduleWithHttpInfo(scheduleIdentifier); + } + + /** + * Deletes a scheduled job. Version: 9.4.0.cl or later Deletes a scheduled Liveboard job. + * Requires at least edit access to Liveboard or `ADMINISTRATION` (**Can administer + * Org**) privilege. If [Role-Based Access Control + * (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the + * `JOBSCHEDULING` (**Can schedule for others**) privilege is required. + * + * @param scheduleIdentifier Unique ID or name of the scheduled job. (required) + * @return ApiResponse<Void> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the + * response body + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
204 Schedule successfully deleted. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public ApiResponse deleteScheduleWithHttpInfo(String scheduleIdentifier) + throws ApiException { + okhttp3.Call localVarCall = deleteScheduleValidateBeforeCall(scheduleIdentifier, null); + return localVarApiClient.execute(localVarCall); + } + + /** + * (asynchronously) Deletes a scheduled job. Version: 9.4.0.cl or later Deletes a scheduled + * Liveboard job. Requires at least edit access to Liveboard or `ADMINISTRATION` + * (**Can administer Org**) privilege. If [Role-Based Access Control + * (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the + * `JOBSCHEDULING` (**Can schedule for others**) privilege is required. + * + * @param scheduleIdentifier Unique ID or name of the scheduled job. (required) + * @param _callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body + * object + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
204 Schedule successfully deleted. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public okhttp3.Call deleteScheduleAsync( + String scheduleIdentifier, final ApiCallback _callback) throws ApiException { + + okhttp3.Call localVarCall = deleteScheduleValidateBeforeCall(scheduleIdentifier, _callback); + localVarApiClient.executeAsync(localVarCall, _callback); + return localVarCall; + } + /** + * Build call for searchSchedules + * + * @param searchSchedulesRequest (required) + * @param _callback Callback for upload/download progress + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 Schedule search result. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public okhttp3.Call searchSchedulesCall( + SearchSchedulesRequest searchSchedulesRequest, final ApiCallback _callback) + throws ApiException { + String basePath = null; + // Operation Servers + String[] localBasePaths = new String[] {}; + + // Determine Base Path to Use + if (localCustomBaseUrl != null) { + basePath = localCustomBaseUrl; + } else if (localBasePaths.length > 0) { + basePath = localBasePaths[localHostIndex]; + } else { + basePath = null; + } + + Object localVarPostBody = searchSchedulesRequest; + + // create path and map variables + String localVarPath = "/api/rest/2.0/schedules/search"; + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + final String[] localVarAccepts = {"application/json"}; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = {"application/json"}; + final String localVarContentType = + localVarApiClient.selectHeaderContentType(localVarContentTypes); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } + + String[] localVarAuthNames = new String[] {"bearerAuth"}; + return localVarApiClient.buildCall( + basePath, + localVarPath, + "POST", + localVarQueryParams, + localVarCollectionQueryParams, + localVarPostBody, + localVarHeaderParams, + localVarCookieParams, + localVarFormParams, + localVarAuthNames, + _callback); + } + + @SuppressWarnings("rawtypes") + private okhttp3.Call searchSchedulesValidateBeforeCall( + SearchSchedulesRequest searchSchedulesRequest, final ApiCallback _callback) + throws ApiException { + // verify the required parameter 'searchSchedulesRequest' is set + if (searchSchedulesRequest == null) { + throw new ApiException( + "Missing the required parameter 'searchSchedulesRequest' when calling" + + " searchSchedules(Async)"); + } + + return searchSchedulesCall(searchSchedulesRequest, _callback); + } + + /** + * Search Schedules Version: 9.4.0.cl or later Gets a list of scheduled jobs configured for a + * Liveboard. To get details of a specific scheduled job, specify the name or GUID of the + * scheduled job. Requires at least view access to Liveboards. **NOTE**: When filtering + * schedules by parameters other than `metadata`, set `record_size` to + * `-1` and `record_offset` to `0` for accurate results. + * + * @param searchSchedulesRequest (required) + * @return List<ResponseSchedule> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the + * response body + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 Schedule search result. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public List searchSchedules(SearchSchedulesRequest searchSchedulesRequest) + throws ApiException { + ApiResponse> localVarResp = + searchSchedulesWithHttpInfo(searchSchedulesRequest); + return localVarResp.getData(); + } + + /** + * Search Schedules Version: 9.4.0.cl or later Gets a list of scheduled jobs configured for a + * Liveboard. To get details of a specific scheduled job, specify the name or GUID of the + * scheduled job. Requires at least view access to Liveboards. **NOTE**: When filtering + * schedules by parameters other than `metadata`, set `record_size` to + * `-1` and `record_offset` to `0` for accurate results. + * + * @param searchSchedulesRequest (required) + * @return ApiResponse<List<ResponseSchedule>> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the + * response body + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 Schedule search result. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public ApiResponse> searchSchedulesWithHttpInfo( + SearchSchedulesRequest searchSchedulesRequest) throws ApiException { + okhttp3.Call localVarCall = searchSchedulesValidateBeforeCall(searchSchedulesRequest, null); + Type localVarReturnType = new TypeToken>() {}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); + } + + /** + * (asynchronously) Search Schedules Version: 9.4.0.cl or later Gets a list of scheduled jobs + * configured for a Liveboard. To get details of a specific scheduled job, specify the name or + * GUID of the scheduled job. Requires at least view access to Liveboards. **NOTE**: When + * filtering schedules by parameters other than `metadata`, set + * `record_size` to `-1` and `record_offset` to `0` for + * accurate results. + * + * @param searchSchedulesRequest (required) + * @param _callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body + * object + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 Schedule search result. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public okhttp3.Call searchSchedulesAsync( + SearchSchedulesRequest searchSchedulesRequest, + final ApiCallback> _callback) + throws ApiException { + + okhttp3.Call localVarCall = + searchSchedulesValidateBeforeCall(searchSchedulesRequest, _callback); + Type localVarReturnType = new TypeToken>() {}.getType(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; + } + /** + * Build call for updateSchedule + * + * @param scheduleIdentifier Unique ID or name of the schedule. (required) + * @param updateScheduleRequest (required) + * @param _callback Callback for upload/download progress + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
204 Schedule successfully updated. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public okhttp3.Call updateScheduleCall( + String scheduleIdentifier, + UpdateScheduleRequest updateScheduleRequest, + final ApiCallback _callback) + throws ApiException { + String basePath = null; + // Operation Servers + String[] localBasePaths = new String[] {}; + + // Determine Base Path to Use + if (localCustomBaseUrl != null) { + basePath = localCustomBaseUrl; + } else if (localBasePaths.length > 0) { + basePath = localBasePaths[localHostIndex]; + } else { + basePath = null; + } + + Object localVarPostBody = updateScheduleRequest; + + // create path and map variables + String localVarPath = + "/api/rest/2.0/schedules/{schedule_identifier}/update" + .replace( + "{" + "schedule_identifier" + "}", + localVarApiClient.escapeString(scheduleIdentifier.toString())); + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + final String[] localVarAccepts = {"application/json"}; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = {"application/json"}; + final String localVarContentType = + localVarApiClient.selectHeaderContentType(localVarContentTypes); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } + + String[] localVarAuthNames = new String[] {"bearerAuth"}; + return localVarApiClient.buildCall( + basePath, + localVarPath, + "POST", + localVarQueryParams, + localVarCollectionQueryParams, + localVarPostBody, + localVarHeaderParams, + localVarCookieParams, + localVarFormParams, + localVarAuthNames, + _callback); + } + + @SuppressWarnings("rawtypes") + private okhttp3.Call updateScheduleValidateBeforeCall( + String scheduleIdentifier, + UpdateScheduleRequest updateScheduleRequest, + final ApiCallback _callback) + throws ApiException { + // verify the required parameter 'scheduleIdentifier' is set + if (scheduleIdentifier == null) { + throw new ApiException( + "Missing the required parameter 'scheduleIdentifier' when calling" + + " updateSchedule(Async)"); + } + + // verify the required parameter 'updateScheduleRequest' is set + if (updateScheduleRequest == null) { + throw new ApiException( + "Missing the required parameter 'updateScheduleRequest' when calling" + + " updateSchedule(Async)"); + } + + return updateScheduleCall(scheduleIdentifier, updateScheduleRequest, _callback); + } + + /** + * Update schedule. Version: 9.4.0.cl or later Updates a scheduled Liveboard job. Requires at + * least edit access to Liveboards. To update a schedule on behalf of another user, you need + * `ADMINISTRATION` (**Can administer Org**) or `JOBSCHEDULING` (**Can + * schedule for others**) privilege and edit access to the Liveboard. If [Role-Based Access + * Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, + * the `JOBSCHEDULING` (**Can schedule for others**) privilege is required. The API + * endpoint allows you to pause a scheduled job, change the status of a paused job. You can also + * edit the recipients list, frequency of the job, format of the file to send to the recipients + * in email notifications, PDF options, and time zone setting. + * + * @param scheduleIdentifier Unique ID or name of the schedule. (required) + * @param updateScheduleRequest (required) + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the + * response body + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
204 Schedule successfully updated. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public void updateSchedule( + String scheduleIdentifier, UpdateScheduleRequest updateScheduleRequest) + throws ApiException { + updateScheduleWithHttpInfo(scheduleIdentifier, updateScheduleRequest); + } + + /** + * Update schedule. Version: 9.4.0.cl or later Updates a scheduled Liveboard job. Requires at + * least edit access to Liveboards. To update a schedule on behalf of another user, you need + * `ADMINISTRATION` (**Can administer Org**) or `JOBSCHEDULING` (**Can + * schedule for others**) privilege and edit access to the Liveboard. If [Role-Based Access + * Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, + * the `JOBSCHEDULING` (**Can schedule for others**) privilege is required. The API + * endpoint allows you to pause a scheduled job, change the status of a paused job. You can also + * edit the recipients list, frequency of the job, format of the file to send to the recipients + * in email notifications, PDF options, and time zone setting. + * + * @param scheduleIdentifier Unique ID or name of the schedule. (required) + * @param updateScheduleRequest (required) + * @return ApiResponse<Void> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the + * response body + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
204 Schedule successfully updated. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public ApiResponse updateScheduleWithHttpInfo( + String scheduleIdentifier, UpdateScheduleRequest updateScheduleRequest) + throws ApiException { + okhttp3.Call localVarCall = + updateScheduleValidateBeforeCall(scheduleIdentifier, updateScheduleRequest, null); + return localVarApiClient.execute(localVarCall); + } + + /** + * (asynchronously) Update schedule. Version: 9.4.0.cl or later Updates a scheduled Liveboard + * job. Requires at least edit access to Liveboards. To update a schedule on behalf of another + * user, you need `ADMINISTRATION` (**Can administer Org**) or + * `JOBSCHEDULING` (**Can schedule for others**) privilege and edit access to the + * Liveboard. If [Role-Based Access Control + * (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the + * `JOBSCHEDULING` (**Can schedule for others**) privilege is required. The API + * endpoint allows you to pause a scheduled job, change the status of a paused job. You can also + * edit the recipients list, frequency of the job, format of the file to send to the recipients + * in email notifications, PDF options, and time zone setting. + * + * @param scheduleIdentifier Unique ID or name of the schedule. (required) + * @param updateScheduleRequest (required) + * @param _callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body + * object + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
204 Schedule successfully updated. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public okhttp3.Call updateScheduleAsync( + String scheduleIdentifier, + UpdateScheduleRequest updateScheduleRequest, + final ApiCallback _callback) + throws ApiException { + + okhttp3.Call localVarCall = + updateScheduleValidateBeforeCall( + scheduleIdentifier, updateScheduleRequest, _callback); + localVarApiClient.executeAsync(localVarCall, _callback); + return localVarCall; + } +} diff --git a/sdks/java/src/main/java/com/thoughtspot/client/api/SecurityApi.java b/sdks/java/src/main/java/com/thoughtspot/client/api/SecurityApi.java new file mode 100644 index 000000000..1158d52e4 --- /dev/null +++ b/sdks/java/src/main/java/com/thoughtspot/client/api/SecurityApi.java @@ -0,0 +1,2503 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client.api; + +import com.google.gson.reflect.TypeToken; +import com.thoughtspot.client.ApiCallback; +import com.thoughtspot.client.ApiClient; +import com.thoughtspot.client.ApiClientConfiguration; +import com.thoughtspot.client.ApiException; +import com.thoughtspot.client.ApiResponse; +import com.thoughtspot.client.Configuration; +import com.thoughtspot.client.Pair; +import com.thoughtspot.client.model.AssignChangeAuthorRequest; +import com.thoughtspot.client.model.ColumnSecurityRuleResponse; +import com.thoughtspot.client.model.FetchColumnSecurityRulesRequest; +import com.thoughtspot.client.model.FetchObjectPrivilegesRequest; +import com.thoughtspot.client.model.FetchPermissionsOfPrincipalsRequest; +import com.thoughtspot.client.model.FetchPermissionsOnMetadataRequest; +import com.thoughtspot.client.model.ManageObjectPrivilegeRequest; +import com.thoughtspot.client.model.ObjectPrivilegesOfMetadataResponse; +import com.thoughtspot.client.model.PermissionOfMetadataResponse; +import com.thoughtspot.client.model.PermissionOfPrincipalsResponse; +import com.thoughtspot.client.model.PublishMetadataRequest; +import com.thoughtspot.client.model.ShareMetadataRequest; +import com.thoughtspot.client.model.UnpublishMetadataRequest; +import com.thoughtspot.client.model.UpdateColumnSecurityRulesRequest; +import java.lang.reflect.Type; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +@javax.annotation.Generated( + value = "org.openapitools.codegen.languages.JavaClientCodegen", + comments = "Generator version: 7.12.0") +public class SecurityApi { + private ApiClient localVarApiClient; + private ApiClientConfiguration localVarApiClientConfiguration; + private int localHostIndex; + private String localCustomBaseUrl; + + public SecurityApi() { + this(Configuration.getDefaultApiClient()); + } + + public SecurityApi(ApiClient apiClient) { + this.localVarApiClient = apiClient; + } + + public SecurityApi(ApiClientConfiguration apiClientConfiguration) { + this.localVarApiClientConfiguration = apiClientConfiguration; + this.localVarApiClient = new ApiClient(apiClientConfiguration); + } + + public ApiClient getApiClient() { + return localVarApiClient; + } + + public void setApiClient(ApiClient apiClient) { + this.localVarApiClient = apiClient; + } + + public ApiClientConfiguration getApiClientConfiguration() { + return localVarApiClientConfiguration; + } + + public void applyApiClientConfiguration(ApiClientConfiguration apiClientConfiguration) { + this.localVarApiClientConfiguration = apiClientConfiguration; + if (localVarApiClient != null) { + localVarApiClient.applyApiClientConfiguration(apiClientConfiguration); + } else { + localVarApiClient = new ApiClient(apiClientConfiguration); + } + } + + public int getHostIndex() { + return localHostIndex; + } + + public void setHostIndex(int hostIndex) { + this.localHostIndex = hostIndex; + } + + public String getCustomBaseUrl() { + return localCustomBaseUrl; + } + + public void setCustomBaseUrl(String customBaseUrl) { + this.localCustomBaseUrl = customBaseUrl; + } + + /** + * Build call for assignChangeAuthor + * + * @param assignChangeAuthorRequest (required) + * @param _callback Callback for upload/download progress + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
204 Author assignment for given metadata objects is successful. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public okhttp3.Call assignChangeAuthorCall( + AssignChangeAuthorRequest assignChangeAuthorRequest, final ApiCallback _callback) + throws ApiException { + String basePath = null; + // Operation Servers + String[] localBasePaths = new String[] {}; + + // Determine Base Path to Use + if (localCustomBaseUrl != null) { + basePath = localCustomBaseUrl; + } else if (localBasePaths.length > 0) { + basePath = localBasePaths[localHostIndex]; + } else { + basePath = null; + } + + Object localVarPostBody = assignChangeAuthorRequest; + + // create path and map variables + String localVarPath = "/api/rest/2.0/security/metadata/assign"; + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + final String[] localVarAccepts = {"application/json"}; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = {"application/json"}; + final String localVarContentType = + localVarApiClient.selectHeaderContentType(localVarContentTypes); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } + + String[] localVarAuthNames = new String[] {"bearerAuth"}; + return localVarApiClient.buildCall( + basePath, + localVarPath, + "POST", + localVarQueryParams, + localVarCollectionQueryParams, + localVarPostBody, + localVarHeaderParams, + localVarCookieParams, + localVarFormParams, + localVarAuthNames, + _callback); + } + + @SuppressWarnings("rawtypes") + private okhttp3.Call assignChangeAuthorValidateBeforeCall( + AssignChangeAuthorRequest assignChangeAuthorRequest, final ApiCallback _callback) + throws ApiException { + // verify the required parameter 'assignChangeAuthorRequest' is set + if (assignChangeAuthorRequest == null) { + throw new ApiException( + "Missing the required parameter 'assignChangeAuthorRequest' when calling" + + " assignChangeAuthor(Async)"); + } + + return assignChangeAuthorCall(assignChangeAuthorRequest, _callback); + } + + /** + * Version: 9.0.0.cl or later Transfers the ownership of one or several objects from one user to + * another. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If + * [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled + * on your instance, the `USER_ADMINISTRATION` (**Can manage users**) privilege and + * edit access to the objects are required. + * + * @param assignChangeAuthorRequest (required) + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the + * response body + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
204 Author assignment for given metadata objects is successful. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public void assignChangeAuthor(AssignChangeAuthorRequest assignChangeAuthorRequest) + throws ApiException { + assignChangeAuthorWithHttpInfo(assignChangeAuthorRequest); + } + + /** + * Version: 9.0.0.cl or later Transfers the ownership of one or several objects from one user to + * another. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If + * [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled + * on your instance, the `USER_ADMINISTRATION` (**Can manage users**) privilege and + * edit access to the objects are required. + * + * @param assignChangeAuthorRequest (required) + * @return ApiResponse<Void> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the + * response body + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
204 Author assignment for given metadata objects is successful. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public ApiResponse assignChangeAuthorWithHttpInfo( + AssignChangeAuthorRequest assignChangeAuthorRequest) throws ApiException { + okhttp3.Call localVarCall = + assignChangeAuthorValidateBeforeCall(assignChangeAuthorRequest, null); + return localVarApiClient.execute(localVarCall); + } + + /** + * (asynchronously) Version: 9.0.0.cl or later Transfers the ownership of one or several objects + * from one user to another. Requires `ADMINISTRATION` (**Can administer + * ThoughtSpot**) privilege. If [Role-Based Access Control + * (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the + * `USER_ADMINISTRATION` (**Can manage users**) privilege and edit access to the + * objects are required. + * + * @param assignChangeAuthorRequest (required) + * @param _callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body + * object + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
204 Author assignment for given metadata objects is successful. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public okhttp3.Call assignChangeAuthorAsync( + AssignChangeAuthorRequest assignChangeAuthorRequest, final ApiCallback _callback) + throws ApiException { + + okhttp3.Call localVarCall = + assignChangeAuthorValidateBeforeCall(assignChangeAuthorRequest, _callback); + localVarApiClient.executeAsync(localVarCall, _callback); + return localVarCall; + } + /** + * Build call for fetchColumnSecurityRules + * + * @param fetchColumnSecurityRulesRequest (required) + * @param _callback Callback for upload/download progress + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 Successfully fetched column security rules -
400 Bad request - Table not found or invalid parameters -
401 Unauthorized access. -
403 Forbidden - User doesn't have permission to access security rules for this table -
500 Internal server error -
+ */ + public okhttp3.Call fetchColumnSecurityRulesCall( + FetchColumnSecurityRulesRequest fetchColumnSecurityRulesRequest, + final ApiCallback _callback) + throws ApiException { + String basePath = null; + // Operation Servers + String[] localBasePaths = new String[] {}; + + // Determine Base Path to Use + if (localCustomBaseUrl != null) { + basePath = localCustomBaseUrl; + } else if (localBasePaths.length > 0) { + basePath = localBasePaths[localHostIndex]; + } else { + basePath = null; + } + + Object localVarPostBody = fetchColumnSecurityRulesRequest; + + // create path and map variables + String localVarPath = "/api/rest/2.0/security/column/rules/fetch"; + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + final String[] localVarAccepts = {"application/json"}; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = {"application/json"}; + final String localVarContentType = + localVarApiClient.selectHeaderContentType(localVarContentTypes); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } + + String[] localVarAuthNames = new String[] {"bearerAuth"}; + return localVarApiClient.buildCall( + basePath, + localVarPath, + "POST", + localVarQueryParams, + localVarCollectionQueryParams, + localVarPostBody, + localVarHeaderParams, + localVarCookieParams, + localVarFormParams, + localVarAuthNames, + _callback); + } + + @SuppressWarnings("rawtypes") + private okhttp3.Call fetchColumnSecurityRulesValidateBeforeCall( + FetchColumnSecurityRulesRequest fetchColumnSecurityRulesRequest, + final ApiCallback _callback) + throws ApiException { + // verify the required parameter 'fetchColumnSecurityRulesRequest' is set + if (fetchColumnSecurityRulesRequest == null) { + throw new ApiException( + "Missing the required parameter 'fetchColumnSecurityRulesRequest' when calling" + + " fetchColumnSecurityRules(Async)"); + } + + return fetchColumnSecurityRulesCall(fetchColumnSecurityRulesRequest, _callback); + } + + /** + * Version: 10.12.0.cl or later Fetches column security rules for specified tables. This API + * endpoint retrieves column-level security rules configured for tables. It returns information + * about which columns are secured and which groups have access to those columns. #### Usage + * guidelines - Provide an array of table identifiers using either `identifier` (GUID + * or name) or `obj_identifier` (object ID) - At least one of `identifier` + * or `obj_identifier` must be provided for each table - The API returns column + * security rules for all specified tables - Users must have appropriate permissions to access + * security rules for the specified tables #### Required permissions - + * `ADMINISTRATION` - Can administer ThoughtSpot - `DATAMANAGEMENT` - Can + * manage data - `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` - Can manage worksheet views and + * tables #### Example request ```json { \"tables\": [ { + * \"identifier\": \"table-guid\", \"obj_identifier\": + * \"table-object-id\" } ] } ``` #### Response format The API returns + * an array of `ColumnSecurityRuleResponse` objects wrapped in a `data` + * field. Each `ColumnSecurityRuleResponse` object contains: - Table information (GUID + * and object ID) - Array of column security rules with column details, group access, and source + * table information #### Example response ```json { \"data\": [ { + * \"guid\": \"table-guid\", \"objId\": + * \"table-object-id\", \"columnSecurityRules\": [ { \"column\": { + * \"id\": \"col_123\", \"name\": \"Salary\" }, + * \"groups\": [ { \"id\": \"group_1\", \"name\": + * \"HR Department\" } ], \"sourceTableDetails\": { \"id\": + * \"source-table-guid\", \"name\": \"Employee_Data\" } } ] } ] } + * ``` + * + * @param fetchColumnSecurityRulesRequest (required) + * @return List<ColumnSecurityRuleResponse> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the + * response body + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 Successfully fetched column security rules -
400 Bad request - Table not found or invalid parameters -
401 Unauthorized access. -
403 Forbidden - User doesn't have permission to access security rules for this table -
500 Internal server error -
+ */ + public List fetchColumnSecurityRules( + FetchColumnSecurityRulesRequest fetchColumnSecurityRulesRequest) throws ApiException { + ApiResponse> localVarResp = + fetchColumnSecurityRulesWithHttpInfo(fetchColumnSecurityRulesRequest); + return localVarResp.getData(); + } + + /** + * Version: 10.12.0.cl or later Fetches column security rules for specified tables. This API + * endpoint retrieves column-level security rules configured for tables. It returns information + * about which columns are secured and which groups have access to those columns. #### Usage + * guidelines - Provide an array of table identifiers using either `identifier` (GUID + * or name) or `obj_identifier` (object ID) - At least one of `identifier` + * or `obj_identifier` must be provided for each table - The API returns column + * security rules for all specified tables - Users must have appropriate permissions to access + * security rules for the specified tables #### Required permissions - + * `ADMINISTRATION` - Can administer ThoughtSpot - `DATAMANAGEMENT` - Can + * manage data - `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` - Can manage worksheet views and + * tables #### Example request ```json { \"tables\": [ { + * \"identifier\": \"table-guid\", \"obj_identifier\": + * \"table-object-id\" } ] } ``` #### Response format The API returns + * an array of `ColumnSecurityRuleResponse` objects wrapped in a `data` + * field. Each `ColumnSecurityRuleResponse` object contains: - Table information (GUID + * and object ID) - Array of column security rules with column details, group access, and source + * table information #### Example response ```json { \"data\": [ { + * \"guid\": \"table-guid\", \"objId\": + * \"table-object-id\", \"columnSecurityRules\": [ { \"column\": { + * \"id\": \"col_123\", \"name\": \"Salary\" }, + * \"groups\": [ { \"id\": \"group_1\", \"name\": + * \"HR Department\" } ], \"sourceTableDetails\": { \"id\": + * \"source-table-guid\", \"name\": \"Employee_Data\" } } ] } ] } + * ``` + * + * @param fetchColumnSecurityRulesRequest (required) + * @return ApiResponse<List<ColumnSecurityRuleResponse>> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the + * response body + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 Successfully fetched column security rules -
400 Bad request - Table not found or invalid parameters -
401 Unauthorized access. -
403 Forbidden - User doesn't have permission to access security rules for this table -
500 Internal server error -
+ */ + public ApiResponse> fetchColumnSecurityRulesWithHttpInfo( + FetchColumnSecurityRulesRequest fetchColumnSecurityRulesRequest) throws ApiException { + okhttp3.Call localVarCall = + fetchColumnSecurityRulesValidateBeforeCall(fetchColumnSecurityRulesRequest, null); + Type localVarReturnType = new TypeToken>() {}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); + } + + /** + * (asynchronously) Version: 10.12.0.cl or later Fetches column security rules for specified + * tables. This API endpoint retrieves column-level security rules configured for tables. It + * returns information about which columns are secured and which groups have access to those + * columns. #### Usage guidelines - Provide an array of table identifiers using either + * `identifier` (GUID or name) or `obj_identifier` (object ID) - At least + * one of `identifier` or `obj_identifier` must be provided for each table - + * The API returns column security rules for all specified tables - Users must have appropriate + * permissions to access security rules for the specified tables #### Required permissions - + * `ADMINISTRATION` - Can administer ThoughtSpot - `DATAMANAGEMENT` - Can + * manage data - `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` - Can manage worksheet views and + * tables #### Example request ```json { \"tables\": [ { + * \"identifier\": \"table-guid\", \"obj_identifier\": + * \"table-object-id\" } ] } ``` #### Response format The API returns + * an array of `ColumnSecurityRuleResponse` objects wrapped in a `data` + * field. Each `ColumnSecurityRuleResponse` object contains: - Table information (GUID + * and object ID) - Array of column security rules with column details, group access, and source + * table information #### Example response ```json { \"data\": [ { + * \"guid\": \"table-guid\", \"objId\": + * \"table-object-id\", \"columnSecurityRules\": [ { \"column\": { + * \"id\": \"col_123\", \"name\": \"Salary\" }, + * \"groups\": [ { \"id\": \"group_1\", \"name\": + * \"HR Department\" } ], \"sourceTableDetails\": { \"id\": + * \"source-table-guid\", \"name\": \"Employee_Data\" } } ] } ] } + * ``` + * + * @param fetchColumnSecurityRulesRequest (required) + * @param _callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body + * object + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 Successfully fetched column security rules -
400 Bad request - Table not found or invalid parameters -
401 Unauthorized access. -
403 Forbidden - User doesn't have permission to access security rules for this table -
500 Internal server error -
+ */ + public okhttp3.Call fetchColumnSecurityRulesAsync( + FetchColumnSecurityRulesRequest fetchColumnSecurityRulesRequest, + final ApiCallback> _callback) + throws ApiException { + + okhttp3.Call localVarCall = + fetchColumnSecurityRulesValidateBeforeCall( + fetchColumnSecurityRulesRequest, _callback); + Type localVarReturnType = new TypeToken>() {}.getType(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; + } + /** + * Build call for fetchObjectPrivileges + * + * @param fetchObjectPrivilegesRequest (required) + * @param _callback Callback for upload/download progress + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 Fetching defined object privileges of metadata objects is successful. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public okhttp3.Call fetchObjectPrivilegesCall( + FetchObjectPrivilegesRequest fetchObjectPrivilegesRequest, final ApiCallback _callback) + throws ApiException { + String basePath = null; + // Operation Servers + String[] localBasePaths = new String[] {}; + + // Determine Base Path to Use + if (localCustomBaseUrl != null) { + basePath = localCustomBaseUrl; + } else if (localBasePaths.length > 0) { + basePath = localBasePaths[localHostIndex]; + } else { + basePath = null; + } + + Object localVarPostBody = fetchObjectPrivilegesRequest; + + // create path and map variables + String localVarPath = "/api/rest/2.0/security/metadata/fetch-object-privileges"; + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + final String[] localVarAccepts = {"application/json"}; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = {"application/json"}; + final String localVarContentType = + localVarApiClient.selectHeaderContentType(localVarContentTypes); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } + + String[] localVarAuthNames = new String[] {"bearerAuth"}; + return localVarApiClient.buildCall( + basePath, + localVarPath, + "POST", + localVarQueryParams, + localVarCollectionQueryParams, + localVarPostBody, + localVarHeaderParams, + localVarCookieParams, + localVarFormParams, + localVarAuthNames, + _callback); + } + + @SuppressWarnings("rawtypes") + private okhttp3.Call fetchObjectPrivilegesValidateBeforeCall( + FetchObjectPrivilegesRequest fetchObjectPrivilegesRequest, final ApiCallback _callback) + throws ApiException { + // verify the required parameter 'fetchObjectPrivilegesRequest' is set + if (fetchObjectPrivilegesRequest == null) { + throw new ApiException( + "Missing the required parameter 'fetchObjectPrivilegesRequest' when calling" + + " fetchObjectPrivileges(Async)"); + } + + return fetchObjectPrivilegesCall(fetchObjectPrivilegesRequest, _callback); + } + + /** + * Version: 26.3.0.cl or later This API fetches the object privileges present for the given list + * of principals (user or group), on the given set of objects. It supports pagination, which can + * be enabled and configured using the request parameters. It provides users access to certain + * features based on privilege based access control. #### Usage guidelines - Specify the + * `type` (`USER` or `USER_GROUP`) and `identifier` + * (either GUID or name) of the principals for which you want to retrieve object privilege + * information in the `principals` array. - Specify the `type` + * (`LOGICAL_TABLE`) and `identifier` (either GUID or name) of the metadata + * objects for which you want to retrieve object privilege information in the + * `metadata` array. Only `LOGICAL_TABLE` metadata type is supported for + * now. It may be extended for other metadata types in future. - To control the offset from + * where principals have to be fetched, use `record_offset`. When + * `record_offset` is 0, information is fetched from the beginning. - To control the + * number of principals to be fetched, use `record_size`. Default + * `record_size` is 20. - Ensure `record_offset` for a subsequent request is + * one more than the value of `record_size` of the previous request. - Ensure using + * correct Authorization Bearer Token corresponding to specific user & org. #### Example + * request ```json { \"principals\": [ { \"type\": + * \"type-1\", \"identifier\": \"principal-guid-or-name-1\" }, { + * \"type\": \"type-2\", \"identifier\": + * \"principal-guid-or-name-2\" } ], \"metadata\": [ { \"type\": + * \"metadata-type-1\", \"identifier\": + * \"metadata-guid-or-name-1\" }, { \"type\": \"metadata-type-2\", + * \"identifier\": \"metadata-guid-or-name-2\" } ], + * \"record_offset\": 0, \"record_size\": 20 } ``` #### + * Response format The API returns an array of `metadata_object_privileges` objects + * wrapped in JSON. Each `metadata_object_privileges` object contains: - Metadata + * information (GUID, name and type) - Array of `principal_object_privilege_info`. - + * Each `principal_object_privilege_info` contains: - Principal type. All principals + * of this type are listed as described below. - Array of + * `principal_object_privileges`. - Each `principal_object_privileges` + * contains: - Principal information (GUID, name, subtype) - List of applied object level + * privileges. #### Example response ```json { + * \"metadata_object_privileges\": [ { \"metadata_id\": + * \"metadata-guid-1\", \"metadata_name\": \"metadata-name-1\", + * \"metadata_type\": \"metadata-type-1\", + * \"principal_object_privilege_info\": [ { \"principal_type\": + * \"principal-type-1\", \"principal_object_privileges\": [ { + * \"principal_id\": \"principal-guid-1\", \"principal_name\": + * \"principal-name-1\", \"principal_sub_type\": + * \"principal-sub-type-1\", \"object_privileges\": + * \"[object-privilege-1, object-privilege-2]\" }, { \"principal_id\": + * \"principal-guid-2\", \"principal_name\": \"principal-name-2\", + * \"principal_sub_type\": \"principal-sub-type-2\", + * \"object_privileges\": \"[object-privilege-1, object-privilege-2]\" } ] + * }, { \"principal_type\": \"principal-type-2\", + * \"principal_object_privileges\": [ { \"principal_id\": + * \"principal-guid-3\", \"principal_name\": \"principal-guid-4\", + * \"principal_sub_type\": \"principal-sub-type-4\", + * \"object_privileges\": \"[object-privilege-1]\" } ] } ] }, { + * \"metadata_id\": \"metadata-guid-2\", \"metadata_name\": + * \"metadata-name-2\", \"metadata_type\": \"metadata-type-2\", + * \"principal_object_privilege_info\": [ { \"principal_type\": + * \"principal-type-1\", \"principal_object_privileges\": [ { + * \"principal_id\": \"principal-guid-1\", \"principal_name\": + * \"principal-name-1\", \"principal_sub_type\": + * \"principal-sub-type-1\", \"object_privileges\": + * \"[object-privilege-3, object-privilege-4]\" }, { \"principal_id\": + * \"principal-guid-2\", \"principal_name\": \"principal-name-2\", + * \"principal_sub_type\": \"principal-sub-type-2\", + * \"object_privileges\": \"[object-privilege-4]\" } ] } ] } ] } + * ``` + * + * @param fetchObjectPrivilegesRequest (required) + * @return ObjectPrivilegesOfMetadataResponse + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the + * response body + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 Fetching defined object privileges of metadata objects is successful. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public ObjectPrivilegesOfMetadataResponse fetchObjectPrivileges( + FetchObjectPrivilegesRequest fetchObjectPrivilegesRequest) throws ApiException { + ApiResponse localVarResp = + fetchObjectPrivilegesWithHttpInfo(fetchObjectPrivilegesRequest); + return localVarResp.getData(); + } + + /** + * Version: 26.3.0.cl or later This API fetches the object privileges present for the given list + * of principals (user or group), on the given set of objects. It supports pagination, which can + * be enabled and configured using the request parameters. It provides users access to certain + * features based on privilege based access control. #### Usage guidelines - Specify the + * `type` (`USER` or `USER_GROUP`) and `identifier` + * (either GUID or name) of the principals for which you want to retrieve object privilege + * information in the `principals` array. - Specify the `type` + * (`LOGICAL_TABLE`) and `identifier` (either GUID or name) of the metadata + * objects for which you want to retrieve object privilege information in the + * `metadata` array. Only `LOGICAL_TABLE` metadata type is supported for + * now. It may be extended for other metadata types in future. - To control the offset from + * where principals have to be fetched, use `record_offset`. When + * `record_offset` is 0, information is fetched from the beginning. - To control the + * number of principals to be fetched, use `record_size`. Default + * `record_size` is 20. - Ensure `record_offset` for a subsequent request is + * one more than the value of `record_size` of the previous request. - Ensure using + * correct Authorization Bearer Token corresponding to specific user & org. #### Example + * request ```json { \"principals\": [ { \"type\": + * \"type-1\", \"identifier\": \"principal-guid-or-name-1\" }, { + * \"type\": \"type-2\", \"identifier\": + * \"principal-guid-or-name-2\" } ], \"metadata\": [ { \"type\": + * \"metadata-type-1\", \"identifier\": + * \"metadata-guid-or-name-1\" }, { \"type\": \"metadata-type-2\", + * \"identifier\": \"metadata-guid-or-name-2\" } ], + * \"record_offset\": 0, \"record_size\": 20 } ``` #### + * Response format The API returns an array of `metadata_object_privileges` objects + * wrapped in JSON. Each `metadata_object_privileges` object contains: - Metadata + * information (GUID, name and type) - Array of `principal_object_privilege_info`. - + * Each `principal_object_privilege_info` contains: - Principal type. All principals + * of this type are listed as described below. - Array of + * `principal_object_privileges`. - Each `principal_object_privileges` + * contains: - Principal information (GUID, name, subtype) - List of applied object level + * privileges. #### Example response ```json { + * \"metadata_object_privileges\": [ { \"metadata_id\": + * \"metadata-guid-1\", \"metadata_name\": \"metadata-name-1\", + * \"metadata_type\": \"metadata-type-1\", + * \"principal_object_privilege_info\": [ { \"principal_type\": + * \"principal-type-1\", \"principal_object_privileges\": [ { + * \"principal_id\": \"principal-guid-1\", \"principal_name\": + * \"principal-name-1\", \"principal_sub_type\": + * \"principal-sub-type-1\", \"object_privileges\": + * \"[object-privilege-1, object-privilege-2]\" }, { \"principal_id\": + * \"principal-guid-2\", \"principal_name\": \"principal-name-2\", + * \"principal_sub_type\": \"principal-sub-type-2\", + * \"object_privileges\": \"[object-privilege-1, object-privilege-2]\" } ] + * }, { \"principal_type\": \"principal-type-2\", + * \"principal_object_privileges\": [ { \"principal_id\": + * \"principal-guid-3\", \"principal_name\": \"principal-guid-4\", + * \"principal_sub_type\": \"principal-sub-type-4\", + * \"object_privileges\": \"[object-privilege-1]\" } ] } ] }, { + * \"metadata_id\": \"metadata-guid-2\", \"metadata_name\": + * \"metadata-name-2\", \"metadata_type\": \"metadata-type-2\", + * \"principal_object_privilege_info\": [ { \"principal_type\": + * \"principal-type-1\", \"principal_object_privileges\": [ { + * \"principal_id\": \"principal-guid-1\", \"principal_name\": + * \"principal-name-1\", \"principal_sub_type\": + * \"principal-sub-type-1\", \"object_privileges\": + * \"[object-privilege-3, object-privilege-4]\" }, { \"principal_id\": + * \"principal-guid-2\", \"principal_name\": \"principal-name-2\", + * \"principal_sub_type\": \"principal-sub-type-2\", + * \"object_privileges\": \"[object-privilege-4]\" } ] } ] } ] } + * ``` + * + * @param fetchObjectPrivilegesRequest (required) + * @return ApiResponse<ObjectPrivilegesOfMetadataResponse> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the + * response body + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 Fetching defined object privileges of metadata objects is successful. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public ApiResponse fetchObjectPrivilegesWithHttpInfo( + FetchObjectPrivilegesRequest fetchObjectPrivilegesRequest) throws ApiException { + okhttp3.Call localVarCall = + fetchObjectPrivilegesValidateBeforeCall(fetchObjectPrivilegesRequest, null); + Type localVarReturnType = new TypeToken() {}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); + } + + /** + * (asynchronously) Version: 26.3.0.cl or later This API fetches the object privileges present + * for the given list of principals (user or group), on the given set of objects. It supports + * pagination, which can be enabled and configured using the request parameters. It provides + * users access to certain features based on privilege based access control. #### Usage + * guidelines - Specify the `type` (`USER` or `USER_GROUP`) and + * `identifier` (either GUID or name) of the principals for which you want to retrieve + * object privilege information in the `principals` array. - Specify the + * `type` (`LOGICAL_TABLE`) and `identifier` (either GUID or name) + * of the metadata objects for which you want to retrieve object privilege information in the + * `metadata` array. Only `LOGICAL_TABLE` metadata type is supported for + * now. It may be extended for other metadata types in future. - To control the offset from + * where principals have to be fetched, use `record_offset`. When + * `record_offset` is 0, information is fetched from the beginning. - To control the + * number of principals to be fetched, use `record_size`. Default + * `record_size` is 20. - Ensure `record_offset` for a subsequent request is + * one more than the value of `record_size` of the previous request. - Ensure using + * correct Authorization Bearer Token corresponding to specific user & org. #### Example + * request ```json { \"principals\": [ { \"type\": + * \"type-1\", \"identifier\": \"principal-guid-or-name-1\" }, { + * \"type\": \"type-2\", \"identifier\": + * \"principal-guid-or-name-2\" } ], \"metadata\": [ { \"type\": + * \"metadata-type-1\", \"identifier\": + * \"metadata-guid-or-name-1\" }, { \"type\": \"metadata-type-2\", + * \"identifier\": \"metadata-guid-or-name-2\" } ], + * \"record_offset\": 0, \"record_size\": 20 } ``` #### + * Response format The API returns an array of `metadata_object_privileges` objects + * wrapped in JSON. Each `metadata_object_privileges` object contains: - Metadata + * information (GUID, name and type) - Array of `principal_object_privilege_info`. - + * Each `principal_object_privilege_info` contains: - Principal type. All principals + * of this type are listed as described below. - Array of + * `principal_object_privileges`. - Each `principal_object_privileges` + * contains: - Principal information (GUID, name, subtype) - List of applied object level + * privileges. #### Example response ```json { + * \"metadata_object_privileges\": [ { \"metadata_id\": + * \"metadata-guid-1\", \"metadata_name\": \"metadata-name-1\", + * \"metadata_type\": \"metadata-type-1\", + * \"principal_object_privilege_info\": [ { \"principal_type\": + * \"principal-type-1\", \"principal_object_privileges\": [ { + * \"principal_id\": \"principal-guid-1\", \"principal_name\": + * \"principal-name-1\", \"principal_sub_type\": + * \"principal-sub-type-1\", \"object_privileges\": + * \"[object-privilege-1, object-privilege-2]\" }, { \"principal_id\": + * \"principal-guid-2\", \"principal_name\": \"principal-name-2\", + * \"principal_sub_type\": \"principal-sub-type-2\", + * \"object_privileges\": \"[object-privilege-1, object-privilege-2]\" } ] + * }, { \"principal_type\": \"principal-type-2\", + * \"principal_object_privileges\": [ { \"principal_id\": + * \"principal-guid-3\", \"principal_name\": \"principal-guid-4\", + * \"principal_sub_type\": \"principal-sub-type-4\", + * \"object_privileges\": \"[object-privilege-1]\" } ] } ] }, { + * \"metadata_id\": \"metadata-guid-2\", \"metadata_name\": + * \"metadata-name-2\", \"metadata_type\": \"metadata-type-2\", + * \"principal_object_privilege_info\": [ { \"principal_type\": + * \"principal-type-1\", \"principal_object_privileges\": [ { + * \"principal_id\": \"principal-guid-1\", \"principal_name\": + * \"principal-name-1\", \"principal_sub_type\": + * \"principal-sub-type-1\", \"object_privileges\": + * \"[object-privilege-3, object-privilege-4]\" }, { \"principal_id\": + * \"principal-guid-2\", \"principal_name\": \"principal-name-2\", + * \"principal_sub_type\": \"principal-sub-type-2\", + * \"object_privileges\": \"[object-privilege-4]\" } ] } ] } ] } + * ``` + * + * @param fetchObjectPrivilegesRequest (required) + * @param _callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body + * object + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 Fetching defined object privileges of metadata objects is successful. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public okhttp3.Call fetchObjectPrivilegesAsync( + FetchObjectPrivilegesRequest fetchObjectPrivilegesRequest, + final ApiCallback _callback) + throws ApiException { + + okhttp3.Call localVarCall = + fetchObjectPrivilegesValidateBeforeCall(fetchObjectPrivilegesRequest, _callback); + Type localVarReturnType = new TypeToken() {}.getType(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; + } + /** + * Build call for fetchPermissionsOfPrincipals + * + * @param fetchPermissionsOfPrincipalsRequest (required) + * @param _callback Callback for upload/download progress + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 Fetching permissions of principals is successful. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public okhttp3.Call fetchPermissionsOfPrincipalsCall( + FetchPermissionsOfPrincipalsRequest fetchPermissionsOfPrincipalsRequest, + final ApiCallback _callback) + throws ApiException { + String basePath = null; + // Operation Servers + String[] localBasePaths = new String[] {}; + + // Determine Base Path to Use + if (localCustomBaseUrl != null) { + basePath = localCustomBaseUrl; + } else if (localBasePaths.length > 0) { + basePath = localBasePaths[localHostIndex]; + } else { + basePath = null; + } + + Object localVarPostBody = fetchPermissionsOfPrincipalsRequest; + + // create path and map variables + String localVarPath = "/api/rest/2.0/security/principals/fetch-permissions"; + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + final String[] localVarAccepts = {"application/json"}; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = {"application/json"}; + final String localVarContentType = + localVarApiClient.selectHeaderContentType(localVarContentTypes); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } + + String[] localVarAuthNames = new String[] {"bearerAuth"}; + return localVarApiClient.buildCall( + basePath, + localVarPath, + "POST", + localVarQueryParams, + localVarCollectionQueryParams, + localVarPostBody, + localVarHeaderParams, + localVarCookieParams, + localVarFormParams, + localVarAuthNames, + _callback); + } + + @SuppressWarnings("rawtypes") + private okhttp3.Call fetchPermissionsOfPrincipalsValidateBeforeCall( + FetchPermissionsOfPrincipalsRequest fetchPermissionsOfPrincipalsRequest, + final ApiCallback _callback) + throws ApiException { + // verify the required parameter 'fetchPermissionsOfPrincipalsRequest' is set + if (fetchPermissionsOfPrincipalsRequest == null) { + throw new ApiException( + "Missing the required parameter 'fetchPermissionsOfPrincipalsRequest' when" + + " calling fetchPermissionsOfPrincipals(Async)"); + } + + return fetchPermissionsOfPrincipalsCall(fetchPermissionsOfPrincipalsRequest, _callback); + } + + /** + * Version: 9.0.0.cl or later Fetches object permission details for a given principal object + * such as a user and group. Requires view access to the metadata object. #### Usage guidelines + * * To get a list of all metadata objects that a user or group can access, specify the + * `type` and GUID or name of the principal. * To get permission details for a + * specific object, add the `type` and GUID or name of the metadata object to your API + * request. Upon successful execution, the API returns a list of metadata objects and permission + * details for each object. + * + * @param fetchPermissionsOfPrincipalsRequest (required) + * @return PermissionOfPrincipalsResponse + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the + * response body + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 Fetching permissions of principals is successful. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public PermissionOfPrincipalsResponse fetchPermissionsOfPrincipals( + FetchPermissionsOfPrincipalsRequest fetchPermissionsOfPrincipalsRequest) + throws ApiException { + ApiResponse localVarResp = + fetchPermissionsOfPrincipalsWithHttpInfo(fetchPermissionsOfPrincipalsRequest); + return localVarResp.getData(); + } + + /** + * Version: 9.0.0.cl or later Fetches object permission details for a given principal object + * such as a user and group. Requires view access to the metadata object. #### Usage guidelines + * * To get a list of all metadata objects that a user or group can access, specify the + * `type` and GUID or name of the principal. * To get permission details for a + * specific object, add the `type` and GUID or name of the metadata object to your API + * request. Upon successful execution, the API returns a list of metadata objects and permission + * details for each object. + * + * @param fetchPermissionsOfPrincipalsRequest (required) + * @return ApiResponse<PermissionOfPrincipalsResponse> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the + * response body + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 Fetching permissions of principals is successful. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public ApiResponse fetchPermissionsOfPrincipalsWithHttpInfo( + FetchPermissionsOfPrincipalsRequest fetchPermissionsOfPrincipalsRequest) + throws ApiException { + okhttp3.Call localVarCall = + fetchPermissionsOfPrincipalsValidateBeforeCall( + fetchPermissionsOfPrincipalsRequest, null); + Type localVarReturnType = new TypeToken() {}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); + } + + /** + * (asynchronously) Version: 9.0.0.cl or later Fetches object permission details for a given + * principal object such as a user and group. Requires view access to the metadata object. #### + * Usage guidelines * To get a list of all metadata objects that a user or group can access, + * specify the `type` and GUID or name of the principal. * To get permission details + * for a specific object, add the `type` and GUID or name of the metadata object to + * your API request. Upon successful execution, the API returns a list of metadata objects and + * permission details for each object. + * + * @param fetchPermissionsOfPrincipalsRequest (required) + * @param _callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body + * object + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 Fetching permissions of principals is successful. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public okhttp3.Call fetchPermissionsOfPrincipalsAsync( + FetchPermissionsOfPrincipalsRequest fetchPermissionsOfPrincipalsRequest, + final ApiCallback _callback) + throws ApiException { + + okhttp3.Call localVarCall = + fetchPermissionsOfPrincipalsValidateBeforeCall( + fetchPermissionsOfPrincipalsRequest, _callback); + Type localVarReturnType = new TypeToken() {}.getType(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; + } + /** + * Build call for fetchPermissionsOnMetadata + * + * @param fetchPermissionsOnMetadataRequest (required) + * @param _callback Callback for upload/download progress + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 Fetching permissions of metadata objects is successful. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public okhttp3.Call fetchPermissionsOnMetadataCall( + FetchPermissionsOnMetadataRequest fetchPermissionsOnMetadataRequest, + final ApiCallback _callback) + throws ApiException { + String basePath = null; + // Operation Servers + String[] localBasePaths = new String[] {}; + + // Determine Base Path to Use + if (localCustomBaseUrl != null) { + basePath = localCustomBaseUrl; + } else if (localBasePaths.length > 0) { + basePath = localBasePaths[localHostIndex]; + } else { + basePath = null; + } + + Object localVarPostBody = fetchPermissionsOnMetadataRequest; + + // create path and map variables + String localVarPath = "/api/rest/2.0/security/metadata/fetch-permissions"; + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + final String[] localVarAccepts = {"application/json"}; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = {"application/json"}; + final String localVarContentType = + localVarApiClient.selectHeaderContentType(localVarContentTypes); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } + + String[] localVarAuthNames = new String[] {"bearerAuth"}; + return localVarApiClient.buildCall( + basePath, + localVarPath, + "POST", + localVarQueryParams, + localVarCollectionQueryParams, + localVarPostBody, + localVarHeaderParams, + localVarCookieParams, + localVarFormParams, + localVarAuthNames, + _callback); + } + + @SuppressWarnings("rawtypes") + private okhttp3.Call fetchPermissionsOnMetadataValidateBeforeCall( + FetchPermissionsOnMetadataRequest fetchPermissionsOnMetadataRequest, + final ApiCallback _callback) + throws ApiException { + // verify the required parameter 'fetchPermissionsOnMetadataRequest' is set + if (fetchPermissionsOnMetadataRequest == null) { + throw new ApiException( + "Missing the required parameter 'fetchPermissionsOnMetadataRequest' when" + + " calling fetchPermissionsOnMetadata(Async)"); + } + + return fetchPermissionsOnMetadataCall(fetchPermissionsOnMetadataRequest, _callback); + } + + /** + * Version: 9.0.0.cl or later Fetches permission details for a given metadata object. Requires + * view access to the metadata object. #### Usage guidelines * To fetch a list of users and + * groups for a metadata object, specify `type` and GUID or name of the metadata + * object. * To get permission details for a specific user or group, add `type` and + * GUID or name of the principal object to your API request. Upon successful execution, the API + * returns permission details and principal information for the object specified in the API + * request. + * + * @param fetchPermissionsOnMetadataRequest (required) + * @return PermissionOfMetadataResponse + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the + * response body + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 Fetching permissions of metadata objects is successful. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public PermissionOfMetadataResponse fetchPermissionsOnMetadata( + FetchPermissionsOnMetadataRequest fetchPermissionsOnMetadataRequest) + throws ApiException { + ApiResponse localVarResp = + fetchPermissionsOnMetadataWithHttpInfo(fetchPermissionsOnMetadataRequest); + return localVarResp.getData(); + } + + /** + * Version: 9.0.0.cl or later Fetches permission details for a given metadata object. Requires + * view access to the metadata object. #### Usage guidelines * To fetch a list of users and + * groups for a metadata object, specify `type` and GUID or name of the metadata + * object. * To get permission details for a specific user or group, add `type` and + * GUID or name of the principal object to your API request. Upon successful execution, the API + * returns permission details and principal information for the object specified in the API + * request. + * + * @param fetchPermissionsOnMetadataRequest (required) + * @return ApiResponse<PermissionOfMetadataResponse> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the + * response body + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 Fetching permissions of metadata objects is successful. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public ApiResponse fetchPermissionsOnMetadataWithHttpInfo( + FetchPermissionsOnMetadataRequest fetchPermissionsOnMetadataRequest) + throws ApiException { + okhttp3.Call localVarCall = + fetchPermissionsOnMetadataValidateBeforeCall( + fetchPermissionsOnMetadataRequest, null); + Type localVarReturnType = new TypeToken() {}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); + } + + /** + * (asynchronously) Version: 9.0.0.cl or later Fetches permission details for a given metadata + * object. Requires view access to the metadata object. #### Usage guidelines * To fetch a list + * of users and groups for a metadata object, specify `type` and GUID or name of the + * metadata object. * To get permission details for a specific user or group, add + * `type` and GUID or name of the principal object to your API request. Upon + * successful execution, the API returns permission details and principal information for the + * object specified in the API request. + * + * @param fetchPermissionsOnMetadataRequest (required) + * @param _callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body + * object + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 Fetching permissions of metadata objects is successful. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public okhttp3.Call fetchPermissionsOnMetadataAsync( + FetchPermissionsOnMetadataRequest fetchPermissionsOnMetadataRequest, + final ApiCallback _callback) + throws ApiException { + + okhttp3.Call localVarCall = + fetchPermissionsOnMetadataValidateBeforeCall( + fetchPermissionsOnMetadataRequest, _callback); + Type localVarReturnType = new TypeToken() {}.getType(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; + } + /** + * Build call for manageObjectPrivilege + * + * @param manageObjectPrivilegeRequest (required) + * @param _callback Callback for upload/download progress + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
204 Object privileges added/removed successfully -
400 Invalid request -
401 Unauthorized access -
403 Forbidden access -
500 Unexpected error -
+ */ + public okhttp3.Call manageObjectPrivilegeCall( + ManageObjectPrivilegeRequest manageObjectPrivilegeRequest, final ApiCallback _callback) + throws ApiException { + String basePath = null; + // Operation Servers + String[] localBasePaths = new String[] {}; + + // Determine Base Path to Use + if (localCustomBaseUrl != null) { + basePath = localCustomBaseUrl; + } else if (localBasePaths.length > 0) { + basePath = localBasePaths[localHostIndex]; + } else { + basePath = null; + } + + Object localVarPostBody = manageObjectPrivilegeRequest; + + // create path and map variables + String localVarPath = "/api/rest/2.0/security/metadata/manage-object-privilege"; + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + final String[] localVarAccepts = {"application/json"}; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = {"application/json"}; + final String localVarContentType = + localVarApiClient.selectHeaderContentType(localVarContentTypes); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } + + String[] localVarAuthNames = new String[] {"bearerAuth"}; + return localVarApiClient.buildCall( + basePath, + localVarPath, + "POST", + localVarQueryParams, + localVarCollectionQueryParams, + localVarPostBody, + localVarHeaderParams, + localVarCookieParams, + localVarFormParams, + localVarAuthNames, + _callback); + } + + @SuppressWarnings("rawtypes") + private okhttp3.Call manageObjectPrivilegeValidateBeforeCall( + ManageObjectPrivilegeRequest manageObjectPrivilegeRequest, final ApiCallback _callback) + throws ApiException { + // verify the required parameter 'manageObjectPrivilegeRequest' is set + if (manageObjectPrivilegeRequest == null) { + throw new ApiException( + "Missing the required parameter 'manageObjectPrivilegeRequest' when calling" + + " manageObjectPrivilege(Async)"); + } + + return manageObjectPrivilegeCall(manageObjectPrivilegeRequest, _callback); + } + + /** + * Version: 26.3.0.cl or later This API allows the addition or deletion of object level + * privileges for a set of users and groups, on a set of metadata objects. It provides users to + * access certain features based on privilege based access control. #### Usage guidelines - + * Specify the `operation`. The supported operations are: `ADD`, + * `REMOVE`. - Specify the type of the objects on which the object privileges are + * being provided in `metadata_type`. Only `LOGICAL_TABLE` metadata type is + * supported for now. It may be extended for other metadata types in future. - Specify the list + * of object privilege types in the `object_privilege_types` array. The supported + * object privilege types are: `SPOTTER_COACHING_PRIVILEGE`. - Specify the identifiers + * (either GUID or name) for the metadata objects in the `metadata_identifiers` array. + * - Specify the `type` (`USER` or `USER_GROUP`) and + * `identifier` (either GUID or name) of the principals to which you want to apply the + * given operation and given object privileges in the `principals` array. - Ensure + * using correct Authorization Bearer Token corresponding to specific user & org. #### + * Example request ```json { \"operation\": + * \"operation-type\", \"metadata_type\": \"metadata-type\", + * \"object_privilege_types\": [\"privilege-type-1\", + * \"privilege-type-2\"], \"metadata_identifiers\": + * [\"metadata-guid-or-name-1\", \"metadata-guid-or-name-1\"], + * \"principals\": [ { \"type\": \"type-1\", + * \"identifier\": \"principal-guid-or-name-1\" }, { \"type\": + * \"type-2\", \"identifier\": \"principal-guid-or-name-2\" } ] } + * ``` > ###### Note: > * Only admin users, users with edit access and + * users with coaching privilege on a given data-model can add or remove principals related to + * SPOTTER_COACHING_PRIVILEGE + * + * @param manageObjectPrivilegeRequest (required) + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the + * response body + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
204 Object privileges added/removed successfully -
400 Invalid request -
401 Unauthorized access -
403 Forbidden access -
500 Unexpected error -
+ */ + public void manageObjectPrivilege(ManageObjectPrivilegeRequest manageObjectPrivilegeRequest) + throws ApiException { + manageObjectPrivilegeWithHttpInfo(manageObjectPrivilegeRequest); + } + + /** + * Version: 26.3.0.cl or later This API allows the addition or deletion of object level + * privileges for a set of users and groups, on a set of metadata objects. It provides users to + * access certain features based on privilege based access control. #### Usage guidelines - + * Specify the `operation`. The supported operations are: `ADD`, + * `REMOVE`. - Specify the type of the objects on which the object privileges are + * being provided in `metadata_type`. Only `LOGICAL_TABLE` metadata type is + * supported for now. It may be extended for other metadata types in future. - Specify the list + * of object privilege types in the `object_privilege_types` array. The supported + * object privilege types are: `SPOTTER_COACHING_PRIVILEGE`. - Specify the identifiers + * (either GUID or name) for the metadata objects in the `metadata_identifiers` array. + * - Specify the `type` (`USER` or `USER_GROUP`) and + * `identifier` (either GUID or name) of the principals to which you want to apply the + * given operation and given object privileges in the `principals` array. - Ensure + * using correct Authorization Bearer Token corresponding to specific user & org. #### + * Example request ```json { \"operation\": + * \"operation-type\", \"metadata_type\": \"metadata-type\", + * \"object_privilege_types\": [\"privilege-type-1\", + * \"privilege-type-2\"], \"metadata_identifiers\": + * [\"metadata-guid-or-name-1\", \"metadata-guid-or-name-1\"], + * \"principals\": [ { \"type\": \"type-1\", + * \"identifier\": \"principal-guid-or-name-1\" }, { \"type\": + * \"type-2\", \"identifier\": \"principal-guid-or-name-2\" } ] } + * ``` > ###### Note: > * Only admin users, users with edit access and + * users with coaching privilege on a given data-model can add or remove principals related to + * SPOTTER_COACHING_PRIVILEGE + * + * @param manageObjectPrivilegeRequest (required) + * @return ApiResponse<Void> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the + * response body + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
204 Object privileges added/removed successfully -
400 Invalid request -
401 Unauthorized access -
403 Forbidden access -
500 Unexpected error -
+ */ + public ApiResponse manageObjectPrivilegeWithHttpInfo( + ManageObjectPrivilegeRequest manageObjectPrivilegeRequest) throws ApiException { + okhttp3.Call localVarCall = + manageObjectPrivilegeValidateBeforeCall(manageObjectPrivilegeRequest, null); + return localVarApiClient.execute(localVarCall); + } + + /** + * (asynchronously) Version: 26.3.0.cl or later This API allows the addition or deletion of + * object level privileges for a set of users and groups, on a set of metadata objects. It + * provides users to access certain features based on privilege based access control. #### Usage + * guidelines - Specify the `operation`. The supported operations are: + * `ADD`, `REMOVE`. - Specify the type of the objects on which the object + * privileges are being provided in `metadata_type`. Only `LOGICAL_TABLE` + * metadata type is supported for now. It may be extended for other metadata types in future. - + * Specify the list of object privilege types in the `object_privilege_types` array. + * The supported object privilege types are: `SPOTTER_COACHING_PRIVILEGE`. - Specify + * the identifiers (either GUID or name) for the metadata objects in the + * `metadata_identifiers` array. - Specify the `type` (`USER` or + * `USER_GROUP`) and `identifier` (either GUID or name) of the principals to + * which you want to apply the given operation and given object privileges in the + * `principals` array. - Ensure using correct Authorization Bearer Token corresponding + * to specific user & org. #### Example request ```json { + * \"operation\": \"operation-type\", \"metadata_type\": + * \"metadata-type\", \"object_privilege_types\": + * [\"privilege-type-1\", \"privilege-type-2\"], + * \"metadata_identifiers\": [\"metadata-guid-or-name-1\", + * \"metadata-guid-or-name-1\"], \"principals\": [ { \"type\": + * \"type-1\", \"identifier\": \"principal-guid-or-name-1\" }, { + * \"type\": \"type-2\", \"identifier\": + * \"principal-guid-or-name-2\" } ] } ``` > ###### Note: > * Only + * admin users, users with edit access and users with coaching privilege on a given data-model + * can add or remove principals related to SPOTTER_COACHING_PRIVILEGE + * + * @param manageObjectPrivilegeRequest (required) + * @param _callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body + * object + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
204 Object privileges added/removed successfully -
400 Invalid request -
401 Unauthorized access -
403 Forbidden access -
500 Unexpected error -
+ */ + public okhttp3.Call manageObjectPrivilegeAsync( + ManageObjectPrivilegeRequest manageObjectPrivilegeRequest, + final ApiCallback _callback) + throws ApiException { + + okhttp3.Call localVarCall = + manageObjectPrivilegeValidateBeforeCall(manageObjectPrivilegeRequest, _callback); + localVarApiClient.executeAsync(localVarCall, _callback); + return localVarCall; + } + /** + * Build call for publishMetadata + * + * @param publishMetadataRequest (required) + * @param _callback Callback for upload/download progress + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
204 Publishing metadata objects is successful. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public okhttp3.Call publishMetadataCall( + PublishMetadataRequest publishMetadataRequest, final ApiCallback _callback) + throws ApiException { + String basePath = null; + // Operation Servers + String[] localBasePaths = new String[] {}; + + // Determine Base Path to Use + if (localCustomBaseUrl != null) { + basePath = localCustomBaseUrl; + } else if (localBasePaths.length > 0) { + basePath = localBasePaths[localHostIndex]; + } else { + basePath = null; + } + + Object localVarPostBody = publishMetadataRequest; + + // create path and map variables + String localVarPath = "/api/rest/2.0/security/metadata/publish"; + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + final String[] localVarAccepts = {"application/json"}; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = {"application/json"}; + final String localVarContentType = + localVarApiClient.selectHeaderContentType(localVarContentTypes); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } + + String[] localVarAuthNames = new String[] {"bearerAuth"}; + return localVarApiClient.buildCall( + basePath, + localVarPath, + "POST", + localVarQueryParams, + localVarCollectionQueryParams, + localVarPostBody, + localVarHeaderParams, + localVarCookieParams, + localVarFormParams, + localVarAuthNames, + _callback); + } + + @SuppressWarnings("rawtypes") + private okhttp3.Call publishMetadataValidateBeforeCall( + PublishMetadataRequest publishMetadataRequest, final ApiCallback _callback) + throws ApiException { + // verify the required parameter 'publishMetadataRequest' is set + if (publishMetadataRequest == null) { + throw new ApiException( + "Missing the required parameter 'publishMetadataRequest' when calling" + + " publishMetadata(Async)"); + } + + return publishMetadataCall(publishMetadataRequest, _callback); + } + + /** + * Version: 26.5.0.cl or later Allows publishing metadata objects across organizations in + * ThoughtSpot. Requires ADMINISTRATION role and TENANT scope. The API endpoint allows + * publishing the following types of metadata objects: * Liveboards * Answers * Logical Tables + * This API will essentially share the objects along with it's dependencies to the org + * admins of the orgs to which it is being published. + * + * @param publishMetadataRequest (required) + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the + * response body + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
204 Publishing metadata objects is successful. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public void publishMetadata(PublishMetadataRequest publishMetadataRequest) throws ApiException { + publishMetadataWithHttpInfo(publishMetadataRequest); + } + + /** + * Version: 26.5.0.cl or later Allows publishing metadata objects across organizations in + * ThoughtSpot. Requires ADMINISTRATION role and TENANT scope. The API endpoint allows + * publishing the following types of metadata objects: * Liveboards * Answers * Logical Tables + * This API will essentially share the objects along with it's dependencies to the org + * admins of the orgs to which it is being published. + * + * @param publishMetadataRequest (required) + * @return ApiResponse<Void> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the + * response body + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
204 Publishing metadata objects is successful. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public ApiResponse publishMetadataWithHttpInfo( + PublishMetadataRequest publishMetadataRequest) throws ApiException { + okhttp3.Call localVarCall = publishMetadataValidateBeforeCall(publishMetadataRequest, null); + return localVarApiClient.execute(localVarCall); + } + + /** + * (asynchronously) Version: 26.5.0.cl or later Allows publishing metadata objects across + * organizations in ThoughtSpot. Requires ADMINISTRATION role and TENANT scope. The API endpoint + * allows publishing the following types of metadata objects: * Liveboards * Answers * Logical + * Tables This API will essentially share the objects along with it's dependencies to the + * org admins of the orgs to which it is being published. + * + * @param publishMetadataRequest (required) + * @param _callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body + * object + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
204 Publishing metadata objects is successful. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public okhttp3.Call publishMetadataAsync( + PublishMetadataRequest publishMetadataRequest, final ApiCallback _callback) + throws ApiException { + + okhttp3.Call localVarCall = + publishMetadataValidateBeforeCall(publishMetadataRequest, _callback); + localVarApiClient.executeAsync(localVarCall, _callback); + return localVarCall; + } + /** + * Build call for shareMetadata + * + * @param shareMetadataRequest (required) + * @param _callback Callback for upload/download progress + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
204 Sharing metadata objects is successful. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public okhttp3.Call shareMetadataCall( + ShareMetadataRequest shareMetadataRequest, final ApiCallback _callback) + throws ApiException { + String basePath = null; + // Operation Servers + String[] localBasePaths = new String[] {}; + + // Determine Base Path to Use + if (localCustomBaseUrl != null) { + basePath = localCustomBaseUrl; + } else if (localBasePaths.length > 0) { + basePath = localBasePaths[localHostIndex]; + } else { + basePath = null; + } + + Object localVarPostBody = shareMetadataRequest; + + // create path and map variables + String localVarPath = "/api/rest/2.0/security/metadata/share"; + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + final String[] localVarAccepts = {"application/json"}; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = {"application/json"}; + final String localVarContentType = + localVarApiClient.selectHeaderContentType(localVarContentTypes); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } + + String[] localVarAuthNames = new String[] {"bearerAuth"}; + return localVarApiClient.buildCall( + basePath, + localVarPath, + "POST", + localVarQueryParams, + localVarCollectionQueryParams, + localVarPostBody, + localVarHeaderParams, + localVarCookieParams, + localVarFormParams, + localVarAuthNames, + _callback); + } + + @SuppressWarnings("rawtypes") + private okhttp3.Call shareMetadataValidateBeforeCall( + ShareMetadataRequest shareMetadataRequest, final ApiCallback _callback) + throws ApiException { + // verify the required parameter 'shareMetadataRequest' is set + if (shareMetadataRequest == null) { + throw new ApiException( + "Missing the required parameter 'shareMetadataRequest' when calling" + + " shareMetadata(Async)"); + } + + return shareMetadataCall(shareMetadataRequest, _callback); + } + + /** + * Version: 9.0.0.cl or later Allows sharing one or several metadata objects with users and + * groups in ThoughtSpot. Requires edit access to the metadata object. #### Supported metadata + * objects: * Liveboards * Visualizations * Answers * Models * Views * Connections * Collections + * #### Object permissions You can provide `READ_ONLY` or `MODIFY` access + * when sharing an object with another user or group. The `READ_ONLY` permission + * grants view access to the shared object, whereas `MODIFY` provides edit access. To + * prevent a user or group from accessing the shared object, specify the GUID or name of the + * principal and set `shareMode` to `NO_ACCESS`. #### Sharing a + * visualization * Sharing a visualization implicitly shares the entire Liveboard with the + * recipient. * Object permissions set for a shared visualization also apply to the Liveboard + * unless overridden by another API request or via UI. * If email notifications for object + * sharing are enabled, a notification with a link to the shared visualization will be sent to + * the recipient’s email address. Although this link opens the shared visualization, recipients + * can also access other visualizations in the Liveboard. #### Sharing a collection Collections + * support **dual permissions** that provide fine-grained control: * **Collection permissions** + * (`share_mode`) - controls access to the collection itself (view, edit, delete the + * collection) * **Content permissions** (`content_share_mode`) - controls access to + * objects within the collection (view, edit objects inside) **Default Behavior:** - If only + * `share_mode` is specified, the content permissions default to `READ_ONLY` + * (except when `share_mode` is `NO_ACCESS`, then content also gets + * `NO_ACCESS`) - To give users edit access to collection contents, explicitly set + * `content_share_mode: \"MODIFY\"` ## Examples The following JSON examples + * can be copy-pasted as request bodies for the REST v2 API endpoint: ```bash + * POST /callosum/v1/v2/security/metadata/share Content-Type: application/x-www-form-urlencoded + * ``` ### Basic collection sharing Share a collection with read-only access: + * ```json { \"metadata_type\": \"COLLECTION\", + * \"metadata_identifiers\": [\"Sales Reports Collection\"], + * \"permissions\": [{ \"principal\": { \"type\": + * \"USER\", \"identifier\": \"alice@company.com\" }, + * \"share_mode\": \"READ_ONLY\" }], \"notification\": { + * \"message\": \"I've shared the Sales Reports collection with you\", + * \"notify_on_share\": true } } ``` ### Collection sharing with dual + * permissions Share a collection with different permissions for the collection vs. its + * contents: ```json { \"metadata_type\": \"COLLECTION\", + * \"metadata_identifiers\": [\"Marketing Analytics\"], + * \"permissions\": [{ \"principal\": { \"type\": + * \"USER\", \"identifier\": \"bob@company.com\" }, + * \"share_mode\": \"MODIFY\", \"content_share_mode\": + * \"READ_ONLY\" }, { \"principal\": { \"type\": + * \"USER_GROUP\", \"identifier\": \"Marketing Team\" }, + * \"share_mode\": \"READ_ONLY\", \"content_share_mode\": + * \"READ_ONLY\" }], \"notification\": { \"emails\": + * [\"bob@company.com\"], \"message\": \"You can edit the collection + * but content is read-only\", \"enable_custom_url\": false, + * \"notify_on_share\": true }, \"has_lenient_discoverability\": false } + * ``` ### Multiple collections sharing Share multiple collections with different + * users: ```json { \"metadata\": [ { \"type\": + * \"COLLECTION\", \"identifier\": \"Q4 Reports\" }, { + * \"type\": \"COLLECTION\", \"identifier\": \"Executive + * Dashboard Collection\" } ], \"permissions\": [{ \"principal\": { + * \"type\": \"USER_GROUP\", \"identifier\": + * \"Executives\" }, \"share_mode\": \"MODIFY\" }, { + * \"principal\": { \"type\": \"USER\", \"identifier\": + * \"manager@company.com\" }, \"share_mode\": \"READ_ONLY\", + * \"content_share_mode\": \"MODIFY\" }], \"notification\": { + * \"message\": \"Sharing quarterly collections with leadership team\", + * \"notify_on_share\": true } } ``` ### Remove collection access + * Remove access to a collection by setting share_mode to NO_ACCESS: ```json { + * \"metadata_type\": \"COLLECTION\", \"metadata_identifiers\": + * [\"Confidential Reports\"], \"permissions\": [{ \"principal\": + * { \"type\": \"USER\", \"identifier\": + * \"former-employee@company.com\" }, \"share_mode\": + * \"NO_ACCESS\" }], \"notification\": { \"notify_on_share\": + * false } } ``` ### Collection Permission Scenarios **Scenario 1: Collection + * Admin** - `share_mode: MODIFY` + `content_share_mode: MODIFY` = Full + * control over collection and its contents **Scenario 2: Collection Curator** - + * `share_mode: MODIFY` + `content_share_mode: READ_ONLY` = Can manage + * collection structure but not edit contents **Scenario 3: Content Editor** - `share_mode: + * READ_ONLY` + `content_share_mode: MODIFY` = Can edit objects within + * collection but can't change collection itself **Scenario 4: Viewer** - `share_mode: + * READ_ONLY` + `content_share_mode: READ_ONLY` = View-only access to + * collection and contents + * + * @param shareMetadataRequest (required) + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the + * response body + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
204 Sharing metadata objects is successful. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public void shareMetadata(ShareMetadataRequest shareMetadataRequest) throws ApiException { + shareMetadataWithHttpInfo(shareMetadataRequest); + } + + /** + * Version: 9.0.0.cl or later Allows sharing one or several metadata objects with users and + * groups in ThoughtSpot. Requires edit access to the metadata object. #### Supported metadata + * objects: * Liveboards * Visualizations * Answers * Models * Views * Connections * Collections + * #### Object permissions You can provide `READ_ONLY` or `MODIFY` access + * when sharing an object with another user or group. The `READ_ONLY` permission + * grants view access to the shared object, whereas `MODIFY` provides edit access. To + * prevent a user or group from accessing the shared object, specify the GUID or name of the + * principal and set `shareMode` to `NO_ACCESS`. #### Sharing a + * visualization * Sharing a visualization implicitly shares the entire Liveboard with the + * recipient. * Object permissions set for a shared visualization also apply to the Liveboard + * unless overridden by another API request or via UI. * If email notifications for object + * sharing are enabled, a notification with a link to the shared visualization will be sent to + * the recipient’s email address. Although this link opens the shared visualization, recipients + * can also access other visualizations in the Liveboard. #### Sharing a collection Collections + * support **dual permissions** that provide fine-grained control: * **Collection permissions** + * (`share_mode`) - controls access to the collection itself (view, edit, delete the + * collection) * **Content permissions** (`content_share_mode`) - controls access to + * objects within the collection (view, edit objects inside) **Default Behavior:** - If only + * `share_mode` is specified, the content permissions default to `READ_ONLY` + * (except when `share_mode` is `NO_ACCESS`, then content also gets + * `NO_ACCESS`) - To give users edit access to collection contents, explicitly set + * `content_share_mode: \"MODIFY\"` ## Examples The following JSON examples + * can be copy-pasted as request bodies for the REST v2 API endpoint: ```bash + * POST /callosum/v1/v2/security/metadata/share Content-Type: application/x-www-form-urlencoded + * ``` ### Basic collection sharing Share a collection with read-only access: + * ```json { \"metadata_type\": \"COLLECTION\", + * \"metadata_identifiers\": [\"Sales Reports Collection\"], + * \"permissions\": [{ \"principal\": { \"type\": + * \"USER\", \"identifier\": \"alice@company.com\" }, + * \"share_mode\": \"READ_ONLY\" }], \"notification\": { + * \"message\": \"I've shared the Sales Reports collection with you\", + * \"notify_on_share\": true } } ``` ### Collection sharing with dual + * permissions Share a collection with different permissions for the collection vs. its + * contents: ```json { \"metadata_type\": \"COLLECTION\", + * \"metadata_identifiers\": [\"Marketing Analytics\"], + * \"permissions\": [{ \"principal\": { \"type\": + * \"USER\", \"identifier\": \"bob@company.com\" }, + * \"share_mode\": \"MODIFY\", \"content_share_mode\": + * \"READ_ONLY\" }, { \"principal\": { \"type\": + * \"USER_GROUP\", \"identifier\": \"Marketing Team\" }, + * \"share_mode\": \"READ_ONLY\", \"content_share_mode\": + * \"READ_ONLY\" }], \"notification\": { \"emails\": + * [\"bob@company.com\"], \"message\": \"You can edit the collection + * but content is read-only\", \"enable_custom_url\": false, + * \"notify_on_share\": true }, \"has_lenient_discoverability\": false } + * ``` ### Multiple collections sharing Share multiple collections with different + * users: ```json { \"metadata\": [ { \"type\": + * \"COLLECTION\", \"identifier\": \"Q4 Reports\" }, { + * \"type\": \"COLLECTION\", \"identifier\": \"Executive + * Dashboard Collection\" } ], \"permissions\": [{ \"principal\": { + * \"type\": \"USER_GROUP\", \"identifier\": + * \"Executives\" }, \"share_mode\": \"MODIFY\" }, { + * \"principal\": { \"type\": \"USER\", \"identifier\": + * \"manager@company.com\" }, \"share_mode\": \"READ_ONLY\", + * \"content_share_mode\": \"MODIFY\" }], \"notification\": { + * \"message\": \"Sharing quarterly collections with leadership team\", + * \"notify_on_share\": true } } ``` ### Remove collection access + * Remove access to a collection by setting share_mode to NO_ACCESS: ```json { + * \"metadata_type\": \"COLLECTION\", \"metadata_identifiers\": + * [\"Confidential Reports\"], \"permissions\": [{ \"principal\": + * { \"type\": \"USER\", \"identifier\": + * \"former-employee@company.com\" }, \"share_mode\": + * \"NO_ACCESS\" }], \"notification\": { \"notify_on_share\": + * false } } ``` ### Collection Permission Scenarios **Scenario 1: Collection + * Admin** - `share_mode: MODIFY` + `content_share_mode: MODIFY` = Full + * control over collection and its contents **Scenario 2: Collection Curator** - + * `share_mode: MODIFY` + `content_share_mode: READ_ONLY` = Can manage + * collection structure but not edit contents **Scenario 3: Content Editor** - `share_mode: + * READ_ONLY` + `content_share_mode: MODIFY` = Can edit objects within + * collection but can't change collection itself **Scenario 4: Viewer** - `share_mode: + * READ_ONLY` + `content_share_mode: READ_ONLY` = View-only access to + * collection and contents + * + * @param shareMetadataRequest (required) + * @return ApiResponse<Void> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the + * response body + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
204 Sharing metadata objects is successful. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public ApiResponse shareMetadataWithHttpInfo(ShareMetadataRequest shareMetadataRequest) + throws ApiException { + okhttp3.Call localVarCall = shareMetadataValidateBeforeCall(shareMetadataRequest, null); + return localVarApiClient.execute(localVarCall); + } + + /** + * (asynchronously) Version: 9.0.0.cl or later Allows sharing one or several metadata objects + * with users and groups in ThoughtSpot. Requires edit access to the metadata object. #### + * Supported metadata objects: * Liveboards * Visualizations * Answers * Models * Views * + * Connections * Collections #### Object permissions You can provide `READ_ONLY` or + * `MODIFY` access when sharing an object with another user or group. The + * `READ_ONLY` permission grants view access to the shared object, whereas + * `MODIFY` provides edit access. To prevent a user or group from accessing the shared + * object, specify the GUID or name of the principal and set `shareMode` to + * `NO_ACCESS`. #### Sharing a visualization * Sharing a visualization implicitly + * shares the entire Liveboard with the recipient. * Object permissions set for a shared + * visualization also apply to the Liveboard unless overridden by another API request or via UI. + * * If email notifications for object sharing are enabled, a notification with a link to the + * shared visualization will be sent to the recipient’s email address. Although this link opens + * the shared visualization, recipients can also access other visualizations in the Liveboard. + * #### Sharing a collection Collections support **dual permissions** that provide fine-grained + * control: * **Collection permissions** (`share_mode`) - controls access to the + * collection itself (view, edit, delete the collection) * **Content permissions** + * (`content_share_mode`) - controls access to objects within the collection (view, + * edit objects inside) **Default Behavior:** - If only `share_mode` is specified, the + * content permissions default to `READ_ONLY` (except when `share_mode` is + * `NO_ACCESS`, then content also gets `NO_ACCESS`) - To give users edit + * access to collection contents, explicitly set `content_share_mode: + * \"MODIFY\"` ## Examples The following JSON examples can be copy-pasted as + * request bodies for the REST v2 API endpoint: ```bash POST + * /callosum/v1/v2/security/metadata/share Content-Type: application/x-www-form-urlencoded + * ``` ### Basic collection sharing Share a collection with read-only access: + * ```json { \"metadata_type\": \"COLLECTION\", + * \"metadata_identifiers\": [\"Sales Reports Collection\"], + * \"permissions\": [{ \"principal\": { \"type\": + * \"USER\", \"identifier\": \"alice@company.com\" }, + * \"share_mode\": \"READ_ONLY\" }], \"notification\": { + * \"message\": \"I've shared the Sales Reports collection with you\", + * \"notify_on_share\": true } } ``` ### Collection sharing with dual + * permissions Share a collection with different permissions for the collection vs. its + * contents: ```json { \"metadata_type\": \"COLLECTION\", + * \"metadata_identifiers\": [\"Marketing Analytics\"], + * \"permissions\": [{ \"principal\": { \"type\": + * \"USER\", \"identifier\": \"bob@company.com\" }, + * \"share_mode\": \"MODIFY\", \"content_share_mode\": + * \"READ_ONLY\" }, { \"principal\": { \"type\": + * \"USER_GROUP\", \"identifier\": \"Marketing Team\" }, + * \"share_mode\": \"READ_ONLY\", \"content_share_mode\": + * \"READ_ONLY\" }], \"notification\": { \"emails\": + * [\"bob@company.com\"], \"message\": \"You can edit the collection + * but content is read-only\", \"enable_custom_url\": false, + * \"notify_on_share\": true }, \"has_lenient_discoverability\": false } + * ``` ### Multiple collections sharing Share multiple collections with different + * users: ```json { \"metadata\": [ { \"type\": + * \"COLLECTION\", \"identifier\": \"Q4 Reports\" }, { + * \"type\": \"COLLECTION\", \"identifier\": \"Executive + * Dashboard Collection\" } ], \"permissions\": [{ \"principal\": { + * \"type\": \"USER_GROUP\", \"identifier\": + * \"Executives\" }, \"share_mode\": \"MODIFY\" }, { + * \"principal\": { \"type\": \"USER\", \"identifier\": + * \"manager@company.com\" }, \"share_mode\": \"READ_ONLY\", + * \"content_share_mode\": \"MODIFY\" }], \"notification\": { + * \"message\": \"Sharing quarterly collections with leadership team\", + * \"notify_on_share\": true } } ``` ### Remove collection access + * Remove access to a collection by setting share_mode to NO_ACCESS: ```json { + * \"metadata_type\": \"COLLECTION\", \"metadata_identifiers\": + * [\"Confidential Reports\"], \"permissions\": [{ \"principal\": + * { \"type\": \"USER\", \"identifier\": + * \"former-employee@company.com\" }, \"share_mode\": + * \"NO_ACCESS\" }], \"notification\": { \"notify_on_share\": + * false } } ``` ### Collection Permission Scenarios **Scenario 1: Collection + * Admin** - `share_mode: MODIFY` + `content_share_mode: MODIFY` = Full + * control over collection and its contents **Scenario 2: Collection Curator** - + * `share_mode: MODIFY` + `content_share_mode: READ_ONLY` = Can manage + * collection structure but not edit contents **Scenario 3: Content Editor** - `share_mode: + * READ_ONLY` + `content_share_mode: MODIFY` = Can edit objects within + * collection but can't change collection itself **Scenario 4: Viewer** - `share_mode: + * READ_ONLY` + `content_share_mode: READ_ONLY` = View-only access to + * collection and contents + * + * @param shareMetadataRequest (required) + * @param _callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body + * object + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
204 Sharing metadata objects is successful. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public okhttp3.Call shareMetadataAsync( + ShareMetadataRequest shareMetadataRequest, final ApiCallback _callback) + throws ApiException { + + okhttp3.Call localVarCall = + shareMetadataValidateBeforeCall(shareMetadataRequest, _callback); + localVarApiClient.executeAsync(localVarCall, _callback); + return localVarCall; + } + /** + * Build call for unpublishMetadata + * + * @param unpublishMetadataRequest (required) + * @param _callback Callback for upload/download progress + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
204 Unpublishing metadata objects is successful. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public okhttp3.Call unpublishMetadataCall( + UnpublishMetadataRequest unpublishMetadataRequest, final ApiCallback _callback) + throws ApiException { + String basePath = null; + // Operation Servers + String[] localBasePaths = new String[] {}; + + // Determine Base Path to Use + if (localCustomBaseUrl != null) { + basePath = localCustomBaseUrl; + } else if (localBasePaths.length > 0) { + basePath = localBasePaths[localHostIndex]; + } else { + basePath = null; + } + + Object localVarPostBody = unpublishMetadataRequest; + + // create path and map variables + String localVarPath = "/api/rest/2.0/security/metadata/unpublish"; + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + final String[] localVarAccepts = {"application/json"}; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = {"application/json"}; + final String localVarContentType = + localVarApiClient.selectHeaderContentType(localVarContentTypes); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } + + String[] localVarAuthNames = new String[] {"bearerAuth"}; + return localVarApiClient.buildCall( + basePath, + localVarPath, + "POST", + localVarQueryParams, + localVarCollectionQueryParams, + localVarPostBody, + localVarHeaderParams, + localVarCookieParams, + localVarFormParams, + localVarAuthNames, + _callback); + } + + @SuppressWarnings("rawtypes") + private okhttp3.Call unpublishMetadataValidateBeforeCall( + UnpublishMetadataRequest unpublishMetadataRequest, final ApiCallback _callback) + throws ApiException { + // verify the required parameter 'unpublishMetadataRequest' is set + if (unpublishMetadataRequest == null) { + throw new ApiException( + "Missing the required parameter 'unpublishMetadataRequest' when calling" + + " unpublishMetadata(Async)"); + } + + return unpublishMetadataCall(unpublishMetadataRequest, _callback); + } + + /** + * Version: 26.5.0.cl or later Allows unpublishing metadata objects from organizations in + * ThoughtSpot. Requires ADMINISTRATION role and TENANT scope. The API endpoint allows + * unpublishing the following types of metadata objects: * Liveboards * Answers * Logical Tables + * When unpublishing objects, you can: * Include dependencies by setting + * `include_dependencies` to true - this will unpublish all dependent objects if no + * other published object is using them * Force unpublish by setting `force` to true - + * this will break all dependent objects in the unpublished organizations + * + * @param unpublishMetadataRequest (required) + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the + * response body + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
204 Unpublishing metadata objects is successful. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public void unpublishMetadata(UnpublishMetadataRequest unpublishMetadataRequest) + throws ApiException { + unpublishMetadataWithHttpInfo(unpublishMetadataRequest); + } + + /** + * Version: 26.5.0.cl or later Allows unpublishing metadata objects from organizations in + * ThoughtSpot. Requires ADMINISTRATION role and TENANT scope. The API endpoint allows + * unpublishing the following types of metadata objects: * Liveboards * Answers * Logical Tables + * When unpublishing objects, you can: * Include dependencies by setting + * `include_dependencies` to true - this will unpublish all dependent objects if no + * other published object is using them * Force unpublish by setting `force` to true - + * this will break all dependent objects in the unpublished organizations + * + * @param unpublishMetadataRequest (required) + * @return ApiResponse<Void> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the + * response body + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
204 Unpublishing metadata objects is successful. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public ApiResponse unpublishMetadataWithHttpInfo( + UnpublishMetadataRequest unpublishMetadataRequest) throws ApiException { + okhttp3.Call localVarCall = + unpublishMetadataValidateBeforeCall(unpublishMetadataRequest, null); + return localVarApiClient.execute(localVarCall); + } + + /** + * (asynchronously) Version: 26.5.0.cl or later Allows unpublishing metadata objects from + * organizations in ThoughtSpot. Requires ADMINISTRATION role and TENANT scope. The API endpoint + * allows unpublishing the following types of metadata objects: * Liveboards * Answers * Logical + * Tables When unpublishing objects, you can: * Include dependencies by setting + * `include_dependencies` to true - this will unpublish all dependent objects if no + * other published object is using them * Force unpublish by setting `force` to true - + * this will break all dependent objects in the unpublished organizations + * + * @param unpublishMetadataRequest (required) + * @param _callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body + * object + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
204 Unpublishing metadata objects is successful. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public okhttp3.Call unpublishMetadataAsync( + UnpublishMetadataRequest unpublishMetadataRequest, final ApiCallback _callback) + throws ApiException { + + okhttp3.Call localVarCall = + unpublishMetadataValidateBeforeCall(unpublishMetadataRequest, _callback); + localVarApiClient.executeAsync(localVarCall, _callback); + return localVarCall; + } + /** + * Build call for updateColumnSecurityRules + * + * @param updateColumnSecurityRulesRequest (required) + * @param _callback Callback for upload/download progress + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
204 Successfully updated column security rules -
400 Bad request - Invalid parameters or table not found -
401 Unauthorized access. -
403 Forbidden - User doesn't have permission to modify security rules for this table -
500 Internal server error -
+ */ + public okhttp3.Call updateColumnSecurityRulesCall( + UpdateColumnSecurityRulesRequest updateColumnSecurityRulesRequest, + final ApiCallback _callback) + throws ApiException { + String basePath = null; + // Operation Servers + String[] localBasePaths = new String[] {}; + + // Determine Base Path to Use + if (localCustomBaseUrl != null) { + basePath = localCustomBaseUrl; + } else if (localBasePaths.length > 0) { + basePath = localBasePaths[localHostIndex]; + } else { + basePath = null; + } + + Object localVarPostBody = updateColumnSecurityRulesRequest; + + // create path and map variables + String localVarPath = "/api/rest/2.0/security/column/rules/update"; + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + final String[] localVarAccepts = {"application/json"}; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = {"application/json"}; + final String localVarContentType = + localVarApiClient.selectHeaderContentType(localVarContentTypes); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } + + String[] localVarAuthNames = new String[] {"bearerAuth"}; + return localVarApiClient.buildCall( + basePath, + localVarPath, + "POST", + localVarQueryParams, + localVarCollectionQueryParams, + localVarPostBody, + localVarHeaderParams, + localVarCookieParams, + localVarFormParams, + localVarAuthNames, + _callback); + } + + @SuppressWarnings("rawtypes") + private okhttp3.Call updateColumnSecurityRulesValidateBeforeCall( + UpdateColumnSecurityRulesRequest updateColumnSecurityRulesRequest, + final ApiCallback _callback) + throws ApiException { + // verify the required parameter 'updateColumnSecurityRulesRequest' is set + if (updateColumnSecurityRulesRequest == null) { + throw new ApiException( + "Missing the required parameter 'updateColumnSecurityRulesRequest' when" + + " calling updateColumnSecurityRules(Async)"); + } + + return updateColumnSecurityRulesCall(updateColumnSecurityRulesRequest, _callback); + } + + /** + * Version: 10.12.0.cl or later Creates, updates, or deletes column security rules for specified + * tables. This API endpoint allows you to create, update, or delete column-level security rules + * on columns of a table. The operation follows an \"all or none\" policy: if defining + * security rules for any of the provided columns fails, the entire operation will be rolled + * back, and no rules will be created. #### Usage guidelines - Provide table identifier using + * either `identifier` (GUID or name) or `obj_identifier` (object ID) - Use + * `clear_csr: true` to remove all column security rules from the table - For each + * column, specify the security rule using `column_security_rules` array - Use + * `is_unsecured: true` to mark a specific column as unprotected - Use + * `group_access` operations to manage group associations: - `ADD`: Add + * groups to the column's access list - `REMOVE`: Remove groups from the + * column's access list - `REPLACE`: Replace all existing groups with the + * specified groups #### Required permissions - `ADMINISTRATION` - Can administer + * ThoughtSpot - `DATAMANAGEMENT` - Can manage data (if RBAC is disabled) - + * `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` - Can manage worksheet views and tables (if + * RBAC is enabled) #### Example request ```json { \"identifier\": + * \"table-guid\", \"obj_identifier\": \"table-object-id\", + * \"clear_csr\": false, \"column_security_rules\": [ { + * \"column_identifier\": \"col id or col name\", + * \"is_unsecured\": false, \"group_access\": [ { \"operation\": + * \"ADD\", \"group_identifiers\": [\"hr_group_id\", + * \"hr_group_name\", \"finance_group_id\"] } ] }, { + * \"column_identifier\": \"col id or col name\", + * \"is_unsecured\": true }, { \"column_identifier\": \"col id or col + * name\", \"is_unsecured\": false, \"group_access\": [ { + * \"operation\": \"REPLACE\", \"group_identifiers\": + * [\"management_group_id\", \"management_group_name\"] } ] } ] } + * ``` #### Request Body Schema - `identifier` (string, optional): GUID + * or name of the table for which we want to create column security rules - + * `obj_identifier` (string, optional): The object ID of the table - + * `clear_csr` (boolean, optional): If true, then all the secured columns will be + * marked as unprotected, and all the group associations will be removed - + * `column_security_rules` (array of objects, required): An array where each object + * defines the security rule for a specific column Each column security rule object contains: - + * `column_identifier` (string, required): Column identifier (col_id or name) - + * `is_unsecured` (boolean, optional): If true, the column will be marked as + * unprotected and all groups associated with it will be removed - `group_access` + * (array of objects, optional): Array of group operation objects Each group operation object + * contains: - `operation` (string, required): Operation type - ADD, REMOVE, or + * REPLACE - `group_identifiers` (array of strings, required): Array of group + * identifiers (name or GUID) on which the operation will be performed #### Response This API + * does not return any response body. A successful operation returns HTTP 200 status code. #### + * Operation Types - **ADD**: Adds the specified groups to the column's access list - + * **REMOVE**: Removes the specified groups from the column's access list - **REPLACE**: + * Replaces all existing groups with the specified groups + * + * @param updateColumnSecurityRulesRequest (required) + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the + * response body + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
204 Successfully updated column security rules -
400 Bad request - Invalid parameters or table not found -
401 Unauthorized access. -
403 Forbidden - User doesn't have permission to modify security rules for this table -
500 Internal server error -
+ */ + public void updateColumnSecurityRules( + UpdateColumnSecurityRulesRequest updateColumnSecurityRulesRequest) throws ApiException { + updateColumnSecurityRulesWithHttpInfo(updateColumnSecurityRulesRequest); + } + + /** + * Version: 10.12.0.cl or later Creates, updates, or deletes column security rules for specified + * tables. This API endpoint allows you to create, update, or delete column-level security rules + * on columns of a table. The operation follows an \"all or none\" policy: if defining + * security rules for any of the provided columns fails, the entire operation will be rolled + * back, and no rules will be created. #### Usage guidelines - Provide table identifier using + * either `identifier` (GUID or name) or `obj_identifier` (object ID) - Use + * `clear_csr: true` to remove all column security rules from the table - For each + * column, specify the security rule using `column_security_rules` array - Use + * `is_unsecured: true` to mark a specific column as unprotected - Use + * `group_access` operations to manage group associations: - `ADD`: Add + * groups to the column's access list - `REMOVE`: Remove groups from the + * column's access list - `REPLACE`: Replace all existing groups with the + * specified groups #### Required permissions - `ADMINISTRATION` - Can administer + * ThoughtSpot - `DATAMANAGEMENT` - Can manage data (if RBAC is disabled) - + * `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` - Can manage worksheet views and tables (if + * RBAC is enabled) #### Example request ```json { \"identifier\": + * \"table-guid\", \"obj_identifier\": \"table-object-id\", + * \"clear_csr\": false, \"column_security_rules\": [ { + * \"column_identifier\": \"col id or col name\", + * \"is_unsecured\": false, \"group_access\": [ { \"operation\": + * \"ADD\", \"group_identifiers\": [\"hr_group_id\", + * \"hr_group_name\", \"finance_group_id\"] } ] }, { + * \"column_identifier\": \"col id or col name\", + * \"is_unsecured\": true }, { \"column_identifier\": \"col id or col + * name\", \"is_unsecured\": false, \"group_access\": [ { + * \"operation\": \"REPLACE\", \"group_identifiers\": + * [\"management_group_id\", \"management_group_name\"] } ] } ] } + * ``` #### Request Body Schema - `identifier` (string, optional): GUID + * or name of the table for which we want to create column security rules - + * `obj_identifier` (string, optional): The object ID of the table - + * `clear_csr` (boolean, optional): If true, then all the secured columns will be + * marked as unprotected, and all the group associations will be removed - + * `column_security_rules` (array of objects, required): An array where each object + * defines the security rule for a specific column Each column security rule object contains: - + * `column_identifier` (string, required): Column identifier (col_id or name) - + * `is_unsecured` (boolean, optional): If true, the column will be marked as + * unprotected and all groups associated with it will be removed - `group_access` + * (array of objects, optional): Array of group operation objects Each group operation object + * contains: - `operation` (string, required): Operation type - ADD, REMOVE, or + * REPLACE - `group_identifiers` (array of strings, required): Array of group + * identifiers (name or GUID) on which the operation will be performed #### Response This API + * does not return any response body. A successful operation returns HTTP 200 status code. #### + * Operation Types - **ADD**: Adds the specified groups to the column's access list - + * **REMOVE**: Removes the specified groups from the column's access list - **REPLACE**: + * Replaces all existing groups with the specified groups + * + * @param updateColumnSecurityRulesRequest (required) + * @return ApiResponse<Void> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the + * response body + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
204 Successfully updated column security rules -
400 Bad request - Invalid parameters or table not found -
401 Unauthorized access. -
403 Forbidden - User doesn't have permission to modify security rules for this table -
500 Internal server error -
+ */ + public ApiResponse updateColumnSecurityRulesWithHttpInfo( + UpdateColumnSecurityRulesRequest updateColumnSecurityRulesRequest) throws ApiException { + okhttp3.Call localVarCall = + updateColumnSecurityRulesValidateBeforeCall(updateColumnSecurityRulesRequest, null); + return localVarApiClient.execute(localVarCall); + } + + /** + * (asynchronously) Version: 10.12.0.cl or later Creates, updates, or deletes column security + * rules for specified tables. This API endpoint allows you to create, update, or delete + * column-level security rules on columns of a table. The operation follows an \"all or + * none\" policy: if defining security rules for any of the provided columns fails, the + * entire operation will be rolled back, and no rules will be created. #### Usage guidelines - + * Provide table identifier using either `identifier` (GUID or name) or + * `obj_identifier` (object ID) - Use `clear_csr: true` to remove all column + * security rules from the table - For each column, specify the security rule using + * `column_security_rules` array - Use `is_unsecured: true` to mark a + * specific column as unprotected - Use `group_access` operations to manage group + * associations: - `ADD`: Add groups to the column's access list - + * `REMOVE`: Remove groups from the column's access list - `REPLACE`: + * Replace all existing groups with the specified groups #### Required permissions - + * `ADMINISTRATION` - Can administer ThoughtSpot - `DATAMANAGEMENT` - Can + * manage data (if RBAC is disabled) - `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` - Can + * manage worksheet views and tables (if RBAC is enabled) #### Example request + * ```json { \"identifier\": \"table-guid\", + * \"obj_identifier\": \"table-object-id\", \"clear_csr\": false, + * \"column_security_rules\": [ { \"column_identifier\": \"col id or + * col name\", \"is_unsecured\": false, \"group_access\": [ { + * \"operation\": \"ADD\", \"group_identifiers\": + * [\"hr_group_id\", \"hr_group_name\", \"finance_group_id\"] } ] + * }, { \"column_identifier\": \"col id or col name\", + * \"is_unsecured\": true }, { \"column_identifier\": \"col id or col + * name\", \"is_unsecured\": false, \"group_access\": [ { + * \"operation\": \"REPLACE\", \"group_identifiers\": + * [\"management_group_id\", \"management_group_name\"] } ] } ] } + * ``` #### Request Body Schema - `identifier` (string, optional): GUID + * or name of the table for which we want to create column security rules - + * `obj_identifier` (string, optional): The object ID of the table - + * `clear_csr` (boolean, optional): If true, then all the secured columns will be + * marked as unprotected, and all the group associations will be removed - + * `column_security_rules` (array of objects, required): An array where each object + * defines the security rule for a specific column Each column security rule object contains: - + * `column_identifier` (string, required): Column identifier (col_id or name) - + * `is_unsecured` (boolean, optional): If true, the column will be marked as + * unprotected and all groups associated with it will be removed - `group_access` + * (array of objects, optional): Array of group operation objects Each group operation object + * contains: - `operation` (string, required): Operation type - ADD, REMOVE, or + * REPLACE - `group_identifiers` (array of strings, required): Array of group + * identifiers (name or GUID) on which the operation will be performed #### Response This API + * does not return any response body. A successful operation returns HTTP 200 status code. #### + * Operation Types - **ADD**: Adds the specified groups to the column's access list - + * **REMOVE**: Removes the specified groups from the column's access list - **REPLACE**: + * Replaces all existing groups with the specified groups + * + * @param updateColumnSecurityRulesRequest (required) + * @param _callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body + * object + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
204 Successfully updated column security rules -
400 Bad request - Invalid parameters or table not found -
401 Unauthorized access. -
403 Forbidden - User doesn't have permission to modify security rules for this table -
500 Internal server error -
+ */ + public okhttp3.Call updateColumnSecurityRulesAsync( + UpdateColumnSecurityRulesRequest updateColumnSecurityRulesRequest, + final ApiCallback _callback) + throws ApiException { + + okhttp3.Call localVarCall = + updateColumnSecurityRulesValidateBeforeCall( + updateColumnSecurityRulesRequest, _callback); + localVarApiClient.executeAsync(localVarCall, _callback); + return localVarCall; + } +} diff --git a/sdks/java/src/main/java/com/thoughtspot/client/api/SystemApi.java b/sdks/java/src/main/java/com/thoughtspot/client/api/SystemApi.java new file mode 100644 index 000000000..51d77fbb4 --- /dev/null +++ b/sdks/java/src/main/java/com/thoughtspot/client/api/SystemApi.java @@ -0,0 +1,1768 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client.api; + +import com.google.gson.reflect.TypeToken; +import com.thoughtspot.client.ApiCallback; +import com.thoughtspot.client.ApiClient; +import com.thoughtspot.client.ApiClientConfiguration; +import com.thoughtspot.client.ApiException; +import com.thoughtspot.client.ApiResponse; +import com.thoughtspot.client.Configuration; +import com.thoughtspot.client.Pair; +import com.thoughtspot.client.model.CommunicationChannelPreferencesResponse; +import com.thoughtspot.client.model.CommunicationChannelValidateResponse; +import com.thoughtspot.client.model.ConfigureCommunicationChannelPreferencesRequest; +import com.thoughtspot.client.model.ConfigureSecuritySettingsRequest; +import com.thoughtspot.client.model.SearchCommunicationChannelPreferencesRequest; +import com.thoughtspot.client.model.SearchSecuritySettingsRequest; +import com.thoughtspot.client.model.SecuritySettingsResponse; +import com.thoughtspot.client.model.SystemConfig; +import com.thoughtspot.client.model.SystemInfo; +import com.thoughtspot.client.model.SystemOverrideInfo; +import com.thoughtspot.client.model.UpdateSystemConfigRequest; +import com.thoughtspot.client.model.ValidateCommunicationChannelRequest; +import java.lang.reflect.Type; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +@javax.annotation.Generated( + value = "org.openapitools.codegen.languages.JavaClientCodegen", + comments = "Generator version: 7.12.0") +public class SystemApi { + private ApiClient localVarApiClient; + private ApiClientConfiguration localVarApiClientConfiguration; + private int localHostIndex; + private String localCustomBaseUrl; + + public SystemApi() { + this(Configuration.getDefaultApiClient()); + } + + public SystemApi(ApiClient apiClient) { + this.localVarApiClient = apiClient; + } + + public SystemApi(ApiClientConfiguration apiClientConfiguration) { + this.localVarApiClientConfiguration = apiClientConfiguration; + this.localVarApiClient = new ApiClient(apiClientConfiguration); + } + + public ApiClient getApiClient() { + return localVarApiClient; + } + + public void setApiClient(ApiClient apiClient) { + this.localVarApiClient = apiClient; + } + + public ApiClientConfiguration getApiClientConfiguration() { + return localVarApiClientConfiguration; + } + + public void applyApiClientConfiguration(ApiClientConfiguration apiClientConfiguration) { + this.localVarApiClientConfiguration = apiClientConfiguration; + if (localVarApiClient != null) { + localVarApiClient.applyApiClientConfiguration(apiClientConfiguration); + } else { + localVarApiClient = new ApiClient(apiClientConfiguration); + } + } + + public int getHostIndex() { + return localHostIndex; + } + + public void setHostIndex(int hostIndex) { + this.localHostIndex = hostIndex; + } + + public String getCustomBaseUrl() { + return localCustomBaseUrl; + } + + public void setCustomBaseUrl(String customBaseUrl) { + this.localCustomBaseUrl = customBaseUrl; + } + + /** + * Build call for configureCommunicationChannelPreferences + * + * @param configureCommunicationChannelPreferencesRequest (required) + * @param _callback Callback for upload/download progress + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
204 Communication channel preferences successfully updated. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public okhttp3.Call configureCommunicationChannelPreferencesCall( + ConfigureCommunicationChannelPreferencesRequest + configureCommunicationChannelPreferencesRequest, + final ApiCallback _callback) + throws ApiException { + String basePath = null; + // Operation Servers + String[] localBasePaths = new String[] {}; + + // Determine Base Path to Use + if (localCustomBaseUrl != null) { + basePath = localCustomBaseUrl; + } else if (localBasePaths.length > 0) { + basePath = localBasePaths[localHostIndex]; + } else { + basePath = null; + } + + Object localVarPostBody = configureCommunicationChannelPreferencesRequest; + + // create path and map variables + String localVarPath = "/api/rest/2.0/system/preferences/communication-channels/configure"; + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + final String[] localVarAccepts = {"application/json"}; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = {"application/json"}; + final String localVarContentType = + localVarApiClient.selectHeaderContentType(localVarContentTypes); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } + + String[] localVarAuthNames = new String[] {"bearerAuth"}; + return localVarApiClient.buildCall( + basePath, + localVarPath, + "POST", + localVarQueryParams, + localVarCollectionQueryParams, + localVarPostBody, + localVarHeaderParams, + localVarCookieParams, + localVarFormParams, + localVarAuthNames, + _callback); + } + + @SuppressWarnings("rawtypes") + private okhttp3.Call configureCommunicationChannelPreferencesValidateBeforeCall( + ConfigureCommunicationChannelPreferencesRequest + configureCommunicationChannelPreferencesRequest, + final ApiCallback _callback) + throws ApiException { + // verify the required parameter 'configureCommunicationChannelPreferencesRequest' is set + if (configureCommunicationChannelPreferencesRequest == null) { + throw new ApiException( + "Missing the required parameter" + + " 'configureCommunicationChannelPreferencesRequest' when calling" + + " configureCommunicationChannelPreferences(Async)"); + } + + return configureCommunicationChannelPreferencesCall( + configureCommunicationChannelPreferencesRequest, _callback); + } + + /** + * Version: 10.14.0.cl or later Configure communication channel preferences. - Use + * `cluster_preferences` to update the default preferences for your ThoughtSpot + * application instance. - If your instance has + * [Orgs](https://docs.thoughtspot.com/cloud/latest/orgs-overview), use + * `org_preferences` to specify Org-specific preferences that override the defaults. + * Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) or `DEVELOPER` + * (**Has developer privilege**) privilege. If [Role-Based Access Control + * (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, users with + * `APPLICATION_ADMINISTRATION` (**Can manage application settings**) privilege are + * also authorized to perform this action. + * + * @param configureCommunicationChannelPreferencesRequest (required) + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the + * response body + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
204 Communication channel preferences successfully updated. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public void configureCommunicationChannelPreferences( + ConfigureCommunicationChannelPreferencesRequest + configureCommunicationChannelPreferencesRequest) + throws ApiException { + configureCommunicationChannelPreferencesWithHttpInfo( + configureCommunicationChannelPreferencesRequest); + } + + /** + * Version: 10.14.0.cl or later Configure communication channel preferences. - Use + * `cluster_preferences` to update the default preferences for your ThoughtSpot + * application instance. - If your instance has + * [Orgs](https://docs.thoughtspot.com/cloud/latest/orgs-overview), use + * `org_preferences` to specify Org-specific preferences that override the defaults. + * Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) or `DEVELOPER` + * (**Has developer privilege**) privilege. If [Role-Based Access Control + * (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, users with + * `APPLICATION_ADMINISTRATION` (**Can manage application settings**) privilege are + * also authorized to perform this action. + * + * @param configureCommunicationChannelPreferencesRequest (required) + * @return ApiResponse<Void> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the + * response body + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
204 Communication channel preferences successfully updated. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public ApiResponse configureCommunicationChannelPreferencesWithHttpInfo( + ConfigureCommunicationChannelPreferencesRequest + configureCommunicationChannelPreferencesRequest) + throws ApiException { + okhttp3.Call localVarCall = + configureCommunicationChannelPreferencesValidateBeforeCall( + configureCommunicationChannelPreferencesRequest, null); + return localVarApiClient.execute(localVarCall); + } + + /** + * (asynchronously) Version: 10.14.0.cl or later Configure communication channel preferences. - + * Use `cluster_preferences` to update the default preferences for your ThoughtSpot + * application instance. - If your instance has + * [Orgs](https://docs.thoughtspot.com/cloud/latest/orgs-overview), use + * `org_preferences` to specify Org-specific preferences that override the defaults. + * Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) or `DEVELOPER` + * (**Has developer privilege**) privilege. If [Role-Based Access Control + * (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, users with + * `APPLICATION_ADMINISTRATION` (**Can manage application settings**) privilege are + * also authorized to perform this action. + * + * @param configureCommunicationChannelPreferencesRequest (required) + * @param _callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body + * object + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
204 Communication channel preferences successfully updated. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public okhttp3.Call configureCommunicationChannelPreferencesAsync( + ConfigureCommunicationChannelPreferencesRequest + configureCommunicationChannelPreferencesRequest, + final ApiCallback _callback) + throws ApiException { + + okhttp3.Call localVarCall = + configureCommunicationChannelPreferencesValidateBeforeCall( + configureCommunicationChannelPreferencesRequest, _callback); + localVarApiClient.executeAsync(localVarCall, _callback); + return localVarCall; + } + /** + * Build call for configureSecuritySettings + * + * @param configureSecuritySettingsRequest (required) + * @param _callback Callback for upload/download progress + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
204 Successfully configured the security settings. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public okhttp3.Call configureSecuritySettingsCall( + ConfigureSecuritySettingsRequest configureSecuritySettingsRequest, + final ApiCallback _callback) + throws ApiException { + String basePath = null; + // Operation Servers + String[] localBasePaths = new String[] {}; + + // Determine Base Path to Use + if (localCustomBaseUrl != null) { + basePath = localCustomBaseUrl; + } else if (localBasePaths.length > 0) { + basePath = localBasePaths[localHostIndex]; + } else { + basePath = null; + } + + Object localVarPostBody = configureSecuritySettingsRequest; + + // create path and map variables + String localVarPath = "/api/rest/2.0/system/security-settings/configure"; + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + final String[] localVarAccepts = {"application/json"}; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = {"application/json"}; + final String localVarContentType = + localVarApiClient.selectHeaderContentType(localVarContentTypes); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } + + String[] localVarAuthNames = new String[] {"bearerAuth"}; + return localVarApiClient.buildCall( + basePath, + localVarPath, + "POST", + localVarQueryParams, + localVarCollectionQueryParams, + localVarPostBody, + localVarHeaderParams, + localVarCookieParams, + localVarFormParams, + localVarAuthNames, + _callback); + } + + @SuppressWarnings("rawtypes") + private okhttp3.Call configureSecuritySettingsValidateBeforeCall( + ConfigureSecuritySettingsRequest configureSecuritySettingsRequest, + final ApiCallback _callback) + throws ApiException { + // verify the required parameter 'configureSecuritySettingsRequest' is set + if (configureSecuritySettingsRequest == null) { + throw new ApiException( + "Missing the required parameter 'configureSecuritySettingsRequest' when" + + " calling configureSecuritySettings(Async)"); + } + + return configureSecuritySettingsCall(configureSecuritySettingsRequest, _callback); + } + + /** + * Version: 26.2.0.cl or later Configure security settings for your ThoughtSpot application + * instance. - Use `cluster_preferences` to update cluster-level security settings + * including CORS whitelisted URLs, CSP settings, SAML redirect URLs, partitioned cookies, and + * non-embed access configuration. - Use `org_preferences` to configure Org-specific + * security settings. If your instance has + * [Orgs](https://docs.thoughtspot.com/cloud/latest/orgs-overview), this allows configuring CORS + * and non-embed access settings specific to the Org. Requires `ADMINISTRATION` (**Can + * administer ThoughtSpot**) or `DEVELOPER` (**Has developer privilege**) privilege. + * Cluster-level SAML and script-src settings require `ADMINISTRATION` privilege. See + * [Security Settings](https://developers.thoughtspot.com/docs/security-settings) for more + * details. + * + * @param configureSecuritySettingsRequest (required) + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the + * response body + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
204 Successfully configured the security settings. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public void configureSecuritySettings( + ConfigureSecuritySettingsRequest configureSecuritySettingsRequest) throws ApiException { + configureSecuritySettingsWithHttpInfo(configureSecuritySettingsRequest); + } + + /** + * Version: 26.2.0.cl or later Configure security settings for your ThoughtSpot application + * instance. - Use `cluster_preferences` to update cluster-level security settings + * including CORS whitelisted URLs, CSP settings, SAML redirect URLs, partitioned cookies, and + * non-embed access configuration. - Use `org_preferences` to configure Org-specific + * security settings. If your instance has + * [Orgs](https://docs.thoughtspot.com/cloud/latest/orgs-overview), this allows configuring CORS + * and non-embed access settings specific to the Org. Requires `ADMINISTRATION` (**Can + * administer ThoughtSpot**) or `DEVELOPER` (**Has developer privilege**) privilege. + * Cluster-level SAML and script-src settings require `ADMINISTRATION` privilege. See + * [Security Settings](https://developers.thoughtspot.com/docs/security-settings) for more + * details. + * + * @param configureSecuritySettingsRequest (required) + * @return ApiResponse<Void> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the + * response body + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
204 Successfully configured the security settings. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public ApiResponse configureSecuritySettingsWithHttpInfo( + ConfigureSecuritySettingsRequest configureSecuritySettingsRequest) throws ApiException { + okhttp3.Call localVarCall = + configureSecuritySettingsValidateBeforeCall(configureSecuritySettingsRequest, null); + return localVarApiClient.execute(localVarCall); + } + + /** + * (asynchronously) Version: 26.2.0.cl or later Configure security settings for your ThoughtSpot + * application instance. - Use `cluster_preferences` to update cluster-level security + * settings including CORS whitelisted URLs, CSP settings, SAML redirect URLs, partitioned + * cookies, and non-embed access configuration. - Use `org_preferences` to configure + * Org-specific security settings. If your instance has + * [Orgs](https://docs.thoughtspot.com/cloud/latest/orgs-overview), this allows configuring CORS + * and non-embed access settings specific to the Org. Requires `ADMINISTRATION` (**Can + * administer ThoughtSpot**) or `DEVELOPER` (**Has developer privilege**) privilege. + * Cluster-level SAML and script-src settings require `ADMINISTRATION` privilege. See + * [Security Settings](https://developers.thoughtspot.com/docs/security-settings) for more + * details. + * + * @param configureSecuritySettingsRequest (required) + * @param _callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body + * object + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
204 Successfully configured the security settings. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public okhttp3.Call configureSecuritySettingsAsync( + ConfigureSecuritySettingsRequest configureSecuritySettingsRequest, + final ApiCallback _callback) + throws ApiException { + + okhttp3.Call localVarCall = + configureSecuritySettingsValidateBeforeCall( + configureSecuritySettingsRequest, _callback); + localVarApiClient.executeAsync(localVarCall, _callback); + return localVarCall; + } + /** + * Build call for getSystemConfig + * + * @param _callback Callback for upload/download progress + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 Cluster config information. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public okhttp3.Call getSystemConfigCall(final ApiCallback _callback) throws ApiException { + String basePath = null; + // Operation Servers + String[] localBasePaths = new String[] {}; + + // Determine Base Path to Use + if (localCustomBaseUrl != null) { + basePath = localCustomBaseUrl; + } else if (localBasePaths.length > 0) { + basePath = localBasePaths[localHostIndex]; + } else { + basePath = null; + } + + Object localVarPostBody = null; + + // create path and map variables + String localVarPath = "/api/rest/2.0/system/config"; + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + final String[] localVarAccepts = {"application/json"}; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = {}; + final String localVarContentType = + localVarApiClient.selectHeaderContentType(localVarContentTypes); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } + + String[] localVarAuthNames = new String[] {"bearerAuth"}; + return localVarApiClient.buildCall( + basePath, + localVarPath, + "GET", + localVarQueryParams, + localVarCollectionQueryParams, + localVarPostBody, + localVarHeaderParams, + localVarCookieParams, + localVarFormParams, + localVarAuthNames, + _callback); + } + + @SuppressWarnings("rawtypes") + private okhttp3.Call getSystemConfigValidateBeforeCall(final ApiCallback _callback) + throws ApiException { + return getSystemConfigCall(_callback); + } + + /** + * Version: 9.0.0.cl or later Retrieves the current configuration details of the cluster. If the + * request is successful, the API returns a list configuration settings applied on the cluster. + * Requires `ADMINISTRATION`(**Can administer ThoughtSpot**) privilege to view these + * complete configuration settings of the cluster. If [Role-Based Access Control + * (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the + * `SYSTEM_INFO_ADMINISTRATION` (**Can view system activities**) privilege is + * required. This API does not require any parameters to be passed in the request. + * + * @return SystemConfig + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the + * response body + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 Cluster config information. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public SystemConfig getSystemConfig() throws ApiException { + ApiResponse localVarResp = getSystemConfigWithHttpInfo(); + return localVarResp.getData(); + } + + /** + * Version: 9.0.0.cl or later Retrieves the current configuration details of the cluster. If the + * request is successful, the API returns a list configuration settings applied on the cluster. + * Requires `ADMINISTRATION`(**Can administer ThoughtSpot**) privilege to view these + * complete configuration settings of the cluster. If [Role-Based Access Control + * (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the + * `SYSTEM_INFO_ADMINISTRATION` (**Can view system activities**) privilege is + * required. This API does not require any parameters to be passed in the request. + * + * @return ApiResponse<SystemConfig> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the + * response body + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 Cluster config information. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public ApiResponse getSystemConfigWithHttpInfo() throws ApiException { + okhttp3.Call localVarCall = getSystemConfigValidateBeforeCall(null); + Type localVarReturnType = new TypeToken() {}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); + } + + /** + * (asynchronously) Version: 9.0.0.cl or later Retrieves the current configuration details of + * the cluster. If the request is successful, the API returns a list configuration settings + * applied on the cluster. Requires `ADMINISTRATION`(**Can administer ThoughtSpot**) + * privilege to view these complete configuration settings of the cluster. If [Role-Based Access + * Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, + * the `SYSTEM_INFO_ADMINISTRATION` (**Can view system activities**) privilege is + * required. This API does not require any parameters to be passed in the request. + * + * @param _callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body + * object + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 Cluster config information. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public okhttp3.Call getSystemConfigAsync(final ApiCallback _callback) + throws ApiException { + + okhttp3.Call localVarCall = getSystemConfigValidateBeforeCall(_callback); + Type localVarReturnType = new TypeToken() {}.getType(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; + } + /** + * Build call for getSystemInformation + * + * @param _callback Callback for upload/download progress + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 Cluster information. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public okhttp3.Call getSystemInformationCall(final ApiCallback _callback) throws ApiException { + String basePath = null; + // Operation Servers + String[] localBasePaths = new String[] {}; + + // Determine Base Path to Use + if (localCustomBaseUrl != null) { + basePath = localCustomBaseUrl; + } else if (localBasePaths.length > 0) { + basePath = localBasePaths[localHostIndex]; + } else { + basePath = null; + } + + Object localVarPostBody = null; + + // create path and map variables + String localVarPath = "/api/rest/2.0/system"; + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + final String[] localVarAccepts = {"application/json"}; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = {}; + final String localVarContentType = + localVarApiClient.selectHeaderContentType(localVarContentTypes); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } + + String[] localVarAuthNames = new String[] {"bearerAuth"}; + return localVarApiClient.buildCall( + basePath, + localVarPath, + "GET", + localVarQueryParams, + localVarCollectionQueryParams, + localVarPostBody, + localVarHeaderParams, + localVarCookieParams, + localVarFormParams, + localVarAuthNames, + _callback); + } + + @SuppressWarnings("rawtypes") + private okhttp3.Call getSystemInformationValidateBeforeCall(final ApiCallback _callback) + throws ApiException { + return getSystemInformationCall(_callback); + } + + /** + * Version: 9.0.0.cl or later Gets system information such as the release version, locale, time + * zone, deployment environment, date format, and date time format of the cluster. Requires + * `ADMINISTRATION` (**Can administer ThoughtSpot**) privileges. If [Role-Based Access + * Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, + * the `SYSTEM_INFO_ADMINISTRATION` (**Can view system activities**) privilege is + * required. This API does not require any parameters to be passed in the request. + * + * @return SystemInfo + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the + * response body + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 Cluster information. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public SystemInfo getSystemInformation() throws ApiException { + ApiResponse localVarResp = getSystemInformationWithHttpInfo(); + return localVarResp.getData(); + } + + /** + * Version: 9.0.0.cl or later Gets system information such as the release version, locale, time + * zone, deployment environment, date format, and date time format of the cluster. Requires + * `ADMINISTRATION` (**Can administer ThoughtSpot**) privileges. If [Role-Based Access + * Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, + * the `SYSTEM_INFO_ADMINISTRATION` (**Can view system activities**) privilege is + * required. This API does not require any parameters to be passed in the request. + * + * @return ApiResponse<SystemInfo> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the + * response body + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 Cluster information. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public ApiResponse getSystemInformationWithHttpInfo() throws ApiException { + okhttp3.Call localVarCall = getSystemInformationValidateBeforeCall(null); + Type localVarReturnType = new TypeToken() {}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); + } + + /** + * (asynchronously) Version: 9.0.0.cl or later Gets system information such as the release + * version, locale, time zone, deployment environment, date format, and date time format of the + * cluster. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privileges. If + * [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled + * on your instance, the `SYSTEM_INFO_ADMINISTRATION` (**Can view system activities**) + * privilege is required. This API does not require any parameters to be passed in the request. + * + * @param _callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body + * object + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 Cluster information. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public okhttp3.Call getSystemInformationAsync(final ApiCallback _callback) + throws ApiException { + + okhttp3.Call localVarCall = getSystemInformationValidateBeforeCall(_callback); + Type localVarReturnType = new TypeToken() {}.getType(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; + } + /** + * Build call for getSystemOverrideInfo + * + * @param _callback Callback for upload/download progress + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 Cluster configuration which can be overridden. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public okhttp3.Call getSystemOverrideInfoCall(final ApiCallback _callback) throws ApiException { + String basePath = null; + // Operation Servers + String[] localBasePaths = new String[] {}; + + // Determine Base Path to Use + if (localCustomBaseUrl != null) { + basePath = localCustomBaseUrl; + } else if (localBasePaths.length > 0) { + basePath = localBasePaths[localHostIndex]; + } else { + basePath = null; + } + + Object localVarPostBody = null; + + // create path and map variables + String localVarPath = "/api/rest/2.0/system/config-overrides"; + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + final String[] localVarAccepts = {"application/json"}; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = {}; + final String localVarContentType = + localVarApiClient.selectHeaderContentType(localVarContentTypes); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } + + String[] localVarAuthNames = new String[] {"bearerAuth"}; + return localVarApiClient.buildCall( + basePath, + localVarPath, + "GET", + localVarQueryParams, + localVarCollectionQueryParams, + localVarPostBody, + localVarHeaderParams, + localVarCookieParams, + localVarFormParams, + localVarAuthNames, + _callback); + } + + @SuppressWarnings("rawtypes") + private okhttp3.Call getSystemOverrideInfoValidateBeforeCall(final ApiCallback _callback) + throws ApiException { + return getSystemOverrideInfoCall(_callback); + } + + /** + * Version: 9.2.0.cl or later Gets a list of configuration overrides applied on the cluster. + * Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If + * [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled + * on your instance, the `APPLICATION_ADMINISTRATION` (**Can manage application + * settings**) privilege is required. This API does not require any parameters to be passed in + * the request. + * + * @return SystemOverrideInfo + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the + * response body + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 Cluster configuration which can be overridden. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public SystemOverrideInfo getSystemOverrideInfo() throws ApiException { + ApiResponse localVarResp = getSystemOverrideInfoWithHttpInfo(); + return localVarResp.getData(); + } + + /** + * Version: 9.2.0.cl or later Gets a list of configuration overrides applied on the cluster. + * Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If + * [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled + * on your instance, the `APPLICATION_ADMINISTRATION` (**Can manage application + * settings**) privilege is required. This API does not require any parameters to be passed in + * the request. + * + * @return ApiResponse<SystemOverrideInfo> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the + * response body + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 Cluster configuration which can be overridden. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public ApiResponse getSystemOverrideInfoWithHttpInfo() throws ApiException { + okhttp3.Call localVarCall = getSystemOverrideInfoValidateBeforeCall(null); + Type localVarReturnType = new TypeToken() {}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); + } + + /** + * (asynchronously) Version: 9.2.0.cl or later Gets a list of configuration overrides applied on + * the cluster. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. + * If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is + * enabled on your instance, the `APPLICATION_ADMINISTRATION` (**Can manage + * application settings**) privilege is required. This API does not require any parameters to be + * passed in the request. + * + * @param _callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body + * object + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 Cluster configuration which can be overridden. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public okhttp3.Call getSystemOverrideInfoAsync(final ApiCallback _callback) + throws ApiException { + + okhttp3.Call localVarCall = getSystemOverrideInfoValidateBeforeCall(_callback); + Type localVarReturnType = new TypeToken() {}.getType(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; + } + /** + * Build call for searchCommunicationChannelPreferences + * + * @param searchCommunicationChannelPreferencesRequest (required) + * @param _callback Callback for upload/download progress + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 Communication channel preferences retrieved successfully. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public okhttp3.Call searchCommunicationChannelPreferencesCall( + SearchCommunicationChannelPreferencesRequest + searchCommunicationChannelPreferencesRequest, + final ApiCallback _callback) + throws ApiException { + String basePath = null; + // Operation Servers + String[] localBasePaths = new String[] {}; + + // Determine Base Path to Use + if (localCustomBaseUrl != null) { + basePath = localCustomBaseUrl; + } else if (localBasePaths.length > 0) { + basePath = localBasePaths[localHostIndex]; + } else { + basePath = null; + } + + Object localVarPostBody = searchCommunicationChannelPreferencesRequest; + + // create path and map variables + String localVarPath = "/api/rest/2.0/system/preferences/communication-channels/search"; + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + final String[] localVarAccepts = {"application/json"}; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = {"application/json"}; + final String localVarContentType = + localVarApiClient.selectHeaderContentType(localVarContentTypes); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } + + String[] localVarAuthNames = new String[] {"bearerAuth"}; + return localVarApiClient.buildCall( + basePath, + localVarPath, + "POST", + localVarQueryParams, + localVarCollectionQueryParams, + localVarPostBody, + localVarHeaderParams, + localVarCookieParams, + localVarFormParams, + localVarAuthNames, + _callback); + } + + @SuppressWarnings("rawtypes") + private okhttp3.Call searchCommunicationChannelPreferencesValidateBeforeCall( + SearchCommunicationChannelPreferencesRequest + searchCommunicationChannelPreferencesRequest, + final ApiCallback _callback) + throws ApiException { + // verify the required parameter 'searchCommunicationChannelPreferencesRequest' is set + if (searchCommunicationChannelPreferencesRequest == null) { + throw new ApiException( + "Missing the required parameter 'searchCommunicationChannelPreferencesRequest'" + + " when calling searchCommunicationChannelPreferences(Async)"); + } + + return searchCommunicationChannelPreferencesCall( + searchCommunicationChannelPreferencesRequest, _callback); + } + + /** + * Version: 10.14.0.cl or later Fetch communication channel preferences. - Use + * `cluster_preferences` to fetch the default preferences for your ThoughtSpot + * application instance. - If your instance has + * [Orgs](https://docs.thoughtspot.com/cloud/latest/orgs-overview), use + * `org_preferences` to fetch any Org-specific preferences that override the defaults. + * Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) or `DEVELOPER` + * (**Has developer privilege**) privilege. If [Role-Based Access Control + * (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, users with + * `APPLICATION_ADMINISTRATION` (**Can manage application settings**) privilege are + * also authorized to perform this action. + * + * @param searchCommunicationChannelPreferencesRequest (required) + * @return CommunicationChannelPreferencesResponse + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the + * response body + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 Communication channel preferences retrieved successfully. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public CommunicationChannelPreferencesResponse searchCommunicationChannelPreferences( + SearchCommunicationChannelPreferencesRequest + searchCommunicationChannelPreferencesRequest) + throws ApiException { + ApiResponse localVarResp = + searchCommunicationChannelPreferencesWithHttpInfo( + searchCommunicationChannelPreferencesRequest); + return localVarResp.getData(); + } + + /** + * Version: 10.14.0.cl or later Fetch communication channel preferences. - Use + * `cluster_preferences` to fetch the default preferences for your ThoughtSpot + * application instance. - If your instance has + * [Orgs](https://docs.thoughtspot.com/cloud/latest/orgs-overview), use + * `org_preferences` to fetch any Org-specific preferences that override the defaults. + * Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) or `DEVELOPER` + * (**Has developer privilege**) privilege. If [Role-Based Access Control + * (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, users with + * `APPLICATION_ADMINISTRATION` (**Can manage application settings**) privilege are + * also authorized to perform this action. + * + * @param searchCommunicationChannelPreferencesRequest (required) + * @return ApiResponse<CommunicationChannelPreferencesResponse> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the + * response body + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 Communication channel preferences retrieved successfully. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public ApiResponse + searchCommunicationChannelPreferencesWithHttpInfo( + SearchCommunicationChannelPreferencesRequest + searchCommunicationChannelPreferencesRequest) + throws ApiException { + okhttp3.Call localVarCall = + searchCommunicationChannelPreferencesValidateBeforeCall( + searchCommunicationChannelPreferencesRequest, null); + Type localVarReturnType = + new TypeToken() {}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); + } + + /** + * (asynchronously) Version: 10.14.0.cl or later Fetch communication channel preferences. - Use + * `cluster_preferences` to fetch the default preferences for your ThoughtSpot + * application instance. - If your instance has + * [Orgs](https://docs.thoughtspot.com/cloud/latest/orgs-overview), use + * `org_preferences` to fetch any Org-specific preferences that override the defaults. + * Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) or `DEVELOPER` + * (**Has developer privilege**) privilege. If [Role-Based Access Control + * (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, users with + * `APPLICATION_ADMINISTRATION` (**Can manage application settings**) privilege are + * also authorized to perform this action. + * + * @param searchCommunicationChannelPreferencesRequest (required) + * @param _callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body + * object + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 Communication channel preferences retrieved successfully. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public okhttp3.Call searchCommunicationChannelPreferencesAsync( + SearchCommunicationChannelPreferencesRequest + searchCommunicationChannelPreferencesRequest, + final ApiCallback _callback) + throws ApiException { + + okhttp3.Call localVarCall = + searchCommunicationChannelPreferencesValidateBeforeCall( + searchCommunicationChannelPreferencesRequest, _callback); + Type localVarReturnType = + new TypeToken() {}.getType(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; + } + /** + * Build call for searchSecuritySettings + * + * @param searchSecuritySettingsRequest (required) + * @param _callback Callback for upload/download progress + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 Successfully retrieved the list of security settings. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public okhttp3.Call searchSecuritySettingsCall( + SearchSecuritySettingsRequest searchSecuritySettingsRequest, + final ApiCallback _callback) + throws ApiException { + String basePath = null; + // Operation Servers + String[] localBasePaths = new String[] {}; + + // Determine Base Path to Use + if (localCustomBaseUrl != null) { + basePath = localCustomBaseUrl; + } else if (localBasePaths.length > 0) { + basePath = localBasePaths[localHostIndex]; + } else { + basePath = null; + } + + Object localVarPostBody = searchSecuritySettingsRequest; + + // create path and map variables + String localVarPath = "/api/rest/2.0/system/security-settings/search"; + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + final String[] localVarAccepts = {"application/json"}; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = {"application/json"}; + final String localVarContentType = + localVarApiClient.selectHeaderContentType(localVarContentTypes); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } + + String[] localVarAuthNames = new String[] {"bearerAuth"}; + return localVarApiClient.buildCall( + basePath, + localVarPath, + "POST", + localVarQueryParams, + localVarCollectionQueryParams, + localVarPostBody, + localVarHeaderParams, + localVarCookieParams, + localVarFormParams, + localVarAuthNames, + _callback); + } + + @SuppressWarnings("rawtypes") + private okhttp3.Call searchSecuritySettingsValidateBeforeCall( + SearchSecuritySettingsRequest searchSecuritySettingsRequest, + final ApiCallback _callback) + throws ApiException { + // verify the required parameter 'searchSecuritySettingsRequest' is set + if (searchSecuritySettingsRequest == null) { + throw new ApiException( + "Missing the required parameter 'searchSecuritySettingsRequest' when calling" + + " searchSecuritySettings(Async)"); + } + + return searchSecuritySettingsCall(searchSecuritySettingsRequest, _callback); + } + + /** + * Version: 26.2.0.cl or later Fetch security settings for your ThoughtSpot application + * instance. - Use `scope: CLUSTER` to retrieve cluster-level security settings, + * including CORS and CSP allowlists, SAML redirect URLs, and settings that control access to + * non-embedded pages. - Use `scope: ORG` to retrieve Org-level security settings. If + * your instance has [Orgs](https://docs.thoughtspot.com/cloud/latest/orgs-overview), this + * returns CORS and non-embed access settings specific to the Org. - If `scope` is not + * specified, returns both cluster and Org-specific settings based on user privileges. Requires + * `ADMINISTRATION` (**Can administer ThoughtSpot**) or `DEVELOPER` (**Has + * developer privilege**) privilege. See [Security + * Settings](https://developers.thoughtspot.com/docs/security-settings) for more details. + * + * @param searchSecuritySettingsRequest (required) + * @return SecuritySettingsResponse + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the + * response body + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 Successfully retrieved the list of security settings. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public SecuritySettingsResponse searchSecuritySettings( + SearchSecuritySettingsRequest searchSecuritySettingsRequest) throws ApiException { + ApiResponse localVarResp = + searchSecuritySettingsWithHttpInfo(searchSecuritySettingsRequest); + return localVarResp.getData(); + } + + /** + * Version: 26.2.0.cl or later Fetch security settings for your ThoughtSpot application + * instance. - Use `scope: CLUSTER` to retrieve cluster-level security settings, + * including CORS and CSP allowlists, SAML redirect URLs, and settings that control access to + * non-embedded pages. - Use `scope: ORG` to retrieve Org-level security settings. If + * your instance has [Orgs](https://docs.thoughtspot.com/cloud/latest/orgs-overview), this + * returns CORS and non-embed access settings specific to the Org. - If `scope` is not + * specified, returns both cluster and Org-specific settings based on user privileges. Requires + * `ADMINISTRATION` (**Can administer ThoughtSpot**) or `DEVELOPER` (**Has + * developer privilege**) privilege. See [Security + * Settings](https://developers.thoughtspot.com/docs/security-settings) for more details. + * + * @param searchSecuritySettingsRequest (required) + * @return ApiResponse<SecuritySettingsResponse> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the + * response body + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 Successfully retrieved the list of security settings. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public ApiResponse searchSecuritySettingsWithHttpInfo( + SearchSecuritySettingsRequest searchSecuritySettingsRequest) throws ApiException { + okhttp3.Call localVarCall = + searchSecuritySettingsValidateBeforeCall(searchSecuritySettingsRequest, null); + Type localVarReturnType = new TypeToken() {}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); + } + + /** + * (asynchronously) Version: 26.2.0.cl or later Fetch security settings for your ThoughtSpot + * application instance. - Use `scope: CLUSTER` to retrieve cluster-level security + * settings, including CORS and CSP allowlists, SAML redirect URLs, and settings that control + * access to non-embedded pages. - Use `scope: ORG` to retrieve Org-level security + * settings. If your instance has + * [Orgs](https://docs.thoughtspot.com/cloud/latest/orgs-overview), this returns CORS and + * non-embed access settings specific to the Org. - If `scope` is not specified, + * returns both cluster and Org-specific settings based on user privileges. Requires + * `ADMINISTRATION` (**Can administer ThoughtSpot**) or `DEVELOPER` (**Has + * developer privilege**) privilege. See [Security + * Settings](https://developers.thoughtspot.com/docs/security-settings) for more details. + * + * @param searchSecuritySettingsRequest (required) + * @param _callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body + * object + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 Successfully retrieved the list of security settings. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public okhttp3.Call searchSecuritySettingsAsync( + SearchSecuritySettingsRequest searchSecuritySettingsRequest, + final ApiCallback _callback) + throws ApiException { + + okhttp3.Call localVarCall = + searchSecuritySettingsValidateBeforeCall(searchSecuritySettingsRequest, _callback); + Type localVarReturnType = new TypeToken() {}.getType(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; + } + /** + * Build call for updateSystemConfig + * + * @param updateSystemConfigRequest (required) + * @param _callback Callback for upload/download progress + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
204 Configuration successfully updated. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public okhttp3.Call updateSystemConfigCall( + UpdateSystemConfigRequest updateSystemConfigRequest, final ApiCallback _callback) + throws ApiException { + String basePath = null; + // Operation Servers + String[] localBasePaths = new String[] {}; + + // Determine Base Path to Use + if (localCustomBaseUrl != null) { + basePath = localCustomBaseUrl; + } else if (localBasePaths.length > 0) { + basePath = localBasePaths[localHostIndex]; + } else { + basePath = null; + } + + Object localVarPostBody = updateSystemConfigRequest; + + // create path and map variables + String localVarPath = "/api/rest/2.0/system/config-update"; + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + final String[] localVarAccepts = {"application/json"}; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = {"application/json"}; + final String localVarContentType = + localVarApiClient.selectHeaderContentType(localVarContentTypes); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } + + String[] localVarAuthNames = new String[] {"bearerAuth"}; + return localVarApiClient.buildCall( + basePath, + localVarPath, + "POST", + localVarQueryParams, + localVarCollectionQueryParams, + localVarPostBody, + localVarHeaderParams, + localVarCookieParams, + localVarFormParams, + localVarAuthNames, + _callback); + } + + @SuppressWarnings("rawtypes") + private okhttp3.Call updateSystemConfigValidateBeforeCall( + UpdateSystemConfigRequest updateSystemConfigRequest, final ApiCallback _callback) + throws ApiException { + // verify the required parameter 'updateSystemConfigRequest' is set + if (updateSystemConfigRequest == null) { + throw new ApiException( + "Missing the required parameter 'updateSystemConfigRequest' when calling" + + " updateSystemConfig(Async)"); + } + + return updateSystemConfigCall(updateSystemConfigRequest, _callback); + } + + /** + * Version: 9.2.0.cl or later Updates the current configuration of the cluster. You must send + * the configuration data in JSON format. Requires `ADMINISTRATION` (**Can administer + * ThoughtSpot**) privileges. If [Role-Based Access Control + * (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the + * `APPLICATION_ADMINISTRATION` (**Can manage application settings**) privilege is + * required. + * + * @param updateSystemConfigRequest (required) + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the + * response body + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
204 Configuration successfully updated. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public void updateSystemConfig(UpdateSystemConfigRequest updateSystemConfigRequest) + throws ApiException { + updateSystemConfigWithHttpInfo(updateSystemConfigRequest); + } + + /** + * Version: 9.2.0.cl or later Updates the current configuration of the cluster. You must send + * the configuration data in JSON format. Requires `ADMINISTRATION` (**Can administer + * ThoughtSpot**) privileges. If [Role-Based Access Control + * (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the + * `APPLICATION_ADMINISTRATION` (**Can manage application settings**) privilege is + * required. + * + * @param updateSystemConfigRequest (required) + * @return ApiResponse<Void> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the + * response body + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
204 Configuration successfully updated. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public ApiResponse updateSystemConfigWithHttpInfo( + UpdateSystemConfigRequest updateSystemConfigRequest) throws ApiException { + okhttp3.Call localVarCall = + updateSystemConfigValidateBeforeCall(updateSystemConfigRequest, null); + return localVarApiClient.execute(localVarCall); + } + + /** + * (asynchronously) Version: 9.2.0.cl or later Updates the current configuration of the cluster. + * You must send the configuration data in JSON format. Requires `ADMINISTRATION` + * (**Can administer ThoughtSpot**) privileges. If [Role-Based Access Control + * (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the + * `APPLICATION_ADMINISTRATION` (**Can manage application settings**) privilege is + * required. + * + * @param updateSystemConfigRequest (required) + * @param _callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body + * object + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
204 Configuration successfully updated. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public okhttp3.Call updateSystemConfigAsync( + UpdateSystemConfigRequest updateSystemConfigRequest, final ApiCallback _callback) + throws ApiException { + + okhttp3.Call localVarCall = + updateSystemConfigValidateBeforeCall(updateSystemConfigRequest, _callback); + localVarApiClient.executeAsync(localVarCall, _callback); + return localVarCall; + } + /** + * Build call for validateCommunicationChannel + * + * @param validateCommunicationChannelRequest (required) + * @param _callback Callback for upload/download progress + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 communication channel configuration validated successfully. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public okhttp3.Call validateCommunicationChannelCall( + ValidateCommunicationChannelRequest validateCommunicationChannelRequest, + final ApiCallback _callback) + throws ApiException { + String basePath = null; + // Operation Servers + String[] localBasePaths = new String[] {}; + + // Determine Base Path to Use + if (localCustomBaseUrl != null) { + basePath = localCustomBaseUrl; + } else if (localBasePaths.length > 0) { + basePath = localBasePaths[localHostIndex]; + } else { + basePath = null; + } + + Object localVarPostBody = validateCommunicationChannelRequest; + + // create path and map variables + String localVarPath = "/api/rest/2.0/system/communication-channels/validate"; + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + final String[] localVarAccepts = {"application/json"}; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = {"application/json"}; + final String localVarContentType = + localVarApiClient.selectHeaderContentType(localVarContentTypes); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } + + String[] localVarAuthNames = new String[] {"bearerAuth"}; + return localVarApiClient.buildCall( + basePath, + localVarPath, + "POST", + localVarQueryParams, + localVarCollectionQueryParams, + localVarPostBody, + localVarHeaderParams, + localVarCookieParams, + localVarFormParams, + localVarAuthNames, + _callback); + } + + @SuppressWarnings("rawtypes") + private okhttp3.Call validateCommunicationChannelValidateBeforeCall( + ValidateCommunicationChannelRequest validateCommunicationChannelRequest, + final ApiCallback _callback) + throws ApiException { + // verify the required parameter 'validateCommunicationChannelRequest' is set + if (validateCommunicationChannelRequest == null) { + throw new ApiException( + "Missing the required parameter 'validateCommunicationChannelRequest' when" + + " calling validateCommunicationChannel(Async)"); + } + + return validateCommunicationChannelCall(validateCommunicationChannelRequest, _callback); + } + + /** + * Version: 26.4.0.cl or later Validates a communication channel configuration to ensure it is + * properly set up and can receive events. - Use `channel_type` to specify the type of + * communication channel to validate (e.g., WEBHOOK). - Use `channel_identifier` to + * provide the unique identifier or name for the communication channel. - Use + * `event_type` to specify the event type to validate for this channel. Requires + * `ADMINISTRATION` (**Can administer ThoughtSpot**) or `DEVELOPER` (**Has + * developer privilege**) privilege. For webhook channels, users with + * `CAN_MANAGE_WEBHOOKS` (**Can manage webhooks**) privilege are also authorized to + * perform this action. + * + * @param validateCommunicationChannelRequest (required) + * @return CommunicationChannelValidateResponse + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the + * response body + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 communication channel configuration validated successfully. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public CommunicationChannelValidateResponse validateCommunicationChannel( + ValidateCommunicationChannelRequest validateCommunicationChannelRequest) + throws ApiException { + ApiResponse localVarResp = + validateCommunicationChannelWithHttpInfo(validateCommunicationChannelRequest); + return localVarResp.getData(); + } + + /** + * Version: 26.4.0.cl or later Validates a communication channel configuration to ensure it is + * properly set up and can receive events. - Use `channel_type` to specify the type of + * communication channel to validate (e.g., WEBHOOK). - Use `channel_identifier` to + * provide the unique identifier or name for the communication channel. - Use + * `event_type` to specify the event type to validate for this channel. Requires + * `ADMINISTRATION` (**Can administer ThoughtSpot**) or `DEVELOPER` (**Has + * developer privilege**) privilege. For webhook channels, users with + * `CAN_MANAGE_WEBHOOKS` (**Can manage webhooks**) privilege are also authorized to + * perform this action. + * + * @param validateCommunicationChannelRequest (required) + * @return ApiResponse<CommunicationChannelValidateResponse> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the + * response body + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 communication channel configuration validated successfully. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public ApiResponse + validateCommunicationChannelWithHttpInfo( + ValidateCommunicationChannelRequest validateCommunicationChannelRequest) + throws ApiException { + okhttp3.Call localVarCall = + validateCommunicationChannelValidateBeforeCall( + validateCommunicationChannelRequest, null); + Type localVarReturnType = + new TypeToken() {}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); + } + + /** + * (asynchronously) Version: 26.4.0.cl or later Validates a communication channel configuration + * to ensure it is properly set up and can receive events. - Use `channel_type` to + * specify the type of communication channel to validate (e.g., WEBHOOK). - Use + * `channel_identifier` to provide the unique identifier or name for the communication + * channel. - Use `event_type` to specify the event type to validate for this channel. + * Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) or `DEVELOPER` + * (**Has developer privilege**) privilege. For webhook channels, users with + * `CAN_MANAGE_WEBHOOKS` (**Can manage webhooks**) privilege are also authorized to + * perform this action. + * + * @param validateCommunicationChannelRequest (required) + * @param _callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body + * object + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 communication channel configuration validated successfully. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public okhttp3.Call validateCommunicationChannelAsync( + ValidateCommunicationChannelRequest validateCommunicationChannelRequest, + final ApiCallback _callback) + throws ApiException { + + okhttp3.Call localVarCall = + validateCommunicationChannelValidateBeforeCall( + validateCommunicationChannelRequest, _callback); + Type localVarReturnType = + new TypeToken() {}.getType(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; + } +} diff --git a/sdks/java/src/main/java/com/thoughtspot/client/api/TagsApi.java b/sdks/java/src/main/java/com/thoughtspot/client/api/TagsApi.java new file mode 100644 index 000000000..b7e009ae7 --- /dev/null +++ b/sdks/java/src/main/java/com/thoughtspot/client/api/TagsApi.java @@ -0,0 +1,1117 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client.api; + +import com.google.gson.reflect.TypeToken; +import com.thoughtspot.client.ApiCallback; +import com.thoughtspot.client.ApiClient; +import com.thoughtspot.client.ApiClientConfiguration; +import com.thoughtspot.client.ApiException; +import com.thoughtspot.client.ApiResponse; +import com.thoughtspot.client.Configuration; +import com.thoughtspot.client.Pair; +import com.thoughtspot.client.model.AssignTagRequest; +import com.thoughtspot.client.model.CreateTagRequest; +import com.thoughtspot.client.model.SearchTagsRequest; +import com.thoughtspot.client.model.Tag; +import com.thoughtspot.client.model.UnassignTagRequest; +import com.thoughtspot.client.model.UpdateTagRequest; +import java.lang.reflect.Type; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +@javax.annotation.Generated( + value = "org.openapitools.codegen.languages.JavaClientCodegen", + comments = "Generator version: 7.12.0") +public class TagsApi { + private ApiClient localVarApiClient; + private ApiClientConfiguration localVarApiClientConfiguration; + private int localHostIndex; + private String localCustomBaseUrl; + + public TagsApi() { + this(Configuration.getDefaultApiClient()); + } + + public TagsApi(ApiClient apiClient) { + this.localVarApiClient = apiClient; + } + + public TagsApi(ApiClientConfiguration apiClientConfiguration) { + this.localVarApiClientConfiguration = apiClientConfiguration; + this.localVarApiClient = new ApiClient(apiClientConfiguration); + } + + public ApiClient getApiClient() { + return localVarApiClient; + } + + public void setApiClient(ApiClient apiClient) { + this.localVarApiClient = apiClient; + } + + public ApiClientConfiguration getApiClientConfiguration() { + return localVarApiClientConfiguration; + } + + public void applyApiClientConfiguration(ApiClientConfiguration apiClientConfiguration) { + this.localVarApiClientConfiguration = apiClientConfiguration; + if (localVarApiClient != null) { + localVarApiClient.applyApiClientConfiguration(apiClientConfiguration); + } else { + localVarApiClient = new ApiClient(apiClientConfiguration); + } + } + + public int getHostIndex() { + return localHostIndex; + } + + public void setHostIndex(int hostIndex) { + this.localHostIndex = hostIndex; + } + + public String getCustomBaseUrl() { + return localCustomBaseUrl; + } + + public void setCustomBaseUrl(String customBaseUrl) { + this.localCustomBaseUrl = customBaseUrl; + } + + /** + * Build call for assignTag + * + * @param assignTagRequest (required) + * @param _callback Callback for upload/download progress + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
204 Tags successfully assigned. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public okhttp3.Call assignTagCall( + AssignTagRequest assignTagRequest, final ApiCallback _callback) throws ApiException { + String basePath = null; + // Operation Servers + String[] localBasePaths = new String[] {}; + + // Determine Base Path to Use + if (localCustomBaseUrl != null) { + basePath = localCustomBaseUrl; + } else if (localBasePaths.length > 0) { + basePath = localBasePaths[localHostIndex]; + } else { + basePath = null; + } + + Object localVarPostBody = assignTagRequest; + + // create path and map variables + String localVarPath = "/api/rest/2.0/tags/assign"; + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + final String[] localVarAccepts = {"application/json"}; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = {"application/json"}; + final String localVarContentType = + localVarApiClient.selectHeaderContentType(localVarContentTypes); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } + + String[] localVarAuthNames = new String[] {"bearerAuth"}; + return localVarApiClient.buildCall( + basePath, + localVarPath, + "POST", + localVarQueryParams, + localVarCollectionQueryParams, + localVarPostBody, + localVarHeaderParams, + localVarCookieParams, + localVarFormParams, + localVarAuthNames, + _callback); + } + + @SuppressWarnings("rawtypes") + private okhttp3.Call assignTagValidateBeforeCall( + AssignTagRequest assignTagRequest, final ApiCallback _callback) throws ApiException { + // verify the required parameter 'assignTagRequest' is set + if (assignTagRequest == null) { + throw new ApiException( + "Missing the required parameter 'assignTagRequest' when calling" + + " assignTag(Async)"); + } + + return assignTagCall(assignTagRequest, _callback); + } + + /** + * Version: 9.0.0.cl or later Assigns tags to Liveboards, Answers, Tables, and Worksheets. + * Requires edit access to the metadata object. + * + * @param assignTagRequest (required) + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the + * response body + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
204 Tags successfully assigned. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public void assignTag(AssignTagRequest assignTagRequest) throws ApiException { + assignTagWithHttpInfo(assignTagRequest); + } + + /** + * Version: 9.0.0.cl or later Assigns tags to Liveboards, Answers, Tables, and Worksheets. + * Requires edit access to the metadata object. + * + * @param assignTagRequest (required) + * @return ApiResponse<Void> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the + * response body + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
204 Tags successfully assigned. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public ApiResponse assignTagWithHttpInfo(AssignTagRequest assignTagRequest) + throws ApiException { + okhttp3.Call localVarCall = assignTagValidateBeforeCall(assignTagRequest, null); + return localVarApiClient.execute(localVarCall); + } + + /** + * (asynchronously) Version: 9.0.0.cl or later Assigns tags to Liveboards, Answers, Tables, and + * Worksheets. Requires edit access to the metadata object. + * + * @param assignTagRequest (required) + * @param _callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body + * object + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
204 Tags successfully assigned. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public okhttp3.Call assignTagAsync( + AssignTagRequest assignTagRequest, final ApiCallback _callback) + throws ApiException { + + okhttp3.Call localVarCall = assignTagValidateBeforeCall(assignTagRequest, _callback); + localVarApiClient.executeAsync(localVarCall, _callback); + return localVarCall; + } + /** + * Build call for createTag + * + * @param createTagRequest (required) + * @param _callback Callback for upload/download progress + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 Tag successfully created. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public okhttp3.Call createTagCall( + CreateTagRequest createTagRequest, final ApiCallback _callback) throws ApiException { + String basePath = null; + // Operation Servers + String[] localBasePaths = new String[] {}; + + // Determine Base Path to Use + if (localCustomBaseUrl != null) { + basePath = localCustomBaseUrl; + } else if (localBasePaths.length > 0) { + basePath = localBasePaths[localHostIndex]; + } else { + basePath = null; + } + + Object localVarPostBody = createTagRequest; + + // create path and map variables + String localVarPath = "/api/rest/2.0/tags/create"; + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + final String[] localVarAccepts = {"application/json"}; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = {"application/json"}; + final String localVarContentType = + localVarApiClient.selectHeaderContentType(localVarContentTypes); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } + + String[] localVarAuthNames = new String[] {"bearerAuth"}; + return localVarApiClient.buildCall( + basePath, + localVarPath, + "POST", + localVarQueryParams, + localVarCollectionQueryParams, + localVarPostBody, + localVarHeaderParams, + localVarCookieParams, + localVarFormParams, + localVarAuthNames, + _callback); + } + + @SuppressWarnings("rawtypes") + private okhttp3.Call createTagValidateBeforeCall( + CreateTagRequest createTagRequest, final ApiCallback _callback) throws ApiException { + // verify the required parameter 'createTagRequest' is set + if (createTagRequest == null) { + throw new ApiException( + "Missing the required parameter 'createTagRequest' when calling" + + " createTag(Async)"); + } + + return createTagCall(createTagRequest, _callback); + } + + /** + * Version: 9.0.0.cl or later Creates a tag object. Tags are labels that identify a metadata + * object. For example, you can create a tag to designate subject areas, such as sales, HR, + * marketing, and finance. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) + * privilege. If [Role-Based Access Control + * (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the + * `TAGMANAGEMENT` (**Can manage tags**) privilege is required to create, edit, and + * delete tags. + * + * @param createTagRequest (required) + * @return Tag + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the + * response body + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 Tag successfully created. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public Tag createTag(CreateTagRequest createTagRequest) throws ApiException { + ApiResponse localVarResp = createTagWithHttpInfo(createTagRequest); + return localVarResp.getData(); + } + + /** + * Version: 9.0.0.cl or later Creates a tag object. Tags are labels that identify a metadata + * object. For example, you can create a tag to designate subject areas, such as sales, HR, + * marketing, and finance. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) + * privilege. If [Role-Based Access Control + * (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the + * `TAGMANAGEMENT` (**Can manage tags**) privilege is required to create, edit, and + * delete tags. + * + * @param createTagRequest (required) + * @return ApiResponse<Tag> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the + * response body + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 Tag successfully created. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public ApiResponse createTagWithHttpInfo(CreateTagRequest createTagRequest) + throws ApiException { + okhttp3.Call localVarCall = createTagValidateBeforeCall(createTagRequest, null); + Type localVarReturnType = new TypeToken() {}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); + } + + /** + * (asynchronously) Version: 9.0.0.cl or later Creates a tag object. Tags are labels that + * identify a metadata object. For example, you can create a tag to designate subject areas, + * such as sales, HR, marketing, and finance. Requires `ADMINISTRATION` (**Can + * administer ThoughtSpot**) privilege. If [Role-Based Access Control + * (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the + * `TAGMANAGEMENT` (**Can manage tags**) privilege is required to create, edit, and + * delete tags. + * + * @param createTagRequest (required) + * @param _callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body + * object + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 Tag successfully created. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public okhttp3.Call createTagAsync( + CreateTagRequest createTagRequest, final ApiCallback _callback) + throws ApiException { + + okhttp3.Call localVarCall = createTagValidateBeforeCall(createTagRequest, _callback); + Type localVarReturnType = new TypeToken() {}.getType(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; + } + /** + * Build call for deleteTag + * + * @param tagIdentifier Tag identifier Tag name or Tag id. (required) + * @param _callback Callback for upload/download progress + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
204 Tag successfully deleted. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public okhttp3.Call deleteTagCall(String tagIdentifier, final ApiCallback _callback) + throws ApiException { + String basePath = null; + // Operation Servers + String[] localBasePaths = new String[] {}; + + // Determine Base Path to Use + if (localCustomBaseUrl != null) { + basePath = localCustomBaseUrl; + } else if (localBasePaths.length > 0) { + basePath = localBasePaths[localHostIndex]; + } else { + basePath = null; + } + + Object localVarPostBody = null; + + // create path and map variables + String localVarPath = + "/api/rest/2.0/tags/{tag_identifier}/delete" + .replace( + "{" + "tag_identifier" + "}", + localVarApiClient.escapeString(tagIdentifier.toString())); + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + final String[] localVarAccepts = {"application/json"}; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = {}; + final String localVarContentType = + localVarApiClient.selectHeaderContentType(localVarContentTypes); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } + + String[] localVarAuthNames = new String[] {"bearerAuth"}; + return localVarApiClient.buildCall( + basePath, + localVarPath, + "POST", + localVarQueryParams, + localVarCollectionQueryParams, + localVarPostBody, + localVarHeaderParams, + localVarCookieParams, + localVarFormParams, + localVarAuthNames, + _callback); + } + + @SuppressWarnings("rawtypes") + private okhttp3.Call deleteTagValidateBeforeCall( + String tagIdentifier, final ApiCallback _callback) throws ApiException { + // verify the required parameter 'tagIdentifier' is set + if (tagIdentifier == null) { + throw new ApiException( + "Missing the required parameter 'tagIdentifier' when calling deleteTag(Async)"); + } + + return deleteTagCall(tagIdentifier, _callback); + } + + /** + * Version: 9.0.0.cl or later Deletes a tag object from the ThoughtSpot system Requires + * `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access + * Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, + * the `TAGMANAGEMENT` (**Can manage tags**) privilege is required to create, edit, + * and delete tags. + * + * @param tagIdentifier Tag identifier Tag name or Tag id. (required) + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the + * response body + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
204 Tag successfully deleted. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public void deleteTag(String tagIdentifier) throws ApiException { + deleteTagWithHttpInfo(tagIdentifier); + } + + /** + * Version: 9.0.0.cl or later Deletes a tag object from the ThoughtSpot system Requires + * `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access + * Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, + * the `TAGMANAGEMENT` (**Can manage tags**) privilege is required to create, edit, + * and delete tags. + * + * @param tagIdentifier Tag identifier Tag name or Tag id. (required) + * @return ApiResponse<Void> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the + * response body + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
204 Tag successfully deleted. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public ApiResponse deleteTagWithHttpInfo(String tagIdentifier) throws ApiException { + okhttp3.Call localVarCall = deleteTagValidateBeforeCall(tagIdentifier, null); + return localVarApiClient.execute(localVarCall); + } + + /** + * (asynchronously) Version: 9.0.0.cl or later Deletes a tag object from the ThoughtSpot system + * Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If + * [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled + * on your instance, the `TAGMANAGEMENT` (**Can manage tags**) privilege is required + * to create, edit, and delete tags. + * + * @param tagIdentifier Tag identifier Tag name or Tag id. (required) + * @param _callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body + * object + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
204 Tag successfully deleted. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public okhttp3.Call deleteTagAsync(String tagIdentifier, final ApiCallback _callback) + throws ApiException { + + okhttp3.Call localVarCall = deleteTagValidateBeforeCall(tagIdentifier, _callback); + localVarApiClient.executeAsync(localVarCall, _callback); + return localVarCall; + } + /** + * Build call for searchTags + * + * @param searchTagsRequest (required) + * @param _callback Callback for upload/download progress + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 Tags search result. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public okhttp3.Call searchTagsCall( + SearchTagsRequest searchTagsRequest, final ApiCallback _callback) throws ApiException { + String basePath = null; + // Operation Servers + String[] localBasePaths = new String[] {}; + + // Determine Base Path to Use + if (localCustomBaseUrl != null) { + basePath = localCustomBaseUrl; + } else if (localBasePaths.length > 0) { + basePath = localBasePaths[localHostIndex]; + } else { + basePath = null; + } + + Object localVarPostBody = searchTagsRequest; + + // create path and map variables + String localVarPath = "/api/rest/2.0/tags/search"; + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + final String[] localVarAccepts = {"application/json"}; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = {"application/json"}; + final String localVarContentType = + localVarApiClient.selectHeaderContentType(localVarContentTypes); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } + + String[] localVarAuthNames = new String[] {"bearerAuth"}; + return localVarApiClient.buildCall( + basePath, + localVarPath, + "POST", + localVarQueryParams, + localVarCollectionQueryParams, + localVarPostBody, + localVarHeaderParams, + localVarCookieParams, + localVarFormParams, + localVarAuthNames, + _callback); + } + + @SuppressWarnings("rawtypes") + private okhttp3.Call searchTagsValidateBeforeCall( + SearchTagsRequest searchTagsRequest, final ApiCallback _callback) throws ApiException { + // verify the required parameter 'searchTagsRequest' is set + if (searchTagsRequest == null) { + throw new ApiException( + "Missing the required parameter 'searchTagsRequest' when calling" + + " searchTags(Async)"); + } + + return searchTagsCall(searchTagsRequest, _callback); + } + + /** + * Version: 9.0.0.cl or later Gets a list of tag objects available on the ThoughtSpot system. To + * get details of a specific tag object, specify the GUID or name. Any authenticated user can + * search for tag objects. + * + * @param searchTagsRequest (required) + * @return List<Tag> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the + * response body + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 Tags search result. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public List searchTags(SearchTagsRequest searchTagsRequest) throws ApiException { + ApiResponse> localVarResp = searchTagsWithHttpInfo(searchTagsRequest); + return localVarResp.getData(); + } + + /** + * Version: 9.0.0.cl or later Gets a list of tag objects available on the ThoughtSpot system. To + * get details of a specific tag object, specify the GUID or name. Any authenticated user can + * search for tag objects. + * + * @param searchTagsRequest (required) + * @return ApiResponse<List<Tag>> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the + * response body + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 Tags search result. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public ApiResponse> searchTagsWithHttpInfo(SearchTagsRequest searchTagsRequest) + throws ApiException { + okhttp3.Call localVarCall = searchTagsValidateBeforeCall(searchTagsRequest, null); + Type localVarReturnType = new TypeToken>() {}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); + } + + /** + * (asynchronously) Version: 9.0.0.cl or later Gets a list of tag objects available on the + * ThoughtSpot system. To get details of a specific tag object, specify the GUID or name. Any + * authenticated user can search for tag objects. + * + * @param searchTagsRequest (required) + * @param _callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body + * object + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 Tags search result. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public okhttp3.Call searchTagsAsync( + SearchTagsRequest searchTagsRequest, final ApiCallback> _callback) + throws ApiException { + + okhttp3.Call localVarCall = searchTagsValidateBeforeCall(searchTagsRequest, _callback); + Type localVarReturnType = new TypeToken>() {}.getType(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; + } + /** + * Build call for unassignTag + * + * @param unassignTagRequest (required) + * @param _callback Callback for upload/download progress + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
204 Tags successfully unassigned. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public okhttp3.Call unassignTagCall( + UnassignTagRequest unassignTagRequest, final ApiCallback _callback) + throws ApiException { + String basePath = null; + // Operation Servers + String[] localBasePaths = new String[] {}; + + // Determine Base Path to Use + if (localCustomBaseUrl != null) { + basePath = localCustomBaseUrl; + } else if (localBasePaths.length > 0) { + basePath = localBasePaths[localHostIndex]; + } else { + basePath = null; + } + + Object localVarPostBody = unassignTagRequest; + + // create path and map variables + String localVarPath = "/api/rest/2.0/tags/unassign"; + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + final String[] localVarAccepts = {"application/json"}; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = {"application/json"}; + final String localVarContentType = + localVarApiClient.selectHeaderContentType(localVarContentTypes); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } + + String[] localVarAuthNames = new String[] {"bearerAuth"}; + return localVarApiClient.buildCall( + basePath, + localVarPath, + "POST", + localVarQueryParams, + localVarCollectionQueryParams, + localVarPostBody, + localVarHeaderParams, + localVarCookieParams, + localVarFormParams, + localVarAuthNames, + _callback); + } + + @SuppressWarnings("rawtypes") + private okhttp3.Call unassignTagValidateBeforeCall( + UnassignTagRequest unassignTagRequest, final ApiCallback _callback) + throws ApiException { + // verify the required parameter 'unassignTagRequest' is set + if (unassignTagRequest == null) { + throw new ApiException( + "Missing the required parameter 'unassignTagRequest' when calling" + + " unassignTag(Async)"); + } + + return unassignTagCall(unassignTagRequest, _callback); + } + + /** + * Version: 9.0.0.cl or later Removes the tags applied to a Liveboard, Answer, Table, or + * Worksheet. Requires edit access to the metadata object. + * + * @param unassignTagRequest (required) + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the + * response body + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
204 Tags successfully unassigned. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public void unassignTag(UnassignTagRequest unassignTagRequest) throws ApiException { + unassignTagWithHttpInfo(unassignTagRequest); + } + + /** + * Version: 9.0.0.cl or later Removes the tags applied to a Liveboard, Answer, Table, or + * Worksheet. Requires edit access to the metadata object. + * + * @param unassignTagRequest (required) + * @return ApiResponse<Void> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the + * response body + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
204 Tags successfully unassigned. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public ApiResponse unassignTagWithHttpInfo(UnassignTagRequest unassignTagRequest) + throws ApiException { + okhttp3.Call localVarCall = unassignTagValidateBeforeCall(unassignTagRequest, null); + return localVarApiClient.execute(localVarCall); + } + + /** + * (asynchronously) Version: 9.0.0.cl or later Removes the tags applied to a Liveboard, Answer, + * Table, or Worksheet. Requires edit access to the metadata object. + * + * @param unassignTagRequest (required) + * @param _callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body + * object + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
204 Tags successfully unassigned. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public okhttp3.Call unassignTagAsync( + UnassignTagRequest unassignTagRequest, final ApiCallback _callback) + throws ApiException { + + okhttp3.Call localVarCall = unassignTagValidateBeforeCall(unassignTagRequest, _callback); + localVarApiClient.executeAsync(localVarCall, _callback); + return localVarCall; + } + /** + * Build call for updateTag + * + * @param tagIdentifier Name or Id of the tag. (required) + * @param updateTagRequest (required) + * @param _callback Callback for upload/download progress + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
204 Tag successfully updated. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public okhttp3.Call updateTagCall( + String tagIdentifier, UpdateTagRequest updateTagRequest, final ApiCallback _callback) + throws ApiException { + String basePath = null; + // Operation Servers + String[] localBasePaths = new String[] {}; + + // Determine Base Path to Use + if (localCustomBaseUrl != null) { + basePath = localCustomBaseUrl; + } else if (localBasePaths.length > 0) { + basePath = localBasePaths[localHostIndex]; + } else { + basePath = null; + } + + Object localVarPostBody = updateTagRequest; + + // create path and map variables + String localVarPath = + "/api/rest/2.0/tags/{tag_identifier}/update" + .replace( + "{" + "tag_identifier" + "}", + localVarApiClient.escapeString(tagIdentifier.toString())); + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + final String[] localVarAccepts = {"application/json"}; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = {"application/json"}; + final String localVarContentType = + localVarApiClient.selectHeaderContentType(localVarContentTypes); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } + + String[] localVarAuthNames = new String[] {"bearerAuth"}; + return localVarApiClient.buildCall( + basePath, + localVarPath, + "POST", + localVarQueryParams, + localVarCollectionQueryParams, + localVarPostBody, + localVarHeaderParams, + localVarCookieParams, + localVarFormParams, + localVarAuthNames, + _callback); + } + + @SuppressWarnings("rawtypes") + private okhttp3.Call updateTagValidateBeforeCall( + String tagIdentifier, UpdateTagRequest updateTagRequest, final ApiCallback _callback) + throws ApiException { + // verify the required parameter 'tagIdentifier' is set + if (tagIdentifier == null) { + throw new ApiException( + "Missing the required parameter 'tagIdentifier' when calling updateTag(Async)"); + } + + // verify the required parameter 'updateTagRequest' is set + if (updateTagRequest == null) { + throw new ApiException( + "Missing the required parameter 'updateTagRequest' when calling" + + " updateTag(Async)"); + } + + return updateTagCall(tagIdentifier, updateTagRequest, _callback); + } + + /** + * Version: 9.0.0.cl or later Updates a tag object. You can modify the `name` and + * `color` properties of a tag object. Requires `ADMINISTRATION` (**Can + * administer ThoughtSpot**) privilege. If [Role-Based Access Control + * (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the + * `TAGMANAGEMENT` (**Can manage tags**) privilege is required to create, edit, and + * delete tags. + * + * @param tagIdentifier Name or Id of the tag. (required) + * @param updateTagRequest (required) + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the + * response body + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
204 Tag successfully updated. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public void updateTag(String tagIdentifier, UpdateTagRequest updateTagRequest) + throws ApiException { + updateTagWithHttpInfo(tagIdentifier, updateTagRequest); + } + + /** + * Version: 9.0.0.cl or later Updates a tag object. You can modify the `name` and + * `color` properties of a tag object. Requires `ADMINISTRATION` (**Can + * administer ThoughtSpot**) privilege. If [Role-Based Access Control + * (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the + * `TAGMANAGEMENT` (**Can manage tags**) privilege is required to create, edit, and + * delete tags. + * + * @param tagIdentifier Name or Id of the tag. (required) + * @param updateTagRequest (required) + * @return ApiResponse<Void> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the + * response body + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
204 Tag successfully updated. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public ApiResponse updateTagWithHttpInfo( + String tagIdentifier, UpdateTagRequest updateTagRequest) throws ApiException { + okhttp3.Call localVarCall = + updateTagValidateBeforeCall(tagIdentifier, updateTagRequest, null); + return localVarApiClient.execute(localVarCall); + } + + /** + * (asynchronously) Version: 9.0.0.cl or later Updates a tag object. You can modify the + * `name` and `color` properties of a tag object. Requires + * `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access + * Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, + * the `TAGMANAGEMENT` (**Can manage tags**) privilege is required to create, edit, + * and delete tags. + * + * @param tagIdentifier Name or Id of the tag. (required) + * @param updateTagRequest (required) + * @param _callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body + * object + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
204 Tag successfully updated. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public okhttp3.Call updateTagAsync( + String tagIdentifier, + UpdateTagRequest updateTagRequest, + final ApiCallback _callback) + throws ApiException { + + okhttp3.Call localVarCall = + updateTagValidateBeforeCall(tagIdentifier, updateTagRequest, _callback); + localVarApiClient.executeAsync(localVarCall, _callback); + return localVarCall; + } +} diff --git a/sdks/java/src/main/java/com/thoughtspot/client/api/ThoughtSpotRestApi.java b/sdks/java/src/main/java/com/thoughtspot/client/api/ThoughtSpotRestApi.java new file mode 100644 index 000000000..8c9756657 --- /dev/null +++ b/sdks/java/src/main/java/com/thoughtspot/client/api/ThoughtSpotRestApi.java @@ -0,0 +1,34523 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client.api; + +import com.google.gson.reflect.TypeToken; +import com.thoughtspot.client.ApiCallback; +import com.thoughtspot.client.ApiClient; +import com.thoughtspot.client.ApiClientConfiguration; +import com.thoughtspot.client.ApiException; +import com.thoughtspot.client.ApiResponse; +import com.thoughtspot.client.Configuration; +import com.thoughtspot.client.Pair; +import com.thoughtspot.client.model.AccessToken; +import com.thoughtspot.client.model.ActivateUserRequest; +import com.thoughtspot.client.model.AgentConversation; +import com.thoughtspot.client.model.AnswerDataResponse; +import com.thoughtspot.client.model.AssignChangeAuthorRequest; +import com.thoughtspot.client.model.AssignTagRequest; +import com.thoughtspot.client.model.CalendarResponse; +import com.thoughtspot.client.model.ChangeUserPasswordRequest; +import com.thoughtspot.client.model.Collection; +import com.thoughtspot.client.model.CollectionDeleteResponse; +import com.thoughtspot.client.model.CollectionSearchResponse; +import com.thoughtspot.client.model.ColumnSecurityRuleResponse; +import com.thoughtspot.client.model.CommitBranchRequest; +import com.thoughtspot.client.model.CommitHistoryResponse; +import com.thoughtspot.client.model.CommitResponse; +import com.thoughtspot.client.model.CommunicationChannelPreferencesResponse; +import com.thoughtspot.client.model.CommunicationChannelValidateResponse; +import com.thoughtspot.client.model.ConfigureAuthSettingsRequest; +import com.thoughtspot.client.model.ConfigureCommunicationChannelPreferencesRequest; +import com.thoughtspot.client.model.ConfigureSecuritySettingsRequest; +import com.thoughtspot.client.model.ConnectionConfigurationResponse; +import com.thoughtspot.client.model.ConnectionConfigurationSearchRequest; +import com.thoughtspot.client.model.Conversation; +import com.thoughtspot.client.model.ConvertWorksheetToModelRequest; +import com.thoughtspot.client.model.CopyObjectRequest; +import com.thoughtspot.client.model.CreateAgentConversationRequest; +import com.thoughtspot.client.model.CreateCalendarRequest; +import com.thoughtspot.client.model.CreateCollectionRequest; +import com.thoughtspot.client.model.CreateConfigRequest; +import com.thoughtspot.client.model.CreateConnectionConfigurationRequest; +import com.thoughtspot.client.model.CreateConnectionRequest; +import com.thoughtspot.client.model.CreateConnectionResponse; +import com.thoughtspot.client.model.CreateConversationRequest; +import com.thoughtspot.client.model.CreateCustomActionRequest; +import com.thoughtspot.client.model.CreateEmailCustomizationRequest; +import com.thoughtspot.client.model.CreateEmailCustomizationResponse; +import com.thoughtspot.client.model.CreateOrgRequest; +import com.thoughtspot.client.model.CreateRoleRequest; +import com.thoughtspot.client.model.CreateScheduleRequest; +import com.thoughtspot.client.model.CreateTagRequest; +import com.thoughtspot.client.model.CreateUserGroupRequest; +import com.thoughtspot.client.model.CreateUserRequest; +import com.thoughtspot.client.model.CreateVariableRequest; +import com.thoughtspot.client.model.CreateWebhookConfigurationRequest; +import com.thoughtspot.client.model.DbtSearchResponse; +import com.thoughtspot.client.model.DeactivateUserRequest; +import com.thoughtspot.client.model.DeleteCollectionRequest; +import com.thoughtspot.client.model.DeleteConfigRequest; +import com.thoughtspot.client.model.DeleteConnectionConfigurationRequest; +import com.thoughtspot.client.model.DeleteConnectionRequest; +import com.thoughtspot.client.model.DeleteMetadataRequest; +import com.thoughtspot.client.model.DeleteOrgEmailCustomizationRequest; +import com.thoughtspot.client.model.DeleteVariablesRequest; +import com.thoughtspot.client.model.DeleteWebhookConfigurationsRequest; +import com.thoughtspot.client.model.DeployCommitRequest; +import com.thoughtspot.client.model.DeployResponse; +import com.thoughtspot.client.model.EurekaDataSourceSuggestionResponse; +import com.thoughtspot.client.model.EurekaDecomposeQueryResponse; +import com.thoughtspot.client.model.EurekaGetNLInstructionsResponse; +import com.thoughtspot.client.model.EurekaGetRelevantQuestionsResponse; +import com.thoughtspot.client.model.EurekaSetNLInstructionsResponse; +import com.thoughtspot.client.model.ExportAnswerReportRequest; +import com.thoughtspot.client.model.ExportLiveboardReportRequest; +import com.thoughtspot.client.model.ExportMetadataTMLBatchedRequest; +import com.thoughtspot.client.model.ExportMetadataTMLRequest; +import com.thoughtspot.client.model.FetchAnswerDataRequest; +import com.thoughtspot.client.model.FetchAnswerSqlQueryRequest; +import com.thoughtspot.client.model.FetchAsyncImportTaskStatusRequest; +import com.thoughtspot.client.model.FetchColumnSecurityRulesRequest; +import com.thoughtspot.client.model.FetchConnectionDiffStatusResponse; +import com.thoughtspot.client.model.FetchLiveboardDataRequest; +import com.thoughtspot.client.model.FetchLiveboardSqlQueryRequest; +import com.thoughtspot.client.model.FetchLogsRequest; +import com.thoughtspot.client.model.FetchObjectPrivilegesRequest; +import com.thoughtspot.client.model.FetchPermissionsOfPrincipalsRequest; +import com.thoughtspot.client.model.FetchPermissionsOnMetadataRequest; +import com.thoughtspot.client.model.ForceLogoutUsersRequest; +import com.thoughtspot.client.model.GenerateCSVRequest; +import com.thoughtspot.client.model.GetAsyncImportStatusResponse; +import com.thoughtspot.client.model.GetCustomAccessTokenRequest; +import com.thoughtspot.client.model.GetDataSourceSuggestionsRequest; +import com.thoughtspot.client.model.GetFullAccessTokenRequest; +import com.thoughtspot.client.model.GetNLInstructionsRequest; +import com.thoughtspot.client.model.GetObjectAccessTokenRequest; +import com.thoughtspot.client.model.GetRelevantQuestionsRequest; +import com.thoughtspot.client.model.GetTokenResponse; +import com.thoughtspot.client.model.ImportEPackAsyncTaskStatus; +import com.thoughtspot.client.model.ImportMetadataTMLAsyncRequest; +import com.thoughtspot.client.model.ImportMetadataTMLRequest; +import com.thoughtspot.client.model.ImportUserGroupsRequest; +import com.thoughtspot.client.model.ImportUserGroupsResponse; +import com.thoughtspot.client.model.ImportUsersRequest; +import com.thoughtspot.client.model.ImportUsersResponse; +import com.thoughtspot.client.model.LiveboardDataResponse; +import com.thoughtspot.client.model.LogResponse; +import com.thoughtspot.client.model.LoginRequest; +import com.thoughtspot.client.model.ManageObjectPrivilegeRequest; +import com.thoughtspot.client.model.MetadataSearchResponse; +import com.thoughtspot.client.model.ObjectPrivilegesOfMetadataResponse; +import com.thoughtspot.client.model.OrgResponse; +import com.thoughtspot.client.model.ParameterizeMetadataFieldsRequest; +import com.thoughtspot.client.model.ParameterizeMetadataRequest; +import com.thoughtspot.client.model.PermissionOfMetadataResponse; +import com.thoughtspot.client.model.PermissionOfPrincipalsResponse; +import com.thoughtspot.client.model.PublishMetadataRequest; +import com.thoughtspot.client.model.PutVariableValuesRequest; +import com.thoughtspot.client.model.QueryGetDecomposedQueryRequest; +import com.thoughtspot.client.model.RepoConfigObject; +import com.thoughtspot.client.model.ResetUserPasswordRequest; +import com.thoughtspot.client.model.ResponseActivationURL; +import com.thoughtspot.client.model.ResponseCopyObject; +import com.thoughtspot.client.model.ResponseCustomAction; +import com.thoughtspot.client.model.ResponseMessage; +import com.thoughtspot.client.model.ResponseSchedule; +import com.thoughtspot.client.model.ResponseWorksheetToModelConversion; +import com.thoughtspot.client.model.RevertCommitRequest; +import com.thoughtspot.client.model.RevertResponse; +import com.thoughtspot.client.model.RevokeRefreshTokensRequest; +import com.thoughtspot.client.model.RevokeRefreshTokensResponse; +import com.thoughtspot.client.model.RevokeTokenRequest; +import com.thoughtspot.client.model.RoleResponse; +import com.thoughtspot.client.model.SearchAuthSettingsRequest; +import com.thoughtspot.client.model.SearchAuthSettingsResponse; +import com.thoughtspot.client.model.SearchCalendarsRequest; +import com.thoughtspot.client.model.SearchChannelHistoryRequest; +import com.thoughtspot.client.model.SearchChannelHistoryResponse; +import com.thoughtspot.client.model.SearchCollectionsRequest; +import com.thoughtspot.client.model.SearchCommitsRequest; +import com.thoughtspot.client.model.SearchCommunicationChannelPreferencesRequest; +import com.thoughtspot.client.model.SearchConfigRequest; +import com.thoughtspot.client.model.SearchConnectionRequest; +import com.thoughtspot.client.model.SearchConnectionResponse; +import com.thoughtspot.client.model.SearchCustomActionsRequest; +import com.thoughtspot.client.model.SearchDataRequest; +import com.thoughtspot.client.model.SearchDataResponse; +import com.thoughtspot.client.model.SearchEmailCustomizationRequest; +import com.thoughtspot.client.model.SearchMetadataRequest; +import com.thoughtspot.client.model.SearchOrgsRequest; +import com.thoughtspot.client.model.SearchRoleResponse; +import com.thoughtspot.client.model.SearchRolesRequest; +import com.thoughtspot.client.model.SearchSchedulesRequest; +import com.thoughtspot.client.model.SearchSecuritySettingsRequest; +import com.thoughtspot.client.model.SearchTagsRequest; +import com.thoughtspot.client.model.SearchUserGroupsRequest; +import com.thoughtspot.client.model.SearchUsersRequest; +import com.thoughtspot.client.model.SearchVariablesRequest; +import com.thoughtspot.client.model.SearchWebhookConfigurationsRequest; +import com.thoughtspot.client.model.SecuritySettingsResponse; +import com.thoughtspot.client.model.SendAgentConversationMessageRequest; +import com.thoughtspot.client.model.SendAgentConversationMessageStreamingRequest; +import com.thoughtspot.client.model.SendAgentMessageRequest; +import com.thoughtspot.client.model.SendAgentMessageResponse; +import com.thoughtspot.client.model.SendAgentMessageStreamingRequest; +import com.thoughtspot.client.model.SendMessageRequest; +import com.thoughtspot.client.model.SetNLInstructionsRequest; +import com.thoughtspot.client.model.ShareMetadataRequest; +import com.thoughtspot.client.model.SingleAnswerRequest; +import com.thoughtspot.client.model.SqlQueryResponse; +import com.thoughtspot.client.model.SyncMetadataRequest; +import com.thoughtspot.client.model.SyncMetadataResponse; +import com.thoughtspot.client.model.SystemConfig; +import com.thoughtspot.client.model.SystemInfo; +import com.thoughtspot.client.model.SystemOverrideInfo; +import com.thoughtspot.client.model.Tag; +import com.thoughtspot.client.model.Token; +import com.thoughtspot.client.model.TokenValidationResponse; +import com.thoughtspot.client.model.UnassignTagRequest; +import com.thoughtspot.client.model.UnparameterizeMetadataRequest; +import com.thoughtspot.client.model.UnpublishMetadataRequest; +import com.thoughtspot.client.model.UpdateCalendarRequest; +import com.thoughtspot.client.model.UpdateCollectionRequest; +import com.thoughtspot.client.model.UpdateColumnSecurityRulesRequest; +import com.thoughtspot.client.model.UpdateConfigRequest; +import com.thoughtspot.client.model.UpdateConnectionConfigurationRequest; +import com.thoughtspot.client.model.UpdateConnectionRequest; +import com.thoughtspot.client.model.UpdateConnectionStatusRequest; +import com.thoughtspot.client.model.UpdateConnectionV2Request; +import com.thoughtspot.client.model.UpdateCustomActionRequest; +import com.thoughtspot.client.model.UpdateEmailCustomizationRequest; +import com.thoughtspot.client.model.UpdateMetadataHeaderRequest; +import com.thoughtspot.client.model.UpdateMetadataObjIdRequest; +import com.thoughtspot.client.model.UpdateOrgRequest; +import com.thoughtspot.client.model.UpdateRoleRequest; +import com.thoughtspot.client.model.UpdateScheduleRequest; +import com.thoughtspot.client.model.UpdateSystemConfigRequest; +import com.thoughtspot.client.model.UpdateTagRequest; +import com.thoughtspot.client.model.UpdateUserGroupRequest; +import com.thoughtspot.client.model.UpdateUserRequest; +import com.thoughtspot.client.model.UpdateVariableRequest; +import com.thoughtspot.client.model.UpdateVariableValuesRequest; +import com.thoughtspot.client.model.UpdateWebhookConfigurationRequest; +import com.thoughtspot.client.model.User; +import com.thoughtspot.client.model.UserGroupResponse; +import com.thoughtspot.client.model.ValidateCommunicationChannelRequest; +import com.thoughtspot.client.model.ValidateMergeRequest; +import com.thoughtspot.client.model.ValidateTokenRequest; +import com.thoughtspot.client.model.Variable; +import com.thoughtspot.client.model.WebhookDeleteResponse; +import com.thoughtspot.client.model.WebhookResponse; +import com.thoughtspot.client.model.WebhookSearchResponse; +import java.io.File; +import java.lang.reflect.Type; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +@javax.annotation.Generated( + value = "org.openapitools.codegen.languages.JavaClientCodegen", + comments = "Generator version: 7.12.0") +public class ThoughtSpotRestApi { + private ApiClient localVarApiClient; + private ApiClientConfiguration localVarApiClientConfiguration; + private int localHostIndex; + private String localCustomBaseUrl; + + public ThoughtSpotRestApi() { + this(Configuration.getDefaultApiClient()); + } + + public ThoughtSpotRestApi(ApiClient apiClient) { + this.localVarApiClient = apiClient; + } + + public ThoughtSpotRestApi(ApiClientConfiguration apiClientConfiguration) { + this.localVarApiClientConfiguration = apiClientConfiguration; + this.localVarApiClient = new ApiClient(apiClientConfiguration); + } + + public ApiClient getApiClient() { + return localVarApiClient; + } + + public void setApiClient(ApiClient apiClient) { + this.localVarApiClient = apiClient; + } + + public ApiClientConfiguration getApiClientConfiguration() { + return localVarApiClientConfiguration; + } + + public void applyApiClientConfiguration(ApiClientConfiguration apiClientConfiguration) { + this.localVarApiClientConfiguration = apiClientConfiguration; + if (localVarApiClient != null) { + localVarApiClient.applyApiClientConfiguration(apiClientConfiguration); + } else { + localVarApiClient = new ApiClient(apiClientConfiguration); + } + } + + public int getHostIndex() { + return localHostIndex; + } + + public void setHostIndex(int hostIndex) { + this.localHostIndex = hostIndex; + } + + public String getCustomBaseUrl() { + return localCustomBaseUrl; + } + + public void setCustomBaseUrl(String customBaseUrl) { + this.localCustomBaseUrl = customBaseUrl; + } + + /** + * Build call for activateUser + * + * @param activateUserRequest (required) + * @param _callback Callback for upload/download progress + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 User activated successfully. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public okhttp3.Call activateUserCall( + ActivateUserRequest activateUserRequest, final ApiCallback _callback) + throws ApiException { + String basePath = null; + // Operation Servers + String[] localBasePaths = new String[] {}; + + // Determine Base Path to Use + if (localCustomBaseUrl != null) { + basePath = localCustomBaseUrl; + } else if (localBasePaths.length > 0) { + basePath = localBasePaths[localHostIndex]; + } else { + basePath = null; + } + + Object localVarPostBody = activateUserRequest; + + // create path and map variables + String localVarPath = "/api/rest/2.0/users/activate"; + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + final String[] localVarAccepts = {"application/json"}; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = {"application/json"}; + final String localVarContentType = + localVarApiClient.selectHeaderContentType(localVarContentTypes); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } + + String[] localVarAuthNames = new String[] {"bearerAuth"}; + return localVarApiClient.buildCall( + basePath, + localVarPath, + "POST", + localVarQueryParams, + localVarCollectionQueryParams, + localVarPostBody, + localVarHeaderParams, + localVarCookieParams, + localVarFormParams, + localVarAuthNames, + _callback); + } + + @SuppressWarnings("rawtypes") + private okhttp3.Call activateUserValidateBeforeCall( + ActivateUserRequest activateUserRequest, final ApiCallback _callback) + throws ApiException { + // verify the required parameter 'activateUserRequest' is set + if (activateUserRequest == null) { + throw new ApiException( + "Missing the required parameter 'activateUserRequest' when calling" + + " activateUser(Async)"); + } + + return activateUserCall(activateUserRequest, _callback); + } + + /** + * Version: 9.7.0.cl or later Activates a deactivated user account. Requires + * `ADMINISTRATION` (**Can administer Thoughtspot**) privilege. If [Role-Based Access + * Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, + * the `USER_ADMINISTRATION` (**Can manage users**) privilege is required. To activate + * an inactive user account, the API request body must include the following information: - + * Username or the GUID of the user account. - Auth token generated for the deactivated user. + * The auth token is sent in the API response when a user is deactivated. - Password for the + * user account. + * + * @param activateUserRequest (required) + * @return User + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the + * response body + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 User activated successfully. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public User activateUser(ActivateUserRequest activateUserRequest) throws ApiException { + ApiResponse localVarResp = activateUserWithHttpInfo(activateUserRequest); + return localVarResp.getData(); + } + + /** + * Version: 9.7.0.cl or later Activates a deactivated user account. Requires + * `ADMINISTRATION` (**Can administer Thoughtspot**) privilege. If [Role-Based Access + * Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, + * the `USER_ADMINISTRATION` (**Can manage users**) privilege is required. To activate + * an inactive user account, the API request body must include the following information: - + * Username or the GUID of the user account. - Auth token generated for the deactivated user. + * The auth token is sent in the API response when a user is deactivated. - Password for the + * user account. + * + * @param activateUserRequest (required) + * @return ApiResponse<User> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the + * response body + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 User activated successfully. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public ApiResponse activateUserWithHttpInfo(ActivateUserRequest activateUserRequest) + throws ApiException { + okhttp3.Call localVarCall = activateUserValidateBeforeCall(activateUserRequest, null); + Type localVarReturnType = new TypeToken() {}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); + } + + /** + * (asynchronously) Version: 9.7.0.cl or later Activates a deactivated user account. Requires + * `ADMINISTRATION` (**Can administer Thoughtspot**) privilege. If [Role-Based Access + * Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, + * the `USER_ADMINISTRATION` (**Can manage users**) privilege is required. To activate + * an inactive user account, the API request body must include the following information: - + * Username or the GUID of the user account. - Auth token generated for the deactivated user. + * The auth token is sent in the API response when a user is deactivated. - Password for the + * user account. + * + * @param activateUserRequest (required) + * @param _callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body + * object + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 User activated successfully. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public okhttp3.Call activateUserAsync( + ActivateUserRequest activateUserRequest, final ApiCallback _callback) + throws ApiException { + + okhttp3.Call localVarCall = activateUserValidateBeforeCall(activateUserRequest, _callback); + Type localVarReturnType = new TypeToken() {}.getType(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; + } + /** + * Build call for assignChangeAuthor + * + * @param assignChangeAuthorRequest (required) + * @param _callback Callback for upload/download progress + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
204 Author assignment for given metadata objects is successful. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public okhttp3.Call assignChangeAuthorCall( + AssignChangeAuthorRequest assignChangeAuthorRequest, final ApiCallback _callback) + throws ApiException { + String basePath = null; + // Operation Servers + String[] localBasePaths = new String[] {}; + + // Determine Base Path to Use + if (localCustomBaseUrl != null) { + basePath = localCustomBaseUrl; + } else if (localBasePaths.length > 0) { + basePath = localBasePaths[localHostIndex]; + } else { + basePath = null; + } + + Object localVarPostBody = assignChangeAuthorRequest; + + // create path and map variables + String localVarPath = "/api/rest/2.0/security/metadata/assign"; + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + final String[] localVarAccepts = {"application/json"}; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = {"application/json"}; + final String localVarContentType = + localVarApiClient.selectHeaderContentType(localVarContentTypes); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } + + String[] localVarAuthNames = new String[] {"bearerAuth"}; + return localVarApiClient.buildCall( + basePath, + localVarPath, + "POST", + localVarQueryParams, + localVarCollectionQueryParams, + localVarPostBody, + localVarHeaderParams, + localVarCookieParams, + localVarFormParams, + localVarAuthNames, + _callback); + } + + @SuppressWarnings("rawtypes") + private okhttp3.Call assignChangeAuthorValidateBeforeCall( + AssignChangeAuthorRequest assignChangeAuthorRequest, final ApiCallback _callback) + throws ApiException { + // verify the required parameter 'assignChangeAuthorRequest' is set + if (assignChangeAuthorRequest == null) { + throw new ApiException( + "Missing the required parameter 'assignChangeAuthorRequest' when calling" + + " assignChangeAuthor(Async)"); + } + + return assignChangeAuthorCall(assignChangeAuthorRequest, _callback); + } + + /** + * Version: 9.0.0.cl or later Transfers the ownership of one or several objects from one user to + * another. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If + * [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled + * on your instance, the `USER_ADMINISTRATION` (**Can manage users**) privilege and + * edit access to the objects are required. + * + * @param assignChangeAuthorRequest (required) + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the + * response body + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
204 Author assignment for given metadata objects is successful. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public void assignChangeAuthor(AssignChangeAuthorRequest assignChangeAuthorRequest) + throws ApiException { + assignChangeAuthorWithHttpInfo(assignChangeAuthorRequest); + } + + /** + * Version: 9.0.0.cl or later Transfers the ownership of one or several objects from one user to + * another. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If + * [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled + * on your instance, the `USER_ADMINISTRATION` (**Can manage users**) privilege and + * edit access to the objects are required. + * + * @param assignChangeAuthorRequest (required) + * @return ApiResponse<Void> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the + * response body + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
204 Author assignment for given metadata objects is successful. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public ApiResponse assignChangeAuthorWithHttpInfo( + AssignChangeAuthorRequest assignChangeAuthorRequest) throws ApiException { + okhttp3.Call localVarCall = + assignChangeAuthorValidateBeforeCall(assignChangeAuthorRequest, null); + return localVarApiClient.execute(localVarCall); + } + + /** + * (asynchronously) Version: 9.0.0.cl or later Transfers the ownership of one or several objects + * from one user to another. Requires `ADMINISTRATION` (**Can administer + * ThoughtSpot**) privilege. If [Role-Based Access Control + * (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the + * `USER_ADMINISTRATION` (**Can manage users**) privilege and edit access to the + * objects are required. + * + * @param assignChangeAuthorRequest (required) + * @param _callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body + * object + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
204 Author assignment for given metadata objects is successful. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public okhttp3.Call assignChangeAuthorAsync( + AssignChangeAuthorRequest assignChangeAuthorRequest, final ApiCallback _callback) + throws ApiException { + + okhttp3.Call localVarCall = + assignChangeAuthorValidateBeforeCall(assignChangeAuthorRequest, _callback); + localVarApiClient.executeAsync(localVarCall, _callback); + return localVarCall; + } + /** + * Build call for assignTag + * + * @param assignTagRequest (required) + * @param _callback Callback for upload/download progress + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
204 Tags successfully assigned. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public okhttp3.Call assignTagCall( + AssignTagRequest assignTagRequest, final ApiCallback _callback) throws ApiException { + String basePath = null; + // Operation Servers + String[] localBasePaths = new String[] {}; + + // Determine Base Path to Use + if (localCustomBaseUrl != null) { + basePath = localCustomBaseUrl; + } else if (localBasePaths.length > 0) { + basePath = localBasePaths[localHostIndex]; + } else { + basePath = null; + } + + Object localVarPostBody = assignTagRequest; + + // create path and map variables + String localVarPath = "/api/rest/2.0/tags/assign"; + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + final String[] localVarAccepts = {"application/json"}; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = {"application/json"}; + final String localVarContentType = + localVarApiClient.selectHeaderContentType(localVarContentTypes); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } + + String[] localVarAuthNames = new String[] {"bearerAuth"}; + return localVarApiClient.buildCall( + basePath, + localVarPath, + "POST", + localVarQueryParams, + localVarCollectionQueryParams, + localVarPostBody, + localVarHeaderParams, + localVarCookieParams, + localVarFormParams, + localVarAuthNames, + _callback); + } + + @SuppressWarnings("rawtypes") + private okhttp3.Call assignTagValidateBeforeCall( + AssignTagRequest assignTagRequest, final ApiCallback _callback) throws ApiException { + // verify the required parameter 'assignTagRequest' is set + if (assignTagRequest == null) { + throw new ApiException( + "Missing the required parameter 'assignTagRequest' when calling" + + " assignTag(Async)"); + } + + return assignTagCall(assignTagRequest, _callback); + } + + /** + * Version: 9.0.0.cl or later Assigns tags to Liveboards, Answers, Tables, and Worksheets. + * Requires edit access to the metadata object. + * + * @param assignTagRequest (required) + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the + * response body + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
204 Tags successfully assigned. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public void assignTag(AssignTagRequest assignTagRequest) throws ApiException { + assignTagWithHttpInfo(assignTagRequest); + } + + /** + * Version: 9.0.0.cl or later Assigns tags to Liveboards, Answers, Tables, and Worksheets. + * Requires edit access to the metadata object. + * + * @param assignTagRequest (required) + * @return ApiResponse<Void> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the + * response body + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
204 Tags successfully assigned. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public ApiResponse assignTagWithHttpInfo(AssignTagRequest assignTagRequest) + throws ApiException { + okhttp3.Call localVarCall = assignTagValidateBeforeCall(assignTagRequest, null); + return localVarApiClient.execute(localVarCall); + } + + /** + * (asynchronously) Version: 9.0.0.cl or later Assigns tags to Liveboards, Answers, Tables, and + * Worksheets. Requires edit access to the metadata object. + * + * @param assignTagRequest (required) + * @param _callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body + * object + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
204 Tags successfully assigned. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public okhttp3.Call assignTagAsync( + AssignTagRequest assignTagRequest, final ApiCallback _callback) + throws ApiException { + + okhttp3.Call localVarCall = assignTagValidateBeforeCall(assignTagRequest, _callback); + localVarApiClient.executeAsync(localVarCall, _callback); + return localVarCall; + } + /** + * Build call for changeUserPassword + * + * @param changeUserPasswordRequest (required) + * @param _callback Callback for upload/download progress + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
204 User password change operation successful. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public okhttp3.Call changeUserPasswordCall( + ChangeUserPasswordRequest changeUserPasswordRequest, final ApiCallback _callback) + throws ApiException { + String basePath = null; + // Operation Servers + String[] localBasePaths = new String[] {}; + + // Determine Base Path to Use + if (localCustomBaseUrl != null) { + basePath = localCustomBaseUrl; + } else if (localBasePaths.length > 0) { + basePath = localBasePaths[localHostIndex]; + } else { + basePath = null; + } + + Object localVarPostBody = changeUserPasswordRequest; + + // create path and map variables + String localVarPath = "/api/rest/2.0/users/change-password"; + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + final String[] localVarAccepts = {"application/json"}; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = {"application/json"}; + final String localVarContentType = + localVarApiClient.selectHeaderContentType(localVarContentTypes); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } + + String[] localVarAuthNames = new String[] {"bearerAuth"}; + return localVarApiClient.buildCall( + basePath, + localVarPath, + "POST", + localVarQueryParams, + localVarCollectionQueryParams, + localVarPostBody, + localVarHeaderParams, + localVarCookieParams, + localVarFormParams, + localVarAuthNames, + _callback); + } + + @SuppressWarnings("rawtypes") + private okhttp3.Call changeUserPasswordValidateBeforeCall( + ChangeUserPasswordRequest changeUserPasswordRequest, final ApiCallback _callback) + throws ApiException { + // verify the required parameter 'changeUserPasswordRequest' is set + if (changeUserPasswordRequest == null) { + throw new ApiException( + "Missing the required parameter 'changeUserPasswordRequest' when calling" + + " changeUserPassword(Async)"); + } + + return changeUserPasswordCall(changeUserPasswordRequest, _callback); + } + + /** + * Version: 9.0.0.cl or later Updates the current password of the user. Requires + * `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access + * Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, + * the `USER_ADMINISTRATION` (**Can manage users**) privilege is required. + * + * @param changeUserPasswordRequest (required) + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the + * response body + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
204 User password change operation successful. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public void changeUserPassword(ChangeUserPasswordRequest changeUserPasswordRequest) + throws ApiException { + changeUserPasswordWithHttpInfo(changeUserPasswordRequest); + } + + /** + * Version: 9.0.0.cl or later Updates the current password of the user. Requires + * `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access + * Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, + * the `USER_ADMINISTRATION` (**Can manage users**) privilege is required. + * + * @param changeUserPasswordRequest (required) + * @return ApiResponse<Void> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the + * response body + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
204 User password change operation successful. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public ApiResponse changeUserPasswordWithHttpInfo( + ChangeUserPasswordRequest changeUserPasswordRequest) throws ApiException { + okhttp3.Call localVarCall = + changeUserPasswordValidateBeforeCall(changeUserPasswordRequest, null); + return localVarApiClient.execute(localVarCall); + } + + /** + * (asynchronously) Version: 9.0.0.cl or later Updates the current password of the user. + * Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If + * [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled + * on your instance, the `USER_ADMINISTRATION` (**Can manage users**) privilege is + * required. + * + * @param changeUserPasswordRequest (required) + * @param _callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body + * object + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
204 User password change operation successful. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public okhttp3.Call changeUserPasswordAsync( + ChangeUserPasswordRequest changeUserPasswordRequest, final ApiCallback _callback) + throws ApiException { + + okhttp3.Call localVarCall = + changeUserPasswordValidateBeforeCall(changeUserPasswordRequest, _callback); + localVarApiClient.executeAsync(localVarCall, _callback); + return localVarCall; + } + /** + * Build call for commitBranch + * + * @param commitBranchRequest (required) + * @param _callback Callback for upload/download progress + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 Successfully committed the metadata objects -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public okhttp3.Call commitBranchCall( + CommitBranchRequest commitBranchRequest, final ApiCallback _callback) + throws ApiException { + String basePath = null; + // Operation Servers + String[] localBasePaths = new String[] {}; + + // Determine Base Path to Use + if (localCustomBaseUrl != null) { + basePath = localCustomBaseUrl; + } else if (localBasePaths.length > 0) { + basePath = localBasePaths[localHostIndex]; + } else { + basePath = null; + } + + Object localVarPostBody = commitBranchRequest; + + // create path and map variables + String localVarPath = "/api/rest/2.0/vcs/git/branches/commit"; + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + final String[] localVarAccepts = {"application/json"}; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = {"application/json"}; + final String localVarContentType = + localVarApiClient.selectHeaderContentType(localVarContentTypes); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } + + String[] localVarAuthNames = new String[] {"bearerAuth"}; + return localVarApiClient.buildCall( + basePath, + localVarPath, + "POST", + localVarQueryParams, + localVarCollectionQueryParams, + localVarPostBody, + localVarHeaderParams, + localVarCookieParams, + localVarFormParams, + localVarAuthNames, + _callback); + } + + @SuppressWarnings("rawtypes") + private okhttp3.Call commitBranchValidateBeforeCall( + CommitBranchRequest commitBranchRequest, final ApiCallback _callback) + throws ApiException { + // verify the required parameter 'commitBranchRequest' is set + if (commitBranchRequest == null) { + throw new ApiException( + "Missing the required parameter 'commitBranchRequest' when calling" + + " commitBranch(Async)"); + } + + return commitBranchCall(commitBranchRequest, _callback); + } + + /** + * Version: 9.2.0.cl or later Commits TML files of metadata objects to the Git branch configured + * on your instance. Requires at least edit access to objects used in the commit operation. + * Before using this endpoint to push your commits: * Enable Git integration on your instance. * + * Make sure the Git repository and branch details are configured on your instance. For more + * information, see [Git integration + * documentation](https://developers.thoughtspot.com/docs/git-integration). + * + * @param commitBranchRequest (required) + * @return CommitResponse + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the + * response body + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 Successfully committed the metadata objects -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public CommitResponse commitBranch(CommitBranchRequest commitBranchRequest) + throws ApiException { + ApiResponse localVarResp = commitBranchWithHttpInfo(commitBranchRequest); + return localVarResp.getData(); + } + + /** + * Version: 9.2.0.cl or later Commits TML files of metadata objects to the Git branch configured + * on your instance. Requires at least edit access to objects used in the commit operation. + * Before using this endpoint to push your commits: * Enable Git integration on your instance. * + * Make sure the Git repository and branch details are configured on your instance. For more + * information, see [Git integration + * documentation](https://developers.thoughtspot.com/docs/git-integration). + * + * @param commitBranchRequest (required) + * @return ApiResponse<CommitResponse> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the + * response body + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 Successfully committed the metadata objects -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public ApiResponse commitBranchWithHttpInfo( + CommitBranchRequest commitBranchRequest) throws ApiException { + okhttp3.Call localVarCall = commitBranchValidateBeforeCall(commitBranchRequest, null); + Type localVarReturnType = new TypeToken() {}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); + } + + /** + * (asynchronously) Version: 9.2.0.cl or later Commits TML files of metadata objects to the Git + * branch configured on your instance. Requires at least edit access to objects used in the + * commit operation. Before using this endpoint to push your commits: * Enable Git integration + * on your instance. * Make sure the Git repository and branch details are configured on your + * instance. For more information, see [Git integration + * documentation](https://developers.thoughtspot.com/docs/git-integration). + * + * @param commitBranchRequest (required) + * @param _callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body + * object + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 Successfully committed the metadata objects -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public okhttp3.Call commitBranchAsync( + CommitBranchRequest commitBranchRequest, final ApiCallback _callback) + throws ApiException { + + okhttp3.Call localVarCall = commitBranchValidateBeforeCall(commitBranchRequest, _callback); + Type localVarReturnType = new TypeToken() {}.getType(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; + } + /** + * Build call for configureAuthSettings + * + * @param configureAuthSettingsRequest (required) + * @param _callback Callback for upload/download progress + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
204 Trusted authentication settings configured successfully. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public okhttp3.Call configureAuthSettingsCall( + ConfigureAuthSettingsRequest configureAuthSettingsRequest, final ApiCallback _callback) + throws ApiException { + String basePath = null; + // Operation Servers + String[] localBasePaths = new String[] {}; + + // Determine Base Path to Use + if (localCustomBaseUrl != null) { + basePath = localCustomBaseUrl; + } else if (localBasePaths.length > 0) { + basePath = localBasePaths[localHostIndex]; + } else { + basePath = null; + } + + Object localVarPostBody = configureAuthSettingsRequest; + + // create path and map variables + String localVarPath = "/api/rest/2.0/auth/configure"; + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + final String[] localVarAccepts = {"application/json"}; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = {"application/json"}; + final String localVarContentType = + localVarApiClient.selectHeaderContentType(localVarContentTypes); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } + + String[] localVarAuthNames = new String[] {"bearerAuth"}; + return localVarApiClient.buildCall( + basePath, + localVarPath, + "POST", + localVarQueryParams, + localVarCollectionQueryParams, + localVarPostBody, + localVarHeaderParams, + localVarCookieParams, + localVarFormParams, + localVarAuthNames, + _callback); + } + + @SuppressWarnings("rawtypes") + private okhttp3.Call configureAuthSettingsValidateBeforeCall( + ConfigureAuthSettingsRequest configureAuthSettingsRequest, final ApiCallback _callback) + throws ApiException { + // verify the required parameter 'configureAuthSettingsRequest' is set + if (configureAuthSettingsRequest == null) { + throw new ApiException( + "Missing the required parameter 'configureAuthSettingsRequest' when calling" + + " configureAuthSettings(Async)"); + } + + return configureAuthSettingsCall(configureAuthSettingsRequest, _callback); + } + + /** + * Version: 26.6.0.cl or later Enables or disables authentication at cluster or org level for + * the specified auth type. Currently supports `TRUSTED_AUTH`. #### Required + * privileges Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) or + * `CONTROL_TRUSTED_AUTH` (**Can Enable or Disable Trusted Authentication**) + * privilege. If [Role-Based Access Control + * (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled, the + * `CONTROL_TRUSTED_AUTH` privilege is required. #### Usage guidelines Use + * `cluster_preferences` to enable or disable authentication at the cluster level. + * Cluster-level settings can only be configured from the Primary Org. - `ENABLED` — + * Generates a new access token if one does not exist. An existing token is preserved. - + * `DISABLED` — Revokes the existing cluster-level access token. Use + * `org_preferences` to enable or disable authentication for one or more Orgs. Each + * entry must include an `org_identifier` (unique ID or name) and an + * `auth_status`. Org-level configuration requires the per-Org authentication feature + * to be enabled on your instance. - `ENABLED` — Generates a new org-level access + * token if one does not exist. - `DISABLED` — Revokes the existing org-level access + * token for that Org. Both `cluster_preferences` and `org_preferences` are + * optional. Omitting a field leaves the corresponding settings unchanged. If both are omitted, + * the API returns `204 No Content` without making any changes. **Note**: + * Cluster-level and org-level settings are independent of each other. Enabling or disabling one + * does not affect the other. + * + * @param configureAuthSettingsRequest (required) + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the + * response body + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
204 Trusted authentication settings configured successfully. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public void configureAuthSettings(ConfigureAuthSettingsRequest configureAuthSettingsRequest) + throws ApiException { + configureAuthSettingsWithHttpInfo(configureAuthSettingsRequest); + } + + /** + * Version: 26.6.0.cl or later Enables or disables authentication at cluster or org level for + * the specified auth type. Currently supports `TRUSTED_AUTH`. #### Required + * privileges Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) or + * `CONTROL_TRUSTED_AUTH` (**Can Enable or Disable Trusted Authentication**) + * privilege. If [Role-Based Access Control + * (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled, the + * `CONTROL_TRUSTED_AUTH` privilege is required. #### Usage guidelines Use + * `cluster_preferences` to enable or disable authentication at the cluster level. + * Cluster-level settings can only be configured from the Primary Org. - `ENABLED` — + * Generates a new access token if one does not exist. An existing token is preserved. - + * `DISABLED` — Revokes the existing cluster-level access token. Use + * `org_preferences` to enable or disable authentication for one or more Orgs. Each + * entry must include an `org_identifier` (unique ID or name) and an + * `auth_status`. Org-level configuration requires the per-Org authentication feature + * to be enabled on your instance. - `ENABLED` — Generates a new org-level access + * token if one does not exist. - `DISABLED` — Revokes the existing org-level access + * token for that Org. Both `cluster_preferences` and `org_preferences` are + * optional. Omitting a field leaves the corresponding settings unchanged. If both are omitted, + * the API returns `204 No Content` without making any changes. **Note**: + * Cluster-level and org-level settings are independent of each other. Enabling or disabling one + * does not affect the other. + * + * @param configureAuthSettingsRequest (required) + * @return ApiResponse<Void> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the + * response body + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
204 Trusted authentication settings configured successfully. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public ApiResponse configureAuthSettingsWithHttpInfo( + ConfigureAuthSettingsRequest configureAuthSettingsRequest) throws ApiException { + okhttp3.Call localVarCall = + configureAuthSettingsValidateBeforeCall(configureAuthSettingsRequest, null); + return localVarApiClient.execute(localVarCall); + } + + /** + * (asynchronously) Version: 26.6.0.cl or later Enables or disables authentication at cluster or + * org level for the specified auth type. Currently supports `TRUSTED_AUTH`. #### + * Required privileges Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) or + * `CONTROL_TRUSTED_AUTH` (**Can Enable or Disable Trusted Authentication**) + * privilege. If [Role-Based Access Control + * (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled, the + * `CONTROL_TRUSTED_AUTH` privilege is required. #### Usage guidelines Use + * `cluster_preferences` to enable or disable authentication at the cluster level. + * Cluster-level settings can only be configured from the Primary Org. - `ENABLED` — + * Generates a new access token if one does not exist. An existing token is preserved. - + * `DISABLED` — Revokes the existing cluster-level access token. Use + * `org_preferences` to enable or disable authentication for one or more Orgs. Each + * entry must include an `org_identifier` (unique ID or name) and an + * `auth_status`. Org-level configuration requires the per-Org authentication feature + * to be enabled on your instance. - `ENABLED` — Generates a new org-level access + * token if one does not exist. - `DISABLED` — Revokes the existing org-level access + * token for that Org. Both `cluster_preferences` and `org_preferences` are + * optional. Omitting a field leaves the corresponding settings unchanged. If both are omitted, + * the API returns `204 No Content` without making any changes. **Note**: + * Cluster-level and org-level settings are independent of each other. Enabling or disabling one + * does not affect the other. + * + * @param configureAuthSettingsRequest (required) + * @param _callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body + * object + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
204 Trusted authentication settings configured successfully. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public okhttp3.Call configureAuthSettingsAsync( + ConfigureAuthSettingsRequest configureAuthSettingsRequest, + final ApiCallback _callback) + throws ApiException { + + okhttp3.Call localVarCall = + configureAuthSettingsValidateBeforeCall(configureAuthSettingsRequest, _callback); + localVarApiClient.executeAsync(localVarCall, _callback); + return localVarCall; + } + /** + * Build call for configureCommunicationChannelPreferences + * + * @param configureCommunicationChannelPreferencesRequest (required) + * @param _callback Callback for upload/download progress + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
204 Communication channel preferences successfully updated. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public okhttp3.Call configureCommunicationChannelPreferencesCall( + ConfigureCommunicationChannelPreferencesRequest + configureCommunicationChannelPreferencesRequest, + final ApiCallback _callback) + throws ApiException { + String basePath = null; + // Operation Servers + String[] localBasePaths = new String[] {}; + + // Determine Base Path to Use + if (localCustomBaseUrl != null) { + basePath = localCustomBaseUrl; + } else if (localBasePaths.length > 0) { + basePath = localBasePaths[localHostIndex]; + } else { + basePath = null; + } + + Object localVarPostBody = configureCommunicationChannelPreferencesRequest; + + // create path and map variables + String localVarPath = "/api/rest/2.0/system/preferences/communication-channels/configure"; + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + final String[] localVarAccepts = {"application/json"}; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = {"application/json"}; + final String localVarContentType = + localVarApiClient.selectHeaderContentType(localVarContentTypes); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } + + String[] localVarAuthNames = new String[] {"bearerAuth"}; + return localVarApiClient.buildCall( + basePath, + localVarPath, + "POST", + localVarQueryParams, + localVarCollectionQueryParams, + localVarPostBody, + localVarHeaderParams, + localVarCookieParams, + localVarFormParams, + localVarAuthNames, + _callback); + } + + @SuppressWarnings("rawtypes") + private okhttp3.Call configureCommunicationChannelPreferencesValidateBeforeCall( + ConfigureCommunicationChannelPreferencesRequest + configureCommunicationChannelPreferencesRequest, + final ApiCallback _callback) + throws ApiException { + // verify the required parameter 'configureCommunicationChannelPreferencesRequest' is set + if (configureCommunicationChannelPreferencesRequest == null) { + throw new ApiException( + "Missing the required parameter" + + " 'configureCommunicationChannelPreferencesRequest' when calling" + + " configureCommunicationChannelPreferences(Async)"); + } + + return configureCommunicationChannelPreferencesCall( + configureCommunicationChannelPreferencesRequest, _callback); + } + + /** + * Version: 10.14.0.cl or later Configure communication channel preferences. - Use + * `cluster_preferences` to update the default preferences for your ThoughtSpot + * application instance. - If your instance has + * [Orgs](https://docs.thoughtspot.com/cloud/latest/orgs-overview), use + * `org_preferences` to specify Org-specific preferences that override the defaults. + * Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) or `DEVELOPER` + * (**Has developer privilege**) privilege. If [Role-Based Access Control + * (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, users with + * `APPLICATION_ADMINISTRATION` (**Can manage application settings**) privilege are + * also authorized to perform this action. + * + * @param configureCommunicationChannelPreferencesRequest (required) + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the + * response body + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
204 Communication channel preferences successfully updated. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public void configureCommunicationChannelPreferences( + ConfigureCommunicationChannelPreferencesRequest + configureCommunicationChannelPreferencesRequest) + throws ApiException { + configureCommunicationChannelPreferencesWithHttpInfo( + configureCommunicationChannelPreferencesRequest); + } + + /** + * Version: 10.14.0.cl or later Configure communication channel preferences. - Use + * `cluster_preferences` to update the default preferences for your ThoughtSpot + * application instance. - If your instance has + * [Orgs](https://docs.thoughtspot.com/cloud/latest/orgs-overview), use + * `org_preferences` to specify Org-specific preferences that override the defaults. + * Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) or `DEVELOPER` + * (**Has developer privilege**) privilege. If [Role-Based Access Control + * (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, users with + * `APPLICATION_ADMINISTRATION` (**Can manage application settings**) privilege are + * also authorized to perform this action. + * + * @param configureCommunicationChannelPreferencesRequest (required) + * @return ApiResponse<Void> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the + * response body + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
204 Communication channel preferences successfully updated. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public ApiResponse configureCommunicationChannelPreferencesWithHttpInfo( + ConfigureCommunicationChannelPreferencesRequest + configureCommunicationChannelPreferencesRequest) + throws ApiException { + okhttp3.Call localVarCall = + configureCommunicationChannelPreferencesValidateBeforeCall( + configureCommunicationChannelPreferencesRequest, null); + return localVarApiClient.execute(localVarCall); + } + + /** + * (asynchronously) Version: 10.14.0.cl or later Configure communication channel preferences. - + * Use `cluster_preferences` to update the default preferences for your ThoughtSpot + * application instance. - If your instance has + * [Orgs](https://docs.thoughtspot.com/cloud/latest/orgs-overview), use + * `org_preferences` to specify Org-specific preferences that override the defaults. + * Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) or `DEVELOPER` + * (**Has developer privilege**) privilege. If [Role-Based Access Control + * (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, users with + * `APPLICATION_ADMINISTRATION` (**Can manage application settings**) privilege are + * also authorized to perform this action. + * + * @param configureCommunicationChannelPreferencesRequest (required) + * @param _callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body + * object + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
204 Communication channel preferences successfully updated. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public okhttp3.Call configureCommunicationChannelPreferencesAsync( + ConfigureCommunicationChannelPreferencesRequest + configureCommunicationChannelPreferencesRequest, + final ApiCallback _callback) + throws ApiException { + + okhttp3.Call localVarCall = + configureCommunicationChannelPreferencesValidateBeforeCall( + configureCommunicationChannelPreferencesRequest, _callback); + localVarApiClient.executeAsync(localVarCall, _callback); + return localVarCall; + } + /** + * Build call for configureSecuritySettings + * + * @param configureSecuritySettingsRequest (required) + * @param _callback Callback for upload/download progress + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
204 Successfully configured the security settings. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public okhttp3.Call configureSecuritySettingsCall( + ConfigureSecuritySettingsRequest configureSecuritySettingsRequest, + final ApiCallback _callback) + throws ApiException { + String basePath = null; + // Operation Servers + String[] localBasePaths = new String[] {}; + + // Determine Base Path to Use + if (localCustomBaseUrl != null) { + basePath = localCustomBaseUrl; + } else if (localBasePaths.length > 0) { + basePath = localBasePaths[localHostIndex]; + } else { + basePath = null; + } + + Object localVarPostBody = configureSecuritySettingsRequest; + + // create path and map variables + String localVarPath = "/api/rest/2.0/system/security-settings/configure"; + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + final String[] localVarAccepts = {"application/json"}; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = {"application/json"}; + final String localVarContentType = + localVarApiClient.selectHeaderContentType(localVarContentTypes); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } + + String[] localVarAuthNames = new String[] {"bearerAuth"}; + return localVarApiClient.buildCall( + basePath, + localVarPath, + "POST", + localVarQueryParams, + localVarCollectionQueryParams, + localVarPostBody, + localVarHeaderParams, + localVarCookieParams, + localVarFormParams, + localVarAuthNames, + _callback); + } + + @SuppressWarnings("rawtypes") + private okhttp3.Call configureSecuritySettingsValidateBeforeCall( + ConfigureSecuritySettingsRequest configureSecuritySettingsRequest, + final ApiCallback _callback) + throws ApiException { + // verify the required parameter 'configureSecuritySettingsRequest' is set + if (configureSecuritySettingsRequest == null) { + throw new ApiException( + "Missing the required parameter 'configureSecuritySettingsRequest' when" + + " calling configureSecuritySettings(Async)"); + } + + return configureSecuritySettingsCall(configureSecuritySettingsRequest, _callback); + } + + /** + * Version: 26.2.0.cl or later Configure security settings for your ThoughtSpot application + * instance. - Use `cluster_preferences` to update cluster-level security settings + * including CORS whitelisted URLs, CSP settings, SAML redirect URLs, partitioned cookies, and + * non-embed access configuration. - Use `org_preferences` to configure Org-specific + * security settings. If your instance has + * [Orgs](https://docs.thoughtspot.com/cloud/latest/orgs-overview), this allows configuring CORS + * and non-embed access settings specific to the Org. Requires `ADMINISTRATION` (**Can + * administer ThoughtSpot**) or `DEVELOPER` (**Has developer privilege**) privilege. + * Cluster-level SAML and script-src settings require `ADMINISTRATION` privilege. See + * [Security Settings](https://developers.thoughtspot.com/docs/security-settings) for more + * details. + * + * @param configureSecuritySettingsRequest (required) + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the + * response body + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
204 Successfully configured the security settings. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public void configureSecuritySettings( + ConfigureSecuritySettingsRequest configureSecuritySettingsRequest) throws ApiException { + configureSecuritySettingsWithHttpInfo(configureSecuritySettingsRequest); + } + + /** + * Version: 26.2.0.cl or later Configure security settings for your ThoughtSpot application + * instance. - Use `cluster_preferences` to update cluster-level security settings + * including CORS whitelisted URLs, CSP settings, SAML redirect URLs, partitioned cookies, and + * non-embed access configuration. - Use `org_preferences` to configure Org-specific + * security settings. If your instance has + * [Orgs](https://docs.thoughtspot.com/cloud/latest/orgs-overview), this allows configuring CORS + * and non-embed access settings specific to the Org. Requires `ADMINISTRATION` (**Can + * administer ThoughtSpot**) or `DEVELOPER` (**Has developer privilege**) privilege. + * Cluster-level SAML and script-src settings require `ADMINISTRATION` privilege. See + * [Security Settings](https://developers.thoughtspot.com/docs/security-settings) for more + * details. + * + * @param configureSecuritySettingsRequest (required) + * @return ApiResponse<Void> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the + * response body + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
204 Successfully configured the security settings. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public ApiResponse configureSecuritySettingsWithHttpInfo( + ConfigureSecuritySettingsRequest configureSecuritySettingsRequest) throws ApiException { + okhttp3.Call localVarCall = + configureSecuritySettingsValidateBeforeCall(configureSecuritySettingsRequest, null); + return localVarApiClient.execute(localVarCall); + } + + /** + * (asynchronously) Version: 26.2.0.cl or later Configure security settings for your ThoughtSpot + * application instance. - Use `cluster_preferences` to update cluster-level security + * settings including CORS whitelisted URLs, CSP settings, SAML redirect URLs, partitioned + * cookies, and non-embed access configuration. - Use `org_preferences` to configure + * Org-specific security settings. If your instance has + * [Orgs](https://docs.thoughtspot.com/cloud/latest/orgs-overview), this allows configuring CORS + * and non-embed access settings specific to the Org. Requires `ADMINISTRATION` (**Can + * administer ThoughtSpot**) or `DEVELOPER` (**Has developer privilege**) privilege. + * Cluster-level SAML and script-src settings require `ADMINISTRATION` privilege. See + * [Security Settings](https://developers.thoughtspot.com/docs/security-settings) for more + * details. + * + * @param configureSecuritySettingsRequest (required) + * @param _callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body + * object + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
204 Successfully configured the security settings. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public okhttp3.Call configureSecuritySettingsAsync( + ConfigureSecuritySettingsRequest configureSecuritySettingsRequest, + final ApiCallback _callback) + throws ApiException { + + okhttp3.Call localVarCall = + configureSecuritySettingsValidateBeforeCall( + configureSecuritySettingsRequest, _callback); + localVarApiClient.executeAsync(localVarCall, _callback); + return localVarCall; + } + /** + * Build call for connectionConfigurationSearch + * + * @param connectionConfigurationSearchRequest (required) + * @param _callback Callback for upload/download progress + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 Configuration fetched successfully. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public okhttp3.Call connectionConfigurationSearchCall( + ConnectionConfigurationSearchRequest connectionConfigurationSearchRequest, + final ApiCallback _callback) + throws ApiException { + String basePath = null; + // Operation Servers + String[] localBasePaths = new String[] {}; + + // Determine Base Path to Use + if (localCustomBaseUrl != null) { + basePath = localCustomBaseUrl; + } else if (localBasePaths.length > 0) { + basePath = localBasePaths[localHostIndex]; + } else { + basePath = null; + } + + Object localVarPostBody = connectionConfigurationSearchRequest; + + // create path and map variables + String localVarPath = "/api/rest/2.0/connection-configurations/search"; + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + final String[] localVarAccepts = {"application/json"}; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = {"application/json"}; + final String localVarContentType = + localVarApiClient.selectHeaderContentType(localVarContentTypes); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } + + String[] localVarAuthNames = new String[] {"bearerAuth"}; + return localVarApiClient.buildCall( + basePath, + localVarPath, + "POST", + localVarQueryParams, + localVarCollectionQueryParams, + localVarPostBody, + localVarHeaderParams, + localVarCookieParams, + localVarFormParams, + localVarAuthNames, + _callback); + } + + @SuppressWarnings("rawtypes") + private okhttp3.Call connectionConfigurationSearchValidateBeforeCall( + ConnectionConfigurationSearchRequest connectionConfigurationSearchRequest, + final ApiCallback _callback) + throws ApiException { + // verify the required parameter 'connectionConfigurationSearchRequest' is set + if (connectionConfigurationSearchRequest == null) { + throw new ApiException( + "Missing the required parameter 'connectionConfigurationSearchRequest' when" + + " calling connectionConfigurationSearch(Async)"); + } + + return connectionConfigurationSearchCall(connectionConfigurationSearchRequest, _callback); + } + + /** + * Version: 10.12.0.cl or later Gets connection configuration objects. Requires + * `DATAMANAGEMENT` (**Can manage data**) and edit permissions to the connection + * object, or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If + * [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled + * on your instance, the `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit + * Connections**) privilege is required. #### Usage guidelines * To get a list of all + * configurations available in the ThoughtSpot system, send the API request with only the + * connection name or GUID in the request body. * To fetch details of a configuration object, + * specify the configuration object name or GUID. + * + * @param connectionConfigurationSearchRequest (required) + * @return List<ConnectionConfigurationResponse> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the + * response body + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 Configuration fetched successfully. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public List connectionConfigurationSearch( + ConnectionConfigurationSearchRequest connectionConfigurationSearchRequest) + throws ApiException { + ApiResponse> localVarResp = + connectionConfigurationSearchWithHttpInfo(connectionConfigurationSearchRequest); + return localVarResp.getData(); + } + + /** + * Version: 10.12.0.cl or later Gets connection configuration objects. Requires + * `DATAMANAGEMENT` (**Can manage data**) and edit permissions to the connection + * object, or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If + * [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled + * on your instance, the `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit + * Connections**) privilege is required. #### Usage guidelines * To get a list of all + * configurations available in the ThoughtSpot system, send the API request with only the + * connection name or GUID in the request body. * To fetch details of a configuration object, + * specify the configuration object name or GUID. + * + * @param connectionConfigurationSearchRequest (required) + * @return ApiResponse<List<ConnectionConfigurationResponse>> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the + * response body + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 Configuration fetched successfully. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public ApiResponse> + connectionConfigurationSearchWithHttpInfo( + ConnectionConfigurationSearchRequest connectionConfigurationSearchRequest) + throws ApiException { + okhttp3.Call localVarCall = + connectionConfigurationSearchValidateBeforeCall( + connectionConfigurationSearchRequest, null); + Type localVarReturnType = + new TypeToken>() {}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); + } + + /** + * (asynchronously) Version: 10.12.0.cl or later Gets connection configuration objects. Requires + * `DATAMANAGEMENT` (**Can manage data**) and edit permissions to the connection + * object, or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If + * [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled + * on your instance, the `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit + * Connections**) privilege is required. #### Usage guidelines * To get a list of all + * configurations available in the ThoughtSpot system, send the API request with only the + * connection name or GUID in the request body. * To fetch details of a configuration object, + * specify the configuration object name or GUID. + * + * @param connectionConfigurationSearchRequest (required) + * @param _callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body + * object + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 Configuration fetched successfully. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public okhttp3.Call connectionConfigurationSearchAsync( + ConnectionConfigurationSearchRequest connectionConfigurationSearchRequest, + final ApiCallback> _callback) + throws ApiException { + + okhttp3.Call localVarCall = + connectionConfigurationSearchValidateBeforeCall( + connectionConfigurationSearchRequest, _callback); + Type localVarReturnType = + new TypeToken>() {}.getType(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; + } + /** + * Build call for convertWorksheetToModel + * + * @param convertWorksheetToModelRequest (required) + * @param _callback Callback for upload/download progress + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 Conversion of worksheets to model done successfully. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public okhttp3.Call convertWorksheetToModelCall( + ConvertWorksheetToModelRequest convertWorksheetToModelRequest, + final ApiCallback _callback) + throws ApiException { + String basePath = null; + // Operation Servers + String[] localBasePaths = new String[] {}; + + // Determine Base Path to Use + if (localCustomBaseUrl != null) { + basePath = localCustomBaseUrl; + } else if (localBasePaths.length > 0) { + basePath = localBasePaths[localHostIndex]; + } else { + basePath = null; + } + + Object localVarPostBody = convertWorksheetToModelRequest; + + // create path and map variables + String localVarPath = "/api/rest/2.0/metadata/worksheets/convert"; + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + final String[] localVarAccepts = {"application/json"}; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = {"application/json"}; + final String localVarContentType = + localVarApiClient.selectHeaderContentType(localVarContentTypes); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } + + String[] localVarAuthNames = new String[] {"bearerAuth"}; + return localVarApiClient.buildCall( + basePath, + localVarPath, + "POST", + localVarQueryParams, + localVarCollectionQueryParams, + localVarPostBody, + localVarHeaderParams, + localVarCookieParams, + localVarFormParams, + localVarAuthNames, + _callback); + } + + @SuppressWarnings("rawtypes") + private okhttp3.Call convertWorksheetToModelValidateBeforeCall( + ConvertWorksheetToModelRequest convertWorksheetToModelRequest, + final ApiCallback _callback) + throws ApiException { + // verify the required parameter 'convertWorksheetToModelRequest' is set + if (convertWorksheetToModelRequest == null) { + throw new ApiException( + "Missing the required parameter 'convertWorksheetToModelRequest' when calling" + + " convertWorksheetToModel(Async)"); + } + + return convertWorksheetToModelCall(convertWorksheetToModelRequest, _callback); + } + + /** + * Convert worksheets to models Version: 10.6.0.cl or later ## Prerequisites - **Privileges + * Required:** - `DATAMANAGEMENT` (Can manage data) or `ADMINISTRATION` (Can + * administer ThoughtSpot). - **Additional Privileges (if RBAC is enabled):** - + * `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` (Can manage data models). --- ## Usage + * Guidelines ### Parameters 1. **worksheet_ids** - **Description:** A comma-separated list of + * GUIDs (Globally Unique Identifiers) specifying the Worksheets to be converted. - **Usage:** - + * Used only when `convert_all` is set to `false`. - Leave empty or omit + * when `convert_all` is set to `true`. 2. **exclude_worksheet_ids** - + * **Description:** A comma-separated list of GUIDs specifying Worksheets to be excluded from + * conversion. - **Usage:** - Useful when `convert_all` is set to `true` and + * specific Worksheets should not be converted. 3. **convert_all** - **Description:** Sets the + * scope of conversion. - **Options:** - `true`: Converts all Worksheets in the + * system, except those specified in `exclude_worksheet_ids`. - `false`: + * Converts only the Worksheets listed in `worksheet_ids`. 4. **apply_changes** - + * **Description:** Specifies whether to apply changes directly to ThoughtSpot or to generate a + * preview before applying any changes.Used for validation of conversion. - **Options:** - + * `true`: Applies conversion changes directly to ThoughtSpot. - `false`: + * Generates only a preview of the changes and does not apply any changes to ThoughtSpot --- ## + * Best Practices 1. **Backup Before Conversion:** Always export metadata as a backup before + * initiating the conversion process 2. **Partial Conversion for Testing:** Test the conversion + * process by setting `convert_all` to `false` and specifying a small number + * of `worksheet_ids`. 3. **Verify Dependencies:** Check for dependent objects, such + * as Tables and Connections, to avoid invalid references. 4. **Review Changes:** Use + * `apply_changes: false` to preview the impact of the conversion before applying + * changes. --- ## Examples ### Convert Specific Worksheets ```json { + * \"worksheet_ids\": [\"guid1\", \"guid2\", \"guid3\"], + * \"exclude_worksheet_ids\": [], \"convert_all\": false, + * \"apply_changes\": true } ``` ### Convert All Accessible Worksheets + * ```json { \"worksheet_ids\": [], + * \"exclude_worksheet_ids\": [], \"convert_all\": true, + * \"apply_changes\": true } ``` ### Exclude Specific Worksheets While + * Converting All Accessible Worksheets ```json { \"worksheet_ids\": + * [], \"exclude_worksheet_ids\": [\"abc\"], \"convert_all\": + * true, \"apply_changes\": true } ``` + * + * @param convertWorksheetToModelRequest (required) + * @return ResponseWorksheetToModelConversion + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the + * response body + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 Conversion of worksheets to model done successfully. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public ResponseWorksheetToModelConversion convertWorksheetToModel( + ConvertWorksheetToModelRequest convertWorksheetToModelRequest) throws ApiException { + ApiResponse localVarResp = + convertWorksheetToModelWithHttpInfo(convertWorksheetToModelRequest); + return localVarResp.getData(); + } + + /** + * Convert worksheets to models Version: 10.6.0.cl or later ## Prerequisites - **Privileges + * Required:** - `DATAMANAGEMENT` (Can manage data) or `ADMINISTRATION` (Can + * administer ThoughtSpot). - **Additional Privileges (if RBAC is enabled):** - + * `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` (Can manage data models). --- ## Usage + * Guidelines ### Parameters 1. **worksheet_ids** - **Description:** A comma-separated list of + * GUIDs (Globally Unique Identifiers) specifying the Worksheets to be converted. - **Usage:** - + * Used only when `convert_all` is set to `false`. - Leave empty or omit + * when `convert_all` is set to `true`. 2. **exclude_worksheet_ids** - + * **Description:** A comma-separated list of GUIDs specifying Worksheets to be excluded from + * conversion. - **Usage:** - Useful when `convert_all` is set to `true` and + * specific Worksheets should not be converted. 3. **convert_all** - **Description:** Sets the + * scope of conversion. - **Options:** - `true`: Converts all Worksheets in the + * system, except those specified in `exclude_worksheet_ids`. - `false`: + * Converts only the Worksheets listed in `worksheet_ids`. 4. **apply_changes** - + * **Description:** Specifies whether to apply changes directly to ThoughtSpot or to generate a + * preview before applying any changes.Used for validation of conversion. - **Options:** - + * `true`: Applies conversion changes directly to ThoughtSpot. - `false`: + * Generates only a preview of the changes and does not apply any changes to ThoughtSpot --- ## + * Best Practices 1. **Backup Before Conversion:** Always export metadata as a backup before + * initiating the conversion process 2. **Partial Conversion for Testing:** Test the conversion + * process by setting `convert_all` to `false` and specifying a small number + * of `worksheet_ids`. 3. **Verify Dependencies:** Check for dependent objects, such + * as Tables and Connections, to avoid invalid references. 4. **Review Changes:** Use + * `apply_changes: false` to preview the impact of the conversion before applying + * changes. --- ## Examples ### Convert Specific Worksheets ```json { + * \"worksheet_ids\": [\"guid1\", \"guid2\", \"guid3\"], + * \"exclude_worksheet_ids\": [], \"convert_all\": false, + * \"apply_changes\": true } ``` ### Convert All Accessible Worksheets + * ```json { \"worksheet_ids\": [], + * \"exclude_worksheet_ids\": [], \"convert_all\": true, + * \"apply_changes\": true } ``` ### Exclude Specific Worksheets While + * Converting All Accessible Worksheets ```json { \"worksheet_ids\": + * [], \"exclude_worksheet_ids\": [\"abc\"], \"convert_all\": + * true, \"apply_changes\": true } ``` + * + * @param convertWorksheetToModelRequest (required) + * @return ApiResponse<ResponseWorksheetToModelConversion> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the + * response body + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 Conversion of worksheets to model done successfully. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public ApiResponse convertWorksheetToModelWithHttpInfo( + ConvertWorksheetToModelRequest convertWorksheetToModelRequest) throws ApiException { + okhttp3.Call localVarCall = + convertWorksheetToModelValidateBeforeCall(convertWorksheetToModelRequest, null); + Type localVarReturnType = new TypeToken() {}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); + } + + /** + * (asynchronously) Convert worksheets to models Version: 10.6.0.cl or later ## Prerequisites - + * **Privileges Required:** - `DATAMANAGEMENT` (Can manage data) or + * `ADMINISTRATION` (Can administer ThoughtSpot). - **Additional Privileges (if RBAC + * is enabled):** - `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` (Can manage data models). --- + * ## Usage Guidelines ### Parameters 1. **worksheet_ids** - **Description:** A comma-separated + * list of GUIDs (Globally Unique Identifiers) specifying the Worksheets to be converted. - + * **Usage:** - Used only when `convert_all` is set to `false`. - Leave + * empty or omit when `convert_all` is set to `true`. 2. + * **exclude_worksheet_ids** - **Description:** A comma-separated list of GUIDs specifying + * Worksheets to be excluded from conversion. - **Usage:** - Useful when `convert_all` + * is set to `true` and specific Worksheets should not be converted. 3. + * **convert_all** - **Description:** Sets the scope of conversion. - **Options:** - + * `true`: Converts all Worksheets in the system, except those specified in + * `exclude_worksheet_ids`. - `false`: Converts only the Worksheets listed + * in `worksheet_ids`. 4. **apply_changes** - **Description:** Specifies whether to + * apply changes directly to ThoughtSpot or to generate a preview before applying any + * changes.Used for validation of conversion. - **Options:** - `true`: Applies + * conversion changes directly to ThoughtSpot. - `false`: Generates only a preview of + * the changes and does not apply any changes to ThoughtSpot --- ## Best Practices 1. **Backup + * Before Conversion:** Always export metadata as a backup before initiating the conversion + * process 2. **Partial Conversion for Testing:** Test the conversion process by setting + * `convert_all` to `false` and specifying a small number of + * `worksheet_ids`. 3. **Verify Dependencies:** Check for dependent objects, such as + * Tables and Connections, to avoid invalid references. 4. **Review Changes:** Use + * `apply_changes: false` to preview the impact of the conversion before applying + * changes. --- ## Examples ### Convert Specific Worksheets ```json { + * \"worksheet_ids\": [\"guid1\", \"guid2\", \"guid3\"], + * \"exclude_worksheet_ids\": [], \"convert_all\": false, + * \"apply_changes\": true } ``` ### Convert All Accessible Worksheets + * ```json { \"worksheet_ids\": [], + * \"exclude_worksheet_ids\": [], \"convert_all\": true, + * \"apply_changes\": true } ``` ### Exclude Specific Worksheets While + * Converting All Accessible Worksheets ```json { \"worksheet_ids\": + * [], \"exclude_worksheet_ids\": [\"abc\"], \"convert_all\": + * true, \"apply_changes\": true } ``` + * + * @param convertWorksheetToModelRequest (required) + * @param _callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body + * object + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 Conversion of worksheets to model done successfully. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public okhttp3.Call convertWorksheetToModelAsync( + ConvertWorksheetToModelRequest convertWorksheetToModelRequest, + final ApiCallback _callback) + throws ApiException { + + okhttp3.Call localVarCall = + convertWorksheetToModelValidateBeforeCall( + convertWorksheetToModelRequest, _callback); + Type localVarReturnType = new TypeToken() {}.getType(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; + } + /** + * Build call for copyObject + * + * @param copyObjectRequest (required) + * @param _callback Callback for upload/download progress + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + * @http.response.details + * + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 Successfully created a copy of the object -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
404 Object not found -
500 Unexpected error -
+ */ + public okhttp3.Call copyObjectCall( + CopyObjectRequest copyObjectRequest, final ApiCallback _callback) throws ApiException { + String basePath = null; + // Operation Servers + String[] localBasePaths = new String[] {}; + + // Determine Base Path to Use + if (localCustomBaseUrl != null) { + basePath = localCustomBaseUrl; + } else if (localBasePaths.length > 0) { + basePath = localBasePaths[localHostIndex]; + } else { + basePath = null; + } + + Object localVarPostBody = copyObjectRequest; + + // create path and map variables + String localVarPath = "/api/rest/2.0/metadata/copyobject"; + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + final String[] localVarAccepts = {"application/json"}; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = {"application/json"}; + final String localVarContentType = + localVarApiClient.selectHeaderContentType(localVarContentTypes); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } + + String[] localVarAuthNames = new String[] {"bearerAuth"}; + return localVarApiClient.buildCall( + basePath, + localVarPath, + "POST", + localVarQueryParams, + localVarCollectionQueryParams, + localVarPostBody, + localVarHeaderParams, + localVarCookieParams, + localVarFormParams, + localVarAuthNames, + _callback); + } + + @SuppressWarnings("rawtypes") + private okhttp3.Call copyObjectValidateBeforeCall( + CopyObjectRequest copyObjectRequest, final ApiCallback _callback) throws ApiException { + // verify the required parameter 'copyObjectRequest' is set + if (copyObjectRequest == null) { + throw new ApiException( + "Missing the required parameter 'copyObjectRequest' when calling" + + " copyObject(Async)"); + } + + return copyObjectCall(copyObjectRequest, _callback); + } + + /** + * Makes a copy of an Answer or Liveboard Version: 10.3.0.cl or later Creates a copy of a + * metadata object. Requires at least view access to the metadata object being copied. Upon + * successful execution, the API creates a copy of the metadata object specified in the API + * request and returns the ID of the new object. + * + * @param copyObjectRequest (required) + * @return ResponseCopyObject + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the + * response body + * @http.response.details + * + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 Successfully created a copy of the object -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
404 Object not found -
500 Unexpected error -
+ */ + public ResponseCopyObject copyObject(CopyObjectRequest copyObjectRequest) throws ApiException { + ApiResponse localVarResp = copyObjectWithHttpInfo(copyObjectRequest); + return localVarResp.getData(); + } + + /** + * Makes a copy of an Answer or Liveboard Version: 10.3.0.cl or later Creates a copy of a + * metadata object. Requires at least view access to the metadata object being copied. Upon + * successful execution, the API creates a copy of the metadata object specified in the API + * request and returns the ID of the new object. + * + * @param copyObjectRequest (required) + * @return ApiResponse<ResponseCopyObject> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the + * response body + * @http.response.details + * + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 Successfully created a copy of the object -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
404 Object not found -
500 Unexpected error -
+ */ + public ApiResponse copyObjectWithHttpInfo( + CopyObjectRequest copyObjectRequest) throws ApiException { + okhttp3.Call localVarCall = copyObjectValidateBeforeCall(copyObjectRequest, null); + Type localVarReturnType = new TypeToken() {}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); + } + + /** + * (asynchronously) Makes a copy of an Answer or Liveboard Version: 10.3.0.cl or later Creates a + * copy of a metadata object. Requires at least view access to the metadata object being copied. + * Upon successful execution, the API creates a copy of the metadata object specified in the API + * request and returns the ID of the new object. + * + * @param copyObjectRequest (required) + * @param _callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body + * object + * @http.response.details + * + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 Successfully created a copy of the object -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
404 Object not found -
500 Unexpected error -
+ */ + public okhttp3.Call copyObjectAsync( + CopyObjectRequest copyObjectRequest, final ApiCallback _callback) + throws ApiException { + + okhttp3.Call localVarCall = copyObjectValidateBeforeCall(copyObjectRequest, _callback); + Type localVarReturnType = new TypeToken() {}.getType(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; + } + /** + * Build call for createAgentConversation + * + * @param createAgentConversationRequest (required) + * @param _callback Callback for upload/download progress + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + * @http.response.details + * + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 Common successful response -
201 Common error response -
400 Operation failed -
401 Unauthorized access. -
403 Forbidden access. -
500 Operation failed -
+ */ + public okhttp3.Call createAgentConversationCall( + CreateAgentConversationRequest createAgentConversationRequest, + final ApiCallback _callback) + throws ApiException { + String basePath = null; + // Operation Servers + String[] localBasePaths = new String[] {}; + + // Determine Base Path to Use + if (localCustomBaseUrl != null) { + basePath = localCustomBaseUrl; + } else if (localBasePaths.length > 0) { + basePath = localBasePaths[localHostIndex]; + } else { + basePath = null; + } + + Object localVarPostBody = createAgentConversationRequest; + + // create path and map variables + String localVarPath = "/api/rest/2.0/ai/agent/conversation/create"; + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + final String[] localVarAccepts = {"application/json"}; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = {"application/json"}; + final String localVarContentType = + localVarApiClient.selectHeaderContentType(localVarContentTypes); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } + + String[] localVarAuthNames = new String[] {"bearerAuth"}; + return localVarApiClient.buildCall( + basePath, + localVarPath, + "POST", + localVarQueryParams, + localVarCollectionQueryParams, + localVarPostBody, + localVarHeaderParams, + localVarCookieParams, + localVarFormParams, + localVarAuthNames, + _callback); + } + + @SuppressWarnings("rawtypes") + private okhttp3.Call createAgentConversationValidateBeforeCall( + CreateAgentConversationRequest createAgentConversationRequest, + final ApiCallback _callback) + throws ApiException { + // verify the required parameter 'createAgentConversationRequest' is set + if (createAgentConversationRequest == null) { + throw new ApiException( + "Missing the required parameter 'createAgentConversationRequest' when calling" + + " createAgentConversation(Async)"); + } + + return createAgentConversationCall(createAgentConversationRequest, _callback); + } + + /** + * Version: 26.2.0.cl or later Creates a new Spotter agent conversation based on the provided + * context and settings. The endpoint was in Beta from 26.2.0.cl through 26.4.0.cl. Requires + * `CAN_USE_SPOTTER` privilege and at least view access to the metadata object + * specified in the request. #### Usage guidelines The request must include the + * `metadata_context` parameter to define the conversation context. The context type + * can be one of: - `DATA_SOURCE` *(available from 26.5.0.cl)*: targets a specific + * data source. Provide `data_source_identifier` in `data_source_context` + * for a single data source, or `data_source_identifiers` for multi-data-source + * context. The deprecated `guid` field is accepted for backwards compatibility. - + * `AUTO_MODE` *(available from 26.5.0.cl)*: automatically discovers and selects the + * most relevant datasets for the user's queries. > **Note for callers on versions + * 26.2.0.cl – 26.4.0.cl (Beta):** use the lowercase `data_source` enum value with the + * `guid` field instead of the above. Example: `{ \"type\": + * \"data_source\", \"data_source_context\": { \"guid\": + * \"<worksheet-id>\" } }`. The `conversation_settings` parameter + * controls which Spotter capabilities are enabled for the conversation: - + * `enable_contextual_change_analysis` (default: `true`, **deprecated from + * 26.2.0.cl**) — always enabled in Spotter 3; setting this to `false` has no effect + * on versions >= 26.2.0.cl - `enable_natural_language_answer_generation` + * (default: `true`, **deprecated from 26.2.0.cl**) — always enabled in Spotter 3; + * setting this to `false` has no effect on versions >= 26.2.0.cl - + * `enable_reasoning` (default: `true`, **deprecated from 26.2.0.cl**) — + * always enabled in Spotter 3; setting this to `false` has no effect on versions + * >= 26.2.0.cl - `enable_save_chat` (default: `false`, *available + * from 26.5.0.cl*) — enables saving the conversation for later retrieval via conversation + * history If the request is successful, the response includes a unique + * `conversation_identifier` that must be passed to + * `sendAgentConversationMessage` or `sendAgentConversationMessageStreaming` + * to send messages within this conversation. The response also includes + * `conversation_id` with the same value for backwards compatibility; use + * `conversation_identifier` for new integrations. #### Example request + * ```json { \"metadata_context\": { \"type\": + * \"DATA_SOURCE\", \"data_source_context\": { + * \"data_source_identifier\": \"a1b2c3d4-e5f6-7890-abcd-ef1234567890\" } }, + * \"conversation_settings\": {} } ``` #### Error responses | Code | + * Description | | ---- | + * --------------------------------------------------------------------------------------------------------------------------------------- + * | | 401 | Unauthorized — authentication token is missing, expired, or invalid. | | 403 | + * Forbidden — the authenticated user does not have `CAN_USE_SPOTTER` privilege or + * lacks view permission on the specified metadata object. | > ###### Note: > > - This + * endpoint was in Beta from 26.2.0.cl through 26.4.0.cl and is Generally Available from version + * 26.5.0.cl. > - This endpoint requires Spotter - please contact ThoughtSpot support to + * enable Spotter on your cluster. + * + * @param createAgentConversationRequest (required) + * @return AgentConversation + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the + * response body + * @http.response.details + * + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 Common successful response -
201 Common error response -
400 Operation failed -
401 Unauthorized access. -
403 Forbidden access. -
500 Operation failed -
+ */ + public AgentConversation createAgentConversation( + CreateAgentConversationRequest createAgentConversationRequest) throws ApiException { + ApiResponse localVarResp = + createAgentConversationWithHttpInfo(createAgentConversationRequest); + return localVarResp.getData(); + } + + /** + * Version: 26.2.0.cl or later Creates a new Spotter agent conversation based on the provided + * context and settings. The endpoint was in Beta from 26.2.0.cl through 26.4.0.cl. Requires + * `CAN_USE_SPOTTER` privilege and at least view access to the metadata object + * specified in the request. #### Usage guidelines The request must include the + * `metadata_context` parameter to define the conversation context. The context type + * can be one of: - `DATA_SOURCE` *(available from 26.5.0.cl)*: targets a specific + * data source. Provide `data_source_identifier` in `data_source_context` + * for a single data source, or `data_source_identifiers` for multi-data-source + * context. The deprecated `guid` field is accepted for backwards compatibility. - + * `AUTO_MODE` *(available from 26.5.0.cl)*: automatically discovers and selects the + * most relevant datasets for the user's queries. > **Note for callers on versions + * 26.2.0.cl – 26.4.0.cl (Beta):** use the lowercase `data_source` enum value with the + * `guid` field instead of the above. Example: `{ \"type\": + * \"data_source\", \"data_source_context\": { \"guid\": + * \"<worksheet-id>\" } }`. The `conversation_settings` parameter + * controls which Spotter capabilities are enabled for the conversation: - + * `enable_contextual_change_analysis` (default: `true`, **deprecated from + * 26.2.0.cl**) — always enabled in Spotter 3; setting this to `false` has no effect + * on versions >= 26.2.0.cl - `enable_natural_language_answer_generation` + * (default: `true`, **deprecated from 26.2.0.cl**) — always enabled in Spotter 3; + * setting this to `false` has no effect on versions >= 26.2.0.cl - + * `enable_reasoning` (default: `true`, **deprecated from 26.2.0.cl**) — + * always enabled in Spotter 3; setting this to `false` has no effect on versions + * >= 26.2.0.cl - `enable_save_chat` (default: `false`, *available + * from 26.5.0.cl*) — enables saving the conversation for later retrieval via conversation + * history If the request is successful, the response includes a unique + * `conversation_identifier` that must be passed to + * `sendAgentConversationMessage` or `sendAgentConversationMessageStreaming` + * to send messages within this conversation. The response also includes + * `conversation_id` with the same value for backwards compatibility; use + * `conversation_identifier` for new integrations. #### Example request + * ```json { \"metadata_context\": { \"type\": + * \"DATA_SOURCE\", \"data_source_context\": { + * \"data_source_identifier\": \"a1b2c3d4-e5f6-7890-abcd-ef1234567890\" } }, + * \"conversation_settings\": {} } ``` #### Error responses | Code | + * Description | | ---- | + * --------------------------------------------------------------------------------------------------------------------------------------- + * | | 401 | Unauthorized — authentication token is missing, expired, or invalid. | | 403 | + * Forbidden — the authenticated user does not have `CAN_USE_SPOTTER` privilege or + * lacks view permission on the specified metadata object. | > ###### Note: > > - This + * endpoint was in Beta from 26.2.0.cl through 26.4.0.cl and is Generally Available from version + * 26.5.0.cl. > - This endpoint requires Spotter - please contact ThoughtSpot support to + * enable Spotter on your cluster. + * + * @param createAgentConversationRequest (required) + * @return ApiResponse<AgentConversation> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the + * response body + * @http.response.details + * + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 Common successful response -
201 Common error response -
400 Operation failed -
401 Unauthorized access. -
403 Forbidden access. -
500 Operation failed -
+ */ + public ApiResponse createAgentConversationWithHttpInfo( + CreateAgentConversationRequest createAgentConversationRequest) throws ApiException { + okhttp3.Call localVarCall = + createAgentConversationValidateBeforeCall(createAgentConversationRequest, null); + Type localVarReturnType = new TypeToken() {}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); + } + + /** + * (asynchronously) Version: 26.2.0.cl or later Creates a new Spotter agent conversation based + * on the provided context and settings. The endpoint was in Beta from 26.2.0.cl through + * 26.4.0.cl. Requires `CAN_USE_SPOTTER` privilege and at least view access to the + * metadata object specified in the request. #### Usage guidelines The request must include the + * `metadata_context` parameter to define the conversation context. The context type + * can be one of: - `DATA_SOURCE` *(available from 26.5.0.cl)*: targets a specific + * data source. Provide `data_source_identifier` in `data_source_context` + * for a single data source, or `data_source_identifiers` for multi-data-source + * context. The deprecated `guid` field is accepted for backwards compatibility. - + * `AUTO_MODE` *(available from 26.5.0.cl)*: automatically discovers and selects the + * most relevant datasets for the user's queries. > **Note for callers on versions + * 26.2.0.cl – 26.4.0.cl (Beta):** use the lowercase `data_source` enum value with the + * `guid` field instead of the above. Example: `{ \"type\": + * \"data_source\", \"data_source_context\": { \"guid\": + * \"<worksheet-id>\" } }`. The `conversation_settings` parameter + * controls which Spotter capabilities are enabled for the conversation: - + * `enable_contextual_change_analysis` (default: `true`, **deprecated from + * 26.2.0.cl**) — always enabled in Spotter 3; setting this to `false` has no effect + * on versions >= 26.2.0.cl - `enable_natural_language_answer_generation` + * (default: `true`, **deprecated from 26.2.0.cl**) — always enabled in Spotter 3; + * setting this to `false` has no effect on versions >= 26.2.0.cl - + * `enable_reasoning` (default: `true`, **deprecated from 26.2.0.cl**) — + * always enabled in Spotter 3; setting this to `false` has no effect on versions + * >= 26.2.0.cl - `enable_save_chat` (default: `false`, *available + * from 26.5.0.cl*) — enables saving the conversation for later retrieval via conversation + * history If the request is successful, the response includes a unique + * `conversation_identifier` that must be passed to + * `sendAgentConversationMessage` or `sendAgentConversationMessageStreaming` + * to send messages within this conversation. The response also includes + * `conversation_id` with the same value for backwards compatibility; use + * `conversation_identifier` for new integrations. #### Example request + * ```json { \"metadata_context\": { \"type\": + * \"DATA_SOURCE\", \"data_source_context\": { + * \"data_source_identifier\": \"a1b2c3d4-e5f6-7890-abcd-ef1234567890\" } }, + * \"conversation_settings\": {} } ``` #### Error responses | Code | + * Description | | ---- | + * --------------------------------------------------------------------------------------------------------------------------------------- + * | | 401 | Unauthorized — authentication token is missing, expired, or invalid. | | 403 | + * Forbidden — the authenticated user does not have `CAN_USE_SPOTTER` privilege or + * lacks view permission on the specified metadata object. | > ###### Note: > > - This + * endpoint was in Beta from 26.2.0.cl through 26.4.0.cl and is Generally Available from version + * 26.5.0.cl. > - This endpoint requires Spotter - please contact ThoughtSpot support to + * enable Spotter on your cluster. + * + * @param createAgentConversationRequest (required) + * @param _callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body + * object + * @http.response.details + * + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 Common successful response -
201 Common error response -
400 Operation failed -
401 Unauthorized access. -
403 Forbidden access. -
500 Operation failed -
+ */ + public okhttp3.Call createAgentConversationAsync( + CreateAgentConversationRequest createAgentConversationRequest, + final ApiCallback _callback) + throws ApiException { + + okhttp3.Call localVarCall = + createAgentConversationValidateBeforeCall( + createAgentConversationRequest, _callback); + Type localVarReturnType = new TypeToken() {}.getType(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; + } + /** + * Build call for createCalendar + * + * @param createCalendarRequest (required) + * @param _callback Callback for upload/download progress + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 Custom calendar created successfully. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public okhttp3.Call createCalendarCall( + CreateCalendarRequest createCalendarRequest, final ApiCallback _callback) + throws ApiException { + String basePath = null; + // Operation Servers + String[] localBasePaths = new String[] {}; + + // Determine Base Path to Use + if (localCustomBaseUrl != null) { + basePath = localCustomBaseUrl; + } else if (localBasePaths.length > 0) { + basePath = localBasePaths[localHostIndex]; + } else { + basePath = null; + } + + Object localVarPostBody = createCalendarRequest; + + // create path and map variables + String localVarPath = "/api/rest/2.0/calendars/create"; + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + final String[] localVarAccepts = {"application/json"}; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = {"application/json"}; + final String localVarContentType = + localVarApiClient.selectHeaderContentType(localVarContentTypes); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } + + String[] localVarAuthNames = new String[] {"bearerAuth"}; + return localVarApiClient.buildCall( + basePath, + localVarPath, + "POST", + localVarQueryParams, + localVarCollectionQueryParams, + localVarPostBody, + localVarHeaderParams, + localVarCookieParams, + localVarFormParams, + localVarAuthNames, + _callback); + } + + @SuppressWarnings("rawtypes") + private okhttp3.Call createCalendarValidateBeforeCall( + CreateCalendarRequest createCalendarRequest, final ApiCallback _callback) + throws ApiException { + // verify the required parameter 'createCalendarRequest' is set + if (createCalendarRequest == null) { + throw new ApiException( + "Missing the required parameter 'createCalendarRequest' when calling" + + " createCalendar(Async)"); + } + + return createCalendarCall(createCalendarRequest, _callback); + } + + /** + * Version: 10.12.0.cl or later Creates a new [custom + * calendar](https://docs.thoughtspot.com/cloud/latest/connections-cust-cal). Requires + * `DATAMANAGEMENT` (**Can manage data**) or `ADMINISTRATION` (**Can + * administer ThoughtSpot**) privilege. If [Role-Based Access Control + * (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your ThoughtSpot + * instance, the `CAN_MANAGE_CUSTOM_CALENDAR` (**Can manage custom calendars**) + * privilege is required. #### Usage guidelines You can create a custom calendar from scratch or + * an existing Table in ThoughtSpot. For both methods of calendar creation, the following + * parameters are required: * Name of the custom calendar. * Calendar creation method. To create + * a calendar from an existing table, specify the method: - `FROM_EXISTING_TABLE` - + * Creates calendar from the table reference provided in the API request. - + * `FROM_INPUT_PARAMS` - Creates a calendar from the parameters defined in the API + * request. * Connection ID and Table name * Database and schema name attributes: For most Cloud + * Data Warehouse (CDW) connectors, both `database_name` and `schema_name` + * attributes are required. However, the attribute requirements are conditional and vary based + * on the connector type and its metadata structure. For example, for connectors such as + * Teradata, MySQL, SingleSore, Amazon Aurora MySQL, Amazon RDS MySQL, Oracle, and GCP_MYSQL, + * the `schema_name` is required, whereas the `database_name` attribute is + * not. Similarly, connectors such as ClickHouse require you to specify the + * `database_name` and the schema specification in such cases is optional. **NOTE**: + * If you are creating a calendar from an existing table, ensure that the referenced table + * matches the required DDL for custom calendars. If the schema does not match, the API returns + * an error. ##### Calendar type The API allows you to create the following types of calendars: + * * `MONTH_OFFSET`. The default calendar type. A `MONTH_OFFSET` calendar is + * offset by a few months from the standard calendar months (January to December) and the year + * begins with the month defined in the request. For example, if the `month_offset` + * value is set as `April`, the calendar year begins in April. * `4-4-5`. + * Each quarter in the calendar will include two 4-week months followed by one 5-week month. * + * `4-5-4`. Each quarter in the calendar will include two 4-week months with a 5-week + * month between. * `5-4-4`. Each quarter begins with a 5-week month, followed by two + * 4-week months. To start and end the calendar on a specific date, specify the dates in the + * `MM/DD/YYYY` format. For `MONTH_OFFSET` calendars, ensure that the + * `start_date` matches the month specified in the `month_offset` attribute. + * You can also set the starting day of the week and customize the prefixes for year and quarter + * labels. #### Examples To create a calendar from an existing table: ``` { + * \"name\": \"MyCustomCalendar1\", \"table_reference\": { + * \"connection_identifier\": \"4db8ea22-2ff4-4224-b05a-26674717e468\", + * \"table_name\": \"MyCalendarTable\", \"database_name\": + * \"RETAILAPPAREL\", \"schema_name\": \"PUBLIC\" }, + * \"creation_method\": \"FROM_EXISTING_TABLE\", } ``` To + * create a calendar from scratch: ``` { \"name\": + * \"MyCustomCalendar1\", \"table_reference\": { + * \"connection_identifier\": \"4db8ea22-2ff4-4224-b05a-26674717e468\", + * \"table_name\": \"MyCalendarTable\", \"database_name\": + * \"RETAILAPPAREL\", \"schema_name\": \"PUBLIC\" }, + * \"creation_method\": \"FROM_INPUT_PARAMS\", \"calendar_type\": + * \"MONTH_OFFSET\", \"month_offset\": \"April\", + * \"start_day_of_week\": \"Monday\", \"quarter_name_prefix\": + * \"Q\", \"year_name_prefix\": \"FY\", \"start_date\": + * \"04/01/2025\", \"end_date\": \"04/31/2025\" } + * ``` + * + * @param createCalendarRequest (required) + * @return CalendarResponse + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the + * response body + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 Custom calendar created successfully. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public CalendarResponse createCalendar(CreateCalendarRequest createCalendarRequest) + throws ApiException { + ApiResponse localVarResp = + createCalendarWithHttpInfo(createCalendarRequest); + return localVarResp.getData(); + } + + /** + * Version: 10.12.0.cl or later Creates a new [custom + * calendar](https://docs.thoughtspot.com/cloud/latest/connections-cust-cal). Requires + * `DATAMANAGEMENT` (**Can manage data**) or `ADMINISTRATION` (**Can + * administer ThoughtSpot**) privilege. If [Role-Based Access Control + * (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your ThoughtSpot + * instance, the `CAN_MANAGE_CUSTOM_CALENDAR` (**Can manage custom calendars**) + * privilege is required. #### Usage guidelines You can create a custom calendar from scratch or + * an existing Table in ThoughtSpot. For both methods of calendar creation, the following + * parameters are required: * Name of the custom calendar. * Calendar creation method. To create + * a calendar from an existing table, specify the method: - `FROM_EXISTING_TABLE` - + * Creates calendar from the table reference provided in the API request. - + * `FROM_INPUT_PARAMS` - Creates a calendar from the parameters defined in the API + * request. * Connection ID and Table name * Database and schema name attributes: For most Cloud + * Data Warehouse (CDW) connectors, both `database_name` and `schema_name` + * attributes are required. However, the attribute requirements are conditional and vary based + * on the connector type and its metadata structure. For example, for connectors such as + * Teradata, MySQL, SingleSore, Amazon Aurora MySQL, Amazon RDS MySQL, Oracle, and GCP_MYSQL, + * the `schema_name` is required, whereas the `database_name` attribute is + * not. Similarly, connectors such as ClickHouse require you to specify the + * `database_name` and the schema specification in such cases is optional. **NOTE**: + * If you are creating a calendar from an existing table, ensure that the referenced table + * matches the required DDL for custom calendars. If the schema does not match, the API returns + * an error. ##### Calendar type The API allows you to create the following types of calendars: + * * `MONTH_OFFSET`. The default calendar type. A `MONTH_OFFSET` calendar is + * offset by a few months from the standard calendar months (January to December) and the year + * begins with the month defined in the request. For example, if the `month_offset` + * value is set as `April`, the calendar year begins in April. * `4-4-5`. + * Each quarter in the calendar will include two 4-week months followed by one 5-week month. * + * `4-5-4`. Each quarter in the calendar will include two 4-week months with a 5-week + * month between. * `5-4-4`. Each quarter begins with a 5-week month, followed by two + * 4-week months. To start and end the calendar on a specific date, specify the dates in the + * `MM/DD/YYYY` format. For `MONTH_OFFSET` calendars, ensure that the + * `start_date` matches the month specified in the `month_offset` attribute. + * You can also set the starting day of the week and customize the prefixes for year and quarter + * labels. #### Examples To create a calendar from an existing table: ``` { + * \"name\": \"MyCustomCalendar1\", \"table_reference\": { + * \"connection_identifier\": \"4db8ea22-2ff4-4224-b05a-26674717e468\", + * \"table_name\": \"MyCalendarTable\", \"database_name\": + * \"RETAILAPPAREL\", \"schema_name\": \"PUBLIC\" }, + * \"creation_method\": \"FROM_EXISTING_TABLE\", } ``` To + * create a calendar from scratch: ``` { \"name\": + * \"MyCustomCalendar1\", \"table_reference\": { + * \"connection_identifier\": \"4db8ea22-2ff4-4224-b05a-26674717e468\", + * \"table_name\": \"MyCalendarTable\", \"database_name\": + * \"RETAILAPPAREL\", \"schema_name\": \"PUBLIC\" }, + * \"creation_method\": \"FROM_INPUT_PARAMS\", \"calendar_type\": + * \"MONTH_OFFSET\", \"month_offset\": \"April\", + * \"start_day_of_week\": \"Monday\", \"quarter_name_prefix\": + * \"Q\", \"year_name_prefix\": \"FY\", \"start_date\": + * \"04/01/2025\", \"end_date\": \"04/31/2025\" } + * ``` + * + * @param createCalendarRequest (required) + * @return ApiResponse<CalendarResponse> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the + * response body + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 Custom calendar created successfully. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public ApiResponse createCalendarWithHttpInfo( + CreateCalendarRequest createCalendarRequest) throws ApiException { + okhttp3.Call localVarCall = createCalendarValidateBeforeCall(createCalendarRequest, null); + Type localVarReturnType = new TypeToken() {}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); + } + + /** + * (asynchronously) Version: 10.12.0.cl or later Creates a new [custom + * calendar](https://docs.thoughtspot.com/cloud/latest/connections-cust-cal). Requires + * `DATAMANAGEMENT` (**Can manage data**) or `ADMINISTRATION` (**Can + * administer ThoughtSpot**) privilege. If [Role-Based Access Control + * (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your ThoughtSpot + * instance, the `CAN_MANAGE_CUSTOM_CALENDAR` (**Can manage custom calendars**) + * privilege is required. #### Usage guidelines You can create a custom calendar from scratch or + * an existing Table in ThoughtSpot. For both methods of calendar creation, the following + * parameters are required: * Name of the custom calendar. * Calendar creation method. To create + * a calendar from an existing table, specify the method: - `FROM_EXISTING_TABLE` - + * Creates calendar from the table reference provided in the API request. - + * `FROM_INPUT_PARAMS` - Creates a calendar from the parameters defined in the API + * request. * Connection ID and Table name * Database and schema name attributes: For most Cloud + * Data Warehouse (CDW) connectors, both `database_name` and `schema_name` + * attributes are required. However, the attribute requirements are conditional and vary based + * on the connector type and its metadata structure. For example, for connectors such as + * Teradata, MySQL, SingleSore, Amazon Aurora MySQL, Amazon RDS MySQL, Oracle, and GCP_MYSQL, + * the `schema_name` is required, whereas the `database_name` attribute is + * not. Similarly, connectors such as ClickHouse require you to specify the + * `database_name` and the schema specification in such cases is optional. **NOTE**: + * If you are creating a calendar from an existing table, ensure that the referenced table + * matches the required DDL for custom calendars. If the schema does not match, the API returns + * an error. ##### Calendar type The API allows you to create the following types of calendars: + * * `MONTH_OFFSET`. The default calendar type. A `MONTH_OFFSET` calendar is + * offset by a few months from the standard calendar months (January to December) and the year + * begins with the month defined in the request. For example, if the `month_offset` + * value is set as `April`, the calendar year begins in April. * `4-4-5`. + * Each quarter in the calendar will include two 4-week months followed by one 5-week month. * + * `4-5-4`. Each quarter in the calendar will include two 4-week months with a 5-week + * month between. * `5-4-4`. Each quarter begins with a 5-week month, followed by two + * 4-week months. To start and end the calendar on a specific date, specify the dates in the + * `MM/DD/YYYY` format. For `MONTH_OFFSET` calendars, ensure that the + * `start_date` matches the month specified in the `month_offset` attribute. + * You can also set the starting day of the week and customize the prefixes for year and quarter + * labels. #### Examples To create a calendar from an existing table: ``` { + * \"name\": \"MyCustomCalendar1\", \"table_reference\": { + * \"connection_identifier\": \"4db8ea22-2ff4-4224-b05a-26674717e468\", + * \"table_name\": \"MyCalendarTable\", \"database_name\": + * \"RETAILAPPAREL\", \"schema_name\": \"PUBLIC\" }, + * \"creation_method\": \"FROM_EXISTING_TABLE\", } ``` To + * create a calendar from scratch: ``` { \"name\": + * \"MyCustomCalendar1\", \"table_reference\": { + * \"connection_identifier\": \"4db8ea22-2ff4-4224-b05a-26674717e468\", + * \"table_name\": \"MyCalendarTable\", \"database_name\": + * \"RETAILAPPAREL\", \"schema_name\": \"PUBLIC\" }, + * \"creation_method\": \"FROM_INPUT_PARAMS\", \"calendar_type\": + * \"MONTH_OFFSET\", \"month_offset\": \"April\", + * \"start_day_of_week\": \"Monday\", \"quarter_name_prefix\": + * \"Q\", \"year_name_prefix\": \"FY\", \"start_date\": + * \"04/01/2025\", \"end_date\": \"04/31/2025\" } + * ``` + * + * @param createCalendarRequest (required) + * @param _callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body + * object + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 Custom calendar created successfully. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public okhttp3.Call createCalendarAsync( + CreateCalendarRequest createCalendarRequest, + final ApiCallback _callback) + throws ApiException { + + okhttp3.Call localVarCall = + createCalendarValidateBeforeCall(createCalendarRequest, _callback); + Type localVarReturnType = new TypeToken() {}.getType(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; + } + /** + * Build call for createCollection + * + * @param createCollectionRequest (required) + * @param _callback Callback for upload/download progress + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 Collection created successfully -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public okhttp3.Call createCollectionCall( + CreateCollectionRequest createCollectionRequest, final ApiCallback _callback) + throws ApiException { + String basePath = null; + // Operation Servers + String[] localBasePaths = new String[] {}; + + // Determine Base Path to Use + if (localCustomBaseUrl != null) { + basePath = localCustomBaseUrl; + } else if (localBasePaths.length > 0) { + basePath = localBasePaths[localHostIndex]; + } else { + basePath = null; + } + + Object localVarPostBody = createCollectionRequest; + + // create path and map variables + String localVarPath = "/api/rest/2.0/collections/create"; + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + final String[] localVarAccepts = {"application/json"}; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = {"application/json"}; + final String localVarContentType = + localVarApiClient.selectHeaderContentType(localVarContentTypes); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } + + String[] localVarAuthNames = new String[] {"bearerAuth"}; + return localVarApiClient.buildCall( + basePath, + localVarPath, + "POST", + localVarQueryParams, + localVarCollectionQueryParams, + localVarPostBody, + localVarHeaderParams, + localVarCookieParams, + localVarFormParams, + localVarAuthNames, + _callback); + } + + @SuppressWarnings("rawtypes") + private okhttp3.Call createCollectionValidateBeforeCall( + CreateCollectionRequest createCollectionRequest, final ApiCallback _callback) + throws ApiException { + // verify the required parameter 'createCollectionRequest' is set + if (createCollectionRequest == null) { + throw new ApiException( + "Missing the required parameter 'createCollectionRequest' when calling" + + " createCollection(Async)"); + } + + return createCollectionCall(createCollectionRequest, _callback); + } + + /** + * Version: 26.4.0.cl or later Creates a new collection in ThoughtSpot. Collections allow you to + * organize and group related metadata objects such as Liveboards, Answers, worksheets, and + * other data objects. You can also create nested collections (sub-collections) to build a + * hierarchical structure. #### Supported operations The API endpoint lets you perform the + * following operations: * Create a new collection * Add metadata objects (Liveboards, Answers, + * Logical Tables) to the collection * Create nested collections by adding sub-collections + * + * @param createCollectionRequest (required) + * @return Collection + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the + * response body + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 Collection created successfully -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public Collection createCollection(CreateCollectionRequest createCollectionRequest) + throws ApiException { + ApiResponse localVarResp = + createCollectionWithHttpInfo(createCollectionRequest); + return localVarResp.getData(); + } + + /** + * Version: 26.4.0.cl or later Creates a new collection in ThoughtSpot. Collections allow you to + * organize and group related metadata objects such as Liveboards, Answers, worksheets, and + * other data objects. You can also create nested collections (sub-collections) to build a + * hierarchical structure. #### Supported operations The API endpoint lets you perform the + * following operations: * Create a new collection * Add metadata objects (Liveboards, Answers, + * Logical Tables) to the collection * Create nested collections by adding sub-collections + * + * @param createCollectionRequest (required) + * @return ApiResponse<Collection> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the + * response body + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 Collection created successfully -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public ApiResponse createCollectionWithHttpInfo( + CreateCollectionRequest createCollectionRequest) throws ApiException { + okhttp3.Call localVarCall = + createCollectionValidateBeforeCall(createCollectionRequest, null); + Type localVarReturnType = new TypeToken() {}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); + } + + /** + * (asynchronously) Version: 26.4.0.cl or later Creates a new collection in ThoughtSpot. + * Collections allow you to organize and group related metadata objects such as Liveboards, + * Answers, worksheets, and other data objects. You can also create nested collections + * (sub-collections) to build a hierarchical structure. #### Supported operations The API + * endpoint lets you perform the following operations: * Create a new collection * Add metadata + * objects (Liveboards, Answers, Logical Tables) to the collection * Create nested collections + * by adding sub-collections + * + * @param createCollectionRequest (required) + * @param _callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body + * object + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 Collection created successfully -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public okhttp3.Call createCollectionAsync( + CreateCollectionRequest createCollectionRequest, + final ApiCallback _callback) + throws ApiException { + + okhttp3.Call localVarCall = + createCollectionValidateBeforeCall(createCollectionRequest, _callback); + Type localVarReturnType = new TypeToken() {}.getType(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; + } + /** + * Build call for createConfig + * + * @param createConfigRequest (required) + * @param _callback Callback for upload/download progress + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 Successfully configured local repository -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public okhttp3.Call createConfigCall( + CreateConfigRequest createConfigRequest, final ApiCallback _callback) + throws ApiException { + String basePath = null; + // Operation Servers + String[] localBasePaths = new String[] {}; + + // Determine Base Path to Use + if (localCustomBaseUrl != null) { + basePath = localCustomBaseUrl; + } else if (localBasePaths.length > 0) { + basePath = localBasePaths[localHostIndex]; + } else { + basePath = null; + } + + Object localVarPostBody = createConfigRequest; + + // create path and map variables + String localVarPath = "/api/rest/2.0/vcs/git/config/create"; + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + final String[] localVarAccepts = {"application/json"}; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = {"application/json"}; + final String localVarContentType = + localVarApiClient.selectHeaderContentType(localVarContentTypes); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } + + String[] localVarAuthNames = new String[] {"bearerAuth"}; + return localVarApiClient.buildCall( + basePath, + localVarPath, + "POST", + localVarQueryParams, + localVarCollectionQueryParams, + localVarPostBody, + localVarHeaderParams, + localVarCookieParams, + localVarFormParams, + localVarAuthNames, + _callback); + } + + @SuppressWarnings("rawtypes") + private okhttp3.Call createConfigValidateBeforeCall( + CreateConfigRequest createConfigRequest, final ApiCallback _callback) + throws ApiException { + // verify the required parameter 'createConfigRequest' is set + if (createConfigRequest == null) { + throw new ApiException( + "Missing the required parameter 'createConfigRequest' when calling" + + " createConfig(Async)"); + } + + return createConfigCall(createConfigRequest, _callback); + } + + /** + * Version: 9.2.0.cl or later Allows you to connect a ThoughtSpot instance to a Git repository. + * Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If + * [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled + * on your instance on your instance, the `CAN_SETUP_VERSION_CONTROL` (**Can set up + * version control**) privilege. You can use this API endpoint to connect your ThoughtSpot + * development and production environments to the development and production branches of a Git + * repository. Before using this endpoint to connect your ThoughtSpot instance to a Git + * repository, check the following prerequisites: * You have a Git repository. If you are using + * GitHub, make sure you have a valid account and an access token to connect ThoughtSpot to + * GitHub. For information about generating a token, see [GitHub + * Documentation](https://docs.github.com/en/authentication/keeping-your-account-and-data-secure/managing-your-personal-access-tokens). + * * Your access token has `repo` scope that grants full access to public and private + * repositories. * Your Git repository has a branch that can be configured as a default branch + * in ThoughtSpot. For more information, see [Git integration + * documentation](https://developers.thoughtspot.com/docs/?pageid=git-integration). + * **Note**: ThoughtSpot supports only GitHub / itHub Enterprise for CI/CD. + * + * @param createConfigRequest (required) + * @return RepoConfigObject + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the + * response body + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 Successfully configured local repository -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public RepoConfigObject createConfig(CreateConfigRequest createConfigRequest) + throws ApiException { + ApiResponse localVarResp = createConfigWithHttpInfo(createConfigRequest); + return localVarResp.getData(); + } + + /** + * Version: 9.2.0.cl or later Allows you to connect a ThoughtSpot instance to a Git repository. + * Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If + * [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled + * on your instance on your instance, the `CAN_SETUP_VERSION_CONTROL` (**Can set up + * version control**) privilege. You can use this API endpoint to connect your ThoughtSpot + * development and production environments to the development and production branches of a Git + * repository. Before using this endpoint to connect your ThoughtSpot instance to a Git + * repository, check the following prerequisites: * You have a Git repository. If you are using + * GitHub, make sure you have a valid account and an access token to connect ThoughtSpot to + * GitHub. For information about generating a token, see [GitHub + * Documentation](https://docs.github.com/en/authentication/keeping-your-account-and-data-secure/managing-your-personal-access-tokens). + * * Your access token has `repo` scope that grants full access to public and private + * repositories. * Your Git repository has a branch that can be configured as a default branch + * in ThoughtSpot. For more information, see [Git integration + * documentation](https://developers.thoughtspot.com/docs/?pageid=git-integration). + * **Note**: ThoughtSpot supports only GitHub / itHub Enterprise for CI/CD. + * + * @param createConfigRequest (required) + * @return ApiResponse<RepoConfigObject> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the + * response body + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 Successfully configured local repository -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public ApiResponse createConfigWithHttpInfo( + CreateConfigRequest createConfigRequest) throws ApiException { + okhttp3.Call localVarCall = createConfigValidateBeforeCall(createConfigRequest, null); + Type localVarReturnType = new TypeToken() {}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); + } + + /** + * (asynchronously) Version: 9.2.0.cl or later Allows you to connect a ThoughtSpot instance to a + * Git repository. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) + * privilege. If [Role-Based Access Control + * (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance on your + * instance, the `CAN_SETUP_VERSION_CONTROL` (**Can set up version control**) + * privilege. You can use this API endpoint to connect your ThoughtSpot development and + * production environments to the development and production branches of a Git repository. + * Before using this endpoint to connect your ThoughtSpot instance to a Git repository, check + * the following prerequisites: * You have a Git repository. If you are using GitHub, make sure + * you have a valid account and an access token to connect ThoughtSpot to GitHub. For + * information about generating a token, see [GitHub + * Documentation](https://docs.github.com/en/authentication/keeping-your-account-and-data-secure/managing-your-personal-access-tokens). + * * Your access token has `repo` scope that grants full access to public and private + * repositories. * Your Git repository has a branch that can be configured as a default branch + * in ThoughtSpot. For more information, see [Git integration + * documentation](https://developers.thoughtspot.com/docs/?pageid=git-integration). + * **Note**: ThoughtSpot supports only GitHub / itHub Enterprise for CI/CD. + * + * @param createConfigRequest (required) + * @param _callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body + * object + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 Successfully configured local repository -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public okhttp3.Call createConfigAsync( + CreateConfigRequest createConfigRequest, final ApiCallback _callback) + throws ApiException { + + okhttp3.Call localVarCall = createConfigValidateBeforeCall(createConfigRequest, _callback); + Type localVarReturnType = new TypeToken() {}.getType(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; + } + /** + * Build call for createConnection + * + * @param createConnectionRequest (required) + * @param _callback Callback for upload/download progress + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 Connection to the datasource successfully created. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public okhttp3.Call createConnectionCall( + CreateConnectionRequest createConnectionRequest, final ApiCallback _callback) + throws ApiException { + String basePath = null; + // Operation Servers + String[] localBasePaths = new String[] {}; + + // Determine Base Path to Use + if (localCustomBaseUrl != null) { + basePath = localCustomBaseUrl; + } else if (localBasePaths.length > 0) { + basePath = localBasePaths[localHostIndex]; + } else { + basePath = null; + } + + Object localVarPostBody = createConnectionRequest; + + // create path and map variables + String localVarPath = "/api/rest/2.0/connection/create"; + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + final String[] localVarAccepts = {"application/json"}; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = {"application/json"}; + final String localVarContentType = + localVarApiClient.selectHeaderContentType(localVarContentTypes); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } + + String[] localVarAuthNames = new String[] {"bearerAuth"}; + return localVarApiClient.buildCall( + basePath, + localVarPath, + "POST", + localVarQueryParams, + localVarCollectionQueryParams, + localVarPostBody, + localVarHeaderParams, + localVarCookieParams, + localVarFormParams, + localVarAuthNames, + _callback); + } + + @SuppressWarnings("rawtypes") + private okhttp3.Call createConnectionValidateBeforeCall( + CreateConnectionRequest createConnectionRequest, final ApiCallback _callback) + throws ApiException { + // verify the required parameter 'createConnectionRequest' is set + if (createConnectionRequest == null) { + throw new ApiException( + "Missing the required parameter 'createConnectionRequest' when calling" + + " createConnection(Async)"); + } + + return createConnectionCall(createConnectionRequest, _callback); + } + + /** + * Version: 9.2.0.cl or later Creates a connection to a data warehouse for live query services. + * Requires `DATAMANAGEMENT` (**Can manage data**) or `ADMINISTRATION` + * (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control + * (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the + * `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) privilege is + * required. #### Create a connection without tables To create a connection without tables: 1. + * Pass these parameters in your API request. * Name of the connection. * Type of the data + * warehouse to connect to. * A JSON map of configuration attributes in + * `data_warehouse_config`. The following example shows the configuration attributes + * for a SnowFlake connection: ``` { \"configuration\":{ + * \"accountName\":\"thoughtspot_partner\", + * \"user\":\"tsadmin\", \"password\":\"TestConn123\", + * \"role\":\"sysadmin\", \"warehouse\":\"MEDIUM_WH\" }, + * \"authenticationType\": \"SERVICE_ACCOUNT\", + * \"externalDatabases\":[ ] } ``` 2. Set `validate` to + * `false`. **NOTE:** If the `authentication_type` is anything other than + * SERVICE_ACCOUNT, you must explicitly provide the authenticationType property in the payload. + * If you do not specify authenticationType, the API will default to SERVICE_ACCOUNT as the + * authentication type. #### Create a connection with tables If [Role-Based Access Control + * (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the + * `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) and + * `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` (**Can manage data models**) privilege is + * required. To create a connection with tables: 1. Pass these parameters in your API request. * + * Name of the connection. * Type of the data warehouse to connect to. * A JSON map of + * configuration attributes, database details, and table properties in + * `data_warehouse_config` as shown in the following example: ``` { + * \"configuration\":{ \"accountName\":\"thoughtspot_partner\", + * \"user\":\"tsadmin\", \"password\":\"TestConn123\", + * \"role\":\"sysadmin\", \"warehouse\":\"MEDIUM_WH\" }, + * \"authenticationType\": \"SERVICE_ACCOUNT\", + * \"externalDatabases\":[ { \"name\":\"AllDatatypes\", + * \"isAutoCreated\":false, \"schemas\":[ { + * \"name\":\"alldatatypes\", \"tables\":[ { + * \"name\":\"allDatatypes\", \"type\":\"TABLE\", + * \"description\":\"\", \"selected\":true, + * \"linked\":true, \"columns\":[ { + * \"name\":\"CNUMBER\", \"type\":\"INT64\", + * \"canImport\":true, \"selected\":true, \"isLinkedActive\":true, + * \"isImported\":false, \"tableName\":\"allDatatypes\", + * \"schemaName\":\"alldatatypes\", + * \"dbName\":\"AllDatatypes\" }, { + * \"name\":\"CDECIMAL\", \"type\":\"INT64\", + * \"canImport\":true, \"selected\":true, \"isLinkedActive\":true, + * \"isImported\":false, \"tableName\":\"allDatatypes\", + * \"schemaName\":\"alldatatypes\", + * \"dbName\":\"AllDatatypes\" } ] } ] } ] } ] } ``` 2. Set + * `validate` to `true`. **NOTE:** If the `authentication_type` is + * anything other than SERVICE_ACCOUNT, you must explicitly provide the authenticationType + * property in the payload. If you do not specify authenticationType, the API will default to + * SERVICE_ACCOUNT as the authentication type. + * + * @param createConnectionRequest (required) + * @return CreateConnectionResponse + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the + * response body + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 Connection to the datasource successfully created. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public CreateConnectionResponse createConnection( + CreateConnectionRequest createConnectionRequest) throws ApiException { + ApiResponse localVarResp = + createConnectionWithHttpInfo(createConnectionRequest); + return localVarResp.getData(); + } + + /** + * Version: 9.2.0.cl or later Creates a connection to a data warehouse for live query services. + * Requires `DATAMANAGEMENT` (**Can manage data**) or `ADMINISTRATION` + * (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control + * (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the + * `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) privilege is + * required. #### Create a connection without tables To create a connection without tables: 1. + * Pass these parameters in your API request. * Name of the connection. * Type of the data + * warehouse to connect to. * A JSON map of configuration attributes in + * `data_warehouse_config`. The following example shows the configuration attributes + * for a SnowFlake connection: ``` { \"configuration\":{ + * \"accountName\":\"thoughtspot_partner\", + * \"user\":\"tsadmin\", \"password\":\"TestConn123\", + * \"role\":\"sysadmin\", \"warehouse\":\"MEDIUM_WH\" }, + * \"authenticationType\": \"SERVICE_ACCOUNT\", + * \"externalDatabases\":[ ] } ``` 2. Set `validate` to + * `false`. **NOTE:** If the `authentication_type` is anything other than + * SERVICE_ACCOUNT, you must explicitly provide the authenticationType property in the payload. + * If you do not specify authenticationType, the API will default to SERVICE_ACCOUNT as the + * authentication type. #### Create a connection with tables If [Role-Based Access Control + * (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the + * `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) and + * `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` (**Can manage data models**) privilege is + * required. To create a connection with tables: 1. Pass these parameters in your API request. * + * Name of the connection. * Type of the data warehouse to connect to. * A JSON map of + * configuration attributes, database details, and table properties in + * `data_warehouse_config` as shown in the following example: ``` { + * \"configuration\":{ \"accountName\":\"thoughtspot_partner\", + * \"user\":\"tsadmin\", \"password\":\"TestConn123\", + * \"role\":\"sysadmin\", \"warehouse\":\"MEDIUM_WH\" }, + * \"authenticationType\": \"SERVICE_ACCOUNT\", + * \"externalDatabases\":[ { \"name\":\"AllDatatypes\", + * \"isAutoCreated\":false, \"schemas\":[ { + * \"name\":\"alldatatypes\", \"tables\":[ { + * \"name\":\"allDatatypes\", \"type\":\"TABLE\", + * \"description\":\"\", \"selected\":true, + * \"linked\":true, \"columns\":[ { + * \"name\":\"CNUMBER\", \"type\":\"INT64\", + * \"canImport\":true, \"selected\":true, \"isLinkedActive\":true, + * \"isImported\":false, \"tableName\":\"allDatatypes\", + * \"schemaName\":\"alldatatypes\", + * \"dbName\":\"AllDatatypes\" }, { + * \"name\":\"CDECIMAL\", \"type\":\"INT64\", + * \"canImport\":true, \"selected\":true, \"isLinkedActive\":true, + * \"isImported\":false, \"tableName\":\"allDatatypes\", + * \"schemaName\":\"alldatatypes\", + * \"dbName\":\"AllDatatypes\" } ] } ] } ] } ] } ``` 2. Set + * `validate` to `true`. **NOTE:** If the `authentication_type` is + * anything other than SERVICE_ACCOUNT, you must explicitly provide the authenticationType + * property in the payload. If you do not specify authenticationType, the API will default to + * SERVICE_ACCOUNT as the authentication type. + * + * @param createConnectionRequest (required) + * @return ApiResponse<CreateConnectionResponse> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the + * response body + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 Connection to the datasource successfully created. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public ApiResponse createConnectionWithHttpInfo( + CreateConnectionRequest createConnectionRequest) throws ApiException { + okhttp3.Call localVarCall = + createConnectionValidateBeforeCall(createConnectionRequest, null); + Type localVarReturnType = new TypeToken() {}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); + } + + /** + * (asynchronously) Version: 9.2.0.cl or later Creates a connection to a data warehouse for live + * query services. Requires `DATAMANAGEMENT` (**Can manage data**) or + * `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access + * Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, + * the `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) privilege is + * required. #### Create a connection without tables To create a connection without tables: 1. + * Pass these parameters in your API request. * Name of the connection. * Type of the data + * warehouse to connect to. * A JSON map of configuration attributes in + * `data_warehouse_config`. The following example shows the configuration attributes + * for a SnowFlake connection: ``` { \"configuration\":{ + * \"accountName\":\"thoughtspot_partner\", + * \"user\":\"tsadmin\", \"password\":\"TestConn123\", + * \"role\":\"sysadmin\", \"warehouse\":\"MEDIUM_WH\" }, + * \"authenticationType\": \"SERVICE_ACCOUNT\", + * \"externalDatabases\":[ ] } ``` 2. Set `validate` to + * `false`. **NOTE:** If the `authentication_type` is anything other than + * SERVICE_ACCOUNT, you must explicitly provide the authenticationType property in the payload. + * If you do not specify authenticationType, the API will default to SERVICE_ACCOUNT as the + * authentication type. #### Create a connection with tables If [Role-Based Access Control + * (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the + * `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) and + * `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` (**Can manage data models**) privilege is + * required. To create a connection with tables: 1. Pass these parameters in your API request. * + * Name of the connection. * Type of the data warehouse to connect to. * A JSON map of + * configuration attributes, database details, and table properties in + * `data_warehouse_config` as shown in the following example: ``` { + * \"configuration\":{ \"accountName\":\"thoughtspot_partner\", + * \"user\":\"tsadmin\", \"password\":\"TestConn123\", + * \"role\":\"sysadmin\", \"warehouse\":\"MEDIUM_WH\" }, + * \"authenticationType\": \"SERVICE_ACCOUNT\", + * \"externalDatabases\":[ { \"name\":\"AllDatatypes\", + * \"isAutoCreated\":false, \"schemas\":[ { + * \"name\":\"alldatatypes\", \"tables\":[ { + * \"name\":\"allDatatypes\", \"type\":\"TABLE\", + * \"description\":\"\", \"selected\":true, + * \"linked\":true, \"columns\":[ { + * \"name\":\"CNUMBER\", \"type\":\"INT64\", + * \"canImport\":true, \"selected\":true, \"isLinkedActive\":true, + * \"isImported\":false, \"tableName\":\"allDatatypes\", + * \"schemaName\":\"alldatatypes\", + * \"dbName\":\"AllDatatypes\" }, { + * \"name\":\"CDECIMAL\", \"type\":\"INT64\", + * \"canImport\":true, \"selected\":true, \"isLinkedActive\":true, + * \"isImported\":false, \"tableName\":\"allDatatypes\", + * \"schemaName\":\"alldatatypes\", + * \"dbName\":\"AllDatatypes\" } ] } ] } ] } ] } ``` 2. Set + * `validate` to `true`. **NOTE:** If the `authentication_type` is + * anything other than SERVICE_ACCOUNT, you must explicitly provide the authenticationType + * property in the payload. If you do not specify authenticationType, the API will default to + * SERVICE_ACCOUNT as the authentication type. + * + * @param createConnectionRequest (required) + * @param _callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body + * object + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 Connection to the datasource successfully created. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public okhttp3.Call createConnectionAsync( + CreateConnectionRequest createConnectionRequest, + final ApiCallback _callback) + throws ApiException { + + okhttp3.Call localVarCall = + createConnectionValidateBeforeCall(createConnectionRequest, _callback); + Type localVarReturnType = new TypeToken() {}.getType(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; + } + /** + * Build call for createConnectionConfiguration + * + * @param createConnectionConfigurationRequest (required) + * @param _callback Callback for upload/download progress + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 Connection configuration successfully created. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public okhttp3.Call createConnectionConfigurationCall( + CreateConnectionConfigurationRequest createConnectionConfigurationRequest, + final ApiCallback _callback) + throws ApiException { + String basePath = null; + // Operation Servers + String[] localBasePaths = new String[] {}; + + // Determine Base Path to Use + if (localCustomBaseUrl != null) { + basePath = localCustomBaseUrl; + } else if (localBasePaths.length > 0) { + basePath = localBasePaths[localHostIndex]; + } else { + basePath = null; + } + + Object localVarPostBody = createConnectionConfigurationRequest; + + // create path and map variables + String localVarPath = "/api/rest/2.0/connection-configurations/create"; + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + final String[] localVarAccepts = {"application/json"}; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = {"application/json"}; + final String localVarContentType = + localVarApiClient.selectHeaderContentType(localVarContentTypes); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } + + String[] localVarAuthNames = new String[] {"bearerAuth"}; + return localVarApiClient.buildCall( + basePath, + localVarPath, + "POST", + localVarQueryParams, + localVarCollectionQueryParams, + localVarPostBody, + localVarHeaderParams, + localVarCookieParams, + localVarFormParams, + localVarAuthNames, + _callback); + } + + @SuppressWarnings("rawtypes") + private okhttp3.Call createConnectionConfigurationValidateBeforeCall( + CreateConnectionConfigurationRequest createConnectionConfigurationRequest, + final ApiCallback _callback) + throws ApiException { + // verify the required parameter 'createConnectionConfigurationRequest' is set + if (createConnectionConfigurationRequest == null) { + throw new ApiException( + "Missing the required parameter 'createConnectionConfigurationRequest' when" + + " calling createConnectionConfiguration(Async)"); + } + + return createConnectionConfigurationCall(createConnectionConfigurationRequest, _callback); + } + + /** + * Version: 10.12.0.cl or later Creates an additional configuration to an existing connection to + * a data warehouse. Requires `DATAMANAGEMENT` (**Can manage data**) or + * `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access + * Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, + * the `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) privilege is + * required. #### Usage guidelines * A JSON map of configuration attributes in + * `configuration`. The following example shows the configuration attributes: + * ``` { \"user\":\"DEV_USER\", + * \"password\":\"TestConn123\", \"role\":\"DEV\", + * \"warehouse\":\"DEV_WH\" } ``` * If the + * `policy_type` is `PRINCIPALS`, then `policy_principals` is a + * required field. * If the `policy_type` is `PROCESSES`, then + * `policy_processes` is a required field. * If the `policy_type` is + * `NO_POLICY`, then `policy_principals` and `policy_processes` + * are not required fields. #### Parameterized Connection Support For parameterized connections + * that use OAuth authentication, only the same_as_parent and policy_process_options attributes + * are allowed in the API request. These attributes are not applicable to connections that are + * not parameterized. + * + * @param createConnectionConfigurationRequest (required) + * @return ConnectionConfigurationResponse + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the + * response body + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 Connection configuration successfully created. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public ConnectionConfigurationResponse createConnectionConfiguration( + CreateConnectionConfigurationRequest createConnectionConfigurationRequest) + throws ApiException { + ApiResponse localVarResp = + createConnectionConfigurationWithHttpInfo(createConnectionConfigurationRequest); + return localVarResp.getData(); + } + + /** + * Version: 10.12.0.cl or later Creates an additional configuration to an existing connection to + * a data warehouse. Requires `DATAMANAGEMENT` (**Can manage data**) or + * `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access + * Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, + * the `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) privilege is + * required. #### Usage guidelines * A JSON map of configuration attributes in + * `configuration`. The following example shows the configuration attributes: + * ``` { \"user\":\"DEV_USER\", + * \"password\":\"TestConn123\", \"role\":\"DEV\", + * \"warehouse\":\"DEV_WH\" } ``` * If the + * `policy_type` is `PRINCIPALS`, then `policy_principals` is a + * required field. * If the `policy_type` is `PROCESSES`, then + * `policy_processes` is a required field. * If the `policy_type` is + * `NO_POLICY`, then `policy_principals` and `policy_processes` + * are not required fields. #### Parameterized Connection Support For parameterized connections + * that use OAuth authentication, only the same_as_parent and policy_process_options attributes + * are allowed in the API request. These attributes are not applicable to connections that are + * not parameterized. + * + * @param createConnectionConfigurationRequest (required) + * @return ApiResponse<ConnectionConfigurationResponse> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the + * response body + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 Connection configuration successfully created. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public ApiResponse createConnectionConfigurationWithHttpInfo( + CreateConnectionConfigurationRequest createConnectionConfigurationRequest) + throws ApiException { + okhttp3.Call localVarCall = + createConnectionConfigurationValidateBeforeCall( + createConnectionConfigurationRequest, null); + Type localVarReturnType = new TypeToken() {}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); + } + + /** + * (asynchronously) Version: 10.12.0.cl or later Creates an additional configuration to an + * existing connection to a data warehouse. Requires `DATAMANAGEMENT` (**Can manage + * data**) or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If + * [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled + * on your instance, the `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit + * Connections**) privilege is required. #### Usage guidelines * A JSON map of configuration + * attributes in `configuration`. The following example shows the configuration + * attributes: ``` { \"user\":\"DEV_USER\", + * \"password\":\"TestConn123\", \"role\":\"DEV\", + * \"warehouse\":\"DEV_WH\" } ``` * If the + * `policy_type` is `PRINCIPALS`, then `policy_principals` is a + * required field. * If the `policy_type` is `PROCESSES`, then + * `policy_processes` is a required field. * If the `policy_type` is + * `NO_POLICY`, then `policy_principals` and `policy_processes` + * are not required fields. #### Parameterized Connection Support For parameterized connections + * that use OAuth authentication, only the same_as_parent and policy_process_options attributes + * are allowed in the API request. These attributes are not applicable to connections that are + * not parameterized. + * + * @param createConnectionConfigurationRequest (required) + * @param _callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body + * object + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 Connection configuration successfully created. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public okhttp3.Call createConnectionConfigurationAsync( + CreateConnectionConfigurationRequest createConnectionConfigurationRequest, + final ApiCallback _callback) + throws ApiException { + + okhttp3.Call localVarCall = + createConnectionConfigurationValidateBeforeCall( + createConnectionConfigurationRequest, _callback); + Type localVarReturnType = new TypeToken() {}.getType(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; + } + /** + * Build call for createConversation + * + * @param createConversationRequest (required) + * @param _callback Callback for upload/download progress + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + * @http.response.details + * + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 Common successful response -
201 Common error response -
400 Operation failed -
401 Unauthorized access. -
403 Forbidden access. -
500 Operation failed -
+ */ + public okhttp3.Call createConversationCall( + CreateConversationRequest createConversationRequest, final ApiCallback _callback) + throws ApiException { + String basePath = null; + // Operation Servers + String[] localBasePaths = new String[] {}; + + // Determine Base Path to Use + if (localCustomBaseUrl != null) { + basePath = localCustomBaseUrl; + } else if (localBasePaths.length > 0) { + basePath = localBasePaths[localHostIndex]; + } else { + basePath = null; + } + + Object localVarPostBody = createConversationRequest; + + // create path and map variables + String localVarPath = "/api/rest/2.0/ai/conversation/create"; + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + final String[] localVarAccepts = {"application/json"}; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = {"application/json"}; + final String localVarContentType = + localVarApiClient.selectHeaderContentType(localVarContentTypes); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } + + String[] localVarAuthNames = new String[] {"bearerAuth"}; + return localVarApiClient.buildCall( + basePath, + localVarPath, + "POST", + localVarQueryParams, + localVarCollectionQueryParams, + localVarPostBody, + localVarHeaderParams, + localVarCookieParams, + localVarFormParams, + localVarAuthNames, + _callback); + } + + @SuppressWarnings("rawtypes") + private okhttp3.Call createConversationValidateBeforeCall( + CreateConversationRequest createConversationRequest, final ApiCallback _callback) + throws ApiException { + // verify the required parameter 'createConversationRequest' is set + if (createConversationRequest == null) { + throw new ApiException( + "Missing the required parameter 'createConversationRequest' when calling" + + " createConversation(Async)"); + } + + return createConversationCall(createConversationRequest, _callback); + } + + /** + * Version: 10.4.0.cl or later Creates a new conversation session tied to a specific data model + * for AI-driven natural language querying. Requires `CAN_USE_SPOTTER` privilege and + * at least view access to the metadata object specified in the request. #### Usage guidelines + * The request must include: - `metadata_identifier`: the unique ID of the data source + * that provides context for the conversation Optionally, you can provide: - `tokens`: + * a token string to set initial context for the conversation (e.g., `\"[sales],[item + * type],[state]\"`) If the request is successful, ThoughtSpot returns a unique + * `conversation_identifier` that must be passed to `sendMessage` to + * continue the conversation. #### Error responses | Code | Description | |------|-------------| + * | 401 | Unauthorized — authentication token is missing, expired, or invalid. | | 403 | + * Forbidden — the authenticated user does not have `CAN_USE_SPOTTER` privilege or + * lacks view permission on the specified metadata object. | > ###### Note: > * This + * endpoint is currently in Beta. Breaking changes may be introduced before the endpoint is made + * Generally Available. > * This endpoint requires Spotter - please contact ThoughtSpot + * support to enable Spotter on your cluster. + * + * @param createConversationRequest (required) + * @return Conversation + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the + * response body + * @http.response.details + * + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 Common successful response -
201 Common error response -
400 Operation failed -
401 Unauthorized access. -
403 Forbidden access. -
500 Operation failed -
+ */ + public Conversation createConversation(CreateConversationRequest createConversationRequest) + throws ApiException { + ApiResponse localVarResp = + createConversationWithHttpInfo(createConversationRequest); + return localVarResp.getData(); + } + + /** + * Version: 10.4.0.cl or later Creates a new conversation session tied to a specific data model + * for AI-driven natural language querying. Requires `CAN_USE_SPOTTER` privilege and + * at least view access to the metadata object specified in the request. #### Usage guidelines + * The request must include: - `metadata_identifier`: the unique ID of the data source + * that provides context for the conversation Optionally, you can provide: - `tokens`: + * a token string to set initial context for the conversation (e.g., `\"[sales],[item + * type],[state]\"`) If the request is successful, ThoughtSpot returns a unique + * `conversation_identifier` that must be passed to `sendMessage` to + * continue the conversation. #### Error responses | Code | Description | |------|-------------| + * | 401 | Unauthorized — authentication token is missing, expired, or invalid. | | 403 | + * Forbidden — the authenticated user does not have `CAN_USE_SPOTTER` privilege or + * lacks view permission on the specified metadata object. | > ###### Note: > * This + * endpoint is currently in Beta. Breaking changes may be introduced before the endpoint is made + * Generally Available. > * This endpoint requires Spotter - please contact ThoughtSpot + * support to enable Spotter on your cluster. + * + * @param createConversationRequest (required) + * @return ApiResponse<Conversation> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the + * response body + * @http.response.details + * + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 Common successful response -
201 Common error response -
400 Operation failed -
401 Unauthorized access. -
403 Forbidden access. -
500 Operation failed -
+ */ + public ApiResponse createConversationWithHttpInfo( + CreateConversationRequest createConversationRequest) throws ApiException { + okhttp3.Call localVarCall = + createConversationValidateBeforeCall(createConversationRequest, null); + Type localVarReturnType = new TypeToken() {}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); + } + + /** + * (asynchronously) Version: 10.4.0.cl or later Creates a new conversation session tied to a + * specific data model for AI-driven natural language querying. Requires + * `CAN_USE_SPOTTER` privilege and at least view access to the metadata object + * specified in the request. #### Usage guidelines The request must include: - + * `metadata_identifier`: the unique ID of the data source that provides context for + * the conversation Optionally, you can provide: - `tokens`: a token string to set + * initial context for the conversation (e.g., `\"[sales],[item + * type],[state]\"`) If the request is successful, ThoughtSpot returns a unique + * `conversation_identifier` that must be passed to `sendMessage` to + * continue the conversation. #### Error responses | Code | Description | |------|-------------| + * | 401 | Unauthorized — authentication token is missing, expired, or invalid. | | 403 | + * Forbidden — the authenticated user does not have `CAN_USE_SPOTTER` privilege or + * lacks view permission on the specified metadata object. | > ###### Note: > * This + * endpoint is currently in Beta. Breaking changes may be introduced before the endpoint is made + * Generally Available. > * This endpoint requires Spotter - please contact ThoughtSpot + * support to enable Spotter on your cluster. + * + * @param createConversationRequest (required) + * @param _callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body + * object + * @http.response.details + * + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 Common successful response -
201 Common error response -
400 Operation failed -
401 Unauthorized access. -
403 Forbidden access. -
500 Operation failed -
+ */ + public okhttp3.Call createConversationAsync( + CreateConversationRequest createConversationRequest, + final ApiCallback _callback) + throws ApiException { + + okhttp3.Call localVarCall = + createConversationValidateBeforeCall(createConversationRequest, _callback); + Type localVarReturnType = new TypeToken() {}.getType(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; + } + /** + * Build call for createCustomAction + * + * @param createCustomActionRequest (required) + * @param _callback Callback for upload/download progress + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 Custom action created successfully. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public okhttp3.Call createCustomActionCall( + CreateCustomActionRequest createCustomActionRequest, final ApiCallback _callback) + throws ApiException { + String basePath = null; + // Operation Servers + String[] localBasePaths = new String[] {}; + + // Determine Base Path to Use + if (localCustomBaseUrl != null) { + basePath = localCustomBaseUrl; + } else if (localBasePaths.length > 0) { + basePath = localBasePaths[localHostIndex]; + } else { + basePath = null; + } + + Object localVarPostBody = createCustomActionRequest; + + // create path and map variables + String localVarPath = "/api/rest/2.0/customization/custom-actions"; + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + final String[] localVarAccepts = {"application/json"}; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = {"application/json"}; + final String localVarContentType = + localVarApiClient.selectHeaderContentType(localVarContentTypes); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } + + String[] localVarAuthNames = new String[] {"bearerAuth"}; + return localVarApiClient.buildCall( + basePath, + localVarPath, + "POST", + localVarQueryParams, + localVarCollectionQueryParams, + localVarPostBody, + localVarHeaderParams, + localVarCookieParams, + localVarFormParams, + localVarAuthNames, + _callback); + } + + @SuppressWarnings("rawtypes") + private okhttp3.Call createCustomActionValidateBeforeCall( + CreateCustomActionRequest createCustomActionRequest, final ApiCallback _callback) + throws ApiException { + // verify the required parameter 'createCustomActionRequest' is set + if (createCustomActionRequest == null) { + throw new ApiException( + "Missing the required parameter 'createCustomActionRequest' when calling" + + " createCustomAction(Async)"); + } + + return createCustomActionCall(createCustomActionRequest, _callback); + } + + /** + * Version: 9.6.0.cl or later Creates a custom action that appears as a menu action on a saved + * Answer or Liveboard visualization. Requires `DEVELOPER` (**Has Developer + * privilege**) or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If + * [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled + * on your instance, the `DEVELOPER` (**Has developer privilege**) privilege is + * required. #### Usage Guidelines The API lets you create the following types of custom + * actions: * URL-based action Allows pushing data to an external URL. * Callback action + * Triggers a callback to the host application and initiates a response payload on an embedded + * ThoughtSpot instance. By default, custom actions are visible to only administrator or + * developer users. To make a custom action available to other users, and specify the groups in + * `group_identifiers`. By default, the custom action is set as a _global_ action on + * all visualizations and saved Answers. To assign a custom action to specific Liveboard + * visualization, saved Answer, or Worksheet, set `visibility` to `false` in + * `default_action_config` property and specify the GUID or name of the object in + * `associate_metadata`. For more information, see [Custom + * actions](https://developers.thoughtspot.com/docs/custom-action-intro). + * + * @param createCustomActionRequest (required) + * @return ResponseCustomAction + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the + * response body + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 Custom action created successfully. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public ResponseCustomAction createCustomAction( + CreateCustomActionRequest createCustomActionRequest) throws ApiException { + ApiResponse localVarResp = + createCustomActionWithHttpInfo(createCustomActionRequest); + return localVarResp.getData(); + } + + /** + * Version: 9.6.0.cl or later Creates a custom action that appears as a menu action on a saved + * Answer or Liveboard visualization. Requires `DEVELOPER` (**Has Developer + * privilege**) or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If + * [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled + * on your instance, the `DEVELOPER` (**Has developer privilege**) privilege is + * required. #### Usage Guidelines The API lets you create the following types of custom + * actions: * URL-based action Allows pushing data to an external URL. * Callback action + * Triggers a callback to the host application and initiates a response payload on an embedded + * ThoughtSpot instance. By default, custom actions are visible to only administrator or + * developer users. To make a custom action available to other users, and specify the groups in + * `group_identifiers`. By default, the custom action is set as a _global_ action on + * all visualizations and saved Answers. To assign a custom action to specific Liveboard + * visualization, saved Answer, or Worksheet, set `visibility` to `false` in + * `default_action_config` property and specify the GUID or name of the object in + * `associate_metadata`. For more information, see [Custom + * actions](https://developers.thoughtspot.com/docs/custom-action-intro). + * + * @param createCustomActionRequest (required) + * @return ApiResponse<ResponseCustomAction> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the + * response body + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 Custom action created successfully. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public ApiResponse createCustomActionWithHttpInfo( + CreateCustomActionRequest createCustomActionRequest) throws ApiException { + okhttp3.Call localVarCall = + createCustomActionValidateBeforeCall(createCustomActionRequest, null); + Type localVarReturnType = new TypeToken() {}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); + } + + /** + * (asynchronously) Version: 9.6.0.cl or later Creates a custom action that appears as a menu + * action on a saved Answer or Liveboard visualization. Requires `DEVELOPER` (**Has + * Developer privilege**) or `ADMINISTRATION` (**Can administer ThoughtSpot**) + * privilege. If [Role-Based Access Control + * (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the + * `DEVELOPER` (**Has developer privilege**) privilege is required. #### Usage + * Guidelines The API lets you create the following types of custom actions: * URL-based action + * Allows pushing data to an external URL. * Callback action Triggers a callback to the host + * application and initiates a response payload on an embedded ThoughtSpot instance. By default, + * custom actions are visible to only administrator or developer users. To make a custom action + * available to other users, and specify the groups in `group_identifiers`. By + * default, the custom action is set as a _global_ action on all visualizations and saved + * Answers. To assign a custom action to specific Liveboard visualization, saved Answer, or + * Worksheet, set `visibility` to `false` in + * `default_action_config` property and specify the GUID or name of the object in + * `associate_metadata`. For more information, see [Custom + * actions](https://developers.thoughtspot.com/docs/custom-action-intro). + * + * @param createCustomActionRequest (required) + * @param _callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body + * object + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 Custom action created successfully. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public okhttp3.Call createCustomActionAsync( + CreateCustomActionRequest createCustomActionRequest, + final ApiCallback _callback) + throws ApiException { + + okhttp3.Call localVarCall = + createCustomActionValidateBeforeCall(createCustomActionRequest, _callback); + Type localVarReturnType = new TypeToken() {}.getType(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; + } + /** + * Build call for createEmailCustomization + * + * @param createEmailCustomizationRequest (required) + * @param _callback Callback for upload/download progress + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + * @http.response.details + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 OK -
400 Invalid request. -
403 Unauthorized access. -
500 Unexpected error -
+ */ + public okhttp3.Call createEmailCustomizationCall( + CreateEmailCustomizationRequest createEmailCustomizationRequest, + final ApiCallback _callback) + throws ApiException { + String basePath = null; + // Operation Servers + String[] localBasePaths = new String[] {}; + + // Determine Base Path to Use + if (localCustomBaseUrl != null) { + basePath = localCustomBaseUrl; + } else if (localBasePaths.length > 0) { + basePath = localBasePaths[localHostIndex]; + } else { + basePath = null; + } + + Object localVarPostBody = createEmailCustomizationRequest; + + // create path and map variables + String localVarPath = "/api/rest/2.0/customization/email"; + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + final String[] localVarAccepts = {"application/json"}; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = {"application/json"}; + final String localVarContentType = + localVarApiClient.selectHeaderContentType(localVarContentTypes); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } + + String[] localVarAuthNames = new String[] {"bearerAuth"}; + return localVarApiClient.buildCall( + basePath, + localVarPath, + "POST", + localVarQueryParams, + localVarCollectionQueryParams, + localVarPostBody, + localVarHeaderParams, + localVarCookieParams, + localVarFormParams, + localVarAuthNames, + _callback); + } + + @SuppressWarnings("rawtypes") + private okhttp3.Call createEmailCustomizationValidateBeforeCall( + CreateEmailCustomizationRequest createEmailCustomizationRequest, + final ApiCallback _callback) + throws ApiException { + // verify the required parameter 'createEmailCustomizationRequest' is set + if (createEmailCustomizationRequest == null) { + throw new ApiException( + "Missing the required parameter 'createEmailCustomizationRequest' when calling" + + " createEmailCustomization(Async)"); + } + + return createEmailCustomizationCall(createEmailCustomizationRequest, _callback); + } + + /** + * Version: 10.10.0.cl or later Creates a customization configuration for the notification + * email. #### Pre-requisites Requires `DEVELOPER` (**has developer privilege**) or + * `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access + * Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, + * the `DEVELOPER` (**Has developer privilege**) privilege is required. **NOTE**:This + * endpoint in currently in beta. Contact ThoughtSpot support to enable this on your instance. + * #### Usage guidelines To create a custom configuration pass these parameters in your API + * request: - A JSON map of configuration attributes `template_properties`. The + * following example shows a sample set of customization configuration: ``` { { + * \"cta_button_bg_color\": \"#444DEA\", \"cta_text_font_color\": + * \"#FFFFFF\", \"primary_bg_color\": \"#D3DEF0\", + * \"logo_url\": + * \"https://storage.pardot.com/710713/1642089901EbkRibJq/TS_fullworkmark_darkmode.png\", + * \"font_family\": \"\", \"product_name\": + * \"ThoughtSpot\", \"footer_address\": \"444 Castro St, Suite 1000 + * Mountain View, CA 94041\", \"footer_phone\": \"(800) 508-7008\", + * \"replacement_value_for_liveboard\": \"Dashboard\", + * \"replacement_value_for_answer\": \"Chart\", + * \"replacement_value_for_spot_iq\": \"AI Insights\", + * \"hide_footer_phone\": false, \"hide_footer_address\": false, + * \"hide_product_name\": false, \"hide_manage_notification\": false, + * \"hide_mobile_app_nudge\": false, \"hide_privacy_policy\": false, + * \"hide_ts_vocabulary_definitions\": false, \"hide_error_message\": false, + * \"hide_unsubscribe_link\": false, \"hide_notification_status\": false, + * \"hide_modify_alert\": false, \"company_website_url\": + * \"https://your-website.com/\", \"company_privacy_policy_url\" : + * \"https://link-to-privacy-policy.com/\", \"contact_support_url\": + * \"https://link-to-contact-support.com/\", \"hide_contact_support_url\": + * false, \"hide_logo_url\" : false } } ``` + * + * @param createEmailCustomizationRequest (required) + * @return CreateEmailCustomizationResponse + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the + * response body + * @http.response.details + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 OK -
400 Invalid request. -
403 Unauthorized access. -
500 Unexpected error -
+ */ + public CreateEmailCustomizationResponse createEmailCustomization( + CreateEmailCustomizationRequest createEmailCustomizationRequest) throws ApiException { + ApiResponse localVarResp = + createEmailCustomizationWithHttpInfo(createEmailCustomizationRequest); + return localVarResp.getData(); + } + + /** + * Version: 10.10.0.cl or later Creates a customization configuration for the notification + * email. #### Pre-requisites Requires `DEVELOPER` (**has developer privilege**) or + * `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access + * Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, + * the `DEVELOPER` (**Has developer privilege**) privilege is required. **NOTE**:This + * endpoint in currently in beta. Contact ThoughtSpot support to enable this on your instance. + * #### Usage guidelines To create a custom configuration pass these parameters in your API + * request: - A JSON map of configuration attributes `template_properties`. The + * following example shows a sample set of customization configuration: ``` { { + * \"cta_button_bg_color\": \"#444DEA\", \"cta_text_font_color\": + * \"#FFFFFF\", \"primary_bg_color\": \"#D3DEF0\", + * \"logo_url\": + * \"https://storage.pardot.com/710713/1642089901EbkRibJq/TS_fullworkmark_darkmode.png\", + * \"font_family\": \"\", \"product_name\": + * \"ThoughtSpot\", \"footer_address\": \"444 Castro St, Suite 1000 + * Mountain View, CA 94041\", \"footer_phone\": \"(800) 508-7008\", + * \"replacement_value_for_liveboard\": \"Dashboard\", + * \"replacement_value_for_answer\": \"Chart\", + * \"replacement_value_for_spot_iq\": \"AI Insights\", + * \"hide_footer_phone\": false, \"hide_footer_address\": false, + * \"hide_product_name\": false, \"hide_manage_notification\": false, + * \"hide_mobile_app_nudge\": false, \"hide_privacy_policy\": false, + * \"hide_ts_vocabulary_definitions\": false, \"hide_error_message\": false, + * \"hide_unsubscribe_link\": false, \"hide_notification_status\": false, + * \"hide_modify_alert\": false, \"company_website_url\": + * \"https://your-website.com/\", \"company_privacy_policy_url\" : + * \"https://link-to-privacy-policy.com/\", \"contact_support_url\": + * \"https://link-to-contact-support.com/\", \"hide_contact_support_url\": + * false, \"hide_logo_url\" : false } } ``` + * + * @param createEmailCustomizationRequest (required) + * @return ApiResponse<CreateEmailCustomizationResponse> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the + * response body + * @http.response.details + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 OK -
400 Invalid request. -
403 Unauthorized access. -
500 Unexpected error -
+ */ + public ApiResponse createEmailCustomizationWithHttpInfo( + CreateEmailCustomizationRequest createEmailCustomizationRequest) throws ApiException { + okhttp3.Call localVarCall = + createEmailCustomizationValidateBeforeCall(createEmailCustomizationRequest, null); + Type localVarReturnType = new TypeToken() {}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); + } + + /** + * (asynchronously) Version: 10.10.0.cl or later Creates a customization configuration for the + * notification email. #### Pre-requisites Requires `DEVELOPER` (**has developer + * privilege**) or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If + * [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled + * on your instance, the `DEVELOPER` (**Has developer privilege**) privilege is + * required. **NOTE**:This endpoint in currently in beta. Contact ThoughtSpot support to enable + * this on your instance. #### Usage guidelines To create a custom configuration pass these + * parameters in your API request: - A JSON map of configuration attributes + * `template_properties`. The following example shows a sample set of customization + * configuration: ``` { { \"cta_button_bg_color\": + * \"#444DEA\", \"cta_text_font_color\": \"#FFFFFF\", + * \"primary_bg_color\": \"#D3DEF0\", \"logo_url\": + * \"https://storage.pardot.com/710713/1642089901EbkRibJq/TS_fullworkmark_darkmode.png\", + * \"font_family\": \"\", \"product_name\": + * \"ThoughtSpot\", \"footer_address\": \"444 Castro St, Suite 1000 + * Mountain View, CA 94041\", \"footer_phone\": \"(800) 508-7008\", + * \"replacement_value_for_liveboard\": \"Dashboard\", + * \"replacement_value_for_answer\": \"Chart\", + * \"replacement_value_for_spot_iq\": \"AI Insights\", + * \"hide_footer_phone\": false, \"hide_footer_address\": false, + * \"hide_product_name\": false, \"hide_manage_notification\": false, + * \"hide_mobile_app_nudge\": false, \"hide_privacy_policy\": false, + * \"hide_ts_vocabulary_definitions\": false, \"hide_error_message\": false, + * \"hide_unsubscribe_link\": false, \"hide_notification_status\": false, + * \"hide_modify_alert\": false, \"company_website_url\": + * \"https://your-website.com/\", \"company_privacy_policy_url\" : + * \"https://link-to-privacy-policy.com/\", \"contact_support_url\": + * \"https://link-to-contact-support.com/\", \"hide_contact_support_url\": + * false, \"hide_logo_url\" : false } } ``` + * + * @param createEmailCustomizationRequest (required) + * @param _callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body + * object + * @http.response.details + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 OK -
400 Invalid request. -
403 Unauthorized access. -
500 Unexpected error -
+ */ + public okhttp3.Call createEmailCustomizationAsync( + CreateEmailCustomizationRequest createEmailCustomizationRequest, + final ApiCallback _callback) + throws ApiException { + + okhttp3.Call localVarCall = + createEmailCustomizationValidateBeforeCall( + createEmailCustomizationRequest, _callback); + Type localVarReturnType = new TypeToken() {}.getType(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; + } + /** + * Build call for createOrg + * + * @param createOrgRequest (required) + * @param _callback Callback for upload/download progress + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 Organization successfully created. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public okhttp3.Call createOrgCall( + CreateOrgRequest createOrgRequest, final ApiCallback _callback) throws ApiException { + String basePath = null; + // Operation Servers + String[] localBasePaths = new String[] {}; + + // Determine Base Path to Use + if (localCustomBaseUrl != null) { + basePath = localCustomBaseUrl; + } else if (localBasePaths.length > 0) { + basePath = localBasePaths[localHostIndex]; + } else { + basePath = null; + } + + Object localVarPostBody = createOrgRequest; + + // create path and map variables + String localVarPath = "/api/rest/2.0/orgs/create"; + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + final String[] localVarAccepts = {"application/json"}; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = {"application/json"}; + final String localVarContentType = + localVarApiClient.selectHeaderContentType(localVarContentTypes); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } + + String[] localVarAuthNames = new String[] {"bearerAuth"}; + return localVarApiClient.buildCall( + basePath, + localVarPath, + "POST", + localVarQueryParams, + localVarCollectionQueryParams, + localVarPostBody, + localVarHeaderParams, + localVarCookieParams, + localVarFormParams, + localVarAuthNames, + _callback); + } + + @SuppressWarnings("rawtypes") + private okhttp3.Call createOrgValidateBeforeCall( + CreateOrgRequest createOrgRequest, final ApiCallback _callback) throws ApiException { + // verify the required parameter 'createOrgRequest' is set + if (createOrgRequest == null) { + throw new ApiException( + "Missing the required parameter 'createOrgRequest' when calling" + + " createOrg(Async)"); + } + + return createOrgCall(createOrgRequest, _callback); + } + + /** + * Version: 9.0.0.cl or later Creates an Org object. To use this API, the + * [Orgs](https://docs.thoughtspot.com/cloud/latest/orgs-overview) feature must be enabled in + * your cluster. Requires cluster administration (**Can administer Org**) privileges. If + * [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled + * on your instance, the `ORG_ADMINISTRATION` (**Can manage Orgs**) privilege is + * required. + * + * @param createOrgRequest (required) + * @return OrgResponse + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the + * response body + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 Organization successfully created. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public OrgResponse createOrg(CreateOrgRequest createOrgRequest) throws ApiException { + ApiResponse localVarResp = createOrgWithHttpInfo(createOrgRequest); + return localVarResp.getData(); + } + + /** + * Version: 9.0.0.cl or later Creates an Org object. To use this API, the + * [Orgs](https://docs.thoughtspot.com/cloud/latest/orgs-overview) feature must be enabled in + * your cluster. Requires cluster administration (**Can administer Org**) privileges. If + * [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled + * on your instance, the `ORG_ADMINISTRATION` (**Can manage Orgs**) privilege is + * required. + * + * @param createOrgRequest (required) + * @return ApiResponse<OrgResponse> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the + * response body + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 Organization successfully created. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public ApiResponse createOrgWithHttpInfo(CreateOrgRequest createOrgRequest) + throws ApiException { + okhttp3.Call localVarCall = createOrgValidateBeforeCall(createOrgRequest, null); + Type localVarReturnType = new TypeToken() {}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); + } + + /** + * (asynchronously) Version: 9.0.0.cl or later Creates an Org object. To use this API, the + * [Orgs](https://docs.thoughtspot.com/cloud/latest/orgs-overview) feature must be enabled in + * your cluster. Requires cluster administration (**Can administer Org**) privileges. If + * [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled + * on your instance, the `ORG_ADMINISTRATION` (**Can manage Orgs**) privilege is + * required. + * + * @param createOrgRequest (required) + * @param _callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body + * object + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 Organization successfully created. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public okhttp3.Call createOrgAsync( + CreateOrgRequest createOrgRequest, final ApiCallback _callback) + throws ApiException { + + okhttp3.Call localVarCall = createOrgValidateBeforeCall(createOrgRequest, _callback); + Type localVarReturnType = new TypeToken() {}.getType(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; + } + /** + * Build call for createRole + * + * @param createRoleRequest (required) + * @param _callback Callback for upload/download progress + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 Role successfully created. -
400 Invalid parameters. -
401 Unauthorized access. -
403 Forbidden access. -
500 Internal error -
+ */ + public okhttp3.Call createRoleCall( + CreateRoleRequest createRoleRequest, final ApiCallback _callback) throws ApiException { + String basePath = null; + // Operation Servers + String[] localBasePaths = new String[] {}; + + // Determine Base Path to Use + if (localCustomBaseUrl != null) { + basePath = localCustomBaseUrl; + } else if (localBasePaths.length > 0) { + basePath = localBasePaths[localHostIndex]; + } else { + basePath = null; + } + + Object localVarPostBody = createRoleRequest; + + // create path and map variables + String localVarPath = "/api/rest/2.0/roles/create"; + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + final String[] localVarAccepts = {"application/json"}; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = {"application/json"}; + final String localVarContentType = + localVarApiClient.selectHeaderContentType(localVarContentTypes); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } + + String[] localVarAuthNames = new String[] {"bearerAuth"}; + return localVarApiClient.buildCall( + basePath, + localVarPath, + "POST", + localVarQueryParams, + localVarCollectionQueryParams, + localVarPostBody, + localVarHeaderParams, + localVarCookieParams, + localVarFormParams, + localVarAuthNames, + _callback); + } + + @SuppressWarnings("rawtypes") + private okhttp3.Call createRoleValidateBeforeCall( + CreateRoleRequest createRoleRequest, final ApiCallback _callback) throws ApiException { + // verify the required parameter 'createRoleRequest' is set + if (createRoleRequest == null) { + throw new ApiException( + "Missing the required parameter 'createRoleRequest' when calling" + + " createRole(Async)"); + } + + return createRoleCall(createRoleRequest, _callback); + } + + /** + * Version: 9.5.0.cl or later Creates a Role object in ThoughtSpot. Available only if + * [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled + * on your instance. To create a Role, the `ROLE_ADMINISTRATION` (**Can manage + * roles**) privilege is required. + * + * @param createRoleRequest (required) + * @return RoleResponse + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the + * response body + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 Role successfully created. -
400 Invalid parameters. -
401 Unauthorized access. -
403 Forbidden access. -
500 Internal error -
+ */ + public RoleResponse createRole(CreateRoleRequest createRoleRequest) throws ApiException { + ApiResponse localVarResp = createRoleWithHttpInfo(createRoleRequest); + return localVarResp.getData(); + } + + /** + * Version: 9.5.0.cl or later Creates a Role object in ThoughtSpot. Available only if + * [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled + * on your instance. To create a Role, the `ROLE_ADMINISTRATION` (**Can manage + * roles**) privilege is required. + * + * @param createRoleRequest (required) + * @return ApiResponse<RoleResponse> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the + * response body + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 Role successfully created. -
400 Invalid parameters. -
401 Unauthorized access. -
403 Forbidden access. -
500 Internal error -
+ */ + public ApiResponse createRoleWithHttpInfo(CreateRoleRequest createRoleRequest) + throws ApiException { + okhttp3.Call localVarCall = createRoleValidateBeforeCall(createRoleRequest, null); + Type localVarReturnType = new TypeToken() {}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); + } + + /** + * (asynchronously) Version: 9.5.0.cl or later Creates a Role object in ThoughtSpot. Available + * only if [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is + * enabled on your instance. To create a Role, the `ROLE_ADMINISTRATION` (**Can manage + * roles**) privilege is required. + * + * @param createRoleRequest (required) + * @param _callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body + * object + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 Role successfully created. -
400 Invalid parameters. -
401 Unauthorized access. -
403 Forbidden access. -
500 Internal error -
+ */ + public okhttp3.Call createRoleAsync( + CreateRoleRequest createRoleRequest, final ApiCallback _callback) + throws ApiException { + + okhttp3.Call localVarCall = createRoleValidateBeforeCall(createRoleRequest, _callback); + Type localVarReturnType = new TypeToken() {}.getType(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; + } + /** + * Build call for createSchedule + * + * @param createScheduleRequest (required) + * @param _callback Callback for upload/download progress + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 Schedule successfully created. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public okhttp3.Call createScheduleCall( + CreateScheduleRequest createScheduleRequest, final ApiCallback _callback) + throws ApiException { + String basePath = null; + // Operation Servers + String[] localBasePaths = new String[] {}; + + // Determine Base Path to Use + if (localCustomBaseUrl != null) { + basePath = localCustomBaseUrl; + } else if (localBasePaths.length > 0) { + basePath = localBasePaths[localHostIndex]; + } else { + basePath = null; + } + + Object localVarPostBody = createScheduleRequest; + + // create path and map variables + String localVarPath = "/api/rest/2.0/schedules/create"; + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + final String[] localVarAccepts = {"application/json"}; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = {"application/json"}; + final String localVarContentType = + localVarApiClient.selectHeaderContentType(localVarContentTypes); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } + + String[] localVarAuthNames = new String[] {"bearerAuth"}; + return localVarApiClient.buildCall( + basePath, + localVarPath, + "POST", + localVarQueryParams, + localVarCollectionQueryParams, + localVarPostBody, + localVarHeaderParams, + localVarCookieParams, + localVarFormParams, + localVarAuthNames, + _callback); + } + + @SuppressWarnings("rawtypes") + private okhttp3.Call createScheduleValidateBeforeCall( + CreateScheduleRequest createScheduleRequest, final ApiCallback _callback) + throws ApiException { + // verify the required parameter 'createScheduleRequest' is set + if (createScheduleRequest == null) { + throw new ApiException( + "Missing the required parameter 'createScheduleRequest' when calling" + + " createSchedule(Async)"); + } + + return createScheduleCall(createScheduleRequest, _callback); + } + + /** + * Create schedule. Version: 9.4.0.cl or later Creates a Liveboard schedule job. Requires at + * least edit access to Liveboards. To create a schedule on behalf of another user, you need + * `ADMINISTRATION` (**Can administer Org**) or `JOBSCHEDULING` (**Can + * schedule for others**) privilege and edit access to the Liveboard. If [Role-Based Access + * Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, + * the `JOBSCHEDULING` (**Can schedule for others**) privilege is required. #### Usage + * guidelines * The description text is mandatory. The description text appears as + * **Description: <your content>** in the Liveboard schedule email notifications. * For + * Liveboards with both charts and tables, schedule creation is only supported in PDF and XLS + * formats. Schedules created in CSV formats for such Liveboards will fail to run. If + * `PDF` is set as the `file_format`, enable `pdf_options` to get + * the correct attachment. Not doing so may cause the attachment to be rendered empty. * To + * include only specific visualizations, specify the visualization GUIDs in the + * `visualization_identifiers` array. * You can schedule a Liveboard job to run + * periodically by setting frequency parameters. You can set the schedule to run daily, weekly, + * monthly or every n minutes or hours. The scheduled job can also be configured to run at a + * specific time of the day or on specific days of the week or month. Please ensure that when + * setting the schedule frequency for _minute of the object_, only values that are multiples of + * 5 are included. * If the `frequency` parameters are defined, you can set the time + * zone to a value that matches your server's time zone. For example, + * `US/Central`, `Etc/UTC`, `CET`. The default time zone is + * `America/Los_Angeles`. For more information about Liveboard jobs, see [ThoughtSpot + * Product Documentation](https://docs.thoughtspot.com/cloud/latest/liveboard-schedule). + * + * @param createScheduleRequest (required) + * @return ResponseSchedule + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the + * response body + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 Schedule successfully created. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public ResponseSchedule createSchedule(CreateScheduleRequest createScheduleRequest) + throws ApiException { + ApiResponse localVarResp = + createScheduleWithHttpInfo(createScheduleRequest); + return localVarResp.getData(); + } + + /** + * Create schedule. Version: 9.4.0.cl or later Creates a Liveboard schedule job. Requires at + * least edit access to Liveboards. To create a schedule on behalf of another user, you need + * `ADMINISTRATION` (**Can administer Org**) or `JOBSCHEDULING` (**Can + * schedule for others**) privilege and edit access to the Liveboard. If [Role-Based Access + * Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, + * the `JOBSCHEDULING` (**Can schedule for others**) privilege is required. #### Usage + * guidelines * The description text is mandatory. The description text appears as + * **Description: <your content>** in the Liveboard schedule email notifications. * For + * Liveboards with both charts and tables, schedule creation is only supported in PDF and XLS + * formats. Schedules created in CSV formats for such Liveboards will fail to run. If + * `PDF` is set as the `file_format`, enable `pdf_options` to get + * the correct attachment. Not doing so may cause the attachment to be rendered empty. * To + * include only specific visualizations, specify the visualization GUIDs in the + * `visualization_identifiers` array. * You can schedule a Liveboard job to run + * periodically by setting frequency parameters. You can set the schedule to run daily, weekly, + * monthly or every n minutes or hours. The scheduled job can also be configured to run at a + * specific time of the day or on specific days of the week or month. Please ensure that when + * setting the schedule frequency for _minute of the object_, only values that are multiples of + * 5 are included. * If the `frequency` parameters are defined, you can set the time + * zone to a value that matches your server's time zone. For example, + * `US/Central`, `Etc/UTC`, `CET`. The default time zone is + * `America/Los_Angeles`. For more information about Liveboard jobs, see [ThoughtSpot + * Product Documentation](https://docs.thoughtspot.com/cloud/latest/liveboard-schedule). + * + * @param createScheduleRequest (required) + * @return ApiResponse<ResponseSchedule> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the + * response body + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 Schedule successfully created. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public ApiResponse createScheduleWithHttpInfo( + CreateScheduleRequest createScheduleRequest) throws ApiException { + okhttp3.Call localVarCall = createScheduleValidateBeforeCall(createScheduleRequest, null); + Type localVarReturnType = new TypeToken() {}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); + } + + /** + * (asynchronously) Create schedule. Version: 9.4.0.cl or later Creates a Liveboard schedule + * job. Requires at least edit access to Liveboards. To create a schedule on behalf of another + * user, you need `ADMINISTRATION` (**Can administer Org**) or + * `JOBSCHEDULING` (**Can schedule for others**) privilege and edit access to the + * Liveboard. If [Role-Based Access Control + * (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the + * `JOBSCHEDULING` (**Can schedule for others**) privilege is required. #### Usage + * guidelines * The description text is mandatory. The description text appears as + * **Description: <your content>** in the Liveboard schedule email notifications. * For + * Liveboards with both charts and tables, schedule creation is only supported in PDF and XLS + * formats. Schedules created in CSV formats for such Liveboards will fail to run. If + * `PDF` is set as the `file_format`, enable `pdf_options` to get + * the correct attachment. Not doing so may cause the attachment to be rendered empty. * To + * include only specific visualizations, specify the visualization GUIDs in the + * `visualization_identifiers` array. * You can schedule a Liveboard job to run + * periodically by setting frequency parameters. You can set the schedule to run daily, weekly, + * monthly or every n minutes or hours. The scheduled job can also be configured to run at a + * specific time of the day or on specific days of the week or month. Please ensure that when + * setting the schedule frequency for _minute of the object_, only values that are multiples of + * 5 are included. * If the `frequency` parameters are defined, you can set the time + * zone to a value that matches your server's time zone. For example, + * `US/Central`, `Etc/UTC`, `CET`. The default time zone is + * `America/Los_Angeles`. For more information about Liveboard jobs, see [ThoughtSpot + * Product Documentation](https://docs.thoughtspot.com/cloud/latest/liveboard-schedule). + * + * @param createScheduleRequest (required) + * @param _callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body + * object + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 Schedule successfully created. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public okhttp3.Call createScheduleAsync( + CreateScheduleRequest createScheduleRequest, + final ApiCallback _callback) + throws ApiException { + + okhttp3.Call localVarCall = + createScheduleValidateBeforeCall(createScheduleRequest, _callback); + Type localVarReturnType = new TypeToken() {}.getType(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; + } + /** + * Build call for createTag + * + * @param createTagRequest (required) + * @param _callback Callback for upload/download progress + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 Tag successfully created. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public okhttp3.Call createTagCall( + CreateTagRequest createTagRequest, final ApiCallback _callback) throws ApiException { + String basePath = null; + // Operation Servers + String[] localBasePaths = new String[] {}; + + // Determine Base Path to Use + if (localCustomBaseUrl != null) { + basePath = localCustomBaseUrl; + } else if (localBasePaths.length > 0) { + basePath = localBasePaths[localHostIndex]; + } else { + basePath = null; + } + + Object localVarPostBody = createTagRequest; + + // create path and map variables + String localVarPath = "/api/rest/2.0/tags/create"; + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + final String[] localVarAccepts = {"application/json"}; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = {"application/json"}; + final String localVarContentType = + localVarApiClient.selectHeaderContentType(localVarContentTypes); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } + + String[] localVarAuthNames = new String[] {"bearerAuth"}; + return localVarApiClient.buildCall( + basePath, + localVarPath, + "POST", + localVarQueryParams, + localVarCollectionQueryParams, + localVarPostBody, + localVarHeaderParams, + localVarCookieParams, + localVarFormParams, + localVarAuthNames, + _callback); + } + + @SuppressWarnings("rawtypes") + private okhttp3.Call createTagValidateBeforeCall( + CreateTagRequest createTagRequest, final ApiCallback _callback) throws ApiException { + // verify the required parameter 'createTagRequest' is set + if (createTagRequest == null) { + throw new ApiException( + "Missing the required parameter 'createTagRequest' when calling" + + " createTag(Async)"); + } + + return createTagCall(createTagRequest, _callback); + } + + /** + * Version: 9.0.0.cl or later Creates a tag object. Tags are labels that identify a metadata + * object. For example, you can create a tag to designate subject areas, such as sales, HR, + * marketing, and finance. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) + * privilege. If [Role-Based Access Control + * (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the + * `TAGMANAGEMENT` (**Can manage tags**) privilege is required to create, edit, and + * delete tags. + * + * @param createTagRequest (required) + * @return Tag + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the + * response body + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 Tag successfully created. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public Tag createTag(CreateTagRequest createTagRequest) throws ApiException { + ApiResponse localVarResp = createTagWithHttpInfo(createTagRequest); + return localVarResp.getData(); + } + + /** + * Version: 9.0.0.cl or later Creates a tag object. Tags are labels that identify a metadata + * object. For example, you can create a tag to designate subject areas, such as sales, HR, + * marketing, and finance. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) + * privilege. If [Role-Based Access Control + * (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the + * `TAGMANAGEMENT` (**Can manage tags**) privilege is required to create, edit, and + * delete tags. + * + * @param createTagRequest (required) + * @return ApiResponse<Tag> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the + * response body + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 Tag successfully created. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public ApiResponse createTagWithHttpInfo(CreateTagRequest createTagRequest) + throws ApiException { + okhttp3.Call localVarCall = createTagValidateBeforeCall(createTagRequest, null); + Type localVarReturnType = new TypeToken() {}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); + } + + /** + * (asynchronously) Version: 9.0.0.cl or later Creates a tag object. Tags are labels that + * identify a metadata object. For example, you can create a tag to designate subject areas, + * such as sales, HR, marketing, and finance. Requires `ADMINISTRATION` (**Can + * administer ThoughtSpot**) privilege. If [Role-Based Access Control + * (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the + * `TAGMANAGEMENT` (**Can manage tags**) privilege is required to create, edit, and + * delete tags. + * + * @param createTagRequest (required) + * @param _callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body + * object + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 Tag successfully created. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public okhttp3.Call createTagAsync( + CreateTagRequest createTagRequest, final ApiCallback _callback) + throws ApiException { + + okhttp3.Call localVarCall = createTagValidateBeforeCall(createTagRequest, _callback); + Type localVarReturnType = new TypeToken() {}.getType(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; + } + /** + * Build call for createUser + * + * @param createUserRequest (required) + * @param _callback Callback for upload/download progress + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 User successfully created. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public okhttp3.Call createUserCall( + CreateUserRequest createUserRequest, final ApiCallback _callback) throws ApiException { + String basePath = null; + // Operation Servers + String[] localBasePaths = new String[] {}; + + // Determine Base Path to Use + if (localCustomBaseUrl != null) { + basePath = localCustomBaseUrl; + } else if (localBasePaths.length > 0) { + basePath = localBasePaths[localHostIndex]; + } else { + basePath = null; + } + + Object localVarPostBody = createUserRequest; + + // create path and map variables + String localVarPath = "/api/rest/2.0/users/create"; + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + final String[] localVarAccepts = {"application/json"}; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = {"application/json"}; + final String localVarContentType = + localVarApiClient.selectHeaderContentType(localVarContentTypes); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } + + String[] localVarAuthNames = new String[] {"bearerAuth"}; + return localVarApiClient.buildCall( + basePath, + localVarPath, + "POST", + localVarQueryParams, + localVarCollectionQueryParams, + localVarPostBody, + localVarHeaderParams, + localVarCookieParams, + localVarFormParams, + localVarAuthNames, + _callback); + } + + @SuppressWarnings("rawtypes") + private okhttp3.Call createUserValidateBeforeCall( + CreateUserRequest createUserRequest, final ApiCallback _callback) throws ApiException { + // verify the required parameter 'createUserRequest' is set + if (createUserRequest == null) { + throw new ApiException( + "Missing the required parameter 'createUserRequest' when calling" + + " createUser(Async)"); + } + + return createUserCall(createUserRequest, _callback); + } + + /** + * Version: 9.0.0.cl or later Creates a user in ThoughtSpot. The API endpoint allows you to + * configure several user properties such as email address, account status, share notification + * preferences, and sharing visibility. You can provision the user to + * [groups](https://docs.thoughtspot.com/cloud/latest/groups-privileges) and + * [Orgs](https://docs.thoughtspot.com/cloud/latest/orgs-overview). You can also add Liveboard, + * Answer, and Worksheet objects to the user’s favorites list, assign a default Liveboard for + * the user, and set user preferences. Requires `ADMINISTRATION` (**Can administer + * ThoughtSpot**) privilege. If [Role-Based Access Control + * (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the + * `USER_ADMINISTRATION` (**Can manage users**) privilege is required. + * + * @param createUserRequest (required) + * @return User + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the + * response body + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 User successfully created. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public User createUser(CreateUserRequest createUserRequest) throws ApiException { + ApiResponse localVarResp = createUserWithHttpInfo(createUserRequest); + return localVarResp.getData(); + } + + /** + * Version: 9.0.0.cl or later Creates a user in ThoughtSpot. The API endpoint allows you to + * configure several user properties such as email address, account status, share notification + * preferences, and sharing visibility. You can provision the user to + * [groups](https://docs.thoughtspot.com/cloud/latest/groups-privileges) and + * [Orgs](https://docs.thoughtspot.com/cloud/latest/orgs-overview). You can also add Liveboard, + * Answer, and Worksheet objects to the user’s favorites list, assign a default Liveboard for + * the user, and set user preferences. Requires `ADMINISTRATION` (**Can administer + * ThoughtSpot**) privilege. If [Role-Based Access Control + * (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the + * `USER_ADMINISTRATION` (**Can manage users**) privilege is required. + * + * @param createUserRequest (required) + * @return ApiResponse<User> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the + * response body + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 User successfully created. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public ApiResponse createUserWithHttpInfo(CreateUserRequest createUserRequest) + throws ApiException { + okhttp3.Call localVarCall = createUserValidateBeforeCall(createUserRequest, null); + Type localVarReturnType = new TypeToken() {}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); + } + + /** + * (asynchronously) Version: 9.0.0.cl or later Creates a user in ThoughtSpot. The API endpoint + * allows you to configure several user properties such as email address, account status, share + * notification preferences, and sharing visibility. You can provision the user to + * [groups](https://docs.thoughtspot.com/cloud/latest/groups-privileges) and + * [Orgs](https://docs.thoughtspot.com/cloud/latest/orgs-overview). You can also add Liveboard, + * Answer, and Worksheet objects to the user’s favorites list, assign a default Liveboard for + * the user, and set user preferences. Requires `ADMINISTRATION` (**Can administer + * ThoughtSpot**) privilege. If [Role-Based Access Control + * (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the + * `USER_ADMINISTRATION` (**Can manage users**) privilege is required. + * + * @param createUserRequest (required) + * @param _callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body + * object + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 User successfully created. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public okhttp3.Call createUserAsync( + CreateUserRequest createUserRequest, final ApiCallback _callback) + throws ApiException { + + okhttp3.Call localVarCall = createUserValidateBeforeCall(createUserRequest, _callback); + Type localVarReturnType = new TypeToken() {}.getType(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; + } + /** + * Build call for createUserGroup + * + * @param createUserGroupRequest (required) + * @param _callback Callback for upload/download progress + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 User group successfully created. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public okhttp3.Call createUserGroupCall( + CreateUserGroupRequest createUserGroupRequest, final ApiCallback _callback) + throws ApiException { + String basePath = null; + // Operation Servers + String[] localBasePaths = new String[] {}; + + // Determine Base Path to Use + if (localCustomBaseUrl != null) { + basePath = localCustomBaseUrl; + } else if (localBasePaths.length > 0) { + basePath = localBasePaths[localHostIndex]; + } else { + basePath = null; + } + + Object localVarPostBody = createUserGroupRequest; + + // create path and map variables + String localVarPath = "/api/rest/2.0/groups/create"; + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + final String[] localVarAccepts = {"application/json"}; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = {"application/json"}; + final String localVarContentType = + localVarApiClient.selectHeaderContentType(localVarContentTypes); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } + + String[] localVarAuthNames = new String[] {"bearerAuth"}; + return localVarApiClient.buildCall( + basePath, + localVarPath, + "POST", + localVarQueryParams, + localVarCollectionQueryParams, + localVarPostBody, + localVarHeaderParams, + localVarCookieParams, + localVarFormParams, + localVarAuthNames, + _callback); + } + + @SuppressWarnings("rawtypes") + private okhttp3.Call createUserGroupValidateBeforeCall( + CreateUserGroupRequest createUserGroupRequest, final ApiCallback _callback) + throws ApiException { + // verify the required parameter 'createUserGroupRequest' is set + if (createUserGroupRequest == null) { + throw new ApiException( + "Missing the required parameter 'createUserGroupRequest' when calling" + + " createUserGroup(Async)"); + } + + return createUserGroupCall(createUserGroupRequest, _callback); + } + + /** + * Version: 9.0.0.cl or later Creates a group object in ThoughtSpot. Requires + * `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access + * Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, + * the `GROUP_ADMINISTRATION` (**Can manage groups**) privilege is required. #### + * About groups Groups in ThoughtSpot are used by the administrators to define privileges and + * organize users based on their roles and access requirements. To know more about groups and + * privileges, see [ThoughtSpot Product + * Documentation](https://docs.thoughtspot.com/cloud/latest/groups-privileges). #### Supported + * operations The API endpoint lets you perform the following operations: * Assign privileges * + * Add users * Define sharing visibility * Add sub-groups * Assign a default Liveboard + * + * @param createUserGroupRequest (required) + * @return UserGroupResponse + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the + * response body + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 User group successfully created. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public UserGroupResponse createUserGroup(CreateUserGroupRequest createUserGroupRequest) + throws ApiException { + ApiResponse localVarResp = + createUserGroupWithHttpInfo(createUserGroupRequest); + return localVarResp.getData(); + } + + /** + * Version: 9.0.0.cl or later Creates a group object in ThoughtSpot. Requires + * `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access + * Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, + * the `GROUP_ADMINISTRATION` (**Can manage groups**) privilege is required. #### + * About groups Groups in ThoughtSpot are used by the administrators to define privileges and + * organize users based on their roles and access requirements. To know more about groups and + * privileges, see [ThoughtSpot Product + * Documentation](https://docs.thoughtspot.com/cloud/latest/groups-privileges). #### Supported + * operations The API endpoint lets you perform the following operations: * Assign privileges * + * Add users * Define sharing visibility * Add sub-groups * Assign a default Liveboard + * + * @param createUserGroupRequest (required) + * @return ApiResponse<UserGroupResponse> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the + * response body + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 User group successfully created. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public ApiResponse createUserGroupWithHttpInfo( + CreateUserGroupRequest createUserGroupRequest) throws ApiException { + okhttp3.Call localVarCall = createUserGroupValidateBeforeCall(createUserGroupRequest, null); + Type localVarReturnType = new TypeToken() {}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); + } + + /** + * (asynchronously) Version: 9.0.0.cl or later Creates a group object in ThoughtSpot. Requires + * `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access + * Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, + * the `GROUP_ADMINISTRATION` (**Can manage groups**) privilege is required. #### + * About groups Groups in ThoughtSpot are used by the administrators to define privileges and + * organize users based on their roles and access requirements. To know more about groups and + * privileges, see [ThoughtSpot Product + * Documentation](https://docs.thoughtspot.com/cloud/latest/groups-privileges). #### Supported + * operations The API endpoint lets you perform the following operations: * Assign privileges * + * Add users * Define sharing visibility * Add sub-groups * Assign a default Liveboard + * + * @param createUserGroupRequest (required) + * @param _callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body + * object + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 User group successfully created. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public okhttp3.Call createUserGroupAsync( + CreateUserGroupRequest createUserGroupRequest, + final ApiCallback _callback) + throws ApiException { + + okhttp3.Call localVarCall = + createUserGroupValidateBeforeCall(createUserGroupRequest, _callback); + Type localVarReturnType = new TypeToken() {}.getType(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; + } + /** + * Build call for createVariable + * + * @param createVariableRequest (required) + * @param _callback Callback for upload/download progress + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 Create variable is successful. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public okhttp3.Call createVariableCall( + CreateVariableRequest createVariableRequest, final ApiCallback _callback) + throws ApiException { + String basePath = null; + // Operation Servers + String[] localBasePaths = new String[] {}; + + // Determine Base Path to Use + if (localCustomBaseUrl != null) { + basePath = localCustomBaseUrl; + } else if (localBasePaths.length > 0) { + basePath = localBasePaths[localHostIndex]; + } else { + basePath = null; + } + + Object localVarPostBody = createVariableRequest; + + // create path and map variables + String localVarPath = "/api/rest/2.0/template/variables/create"; + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + final String[] localVarAccepts = {"application/json"}; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = {"application/json"}; + final String localVarContentType = + localVarApiClient.selectHeaderContentType(localVarContentTypes); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } + + String[] localVarAuthNames = new String[] {"bearerAuth"}; + return localVarApiClient.buildCall( + basePath, + localVarPath, + "POST", + localVarQueryParams, + localVarCollectionQueryParams, + localVarPostBody, + localVarHeaderParams, + localVarCookieParams, + localVarFormParams, + localVarAuthNames, + _callback); + } + + @SuppressWarnings("rawtypes") + private okhttp3.Call createVariableValidateBeforeCall( + CreateVariableRequest createVariableRequest, final ApiCallback _callback) + throws ApiException { + // verify the required parameter 'createVariableRequest' is set + if (createVariableRequest == null) { + throw new ApiException( + "Missing the required parameter 'createVariableRequest' when calling" + + " createVariable(Async)"); + } + + return createVariableCall(createVariableRequest, _callback); + } + + /** + * Create a variable which can be used for parameterizing metadata objects Version: 26.4.0.cl or + * later Allows creating a variable which can be used for parameterizing metadata objects in + * ThoughtSpot. Requires ADMINISTRATION role and TENANT scope. The CAN_MANAGE_VARIABLES + * permission allows you to manage Formula Variables in the current organization scope. The API + * endpoint supports the following types of variables: * CONNECTION_PROPERTY - For connection + * properties * TABLE_MAPPING - For table mappings * CONNECTION_PROPERTY_PER_PRINCIPAL - For + * connection properties per principal. In order to use this please contact support to enable + * this. * FORMULA_VARIABLE - For Formula variables, introduced in 10.15.0.cl When creating a + * variable, you need to specify: * The variable type * A unique name for the variable * Whether + * the variable contains sensitive values (defaults to false) * The data type of the variable, + * only specify for formula variables (defaults to null) The operation will fail if: * The user + * lacks required permissions * The variable name already exists * The variable type is invalid + * + * @param createVariableRequest (required) + * @return Variable + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the + * response body + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 Create variable is successful. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public Variable createVariable(CreateVariableRequest createVariableRequest) + throws ApiException { + ApiResponse localVarResp = createVariableWithHttpInfo(createVariableRequest); + return localVarResp.getData(); + } + + /** + * Create a variable which can be used for parameterizing metadata objects Version: 26.4.0.cl or + * later Allows creating a variable which can be used for parameterizing metadata objects in + * ThoughtSpot. Requires ADMINISTRATION role and TENANT scope. The CAN_MANAGE_VARIABLES + * permission allows you to manage Formula Variables in the current organization scope. The API + * endpoint supports the following types of variables: * CONNECTION_PROPERTY - For connection + * properties * TABLE_MAPPING - For table mappings * CONNECTION_PROPERTY_PER_PRINCIPAL - For + * connection properties per principal. In order to use this please contact support to enable + * this. * FORMULA_VARIABLE - For Formula variables, introduced in 10.15.0.cl When creating a + * variable, you need to specify: * The variable type * A unique name for the variable * Whether + * the variable contains sensitive values (defaults to false) * The data type of the variable, + * only specify for formula variables (defaults to null) The operation will fail if: * The user + * lacks required permissions * The variable name already exists * The variable type is invalid + * + * @param createVariableRequest (required) + * @return ApiResponse<Variable> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the + * response body + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 Create variable is successful. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public ApiResponse createVariableWithHttpInfo( + CreateVariableRequest createVariableRequest) throws ApiException { + okhttp3.Call localVarCall = createVariableValidateBeforeCall(createVariableRequest, null); + Type localVarReturnType = new TypeToken() {}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); + } + + /** + * (asynchronously) Create a variable which can be used for parameterizing metadata objects + * Version: 26.4.0.cl or later Allows creating a variable which can be used for parameterizing + * metadata objects in ThoughtSpot. Requires ADMINISTRATION role and TENANT scope. The + * CAN_MANAGE_VARIABLES permission allows you to manage Formula Variables in the current + * organization scope. The API endpoint supports the following types of variables: * + * CONNECTION_PROPERTY - For connection properties * TABLE_MAPPING - For table mappings * + * CONNECTION_PROPERTY_PER_PRINCIPAL - For connection properties per principal. In order to use + * this please contact support to enable this. * FORMULA_VARIABLE - For Formula variables, + * introduced in 10.15.0.cl When creating a variable, you need to specify: * The variable type * + * A unique name for the variable * Whether the variable contains sensitive values (defaults to + * false) * The data type of the variable, only specify for formula variables (defaults to null) + * The operation will fail if: * The user lacks required permissions * The variable name already + * exists * The variable type is invalid + * + * @param createVariableRequest (required) + * @param _callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body + * object + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 Create variable is successful. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public okhttp3.Call createVariableAsync( + CreateVariableRequest createVariableRequest, final ApiCallback _callback) + throws ApiException { + + okhttp3.Call localVarCall = + createVariableValidateBeforeCall(createVariableRequest, _callback); + Type localVarReturnType = new TypeToken() {}.getType(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; + } + /** + * Build call for createWebhookConfiguration + * + * @param createWebhookConfigurationRequest (required) + * @param _callback Callback for upload/download progress + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 Webhook configuration created successfully -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public okhttp3.Call createWebhookConfigurationCall( + CreateWebhookConfigurationRequest createWebhookConfigurationRequest, + final ApiCallback _callback) + throws ApiException { + String basePath = null; + // Operation Servers + String[] localBasePaths = new String[] {}; + + // Determine Base Path to Use + if (localCustomBaseUrl != null) { + basePath = localCustomBaseUrl; + } else if (localBasePaths.length > 0) { + basePath = localBasePaths[localHostIndex]; + } else { + basePath = null; + } + + Object localVarPostBody = createWebhookConfigurationRequest; + + // create path and map variables + String localVarPath = "/api/rest/2.0/webhooks/create"; + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + final String[] localVarAccepts = {"application/json"}; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = {"application/json"}; + final String localVarContentType = + localVarApiClient.selectHeaderContentType(localVarContentTypes); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } + + String[] localVarAuthNames = new String[] {"bearerAuth"}; + return localVarApiClient.buildCall( + basePath, + localVarPath, + "POST", + localVarQueryParams, + localVarCollectionQueryParams, + localVarPostBody, + localVarHeaderParams, + localVarCookieParams, + localVarFormParams, + localVarAuthNames, + _callback); + } + + @SuppressWarnings("rawtypes") + private okhttp3.Call createWebhookConfigurationValidateBeforeCall( + CreateWebhookConfigurationRequest createWebhookConfigurationRequest, + final ApiCallback _callback) + throws ApiException { + // verify the required parameter 'createWebhookConfigurationRequest' is set + if (createWebhookConfigurationRequest == null) { + throw new ApiException( + "Missing the required parameter 'createWebhookConfigurationRequest' when" + + " calling createWebhookConfiguration(Async)"); + } + + return createWebhookConfigurationCall(createWebhookConfigurationRequest, _callback); + } + + /** + * Version: 10.14.0.cl or later Creates a new webhook configuration to receive notifications for + * specified events. The webhook will be triggered when the configured events occur in the + * system. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) or + * `DEVELOPER` (**Has developer privilege**) privilege. If [Role-Based Access Control + * (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, users with + * `CAN_MANAGE_WEBHOOKS` (**Can manage webhooks**) privilege are also authorized to + * perform this action. + * + * @param createWebhookConfigurationRequest (required) + * @return WebhookResponse + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the + * response body + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 Webhook configuration created successfully -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public WebhookResponse createWebhookConfiguration( + CreateWebhookConfigurationRequest createWebhookConfigurationRequest) + throws ApiException { + ApiResponse localVarResp = + createWebhookConfigurationWithHttpInfo(createWebhookConfigurationRequest); + return localVarResp.getData(); + } + + /** + * Version: 10.14.0.cl or later Creates a new webhook configuration to receive notifications for + * specified events. The webhook will be triggered when the configured events occur in the + * system. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) or + * `DEVELOPER` (**Has developer privilege**) privilege. If [Role-Based Access Control + * (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, users with + * `CAN_MANAGE_WEBHOOKS` (**Can manage webhooks**) privilege are also authorized to + * perform this action. + * + * @param createWebhookConfigurationRequest (required) + * @return ApiResponse<WebhookResponse> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the + * response body + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 Webhook configuration created successfully -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public ApiResponse createWebhookConfigurationWithHttpInfo( + CreateWebhookConfigurationRequest createWebhookConfigurationRequest) + throws ApiException { + okhttp3.Call localVarCall = + createWebhookConfigurationValidateBeforeCall( + createWebhookConfigurationRequest, null); + Type localVarReturnType = new TypeToken() {}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); + } + + /** + * (asynchronously) Version: 10.14.0.cl or later Creates a new webhook configuration to receive + * notifications for specified events. The webhook will be triggered when the configured events + * occur in the system. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) or + * `DEVELOPER` (**Has developer privilege**) privilege. If [Role-Based Access Control + * (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, users with + * `CAN_MANAGE_WEBHOOKS` (**Can manage webhooks**) privilege are also authorized to + * perform this action. + * + * @param createWebhookConfigurationRequest (required) + * @param _callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body + * object + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 Webhook configuration created successfully -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public okhttp3.Call createWebhookConfigurationAsync( + CreateWebhookConfigurationRequest createWebhookConfigurationRequest, + final ApiCallback _callback) + throws ApiException { + + okhttp3.Call localVarCall = + createWebhookConfigurationValidateBeforeCall( + createWebhookConfigurationRequest, _callback); + Type localVarReturnType = new TypeToken() {}.getType(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; + } + /** + * Build call for dbtConnection + * + * @param connectionName Name of the connection. (required) + * @param databaseName Name of the Database. (required) + * @param importType Mention type of Import (optional, default to DBT_CLOUD) + * @param accessToken Access token is mandatory when Import_Type is DBT_CLOUD. (optional) + * @param dbtUrl DBT URL is mandatory when Import_Type is DBT_CLOUD. (optional) + * @param accountId Account ID is mandatory when Import_Type is DBT_CLOUD (optional) + * @param projectId Project ID is mandatory when Import_Type is DBT_CLOUD (optional) + * @param dbtEnvId DBT Environment ID\\\" (optional) + * @param projectName Name of the project (optional) + * @param fileContent Upload DBT Manifest and Catalog artifact files as a ZIP file. This field + * is Mandatory when Import Type is 'ZIP_FILE' (optional) + * @param _callback Callback for upload/download progress + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 Succesfully created DBT Connection. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public okhttp3.Call dbtConnectionCall( + String connectionName, + String databaseName, + String importType, + String accessToken, + String dbtUrl, + String accountId, + String projectId, + String dbtEnvId, + String projectName, + File fileContent, + final ApiCallback _callback) + throws ApiException { + String basePath = null; + // Operation Servers + String[] localBasePaths = new String[] {}; + + // Determine Base Path to Use + if (localCustomBaseUrl != null) { + basePath = localCustomBaseUrl; + } else if (localBasePaths.length > 0) { + basePath = localBasePaths[localHostIndex]; + } else { + basePath = null; + } + + Object localVarPostBody = null; + + // create path and map variables + String localVarPath = "/api/rest/2.0/dbt/dbt-connection"; + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + if (connectionName != null) { + localVarFormParams.put("connection_name", connectionName); + } + + if (databaseName != null) { + localVarFormParams.put("database_name", databaseName); + } + + if (importType != null) { + localVarFormParams.put("import_type", importType); + } + + if (accessToken != null) { + localVarFormParams.put("access_token", accessToken); + } + + if (dbtUrl != null) { + localVarFormParams.put("dbt_url", dbtUrl); + } + + if (accountId != null) { + localVarFormParams.put("account_id", accountId); + } + + if (projectId != null) { + localVarFormParams.put("project_id", projectId); + } + + if (dbtEnvId != null) { + localVarFormParams.put("dbt_env_id", dbtEnvId); + } + + if (projectName != null) { + localVarFormParams.put("project_name", projectName); + } + + if (fileContent != null) { + localVarFormParams.put("file_content", fileContent); + } + + final String[] localVarAccepts = {"application/json"}; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = {"multipart/form-data"}; + final String localVarContentType = + localVarApiClient.selectHeaderContentType(localVarContentTypes); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } + + String[] localVarAuthNames = new String[] {"bearerAuth"}; + return localVarApiClient.buildCall( + basePath, + localVarPath, + "POST", + localVarQueryParams, + localVarCollectionQueryParams, + localVarPostBody, + localVarHeaderParams, + localVarCookieParams, + localVarFormParams, + localVarAuthNames, + _callback); + } + + @SuppressWarnings("rawtypes") + private okhttp3.Call dbtConnectionValidateBeforeCall( + String connectionName, + String databaseName, + String importType, + String accessToken, + String dbtUrl, + String accountId, + String projectId, + String dbtEnvId, + String projectName, + File fileContent, + final ApiCallback _callback) + throws ApiException { + // verify the required parameter 'connectionName' is set + if (connectionName == null) { + throw new ApiException( + "Missing the required parameter 'connectionName' when calling" + + " dbtConnection(Async)"); + } + + // verify the required parameter 'databaseName' is set + if (databaseName == null) { + throw new ApiException( + "Missing the required parameter 'databaseName' when calling" + + " dbtConnection(Async)"); + } + + return dbtConnectionCall( + connectionName, + databaseName, + importType, + accessToken, + dbtUrl, + accountId, + projectId, + dbtEnvId, + projectName, + fileContent, + _callback); + } + + /** + * Version: 9.9.0.cl or later Creates a DBT connection object in ThoughtSpot. Requires + * `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege or + * `DATAMANAGEMENT` (**Can manage data**) privilege. If [Role-Based Access Control + * (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the + * following Data control privileges may be required: - + * `CAN_MANAGE_CUSTOM_CALENDAR`(**Can manage custom calendars**) - + * `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) - + * `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` (**Can manage data models**) #### About create + * DBT connection DBT connection in ThoughtSpot is used by the user to define DBT credentials + * for cloud . The API needs embrace connection, embrace database name, DBT url, import type, + * DBT account identifier, DBT project identifier, DBT access token and environment details (or) + * embrace connection, embrace database name, import type, file_content to create a connection + * object. To know more about DBT, see ThoughtSpot Product Documentation. + * + * @param connectionName Name of the connection. (required) + * @param databaseName Name of the Database. (required) + * @param importType Mention type of Import (optional, default to DBT_CLOUD) + * @param accessToken Access token is mandatory when Import_Type is DBT_CLOUD. (optional) + * @param dbtUrl DBT URL is mandatory when Import_Type is DBT_CLOUD. (optional) + * @param accountId Account ID is mandatory when Import_Type is DBT_CLOUD (optional) + * @param projectId Project ID is mandatory when Import_Type is DBT_CLOUD (optional) + * @param dbtEnvId DBT Environment ID\\\" (optional) + * @param projectName Name of the project (optional) + * @param fileContent Upload DBT Manifest and Catalog artifact files as a ZIP file. This field + * is Mandatory when Import Type is 'ZIP_FILE' (optional) + * @return Object + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the + * response body + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 Succesfully created DBT Connection. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public Object dbtConnection( + String connectionName, + String databaseName, + String importType, + String accessToken, + String dbtUrl, + String accountId, + String projectId, + String dbtEnvId, + String projectName, + File fileContent) + throws ApiException { + ApiResponse localVarResp = + dbtConnectionWithHttpInfo( + connectionName, + databaseName, + importType, + accessToken, + dbtUrl, + accountId, + projectId, + dbtEnvId, + projectName, + fileContent); + return localVarResp.getData(); + } + + /** + * Version: 9.9.0.cl or later Creates a DBT connection object in ThoughtSpot. Requires + * `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege or + * `DATAMANAGEMENT` (**Can manage data**) privilege. If [Role-Based Access Control + * (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the + * following Data control privileges may be required: - + * `CAN_MANAGE_CUSTOM_CALENDAR`(**Can manage custom calendars**) - + * `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) - + * `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` (**Can manage data models**) #### About create + * DBT connection DBT connection in ThoughtSpot is used by the user to define DBT credentials + * for cloud . The API needs embrace connection, embrace database name, DBT url, import type, + * DBT account identifier, DBT project identifier, DBT access token and environment details (or) + * embrace connection, embrace database name, import type, file_content to create a connection + * object. To know more about DBT, see ThoughtSpot Product Documentation. + * + * @param connectionName Name of the connection. (required) + * @param databaseName Name of the Database. (required) + * @param importType Mention type of Import (optional, default to DBT_CLOUD) + * @param accessToken Access token is mandatory when Import_Type is DBT_CLOUD. (optional) + * @param dbtUrl DBT URL is mandatory when Import_Type is DBT_CLOUD. (optional) + * @param accountId Account ID is mandatory when Import_Type is DBT_CLOUD (optional) + * @param projectId Project ID is mandatory when Import_Type is DBT_CLOUD (optional) + * @param dbtEnvId DBT Environment ID\\\" (optional) + * @param projectName Name of the project (optional) + * @param fileContent Upload DBT Manifest and Catalog artifact files as a ZIP file. This field + * is Mandatory when Import Type is 'ZIP_FILE' (optional) + * @return ApiResponse<Object> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the + * response body + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 Succesfully created DBT Connection. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public ApiResponse dbtConnectionWithHttpInfo( + String connectionName, + String databaseName, + String importType, + String accessToken, + String dbtUrl, + String accountId, + String projectId, + String dbtEnvId, + String projectName, + File fileContent) + throws ApiException { + okhttp3.Call localVarCall = + dbtConnectionValidateBeforeCall( + connectionName, + databaseName, + importType, + accessToken, + dbtUrl, + accountId, + projectId, + dbtEnvId, + projectName, + fileContent, + null); + Type localVarReturnType = new TypeToken() {}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); + } + + /** + * (asynchronously) Version: 9.9.0.cl or later Creates a DBT connection object in ThoughtSpot. + * Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege or + * `DATAMANAGEMENT` (**Can manage data**) privilege. If [Role-Based Access Control + * (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the + * following Data control privileges may be required: - + * `CAN_MANAGE_CUSTOM_CALENDAR`(**Can manage custom calendars**) - + * `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) - + * `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` (**Can manage data models**) #### About create + * DBT connection DBT connection in ThoughtSpot is used by the user to define DBT credentials + * for cloud . The API needs embrace connection, embrace database name, DBT url, import type, + * DBT account identifier, DBT project identifier, DBT access token and environment details (or) + * embrace connection, embrace database name, import type, file_content to create a connection + * object. To know more about DBT, see ThoughtSpot Product Documentation. + * + * @param connectionName Name of the connection. (required) + * @param databaseName Name of the Database. (required) + * @param importType Mention type of Import (optional, default to DBT_CLOUD) + * @param accessToken Access token is mandatory when Import_Type is DBT_CLOUD. (optional) + * @param dbtUrl DBT URL is mandatory when Import_Type is DBT_CLOUD. (optional) + * @param accountId Account ID is mandatory when Import_Type is DBT_CLOUD (optional) + * @param projectId Project ID is mandatory when Import_Type is DBT_CLOUD (optional) + * @param dbtEnvId DBT Environment ID\\\" (optional) + * @param projectName Name of the project (optional) + * @param fileContent Upload DBT Manifest and Catalog artifact files as a ZIP file. This field + * is Mandatory when Import Type is 'ZIP_FILE' (optional) + * @param _callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body + * object + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 Succesfully created DBT Connection. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public okhttp3.Call dbtConnectionAsync( + String connectionName, + String databaseName, + String importType, + String accessToken, + String dbtUrl, + String accountId, + String projectId, + String dbtEnvId, + String projectName, + File fileContent, + final ApiCallback _callback) + throws ApiException { + + okhttp3.Call localVarCall = + dbtConnectionValidateBeforeCall( + connectionName, + databaseName, + importType, + accessToken, + dbtUrl, + accountId, + projectId, + dbtEnvId, + projectName, + fileContent, + _callback); + Type localVarReturnType = new TypeToken() {}.getType(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; + } + /** + * Build call for dbtGenerateSyncTml + * + * @param dbtConnectionIdentifier Unique ID of the DBT connection. (required) + * @param fileContent Upload DBT Manifest and Catalog artifact files as a ZIP file. This field + * is mandatory if the connection was created with import_type ‘ZIP_FILE’ (optional) + * @param _callback Callback for upload/download progress + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 Sync Table and Worksheet TML's are successfully generated. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public okhttp3.Call dbtGenerateSyncTmlCall( + String dbtConnectionIdentifier, File fileContent, final ApiCallback _callback) + throws ApiException { + String basePath = null; + // Operation Servers + String[] localBasePaths = new String[] {}; + + // Determine Base Path to Use + if (localCustomBaseUrl != null) { + basePath = localCustomBaseUrl; + } else if (localBasePaths.length > 0) { + basePath = localBasePaths[localHostIndex]; + } else { + basePath = null; + } + + Object localVarPostBody = null; + + // create path and map variables + String localVarPath = "/api/rest/2.0/dbt/generate-sync-tml"; + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + if (dbtConnectionIdentifier != null) { + localVarFormParams.put("dbt_connection_identifier", dbtConnectionIdentifier); + } + + if (fileContent != null) { + localVarFormParams.put("file_content", fileContent); + } + + final String[] localVarAccepts = {"application/json"}; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = {"multipart/form-data"}; + final String localVarContentType = + localVarApiClient.selectHeaderContentType(localVarContentTypes); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } + + String[] localVarAuthNames = new String[] {"bearerAuth"}; + return localVarApiClient.buildCall( + basePath, + localVarPath, + "POST", + localVarQueryParams, + localVarCollectionQueryParams, + localVarPostBody, + localVarHeaderParams, + localVarCookieParams, + localVarFormParams, + localVarAuthNames, + _callback); + } + + @SuppressWarnings("rawtypes") + private okhttp3.Call dbtGenerateSyncTmlValidateBeforeCall( + String dbtConnectionIdentifier, File fileContent, final ApiCallback _callback) + throws ApiException { + // verify the required parameter 'dbtConnectionIdentifier' is set + if (dbtConnectionIdentifier == null) { + throw new ApiException( + "Missing the required parameter 'dbtConnectionIdentifier' when calling" + + " dbtGenerateSyncTml(Async)"); + } + + return dbtGenerateSyncTmlCall(dbtConnectionIdentifier, fileContent, _callback); + } + + /** + * Version: 9.9.0.cl or later Resynchronize the existing list of models, tables, worksheet tml’s + * and import them to Thoughtspot based on the DBT connection object. Requires + * `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege or + * `DATAMANAGEMENT` (**Can manage data**) privilege, along with an existing DBT + * connection. If [Role-Based Access Control + * (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the + * following data control privileges may be required: - + * `CAN_MANAGE_CUSTOM_CALENDAR`(**Can manage custom calendars**) - + * `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) - + * `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` (**Can manage data models**) + * + * @param dbtConnectionIdentifier Unique ID of the DBT connection. (required) + * @param fileContent Upload DBT Manifest and Catalog artifact files as a ZIP file. This field + * is mandatory if the connection was created with import_type ‘ZIP_FILE’ (optional) + * @return Object + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the + * response body + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 Sync Table and Worksheet TML's are successfully generated. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public Object dbtGenerateSyncTml(String dbtConnectionIdentifier, File fileContent) + throws ApiException { + ApiResponse localVarResp = + dbtGenerateSyncTmlWithHttpInfo(dbtConnectionIdentifier, fileContent); + return localVarResp.getData(); + } + + /** + * Version: 9.9.0.cl or later Resynchronize the existing list of models, tables, worksheet tml’s + * and import them to Thoughtspot based on the DBT connection object. Requires + * `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege or + * `DATAMANAGEMENT` (**Can manage data**) privilege, along with an existing DBT + * connection. If [Role-Based Access Control + * (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the + * following data control privileges may be required: - + * `CAN_MANAGE_CUSTOM_CALENDAR`(**Can manage custom calendars**) - + * `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) - + * `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` (**Can manage data models**) + * + * @param dbtConnectionIdentifier Unique ID of the DBT connection. (required) + * @param fileContent Upload DBT Manifest and Catalog artifact files as a ZIP file. This field + * is mandatory if the connection was created with import_type ‘ZIP_FILE’ (optional) + * @return ApiResponse<Object> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the + * response body + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 Sync Table and Worksheet TML's are successfully generated. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public ApiResponse dbtGenerateSyncTmlWithHttpInfo( + String dbtConnectionIdentifier, File fileContent) throws ApiException { + okhttp3.Call localVarCall = + dbtGenerateSyncTmlValidateBeforeCall(dbtConnectionIdentifier, fileContent, null); + Type localVarReturnType = new TypeToken() {}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); + } + + /** + * (asynchronously) Version: 9.9.0.cl or later Resynchronize the existing list of models, + * tables, worksheet tml’s and import them to Thoughtspot based on the DBT connection object. + * Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege or + * `DATAMANAGEMENT` (**Can manage data**) privilege, along with an existing DBT + * connection. If [Role-Based Access Control + * (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the + * following data control privileges may be required: - + * `CAN_MANAGE_CUSTOM_CALENDAR`(**Can manage custom calendars**) - + * `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) - + * `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` (**Can manage data models**) + * + * @param dbtConnectionIdentifier Unique ID of the DBT connection. (required) + * @param fileContent Upload DBT Manifest and Catalog artifact files as a ZIP file. This field + * is mandatory if the connection was created with import_type ‘ZIP_FILE’ (optional) + * @param _callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body + * object + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 Sync Table and Worksheet TML's are successfully generated. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public okhttp3.Call dbtGenerateSyncTmlAsync( + String dbtConnectionIdentifier, File fileContent, final ApiCallback _callback) + throws ApiException { + + okhttp3.Call localVarCall = + dbtGenerateSyncTmlValidateBeforeCall( + dbtConnectionIdentifier, fileContent, _callback); + Type localVarReturnType = new TypeToken() {}.getType(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; + } + /** + * Build call for dbtGenerateTml + * + * @param dbtConnectionIdentifier Unique ID of the DBT connection. (required) + * @param modelTables List of Models and their respective Tables Example: + * '[{\\\"model_name\\\": \\\"model_name\\\", + * \\\"tables\\\": [\\\"table_name\\\"]}]' (required) + * @param importWorksheets Mention the worksheet tmls to import (required) + * @param worksheets List of worksheets is mandatory when import_Worksheets is type SELECTED + * Example: [\\\"worksheet_name\\\"] (optional) + * @param fileContent Upload DBT Manifest and Catalog artifact files as a ZIP file. This field + * is mandatory if the connection was created with import_type ‘ZIP_FILE’ (optional) + * @param _callback Callback for upload/download progress + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 Required Table and Worksheet TML's are successfully generated. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public okhttp3.Call dbtGenerateTmlCall( + String dbtConnectionIdentifier, + String modelTables, + String importWorksheets, + String worksheets, + File fileContent, + final ApiCallback _callback) + throws ApiException { + String basePath = null; + // Operation Servers + String[] localBasePaths = new String[] {}; + + // Determine Base Path to Use + if (localCustomBaseUrl != null) { + basePath = localCustomBaseUrl; + } else if (localBasePaths.length > 0) { + basePath = localBasePaths[localHostIndex]; + } else { + basePath = null; + } + + Object localVarPostBody = null; + + // create path and map variables + String localVarPath = "/api/rest/2.0/dbt/generate-tml"; + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + if (dbtConnectionIdentifier != null) { + localVarFormParams.put("dbt_connection_identifier", dbtConnectionIdentifier); + } + + if (modelTables != null) { + localVarFormParams.put("model_tables", modelTables); + } + + if (importWorksheets != null) { + localVarFormParams.put("import_worksheets", importWorksheets); + } + + if (worksheets != null) { + localVarFormParams.put("worksheets", worksheets); + } + + if (fileContent != null) { + localVarFormParams.put("file_content", fileContent); + } + + final String[] localVarAccepts = {"application/json"}; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = {"multipart/form-data"}; + final String localVarContentType = + localVarApiClient.selectHeaderContentType(localVarContentTypes); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } + + String[] localVarAuthNames = new String[] {"bearerAuth"}; + return localVarApiClient.buildCall( + basePath, + localVarPath, + "POST", + localVarQueryParams, + localVarCollectionQueryParams, + localVarPostBody, + localVarHeaderParams, + localVarCookieParams, + localVarFormParams, + localVarAuthNames, + _callback); + } + + @SuppressWarnings("rawtypes") + private okhttp3.Call dbtGenerateTmlValidateBeforeCall( + String dbtConnectionIdentifier, + String modelTables, + String importWorksheets, + String worksheets, + File fileContent, + final ApiCallback _callback) + throws ApiException { + // verify the required parameter 'dbtConnectionIdentifier' is set + if (dbtConnectionIdentifier == null) { + throw new ApiException( + "Missing the required parameter 'dbtConnectionIdentifier' when calling" + + " dbtGenerateTml(Async)"); + } + + // verify the required parameter 'modelTables' is set + if (modelTables == null) { + throw new ApiException( + "Missing the required parameter 'modelTables' when calling" + + " dbtGenerateTml(Async)"); + } + + // verify the required parameter 'importWorksheets' is set + if (importWorksheets == null) { + throw new ApiException( + "Missing the required parameter 'importWorksheets' when calling" + + " dbtGenerateTml(Async)"); + } + + return dbtGenerateTmlCall( + dbtConnectionIdentifier, + modelTables, + importWorksheets, + worksheets, + fileContent, + _callback); + } + + /** + * Version: 9.9.0.cl or later Generate required table and worksheet and import them. Requires + * `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege or + * `DATAMANAGEMENT` (**Can manage data**) privilege, along with an existing DBT + * connection. If [Role-Based Access Control + * (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the + * following data control privileges may be required: - + * `CAN_MANAGE_CUSTOM_CALENDAR`(**Can manage custom calendars**) - + * `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) - + * `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` (**Can manage data models**) #### About + * generate TML Models and Worksheets to be imported can be selected by the user as part of the + * API. + * + * @param dbtConnectionIdentifier Unique ID of the DBT connection. (required) + * @param modelTables List of Models and their respective Tables Example: + * '[{\\\"model_name\\\": \\\"model_name\\\", + * \\\"tables\\\": [\\\"table_name\\\"]}]' (required) + * @param importWorksheets Mention the worksheet tmls to import (required) + * @param worksheets List of worksheets is mandatory when import_Worksheets is type SELECTED + * Example: [\\\"worksheet_name\\\"] (optional) + * @param fileContent Upload DBT Manifest and Catalog artifact files as a ZIP file. This field + * is mandatory if the connection was created with import_type ‘ZIP_FILE’ (optional) + * @return Object + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the + * response body + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 Required Table and Worksheet TML's are successfully generated. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public Object dbtGenerateTml( + String dbtConnectionIdentifier, + String modelTables, + String importWorksheets, + String worksheets, + File fileContent) + throws ApiException { + ApiResponse localVarResp = + dbtGenerateTmlWithHttpInfo( + dbtConnectionIdentifier, + modelTables, + importWorksheets, + worksheets, + fileContent); + return localVarResp.getData(); + } + + /** + * Version: 9.9.0.cl or later Generate required table and worksheet and import them. Requires + * `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege or + * `DATAMANAGEMENT` (**Can manage data**) privilege, along with an existing DBT + * connection. If [Role-Based Access Control + * (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the + * following data control privileges may be required: - + * `CAN_MANAGE_CUSTOM_CALENDAR`(**Can manage custom calendars**) - + * `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) - + * `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` (**Can manage data models**) #### About + * generate TML Models and Worksheets to be imported can be selected by the user as part of the + * API. + * + * @param dbtConnectionIdentifier Unique ID of the DBT connection. (required) + * @param modelTables List of Models and their respective Tables Example: + * '[{\\\"model_name\\\": \\\"model_name\\\", + * \\\"tables\\\": [\\\"table_name\\\"]}]' (required) + * @param importWorksheets Mention the worksheet tmls to import (required) + * @param worksheets List of worksheets is mandatory when import_Worksheets is type SELECTED + * Example: [\\\"worksheet_name\\\"] (optional) + * @param fileContent Upload DBT Manifest and Catalog artifact files as a ZIP file. This field + * is mandatory if the connection was created with import_type ‘ZIP_FILE’ (optional) + * @return ApiResponse<Object> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the + * response body + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 Required Table and Worksheet TML's are successfully generated. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public ApiResponse dbtGenerateTmlWithHttpInfo( + String dbtConnectionIdentifier, + String modelTables, + String importWorksheets, + String worksheets, + File fileContent) + throws ApiException { + okhttp3.Call localVarCall = + dbtGenerateTmlValidateBeforeCall( + dbtConnectionIdentifier, + modelTables, + importWorksheets, + worksheets, + fileContent, + null); + Type localVarReturnType = new TypeToken() {}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); + } + + /** + * (asynchronously) Version: 9.9.0.cl or later Generate required table and worksheet and import + * them. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege or + * `DATAMANAGEMENT` (**Can manage data**) privilege, along with an existing DBT + * connection. If [Role-Based Access Control + * (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the + * following data control privileges may be required: - + * `CAN_MANAGE_CUSTOM_CALENDAR`(**Can manage custom calendars**) - + * `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) - + * `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` (**Can manage data models**) #### About + * generate TML Models and Worksheets to be imported can be selected by the user as part of the + * API. + * + * @param dbtConnectionIdentifier Unique ID of the DBT connection. (required) + * @param modelTables List of Models and their respective Tables Example: + * '[{\\\"model_name\\\": \\\"model_name\\\", + * \\\"tables\\\": [\\\"table_name\\\"]}]' (required) + * @param importWorksheets Mention the worksheet tmls to import (required) + * @param worksheets List of worksheets is mandatory when import_Worksheets is type SELECTED + * Example: [\\\"worksheet_name\\\"] (optional) + * @param fileContent Upload DBT Manifest and Catalog artifact files as a ZIP file. This field + * is mandatory if the connection was created with import_type ‘ZIP_FILE’ (optional) + * @param _callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body + * object + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 Required Table and Worksheet TML's are successfully generated. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public okhttp3.Call dbtGenerateTmlAsync( + String dbtConnectionIdentifier, + String modelTables, + String importWorksheets, + String worksheets, + File fileContent, + final ApiCallback _callback) + throws ApiException { + + okhttp3.Call localVarCall = + dbtGenerateTmlValidateBeforeCall( + dbtConnectionIdentifier, + modelTables, + importWorksheets, + worksheets, + fileContent, + _callback); + Type localVarReturnType = new TypeToken() {}.getType(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; + } + /** + * Build call for dbtSearch + * + * @param _callback Callback for upload/download progress + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 Retrieved list of DBT connections successfully. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public okhttp3.Call dbtSearchCall(final ApiCallback _callback) throws ApiException { + String basePath = null; + // Operation Servers + String[] localBasePaths = new String[] {}; + + // Determine Base Path to Use + if (localCustomBaseUrl != null) { + basePath = localCustomBaseUrl; + } else if (localBasePaths.length > 0) { + basePath = localBasePaths[localHostIndex]; + } else { + basePath = null; + } + + Object localVarPostBody = null; + + // create path and map variables + String localVarPath = "/api/rest/2.0/dbt/search"; + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + final String[] localVarAccepts = {"application/json"}; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = {}; + final String localVarContentType = + localVarApiClient.selectHeaderContentType(localVarContentTypes); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } + + String[] localVarAuthNames = new String[] {"bearerAuth"}; + return localVarApiClient.buildCall( + basePath, + localVarPath, + "POST", + localVarQueryParams, + localVarCollectionQueryParams, + localVarPostBody, + localVarHeaderParams, + localVarCookieParams, + localVarFormParams, + localVarAuthNames, + _callback); + } + + @SuppressWarnings("rawtypes") + private okhttp3.Call dbtSearchValidateBeforeCall(final ApiCallback _callback) + throws ApiException { + return dbtSearchCall(_callback); + } + + /** + * Version: 9.9.0.cl or later Gets a list of DBT connection objects by user and organization, + * available on the ThoughtSpot system. Requires `ADMINISTRATION` (**Can administer + * ThoughtSpot**) privilege or `DATAMANAGEMENT` (**Can manage data**) privilege. If + * [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled + * on your instance, the following Data control privileges may be required: - + * `CAN_MANAGE_CUSTOM_CALENDAR`(**Can manage custom calendars**) - + * `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) - + * `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` (**Can manage data models**) #### About search + * DBT connection To get details of a specific DBT connection identifier, database connection + * identifier, database connection name, database name, project name, project identifier, + * environment identifier , import type and author. + * + * @return List<DbtSearchResponse> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the + * response body + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 Retrieved list of DBT connections successfully. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public List dbtSearch() throws ApiException { + ApiResponse> localVarResp = dbtSearchWithHttpInfo(); + return localVarResp.getData(); + } + + /** + * Version: 9.9.0.cl or later Gets a list of DBT connection objects by user and organization, + * available on the ThoughtSpot system. Requires `ADMINISTRATION` (**Can administer + * ThoughtSpot**) privilege or `DATAMANAGEMENT` (**Can manage data**) privilege. If + * [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled + * on your instance, the following Data control privileges may be required: - + * `CAN_MANAGE_CUSTOM_CALENDAR`(**Can manage custom calendars**) - + * `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) - + * `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` (**Can manage data models**) #### About search + * DBT connection To get details of a specific DBT connection identifier, database connection + * identifier, database connection name, database name, project name, project identifier, + * environment identifier , import type and author. + * + * @return ApiResponse<List<DbtSearchResponse>> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the + * response body + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 Retrieved list of DBT connections successfully. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public ApiResponse> dbtSearchWithHttpInfo() throws ApiException { + okhttp3.Call localVarCall = dbtSearchValidateBeforeCall(null); + Type localVarReturnType = new TypeToken>() {}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); + } + + /** + * (asynchronously) Version: 9.9.0.cl or later Gets a list of DBT connection objects by user and + * organization, available on the ThoughtSpot system. Requires `ADMINISTRATION` (**Can + * administer ThoughtSpot**) privilege or `DATAMANAGEMENT` (**Can manage data**) + * privilege. If [Role-Based Access Control + * (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the + * following Data control privileges may be required: - + * `CAN_MANAGE_CUSTOM_CALENDAR`(**Can manage custom calendars**) - + * `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) - + * `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` (**Can manage data models**) #### About search + * DBT connection To get details of a specific DBT connection identifier, database connection + * identifier, database connection name, database name, project name, project identifier, + * environment identifier , import type and author. + * + * @param _callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body + * object + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 Retrieved list of DBT connections successfully. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public okhttp3.Call dbtSearchAsync(final ApiCallback> _callback) + throws ApiException { + + okhttp3.Call localVarCall = dbtSearchValidateBeforeCall(_callback); + Type localVarReturnType = new TypeToken>() {}.getType(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; + } + /** + * Build call for deactivateUser + * + * @param deactivateUserRequest (required) + * @param _callback Callback for upload/download progress + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 User deactivated successfully. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public okhttp3.Call deactivateUserCall( + DeactivateUserRequest deactivateUserRequest, final ApiCallback _callback) + throws ApiException { + String basePath = null; + // Operation Servers + String[] localBasePaths = new String[] {}; + + // Determine Base Path to Use + if (localCustomBaseUrl != null) { + basePath = localCustomBaseUrl; + } else if (localBasePaths.length > 0) { + basePath = localBasePaths[localHostIndex]; + } else { + basePath = null; + } + + Object localVarPostBody = deactivateUserRequest; + + // create path and map variables + String localVarPath = "/api/rest/2.0/users/deactivate"; + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + final String[] localVarAccepts = {"application/json"}; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = {"application/json"}; + final String localVarContentType = + localVarApiClient.selectHeaderContentType(localVarContentTypes); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } + + String[] localVarAuthNames = new String[] {"bearerAuth"}; + return localVarApiClient.buildCall( + basePath, + localVarPath, + "POST", + localVarQueryParams, + localVarCollectionQueryParams, + localVarPostBody, + localVarHeaderParams, + localVarCookieParams, + localVarFormParams, + localVarAuthNames, + _callback); + } + + @SuppressWarnings("rawtypes") + private okhttp3.Call deactivateUserValidateBeforeCall( + DeactivateUserRequest deactivateUserRequest, final ApiCallback _callback) + throws ApiException { + // verify the required parameter 'deactivateUserRequest' is set + if (deactivateUserRequest == null) { + throw new ApiException( + "Missing the required parameter 'deactivateUserRequest' when calling" + + " deactivateUser(Async)"); + } + + return deactivateUserCall(deactivateUserRequest, _callback); + } + + /** + * Version: 9.7.0.cl or later Deactivates a user account. Requires `ADMINISTRATION` + * (**Can administer Thoughtspot**) privilege. If [Role-Based Access Control + * (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the + * `USER_ADMINISTRATION` (**Can manage users**) privilege is required. To deactivate a + * user account, the API request body must include the following information: - Username or the + * GUID of the user account - Base URL of the ThoughtSpot instance If the API request is + * successful, ThoughtSpot returns the activation URL in the response. The activation URL is + * valid for 14 days and can be used to re-activate the account and reset the password of the + * deactivated account. + * + * @param deactivateUserRequest (required) + * @return ResponseActivationURL + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the + * response body + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 User deactivated successfully. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public ResponseActivationURL deactivateUser(DeactivateUserRequest deactivateUserRequest) + throws ApiException { + ApiResponse localVarResp = + deactivateUserWithHttpInfo(deactivateUserRequest); + return localVarResp.getData(); + } + + /** + * Version: 9.7.0.cl or later Deactivates a user account. Requires `ADMINISTRATION` + * (**Can administer Thoughtspot**) privilege. If [Role-Based Access Control + * (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the + * `USER_ADMINISTRATION` (**Can manage users**) privilege is required. To deactivate a + * user account, the API request body must include the following information: - Username or the + * GUID of the user account - Base URL of the ThoughtSpot instance If the API request is + * successful, ThoughtSpot returns the activation URL in the response. The activation URL is + * valid for 14 days and can be used to re-activate the account and reset the password of the + * deactivated account. + * + * @param deactivateUserRequest (required) + * @return ApiResponse<ResponseActivationURL> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the + * response body + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 User deactivated successfully. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public ApiResponse deactivateUserWithHttpInfo( + DeactivateUserRequest deactivateUserRequest) throws ApiException { + okhttp3.Call localVarCall = deactivateUserValidateBeforeCall(deactivateUserRequest, null); + Type localVarReturnType = new TypeToken() {}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); + } + + /** + * (asynchronously) Version: 9.7.0.cl or later Deactivates a user account. Requires + * `ADMINISTRATION` (**Can administer Thoughtspot**) privilege. If [Role-Based Access + * Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, + * the `USER_ADMINISTRATION` (**Can manage users**) privilege is required. To + * deactivate a user account, the API request body must include the following information: - + * Username or the GUID of the user account - Base URL of the ThoughtSpot instance If the API + * request is successful, ThoughtSpot returns the activation URL in the response. The activation + * URL is valid for 14 days and can be used to re-activate the account and reset the password of + * the deactivated account. + * + * @param deactivateUserRequest (required) + * @param _callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body + * object + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 User deactivated successfully. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public okhttp3.Call deactivateUserAsync( + DeactivateUserRequest deactivateUserRequest, + final ApiCallback _callback) + throws ApiException { + + okhttp3.Call localVarCall = + deactivateUserValidateBeforeCall(deactivateUserRequest, _callback); + Type localVarReturnType = new TypeToken() {}.getType(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; + } + /** + * Build call for deleteCalendar + * + * @param calendarIdentifier Unique ID or name of the Calendar. (required) + * @param _callback Callback for upload/download progress + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
204 Custom calendar successfully deleted. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public okhttp3.Call deleteCalendarCall(String calendarIdentifier, final ApiCallback _callback) + throws ApiException { + String basePath = null; + // Operation Servers + String[] localBasePaths = new String[] {}; + + // Determine Base Path to Use + if (localCustomBaseUrl != null) { + basePath = localCustomBaseUrl; + } else if (localBasePaths.length > 0) { + basePath = localBasePaths[localHostIndex]; + } else { + basePath = null; + } + + Object localVarPostBody = null; + + // create path and map variables + String localVarPath = + "/api/rest/2.0/calendars/{calendar_identifier}/delete" + .replace( + "{" + "calendar_identifier" + "}", + localVarApiClient.escapeString(calendarIdentifier.toString())); + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + final String[] localVarAccepts = {"application/json"}; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = {}; + final String localVarContentType = + localVarApiClient.selectHeaderContentType(localVarContentTypes); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } + + String[] localVarAuthNames = new String[] {"bearerAuth"}; + return localVarApiClient.buildCall( + basePath, + localVarPath, + "POST", + localVarQueryParams, + localVarCollectionQueryParams, + localVarPostBody, + localVarHeaderParams, + localVarCookieParams, + localVarFormParams, + localVarAuthNames, + _callback); + } + + @SuppressWarnings("rawtypes") + private okhttp3.Call deleteCalendarValidateBeforeCall( + String calendarIdentifier, final ApiCallback _callback) throws ApiException { + // verify the required parameter 'calendarIdentifier' is set + if (calendarIdentifier == null) { + throw new ApiException( + "Missing the required parameter 'calendarIdentifier' when calling" + + " deleteCalendar(Async)"); + } + + return deleteCalendarCall(calendarIdentifier, _callback); + } + + /** + * Version: 10.12.0.cl or later Deletes a [custom + * calendar](https://docs.thoughtspot.com/cloud/latest/connections-cust-cal). Requires + * `DATAMANAGEMENT` (**Can manage data**) or `ADMINISTRATION` (**Can + * administer ThoughtSpot**) privilege. If [Role-Based Access Control + * (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your ThoughtSpot + * instance, the `CAN_MANAGE_CUSTOM_CALENDAR` (**Can manage custom calendars**) + * privilege is required. #### Usage guidelines To delete a custom calendar, specify the + * calendar ID as a path parameter in the request URL. + * + * @param calendarIdentifier Unique ID or name of the Calendar. (required) + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the + * response body + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
204 Custom calendar successfully deleted. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public void deleteCalendar(String calendarIdentifier) throws ApiException { + deleteCalendarWithHttpInfo(calendarIdentifier); + } + + /** + * Version: 10.12.0.cl or later Deletes a [custom + * calendar](https://docs.thoughtspot.com/cloud/latest/connections-cust-cal). Requires + * `DATAMANAGEMENT` (**Can manage data**) or `ADMINISTRATION` (**Can + * administer ThoughtSpot**) privilege. If [Role-Based Access Control + * (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your ThoughtSpot + * instance, the `CAN_MANAGE_CUSTOM_CALENDAR` (**Can manage custom calendars**) + * privilege is required. #### Usage guidelines To delete a custom calendar, specify the + * calendar ID as a path parameter in the request URL. + * + * @param calendarIdentifier Unique ID or name of the Calendar. (required) + * @return ApiResponse<Void> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the + * response body + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
204 Custom calendar successfully deleted. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public ApiResponse deleteCalendarWithHttpInfo(String calendarIdentifier) + throws ApiException { + okhttp3.Call localVarCall = deleteCalendarValidateBeforeCall(calendarIdentifier, null); + return localVarApiClient.execute(localVarCall); + } + + /** + * (asynchronously) Version: 10.12.0.cl or later Deletes a [custom + * calendar](https://docs.thoughtspot.com/cloud/latest/connections-cust-cal). Requires + * `DATAMANAGEMENT` (**Can manage data**) or `ADMINISTRATION` (**Can + * administer ThoughtSpot**) privilege. If [Role-Based Access Control + * (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your ThoughtSpot + * instance, the `CAN_MANAGE_CUSTOM_CALENDAR` (**Can manage custom calendars**) + * privilege is required. #### Usage guidelines To delete a custom calendar, specify the + * calendar ID as a path parameter in the request URL. + * + * @param calendarIdentifier Unique ID or name of the Calendar. (required) + * @param _callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body + * object + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
204 Custom calendar successfully deleted. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public okhttp3.Call deleteCalendarAsync( + String calendarIdentifier, final ApiCallback _callback) throws ApiException { + + okhttp3.Call localVarCall = deleteCalendarValidateBeforeCall(calendarIdentifier, _callback); + localVarApiClient.executeAsync(localVarCall, _callback); + return localVarCall; + } + /** + * Build call for deleteCollection + * + * @param deleteCollectionRequest (required) + * @param _callback Callback for upload/download progress + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + * @http.response.details + * + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 Collections deleted successfully. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
404 Resource not found. -
500 Unexpected error -
+ */ + public okhttp3.Call deleteCollectionCall( + DeleteCollectionRequest deleteCollectionRequest, final ApiCallback _callback) + throws ApiException { + String basePath = null; + // Operation Servers + String[] localBasePaths = new String[] {}; + + // Determine Base Path to Use + if (localCustomBaseUrl != null) { + basePath = localCustomBaseUrl; + } else if (localBasePaths.length > 0) { + basePath = localBasePaths[localHostIndex]; + } else { + basePath = null; + } + + Object localVarPostBody = deleteCollectionRequest; + + // create path and map variables + String localVarPath = "/api/rest/2.0/collections/delete"; + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + final String[] localVarAccepts = {"application/json"}; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = {"application/json"}; + final String localVarContentType = + localVarApiClient.selectHeaderContentType(localVarContentTypes); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } + + String[] localVarAuthNames = new String[] {"bearerAuth"}; + return localVarApiClient.buildCall( + basePath, + localVarPath, + "POST", + localVarQueryParams, + localVarCollectionQueryParams, + localVarPostBody, + localVarHeaderParams, + localVarCookieParams, + localVarFormParams, + localVarAuthNames, + _callback); + } + + @SuppressWarnings("rawtypes") + private okhttp3.Call deleteCollectionValidateBeforeCall( + DeleteCollectionRequest deleteCollectionRequest, final ApiCallback _callback) + throws ApiException { + // verify the required parameter 'deleteCollectionRequest' is set + if (deleteCollectionRequest == null) { + throw new ApiException( + "Missing the required parameter 'deleteCollectionRequest' when calling" + + " deleteCollection(Async)"); + } + + return deleteCollectionCall(deleteCollectionRequest, _callback); + } + + /** + * Version: 26.4.0.cl or later Deletes one or more collections from ThoughtSpot. #### Delete + * options * **delete_children**: When set to `true`, deletes the child objects + * (metadata items) within the collection that the user has access to. Objects that the user + * does not have permission to delete will be skipped. * **dry_run**: When set to + * `true`, performs a preview of the deletion operation without actually deleting + * anything. The response shows what would be deleted, allowing you to review before committing + * the deletion. #### Response The response includes: * **metadata_deleted**: List of metadata + * objects that were successfully deleted * **metadata_skipped**: List of metadata objects that + * were skipped due to lack of permissions or other constraints + * + * @param deleteCollectionRequest (required) + * @return CollectionDeleteResponse + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the + * response body + * @http.response.details + * + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 Collections deleted successfully. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
404 Resource not found. -
500 Unexpected error -
+ */ + public CollectionDeleteResponse deleteCollection( + DeleteCollectionRequest deleteCollectionRequest) throws ApiException { + ApiResponse localVarResp = + deleteCollectionWithHttpInfo(deleteCollectionRequest); + return localVarResp.getData(); + } + + /** + * Version: 26.4.0.cl or later Deletes one or more collections from ThoughtSpot. #### Delete + * options * **delete_children**: When set to `true`, deletes the child objects + * (metadata items) within the collection that the user has access to. Objects that the user + * does not have permission to delete will be skipped. * **dry_run**: When set to + * `true`, performs a preview of the deletion operation without actually deleting + * anything. The response shows what would be deleted, allowing you to review before committing + * the deletion. #### Response The response includes: * **metadata_deleted**: List of metadata + * objects that were successfully deleted * **metadata_skipped**: List of metadata objects that + * were skipped due to lack of permissions or other constraints + * + * @param deleteCollectionRequest (required) + * @return ApiResponse<CollectionDeleteResponse> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the + * response body + * @http.response.details + * + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 Collections deleted successfully. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
404 Resource not found. -
500 Unexpected error -
+ */ + public ApiResponse deleteCollectionWithHttpInfo( + DeleteCollectionRequest deleteCollectionRequest) throws ApiException { + okhttp3.Call localVarCall = + deleteCollectionValidateBeforeCall(deleteCollectionRequest, null); + Type localVarReturnType = new TypeToken() {}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); + } + + /** + * (asynchronously) Version: 26.4.0.cl or later Deletes one or more collections from + * ThoughtSpot. #### Delete options * **delete_children**: When set to `true`, deletes + * the child objects (metadata items) within the collection that the user has access to. Objects + * that the user does not have permission to delete will be skipped. * **dry_run**: When set to + * `true`, performs a preview of the deletion operation without actually deleting + * anything. The response shows what would be deleted, allowing you to review before committing + * the deletion. #### Response The response includes: * **metadata_deleted**: List of metadata + * objects that were successfully deleted * **metadata_skipped**: List of metadata objects that + * were skipped due to lack of permissions or other constraints + * + * @param deleteCollectionRequest (required) + * @param _callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body + * object + * @http.response.details + * + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 Collections deleted successfully. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
404 Resource not found. -
500 Unexpected error -
+ */ + public okhttp3.Call deleteCollectionAsync( + DeleteCollectionRequest deleteCollectionRequest, + final ApiCallback _callback) + throws ApiException { + + okhttp3.Call localVarCall = + deleteCollectionValidateBeforeCall(deleteCollectionRequest, _callback); + Type localVarReturnType = new TypeToken() {}.getType(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; + } + /** + * Build call for deleteConfig + * + * @param deleteConfigRequest (required) + * @param _callback Callback for upload/download progress + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
204 Successfully deleted local repository configuration -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public okhttp3.Call deleteConfigCall( + DeleteConfigRequest deleteConfigRequest, final ApiCallback _callback) + throws ApiException { + String basePath = null; + // Operation Servers + String[] localBasePaths = new String[] {}; + + // Determine Base Path to Use + if (localCustomBaseUrl != null) { + basePath = localCustomBaseUrl; + } else if (localBasePaths.length > 0) { + basePath = localBasePaths[localHostIndex]; + } else { + basePath = null; + } + + Object localVarPostBody = deleteConfigRequest; + + // create path and map variables + String localVarPath = "/api/rest/2.0/vcs/git/config/delete"; + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + final String[] localVarAccepts = {"application/json"}; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = {"application/json"}; + final String localVarContentType = + localVarApiClient.selectHeaderContentType(localVarContentTypes); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } + + String[] localVarAuthNames = new String[] {"bearerAuth"}; + return localVarApiClient.buildCall( + basePath, + localVarPath, + "POST", + localVarQueryParams, + localVarCollectionQueryParams, + localVarPostBody, + localVarHeaderParams, + localVarCookieParams, + localVarFormParams, + localVarAuthNames, + _callback); + } + + @SuppressWarnings("rawtypes") + private okhttp3.Call deleteConfigValidateBeforeCall( + DeleteConfigRequest deleteConfigRequest, final ApiCallback _callback) + throws ApiException { + // verify the required parameter 'deleteConfigRequest' is set + if (deleteConfigRequest == null) { + throw new ApiException( + "Missing the required parameter 'deleteConfigRequest' when calling" + + " deleteConfig(Async)"); + } + + return deleteConfigCall(deleteConfigRequest, _callback); + } + + /** + * Version: 9.2.0.cl or later Deletes Git repository configuration from your ThoughtSpot + * instance. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If + * [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled + * on your instance on your instance, the `CAN_SETUP_VERSION_CONTROL` (**Can set up + * version control**) privilege. + * + * @param deleteConfigRequest (required) + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the + * response body + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
204 Successfully deleted local repository configuration -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public void deleteConfig(DeleteConfigRequest deleteConfigRequest) throws ApiException { + deleteConfigWithHttpInfo(deleteConfigRequest); + } + + /** + * Version: 9.2.0.cl or later Deletes Git repository configuration from your ThoughtSpot + * instance. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If + * [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled + * on your instance on your instance, the `CAN_SETUP_VERSION_CONTROL` (**Can set up + * version control**) privilege. + * + * @param deleteConfigRequest (required) + * @return ApiResponse<Void> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the + * response body + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
204 Successfully deleted local repository configuration -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public ApiResponse deleteConfigWithHttpInfo(DeleteConfigRequest deleteConfigRequest) + throws ApiException { + okhttp3.Call localVarCall = deleteConfigValidateBeforeCall(deleteConfigRequest, null); + return localVarApiClient.execute(localVarCall); + } + + /** + * (asynchronously) Version: 9.2.0.cl or later Deletes Git repository configuration from your + * ThoughtSpot instance. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) + * privilege. If [Role-Based Access Control + * (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance on your + * instance, the `CAN_SETUP_VERSION_CONTROL` (**Can set up version control**) + * privilege. + * + * @param deleteConfigRequest (required) + * @param _callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body + * object + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
204 Successfully deleted local repository configuration -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public okhttp3.Call deleteConfigAsync( + DeleteConfigRequest deleteConfigRequest, final ApiCallback _callback) + throws ApiException { + + okhttp3.Call localVarCall = deleteConfigValidateBeforeCall(deleteConfigRequest, _callback); + localVarApiClient.executeAsync(localVarCall, _callback); + return localVarCall; + } + /** + * Build call for deleteConnection + * + * @param deleteConnectionRequest (required) + * @param _callback Callback for upload/download progress + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
204 Connection successfully deleted. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ * + * @deprecated + */ + @Deprecated + public okhttp3.Call deleteConnectionCall( + DeleteConnectionRequest deleteConnectionRequest, final ApiCallback _callback) + throws ApiException { + String basePath = null; + // Operation Servers + String[] localBasePaths = new String[] {}; + + // Determine Base Path to Use + if (localCustomBaseUrl != null) { + basePath = localCustomBaseUrl; + } else if (localBasePaths.length > 0) { + basePath = localBasePaths[localHostIndex]; + } else { + basePath = null; + } + + Object localVarPostBody = deleteConnectionRequest; + + // create path and map variables + String localVarPath = "/api/rest/2.0/connection/delete"; + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + final String[] localVarAccepts = {"application/json"}; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = {"application/json"}; + final String localVarContentType = + localVarApiClient.selectHeaderContentType(localVarContentTypes); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } + + String[] localVarAuthNames = new String[] {"bearerAuth"}; + return localVarApiClient.buildCall( + basePath, + localVarPath, + "POST", + localVarQueryParams, + localVarCollectionQueryParams, + localVarPostBody, + localVarHeaderParams, + localVarCookieParams, + localVarFormParams, + localVarAuthNames, + _callback); + } + + @Deprecated + @SuppressWarnings("rawtypes") + private okhttp3.Call deleteConnectionValidateBeforeCall( + DeleteConnectionRequest deleteConnectionRequest, final ApiCallback _callback) + throws ApiException { + // verify the required parameter 'deleteConnectionRequest' is set + if (deleteConnectionRequest == null) { + throw new ApiException( + "Missing the required parameter 'deleteConnectionRequest' when calling" + + " deleteConnection(Async)"); + } + + return deleteConnectionCall(deleteConnectionRequest, _callback); + } + + /** + * Version: 9.2.0.cl or later **Important**: This endpoint is deprecated and will be removed + * from ThoughtSpot in September 2025. ThoughtSpot strongly recommends using the [Delete + * Connection V2](#/http/api-endpoints/connections/delete-connection-v2) endpoint to delete your + * connection objects. #### Usage guidelines Deletes a connection object. Requires + * `DATAMANAGEMENT` (**Can manage data**) and edit permissions to the connection + * object, or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If + * [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled + * on your instance, the `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit + * Connections**) privilege is required. **Note**: If a connection has dependent objects, make + * sure you remove its associations before the delete operation. + * + * @param deleteConnectionRequest (required) + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the + * response body + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
204 Connection successfully deleted. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ * + * @deprecated + */ + @Deprecated + public void deleteConnection(DeleteConnectionRequest deleteConnectionRequest) + throws ApiException { + deleteConnectionWithHttpInfo(deleteConnectionRequest); + } + + /** + * Version: 9.2.0.cl or later **Important**: This endpoint is deprecated and will be removed + * from ThoughtSpot in September 2025. ThoughtSpot strongly recommends using the [Delete + * Connection V2](#/http/api-endpoints/connections/delete-connection-v2) endpoint to delete your + * connection objects. #### Usage guidelines Deletes a connection object. Requires + * `DATAMANAGEMENT` (**Can manage data**) and edit permissions to the connection + * object, or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If + * [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled + * on your instance, the `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit + * Connections**) privilege is required. **Note**: If a connection has dependent objects, make + * sure you remove its associations before the delete operation. + * + * @param deleteConnectionRequest (required) + * @return ApiResponse<Void> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the + * response body + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
204 Connection successfully deleted. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ * + * @deprecated + */ + @Deprecated + public ApiResponse deleteConnectionWithHttpInfo( + DeleteConnectionRequest deleteConnectionRequest) throws ApiException { + okhttp3.Call localVarCall = + deleteConnectionValidateBeforeCall(deleteConnectionRequest, null); + return localVarApiClient.execute(localVarCall); + } + + /** + * (asynchronously) Version: 9.2.0.cl or later **Important**: This endpoint is deprecated and + * will be removed from ThoughtSpot in September 2025. ThoughtSpot strongly recommends using the + * [Delete Connection V2](#/http/api-endpoints/connections/delete-connection-v2) endpoint to + * delete your connection objects. #### Usage guidelines Deletes a connection object. Requires + * `DATAMANAGEMENT` (**Can manage data**) and edit permissions to the connection + * object, or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If + * [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled + * on your instance, the `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit + * Connections**) privilege is required. **Note**: If a connection has dependent objects, make + * sure you remove its associations before the delete operation. + * + * @param deleteConnectionRequest (required) + * @param _callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body + * object + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
204 Connection successfully deleted. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ * + * @deprecated + */ + @Deprecated + public okhttp3.Call deleteConnectionAsync( + DeleteConnectionRequest deleteConnectionRequest, final ApiCallback _callback) + throws ApiException { + + okhttp3.Call localVarCall = + deleteConnectionValidateBeforeCall(deleteConnectionRequest, _callback); + localVarApiClient.executeAsync(localVarCall, _callback); + return localVarCall; + } + /** + * Build call for deleteConnectionConfiguration + * + * @param deleteConnectionConfigurationRequest (required) + * @param _callback Callback for upload/download progress + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
204 Connection Configurations successfully deleted. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public okhttp3.Call deleteConnectionConfigurationCall( + DeleteConnectionConfigurationRequest deleteConnectionConfigurationRequest, + final ApiCallback _callback) + throws ApiException { + String basePath = null; + // Operation Servers + String[] localBasePaths = new String[] {}; + + // Determine Base Path to Use + if (localCustomBaseUrl != null) { + basePath = localCustomBaseUrl; + } else if (localBasePaths.length > 0) { + basePath = localBasePaths[localHostIndex]; + } else { + basePath = null; + } + + Object localVarPostBody = deleteConnectionConfigurationRequest; + + // create path and map variables + String localVarPath = "/api/rest/2.0/connection-configurations/delete"; + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + final String[] localVarAccepts = {"application/json"}; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = {"application/json"}; + final String localVarContentType = + localVarApiClient.selectHeaderContentType(localVarContentTypes); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } + + String[] localVarAuthNames = new String[] {"bearerAuth"}; + return localVarApiClient.buildCall( + basePath, + localVarPath, + "POST", + localVarQueryParams, + localVarCollectionQueryParams, + localVarPostBody, + localVarHeaderParams, + localVarCookieParams, + localVarFormParams, + localVarAuthNames, + _callback); + } + + @SuppressWarnings("rawtypes") + private okhttp3.Call deleteConnectionConfigurationValidateBeforeCall( + DeleteConnectionConfigurationRequest deleteConnectionConfigurationRequest, + final ApiCallback _callback) + throws ApiException { + // verify the required parameter 'deleteConnectionConfigurationRequest' is set + if (deleteConnectionConfigurationRequest == null) { + throw new ApiException( + "Missing the required parameter 'deleteConnectionConfigurationRequest' when" + + " calling deleteConnectionConfiguration(Async)"); + } + + return deleteConnectionConfigurationCall(deleteConnectionConfigurationRequest, _callback); + } + + /** + * Version: 10.12.0.cl or later Deletes connection configuration objects. Requires + * `DATAMANAGEMENT` (**Can manage data**) and edit permissions to the connection + * object, or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If + * [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled + * on your instance, the `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit + * Connections**) privilege is required. + * + * @param deleteConnectionConfigurationRequest (required) + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the + * response body + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
204 Connection Configurations successfully deleted. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public void deleteConnectionConfiguration( + DeleteConnectionConfigurationRequest deleteConnectionConfigurationRequest) + throws ApiException { + deleteConnectionConfigurationWithHttpInfo(deleteConnectionConfigurationRequest); + } + + /** + * Version: 10.12.0.cl or later Deletes connection configuration objects. Requires + * `DATAMANAGEMENT` (**Can manage data**) and edit permissions to the connection + * object, or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If + * [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled + * on your instance, the `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit + * Connections**) privilege is required. + * + * @param deleteConnectionConfigurationRequest (required) + * @return ApiResponse<Void> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the + * response body + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
204 Connection Configurations successfully deleted. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public ApiResponse deleteConnectionConfigurationWithHttpInfo( + DeleteConnectionConfigurationRequest deleteConnectionConfigurationRequest) + throws ApiException { + okhttp3.Call localVarCall = + deleteConnectionConfigurationValidateBeforeCall( + deleteConnectionConfigurationRequest, null); + return localVarApiClient.execute(localVarCall); + } + + /** + * (asynchronously) Version: 10.12.0.cl or later Deletes connection configuration objects. + * Requires `DATAMANAGEMENT` (**Can manage data**) and edit permissions to the + * connection object, or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. + * If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is + * enabled on your instance, the `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit + * Connections**) privilege is required. + * + * @param deleteConnectionConfigurationRequest (required) + * @param _callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body + * object + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
204 Connection Configurations successfully deleted. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public okhttp3.Call deleteConnectionConfigurationAsync( + DeleteConnectionConfigurationRequest deleteConnectionConfigurationRequest, + final ApiCallback _callback) + throws ApiException { + + okhttp3.Call localVarCall = + deleteConnectionConfigurationValidateBeforeCall( + deleteConnectionConfigurationRequest, _callback); + localVarApiClient.executeAsync(localVarCall, _callback); + return localVarCall; + } + /** + * Build call for deleteConnectionV2 + * + * @param connectionIdentifier Unique ID or name of the connection. (required) + * @param _callback Callback for upload/download progress + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
204 Connection successfully deleted. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public okhttp3.Call deleteConnectionV2Call( + String connectionIdentifier, final ApiCallback _callback) throws ApiException { + String basePath = null; + // Operation Servers + String[] localBasePaths = new String[] {}; + + // Determine Base Path to Use + if (localCustomBaseUrl != null) { + basePath = localCustomBaseUrl; + } else if (localBasePaths.length > 0) { + basePath = localBasePaths[localHostIndex]; + } else { + basePath = null; + } + + Object localVarPostBody = null; + + // create path and map variables + String localVarPath = + "/api/rest/2.0/connections/{connection_identifier}/delete" + .replace( + "{" + "connection_identifier" + "}", + localVarApiClient.escapeString(connectionIdentifier.toString())); + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + final String[] localVarAccepts = {"application/json"}; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = {}; + final String localVarContentType = + localVarApiClient.selectHeaderContentType(localVarContentTypes); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } + + String[] localVarAuthNames = new String[] {"bearerAuth"}; + return localVarApiClient.buildCall( + basePath, + localVarPath, + "POST", + localVarQueryParams, + localVarCollectionQueryParams, + localVarPostBody, + localVarHeaderParams, + localVarCookieParams, + localVarFormParams, + localVarAuthNames, + _callback); + } + + @SuppressWarnings("rawtypes") + private okhttp3.Call deleteConnectionV2ValidateBeforeCall( + String connectionIdentifier, final ApiCallback _callback) throws ApiException { + // verify the required parameter 'connectionIdentifier' is set + if (connectionIdentifier == null) { + throw new ApiException( + "Missing the required parameter 'connectionIdentifier' when calling" + + " deleteConnectionV2(Async)"); + } + + return deleteConnectionV2Call(connectionIdentifier, _callback); + } + + /** + * Version: 10.4.0.cl or later Deletes a connection object. **Note**: If a connection has + * dependent objects, make sure you remove its associations before the delete operation. + * Requires `DATAMANAGEMENT` (**Can manage data**) and edit permissions to the + * connection object, or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. + * If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is + * enabled on your instance, the `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit + * Connections**) privilege is required. + * + * @param connectionIdentifier Unique ID or name of the connection. (required) + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the + * response body + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
204 Connection successfully deleted. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public void deleteConnectionV2(String connectionIdentifier) throws ApiException { + deleteConnectionV2WithHttpInfo(connectionIdentifier); + } + + /** + * Version: 10.4.0.cl or later Deletes a connection object. **Note**: If a connection has + * dependent objects, make sure you remove its associations before the delete operation. + * Requires `DATAMANAGEMENT` (**Can manage data**) and edit permissions to the + * connection object, or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. + * If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is + * enabled on your instance, the `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit + * Connections**) privilege is required. + * + * @param connectionIdentifier Unique ID or name of the connection. (required) + * @return ApiResponse<Void> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the + * response body + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
204 Connection successfully deleted. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public ApiResponse deleteConnectionV2WithHttpInfo(String connectionIdentifier) + throws ApiException { + okhttp3.Call localVarCall = + deleteConnectionV2ValidateBeforeCall(connectionIdentifier, null); + return localVarApiClient.execute(localVarCall); + } + + /** + * (asynchronously) Version: 10.4.0.cl or later Deletes a connection object. **Note**: If a + * connection has dependent objects, make sure you remove its associations before the delete + * operation. Requires `DATAMANAGEMENT` (**Can manage data**) and edit permissions to + * the connection object, or `ADMINISTRATION` (**Can administer ThoughtSpot**) + * privilege. If [Role-Based Access Control + * (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the + * `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) privilege is + * required. + * + * @param connectionIdentifier Unique ID or name of the connection. (required) + * @param _callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body + * object + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
204 Connection successfully deleted. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public okhttp3.Call deleteConnectionV2Async( + String connectionIdentifier, final ApiCallback _callback) throws ApiException { + + okhttp3.Call localVarCall = + deleteConnectionV2ValidateBeforeCall(connectionIdentifier, _callback); + localVarApiClient.executeAsync(localVarCall, _callback); + return localVarCall; + } + /** + * Build call for deleteCustomAction + * + * @param customActionIdentifier Unique ID or name of the custom action. (required) + * @param _callback Callback for upload/download progress + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
204 Custom action is successfully deleted. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public okhttp3.Call deleteCustomActionCall( + String customActionIdentifier, final ApiCallback _callback) throws ApiException { + String basePath = null; + // Operation Servers + String[] localBasePaths = new String[] {}; + + // Determine Base Path to Use + if (localCustomBaseUrl != null) { + basePath = localCustomBaseUrl; + } else if (localBasePaths.length > 0) { + basePath = localBasePaths[localHostIndex]; + } else { + basePath = null; + } + + Object localVarPostBody = null; + + // create path and map variables + String localVarPath = + "/api/rest/2.0/customization/custom-actions/{custom_action_identifier}/delete" + .replace( + "{" + "custom_action_identifier" + "}", + localVarApiClient.escapeString(customActionIdentifier.toString())); + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + final String[] localVarAccepts = {"application/json"}; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = {}; + final String localVarContentType = + localVarApiClient.selectHeaderContentType(localVarContentTypes); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } + + String[] localVarAuthNames = new String[] {"bearerAuth"}; + return localVarApiClient.buildCall( + basePath, + localVarPath, + "POST", + localVarQueryParams, + localVarCollectionQueryParams, + localVarPostBody, + localVarHeaderParams, + localVarCookieParams, + localVarFormParams, + localVarAuthNames, + _callback); + } + + @SuppressWarnings("rawtypes") + private okhttp3.Call deleteCustomActionValidateBeforeCall( + String customActionIdentifier, final ApiCallback _callback) throws ApiException { + // verify the required parameter 'customActionIdentifier' is set + if (customActionIdentifier == null) { + throw new ApiException( + "Missing the required parameter 'customActionIdentifier' when calling" + + " deleteCustomAction(Async)"); + } + + return deleteCustomActionCall(customActionIdentifier, _callback); + } + + /** + * Version: 9.6.0.cl or later Removes the custom action specified in the API request. Requires + * `DEVELOPER` (**Has Developer privilege**) or `ADMINISTRATION` (**Can + * administer ThoughtSpot**) privilege. If [Role-Based Access Control + * (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the + * `DEVELOPER` (**Has developer privilege**) privilege is required. + * + * @param customActionIdentifier Unique ID or name of the custom action. (required) + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the + * response body + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
204 Custom action is successfully deleted. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public void deleteCustomAction(String customActionIdentifier) throws ApiException { + deleteCustomActionWithHttpInfo(customActionIdentifier); + } + + /** + * Version: 9.6.0.cl or later Removes the custom action specified in the API request. Requires + * `DEVELOPER` (**Has Developer privilege**) or `ADMINISTRATION` (**Can + * administer ThoughtSpot**) privilege. If [Role-Based Access Control + * (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the + * `DEVELOPER` (**Has developer privilege**) privilege is required. + * + * @param customActionIdentifier Unique ID or name of the custom action. (required) + * @return ApiResponse<Void> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the + * response body + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
204 Custom action is successfully deleted. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public ApiResponse deleteCustomActionWithHttpInfo(String customActionIdentifier) + throws ApiException { + okhttp3.Call localVarCall = + deleteCustomActionValidateBeforeCall(customActionIdentifier, null); + return localVarApiClient.execute(localVarCall); + } + + /** + * (asynchronously) Version: 9.6.0.cl or later Removes the custom action specified in the API + * request. Requires `DEVELOPER` (**Has Developer privilege**) or + * `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access + * Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, + * the `DEVELOPER` (**Has developer privilege**) privilege is required. + * + * @param customActionIdentifier Unique ID or name of the custom action. (required) + * @param _callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body + * object + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
204 Custom action is successfully deleted. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public okhttp3.Call deleteCustomActionAsync( + String customActionIdentifier, final ApiCallback _callback) throws ApiException { + + okhttp3.Call localVarCall = + deleteCustomActionValidateBeforeCall(customActionIdentifier, _callback); + localVarApiClient.executeAsync(localVarCall, _callback); + return localVarCall; + } + /** + * Build call for deleteDbtConnection + * + * @param dbtConnectionIdentifier Unique ID of the DBT Connection. (required) + * @param _callback Callback for upload/download progress + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
204 DBT Connection successfully deleted. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public okhttp3.Call deleteDbtConnectionCall( + String dbtConnectionIdentifier, final ApiCallback _callback) throws ApiException { + String basePath = null; + // Operation Servers + String[] localBasePaths = new String[] {}; + + // Determine Base Path to Use + if (localCustomBaseUrl != null) { + basePath = localCustomBaseUrl; + } else if (localBasePaths.length > 0) { + basePath = localBasePaths[localHostIndex]; + } else { + basePath = null; + } + + Object localVarPostBody = null; + + // create path and map variables + String localVarPath = + "/api/rest/2.0/dbt/{dbt_connection_identifier}/delete" + .replace( + "{" + "dbt_connection_identifier" + "}", + localVarApiClient.escapeString(dbtConnectionIdentifier.toString())); + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + final String[] localVarAccepts = {"application/json"}; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = {}; + final String localVarContentType = + localVarApiClient.selectHeaderContentType(localVarContentTypes); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } + + String[] localVarAuthNames = new String[] {"bearerAuth"}; + return localVarApiClient.buildCall( + basePath, + localVarPath, + "POST", + localVarQueryParams, + localVarCollectionQueryParams, + localVarPostBody, + localVarHeaderParams, + localVarCookieParams, + localVarFormParams, + localVarAuthNames, + _callback); + } + + @SuppressWarnings("rawtypes") + private okhttp3.Call deleteDbtConnectionValidateBeforeCall( + String dbtConnectionIdentifier, final ApiCallback _callback) throws ApiException { + // verify the required parameter 'dbtConnectionIdentifier' is set + if (dbtConnectionIdentifier == null) { + throw new ApiException( + "Missing the required parameter 'dbtConnectionIdentifier' when calling" + + " deleteDbtConnection(Async)"); + } + + return deleteDbtConnectionCall(dbtConnectionIdentifier, _callback); + } + + /** + * Version: 9.9.0.cl or later Removes the specified DBT connection object from the ThoughtSpot + * system. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) or + * `DATAMANAGEMENT` (**Can manage data ThoughtSpot**) privilege. If [Role-Based Access + * Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, + * the following Data control privileges may be required: - + * `CAN_MANAGE_CUSTOM_CALENDAR`(**Can manage custom calendars**) - + * `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) - + * `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` (**Can manage data models**) + * + * @param dbtConnectionIdentifier Unique ID of the DBT Connection. (required) + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the + * response body + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
204 DBT Connection successfully deleted. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public void deleteDbtConnection(String dbtConnectionIdentifier) throws ApiException { + deleteDbtConnectionWithHttpInfo(dbtConnectionIdentifier); + } + + /** + * Version: 9.9.0.cl or later Removes the specified DBT connection object from the ThoughtSpot + * system. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) or + * `DATAMANAGEMENT` (**Can manage data ThoughtSpot**) privilege. If [Role-Based Access + * Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, + * the following Data control privileges may be required: - + * `CAN_MANAGE_CUSTOM_CALENDAR`(**Can manage custom calendars**) - + * `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) - + * `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` (**Can manage data models**) + * + * @param dbtConnectionIdentifier Unique ID of the DBT Connection. (required) + * @return ApiResponse<Void> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the + * response body + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
204 DBT Connection successfully deleted. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public ApiResponse deleteDbtConnectionWithHttpInfo(String dbtConnectionIdentifier) + throws ApiException { + okhttp3.Call localVarCall = + deleteDbtConnectionValidateBeforeCall(dbtConnectionIdentifier, null); + return localVarApiClient.execute(localVarCall); + } + + /** + * (asynchronously) Version: 9.9.0.cl or later Removes the specified DBT connection object from + * the ThoughtSpot system. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) + * or `DATAMANAGEMENT` (**Can manage data ThoughtSpot**) privilege. If [Role-Based + * Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your + * instance, the following Data control privileges may be required: - + * `CAN_MANAGE_CUSTOM_CALENDAR`(**Can manage custom calendars**) - + * `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) - + * `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` (**Can manage data models**) + * + * @param dbtConnectionIdentifier Unique ID of the DBT Connection. (required) + * @param _callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body + * object + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
204 DBT Connection successfully deleted. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public okhttp3.Call deleteDbtConnectionAsync( + String dbtConnectionIdentifier, final ApiCallback _callback) throws ApiException { + + okhttp3.Call localVarCall = + deleteDbtConnectionValidateBeforeCall(dbtConnectionIdentifier, _callback); + localVarApiClient.executeAsync(localVarCall, _callback); + return localVarCall; + } + /** + * Build call for deleteEmailCustomization + * + * @param templateIdentifier Unique ID or name of the email customization. (required) + * @param _callback Callback for upload/download progress + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + * @http.response.details + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
204 Email Customization configuration successfully deleted. -
400 Invalid request. -
403 Unauthorized access. -
500 Unexpected error -
+ * + * @deprecated + */ + @Deprecated + public okhttp3.Call deleteEmailCustomizationCall( + String templateIdentifier, final ApiCallback _callback) throws ApiException { + String basePath = null; + // Operation Servers + String[] localBasePaths = new String[] {}; + + // Determine Base Path to Use + if (localCustomBaseUrl != null) { + basePath = localCustomBaseUrl; + } else if (localBasePaths.length > 0) { + basePath = localBasePaths[localHostIndex]; + } else { + basePath = null; + } + + Object localVarPostBody = null; + + // create path and map variables + String localVarPath = + "/api/rest/2.0/customization/email/{template_identifier}/delete" + .replace( + "{" + "template_identifier" + "}", + localVarApiClient.escapeString(templateIdentifier.toString())); + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + final String[] localVarAccepts = {"application/json"}; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = {}; + final String localVarContentType = + localVarApiClient.selectHeaderContentType(localVarContentTypes); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } + + String[] localVarAuthNames = new String[] {"bearerAuth"}; + return localVarApiClient.buildCall( + basePath, + localVarPath, + "POST", + localVarQueryParams, + localVarCollectionQueryParams, + localVarPostBody, + localVarHeaderParams, + localVarCookieParams, + localVarFormParams, + localVarAuthNames, + _callback); + } + + @Deprecated + @SuppressWarnings("rawtypes") + private okhttp3.Call deleteEmailCustomizationValidateBeforeCall( + String templateIdentifier, final ApiCallback _callback) throws ApiException { + // verify the required parameter 'templateIdentifier' is set + if (templateIdentifier == null) { + throw new ApiException( + "Missing the required parameter 'templateIdentifier' when calling" + + " deleteEmailCustomization(Async)"); + } + + return deleteEmailCustomizationCall(templateIdentifier, _callback); + } + + /** + * Version: 10.10.0.cl or later Deletes the configuration for the email customization. #### + * Pre-requisites Requires `DEVELOPER` (**has developer privilege**) or + * `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access + * Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, + * the `DEVELOPER` (**Has developer privilege**) privilege is required. **NOTE**:This + * endpoint in currently in beta. Contact ThoughtSpot support to enable this on your instance. + * #### Usage guidelines - Call the search API endpoint to get the + * `template_identifier` from the response. - Use that `template_identifier` + * as a parameter in this API request. + * + * @param templateIdentifier Unique ID or name of the email customization. (required) + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the + * response body + * @http.response.details + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
204 Email Customization configuration successfully deleted. -
400 Invalid request. -
403 Unauthorized access. -
500 Unexpected error -
+ * + * @deprecated + */ + @Deprecated + public void deleteEmailCustomization(String templateIdentifier) throws ApiException { + deleteEmailCustomizationWithHttpInfo(templateIdentifier); + } + + /** + * Version: 10.10.0.cl or later Deletes the configuration for the email customization. #### + * Pre-requisites Requires `DEVELOPER` (**has developer privilege**) or + * `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access + * Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, + * the `DEVELOPER` (**Has developer privilege**) privilege is required. **NOTE**:This + * endpoint in currently in beta. Contact ThoughtSpot support to enable this on your instance. + * #### Usage guidelines - Call the search API endpoint to get the + * `template_identifier` from the response. - Use that `template_identifier` + * as a parameter in this API request. + * + * @param templateIdentifier Unique ID or name of the email customization. (required) + * @return ApiResponse<Void> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the + * response body + * @http.response.details + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
204 Email Customization configuration successfully deleted. -
400 Invalid request. -
403 Unauthorized access. -
500 Unexpected error -
+ * + * @deprecated + */ + @Deprecated + public ApiResponse deleteEmailCustomizationWithHttpInfo(String templateIdentifier) + throws ApiException { + okhttp3.Call localVarCall = + deleteEmailCustomizationValidateBeforeCall(templateIdentifier, null); + return localVarApiClient.execute(localVarCall); + } + + /** + * (asynchronously) Version: 10.10.0.cl or later Deletes the configuration for the email + * customization. #### Pre-requisites Requires `DEVELOPER` (**has developer + * privilege**) or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If + * [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled + * on your instance, the `DEVELOPER` (**Has developer privilege**) privilege is + * required. **NOTE**:This endpoint in currently in beta. Contact ThoughtSpot support to enable + * this on your instance. #### Usage guidelines - Call the search API endpoint to get the + * `template_identifier` from the response. - Use that `template_identifier` + * as a parameter in this API request. + * + * @param templateIdentifier Unique ID or name of the email customization. (required) + * @param _callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body + * object + * @http.response.details + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
204 Email Customization configuration successfully deleted. -
400 Invalid request. -
403 Unauthorized access. -
500 Unexpected error -
+ * + * @deprecated + */ + @Deprecated + public okhttp3.Call deleteEmailCustomizationAsync( + String templateIdentifier, final ApiCallback _callback) throws ApiException { + + okhttp3.Call localVarCall = + deleteEmailCustomizationValidateBeforeCall(templateIdentifier, _callback); + localVarApiClient.executeAsync(localVarCall, _callback); + return localVarCall; + } + /** + * Build call for deleteMetadata + * + * @param deleteMetadataRequest (required) + * @param _callback Callback for upload/download progress + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
204 Metadata objects successfully deleted. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public okhttp3.Call deleteMetadataCall( + DeleteMetadataRequest deleteMetadataRequest, final ApiCallback _callback) + throws ApiException { + String basePath = null; + // Operation Servers + String[] localBasePaths = new String[] {}; + + // Determine Base Path to Use + if (localCustomBaseUrl != null) { + basePath = localCustomBaseUrl; + } else if (localBasePaths.length > 0) { + basePath = localBasePaths[localHostIndex]; + } else { + basePath = null; + } + + Object localVarPostBody = deleteMetadataRequest; + + // create path and map variables + String localVarPath = "/api/rest/2.0/metadata/delete"; + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + final String[] localVarAccepts = {"application/json"}; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = {"application/json"}; + final String localVarContentType = + localVarApiClient.selectHeaderContentType(localVarContentTypes); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } + + String[] localVarAuthNames = new String[] {"bearerAuth"}; + return localVarApiClient.buildCall( + basePath, + localVarPath, + "POST", + localVarQueryParams, + localVarCollectionQueryParams, + localVarPostBody, + localVarHeaderParams, + localVarCookieParams, + localVarFormParams, + localVarAuthNames, + _callback); + } + + @SuppressWarnings("rawtypes") + private okhttp3.Call deleteMetadataValidateBeforeCall( + DeleteMetadataRequest deleteMetadataRequest, final ApiCallback _callback) + throws ApiException { + // verify the required parameter 'deleteMetadataRequest' is set + if (deleteMetadataRequest == null) { + throw new ApiException( + "Missing the required parameter 'deleteMetadataRequest' when calling" + + " deleteMetadata(Async)"); + } + + return deleteMetadataCall(deleteMetadataRequest, _callback); + } + + /** + * Version: 9.0.0.cl or later Removes the specified metadata object from the ThoughtSpot system. + * Requires edit access to the metadata object. + * + * @param deleteMetadataRequest (required) + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the + * response body + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
204 Metadata objects successfully deleted. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public void deleteMetadata(DeleteMetadataRequest deleteMetadataRequest) throws ApiException { + deleteMetadataWithHttpInfo(deleteMetadataRequest); + } + + /** + * Version: 9.0.0.cl or later Removes the specified metadata object from the ThoughtSpot system. + * Requires edit access to the metadata object. + * + * @param deleteMetadataRequest (required) + * @return ApiResponse<Void> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the + * response body + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
204 Metadata objects successfully deleted. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public ApiResponse deleteMetadataWithHttpInfo(DeleteMetadataRequest deleteMetadataRequest) + throws ApiException { + okhttp3.Call localVarCall = deleteMetadataValidateBeforeCall(deleteMetadataRequest, null); + return localVarApiClient.execute(localVarCall); + } + + /** + * (asynchronously) Version: 9.0.0.cl or later Removes the specified metadata object from the + * ThoughtSpot system. Requires edit access to the metadata object. + * + * @param deleteMetadataRequest (required) + * @param _callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body + * object + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
204 Metadata objects successfully deleted. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public okhttp3.Call deleteMetadataAsync( + DeleteMetadataRequest deleteMetadataRequest, final ApiCallback _callback) + throws ApiException { + + okhttp3.Call localVarCall = + deleteMetadataValidateBeforeCall(deleteMetadataRequest, _callback); + localVarApiClient.executeAsync(localVarCall, _callback); + return localVarCall; + } + /** + * Build call for deleteOrg + * + * @param orgIdentifier ID or name of the Org (required) + * @param _callback Callback for upload/download progress + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
204 Organization successfully deleted. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public okhttp3.Call deleteOrgCall(String orgIdentifier, final ApiCallback _callback) + throws ApiException { + String basePath = null; + // Operation Servers + String[] localBasePaths = new String[] {}; + + // Determine Base Path to Use + if (localCustomBaseUrl != null) { + basePath = localCustomBaseUrl; + } else if (localBasePaths.length > 0) { + basePath = localBasePaths[localHostIndex]; + } else { + basePath = null; + } + + Object localVarPostBody = null; + + // create path and map variables + String localVarPath = + "/api/rest/2.0/orgs/{org_identifier}/delete" + .replace( + "{" + "org_identifier" + "}", + localVarApiClient.escapeString(orgIdentifier.toString())); + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + final String[] localVarAccepts = {"application/json"}; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = {}; + final String localVarContentType = + localVarApiClient.selectHeaderContentType(localVarContentTypes); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } + + String[] localVarAuthNames = new String[] {"bearerAuth"}; + return localVarApiClient.buildCall( + basePath, + localVarPath, + "POST", + localVarQueryParams, + localVarCollectionQueryParams, + localVarPostBody, + localVarHeaderParams, + localVarCookieParams, + localVarFormParams, + localVarAuthNames, + _callback); + } + + @SuppressWarnings("rawtypes") + private okhttp3.Call deleteOrgValidateBeforeCall( + String orgIdentifier, final ApiCallback _callback) throws ApiException { + // verify the required parameter 'orgIdentifier' is set + if (orgIdentifier == null) { + throw new ApiException( + "Missing the required parameter 'orgIdentifier' when calling deleteOrg(Async)"); + } + + return deleteOrgCall(orgIdentifier, _callback); + } + + /** + * Version: 9.0.0.cl or later Deletes an Org object from the ThoughtSpot system. Requires + * cluster administration (**Can administer Org**) privilege. If [Role-Based Access Control + * (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the + * `ORG_ADMINISTRATION` (**Can manage Orgs**) privilege is required. When you delete + * an Org, all its users and objects created in that Org context are removed. However, if the + * users in the deleted Org also exists in other Orgs, they are removed only from the deleted + * Org. + * + * @param orgIdentifier ID or name of the Org (required) + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the + * response body + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
204 Organization successfully deleted. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public void deleteOrg(String orgIdentifier) throws ApiException { + deleteOrgWithHttpInfo(orgIdentifier); + } + + /** + * Version: 9.0.0.cl or later Deletes an Org object from the ThoughtSpot system. Requires + * cluster administration (**Can administer Org**) privilege. If [Role-Based Access Control + * (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the + * `ORG_ADMINISTRATION` (**Can manage Orgs**) privilege is required. When you delete + * an Org, all its users and objects created in that Org context are removed. However, if the + * users in the deleted Org also exists in other Orgs, they are removed only from the deleted + * Org. + * + * @param orgIdentifier ID or name of the Org (required) + * @return ApiResponse<Void> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the + * response body + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
204 Organization successfully deleted. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public ApiResponse deleteOrgWithHttpInfo(String orgIdentifier) throws ApiException { + okhttp3.Call localVarCall = deleteOrgValidateBeforeCall(orgIdentifier, null); + return localVarApiClient.execute(localVarCall); + } + + /** + * (asynchronously) Version: 9.0.0.cl or later Deletes an Org object from the ThoughtSpot + * system. Requires cluster administration (**Can administer Org**) privilege. If [Role-Based + * Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your + * instance, the `ORG_ADMINISTRATION` (**Can manage Orgs**) privilege is required. + * When you delete an Org, all its users and objects created in that Org context are removed. + * However, if the users in the deleted Org also exists in other Orgs, they are removed only + * from the deleted Org. + * + * @param orgIdentifier ID or name of the Org (required) + * @param _callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body + * object + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
204 Organization successfully deleted. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public okhttp3.Call deleteOrgAsync(String orgIdentifier, final ApiCallback _callback) + throws ApiException { + + okhttp3.Call localVarCall = deleteOrgValidateBeforeCall(orgIdentifier, _callback); + localVarApiClient.executeAsync(localVarCall, _callback); + return localVarCall; + } + /** + * Build call for deleteOrgEmailCustomization + * + * @param deleteOrgEmailCustomizationRequest (required) + * @param _callback Callback for upload/download progress + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
204 Email Customization configuration successfully deleted. -
400 Invalid request. -
401 Unauthorized access. -
403 Unauthorized access. -
500 Unexpected error -
+ */ + public okhttp3.Call deleteOrgEmailCustomizationCall( + DeleteOrgEmailCustomizationRequest deleteOrgEmailCustomizationRequest, + final ApiCallback _callback) + throws ApiException { + String basePath = null; + // Operation Servers + String[] localBasePaths = new String[] {}; + + // Determine Base Path to Use + if (localCustomBaseUrl != null) { + basePath = localCustomBaseUrl; + } else if (localBasePaths.length > 0) { + basePath = localBasePaths[localHostIndex]; + } else { + basePath = null; + } + + Object localVarPostBody = deleteOrgEmailCustomizationRequest; + + // create path and map variables + String localVarPath = "/api/rest/2.0/customization/email/delete"; + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + final String[] localVarAccepts = {"application/json"}; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = {"application/json"}; + final String localVarContentType = + localVarApiClient.selectHeaderContentType(localVarContentTypes); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } + + String[] localVarAuthNames = new String[] {"bearerAuth"}; + return localVarApiClient.buildCall( + basePath, + localVarPath, + "POST", + localVarQueryParams, + localVarCollectionQueryParams, + localVarPostBody, + localVarHeaderParams, + localVarCookieParams, + localVarFormParams, + localVarAuthNames, + _callback); + } + + @SuppressWarnings("rawtypes") + private okhttp3.Call deleteOrgEmailCustomizationValidateBeforeCall( + DeleteOrgEmailCustomizationRequest deleteOrgEmailCustomizationRequest, + final ApiCallback _callback) + throws ApiException { + // verify the required parameter 'deleteOrgEmailCustomizationRequest' is set + if (deleteOrgEmailCustomizationRequest == null) { + throw new ApiException( + "Missing the required parameter 'deleteOrgEmailCustomizationRequest' when" + + " calling deleteOrgEmailCustomization(Async)"); + } + + return deleteOrgEmailCustomizationCall(deleteOrgEmailCustomizationRequest, _callback); + } + + /** + * Version: 10.12.0.cl or later Deletes the configuration for the email customization. #### + * Pre-requisites Requires `DEVELOPER` (**has developer privilege**) or + * `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access + * Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, + * the `DEVELOPER` (**Has developer privilege**) privilege is required. **NOTE**:This + * endpoint in currently in beta. Contact ThoughtSpot support to enable this on your instance. + * #### Usage guidelines - Call the search API endpoint to get the `org_identifier` + * from the response. - Use that `org_identifier` as a parameter in this API request. + * + * @param deleteOrgEmailCustomizationRequest (required) + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the + * response body + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
204 Email Customization configuration successfully deleted. -
400 Invalid request. -
401 Unauthorized access. -
403 Unauthorized access. -
500 Unexpected error -
+ */ + public void deleteOrgEmailCustomization( + DeleteOrgEmailCustomizationRequest deleteOrgEmailCustomizationRequest) + throws ApiException { + deleteOrgEmailCustomizationWithHttpInfo(deleteOrgEmailCustomizationRequest); + } + + /** + * Version: 10.12.0.cl or later Deletes the configuration for the email customization. #### + * Pre-requisites Requires `DEVELOPER` (**has developer privilege**) or + * `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access + * Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, + * the `DEVELOPER` (**Has developer privilege**) privilege is required. **NOTE**:This + * endpoint in currently in beta. Contact ThoughtSpot support to enable this on your instance. + * #### Usage guidelines - Call the search API endpoint to get the `org_identifier` + * from the response. - Use that `org_identifier` as a parameter in this API request. + * + * @param deleteOrgEmailCustomizationRequest (required) + * @return ApiResponse<Void> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the + * response body + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
204 Email Customization configuration successfully deleted. -
400 Invalid request. -
401 Unauthorized access. -
403 Unauthorized access. -
500 Unexpected error -
+ */ + public ApiResponse deleteOrgEmailCustomizationWithHttpInfo( + DeleteOrgEmailCustomizationRequest deleteOrgEmailCustomizationRequest) + throws ApiException { + okhttp3.Call localVarCall = + deleteOrgEmailCustomizationValidateBeforeCall( + deleteOrgEmailCustomizationRequest, null); + return localVarApiClient.execute(localVarCall); + } + + /** + * (asynchronously) Version: 10.12.0.cl or later Deletes the configuration for the email + * customization. #### Pre-requisites Requires `DEVELOPER` (**has developer + * privilege**) or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If + * [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled + * on your instance, the `DEVELOPER` (**Has developer privilege**) privilege is + * required. **NOTE**:This endpoint in currently in beta. Contact ThoughtSpot support to enable + * this on your instance. #### Usage guidelines - Call the search API endpoint to get the + * `org_identifier` from the response. - Use that `org_identifier` as a + * parameter in this API request. + * + * @param deleteOrgEmailCustomizationRequest (required) + * @param _callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body + * object + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
204 Email Customization configuration successfully deleted. -
400 Invalid request. -
401 Unauthorized access. -
403 Unauthorized access. -
500 Unexpected error -
+ */ + public okhttp3.Call deleteOrgEmailCustomizationAsync( + DeleteOrgEmailCustomizationRequest deleteOrgEmailCustomizationRequest, + final ApiCallback _callback) + throws ApiException { + + okhttp3.Call localVarCall = + deleteOrgEmailCustomizationValidateBeforeCall( + deleteOrgEmailCustomizationRequest, _callback); + localVarApiClient.executeAsync(localVarCall, _callback); + return localVarCall; + } + /** + * Build call for deleteRole + * + * @param roleIdentifier Unique ID or name of the Role. ReadOnly roles cannot be deleted. + * (required) + * @param _callback Callback for upload/download progress + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
204 Role successfully deleted. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Internal error -
+ */ + public okhttp3.Call deleteRoleCall(String roleIdentifier, final ApiCallback _callback) + throws ApiException { + String basePath = null; + // Operation Servers + String[] localBasePaths = new String[] {}; + + // Determine Base Path to Use + if (localCustomBaseUrl != null) { + basePath = localCustomBaseUrl; + } else if (localBasePaths.length > 0) { + basePath = localBasePaths[localHostIndex]; + } else { + basePath = null; + } + + Object localVarPostBody = null; + + // create path and map variables + String localVarPath = + "/api/rest/2.0/roles/{role_identifier}/delete" + .replace( + "{" + "role_identifier" + "}", + localVarApiClient.escapeString(roleIdentifier.toString())); + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + final String[] localVarAccepts = {"application/json"}; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = {}; + final String localVarContentType = + localVarApiClient.selectHeaderContentType(localVarContentTypes); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } + + String[] localVarAuthNames = new String[] {"bearerAuth"}; + return localVarApiClient.buildCall( + basePath, + localVarPath, + "POST", + localVarQueryParams, + localVarCollectionQueryParams, + localVarPostBody, + localVarHeaderParams, + localVarCookieParams, + localVarFormParams, + localVarAuthNames, + _callback); + } + + @SuppressWarnings("rawtypes") + private okhttp3.Call deleteRoleValidateBeforeCall( + String roleIdentifier, final ApiCallback _callback) throws ApiException { + // verify the required parameter 'roleIdentifier' is set + if (roleIdentifier == null) { + throw new ApiException( + "Missing the required parameter 'roleIdentifier' when calling" + + " deleteRole(Async)"); + } + + return deleteRoleCall(roleIdentifier, _callback); + } + + /** + * Version: 9.5.0.cl or later Deletes a Role object from the ThoughtSpot system. Available only + * if [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is + * enabled on your instance. To delete a Role, the `ROLE_ADMINISTRATION` (**Can manage + * roles**) privilege is required. + * + * @param roleIdentifier Unique ID or name of the Role. ReadOnly roles cannot be deleted. + * (required) + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the + * response body + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
204 Role successfully deleted. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Internal error -
+ */ + public void deleteRole(String roleIdentifier) throws ApiException { + deleteRoleWithHttpInfo(roleIdentifier); + } + + /** + * Version: 9.5.0.cl or later Deletes a Role object from the ThoughtSpot system. Available only + * if [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is + * enabled on your instance. To delete a Role, the `ROLE_ADMINISTRATION` (**Can manage + * roles**) privilege is required. + * + * @param roleIdentifier Unique ID or name of the Role. ReadOnly roles cannot be deleted. + * (required) + * @return ApiResponse<Void> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the + * response body + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
204 Role successfully deleted. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Internal error -
+ */ + public ApiResponse deleteRoleWithHttpInfo(String roleIdentifier) throws ApiException { + okhttp3.Call localVarCall = deleteRoleValidateBeforeCall(roleIdentifier, null); + return localVarApiClient.execute(localVarCall); + } + + /** + * (asynchronously) Version: 9.5.0.cl or later Deletes a Role object from the ThoughtSpot + * system. Available only if [Role-Based Access Control + * (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance. To delete + * a Role, the `ROLE_ADMINISTRATION` (**Can manage roles**) privilege is required. + * + * @param roleIdentifier Unique ID or name of the Role. ReadOnly roles cannot be deleted. + * (required) + * @param _callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body + * object + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
204 Role successfully deleted. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Internal error -
+ */ + public okhttp3.Call deleteRoleAsync(String roleIdentifier, final ApiCallback _callback) + throws ApiException { + + okhttp3.Call localVarCall = deleteRoleValidateBeforeCall(roleIdentifier, _callback); + localVarApiClient.executeAsync(localVarCall, _callback); + return localVarCall; + } + /** + * Build call for deleteSchedule + * + * @param scheduleIdentifier Unique ID or name of the scheduled job. (required) + * @param _callback Callback for upload/download progress + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
204 Schedule successfully deleted. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public okhttp3.Call deleteScheduleCall(String scheduleIdentifier, final ApiCallback _callback) + throws ApiException { + String basePath = null; + // Operation Servers + String[] localBasePaths = new String[] {}; + + // Determine Base Path to Use + if (localCustomBaseUrl != null) { + basePath = localCustomBaseUrl; + } else if (localBasePaths.length > 0) { + basePath = localBasePaths[localHostIndex]; + } else { + basePath = null; + } + + Object localVarPostBody = null; + + // create path and map variables + String localVarPath = + "/api/rest/2.0/schedules/{schedule_identifier}/delete" + .replace( + "{" + "schedule_identifier" + "}", + localVarApiClient.escapeString(scheduleIdentifier.toString())); + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + final String[] localVarAccepts = {"application/json"}; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = {}; + final String localVarContentType = + localVarApiClient.selectHeaderContentType(localVarContentTypes); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } + + String[] localVarAuthNames = new String[] {"bearerAuth"}; + return localVarApiClient.buildCall( + basePath, + localVarPath, + "POST", + localVarQueryParams, + localVarCollectionQueryParams, + localVarPostBody, + localVarHeaderParams, + localVarCookieParams, + localVarFormParams, + localVarAuthNames, + _callback); + } + + @SuppressWarnings("rawtypes") + private okhttp3.Call deleteScheduleValidateBeforeCall( + String scheduleIdentifier, final ApiCallback _callback) throws ApiException { + // verify the required parameter 'scheduleIdentifier' is set + if (scheduleIdentifier == null) { + throw new ApiException( + "Missing the required parameter 'scheduleIdentifier' when calling" + + " deleteSchedule(Async)"); + } + + return deleteScheduleCall(scheduleIdentifier, _callback); + } + + /** + * Deletes a scheduled job. Version: 9.4.0.cl or later Deletes a scheduled Liveboard job. + * Requires at least edit access to Liveboard or `ADMINISTRATION` (**Can administer + * Org**) privilege. If [Role-Based Access Control + * (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the + * `JOBSCHEDULING` (**Can schedule for others**) privilege is required. + * + * @param scheduleIdentifier Unique ID or name of the scheduled job. (required) + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the + * response body + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
204 Schedule successfully deleted. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public void deleteSchedule(String scheduleIdentifier) throws ApiException { + deleteScheduleWithHttpInfo(scheduleIdentifier); + } + + /** + * Deletes a scheduled job. Version: 9.4.0.cl or later Deletes a scheduled Liveboard job. + * Requires at least edit access to Liveboard or `ADMINISTRATION` (**Can administer + * Org**) privilege. If [Role-Based Access Control + * (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the + * `JOBSCHEDULING` (**Can schedule for others**) privilege is required. + * + * @param scheduleIdentifier Unique ID or name of the scheduled job. (required) + * @return ApiResponse<Void> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the + * response body + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
204 Schedule successfully deleted. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public ApiResponse deleteScheduleWithHttpInfo(String scheduleIdentifier) + throws ApiException { + okhttp3.Call localVarCall = deleteScheduleValidateBeforeCall(scheduleIdentifier, null); + return localVarApiClient.execute(localVarCall); + } + + /** + * (asynchronously) Deletes a scheduled job. Version: 9.4.0.cl or later Deletes a scheduled + * Liveboard job. Requires at least edit access to Liveboard or `ADMINISTRATION` + * (**Can administer Org**) privilege. If [Role-Based Access Control + * (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the + * `JOBSCHEDULING` (**Can schedule for others**) privilege is required. + * + * @param scheduleIdentifier Unique ID or name of the scheduled job. (required) + * @param _callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body + * object + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
204 Schedule successfully deleted. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public okhttp3.Call deleteScheduleAsync( + String scheduleIdentifier, final ApiCallback _callback) throws ApiException { + + okhttp3.Call localVarCall = deleteScheduleValidateBeforeCall(scheduleIdentifier, _callback); + localVarApiClient.executeAsync(localVarCall, _callback); + return localVarCall; + } + /** + * Build call for deleteTag + * + * @param tagIdentifier Tag identifier Tag name or Tag id. (required) + * @param _callback Callback for upload/download progress + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
204 Tag successfully deleted. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public okhttp3.Call deleteTagCall(String tagIdentifier, final ApiCallback _callback) + throws ApiException { + String basePath = null; + // Operation Servers + String[] localBasePaths = new String[] {}; + + // Determine Base Path to Use + if (localCustomBaseUrl != null) { + basePath = localCustomBaseUrl; + } else if (localBasePaths.length > 0) { + basePath = localBasePaths[localHostIndex]; + } else { + basePath = null; + } + + Object localVarPostBody = null; + + // create path and map variables + String localVarPath = + "/api/rest/2.0/tags/{tag_identifier}/delete" + .replace( + "{" + "tag_identifier" + "}", + localVarApiClient.escapeString(tagIdentifier.toString())); + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + final String[] localVarAccepts = {"application/json"}; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = {}; + final String localVarContentType = + localVarApiClient.selectHeaderContentType(localVarContentTypes); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } + + String[] localVarAuthNames = new String[] {"bearerAuth"}; + return localVarApiClient.buildCall( + basePath, + localVarPath, + "POST", + localVarQueryParams, + localVarCollectionQueryParams, + localVarPostBody, + localVarHeaderParams, + localVarCookieParams, + localVarFormParams, + localVarAuthNames, + _callback); + } + + @SuppressWarnings("rawtypes") + private okhttp3.Call deleteTagValidateBeforeCall( + String tagIdentifier, final ApiCallback _callback) throws ApiException { + // verify the required parameter 'tagIdentifier' is set + if (tagIdentifier == null) { + throw new ApiException( + "Missing the required parameter 'tagIdentifier' when calling deleteTag(Async)"); + } + + return deleteTagCall(tagIdentifier, _callback); + } + + /** + * Version: 9.0.0.cl or later Deletes a tag object from the ThoughtSpot system Requires + * `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access + * Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, + * the `TAGMANAGEMENT` (**Can manage tags**) privilege is required to create, edit, + * and delete tags. + * + * @param tagIdentifier Tag identifier Tag name or Tag id. (required) + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the + * response body + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
204 Tag successfully deleted. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public void deleteTag(String tagIdentifier) throws ApiException { + deleteTagWithHttpInfo(tagIdentifier); + } + + /** + * Version: 9.0.0.cl or later Deletes a tag object from the ThoughtSpot system Requires + * `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access + * Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, + * the `TAGMANAGEMENT` (**Can manage tags**) privilege is required to create, edit, + * and delete tags. + * + * @param tagIdentifier Tag identifier Tag name or Tag id. (required) + * @return ApiResponse<Void> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the + * response body + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
204 Tag successfully deleted. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public ApiResponse deleteTagWithHttpInfo(String tagIdentifier) throws ApiException { + okhttp3.Call localVarCall = deleteTagValidateBeforeCall(tagIdentifier, null); + return localVarApiClient.execute(localVarCall); + } + + /** + * (asynchronously) Version: 9.0.0.cl or later Deletes a tag object from the ThoughtSpot system + * Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If + * [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled + * on your instance, the `TAGMANAGEMENT` (**Can manage tags**) privilege is required + * to create, edit, and delete tags. + * + * @param tagIdentifier Tag identifier Tag name or Tag id. (required) + * @param _callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body + * object + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
204 Tag successfully deleted. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public okhttp3.Call deleteTagAsync(String tagIdentifier, final ApiCallback _callback) + throws ApiException { + + okhttp3.Call localVarCall = deleteTagValidateBeforeCall(tagIdentifier, _callback); + localVarApiClient.executeAsync(localVarCall, _callback); + return localVarCall; + } + /** + * Build call for deleteUser + * + * @param userIdentifier GUID / name of the user (required) + * @param _callback Callback for upload/download progress + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
204 User successfully deleted. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public okhttp3.Call deleteUserCall(String userIdentifier, final ApiCallback _callback) + throws ApiException { + String basePath = null; + // Operation Servers + String[] localBasePaths = new String[] {}; + + // Determine Base Path to Use + if (localCustomBaseUrl != null) { + basePath = localCustomBaseUrl; + } else if (localBasePaths.length > 0) { + basePath = localBasePaths[localHostIndex]; + } else { + basePath = null; + } + + Object localVarPostBody = null; + + // create path and map variables + String localVarPath = + "/api/rest/2.0/users/{user_identifier}/delete" + .replace( + "{" + "user_identifier" + "}", + localVarApiClient.escapeString(userIdentifier.toString())); + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + final String[] localVarAccepts = {"application/json"}; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = {}; + final String localVarContentType = + localVarApiClient.selectHeaderContentType(localVarContentTypes); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } + + String[] localVarAuthNames = new String[] {"bearerAuth"}; + return localVarApiClient.buildCall( + basePath, + localVarPath, + "POST", + localVarQueryParams, + localVarCollectionQueryParams, + localVarPostBody, + localVarHeaderParams, + localVarCookieParams, + localVarFormParams, + localVarAuthNames, + _callback); + } + + @SuppressWarnings("rawtypes") + private okhttp3.Call deleteUserValidateBeforeCall( + String userIdentifier, final ApiCallback _callback) throws ApiException { + // verify the required parameter 'userIdentifier' is set + if (userIdentifier == null) { + throw new ApiException( + "Missing the required parameter 'userIdentifier' when calling" + + " deleteUser(Async)"); + } + + return deleteUserCall(userIdentifier, _callback); + } + + /** + * Version: 9.0.0.cl or later Deletes a user from the ThoughtSpot system. If you want to remove + * a user from a specific Org but not from ThoughtSpot, update the group and Org mapping + * properties of the user object via a POST API call to the + * [/api/rest/2.0/users/{user_identifier}/update](#/http/api-endpoints/users/update-user) + * endpoint. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If + * [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled + * on your instance, the `USER_ADMINISTRATION` (**Can manage users**) privilege is + * required. + * + * @param userIdentifier GUID / name of the user (required) + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the + * response body + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
204 User successfully deleted. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public void deleteUser(String userIdentifier) throws ApiException { + deleteUserWithHttpInfo(userIdentifier); + } + + /** + * Version: 9.0.0.cl or later Deletes a user from the ThoughtSpot system. If you want to remove + * a user from a specific Org but not from ThoughtSpot, update the group and Org mapping + * properties of the user object via a POST API call to the + * [/api/rest/2.0/users/{user_identifier}/update](#/http/api-endpoints/users/update-user) + * endpoint. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If + * [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled + * on your instance, the `USER_ADMINISTRATION` (**Can manage users**) privilege is + * required. + * + * @param userIdentifier GUID / name of the user (required) + * @return ApiResponse<Void> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the + * response body + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
204 User successfully deleted. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public ApiResponse deleteUserWithHttpInfo(String userIdentifier) throws ApiException { + okhttp3.Call localVarCall = deleteUserValidateBeforeCall(userIdentifier, null); + return localVarApiClient.execute(localVarCall); + } + + /** + * (asynchronously) Version: 9.0.0.cl or later Deletes a user from the ThoughtSpot system. If + * you want to remove a user from a specific Org but not from ThoughtSpot, update the group and + * Org mapping properties of the user object via a POST API call to the + * [/api/rest/2.0/users/{user_identifier}/update](#/http/api-endpoints/users/update-user) + * endpoint. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If + * [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled + * on your instance, the `USER_ADMINISTRATION` (**Can manage users**) privilege is + * required. + * + * @param userIdentifier GUID / name of the user (required) + * @param _callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body + * object + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
204 User successfully deleted. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public okhttp3.Call deleteUserAsync(String userIdentifier, final ApiCallback _callback) + throws ApiException { + + okhttp3.Call localVarCall = deleteUserValidateBeforeCall(userIdentifier, _callback); + localVarApiClient.executeAsync(localVarCall, _callback); + return localVarCall; + } + /** + * Build call for deleteUserGroup + * + * @param groupIdentifier GUID or name of the group. (required) + * @param _callback Callback for upload/download progress + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
204 User group successfully deleted. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public okhttp3.Call deleteUserGroupCall(String groupIdentifier, final ApiCallback _callback) + throws ApiException { + String basePath = null; + // Operation Servers + String[] localBasePaths = new String[] {}; + + // Determine Base Path to Use + if (localCustomBaseUrl != null) { + basePath = localCustomBaseUrl; + } else if (localBasePaths.length > 0) { + basePath = localBasePaths[localHostIndex]; + } else { + basePath = null; + } + + Object localVarPostBody = null; + + // create path and map variables + String localVarPath = + "/api/rest/2.0/groups/{group_identifier}/delete" + .replace( + "{" + "group_identifier" + "}", + localVarApiClient.escapeString(groupIdentifier.toString())); + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + final String[] localVarAccepts = {"application/json"}; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = {}; + final String localVarContentType = + localVarApiClient.selectHeaderContentType(localVarContentTypes); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } + + String[] localVarAuthNames = new String[] {"bearerAuth"}; + return localVarApiClient.buildCall( + basePath, + localVarPath, + "POST", + localVarQueryParams, + localVarCollectionQueryParams, + localVarPostBody, + localVarHeaderParams, + localVarCookieParams, + localVarFormParams, + localVarAuthNames, + _callback); + } + + @SuppressWarnings("rawtypes") + private okhttp3.Call deleteUserGroupValidateBeforeCall( + String groupIdentifier, final ApiCallback _callback) throws ApiException { + // verify the required parameter 'groupIdentifier' is set + if (groupIdentifier == null) { + throw new ApiException( + "Missing the required parameter 'groupIdentifier' when calling" + + " deleteUserGroup(Async)"); + } + + return deleteUserGroupCall(groupIdentifier, _callback); + } + + /** + * Version: 9.0.0.cl or later Removes the specified group object from the ThoughtSpot system. + * Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If + * [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled + * on your instance, the `GROUP_ADMINISTRATION` (**Can manage groups**) privilege is + * required. + * + * @param groupIdentifier GUID or name of the group. (required) + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the + * response body + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
204 User group successfully deleted. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public void deleteUserGroup(String groupIdentifier) throws ApiException { + deleteUserGroupWithHttpInfo(groupIdentifier); + } + + /** + * Version: 9.0.0.cl or later Removes the specified group object from the ThoughtSpot system. + * Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If + * [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled + * on your instance, the `GROUP_ADMINISTRATION` (**Can manage groups**) privilege is + * required. + * + * @param groupIdentifier GUID or name of the group. (required) + * @return ApiResponse<Void> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the + * response body + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
204 User group successfully deleted. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public ApiResponse deleteUserGroupWithHttpInfo(String groupIdentifier) + throws ApiException { + okhttp3.Call localVarCall = deleteUserGroupValidateBeforeCall(groupIdentifier, null); + return localVarApiClient.execute(localVarCall); + } + + /** + * (asynchronously) Version: 9.0.0.cl or later Removes the specified group object from the + * ThoughtSpot system. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) + * privilege. If [Role-Based Access Control + * (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the + * `GROUP_ADMINISTRATION` (**Can manage groups**) privilege is required. + * + * @param groupIdentifier GUID or name of the group. (required) + * @param _callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body + * object + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
204 User group successfully deleted. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public okhttp3.Call deleteUserGroupAsync( + String groupIdentifier, final ApiCallback _callback) throws ApiException { + + okhttp3.Call localVarCall = deleteUserGroupValidateBeforeCall(groupIdentifier, _callback); + localVarApiClient.executeAsync(localVarCall, _callback); + return localVarCall; + } + /** + * Build call for deleteVariable + * + * @param identifier Unique id or name of the variable (required) + * @param _callback Callback for upload/download progress + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
204 Deleting the variable is successful. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ * + * @deprecated + */ + @Deprecated + public okhttp3.Call deleteVariableCall(String identifier, final ApiCallback _callback) + throws ApiException { + String basePath = null; + // Operation Servers + String[] localBasePaths = new String[] {}; + + // Determine Base Path to Use + if (localCustomBaseUrl != null) { + basePath = localCustomBaseUrl; + } else if (localBasePaths.length > 0) { + basePath = localBasePaths[localHostIndex]; + } else { + basePath = null; + } + + Object localVarPostBody = null; + + // create path and map variables + String localVarPath = + "/api/rest/2.0/template/variables/{identifier}/delete" + .replace( + "{" + "identifier" + "}", + localVarApiClient.escapeString(identifier.toString())); + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + final String[] localVarAccepts = {"application/json"}; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = {}; + final String localVarContentType = + localVarApiClient.selectHeaderContentType(localVarContentTypes); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } + + String[] localVarAuthNames = new String[] {"bearerAuth"}; + return localVarApiClient.buildCall( + basePath, + localVarPath, + "POST", + localVarQueryParams, + localVarCollectionQueryParams, + localVarPostBody, + localVarHeaderParams, + localVarCookieParams, + localVarFormParams, + localVarAuthNames, + _callback); + } + + @Deprecated + @SuppressWarnings("rawtypes") + private okhttp3.Call deleteVariableValidateBeforeCall( + String identifier, final ApiCallback _callback) throws ApiException { + // verify the required parameter 'identifier' is set + if (identifier == null) { + throw new ApiException( + "Missing the required parameter 'identifier' when calling" + + " deleteVariable(Async)"); + } + + return deleteVariableCall(identifier, _callback); + } + + /** + * Delete a variable Version: 10.14.0.cl or later **Note:** This API endpoint is deprecated and + * will be removed from ThoughtSpot in a future release. Use [POST + * /api/rest/2.0/template/variables/delete](/api/rest/2.0/template/variables/delete) instead. + * Allows deleting a variable from ThoughtSpot. Requires ADMINISTRATION role and TENANT scope. + * The CAN_MANAGE_VARIABLES permission allows you to manage Formula Variables in the current + * organization scope. The API endpoint requires: * The variable identifier (ID or name) The + * operation will fail if: * The user lacks required permissions * The variable doesn't + * exist * The variable is being used by other objects + * + * @param identifier Unique id or name of the variable (required) + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the + * response body + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
204 Deleting the variable is successful. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ * + * @deprecated + */ + @Deprecated + public void deleteVariable(String identifier) throws ApiException { + deleteVariableWithHttpInfo(identifier); + } + + /** + * Delete a variable Version: 10.14.0.cl or later **Note:** This API endpoint is deprecated and + * will be removed from ThoughtSpot in a future release. Use [POST + * /api/rest/2.0/template/variables/delete](/api/rest/2.0/template/variables/delete) instead. + * Allows deleting a variable from ThoughtSpot. Requires ADMINISTRATION role and TENANT scope. + * The CAN_MANAGE_VARIABLES permission allows you to manage Formula Variables in the current + * organization scope. The API endpoint requires: * The variable identifier (ID or name) The + * operation will fail if: * The user lacks required permissions * The variable doesn't + * exist * The variable is being used by other objects + * + * @param identifier Unique id or name of the variable (required) + * @return ApiResponse<Void> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the + * response body + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
204 Deleting the variable is successful. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ * + * @deprecated + */ + @Deprecated + public ApiResponse deleteVariableWithHttpInfo(String identifier) throws ApiException { + okhttp3.Call localVarCall = deleteVariableValidateBeforeCall(identifier, null); + return localVarApiClient.execute(localVarCall); + } + + /** + * (asynchronously) Delete a variable Version: 10.14.0.cl or later **Note:** This API endpoint + * is deprecated and will be removed from ThoughtSpot in a future release. Use [POST + * /api/rest/2.0/template/variables/delete](/api/rest/2.0/template/variables/delete) instead. + * Allows deleting a variable from ThoughtSpot. Requires ADMINISTRATION role and TENANT scope. + * The CAN_MANAGE_VARIABLES permission allows you to manage Formula Variables in the current + * organization scope. The API endpoint requires: * The variable identifier (ID or name) The + * operation will fail if: * The user lacks required permissions * The variable doesn't + * exist * The variable is being used by other objects + * + * @param identifier Unique id or name of the variable (required) + * @param _callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body + * object + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
204 Deleting the variable is successful. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ * + * @deprecated + */ + @Deprecated + public okhttp3.Call deleteVariableAsync(String identifier, final ApiCallback _callback) + throws ApiException { + + okhttp3.Call localVarCall = deleteVariableValidateBeforeCall(identifier, _callback); + localVarApiClient.executeAsync(localVarCall, _callback); + return localVarCall; + } + /** + * Build call for deleteVariables + * + * @param deleteVariablesRequest (required) + * @param _callback Callback for upload/download progress + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
204 Deletion of variable(s) is successful. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public okhttp3.Call deleteVariablesCall( + DeleteVariablesRequest deleteVariablesRequest, final ApiCallback _callback) + throws ApiException { + String basePath = null; + // Operation Servers + String[] localBasePaths = new String[] {}; + + // Determine Base Path to Use + if (localCustomBaseUrl != null) { + basePath = localCustomBaseUrl; + } else if (localBasePaths.length > 0) { + basePath = localBasePaths[localHostIndex]; + } else { + basePath = null; + } + + Object localVarPostBody = deleteVariablesRequest; + + // create path and map variables + String localVarPath = "/api/rest/2.0/template/variables/delete"; + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + final String[] localVarAccepts = {"application/json"}; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = {"application/json"}; + final String localVarContentType = + localVarApiClient.selectHeaderContentType(localVarContentTypes); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } + + String[] localVarAuthNames = new String[] {"bearerAuth"}; + return localVarApiClient.buildCall( + basePath, + localVarPath, + "POST", + localVarQueryParams, + localVarCollectionQueryParams, + localVarPostBody, + localVarHeaderParams, + localVarCookieParams, + localVarFormParams, + localVarAuthNames, + _callback); + } + + @SuppressWarnings("rawtypes") + private okhttp3.Call deleteVariablesValidateBeforeCall( + DeleteVariablesRequest deleteVariablesRequest, final ApiCallback _callback) + throws ApiException { + // verify the required parameter 'deleteVariablesRequest' is set + if (deleteVariablesRequest == null) { + throw new ApiException( + "Missing the required parameter 'deleteVariablesRequest' when calling" + + " deleteVariables(Async)"); + } + + return deleteVariablesCall(deleteVariablesRequest, _callback); + } + + /** + * Delete variable(s) Version: 26.4.0.cl or later Allows deleting multiple variables from + * ThoughtSpot. Requires ADMINISTRATION role and TENANT scope. The CAN_MANAGE_VARIABLES + * permission allows you to manage Formula Variables in the current organization scope. The API + * endpoint requires: * The variable identifiers (IDs or names) The operation will fail if: * + * The user lacks required permissions * Any of the variables don't exist * Any of the + * variables are being used by other objects + * + * @param deleteVariablesRequest (required) + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the + * response body + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
204 Deletion of variable(s) is successful. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public void deleteVariables(DeleteVariablesRequest deleteVariablesRequest) throws ApiException { + deleteVariablesWithHttpInfo(deleteVariablesRequest); + } + + /** + * Delete variable(s) Version: 26.4.0.cl or later Allows deleting multiple variables from + * ThoughtSpot. Requires ADMINISTRATION role and TENANT scope. The CAN_MANAGE_VARIABLES + * permission allows you to manage Formula Variables in the current organization scope. The API + * endpoint requires: * The variable identifiers (IDs or names) The operation will fail if: * + * The user lacks required permissions * Any of the variables don't exist * Any of the + * variables are being used by other objects + * + * @param deleteVariablesRequest (required) + * @return ApiResponse<Void> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the + * response body + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
204 Deletion of variable(s) is successful. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public ApiResponse deleteVariablesWithHttpInfo( + DeleteVariablesRequest deleteVariablesRequest) throws ApiException { + okhttp3.Call localVarCall = deleteVariablesValidateBeforeCall(deleteVariablesRequest, null); + return localVarApiClient.execute(localVarCall); + } + + /** + * (asynchronously) Delete variable(s) Version: 26.4.0.cl or later Allows deleting multiple + * variables from ThoughtSpot. Requires ADMINISTRATION role and TENANT scope. The + * CAN_MANAGE_VARIABLES permission allows you to manage Formula Variables in the current + * organization scope. The API endpoint requires: * The variable identifiers (IDs or names) The + * operation will fail if: * The user lacks required permissions * Any of the variables + * don't exist * Any of the variables are being used by other objects + * + * @param deleteVariablesRequest (required) + * @param _callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body + * object + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
204 Deletion of variable(s) is successful. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public okhttp3.Call deleteVariablesAsync( + DeleteVariablesRequest deleteVariablesRequest, final ApiCallback _callback) + throws ApiException { + + okhttp3.Call localVarCall = + deleteVariablesValidateBeforeCall(deleteVariablesRequest, _callback); + localVarApiClient.executeAsync(localVarCall, _callback); + return localVarCall; + } + /** + * Build call for deleteWebhookConfigurations + * + * @param deleteWebhookConfigurationsRequest (required) + * @param _callback Callback for upload/download progress + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 Webhook configurations deleted successfully -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public okhttp3.Call deleteWebhookConfigurationsCall( + DeleteWebhookConfigurationsRequest deleteWebhookConfigurationsRequest, + final ApiCallback _callback) + throws ApiException { + String basePath = null; + // Operation Servers + String[] localBasePaths = new String[] {}; + + // Determine Base Path to Use + if (localCustomBaseUrl != null) { + basePath = localCustomBaseUrl; + } else if (localBasePaths.length > 0) { + basePath = localBasePaths[localHostIndex]; + } else { + basePath = null; + } + + Object localVarPostBody = deleteWebhookConfigurationsRequest; + + // create path and map variables + String localVarPath = "/api/rest/2.0/webhooks/delete"; + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + final String[] localVarAccepts = {"application/json"}; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = {"application/json"}; + final String localVarContentType = + localVarApiClient.selectHeaderContentType(localVarContentTypes); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } + + String[] localVarAuthNames = new String[] {"bearerAuth"}; + return localVarApiClient.buildCall( + basePath, + localVarPath, + "POST", + localVarQueryParams, + localVarCollectionQueryParams, + localVarPostBody, + localVarHeaderParams, + localVarCookieParams, + localVarFormParams, + localVarAuthNames, + _callback); + } + + @SuppressWarnings("rawtypes") + private okhttp3.Call deleteWebhookConfigurationsValidateBeforeCall( + DeleteWebhookConfigurationsRequest deleteWebhookConfigurationsRequest, + final ApiCallback _callback) + throws ApiException { + // verify the required parameter 'deleteWebhookConfigurationsRequest' is set + if (deleteWebhookConfigurationsRequest == null) { + throw new ApiException( + "Missing the required parameter 'deleteWebhookConfigurationsRequest' when" + + " calling deleteWebhookConfigurations(Async)"); + } + + return deleteWebhookConfigurationsCall(deleteWebhookConfigurationsRequest, _callback); + } + + /** + * Version: 10.14.0.cl or later Deletes one or more webhook configurations by their unique id or + * name. Returns status of each deletion operation, including successfully deleted webhooks and + * any failures with error details. Requires `ADMINISTRATION` (**Can administer + * ThoughtSpot**) or `DEVELOPER` (**Has developer privilege**) privilege. If + * [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled + * on your instance, users with `CAN_MANAGE_WEBHOOKS` (**Can manage webhooks**) + * privilege are also authorized to perform this action. + * + * @param deleteWebhookConfigurationsRequest (required) + * @return WebhookDeleteResponse + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the + * response body + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 Webhook configurations deleted successfully -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public WebhookDeleteResponse deleteWebhookConfigurations( + DeleteWebhookConfigurationsRequest deleteWebhookConfigurationsRequest) + throws ApiException { + ApiResponse localVarResp = + deleteWebhookConfigurationsWithHttpInfo(deleteWebhookConfigurationsRequest); + return localVarResp.getData(); + } + + /** + * Version: 10.14.0.cl or later Deletes one or more webhook configurations by their unique id or + * name. Returns status of each deletion operation, including successfully deleted webhooks and + * any failures with error details. Requires `ADMINISTRATION` (**Can administer + * ThoughtSpot**) or `DEVELOPER` (**Has developer privilege**) privilege. If + * [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled + * on your instance, users with `CAN_MANAGE_WEBHOOKS` (**Can manage webhooks**) + * privilege are also authorized to perform this action. + * + * @param deleteWebhookConfigurationsRequest (required) + * @return ApiResponse<WebhookDeleteResponse> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the + * response body + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 Webhook configurations deleted successfully -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public ApiResponse deleteWebhookConfigurationsWithHttpInfo( + DeleteWebhookConfigurationsRequest deleteWebhookConfigurationsRequest) + throws ApiException { + okhttp3.Call localVarCall = + deleteWebhookConfigurationsValidateBeforeCall( + deleteWebhookConfigurationsRequest, null); + Type localVarReturnType = new TypeToken() {}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); + } + + /** + * (asynchronously) Version: 10.14.0.cl or later Deletes one or more webhook configurations by + * their unique id or name. Returns status of each deletion operation, including successfully + * deleted webhooks and any failures with error details. Requires `ADMINISTRATION` + * (**Can administer ThoughtSpot**) or `DEVELOPER` (**Has developer privilege**) + * privilege. If [Role-Based Access Control + * (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, users with + * `CAN_MANAGE_WEBHOOKS` (**Can manage webhooks**) privilege are also authorized to + * perform this action. + * + * @param deleteWebhookConfigurationsRequest (required) + * @param _callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body + * object + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 Webhook configurations deleted successfully -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public okhttp3.Call deleteWebhookConfigurationsAsync( + DeleteWebhookConfigurationsRequest deleteWebhookConfigurationsRequest, + final ApiCallback _callback) + throws ApiException { + + okhttp3.Call localVarCall = + deleteWebhookConfigurationsValidateBeforeCall( + deleteWebhookConfigurationsRequest, _callback); + Type localVarReturnType = new TypeToken() {}.getType(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; + } + /** + * Build call for deployCommit + * + * @param deployCommitRequest (required) + * @param _callback Callback for upload/download progress + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 Successfully deployed the changes -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public okhttp3.Call deployCommitCall( + DeployCommitRequest deployCommitRequest, final ApiCallback _callback) + throws ApiException { + String basePath = null; + // Operation Servers + String[] localBasePaths = new String[] {}; + + // Determine Base Path to Use + if (localCustomBaseUrl != null) { + basePath = localCustomBaseUrl; + } else if (localBasePaths.length > 0) { + basePath = localBasePaths[localHostIndex]; + } else { + basePath = null; + } + + Object localVarPostBody = deployCommitRequest; + + // create path and map variables + String localVarPath = "/api/rest/2.0/vcs/git/commits/deploy"; + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + final String[] localVarAccepts = {"application/json"}; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = {"application/json"}; + final String localVarContentType = + localVarApiClient.selectHeaderContentType(localVarContentTypes); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } + + String[] localVarAuthNames = new String[] {"bearerAuth"}; + return localVarApiClient.buildCall( + basePath, + localVarPath, + "POST", + localVarQueryParams, + localVarCollectionQueryParams, + localVarPostBody, + localVarHeaderParams, + localVarCookieParams, + localVarFormParams, + localVarAuthNames, + _callback); + } + + @SuppressWarnings("rawtypes") + private okhttp3.Call deployCommitValidateBeforeCall( + DeployCommitRequest deployCommitRequest, final ApiCallback _callback) + throws ApiException { + // verify the required parameter 'deployCommitRequest' is set + if (deployCommitRequest == null) { + throw new ApiException( + "Missing the required parameter 'deployCommitRequest' when calling" + + " deployCommit(Async)"); + } + + return deployCommitCall(deployCommitRequest, _callback); + } + + /** + * Version: 9.2.0.cl or later Allows you to deploy a commit and publish TML content to your + * ThoughtSpot instance. Requires at least edit access to the objects used in the deploy + * operation. The API deploys the head of the branch unless a `commit_id` is specified + * in the API request. If the branch name is not defined in the request, the default branch is + * considered for deploying commits. For more information, see [Git integration + * documentation](https://developers.thoughtspot.com/docs/git-integration). + * + * @param deployCommitRequest (required) + * @return List<DeployResponse> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the + * response body + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 Successfully deployed the changes -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public List deployCommit(DeployCommitRequest deployCommitRequest) + throws ApiException { + ApiResponse> localVarResp = + deployCommitWithHttpInfo(deployCommitRequest); + return localVarResp.getData(); + } + + /** + * Version: 9.2.0.cl or later Allows you to deploy a commit and publish TML content to your + * ThoughtSpot instance. Requires at least edit access to the objects used in the deploy + * operation. The API deploys the head of the branch unless a `commit_id` is specified + * in the API request. If the branch name is not defined in the request, the default branch is + * considered for deploying commits. For more information, see [Git integration + * documentation](https://developers.thoughtspot.com/docs/git-integration). + * + * @param deployCommitRequest (required) + * @return ApiResponse<List<DeployResponse>> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the + * response body + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 Successfully deployed the changes -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public ApiResponse> deployCommitWithHttpInfo( + DeployCommitRequest deployCommitRequest) throws ApiException { + okhttp3.Call localVarCall = deployCommitValidateBeforeCall(deployCommitRequest, null); + Type localVarReturnType = new TypeToken>() {}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); + } + + /** + * (asynchronously) Version: 9.2.0.cl or later Allows you to deploy a commit and publish TML + * content to your ThoughtSpot instance. Requires at least edit access to the objects used in + * the deploy operation. The API deploys the head of the branch unless a `commit_id` + * is specified in the API request. If the branch name is not defined in the request, the + * default branch is considered for deploying commits. For more information, see [Git + * integration documentation](https://developers.thoughtspot.com/docs/git-integration). + * + * @param deployCommitRequest (required) + * @param _callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body + * object + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 Successfully deployed the changes -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public okhttp3.Call deployCommitAsync( + DeployCommitRequest deployCommitRequest, + final ApiCallback> _callback) + throws ApiException { + + okhttp3.Call localVarCall = deployCommitValidateBeforeCall(deployCommitRequest, _callback); + Type localVarReturnType = new TypeToken>() {}.getType(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; + } + /** + * Build call for downloadConnectionMetadataChanges + * + * @param connectionIdentifier GUID of the connection (required) + * @param _callback Callback for upload/download progress + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 Export metadata changes. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public okhttp3.Call downloadConnectionMetadataChangesCall( + String connectionIdentifier, final ApiCallback _callback) throws ApiException { + String basePath = null; + // Operation Servers + String[] localBasePaths = new String[] {}; + + // Determine Base Path to Use + if (localCustomBaseUrl != null) { + basePath = localCustomBaseUrl; + } else if (localBasePaths.length > 0) { + basePath = localBasePaths[localHostIndex]; + } else { + basePath = null; + } + + Object localVarPostBody = null; + + // create path and map variables + String localVarPath = + "/api/rest/2.0/connections/download-connection-metadata-changes/{connection_identifier}" + .replace( + "{" + "connection_identifier" + "}", + localVarApiClient.escapeString(connectionIdentifier.toString())); + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + final String[] localVarAccepts = {"application/octet-stream", "application/json"}; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = {}; + final String localVarContentType = + localVarApiClient.selectHeaderContentType(localVarContentTypes); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } + + String[] localVarAuthNames = new String[] {"bearerAuth"}; + return localVarApiClient.buildCall( + basePath, + localVarPath, + "POST", + localVarQueryParams, + localVarCollectionQueryParams, + localVarPostBody, + localVarHeaderParams, + localVarCookieParams, + localVarFormParams, + localVarAuthNames, + _callback); + } + + @SuppressWarnings("rawtypes") + private okhttp3.Call downloadConnectionMetadataChangesValidateBeforeCall( + String connectionIdentifier, final ApiCallback _callback) throws ApiException { + // verify the required parameter 'connectionIdentifier' is set + if (connectionIdentifier == null) { + throw new ApiException( + "Missing the required parameter 'connectionIdentifier' when calling" + + " downloadConnectionMetadataChanges(Async)"); + } + + return downloadConnectionMetadataChangesCall(connectionIdentifier, _callback); + } + + /** + * Version: 9.9.0.cl or later Exports the difference in connection metadata between CDW and + * ThoughtSpot Requires `DATAMANAGEMENT` (**Can manage data**) privilege. If + * [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled + * on your instance, the following Data control privileges may be required: - + * `CAN_MANAGE_CUSTOM_CALENDAR`(**Can manage custom calendars**) - + * `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) - + * `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` (**Can manage data models**) To download the + * connection metadata difference between ThoughtSpot and CDW, pass the connection GUID as + * `connection_identifier` in the API request. + * + * @param connectionIdentifier GUID of the connection (required) + * @return File + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the + * response body + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 Export metadata changes. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public File downloadConnectionMetadataChanges(String connectionIdentifier) throws ApiException { + ApiResponse localVarResp = + downloadConnectionMetadataChangesWithHttpInfo(connectionIdentifier); + return localVarResp.getData(); + } + + /** + * Version: 9.9.0.cl or later Exports the difference in connection metadata between CDW and + * ThoughtSpot Requires `DATAMANAGEMENT` (**Can manage data**) privilege. If + * [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled + * on your instance, the following Data control privileges may be required: - + * `CAN_MANAGE_CUSTOM_CALENDAR`(**Can manage custom calendars**) - + * `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) - + * `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` (**Can manage data models**) To download the + * connection metadata difference between ThoughtSpot and CDW, pass the connection GUID as + * `connection_identifier` in the API request. + * + * @param connectionIdentifier GUID of the connection (required) + * @return ApiResponse<File> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the + * response body + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 Export metadata changes. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public ApiResponse downloadConnectionMetadataChangesWithHttpInfo( + String connectionIdentifier) throws ApiException { + okhttp3.Call localVarCall = + downloadConnectionMetadataChangesValidateBeforeCall(connectionIdentifier, null); + Type localVarReturnType = new TypeToken() {}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); + } + + /** + * (asynchronously) Version: 9.9.0.cl or later Exports the difference in connection metadata + * between CDW and ThoughtSpot Requires `DATAMANAGEMENT` (**Can manage data**) + * privilege. If [Role-Based Access Control + * (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the + * following Data control privileges may be required: - + * `CAN_MANAGE_CUSTOM_CALENDAR`(**Can manage custom calendars**) - + * `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) - + * `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` (**Can manage data models**) To download the + * connection metadata difference between ThoughtSpot and CDW, pass the connection GUID as + * `connection_identifier` in the API request. + * + * @param connectionIdentifier GUID of the connection (required) + * @param _callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body + * object + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 Export metadata changes. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public okhttp3.Call downloadConnectionMetadataChangesAsync( + String connectionIdentifier, final ApiCallback _callback) throws ApiException { + + okhttp3.Call localVarCall = + downloadConnectionMetadataChangesValidateBeforeCall( + connectionIdentifier, _callback); + Type localVarReturnType = new TypeToken() {}.getType(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; + } + /** + * Build call for exportAnswerReport + * + * @param exportAnswerReportRequest (required) + * @param _callback Callback for upload/download progress + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 Export report file of specified metadata object is successful. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public okhttp3.Call exportAnswerReportCall( + ExportAnswerReportRequest exportAnswerReportRequest, final ApiCallback _callback) + throws ApiException { + String basePath = null; + // Operation Servers + String[] localBasePaths = new String[] {}; + + // Determine Base Path to Use + if (localCustomBaseUrl != null) { + basePath = localCustomBaseUrl; + } else if (localBasePaths.length > 0) { + basePath = localBasePaths[localHostIndex]; + } else { + basePath = null; + } + + Object localVarPostBody = exportAnswerReportRequest; + + // create path and map variables + String localVarPath = "/api/rest/2.0/report/answer"; + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + final String[] localVarAccepts = {"application/octet-stream", "application/json"}; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = {"application/json"}; + final String localVarContentType = + localVarApiClient.selectHeaderContentType(localVarContentTypes); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } + + String[] localVarAuthNames = new String[] {"bearerAuth"}; + return localVarApiClient.buildCall( + basePath, + localVarPath, + "POST", + localVarQueryParams, + localVarCollectionQueryParams, + localVarPostBody, + localVarHeaderParams, + localVarCookieParams, + localVarFormParams, + localVarAuthNames, + _callback); + } + + @SuppressWarnings("rawtypes") + private okhttp3.Call exportAnswerReportValidateBeforeCall( + ExportAnswerReportRequest exportAnswerReportRequest, final ApiCallback _callback) + throws ApiException { + // verify the required parameter 'exportAnswerReportRequest' is set + if (exportAnswerReportRequest == null) { + throw new ApiException( + "Missing the required parameter 'exportAnswerReportRequest' when calling" + + " exportAnswerReport(Async)"); + } + + return exportAnswerReportCall(exportAnswerReportRequest, _callback); + } + + /** + * Version: 9.0.0.cl or later Exports an Answer in the given file format. You can download the + * Answer data as a PDF, PNG, CSV, or XLSX file. Requires at least view access to the Answer. + * #### Usage guidelines In the request body, specify the GUID or name of the Answer and set + * `file_format`. The default file format is CSV. Use the `type` parameter + * to specify whether the Answer being exported is a saved Answer (`SAVED`) or a + * pinned Answer on a Liveboard (`PINNED`). Defaults to `SAVED`. When using + * `PINNED`, the `metadata_identifier` must be the container id. **NOTE**: * + * The downloadable file returned in API response file is extensionless. Please rename the + * downloaded file by typing in the relevant extension. * HTML rendering is not supported for + * PDF exports of Answers with tables. Optionally, you can define [runtime + * overrides](https://developers.thoughtspot.com/docs/fetch-data-and-report-apis#_runtime_overrides) + * to apply to the Answer data. + * + * @param exportAnswerReportRequest (required) + * @return File + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the + * response body + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 Export report file of specified metadata object is successful. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public File exportAnswerReport(ExportAnswerReportRequest exportAnswerReportRequest) + throws ApiException { + ApiResponse localVarResp = exportAnswerReportWithHttpInfo(exportAnswerReportRequest); + return localVarResp.getData(); + } + + /** + * Version: 9.0.0.cl or later Exports an Answer in the given file format. You can download the + * Answer data as a PDF, PNG, CSV, or XLSX file. Requires at least view access to the Answer. + * #### Usage guidelines In the request body, specify the GUID or name of the Answer and set + * `file_format`. The default file format is CSV. Use the `type` parameter + * to specify whether the Answer being exported is a saved Answer (`SAVED`) or a + * pinned Answer on a Liveboard (`PINNED`). Defaults to `SAVED`. When using + * `PINNED`, the `metadata_identifier` must be the container id. **NOTE**: * + * The downloadable file returned in API response file is extensionless. Please rename the + * downloaded file by typing in the relevant extension. * HTML rendering is not supported for + * PDF exports of Answers with tables. Optionally, you can define [runtime + * overrides](https://developers.thoughtspot.com/docs/fetch-data-and-report-apis#_runtime_overrides) + * to apply to the Answer data. + * + * @param exportAnswerReportRequest (required) + * @return ApiResponse<File> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the + * response body + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 Export report file of specified metadata object is successful. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public ApiResponse exportAnswerReportWithHttpInfo( + ExportAnswerReportRequest exportAnswerReportRequest) throws ApiException { + okhttp3.Call localVarCall = + exportAnswerReportValidateBeforeCall(exportAnswerReportRequest, null); + Type localVarReturnType = new TypeToken() {}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); + } + + /** + * (asynchronously) Version: 9.0.0.cl or later Exports an Answer in the given file format. You + * can download the Answer data as a PDF, PNG, CSV, or XLSX file. Requires at least view access + * to the Answer. #### Usage guidelines In the request body, specify the GUID or name of the + * Answer and set `file_format`. The default file format is CSV. Use the + * `type` parameter to specify whether the Answer being exported is a saved Answer + * (`SAVED`) or a pinned Answer on a Liveboard (`PINNED`). Defaults to + * `SAVED`. When using `PINNED`, the `metadata_identifier` must be + * the container id. **NOTE**: * The downloadable file returned in API response file is + * extensionless. Please rename the downloaded file by typing in the relevant extension. * HTML + * rendering is not supported for PDF exports of Answers with tables. Optionally, you can define + * [runtime + * overrides](https://developers.thoughtspot.com/docs/fetch-data-and-report-apis#_runtime_overrides) + * to apply to the Answer data. + * + * @param exportAnswerReportRequest (required) + * @param _callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body + * object + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 Export report file of specified metadata object is successful. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public okhttp3.Call exportAnswerReportAsync( + ExportAnswerReportRequest exportAnswerReportRequest, final ApiCallback _callback) + throws ApiException { + + okhttp3.Call localVarCall = + exportAnswerReportValidateBeforeCall(exportAnswerReportRequest, _callback); + Type localVarReturnType = new TypeToken() {}.getType(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; + } + /** + * Build call for exportLiveboardReport + * + * @param exportLiveboardReportRequest (required) + * @param _callback Callback for upload/download progress + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 Export report file of specified metadata object is successful. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public okhttp3.Call exportLiveboardReportCall( + ExportLiveboardReportRequest exportLiveboardReportRequest, final ApiCallback _callback) + throws ApiException { + String basePath = null; + // Operation Servers + String[] localBasePaths = new String[] {}; + + // Determine Base Path to Use + if (localCustomBaseUrl != null) { + basePath = localCustomBaseUrl; + } else if (localBasePaths.length > 0) { + basePath = localBasePaths[localHostIndex]; + } else { + basePath = null; + } + + Object localVarPostBody = exportLiveboardReportRequest; + + // create path and map variables + String localVarPath = "/api/rest/2.0/report/liveboard"; + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + final String[] localVarAccepts = {"application/octet-stream", "application/json"}; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = {"application/json"}; + final String localVarContentType = + localVarApiClient.selectHeaderContentType(localVarContentTypes); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } + + String[] localVarAuthNames = new String[] {"bearerAuth"}; + return localVarApiClient.buildCall( + basePath, + localVarPath, + "POST", + localVarQueryParams, + localVarCollectionQueryParams, + localVarPostBody, + localVarHeaderParams, + localVarCookieParams, + localVarFormParams, + localVarAuthNames, + _callback); + } + + @SuppressWarnings("rawtypes") + private okhttp3.Call exportLiveboardReportValidateBeforeCall( + ExportLiveboardReportRequest exportLiveboardReportRequest, final ApiCallback _callback) + throws ApiException { + // verify the required parameter 'exportLiveboardReportRequest' is set + if (exportLiveboardReportRequest == null) { + throw new ApiException( + "Missing the required parameter 'exportLiveboardReportRequest' when calling" + + " exportLiveboardReport(Async)"); + } + + return exportLiveboardReportCall(exportLiveboardReportRequest, _callback); + } + + /** + * Version: 9.0.0.cl or later Exports a Liveboard and its visualizations in PDF, PNG, CSV, or + * XLSX file format. The default `file_format` is CSV. Requires at least view access + * to the Liveboard. #### Usage guidelines In the request body, specify the GUID or name of the + * Liveboard. To generate a Liveboard report with specific visualizations, add GUIDs or names of + * the visualizations. **NOTE**: * The downloadable file returned in API response file is + * extensionless. Please rename the downloaded file by typing in the relevant extension. * + * Optionally, you can define [runtime + * overrides](https://developers.thoughtspot.com/docs/fetch-data-and-report-apis#_runtime_overrides) + * to apply to the Answer data. * To include unsaved changes in the report, pass the + * `transient_pinboard_content` script generated from the + * `getExportRequestForCurrentPinboard` method in the Visual Embed SDK. Upon + * successful execution, the API returns the report with unsaved changes, including ad hoc + * changes to visualizations. For more information, see [Liveboard Report + * API](https://developers.thoughtspot.com/docs/fetch-data-and-report-apis#_liveboard_report_api). + * * Starting with ThoughtSpot Cloud 10.9.0.cl release, the Liveboard can be exported in the PNG + * format in the resolution of your choice. To enable this on your instance, contact ThoughtSpot + * support. When this feature is enabled, the options + * `include_cover_page`,`include_filter_page` within the + * `png_options` will not be available for PNG exports. * Starting with the + * ThoughtSpot Cloud 26.2.0.cl release, * Liveboards can be exported in CSV format. * All + * visualizations within a Liveboard can be exported as individual CSV files. * When exporting + * multiple visualizations or the entire Liveboard, the system returns the report as a + * compressed ZIP file containing the separate CSV files for each visualization. * Liveboards + * can also be exported in XLSX format. * All selected visualizations are consolidated into a + * single Excel workbook (.xlsx), with each visualization placed in its own worksheet (tab). * + * XLSX exports are limited to a maximum of 255 worksheets (tabs) per workbook. + * + * @param exportLiveboardReportRequest (required) + * @return File + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the + * response body + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 Export report file of specified metadata object is successful. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public File exportLiveboardReport(ExportLiveboardReportRequest exportLiveboardReportRequest) + throws ApiException { + ApiResponse localVarResp = + exportLiveboardReportWithHttpInfo(exportLiveboardReportRequest); + return localVarResp.getData(); + } + + /** + * Version: 9.0.0.cl or later Exports a Liveboard and its visualizations in PDF, PNG, CSV, or + * XLSX file format. The default `file_format` is CSV. Requires at least view access + * to the Liveboard. #### Usage guidelines In the request body, specify the GUID or name of the + * Liveboard. To generate a Liveboard report with specific visualizations, add GUIDs or names of + * the visualizations. **NOTE**: * The downloadable file returned in API response file is + * extensionless. Please rename the downloaded file by typing in the relevant extension. * + * Optionally, you can define [runtime + * overrides](https://developers.thoughtspot.com/docs/fetch-data-and-report-apis#_runtime_overrides) + * to apply to the Answer data. * To include unsaved changes in the report, pass the + * `transient_pinboard_content` script generated from the + * `getExportRequestForCurrentPinboard` method in the Visual Embed SDK. Upon + * successful execution, the API returns the report with unsaved changes, including ad hoc + * changes to visualizations. For more information, see [Liveboard Report + * API](https://developers.thoughtspot.com/docs/fetch-data-and-report-apis#_liveboard_report_api). + * * Starting with ThoughtSpot Cloud 10.9.0.cl release, the Liveboard can be exported in the PNG + * format in the resolution of your choice. To enable this on your instance, contact ThoughtSpot + * support. When this feature is enabled, the options + * `include_cover_page`,`include_filter_page` within the + * `png_options` will not be available for PNG exports. * Starting with the + * ThoughtSpot Cloud 26.2.0.cl release, * Liveboards can be exported in CSV format. * All + * visualizations within a Liveboard can be exported as individual CSV files. * When exporting + * multiple visualizations or the entire Liveboard, the system returns the report as a + * compressed ZIP file containing the separate CSV files for each visualization. * Liveboards + * can also be exported in XLSX format. * All selected visualizations are consolidated into a + * single Excel workbook (.xlsx), with each visualization placed in its own worksheet (tab). * + * XLSX exports are limited to a maximum of 255 worksheets (tabs) per workbook. + * + * @param exportLiveboardReportRequest (required) + * @return ApiResponse<File> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the + * response body + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 Export report file of specified metadata object is successful. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public ApiResponse exportLiveboardReportWithHttpInfo( + ExportLiveboardReportRequest exportLiveboardReportRequest) throws ApiException { + okhttp3.Call localVarCall = + exportLiveboardReportValidateBeforeCall(exportLiveboardReportRequest, null); + Type localVarReturnType = new TypeToken() {}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); + } + + /** + * (asynchronously) Version: 9.0.0.cl or later Exports a Liveboard and its visualizations in + * PDF, PNG, CSV, or XLSX file format. The default `file_format` is CSV. Requires at + * least view access to the Liveboard. #### Usage guidelines In the request body, specify the + * GUID or name of the Liveboard. To generate a Liveboard report with specific visualizations, + * add GUIDs or names of the visualizations. **NOTE**: * The downloadable file returned in API + * response file is extensionless. Please rename the downloaded file by typing in the relevant + * extension. * Optionally, you can define [runtime + * overrides](https://developers.thoughtspot.com/docs/fetch-data-and-report-apis#_runtime_overrides) + * to apply to the Answer data. * To include unsaved changes in the report, pass the + * `transient_pinboard_content` script generated from the + * `getExportRequestForCurrentPinboard` method in the Visual Embed SDK. Upon + * successful execution, the API returns the report with unsaved changes, including ad hoc + * changes to visualizations. For more information, see [Liveboard Report + * API](https://developers.thoughtspot.com/docs/fetch-data-and-report-apis#_liveboard_report_api). + * * Starting with ThoughtSpot Cloud 10.9.0.cl release, the Liveboard can be exported in the PNG + * format in the resolution of your choice. To enable this on your instance, contact ThoughtSpot + * support. When this feature is enabled, the options + * `include_cover_page`,`include_filter_page` within the + * `png_options` will not be available for PNG exports. * Starting with the + * ThoughtSpot Cloud 26.2.0.cl release, * Liveboards can be exported in CSV format. * All + * visualizations within a Liveboard can be exported as individual CSV files. * When exporting + * multiple visualizations or the entire Liveboard, the system returns the report as a + * compressed ZIP file containing the separate CSV files for each visualization. * Liveboards + * can also be exported in XLSX format. * All selected visualizations are consolidated into a + * single Excel workbook (.xlsx), with each visualization placed in its own worksheet (tab). * + * XLSX exports are limited to a maximum of 255 worksheets (tabs) per workbook. + * + * @param exportLiveboardReportRequest (required) + * @param _callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body + * object + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 Export report file of specified metadata object is successful. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public okhttp3.Call exportLiveboardReportAsync( + ExportLiveboardReportRequest exportLiveboardReportRequest, + final ApiCallback _callback) + throws ApiException { + + okhttp3.Call localVarCall = + exportLiveboardReportValidateBeforeCall(exportLiveboardReportRequest, _callback); + Type localVarReturnType = new TypeToken() {}.getType(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; + } + /** + * Build call for exportMetadataTML + * + * @param exportMetadataTMLRequest (required) + * @param _callback Callback for upload/download progress + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 Export TMLs of specified metadata objects is successful. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public okhttp3.Call exportMetadataTMLCall( + ExportMetadataTMLRequest exportMetadataTMLRequest, final ApiCallback _callback) + throws ApiException { + String basePath = null; + // Operation Servers + String[] localBasePaths = new String[] {}; + + // Determine Base Path to Use + if (localCustomBaseUrl != null) { + basePath = localCustomBaseUrl; + } else if (localBasePaths.length > 0) { + basePath = localBasePaths[localHostIndex]; + } else { + basePath = null; + } + + Object localVarPostBody = exportMetadataTMLRequest; + + // create path and map variables + String localVarPath = "/api/rest/2.0/metadata/tml/export"; + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + final String[] localVarAccepts = {"application/json"}; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = {"application/json"}; + final String localVarContentType = + localVarApiClient.selectHeaderContentType(localVarContentTypes); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } + + String[] localVarAuthNames = new String[] {"bearerAuth"}; + return localVarApiClient.buildCall( + basePath, + localVarPath, + "POST", + localVarQueryParams, + localVarCollectionQueryParams, + localVarPostBody, + localVarHeaderParams, + localVarCookieParams, + localVarFormParams, + localVarAuthNames, + _callback); + } + + @SuppressWarnings("rawtypes") + private okhttp3.Call exportMetadataTMLValidateBeforeCall( + ExportMetadataTMLRequest exportMetadataTMLRequest, final ApiCallback _callback) + throws ApiException { + // verify the required parameter 'exportMetadataTMLRequest' is set + if (exportMetadataTMLRequest == null) { + throw new ApiException( + "Missing the required parameter 'exportMetadataTMLRequest' when calling" + + " exportMetadataTML(Async)"); + } + + return exportMetadataTMLCall(exportMetadataTMLRequest, _callback); + } + + /** + * Version: 9.0.0.cl or later Exports the [TML](https://docs.thoughtspot.com/cloud/latest/tml) + * representation of metadata objects in JSON or YAML format. Requires + * `DATADOWNLOADING` (**Can download Data**) and at least view access to the metadata + * object. #### Usage guidelines * You can export one or several objects by passing metadata + * object GUIDs in the `metadata` array. * When exporting TML content for a Liveboard + * or Answer object, you can set `export_associated` to `true` to retrieve + * TML content for underlying Worksheets, Tables, or Views, including the GUID of each object + * within the headers. When `export_associated` is set to `true`, consider + * retrieving one metadata object at a time. * Set `export_fqns` to `true` + * to add FQNs of the referenced objects in the TML content. For example, if you send an API + * request to retrieve TML for a Liveboard and its associated objects, the API returns the TML + * content with FQNs of the referenced Worksheet. Exporting TML with FQNs is useful if + * ThoughtSpot has multiple objects with the same name and you want to eliminate ambiguity when + * importing TML files into ThoughtSpot. It eliminates the need for adding FQNs of the + * referenced objects manually during the import operation. * To export only the TML of + * feedbacks associated with an object, set the GUID of the object as `identifier`, + * and set the `type` as `FEEDBACK` in the `metadata` array. * To + * export the TML of an object along with the feedbacks associated with it, set the GUID of the + * object as `identifier`, set the `type` as `LOGIAL_TABLE` in the + * `metadata` array, and set `export_with_associated_feedbacks` in + * `export_options` to true. For more information, see [TML + * Documentation](https://developers.thoughtspot.com/docs/tml#_export_a_tml). For more + * information on feedbacks, see [Feedback + * Documentation](https://docs.thoughtspot.com/cloud/latest/sage-feedback). + * + * @param exportMetadataTMLRequest (required) + * @return List<Object> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the + * response body + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 Export TMLs of specified metadata objects is successful. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public List exportMetadataTML(ExportMetadataTMLRequest exportMetadataTMLRequest) + throws ApiException { + ApiResponse> localVarResp = + exportMetadataTMLWithHttpInfo(exportMetadataTMLRequest); + return localVarResp.getData(); + } + + /** + * Version: 9.0.0.cl or later Exports the [TML](https://docs.thoughtspot.com/cloud/latest/tml) + * representation of metadata objects in JSON or YAML format. Requires + * `DATADOWNLOADING` (**Can download Data**) and at least view access to the metadata + * object. #### Usage guidelines * You can export one or several objects by passing metadata + * object GUIDs in the `metadata` array. * When exporting TML content for a Liveboard + * or Answer object, you can set `export_associated` to `true` to retrieve + * TML content for underlying Worksheets, Tables, or Views, including the GUID of each object + * within the headers. When `export_associated` is set to `true`, consider + * retrieving one metadata object at a time. * Set `export_fqns` to `true` + * to add FQNs of the referenced objects in the TML content. For example, if you send an API + * request to retrieve TML for a Liveboard and its associated objects, the API returns the TML + * content with FQNs of the referenced Worksheet. Exporting TML with FQNs is useful if + * ThoughtSpot has multiple objects with the same name and you want to eliminate ambiguity when + * importing TML files into ThoughtSpot. It eliminates the need for adding FQNs of the + * referenced objects manually during the import operation. * To export only the TML of + * feedbacks associated with an object, set the GUID of the object as `identifier`, + * and set the `type` as `FEEDBACK` in the `metadata` array. * To + * export the TML of an object along with the feedbacks associated with it, set the GUID of the + * object as `identifier`, set the `type` as `LOGIAL_TABLE` in the + * `metadata` array, and set `export_with_associated_feedbacks` in + * `export_options` to true. For more information, see [TML + * Documentation](https://developers.thoughtspot.com/docs/tml#_export_a_tml). For more + * information on feedbacks, see [Feedback + * Documentation](https://docs.thoughtspot.com/cloud/latest/sage-feedback). + * + * @param exportMetadataTMLRequest (required) + * @return ApiResponse<List<Object>> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the + * response body + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 Export TMLs of specified metadata objects is successful. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public ApiResponse> exportMetadataTMLWithHttpInfo( + ExportMetadataTMLRequest exportMetadataTMLRequest) throws ApiException { + okhttp3.Call localVarCall = + exportMetadataTMLValidateBeforeCall(exportMetadataTMLRequest, null); + Type localVarReturnType = new TypeToken>() {}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); + } + + /** + * (asynchronously) Version: 9.0.0.cl or later Exports the + * [TML](https://docs.thoughtspot.com/cloud/latest/tml) representation of metadata objects in + * JSON or YAML format. Requires `DATADOWNLOADING` (**Can download Data**) and at + * least view access to the metadata object. #### Usage guidelines * You can export one or + * several objects by passing metadata object GUIDs in the `metadata` array. * When + * exporting TML content for a Liveboard or Answer object, you can set + * `export_associated` to `true` to retrieve TML content for underlying + * Worksheets, Tables, or Views, including the GUID of each object within the headers. When + * `export_associated` is set to `true`, consider retrieving one metadata + * object at a time. * Set `export_fqns` to `true` to add FQNs of the + * referenced objects in the TML content. For example, if you send an API request to retrieve + * TML for a Liveboard and its associated objects, the API returns the TML content with FQNs of + * the referenced Worksheet. Exporting TML with FQNs is useful if ThoughtSpot has multiple + * objects with the same name and you want to eliminate ambiguity when importing TML files into + * ThoughtSpot. It eliminates the need for adding FQNs of the referenced objects manually during + * the import operation. * To export only the TML of feedbacks associated with an object, set + * the GUID of the object as `identifier`, and set the `type` as + * `FEEDBACK` in the `metadata` array. * To export the TML of an object + * along with the feedbacks associated with it, set the GUID of the object as + * `identifier`, set the `type` as `LOGIAL_TABLE` in the + * `metadata` array, and set `export_with_associated_feedbacks` in + * `export_options` to true. For more information, see [TML + * Documentation](https://developers.thoughtspot.com/docs/tml#_export_a_tml). For more + * information on feedbacks, see [Feedback + * Documentation](https://docs.thoughtspot.com/cloud/latest/sage-feedback). + * + * @param exportMetadataTMLRequest (required) + * @param _callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body + * object + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 Export TMLs of specified metadata objects is successful. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public okhttp3.Call exportMetadataTMLAsync( + ExportMetadataTMLRequest exportMetadataTMLRequest, + final ApiCallback> _callback) + throws ApiException { + + okhttp3.Call localVarCall = + exportMetadataTMLValidateBeforeCall(exportMetadataTMLRequest, _callback); + Type localVarReturnType = new TypeToken>() {}.getType(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; + } + /** + * Build call for exportMetadataTMLBatched + * + * @param exportMetadataTMLBatchedRequest (required) + * @param _callback Callback for upload/download progress + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 Export TMLs of specified metadata objects is successful. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public okhttp3.Call exportMetadataTMLBatchedCall( + ExportMetadataTMLBatchedRequest exportMetadataTMLBatchedRequest, + final ApiCallback _callback) + throws ApiException { + String basePath = null; + // Operation Servers + String[] localBasePaths = new String[] {}; + + // Determine Base Path to Use + if (localCustomBaseUrl != null) { + basePath = localCustomBaseUrl; + } else if (localBasePaths.length > 0) { + basePath = localBasePaths[localHostIndex]; + } else { + basePath = null; + } + + Object localVarPostBody = exportMetadataTMLBatchedRequest; + + // create path and map variables + String localVarPath = "/api/rest/2.0/metadata/tml/export/batch"; + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + final String[] localVarAccepts = {"application/json"}; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = {"application/json"}; + final String localVarContentType = + localVarApiClient.selectHeaderContentType(localVarContentTypes); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } + + String[] localVarAuthNames = new String[] {"bearerAuth"}; + return localVarApiClient.buildCall( + basePath, + localVarPath, + "POST", + localVarQueryParams, + localVarCollectionQueryParams, + localVarPostBody, + localVarHeaderParams, + localVarCookieParams, + localVarFormParams, + localVarAuthNames, + _callback); + } + + @SuppressWarnings("rawtypes") + private okhttp3.Call exportMetadataTMLBatchedValidateBeforeCall( + ExportMetadataTMLBatchedRequest exportMetadataTMLBatchedRequest, + final ApiCallback _callback) + throws ApiException { + // verify the required parameter 'exportMetadataTMLBatchedRequest' is set + if (exportMetadataTMLBatchedRequest == null) { + throw new ApiException( + "Missing the required parameter 'exportMetadataTMLBatchedRequest' when calling" + + " exportMetadataTMLBatched(Async)"); + } + + return exportMetadataTMLBatchedCall(exportMetadataTMLBatchedRequest, _callback); + } + + /** + * Version: 10.1.0.cl or later Exports the [TML](https://docs.thoughtspot.com/cloud/latest/tml) + * representation of metadata objects in JSON or YAML format. ### **Permissions Required** + * Requires `DATAMANAGEMENT` (**Can manage data**) and `USERMANAGEMENT` + * (**Can manage users**) privileges. #### **Usage Guidelines** This API is only applicable for + * `USER`, `GROUP`, and `ROLES` metadata types. - + * `batch_offset` Indicates the starting position within the complete dataset from + * which the API should begin returning objects. Useful for paginating results efficiently. - + * `batch_size` Specifies the number of objects or items to retrieve in a single + * request. Helps control response size for better performance. - `edoc_format` + * Defines the format of the TML content. The exported metadata can be in JSON or YAML format. - + * `export_dependent` Specifies whether to include dependent metadata objects in the + * export. Ensures related objects are also retrieved if needed. - `all_orgs_override` + * Indicates whether the export operation applies across all organizations. Useful for + * multi-tenant environments where cross-org exports are required. + * + * @param exportMetadataTMLBatchedRequest (required) + * @return Object + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the + * response body + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 Export TMLs of specified metadata objects is successful. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public Object exportMetadataTMLBatched( + ExportMetadataTMLBatchedRequest exportMetadataTMLBatchedRequest) throws ApiException { + ApiResponse localVarResp = + exportMetadataTMLBatchedWithHttpInfo(exportMetadataTMLBatchedRequest); + return localVarResp.getData(); + } + + /** + * Version: 10.1.0.cl or later Exports the [TML](https://docs.thoughtspot.com/cloud/latest/tml) + * representation of metadata objects in JSON or YAML format. ### **Permissions Required** + * Requires `DATAMANAGEMENT` (**Can manage data**) and `USERMANAGEMENT` + * (**Can manage users**) privileges. #### **Usage Guidelines** This API is only applicable for + * `USER`, `GROUP`, and `ROLES` metadata types. - + * `batch_offset` Indicates the starting position within the complete dataset from + * which the API should begin returning objects. Useful for paginating results efficiently. - + * `batch_size` Specifies the number of objects or items to retrieve in a single + * request. Helps control response size for better performance. - `edoc_format` + * Defines the format of the TML content. The exported metadata can be in JSON or YAML format. - + * `export_dependent` Specifies whether to include dependent metadata objects in the + * export. Ensures related objects are also retrieved if needed. - `all_orgs_override` + * Indicates whether the export operation applies across all organizations. Useful for + * multi-tenant environments where cross-org exports are required. + * + * @param exportMetadataTMLBatchedRequest (required) + * @return ApiResponse<Object> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the + * response body + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 Export TMLs of specified metadata objects is successful. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public ApiResponse exportMetadataTMLBatchedWithHttpInfo( + ExportMetadataTMLBatchedRequest exportMetadataTMLBatchedRequest) throws ApiException { + okhttp3.Call localVarCall = + exportMetadataTMLBatchedValidateBeforeCall(exportMetadataTMLBatchedRequest, null); + Type localVarReturnType = new TypeToken() {}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); + } + + /** + * (asynchronously) Version: 10.1.0.cl or later Exports the + * [TML](https://docs.thoughtspot.com/cloud/latest/tml) representation of metadata objects in + * JSON or YAML format. ### **Permissions Required** Requires `DATAMANAGEMENT` (**Can + * manage data**) and `USERMANAGEMENT` (**Can manage users**) privileges. #### **Usage + * Guidelines** This API is only applicable for `USER`, `GROUP`, and + * `ROLES` metadata types. - `batch_offset` Indicates the starting position + * within the complete dataset from which the API should begin returning objects. Useful for + * paginating results efficiently. - `batch_size` Specifies the number of objects or + * items to retrieve in a single request. Helps control response size for better performance. - + * `edoc_format` Defines the format of the TML content. The exported metadata can be + * in JSON or YAML format. - `export_dependent` Specifies whether to include dependent + * metadata objects in the export. Ensures related objects are also retrieved if needed. - + * `all_orgs_override` Indicates whether the export operation applies across all + * organizations. Useful for multi-tenant environments where cross-org exports are required. + * + * @param exportMetadataTMLBatchedRequest (required) + * @param _callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body + * object + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 Export TMLs of specified metadata objects is successful. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public okhttp3.Call exportMetadataTMLBatchedAsync( + ExportMetadataTMLBatchedRequest exportMetadataTMLBatchedRequest, + final ApiCallback _callback) + throws ApiException { + + okhttp3.Call localVarCall = + exportMetadataTMLBatchedValidateBeforeCall( + exportMetadataTMLBatchedRequest, _callback); + Type localVarReturnType = new TypeToken() {}.getType(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; + } + /** + * Build call for fetchAnswerData + * + * @param fetchAnswerDataRequest (required) + * @param _callback Callback for upload/download progress + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 Fetching data of specified metadata object is successful. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public okhttp3.Call fetchAnswerDataCall( + FetchAnswerDataRequest fetchAnswerDataRequest, final ApiCallback _callback) + throws ApiException { + String basePath = null; + // Operation Servers + String[] localBasePaths = new String[] {}; + + // Determine Base Path to Use + if (localCustomBaseUrl != null) { + basePath = localCustomBaseUrl; + } else if (localBasePaths.length > 0) { + basePath = localBasePaths[localHostIndex]; + } else { + basePath = null; + } + + Object localVarPostBody = fetchAnswerDataRequest; + + // create path and map variables + String localVarPath = "/api/rest/2.0/metadata/answer/data"; + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + final String[] localVarAccepts = {"application/json"}; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = {"application/json"}; + final String localVarContentType = + localVarApiClient.selectHeaderContentType(localVarContentTypes); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } + + String[] localVarAuthNames = new String[] {"bearerAuth"}; + return localVarApiClient.buildCall( + basePath, + localVarPath, + "POST", + localVarQueryParams, + localVarCollectionQueryParams, + localVarPostBody, + localVarHeaderParams, + localVarCookieParams, + localVarFormParams, + localVarAuthNames, + _callback); + } + + @SuppressWarnings("rawtypes") + private okhttp3.Call fetchAnswerDataValidateBeforeCall( + FetchAnswerDataRequest fetchAnswerDataRequest, final ApiCallback _callback) + throws ApiException { + // verify the required parameter 'fetchAnswerDataRequest' is set + if (fetchAnswerDataRequest == null) { + throw new ApiException( + "Missing the required parameter 'fetchAnswerDataRequest' when calling" + + " fetchAnswerData(Async)"); + } + + return fetchAnswerDataCall(fetchAnswerDataRequest, _callback); + } + + /** + * Version: 9.0.0.cl or later Fetches data from a saved Answer. Requires at least view access to + * the saved Answer. The `record_size` attribute determines the number of records to + * retrieve in an API call. For more information about pagination, record size, and maximum row + * limit, see [Pagination and record size + * settings](https://developers.thoughtspot.com/docs/fetch-data-and-report-apis#_pagination_settings_for_data_and_report_apis). + * + * @param fetchAnswerDataRequest (required) + * @return AnswerDataResponse + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the + * response body + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 Fetching data of specified metadata object is successful. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public AnswerDataResponse fetchAnswerData(FetchAnswerDataRequest fetchAnswerDataRequest) + throws ApiException { + ApiResponse localVarResp = + fetchAnswerDataWithHttpInfo(fetchAnswerDataRequest); + return localVarResp.getData(); + } + + /** + * Version: 9.0.0.cl or later Fetches data from a saved Answer. Requires at least view access to + * the saved Answer. The `record_size` attribute determines the number of records to + * retrieve in an API call. For more information about pagination, record size, and maximum row + * limit, see [Pagination and record size + * settings](https://developers.thoughtspot.com/docs/fetch-data-and-report-apis#_pagination_settings_for_data_and_report_apis). + * + * @param fetchAnswerDataRequest (required) + * @return ApiResponse<AnswerDataResponse> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the + * response body + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 Fetching data of specified metadata object is successful. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public ApiResponse fetchAnswerDataWithHttpInfo( + FetchAnswerDataRequest fetchAnswerDataRequest) throws ApiException { + okhttp3.Call localVarCall = fetchAnswerDataValidateBeforeCall(fetchAnswerDataRequest, null); + Type localVarReturnType = new TypeToken() {}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); + } + + /** + * (asynchronously) Version: 9.0.0.cl or later Fetches data from a saved Answer. Requires at + * least view access to the saved Answer. The `record_size` attribute determines the + * number of records to retrieve in an API call. For more information about pagination, record + * size, and maximum row limit, see [Pagination and record size + * settings](https://developers.thoughtspot.com/docs/fetch-data-and-report-apis#_pagination_settings_for_data_and_report_apis). + * + * @param fetchAnswerDataRequest (required) + * @param _callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body + * object + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 Fetching data of specified metadata object is successful. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public okhttp3.Call fetchAnswerDataAsync( + FetchAnswerDataRequest fetchAnswerDataRequest, + final ApiCallback _callback) + throws ApiException { + + okhttp3.Call localVarCall = + fetchAnswerDataValidateBeforeCall(fetchAnswerDataRequest, _callback); + Type localVarReturnType = new TypeToken() {}.getType(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; + } + /** + * Build call for fetchAnswerSqlQuery + * + * @param fetchAnswerSqlQueryRequest (required) + * @param _callback Callback for upload/download progress + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 Fetching SQL query of specified metadata object is successful. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public okhttp3.Call fetchAnswerSqlQueryCall( + FetchAnswerSqlQueryRequest fetchAnswerSqlQueryRequest, final ApiCallback _callback) + throws ApiException { + String basePath = null; + // Operation Servers + String[] localBasePaths = new String[] {}; + + // Determine Base Path to Use + if (localCustomBaseUrl != null) { + basePath = localCustomBaseUrl; + } else if (localBasePaths.length > 0) { + basePath = localBasePaths[localHostIndex]; + } else { + basePath = null; + } + + Object localVarPostBody = fetchAnswerSqlQueryRequest; + + // create path and map variables + String localVarPath = "/api/rest/2.0/metadata/answer/sql"; + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + final String[] localVarAccepts = {"application/json"}; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = {"application/json"}; + final String localVarContentType = + localVarApiClient.selectHeaderContentType(localVarContentTypes); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } + + String[] localVarAuthNames = new String[] {"bearerAuth"}; + return localVarApiClient.buildCall( + basePath, + localVarPath, + "POST", + localVarQueryParams, + localVarCollectionQueryParams, + localVarPostBody, + localVarHeaderParams, + localVarCookieParams, + localVarFormParams, + localVarAuthNames, + _callback); + } + + @SuppressWarnings("rawtypes") + private okhttp3.Call fetchAnswerSqlQueryValidateBeforeCall( + FetchAnswerSqlQueryRequest fetchAnswerSqlQueryRequest, final ApiCallback _callback) + throws ApiException { + // verify the required parameter 'fetchAnswerSqlQueryRequest' is set + if (fetchAnswerSqlQueryRequest == null) { + throw new ApiException( + "Missing the required parameter 'fetchAnswerSqlQueryRequest' when calling" + + " fetchAnswerSqlQuery(Async)"); + } + + return fetchAnswerSqlQueryCall(fetchAnswerSqlQueryRequest, _callback); + } + + /** + * Version: 9.0.0.cl or later Fetches the underlying SQL query data for an Answer object. + * Requires at least view access to the Answer object. Upon successful execution, the API + * returns the SQL queries for the specified object as shown in this example: ``` + * { \"metadata_id\":\"8fbe44a8-46ad-4b16-8d39-184b2fada490\", + * \"metadata_name\":\"Total sales\", + * \"metadata_type\":\"ANSWER\", \"sql_queries\":[ { + * \"metadata_id\":\"8fbe44a8-46ad-4b16-8d39-184b2fada490\", + * \"metadata_name\":\"Total sales -test\", + * \"sql_query\":\"SELECT \\n \\\"ta_1\\\".\\\"REGION\\\" + * \\\"ca_1\\\", \\n \\\"ta_2\\\".\\\"PRODUCTNAME\\\" + * \\\"ca_2\\\", \\n \\\"ta_1\\\".\\\"STORENAME\\\" + * \\\"ca_3\\\", \\n CASE\\n WHEN sum(\\\"ta_3\\\".\\\"SALES\\\") + * IS NOT NULL THEN sum(\\\"ta_3\\\".\\\"SALES\\\")\\n ELSE 0\\n END + * \\\"ca_4\\\", \\n CASE\\n WHEN + * sum(\\\"ta_3\\\".\\\"QUANTITYPURCHASED\\\") IS NOT NULL THEN + * sum(\\\"ta_3\\\".\\\"QUANTITYPURCHASED\\\")\\n ELSE 0\\n END + * \\\"ca_5\\\"\\nFROM + * \\\"RETAILAPPAREL\\\".\\\"PUBLIC\\\".\\\"FACT_RETAPP_SALES\\\" + * \\\"ta_3\\\"\\n JOIN + * \\\"RETAILAPPAREL\\\".\\\"PUBLIC\\\".\\\"DIM_RETAPP_STORES\\\" + * \\\"ta_1\\\"\\n ON \\\"ta_3\\\".\\\"STOREID\\\" = + * \\\"ta_1\\\".\\\"STOREID\\\"\\n JOIN + * \\\"RETAILAPPAREL\\\".\\\"PUBLIC\\\".\\\"DIM_RETAPP_PRODUCTS\\\" + * \\\"ta_2\\\"\\n ON \\\"ta_3\\\".\\\"PRODUCTID\\\" = + * \\\"ta_2\\\".\\\"PRODUCTID\\\"\\nGROUP BY \\n \\\"ca_1\\\", \\n + * \\\"ca_2\\\", \\n \\\"ca_3\\\"\\n\" } ] } ``` + * + * @param fetchAnswerSqlQueryRequest (required) + * @return SqlQueryResponse + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the + * response body + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 Fetching SQL query of specified metadata object is successful. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public SqlQueryResponse fetchAnswerSqlQuery( + FetchAnswerSqlQueryRequest fetchAnswerSqlQueryRequest) throws ApiException { + ApiResponse localVarResp = + fetchAnswerSqlQueryWithHttpInfo(fetchAnswerSqlQueryRequest); + return localVarResp.getData(); + } + + /** + * Version: 9.0.0.cl or later Fetches the underlying SQL query data for an Answer object. + * Requires at least view access to the Answer object. Upon successful execution, the API + * returns the SQL queries for the specified object as shown in this example: ``` + * { \"metadata_id\":\"8fbe44a8-46ad-4b16-8d39-184b2fada490\", + * \"metadata_name\":\"Total sales\", + * \"metadata_type\":\"ANSWER\", \"sql_queries\":[ { + * \"metadata_id\":\"8fbe44a8-46ad-4b16-8d39-184b2fada490\", + * \"metadata_name\":\"Total sales -test\", + * \"sql_query\":\"SELECT \\n \\\"ta_1\\\".\\\"REGION\\\" + * \\\"ca_1\\\", \\n \\\"ta_2\\\".\\\"PRODUCTNAME\\\" + * \\\"ca_2\\\", \\n \\\"ta_1\\\".\\\"STORENAME\\\" + * \\\"ca_3\\\", \\n CASE\\n WHEN sum(\\\"ta_3\\\".\\\"SALES\\\") + * IS NOT NULL THEN sum(\\\"ta_3\\\".\\\"SALES\\\")\\n ELSE 0\\n END + * \\\"ca_4\\\", \\n CASE\\n WHEN + * sum(\\\"ta_3\\\".\\\"QUANTITYPURCHASED\\\") IS NOT NULL THEN + * sum(\\\"ta_3\\\".\\\"QUANTITYPURCHASED\\\")\\n ELSE 0\\n END + * \\\"ca_5\\\"\\nFROM + * \\\"RETAILAPPAREL\\\".\\\"PUBLIC\\\".\\\"FACT_RETAPP_SALES\\\" + * \\\"ta_3\\\"\\n JOIN + * \\\"RETAILAPPAREL\\\".\\\"PUBLIC\\\".\\\"DIM_RETAPP_STORES\\\" + * \\\"ta_1\\\"\\n ON \\\"ta_3\\\".\\\"STOREID\\\" = + * \\\"ta_1\\\".\\\"STOREID\\\"\\n JOIN + * \\\"RETAILAPPAREL\\\".\\\"PUBLIC\\\".\\\"DIM_RETAPP_PRODUCTS\\\" + * \\\"ta_2\\\"\\n ON \\\"ta_3\\\".\\\"PRODUCTID\\\" = + * \\\"ta_2\\\".\\\"PRODUCTID\\\"\\nGROUP BY \\n \\\"ca_1\\\", \\n + * \\\"ca_2\\\", \\n \\\"ca_3\\\"\\n\" } ] } ``` + * + * @param fetchAnswerSqlQueryRequest (required) + * @return ApiResponse<SqlQueryResponse> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the + * response body + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 Fetching SQL query of specified metadata object is successful. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public ApiResponse fetchAnswerSqlQueryWithHttpInfo( + FetchAnswerSqlQueryRequest fetchAnswerSqlQueryRequest) throws ApiException { + okhttp3.Call localVarCall = + fetchAnswerSqlQueryValidateBeforeCall(fetchAnswerSqlQueryRequest, null); + Type localVarReturnType = new TypeToken() {}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); + } + + /** + * (asynchronously) Version: 9.0.0.cl or later Fetches the underlying SQL query data for an + * Answer object. Requires at least view access to the Answer object. Upon successful execution, + * the API returns the SQL queries for the specified object as shown in this example: + * ``` { + * \"metadata_id\":\"8fbe44a8-46ad-4b16-8d39-184b2fada490\", + * \"metadata_name\":\"Total sales\", + * \"metadata_type\":\"ANSWER\", \"sql_queries\":[ { + * \"metadata_id\":\"8fbe44a8-46ad-4b16-8d39-184b2fada490\", + * \"metadata_name\":\"Total sales -test\", + * \"sql_query\":\"SELECT \\n \\\"ta_1\\\".\\\"REGION\\\" + * \\\"ca_1\\\", \\n \\\"ta_2\\\".\\\"PRODUCTNAME\\\" + * \\\"ca_2\\\", \\n \\\"ta_1\\\".\\\"STORENAME\\\" + * \\\"ca_3\\\", \\n CASE\\n WHEN sum(\\\"ta_3\\\".\\\"SALES\\\") + * IS NOT NULL THEN sum(\\\"ta_3\\\".\\\"SALES\\\")\\n ELSE 0\\n END + * \\\"ca_4\\\", \\n CASE\\n WHEN + * sum(\\\"ta_3\\\".\\\"QUANTITYPURCHASED\\\") IS NOT NULL THEN + * sum(\\\"ta_3\\\".\\\"QUANTITYPURCHASED\\\")\\n ELSE 0\\n END + * \\\"ca_5\\\"\\nFROM + * \\\"RETAILAPPAREL\\\".\\\"PUBLIC\\\".\\\"FACT_RETAPP_SALES\\\" + * \\\"ta_3\\\"\\n JOIN + * \\\"RETAILAPPAREL\\\".\\\"PUBLIC\\\".\\\"DIM_RETAPP_STORES\\\" + * \\\"ta_1\\\"\\n ON \\\"ta_3\\\".\\\"STOREID\\\" = + * \\\"ta_1\\\".\\\"STOREID\\\"\\n JOIN + * \\\"RETAILAPPAREL\\\".\\\"PUBLIC\\\".\\\"DIM_RETAPP_PRODUCTS\\\" + * \\\"ta_2\\\"\\n ON \\\"ta_3\\\".\\\"PRODUCTID\\\" = + * \\\"ta_2\\\".\\\"PRODUCTID\\\"\\nGROUP BY \\n \\\"ca_1\\\", \\n + * \\\"ca_2\\\", \\n \\\"ca_3\\\"\\n\" } ] } ``` + * + * @param fetchAnswerSqlQueryRequest (required) + * @param _callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body + * object + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 Fetching SQL query of specified metadata object is successful. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public okhttp3.Call fetchAnswerSqlQueryAsync( + FetchAnswerSqlQueryRequest fetchAnswerSqlQueryRequest, + final ApiCallback _callback) + throws ApiException { + + okhttp3.Call localVarCall = + fetchAnswerSqlQueryValidateBeforeCall(fetchAnswerSqlQueryRequest, _callback); + Type localVarReturnType = new TypeToken() {}.getType(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; + } + /** + * Build call for fetchAsyncImportTaskStatus + * + * @param fetchAsyncImportTaskStatusRequest (required) + * @param _callback Callback for upload/download progress + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 Async TML Import Task statuses fetched successfully. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public okhttp3.Call fetchAsyncImportTaskStatusCall( + FetchAsyncImportTaskStatusRequest fetchAsyncImportTaskStatusRequest, + final ApiCallback _callback) + throws ApiException { + String basePath = null; + // Operation Servers + String[] localBasePaths = new String[] {}; + + // Determine Base Path to Use + if (localCustomBaseUrl != null) { + basePath = localCustomBaseUrl; + } else if (localBasePaths.length > 0) { + basePath = localBasePaths[localHostIndex]; + } else { + basePath = null; + } + + Object localVarPostBody = fetchAsyncImportTaskStatusRequest; + + // create path and map variables + String localVarPath = "/api/rest/2.0/metadata/tml/async/status"; + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + final String[] localVarAccepts = {"application/json"}; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = {"application/json"}; + final String localVarContentType = + localVarApiClient.selectHeaderContentType(localVarContentTypes); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } + + String[] localVarAuthNames = new String[] {"bearerAuth"}; + return localVarApiClient.buildCall( + basePath, + localVarPath, + "POST", + localVarQueryParams, + localVarCollectionQueryParams, + localVarPostBody, + localVarHeaderParams, + localVarCookieParams, + localVarFormParams, + localVarAuthNames, + _callback); + } + + @SuppressWarnings("rawtypes") + private okhttp3.Call fetchAsyncImportTaskStatusValidateBeforeCall( + FetchAsyncImportTaskStatusRequest fetchAsyncImportTaskStatusRequest, + final ApiCallback _callback) + throws ApiException { + // verify the required parameter 'fetchAsyncImportTaskStatusRequest' is set + if (fetchAsyncImportTaskStatusRequest == null) { + throw new ApiException( + "Missing the required parameter 'fetchAsyncImportTaskStatusRequest' when" + + " calling fetchAsyncImportTaskStatus(Async)"); + } + + return fetchAsyncImportTaskStatusCall(fetchAsyncImportTaskStatusRequest, _callback); + } + + /** + * Version: 10.4.0.cl or later Gets information about the status of the TML async import task + * scheduled using the `/api/rest/2.0/metadata/tml/async/import` API call. To fetch + * the task details, specify the ID of the TML async import task. Requires access to the task + * ID. The API allows users who initiated the asynchronous TML import via + * `/api/rest/2.0/metadata/tml/async/import` to view the status of their tasks. Users + * with administration privilege can view the status of all import tasks initiated by the users + * in their Org. #### Usage guidelines See [TML API + * Documentation](https://developers.thoughtspot.com/docs/tml#_fetch_status_of_the_tml_import_task) + * for usage guidelines. + * + * @param fetchAsyncImportTaskStatusRequest (required) + * @return GetAsyncImportStatusResponse + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the + * response body + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 Async TML Import Task statuses fetched successfully. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public GetAsyncImportStatusResponse fetchAsyncImportTaskStatus( + FetchAsyncImportTaskStatusRequest fetchAsyncImportTaskStatusRequest) + throws ApiException { + ApiResponse localVarResp = + fetchAsyncImportTaskStatusWithHttpInfo(fetchAsyncImportTaskStatusRequest); + return localVarResp.getData(); + } + + /** + * Version: 10.4.0.cl or later Gets information about the status of the TML async import task + * scheduled using the `/api/rest/2.0/metadata/tml/async/import` API call. To fetch + * the task details, specify the ID of the TML async import task. Requires access to the task + * ID. The API allows users who initiated the asynchronous TML import via + * `/api/rest/2.0/metadata/tml/async/import` to view the status of their tasks. Users + * with administration privilege can view the status of all import tasks initiated by the users + * in their Org. #### Usage guidelines See [TML API + * Documentation](https://developers.thoughtspot.com/docs/tml#_fetch_status_of_the_tml_import_task) + * for usage guidelines. + * + * @param fetchAsyncImportTaskStatusRequest (required) + * @return ApiResponse<GetAsyncImportStatusResponse> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the + * response body + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 Async TML Import Task statuses fetched successfully. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public ApiResponse fetchAsyncImportTaskStatusWithHttpInfo( + FetchAsyncImportTaskStatusRequest fetchAsyncImportTaskStatusRequest) + throws ApiException { + okhttp3.Call localVarCall = + fetchAsyncImportTaskStatusValidateBeforeCall( + fetchAsyncImportTaskStatusRequest, null); + Type localVarReturnType = new TypeToken() {}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); + } + + /** + * (asynchronously) Version: 10.4.0.cl or later Gets information about the status of the TML + * async import task scheduled using the `/api/rest/2.0/metadata/tml/async/import` API + * call. To fetch the task details, specify the ID of the TML async import task. Requires access + * to the task ID. The API allows users who initiated the asynchronous TML import via + * `/api/rest/2.0/metadata/tml/async/import` to view the status of their tasks. Users + * with administration privilege can view the status of all import tasks initiated by the users + * in their Org. #### Usage guidelines See [TML API + * Documentation](https://developers.thoughtspot.com/docs/tml#_fetch_status_of_the_tml_import_task) + * for usage guidelines. + * + * @param fetchAsyncImportTaskStatusRequest (required) + * @param _callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body + * object + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 Async TML Import Task statuses fetched successfully. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public okhttp3.Call fetchAsyncImportTaskStatusAsync( + FetchAsyncImportTaskStatusRequest fetchAsyncImportTaskStatusRequest, + final ApiCallback _callback) + throws ApiException { + + okhttp3.Call localVarCall = + fetchAsyncImportTaskStatusValidateBeforeCall( + fetchAsyncImportTaskStatusRequest, _callback); + Type localVarReturnType = new TypeToken() {}.getType(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; + } + /** + * Build call for fetchColumnSecurityRules + * + * @param fetchColumnSecurityRulesRequest (required) + * @param _callback Callback for upload/download progress + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 Successfully fetched column security rules -
400 Bad request - Table not found or invalid parameters -
401 Unauthorized access. -
403 Forbidden - User doesn't have permission to access security rules for this table -
500 Internal server error -
+ */ + public okhttp3.Call fetchColumnSecurityRulesCall( + FetchColumnSecurityRulesRequest fetchColumnSecurityRulesRequest, + final ApiCallback _callback) + throws ApiException { + String basePath = null; + // Operation Servers + String[] localBasePaths = new String[] {}; + + // Determine Base Path to Use + if (localCustomBaseUrl != null) { + basePath = localCustomBaseUrl; + } else if (localBasePaths.length > 0) { + basePath = localBasePaths[localHostIndex]; + } else { + basePath = null; + } + + Object localVarPostBody = fetchColumnSecurityRulesRequest; + + // create path and map variables + String localVarPath = "/api/rest/2.0/security/column/rules/fetch"; + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + final String[] localVarAccepts = {"application/json"}; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = {"application/json"}; + final String localVarContentType = + localVarApiClient.selectHeaderContentType(localVarContentTypes); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } + + String[] localVarAuthNames = new String[] {"bearerAuth"}; + return localVarApiClient.buildCall( + basePath, + localVarPath, + "POST", + localVarQueryParams, + localVarCollectionQueryParams, + localVarPostBody, + localVarHeaderParams, + localVarCookieParams, + localVarFormParams, + localVarAuthNames, + _callback); + } + + @SuppressWarnings("rawtypes") + private okhttp3.Call fetchColumnSecurityRulesValidateBeforeCall( + FetchColumnSecurityRulesRequest fetchColumnSecurityRulesRequest, + final ApiCallback _callback) + throws ApiException { + // verify the required parameter 'fetchColumnSecurityRulesRequest' is set + if (fetchColumnSecurityRulesRequest == null) { + throw new ApiException( + "Missing the required parameter 'fetchColumnSecurityRulesRequest' when calling" + + " fetchColumnSecurityRules(Async)"); + } + + return fetchColumnSecurityRulesCall(fetchColumnSecurityRulesRequest, _callback); + } + + /** + * Version: 10.12.0.cl or later Fetches column security rules for specified tables. This API + * endpoint retrieves column-level security rules configured for tables. It returns information + * about which columns are secured and which groups have access to those columns. #### Usage + * guidelines - Provide an array of table identifiers using either `identifier` (GUID + * or name) or `obj_identifier` (object ID) - At least one of `identifier` + * or `obj_identifier` must be provided for each table - The API returns column + * security rules for all specified tables - Users must have appropriate permissions to access + * security rules for the specified tables #### Required permissions - + * `ADMINISTRATION` - Can administer ThoughtSpot - `DATAMANAGEMENT` - Can + * manage data - `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` - Can manage worksheet views and + * tables #### Example request ```json { \"tables\": [ { + * \"identifier\": \"table-guid\", \"obj_identifier\": + * \"table-object-id\" } ] } ``` #### Response format The API returns + * an array of `ColumnSecurityRuleResponse` objects wrapped in a `data` + * field. Each `ColumnSecurityRuleResponse` object contains: - Table information (GUID + * and object ID) - Array of column security rules with column details, group access, and source + * table information #### Example response ```json { \"data\": [ { + * \"guid\": \"table-guid\", \"objId\": + * \"table-object-id\", \"columnSecurityRules\": [ { \"column\": { + * \"id\": \"col_123\", \"name\": \"Salary\" }, + * \"groups\": [ { \"id\": \"group_1\", \"name\": + * \"HR Department\" } ], \"sourceTableDetails\": { \"id\": + * \"source-table-guid\", \"name\": \"Employee_Data\" } } ] } ] } + * ``` + * + * @param fetchColumnSecurityRulesRequest (required) + * @return List<ColumnSecurityRuleResponse> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the + * response body + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 Successfully fetched column security rules -
400 Bad request - Table not found or invalid parameters -
401 Unauthorized access. -
403 Forbidden - User doesn't have permission to access security rules for this table -
500 Internal server error -
+ */ + public List fetchColumnSecurityRules( + FetchColumnSecurityRulesRequest fetchColumnSecurityRulesRequest) throws ApiException { + ApiResponse> localVarResp = + fetchColumnSecurityRulesWithHttpInfo(fetchColumnSecurityRulesRequest); + return localVarResp.getData(); + } + + /** + * Version: 10.12.0.cl or later Fetches column security rules for specified tables. This API + * endpoint retrieves column-level security rules configured for tables. It returns information + * about which columns are secured and which groups have access to those columns. #### Usage + * guidelines - Provide an array of table identifiers using either `identifier` (GUID + * or name) or `obj_identifier` (object ID) - At least one of `identifier` + * or `obj_identifier` must be provided for each table - The API returns column + * security rules for all specified tables - Users must have appropriate permissions to access + * security rules for the specified tables #### Required permissions - + * `ADMINISTRATION` - Can administer ThoughtSpot - `DATAMANAGEMENT` - Can + * manage data - `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` - Can manage worksheet views and + * tables #### Example request ```json { \"tables\": [ { + * \"identifier\": \"table-guid\", \"obj_identifier\": + * \"table-object-id\" } ] } ``` #### Response format The API returns + * an array of `ColumnSecurityRuleResponse` objects wrapped in a `data` + * field. Each `ColumnSecurityRuleResponse` object contains: - Table information (GUID + * and object ID) - Array of column security rules with column details, group access, and source + * table information #### Example response ```json { \"data\": [ { + * \"guid\": \"table-guid\", \"objId\": + * \"table-object-id\", \"columnSecurityRules\": [ { \"column\": { + * \"id\": \"col_123\", \"name\": \"Salary\" }, + * \"groups\": [ { \"id\": \"group_1\", \"name\": + * \"HR Department\" } ], \"sourceTableDetails\": { \"id\": + * \"source-table-guid\", \"name\": \"Employee_Data\" } } ] } ] } + * ``` + * + * @param fetchColumnSecurityRulesRequest (required) + * @return ApiResponse<List<ColumnSecurityRuleResponse>> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the + * response body + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 Successfully fetched column security rules -
400 Bad request - Table not found or invalid parameters -
401 Unauthorized access. -
403 Forbidden - User doesn't have permission to access security rules for this table -
500 Internal server error -
+ */ + public ApiResponse> fetchColumnSecurityRulesWithHttpInfo( + FetchColumnSecurityRulesRequest fetchColumnSecurityRulesRequest) throws ApiException { + okhttp3.Call localVarCall = + fetchColumnSecurityRulesValidateBeforeCall(fetchColumnSecurityRulesRequest, null); + Type localVarReturnType = new TypeToken>() {}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); + } + + /** + * (asynchronously) Version: 10.12.0.cl or later Fetches column security rules for specified + * tables. This API endpoint retrieves column-level security rules configured for tables. It + * returns information about which columns are secured and which groups have access to those + * columns. #### Usage guidelines - Provide an array of table identifiers using either + * `identifier` (GUID or name) or `obj_identifier` (object ID) - At least + * one of `identifier` or `obj_identifier` must be provided for each table - + * The API returns column security rules for all specified tables - Users must have appropriate + * permissions to access security rules for the specified tables #### Required permissions - + * `ADMINISTRATION` - Can administer ThoughtSpot - `DATAMANAGEMENT` - Can + * manage data - `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` - Can manage worksheet views and + * tables #### Example request ```json { \"tables\": [ { + * \"identifier\": \"table-guid\", \"obj_identifier\": + * \"table-object-id\" } ] } ``` #### Response format The API returns + * an array of `ColumnSecurityRuleResponse` objects wrapped in a `data` + * field. Each `ColumnSecurityRuleResponse` object contains: - Table information (GUID + * and object ID) - Array of column security rules with column details, group access, and source + * table information #### Example response ```json { \"data\": [ { + * \"guid\": \"table-guid\", \"objId\": + * \"table-object-id\", \"columnSecurityRules\": [ { \"column\": { + * \"id\": \"col_123\", \"name\": \"Salary\" }, + * \"groups\": [ { \"id\": \"group_1\", \"name\": + * \"HR Department\" } ], \"sourceTableDetails\": { \"id\": + * \"source-table-guid\", \"name\": \"Employee_Data\" } } ] } ] } + * ``` + * + * @param fetchColumnSecurityRulesRequest (required) + * @param _callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body + * object + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 Successfully fetched column security rules -
400 Bad request - Table not found or invalid parameters -
401 Unauthorized access. -
403 Forbidden - User doesn't have permission to access security rules for this table -
500 Internal server error -
+ */ + public okhttp3.Call fetchColumnSecurityRulesAsync( + FetchColumnSecurityRulesRequest fetchColumnSecurityRulesRequest, + final ApiCallback> _callback) + throws ApiException { + + okhttp3.Call localVarCall = + fetchColumnSecurityRulesValidateBeforeCall( + fetchColumnSecurityRulesRequest, _callback); + Type localVarReturnType = new TypeToken>() {}.getType(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; + } + /** + * Build call for fetchConnectionDiffStatus + * + * @param connectionIdentifier GUID of the connection (required) + * @param _callback Callback for upload/download progress + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 true/false -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public okhttp3.Call fetchConnectionDiffStatusCall( + String connectionIdentifier, final ApiCallback _callback) throws ApiException { + String basePath = null; + // Operation Servers + String[] localBasePaths = new String[] {}; + + // Determine Base Path to Use + if (localCustomBaseUrl != null) { + basePath = localCustomBaseUrl; + } else if (localBasePaths.length > 0) { + basePath = localBasePaths[localHostIndex]; + } else { + basePath = null; + } + + Object localVarPostBody = null; + + // create path and map variables + String localVarPath = + "/api/rest/2.0/connections/fetch-connection-diff-status/{connection_identifier}" + .replace( + "{" + "connection_identifier" + "}", + localVarApiClient.escapeString(connectionIdentifier.toString())); + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + final String[] localVarAccepts = {"application/json"}; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = {}; + final String localVarContentType = + localVarApiClient.selectHeaderContentType(localVarContentTypes); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } + + String[] localVarAuthNames = new String[] {"bearerAuth"}; + return localVarApiClient.buildCall( + basePath, + localVarPath, + "POST", + localVarQueryParams, + localVarCollectionQueryParams, + localVarPostBody, + localVarHeaderParams, + localVarCookieParams, + localVarFormParams, + localVarAuthNames, + _callback); + } + + @SuppressWarnings("rawtypes") + private okhttp3.Call fetchConnectionDiffStatusValidateBeforeCall( + String connectionIdentifier, final ApiCallback _callback) throws ApiException { + // verify the required parameter 'connectionIdentifier' is set + if (connectionIdentifier == null) { + throw new ApiException( + "Missing the required parameter 'connectionIdentifier' when calling" + + " fetchConnectionDiffStatus(Async)"); + } + + return fetchConnectionDiffStatusCall(connectionIdentifier, _callback); + } + + /** + * Version: 9.9.0.cl or later Validates the difference in connection metadata between CDW and + * ThoughtSpot. Requires `DATAMANAGEMENT` (**Can manage data**) privilege. If + * [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled + * on your instance, the following Data control privileges may be required: - + * `CAN_MANAGE_CUSTOM_CALENDAR`(**Can manage custom calendars**) - + * `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) - + * `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` (**Can manage data models**) Returns a boolean + * indicating whether there is any difference between the connection metadata at ThoughtSpot and + * CDW. To get the connection metadata difference status, pass the connection GUID as + * `connection_identifier` in the API request. + * + * @param connectionIdentifier GUID of the connection (required) + * @return FetchConnectionDiffStatusResponse + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the + * response body + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 true/false -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public FetchConnectionDiffStatusResponse fetchConnectionDiffStatus(String connectionIdentifier) + throws ApiException { + ApiResponse localVarResp = + fetchConnectionDiffStatusWithHttpInfo(connectionIdentifier); + return localVarResp.getData(); + } + + /** + * Version: 9.9.0.cl or later Validates the difference in connection metadata between CDW and + * ThoughtSpot. Requires `DATAMANAGEMENT` (**Can manage data**) privilege. If + * [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled + * on your instance, the following Data control privileges may be required: - + * `CAN_MANAGE_CUSTOM_CALENDAR`(**Can manage custom calendars**) - + * `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) - + * `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` (**Can manage data models**) Returns a boolean + * indicating whether there is any difference between the connection metadata at ThoughtSpot and + * CDW. To get the connection metadata difference status, pass the connection GUID as + * `connection_identifier` in the API request. + * + * @param connectionIdentifier GUID of the connection (required) + * @return ApiResponse<FetchConnectionDiffStatusResponse> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the + * response body + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 true/false -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public ApiResponse fetchConnectionDiffStatusWithHttpInfo( + String connectionIdentifier) throws ApiException { + okhttp3.Call localVarCall = + fetchConnectionDiffStatusValidateBeforeCall(connectionIdentifier, null); + Type localVarReturnType = new TypeToken() {}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); + } + + /** + * (asynchronously) Version: 9.9.0.cl or later Validates the difference in connection metadata + * between CDW and ThoughtSpot. Requires `DATAMANAGEMENT` (**Can manage data**) + * privilege. If [Role-Based Access Control + * (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the + * following Data control privileges may be required: - + * `CAN_MANAGE_CUSTOM_CALENDAR`(**Can manage custom calendars**) - + * `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) - + * `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` (**Can manage data models**) Returns a boolean + * indicating whether there is any difference between the connection metadata at ThoughtSpot and + * CDW. To get the connection metadata difference status, pass the connection GUID as + * `connection_identifier` in the API request. + * + * @param connectionIdentifier GUID of the connection (required) + * @param _callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body + * object + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 true/false -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public okhttp3.Call fetchConnectionDiffStatusAsync( + String connectionIdentifier, + final ApiCallback _callback) + throws ApiException { + + okhttp3.Call localVarCall = + fetchConnectionDiffStatusValidateBeforeCall(connectionIdentifier, _callback); + Type localVarReturnType = new TypeToken() {}.getType(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; + } + /** + * Build call for fetchLiveboardData + * + * @param fetchLiveboardDataRequest (required) + * @param _callback Callback for upload/download progress + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 Fetching data of specified metadata object is successful. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public okhttp3.Call fetchLiveboardDataCall( + FetchLiveboardDataRequest fetchLiveboardDataRequest, final ApiCallback _callback) + throws ApiException { + String basePath = null; + // Operation Servers + String[] localBasePaths = new String[] {}; + + // Determine Base Path to Use + if (localCustomBaseUrl != null) { + basePath = localCustomBaseUrl; + } else if (localBasePaths.length > 0) { + basePath = localBasePaths[localHostIndex]; + } else { + basePath = null; + } + + Object localVarPostBody = fetchLiveboardDataRequest; + + // create path and map variables + String localVarPath = "/api/rest/2.0/metadata/liveboard/data"; + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + final String[] localVarAccepts = {"application/json"}; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = {"application/json"}; + final String localVarContentType = + localVarApiClient.selectHeaderContentType(localVarContentTypes); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } + + String[] localVarAuthNames = new String[] {"bearerAuth"}; + return localVarApiClient.buildCall( + basePath, + localVarPath, + "POST", + localVarQueryParams, + localVarCollectionQueryParams, + localVarPostBody, + localVarHeaderParams, + localVarCookieParams, + localVarFormParams, + localVarAuthNames, + _callback); + } + + @SuppressWarnings("rawtypes") + private okhttp3.Call fetchLiveboardDataValidateBeforeCall( + FetchLiveboardDataRequest fetchLiveboardDataRequest, final ApiCallback _callback) + throws ApiException { + // verify the required parameter 'fetchLiveboardDataRequest' is set + if (fetchLiveboardDataRequest == null) { + throw new ApiException( + "Missing the required parameter 'fetchLiveboardDataRequest' when calling" + + " fetchLiveboardData(Async)"); + } + + return fetchLiveboardDataCall(fetchLiveboardDataRequest, _callback); + } + + /** + * Version: 9.0.0.cl or later Gets data from a Liveboard object and its visualization. Requires + * at least view access to the Liveboard. #### Usage guidelines In the request body, specify the + * GUID or name of the Liveboard. To get data for specific visualizations, add the GUIDs or + * names of the visualizations in the API request. To include unsaved changes in the report, + * pass the `transient_pinboard_content` script generated from the + * `getExportRequestForCurrentPinboard` method in the Visual Embed SDK. Upon + * successful execution, the API returns the report with unsaved changes. If the new Liveboard + * experience mode, the transient content includes ad hoc changes to visualizations such as + * sorting, toggling of legends, and data drill down. For more information, and see [Liveboard + * data + * API](https://developers.thoughtspot.com/docs/fetch-data-and-report-apis#_fetch_liveboard_data_api). + * + * @param fetchLiveboardDataRequest (required) + * @return LiveboardDataResponse + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the + * response body + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 Fetching data of specified metadata object is successful. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public LiveboardDataResponse fetchLiveboardData( + FetchLiveboardDataRequest fetchLiveboardDataRequest) throws ApiException { + ApiResponse localVarResp = + fetchLiveboardDataWithHttpInfo(fetchLiveboardDataRequest); + return localVarResp.getData(); + } + + /** + * Version: 9.0.0.cl or later Gets data from a Liveboard object and its visualization. Requires + * at least view access to the Liveboard. #### Usage guidelines In the request body, specify the + * GUID or name of the Liveboard. To get data for specific visualizations, add the GUIDs or + * names of the visualizations in the API request. To include unsaved changes in the report, + * pass the `transient_pinboard_content` script generated from the + * `getExportRequestForCurrentPinboard` method in the Visual Embed SDK. Upon + * successful execution, the API returns the report with unsaved changes. If the new Liveboard + * experience mode, the transient content includes ad hoc changes to visualizations such as + * sorting, toggling of legends, and data drill down. For more information, and see [Liveboard + * data + * API](https://developers.thoughtspot.com/docs/fetch-data-and-report-apis#_fetch_liveboard_data_api). + * + * @param fetchLiveboardDataRequest (required) + * @return ApiResponse<LiveboardDataResponse> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the + * response body + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 Fetching data of specified metadata object is successful. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public ApiResponse fetchLiveboardDataWithHttpInfo( + FetchLiveboardDataRequest fetchLiveboardDataRequest) throws ApiException { + okhttp3.Call localVarCall = + fetchLiveboardDataValidateBeforeCall(fetchLiveboardDataRequest, null); + Type localVarReturnType = new TypeToken() {}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); + } + + /** + * (asynchronously) Version: 9.0.0.cl or later Gets data from a Liveboard object and its + * visualization. Requires at least view access to the Liveboard. #### Usage guidelines In the + * request body, specify the GUID or name of the Liveboard. To get data for specific + * visualizations, add the GUIDs or names of the visualizations in the API request. To include + * unsaved changes in the report, pass the `transient_pinboard_content` script + * generated from the `getExportRequestForCurrentPinboard` method in the Visual Embed + * SDK. Upon successful execution, the API returns the report with unsaved changes. If the new + * Liveboard experience mode, the transient content includes ad hoc changes to visualizations + * such as sorting, toggling of legends, and data drill down. For more information, and see + * [Liveboard data + * API](https://developers.thoughtspot.com/docs/fetch-data-and-report-apis#_fetch_liveboard_data_api). + * + * @param fetchLiveboardDataRequest (required) + * @param _callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body + * object + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 Fetching data of specified metadata object is successful. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public okhttp3.Call fetchLiveboardDataAsync( + FetchLiveboardDataRequest fetchLiveboardDataRequest, + final ApiCallback _callback) + throws ApiException { + + okhttp3.Call localVarCall = + fetchLiveboardDataValidateBeforeCall(fetchLiveboardDataRequest, _callback); + Type localVarReturnType = new TypeToken() {}.getType(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; + } + /** + * Build call for fetchLiveboardSqlQuery + * + * @param fetchLiveboardSqlQueryRequest (required) + * @param _callback Callback for upload/download progress + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 Fetching SQL query of specified metadata object is successful. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public okhttp3.Call fetchLiveboardSqlQueryCall( + FetchLiveboardSqlQueryRequest fetchLiveboardSqlQueryRequest, + final ApiCallback _callback) + throws ApiException { + String basePath = null; + // Operation Servers + String[] localBasePaths = new String[] {}; + + // Determine Base Path to Use + if (localCustomBaseUrl != null) { + basePath = localCustomBaseUrl; + } else if (localBasePaths.length > 0) { + basePath = localBasePaths[localHostIndex]; + } else { + basePath = null; + } + + Object localVarPostBody = fetchLiveboardSqlQueryRequest; + + // create path and map variables + String localVarPath = "/api/rest/2.0/metadata/liveboard/sql"; + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + final String[] localVarAccepts = {"application/json"}; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = {"application/json"}; + final String localVarContentType = + localVarApiClient.selectHeaderContentType(localVarContentTypes); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } + + String[] localVarAuthNames = new String[] {"bearerAuth"}; + return localVarApiClient.buildCall( + basePath, + localVarPath, + "POST", + localVarQueryParams, + localVarCollectionQueryParams, + localVarPostBody, + localVarHeaderParams, + localVarCookieParams, + localVarFormParams, + localVarAuthNames, + _callback); + } + + @SuppressWarnings("rawtypes") + private okhttp3.Call fetchLiveboardSqlQueryValidateBeforeCall( + FetchLiveboardSqlQueryRequest fetchLiveboardSqlQueryRequest, + final ApiCallback _callback) + throws ApiException { + // verify the required parameter 'fetchLiveboardSqlQueryRequest' is set + if (fetchLiveboardSqlQueryRequest == null) { + throw new ApiException( + "Missing the required parameter 'fetchLiveboardSqlQueryRequest' when calling" + + " fetchLiveboardSqlQuery(Async)"); + } + + return fetchLiveboardSqlQueryCall(fetchLiveboardSqlQueryRequest, _callback); + } + + /** + * Version: 9.0.0.cl or later Fetches the underlying SQL query data for a Liveboard object and + * its visualizations. Requires at least view access to the Liveboard object. To get SQL query + * data for a Liveboard, specify the GUID of the Liveboard. Optionally, you can add an array of + * visualization GUIDs to retrieve the SQL query data for visualizations in the Liveboard. Upon + * successful execution, the API returns the SQL queries for the specified object as shown in + * this example: ``` { \"metadata_id\": + * \"fa68ae91-7588-4136-bacd-d71fb12dda69\", \"metadata_name\": \"Total + * Sales\", \"metadata_type\": \"LIVEBOARD\", + * \"sql_queries\": [ { \"metadata_id\": + * \"b3b6d2b9-089a-490c-8e16-b144650b7843\", \"metadata_name\": \"Total + * quantity purchased, Total sales by region\", \"sql_query\": \"SELECT \\n + * \\\"ta_1\\\".\\\"REGION\\\" \\\"ca_1\\\", \\n CASE\\n WHEN + * sum(\\\"ta_2\\\".\\\"QUANTITYPURCHASED\\\") IS NOT NULL THEN + * sum(\\\"ta_2\\\".\\\"QUANTITYPURCHASED\\\")\\n ELSE 0\\n END + * \\\"ca_2\\\", \\n CASE\\n WHEN sum(\\\"ta_2\\\".\\\"SALES\\\") + * IS NOT NULL THEN sum(\\\"ta_2\\\".\\\"SALES\\\")\\n ELSE 0\\n END + * \\\"ca_3\\\"\\nFROM + * \\\"RETAILAPPAREL\\\".\\\"PUBLIC\\\".\\\"FACT_RETAPP_SALES\\\" + * \\\"ta_2\\\"\\n JOIN + * \\\"RETAILAPPAREL\\\".\\\"PUBLIC\\\".\\\"DIM_RETAPP_STORES\\\" + * \\\"ta_1\\\"\\n ON \\\"ta_2\\\".\\\"STOREID\\\" = + * \\\"ta_1\\\".\\\"STOREID\\\"\\nGROUP BY \\\"ca_1\\\"\" } ] + * } ``` + * + * @param fetchLiveboardSqlQueryRequest (required) + * @return SqlQueryResponse + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the + * response body + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 Fetching SQL query of specified metadata object is successful. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public SqlQueryResponse fetchLiveboardSqlQuery( + FetchLiveboardSqlQueryRequest fetchLiveboardSqlQueryRequest) throws ApiException { + ApiResponse localVarResp = + fetchLiveboardSqlQueryWithHttpInfo(fetchLiveboardSqlQueryRequest); + return localVarResp.getData(); + } + + /** + * Version: 9.0.0.cl or later Fetches the underlying SQL query data for a Liveboard object and + * its visualizations. Requires at least view access to the Liveboard object. To get SQL query + * data for a Liveboard, specify the GUID of the Liveboard. Optionally, you can add an array of + * visualization GUIDs to retrieve the SQL query data for visualizations in the Liveboard. Upon + * successful execution, the API returns the SQL queries for the specified object as shown in + * this example: ``` { \"metadata_id\": + * \"fa68ae91-7588-4136-bacd-d71fb12dda69\", \"metadata_name\": \"Total + * Sales\", \"metadata_type\": \"LIVEBOARD\", + * \"sql_queries\": [ { \"metadata_id\": + * \"b3b6d2b9-089a-490c-8e16-b144650b7843\", \"metadata_name\": \"Total + * quantity purchased, Total sales by region\", \"sql_query\": \"SELECT \\n + * \\\"ta_1\\\".\\\"REGION\\\" \\\"ca_1\\\", \\n CASE\\n WHEN + * sum(\\\"ta_2\\\".\\\"QUANTITYPURCHASED\\\") IS NOT NULL THEN + * sum(\\\"ta_2\\\".\\\"QUANTITYPURCHASED\\\")\\n ELSE 0\\n END + * \\\"ca_2\\\", \\n CASE\\n WHEN sum(\\\"ta_2\\\".\\\"SALES\\\") + * IS NOT NULL THEN sum(\\\"ta_2\\\".\\\"SALES\\\")\\n ELSE 0\\n END + * \\\"ca_3\\\"\\nFROM + * \\\"RETAILAPPAREL\\\".\\\"PUBLIC\\\".\\\"FACT_RETAPP_SALES\\\" + * \\\"ta_2\\\"\\n JOIN + * \\\"RETAILAPPAREL\\\".\\\"PUBLIC\\\".\\\"DIM_RETAPP_STORES\\\" + * \\\"ta_1\\\"\\n ON \\\"ta_2\\\".\\\"STOREID\\\" = + * \\\"ta_1\\\".\\\"STOREID\\\"\\nGROUP BY \\\"ca_1\\\"\" } ] + * } ``` + * + * @param fetchLiveboardSqlQueryRequest (required) + * @return ApiResponse<SqlQueryResponse> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the + * response body + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 Fetching SQL query of specified metadata object is successful. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public ApiResponse fetchLiveboardSqlQueryWithHttpInfo( + FetchLiveboardSqlQueryRequest fetchLiveboardSqlQueryRequest) throws ApiException { + okhttp3.Call localVarCall = + fetchLiveboardSqlQueryValidateBeforeCall(fetchLiveboardSqlQueryRequest, null); + Type localVarReturnType = new TypeToken() {}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); + } + + /** + * (asynchronously) Version: 9.0.0.cl or later Fetches the underlying SQL query data for a + * Liveboard object and its visualizations. Requires at least view access to the Liveboard + * object. To get SQL query data for a Liveboard, specify the GUID of the Liveboard. Optionally, + * you can add an array of visualization GUIDs to retrieve the SQL query data for visualizations + * in the Liveboard. Upon successful execution, the API returns the SQL queries for the + * specified object as shown in this example: ``` { \"metadata_id\": + * \"fa68ae91-7588-4136-bacd-d71fb12dda69\", \"metadata_name\": \"Total + * Sales\", \"metadata_type\": \"LIVEBOARD\", + * \"sql_queries\": [ { \"metadata_id\": + * \"b3b6d2b9-089a-490c-8e16-b144650b7843\", \"metadata_name\": \"Total + * quantity purchased, Total sales by region\", \"sql_query\": \"SELECT \\n + * \\\"ta_1\\\".\\\"REGION\\\" \\\"ca_1\\\", \\n CASE\\n WHEN + * sum(\\\"ta_2\\\".\\\"QUANTITYPURCHASED\\\") IS NOT NULL THEN + * sum(\\\"ta_2\\\".\\\"QUANTITYPURCHASED\\\")\\n ELSE 0\\n END + * \\\"ca_2\\\", \\n CASE\\n WHEN sum(\\\"ta_2\\\".\\\"SALES\\\") + * IS NOT NULL THEN sum(\\\"ta_2\\\".\\\"SALES\\\")\\n ELSE 0\\n END + * \\\"ca_3\\\"\\nFROM + * \\\"RETAILAPPAREL\\\".\\\"PUBLIC\\\".\\\"FACT_RETAPP_SALES\\\" + * \\\"ta_2\\\"\\n JOIN + * \\\"RETAILAPPAREL\\\".\\\"PUBLIC\\\".\\\"DIM_RETAPP_STORES\\\" + * \\\"ta_1\\\"\\n ON \\\"ta_2\\\".\\\"STOREID\\\" = + * \\\"ta_1\\\".\\\"STOREID\\\"\\nGROUP BY \\\"ca_1\\\"\" } ] + * } ``` + * + * @param fetchLiveboardSqlQueryRequest (required) + * @param _callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body + * object + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 Fetching SQL query of specified metadata object is successful. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public okhttp3.Call fetchLiveboardSqlQueryAsync( + FetchLiveboardSqlQueryRequest fetchLiveboardSqlQueryRequest, + final ApiCallback _callback) + throws ApiException { + + okhttp3.Call localVarCall = + fetchLiveboardSqlQueryValidateBeforeCall(fetchLiveboardSqlQueryRequest, _callback); + Type localVarReturnType = new TypeToken() {}.getType(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; + } + /** + * Build call for fetchLogs + * + * @param fetchLogsRequest (required) + * @param _callback Callback for upload/download progress + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 Log fetched successfully. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public okhttp3.Call fetchLogsCall( + FetchLogsRequest fetchLogsRequest, final ApiCallback _callback) throws ApiException { + String basePath = null; + // Operation Servers + String[] localBasePaths = new String[] {}; + + // Determine Base Path to Use + if (localCustomBaseUrl != null) { + basePath = localCustomBaseUrl; + } else if (localBasePaths.length > 0) { + basePath = localBasePaths[localHostIndex]; + } else { + basePath = null; + } + + Object localVarPostBody = fetchLogsRequest; + + // create path and map variables + String localVarPath = "/api/rest/2.0/logs/fetch"; + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + final String[] localVarAccepts = {"application/json"}; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = {"application/json"}; + final String localVarContentType = + localVarApiClient.selectHeaderContentType(localVarContentTypes); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } + + String[] localVarAuthNames = new String[] {"bearerAuth"}; + return localVarApiClient.buildCall( + basePath, + localVarPath, + "POST", + localVarQueryParams, + localVarCollectionQueryParams, + localVarPostBody, + localVarHeaderParams, + localVarCookieParams, + localVarFormParams, + localVarAuthNames, + _callback); + } + + @SuppressWarnings("rawtypes") + private okhttp3.Call fetchLogsValidateBeforeCall( + FetchLogsRequest fetchLogsRequest, final ApiCallback _callback) throws ApiException { + // verify the required parameter 'fetchLogsRequest' is set + if (fetchLogsRequest == null) { + throw new ApiException( + "Missing the required parameter 'fetchLogsRequest' when calling" + + " fetchLogs(Async)"); + } + + return fetchLogsCall(fetchLogsRequest, _callback); + } + + /** + * Version: 9.0.0.cl or later Fetches security audit logs. Requires `ADMINISTRATION` + * (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control + * (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the [Admin + * Control](https://developers.thoughtspot.com/docs/rbac#_admin_control) privileges are + * required. #### Usage guidelines By default, the API retrieves logs for the last 24 hours. You + * can set a custom duration in EPOCH time. Make sure the log duration specified in your API + * request doesn’t exceed 24 hours. If you must fetch logs for a longer time range, modify the + * duration and make multiple sequential API requests. Upon successful execution, the API + * returns logs with the following information: * timestamp of the event * event ID * event type + * * name and GUID of the user * IP address of ThoughtSpot instance For more information see + * [Audit logs Documentation](https://developers.thoughtspot.com/docs/audit-logs). + * + * @param fetchLogsRequest (required) + * @return List<LogResponse> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the + * response body + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 Log fetched successfully. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public List fetchLogs(FetchLogsRequest fetchLogsRequest) throws ApiException { + ApiResponse> localVarResp = fetchLogsWithHttpInfo(fetchLogsRequest); + return localVarResp.getData(); + } + + /** + * Version: 9.0.0.cl or later Fetches security audit logs. Requires `ADMINISTRATION` + * (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control + * (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the [Admin + * Control](https://developers.thoughtspot.com/docs/rbac#_admin_control) privileges are + * required. #### Usage guidelines By default, the API retrieves logs for the last 24 hours. You + * can set a custom duration in EPOCH time. Make sure the log duration specified in your API + * request doesn’t exceed 24 hours. If you must fetch logs for a longer time range, modify the + * duration and make multiple sequential API requests. Upon successful execution, the API + * returns logs with the following information: * timestamp of the event * event ID * event type + * * name and GUID of the user * IP address of ThoughtSpot instance For more information see + * [Audit logs Documentation](https://developers.thoughtspot.com/docs/audit-logs). + * + * @param fetchLogsRequest (required) + * @return ApiResponse<List<LogResponse>> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the + * response body + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 Log fetched successfully. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public ApiResponse> fetchLogsWithHttpInfo(FetchLogsRequest fetchLogsRequest) + throws ApiException { + okhttp3.Call localVarCall = fetchLogsValidateBeforeCall(fetchLogsRequest, null); + Type localVarReturnType = new TypeToken>() {}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); + } + + /** + * (asynchronously) Version: 9.0.0.cl or later Fetches security audit logs. Requires + * `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access + * Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, + * the [Admin Control](https://developers.thoughtspot.com/docs/rbac#_admin_control) privileges + * are required. #### Usage guidelines By default, the API retrieves logs for the last 24 hours. + * You can set a custom duration in EPOCH time. Make sure the log duration specified in your API + * request doesn’t exceed 24 hours. If you must fetch logs for a longer time range, modify the + * duration and make multiple sequential API requests. Upon successful execution, the API + * returns logs with the following information: * timestamp of the event * event ID * event type + * * name and GUID of the user * IP address of ThoughtSpot instance For more information see + * [Audit logs Documentation](https://developers.thoughtspot.com/docs/audit-logs). + * + * @param fetchLogsRequest (required) + * @param _callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body + * object + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 Log fetched successfully. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public okhttp3.Call fetchLogsAsync( + FetchLogsRequest fetchLogsRequest, final ApiCallback> _callback) + throws ApiException { + + okhttp3.Call localVarCall = fetchLogsValidateBeforeCall(fetchLogsRequest, _callback); + Type localVarReturnType = new TypeToken>() {}.getType(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; + } + /** + * Build call for fetchObjectPrivileges + * + * @param fetchObjectPrivilegesRequest (required) + * @param _callback Callback for upload/download progress + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 Fetching defined object privileges of metadata objects is successful. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public okhttp3.Call fetchObjectPrivilegesCall( + FetchObjectPrivilegesRequest fetchObjectPrivilegesRequest, final ApiCallback _callback) + throws ApiException { + String basePath = null; + // Operation Servers + String[] localBasePaths = new String[] {}; + + // Determine Base Path to Use + if (localCustomBaseUrl != null) { + basePath = localCustomBaseUrl; + } else if (localBasePaths.length > 0) { + basePath = localBasePaths[localHostIndex]; + } else { + basePath = null; + } + + Object localVarPostBody = fetchObjectPrivilegesRequest; + + // create path and map variables + String localVarPath = "/api/rest/2.0/security/metadata/fetch-object-privileges"; + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + final String[] localVarAccepts = {"application/json"}; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = {"application/json"}; + final String localVarContentType = + localVarApiClient.selectHeaderContentType(localVarContentTypes); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } + + String[] localVarAuthNames = new String[] {"bearerAuth"}; + return localVarApiClient.buildCall( + basePath, + localVarPath, + "POST", + localVarQueryParams, + localVarCollectionQueryParams, + localVarPostBody, + localVarHeaderParams, + localVarCookieParams, + localVarFormParams, + localVarAuthNames, + _callback); + } + + @SuppressWarnings("rawtypes") + private okhttp3.Call fetchObjectPrivilegesValidateBeforeCall( + FetchObjectPrivilegesRequest fetchObjectPrivilegesRequest, final ApiCallback _callback) + throws ApiException { + // verify the required parameter 'fetchObjectPrivilegesRequest' is set + if (fetchObjectPrivilegesRequest == null) { + throw new ApiException( + "Missing the required parameter 'fetchObjectPrivilegesRequest' when calling" + + " fetchObjectPrivileges(Async)"); + } + + return fetchObjectPrivilegesCall(fetchObjectPrivilegesRequest, _callback); + } + + /** + * Version: 26.3.0.cl or later This API fetches the object privileges present for the given list + * of principals (user or group), on the given set of objects. It supports pagination, which can + * be enabled and configured using the request parameters. It provides users access to certain + * features based on privilege based access control. #### Usage guidelines - Specify the + * `type` (`USER` or `USER_GROUP`) and `identifier` + * (either GUID or name) of the principals for which you want to retrieve object privilege + * information in the `principals` array. - Specify the `type` + * (`LOGICAL_TABLE`) and `identifier` (either GUID or name) of the metadata + * objects for which you want to retrieve object privilege information in the + * `metadata` array. Only `LOGICAL_TABLE` metadata type is supported for + * now. It may be extended for other metadata types in future. - To control the offset from + * where principals have to be fetched, use `record_offset`. When + * `record_offset` is 0, information is fetched from the beginning. - To control the + * number of principals to be fetched, use `record_size`. Default + * `record_size` is 20. - Ensure `record_offset` for a subsequent request is + * one more than the value of `record_size` of the previous request. - Ensure using + * correct Authorization Bearer Token corresponding to specific user & org. #### Example + * request ```json { \"principals\": [ { \"type\": + * \"type-1\", \"identifier\": \"principal-guid-or-name-1\" }, { + * \"type\": \"type-2\", \"identifier\": + * \"principal-guid-or-name-2\" } ], \"metadata\": [ { \"type\": + * \"metadata-type-1\", \"identifier\": + * \"metadata-guid-or-name-1\" }, { \"type\": \"metadata-type-2\", + * \"identifier\": \"metadata-guid-or-name-2\" } ], + * \"record_offset\": 0, \"record_size\": 20 } ``` #### + * Response format The API returns an array of `metadata_object_privileges` objects + * wrapped in JSON. Each `metadata_object_privileges` object contains: - Metadata + * information (GUID, name and type) - Array of `principal_object_privilege_info`. - + * Each `principal_object_privilege_info` contains: - Principal type. All principals + * of this type are listed as described below. - Array of + * `principal_object_privileges`. - Each `principal_object_privileges` + * contains: - Principal information (GUID, name, subtype) - List of applied object level + * privileges. #### Example response ```json { + * \"metadata_object_privileges\": [ { \"metadata_id\": + * \"metadata-guid-1\", \"metadata_name\": \"metadata-name-1\", + * \"metadata_type\": \"metadata-type-1\", + * \"principal_object_privilege_info\": [ { \"principal_type\": + * \"principal-type-1\", \"principal_object_privileges\": [ { + * \"principal_id\": \"principal-guid-1\", \"principal_name\": + * \"principal-name-1\", \"principal_sub_type\": + * \"principal-sub-type-1\", \"object_privileges\": + * \"[object-privilege-1, object-privilege-2]\" }, { \"principal_id\": + * \"principal-guid-2\", \"principal_name\": \"principal-name-2\", + * \"principal_sub_type\": \"principal-sub-type-2\", + * \"object_privileges\": \"[object-privilege-1, object-privilege-2]\" } ] + * }, { \"principal_type\": \"principal-type-2\", + * \"principal_object_privileges\": [ { \"principal_id\": + * \"principal-guid-3\", \"principal_name\": \"principal-guid-4\", + * \"principal_sub_type\": \"principal-sub-type-4\", + * \"object_privileges\": \"[object-privilege-1]\" } ] } ] }, { + * \"metadata_id\": \"metadata-guid-2\", \"metadata_name\": + * \"metadata-name-2\", \"metadata_type\": \"metadata-type-2\", + * \"principal_object_privilege_info\": [ { \"principal_type\": + * \"principal-type-1\", \"principal_object_privileges\": [ { + * \"principal_id\": \"principal-guid-1\", \"principal_name\": + * \"principal-name-1\", \"principal_sub_type\": + * \"principal-sub-type-1\", \"object_privileges\": + * \"[object-privilege-3, object-privilege-4]\" }, { \"principal_id\": + * \"principal-guid-2\", \"principal_name\": \"principal-name-2\", + * \"principal_sub_type\": \"principal-sub-type-2\", + * \"object_privileges\": \"[object-privilege-4]\" } ] } ] } ] } + * ``` + * + * @param fetchObjectPrivilegesRequest (required) + * @return ObjectPrivilegesOfMetadataResponse + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the + * response body + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 Fetching defined object privileges of metadata objects is successful. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public ObjectPrivilegesOfMetadataResponse fetchObjectPrivileges( + FetchObjectPrivilegesRequest fetchObjectPrivilegesRequest) throws ApiException { + ApiResponse localVarResp = + fetchObjectPrivilegesWithHttpInfo(fetchObjectPrivilegesRequest); + return localVarResp.getData(); + } + + /** + * Version: 26.3.0.cl or later This API fetches the object privileges present for the given list + * of principals (user or group), on the given set of objects. It supports pagination, which can + * be enabled and configured using the request parameters. It provides users access to certain + * features based on privilege based access control. #### Usage guidelines - Specify the + * `type` (`USER` or `USER_GROUP`) and `identifier` + * (either GUID or name) of the principals for which you want to retrieve object privilege + * information in the `principals` array. - Specify the `type` + * (`LOGICAL_TABLE`) and `identifier` (either GUID or name) of the metadata + * objects for which you want to retrieve object privilege information in the + * `metadata` array. Only `LOGICAL_TABLE` metadata type is supported for + * now. It may be extended for other metadata types in future. - To control the offset from + * where principals have to be fetched, use `record_offset`. When + * `record_offset` is 0, information is fetched from the beginning. - To control the + * number of principals to be fetched, use `record_size`. Default + * `record_size` is 20. - Ensure `record_offset` for a subsequent request is + * one more than the value of `record_size` of the previous request. - Ensure using + * correct Authorization Bearer Token corresponding to specific user & org. #### Example + * request ```json { \"principals\": [ { \"type\": + * \"type-1\", \"identifier\": \"principal-guid-or-name-1\" }, { + * \"type\": \"type-2\", \"identifier\": + * \"principal-guid-or-name-2\" } ], \"metadata\": [ { \"type\": + * \"metadata-type-1\", \"identifier\": + * \"metadata-guid-or-name-1\" }, { \"type\": \"metadata-type-2\", + * \"identifier\": \"metadata-guid-or-name-2\" } ], + * \"record_offset\": 0, \"record_size\": 20 } ``` #### + * Response format The API returns an array of `metadata_object_privileges` objects + * wrapped in JSON. Each `metadata_object_privileges` object contains: - Metadata + * information (GUID, name and type) - Array of `principal_object_privilege_info`. - + * Each `principal_object_privilege_info` contains: - Principal type. All principals + * of this type are listed as described below. - Array of + * `principal_object_privileges`. - Each `principal_object_privileges` + * contains: - Principal information (GUID, name, subtype) - List of applied object level + * privileges. #### Example response ```json { + * \"metadata_object_privileges\": [ { \"metadata_id\": + * \"metadata-guid-1\", \"metadata_name\": \"metadata-name-1\", + * \"metadata_type\": \"metadata-type-1\", + * \"principal_object_privilege_info\": [ { \"principal_type\": + * \"principal-type-1\", \"principal_object_privileges\": [ { + * \"principal_id\": \"principal-guid-1\", \"principal_name\": + * \"principal-name-1\", \"principal_sub_type\": + * \"principal-sub-type-1\", \"object_privileges\": + * \"[object-privilege-1, object-privilege-2]\" }, { \"principal_id\": + * \"principal-guid-2\", \"principal_name\": \"principal-name-2\", + * \"principal_sub_type\": \"principal-sub-type-2\", + * \"object_privileges\": \"[object-privilege-1, object-privilege-2]\" } ] + * }, { \"principal_type\": \"principal-type-2\", + * \"principal_object_privileges\": [ { \"principal_id\": + * \"principal-guid-3\", \"principal_name\": \"principal-guid-4\", + * \"principal_sub_type\": \"principal-sub-type-4\", + * \"object_privileges\": \"[object-privilege-1]\" } ] } ] }, { + * \"metadata_id\": \"metadata-guid-2\", \"metadata_name\": + * \"metadata-name-2\", \"metadata_type\": \"metadata-type-2\", + * \"principal_object_privilege_info\": [ { \"principal_type\": + * \"principal-type-1\", \"principal_object_privileges\": [ { + * \"principal_id\": \"principal-guid-1\", \"principal_name\": + * \"principal-name-1\", \"principal_sub_type\": + * \"principal-sub-type-1\", \"object_privileges\": + * \"[object-privilege-3, object-privilege-4]\" }, { \"principal_id\": + * \"principal-guid-2\", \"principal_name\": \"principal-name-2\", + * \"principal_sub_type\": \"principal-sub-type-2\", + * \"object_privileges\": \"[object-privilege-4]\" } ] } ] } ] } + * ``` + * + * @param fetchObjectPrivilegesRequest (required) + * @return ApiResponse<ObjectPrivilegesOfMetadataResponse> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the + * response body + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 Fetching defined object privileges of metadata objects is successful. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public ApiResponse fetchObjectPrivilegesWithHttpInfo( + FetchObjectPrivilegesRequest fetchObjectPrivilegesRequest) throws ApiException { + okhttp3.Call localVarCall = + fetchObjectPrivilegesValidateBeforeCall(fetchObjectPrivilegesRequest, null); + Type localVarReturnType = new TypeToken() {}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); + } + + /** + * (asynchronously) Version: 26.3.0.cl or later This API fetches the object privileges present + * for the given list of principals (user or group), on the given set of objects. It supports + * pagination, which can be enabled and configured using the request parameters. It provides + * users access to certain features based on privilege based access control. #### Usage + * guidelines - Specify the `type` (`USER` or `USER_GROUP`) and + * `identifier` (either GUID or name) of the principals for which you want to retrieve + * object privilege information in the `principals` array. - Specify the + * `type` (`LOGICAL_TABLE`) and `identifier` (either GUID or name) + * of the metadata objects for which you want to retrieve object privilege information in the + * `metadata` array. Only `LOGICAL_TABLE` metadata type is supported for + * now. It may be extended for other metadata types in future. - To control the offset from + * where principals have to be fetched, use `record_offset`. When + * `record_offset` is 0, information is fetched from the beginning. - To control the + * number of principals to be fetched, use `record_size`. Default + * `record_size` is 20. - Ensure `record_offset` for a subsequent request is + * one more than the value of `record_size` of the previous request. - Ensure using + * correct Authorization Bearer Token corresponding to specific user & org. #### Example + * request ```json { \"principals\": [ { \"type\": + * \"type-1\", \"identifier\": \"principal-guid-or-name-1\" }, { + * \"type\": \"type-2\", \"identifier\": + * \"principal-guid-or-name-2\" } ], \"metadata\": [ { \"type\": + * \"metadata-type-1\", \"identifier\": + * \"metadata-guid-or-name-1\" }, { \"type\": \"metadata-type-2\", + * \"identifier\": \"metadata-guid-or-name-2\" } ], + * \"record_offset\": 0, \"record_size\": 20 } ``` #### + * Response format The API returns an array of `metadata_object_privileges` objects + * wrapped in JSON. Each `metadata_object_privileges` object contains: - Metadata + * information (GUID, name and type) - Array of `principal_object_privilege_info`. - + * Each `principal_object_privilege_info` contains: - Principal type. All principals + * of this type are listed as described below. - Array of + * `principal_object_privileges`. - Each `principal_object_privileges` + * contains: - Principal information (GUID, name, subtype) - List of applied object level + * privileges. #### Example response ```json { + * \"metadata_object_privileges\": [ { \"metadata_id\": + * \"metadata-guid-1\", \"metadata_name\": \"metadata-name-1\", + * \"metadata_type\": \"metadata-type-1\", + * \"principal_object_privilege_info\": [ { \"principal_type\": + * \"principal-type-1\", \"principal_object_privileges\": [ { + * \"principal_id\": \"principal-guid-1\", \"principal_name\": + * \"principal-name-1\", \"principal_sub_type\": + * \"principal-sub-type-1\", \"object_privileges\": + * \"[object-privilege-1, object-privilege-2]\" }, { \"principal_id\": + * \"principal-guid-2\", \"principal_name\": \"principal-name-2\", + * \"principal_sub_type\": \"principal-sub-type-2\", + * \"object_privileges\": \"[object-privilege-1, object-privilege-2]\" } ] + * }, { \"principal_type\": \"principal-type-2\", + * \"principal_object_privileges\": [ { \"principal_id\": + * \"principal-guid-3\", \"principal_name\": \"principal-guid-4\", + * \"principal_sub_type\": \"principal-sub-type-4\", + * \"object_privileges\": \"[object-privilege-1]\" } ] } ] }, { + * \"metadata_id\": \"metadata-guid-2\", \"metadata_name\": + * \"metadata-name-2\", \"metadata_type\": \"metadata-type-2\", + * \"principal_object_privilege_info\": [ { \"principal_type\": + * \"principal-type-1\", \"principal_object_privileges\": [ { + * \"principal_id\": \"principal-guid-1\", \"principal_name\": + * \"principal-name-1\", \"principal_sub_type\": + * \"principal-sub-type-1\", \"object_privileges\": + * \"[object-privilege-3, object-privilege-4]\" }, { \"principal_id\": + * \"principal-guid-2\", \"principal_name\": \"principal-name-2\", + * \"principal_sub_type\": \"principal-sub-type-2\", + * \"object_privileges\": \"[object-privilege-4]\" } ] } ] } ] } + * ``` + * + * @param fetchObjectPrivilegesRequest (required) + * @param _callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body + * object + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 Fetching defined object privileges of metadata objects is successful. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public okhttp3.Call fetchObjectPrivilegesAsync( + FetchObjectPrivilegesRequest fetchObjectPrivilegesRequest, + final ApiCallback _callback) + throws ApiException { + + okhttp3.Call localVarCall = + fetchObjectPrivilegesValidateBeforeCall(fetchObjectPrivilegesRequest, _callback); + Type localVarReturnType = new TypeToken() {}.getType(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; + } + /** + * Build call for fetchPermissionsOfPrincipals + * + * @param fetchPermissionsOfPrincipalsRequest (required) + * @param _callback Callback for upload/download progress + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 Fetching permissions of principals is successful. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public okhttp3.Call fetchPermissionsOfPrincipalsCall( + FetchPermissionsOfPrincipalsRequest fetchPermissionsOfPrincipalsRequest, + final ApiCallback _callback) + throws ApiException { + String basePath = null; + // Operation Servers + String[] localBasePaths = new String[] {}; + + // Determine Base Path to Use + if (localCustomBaseUrl != null) { + basePath = localCustomBaseUrl; + } else if (localBasePaths.length > 0) { + basePath = localBasePaths[localHostIndex]; + } else { + basePath = null; + } + + Object localVarPostBody = fetchPermissionsOfPrincipalsRequest; + + // create path and map variables + String localVarPath = "/api/rest/2.0/security/principals/fetch-permissions"; + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + final String[] localVarAccepts = {"application/json"}; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = {"application/json"}; + final String localVarContentType = + localVarApiClient.selectHeaderContentType(localVarContentTypes); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } + + String[] localVarAuthNames = new String[] {"bearerAuth"}; + return localVarApiClient.buildCall( + basePath, + localVarPath, + "POST", + localVarQueryParams, + localVarCollectionQueryParams, + localVarPostBody, + localVarHeaderParams, + localVarCookieParams, + localVarFormParams, + localVarAuthNames, + _callback); + } + + @SuppressWarnings("rawtypes") + private okhttp3.Call fetchPermissionsOfPrincipalsValidateBeforeCall( + FetchPermissionsOfPrincipalsRequest fetchPermissionsOfPrincipalsRequest, + final ApiCallback _callback) + throws ApiException { + // verify the required parameter 'fetchPermissionsOfPrincipalsRequest' is set + if (fetchPermissionsOfPrincipalsRequest == null) { + throw new ApiException( + "Missing the required parameter 'fetchPermissionsOfPrincipalsRequest' when" + + " calling fetchPermissionsOfPrincipals(Async)"); + } + + return fetchPermissionsOfPrincipalsCall(fetchPermissionsOfPrincipalsRequest, _callback); + } + + /** + * Version: 9.0.0.cl or later Fetches object permission details for a given principal object + * such as a user and group. Requires view access to the metadata object. #### Usage guidelines + * * To get a list of all metadata objects that a user or group can access, specify the + * `type` and GUID or name of the principal. * To get permission details for a + * specific object, add the `type` and GUID or name of the metadata object to your API + * request. Upon successful execution, the API returns a list of metadata objects and permission + * details for each object. + * + * @param fetchPermissionsOfPrincipalsRequest (required) + * @return PermissionOfPrincipalsResponse + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the + * response body + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 Fetching permissions of principals is successful. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public PermissionOfPrincipalsResponse fetchPermissionsOfPrincipals( + FetchPermissionsOfPrincipalsRequest fetchPermissionsOfPrincipalsRequest) + throws ApiException { + ApiResponse localVarResp = + fetchPermissionsOfPrincipalsWithHttpInfo(fetchPermissionsOfPrincipalsRequest); + return localVarResp.getData(); + } + + /** + * Version: 9.0.0.cl or later Fetches object permission details for a given principal object + * such as a user and group. Requires view access to the metadata object. #### Usage guidelines + * * To get a list of all metadata objects that a user or group can access, specify the + * `type` and GUID or name of the principal. * To get permission details for a + * specific object, add the `type` and GUID or name of the metadata object to your API + * request. Upon successful execution, the API returns a list of metadata objects and permission + * details for each object. + * + * @param fetchPermissionsOfPrincipalsRequest (required) + * @return ApiResponse<PermissionOfPrincipalsResponse> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the + * response body + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 Fetching permissions of principals is successful. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public ApiResponse fetchPermissionsOfPrincipalsWithHttpInfo( + FetchPermissionsOfPrincipalsRequest fetchPermissionsOfPrincipalsRequest) + throws ApiException { + okhttp3.Call localVarCall = + fetchPermissionsOfPrincipalsValidateBeforeCall( + fetchPermissionsOfPrincipalsRequest, null); + Type localVarReturnType = new TypeToken() {}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); + } + + /** + * (asynchronously) Version: 9.0.0.cl or later Fetches object permission details for a given + * principal object such as a user and group. Requires view access to the metadata object. #### + * Usage guidelines * To get a list of all metadata objects that a user or group can access, + * specify the `type` and GUID or name of the principal. * To get permission details + * for a specific object, add the `type` and GUID or name of the metadata object to + * your API request. Upon successful execution, the API returns a list of metadata objects and + * permission details for each object. + * + * @param fetchPermissionsOfPrincipalsRequest (required) + * @param _callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body + * object + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 Fetching permissions of principals is successful. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public okhttp3.Call fetchPermissionsOfPrincipalsAsync( + FetchPermissionsOfPrincipalsRequest fetchPermissionsOfPrincipalsRequest, + final ApiCallback _callback) + throws ApiException { + + okhttp3.Call localVarCall = + fetchPermissionsOfPrincipalsValidateBeforeCall( + fetchPermissionsOfPrincipalsRequest, _callback); + Type localVarReturnType = new TypeToken() {}.getType(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; + } + /** + * Build call for fetchPermissionsOnMetadata + * + * @param fetchPermissionsOnMetadataRequest (required) + * @param _callback Callback for upload/download progress + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 Fetching permissions of metadata objects is successful. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public okhttp3.Call fetchPermissionsOnMetadataCall( + FetchPermissionsOnMetadataRequest fetchPermissionsOnMetadataRequest, + final ApiCallback _callback) + throws ApiException { + String basePath = null; + // Operation Servers + String[] localBasePaths = new String[] {}; + + // Determine Base Path to Use + if (localCustomBaseUrl != null) { + basePath = localCustomBaseUrl; + } else if (localBasePaths.length > 0) { + basePath = localBasePaths[localHostIndex]; + } else { + basePath = null; + } + + Object localVarPostBody = fetchPermissionsOnMetadataRequest; + + // create path and map variables + String localVarPath = "/api/rest/2.0/security/metadata/fetch-permissions"; + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + final String[] localVarAccepts = {"application/json"}; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = {"application/json"}; + final String localVarContentType = + localVarApiClient.selectHeaderContentType(localVarContentTypes); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } + + String[] localVarAuthNames = new String[] {"bearerAuth"}; + return localVarApiClient.buildCall( + basePath, + localVarPath, + "POST", + localVarQueryParams, + localVarCollectionQueryParams, + localVarPostBody, + localVarHeaderParams, + localVarCookieParams, + localVarFormParams, + localVarAuthNames, + _callback); + } + + @SuppressWarnings("rawtypes") + private okhttp3.Call fetchPermissionsOnMetadataValidateBeforeCall( + FetchPermissionsOnMetadataRequest fetchPermissionsOnMetadataRequest, + final ApiCallback _callback) + throws ApiException { + // verify the required parameter 'fetchPermissionsOnMetadataRequest' is set + if (fetchPermissionsOnMetadataRequest == null) { + throw new ApiException( + "Missing the required parameter 'fetchPermissionsOnMetadataRequest' when" + + " calling fetchPermissionsOnMetadata(Async)"); + } + + return fetchPermissionsOnMetadataCall(fetchPermissionsOnMetadataRequest, _callback); + } + + /** + * Version: 9.0.0.cl or later Fetches permission details for a given metadata object. Requires + * view access to the metadata object. #### Usage guidelines * To fetch a list of users and + * groups for a metadata object, specify `type` and GUID or name of the metadata + * object. * To get permission details for a specific user or group, add `type` and + * GUID or name of the principal object to your API request. Upon successful execution, the API + * returns permission details and principal information for the object specified in the API + * request. + * + * @param fetchPermissionsOnMetadataRequest (required) + * @return PermissionOfMetadataResponse + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the + * response body + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 Fetching permissions of metadata objects is successful. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public PermissionOfMetadataResponse fetchPermissionsOnMetadata( + FetchPermissionsOnMetadataRequest fetchPermissionsOnMetadataRequest) + throws ApiException { + ApiResponse localVarResp = + fetchPermissionsOnMetadataWithHttpInfo(fetchPermissionsOnMetadataRequest); + return localVarResp.getData(); + } + + /** + * Version: 9.0.0.cl or later Fetches permission details for a given metadata object. Requires + * view access to the metadata object. #### Usage guidelines * To fetch a list of users and + * groups for a metadata object, specify `type` and GUID or name of the metadata + * object. * To get permission details for a specific user or group, add `type` and + * GUID or name of the principal object to your API request. Upon successful execution, the API + * returns permission details and principal information for the object specified in the API + * request. + * + * @param fetchPermissionsOnMetadataRequest (required) + * @return ApiResponse<PermissionOfMetadataResponse> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the + * response body + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 Fetching permissions of metadata objects is successful. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public ApiResponse fetchPermissionsOnMetadataWithHttpInfo( + FetchPermissionsOnMetadataRequest fetchPermissionsOnMetadataRequest) + throws ApiException { + okhttp3.Call localVarCall = + fetchPermissionsOnMetadataValidateBeforeCall( + fetchPermissionsOnMetadataRequest, null); + Type localVarReturnType = new TypeToken() {}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); + } + + /** + * (asynchronously) Version: 9.0.0.cl or later Fetches permission details for a given metadata + * object. Requires view access to the metadata object. #### Usage guidelines * To fetch a list + * of users and groups for a metadata object, specify `type` and GUID or name of the + * metadata object. * To get permission details for a specific user or group, add + * `type` and GUID or name of the principal object to your API request. Upon + * successful execution, the API returns permission details and principal information for the + * object specified in the API request. + * + * @param fetchPermissionsOnMetadataRequest (required) + * @param _callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body + * object + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 Fetching permissions of metadata objects is successful. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public okhttp3.Call fetchPermissionsOnMetadataAsync( + FetchPermissionsOnMetadataRequest fetchPermissionsOnMetadataRequest, + final ApiCallback _callback) + throws ApiException { + + okhttp3.Call localVarCall = + fetchPermissionsOnMetadataValidateBeforeCall( + fetchPermissionsOnMetadataRequest, _callback); + Type localVarReturnType = new TypeToken() {}.getType(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; + } + /** + * Build call for forceLogoutUsers + * + * @param forceLogoutUsersRequest (required) + * @param _callback Callback for upload/download progress + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
204 Force logging out of users operation successful. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public okhttp3.Call forceLogoutUsersCall( + ForceLogoutUsersRequest forceLogoutUsersRequest, final ApiCallback _callback) + throws ApiException { + String basePath = null; + // Operation Servers + String[] localBasePaths = new String[] {}; + + // Determine Base Path to Use + if (localCustomBaseUrl != null) { + basePath = localCustomBaseUrl; + } else if (localBasePaths.length > 0) { + basePath = localBasePaths[localHostIndex]; + } else { + basePath = null; + } + + Object localVarPostBody = forceLogoutUsersRequest; + + // create path and map variables + String localVarPath = "/api/rest/2.0/users/force-logout"; + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + final String[] localVarAccepts = {"application/json"}; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = {"application/json"}; + final String localVarContentType = + localVarApiClient.selectHeaderContentType(localVarContentTypes); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } + + String[] localVarAuthNames = new String[] {"bearerAuth"}; + return localVarApiClient.buildCall( + basePath, + localVarPath, + "POST", + localVarQueryParams, + localVarCollectionQueryParams, + localVarPostBody, + localVarHeaderParams, + localVarCookieParams, + localVarFormParams, + localVarAuthNames, + _callback); + } + + @SuppressWarnings("rawtypes") + private okhttp3.Call forceLogoutUsersValidateBeforeCall( + ForceLogoutUsersRequest forceLogoutUsersRequest, final ApiCallback _callback) + throws ApiException { + // verify the required parameter 'forceLogoutUsersRequest' is set + if (forceLogoutUsersRequest == null) { + throw new ApiException( + "Missing the required parameter 'forceLogoutUsersRequest' when calling" + + " forceLogoutUsers(Async)"); + } + + return forceLogoutUsersCall(forceLogoutUsersRequest, _callback); + } + + /** + * Version: 9.0.0.cl or later Enforces logout on current user sessions. Use this API with + * caution as it may invalidate active user sessions and force users to re-login. Make sure you + * specify the usernames or GUIDs. If you pass null values in the API call, all user sessions on + * your cluster become invalid, and the users are forced to re-login. Requires + * `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access + * Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, + * the `USER_ADMINISTRATION` (**Can manage users**) privilege is required. + * + * @param forceLogoutUsersRequest (required) + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the + * response body + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
204 Force logging out of users operation successful. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public void forceLogoutUsers(ForceLogoutUsersRequest forceLogoutUsersRequest) + throws ApiException { + forceLogoutUsersWithHttpInfo(forceLogoutUsersRequest); + } + + /** + * Version: 9.0.0.cl or later Enforces logout on current user sessions. Use this API with + * caution as it may invalidate active user sessions and force users to re-login. Make sure you + * specify the usernames or GUIDs. If you pass null values in the API call, all user sessions on + * your cluster become invalid, and the users are forced to re-login. Requires + * `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access + * Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, + * the `USER_ADMINISTRATION` (**Can manage users**) privilege is required. + * + * @param forceLogoutUsersRequest (required) + * @return ApiResponse<Void> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the + * response body + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
204 Force logging out of users operation successful. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public ApiResponse forceLogoutUsersWithHttpInfo( + ForceLogoutUsersRequest forceLogoutUsersRequest) throws ApiException { + okhttp3.Call localVarCall = + forceLogoutUsersValidateBeforeCall(forceLogoutUsersRequest, null); + return localVarApiClient.execute(localVarCall); + } + + /** + * (asynchronously) Version: 9.0.0.cl or later Enforces logout on current user sessions. Use + * this API with caution as it may invalidate active user sessions and force users to re-login. + * Make sure you specify the usernames or GUIDs. If you pass null values in the API call, all + * user sessions on your cluster become invalid, and the users are forced to re-login. Requires + * `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access + * Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, + * the `USER_ADMINISTRATION` (**Can manage users**) privilege is required. + * + * @param forceLogoutUsersRequest (required) + * @param _callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body + * object + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
204 Force logging out of users operation successful. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public okhttp3.Call forceLogoutUsersAsync( + ForceLogoutUsersRequest forceLogoutUsersRequest, final ApiCallback _callback) + throws ApiException { + + okhttp3.Call localVarCall = + forceLogoutUsersValidateBeforeCall(forceLogoutUsersRequest, _callback); + localVarApiClient.executeAsync(localVarCall, _callback); + return localVarCall; + } + /** + * Build call for generateCSV + * + * @param generateCSVRequest (required) + * @param _callback Callback for upload/download progress + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 Generate custom calendar data based on specifications, as a CSV file. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public okhttp3.Call generateCSVCall( + GenerateCSVRequest generateCSVRequest, final ApiCallback _callback) + throws ApiException { + String basePath = null; + // Operation Servers + String[] localBasePaths = new String[] {}; + + // Determine Base Path to Use + if (localCustomBaseUrl != null) { + basePath = localCustomBaseUrl; + } else if (localBasePaths.length > 0) { + basePath = localBasePaths[localHostIndex]; + } else { + basePath = null; + } + + Object localVarPostBody = generateCSVRequest; + + // create path and map variables + String localVarPath = "/api/rest/2.0/calendars/generate-csv"; + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + final String[] localVarAccepts = {"application/json"}; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = {"application/json"}; + final String localVarContentType = + localVarApiClient.selectHeaderContentType(localVarContentTypes); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } + + String[] localVarAuthNames = new String[] {"bearerAuth"}; + return localVarApiClient.buildCall( + basePath, + localVarPath, + "POST", + localVarQueryParams, + localVarCollectionQueryParams, + localVarPostBody, + localVarHeaderParams, + localVarCookieParams, + localVarFormParams, + localVarAuthNames, + _callback); + } + + @SuppressWarnings("rawtypes") + private okhttp3.Call generateCSVValidateBeforeCall( + GenerateCSVRequest generateCSVRequest, final ApiCallback _callback) + throws ApiException { + // verify the required parameter 'generateCSVRequest' is set + if (generateCSVRequest == null) { + throw new ApiException( + "Missing the required parameter 'generateCSVRequest' when calling" + + " generateCSV(Async)"); + } + + return generateCSVCall(generateCSVRequest, _callback); + } + + /** + * Version: 10.12.0.cl or later Exports a [custom + * calendar](https://docs.thoughtspot.com/cloud/latest/connections-cust-cal) in the CSV format. + * Requires `DATAMANAGEMENT` (**Can manage data**) or `ADMINISTRATION` + * (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control + * (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your ThoughtSpot + * instance, the `CAN_MANAGE_CUSTOM_CALENDAR` (**Can manage custom calendars**) + * privilege is required. #### Usage guidelines Use this API to download a custom calendar in + * the CSV file format. In your API request, specify the following parameters. * Start and end + * date of the calendar. For \"month offset\" calendars, the start date must match the + * month defined in the `month_offset` attribute. You can also specify optional + * parameters such as the starting day of the week and prefixes for the quarter and year labels. + * + * @param generateCSVRequest (required) + * @return Object + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the + * response body + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 Generate custom calendar data based on specifications, as a CSV file. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public Object generateCSV(GenerateCSVRequest generateCSVRequest) throws ApiException { + ApiResponse localVarResp = generateCSVWithHttpInfo(generateCSVRequest); + return localVarResp.getData(); + } + + /** + * Version: 10.12.0.cl or later Exports a [custom + * calendar](https://docs.thoughtspot.com/cloud/latest/connections-cust-cal) in the CSV format. + * Requires `DATAMANAGEMENT` (**Can manage data**) or `ADMINISTRATION` + * (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control + * (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your ThoughtSpot + * instance, the `CAN_MANAGE_CUSTOM_CALENDAR` (**Can manage custom calendars**) + * privilege is required. #### Usage guidelines Use this API to download a custom calendar in + * the CSV file format. In your API request, specify the following parameters. * Start and end + * date of the calendar. For \"month offset\" calendars, the start date must match the + * month defined in the `month_offset` attribute. You can also specify optional + * parameters such as the starting day of the week and prefixes for the quarter and year labels. + * + * @param generateCSVRequest (required) + * @return ApiResponse<Object> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the + * response body + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 Generate custom calendar data based on specifications, as a CSV file. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public ApiResponse generateCSVWithHttpInfo(GenerateCSVRequest generateCSVRequest) + throws ApiException { + okhttp3.Call localVarCall = generateCSVValidateBeforeCall(generateCSVRequest, null); + Type localVarReturnType = new TypeToken() {}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); + } + + /** + * (asynchronously) Version: 10.12.0.cl or later Exports a [custom + * calendar](https://docs.thoughtspot.com/cloud/latest/connections-cust-cal) in the CSV format. + * Requires `DATAMANAGEMENT` (**Can manage data**) or `ADMINISTRATION` + * (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control + * (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your ThoughtSpot + * instance, the `CAN_MANAGE_CUSTOM_CALENDAR` (**Can manage custom calendars**) + * privilege is required. #### Usage guidelines Use this API to download a custom calendar in + * the CSV file format. In your API request, specify the following parameters. * Start and end + * date of the calendar. For \"month offset\" calendars, the start date must match the + * month defined in the `month_offset` attribute. You can also specify optional + * parameters such as the starting day of the week and prefixes for the quarter and year labels. + * + * @param generateCSVRequest (required) + * @param _callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body + * object + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 Generate custom calendar data based on specifications, as a CSV file. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public okhttp3.Call generateCSVAsync( + GenerateCSVRequest generateCSVRequest, final ApiCallback _callback) + throws ApiException { + + okhttp3.Call localVarCall = generateCSVValidateBeforeCall(generateCSVRequest, _callback); + Type localVarReturnType = new TypeToken() {}.getType(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; + } + /** + * Build call for getCurrentUserInfo + * + * @param _callback Callback for upload/download progress + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 Fetch current session user detail successful. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public okhttp3.Call getCurrentUserInfoCall(final ApiCallback _callback) throws ApiException { + String basePath = null; + // Operation Servers + String[] localBasePaths = new String[] {}; + + // Determine Base Path to Use + if (localCustomBaseUrl != null) { + basePath = localCustomBaseUrl; + } else if (localBasePaths.length > 0) { + basePath = localBasePaths[localHostIndex]; + } else { + basePath = null; + } + + Object localVarPostBody = null; + + // create path and map variables + String localVarPath = "/api/rest/2.0/auth/session/user"; + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + final String[] localVarAccepts = {"application/json"}; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = {}; + final String localVarContentType = + localVarApiClient.selectHeaderContentType(localVarContentTypes); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } + + String[] localVarAuthNames = new String[] {"bearerAuth"}; + return localVarApiClient.buildCall( + basePath, + localVarPath, + "GET", + localVarQueryParams, + localVarCollectionQueryParams, + localVarPostBody, + localVarHeaderParams, + localVarCookieParams, + localVarFormParams, + localVarAuthNames, + _callback); + } + + @SuppressWarnings("rawtypes") + private okhttp3.Call getCurrentUserInfoValidateBeforeCall(final ApiCallback _callback) + throws ApiException { + return getCurrentUserInfoCall(_callback); + } + + /** + * Version: 9.0.0.cl or later Retrieves details of the current user session for the token + * provided in the request header. Any ThoughtSpot user can access this endpoint and send an API + * request. The data returned in the API response varies according to user's privilege and + * object access permissions. **NOTE**: In ThoughtSpot, users with cluster administration + * privileges can access all Orgs by default. However, unless the administrator is explicitly + * added to an Org, the Orgs list in the session information returned by the API will include + * only the Primary Org. To include other Orgs in the API response, you must explicitly add the + * administrator to each Org in the Admin settings page in the UI or via user REST API. + * + * @return User + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the + * response body + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 Fetch current session user detail successful. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public User getCurrentUserInfo() throws ApiException { + ApiResponse localVarResp = getCurrentUserInfoWithHttpInfo(); + return localVarResp.getData(); + } + + /** + * Version: 9.0.0.cl or later Retrieves details of the current user session for the token + * provided in the request header. Any ThoughtSpot user can access this endpoint and send an API + * request. The data returned in the API response varies according to user's privilege and + * object access permissions. **NOTE**: In ThoughtSpot, users with cluster administration + * privileges can access all Orgs by default. However, unless the administrator is explicitly + * added to an Org, the Orgs list in the session information returned by the API will include + * only the Primary Org. To include other Orgs in the API response, you must explicitly add the + * administrator to each Org in the Admin settings page in the UI or via user REST API. + * + * @return ApiResponse<User> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the + * response body + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 Fetch current session user detail successful. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public ApiResponse getCurrentUserInfoWithHttpInfo() throws ApiException { + okhttp3.Call localVarCall = getCurrentUserInfoValidateBeforeCall(null); + Type localVarReturnType = new TypeToken() {}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); + } + + /** + * (asynchronously) Version: 9.0.0.cl or later Retrieves details of the current user session for + * the token provided in the request header. Any ThoughtSpot user can access this endpoint and + * send an API request. The data returned in the API response varies according to user's + * privilege and object access permissions. **NOTE**: In ThoughtSpot, users with cluster + * administration privileges can access all Orgs by default. However, unless the administrator + * is explicitly added to an Org, the Orgs list in the session information returned by the API + * will include only the Primary Org. To include other Orgs in the API response, you must + * explicitly add the administrator to each Org in the Admin settings page in the UI or via user + * REST API. + * + * @param _callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body + * object + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 Fetch current session user detail successful. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public okhttp3.Call getCurrentUserInfoAsync(final ApiCallback _callback) + throws ApiException { + + okhttp3.Call localVarCall = getCurrentUserInfoValidateBeforeCall(_callback); + Type localVarReturnType = new TypeToken() {}.getType(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; + } + /** + * Build call for getCurrentUserToken + * + * @param _callback Callback for upload/download progress + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 Fetching token for current user successful. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public okhttp3.Call getCurrentUserTokenCall(final ApiCallback _callback) throws ApiException { + String basePath = null; + // Operation Servers + String[] localBasePaths = new String[] {}; + + // Determine Base Path to Use + if (localCustomBaseUrl != null) { + basePath = localCustomBaseUrl; + } else if (localBasePaths.length > 0) { + basePath = localBasePaths[localHostIndex]; + } else { + basePath = null; + } + + Object localVarPostBody = null; + + // create path and map variables + String localVarPath = "/api/rest/2.0/auth/session/token"; + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + final String[] localVarAccepts = {"application/json"}; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = {}; + final String localVarContentType = + localVarApiClient.selectHeaderContentType(localVarContentTypes); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } + + String[] localVarAuthNames = new String[] {"bearerAuth"}; + return localVarApiClient.buildCall( + basePath, + localVarPath, + "GET", + localVarQueryParams, + localVarCollectionQueryParams, + localVarPostBody, + localVarHeaderParams, + localVarCookieParams, + localVarFormParams, + localVarAuthNames, + _callback); + } + + @SuppressWarnings("rawtypes") + private okhttp3.Call getCurrentUserTokenValidateBeforeCall(final ApiCallback _callback) + throws ApiException { + return getCurrentUserTokenCall(_callback); + } + + /** + * Version: 9.4.0.cl or later Retrieves details of the current session token for the bearer + * token provided in the request header. This API endpoint does not create a new token. Instead, + * it returns details about the token, including the token string, creation time, expiration + * time, and the associated user. Use this endpoint to introspect your current session token, + * debug authentication issues, or when a frontend application needs session token details. Any + * ThoughtSpot user with a valid bearer token can access this endpoint and send an API request + * + * @return GetTokenResponse + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the + * response body + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 Fetching token for current user successful. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public GetTokenResponse getCurrentUserToken() throws ApiException { + ApiResponse localVarResp = getCurrentUserTokenWithHttpInfo(); + return localVarResp.getData(); + } + + /** + * Version: 9.4.0.cl or later Retrieves details of the current session token for the bearer + * token provided in the request header. This API endpoint does not create a new token. Instead, + * it returns details about the token, including the token string, creation time, expiration + * time, and the associated user. Use this endpoint to introspect your current session token, + * debug authentication issues, or when a frontend application needs session token details. Any + * ThoughtSpot user with a valid bearer token can access this endpoint and send an API request + * + * @return ApiResponse<GetTokenResponse> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the + * response body + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 Fetching token for current user successful. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public ApiResponse getCurrentUserTokenWithHttpInfo() throws ApiException { + okhttp3.Call localVarCall = getCurrentUserTokenValidateBeforeCall(null); + Type localVarReturnType = new TypeToken() {}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); + } + + /** + * (asynchronously) Version: 9.4.0.cl or later Retrieves details of the current session token + * for the bearer token provided in the request header. This API endpoint does not create a new + * token. Instead, it returns details about the token, including the token string, creation + * time, expiration time, and the associated user. Use this endpoint to introspect your current + * session token, debug authentication issues, or when a frontend application needs session + * token details. Any ThoughtSpot user with a valid bearer token can access this endpoint and + * send an API request + * + * @param _callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body + * object + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 Fetching token for current user successful. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public okhttp3.Call getCurrentUserTokenAsync(final ApiCallback _callback) + throws ApiException { + + okhttp3.Call localVarCall = getCurrentUserTokenValidateBeforeCall(_callback); + Type localVarReturnType = new TypeToken() {}.getType(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; + } + /** + * Build call for getCustomAccessToken + * + * @param getCustomAccessTokenRequest (required) + * @param _callback Callback for upload/download progress + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 ABAC token creation was successful. -
400 Invalid request. This could be due to missing or incorrect parameters. -
401 Unauthorized access. The request could not be authenticated. -
403 Forbidden access. The user does not have permission to access this resource. -
500 An unexpected error occurred on the server. -
+ */ + public okhttp3.Call getCustomAccessTokenCall( + GetCustomAccessTokenRequest getCustomAccessTokenRequest, final ApiCallback _callback) + throws ApiException { + String basePath = null; + // Operation Servers + String[] localBasePaths = new String[] {}; + + // Determine Base Path to Use + if (localCustomBaseUrl != null) { + basePath = localCustomBaseUrl; + } else if (localBasePaths.length > 0) { + basePath = localBasePaths[localHostIndex]; + } else { + basePath = null; + } + + Object localVarPostBody = getCustomAccessTokenRequest; + + // create path and map variables + String localVarPath = "/api/rest/2.0/auth/token/custom"; + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + final String[] localVarAccepts = {"application/json"}; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = {"application/json"}; + final String localVarContentType = + localVarApiClient.selectHeaderContentType(localVarContentTypes); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } + + String[] localVarAuthNames = new String[] {}; + return localVarApiClient.buildCall( + basePath, + localVarPath, + "POST", + localVarQueryParams, + localVarCollectionQueryParams, + localVarPostBody, + localVarHeaderParams, + localVarCookieParams, + localVarFormParams, + localVarAuthNames, + _callback); + } + + @SuppressWarnings("rawtypes") + private okhttp3.Call getCustomAccessTokenValidateBeforeCall( + GetCustomAccessTokenRequest getCustomAccessTokenRequest, final ApiCallback _callback) + throws ApiException { + // verify the required parameter 'getCustomAccessTokenRequest' is set + if (getCustomAccessTokenRequest == null) { + throw new ApiException( + "Missing the required parameter 'getCustomAccessTokenRequest' when calling" + + " getCustomAccessToken(Async)"); + } + + return getCustomAccessTokenCall(getCustomAccessTokenRequest, _callback); + } + + /** + * Version: 10.4.0.cl or later Creates an authentication token that provides values for the + * formula variables in the Row Level Security (RLS) rules for a given user. Recommended for use + * cases that require Attribute-based access control (ABAC) via RLS. #### Required privileges To + * add a new user and assign privileges during auto-creation, the `ADMINISTRATION` + * (**Can administer ThoughtSpot**) privilege is required. If [Role-Based Access Control + * (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled, the + * `CONTROL_TRUSTED_AUTH` (**Can Enable or Disable Trusted Authentication**) privilege + * and edit access to the data source are required. To configure formula variables for all Orgs + * on your instance or the Primary Org, cluster administration privileges are required. Org + * administrators can configure formula variables for their respective Orgs. If Role-Based + * Access Control (RBAC) is enabled, users with the `CAN_MANAGE_VARIABLES` (**Can + * manage variables**) role privilege can also create and manage variables for their Org + * context. #### Usage guidelines You can generate a token by providing a `username` + * and `password`, or by using a `secret_key`. To generate a + * `secret_key`, the administrator must enable [Trusted + * authentication](https://developers.thoughtspot.com/docs/trusted-auth-secret-key) in the + * **Develop** > **Customizations** > **Security Settings** page. **Note**: * When both + * `password` and `secret_key` are included in the API request, + * `password` takes precedence. * If [Multi-Factor Authentication + * (MFA)](https://docs.thoughtspot.com/cloud/latest/authentication-local-mfa) is enabled on your + * instance, the API login request with `username` and `password` returns an + * error. You can switch to token-based authentication with `secret_key` or contact + * ThoughtSpot Support for assistance. The token obtained from ThoughtSpot is valid for 5 + * minutes by default. You can configure the token expiration time as required. #### ABAC via + * RLS To implement ABAC via RLS and assign security entitlements to users during session + * creation, generate a token with custom variable values. The values set in the authentication + * token are applied to the formula variables referenced in RLS rules at the table level, which + * determines the data each user can access based on their entitlements. The variable values can + * be configured to persist for a specific set of Models in user sessions initiated with the + * token, allowing different RLS rules to be set for different data models. Once defined, the + * rules are added to the user's `variable_values` object, after which all + * sessions will use the persisted values. For more information, see [ABAC via tokens + * Documentation](https://developers.thoughtspot.com/docs/abac-via-rls-variables). ##### Formula + * variables Before defining variable values, ensure the variables are created and available on + * your instance. To create a formula variable, you can use the **Create variable** + * (`/api/rest/2.0/template/variables/create`) REST API endpoint, with the variable + * `type` set as `Formula_Variable` in the API request. The API doesn't + * support `\"persist_option\": \"RESET\"` and + * `\"persist_option\": \"NONE\"` when `variable_values` + * are defined in the request. If you are using `variable_values` for token + * generation, you must use other supported persist options such as `APPEND` or + * `REPLACE`. If you want to use `RESET` or `NONE`, do not pass + * any `variable_values`. In such cases, `variable_values` will remain + * unaffected. #### Supported objects The supported object type is `LOGICAL_TABLE`. + * When using `object_id` with `variable_values`, models are supported. #### + * Just-in-time provisioning For [just-in-time user creation and + * provisioning](https://developers.thoughtspot.com/docs/just-in-time-provisioning), specify the + * following attributes in the API request: * `auto_create` * `username` * + * `display_name` * `email` * `groups` Set `auto_create` + * to `true` if the username does not exist in ThoughtSpot. If the username already + * exists in ThoughtSpot and `auto_create` is set to `true`, user properties + * such as display name, email, Org and group entitlements will not be updated with new values. + * Setting `auto_create` to `true` does not create formula variables. Hence, + * this setting will not be applicable to `variable_values`. #### Important point to + * note All options in the token creation APIs that define user access to data in ThoughtSpot + * will take effect during token creation, not when the token is used for authentication. For + * example, `auto_create:true` will create the user when the authentication token is + * created. Persist options such as `APPEND` and `REPLACE` will persist + * `variable_values` on the user profile when the token is created. + * + * @param getCustomAccessTokenRequest (required) + * @return AccessToken + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the + * response body + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 ABAC token creation was successful. -
400 Invalid request. This could be due to missing or incorrect parameters. -
401 Unauthorized access. The request could not be authenticated. -
403 Forbidden access. The user does not have permission to access this resource. -
500 An unexpected error occurred on the server. -
+ */ + public AccessToken getCustomAccessToken(GetCustomAccessTokenRequest getCustomAccessTokenRequest) + throws ApiException { + ApiResponse localVarResp = + getCustomAccessTokenWithHttpInfo(getCustomAccessTokenRequest); + return localVarResp.getData(); + } + + /** + * Version: 10.4.0.cl or later Creates an authentication token that provides values for the + * formula variables in the Row Level Security (RLS) rules for a given user. Recommended for use + * cases that require Attribute-based access control (ABAC) via RLS. #### Required privileges To + * add a new user and assign privileges during auto-creation, the `ADMINISTRATION` + * (**Can administer ThoughtSpot**) privilege is required. If [Role-Based Access Control + * (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled, the + * `CONTROL_TRUSTED_AUTH` (**Can Enable or Disable Trusted Authentication**) privilege + * and edit access to the data source are required. To configure formula variables for all Orgs + * on your instance or the Primary Org, cluster administration privileges are required. Org + * administrators can configure formula variables for their respective Orgs. If Role-Based + * Access Control (RBAC) is enabled, users with the `CAN_MANAGE_VARIABLES` (**Can + * manage variables**) role privilege can also create and manage variables for their Org + * context. #### Usage guidelines You can generate a token by providing a `username` + * and `password`, or by using a `secret_key`. To generate a + * `secret_key`, the administrator must enable [Trusted + * authentication](https://developers.thoughtspot.com/docs/trusted-auth-secret-key) in the + * **Develop** > **Customizations** > **Security Settings** page. **Note**: * When both + * `password` and `secret_key` are included in the API request, + * `password` takes precedence. * If [Multi-Factor Authentication + * (MFA)](https://docs.thoughtspot.com/cloud/latest/authentication-local-mfa) is enabled on your + * instance, the API login request with `username` and `password` returns an + * error. You can switch to token-based authentication with `secret_key` or contact + * ThoughtSpot Support for assistance. The token obtained from ThoughtSpot is valid for 5 + * minutes by default. You can configure the token expiration time as required. #### ABAC via + * RLS To implement ABAC via RLS and assign security entitlements to users during session + * creation, generate a token with custom variable values. The values set in the authentication + * token are applied to the formula variables referenced in RLS rules at the table level, which + * determines the data each user can access based on their entitlements. The variable values can + * be configured to persist for a specific set of Models in user sessions initiated with the + * token, allowing different RLS rules to be set for different data models. Once defined, the + * rules are added to the user's `variable_values` object, after which all + * sessions will use the persisted values. For more information, see [ABAC via tokens + * Documentation](https://developers.thoughtspot.com/docs/abac-via-rls-variables). ##### Formula + * variables Before defining variable values, ensure the variables are created and available on + * your instance. To create a formula variable, you can use the **Create variable** + * (`/api/rest/2.0/template/variables/create`) REST API endpoint, with the variable + * `type` set as `Formula_Variable` in the API request. The API doesn't + * support `\"persist_option\": \"RESET\"` and + * `\"persist_option\": \"NONE\"` when `variable_values` + * are defined in the request. If you are using `variable_values` for token + * generation, you must use other supported persist options such as `APPEND` or + * `REPLACE`. If you want to use `RESET` or `NONE`, do not pass + * any `variable_values`. In such cases, `variable_values` will remain + * unaffected. #### Supported objects The supported object type is `LOGICAL_TABLE`. + * When using `object_id` with `variable_values`, models are supported. #### + * Just-in-time provisioning For [just-in-time user creation and + * provisioning](https://developers.thoughtspot.com/docs/just-in-time-provisioning), specify the + * following attributes in the API request: * `auto_create` * `username` * + * `display_name` * `email` * `groups` Set `auto_create` + * to `true` if the username does not exist in ThoughtSpot. If the username already + * exists in ThoughtSpot and `auto_create` is set to `true`, user properties + * such as display name, email, Org and group entitlements will not be updated with new values. + * Setting `auto_create` to `true` does not create formula variables. Hence, + * this setting will not be applicable to `variable_values`. #### Important point to + * note All options in the token creation APIs that define user access to data in ThoughtSpot + * will take effect during token creation, not when the token is used for authentication. For + * example, `auto_create:true` will create the user when the authentication token is + * created. Persist options such as `APPEND` and `REPLACE` will persist + * `variable_values` on the user profile when the token is created. + * + * @param getCustomAccessTokenRequest (required) + * @return ApiResponse<AccessToken> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the + * response body + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 ABAC token creation was successful. -
400 Invalid request. This could be due to missing or incorrect parameters. -
401 Unauthorized access. The request could not be authenticated. -
403 Forbidden access. The user does not have permission to access this resource. -
500 An unexpected error occurred on the server. -
+ */ + public ApiResponse getCustomAccessTokenWithHttpInfo( + GetCustomAccessTokenRequest getCustomAccessTokenRequest) throws ApiException { + okhttp3.Call localVarCall = + getCustomAccessTokenValidateBeforeCall(getCustomAccessTokenRequest, null); + Type localVarReturnType = new TypeToken() {}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); + } + + /** + * (asynchronously) Version: 10.4.0.cl or later Creates an authentication token that provides + * values for the formula variables in the Row Level Security (RLS) rules for a given user. + * Recommended for use cases that require Attribute-based access control (ABAC) via RLS. #### + * Required privileges To add a new user and assign privileges during auto-creation, the + * `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege is required. If + * [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled, + * the `CONTROL_TRUSTED_AUTH` (**Can Enable or Disable Trusted Authentication**) + * privilege and edit access to the data source are required. To configure formula variables for + * all Orgs on your instance or the Primary Org, cluster administration privileges are required. + * Org administrators can configure formula variables for their respective Orgs. If Role-Based + * Access Control (RBAC) is enabled, users with the `CAN_MANAGE_VARIABLES` (**Can + * manage variables**) role privilege can also create and manage variables for their Org + * context. #### Usage guidelines You can generate a token by providing a `username` + * and `password`, or by using a `secret_key`. To generate a + * `secret_key`, the administrator must enable [Trusted + * authentication](https://developers.thoughtspot.com/docs/trusted-auth-secret-key) in the + * **Develop** > **Customizations** > **Security Settings** page. **Note**: * When both + * `password` and `secret_key` are included in the API request, + * `password` takes precedence. * If [Multi-Factor Authentication + * (MFA)](https://docs.thoughtspot.com/cloud/latest/authentication-local-mfa) is enabled on your + * instance, the API login request with `username` and `password` returns an + * error. You can switch to token-based authentication with `secret_key` or contact + * ThoughtSpot Support for assistance. The token obtained from ThoughtSpot is valid for 5 + * minutes by default. You can configure the token expiration time as required. #### ABAC via + * RLS To implement ABAC via RLS and assign security entitlements to users during session + * creation, generate a token with custom variable values. The values set in the authentication + * token are applied to the formula variables referenced in RLS rules at the table level, which + * determines the data each user can access based on their entitlements. The variable values can + * be configured to persist for a specific set of Models in user sessions initiated with the + * token, allowing different RLS rules to be set for different data models. Once defined, the + * rules are added to the user's `variable_values` object, after which all + * sessions will use the persisted values. For more information, see [ABAC via tokens + * Documentation](https://developers.thoughtspot.com/docs/abac-via-rls-variables). ##### Formula + * variables Before defining variable values, ensure the variables are created and available on + * your instance. To create a formula variable, you can use the **Create variable** + * (`/api/rest/2.0/template/variables/create`) REST API endpoint, with the variable + * `type` set as `Formula_Variable` in the API request. The API doesn't + * support `\"persist_option\": \"RESET\"` and + * `\"persist_option\": \"NONE\"` when `variable_values` + * are defined in the request. If you are using `variable_values` for token + * generation, you must use other supported persist options such as `APPEND` or + * `REPLACE`. If you want to use `RESET` or `NONE`, do not pass + * any `variable_values`. In such cases, `variable_values` will remain + * unaffected. #### Supported objects The supported object type is `LOGICAL_TABLE`. + * When using `object_id` with `variable_values`, models are supported. #### + * Just-in-time provisioning For [just-in-time user creation and + * provisioning](https://developers.thoughtspot.com/docs/just-in-time-provisioning), specify the + * following attributes in the API request: * `auto_create` * `username` * + * `display_name` * `email` * `groups` Set `auto_create` + * to `true` if the username does not exist in ThoughtSpot. If the username already + * exists in ThoughtSpot and `auto_create` is set to `true`, user properties + * such as display name, email, Org and group entitlements will not be updated with new values. + * Setting `auto_create` to `true` does not create formula variables. Hence, + * this setting will not be applicable to `variable_values`. #### Important point to + * note All options in the token creation APIs that define user access to data in ThoughtSpot + * will take effect during token creation, not when the token is used for authentication. For + * example, `auto_create:true` will create the user when the authentication token is + * created. Persist options such as `APPEND` and `REPLACE` will persist + * `variable_values` on the user profile when the token is created. + * + * @param getCustomAccessTokenRequest (required) + * @param _callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body + * object + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 ABAC token creation was successful. -
400 Invalid request. This could be due to missing or incorrect parameters. -
401 Unauthorized access. The request could not be authenticated. -
403 Forbidden access. The user does not have permission to access this resource. -
500 An unexpected error occurred on the server. -
+ */ + public okhttp3.Call getCustomAccessTokenAsync( + GetCustomAccessTokenRequest getCustomAccessTokenRequest, + final ApiCallback _callback) + throws ApiException { + + okhttp3.Call localVarCall = + getCustomAccessTokenValidateBeforeCall(getCustomAccessTokenRequest, _callback); + Type localVarReturnType = new TypeToken() {}.getType(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; + } + /** + * Build call for getDataSourceSuggestions + * + * @param getDataSourceSuggestionsRequest (required) + * @param _callback Callback for upload/download progress + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + * @http.response.details + * + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 Common successful response -
201 Common error response -
400 Operation failed -
401 Unauthorized access. -
403 Forbidden access. -
500 Operation failed -
+ */ + public okhttp3.Call getDataSourceSuggestionsCall( + GetDataSourceSuggestionsRequest getDataSourceSuggestionsRequest, + final ApiCallback _callback) + throws ApiException { + String basePath = null; + // Operation Servers + String[] localBasePaths = new String[] {}; + + // Determine Base Path to Use + if (localCustomBaseUrl != null) { + basePath = localCustomBaseUrl; + } else if (localBasePaths.length > 0) { + basePath = localBasePaths[localHostIndex]; + } else { + basePath = null; + } + + Object localVarPostBody = getDataSourceSuggestionsRequest; + + // create path and map variables + String localVarPath = "/api/rest/2.0/ai/data-source-suggestions"; + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + final String[] localVarAccepts = {"application/json"}; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = {"application/json"}; + final String localVarContentType = + localVarApiClient.selectHeaderContentType(localVarContentTypes); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } + + String[] localVarAuthNames = new String[] {"bearerAuth"}; + return localVarApiClient.buildCall( + basePath, + localVarPath, + "POST", + localVarQueryParams, + localVarCollectionQueryParams, + localVarPostBody, + localVarHeaderParams, + localVarCookieParams, + localVarFormParams, + localVarAuthNames, + _callback); + } + + @SuppressWarnings("rawtypes") + private okhttp3.Call getDataSourceSuggestionsValidateBeforeCall( + GetDataSourceSuggestionsRequest getDataSourceSuggestionsRequest, + final ApiCallback _callback) + throws ApiException { + // verify the required parameter 'getDataSourceSuggestionsRequest' is set + if (getDataSourceSuggestionsRequest == null) { + throw new ApiException( + "Missing the required parameter 'getDataSourceSuggestionsRequest' when calling" + + " getDataSourceSuggestions(Async)"); + } + + return getDataSourceSuggestionsCall(getDataSourceSuggestionsRequest, _callback); + } + + /** + * Version: 10.15.0.cl or later Suggests the most relevant data sources for a given natural + * language query, ranked by confidence with LLM-generated reasoning. Requires + * `CAN_USE_SPOTTER` privilege and at least view-level access to the underlying + * metadata entities referenced in the response. #### Usage guidelines The request must include: + * - `query`: the natural language question to find relevant data sources for If the + * request is successful, the API returns a ranked list of suggested data sources, each + * containing: - `confidence`: a float score indicating the model's confidence in + * the relevance of the suggestion - `details`: metadata about the data source - + * `data_source_identifier`: the unique ID of the data source - + * `data_source_name`: the display name of the data source - `description`: + * a description of the data source - `reasoning`: LLM-generated rationale explaining + * why the data source was recommended #### Error responses | Code | Description | + * |------|--------------------------------------------------------------------------------------------------------------------------------------------| + * | 401 | Unauthorized — authentication token is missing, expired, or invalid. | | 403 | + * Forbidden — the authenticated user does not have `CAN_USE_SPOTTER` privilege or + * lacks view permission on the underlying metadata entities. | > ###### Note: > * This + * endpoint is currently in Beta. Breaking changes may be introduced before it is made Generally + * Available. > * This endpoint requires Spotter — please contact ThoughtSpot Support to + * enable Spotter on your cluster. + * + * @param getDataSourceSuggestionsRequest (required) + * @return EurekaDataSourceSuggestionResponse + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the + * response body + * @http.response.details + * + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 Common successful response -
201 Common error response -
400 Operation failed -
401 Unauthorized access. -
403 Forbidden access. -
500 Operation failed -
+ */ + public EurekaDataSourceSuggestionResponse getDataSourceSuggestions( + GetDataSourceSuggestionsRequest getDataSourceSuggestionsRequest) throws ApiException { + ApiResponse localVarResp = + getDataSourceSuggestionsWithHttpInfo(getDataSourceSuggestionsRequest); + return localVarResp.getData(); + } + + /** + * Version: 10.15.0.cl or later Suggests the most relevant data sources for a given natural + * language query, ranked by confidence with LLM-generated reasoning. Requires + * `CAN_USE_SPOTTER` privilege and at least view-level access to the underlying + * metadata entities referenced in the response. #### Usage guidelines The request must include: + * - `query`: the natural language question to find relevant data sources for If the + * request is successful, the API returns a ranked list of suggested data sources, each + * containing: - `confidence`: a float score indicating the model's confidence in + * the relevance of the suggestion - `details`: metadata about the data source - + * `data_source_identifier`: the unique ID of the data source - + * `data_source_name`: the display name of the data source - `description`: + * a description of the data source - `reasoning`: LLM-generated rationale explaining + * why the data source was recommended #### Error responses | Code | Description | + * |------|--------------------------------------------------------------------------------------------------------------------------------------------| + * | 401 | Unauthorized — authentication token is missing, expired, or invalid. | | 403 | + * Forbidden — the authenticated user does not have `CAN_USE_SPOTTER` privilege or + * lacks view permission on the underlying metadata entities. | > ###### Note: > * This + * endpoint is currently in Beta. Breaking changes may be introduced before it is made Generally + * Available. > * This endpoint requires Spotter — please contact ThoughtSpot Support to + * enable Spotter on your cluster. + * + * @param getDataSourceSuggestionsRequest (required) + * @return ApiResponse<EurekaDataSourceSuggestionResponse> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the + * response body + * @http.response.details + * + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 Common successful response -
201 Common error response -
400 Operation failed -
401 Unauthorized access. -
403 Forbidden access. -
500 Operation failed -
+ */ + public ApiResponse getDataSourceSuggestionsWithHttpInfo( + GetDataSourceSuggestionsRequest getDataSourceSuggestionsRequest) throws ApiException { + okhttp3.Call localVarCall = + getDataSourceSuggestionsValidateBeforeCall(getDataSourceSuggestionsRequest, null); + Type localVarReturnType = new TypeToken() {}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); + } + + /** + * (asynchronously) Version: 10.15.0.cl or later Suggests the most relevant data sources for a + * given natural language query, ranked by confidence with LLM-generated reasoning. Requires + * `CAN_USE_SPOTTER` privilege and at least view-level access to the underlying + * metadata entities referenced in the response. #### Usage guidelines The request must include: + * - `query`: the natural language question to find relevant data sources for If the + * request is successful, the API returns a ranked list of suggested data sources, each + * containing: - `confidence`: a float score indicating the model's confidence in + * the relevance of the suggestion - `details`: metadata about the data source - + * `data_source_identifier`: the unique ID of the data source - + * `data_source_name`: the display name of the data source - `description`: + * a description of the data source - `reasoning`: LLM-generated rationale explaining + * why the data source was recommended #### Error responses | Code | Description | + * |------|--------------------------------------------------------------------------------------------------------------------------------------------| + * | 401 | Unauthorized — authentication token is missing, expired, or invalid. | | 403 | + * Forbidden — the authenticated user does not have `CAN_USE_SPOTTER` privilege or + * lacks view permission on the underlying metadata entities. | > ###### Note: > * This + * endpoint is currently in Beta. Breaking changes may be introduced before it is made Generally + * Available. > * This endpoint requires Spotter — please contact ThoughtSpot Support to + * enable Spotter on your cluster. + * + * @param getDataSourceSuggestionsRequest (required) + * @param _callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body + * object + * @http.response.details + * + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 Common successful response -
201 Common error response -
400 Operation failed -
401 Unauthorized access. -
403 Forbidden access. -
500 Operation failed -
+ */ + public okhttp3.Call getDataSourceSuggestionsAsync( + GetDataSourceSuggestionsRequest getDataSourceSuggestionsRequest, + final ApiCallback _callback) + throws ApiException { + + okhttp3.Call localVarCall = + getDataSourceSuggestionsValidateBeforeCall( + getDataSourceSuggestionsRequest, _callback); + Type localVarReturnType = new TypeToken() {}.getType(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; + } + /** + * Build call for getFullAccessToken + * + * @param getFullAccessTokenRequest (required) + * @param _callback Callback for upload/download progress + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 Bearer auth token creation successful. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public okhttp3.Call getFullAccessTokenCall( + GetFullAccessTokenRequest getFullAccessTokenRequest, final ApiCallback _callback) + throws ApiException { + String basePath = null; + // Operation Servers + String[] localBasePaths = new String[] {}; + + // Determine Base Path to Use + if (localCustomBaseUrl != null) { + basePath = localCustomBaseUrl; + } else if (localBasePaths.length > 0) { + basePath = localBasePaths[localHostIndex]; + } else { + basePath = null; + } + + Object localVarPostBody = getFullAccessTokenRequest; + + // create path and map variables + String localVarPath = "/api/rest/2.0/auth/token/full"; + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + final String[] localVarAccepts = {"application/json"}; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = {"application/json"}; + final String localVarContentType = + localVarApiClient.selectHeaderContentType(localVarContentTypes); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } + + String[] localVarAuthNames = new String[] {}; + return localVarApiClient.buildCall( + basePath, + localVarPath, + "POST", + localVarQueryParams, + localVarCollectionQueryParams, + localVarPostBody, + localVarHeaderParams, + localVarCookieParams, + localVarFormParams, + localVarAuthNames, + _callback); + } + + @SuppressWarnings("rawtypes") + private okhttp3.Call getFullAccessTokenValidateBeforeCall( + GetFullAccessTokenRequest getFullAccessTokenRequest, final ApiCallback _callback) + throws ApiException { + // verify the required parameter 'getFullAccessTokenRequest' is set + if (getFullAccessTokenRequest == null) { + throw new ApiException( + "Missing the required parameter 'getFullAccessTokenRequest' when calling" + + " getFullAccessToken(Async)"); + } + + return getFullAccessTokenCall(getFullAccessTokenRequest, _callback); + } + + /** + * Version: 9.0.0.cl or later Generates an authentication token for creating a full session in + * ThoughtSpot for a given user. Recommended for use cases that do not require Attribute-based + * access control (ABAC) via Row Level Security (RLS). #### Usage guidelines You can generate a + * token for a user by providing a `username` and `password`, or by using + * the `secret_key` generated for your instance. To generate a `secret_key`, + * the administrator must enable [Trusted + * authentication](https://developers.thoughtspot.com/docs/trusted-auth-secret-key) in the + * **Develop** > **Customizations** > **Security Settings** page. **Note**: * When both + * `password` and `secret_key` are included in the API request, + * `password` takes precedence. * If [Multi-Factor Authentication + * (MFA)](https://docs.thoughtspot.com/cloud/latest/authentication-local-mfa) is enabled on your + * instance, the API login request with `username` and `password` returns an + * error. You can switch to token-based authentication with `secret_key` or contact + * ThoughtSpot Support for assistance. The token obtained from ThoughtSpot is valid for 5 + * minutes by default. You can configure the token expiration time as required. #### + * Just-in-time provisioning For [just-in-time user creation and + * provisioning](https://developers.thoughtspot.com/docs/just-in-time-provisioning), specify the + * following attributes in the API request: * `auto_create` * `username` * + * `display_name` * `email` * `group_identifiers` Set + * `auto_create` to `true` if the username does not exist in ThoughtSpot. If + * the user already exists in ThoughtSpot and `auto_create` is set to + * `true`, user properties such as display name, email and group assignment will be + * updated. To add a new user and assign privileges during auto-creation, the + * `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege is required. If + * [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled, + * the `CONTROL_TRUSTED_AUTH` (**Can Enable or Disable Trusted Authentication**) + * privilege is required. #### Important point to note All options in the token creation APIs + * that define user access to data in ThoughtSpot will take effect during token creation, not + * when the token is used for authentication. For example, `auto_create:true` will + * create the user when the authentication token is created. + * + * @param getFullAccessTokenRequest (required) + * @return Token + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the + * response body + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 Bearer auth token creation successful. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public Token getFullAccessToken(GetFullAccessTokenRequest getFullAccessTokenRequest) + throws ApiException { + ApiResponse localVarResp = getFullAccessTokenWithHttpInfo(getFullAccessTokenRequest); + return localVarResp.getData(); + } + + /** + * Version: 9.0.0.cl or later Generates an authentication token for creating a full session in + * ThoughtSpot for a given user. Recommended for use cases that do not require Attribute-based + * access control (ABAC) via Row Level Security (RLS). #### Usage guidelines You can generate a + * token for a user by providing a `username` and `password`, or by using + * the `secret_key` generated for your instance. To generate a `secret_key`, + * the administrator must enable [Trusted + * authentication](https://developers.thoughtspot.com/docs/trusted-auth-secret-key) in the + * **Develop** > **Customizations** > **Security Settings** page. **Note**: * When both + * `password` and `secret_key` are included in the API request, + * `password` takes precedence. * If [Multi-Factor Authentication + * (MFA)](https://docs.thoughtspot.com/cloud/latest/authentication-local-mfa) is enabled on your + * instance, the API login request with `username` and `password` returns an + * error. You can switch to token-based authentication with `secret_key` or contact + * ThoughtSpot Support for assistance. The token obtained from ThoughtSpot is valid for 5 + * minutes by default. You can configure the token expiration time as required. #### + * Just-in-time provisioning For [just-in-time user creation and + * provisioning](https://developers.thoughtspot.com/docs/just-in-time-provisioning), specify the + * following attributes in the API request: * `auto_create` * `username` * + * `display_name` * `email` * `group_identifiers` Set + * `auto_create` to `true` if the username does not exist in ThoughtSpot. If + * the user already exists in ThoughtSpot and `auto_create` is set to + * `true`, user properties such as display name, email and group assignment will be + * updated. To add a new user and assign privileges during auto-creation, the + * `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege is required. If + * [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled, + * the `CONTROL_TRUSTED_AUTH` (**Can Enable or Disable Trusted Authentication**) + * privilege is required. #### Important point to note All options in the token creation APIs + * that define user access to data in ThoughtSpot will take effect during token creation, not + * when the token is used for authentication. For example, `auto_create:true` will + * create the user when the authentication token is created. + * + * @param getFullAccessTokenRequest (required) + * @return ApiResponse<Token> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the + * response body + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 Bearer auth token creation successful. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public ApiResponse getFullAccessTokenWithHttpInfo( + GetFullAccessTokenRequest getFullAccessTokenRequest) throws ApiException { + okhttp3.Call localVarCall = + getFullAccessTokenValidateBeforeCall(getFullAccessTokenRequest, null); + Type localVarReturnType = new TypeToken() {}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); + } + + /** + * (asynchronously) Version: 9.0.0.cl or later Generates an authentication token for creating a + * full session in ThoughtSpot for a given user. Recommended for use cases that do not require + * Attribute-based access control (ABAC) via Row Level Security (RLS). #### Usage guidelines You + * can generate a token for a user by providing a `username` and `password`, + * or by using the `secret_key` generated for your instance. To generate a + * `secret_key`, the administrator must enable [Trusted + * authentication](https://developers.thoughtspot.com/docs/trusted-auth-secret-key) in the + * **Develop** > **Customizations** > **Security Settings** page. **Note**: * When both + * `password` and `secret_key` are included in the API request, + * `password` takes precedence. * If [Multi-Factor Authentication + * (MFA)](https://docs.thoughtspot.com/cloud/latest/authentication-local-mfa) is enabled on your + * instance, the API login request with `username` and `password` returns an + * error. You can switch to token-based authentication with `secret_key` or contact + * ThoughtSpot Support for assistance. The token obtained from ThoughtSpot is valid for 5 + * minutes by default. You can configure the token expiration time as required. #### + * Just-in-time provisioning For [just-in-time user creation and + * provisioning](https://developers.thoughtspot.com/docs/just-in-time-provisioning), specify the + * following attributes in the API request: * `auto_create` * `username` * + * `display_name` * `email` * `group_identifiers` Set + * `auto_create` to `true` if the username does not exist in ThoughtSpot. If + * the user already exists in ThoughtSpot and `auto_create` is set to + * `true`, user properties such as display name, email and group assignment will be + * updated. To add a new user and assign privileges during auto-creation, the + * `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege is required. If + * [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled, + * the `CONTROL_TRUSTED_AUTH` (**Can Enable or Disable Trusted Authentication**) + * privilege is required. #### Important point to note All options in the token creation APIs + * that define user access to data in ThoughtSpot will take effect during token creation, not + * when the token is used for authentication. For example, `auto_create:true` will + * create the user when the authentication token is created. + * + * @param getFullAccessTokenRequest (required) + * @param _callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body + * object + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 Bearer auth token creation successful. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public okhttp3.Call getFullAccessTokenAsync( + GetFullAccessTokenRequest getFullAccessTokenRequest, final ApiCallback _callback) + throws ApiException { + + okhttp3.Call localVarCall = + getFullAccessTokenValidateBeforeCall(getFullAccessTokenRequest, _callback); + Type localVarReturnType = new TypeToken() {}.getType(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; + } + /** + * Build call for getNLInstructions + * + * @param getNLInstructionsRequest (required) + * @param _callback Callback for upload/download progress + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + * @http.response.details + * + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 Common successful response -
201 Common error response -
400 Operation failed -
401 Unauthorized access. -
403 Forbidden access. -
500 Operation failed -
+ */ + public okhttp3.Call getNLInstructionsCall( + GetNLInstructionsRequest getNLInstructionsRequest, final ApiCallback _callback) + throws ApiException { + String basePath = null; + // Operation Servers + String[] localBasePaths = new String[] {}; + + // Determine Base Path to Use + if (localCustomBaseUrl != null) { + basePath = localCustomBaseUrl; + } else if (localBasePaths.length > 0) { + basePath = localBasePaths[localHostIndex]; + } else { + basePath = null; + } + + Object localVarPostBody = getNLInstructionsRequest; + + // create path and map variables + String localVarPath = "/api/rest/2.0/ai/instructions/get"; + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + final String[] localVarAccepts = {"application/json"}; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = {"application/json"}; + final String localVarContentType = + localVarApiClient.selectHeaderContentType(localVarContentTypes); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } + + String[] localVarAuthNames = new String[] {"bearerAuth"}; + return localVarApiClient.buildCall( + basePath, + localVarPath, + "POST", + localVarQueryParams, + localVarCollectionQueryParams, + localVarPostBody, + localVarHeaderParams, + localVarCookieParams, + localVarFormParams, + localVarAuthNames, + _callback); + } + + @SuppressWarnings("rawtypes") + private okhttp3.Call getNLInstructionsValidateBeforeCall( + GetNLInstructionsRequest getNLInstructionsRequest, final ApiCallback _callback) + throws ApiException { + // verify the required parameter 'getNLInstructionsRequest' is set + if (getNLInstructionsRequest == null) { + throw new ApiException( + "Missing the required parameter 'getNLInstructionsRequest' when calling" + + " getNLInstructions(Async)"); + } + + return getNLInstructionsCall(getNLInstructionsRequest, _callback); + } + + /** + * Version: 10.15.0.cl or later Retrieves existing natural language (NL) instructions configured + * for a specific data model. These instructions guide the AI system in understanding data + * context and generating more accurate responses. Requires `CAN_USE_SPOTTER` + * privilege, at least view access on the data model, and a bearer token corresponding to the + * org where the data model exists. #### Usage guidelines The request must include: - + * `data_source_identifier`: the unique ID of the data model to retrieve instructions + * for If the request is successful, the API returns: - `nl_instructions_info`: an + * array of instruction objects, each containing: - `instructions`: the configured + * text instructions for AI processing - `scope`: the scope of the instruction — + * currently only `GLOBAL` is supported #### Instructions scope - **GLOBAL**: + * Instructions that apply globally across the system on the given data-model (currently only + * global instructions are supported) #### Error responses | Code | Description | + * |------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| + * | 401 | Unauthorized — authentication token is missing, expired, or invalid. | | 403 | + * Forbidden — the authenticated user does not have `CAN_USE_SPOTTER` privilege, lacks + * view access on the data model, or the bearer token does not correspond to the org where the + * data model exists. | > ###### Note: > > - To use this API, the user needs at least + * view access on the data model, and must use the bearer token corresponding to the org where + * the data model exists. > - This endpoint is currently in Beta. Breaking changes may be + * introduced before the endpoint is made Generally Available. > - Available from version + * 10.15.0.cl and later. > - This endpoint requires Spotter — please contact ThoughtSpot + * Support to enable Spotter on your cluster. > - Use this API to review currently configured + * instructions before modifying them with `setNLInstructions`. + * + * @param getNLInstructionsRequest (required) + * @return EurekaGetNLInstructionsResponse + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the + * response body + * @http.response.details + * + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 Common successful response -
201 Common error response -
400 Operation failed -
401 Unauthorized access. -
403 Forbidden access. -
500 Operation failed -
+ */ + public EurekaGetNLInstructionsResponse getNLInstructions( + GetNLInstructionsRequest getNLInstructionsRequest) throws ApiException { + ApiResponse localVarResp = + getNLInstructionsWithHttpInfo(getNLInstructionsRequest); + return localVarResp.getData(); + } + + /** + * Version: 10.15.0.cl or later Retrieves existing natural language (NL) instructions configured + * for a specific data model. These instructions guide the AI system in understanding data + * context and generating more accurate responses. Requires `CAN_USE_SPOTTER` + * privilege, at least view access on the data model, and a bearer token corresponding to the + * org where the data model exists. #### Usage guidelines The request must include: - + * `data_source_identifier`: the unique ID of the data model to retrieve instructions + * for If the request is successful, the API returns: - `nl_instructions_info`: an + * array of instruction objects, each containing: - `instructions`: the configured + * text instructions for AI processing - `scope`: the scope of the instruction — + * currently only `GLOBAL` is supported #### Instructions scope - **GLOBAL**: + * Instructions that apply globally across the system on the given data-model (currently only + * global instructions are supported) #### Error responses | Code | Description | + * |------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| + * | 401 | Unauthorized — authentication token is missing, expired, or invalid. | | 403 | + * Forbidden — the authenticated user does not have `CAN_USE_SPOTTER` privilege, lacks + * view access on the data model, or the bearer token does not correspond to the org where the + * data model exists. | > ###### Note: > > - To use this API, the user needs at least + * view access on the data model, and must use the bearer token corresponding to the org where + * the data model exists. > - This endpoint is currently in Beta. Breaking changes may be + * introduced before the endpoint is made Generally Available. > - Available from version + * 10.15.0.cl and later. > - This endpoint requires Spotter — please contact ThoughtSpot + * Support to enable Spotter on your cluster. > - Use this API to review currently configured + * instructions before modifying them with `setNLInstructions`. + * + * @param getNLInstructionsRequest (required) + * @return ApiResponse<EurekaGetNLInstructionsResponse> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the + * response body + * @http.response.details + * + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 Common successful response -
201 Common error response -
400 Operation failed -
401 Unauthorized access. -
403 Forbidden access. -
500 Operation failed -
+ */ + public ApiResponse getNLInstructionsWithHttpInfo( + GetNLInstructionsRequest getNLInstructionsRequest) throws ApiException { + okhttp3.Call localVarCall = + getNLInstructionsValidateBeforeCall(getNLInstructionsRequest, null); + Type localVarReturnType = new TypeToken() {}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); + } + + /** + * (asynchronously) Version: 10.15.0.cl or later Retrieves existing natural language (NL) + * instructions configured for a specific data model. These instructions guide the AI system in + * understanding data context and generating more accurate responses. Requires + * `CAN_USE_SPOTTER` privilege, at least view access on the data model, and a bearer + * token corresponding to the org where the data model exists. #### Usage guidelines The request + * must include: - `data_source_identifier`: the unique ID of the data model to + * retrieve instructions for If the request is successful, the API returns: - + * `nl_instructions_info`: an array of instruction objects, each containing: - + * `instructions`: the configured text instructions for AI processing - + * `scope`: the scope of the instruction — currently only `GLOBAL` is + * supported #### Instructions scope - **GLOBAL**: Instructions that apply globally across the + * system on the given data-model (currently only global instructions are supported) #### Error + * responses | Code | Description | + * |------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| + * | 401 | Unauthorized — authentication token is missing, expired, or invalid. | | 403 | + * Forbidden — the authenticated user does not have `CAN_USE_SPOTTER` privilege, lacks + * view access on the data model, or the bearer token does not correspond to the org where the + * data model exists. | > ###### Note: > > - To use this API, the user needs at least + * view access on the data model, and must use the bearer token corresponding to the org where + * the data model exists. > - This endpoint is currently in Beta. Breaking changes may be + * introduced before the endpoint is made Generally Available. > - Available from version + * 10.15.0.cl and later. > - This endpoint requires Spotter — please contact ThoughtSpot + * Support to enable Spotter on your cluster. > - Use this API to review currently configured + * instructions before modifying them with `setNLInstructions`. + * + * @param getNLInstructionsRequest (required) + * @param _callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body + * object + * @http.response.details + * + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 Common successful response -
201 Common error response -
400 Operation failed -
401 Unauthorized access. -
403 Forbidden access. -
500 Operation failed -
+ */ + public okhttp3.Call getNLInstructionsAsync( + GetNLInstructionsRequest getNLInstructionsRequest, + final ApiCallback _callback) + throws ApiException { + + okhttp3.Call localVarCall = + getNLInstructionsValidateBeforeCall(getNLInstructionsRequest, _callback); + Type localVarReturnType = new TypeToken() {}.getType(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; + } + /** + * Build call for getObjectAccessToken + * + * @param getObjectAccessTokenRequest (required) + * @param _callback Callback for upload/download progress + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 Bearer auth token creation successful. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public okhttp3.Call getObjectAccessTokenCall( + GetObjectAccessTokenRequest getObjectAccessTokenRequest, final ApiCallback _callback) + throws ApiException { + String basePath = null; + // Operation Servers + String[] localBasePaths = new String[] {}; + + // Determine Base Path to Use + if (localCustomBaseUrl != null) { + basePath = localCustomBaseUrl; + } else if (localBasePaths.length > 0) { + basePath = localBasePaths[localHostIndex]; + } else { + basePath = null; + } + + Object localVarPostBody = getObjectAccessTokenRequest; + + // create path and map variables + String localVarPath = "/api/rest/2.0/auth/token/object"; + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + final String[] localVarAccepts = {"application/json"}; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = {"application/json"}; + final String localVarContentType = + localVarApiClient.selectHeaderContentType(localVarContentTypes); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } + + String[] localVarAuthNames = new String[] {}; + return localVarApiClient.buildCall( + basePath, + localVarPath, + "POST", + localVarQueryParams, + localVarCollectionQueryParams, + localVarPostBody, + localVarHeaderParams, + localVarCookieParams, + localVarFormParams, + localVarAuthNames, + _callback); + } + + @SuppressWarnings("rawtypes") + private okhttp3.Call getObjectAccessTokenValidateBeforeCall( + GetObjectAccessTokenRequest getObjectAccessTokenRequest, final ApiCallback _callback) + throws ApiException { + // verify the required parameter 'getObjectAccessTokenRequest' is set + if (getObjectAccessTokenRequest == null) { + throw new ApiException( + "Missing the required parameter 'getObjectAccessTokenRequest' when calling" + + " getObjectAccessToken(Async)"); + } + + return getObjectAccessTokenCall(getObjectAccessTokenRequest, _callback); + } + + /** + * Version: 9.0.0.cl or later Generates an authentication token that provides access to a + * specific metadata object. This object list is intersected with the list of objects the user + * is allowed to access via group membership. For more information, see [Object + * security](https://docs.thoughtspot.com/cloud/latest/security-data-object#object_security). + * #### Usage guidelines You can generate a token for a user by providing a `username` + * and `password`, or by using the `secret_key` generated for your instance. + * To generate a `secret_key`, the administrator must enable [Trusted + * authentication](https://developers.thoughtspot.com/docs/trusted-auth-secret-key) in the + * **Develop** > **Customizations** > **Security Settings** page. **Note**: * When both + * `password` and `secret_key` are included in the API request, + * `password` takes precedence. * If [Multi-Factor Authentication + * (MFA)](https://docs.thoughtspot.com/cloud/latest/authentication-local-mfa) is enabled on your + * instance, the API login request with `username` and `password` returns an + * error. You can switch to token-based authentication with `secret_key` or contact + * ThoughtSpot Support for assistance. The token obtained from ThoughtSpot is valid for 5 + * minutes by default. You can configure the token expiration time as required. #### + * Just-in-time provisioning For [just-in-time user creation and + * provisioning](https://developers.thoughtspot.com/docs/just-in-time-provisioning), specify the + * following attributes in the API request: * `auto_create` * `username` * + * `display_name` * `email` * `group_identifiers` Set + * `auto_create` to `true` if the user is not available in ThoughtSpot. If + * the user already exists in ThoughtSpot and the `auto_create` parameter is set to + * `true`, user properties such as display name, email, and group assignment will be + * updated. To add a new user and assign privileges, the `ADMINISTRATION` (**Can + * administer ThoughtSpot**) privilege is required. If [Role-Based Access Control + * (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled, the + * `CONTROL_TRUSTED_AUTH`(**Can Enable or Disable Trusted Authentication**) privilege + * is required. #### Important point to note All options in the token creation APIs that define + * user access to data in ThoughtSpot will take effect during token creation, not when the token + * is used for authentication. For example, `auto_create:true` will create the user + * when the authentication token is created. + * + * @param getObjectAccessTokenRequest (required) + * @return Token + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the + * response body + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 Bearer auth token creation successful. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public Token getObjectAccessToken(GetObjectAccessTokenRequest getObjectAccessTokenRequest) + throws ApiException { + ApiResponse localVarResp = + getObjectAccessTokenWithHttpInfo(getObjectAccessTokenRequest); + return localVarResp.getData(); + } + + /** + * Version: 9.0.0.cl or later Generates an authentication token that provides access to a + * specific metadata object. This object list is intersected with the list of objects the user + * is allowed to access via group membership. For more information, see [Object + * security](https://docs.thoughtspot.com/cloud/latest/security-data-object#object_security). + * #### Usage guidelines You can generate a token for a user by providing a `username` + * and `password`, or by using the `secret_key` generated for your instance. + * To generate a `secret_key`, the administrator must enable [Trusted + * authentication](https://developers.thoughtspot.com/docs/trusted-auth-secret-key) in the + * **Develop** > **Customizations** > **Security Settings** page. **Note**: * When both + * `password` and `secret_key` are included in the API request, + * `password` takes precedence. * If [Multi-Factor Authentication + * (MFA)](https://docs.thoughtspot.com/cloud/latest/authentication-local-mfa) is enabled on your + * instance, the API login request with `username` and `password` returns an + * error. You can switch to token-based authentication with `secret_key` or contact + * ThoughtSpot Support for assistance. The token obtained from ThoughtSpot is valid for 5 + * minutes by default. You can configure the token expiration time as required. #### + * Just-in-time provisioning For [just-in-time user creation and + * provisioning](https://developers.thoughtspot.com/docs/just-in-time-provisioning), specify the + * following attributes in the API request: * `auto_create` * `username` * + * `display_name` * `email` * `group_identifiers` Set + * `auto_create` to `true` if the user is not available in ThoughtSpot. If + * the user already exists in ThoughtSpot and the `auto_create` parameter is set to + * `true`, user properties such as display name, email, and group assignment will be + * updated. To add a new user and assign privileges, the `ADMINISTRATION` (**Can + * administer ThoughtSpot**) privilege is required. If [Role-Based Access Control + * (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled, the + * `CONTROL_TRUSTED_AUTH`(**Can Enable or Disable Trusted Authentication**) privilege + * is required. #### Important point to note All options in the token creation APIs that define + * user access to data in ThoughtSpot will take effect during token creation, not when the token + * is used for authentication. For example, `auto_create:true` will create the user + * when the authentication token is created. + * + * @param getObjectAccessTokenRequest (required) + * @return ApiResponse<Token> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the + * response body + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 Bearer auth token creation successful. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public ApiResponse getObjectAccessTokenWithHttpInfo( + GetObjectAccessTokenRequest getObjectAccessTokenRequest) throws ApiException { + okhttp3.Call localVarCall = + getObjectAccessTokenValidateBeforeCall(getObjectAccessTokenRequest, null); + Type localVarReturnType = new TypeToken() {}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); + } + + /** + * (asynchronously) Version: 9.0.0.cl or later Generates an authentication token that provides + * access to a specific metadata object. This object list is intersected with the list of + * objects the user is allowed to access via group membership. For more information, see [Object + * security](https://docs.thoughtspot.com/cloud/latest/security-data-object#object_security). + * #### Usage guidelines You can generate a token for a user by providing a `username` + * and `password`, or by using the `secret_key` generated for your instance. + * To generate a `secret_key`, the administrator must enable [Trusted + * authentication](https://developers.thoughtspot.com/docs/trusted-auth-secret-key) in the + * **Develop** > **Customizations** > **Security Settings** page. **Note**: * When both + * `password` and `secret_key` are included in the API request, + * `password` takes precedence. * If [Multi-Factor Authentication + * (MFA)](https://docs.thoughtspot.com/cloud/latest/authentication-local-mfa) is enabled on your + * instance, the API login request with `username` and `password` returns an + * error. You can switch to token-based authentication with `secret_key` or contact + * ThoughtSpot Support for assistance. The token obtained from ThoughtSpot is valid for 5 + * minutes by default. You can configure the token expiration time as required. #### + * Just-in-time provisioning For [just-in-time user creation and + * provisioning](https://developers.thoughtspot.com/docs/just-in-time-provisioning), specify the + * following attributes in the API request: * `auto_create` * `username` * + * `display_name` * `email` * `group_identifiers` Set + * `auto_create` to `true` if the user is not available in ThoughtSpot. If + * the user already exists in ThoughtSpot and the `auto_create` parameter is set to + * `true`, user properties such as display name, email, and group assignment will be + * updated. To add a new user and assign privileges, the `ADMINISTRATION` (**Can + * administer ThoughtSpot**) privilege is required. If [Role-Based Access Control + * (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled, the + * `CONTROL_TRUSTED_AUTH`(**Can Enable or Disable Trusted Authentication**) privilege + * is required. #### Important point to note All options in the token creation APIs that define + * user access to data in ThoughtSpot will take effect during token creation, not when the token + * is used for authentication. For example, `auto_create:true` will create the user + * when the authentication token is created. + * + * @param getObjectAccessTokenRequest (required) + * @param _callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body + * object + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 Bearer auth token creation successful. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public okhttp3.Call getObjectAccessTokenAsync( + GetObjectAccessTokenRequest getObjectAccessTokenRequest, + final ApiCallback _callback) + throws ApiException { + + okhttp3.Call localVarCall = + getObjectAccessTokenValidateBeforeCall(getObjectAccessTokenRequest, _callback); + Type localVarReturnType = new TypeToken() {}.getType(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; + } + /** + * Build call for getRelevantQuestions + * + * @param getRelevantQuestionsRequest (required) + * @param _callback Callback for upload/download progress + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + * @http.response.details + * + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 Common successful response -
201 Common error response -
400 Operation failed -
401 Unauthorized access. -
403 Forbidden access. -
500 Operation failed -
+ */ + public okhttp3.Call getRelevantQuestionsCall( + GetRelevantQuestionsRequest getRelevantQuestionsRequest, final ApiCallback _callback) + throws ApiException { + String basePath = null; + // Operation Servers + String[] localBasePaths = new String[] {}; + + // Determine Base Path to Use + if (localCustomBaseUrl != null) { + basePath = localCustomBaseUrl; + } else if (localBasePaths.length > 0) { + basePath = localBasePaths[localHostIndex]; + } else { + basePath = null; + } + + Object localVarPostBody = getRelevantQuestionsRequest; + + // create path and map variables + String localVarPath = "/api/rest/2.0/ai/relevant-questions/"; + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + final String[] localVarAccepts = {"application/json"}; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = {"application/json"}; + final String localVarContentType = + localVarApiClient.selectHeaderContentType(localVarContentTypes); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } + + String[] localVarAuthNames = new String[] {"bearerAuth"}; + return localVarApiClient.buildCall( + basePath, + localVarPath, + "POST", + localVarQueryParams, + localVarCollectionQueryParams, + localVarPostBody, + localVarHeaderParams, + localVarCookieParams, + localVarFormParams, + localVarAuthNames, + _callback); + } + + @SuppressWarnings("rawtypes") + private okhttp3.Call getRelevantQuestionsValidateBeforeCall( + GetRelevantQuestionsRequest getRelevantQuestionsRequest, final ApiCallback _callback) + throws ApiException { + // verify the required parameter 'getRelevantQuestionsRequest' is set + if (getRelevantQuestionsRequest == null) { + throw new ApiException( + "Missing the required parameter 'getRelevantQuestionsRequest' when calling" + + " getRelevantQuestions(Async)"); + } + + return getRelevantQuestionsCall(getRelevantQuestionsRequest, _callback); + } + + /** + * Version: 10.13.0.cl or later Breaks down a natural language query into a series of smaller + * analytical sub-questions, each mapped to a relevant data source. Requires + * `CAN_USE_SPOTTER` privilege and at least view-level access to the referenced + * metadata objects. #### Usage guidelines The request must include: - `query`: the + * natural language question to decompose into analytical sub-questions - + * `metadata_context`: at least one of the following context identifiers to guide + * question generation: - `conversation_identifier` — an existing conversation session + * ID - `answer_identifiers` — a list of Answer GUIDs - + * `liveboard_identifiers` — a list of Liveboard GUIDs - + * `data_source_identifiers` — a list of data source GUIDs Optional parameters for + * refining the output: - `ai_context`: additional context to improve response quality + * - `content` — supplementary text or CSV data as string input - + * `instructions` — custom text instructions for the AI system - + * `limit_relevant_questions`: maximum number of questions to return (default: + * `5`) - `bypass_cache`: if `true`, forces fresh computation + * instead of returning cached results If the request is successful, the API returns a list of + * relevant analytical questions, each containing: - `query`: the generated + * sub-question - `data_source_identifier`: the unique ID of the data source the + * question targets - `data_source_name`: the display name of the corresponding data + * source #### Error responses | Code | Description | + * |------|---------------------------------------------------------------------------------------------------------------------------------------| + * | 401 | Unauthorized — authentication token is missing, expired, or invalid. | | 403 | + * Forbidden — the authenticated user does not have `CAN_USE_SPOTTER` privilege or + * lacks view access to the referenced metadata objects. | > ###### Note: > * This + * endpoint is currently in Beta. Breaking changes may be introduced before the endpoint is made + * Generally Available. > * This endpoint requires Spotter - please contact ThoughtSpot + * support to enable Spotter on your cluster. + * + * @param getRelevantQuestionsRequest (required) + * @return EurekaGetRelevantQuestionsResponse + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the + * response body + * @http.response.details + * + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 Common successful response -
201 Common error response -
400 Operation failed -
401 Unauthorized access. -
403 Forbidden access. -
500 Operation failed -
+ */ + public EurekaGetRelevantQuestionsResponse getRelevantQuestions( + GetRelevantQuestionsRequest getRelevantQuestionsRequest) throws ApiException { + ApiResponse localVarResp = + getRelevantQuestionsWithHttpInfo(getRelevantQuestionsRequest); + return localVarResp.getData(); + } + + /** + * Version: 10.13.0.cl or later Breaks down a natural language query into a series of smaller + * analytical sub-questions, each mapped to a relevant data source. Requires + * `CAN_USE_SPOTTER` privilege and at least view-level access to the referenced + * metadata objects. #### Usage guidelines The request must include: - `query`: the + * natural language question to decompose into analytical sub-questions - + * `metadata_context`: at least one of the following context identifiers to guide + * question generation: - `conversation_identifier` — an existing conversation session + * ID - `answer_identifiers` — a list of Answer GUIDs - + * `liveboard_identifiers` — a list of Liveboard GUIDs - + * `data_source_identifiers` — a list of data source GUIDs Optional parameters for + * refining the output: - `ai_context`: additional context to improve response quality + * - `content` — supplementary text or CSV data as string input - + * `instructions` — custom text instructions for the AI system - + * `limit_relevant_questions`: maximum number of questions to return (default: + * `5`) - `bypass_cache`: if `true`, forces fresh computation + * instead of returning cached results If the request is successful, the API returns a list of + * relevant analytical questions, each containing: - `query`: the generated + * sub-question - `data_source_identifier`: the unique ID of the data source the + * question targets - `data_source_name`: the display name of the corresponding data + * source #### Error responses | Code | Description | + * |------|---------------------------------------------------------------------------------------------------------------------------------------| + * | 401 | Unauthorized — authentication token is missing, expired, or invalid. | | 403 | + * Forbidden — the authenticated user does not have `CAN_USE_SPOTTER` privilege or + * lacks view access to the referenced metadata objects. | > ###### Note: > * This + * endpoint is currently in Beta. Breaking changes may be introduced before the endpoint is made + * Generally Available. > * This endpoint requires Spotter - please contact ThoughtSpot + * support to enable Spotter on your cluster. + * + * @param getRelevantQuestionsRequest (required) + * @return ApiResponse<EurekaGetRelevantQuestionsResponse> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the + * response body + * @http.response.details + * + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 Common successful response -
201 Common error response -
400 Operation failed -
401 Unauthorized access. -
403 Forbidden access. -
500 Operation failed -
+ */ + public ApiResponse getRelevantQuestionsWithHttpInfo( + GetRelevantQuestionsRequest getRelevantQuestionsRequest) throws ApiException { + okhttp3.Call localVarCall = + getRelevantQuestionsValidateBeforeCall(getRelevantQuestionsRequest, null); + Type localVarReturnType = new TypeToken() {}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); + } + + /** + * (asynchronously) Version: 10.13.0.cl or later Breaks down a natural language query into a + * series of smaller analytical sub-questions, each mapped to a relevant data source. Requires + * `CAN_USE_SPOTTER` privilege and at least view-level access to the referenced + * metadata objects. #### Usage guidelines The request must include: - `query`: the + * natural language question to decompose into analytical sub-questions - + * `metadata_context`: at least one of the following context identifiers to guide + * question generation: - `conversation_identifier` — an existing conversation session + * ID - `answer_identifiers` — a list of Answer GUIDs - + * `liveboard_identifiers` — a list of Liveboard GUIDs - + * `data_source_identifiers` — a list of data source GUIDs Optional parameters for + * refining the output: - `ai_context`: additional context to improve response quality + * - `content` — supplementary text or CSV data as string input - + * `instructions` — custom text instructions for the AI system - + * `limit_relevant_questions`: maximum number of questions to return (default: + * `5`) - `bypass_cache`: if `true`, forces fresh computation + * instead of returning cached results If the request is successful, the API returns a list of + * relevant analytical questions, each containing: - `query`: the generated + * sub-question - `data_source_identifier`: the unique ID of the data source the + * question targets - `data_source_name`: the display name of the corresponding data + * source #### Error responses | Code | Description | + * |------|---------------------------------------------------------------------------------------------------------------------------------------| + * | 401 | Unauthorized — authentication token is missing, expired, or invalid. | | 403 | + * Forbidden — the authenticated user does not have `CAN_USE_SPOTTER` privilege or + * lacks view access to the referenced metadata objects. | > ###### Note: > * This + * endpoint is currently in Beta. Breaking changes may be introduced before the endpoint is made + * Generally Available. > * This endpoint requires Spotter - please contact ThoughtSpot + * support to enable Spotter on your cluster. + * + * @param getRelevantQuestionsRequest (required) + * @param _callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body + * object + * @http.response.details + * + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 Common successful response -
201 Common error response -
400 Operation failed -
401 Unauthorized access. -
403 Forbidden access. -
500 Operation failed -
+ */ + public okhttp3.Call getRelevantQuestionsAsync( + GetRelevantQuestionsRequest getRelevantQuestionsRequest, + final ApiCallback _callback) + throws ApiException { + + okhttp3.Call localVarCall = + getRelevantQuestionsValidateBeforeCall(getRelevantQuestionsRequest, _callback); + Type localVarReturnType = new TypeToken() {}.getType(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; + } + /** + * Build call for getSystemConfig + * + * @param _callback Callback for upload/download progress + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 Cluster config information. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public okhttp3.Call getSystemConfigCall(final ApiCallback _callback) throws ApiException { + String basePath = null; + // Operation Servers + String[] localBasePaths = new String[] {}; + + // Determine Base Path to Use + if (localCustomBaseUrl != null) { + basePath = localCustomBaseUrl; + } else if (localBasePaths.length > 0) { + basePath = localBasePaths[localHostIndex]; + } else { + basePath = null; + } + + Object localVarPostBody = null; + + // create path and map variables + String localVarPath = "/api/rest/2.0/system/config"; + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + final String[] localVarAccepts = {"application/json"}; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = {}; + final String localVarContentType = + localVarApiClient.selectHeaderContentType(localVarContentTypes); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } + + String[] localVarAuthNames = new String[] {"bearerAuth"}; + return localVarApiClient.buildCall( + basePath, + localVarPath, + "GET", + localVarQueryParams, + localVarCollectionQueryParams, + localVarPostBody, + localVarHeaderParams, + localVarCookieParams, + localVarFormParams, + localVarAuthNames, + _callback); + } + + @SuppressWarnings("rawtypes") + private okhttp3.Call getSystemConfigValidateBeforeCall(final ApiCallback _callback) + throws ApiException { + return getSystemConfigCall(_callback); + } + + /** + * Version: 9.0.0.cl or later Retrieves the current configuration details of the cluster. If the + * request is successful, the API returns a list configuration settings applied on the cluster. + * Requires `ADMINISTRATION`(**Can administer ThoughtSpot**) privilege to view these + * complete configuration settings of the cluster. If [Role-Based Access Control + * (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the + * `SYSTEM_INFO_ADMINISTRATION` (**Can view system activities**) privilege is + * required. This API does not require any parameters to be passed in the request. + * + * @return SystemConfig + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the + * response body + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 Cluster config information. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public SystemConfig getSystemConfig() throws ApiException { + ApiResponse localVarResp = getSystemConfigWithHttpInfo(); + return localVarResp.getData(); + } + + /** + * Version: 9.0.0.cl or later Retrieves the current configuration details of the cluster. If the + * request is successful, the API returns a list configuration settings applied on the cluster. + * Requires `ADMINISTRATION`(**Can administer ThoughtSpot**) privilege to view these + * complete configuration settings of the cluster. If [Role-Based Access Control + * (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the + * `SYSTEM_INFO_ADMINISTRATION` (**Can view system activities**) privilege is + * required. This API does not require any parameters to be passed in the request. + * + * @return ApiResponse<SystemConfig> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the + * response body + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 Cluster config information. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public ApiResponse getSystemConfigWithHttpInfo() throws ApiException { + okhttp3.Call localVarCall = getSystemConfigValidateBeforeCall(null); + Type localVarReturnType = new TypeToken() {}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); + } + + /** + * (asynchronously) Version: 9.0.0.cl or later Retrieves the current configuration details of + * the cluster. If the request is successful, the API returns a list configuration settings + * applied on the cluster. Requires `ADMINISTRATION`(**Can administer ThoughtSpot**) + * privilege to view these complete configuration settings of the cluster. If [Role-Based Access + * Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, + * the `SYSTEM_INFO_ADMINISTRATION` (**Can view system activities**) privilege is + * required. This API does not require any parameters to be passed in the request. + * + * @param _callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body + * object + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 Cluster config information. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public okhttp3.Call getSystemConfigAsync(final ApiCallback _callback) + throws ApiException { + + okhttp3.Call localVarCall = getSystemConfigValidateBeforeCall(_callback); + Type localVarReturnType = new TypeToken() {}.getType(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; + } + /** + * Build call for getSystemInformation + * + * @param _callback Callback for upload/download progress + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 Cluster information. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public okhttp3.Call getSystemInformationCall(final ApiCallback _callback) throws ApiException { + String basePath = null; + // Operation Servers + String[] localBasePaths = new String[] {}; + + // Determine Base Path to Use + if (localCustomBaseUrl != null) { + basePath = localCustomBaseUrl; + } else if (localBasePaths.length > 0) { + basePath = localBasePaths[localHostIndex]; + } else { + basePath = null; + } + + Object localVarPostBody = null; + + // create path and map variables + String localVarPath = "/api/rest/2.0/system"; + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + final String[] localVarAccepts = {"application/json"}; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = {}; + final String localVarContentType = + localVarApiClient.selectHeaderContentType(localVarContentTypes); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } + + String[] localVarAuthNames = new String[] {"bearerAuth"}; + return localVarApiClient.buildCall( + basePath, + localVarPath, + "GET", + localVarQueryParams, + localVarCollectionQueryParams, + localVarPostBody, + localVarHeaderParams, + localVarCookieParams, + localVarFormParams, + localVarAuthNames, + _callback); + } + + @SuppressWarnings("rawtypes") + private okhttp3.Call getSystemInformationValidateBeforeCall(final ApiCallback _callback) + throws ApiException { + return getSystemInformationCall(_callback); + } + + /** + * Version: 9.0.0.cl or later Gets system information such as the release version, locale, time + * zone, deployment environment, date format, and date time format of the cluster. Requires + * `ADMINISTRATION` (**Can administer ThoughtSpot**) privileges. If [Role-Based Access + * Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, + * the `SYSTEM_INFO_ADMINISTRATION` (**Can view system activities**) privilege is + * required. This API does not require any parameters to be passed in the request. + * + * @return SystemInfo + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the + * response body + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 Cluster information. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public SystemInfo getSystemInformation() throws ApiException { + ApiResponse localVarResp = getSystemInformationWithHttpInfo(); + return localVarResp.getData(); + } + + /** + * Version: 9.0.0.cl or later Gets system information such as the release version, locale, time + * zone, deployment environment, date format, and date time format of the cluster. Requires + * `ADMINISTRATION` (**Can administer ThoughtSpot**) privileges. If [Role-Based Access + * Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, + * the `SYSTEM_INFO_ADMINISTRATION` (**Can view system activities**) privilege is + * required. This API does not require any parameters to be passed in the request. + * + * @return ApiResponse<SystemInfo> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the + * response body + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 Cluster information. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public ApiResponse getSystemInformationWithHttpInfo() throws ApiException { + okhttp3.Call localVarCall = getSystemInformationValidateBeforeCall(null); + Type localVarReturnType = new TypeToken() {}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); + } + + /** + * (asynchronously) Version: 9.0.0.cl or later Gets system information such as the release + * version, locale, time zone, deployment environment, date format, and date time format of the + * cluster. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privileges. If + * [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled + * on your instance, the `SYSTEM_INFO_ADMINISTRATION` (**Can view system activities**) + * privilege is required. This API does not require any parameters to be passed in the request. + * + * @param _callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body + * object + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 Cluster information. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public okhttp3.Call getSystemInformationAsync(final ApiCallback _callback) + throws ApiException { + + okhttp3.Call localVarCall = getSystemInformationValidateBeforeCall(_callback); + Type localVarReturnType = new TypeToken() {}.getType(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; + } + /** + * Build call for getSystemOverrideInfo + * + * @param _callback Callback for upload/download progress + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 Cluster configuration which can be overridden. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public okhttp3.Call getSystemOverrideInfoCall(final ApiCallback _callback) throws ApiException { + String basePath = null; + // Operation Servers + String[] localBasePaths = new String[] {}; + + // Determine Base Path to Use + if (localCustomBaseUrl != null) { + basePath = localCustomBaseUrl; + } else if (localBasePaths.length > 0) { + basePath = localBasePaths[localHostIndex]; + } else { + basePath = null; + } + + Object localVarPostBody = null; + + // create path and map variables + String localVarPath = "/api/rest/2.0/system/config-overrides"; + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + final String[] localVarAccepts = {"application/json"}; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = {}; + final String localVarContentType = + localVarApiClient.selectHeaderContentType(localVarContentTypes); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } + + String[] localVarAuthNames = new String[] {"bearerAuth"}; + return localVarApiClient.buildCall( + basePath, + localVarPath, + "GET", + localVarQueryParams, + localVarCollectionQueryParams, + localVarPostBody, + localVarHeaderParams, + localVarCookieParams, + localVarFormParams, + localVarAuthNames, + _callback); + } + + @SuppressWarnings("rawtypes") + private okhttp3.Call getSystemOverrideInfoValidateBeforeCall(final ApiCallback _callback) + throws ApiException { + return getSystemOverrideInfoCall(_callback); + } + + /** + * Version: 9.2.0.cl or later Gets a list of configuration overrides applied on the cluster. + * Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If + * [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled + * on your instance, the `APPLICATION_ADMINISTRATION` (**Can manage application + * settings**) privilege is required. This API does not require any parameters to be passed in + * the request. + * + * @return SystemOverrideInfo + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the + * response body + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 Cluster configuration which can be overridden. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public SystemOverrideInfo getSystemOverrideInfo() throws ApiException { + ApiResponse localVarResp = getSystemOverrideInfoWithHttpInfo(); + return localVarResp.getData(); + } + + /** + * Version: 9.2.0.cl or later Gets a list of configuration overrides applied on the cluster. + * Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If + * [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled + * on your instance, the `APPLICATION_ADMINISTRATION` (**Can manage application + * settings**) privilege is required. This API does not require any parameters to be passed in + * the request. + * + * @return ApiResponse<SystemOverrideInfo> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the + * response body + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 Cluster configuration which can be overridden. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public ApiResponse getSystemOverrideInfoWithHttpInfo() throws ApiException { + okhttp3.Call localVarCall = getSystemOverrideInfoValidateBeforeCall(null); + Type localVarReturnType = new TypeToken() {}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); + } + + /** + * (asynchronously) Version: 9.2.0.cl or later Gets a list of configuration overrides applied on + * the cluster. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. + * If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is + * enabled on your instance, the `APPLICATION_ADMINISTRATION` (**Can manage + * application settings**) privilege is required. This API does not require any parameters to be + * passed in the request. + * + * @param _callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body + * object + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 Cluster configuration which can be overridden. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public okhttp3.Call getSystemOverrideInfoAsync(final ApiCallback _callback) + throws ApiException { + + okhttp3.Call localVarCall = getSystemOverrideInfoValidateBeforeCall(_callback); + Type localVarReturnType = new TypeToken() {}.getType(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; + } + /** + * Build call for importMetadataTML + * + * @param importMetadataTMLRequest (required) + * @param _callback Callback for upload/download progress + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 Import metadata objects using specified TMLs is successful. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public okhttp3.Call importMetadataTMLCall( + ImportMetadataTMLRequest importMetadataTMLRequest, final ApiCallback _callback) + throws ApiException { + String basePath = null; + // Operation Servers + String[] localBasePaths = new String[] {}; + + // Determine Base Path to Use + if (localCustomBaseUrl != null) { + basePath = localCustomBaseUrl; + } else if (localBasePaths.length > 0) { + basePath = localBasePaths[localHostIndex]; + } else { + basePath = null; + } + + Object localVarPostBody = importMetadataTMLRequest; + + // create path and map variables + String localVarPath = "/api/rest/2.0/metadata/tml/import"; + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + final String[] localVarAccepts = {"application/json"}; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = {"application/json"}; + final String localVarContentType = + localVarApiClient.selectHeaderContentType(localVarContentTypes); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } + + String[] localVarAuthNames = new String[] {"bearerAuth"}; + return localVarApiClient.buildCall( + basePath, + localVarPath, + "POST", + localVarQueryParams, + localVarCollectionQueryParams, + localVarPostBody, + localVarHeaderParams, + localVarCookieParams, + localVarFormParams, + localVarAuthNames, + _callback); + } + + @SuppressWarnings("rawtypes") + private okhttp3.Call importMetadataTMLValidateBeforeCall( + ImportMetadataTMLRequest importMetadataTMLRequest, final ApiCallback _callback) + throws ApiException { + // verify the required parameter 'importMetadataTMLRequest' is set + if (importMetadataTMLRequest == null) { + throw new ApiException( + "Missing the required parameter 'importMetadataTMLRequest' when calling" + + " importMetadataTML(Async)"); + } + + return importMetadataTMLCall(importMetadataTMLRequest, _callback); + } + + /** + * Version: 9.0.0.cl or later Imports [TML](https://docs.thoughtspot.com/cloud/latest/tml) files + * into ThoughtSpot. Requires `DATAMANAGEMENT` (**Can manage data**) or + * `ADMINISTRATION` (**Can administer ThoughtsSpot**) privilege. If [Role-Based Access + * Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, + * the following Data control privileges may be required: - + * `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) - + * `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` (**Can manage data models**) #### Usage + * guidelines * Import all related objects in a single TML Import API call. For example, Tables + * that use the same Connection object and Worksheets connected to these Tables. * Include the + * `fqn` property to distinguish objects that have the same name. For example, if you + * have multiple Connections or Worksheets with the same name on ThoughtSpot and the Connection + * or Worksheet referenced in your TML file does not have a unique name to distinguish, it may + * result in invalid object references. Adding `fqn` helps ThoughtSpot differentiate a + * Table from another with the same name. We recommend [exporting TML with + * FQNs](#/http/api-endpoints/metadata/export-metadata-tml) and using these during the import + * operation. * You can upload multiple TML files at a time. If you import a Worksheet along + * with Liveboards, Answers, and other dependent objects in a single API call, the imported + * objects will be immediately available for use. When you import only a Worksheet object, it + * may take some time for the Worksheet to become available in the ThoughtSpot system. Please + * wait for a few minutes, and then proceed to create an Answer and Liveboard from the newly + * imported Worksheet. For more information, see [TML + * Documentation](https://developers.thoughtspot.com/docs/tml#_import_a_tml). + * + * @param importMetadataTMLRequest (required) + * @return List<Object> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the + * response body + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 Import metadata objects using specified TMLs is successful. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public List importMetadataTML(ImportMetadataTMLRequest importMetadataTMLRequest) + throws ApiException { + ApiResponse> localVarResp = + importMetadataTMLWithHttpInfo(importMetadataTMLRequest); + return localVarResp.getData(); + } + + /** + * Version: 9.0.0.cl or later Imports [TML](https://docs.thoughtspot.com/cloud/latest/tml) files + * into ThoughtSpot. Requires `DATAMANAGEMENT` (**Can manage data**) or + * `ADMINISTRATION` (**Can administer ThoughtsSpot**) privilege. If [Role-Based Access + * Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, + * the following Data control privileges may be required: - + * `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) - + * `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` (**Can manage data models**) #### Usage + * guidelines * Import all related objects in a single TML Import API call. For example, Tables + * that use the same Connection object and Worksheets connected to these Tables. * Include the + * `fqn` property to distinguish objects that have the same name. For example, if you + * have multiple Connections or Worksheets with the same name on ThoughtSpot and the Connection + * or Worksheet referenced in your TML file does not have a unique name to distinguish, it may + * result in invalid object references. Adding `fqn` helps ThoughtSpot differentiate a + * Table from another with the same name. We recommend [exporting TML with + * FQNs](#/http/api-endpoints/metadata/export-metadata-tml) and using these during the import + * operation. * You can upload multiple TML files at a time. If you import a Worksheet along + * with Liveboards, Answers, and other dependent objects in a single API call, the imported + * objects will be immediately available for use. When you import only a Worksheet object, it + * may take some time for the Worksheet to become available in the ThoughtSpot system. Please + * wait for a few minutes, and then proceed to create an Answer and Liveboard from the newly + * imported Worksheet. For more information, see [TML + * Documentation](https://developers.thoughtspot.com/docs/tml#_import_a_tml). + * + * @param importMetadataTMLRequest (required) + * @return ApiResponse<List<Object>> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the + * response body + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 Import metadata objects using specified TMLs is successful. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public ApiResponse> importMetadataTMLWithHttpInfo( + ImportMetadataTMLRequest importMetadataTMLRequest) throws ApiException { + okhttp3.Call localVarCall = + importMetadataTMLValidateBeforeCall(importMetadataTMLRequest, null); + Type localVarReturnType = new TypeToken>() {}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); + } + + /** + * (asynchronously) Version: 9.0.0.cl or later Imports + * [TML](https://docs.thoughtspot.com/cloud/latest/tml) files into ThoughtSpot. Requires + * `DATAMANAGEMENT` (**Can manage data**) or `ADMINISTRATION` (**Can + * administer ThoughtsSpot**) privilege. If [Role-Based Access Control + * (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the + * following Data control privileges may be required: - + * `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) - + * `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` (**Can manage data models**) #### Usage + * guidelines * Import all related objects in a single TML Import API call. For example, Tables + * that use the same Connection object and Worksheets connected to these Tables. * Include the + * `fqn` property to distinguish objects that have the same name. For example, if you + * have multiple Connections or Worksheets with the same name on ThoughtSpot and the Connection + * or Worksheet referenced in your TML file does not have a unique name to distinguish, it may + * result in invalid object references. Adding `fqn` helps ThoughtSpot differentiate a + * Table from another with the same name. We recommend [exporting TML with + * FQNs](#/http/api-endpoints/metadata/export-metadata-tml) and using these during the import + * operation. * You can upload multiple TML files at a time. If you import a Worksheet along + * with Liveboards, Answers, and other dependent objects in a single API call, the imported + * objects will be immediately available for use. When you import only a Worksheet object, it + * may take some time for the Worksheet to become available in the ThoughtSpot system. Please + * wait for a few minutes, and then proceed to create an Answer and Liveboard from the newly + * imported Worksheet. For more information, see [TML + * Documentation](https://developers.thoughtspot.com/docs/tml#_import_a_tml). + * + * @param importMetadataTMLRequest (required) + * @param _callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body + * object + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 Import metadata objects using specified TMLs is successful. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public okhttp3.Call importMetadataTMLAsync( + ImportMetadataTMLRequest importMetadataTMLRequest, + final ApiCallback> _callback) + throws ApiException { + + okhttp3.Call localVarCall = + importMetadataTMLValidateBeforeCall(importMetadataTMLRequest, _callback); + Type localVarReturnType = new TypeToken>() {}.getType(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; + } + /** + * Build call for importMetadataTMLAsync + * + * @param importMetadataTMLAsyncRequest (required) + * @param _callback Callback for upload/download progress + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 Async TML Import Task submitted successfully. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public okhttp3.Call importMetadataTMLAsyncCall( + ImportMetadataTMLAsyncRequest importMetadataTMLAsyncRequest, + final ApiCallback _callback) + throws ApiException { + String basePath = null; + // Operation Servers + String[] localBasePaths = new String[] {}; + + // Determine Base Path to Use + if (localCustomBaseUrl != null) { + basePath = localCustomBaseUrl; + } else if (localBasePaths.length > 0) { + basePath = localBasePaths[localHostIndex]; + } else { + basePath = null; + } + + Object localVarPostBody = importMetadataTMLAsyncRequest; + + // create path and map variables + String localVarPath = "/api/rest/2.0/metadata/tml/async/import"; + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + final String[] localVarAccepts = {"application/json"}; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = {"application/json"}; + final String localVarContentType = + localVarApiClient.selectHeaderContentType(localVarContentTypes); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } + + String[] localVarAuthNames = new String[] {"bearerAuth"}; + return localVarApiClient.buildCall( + basePath, + localVarPath, + "POST", + localVarQueryParams, + localVarCollectionQueryParams, + localVarPostBody, + localVarHeaderParams, + localVarCookieParams, + localVarFormParams, + localVarAuthNames, + _callback); + } + + @SuppressWarnings("rawtypes") + private okhttp3.Call importMetadataTMLAsyncValidateBeforeCall( + ImportMetadataTMLAsyncRequest importMetadataTMLAsyncRequest, + final ApiCallback _callback) + throws ApiException { + // verify the required parameter 'importMetadataTMLAsyncRequest' is set + if (importMetadataTMLAsyncRequest == null) { + throw new ApiException( + "Missing the required parameter 'importMetadataTMLAsyncRequest' when calling" + + " importMetadataTMLAsync(Async)"); + } + + return importMetadataTMLAsyncCall(importMetadataTMLAsyncRequest, _callback); + } + + /** + * Version: 10.4.0.cl or later Schedules a task to import + * [TML](https://docs.thoughtspot.com/cloud/latest/tml) files into ThoughtSpot. You can use this + * API endpoint to process TML objects asynchronously when importing TMLs of large and complex + * metadata objects into ThoughtSpot. Unlike the synchronous import TML operation, the API + * processes TML data in the background and returns a task ID, which can be used to check the + * status of the import task via `/api/rest/2.0/metadata/tml/async/status` API + * endpoint. Requires `DATAMANAGEMENT` (**Can manage data**) or + * `ADMINISTRATION` (**Can administer ThoughtsSpot**) privilege, and edit access to + * the TML objects. If [Role-Based Access Control + * (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the + * following Data control privileges may be required: - + * `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) - + * `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` (**Can manage data models**) #### Usage + * guidelines See [Async TML API + * Documentation](https://developers.thoughtspot.com/docs/tml#_import_tml_objects_asynchronously) + * for usage guidelines. + * + * @param importMetadataTMLAsyncRequest (required) + * @return ImportEPackAsyncTaskStatus + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the + * response body + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 Async TML Import Task submitted successfully. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public ImportEPackAsyncTaskStatus importMetadataTMLAsync( + ImportMetadataTMLAsyncRequest importMetadataTMLAsyncRequest) throws ApiException { + ApiResponse localVarResp = + importMetadataTMLAsyncWithHttpInfo(importMetadataTMLAsyncRequest); + return localVarResp.getData(); + } + + /** + * Version: 10.4.0.cl or later Schedules a task to import + * [TML](https://docs.thoughtspot.com/cloud/latest/tml) files into ThoughtSpot. You can use this + * API endpoint to process TML objects asynchronously when importing TMLs of large and complex + * metadata objects into ThoughtSpot. Unlike the synchronous import TML operation, the API + * processes TML data in the background and returns a task ID, which can be used to check the + * status of the import task via `/api/rest/2.0/metadata/tml/async/status` API + * endpoint. Requires `DATAMANAGEMENT` (**Can manage data**) or + * `ADMINISTRATION` (**Can administer ThoughtsSpot**) privilege, and edit access to + * the TML objects. If [Role-Based Access Control + * (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the + * following Data control privileges may be required: - + * `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) - + * `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` (**Can manage data models**) #### Usage + * guidelines See [Async TML API + * Documentation](https://developers.thoughtspot.com/docs/tml#_import_tml_objects_asynchronously) + * for usage guidelines. + * + * @param importMetadataTMLAsyncRequest (required) + * @return ApiResponse<ImportEPackAsyncTaskStatus> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the + * response body + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 Async TML Import Task submitted successfully. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public ApiResponse importMetadataTMLAsyncWithHttpInfo( + ImportMetadataTMLAsyncRequest importMetadataTMLAsyncRequest) throws ApiException { + okhttp3.Call localVarCall = + importMetadataTMLAsyncValidateBeforeCall(importMetadataTMLAsyncRequest, null); + Type localVarReturnType = new TypeToken() {}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); + } + + /** + * (asynchronously) Version: 10.4.0.cl or later Schedules a task to import + * [TML](https://docs.thoughtspot.com/cloud/latest/tml) files into ThoughtSpot. You can use this + * API endpoint to process TML objects asynchronously when importing TMLs of large and complex + * metadata objects into ThoughtSpot. Unlike the synchronous import TML operation, the API + * processes TML data in the background and returns a task ID, which can be used to check the + * status of the import task via `/api/rest/2.0/metadata/tml/async/status` API + * endpoint. Requires `DATAMANAGEMENT` (**Can manage data**) or + * `ADMINISTRATION` (**Can administer ThoughtsSpot**) privilege, and edit access to + * the TML objects. If [Role-Based Access Control + * (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the + * following Data control privileges may be required: - + * `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) - + * `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` (**Can manage data models**) #### Usage + * guidelines See [Async TML API + * Documentation](https://developers.thoughtspot.com/docs/tml#_import_tml_objects_asynchronously) + * for usage guidelines. + * + * @param importMetadataTMLAsyncRequest (required) + * @param _callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body + * object + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 Async TML Import Task submitted successfully. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public okhttp3.Call importMetadataTMLAsyncAsync( + ImportMetadataTMLAsyncRequest importMetadataTMLAsyncRequest, + final ApiCallback _callback) + throws ApiException { + + okhttp3.Call localVarCall = + importMetadataTMLAsyncValidateBeforeCall(importMetadataTMLAsyncRequest, _callback); + Type localVarReturnType = new TypeToken() {}.getType(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; + } + /** + * Build call for importUserGroups + * + * @param importUserGroupsRequest (required) + * @param _callback Callback for upload/download progress + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 Import user groups operation successful. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public okhttp3.Call importUserGroupsCall( + ImportUserGroupsRequest importUserGroupsRequest, final ApiCallback _callback) + throws ApiException { + String basePath = null; + // Operation Servers + String[] localBasePaths = new String[] {}; + + // Determine Base Path to Use + if (localCustomBaseUrl != null) { + basePath = localCustomBaseUrl; + } else if (localBasePaths.length > 0) { + basePath = localBasePaths[localHostIndex]; + } else { + basePath = null; + } + + Object localVarPostBody = importUserGroupsRequest; + + // create path and map variables + String localVarPath = "/api/rest/2.0/groups/import"; + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + final String[] localVarAccepts = {"application/json"}; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = {"application/json"}; + final String localVarContentType = + localVarApiClient.selectHeaderContentType(localVarContentTypes); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } + + String[] localVarAuthNames = new String[] {"bearerAuth"}; + return localVarApiClient.buildCall( + basePath, + localVarPath, + "POST", + localVarQueryParams, + localVarCollectionQueryParams, + localVarPostBody, + localVarHeaderParams, + localVarCookieParams, + localVarFormParams, + localVarAuthNames, + _callback); + } + + @SuppressWarnings("rawtypes") + private okhttp3.Call importUserGroupsValidateBeforeCall( + ImportUserGroupsRequest importUserGroupsRequest, final ApiCallback _callback) + throws ApiException { + // verify the required parameter 'importUserGroupsRequest' is set + if (importUserGroupsRequest == null) { + throw new ApiException( + "Missing the required parameter 'importUserGroupsRequest' when calling" + + " importUserGroups(Async)"); + } + + return importUserGroupsCall(importUserGroupsRequest, _callback); + } + + /** + * Version: 9.0.0.cl or later Imports group objects from external databases into ThoughtSpot. + * Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If + * [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled + * on your instance, the `GROUP_ADMINISTRATION` (**Can manage groups**) privilege is + * required. During the import operation: * If the specified group is not available in + * ThoughtSpot, it will be added to ThoughtSpot. * If `delete_unspecified_groups` is + * set to `true`, the groups not specified in the API request, excluding administrator + * and system user groups, are deleted. * If the specified groups are already available in + * ThoughtSpot, the object properties of these groups are modified and synchronized as per the + * input data in the API request. A successful API call returns the object that represents the + * changes made in the ThoughtSpot system. + * + * @param importUserGroupsRequest (required) + * @return ImportUserGroupsResponse + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the + * response body + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 Import user groups operation successful. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public ImportUserGroupsResponse importUserGroups( + ImportUserGroupsRequest importUserGroupsRequest) throws ApiException { + ApiResponse localVarResp = + importUserGroupsWithHttpInfo(importUserGroupsRequest); + return localVarResp.getData(); + } + + /** + * Version: 9.0.0.cl or later Imports group objects from external databases into ThoughtSpot. + * Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If + * [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled + * on your instance, the `GROUP_ADMINISTRATION` (**Can manage groups**) privilege is + * required. During the import operation: * If the specified group is not available in + * ThoughtSpot, it will be added to ThoughtSpot. * If `delete_unspecified_groups` is + * set to `true`, the groups not specified in the API request, excluding administrator + * and system user groups, are deleted. * If the specified groups are already available in + * ThoughtSpot, the object properties of these groups are modified and synchronized as per the + * input data in the API request. A successful API call returns the object that represents the + * changes made in the ThoughtSpot system. + * + * @param importUserGroupsRequest (required) + * @return ApiResponse<ImportUserGroupsResponse> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the + * response body + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 Import user groups operation successful. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public ApiResponse importUserGroupsWithHttpInfo( + ImportUserGroupsRequest importUserGroupsRequest) throws ApiException { + okhttp3.Call localVarCall = + importUserGroupsValidateBeforeCall(importUserGroupsRequest, null); + Type localVarReturnType = new TypeToken() {}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); + } + + /** + * (asynchronously) Version: 9.0.0.cl or later Imports group objects from external databases + * into ThoughtSpot. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) + * privilege. If [Role-Based Access Control + * (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the + * `GROUP_ADMINISTRATION` (**Can manage groups**) privilege is required. During the + * import operation: * If the specified group is not available in ThoughtSpot, it will be added + * to ThoughtSpot. * If `delete_unspecified_groups` is set to `true`, the + * groups not specified in the API request, excluding administrator and system user groups, are + * deleted. * If the specified groups are already available in ThoughtSpot, the object + * properties of these groups are modified and synchronized as per the input data in the API + * request. A successful API call returns the object that represents the changes made in the + * ThoughtSpot system. + * + * @param importUserGroupsRequest (required) + * @param _callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body + * object + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 Import user groups operation successful. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public okhttp3.Call importUserGroupsAsync( + ImportUserGroupsRequest importUserGroupsRequest, + final ApiCallback _callback) + throws ApiException { + + okhttp3.Call localVarCall = + importUserGroupsValidateBeforeCall(importUserGroupsRequest, _callback); + Type localVarReturnType = new TypeToken() {}.getType(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; + } + /** + * Build call for importUsers + * + * @param importUsersRequest (required) + * @param _callback Callback for upload/download progress + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 Import users operation successful. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public okhttp3.Call importUsersCall( + ImportUsersRequest importUsersRequest, final ApiCallback _callback) + throws ApiException { + String basePath = null; + // Operation Servers + String[] localBasePaths = new String[] {}; + + // Determine Base Path to Use + if (localCustomBaseUrl != null) { + basePath = localCustomBaseUrl; + } else if (localBasePaths.length > 0) { + basePath = localBasePaths[localHostIndex]; + } else { + basePath = null; + } + + Object localVarPostBody = importUsersRequest; + + // create path and map variables + String localVarPath = "/api/rest/2.0/users/import"; + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + final String[] localVarAccepts = {"application/json"}; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = {"application/json"}; + final String localVarContentType = + localVarApiClient.selectHeaderContentType(localVarContentTypes); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } + + String[] localVarAuthNames = new String[] {"bearerAuth"}; + return localVarApiClient.buildCall( + basePath, + localVarPath, + "POST", + localVarQueryParams, + localVarCollectionQueryParams, + localVarPostBody, + localVarHeaderParams, + localVarCookieParams, + localVarFormParams, + localVarAuthNames, + _callback); + } + + @SuppressWarnings("rawtypes") + private okhttp3.Call importUsersValidateBeforeCall( + ImportUsersRequest importUsersRequest, final ApiCallback _callback) + throws ApiException { + // verify the required parameter 'importUsersRequest' is set + if (importUsersRequest == null) { + throw new ApiException( + "Missing the required parameter 'importUsersRequest' when calling" + + " importUsers(Async)"); + } + + return importUsersCall(importUsersRequest, _callback); + } + + /** + * Version: 9.0.0.cl or later Imports user data from external databases into ThoughtSpot. During + * the user import operation: * If the specified users are not available in ThoughtSpot, the + * users are created and assigned a default password. Defining a `default_password` in + * the API request is optional. * If `delete_unspecified_users` is set to + * `true`, the users not specified in the API request, excluding the + * `tsadmin`, `guest`, `system` and `su` users, are + * deleted. * If the specified user objects are already available in ThoughtSpot, the object + * properties are updated and synchronized as per the input data in the API request. A + * successful API call returns the object that represents the changes made in the ThoughtSpot + * system. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If + * [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled + * on your instance, the `USER_ADMINISTRATION` (**Can manage users**) privilege is + * required. + * + * @param importUsersRequest (required) + * @return ImportUsersResponse + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the + * response body + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 Import users operation successful. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public ImportUsersResponse importUsers(ImportUsersRequest importUsersRequest) + throws ApiException { + ApiResponse localVarResp = importUsersWithHttpInfo(importUsersRequest); + return localVarResp.getData(); + } + + /** + * Version: 9.0.0.cl or later Imports user data from external databases into ThoughtSpot. During + * the user import operation: * If the specified users are not available in ThoughtSpot, the + * users are created and assigned a default password. Defining a `default_password` in + * the API request is optional. * If `delete_unspecified_users` is set to + * `true`, the users not specified in the API request, excluding the + * `tsadmin`, `guest`, `system` and `su` users, are + * deleted. * If the specified user objects are already available in ThoughtSpot, the object + * properties are updated and synchronized as per the input data in the API request. A + * successful API call returns the object that represents the changes made in the ThoughtSpot + * system. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If + * [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled + * on your instance, the `USER_ADMINISTRATION` (**Can manage users**) privilege is + * required. + * + * @param importUsersRequest (required) + * @return ApiResponse<ImportUsersResponse> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the + * response body + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 Import users operation successful. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public ApiResponse importUsersWithHttpInfo( + ImportUsersRequest importUsersRequest) throws ApiException { + okhttp3.Call localVarCall = importUsersValidateBeforeCall(importUsersRequest, null); + Type localVarReturnType = new TypeToken() {}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); + } + + /** + * (asynchronously) Version: 9.0.0.cl or later Imports user data from external databases into + * ThoughtSpot. During the user import operation: * If the specified users are not available in + * ThoughtSpot, the users are created and assigned a default password. Defining a + * `default_password` in the API request is optional. * If + * `delete_unspecified_users` is set to `true`, the users not specified in + * the API request, excluding the `tsadmin`, `guest`, `system` and + * `su` users, are deleted. * If the specified user objects are already available in + * ThoughtSpot, the object properties are updated and synchronized as per the input data in the + * API request. A successful API call returns the object that represents the changes made in the + * ThoughtSpot system. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) + * privilege. If [Role-Based Access Control + * (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the + * `USER_ADMINISTRATION` (**Can manage users**) privilege is required. + * + * @param importUsersRequest (required) + * @param _callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body + * object + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 Import users operation successful. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public okhttp3.Call importUsersAsync( + ImportUsersRequest importUsersRequest, final ApiCallback _callback) + throws ApiException { + + okhttp3.Call localVarCall = importUsersValidateBeforeCall(importUsersRequest, _callback); + Type localVarReturnType = new TypeToken() {}.getType(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; + } + /** + * Build call for login + * + * @param loginRequest (required) + * @param _callback Callback for upload/download progress + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
204 User login successful. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public okhttp3.Call loginCall(LoginRequest loginRequest, final ApiCallback _callback) + throws ApiException { + String basePath = null; + // Operation Servers + String[] localBasePaths = new String[] {}; + + // Determine Base Path to Use + if (localCustomBaseUrl != null) { + basePath = localCustomBaseUrl; + } else if (localBasePaths.length > 0) { + basePath = localBasePaths[localHostIndex]; + } else { + basePath = null; + } + + Object localVarPostBody = loginRequest; + + // create path and map variables + String localVarPath = "/api/rest/2.0/auth/session/login"; + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + final String[] localVarAccepts = {"application/json"}; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = {"application/json"}; + final String localVarContentType = + localVarApiClient.selectHeaderContentType(localVarContentTypes); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } + + String[] localVarAuthNames = new String[] {"bearerAuth"}; + return localVarApiClient.buildCall( + basePath, + localVarPath, + "POST", + localVarQueryParams, + localVarCollectionQueryParams, + localVarPostBody, + localVarHeaderParams, + localVarCookieParams, + localVarFormParams, + localVarAuthNames, + _callback); + } + + @SuppressWarnings("rawtypes") + private okhttp3.Call loginValidateBeforeCall( + LoginRequest loginRequest, final ApiCallback _callback) throws ApiException { + // verify the required parameter 'loginRequest' is set + if (loginRequest == null) { + throw new ApiException( + "Missing the required parameter 'loginRequest' when calling login(Async)"); + } + + return loginCall(loginRequest, _callback); + } + + /** + * Version: 9.0.0.cl or later Creates a login session for a ThoughtSpot user with Basic + * authentication. In Basic authentication method, REST clients log in to ThoughtSpot using + * `username` and `password` attributes. On a multi-tenant cluster with + * Orgs, users can pass the ID of the Org in the API request to log in to a specific Org + * context. **Note**: If Multi-Factor Authentication (MFA) is enabled on your instance, the API + * login request with basic authentication (`username` and `password` ) + * returns an error. Contact ThoughtSpot Support for assistance. A successful login returns a + * session cookie that can be used in your subsequent API requests. + * + * @param loginRequest (required) + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the + * response body + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
204 User login successful. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public void login(LoginRequest loginRequest) throws ApiException { + loginWithHttpInfo(loginRequest); + } + + /** + * Version: 9.0.0.cl or later Creates a login session for a ThoughtSpot user with Basic + * authentication. In Basic authentication method, REST clients log in to ThoughtSpot using + * `username` and `password` attributes. On a multi-tenant cluster with + * Orgs, users can pass the ID of the Org in the API request to log in to a specific Org + * context. **Note**: If Multi-Factor Authentication (MFA) is enabled on your instance, the API + * login request with basic authentication (`username` and `password` ) + * returns an error. Contact ThoughtSpot Support for assistance. A successful login returns a + * session cookie that can be used in your subsequent API requests. + * + * @param loginRequest (required) + * @return ApiResponse<Void> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the + * response body + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
204 User login successful. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public ApiResponse loginWithHttpInfo(LoginRequest loginRequest) throws ApiException { + okhttp3.Call localVarCall = loginValidateBeforeCall(loginRequest, null); + return localVarApiClient.execute(localVarCall); + } + + /** + * (asynchronously) Version: 9.0.0.cl or later Creates a login session for a ThoughtSpot user + * with Basic authentication. In Basic authentication method, REST clients log in to ThoughtSpot + * using `username` and `password` attributes. On a multi-tenant cluster + * with Orgs, users can pass the ID of the Org in the API request to log in to a specific Org + * context. **Note**: If Multi-Factor Authentication (MFA) is enabled on your instance, the API + * login request with basic authentication (`username` and `password` ) + * returns an error. Contact ThoughtSpot Support for assistance. A successful login returns a + * session cookie that can be used in your subsequent API requests. + * + * @param loginRequest (required) + * @param _callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body + * object + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
204 User login successful. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public okhttp3.Call loginAsync(LoginRequest loginRequest, final ApiCallback _callback) + throws ApiException { + + okhttp3.Call localVarCall = loginValidateBeforeCall(loginRequest, _callback); + localVarApiClient.executeAsync(localVarCall, _callback); + return localVarCall; + } + /** + * Build call for logout + * + * @param _callback Callback for upload/download progress + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
204 User logout successful. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public okhttp3.Call logoutCall(final ApiCallback _callback) throws ApiException { + String basePath = null; + // Operation Servers + String[] localBasePaths = new String[] {}; + + // Determine Base Path to Use + if (localCustomBaseUrl != null) { + basePath = localCustomBaseUrl; + } else if (localBasePaths.length > 0) { + basePath = localBasePaths[localHostIndex]; + } else { + basePath = null; + } + + Object localVarPostBody = null; + + // create path and map variables + String localVarPath = "/api/rest/2.0/auth/session/logout"; + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + final String[] localVarAccepts = {"application/json"}; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = {}; + final String localVarContentType = + localVarApiClient.selectHeaderContentType(localVarContentTypes); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } + + String[] localVarAuthNames = new String[] {"bearerAuth"}; + return localVarApiClient.buildCall( + basePath, + localVarPath, + "POST", + localVarQueryParams, + localVarCollectionQueryParams, + localVarPostBody, + localVarHeaderParams, + localVarCookieParams, + localVarFormParams, + localVarAuthNames, + _callback); + } + + @SuppressWarnings("rawtypes") + private okhttp3.Call logoutValidateBeforeCall(final ApiCallback _callback) throws ApiException { + return logoutCall(_callback); + } + + /** + * Version: 9.0.0.cl or later Logs out a user from their current session. + * + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the + * response body + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
204 User logout successful. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public void logout() throws ApiException { + logoutWithHttpInfo(); + } + + /** + * Version: 9.0.0.cl or later Logs out a user from their current session. + * + * @return ApiResponse<Void> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the + * response body + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
204 User logout successful. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public ApiResponse logoutWithHttpInfo() throws ApiException { + okhttp3.Call localVarCall = logoutValidateBeforeCall(null); + return localVarApiClient.execute(localVarCall); + } + + /** + * (asynchronously) Version: 9.0.0.cl or later Logs out a user from their current session. + * + * @param _callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body + * object + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
204 User logout successful. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public okhttp3.Call logoutAsync(final ApiCallback _callback) throws ApiException { + + okhttp3.Call localVarCall = logoutValidateBeforeCall(_callback); + localVarApiClient.executeAsync(localVarCall, _callback); + return localVarCall; + } + /** + * Build call for manageObjectPrivilege + * + * @param manageObjectPrivilegeRequest (required) + * @param _callback Callback for upload/download progress + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
204 Object privileges added/removed successfully -
400 Invalid request -
401 Unauthorized access -
403 Forbidden access -
500 Unexpected error -
+ */ + public okhttp3.Call manageObjectPrivilegeCall( + ManageObjectPrivilegeRequest manageObjectPrivilegeRequest, final ApiCallback _callback) + throws ApiException { + String basePath = null; + // Operation Servers + String[] localBasePaths = new String[] {}; + + // Determine Base Path to Use + if (localCustomBaseUrl != null) { + basePath = localCustomBaseUrl; + } else if (localBasePaths.length > 0) { + basePath = localBasePaths[localHostIndex]; + } else { + basePath = null; + } + + Object localVarPostBody = manageObjectPrivilegeRequest; + + // create path and map variables + String localVarPath = "/api/rest/2.0/security/metadata/manage-object-privilege"; + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + final String[] localVarAccepts = {"application/json"}; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = {"application/json"}; + final String localVarContentType = + localVarApiClient.selectHeaderContentType(localVarContentTypes); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } + + String[] localVarAuthNames = new String[] {"bearerAuth"}; + return localVarApiClient.buildCall( + basePath, + localVarPath, + "POST", + localVarQueryParams, + localVarCollectionQueryParams, + localVarPostBody, + localVarHeaderParams, + localVarCookieParams, + localVarFormParams, + localVarAuthNames, + _callback); + } + + @SuppressWarnings("rawtypes") + private okhttp3.Call manageObjectPrivilegeValidateBeforeCall( + ManageObjectPrivilegeRequest manageObjectPrivilegeRequest, final ApiCallback _callback) + throws ApiException { + // verify the required parameter 'manageObjectPrivilegeRequest' is set + if (manageObjectPrivilegeRequest == null) { + throw new ApiException( + "Missing the required parameter 'manageObjectPrivilegeRequest' when calling" + + " manageObjectPrivilege(Async)"); + } + + return manageObjectPrivilegeCall(manageObjectPrivilegeRequest, _callback); + } + + /** + * Version: 26.3.0.cl or later This API allows the addition or deletion of object level + * privileges for a set of users and groups, on a set of metadata objects. It provides users to + * access certain features based on privilege based access control. #### Usage guidelines - + * Specify the `operation`. The supported operations are: `ADD`, + * `REMOVE`. - Specify the type of the objects on which the object privileges are + * being provided in `metadata_type`. Only `LOGICAL_TABLE` metadata type is + * supported for now. It may be extended for other metadata types in future. - Specify the list + * of object privilege types in the `object_privilege_types` array. The supported + * object privilege types are: `SPOTTER_COACHING_PRIVILEGE`. - Specify the identifiers + * (either GUID or name) for the metadata objects in the `metadata_identifiers` array. + * - Specify the `type` (`USER` or `USER_GROUP`) and + * `identifier` (either GUID or name) of the principals to which you want to apply the + * given operation and given object privileges in the `principals` array. - Ensure + * using correct Authorization Bearer Token corresponding to specific user & org. #### + * Example request ```json { \"operation\": + * \"operation-type\", \"metadata_type\": \"metadata-type\", + * \"object_privilege_types\": [\"privilege-type-1\", + * \"privilege-type-2\"], \"metadata_identifiers\": + * [\"metadata-guid-or-name-1\", \"metadata-guid-or-name-1\"], + * \"principals\": [ { \"type\": \"type-1\", + * \"identifier\": \"principal-guid-or-name-1\" }, { \"type\": + * \"type-2\", \"identifier\": \"principal-guid-or-name-2\" } ] } + * ``` > ###### Note: > * Only admin users, users with edit access and + * users with coaching privilege on a given data-model can add or remove principals related to + * SPOTTER_COACHING_PRIVILEGE + * + * @param manageObjectPrivilegeRequest (required) + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the + * response body + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
204 Object privileges added/removed successfully -
400 Invalid request -
401 Unauthorized access -
403 Forbidden access -
500 Unexpected error -
+ */ + public void manageObjectPrivilege(ManageObjectPrivilegeRequest manageObjectPrivilegeRequest) + throws ApiException { + manageObjectPrivilegeWithHttpInfo(manageObjectPrivilegeRequest); + } + + /** + * Version: 26.3.0.cl or later This API allows the addition or deletion of object level + * privileges for a set of users and groups, on a set of metadata objects. It provides users to + * access certain features based on privilege based access control. #### Usage guidelines - + * Specify the `operation`. The supported operations are: `ADD`, + * `REMOVE`. - Specify the type of the objects on which the object privileges are + * being provided in `metadata_type`. Only `LOGICAL_TABLE` metadata type is + * supported for now. It may be extended for other metadata types in future. - Specify the list + * of object privilege types in the `object_privilege_types` array. The supported + * object privilege types are: `SPOTTER_COACHING_PRIVILEGE`. - Specify the identifiers + * (either GUID or name) for the metadata objects in the `metadata_identifiers` array. + * - Specify the `type` (`USER` or `USER_GROUP`) and + * `identifier` (either GUID or name) of the principals to which you want to apply the + * given operation and given object privileges in the `principals` array. - Ensure + * using correct Authorization Bearer Token corresponding to specific user & org. #### + * Example request ```json { \"operation\": + * \"operation-type\", \"metadata_type\": \"metadata-type\", + * \"object_privilege_types\": [\"privilege-type-1\", + * \"privilege-type-2\"], \"metadata_identifiers\": + * [\"metadata-guid-or-name-1\", \"metadata-guid-or-name-1\"], + * \"principals\": [ { \"type\": \"type-1\", + * \"identifier\": \"principal-guid-or-name-1\" }, { \"type\": + * \"type-2\", \"identifier\": \"principal-guid-or-name-2\" } ] } + * ``` > ###### Note: > * Only admin users, users with edit access and + * users with coaching privilege on a given data-model can add or remove principals related to + * SPOTTER_COACHING_PRIVILEGE + * + * @param manageObjectPrivilegeRequest (required) + * @return ApiResponse<Void> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the + * response body + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
204 Object privileges added/removed successfully -
400 Invalid request -
401 Unauthorized access -
403 Forbidden access -
500 Unexpected error -
+ */ + public ApiResponse manageObjectPrivilegeWithHttpInfo( + ManageObjectPrivilegeRequest manageObjectPrivilegeRequest) throws ApiException { + okhttp3.Call localVarCall = + manageObjectPrivilegeValidateBeforeCall(manageObjectPrivilegeRequest, null); + return localVarApiClient.execute(localVarCall); + } + + /** + * (asynchronously) Version: 26.3.0.cl or later This API allows the addition or deletion of + * object level privileges for a set of users and groups, on a set of metadata objects. It + * provides users to access certain features based on privilege based access control. #### Usage + * guidelines - Specify the `operation`. The supported operations are: + * `ADD`, `REMOVE`. - Specify the type of the objects on which the object + * privileges are being provided in `metadata_type`. Only `LOGICAL_TABLE` + * metadata type is supported for now. It may be extended for other metadata types in future. - + * Specify the list of object privilege types in the `object_privilege_types` array. + * The supported object privilege types are: `SPOTTER_COACHING_PRIVILEGE`. - Specify + * the identifiers (either GUID or name) for the metadata objects in the + * `metadata_identifiers` array. - Specify the `type` (`USER` or + * `USER_GROUP`) and `identifier` (either GUID or name) of the principals to + * which you want to apply the given operation and given object privileges in the + * `principals` array. - Ensure using correct Authorization Bearer Token corresponding + * to specific user & org. #### Example request ```json { + * \"operation\": \"operation-type\", \"metadata_type\": + * \"metadata-type\", \"object_privilege_types\": + * [\"privilege-type-1\", \"privilege-type-2\"], + * \"metadata_identifiers\": [\"metadata-guid-or-name-1\", + * \"metadata-guid-or-name-1\"], \"principals\": [ { \"type\": + * \"type-1\", \"identifier\": \"principal-guid-or-name-1\" }, { + * \"type\": \"type-2\", \"identifier\": + * \"principal-guid-or-name-2\" } ] } ``` > ###### Note: > * Only + * admin users, users with edit access and users with coaching privilege on a given data-model + * can add or remove principals related to SPOTTER_COACHING_PRIVILEGE + * + * @param manageObjectPrivilegeRequest (required) + * @param _callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body + * object + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
204 Object privileges added/removed successfully -
400 Invalid request -
401 Unauthorized access -
403 Forbidden access -
500 Unexpected error -
+ */ + public okhttp3.Call manageObjectPrivilegeAsync( + ManageObjectPrivilegeRequest manageObjectPrivilegeRequest, + final ApiCallback _callback) + throws ApiException { + + okhttp3.Call localVarCall = + manageObjectPrivilegeValidateBeforeCall(manageObjectPrivilegeRequest, _callback); + localVarApiClient.executeAsync(localVarCall, _callback); + return localVarCall; + } + /** + * Build call for parameterizeMetadata + * + * @param parameterizeMetadataRequest (required) + * @param _callback Callback for upload/download progress + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
204 Parameterize successful. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ * + * @deprecated + */ + @Deprecated + public okhttp3.Call parameterizeMetadataCall( + ParameterizeMetadataRequest parameterizeMetadataRequest, final ApiCallback _callback) + throws ApiException { + String basePath = null; + // Operation Servers + String[] localBasePaths = new String[] {}; + + // Determine Base Path to Use + if (localCustomBaseUrl != null) { + basePath = localCustomBaseUrl; + } else if (localBasePaths.length > 0) { + basePath = localBasePaths[localHostIndex]; + } else { + basePath = null; + } + + Object localVarPostBody = parameterizeMetadataRequest; + + // create path and map variables + String localVarPath = "/api/rest/2.0/metadata/parameterize"; + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + final String[] localVarAccepts = {"application/json"}; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = {"application/json"}; + final String localVarContentType = + localVarApiClient.selectHeaderContentType(localVarContentTypes); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } + + String[] localVarAuthNames = new String[] {"bearerAuth"}; + return localVarApiClient.buildCall( + basePath, + localVarPath, + "POST", + localVarQueryParams, + localVarCollectionQueryParams, + localVarPostBody, + localVarHeaderParams, + localVarCookieParams, + localVarFormParams, + localVarAuthNames, + _callback); + } + + @Deprecated + @SuppressWarnings("rawtypes") + private okhttp3.Call parameterizeMetadataValidateBeforeCall( + ParameterizeMetadataRequest parameterizeMetadataRequest, final ApiCallback _callback) + throws ApiException { + // verify the required parameter 'parameterizeMetadataRequest' is set + if (parameterizeMetadataRequest == null) { + throw new ApiException( + "Missing the required parameter 'parameterizeMetadataRequest' when calling" + + " parameterizeMetadata(Async)"); + } + + return parameterizeMetadataCall(parameterizeMetadataRequest, _callback); + } + + /** + * Parameterize fields in metadata objects. Version: 10.9.0.cl or later **Note:** This API + * endpoint is deprecated and will be removed from ThoughtSpot in a future release. Use [POST + * /api/rest/2.0/metadata/parameterize-fields](/api/rest/2.0/metadata/parameterize-fields) + * instead. Allows parameterizing fields in metadata objects in ThoughtSpot. Requires + * appropriate permissions to modify the metadata object. The API endpoint allows parameterizing + * the following types of metadata objects: * Logical Tables * Connections * Connection Configs + * For a Logical Table the field type must be `ATTRIBUTE` and field name can be one + * of: * databaseName * schemaName * tableName For a Connection or Connection Config, the field + * type is always `CONNECTION_PROPERTY`. In this case, field_name specifies the exact + * property of the Connection or Connection Config that needs to be parameterized. For + * Connection Config, the only supported field name is: * impersonate_user + * + * @param parameterizeMetadataRequest (required) + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the + * response body + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
204 Parameterize successful. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ * + * @deprecated + */ + @Deprecated + public void parameterizeMetadata(ParameterizeMetadataRequest parameterizeMetadataRequest) + throws ApiException { + parameterizeMetadataWithHttpInfo(parameterizeMetadataRequest); + } + + /** + * Parameterize fields in metadata objects. Version: 10.9.0.cl or later **Note:** This API + * endpoint is deprecated and will be removed from ThoughtSpot in a future release. Use [POST + * /api/rest/2.0/metadata/parameterize-fields](/api/rest/2.0/metadata/parameterize-fields) + * instead. Allows parameterizing fields in metadata objects in ThoughtSpot. Requires + * appropriate permissions to modify the metadata object. The API endpoint allows parameterizing + * the following types of metadata objects: * Logical Tables * Connections * Connection Configs + * For a Logical Table the field type must be `ATTRIBUTE` and field name can be one + * of: * databaseName * schemaName * tableName For a Connection or Connection Config, the field + * type is always `CONNECTION_PROPERTY`. In this case, field_name specifies the exact + * property of the Connection or Connection Config that needs to be parameterized. For + * Connection Config, the only supported field name is: * impersonate_user + * + * @param parameterizeMetadataRequest (required) + * @return ApiResponse<Void> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the + * response body + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
204 Parameterize successful. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ * + * @deprecated + */ + @Deprecated + public ApiResponse parameterizeMetadataWithHttpInfo( + ParameterizeMetadataRequest parameterizeMetadataRequest) throws ApiException { + okhttp3.Call localVarCall = + parameterizeMetadataValidateBeforeCall(parameterizeMetadataRequest, null); + return localVarApiClient.execute(localVarCall); + } + + /** + * (asynchronously) Parameterize fields in metadata objects. Version: 10.9.0.cl or later + * **Note:** This API endpoint is deprecated and will be removed from ThoughtSpot in a future + * release. Use [POST + * /api/rest/2.0/metadata/parameterize-fields](/api/rest/2.0/metadata/parameterize-fields) + * instead. Allows parameterizing fields in metadata objects in ThoughtSpot. Requires + * appropriate permissions to modify the metadata object. The API endpoint allows parameterizing + * the following types of metadata objects: * Logical Tables * Connections * Connection Configs + * For a Logical Table the field type must be `ATTRIBUTE` and field name can be one + * of: * databaseName * schemaName * tableName For a Connection or Connection Config, the field + * type is always `CONNECTION_PROPERTY`. In this case, field_name specifies the exact + * property of the Connection or Connection Config that needs to be parameterized. For + * Connection Config, the only supported field name is: * impersonate_user + * + * @param parameterizeMetadataRequest (required) + * @param _callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body + * object + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
204 Parameterize successful. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ * + * @deprecated + */ + @Deprecated + public okhttp3.Call parameterizeMetadataAsync( + ParameterizeMetadataRequest parameterizeMetadataRequest, + final ApiCallback _callback) + throws ApiException { + + okhttp3.Call localVarCall = + parameterizeMetadataValidateBeforeCall(parameterizeMetadataRequest, _callback); + localVarApiClient.executeAsync(localVarCall, _callback); + return localVarCall; + } + /** + * Build call for parameterizeMetadataFields + * + * @param parameterizeMetadataFieldsRequest (required) + * @param _callback Callback for upload/download progress + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
204 Parameterize successful. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public okhttp3.Call parameterizeMetadataFieldsCall( + ParameterizeMetadataFieldsRequest parameterizeMetadataFieldsRequest, + final ApiCallback _callback) + throws ApiException { + String basePath = null; + // Operation Servers + String[] localBasePaths = new String[] {}; + + // Determine Base Path to Use + if (localCustomBaseUrl != null) { + basePath = localCustomBaseUrl; + } else if (localBasePaths.length > 0) { + basePath = localBasePaths[localHostIndex]; + } else { + basePath = null; + } + + Object localVarPostBody = parameterizeMetadataFieldsRequest; + + // create path and map variables + String localVarPath = "/api/rest/2.0/metadata/parameterize-fields"; + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + final String[] localVarAccepts = {"application/json"}; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = {"application/json"}; + final String localVarContentType = + localVarApiClient.selectHeaderContentType(localVarContentTypes); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } + + String[] localVarAuthNames = new String[] {"bearerAuth"}; + return localVarApiClient.buildCall( + basePath, + localVarPath, + "POST", + localVarQueryParams, + localVarCollectionQueryParams, + localVarPostBody, + localVarHeaderParams, + localVarCookieParams, + localVarFormParams, + localVarAuthNames, + _callback); + } + + @SuppressWarnings("rawtypes") + private okhttp3.Call parameterizeMetadataFieldsValidateBeforeCall( + ParameterizeMetadataFieldsRequest parameterizeMetadataFieldsRequest, + final ApiCallback _callback) + throws ApiException { + // verify the required parameter 'parameterizeMetadataFieldsRequest' is set + if (parameterizeMetadataFieldsRequest == null) { + throw new ApiException( + "Missing the required parameter 'parameterizeMetadataFieldsRequest' when" + + " calling parameterizeMetadataFields(Async)"); + } + + return parameterizeMetadataFieldsCall(parameterizeMetadataFieldsRequest, _callback); + } + + /** + * Parameterize multiple fields of metadata objects. For example [schemaName, databaseName] for + * LOGICAL_TABLE. Version: 26.5.0.cl or later Allows parameterizing multiple fields of metadata + * objects in ThoughtSpot. For example, you can parameterize [schemaName, databaseName] for + * LOGICAL_TABLE. Requires appropriate permissions to modify the metadata object. The API + * endpoint allows parameterizing the following types of metadata objects: * Logical Tables * + * Connections * Connection Configs For a Logical Table, the field type must be + * `ATTRIBUTE` and field names can include: * databaseName * schemaName * tableName + * For a Connection or Connection Config, the field type is always + * `CONNECTION_PROPERTY`. In this case, field_names specifies the exact properties of + * the Connection or Connection Config that need to be parameterized. For Connection Config, + * supported field names include: * impersonate_user You can parameterize multiple fields at + * once by providing an array of field names. + * + * @param parameterizeMetadataFieldsRequest (required) + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the + * response body + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
204 Parameterize successful. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public void parameterizeMetadataFields( + ParameterizeMetadataFieldsRequest parameterizeMetadataFieldsRequest) + throws ApiException { + parameterizeMetadataFieldsWithHttpInfo(parameterizeMetadataFieldsRequest); + } + + /** + * Parameterize multiple fields of metadata objects. For example [schemaName, databaseName] for + * LOGICAL_TABLE. Version: 26.5.0.cl or later Allows parameterizing multiple fields of metadata + * objects in ThoughtSpot. For example, you can parameterize [schemaName, databaseName] for + * LOGICAL_TABLE. Requires appropriate permissions to modify the metadata object. The API + * endpoint allows parameterizing the following types of metadata objects: * Logical Tables * + * Connections * Connection Configs For a Logical Table, the field type must be + * `ATTRIBUTE` and field names can include: * databaseName * schemaName * tableName + * For a Connection or Connection Config, the field type is always + * `CONNECTION_PROPERTY`. In this case, field_names specifies the exact properties of + * the Connection or Connection Config that need to be parameterized. For Connection Config, + * supported field names include: * impersonate_user You can parameterize multiple fields at + * once by providing an array of field names. + * + * @param parameterizeMetadataFieldsRequest (required) + * @return ApiResponse<Void> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the + * response body + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
204 Parameterize successful. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public ApiResponse parameterizeMetadataFieldsWithHttpInfo( + ParameterizeMetadataFieldsRequest parameterizeMetadataFieldsRequest) + throws ApiException { + okhttp3.Call localVarCall = + parameterizeMetadataFieldsValidateBeforeCall( + parameterizeMetadataFieldsRequest, null); + return localVarApiClient.execute(localVarCall); + } + + /** + * (asynchronously) Parameterize multiple fields of metadata objects. For example [schemaName, + * databaseName] for LOGICAL_TABLE. Version: 26.5.0.cl or later Allows parameterizing multiple + * fields of metadata objects in ThoughtSpot. For example, you can parameterize [schemaName, + * databaseName] for LOGICAL_TABLE. Requires appropriate permissions to modify the metadata + * object. The API endpoint allows parameterizing the following types of metadata objects: * + * Logical Tables * Connections * Connection Configs For a Logical Table, the field type must be + * `ATTRIBUTE` and field names can include: * databaseName * schemaName * tableName + * For a Connection or Connection Config, the field type is always + * `CONNECTION_PROPERTY`. In this case, field_names specifies the exact properties of + * the Connection or Connection Config that need to be parameterized. For Connection Config, + * supported field names include: * impersonate_user You can parameterize multiple fields at + * once by providing an array of field names. + * + * @param parameterizeMetadataFieldsRequest (required) + * @param _callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body + * object + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
204 Parameterize successful. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public okhttp3.Call parameterizeMetadataFieldsAsync( + ParameterizeMetadataFieldsRequest parameterizeMetadataFieldsRequest, + final ApiCallback _callback) + throws ApiException { + + okhttp3.Call localVarCall = + parameterizeMetadataFieldsValidateBeforeCall( + parameterizeMetadataFieldsRequest, _callback); + localVarApiClient.executeAsync(localVarCall, _callback); + return localVarCall; + } + /** + * Build call for publishMetadata + * + * @param publishMetadataRequest (required) + * @param _callback Callback for upload/download progress + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
204 Publishing metadata objects is successful. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public okhttp3.Call publishMetadataCall( + PublishMetadataRequest publishMetadataRequest, final ApiCallback _callback) + throws ApiException { + String basePath = null; + // Operation Servers + String[] localBasePaths = new String[] {}; + + // Determine Base Path to Use + if (localCustomBaseUrl != null) { + basePath = localCustomBaseUrl; + } else if (localBasePaths.length > 0) { + basePath = localBasePaths[localHostIndex]; + } else { + basePath = null; + } + + Object localVarPostBody = publishMetadataRequest; + + // create path and map variables + String localVarPath = "/api/rest/2.0/security/metadata/publish"; + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + final String[] localVarAccepts = {"application/json"}; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = {"application/json"}; + final String localVarContentType = + localVarApiClient.selectHeaderContentType(localVarContentTypes); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } + + String[] localVarAuthNames = new String[] {"bearerAuth"}; + return localVarApiClient.buildCall( + basePath, + localVarPath, + "POST", + localVarQueryParams, + localVarCollectionQueryParams, + localVarPostBody, + localVarHeaderParams, + localVarCookieParams, + localVarFormParams, + localVarAuthNames, + _callback); + } + + @SuppressWarnings("rawtypes") + private okhttp3.Call publishMetadataValidateBeforeCall( + PublishMetadataRequest publishMetadataRequest, final ApiCallback _callback) + throws ApiException { + // verify the required parameter 'publishMetadataRequest' is set + if (publishMetadataRequest == null) { + throw new ApiException( + "Missing the required parameter 'publishMetadataRequest' when calling" + + " publishMetadata(Async)"); + } + + return publishMetadataCall(publishMetadataRequest, _callback); + } + + /** + * Version: 26.5.0.cl or later Allows publishing metadata objects across organizations in + * ThoughtSpot. Requires ADMINISTRATION role and TENANT scope. The API endpoint allows + * publishing the following types of metadata objects: * Liveboards * Answers * Logical Tables + * This API will essentially share the objects along with it's dependencies to the org + * admins of the orgs to which it is being published. + * + * @param publishMetadataRequest (required) + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the + * response body + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
204 Publishing metadata objects is successful. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public void publishMetadata(PublishMetadataRequest publishMetadataRequest) throws ApiException { + publishMetadataWithHttpInfo(publishMetadataRequest); + } + + /** + * Version: 26.5.0.cl or later Allows publishing metadata objects across organizations in + * ThoughtSpot. Requires ADMINISTRATION role and TENANT scope. The API endpoint allows + * publishing the following types of metadata objects: * Liveboards * Answers * Logical Tables + * This API will essentially share the objects along with it's dependencies to the org + * admins of the orgs to which it is being published. + * + * @param publishMetadataRequest (required) + * @return ApiResponse<Void> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the + * response body + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
204 Publishing metadata objects is successful. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public ApiResponse publishMetadataWithHttpInfo( + PublishMetadataRequest publishMetadataRequest) throws ApiException { + okhttp3.Call localVarCall = publishMetadataValidateBeforeCall(publishMetadataRequest, null); + return localVarApiClient.execute(localVarCall); + } + + /** + * (asynchronously) Version: 26.5.0.cl or later Allows publishing metadata objects across + * organizations in ThoughtSpot. Requires ADMINISTRATION role and TENANT scope. The API endpoint + * allows publishing the following types of metadata objects: * Liveboards * Answers * Logical + * Tables This API will essentially share the objects along with it's dependencies to the + * org admins of the orgs to which it is being published. + * + * @param publishMetadataRequest (required) + * @param _callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body + * object + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
204 Publishing metadata objects is successful. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public okhttp3.Call publishMetadataAsync( + PublishMetadataRequest publishMetadataRequest, final ApiCallback _callback) + throws ApiException { + + okhttp3.Call localVarCall = + publishMetadataValidateBeforeCall(publishMetadataRequest, _callback); + localVarApiClient.executeAsync(localVarCall, _callback); + return localVarCall; + } + /** + * Build call for putVariableValues + * + * @param identifier Unique ID or name of the variable (required) + * @param putVariableValuesRequest (required) + * @param _callback Callback for upload/download progress + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
204 Variable values updated successfully. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public okhttp3.Call putVariableValuesCall( + String identifier, + PutVariableValuesRequest putVariableValuesRequest, + final ApiCallback _callback) + throws ApiException { + String basePath = null; + // Operation Servers + String[] localBasePaths = new String[] {}; + + // Determine Base Path to Use + if (localCustomBaseUrl != null) { + basePath = localCustomBaseUrl; + } else if (localBasePaths.length > 0) { + basePath = localBasePaths[localHostIndex]; + } else { + basePath = null; + } + + Object localVarPostBody = putVariableValuesRequest; + + // create path and map variables + String localVarPath = + "/api/rest/2.0/template/variables/{identifier}/update-values" + .replace( + "{" + "identifier" + "}", + localVarApiClient.escapeString(identifier.toString())); + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + final String[] localVarAccepts = {"application/json"}; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = {"application/json"}; + final String localVarContentType = + localVarApiClient.selectHeaderContentType(localVarContentTypes); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } + + String[] localVarAuthNames = new String[] {"bearerAuth"}; + return localVarApiClient.buildCall( + basePath, + localVarPath, + "POST", + localVarQueryParams, + localVarCollectionQueryParams, + localVarPostBody, + localVarHeaderParams, + localVarCookieParams, + localVarFormParams, + localVarAuthNames, + _callback); + } + + @SuppressWarnings("rawtypes") + private okhttp3.Call putVariableValuesValidateBeforeCall( + String identifier, + PutVariableValuesRequest putVariableValuesRequest, + final ApiCallback _callback) + throws ApiException { + // verify the required parameter 'identifier' is set + if (identifier == null) { + throw new ApiException( + "Missing the required parameter 'identifier' when calling" + + " putVariableValues(Async)"); + } + + // verify the required parameter 'putVariableValuesRequest' is set + if (putVariableValuesRequest == null) { + throw new ApiException( + "Missing the required parameter 'putVariableValuesRequest' when calling" + + " putVariableValues(Async)"); + } + + return putVariableValuesCall(identifier, putVariableValuesRequest, _callback); + } + + /** + * Update values for a variable Version: 26.4.0.cl or later Allows updating values for a + * specific variable in ThoughtSpot. Requires ADMINISTRATION role. The CAN_MANAGE_VARIABLES + * permission allows you to manage Formula Variables in the current organization scope. The API + * endpoint allows: * Adding new values to the variable * Replacing existing values * Deleting + * values from the variable * Resetting all values When updating variable values, you need to + * specify: * The variable identifier (ID or name) * The values to add/replace/remove * The + * operation to perform (ADD, REPLACE, REMOVE, RESET) Behaviour based on operation type: * ADD - + * Adds values to the variable if this is a list type variable, else same as replace. * REPLACE + * - Replaces all values of a given set of constraints with the current set of values. * REMOVE + * - Removes any values which match the set of conditions of the variables if this is a list + * type variable, else clears value. * RESET - Removes all constraints for the given variable, + * scope is ignored + * + * @param identifier Unique ID or name of the variable (required) + * @param putVariableValuesRequest (required) + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the + * response body + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
204 Variable values updated successfully. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public void putVariableValues( + String identifier, PutVariableValuesRequest putVariableValuesRequest) + throws ApiException { + putVariableValuesWithHttpInfo(identifier, putVariableValuesRequest); + } + + /** + * Update values for a variable Version: 26.4.0.cl or later Allows updating values for a + * specific variable in ThoughtSpot. Requires ADMINISTRATION role. The CAN_MANAGE_VARIABLES + * permission allows you to manage Formula Variables in the current organization scope. The API + * endpoint allows: * Adding new values to the variable * Replacing existing values * Deleting + * values from the variable * Resetting all values When updating variable values, you need to + * specify: * The variable identifier (ID or name) * The values to add/replace/remove * The + * operation to perform (ADD, REPLACE, REMOVE, RESET) Behaviour based on operation type: * ADD - + * Adds values to the variable if this is a list type variable, else same as replace. * REPLACE + * - Replaces all values of a given set of constraints with the current set of values. * REMOVE + * - Removes any values which match the set of conditions of the variables if this is a list + * type variable, else clears value. * RESET - Removes all constraints for the given variable, + * scope is ignored + * + * @param identifier Unique ID or name of the variable (required) + * @param putVariableValuesRequest (required) + * @return ApiResponse<Void> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the + * response body + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
204 Variable values updated successfully. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public ApiResponse putVariableValuesWithHttpInfo( + String identifier, PutVariableValuesRequest putVariableValuesRequest) + throws ApiException { + okhttp3.Call localVarCall = + putVariableValuesValidateBeforeCall(identifier, putVariableValuesRequest, null); + return localVarApiClient.execute(localVarCall); + } + + /** + * (asynchronously) Update values for a variable Version: 26.4.0.cl or later Allows updating + * values for a specific variable in ThoughtSpot. Requires ADMINISTRATION role. The + * CAN_MANAGE_VARIABLES permission allows you to manage Formula Variables in the current + * organization scope. The API endpoint allows: * Adding new values to the variable * Replacing + * existing values * Deleting values from the variable * Resetting all values When updating + * variable values, you need to specify: * The variable identifier (ID or name) * The values to + * add/replace/remove * The operation to perform (ADD, REPLACE, REMOVE, RESET) Behaviour based + * on operation type: * ADD - Adds values to the variable if this is a list type variable, else + * same as replace. * REPLACE - Replaces all values of a given set of constraints with the + * current set of values. * REMOVE - Removes any values which match the set of conditions of the + * variables if this is a list type variable, else clears value. * RESET - Removes all + * constraints for the given variable, scope is ignored + * + * @param identifier Unique ID or name of the variable (required) + * @param putVariableValuesRequest (required) + * @param _callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body + * object + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
204 Variable values updated successfully. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public okhttp3.Call putVariableValuesAsync( + String identifier, + PutVariableValuesRequest putVariableValuesRequest, + final ApiCallback _callback) + throws ApiException { + + okhttp3.Call localVarCall = + putVariableValuesValidateBeforeCall( + identifier, putVariableValuesRequest, _callback); + localVarApiClient.executeAsync(localVarCall, _callback); + return localVarCall; + } + /** + * Build call for queryGetDecomposedQuery + * + * @param queryGetDecomposedQueryRequest (required) + * @param _callback Callback for upload/download progress + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + * @http.response.details + * + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 Common successful response -
201 Common error response -
400 Operation failed -
401 Unauthorized access. -
403 Forbidden access. -
500 Operation failed -
+ * + * @deprecated + */ + @Deprecated + public okhttp3.Call queryGetDecomposedQueryCall( + QueryGetDecomposedQueryRequest queryGetDecomposedQueryRequest, + final ApiCallback _callback) + throws ApiException { + String basePath = null; + // Operation Servers + String[] localBasePaths = new String[] {}; + + // Determine Base Path to Use + if (localCustomBaseUrl != null) { + basePath = localCustomBaseUrl; + } else if (localBasePaths.length > 0) { + basePath = localBasePaths[localHostIndex]; + } else { + basePath = null; + } + + Object localVarPostBody = queryGetDecomposedQueryRequest; + + // create path and map variables + String localVarPath = "/api/rest/2.0/ai/analytical-questions"; + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + final String[] localVarAccepts = {"application/json"}; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = {"application/json"}; + final String localVarContentType = + localVarApiClient.selectHeaderContentType(localVarContentTypes); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } + + String[] localVarAuthNames = new String[] {"bearerAuth"}; + return localVarApiClient.buildCall( + basePath, + localVarPath, + "POST", + localVarQueryParams, + localVarCollectionQueryParams, + localVarPostBody, + localVarHeaderParams, + localVarCookieParams, + localVarFormParams, + localVarAuthNames, + _callback); + } + + @Deprecated + @SuppressWarnings("rawtypes") + private okhttp3.Call queryGetDecomposedQueryValidateBeforeCall( + QueryGetDecomposedQueryRequest queryGetDecomposedQueryRequest, + final ApiCallback _callback) + throws ApiException { + // verify the required parameter 'queryGetDecomposedQueryRequest' is set + if (queryGetDecomposedQueryRequest == null) { + throw new ApiException( + "Missing the required parameter 'queryGetDecomposedQueryRequest' when calling" + + " queryGetDecomposedQuery(Async)"); + } + + return queryGetDecomposedQueryCall(queryGetDecomposedQueryRequest, _callback); + } + + /** + * Version: 10.7.0.cl or later **Deprecated** — Use `getRelevantQuestions` instead + * (available from 10.13.0.cl). Breaks down a topical or goal-oriented natural language question + * into smaller, actionable analytical sub-questions, each mapped to a relevant data source for + * independent execution. Requires `CAN_USE_SPOTTER` privilege and at least view-level + * access to the referenced metadata objects. #### Usage guidelines The request accepts the + * following parameters: - `nlsRequest`: contains the user `query` to + * decompose, along with optional `instructions` and `bypassCache` flag - + * `worksheetIds`: list of data source identifiers to scope the decomposition - + * `answerIds`: list of Answer GUIDs whose data guides the response - + * `liveboardIds`: list of Liveboard GUIDs whose data guides the response - + * `conversationId`: an existing conversation session ID for context continuity - + * `content`: supplementary text or CSV data to improve response quality - + * `maxDecomposedQueries`: maximum number of sub-questions to return (default: + * `5`) If the request is successful, the API returns a + * `decomposedQueryResponse` containing a list of `decomposedQueries`, each + * with: - `query`: the generated analytical sub-question - `worksheetId`: + * the unique ID of the data source the question targets - `worksheetName`: the + * display name of the corresponding data source #### Error responses | Code | Description | + * |------|---------------------------------------------------------------------------------------------------------------------------------------| + * | 401 | Unauthorized — authentication token is missing, expired, or invalid. | | 403 | + * Forbidden — the authenticated user does not have `CAN_USE_SPOTTER` privilege or + * lacks view access to the referenced metadata objects. | > ###### Note: > * This + * endpoint is deprecated since 10.13.0.cl. Use `getRelevantQuestions` for new + * integrations. > * This endpoint is currently in Beta. Breaking changes may be introduced + * before the endpoint is made Generally Available. > * This endpoint requires Spotter — + * please contact ThoughtSpot support to enable Spotter on your cluster. + * + * @param queryGetDecomposedQueryRequest (required) + * @return EurekaDecomposeQueryResponse + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the + * response body + * @http.response.details + * + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 Common successful response -
201 Common error response -
400 Operation failed -
401 Unauthorized access. -
403 Forbidden access. -
500 Operation failed -
+ * + * @deprecated + */ + @Deprecated + public EurekaDecomposeQueryResponse queryGetDecomposedQuery( + QueryGetDecomposedQueryRequest queryGetDecomposedQueryRequest) throws ApiException { + ApiResponse localVarResp = + queryGetDecomposedQueryWithHttpInfo(queryGetDecomposedQueryRequest); + return localVarResp.getData(); + } + + /** + * Version: 10.7.0.cl or later **Deprecated** — Use `getRelevantQuestions` instead + * (available from 10.13.0.cl). Breaks down a topical or goal-oriented natural language question + * into smaller, actionable analytical sub-questions, each mapped to a relevant data source for + * independent execution. Requires `CAN_USE_SPOTTER` privilege and at least view-level + * access to the referenced metadata objects. #### Usage guidelines The request accepts the + * following parameters: - `nlsRequest`: contains the user `query` to + * decompose, along with optional `instructions` and `bypassCache` flag - + * `worksheetIds`: list of data source identifiers to scope the decomposition - + * `answerIds`: list of Answer GUIDs whose data guides the response - + * `liveboardIds`: list of Liveboard GUIDs whose data guides the response - + * `conversationId`: an existing conversation session ID for context continuity - + * `content`: supplementary text or CSV data to improve response quality - + * `maxDecomposedQueries`: maximum number of sub-questions to return (default: + * `5`) If the request is successful, the API returns a + * `decomposedQueryResponse` containing a list of `decomposedQueries`, each + * with: - `query`: the generated analytical sub-question - `worksheetId`: + * the unique ID of the data source the question targets - `worksheetName`: the + * display name of the corresponding data source #### Error responses | Code | Description | + * |------|---------------------------------------------------------------------------------------------------------------------------------------| + * | 401 | Unauthorized — authentication token is missing, expired, or invalid. | | 403 | + * Forbidden — the authenticated user does not have `CAN_USE_SPOTTER` privilege or + * lacks view access to the referenced metadata objects. | > ###### Note: > * This + * endpoint is deprecated since 10.13.0.cl. Use `getRelevantQuestions` for new + * integrations. > * This endpoint is currently in Beta. Breaking changes may be introduced + * before the endpoint is made Generally Available. > * This endpoint requires Spotter — + * please contact ThoughtSpot support to enable Spotter on your cluster. + * + * @param queryGetDecomposedQueryRequest (required) + * @return ApiResponse<EurekaDecomposeQueryResponse> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the + * response body + * @http.response.details + * + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 Common successful response -
201 Common error response -
400 Operation failed -
401 Unauthorized access. -
403 Forbidden access. -
500 Operation failed -
+ * + * @deprecated + */ + @Deprecated + public ApiResponse queryGetDecomposedQueryWithHttpInfo( + QueryGetDecomposedQueryRequest queryGetDecomposedQueryRequest) throws ApiException { + okhttp3.Call localVarCall = + queryGetDecomposedQueryValidateBeforeCall(queryGetDecomposedQueryRequest, null); + Type localVarReturnType = new TypeToken() {}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); + } + + /** + * (asynchronously) Version: 10.7.0.cl or later **Deprecated** — Use + * `getRelevantQuestions` instead (available from 10.13.0.cl). Breaks down a topical + * or goal-oriented natural language question into smaller, actionable analytical sub-questions, + * each mapped to a relevant data source for independent execution. Requires + * `CAN_USE_SPOTTER` privilege and at least view-level access to the referenced + * metadata objects. #### Usage guidelines The request accepts the following parameters: - + * `nlsRequest`: contains the user `query` to decompose, along with optional + * `instructions` and `bypassCache` flag - `worksheetIds`: list of + * data source identifiers to scope the decomposition - `answerIds`: list of Answer + * GUIDs whose data guides the response - `liveboardIds`: list of Liveboard GUIDs + * whose data guides the response - `conversationId`: an existing conversation session + * ID for context continuity - `content`: supplementary text or CSV data to improve + * response quality - `maxDecomposedQueries`: maximum number of sub-questions to + * return (default: `5`) If the request is successful, the API returns a + * `decomposedQueryResponse` containing a list of `decomposedQueries`, each + * with: - `query`: the generated analytical sub-question - `worksheetId`: + * the unique ID of the data source the question targets - `worksheetName`: the + * display name of the corresponding data source #### Error responses | Code | Description | + * |------|---------------------------------------------------------------------------------------------------------------------------------------| + * | 401 | Unauthorized — authentication token is missing, expired, or invalid. | | 403 | + * Forbidden — the authenticated user does not have `CAN_USE_SPOTTER` privilege or + * lacks view access to the referenced metadata objects. | > ###### Note: > * This + * endpoint is deprecated since 10.13.0.cl. Use `getRelevantQuestions` for new + * integrations. > * This endpoint is currently in Beta. Breaking changes may be introduced + * before the endpoint is made Generally Available. > * This endpoint requires Spotter — + * please contact ThoughtSpot support to enable Spotter on your cluster. + * + * @param queryGetDecomposedQueryRequest (required) + * @param _callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body + * object + * @http.response.details + * + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 Common successful response -
201 Common error response -
400 Operation failed -
401 Unauthorized access. -
403 Forbidden access. -
500 Operation failed -
+ * + * @deprecated + */ + @Deprecated + public okhttp3.Call queryGetDecomposedQueryAsync( + QueryGetDecomposedQueryRequest queryGetDecomposedQueryRequest, + final ApiCallback _callback) + throws ApiException { + + okhttp3.Call localVarCall = + queryGetDecomposedQueryValidateBeforeCall( + queryGetDecomposedQueryRequest, _callback); + Type localVarReturnType = new TypeToken() {}.getType(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; + } + /** + * Build call for resetUserPassword + * + * @param resetUserPasswordRequest (required) + * @param _callback Callback for upload/download progress + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
204 User password reset operation successful. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public okhttp3.Call resetUserPasswordCall( + ResetUserPasswordRequest resetUserPasswordRequest, final ApiCallback _callback) + throws ApiException { + String basePath = null; + // Operation Servers + String[] localBasePaths = new String[] {}; + + // Determine Base Path to Use + if (localCustomBaseUrl != null) { + basePath = localCustomBaseUrl; + } else if (localBasePaths.length > 0) { + basePath = localBasePaths[localHostIndex]; + } else { + basePath = null; + } + + Object localVarPostBody = resetUserPasswordRequest; + + // create path and map variables + String localVarPath = "/api/rest/2.0/users/reset-password"; + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + final String[] localVarAccepts = {"application/json"}; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = {"application/json"}; + final String localVarContentType = + localVarApiClient.selectHeaderContentType(localVarContentTypes); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } + + String[] localVarAuthNames = new String[] {"bearerAuth"}; + return localVarApiClient.buildCall( + basePath, + localVarPath, + "POST", + localVarQueryParams, + localVarCollectionQueryParams, + localVarPostBody, + localVarHeaderParams, + localVarCookieParams, + localVarFormParams, + localVarAuthNames, + _callback); + } + + @SuppressWarnings("rawtypes") + private okhttp3.Call resetUserPasswordValidateBeforeCall( + ResetUserPasswordRequest resetUserPasswordRequest, final ApiCallback _callback) + throws ApiException { + // verify the required parameter 'resetUserPasswordRequest' is set + if (resetUserPasswordRequest == null) { + throw new ApiException( + "Missing the required parameter 'resetUserPasswordRequest' when calling" + + " resetUserPassword(Async)"); + } + + return resetUserPasswordCall(resetUserPasswordRequest, _callback); + } + + /** + * Version: 9.0.0.cl or later Resets the password of a user account. Administrators can reset + * password on behalf of a user. Requires `ADMINISTRATION` (**Can administer + * ThoughtSpot**) privilege. If [Role-Based Access Control + * (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the + * `USER_ADMINISTRATION` (**Can manage users**) privilege is required. + * + * @param resetUserPasswordRequest (required) + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the + * response body + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
204 User password reset operation successful. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public void resetUserPassword(ResetUserPasswordRequest resetUserPasswordRequest) + throws ApiException { + resetUserPasswordWithHttpInfo(resetUserPasswordRequest); + } + + /** + * Version: 9.0.0.cl or later Resets the password of a user account. Administrators can reset + * password on behalf of a user. Requires `ADMINISTRATION` (**Can administer + * ThoughtSpot**) privilege. If [Role-Based Access Control + * (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the + * `USER_ADMINISTRATION` (**Can manage users**) privilege is required. + * + * @param resetUserPasswordRequest (required) + * @return ApiResponse<Void> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the + * response body + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
204 User password reset operation successful. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public ApiResponse resetUserPasswordWithHttpInfo( + ResetUserPasswordRequest resetUserPasswordRequest) throws ApiException { + okhttp3.Call localVarCall = + resetUserPasswordValidateBeforeCall(resetUserPasswordRequest, null); + return localVarApiClient.execute(localVarCall); + } + + /** + * (asynchronously) Version: 9.0.0.cl or later Resets the password of a user account. + * Administrators can reset password on behalf of a user. Requires `ADMINISTRATION` + * (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control + * (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the + * `USER_ADMINISTRATION` (**Can manage users**) privilege is required. + * + * @param resetUserPasswordRequest (required) + * @param _callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body + * object + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
204 User password reset operation successful. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public okhttp3.Call resetUserPasswordAsync( + ResetUserPasswordRequest resetUserPasswordRequest, final ApiCallback _callback) + throws ApiException { + + okhttp3.Call localVarCall = + resetUserPasswordValidateBeforeCall(resetUserPasswordRequest, _callback); + localVarApiClient.executeAsync(localVarCall, _callback); + return localVarCall; + } + /** + * Build call for revertCommit + * + * @param commitId Commit id to which the object should be reverted (required) + * @param revertCommitRequest (required) + * @param _callback Callback for upload/download progress + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 Reverted the object to the commit point specified -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public okhttp3.Call revertCommitCall( + String commitId, RevertCommitRequest revertCommitRequest, final ApiCallback _callback) + throws ApiException { + String basePath = null; + // Operation Servers + String[] localBasePaths = new String[] {}; + + // Determine Base Path to Use + if (localCustomBaseUrl != null) { + basePath = localCustomBaseUrl; + } else if (localBasePaths.length > 0) { + basePath = localBasePaths[localHostIndex]; + } else { + basePath = null; + } + + Object localVarPostBody = revertCommitRequest; + + // create path and map variables + String localVarPath = + "/api/rest/2.0/vcs/git/commits/{commit_id}/revert" + .replace( + "{" + "commit_id" + "}", + localVarApiClient.escapeString(commitId.toString())); + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + final String[] localVarAccepts = {"application/json"}; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = {"application/json"}; + final String localVarContentType = + localVarApiClient.selectHeaderContentType(localVarContentTypes); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } + + String[] localVarAuthNames = new String[] {"bearerAuth"}; + return localVarApiClient.buildCall( + basePath, + localVarPath, + "POST", + localVarQueryParams, + localVarCollectionQueryParams, + localVarPostBody, + localVarHeaderParams, + localVarCookieParams, + localVarFormParams, + localVarAuthNames, + _callback); + } + + @SuppressWarnings("rawtypes") + private okhttp3.Call revertCommitValidateBeforeCall( + String commitId, RevertCommitRequest revertCommitRequest, final ApiCallback _callback) + throws ApiException { + // verify the required parameter 'commitId' is set + if (commitId == null) { + throw new ApiException( + "Missing the required parameter 'commitId' when calling revertCommit(Async)"); + } + + // verify the required parameter 'revertCommitRequest' is set + if (revertCommitRequest == null) { + throw new ApiException( + "Missing the required parameter 'revertCommitRequest' when calling" + + " revertCommit(Async)"); + } + + return revertCommitCall(commitId, revertCommitRequest, _callback); + } + + /** + * Version: 9.2.0.cl or later Reverts TML objects to a previous commit specified in the API + * request. Requires at least edit access to objects. In the API request, specify the + * `commit_id`. If the branch name is not specified in the request, the API will + * consider the default branch configured on your instance. By default, the API reverts all + * objects. If the revert operation fails for one of the objects provided in the commit, the API + * returns an error and does not revert any object. For more information, see [Git integration + * documentation](https://developers.thoughtspot.com/docs/git-integration). + * + * @param commitId Commit id to which the object should be reverted (required) + * @param revertCommitRequest (required) + * @return RevertResponse + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the + * response body + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 Reverted the object to the commit point specified -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public RevertResponse revertCommit(String commitId, RevertCommitRequest revertCommitRequest) + throws ApiException { + ApiResponse localVarResp = + revertCommitWithHttpInfo(commitId, revertCommitRequest); + return localVarResp.getData(); + } + + /** + * Version: 9.2.0.cl or later Reverts TML objects to a previous commit specified in the API + * request. Requires at least edit access to objects. In the API request, specify the + * `commit_id`. If the branch name is not specified in the request, the API will + * consider the default branch configured on your instance. By default, the API reverts all + * objects. If the revert operation fails for one of the objects provided in the commit, the API + * returns an error and does not revert any object. For more information, see [Git integration + * documentation](https://developers.thoughtspot.com/docs/git-integration). + * + * @param commitId Commit id to which the object should be reverted (required) + * @param revertCommitRequest (required) + * @return ApiResponse<RevertResponse> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the + * response body + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 Reverted the object to the commit point specified -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public ApiResponse revertCommitWithHttpInfo( + String commitId, RevertCommitRequest revertCommitRequest) throws ApiException { + okhttp3.Call localVarCall = + revertCommitValidateBeforeCall(commitId, revertCommitRequest, null); + Type localVarReturnType = new TypeToken() {}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); + } + + /** + * (asynchronously) Version: 9.2.0.cl or later Reverts TML objects to a previous commit + * specified in the API request. Requires at least edit access to objects. In the API request, + * specify the `commit_id`. If the branch name is not specified in the request, the + * API will consider the default branch configured on your instance. By default, the API reverts + * all objects. If the revert operation fails for one of the objects provided in the commit, the + * API returns an error and does not revert any object. For more information, see [Git + * integration documentation](https://developers.thoughtspot.com/docs/git-integration). + * + * @param commitId Commit id to which the object should be reverted (required) + * @param revertCommitRequest (required) + * @param _callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body + * object + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 Reverted the object to the commit point specified -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public okhttp3.Call revertCommitAsync( + String commitId, + RevertCommitRequest revertCommitRequest, + final ApiCallback _callback) + throws ApiException { + + okhttp3.Call localVarCall = + revertCommitValidateBeforeCall(commitId, revertCommitRequest, _callback); + Type localVarReturnType = new TypeToken() {}.getType(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; + } + /** + * Build call for revokeRefreshTokens + * + * @param connectionIdentifier Unique ID or name of the connection whose refresh tokens need to + * be revoked. All the users associated with the connection will have their refresh tokens + * revoked except the author. (required) + * @param revokeRefreshTokensRequest (required) + * @param _callback Callback for upload/download progress + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + * @http.response.details + * + * + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 Token(s) successfully revoked. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
404 Object not found -
409 Conflict -
500 Unexpected error -
+ */ + public okhttp3.Call revokeRefreshTokensCall( + String connectionIdentifier, + RevokeRefreshTokensRequest revokeRefreshTokensRequest, + final ApiCallback _callback) + throws ApiException { + String basePath = null; + // Operation Servers + String[] localBasePaths = new String[] {}; + + // Determine Base Path to Use + if (localCustomBaseUrl != null) { + basePath = localCustomBaseUrl; + } else if (localBasePaths.length > 0) { + basePath = localBasePaths[localHostIndex]; + } else { + basePath = null; + } + + Object localVarPostBody = revokeRefreshTokensRequest; + + // create path and map variables + String localVarPath = + "/api/rest/2.0/connections/{connection_identifier}/revoke-refresh-tokens" + .replace( + "{" + "connection_identifier" + "}", + localVarApiClient.escapeString(connectionIdentifier.toString())); + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + final String[] localVarAccepts = {"application/json"}; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = {"application/json"}; + final String localVarContentType = + localVarApiClient.selectHeaderContentType(localVarContentTypes); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } + + String[] localVarAuthNames = new String[] {"bearerAuth"}; + return localVarApiClient.buildCall( + basePath, + localVarPath, + "POST", + localVarQueryParams, + localVarCollectionQueryParams, + localVarPostBody, + localVarHeaderParams, + localVarCookieParams, + localVarFormParams, + localVarAuthNames, + _callback); + } + + @SuppressWarnings("rawtypes") + private okhttp3.Call revokeRefreshTokensValidateBeforeCall( + String connectionIdentifier, + RevokeRefreshTokensRequest revokeRefreshTokensRequest, + final ApiCallback _callback) + throws ApiException { + // verify the required parameter 'connectionIdentifier' is set + if (connectionIdentifier == null) { + throw new ApiException( + "Missing the required parameter 'connectionIdentifier' when calling" + + " revokeRefreshTokens(Async)"); + } + + // verify the required parameter 'revokeRefreshTokensRequest' is set + if (revokeRefreshTokensRequest == null) { + throw new ApiException( + "Missing the required parameter 'revokeRefreshTokensRequest' when calling" + + " revokeRefreshTokens(Async)"); + } + + return revokeRefreshTokensCall(connectionIdentifier, revokeRefreshTokensRequest, _callback); + } + + /** + * Version: 26.2.0.cl or later Revokes OAuth refresh tokens for users who no longer require + * access to a data warehouse connection. When a token is revoked, the affected user's + * session for that connection is terminated, and they must re-authenticate to regain access. + * Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) or + * `DATAMANAGEMENT` (**Can manage data**) privileges. If [Role-Based Access Control + * (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on the ThoughtSpot instance, + * users with `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) + * privilege can also make API requests to revoke tokens for connection users. #### Usage + * guidelines You can specify different combinations of identifiers to control which refresh + * tokens are revoked. - **connection_identifier**: Revokes refresh tokens for all users of the + * connection, except the connection author. - **connection_identifier** and + * **user_identifiers**: Revokes refresh tokens only for the users specified in the request. If + * the name or ID of the connection author is included in the request, their token will also be + * revoked. - **connection_identifier** and **configuration_identifiers**: Revokes refresh + * tokens for all users on the specified configurations, except the configuration author. - + * **connection_identifier**, **configuration_identifiers**, and **user_identifiers**: Revokes + * refresh tokens for the specified users on the specified configurations. - + * **connection_identifier** and **org_identifiers**: Revokes refresh tokens for the specified + * Orgs. Applicable only for published connections. - **connection_identifier**, + * **org_identifiers**, and **user_identifiers**: Revokes refresh tokens for the specified users + * in the specified Orgs. Applicable only for published connections. **NOTE**: The + * `org_identifiers` parameter is only applicable for published connections. Using + * this parameter for unpublished connections will result in an error. Ensure that the + * connections are published before making the API request. + * + * @param connectionIdentifier Unique ID or name of the connection whose refresh tokens need to + * be revoked. All the users associated with the connection will have their refresh tokens + * revoked except the author. (required) + * @param revokeRefreshTokensRequest (required) + * @return RevokeRefreshTokensResponse + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the + * response body + * @http.response.details + * + * + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 Token(s) successfully revoked. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
404 Object not found -
409 Conflict -
500 Unexpected error -
+ */ + public RevokeRefreshTokensResponse revokeRefreshTokens( + String connectionIdentifier, RevokeRefreshTokensRequest revokeRefreshTokensRequest) + throws ApiException { + ApiResponse localVarResp = + revokeRefreshTokensWithHttpInfo(connectionIdentifier, revokeRefreshTokensRequest); + return localVarResp.getData(); + } + + /** + * Version: 26.2.0.cl or later Revokes OAuth refresh tokens for users who no longer require + * access to a data warehouse connection. When a token is revoked, the affected user's + * session for that connection is terminated, and they must re-authenticate to regain access. + * Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) or + * `DATAMANAGEMENT` (**Can manage data**) privileges. If [Role-Based Access Control + * (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on the ThoughtSpot instance, + * users with `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) + * privilege can also make API requests to revoke tokens for connection users. #### Usage + * guidelines You can specify different combinations of identifiers to control which refresh + * tokens are revoked. - **connection_identifier**: Revokes refresh tokens for all users of the + * connection, except the connection author. - **connection_identifier** and + * **user_identifiers**: Revokes refresh tokens only for the users specified in the request. If + * the name or ID of the connection author is included in the request, their token will also be + * revoked. - **connection_identifier** and **configuration_identifiers**: Revokes refresh + * tokens for all users on the specified configurations, except the configuration author. - + * **connection_identifier**, **configuration_identifiers**, and **user_identifiers**: Revokes + * refresh tokens for the specified users on the specified configurations. - + * **connection_identifier** and **org_identifiers**: Revokes refresh tokens for the specified + * Orgs. Applicable only for published connections. - **connection_identifier**, + * **org_identifiers**, and **user_identifiers**: Revokes refresh tokens for the specified users + * in the specified Orgs. Applicable only for published connections. **NOTE**: The + * `org_identifiers` parameter is only applicable for published connections. Using + * this parameter for unpublished connections will result in an error. Ensure that the + * connections are published before making the API request. + * + * @param connectionIdentifier Unique ID or name of the connection whose refresh tokens need to + * be revoked. All the users associated with the connection will have their refresh tokens + * revoked except the author. (required) + * @param revokeRefreshTokensRequest (required) + * @return ApiResponse<RevokeRefreshTokensResponse> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the + * response body + * @http.response.details + * + * + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 Token(s) successfully revoked. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
404 Object not found -
409 Conflict -
500 Unexpected error -
+ */ + public ApiResponse revokeRefreshTokensWithHttpInfo( + String connectionIdentifier, RevokeRefreshTokensRequest revokeRefreshTokensRequest) + throws ApiException { + okhttp3.Call localVarCall = + revokeRefreshTokensValidateBeforeCall( + connectionIdentifier, revokeRefreshTokensRequest, null); + Type localVarReturnType = new TypeToken() {}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); + } + + /** + * (asynchronously) Version: 26.2.0.cl or later Revokes OAuth refresh tokens for users who no + * longer require access to a data warehouse connection. When a token is revoked, the affected + * user's session for that connection is terminated, and they must re-authenticate to regain + * access. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) or + * `DATAMANAGEMENT` (**Can manage data**) privileges. If [Role-Based Access Control + * (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on the ThoughtSpot instance, + * users with `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) + * privilege can also make API requests to revoke tokens for connection users. #### Usage + * guidelines You can specify different combinations of identifiers to control which refresh + * tokens are revoked. - **connection_identifier**: Revokes refresh tokens for all users of the + * connection, except the connection author. - **connection_identifier** and + * **user_identifiers**: Revokes refresh tokens only for the users specified in the request. If + * the name or ID of the connection author is included in the request, their token will also be + * revoked. - **connection_identifier** and **configuration_identifiers**: Revokes refresh + * tokens for all users on the specified configurations, except the configuration author. - + * **connection_identifier**, **configuration_identifiers**, and **user_identifiers**: Revokes + * refresh tokens for the specified users on the specified configurations. - + * **connection_identifier** and **org_identifiers**: Revokes refresh tokens for the specified + * Orgs. Applicable only for published connections. - **connection_identifier**, + * **org_identifiers**, and **user_identifiers**: Revokes refresh tokens for the specified users + * in the specified Orgs. Applicable only for published connections. **NOTE**: The + * `org_identifiers` parameter is only applicable for published connections. Using + * this parameter for unpublished connections will result in an error. Ensure that the + * connections are published before making the API request. + * + * @param connectionIdentifier Unique ID or name of the connection whose refresh tokens need to + * be revoked. All the users associated with the connection will have their refresh tokens + * revoked except the author. (required) + * @param revokeRefreshTokensRequest (required) + * @param _callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body + * object + * @http.response.details + * + * + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 Token(s) successfully revoked. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
404 Object not found -
409 Conflict -
500 Unexpected error -
+ */ + public okhttp3.Call revokeRefreshTokensAsync( + String connectionIdentifier, + RevokeRefreshTokensRequest revokeRefreshTokensRequest, + final ApiCallback _callback) + throws ApiException { + + okhttp3.Call localVarCall = + revokeRefreshTokensValidateBeforeCall( + connectionIdentifier, revokeRefreshTokensRequest, _callback); + Type localVarReturnType = new TypeToken() {}.getType(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; + } + /** + * Build call for revokeToken + * + * @param revokeTokenRequest (required) + * @param _callback Callback for upload/download progress + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
204 Token successfully revoked. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public okhttp3.Call revokeTokenCall( + RevokeTokenRequest revokeTokenRequest, final ApiCallback _callback) + throws ApiException { + String basePath = null; + // Operation Servers + String[] localBasePaths = new String[] {}; + + // Determine Base Path to Use + if (localCustomBaseUrl != null) { + basePath = localCustomBaseUrl; + } else if (localBasePaths.length > 0) { + basePath = localBasePaths[localHostIndex]; + } else { + basePath = null; + } + + Object localVarPostBody = revokeTokenRequest; + + // create path and map variables + String localVarPath = "/api/rest/2.0/auth/token/revoke"; + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + final String[] localVarAccepts = {"application/json"}; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = {"application/json"}; + final String localVarContentType = + localVarApiClient.selectHeaderContentType(localVarContentTypes); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } + + String[] localVarAuthNames = new String[] {"bearerAuth"}; + return localVarApiClient.buildCall( + basePath, + localVarPath, + "POST", + localVarQueryParams, + localVarCollectionQueryParams, + localVarPostBody, + localVarHeaderParams, + localVarCookieParams, + localVarFormParams, + localVarAuthNames, + _callback); + } + + @SuppressWarnings("rawtypes") + private okhttp3.Call revokeTokenValidateBeforeCall( + RevokeTokenRequest revokeTokenRequest, final ApiCallback _callback) + throws ApiException { + // verify the required parameter 'revokeTokenRequest' is set + if (revokeTokenRequest == null) { + throw new ApiException( + "Missing the required parameter 'revokeTokenRequest' when calling" + + " revokeToken(Async)"); + } + + return revokeTokenCall(revokeTokenRequest, _callback); + } + + /** + * Version: 9.0.0.cl or later Revokes the authentication token issued for current user session. + * The token of your current session expires when you make a call to the + * `/api/rest/2.0/auth/token/revoke` endpoint. the users will not be able to access + * ThoughtSpot objects until a new token is obtained. To restart your session, request for a new + * token from ThoughtSpot. See [Get Full Access + * Token](#/http/api-endpoints/authentication/get-full-access-token). + * + * @param revokeTokenRequest (required) + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the + * response body + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
204 Token successfully revoked. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public void revokeToken(RevokeTokenRequest revokeTokenRequest) throws ApiException { + revokeTokenWithHttpInfo(revokeTokenRequest); + } + + /** + * Version: 9.0.0.cl or later Revokes the authentication token issued for current user session. + * The token of your current session expires when you make a call to the + * `/api/rest/2.0/auth/token/revoke` endpoint. the users will not be able to access + * ThoughtSpot objects until a new token is obtained. To restart your session, request for a new + * token from ThoughtSpot. See [Get Full Access + * Token](#/http/api-endpoints/authentication/get-full-access-token). + * + * @param revokeTokenRequest (required) + * @return ApiResponse<Void> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the + * response body + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
204 Token successfully revoked. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public ApiResponse revokeTokenWithHttpInfo(RevokeTokenRequest revokeTokenRequest) + throws ApiException { + okhttp3.Call localVarCall = revokeTokenValidateBeforeCall(revokeTokenRequest, null); + return localVarApiClient.execute(localVarCall); + } + + /** + * (asynchronously) Version: 9.0.0.cl or later Revokes the authentication token issued for + * current user session. The token of your current session expires when you make a call to the + * `/api/rest/2.0/auth/token/revoke` endpoint. the users will not be able to access + * ThoughtSpot objects until a new token is obtained. To restart your session, request for a new + * token from ThoughtSpot. See [Get Full Access + * Token](#/http/api-endpoints/authentication/get-full-access-token). + * + * @param revokeTokenRequest (required) + * @param _callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body + * object + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
204 Token successfully revoked. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public okhttp3.Call revokeTokenAsync( + RevokeTokenRequest revokeTokenRequest, final ApiCallback _callback) + throws ApiException { + + okhttp3.Call localVarCall = revokeTokenValidateBeforeCall(revokeTokenRequest, _callback); + localVarApiClient.executeAsync(localVarCall, _callback); + return localVarCall; + } + /** + * Build call for searchAuthSettings + * + * @param searchAuthSettingsRequest (required) + * @param _callback Callback for upload/download progress + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 Authentication settings retrieved successfully. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public okhttp3.Call searchAuthSettingsCall( + SearchAuthSettingsRequest searchAuthSettingsRequest, final ApiCallback _callback) + throws ApiException { + String basePath = null; + // Operation Servers + String[] localBasePaths = new String[] {}; + + // Determine Base Path to Use + if (localCustomBaseUrl != null) { + basePath = localCustomBaseUrl; + } else if (localBasePaths.length > 0) { + basePath = localBasePaths[localHostIndex]; + } else { + basePath = null; + } + + Object localVarPostBody = searchAuthSettingsRequest; + + // create path and map variables + String localVarPath = "/api/rest/2.0/auth/search"; + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + final String[] localVarAccepts = {"application/json"}; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = {"application/json"}; + final String localVarContentType = + localVarApiClient.selectHeaderContentType(localVarContentTypes); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } + + String[] localVarAuthNames = new String[] {"bearerAuth"}; + return localVarApiClient.buildCall( + basePath, + localVarPath, + "POST", + localVarQueryParams, + localVarCollectionQueryParams, + localVarPostBody, + localVarHeaderParams, + localVarCookieParams, + localVarFormParams, + localVarAuthNames, + _callback); + } + + @SuppressWarnings("rawtypes") + private okhttp3.Call searchAuthSettingsValidateBeforeCall( + SearchAuthSettingsRequest searchAuthSettingsRequest, final ApiCallback _callback) + throws ApiException { + // verify the required parameter 'searchAuthSettingsRequest' is set + if (searchAuthSettingsRequest == null) { + throw new ApiException( + "Missing the required parameter 'searchAuthSettingsRequest' when calling" + + " searchAuthSettings(Async)"); + } + + return searchAuthSettingsCall(searchAuthSettingsRequest, _callback); + } + + /** + * Version: 26.6.0.cl or later Returns the authentication configuration for the specified auth + * type at cluster and org level. Currently supports `TRUSTED_AUTH`. #### Required + * privileges Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) or + * `CONTROL_TRUSTED_AUTH` (**Can Enable or Disable Trusted Authentication**) + * privilege. If [Role-Based Access Control + * (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled, the + * `CONTROL_TRUSTED_AUTH` privilege is required. #### Usage guidelines Use + * `scope` to control which level of settings are returned: - `CLUSTER` — + * Returns cluster-level authentication status and access tokens. Accessible only from the + * Primary Org. - `ORG` — Returns org-level authentication status and access tokens + * for the current Org. Requires the per-Org authentication feature to be enabled on your + * instance. - If `scope` is omitted, both cluster and org-level settings are returned + * based on the caller's org context and feature availability. The `access_tokens` + * array in `cluster_preferences` or `org_preferences` is omitted when no + * token is configured at that level. **Note**: Access tokens returned in the response are + * sensitive credentials. Treat them with the same care as passwords. + * + * @param searchAuthSettingsRequest (required) + * @return SearchAuthSettingsResponse + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the + * response body + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 Authentication settings retrieved successfully. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public SearchAuthSettingsResponse searchAuthSettings( + SearchAuthSettingsRequest searchAuthSettingsRequest) throws ApiException { + ApiResponse localVarResp = + searchAuthSettingsWithHttpInfo(searchAuthSettingsRequest); + return localVarResp.getData(); + } + + /** + * Version: 26.6.0.cl or later Returns the authentication configuration for the specified auth + * type at cluster and org level. Currently supports `TRUSTED_AUTH`. #### Required + * privileges Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) or + * `CONTROL_TRUSTED_AUTH` (**Can Enable or Disable Trusted Authentication**) + * privilege. If [Role-Based Access Control + * (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled, the + * `CONTROL_TRUSTED_AUTH` privilege is required. #### Usage guidelines Use + * `scope` to control which level of settings are returned: - `CLUSTER` — + * Returns cluster-level authentication status and access tokens. Accessible only from the + * Primary Org. - `ORG` — Returns org-level authentication status and access tokens + * for the current Org. Requires the per-Org authentication feature to be enabled on your + * instance. - If `scope` is omitted, both cluster and org-level settings are returned + * based on the caller's org context and feature availability. The `access_tokens` + * array in `cluster_preferences` or `org_preferences` is omitted when no + * token is configured at that level. **Note**: Access tokens returned in the response are + * sensitive credentials. Treat them with the same care as passwords. + * + * @param searchAuthSettingsRequest (required) + * @return ApiResponse<SearchAuthSettingsResponse> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the + * response body + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 Authentication settings retrieved successfully. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public ApiResponse searchAuthSettingsWithHttpInfo( + SearchAuthSettingsRequest searchAuthSettingsRequest) throws ApiException { + okhttp3.Call localVarCall = + searchAuthSettingsValidateBeforeCall(searchAuthSettingsRequest, null); + Type localVarReturnType = new TypeToken() {}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); + } + + /** + * (asynchronously) Version: 26.6.0.cl or later Returns the authentication configuration for the + * specified auth type at cluster and org level. Currently supports `TRUSTED_AUTH`. + * #### Required privileges Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) + * or `CONTROL_TRUSTED_AUTH` (**Can Enable or Disable Trusted Authentication**) + * privilege. If [Role-Based Access Control + * (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled, the + * `CONTROL_TRUSTED_AUTH` privilege is required. #### Usage guidelines Use + * `scope` to control which level of settings are returned: - `CLUSTER` — + * Returns cluster-level authentication status and access tokens. Accessible only from the + * Primary Org. - `ORG` — Returns org-level authentication status and access tokens + * for the current Org. Requires the per-Org authentication feature to be enabled on your + * instance. - If `scope` is omitted, both cluster and org-level settings are returned + * based on the caller's org context and feature availability. The `access_tokens` + * array in `cluster_preferences` or `org_preferences` is omitted when no + * token is configured at that level. **Note**: Access tokens returned in the response are + * sensitive credentials. Treat them with the same care as passwords. + * + * @param searchAuthSettingsRequest (required) + * @param _callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body + * object + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 Authentication settings retrieved successfully. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public okhttp3.Call searchAuthSettingsAsync( + SearchAuthSettingsRequest searchAuthSettingsRequest, + final ApiCallback _callback) + throws ApiException { + + okhttp3.Call localVarCall = + searchAuthSettingsValidateBeforeCall(searchAuthSettingsRequest, _callback); + Type localVarReturnType = new TypeToken() {}.getType(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; + } + /** + * Build call for searchCalendars + * + * @param searchCalendarsRequest (required) + * @param _callback Callback for upload/download progress + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 Custom calendar fetched successfully. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public okhttp3.Call searchCalendarsCall( + SearchCalendarsRequest searchCalendarsRequest, final ApiCallback _callback) + throws ApiException { + String basePath = null; + // Operation Servers + String[] localBasePaths = new String[] {}; + + // Determine Base Path to Use + if (localCustomBaseUrl != null) { + basePath = localCustomBaseUrl; + } else if (localBasePaths.length > 0) { + basePath = localBasePaths[localHostIndex]; + } else { + basePath = null; + } + + Object localVarPostBody = searchCalendarsRequest; + + // create path and map variables + String localVarPath = "/api/rest/2.0/calendars/search"; + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + final String[] localVarAccepts = {"application/json"}; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = {"application/json"}; + final String localVarContentType = + localVarApiClient.selectHeaderContentType(localVarContentTypes); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } + + String[] localVarAuthNames = new String[] {"bearerAuth"}; + return localVarApiClient.buildCall( + basePath, + localVarPath, + "POST", + localVarQueryParams, + localVarCollectionQueryParams, + localVarPostBody, + localVarHeaderParams, + localVarCookieParams, + localVarFormParams, + localVarAuthNames, + _callback); + } + + @SuppressWarnings("rawtypes") + private okhttp3.Call searchCalendarsValidateBeforeCall( + SearchCalendarsRequest searchCalendarsRequest, final ApiCallback _callback) + throws ApiException { + // verify the required parameter 'searchCalendarsRequest' is set + if (searchCalendarsRequest == null) { + throw new ApiException( + "Missing the required parameter 'searchCalendarsRequest' when calling" + + " searchCalendars(Async)"); + } + + return searchCalendarsCall(searchCalendarsRequest, _callback); + } + + /** + * Version: 10.12.0.cl or later Gets a list of [custom + * calendars](https://docs.thoughtspot.com/cloud/latest/connections-cust-cal). Requires + * `DATAMANAGEMENT` (**Can manage data**) or `ADMINISTRATION` (**Can + * administer ThoughtSpot**) privilege. If [Role-Based Access Control + * (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your ThoughtSpot + * instance, the `CAN_MANAGE_CUSTOM_CALENDAR` (**Can manage custom calendars**) + * privilege is required. #### Usage guidelines By default, the API returns a list of custom + * calendars for all connection objects. To retrieve custom calendar details for a particular + * connection, specify the connection ID. You can also use other search parameters such as + * `name_pattern` and `sort_options` as search filters. The + * `name_pattern` parameter filters and returns only those objects that match the + * specified pattern. Use `%` as a wildcard for pattern matching. + * + * @param searchCalendarsRequest (required) + * @return List<CalendarResponse> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the + * response body + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 Custom calendar fetched successfully. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public List searchCalendars(SearchCalendarsRequest searchCalendarsRequest) + throws ApiException { + ApiResponse> localVarResp = + searchCalendarsWithHttpInfo(searchCalendarsRequest); + return localVarResp.getData(); + } + + /** + * Version: 10.12.0.cl or later Gets a list of [custom + * calendars](https://docs.thoughtspot.com/cloud/latest/connections-cust-cal). Requires + * `DATAMANAGEMENT` (**Can manage data**) or `ADMINISTRATION` (**Can + * administer ThoughtSpot**) privilege. If [Role-Based Access Control + * (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your ThoughtSpot + * instance, the `CAN_MANAGE_CUSTOM_CALENDAR` (**Can manage custom calendars**) + * privilege is required. #### Usage guidelines By default, the API returns a list of custom + * calendars for all connection objects. To retrieve custom calendar details for a particular + * connection, specify the connection ID. You can also use other search parameters such as + * `name_pattern` and `sort_options` as search filters. The + * `name_pattern` parameter filters and returns only those objects that match the + * specified pattern. Use `%` as a wildcard for pattern matching. + * + * @param searchCalendarsRequest (required) + * @return ApiResponse<List<CalendarResponse>> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the + * response body + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 Custom calendar fetched successfully. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public ApiResponse> searchCalendarsWithHttpInfo( + SearchCalendarsRequest searchCalendarsRequest) throws ApiException { + okhttp3.Call localVarCall = searchCalendarsValidateBeforeCall(searchCalendarsRequest, null); + Type localVarReturnType = new TypeToken>() {}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); + } + + /** + * (asynchronously) Version: 10.12.0.cl or later Gets a list of [custom + * calendars](https://docs.thoughtspot.com/cloud/latest/connections-cust-cal). Requires + * `DATAMANAGEMENT` (**Can manage data**) or `ADMINISTRATION` (**Can + * administer ThoughtSpot**) privilege. If [Role-Based Access Control + * (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your ThoughtSpot + * instance, the `CAN_MANAGE_CUSTOM_CALENDAR` (**Can manage custom calendars**) + * privilege is required. #### Usage guidelines By default, the API returns a list of custom + * calendars for all connection objects. To retrieve custom calendar details for a particular + * connection, specify the connection ID. You can also use other search parameters such as + * `name_pattern` and `sort_options` as search filters. The + * `name_pattern` parameter filters and returns only those objects that match the + * specified pattern. Use `%` as a wildcard for pattern matching. + * + * @param searchCalendarsRequest (required) + * @param _callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body + * object + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 Custom calendar fetched successfully. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public okhttp3.Call searchCalendarsAsync( + SearchCalendarsRequest searchCalendarsRequest, + final ApiCallback> _callback) + throws ApiException { + + okhttp3.Call localVarCall = + searchCalendarsValidateBeforeCall(searchCalendarsRequest, _callback); + Type localVarReturnType = new TypeToken>() {}.getType(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; + } + /** + * Build call for searchChannelHistory + * + * @param searchChannelHistoryRequest (required) + * @param _callback Callback for upload/download progress + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 Channel status logs retrieved successfully. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public okhttp3.Call searchChannelHistoryCall( + SearchChannelHistoryRequest searchChannelHistoryRequest, final ApiCallback _callback) + throws ApiException { + String basePath = null; + // Operation Servers + String[] localBasePaths = new String[] {}; + + // Determine Base Path to Use + if (localCustomBaseUrl != null) { + basePath = localCustomBaseUrl; + } else if (localBasePaths.length > 0) { + basePath = localBasePaths[localHostIndex]; + } else { + basePath = null; + } + + Object localVarPostBody = searchChannelHistoryRequest; + + // create path and map variables + String localVarPath = "/api/rest/2.0/jobs/history/communication-channels/search"; + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + final String[] localVarAccepts = {"application/json"}; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = {"application/json"}; + final String localVarContentType = + localVarApiClient.selectHeaderContentType(localVarContentTypes); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } + + String[] localVarAuthNames = new String[] {"bearerAuth"}; + return localVarApiClient.buildCall( + basePath, + localVarPath, + "POST", + localVarQueryParams, + localVarCollectionQueryParams, + localVarPostBody, + localVarHeaderParams, + localVarCookieParams, + localVarFormParams, + localVarAuthNames, + _callback); + } + + @SuppressWarnings("rawtypes") + private okhttp3.Call searchChannelHistoryValidateBeforeCall( + SearchChannelHistoryRequest searchChannelHistoryRequest, final ApiCallback _callback) + throws ApiException { + // verify the required parameter 'searchChannelHistoryRequest' is set + if (searchChannelHistoryRequest == null) { + throw new ApiException( + "Missing the required parameter 'searchChannelHistoryRequest' when calling" + + " searchChannelHistory(Async)"); + } + + return searchChannelHistoryCall(searchChannelHistoryRequest, _callback); + } + + /** + * Version: 26.4.0.cl or later Searches delivery history for communication channels such as + * webhooks. Returns channel-level delivery status for each job execution record. Use this to + * monitor channel health and delivery success rates across events. Requires + * `ADMINISTRATION` (**Can administer ThoughtSpot**) or `DEVELOPER` (**Has + * developer privilege**) privilege. If [Role-Based Access Control + * (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, users with + * `CAN_MANAGE_WEBHOOKS` (**Can manage webhooks**) privilege are also authorized to + * perform this action. **NOTE**: When `channel_type` is `WEBHOOK`, the + * following constraints apply: - `job_ids`, `channel_identifiers`, and + * `events` each accept at most one element. - When `job_ids` is provided, + * it is used as the sole lookup key and other filter fields are ignored. - When + * `job_ids` is not provided, `channel_identifiers` and `events` + * are both required, each containing exactly one element. - Records older than the configured + * retention period are not returned. - Use `start_epoch_time_in_millis` and/or + * `end_epoch_time_in_millis` to narrow results to a specific time window. + * + * @param searchChannelHistoryRequest (required) + * @return SearchChannelHistoryResponse + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the + * response body + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 Channel status logs retrieved successfully. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public SearchChannelHistoryResponse searchChannelHistory( + SearchChannelHistoryRequest searchChannelHistoryRequest) throws ApiException { + ApiResponse localVarResp = + searchChannelHistoryWithHttpInfo(searchChannelHistoryRequest); + return localVarResp.getData(); + } + + /** + * Version: 26.4.0.cl or later Searches delivery history for communication channels such as + * webhooks. Returns channel-level delivery status for each job execution record. Use this to + * monitor channel health and delivery success rates across events. Requires + * `ADMINISTRATION` (**Can administer ThoughtSpot**) or `DEVELOPER` (**Has + * developer privilege**) privilege. If [Role-Based Access Control + * (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, users with + * `CAN_MANAGE_WEBHOOKS` (**Can manage webhooks**) privilege are also authorized to + * perform this action. **NOTE**: When `channel_type` is `WEBHOOK`, the + * following constraints apply: - `job_ids`, `channel_identifiers`, and + * `events` each accept at most one element. - When `job_ids` is provided, + * it is used as the sole lookup key and other filter fields are ignored. - When + * `job_ids` is not provided, `channel_identifiers` and `events` + * are both required, each containing exactly one element. - Records older than the configured + * retention period are not returned. - Use `start_epoch_time_in_millis` and/or + * `end_epoch_time_in_millis` to narrow results to a specific time window. + * + * @param searchChannelHistoryRequest (required) + * @return ApiResponse<SearchChannelHistoryResponse> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the + * response body + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 Channel status logs retrieved successfully. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public ApiResponse searchChannelHistoryWithHttpInfo( + SearchChannelHistoryRequest searchChannelHistoryRequest) throws ApiException { + okhttp3.Call localVarCall = + searchChannelHistoryValidateBeforeCall(searchChannelHistoryRequest, null); + Type localVarReturnType = new TypeToken() {}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); + } + + /** + * (asynchronously) Version: 26.4.0.cl or later Searches delivery history for communication + * channels such as webhooks. Returns channel-level delivery status for each job execution + * record. Use this to monitor channel health and delivery success rates across events. Requires + * `ADMINISTRATION` (**Can administer ThoughtSpot**) or `DEVELOPER` (**Has + * developer privilege**) privilege. If [Role-Based Access Control + * (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, users with + * `CAN_MANAGE_WEBHOOKS` (**Can manage webhooks**) privilege are also authorized to + * perform this action. **NOTE**: When `channel_type` is `WEBHOOK`, the + * following constraints apply: - `job_ids`, `channel_identifiers`, and + * `events` each accept at most one element. - When `job_ids` is provided, + * it is used as the sole lookup key and other filter fields are ignored. - When + * `job_ids` is not provided, `channel_identifiers` and `events` + * are both required, each containing exactly one element. - Records older than the configured + * retention period are not returned. - Use `start_epoch_time_in_millis` and/or + * `end_epoch_time_in_millis` to narrow results to a specific time window. + * + * @param searchChannelHistoryRequest (required) + * @param _callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body + * object + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 Channel status logs retrieved successfully. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public okhttp3.Call searchChannelHistoryAsync( + SearchChannelHistoryRequest searchChannelHistoryRequest, + final ApiCallback _callback) + throws ApiException { + + okhttp3.Call localVarCall = + searchChannelHistoryValidateBeforeCall(searchChannelHistoryRequest, _callback); + Type localVarReturnType = new TypeToken() {}.getType(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; + } + /** + * Build call for searchCollections + * + * @param searchCollectionsRequest (required) + * @param _callback Callback for upload/download progress + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 Successfully retrieved list of collections -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public okhttp3.Call searchCollectionsCall( + SearchCollectionsRequest searchCollectionsRequest, final ApiCallback _callback) + throws ApiException { + String basePath = null; + // Operation Servers + String[] localBasePaths = new String[] {}; + + // Determine Base Path to Use + if (localCustomBaseUrl != null) { + basePath = localCustomBaseUrl; + } else if (localBasePaths.length > 0) { + basePath = localBasePaths[localHostIndex]; + } else { + basePath = null; + } + + Object localVarPostBody = searchCollectionsRequest; + + // create path and map variables + String localVarPath = "/api/rest/2.0/collections/search"; + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + final String[] localVarAccepts = {"application/json"}; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = {"application/json"}; + final String localVarContentType = + localVarApiClient.selectHeaderContentType(localVarContentTypes); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } + + String[] localVarAuthNames = new String[] {"bearerAuth"}; + return localVarApiClient.buildCall( + basePath, + localVarPath, + "POST", + localVarQueryParams, + localVarCollectionQueryParams, + localVarPostBody, + localVarHeaderParams, + localVarCookieParams, + localVarFormParams, + localVarAuthNames, + _callback); + } + + @SuppressWarnings("rawtypes") + private okhttp3.Call searchCollectionsValidateBeforeCall( + SearchCollectionsRequest searchCollectionsRequest, final ApiCallback _callback) + throws ApiException { + // verify the required parameter 'searchCollectionsRequest' is set + if (searchCollectionsRequest == null) { + throw new ApiException( + "Missing the required parameter 'searchCollectionsRequest' when calling" + + " searchCollections(Async)"); + } + + return searchCollectionsCall(searchCollectionsRequest, _callback); + } + + /** + * Version: 26.4.0.cl or later Gets a list of collections available in ThoughtSpot. To get + * details of a specific collection, specify the collection GUID or name. You can also filter + * the API response based on the collection name pattern, author, and other criteria. #### + * Search options * **name_pattern**: Use '%' as a wildcard character to match + * collection names * **collection_identifiers**: Search for specific collections by their GUIDs + * or names * **include_metadata**: When set to `true`, includes the metadata objects + * within each collection in the response **NOTE**: If the API returns an empty list, consider + * increasing the value of the `record_size` parameter. To search across all available + * collections, set `record_size` to `-1`. + * + * @param searchCollectionsRequest (required) + * @return CollectionSearchResponse + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the + * response body + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 Successfully retrieved list of collections -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public CollectionSearchResponse searchCollections( + SearchCollectionsRequest searchCollectionsRequest) throws ApiException { + ApiResponse localVarResp = + searchCollectionsWithHttpInfo(searchCollectionsRequest); + return localVarResp.getData(); + } + + /** + * Version: 26.4.0.cl or later Gets a list of collections available in ThoughtSpot. To get + * details of a specific collection, specify the collection GUID or name. You can also filter + * the API response based on the collection name pattern, author, and other criteria. #### + * Search options * **name_pattern**: Use '%' as a wildcard character to match + * collection names * **collection_identifiers**: Search for specific collections by their GUIDs + * or names * **include_metadata**: When set to `true`, includes the metadata objects + * within each collection in the response **NOTE**: If the API returns an empty list, consider + * increasing the value of the `record_size` parameter. To search across all available + * collections, set `record_size` to `-1`. + * + * @param searchCollectionsRequest (required) + * @return ApiResponse<CollectionSearchResponse> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the + * response body + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 Successfully retrieved list of collections -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public ApiResponse searchCollectionsWithHttpInfo( + SearchCollectionsRequest searchCollectionsRequest) throws ApiException { + okhttp3.Call localVarCall = + searchCollectionsValidateBeforeCall(searchCollectionsRequest, null); + Type localVarReturnType = new TypeToken() {}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); + } + + /** + * (asynchronously) Version: 26.4.0.cl or later Gets a list of collections available in + * ThoughtSpot. To get details of a specific collection, specify the collection GUID or name. + * You can also filter the API response based on the collection name pattern, author, and other + * criteria. #### Search options * **name_pattern**: Use '%' as a wildcard character to + * match collection names * **collection_identifiers**: Search for specific collections by their + * GUIDs or names * **include_metadata**: When set to `true`, includes the metadata + * objects within each collection in the response **NOTE**: If the API returns an empty list, + * consider increasing the value of the `record_size` parameter. To search across all + * available collections, set `record_size` to `-1`. + * + * @param searchCollectionsRequest (required) + * @param _callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body + * object + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 Successfully retrieved list of collections -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public okhttp3.Call searchCollectionsAsync( + SearchCollectionsRequest searchCollectionsRequest, + final ApiCallback _callback) + throws ApiException { + + okhttp3.Call localVarCall = + searchCollectionsValidateBeforeCall(searchCollectionsRequest, _callback); + Type localVarReturnType = new TypeToken() {}.getType(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; + } + /** + * Build call for searchCommits + * + * @param searchCommitsRequest (required) + * @param _callback Callback for upload/download progress + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 Commit history of the metadata object -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public okhttp3.Call searchCommitsCall( + SearchCommitsRequest searchCommitsRequest, final ApiCallback _callback) + throws ApiException { + String basePath = null; + // Operation Servers + String[] localBasePaths = new String[] {}; + + // Determine Base Path to Use + if (localCustomBaseUrl != null) { + basePath = localCustomBaseUrl; + } else if (localBasePaths.length > 0) { + basePath = localBasePaths[localHostIndex]; + } else { + basePath = null; + } + + Object localVarPostBody = searchCommitsRequest; + + // create path and map variables + String localVarPath = "/api/rest/2.0/vcs/git/commits/search"; + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + final String[] localVarAccepts = {"application/json"}; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = {"application/json"}; + final String localVarContentType = + localVarApiClient.selectHeaderContentType(localVarContentTypes); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } + + String[] localVarAuthNames = new String[] {"bearerAuth"}; + return localVarApiClient.buildCall( + basePath, + localVarPath, + "POST", + localVarQueryParams, + localVarCollectionQueryParams, + localVarPostBody, + localVarHeaderParams, + localVarCookieParams, + localVarFormParams, + localVarAuthNames, + _callback); + } + + @SuppressWarnings("rawtypes") + private okhttp3.Call searchCommitsValidateBeforeCall( + SearchCommitsRequest searchCommitsRequest, final ApiCallback _callback) + throws ApiException { + // verify the required parameter 'searchCommitsRequest' is set + if (searchCommitsRequest == null) { + throw new ApiException( + "Missing the required parameter 'searchCommitsRequest' when calling" + + " searchCommits(Async)"); + } + + return searchCommitsCall(searchCommitsRequest, _callback); + } + + /** + * Version: 9.2.0.cl or later Gets a list of commits for a given metadata object. Requires + * `DATAMANAGEMENT` (**Can manage data**) privilege. If [Role-Based Access Control + * (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance on your + * instance, the `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` (**Can manage data models**) + * privilege and edit access to the metadata objects. + * + * @param searchCommitsRequest (required) + * @return List<CommitHistoryResponse> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the + * response body + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 Commit history of the metadata object -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public List searchCommits(SearchCommitsRequest searchCommitsRequest) + throws ApiException { + ApiResponse> localVarResp = + searchCommitsWithHttpInfo(searchCommitsRequest); + return localVarResp.getData(); + } + + /** + * Version: 9.2.0.cl or later Gets a list of commits for a given metadata object. Requires + * `DATAMANAGEMENT` (**Can manage data**) privilege. If [Role-Based Access Control + * (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance on your + * instance, the `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` (**Can manage data models**) + * privilege and edit access to the metadata objects. + * + * @param searchCommitsRequest (required) + * @return ApiResponse<List<CommitHistoryResponse>> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the + * response body + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 Commit history of the metadata object -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public ApiResponse> searchCommitsWithHttpInfo( + SearchCommitsRequest searchCommitsRequest) throws ApiException { + okhttp3.Call localVarCall = searchCommitsValidateBeforeCall(searchCommitsRequest, null); + Type localVarReturnType = new TypeToken>() {}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); + } + + /** + * (asynchronously) Version: 9.2.0.cl or later Gets a list of commits for a given metadata + * object. Requires `DATAMANAGEMENT` (**Can manage data**) privilege. If [Role-Based + * Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your + * instance on your instance, the `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` (**Can manage + * data models**) privilege and edit access to the metadata objects. + * + * @param searchCommitsRequest (required) + * @param _callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body + * object + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 Commit history of the metadata object -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public okhttp3.Call searchCommitsAsync( + SearchCommitsRequest searchCommitsRequest, + final ApiCallback> _callback) + throws ApiException { + + okhttp3.Call localVarCall = + searchCommitsValidateBeforeCall(searchCommitsRequest, _callback); + Type localVarReturnType = new TypeToken>() {}.getType(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; + } + /** + * Build call for searchCommunicationChannelPreferences + * + * @param searchCommunicationChannelPreferencesRequest (required) + * @param _callback Callback for upload/download progress + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 Communication channel preferences retrieved successfully. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public okhttp3.Call searchCommunicationChannelPreferencesCall( + SearchCommunicationChannelPreferencesRequest + searchCommunicationChannelPreferencesRequest, + final ApiCallback _callback) + throws ApiException { + String basePath = null; + // Operation Servers + String[] localBasePaths = new String[] {}; + + // Determine Base Path to Use + if (localCustomBaseUrl != null) { + basePath = localCustomBaseUrl; + } else if (localBasePaths.length > 0) { + basePath = localBasePaths[localHostIndex]; + } else { + basePath = null; + } + + Object localVarPostBody = searchCommunicationChannelPreferencesRequest; + + // create path and map variables + String localVarPath = "/api/rest/2.0/system/preferences/communication-channels/search"; + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + final String[] localVarAccepts = {"application/json"}; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = {"application/json"}; + final String localVarContentType = + localVarApiClient.selectHeaderContentType(localVarContentTypes); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } + + String[] localVarAuthNames = new String[] {"bearerAuth"}; + return localVarApiClient.buildCall( + basePath, + localVarPath, + "POST", + localVarQueryParams, + localVarCollectionQueryParams, + localVarPostBody, + localVarHeaderParams, + localVarCookieParams, + localVarFormParams, + localVarAuthNames, + _callback); + } + + @SuppressWarnings("rawtypes") + private okhttp3.Call searchCommunicationChannelPreferencesValidateBeforeCall( + SearchCommunicationChannelPreferencesRequest + searchCommunicationChannelPreferencesRequest, + final ApiCallback _callback) + throws ApiException { + // verify the required parameter 'searchCommunicationChannelPreferencesRequest' is set + if (searchCommunicationChannelPreferencesRequest == null) { + throw new ApiException( + "Missing the required parameter 'searchCommunicationChannelPreferencesRequest'" + + " when calling searchCommunicationChannelPreferences(Async)"); + } + + return searchCommunicationChannelPreferencesCall( + searchCommunicationChannelPreferencesRequest, _callback); + } + + /** + * Version: 10.14.0.cl or later Fetch communication channel preferences. - Use + * `cluster_preferences` to fetch the default preferences for your ThoughtSpot + * application instance. - If your instance has + * [Orgs](https://docs.thoughtspot.com/cloud/latest/orgs-overview), use + * `org_preferences` to fetch any Org-specific preferences that override the defaults. + * Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) or `DEVELOPER` + * (**Has developer privilege**) privilege. If [Role-Based Access Control + * (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, users with + * `APPLICATION_ADMINISTRATION` (**Can manage application settings**) privilege are + * also authorized to perform this action. + * + * @param searchCommunicationChannelPreferencesRequest (required) + * @return CommunicationChannelPreferencesResponse + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the + * response body + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 Communication channel preferences retrieved successfully. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public CommunicationChannelPreferencesResponse searchCommunicationChannelPreferences( + SearchCommunicationChannelPreferencesRequest + searchCommunicationChannelPreferencesRequest) + throws ApiException { + ApiResponse localVarResp = + searchCommunicationChannelPreferencesWithHttpInfo( + searchCommunicationChannelPreferencesRequest); + return localVarResp.getData(); + } + + /** + * Version: 10.14.0.cl or later Fetch communication channel preferences. - Use + * `cluster_preferences` to fetch the default preferences for your ThoughtSpot + * application instance. - If your instance has + * [Orgs](https://docs.thoughtspot.com/cloud/latest/orgs-overview), use + * `org_preferences` to fetch any Org-specific preferences that override the defaults. + * Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) or `DEVELOPER` + * (**Has developer privilege**) privilege. If [Role-Based Access Control + * (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, users with + * `APPLICATION_ADMINISTRATION` (**Can manage application settings**) privilege are + * also authorized to perform this action. + * + * @param searchCommunicationChannelPreferencesRequest (required) + * @return ApiResponse<CommunicationChannelPreferencesResponse> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the + * response body + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 Communication channel preferences retrieved successfully. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public ApiResponse + searchCommunicationChannelPreferencesWithHttpInfo( + SearchCommunicationChannelPreferencesRequest + searchCommunicationChannelPreferencesRequest) + throws ApiException { + okhttp3.Call localVarCall = + searchCommunicationChannelPreferencesValidateBeforeCall( + searchCommunicationChannelPreferencesRequest, null); + Type localVarReturnType = + new TypeToken() {}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); + } + + /** + * (asynchronously) Version: 10.14.0.cl or later Fetch communication channel preferences. - Use + * `cluster_preferences` to fetch the default preferences for your ThoughtSpot + * application instance. - If your instance has + * [Orgs](https://docs.thoughtspot.com/cloud/latest/orgs-overview), use + * `org_preferences` to fetch any Org-specific preferences that override the defaults. + * Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) or `DEVELOPER` + * (**Has developer privilege**) privilege. If [Role-Based Access Control + * (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, users with + * `APPLICATION_ADMINISTRATION` (**Can manage application settings**) privilege are + * also authorized to perform this action. + * + * @param searchCommunicationChannelPreferencesRequest (required) + * @param _callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body + * object + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 Communication channel preferences retrieved successfully. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public okhttp3.Call searchCommunicationChannelPreferencesAsync( + SearchCommunicationChannelPreferencesRequest + searchCommunicationChannelPreferencesRequest, + final ApiCallback _callback) + throws ApiException { + + okhttp3.Call localVarCall = + searchCommunicationChannelPreferencesValidateBeforeCall( + searchCommunicationChannelPreferencesRequest, _callback); + Type localVarReturnType = + new TypeToken() {}.getType(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; + } + /** + * Build call for searchConfig + * + * @param searchConfigRequest (required) + * @param _callback Callback for upload/download progress + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 Details of local repository configuration -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public okhttp3.Call searchConfigCall( + SearchConfigRequest searchConfigRequest, final ApiCallback _callback) + throws ApiException { + String basePath = null; + // Operation Servers + String[] localBasePaths = new String[] {}; + + // Determine Base Path to Use + if (localCustomBaseUrl != null) { + basePath = localCustomBaseUrl; + } else if (localBasePaths.length > 0) { + basePath = localBasePaths[localHostIndex]; + } else { + basePath = null; + } + + Object localVarPostBody = searchConfigRequest; + + // create path and map variables + String localVarPath = "/api/rest/2.0/vcs/git/config/search"; + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + final String[] localVarAccepts = {"application/json"}; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = {"application/json"}; + final String localVarContentType = + localVarApiClient.selectHeaderContentType(localVarContentTypes); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } + + String[] localVarAuthNames = new String[] {"bearerAuth"}; + return localVarApiClient.buildCall( + basePath, + localVarPath, + "POST", + localVarQueryParams, + localVarCollectionQueryParams, + localVarPostBody, + localVarHeaderParams, + localVarCookieParams, + localVarFormParams, + localVarAuthNames, + _callback); + } + + @SuppressWarnings("rawtypes") + private okhttp3.Call searchConfigValidateBeforeCall( + SearchConfigRequest searchConfigRequest, final ApiCallback _callback) + throws ApiException { + // verify the required parameter 'searchConfigRequest' is set + if (searchConfigRequest == null) { + throw new ApiException( + "Missing the required parameter 'searchConfigRequest' when calling" + + " searchConfig(Async)"); + } + + return searchConfigCall(searchConfigRequest, _callback); + } + + /** + * Version: 9.2.0.cl or later Gets Git repository connections configured on the ThoughtSpot + * instance. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If + * [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled + * on your instance on your instance, the `CAN_SETUP_VERSION_CONTROL` (**Can set up + * version control**) privilege. + * + * @param searchConfigRequest (required) + * @return List<RepoConfigObject> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the + * response body + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 Details of local repository configuration -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public List searchConfig(SearchConfigRequest searchConfigRequest) + throws ApiException { + ApiResponse> localVarResp = + searchConfigWithHttpInfo(searchConfigRequest); + return localVarResp.getData(); + } + + /** + * Version: 9.2.0.cl or later Gets Git repository connections configured on the ThoughtSpot + * instance. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If + * [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled + * on your instance on your instance, the `CAN_SETUP_VERSION_CONTROL` (**Can set up + * version control**) privilege. + * + * @param searchConfigRequest (required) + * @return ApiResponse<List<RepoConfigObject>> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the + * response body + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 Details of local repository configuration -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public ApiResponse> searchConfigWithHttpInfo( + SearchConfigRequest searchConfigRequest) throws ApiException { + okhttp3.Call localVarCall = searchConfigValidateBeforeCall(searchConfigRequest, null); + Type localVarReturnType = new TypeToken>() {}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); + } + + /** + * (asynchronously) Version: 9.2.0.cl or later Gets Git repository connections configured on the + * ThoughtSpot instance. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) + * privilege. If [Role-Based Access Control + * (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance on your + * instance, the `CAN_SETUP_VERSION_CONTROL` (**Can set up version control**) + * privilege. + * + * @param searchConfigRequest (required) + * @param _callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body + * object + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 Details of local repository configuration -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public okhttp3.Call searchConfigAsync( + SearchConfigRequest searchConfigRequest, + final ApiCallback> _callback) + throws ApiException { + + okhttp3.Call localVarCall = searchConfigValidateBeforeCall(searchConfigRequest, _callback); + Type localVarReturnType = new TypeToken>() {}.getType(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; + } + /** + * Build call for searchConnection + * + * @param searchConnectionRequest (required) + * @param _callback Callback for upload/download progress + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 List of connections to the datasource. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public okhttp3.Call searchConnectionCall( + SearchConnectionRequest searchConnectionRequest, final ApiCallback _callback) + throws ApiException { + String basePath = null; + // Operation Servers + String[] localBasePaths = new String[] {}; + + // Determine Base Path to Use + if (localCustomBaseUrl != null) { + basePath = localCustomBaseUrl; + } else if (localBasePaths.length > 0) { + basePath = localBasePaths[localHostIndex]; + } else { + basePath = null; + } + + Object localVarPostBody = searchConnectionRequest; + + // create path and map variables + String localVarPath = "/api/rest/2.0/connection/search"; + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + final String[] localVarAccepts = {"application/json"}; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = {"application/json"}; + final String localVarContentType = + localVarApiClient.selectHeaderContentType(localVarContentTypes); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } + + String[] localVarAuthNames = new String[] {"bearerAuth"}; + return localVarApiClient.buildCall( + basePath, + localVarPath, + "POST", + localVarQueryParams, + localVarCollectionQueryParams, + localVarPostBody, + localVarHeaderParams, + localVarCookieParams, + localVarFormParams, + localVarAuthNames, + _callback); + } + + @SuppressWarnings("rawtypes") + private okhttp3.Call searchConnectionValidateBeforeCall( + SearchConnectionRequest searchConnectionRequest, final ApiCallback _callback) + throws ApiException { + // verify the required parameter 'searchConnectionRequest' is set + if (searchConnectionRequest == null) { + throw new ApiException( + "Missing the required parameter 'searchConnectionRequest' when calling" + + " searchConnection(Async)"); + } + + return searchConnectionCall(searchConnectionRequest, _callback); + } + + /** + * Version: 9.2.0.cl or later Gets connection objects. Requires `DATAMANAGEMENT` + * (**Can manage data**) or `ADMINISTRATION` (**Can administer ThoughtSpot**) + * privilege. If [Role-Based Access Control + * (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the + * `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) privilege is + * required. - To get a list of all connections available in the ThoughtSpot system, send the + * API request without any attributes in the request body. - To get the connection objects for a + * specific type of data warehouse, specify the type in `data_warehouse_types`. - To + * fetch details of a connection object, specify the connection object GUID or name. The + * `name_pattern` attribute allows passing partial text with `%` for a + * wildcard match. - To get details of the database, schemas, tables, or columns from a data + * connection object, specify `data_warehouse_object_type`. - To get a specific + * database, schema, table, or column from a connection object, define the object type in + * `data_warehouse_object_type` and object properties in the + * `data_warehouse_objects` array. For example, to search for a column, you must pass + * the database, schema, and table names in the API request. Note that in the following example, + * object properties are set in a hierarchical order (`database` > + * `schema` > `table` > `column`). ``` { + * \"connections\": [ { \"identifier\": + * \"b9d1f2ef-fa65-4a4b-994e-30fa2d57b0c2\", \"data_warehouse_objects\": [ { + * \"database\": \"NEBULADEV\", \"schema\": + * \"INFORMATION_SCHEMA\", \"table\": \"APPLICABLE_ROLES\", + * \"column\": \"ROLE_NAME\" } ] } ], + * \"data_warehouse_object_type\": \"COLUMN\" } ``` - To + * fetch data by `configuration`, specify `data_warehouse_object_type`. For + * example, to fetch columns from the `DEVELOPMENT` database, specify the + * `data_warehouse_object_type` as `DATABASE` and define the + * `configuration` string as + * `{\"database\":\"DEVELOPMENT\"}`. To get column data for a + * specific table, specify the table, for + * example,`{\"database\":\"RETAILAPPAREL\",\"table\":\"PIPES\"}`. + * - To query connections by `authentication_type`, specify + * `data_warehouse_object_type`. Supported values for `authentication_type` + * are: - `SERVICE_ACCOUNT`: For connections that require service account credentials + * to authenticate to the Cloud Data Warehouse and fetch data. - `OAUTH`: For + * connections that require OAuth credentials to authenticate to the Cloud Data Warehouse and + * fetch data. Teradata, Oracle, and Presto Cloud Data Warehouses do not support the OAuth + * authentication type. - `IAM`: For connections that have the IAM OAuth set up. This + * authentication type is supported on Amazon Redshift connections only. - `EXTOAUTH`: + * For connections that have External OAuth set up. ThoughtSpot supports external [OAuth with + * Microsoft Azure Active Directory (AD)](https://docs.thoughtspot.com/cloud/latest/ + * connections-snowflake-azure-ad-oauth) and [Okta for Snowflake data + * connections](https://docs.thoughtspot.com/cloud/latest/connections-snowflake-okta-oauth). - + * `KEY_PAIR`: For connections that require Key Pair account credentials to + * authenticate to the Cloud Data Warehouse and fetch data. This authentication type is + * supported on Snowflake connections only. - `OAUTH_WITH_PKCE`: For connections that + * require OAuth with PKCE account credentials to authenticate to the Cloud Data Warehouse and + * fetch data. This authentication type is supported on Snowflake, Starburst, Databricks, Denodo + * connections only. - `EXTOAUTH_WITH_PKCE`: For connections that require External + * OAuth With PKCE account credentials to authenticate to the Cloud Data Warehouse and fetch + * data. This authentication type is supported on Snowflake connections only. - + * `OAUTH_WITH_PEZ`: For connections that require OAuth With PEZ account credentials + * to authenticate to the Cloud Data Warehouse and fetch data. This authentication type is + * supported on Amazon Redshift connections only. - `OAUTH_WITH_SERVICE_PRINCIPAL`: + * For connections that require OAuth With Service Principal account credentials to authenticate + * to the Cloud Data Warehouse and fetch data. This authentication type is supported on + * Databricks connections only. - `PERSONAL_ACCESS_TOKEN`: For connections that + * require Personal Access Token account credentials to authenticate to the Cloud Data Warehouse + * and fetch data. This authentication type is supported on Databricks connections only. - + * `OAUTH_CLIENT_CREDENTIALS`: For connections that require OAuth Client Credentials + * to authenticate to the Cloud Data Warehouse and fetch data. This authentication type is + * supported on Snowflake connections only. - To include more details about connection objects + * in the API response, set `include_details` to `true`. - You can also sort + * the output by field names and filter connections by tags. **NOTE**: When filtering connection + * records by parameters other than `data_warehouse_types` or + * `tag_identifiers`, ensure that you set `record_size` to `-1` + * and `record_offset` to `0` for precise results. + * + * @param searchConnectionRequest (required) + * @return List<SearchConnectionResponse> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the + * response body + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 List of connections to the datasource. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public List searchConnection( + SearchConnectionRequest searchConnectionRequest) throws ApiException { + ApiResponse> localVarResp = + searchConnectionWithHttpInfo(searchConnectionRequest); + return localVarResp.getData(); + } + + /** + * Version: 9.2.0.cl or later Gets connection objects. Requires `DATAMANAGEMENT` + * (**Can manage data**) or `ADMINISTRATION` (**Can administer ThoughtSpot**) + * privilege. If [Role-Based Access Control + * (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the + * `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) privilege is + * required. - To get a list of all connections available in the ThoughtSpot system, send the + * API request without any attributes in the request body. - To get the connection objects for a + * specific type of data warehouse, specify the type in `data_warehouse_types`. - To + * fetch details of a connection object, specify the connection object GUID or name. The + * `name_pattern` attribute allows passing partial text with `%` for a + * wildcard match. - To get details of the database, schemas, tables, or columns from a data + * connection object, specify `data_warehouse_object_type`. - To get a specific + * database, schema, table, or column from a connection object, define the object type in + * `data_warehouse_object_type` and object properties in the + * `data_warehouse_objects` array. For example, to search for a column, you must pass + * the database, schema, and table names in the API request. Note that in the following example, + * object properties are set in a hierarchical order (`database` > + * `schema` > `table` > `column`). ``` { + * \"connections\": [ { \"identifier\": + * \"b9d1f2ef-fa65-4a4b-994e-30fa2d57b0c2\", \"data_warehouse_objects\": [ { + * \"database\": \"NEBULADEV\", \"schema\": + * \"INFORMATION_SCHEMA\", \"table\": \"APPLICABLE_ROLES\", + * \"column\": \"ROLE_NAME\" } ] } ], + * \"data_warehouse_object_type\": \"COLUMN\" } ``` - To + * fetch data by `configuration`, specify `data_warehouse_object_type`. For + * example, to fetch columns from the `DEVELOPMENT` database, specify the + * `data_warehouse_object_type` as `DATABASE` and define the + * `configuration` string as + * `{\"database\":\"DEVELOPMENT\"}`. To get column data for a + * specific table, specify the table, for + * example,`{\"database\":\"RETAILAPPAREL\",\"table\":\"PIPES\"}`. + * - To query connections by `authentication_type`, specify + * `data_warehouse_object_type`. Supported values for `authentication_type` + * are: - `SERVICE_ACCOUNT`: For connections that require service account credentials + * to authenticate to the Cloud Data Warehouse and fetch data. - `OAUTH`: For + * connections that require OAuth credentials to authenticate to the Cloud Data Warehouse and + * fetch data. Teradata, Oracle, and Presto Cloud Data Warehouses do not support the OAuth + * authentication type. - `IAM`: For connections that have the IAM OAuth set up. This + * authentication type is supported on Amazon Redshift connections only. - `EXTOAUTH`: + * For connections that have External OAuth set up. ThoughtSpot supports external [OAuth with + * Microsoft Azure Active Directory (AD)](https://docs.thoughtspot.com/cloud/latest/ + * connections-snowflake-azure-ad-oauth) and [Okta for Snowflake data + * connections](https://docs.thoughtspot.com/cloud/latest/connections-snowflake-okta-oauth). - + * `KEY_PAIR`: For connections that require Key Pair account credentials to + * authenticate to the Cloud Data Warehouse and fetch data. This authentication type is + * supported on Snowflake connections only. - `OAUTH_WITH_PKCE`: For connections that + * require OAuth with PKCE account credentials to authenticate to the Cloud Data Warehouse and + * fetch data. This authentication type is supported on Snowflake, Starburst, Databricks, Denodo + * connections only. - `EXTOAUTH_WITH_PKCE`: For connections that require External + * OAuth With PKCE account credentials to authenticate to the Cloud Data Warehouse and fetch + * data. This authentication type is supported on Snowflake connections only. - + * `OAUTH_WITH_PEZ`: For connections that require OAuth With PEZ account credentials + * to authenticate to the Cloud Data Warehouse and fetch data. This authentication type is + * supported on Amazon Redshift connections only. - `OAUTH_WITH_SERVICE_PRINCIPAL`: + * For connections that require OAuth With Service Principal account credentials to authenticate + * to the Cloud Data Warehouse and fetch data. This authentication type is supported on + * Databricks connections only. - `PERSONAL_ACCESS_TOKEN`: For connections that + * require Personal Access Token account credentials to authenticate to the Cloud Data Warehouse + * and fetch data. This authentication type is supported on Databricks connections only. - + * `OAUTH_CLIENT_CREDENTIALS`: For connections that require OAuth Client Credentials + * to authenticate to the Cloud Data Warehouse and fetch data. This authentication type is + * supported on Snowflake connections only. - To include more details about connection objects + * in the API response, set `include_details` to `true`. - You can also sort + * the output by field names and filter connections by tags. **NOTE**: When filtering connection + * records by parameters other than `data_warehouse_types` or + * `tag_identifiers`, ensure that you set `record_size` to `-1` + * and `record_offset` to `0` for precise results. + * + * @param searchConnectionRequest (required) + * @return ApiResponse<List<SearchConnectionResponse>> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the + * response body + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 List of connections to the datasource. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public ApiResponse> searchConnectionWithHttpInfo( + SearchConnectionRequest searchConnectionRequest) throws ApiException { + okhttp3.Call localVarCall = + searchConnectionValidateBeforeCall(searchConnectionRequest, null); + Type localVarReturnType = new TypeToken>() {}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); + } + + /** + * (asynchronously) Version: 9.2.0.cl or later Gets connection objects. Requires + * `DATAMANAGEMENT` (**Can manage data**) or `ADMINISTRATION` (**Can + * administer ThoughtSpot**) privilege. If [Role-Based Access Control + * (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the + * `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) privilege is + * required. - To get a list of all connections available in the ThoughtSpot system, send the + * API request without any attributes in the request body. - To get the connection objects for a + * specific type of data warehouse, specify the type in `data_warehouse_types`. - To + * fetch details of a connection object, specify the connection object GUID or name. The + * `name_pattern` attribute allows passing partial text with `%` for a + * wildcard match. - To get details of the database, schemas, tables, or columns from a data + * connection object, specify `data_warehouse_object_type`. - To get a specific + * database, schema, table, or column from a connection object, define the object type in + * `data_warehouse_object_type` and object properties in the + * `data_warehouse_objects` array. For example, to search for a column, you must pass + * the database, schema, and table names in the API request. Note that in the following example, + * object properties are set in a hierarchical order (`database` > + * `schema` > `table` > `column`). ``` { + * \"connections\": [ { \"identifier\": + * \"b9d1f2ef-fa65-4a4b-994e-30fa2d57b0c2\", \"data_warehouse_objects\": [ { + * \"database\": \"NEBULADEV\", \"schema\": + * \"INFORMATION_SCHEMA\", \"table\": \"APPLICABLE_ROLES\", + * \"column\": \"ROLE_NAME\" } ] } ], + * \"data_warehouse_object_type\": \"COLUMN\" } ``` - To + * fetch data by `configuration`, specify `data_warehouse_object_type`. For + * example, to fetch columns from the `DEVELOPMENT` database, specify the + * `data_warehouse_object_type` as `DATABASE` and define the + * `configuration` string as + * `{\"database\":\"DEVELOPMENT\"}`. To get column data for a + * specific table, specify the table, for + * example,`{\"database\":\"RETAILAPPAREL\",\"table\":\"PIPES\"}`. + * - To query connections by `authentication_type`, specify + * `data_warehouse_object_type`. Supported values for `authentication_type` + * are: - `SERVICE_ACCOUNT`: For connections that require service account credentials + * to authenticate to the Cloud Data Warehouse and fetch data. - `OAUTH`: For + * connections that require OAuth credentials to authenticate to the Cloud Data Warehouse and + * fetch data. Teradata, Oracle, and Presto Cloud Data Warehouses do not support the OAuth + * authentication type. - `IAM`: For connections that have the IAM OAuth set up. This + * authentication type is supported on Amazon Redshift connections only. - `EXTOAUTH`: + * For connections that have External OAuth set up. ThoughtSpot supports external [OAuth with + * Microsoft Azure Active Directory (AD)](https://docs.thoughtspot.com/cloud/latest/ + * connections-snowflake-azure-ad-oauth) and [Okta for Snowflake data + * connections](https://docs.thoughtspot.com/cloud/latest/connections-snowflake-okta-oauth). - + * `KEY_PAIR`: For connections that require Key Pair account credentials to + * authenticate to the Cloud Data Warehouse and fetch data. This authentication type is + * supported on Snowflake connections only. - `OAUTH_WITH_PKCE`: For connections that + * require OAuth with PKCE account credentials to authenticate to the Cloud Data Warehouse and + * fetch data. This authentication type is supported on Snowflake, Starburst, Databricks, Denodo + * connections only. - `EXTOAUTH_WITH_PKCE`: For connections that require External + * OAuth With PKCE account credentials to authenticate to the Cloud Data Warehouse and fetch + * data. This authentication type is supported on Snowflake connections only. - + * `OAUTH_WITH_PEZ`: For connections that require OAuth With PEZ account credentials + * to authenticate to the Cloud Data Warehouse and fetch data. This authentication type is + * supported on Amazon Redshift connections only. - `OAUTH_WITH_SERVICE_PRINCIPAL`: + * For connections that require OAuth With Service Principal account credentials to authenticate + * to the Cloud Data Warehouse and fetch data. This authentication type is supported on + * Databricks connections only. - `PERSONAL_ACCESS_TOKEN`: For connections that + * require Personal Access Token account credentials to authenticate to the Cloud Data Warehouse + * and fetch data. This authentication type is supported on Databricks connections only. - + * `OAUTH_CLIENT_CREDENTIALS`: For connections that require OAuth Client Credentials + * to authenticate to the Cloud Data Warehouse and fetch data. This authentication type is + * supported on Snowflake connections only. - To include more details about connection objects + * in the API response, set `include_details` to `true`. - You can also sort + * the output by field names and filter connections by tags. **NOTE**: When filtering connection + * records by parameters other than `data_warehouse_types` or + * `tag_identifiers`, ensure that you set `record_size` to `-1` + * and `record_offset` to `0` for precise results. + * + * @param searchConnectionRequest (required) + * @param _callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body + * object + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 List of connections to the datasource. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public okhttp3.Call searchConnectionAsync( + SearchConnectionRequest searchConnectionRequest, + final ApiCallback> _callback) + throws ApiException { + + okhttp3.Call localVarCall = + searchConnectionValidateBeforeCall(searchConnectionRequest, _callback); + Type localVarReturnType = new TypeToken>() {}.getType(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; + } + /** + * Build call for searchCustomActions + * + * @param searchCustomActionsRequest (required) + * @param _callback Callback for upload/download progress + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 Custom action search is successful. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public okhttp3.Call searchCustomActionsCall( + SearchCustomActionsRequest searchCustomActionsRequest, final ApiCallback _callback) + throws ApiException { + String basePath = null; + // Operation Servers + String[] localBasePaths = new String[] {}; + + // Determine Base Path to Use + if (localCustomBaseUrl != null) { + basePath = localCustomBaseUrl; + } else if (localBasePaths.length > 0) { + basePath = localBasePaths[localHostIndex]; + } else { + basePath = null; + } + + Object localVarPostBody = searchCustomActionsRequest; + + // create path and map variables + String localVarPath = "/api/rest/2.0/customization/custom-actions/search"; + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + final String[] localVarAccepts = {"application/json"}; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = {"application/json"}; + final String localVarContentType = + localVarApiClient.selectHeaderContentType(localVarContentTypes); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } + + String[] localVarAuthNames = new String[] {"bearerAuth"}; + return localVarApiClient.buildCall( + basePath, + localVarPath, + "POST", + localVarQueryParams, + localVarCollectionQueryParams, + localVarPostBody, + localVarHeaderParams, + localVarCookieParams, + localVarFormParams, + localVarAuthNames, + _callback); + } + + @SuppressWarnings("rawtypes") + private okhttp3.Call searchCustomActionsValidateBeforeCall( + SearchCustomActionsRequest searchCustomActionsRequest, final ApiCallback _callback) + throws ApiException { + // verify the required parameter 'searchCustomActionsRequest' is set + if (searchCustomActionsRequest == null) { + throw new ApiException( + "Missing the required parameter 'searchCustomActionsRequest' when calling" + + " searchCustomActions(Async)"); + } + + return searchCustomActionsCall(searchCustomActionsRequest, _callback); + } + + /** + * Version: 9.6.0.cl or later Gets custom actions configured on the cluster. Requires + * `DEVELOPER` (**Has Developer privilege**) or `ADMINISTRATION` (**Can + * administer ThoughtSpot**) privilege. If [Role-Based Access Control + * (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the + * `DEVELOPER` (**Has developer privilege**) privilege is required. + * + * @param searchCustomActionsRequest (required) + * @return List<ResponseCustomAction> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the + * response body + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 Custom action search is successful. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public List searchCustomActions( + SearchCustomActionsRequest searchCustomActionsRequest) throws ApiException { + ApiResponse> localVarResp = + searchCustomActionsWithHttpInfo(searchCustomActionsRequest); + return localVarResp.getData(); + } + + /** + * Version: 9.6.0.cl or later Gets custom actions configured on the cluster. Requires + * `DEVELOPER` (**Has Developer privilege**) or `ADMINISTRATION` (**Can + * administer ThoughtSpot**) privilege. If [Role-Based Access Control + * (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the + * `DEVELOPER` (**Has developer privilege**) privilege is required. + * + * @param searchCustomActionsRequest (required) + * @return ApiResponse<List<ResponseCustomAction>> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the + * response body + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 Custom action search is successful. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public ApiResponse> searchCustomActionsWithHttpInfo( + SearchCustomActionsRequest searchCustomActionsRequest) throws ApiException { + okhttp3.Call localVarCall = + searchCustomActionsValidateBeforeCall(searchCustomActionsRequest, null); + Type localVarReturnType = new TypeToken>() {}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); + } + + /** + * (asynchronously) Version: 9.6.0.cl or later Gets custom actions configured on the cluster. + * Requires `DEVELOPER` (**Has Developer privilege**) or `ADMINISTRATION` + * (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control + * (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the + * `DEVELOPER` (**Has developer privilege**) privilege is required. + * + * @param searchCustomActionsRequest (required) + * @param _callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body + * object + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 Custom action search is successful. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public okhttp3.Call searchCustomActionsAsync( + SearchCustomActionsRequest searchCustomActionsRequest, + final ApiCallback> _callback) + throws ApiException { + + okhttp3.Call localVarCall = + searchCustomActionsValidateBeforeCall(searchCustomActionsRequest, _callback); + Type localVarReturnType = new TypeToken>() {}.getType(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; + } + /** + * Build call for searchData + * + * @param searchDataRequest (required) + * @param _callback Callback for upload/download progress + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 Fetching data of specified metadata object is successful. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public okhttp3.Call searchDataCall( + SearchDataRequest searchDataRequest, final ApiCallback _callback) throws ApiException { + String basePath = null; + // Operation Servers + String[] localBasePaths = new String[] {}; + + // Determine Base Path to Use + if (localCustomBaseUrl != null) { + basePath = localCustomBaseUrl; + } else if (localBasePaths.length > 0) { + basePath = localBasePaths[localHostIndex]; + } else { + basePath = null; + } + + Object localVarPostBody = searchDataRequest; + + // create path and map variables + String localVarPath = "/api/rest/2.0/searchdata"; + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + final String[] localVarAccepts = {"application/json"}; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = {"application/json"}; + final String localVarContentType = + localVarApiClient.selectHeaderContentType(localVarContentTypes); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } + + String[] localVarAuthNames = new String[] {"bearerAuth"}; + return localVarApiClient.buildCall( + basePath, + localVarPath, + "POST", + localVarQueryParams, + localVarCollectionQueryParams, + localVarPostBody, + localVarHeaderParams, + localVarCookieParams, + localVarFormParams, + localVarAuthNames, + _callback); + } + + @SuppressWarnings("rawtypes") + private okhttp3.Call searchDataValidateBeforeCall( + SearchDataRequest searchDataRequest, final ApiCallback _callback) throws ApiException { + // verify the required parameter 'searchDataRequest' is set + if (searchDataRequest == null) { + throw new ApiException( + "Missing the required parameter 'searchDataRequest' when calling" + + " searchData(Async)"); + } + + return searchDataCall(searchDataRequest, _callback); + } + + /** + * Version: 9.0.0.cl or later Generates an Answer from a given data source. Requires at least + * view access to the data source object (Worksheet or View). #### Usage guidelines To search + * data, specify the data source GUID in `logical_table_identifier`. The data source + * can be a Worksheet, View, Table, or SQL view. Pass search tokens in the + * `query_string` attribute in the API request as shown in the following example: + * ``` { \"query_string\": \"[sales] by [store]\", + * \"logical_table_identifier\": \"cd252e5c-b552-49a8-821d-3eadaa049cca\", } + * ``` For more information about the `query_string` format and data + * source attribute, see [Search data + * API](https://developers.thoughtspot.com/docs/fetch-data-and-report-apis#_search_data_api). + * The `record_size` attribute determines the number of records to retrieve in an API + * call. For more information about pagination, record size, and maximum row limit, see + * [Pagination and record size + * settings](https://developers.thoughtspot.com/docs/fetch-data-and-report-apis#_pagination_settings_for_data_and_report_api). + * + * @param searchDataRequest (required) + * @return SearchDataResponse + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the + * response body + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 Fetching data of specified metadata object is successful. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public SearchDataResponse searchData(SearchDataRequest searchDataRequest) throws ApiException { + ApiResponse localVarResp = searchDataWithHttpInfo(searchDataRequest); + return localVarResp.getData(); + } + + /** + * Version: 9.0.0.cl or later Generates an Answer from a given data source. Requires at least + * view access to the data source object (Worksheet or View). #### Usage guidelines To search + * data, specify the data source GUID in `logical_table_identifier`. The data source + * can be a Worksheet, View, Table, or SQL view. Pass search tokens in the + * `query_string` attribute in the API request as shown in the following example: + * ``` { \"query_string\": \"[sales] by [store]\", + * \"logical_table_identifier\": \"cd252e5c-b552-49a8-821d-3eadaa049cca\", } + * ``` For more information about the `query_string` format and data + * source attribute, see [Search data + * API](https://developers.thoughtspot.com/docs/fetch-data-and-report-apis#_search_data_api). + * The `record_size` attribute determines the number of records to retrieve in an API + * call. For more information about pagination, record size, and maximum row limit, see + * [Pagination and record size + * settings](https://developers.thoughtspot.com/docs/fetch-data-and-report-apis#_pagination_settings_for_data_and_report_api). + * + * @param searchDataRequest (required) + * @return ApiResponse<SearchDataResponse> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the + * response body + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 Fetching data of specified metadata object is successful. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public ApiResponse searchDataWithHttpInfo( + SearchDataRequest searchDataRequest) throws ApiException { + okhttp3.Call localVarCall = searchDataValidateBeforeCall(searchDataRequest, null); + Type localVarReturnType = new TypeToken() {}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); + } + + /** + * (asynchronously) Version: 9.0.0.cl or later Generates an Answer from a given data source. + * Requires at least view access to the data source object (Worksheet or View). #### Usage + * guidelines To search data, specify the data source GUID in + * `logical_table_identifier`. The data source can be a Worksheet, View, Table, or SQL + * view. Pass search tokens in the `query_string` attribute in the API request as + * shown in the following example: ``` { \"query_string\": + * \"[sales] by [store]\", \"logical_table_identifier\": + * \"cd252e5c-b552-49a8-821d-3eadaa049cca\", } ``` For more information + * about the `query_string` format and data source attribute, see [Search data + * API](https://developers.thoughtspot.com/docs/fetch-data-and-report-apis#_search_data_api). + * The `record_size` attribute determines the number of records to retrieve in an API + * call. For more information about pagination, record size, and maximum row limit, see + * [Pagination and record size + * settings](https://developers.thoughtspot.com/docs/fetch-data-and-report-apis#_pagination_settings_for_data_and_report_api). + * + * @param searchDataRequest (required) + * @param _callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body + * object + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 Fetching data of specified metadata object is successful. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public okhttp3.Call searchDataAsync( + SearchDataRequest searchDataRequest, final ApiCallback _callback) + throws ApiException { + + okhttp3.Call localVarCall = searchDataValidateBeforeCall(searchDataRequest, _callback); + Type localVarReturnType = new TypeToken() {}.getType(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; + } + /** + * Build call for searchEmailCustomization + * + * @param searchEmailCustomizationRequest (required) + * @param _callback Callback for upload/download progress + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + * @http.response.details + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 OK -
400 Invalid request. -
403 Unauthorized access. -
500 Unexpected error -
+ */ + public okhttp3.Call searchEmailCustomizationCall( + SearchEmailCustomizationRequest searchEmailCustomizationRequest, + final ApiCallback _callback) + throws ApiException { + String basePath = null; + // Operation Servers + String[] localBasePaths = new String[] {}; + + // Determine Base Path to Use + if (localCustomBaseUrl != null) { + basePath = localCustomBaseUrl; + } else if (localBasePaths.length > 0) { + basePath = localBasePaths[localHostIndex]; + } else { + basePath = null; + } + + Object localVarPostBody = searchEmailCustomizationRequest; + + // create path and map variables + String localVarPath = "/api/rest/2.0/customization/email/search"; + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + final String[] localVarAccepts = {"application/json"}; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = {"application/json"}; + final String localVarContentType = + localVarApiClient.selectHeaderContentType(localVarContentTypes); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } + + String[] localVarAuthNames = new String[] {"bearerAuth"}; + return localVarApiClient.buildCall( + basePath, + localVarPath, + "POST", + localVarQueryParams, + localVarCollectionQueryParams, + localVarPostBody, + localVarHeaderParams, + localVarCookieParams, + localVarFormParams, + localVarAuthNames, + _callback); + } + + @SuppressWarnings("rawtypes") + private okhttp3.Call searchEmailCustomizationValidateBeforeCall( + SearchEmailCustomizationRequest searchEmailCustomizationRequest, + final ApiCallback _callback) + throws ApiException { + // verify the required parameter 'searchEmailCustomizationRequest' is set + if (searchEmailCustomizationRequest == null) { + throw new ApiException( + "Missing the required parameter 'searchEmailCustomizationRequest' when calling" + + " searchEmailCustomization(Async)"); + } + + return searchEmailCustomizationCall(searchEmailCustomizationRequest, _callback); + } + + /** + * Version: 10.10.0.cl or later Search the email customization configuration if any set for the + * ThoughtSpot system. #### Pre-requisites Requires `DEVELOPER` (**has developer + * privilege**) or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If + * [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled + * on your instance, the `DEVELOPER` (**Has developer privilege**) privilege is + * required. **NOTE**:This endpoint in currently in beta. Contact ThoughtSpot support to enable + * this on your instance. + * + * @param searchEmailCustomizationRequest (required) + * @return List<CreateEmailCustomizationResponse> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the + * response body + * @http.response.details + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 OK -
400 Invalid request. -
403 Unauthorized access. -
500 Unexpected error -
+ */ + public List searchEmailCustomization( + SearchEmailCustomizationRequest searchEmailCustomizationRequest) throws ApiException { + ApiResponse> localVarResp = + searchEmailCustomizationWithHttpInfo(searchEmailCustomizationRequest); + return localVarResp.getData(); + } + + /** + * Version: 10.10.0.cl or later Search the email customization configuration if any set for the + * ThoughtSpot system. #### Pre-requisites Requires `DEVELOPER` (**has developer + * privilege**) or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If + * [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled + * on your instance, the `DEVELOPER` (**Has developer privilege**) privilege is + * required. **NOTE**:This endpoint in currently in beta. Contact ThoughtSpot support to enable + * this on your instance. + * + * @param searchEmailCustomizationRequest (required) + * @return ApiResponse<List<CreateEmailCustomizationResponse>> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the + * response body + * @http.response.details + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 OK -
400 Invalid request. -
403 Unauthorized access. -
500 Unexpected error -
+ */ + public ApiResponse> searchEmailCustomizationWithHttpInfo( + SearchEmailCustomizationRequest searchEmailCustomizationRequest) throws ApiException { + okhttp3.Call localVarCall = + searchEmailCustomizationValidateBeforeCall(searchEmailCustomizationRequest, null); + Type localVarReturnType = + new TypeToken>() {}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); + } + + /** + * (asynchronously) Version: 10.10.0.cl or later Search the email customization configuration if + * any set for the ThoughtSpot system. #### Pre-requisites Requires `DEVELOPER` (**has + * developer privilege**) or `ADMINISTRATION` (**Can administer ThoughtSpot**) + * privilege. If [Role-Based Access Control + * (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the + * `DEVELOPER` (**Has developer privilege**) privilege is required. **NOTE**:This + * endpoint in currently in beta. Contact ThoughtSpot support to enable this on your instance. + * + * @param searchEmailCustomizationRequest (required) + * @param _callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body + * object + * @http.response.details + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 OK -
400 Invalid request. -
403 Unauthorized access. -
500 Unexpected error -
+ */ + public okhttp3.Call searchEmailCustomizationAsync( + SearchEmailCustomizationRequest searchEmailCustomizationRequest, + final ApiCallback> _callback) + throws ApiException { + + okhttp3.Call localVarCall = + searchEmailCustomizationValidateBeforeCall( + searchEmailCustomizationRequest, _callback); + Type localVarReturnType = + new TypeToken>() {}.getType(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; + } + /** + * Build call for searchMetadata + * + * @param searchMetadataRequest (required) + * @param _callback Callback for upload/download progress + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 Metadata objects search result. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public okhttp3.Call searchMetadataCall( + SearchMetadataRequest searchMetadataRequest, final ApiCallback _callback) + throws ApiException { + String basePath = null; + // Operation Servers + String[] localBasePaths = new String[] {}; + + // Determine Base Path to Use + if (localCustomBaseUrl != null) { + basePath = localCustomBaseUrl; + } else if (localBasePaths.length > 0) { + basePath = localBasePaths[localHostIndex]; + } else { + basePath = null; + } + + Object localVarPostBody = searchMetadataRequest; + + // create path and map variables + String localVarPath = "/api/rest/2.0/metadata/search"; + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + final String[] localVarAccepts = {"application/json"}; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = {"application/json"}; + final String localVarContentType = + localVarApiClient.selectHeaderContentType(localVarContentTypes); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } + + String[] localVarAuthNames = new String[] {"bearerAuth"}; + return localVarApiClient.buildCall( + basePath, + localVarPath, + "POST", + localVarQueryParams, + localVarCollectionQueryParams, + localVarPostBody, + localVarHeaderParams, + localVarCookieParams, + localVarFormParams, + localVarAuthNames, + _callback); + } + + @SuppressWarnings("rawtypes") + private okhttp3.Call searchMetadataValidateBeforeCall( + SearchMetadataRequest searchMetadataRequest, final ApiCallback _callback) + throws ApiException { + // verify the required parameter 'searchMetadataRequest' is set + if (searchMetadataRequest == null) { + throw new ApiException( + "Missing the required parameter 'searchMetadataRequest' when calling" + + " searchMetadata(Async)"); + } + + return searchMetadataCall(searchMetadataRequest, _callback); + } + + /** + * Version: 9.0.0.cl or later Gets a list of metadata objects available on the ThoughtSpot + * system. This API endpoint is available to all users who have view access to the object. Users + * with `ADMINISTRATION` (**Can administer ThoughtSpot**) privileges can view data for + * all metadata objects, including users and groups. #### Usage guidelines - To get all metadata + * objects, send the API request without any attributes. - To get metadata objects of a specific + * type, set the `type` attribute. For example, to fetch a Worksheet, set the type as + * `LOGICAL_TABLE`. - To filter metadata objects within type + * `LOGICAL_TABLE`, set the `subtypes` attribute. For example, to fetch a + * Worksheet, set the type as `LOGICAL_TABLE` & subtypes as + * `[WORKSHEET]`. - To get a specific metadata object, specify the GUID. - To + * customize your search and filter the API response, you can use several parameters. You can + * search for objects created or modified by specific users, by tags applied to the objects, or + * by using the include parameters like `include_auto_created_objects`, + * `include_dependent_objects`, `include_headers`, + * `include_incomplete_objects`, and so on. You can also define sorting options to + * sort the data retrieved in the API response. - To get discoverable objects when linientmodel + * is enabled you can use `include_discoverable_objects` as true else false. Default + * value is true. - For liveboard metadata type, to get the newer format, set the + * `liveboard_response_format` as V2. Default value is V1. - To retrieve only objects + * that are published, set the `include_only_published_objects` as true. Default value + * is false. **NOTE**: The following parameters support pagination of metadata records: - + * `tag_identifiers` - `type` - `subtypes` - + * `created_by_user_identifiers` - `modified_by_user_identifiers` - + * `owned_by_user_identifiers` - `exclude_objects` - + * `include_auto_created_objects` - `favorite_object_options` - + * `include_only_published_objects` If you are using other parameters to search + * metadata, set `record_size` to `-1` and `record_offset` to + * `0`. + * + * @param searchMetadataRequest (required) + * @return List<MetadataSearchResponse> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the + * response body + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 Metadata objects search result. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public List searchMetadata(SearchMetadataRequest searchMetadataRequest) + throws ApiException { + ApiResponse> localVarResp = + searchMetadataWithHttpInfo(searchMetadataRequest); + return localVarResp.getData(); + } + + /** + * Version: 9.0.0.cl or later Gets a list of metadata objects available on the ThoughtSpot + * system. This API endpoint is available to all users who have view access to the object. Users + * with `ADMINISTRATION` (**Can administer ThoughtSpot**) privileges can view data for + * all metadata objects, including users and groups. #### Usage guidelines - To get all metadata + * objects, send the API request without any attributes. - To get metadata objects of a specific + * type, set the `type` attribute. For example, to fetch a Worksheet, set the type as + * `LOGICAL_TABLE`. - To filter metadata objects within type + * `LOGICAL_TABLE`, set the `subtypes` attribute. For example, to fetch a + * Worksheet, set the type as `LOGICAL_TABLE` & subtypes as + * `[WORKSHEET]`. - To get a specific metadata object, specify the GUID. - To + * customize your search and filter the API response, you can use several parameters. You can + * search for objects created or modified by specific users, by tags applied to the objects, or + * by using the include parameters like `include_auto_created_objects`, + * `include_dependent_objects`, `include_headers`, + * `include_incomplete_objects`, and so on. You can also define sorting options to + * sort the data retrieved in the API response. - To get discoverable objects when linientmodel + * is enabled you can use `include_discoverable_objects` as true else false. Default + * value is true. - For liveboard metadata type, to get the newer format, set the + * `liveboard_response_format` as V2. Default value is V1. - To retrieve only objects + * that are published, set the `include_only_published_objects` as true. Default value + * is false. **NOTE**: The following parameters support pagination of metadata records: - + * `tag_identifiers` - `type` - `subtypes` - + * `created_by_user_identifiers` - `modified_by_user_identifiers` - + * `owned_by_user_identifiers` - `exclude_objects` - + * `include_auto_created_objects` - `favorite_object_options` - + * `include_only_published_objects` If you are using other parameters to search + * metadata, set `record_size` to `-1` and `record_offset` to + * `0`. + * + * @param searchMetadataRequest (required) + * @return ApiResponse<List<MetadataSearchResponse>> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the + * response body + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 Metadata objects search result. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public ApiResponse> searchMetadataWithHttpInfo( + SearchMetadataRequest searchMetadataRequest) throws ApiException { + okhttp3.Call localVarCall = searchMetadataValidateBeforeCall(searchMetadataRequest, null); + Type localVarReturnType = new TypeToken>() {}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); + } + + /** + * (asynchronously) Version: 9.0.0.cl or later Gets a list of metadata objects available on the + * ThoughtSpot system. This API endpoint is available to all users who have view access to the + * object. Users with `ADMINISTRATION` (**Can administer ThoughtSpot**) privileges can + * view data for all metadata objects, including users and groups. #### Usage guidelines - To + * get all metadata objects, send the API request without any attributes. - To get metadata + * objects of a specific type, set the `type` attribute. For example, to fetch a + * Worksheet, set the type as `LOGICAL_TABLE`. - To filter metadata objects within + * type `LOGICAL_TABLE`, set the `subtypes` attribute. For example, to fetch + * a Worksheet, set the type as `LOGICAL_TABLE` & subtypes as + * `[WORKSHEET]`. - To get a specific metadata object, specify the GUID. - To + * customize your search and filter the API response, you can use several parameters. You can + * search for objects created or modified by specific users, by tags applied to the objects, or + * by using the include parameters like `include_auto_created_objects`, + * `include_dependent_objects`, `include_headers`, + * `include_incomplete_objects`, and so on. You can also define sorting options to + * sort the data retrieved in the API response. - To get discoverable objects when linientmodel + * is enabled you can use `include_discoverable_objects` as true else false. Default + * value is true. - For liveboard metadata type, to get the newer format, set the + * `liveboard_response_format` as V2. Default value is V1. - To retrieve only objects + * that are published, set the `include_only_published_objects` as true. Default value + * is false. **NOTE**: The following parameters support pagination of metadata records: - + * `tag_identifiers` - `type` - `subtypes` - + * `created_by_user_identifiers` - `modified_by_user_identifiers` - + * `owned_by_user_identifiers` - `exclude_objects` - + * `include_auto_created_objects` - `favorite_object_options` - + * `include_only_published_objects` If you are using other parameters to search + * metadata, set `record_size` to `-1` and `record_offset` to + * `0`. + * + * @param searchMetadataRequest (required) + * @param _callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body + * object + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 Metadata objects search result. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public okhttp3.Call searchMetadataAsync( + SearchMetadataRequest searchMetadataRequest, + final ApiCallback> _callback) + throws ApiException { + + okhttp3.Call localVarCall = + searchMetadataValidateBeforeCall(searchMetadataRequest, _callback); + Type localVarReturnType = new TypeToken>() {}.getType(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; + } + /** + * Build call for searchOrgs + * + * @param searchOrgsRequest (required) + * @param _callback Callback for upload/download progress + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 Organization search result. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public okhttp3.Call searchOrgsCall( + SearchOrgsRequest searchOrgsRequest, final ApiCallback _callback) throws ApiException { + String basePath = null; + // Operation Servers + String[] localBasePaths = new String[] {}; + + // Determine Base Path to Use + if (localCustomBaseUrl != null) { + basePath = localCustomBaseUrl; + } else if (localBasePaths.length > 0) { + basePath = localBasePaths[localHostIndex]; + } else { + basePath = null; + } + + Object localVarPostBody = searchOrgsRequest; + + // create path and map variables + String localVarPath = "/api/rest/2.0/orgs/search"; + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + final String[] localVarAccepts = {"application/json"}; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = {"application/json"}; + final String localVarContentType = + localVarApiClient.selectHeaderContentType(localVarContentTypes); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } + + String[] localVarAuthNames = new String[] {"bearerAuth"}; + return localVarApiClient.buildCall( + basePath, + localVarPath, + "POST", + localVarQueryParams, + localVarCollectionQueryParams, + localVarPostBody, + localVarHeaderParams, + localVarCookieParams, + localVarFormParams, + localVarAuthNames, + _callback); + } + + @SuppressWarnings("rawtypes") + private okhttp3.Call searchOrgsValidateBeforeCall( + SearchOrgsRequest searchOrgsRequest, final ApiCallback _callback) throws ApiException { + // verify the required parameter 'searchOrgsRequest' is set + if (searchOrgsRequest == null) { + throw new ApiException( + "Missing the required parameter 'searchOrgsRequest' when calling" + + " searchOrgs(Async)"); + } + + return searchOrgsCall(searchOrgsRequest, _callback); + } + + /** + * Version: 9.0.0.cl or later Gets a list of Orgs configured on the ThoughtSpot system. To get + * details of a specific Org, specify the Org ID or name. You can also pass parameters such as + * status, visibility, and user identifiers to get a specific list of Orgs. Requires cluster + * administration (**Can administer Org**) privileges. If [Role-Based Access Control + * (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the + * `ORG_ADMINISTRATION` (**Can manage Orgs**) privilege is required. + * + * @param searchOrgsRequest (required) + * @return List<OrgResponse> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the + * response body + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 Organization search result. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public List searchOrgs(SearchOrgsRequest searchOrgsRequest) throws ApiException { + ApiResponse> localVarResp = searchOrgsWithHttpInfo(searchOrgsRequest); + return localVarResp.getData(); + } + + /** + * Version: 9.0.0.cl or later Gets a list of Orgs configured on the ThoughtSpot system. To get + * details of a specific Org, specify the Org ID or name. You can also pass parameters such as + * status, visibility, and user identifiers to get a specific list of Orgs. Requires cluster + * administration (**Can administer Org**) privileges. If [Role-Based Access Control + * (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the + * `ORG_ADMINISTRATION` (**Can manage Orgs**) privilege is required. + * + * @param searchOrgsRequest (required) + * @return ApiResponse<List<OrgResponse>> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the + * response body + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 Organization search result. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public ApiResponse> searchOrgsWithHttpInfo( + SearchOrgsRequest searchOrgsRequest) throws ApiException { + okhttp3.Call localVarCall = searchOrgsValidateBeforeCall(searchOrgsRequest, null); + Type localVarReturnType = new TypeToken>() {}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); + } + + /** + * (asynchronously) Version: 9.0.0.cl or later Gets a list of Orgs configured on the ThoughtSpot + * system. To get details of a specific Org, specify the Org ID or name. You can also pass + * parameters such as status, visibility, and user identifiers to get a specific list of Orgs. + * Requires cluster administration (**Can administer Org**) privileges. If [Role-Based Access + * Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, + * the `ORG_ADMINISTRATION` (**Can manage Orgs**) privilege is required. + * + * @param searchOrgsRequest (required) + * @param _callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body + * object + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 Organization search result. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public okhttp3.Call searchOrgsAsync( + SearchOrgsRequest searchOrgsRequest, final ApiCallback> _callback) + throws ApiException { + + okhttp3.Call localVarCall = searchOrgsValidateBeforeCall(searchOrgsRequest, _callback); + Type localVarReturnType = new TypeToken>() {}.getType(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; + } + /** + * Build call for searchRoles + * + * @param searchRolesRequest (required) + * @param _callback Callback for upload/download progress + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 Roles search result. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Internal error -
+ */ + public okhttp3.Call searchRolesCall( + SearchRolesRequest searchRolesRequest, final ApiCallback _callback) + throws ApiException { + String basePath = null; + // Operation Servers + String[] localBasePaths = new String[] {}; + + // Determine Base Path to Use + if (localCustomBaseUrl != null) { + basePath = localCustomBaseUrl; + } else if (localBasePaths.length > 0) { + basePath = localBasePaths[localHostIndex]; + } else { + basePath = null; + } + + Object localVarPostBody = searchRolesRequest; + + // create path and map variables + String localVarPath = "/api/rest/2.0/roles/search"; + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + final String[] localVarAccepts = {"application/json"}; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = {"application/json"}; + final String localVarContentType = + localVarApiClient.selectHeaderContentType(localVarContentTypes); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } + + String[] localVarAuthNames = new String[] {"bearerAuth"}; + return localVarApiClient.buildCall( + basePath, + localVarPath, + "POST", + localVarQueryParams, + localVarCollectionQueryParams, + localVarPostBody, + localVarHeaderParams, + localVarCookieParams, + localVarFormParams, + localVarAuthNames, + _callback); + } + + @SuppressWarnings("rawtypes") + private okhttp3.Call searchRolesValidateBeforeCall( + SearchRolesRequest searchRolesRequest, final ApiCallback _callback) + throws ApiException { + // verify the required parameter 'searchRolesRequest' is set + if (searchRolesRequest == null) { + throw new ApiException( + "Missing the required parameter 'searchRolesRequest' when calling" + + " searchRoles(Async)"); + } + + return searchRolesCall(searchRolesRequest, _callback); + } + + /** + * Version: 9.5.0.cl or later Gets a list of Role objects from the ThoughtSpot system. Available + * if [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is + * enabled on your instance. To search for Roles, the `ROLE_ADMINISTRATION` (**Can + * manage roles**) privilege is required. To get details of a specific Role object, specify the + * GUID or name. You can also filter the API response based on user group and Org identifiers, + * privileges assigned to the Role, and deprecation status. + * + * @param searchRolesRequest (required) + * @return List<SearchRoleResponse> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the + * response body + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 Roles search result. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Internal error -
+ */ + public List searchRoles(SearchRolesRequest searchRolesRequest) + throws ApiException { + ApiResponse> localVarResp = + searchRolesWithHttpInfo(searchRolesRequest); + return localVarResp.getData(); + } + + /** + * Version: 9.5.0.cl or later Gets a list of Role objects from the ThoughtSpot system. Available + * if [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is + * enabled on your instance. To search for Roles, the `ROLE_ADMINISTRATION` (**Can + * manage roles**) privilege is required. To get details of a specific Role object, specify the + * GUID or name. You can also filter the API response based on user group and Org identifiers, + * privileges assigned to the Role, and deprecation status. + * + * @param searchRolesRequest (required) + * @return ApiResponse<List<SearchRoleResponse>> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the + * response body + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 Roles search result. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Internal error -
+ */ + public ApiResponse> searchRolesWithHttpInfo( + SearchRolesRequest searchRolesRequest) throws ApiException { + okhttp3.Call localVarCall = searchRolesValidateBeforeCall(searchRolesRequest, null); + Type localVarReturnType = new TypeToken>() {}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); + } + + /** + * (asynchronously) Version: 9.5.0.cl or later Gets a list of Role objects from the ThoughtSpot + * system. Available if [Role-Based Access Control + * (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance. To search + * for Roles, the `ROLE_ADMINISTRATION` (**Can manage roles**) privilege is required. + * To get details of a specific Role object, specify the GUID or name. You can also filter the + * API response based on user group and Org identifiers, privileges assigned to the Role, and + * deprecation status. + * + * @param searchRolesRequest (required) + * @param _callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body + * object + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 Roles search result. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Internal error -
+ */ + public okhttp3.Call searchRolesAsync( + SearchRolesRequest searchRolesRequest, + final ApiCallback> _callback) + throws ApiException { + + okhttp3.Call localVarCall = searchRolesValidateBeforeCall(searchRolesRequest, _callback); + Type localVarReturnType = new TypeToken>() {}.getType(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; + } + /** + * Build call for searchSchedules + * + * @param searchSchedulesRequest (required) + * @param _callback Callback for upload/download progress + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 Schedule search result. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public okhttp3.Call searchSchedulesCall( + SearchSchedulesRequest searchSchedulesRequest, final ApiCallback _callback) + throws ApiException { + String basePath = null; + // Operation Servers + String[] localBasePaths = new String[] {}; + + // Determine Base Path to Use + if (localCustomBaseUrl != null) { + basePath = localCustomBaseUrl; + } else if (localBasePaths.length > 0) { + basePath = localBasePaths[localHostIndex]; + } else { + basePath = null; + } + + Object localVarPostBody = searchSchedulesRequest; + + // create path and map variables + String localVarPath = "/api/rest/2.0/schedules/search"; + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + final String[] localVarAccepts = {"application/json"}; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = {"application/json"}; + final String localVarContentType = + localVarApiClient.selectHeaderContentType(localVarContentTypes); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } + + String[] localVarAuthNames = new String[] {"bearerAuth"}; + return localVarApiClient.buildCall( + basePath, + localVarPath, + "POST", + localVarQueryParams, + localVarCollectionQueryParams, + localVarPostBody, + localVarHeaderParams, + localVarCookieParams, + localVarFormParams, + localVarAuthNames, + _callback); + } + + @SuppressWarnings("rawtypes") + private okhttp3.Call searchSchedulesValidateBeforeCall( + SearchSchedulesRequest searchSchedulesRequest, final ApiCallback _callback) + throws ApiException { + // verify the required parameter 'searchSchedulesRequest' is set + if (searchSchedulesRequest == null) { + throw new ApiException( + "Missing the required parameter 'searchSchedulesRequest' when calling" + + " searchSchedules(Async)"); + } + + return searchSchedulesCall(searchSchedulesRequest, _callback); + } + + /** + * Search Schedules Version: 9.4.0.cl or later Gets a list of scheduled jobs configured for a + * Liveboard. To get details of a specific scheduled job, specify the name or GUID of the + * scheduled job. Requires at least view access to Liveboards. **NOTE**: When filtering + * schedules by parameters other than `metadata`, set `record_size` to + * `-1` and `record_offset` to `0` for accurate results. + * + * @param searchSchedulesRequest (required) + * @return List<ResponseSchedule> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the + * response body + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 Schedule search result. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public List searchSchedules(SearchSchedulesRequest searchSchedulesRequest) + throws ApiException { + ApiResponse> localVarResp = + searchSchedulesWithHttpInfo(searchSchedulesRequest); + return localVarResp.getData(); + } + + /** + * Search Schedules Version: 9.4.0.cl or later Gets a list of scheduled jobs configured for a + * Liveboard. To get details of a specific scheduled job, specify the name or GUID of the + * scheduled job. Requires at least view access to Liveboards. **NOTE**: When filtering + * schedules by parameters other than `metadata`, set `record_size` to + * `-1` and `record_offset` to `0` for accurate results. + * + * @param searchSchedulesRequest (required) + * @return ApiResponse<List<ResponseSchedule>> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the + * response body + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 Schedule search result. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public ApiResponse> searchSchedulesWithHttpInfo( + SearchSchedulesRequest searchSchedulesRequest) throws ApiException { + okhttp3.Call localVarCall = searchSchedulesValidateBeforeCall(searchSchedulesRequest, null); + Type localVarReturnType = new TypeToken>() {}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); + } + + /** + * (asynchronously) Search Schedules Version: 9.4.0.cl or later Gets a list of scheduled jobs + * configured for a Liveboard. To get details of a specific scheduled job, specify the name or + * GUID of the scheduled job. Requires at least view access to Liveboards. **NOTE**: When + * filtering schedules by parameters other than `metadata`, set + * `record_size` to `-1` and `record_offset` to `0` for + * accurate results. + * + * @param searchSchedulesRequest (required) + * @param _callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body + * object + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 Schedule search result. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public okhttp3.Call searchSchedulesAsync( + SearchSchedulesRequest searchSchedulesRequest, + final ApiCallback> _callback) + throws ApiException { + + okhttp3.Call localVarCall = + searchSchedulesValidateBeforeCall(searchSchedulesRequest, _callback); + Type localVarReturnType = new TypeToken>() {}.getType(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; + } + /** + * Build call for searchSecuritySettings + * + * @param searchSecuritySettingsRequest (required) + * @param _callback Callback for upload/download progress + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 Successfully retrieved the list of security settings. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public okhttp3.Call searchSecuritySettingsCall( + SearchSecuritySettingsRequest searchSecuritySettingsRequest, + final ApiCallback _callback) + throws ApiException { + String basePath = null; + // Operation Servers + String[] localBasePaths = new String[] {}; + + // Determine Base Path to Use + if (localCustomBaseUrl != null) { + basePath = localCustomBaseUrl; + } else if (localBasePaths.length > 0) { + basePath = localBasePaths[localHostIndex]; + } else { + basePath = null; + } + + Object localVarPostBody = searchSecuritySettingsRequest; + + // create path and map variables + String localVarPath = "/api/rest/2.0/system/security-settings/search"; + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + final String[] localVarAccepts = {"application/json"}; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = {"application/json"}; + final String localVarContentType = + localVarApiClient.selectHeaderContentType(localVarContentTypes); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } + + String[] localVarAuthNames = new String[] {"bearerAuth"}; + return localVarApiClient.buildCall( + basePath, + localVarPath, + "POST", + localVarQueryParams, + localVarCollectionQueryParams, + localVarPostBody, + localVarHeaderParams, + localVarCookieParams, + localVarFormParams, + localVarAuthNames, + _callback); + } + + @SuppressWarnings("rawtypes") + private okhttp3.Call searchSecuritySettingsValidateBeforeCall( + SearchSecuritySettingsRequest searchSecuritySettingsRequest, + final ApiCallback _callback) + throws ApiException { + // verify the required parameter 'searchSecuritySettingsRequest' is set + if (searchSecuritySettingsRequest == null) { + throw new ApiException( + "Missing the required parameter 'searchSecuritySettingsRequest' when calling" + + " searchSecuritySettings(Async)"); + } + + return searchSecuritySettingsCall(searchSecuritySettingsRequest, _callback); + } + + /** + * Version: 26.2.0.cl or later Fetch security settings for your ThoughtSpot application + * instance. - Use `scope: CLUSTER` to retrieve cluster-level security settings, + * including CORS and CSP allowlists, SAML redirect URLs, and settings that control access to + * non-embedded pages. - Use `scope: ORG` to retrieve Org-level security settings. If + * your instance has [Orgs](https://docs.thoughtspot.com/cloud/latest/orgs-overview), this + * returns CORS and non-embed access settings specific to the Org. - If `scope` is not + * specified, returns both cluster and Org-specific settings based on user privileges. Requires + * `ADMINISTRATION` (**Can administer ThoughtSpot**) or `DEVELOPER` (**Has + * developer privilege**) privilege. See [Security + * Settings](https://developers.thoughtspot.com/docs/security-settings) for more details. + * + * @param searchSecuritySettingsRequest (required) + * @return SecuritySettingsResponse + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the + * response body + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 Successfully retrieved the list of security settings. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public SecuritySettingsResponse searchSecuritySettings( + SearchSecuritySettingsRequest searchSecuritySettingsRequest) throws ApiException { + ApiResponse localVarResp = + searchSecuritySettingsWithHttpInfo(searchSecuritySettingsRequest); + return localVarResp.getData(); + } + + /** + * Version: 26.2.0.cl or later Fetch security settings for your ThoughtSpot application + * instance. - Use `scope: CLUSTER` to retrieve cluster-level security settings, + * including CORS and CSP allowlists, SAML redirect URLs, and settings that control access to + * non-embedded pages. - Use `scope: ORG` to retrieve Org-level security settings. If + * your instance has [Orgs](https://docs.thoughtspot.com/cloud/latest/orgs-overview), this + * returns CORS and non-embed access settings specific to the Org. - If `scope` is not + * specified, returns both cluster and Org-specific settings based on user privileges. Requires + * `ADMINISTRATION` (**Can administer ThoughtSpot**) or `DEVELOPER` (**Has + * developer privilege**) privilege. See [Security + * Settings](https://developers.thoughtspot.com/docs/security-settings) for more details. + * + * @param searchSecuritySettingsRequest (required) + * @return ApiResponse<SecuritySettingsResponse> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the + * response body + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 Successfully retrieved the list of security settings. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public ApiResponse searchSecuritySettingsWithHttpInfo( + SearchSecuritySettingsRequest searchSecuritySettingsRequest) throws ApiException { + okhttp3.Call localVarCall = + searchSecuritySettingsValidateBeforeCall(searchSecuritySettingsRequest, null); + Type localVarReturnType = new TypeToken() {}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); + } + + /** + * (asynchronously) Version: 26.2.0.cl or later Fetch security settings for your ThoughtSpot + * application instance. - Use `scope: CLUSTER` to retrieve cluster-level security + * settings, including CORS and CSP allowlists, SAML redirect URLs, and settings that control + * access to non-embedded pages. - Use `scope: ORG` to retrieve Org-level security + * settings. If your instance has + * [Orgs](https://docs.thoughtspot.com/cloud/latest/orgs-overview), this returns CORS and + * non-embed access settings specific to the Org. - If `scope` is not specified, + * returns both cluster and Org-specific settings based on user privileges. Requires + * `ADMINISTRATION` (**Can administer ThoughtSpot**) or `DEVELOPER` (**Has + * developer privilege**) privilege. See [Security + * Settings](https://developers.thoughtspot.com/docs/security-settings) for more details. + * + * @param searchSecuritySettingsRequest (required) + * @param _callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body + * object + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 Successfully retrieved the list of security settings. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public okhttp3.Call searchSecuritySettingsAsync( + SearchSecuritySettingsRequest searchSecuritySettingsRequest, + final ApiCallback _callback) + throws ApiException { + + okhttp3.Call localVarCall = + searchSecuritySettingsValidateBeforeCall(searchSecuritySettingsRequest, _callback); + Type localVarReturnType = new TypeToken() {}.getType(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; + } + /** + * Build call for searchTags + * + * @param searchTagsRequest (required) + * @param _callback Callback for upload/download progress + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 Tags search result. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public okhttp3.Call searchTagsCall( + SearchTagsRequest searchTagsRequest, final ApiCallback _callback) throws ApiException { + String basePath = null; + // Operation Servers + String[] localBasePaths = new String[] {}; + + // Determine Base Path to Use + if (localCustomBaseUrl != null) { + basePath = localCustomBaseUrl; + } else if (localBasePaths.length > 0) { + basePath = localBasePaths[localHostIndex]; + } else { + basePath = null; + } + + Object localVarPostBody = searchTagsRequest; + + // create path and map variables + String localVarPath = "/api/rest/2.0/tags/search"; + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + final String[] localVarAccepts = {"application/json"}; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = {"application/json"}; + final String localVarContentType = + localVarApiClient.selectHeaderContentType(localVarContentTypes); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } + + String[] localVarAuthNames = new String[] {"bearerAuth"}; + return localVarApiClient.buildCall( + basePath, + localVarPath, + "POST", + localVarQueryParams, + localVarCollectionQueryParams, + localVarPostBody, + localVarHeaderParams, + localVarCookieParams, + localVarFormParams, + localVarAuthNames, + _callback); + } + + @SuppressWarnings("rawtypes") + private okhttp3.Call searchTagsValidateBeforeCall( + SearchTagsRequest searchTagsRequest, final ApiCallback _callback) throws ApiException { + // verify the required parameter 'searchTagsRequest' is set + if (searchTagsRequest == null) { + throw new ApiException( + "Missing the required parameter 'searchTagsRequest' when calling" + + " searchTags(Async)"); + } + + return searchTagsCall(searchTagsRequest, _callback); + } + + /** + * Version: 9.0.0.cl or later Gets a list of tag objects available on the ThoughtSpot system. To + * get details of a specific tag object, specify the GUID or name. Any authenticated user can + * search for tag objects. + * + * @param searchTagsRequest (required) + * @return List<Tag> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the + * response body + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 Tags search result. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public List searchTags(SearchTagsRequest searchTagsRequest) throws ApiException { + ApiResponse> localVarResp = searchTagsWithHttpInfo(searchTagsRequest); + return localVarResp.getData(); + } + + /** + * Version: 9.0.0.cl or later Gets a list of tag objects available on the ThoughtSpot system. To + * get details of a specific tag object, specify the GUID or name. Any authenticated user can + * search for tag objects. + * + * @param searchTagsRequest (required) + * @return ApiResponse<List<Tag>> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the + * response body + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 Tags search result. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public ApiResponse> searchTagsWithHttpInfo(SearchTagsRequest searchTagsRequest) + throws ApiException { + okhttp3.Call localVarCall = searchTagsValidateBeforeCall(searchTagsRequest, null); + Type localVarReturnType = new TypeToken>() {}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); + } + + /** + * (asynchronously) Version: 9.0.0.cl or later Gets a list of tag objects available on the + * ThoughtSpot system. To get details of a specific tag object, specify the GUID or name. Any + * authenticated user can search for tag objects. + * + * @param searchTagsRequest (required) + * @param _callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body + * object + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 Tags search result. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public okhttp3.Call searchTagsAsync( + SearchTagsRequest searchTagsRequest, final ApiCallback> _callback) + throws ApiException { + + okhttp3.Call localVarCall = searchTagsValidateBeforeCall(searchTagsRequest, _callback); + Type localVarReturnType = new TypeToken>() {}.getType(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; + } + /** + * Build call for searchUserGroups + * + * @param searchUserGroupsRequest (required) + * @param _callback Callback for upload/download progress + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 User group search result. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public okhttp3.Call searchUserGroupsCall( + SearchUserGroupsRequest searchUserGroupsRequest, final ApiCallback _callback) + throws ApiException { + String basePath = null; + // Operation Servers + String[] localBasePaths = new String[] {}; + + // Determine Base Path to Use + if (localCustomBaseUrl != null) { + basePath = localCustomBaseUrl; + } else if (localBasePaths.length > 0) { + basePath = localBasePaths[localHostIndex]; + } else { + basePath = null; + } + + Object localVarPostBody = searchUserGroupsRequest; + + // create path and map variables + String localVarPath = "/api/rest/2.0/groups/search"; + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + final String[] localVarAccepts = {"application/json"}; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = {"application/json"}; + final String localVarContentType = + localVarApiClient.selectHeaderContentType(localVarContentTypes); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } + + String[] localVarAuthNames = new String[] {"bearerAuth"}; + return localVarApiClient.buildCall( + basePath, + localVarPath, + "POST", + localVarQueryParams, + localVarCollectionQueryParams, + localVarPostBody, + localVarHeaderParams, + localVarCookieParams, + localVarFormParams, + localVarAuthNames, + _callback); + } + + @SuppressWarnings("rawtypes") + private okhttp3.Call searchUserGroupsValidateBeforeCall( + SearchUserGroupsRequest searchUserGroupsRequest, final ApiCallback _callback) + throws ApiException { + // verify the required parameter 'searchUserGroupsRequest' is set + if (searchUserGroupsRequest == null) { + throw new ApiException( + "Missing the required parameter 'searchUserGroupsRequest' when calling" + + " searchUserGroups(Async)"); + } + + return searchUserGroupsCall(searchUserGroupsRequest, _callback); + } + + /** + * Version: 9.0.0.cl or later Gets a list of user group objects from the ThoughtSpot system. To + * get details of a specific user group, specify the user group GUID or name. You can also + * filter the API response based on User ID, Org ID, Role ID, type of group, sharing visibility, + * privileges assigned to the group, and the Liveboard IDs assigned to the users in the group. + * Available to all users. Users with `ADMINISTRATION` (**Can administer + * ThoughtSpot**) privileges can view all users properties. If [Role-Based Access Control + * (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the + * `GROUP_ADMINISTRATION` (**Can manage groups**) privilege is required. **NOTE**: If + * you do not get precise results, try setting `record_size` to `-1` and + * `record_offset` to `0`. + * + * @param searchUserGroupsRequest (required) + * @return List<UserGroupResponse> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the + * response body + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 User group search result. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public List searchUserGroups(SearchUserGroupsRequest searchUserGroupsRequest) + throws ApiException { + ApiResponse> localVarResp = + searchUserGroupsWithHttpInfo(searchUserGroupsRequest); + return localVarResp.getData(); + } + + /** + * Version: 9.0.0.cl or later Gets a list of user group objects from the ThoughtSpot system. To + * get details of a specific user group, specify the user group GUID or name. You can also + * filter the API response based on User ID, Org ID, Role ID, type of group, sharing visibility, + * privileges assigned to the group, and the Liveboard IDs assigned to the users in the group. + * Available to all users. Users with `ADMINISTRATION` (**Can administer + * ThoughtSpot**) privileges can view all users properties. If [Role-Based Access Control + * (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the + * `GROUP_ADMINISTRATION` (**Can manage groups**) privilege is required. **NOTE**: If + * you do not get precise results, try setting `record_size` to `-1` and + * `record_offset` to `0`. + * + * @param searchUserGroupsRequest (required) + * @return ApiResponse<List<UserGroupResponse>> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the + * response body + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 User group search result. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public ApiResponse> searchUserGroupsWithHttpInfo( + SearchUserGroupsRequest searchUserGroupsRequest) throws ApiException { + okhttp3.Call localVarCall = + searchUserGroupsValidateBeforeCall(searchUserGroupsRequest, null); + Type localVarReturnType = new TypeToken>() {}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); + } + + /** + * (asynchronously) Version: 9.0.0.cl or later Gets a list of user group objects from the + * ThoughtSpot system. To get details of a specific user group, specify the user group GUID or + * name. You can also filter the API response based on User ID, Org ID, Role ID, type of group, + * sharing visibility, privileges assigned to the group, and the Liveboard IDs assigned to the + * users in the group. Available to all users. Users with `ADMINISTRATION` (**Can + * administer ThoughtSpot**) privileges can view all users properties. If [Role-Based Access + * Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, + * the `GROUP_ADMINISTRATION` (**Can manage groups**) privilege is required. **NOTE**: + * If you do not get precise results, try setting `record_size` to `-1` and + * `record_offset` to `0`. + * + * @param searchUserGroupsRequest (required) + * @param _callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body + * object + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 User group search result. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public okhttp3.Call searchUserGroupsAsync( + SearchUserGroupsRequest searchUserGroupsRequest, + final ApiCallback> _callback) + throws ApiException { + + okhttp3.Call localVarCall = + searchUserGroupsValidateBeforeCall(searchUserGroupsRequest, _callback); + Type localVarReturnType = new TypeToken>() {}.getType(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; + } + /** + * Build call for searchUsers + * + * @param searchUsersRequest (required) + * @param _callback Callback for upload/download progress + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 User search result. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public okhttp3.Call searchUsersCall( + SearchUsersRequest searchUsersRequest, final ApiCallback _callback) + throws ApiException { + String basePath = null; + // Operation Servers + String[] localBasePaths = new String[] {}; + + // Determine Base Path to Use + if (localCustomBaseUrl != null) { + basePath = localCustomBaseUrl; + } else if (localBasePaths.length > 0) { + basePath = localBasePaths[localHostIndex]; + } else { + basePath = null; + } + + Object localVarPostBody = searchUsersRequest; + + // create path and map variables + String localVarPath = "/api/rest/2.0/users/search"; + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + final String[] localVarAccepts = {"application/json"}; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = {"application/json"}; + final String localVarContentType = + localVarApiClient.selectHeaderContentType(localVarContentTypes); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } + + String[] localVarAuthNames = new String[] {"bearerAuth"}; + return localVarApiClient.buildCall( + basePath, + localVarPath, + "POST", + localVarQueryParams, + localVarCollectionQueryParams, + localVarPostBody, + localVarHeaderParams, + localVarCookieParams, + localVarFormParams, + localVarAuthNames, + _callback); + } + + @SuppressWarnings("rawtypes") + private okhttp3.Call searchUsersValidateBeforeCall( + SearchUsersRequest searchUsersRequest, final ApiCallback _callback) + throws ApiException { + // verify the required parameter 'searchUsersRequest' is set + if (searchUsersRequest == null) { + throw new ApiException( + "Missing the required parameter 'searchUsersRequest' when calling" + + " searchUsers(Async)"); + } + + return searchUsersCall(searchUsersRequest, _callback); + } + + /** + * Version: 9.0.0.cl or later Gets a list of users available on the ThoughtSpot system. To get + * details of a specific user, specify the user GUID or name. You can also filter the API + * response based on groups, Org ID, user visibility, account status, user type, and user + * preference settings and favorites. Available to all users. Users with + * `ADMINISTRATION` (**Can administer ThoughtSpot**) privileges can view all users + * properties. If [Role-Based Access Control + * (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the + * `USER_ADMINISTRATION` (**Can manage users**) privilege is required. **NOTE**: If + * the API returns an empty list, consider increasing the value of the `record_size` + * parameter. To search across all available users, set `record_size` to + * `-1`. + * + * @param searchUsersRequest (required) + * @return List<User> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the + * response body + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 User search result. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public List searchUsers(SearchUsersRequest searchUsersRequest) throws ApiException { + ApiResponse> localVarResp = searchUsersWithHttpInfo(searchUsersRequest); + return localVarResp.getData(); + } + + /** + * Version: 9.0.0.cl or later Gets a list of users available on the ThoughtSpot system. To get + * details of a specific user, specify the user GUID or name. You can also filter the API + * response based on groups, Org ID, user visibility, account status, user type, and user + * preference settings and favorites. Available to all users. Users with + * `ADMINISTRATION` (**Can administer ThoughtSpot**) privileges can view all users + * properties. If [Role-Based Access Control + * (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the + * `USER_ADMINISTRATION` (**Can manage users**) privilege is required. **NOTE**: If + * the API returns an empty list, consider increasing the value of the `record_size` + * parameter. To search across all available users, set `record_size` to + * `-1`. + * + * @param searchUsersRequest (required) + * @return ApiResponse<List<User>> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the + * response body + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 User search result. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public ApiResponse> searchUsersWithHttpInfo(SearchUsersRequest searchUsersRequest) + throws ApiException { + okhttp3.Call localVarCall = searchUsersValidateBeforeCall(searchUsersRequest, null); + Type localVarReturnType = new TypeToken>() {}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); + } + + /** + * (asynchronously) Version: 9.0.0.cl or later Gets a list of users available on the ThoughtSpot + * system. To get details of a specific user, specify the user GUID or name. You can also filter + * the API response based on groups, Org ID, user visibility, account status, user type, and + * user preference settings and favorites. Available to all users. Users with + * `ADMINISTRATION` (**Can administer ThoughtSpot**) privileges can view all users + * properties. If [Role-Based Access Control + * (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the + * `USER_ADMINISTRATION` (**Can manage users**) privilege is required. **NOTE**: If + * the API returns an empty list, consider increasing the value of the `record_size` + * parameter. To search across all available users, set `record_size` to + * `-1`. + * + * @param searchUsersRequest (required) + * @param _callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body + * object + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 User search result. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public okhttp3.Call searchUsersAsync( + SearchUsersRequest searchUsersRequest, final ApiCallback> _callback) + throws ApiException { + + okhttp3.Call localVarCall = searchUsersValidateBeforeCall(searchUsersRequest, _callback); + Type localVarReturnType = new TypeToken>() {}.getType(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; + } + /** + * Build call for searchVariables + * + * @param searchVariablesRequest (required) + * @param _callback Callback for upload/download progress + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 List of variables is successful. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public okhttp3.Call searchVariablesCall( + SearchVariablesRequest searchVariablesRequest, final ApiCallback _callback) + throws ApiException { + String basePath = null; + // Operation Servers + String[] localBasePaths = new String[] {}; + + // Determine Base Path to Use + if (localCustomBaseUrl != null) { + basePath = localCustomBaseUrl; + } else if (localBasePaths.length > 0) { + basePath = localBasePaths[localHostIndex]; + } else { + basePath = null; + } + + Object localVarPostBody = searchVariablesRequest; + + // create path and map variables + String localVarPath = "/api/rest/2.0/template/variables/search"; + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + final String[] localVarAccepts = {"application/json"}; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = {"application/json"}; + final String localVarContentType = + localVarApiClient.selectHeaderContentType(localVarContentTypes); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } + + String[] localVarAuthNames = new String[] {"bearerAuth"}; + return localVarApiClient.buildCall( + basePath, + localVarPath, + "POST", + localVarQueryParams, + localVarCollectionQueryParams, + localVarPostBody, + localVarHeaderParams, + localVarCookieParams, + localVarFormParams, + localVarAuthNames, + _callback); + } + + @SuppressWarnings("rawtypes") + private okhttp3.Call searchVariablesValidateBeforeCall( + SearchVariablesRequest searchVariablesRequest, final ApiCallback _callback) + throws ApiException { + // verify the required parameter 'searchVariablesRequest' is set + if (searchVariablesRequest == null) { + throw new ApiException( + "Missing the required parameter 'searchVariablesRequest' when calling" + + " searchVariables(Async)"); + } + + return searchVariablesCall(searchVariablesRequest, _callback); + } + + /** + * Search variables Version: 26.4.0.cl or later Allows searching for variables in ThoughtSpot. + * Requires ADMINISTRATION role. The CAN_MANAGE_VARIABLES permission allows you to manage + * Formula Variables in the current organization scope. The API endpoint supports searching + * variables by: * Variable identifier (ID or name) * Variable type * Name pattern + * (case-insensitive, supports % for wildcard) The search results can be formatted in three + * ways: * METADATA - Returns only variable metadata (default) * METADATA_AND_VALUES - Returns + * variable metadata and values The values can be filtered by scope: * org_identifier * + * principal_identifier * model_identifier + * + * @param searchVariablesRequest (required) + * @return List<Variable> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the + * response body + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 List of variables is successful. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public List searchVariables(SearchVariablesRequest searchVariablesRequest) + throws ApiException { + ApiResponse> localVarResp = + searchVariablesWithHttpInfo(searchVariablesRequest); + return localVarResp.getData(); + } + + /** + * Search variables Version: 26.4.0.cl or later Allows searching for variables in ThoughtSpot. + * Requires ADMINISTRATION role. The CAN_MANAGE_VARIABLES permission allows you to manage + * Formula Variables in the current organization scope. The API endpoint supports searching + * variables by: * Variable identifier (ID or name) * Variable type * Name pattern + * (case-insensitive, supports % for wildcard) The search results can be formatted in three + * ways: * METADATA - Returns only variable metadata (default) * METADATA_AND_VALUES - Returns + * variable metadata and values The values can be filtered by scope: * org_identifier * + * principal_identifier * model_identifier + * + * @param searchVariablesRequest (required) + * @return ApiResponse<List<Variable>> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the + * response body + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 List of variables is successful. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public ApiResponse> searchVariablesWithHttpInfo( + SearchVariablesRequest searchVariablesRequest) throws ApiException { + okhttp3.Call localVarCall = searchVariablesValidateBeforeCall(searchVariablesRequest, null); + Type localVarReturnType = new TypeToken>() {}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); + } + + /** + * (asynchronously) Search variables Version: 26.4.0.cl or later Allows searching for variables + * in ThoughtSpot. Requires ADMINISTRATION role. The CAN_MANAGE_VARIABLES permission allows you + * to manage Formula Variables in the current organization scope. The API endpoint supports + * searching variables by: * Variable identifier (ID or name) * Variable type * Name pattern + * (case-insensitive, supports % for wildcard) The search results can be formatted in three + * ways: * METADATA - Returns only variable metadata (default) * METADATA_AND_VALUES - Returns + * variable metadata and values The values can be filtered by scope: * org_identifier * + * principal_identifier * model_identifier + * + * @param searchVariablesRequest (required) + * @param _callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body + * object + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 List of variables is successful. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public okhttp3.Call searchVariablesAsync( + SearchVariablesRequest searchVariablesRequest, + final ApiCallback> _callback) + throws ApiException { + + okhttp3.Call localVarCall = + searchVariablesValidateBeforeCall(searchVariablesRequest, _callback); + Type localVarReturnType = new TypeToken>() {}.getType(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; + } + /** + * Build call for searchWebhookConfigurations + * + * @param searchWebhookConfigurationsRequest (required) + * @param _callback Callback for upload/download progress + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 Webhook configurations retrieved successfully -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public okhttp3.Call searchWebhookConfigurationsCall( + SearchWebhookConfigurationsRequest searchWebhookConfigurationsRequest, + final ApiCallback _callback) + throws ApiException { + String basePath = null; + // Operation Servers + String[] localBasePaths = new String[] {}; + + // Determine Base Path to Use + if (localCustomBaseUrl != null) { + basePath = localCustomBaseUrl; + } else if (localBasePaths.length > 0) { + basePath = localBasePaths[localHostIndex]; + } else { + basePath = null; + } + + Object localVarPostBody = searchWebhookConfigurationsRequest; + + // create path and map variables + String localVarPath = "/api/rest/2.0/webhooks/search"; + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + final String[] localVarAccepts = {"application/json"}; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = {"application/json"}; + final String localVarContentType = + localVarApiClient.selectHeaderContentType(localVarContentTypes); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } + + String[] localVarAuthNames = new String[] {"bearerAuth"}; + return localVarApiClient.buildCall( + basePath, + localVarPath, + "POST", + localVarQueryParams, + localVarCollectionQueryParams, + localVarPostBody, + localVarHeaderParams, + localVarCookieParams, + localVarFormParams, + localVarAuthNames, + _callback); + } + + @SuppressWarnings("rawtypes") + private okhttp3.Call searchWebhookConfigurationsValidateBeforeCall( + SearchWebhookConfigurationsRequest searchWebhookConfigurationsRequest, + final ApiCallback _callback) + throws ApiException { + // verify the required parameter 'searchWebhookConfigurationsRequest' is set + if (searchWebhookConfigurationsRequest == null) { + throw new ApiException( + "Missing the required parameter 'searchWebhookConfigurationsRequest' when" + + " calling searchWebhookConfigurations(Async)"); + } + + return searchWebhookConfigurationsCall(searchWebhookConfigurationsRequest, _callback); + } + + /** + * Version: 10.14.0.cl or later Searches for webhook configurations based on various criteria + * such as Org, webhook identifier, event type, with support for pagination and sorting. Returns + * matching webhook configurations with their complete details. Requires + * `ADMINISTRATION` (**Can administer ThoughtSpot**) or `DEVELOPER` (**Has + * developer privilege**) privilege. If [Role-Based Access Control + * (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, users with + * `CAN_MANAGE_WEBHOOKS` (**Can manage webhooks**) privilege are also authorized to + * perform this action. + * + * @param searchWebhookConfigurationsRequest (required) + * @return WebhookSearchResponse + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the + * response body + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 Webhook configurations retrieved successfully -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public WebhookSearchResponse searchWebhookConfigurations( + SearchWebhookConfigurationsRequest searchWebhookConfigurationsRequest) + throws ApiException { + ApiResponse localVarResp = + searchWebhookConfigurationsWithHttpInfo(searchWebhookConfigurationsRequest); + return localVarResp.getData(); + } + + /** + * Version: 10.14.0.cl or later Searches for webhook configurations based on various criteria + * such as Org, webhook identifier, event type, with support for pagination and sorting. Returns + * matching webhook configurations with their complete details. Requires + * `ADMINISTRATION` (**Can administer ThoughtSpot**) or `DEVELOPER` (**Has + * developer privilege**) privilege. If [Role-Based Access Control + * (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, users with + * `CAN_MANAGE_WEBHOOKS` (**Can manage webhooks**) privilege are also authorized to + * perform this action. + * + * @param searchWebhookConfigurationsRequest (required) + * @return ApiResponse<WebhookSearchResponse> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the + * response body + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 Webhook configurations retrieved successfully -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public ApiResponse searchWebhookConfigurationsWithHttpInfo( + SearchWebhookConfigurationsRequest searchWebhookConfigurationsRequest) + throws ApiException { + okhttp3.Call localVarCall = + searchWebhookConfigurationsValidateBeforeCall( + searchWebhookConfigurationsRequest, null); + Type localVarReturnType = new TypeToken() {}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); + } + + /** + * (asynchronously) Version: 10.14.0.cl or later Searches for webhook configurations based on + * various criteria such as Org, webhook identifier, event type, with support for pagination and + * sorting. Returns matching webhook configurations with their complete details. Requires + * `ADMINISTRATION` (**Can administer ThoughtSpot**) or `DEVELOPER` (**Has + * developer privilege**) privilege. If [Role-Based Access Control + * (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, users with + * `CAN_MANAGE_WEBHOOKS` (**Can manage webhooks**) privilege are also authorized to + * perform this action. + * + * @param searchWebhookConfigurationsRequest (required) + * @param _callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body + * object + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 Webhook configurations retrieved successfully -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public okhttp3.Call searchWebhookConfigurationsAsync( + SearchWebhookConfigurationsRequest searchWebhookConfigurationsRequest, + final ApiCallback _callback) + throws ApiException { + + okhttp3.Call localVarCall = + searchWebhookConfigurationsValidateBeforeCall( + searchWebhookConfigurationsRequest, _callback); + Type localVarReturnType = new TypeToken() {}.getType(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; + } + /** + * Build call for sendAgentConversationMessage + * + * @param conversationIdentifier Unique identifier for the conversation (used to track context) + * (required) + * @param sendAgentConversationMessageRequest (required) + * @param _callback Callback for upload/download progress + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + * @http.response.details + * + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 Common successful response -
201 Common error response -
400 Operation failed -
401 Unauthorized access. -
403 Forbidden access. -
500 Operation failed -
+ */ + public okhttp3.Call sendAgentConversationMessageCall( + String conversationIdentifier, + SendAgentConversationMessageRequest sendAgentConversationMessageRequest, + final ApiCallback _callback) + throws ApiException { + String basePath = null; + // Operation Servers + String[] localBasePaths = new String[] {}; + + // Determine Base Path to Use + if (localCustomBaseUrl != null) { + basePath = localCustomBaseUrl; + } else if (localBasePaths.length > 0) { + basePath = localBasePaths[localHostIndex]; + } else { + basePath = null; + } + + Object localVarPostBody = sendAgentConversationMessageRequest; + + // create path and map variables + String localVarPath = + "/api/rest/2.0/ai/agent/conversation/{conversation_identifier}/send" + .replace( + "{" + "conversation_identifier" + "}", + localVarApiClient.escapeString(conversationIdentifier.toString())); + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + final String[] localVarAccepts = {"application/json"}; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = {"application/json"}; + final String localVarContentType = + localVarApiClient.selectHeaderContentType(localVarContentTypes); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } + + String[] localVarAuthNames = new String[] {"bearerAuth"}; + return localVarApiClient.buildCall( + basePath, + localVarPath, + "POST", + localVarQueryParams, + localVarCollectionQueryParams, + localVarPostBody, + localVarHeaderParams, + localVarCookieParams, + localVarFormParams, + localVarAuthNames, + _callback); + } + + @SuppressWarnings("rawtypes") + private okhttp3.Call sendAgentConversationMessageValidateBeforeCall( + String conversationIdentifier, + SendAgentConversationMessageRequest sendAgentConversationMessageRequest, + final ApiCallback _callback) + throws ApiException { + // verify the required parameter 'conversationIdentifier' is set + if (conversationIdentifier == null) { + throw new ApiException( + "Missing the required parameter 'conversationIdentifier' when calling" + + " sendAgentConversationMessage(Async)"); + } + + // verify the required parameter 'sendAgentConversationMessageRequest' is set + if (sendAgentConversationMessageRequest == null) { + throw new ApiException( + "Missing the required parameter 'sendAgentConversationMessageRequest' when" + + " calling sendAgentConversationMessage(Async)"); + } + + return sendAgentConversationMessageCall( + conversationIdentifier, sendAgentConversationMessageRequest, _callback); + } + + /** + * Version: 26.5.0.cl or later Sends natural language messages to an existing Spotter agent + * conversation and returns the complete response synchronously. Requires + * `CAN_USE_SPOTTER` privilege and access to the metadata object associated with the + * conversation. The user must have access to the conversation session referenced by + * `conversation_identifier`. A conversation must first be created using the + * `createAgentConversation` API. #### Usage guidelines The request must include: - + * `conversation_identifier`: the unique session ID returned by + * `createAgentConversation`, used for context continuity and message tracking - + * `messages`: an array of one or more text messages to send to the agent The API + * returns an array of response objects, each containing: - `type`: the kind of + * response — `text`, `answer`, or `error` - `message`: + * the main content of the response - `metadata`: additional information depending on + * the message type (e.g., answer metadata includes analytics and visualization details) #### + * Error responses | Code | Description | + * |------|----------------------------------------------------------------------------------------------------------------------------------| + * | 401 | Unauthorized — authentication token is missing, expired, or invalid. | | 403 | + * Forbidden — the authenticated user does not have `CAN_USE_SPOTTER` privilege or + * lacks permission on the referenced conversation. | > ###### Note: > > - This + * endpoint is Generally Available from version 26.5.0.cl. > - This endpoint requires Spotter + * - please contact ThoughtSpot support to enable Spotter on your cluster. > - For real-time + * streamed responses, use `sendAgentConversationMessageStreaming` instead. + * + * @param conversationIdentifier Unique identifier for the conversation (used to track context) + * (required) + * @param sendAgentConversationMessageRequest (required) + * @return Object + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the + * response body + * @http.response.details + * + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 Common successful response -
201 Common error response -
400 Operation failed -
401 Unauthorized access. -
403 Forbidden access. -
500 Operation failed -
+ */ + public Object sendAgentConversationMessage( + String conversationIdentifier, + SendAgentConversationMessageRequest sendAgentConversationMessageRequest) + throws ApiException { + ApiResponse localVarResp = + sendAgentConversationMessageWithHttpInfo( + conversationIdentifier, sendAgentConversationMessageRequest); + return localVarResp.getData(); + } + + /** + * Version: 26.5.0.cl or later Sends natural language messages to an existing Spotter agent + * conversation and returns the complete response synchronously. Requires + * `CAN_USE_SPOTTER` privilege and access to the metadata object associated with the + * conversation. The user must have access to the conversation session referenced by + * `conversation_identifier`. A conversation must first be created using the + * `createAgentConversation` API. #### Usage guidelines The request must include: - + * `conversation_identifier`: the unique session ID returned by + * `createAgentConversation`, used for context continuity and message tracking - + * `messages`: an array of one or more text messages to send to the agent The API + * returns an array of response objects, each containing: - `type`: the kind of + * response — `text`, `answer`, or `error` - `message`: + * the main content of the response - `metadata`: additional information depending on + * the message type (e.g., answer metadata includes analytics and visualization details) #### + * Error responses | Code | Description | + * |------|----------------------------------------------------------------------------------------------------------------------------------| + * | 401 | Unauthorized — authentication token is missing, expired, or invalid. | | 403 | + * Forbidden — the authenticated user does not have `CAN_USE_SPOTTER` privilege or + * lacks permission on the referenced conversation. | > ###### Note: > > - This + * endpoint is Generally Available from version 26.5.0.cl. > - This endpoint requires Spotter + * - please contact ThoughtSpot support to enable Spotter on your cluster. > - For real-time + * streamed responses, use `sendAgentConversationMessageStreaming` instead. + * + * @param conversationIdentifier Unique identifier for the conversation (used to track context) + * (required) + * @param sendAgentConversationMessageRequest (required) + * @return ApiResponse<Object> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the + * response body + * @http.response.details + * + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 Common successful response -
201 Common error response -
400 Operation failed -
401 Unauthorized access. -
403 Forbidden access. -
500 Operation failed -
+ */ + public ApiResponse sendAgentConversationMessageWithHttpInfo( + String conversationIdentifier, + SendAgentConversationMessageRequest sendAgentConversationMessageRequest) + throws ApiException { + okhttp3.Call localVarCall = + sendAgentConversationMessageValidateBeforeCall( + conversationIdentifier, sendAgentConversationMessageRequest, null); + Type localVarReturnType = new TypeToken() {}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); + } + + /** + * (asynchronously) Version: 26.5.0.cl or later Sends natural language messages to an existing + * Spotter agent conversation and returns the complete response synchronously. Requires + * `CAN_USE_SPOTTER` privilege and access to the metadata object associated with the + * conversation. The user must have access to the conversation session referenced by + * `conversation_identifier`. A conversation must first be created using the + * `createAgentConversation` API. #### Usage guidelines The request must include: - + * `conversation_identifier`: the unique session ID returned by + * `createAgentConversation`, used for context continuity and message tracking - + * `messages`: an array of one or more text messages to send to the agent The API + * returns an array of response objects, each containing: - `type`: the kind of + * response — `text`, `answer`, or `error` - `message`: + * the main content of the response - `metadata`: additional information depending on + * the message type (e.g., answer metadata includes analytics and visualization details) #### + * Error responses | Code | Description | + * |------|----------------------------------------------------------------------------------------------------------------------------------| + * | 401 | Unauthorized — authentication token is missing, expired, or invalid. | | 403 | + * Forbidden — the authenticated user does not have `CAN_USE_SPOTTER` privilege or + * lacks permission on the referenced conversation. | > ###### Note: > > - This + * endpoint is Generally Available from version 26.5.0.cl. > - This endpoint requires Spotter + * - please contact ThoughtSpot support to enable Spotter on your cluster. > - For real-time + * streamed responses, use `sendAgentConversationMessageStreaming` instead. + * + * @param conversationIdentifier Unique identifier for the conversation (used to track context) + * (required) + * @param sendAgentConversationMessageRequest (required) + * @param _callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body + * object + * @http.response.details + * + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 Common successful response -
201 Common error response -
400 Operation failed -
401 Unauthorized access. -
403 Forbidden access. -
500 Operation failed -
+ */ + public okhttp3.Call sendAgentConversationMessageAsync( + String conversationIdentifier, + SendAgentConversationMessageRequest sendAgentConversationMessageRequest, + final ApiCallback _callback) + throws ApiException { + + okhttp3.Call localVarCall = + sendAgentConversationMessageValidateBeforeCall( + conversationIdentifier, sendAgentConversationMessageRequest, _callback); + Type localVarReturnType = new TypeToken() {}.getType(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; + } + /** + * Build call for sendAgentConversationMessageStreaming + * + * @param conversationIdentifier Unique identifier for the conversation (used to track context) + * (required) + * @param sendAgentConversationMessageStreamingRequest (required) + * @param _callback Callback for upload/download progress + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + * @http.response.details + * + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 Common successful response -
201 Common error response -
400 Operation failed -
401 Unauthorized access. -
403 Forbidden access. -
500 Operation failed -
+ */ + public okhttp3.Call sendAgentConversationMessageStreamingCall( + String conversationIdentifier, + SendAgentConversationMessageStreamingRequest + sendAgentConversationMessageStreamingRequest, + final ApiCallback _callback) + throws ApiException { + String basePath = null; + // Operation Servers + String[] localBasePaths = new String[] {}; + + // Determine Base Path to Use + if (localCustomBaseUrl != null) { + basePath = localCustomBaseUrl; + } else if (localBasePaths.length > 0) { + basePath = localBasePaths[localHostIndex]; + } else { + basePath = null; + } + + Object localVarPostBody = sendAgentConversationMessageStreamingRequest; + + // create path and map variables + String localVarPath = + "/api/rest/2.0/ai/agent/conversation/{conversation_identifier}/send/stream" + .replace( + "{" + "conversation_identifier" + "}", + localVarApiClient.escapeString(conversationIdentifier.toString())); + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + final String[] localVarAccepts = {"application/json"}; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = {"application/json"}; + final String localVarContentType = + localVarApiClient.selectHeaderContentType(localVarContentTypes); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } + + String[] localVarAuthNames = new String[] {"bearerAuth"}; + return localVarApiClient.buildCall( + basePath, + localVarPath, + "POST", + localVarQueryParams, + localVarCollectionQueryParams, + localVarPostBody, + localVarHeaderParams, + localVarCookieParams, + localVarFormParams, + localVarAuthNames, + _callback); + } + + @SuppressWarnings("rawtypes") + private okhttp3.Call sendAgentConversationMessageStreamingValidateBeforeCall( + String conversationIdentifier, + SendAgentConversationMessageStreamingRequest + sendAgentConversationMessageStreamingRequest, + final ApiCallback _callback) + throws ApiException { + // verify the required parameter 'conversationIdentifier' is set + if (conversationIdentifier == null) { + throw new ApiException( + "Missing the required parameter 'conversationIdentifier' when calling" + + " sendAgentConversationMessageStreaming(Async)"); + } + + // verify the required parameter 'sendAgentConversationMessageStreamingRequest' is set + if (sendAgentConversationMessageStreamingRequest == null) { + throw new ApiException( + "Missing the required parameter 'sendAgentConversationMessageStreamingRequest'" + + " when calling sendAgentConversationMessageStreaming(Async)"); + } + + return sendAgentConversationMessageStreamingCall( + conversationIdentifier, sendAgentConversationMessageStreamingRequest, _callback); + } + + /** + * Version: 26.5.0.cl or later Sends one or more natural language messages to an existing + * Spotter agent conversation and returns the response as a real-time Server-Sent Events stream. + * Requires `CAN_USE_SPOTTER` privilege and access to the metadata object associated + * with the conversation. The user must have access to the conversation session referenced by + * `conversation_identifier`. A conversation must first be created using the + * `createAgentConversation` API. #### Usage guidelines The request must include: - + * `conversation_identifier`: the unique session ID returned by + * `createAgentConversation`, used for context continuity and message tracking - + * `messages`: an array of one or more text messages to send to the agent If the + * request is valid, the API returns a Server-Sent Events (SSE) stream. Each line has the form + * `data: [{\"type\": \"...\", ...}]` — a JSON array of event + * objects. Event types include: - `ack`: confirms receipt of the request + * (`node_id`) - `conv_title`: conversation title (`title`, + * `conv_id`) - `notification`: status updates on operations + * (`group_id`, `metadata`, `code` — e.g. + * `TOOL_CALL_NOTIFICATION`, `nls_start`, + * `FINAL_RESPONSE_NOTIFICATION`) - `text-chunk`: incremental content chunks + * (`id`, `group_id`, `metadata` with `format` and + * `type` such as `thinking` or `text`, `content`) - + * `text`: full text block with same structure as `text-chunk` - + * `answer`: structured answer with metadata (`id`, `group_id`, + * `metadata` with `sage_query`, `session_id`, `title`, + * etc., `title`) - `error`: if a failure occurs #### Error responses | Code + * | Description | | ---- | + * -------------------------------------------------------------------------------------------------------------------------------- + * | | 401 | Unauthorized — authentication token is missing, expired, or invalid. | | 403 | + * Forbidden — the authenticated user does not have `CAN_USE_SPOTTER` privilege or + * lacks permission on the referenced conversation. | > ###### Note: > > - This + * endpoint is Generally Available from version 26.5.0.cl. > - This endpoint requires Spotter + * - please contact ThoughtSpot support to enable Spotter on your cluster. > - The streaming + * protocol uses Server-Sent Events (SSE). > - For the complete response in a single payload, + * use `sendAgentConversationMessage` instead. + * + * @param conversationIdentifier Unique identifier for the conversation (used to track context) + * (required) + * @param sendAgentConversationMessageStreamingRequest (required) + * @return SendAgentMessageResponse + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the + * response body + * @http.response.details + * + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 Common successful response -
201 Common error response -
400 Operation failed -
401 Unauthorized access. -
403 Forbidden access. -
500 Operation failed -
+ */ + public SendAgentMessageResponse sendAgentConversationMessageStreaming( + String conversationIdentifier, + SendAgentConversationMessageStreamingRequest + sendAgentConversationMessageStreamingRequest) + throws ApiException { + ApiResponse localVarResp = + sendAgentConversationMessageStreamingWithHttpInfo( + conversationIdentifier, sendAgentConversationMessageStreamingRequest); + return localVarResp.getData(); + } + + /** + * Version: 26.5.0.cl or later Sends one or more natural language messages to an existing + * Spotter agent conversation and returns the response as a real-time Server-Sent Events stream. + * Requires `CAN_USE_SPOTTER` privilege and access to the metadata object associated + * with the conversation. The user must have access to the conversation session referenced by + * `conversation_identifier`. A conversation must first be created using the + * `createAgentConversation` API. #### Usage guidelines The request must include: - + * `conversation_identifier`: the unique session ID returned by + * `createAgentConversation`, used for context continuity and message tracking - + * `messages`: an array of one or more text messages to send to the agent If the + * request is valid, the API returns a Server-Sent Events (SSE) stream. Each line has the form + * `data: [{\"type\": \"...\", ...}]` — a JSON array of event + * objects. Event types include: - `ack`: confirms receipt of the request + * (`node_id`) - `conv_title`: conversation title (`title`, + * `conv_id`) - `notification`: status updates on operations + * (`group_id`, `metadata`, `code` — e.g. + * `TOOL_CALL_NOTIFICATION`, `nls_start`, + * `FINAL_RESPONSE_NOTIFICATION`) - `text-chunk`: incremental content chunks + * (`id`, `group_id`, `metadata` with `format` and + * `type` such as `thinking` or `text`, `content`) - + * `text`: full text block with same structure as `text-chunk` - + * `answer`: structured answer with metadata (`id`, `group_id`, + * `metadata` with `sage_query`, `session_id`, `title`, + * etc., `title`) - `error`: if a failure occurs #### Error responses | Code + * | Description | | ---- | + * -------------------------------------------------------------------------------------------------------------------------------- + * | | 401 | Unauthorized — authentication token is missing, expired, or invalid. | | 403 | + * Forbidden — the authenticated user does not have `CAN_USE_SPOTTER` privilege or + * lacks permission on the referenced conversation. | > ###### Note: > > - This + * endpoint is Generally Available from version 26.5.0.cl. > - This endpoint requires Spotter + * - please contact ThoughtSpot support to enable Spotter on your cluster. > - The streaming + * protocol uses Server-Sent Events (SSE). > - For the complete response in a single payload, + * use `sendAgentConversationMessage` instead. + * + * @param conversationIdentifier Unique identifier for the conversation (used to track context) + * (required) + * @param sendAgentConversationMessageStreamingRequest (required) + * @return ApiResponse<SendAgentMessageResponse> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the + * response body + * @http.response.details + * + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 Common successful response -
201 Common error response -
400 Operation failed -
401 Unauthorized access. -
403 Forbidden access. -
500 Operation failed -
+ */ + public ApiResponse sendAgentConversationMessageStreamingWithHttpInfo( + String conversationIdentifier, + SendAgentConversationMessageStreamingRequest + sendAgentConversationMessageStreamingRequest) + throws ApiException { + okhttp3.Call localVarCall = + sendAgentConversationMessageStreamingValidateBeforeCall( + conversationIdentifier, sendAgentConversationMessageStreamingRequest, null); + Type localVarReturnType = new TypeToken() {}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); + } + + /** + * (asynchronously) Version: 26.5.0.cl or later Sends one or more natural language messages to + * an existing Spotter agent conversation and returns the response as a real-time Server-Sent + * Events stream. Requires `CAN_USE_SPOTTER` privilege and access to the metadata + * object associated with the conversation. The user must have access to the conversation + * session referenced by `conversation_identifier`. A conversation must first be + * created using the `createAgentConversation` API. #### Usage guidelines The request + * must include: - `conversation_identifier`: the unique session ID returned by + * `createAgentConversation`, used for context continuity and message tracking - + * `messages`: an array of one or more text messages to send to the agent If the + * request is valid, the API returns a Server-Sent Events (SSE) stream. Each line has the form + * `data: [{\"type\": \"...\", ...}]` — a JSON array of event + * objects. Event types include: - `ack`: confirms receipt of the request + * (`node_id`) - `conv_title`: conversation title (`title`, + * `conv_id`) - `notification`: status updates on operations + * (`group_id`, `metadata`, `code` — e.g. + * `TOOL_CALL_NOTIFICATION`, `nls_start`, + * `FINAL_RESPONSE_NOTIFICATION`) - `text-chunk`: incremental content chunks + * (`id`, `group_id`, `metadata` with `format` and + * `type` such as `thinking` or `text`, `content`) - + * `text`: full text block with same structure as `text-chunk` - + * `answer`: structured answer with metadata (`id`, `group_id`, + * `metadata` with `sage_query`, `session_id`, `title`, + * etc., `title`) - `error`: if a failure occurs #### Error responses | Code + * | Description | | ---- | + * -------------------------------------------------------------------------------------------------------------------------------- + * | | 401 | Unauthorized — authentication token is missing, expired, or invalid. | | 403 | + * Forbidden — the authenticated user does not have `CAN_USE_SPOTTER` privilege or + * lacks permission on the referenced conversation. | > ###### Note: > > - This + * endpoint is Generally Available from version 26.5.0.cl. > - This endpoint requires Spotter + * - please contact ThoughtSpot support to enable Spotter on your cluster. > - The streaming + * protocol uses Server-Sent Events (SSE). > - For the complete response in a single payload, + * use `sendAgentConversationMessage` instead. + * + * @param conversationIdentifier Unique identifier for the conversation (used to track context) + * (required) + * @param sendAgentConversationMessageStreamingRequest (required) + * @param _callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body + * object + * @http.response.details + * + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 Common successful response -
201 Common error response -
400 Operation failed -
401 Unauthorized access. -
403 Forbidden access. -
500 Operation failed -
+ */ + public okhttp3.Call sendAgentConversationMessageStreamingAsync( + String conversationIdentifier, + SendAgentConversationMessageStreamingRequest + sendAgentConversationMessageStreamingRequest, + final ApiCallback _callback) + throws ApiException { + + okhttp3.Call localVarCall = + sendAgentConversationMessageStreamingValidateBeforeCall( + conversationIdentifier, + sendAgentConversationMessageStreamingRequest, + _callback); + Type localVarReturnType = new TypeToken() {}.getType(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; + } + /** + * Build call for sendAgentMessage + * + * @param conversationIdentifier Unique identifier for the conversation (used to track context) + * (required) + * @param sendAgentMessageRequest (required) + * @param _callback Callback for upload/download progress + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + * @http.response.details + * + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 Common successful response -
201 Common error response -
400 Operation failed -
401 Unauthorized access. -
403 Forbidden access. -
500 Operation failed -
+ * + * @deprecated + */ + @Deprecated + public okhttp3.Call sendAgentMessageCall( + String conversationIdentifier, + SendAgentMessageRequest sendAgentMessageRequest, + final ApiCallback _callback) + throws ApiException { + String basePath = null; + // Operation Servers + String[] localBasePaths = new String[] {}; + + // Determine Base Path to Use + if (localCustomBaseUrl != null) { + basePath = localCustomBaseUrl; + } else if (localBasePaths.length > 0) { + basePath = localBasePaths[localHostIndex]; + } else { + basePath = null; + } + + Object localVarPostBody = sendAgentMessageRequest; + + // create path and map variables + String localVarPath = + "/api/rest/2.0/ai/agent/{conversation_identifier}/converse" + .replace( + "{" + "conversation_identifier" + "}", + localVarApiClient.escapeString(conversationIdentifier.toString())); + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + final String[] localVarAccepts = {"application/json"}; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = {"application/json"}; + final String localVarContentType = + localVarApiClient.selectHeaderContentType(localVarContentTypes); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } + + String[] localVarAuthNames = new String[] {"bearerAuth"}; + return localVarApiClient.buildCall( + basePath, + localVarPath, + "POST", + localVarQueryParams, + localVarCollectionQueryParams, + localVarPostBody, + localVarHeaderParams, + localVarCookieParams, + localVarFormParams, + localVarAuthNames, + _callback); + } + + @Deprecated + @SuppressWarnings("rawtypes") + private okhttp3.Call sendAgentMessageValidateBeforeCall( + String conversationIdentifier, + SendAgentMessageRequest sendAgentMessageRequest, + final ApiCallback _callback) + throws ApiException { + // verify the required parameter 'conversationIdentifier' is set + if (conversationIdentifier == null) { + throw new ApiException( + "Missing the required parameter 'conversationIdentifier' when calling" + + " sendAgentMessage(Async)"); + } + + // verify the required parameter 'sendAgentMessageRequest' is set + if (sendAgentMessageRequest == null) { + throw new ApiException( + "Missing the required parameter 'sendAgentMessageRequest' when calling" + + " sendAgentMessage(Async)"); + } + + return sendAgentMessageCall(conversationIdentifier, sendAgentMessageRequest, _callback); + } + + /** + * Version: 26.2.0.cl or later **Deprecated** — Use `sendAgentConversationMessage` + * instead. Send natural language messages to an existing Spotter agent conversation and returns + * the complete response synchronously. Requires `CAN_USE_SPOTTER` privilege and + * access to the metadata object associated with the conversation. The user must have access to + * the conversation session referenced by `conversation_identifier`. A conversation + * must first be created using the `createAgentConversation` API. #### Usage + * guidelines The request must include: - `conversation_identifier`: the unique + * session ID returned by `createAgentConversation`, used for context continuity and + * message tracking - `messages`: an array of one or more text messages to send to the + * agent The API returns an array of response objects, each containing: - `type`: the + * kind of response — `text`, `answer`, or `error` - + * `message`: the main content of the response - `metadata`: additional + * information depending on the message type (e.g., answer metadata includes analytics and + * visualization details) #### Error responses | Code | Description | + * |------|----------------------------------------------------------------------------------------------------------------------------------| + * | 401 | Unauthorized — authentication token is missing, expired, or invalid. | | 403 | + * Forbidden — the authenticated user does not have `CAN_USE_SPOTTER` privilege or + * lacks permission on the referenced conversation. | > ###### Note: > > - This + * endpoint is deprecated. Use `sendAgentConversationMessage` for new integrations. + * > - This endpoint is currently in Beta. Breaking changes may be introduced before the + * endpoint is made Generally Available. > - This endpoint requires Spotter - please contact + * ThoughtSpot support to enable Spotter on your cluster. + * + * @param conversationIdentifier Unique identifier for the conversation (used to track context) + * (required) + * @param sendAgentMessageRequest (required) + * @return Object + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the + * response body + * @http.response.details + * + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 Common successful response -
201 Common error response -
400 Operation failed -
401 Unauthorized access. -
403 Forbidden access. -
500 Operation failed -
+ * + * @deprecated + */ + @Deprecated + public Object sendAgentMessage( + String conversationIdentifier, SendAgentMessageRequest sendAgentMessageRequest) + throws ApiException { + ApiResponse localVarResp = + sendAgentMessageWithHttpInfo(conversationIdentifier, sendAgentMessageRequest); + return localVarResp.getData(); + } + + /** + * Version: 26.2.0.cl or later **Deprecated** — Use `sendAgentConversationMessage` + * instead. Send natural language messages to an existing Spotter agent conversation and returns + * the complete response synchronously. Requires `CAN_USE_SPOTTER` privilege and + * access to the metadata object associated with the conversation. The user must have access to + * the conversation session referenced by `conversation_identifier`. A conversation + * must first be created using the `createAgentConversation` API. #### Usage + * guidelines The request must include: - `conversation_identifier`: the unique + * session ID returned by `createAgentConversation`, used for context continuity and + * message tracking - `messages`: an array of one or more text messages to send to the + * agent The API returns an array of response objects, each containing: - `type`: the + * kind of response — `text`, `answer`, or `error` - + * `message`: the main content of the response - `metadata`: additional + * information depending on the message type (e.g., answer metadata includes analytics and + * visualization details) #### Error responses | Code | Description | + * |------|----------------------------------------------------------------------------------------------------------------------------------| + * | 401 | Unauthorized — authentication token is missing, expired, or invalid. | | 403 | + * Forbidden — the authenticated user does not have `CAN_USE_SPOTTER` privilege or + * lacks permission on the referenced conversation. | > ###### Note: > > - This + * endpoint is deprecated. Use `sendAgentConversationMessage` for new integrations. + * > - This endpoint is currently in Beta. Breaking changes may be introduced before the + * endpoint is made Generally Available. > - This endpoint requires Spotter - please contact + * ThoughtSpot support to enable Spotter on your cluster. + * + * @param conversationIdentifier Unique identifier for the conversation (used to track context) + * (required) + * @param sendAgentMessageRequest (required) + * @return ApiResponse<Object> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the + * response body + * @http.response.details + * + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 Common successful response -
201 Common error response -
400 Operation failed -
401 Unauthorized access. -
403 Forbidden access. -
500 Operation failed -
+ * + * @deprecated + */ + @Deprecated + public ApiResponse sendAgentMessageWithHttpInfo( + String conversationIdentifier, SendAgentMessageRequest sendAgentMessageRequest) + throws ApiException { + okhttp3.Call localVarCall = + sendAgentMessageValidateBeforeCall( + conversationIdentifier, sendAgentMessageRequest, null); + Type localVarReturnType = new TypeToken() {}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); + } + + /** + * (asynchronously) Version: 26.2.0.cl or later **Deprecated** — Use + * `sendAgentConversationMessage` instead. Send natural language messages to an + * existing Spotter agent conversation and returns the complete response synchronously. Requires + * `CAN_USE_SPOTTER` privilege and access to the metadata object associated with the + * conversation. The user must have access to the conversation session referenced by + * `conversation_identifier`. A conversation must first be created using the + * `createAgentConversation` API. #### Usage guidelines The request must include: - + * `conversation_identifier`: the unique session ID returned by + * `createAgentConversation`, used for context continuity and message tracking - + * `messages`: an array of one or more text messages to send to the agent The API + * returns an array of response objects, each containing: - `type`: the kind of + * response — `text`, `answer`, or `error` - `message`: + * the main content of the response - `metadata`: additional information depending on + * the message type (e.g., answer metadata includes analytics and visualization details) #### + * Error responses | Code | Description | + * |------|----------------------------------------------------------------------------------------------------------------------------------| + * | 401 | Unauthorized — authentication token is missing, expired, or invalid. | | 403 | + * Forbidden — the authenticated user does not have `CAN_USE_SPOTTER` privilege or + * lacks permission on the referenced conversation. | > ###### Note: > > - This + * endpoint is deprecated. Use `sendAgentConversationMessage` for new integrations. + * > - This endpoint is currently in Beta. Breaking changes may be introduced before the + * endpoint is made Generally Available. > - This endpoint requires Spotter - please contact + * ThoughtSpot support to enable Spotter on your cluster. + * + * @param conversationIdentifier Unique identifier for the conversation (used to track context) + * (required) + * @param sendAgentMessageRequest (required) + * @param _callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body + * object + * @http.response.details + * + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 Common successful response -
201 Common error response -
400 Operation failed -
401 Unauthorized access. -
403 Forbidden access. -
500 Operation failed -
+ * + * @deprecated + */ + @Deprecated + public okhttp3.Call sendAgentMessageAsync( + String conversationIdentifier, + SendAgentMessageRequest sendAgentMessageRequest, + final ApiCallback _callback) + throws ApiException { + + okhttp3.Call localVarCall = + sendAgentMessageValidateBeforeCall( + conversationIdentifier, sendAgentMessageRequest, _callback); + Type localVarReturnType = new TypeToken() {}.getType(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; + } + /** + * Build call for sendAgentMessageStreaming + * + * @param sendAgentMessageStreamingRequest (required) + * @param _callback Callback for upload/download progress + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + * @http.response.details + * + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 Common successful response -
201 Common error response -
400 Operation failed -
401 Unauthorized access. -
403 Forbidden access. -
500 Operation failed -
+ * + * @deprecated + */ + @Deprecated + public okhttp3.Call sendAgentMessageStreamingCall( + SendAgentMessageStreamingRequest sendAgentMessageStreamingRequest, + final ApiCallback _callback) + throws ApiException { + String basePath = null; + // Operation Servers + String[] localBasePaths = new String[] {}; + + // Determine Base Path to Use + if (localCustomBaseUrl != null) { + basePath = localCustomBaseUrl; + } else if (localBasePaths.length > 0) { + basePath = localBasePaths[localHostIndex]; + } else { + basePath = null; + } + + Object localVarPostBody = sendAgentMessageStreamingRequest; + + // create path and map variables + String localVarPath = "/api/rest/2.0/ai/agent/converse/sse"; + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + final String[] localVarAccepts = {"application/json"}; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = {"application/json"}; + final String localVarContentType = + localVarApiClient.selectHeaderContentType(localVarContentTypes); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } + + String[] localVarAuthNames = new String[] {"bearerAuth"}; + return localVarApiClient.buildCall( + basePath, + localVarPath, + "POST", + localVarQueryParams, + localVarCollectionQueryParams, + localVarPostBody, + localVarHeaderParams, + localVarCookieParams, + localVarFormParams, + localVarAuthNames, + _callback); + } + + @Deprecated + @SuppressWarnings("rawtypes") + private okhttp3.Call sendAgentMessageStreamingValidateBeforeCall( + SendAgentMessageStreamingRequest sendAgentMessageStreamingRequest, + final ApiCallback _callback) + throws ApiException { + // verify the required parameter 'sendAgentMessageStreamingRequest' is set + if (sendAgentMessageStreamingRequest == null) { + throw new ApiException( + "Missing the required parameter 'sendAgentMessageStreamingRequest' when" + + " calling sendAgentMessageStreaming(Async)"); + } + + return sendAgentMessageStreamingCall(sendAgentMessageStreamingRequest, _callback); + } + + /** + * Version: 26.2.0.cl or later **Deprecated** — Use + * `sendAgentConversationMessageStreaming` instead. Sends one or more natural language + * messages to an existing Spotter agent conversation and returns the response as a real-time + * Server-Sent Events stream. Requires `CAN_USE_SPOTTER` privilege and access to the + * metadata object associated with the conversation. The user must have access to the + * conversation session referenced by `conversation_identifier`. A conversation must + * first be created using the `createAgentConversation` API. #### Usage guidelines The + * request must include: - `conversation_identifier`: the unique session ID returned + * by `createAgentConversation`, used for context continuity and message tracking - + * `messages`: an array of one or more text messages to send to the agent If the + * request is valid, the API returns a Server-Sent Events (SSE) stream. Each line has the form + * `data: [{\"type\": \"...\", ...}]` — a JSON array of event + * objects. Event types include: - `ack`: confirms receipt of the request + * (`node_id`) - `conv_title`: conversation title (`title`, + * `conv_id`) - `notification`: status updates on operations + * (`group_id`, `metadata`, `code` — e.g. + * `TOOL_CALL_NOTIFICATION`, `nls_start`, + * `FINAL_RESPONSE_NOTIFICATION`) - `text-chunk`: incremental content chunks + * (`id`, `group_id`, `metadata` with `format` and + * `type` such as `thinking` or `text`, `content`) - + * `text`: full text block with same structure as `text-chunk` - + * `answer`: structured answer with metadata (`id`, `group_id`, + * `metadata` with `sage_query`, `session_id`, `title`, + * etc., `title`) - `error`: if a failure occurs #### Error responses | Code + * | Description | + * |------|----------------------------------------------------------------------------------------------------------------------------------| + * | 401 | Unauthorized — authentication token is missing, expired, or invalid. | | 403 | + * Forbidden — the authenticated user does not have `CAN_USE_SPOTTER` privilege or + * lacks permission on the referenced conversation. | > ###### Note: > > - This + * endpoint is deprecated. Use `sendAgentConversationMessageStreaming` for new + * integrations. > - This endpoint is currently in Beta. Breaking changes may be introduced + * before the endpoint is made Generally Available. > - This endpoint requires Spotter - + * please contact ThoughtSpot support to enable Spotter on your cluster. > - The streaming + * protocol uses Server-Sent Events (SSE). + * + * @param sendAgentMessageStreamingRequest (required) + * @return SendAgentMessageResponse + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the + * response body + * @http.response.details + * + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 Common successful response -
201 Common error response -
400 Operation failed -
401 Unauthorized access. -
403 Forbidden access. -
500 Operation failed -
+ * + * @deprecated + */ + @Deprecated + public SendAgentMessageResponse sendAgentMessageStreaming( + SendAgentMessageStreamingRequest sendAgentMessageStreamingRequest) throws ApiException { + ApiResponse localVarResp = + sendAgentMessageStreamingWithHttpInfo(sendAgentMessageStreamingRequest); + return localVarResp.getData(); + } + + /** + * Version: 26.2.0.cl or later **Deprecated** — Use + * `sendAgentConversationMessageStreaming` instead. Sends one or more natural language + * messages to an existing Spotter agent conversation and returns the response as a real-time + * Server-Sent Events stream. Requires `CAN_USE_SPOTTER` privilege and access to the + * metadata object associated with the conversation. The user must have access to the + * conversation session referenced by `conversation_identifier`. A conversation must + * first be created using the `createAgentConversation` API. #### Usage guidelines The + * request must include: - `conversation_identifier`: the unique session ID returned + * by `createAgentConversation`, used for context continuity and message tracking - + * `messages`: an array of one or more text messages to send to the agent If the + * request is valid, the API returns a Server-Sent Events (SSE) stream. Each line has the form + * `data: [{\"type\": \"...\", ...}]` — a JSON array of event + * objects. Event types include: - `ack`: confirms receipt of the request + * (`node_id`) - `conv_title`: conversation title (`title`, + * `conv_id`) - `notification`: status updates on operations + * (`group_id`, `metadata`, `code` — e.g. + * `TOOL_CALL_NOTIFICATION`, `nls_start`, + * `FINAL_RESPONSE_NOTIFICATION`) - `text-chunk`: incremental content chunks + * (`id`, `group_id`, `metadata` with `format` and + * `type` such as `thinking` or `text`, `content`) - + * `text`: full text block with same structure as `text-chunk` - + * `answer`: structured answer with metadata (`id`, `group_id`, + * `metadata` with `sage_query`, `session_id`, `title`, + * etc., `title`) - `error`: if a failure occurs #### Error responses | Code + * | Description | + * |------|----------------------------------------------------------------------------------------------------------------------------------| + * | 401 | Unauthorized — authentication token is missing, expired, or invalid. | | 403 | + * Forbidden — the authenticated user does not have `CAN_USE_SPOTTER` privilege or + * lacks permission on the referenced conversation. | > ###### Note: > > - This + * endpoint is deprecated. Use `sendAgentConversationMessageStreaming` for new + * integrations. > - This endpoint is currently in Beta. Breaking changes may be introduced + * before the endpoint is made Generally Available. > - This endpoint requires Spotter - + * please contact ThoughtSpot support to enable Spotter on your cluster. > - The streaming + * protocol uses Server-Sent Events (SSE). + * + * @param sendAgentMessageStreamingRequest (required) + * @return ApiResponse<SendAgentMessageResponse> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the + * response body + * @http.response.details + * + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 Common successful response -
201 Common error response -
400 Operation failed -
401 Unauthorized access. -
403 Forbidden access. -
500 Operation failed -
+ * + * @deprecated + */ + @Deprecated + public ApiResponse sendAgentMessageStreamingWithHttpInfo( + SendAgentMessageStreamingRequest sendAgentMessageStreamingRequest) throws ApiException { + okhttp3.Call localVarCall = + sendAgentMessageStreamingValidateBeforeCall(sendAgentMessageStreamingRequest, null); + Type localVarReturnType = new TypeToken() {}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); + } + + /** + * (asynchronously) Version: 26.2.0.cl or later **Deprecated** — Use + * `sendAgentConversationMessageStreaming` instead. Sends one or more natural language + * messages to an existing Spotter agent conversation and returns the response as a real-time + * Server-Sent Events stream. Requires `CAN_USE_SPOTTER` privilege and access to the + * metadata object associated with the conversation. The user must have access to the + * conversation session referenced by `conversation_identifier`. A conversation must + * first be created using the `createAgentConversation` API. #### Usage guidelines The + * request must include: - `conversation_identifier`: the unique session ID returned + * by `createAgentConversation`, used for context continuity and message tracking - + * `messages`: an array of one or more text messages to send to the agent If the + * request is valid, the API returns a Server-Sent Events (SSE) stream. Each line has the form + * `data: [{\"type\": \"...\", ...}]` — a JSON array of event + * objects. Event types include: - `ack`: confirms receipt of the request + * (`node_id`) - `conv_title`: conversation title (`title`, + * `conv_id`) - `notification`: status updates on operations + * (`group_id`, `metadata`, `code` — e.g. + * `TOOL_CALL_NOTIFICATION`, `nls_start`, + * `FINAL_RESPONSE_NOTIFICATION`) - `text-chunk`: incremental content chunks + * (`id`, `group_id`, `metadata` with `format` and + * `type` such as `thinking` or `text`, `content`) - + * `text`: full text block with same structure as `text-chunk` - + * `answer`: structured answer with metadata (`id`, `group_id`, + * `metadata` with `sage_query`, `session_id`, `title`, + * etc., `title`) - `error`: if a failure occurs #### Error responses | Code + * | Description | + * |------|----------------------------------------------------------------------------------------------------------------------------------| + * | 401 | Unauthorized — authentication token is missing, expired, or invalid. | | 403 | + * Forbidden — the authenticated user does not have `CAN_USE_SPOTTER` privilege or + * lacks permission on the referenced conversation. | > ###### Note: > > - This + * endpoint is deprecated. Use `sendAgentConversationMessageStreaming` for new + * integrations. > - This endpoint is currently in Beta. Breaking changes may be introduced + * before the endpoint is made Generally Available. > - This endpoint requires Spotter - + * please contact ThoughtSpot support to enable Spotter on your cluster. > - The streaming + * protocol uses Server-Sent Events (SSE). + * + * @param sendAgentMessageStreamingRequest (required) + * @param _callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body + * object + * @http.response.details + * + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 Common successful response -
201 Common error response -
400 Operation failed -
401 Unauthorized access. -
403 Forbidden access. -
500 Operation failed -
+ * + * @deprecated + */ + @Deprecated + public okhttp3.Call sendAgentMessageStreamingAsync( + SendAgentMessageStreamingRequest sendAgentMessageStreamingRequest, + final ApiCallback _callback) + throws ApiException { + + okhttp3.Call localVarCall = + sendAgentMessageStreamingValidateBeforeCall( + sendAgentMessageStreamingRequest, _callback); + Type localVarReturnType = new TypeToken() {}.getType(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; + } + /** + * Build call for sendMessage + * + * @param conversationIdentifier Unique identifier of the conversation. (required) + * @param sendMessageRequest (required) + * @param _callback Callback for upload/download progress + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + * @http.response.details + * + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 Common successful response -
201 Common error response -
400 Operation failed -
401 Unauthorized access. -
403 Forbidden access. -
500 Operation failed -
+ */ + public okhttp3.Call sendMessageCall( + String conversationIdentifier, + SendMessageRequest sendMessageRequest, + final ApiCallback _callback) + throws ApiException { + String basePath = null; + // Operation Servers + String[] localBasePaths = new String[] {}; + + // Determine Base Path to Use + if (localCustomBaseUrl != null) { + basePath = localCustomBaseUrl; + } else if (localBasePaths.length > 0) { + basePath = localBasePaths[localHostIndex]; + } else { + basePath = null; + } + + Object localVarPostBody = sendMessageRequest; + + // create path and map variables + String localVarPath = + "/api/rest/2.0/ai/conversation/{conversation_identifier}/converse" + .replace( + "{" + "conversation_identifier" + "}", + localVarApiClient.escapeString(conversationIdentifier.toString())); + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + final String[] localVarAccepts = {"application/json"}; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = {"application/json"}; + final String localVarContentType = + localVarApiClient.selectHeaderContentType(localVarContentTypes); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } + + String[] localVarAuthNames = new String[] {"bearerAuth"}; + return localVarApiClient.buildCall( + basePath, + localVarPath, + "POST", + localVarQueryParams, + localVarCollectionQueryParams, + localVarPostBody, + localVarHeaderParams, + localVarCookieParams, + localVarFormParams, + localVarAuthNames, + _callback); + } + + @SuppressWarnings("rawtypes") + private okhttp3.Call sendMessageValidateBeforeCall( + String conversationIdentifier, + SendMessageRequest sendMessageRequest, + final ApiCallback _callback) + throws ApiException { + // verify the required parameter 'conversationIdentifier' is set + if (conversationIdentifier == null) { + throw new ApiException( + "Missing the required parameter 'conversationIdentifier' when calling" + + " sendMessage(Async)"); + } + + // verify the required parameter 'sendMessageRequest' is set + if (sendMessageRequest == null) { + throw new ApiException( + "Missing the required parameter 'sendMessageRequest' when calling" + + " sendMessage(Async)"); + } + + return sendMessageCall(conversationIdentifier, sendMessageRequest, _callback); + } + + /** + * Version: 10.4.0.cl or later Sends a follow-up message to an existing conversation within the + * context of a data model. Requires `CAN_USE_SPOTTER` privilege and at least view + * access to the metadata object specified in the request. A conversation must first be created + * using the `createConversation` API. #### Usage guidelines The request must include: + * - `conversation_identifier`: the unique session ID returned by + * `createConversation` - `metadata_identifier`: the unique ID of the data + * source used for the conversation - `message`: a natural language string with the + * follow-up question If the request is successful, the API returns an array of response + * messages, each containing: - `session_identifier`: the unique ID of the generated + * response - `generation_number`: the generation number of the response - + * `message_type`: the type of the response (e.g., `TSAnswer`) - + * `visualization_type`: the generated visualization type (`Chart`, + * `Table`, or `Undefined`) - `tokens` / + * `display_tokens`: the search tokens and user-friendly display tokens for the + * response #### Error responses | Code | Description | + * |------|-----------------------------------------------------------------------------------------------------------------------------------------| + * | 401 | Unauthorized — authentication token is missing, expired, or invalid. | | 403 | + * Forbidden — the authenticated user does not have `CAN_USE_SPOTTER` privilege or + * lacks view permission on the specified metadata object. | > ###### Note: > * This + * endpoint is currently in Beta. Breaking changes may be introduced before the endpoint is made + * Generally Available. > * This endpoint requires Spotter - please contact ThoughtSpot + * support to enable Spotter on your cluster. + * + * @param conversationIdentifier Unique identifier of the conversation. (required) + * @param sendMessageRequest (required) + * @return List<ResponseMessage> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the + * response body + * @http.response.details + * + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 Common successful response -
201 Common error response -
400 Operation failed -
401 Unauthorized access. -
403 Forbidden access. -
500 Operation failed -
+ */ + public List sendMessage( + String conversationIdentifier, SendMessageRequest sendMessageRequest) + throws ApiException { + ApiResponse> localVarResp = + sendMessageWithHttpInfo(conversationIdentifier, sendMessageRequest); + return localVarResp.getData(); + } + + /** + * Version: 10.4.0.cl or later Sends a follow-up message to an existing conversation within the + * context of a data model. Requires `CAN_USE_SPOTTER` privilege and at least view + * access to the metadata object specified in the request. A conversation must first be created + * using the `createConversation` API. #### Usage guidelines The request must include: + * - `conversation_identifier`: the unique session ID returned by + * `createConversation` - `metadata_identifier`: the unique ID of the data + * source used for the conversation - `message`: a natural language string with the + * follow-up question If the request is successful, the API returns an array of response + * messages, each containing: - `session_identifier`: the unique ID of the generated + * response - `generation_number`: the generation number of the response - + * `message_type`: the type of the response (e.g., `TSAnswer`) - + * `visualization_type`: the generated visualization type (`Chart`, + * `Table`, or `Undefined`) - `tokens` / + * `display_tokens`: the search tokens and user-friendly display tokens for the + * response #### Error responses | Code | Description | + * |------|-----------------------------------------------------------------------------------------------------------------------------------------| + * | 401 | Unauthorized — authentication token is missing, expired, or invalid. | | 403 | + * Forbidden — the authenticated user does not have `CAN_USE_SPOTTER` privilege or + * lacks view permission on the specified metadata object. | > ###### Note: > * This + * endpoint is currently in Beta. Breaking changes may be introduced before the endpoint is made + * Generally Available. > * This endpoint requires Spotter - please contact ThoughtSpot + * support to enable Spotter on your cluster. + * + * @param conversationIdentifier Unique identifier of the conversation. (required) + * @param sendMessageRequest (required) + * @return ApiResponse<List<ResponseMessage>> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the + * response body + * @http.response.details + * + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 Common successful response -
201 Common error response -
400 Operation failed -
401 Unauthorized access. -
403 Forbidden access. -
500 Operation failed -
+ */ + public ApiResponse> sendMessageWithHttpInfo( + String conversationIdentifier, SendMessageRequest sendMessageRequest) + throws ApiException { + okhttp3.Call localVarCall = + sendMessageValidateBeforeCall(conversationIdentifier, sendMessageRequest, null); + Type localVarReturnType = new TypeToken>() {}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); + } + + /** + * (asynchronously) Version: 10.4.0.cl or later Sends a follow-up message to an existing + * conversation within the context of a data model. Requires `CAN_USE_SPOTTER` + * privilege and at least view access to the metadata object specified in the request. A + * conversation must first be created using the `createConversation` API. #### Usage + * guidelines The request must include: - `conversation_identifier`: the unique + * session ID returned by `createConversation` - `metadata_identifier`: the + * unique ID of the data source used for the conversation - `message`: a natural + * language string with the follow-up question If the request is successful, the API returns an + * array of response messages, each containing: - `session_identifier`: the unique ID + * of the generated response - `generation_number`: the generation number of the + * response - `message_type`: the type of the response (e.g., `TSAnswer`) - + * `visualization_type`: the generated visualization type (`Chart`, + * `Table`, or `Undefined`) - `tokens` / + * `display_tokens`: the search tokens and user-friendly display tokens for the + * response #### Error responses | Code | Description | + * |------|-----------------------------------------------------------------------------------------------------------------------------------------| + * | 401 | Unauthorized — authentication token is missing, expired, or invalid. | | 403 | + * Forbidden — the authenticated user does not have `CAN_USE_SPOTTER` privilege or + * lacks view permission on the specified metadata object. | > ###### Note: > * This + * endpoint is currently in Beta. Breaking changes may be introduced before the endpoint is made + * Generally Available. > * This endpoint requires Spotter - please contact ThoughtSpot + * support to enable Spotter on your cluster. + * + * @param conversationIdentifier Unique identifier of the conversation. (required) + * @param sendMessageRequest (required) + * @param _callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body + * object + * @http.response.details + * + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 Common successful response -
201 Common error response -
400 Operation failed -
401 Unauthorized access. -
403 Forbidden access. -
500 Operation failed -
+ */ + public okhttp3.Call sendMessageAsync( + String conversationIdentifier, + SendMessageRequest sendMessageRequest, + final ApiCallback> _callback) + throws ApiException { + + okhttp3.Call localVarCall = + sendMessageValidateBeforeCall( + conversationIdentifier, sendMessageRequest, _callback); + Type localVarReturnType = new TypeToken>() {}.getType(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; + } + /** + * Build call for setNLInstructions + * + * @param setNLInstructionsRequest (required) + * @param _callback Callback for upload/download progress + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + * @http.response.details + * + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 Common successful response -
201 Common error response -
400 Operation failed -
401 Unauthorized access. -
403 Forbidden access. -
500 Operation failed -
+ */ + public okhttp3.Call setNLInstructionsCall( + SetNLInstructionsRequest setNLInstructionsRequest, final ApiCallback _callback) + throws ApiException { + String basePath = null; + // Operation Servers + String[] localBasePaths = new String[] {}; + + // Determine Base Path to Use + if (localCustomBaseUrl != null) { + basePath = localCustomBaseUrl; + } else if (localBasePaths.length > 0) { + basePath = localBasePaths[localHostIndex]; + } else { + basePath = null; + } + + Object localVarPostBody = setNLInstructionsRequest; + + // create path and map variables + String localVarPath = "/api/rest/2.0/ai/instructions/set"; + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + final String[] localVarAccepts = {"application/json"}; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = {"application/json"}; + final String localVarContentType = + localVarApiClient.selectHeaderContentType(localVarContentTypes); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } + + String[] localVarAuthNames = new String[] {"bearerAuth"}; + return localVarApiClient.buildCall( + basePath, + localVarPath, + "POST", + localVarQueryParams, + localVarCollectionQueryParams, + localVarPostBody, + localVarHeaderParams, + localVarCookieParams, + localVarFormParams, + localVarAuthNames, + _callback); + } + + @SuppressWarnings("rawtypes") + private okhttp3.Call setNLInstructionsValidateBeforeCall( + SetNLInstructionsRequest setNLInstructionsRequest, final ApiCallback _callback) + throws ApiException { + // verify the required parameter 'setNLInstructionsRequest' is set + if (setNLInstructionsRequest == null) { + throw new ApiException( + "Missing the required parameter 'setNLInstructionsRequest' when calling" + + " setNLInstructions(Async)"); + } + + return setNLInstructionsCall(setNLInstructionsRequest, _callback); + } + + /** + * Version: 10.15.0.cl or later This API allows users to set natural language (NL) instructions + * for a specific data-model to improve AI-generated answers and query processing. These + * instructions help guide the AI system to better understand the data context and provide more + * accurate responses. Requires `CAN_USE_SPOTTER` privilege, either edit access or + * `SPOTTER_COACHING_PRIVILEGE` on the data model, and a bearer token corresponding to + * the org where the data model exists. #### Usage guidelines To set NL instructions for a + * data-model, the request must include: - `data_source_identifier`: The unique ID of + * the data-model for which to set NL instructions - `nl_instructions_info`: An array + * of instruction objects, each containing: - `instructions`: Array of text + * instructions for the LLM - `scope`: The scope of the instruction + * (`GLOBAL`). Currently only `GLOBAL` is supported. It can be extended to + * data-model-user scope in future. #### Instructions scope - **GLOBAL**: instructions that + * apply to all users querying this data model If the request is successful, the API returns: - + * `success`: a boolean indicating whether the operation completed successfully #### + * Error responses | Code | Description | + * |------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| + * | 401 | Unauthorized — authentication token is missing, expired, or invalid. | | 403 | + * Forbidden — the authenticated user does not have `CAN_USE_SPOTTER` privilege, lacks + * edit access or `SPOTTER_COACHING_PRIVILEGE` on the data model, or the bearer token + * does not correspond to the org where the data model exists. | > ###### Note: > > - + * To use this API, the user needs either edit access or `SPOTTER_COACHING_PRIVILEGE` + * on the data model, and must use the bearer token corresponding to the org where the data + * model exists. > - This endpoint is currently in Beta. Breaking changes may be introduced + * before the endpoint is made Generally Available. > - Available from version 10.15.0.cl and + * later. > - This endpoint requires Spotter — please contact ThoughtSpot Support to enable + * Spotter on your cluster. > - Instructions help improve the accuracy and relevance of + * AI-generated responses for the specified data-model. + * + * @param setNLInstructionsRequest (required) + * @return EurekaSetNLInstructionsResponse + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the + * response body + * @http.response.details + * + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 Common successful response -
201 Common error response -
400 Operation failed -
401 Unauthorized access. -
403 Forbidden access. -
500 Operation failed -
+ */ + public EurekaSetNLInstructionsResponse setNLInstructions( + SetNLInstructionsRequest setNLInstructionsRequest) throws ApiException { + ApiResponse localVarResp = + setNLInstructionsWithHttpInfo(setNLInstructionsRequest); + return localVarResp.getData(); + } + + /** + * Version: 10.15.0.cl or later This API allows users to set natural language (NL) instructions + * for a specific data-model to improve AI-generated answers and query processing. These + * instructions help guide the AI system to better understand the data context and provide more + * accurate responses. Requires `CAN_USE_SPOTTER` privilege, either edit access or + * `SPOTTER_COACHING_PRIVILEGE` on the data model, and a bearer token corresponding to + * the org where the data model exists. #### Usage guidelines To set NL instructions for a + * data-model, the request must include: - `data_source_identifier`: The unique ID of + * the data-model for which to set NL instructions - `nl_instructions_info`: An array + * of instruction objects, each containing: - `instructions`: Array of text + * instructions for the LLM - `scope`: The scope of the instruction + * (`GLOBAL`). Currently only `GLOBAL` is supported. It can be extended to + * data-model-user scope in future. #### Instructions scope - **GLOBAL**: instructions that + * apply to all users querying this data model If the request is successful, the API returns: - + * `success`: a boolean indicating whether the operation completed successfully #### + * Error responses | Code | Description | + * |------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| + * | 401 | Unauthorized — authentication token is missing, expired, or invalid. | | 403 | + * Forbidden — the authenticated user does not have `CAN_USE_SPOTTER` privilege, lacks + * edit access or `SPOTTER_COACHING_PRIVILEGE` on the data model, or the bearer token + * does not correspond to the org where the data model exists. | > ###### Note: > > - + * To use this API, the user needs either edit access or `SPOTTER_COACHING_PRIVILEGE` + * on the data model, and must use the bearer token corresponding to the org where the data + * model exists. > - This endpoint is currently in Beta. Breaking changes may be introduced + * before the endpoint is made Generally Available. > - Available from version 10.15.0.cl and + * later. > - This endpoint requires Spotter — please contact ThoughtSpot Support to enable + * Spotter on your cluster. > - Instructions help improve the accuracy and relevance of + * AI-generated responses for the specified data-model. + * + * @param setNLInstructionsRequest (required) + * @return ApiResponse<EurekaSetNLInstructionsResponse> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the + * response body + * @http.response.details + * + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 Common successful response -
201 Common error response -
400 Operation failed -
401 Unauthorized access. -
403 Forbidden access. -
500 Operation failed -
+ */ + public ApiResponse setNLInstructionsWithHttpInfo( + SetNLInstructionsRequest setNLInstructionsRequest) throws ApiException { + okhttp3.Call localVarCall = + setNLInstructionsValidateBeforeCall(setNLInstructionsRequest, null); + Type localVarReturnType = new TypeToken() {}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); + } + + /** + * (asynchronously) Version: 10.15.0.cl or later This API allows users to set natural language + * (NL) instructions for a specific data-model to improve AI-generated answers and query + * processing. These instructions help guide the AI system to better understand the data context + * and provide more accurate responses. Requires `CAN_USE_SPOTTER` privilege, either + * edit access or `SPOTTER_COACHING_PRIVILEGE` on the data model, and a bearer token + * corresponding to the org where the data model exists. #### Usage guidelines To set NL + * instructions for a data-model, the request must include: - + * `data_source_identifier`: The unique ID of the data-model for which to set NL + * instructions - `nl_instructions_info`: An array of instruction objects, each + * containing: - `instructions`: Array of text instructions for the LLM - + * `scope`: The scope of the instruction (`GLOBAL`). Currently only + * `GLOBAL` is supported. It can be extended to data-model-user scope in future. #### + * Instructions scope - **GLOBAL**: instructions that apply to all users querying this data + * model If the request is successful, the API returns: - `success`: a boolean + * indicating whether the operation completed successfully #### Error responses | Code | + * Description | + * |------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| + * | 401 | Unauthorized — authentication token is missing, expired, or invalid. | | 403 | + * Forbidden — the authenticated user does not have `CAN_USE_SPOTTER` privilege, lacks + * edit access or `SPOTTER_COACHING_PRIVILEGE` on the data model, or the bearer token + * does not correspond to the org where the data model exists. | > ###### Note: > > - + * To use this API, the user needs either edit access or `SPOTTER_COACHING_PRIVILEGE` + * on the data model, and must use the bearer token corresponding to the org where the data + * model exists. > - This endpoint is currently in Beta. Breaking changes may be introduced + * before the endpoint is made Generally Available. > - Available from version 10.15.0.cl and + * later. > - This endpoint requires Spotter — please contact ThoughtSpot Support to enable + * Spotter on your cluster. > - Instructions help improve the accuracy and relevance of + * AI-generated responses for the specified data-model. + * + * @param setNLInstructionsRequest (required) + * @param _callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body + * object + * @http.response.details + * + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 Common successful response -
201 Common error response -
400 Operation failed -
401 Unauthorized access. -
403 Forbidden access. -
500 Operation failed -
+ */ + public okhttp3.Call setNLInstructionsAsync( + SetNLInstructionsRequest setNLInstructionsRequest, + final ApiCallback _callback) + throws ApiException { + + okhttp3.Call localVarCall = + setNLInstructionsValidateBeforeCall(setNLInstructionsRequest, _callback); + Type localVarReturnType = new TypeToken() {}.getType(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; + } + /** + * Build call for shareMetadata + * + * @param shareMetadataRequest (required) + * @param _callback Callback for upload/download progress + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
204 Sharing metadata objects is successful. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public okhttp3.Call shareMetadataCall( + ShareMetadataRequest shareMetadataRequest, final ApiCallback _callback) + throws ApiException { + String basePath = null; + // Operation Servers + String[] localBasePaths = new String[] {}; + + // Determine Base Path to Use + if (localCustomBaseUrl != null) { + basePath = localCustomBaseUrl; + } else if (localBasePaths.length > 0) { + basePath = localBasePaths[localHostIndex]; + } else { + basePath = null; + } + + Object localVarPostBody = shareMetadataRequest; + + // create path and map variables + String localVarPath = "/api/rest/2.0/security/metadata/share"; + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + final String[] localVarAccepts = {"application/json"}; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = {"application/json"}; + final String localVarContentType = + localVarApiClient.selectHeaderContentType(localVarContentTypes); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } + + String[] localVarAuthNames = new String[] {"bearerAuth"}; + return localVarApiClient.buildCall( + basePath, + localVarPath, + "POST", + localVarQueryParams, + localVarCollectionQueryParams, + localVarPostBody, + localVarHeaderParams, + localVarCookieParams, + localVarFormParams, + localVarAuthNames, + _callback); + } + + @SuppressWarnings("rawtypes") + private okhttp3.Call shareMetadataValidateBeforeCall( + ShareMetadataRequest shareMetadataRequest, final ApiCallback _callback) + throws ApiException { + // verify the required parameter 'shareMetadataRequest' is set + if (shareMetadataRequest == null) { + throw new ApiException( + "Missing the required parameter 'shareMetadataRequest' when calling" + + " shareMetadata(Async)"); + } + + return shareMetadataCall(shareMetadataRequest, _callback); + } + + /** + * Version: 9.0.0.cl or later Allows sharing one or several metadata objects with users and + * groups in ThoughtSpot. Requires edit access to the metadata object. #### Supported metadata + * objects: * Liveboards * Visualizations * Answers * Models * Views * Connections * Collections + * #### Object permissions You can provide `READ_ONLY` or `MODIFY` access + * when sharing an object with another user or group. The `READ_ONLY` permission + * grants view access to the shared object, whereas `MODIFY` provides edit access. To + * prevent a user or group from accessing the shared object, specify the GUID or name of the + * principal and set `shareMode` to `NO_ACCESS`. #### Sharing a + * visualization * Sharing a visualization implicitly shares the entire Liveboard with the + * recipient. * Object permissions set for a shared visualization also apply to the Liveboard + * unless overridden by another API request or via UI. * If email notifications for object + * sharing are enabled, a notification with a link to the shared visualization will be sent to + * the recipient’s email address. Although this link opens the shared visualization, recipients + * can also access other visualizations in the Liveboard. #### Sharing a collection Collections + * support **dual permissions** that provide fine-grained control: * **Collection permissions** + * (`share_mode`) - controls access to the collection itself (view, edit, delete the + * collection) * **Content permissions** (`content_share_mode`) - controls access to + * objects within the collection (view, edit objects inside) **Default Behavior:** - If only + * `share_mode` is specified, the content permissions default to `READ_ONLY` + * (except when `share_mode` is `NO_ACCESS`, then content also gets + * `NO_ACCESS`) - To give users edit access to collection contents, explicitly set + * `content_share_mode: \"MODIFY\"` ## Examples The following JSON examples + * can be copy-pasted as request bodies for the REST v2 API endpoint: ```bash + * POST /callosum/v1/v2/security/metadata/share Content-Type: application/x-www-form-urlencoded + * ``` ### Basic collection sharing Share a collection with read-only access: + * ```json { \"metadata_type\": \"COLLECTION\", + * \"metadata_identifiers\": [\"Sales Reports Collection\"], + * \"permissions\": [{ \"principal\": { \"type\": + * \"USER\", \"identifier\": \"alice@company.com\" }, + * \"share_mode\": \"READ_ONLY\" }], \"notification\": { + * \"message\": \"I've shared the Sales Reports collection with you\", + * \"notify_on_share\": true } } ``` ### Collection sharing with dual + * permissions Share a collection with different permissions for the collection vs. its + * contents: ```json { \"metadata_type\": \"COLLECTION\", + * \"metadata_identifiers\": [\"Marketing Analytics\"], + * \"permissions\": [{ \"principal\": { \"type\": + * \"USER\", \"identifier\": \"bob@company.com\" }, + * \"share_mode\": \"MODIFY\", \"content_share_mode\": + * \"READ_ONLY\" }, { \"principal\": { \"type\": + * \"USER_GROUP\", \"identifier\": \"Marketing Team\" }, + * \"share_mode\": \"READ_ONLY\", \"content_share_mode\": + * \"READ_ONLY\" }], \"notification\": { \"emails\": + * [\"bob@company.com\"], \"message\": \"You can edit the collection + * but content is read-only\", \"enable_custom_url\": false, + * \"notify_on_share\": true }, \"has_lenient_discoverability\": false } + * ``` ### Multiple collections sharing Share multiple collections with different + * users: ```json { \"metadata\": [ { \"type\": + * \"COLLECTION\", \"identifier\": \"Q4 Reports\" }, { + * \"type\": \"COLLECTION\", \"identifier\": \"Executive + * Dashboard Collection\" } ], \"permissions\": [{ \"principal\": { + * \"type\": \"USER_GROUP\", \"identifier\": + * \"Executives\" }, \"share_mode\": \"MODIFY\" }, { + * \"principal\": { \"type\": \"USER\", \"identifier\": + * \"manager@company.com\" }, \"share_mode\": \"READ_ONLY\", + * \"content_share_mode\": \"MODIFY\" }], \"notification\": { + * \"message\": \"Sharing quarterly collections with leadership team\", + * \"notify_on_share\": true } } ``` ### Remove collection access + * Remove access to a collection by setting share_mode to NO_ACCESS: ```json { + * \"metadata_type\": \"COLLECTION\", \"metadata_identifiers\": + * [\"Confidential Reports\"], \"permissions\": [{ \"principal\": + * { \"type\": \"USER\", \"identifier\": + * \"former-employee@company.com\" }, \"share_mode\": + * \"NO_ACCESS\" }], \"notification\": { \"notify_on_share\": + * false } } ``` ### Collection Permission Scenarios **Scenario 1: Collection + * Admin** - `share_mode: MODIFY` + `content_share_mode: MODIFY` = Full + * control over collection and its contents **Scenario 2: Collection Curator** - + * `share_mode: MODIFY` + `content_share_mode: READ_ONLY` = Can manage + * collection structure but not edit contents **Scenario 3: Content Editor** - `share_mode: + * READ_ONLY` + `content_share_mode: MODIFY` = Can edit objects within + * collection but can't change collection itself **Scenario 4: Viewer** - `share_mode: + * READ_ONLY` + `content_share_mode: READ_ONLY` = View-only access to + * collection and contents + * + * @param shareMetadataRequest (required) + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the + * response body + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
204 Sharing metadata objects is successful. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public void shareMetadata(ShareMetadataRequest shareMetadataRequest) throws ApiException { + shareMetadataWithHttpInfo(shareMetadataRequest); + } + + /** + * Version: 9.0.0.cl or later Allows sharing one or several metadata objects with users and + * groups in ThoughtSpot. Requires edit access to the metadata object. #### Supported metadata + * objects: * Liveboards * Visualizations * Answers * Models * Views * Connections * Collections + * #### Object permissions You can provide `READ_ONLY` or `MODIFY` access + * when sharing an object with another user or group. The `READ_ONLY` permission + * grants view access to the shared object, whereas `MODIFY` provides edit access. To + * prevent a user or group from accessing the shared object, specify the GUID or name of the + * principal and set `shareMode` to `NO_ACCESS`. #### Sharing a + * visualization * Sharing a visualization implicitly shares the entire Liveboard with the + * recipient. * Object permissions set for a shared visualization also apply to the Liveboard + * unless overridden by another API request or via UI. * If email notifications for object + * sharing are enabled, a notification with a link to the shared visualization will be sent to + * the recipient’s email address. Although this link opens the shared visualization, recipients + * can also access other visualizations in the Liveboard. #### Sharing a collection Collections + * support **dual permissions** that provide fine-grained control: * **Collection permissions** + * (`share_mode`) - controls access to the collection itself (view, edit, delete the + * collection) * **Content permissions** (`content_share_mode`) - controls access to + * objects within the collection (view, edit objects inside) **Default Behavior:** - If only + * `share_mode` is specified, the content permissions default to `READ_ONLY` + * (except when `share_mode` is `NO_ACCESS`, then content also gets + * `NO_ACCESS`) - To give users edit access to collection contents, explicitly set + * `content_share_mode: \"MODIFY\"` ## Examples The following JSON examples + * can be copy-pasted as request bodies for the REST v2 API endpoint: ```bash + * POST /callosum/v1/v2/security/metadata/share Content-Type: application/x-www-form-urlencoded + * ``` ### Basic collection sharing Share a collection with read-only access: + * ```json { \"metadata_type\": \"COLLECTION\", + * \"metadata_identifiers\": [\"Sales Reports Collection\"], + * \"permissions\": [{ \"principal\": { \"type\": + * \"USER\", \"identifier\": \"alice@company.com\" }, + * \"share_mode\": \"READ_ONLY\" }], \"notification\": { + * \"message\": \"I've shared the Sales Reports collection with you\", + * \"notify_on_share\": true } } ``` ### Collection sharing with dual + * permissions Share a collection with different permissions for the collection vs. its + * contents: ```json { \"metadata_type\": \"COLLECTION\", + * \"metadata_identifiers\": [\"Marketing Analytics\"], + * \"permissions\": [{ \"principal\": { \"type\": + * \"USER\", \"identifier\": \"bob@company.com\" }, + * \"share_mode\": \"MODIFY\", \"content_share_mode\": + * \"READ_ONLY\" }, { \"principal\": { \"type\": + * \"USER_GROUP\", \"identifier\": \"Marketing Team\" }, + * \"share_mode\": \"READ_ONLY\", \"content_share_mode\": + * \"READ_ONLY\" }], \"notification\": { \"emails\": + * [\"bob@company.com\"], \"message\": \"You can edit the collection + * but content is read-only\", \"enable_custom_url\": false, + * \"notify_on_share\": true }, \"has_lenient_discoverability\": false } + * ``` ### Multiple collections sharing Share multiple collections with different + * users: ```json { \"metadata\": [ { \"type\": + * \"COLLECTION\", \"identifier\": \"Q4 Reports\" }, { + * \"type\": \"COLLECTION\", \"identifier\": \"Executive + * Dashboard Collection\" } ], \"permissions\": [{ \"principal\": { + * \"type\": \"USER_GROUP\", \"identifier\": + * \"Executives\" }, \"share_mode\": \"MODIFY\" }, { + * \"principal\": { \"type\": \"USER\", \"identifier\": + * \"manager@company.com\" }, \"share_mode\": \"READ_ONLY\", + * \"content_share_mode\": \"MODIFY\" }], \"notification\": { + * \"message\": \"Sharing quarterly collections with leadership team\", + * \"notify_on_share\": true } } ``` ### Remove collection access + * Remove access to a collection by setting share_mode to NO_ACCESS: ```json { + * \"metadata_type\": \"COLLECTION\", \"metadata_identifiers\": + * [\"Confidential Reports\"], \"permissions\": [{ \"principal\": + * { \"type\": \"USER\", \"identifier\": + * \"former-employee@company.com\" }, \"share_mode\": + * \"NO_ACCESS\" }], \"notification\": { \"notify_on_share\": + * false } } ``` ### Collection Permission Scenarios **Scenario 1: Collection + * Admin** - `share_mode: MODIFY` + `content_share_mode: MODIFY` = Full + * control over collection and its contents **Scenario 2: Collection Curator** - + * `share_mode: MODIFY` + `content_share_mode: READ_ONLY` = Can manage + * collection structure but not edit contents **Scenario 3: Content Editor** - `share_mode: + * READ_ONLY` + `content_share_mode: MODIFY` = Can edit objects within + * collection but can't change collection itself **Scenario 4: Viewer** - `share_mode: + * READ_ONLY` + `content_share_mode: READ_ONLY` = View-only access to + * collection and contents + * + * @param shareMetadataRequest (required) + * @return ApiResponse<Void> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the + * response body + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
204 Sharing metadata objects is successful. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public ApiResponse shareMetadataWithHttpInfo(ShareMetadataRequest shareMetadataRequest) + throws ApiException { + okhttp3.Call localVarCall = shareMetadataValidateBeforeCall(shareMetadataRequest, null); + return localVarApiClient.execute(localVarCall); + } + + /** + * (asynchronously) Version: 9.0.0.cl or later Allows sharing one or several metadata objects + * with users and groups in ThoughtSpot. Requires edit access to the metadata object. #### + * Supported metadata objects: * Liveboards * Visualizations * Answers * Models * Views * + * Connections * Collections #### Object permissions You can provide `READ_ONLY` or + * `MODIFY` access when sharing an object with another user or group. The + * `READ_ONLY` permission grants view access to the shared object, whereas + * `MODIFY` provides edit access. To prevent a user or group from accessing the shared + * object, specify the GUID or name of the principal and set `shareMode` to + * `NO_ACCESS`. #### Sharing a visualization * Sharing a visualization implicitly + * shares the entire Liveboard with the recipient. * Object permissions set for a shared + * visualization also apply to the Liveboard unless overridden by another API request or via UI. + * * If email notifications for object sharing are enabled, a notification with a link to the + * shared visualization will be sent to the recipient’s email address. Although this link opens + * the shared visualization, recipients can also access other visualizations in the Liveboard. + * #### Sharing a collection Collections support **dual permissions** that provide fine-grained + * control: * **Collection permissions** (`share_mode`) - controls access to the + * collection itself (view, edit, delete the collection) * **Content permissions** + * (`content_share_mode`) - controls access to objects within the collection (view, + * edit objects inside) **Default Behavior:** - If only `share_mode` is specified, the + * content permissions default to `READ_ONLY` (except when `share_mode` is + * `NO_ACCESS`, then content also gets `NO_ACCESS`) - To give users edit + * access to collection contents, explicitly set `content_share_mode: + * \"MODIFY\"` ## Examples The following JSON examples can be copy-pasted as + * request bodies for the REST v2 API endpoint: ```bash POST + * /callosum/v1/v2/security/metadata/share Content-Type: application/x-www-form-urlencoded + * ``` ### Basic collection sharing Share a collection with read-only access: + * ```json { \"metadata_type\": \"COLLECTION\", + * \"metadata_identifiers\": [\"Sales Reports Collection\"], + * \"permissions\": [{ \"principal\": { \"type\": + * \"USER\", \"identifier\": \"alice@company.com\" }, + * \"share_mode\": \"READ_ONLY\" }], \"notification\": { + * \"message\": \"I've shared the Sales Reports collection with you\", + * \"notify_on_share\": true } } ``` ### Collection sharing with dual + * permissions Share a collection with different permissions for the collection vs. its + * contents: ```json { \"metadata_type\": \"COLLECTION\", + * \"metadata_identifiers\": [\"Marketing Analytics\"], + * \"permissions\": [{ \"principal\": { \"type\": + * \"USER\", \"identifier\": \"bob@company.com\" }, + * \"share_mode\": \"MODIFY\", \"content_share_mode\": + * \"READ_ONLY\" }, { \"principal\": { \"type\": + * \"USER_GROUP\", \"identifier\": \"Marketing Team\" }, + * \"share_mode\": \"READ_ONLY\", \"content_share_mode\": + * \"READ_ONLY\" }], \"notification\": { \"emails\": + * [\"bob@company.com\"], \"message\": \"You can edit the collection + * but content is read-only\", \"enable_custom_url\": false, + * \"notify_on_share\": true }, \"has_lenient_discoverability\": false } + * ``` ### Multiple collections sharing Share multiple collections with different + * users: ```json { \"metadata\": [ { \"type\": + * \"COLLECTION\", \"identifier\": \"Q4 Reports\" }, { + * \"type\": \"COLLECTION\", \"identifier\": \"Executive + * Dashboard Collection\" } ], \"permissions\": [{ \"principal\": { + * \"type\": \"USER_GROUP\", \"identifier\": + * \"Executives\" }, \"share_mode\": \"MODIFY\" }, { + * \"principal\": { \"type\": \"USER\", \"identifier\": + * \"manager@company.com\" }, \"share_mode\": \"READ_ONLY\", + * \"content_share_mode\": \"MODIFY\" }], \"notification\": { + * \"message\": \"Sharing quarterly collections with leadership team\", + * \"notify_on_share\": true } } ``` ### Remove collection access + * Remove access to a collection by setting share_mode to NO_ACCESS: ```json { + * \"metadata_type\": \"COLLECTION\", \"metadata_identifiers\": + * [\"Confidential Reports\"], \"permissions\": [{ \"principal\": + * { \"type\": \"USER\", \"identifier\": + * \"former-employee@company.com\" }, \"share_mode\": + * \"NO_ACCESS\" }], \"notification\": { \"notify_on_share\": + * false } } ``` ### Collection Permission Scenarios **Scenario 1: Collection + * Admin** - `share_mode: MODIFY` + `content_share_mode: MODIFY` = Full + * control over collection and its contents **Scenario 2: Collection Curator** - + * `share_mode: MODIFY` + `content_share_mode: READ_ONLY` = Can manage + * collection structure but not edit contents **Scenario 3: Content Editor** - `share_mode: + * READ_ONLY` + `content_share_mode: MODIFY` = Can edit objects within + * collection but can't change collection itself **Scenario 4: Viewer** - `share_mode: + * READ_ONLY` + `content_share_mode: READ_ONLY` = View-only access to + * collection and contents + * + * @param shareMetadataRequest (required) + * @param _callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body + * object + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
204 Sharing metadata objects is successful. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public okhttp3.Call shareMetadataAsync( + ShareMetadataRequest shareMetadataRequest, final ApiCallback _callback) + throws ApiException { + + okhttp3.Call localVarCall = + shareMetadataValidateBeforeCall(shareMetadataRequest, _callback); + localVarApiClient.executeAsync(localVarCall, _callback); + return localVarCall; + } + /** + * Build call for singleAnswer + * + * @param singleAnswerRequest (required) + * @param _callback Callback for upload/download progress + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + * @http.response.details + * + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 Common successful response -
201 Common error response -
400 Operation failed -
401 Unauthorized access. -
403 Forbidden access. -
500 Operation failed -
+ */ + public okhttp3.Call singleAnswerCall( + SingleAnswerRequest singleAnswerRequest, final ApiCallback _callback) + throws ApiException { + String basePath = null; + // Operation Servers + String[] localBasePaths = new String[] {}; + + // Determine Base Path to Use + if (localCustomBaseUrl != null) { + basePath = localCustomBaseUrl; + } else if (localBasePaths.length > 0) { + basePath = localBasePaths[localHostIndex]; + } else { + basePath = null; + } + + Object localVarPostBody = singleAnswerRequest; + + // create path and map variables + String localVarPath = "/api/rest/2.0/ai/answer/create"; + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + final String[] localVarAccepts = {"application/json"}; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = {"application/json"}; + final String localVarContentType = + localVarApiClient.selectHeaderContentType(localVarContentTypes); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } + + String[] localVarAuthNames = new String[] {"bearerAuth"}; + return localVarApiClient.buildCall( + basePath, + localVarPath, + "POST", + localVarQueryParams, + localVarCollectionQueryParams, + localVarPostBody, + localVarHeaderParams, + localVarCookieParams, + localVarFormParams, + localVarAuthNames, + _callback); + } + + @SuppressWarnings("rawtypes") + private okhttp3.Call singleAnswerValidateBeforeCall( + SingleAnswerRequest singleAnswerRequest, final ApiCallback _callback) + throws ApiException { + // verify the required parameter 'singleAnswerRequest' is set + if (singleAnswerRequest == null) { + throw new ApiException( + "Missing the required parameter 'singleAnswerRequest' when calling" + + " singleAnswer(Async)"); + } + + return singleAnswerCall(singleAnswerRequest, _callback); + } + + /** + * Version: 10.4.0.cl or later Processes a natural language query against a specified data model + * and returns a single AI-generated answer without requiring a conversation session. Requires + * `CAN_USE_SPOTTER` privilege and at least view access to the metadata object + * specified in the request. #### Usage guidelines The request must include: - + * `query`: a natural language question (e.g., \"What were total sales last + * quarter?\") - `metadata_identifier`: the unique ID of the data source to query + * against If the request is successful, the API returns a response message containing: - + * `session_identifier`: the unique ID of the generated response - + * `generation_number`: the generation number of the response - + * `message_type`: the type of the response (e.g., `TSAnswer`) - + * `visualization_type`: the generated visualization type (`Chart`, + * `Table`, or `Undefined`) - `tokens` / + * `display_tokens`: the search tokens and user-friendly display tokens for the + * response #### Error responses | Code | Description | + * |------|-----------------------------------------------------------------------------------------------------------------------------------------| + * | 401 | Unauthorized — authentication token is missing, expired, or invalid. | | 403 | + * Forbidden — the authenticated user does not have `CAN_USE_SPOTTER` privilege or + * lacks view permission on the specified metadata object. | > ###### Note: > * This + * endpoint is currently in Beta. Breaking changes may be introduced before the endpoint is made + * Generally Available. > * This endpoint requires Spotter - please contact ThoughtSpot + * support to enable Spotter on your cluster. + * + * @param singleAnswerRequest (required) + * @return ResponseMessage + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the + * response body + * @http.response.details + * + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 Common successful response -
201 Common error response -
400 Operation failed -
401 Unauthorized access. -
403 Forbidden access. -
500 Operation failed -
+ */ + public ResponseMessage singleAnswer(SingleAnswerRequest singleAnswerRequest) + throws ApiException { + ApiResponse localVarResp = singleAnswerWithHttpInfo(singleAnswerRequest); + return localVarResp.getData(); + } + + /** + * Version: 10.4.0.cl or later Processes a natural language query against a specified data model + * and returns a single AI-generated answer without requiring a conversation session. Requires + * `CAN_USE_SPOTTER` privilege and at least view access to the metadata object + * specified in the request. #### Usage guidelines The request must include: - + * `query`: a natural language question (e.g., \"What were total sales last + * quarter?\") - `metadata_identifier`: the unique ID of the data source to query + * against If the request is successful, the API returns a response message containing: - + * `session_identifier`: the unique ID of the generated response - + * `generation_number`: the generation number of the response - + * `message_type`: the type of the response (e.g., `TSAnswer`) - + * `visualization_type`: the generated visualization type (`Chart`, + * `Table`, or `Undefined`) - `tokens` / + * `display_tokens`: the search tokens and user-friendly display tokens for the + * response #### Error responses | Code | Description | + * |------|-----------------------------------------------------------------------------------------------------------------------------------------| + * | 401 | Unauthorized — authentication token is missing, expired, or invalid. | | 403 | + * Forbidden — the authenticated user does not have `CAN_USE_SPOTTER` privilege or + * lacks view permission on the specified metadata object. | > ###### Note: > * This + * endpoint is currently in Beta. Breaking changes may be introduced before the endpoint is made + * Generally Available. > * This endpoint requires Spotter - please contact ThoughtSpot + * support to enable Spotter on your cluster. + * + * @param singleAnswerRequest (required) + * @return ApiResponse<ResponseMessage> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the + * response body + * @http.response.details + * + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 Common successful response -
201 Common error response -
400 Operation failed -
401 Unauthorized access. -
403 Forbidden access. -
500 Operation failed -
+ */ + public ApiResponse singleAnswerWithHttpInfo( + SingleAnswerRequest singleAnswerRequest) throws ApiException { + okhttp3.Call localVarCall = singleAnswerValidateBeforeCall(singleAnswerRequest, null); + Type localVarReturnType = new TypeToken() {}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); + } + + /** + * (asynchronously) Version: 10.4.0.cl or later Processes a natural language query against a + * specified data model and returns a single AI-generated answer without requiring a + * conversation session. Requires `CAN_USE_SPOTTER` privilege and at least view access + * to the metadata object specified in the request. #### Usage guidelines The request must + * include: - `query`: a natural language question (e.g., \"What were total sales + * last quarter?\") - `metadata_identifier`: the unique ID of the data source to + * query against If the request is successful, the API returns a response message containing: - + * `session_identifier`: the unique ID of the generated response - + * `generation_number`: the generation number of the response - + * `message_type`: the type of the response (e.g., `TSAnswer`) - + * `visualization_type`: the generated visualization type (`Chart`, + * `Table`, or `Undefined`) - `tokens` / + * `display_tokens`: the search tokens and user-friendly display tokens for the + * response #### Error responses | Code | Description | + * |------|-----------------------------------------------------------------------------------------------------------------------------------------| + * | 401 | Unauthorized — authentication token is missing, expired, or invalid. | | 403 | + * Forbidden — the authenticated user does not have `CAN_USE_SPOTTER` privilege or + * lacks view permission on the specified metadata object. | > ###### Note: > * This + * endpoint is currently in Beta. Breaking changes may be introduced before the endpoint is made + * Generally Available. > * This endpoint requires Spotter - please contact ThoughtSpot + * support to enable Spotter on your cluster. + * + * @param singleAnswerRequest (required) + * @param _callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body + * object + * @http.response.details + * + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 Common successful response -
201 Common error response -
400 Operation failed -
401 Unauthorized access. -
403 Forbidden access. -
500 Operation failed -
+ */ + public okhttp3.Call singleAnswerAsync( + SingleAnswerRequest singleAnswerRequest, final ApiCallback _callback) + throws ApiException { + + okhttp3.Call localVarCall = singleAnswerValidateBeforeCall(singleAnswerRequest, _callback); + Type localVarReturnType = new TypeToken() {}.getType(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; + } + /** + * Build call for stopConversation + * + * @param conversationIdentifier Unique identifier of the conversation to stop. (required) + * @param _callback Callback for upload/download progress + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
204 Successfully stopped the in-progress agent conversation response for the given. -
400 Operation failed -
401 Unauthorized access. -
403 Forbidden access. -
500 Operation failed -
+ */ + public okhttp3.Call stopConversationCall( + String conversationIdentifier, final ApiCallback _callback) throws ApiException { + String basePath = null; + // Operation Servers + String[] localBasePaths = new String[] {}; + + // Determine Base Path to Use + if (localCustomBaseUrl != null) { + basePath = localCustomBaseUrl; + } else if (localBasePaths.length > 0) { + basePath = localBasePaths[localHostIndex]; + } else { + basePath = null; + } + + Object localVarPostBody = null; + + // create path and map variables + String localVarPath = + "/api/rest/2.0/ai/agent/conversation/{conversation_identifier}/stop-response" + .replace( + "{" + "conversation_identifier" + "}", + localVarApiClient.escapeString(conversationIdentifier.toString())); + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + final String[] localVarAccepts = {"application/json"}; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = {}; + final String localVarContentType = + localVarApiClient.selectHeaderContentType(localVarContentTypes); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } + + String[] localVarAuthNames = new String[] {"bearerAuth"}; + return localVarApiClient.buildCall( + basePath, + localVarPath, + "POST", + localVarQueryParams, + localVarCollectionQueryParams, + localVarPostBody, + localVarHeaderParams, + localVarCookieParams, + localVarFormParams, + localVarAuthNames, + _callback); + } + + @SuppressWarnings("rawtypes") + private okhttp3.Call stopConversationValidateBeforeCall( + String conversationIdentifier, final ApiCallback _callback) throws ApiException { + // verify the required parameter 'conversationIdentifier' is set + if (conversationIdentifier == null) { + throw new ApiException( + "Missing the required parameter 'conversationIdentifier' when calling" + + " stopConversation(Async)"); + } + + return stopConversationCall(conversationIdentifier, _callback); + } + + /** + * Stops an in-progress agent conversation response. Version: 26.6.0.cl or later + * <span>Version: 26.6.0.cl or later Stops an in-progress agent response for the specified + * conversation. Use this endpoint to cancel a response that is actively being generated — for + * example, when the user navigates away, reformulates their question, or no longer needs the + * current result. Requires `CAN_USE_SPOTTER` privilege and access to the specified + * conversation. #### Usage guidelines The request must include: - + * `conversation_identifier` *(path parameter)*: the unique ID of the conversation + * whose active response should be stopped, as returned by `createAgentConversation` A + * successful request returns an empty `204 No Content` response. If there is no + * active response in progress at the time of the call, the request is still treated as + * successful. After stopping a response, the conversation session remains active. You can + * continue sending messages using `sendAgentConversationMessage` or + * `sendAgentConversationMessageStreaming`. #### Example request + * ```bash POST + * /api/rest/2.0/ai/agent/conversation/{conversation_identifier}/stop-response + * ``` #### Typical usage scenario This endpoint is useful when integrating + * Spotter into a chat UI where users can cancel a long-running query. For example: 1. User + * sends a message via `sendAgentConversationMessageStreaming`. 2. User clicks a + * \"Stop generating\" button while the response is streaming. 3. Your client calls + * `stopConversation` with the active `conversation_identifier`. 4. The + * stream is terminated and the user can ask a new question. #### Error responses | Code | + * Description | |------|-------------| | 401 | Unauthorized — authentication token is missing, + * expired, or invalid. | | 403 | Forbidden — the authenticated user does not have + * `CAN_USE_SPOTTER` privilege or lacks access to the specified conversation. | > + * ###### Note: > > - Calling this endpoint when no response is in progress does not + * return an error. > - The conversation context is preserved after stopping — previous + * messages and answers remain accessible. > - Available from version 26.6.0.cl and later. + * > - This endpoint requires Spotter — please contact ThoughtSpot Support to enable Spotter + * on your cluster. > - This feature is available only for **Spotter 3** + * (`SPOTTER3`) version. + * + * @param conversationIdentifier Unique identifier of the conversation to stop. (required) + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the + * response body + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
204 Successfully stopped the in-progress agent conversation response for the given. -
400 Operation failed -
401 Unauthorized access. -
403 Forbidden access. -
500 Operation failed -
+ */ + public void stopConversation(String conversationIdentifier) throws ApiException { + stopConversationWithHttpInfo(conversationIdentifier); + } + + /** + * Stops an in-progress agent conversation response. Version: 26.6.0.cl or later + * <span>Version: 26.6.0.cl or later Stops an in-progress agent response for the specified + * conversation. Use this endpoint to cancel a response that is actively being generated — for + * example, when the user navigates away, reformulates their question, or no longer needs the + * current result. Requires `CAN_USE_SPOTTER` privilege and access to the specified + * conversation. #### Usage guidelines The request must include: - + * `conversation_identifier` *(path parameter)*: the unique ID of the conversation + * whose active response should be stopped, as returned by `createAgentConversation` A + * successful request returns an empty `204 No Content` response. If there is no + * active response in progress at the time of the call, the request is still treated as + * successful. After stopping a response, the conversation session remains active. You can + * continue sending messages using `sendAgentConversationMessage` or + * `sendAgentConversationMessageStreaming`. #### Example request + * ```bash POST + * /api/rest/2.0/ai/agent/conversation/{conversation_identifier}/stop-response + * ``` #### Typical usage scenario This endpoint is useful when integrating + * Spotter into a chat UI where users can cancel a long-running query. For example: 1. User + * sends a message via `sendAgentConversationMessageStreaming`. 2. User clicks a + * \"Stop generating\" button while the response is streaming. 3. Your client calls + * `stopConversation` with the active `conversation_identifier`. 4. The + * stream is terminated and the user can ask a new question. #### Error responses | Code | + * Description | |------|-------------| | 401 | Unauthorized — authentication token is missing, + * expired, or invalid. | | 403 | Forbidden — the authenticated user does not have + * `CAN_USE_SPOTTER` privilege or lacks access to the specified conversation. | > + * ###### Note: > > - Calling this endpoint when no response is in progress does not + * return an error. > - The conversation context is preserved after stopping — previous + * messages and answers remain accessible. > - Available from version 26.6.0.cl and later. + * > - This endpoint requires Spotter — please contact ThoughtSpot Support to enable Spotter + * on your cluster. > - This feature is available only for **Spotter 3** + * (`SPOTTER3`) version. + * + * @param conversationIdentifier Unique identifier of the conversation to stop. (required) + * @return ApiResponse<Void> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the + * response body + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
204 Successfully stopped the in-progress agent conversation response for the given. -
400 Operation failed -
401 Unauthorized access. -
403 Forbidden access. -
500 Operation failed -
+ */ + public ApiResponse stopConversationWithHttpInfo(String conversationIdentifier) + throws ApiException { + okhttp3.Call localVarCall = + stopConversationValidateBeforeCall(conversationIdentifier, null); + return localVarApiClient.execute(localVarCall); + } + + /** + * (asynchronously) Stops an in-progress agent conversation response. Version: 26.6.0.cl or + * later <span>Version: 26.6.0.cl or later Stops an in-progress agent response for the + * specified conversation. Use this endpoint to cancel a response that is actively being + * generated — for example, when the user navigates away, reformulates their question, or no + * longer needs the current result. Requires `CAN_USE_SPOTTER` privilege and access to + * the specified conversation. #### Usage guidelines The request must include: - + * `conversation_identifier` *(path parameter)*: the unique ID of the conversation + * whose active response should be stopped, as returned by `createAgentConversation` A + * successful request returns an empty `204 No Content` response. If there is no + * active response in progress at the time of the call, the request is still treated as + * successful. After stopping a response, the conversation session remains active. You can + * continue sending messages using `sendAgentConversationMessage` or + * `sendAgentConversationMessageStreaming`. #### Example request + * ```bash POST + * /api/rest/2.0/ai/agent/conversation/{conversation_identifier}/stop-response + * ``` #### Typical usage scenario This endpoint is useful when integrating + * Spotter into a chat UI where users can cancel a long-running query. For example: 1. User + * sends a message via `sendAgentConversationMessageStreaming`. 2. User clicks a + * \"Stop generating\" button while the response is streaming. 3. Your client calls + * `stopConversation` with the active `conversation_identifier`. 4. The + * stream is terminated and the user can ask a new question. #### Error responses | Code | + * Description | |------|-------------| | 401 | Unauthorized — authentication token is missing, + * expired, or invalid. | | 403 | Forbidden — the authenticated user does not have + * `CAN_USE_SPOTTER` privilege or lacks access to the specified conversation. | > + * ###### Note: > > - Calling this endpoint when no response is in progress does not + * return an error. > - The conversation context is preserved after stopping — previous + * messages and answers remain accessible. > - Available from version 26.6.0.cl and later. + * > - This endpoint requires Spotter — please contact ThoughtSpot Support to enable Spotter + * on your cluster. > - This feature is available only for **Spotter 3** + * (`SPOTTER3`) version. + * + * @param conversationIdentifier Unique identifier of the conversation to stop. (required) + * @param _callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body + * object + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
204 Successfully stopped the in-progress agent conversation response for the given. -
400 Operation failed -
401 Unauthorized access. -
403 Forbidden access. -
500 Operation failed -
+ */ + public okhttp3.Call stopConversationAsync( + String conversationIdentifier, final ApiCallback _callback) throws ApiException { + + okhttp3.Call localVarCall = + stopConversationValidateBeforeCall(conversationIdentifier, _callback); + localVarApiClient.executeAsync(localVarCall, _callback); + return localVarCall; + } + /** + * Build call for syncMetadata + * + * @param connectionIdentifier Unique ID or name of the connection. (required) + * @param syncMetadataRequest (required) + * @param _callback Callback for upload/download progress + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + * @http.response.details + * + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 Metadata synced successfully. -
400 Invalid request parameters or hierarchy. -
401 Unauthorized access. -
403 Forbidden access. -
404 Connection, table, or column not found. -
500 Unexpected error -
+ */ + public okhttp3.Call syncMetadataCall( + String connectionIdentifier, + SyncMetadataRequest syncMetadataRequest, + final ApiCallback _callback) + throws ApiException { + String basePath = null; + // Operation Servers + String[] localBasePaths = new String[] {}; + + // Determine Base Path to Use + if (localCustomBaseUrl != null) { + basePath = localCustomBaseUrl; + } else if (localBasePaths.length > 0) { + basePath = localBasePaths[localHostIndex]; + } else { + basePath = null; + } + + Object localVarPostBody = syncMetadataRequest; + + // create path and map variables + String localVarPath = + "/api/rest/2.0/connections/{connection_identifier}/resync-metadata" + .replace( + "{" + "connection_identifier" + "}", + localVarApiClient.escapeString(connectionIdentifier.toString())); + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + final String[] localVarAccepts = {"application/json"}; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = {"application/json"}; + final String localVarContentType = + localVarApiClient.selectHeaderContentType(localVarContentTypes); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } + + String[] localVarAuthNames = new String[] {"bearerAuth"}; + return localVarApiClient.buildCall( + basePath, + localVarPath, + "POST", + localVarQueryParams, + localVarCollectionQueryParams, + localVarPostBody, + localVarHeaderParams, + localVarCookieParams, + localVarFormParams, + localVarAuthNames, + _callback); + } + + @SuppressWarnings("rawtypes") + private okhttp3.Call syncMetadataValidateBeforeCall( + String connectionIdentifier, + SyncMetadataRequest syncMetadataRequest, + final ApiCallback _callback) + throws ApiException { + // verify the required parameter 'connectionIdentifier' is set + if (connectionIdentifier == null) { + throw new ApiException( + "Missing the required parameter 'connectionIdentifier' when calling" + + " syncMetadata(Async)"); + } + + // verify the required parameter 'syncMetadataRequest' is set + if (syncMetadataRequest == null) { + throw new ApiException( + "Missing the required parameter 'syncMetadataRequest' when calling" + + " syncMetadata(Async)"); + } + + return syncMetadataCall(connectionIdentifier, syncMetadataRequest, _callback); + } + + /** + * Version: 26.5.0.cl or later Synchronizes connection metadata attributes from your Cloud Data + * Warehouse (CDW) with ThoughtSpot. Requires the `DATAMANAGEMENT` (**Can manage + * data**) privilege. If [Role-Based Access Control + * (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the + * `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` (**Can manage data models**) privilege is + * required. #### Usage guidelines To synchronize attributes from a CDW, specify the connection + * GUID or name in the `connection_identifier` path parameter and + * `sync_attributes` in the request body. Default attribute is + * `[\"DESCRIPTION\"]`. ##### Hierarchical schema * Connection: The + * connection object for the sync operation. * Tables: Tables for the sync operation. When no + * table is specified, all tables are synchronized. * Columns: If the table is specified, you + * can add the columns for the sync operation. If no columns are specified, all columns in the + * specified table are considered for the sync operation. To set the scope for the sync + * operation: * Connection-level: To sync all tables and columns, pass an empty request body, or + * only the attributes in the request body. * Table-level: To synchronize specific tables and + * their columns, specify the table identifiers in the `tables` array. * Column-level: + * To synchronize specific columns, specify the table identifier as the key and column + * identifiers as the value in the `tables` array. ``` { + * \"tables\": [ {\"table-guid-1\": [\"column-guid-1\", + * \"column-guid-2\"]}, \"table-guid-2\" ], \"sync_attributes\": + * [\"DESCRIPTION\"] } ``` ##### API response If the sync operation is + * successful, the API returns the following information: * Status of the sync operation. For + * example, `SUCCESS`, `PARTIAL_SUCCESS`, or `NO_UPDATE`. * Number + * of tables and columns that were updated. * Number of tables and columns with the sync failed + * status when the overall sync status is `PARTIAL_SUCCESS`. * Message text indicating + * the sync results. + * + * @param connectionIdentifier Unique ID or name of the connection. (required) + * @param syncMetadataRequest (required) + * @return SyncMetadataResponse + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the + * response body + * @http.response.details + * + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 Metadata synced successfully. -
400 Invalid request parameters or hierarchy. -
401 Unauthorized access. -
403 Forbidden access. -
404 Connection, table, or column not found. -
500 Unexpected error -
+ */ + public SyncMetadataResponse syncMetadata( + String connectionIdentifier, SyncMetadataRequest syncMetadataRequest) + throws ApiException { + ApiResponse localVarResp = + syncMetadataWithHttpInfo(connectionIdentifier, syncMetadataRequest); + return localVarResp.getData(); + } + + /** + * Version: 26.5.0.cl or later Synchronizes connection metadata attributes from your Cloud Data + * Warehouse (CDW) with ThoughtSpot. Requires the `DATAMANAGEMENT` (**Can manage + * data**) privilege. If [Role-Based Access Control + * (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the + * `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` (**Can manage data models**) privilege is + * required. #### Usage guidelines To synchronize attributes from a CDW, specify the connection + * GUID or name in the `connection_identifier` path parameter and + * `sync_attributes` in the request body. Default attribute is + * `[\"DESCRIPTION\"]`. ##### Hierarchical schema * Connection: The + * connection object for the sync operation. * Tables: Tables for the sync operation. When no + * table is specified, all tables are synchronized. * Columns: If the table is specified, you + * can add the columns for the sync operation. If no columns are specified, all columns in the + * specified table are considered for the sync operation. To set the scope for the sync + * operation: * Connection-level: To sync all tables and columns, pass an empty request body, or + * only the attributes in the request body. * Table-level: To synchronize specific tables and + * their columns, specify the table identifiers in the `tables` array. * Column-level: + * To synchronize specific columns, specify the table identifier as the key and column + * identifiers as the value in the `tables` array. ``` { + * \"tables\": [ {\"table-guid-1\": [\"column-guid-1\", + * \"column-guid-2\"]}, \"table-guid-2\" ], \"sync_attributes\": + * [\"DESCRIPTION\"] } ``` ##### API response If the sync operation is + * successful, the API returns the following information: * Status of the sync operation. For + * example, `SUCCESS`, `PARTIAL_SUCCESS`, or `NO_UPDATE`. * Number + * of tables and columns that were updated. * Number of tables and columns with the sync failed + * status when the overall sync status is `PARTIAL_SUCCESS`. * Message text indicating + * the sync results. + * + * @param connectionIdentifier Unique ID or name of the connection. (required) + * @param syncMetadataRequest (required) + * @return ApiResponse<SyncMetadataResponse> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the + * response body + * @http.response.details + * + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 Metadata synced successfully. -
400 Invalid request parameters or hierarchy. -
401 Unauthorized access. -
403 Forbidden access. -
404 Connection, table, or column not found. -
500 Unexpected error -
+ */ + public ApiResponse syncMetadataWithHttpInfo( + String connectionIdentifier, SyncMetadataRequest syncMetadataRequest) + throws ApiException { + okhttp3.Call localVarCall = + syncMetadataValidateBeforeCall(connectionIdentifier, syncMetadataRequest, null); + Type localVarReturnType = new TypeToken() {}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); + } + + /** + * (asynchronously) Version: 26.5.0.cl or later Synchronizes connection metadata attributes from + * your Cloud Data Warehouse (CDW) with ThoughtSpot. Requires the `DATAMANAGEMENT` + * (**Can manage data**) privilege. If [Role-Based Access Control + * (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the + * `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` (**Can manage data models**) privilege is + * required. #### Usage guidelines To synchronize attributes from a CDW, specify the connection + * GUID or name in the `connection_identifier` path parameter and + * `sync_attributes` in the request body. Default attribute is + * `[\"DESCRIPTION\"]`. ##### Hierarchical schema * Connection: The + * connection object for the sync operation. * Tables: Tables for the sync operation. When no + * table is specified, all tables are synchronized. * Columns: If the table is specified, you + * can add the columns for the sync operation. If no columns are specified, all columns in the + * specified table are considered for the sync operation. To set the scope for the sync + * operation: * Connection-level: To sync all tables and columns, pass an empty request body, or + * only the attributes in the request body. * Table-level: To synchronize specific tables and + * their columns, specify the table identifiers in the `tables` array. * Column-level: + * To synchronize specific columns, specify the table identifier as the key and column + * identifiers as the value in the `tables` array. ``` { + * \"tables\": [ {\"table-guid-1\": [\"column-guid-1\", + * \"column-guid-2\"]}, \"table-guid-2\" ], \"sync_attributes\": + * [\"DESCRIPTION\"] } ``` ##### API response If the sync operation is + * successful, the API returns the following information: * Status of the sync operation. For + * example, `SUCCESS`, `PARTIAL_SUCCESS`, or `NO_UPDATE`. * Number + * of tables and columns that were updated. * Number of tables and columns with the sync failed + * status when the overall sync status is `PARTIAL_SUCCESS`. * Message text indicating + * the sync results. + * + * @param connectionIdentifier Unique ID or name of the connection. (required) + * @param syncMetadataRequest (required) + * @param _callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body + * object + * @http.response.details + * + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 Metadata synced successfully. -
400 Invalid request parameters or hierarchy. -
401 Unauthorized access. -
403 Forbidden access. -
404 Connection, table, or column not found. -
500 Unexpected error -
+ */ + public okhttp3.Call syncMetadataAsync( + String connectionIdentifier, + SyncMetadataRequest syncMetadataRequest, + final ApiCallback _callback) + throws ApiException { + + okhttp3.Call localVarCall = + syncMetadataValidateBeforeCall( + connectionIdentifier, syncMetadataRequest, _callback); + Type localVarReturnType = new TypeToken() {}.getType(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; + } + /** + * Build call for unassignTag + * + * @param unassignTagRequest (required) + * @param _callback Callback for upload/download progress + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
204 Tags successfully unassigned. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public okhttp3.Call unassignTagCall( + UnassignTagRequest unassignTagRequest, final ApiCallback _callback) + throws ApiException { + String basePath = null; + // Operation Servers + String[] localBasePaths = new String[] {}; + + // Determine Base Path to Use + if (localCustomBaseUrl != null) { + basePath = localCustomBaseUrl; + } else if (localBasePaths.length > 0) { + basePath = localBasePaths[localHostIndex]; + } else { + basePath = null; + } + + Object localVarPostBody = unassignTagRequest; + + // create path and map variables + String localVarPath = "/api/rest/2.0/tags/unassign"; + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + final String[] localVarAccepts = {"application/json"}; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = {"application/json"}; + final String localVarContentType = + localVarApiClient.selectHeaderContentType(localVarContentTypes); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } + + String[] localVarAuthNames = new String[] {"bearerAuth"}; + return localVarApiClient.buildCall( + basePath, + localVarPath, + "POST", + localVarQueryParams, + localVarCollectionQueryParams, + localVarPostBody, + localVarHeaderParams, + localVarCookieParams, + localVarFormParams, + localVarAuthNames, + _callback); + } + + @SuppressWarnings("rawtypes") + private okhttp3.Call unassignTagValidateBeforeCall( + UnassignTagRequest unassignTagRequest, final ApiCallback _callback) + throws ApiException { + // verify the required parameter 'unassignTagRequest' is set + if (unassignTagRequest == null) { + throw new ApiException( + "Missing the required parameter 'unassignTagRequest' when calling" + + " unassignTag(Async)"); + } + + return unassignTagCall(unassignTagRequest, _callback); + } + + /** + * Version: 9.0.0.cl or later Removes the tags applied to a Liveboard, Answer, Table, or + * Worksheet. Requires edit access to the metadata object. + * + * @param unassignTagRequest (required) + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the + * response body + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
204 Tags successfully unassigned. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public void unassignTag(UnassignTagRequest unassignTagRequest) throws ApiException { + unassignTagWithHttpInfo(unassignTagRequest); + } + + /** + * Version: 9.0.0.cl or later Removes the tags applied to a Liveboard, Answer, Table, or + * Worksheet. Requires edit access to the metadata object. + * + * @param unassignTagRequest (required) + * @return ApiResponse<Void> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the + * response body + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
204 Tags successfully unassigned. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public ApiResponse unassignTagWithHttpInfo(UnassignTagRequest unassignTagRequest) + throws ApiException { + okhttp3.Call localVarCall = unassignTagValidateBeforeCall(unassignTagRequest, null); + return localVarApiClient.execute(localVarCall); + } + + /** + * (asynchronously) Version: 9.0.0.cl or later Removes the tags applied to a Liveboard, Answer, + * Table, or Worksheet. Requires edit access to the metadata object. + * + * @param unassignTagRequest (required) + * @param _callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body + * object + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
204 Tags successfully unassigned. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public okhttp3.Call unassignTagAsync( + UnassignTagRequest unassignTagRequest, final ApiCallback _callback) + throws ApiException { + + okhttp3.Call localVarCall = unassignTagValidateBeforeCall(unassignTagRequest, _callback); + localVarApiClient.executeAsync(localVarCall, _callback); + return localVarCall; + } + /** + * Build call for unparameterizeMetadata + * + * @param unparameterizeMetadataRequest (required) + * @param _callback Callback for upload/download progress + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
204 Successfuly removed parameters. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public okhttp3.Call unparameterizeMetadataCall( + UnparameterizeMetadataRequest unparameterizeMetadataRequest, + final ApiCallback _callback) + throws ApiException { + String basePath = null; + // Operation Servers + String[] localBasePaths = new String[] {}; + + // Determine Base Path to Use + if (localCustomBaseUrl != null) { + basePath = localCustomBaseUrl; + } else if (localBasePaths.length > 0) { + basePath = localBasePaths[localHostIndex]; + } else { + basePath = null; + } + + Object localVarPostBody = unparameterizeMetadataRequest; + + // create path and map variables + String localVarPath = "/api/rest/2.0/metadata/unparameterize"; + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + final String[] localVarAccepts = {"application/json"}; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = {"application/json"}; + final String localVarContentType = + localVarApiClient.selectHeaderContentType(localVarContentTypes); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } + + String[] localVarAuthNames = new String[] {"bearerAuth"}; + return localVarApiClient.buildCall( + basePath, + localVarPath, + "POST", + localVarQueryParams, + localVarCollectionQueryParams, + localVarPostBody, + localVarHeaderParams, + localVarCookieParams, + localVarFormParams, + localVarAuthNames, + _callback); + } + + @SuppressWarnings("rawtypes") + private okhttp3.Call unparameterizeMetadataValidateBeforeCall( + UnparameterizeMetadataRequest unparameterizeMetadataRequest, + final ApiCallback _callback) + throws ApiException { + // verify the required parameter 'unparameterizeMetadataRequest' is set + if (unparameterizeMetadataRequest == null) { + throw new ApiException( + "Missing the required parameter 'unparameterizeMetadataRequest' when calling" + + " unparameterizeMetadata(Async)"); + } + + return unparameterizeMetadataCall(unparameterizeMetadataRequest, _callback); + } + + /** + * Remove parameterization from fields in metadata objects. Version: 26.5.0.cl or later Allows + * removing parameterization from fields in metadata objects in ThoughtSpot. Requires + * appropriate permissions to modify the metadata object. The API endpoint allows + * unparameterizing the following types of metadata objects: * Logical Tables * Connections * + * Connection Configs For a Logical Table the field type must be `ATTRIBUTE` and field + * name can be one of: * databaseName * schemaName * tableName For a Connection or Connection + * Config, the field type is always `CONNECTION_PROPERTY`. In this case, field_name + * specifies the exact property of the Connection or Connection Config that needs to be + * unparameterized. For Connection Config, the only supported field name is: * impersonate_user + * + * @param unparameterizeMetadataRequest (required) + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the + * response body + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
204 Successfuly removed parameters. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public void unparameterizeMetadata(UnparameterizeMetadataRequest unparameterizeMetadataRequest) + throws ApiException { + unparameterizeMetadataWithHttpInfo(unparameterizeMetadataRequest); + } + + /** + * Remove parameterization from fields in metadata objects. Version: 26.5.0.cl or later Allows + * removing parameterization from fields in metadata objects in ThoughtSpot. Requires + * appropriate permissions to modify the metadata object. The API endpoint allows + * unparameterizing the following types of metadata objects: * Logical Tables * Connections * + * Connection Configs For a Logical Table the field type must be `ATTRIBUTE` and field + * name can be one of: * databaseName * schemaName * tableName For a Connection or Connection + * Config, the field type is always `CONNECTION_PROPERTY`. In this case, field_name + * specifies the exact property of the Connection or Connection Config that needs to be + * unparameterized. For Connection Config, the only supported field name is: * impersonate_user + * + * @param unparameterizeMetadataRequest (required) + * @return ApiResponse<Void> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the + * response body + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
204 Successfuly removed parameters. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public ApiResponse unparameterizeMetadataWithHttpInfo( + UnparameterizeMetadataRequest unparameterizeMetadataRequest) throws ApiException { + okhttp3.Call localVarCall = + unparameterizeMetadataValidateBeforeCall(unparameterizeMetadataRequest, null); + return localVarApiClient.execute(localVarCall); + } + + /** + * (asynchronously) Remove parameterization from fields in metadata objects. Version: 26.5.0.cl + * or later Allows removing parameterization from fields in metadata objects in ThoughtSpot. + * Requires appropriate permissions to modify the metadata object. The API endpoint allows + * unparameterizing the following types of metadata objects: * Logical Tables * Connections * + * Connection Configs For a Logical Table the field type must be `ATTRIBUTE` and field + * name can be one of: * databaseName * schemaName * tableName For a Connection or Connection + * Config, the field type is always `CONNECTION_PROPERTY`. In this case, field_name + * specifies the exact property of the Connection or Connection Config that needs to be + * unparameterized. For Connection Config, the only supported field name is: * impersonate_user + * + * @param unparameterizeMetadataRequest (required) + * @param _callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body + * object + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
204 Successfuly removed parameters. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public okhttp3.Call unparameterizeMetadataAsync( + UnparameterizeMetadataRequest unparameterizeMetadataRequest, + final ApiCallback _callback) + throws ApiException { + + okhttp3.Call localVarCall = + unparameterizeMetadataValidateBeforeCall(unparameterizeMetadataRequest, _callback); + localVarApiClient.executeAsync(localVarCall, _callback); + return localVarCall; + } + /** + * Build call for unpublishMetadata + * + * @param unpublishMetadataRequest (required) + * @param _callback Callback for upload/download progress + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
204 Unpublishing metadata objects is successful. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public okhttp3.Call unpublishMetadataCall( + UnpublishMetadataRequest unpublishMetadataRequest, final ApiCallback _callback) + throws ApiException { + String basePath = null; + // Operation Servers + String[] localBasePaths = new String[] {}; + + // Determine Base Path to Use + if (localCustomBaseUrl != null) { + basePath = localCustomBaseUrl; + } else if (localBasePaths.length > 0) { + basePath = localBasePaths[localHostIndex]; + } else { + basePath = null; + } + + Object localVarPostBody = unpublishMetadataRequest; + + // create path and map variables + String localVarPath = "/api/rest/2.0/security/metadata/unpublish"; + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + final String[] localVarAccepts = {"application/json"}; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = {"application/json"}; + final String localVarContentType = + localVarApiClient.selectHeaderContentType(localVarContentTypes); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } + + String[] localVarAuthNames = new String[] {"bearerAuth"}; + return localVarApiClient.buildCall( + basePath, + localVarPath, + "POST", + localVarQueryParams, + localVarCollectionQueryParams, + localVarPostBody, + localVarHeaderParams, + localVarCookieParams, + localVarFormParams, + localVarAuthNames, + _callback); + } + + @SuppressWarnings("rawtypes") + private okhttp3.Call unpublishMetadataValidateBeforeCall( + UnpublishMetadataRequest unpublishMetadataRequest, final ApiCallback _callback) + throws ApiException { + // verify the required parameter 'unpublishMetadataRequest' is set + if (unpublishMetadataRequest == null) { + throw new ApiException( + "Missing the required parameter 'unpublishMetadataRequest' when calling" + + " unpublishMetadata(Async)"); + } + + return unpublishMetadataCall(unpublishMetadataRequest, _callback); + } + + /** + * Version: 26.5.0.cl or later Allows unpublishing metadata objects from organizations in + * ThoughtSpot. Requires ADMINISTRATION role and TENANT scope. The API endpoint allows + * unpublishing the following types of metadata objects: * Liveboards * Answers * Logical Tables + * When unpublishing objects, you can: * Include dependencies by setting + * `include_dependencies` to true - this will unpublish all dependent objects if no + * other published object is using them * Force unpublish by setting `force` to true - + * this will break all dependent objects in the unpublished organizations + * + * @param unpublishMetadataRequest (required) + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the + * response body + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
204 Unpublishing metadata objects is successful. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public void unpublishMetadata(UnpublishMetadataRequest unpublishMetadataRequest) + throws ApiException { + unpublishMetadataWithHttpInfo(unpublishMetadataRequest); + } + + /** + * Version: 26.5.0.cl or later Allows unpublishing metadata objects from organizations in + * ThoughtSpot. Requires ADMINISTRATION role and TENANT scope. The API endpoint allows + * unpublishing the following types of metadata objects: * Liveboards * Answers * Logical Tables + * When unpublishing objects, you can: * Include dependencies by setting + * `include_dependencies` to true - this will unpublish all dependent objects if no + * other published object is using them * Force unpublish by setting `force` to true - + * this will break all dependent objects in the unpublished organizations + * + * @param unpublishMetadataRequest (required) + * @return ApiResponse<Void> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the + * response body + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
204 Unpublishing metadata objects is successful. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public ApiResponse unpublishMetadataWithHttpInfo( + UnpublishMetadataRequest unpublishMetadataRequest) throws ApiException { + okhttp3.Call localVarCall = + unpublishMetadataValidateBeforeCall(unpublishMetadataRequest, null); + return localVarApiClient.execute(localVarCall); + } + + /** + * (asynchronously) Version: 26.5.0.cl or later Allows unpublishing metadata objects from + * organizations in ThoughtSpot. Requires ADMINISTRATION role and TENANT scope. The API endpoint + * allows unpublishing the following types of metadata objects: * Liveboards * Answers * Logical + * Tables When unpublishing objects, you can: * Include dependencies by setting + * `include_dependencies` to true - this will unpublish all dependent objects if no + * other published object is using them * Force unpublish by setting `force` to true - + * this will break all dependent objects in the unpublished organizations + * + * @param unpublishMetadataRequest (required) + * @param _callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body + * object + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
204 Unpublishing metadata objects is successful. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public okhttp3.Call unpublishMetadataAsync( + UnpublishMetadataRequest unpublishMetadataRequest, final ApiCallback _callback) + throws ApiException { + + okhttp3.Call localVarCall = + unpublishMetadataValidateBeforeCall(unpublishMetadataRequest, _callback); + localVarApiClient.executeAsync(localVarCall, _callback); + return localVarCall; + } + /** + * Build call for updateCalendar + * + * @param calendarIdentifier Unique Id or name of the calendar. (required) + * @param updateCalendarRequest (required) + * @param _callback Callback for upload/download progress + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
204 Custom calendar updated successfully. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public okhttp3.Call updateCalendarCall( + String calendarIdentifier, + UpdateCalendarRequest updateCalendarRequest, + final ApiCallback _callback) + throws ApiException { + String basePath = null; + // Operation Servers + String[] localBasePaths = new String[] {}; + + // Determine Base Path to Use + if (localCustomBaseUrl != null) { + basePath = localCustomBaseUrl; + } else if (localBasePaths.length > 0) { + basePath = localBasePaths[localHostIndex]; + } else { + basePath = null; + } + + Object localVarPostBody = updateCalendarRequest; + + // create path and map variables + String localVarPath = + "/api/rest/2.0/calendars/{calendar_identifier}/update" + .replace( + "{" + "calendar_identifier" + "}", + localVarApiClient.escapeString(calendarIdentifier.toString())); + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + final String[] localVarAccepts = {"application/json"}; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = {"application/json"}; + final String localVarContentType = + localVarApiClient.selectHeaderContentType(localVarContentTypes); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } + + String[] localVarAuthNames = new String[] {"bearerAuth"}; + return localVarApiClient.buildCall( + basePath, + localVarPath, + "POST", + localVarQueryParams, + localVarCollectionQueryParams, + localVarPostBody, + localVarHeaderParams, + localVarCookieParams, + localVarFormParams, + localVarAuthNames, + _callback); + } + + @SuppressWarnings("rawtypes") + private okhttp3.Call updateCalendarValidateBeforeCall( + String calendarIdentifier, + UpdateCalendarRequest updateCalendarRequest, + final ApiCallback _callback) + throws ApiException { + // verify the required parameter 'calendarIdentifier' is set + if (calendarIdentifier == null) { + throw new ApiException( + "Missing the required parameter 'calendarIdentifier' when calling" + + " updateCalendar(Async)"); + } + + // verify the required parameter 'updateCalendarRequest' is set + if (updateCalendarRequest == null) { + throw new ApiException( + "Missing the required parameter 'updateCalendarRequest' when calling" + + " updateCalendar(Async)"); + } + + return updateCalendarCall(calendarIdentifier, updateCalendarRequest, _callback); + } + + /** + * Version: 10.12.0.cl or later Updates the properties of a [custom + * calendar](https://docs.thoughtspot.com/cloud/latest/connections-cust-cal). Requires + * `DATAMANAGEMENT` (**Can manage data**) or `ADMINISTRATION` (**Can + * administer ThoughtSpot**) privilege. If [Role-Based Access Control + * (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your ThoughtSpot + * instance, the `CAN_MANAGE_CUSTOM_CALENDAR` (**Can manage custom calendars**) + * privilege is required. #### Usage guidelines You can update the properties of a calendar + * using one of the following methods: * `FROM_INPUT_PARAMS` to update the calendar + * properties with the values defined in the API request. * `FROM_EXISTING_TABLE` + * Creates a calendar from the parameters defined in the API request. To update a custom + * calendar, specify the calendar ID as a path parameter in the request URL and the following + * parameters in the request body: * Connection ID and Table name * Database and schema name + * attributes: For most Cloud Data Warehouse (CDW) connectors, both `database_name` + * and `schema_name` attributes are required. However, the attribute requirements are + * conditional and vary based on the connector type and its metadata structure. For example, for + * connectors such as Teradata, MySQL, SingleSore, Amazon Aurora MySQL, Amazon RDS MySQL, + * Oracle, and GCP_MYSQL, the `schema_name` is required, whereas the + * `database_name` attribute is not. Similarly, connectors such as ClickHouse require + * you to specify the `database_name` and the schema specification in such cases is + * optional. The API allows you to modify the calendar type, month offset value, start and end + * date, starting day of the week, and prefixes assigned to the year and quarter labels. #### + * Examples Update a custom calendar using an existing Table in ThoughtSpot: ``` + * { \"update_method\": \"FROM_EXISTING_TABLE\", + * \"table_reference\": { \"connection_identifier\": + * \"Connection1\", \"database_name\": \"db1\", + * \"table_name\": \"custom_calendar_2025\", \"schame_name\": + * \"schemaVar\" } } ``` Update a custom calendar with the attributes + * defined in the API request: ``` { \"update_method\": + * \"FROM_INPUT_PARAMS\", \"table_reference\": { + * \"connection_identifier\": \"Connection1\", \"database_name\": + * \"db1\", \"table_name\": \"custom_calendar_2025\", + * \"schame_name\": \"schemaVar\" }, \"month_offset\": + * \"August\", \"start_day_of_week\": \"Monday\", + * \"start_date\": \"08/01/2025\", \"end_date\": + * \"07/31/2026\" } ``` + * + * @param calendarIdentifier Unique Id or name of the calendar. (required) + * @param updateCalendarRequest (required) + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the + * response body + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
204 Custom calendar updated successfully. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public void updateCalendar( + String calendarIdentifier, UpdateCalendarRequest updateCalendarRequest) + throws ApiException { + updateCalendarWithHttpInfo(calendarIdentifier, updateCalendarRequest); + } + + /** + * Version: 10.12.0.cl or later Updates the properties of a [custom + * calendar](https://docs.thoughtspot.com/cloud/latest/connections-cust-cal). Requires + * `DATAMANAGEMENT` (**Can manage data**) or `ADMINISTRATION` (**Can + * administer ThoughtSpot**) privilege. If [Role-Based Access Control + * (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your ThoughtSpot + * instance, the `CAN_MANAGE_CUSTOM_CALENDAR` (**Can manage custom calendars**) + * privilege is required. #### Usage guidelines You can update the properties of a calendar + * using one of the following methods: * `FROM_INPUT_PARAMS` to update the calendar + * properties with the values defined in the API request. * `FROM_EXISTING_TABLE` + * Creates a calendar from the parameters defined in the API request. To update a custom + * calendar, specify the calendar ID as a path parameter in the request URL and the following + * parameters in the request body: * Connection ID and Table name * Database and schema name + * attributes: For most Cloud Data Warehouse (CDW) connectors, both `database_name` + * and `schema_name` attributes are required. However, the attribute requirements are + * conditional and vary based on the connector type and its metadata structure. For example, for + * connectors such as Teradata, MySQL, SingleSore, Amazon Aurora MySQL, Amazon RDS MySQL, + * Oracle, and GCP_MYSQL, the `schema_name` is required, whereas the + * `database_name` attribute is not. Similarly, connectors such as ClickHouse require + * you to specify the `database_name` and the schema specification in such cases is + * optional. The API allows you to modify the calendar type, month offset value, start and end + * date, starting day of the week, and prefixes assigned to the year and quarter labels. #### + * Examples Update a custom calendar using an existing Table in ThoughtSpot: ``` + * { \"update_method\": \"FROM_EXISTING_TABLE\", + * \"table_reference\": { \"connection_identifier\": + * \"Connection1\", \"database_name\": \"db1\", + * \"table_name\": \"custom_calendar_2025\", \"schame_name\": + * \"schemaVar\" } } ``` Update a custom calendar with the attributes + * defined in the API request: ``` { \"update_method\": + * \"FROM_INPUT_PARAMS\", \"table_reference\": { + * \"connection_identifier\": \"Connection1\", \"database_name\": + * \"db1\", \"table_name\": \"custom_calendar_2025\", + * \"schame_name\": \"schemaVar\" }, \"month_offset\": + * \"August\", \"start_day_of_week\": \"Monday\", + * \"start_date\": \"08/01/2025\", \"end_date\": + * \"07/31/2026\" } ``` + * + * @param calendarIdentifier Unique Id or name of the calendar. (required) + * @param updateCalendarRequest (required) + * @return ApiResponse<Void> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the + * response body + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
204 Custom calendar updated successfully. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public ApiResponse updateCalendarWithHttpInfo( + String calendarIdentifier, UpdateCalendarRequest updateCalendarRequest) + throws ApiException { + okhttp3.Call localVarCall = + updateCalendarValidateBeforeCall(calendarIdentifier, updateCalendarRequest, null); + return localVarApiClient.execute(localVarCall); + } + + /** + * (asynchronously) Version: 10.12.0.cl or later Updates the properties of a [custom + * calendar](https://docs.thoughtspot.com/cloud/latest/connections-cust-cal). Requires + * `DATAMANAGEMENT` (**Can manage data**) or `ADMINISTRATION` (**Can + * administer ThoughtSpot**) privilege. If [Role-Based Access Control + * (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your ThoughtSpot + * instance, the `CAN_MANAGE_CUSTOM_CALENDAR` (**Can manage custom calendars**) + * privilege is required. #### Usage guidelines You can update the properties of a calendar + * using one of the following methods: * `FROM_INPUT_PARAMS` to update the calendar + * properties with the values defined in the API request. * `FROM_EXISTING_TABLE` + * Creates a calendar from the parameters defined in the API request. To update a custom + * calendar, specify the calendar ID as a path parameter in the request URL and the following + * parameters in the request body: * Connection ID and Table name * Database and schema name + * attributes: For most Cloud Data Warehouse (CDW) connectors, both `database_name` + * and `schema_name` attributes are required. However, the attribute requirements are + * conditional and vary based on the connector type and its metadata structure. For example, for + * connectors such as Teradata, MySQL, SingleSore, Amazon Aurora MySQL, Amazon RDS MySQL, + * Oracle, and GCP_MYSQL, the `schema_name` is required, whereas the + * `database_name` attribute is not. Similarly, connectors such as ClickHouse require + * you to specify the `database_name` and the schema specification in such cases is + * optional. The API allows you to modify the calendar type, month offset value, start and end + * date, starting day of the week, and prefixes assigned to the year and quarter labels. #### + * Examples Update a custom calendar using an existing Table in ThoughtSpot: ``` + * { \"update_method\": \"FROM_EXISTING_TABLE\", + * \"table_reference\": { \"connection_identifier\": + * \"Connection1\", \"database_name\": \"db1\", + * \"table_name\": \"custom_calendar_2025\", \"schame_name\": + * \"schemaVar\" } } ``` Update a custom calendar with the attributes + * defined in the API request: ``` { \"update_method\": + * \"FROM_INPUT_PARAMS\", \"table_reference\": { + * \"connection_identifier\": \"Connection1\", \"database_name\": + * \"db1\", \"table_name\": \"custom_calendar_2025\", + * \"schame_name\": \"schemaVar\" }, \"month_offset\": + * \"August\", \"start_day_of_week\": \"Monday\", + * \"start_date\": \"08/01/2025\", \"end_date\": + * \"07/31/2026\" } ``` + * + * @param calendarIdentifier Unique Id or name of the calendar. (required) + * @param updateCalendarRequest (required) + * @param _callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body + * object + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
204 Custom calendar updated successfully. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public okhttp3.Call updateCalendarAsync( + String calendarIdentifier, + UpdateCalendarRequest updateCalendarRequest, + final ApiCallback _callback) + throws ApiException { + + okhttp3.Call localVarCall = + updateCalendarValidateBeforeCall( + calendarIdentifier, updateCalendarRequest, _callback); + localVarApiClient.executeAsync(localVarCall, _callback); + return localVarCall; + } + /** + * Build call for updateCollection + * + * @param collectionIdentifier Unique GUID of the collection. Note: Collection names cannot be + * used as identifiers since duplicate names are allowed. (required) + * @param updateCollectionRequest (required) + * @param _callback Callback for upload/download progress + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + * @http.response.details + * + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
204 Collection updated successfully. No content returned. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
404 Resource not found. -
500 Unexpected error -
+ */ + public okhttp3.Call updateCollectionCall( + String collectionIdentifier, + UpdateCollectionRequest updateCollectionRequest, + final ApiCallback _callback) + throws ApiException { + String basePath = null; + // Operation Servers + String[] localBasePaths = new String[] {}; + + // Determine Base Path to Use + if (localCustomBaseUrl != null) { + basePath = localCustomBaseUrl; + } else if (localBasePaths.length > 0) { + basePath = localBasePaths[localHostIndex]; + } else { + basePath = null; + } + + Object localVarPostBody = updateCollectionRequest; + + // create path and map variables + String localVarPath = + "/api/rest/2.0/collections/{collection_identifier}/update" + .replace( + "{" + "collection_identifier" + "}", + localVarApiClient.escapeString(collectionIdentifier.toString())); + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + final String[] localVarAccepts = {"application/json"}; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = {"application/json"}; + final String localVarContentType = + localVarApiClient.selectHeaderContentType(localVarContentTypes); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } + + String[] localVarAuthNames = new String[] {"bearerAuth"}; + return localVarApiClient.buildCall( + basePath, + localVarPath, + "POST", + localVarQueryParams, + localVarCollectionQueryParams, + localVarPostBody, + localVarHeaderParams, + localVarCookieParams, + localVarFormParams, + localVarAuthNames, + _callback); + } + + @SuppressWarnings("rawtypes") + private okhttp3.Call updateCollectionValidateBeforeCall( + String collectionIdentifier, + UpdateCollectionRequest updateCollectionRequest, + final ApiCallback _callback) + throws ApiException { + // verify the required parameter 'collectionIdentifier' is set + if (collectionIdentifier == null) { + throw new ApiException( + "Missing the required parameter 'collectionIdentifier' when calling" + + " updateCollection(Async)"); + } + + // verify the required parameter 'updateCollectionRequest' is set + if (updateCollectionRequest == null) { + throw new ApiException( + "Missing the required parameter 'updateCollectionRequest' when calling" + + " updateCollection(Async)"); + } + + return updateCollectionCall(collectionIdentifier, updateCollectionRequest, _callback); + } + + /** + * Version: 26.4.0.cl or later Updates an existing collection in ThoughtSpot. #### Supported + * operations This API endpoint lets you perform the following operations: * Update collection + * name and description * Change visibility settings * Add metadata objects to the collection + * (operation: ADD) * Remove metadata objects from the collection (operation: REMOVE) * Replace + * all metadata objects in the collection (operation: REPLACE) #### Operation types * **ADD**: + * Adds the specified metadata objects to the existing collection without removing current items + * * **REMOVE**: Removes only the specified metadata objects from the collection * **REPLACE**: + * Replaces all existing metadata objects with the specified items (default behavior) + * + * @param collectionIdentifier Unique GUID of the collection. Note: Collection names cannot be + * used as identifiers since duplicate names are allowed. (required) + * @param updateCollectionRequest (required) + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the + * response body + * @http.response.details + * + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
204 Collection updated successfully. No content returned. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
404 Resource not found. -
500 Unexpected error -
+ */ + public void updateCollection( + String collectionIdentifier, UpdateCollectionRequest updateCollectionRequest) + throws ApiException { + updateCollectionWithHttpInfo(collectionIdentifier, updateCollectionRequest); + } + + /** + * Version: 26.4.0.cl or later Updates an existing collection in ThoughtSpot. #### Supported + * operations This API endpoint lets you perform the following operations: * Update collection + * name and description * Change visibility settings * Add metadata objects to the collection + * (operation: ADD) * Remove metadata objects from the collection (operation: REMOVE) * Replace + * all metadata objects in the collection (operation: REPLACE) #### Operation types * **ADD**: + * Adds the specified metadata objects to the existing collection without removing current items + * * **REMOVE**: Removes only the specified metadata objects from the collection * **REPLACE**: + * Replaces all existing metadata objects with the specified items (default behavior) + * + * @param collectionIdentifier Unique GUID of the collection. Note: Collection names cannot be + * used as identifiers since duplicate names are allowed. (required) + * @param updateCollectionRequest (required) + * @return ApiResponse<Void> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the + * response body + * @http.response.details + * + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
204 Collection updated successfully. No content returned. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
404 Resource not found. -
500 Unexpected error -
+ */ + public ApiResponse updateCollectionWithHttpInfo( + String collectionIdentifier, UpdateCollectionRequest updateCollectionRequest) + throws ApiException { + okhttp3.Call localVarCall = + updateCollectionValidateBeforeCall( + collectionIdentifier, updateCollectionRequest, null); + return localVarApiClient.execute(localVarCall); + } + + /** + * (asynchronously) Version: 26.4.0.cl or later Updates an existing collection in ThoughtSpot. + * #### Supported operations This API endpoint lets you perform the following operations: * + * Update collection name and description * Change visibility settings * Add metadata objects to + * the collection (operation: ADD) * Remove metadata objects from the collection (operation: + * REMOVE) * Replace all metadata objects in the collection (operation: REPLACE) #### Operation + * types * **ADD**: Adds the specified metadata objects to the existing collection without + * removing current items * **REMOVE**: Removes only the specified metadata objects from the + * collection * **REPLACE**: Replaces all existing metadata objects with the specified items + * (default behavior) + * + * @param collectionIdentifier Unique GUID of the collection. Note: Collection names cannot be + * used as identifiers since duplicate names are allowed. (required) + * @param updateCollectionRequest (required) + * @param _callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body + * object + * @http.response.details + * + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
204 Collection updated successfully. No content returned. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
404 Resource not found. -
500 Unexpected error -
+ */ + public okhttp3.Call updateCollectionAsync( + String collectionIdentifier, + UpdateCollectionRequest updateCollectionRequest, + final ApiCallback _callback) + throws ApiException { + + okhttp3.Call localVarCall = + updateCollectionValidateBeforeCall( + collectionIdentifier, updateCollectionRequest, _callback); + localVarApiClient.executeAsync(localVarCall, _callback); + return localVarCall; + } + /** + * Build call for updateColumnSecurityRules + * + * @param updateColumnSecurityRulesRequest (required) + * @param _callback Callback for upload/download progress + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
204 Successfully updated column security rules -
400 Bad request - Invalid parameters or table not found -
401 Unauthorized access. -
403 Forbidden - User doesn't have permission to modify security rules for this table -
500 Internal server error -
+ */ + public okhttp3.Call updateColumnSecurityRulesCall( + UpdateColumnSecurityRulesRequest updateColumnSecurityRulesRequest, + final ApiCallback _callback) + throws ApiException { + String basePath = null; + // Operation Servers + String[] localBasePaths = new String[] {}; + + // Determine Base Path to Use + if (localCustomBaseUrl != null) { + basePath = localCustomBaseUrl; + } else if (localBasePaths.length > 0) { + basePath = localBasePaths[localHostIndex]; + } else { + basePath = null; + } + + Object localVarPostBody = updateColumnSecurityRulesRequest; + + // create path and map variables + String localVarPath = "/api/rest/2.0/security/column/rules/update"; + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + final String[] localVarAccepts = {"application/json"}; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = {"application/json"}; + final String localVarContentType = + localVarApiClient.selectHeaderContentType(localVarContentTypes); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } + + String[] localVarAuthNames = new String[] {"bearerAuth"}; + return localVarApiClient.buildCall( + basePath, + localVarPath, + "POST", + localVarQueryParams, + localVarCollectionQueryParams, + localVarPostBody, + localVarHeaderParams, + localVarCookieParams, + localVarFormParams, + localVarAuthNames, + _callback); + } + + @SuppressWarnings("rawtypes") + private okhttp3.Call updateColumnSecurityRulesValidateBeforeCall( + UpdateColumnSecurityRulesRequest updateColumnSecurityRulesRequest, + final ApiCallback _callback) + throws ApiException { + // verify the required parameter 'updateColumnSecurityRulesRequest' is set + if (updateColumnSecurityRulesRequest == null) { + throw new ApiException( + "Missing the required parameter 'updateColumnSecurityRulesRequest' when" + + " calling updateColumnSecurityRules(Async)"); + } + + return updateColumnSecurityRulesCall(updateColumnSecurityRulesRequest, _callback); + } + + /** + * Version: 10.12.0.cl or later Creates, updates, or deletes column security rules for specified + * tables. This API endpoint allows you to create, update, or delete column-level security rules + * on columns of a table. The operation follows an \"all or none\" policy: if defining + * security rules for any of the provided columns fails, the entire operation will be rolled + * back, and no rules will be created. #### Usage guidelines - Provide table identifier using + * either `identifier` (GUID or name) or `obj_identifier` (object ID) - Use + * `clear_csr: true` to remove all column security rules from the table - For each + * column, specify the security rule using `column_security_rules` array - Use + * `is_unsecured: true` to mark a specific column as unprotected - Use + * `group_access` operations to manage group associations: - `ADD`: Add + * groups to the column's access list - `REMOVE`: Remove groups from the + * column's access list - `REPLACE`: Replace all existing groups with the + * specified groups #### Required permissions - `ADMINISTRATION` - Can administer + * ThoughtSpot - `DATAMANAGEMENT` - Can manage data (if RBAC is disabled) - + * `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` - Can manage worksheet views and tables (if + * RBAC is enabled) #### Example request ```json { \"identifier\": + * \"table-guid\", \"obj_identifier\": \"table-object-id\", + * \"clear_csr\": false, \"column_security_rules\": [ { + * \"column_identifier\": \"col id or col name\", + * \"is_unsecured\": false, \"group_access\": [ { \"operation\": + * \"ADD\", \"group_identifiers\": [\"hr_group_id\", + * \"hr_group_name\", \"finance_group_id\"] } ] }, { + * \"column_identifier\": \"col id or col name\", + * \"is_unsecured\": true }, { \"column_identifier\": \"col id or col + * name\", \"is_unsecured\": false, \"group_access\": [ { + * \"operation\": \"REPLACE\", \"group_identifiers\": + * [\"management_group_id\", \"management_group_name\"] } ] } ] } + * ``` #### Request Body Schema - `identifier` (string, optional): GUID + * or name of the table for which we want to create column security rules - + * `obj_identifier` (string, optional): The object ID of the table - + * `clear_csr` (boolean, optional): If true, then all the secured columns will be + * marked as unprotected, and all the group associations will be removed - + * `column_security_rules` (array of objects, required): An array where each object + * defines the security rule for a specific column Each column security rule object contains: - + * `column_identifier` (string, required): Column identifier (col_id or name) - + * `is_unsecured` (boolean, optional): If true, the column will be marked as + * unprotected and all groups associated with it will be removed - `group_access` + * (array of objects, optional): Array of group operation objects Each group operation object + * contains: - `operation` (string, required): Operation type - ADD, REMOVE, or + * REPLACE - `group_identifiers` (array of strings, required): Array of group + * identifiers (name or GUID) on which the operation will be performed #### Response This API + * does not return any response body. A successful operation returns HTTP 200 status code. #### + * Operation Types - **ADD**: Adds the specified groups to the column's access list - + * **REMOVE**: Removes the specified groups from the column's access list - **REPLACE**: + * Replaces all existing groups with the specified groups + * + * @param updateColumnSecurityRulesRequest (required) + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the + * response body + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
204 Successfully updated column security rules -
400 Bad request - Invalid parameters or table not found -
401 Unauthorized access. -
403 Forbidden - User doesn't have permission to modify security rules for this table -
500 Internal server error -
+ */ + public void updateColumnSecurityRules( + UpdateColumnSecurityRulesRequest updateColumnSecurityRulesRequest) throws ApiException { + updateColumnSecurityRulesWithHttpInfo(updateColumnSecurityRulesRequest); + } + + /** + * Version: 10.12.0.cl or later Creates, updates, or deletes column security rules for specified + * tables. This API endpoint allows you to create, update, or delete column-level security rules + * on columns of a table. The operation follows an \"all or none\" policy: if defining + * security rules for any of the provided columns fails, the entire operation will be rolled + * back, and no rules will be created. #### Usage guidelines - Provide table identifier using + * either `identifier` (GUID or name) or `obj_identifier` (object ID) - Use + * `clear_csr: true` to remove all column security rules from the table - For each + * column, specify the security rule using `column_security_rules` array - Use + * `is_unsecured: true` to mark a specific column as unprotected - Use + * `group_access` operations to manage group associations: - `ADD`: Add + * groups to the column's access list - `REMOVE`: Remove groups from the + * column's access list - `REPLACE`: Replace all existing groups with the + * specified groups #### Required permissions - `ADMINISTRATION` - Can administer + * ThoughtSpot - `DATAMANAGEMENT` - Can manage data (if RBAC is disabled) - + * `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` - Can manage worksheet views and tables (if + * RBAC is enabled) #### Example request ```json { \"identifier\": + * \"table-guid\", \"obj_identifier\": \"table-object-id\", + * \"clear_csr\": false, \"column_security_rules\": [ { + * \"column_identifier\": \"col id or col name\", + * \"is_unsecured\": false, \"group_access\": [ { \"operation\": + * \"ADD\", \"group_identifiers\": [\"hr_group_id\", + * \"hr_group_name\", \"finance_group_id\"] } ] }, { + * \"column_identifier\": \"col id or col name\", + * \"is_unsecured\": true }, { \"column_identifier\": \"col id or col + * name\", \"is_unsecured\": false, \"group_access\": [ { + * \"operation\": \"REPLACE\", \"group_identifiers\": + * [\"management_group_id\", \"management_group_name\"] } ] } ] } + * ``` #### Request Body Schema - `identifier` (string, optional): GUID + * or name of the table for which we want to create column security rules - + * `obj_identifier` (string, optional): The object ID of the table - + * `clear_csr` (boolean, optional): If true, then all the secured columns will be + * marked as unprotected, and all the group associations will be removed - + * `column_security_rules` (array of objects, required): An array where each object + * defines the security rule for a specific column Each column security rule object contains: - + * `column_identifier` (string, required): Column identifier (col_id or name) - + * `is_unsecured` (boolean, optional): If true, the column will be marked as + * unprotected and all groups associated with it will be removed - `group_access` + * (array of objects, optional): Array of group operation objects Each group operation object + * contains: - `operation` (string, required): Operation type - ADD, REMOVE, or + * REPLACE - `group_identifiers` (array of strings, required): Array of group + * identifiers (name or GUID) on which the operation will be performed #### Response This API + * does not return any response body. A successful operation returns HTTP 200 status code. #### + * Operation Types - **ADD**: Adds the specified groups to the column's access list - + * **REMOVE**: Removes the specified groups from the column's access list - **REPLACE**: + * Replaces all existing groups with the specified groups + * + * @param updateColumnSecurityRulesRequest (required) + * @return ApiResponse<Void> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the + * response body + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
204 Successfully updated column security rules -
400 Bad request - Invalid parameters or table not found -
401 Unauthorized access. -
403 Forbidden - User doesn't have permission to modify security rules for this table -
500 Internal server error -
+ */ + public ApiResponse updateColumnSecurityRulesWithHttpInfo( + UpdateColumnSecurityRulesRequest updateColumnSecurityRulesRequest) throws ApiException { + okhttp3.Call localVarCall = + updateColumnSecurityRulesValidateBeforeCall(updateColumnSecurityRulesRequest, null); + return localVarApiClient.execute(localVarCall); + } + + /** + * (asynchronously) Version: 10.12.0.cl or later Creates, updates, or deletes column security + * rules for specified tables. This API endpoint allows you to create, update, or delete + * column-level security rules on columns of a table. The operation follows an \"all or + * none\" policy: if defining security rules for any of the provided columns fails, the + * entire operation will be rolled back, and no rules will be created. #### Usage guidelines - + * Provide table identifier using either `identifier` (GUID or name) or + * `obj_identifier` (object ID) - Use `clear_csr: true` to remove all column + * security rules from the table - For each column, specify the security rule using + * `column_security_rules` array - Use `is_unsecured: true` to mark a + * specific column as unprotected - Use `group_access` operations to manage group + * associations: - `ADD`: Add groups to the column's access list - + * `REMOVE`: Remove groups from the column's access list - `REPLACE`: + * Replace all existing groups with the specified groups #### Required permissions - + * `ADMINISTRATION` - Can administer ThoughtSpot - `DATAMANAGEMENT` - Can + * manage data (if RBAC is disabled) - `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` - Can + * manage worksheet views and tables (if RBAC is enabled) #### Example request + * ```json { \"identifier\": \"table-guid\", + * \"obj_identifier\": \"table-object-id\", \"clear_csr\": false, + * \"column_security_rules\": [ { \"column_identifier\": \"col id or + * col name\", \"is_unsecured\": false, \"group_access\": [ { + * \"operation\": \"ADD\", \"group_identifiers\": + * [\"hr_group_id\", \"hr_group_name\", \"finance_group_id\"] } ] + * }, { \"column_identifier\": \"col id or col name\", + * \"is_unsecured\": true }, { \"column_identifier\": \"col id or col + * name\", \"is_unsecured\": false, \"group_access\": [ { + * \"operation\": \"REPLACE\", \"group_identifiers\": + * [\"management_group_id\", \"management_group_name\"] } ] } ] } + * ``` #### Request Body Schema - `identifier` (string, optional): GUID + * or name of the table for which we want to create column security rules - + * `obj_identifier` (string, optional): The object ID of the table - + * `clear_csr` (boolean, optional): If true, then all the secured columns will be + * marked as unprotected, and all the group associations will be removed - + * `column_security_rules` (array of objects, required): An array where each object + * defines the security rule for a specific column Each column security rule object contains: - + * `column_identifier` (string, required): Column identifier (col_id or name) - + * `is_unsecured` (boolean, optional): If true, the column will be marked as + * unprotected and all groups associated with it will be removed - `group_access` + * (array of objects, optional): Array of group operation objects Each group operation object + * contains: - `operation` (string, required): Operation type - ADD, REMOVE, or + * REPLACE - `group_identifiers` (array of strings, required): Array of group + * identifiers (name or GUID) on which the operation will be performed #### Response This API + * does not return any response body. A successful operation returns HTTP 200 status code. #### + * Operation Types - **ADD**: Adds the specified groups to the column's access list - + * **REMOVE**: Removes the specified groups from the column's access list - **REPLACE**: + * Replaces all existing groups with the specified groups + * + * @param updateColumnSecurityRulesRequest (required) + * @param _callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body + * object + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
204 Successfully updated column security rules -
400 Bad request - Invalid parameters or table not found -
401 Unauthorized access. -
403 Forbidden - User doesn't have permission to modify security rules for this table -
500 Internal server error -
+ */ + public okhttp3.Call updateColumnSecurityRulesAsync( + UpdateColumnSecurityRulesRequest updateColumnSecurityRulesRequest, + final ApiCallback _callback) + throws ApiException { + + okhttp3.Call localVarCall = + updateColumnSecurityRulesValidateBeforeCall( + updateColumnSecurityRulesRequest, _callback); + localVarApiClient.executeAsync(localVarCall, _callback); + return localVarCall; + } + /** + * Build call for updateConfig + * + * @param updateConfigRequest (required) + * @param _callback Callback for upload/download progress + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 Successfully updated local repository configuration -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public okhttp3.Call updateConfigCall( + UpdateConfigRequest updateConfigRequest, final ApiCallback _callback) + throws ApiException { + String basePath = null; + // Operation Servers + String[] localBasePaths = new String[] {}; + + // Determine Base Path to Use + if (localCustomBaseUrl != null) { + basePath = localCustomBaseUrl; + } else if (localBasePaths.length > 0) { + basePath = localBasePaths[localHostIndex]; + } else { + basePath = null; + } + + Object localVarPostBody = updateConfigRequest; + + // create path and map variables + String localVarPath = "/api/rest/2.0/vcs/git/config/update"; + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + final String[] localVarAccepts = {"application/json"}; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = {"application/json"}; + final String localVarContentType = + localVarApiClient.selectHeaderContentType(localVarContentTypes); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } + + String[] localVarAuthNames = new String[] {"bearerAuth"}; + return localVarApiClient.buildCall( + basePath, + localVarPath, + "POST", + localVarQueryParams, + localVarCollectionQueryParams, + localVarPostBody, + localVarHeaderParams, + localVarCookieParams, + localVarFormParams, + localVarAuthNames, + _callback); + } + + @SuppressWarnings("rawtypes") + private okhttp3.Call updateConfigValidateBeforeCall( + UpdateConfigRequest updateConfigRequest, final ApiCallback _callback) + throws ApiException { + // verify the required parameter 'updateConfigRequest' is set + if (updateConfigRequest == null) { + throw new ApiException( + "Missing the required parameter 'updateConfigRequest' when calling" + + " updateConfig(Async)"); + } + + return updateConfigCall(updateConfigRequest, _callback); + } + + /** + * Version: 9.2.0.cl or later Updates Git repository configuration settings. Requires + * `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access + * Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance on + * your instance, the `CAN_SETUP_VERSION_CONTROL` (**Can set up version control**) + * privilege. + * + * @param updateConfigRequest (required) + * @return RepoConfigObject + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the + * response body + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 Successfully updated local repository configuration -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public RepoConfigObject updateConfig(UpdateConfigRequest updateConfigRequest) + throws ApiException { + ApiResponse localVarResp = updateConfigWithHttpInfo(updateConfigRequest); + return localVarResp.getData(); + } + + /** + * Version: 9.2.0.cl or later Updates Git repository configuration settings. Requires + * `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access + * Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance on + * your instance, the `CAN_SETUP_VERSION_CONTROL` (**Can set up version control**) + * privilege. + * + * @param updateConfigRequest (required) + * @return ApiResponse<RepoConfigObject> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the + * response body + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 Successfully updated local repository configuration -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public ApiResponse updateConfigWithHttpInfo( + UpdateConfigRequest updateConfigRequest) throws ApiException { + okhttp3.Call localVarCall = updateConfigValidateBeforeCall(updateConfigRequest, null); + Type localVarReturnType = new TypeToken() {}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); + } + + /** + * (asynchronously) Version: 9.2.0.cl or later Updates Git repository configuration settings. + * Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If + * [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled + * on your instance on your instance, the `CAN_SETUP_VERSION_CONTROL` (**Can set up + * version control**) privilege. + * + * @param updateConfigRequest (required) + * @param _callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body + * object + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 Successfully updated local repository configuration -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public okhttp3.Call updateConfigAsync( + UpdateConfigRequest updateConfigRequest, final ApiCallback _callback) + throws ApiException { + + okhttp3.Call localVarCall = updateConfigValidateBeforeCall(updateConfigRequest, _callback); + Type localVarReturnType = new TypeToken() {}.getType(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; + } + /** + * Build call for updateConnection + * + * @param updateConnectionRequest (required) + * @param _callback Callback for upload/download progress + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
204 Connection successfully updated. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ * + * @deprecated + */ + @Deprecated + public okhttp3.Call updateConnectionCall( + UpdateConnectionRequest updateConnectionRequest, final ApiCallback _callback) + throws ApiException { + String basePath = null; + // Operation Servers + String[] localBasePaths = new String[] {}; + + // Determine Base Path to Use + if (localCustomBaseUrl != null) { + basePath = localCustomBaseUrl; + } else if (localBasePaths.length > 0) { + basePath = localBasePaths[localHostIndex]; + } else { + basePath = null; + } + + Object localVarPostBody = updateConnectionRequest; + + // create path and map variables + String localVarPath = "/api/rest/2.0/connection/update"; + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + final String[] localVarAccepts = {"application/json"}; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = {"application/json"}; + final String localVarContentType = + localVarApiClient.selectHeaderContentType(localVarContentTypes); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } + + String[] localVarAuthNames = new String[] {"bearerAuth"}; + return localVarApiClient.buildCall( + basePath, + localVarPath, + "POST", + localVarQueryParams, + localVarCollectionQueryParams, + localVarPostBody, + localVarHeaderParams, + localVarCookieParams, + localVarFormParams, + localVarAuthNames, + _callback); + } + + @Deprecated + @SuppressWarnings("rawtypes") + private okhttp3.Call updateConnectionValidateBeforeCall( + UpdateConnectionRequest updateConnectionRequest, final ApiCallback _callback) + throws ApiException { + // verify the required parameter 'updateConnectionRequest' is set + if (updateConnectionRequest == null) { + throw new ApiException( + "Missing the required parameter 'updateConnectionRequest' when calling" + + " updateConnection(Async)"); + } + + return updateConnectionCall(updateConnectionRequest, _callback); + } + + /** + * Version: 9.2.0.cl or later **Important**: This endpoint is deprecated and will be removed + * from ThoughtSpot in September 2025. ThoughtSpot strongly recommends using the [Update + * connection V2](#/http/api-endpoints/connections/update-connection-v2) endpoint to update your + * connection objects. #### Usage guidelines Updates a connection object. Requires + * `DATAMANAGEMENT` (**Can manage data**) and edit permissions to the connection + * object, or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If + * [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled + * on your instance, the `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit + * Connections**) privilege is required. To update a connection object, pass these parameters in + * your API request: 1. GUID of the connection object. 2. If you are updating tables or database + * schema of a connection object: a. Add the updated JSON map of metadata with database, schema, + * and tables in `data_warehouse_config`. b. Set `validate` to + * `true`. 3. If you are updating a configuration attribute, connection name, or + * description, you can set `validate` to `false`. + * + * @param updateConnectionRequest (required) + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the + * response body + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
204 Connection successfully updated. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ * + * @deprecated + */ + @Deprecated + public void updateConnection(UpdateConnectionRequest updateConnectionRequest) + throws ApiException { + updateConnectionWithHttpInfo(updateConnectionRequest); + } + + /** + * Version: 9.2.0.cl or later **Important**: This endpoint is deprecated and will be removed + * from ThoughtSpot in September 2025. ThoughtSpot strongly recommends using the [Update + * connection V2](#/http/api-endpoints/connections/update-connection-v2) endpoint to update your + * connection objects. #### Usage guidelines Updates a connection object. Requires + * `DATAMANAGEMENT` (**Can manage data**) and edit permissions to the connection + * object, or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If + * [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled + * on your instance, the `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit + * Connections**) privilege is required. To update a connection object, pass these parameters in + * your API request: 1. GUID of the connection object. 2. If you are updating tables or database + * schema of a connection object: a. Add the updated JSON map of metadata with database, schema, + * and tables in `data_warehouse_config`. b. Set `validate` to + * `true`. 3. If you are updating a configuration attribute, connection name, or + * description, you can set `validate` to `false`. + * + * @param updateConnectionRequest (required) + * @return ApiResponse<Void> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the + * response body + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
204 Connection successfully updated. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ * + * @deprecated + */ + @Deprecated + public ApiResponse updateConnectionWithHttpInfo( + UpdateConnectionRequest updateConnectionRequest) throws ApiException { + okhttp3.Call localVarCall = + updateConnectionValidateBeforeCall(updateConnectionRequest, null); + return localVarApiClient.execute(localVarCall); + } + + /** + * (asynchronously) Version: 9.2.0.cl or later **Important**: This endpoint is deprecated and + * will be removed from ThoughtSpot in September 2025. ThoughtSpot strongly recommends using the + * [Update connection V2](#/http/api-endpoints/connections/update-connection-v2) endpoint to + * update your connection objects. #### Usage guidelines Updates a connection object. Requires + * `DATAMANAGEMENT` (**Can manage data**) and edit permissions to the connection + * object, or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If + * [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled + * on your instance, the `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit + * Connections**) privilege is required. To update a connection object, pass these parameters in + * your API request: 1. GUID of the connection object. 2. If you are updating tables or database + * schema of a connection object: a. Add the updated JSON map of metadata with database, schema, + * and tables in `data_warehouse_config`. b. Set `validate` to + * `true`. 3. If you are updating a configuration attribute, connection name, or + * description, you can set `validate` to `false`. + * + * @param updateConnectionRequest (required) + * @param _callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body + * object + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
204 Connection successfully updated. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ * + * @deprecated + */ + @Deprecated + public okhttp3.Call updateConnectionAsync( + UpdateConnectionRequest updateConnectionRequest, final ApiCallback _callback) + throws ApiException { + + okhttp3.Call localVarCall = + updateConnectionValidateBeforeCall(updateConnectionRequest, _callback); + localVarApiClient.executeAsync(localVarCall, _callback); + return localVarCall; + } + /** + * Build call for updateConnectionConfiguration + * + * @param configurationIdentifier Unique ID or name of the configuration. (required) + * @param updateConnectionConfigurationRequest (required) + * @param _callback Callback for upload/download progress + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
204 Connection configuration successfully updated. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public okhttp3.Call updateConnectionConfigurationCall( + String configurationIdentifier, + UpdateConnectionConfigurationRequest updateConnectionConfigurationRequest, + final ApiCallback _callback) + throws ApiException { + String basePath = null; + // Operation Servers + String[] localBasePaths = new String[] {}; + + // Determine Base Path to Use + if (localCustomBaseUrl != null) { + basePath = localCustomBaseUrl; + } else if (localBasePaths.length > 0) { + basePath = localBasePaths[localHostIndex]; + } else { + basePath = null; + } + + Object localVarPostBody = updateConnectionConfigurationRequest; + + // create path and map variables + String localVarPath = + "/api/rest/2.0/connection-configurations/{configuration_identifier}/update" + .replace( + "{" + "configuration_identifier" + "}", + localVarApiClient.escapeString(configurationIdentifier.toString())); + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + final String[] localVarAccepts = {"application/json"}; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = {"application/json"}; + final String localVarContentType = + localVarApiClient.selectHeaderContentType(localVarContentTypes); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } + + String[] localVarAuthNames = new String[] {"bearerAuth"}; + return localVarApiClient.buildCall( + basePath, + localVarPath, + "POST", + localVarQueryParams, + localVarCollectionQueryParams, + localVarPostBody, + localVarHeaderParams, + localVarCookieParams, + localVarFormParams, + localVarAuthNames, + _callback); + } + + @SuppressWarnings("rawtypes") + private okhttp3.Call updateConnectionConfigurationValidateBeforeCall( + String configurationIdentifier, + UpdateConnectionConfigurationRequest updateConnectionConfigurationRequest, + final ApiCallback _callback) + throws ApiException { + // verify the required parameter 'configurationIdentifier' is set + if (configurationIdentifier == null) { + throw new ApiException( + "Missing the required parameter 'configurationIdentifier' when calling" + + " updateConnectionConfiguration(Async)"); + } + + // verify the required parameter 'updateConnectionConfigurationRequest' is set + if (updateConnectionConfigurationRequest == null) { + throw new ApiException( + "Missing the required parameter 'updateConnectionConfigurationRequest' when" + + " calling updateConnectionConfiguration(Async)"); + } + + return updateConnectionConfigurationCall( + configurationIdentifier, updateConnectionConfigurationRequest, _callback); + } + + /** + * Version: 10.12.0.cl or later Updates a connection configuration object. Requires + * `DATAMANAGEMENT` (**Can manage data**) and edit permissions to the connection + * object, or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If + * [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled + * on your instance, the `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit + * Connections**) privilege is required. #### Supported operations This API endpoint lets you + * perform the following operations in a single API request: * Edit the name or description of + * the configuration * Edit the configuration properties * Edit the `policy_type` * + * Edit the type of authentication * Enable or disable a configuration #### Parameterized + * Connection Support For parameterized oauth based connections, only the + * `same_as_parent` and `policy_process_options` attributes are allowed. + * These attributes are not applicable to connections that are not parameterized. **NOTE**: When + * updating a configuration where `disabled` is `true`, you must reset + * `disabled` to `true` in your update request payload. If not explicitly + * set again, the API will default `disabled` to `false`. + * + * @param configurationIdentifier Unique ID or name of the configuration. (required) + * @param updateConnectionConfigurationRequest (required) + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the + * response body + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
204 Connection configuration successfully updated. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public void updateConnectionConfiguration( + String configurationIdentifier, + UpdateConnectionConfigurationRequest updateConnectionConfigurationRequest) + throws ApiException { + updateConnectionConfigurationWithHttpInfo( + configurationIdentifier, updateConnectionConfigurationRequest); + } + + /** + * Version: 10.12.0.cl or later Updates a connection configuration object. Requires + * `DATAMANAGEMENT` (**Can manage data**) and edit permissions to the connection + * object, or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If + * [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled + * on your instance, the `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit + * Connections**) privilege is required. #### Supported operations This API endpoint lets you + * perform the following operations in a single API request: * Edit the name or description of + * the configuration * Edit the configuration properties * Edit the `policy_type` * + * Edit the type of authentication * Enable or disable a configuration #### Parameterized + * Connection Support For parameterized oauth based connections, only the + * `same_as_parent` and `policy_process_options` attributes are allowed. + * These attributes are not applicable to connections that are not parameterized. **NOTE**: When + * updating a configuration where `disabled` is `true`, you must reset + * `disabled` to `true` in your update request payload. If not explicitly + * set again, the API will default `disabled` to `false`. + * + * @param configurationIdentifier Unique ID or name of the configuration. (required) + * @param updateConnectionConfigurationRequest (required) + * @return ApiResponse<Void> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the + * response body + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
204 Connection configuration successfully updated. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public ApiResponse updateConnectionConfigurationWithHttpInfo( + String configurationIdentifier, + UpdateConnectionConfigurationRequest updateConnectionConfigurationRequest) + throws ApiException { + okhttp3.Call localVarCall = + updateConnectionConfigurationValidateBeforeCall( + configurationIdentifier, updateConnectionConfigurationRequest, null); + return localVarApiClient.execute(localVarCall); + } + + /** + * (asynchronously) Version: 10.12.0.cl or later Updates a connection configuration object. + * Requires `DATAMANAGEMENT` (**Can manage data**) and edit permissions to the + * connection object, or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. + * If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is + * enabled on your instance, the `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit + * Connections**) privilege is required. #### Supported operations This API endpoint lets you + * perform the following operations in a single API request: * Edit the name or description of + * the configuration * Edit the configuration properties * Edit the `policy_type` * + * Edit the type of authentication * Enable or disable a configuration #### Parameterized + * Connection Support For parameterized oauth based connections, only the + * `same_as_parent` and `policy_process_options` attributes are allowed. + * These attributes are not applicable to connections that are not parameterized. **NOTE**: When + * updating a configuration where `disabled` is `true`, you must reset + * `disabled` to `true` in your update request payload. If not explicitly + * set again, the API will default `disabled` to `false`. + * + * @param configurationIdentifier Unique ID or name of the configuration. (required) + * @param updateConnectionConfigurationRequest (required) + * @param _callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body + * object + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
204 Connection configuration successfully updated. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public okhttp3.Call updateConnectionConfigurationAsync( + String configurationIdentifier, + UpdateConnectionConfigurationRequest updateConnectionConfigurationRequest, + final ApiCallback _callback) + throws ApiException { + + okhttp3.Call localVarCall = + updateConnectionConfigurationValidateBeforeCall( + configurationIdentifier, updateConnectionConfigurationRequest, _callback); + localVarApiClient.executeAsync(localVarCall, _callback); + return localVarCall; + } + /** + * Build call for updateConnectionStatus + * + * @param connectionIdentifier Unique ID or name of the connection. (required) + * @param updateConnectionStatusRequest (required) + * @param _callback Callback for upload/download progress + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + * @http.response.details + * + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
204 Connection status updated successfully. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
404 Object not found -
500 Unexpected error -
+ */ + public okhttp3.Call updateConnectionStatusCall( + String connectionIdentifier, + UpdateConnectionStatusRequest updateConnectionStatusRequest, + final ApiCallback _callback) + throws ApiException { + String basePath = null; + // Operation Servers + String[] localBasePaths = new String[] {}; + + // Determine Base Path to Use + if (localCustomBaseUrl != null) { + basePath = localCustomBaseUrl; + } else if (localBasePaths.length > 0) { + basePath = localBasePaths[localHostIndex]; + } else { + basePath = null; + } + + Object localVarPostBody = updateConnectionStatusRequest; + + // create path and map variables + String localVarPath = + "/api/rest/2.0/connections/{connection_identifier}/status" + .replace( + "{" + "connection_identifier" + "}", + localVarApiClient.escapeString(connectionIdentifier.toString())); + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + final String[] localVarAccepts = {"application/json"}; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = {"application/json"}; + final String localVarContentType = + localVarApiClient.selectHeaderContentType(localVarContentTypes); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } + + String[] localVarAuthNames = new String[] {"bearerAuth"}; + return localVarApiClient.buildCall( + basePath, + localVarPath, + "POST", + localVarQueryParams, + localVarCollectionQueryParams, + localVarPostBody, + localVarHeaderParams, + localVarCookieParams, + localVarFormParams, + localVarAuthNames, + _callback); + } + + @SuppressWarnings("rawtypes") + private okhttp3.Call updateConnectionStatusValidateBeforeCall( + String connectionIdentifier, + UpdateConnectionStatusRequest updateConnectionStatusRequest, + final ApiCallback _callback) + throws ApiException { + // verify the required parameter 'connectionIdentifier' is set + if (connectionIdentifier == null) { + throw new ApiException( + "Missing the required parameter 'connectionIdentifier' when calling" + + " updateConnectionStatus(Async)"); + } + + // verify the required parameter 'updateConnectionStatusRequest' is set + if (updateConnectionStatusRequest == null) { + throw new ApiException( + "Missing the required parameter 'updateConnectionStatusRequest' when calling" + + " updateConnectionStatus(Async)"); + } + + return updateConnectionStatusCall( + connectionIdentifier, updateConnectionStatusRequest, _callback); + } + + /** + * Version: 26.6.0.cl or later Activates or deactivates a connection. A deactivated connection + * cannot be used for queries or operations until it is activated again. Requires + * `DATAMANAGEMENT` (**Can manage data**) privilege. If [Role-Based Access Control + * (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the + * `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) privilege is + * required. Only the connection owner or an administrator can perform this operation. #### + * Usage guidelines To update the status of a connection, specify the connection GUID or name in + * the `connection_identifier` path parameter and the desired `status` in + * the request body. - **ACTIVATED**: Enables the connection. Queries and operations can resume + * on an activated connection. - **DEACTIVATED**: Disables the connection. It does not remove + * the connection metadata, but only makes the connection unavailable for queries and + * operations. You can reactivate a deactivated connection by setting \"status\": + * \"ACTIVATED\". + * + * @param connectionIdentifier Unique ID or name of the connection. (required) + * @param updateConnectionStatusRequest (required) + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the + * response body + * @http.response.details + * + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
204 Connection status updated successfully. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
404 Object not found -
500 Unexpected error -
+ */ + public void updateConnectionStatus( + String connectionIdentifier, + UpdateConnectionStatusRequest updateConnectionStatusRequest) + throws ApiException { + updateConnectionStatusWithHttpInfo(connectionIdentifier, updateConnectionStatusRequest); + } + + /** + * Version: 26.6.0.cl or later Activates or deactivates a connection. A deactivated connection + * cannot be used for queries or operations until it is activated again. Requires + * `DATAMANAGEMENT` (**Can manage data**) privilege. If [Role-Based Access Control + * (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the + * `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) privilege is + * required. Only the connection owner or an administrator can perform this operation. #### + * Usage guidelines To update the status of a connection, specify the connection GUID or name in + * the `connection_identifier` path parameter and the desired `status` in + * the request body. - **ACTIVATED**: Enables the connection. Queries and operations can resume + * on an activated connection. - **DEACTIVATED**: Disables the connection. It does not remove + * the connection metadata, but only makes the connection unavailable for queries and + * operations. You can reactivate a deactivated connection by setting \"status\": + * \"ACTIVATED\". + * + * @param connectionIdentifier Unique ID or name of the connection. (required) + * @param updateConnectionStatusRequest (required) + * @return ApiResponse<Void> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the + * response body + * @http.response.details + * + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
204 Connection status updated successfully. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
404 Object not found -
500 Unexpected error -
+ */ + public ApiResponse updateConnectionStatusWithHttpInfo( + String connectionIdentifier, + UpdateConnectionStatusRequest updateConnectionStatusRequest) + throws ApiException { + okhttp3.Call localVarCall = + updateConnectionStatusValidateBeforeCall( + connectionIdentifier, updateConnectionStatusRequest, null); + return localVarApiClient.execute(localVarCall); + } + + /** + * (asynchronously) Version: 26.6.0.cl or later Activates or deactivates a connection. A + * deactivated connection cannot be used for queries or operations until it is activated again. + * Requires `DATAMANAGEMENT` (**Can manage data**) privilege. If [Role-Based Access + * Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, + * the `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) privilege is + * required. Only the connection owner or an administrator can perform this operation. #### + * Usage guidelines To update the status of a connection, specify the connection GUID or name in + * the `connection_identifier` path parameter and the desired `status` in + * the request body. - **ACTIVATED**: Enables the connection. Queries and operations can resume + * on an activated connection. - **DEACTIVATED**: Disables the connection. It does not remove + * the connection metadata, but only makes the connection unavailable for queries and + * operations. You can reactivate a deactivated connection by setting \"status\": + * \"ACTIVATED\". + * + * @param connectionIdentifier Unique ID or name of the connection. (required) + * @param updateConnectionStatusRequest (required) + * @param _callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body + * object + * @http.response.details + * + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
204 Connection status updated successfully. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
404 Object not found -
500 Unexpected error -
+ */ + public okhttp3.Call updateConnectionStatusAsync( + String connectionIdentifier, + UpdateConnectionStatusRequest updateConnectionStatusRequest, + final ApiCallback _callback) + throws ApiException { + + okhttp3.Call localVarCall = + updateConnectionStatusValidateBeforeCall( + connectionIdentifier, updateConnectionStatusRequest, _callback); + localVarApiClient.executeAsync(localVarCall, _callback); + return localVarCall; + } + /** + * Build call for updateConnectionV2 + * + * @param connectionIdentifier Unique ID or name of the connection. (required) + * @param updateConnectionV2Request (required) + * @param _callback Callback for upload/download progress + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
204 Connection successfully updated. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public okhttp3.Call updateConnectionV2Call( + String connectionIdentifier, + UpdateConnectionV2Request updateConnectionV2Request, + final ApiCallback _callback) + throws ApiException { + String basePath = null; + // Operation Servers + String[] localBasePaths = new String[] {}; + + // Determine Base Path to Use + if (localCustomBaseUrl != null) { + basePath = localCustomBaseUrl; + } else if (localBasePaths.length > 0) { + basePath = localBasePaths[localHostIndex]; + } else { + basePath = null; + } + + Object localVarPostBody = updateConnectionV2Request; + + // create path and map variables + String localVarPath = + "/api/rest/2.0/connections/{connection_identifier}/update" + .replace( + "{" + "connection_identifier" + "}", + localVarApiClient.escapeString(connectionIdentifier.toString())); + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + final String[] localVarAccepts = {"application/json"}; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = {"application/json"}; + final String localVarContentType = + localVarApiClient.selectHeaderContentType(localVarContentTypes); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } + + String[] localVarAuthNames = new String[] {"bearerAuth"}; + return localVarApiClient.buildCall( + basePath, + localVarPath, + "POST", + localVarQueryParams, + localVarCollectionQueryParams, + localVarPostBody, + localVarHeaderParams, + localVarCookieParams, + localVarFormParams, + localVarAuthNames, + _callback); + } + + @SuppressWarnings("rawtypes") + private okhttp3.Call updateConnectionV2ValidateBeforeCall( + String connectionIdentifier, + UpdateConnectionV2Request updateConnectionV2Request, + final ApiCallback _callback) + throws ApiException { + // verify the required parameter 'connectionIdentifier' is set + if (connectionIdentifier == null) { + throw new ApiException( + "Missing the required parameter 'connectionIdentifier' when calling" + + " updateConnectionV2(Async)"); + } + + // verify the required parameter 'updateConnectionV2Request' is set + if (updateConnectionV2Request == null) { + throw new ApiException( + "Missing the required parameter 'updateConnectionV2Request' when calling" + + " updateConnectionV2(Async)"); + } + + return updateConnectionV2Call(connectionIdentifier, updateConnectionV2Request, _callback); + } + + /** + * Version: 10.4.0.cl or later Updates a connection object. Requires `DATAMANAGEMENT` + * (**Can manage data**) and edit permissions to the connection object, or + * `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access + * Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, + * the `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) privilege is + * required. To update a connection object, pass these parameters in your API request: 1. GUID + * of the connection object. 2. If you are updating tables or database schema of a connection + * object: a. Add the updated JSON map of metadata with database, schema, and tables in + * `data_warehouse_config`. b. Set `validate` to `true`. **NOTE:** + * If the `authentication_type` is anything other than SERVICE_ACCOUNT, you must + * explicitly provide the authenticationType property in the payload. If you do not specify + * authenticationType, the API will default to SERVICE_ACCOUNT as the authentication type. * A + * JSON map of configuration attributes, database details, and table properties in + * `data_warehouse_config` as shown in the following example: * This is an example of + * updating a single table in a empty connection: ``` { + * \"authenticationType\": \"SERVICE_ACCOUNT\", + * \"externalDatabases\": [ { \"name\": \"DEVELOPMENT\", + * \"isAutoCreated\": false, \"schemas\": [ { \"name\": + * \"TS_dataset\", \"tables\": [ { \"name\": + * \"DEMORENAME\", \"type\": \"TABLE\", \"description\": + * \"\", \"selected\": true, \"linked\": true, \"gid\": + * 0, \"datasetId\": \"-1\", \"subType\": \"\", + * \"reportId\": \"\", \"viewId\": \"\", + * \"columns\": [ { \"name\": \"Col1\", \"type\": + * \"VARCHAR\", \"canImport\": true, \"selected\": true, + * \"description\": \"\", \"isLinkedActive\": true, + * \"isAggregate\": false }, { \"name\": \"Col2\", + * \"type\": \"VARCHAR\", \"canImport\": true, + * \"selected\": true, \"description\": \"\", + * \"isLinkedActive\": true, \"isAggregate\": false }, { \"name\": + * \"Col3\", \"type\": \"VARCHAR\", \"canImport\": true, + * \"selected\": true, \"description\": \"\", + * \"isLinkedActive\": true, \"isAggregate\": false }, { \"name\": + * \"Col312\", \"type\": \"VARCHAR\", \"canImport\": + * true, \"selected\": true, \"description\": \"\", + * \"isLinkedActive\": true, \"isAggregate\": false }, { \"name\": + * \"Col4\", \"type\": \"VARCHAR\", \"canImport\": true, + * \"selected\": true, \"description\": \"\", + * \"isLinkedActive\": true, \"isAggregate\": false } ], + * \"relationships\": [] } ] } ] } ], \"configuration\": { + * \"password\": \"\", \"database\": \"DEVELOPMENT\", + * \"role\": \"DEV\", \"accountName\": + * \"thoughtspot_partner\", \"warehouse\": \"DEMO_WH\", + * \"user\": \"DEV_USER\" } } ``` * This is an example of + * updating a single table in an existing connection with tables: ``` { + * \"authenticationType\": \"SERVICE_ACCOUNT\", + * \"externalDatabases\": [ { \"name\": \"DEVELOPMENT\", + * \"isAutoCreated\": false, \"schemas\": [ { \"name\": + * \"TS_dataset\", \"tables\": [ { \"name\": + * \"CUSTOMER\", \"type\": \"TABLE\", \"description\": + * \"\", \"selected\": true, \"linked\": true, \"gid\": + * 0, \"datasetId\": \"-1\", \"subType\": \"\", + * \"reportId\": \"\", \"viewId\": \"\", + * \"columns\": [], \"relationships\": [] }, { \"name\": + * \"tpch5k_falcon_default_schema_users\", \"type\": \"TABLE\", + * \"description\": \"\", \"selected\": true, + * \"linked\": true, \"gid\": 0, \"datasetId\": \"-1\", + * \"subType\": \"\", \"reportId\": \"\", + * \"viewId\": \"\", \"columns\": [ { \"name\": + * \"user_id\", \"type\": \"INT64\", \"canImport\": + * true, \"selected\": true, \"description\": \"\", + * \"isLinkedActive\": true, \"isAggregate\": false }, { \"name\": + * \"product_id\", \"type\": \"INT64\", \"canImport\": + * true, \"selected\": true, \"description\": \"\", + * \"isLinkedActive\": true, \"isAggregate\": false }, { \"name\": + * \"user_cost\", \"type\": \"INT64\", \"canImport\": + * true, \"selected\": true, \"description\": \"\", + * \"isLinkedActive\": true, \"isAggregate\": false } ], + * \"relationships\": [] } ] } ] } ], \"configuration\": { + * \"password\": \"\", \"database\": \"DEVELOPMENT\", + * \"role\": \"DEV\", \"accountName\": + * \"thoughtspot_partner\", \"warehouse\": \"DEMO_WH\", + * \"user\": \"DEV_USER\" } } ``` 3. If you are updating a + * configuration attribute, connection name, or description, you can set `validate` to + * `false`. **NOTE:** If the `authentication_type` is anything other than + * SERVICE_ACCOUNT, you must explicitly provide the authenticationType property in the payload. + * If you do not specify authenticationType, the API will default to SERVICE_ACCOUNT as the + * authentication type. * A JSON map of configuration attributes in + * `data_warehouse_config`. The following example shows the configuration attributes + * for a Snowflake connection: ``` { \"configuration\":{ + * \"accountName\":\"thoughtspot_partner\", + * \"user\":\"tsadmin\", \"password\":\"TestConn123\", + * \"role\":\"sysadmin\", \"warehouse\":\"MEDIUM_WH\" }, + * \"externalDatabases\":[ ] } ``` + * + * @param connectionIdentifier Unique ID or name of the connection. (required) + * @param updateConnectionV2Request (required) + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the + * response body + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
204 Connection successfully updated. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public void updateConnectionV2( + String connectionIdentifier, UpdateConnectionV2Request updateConnectionV2Request) + throws ApiException { + updateConnectionV2WithHttpInfo(connectionIdentifier, updateConnectionV2Request); + } + + /** + * Version: 10.4.0.cl or later Updates a connection object. Requires `DATAMANAGEMENT` + * (**Can manage data**) and edit permissions to the connection object, or + * `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access + * Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, + * the `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) privilege is + * required. To update a connection object, pass these parameters in your API request: 1. GUID + * of the connection object. 2. If you are updating tables or database schema of a connection + * object: a. Add the updated JSON map of metadata with database, schema, and tables in + * `data_warehouse_config`. b. Set `validate` to `true`. **NOTE:** + * If the `authentication_type` is anything other than SERVICE_ACCOUNT, you must + * explicitly provide the authenticationType property in the payload. If you do not specify + * authenticationType, the API will default to SERVICE_ACCOUNT as the authentication type. * A + * JSON map of configuration attributes, database details, and table properties in + * `data_warehouse_config` as shown in the following example: * This is an example of + * updating a single table in a empty connection: ``` { + * \"authenticationType\": \"SERVICE_ACCOUNT\", + * \"externalDatabases\": [ { \"name\": \"DEVELOPMENT\", + * \"isAutoCreated\": false, \"schemas\": [ { \"name\": + * \"TS_dataset\", \"tables\": [ { \"name\": + * \"DEMORENAME\", \"type\": \"TABLE\", \"description\": + * \"\", \"selected\": true, \"linked\": true, \"gid\": + * 0, \"datasetId\": \"-1\", \"subType\": \"\", + * \"reportId\": \"\", \"viewId\": \"\", + * \"columns\": [ { \"name\": \"Col1\", \"type\": + * \"VARCHAR\", \"canImport\": true, \"selected\": true, + * \"description\": \"\", \"isLinkedActive\": true, + * \"isAggregate\": false }, { \"name\": \"Col2\", + * \"type\": \"VARCHAR\", \"canImport\": true, + * \"selected\": true, \"description\": \"\", + * \"isLinkedActive\": true, \"isAggregate\": false }, { \"name\": + * \"Col3\", \"type\": \"VARCHAR\", \"canImport\": true, + * \"selected\": true, \"description\": \"\", + * \"isLinkedActive\": true, \"isAggregate\": false }, { \"name\": + * \"Col312\", \"type\": \"VARCHAR\", \"canImport\": + * true, \"selected\": true, \"description\": \"\", + * \"isLinkedActive\": true, \"isAggregate\": false }, { \"name\": + * \"Col4\", \"type\": \"VARCHAR\", \"canImport\": true, + * \"selected\": true, \"description\": \"\", + * \"isLinkedActive\": true, \"isAggregate\": false } ], + * \"relationships\": [] } ] } ] } ], \"configuration\": { + * \"password\": \"\", \"database\": \"DEVELOPMENT\", + * \"role\": \"DEV\", \"accountName\": + * \"thoughtspot_partner\", \"warehouse\": \"DEMO_WH\", + * \"user\": \"DEV_USER\" } } ``` * This is an example of + * updating a single table in an existing connection with tables: ``` { + * \"authenticationType\": \"SERVICE_ACCOUNT\", + * \"externalDatabases\": [ { \"name\": \"DEVELOPMENT\", + * \"isAutoCreated\": false, \"schemas\": [ { \"name\": + * \"TS_dataset\", \"tables\": [ { \"name\": + * \"CUSTOMER\", \"type\": \"TABLE\", \"description\": + * \"\", \"selected\": true, \"linked\": true, \"gid\": + * 0, \"datasetId\": \"-1\", \"subType\": \"\", + * \"reportId\": \"\", \"viewId\": \"\", + * \"columns\": [], \"relationships\": [] }, { \"name\": + * \"tpch5k_falcon_default_schema_users\", \"type\": \"TABLE\", + * \"description\": \"\", \"selected\": true, + * \"linked\": true, \"gid\": 0, \"datasetId\": \"-1\", + * \"subType\": \"\", \"reportId\": \"\", + * \"viewId\": \"\", \"columns\": [ { \"name\": + * \"user_id\", \"type\": \"INT64\", \"canImport\": + * true, \"selected\": true, \"description\": \"\", + * \"isLinkedActive\": true, \"isAggregate\": false }, { \"name\": + * \"product_id\", \"type\": \"INT64\", \"canImport\": + * true, \"selected\": true, \"description\": \"\", + * \"isLinkedActive\": true, \"isAggregate\": false }, { \"name\": + * \"user_cost\", \"type\": \"INT64\", \"canImport\": + * true, \"selected\": true, \"description\": \"\", + * \"isLinkedActive\": true, \"isAggregate\": false } ], + * \"relationships\": [] } ] } ] } ], \"configuration\": { + * \"password\": \"\", \"database\": \"DEVELOPMENT\", + * \"role\": \"DEV\", \"accountName\": + * \"thoughtspot_partner\", \"warehouse\": \"DEMO_WH\", + * \"user\": \"DEV_USER\" } } ``` 3. If you are updating a + * configuration attribute, connection name, or description, you can set `validate` to + * `false`. **NOTE:** If the `authentication_type` is anything other than + * SERVICE_ACCOUNT, you must explicitly provide the authenticationType property in the payload. + * If you do not specify authenticationType, the API will default to SERVICE_ACCOUNT as the + * authentication type. * A JSON map of configuration attributes in + * `data_warehouse_config`. The following example shows the configuration attributes + * for a Snowflake connection: ``` { \"configuration\":{ + * \"accountName\":\"thoughtspot_partner\", + * \"user\":\"tsadmin\", \"password\":\"TestConn123\", + * \"role\":\"sysadmin\", \"warehouse\":\"MEDIUM_WH\" }, + * \"externalDatabases\":[ ] } ``` + * + * @param connectionIdentifier Unique ID or name of the connection. (required) + * @param updateConnectionV2Request (required) + * @return ApiResponse<Void> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the + * response body + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
204 Connection successfully updated. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public ApiResponse updateConnectionV2WithHttpInfo( + String connectionIdentifier, UpdateConnectionV2Request updateConnectionV2Request) + throws ApiException { + okhttp3.Call localVarCall = + updateConnectionV2ValidateBeforeCall( + connectionIdentifier, updateConnectionV2Request, null); + return localVarApiClient.execute(localVarCall); + } + + /** + * (asynchronously) Version: 10.4.0.cl or later Updates a connection object. Requires + * `DATAMANAGEMENT` (**Can manage data**) and edit permissions to the connection + * object, or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If + * [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled + * on your instance, the `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit + * Connections**) privilege is required. To update a connection object, pass these parameters in + * your API request: 1. GUID of the connection object. 2. If you are updating tables or database + * schema of a connection object: a. Add the updated JSON map of metadata with database, schema, + * and tables in `data_warehouse_config`. b. Set `validate` to + * `true`. **NOTE:** If the `authentication_type` is anything other than + * SERVICE_ACCOUNT, you must explicitly provide the authenticationType property in the payload. + * If you do not specify authenticationType, the API will default to SERVICE_ACCOUNT as the + * authentication type. * A JSON map of configuration attributes, database details, and table + * properties in `data_warehouse_config` as shown in the following example: * This is + * an example of updating a single table in a empty connection: ``` { + * \"authenticationType\": \"SERVICE_ACCOUNT\", + * \"externalDatabases\": [ { \"name\": \"DEVELOPMENT\", + * \"isAutoCreated\": false, \"schemas\": [ { \"name\": + * \"TS_dataset\", \"tables\": [ { \"name\": + * \"DEMORENAME\", \"type\": \"TABLE\", \"description\": + * \"\", \"selected\": true, \"linked\": true, \"gid\": + * 0, \"datasetId\": \"-1\", \"subType\": \"\", + * \"reportId\": \"\", \"viewId\": \"\", + * \"columns\": [ { \"name\": \"Col1\", \"type\": + * \"VARCHAR\", \"canImport\": true, \"selected\": true, + * \"description\": \"\", \"isLinkedActive\": true, + * \"isAggregate\": false }, { \"name\": \"Col2\", + * \"type\": \"VARCHAR\", \"canImport\": true, + * \"selected\": true, \"description\": \"\", + * \"isLinkedActive\": true, \"isAggregate\": false }, { \"name\": + * \"Col3\", \"type\": \"VARCHAR\", \"canImport\": true, + * \"selected\": true, \"description\": \"\", + * \"isLinkedActive\": true, \"isAggregate\": false }, { \"name\": + * \"Col312\", \"type\": \"VARCHAR\", \"canImport\": + * true, \"selected\": true, \"description\": \"\", + * \"isLinkedActive\": true, \"isAggregate\": false }, { \"name\": + * \"Col4\", \"type\": \"VARCHAR\", \"canImport\": true, + * \"selected\": true, \"description\": \"\", + * \"isLinkedActive\": true, \"isAggregate\": false } ], + * \"relationships\": [] } ] } ] } ], \"configuration\": { + * \"password\": \"\", \"database\": \"DEVELOPMENT\", + * \"role\": \"DEV\", \"accountName\": + * \"thoughtspot_partner\", \"warehouse\": \"DEMO_WH\", + * \"user\": \"DEV_USER\" } } ``` * This is an example of + * updating a single table in an existing connection with tables: ``` { + * \"authenticationType\": \"SERVICE_ACCOUNT\", + * \"externalDatabases\": [ { \"name\": \"DEVELOPMENT\", + * \"isAutoCreated\": false, \"schemas\": [ { \"name\": + * \"TS_dataset\", \"tables\": [ { \"name\": + * \"CUSTOMER\", \"type\": \"TABLE\", \"description\": + * \"\", \"selected\": true, \"linked\": true, \"gid\": + * 0, \"datasetId\": \"-1\", \"subType\": \"\", + * \"reportId\": \"\", \"viewId\": \"\", + * \"columns\": [], \"relationships\": [] }, { \"name\": + * \"tpch5k_falcon_default_schema_users\", \"type\": \"TABLE\", + * \"description\": \"\", \"selected\": true, + * \"linked\": true, \"gid\": 0, \"datasetId\": \"-1\", + * \"subType\": \"\", \"reportId\": \"\", + * \"viewId\": \"\", \"columns\": [ { \"name\": + * \"user_id\", \"type\": \"INT64\", \"canImport\": + * true, \"selected\": true, \"description\": \"\", + * \"isLinkedActive\": true, \"isAggregate\": false }, { \"name\": + * \"product_id\", \"type\": \"INT64\", \"canImport\": + * true, \"selected\": true, \"description\": \"\", + * \"isLinkedActive\": true, \"isAggregate\": false }, { \"name\": + * \"user_cost\", \"type\": \"INT64\", \"canImport\": + * true, \"selected\": true, \"description\": \"\", + * \"isLinkedActive\": true, \"isAggregate\": false } ], + * \"relationships\": [] } ] } ] } ], \"configuration\": { + * \"password\": \"\", \"database\": \"DEVELOPMENT\", + * \"role\": \"DEV\", \"accountName\": + * \"thoughtspot_partner\", \"warehouse\": \"DEMO_WH\", + * \"user\": \"DEV_USER\" } } ``` 3. If you are updating a + * configuration attribute, connection name, or description, you can set `validate` to + * `false`. **NOTE:** If the `authentication_type` is anything other than + * SERVICE_ACCOUNT, you must explicitly provide the authenticationType property in the payload. + * If you do not specify authenticationType, the API will default to SERVICE_ACCOUNT as the + * authentication type. * A JSON map of configuration attributes in + * `data_warehouse_config`. The following example shows the configuration attributes + * for a Snowflake connection: ``` { \"configuration\":{ + * \"accountName\":\"thoughtspot_partner\", + * \"user\":\"tsadmin\", \"password\":\"TestConn123\", + * \"role\":\"sysadmin\", \"warehouse\":\"MEDIUM_WH\" }, + * \"externalDatabases\":[ ] } ``` + * + * @param connectionIdentifier Unique ID or name of the connection. (required) + * @param updateConnectionV2Request (required) + * @param _callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body + * object + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
204 Connection successfully updated. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public okhttp3.Call updateConnectionV2Async( + String connectionIdentifier, + UpdateConnectionV2Request updateConnectionV2Request, + final ApiCallback _callback) + throws ApiException { + + okhttp3.Call localVarCall = + updateConnectionV2ValidateBeforeCall( + connectionIdentifier, updateConnectionV2Request, _callback); + localVarApiClient.executeAsync(localVarCall, _callback); + return localVarCall; + } + /** + * Build call for updateCustomAction + * + * @param customActionIdentifier Unique ID or name of the custom action. (required) + * @param updateCustomActionRequest (required) + * @param _callback Callback for upload/download progress + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
204 Custom action updated successfully. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public okhttp3.Call updateCustomActionCall( + String customActionIdentifier, + UpdateCustomActionRequest updateCustomActionRequest, + final ApiCallback _callback) + throws ApiException { + String basePath = null; + // Operation Servers + String[] localBasePaths = new String[] {}; + + // Determine Base Path to Use + if (localCustomBaseUrl != null) { + basePath = localCustomBaseUrl; + } else if (localBasePaths.length > 0) { + basePath = localBasePaths[localHostIndex]; + } else { + basePath = null; + } + + Object localVarPostBody = updateCustomActionRequest; + + // create path and map variables + String localVarPath = + "/api/rest/2.0/customization/custom-actions/{custom_action_identifier}/update" + .replace( + "{" + "custom_action_identifier" + "}", + localVarApiClient.escapeString(customActionIdentifier.toString())); + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + final String[] localVarAccepts = {"application/json"}; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = {"application/json"}; + final String localVarContentType = + localVarApiClient.selectHeaderContentType(localVarContentTypes); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } + + String[] localVarAuthNames = new String[] {"bearerAuth"}; + return localVarApiClient.buildCall( + basePath, + localVarPath, + "POST", + localVarQueryParams, + localVarCollectionQueryParams, + localVarPostBody, + localVarHeaderParams, + localVarCookieParams, + localVarFormParams, + localVarAuthNames, + _callback); + } + + @SuppressWarnings("rawtypes") + private okhttp3.Call updateCustomActionValidateBeforeCall( + String customActionIdentifier, + UpdateCustomActionRequest updateCustomActionRequest, + final ApiCallback _callback) + throws ApiException { + // verify the required parameter 'customActionIdentifier' is set + if (customActionIdentifier == null) { + throw new ApiException( + "Missing the required parameter 'customActionIdentifier' when calling" + + " updateCustomAction(Async)"); + } + + // verify the required parameter 'updateCustomActionRequest' is set + if (updateCustomActionRequest == null) { + throw new ApiException( + "Missing the required parameter 'updateCustomActionRequest' when calling" + + " updateCustomAction(Async)"); + } + + return updateCustomActionCall(customActionIdentifier, updateCustomActionRequest, _callback); + } + + /** + * Version: 9.6.0.cl or later Updates a custom action. Requires `DEVELOPER` (**Has + * Developer privilege**) or `ADMINISTRATION` (**Can administer ThoughtSpot**) + * privilege. If [Role-Based Access Control + * (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the + * `DEVELOPER` (**Has developer privilege**) privilege is required. #### Usage + * Guidelines The API allows you to modify the following properties: * Name of the custom action + * * Action availability to groups * Association to metadata objects * Authentication settings + * for a URL-based action For more information, see [Custom + * actions](https://developers.thoughtspot.com/docs/custom-action-intro). + * + * @param customActionIdentifier Unique ID or name of the custom action. (required) + * @param updateCustomActionRequest (required) + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the + * response body + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
204 Custom action updated successfully. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public void updateCustomAction( + String customActionIdentifier, UpdateCustomActionRequest updateCustomActionRequest) + throws ApiException { + updateCustomActionWithHttpInfo(customActionIdentifier, updateCustomActionRequest); + } + + /** + * Version: 9.6.0.cl or later Updates a custom action. Requires `DEVELOPER` (**Has + * Developer privilege**) or `ADMINISTRATION` (**Can administer ThoughtSpot**) + * privilege. If [Role-Based Access Control + * (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the + * `DEVELOPER` (**Has developer privilege**) privilege is required. #### Usage + * Guidelines The API allows you to modify the following properties: * Name of the custom action + * * Action availability to groups * Association to metadata objects * Authentication settings + * for a URL-based action For more information, see [Custom + * actions](https://developers.thoughtspot.com/docs/custom-action-intro). + * + * @param customActionIdentifier Unique ID or name of the custom action. (required) + * @param updateCustomActionRequest (required) + * @return ApiResponse<Void> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the + * response body + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
204 Custom action updated successfully. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public ApiResponse updateCustomActionWithHttpInfo( + String customActionIdentifier, UpdateCustomActionRequest updateCustomActionRequest) + throws ApiException { + okhttp3.Call localVarCall = + updateCustomActionValidateBeforeCall( + customActionIdentifier, updateCustomActionRequest, null); + return localVarApiClient.execute(localVarCall); + } + + /** + * (asynchronously) Version: 9.6.0.cl or later Updates a custom action. Requires + * `DEVELOPER` (**Has Developer privilege**) or `ADMINISTRATION` (**Can + * administer ThoughtSpot**) privilege. If [Role-Based Access Control + * (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the + * `DEVELOPER` (**Has developer privilege**) privilege is required. #### Usage + * Guidelines The API allows you to modify the following properties: * Name of the custom action + * * Action availability to groups * Association to metadata objects * Authentication settings + * for a URL-based action For more information, see [Custom + * actions](https://developers.thoughtspot.com/docs/custom-action-intro). + * + * @param customActionIdentifier Unique ID or name of the custom action. (required) + * @param updateCustomActionRequest (required) + * @param _callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body + * object + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
204 Custom action updated successfully. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public okhttp3.Call updateCustomActionAsync( + String customActionIdentifier, + UpdateCustomActionRequest updateCustomActionRequest, + final ApiCallback _callback) + throws ApiException { + + okhttp3.Call localVarCall = + updateCustomActionValidateBeforeCall( + customActionIdentifier, updateCustomActionRequest, _callback); + localVarApiClient.executeAsync(localVarCall, _callback); + return localVarCall; + } + /** + * Build call for updateDbtConnection + * + * @param dbtConnectionIdentifier Unique ID of the DBT Connection. (required) + * @param connectionName Name of the connection. (optional) + * @param databaseName Name of the Database. (optional) + * @param importType Mention type of Import (optional, default to DBT_CLOUD) + * @param accessToken Access token is mandatory when Import_Type is DBT_CLOUD. (optional) + * @param dbtUrl DBT URL is mandatory when Import_Type is DBT_CLOUD. (optional) + * @param accountId Account ID is mandatory when Import_Type is DBT_CLOUD (optional) + * @param projectId Project ID is mandatory when Import_Type is DBT_CLOUD (optional) + * @param dbtEnvId DBT Environment ID\\\" (optional) + * @param projectName Name of the project (optional) + * @param fileContent Upload DBT Manifest and Catalog artifact files as a ZIP file. This field + * is Mandatory when Import Type is 'ZIP_FILE' (optional) + * @param _callback Callback for upload/download progress + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 DBT Connection successfully updated. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public okhttp3.Call updateDbtConnectionCall( + String dbtConnectionIdentifier, + String connectionName, + String databaseName, + String importType, + String accessToken, + String dbtUrl, + String accountId, + String projectId, + String dbtEnvId, + String projectName, + File fileContent, + final ApiCallback _callback) + throws ApiException { + String basePath = null; + // Operation Servers + String[] localBasePaths = new String[] {}; + + // Determine Base Path to Use + if (localCustomBaseUrl != null) { + basePath = localCustomBaseUrl; + } else if (localBasePaths.length > 0) { + basePath = localBasePaths[localHostIndex]; + } else { + basePath = null; + } + + Object localVarPostBody = null; + + // create path and map variables + String localVarPath = "/api/rest/2.0/dbt/update-dbt-connection"; + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + if (dbtConnectionIdentifier != null) { + localVarFormParams.put("dbt_connection_identifier", dbtConnectionIdentifier); + } + + if (connectionName != null) { + localVarFormParams.put("connection_name", connectionName); + } + + if (databaseName != null) { + localVarFormParams.put("database_name", databaseName); + } + + if (importType != null) { + localVarFormParams.put("import_type", importType); + } + + if (accessToken != null) { + localVarFormParams.put("access_token", accessToken); + } + + if (dbtUrl != null) { + localVarFormParams.put("dbt_url", dbtUrl); + } + + if (accountId != null) { + localVarFormParams.put("account_id", accountId); + } + + if (projectId != null) { + localVarFormParams.put("project_id", projectId); + } + + if (dbtEnvId != null) { + localVarFormParams.put("dbt_env_id", dbtEnvId); + } + + if (projectName != null) { + localVarFormParams.put("project_name", projectName); + } + + if (fileContent != null) { + localVarFormParams.put("file_content", fileContent); + } + + final String[] localVarAccepts = {"application/json"}; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = {"multipart/form-data"}; + final String localVarContentType = + localVarApiClient.selectHeaderContentType(localVarContentTypes); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } + + String[] localVarAuthNames = new String[] {"bearerAuth"}; + return localVarApiClient.buildCall( + basePath, + localVarPath, + "POST", + localVarQueryParams, + localVarCollectionQueryParams, + localVarPostBody, + localVarHeaderParams, + localVarCookieParams, + localVarFormParams, + localVarAuthNames, + _callback); + } + + @SuppressWarnings("rawtypes") + private okhttp3.Call updateDbtConnectionValidateBeforeCall( + String dbtConnectionIdentifier, + String connectionName, + String databaseName, + String importType, + String accessToken, + String dbtUrl, + String accountId, + String projectId, + String dbtEnvId, + String projectName, + File fileContent, + final ApiCallback _callback) + throws ApiException { + // verify the required parameter 'dbtConnectionIdentifier' is set + if (dbtConnectionIdentifier == null) { + throw new ApiException( + "Missing the required parameter 'dbtConnectionIdentifier' when calling" + + " updateDbtConnection(Async)"); + } + + return updateDbtConnectionCall( + dbtConnectionIdentifier, + connectionName, + databaseName, + importType, + accessToken, + dbtUrl, + accountId, + projectId, + dbtEnvId, + projectName, + fileContent, + _callback); + } + + /** + * Version: 9.9.0.cl or later Updates a DBT connection object. Requires + * `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege or + * `DATAMANAGEMENT` (**Can manage data ThoughtSpot**) privilege, along with an + * existing DBT connection. If [Role-Based Access Control + * (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the + * following data control privileges may be required: - + * `CAN_MANAGE_CUSTOM_CALENDAR`(**Can manage custom calendars**) - + * `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) - + * `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` (**Can manage data models**) #### About update + * DBT connection You can modify DBT connection object properties such as embrace connection + * name, embrace database name, import type, account identifier, access token, project + * identifier and environment (or) embrace connection, embrace database name, import type, + * file_content settings. + * + * @param dbtConnectionIdentifier Unique ID of the DBT Connection. (required) + * @param connectionName Name of the connection. (optional) + * @param databaseName Name of the Database. (optional) + * @param importType Mention type of Import (optional, default to DBT_CLOUD) + * @param accessToken Access token is mandatory when Import_Type is DBT_CLOUD. (optional) + * @param dbtUrl DBT URL is mandatory when Import_Type is DBT_CLOUD. (optional) + * @param accountId Account ID is mandatory when Import_Type is DBT_CLOUD (optional) + * @param projectId Project ID is mandatory when Import_Type is DBT_CLOUD (optional) + * @param dbtEnvId DBT Environment ID\\\" (optional) + * @param projectName Name of the project (optional) + * @param fileContent Upload DBT Manifest and Catalog artifact files as a ZIP file. This field + * is Mandatory when Import Type is 'ZIP_FILE' (optional) + * @return Object + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the + * response body + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 DBT Connection successfully updated. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public Object updateDbtConnection( + String dbtConnectionIdentifier, + String connectionName, + String databaseName, + String importType, + String accessToken, + String dbtUrl, + String accountId, + String projectId, + String dbtEnvId, + String projectName, + File fileContent) + throws ApiException { + ApiResponse localVarResp = + updateDbtConnectionWithHttpInfo( + dbtConnectionIdentifier, + connectionName, + databaseName, + importType, + accessToken, + dbtUrl, + accountId, + projectId, + dbtEnvId, + projectName, + fileContent); + return localVarResp.getData(); + } + + /** + * Version: 9.9.0.cl or later Updates a DBT connection object. Requires + * `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege or + * `DATAMANAGEMENT` (**Can manage data ThoughtSpot**) privilege, along with an + * existing DBT connection. If [Role-Based Access Control + * (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the + * following data control privileges may be required: - + * `CAN_MANAGE_CUSTOM_CALENDAR`(**Can manage custom calendars**) - + * `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) - + * `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` (**Can manage data models**) #### About update + * DBT connection You can modify DBT connection object properties such as embrace connection + * name, embrace database name, import type, account identifier, access token, project + * identifier and environment (or) embrace connection, embrace database name, import type, + * file_content settings. + * + * @param dbtConnectionIdentifier Unique ID of the DBT Connection. (required) + * @param connectionName Name of the connection. (optional) + * @param databaseName Name of the Database. (optional) + * @param importType Mention type of Import (optional, default to DBT_CLOUD) + * @param accessToken Access token is mandatory when Import_Type is DBT_CLOUD. (optional) + * @param dbtUrl DBT URL is mandatory when Import_Type is DBT_CLOUD. (optional) + * @param accountId Account ID is mandatory when Import_Type is DBT_CLOUD (optional) + * @param projectId Project ID is mandatory when Import_Type is DBT_CLOUD (optional) + * @param dbtEnvId DBT Environment ID\\\" (optional) + * @param projectName Name of the project (optional) + * @param fileContent Upload DBT Manifest and Catalog artifact files as a ZIP file. This field + * is Mandatory when Import Type is 'ZIP_FILE' (optional) + * @return ApiResponse<Object> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the + * response body + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 DBT Connection successfully updated. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public ApiResponse updateDbtConnectionWithHttpInfo( + String dbtConnectionIdentifier, + String connectionName, + String databaseName, + String importType, + String accessToken, + String dbtUrl, + String accountId, + String projectId, + String dbtEnvId, + String projectName, + File fileContent) + throws ApiException { + okhttp3.Call localVarCall = + updateDbtConnectionValidateBeforeCall( + dbtConnectionIdentifier, + connectionName, + databaseName, + importType, + accessToken, + dbtUrl, + accountId, + projectId, + dbtEnvId, + projectName, + fileContent, + null); + Type localVarReturnType = new TypeToken() {}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); + } + + /** + * (asynchronously) Version: 9.9.0.cl or later Updates a DBT connection object. Requires + * `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege or + * `DATAMANAGEMENT` (**Can manage data ThoughtSpot**) privilege, along with an + * existing DBT connection. If [Role-Based Access Control + * (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the + * following data control privileges may be required: - + * `CAN_MANAGE_CUSTOM_CALENDAR`(**Can manage custom calendars**) - + * `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) - + * `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` (**Can manage data models**) #### About update + * DBT connection You can modify DBT connection object properties such as embrace connection + * name, embrace database name, import type, account identifier, access token, project + * identifier and environment (or) embrace connection, embrace database name, import type, + * file_content settings. + * + * @param dbtConnectionIdentifier Unique ID of the DBT Connection. (required) + * @param connectionName Name of the connection. (optional) + * @param databaseName Name of the Database. (optional) + * @param importType Mention type of Import (optional, default to DBT_CLOUD) + * @param accessToken Access token is mandatory when Import_Type is DBT_CLOUD. (optional) + * @param dbtUrl DBT URL is mandatory when Import_Type is DBT_CLOUD. (optional) + * @param accountId Account ID is mandatory when Import_Type is DBT_CLOUD (optional) + * @param projectId Project ID is mandatory when Import_Type is DBT_CLOUD (optional) + * @param dbtEnvId DBT Environment ID\\\" (optional) + * @param projectName Name of the project (optional) + * @param fileContent Upload DBT Manifest and Catalog artifact files as a ZIP file. This field + * is Mandatory when Import Type is 'ZIP_FILE' (optional) + * @param _callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body + * object + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 DBT Connection successfully updated. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public okhttp3.Call updateDbtConnectionAsync( + String dbtConnectionIdentifier, + String connectionName, + String databaseName, + String importType, + String accessToken, + String dbtUrl, + String accountId, + String projectId, + String dbtEnvId, + String projectName, + File fileContent, + final ApiCallback _callback) + throws ApiException { + + okhttp3.Call localVarCall = + updateDbtConnectionValidateBeforeCall( + dbtConnectionIdentifier, + connectionName, + databaseName, + importType, + accessToken, + dbtUrl, + accountId, + projectId, + dbtEnvId, + projectName, + fileContent, + _callback); + Type localVarReturnType = new TypeToken() {}.getType(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; + } + /** + * Build call for updateEmailCustomization + * + * @param updateEmailCustomizationRequest (required) + * @param _callback Callback for upload/download progress + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
204 Email Customization configuration successfully updated. -
400 Invalid request. -
401 Unauthorized access. -
403 Unauthorized access. -
500 Unexpected error -
+ */ + public okhttp3.Call updateEmailCustomizationCall( + UpdateEmailCustomizationRequest updateEmailCustomizationRequest, + final ApiCallback _callback) + throws ApiException { + String basePath = null; + // Operation Servers + String[] localBasePaths = new String[] {}; + + // Determine Base Path to Use + if (localCustomBaseUrl != null) { + basePath = localCustomBaseUrl; + } else if (localBasePaths.length > 0) { + basePath = localBasePaths[localHostIndex]; + } else { + basePath = null; + } + + Object localVarPostBody = updateEmailCustomizationRequest; + + // create path and map variables + String localVarPath = "/api/rest/2.0/customization/email/update"; + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + final String[] localVarAccepts = {"application/json"}; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = {"application/json"}; + final String localVarContentType = + localVarApiClient.selectHeaderContentType(localVarContentTypes); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } + + String[] localVarAuthNames = new String[] {"bearerAuth"}; + return localVarApiClient.buildCall( + basePath, + localVarPath, + "POST", + localVarQueryParams, + localVarCollectionQueryParams, + localVarPostBody, + localVarHeaderParams, + localVarCookieParams, + localVarFormParams, + localVarAuthNames, + _callback); + } + + @SuppressWarnings("rawtypes") + private okhttp3.Call updateEmailCustomizationValidateBeforeCall( + UpdateEmailCustomizationRequest updateEmailCustomizationRequest, + final ApiCallback _callback) + throws ApiException { + // verify the required parameter 'updateEmailCustomizationRequest' is set + if (updateEmailCustomizationRequest == null) { + throw new ApiException( + "Missing the required parameter 'updateEmailCustomizationRequest' when calling" + + " updateEmailCustomization(Async)"); + } + + return updateEmailCustomizationCall(updateEmailCustomizationRequest, _callback); + } + + /** + * Version: 10.12.0.cl or later Updates a customization configuration for the notification + * email. #### Pre-requisites Requires `DEVELOPER` (**has developer privilege**) or + * `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access + * Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, + * the `DEVELOPER` (**Has developer privilege**) privilege is required. **NOTE**:This + * endpoint in currently in beta. Contact ThoughtSpot support to enable this on your instance. + * #### Usage guidelines To update a custom configuration pass these parameters in your API + * request: - A JSON map of configuration attributes `template_properties`. The + * following example shows a sample set of customization configuration: ``` { { + * \"cta_button_bg_color\": \"#444DEA\", \"cta_text_font_color\": + * \"#FFFFFF\", \"primary_bg_color\": \"#D3DEF0\", + * \"logo_url\": + * \"https://storage.pardot.com/710713/1642089901EbkRibJq/TS_fullworkmark_darkmode.png\", + * \"font_family\": \"\", \"product_name\": + * \"ThoughtSpot\", \"footer_address\": \"444 Castro St, Suite 1000 + * Mountain View, CA 94041\", \"footer_phone\": \"(800) 508-7008\", + * \"replacement_value_for_liveboard\": \"Dashboard\", + * \"replacement_value_for_answer\": \"Chart\", + * \"replacement_value_for_spot_iq\": \"AI Insights\", + * \"hide_footer_phone\": false, \"hide_footer_address\": false, + * \"hide_product_name\": false, \"hide_manage_notification\": false, + * \"hide_mobile_app_nudge\": false, \"hide_privacy_policy\": false, + * \"hide_ts_vocabulary_definitions\": false, \"hide_error_message\": false, + * \"hide_unsubscribe_link\": false, \"hide_notification_status\": false, + * \"hide_modify_alert\": false, \"company_website_url\": + * \"https://your-website.com/\", \"company_privacy_policy_url\" : + * \"https://link-to-privacy-policy.com/\", \"contact_support_url\": + * \"https://link-to-contact-support.com/\", \"hide_contact_support_url\": + * false, \"hide_logo_url\" : false } } ``` + * + * @param updateEmailCustomizationRequest (required) + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the + * response body + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
204 Email Customization configuration successfully updated. -
400 Invalid request. -
401 Unauthorized access. -
403 Unauthorized access. -
500 Unexpected error -
+ */ + public void updateEmailCustomization( + UpdateEmailCustomizationRequest updateEmailCustomizationRequest) throws ApiException { + updateEmailCustomizationWithHttpInfo(updateEmailCustomizationRequest); + } + + /** + * Version: 10.12.0.cl or later Updates a customization configuration for the notification + * email. #### Pre-requisites Requires `DEVELOPER` (**has developer privilege**) or + * `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access + * Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, + * the `DEVELOPER` (**Has developer privilege**) privilege is required. **NOTE**:This + * endpoint in currently in beta. Contact ThoughtSpot support to enable this on your instance. + * #### Usage guidelines To update a custom configuration pass these parameters in your API + * request: - A JSON map of configuration attributes `template_properties`. The + * following example shows a sample set of customization configuration: ``` { { + * \"cta_button_bg_color\": \"#444DEA\", \"cta_text_font_color\": + * \"#FFFFFF\", \"primary_bg_color\": \"#D3DEF0\", + * \"logo_url\": + * \"https://storage.pardot.com/710713/1642089901EbkRibJq/TS_fullworkmark_darkmode.png\", + * \"font_family\": \"\", \"product_name\": + * \"ThoughtSpot\", \"footer_address\": \"444 Castro St, Suite 1000 + * Mountain View, CA 94041\", \"footer_phone\": \"(800) 508-7008\", + * \"replacement_value_for_liveboard\": \"Dashboard\", + * \"replacement_value_for_answer\": \"Chart\", + * \"replacement_value_for_spot_iq\": \"AI Insights\", + * \"hide_footer_phone\": false, \"hide_footer_address\": false, + * \"hide_product_name\": false, \"hide_manage_notification\": false, + * \"hide_mobile_app_nudge\": false, \"hide_privacy_policy\": false, + * \"hide_ts_vocabulary_definitions\": false, \"hide_error_message\": false, + * \"hide_unsubscribe_link\": false, \"hide_notification_status\": false, + * \"hide_modify_alert\": false, \"company_website_url\": + * \"https://your-website.com/\", \"company_privacy_policy_url\" : + * \"https://link-to-privacy-policy.com/\", \"contact_support_url\": + * \"https://link-to-contact-support.com/\", \"hide_contact_support_url\": + * false, \"hide_logo_url\" : false } } ``` + * + * @param updateEmailCustomizationRequest (required) + * @return ApiResponse<Void> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the + * response body + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
204 Email Customization configuration successfully updated. -
400 Invalid request. -
401 Unauthorized access. -
403 Unauthorized access. -
500 Unexpected error -
+ */ + public ApiResponse updateEmailCustomizationWithHttpInfo( + UpdateEmailCustomizationRequest updateEmailCustomizationRequest) throws ApiException { + okhttp3.Call localVarCall = + updateEmailCustomizationValidateBeforeCall(updateEmailCustomizationRequest, null); + return localVarApiClient.execute(localVarCall); + } + + /** + * (asynchronously) Version: 10.12.0.cl or later Updates a customization configuration for the + * notification email. #### Pre-requisites Requires `DEVELOPER` (**has developer + * privilege**) or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If + * [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled + * on your instance, the `DEVELOPER` (**Has developer privilege**) privilege is + * required. **NOTE**:This endpoint in currently in beta. Contact ThoughtSpot support to enable + * this on your instance. #### Usage guidelines To update a custom configuration pass these + * parameters in your API request: - A JSON map of configuration attributes + * `template_properties`. The following example shows a sample set of customization + * configuration: ``` { { \"cta_button_bg_color\": + * \"#444DEA\", \"cta_text_font_color\": \"#FFFFFF\", + * \"primary_bg_color\": \"#D3DEF0\", \"logo_url\": + * \"https://storage.pardot.com/710713/1642089901EbkRibJq/TS_fullworkmark_darkmode.png\", + * \"font_family\": \"\", \"product_name\": + * \"ThoughtSpot\", \"footer_address\": \"444 Castro St, Suite 1000 + * Mountain View, CA 94041\", \"footer_phone\": \"(800) 508-7008\", + * \"replacement_value_for_liveboard\": \"Dashboard\", + * \"replacement_value_for_answer\": \"Chart\", + * \"replacement_value_for_spot_iq\": \"AI Insights\", + * \"hide_footer_phone\": false, \"hide_footer_address\": false, + * \"hide_product_name\": false, \"hide_manage_notification\": false, + * \"hide_mobile_app_nudge\": false, \"hide_privacy_policy\": false, + * \"hide_ts_vocabulary_definitions\": false, \"hide_error_message\": false, + * \"hide_unsubscribe_link\": false, \"hide_notification_status\": false, + * \"hide_modify_alert\": false, \"company_website_url\": + * \"https://your-website.com/\", \"company_privacy_policy_url\" : + * \"https://link-to-privacy-policy.com/\", \"contact_support_url\": + * \"https://link-to-contact-support.com/\", \"hide_contact_support_url\": + * false, \"hide_logo_url\" : false } } ``` + * + * @param updateEmailCustomizationRequest (required) + * @param _callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body + * object + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
204 Email Customization configuration successfully updated. -
400 Invalid request. -
401 Unauthorized access. -
403 Unauthorized access. -
500 Unexpected error -
+ */ + public okhttp3.Call updateEmailCustomizationAsync( + UpdateEmailCustomizationRequest updateEmailCustomizationRequest, + final ApiCallback _callback) + throws ApiException { + + okhttp3.Call localVarCall = + updateEmailCustomizationValidateBeforeCall( + updateEmailCustomizationRequest, _callback); + localVarApiClient.executeAsync(localVarCall, _callback); + return localVarCall; + } + /** + * Build call for updateMetadataHeader + * + * @param updateMetadataHeaderRequest (required) + * @param _callback Callback for upload/download progress + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
204 Headers update was successful. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public okhttp3.Call updateMetadataHeaderCall( + UpdateMetadataHeaderRequest updateMetadataHeaderRequest, final ApiCallback _callback) + throws ApiException { + String basePath = null; + // Operation Servers + String[] localBasePaths = new String[] {}; + + // Determine Base Path to Use + if (localCustomBaseUrl != null) { + basePath = localCustomBaseUrl; + } else if (localBasePaths.length > 0) { + basePath = localBasePaths[localHostIndex]; + } else { + basePath = null; + } + + Object localVarPostBody = updateMetadataHeaderRequest; + + // create path and map variables + String localVarPath = "/api/rest/2.0/metadata/headers/update"; + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + final String[] localVarAccepts = {"application/json"}; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = {"application/json"}; + final String localVarContentType = + localVarApiClient.selectHeaderContentType(localVarContentTypes); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } + + String[] localVarAuthNames = new String[] {"bearerAuth"}; + return localVarApiClient.buildCall( + basePath, + localVarPath, + "POST", + localVarQueryParams, + localVarCollectionQueryParams, + localVarPostBody, + localVarHeaderParams, + localVarCookieParams, + localVarFormParams, + localVarAuthNames, + _callback); + } + + @SuppressWarnings("rawtypes") + private okhttp3.Call updateMetadataHeaderValidateBeforeCall( + UpdateMetadataHeaderRequest updateMetadataHeaderRequest, final ApiCallback _callback) + throws ApiException { + // verify the required parameter 'updateMetadataHeaderRequest' is set + if (updateMetadataHeaderRequest == null) { + throw new ApiException( + "Missing the required parameter 'updateMetadataHeaderRequest' when calling" + + " updateMetadataHeader(Async)"); + } + + return updateMetadataHeaderCall(updateMetadataHeaderRequest, _callback); + } + + /** + * Update header attributes for a given list of header objects. Version: 10.6.0.cl or later ## + * Prerequisites - **Privileges Required:** - `DATAMANAGEMENT` (Can manage data) or + * `ADMINISTRATION` (Can administer ThoughtSpot). - **Additional Privileges (if RBAC + * is enabled):** - `ORG_ADMINISTRATION` (Can manage orgs). --- ## Usage Guidelines + * ### Parameters 1. **headers_update** - **Description:** List of header objects with their + * attributes to be updated. Each object contains a list of attributes to be updated in the + * header. - **Usage:** - You must provide either `identifier` or + * `obj_identifier`, but not both. Both fields cannot be empty. - When + * `org_identifier` is set to `-1`, only the `identifier` value is + * accepted; `obj_identifier` is not allowed. 2. **org_identifier** - **Description:** + * GUID (Globally Unique Identifier) or name of the organization. - **Usage:** - Leaving this + * field empty assumes that the changes should be applied to the current organization - Provide + * `org_guid` or `org_name` to uniquely identify the organization where + * changes need to be applied. . - Provide `-1` if changes have to be applied across + * all the org. --- ## Note Currently, this API is enabled only for updating the + * `obj_identifier` attribute. Only `text` will be allowed in + * attribute's value. ## Best Practices 1. **Backup Before Conversion:** Always export + * metadata as a backup before initiating the update process --- ## Examples ### Only + * `identifier` is given ```json { \"headers_update\": [ { + * \"identifier\": \"guid_1\", \"obj_identifier\": \"\", + * \"type\": \"LOGICAL_COLUMN\", \"attributes\": [ { + * \"name\": \"obj_id\", \"value\": \"custom_object_id\" + * } ] } ], \"org_identifier\": \"orgGuid\" } ``` ### Only + * `obj_identifier` is given ```json { \"headers_update\": [ + * { \"obj_identifier\": \"custom_object_id\", \"type\": + * \"ANSWER\", \"attributes\": [ { \"name\": \"obj_id\", + * \"value\": \"custom_object_id\" } ] } ], \"org_identifier\": + * \"orgName\" } ``` ### Executing update for all org `-1` + * ```json { \"headers_update\": [ { \"identifier\": + * \"guid_1\", \"type\": \"ANSWER\", \"attributes\": [ { + * \"name\": \"obj_id\", \"value\": \"custom_object_id\" + * } ] } ], \"org_identifier\": -1 } ``` ### Optional `type` + * is not provided ```json { \"headers_update\": [ { + * \"identifier\": \"guid_1\", \"attributes\": [ { + * \"name\": \"obj_id\", \"value\": \"custom_object_id\" + * } ] } ], \"org_identifier\": -1 } ``` + * + * @param updateMetadataHeaderRequest (required) + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the + * response body + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
204 Headers update was successful. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public void updateMetadataHeader(UpdateMetadataHeaderRequest updateMetadataHeaderRequest) + throws ApiException { + updateMetadataHeaderWithHttpInfo(updateMetadataHeaderRequest); + } + + /** + * Update header attributes for a given list of header objects. Version: 10.6.0.cl or later ## + * Prerequisites - **Privileges Required:** - `DATAMANAGEMENT` (Can manage data) or + * `ADMINISTRATION` (Can administer ThoughtSpot). - **Additional Privileges (if RBAC + * is enabled):** - `ORG_ADMINISTRATION` (Can manage orgs). --- ## Usage Guidelines + * ### Parameters 1. **headers_update** - **Description:** List of header objects with their + * attributes to be updated. Each object contains a list of attributes to be updated in the + * header. - **Usage:** - You must provide either `identifier` or + * `obj_identifier`, but not both. Both fields cannot be empty. - When + * `org_identifier` is set to `-1`, only the `identifier` value is + * accepted; `obj_identifier` is not allowed. 2. **org_identifier** - **Description:** + * GUID (Globally Unique Identifier) or name of the organization. - **Usage:** - Leaving this + * field empty assumes that the changes should be applied to the current organization - Provide + * `org_guid` or `org_name` to uniquely identify the organization where + * changes need to be applied. . - Provide `-1` if changes have to be applied across + * all the org. --- ## Note Currently, this API is enabled only for updating the + * `obj_identifier` attribute. Only `text` will be allowed in + * attribute's value. ## Best Practices 1. **Backup Before Conversion:** Always export + * metadata as a backup before initiating the update process --- ## Examples ### Only + * `identifier` is given ```json { \"headers_update\": [ { + * \"identifier\": \"guid_1\", \"obj_identifier\": \"\", + * \"type\": \"LOGICAL_COLUMN\", \"attributes\": [ { + * \"name\": \"obj_id\", \"value\": \"custom_object_id\" + * } ] } ], \"org_identifier\": \"orgGuid\" } ``` ### Only + * `obj_identifier` is given ```json { \"headers_update\": [ + * { \"obj_identifier\": \"custom_object_id\", \"type\": + * \"ANSWER\", \"attributes\": [ { \"name\": \"obj_id\", + * \"value\": \"custom_object_id\" } ] } ], \"org_identifier\": + * \"orgName\" } ``` ### Executing update for all org `-1` + * ```json { \"headers_update\": [ { \"identifier\": + * \"guid_1\", \"type\": \"ANSWER\", \"attributes\": [ { + * \"name\": \"obj_id\", \"value\": \"custom_object_id\" + * } ] } ], \"org_identifier\": -1 } ``` ### Optional `type` + * is not provided ```json { \"headers_update\": [ { + * \"identifier\": \"guid_1\", \"attributes\": [ { + * \"name\": \"obj_id\", \"value\": \"custom_object_id\" + * } ] } ], \"org_identifier\": -1 } ``` + * + * @param updateMetadataHeaderRequest (required) + * @return ApiResponse<Void> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the + * response body + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
204 Headers update was successful. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public ApiResponse updateMetadataHeaderWithHttpInfo( + UpdateMetadataHeaderRequest updateMetadataHeaderRequest) throws ApiException { + okhttp3.Call localVarCall = + updateMetadataHeaderValidateBeforeCall(updateMetadataHeaderRequest, null); + return localVarApiClient.execute(localVarCall); + } + + /** + * (asynchronously) Update header attributes for a given list of header objects. Version: + * 10.6.0.cl or later ## Prerequisites - **Privileges Required:** - `DATAMANAGEMENT` + * (Can manage data) or `ADMINISTRATION` (Can administer ThoughtSpot). - **Additional + * Privileges (if RBAC is enabled):** - `ORG_ADMINISTRATION` (Can manage orgs). --- ## + * Usage Guidelines ### Parameters 1. **headers_update** - **Description:** List of header + * objects with their attributes to be updated. Each object contains a list of attributes to be + * updated in the header. - **Usage:** - You must provide either `identifier` or + * `obj_identifier`, but not both. Both fields cannot be empty. - When + * `org_identifier` is set to `-1`, only the `identifier` value is + * accepted; `obj_identifier` is not allowed. 2. **org_identifier** - **Description:** + * GUID (Globally Unique Identifier) or name of the organization. - **Usage:** - Leaving this + * field empty assumes that the changes should be applied to the current organization - Provide + * `org_guid` or `org_name` to uniquely identify the organization where + * changes need to be applied. . - Provide `-1` if changes have to be applied across + * all the org. --- ## Note Currently, this API is enabled only for updating the + * `obj_identifier` attribute. Only `text` will be allowed in + * attribute's value. ## Best Practices 1. **Backup Before Conversion:** Always export + * metadata as a backup before initiating the update process --- ## Examples ### Only + * `identifier` is given ```json { \"headers_update\": [ { + * \"identifier\": \"guid_1\", \"obj_identifier\": \"\", + * \"type\": \"LOGICAL_COLUMN\", \"attributes\": [ { + * \"name\": \"obj_id\", \"value\": \"custom_object_id\" + * } ] } ], \"org_identifier\": \"orgGuid\" } ``` ### Only + * `obj_identifier` is given ```json { \"headers_update\": [ + * { \"obj_identifier\": \"custom_object_id\", \"type\": + * \"ANSWER\", \"attributes\": [ { \"name\": \"obj_id\", + * \"value\": \"custom_object_id\" } ] } ], \"org_identifier\": + * \"orgName\" } ``` ### Executing update for all org `-1` + * ```json { \"headers_update\": [ { \"identifier\": + * \"guid_1\", \"type\": \"ANSWER\", \"attributes\": [ { + * \"name\": \"obj_id\", \"value\": \"custom_object_id\" + * } ] } ], \"org_identifier\": -1 } ``` ### Optional `type` + * is not provided ```json { \"headers_update\": [ { + * \"identifier\": \"guid_1\", \"attributes\": [ { + * \"name\": \"obj_id\", \"value\": \"custom_object_id\" + * } ] } ], \"org_identifier\": -1 } ``` + * + * @param updateMetadataHeaderRequest (required) + * @param _callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body + * object + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
204 Headers update was successful. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public okhttp3.Call updateMetadataHeaderAsync( + UpdateMetadataHeaderRequest updateMetadataHeaderRequest, + final ApiCallback _callback) + throws ApiException { + + okhttp3.Call localVarCall = + updateMetadataHeaderValidateBeforeCall(updateMetadataHeaderRequest, _callback); + localVarApiClient.executeAsync(localVarCall, _callback); + return localVarCall; + } + /** + * Build call for updateMetadataObjId + * + * @param updateMetadataObjIdRequest (required) + * @param _callback Callback for upload/download progress + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
204 Headers update was successful. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public okhttp3.Call updateMetadataObjIdCall( + UpdateMetadataObjIdRequest updateMetadataObjIdRequest, final ApiCallback _callback) + throws ApiException { + String basePath = null; + // Operation Servers + String[] localBasePaths = new String[] {}; + + // Determine Base Path to Use + if (localCustomBaseUrl != null) { + basePath = localCustomBaseUrl; + } else if (localBasePaths.length > 0) { + basePath = localBasePaths[localHostIndex]; + } else { + basePath = null; + } + + Object localVarPostBody = updateMetadataObjIdRequest; + + // create path and map variables + String localVarPath = "/api/rest/2.0/metadata/update-obj-id"; + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + final String[] localVarAccepts = {"application/json"}; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = {"application/json"}; + final String localVarContentType = + localVarApiClient.selectHeaderContentType(localVarContentTypes); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } + + String[] localVarAuthNames = new String[] {"bearerAuth"}; + return localVarApiClient.buildCall( + basePath, + localVarPath, + "POST", + localVarQueryParams, + localVarCollectionQueryParams, + localVarPostBody, + localVarHeaderParams, + localVarCookieParams, + localVarFormParams, + localVarAuthNames, + _callback); + } + + @SuppressWarnings("rawtypes") + private okhttp3.Call updateMetadataObjIdValidateBeforeCall( + UpdateMetadataObjIdRequest updateMetadataObjIdRequest, final ApiCallback _callback) + throws ApiException { + // verify the required parameter 'updateMetadataObjIdRequest' is set + if (updateMetadataObjIdRequest == null) { + throw new ApiException( + "Missing the required parameter 'updateMetadataObjIdRequest' when calling" + + " updateMetadataObjId(Async)"); + } + + return updateMetadataObjIdCall(updateMetadataObjIdRequest, _callback); + } + + /** + * Update object IDs for given metadata objects. Version: 10.8.0.cl or later ## Prerequisites - + * **Privileges Required:** - `DATAMANAGEMENT` (Can manage data) or + * `ADMINISTRATION` (Can administer ThoughtSpot). - **Additional Privileges (if RBAC + * is enabled):** - `ORG_ADMINISTRATION` (Can manage orgs). --- ## Usage Guidelines + * ### Parameters 1. **metadata** - **Description:** List of metadata objects to update their + * object IDs. - **Usage:** - Use either `current_obj_id` alone OR use + * `metadata_identifier` with `type` (when needed). - When using + * `metadata_identifier`, the `type` field is required if using a name + * instead of a GUID. - The `new_obj_id` field is always required. --- ## Note This + * API is specifically designed for updating object IDs of metadata objects. It internally uses + * the header update mechanism to perform the changes. ## Best Practices 1. **Backup Before + * Update:** Always export metadata as a backup before initiating the update process. 2. + * **Validation:** - When using `current_obj_id`, ensure it matches the existing + * object ID exactly. - When using `metadata_identifier` with a name, ensure the + * `type` is specified correctly. - Verify that the `new_obj_id` follows + * your naming conventions and is unique within your system. --- ## Examples ### Using + * current_obj_id ```json { \"metadata\": [ { + * \"current_obj_id\": \"existing_object_id\", \"new_obj_id\": + * \"new_object_id\" } ] } ``` ### Using metadata_identifier with GUID + * ```json { \"metadata\": [ { \"metadata_identifier\": + * \"01234567-89ab-cdef-0123-456789abcdef\", \"new_obj_id\": + * \"new_object_id\" } ] } ``` ### Using metadata_identifier with name + * and type ```json { \"metadata\": [ { + * \"metadata_identifier\": \"My Answer\", \"type\": + * \"ANSWER\", \"new_obj_id\": \"new_object_id\" } ] } + * ``` ### Multiple objects update ```json { + * \"metadata\": [ { \"current_obj_id\": \"existing_object_id_1\", + * \"new_obj_id\": \"new_object_id_1\" }, { + * \"metadata_identifier\": \"My Worksheet\", \"type\": + * \"LOGICAL_TABLE\", \"new_obj_id\": \"new_object_id_2\" } ] } + * ``` + * + * @param updateMetadataObjIdRequest (required) + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the + * response body + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
204 Headers update was successful. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public void updateMetadataObjId(UpdateMetadataObjIdRequest updateMetadataObjIdRequest) + throws ApiException { + updateMetadataObjIdWithHttpInfo(updateMetadataObjIdRequest); + } + + /** + * Update object IDs for given metadata objects. Version: 10.8.0.cl or later ## Prerequisites - + * **Privileges Required:** - `DATAMANAGEMENT` (Can manage data) or + * `ADMINISTRATION` (Can administer ThoughtSpot). - **Additional Privileges (if RBAC + * is enabled):** - `ORG_ADMINISTRATION` (Can manage orgs). --- ## Usage Guidelines + * ### Parameters 1. **metadata** - **Description:** List of metadata objects to update their + * object IDs. - **Usage:** - Use either `current_obj_id` alone OR use + * `metadata_identifier` with `type` (when needed). - When using + * `metadata_identifier`, the `type` field is required if using a name + * instead of a GUID. - The `new_obj_id` field is always required. --- ## Note This + * API is specifically designed for updating object IDs of metadata objects. It internally uses + * the header update mechanism to perform the changes. ## Best Practices 1. **Backup Before + * Update:** Always export metadata as a backup before initiating the update process. 2. + * **Validation:** - When using `current_obj_id`, ensure it matches the existing + * object ID exactly. - When using `metadata_identifier` with a name, ensure the + * `type` is specified correctly. - Verify that the `new_obj_id` follows + * your naming conventions and is unique within your system. --- ## Examples ### Using + * current_obj_id ```json { \"metadata\": [ { + * \"current_obj_id\": \"existing_object_id\", \"new_obj_id\": + * \"new_object_id\" } ] } ``` ### Using metadata_identifier with GUID + * ```json { \"metadata\": [ { \"metadata_identifier\": + * \"01234567-89ab-cdef-0123-456789abcdef\", \"new_obj_id\": + * \"new_object_id\" } ] } ``` ### Using metadata_identifier with name + * and type ```json { \"metadata\": [ { + * \"metadata_identifier\": \"My Answer\", \"type\": + * \"ANSWER\", \"new_obj_id\": \"new_object_id\" } ] } + * ``` ### Multiple objects update ```json { + * \"metadata\": [ { \"current_obj_id\": \"existing_object_id_1\", + * \"new_obj_id\": \"new_object_id_1\" }, { + * \"metadata_identifier\": \"My Worksheet\", \"type\": + * \"LOGICAL_TABLE\", \"new_obj_id\": \"new_object_id_2\" } ] } + * ``` + * + * @param updateMetadataObjIdRequest (required) + * @return ApiResponse<Void> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the + * response body + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
204 Headers update was successful. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public ApiResponse updateMetadataObjIdWithHttpInfo( + UpdateMetadataObjIdRequest updateMetadataObjIdRequest) throws ApiException { + okhttp3.Call localVarCall = + updateMetadataObjIdValidateBeforeCall(updateMetadataObjIdRequest, null); + return localVarApiClient.execute(localVarCall); + } + + /** + * (asynchronously) Update object IDs for given metadata objects. Version: 10.8.0.cl or later ## + * Prerequisites - **Privileges Required:** - `DATAMANAGEMENT` (Can manage data) or + * `ADMINISTRATION` (Can administer ThoughtSpot). - **Additional Privileges (if RBAC + * is enabled):** - `ORG_ADMINISTRATION` (Can manage orgs). --- ## Usage Guidelines + * ### Parameters 1. **metadata** - **Description:** List of metadata objects to update their + * object IDs. - **Usage:** - Use either `current_obj_id` alone OR use + * `metadata_identifier` with `type` (when needed). - When using + * `metadata_identifier`, the `type` field is required if using a name + * instead of a GUID. - The `new_obj_id` field is always required. --- ## Note This + * API is specifically designed for updating object IDs of metadata objects. It internally uses + * the header update mechanism to perform the changes. ## Best Practices 1. **Backup Before + * Update:** Always export metadata as a backup before initiating the update process. 2. + * **Validation:** - When using `current_obj_id`, ensure it matches the existing + * object ID exactly. - When using `metadata_identifier` with a name, ensure the + * `type` is specified correctly. - Verify that the `new_obj_id` follows + * your naming conventions and is unique within your system. --- ## Examples ### Using + * current_obj_id ```json { \"metadata\": [ { + * \"current_obj_id\": \"existing_object_id\", \"new_obj_id\": + * \"new_object_id\" } ] } ``` ### Using metadata_identifier with GUID + * ```json { \"metadata\": [ { \"metadata_identifier\": + * \"01234567-89ab-cdef-0123-456789abcdef\", \"new_obj_id\": + * \"new_object_id\" } ] } ``` ### Using metadata_identifier with name + * and type ```json { \"metadata\": [ { + * \"metadata_identifier\": \"My Answer\", \"type\": + * \"ANSWER\", \"new_obj_id\": \"new_object_id\" } ] } + * ``` ### Multiple objects update ```json { + * \"metadata\": [ { \"current_obj_id\": \"existing_object_id_1\", + * \"new_obj_id\": \"new_object_id_1\" }, { + * \"metadata_identifier\": \"My Worksheet\", \"type\": + * \"LOGICAL_TABLE\", \"new_obj_id\": \"new_object_id_2\" } ] } + * ``` + * + * @param updateMetadataObjIdRequest (required) + * @param _callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body + * object + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
204 Headers update was successful. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public okhttp3.Call updateMetadataObjIdAsync( + UpdateMetadataObjIdRequest updateMetadataObjIdRequest, + final ApiCallback _callback) + throws ApiException { + + okhttp3.Call localVarCall = + updateMetadataObjIdValidateBeforeCall(updateMetadataObjIdRequest, _callback); + localVarApiClient.executeAsync(localVarCall, _callback); + return localVarCall; + } + /** + * Build call for updateOrg + * + * @param orgIdentifier ID or name of the Org (required) + * @param updateOrgRequest (required) + * @param _callback Callback for upload/download progress + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
204 Organization successfully updated. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public okhttp3.Call updateOrgCall( + String orgIdentifier, UpdateOrgRequest updateOrgRequest, final ApiCallback _callback) + throws ApiException { + String basePath = null; + // Operation Servers + String[] localBasePaths = new String[] {}; + + // Determine Base Path to Use + if (localCustomBaseUrl != null) { + basePath = localCustomBaseUrl; + } else if (localBasePaths.length > 0) { + basePath = localBasePaths[localHostIndex]; + } else { + basePath = null; + } + + Object localVarPostBody = updateOrgRequest; + + // create path and map variables + String localVarPath = + "/api/rest/2.0/orgs/{org_identifier}/update" + .replace( + "{" + "org_identifier" + "}", + localVarApiClient.escapeString(orgIdentifier.toString())); + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + final String[] localVarAccepts = {"application/json"}; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = {"application/json"}; + final String localVarContentType = + localVarApiClient.selectHeaderContentType(localVarContentTypes); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } + + String[] localVarAuthNames = new String[] {"bearerAuth"}; + return localVarApiClient.buildCall( + basePath, + localVarPath, + "POST", + localVarQueryParams, + localVarCollectionQueryParams, + localVarPostBody, + localVarHeaderParams, + localVarCookieParams, + localVarFormParams, + localVarAuthNames, + _callback); + } + + @SuppressWarnings("rawtypes") + private okhttp3.Call updateOrgValidateBeforeCall( + String orgIdentifier, UpdateOrgRequest updateOrgRequest, final ApiCallback _callback) + throws ApiException { + // verify the required parameter 'orgIdentifier' is set + if (orgIdentifier == null) { + throw new ApiException( + "Missing the required parameter 'orgIdentifier' when calling updateOrg(Async)"); + } + + // verify the required parameter 'updateOrgRequest' is set + if (updateOrgRequest == null) { + throw new ApiException( + "Missing the required parameter 'updateOrgRequest' when calling" + + " updateOrg(Async)"); + } + + return updateOrgCall(orgIdentifier, updateOrgRequest, _callback); + } + + /** + * Version: 9.0.0.cl or later Updates an Org object. You can modify Org properties such as name, + * description, and user associations. Requires cluster administration (**Can administer Org**) + * privileges. If [Role-Based Access Control + * (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the + * `ORG_ADMINISTRATION` (**Can manage Orgs**) privilege is required. + * + * @param orgIdentifier ID or name of the Org (required) + * @param updateOrgRequest (required) + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the + * response body + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
204 Organization successfully updated. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public void updateOrg(String orgIdentifier, UpdateOrgRequest updateOrgRequest) + throws ApiException { + updateOrgWithHttpInfo(orgIdentifier, updateOrgRequest); + } + + /** + * Version: 9.0.0.cl or later Updates an Org object. You can modify Org properties such as name, + * description, and user associations. Requires cluster administration (**Can administer Org**) + * privileges. If [Role-Based Access Control + * (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the + * `ORG_ADMINISTRATION` (**Can manage Orgs**) privilege is required. + * + * @param orgIdentifier ID or name of the Org (required) + * @param updateOrgRequest (required) + * @return ApiResponse<Void> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the + * response body + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
204 Organization successfully updated. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public ApiResponse updateOrgWithHttpInfo( + String orgIdentifier, UpdateOrgRequest updateOrgRequest) throws ApiException { + okhttp3.Call localVarCall = + updateOrgValidateBeforeCall(orgIdentifier, updateOrgRequest, null); + return localVarApiClient.execute(localVarCall); + } + + /** + * (asynchronously) Version: 9.0.0.cl or later Updates an Org object. You can modify Org + * properties such as name, description, and user associations. Requires cluster administration + * (**Can administer Org**) privileges. If [Role-Based Access Control + * (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the + * `ORG_ADMINISTRATION` (**Can manage Orgs**) privilege is required. + * + * @param orgIdentifier ID or name of the Org (required) + * @param updateOrgRequest (required) + * @param _callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body + * object + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
204 Organization successfully updated. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public okhttp3.Call updateOrgAsync( + String orgIdentifier, + UpdateOrgRequest updateOrgRequest, + final ApiCallback _callback) + throws ApiException { + + okhttp3.Call localVarCall = + updateOrgValidateBeforeCall(orgIdentifier, updateOrgRequest, _callback); + localVarApiClient.executeAsync(localVarCall, _callback); + return localVarCall; + } + /** + * Build call for updateRole + * + * @param roleIdentifier Unique ID or name of the Role. (required) + * @param updateRoleRequest (required) + * @param _callback Callback for upload/download progress + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 Role successfully updated. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public okhttp3.Call updateRoleCall( + String roleIdentifier, UpdateRoleRequest updateRoleRequest, final ApiCallback _callback) + throws ApiException { + String basePath = null; + // Operation Servers + String[] localBasePaths = new String[] {}; + + // Determine Base Path to Use + if (localCustomBaseUrl != null) { + basePath = localCustomBaseUrl; + } else if (localBasePaths.length > 0) { + basePath = localBasePaths[localHostIndex]; + } else { + basePath = null; + } + + Object localVarPostBody = updateRoleRequest; + + // create path and map variables + String localVarPath = + "/api/rest/2.0/roles/{role_identifier}/update" + .replace( + "{" + "role_identifier" + "}", + localVarApiClient.escapeString(roleIdentifier.toString())); + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + final String[] localVarAccepts = {"application/json"}; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = {"application/json"}; + final String localVarContentType = + localVarApiClient.selectHeaderContentType(localVarContentTypes); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } + + String[] localVarAuthNames = new String[] {"bearerAuth"}; + return localVarApiClient.buildCall( + basePath, + localVarPath, + "POST", + localVarQueryParams, + localVarCollectionQueryParams, + localVarPostBody, + localVarHeaderParams, + localVarCookieParams, + localVarFormParams, + localVarAuthNames, + _callback); + } + + @SuppressWarnings("rawtypes") + private okhttp3.Call updateRoleValidateBeforeCall( + String roleIdentifier, UpdateRoleRequest updateRoleRequest, final ApiCallback _callback) + throws ApiException { + // verify the required parameter 'roleIdentifier' is set + if (roleIdentifier == null) { + throw new ApiException( + "Missing the required parameter 'roleIdentifier' when calling" + + " updateRole(Async)"); + } + + // verify the required parameter 'updateRoleRequest' is set + if (updateRoleRequest == null) { + throw new ApiException( + "Missing the required parameter 'updateRoleRequest' when calling" + + " updateRole(Async)"); + } + + return updateRoleCall(roleIdentifier, updateRoleRequest, _callback); + } + + /** + * Version: 9.5.0.cl or later Updates the properties of a Role object. Available only if + * [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled + * on your instance. To update a Role, the `ROLE_ADMINISTRATION` (**Can manage + * roles**) privilege is required. + * + * @param roleIdentifier Unique ID or name of the Role. (required) + * @param updateRoleRequest (required) + * @return RoleResponse + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the + * response body + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 Role successfully updated. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public RoleResponse updateRole(String roleIdentifier, UpdateRoleRequest updateRoleRequest) + throws ApiException { + ApiResponse localVarResp = + updateRoleWithHttpInfo(roleIdentifier, updateRoleRequest); + return localVarResp.getData(); + } + + /** + * Version: 9.5.0.cl or later Updates the properties of a Role object. Available only if + * [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled + * on your instance. To update a Role, the `ROLE_ADMINISTRATION` (**Can manage + * roles**) privilege is required. + * + * @param roleIdentifier Unique ID or name of the Role. (required) + * @param updateRoleRequest (required) + * @return ApiResponse<RoleResponse> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the + * response body + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 Role successfully updated. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public ApiResponse updateRoleWithHttpInfo( + String roleIdentifier, UpdateRoleRequest updateRoleRequest) throws ApiException { + okhttp3.Call localVarCall = + updateRoleValidateBeforeCall(roleIdentifier, updateRoleRequest, null); + Type localVarReturnType = new TypeToken() {}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); + } + + /** + * (asynchronously) Version: 9.5.0.cl or later Updates the properties of a Role object. + * Available only if [Role-Based Access Control + * (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance. To update + * a Role, the `ROLE_ADMINISTRATION` (**Can manage roles**) privilege is required. + * + * @param roleIdentifier Unique ID or name of the Role. (required) + * @param updateRoleRequest (required) + * @param _callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body + * object + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 Role successfully updated. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public okhttp3.Call updateRoleAsync( + String roleIdentifier, + UpdateRoleRequest updateRoleRequest, + final ApiCallback _callback) + throws ApiException { + + okhttp3.Call localVarCall = + updateRoleValidateBeforeCall(roleIdentifier, updateRoleRequest, _callback); + Type localVarReturnType = new TypeToken() {}.getType(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; + } + /** + * Build call for updateSchedule + * + * @param scheduleIdentifier Unique ID or name of the schedule. (required) + * @param updateScheduleRequest (required) + * @param _callback Callback for upload/download progress + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
204 Schedule successfully updated. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public okhttp3.Call updateScheduleCall( + String scheduleIdentifier, + UpdateScheduleRequest updateScheduleRequest, + final ApiCallback _callback) + throws ApiException { + String basePath = null; + // Operation Servers + String[] localBasePaths = new String[] {}; + + // Determine Base Path to Use + if (localCustomBaseUrl != null) { + basePath = localCustomBaseUrl; + } else if (localBasePaths.length > 0) { + basePath = localBasePaths[localHostIndex]; + } else { + basePath = null; + } + + Object localVarPostBody = updateScheduleRequest; + + // create path and map variables + String localVarPath = + "/api/rest/2.0/schedules/{schedule_identifier}/update" + .replace( + "{" + "schedule_identifier" + "}", + localVarApiClient.escapeString(scheduleIdentifier.toString())); + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + final String[] localVarAccepts = {"application/json"}; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = {"application/json"}; + final String localVarContentType = + localVarApiClient.selectHeaderContentType(localVarContentTypes); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } + + String[] localVarAuthNames = new String[] {"bearerAuth"}; + return localVarApiClient.buildCall( + basePath, + localVarPath, + "POST", + localVarQueryParams, + localVarCollectionQueryParams, + localVarPostBody, + localVarHeaderParams, + localVarCookieParams, + localVarFormParams, + localVarAuthNames, + _callback); + } + + @SuppressWarnings("rawtypes") + private okhttp3.Call updateScheduleValidateBeforeCall( + String scheduleIdentifier, + UpdateScheduleRequest updateScheduleRequest, + final ApiCallback _callback) + throws ApiException { + // verify the required parameter 'scheduleIdentifier' is set + if (scheduleIdentifier == null) { + throw new ApiException( + "Missing the required parameter 'scheduleIdentifier' when calling" + + " updateSchedule(Async)"); + } + + // verify the required parameter 'updateScheduleRequest' is set + if (updateScheduleRequest == null) { + throw new ApiException( + "Missing the required parameter 'updateScheduleRequest' when calling" + + " updateSchedule(Async)"); + } + + return updateScheduleCall(scheduleIdentifier, updateScheduleRequest, _callback); + } + + /** + * Update schedule. Version: 9.4.0.cl or later Updates a scheduled Liveboard job. Requires at + * least edit access to Liveboards. To update a schedule on behalf of another user, you need + * `ADMINISTRATION` (**Can administer Org**) or `JOBSCHEDULING` (**Can + * schedule for others**) privilege and edit access to the Liveboard. If [Role-Based Access + * Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, + * the `JOBSCHEDULING` (**Can schedule for others**) privilege is required. The API + * endpoint allows you to pause a scheduled job, change the status of a paused job. You can also + * edit the recipients list, frequency of the job, format of the file to send to the recipients + * in email notifications, PDF options, and time zone setting. + * + * @param scheduleIdentifier Unique ID or name of the schedule. (required) + * @param updateScheduleRequest (required) + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the + * response body + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
204 Schedule successfully updated. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public void updateSchedule( + String scheduleIdentifier, UpdateScheduleRequest updateScheduleRequest) + throws ApiException { + updateScheduleWithHttpInfo(scheduleIdentifier, updateScheduleRequest); + } + + /** + * Update schedule. Version: 9.4.0.cl or later Updates a scheduled Liveboard job. Requires at + * least edit access to Liveboards. To update a schedule on behalf of another user, you need + * `ADMINISTRATION` (**Can administer Org**) or `JOBSCHEDULING` (**Can + * schedule for others**) privilege and edit access to the Liveboard. If [Role-Based Access + * Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, + * the `JOBSCHEDULING` (**Can schedule for others**) privilege is required. The API + * endpoint allows you to pause a scheduled job, change the status of a paused job. You can also + * edit the recipients list, frequency of the job, format of the file to send to the recipients + * in email notifications, PDF options, and time zone setting. + * + * @param scheduleIdentifier Unique ID or name of the schedule. (required) + * @param updateScheduleRequest (required) + * @return ApiResponse<Void> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the + * response body + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
204 Schedule successfully updated. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public ApiResponse updateScheduleWithHttpInfo( + String scheduleIdentifier, UpdateScheduleRequest updateScheduleRequest) + throws ApiException { + okhttp3.Call localVarCall = + updateScheduleValidateBeforeCall(scheduleIdentifier, updateScheduleRequest, null); + return localVarApiClient.execute(localVarCall); + } + + /** + * (asynchronously) Update schedule. Version: 9.4.0.cl or later Updates a scheduled Liveboard + * job. Requires at least edit access to Liveboards. To update a schedule on behalf of another + * user, you need `ADMINISTRATION` (**Can administer Org**) or + * `JOBSCHEDULING` (**Can schedule for others**) privilege and edit access to the + * Liveboard. If [Role-Based Access Control + * (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the + * `JOBSCHEDULING` (**Can schedule for others**) privilege is required. The API + * endpoint allows you to pause a scheduled job, change the status of a paused job. You can also + * edit the recipients list, frequency of the job, format of the file to send to the recipients + * in email notifications, PDF options, and time zone setting. + * + * @param scheduleIdentifier Unique ID or name of the schedule. (required) + * @param updateScheduleRequest (required) + * @param _callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body + * object + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
204 Schedule successfully updated. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public okhttp3.Call updateScheduleAsync( + String scheduleIdentifier, + UpdateScheduleRequest updateScheduleRequest, + final ApiCallback _callback) + throws ApiException { + + okhttp3.Call localVarCall = + updateScheduleValidateBeforeCall( + scheduleIdentifier, updateScheduleRequest, _callback); + localVarApiClient.executeAsync(localVarCall, _callback); + return localVarCall; + } + /** + * Build call for updateSystemConfig + * + * @param updateSystemConfigRequest (required) + * @param _callback Callback for upload/download progress + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
204 Configuration successfully updated. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public okhttp3.Call updateSystemConfigCall( + UpdateSystemConfigRequest updateSystemConfigRequest, final ApiCallback _callback) + throws ApiException { + String basePath = null; + // Operation Servers + String[] localBasePaths = new String[] {}; + + // Determine Base Path to Use + if (localCustomBaseUrl != null) { + basePath = localCustomBaseUrl; + } else if (localBasePaths.length > 0) { + basePath = localBasePaths[localHostIndex]; + } else { + basePath = null; + } + + Object localVarPostBody = updateSystemConfigRequest; + + // create path and map variables + String localVarPath = "/api/rest/2.0/system/config-update"; + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + final String[] localVarAccepts = {"application/json"}; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = {"application/json"}; + final String localVarContentType = + localVarApiClient.selectHeaderContentType(localVarContentTypes); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } + + String[] localVarAuthNames = new String[] {"bearerAuth"}; + return localVarApiClient.buildCall( + basePath, + localVarPath, + "POST", + localVarQueryParams, + localVarCollectionQueryParams, + localVarPostBody, + localVarHeaderParams, + localVarCookieParams, + localVarFormParams, + localVarAuthNames, + _callback); + } + + @SuppressWarnings("rawtypes") + private okhttp3.Call updateSystemConfigValidateBeforeCall( + UpdateSystemConfigRequest updateSystemConfigRequest, final ApiCallback _callback) + throws ApiException { + // verify the required parameter 'updateSystemConfigRequest' is set + if (updateSystemConfigRequest == null) { + throw new ApiException( + "Missing the required parameter 'updateSystemConfigRequest' when calling" + + " updateSystemConfig(Async)"); + } + + return updateSystemConfigCall(updateSystemConfigRequest, _callback); + } + + /** + * Version: 9.2.0.cl or later Updates the current configuration of the cluster. You must send + * the configuration data in JSON format. Requires `ADMINISTRATION` (**Can administer + * ThoughtSpot**) privileges. If [Role-Based Access Control + * (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the + * `APPLICATION_ADMINISTRATION` (**Can manage application settings**) privilege is + * required. + * + * @param updateSystemConfigRequest (required) + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the + * response body + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
204 Configuration successfully updated. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public void updateSystemConfig(UpdateSystemConfigRequest updateSystemConfigRequest) + throws ApiException { + updateSystemConfigWithHttpInfo(updateSystemConfigRequest); + } + + /** + * Version: 9.2.0.cl or later Updates the current configuration of the cluster. You must send + * the configuration data in JSON format. Requires `ADMINISTRATION` (**Can administer + * ThoughtSpot**) privileges. If [Role-Based Access Control + * (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the + * `APPLICATION_ADMINISTRATION` (**Can manage application settings**) privilege is + * required. + * + * @param updateSystemConfigRequest (required) + * @return ApiResponse<Void> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the + * response body + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
204 Configuration successfully updated. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public ApiResponse updateSystemConfigWithHttpInfo( + UpdateSystemConfigRequest updateSystemConfigRequest) throws ApiException { + okhttp3.Call localVarCall = + updateSystemConfigValidateBeforeCall(updateSystemConfigRequest, null); + return localVarApiClient.execute(localVarCall); + } + + /** + * (asynchronously) Version: 9.2.0.cl or later Updates the current configuration of the cluster. + * You must send the configuration data in JSON format. Requires `ADMINISTRATION` + * (**Can administer ThoughtSpot**) privileges. If [Role-Based Access Control + * (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the + * `APPLICATION_ADMINISTRATION` (**Can manage application settings**) privilege is + * required. + * + * @param updateSystemConfigRequest (required) + * @param _callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body + * object + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
204 Configuration successfully updated. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public okhttp3.Call updateSystemConfigAsync( + UpdateSystemConfigRequest updateSystemConfigRequest, final ApiCallback _callback) + throws ApiException { + + okhttp3.Call localVarCall = + updateSystemConfigValidateBeforeCall(updateSystemConfigRequest, _callback); + localVarApiClient.executeAsync(localVarCall, _callback); + return localVarCall; + } + /** + * Build call for updateTag + * + * @param tagIdentifier Name or Id of the tag. (required) + * @param updateTagRequest (required) + * @param _callback Callback for upload/download progress + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
204 Tag successfully updated. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public okhttp3.Call updateTagCall( + String tagIdentifier, UpdateTagRequest updateTagRequest, final ApiCallback _callback) + throws ApiException { + String basePath = null; + // Operation Servers + String[] localBasePaths = new String[] {}; + + // Determine Base Path to Use + if (localCustomBaseUrl != null) { + basePath = localCustomBaseUrl; + } else if (localBasePaths.length > 0) { + basePath = localBasePaths[localHostIndex]; + } else { + basePath = null; + } + + Object localVarPostBody = updateTagRequest; + + // create path and map variables + String localVarPath = + "/api/rest/2.0/tags/{tag_identifier}/update" + .replace( + "{" + "tag_identifier" + "}", + localVarApiClient.escapeString(tagIdentifier.toString())); + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + final String[] localVarAccepts = {"application/json"}; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = {"application/json"}; + final String localVarContentType = + localVarApiClient.selectHeaderContentType(localVarContentTypes); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } + + String[] localVarAuthNames = new String[] {"bearerAuth"}; + return localVarApiClient.buildCall( + basePath, + localVarPath, + "POST", + localVarQueryParams, + localVarCollectionQueryParams, + localVarPostBody, + localVarHeaderParams, + localVarCookieParams, + localVarFormParams, + localVarAuthNames, + _callback); + } + + @SuppressWarnings("rawtypes") + private okhttp3.Call updateTagValidateBeforeCall( + String tagIdentifier, UpdateTagRequest updateTagRequest, final ApiCallback _callback) + throws ApiException { + // verify the required parameter 'tagIdentifier' is set + if (tagIdentifier == null) { + throw new ApiException( + "Missing the required parameter 'tagIdentifier' when calling updateTag(Async)"); + } + + // verify the required parameter 'updateTagRequest' is set + if (updateTagRequest == null) { + throw new ApiException( + "Missing the required parameter 'updateTagRequest' when calling" + + " updateTag(Async)"); + } + + return updateTagCall(tagIdentifier, updateTagRequest, _callback); + } + + /** + * Version: 9.0.0.cl or later Updates a tag object. You can modify the `name` and + * `color` properties of a tag object. Requires `ADMINISTRATION` (**Can + * administer ThoughtSpot**) privilege. If [Role-Based Access Control + * (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the + * `TAGMANAGEMENT` (**Can manage tags**) privilege is required to create, edit, and + * delete tags. + * + * @param tagIdentifier Name or Id of the tag. (required) + * @param updateTagRequest (required) + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the + * response body + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
204 Tag successfully updated. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public void updateTag(String tagIdentifier, UpdateTagRequest updateTagRequest) + throws ApiException { + updateTagWithHttpInfo(tagIdentifier, updateTagRequest); + } + + /** + * Version: 9.0.0.cl or later Updates a tag object. You can modify the `name` and + * `color` properties of a tag object. Requires `ADMINISTRATION` (**Can + * administer ThoughtSpot**) privilege. If [Role-Based Access Control + * (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the + * `TAGMANAGEMENT` (**Can manage tags**) privilege is required to create, edit, and + * delete tags. + * + * @param tagIdentifier Name or Id of the tag. (required) + * @param updateTagRequest (required) + * @return ApiResponse<Void> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the + * response body + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
204 Tag successfully updated. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public ApiResponse updateTagWithHttpInfo( + String tagIdentifier, UpdateTagRequest updateTagRequest) throws ApiException { + okhttp3.Call localVarCall = + updateTagValidateBeforeCall(tagIdentifier, updateTagRequest, null); + return localVarApiClient.execute(localVarCall); + } + + /** + * (asynchronously) Version: 9.0.0.cl or later Updates a tag object. You can modify the + * `name` and `color` properties of a tag object. Requires + * `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access + * Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, + * the `TAGMANAGEMENT` (**Can manage tags**) privilege is required to create, edit, + * and delete tags. + * + * @param tagIdentifier Name or Id of the tag. (required) + * @param updateTagRequest (required) + * @param _callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body + * object + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
204 Tag successfully updated. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public okhttp3.Call updateTagAsync( + String tagIdentifier, + UpdateTagRequest updateTagRequest, + final ApiCallback _callback) + throws ApiException { + + okhttp3.Call localVarCall = + updateTagValidateBeforeCall(tagIdentifier, updateTagRequest, _callback); + localVarApiClient.executeAsync(localVarCall, _callback); + return localVarCall; + } + /** + * Build call for updateUser + * + * @param userIdentifier GUID / name of the user (required) + * @param updateUserRequest (required) + * @param _callback Callback for upload/download progress + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
204 User successfully updated. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public okhttp3.Call updateUserCall( + String userIdentifier, UpdateUserRequest updateUserRequest, final ApiCallback _callback) + throws ApiException { + String basePath = null; + // Operation Servers + String[] localBasePaths = new String[] {}; + + // Determine Base Path to Use + if (localCustomBaseUrl != null) { + basePath = localCustomBaseUrl; + } else if (localBasePaths.length > 0) { + basePath = localBasePaths[localHostIndex]; + } else { + basePath = null; + } + + Object localVarPostBody = updateUserRequest; + + // create path and map variables + String localVarPath = + "/api/rest/2.0/users/{user_identifier}/update" + .replace( + "{" + "user_identifier" + "}", + localVarApiClient.escapeString(userIdentifier.toString())); + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + final String[] localVarAccepts = {"application/json"}; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = {"application/json"}; + final String localVarContentType = + localVarApiClient.selectHeaderContentType(localVarContentTypes); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } + + String[] localVarAuthNames = new String[] {"bearerAuth"}; + return localVarApiClient.buildCall( + basePath, + localVarPath, + "POST", + localVarQueryParams, + localVarCollectionQueryParams, + localVarPostBody, + localVarHeaderParams, + localVarCookieParams, + localVarFormParams, + localVarAuthNames, + _callback); + } + + @SuppressWarnings("rawtypes") + private okhttp3.Call updateUserValidateBeforeCall( + String userIdentifier, UpdateUserRequest updateUserRequest, final ApiCallback _callback) + throws ApiException { + // verify the required parameter 'userIdentifier' is set + if (userIdentifier == null) { + throw new ApiException( + "Missing the required parameter 'userIdentifier' when calling" + + " updateUser(Async)"); + } + + // verify the required parameter 'updateUserRequest' is set + if (updateUserRequest == null) { + throw new ApiException( + "Missing the required parameter 'updateUserRequest' when calling" + + " updateUser(Async)"); + } + + return updateUserCall(userIdentifier, updateUserRequest, _callback); + } + + /** + * Version: 9.0.0.cl or later Updates the properties of a user object. You can modify user + * properties such as username, email, and share notification settings. You can also assign new + * groups and Orgs, remove the user from a group or Org, reset password, and modify user + * preferences. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. + * If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is + * enabled on your instance, the `USER_ADMINISTRATION` (**Can manage users**) + * privilege is required. + * + * @param userIdentifier GUID / name of the user (required) + * @param updateUserRequest (required) + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the + * response body + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
204 User successfully updated. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public void updateUser(String userIdentifier, UpdateUserRequest updateUserRequest) + throws ApiException { + updateUserWithHttpInfo(userIdentifier, updateUserRequest); + } + + /** + * Version: 9.0.0.cl or later Updates the properties of a user object. You can modify user + * properties such as username, email, and share notification settings. You can also assign new + * groups and Orgs, remove the user from a group or Org, reset password, and modify user + * preferences. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. + * If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is + * enabled on your instance, the `USER_ADMINISTRATION` (**Can manage users**) + * privilege is required. + * + * @param userIdentifier GUID / name of the user (required) + * @param updateUserRequest (required) + * @return ApiResponse<Void> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the + * response body + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
204 User successfully updated. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public ApiResponse updateUserWithHttpInfo( + String userIdentifier, UpdateUserRequest updateUserRequest) throws ApiException { + okhttp3.Call localVarCall = + updateUserValidateBeforeCall(userIdentifier, updateUserRequest, null); + return localVarApiClient.execute(localVarCall); + } + + /** + * (asynchronously) Version: 9.0.0.cl or later Updates the properties of a user object. You can + * modify user properties such as username, email, and share notification settings. You can also + * assign new groups and Orgs, remove the user from a group or Org, reset password, and modify + * user preferences. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) + * privilege. If [Role-Based Access Control + * (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the + * `USER_ADMINISTRATION` (**Can manage users**) privilege is required. + * + * @param userIdentifier GUID / name of the user (required) + * @param updateUserRequest (required) + * @param _callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body + * object + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
204 User successfully updated. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public okhttp3.Call updateUserAsync( + String userIdentifier, + UpdateUserRequest updateUserRequest, + final ApiCallback _callback) + throws ApiException { + + okhttp3.Call localVarCall = + updateUserValidateBeforeCall(userIdentifier, updateUserRequest, _callback); + localVarApiClient.executeAsync(localVarCall, _callback); + return localVarCall; + } + /** + * Build call for updateUserGroup + * + * @param groupIdentifier GUID or name of the group. (required) + * @param updateUserGroupRequest (required) + * @param _callback Callback for upload/download progress + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
204 User group successfully updated. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public okhttp3.Call updateUserGroupCall( + String groupIdentifier, + UpdateUserGroupRequest updateUserGroupRequest, + final ApiCallback _callback) + throws ApiException { + String basePath = null; + // Operation Servers + String[] localBasePaths = new String[] {}; + + // Determine Base Path to Use + if (localCustomBaseUrl != null) { + basePath = localCustomBaseUrl; + } else if (localBasePaths.length > 0) { + basePath = localBasePaths[localHostIndex]; + } else { + basePath = null; + } + + Object localVarPostBody = updateUserGroupRequest; + + // create path and map variables + String localVarPath = + "/api/rest/2.0/groups/{group_identifier}/update" + .replace( + "{" + "group_identifier" + "}", + localVarApiClient.escapeString(groupIdentifier.toString())); + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + final String[] localVarAccepts = {"application/json"}; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = {"application/json"}; + final String localVarContentType = + localVarApiClient.selectHeaderContentType(localVarContentTypes); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } + + String[] localVarAuthNames = new String[] {"bearerAuth"}; + return localVarApiClient.buildCall( + basePath, + localVarPath, + "POST", + localVarQueryParams, + localVarCollectionQueryParams, + localVarPostBody, + localVarHeaderParams, + localVarCookieParams, + localVarFormParams, + localVarAuthNames, + _callback); + } + + @SuppressWarnings("rawtypes") + private okhttp3.Call updateUserGroupValidateBeforeCall( + String groupIdentifier, + UpdateUserGroupRequest updateUserGroupRequest, + final ApiCallback _callback) + throws ApiException { + // verify the required parameter 'groupIdentifier' is set + if (groupIdentifier == null) { + throw new ApiException( + "Missing the required parameter 'groupIdentifier' when calling" + + " updateUserGroup(Async)"); + } + + // verify the required parameter 'updateUserGroupRequest' is set + if (updateUserGroupRequest == null) { + throw new ApiException( + "Missing the required parameter 'updateUserGroupRequest' when calling" + + " updateUserGroup(Async)"); + } + + return updateUserGroupCall(groupIdentifier, updateUserGroupRequest, _callback); + } + + /** + * Version: 9.0.0.cl or later Updates the properties of a group object in ThoughtSpot. Requires + * `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access + * Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, + * the `GROUP_ADMINISTRATION` (**Can manage groups**) privilege is required. #### + * Supported operations This API endpoint lets you perform the following operations in a single + * API request: * Edit + * [privileges](https://developers.thoughtspot.com/docs/?pageid=api-user-management#group-privileges) + * * Add or remove users * Change sharing visibility settings * Add or remove sub-groups * + * Assign a default Liveboard or update the existing settings + * + * @param groupIdentifier GUID or name of the group. (required) + * @param updateUserGroupRequest (required) + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the + * response body + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
204 User group successfully updated. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public void updateUserGroup( + String groupIdentifier, UpdateUserGroupRequest updateUserGroupRequest) + throws ApiException { + updateUserGroupWithHttpInfo(groupIdentifier, updateUserGroupRequest); + } + + /** + * Version: 9.0.0.cl or later Updates the properties of a group object in ThoughtSpot. Requires + * `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access + * Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, + * the `GROUP_ADMINISTRATION` (**Can manage groups**) privilege is required. #### + * Supported operations This API endpoint lets you perform the following operations in a single + * API request: * Edit + * [privileges](https://developers.thoughtspot.com/docs/?pageid=api-user-management#group-privileges) + * * Add or remove users * Change sharing visibility settings * Add or remove sub-groups * + * Assign a default Liveboard or update the existing settings + * + * @param groupIdentifier GUID or name of the group. (required) + * @param updateUserGroupRequest (required) + * @return ApiResponse<Void> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the + * response body + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
204 User group successfully updated. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public ApiResponse updateUserGroupWithHttpInfo( + String groupIdentifier, UpdateUserGroupRequest updateUserGroupRequest) + throws ApiException { + okhttp3.Call localVarCall = + updateUserGroupValidateBeforeCall(groupIdentifier, updateUserGroupRequest, null); + return localVarApiClient.execute(localVarCall); + } + + /** + * (asynchronously) Version: 9.0.0.cl or later Updates the properties of a group object in + * ThoughtSpot. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. + * If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is + * enabled on your instance, the `GROUP_ADMINISTRATION` (**Can manage groups**) + * privilege is required. #### Supported operations This API endpoint lets you perform the + * following operations in a single API request: * Edit + * [privileges](https://developers.thoughtspot.com/docs/?pageid=api-user-management#group-privileges) + * * Add or remove users * Change sharing visibility settings * Add or remove sub-groups * + * Assign a default Liveboard or update the existing settings + * + * @param groupIdentifier GUID or name of the group. (required) + * @param updateUserGroupRequest (required) + * @param _callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body + * object + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
204 User group successfully updated. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public okhttp3.Call updateUserGroupAsync( + String groupIdentifier, + UpdateUserGroupRequest updateUserGroupRequest, + final ApiCallback _callback) + throws ApiException { + + okhttp3.Call localVarCall = + updateUserGroupValidateBeforeCall( + groupIdentifier, updateUserGroupRequest, _callback); + localVarApiClient.executeAsync(localVarCall, _callback); + return localVarCall; + } + /** + * Build call for updateVariable + * + * @param identifier Unique id or name of the variable to update. (required) + * @param updateVariableRequest (required) + * @param _callback Callback for upload/download progress + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
204 Variable name updated successfully. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public okhttp3.Call updateVariableCall( + String identifier, + UpdateVariableRequest updateVariableRequest, + final ApiCallback _callback) + throws ApiException { + String basePath = null; + // Operation Servers + String[] localBasePaths = new String[] {}; + + // Determine Base Path to Use + if (localCustomBaseUrl != null) { + basePath = localCustomBaseUrl; + } else if (localBasePaths.length > 0) { + basePath = localBasePaths[localHostIndex]; + } else { + basePath = null; + } + + Object localVarPostBody = updateVariableRequest; + + // create path and map variables + String localVarPath = + "/api/rest/2.0/template/variables/{identifier}/update" + .replace( + "{" + "identifier" + "}", + localVarApiClient.escapeString(identifier.toString())); + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + final String[] localVarAccepts = {"application/json"}; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = {"application/json"}; + final String localVarContentType = + localVarApiClient.selectHeaderContentType(localVarContentTypes); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } + + String[] localVarAuthNames = new String[] {"bearerAuth"}; + return localVarApiClient.buildCall( + basePath, + localVarPath, + "POST", + localVarQueryParams, + localVarCollectionQueryParams, + localVarPostBody, + localVarHeaderParams, + localVarCookieParams, + localVarFormParams, + localVarAuthNames, + _callback); + } + + @SuppressWarnings("rawtypes") + private okhttp3.Call updateVariableValidateBeforeCall( + String identifier, + UpdateVariableRequest updateVariableRequest, + final ApiCallback _callback) + throws ApiException { + // verify the required parameter 'identifier' is set + if (identifier == null) { + throw new ApiException( + "Missing the required parameter 'identifier' when calling" + + " updateVariable(Async)"); + } + + // verify the required parameter 'updateVariableRequest' is set + if (updateVariableRequest == null) { + throw new ApiException( + "Missing the required parameter 'updateVariableRequest' when calling" + + " updateVariable(Async)"); + } + + return updateVariableCall(identifier, updateVariableRequest, _callback); + } + + /** + * Update a variable's name Version: 26.4.0.cl or later Allows updating a variable's + * name in ThoughtSpot. Requires ADMINISTRATION role and TENANT scope. The CAN_MANAGE_VARIABLES + * permission allows you to manage Formula Variables in the current organization scope. The API + * endpoint allows updating: * The variable name + * + * @param identifier Unique id or name of the variable to update. (required) + * @param updateVariableRequest (required) + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the + * response body + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
204 Variable name updated successfully. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public void updateVariable(String identifier, UpdateVariableRequest updateVariableRequest) + throws ApiException { + updateVariableWithHttpInfo(identifier, updateVariableRequest); + } + + /** + * Update a variable's name Version: 26.4.0.cl or later Allows updating a variable's + * name in ThoughtSpot. Requires ADMINISTRATION role and TENANT scope. The CAN_MANAGE_VARIABLES + * permission allows you to manage Formula Variables in the current organization scope. The API + * endpoint allows updating: * The variable name + * + * @param identifier Unique id or name of the variable to update. (required) + * @param updateVariableRequest (required) + * @return ApiResponse<Void> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the + * response body + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
204 Variable name updated successfully. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public ApiResponse updateVariableWithHttpInfo( + String identifier, UpdateVariableRequest updateVariableRequest) throws ApiException { + okhttp3.Call localVarCall = + updateVariableValidateBeforeCall(identifier, updateVariableRequest, null); + return localVarApiClient.execute(localVarCall); + } + + /** + * (asynchronously) Update a variable's name Version: 26.4.0.cl or later Allows updating a + * variable's name in ThoughtSpot. Requires ADMINISTRATION role and TENANT scope. The + * CAN_MANAGE_VARIABLES permission allows you to manage Formula Variables in the current + * organization scope. The API endpoint allows updating: * The variable name + * + * @param identifier Unique id or name of the variable to update. (required) + * @param updateVariableRequest (required) + * @param _callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body + * object + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
204 Variable name updated successfully. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public okhttp3.Call updateVariableAsync( + String identifier, + UpdateVariableRequest updateVariableRequest, + final ApiCallback _callback) + throws ApiException { + + okhttp3.Call localVarCall = + updateVariableValidateBeforeCall(identifier, updateVariableRequest, _callback); + localVarApiClient.executeAsync(localVarCall, _callback); + return localVarCall; + } + /** + * Build call for updateVariableValues + * + * @param updateVariableValuesRequest (required) + * @param _callback Callback for upload/download progress + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
204 Variable values updated successfully. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ * + * @deprecated + */ + @Deprecated + public okhttp3.Call updateVariableValuesCall( + UpdateVariableValuesRequest updateVariableValuesRequest, final ApiCallback _callback) + throws ApiException { + String basePath = null; + // Operation Servers + String[] localBasePaths = new String[] {}; + + // Determine Base Path to Use + if (localCustomBaseUrl != null) { + basePath = localCustomBaseUrl; + } else if (localBasePaths.length > 0) { + basePath = localBasePaths[localHostIndex]; + } else { + basePath = null; + } + + Object localVarPostBody = updateVariableValuesRequest; + + // create path and map variables + String localVarPath = "/api/rest/2.0/template/variables/update-values"; + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + final String[] localVarAccepts = {"application/json"}; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = {"application/json"}; + final String localVarContentType = + localVarApiClient.selectHeaderContentType(localVarContentTypes); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } + + String[] localVarAuthNames = new String[] {"bearerAuth"}; + return localVarApiClient.buildCall( + basePath, + localVarPath, + "POST", + localVarQueryParams, + localVarCollectionQueryParams, + localVarPostBody, + localVarHeaderParams, + localVarCookieParams, + localVarFormParams, + localVarAuthNames, + _callback); + } + + @Deprecated + @SuppressWarnings("rawtypes") + private okhttp3.Call updateVariableValuesValidateBeforeCall( + UpdateVariableValuesRequest updateVariableValuesRequest, final ApiCallback _callback) + throws ApiException { + // verify the required parameter 'updateVariableValuesRequest' is set + if (updateVariableValuesRequest == null) { + throw new ApiException( + "Missing the required parameter 'updateVariableValuesRequest' when calling" + + " updateVariableValues(Async)"); + } + + return updateVariableValuesCall(updateVariableValuesRequest, _callback); + } + + /** + * Update values for multiple variables Version: 10.14.0.cl or later **Note:** This API endpoint + * is deprecated and will be removed from ThoughtSpot in a future release. Use [POST + * /api/rest/2.0/template/variables/{identifier}/update-values](/api/rest/2.0/template/variables/%7Bidentifier%7D/update-values) + * instead. Allows updating values for multiple variables in ThoughtSpot. Requires + * ADMINISTRATION role. The CAN_MANAGE_VARIABLES permission allows you to manage Formula + * Variables in the current organization scope. The API endpoint allows: * Adding new values to + * variables * Replacing existing values * Deleting values from variables When updating variable + * values, you need to specify: * The variable identifiers * The values to add/replace/remove + * for each variable * The operation to perform (ADD, REPLACE, REMOVE, RESET) Behaviour based on + * operation type: * ADD - Adds values to the variable if this is a list type variable, else + * same as replace. * REPLACE - Replaces all values of a given set of constraints with the + * current set of values. * REMOVE - Removes any values which match the set of conditions of the + * variables if this is a list type variable, else clears value. * RESET - Removes all + * constrains for a given variable, scope is ignored + * + * @param updateVariableValuesRequest (required) + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the + * response body + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
204 Variable values updated successfully. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ * + * @deprecated + */ + @Deprecated + public void updateVariableValues(UpdateVariableValuesRequest updateVariableValuesRequest) + throws ApiException { + updateVariableValuesWithHttpInfo(updateVariableValuesRequest); + } + + /** + * Update values for multiple variables Version: 10.14.0.cl or later **Note:** This API endpoint + * is deprecated and will be removed from ThoughtSpot in a future release. Use [POST + * /api/rest/2.0/template/variables/{identifier}/update-values](/api/rest/2.0/template/variables/%7Bidentifier%7D/update-values) + * instead. Allows updating values for multiple variables in ThoughtSpot. Requires + * ADMINISTRATION role. The CAN_MANAGE_VARIABLES permission allows you to manage Formula + * Variables in the current organization scope. The API endpoint allows: * Adding new values to + * variables * Replacing existing values * Deleting values from variables When updating variable + * values, you need to specify: * The variable identifiers * The values to add/replace/remove + * for each variable * The operation to perform (ADD, REPLACE, REMOVE, RESET) Behaviour based on + * operation type: * ADD - Adds values to the variable if this is a list type variable, else + * same as replace. * REPLACE - Replaces all values of a given set of constraints with the + * current set of values. * REMOVE - Removes any values which match the set of conditions of the + * variables if this is a list type variable, else clears value. * RESET - Removes all + * constrains for a given variable, scope is ignored + * + * @param updateVariableValuesRequest (required) + * @return ApiResponse<Void> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the + * response body + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
204 Variable values updated successfully. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ * + * @deprecated + */ + @Deprecated + public ApiResponse updateVariableValuesWithHttpInfo( + UpdateVariableValuesRequest updateVariableValuesRequest) throws ApiException { + okhttp3.Call localVarCall = + updateVariableValuesValidateBeforeCall(updateVariableValuesRequest, null); + return localVarApiClient.execute(localVarCall); + } + + /** + * (asynchronously) Update values for multiple variables Version: 10.14.0.cl or later **Note:** + * This API endpoint is deprecated and will be removed from ThoughtSpot in a future release. Use + * [POST + * /api/rest/2.0/template/variables/{identifier}/update-values](/api/rest/2.0/template/variables/%7Bidentifier%7D/update-values) + * instead. Allows updating values for multiple variables in ThoughtSpot. Requires + * ADMINISTRATION role. The CAN_MANAGE_VARIABLES permission allows you to manage Formula + * Variables in the current organization scope. The API endpoint allows: * Adding new values to + * variables * Replacing existing values * Deleting values from variables When updating variable + * values, you need to specify: * The variable identifiers * The values to add/replace/remove + * for each variable * The operation to perform (ADD, REPLACE, REMOVE, RESET) Behaviour based on + * operation type: * ADD - Adds values to the variable if this is a list type variable, else + * same as replace. * REPLACE - Replaces all values of a given set of constraints with the + * current set of values. * REMOVE - Removes any values which match the set of conditions of the + * variables if this is a list type variable, else clears value. * RESET - Removes all + * constrains for a given variable, scope is ignored + * + * @param updateVariableValuesRequest (required) + * @param _callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body + * object + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
204 Variable values updated successfully. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ * + * @deprecated + */ + @Deprecated + public okhttp3.Call updateVariableValuesAsync( + UpdateVariableValuesRequest updateVariableValuesRequest, + final ApiCallback _callback) + throws ApiException { + + okhttp3.Call localVarCall = + updateVariableValuesValidateBeforeCall(updateVariableValuesRequest, _callback); + localVarApiClient.executeAsync(localVarCall, _callback); + return localVarCall; + } + /** + * Build call for updateWebhookConfiguration + * + * @param webhookIdentifier Unique ID or name of the webhook configuration. (required) + * @param updateWebhookConfigurationRequest (required) + * @param _callback Callback for upload/download progress + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
204 Webhook configuration updated successfully -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public okhttp3.Call updateWebhookConfigurationCall( + String webhookIdentifier, + UpdateWebhookConfigurationRequest updateWebhookConfigurationRequest, + final ApiCallback _callback) + throws ApiException { + String basePath = null; + // Operation Servers + String[] localBasePaths = new String[] {}; + + // Determine Base Path to Use + if (localCustomBaseUrl != null) { + basePath = localCustomBaseUrl; + } else if (localBasePaths.length > 0) { + basePath = localBasePaths[localHostIndex]; + } else { + basePath = null; + } + + Object localVarPostBody = updateWebhookConfigurationRequest; + + // create path and map variables + String localVarPath = + "/api/rest/2.0/webhooks/{webhook_identifier}/update" + .replace( + "{" + "webhook_identifier" + "}", + localVarApiClient.escapeString(webhookIdentifier.toString())); + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + final String[] localVarAccepts = {"application/json"}; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = {"application/json"}; + final String localVarContentType = + localVarApiClient.selectHeaderContentType(localVarContentTypes); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } + + String[] localVarAuthNames = new String[] {"bearerAuth"}; + return localVarApiClient.buildCall( + basePath, + localVarPath, + "POST", + localVarQueryParams, + localVarCollectionQueryParams, + localVarPostBody, + localVarHeaderParams, + localVarCookieParams, + localVarFormParams, + localVarAuthNames, + _callback); + } + + @SuppressWarnings("rawtypes") + private okhttp3.Call updateWebhookConfigurationValidateBeforeCall( + String webhookIdentifier, + UpdateWebhookConfigurationRequest updateWebhookConfigurationRequest, + final ApiCallback _callback) + throws ApiException { + // verify the required parameter 'webhookIdentifier' is set + if (webhookIdentifier == null) { + throw new ApiException( + "Missing the required parameter 'webhookIdentifier' when calling" + + " updateWebhookConfiguration(Async)"); + } + + // verify the required parameter 'updateWebhookConfigurationRequest' is set + if (updateWebhookConfigurationRequest == null) { + throw new ApiException( + "Missing the required parameter 'updateWebhookConfigurationRequest' when" + + " calling updateWebhookConfiguration(Async)"); + } + + return updateWebhookConfigurationCall( + webhookIdentifier, updateWebhookConfigurationRequest, _callback); + } + + /** + * Version: 10.14.0.cl or later Updates an existing webhook configuration by its unique id or + * name. Only the provided fields will be updated. Requires `ADMINISTRATION` (**Can + * administer ThoughtSpot**) or `DEVELOPER` (**Has developer privilege**) privilege. + * If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is + * enabled on your instance, users with `CAN_MANAGE_WEBHOOKS` (**Can manage + * webhooks**) privilege are also authorized to perform this action. + * + * @param webhookIdentifier Unique ID or name of the webhook configuration. (required) + * @param updateWebhookConfigurationRequest (required) + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the + * response body + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
204 Webhook configuration updated successfully -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public void updateWebhookConfiguration( + String webhookIdentifier, + UpdateWebhookConfigurationRequest updateWebhookConfigurationRequest) + throws ApiException { + updateWebhookConfigurationWithHttpInfo( + webhookIdentifier, updateWebhookConfigurationRequest); + } + + /** + * Version: 10.14.0.cl or later Updates an existing webhook configuration by its unique id or + * name. Only the provided fields will be updated. Requires `ADMINISTRATION` (**Can + * administer ThoughtSpot**) or `DEVELOPER` (**Has developer privilege**) privilege. + * If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is + * enabled on your instance, users with `CAN_MANAGE_WEBHOOKS` (**Can manage + * webhooks**) privilege are also authorized to perform this action. + * + * @param webhookIdentifier Unique ID or name of the webhook configuration. (required) + * @param updateWebhookConfigurationRequest (required) + * @return ApiResponse<Void> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the + * response body + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
204 Webhook configuration updated successfully -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public ApiResponse updateWebhookConfigurationWithHttpInfo( + String webhookIdentifier, + UpdateWebhookConfigurationRequest updateWebhookConfigurationRequest) + throws ApiException { + okhttp3.Call localVarCall = + updateWebhookConfigurationValidateBeforeCall( + webhookIdentifier, updateWebhookConfigurationRequest, null); + return localVarApiClient.execute(localVarCall); + } + + /** + * (asynchronously) Version: 10.14.0.cl or later Updates an existing webhook configuration by + * its unique id or name. Only the provided fields will be updated. Requires + * `ADMINISTRATION` (**Can administer ThoughtSpot**) or `DEVELOPER` (**Has + * developer privilege**) privilege. If [Role-Based Access Control + * (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, users with + * `CAN_MANAGE_WEBHOOKS` (**Can manage webhooks**) privilege are also authorized to + * perform this action. + * + * @param webhookIdentifier Unique ID or name of the webhook configuration. (required) + * @param updateWebhookConfigurationRequest (required) + * @param _callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body + * object + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
204 Webhook configuration updated successfully -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public okhttp3.Call updateWebhookConfigurationAsync( + String webhookIdentifier, + UpdateWebhookConfigurationRequest updateWebhookConfigurationRequest, + final ApiCallback _callback) + throws ApiException { + + okhttp3.Call localVarCall = + updateWebhookConfigurationValidateBeforeCall( + webhookIdentifier, updateWebhookConfigurationRequest, _callback); + localVarApiClient.executeAsync(localVarCall, _callback); + return localVarCall; + } + /** + * Build call for validateCommunicationChannel + * + * @param validateCommunicationChannelRequest (required) + * @param _callback Callback for upload/download progress + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 communication channel configuration validated successfully. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public okhttp3.Call validateCommunicationChannelCall( + ValidateCommunicationChannelRequest validateCommunicationChannelRequest, + final ApiCallback _callback) + throws ApiException { + String basePath = null; + // Operation Servers + String[] localBasePaths = new String[] {}; + + // Determine Base Path to Use + if (localCustomBaseUrl != null) { + basePath = localCustomBaseUrl; + } else if (localBasePaths.length > 0) { + basePath = localBasePaths[localHostIndex]; + } else { + basePath = null; + } + + Object localVarPostBody = validateCommunicationChannelRequest; + + // create path and map variables + String localVarPath = "/api/rest/2.0/system/communication-channels/validate"; + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + final String[] localVarAccepts = {"application/json"}; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = {"application/json"}; + final String localVarContentType = + localVarApiClient.selectHeaderContentType(localVarContentTypes); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } + + String[] localVarAuthNames = new String[] {"bearerAuth"}; + return localVarApiClient.buildCall( + basePath, + localVarPath, + "POST", + localVarQueryParams, + localVarCollectionQueryParams, + localVarPostBody, + localVarHeaderParams, + localVarCookieParams, + localVarFormParams, + localVarAuthNames, + _callback); + } + + @SuppressWarnings("rawtypes") + private okhttp3.Call validateCommunicationChannelValidateBeforeCall( + ValidateCommunicationChannelRequest validateCommunicationChannelRequest, + final ApiCallback _callback) + throws ApiException { + // verify the required parameter 'validateCommunicationChannelRequest' is set + if (validateCommunicationChannelRequest == null) { + throw new ApiException( + "Missing the required parameter 'validateCommunicationChannelRequest' when" + + " calling validateCommunicationChannel(Async)"); + } + + return validateCommunicationChannelCall(validateCommunicationChannelRequest, _callback); + } + + /** + * Version: 26.4.0.cl or later Validates a communication channel configuration to ensure it is + * properly set up and can receive events. - Use `channel_type` to specify the type of + * communication channel to validate (e.g., WEBHOOK). - Use `channel_identifier` to + * provide the unique identifier or name for the communication channel. - Use + * `event_type` to specify the event type to validate for this channel. Requires + * `ADMINISTRATION` (**Can administer ThoughtSpot**) or `DEVELOPER` (**Has + * developer privilege**) privilege. For webhook channels, users with + * `CAN_MANAGE_WEBHOOKS` (**Can manage webhooks**) privilege are also authorized to + * perform this action. + * + * @param validateCommunicationChannelRequest (required) + * @return CommunicationChannelValidateResponse + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the + * response body + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 communication channel configuration validated successfully. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public CommunicationChannelValidateResponse validateCommunicationChannel( + ValidateCommunicationChannelRequest validateCommunicationChannelRequest) + throws ApiException { + ApiResponse localVarResp = + validateCommunicationChannelWithHttpInfo(validateCommunicationChannelRequest); + return localVarResp.getData(); + } + + /** + * Version: 26.4.0.cl or later Validates a communication channel configuration to ensure it is + * properly set up and can receive events. - Use `channel_type` to specify the type of + * communication channel to validate (e.g., WEBHOOK). - Use `channel_identifier` to + * provide the unique identifier or name for the communication channel. - Use + * `event_type` to specify the event type to validate for this channel. Requires + * `ADMINISTRATION` (**Can administer ThoughtSpot**) or `DEVELOPER` (**Has + * developer privilege**) privilege. For webhook channels, users with + * `CAN_MANAGE_WEBHOOKS` (**Can manage webhooks**) privilege are also authorized to + * perform this action. + * + * @param validateCommunicationChannelRequest (required) + * @return ApiResponse<CommunicationChannelValidateResponse> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the + * response body + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 communication channel configuration validated successfully. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public ApiResponse + validateCommunicationChannelWithHttpInfo( + ValidateCommunicationChannelRequest validateCommunicationChannelRequest) + throws ApiException { + okhttp3.Call localVarCall = + validateCommunicationChannelValidateBeforeCall( + validateCommunicationChannelRequest, null); + Type localVarReturnType = + new TypeToken() {}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); + } + + /** + * (asynchronously) Version: 26.4.0.cl or later Validates a communication channel configuration + * to ensure it is properly set up and can receive events. - Use `channel_type` to + * specify the type of communication channel to validate (e.g., WEBHOOK). - Use + * `channel_identifier` to provide the unique identifier or name for the communication + * channel. - Use `event_type` to specify the event type to validate for this channel. + * Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) or `DEVELOPER` + * (**Has developer privilege**) privilege. For webhook channels, users with + * `CAN_MANAGE_WEBHOOKS` (**Can manage webhooks**) privilege are also authorized to + * perform this action. + * + * @param validateCommunicationChannelRequest (required) + * @param _callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body + * object + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 communication channel configuration validated successfully. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public okhttp3.Call validateCommunicationChannelAsync( + ValidateCommunicationChannelRequest validateCommunicationChannelRequest, + final ApiCallback _callback) + throws ApiException { + + okhttp3.Call localVarCall = + validateCommunicationChannelValidateBeforeCall( + validateCommunicationChannelRequest, _callback); + Type localVarReturnType = + new TypeToken() {}.getType(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; + } + /** + * Build call for validateEmailCustomization + * + * @param _callback Callback for upload/download progress + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + * @http.response.details + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
204 Triggered test email for customization configuration -
400 Invalid request. -
403 Unauthorized access. -
500 Unexpected error -
+ */ + public okhttp3.Call validateEmailCustomizationCall(final ApiCallback _callback) + throws ApiException { + String basePath = null; + // Operation Servers + String[] localBasePaths = new String[] {}; + + // Determine Base Path to Use + if (localCustomBaseUrl != null) { + basePath = localCustomBaseUrl; + } else if (localBasePaths.length > 0) { + basePath = localBasePaths[localHostIndex]; + } else { + basePath = null; + } + + Object localVarPostBody = null; + + // create path and map variables + String localVarPath = "/api/rest/2.0/customization/email/validate"; + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + final String[] localVarAccepts = {"application/json"}; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = {}; + final String localVarContentType = + localVarApiClient.selectHeaderContentType(localVarContentTypes); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } + + String[] localVarAuthNames = new String[] {"bearerAuth"}; + return localVarApiClient.buildCall( + basePath, + localVarPath, + "POST", + localVarQueryParams, + localVarCollectionQueryParams, + localVarPostBody, + localVarHeaderParams, + localVarCookieParams, + localVarFormParams, + localVarAuthNames, + _callback); + } + + @SuppressWarnings("rawtypes") + private okhttp3.Call validateEmailCustomizationValidateBeforeCall(final ApiCallback _callback) + throws ApiException { + return validateEmailCustomizationCall(_callback); + } + + /** + * Version: 10.10.0.cl or later Validates the email customization configuration if any set for + * the ThoughtSpot system. #### Pre-requisites Requires `DEVELOPER` (**has developer + * privilege**) or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If + * [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled + * on your instance, the `DEVELOPER` (**Has developer privilege**) privilege is + * required. **NOTE**:This endpoint in currently in beta. Contact ThoughtSpot support to enable + * this on your instance. + * + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the + * response body + * @http.response.details + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
204 Triggered test email for customization configuration -
400 Invalid request. -
403 Unauthorized access. -
500 Unexpected error -
+ */ + public void validateEmailCustomization() throws ApiException { + validateEmailCustomizationWithHttpInfo(); + } + + /** + * Version: 10.10.0.cl or later Validates the email customization configuration if any set for + * the ThoughtSpot system. #### Pre-requisites Requires `DEVELOPER` (**has developer + * privilege**) or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If + * [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled + * on your instance, the `DEVELOPER` (**Has developer privilege**) privilege is + * required. **NOTE**:This endpoint in currently in beta. Contact ThoughtSpot support to enable + * this on your instance. + * + * @return ApiResponse<Void> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the + * response body + * @http.response.details + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
204 Triggered test email for customization configuration -
400 Invalid request. -
403 Unauthorized access. -
500 Unexpected error -
+ */ + public ApiResponse validateEmailCustomizationWithHttpInfo() throws ApiException { + okhttp3.Call localVarCall = validateEmailCustomizationValidateBeforeCall(null); + return localVarApiClient.execute(localVarCall); + } + + /** + * (asynchronously) Version: 10.10.0.cl or later Validates the email customization configuration + * if any set for the ThoughtSpot system. #### Pre-requisites Requires `DEVELOPER` + * (**has developer privilege**) or `ADMINISTRATION` (**Can administer ThoughtSpot**) + * privilege. If [Role-Based Access Control + * (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the + * `DEVELOPER` (**Has developer privilege**) privilege is required. **NOTE**:This + * endpoint in currently in beta. Contact ThoughtSpot support to enable this on your instance. + * + * @param _callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body + * object + * @http.response.details + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
204 Triggered test email for customization configuration -
400 Invalid request. -
403 Unauthorized access. -
500 Unexpected error -
+ */ + public okhttp3.Call validateEmailCustomizationAsync(final ApiCallback _callback) + throws ApiException { + + okhttp3.Call localVarCall = validateEmailCustomizationValidateBeforeCall(_callback); + localVarApiClient.executeAsync(localVarCall, _callback); + return localVarCall; + } + /** + * Build call for validateMerge + * + * @param validateMergeRequest (required) + * @param _callback Callback for upload/download progress + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 validation done successfully -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public okhttp3.Call validateMergeCall( + ValidateMergeRequest validateMergeRequest, final ApiCallback _callback) + throws ApiException { + String basePath = null; + // Operation Servers + String[] localBasePaths = new String[] {}; + + // Determine Base Path to Use + if (localCustomBaseUrl != null) { + basePath = localCustomBaseUrl; + } else if (localBasePaths.length > 0) { + basePath = localBasePaths[localHostIndex]; + } else { + basePath = null; + } + + Object localVarPostBody = validateMergeRequest; + + // create path and map variables + String localVarPath = "/api/rest/2.0/vcs/git/branches/validate"; + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + final String[] localVarAccepts = {"application/json"}; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = {"application/json"}; + final String localVarContentType = + localVarApiClient.selectHeaderContentType(localVarContentTypes); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } + + String[] localVarAuthNames = new String[] {"bearerAuth"}; + return localVarApiClient.buildCall( + basePath, + localVarPath, + "POST", + localVarQueryParams, + localVarCollectionQueryParams, + localVarPostBody, + localVarHeaderParams, + localVarCookieParams, + localVarFormParams, + localVarAuthNames, + _callback); + } + + @SuppressWarnings("rawtypes") + private okhttp3.Call validateMergeValidateBeforeCall( + ValidateMergeRequest validateMergeRequest, final ApiCallback _callback) + throws ApiException { + // verify the required parameter 'validateMergeRequest' is set + if (validateMergeRequest == null) { + throw new ApiException( + "Missing the required parameter 'validateMergeRequest' when calling" + + " validateMerge(Async)"); + } + + return validateMergeCall(validateMergeRequest, _callback); + } + + /** + * Version: 9.2.0.cl or later Validates the content of your source branch against the objects in + * your destination environment. Before merging content from your source branch to the + * destination branch, run this API operation from your destination environment and ensure that + * the changes from the source branch function in the destination environment. Requires + * `DATAMANAGEMENT` (**Can manage data**) privilege. If [Role-Based Access Control + * (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance on your + * instance, the `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` (**Can manage data models**) + * privilege and edit access to the metadata objects. + * + * @param validateMergeRequest (required) + * @return List<DeployResponse> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the + * response body + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 validation done successfully -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public List validateMerge(ValidateMergeRequest validateMergeRequest) + throws ApiException { + ApiResponse> localVarResp = + validateMergeWithHttpInfo(validateMergeRequest); + return localVarResp.getData(); + } + + /** + * Version: 9.2.0.cl or later Validates the content of your source branch against the objects in + * your destination environment. Before merging content from your source branch to the + * destination branch, run this API operation from your destination environment and ensure that + * the changes from the source branch function in the destination environment. Requires + * `DATAMANAGEMENT` (**Can manage data**) privilege. If [Role-Based Access Control + * (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance on your + * instance, the `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` (**Can manage data models**) + * privilege and edit access to the metadata objects. + * + * @param validateMergeRequest (required) + * @return ApiResponse<List<DeployResponse>> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the + * response body + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 validation done successfully -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public ApiResponse> validateMergeWithHttpInfo( + ValidateMergeRequest validateMergeRequest) throws ApiException { + okhttp3.Call localVarCall = validateMergeValidateBeforeCall(validateMergeRequest, null); + Type localVarReturnType = new TypeToken>() {}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); + } + + /** + * (asynchronously) Version: 9.2.0.cl or later Validates the content of your source branch + * against the objects in your destination environment. Before merging content from your source + * branch to the destination branch, run this API operation from your destination environment + * and ensure that the changes from the source branch function in the destination environment. + * Requires `DATAMANAGEMENT` (**Can manage data**) privilege. If [Role-Based Access + * Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance on + * your instance, the `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` (**Can manage data models**) + * privilege and edit access to the metadata objects. + * + * @param validateMergeRequest (required) + * @param _callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body + * object + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 validation done successfully -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public okhttp3.Call validateMergeAsync( + ValidateMergeRequest validateMergeRequest, + final ApiCallback> _callback) + throws ApiException { + + okhttp3.Call localVarCall = + validateMergeValidateBeforeCall(validateMergeRequest, _callback); + Type localVarReturnType = new TypeToken>() {}.getType(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; + } + /** + * Build call for validateToken + * + * @param validateTokenRequest (required) + * @param _callback Callback for upload/download progress + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 Token validation successful. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public okhttp3.Call validateTokenCall( + ValidateTokenRequest validateTokenRequest, final ApiCallback _callback) + throws ApiException { + String basePath = null; + // Operation Servers + String[] localBasePaths = new String[] {}; + + // Determine Base Path to Use + if (localCustomBaseUrl != null) { + basePath = localCustomBaseUrl; + } else if (localBasePaths.length > 0) { + basePath = localBasePaths[localHostIndex]; + } else { + basePath = null; + } + + Object localVarPostBody = validateTokenRequest; + + // create path and map variables + String localVarPath = "/api/rest/2.0/auth/token/validate"; + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + final String[] localVarAccepts = {"application/json"}; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = {"application/json"}; + final String localVarContentType = + localVarApiClient.selectHeaderContentType(localVarContentTypes); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } + + String[] localVarAuthNames = new String[] {"bearerAuth"}; + return localVarApiClient.buildCall( + basePath, + localVarPath, + "POST", + localVarQueryParams, + localVarCollectionQueryParams, + localVarPostBody, + localVarHeaderParams, + localVarCookieParams, + localVarFormParams, + localVarAuthNames, + _callback); + } + + @SuppressWarnings("rawtypes") + private okhttp3.Call validateTokenValidateBeforeCall( + ValidateTokenRequest validateTokenRequest, final ApiCallback _callback) + throws ApiException { + // verify the required parameter 'validateTokenRequest' is set + if (validateTokenRequest == null) { + throw new ApiException( + "Missing the required parameter 'validateTokenRequest' when calling" + + " validateToken(Async)"); + } + + return validateTokenCall(validateTokenRequest, _callback); + } + + /** + * Version: 9.12.0.cl or later Validates the authentication token specified in the API request. + * If your token is not valid, [Get a new + * token](#/http/api-endpoints/authentication/get-full-access-token). + * + * @param validateTokenRequest (required) + * @return TokenValidationResponse + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the + * response body + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 Token validation successful. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public TokenValidationResponse validateToken(ValidateTokenRequest validateTokenRequest) + throws ApiException { + ApiResponse localVarResp = + validateTokenWithHttpInfo(validateTokenRequest); + return localVarResp.getData(); + } + + /** + * Version: 9.12.0.cl or later Validates the authentication token specified in the API request. + * If your token is not valid, [Get a new + * token](#/http/api-endpoints/authentication/get-full-access-token). + * + * @param validateTokenRequest (required) + * @return ApiResponse<TokenValidationResponse> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the + * response body + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 Token validation successful. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public ApiResponse validateTokenWithHttpInfo( + ValidateTokenRequest validateTokenRequest) throws ApiException { + okhttp3.Call localVarCall = validateTokenValidateBeforeCall(validateTokenRequest, null); + Type localVarReturnType = new TypeToken() {}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); + } + + /** + * (asynchronously) Version: 9.12.0.cl or later Validates the authentication token specified in + * the API request. If your token is not valid, [Get a new + * token](#/http/api-endpoints/authentication/get-full-access-token). + * + * @param validateTokenRequest (required) + * @param _callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body + * object + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 Token validation successful. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public okhttp3.Call validateTokenAsync( + ValidateTokenRequest validateTokenRequest, + final ApiCallback _callback) + throws ApiException { + + okhttp3.Call localVarCall = + validateTokenValidateBeforeCall(validateTokenRequest, _callback); + Type localVarReturnType = new TypeToken() {}.getType(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; + } +} diff --git a/sdks/java/src/main/java/com/thoughtspot/client/api/UsersApi.java b/sdks/java/src/main/java/com/thoughtspot/client/api/UsersApi.java new file mode 100644 index 000000000..9d9e8cbad --- /dev/null +++ b/sdks/java/src/main/java/com/thoughtspot/client/api/UsersApi.java @@ -0,0 +1,1951 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client.api; + +import com.google.gson.reflect.TypeToken; +import com.thoughtspot.client.ApiCallback; +import com.thoughtspot.client.ApiClient; +import com.thoughtspot.client.ApiClientConfiguration; +import com.thoughtspot.client.ApiException; +import com.thoughtspot.client.ApiResponse; +import com.thoughtspot.client.Configuration; +import com.thoughtspot.client.Pair; +import com.thoughtspot.client.model.ActivateUserRequest; +import com.thoughtspot.client.model.ChangeUserPasswordRequest; +import com.thoughtspot.client.model.CreateUserRequest; +import com.thoughtspot.client.model.DeactivateUserRequest; +import com.thoughtspot.client.model.ForceLogoutUsersRequest; +import com.thoughtspot.client.model.ImportUsersRequest; +import com.thoughtspot.client.model.ImportUsersResponse; +import com.thoughtspot.client.model.ResetUserPasswordRequest; +import com.thoughtspot.client.model.ResponseActivationURL; +import com.thoughtspot.client.model.SearchUsersRequest; +import com.thoughtspot.client.model.UpdateUserRequest; +import com.thoughtspot.client.model.User; +import java.lang.reflect.Type; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +@javax.annotation.Generated( + value = "org.openapitools.codegen.languages.JavaClientCodegen", + comments = "Generator version: 7.12.0") +public class UsersApi { + private ApiClient localVarApiClient; + private ApiClientConfiguration localVarApiClientConfiguration; + private int localHostIndex; + private String localCustomBaseUrl; + + public UsersApi() { + this(Configuration.getDefaultApiClient()); + } + + public UsersApi(ApiClient apiClient) { + this.localVarApiClient = apiClient; + } + + public UsersApi(ApiClientConfiguration apiClientConfiguration) { + this.localVarApiClientConfiguration = apiClientConfiguration; + this.localVarApiClient = new ApiClient(apiClientConfiguration); + } + + public ApiClient getApiClient() { + return localVarApiClient; + } + + public void setApiClient(ApiClient apiClient) { + this.localVarApiClient = apiClient; + } + + public ApiClientConfiguration getApiClientConfiguration() { + return localVarApiClientConfiguration; + } + + public void applyApiClientConfiguration(ApiClientConfiguration apiClientConfiguration) { + this.localVarApiClientConfiguration = apiClientConfiguration; + if (localVarApiClient != null) { + localVarApiClient.applyApiClientConfiguration(apiClientConfiguration); + } else { + localVarApiClient = new ApiClient(apiClientConfiguration); + } + } + + public int getHostIndex() { + return localHostIndex; + } + + public void setHostIndex(int hostIndex) { + this.localHostIndex = hostIndex; + } + + public String getCustomBaseUrl() { + return localCustomBaseUrl; + } + + public void setCustomBaseUrl(String customBaseUrl) { + this.localCustomBaseUrl = customBaseUrl; + } + + /** + * Build call for activateUser + * + * @param activateUserRequest (required) + * @param _callback Callback for upload/download progress + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 User activated successfully. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public okhttp3.Call activateUserCall( + ActivateUserRequest activateUserRequest, final ApiCallback _callback) + throws ApiException { + String basePath = null; + // Operation Servers + String[] localBasePaths = new String[] {}; + + // Determine Base Path to Use + if (localCustomBaseUrl != null) { + basePath = localCustomBaseUrl; + } else if (localBasePaths.length > 0) { + basePath = localBasePaths[localHostIndex]; + } else { + basePath = null; + } + + Object localVarPostBody = activateUserRequest; + + // create path and map variables + String localVarPath = "/api/rest/2.0/users/activate"; + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + final String[] localVarAccepts = {"application/json"}; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = {"application/json"}; + final String localVarContentType = + localVarApiClient.selectHeaderContentType(localVarContentTypes); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } + + String[] localVarAuthNames = new String[] {"bearerAuth"}; + return localVarApiClient.buildCall( + basePath, + localVarPath, + "POST", + localVarQueryParams, + localVarCollectionQueryParams, + localVarPostBody, + localVarHeaderParams, + localVarCookieParams, + localVarFormParams, + localVarAuthNames, + _callback); + } + + @SuppressWarnings("rawtypes") + private okhttp3.Call activateUserValidateBeforeCall( + ActivateUserRequest activateUserRequest, final ApiCallback _callback) + throws ApiException { + // verify the required parameter 'activateUserRequest' is set + if (activateUserRequest == null) { + throw new ApiException( + "Missing the required parameter 'activateUserRequest' when calling" + + " activateUser(Async)"); + } + + return activateUserCall(activateUserRequest, _callback); + } + + /** + * Version: 9.7.0.cl or later Activates a deactivated user account. Requires + * `ADMINISTRATION` (**Can administer Thoughtspot**) privilege. If [Role-Based Access + * Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, + * the `USER_ADMINISTRATION` (**Can manage users**) privilege is required. To activate + * an inactive user account, the API request body must include the following information: - + * Username or the GUID of the user account. - Auth token generated for the deactivated user. + * The auth token is sent in the API response when a user is deactivated. - Password for the + * user account. + * + * @param activateUserRequest (required) + * @return User + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the + * response body + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 User activated successfully. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public User activateUser(ActivateUserRequest activateUserRequest) throws ApiException { + ApiResponse localVarResp = activateUserWithHttpInfo(activateUserRequest); + return localVarResp.getData(); + } + + /** + * Version: 9.7.0.cl or later Activates a deactivated user account. Requires + * `ADMINISTRATION` (**Can administer Thoughtspot**) privilege. If [Role-Based Access + * Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, + * the `USER_ADMINISTRATION` (**Can manage users**) privilege is required. To activate + * an inactive user account, the API request body must include the following information: - + * Username or the GUID of the user account. - Auth token generated for the deactivated user. + * The auth token is sent in the API response when a user is deactivated. - Password for the + * user account. + * + * @param activateUserRequest (required) + * @return ApiResponse<User> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the + * response body + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 User activated successfully. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public ApiResponse activateUserWithHttpInfo(ActivateUserRequest activateUserRequest) + throws ApiException { + okhttp3.Call localVarCall = activateUserValidateBeforeCall(activateUserRequest, null); + Type localVarReturnType = new TypeToken() {}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); + } + + /** + * (asynchronously) Version: 9.7.0.cl or later Activates a deactivated user account. Requires + * `ADMINISTRATION` (**Can administer Thoughtspot**) privilege. If [Role-Based Access + * Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, + * the `USER_ADMINISTRATION` (**Can manage users**) privilege is required. To activate + * an inactive user account, the API request body must include the following information: - + * Username or the GUID of the user account. - Auth token generated for the deactivated user. + * The auth token is sent in the API response when a user is deactivated. - Password for the + * user account. + * + * @param activateUserRequest (required) + * @param _callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body + * object + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 User activated successfully. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public okhttp3.Call activateUserAsync( + ActivateUserRequest activateUserRequest, final ApiCallback _callback) + throws ApiException { + + okhttp3.Call localVarCall = activateUserValidateBeforeCall(activateUserRequest, _callback); + Type localVarReturnType = new TypeToken() {}.getType(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; + } + /** + * Build call for changeUserPassword + * + * @param changeUserPasswordRequest (required) + * @param _callback Callback for upload/download progress + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
204 User password change operation successful. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public okhttp3.Call changeUserPasswordCall( + ChangeUserPasswordRequest changeUserPasswordRequest, final ApiCallback _callback) + throws ApiException { + String basePath = null; + // Operation Servers + String[] localBasePaths = new String[] {}; + + // Determine Base Path to Use + if (localCustomBaseUrl != null) { + basePath = localCustomBaseUrl; + } else if (localBasePaths.length > 0) { + basePath = localBasePaths[localHostIndex]; + } else { + basePath = null; + } + + Object localVarPostBody = changeUserPasswordRequest; + + // create path and map variables + String localVarPath = "/api/rest/2.0/users/change-password"; + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + final String[] localVarAccepts = {"application/json"}; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = {"application/json"}; + final String localVarContentType = + localVarApiClient.selectHeaderContentType(localVarContentTypes); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } + + String[] localVarAuthNames = new String[] {"bearerAuth"}; + return localVarApiClient.buildCall( + basePath, + localVarPath, + "POST", + localVarQueryParams, + localVarCollectionQueryParams, + localVarPostBody, + localVarHeaderParams, + localVarCookieParams, + localVarFormParams, + localVarAuthNames, + _callback); + } + + @SuppressWarnings("rawtypes") + private okhttp3.Call changeUserPasswordValidateBeforeCall( + ChangeUserPasswordRequest changeUserPasswordRequest, final ApiCallback _callback) + throws ApiException { + // verify the required parameter 'changeUserPasswordRequest' is set + if (changeUserPasswordRequest == null) { + throw new ApiException( + "Missing the required parameter 'changeUserPasswordRequest' when calling" + + " changeUserPassword(Async)"); + } + + return changeUserPasswordCall(changeUserPasswordRequest, _callback); + } + + /** + * Version: 9.0.0.cl or later Updates the current password of the user. Requires + * `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access + * Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, + * the `USER_ADMINISTRATION` (**Can manage users**) privilege is required. + * + * @param changeUserPasswordRequest (required) + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the + * response body + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
204 User password change operation successful. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public void changeUserPassword(ChangeUserPasswordRequest changeUserPasswordRequest) + throws ApiException { + changeUserPasswordWithHttpInfo(changeUserPasswordRequest); + } + + /** + * Version: 9.0.0.cl or later Updates the current password of the user. Requires + * `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access + * Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, + * the `USER_ADMINISTRATION` (**Can manage users**) privilege is required. + * + * @param changeUserPasswordRequest (required) + * @return ApiResponse<Void> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the + * response body + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
204 User password change operation successful. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public ApiResponse changeUserPasswordWithHttpInfo( + ChangeUserPasswordRequest changeUserPasswordRequest) throws ApiException { + okhttp3.Call localVarCall = + changeUserPasswordValidateBeforeCall(changeUserPasswordRequest, null); + return localVarApiClient.execute(localVarCall); + } + + /** + * (asynchronously) Version: 9.0.0.cl or later Updates the current password of the user. + * Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If + * [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled + * on your instance, the `USER_ADMINISTRATION` (**Can manage users**) privilege is + * required. + * + * @param changeUserPasswordRequest (required) + * @param _callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body + * object + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
204 User password change operation successful. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public okhttp3.Call changeUserPasswordAsync( + ChangeUserPasswordRequest changeUserPasswordRequest, final ApiCallback _callback) + throws ApiException { + + okhttp3.Call localVarCall = + changeUserPasswordValidateBeforeCall(changeUserPasswordRequest, _callback); + localVarApiClient.executeAsync(localVarCall, _callback); + return localVarCall; + } + /** + * Build call for createUser + * + * @param createUserRequest (required) + * @param _callback Callback for upload/download progress + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 User successfully created. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public okhttp3.Call createUserCall( + CreateUserRequest createUserRequest, final ApiCallback _callback) throws ApiException { + String basePath = null; + // Operation Servers + String[] localBasePaths = new String[] {}; + + // Determine Base Path to Use + if (localCustomBaseUrl != null) { + basePath = localCustomBaseUrl; + } else if (localBasePaths.length > 0) { + basePath = localBasePaths[localHostIndex]; + } else { + basePath = null; + } + + Object localVarPostBody = createUserRequest; + + // create path and map variables + String localVarPath = "/api/rest/2.0/users/create"; + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + final String[] localVarAccepts = {"application/json"}; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = {"application/json"}; + final String localVarContentType = + localVarApiClient.selectHeaderContentType(localVarContentTypes); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } + + String[] localVarAuthNames = new String[] {"bearerAuth"}; + return localVarApiClient.buildCall( + basePath, + localVarPath, + "POST", + localVarQueryParams, + localVarCollectionQueryParams, + localVarPostBody, + localVarHeaderParams, + localVarCookieParams, + localVarFormParams, + localVarAuthNames, + _callback); + } + + @SuppressWarnings("rawtypes") + private okhttp3.Call createUserValidateBeforeCall( + CreateUserRequest createUserRequest, final ApiCallback _callback) throws ApiException { + // verify the required parameter 'createUserRequest' is set + if (createUserRequest == null) { + throw new ApiException( + "Missing the required parameter 'createUserRequest' when calling" + + " createUser(Async)"); + } + + return createUserCall(createUserRequest, _callback); + } + + /** + * Version: 9.0.0.cl or later Creates a user in ThoughtSpot. The API endpoint allows you to + * configure several user properties such as email address, account status, share notification + * preferences, and sharing visibility. You can provision the user to + * [groups](https://docs.thoughtspot.com/cloud/latest/groups-privileges) and + * [Orgs](https://docs.thoughtspot.com/cloud/latest/orgs-overview). You can also add Liveboard, + * Answer, and Worksheet objects to the user’s favorites list, assign a default Liveboard for + * the user, and set user preferences. Requires `ADMINISTRATION` (**Can administer + * ThoughtSpot**) privilege. If [Role-Based Access Control + * (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the + * `USER_ADMINISTRATION` (**Can manage users**) privilege is required. + * + * @param createUserRequest (required) + * @return User + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the + * response body + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 User successfully created. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public User createUser(CreateUserRequest createUserRequest) throws ApiException { + ApiResponse localVarResp = createUserWithHttpInfo(createUserRequest); + return localVarResp.getData(); + } + + /** + * Version: 9.0.0.cl or later Creates a user in ThoughtSpot. The API endpoint allows you to + * configure several user properties such as email address, account status, share notification + * preferences, and sharing visibility. You can provision the user to + * [groups](https://docs.thoughtspot.com/cloud/latest/groups-privileges) and + * [Orgs](https://docs.thoughtspot.com/cloud/latest/orgs-overview). You can also add Liveboard, + * Answer, and Worksheet objects to the user’s favorites list, assign a default Liveboard for + * the user, and set user preferences. Requires `ADMINISTRATION` (**Can administer + * ThoughtSpot**) privilege. If [Role-Based Access Control + * (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the + * `USER_ADMINISTRATION` (**Can manage users**) privilege is required. + * + * @param createUserRequest (required) + * @return ApiResponse<User> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the + * response body + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 User successfully created. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public ApiResponse createUserWithHttpInfo(CreateUserRequest createUserRequest) + throws ApiException { + okhttp3.Call localVarCall = createUserValidateBeforeCall(createUserRequest, null); + Type localVarReturnType = new TypeToken() {}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); + } + + /** + * (asynchronously) Version: 9.0.0.cl or later Creates a user in ThoughtSpot. The API endpoint + * allows you to configure several user properties such as email address, account status, share + * notification preferences, and sharing visibility. You can provision the user to + * [groups](https://docs.thoughtspot.com/cloud/latest/groups-privileges) and + * [Orgs](https://docs.thoughtspot.com/cloud/latest/orgs-overview). You can also add Liveboard, + * Answer, and Worksheet objects to the user’s favorites list, assign a default Liveboard for + * the user, and set user preferences. Requires `ADMINISTRATION` (**Can administer + * ThoughtSpot**) privilege. If [Role-Based Access Control + * (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the + * `USER_ADMINISTRATION` (**Can manage users**) privilege is required. + * + * @param createUserRequest (required) + * @param _callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body + * object + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 User successfully created. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public okhttp3.Call createUserAsync( + CreateUserRequest createUserRequest, final ApiCallback _callback) + throws ApiException { + + okhttp3.Call localVarCall = createUserValidateBeforeCall(createUserRequest, _callback); + Type localVarReturnType = new TypeToken() {}.getType(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; + } + /** + * Build call for deactivateUser + * + * @param deactivateUserRequest (required) + * @param _callback Callback for upload/download progress + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 User deactivated successfully. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public okhttp3.Call deactivateUserCall( + DeactivateUserRequest deactivateUserRequest, final ApiCallback _callback) + throws ApiException { + String basePath = null; + // Operation Servers + String[] localBasePaths = new String[] {}; + + // Determine Base Path to Use + if (localCustomBaseUrl != null) { + basePath = localCustomBaseUrl; + } else if (localBasePaths.length > 0) { + basePath = localBasePaths[localHostIndex]; + } else { + basePath = null; + } + + Object localVarPostBody = deactivateUserRequest; + + // create path and map variables + String localVarPath = "/api/rest/2.0/users/deactivate"; + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + final String[] localVarAccepts = {"application/json"}; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = {"application/json"}; + final String localVarContentType = + localVarApiClient.selectHeaderContentType(localVarContentTypes); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } + + String[] localVarAuthNames = new String[] {"bearerAuth"}; + return localVarApiClient.buildCall( + basePath, + localVarPath, + "POST", + localVarQueryParams, + localVarCollectionQueryParams, + localVarPostBody, + localVarHeaderParams, + localVarCookieParams, + localVarFormParams, + localVarAuthNames, + _callback); + } + + @SuppressWarnings("rawtypes") + private okhttp3.Call deactivateUserValidateBeforeCall( + DeactivateUserRequest deactivateUserRequest, final ApiCallback _callback) + throws ApiException { + // verify the required parameter 'deactivateUserRequest' is set + if (deactivateUserRequest == null) { + throw new ApiException( + "Missing the required parameter 'deactivateUserRequest' when calling" + + " deactivateUser(Async)"); + } + + return deactivateUserCall(deactivateUserRequest, _callback); + } + + /** + * Version: 9.7.0.cl or later Deactivates a user account. Requires `ADMINISTRATION` + * (**Can administer Thoughtspot**) privilege. If [Role-Based Access Control + * (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the + * `USER_ADMINISTRATION` (**Can manage users**) privilege is required. To deactivate a + * user account, the API request body must include the following information: - Username or the + * GUID of the user account - Base URL of the ThoughtSpot instance If the API request is + * successful, ThoughtSpot returns the activation URL in the response. The activation URL is + * valid for 14 days and can be used to re-activate the account and reset the password of the + * deactivated account. + * + * @param deactivateUserRequest (required) + * @return ResponseActivationURL + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the + * response body + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 User deactivated successfully. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public ResponseActivationURL deactivateUser(DeactivateUserRequest deactivateUserRequest) + throws ApiException { + ApiResponse localVarResp = + deactivateUserWithHttpInfo(deactivateUserRequest); + return localVarResp.getData(); + } + + /** + * Version: 9.7.0.cl or later Deactivates a user account. Requires `ADMINISTRATION` + * (**Can administer Thoughtspot**) privilege. If [Role-Based Access Control + * (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the + * `USER_ADMINISTRATION` (**Can manage users**) privilege is required. To deactivate a + * user account, the API request body must include the following information: - Username or the + * GUID of the user account - Base URL of the ThoughtSpot instance If the API request is + * successful, ThoughtSpot returns the activation URL in the response. The activation URL is + * valid for 14 days and can be used to re-activate the account and reset the password of the + * deactivated account. + * + * @param deactivateUserRequest (required) + * @return ApiResponse<ResponseActivationURL> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the + * response body + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 User deactivated successfully. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public ApiResponse deactivateUserWithHttpInfo( + DeactivateUserRequest deactivateUserRequest) throws ApiException { + okhttp3.Call localVarCall = deactivateUserValidateBeforeCall(deactivateUserRequest, null); + Type localVarReturnType = new TypeToken() {}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); + } + + /** + * (asynchronously) Version: 9.7.0.cl or later Deactivates a user account. Requires + * `ADMINISTRATION` (**Can administer Thoughtspot**) privilege. If [Role-Based Access + * Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, + * the `USER_ADMINISTRATION` (**Can manage users**) privilege is required. To + * deactivate a user account, the API request body must include the following information: - + * Username or the GUID of the user account - Base URL of the ThoughtSpot instance If the API + * request is successful, ThoughtSpot returns the activation URL in the response. The activation + * URL is valid for 14 days and can be used to re-activate the account and reset the password of + * the deactivated account. + * + * @param deactivateUserRequest (required) + * @param _callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body + * object + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 User deactivated successfully. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public okhttp3.Call deactivateUserAsync( + DeactivateUserRequest deactivateUserRequest, + final ApiCallback _callback) + throws ApiException { + + okhttp3.Call localVarCall = + deactivateUserValidateBeforeCall(deactivateUserRequest, _callback); + Type localVarReturnType = new TypeToken() {}.getType(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; + } + /** + * Build call for deleteUser + * + * @param userIdentifier GUID / name of the user (required) + * @param _callback Callback for upload/download progress + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
204 User successfully deleted. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public okhttp3.Call deleteUserCall(String userIdentifier, final ApiCallback _callback) + throws ApiException { + String basePath = null; + // Operation Servers + String[] localBasePaths = new String[] {}; + + // Determine Base Path to Use + if (localCustomBaseUrl != null) { + basePath = localCustomBaseUrl; + } else if (localBasePaths.length > 0) { + basePath = localBasePaths[localHostIndex]; + } else { + basePath = null; + } + + Object localVarPostBody = null; + + // create path and map variables + String localVarPath = + "/api/rest/2.0/users/{user_identifier}/delete" + .replace( + "{" + "user_identifier" + "}", + localVarApiClient.escapeString(userIdentifier.toString())); + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + final String[] localVarAccepts = {"application/json"}; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = {}; + final String localVarContentType = + localVarApiClient.selectHeaderContentType(localVarContentTypes); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } + + String[] localVarAuthNames = new String[] {"bearerAuth"}; + return localVarApiClient.buildCall( + basePath, + localVarPath, + "POST", + localVarQueryParams, + localVarCollectionQueryParams, + localVarPostBody, + localVarHeaderParams, + localVarCookieParams, + localVarFormParams, + localVarAuthNames, + _callback); + } + + @SuppressWarnings("rawtypes") + private okhttp3.Call deleteUserValidateBeforeCall( + String userIdentifier, final ApiCallback _callback) throws ApiException { + // verify the required parameter 'userIdentifier' is set + if (userIdentifier == null) { + throw new ApiException( + "Missing the required parameter 'userIdentifier' when calling" + + " deleteUser(Async)"); + } + + return deleteUserCall(userIdentifier, _callback); + } + + /** + * Version: 9.0.0.cl or later Deletes a user from the ThoughtSpot system. If you want to remove + * a user from a specific Org but not from ThoughtSpot, update the group and Org mapping + * properties of the user object via a POST API call to the + * [/api/rest/2.0/users/{user_identifier}/update](#/http/api-endpoints/users/update-user) + * endpoint. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If + * [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled + * on your instance, the `USER_ADMINISTRATION` (**Can manage users**) privilege is + * required. + * + * @param userIdentifier GUID / name of the user (required) + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the + * response body + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
204 User successfully deleted. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public void deleteUser(String userIdentifier) throws ApiException { + deleteUserWithHttpInfo(userIdentifier); + } + + /** + * Version: 9.0.0.cl or later Deletes a user from the ThoughtSpot system. If you want to remove + * a user from a specific Org but not from ThoughtSpot, update the group and Org mapping + * properties of the user object via a POST API call to the + * [/api/rest/2.0/users/{user_identifier}/update](#/http/api-endpoints/users/update-user) + * endpoint. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If + * [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled + * on your instance, the `USER_ADMINISTRATION` (**Can manage users**) privilege is + * required. + * + * @param userIdentifier GUID / name of the user (required) + * @return ApiResponse<Void> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the + * response body + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
204 User successfully deleted. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public ApiResponse deleteUserWithHttpInfo(String userIdentifier) throws ApiException { + okhttp3.Call localVarCall = deleteUserValidateBeforeCall(userIdentifier, null); + return localVarApiClient.execute(localVarCall); + } + + /** + * (asynchronously) Version: 9.0.0.cl or later Deletes a user from the ThoughtSpot system. If + * you want to remove a user from a specific Org but not from ThoughtSpot, update the group and + * Org mapping properties of the user object via a POST API call to the + * [/api/rest/2.0/users/{user_identifier}/update](#/http/api-endpoints/users/update-user) + * endpoint. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If + * [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled + * on your instance, the `USER_ADMINISTRATION` (**Can manage users**) privilege is + * required. + * + * @param userIdentifier GUID / name of the user (required) + * @param _callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body + * object + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
204 User successfully deleted. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public okhttp3.Call deleteUserAsync(String userIdentifier, final ApiCallback _callback) + throws ApiException { + + okhttp3.Call localVarCall = deleteUserValidateBeforeCall(userIdentifier, _callback); + localVarApiClient.executeAsync(localVarCall, _callback); + return localVarCall; + } + /** + * Build call for forceLogoutUsers + * + * @param forceLogoutUsersRequest (required) + * @param _callback Callback for upload/download progress + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
204 Force logging out of users operation successful. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public okhttp3.Call forceLogoutUsersCall( + ForceLogoutUsersRequest forceLogoutUsersRequest, final ApiCallback _callback) + throws ApiException { + String basePath = null; + // Operation Servers + String[] localBasePaths = new String[] {}; + + // Determine Base Path to Use + if (localCustomBaseUrl != null) { + basePath = localCustomBaseUrl; + } else if (localBasePaths.length > 0) { + basePath = localBasePaths[localHostIndex]; + } else { + basePath = null; + } + + Object localVarPostBody = forceLogoutUsersRequest; + + // create path and map variables + String localVarPath = "/api/rest/2.0/users/force-logout"; + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + final String[] localVarAccepts = {"application/json"}; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = {"application/json"}; + final String localVarContentType = + localVarApiClient.selectHeaderContentType(localVarContentTypes); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } + + String[] localVarAuthNames = new String[] {"bearerAuth"}; + return localVarApiClient.buildCall( + basePath, + localVarPath, + "POST", + localVarQueryParams, + localVarCollectionQueryParams, + localVarPostBody, + localVarHeaderParams, + localVarCookieParams, + localVarFormParams, + localVarAuthNames, + _callback); + } + + @SuppressWarnings("rawtypes") + private okhttp3.Call forceLogoutUsersValidateBeforeCall( + ForceLogoutUsersRequest forceLogoutUsersRequest, final ApiCallback _callback) + throws ApiException { + // verify the required parameter 'forceLogoutUsersRequest' is set + if (forceLogoutUsersRequest == null) { + throw new ApiException( + "Missing the required parameter 'forceLogoutUsersRequest' when calling" + + " forceLogoutUsers(Async)"); + } + + return forceLogoutUsersCall(forceLogoutUsersRequest, _callback); + } + + /** + * Version: 9.0.0.cl or later Enforces logout on current user sessions. Use this API with + * caution as it may invalidate active user sessions and force users to re-login. Make sure you + * specify the usernames or GUIDs. If you pass null values in the API call, all user sessions on + * your cluster become invalid, and the users are forced to re-login. Requires + * `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access + * Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, + * the `USER_ADMINISTRATION` (**Can manage users**) privilege is required. + * + * @param forceLogoutUsersRequest (required) + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the + * response body + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
204 Force logging out of users operation successful. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public void forceLogoutUsers(ForceLogoutUsersRequest forceLogoutUsersRequest) + throws ApiException { + forceLogoutUsersWithHttpInfo(forceLogoutUsersRequest); + } + + /** + * Version: 9.0.0.cl or later Enforces logout on current user sessions. Use this API with + * caution as it may invalidate active user sessions and force users to re-login. Make sure you + * specify the usernames or GUIDs. If you pass null values in the API call, all user sessions on + * your cluster become invalid, and the users are forced to re-login. Requires + * `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access + * Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, + * the `USER_ADMINISTRATION` (**Can manage users**) privilege is required. + * + * @param forceLogoutUsersRequest (required) + * @return ApiResponse<Void> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the + * response body + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
204 Force logging out of users operation successful. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public ApiResponse forceLogoutUsersWithHttpInfo( + ForceLogoutUsersRequest forceLogoutUsersRequest) throws ApiException { + okhttp3.Call localVarCall = + forceLogoutUsersValidateBeforeCall(forceLogoutUsersRequest, null); + return localVarApiClient.execute(localVarCall); + } + + /** + * (asynchronously) Version: 9.0.0.cl or later Enforces logout on current user sessions. Use + * this API with caution as it may invalidate active user sessions and force users to re-login. + * Make sure you specify the usernames or GUIDs. If you pass null values in the API call, all + * user sessions on your cluster become invalid, and the users are forced to re-login. Requires + * `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access + * Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, + * the `USER_ADMINISTRATION` (**Can manage users**) privilege is required. + * + * @param forceLogoutUsersRequest (required) + * @param _callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body + * object + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
204 Force logging out of users operation successful. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public okhttp3.Call forceLogoutUsersAsync( + ForceLogoutUsersRequest forceLogoutUsersRequest, final ApiCallback _callback) + throws ApiException { + + okhttp3.Call localVarCall = + forceLogoutUsersValidateBeforeCall(forceLogoutUsersRequest, _callback); + localVarApiClient.executeAsync(localVarCall, _callback); + return localVarCall; + } + /** + * Build call for importUsers + * + * @param importUsersRequest (required) + * @param _callback Callback for upload/download progress + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 Import users operation successful. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public okhttp3.Call importUsersCall( + ImportUsersRequest importUsersRequest, final ApiCallback _callback) + throws ApiException { + String basePath = null; + // Operation Servers + String[] localBasePaths = new String[] {}; + + // Determine Base Path to Use + if (localCustomBaseUrl != null) { + basePath = localCustomBaseUrl; + } else if (localBasePaths.length > 0) { + basePath = localBasePaths[localHostIndex]; + } else { + basePath = null; + } + + Object localVarPostBody = importUsersRequest; + + // create path and map variables + String localVarPath = "/api/rest/2.0/users/import"; + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + final String[] localVarAccepts = {"application/json"}; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = {"application/json"}; + final String localVarContentType = + localVarApiClient.selectHeaderContentType(localVarContentTypes); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } + + String[] localVarAuthNames = new String[] {"bearerAuth"}; + return localVarApiClient.buildCall( + basePath, + localVarPath, + "POST", + localVarQueryParams, + localVarCollectionQueryParams, + localVarPostBody, + localVarHeaderParams, + localVarCookieParams, + localVarFormParams, + localVarAuthNames, + _callback); + } + + @SuppressWarnings("rawtypes") + private okhttp3.Call importUsersValidateBeforeCall( + ImportUsersRequest importUsersRequest, final ApiCallback _callback) + throws ApiException { + // verify the required parameter 'importUsersRequest' is set + if (importUsersRequest == null) { + throw new ApiException( + "Missing the required parameter 'importUsersRequest' when calling" + + " importUsers(Async)"); + } + + return importUsersCall(importUsersRequest, _callback); + } + + /** + * Version: 9.0.0.cl or later Imports user data from external databases into ThoughtSpot. During + * the user import operation: * If the specified users are not available in ThoughtSpot, the + * users are created and assigned a default password. Defining a `default_password` in + * the API request is optional. * If `delete_unspecified_users` is set to + * `true`, the users not specified in the API request, excluding the + * `tsadmin`, `guest`, `system` and `su` users, are + * deleted. * If the specified user objects are already available in ThoughtSpot, the object + * properties are updated and synchronized as per the input data in the API request. A + * successful API call returns the object that represents the changes made in the ThoughtSpot + * system. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If + * [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled + * on your instance, the `USER_ADMINISTRATION` (**Can manage users**) privilege is + * required. + * + * @param importUsersRequest (required) + * @return ImportUsersResponse + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the + * response body + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 Import users operation successful. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public ImportUsersResponse importUsers(ImportUsersRequest importUsersRequest) + throws ApiException { + ApiResponse localVarResp = importUsersWithHttpInfo(importUsersRequest); + return localVarResp.getData(); + } + + /** + * Version: 9.0.0.cl or later Imports user data from external databases into ThoughtSpot. During + * the user import operation: * If the specified users are not available in ThoughtSpot, the + * users are created and assigned a default password. Defining a `default_password` in + * the API request is optional. * If `delete_unspecified_users` is set to + * `true`, the users not specified in the API request, excluding the + * `tsadmin`, `guest`, `system` and `su` users, are + * deleted. * If the specified user objects are already available in ThoughtSpot, the object + * properties are updated and synchronized as per the input data in the API request. A + * successful API call returns the object that represents the changes made in the ThoughtSpot + * system. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If + * [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled + * on your instance, the `USER_ADMINISTRATION` (**Can manage users**) privilege is + * required. + * + * @param importUsersRequest (required) + * @return ApiResponse<ImportUsersResponse> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the + * response body + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 Import users operation successful. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public ApiResponse importUsersWithHttpInfo( + ImportUsersRequest importUsersRequest) throws ApiException { + okhttp3.Call localVarCall = importUsersValidateBeforeCall(importUsersRequest, null); + Type localVarReturnType = new TypeToken() {}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); + } + + /** + * (asynchronously) Version: 9.0.0.cl or later Imports user data from external databases into + * ThoughtSpot. During the user import operation: * If the specified users are not available in + * ThoughtSpot, the users are created and assigned a default password. Defining a + * `default_password` in the API request is optional. * If + * `delete_unspecified_users` is set to `true`, the users not specified in + * the API request, excluding the `tsadmin`, `guest`, `system` and + * `su` users, are deleted. * If the specified user objects are already available in + * ThoughtSpot, the object properties are updated and synchronized as per the input data in the + * API request. A successful API call returns the object that represents the changes made in the + * ThoughtSpot system. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) + * privilege. If [Role-Based Access Control + * (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the + * `USER_ADMINISTRATION` (**Can manage users**) privilege is required. + * + * @param importUsersRequest (required) + * @param _callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body + * object + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 Import users operation successful. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public okhttp3.Call importUsersAsync( + ImportUsersRequest importUsersRequest, final ApiCallback _callback) + throws ApiException { + + okhttp3.Call localVarCall = importUsersValidateBeforeCall(importUsersRequest, _callback); + Type localVarReturnType = new TypeToken() {}.getType(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; + } + /** + * Build call for resetUserPassword + * + * @param resetUserPasswordRequest (required) + * @param _callback Callback for upload/download progress + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
204 User password reset operation successful. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public okhttp3.Call resetUserPasswordCall( + ResetUserPasswordRequest resetUserPasswordRequest, final ApiCallback _callback) + throws ApiException { + String basePath = null; + // Operation Servers + String[] localBasePaths = new String[] {}; + + // Determine Base Path to Use + if (localCustomBaseUrl != null) { + basePath = localCustomBaseUrl; + } else if (localBasePaths.length > 0) { + basePath = localBasePaths[localHostIndex]; + } else { + basePath = null; + } + + Object localVarPostBody = resetUserPasswordRequest; + + // create path and map variables + String localVarPath = "/api/rest/2.0/users/reset-password"; + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + final String[] localVarAccepts = {"application/json"}; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = {"application/json"}; + final String localVarContentType = + localVarApiClient.selectHeaderContentType(localVarContentTypes); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } + + String[] localVarAuthNames = new String[] {"bearerAuth"}; + return localVarApiClient.buildCall( + basePath, + localVarPath, + "POST", + localVarQueryParams, + localVarCollectionQueryParams, + localVarPostBody, + localVarHeaderParams, + localVarCookieParams, + localVarFormParams, + localVarAuthNames, + _callback); + } + + @SuppressWarnings("rawtypes") + private okhttp3.Call resetUserPasswordValidateBeforeCall( + ResetUserPasswordRequest resetUserPasswordRequest, final ApiCallback _callback) + throws ApiException { + // verify the required parameter 'resetUserPasswordRequest' is set + if (resetUserPasswordRequest == null) { + throw new ApiException( + "Missing the required parameter 'resetUserPasswordRequest' when calling" + + " resetUserPassword(Async)"); + } + + return resetUserPasswordCall(resetUserPasswordRequest, _callback); + } + + /** + * Version: 9.0.0.cl or later Resets the password of a user account. Administrators can reset + * password on behalf of a user. Requires `ADMINISTRATION` (**Can administer + * ThoughtSpot**) privilege. If [Role-Based Access Control + * (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the + * `USER_ADMINISTRATION` (**Can manage users**) privilege is required. + * + * @param resetUserPasswordRequest (required) + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the + * response body + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
204 User password reset operation successful. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public void resetUserPassword(ResetUserPasswordRequest resetUserPasswordRequest) + throws ApiException { + resetUserPasswordWithHttpInfo(resetUserPasswordRequest); + } + + /** + * Version: 9.0.0.cl or later Resets the password of a user account. Administrators can reset + * password on behalf of a user. Requires `ADMINISTRATION` (**Can administer + * ThoughtSpot**) privilege. If [Role-Based Access Control + * (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the + * `USER_ADMINISTRATION` (**Can manage users**) privilege is required. + * + * @param resetUserPasswordRequest (required) + * @return ApiResponse<Void> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the + * response body + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
204 User password reset operation successful. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public ApiResponse resetUserPasswordWithHttpInfo( + ResetUserPasswordRequest resetUserPasswordRequest) throws ApiException { + okhttp3.Call localVarCall = + resetUserPasswordValidateBeforeCall(resetUserPasswordRequest, null); + return localVarApiClient.execute(localVarCall); + } + + /** + * (asynchronously) Version: 9.0.0.cl or later Resets the password of a user account. + * Administrators can reset password on behalf of a user. Requires `ADMINISTRATION` + * (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control + * (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the + * `USER_ADMINISTRATION` (**Can manage users**) privilege is required. + * + * @param resetUserPasswordRequest (required) + * @param _callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body + * object + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
204 User password reset operation successful. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public okhttp3.Call resetUserPasswordAsync( + ResetUserPasswordRequest resetUserPasswordRequest, final ApiCallback _callback) + throws ApiException { + + okhttp3.Call localVarCall = + resetUserPasswordValidateBeforeCall(resetUserPasswordRequest, _callback); + localVarApiClient.executeAsync(localVarCall, _callback); + return localVarCall; + } + /** + * Build call for searchUsers + * + * @param searchUsersRequest (required) + * @param _callback Callback for upload/download progress + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 User search result. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public okhttp3.Call searchUsersCall( + SearchUsersRequest searchUsersRequest, final ApiCallback _callback) + throws ApiException { + String basePath = null; + // Operation Servers + String[] localBasePaths = new String[] {}; + + // Determine Base Path to Use + if (localCustomBaseUrl != null) { + basePath = localCustomBaseUrl; + } else if (localBasePaths.length > 0) { + basePath = localBasePaths[localHostIndex]; + } else { + basePath = null; + } + + Object localVarPostBody = searchUsersRequest; + + // create path and map variables + String localVarPath = "/api/rest/2.0/users/search"; + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + final String[] localVarAccepts = {"application/json"}; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = {"application/json"}; + final String localVarContentType = + localVarApiClient.selectHeaderContentType(localVarContentTypes); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } + + String[] localVarAuthNames = new String[] {"bearerAuth"}; + return localVarApiClient.buildCall( + basePath, + localVarPath, + "POST", + localVarQueryParams, + localVarCollectionQueryParams, + localVarPostBody, + localVarHeaderParams, + localVarCookieParams, + localVarFormParams, + localVarAuthNames, + _callback); + } + + @SuppressWarnings("rawtypes") + private okhttp3.Call searchUsersValidateBeforeCall( + SearchUsersRequest searchUsersRequest, final ApiCallback _callback) + throws ApiException { + // verify the required parameter 'searchUsersRequest' is set + if (searchUsersRequest == null) { + throw new ApiException( + "Missing the required parameter 'searchUsersRequest' when calling" + + " searchUsers(Async)"); + } + + return searchUsersCall(searchUsersRequest, _callback); + } + + /** + * Version: 9.0.0.cl or later Gets a list of users available on the ThoughtSpot system. To get + * details of a specific user, specify the user GUID or name. You can also filter the API + * response based on groups, Org ID, user visibility, account status, user type, and user + * preference settings and favorites. Available to all users. Users with + * `ADMINISTRATION` (**Can administer ThoughtSpot**) privileges can view all users + * properties. If [Role-Based Access Control + * (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the + * `USER_ADMINISTRATION` (**Can manage users**) privilege is required. **NOTE**: If + * the API returns an empty list, consider increasing the value of the `record_size` + * parameter. To search across all available users, set `record_size` to + * `-1`. + * + * @param searchUsersRequest (required) + * @return List<User> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the + * response body + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 User search result. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public List searchUsers(SearchUsersRequest searchUsersRequest) throws ApiException { + ApiResponse> localVarResp = searchUsersWithHttpInfo(searchUsersRequest); + return localVarResp.getData(); + } + + /** + * Version: 9.0.0.cl or later Gets a list of users available on the ThoughtSpot system. To get + * details of a specific user, specify the user GUID or name. You can also filter the API + * response based on groups, Org ID, user visibility, account status, user type, and user + * preference settings and favorites. Available to all users. Users with + * `ADMINISTRATION` (**Can administer ThoughtSpot**) privileges can view all users + * properties. If [Role-Based Access Control + * (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the + * `USER_ADMINISTRATION` (**Can manage users**) privilege is required. **NOTE**: If + * the API returns an empty list, consider increasing the value of the `record_size` + * parameter. To search across all available users, set `record_size` to + * `-1`. + * + * @param searchUsersRequest (required) + * @return ApiResponse<List<User>> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the + * response body + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 User search result. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public ApiResponse> searchUsersWithHttpInfo(SearchUsersRequest searchUsersRequest) + throws ApiException { + okhttp3.Call localVarCall = searchUsersValidateBeforeCall(searchUsersRequest, null); + Type localVarReturnType = new TypeToken>() {}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); + } + + /** + * (asynchronously) Version: 9.0.0.cl or later Gets a list of users available on the ThoughtSpot + * system. To get details of a specific user, specify the user GUID or name. You can also filter + * the API response based on groups, Org ID, user visibility, account status, user type, and + * user preference settings and favorites. Available to all users. Users with + * `ADMINISTRATION` (**Can administer ThoughtSpot**) privileges can view all users + * properties. If [Role-Based Access Control + * (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the + * `USER_ADMINISTRATION` (**Can manage users**) privilege is required. **NOTE**: If + * the API returns an empty list, consider increasing the value of the `record_size` + * parameter. To search across all available users, set `record_size` to + * `-1`. + * + * @param searchUsersRequest (required) + * @param _callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body + * object + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 User search result. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public okhttp3.Call searchUsersAsync( + SearchUsersRequest searchUsersRequest, final ApiCallback> _callback) + throws ApiException { + + okhttp3.Call localVarCall = searchUsersValidateBeforeCall(searchUsersRequest, _callback); + Type localVarReturnType = new TypeToken>() {}.getType(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; + } + /** + * Build call for updateUser + * + * @param userIdentifier GUID / name of the user (required) + * @param updateUserRequest (required) + * @param _callback Callback for upload/download progress + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
204 User successfully updated. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public okhttp3.Call updateUserCall( + String userIdentifier, UpdateUserRequest updateUserRequest, final ApiCallback _callback) + throws ApiException { + String basePath = null; + // Operation Servers + String[] localBasePaths = new String[] {}; + + // Determine Base Path to Use + if (localCustomBaseUrl != null) { + basePath = localCustomBaseUrl; + } else if (localBasePaths.length > 0) { + basePath = localBasePaths[localHostIndex]; + } else { + basePath = null; + } + + Object localVarPostBody = updateUserRequest; + + // create path and map variables + String localVarPath = + "/api/rest/2.0/users/{user_identifier}/update" + .replace( + "{" + "user_identifier" + "}", + localVarApiClient.escapeString(userIdentifier.toString())); + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + final String[] localVarAccepts = {"application/json"}; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = {"application/json"}; + final String localVarContentType = + localVarApiClient.selectHeaderContentType(localVarContentTypes); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } + + String[] localVarAuthNames = new String[] {"bearerAuth"}; + return localVarApiClient.buildCall( + basePath, + localVarPath, + "POST", + localVarQueryParams, + localVarCollectionQueryParams, + localVarPostBody, + localVarHeaderParams, + localVarCookieParams, + localVarFormParams, + localVarAuthNames, + _callback); + } + + @SuppressWarnings("rawtypes") + private okhttp3.Call updateUserValidateBeforeCall( + String userIdentifier, UpdateUserRequest updateUserRequest, final ApiCallback _callback) + throws ApiException { + // verify the required parameter 'userIdentifier' is set + if (userIdentifier == null) { + throw new ApiException( + "Missing the required parameter 'userIdentifier' when calling" + + " updateUser(Async)"); + } + + // verify the required parameter 'updateUserRequest' is set + if (updateUserRequest == null) { + throw new ApiException( + "Missing the required parameter 'updateUserRequest' when calling" + + " updateUser(Async)"); + } + + return updateUserCall(userIdentifier, updateUserRequest, _callback); + } + + /** + * Version: 9.0.0.cl or later Updates the properties of a user object. You can modify user + * properties such as username, email, and share notification settings. You can also assign new + * groups and Orgs, remove the user from a group or Org, reset password, and modify user + * preferences. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. + * If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is + * enabled on your instance, the `USER_ADMINISTRATION` (**Can manage users**) + * privilege is required. + * + * @param userIdentifier GUID / name of the user (required) + * @param updateUserRequest (required) + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the + * response body + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
204 User successfully updated. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public void updateUser(String userIdentifier, UpdateUserRequest updateUserRequest) + throws ApiException { + updateUserWithHttpInfo(userIdentifier, updateUserRequest); + } + + /** + * Version: 9.0.0.cl or later Updates the properties of a user object. You can modify user + * properties such as username, email, and share notification settings. You can also assign new + * groups and Orgs, remove the user from a group or Org, reset password, and modify user + * preferences. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. + * If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is + * enabled on your instance, the `USER_ADMINISTRATION` (**Can manage users**) + * privilege is required. + * + * @param userIdentifier GUID / name of the user (required) + * @param updateUserRequest (required) + * @return ApiResponse<Void> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the + * response body + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
204 User successfully updated. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public ApiResponse updateUserWithHttpInfo( + String userIdentifier, UpdateUserRequest updateUserRequest) throws ApiException { + okhttp3.Call localVarCall = + updateUserValidateBeforeCall(userIdentifier, updateUserRequest, null); + return localVarApiClient.execute(localVarCall); + } + + /** + * (asynchronously) Version: 9.0.0.cl or later Updates the properties of a user object. You can + * modify user properties such as username, email, and share notification settings. You can also + * assign new groups and Orgs, remove the user from a group or Org, reset password, and modify + * user preferences. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) + * privilege. If [Role-Based Access Control + * (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the + * `USER_ADMINISTRATION` (**Can manage users**) privilege is required. + * + * @param userIdentifier GUID / name of the user (required) + * @param updateUserRequest (required) + * @param _callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body + * object + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
204 User successfully updated. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public okhttp3.Call updateUserAsync( + String userIdentifier, + UpdateUserRequest updateUserRequest, + final ApiCallback _callback) + throws ApiException { + + okhttp3.Call localVarCall = + updateUserValidateBeforeCall(userIdentifier, updateUserRequest, _callback); + localVarApiClient.executeAsync(localVarCall, _callback); + return localVarCall; + } +} diff --git a/sdks/java/src/main/java/com/thoughtspot/client/api/VariableApi.java b/sdks/java/src/main/java/com/thoughtspot/client/api/VariableApi.java new file mode 100644 index 000000000..25c19f17a --- /dev/null +++ b/sdks/java/src/main/java/com/thoughtspot/client/api/VariableApi.java @@ -0,0 +1,1469 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client.api; + +import com.google.gson.reflect.TypeToken; +import com.thoughtspot.client.ApiCallback; +import com.thoughtspot.client.ApiClient; +import com.thoughtspot.client.ApiClientConfiguration; +import com.thoughtspot.client.ApiException; +import com.thoughtspot.client.ApiResponse; +import com.thoughtspot.client.Configuration; +import com.thoughtspot.client.Pair; +import com.thoughtspot.client.model.CreateVariableRequest; +import com.thoughtspot.client.model.DeleteVariablesRequest; +import com.thoughtspot.client.model.PutVariableValuesRequest; +import com.thoughtspot.client.model.SearchVariablesRequest; +import com.thoughtspot.client.model.UpdateVariableRequest; +import com.thoughtspot.client.model.UpdateVariableValuesRequest; +import com.thoughtspot.client.model.Variable; +import java.lang.reflect.Type; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +@javax.annotation.Generated( + value = "org.openapitools.codegen.languages.JavaClientCodegen", + comments = "Generator version: 7.12.0") +public class VariableApi { + private ApiClient localVarApiClient; + private ApiClientConfiguration localVarApiClientConfiguration; + private int localHostIndex; + private String localCustomBaseUrl; + + public VariableApi() { + this(Configuration.getDefaultApiClient()); + } + + public VariableApi(ApiClient apiClient) { + this.localVarApiClient = apiClient; + } + + public VariableApi(ApiClientConfiguration apiClientConfiguration) { + this.localVarApiClientConfiguration = apiClientConfiguration; + this.localVarApiClient = new ApiClient(apiClientConfiguration); + } + + public ApiClient getApiClient() { + return localVarApiClient; + } + + public void setApiClient(ApiClient apiClient) { + this.localVarApiClient = apiClient; + } + + public ApiClientConfiguration getApiClientConfiguration() { + return localVarApiClientConfiguration; + } + + public void applyApiClientConfiguration(ApiClientConfiguration apiClientConfiguration) { + this.localVarApiClientConfiguration = apiClientConfiguration; + if (localVarApiClient != null) { + localVarApiClient.applyApiClientConfiguration(apiClientConfiguration); + } else { + localVarApiClient = new ApiClient(apiClientConfiguration); + } + } + + public int getHostIndex() { + return localHostIndex; + } + + public void setHostIndex(int hostIndex) { + this.localHostIndex = hostIndex; + } + + public String getCustomBaseUrl() { + return localCustomBaseUrl; + } + + public void setCustomBaseUrl(String customBaseUrl) { + this.localCustomBaseUrl = customBaseUrl; + } + + /** + * Build call for createVariable + * + * @param createVariableRequest (required) + * @param _callback Callback for upload/download progress + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 Create variable is successful. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public okhttp3.Call createVariableCall( + CreateVariableRequest createVariableRequest, final ApiCallback _callback) + throws ApiException { + String basePath = null; + // Operation Servers + String[] localBasePaths = new String[] {}; + + // Determine Base Path to Use + if (localCustomBaseUrl != null) { + basePath = localCustomBaseUrl; + } else if (localBasePaths.length > 0) { + basePath = localBasePaths[localHostIndex]; + } else { + basePath = null; + } + + Object localVarPostBody = createVariableRequest; + + // create path and map variables + String localVarPath = "/api/rest/2.0/template/variables/create"; + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + final String[] localVarAccepts = {"application/json"}; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = {"application/json"}; + final String localVarContentType = + localVarApiClient.selectHeaderContentType(localVarContentTypes); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } + + String[] localVarAuthNames = new String[] {"bearerAuth"}; + return localVarApiClient.buildCall( + basePath, + localVarPath, + "POST", + localVarQueryParams, + localVarCollectionQueryParams, + localVarPostBody, + localVarHeaderParams, + localVarCookieParams, + localVarFormParams, + localVarAuthNames, + _callback); + } + + @SuppressWarnings("rawtypes") + private okhttp3.Call createVariableValidateBeforeCall( + CreateVariableRequest createVariableRequest, final ApiCallback _callback) + throws ApiException { + // verify the required parameter 'createVariableRequest' is set + if (createVariableRequest == null) { + throw new ApiException( + "Missing the required parameter 'createVariableRequest' when calling" + + " createVariable(Async)"); + } + + return createVariableCall(createVariableRequest, _callback); + } + + /** + * Create a variable which can be used for parameterizing metadata objects Version: 26.4.0.cl or + * later Allows creating a variable which can be used for parameterizing metadata objects in + * ThoughtSpot. Requires ADMINISTRATION role and TENANT scope. The CAN_MANAGE_VARIABLES + * permission allows you to manage Formula Variables in the current organization scope. The API + * endpoint supports the following types of variables: * CONNECTION_PROPERTY - For connection + * properties * TABLE_MAPPING - For table mappings * CONNECTION_PROPERTY_PER_PRINCIPAL - For + * connection properties per principal. In order to use this please contact support to enable + * this. * FORMULA_VARIABLE - For Formula variables, introduced in 10.15.0.cl When creating a + * variable, you need to specify: * The variable type * A unique name for the variable * Whether + * the variable contains sensitive values (defaults to false) * The data type of the variable, + * only specify for formula variables (defaults to null) The operation will fail if: * The user + * lacks required permissions * The variable name already exists * The variable type is invalid + * + * @param createVariableRequest (required) + * @return Variable + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the + * response body + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 Create variable is successful. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public Variable createVariable(CreateVariableRequest createVariableRequest) + throws ApiException { + ApiResponse localVarResp = createVariableWithHttpInfo(createVariableRequest); + return localVarResp.getData(); + } + + /** + * Create a variable which can be used for parameterizing metadata objects Version: 26.4.0.cl or + * later Allows creating a variable which can be used for parameterizing metadata objects in + * ThoughtSpot. Requires ADMINISTRATION role and TENANT scope. The CAN_MANAGE_VARIABLES + * permission allows you to manage Formula Variables in the current organization scope. The API + * endpoint supports the following types of variables: * CONNECTION_PROPERTY - For connection + * properties * TABLE_MAPPING - For table mappings * CONNECTION_PROPERTY_PER_PRINCIPAL - For + * connection properties per principal. In order to use this please contact support to enable + * this. * FORMULA_VARIABLE - For Formula variables, introduced in 10.15.0.cl When creating a + * variable, you need to specify: * The variable type * A unique name for the variable * Whether + * the variable contains sensitive values (defaults to false) * The data type of the variable, + * only specify for formula variables (defaults to null) The operation will fail if: * The user + * lacks required permissions * The variable name already exists * The variable type is invalid + * + * @param createVariableRequest (required) + * @return ApiResponse<Variable> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the + * response body + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 Create variable is successful. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public ApiResponse createVariableWithHttpInfo( + CreateVariableRequest createVariableRequest) throws ApiException { + okhttp3.Call localVarCall = createVariableValidateBeforeCall(createVariableRequest, null); + Type localVarReturnType = new TypeToken() {}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); + } + + /** + * (asynchronously) Create a variable which can be used for parameterizing metadata objects + * Version: 26.4.0.cl or later Allows creating a variable which can be used for parameterizing + * metadata objects in ThoughtSpot. Requires ADMINISTRATION role and TENANT scope. The + * CAN_MANAGE_VARIABLES permission allows you to manage Formula Variables in the current + * organization scope. The API endpoint supports the following types of variables: * + * CONNECTION_PROPERTY - For connection properties * TABLE_MAPPING - For table mappings * + * CONNECTION_PROPERTY_PER_PRINCIPAL - For connection properties per principal. In order to use + * this please contact support to enable this. * FORMULA_VARIABLE - For Formula variables, + * introduced in 10.15.0.cl When creating a variable, you need to specify: * The variable type * + * A unique name for the variable * Whether the variable contains sensitive values (defaults to + * false) * The data type of the variable, only specify for formula variables (defaults to null) + * The operation will fail if: * The user lacks required permissions * The variable name already + * exists * The variable type is invalid + * + * @param createVariableRequest (required) + * @param _callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body + * object + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 Create variable is successful. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public okhttp3.Call createVariableAsync( + CreateVariableRequest createVariableRequest, final ApiCallback _callback) + throws ApiException { + + okhttp3.Call localVarCall = + createVariableValidateBeforeCall(createVariableRequest, _callback); + Type localVarReturnType = new TypeToken() {}.getType(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; + } + /** + * Build call for deleteVariable + * + * @param identifier Unique id or name of the variable (required) + * @param _callback Callback for upload/download progress + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
204 Deleting the variable is successful. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ * + * @deprecated + */ + @Deprecated + public okhttp3.Call deleteVariableCall(String identifier, final ApiCallback _callback) + throws ApiException { + String basePath = null; + // Operation Servers + String[] localBasePaths = new String[] {}; + + // Determine Base Path to Use + if (localCustomBaseUrl != null) { + basePath = localCustomBaseUrl; + } else if (localBasePaths.length > 0) { + basePath = localBasePaths[localHostIndex]; + } else { + basePath = null; + } + + Object localVarPostBody = null; + + // create path and map variables + String localVarPath = + "/api/rest/2.0/template/variables/{identifier}/delete" + .replace( + "{" + "identifier" + "}", + localVarApiClient.escapeString(identifier.toString())); + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + final String[] localVarAccepts = {"application/json"}; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = {}; + final String localVarContentType = + localVarApiClient.selectHeaderContentType(localVarContentTypes); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } + + String[] localVarAuthNames = new String[] {"bearerAuth"}; + return localVarApiClient.buildCall( + basePath, + localVarPath, + "POST", + localVarQueryParams, + localVarCollectionQueryParams, + localVarPostBody, + localVarHeaderParams, + localVarCookieParams, + localVarFormParams, + localVarAuthNames, + _callback); + } + + @Deprecated + @SuppressWarnings("rawtypes") + private okhttp3.Call deleteVariableValidateBeforeCall( + String identifier, final ApiCallback _callback) throws ApiException { + // verify the required parameter 'identifier' is set + if (identifier == null) { + throw new ApiException( + "Missing the required parameter 'identifier' when calling" + + " deleteVariable(Async)"); + } + + return deleteVariableCall(identifier, _callback); + } + + /** + * Delete a variable Version: 10.14.0.cl or later **Note:** This API endpoint is deprecated and + * will be removed from ThoughtSpot in a future release. Use [POST + * /api/rest/2.0/template/variables/delete](/api/rest/2.0/template/variables/delete) instead. + * Allows deleting a variable from ThoughtSpot. Requires ADMINISTRATION role and TENANT scope. + * The CAN_MANAGE_VARIABLES permission allows you to manage Formula Variables in the current + * organization scope. The API endpoint requires: * The variable identifier (ID or name) The + * operation will fail if: * The user lacks required permissions * The variable doesn't + * exist * The variable is being used by other objects + * + * @param identifier Unique id or name of the variable (required) + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the + * response body + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
204 Deleting the variable is successful. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ * + * @deprecated + */ + @Deprecated + public void deleteVariable(String identifier) throws ApiException { + deleteVariableWithHttpInfo(identifier); + } + + /** + * Delete a variable Version: 10.14.0.cl or later **Note:** This API endpoint is deprecated and + * will be removed from ThoughtSpot in a future release. Use [POST + * /api/rest/2.0/template/variables/delete](/api/rest/2.0/template/variables/delete) instead. + * Allows deleting a variable from ThoughtSpot. Requires ADMINISTRATION role and TENANT scope. + * The CAN_MANAGE_VARIABLES permission allows you to manage Formula Variables in the current + * organization scope. The API endpoint requires: * The variable identifier (ID or name) The + * operation will fail if: * The user lacks required permissions * The variable doesn't + * exist * The variable is being used by other objects + * + * @param identifier Unique id or name of the variable (required) + * @return ApiResponse<Void> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the + * response body + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
204 Deleting the variable is successful. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ * + * @deprecated + */ + @Deprecated + public ApiResponse deleteVariableWithHttpInfo(String identifier) throws ApiException { + okhttp3.Call localVarCall = deleteVariableValidateBeforeCall(identifier, null); + return localVarApiClient.execute(localVarCall); + } + + /** + * (asynchronously) Delete a variable Version: 10.14.0.cl or later **Note:** This API endpoint + * is deprecated and will be removed from ThoughtSpot in a future release. Use [POST + * /api/rest/2.0/template/variables/delete](/api/rest/2.0/template/variables/delete) instead. + * Allows deleting a variable from ThoughtSpot. Requires ADMINISTRATION role and TENANT scope. + * The CAN_MANAGE_VARIABLES permission allows you to manage Formula Variables in the current + * organization scope. The API endpoint requires: * The variable identifier (ID or name) The + * operation will fail if: * The user lacks required permissions * The variable doesn't + * exist * The variable is being used by other objects + * + * @param identifier Unique id or name of the variable (required) + * @param _callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body + * object + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
204 Deleting the variable is successful. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ * + * @deprecated + */ + @Deprecated + public okhttp3.Call deleteVariableAsync(String identifier, final ApiCallback _callback) + throws ApiException { + + okhttp3.Call localVarCall = deleteVariableValidateBeforeCall(identifier, _callback); + localVarApiClient.executeAsync(localVarCall, _callback); + return localVarCall; + } + /** + * Build call for deleteVariables + * + * @param deleteVariablesRequest (required) + * @param _callback Callback for upload/download progress + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
204 Deletion of variable(s) is successful. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public okhttp3.Call deleteVariablesCall( + DeleteVariablesRequest deleteVariablesRequest, final ApiCallback _callback) + throws ApiException { + String basePath = null; + // Operation Servers + String[] localBasePaths = new String[] {}; + + // Determine Base Path to Use + if (localCustomBaseUrl != null) { + basePath = localCustomBaseUrl; + } else if (localBasePaths.length > 0) { + basePath = localBasePaths[localHostIndex]; + } else { + basePath = null; + } + + Object localVarPostBody = deleteVariablesRequest; + + // create path and map variables + String localVarPath = "/api/rest/2.0/template/variables/delete"; + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + final String[] localVarAccepts = {"application/json"}; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = {"application/json"}; + final String localVarContentType = + localVarApiClient.selectHeaderContentType(localVarContentTypes); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } + + String[] localVarAuthNames = new String[] {"bearerAuth"}; + return localVarApiClient.buildCall( + basePath, + localVarPath, + "POST", + localVarQueryParams, + localVarCollectionQueryParams, + localVarPostBody, + localVarHeaderParams, + localVarCookieParams, + localVarFormParams, + localVarAuthNames, + _callback); + } + + @SuppressWarnings("rawtypes") + private okhttp3.Call deleteVariablesValidateBeforeCall( + DeleteVariablesRequest deleteVariablesRequest, final ApiCallback _callback) + throws ApiException { + // verify the required parameter 'deleteVariablesRequest' is set + if (deleteVariablesRequest == null) { + throw new ApiException( + "Missing the required parameter 'deleteVariablesRequest' when calling" + + " deleteVariables(Async)"); + } + + return deleteVariablesCall(deleteVariablesRequest, _callback); + } + + /** + * Delete variable(s) Version: 26.4.0.cl or later Allows deleting multiple variables from + * ThoughtSpot. Requires ADMINISTRATION role and TENANT scope. The CAN_MANAGE_VARIABLES + * permission allows you to manage Formula Variables in the current organization scope. The API + * endpoint requires: * The variable identifiers (IDs or names) The operation will fail if: * + * The user lacks required permissions * Any of the variables don't exist * Any of the + * variables are being used by other objects + * + * @param deleteVariablesRequest (required) + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the + * response body + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
204 Deletion of variable(s) is successful. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public void deleteVariables(DeleteVariablesRequest deleteVariablesRequest) throws ApiException { + deleteVariablesWithHttpInfo(deleteVariablesRequest); + } + + /** + * Delete variable(s) Version: 26.4.0.cl or later Allows deleting multiple variables from + * ThoughtSpot. Requires ADMINISTRATION role and TENANT scope. The CAN_MANAGE_VARIABLES + * permission allows you to manage Formula Variables in the current organization scope. The API + * endpoint requires: * The variable identifiers (IDs or names) The operation will fail if: * + * The user lacks required permissions * Any of the variables don't exist * Any of the + * variables are being used by other objects + * + * @param deleteVariablesRequest (required) + * @return ApiResponse<Void> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the + * response body + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
204 Deletion of variable(s) is successful. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public ApiResponse deleteVariablesWithHttpInfo( + DeleteVariablesRequest deleteVariablesRequest) throws ApiException { + okhttp3.Call localVarCall = deleteVariablesValidateBeforeCall(deleteVariablesRequest, null); + return localVarApiClient.execute(localVarCall); + } + + /** + * (asynchronously) Delete variable(s) Version: 26.4.0.cl or later Allows deleting multiple + * variables from ThoughtSpot. Requires ADMINISTRATION role and TENANT scope. The + * CAN_MANAGE_VARIABLES permission allows you to manage Formula Variables in the current + * organization scope. The API endpoint requires: * The variable identifiers (IDs or names) The + * operation will fail if: * The user lacks required permissions * Any of the variables + * don't exist * Any of the variables are being used by other objects + * + * @param deleteVariablesRequest (required) + * @param _callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body + * object + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
204 Deletion of variable(s) is successful. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public okhttp3.Call deleteVariablesAsync( + DeleteVariablesRequest deleteVariablesRequest, final ApiCallback _callback) + throws ApiException { + + okhttp3.Call localVarCall = + deleteVariablesValidateBeforeCall(deleteVariablesRequest, _callback); + localVarApiClient.executeAsync(localVarCall, _callback); + return localVarCall; + } + /** + * Build call for putVariableValues + * + * @param identifier Unique ID or name of the variable (required) + * @param putVariableValuesRequest (required) + * @param _callback Callback for upload/download progress + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
204 Variable values updated successfully. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public okhttp3.Call putVariableValuesCall( + String identifier, + PutVariableValuesRequest putVariableValuesRequest, + final ApiCallback _callback) + throws ApiException { + String basePath = null; + // Operation Servers + String[] localBasePaths = new String[] {}; + + // Determine Base Path to Use + if (localCustomBaseUrl != null) { + basePath = localCustomBaseUrl; + } else if (localBasePaths.length > 0) { + basePath = localBasePaths[localHostIndex]; + } else { + basePath = null; + } + + Object localVarPostBody = putVariableValuesRequest; + + // create path and map variables + String localVarPath = + "/api/rest/2.0/template/variables/{identifier}/update-values" + .replace( + "{" + "identifier" + "}", + localVarApiClient.escapeString(identifier.toString())); + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + final String[] localVarAccepts = {"application/json"}; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = {"application/json"}; + final String localVarContentType = + localVarApiClient.selectHeaderContentType(localVarContentTypes); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } + + String[] localVarAuthNames = new String[] {"bearerAuth"}; + return localVarApiClient.buildCall( + basePath, + localVarPath, + "POST", + localVarQueryParams, + localVarCollectionQueryParams, + localVarPostBody, + localVarHeaderParams, + localVarCookieParams, + localVarFormParams, + localVarAuthNames, + _callback); + } + + @SuppressWarnings("rawtypes") + private okhttp3.Call putVariableValuesValidateBeforeCall( + String identifier, + PutVariableValuesRequest putVariableValuesRequest, + final ApiCallback _callback) + throws ApiException { + // verify the required parameter 'identifier' is set + if (identifier == null) { + throw new ApiException( + "Missing the required parameter 'identifier' when calling" + + " putVariableValues(Async)"); + } + + // verify the required parameter 'putVariableValuesRequest' is set + if (putVariableValuesRequest == null) { + throw new ApiException( + "Missing the required parameter 'putVariableValuesRequest' when calling" + + " putVariableValues(Async)"); + } + + return putVariableValuesCall(identifier, putVariableValuesRequest, _callback); + } + + /** + * Update values for a variable Version: 26.4.0.cl or later Allows updating values for a + * specific variable in ThoughtSpot. Requires ADMINISTRATION role. The CAN_MANAGE_VARIABLES + * permission allows you to manage Formula Variables in the current organization scope. The API + * endpoint allows: * Adding new values to the variable * Replacing existing values * Deleting + * values from the variable * Resetting all values When updating variable values, you need to + * specify: * The variable identifier (ID or name) * The values to add/replace/remove * The + * operation to perform (ADD, REPLACE, REMOVE, RESET) Behaviour based on operation type: * ADD - + * Adds values to the variable if this is a list type variable, else same as replace. * REPLACE + * - Replaces all values of a given set of constraints with the current set of values. * REMOVE + * - Removes any values which match the set of conditions of the variables if this is a list + * type variable, else clears value. * RESET - Removes all constraints for the given variable, + * scope is ignored + * + * @param identifier Unique ID or name of the variable (required) + * @param putVariableValuesRequest (required) + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the + * response body + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
204 Variable values updated successfully. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public void putVariableValues( + String identifier, PutVariableValuesRequest putVariableValuesRequest) + throws ApiException { + putVariableValuesWithHttpInfo(identifier, putVariableValuesRequest); + } + + /** + * Update values for a variable Version: 26.4.0.cl or later Allows updating values for a + * specific variable in ThoughtSpot. Requires ADMINISTRATION role. The CAN_MANAGE_VARIABLES + * permission allows you to manage Formula Variables in the current organization scope. The API + * endpoint allows: * Adding new values to the variable * Replacing existing values * Deleting + * values from the variable * Resetting all values When updating variable values, you need to + * specify: * The variable identifier (ID or name) * The values to add/replace/remove * The + * operation to perform (ADD, REPLACE, REMOVE, RESET) Behaviour based on operation type: * ADD - + * Adds values to the variable if this is a list type variable, else same as replace. * REPLACE + * - Replaces all values of a given set of constraints with the current set of values. * REMOVE + * - Removes any values which match the set of conditions of the variables if this is a list + * type variable, else clears value. * RESET - Removes all constraints for the given variable, + * scope is ignored + * + * @param identifier Unique ID or name of the variable (required) + * @param putVariableValuesRequest (required) + * @return ApiResponse<Void> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the + * response body + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
204 Variable values updated successfully. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public ApiResponse putVariableValuesWithHttpInfo( + String identifier, PutVariableValuesRequest putVariableValuesRequest) + throws ApiException { + okhttp3.Call localVarCall = + putVariableValuesValidateBeforeCall(identifier, putVariableValuesRequest, null); + return localVarApiClient.execute(localVarCall); + } + + /** + * (asynchronously) Update values for a variable Version: 26.4.0.cl or later Allows updating + * values for a specific variable in ThoughtSpot. Requires ADMINISTRATION role. The + * CAN_MANAGE_VARIABLES permission allows you to manage Formula Variables in the current + * organization scope. The API endpoint allows: * Adding new values to the variable * Replacing + * existing values * Deleting values from the variable * Resetting all values When updating + * variable values, you need to specify: * The variable identifier (ID or name) * The values to + * add/replace/remove * The operation to perform (ADD, REPLACE, REMOVE, RESET) Behaviour based + * on operation type: * ADD - Adds values to the variable if this is a list type variable, else + * same as replace. * REPLACE - Replaces all values of a given set of constraints with the + * current set of values. * REMOVE - Removes any values which match the set of conditions of the + * variables if this is a list type variable, else clears value. * RESET - Removes all + * constraints for the given variable, scope is ignored + * + * @param identifier Unique ID or name of the variable (required) + * @param putVariableValuesRequest (required) + * @param _callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body + * object + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
204 Variable values updated successfully. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public okhttp3.Call putVariableValuesAsync( + String identifier, + PutVariableValuesRequest putVariableValuesRequest, + final ApiCallback _callback) + throws ApiException { + + okhttp3.Call localVarCall = + putVariableValuesValidateBeforeCall( + identifier, putVariableValuesRequest, _callback); + localVarApiClient.executeAsync(localVarCall, _callback); + return localVarCall; + } + /** + * Build call for searchVariables + * + * @param searchVariablesRequest (required) + * @param _callback Callback for upload/download progress + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 List of variables is successful. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public okhttp3.Call searchVariablesCall( + SearchVariablesRequest searchVariablesRequest, final ApiCallback _callback) + throws ApiException { + String basePath = null; + // Operation Servers + String[] localBasePaths = new String[] {}; + + // Determine Base Path to Use + if (localCustomBaseUrl != null) { + basePath = localCustomBaseUrl; + } else if (localBasePaths.length > 0) { + basePath = localBasePaths[localHostIndex]; + } else { + basePath = null; + } + + Object localVarPostBody = searchVariablesRequest; + + // create path and map variables + String localVarPath = "/api/rest/2.0/template/variables/search"; + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + final String[] localVarAccepts = {"application/json"}; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = {"application/json"}; + final String localVarContentType = + localVarApiClient.selectHeaderContentType(localVarContentTypes); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } + + String[] localVarAuthNames = new String[] {"bearerAuth"}; + return localVarApiClient.buildCall( + basePath, + localVarPath, + "POST", + localVarQueryParams, + localVarCollectionQueryParams, + localVarPostBody, + localVarHeaderParams, + localVarCookieParams, + localVarFormParams, + localVarAuthNames, + _callback); + } + + @SuppressWarnings("rawtypes") + private okhttp3.Call searchVariablesValidateBeforeCall( + SearchVariablesRequest searchVariablesRequest, final ApiCallback _callback) + throws ApiException { + // verify the required parameter 'searchVariablesRequest' is set + if (searchVariablesRequest == null) { + throw new ApiException( + "Missing the required parameter 'searchVariablesRequest' when calling" + + " searchVariables(Async)"); + } + + return searchVariablesCall(searchVariablesRequest, _callback); + } + + /** + * Search variables Version: 26.4.0.cl or later Allows searching for variables in ThoughtSpot. + * Requires ADMINISTRATION role. The CAN_MANAGE_VARIABLES permission allows you to manage + * Formula Variables in the current organization scope. The API endpoint supports searching + * variables by: * Variable identifier (ID or name) * Variable type * Name pattern + * (case-insensitive, supports % for wildcard) The search results can be formatted in three + * ways: * METADATA - Returns only variable metadata (default) * METADATA_AND_VALUES - Returns + * variable metadata and values The values can be filtered by scope: * org_identifier * + * principal_identifier * model_identifier + * + * @param searchVariablesRequest (required) + * @return List<Variable> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the + * response body + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 List of variables is successful. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public List searchVariables(SearchVariablesRequest searchVariablesRequest) + throws ApiException { + ApiResponse> localVarResp = + searchVariablesWithHttpInfo(searchVariablesRequest); + return localVarResp.getData(); + } + + /** + * Search variables Version: 26.4.0.cl or later Allows searching for variables in ThoughtSpot. + * Requires ADMINISTRATION role. The CAN_MANAGE_VARIABLES permission allows you to manage + * Formula Variables in the current organization scope. The API endpoint supports searching + * variables by: * Variable identifier (ID or name) * Variable type * Name pattern + * (case-insensitive, supports % for wildcard) The search results can be formatted in three + * ways: * METADATA - Returns only variable metadata (default) * METADATA_AND_VALUES - Returns + * variable metadata and values The values can be filtered by scope: * org_identifier * + * principal_identifier * model_identifier + * + * @param searchVariablesRequest (required) + * @return ApiResponse<List<Variable>> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the + * response body + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 List of variables is successful. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public ApiResponse> searchVariablesWithHttpInfo( + SearchVariablesRequest searchVariablesRequest) throws ApiException { + okhttp3.Call localVarCall = searchVariablesValidateBeforeCall(searchVariablesRequest, null); + Type localVarReturnType = new TypeToken>() {}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); + } + + /** + * (asynchronously) Search variables Version: 26.4.0.cl or later Allows searching for variables + * in ThoughtSpot. Requires ADMINISTRATION role. The CAN_MANAGE_VARIABLES permission allows you + * to manage Formula Variables in the current organization scope. The API endpoint supports + * searching variables by: * Variable identifier (ID or name) * Variable type * Name pattern + * (case-insensitive, supports % for wildcard) The search results can be formatted in three + * ways: * METADATA - Returns only variable metadata (default) * METADATA_AND_VALUES - Returns + * variable metadata and values The values can be filtered by scope: * org_identifier * + * principal_identifier * model_identifier + * + * @param searchVariablesRequest (required) + * @param _callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body + * object + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 List of variables is successful. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public okhttp3.Call searchVariablesAsync( + SearchVariablesRequest searchVariablesRequest, + final ApiCallback> _callback) + throws ApiException { + + okhttp3.Call localVarCall = + searchVariablesValidateBeforeCall(searchVariablesRequest, _callback); + Type localVarReturnType = new TypeToken>() {}.getType(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; + } + /** + * Build call for updateVariable + * + * @param identifier Unique id or name of the variable to update. (required) + * @param updateVariableRequest (required) + * @param _callback Callback for upload/download progress + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
204 Variable name updated successfully. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public okhttp3.Call updateVariableCall( + String identifier, + UpdateVariableRequest updateVariableRequest, + final ApiCallback _callback) + throws ApiException { + String basePath = null; + // Operation Servers + String[] localBasePaths = new String[] {}; + + // Determine Base Path to Use + if (localCustomBaseUrl != null) { + basePath = localCustomBaseUrl; + } else if (localBasePaths.length > 0) { + basePath = localBasePaths[localHostIndex]; + } else { + basePath = null; + } + + Object localVarPostBody = updateVariableRequest; + + // create path and map variables + String localVarPath = + "/api/rest/2.0/template/variables/{identifier}/update" + .replace( + "{" + "identifier" + "}", + localVarApiClient.escapeString(identifier.toString())); + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + final String[] localVarAccepts = {"application/json"}; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = {"application/json"}; + final String localVarContentType = + localVarApiClient.selectHeaderContentType(localVarContentTypes); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } + + String[] localVarAuthNames = new String[] {"bearerAuth"}; + return localVarApiClient.buildCall( + basePath, + localVarPath, + "POST", + localVarQueryParams, + localVarCollectionQueryParams, + localVarPostBody, + localVarHeaderParams, + localVarCookieParams, + localVarFormParams, + localVarAuthNames, + _callback); + } + + @SuppressWarnings("rawtypes") + private okhttp3.Call updateVariableValidateBeforeCall( + String identifier, + UpdateVariableRequest updateVariableRequest, + final ApiCallback _callback) + throws ApiException { + // verify the required parameter 'identifier' is set + if (identifier == null) { + throw new ApiException( + "Missing the required parameter 'identifier' when calling" + + " updateVariable(Async)"); + } + + // verify the required parameter 'updateVariableRequest' is set + if (updateVariableRequest == null) { + throw new ApiException( + "Missing the required parameter 'updateVariableRequest' when calling" + + " updateVariable(Async)"); + } + + return updateVariableCall(identifier, updateVariableRequest, _callback); + } + + /** + * Update a variable's name Version: 26.4.0.cl or later Allows updating a variable's + * name in ThoughtSpot. Requires ADMINISTRATION role and TENANT scope. The CAN_MANAGE_VARIABLES + * permission allows you to manage Formula Variables in the current organization scope. The API + * endpoint allows updating: * The variable name + * + * @param identifier Unique id or name of the variable to update. (required) + * @param updateVariableRequest (required) + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the + * response body + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
204 Variable name updated successfully. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public void updateVariable(String identifier, UpdateVariableRequest updateVariableRequest) + throws ApiException { + updateVariableWithHttpInfo(identifier, updateVariableRequest); + } + + /** + * Update a variable's name Version: 26.4.0.cl or later Allows updating a variable's + * name in ThoughtSpot. Requires ADMINISTRATION role and TENANT scope. The CAN_MANAGE_VARIABLES + * permission allows you to manage Formula Variables in the current organization scope. The API + * endpoint allows updating: * The variable name + * + * @param identifier Unique id or name of the variable to update. (required) + * @param updateVariableRequest (required) + * @return ApiResponse<Void> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the + * response body + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
204 Variable name updated successfully. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public ApiResponse updateVariableWithHttpInfo( + String identifier, UpdateVariableRequest updateVariableRequest) throws ApiException { + okhttp3.Call localVarCall = + updateVariableValidateBeforeCall(identifier, updateVariableRequest, null); + return localVarApiClient.execute(localVarCall); + } + + /** + * (asynchronously) Update a variable's name Version: 26.4.0.cl or later Allows updating a + * variable's name in ThoughtSpot. Requires ADMINISTRATION role and TENANT scope. The + * CAN_MANAGE_VARIABLES permission allows you to manage Formula Variables in the current + * organization scope. The API endpoint allows updating: * The variable name + * + * @param identifier Unique id or name of the variable to update. (required) + * @param updateVariableRequest (required) + * @param _callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body + * object + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
204 Variable name updated successfully. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public okhttp3.Call updateVariableAsync( + String identifier, + UpdateVariableRequest updateVariableRequest, + final ApiCallback _callback) + throws ApiException { + + okhttp3.Call localVarCall = + updateVariableValidateBeforeCall(identifier, updateVariableRequest, _callback); + localVarApiClient.executeAsync(localVarCall, _callback); + return localVarCall; + } + /** + * Build call for updateVariableValues + * + * @param updateVariableValuesRequest (required) + * @param _callback Callback for upload/download progress + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
204 Variable values updated successfully. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ * + * @deprecated + */ + @Deprecated + public okhttp3.Call updateVariableValuesCall( + UpdateVariableValuesRequest updateVariableValuesRequest, final ApiCallback _callback) + throws ApiException { + String basePath = null; + // Operation Servers + String[] localBasePaths = new String[] {}; + + // Determine Base Path to Use + if (localCustomBaseUrl != null) { + basePath = localCustomBaseUrl; + } else if (localBasePaths.length > 0) { + basePath = localBasePaths[localHostIndex]; + } else { + basePath = null; + } + + Object localVarPostBody = updateVariableValuesRequest; + + // create path and map variables + String localVarPath = "/api/rest/2.0/template/variables/update-values"; + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + final String[] localVarAccepts = {"application/json"}; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = {"application/json"}; + final String localVarContentType = + localVarApiClient.selectHeaderContentType(localVarContentTypes); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } + + String[] localVarAuthNames = new String[] {"bearerAuth"}; + return localVarApiClient.buildCall( + basePath, + localVarPath, + "POST", + localVarQueryParams, + localVarCollectionQueryParams, + localVarPostBody, + localVarHeaderParams, + localVarCookieParams, + localVarFormParams, + localVarAuthNames, + _callback); + } + + @Deprecated + @SuppressWarnings("rawtypes") + private okhttp3.Call updateVariableValuesValidateBeforeCall( + UpdateVariableValuesRequest updateVariableValuesRequest, final ApiCallback _callback) + throws ApiException { + // verify the required parameter 'updateVariableValuesRequest' is set + if (updateVariableValuesRequest == null) { + throw new ApiException( + "Missing the required parameter 'updateVariableValuesRequest' when calling" + + " updateVariableValues(Async)"); + } + + return updateVariableValuesCall(updateVariableValuesRequest, _callback); + } + + /** + * Update values for multiple variables Version: 10.14.0.cl or later **Note:** This API endpoint + * is deprecated and will be removed from ThoughtSpot in a future release. Use [POST + * /api/rest/2.0/template/variables/{identifier}/update-values](/api/rest/2.0/template/variables/%7Bidentifier%7D/update-values) + * instead. Allows updating values for multiple variables in ThoughtSpot. Requires + * ADMINISTRATION role. The CAN_MANAGE_VARIABLES permission allows you to manage Formula + * Variables in the current organization scope. The API endpoint allows: * Adding new values to + * variables * Replacing existing values * Deleting values from variables When updating variable + * values, you need to specify: * The variable identifiers * The values to add/replace/remove + * for each variable * The operation to perform (ADD, REPLACE, REMOVE, RESET) Behaviour based on + * operation type: * ADD - Adds values to the variable if this is a list type variable, else + * same as replace. * REPLACE - Replaces all values of a given set of constraints with the + * current set of values. * REMOVE - Removes any values which match the set of conditions of the + * variables if this is a list type variable, else clears value. * RESET - Removes all + * constrains for a given variable, scope is ignored + * + * @param updateVariableValuesRequest (required) + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the + * response body + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
204 Variable values updated successfully. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ * + * @deprecated + */ + @Deprecated + public void updateVariableValues(UpdateVariableValuesRequest updateVariableValuesRequest) + throws ApiException { + updateVariableValuesWithHttpInfo(updateVariableValuesRequest); + } + + /** + * Update values for multiple variables Version: 10.14.0.cl or later **Note:** This API endpoint + * is deprecated and will be removed from ThoughtSpot in a future release. Use [POST + * /api/rest/2.0/template/variables/{identifier}/update-values](/api/rest/2.0/template/variables/%7Bidentifier%7D/update-values) + * instead. Allows updating values for multiple variables in ThoughtSpot. Requires + * ADMINISTRATION role. The CAN_MANAGE_VARIABLES permission allows you to manage Formula + * Variables in the current organization scope. The API endpoint allows: * Adding new values to + * variables * Replacing existing values * Deleting values from variables When updating variable + * values, you need to specify: * The variable identifiers * The values to add/replace/remove + * for each variable * The operation to perform (ADD, REPLACE, REMOVE, RESET) Behaviour based on + * operation type: * ADD - Adds values to the variable if this is a list type variable, else + * same as replace. * REPLACE - Replaces all values of a given set of constraints with the + * current set of values. * REMOVE - Removes any values which match the set of conditions of the + * variables if this is a list type variable, else clears value. * RESET - Removes all + * constrains for a given variable, scope is ignored + * + * @param updateVariableValuesRequest (required) + * @return ApiResponse<Void> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the + * response body + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
204 Variable values updated successfully. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ * + * @deprecated + */ + @Deprecated + public ApiResponse updateVariableValuesWithHttpInfo( + UpdateVariableValuesRequest updateVariableValuesRequest) throws ApiException { + okhttp3.Call localVarCall = + updateVariableValuesValidateBeforeCall(updateVariableValuesRequest, null); + return localVarApiClient.execute(localVarCall); + } + + /** + * (asynchronously) Update values for multiple variables Version: 10.14.0.cl or later **Note:** + * This API endpoint is deprecated and will be removed from ThoughtSpot in a future release. Use + * [POST + * /api/rest/2.0/template/variables/{identifier}/update-values](/api/rest/2.0/template/variables/%7Bidentifier%7D/update-values) + * instead. Allows updating values for multiple variables in ThoughtSpot. Requires + * ADMINISTRATION role. The CAN_MANAGE_VARIABLES permission allows you to manage Formula + * Variables in the current organization scope. The API endpoint allows: * Adding new values to + * variables * Replacing existing values * Deleting values from variables When updating variable + * values, you need to specify: * The variable identifiers * The values to add/replace/remove + * for each variable * The operation to perform (ADD, REPLACE, REMOVE, RESET) Behaviour based on + * operation type: * ADD - Adds values to the variable if this is a list type variable, else + * same as replace. * REPLACE - Replaces all values of a given set of constraints with the + * current set of values. * REMOVE - Removes any values which match the set of conditions of the + * variables if this is a list type variable, else clears value. * RESET - Removes all + * constrains for a given variable, scope is ignored + * + * @param updateVariableValuesRequest (required) + * @param _callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body + * object + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
204 Variable values updated successfully. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ * + * @deprecated + */ + @Deprecated + public okhttp3.Call updateVariableValuesAsync( + UpdateVariableValuesRequest updateVariableValuesRequest, + final ApiCallback _callback) + throws ApiException { + + okhttp3.Call localVarCall = + updateVariableValuesValidateBeforeCall(updateVariableValuesRequest, _callback); + localVarApiClient.executeAsync(localVarCall, _callback); + return localVarCall; + } +} diff --git a/sdks/java/src/main/java/com/thoughtspot/client/api/VersionControlApi.java b/sdks/java/src/main/java/com/thoughtspot/client/api/VersionControlApi.java new file mode 100644 index 000000000..bc6658565 --- /dev/null +++ b/sdks/java/src/main/java/com/thoughtspot/client/api/VersionControlApi.java @@ -0,0 +1,1759 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client.api; + +import com.google.gson.reflect.TypeToken; +import com.thoughtspot.client.ApiCallback; +import com.thoughtspot.client.ApiClient; +import com.thoughtspot.client.ApiClientConfiguration; +import com.thoughtspot.client.ApiException; +import com.thoughtspot.client.ApiResponse; +import com.thoughtspot.client.Configuration; +import com.thoughtspot.client.Pair; +import com.thoughtspot.client.model.CommitBranchRequest; +import com.thoughtspot.client.model.CommitHistoryResponse; +import com.thoughtspot.client.model.CommitResponse; +import com.thoughtspot.client.model.CreateConfigRequest; +import com.thoughtspot.client.model.DeleteConfigRequest; +import com.thoughtspot.client.model.DeployCommitRequest; +import com.thoughtspot.client.model.DeployResponse; +import com.thoughtspot.client.model.RepoConfigObject; +import com.thoughtspot.client.model.RevertCommitRequest; +import com.thoughtspot.client.model.RevertResponse; +import com.thoughtspot.client.model.SearchCommitsRequest; +import com.thoughtspot.client.model.SearchConfigRequest; +import com.thoughtspot.client.model.UpdateConfigRequest; +import com.thoughtspot.client.model.ValidateMergeRequest; +import java.lang.reflect.Type; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +@javax.annotation.Generated( + value = "org.openapitools.codegen.languages.JavaClientCodegen", + comments = "Generator version: 7.12.0") +public class VersionControlApi { + private ApiClient localVarApiClient; + private ApiClientConfiguration localVarApiClientConfiguration; + private int localHostIndex; + private String localCustomBaseUrl; + + public VersionControlApi() { + this(Configuration.getDefaultApiClient()); + } + + public VersionControlApi(ApiClient apiClient) { + this.localVarApiClient = apiClient; + } + + public VersionControlApi(ApiClientConfiguration apiClientConfiguration) { + this.localVarApiClientConfiguration = apiClientConfiguration; + this.localVarApiClient = new ApiClient(apiClientConfiguration); + } + + public ApiClient getApiClient() { + return localVarApiClient; + } + + public void setApiClient(ApiClient apiClient) { + this.localVarApiClient = apiClient; + } + + public ApiClientConfiguration getApiClientConfiguration() { + return localVarApiClientConfiguration; + } + + public void applyApiClientConfiguration(ApiClientConfiguration apiClientConfiguration) { + this.localVarApiClientConfiguration = apiClientConfiguration; + if (localVarApiClient != null) { + localVarApiClient.applyApiClientConfiguration(apiClientConfiguration); + } else { + localVarApiClient = new ApiClient(apiClientConfiguration); + } + } + + public int getHostIndex() { + return localHostIndex; + } + + public void setHostIndex(int hostIndex) { + this.localHostIndex = hostIndex; + } + + public String getCustomBaseUrl() { + return localCustomBaseUrl; + } + + public void setCustomBaseUrl(String customBaseUrl) { + this.localCustomBaseUrl = customBaseUrl; + } + + /** + * Build call for commitBranch + * + * @param commitBranchRequest (required) + * @param _callback Callback for upload/download progress + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 Successfully committed the metadata objects -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public okhttp3.Call commitBranchCall( + CommitBranchRequest commitBranchRequest, final ApiCallback _callback) + throws ApiException { + String basePath = null; + // Operation Servers + String[] localBasePaths = new String[] {}; + + // Determine Base Path to Use + if (localCustomBaseUrl != null) { + basePath = localCustomBaseUrl; + } else if (localBasePaths.length > 0) { + basePath = localBasePaths[localHostIndex]; + } else { + basePath = null; + } + + Object localVarPostBody = commitBranchRequest; + + // create path and map variables + String localVarPath = "/api/rest/2.0/vcs/git/branches/commit"; + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + final String[] localVarAccepts = {"application/json"}; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = {"application/json"}; + final String localVarContentType = + localVarApiClient.selectHeaderContentType(localVarContentTypes); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } + + String[] localVarAuthNames = new String[] {"bearerAuth"}; + return localVarApiClient.buildCall( + basePath, + localVarPath, + "POST", + localVarQueryParams, + localVarCollectionQueryParams, + localVarPostBody, + localVarHeaderParams, + localVarCookieParams, + localVarFormParams, + localVarAuthNames, + _callback); + } + + @SuppressWarnings("rawtypes") + private okhttp3.Call commitBranchValidateBeforeCall( + CommitBranchRequest commitBranchRequest, final ApiCallback _callback) + throws ApiException { + // verify the required parameter 'commitBranchRequest' is set + if (commitBranchRequest == null) { + throw new ApiException( + "Missing the required parameter 'commitBranchRequest' when calling" + + " commitBranch(Async)"); + } + + return commitBranchCall(commitBranchRequest, _callback); + } + + /** + * Version: 9.2.0.cl or later Commits TML files of metadata objects to the Git branch configured + * on your instance. Requires at least edit access to objects used in the commit operation. + * Before using this endpoint to push your commits: * Enable Git integration on your instance. * + * Make sure the Git repository and branch details are configured on your instance. For more + * information, see [Git integration + * documentation](https://developers.thoughtspot.com/docs/git-integration). + * + * @param commitBranchRequest (required) + * @return CommitResponse + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the + * response body + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 Successfully committed the metadata objects -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public CommitResponse commitBranch(CommitBranchRequest commitBranchRequest) + throws ApiException { + ApiResponse localVarResp = commitBranchWithHttpInfo(commitBranchRequest); + return localVarResp.getData(); + } + + /** + * Version: 9.2.0.cl or later Commits TML files of metadata objects to the Git branch configured + * on your instance. Requires at least edit access to objects used in the commit operation. + * Before using this endpoint to push your commits: * Enable Git integration on your instance. * + * Make sure the Git repository and branch details are configured on your instance. For more + * information, see [Git integration + * documentation](https://developers.thoughtspot.com/docs/git-integration). + * + * @param commitBranchRequest (required) + * @return ApiResponse<CommitResponse> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the + * response body + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 Successfully committed the metadata objects -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public ApiResponse commitBranchWithHttpInfo( + CommitBranchRequest commitBranchRequest) throws ApiException { + okhttp3.Call localVarCall = commitBranchValidateBeforeCall(commitBranchRequest, null); + Type localVarReturnType = new TypeToken() {}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); + } + + /** + * (asynchronously) Version: 9.2.0.cl or later Commits TML files of metadata objects to the Git + * branch configured on your instance. Requires at least edit access to objects used in the + * commit operation. Before using this endpoint to push your commits: * Enable Git integration + * on your instance. * Make sure the Git repository and branch details are configured on your + * instance. For more information, see [Git integration + * documentation](https://developers.thoughtspot.com/docs/git-integration). + * + * @param commitBranchRequest (required) + * @param _callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body + * object + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 Successfully committed the metadata objects -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public okhttp3.Call commitBranchAsync( + CommitBranchRequest commitBranchRequest, final ApiCallback _callback) + throws ApiException { + + okhttp3.Call localVarCall = commitBranchValidateBeforeCall(commitBranchRequest, _callback); + Type localVarReturnType = new TypeToken() {}.getType(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; + } + /** + * Build call for createConfig + * + * @param createConfigRequest (required) + * @param _callback Callback for upload/download progress + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 Successfully configured local repository -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public okhttp3.Call createConfigCall( + CreateConfigRequest createConfigRequest, final ApiCallback _callback) + throws ApiException { + String basePath = null; + // Operation Servers + String[] localBasePaths = new String[] {}; + + // Determine Base Path to Use + if (localCustomBaseUrl != null) { + basePath = localCustomBaseUrl; + } else if (localBasePaths.length > 0) { + basePath = localBasePaths[localHostIndex]; + } else { + basePath = null; + } + + Object localVarPostBody = createConfigRequest; + + // create path and map variables + String localVarPath = "/api/rest/2.0/vcs/git/config/create"; + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + final String[] localVarAccepts = {"application/json"}; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = {"application/json"}; + final String localVarContentType = + localVarApiClient.selectHeaderContentType(localVarContentTypes); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } + + String[] localVarAuthNames = new String[] {"bearerAuth"}; + return localVarApiClient.buildCall( + basePath, + localVarPath, + "POST", + localVarQueryParams, + localVarCollectionQueryParams, + localVarPostBody, + localVarHeaderParams, + localVarCookieParams, + localVarFormParams, + localVarAuthNames, + _callback); + } + + @SuppressWarnings("rawtypes") + private okhttp3.Call createConfigValidateBeforeCall( + CreateConfigRequest createConfigRequest, final ApiCallback _callback) + throws ApiException { + // verify the required parameter 'createConfigRequest' is set + if (createConfigRequest == null) { + throw new ApiException( + "Missing the required parameter 'createConfigRequest' when calling" + + " createConfig(Async)"); + } + + return createConfigCall(createConfigRequest, _callback); + } + + /** + * Version: 9.2.0.cl or later Allows you to connect a ThoughtSpot instance to a Git repository. + * Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If + * [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled + * on your instance on your instance, the `CAN_SETUP_VERSION_CONTROL` (**Can set up + * version control**) privilege. You can use this API endpoint to connect your ThoughtSpot + * development and production environments to the development and production branches of a Git + * repository. Before using this endpoint to connect your ThoughtSpot instance to a Git + * repository, check the following prerequisites: * You have a Git repository. If you are using + * GitHub, make sure you have a valid account and an access token to connect ThoughtSpot to + * GitHub. For information about generating a token, see [GitHub + * Documentation](https://docs.github.com/en/authentication/keeping-your-account-and-data-secure/managing-your-personal-access-tokens). + * * Your access token has `repo` scope that grants full access to public and private + * repositories. * Your Git repository has a branch that can be configured as a default branch + * in ThoughtSpot. For more information, see [Git integration + * documentation](https://developers.thoughtspot.com/docs/?pageid=git-integration). + * **Note**: ThoughtSpot supports only GitHub / itHub Enterprise for CI/CD. + * + * @param createConfigRequest (required) + * @return RepoConfigObject + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the + * response body + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 Successfully configured local repository -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public RepoConfigObject createConfig(CreateConfigRequest createConfigRequest) + throws ApiException { + ApiResponse localVarResp = createConfigWithHttpInfo(createConfigRequest); + return localVarResp.getData(); + } + + /** + * Version: 9.2.0.cl or later Allows you to connect a ThoughtSpot instance to a Git repository. + * Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If + * [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled + * on your instance on your instance, the `CAN_SETUP_VERSION_CONTROL` (**Can set up + * version control**) privilege. You can use this API endpoint to connect your ThoughtSpot + * development and production environments to the development and production branches of a Git + * repository. Before using this endpoint to connect your ThoughtSpot instance to a Git + * repository, check the following prerequisites: * You have a Git repository. If you are using + * GitHub, make sure you have a valid account and an access token to connect ThoughtSpot to + * GitHub. For information about generating a token, see [GitHub + * Documentation](https://docs.github.com/en/authentication/keeping-your-account-and-data-secure/managing-your-personal-access-tokens). + * * Your access token has `repo` scope that grants full access to public and private + * repositories. * Your Git repository has a branch that can be configured as a default branch + * in ThoughtSpot. For more information, see [Git integration + * documentation](https://developers.thoughtspot.com/docs/?pageid=git-integration). + * **Note**: ThoughtSpot supports only GitHub / itHub Enterprise for CI/CD. + * + * @param createConfigRequest (required) + * @return ApiResponse<RepoConfigObject> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the + * response body + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 Successfully configured local repository -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public ApiResponse createConfigWithHttpInfo( + CreateConfigRequest createConfigRequest) throws ApiException { + okhttp3.Call localVarCall = createConfigValidateBeforeCall(createConfigRequest, null); + Type localVarReturnType = new TypeToken() {}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); + } + + /** + * (asynchronously) Version: 9.2.0.cl or later Allows you to connect a ThoughtSpot instance to a + * Git repository. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) + * privilege. If [Role-Based Access Control + * (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance on your + * instance, the `CAN_SETUP_VERSION_CONTROL` (**Can set up version control**) + * privilege. You can use this API endpoint to connect your ThoughtSpot development and + * production environments to the development and production branches of a Git repository. + * Before using this endpoint to connect your ThoughtSpot instance to a Git repository, check + * the following prerequisites: * You have a Git repository. If you are using GitHub, make sure + * you have a valid account and an access token to connect ThoughtSpot to GitHub. For + * information about generating a token, see [GitHub + * Documentation](https://docs.github.com/en/authentication/keeping-your-account-and-data-secure/managing-your-personal-access-tokens). + * * Your access token has `repo` scope that grants full access to public and private + * repositories. * Your Git repository has a branch that can be configured as a default branch + * in ThoughtSpot. For more information, see [Git integration + * documentation](https://developers.thoughtspot.com/docs/?pageid=git-integration). + * **Note**: ThoughtSpot supports only GitHub / itHub Enterprise for CI/CD. + * + * @param createConfigRequest (required) + * @param _callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body + * object + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 Successfully configured local repository -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public okhttp3.Call createConfigAsync( + CreateConfigRequest createConfigRequest, final ApiCallback _callback) + throws ApiException { + + okhttp3.Call localVarCall = createConfigValidateBeforeCall(createConfigRequest, _callback); + Type localVarReturnType = new TypeToken() {}.getType(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; + } + /** + * Build call for deleteConfig + * + * @param deleteConfigRequest (required) + * @param _callback Callback for upload/download progress + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
204 Successfully deleted local repository configuration -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public okhttp3.Call deleteConfigCall( + DeleteConfigRequest deleteConfigRequest, final ApiCallback _callback) + throws ApiException { + String basePath = null; + // Operation Servers + String[] localBasePaths = new String[] {}; + + // Determine Base Path to Use + if (localCustomBaseUrl != null) { + basePath = localCustomBaseUrl; + } else if (localBasePaths.length > 0) { + basePath = localBasePaths[localHostIndex]; + } else { + basePath = null; + } + + Object localVarPostBody = deleteConfigRequest; + + // create path and map variables + String localVarPath = "/api/rest/2.0/vcs/git/config/delete"; + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + final String[] localVarAccepts = {"application/json"}; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = {"application/json"}; + final String localVarContentType = + localVarApiClient.selectHeaderContentType(localVarContentTypes); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } + + String[] localVarAuthNames = new String[] {"bearerAuth"}; + return localVarApiClient.buildCall( + basePath, + localVarPath, + "POST", + localVarQueryParams, + localVarCollectionQueryParams, + localVarPostBody, + localVarHeaderParams, + localVarCookieParams, + localVarFormParams, + localVarAuthNames, + _callback); + } + + @SuppressWarnings("rawtypes") + private okhttp3.Call deleteConfigValidateBeforeCall( + DeleteConfigRequest deleteConfigRequest, final ApiCallback _callback) + throws ApiException { + // verify the required parameter 'deleteConfigRequest' is set + if (deleteConfigRequest == null) { + throw new ApiException( + "Missing the required parameter 'deleteConfigRequest' when calling" + + " deleteConfig(Async)"); + } + + return deleteConfigCall(deleteConfigRequest, _callback); + } + + /** + * Version: 9.2.0.cl or later Deletes Git repository configuration from your ThoughtSpot + * instance. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If + * [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled + * on your instance on your instance, the `CAN_SETUP_VERSION_CONTROL` (**Can set up + * version control**) privilege. + * + * @param deleteConfigRequest (required) + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the + * response body + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
204 Successfully deleted local repository configuration -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public void deleteConfig(DeleteConfigRequest deleteConfigRequest) throws ApiException { + deleteConfigWithHttpInfo(deleteConfigRequest); + } + + /** + * Version: 9.2.0.cl or later Deletes Git repository configuration from your ThoughtSpot + * instance. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If + * [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled + * on your instance on your instance, the `CAN_SETUP_VERSION_CONTROL` (**Can set up + * version control**) privilege. + * + * @param deleteConfigRequest (required) + * @return ApiResponse<Void> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the + * response body + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
204 Successfully deleted local repository configuration -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public ApiResponse deleteConfigWithHttpInfo(DeleteConfigRequest deleteConfigRequest) + throws ApiException { + okhttp3.Call localVarCall = deleteConfigValidateBeforeCall(deleteConfigRequest, null); + return localVarApiClient.execute(localVarCall); + } + + /** + * (asynchronously) Version: 9.2.0.cl or later Deletes Git repository configuration from your + * ThoughtSpot instance. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) + * privilege. If [Role-Based Access Control + * (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance on your + * instance, the `CAN_SETUP_VERSION_CONTROL` (**Can set up version control**) + * privilege. + * + * @param deleteConfigRequest (required) + * @param _callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body + * object + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
204 Successfully deleted local repository configuration -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public okhttp3.Call deleteConfigAsync( + DeleteConfigRequest deleteConfigRequest, final ApiCallback _callback) + throws ApiException { + + okhttp3.Call localVarCall = deleteConfigValidateBeforeCall(deleteConfigRequest, _callback); + localVarApiClient.executeAsync(localVarCall, _callback); + return localVarCall; + } + /** + * Build call for deployCommit + * + * @param deployCommitRequest (required) + * @param _callback Callback for upload/download progress + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 Successfully deployed the changes -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public okhttp3.Call deployCommitCall( + DeployCommitRequest deployCommitRequest, final ApiCallback _callback) + throws ApiException { + String basePath = null; + // Operation Servers + String[] localBasePaths = new String[] {}; + + // Determine Base Path to Use + if (localCustomBaseUrl != null) { + basePath = localCustomBaseUrl; + } else if (localBasePaths.length > 0) { + basePath = localBasePaths[localHostIndex]; + } else { + basePath = null; + } + + Object localVarPostBody = deployCommitRequest; + + // create path and map variables + String localVarPath = "/api/rest/2.0/vcs/git/commits/deploy"; + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + final String[] localVarAccepts = {"application/json"}; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = {"application/json"}; + final String localVarContentType = + localVarApiClient.selectHeaderContentType(localVarContentTypes); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } + + String[] localVarAuthNames = new String[] {"bearerAuth"}; + return localVarApiClient.buildCall( + basePath, + localVarPath, + "POST", + localVarQueryParams, + localVarCollectionQueryParams, + localVarPostBody, + localVarHeaderParams, + localVarCookieParams, + localVarFormParams, + localVarAuthNames, + _callback); + } + + @SuppressWarnings("rawtypes") + private okhttp3.Call deployCommitValidateBeforeCall( + DeployCommitRequest deployCommitRequest, final ApiCallback _callback) + throws ApiException { + // verify the required parameter 'deployCommitRequest' is set + if (deployCommitRequest == null) { + throw new ApiException( + "Missing the required parameter 'deployCommitRequest' when calling" + + " deployCommit(Async)"); + } + + return deployCommitCall(deployCommitRequest, _callback); + } + + /** + * Version: 9.2.0.cl or later Allows you to deploy a commit and publish TML content to your + * ThoughtSpot instance. Requires at least edit access to the objects used in the deploy + * operation. The API deploys the head of the branch unless a `commit_id` is specified + * in the API request. If the branch name is not defined in the request, the default branch is + * considered for deploying commits. For more information, see [Git integration + * documentation](https://developers.thoughtspot.com/docs/git-integration). + * + * @param deployCommitRequest (required) + * @return List<DeployResponse> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the + * response body + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 Successfully deployed the changes -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public List deployCommit(DeployCommitRequest deployCommitRequest) + throws ApiException { + ApiResponse> localVarResp = + deployCommitWithHttpInfo(deployCommitRequest); + return localVarResp.getData(); + } + + /** + * Version: 9.2.0.cl or later Allows you to deploy a commit and publish TML content to your + * ThoughtSpot instance. Requires at least edit access to the objects used in the deploy + * operation. The API deploys the head of the branch unless a `commit_id` is specified + * in the API request. If the branch name is not defined in the request, the default branch is + * considered for deploying commits. For more information, see [Git integration + * documentation](https://developers.thoughtspot.com/docs/git-integration). + * + * @param deployCommitRequest (required) + * @return ApiResponse<List<DeployResponse>> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the + * response body + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 Successfully deployed the changes -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public ApiResponse> deployCommitWithHttpInfo( + DeployCommitRequest deployCommitRequest) throws ApiException { + okhttp3.Call localVarCall = deployCommitValidateBeforeCall(deployCommitRequest, null); + Type localVarReturnType = new TypeToken>() {}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); + } + + /** + * (asynchronously) Version: 9.2.0.cl or later Allows you to deploy a commit and publish TML + * content to your ThoughtSpot instance. Requires at least edit access to the objects used in + * the deploy operation. The API deploys the head of the branch unless a `commit_id` + * is specified in the API request. If the branch name is not defined in the request, the + * default branch is considered for deploying commits. For more information, see [Git + * integration documentation](https://developers.thoughtspot.com/docs/git-integration). + * + * @param deployCommitRequest (required) + * @param _callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body + * object + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 Successfully deployed the changes -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public okhttp3.Call deployCommitAsync( + DeployCommitRequest deployCommitRequest, + final ApiCallback> _callback) + throws ApiException { + + okhttp3.Call localVarCall = deployCommitValidateBeforeCall(deployCommitRequest, _callback); + Type localVarReturnType = new TypeToken>() {}.getType(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; + } + /** + * Build call for revertCommit + * + * @param commitId Commit id to which the object should be reverted (required) + * @param revertCommitRequest (required) + * @param _callback Callback for upload/download progress + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 Reverted the object to the commit point specified -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public okhttp3.Call revertCommitCall( + String commitId, RevertCommitRequest revertCommitRequest, final ApiCallback _callback) + throws ApiException { + String basePath = null; + // Operation Servers + String[] localBasePaths = new String[] {}; + + // Determine Base Path to Use + if (localCustomBaseUrl != null) { + basePath = localCustomBaseUrl; + } else if (localBasePaths.length > 0) { + basePath = localBasePaths[localHostIndex]; + } else { + basePath = null; + } + + Object localVarPostBody = revertCommitRequest; + + // create path and map variables + String localVarPath = + "/api/rest/2.0/vcs/git/commits/{commit_id}/revert" + .replace( + "{" + "commit_id" + "}", + localVarApiClient.escapeString(commitId.toString())); + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + final String[] localVarAccepts = {"application/json"}; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = {"application/json"}; + final String localVarContentType = + localVarApiClient.selectHeaderContentType(localVarContentTypes); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } + + String[] localVarAuthNames = new String[] {"bearerAuth"}; + return localVarApiClient.buildCall( + basePath, + localVarPath, + "POST", + localVarQueryParams, + localVarCollectionQueryParams, + localVarPostBody, + localVarHeaderParams, + localVarCookieParams, + localVarFormParams, + localVarAuthNames, + _callback); + } + + @SuppressWarnings("rawtypes") + private okhttp3.Call revertCommitValidateBeforeCall( + String commitId, RevertCommitRequest revertCommitRequest, final ApiCallback _callback) + throws ApiException { + // verify the required parameter 'commitId' is set + if (commitId == null) { + throw new ApiException( + "Missing the required parameter 'commitId' when calling revertCommit(Async)"); + } + + // verify the required parameter 'revertCommitRequest' is set + if (revertCommitRequest == null) { + throw new ApiException( + "Missing the required parameter 'revertCommitRequest' when calling" + + " revertCommit(Async)"); + } + + return revertCommitCall(commitId, revertCommitRequest, _callback); + } + + /** + * Version: 9.2.0.cl or later Reverts TML objects to a previous commit specified in the API + * request. Requires at least edit access to objects. In the API request, specify the + * `commit_id`. If the branch name is not specified in the request, the API will + * consider the default branch configured on your instance. By default, the API reverts all + * objects. If the revert operation fails for one of the objects provided in the commit, the API + * returns an error and does not revert any object. For more information, see [Git integration + * documentation](https://developers.thoughtspot.com/docs/git-integration). + * + * @param commitId Commit id to which the object should be reverted (required) + * @param revertCommitRequest (required) + * @return RevertResponse + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the + * response body + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 Reverted the object to the commit point specified -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public RevertResponse revertCommit(String commitId, RevertCommitRequest revertCommitRequest) + throws ApiException { + ApiResponse localVarResp = + revertCommitWithHttpInfo(commitId, revertCommitRequest); + return localVarResp.getData(); + } + + /** + * Version: 9.2.0.cl or later Reverts TML objects to a previous commit specified in the API + * request. Requires at least edit access to objects. In the API request, specify the + * `commit_id`. If the branch name is not specified in the request, the API will + * consider the default branch configured on your instance. By default, the API reverts all + * objects. If the revert operation fails for one of the objects provided in the commit, the API + * returns an error and does not revert any object. For more information, see [Git integration + * documentation](https://developers.thoughtspot.com/docs/git-integration). + * + * @param commitId Commit id to which the object should be reverted (required) + * @param revertCommitRequest (required) + * @return ApiResponse<RevertResponse> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the + * response body + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 Reverted the object to the commit point specified -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public ApiResponse revertCommitWithHttpInfo( + String commitId, RevertCommitRequest revertCommitRequest) throws ApiException { + okhttp3.Call localVarCall = + revertCommitValidateBeforeCall(commitId, revertCommitRequest, null); + Type localVarReturnType = new TypeToken() {}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); + } + + /** + * (asynchronously) Version: 9.2.0.cl or later Reverts TML objects to a previous commit + * specified in the API request. Requires at least edit access to objects. In the API request, + * specify the `commit_id`. If the branch name is not specified in the request, the + * API will consider the default branch configured on your instance. By default, the API reverts + * all objects. If the revert operation fails for one of the objects provided in the commit, the + * API returns an error and does not revert any object. For more information, see [Git + * integration documentation](https://developers.thoughtspot.com/docs/git-integration). + * + * @param commitId Commit id to which the object should be reverted (required) + * @param revertCommitRequest (required) + * @param _callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body + * object + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 Reverted the object to the commit point specified -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public okhttp3.Call revertCommitAsync( + String commitId, + RevertCommitRequest revertCommitRequest, + final ApiCallback _callback) + throws ApiException { + + okhttp3.Call localVarCall = + revertCommitValidateBeforeCall(commitId, revertCommitRequest, _callback); + Type localVarReturnType = new TypeToken() {}.getType(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; + } + /** + * Build call for searchCommits + * + * @param searchCommitsRequest (required) + * @param _callback Callback for upload/download progress + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 Commit history of the metadata object -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public okhttp3.Call searchCommitsCall( + SearchCommitsRequest searchCommitsRequest, final ApiCallback _callback) + throws ApiException { + String basePath = null; + // Operation Servers + String[] localBasePaths = new String[] {}; + + // Determine Base Path to Use + if (localCustomBaseUrl != null) { + basePath = localCustomBaseUrl; + } else if (localBasePaths.length > 0) { + basePath = localBasePaths[localHostIndex]; + } else { + basePath = null; + } + + Object localVarPostBody = searchCommitsRequest; + + // create path and map variables + String localVarPath = "/api/rest/2.0/vcs/git/commits/search"; + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + final String[] localVarAccepts = {"application/json"}; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = {"application/json"}; + final String localVarContentType = + localVarApiClient.selectHeaderContentType(localVarContentTypes); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } + + String[] localVarAuthNames = new String[] {"bearerAuth"}; + return localVarApiClient.buildCall( + basePath, + localVarPath, + "POST", + localVarQueryParams, + localVarCollectionQueryParams, + localVarPostBody, + localVarHeaderParams, + localVarCookieParams, + localVarFormParams, + localVarAuthNames, + _callback); + } + + @SuppressWarnings("rawtypes") + private okhttp3.Call searchCommitsValidateBeforeCall( + SearchCommitsRequest searchCommitsRequest, final ApiCallback _callback) + throws ApiException { + // verify the required parameter 'searchCommitsRequest' is set + if (searchCommitsRequest == null) { + throw new ApiException( + "Missing the required parameter 'searchCommitsRequest' when calling" + + " searchCommits(Async)"); + } + + return searchCommitsCall(searchCommitsRequest, _callback); + } + + /** + * Version: 9.2.0.cl or later Gets a list of commits for a given metadata object. Requires + * `DATAMANAGEMENT` (**Can manage data**) privilege. If [Role-Based Access Control + * (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance on your + * instance, the `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` (**Can manage data models**) + * privilege and edit access to the metadata objects. + * + * @param searchCommitsRequest (required) + * @return List<CommitHistoryResponse> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the + * response body + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 Commit history of the metadata object -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public List searchCommits(SearchCommitsRequest searchCommitsRequest) + throws ApiException { + ApiResponse> localVarResp = + searchCommitsWithHttpInfo(searchCommitsRequest); + return localVarResp.getData(); + } + + /** + * Version: 9.2.0.cl or later Gets a list of commits for a given metadata object. Requires + * `DATAMANAGEMENT` (**Can manage data**) privilege. If [Role-Based Access Control + * (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance on your + * instance, the `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` (**Can manage data models**) + * privilege and edit access to the metadata objects. + * + * @param searchCommitsRequest (required) + * @return ApiResponse<List<CommitHistoryResponse>> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the + * response body + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 Commit history of the metadata object -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public ApiResponse> searchCommitsWithHttpInfo( + SearchCommitsRequest searchCommitsRequest) throws ApiException { + okhttp3.Call localVarCall = searchCommitsValidateBeforeCall(searchCommitsRequest, null); + Type localVarReturnType = new TypeToken>() {}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); + } + + /** + * (asynchronously) Version: 9.2.0.cl or later Gets a list of commits for a given metadata + * object. Requires `DATAMANAGEMENT` (**Can manage data**) privilege. If [Role-Based + * Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your + * instance on your instance, the `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` (**Can manage + * data models**) privilege and edit access to the metadata objects. + * + * @param searchCommitsRequest (required) + * @param _callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body + * object + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 Commit history of the metadata object -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public okhttp3.Call searchCommitsAsync( + SearchCommitsRequest searchCommitsRequest, + final ApiCallback> _callback) + throws ApiException { + + okhttp3.Call localVarCall = + searchCommitsValidateBeforeCall(searchCommitsRequest, _callback); + Type localVarReturnType = new TypeToken>() {}.getType(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; + } + /** + * Build call for searchConfig + * + * @param searchConfigRequest (required) + * @param _callback Callback for upload/download progress + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 Details of local repository configuration -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public okhttp3.Call searchConfigCall( + SearchConfigRequest searchConfigRequest, final ApiCallback _callback) + throws ApiException { + String basePath = null; + // Operation Servers + String[] localBasePaths = new String[] {}; + + // Determine Base Path to Use + if (localCustomBaseUrl != null) { + basePath = localCustomBaseUrl; + } else if (localBasePaths.length > 0) { + basePath = localBasePaths[localHostIndex]; + } else { + basePath = null; + } + + Object localVarPostBody = searchConfigRequest; + + // create path and map variables + String localVarPath = "/api/rest/2.0/vcs/git/config/search"; + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + final String[] localVarAccepts = {"application/json"}; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = {"application/json"}; + final String localVarContentType = + localVarApiClient.selectHeaderContentType(localVarContentTypes); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } + + String[] localVarAuthNames = new String[] {"bearerAuth"}; + return localVarApiClient.buildCall( + basePath, + localVarPath, + "POST", + localVarQueryParams, + localVarCollectionQueryParams, + localVarPostBody, + localVarHeaderParams, + localVarCookieParams, + localVarFormParams, + localVarAuthNames, + _callback); + } + + @SuppressWarnings("rawtypes") + private okhttp3.Call searchConfigValidateBeforeCall( + SearchConfigRequest searchConfigRequest, final ApiCallback _callback) + throws ApiException { + // verify the required parameter 'searchConfigRequest' is set + if (searchConfigRequest == null) { + throw new ApiException( + "Missing the required parameter 'searchConfigRequest' when calling" + + " searchConfig(Async)"); + } + + return searchConfigCall(searchConfigRequest, _callback); + } + + /** + * Version: 9.2.0.cl or later Gets Git repository connections configured on the ThoughtSpot + * instance. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If + * [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled + * on your instance on your instance, the `CAN_SETUP_VERSION_CONTROL` (**Can set up + * version control**) privilege. + * + * @param searchConfigRequest (required) + * @return List<RepoConfigObject> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the + * response body + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 Details of local repository configuration -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public List searchConfig(SearchConfigRequest searchConfigRequest) + throws ApiException { + ApiResponse> localVarResp = + searchConfigWithHttpInfo(searchConfigRequest); + return localVarResp.getData(); + } + + /** + * Version: 9.2.0.cl or later Gets Git repository connections configured on the ThoughtSpot + * instance. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If + * [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled + * on your instance on your instance, the `CAN_SETUP_VERSION_CONTROL` (**Can set up + * version control**) privilege. + * + * @param searchConfigRequest (required) + * @return ApiResponse<List<RepoConfigObject>> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the + * response body + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 Details of local repository configuration -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public ApiResponse> searchConfigWithHttpInfo( + SearchConfigRequest searchConfigRequest) throws ApiException { + okhttp3.Call localVarCall = searchConfigValidateBeforeCall(searchConfigRequest, null); + Type localVarReturnType = new TypeToken>() {}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); + } + + /** + * (asynchronously) Version: 9.2.0.cl or later Gets Git repository connections configured on the + * ThoughtSpot instance. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) + * privilege. If [Role-Based Access Control + * (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance on your + * instance, the `CAN_SETUP_VERSION_CONTROL` (**Can set up version control**) + * privilege. + * + * @param searchConfigRequest (required) + * @param _callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body + * object + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 Details of local repository configuration -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public okhttp3.Call searchConfigAsync( + SearchConfigRequest searchConfigRequest, + final ApiCallback> _callback) + throws ApiException { + + okhttp3.Call localVarCall = searchConfigValidateBeforeCall(searchConfigRequest, _callback); + Type localVarReturnType = new TypeToken>() {}.getType(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; + } + /** + * Build call for updateConfig + * + * @param updateConfigRequest (required) + * @param _callback Callback for upload/download progress + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 Successfully updated local repository configuration -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public okhttp3.Call updateConfigCall( + UpdateConfigRequest updateConfigRequest, final ApiCallback _callback) + throws ApiException { + String basePath = null; + // Operation Servers + String[] localBasePaths = new String[] {}; + + // Determine Base Path to Use + if (localCustomBaseUrl != null) { + basePath = localCustomBaseUrl; + } else if (localBasePaths.length > 0) { + basePath = localBasePaths[localHostIndex]; + } else { + basePath = null; + } + + Object localVarPostBody = updateConfigRequest; + + // create path and map variables + String localVarPath = "/api/rest/2.0/vcs/git/config/update"; + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + final String[] localVarAccepts = {"application/json"}; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = {"application/json"}; + final String localVarContentType = + localVarApiClient.selectHeaderContentType(localVarContentTypes); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } + + String[] localVarAuthNames = new String[] {"bearerAuth"}; + return localVarApiClient.buildCall( + basePath, + localVarPath, + "POST", + localVarQueryParams, + localVarCollectionQueryParams, + localVarPostBody, + localVarHeaderParams, + localVarCookieParams, + localVarFormParams, + localVarAuthNames, + _callback); + } + + @SuppressWarnings("rawtypes") + private okhttp3.Call updateConfigValidateBeforeCall( + UpdateConfigRequest updateConfigRequest, final ApiCallback _callback) + throws ApiException { + // verify the required parameter 'updateConfigRequest' is set + if (updateConfigRequest == null) { + throw new ApiException( + "Missing the required parameter 'updateConfigRequest' when calling" + + " updateConfig(Async)"); + } + + return updateConfigCall(updateConfigRequest, _callback); + } + + /** + * Version: 9.2.0.cl or later Updates Git repository configuration settings. Requires + * `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access + * Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance on + * your instance, the `CAN_SETUP_VERSION_CONTROL` (**Can set up version control**) + * privilege. + * + * @param updateConfigRequest (required) + * @return RepoConfigObject + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the + * response body + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 Successfully updated local repository configuration -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public RepoConfigObject updateConfig(UpdateConfigRequest updateConfigRequest) + throws ApiException { + ApiResponse localVarResp = updateConfigWithHttpInfo(updateConfigRequest); + return localVarResp.getData(); + } + + /** + * Version: 9.2.0.cl or later Updates Git repository configuration settings. Requires + * `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access + * Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance on + * your instance, the `CAN_SETUP_VERSION_CONTROL` (**Can set up version control**) + * privilege. + * + * @param updateConfigRequest (required) + * @return ApiResponse<RepoConfigObject> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the + * response body + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 Successfully updated local repository configuration -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public ApiResponse updateConfigWithHttpInfo( + UpdateConfigRequest updateConfigRequest) throws ApiException { + okhttp3.Call localVarCall = updateConfigValidateBeforeCall(updateConfigRequest, null); + Type localVarReturnType = new TypeToken() {}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); + } + + /** + * (asynchronously) Version: 9.2.0.cl or later Updates Git repository configuration settings. + * Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If + * [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled + * on your instance on your instance, the `CAN_SETUP_VERSION_CONTROL` (**Can set up + * version control**) privilege. + * + * @param updateConfigRequest (required) + * @param _callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body + * object + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 Successfully updated local repository configuration -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public okhttp3.Call updateConfigAsync( + UpdateConfigRequest updateConfigRequest, final ApiCallback _callback) + throws ApiException { + + okhttp3.Call localVarCall = updateConfigValidateBeforeCall(updateConfigRequest, _callback); + Type localVarReturnType = new TypeToken() {}.getType(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; + } + /** + * Build call for validateMerge + * + * @param validateMergeRequest (required) + * @param _callback Callback for upload/download progress + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 validation done successfully -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public okhttp3.Call validateMergeCall( + ValidateMergeRequest validateMergeRequest, final ApiCallback _callback) + throws ApiException { + String basePath = null; + // Operation Servers + String[] localBasePaths = new String[] {}; + + // Determine Base Path to Use + if (localCustomBaseUrl != null) { + basePath = localCustomBaseUrl; + } else if (localBasePaths.length > 0) { + basePath = localBasePaths[localHostIndex]; + } else { + basePath = null; + } + + Object localVarPostBody = validateMergeRequest; + + // create path and map variables + String localVarPath = "/api/rest/2.0/vcs/git/branches/validate"; + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + final String[] localVarAccepts = {"application/json"}; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = {"application/json"}; + final String localVarContentType = + localVarApiClient.selectHeaderContentType(localVarContentTypes); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } + + String[] localVarAuthNames = new String[] {"bearerAuth"}; + return localVarApiClient.buildCall( + basePath, + localVarPath, + "POST", + localVarQueryParams, + localVarCollectionQueryParams, + localVarPostBody, + localVarHeaderParams, + localVarCookieParams, + localVarFormParams, + localVarAuthNames, + _callback); + } + + @SuppressWarnings("rawtypes") + private okhttp3.Call validateMergeValidateBeforeCall( + ValidateMergeRequest validateMergeRequest, final ApiCallback _callback) + throws ApiException { + // verify the required parameter 'validateMergeRequest' is set + if (validateMergeRequest == null) { + throw new ApiException( + "Missing the required parameter 'validateMergeRequest' when calling" + + " validateMerge(Async)"); + } + + return validateMergeCall(validateMergeRequest, _callback); + } + + /** + * Version: 9.2.0.cl or later Validates the content of your source branch against the objects in + * your destination environment. Before merging content from your source branch to the + * destination branch, run this API operation from your destination environment and ensure that + * the changes from the source branch function in the destination environment. Requires + * `DATAMANAGEMENT` (**Can manage data**) privilege. If [Role-Based Access Control + * (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance on your + * instance, the `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` (**Can manage data models**) + * privilege and edit access to the metadata objects. + * + * @param validateMergeRequest (required) + * @return List<DeployResponse> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the + * response body + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 validation done successfully -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public List validateMerge(ValidateMergeRequest validateMergeRequest) + throws ApiException { + ApiResponse> localVarResp = + validateMergeWithHttpInfo(validateMergeRequest); + return localVarResp.getData(); + } + + /** + * Version: 9.2.0.cl or later Validates the content of your source branch against the objects in + * your destination environment. Before merging content from your source branch to the + * destination branch, run this API operation from your destination environment and ensure that + * the changes from the source branch function in the destination environment. Requires + * `DATAMANAGEMENT` (**Can manage data**) privilege. If [Role-Based Access Control + * (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance on your + * instance, the `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` (**Can manage data models**) + * privilege and edit access to the metadata objects. + * + * @param validateMergeRequest (required) + * @return ApiResponse<List<DeployResponse>> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the + * response body + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 validation done successfully -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public ApiResponse> validateMergeWithHttpInfo( + ValidateMergeRequest validateMergeRequest) throws ApiException { + okhttp3.Call localVarCall = validateMergeValidateBeforeCall(validateMergeRequest, null); + Type localVarReturnType = new TypeToken>() {}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); + } + + /** + * (asynchronously) Version: 9.2.0.cl or later Validates the content of your source branch + * against the objects in your destination environment. Before merging content from your source + * branch to the destination branch, run this API operation from your destination environment + * and ensure that the changes from the source branch function in the destination environment. + * Requires `DATAMANAGEMENT` (**Can manage data**) privilege. If [Role-Based Access + * Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance on + * your instance, the `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` (**Can manage data models**) + * privilege and edit access to the metadata objects. + * + * @param validateMergeRequest (required) + * @param _callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body + * object + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 validation done successfully -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public okhttp3.Call validateMergeAsync( + ValidateMergeRequest validateMergeRequest, + final ApiCallback> _callback) + throws ApiException { + + okhttp3.Call localVarCall = + validateMergeValidateBeforeCall(validateMergeRequest, _callback); + Type localVarReturnType = new TypeToken>() {}.getType(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; + } +} diff --git a/sdks/java/src/main/java/com/thoughtspot/client/api/WebhooksApi.java b/sdks/java/src/main/java/com/thoughtspot/client/api/WebhooksApi.java new file mode 100644 index 000000000..614b3e718 --- /dev/null +++ b/sdks/java/src/main/java/com/thoughtspot/client/api/WebhooksApi.java @@ -0,0 +1,874 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client.api; + +import com.google.gson.reflect.TypeToken; +import com.thoughtspot.client.ApiCallback; +import com.thoughtspot.client.ApiClient; +import com.thoughtspot.client.ApiClientConfiguration; +import com.thoughtspot.client.ApiException; +import com.thoughtspot.client.ApiResponse; +import com.thoughtspot.client.Configuration; +import com.thoughtspot.client.Pair; +import com.thoughtspot.client.model.CreateWebhookConfigurationRequest; +import com.thoughtspot.client.model.DeleteWebhookConfigurationsRequest; +import com.thoughtspot.client.model.SearchWebhookConfigurationsRequest; +import com.thoughtspot.client.model.UpdateWebhookConfigurationRequest; +import com.thoughtspot.client.model.WebhookDeleteResponse; +import com.thoughtspot.client.model.WebhookResponse; +import com.thoughtspot.client.model.WebhookSearchResponse; +import java.lang.reflect.Type; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +@javax.annotation.Generated( + value = "org.openapitools.codegen.languages.JavaClientCodegen", + comments = "Generator version: 7.12.0") +public class WebhooksApi { + private ApiClient localVarApiClient; + private ApiClientConfiguration localVarApiClientConfiguration; + private int localHostIndex; + private String localCustomBaseUrl; + + public WebhooksApi() { + this(Configuration.getDefaultApiClient()); + } + + public WebhooksApi(ApiClient apiClient) { + this.localVarApiClient = apiClient; + } + + public WebhooksApi(ApiClientConfiguration apiClientConfiguration) { + this.localVarApiClientConfiguration = apiClientConfiguration; + this.localVarApiClient = new ApiClient(apiClientConfiguration); + } + + public ApiClient getApiClient() { + return localVarApiClient; + } + + public void setApiClient(ApiClient apiClient) { + this.localVarApiClient = apiClient; + } + + public ApiClientConfiguration getApiClientConfiguration() { + return localVarApiClientConfiguration; + } + + public void applyApiClientConfiguration(ApiClientConfiguration apiClientConfiguration) { + this.localVarApiClientConfiguration = apiClientConfiguration; + if (localVarApiClient != null) { + localVarApiClient.applyApiClientConfiguration(apiClientConfiguration); + } else { + localVarApiClient = new ApiClient(apiClientConfiguration); + } + } + + public int getHostIndex() { + return localHostIndex; + } + + public void setHostIndex(int hostIndex) { + this.localHostIndex = hostIndex; + } + + public String getCustomBaseUrl() { + return localCustomBaseUrl; + } + + public void setCustomBaseUrl(String customBaseUrl) { + this.localCustomBaseUrl = customBaseUrl; + } + + /** + * Build call for createWebhookConfiguration + * + * @param createWebhookConfigurationRequest (required) + * @param _callback Callback for upload/download progress + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 Webhook configuration created successfully -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public okhttp3.Call createWebhookConfigurationCall( + CreateWebhookConfigurationRequest createWebhookConfigurationRequest, + final ApiCallback _callback) + throws ApiException { + String basePath = null; + // Operation Servers + String[] localBasePaths = new String[] {}; + + // Determine Base Path to Use + if (localCustomBaseUrl != null) { + basePath = localCustomBaseUrl; + } else if (localBasePaths.length > 0) { + basePath = localBasePaths[localHostIndex]; + } else { + basePath = null; + } + + Object localVarPostBody = createWebhookConfigurationRequest; + + // create path and map variables + String localVarPath = "/api/rest/2.0/webhooks/create"; + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + final String[] localVarAccepts = {"application/json"}; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = {"application/json"}; + final String localVarContentType = + localVarApiClient.selectHeaderContentType(localVarContentTypes); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } + + String[] localVarAuthNames = new String[] {"bearerAuth"}; + return localVarApiClient.buildCall( + basePath, + localVarPath, + "POST", + localVarQueryParams, + localVarCollectionQueryParams, + localVarPostBody, + localVarHeaderParams, + localVarCookieParams, + localVarFormParams, + localVarAuthNames, + _callback); + } + + @SuppressWarnings("rawtypes") + private okhttp3.Call createWebhookConfigurationValidateBeforeCall( + CreateWebhookConfigurationRequest createWebhookConfigurationRequest, + final ApiCallback _callback) + throws ApiException { + // verify the required parameter 'createWebhookConfigurationRequest' is set + if (createWebhookConfigurationRequest == null) { + throw new ApiException( + "Missing the required parameter 'createWebhookConfigurationRequest' when" + + " calling createWebhookConfiguration(Async)"); + } + + return createWebhookConfigurationCall(createWebhookConfigurationRequest, _callback); + } + + /** + * Version: 10.14.0.cl or later Creates a new webhook configuration to receive notifications for + * specified events. The webhook will be triggered when the configured events occur in the + * system. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) or + * `DEVELOPER` (**Has developer privilege**) privilege. If [Role-Based Access Control + * (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, users with + * `CAN_MANAGE_WEBHOOKS` (**Can manage webhooks**) privilege are also authorized to + * perform this action. + * + * @param createWebhookConfigurationRequest (required) + * @return WebhookResponse + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the + * response body + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 Webhook configuration created successfully -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public WebhookResponse createWebhookConfiguration( + CreateWebhookConfigurationRequest createWebhookConfigurationRequest) + throws ApiException { + ApiResponse localVarResp = + createWebhookConfigurationWithHttpInfo(createWebhookConfigurationRequest); + return localVarResp.getData(); + } + + /** + * Version: 10.14.0.cl or later Creates a new webhook configuration to receive notifications for + * specified events. The webhook will be triggered when the configured events occur in the + * system. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) or + * `DEVELOPER` (**Has developer privilege**) privilege. If [Role-Based Access Control + * (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, users with + * `CAN_MANAGE_WEBHOOKS` (**Can manage webhooks**) privilege are also authorized to + * perform this action. + * + * @param createWebhookConfigurationRequest (required) + * @return ApiResponse<WebhookResponse> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the + * response body + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 Webhook configuration created successfully -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public ApiResponse createWebhookConfigurationWithHttpInfo( + CreateWebhookConfigurationRequest createWebhookConfigurationRequest) + throws ApiException { + okhttp3.Call localVarCall = + createWebhookConfigurationValidateBeforeCall( + createWebhookConfigurationRequest, null); + Type localVarReturnType = new TypeToken() {}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); + } + + /** + * (asynchronously) Version: 10.14.0.cl or later Creates a new webhook configuration to receive + * notifications for specified events. The webhook will be triggered when the configured events + * occur in the system. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) or + * `DEVELOPER` (**Has developer privilege**) privilege. If [Role-Based Access Control + * (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, users with + * `CAN_MANAGE_WEBHOOKS` (**Can manage webhooks**) privilege are also authorized to + * perform this action. + * + * @param createWebhookConfigurationRequest (required) + * @param _callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body + * object + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 Webhook configuration created successfully -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public okhttp3.Call createWebhookConfigurationAsync( + CreateWebhookConfigurationRequest createWebhookConfigurationRequest, + final ApiCallback _callback) + throws ApiException { + + okhttp3.Call localVarCall = + createWebhookConfigurationValidateBeforeCall( + createWebhookConfigurationRequest, _callback); + Type localVarReturnType = new TypeToken() {}.getType(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; + } + /** + * Build call for deleteWebhookConfigurations + * + * @param deleteWebhookConfigurationsRequest (required) + * @param _callback Callback for upload/download progress + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 Webhook configurations deleted successfully -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public okhttp3.Call deleteWebhookConfigurationsCall( + DeleteWebhookConfigurationsRequest deleteWebhookConfigurationsRequest, + final ApiCallback _callback) + throws ApiException { + String basePath = null; + // Operation Servers + String[] localBasePaths = new String[] {}; + + // Determine Base Path to Use + if (localCustomBaseUrl != null) { + basePath = localCustomBaseUrl; + } else if (localBasePaths.length > 0) { + basePath = localBasePaths[localHostIndex]; + } else { + basePath = null; + } + + Object localVarPostBody = deleteWebhookConfigurationsRequest; + + // create path and map variables + String localVarPath = "/api/rest/2.0/webhooks/delete"; + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + final String[] localVarAccepts = {"application/json"}; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = {"application/json"}; + final String localVarContentType = + localVarApiClient.selectHeaderContentType(localVarContentTypes); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } + + String[] localVarAuthNames = new String[] {"bearerAuth"}; + return localVarApiClient.buildCall( + basePath, + localVarPath, + "POST", + localVarQueryParams, + localVarCollectionQueryParams, + localVarPostBody, + localVarHeaderParams, + localVarCookieParams, + localVarFormParams, + localVarAuthNames, + _callback); + } + + @SuppressWarnings("rawtypes") + private okhttp3.Call deleteWebhookConfigurationsValidateBeforeCall( + DeleteWebhookConfigurationsRequest deleteWebhookConfigurationsRequest, + final ApiCallback _callback) + throws ApiException { + // verify the required parameter 'deleteWebhookConfigurationsRequest' is set + if (deleteWebhookConfigurationsRequest == null) { + throw new ApiException( + "Missing the required parameter 'deleteWebhookConfigurationsRequest' when" + + " calling deleteWebhookConfigurations(Async)"); + } + + return deleteWebhookConfigurationsCall(deleteWebhookConfigurationsRequest, _callback); + } + + /** + * Version: 10.14.0.cl or later Deletes one or more webhook configurations by their unique id or + * name. Returns status of each deletion operation, including successfully deleted webhooks and + * any failures with error details. Requires `ADMINISTRATION` (**Can administer + * ThoughtSpot**) or `DEVELOPER` (**Has developer privilege**) privilege. If + * [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled + * on your instance, users with `CAN_MANAGE_WEBHOOKS` (**Can manage webhooks**) + * privilege are also authorized to perform this action. + * + * @param deleteWebhookConfigurationsRequest (required) + * @return WebhookDeleteResponse + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the + * response body + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 Webhook configurations deleted successfully -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public WebhookDeleteResponse deleteWebhookConfigurations( + DeleteWebhookConfigurationsRequest deleteWebhookConfigurationsRequest) + throws ApiException { + ApiResponse localVarResp = + deleteWebhookConfigurationsWithHttpInfo(deleteWebhookConfigurationsRequest); + return localVarResp.getData(); + } + + /** + * Version: 10.14.0.cl or later Deletes one or more webhook configurations by their unique id or + * name. Returns status of each deletion operation, including successfully deleted webhooks and + * any failures with error details. Requires `ADMINISTRATION` (**Can administer + * ThoughtSpot**) or `DEVELOPER` (**Has developer privilege**) privilege. If + * [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled + * on your instance, users with `CAN_MANAGE_WEBHOOKS` (**Can manage webhooks**) + * privilege are also authorized to perform this action. + * + * @param deleteWebhookConfigurationsRequest (required) + * @return ApiResponse<WebhookDeleteResponse> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the + * response body + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 Webhook configurations deleted successfully -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public ApiResponse deleteWebhookConfigurationsWithHttpInfo( + DeleteWebhookConfigurationsRequest deleteWebhookConfigurationsRequest) + throws ApiException { + okhttp3.Call localVarCall = + deleteWebhookConfigurationsValidateBeforeCall( + deleteWebhookConfigurationsRequest, null); + Type localVarReturnType = new TypeToken() {}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); + } + + /** + * (asynchronously) Version: 10.14.0.cl or later Deletes one or more webhook configurations by + * their unique id or name. Returns status of each deletion operation, including successfully + * deleted webhooks and any failures with error details. Requires `ADMINISTRATION` + * (**Can administer ThoughtSpot**) or `DEVELOPER` (**Has developer privilege**) + * privilege. If [Role-Based Access Control + * (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, users with + * `CAN_MANAGE_WEBHOOKS` (**Can manage webhooks**) privilege are also authorized to + * perform this action. + * + * @param deleteWebhookConfigurationsRequest (required) + * @param _callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body + * object + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 Webhook configurations deleted successfully -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public okhttp3.Call deleteWebhookConfigurationsAsync( + DeleteWebhookConfigurationsRequest deleteWebhookConfigurationsRequest, + final ApiCallback _callback) + throws ApiException { + + okhttp3.Call localVarCall = + deleteWebhookConfigurationsValidateBeforeCall( + deleteWebhookConfigurationsRequest, _callback); + Type localVarReturnType = new TypeToken() {}.getType(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; + } + /** + * Build call for searchWebhookConfigurations + * + * @param searchWebhookConfigurationsRequest (required) + * @param _callback Callback for upload/download progress + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 Webhook configurations retrieved successfully -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public okhttp3.Call searchWebhookConfigurationsCall( + SearchWebhookConfigurationsRequest searchWebhookConfigurationsRequest, + final ApiCallback _callback) + throws ApiException { + String basePath = null; + // Operation Servers + String[] localBasePaths = new String[] {}; + + // Determine Base Path to Use + if (localCustomBaseUrl != null) { + basePath = localCustomBaseUrl; + } else if (localBasePaths.length > 0) { + basePath = localBasePaths[localHostIndex]; + } else { + basePath = null; + } + + Object localVarPostBody = searchWebhookConfigurationsRequest; + + // create path and map variables + String localVarPath = "/api/rest/2.0/webhooks/search"; + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + final String[] localVarAccepts = {"application/json"}; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = {"application/json"}; + final String localVarContentType = + localVarApiClient.selectHeaderContentType(localVarContentTypes); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } + + String[] localVarAuthNames = new String[] {"bearerAuth"}; + return localVarApiClient.buildCall( + basePath, + localVarPath, + "POST", + localVarQueryParams, + localVarCollectionQueryParams, + localVarPostBody, + localVarHeaderParams, + localVarCookieParams, + localVarFormParams, + localVarAuthNames, + _callback); + } + + @SuppressWarnings("rawtypes") + private okhttp3.Call searchWebhookConfigurationsValidateBeforeCall( + SearchWebhookConfigurationsRequest searchWebhookConfigurationsRequest, + final ApiCallback _callback) + throws ApiException { + // verify the required parameter 'searchWebhookConfigurationsRequest' is set + if (searchWebhookConfigurationsRequest == null) { + throw new ApiException( + "Missing the required parameter 'searchWebhookConfigurationsRequest' when" + + " calling searchWebhookConfigurations(Async)"); + } + + return searchWebhookConfigurationsCall(searchWebhookConfigurationsRequest, _callback); + } + + /** + * Version: 10.14.0.cl or later Searches for webhook configurations based on various criteria + * such as Org, webhook identifier, event type, with support for pagination and sorting. Returns + * matching webhook configurations with their complete details. Requires + * `ADMINISTRATION` (**Can administer ThoughtSpot**) or `DEVELOPER` (**Has + * developer privilege**) privilege. If [Role-Based Access Control + * (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, users with + * `CAN_MANAGE_WEBHOOKS` (**Can manage webhooks**) privilege are also authorized to + * perform this action. + * + * @param searchWebhookConfigurationsRequest (required) + * @return WebhookSearchResponse + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the + * response body + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 Webhook configurations retrieved successfully -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public WebhookSearchResponse searchWebhookConfigurations( + SearchWebhookConfigurationsRequest searchWebhookConfigurationsRequest) + throws ApiException { + ApiResponse localVarResp = + searchWebhookConfigurationsWithHttpInfo(searchWebhookConfigurationsRequest); + return localVarResp.getData(); + } + + /** + * Version: 10.14.0.cl or later Searches for webhook configurations based on various criteria + * such as Org, webhook identifier, event type, with support for pagination and sorting. Returns + * matching webhook configurations with their complete details. Requires + * `ADMINISTRATION` (**Can administer ThoughtSpot**) or `DEVELOPER` (**Has + * developer privilege**) privilege. If [Role-Based Access Control + * (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, users with + * `CAN_MANAGE_WEBHOOKS` (**Can manage webhooks**) privilege are also authorized to + * perform this action. + * + * @param searchWebhookConfigurationsRequest (required) + * @return ApiResponse<WebhookSearchResponse> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the + * response body + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 Webhook configurations retrieved successfully -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public ApiResponse searchWebhookConfigurationsWithHttpInfo( + SearchWebhookConfigurationsRequest searchWebhookConfigurationsRequest) + throws ApiException { + okhttp3.Call localVarCall = + searchWebhookConfigurationsValidateBeforeCall( + searchWebhookConfigurationsRequest, null); + Type localVarReturnType = new TypeToken() {}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); + } + + /** + * (asynchronously) Version: 10.14.0.cl or later Searches for webhook configurations based on + * various criteria such as Org, webhook identifier, event type, with support for pagination and + * sorting. Returns matching webhook configurations with their complete details. Requires + * `ADMINISTRATION` (**Can administer ThoughtSpot**) or `DEVELOPER` (**Has + * developer privilege**) privilege. If [Role-Based Access Control + * (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, users with + * `CAN_MANAGE_WEBHOOKS` (**Can manage webhooks**) privilege are also authorized to + * perform this action. + * + * @param searchWebhookConfigurationsRequest (required) + * @param _callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body + * object + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 Webhook configurations retrieved successfully -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public okhttp3.Call searchWebhookConfigurationsAsync( + SearchWebhookConfigurationsRequest searchWebhookConfigurationsRequest, + final ApiCallback _callback) + throws ApiException { + + okhttp3.Call localVarCall = + searchWebhookConfigurationsValidateBeforeCall( + searchWebhookConfigurationsRequest, _callback); + Type localVarReturnType = new TypeToken() {}.getType(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; + } + /** + * Build call for updateWebhookConfiguration + * + * @param webhookIdentifier Unique ID or name of the webhook configuration. (required) + * @param updateWebhookConfigurationRequest (required) + * @param _callback Callback for upload/download progress + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
204 Webhook configuration updated successfully -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public okhttp3.Call updateWebhookConfigurationCall( + String webhookIdentifier, + UpdateWebhookConfigurationRequest updateWebhookConfigurationRequest, + final ApiCallback _callback) + throws ApiException { + String basePath = null; + // Operation Servers + String[] localBasePaths = new String[] {}; + + // Determine Base Path to Use + if (localCustomBaseUrl != null) { + basePath = localCustomBaseUrl; + } else if (localBasePaths.length > 0) { + basePath = localBasePaths[localHostIndex]; + } else { + basePath = null; + } + + Object localVarPostBody = updateWebhookConfigurationRequest; + + // create path and map variables + String localVarPath = + "/api/rest/2.0/webhooks/{webhook_identifier}/update" + .replace( + "{" + "webhook_identifier" + "}", + localVarApiClient.escapeString(webhookIdentifier.toString())); + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + final String[] localVarAccepts = {"application/json"}; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = {"application/json"}; + final String localVarContentType = + localVarApiClient.selectHeaderContentType(localVarContentTypes); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } + + String[] localVarAuthNames = new String[] {"bearerAuth"}; + return localVarApiClient.buildCall( + basePath, + localVarPath, + "POST", + localVarQueryParams, + localVarCollectionQueryParams, + localVarPostBody, + localVarHeaderParams, + localVarCookieParams, + localVarFormParams, + localVarAuthNames, + _callback); + } + + @SuppressWarnings("rawtypes") + private okhttp3.Call updateWebhookConfigurationValidateBeforeCall( + String webhookIdentifier, + UpdateWebhookConfigurationRequest updateWebhookConfigurationRequest, + final ApiCallback _callback) + throws ApiException { + // verify the required parameter 'webhookIdentifier' is set + if (webhookIdentifier == null) { + throw new ApiException( + "Missing the required parameter 'webhookIdentifier' when calling" + + " updateWebhookConfiguration(Async)"); + } + + // verify the required parameter 'updateWebhookConfigurationRequest' is set + if (updateWebhookConfigurationRequest == null) { + throw new ApiException( + "Missing the required parameter 'updateWebhookConfigurationRequest' when" + + " calling updateWebhookConfiguration(Async)"); + } + + return updateWebhookConfigurationCall( + webhookIdentifier, updateWebhookConfigurationRequest, _callback); + } + + /** + * Version: 10.14.0.cl or later Updates an existing webhook configuration by its unique id or + * name. Only the provided fields will be updated. Requires `ADMINISTRATION` (**Can + * administer ThoughtSpot**) or `DEVELOPER` (**Has developer privilege**) privilege. + * If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is + * enabled on your instance, users with `CAN_MANAGE_WEBHOOKS` (**Can manage + * webhooks**) privilege are also authorized to perform this action. + * + * @param webhookIdentifier Unique ID or name of the webhook configuration. (required) + * @param updateWebhookConfigurationRequest (required) + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the + * response body + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
204 Webhook configuration updated successfully -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public void updateWebhookConfiguration( + String webhookIdentifier, + UpdateWebhookConfigurationRequest updateWebhookConfigurationRequest) + throws ApiException { + updateWebhookConfigurationWithHttpInfo( + webhookIdentifier, updateWebhookConfigurationRequest); + } + + /** + * Version: 10.14.0.cl or later Updates an existing webhook configuration by its unique id or + * name. Only the provided fields will be updated. Requires `ADMINISTRATION` (**Can + * administer ThoughtSpot**) or `DEVELOPER` (**Has developer privilege**) privilege. + * If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is + * enabled on your instance, users with `CAN_MANAGE_WEBHOOKS` (**Can manage + * webhooks**) privilege are also authorized to perform this action. + * + * @param webhookIdentifier Unique ID or name of the webhook configuration. (required) + * @param updateWebhookConfigurationRequest (required) + * @return ApiResponse<Void> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the + * response body + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
204 Webhook configuration updated successfully -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public ApiResponse updateWebhookConfigurationWithHttpInfo( + String webhookIdentifier, + UpdateWebhookConfigurationRequest updateWebhookConfigurationRequest) + throws ApiException { + okhttp3.Call localVarCall = + updateWebhookConfigurationValidateBeforeCall( + webhookIdentifier, updateWebhookConfigurationRequest, null); + return localVarApiClient.execute(localVarCall); + } + + /** + * (asynchronously) Version: 10.14.0.cl or later Updates an existing webhook configuration by + * its unique id or name. Only the provided fields will be updated. Requires + * `ADMINISTRATION` (**Can administer ThoughtSpot**) or `DEVELOPER` (**Has + * developer privilege**) privilege. If [Role-Based Access Control + * (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, users with + * `CAN_MANAGE_WEBHOOKS` (**Can manage webhooks**) privilege are also authorized to + * perform this action. + * + * @param webhookIdentifier Unique ID or name of the webhook configuration. (required) + * @param updateWebhookConfigurationRequest (required) + * @param _callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body + * object + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
204 Webhook configuration updated successfully -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public okhttp3.Call updateWebhookConfigurationAsync( + String webhookIdentifier, + UpdateWebhookConfigurationRequest updateWebhookConfigurationRequest, + final ApiCallback _callback) + throws ApiException { + + okhttp3.Call localVarCall = + updateWebhookConfigurationValidateBeforeCall( + webhookIdentifier, updateWebhookConfigurationRequest, _callback); + localVarApiClient.executeAsync(localVarCall, _callback); + return localVarCall; + } +} diff --git a/sdks/java/src/main/java/com/thoughtspot/client/auth/ApiKeyAuth.java b/sdks/java/src/main/java/com/thoughtspot/client/auth/ApiKeyAuth.java new file mode 100644 index 000000000..f5d599545 --- /dev/null +++ b/sdks/java/src/main/java/com/thoughtspot/client/auth/ApiKeyAuth.java @@ -0,0 +1,78 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client.auth; + +import com.thoughtspot.client.ApiException; +import com.thoughtspot.client.Pair; +import java.net.URI; +import java.util.List; +import java.util.Map; + +@javax.annotation.Generated( + value = "org.openapitools.codegen.languages.JavaClientCodegen", + comments = "Generator version: 7.12.0") +public class ApiKeyAuth implements Authentication { + private final String location; + private final String paramName; + + private String apiKey; + private String apiKeyPrefix; + + public ApiKeyAuth(String location, String paramName) { + this.location = location; + this.paramName = paramName; + } + + public String getLocation() { + return location; + } + + public String getParamName() { + return paramName; + } + + public String getApiKey() { + return apiKey; + } + + public void setApiKey(String apiKey) { + this.apiKey = apiKey; + } + + public String getApiKeyPrefix() { + return apiKeyPrefix; + } + + public void setApiKeyPrefix(String apiKeyPrefix) { + this.apiKeyPrefix = apiKeyPrefix; + } + + @Override + public void applyToParams( + List queryParams, + Map headerParams, + Map cookieParams, + String payload, + String method, + URI uri) + throws ApiException { + if (apiKey == null) { + return; + } + String value; + if (apiKeyPrefix != null) { + value = apiKeyPrefix + " " + apiKey; + } else { + value = apiKey; + } + if ("query".equals(location)) { + queryParams.add(new Pair(paramName, value)); + } else if ("header".equals(location)) { + headerParams.put(paramName, value); + } else if ("cookie".equals(location)) { + cookieParams.put(paramName, value); + } + } +} diff --git a/sdks/java/src/main/java/com/thoughtspot/client/auth/Authentication.java b/sdks/java/src/main/java/com/thoughtspot/client/auth/Authentication.java new file mode 100644 index 000000000..f97a0258f --- /dev/null +++ b/sdks/java/src/main/java/com/thoughtspot/client/auth/Authentication.java @@ -0,0 +1,33 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client.auth; + +import com.thoughtspot.client.ApiException; +import com.thoughtspot.client.Pair; +import java.net.URI; +import java.util.List; +import java.util.Map; + +public interface Authentication { + /** + * Apply authentication settings to header and query params. + * + * @param queryParams List of query parameters + * @param headerParams Map of header parameters + * @param cookieParams Map of cookie parameters + * @param payload HTTP request body + * @param method HTTP method + * @param uri URI + * @throws ApiException if failed to update the parameters + */ + void applyToParams( + List queryParams, + Map headerParams, + Map cookieParams, + String payload, + String method, + URI uri) + throws ApiException; +} diff --git a/sdks/java/src/main/java/com/thoughtspot/client/auth/HttpBasicAuth.java b/sdks/java/src/main/java/com/thoughtspot/client/auth/HttpBasicAuth.java new file mode 100644 index 000000000..f65bcb1e4 --- /dev/null +++ b/sdks/java/src/main/java/com/thoughtspot/client/auth/HttpBasicAuth.java @@ -0,0 +1,51 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client.auth; + +import com.thoughtspot.client.ApiException; +import com.thoughtspot.client.Pair; +import java.net.URI; +import java.util.List; +import java.util.Map; +import okhttp3.Credentials; + +public class HttpBasicAuth implements Authentication { + private String username; + private String password; + + public String getUsername() { + return username; + } + + public void setUsername(String username) { + this.username = username; + } + + public String getPassword() { + return password; + } + + public void setPassword(String password) { + this.password = password; + } + + @Override + public void applyToParams( + List queryParams, + Map headerParams, + Map cookieParams, + String payload, + String method, + URI uri) + throws ApiException { + if (username == null && password == null) { + return; + } + headerParams.put( + "Authorization", + Credentials.basic( + username == null ? "" : username, password == null ? "" : password)); + } +} diff --git a/sdks/java/src/main/java/com/thoughtspot/client/auth/HttpBearerAuth.java b/sdks/java/src/main/java/com/thoughtspot/client/auth/HttpBearerAuth.java new file mode 100644 index 000000000..781b2e73a --- /dev/null +++ b/sdks/java/src/main/java/com/thoughtspot/client/auth/HttpBearerAuth.java @@ -0,0 +1,78 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client.auth; + +import com.thoughtspot.client.ApiException; +import com.thoughtspot.client.Pair; +import java.net.URI; +import java.util.List; +import java.util.Map; +import java.util.Optional; +import java.util.function.Supplier; + +@javax.annotation.Generated( + value = "org.openapitools.codegen.languages.JavaClientCodegen", + comments = "Generator version: 7.12.0") +public class HttpBearerAuth implements Authentication { + private final String scheme; + private Supplier tokenSupplier; + + public HttpBearerAuth(String scheme) { + this.scheme = scheme; + } + + /** + * Gets the token, which together with the scheme, will be sent as the value of the + * Authorization header. + * + * @return The bearer token + */ + public String getBearerToken() { + return tokenSupplier.get(); + } + + /** + * Sets the token, which together with the scheme, will be sent as the value of the + * Authorization header. + * + * @param bearerToken The bearer token to send in the Authorization header + */ + public void setBearerToken(String bearerToken) { + this.tokenSupplier = () -> bearerToken; + } + + /** + * Sets the supplier of tokens, which together with the scheme, will be sent as the value of the + * Authorization header. + * + * @param tokenSupplier The supplier of bearer tokens to send in the Authorization header + */ + public void setBearerToken(Supplier tokenSupplier) { + this.tokenSupplier = tokenSupplier; + } + + @Override + public void applyToParams( + List queryParams, + Map headerParams, + Map cookieParams, + String payload, + String method, + URI uri) + throws ApiException { + String bearerToken = Optional.ofNullable(tokenSupplier).map(Supplier::get).orElse(null); + if (bearerToken == null) { + return; + } + + headerParams.put( + "Authorization", + (scheme != null ? upperCaseBearer(scheme) + " " : "") + bearerToken); + } + + private static String upperCaseBearer(String scheme) { + return ("bearer".equalsIgnoreCase(scheme)) ? "Bearer" : scheme; + } +} diff --git a/sdks/java/src/main/java/com/thoughtspot/client/model/AIContext.java b/sdks/java/src/main/java/com/thoughtspot/client/model/AIContext.java new file mode 100644 index 000000000..cb802825f --- /dev/null +++ b/sdks/java/src/main/java/com/thoughtspot/client/model/AIContext.java @@ -0,0 +1,366 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client.model; + +import com.google.gson.Gson; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.TypeAdapter; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.annotations.SerializedName; +import com.google.gson.reflect.TypeToken; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import com.thoughtspot.client.JSON; +import java.io.IOException; +import java.io.Serializable; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Objects; +import org.openapitools.jackson.nullable.JsonNullable; + +/** AIContext */ +@javax.annotation.Generated( + value = "org.openapitools.codegen.languages.JavaClientCodegen", + comments = "Generator version: 7.12.0") +public class AIContext implements Serializable { + private static final long serialVersionUID = 1L; + + public static final String SERIALIZED_NAME_INSTRUCTIONS = "instructions"; + + @SerializedName(SERIALIZED_NAME_INSTRUCTIONS) + @javax.annotation.Nullable + private List instructions; + + public static final String SERIALIZED_NAME_CONTENT = "content"; + + @SerializedName(SERIALIZED_NAME_CONTENT) + @javax.annotation.Nullable + private List content; + + public AIContext() {} + + public AIContext instructions(@javax.annotation.Nullable List instructions) { + this.instructions = instructions; + return this; + } + + public AIContext addInstructionsItem(String instructionsItem) { + if (this.instructions == null) { + this.instructions = new ArrayList<>(); + } + this.instructions.add(instructionsItem); + return this; + } + + /** + * User specific text instructions sent to AI system for processing the query. + * + * @return instructions + */ + @javax.annotation.Nullable + public List getInstructions() { + return instructions; + } + + public void setInstructions(@javax.annotation.Nullable List instructions) { + this.instructions = instructions; + } + + public AIContext content(@javax.annotation.Nullable List content) { + this.content = content; + return this; + } + + public AIContext addContentItem(String contentItem) { + if (this.content == null) { + this.content = new ArrayList<>(); + } + this.content.add(contentItem); + return this; + } + + /** + * User provided content like text data, csv data as a string message to provide context & + * potentially improve the quality of the response. + * + * @return content + */ + @javax.annotation.Nullable + public List getContent() { + return content; + } + + public void setContent(@javax.annotation.Nullable List content) { + this.content = content; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key name of the property + * @param value value of the property + * @return the AIContext instance itself + */ + public AIContext putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return a map of objects + */ + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key name of the property + * @return an object + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + AIContext aiContext = (AIContext) o; + return Objects.equals(this.instructions, aiContext.instructions) + && Objects.equals(this.content, aiContext.content) + && Objects.equals(this.additionalProperties, aiContext.additionalProperties); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b + || (a != null + && b != null + && a.isPresent() + && b.isPresent() + && Objects.deepEquals(a.get(), b.get())); + } + + @Override + public int hashCode() { + return Objects.hash(instructions, content, additionalProperties); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; + } + return a.isPresent() ? Arrays.deepHashCode(new Object[] {a.get()}) : 31; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class AIContext {\n"); + sb.append(" instructions: ").append(toIndentedString(instructions)).append("\n"); + sb.append(" content: ").append(toIndentedString(content)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first + * line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("instructions"); + openapiFields.add("content"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to AIContext + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!AIContext.openapiRequiredFields + .isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException( + String.format( + "The required field(s) %s in AIContext is not found in the empty" + + " JSON string", + AIContext.openapiRequiredFields.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // ensure the optional json data is an array if present + if (jsonObj.get("instructions") != null + && !jsonObj.get("instructions").isJsonNull() + && !jsonObj.get("instructions").isJsonArray()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `instructions` to be an array in the JSON string" + + " but got `%s`", + jsonObj.get("instructions").toString())); + } + // ensure the optional json data is an array if present + if (jsonObj.get("content") != null + && !jsonObj.get("content").isJsonNull() + && !jsonObj.get("content").isJsonArray()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `content` to be an array in the JSON string but" + + " got `%s`", + jsonObj.get("content").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!AIContext.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'AIContext' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter = + gson.getDelegateAdapter(this, TypeToken.get(AIContext.class)); + + return (TypeAdapter) + new TypeAdapter() { + @Override + public void write(JsonWriter out, AIContext value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + obj.remove("additionalProperties"); + // serialize additional properties + if (value.getAdditionalProperties() != null) { + for (Map.Entry entry : + value.getAdditionalProperties().entrySet()) { + if (entry.getValue() instanceof String) + obj.addProperty(entry.getKey(), (String) entry.getValue()); + else if (entry.getValue() instanceof Number) + obj.addProperty(entry.getKey(), (Number) entry.getValue()); + else if (entry.getValue() instanceof Boolean) + obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); + else if (entry.getValue() instanceof Character) + obj.addProperty( + entry.getKey(), (Character) entry.getValue()); + else { + JsonElement jsonElement = gson.toJsonTree(entry.getValue()); + if (jsonElement.isJsonArray()) { + obj.add(entry.getKey(), jsonElement.getAsJsonArray()); + } else { + obj.add(entry.getKey(), jsonElement.getAsJsonObject()); + } + } + } + } + elementAdapter.write(out, obj); + } + + @Override + public AIContext read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // store additional fields in the deserialized instance + AIContext instance = thisAdapter.fromJsonTree(jsonObj); + for (Map.Entry entry : jsonObj.entrySet()) { + if (!openapiFields.contains(entry.getKey())) { + if (entry.getValue().isJsonPrimitive()) { // primitive type + if (entry.getValue().getAsJsonPrimitive().isString()) + instance.putAdditionalProperty( + entry.getKey(), entry.getValue().getAsString()); + else if (entry.getValue().getAsJsonPrimitive().isNumber()) + instance.putAdditionalProperty( + entry.getKey(), entry.getValue().getAsNumber()); + else if (entry.getValue().getAsJsonPrimitive().isBoolean()) + instance.putAdditionalProperty( + entry.getKey(), + entry.getValue().getAsBoolean()); + else + throw new IllegalArgumentException( + String.format( + "The field `%s` has unknown primitive" + + " type. Value: %s", + entry.getKey(), + entry.getValue().toString())); + } else if (entry.getValue().isJsonArray()) { + instance.putAdditionalProperty( + entry.getKey(), + gson.fromJson(entry.getValue(), List.class)); + } else { // JSON object + instance.putAdditionalProperty( + entry.getKey(), + gson.fromJson(entry.getValue(), HashMap.class)); + } + } + } + return instance; + } + }.nullSafe(); + } + } + + /** + * Create an instance of AIContext given an JSON string + * + * @param jsonString JSON string + * @return An instance of AIContext + * @throws IOException if the JSON string is invalid with respect to AIContext + */ + public static AIContext fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, AIContext.class); + } + + /** + * Convert an instance of AIContext to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} diff --git a/sdks/java/src/main/java/com/thoughtspot/client/model/APIKey.java b/sdks/java/src/main/java/com/thoughtspot/client/model/APIKey.java new file mode 100644 index 000000000..7deff2d26 --- /dev/null +++ b/sdks/java/src/main/java/com/thoughtspot/client/model/APIKey.java @@ -0,0 +1,347 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client.model; + +import com.google.gson.Gson; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.TypeAdapter; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.annotations.SerializedName; +import com.google.gson.reflect.TypeToken; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import com.thoughtspot.client.JSON; +import java.io.IOException; +import java.io.Serializable; +import java.util.Arrays; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Objects; +import org.openapitools.jackson.nullable.JsonNullable; + +/** + * With API key auth, you send a key-value pair to the API either in the request headers or query + * parameters. + */ +@javax.annotation.Generated( + value = "org.openapitools.codegen.languages.JavaClientCodegen", + comments = "Generator version: 7.12.0") +public class APIKey implements Serializable { + private static final long serialVersionUID = 1L; + + public static final String SERIALIZED_NAME_KEY = "key"; + + @SerializedName(SERIALIZED_NAME_KEY) + @javax.annotation.Nullable + private String key; + + public static final String SERIALIZED_NAME_VALUE = "value"; + + @SerializedName(SERIALIZED_NAME_VALUE) + @javax.annotation.Nullable + private String value; + + public APIKey() {} + + public APIKey key(@javax.annotation.Nullable String key) { + this.key = key; + return this; + } + + /** + * Enter your key name + * + * @return key + */ + @javax.annotation.Nullable + public String getKey() { + return key; + } + + public void setKey(@javax.annotation.Nullable String key) { + this.key = key; + } + + public APIKey value(@javax.annotation.Nullable String value) { + this.value = value; + return this; + } + + /** + * Enter you key value + * + * @return value + */ + @javax.annotation.Nullable + public String getValue() { + return value; + } + + public void setValue(@javax.annotation.Nullable String value) { + this.value = value; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key name of the property + * @param value value of the property + * @return the APIKey instance itself + */ + public APIKey putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return a map of objects + */ + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key name of the property + * @return an object + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + APIKey apIKey = (APIKey) o; + return Objects.equals(this.key, apIKey.key) + && Objects.equals(this.value, apIKey.value) + && Objects.equals(this.additionalProperties, apIKey.additionalProperties); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b + || (a != null + && b != null + && a.isPresent() + && b.isPresent() + && Objects.deepEquals(a.get(), b.get())); + } + + @Override + public int hashCode() { + return Objects.hash(key, value, additionalProperties); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; + } + return a.isPresent() ? Arrays.deepHashCode(new Object[] {a.get()}) : 31; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class APIKey {\n"); + sb.append(" key: ").append(toIndentedString(key)).append("\n"); + sb.append(" value: ").append(toIndentedString(value)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first + * line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("key"); + openapiFields.add("value"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to APIKey + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!APIKey.openapiRequiredFields + .isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException( + String.format( + "The required field(s) %s in APIKey is not found in the empty JSON" + + " string", + APIKey.openapiRequiredFields.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if ((jsonObj.get("key") != null && !jsonObj.get("key").isJsonNull()) + && !jsonObj.get("key").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `key` to be a primitive type in the JSON string" + + " but got `%s`", + jsonObj.get("key").toString())); + } + if ((jsonObj.get("value") != null && !jsonObj.get("value").isJsonNull()) + && !jsonObj.get("value").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `value` to be a primitive type in the JSON string" + + " but got `%s`", + jsonObj.get("value").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!APIKey.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'APIKey' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter = + gson.getDelegateAdapter(this, TypeToken.get(APIKey.class)); + + return (TypeAdapter) + new TypeAdapter() { + @Override + public void write(JsonWriter out, APIKey value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + obj.remove("additionalProperties"); + // serialize additional properties + if (value.getAdditionalProperties() != null) { + for (Map.Entry entry : + value.getAdditionalProperties().entrySet()) { + if (entry.getValue() instanceof String) + obj.addProperty(entry.getKey(), (String) entry.getValue()); + else if (entry.getValue() instanceof Number) + obj.addProperty(entry.getKey(), (Number) entry.getValue()); + else if (entry.getValue() instanceof Boolean) + obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); + else if (entry.getValue() instanceof Character) + obj.addProperty( + entry.getKey(), (Character) entry.getValue()); + else { + JsonElement jsonElement = gson.toJsonTree(entry.getValue()); + if (jsonElement.isJsonArray()) { + obj.add(entry.getKey(), jsonElement.getAsJsonArray()); + } else { + obj.add(entry.getKey(), jsonElement.getAsJsonObject()); + } + } + } + } + elementAdapter.write(out, obj); + } + + @Override + public APIKey read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // store additional fields in the deserialized instance + APIKey instance = thisAdapter.fromJsonTree(jsonObj); + for (Map.Entry entry : jsonObj.entrySet()) { + if (!openapiFields.contains(entry.getKey())) { + if (entry.getValue().isJsonPrimitive()) { // primitive type + if (entry.getValue().getAsJsonPrimitive().isString()) + instance.putAdditionalProperty( + entry.getKey(), entry.getValue().getAsString()); + else if (entry.getValue().getAsJsonPrimitive().isNumber()) + instance.putAdditionalProperty( + entry.getKey(), entry.getValue().getAsNumber()); + else if (entry.getValue().getAsJsonPrimitive().isBoolean()) + instance.putAdditionalProperty( + entry.getKey(), + entry.getValue().getAsBoolean()); + else + throw new IllegalArgumentException( + String.format( + "The field `%s` has unknown primitive" + + " type. Value: %s", + entry.getKey(), + entry.getValue().toString())); + } else if (entry.getValue().isJsonArray()) { + instance.putAdditionalProperty( + entry.getKey(), + gson.fromJson(entry.getValue(), List.class)); + } else { // JSON object + instance.putAdditionalProperty( + entry.getKey(), + gson.fromJson(entry.getValue(), HashMap.class)); + } + } + } + return instance; + } + }.nullSafe(); + } + } + + /** + * Create an instance of APIKey given an JSON string + * + * @param jsonString JSON string + * @return An instance of APIKey + * @throws IOException if the JSON string is invalid with respect to APIKey + */ + public static APIKey fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, APIKey.class); + } + + /** + * Convert an instance of APIKey to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} diff --git a/sdks/java/src/main/java/com/thoughtspot/client/model/APIKeyInput.java b/sdks/java/src/main/java/com/thoughtspot/client/model/APIKeyInput.java new file mode 100644 index 000000000..62b3a32bd --- /dev/null +++ b/sdks/java/src/main/java/com/thoughtspot/client/model/APIKeyInput.java @@ -0,0 +1,347 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client.model; + +import com.google.gson.Gson; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.TypeAdapter; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.annotations.SerializedName; +import com.google.gson.reflect.TypeToken; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import com.thoughtspot.client.JSON; +import java.io.IOException; +import java.io.Serializable; +import java.util.Arrays; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Objects; +import org.openapitools.jackson.nullable.JsonNullable; + +/** + * With API key auth, you send a key-value pair to the API either in the request headers or query + * parameters. + */ +@javax.annotation.Generated( + value = "org.openapitools.codegen.languages.JavaClientCodegen", + comments = "Generator version: 7.12.0") +public class APIKeyInput implements Serializable { + private static final long serialVersionUID = 1L; + + public static final String SERIALIZED_NAME_KEY = "key"; + + @SerializedName(SERIALIZED_NAME_KEY) + @javax.annotation.Nullable + private String key; + + public static final String SERIALIZED_NAME_VALUE = "value"; + + @SerializedName(SERIALIZED_NAME_VALUE) + @javax.annotation.Nullable + private String value; + + public APIKeyInput() {} + + public APIKeyInput key(@javax.annotation.Nullable String key) { + this.key = key; + return this; + } + + /** + * Enter your key name + * + * @return key + */ + @javax.annotation.Nullable + public String getKey() { + return key; + } + + public void setKey(@javax.annotation.Nullable String key) { + this.key = key; + } + + public APIKeyInput value(@javax.annotation.Nullable String value) { + this.value = value; + return this; + } + + /** + * Enter you key value + * + * @return value + */ + @javax.annotation.Nullable + public String getValue() { + return value; + } + + public void setValue(@javax.annotation.Nullable String value) { + this.value = value; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key name of the property + * @param value value of the property + * @return the APIKeyInput instance itself + */ + public APIKeyInput putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return a map of objects + */ + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key name of the property + * @return an object + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + APIKeyInput apIKeyInput = (APIKeyInput) o; + return Objects.equals(this.key, apIKeyInput.key) + && Objects.equals(this.value, apIKeyInput.value) + && Objects.equals(this.additionalProperties, apIKeyInput.additionalProperties); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b + || (a != null + && b != null + && a.isPresent() + && b.isPresent() + && Objects.deepEquals(a.get(), b.get())); + } + + @Override + public int hashCode() { + return Objects.hash(key, value, additionalProperties); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; + } + return a.isPresent() ? Arrays.deepHashCode(new Object[] {a.get()}) : 31; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class APIKeyInput {\n"); + sb.append(" key: ").append(toIndentedString(key)).append("\n"); + sb.append(" value: ").append(toIndentedString(value)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first + * line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("key"); + openapiFields.add("value"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to APIKeyInput + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!APIKeyInput.openapiRequiredFields + .isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException( + String.format( + "The required field(s) %s in APIKeyInput is not found in the empty" + + " JSON string", + APIKeyInput.openapiRequiredFields.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if ((jsonObj.get("key") != null && !jsonObj.get("key").isJsonNull()) + && !jsonObj.get("key").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `key` to be a primitive type in the JSON string" + + " but got `%s`", + jsonObj.get("key").toString())); + } + if ((jsonObj.get("value") != null && !jsonObj.get("value").isJsonNull()) + && !jsonObj.get("value").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `value` to be a primitive type in the JSON string" + + " but got `%s`", + jsonObj.get("value").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!APIKeyInput.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'APIKeyInput' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter = + gson.getDelegateAdapter(this, TypeToken.get(APIKeyInput.class)); + + return (TypeAdapter) + new TypeAdapter() { + @Override + public void write(JsonWriter out, APIKeyInput value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + obj.remove("additionalProperties"); + // serialize additional properties + if (value.getAdditionalProperties() != null) { + for (Map.Entry entry : + value.getAdditionalProperties().entrySet()) { + if (entry.getValue() instanceof String) + obj.addProperty(entry.getKey(), (String) entry.getValue()); + else if (entry.getValue() instanceof Number) + obj.addProperty(entry.getKey(), (Number) entry.getValue()); + else if (entry.getValue() instanceof Boolean) + obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); + else if (entry.getValue() instanceof Character) + obj.addProperty( + entry.getKey(), (Character) entry.getValue()); + else { + JsonElement jsonElement = gson.toJsonTree(entry.getValue()); + if (jsonElement.isJsonArray()) { + obj.add(entry.getKey(), jsonElement.getAsJsonArray()); + } else { + obj.add(entry.getKey(), jsonElement.getAsJsonObject()); + } + } + } + } + elementAdapter.write(out, obj); + } + + @Override + public APIKeyInput read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // store additional fields in the deserialized instance + APIKeyInput instance = thisAdapter.fromJsonTree(jsonObj); + for (Map.Entry entry : jsonObj.entrySet()) { + if (!openapiFields.contains(entry.getKey())) { + if (entry.getValue().isJsonPrimitive()) { // primitive type + if (entry.getValue().getAsJsonPrimitive().isString()) + instance.putAdditionalProperty( + entry.getKey(), entry.getValue().getAsString()); + else if (entry.getValue().getAsJsonPrimitive().isNumber()) + instance.putAdditionalProperty( + entry.getKey(), entry.getValue().getAsNumber()); + else if (entry.getValue().getAsJsonPrimitive().isBoolean()) + instance.putAdditionalProperty( + entry.getKey(), + entry.getValue().getAsBoolean()); + else + throw new IllegalArgumentException( + String.format( + "The field `%s` has unknown primitive" + + " type. Value: %s", + entry.getKey(), + entry.getValue().toString())); + } else if (entry.getValue().isJsonArray()) { + instance.putAdditionalProperty( + entry.getKey(), + gson.fromJson(entry.getValue(), List.class)); + } else { // JSON object + instance.putAdditionalProperty( + entry.getKey(), + gson.fromJson(entry.getValue(), HashMap.class)); + } + } + } + return instance; + } + }.nullSafe(); + } + } + + /** + * Create an instance of APIKeyInput given an JSON string + * + * @param jsonString JSON string + * @return An instance of APIKeyInput + * @throws IOException if the JSON string is invalid with respect to APIKeyInput + */ + public static APIKeyInput fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, APIKeyInput.class); + } + + /** + * Convert an instance of APIKeyInput to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} diff --git a/sdks/java/src/main/java/com/thoughtspot/client/model/AbstractOpenApiSchema.java b/sdks/java/src/main/java/com/thoughtspot/client/model/AbstractOpenApiSchema.java new file mode 100644 index 000000000..48124a58f --- /dev/null +++ b/sdks/java/src/main/java/com/thoughtspot/client/model/AbstractOpenApiSchema.java @@ -0,0 +1,137 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client.model; + +import java.util.Map; +import java.util.Objects; + +/** Abstract class for oneOf,anyOf schemas defined in OpenAPI spec */ +@javax.annotation.Generated( + value = "org.openapitools.codegen.languages.JavaClientCodegen", + comments = "Generator version: 7.12.0") +public abstract class AbstractOpenApiSchema { + + // store the actual instance of the schema/object + private Object instance; + + // is nullable + private Boolean isNullable; + + // schema type (e.g. oneOf, anyOf) + private final String schemaType; + + public AbstractOpenApiSchema(String schemaType, Boolean isNullable) { + this.schemaType = schemaType; + this.isNullable = isNullable; + } + + /** + * Get the list of oneOf/anyOf composed schemas allowed to be stored in this object + * + * @return an instance of the actual schema/object + */ + public abstract Map> getSchemas(); + + /** + * Get the actual instance + * + * @return an instance of the actual schema/object + */ + // @JsonValue + public Object getActualInstance() { + return instance; + } + + /** + * Set the actual instance + * + * @param instance the actual instance of the schema/object + */ + public void setActualInstance(Object instance) { + this.instance = instance; + } + + /** + * Get the instant recursively when the schemas defined in oneOf/anyof happen to be oneOf/anyOf + * schema as well + * + * @return an instance of the actual schema/object + */ + public Object getActualInstanceRecursively() { + return getActualInstanceRecursively(this); + } + + private Object getActualInstanceRecursively(AbstractOpenApiSchema object) { + if (object.getActualInstance() == null) { + return null; + } else if (object.getActualInstance() instanceof AbstractOpenApiSchema) { + return getActualInstanceRecursively((AbstractOpenApiSchema) object.getActualInstance()); + } else { + return object.getActualInstance(); + } + } + + /** + * Get the schema type (e.g. anyOf, oneOf) + * + * @return the schema type + */ + public String getSchemaType() { + return schemaType; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ").append(getClass()).append(" {\n"); + sb.append(" instance: ").append(toIndentedString(instance)).append("\n"); + sb.append(" isNullable: ").append(toIndentedString(isNullable)).append("\n"); + sb.append(" schemaType: ").append(toIndentedString(schemaType)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first + * line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + AbstractOpenApiSchema a = (AbstractOpenApiSchema) o; + return Objects.equals(this.instance, a.instance) + && Objects.equals(this.isNullable, a.isNullable) + && Objects.equals(this.schemaType, a.schemaType); + } + + @Override + public int hashCode() { + return Objects.hash(instance, isNullable, schemaType); + } + + /** + * Is nullable + * + * @return true if it's nullable + */ + public Boolean isNullable() { + if (Boolean.TRUE.equals(isNullable)) { + return Boolean.TRUE; + } else { + return Boolean.FALSE; + } + } +} diff --git a/sdks/java/src/main/java/com/thoughtspot/client/model/AccessToken.java b/sdks/java/src/main/java/com/thoughtspot/client/model/AccessToken.java new file mode 100644 index 000000000..2b5600f24 --- /dev/null +++ b/sdks/java/src/main/java/com/thoughtspot/client/model/AccessToken.java @@ -0,0 +1,487 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client.model; + +import com.google.gson.Gson; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.TypeAdapter; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.annotations.SerializedName; +import com.google.gson.reflect.TypeToken; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import com.thoughtspot.client.JSON; +import java.io.IOException; +import java.io.Serializable; +import java.util.Arrays; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Objects; +import org.openapitools.jackson.nullable.JsonNullable; + +/** AccessToken */ +@javax.annotation.Generated( + value = "org.openapitools.codegen.languages.JavaClientCodegen", + comments = "Generator version: 7.12.0") +public class AccessToken implements Serializable { + private static final long serialVersionUID = 1L; + + public static final String SERIALIZED_NAME_ID = "id"; + + @SerializedName(SERIALIZED_NAME_ID) + @javax.annotation.Nullable + private String id; + + public static final String SERIALIZED_NAME_TOKEN = "token"; + + @SerializedName(SERIALIZED_NAME_TOKEN) + @javax.annotation.Nonnull + private String token; + + public static final String SERIALIZED_NAME_ORG = "org"; + + @SerializedName(SERIALIZED_NAME_ORG) + @javax.annotation.Nonnull + private OrgInfo org; + + public static final String SERIALIZED_NAME_USER = "user"; + + @SerializedName(SERIALIZED_NAME_USER) + @javax.annotation.Nonnull + private UserInfo user; + + public static final String SERIALIZED_NAME_CREATION_TIME_IN_MILLIS = "creation_time_in_millis"; + + @SerializedName(SERIALIZED_NAME_CREATION_TIME_IN_MILLIS) + @javax.annotation.Nonnull + private Float creationTimeInMillis; + + public static final String SERIALIZED_NAME_EXPIRATION_TIME_IN_MILLIS = + "expiration_time_in_millis"; + + @SerializedName(SERIALIZED_NAME_EXPIRATION_TIME_IN_MILLIS) + @javax.annotation.Nonnull + private Float expirationTimeInMillis; + + public AccessToken() {} + + public AccessToken id(@javax.annotation.Nullable String id) { + this.id = id; + return this; + } + + /** + * GUID of the auth token. + * + * @return id + */ + @javax.annotation.Nullable + public String getId() { + return id; + } + + public void setId(@javax.annotation.Nullable String id) { + this.id = id; + } + + public AccessToken token(@javax.annotation.Nonnull String token) { + this.token = token; + return this; + } + + /** + * Bearer auth token. + * + * @return token + */ + @javax.annotation.Nonnull + public String getToken() { + return token; + } + + public void setToken(@javax.annotation.Nonnull String token) { + this.token = token; + } + + public AccessToken org(@javax.annotation.Nonnull OrgInfo org) { + this.org = org; + return this; + } + + /** + * Get org + * + * @return org + */ + @javax.annotation.Nonnull + public OrgInfo getOrg() { + return org; + } + + public void setOrg(@javax.annotation.Nonnull OrgInfo org) { + this.org = org; + } + + public AccessToken user(@javax.annotation.Nonnull UserInfo user) { + this.user = user; + return this; + } + + /** + * Get user + * + * @return user + */ + @javax.annotation.Nonnull + public UserInfo getUser() { + return user; + } + + public void setUser(@javax.annotation.Nonnull UserInfo user) { + this.user = user; + } + + public AccessToken creationTimeInMillis(@javax.annotation.Nonnull Float creationTimeInMillis) { + this.creationTimeInMillis = creationTimeInMillis; + return this; + } + + /** + * Token creation time in milliseconds. + * + * @return creationTimeInMillis + */ + @javax.annotation.Nonnull + public Float getCreationTimeInMillis() { + return creationTimeInMillis; + } + + public void setCreationTimeInMillis(@javax.annotation.Nonnull Float creationTimeInMillis) { + this.creationTimeInMillis = creationTimeInMillis; + } + + public AccessToken expirationTimeInMillis( + @javax.annotation.Nonnull Float expirationTimeInMillis) { + this.expirationTimeInMillis = expirationTimeInMillis; + return this; + } + + /** + * Token expiration time in milliseconds. + * + * @return expirationTimeInMillis + */ + @javax.annotation.Nonnull + public Float getExpirationTimeInMillis() { + return expirationTimeInMillis; + } + + public void setExpirationTimeInMillis(@javax.annotation.Nonnull Float expirationTimeInMillis) { + this.expirationTimeInMillis = expirationTimeInMillis; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key name of the property + * @param value value of the property + * @return the AccessToken instance itself + */ + public AccessToken putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return a map of objects + */ + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key name of the property + * @return an object + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + AccessToken accessToken = (AccessToken) o; + return Objects.equals(this.id, accessToken.id) + && Objects.equals(this.token, accessToken.token) + && Objects.equals(this.org, accessToken.org) + && Objects.equals(this.user, accessToken.user) + && Objects.equals(this.creationTimeInMillis, accessToken.creationTimeInMillis) + && Objects.equals(this.expirationTimeInMillis, accessToken.expirationTimeInMillis) + && Objects.equals(this.additionalProperties, accessToken.additionalProperties); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b + || (a != null + && b != null + && a.isPresent() + && b.isPresent() + && Objects.deepEquals(a.get(), b.get())); + } + + @Override + public int hashCode() { + return Objects.hash( + id, + token, + org, + user, + creationTimeInMillis, + expirationTimeInMillis, + additionalProperties); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; + } + return a.isPresent() ? Arrays.deepHashCode(new Object[] {a.get()}) : 31; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class AccessToken {\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" token: ").append(toIndentedString(token)).append("\n"); + sb.append(" org: ").append(toIndentedString(org)).append("\n"); + sb.append(" user: ").append(toIndentedString(user)).append("\n"); + sb.append(" creationTimeInMillis: ") + .append(toIndentedString(creationTimeInMillis)) + .append("\n"); + sb.append(" expirationTimeInMillis: ") + .append(toIndentedString(expirationTimeInMillis)) + .append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first + * line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("id"); + openapiFields.add("token"); + openapiFields.add("org"); + openapiFields.add("user"); + openapiFields.add("creation_time_in_millis"); + openapiFields.add("expiration_time_in_millis"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + openapiRequiredFields.add("token"); + openapiRequiredFields.add("org"); + openapiRequiredFields.add("user"); + openapiRequiredFields.add("creation_time_in_millis"); + openapiRequiredFields.add("expiration_time_in_millis"); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to AccessToken + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!AccessToken.openapiRequiredFields + .isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException( + String.format( + "The required field(s) %s in AccessToken is not found in the empty" + + " JSON string", + AccessToken.openapiRequiredFields.toString())); + } + } + + // check to make sure all required properties/fields are present in the JSON string + for (String requiredField : AccessToken.openapiRequiredFields) { + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException( + String.format( + "The required field `%s` is not found in the JSON string: %s", + requiredField, jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if ((jsonObj.get("id") != null && !jsonObj.get("id").isJsonNull()) + && !jsonObj.get("id").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `id` to be a primitive type in the JSON string but" + + " got `%s`", + jsonObj.get("id").toString())); + } + if (!jsonObj.get("token").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `token` to be a primitive type in the JSON string" + + " but got `%s`", + jsonObj.get("token").toString())); + } + // validate the required field `org` + OrgInfo.validateJsonElement(jsonObj.get("org")); + // validate the required field `user` + UserInfo.validateJsonElement(jsonObj.get("user")); + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!AccessToken.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'AccessToken' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter = + gson.getDelegateAdapter(this, TypeToken.get(AccessToken.class)); + + return (TypeAdapter) + new TypeAdapter() { + @Override + public void write(JsonWriter out, AccessToken value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + obj.remove("additionalProperties"); + // serialize additional properties + if (value.getAdditionalProperties() != null) { + for (Map.Entry entry : + value.getAdditionalProperties().entrySet()) { + if (entry.getValue() instanceof String) + obj.addProperty(entry.getKey(), (String) entry.getValue()); + else if (entry.getValue() instanceof Number) + obj.addProperty(entry.getKey(), (Number) entry.getValue()); + else if (entry.getValue() instanceof Boolean) + obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); + else if (entry.getValue() instanceof Character) + obj.addProperty( + entry.getKey(), (Character) entry.getValue()); + else { + JsonElement jsonElement = gson.toJsonTree(entry.getValue()); + if (jsonElement.isJsonArray()) { + obj.add(entry.getKey(), jsonElement.getAsJsonArray()); + } else { + obj.add(entry.getKey(), jsonElement.getAsJsonObject()); + } + } + } + } + elementAdapter.write(out, obj); + } + + @Override + public AccessToken read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // store additional fields in the deserialized instance + AccessToken instance = thisAdapter.fromJsonTree(jsonObj); + for (Map.Entry entry : jsonObj.entrySet()) { + if (!openapiFields.contains(entry.getKey())) { + if (entry.getValue().isJsonPrimitive()) { // primitive type + if (entry.getValue().getAsJsonPrimitive().isString()) + instance.putAdditionalProperty( + entry.getKey(), entry.getValue().getAsString()); + else if (entry.getValue().getAsJsonPrimitive().isNumber()) + instance.putAdditionalProperty( + entry.getKey(), entry.getValue().getAsNumber()); + else if (entry.getValue().getAsJsonPrimitive().isBoolean()) + instance.putAdditionalProperty( + entry.getKey(), + entry.getValue().getAsBoolean()); + else + throw new IllegalArgumentException( + String.format( + "The field `%s` has unknown primitive" + + " type. Value: %s", + entry.getKey(), + entry.getValue().toString())); + } else if (entry.getValue().isJsonArray()) { + instance.putAdditionalProperty( + entry.getKey(), + gson.fromJson(entry.getValue(), List.class)); + } else { // JSON object + instance.putAdditionalProperty( + entry.getKey(), + gson.fromJson(entry.getValue(), HashMap.class)); + } + } + } + return instance; + } + }.nullSafe(); + } + } + + /** + * Create an instance of AccessToken given an JSON string + * + * @param jsonString JSON string + * @return An instance of AccessToken + * @throws IOException if the JSON string is invalid with respect to AccessToken + */ + public static AccessToken fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, AccessToken.class); + } + + /** + * Convert an instance of AccessToken to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} diff --git a/sdks/java/src/main/java/com/thoughtspot/client/model/ActionConfig.java b/sdks/java/src/main/java/com/thoughtspot/client/model/ActionConfig.java new file mode 100644 index 000000000..cbb77450c --- /dev/null +++ b/sdks/java/src/main/java/com/thoughtspot/client/model/ActionConfig.java @@ -0,0 +1,336 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client.model; + +import com.google.gson.Gson; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.TypeAdapter; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.annotations.SerializedName; +import com.google.gson.reflect.TypeToken; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import com.thoughtspot.client.JSON; +import java.io.IOException; +import java.io.Serializable; +import java.util.Arrays; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Objects; +import org.openapitools.jackson.nullable.JsonNullable; + +/** Specify that the association is enabled for the metadata object */ +@javax.annotation.Generated( + value = "org.openapitools.codegen.languages.JavaClientCodegen", + comments = "Generator version: 7.12.0") +public class ActionConfig implements Serializable { + private static final long serialVersionUID = 1L; + + public static final String SERIALIZED_NAME_POSITION = "position"; + + @SerializedName(SERIALIZED_NAME_POSITION) + @javax.annotation.Nullable + private String position; + + public static final String SERIALIZED_NAME_VISIBILITY = "visibility"; + + @SerializedName(SERIALIZED_NAME_VISIBILITY) + @javax.annotation.Nullable + private Boolean visibility; + + public ActionConfig() {} + + public ActionConfig position(@javax.annotation.Nullable String position) { + this.position = position; + return this; + } + + /** + * Position of the Custom action on the Metadata object. Earlier naming convention: context. + * + * @return position + */ + @javax.annotation.Nullable + public String getPosition() { + return position; + } + + public void setPosition(@javax.annotation.Nullable String position) { + this.position = position; + } + + public ActionConfig visibility(@javax.annotation.Nullable Boolean visibility) { + this.visibility = visibility; + return this; + } + + /** + * Visibility of the metadata association with custom action. Earlier naming convention: enabled + * + * @return visibility + */ + @javax.annotation.Nullable + public Boolean getVisibility() { + return visibility; + } + + public void setVisibility(@javax.annotation.Nullable Boolean visibility) { + this.visibility = visibility; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key name of the property + * @param value value of the property + * @return the ActionConfig instance itself + */ + public ActionConfig putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return a map of objects + */ + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key name of the property + * @return an object + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ActionConfig actionConfig = (ActionConfig) o; + return Objects.equals(this.position, actionConfig.position) + && Objects.equals(this.visibility, actionConfig.visibility) + && Objects.equals(this.additionalProperties, actionConfig.additionalProperties); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b + || (a != null + && b != null + && a.isPresent() + && b.isPresent() + && Objects.deepEquals(a.get(), b.get())); + } + + @Override + public int hashCode() { + return Objects.hash(position, visibility, additionalProperties); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; + } + return a.isPresent() ? Arrays.deepHashCode(new Object[] {a.get()}) : 31; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ActionConfig {\n"); + sb.append(" position: ").append(toIndentedString(position)).append("\n"); + sb.append(" visibility: ").append(toIndentedString(visibility)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first + * line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("position"); + openapiFields.add("visibility"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to ActionConfig + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!ActionConfig.openapiRequiredFields + .isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException( + String.format( + "The required field(s) %s in ActionConfig is not found in the" + + " empty JSON string", + ActionConfig.openapiRequiredFields.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if ((jsonObj.get("position") != null && !jsonObj.get("position").isJsonNull()) + && !jsonObj.get("position").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `position` to be a primitive type in the JSON" + + " string but got `%s`", + jsonObj.get("position").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!ActionConfig.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'ActionConfig' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter = + gson.getDelegateAdapter(this, TypeToken.get(ActionConfig.class)); + + return (TypeAdapter) + new TypeAdapter() { + @Override + public void write(JsonWriter out, ActionConfig value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + obj.remove("additionalProperties"); + // serialize additional properties + if (value.getAdditionalProperties() != null) { + for (Map.Entry entry : + value.getAdditionalProperties().entrySet()) { + if (entry.getValue() instanceof String) + obj.addProperty(entry.getKey(), (String) entry.getValue()); + else if (entry.getValue() instanceof Number) + obj.addProperty(entry.getKey(), (Number) entry.getValue()); + else if (entry.getValue() instanceof Boolean) + obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); + else if (entry.getValue() instanceof Character) + obj.addProperty( + entry.getKey(), (Character) entry.getValue()); + else { + JsonElement jsonElement = gson.toJsonTree(entry.getValue()); + if (jsonElement.isJsonArray()) { + obj.add(entry.getKey(), jsonElement.getAsJsonArray()); + } else { + obj.add(entry.getKey(), jsonElement.getAsJsonObject()); + } + } + } + } + elementAdapter.write(out, obj); + } + + @Override + public ActionConfig read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // store additional fields in the deserialized instance + ActionConfig instance = thisAdapter.fromJsonTree(jsonObj); + for (Map.Entry entry : jsonObj.entrySet()) { + if (!openapiFields.contains(entry.getKey())) { + if (entry.getValue().isJsonPrimitive()) { // primitive type + if (entry.getValue().getAsJsonPrimitive().isString()) + instance.putAdditionalProperty( + entry.getKey(), entry.getValue().getAsString()); + else if (entry.getValue().getAsJsonPrimitive().isNumber()) + instance.putAdditionalProperty( + entry.getKey(), entry.getValue().getAsNumber()); + else if (entry.getValue().getAsJsonPrimitive().isBoolean()) + instance.putAdditionalProperty( + entry.getKey(), + entry.getValue().getAsBoolean()); + else + throw new IllegalArgumentException( + String.format( + "The field `%s` has unknown primitive" + + " type. Value: %s", + entry.getKey(), + entry.getValue().toString())); + } else if (entry.getValue().isJsonArray()) { + instance.putAdditionalProperty( + entry.getKey(), + gson.fromJson(entry.getValue(), List.class)); + } else { // JSON object + instance.putAdditionalProperty( + entry.getKey(), + gson.fromJson(entry.getValue(), HashMap.class)); + } + } + } + return instance; + } + }.nullSafe(); + } + } + + /** + * Create an instance of ActionConfig given an JSON string + * + * @param jsonString JSON string + * @return An instance of ActionConfig + * @throws IOException if the JSON string is invalid with respect to ActionConfig + */ + public static ActionConfig fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, ActionConfig.class); + } + + /** + * Convert an instance of ActionConfig to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} diff --git a/sdks/java/src/main/java/com/thoughtspot/client/model/ActionConfigInput.java b/sdks/java/src/main/java/com/thoughtspot/client/model/ActionConfigInput.java new file mode 100644 index 000000000..d97aaf50d --- /dev/null +++ b/sdks/java/src/main/java/com/thoughtspot/client/model/ActionConfigInput.java @@ -0,0 +1,396 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client.model; + +import com.google.gson.Gson; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.TypeAdapter; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.reflect.TypeToken; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import com.thoughtspot.client.JSON; +import java.io.IOException; +import java.io.Serializable; +import java.util.Arrays; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Objects; +import org.openapitools.jackson.nullable.JsonNullable; + +/** Specify that the association is enabled for the metadata object Default */ +@javax.annotation.Generated( + value = "org.openapitools.codegen.languages.JavaClientCodegen", + comments = "Generator version: 7.12.0") +public class ActionConfigInput implements Serializable { + private static final long serialVersionUID = 1L; + + /** Position of the Custom action on the Metadata object. Earlier naming convention: context. */ + @JsonAdapter(PositionEnum.Adapter.class) + public enum PositionEnum { + MENU("MENU"), + + PRIMARY("PRIMARY"), + + CONTEXT_MENU("CONTEXT_MENU"); + + private String value; + + PositionEnum(String value) { + this.value = value; + } + + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + public static PositionEnum fromValue(String value) { + for (PositionEnum b : PositionEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + return null; + } + + public static class Adapter extends TypeAdapter { + @Override + public void write(final JsonWriter jsonWriter, final PositionEnum enumeration) + throws IOException { + jsonWriter.value(enumeration.getValue()); + } + + @Override + public PositionEnum read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + return PositionEnum.fromValue(value); + } + } + + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + String value = jsonElement.getAsString(); + PositionEnum.fromValue(value); + } + } + + public static final String SERIALIZED_NAME_POSITION = "position"; + + @SerializedName(SERIALIZED_NAME_POSITION) + @javax.annotation.Nullable + private PositionEnum position; + + public static final String SERIALIZED_NAME_VISIBILITY = "visibility"; + + @SerializedName(SERIALIZED_NAME_VISIBILITY) + @javax.annotation.Nullable + private Boolean visibility; + + public ActionConfigInput() {} + + public ActionConfigInput position(@javax.annotation.Nullable PositionEnum position) { + this.position = position; + return this; + } + + /** + * Position of the Custom action on the Metadata object. Earlier naming convention: context. + * + * @return position + */ + @javax.annotation.Nullable + public PositionEnum getPosition() { + return position; + } + + public void setPosition(@javax.annotation.Nullable PositionEnum position) { + this.position = position; + } + + public ActionConfigInput visibility(@javax.annotation.Nullable Boolean visibility) { + this.visibility = visibility; + return this; + } + + /** + * Visibility of the metadata association with custom action. Earlier naming convention: enabled + * + * @return visibility + */ + @javax.annotation.Nullable + public Boolean getVisibility() { + return visibility; + } + + public void setVisibility(@javax.annotation.Nullable Boolean visibility) { + this.visibility = visibility; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key name of the property + * @param value value of the property + * @return the ActionConfigInput instance itself + */ + public ActionConfigInput putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return a map of objects + */ + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key name of the property + * @return an object + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ActionConfigInput actionConfigInput = (ActionConfigInput) o; + return Objects.equals(this.position, actionConfigInput.position) + && Objects.equals(this.visibility, actionConfigInput.visibility) + && Objects.equals( + this.additionalProperties, actionConfigInput.additionalProperties); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b + || (a != null + && b != null + && a.isPresent() + && b.isPresent() + && Objects.deepEquals(a.get(), b.get())); + } + + @Override + public int hashCode() { + return Objects.hash(position, visibility, additionalProperties); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; + } + return a.isPresent() ? Arrays.deepHashCode(new Object[] {a.get()}) : 31; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ActionConfigInput {\n"); + sb.append(" position: ").append(toIndentedString(position)).append("\n"); + sb.append(" visibility: ").append(toIndentedString(visibility)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first + * line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("position"); + openapiFields.add("visibility"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to ActionConfigInput + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!ActionConfigInput.openapiRequiredFields + .isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException( + String.format( + "The required field(s) %s in ActionConfigInput is not found in the" + + " empty JSON string", + ActionConfigInput.openapiRequiredFields.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if ((jsonObj.get("position") != null && !jsonObj.get("position").isJsonNull()) + && !jsonObj.get("position").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `position` to be a primitive type in the JSON" + + " string but got `%s`", + jsonObj.get("position").toString())); + } + // validate the optional field `position` + if (jsonObj.get("position") != null && !jsonObj.get("position").isJsonNull()) { + PositionEnum.validateJsonElement(jsonObj.get("position")); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!ActionConfigInput.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'ActionConfigInput' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter = + gson.getDelegateAdapter(this, TypeToken.get(ActionConfigInput.class)); + + return (TypeAdapter) + new TypeAdapter() { + @Override + public void write(JsonWriter out, ActionConfigInput value) + throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + obj.remove("additionalProperties"); + // serialize additional properties + if (value.getAdditionalProperties() != null) { + for (Map.Entry entry : + value.getAdditionalProperties().entrySet()) { + if (entry.getValue() instanceof String) + obj.addProperty(entry.getKey(), (String) entry.getValue()); + else if (entry.getValue() instanceof Number) + obj.addProperty(entry.getKey(), (Number) entry.getValue()); + else if (entry.getValue() instanceof Boolean) + obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); + else if (entry.getValue() instanceof Character) + obj.addProperty( + entry.getKey(), (Character) entry.getValue()); + else { + JsonElement jsonElement = gson.toJsonTree(entry.getValue()); + if (jsonElement.isJsonArray()) { + obj.add(entry.getKey(), jsonElement.getAsJsonArray()); + } else { + obj.add(entry.getKey(), jsonElement.getAsJsonObject()); + } + } + } + } + elementAdapter.write(out, obj); + } + + @Override + public ActionConfigInput read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // store additional fields in the deserialized instance + ActionConfigInput instance = thisAdapter.fromJsonTree(jsonObj); + for (Map.Entry entry : jsonObj.entrySet()) { + if (!openapiFields.contains(entry.getKey())) { + if (entry.getValue().isJsonPrimitive()) { // primitive type + if (entry.getValue().getAsJsonPrimitive().isString()) + instance.putAdditionalProperty( + entry.getKey(), entry.getValue().getAsString()); + else if (entry.getValue().getAsJsonPrimitive().isNumber()) + instance.putAdditionalProperty( + entry.getKey(), entry.getValue().getAsNumber()); + else if (entry.getValue().getAsJsonPrimitive().isBoolean()) + instance.putAdditionalProperty( + entry.getKey(), + entry.getValue().getAsBoolean()); + else + throw new IllegalArgumentException( + String.format( + "The field `%s` has unknown primitive" + + " type. Value: %s", + entry.getKey(), + entry.getValue().toString())); + } else if (entry.getValue().isJsonArray()) { + instance.putAdditionalProperty( + entry.getKey(), + gson.fromJson(entry.getValue(), List.class)); + } else { // JSON object + instance.putAdditionalProperty( + entry.getKey(), + gson.fromJson(entry.getValue(), HashMap.class)); + } + } + } + return instance; + } + }.nullSafe(); + } + } + + /** + * Create an instance of ActionConfigInput given an JSON string + * + * @param jsonString JSON string + * @return An instance of ActionConfigInput + * @throws IOException if the JSON string is invalid with respect to ActionConfigInput + */ + public static ActionConfigInput fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, ActionConfigInput.class); + } + + /** + * Convert an instance of ActionConfigInput to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} diff --git a/sdks/java/src/main/java/com/thoughtspot/client/model/ActionConfigInputCreate.java b/sdks/java/src/main/java/com/thoughtspot/client/model/ActionConfigInputCreate.java new file mode 100644 index 000000000..5970ee44b --- /dev/null +++ b/sdks/java/src/main/java/com/thoughtspot/client/model/ActionConfigInputCreate.java @@ -0,0 +1,397 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client.model; + +import com.google.gson.Gson; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.TypeAdapter; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.reflect.TypeToken; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import com.thoughtspot.client.JSON; +import java.io.IOException; +import java.io.Serializable; +import java.util.Arrays; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Objects; +import org.openapitools.jackson.nullable.JsonNullable; + +/** Specify that the association is enabled for the metadata object Default */ +@javax.annotation.Generated( + value = "org.openapitools.codegen.languages.JavaClientCodegen", + comments = "Generator version: 7.12.0") +public class ActionConfigInputCreate implements Serializable { + private static final long serialVersionUID = 1L; + + /** Position of the Custom action on the Metadata object. Earlier naming convention: context. */ + @JsonAdapter(PositionEnum.Adapter.class) + public enum PositionEnum { + MENU("MENU"), + + PRIMARY("PRIMARY"), + + CONTEXT_MENU("CONTEXT_MENU"); + + private String value; + + PositionEnum(String value) { + this.value = value; + } + + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + public static PositionEnum fromValue(String value) { + for (PositionEnum b : PositionEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + return null; + } + + public static class Adapter extends TypeAdapter { + @Override + public void write(final JsonWriter jsonWriter, final PositionEnum enumeration) + throws IOException { + jsonWriter.value(enumeration.getValue()); + } + + @Override + public PositionEnum read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + return PositionEnum.fromValue(value); + } + } + + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + String value = jsonElement.getAsString(); + PositionEnum.fromValue(value); + } + } + + public static final String SERIALIZED_NAME_POSITION = "position"; + + @SerializedName(SERIALIZED_NAME_POSITION) + @javax.annotation.Nullable + private PositionEnum position = PositionEnum.MENU; + + public static final String SERIALIZED_NAME_VISIBILITY = "visibility"; + + @SerializedName(SERIALIZED_NAME_VISIBILITY) + @javax.annotation.Nullable + private Boolean visibility = true; + + public ActionConfigInputCreate() {} + + public ActionConfigInputCreate position(@javax.annotation.Nullable PositionEnum position) { + this.position = position; + return this; + } + + /** + * Position of the Custom action on the Metadata object. Earlier naming convention: context. + * + * @return position + */ + @javax.annotation.Nullable + public PositionEnum getPosition() { + return position; + } + + public void setPosition(@javax.annotation.Nullable PositionEnum position) { + this.position = position; + } + + public ActionConfigInputCreate visibility(@javax.annotation.Nullable Boolean visibility) { + this.visibility = visibility; + return this; + } + + /** + * Visibility of the metadata association with custom action. Earlier naming convention: enabled + * + * @return visibility + */ + @javax.annotation.Nullable + public Boolean getVisibility() { + return visibility; + } + + public void setVisibility(@javax.annotation.Nullable Boolean visibility) { + this.visibility = visibility; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key name of the property + * @param value value of the property + * @return the ActionConfigInputCreate instance itself + */ + public ActionConfigInputCreate putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return a map of objects + */ + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key name of the property + * @return an object + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ActionConfigInputCreate actionConfigInputCreate = (ActionConfigInputCreate) o; + return Objects.equals(this.position, actionConfigInputCreate.position) + && Objects.equals(this.visibility, actionConfigInputCreate.visibility) + && Objects.equals( + this.additionalProperties, actionConfigInputCreate.additionalProperties); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b + || (a != null + && b != null + && a.isPresent() + && b.isPresent() + && Objects.deepEquals(a.get(), b.get())); + } + + @Override + public int hashCode() { + return Objects.hash(position, visibility, additionalProperties); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; + } + return a.isPresent() ? Arrays.deepHashCode(new Object[] {a.get()}) : 31; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ActionConfigInputCreate {\n"); + sb.append(" position: ").append(toIndentedString(position)).append("\n"); + sb.append(" visibility: ").append(toIndentedString(visibility)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first + * line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("position"); + openapiFields.add("visibility"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to ActionConfigInputCreate + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!ActionConfigInputCreate.openapiRequiredFields + .isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException( + String.format( + "The required field(s) %s in ActionConfigInputCreate is not found" + + " in the empty JSON string", + ActionConfigInputCreate.openapiRequiredFields.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if ((jsonObj.get("position") != null && !jsonObj.get("position").isJsonNull()) + && !jsonObj.get("position").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `position` to be a primitive type in the JSON" + + " string but got `%s`", + jsonObj.get("position").toString())); + } + // validate the optional field `position` + if (jsonObj.get("position") != null && !jsonObj.get("position").isJsonNull()) { + PositionEnum.validateJsonElement(jsonObj.get("position")); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!ActionConfigInputCreate.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'ActionConfigInputCreate' and its + // subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter = + gson.getDelegateAdapter(this, TypeToken.get(ActionConfigInputCreate.class)); + + return (TypeAdapter) + new TypeAdapter() { + @Override + public void write(JsonWriter out, ActionConfigInputCreate value) + throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + obj.remove("additionalProperties"); + // serialize additional properties + if (value.getAdditionalProperties() != null) { + for (Map.Entry entry : + value.getAdditionalProperties().entrySet()) { + if (entry.getValue() instanceof String) + obj.addProperty(entry.getKey(), (String) entry.getValue()); + else if (entry.getValue() instanceof Number) + obj.addProperty(entry.getKey(), (Number) entry.getValue()); + else if (entry.getValue() instanceof Boolean) + obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); + else if (entry.getValue() instanceof Character) + obj.addProperty( + entry.getKey(), (Character) entry.getValue()); + else { + JsonElement jsonElement = gson.toJsonTree(entry.getValue()); + if (jsonElement.isJsonArray()) { + obj.add(entry.getKey(), jsonElement.getAsJsonArray()); + } else { + obj.add(entry.getKey(), jsonElement.getAsJsonObject()); + } + } + } + } + elementAdapter.write(out, obj); + } + + @Override + public ActionConfigInputCreate read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // store additional fields in the deserialized instance + ActionConfigInputCreate instance = thisAdapter.fromJsonTree(jsonObj); + for (Map.Entry entry : jsonObj.entrySet()) { + if (!openapiFields.contains(entry.getKey())) { + if (entry.getValue().isJsonPrimitive()) { // primitive type + if (entry.getValue().getAsJsonPrimitive().isString()) + instance.putAdditionalProperty( + entry.getKey(), entry.getValue().getAsString()); + else if (entry.getValue().getAsJsonPrimitive().isNumber()) + instance.putAdditionalProperty( + entry.getKey(), entry.getValue().getAsNumber()); + else if (entry.getValue().getAsJsonPrimitive().isBoolean()) + instance.putAdditionalProperty( + entry.getKey(), + entry.getValue().getAsBoolean()); + else + throw new IllegalArgumentException( + String.format( + "The field `%s` has unknown primitive" + + " type. Value: %s", + entry.getKey(), + entry.getValue().toString())); + } else if (entry.getValue().isJsonArray()) { + instance.putAdditionalProperty( + entry.getKey(), + gson.fromJson(entry.getValue(), List.class)); + } else { // JSON object + instance.putAdditionalProperty( + entry.getKey(), + gson.fromJson(entry.getValue(), HashMap.class)); + } + } + } + return instance; + } + }.nullSafe(); + } + } + + /** + * Create an instance of ActionConfigInputCreate given an JSON string + * + * @param jsonString JSON string + * @return An instance of ActionConfigInputCreate + * @throws IOException if the JSON string is invalid with respect to ActionConfigInputCreate + */ + public static ActionConfigInputCreate fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, ActionConfigInputCreate.class); + } + + /** + * Convert an instance of ActionConfigInputCreate to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} diff --git a/sdks/java/src/main/java/com/thoughtspot/client/model/ActionDetails.java b/sdks/java/src/main/java/com/thoughtspot/client/model/ActionDetails.java new file mode 100644 index 000000000..7eea240f7 --- /dev/null +++ b/sdks/java/src/main/java/com/thoughtspot/client/model/ActionDetails.java @@ -0,0 +1,318 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client.model; + +import com.google.gson.Gson; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.TypeAdapter; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.annotations.SerializedName; +import com.google.gson.reflect.TypeToken; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import com.thoughtspot.client.JSON; +import java.io.IOException; +import java.io.Serializable; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Objects; + +/** Type and Configuration for Custom Actions */ +@javax.annotation.Generated( + value = "org.openapitools.codegen.languages.JavaClientCodegen", + comments = "Generator version: 7.12.0") +public class ActionDetails implements Serializable { + private static final long serialVersionUID = 1L; + + public static final String SERIALIZED_NAME_C_A_L_L_B_A_C_K = "CALLBACK"; + + @SerializedName(SERIALIZED_NAME_C_A_L_L_B_A_C_K) + @javax.annotation.Nullable + private CALLBACK callback; + + public static final String SERIALIZED_NAME_U_R_L = "URL"; + + @SerializedName(SERIALIZED_NAME_U_R_L) + @javax.annotation.Nullable + private URL url; + + public ActionDetails() {} + + public ActionDetails callback(@javax.annotation.Nullable CALLBACK callback) { + this.callback = callback; + return this; + } + + /** + * Get callback + * + * @return callback + */ + @javax.annotation.Nullable + public CALLBACK getCALLBACK() { + return callback; + } + + public void setCALLBACK(@javax.annotation.Nullable CALLBACK callback) { + this.callback = callback; + } + + public ActionDetails url(@javax.annotation.Nullable URL url) { + this.url = url; + return this; + } + + /** + * Get url + * + * @return url + */ + @javax.annotation.Nullable + public URL getURL() { + return url; + } + + public void setURL(@javax.annotation.Nullable URL url) { + this.url = url; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key name of the property + * @param value value of the property + * @return the ActionDetails instance itself + */ + public ActionDetails putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return a map of objects + */ + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key name of the property + * @return an object + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ActionDetails actionDetails = (ActionDetails) o; + return Objects.equals(this.callback, actionDetails.callback) + && Objects.equals(this.url, actionDetails.url) + && Objects.equals(this.additionalProperties, actionDetails.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(callback, url, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ActionDetails {\n"); + sb.append(" callback: ").append(toIndentedString(callback)).append("\n"); + sb.append(" url: ").append(toIndentedString(url)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first + * line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("CALLBACK"); + openapiFields.add("URL"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to ActionDetails + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!ActionDetails.openapiRequiredFields + .isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException( + String.format( + "The required field(s) %s in ActionDetails is not found in the" + + " empty JSON string", + ActionDetails.openapiRequiredFields.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // validate the optional field `CALLBACK` + if (jsonObj.get("CALLBACK") != null && !jsonObj.get("CALLBACK").isJsonNull()) { + CALLBACK.validateJsonElement(jsonObj.get("CALLBACK")); + } + // validate the optional field `URL` + if (jsonObj.get("URL") != null && !jsonObj.get("URL").isJsonNull()) { + URL.validateJsonElement(jsonObj.get("URL")); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!ActionDetails.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'ActionDetails' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter = + gson.getDelegateAdapter(this, TypeToken.get(ActionDetails.class)); + + return (TypeAdapter) + new TypeAdapter() { + @Override + public void write(JsonWriter out, ActionDetails value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + obj.remove("additionalProperties"); + // serialize additional properties + if (value.getAdditionalProperties() != null) { + for (Map.Entry entry : + value.getAdditionalProperties().entrySet()) { + if (entry.getValue() instanceof String) + obj.addProperty(entry.getKey(), (String) entry.getValue()); + else if (entry.getValue() instanceof Number) + obj.addProperty(entry.getKey(), (Number) entry.getValue()); + else if (entry.getValue() instanceof Boolean) + obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); + else if (entry.getValue() instanceof Character) + obj.addProperty( + entry.getKey(), (Character) entry.getValue()); + else { + JsonElement jsonElement = gson.toJsonTree(entry.getValue()); + if (jsonElement.isJsonArray()) { + obj.add(entry.getKey(), jsonElement.getAsJsonArray()); + } else { + obj.add(entry.getKey(), jsonElement.getAsJsonObject()); + } + } + } + } + elementAdapter.write(out, obj); + } + + @Override + public ActionDetails read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // store additional fields in the deserialized instance + ActionDetails instance = thisAdapter.fromJsonTree(jsonObj); + for (Map.Entry entry : jsonObj.entrySet()) { + if (!openapiFields.contains(entry.getKey())) { + if (entry.getValue().isJsonPrimitive()) { // primitive type + if (entry.getValue().getAsJsonPrimitive().isString()) + instance.putAdditionalProperty( + entry.getKey(), entry.getValue().getAsString()); + else if (entry.getValue().getAsJsonPrimitive().isNumber()) + instance.putAdditionalProperty( + entry.getKey(), entry.getValue().getAsNumber()); + else if (entry.getValue().getAsJsonPrimitive().isBoolean()) + instance.putAdditionalProperty( + entry.getKey(), + entry.getValue().getAsBoolean()); + else + throw new IllegalArgumentException( + String.format( + "The field `%s` has unknown primitive" + + " type. Value: %s", + entry.getKey(), + entry.getValue().toString())); + } else if (entry.getValue().isJsonArray()) { + instance.putAdditionalProperty( + entry.getKey(), + gson.fromJson(entry.getValue(), List.class)); + } else { // JSON object + instance.putAdditionalProperty( + entry.getKey(), + gson.fromJson(entry.getValue(), HashMap.class)); + } + } + } + return instance; + } + }.nullSafe(); + } + } + + /** + * Create an instance of ActionDetails given an JSON string + * + * @param jsonString JSON string + * @return An instance of ActionDetails + * @throws IOException if the JSON string is invalid with respect to ActionDetails + */ + public static ActionDetails fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, ActionDetails.class); + } + + /** + * Convert an instance of ActionDetails to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} diff --git a/sdks/java/src/main/java/com/thoughtspot/client/model/ActionDetailsInput.java b/sdks/java/src/main/java/com/thoughtspot/client/model/ActionDetailsInput.java new file mode 100644 index 000000000..15e74e29f --- /dev/null +++ b/sdks/java/src/main/java/com/thoughtspot/client/model/ActionDetailsInput.java @@ -0,0 +1,323 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client.model; + +import com.google.gson.Gson; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.TypeAdapter; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.annotations.SerializedName; +import com.google.gson.reflect.TypeToken; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import com.thoughtspot.client.JSON; +import java.io.IOException; +import java.io.Serializable; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Objects; + +/** + * Action details includes `Type` and configuration details of Custom Actions. Either + * Callback or URL is required. + */ +@javax.annotation.Generated( + value = "org.openapitools.codegen.languages.JavaClientCodegen", + comments = "Generator version: 7.12.0") +public class ActionDetailsInput implements Serializable { + private static final long serialVersionUID = 1L; + + public static final String SERIALIZED_NAME_C_A_L_L_B_A_C_K = "CALLBACK"; + + @SerializedName(SERIALIZED_NAME_C_A_L_L_B_A_C_K) + @javax.annotation.Nullable + private CALLBACKInput CALLBACK; + + public static final String SERIALIZED_NAME_U_R_L = "URL"; + + @SerializedName(SERIALIZED_NAME_U_R_L) + @javax.annotation.Nullable + private URLInput URL; + + public ActionDetailsInput() {} + + public ActionDetailsInput CALLBACK(@javax.annotation.Nullable CALLBACKInput CALLBACK) { + this.CALLBACK = CALLBACK; + return this; + } + + /** + * Get CALLBACK + * + * @return CALLBACK + */ + @javax.annotation.Nullable + public CALLBACKInput getCALLBACK() { + return CALLBACK; + } + + public void setCALLBACK(@javax.annotation.Nullable CALLBACKInput CALLBACK) { + this.CALLBACK = CALLBACK; + } + + public ActionDetailsInput URL(@javax.annotation.Nullable URLInput URL) { + this.URL = URL; + return this; + } + + /** + * Get URL + * + * @return URL + */ + @javax.annotation.Nullable + public URLInput getURL() { + return URL; + } + + public void setURL(@javax.annotation.Nullable URLInput URL) { + this.URL = URL; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key name of the property + * @param value value of the property + * @return the ActionDetailsInput instance itself + */ + public ActionDetailsInput putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return a map of objects + */ + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key name of the property + * @return an object + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ActionDetailsInput actionDetailsInput = (ActionDetailsInput) o; + return Objects.equals(this.CALLBACK, actionDetailsInput.CALLBACK) + && Objects.equals(this.URL, actionDetailsInput.URL) + && Objects.equals( + this.additionalProperties, actionDetailsInput.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(CALLBACK, URL, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ActionDetailsInput {\n"); + sb.append(" CALLBACK: ").append(toIndentedString(CALLBACK)).append("\n"); + sb.append(" URL: ").append(toIndentedString(URL)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first + * line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("CALLBACK"); + openapiFields.add("URL"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to ActionDetailsInput + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!ActionDetailsInput.openapiRequiredFields + .isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException( + String.format( + "The required field(s) %s in ActionDetailsInput is not found in" + + " the empty JSON string", + ActionDetailsInput.openapiRequiredFields.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // validate the optional field `CALLBACK` + if (jsonObj.get("CALLBACK") != null && !jsonObj.get("CALLBACK").isJsonNull()) { + CALLBACKInput.validateJsonElement(jsonObj.get("CALLBACK")); + } + // validate the optional field `URL` + if (jsonObj.get("URL") != null && !jsonObj.get("URL").isJsonNull()) { + URLInput.validateJsonElement(jsonObj.get("URL")); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!ActionDetailsInput.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'ActionDetailsInput' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter = + gson.getDelegateAdapter(this, TypeToken.get(ActionDetailsInput.class)); + + return (TypeAdapter) + new TypeAdapter() { + @Override + public void write(JsonWriter out, ActionDetailsInput value) + throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + obj.remove("additionalProperties"); + // serialize additional properties + if (value.getAdditionalProperties() != null) { + for (Map.Entry entry : + value.getAdditionalProperties().entrySet()) { + if (entry.getValue() instanceof String) + obj.addProperty(entry.getKey(), (String) entry.getValue()); + else if (entry.getValue() instanceof Number) + obj.addProperty(entry.getKey(), (Number) entry.getValue()); + else if (entry.getValue() instanceof Boolean) + obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); + else if (entry.getValue() instanceof Character) + obj.addProperty( + entry.getKey(), (Character) entry.getValue()); + else { + JsonElement jsonElement = gson.toJsonTree(entry.getValue()); + if (jsonElement.isJsonArray()) { + obj.add(entry.getKey(), jsonElement.getAsJsonArray()); + } else { + obj.add(entry.getKey(), jsonElement.getAsJsonObject()); + } + } + } + } + elementAdapter.write(out, obj); + } + + @Override + public ActionDetailsInput read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // store additional fields in the deserialized instance + ActionDetailsInput instance = thisAdapter.fromJsonTree(jsonObj); + for (Map.Entry entry : jsonObj.entrySet()) { + if (!openapiFields.contains(entry.getKey())) { + if (entry.getValue().isJsonPrimitive()) { // primitive type + if (entry.getValue().getAsJsonPrimitive().isString()) + instance.putAdditionalProperty( + entry.getKey(), entry.getValue().getAsString()); + else if (entry.getValue().getAsJsonPrimitive().isNumber()) + instance.putAdditionalProperty( + entry.getKey(), entry.getValue().getAsNumber()); + else if (entry.getValue().getAsJsonPrimitive().isBoolean()) + instance.putAdditionalProperty( + entry.getKey(), + entry.getValue().getAsBoolean()); + else + throw new IllegalArgumentException( + String.format( + "The field `%s` has unknown primitive" + + " type. Value: %s", + entry.getKey(), + entry.getValue().toString())); + } else if (entry.getValue().isJsonArray()) { + instance.putAdditionalProperty( + entry.getKey(), + gson.fromJson(entry.getValue(), List.class)); + } else { // JSON object + instance.putAdditionalProperty( + entry.getKey(), + gson.fromJson(entry.getValue(), HashMap.class)); + } + } + } + return instance; + } + }.nullSafe(); + } + } + + /** + * Create an instance of ActionDetailsInput given an JSON string + * + * @param jsonString JSON string + * @return An instance of ActionDetailsInput + * @throws IOException if the JSON string is invalid with respect to ActionDetailsInput + */ + public static ActionDetailsInput fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, ActionDetailsInput.class); + } + + /** + * Convert an instance of ActionDetailsInput to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} diff --git a/sdks/java/src/main/java/com/thoughtspot/client/model/ActionDetailsInputCreate.java b/sdks/java/src/main/java/com/thoughtspot/client/model/ActionDetailsInputCreate.java new file mode 100644 index 000000000..39e6e4a05 --- /dev/null +++ b/sdks/java/src/main/java/com/thoughtspot/client/model/ActionDetailsInputCreate.java @@ -0,0 +1,325 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client.model; + +import com.google.gson.Gson; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.TypeAdapter; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.annotations.SerializedName; +import com.google.gson.reflect.TypeToken; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import com.thoughtspot.client.JSON; +import java.io.IOException; +import java.io.Serializable; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Objects; + +/** + * Action details includes Type and Configuration for Custom Actions, either Callback or URL is + * required. When both callback and url are provided, callback would be considered + */ +@javax.annotation.Generated( + value = "org.openapitools.codegen.languages.JavaClientCodegen", + comments = "Generator version: 7.12.0") +public class ActionDetailsInputCreate implements Serializable { + private static final long serialVersionUID = 1L; + + public static final String SERIALIZED_NAME_C_A_L_L_B_A_C_K = "CALLBACK"; + + @SerializedName(SERIALIZED_NAME_C_A_L_L_B_A_C_K) + @javax.annotation.Nullable + private CALLBACKInputMandatory CALLBACK; + + public static final String SERIALIZED_NAME_U_R_L = "URL"; + + @SerializedName(SERIALIZED_NAME_U_R_L) + @javax.annotation.Nullable + private URLInputMandatory URL; + + public ActionDetailsInputCreate() {} + + public ActionDetailsInputCreate CALLBACK( + @javax.annotation.Nullable CALLBACKInputMandatory CALLBACK) { + this.CALLBACK = CALLBACK; + return this; + } + + /** + * Get CALLBACK + * + * @return CALLBACK + */ + @javax.annotation.Nullable + public CALLBACKInputMandatory getCALLBACK() { + return CALLBACK; + } + + public void setCALLBACK(@javax.annotation.Nullable CALLBACKInputMandatory CALLBACK) { + this.CALLBACK = CALLBACK; + } + + public ActionDetailsInputCreate URL(@javax.annotation.Nullable URLInputMandatory URL) { + this.URL = URL; + return this; + } + + /** + * Get URL + * + * @return URL + */ + @javax.annotation.Nullable + public URLInputMandatory getURL() { + return URL; + } + + public void setURL(@javax.annotation.Nullable URLInputMandatory URL) { + this.URL = URL; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key name of the property + * @param value value of the property + * @return the ActionDetailsInputCreate instance itself + */ + public ActionDetailsInputCreate putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return a map of objects + */ + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key name of the property + * @return an object + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ActionDetailsInputCreate actionDetailsInputCreate = (ActionDetailsInputCreate) o; + return Objects.equals(this.CALLBACK, actionDetailsInputCreate.CALLBACK) + && Objects.equals(this.URL, actionDetailsInputCreate.URL) + && Objects.equals( + this.additionalProperties, actionDetailsInputCreate.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(CALLBACK, URL, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ActionDetailsInputCreate {\n"); + sb.append(" CALLBACK: ").append(toIndentedString(CALLBACK)).append("\n"); + sb.append(" URL: ").append(toIndentedString(URL)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first + * line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("CALLBACK"); + openapiFields.add("URL"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to ActionDetailsInputCreate + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!ActionDetailsInputCreate.openapiRequiredFields + .isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException( + String.format( + "The required field(s) %s in ActionDetailsInputCreate is not found" + + " in the empty JSON string", + ActionDetailsInputCreate.openapiRequiredFields.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // validate the optional field `CALLBACK` + if (jsonObj.get("CALLBACK") != null && !jsonObj.get("CALLBACK").isJsonNull()) { + CALLBACKInputMandatory.validateJsonElement(jsonObj.get("CALLBACK")); + } + // validate the optional field `URL` + if (jsonObj.get("URL") != null && !jsonObj.get("URL").isJsonNull()) { + URLInputMandatory.validateJsonElement(jsonObj.get("URL")); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!ActionDetailsInputCreate.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'ActionDetailsInputCreate' and its + // subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter = + gson.getDelegateAdapter(this, TypeToken.get(ActionDetailsInputCreate.class)); + + return (TypeAdapter) + new TypeAdapter() { + @Override + public void write(JsonWriter out, ActionDetailsInputCreate value) + throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + obj.remove("additionalProperties"); + // serialize additional properties + if (value.getAdditionalProperties() != null) { + for (Map.Entry entry : + value.getAdditionalProperties().entrySet()) { + if (entry.getValue() instanceof String) + obj.addProperty(entry.getKey(), (String) entry.getValue()); + else if (entry.getValue() instanceof Number) + obj.addProperty(entry.getKey(), (Number) entry.getValue()); + else if (entry.getValue() instanceof Boolean) + obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); + else if (entry.getValue() instanceof Character) + obj.addProperty( + entry.getKey(), (Character) entry.getValue()); + else { + JsonElement jsonElement = gson.toJsonTree(entry.getValue()); + if (jsonElement.isJsonArray()) { + obj.add(entry.getKey(), jsonElement.getAsJsonArray()); + } else { + obj.add(entry.getKey(), jsonElement.getAsJsonObject()); + } + } + } + } + elementAdapter.write(out, obj); + } + + @Override + public ActionDetailsInputCreate read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // store additional fields in the deserialized instance + ActionDetailsInputCreate instance = thisAdapter.fromJsonTree(jsonObj); + for (Map.Entry entry : jsonObj.entrySet()) { + if (!openapiFields.contains(entry.getKey())) { + if (entry.getValue().isJsonPrimitive()) { // primitive type + if (entry.getValue().getAsJsonPrimitive().isString()) + instance.putAdditionalProperty( + entry.getKey(), entry.getValue().getAsString()); + else if (entry.getValue().getAsJsonPrimitive().isNumber()) + instance.putAdditionalProperty( + entry.getKey(), entry.getValue().getAsNumber()); + else if (entry.getValue().getAsJsonPrimitive().isBoolean()) + instance.putAdditionalProperty( + entry.getKey(), + entry.getValue().getAsBoolean()); + else + throw new IllegalArgumentException( + String.format( + "The field `%s` has unknown primitive" + + " type. Value: %s", + entry.getKey(), + entry.getValue().toString())); + } else if (entry.getValue().isJsonArray()) { + instance.putAdditionalProperty( + entry.getKey(), + gson.fromJson(entry.getValue(), List.class)); + } else { // JSON object + instance.putAdditionalProperty( + entry.getKey(), + gson.fromJson(entry.getValue(), HashMap.class)); + } + } + } + return instance; + } + }.nullSafe(); + } + } + + /** + * Create an instance of ActionDetailsInputCreate given an JSON string + * + * @param jsonString JSON string + * @return An instance of ActionDetailsInputCreate + * @throws IOException if the JSON string is invalid with respect to ActionDetailsInputCreate + */ + public static ActionDetailsInputCreate fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, ActionDetailsInputCreate.class); + } + + /** + * Convert an instance of ActionDetailsInputCreate to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} diff --git a/sdks/java/src/main/java/com/thoughtspot/client/model/ActivateUserRequest.java b/sdks/java/src/main/java/com/thoughtspot/client/model/ActivateUserRequest.java new file mode 100644 index 000000000..8db441709 --- /dev/null +++ b/sdks/java/src/main/java/com/thoughtspot/client/model/ActivateUserRequest.java @@ -0,0 +1,410 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client.model; + +import com.google.gson.Gson; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.TypeAdapter; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.annotations.SerializedName; +import com.google.gson.reflect.TypeToken; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import com.thoughtspot.client.JSON; +import java.io.IOException; +import java.io.Serializable; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Objects; + +/** ActivateUserRequest */ +@javax.annotation.Generated( + value = "org.openapitools.codegen.languages.JavaClientCodegen", + comments = "Generator version: 7.12.0") +public class ActivateUserRequest implements Serializable { + private static final long serialVersionUID = 1L; + + public static final String SERIALIZED_NAME_USER_IDENTIFIER = "user_identifier"; + + @SerializedName(SERIALIZED_NAME_USER_IDENTIFIER) + @javax.annotation.Nonnull + private String userIdentifier; + + public static final String SERIALIZED_NAME_AUTH_TOKEN = "auth_token"; + + @SerializedName(SERIALIZED_NAME_AUTH_TOKEN) + @javax.annotation.Nonnull + private String authToken; + + public static final String SERIALIZED_NAME_PASSWORD = "password"; + + @SerializedName(SERIALIZED_NAME_PASSWORD) + @javax.annotation.Nonnull + private String password; + + public static final String SERIALIZED_NAME_PROPERTIES = "properties"; + + @SerializedName(SERIALIZED_NAME_PROPERTIES) + @javax.annotation.Nullable + private String properties; + + public ActivateUserRequest() {} + + public ActivateUserRequest userIdentifier(@javax.annotation.Nonnull String userIdentifier) { + this.userIdentifier = userIdentifier; + return this; + } + + /** + * Unique ID or name of the user. + * + * @return userIdentifier + */ + @javax.annotation.Nonnull + public String getUserIdentifier() { + return userIdentifier; + } + + public void setUserIdentifier(@javax.annotation.Nonnull String userIdentifier) { + this.userIdentifier = userIdentifier; + } + + public ActivateUserRequest authToken(@javax.annotation.Nonnull String authToken) { + this.authToken = authToken; + return this; + } + + /** + * Auth token for the user. + * + * @return authToken + */ + @javax.annotation.Nonnull + public String getAuthToken() { + return authToken; + } + + public void setAuthToken(@javax.annotation.Nonnull String authToken) { + this.authToken = authToken; + } + + public ActivateUserRequest password(@javax.annotation.Nonnull String password) { + this.password = password; + return this; + } + + /** + * New password for the user to access the account. + * + * @return password + */ + @javax.annotation.Nonnull + public String getPassword() { + return password; + } + + public void setPassword(@javax.annotation.Nonnull String password) { + this.password = password; + } + + public ActivateUserRequest properties(@javax.annotation.Nullable String properties) { + this.properties = properties; + return this; + } + + /** + * Properties of the user. + * + * @return properties + */ + @javax.annotation.Nullable + public String getProperties() { + return properties; + } + + public void setProperties(@javax.annotation.Nullable String properties) { + this.properties = properties; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key name of the property + * @param value value of the property + * @return the ActivateUserRequest instance itself + */ + public ActivateUserRequest putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return a map of objects + */ + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key name of the property + * @return an object + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ActivateUserRequest activateUserRequest = (ActivateUserRequest) o; + return Objects.equals(this.userIdentifier, activateUserRequest.userIdentifier) + && Objects.equals(this.authToken, activateUserRequest.authToken) + && Objects.equals(this.password, activateUserRequest.password) + && Objects.equals(this.properties, activateUserRequest.properties) + && Objects.equals( + this.additionalProperties, activateUserRequest.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(userIdentifier, authToken, password, properties, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ActivateUserRequest {\n"); + sb.append(" userIdentifier: ").append(toIndentedString(userIdentifier)).append("\n"); + sb.append(" authToken: ").append(toIndentedString(authToken)).append("\n"); + sb.append(" password: ").append(toIndentedString(password)).append("\n"); + sb.append(" properties: ").append(toIndentedString(properties)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first + * line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("user_identifier"); + openapiFields.add("auth_token"); + openapiFields.add("password"); + openapiFields.add("properties"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + openapiRequiredFields.add("user_identifier"); + openapiRequiredFields.add("auth_token"); + openapiRequiredFields.add("password"); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to ActivateUserRequest + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!ActivateUserRequest.openapiRequiredFields + .isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException( + String.format( + "The required field(s) %s in ActivateUserRequest is not found in" + + " the empty JSON string", + ActivateUserRequest.openapiRequiredFields.toString())); + } + } + + // check to make sure all required properties/fields are present in the JSON string + for (String requiredField : ActivateUserRequest.openapiRequiredFields) { + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException( + String.format( + "The required field `%s` is not found in the JSON string: %s", + requiredField, jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if (!jsonObj.get("user_identifier").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `user_identifier` to be a primitive type in the" + + " JSON string but got `%s`", + jsonObj.get("user_identifier").toString())); + } + if (!jsonObj.get("auth_token").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `auth_token` to be a primitive type in the JSON" + + " string but got `%s`", + jsonObj.get("auth_token").toString())); + } + if (!jsonObj.get("password").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `password` to be a primitive type in the JSON" + + " string but got `%s`", + jsonObj.get("password").toString())); + } + if ((jsonObj.get("properties") != null && !jsonObj.get("properties").isJsonNull()) + && !jsonObj.get("properties").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `properties` to be a primitive type in the JSON" + + " string but got `%s`", + jsonObj.get("properties").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!ActivateUserRequest.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'ActivateUserRequest' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter = + gson.getDelegateAdapter(this, TypeToken.get(ActivateUserRequest.class)); + + return (TypeAdapter) + new TypeAdapter() { + @Override + public void write(JsonWriter out, ActivateUserRequest value) + throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + obj.remove("additionalProperties"); + // serialize additional properties + if (value.getAdditionalProperties() != null) { + for (Map.Entry entry : + value.getAdditionalProperties().entrySet()) { + if (entry.getValue() instanceof String) + obj.addProperty(entry.getKey(), (String) entry.getValue()); + else if (entry.getValue() instanceof Number) + obj.addProperty(entry.getKey(), (Number) entry.getValue()); + else if (entry.getValue() instanceof Boolean) + obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); + else if (entry.getValue() instanceof Character) + obj.addProperty( + entry.getKey(), (Character) entry.getValue()); + else { + JsonElement jsonElement = gson.toJsonTree(entry.getValue()); + if (jsonElement.isJsonArray()) { + obj.add(entry.getKey(), jsonElement.getAsJsonArray()); + } else { + obj.add(entry.getKey(), jsonElement.getAsJsonObject()); + } + } + } + } + elementAdapter.write(out, obj); + } + + @Override + public ActivateUserRequest read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // store additional fields in the deserialized instance + ActivateUserRequest instance = thisAdapter.fromJsonTree(jsonObj); + for (Map.Entry entry : jsonObj.entrySet()) { + if (!openapiFields.contains(entry.getKey())) { + if (entry.getValue().isJsonPrimitive()) { // primitive type + if (entry.getValue().getAsJsonPrimitive().isString()) + instance.putAdditionalProperty( + entry.getKey(), entry.getValue().getAsString()); + else if (entry.getValue().getAsJsonPrimitive().isNumber()) + instance.putAdditionalProperty( + entry.getKey(), entry.getValue().getAsNumber()); + else if (entry.getValue().getAsJsonPrimitive().isBoolean()) + instance.putAdditionalProperty( + entry.getKey(), + entry.getValue().getAsBoolean()); + else + throw new IllegalArgumentException( + String.format( + "The field `%s` has unknown primitive" + + " type. Value: %s", + entry.getKey(), + entry.getValue().toString())); + } else if (entry.getValue().isJsonArray()) { + instance.putAdditionalProperty( + entry.getKey(), + gson.fromJson(entry.getValue(), List.class)); + } else { // JSON object + instance.putAdditionalProperty( + entry.getKey(), + gson.fromJson(entry.getValue(), HashMap.class)); + } + } + } + return instance; + } + }.nullSafe(); + } + } + + /** + * Create an instance of ActivateUserRequest given an JSON string + * + * @param jsonString JSON string + * @return An instance of ActivateUserRequest + * @throws IOException if the JSON string is invalid with respect to ActivateUserRequest + */ + public static ActivateUserRequest fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, ActivateUserRequest.class); + } + + /** + * Convert an instance of ActivateUserRequest to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} diff --git a/sdks/java/src/main/java/com/thoughtspot/client/model/AgentConversation.java b/sdks/java/src/main/java/com/thoughtspot/client/model/AgentConversation.java new file mode 100644 index 000000000..d1c2072d5 --- /dev/null +++ b/sdks/java/src/main/java/com/thoughtspot/client/model/AgentConversation.java @@ -0,0 +1,342 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client.model; + +import com.google.gson.Gson; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.TypeAdapter; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.annotations.SerializedName; +import com.google.gson.reflect.TypeToken; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import com.thoughtspot.client.JSON; +import java.io.IOException; +import java.io.Serializable; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Objects; + +/** AgentConversation */ +@javax.annotation.Generated( + value = "org.openapitools.codegen.languages.JavaClientCodegen", + comments = "Generator version: 7.12.0") +public class AgentConversation implements Serializable { + private static final long serialVersionUID = 1L; + + public static final String SERIALIZED_NAME_CONVERSATION_ID = "conversation_id"; + + @SerializedName(SERIALIZED_NAME_CONVERSATION_ID) + @javax.annotation.Nonnull + private String conversationId; + + public static final String SERIALIZED_NAME_CONVERSATION_IDENTIFIER = "conversation_identifier"; + + @SerializedName(SERIALIZED_NAME_CONVERSATION_IDENTIFIER) + @javax.annotation.Nonnull + private String conversationIdentifier; + + public AgentConversation() {} + + public AgentConversation conversationId(@javax.annotation.Nonnull String conversationId) { + this.conversationId = conversationId; + return this; + } + + /** + * Unique identifier of the conversation. + * + * @return conversationId + */ + @javax.annotation.Nonnull + public String getConversationId() { + return conversationId; + } + + public void setConversationId(@javax.annotation.Nonnull String conversationId) { + this.conversationId = conversationId; + } + + public AgentConversation conversationIdentifier( + @javax.annotation.Nonnull String conversationIdentifier) { + this.conversationIdentifier = conversationIdentifier; + return this; + } + + /** + * Unique identifier of the conversation. Version: 26.5.0.cl or later + * + * @return conversationIdentifier + */ + @javax.annotation.Nonnull + public String getConversationIdentifier() { + return conversationIdentifier; + } + + public void setConversationIdentifier(@javax.annotation.Nonnull String conversationIdentifier) { + this.conversationIdentifier = conversationIdentifier; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key name of the property + * @param value value of the property + * @return the AgentConversation instance itself + */ + public AgentConversation putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return a map of objects + */ + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key name of the property + * @return an object + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + AgentConversation agentConversation = (AgentConversation) o; + return Objects.equals(this.conversationId, agentConversation.conversationId) + && Objects.equals( + this.conversationIdentifier, agentConversation.conversationIdentifier) + && Objects.equals( + this.additionalProperties, agentConversation.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(conversationId, conversationIdentifier, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class AgentConversation {\n"); + sb.append(" conversationId: ").append(toIndentedString(conversationId)).append("\n"); + sb.append(" conversationIdentifier: ") + .append(toIndentedString(conversationIdentifier)) + .append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first + * line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("conversation_id"); + openapiFields.add("conversation_identifier"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + openapiRequiredFields.add("conversation_id"); + openapiRequiredFields.add("conversation_identifier"); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to AgentConversation + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!AgentConversation.openapiRequiredFields + .isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException( + String.format( + "The required field(s) %s in AgentConversation is not found in the" + + " empty JSON string", + AgentConversation.openapiRequiredFields.toString())); + } + } + + // check to make sure all required properties/fields are present in the JSON string + for (String requiredField : AgentConversation.openapiRequiredFields) { + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException( + String.format( + "The required field `%s` is not found in the JSON string: %s", + requiredField, jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if (!jsonObj.get("conversation_id").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `conversation_id` to be a primitive type in the" + + " JSON string but got `%s`", + jsonObj.get("conversation_id").toString())); + } + if (!jsonObj.get("conversation_identifier").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `conversation_identifier` to be a primitive type" + + " in the JSON string but got `%s`", + jsonObj.get("conversation_identifier").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!AgentConversation.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'AgentConversation' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter = + gson.getDelegateAdapter(this, TypeToken.get(AgentConversation.class)); + + return (TypeAdapter) + new TypeAdapter() { + @Override + public void write(JsonWriter out, AgentConversation value) + throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + obj.remove("additionalProperties"); + // serialize additional properties + if (value.getAdditionalProperties() != null) { + for (Map.Entry entry : + value.getAdditionalProperties().entrySet()) { + if (entry.getValue() instanceof String) + obj.addProperty(entry.getKey(), (String) entry.getValue()); + else if (entry.getValue() instanceof Number) + obj.addProperty(entry.getKey(), (Number) entry.getValue()); + else if (entry.getValue() instanceof Boolean) + obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); + else if (entry.getValue() instanceof Character) + obj.addProperty( + entry.getKey(), (Character) entry.getValue()); + else { + JsonElement jsonElement = gson.toJsonTree(entry.getValue()); + if (jsonElement.isJsonArray()) { + obj.add(entry.getKey(), jsonElement.getAsJsonArray()); + } else { + obj.add(entry.getKey(), jsonElement.getAsJsonObject()); + } + } + } + } + elementAdapter.write(out, obj); + } + + @Override + public AgentConversation read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // store additional fields in the deserialized instance + AgentConversation instance = thisAdapter.fromJsonTree(jsonObj); + for (Map.Entry entry : jsonObj.entrySet()) { + if (!openapiFields.contains(entry.getKey())) { + if (entry.getValue().isJsonPrimitive()) { // primitive type + if (entry.getValue().getAsJsonPrimitive().isString()) + instance.putAdditionalProperty( + entry.getKey(), entry.getValue().getAsString()); + else if (entry.getValue().getAsJsonPrimitive().isNumber()) + instance.putAdditionalProperty( + entry.getKey(), entry.getValue().getAsNumber()); + else if (entry.getValue().getAsJsonPrimitive().isBoolean()) + instance.putAdditionalProperty( + entry.getKey(), + entry.getValue().getAsBoolean()); + else + throw new IllegalArgumentException( + String.format( + "The field `%s` has unknown primitive" + + " type. Value: %s", + entry.getKey(), + entry.getValue().toString())); + } else if (entry.getValue().isJsonArray()) { + instance.putAdditionalProperty( + entry.getKey(), + gson.fromJson(entry.getValue(), List.class)); + } else { // JSON object + instance.putAdditionalProperty( + entry.getKey(), + gson.fromJson(entry.getValue(), HashMap.class)); + } + } + } + return instance; + } + }.nullSafe(); + } + } + + /** + * Create an instance of AgentConversation given an JSON string + * + * @param jsonString JSON string + * @return An instance of AgentConversation + * @throws IOException if the JSON string is invalid with respect to AgentConversation + */ + public static AgentConversation fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, AgentConversation.class); + } + + /** + * Convert an instance of AgentConversation to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} diff --git a/sdks/java/src/main/java/com/thoughtspot/client/model/AnswerContent.java b/sdks/java/src/main/java/com/thoughtspot/client/model/AnswerContent.java new file mode 100644 index 000000000..aee9febd9 --- /dev/null +++ b/sdks/java/src/main/java/com/thoughtspot/client/model/AnswerContent.java @@ -0,0 +1,525 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client.model; + +import com.google.gson.Gson; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.TypeAdapter; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.annotations.SerializedName; +import com.google.gson.reflect.TypeToken; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import com.thoughtspot.client.JSON; +import java.io.IOException; +import java.io.Serializable; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Objects; + +/** AnswerContent */ +@javax.annotation.Generated( + value = "org.openapitools.codegen.languages.JavaClientCodegen", + comments = "Generator version: 7.12.0") +public class AnswerContent implements Serializable { + private static final long serialVersionUID = 1L; + + public static final String SERIALIZED_NAME_AVAILABLE_DATA_ROW_COUNT = + "available_data_row_count"; + + @SerializedName(SERIALIZED_NAME_AVAILABLE_DATA_ROW_COUNT) + @javax.annotation.Nonnull + private Integer availableDataRowCount; + + public static final String SERIALIZED_NAME_COLUMN_NAMES = "column_names"; + + @SerializedName(SERIALIZED_NAME_COLUMN_NAMES) + @javax.annotation.Nonnull + private List columnNames; + + public static final String SERIALIZED_NAME_DATA_ROWS = "data_rows"; + + @SerializedName(SERIALIZED_NAME_DATA_ROWS) + @javax.annotation.Nonnull + private List dataRows; + + public static final String SERIALIZED_NAME_RECORD_OFFSET = "record_offset"; + + @SerializedName(SERIALIZED_NAME_RECORD_OFFSET) + @javax.annotation.Nonnull + private Integer recordOffset; + + public static final String SERIALIZED_NAME_RECORD_SIZE = "record_size"; + + @SerializedName(SERIALIZED_NAME_RECORD_SIZE) + @javax.annotation.Nonnull + private Integer recordSize; + + public static final String SERIALIZED_NAME_RETURNED_DATA_ROW_COUNT = "returned_data_row_count"; + + @SerializedName(SERIALIZED_NAME_RETURNED_DATA_ROW_COUNT) + @javax.annotation.Nonnull + private Integer returnedDataRowCount; + + public static final String SERIALIZED_NAME_SAMPLING_RATIO = "sampling_ratio"; + + @SerializedName(SERIALIZED_NAME_SAMPLING_RATIO) + @javax.annotation.Nonnull + private Float samplingRatio; + + public AnswerContent() {} + + public AnswerContent availableDataRowCount( + @javax.annotation.Nonnull Integer availableDataRowCount) { + this.availableDataRowCount = availableDataRowCount; + return this; + } + + /** + * Total available data row count. + * + * @return availableDataRowCount + */ + @javax.annotation.Nonnull + public Integer getAvailableDataRowCount() { + return availableDataRowCount; + } + + public void setAvailableDataRowCount(@javax.annotation.Nonnull Integer availableDataRowCount) { + this.availableDataRowCount = availableDataRowCount; + } + + public AnswerContent columnNames(@javax.annotation.Nonnull List columnNames) { + this.columnNames = columnNames; + return this; + } + + public AnswerContent addColumnNamesItem(String columnNamesItem) { + if (this.columnNames == null) { + this.columnNames = new ArrayList<>(); + } + this.columnNames.add(columnNamesItem); + return this; + } + + /** + * Name of the columns. + * + * @return columnNames + */ + @javax.annotation.Nonnull + public List getColumnNames() { + return columnNames; + } + + public void setColumnNames(@javax.annotation.Nonnull List columnNames) { + this.columnNames = columnNames; + } + + public AnswerContent dataRows(@javax.annotation.Nonnull List dataRows) { + this.dataRows = dataRows; + return this; + } + + public AnswerContent addDataRowsItem(Object dataRowsItem) { + if (this.dataRows == null) { + this.dataRows = new ArrayList<>(); + } + this.dataRows.add(dataRowsItem); + return this; + } + + /** + * Rows of data set. + * + * @return dataRows + */ + @javax.annotation.Nonnull + public List getDataRows() { + return dataRows; + } + + public void setDataRows(@javax.annotation.Nonnull List dataRows) { + this.dataRows = dataRows; + } + + public AnswerContent recordOffset(@javax.annotation.Nonnull Integer recordOffset) { + this.recordOffset = recordOffset; + return this; + } + + /** + * The starting record number from where the records should be included. + * + * @return recordOffset + */ + @javax.annotation.Nonnull + public Integer getRecordOffset() { + return recordOffset; + } + + public void setRecordOffset(@javax.annotation.Nonnull Integer recordOffset) { + this.recordOffset = recordOffset; + } + + public AnswerContent recordSize(@javax.annotation.Nonnull Integer recordSize) { + this.recordSize = recordSize; + return this; + } + + /** + * The number of records that should be included. + * + * @return recordSize + */ + @javax.annotation.Nonnull + public Integer getRecordSize() { + return recordSize; + } + + public void setRecordSize(@javax.annotation.Nonnull Integer recordSize) { + this.recordSize = recordSize; + } + + public AnswerContent returnedDataRowCount( + @javax.annotation.Nonnull Integer returnedDataRowCount) { + this.returnedDataRowCount = returnedDataRowCount; + return this; + } + + /** + * Total returned data row count. + * + * @return returnedDataRowCount + */ + @javax.annotation.Nonnull + public Integer getReturnedDataRowCount() { + return returnedDataRowCount; + } + + public void setReturnedDataRowCount(@javax.annotation.Nonnull Integer returnedDataRowCount) { + this.returnedDataRowCount = returnedDataRowCount; + } + + public AnswerContent samplingRatio(@javax.annotation.Nonnull Float samplingRatio) { + this.samplingRatio = samplingRatio; + return this; + } + + /** + * Sampling ratio (0 to 1). If the query was sampled, it is the ratio of keys returned in the + * data set to the total number of keys expected in the query. If the value is 1.0, this means + * that the complete result is returned. + * + * @return samplingRatio + */ + @javax.annotation.Nonnull + public Float getSamplingRatio() { + return samplingRatio; + } + + public void setSamplingRatio(@javax.annotation.Nonnull Float samplingRatio) { + this.samplingRatio = samplingRatio; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key name of the property + * @param value value of the property + * @return the AnswerContent instance itself + */ + public AnswerContent putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return a map of objects + */ + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key name of the property + * @return an object + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + AnswerContent answerContent = (AnswerContent) o; + return Objects.equals(this.availableDataRowCount, answerContent.availableDataRowCount) + && Objects.equals(this.columnNames, answerContent.columnNames) + && Objects.equals(this.dataRows, answerContent.dataRows) + && Objects.equals(this.recordOffset, answerContent.recordOffset) + && Objects.equals(this.recordSize, answerContent.recordSize) + && Objects.equals(this.returnedDataRowCount, answerContent.returnedDataRowCount) + && Objects.equals(this.samplingRatio, answerContent.samplingRatio) + && Objects.equals(this.additionalProperties, answerContent.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash( + availableDataRowCount, + columnNames, + dataRows, + recordOffset, + recordSize, + returnedDataRowCount, + samplingRatio, + additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class AnswerContent {\n"); + sb.append(" availableDataRowCount: ") + .append(toIndentedString(availableDataRowCount)) + .append("\n"); + sb.append(" columnNames: ").append(toIndentedString(columnNames)).append("\n"); + sb.append(" dataRows: ").append(toIndentedString(dataRows)).append("\n"); + sb.append(" recordOffset: ").append(toIndentedString(recordOffset)).append("\n"); + sb.append(" recordSize: ").append(toIndentedString(recordSize)).append("\n"); + sb.append(" returnedDataRowCount: ") + .append(toIndentedString(returnedDataRowCount)) + .append("\n"); + sb.append(" samplingRatio: ").append(toIndentedString(samplingRatio)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first + * line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("available_data_row_count"); + openapiFields.add("column_names"); + openapiFields.add("data_rows"); + openapiFields.add("record_offset"); + openapiFields.add("record_size"); + openapiFields.add("returned_data_row_count"); + openapiFields.add("sampling_ratio"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + openapiRequiredFields.add("available_data_row_count"); + openapiRequiredFields.add("column_names"); + openapiRequiredFields.add("data_rows"); + openapiRequiredFields.add("record_offset"); + openapiRequiredFields.add("record_size"); + openapiRequiredFields.add("returned_data_row_count"); + openapiRequiredFields.add("sampling_ratio"); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to AnswerContent + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!AnswerContent.openapiRequiredFields + .isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException( + String.format( + "The required field(s) %s in AnswerContent is not found in the" + + " empty JSON string", + AnswerContent.openapiRequiredFields.toString())); + } + } + + // check to make sure all required properties/fields are present in the JSON string + for (String requiredField : AnswerContent.openapiRequiredFields) { + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException( + String.format( + "The required field `%s` is not found in the JSON string: %s", + requiredField, jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // ensure the required json array is present + if (jsonObj.get("column_names") == null) { + throw new IllegalArgumentException( + "Expected the field `linkedContent` to be an array in the JSON string but got" + + " `null`"); + } else if (!jsonObj.get("column_names").isJsonArray()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `column_names` to be an array in the JSON string" + + " but got `%s`", + jsonObj.get("column_names").toString())); + } + // ensure the required json array is present + if (jsonObj.get("data_rows") == null) { + throw new IllegalArgumentException( + "Expected the field `linkedContent` to be an array in the JSON string but got" + + " `null`"); + } else if (!jsonObj.get("data_rows").isJsonArray()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `data_rows` to be an array in the JSON string but" + + " got `%s`", + jsonObj.get("data_rows").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!AnswerContent.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'AnswerContent' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter = + gson.getDelegateAdapter(this, TypeToken.get(AnswerContent.class)); + + return (TypeAdapter) + new TypeAdapter() { + @Override + public void write(JsonWriter out, AnswerContent value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + obj.remove("additionalProperties"); + // serialize additional properties + if (value.getAdditionalProperties() != null) { + for (Map.Entry entry : + value.getAdditionalProperties().entrySet()) { + if (entry.getValue() instanceof String) + obj.addProperty(entry.getKey(), (String) entry.getValue()); + else if (entry.getValue() instanceof Number) + obj.addProperty(entry.getKey(), (Number) entry.getValue()); + else if (entry.getValue() instanceof Boolean) + obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); + else if (entry.getValue() instanceof Character) + obj.addProperty( + entry.getKey(), (Character) entry.getValue()); + else { + JsonElement jsonElement = gson.toJsonTree(entry.getValue()); + if (jsonElement.isJsonArray()) { + obj.add(entry.getKey(), jsonElement.getAsJsonArray()); + } else { + obj.add(entry.getKey(), jsonElement.getAsJsonObject()); + } + } + } + } + elementAdapter.write(out, obj); + } + + @Override + public AnswerContent read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // store additional fields in the deserialized instance + AnswerContent instance = thisAdapter.fromJsonTree(jsonObj); + for (Map.Entry entry : jsonObj.entrySet()) { + if (!openapiFields.contains(entry.getKey())) { + if (entry.getValue().isJsonPrimitive()) { // primitive type + if (entry.getValue().getAsJsonPrimitive().isString()) + instance.putAdditionalProperty( + entry.getKey(), entry.getValue().getAsString()); + else if (entry.getValue().getAsJsonPrimitive().isNumber()) + instance.putAdditionalProperty( + entry.getKey(), entry.getValue().getAsNumber()); + else if (entry.getValue().getAsJsonPrimitive().isBoolean()) + instance.putAdditionalProperty( + entry.getKey(), + entry.getValue().getAsBoolean()); + else + throw new IllegalArgumentException( + String.format( + "The field `%s` has unknown primitive" + + " type. Value: %s", + entry.getKey(), + entry.getValue().toString())); + } else if (entry.getValue().isJsonArray()) { + instance.putAdditionalProperty( + entry.getKey(), + gson.fromJson(entry.getValue(), List.class)); + } else { // JSON object + instance.putAdditionalProperty( + entry.getKey(), + gson.fromJson(entry.getValue(), HashMap.class)); + } + } + } + return instance; + } + }.nullSafe(); + } + } + + /** + * Create an instance of AnswerContent given an JSON string + * + * @param jsonString JSON string + * @return An instance of AnswerContent + * @throws IOException if the JSON string is invalid with respect to AnswerContent + */ + public static AnswerContent fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, AnswerContent.class); + } + + /** + * Convert an instance of AnswerContent to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} diff --git a/sdks/java/src/main/java/com/thoughtspot/client/model/AnswerDataResponse.java b/sdks/java/src/main/java/com/thoughtspot/client/model/AnswerDataResponse.java new file mode 100644 index 000000000..fb41d16ff --- /dev/null +++ b/sdks/java/src/main/java/com/thoughtspot/client/model/AnswerDataResponse.java @@ -0,0 +1,392 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client.model; + +import com.google.gson.Gson; +import com.google.gson.JsonArray; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.TypeAdapter; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.annotations.SerializedName; +import com.google.gson.reflect.TypeToken; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import com.thoughtspot.client.JSON; +import java.io.IOException; +import java.io.Serializable; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Objects; + +/** Response format associated with fetch data api */ +@javax.annotation.Generated( + value = "org.openapitools.codegen.languages.JavaClientCodegen", + comments = "Generator version: 7.12.0") +public class AnswerDataResponse implements Serializable { + private static final long serialVersionUID = 1L; + + public static final String SERIALIZED_NAME_METADATA_ID = "metadata_id"; + + @SerializedName(SERIALIZED_NAME_METADATA_ID) + @javax.annotation.Nonnull + private String metadataId; + + public static final String SERIALIZED_NAME_METADATA_NAME = "metadata_name"; + + @SerializedName(SERIALIZED_NAME_METADATA_NAME) + @javax.annotation.Nonnull + private String metadataName; + + public static final String SERIALIZED_NAME_CONTENTS = "contents"; + + @SerializedName(SERIALIZED_NAME_CONTENTS) + @javax.annotation.Nonnull + private List contents; + + public AnswerDataResponse() {} + + public AnswerDataResponse metadataId(@javax.annotation.Nonnull String metadataId) { + this.metadataId = metadataId; + return this; + } + + /** + * The unique identifier of the object + * + * @return metadataId + */ + @javax.annotation.Nonnull + public String getMetadataId() { + return metadataId; + } + + public void setMetadataId(@javax.annotation.Nonnull String metadataId) { + this.metadataId = metadataId; + } + + public AnswerDataResponse metadataName(@javax.annotation.Nonnull String metadataName) { + this.metadataName = metadataName; + return this; + } + + /** + * Name of the metadata object + * + * @return metadataName + */ + @javax.annotation.Nonnull + public String getMetadataName() { + return metadataName; + } + + public void setMetadataName(@javax.annotation.Nonnull String metadataName) { + this.metadataName = metadataName; + } + + public AnswerDataResponse contents(@javax.annotation.Nonnull List contents) { + this.contents = contents; + return this; + } + + public AnswerDataResponse addContentsItem(AnswerContent contentsItem) { + if (this.contents == null) { + this.contents = new ArrayList<>(); + } + this.contents.add(contentsItem); + return this; + } + + /** + * Data content of metadata objects + * + * @return contents + */ + @javax.annotation.Nonnull + public List getContents() { + return contents; + } + + public void setContents(@javax.annotation.Nonnull List contents) { + this.contents = contents; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key name of the property + * @param value value of the property + * @return the AnswerDataResponse instance itself + */ + public AnswerDataResponse putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return a map of objects + */ + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key name of the property + * @return an object + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + AnswerDataResponse answerDataResponse = (AnswerDataResponse) o; + return Objects.equals(this.metadataId, answerDataResponse.metadataId) + && Objects.equals(this.metadataName, answerDataResponse.metadataName) + && Objects.equals(this.contents, answerDataResponse.contents) + && Objects.equals( + this.additionalProperties, answerDataResponse.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(metadataId, metadataName, contents, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class AnswerDataResponse {\n"); + sb.append(" metadataId: ").append(toIndentedString(metadataId)).append("\n"); + sb.append(" metadataName: ").append(toIndentedString(metadataName)).append("\n"); + sb.append(" contents: ").append(toIndentedString(contents)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first + * line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("metadata_id"); + openapiFields.add("metadata_name"); + openapiFields.add("contents"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + openapiRequiredFields.add("metadata_id"); + openapiRequiredFields.add("metadata_name"); + openapiRequiredFields.add("contents"); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to AnswerDataResponse + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!AnswerDataResponse.openapiRequiredFields + .isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException( + String.format( + "The required field(s) %s in AnswerDataResponse is not found in" + + " the empty JSON string", + AnswerDataResponse.openapiRequiredFields.toString())); + } + } + + // check to make sure all required properties/fields are present in the JSON string + for (String requiredField : AnswerDataResponse.openapiRequiredFields) { + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException( + String.format( + "The required field `%s` is not found in the JSON string: %s", + requiredField, jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if (!jsonObj.get("metadata_id").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `metadata_id` to be a primitive type in the JSON" + + " string but got `%s`", + jsonObj.get("metadata_id").toString())); + } + if (!jsonObj.get("metadata_name").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `metadata_name` to be a primitive type in the JSON" + + " string but got `%s`", + jsonObj.get("metadata_name").toString())); + } + // ensure the json data is an array + if (!jsonObj.get("contents").isJsonArray()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `contents` to be an array in the JSON string but" + + " got `%s`", + jsonObj.get("contents").toString())); + } + + JsonArray jsonArraycontents = jsonObj.getAsJsonArray("contents"); + // validate the required field `contents` (array) + for (int i = 0; i < jsonArraycontents.size(); i++) { + AnswerContent.validateJsonElement(jsonArraycontents.get(i)); + } + ; + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!AnswerDataResponse.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'AnswerDataResponse' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter = + gson.getDelegateAdapter(this, TypeToken.get(AnswerDataResponse.class)); + + return (TypeAdapter) + new TypeAdapter() { + @Override + public void write(JsonWriter out, AnswerDataResponse value) + throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + obj.remove("additionalProperties"); + // serialize additional properties + if (value.getAdditionalProperties() != null) { + for (Map.Entry entry : + value.getAdditionalProperties().entrySet()) { + if (entry.getValue() instanceof String) + obj.addProperty(entry.getKey(), (String) entry.getValue()); + else if (entry.getValue() instanceof Number) + obj.addProperty(entry.getKey(), (Number) entry.getValue()); + else if (entry.getValue() instanceof Boolean) + obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); + else if (entry.getValue() instanceof Character) + obj.addProperty( + entry.getKey(), (Character) entry.getValue()); + else { + JsonElement jsonElement = gson.toJsonTree(entry.getValue()); + if (jsonElement.isJsonArray()) { + obj.add(entry.getKey(), jsonElement.getAsJsonArray()); + } else { + obj.add(entry.getKey(), jsonElement.getAsJsonObject()); + } + } + } + } + elementAdapter.write(out, obj); + } + + @Override + public AnswerDataResponse read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // store additional fields in the deserialized instance + AnswerDataResponse instance = thisAdapter.fromJsonTree(jsonObj); + for (Map.Entry entry : jsonObj.entrySet()) { + if (!openapiFields.contains(entry.getKey())) { + if (entry.getValue().isJsonPrimitive()) { // primitive type + if (entry.getValue().getAsJsonPrimitive().isString()) + instance.putAdditionalProperty( + entry.getKey(), entry.getValue().getAsString()); + else if (entry.getValue().getAsJsonPrimitive().isNumber()) + instance.putAdditionalProperty( + entry.getKey(), entry.getValue().getAsNumber()); + else if (entry.getValue().getAsJsonPrimitive().isBoolean()) + instance.putAdditionalProperty( + entry.getKey(), + entry.getValue().getAsBoolean()); + else + throw new IllegalArgumentException( + String.format( + "The field `%s` has unknown primitive" + + " type. Value: %s", + entry.getKey(), + entry.getValue().toString())); + } else if (entry.getValue().isJsonArray()) { + instance.putAdditionalProperty( + entry.getKey(), + gson.fromJson(entry.getValue(), List.class)); + } else { // JSON object + instance.putAdditionalProperty( + entry.getKey(), + gson.fromJson(entry.getValue(), HashMap.class)); + } + } + } + return instance; + } + }.nullSafe(); + } + } + + /** + * Create an instance of AnswerDataResponse given an JSON string + * + * @param jsonString JSON string + * @return An instance of AnswerDataResponse + * @throws IOException if the JSON string is invalid with respect to AnswerDataResponse + */ + public static AnswerDataResponse fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, AnswerDataResponse.class); + } + + /** + * Convert an instance of AnswerDataResponse to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} diff --git a/sdks/java/src/main/java/com/thoughtspot/client/model/AnswerPngOptionsInput.java b/sdks/java/src/main/java/com/thoughtspot/client/model/AnswerPngOptionsInput.java new file mode 100644 index 000000000..fbcf01b73 --- /dev/null +++ b/sdks/java/src/main/java/com/thoughtspot/client/model/AnswerPngOptionsInput.java @@ -0,0 +1,360 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client.model; + +import com.google.gson.Gson; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.TypeAdapter; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.annotations.SerializedName; +import com.google.gson.reflect.TypeToken; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import com.thoughtspot.client.JSON; +import java.io.IOException; +import java.io.Serializable; +import java.util.Arrays; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Objects; +import org.openapitools.jackson.nullable.JsonNullable; + +/** AnswerPngOptionsInput */ +@javax.annotation.Generated( + value = "org.openapitools.codegen.languages.JavaClientCodegen", + comments = "Generator version: 7.12.0") +public class AnswerPngOptionsInput implements Serializable { + private static final long serialVersionUID = 1L; + + public static final String SERIALIZED_NAME_X_RESOLUTION = "x_resolution"; + + @SerializedName(SERIALIZED_NAME_X_RESOLUTION) + @javax.annotation.Nullable + private Integer xResolution; + + public static final String SERIALIZED_NAME_Y_RESOLUTION = "y_resolution"; + + @SerializedName(SERIALIZED_NAME_Y_RESOLUTION) + @javax.annotation.Nullable + private Integer yResolution; + + public static final String SERIALIZED_NAME_SCALING = "scaling"; + + @SerializedName(SERIALIZED_NAME_SCALING) + @javax.annotation.Nullable + private Integer scaling; + + public AnswerPngOptionsInput() {} + + public AnswerPngOptionsInput xResolution(@javax.annotation.Nullable Integer xResolution) { + this.xResolution = xResolution; + return this; + } + + /** + * Desired width of the answer image in pixels. Ex. 1920 for Full HD image Version: 26.6.0.cl or + * later + * + * @return xResolution + */ + @javax.annotation.Nullable + public Integer getxResolution() { + return xResolution; + } + + public void setxResolution(@javax.annotation.Nullable Integer xResolution) { + this.xResolution = xResolution; + } + + public AnswerPngOptionsInput yResolution(@javax.annotation.Nullable Integer yResolution) { + this.yResolution = yResolution; + return this; + } + + /** + * Desired height of the answer image in pixels. Ex. 1080 for Full HD image Version: 26.6.0.cl + * or later + * + * @return yResolution + */ + @javax.annotation.Nullable + public Integer getyResolution() { + return yResolution; + } + + public void setyResolution(@javax.annotation.Nullable Integer yResolution) { + this.yResolution = yResolution; + } + + public AnswerPngOptionsInput scaling(@javax.annotation.Nullable Integer scaling) { + this.scaling = scaling; + return this; + } + + /** + * The scale of the image in percentage. Ex. 100 for 100% scale. Version: 26.6.0.cl or later + * + * @return scaling + */ + @javax.annotation.Nullable + public Integer getScaling() { + return scaling; + } + + public void setScaling(@javax.annotation.Nullable Integer scaling) { + this.scaling = scaling; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key name of the property + * @param value value of the property + * @return the AnswerPngOptionsInput instance itself + */ + public AnswerPngOptionsInput putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return a map of objects + */ + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key name of the property + * @return an object + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + AnswerPngOptionsInput answerPngOptionsInput = (AnswerPngOptionsInput) o; + return Objects.equals(this.xResolution, answerPngOptionsInput.xResolution) + && Objects.equals(this.yResolution, answerPngOptionsInput.yResolution) + && Objects.equals(this.scaling, answerPngOptionsInput.scaling) + && Objects.equals( + this.additionalProperties, answerPngOptionsInput.additionalProperties); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b + || (a != null + && b != null + && a.isPresent() + && b.isPresent() + && Objects.deepEquals(a.get(), b.get())); + } + + @Override + public int hashCode() { + return Objects.hash(xResolution, yResolution, scaling, additionalProperties); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; + } + return a.isPresent() ? Arrays.deepHashCode(new Object[] {a.get()}) : 31; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class AnswerPngOptionsInput {\n"); + sb.append(" xResolution: ").append(toIndentedString(xResolution)).append("\n"); + sb.append(" yResolution: ").append(toIndentedString(yResolution)).append("\n"); + sb.append(" scaling: ").append(toIndentedString(scaling)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first + * line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("x_resolution"); + openapiFields.add("y_resolution"); + openapiFields.add("scaling"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to AnswerPngOptionsInput + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!AnswerPngOptionsInput.openapiRequiredFields + .isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException( + String.format( + "The required field(s) %s in AnswerPngOptionsInput is not found in" + + " the empty JSON string", + AnswerPngOptionsInput.openapiRequiredFields.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!AnswerPngOptionsInput.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'AnswerPngOptionsInput' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter = + gson.getDelegateAdapter(this, TypeToken.get(AnswerPngOptionsInput.class)); + + return (TypeAdapter) + new TypeAdapter() { + @Override + public void write(JsonWriter out, AnswerPngOptionsInput value) + throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + obj.remove("additionalProperties"); + // serialize additional properties + if (value.getAdditionalProperties() != null) { + for (Map.Entry entry : + value.getAdditionalProperties().entrySet()) { + if (entry.getValue() instanceof String) + obj.addProperty(entry.getKey(), (String) entry.getValue()); + else if (entry.getValue() instanceof Number) + obj.addProperty(entry.getKey(), (Number) entry.getValue()); + else if (entry.getValue() instanceof Boolean) + obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); + else if (entry.getValue() instanceof Character) + obj.addProperty( + entry.getKey(), (Character) entry.getValue()); + else { + JsonElement jsonElement = gson.toJsonTree(entry.getValue()); + if (jsonElement.isJsonArray()) { + obj.add(entry.getKey(), jsonElement.getAsJsonArray()); + } else { + obj.add(entry.getKey(), jsonElement.getAsJsonObject()); + } + } + } + } + elementAdapter.write(out, obj); + } + + @Override + public AnswerPngOptionsInput read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // store additional fields in the deserialized instance + AnswerPngOptionsInput instance = thisAdapter.fromJsonTree(jsonObj); + for (Map.Entry entry : jsonObj.entrySet()) { + if (!openapiFields.contains(entry.getKey())) { + if (entry.getValue().isJsonPrimitive()) { // primitive type + if (entry.getValue().getAsJsonPrimitive().isString()) + instance.putAdditionalProperty( + entry.getKey(), entry.getValue().getAsString()); + else if (entry.getValue().getAsJsonPrimitive().isNumber()) + instance.putAdditionalProperty( + entry.getKey(), entry.getValue().getAsNumber()); + else if (entry.getValue().getAsJsonPrimitive().isBoolean()) + instance.putAdditionalProperty( + entry.getKey(), + entry.getValue().getAsBoolean()); + else + throw new IllegalArgumentException( + String.format( + "The field `%s` has unknown primitive" + + " type. Value: %s", + entry.getKey(), + entry.getValue().toString())); + } else if (entry.getValue().isJsonArray()) { + instance.putAdditionalProperty( + entry.getKey(), + gson.fromJson(entry.getValue(), List.class)); + } else { // JSON object + instance.putAdditionalProperty( + entry.getKey(), + gson.fromJson(entry.getValue(), HashMap.class)); + } + } + } + return instance; + } + }.nullSafe(); + } + } + + /** + * Create an instance of AnswerPngOptionsInput given an JSON string + * + * @param jsonString JSON string + * @return An instance of AnswerPngOptionsInput + * @throws IOException if the JSON string is invalid with respect to AnswerPngOptionsInput + */ + public static AnswerPngOptionsInput fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, AnswerPngOptionsInput.class); + } + + /** + * Convert an instance of AnswerPngOptionsInput to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} diff --git a/sdks/java/src/main/java/com/thoughtspot/client/model/AssignChangeAuthorRequest.java b/sdks/java/src/main/java/com/thoughtspot/client/model/AssignChangeAuthorRequest.java new file mode 100644 index 000000000..c89553a20 --- /dev/null +++ b/sdks/java/src/main/java/com/thoughtspot/client/model/AssignChangeAuthorRequest.java @@ -0,0 +1,404 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client.model; + +import com.google.gson.Gson; +import com.google.gson.JsonArray; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.TypeAdapter; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.annotations.SerializedName; +import com.google.gson.reflect.TypeToken; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import com.thoughtspot.client.JSON; +import java.io.IOException; +import java.io.Serializable; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Objects; + +/** AssignChangeAuthorRequest */ +@javax.annotation.Generated( + value = "org.openapitools.codegen.languages.JavaClientCodegen", + comments = "Generator version: 7.12.0") +public class AssignChangeAuthorRequest implements Serializable { + private static final long serialVersionUID = 1L; + + public static final String SERIALIZED_NAME_METADATA = "metadata"; + + @SerializedName(SERIALIZED_NAME_METADATA) + @javax.annotation.Nonnull + private List metadata; + + public static final String SERIALIZED_NAME_USER_IDENTIFIER = "user_identifier"; + + @SerializedName(SERIALIZED_NAME_USER_IDENTIFIER) + @javax.annotation.Nonnull + private String userIdentifier; + + public static final String SERIALIZED_NAME_CURRENT_OWNER_IDENTIFIER = + "current_owner_identifier"; + + @SerializedName(SERIALIZED_NAME_CURRENT_OWNER_IDENTIFIER) + @javax.annotation.Nullable + private String currentOwnerIdentifier; + + public AssignChangeAuthorRequest() {} + + public AssignChangeAuthorRequest metadata( + @javax.annotation.Nonnull List metadata) { + this.metadata = metadata; + return this; + } + + public AssignChangeAuthorRequest addMetadataItem(AuthorMetadataTypeInput metadataItem) { + if (this.metadata == null) { + this.metadata = new ArrayList<>(); + } + this.metadata.add(metadataItem); + return this; + } + + /** + * GUID or name of the metadata object. + * + * @return metadata + */ + @javax.annotation.Nonnull + public List getMetadata() { + return metadata; + } + + public void setMetadata(@javax.annotation.Nonnull List metadata) { + this.metadata = metadata; + } + + public AssignChangeAuthorRequest userIdentifier( + @javax.annotation.Nonnull String userIdentifier) { + this.userIdentifier = userIdentifier; + return this; + } + + /** + * GUID or name of the user who you want to assign as the author. + * + * @return userIdentifier + */ + @javax.annotation.Nonnull + public String getUserIdentifier() { + return userIdentifier; + } + + public void setUserIdentifier(@javax.annotation.Nonnull String userIdentifier) { + this.userIdentifier = userIdentifier; + } + + public AssignChangeAuthorRequest currentOwnerIdentifier( + @javax.annotation.Nullable String currentOwnerIdentifier) { + this.currentOwnerIdentifier = currentOwnerIdentifier; + return this; + } + + /** + * GUID or name of the current author. When defined, the metadata objects authored by the + * specified owner are filtered for the API operation. + * + * @return currentOwnerIdentifier + */ + @javax.annotation.Nullable + public String getCurrentOwnerIdentifier() { + return currentOwnerIdentifier; + } + + public void setCurrentOwnerIdentifier( + @javax.annotation.Nullable String currentOwnerIdentifier) { + this.currentOwnerIdentifier = currentOwnerIdentifier; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key name of the property + * @param value value of the property + * @return the AssignChangeAuthorRequest instance itself + */ + public AssignChangeAuthorRequest putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return a map of objects + */ + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key name of the property + * @return an object + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + AssignChangeAuthorRequest assignChangeAuthorRequest = (AssignChangeAuthorRequest) o; + return Objects.equals(this.metadata, assignChangeAuthorRequest.metadata) + && Objects.equals(this.userIdentifier, assignChangeAuthorRequest.userIdentifier) + && Objects.equals( + this.currentOwnerIdentifier, + assignChangeAuthorRequest.currentOwnerIdentifier) + && Objects.equals( + this.additionalProperties, assignChangeAuthorRequest.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(metadata, userIdentifier, currentOwnerIdentifier, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class AssignChangeAuthorRequest {\n"); + sb.append(" metadata: ").append(toIndentedString(metadata)).append("\n"); + sb.append(" userIdentifier: ").append(toIndentedString(userIdentifier)).append("\n"); + sb.append(" currentOwnerIdentifier: ") + .append(toIndentedString(currentOwnerIdentifier)) + .append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first + * line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("metadata"); + openapiFields.add("user_identifier"); + openapiFields.add("current_owner_identifier"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + openapiRequiredFields.add("metadata"); + openapiRequiredFields.add("user_identifier"); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to AssignChangeAuthorRequest + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!AssignChangeAuthorRequest.openapiRequiredFields + .isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException( + String.format( + "The required field(s) %s in AssignChangeAuthorRequest is not" + + " found in the empty JSON string", + AssignChangeAuthorRequest.openapiRequiredFields.toString())); + } + } + + // check to make sure all required properties/fields are present in the JSON string + for (String requiredField : AssignChangeAuthorRequest.openapiRequiredFields) { + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException( + String.format( + "The required field `%s` is not found in the JSON string: %s", + requiredField, jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // ensure the json data is an array + if (!jsonObj.get("metadata").isJsonArray()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `metadata` to be an array in the JSON string but" + + " got `%s`", + jsonObj.get("metadata").toString())); + } + + JsonArray jsonArraymetadata = jsonObj.getAsJsonArray("metadata"); + // validate the required field `metadata` (array) + for (int i = 0; i < jsonArraymetadata.size(); i++) { + AuthorMetadataTypeInput.validateJsonElement(jsonArraymetadata.get(i)); + } + ; + if (!jsonObj.get("user_identifier").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `user_identifier` to be a primitive type in the" + + " JSON string but got `%s`", + jsonObj.get("user_identifier").toString())); + } + if ((jsonObj.get("current_owner_identifier") != null + && !jsonObj.get("current_owner_identifier").isJsonNull()) + && !jsonObj.get("current_owner_identifier").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `current_owner_identifier` to be a primitive type" + + " in the JSON string but got `%s`", + jsonObj.get("current_owner_identifier").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!AssignChangeAuthorRequest.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'AssignChangeAuthorRequest' and its + // subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter = + gson.getDelegateAdapter(this, TypeToken.get(AssignChangeAuthorRequest.class)); + + return (TypeAdapter) + new TypeAdapter() { + @Override + public void write(JsonWriter out, AssignChangeAuthorRequest value) + throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + obj.remove("additionalProperties"); + // serialize additional properties + if (value.getAdditionalProperties() != null) { + for (Map.Entry entry : + value.getAdditionalProperties().entrySet()) { + if (entry.getValue() instanceof String) + obj.addProperty(entry.getKey(), (String) entry.getValue()); + else if (entry.getValue() instanceof Number) + obj.addProperty(entry.getKey(), (Number) entry.getValue()); + else if (entry.getValue() instanceof Boolean) + obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); + else if (entry.getValue() instanceof Character) + obj.addProperty( + entry.getKey(), (Character) entry.getValue()); + else { + JsonElement jsonElement = gson.toJsonTree(entry.getValue()); + if (jsonElement.isJsonArray()) { + obj.add(entry.getKey(), jsonElement.getAsJsonArray()); + } else { + obj.add(entry.getKey(), jsonElement.getAsJsonObject()); + } + } + } + } + elementAdapter.write(out, obj); + } + + @Override + public AssignChangeAuthorRequest read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // store additional fields in the deserialized instance + AssignChangeAuthorRequest instance = thisAdapter.fromJsonTree(jsonObj); + for (Map.Entry entry : jsonObj.entrySet()) { + if (!openapiFields.contains(entry.getKey())) { + if (entry.getValue().isJsonPrimitive()) { // primitive type + if (entry.getValue().getAsJsonPrimitive().isString()) + instance.putAdditionalProperty( + entry.getKey(), entry.getValue().getAsString()); + else if (entry.getValue().getAsJsonPrimitive().isNumber()) + instance.putAdditionalProperty( + entry.getKey(), entry.getValue().getAsNumber()); + else if (entry.getValue().getAsJsonPrimitive().isBoolean()) + instance.putAdditionalProperty( + entry.getKey(), + entry.getValue().getAsBoolean()); + else + throw new IllegalArgumentException( + String.format( + "The field `%s` has unknown primitive" + + " type. Value: %s", + entry.getKey(), + entry.getValue().toString())); + } else if (entry.getValue().isJsonArray()) { + instance.putAdditionalProperty( + entry.getKey(), + gson.fromJson(entry.getValue(), List.class)); + } else { // JSON object + instance.putAdditionalProperty( + entry.getKey(), + gson.fromJson(entry.getValue(), HashMap.class)); + } + } + } + return instance; + } + }.nullSafe(); + } + } + + /** + * Create an instance of AssignChangeAuthorRequest given an JSON string + * + * @param jsonString JSON string + * @return An instance of AssignChangeAuthorRequest + * @throws IOException if the JSON string is invalid with respect to AssignChangeAuthorRequest + */ + public static AssignChangeAuthorRequest fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, AssignChangeAuthorRequest.class); + } + + /** + * Convert an instance of AssignChangeAuthorRequest to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} diff --git a/sdks/java/src/main/java/com/thoughtspot/client/model/AssignTagRequest.java b/sdks/java/src/main/java/com/thoughtspot/client/model/AssignTagRequest.java new file mode 100644 index 000000000..9a830529e --- /dev/null +++ b/sdks/java/src/main/java/com/thoughtspot/client/model/AssignTagRequest.java @@ -0,0 +1,369 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client.model; + +import com.google.gson.Gson; +import com.google.gson.JsonArray; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.TypeAdapter; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.annotations.SerializedName; +import com.google.gson.reflect.TypeToken; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import com.thoughtspot.client.JSON; +import java.io.IOException; +import java.io.Serializable; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Objects; + +/** AssignTagRequest */ +@javax.annotation.Generated( + value = "org.openapitools.codegen.languages.JavaClientCodegen", + comments = "Generator version: 7.12.0") +public class AssignTagRequest implements Serializable { + private static final long serialVersionUID = 1L; + + public static final String SERIALIZED_NAME_METADATA = "metadata"; + + @SerializedName(SERIALIZED_NAME_METADATA) + @javax.annotation.Nonnull + private List metadata; + + public static final String SERIALIZED_NAME_TAG_IDENTIFIERS = "tag_identifiers"; + + @SerializedName(SERIALIZED_NAME_TAG_IDENTIFIERS) + @javax.annotation.Nonnull + private List tagIdentifiers; + + public AssignTagRequest() {} + + public AssignTagRequest metadata( + @javax.annotation.Nonnull List metadata) { + this.metadata = metadata; + return this; + } + + public AssignTagRequest addMetadataItem(TagMetadataTypeInput metadataItem) { + if (this.metadata == null) { + this.metadata = new ArrayList<>(); + } + this.metadata.add(metadataItem); + return this; + } + + /** + * Metadata objects. + * + * @return metadata + */ + @javax.annotation.Nonnull + public List getMetadata() { + return metadata; + } + + public void setMetadata(@javax.annotation.Nonnull List metadata) { + this.metadata = metadata; + } + + public AssignTagRequest tagIdentifiers(@javax.annotation.Nonnull List tagIdentifiers) { + this.tagIdentifiers = tagIdentifiers; + return this; + } + + public AssignTagRequest addTagIdentifiersItem(String tagIdentifiersItem) { + if (this.tagIdentifiers == null) { + this.tagIdentifiers = new ArrayList<>(); + } + this.tagIdentifiers.add(tagIdentifiersItem); + return this; + } + + /** + * GUID or name of the tag. + * + * @return tagIdentifiers + */ + @javax.annotation.Nonnull + public List getTagIdentifiers() { + return tagIdentifiers; + } + + public void setTagIdentifiers(@javax.annotation.Nonnull List tagIdentifiers) { + this.tagIdentifiers = tagIdentifiers; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key name of the property + * @param value value of the property + * @return the AssignTagRequest instance itself + */ + public AssignTagRequest putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return a map of objects + */ + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key name of the property + * @return an object + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + AssignTagRequest assignTagRequest = (AssignTagRequest) o; + return Objects.equals(this.metadata, assignTagRequest.metadata) + && Objects.equals(this.tagIdentifiers, assignTagRequest.tagIdentifiers) + && Objects.equals(this.additionalProperties, assignTagRequest.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(metadata, tagIdentifiers, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class AssignTagRequest {\n"); + sb.append(" metadata: ").append(toIndentedString(metadata)).append("\n"); + sb.append(" tagIdentifiers: ").append(toIndentedString(tagIdentifiers)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first + * line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("metadata"); + openapiFields.add("tag_identifiers"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + openapiRequiredFields.add("metadata"); + openapiRequiredFields.add("tag_identifiers"); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to AssignTagRequest + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!AssignTagRequest.openapiRequiredFields + .isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException( + String.format( + "The required field(s) %s in AssignTagRequest is not found in the" + + " empty JSON string", + AssignTagRequest.openapiRequiredFields.toString())); + } + } + + // check to make sure all required properties/fields are present in the JSON string + for (String requiredField : AssignTagRequest.openapiRequiredFields) { + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException( + String.format( + "The required field `%s` is not found in the JSON string: %s", + requiredField, jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // ensure the json data is an array + if (!jsonObj.get("metadata").isJsonArray()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `metadata` to be an array in the JSON string but" + + " got `%s`", + jsonObj.get("metadata").toString())); + } + + JsonArray jsonArraymetadata = jsonObj.getAsJsonArray("metadata"); + // validate the required field `metadata` (array) + for (int i = 0; i < jsonArraymetadata.size(); i++) { + TagMetadataTypeInput.validateJsonElement(jsonArraymetadata.get(i)); + } + ; + // ensure the required json array is present + if (jsonObj.get("tag_identifiers") == null) { + throw new IllegalArgumentException( + "Expected the field `linkedContent` to be an array in the JSON string but got" + + " `null`"); + } else if (!jsonObj.get("tag_identifiers").isJsonArray()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `tag_identifiers` to be an array in the JSON" + + " string but got `%s`", + jsonObj.get("tag_identifiers").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!AssignTagRequest.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'AssignTagRequest' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter = + gson.getDelegateAdapter(this, TypeToken.get(AssignTagRequest.class)); + + return (TypeAdapter) + new TypeAdapter() { + @Override + public void write(JsonWriter out, AssignTagRequest value) + throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + obj.remove("additionalProperties"); + // serialize additional properties + if (value.getAdditionalProperties() != null) { + for (Map.Entry entry : + value.getAdditionalProperties().entrySet()) { + if (entry.getValue() instanceof String) + obj.addProperty(entry.getKey(), (String) entry.getValue()); + else if (entry.getValue() instanceof Number) + obj.addProperty(entry.getKey(), (Number) entry.getValue()); + else if (entry.getValue() instanceof Boolean) + obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); + else if (entry.getValue() instanceof Character) + obj.addProperty( + entry.getKey(), (Character) entry.getValue()); + else { + JsonElement jsonElement = gson.toJsonTree(entry.getValue()); + if (jsonElement.isJsonArray()) { + obj.add(entry.getKey(), jsonElement.getAsJsonArray()); + } else { + obj.add(entry.getKey(), jsonElement.getAsJsonObject()); + } + } + } + } + elementAdapter.write(out, obj); + } + + @Override + public AssignTagRequest read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // store additional fields in the deserialized instance + AssignTagRequest instance = thisAdapter.fromJsonTree(jsonObj); + for (Map.Entry entry : jsonObj.entrySet()) { + if (!openapiFields.contains(entry.getKey())) { + if (entry.getValue().isJsonPrimitive()) { // primitive type + if (entry.getValue().getAsJsonPrimitive().isString()) + instance.putAdditionalProperty( + entry.getKey(), entry.getValue().getAsString()); + else if (entry.getValue().getAsJsonPrimitive().isNumber()) + instance.putAdditionalProperty( + entry.getKey(), entry.getValue().getAsNumber()); + else if (entry.getValue().getAsJsonPrimitive().isBoolean()) + instance.putAdditionalProperty( + entry.getKey(), + entry.getValue().getAsBoolean()); + else + throw new IllegalArgumentException( + String.format( + "The field `%s` has unknown primitive" + + " type. Value: %s", + entry.getKey(), + entry.getValue().toString())); + } else if (entry.getValue().isJsonArray()) { + instance.putAdditionalProperty( + entry.getKey(), + gson.fromJson(entry.getValue(), List.class)); + } else { // JSON object + instance.putAdditionalProperty( + entry.getKey(), + gson.fromJson(entry.getValue(), HashMap.class)); + } + } + } + return instance; + } + }.nullSafe(); + } + } + + /** + * Create an instance of AssignTagRequest given an JSON string + * + * @param jsonString JSON string + * @return An instance of AssignTagRequest + * @throws IOException if the JSON string is invalid with respect to AssignTagRequest + */ + public static AssignTagRequest fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, AssignTagRequest.class); + } + + /** + * Convert an instance of AssignTagRequest to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} diff --git a/sdks/java/src/main/java/com/thoughtspot/client/model/AssociateMetadataInput.java b/sdks/java/src/main/java/com/thoughtspot/client/model/AssociateMetadataInput.java new file mode 100644 index 000000000..0592351b9 --- /dev/null +++ b/sdks/java/src/main/java/com/thoughtspot/client/model/AssociateMetadataInput.java @@ -0,0 +1,441 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client.model; + +import com.google.gson.Gson; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.TypeAdapter; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.reflect.TypeToken; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import com.thoughtspot.client.JSON; +import java.io.IOException; +import java.io.Serializable; +import java.util.Arrays; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Objects; +import org.openapitools.jackson.nullable.JsonNullable; + +/** AssociateMetadataInput */ +@javax.annotation.Generated( + value = "org.openapitools.codegen.languages.JavaClientCodegen", + comments = "Generator version: 7.12.0") +public class AssociateMetadataInput implements Serializable { + private static final long serialVersionUID = 1L; + + public static final String SERIALIZED_NAME_ACTION_CONFIG = "action_config"; + + @SerializedName(SERIALIZED_NAME_ACTION_CONFIG) + @javax.annotation.Nullable + private ActionConfigInput actionConfig; + + public static final String SERIALIZED_NAME_IDENTIFIER = "identifier"; + + @SerializedName(SERIALIZED_NAME_IDENTIFIER) + @javax.annotation.Nullable + private String identifier; + + /** + * Type of metadata. Required if the name of the object is set as the identifier. This attribute + * is optional when the object GUID is specified as the identifier. + */ + @JsonAdapter(TypeEnum.Adapter.class) + public enum TypeEnum { + VISUALIZATION("VISUALIZATION"), + + ANSWER("ANSWER"), + + WORKSHEET("WORKSHEET"); + + private String value; + + TypeEnum(String value) { + this.value = value; + } + + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + public static TypeEnum fromValue(String value) { + for (TypeEnum b : TypeEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + return null; + } + + public static class Adapter extends TypeAdapter { + @Override + public void write(final JsonWriter jsonWriter, final TypeEnum enumeration) + throws IOException { + jsonWriter.value(enumeration.getValue()); + } + + @Override + public TypeEnum read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + return TypeEnum.fromValue(value); + } + } + + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + String value = jsonElement.getAsString(); + TypeEnum.fromValue(value); + } + } + + public static final String SERIALIZED_NAME_TYPE = "type"; + + @SerializedName(SERIALIZED_NAME_TYPE) + @javax.annotation.Nullable + private TypeEnum type; + + public AssociateMetadataInput() {} + + public AssociateMetadataInput actionConfig( + @javax.annotation.Nullable ActionConfigInput actionConfig) { + this.actionConfig = actionConfig; + return this; + } + + /** + * Get actionConfig + * + * @return actionConfig + */ + @javax.annotation.Nullable + public ActionConfigInput getActionConfig() { + return actionConfig; + } + + public void setActionConfig(@javax.annotation.Nullable ActionConfigInput actionConfig) { + this.actionConfig = actionConfig; + } + + public AssociateMetadataInput identifier(@javax.annotation.Nullable String identifier) { + this.identifier = identifier; + return this; + } + + /** + * Unique ID or name of the metadata. + * + * @return identifier + */ + @javax.annotation.Nullable + public String getIdentifier() { + return identifier; + } + + public void setIdentifier(@javax.annotation.Nullable String identifier) { + this.identifier = identifier; + } + + public AssociateMetadataInput type(@javax.annotation.Nullable TypeEnum type) { + this.type = type; + return this; + } + + /** + * Type of metadata. Required if the name of the object is set as the identifier. This attribute + * is optional when the object GUID is specified as the identifier. + * + * @return type + */ + @javax.annotation.Nullable + public TypeEnum getType() { + return type; + } + + public void setType(@javax.annotation.Nullable TypeEnum type) { + this.type = type; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key name of the property + * @param value value of the property + * @return the AssociateMetadataInput instance itself + */ + public AssociateMetadataInput putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return a map of objects + */ + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key name of the property + * @return an object + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + AssociateMetadataInput associateMetadataInput = (AssociateMetadataInput) o; + return Objects.equals(this.actionConfig, associateMetadataInput.actionConfig) + && Objects.equals(this.identifier, associateMetadataInput.identifier) + && Objects.equals(this.type, associateMetadataInput.type) + && Objects.equals( + this.additionalProperties, associateMetadataInput.additionalProperties); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b + || (a != null + && b != null + && a.isPresent() + && b.isPresent() + && Objects.deepEquals(a.get(), b.get())); + } + + @Override + public int hashCode() { + return Objects.hash(actionConfig, identifier, type, additionalProperties); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; + } + return a.isPresent() ? Arrays.deepHashCode(new Object[] {a.get()}) : 31; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class AssociateMetadataInput {\n"); + sb.append(" actionConfig: ").append(toIndentedString(actionConfig)).append("\n"); + sb.append(" identifier: ").append(toIndentedString(identifier)).append("\n"); + sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first + * line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("action_config"); + openapiFields.add("identifier"); + openapiFields.add("type"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to AssociateMetadataInput + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!AssociateMetadataInput.openapiRequiredFields + .isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException( + String.format( + "The required field(s) %s in AssociateMetadataInput is not found" + + " in the empty JSON string", + AssociateMetadataInput.openapiRequiredFields.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // validate the optional field `action_config` + if (jsonObj.get("action_config") != null && !jsonObj.get("action_config").isJsonNull()) { + ActionConfigInput.validateJsonElement(jsonObj.get("action_config")); + } + if ((jsonObj.get("identifier") != null && !jsonObj.get("identifier").isJsonNull()) + && !jsonObj.get("identifier").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `identifier` to be a primitive type in the JSON" + + " string but got `%s`", + jsonObj.get("identifier").toString())); + } + if ((jsonObj.get("type") != null && !jsonObj.get("type").isJsonNull()) + && !jsonObj.get("type").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `type` to be a primitive type in the JSON string" + + " but got `%s`", + jsonObj.get("type").toString())); + } + // validate the optional field `type` + if (jsonObj.get("type") != null && !jsonObj.get("type").isJsonNull()) { + TypeEnum.validateJsonElement(jsonObj.get("type")); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!AssociateMetadataInput.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'AssociateMetadataInput' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter = + gson.getDelegateAdapter(this, TypeToken.get(AssociateMetadataInput.class)); + + return (TypeAdapter) + new TypeAdapter() { + @Override + public void write(JsonWriter out, AssociateMetadataInput value) + throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + obj.remove("additionalProperties"); + // serialize additional properties + if (value.getAdditionalProperties() != null) { + for (Map.Entry entry : + value.getAdditionalProperties().entrySet()) { + if (entry.getValue() instanceof String) + obj.addProperty(entry.getKey(), (String) entry.getValue()); + else if (entry.getValue() instanceof Number) + obj.addProperty(entry.getKey(), (Number) entry.getValue()); + else if (entry.getValue() instanceof Boolean) + obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); + else if (entry.getValue() instanceof Character) + obj.addProperty( + entry.getKey(), (Character) entry.getValue()); + else { + JsonElement jsonElement = gson.toJsonTree(entry.getValue()); + if (jsonElement.isJsonArray()) { + obj.add(entry.getKey(), jsonElement.getAsJsonArray()); + } else { + obj.add(entry.getKey(), jsonElement.getAsJsonObject()); + } + } + } + } + elementAdapter.write(out, obj); + } + + @Override + public AssociateMetadataInput read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // store additional fields in the deserialized instance + AssociateMetadataInput instance = thisAdapter.fromJsonTree(jsonObj); + for (Map.Entry entry : jsonObj.entrySet()) { + if (!openapiFields.contains(entry.getKey())) { + if (entry.getValue().isJsonPrimitive()) { // primitive type + if (entry.getValue().getAsJsonPrimitive().isString()) + instance.putAdditionalProperty( + entry.getKey(), entry.getValue().getAsString()); + else if (entry.getValue().getAsJsonPrimitive().isNumber()) + instance.putAdditionalProperty( + entry.getKey(), entry.getValue().getAsNumber()); + else if (entry.getValue().getAsJsonPrimitive().isBoolean()) + instance.putAdditionalProperty( + entry.getKey(), + entry.getValue().getAsBoolean()); + else + throw new IllegalArgumentException( + String.format( + "The field `%s` has unknown primitive" + + " type. Value: %s", + entry.getKey(), + entry.getValue().toString())); + } else if (entry.getValue().isJsonArray()) { + instance.putAdditionalProperty( + entry.getKey(), + gson.fromJson(entry.getValue(), List.class)); + } else { // JSON object + instance.putAdditionalProperty( + entry.getKey(), + gson.fromJson(entry.getValue(), HashMap.class)); + } + } + } + return instance; + } + }.nullSafe(); + } + } + + /** + * Create an instance of AssociateMetadataInput given an JSON string + * + * @param jsonString JSON string + * @return An instance of AssociateMetadataInput + * @throws IOException if the JSON string is invalid with respect to AssociateMetadataInput + */ + public static AssociateMetadataInput fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, AssociateMetadataInput.class); + } + + /** + * Convert an instance of AssociateMetadataInput to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} diff --git a/sdks/java/src/main/java/com/thoughtspot/client/model/AssociateMetadataInputCreate.java b/sdks/java/src/main/java/com/thoughtspot/client/model/AssociateMetadataInputCreate.java new file mode 100644 index 000000000..f9e17eb55 --- /dev/null +++ b/sdks/java/src/main/java/com/thoughtspot/client/model/AssociateMetadataInputCreate.java @@ -0,0 +1,458 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client.model; + +import com.google.gson.Gson; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.TypeAdapter; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.reflect.TypeToken; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import com.thoughtspot.client.JSON; +import java.io.IOException; +import java.io.Serializable; +import java.util.Arrays; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Objects; +import org.openapitools.jackson.nullable.JsonNullable; + +/** AssociateMetadataInputCreate */ +@javax.annotation.Generated( + value = "org.openapitools.codegen.languages.JavaClientCodegen", + comments = "Generator version: 7.12.0") +public class AssociateMetadataInputCreate implements Serializable { + private static final long serialVersionUID = 1L; + + public static final String SERIALIZED_NAME_ACTION_CONFIG = "action_config"; + + @SerializedName(SERIALIZED_NAME_ACTION_CONFIG) + @javax.annotation.Nullable + private ActionConfigInputCreate actionConfig; + + public static final String SERIALIZED_NAME_IDENTIFIER = "identifier"; + + @SerializedName(SERIALIZED_NAME_IDENTIFIER) + @javax.annotation.Nonnull + private String identifier; + + /** + * Type of metadata. Required if the name of the object is set as the identifier. This attribute + * is optional when the object GUID is specified as the identifier. + */ + @JsonAdapter(TypeEnum.Adapter.class) + public enum TypeEnum { + VISUALIZATION("VISUALIZATION"), + + ANSWER("ANSWER"), + + WORKSHEET("WORKSHEET"); + + private String value; + + TypeEnum(String value) { + this.value = value; + } + + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + public static TypeEnum fromValue(String value) { + for (TypeEnum b : TypeEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + return null; + } + + public static class Adapter extends TypeAdapter { + @Override + public void write(final JsonWriter jsonWriter, final TypeEnum enumeration) + throws IOException { + jsonWriter.value(enumeration.getValue()); + } + + @Override + public TypeEnum read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + return TypeEnum.fromValue(value); + } + } + + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + String value = jsonElement.getAsString(); + TypeEnum.fromValue(value); + } + } + + public static final String SERIALIZED_NAME_TYPE = "type"; + + @SerializedName(SERIALIZED_NAME_TYPE) + @javax.annotation.Nullable + private TypeEnum type; + + public AssociateMetadataInputCreate() {} + + public AssociateMetadataInputCreate actionConfig( + @javax.annotation.Nullable ActionConfigInputCreate actionConfig) { + this.actionConfig = actionConfig; + return this; + } + + /** + * Get actionConfig + * + * @return actionConfig + */ + @javax.annotation.Nullable + public ActionConfigInputCreate getActionConfig() { + return actionConfig; + } + + public void setActionConfig(@javax.annotation.Nullable ActionConfigInputCreate actionConfig) { + this.actionConfig = actionConfig; + } + + public AssociateMetadataInputCreate identifier(@javax.annotation.Nonnull String identifier) { + this.identifier = identifier; + return this; + } + + /** + * Unique ID or name of the metadata. + * + * @return identifier + */ + @javax.annotation.Nonnull + public String getIdentifier() { + return identifier; + } + + public void setIdentifier(@javax.annotation.Nonnull String identifier) { + this.identifier = identifier; + } + + public AssociateMetadataInputCreate type(@javax.annotation.Nullable TypeEnum type) { + this.type = type; + return this; + } + + /** + * Type of metadata. Required if the name of the object is set as the identifier. This attribute + * is optional when the object GUID is specified as the identifier. + * + * @return type + */ + @javax.annotation.Nullable + public TypeEnum getType() { + return type; + } + + public void setType(@javax.annotation.Nullable TypeEnum type) { + this.type = type; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key name of the property + * @param value value of the property + * @return the AssociateMetadataInputCreate instance itself + */ + public AssociateMetadataInputCreate putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return a map of objects + */ + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key name of the property + * @return an object + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + AssociateMetadataInputCreate associateMetadataInputCreate = + (AssociateMetadataInputCreate) o; + return Objects.equals(this.actionConfig, associateMetadataInputCreate.actionConfig) + && Objects.equals(this.identifier, associateMetadataInputCreate.identifier) + && Objects.equals(this.type, associateMetadataInputCreate.type) + && Objects.equals( + this.additionalProperties, + associateMetadataInputCreate.additionalProperties); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b + || (a != null + && b != null + && a.isPresent() + && b.isPresent() + && Objects.deepEquals(a.get(), b.get())); + } + + @Override + public int hashCode() { + return Objects.hash(actionConfig, identifier, type, additionalProperties); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; + } + return a.isPresent() ? Arrays.deepHashCode(new Object[] {a.get()}) : 31; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class AssociateMetadataInputCreate {\n"); + sb.append(" actionConfig: ").append(toIndentedString(actionConfig)).append("\n"); + sb.append(" identifier: ").append(toIndentedString(identifier)).append("\n"); + sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first + * line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("action_config"); + openapiFields.add("identifier"); + openapiFields.add("type"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + openapiRequiredFields.add("identifier"); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to + * AssociateMetadataInputCreate + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!AssociateMetadataInputCreate.openapiRequiredFields + .isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException( + String.format( + "The required field(s) %s in AssociateMetadataInputCreate is not" + + " found in the empty JSON string", + AssociateMetadataInputCreate.openapiRequiredFields.toString())); + } + } + + // check to make sure all required properties/fields are present in the JSON string + for (String requiredField : AssociateMetadataInputCreate.openapiRequiredFields) { + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException( + String.format( + "The required field `%s` is not found in the JSON string: %s", + requiredField, jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // validate the optional field `action_config` + if (jsonObj.get("action_config") != null && !jsonObj.get("action_config").isJsonNull()) { + ActionConfigInputCreate.validateJsonElement(jsonObj.get("action_config")); + } + if (!jsonObj.get("identifier").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `identifier` to be a primitive type in the JSON" + + " string but got `%s`", + jsonObj.get("identifier").toString())); + } + if ((jsonObj.get("type") != null && !jsonObj.get("type").isJsonNull()) + && !jsonObj.get("type").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `type` to be a primitive type in the JSON string" + + " but got `%s`", + jsonObj.get("type").toString())); + } + // validate the optional field `type` + if (jsonObj.get("type") != null && !jsonObj.get("type").isJsonNull()) { + TypeEnum.validateJsonElement(jsonObj.get("type")); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!AssociateMetadataInputCreate.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'AssociateMetadataInputCreate' and its + // subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter = + gson.getDelegateAdapter( + this, TypeToken.get(AssociateMetadataInputCreate.class)); + + return (TypeAdapter) + new TypeAdapter() { + @Override + public void write(JsonWriter out, AssociateMetadataInputCreate value) + throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + obj.remove("additionalProperties"); + // serialize additional properties + if (value.getAdditionalProperties() != null) { + for (Map.Entry entry : + value.getAdditionalProperties().entrySet()) { + if (entry.getValue() instanceof String) + obj.addProperty(entry.getKey(), (String) entry.getValue()); + else if (entry.getValue() instanceof Number) + obj.addProperty(entry.getKey(), (Number) entry.getValue()); + else if (entry.getValue() instanceof Boolean) + obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); + else if (entry.getValue() instanceof Character) + obj.addProperty( + entry.getKey(), (Character) entry.getValue()); + else { + JsonElement jsonElement = gson.toJsonTree(entry.getValue()); + if (jsonElement.isJsonArray()) { + obj.add(entry.getKey(), jsonElement.getAsJsonArray()); + } else { + obj.add(entry.getKey(), jsonElement.getAsJsonObject()); + } + } + } + } + elementAdapter.write(out, obj); + } + + @Override + public AssociateMetadataInputCreate read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // store additional fields in the deserialized instance + AssociateMetadataInputCreate instance = + thisAdapter.fromJsonTree(jsonObj); + for (Map.Entry entry : jsonObj.entrySet()) { + if (!openapiFields.contains(entry.getKey())) { + if (entry.getValue().isJsonPrimitive()) { // primitive type + if (entry.getValue().getAsJsonPrimitive().isString()) + instance.putAdditionalProperty( + entry.getKey(), entry.getValue().getAsString()); + else if (entry.getValue().getAsJsonPrimitive().isNumber()) + instance.putAdditionalProperty( + entry.getKey(), entry.getValue().getAsNumber()); + else if (entry.getValue().getAsJsonPrimitive().isBoolean()) + instance.putAdditionalProperty( + entry.getKey(), + entry.getValue().getAsBoolean()); + else + throw new IllegalArgumentException( + String.format( + "The field `%s` has unknown primitive" + + " type. Value: %s", + entry.getKey(), + entry.getValue().toString())); + } else if (entry.getValue().isJsonArray()) { + instance.putAdditionalProperty( + entry.getKey(), + gson.fromJson(entry.getValue(), List.class)); + } else { // JSON object + instance.putAdditionalProperty( + entry.getKey(), + gson.fromJson(entry.getValue(), HashMap.class)); + } + } + } + return instance; + } + }.nullSafe(); + } + } + + /** + * Create an instance of AssociateMetadataInputCreate given an JSON string + * + * @param jsonString JSON string + * @return An instance of AssociateMetadataInputCreate + * @throws IOException if the JSON string is invalid with respect to + * AssociateMetadataInputCreate + */ + public static AssociateMetadataInputCreate fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, AssociateMetadataInputCreate.class); + } + + /** + * Convert an instance of AssociateMetadataInputCreate to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} diff --git a/sdks/java/src/main/java/com/thoughtspot/client/model/AuthClusterPreferences.java b/sdks/java/src/main/java/com/thoughtspot/client/model/AuthClusterPreferences.java new file mode 100644 index 000000000..13c64ae26 --- /dev/null +++ b/sdks/java/src/main/java/com/thoughtspot/client/model/AuthClusterPreferences.java @@ -0,0 +1,425 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client.model; + +import com.google.gson.Gson; +import com.google.gson.JsonArray; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.TypeAdapter; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.reflect.TypeToken; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import com.thoughtspot.client.JSON; +import java.io.IOException; +import java.io.Serializable; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Objects; +import org.openapitools.jackson.nullable.JsonNullable; + +/** Cluster-level authentication preferences. */ +@javax.annotation.Generated( + value = "org.openapitools.codegen.languages.JavaClientCodegen", + comments = "Generator version: 7.12.0") +public class AuthClusterPreferences implements Serializable { + private static final long serialVersionUID = 1L; + + /** Whether authentication is enabled or disabled at the cluster level. */ + @JsonAdapter(AuthStatusEnum.Adapter.class) + public enum AuthStatusEnum { + ENABLED("ENABLED"), + + DISABLED("DISABLED"); + + private String value; + + AuthStatusEnum(String value) { + this.value = value; + } + + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + public static AuthStatusEnum fromValue(String value) { + for (AuthStatusEnum b : AuthStatusEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + return null; + } + + public static class Adapter extends TypeAdapter { + @Override + public void write(final JsonWriter jsonWriter, final AuthStatusEnum enumeration) + throws IOException { + jsonWriter.value(enumeration.getValue()); + } + + @Override + public AuthStatusEnum read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + return AuthStatusEnum.fromValue(value); + } + } + + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + String value = jsonElement.getAsString(); + AuthStatusEnum.fromValue(value); + } + } + + public static final String SERIALIZED_NAME_AUTH_STATUS = "auth_status"; + + @SerializedName(SERIALIZED_NAME_AUTH_STATUS) + @javax.annotation.Nullable + private AuthStatusEnum authStatus; + + public static final String SERIALIZED_NAME_ACCESS_TOKENS = "access_tokens"; + + @SerializedName(SERIALIZED_NAME_ACCESS_TOKENS) + @javax.annotation.Nullable + private List accessTokens; + + public AuthClusterPreferences() {} + + public AuthClusterPreferences authStatus(@javax.annotation.Nullable AuthStatusEnum authStatus) { + this.authStatus = authStatus; + return this; + } + + /** + * Whether authentication is enabled or disabled at the cluster level. + * + * @return authStatus + */ + @javax.annotation.Nullable + public AuthStatusEnum getAuthStatus() { + return authStatus; + } + + public void setAuthStatus(@javax.annotation.Nullable AuthStatusEnum authStatus) { + this.authStatus = authStatus; + } + + public AuthClusterPreferences accessTokens( + @javax.annotation.Nullable List accessTokens) { + this.accessTokens = accessTokens; + return this; + } + + public AuthClusterPreferences addAccessTokensItem(AuthSettingsAccessToken accessTokensItem) { + if (this.accessTokens == null) { + this.accessTokens = new ArrayList<>(); + } + this.accessTokens.add(accessTokensItem); + return this; + } + + /** + * Cluster-level access tokens. Absent when no token is configured. + * + * @return accessTokens + */ + @javax.annotation.Nullable + public List getAccessTokens() { + return accessTokens; + } + + public void setAccessTokens( + @javax.annotation.Nullable List accessTokens) { + this.accessTokens = accessTokens; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key name of the property + * @param value value of the property + * @return the AuthClusterPreferences instance itself + */ + public AuthClusterPreferences putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return a map of objects + */ + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key name of the property + * @return an object + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + AuthClusterPreferences authClusterPreferences = (AuthClusterPreferences) o; + return Objects.equals(this.authStatus, authClusterPreferences.authStatus) + && Objects.equals(this.accessTokens, authClusterPreferences.accessTokens) + && Objects.equals( + this.additionalProperties, authClusterPreferences.additionalProperties); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b + || (a != null + && b != null + && a.isPresent() + && b.isPresent() + && Objects.deepEquals(a.get(), b.get())); + } + + @Override + public int hashCode() { + return Objects.hash(authStatus, accessTokens, additionalProperties); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; + } + return a.isPresent() ? Arrays.deepHashCode(new Object[] {a.get()}) : 31; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class AuthClusterPreferences {\n"); + sb.append(" authStatus: ").append(toIndentedString(authStatus)).append("\n"); + sb.append(" accessTokens: ").append(toIndentedString(accessTokens)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first + * line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("auth_status"); + openapiFields.add("access_tokens"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to AuthClusterPreferences + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!AuthClusterPreferences.openapiRequiredFields + .isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException( + String.format( + "The required field(s) %s in AuthClusterPreferences is not found" + + " in the empty JSON string", + AuthClusterPreferences.openapiRequiredFields.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if ((jsonObj.get("auth_status") != null && !jsonObj.get("auth_status").isJsonNull()) + && !jsonObj.get("auth_status").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `auth_status` to be a primitive type in the JSON" + + " string but got `%s`", + jsonObj.get("auth_status").toString())); + } + // validate the optional field `auth_status` + if (jsonObj.get("auth_status") != null && !jsonObj.get("auth_status").isJsonNull()) { + AuthStatusEnum.validateJsonElement(jsonObj.get("auth_status")); + } + if (jsonObj.get("access_tokens") != null && !jsonObj.get("access_tokens").isJsonNull()) { + JsonArray jsonArrayaccessTokens = jsonObj.getAsJsonArray("access_tokens"); + if (jsonArrayaccessTokens != null) { + // ensure the json data is an array + if (!jsonObj.get("access_tokens").isJsonArray()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `access_tokens` to be an array in the JSON" + + " string but got `%s`", + jsonObj.get("access_tokens").toString())); + } + + // validate the optional field `access_tokens` (array) + for (int i = 0; i < jsonArrayaccessTokens.size(); i++) { + AuthSettingsAccessToken.validateJsonElement(jsonArrayaccessTokens.get(i)); + } + ; + } + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!AuthClusterPreferences.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'AuthClusterPreferences' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter = + gson.getDelegateAdapter(this, TypeToken.get(AuthClusterPreferences.class)); + + return (TypeAdapter) + new TypeAdapter() { + @Override + public void write(JsonWriter out, AuthClusterPreferences value) + throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + obj.remove("additionalProperties"); + // serialize additional properties + if (value.getAdditionalProperties() != null) { + for (Map.Entry entry : + value.getAdditionalProperties().entrySet()) { + if (entry.getValue() instanceof String) + obj.addProperty(entry.getKey(), (String) entry.getValue()); + else if (entry.getValue() instanceof Number) + obj.addProperty(entry.getKey(), (Number) entry.getValue()); + else if (entry.getValue() instanceof Boolean) + obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); + else if (entry.getValue() instanceof Character) + obj.addProperty( + entry.getKey(), (Character) entry.getValue()); + else { + JsonElement jsonElement = gson.toJsonTree(entry.getValue()); + if (jsonElement.isJsonArray()) { + obj.add(entry.getKey(), jsonElement.getAsJsonArray()); + } else { + obj.add(entry.getKey(), jsonElement.getAsJsonObject()); + } + } + } + } + elementAdapter.write(out, obj); + } + + @Override + public AuthClusterPreferences read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // store additional fields in the deserialized instance + AuthClusterPreferences instance = thisAdapter.fromJsonTree(jsonObj); + for (Map.Entry entry : jsonObj.entrySet()) { + if (!openapiFields.contains(entry.getKey())) { + if (entry.getValue().isJsonPrimitive()) { // primitive type + if (entry.getValue().getAsJsonPrimitive().isString()) + instance.putAdditionalProperty( + entry.getKey(), entry.getValue().getAsString()); + else if (entry.getValue().getAsJsonPrimitive().isNumber()) + instance.putAdditionalProperty( + entry.getKey(), entry.getValue().getAsNumber()); + else if (entry.getValue().getAsJsonPrimitive().isBoolean()) + instance.putAdditionalProperty( + entry.getKey(), + entry.getValue().getAsBoolean()); + else + throw new IllegalArgumentException( + String.format( + "The field `%s` has unknown primitive" + + " type. Value: %s", + entry.getKey(), + entry.getValue().toString())); + } else if (entry.getValue().isJsonArray()) { + instance.putAdditionalProperty( + entry.getKey(), + gson.fromJson(entry.getValue(), List.class)); + } else { // JSON object + instance.putAdditionalProperty( + entry.getKey(), + gson.fromJson(entry.getValue(), HashMap.class)); + } + } + } + return instance; + } + }.nullSafe(); + } + } + + /** + * Create an instance of AuthClusterPreferences given an JSON string + * + * @param jsonString JSON string + * @return An instance of AuthClusterPreferences + * @throws IOException if the JSON string is invalid with respect to AuthClusterPreferences + */ + public static AuthClusterPreferences fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, AuthClusterPreferences.class); + } + + /** + * Convert an instance of AuthClusterPreferences to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} diff --git a/sdks/java/src/main/java/com/thoughtspot/client/model/AuthClusterPreferencesInput.java b/sdks/java/src/main/java/com/thoughtspot/client/model/AuthClusterPreferencesInput.java new file mode 100644 index 000000000..e7bf19c96 --- /dev/null +++ b/sdks/java/src/main/java/com/thoughtspot/client/model/AuthClusterPreferencesInput.java @@ -0,0 +1,375 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client.model; + +import com.google.gson.Gson; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.TypeAdapter; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.reflect.TypeToken; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import com.thoughtspot.client.JSON; +import java.io.IOException; +import java.io.Serializable; +import java.util.Arrays; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Objects; +import org.openapitools.jackson.nullable.JsonNullable; + +/** Input for cluster-level auth configuration. */ +@javax.annotation.Generated( + value = "org.openapitools.codegen.languages.JavaClientCodegen", + comments = "Generator version: 7.12.0") +public class AuthClusterPreferencesInput implements Serializable { + private static final long serialVersionUID = 1L; + + /** + * Enable or disable authentication at the cluster level. When enabled, a new token is generated + * if one does not exist. When disabled, the existing token is revoked. + */ + @JsonAdapter(AuthStatusEnum.Adapter.class) + public enum AuthStatusEnum { + ENABLED("ENABLED"), + + DISABLED("DISABLED"); + + private String value; + + AuthStatusEnum(String value) { + this.value = value; + } + + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + public static AuthStatusEnum fromValue(String value) { + for (AuthStatusEnum b : AuthStatusEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + return null; + } + + public static class Adapter extends TypeAdapter { + @Override + public void write(final JsonWriter jsonWriter, final AuthStatusEnum enumeration) + throws IOException { + jsonWriter.value(enumeration.getValue()); + } + + @Override + public AuthStatusEnum read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + return AuthStatusEnum.fromValue(value); + } + } + + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + String value = jsonElement.getAsString(); + AuthStatusEnum.fromValue(value); + } + } + + public static final String SERIALIZED_NAME_AUTH_STATUS = "auth_status"; + + @SerializedName(SERIALIZED_NAME_AUTH_STATUS) + @javax.annotation.Nullable + private AuthStatusEnum authStatus; + + public AuthClusterPreferencesInput() {} + + public AuthClusterPreferencesInput authStatus( + @javax.annotation.Nullable AuthStatusEnum authStatus) { + this.authStatus = authStatus; + return this; + } + + /** + * Enable or disable authentication at the cluster level. When enabled, a new token is generated + * if one does not exist. When disabled, the existing token is revoked. + * + * @return authStatus + */ + @javax.annotation.Nullable + public AuthStatusEnum getAuthStatus() { + return authStatus; + } + + public void setAuthStatus(@javax.annotation.Nullable AuthStatusEnum authStatus) { + this.authStatus = authStatus; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key name of the property + * @param value value of the property + * @return the AuthClusterPreferencesInput instance itself + */ + public AuthClusterPreferencesInput putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return a map of objects + */ + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key name of the property + * @return an object + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + AuthClusterPreferencesInput authClusterPreferencesInput = (AuthClusterPreferencesInput) o; + return Objects.equals(this.authStatus, authClusterPreferencesInput.authStatus) + && Objects.equals( + this.additionalProperties, + authClusterPreferencesInput.additionalProperties); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b + || (a != null + && b != null + && a.isPresent() + && b.isPresent() + && Objects.deepEquals(a.get(), b.get())); + } + + @Override + public int hashCode() { + return Objects.hash(authStatus, additionalProperties); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; + } + return a.isPresent() ? Arrays.deepHashCode(new Object[] {a.get()}) : 31; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class AuthClusterPreferencesInput {\n"); + sb.append(" authStatus: ").append(toIndentedString(authStatus)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first + * line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("auth_status"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to + * AuthClusterPreferencesInput + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!AuthClusterPreferencesInput.openapiRequiredFields + .isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException( + String.format( + "The required field(s) %s in AuthClusterPreferencesInput is not" + + " found in the empty JSON string", + AuthClusterPreferencesInput.openapiRequiredFields.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if ((jsonObj.get("auth_status") != null && !jsonObj.get("auth_status").isJsonNull()) + && !jsonObj.get("auth_status").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `auth_status` to be a primitive type in the JSON" + + " string but got `%s`", + jsonObj.get("auth_status").toString())); + } + // validate the optional field `auth_status` + if (jsonObj.get("auth_status") != null && !jsonObj.get("auth_status").isJsonNull()) { + AuthStatusEnum.validateJsonElement(jsonObj.get("auth_status")); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!AuthClusterPreferencesInput.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'AuthClusterPreferencesInput' and its + // subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter = + gson.getDelegateAdapter(this, TypeToken.get(AuthClusterPreferencesInput.class)); + + return (TypeAdapter) + new TypeAdapter() { + @Override + public void write(JsonWriter out, AuthClusterPreferencesInput value) + throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + obj.remove("additionalProperties"); + // serialize additional properties + if (value.getAdditionalProperties() != null) { + for (Map.Entry entry : + value.getAdditionalProperties().entrySet()) { + if (entry.getValue() instanceof String) + obj.addProperty(entry.getKey(), (String) entry.getValue()); + else if (entry.getValue() instanceof Number) + obj.addProperty(entry.getKey(), (Number) entry.getValue()); + else if (entry.getValue() instanceof Boolean) + obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); + else if (entry.getValue() instanceof Character) + obj.addProperty( + entry.getKey(), (Character) entry.getValue()); + else { + JsonElement jsonElement = gson.toJsonTree(entry.getValue()); + if (jsonElement.isJsonArray()) { + obj.add(entry.getKey(), jsonElement.getAsJsonArray()); + } else { + obj.add(entry.getKey(), jsonElement.getAsJsonObject()); + } + } + } + } + elementAdapter.write(out, obj); + } + + @Override + public AuthClusterPreferencesInput read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // store additional fields in the deserialized instance + AuthClusterPreferencesInput instance = + thisAdapter.fromJsonTree(jsonObj); + for (Map.Entry entry : jsonObj.entrySet()) { + if (!openapiFields.contains(entry.getKey())) { + if (entry.getValue().isJsonPrimitive()) { // primitive type + if (entry.getValue().getAsJsonPrimitive().isString()) + instance.putAdditionalProperty( + entry.getKey(), entry.getValue().getAsString()); + else if (entry.getValue().getAsJsonPrimitive().isNumber()) + instance.putAdditionalProperty( + entry.getKey(), entry.getValue().getAsNumber()); + else if (entry.getValue().getAsJsonPrimitive().isBoolean()) + instance.putAdditionalProperty( + entry.getKey(), + entry.getValue().getAsBoolean()); + else + throw new IllegalArgumentException( + String.format( + "The field `%s` has unknown primitive" + + " type. Value: %s", + entry.getKey(), + entry.getValue().toString())); + } else if (entry.getValue().isJsonArray()) { + instance.putAdditionalProperty( + entry.getKey(), + gson.fromJson(entry.getValue(), List.class)); + } else { // JSON object + instance.putAdditionalProperty( + entry.getKey(), + gson.fromJson(entry.getValue(), HashMap.class)); + } + } + } + return instance; + } + }.nullSafe(); + } + } + + /** + * Create an instance of AuthClusterPreferencesInput given an JSON string + * + * @param jsonString JSON string + * @return An instance of AuthClusterPreferencesInput + * @throws IOException if the JSON string is invalid with respect to AuthClusterPreferencesInput + */ + public static AuthClusterPreferencesInput fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, AuthClusterPreferencesInput.class); + } + + /** + * Convert an instance of AuthClusterPreferencesInput to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} diff --git a/sdks/java/src/main/java/com/thoughtspot/client/model/AuthOrgInfo.java b/sdks/java/src/main/java/com/thoughtspot/client/model/AuthOrgInfo.java new file mode 100644 index 000000000..f90104674 --- /dev/null +++ b/sdks/java/src/main/java/com/thoughtspot/client/model/AuthOrgInfo.java @@ -0,0 +1,347 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client.model; + +import com.google.gson.Gson; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.TypeAdapter; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.annotations.SerializedName; +import com.google.gson.reflect.TypeToken; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import com.thoughtspot.client.JSON; +import java.io.IOException; +import java.io.Serializable; +import java.util.Arrays; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Objects; +import org.openapitools.jackson.nullable.JsonNullable; + +/** Org identifier returned in auth settings search results. */ +@javax.annotation.Generated( + value = "org.openapitools.codegen.languages.JavaClientCodegen", + comments = "Generator version: 7.12.0") +public class AuthOrgInfo implements Serializable { + private static final long serialVersionUID = 1L; + + public static final String SERIALIZED_NAME_ID = "id"; + + @SerializedName(SERIALIZED_NAME_ID) + @javax.annotation.Nonnull + private Integer id; + + public static final String SERIALIZED_NAME_NAME = "name"; + + @SerializedName(SERIALIZED_NAME_NAME) + @javax.annotation.Nullable + private String name; + + public AuthOrgInfo() {} + + public AuthOrgInfo id(@javax.annotation.Nonnull Integer id) { + this.id = id; + return this; + } + + /** + * Unique identifier of the org. + * + * @return id + */ + @javax.annotation.Nonnull + public Integer getId() { + return id; + } + + public void setId(@javax.annotation.Nonnull Integer id) { + this.id = id; + } + + public AuthOrgInfo name(@javax.annotation.Nullable String name) { + this.name = name; + return this; + } + + /** + * Name of the org. + * + * @return name + */ + @javax.annotation.Nullable + public String getName() { + return name; + } + + public void setName(@javax.annotation.Nullable String name) { + this.name = name; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key name of the property + * @param value value of the property + * @return the AuthOrgInfo instance itself + */ + public AuthOrgInfo putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return a map of objects + */ + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key name of the property + * @return an object + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + AuthOrgInfo authOrgInfo = (AuthOrgInfo) o; + return Objects.equals(this.id, authOrgInfo.id) + && Objects.equals(this.name, authOrgInfo.name) + && Objects.equals(this.additionalProperties, authOrgInfo.additionalProperties); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b + || (a != null + && b != null + && a.isPresent() + && b.isPresent() + && Objects.deepEquals(a.get(), b.get())); + } + + @Override + public int hashCode() { + return Objects.hash(id, name, additionalProperties); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; + } + return a.isPresent() ? Arrays.deepHashCode(new Object[] {a.get()}) : 31; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class AuthOrgInfo {\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first + * line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("id"); + openapiFields.add("name"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + openapiRequiredFields.add("id"); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to AuthOrgInfo + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!AuthOrgInfo.openapiRequiredFields + .isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException( + String.format( + "The required field(s) %s in AuthOrgInfo is not found in the empty" + + " JSON string", + AuthOrgInfo.openapiRequiredFields.toString())); + } + } + + // check to make sure all required properties/fields are present in the JSON string + for (String requiredField : AuthOrgInfo.openapiRequiredFields) { + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException( + String.format( + "The required field `%s` is not found in the JSON string: %s", + requiredField, jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if ((jsonObj.get("name") != null && !jsonObj.get("name").isJsonNull()) + && !jsonObj.get("name").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `name` to be a primitive type in the JSON string" + + " but got `%s`", + jsonObj.get("name").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!AuthOrgInfo.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'AuthOrgInfo' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter = + gson.getDelegateAdapter(this, TypeToken.get(AuthOrgInfo.class)); + + return (TypeAdapter) + new TypeAdapter() { + @Override + public void write(JsonWriter out, AuthOrgInfo value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + obj.remove("additionalProperties"); + // serialize additional properties + if (value.getAdditionalProperties() != null) { + for (Map.Entry entry : + value.getAdditionalProperties().entrySet()) { + if (entry.getValue() instanceof String) + obj.addProperty(entry.getKey(), (String) entry.getValue()); + else if (entry.getValue() instanceof Number) + obj.addProperty(entry.getKey(), (Number) entry.getValue()); + else if (entry.getValue() instanceof Boolean) + obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); + else if (entry.getValue() instanceof Character) + obj.addProperty( + entry.getKey(), (Character) entry.getValue()); + else { + JsonElement jsonElement = gson.toJsonTree(entry.getValue()); + if (jsonElement.isJsonArray()) { + obj.add(entry.getKey(), jsonElement.getAsJsonArray()); + } else { + obj.add(entry.getKey(), jsonElement.getAsJsonObject()); + } + } + } + } + elementAdapter.write(out, obj); + } + + @Override + public AuthOrgInfo read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // store additional fields in the deserialized instance + AuthOrgInfo instance = thisAdapter.fromJsonTree(jsonObj); + for (Map.Entry entry : jsonObj.entrySet()) { + if (!openapiFields.contains(entry.getKey())) { + if (entry.getValue().isJsonPrimitive()) { // primitive type + if (entry.getValue().getAsJsonPrimitive().isString()) + instance.putAdditionalProperty( + entry.getKey(), entry.getValue().getAsString()); + else if (entry.getValue().getAsJsonPrimitive().isNumber()) + instance.putAdditionalProperty( + entry.getKey(), entry.getValue().getAsNumber()); + else if (entry.getValue().getAsJsonPrimitive().isBoolean()) + instance.putAdditionalProperty( + entry.getKey(), + entry.getValue().getAsBoolean()); + else + throw new IllegalArgumentException( + String.format( + "The field `%s` has unknown primitive" + + " type. Value: %s", + entry.getKey(), + entry.getValue().toString())); + } else if (entry.getValue().isJsonArray()) { + instance.putAdditionalProperty( + entry.getKey(), + gson.fromJson(entry.getValue(), List.class)); + } else { // JSON object + instance.putAdditionalProperty( + entry.getKey(), + gson.fromJson(entry.getValue(), HashMap.class)); + } + } + } + return instance; + } + }.nullSafe(); + } + } + + /** + * Create an instance of AuthOrgInfo given an JSON string + * + * @param jsonString JSON string + * @return An instance of AuthOrgInfo + * @throws IOException if the JSON string is invalid with respect to AuthOrgInfo + */ + public static AuthOrgInfo fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, AuthOrgInfo.class); + } + + /** + * Convert an instance of AuthOrgInfo to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} diff --git a/sdks/java/src/main/java/com/thoughtspot/client/model/AuthOrgPreference.java b/sdks/java/src/main/java/com/thoughtspot/client/model/AuthOrgPreference.java new file mode 100644 index 000000000..bd10fe577 --- /dev/null +++ b/sdks/java/src/main/java/com/thoughtspot/client/model/AuthOrgPreference.java @@ -0,0 +1,457 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client.model; + +import com.google.gson.Gson; +import com.google.gson.JsonArray; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.TypeAdapter; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.reflect.TypeToken; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import com.thoughtspot.client.JSON; +import java.io.IOException; +import java.io.Serializable; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Objects; +import org.openapitools.jackson.nullable.JsonNullable; + +/** Org-level authentication preferences for a single org. */ +@javax.annotation.Generated( + value = "org.openapitools.codegen.languages.JavaClientCodegen", + comments = "Generator version: 7.12.0") +public class AuthOrgPreference implements Serializable { + private static final long serialVersionUID = 1L; + + public static final String SERIALIZED_NAME_ORG = "org"; + + @SerializedName(SERIALIZED_NAME_ORG) + @javax.annotation.Nullable + private AuthOrgInfo org; + + /** Whether authentication is enabled or disabled for this org. */ + @JsonAdapter(AuthStatusEnum.Adapter.class) + public enum AuthStatusEnum { + ENABLED("ENABLED"), + + DISABLED("DISABLED"); + + private String value; + + AuthStatusEnum(String value) { + this.value = value; + } + + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + public static AuthStatusEnum fromValue(String value) { + for (AuthStatusEnum b : AuthStatusEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + return null; + } + + public static class Adapter extends TypeAdapter { + @Override + public void write(final JsonWriter jsonWriter, final AuthStatusEnum enumeration) + throws IOException { + jsonWriter.value(enumeration.getValue()); + } + + @Override + public AuthStatusEnum read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + return AuthStatusEnum.fromValue(value); + } + } + + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + String value = jsonElement.getAsString(); + AuthStatusEnum.fromValue(value); + } + } + + public static final String SERIALIZED_NAME_AUTH_STATUS = "auth_status"; + + @SerializedName(SERIALIZED_NAME_AUTH_STATUS) + @javax.annotation.Nullable + private AuthStatusEnum authStatus; + + public static final String SERIALIZED_NAME_ACCESS_TOKENS = "access_tokens"; + + @SerializedName(SERIALIZED_NAME_ACCESS_TOKENS) + @javax.annotation.Nullable + private List accessTokens; + + public AuthOrgPreference() {} + + public AuthOrgPreference org(@javax.annotation.Nullable AuthOrgInfo org) { + this.org = org; + return this; + } + + /** + * Get org + * + * @return org + */ + @javax.annotation.Nullable + public AuthOrgInfo getOrg() { + return org; + } + + public void setOrg(@javax.annotation.Nullable AuthOrgInfo org) { + this.org = org; + } + + public AuthOrgPreference authStatus(@javax.annotation.Nullable AuthStatusEnum authStatus) { + this.authStatus = authStatus; + return this; + } + + /** + * Whether authentication is enabled or disabled for this org. + * + * @return authStatus + */ + @javax.annotation.Nullable + public AuthStatusEnum getAuthStatus() { + return authStatus; + } + + public void setAuthStatus(@javax.annotation.Nullable AuthStatusEnum authStatus) { + this.authStatus = authStatus; + } + + public AuthOrgPreference accessTokens( + @javax.annotation.Nullable List accessTokens) { + this.accessTokens = accessTokens; + return this; + } + + public AuthOrgPreference addAccessTokensItem(AuthSettingsAccessToken accessTokensItem) { + if (this.accessTokens == null) { + this.accessTokens = new ArrayList<>(); + } + this.accessTokens.add(accessTokensItem); + return this; + } + + /** + * Org-level access tokens. Absent when no token is configured or the feature flag is off. + * + * @return accessTokens + */ + @javax.annotation.Nullable + public List getAccessTokens() { + return accessTokens; + } + + public void setAccessTokens( + @javax.annotation.Nullable List accessTokens) { + this.accessTokens = accessTokens; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key name of the property + * @param value value of the property + * @return the AuthOrgPreference instance itself + */ + public AuthOrgPreference putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return a map of objects + */ + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key name of the property + * @return an object + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + AuthOrgPreference authOrgPreference = (AuthOrgPreference) o; + return Objects.equals(this.org, authOrgPreference.org) + && Objects.equals(this.authStatus, authOrgPreference.authStatus) + && Objects.equals(this.accessTokens, authOrgPreference.accessTokens) + && Objects.equals( + this.additionalProperties, authOrgPreference.additionalProperties); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b + || (a != null + && b != null + && a.isPresent() + && b.isPresent() + && Objects.deepEquals(a.get(), b.get())); + } + + @Override + public int hashCode() { + return Objects.hash(org, authStatus, accessTokens, additionalProperties); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; + } + return a.isPresent() ? Arrays.deepHashCode(new Object[] {a.get()}) : 31; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class AuthOrgPreference {\n"); + sb.append(" org: ").append(toIndentedString(org)).append("\n"); + sb.append(" authStatus: ").append(toIndentedString(authStatus)).append("\n"); + sb.append(" accessTokens: ").append(toIndentedString(accessTokens)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first + * line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("org"); + openapiFields.add("auth_status"); + openapiFields.add("access_tokens"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to AuthOrgPreference + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!AuthOrgPreference.openapiRequiredFields + .isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException( + String.format( + "The required field(s) %s in AuthOrgPreference is not found in the" + + " empty JSON string", + AuthOrgPreference.openapiRequiredFields.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // validate the optional field `org` + if (jsonObj.get("org") != null && !jsonObj.get("org").isJsonNull()) { + AuthOrgInfo.validateJsonElement(jsonObj.get("org")); + } + if ((jsonObj.get("auth_status") != null && !jsonObj.get("auth_status").isJsonNull()) + && !jsonObj.get("auth_status").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `auth_status` to be a primitive type in the JSON" + + " string but got `%s`", + jsonObj.get("auth_status").toString())); + } + // validate the optional field `auth_status` + if (jsonObj.get("auth_status") != null && !jsonObj.get("auth_status").isJsonNull()) { + AuthStatusEnum.validateJsonElement(jsonObj.get("auth_status")); + } + if (jsonObj.get("access_tokens") != null && !jsonObj.get("access_tokens").isJsonNull()) { + JsonArray jsonArrayaccessTokens = jsonObj.getAsJsonArray("access_tokens"); + if (jsonArrayaccessTokens != null) { + // ensure the json data is an array + if (!jsonObj.get("access_tokens").isJsonArray()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `access_tokens` to be an array in the JSON" + + " string but got `%s`", + jsonObj.get("access_tokens").toString())); + } + + // validate the optional field `access_tokens` (array) + for (int i = 0; i < jsonArrayaccessTokens.size(); i++) { + AuthSettingsAccessToken.validateJsonElement(jsonArrayaccessTokens.get(i)); + } + ; + } + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!AuthOrgPreference.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'AuthOrgPreference' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter = + gson.getDelegateAdapter(this, TypeToken.get(AuthOrgPreference.class)); + + return (TypeAdapter) + new TypeAdapter() { + @Override + public void write(JsonWriter out, AuthOrgPreference value) + throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + obj.remove("additionalProperties"); + // serialize additional properties + if (value.getAdditionalProperties() != null) { + for (Map.Entry entry : + value.getAdditionalProperties().entrySet()) { + if (entry.getValue() instanceof String) + obj.addProperty(entry.getKey(), (String) entry.getValue()); + else if (entry.getValue() instanceof Number) + obj.addProperty(entry.getKey(), (Number) entry.getValue()); + else if (entry.getValue() instanceof Boolean) + obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); + else if (entry.getValue() instanceof Character) + obj.addProperty( + entry.getKey(), (Character) entry.getValue()); + else { + JsonElement jsonElement = gson.toJsonTree(entry.getValue()); + if (jsonElement.isJsonArray()) { + obj.add(entry.getKey(), jsonElement.getAsJsonArray()); + } else { + obj.add(entry.getKey(), jsonElement.getAsJsonObject()); + } + } + } + } + elementAdapter.write(out, obj); + } + + @Override + public AuthOrgPreference read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // store additional fields in the deserialized instance + AuthOrgPreference instance = thisAdapter.fromJsonTree(jsonObj); + for (Map.Entry entry : jsonObj.entrySet()) { + if (!openapiFields.contains(entry.getKey())) { + if (entry.getValue().isJsonPrimitive()) { // primitive type + if (entry.getValue().getAsJsonPrimitive().isString()) + instance.putAdditionalProperty( + entry.getKey(), entry.getValue().getAsString()); + else if (entry.getValue().getAsJsonPrimitive().isNumber()) + instance.putAdditionalProperty( + entry.getKey(), entry.getValue().getAsNumber()); + else if (entry.getValue().getAsJsonPrimitive().isBoolean()) + instance.putAdditionalProperty( + entry.getKey(), + entry.getValue().getAsBoolean()); + else + throw new IllegalArgumentException( + String.format( + "The field `%s` has unknown primitive" + + " type. Value: %s", + entry.getKey(), + entry.getValue().toString())); + } else if (entry.getValue().isJsonArray()) { + instance.putAdditionalProperty( + entry.getKey(), + gson.fromJson(entry.getValue(), List.class)); + } else { // JSON object + instance.putAdditionalProperty( + entry.getKey(), + gson.fromJson(entry.getValue(), HashMap.class)); + } + } + } + return instance; + } + }.nullSafe(); + } + } + + /** + * Create an instance of AuthOrgPreference given an JSON string + * + * @param jsonString JSON string + * @return An instance of AuthOrgPreference + * @throws IOException if the JSON string is invalid with respect to AuthOrgPreference + */ + public static AuthOrgPreference fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, AuthOrgPreference.class); + } + + /** + * Convert an instance of AuthOrgPreference to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} diff --git a/sdks/java/src/main/java/com/thoughtspot/client/model/AuthOrgPreferenceInput.java b/sdks/java/src/main/java/com/thoughtspot/client/model/AuthOrgPreferenceInput.java new file mode 100644 index 000000000..6407986ba --- /dev/null +++ b/sdks/java/src/main/java/com/thoughtspot/client/model/AuthOrgPreferenceInput.java @@ -0,0 +1,416 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client.model; + +import com.google.gson.Gson; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.TypeAdapter; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.reflect.TypeToken; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import com.thoughtspot.client.JSON; +import java.io.IOException; +import java.io.Serializable; +import java.util.Arrays; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Objects; +import org.openapitools.jackson.nullable.JsonNullable; + +/** Input for org-level auth configuration. */ +@javax.annotation.Generated( + value = "org.openapitools.codegen.languages.JavaClientCodegen", + comments = "Generator version: 7.12.0") +public class AuthOrgPreferenceInput implements Serializable { + private static final long serialVersionUID = 1L; + + public static final String SERIALIZED_NAME_ORG_IDENTIFIER = "org_identifier"; + + @SerializedName(SERIALIZED_NAME_ORG_IDENTIFIER) + @javax.annotation.Nonnull + private String orgIdentifier; + + /** + * Enable or disable authentication for this org. When enabled, a new token is generated if one + * does not exist. When disabled, the existing token is revoked. + */ + @JsonAdapter(AuthStatusEnum.Adapter.class) + public enum AuthStatusEnum { + ENABLED("ENABLED"), + + DISABLED("DISABLED"); + + private String value; + + AuthStatusEnum(String value) { + this.value = value; + } + + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + public static AuthStatusEnum fromValue(String value) { + for (AuthStatusEnum b : AuthStatusEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + return null; + } + + public static class Adapter extends TypeAdapter { + @Override + public void write(final JsonWriter jsonWriter, final AuthStatusEnum enumeration) + throws IOException { + jsonWriter.value(enumeration.getValue()); + } + + @Override + public AuthStatusEnum read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + return AuthStatusEnum.fromValue(value); + } + } + + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + String value = jsonElement.getAsString(); + AuthStatusEnum.fromValue(value); + } + } + + public static final String SERIALIZED_NAME_AUTH_STATUS = "auth_status"; + + @SerializedName(SERIALIZED_NAME_AUTH_STATUS) + @javax.annotation.Nullable + private AuthStatusEnum authStatus; + + public AuthOrgPreferenceInput() {} + + public AuthOrgPreferenceInput orgIdentifier(@javax.annotation.Nonnull String orgIdentifier) { + this.orgIdentifier = orgIdentifier; + return this; + } + + /** + * Unique ID or name of the org to configure. + * + * @return orgIdentifier + */ + @javax.annotation.Nonnull + public String getOrgIdentifier() { + return orgIdentifier; + } + + public void setOrgIdentifier(@javax.annotation.Nonnull String orgIdentifier) { + this.orgIdentifier = orgIdentifier; + } + + public AuthOrgPreferenceInput authStatus(@javax.annotation.Nullable AuthStatusEnum authStatus) { + this.authStatus = authStatus; + return this; + } + + /** + * Enable or disable authentication for this org. When enabled, a new token is generated if one + * does not exist. When disabled, the existing token is revoked. + * + * @return authStatus + */ + @javax.annotation.Nullable + public AuthStatusEnum getAuthStatus() { + return authStatus; + } + + public void setAuthStatus(@javax.annotation.Nullable AuthStatusEnum authStatus) { + this.authStatus = authStatus; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key name of the property + * @param value value of the property + * @return the AuthOrgPreferenceInput instance itself + */ + public AuthOrgPreferenceInput putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return a map of objects + */ + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key name of the property + * @return an object + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + AuthOrgPreferenceInput authOrgPreferenceInput = (AuthOrgPreferenceInput) o; + return Objects.equals(this.orgIdentifier, authOrgPreferenceInput.orgIdentifier) + && Objects.equals(this.authStatus, authOrgPreferenceInput.authStatus) + && Objects.equals( + this.additionalProperties, authOrgPreferenceInput.additionalProperties); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b + || (a != null + && b != null + && a.isPresent() + && b.isPresent() + && Objects.deepEquals(a.get(), b.get())); + } + + @Override + public int hashCode() { + return Objects.hash(orgIdentifier, authStatus, additionalProperties); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; + } + return a.isPresent() ? Arrays.deepHashCode(new Object[] {a.get()}) : 31; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class AuthOrgPreferenceInput {\n"); + sb.append(" orgIdentifier: ").append(toIndentedString(orgIdentifier)).append("\n"); + sb.append(" authStatus: ").append(toIndentedString(authStatus)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first + * line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("org_identifier"); + openapiFields.add("auth_status"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + openapiRequiredFields.add("org_identifier"); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to AuthOrgPreferenceInput + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!AuthOrgPreferenceInput.openapiRequiredFields + .isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException( + String.format( + "The required field(s) %s in AuthOrgPreferenceInput is not found" + + " in the empty JSON string", + AuthOrgPreferenceInput.openapiRequiredFields.toString())); + } + } + + // check to make sure all required properties/fields are present in the JSON string + for (String requiredField : AuthOrgPreferenceInput.openapiRequiredFields) { + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException( + String.format( + "The required field `%s` is not found in the JSON string: %s", + requiredField, jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if (!jsonObj.get("org_identifier").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `org_identifier` to be a primitive type in the" + + " JSON string but got `%s`", + jsonObj.get("org_identifier").toString())); + } + if ((jsonObj.get("auth_status") != null && !jsonObj.get("auth_status").isJsonNull()) + && !jsonObj.get("auth_status").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `auth_status` to be a primitive type in the JSON" + + " string but got `%s`", + jsonObj.get("auth_status").toString())); + } + // validate the optional field `auth_status` + if (jsonObj.get("auth_status") != null && !jsonObj.get("auth_status").isJsonNull()) { + AuthStatusEnum.validateJsonElement(jsonObj.get("auth_status")); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!AuthOrgPreferenceInput.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'AuthOrgPreferenceInput' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter = + gson.getDelegateAdapter(this, TypeToken.get(AuthOrgPreferenceInput.class)); + + return (TypeAdapter) + new TypeAdapter() { + @Override + public void write(JsonWriter out, AuthOrgPreferenceInput value) + throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + obj.remove("additionalProperties"); + // serialize additional properties + if (value.getAdditionalProperties() != null) { + for (Map.Entry entry : + value.getAdditionalProperties().entrySet()) { + if (entry.getValue() instanceof String) + obj.addProperty(entry.getKey(), (String) entry.getValue()); + else if (entry.getValue() instanceof Number) + obj.addProperty(entry.getKey(), (Number) entry.getValue()); + else if (entry.getValue() instanceof Boolean) + obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); + else if (entry.getValue() instanceof Character) + obj.addProperty( + entry.getKey(), (Character) entry.getValue()); + else { + JsonElement jsonElement = gson.toJsonTree(entry.getValue()); + if (jsonElement.isJsonArray()) { + obj.add(entry.getKey(), jsonElement.getAsJsonArray()); + } else { + obj.add(entry.getKey(), jsonElement.getAsJsonObject()); + } + } + } + } + elementAdapter.write(out, obj); + } + + @Override + public AuthOrgPreferenceInput read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // store additional fields in the deserialized instance + AuthOrgPreferenceInput instance = thisAdapter.fromJsonTree(jsonObj); + for (Map.Entry entry : jsonObj.entrySet()) { + if (!openapiFields.contains(entry.getKey())) { + if (entry.getValue().isJsonPrimitive()) { // primitive type + if (entry.getValue().getAsJsonPrimitive().isString()) + instance.putAdditionalProperty( + entry.getKey(), entry.getValue().getAsString()); + else if (entry.getValue().getAsJsonPrimitive().isNumber()) + instance.putAdditionalProperty( + entry.getKey(), entry.getValue().getAsNumber()); + else if (entry.getValue().getAsJsonPrimitive().isBoolean()) + instance.putAdditionalProperty( + entry.getKey(), + entry.getValue().getAsBoolean()); + else + throw new IllegalArgumentException( + String.format( + "The field `%s` has unknown primitive" + + " type. Value: %s", + entry.getKey(), + entry.getValue().toString())); + } else if (entry.getValue().isJsonArray()) { + instance.putAdditionalProperty( + entry.getKey(), + gson.fromJson(entry.getValue(), List.class)); + } else { // JSON object + instance.putAdditionalProperty( + entry.getKey(), + gson.fromJson(entry.getValue(), HashMap.class)); + } + } + } + return instance; + } + }.nullSafe(); + } + } + + /** + * Create an instance of AuthOrgPreferenceInput given an JSON string + * + * @param jsonString JSON string + * @return An instance of AuthOrgPreferenceInput + * @throws IOException if the JSON string is invalid with respect to AuthOrgPreferenceInput + */ + public static AuthOrgPreferenceInput fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, AuthOrgPreferenceInput.class); + } + + /** + * Convert an instance of AuthOrgPreferenceInput to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} diff --git a/sdks/java/src/main/java/com/thoughtspot/client/model/AuthSettingsAccessToken.java b/sdks/java/src/main/java/com/thoughtspot/client/model/AuthSettingsAccessToken.java new file mode 100644 index 000000000..0370e624a --- /dev/null +++ b/sdks/java/src/main/java/com/thoughtspot/client/model/AuthSettingsAccessToken.java @@ -0,0 +1,303 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client.model; + +import com.google.gson.Gson; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.TypeAdapter; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.annotations.SerializedName; +import com.google.gson.reflect.TypeToken; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import com.thoughtspot.client.JSON; +import java.io.IOException; +import java.io.Serializable; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Objects; + +/** An auth settings access token. */ +@javax.annotation.Generated( + value = "org.openapitools.codegen.languages.JavaClientCodegen", + comments = "Generator version: 7.12.0") +public class AuthSettingsAccessToken implements Serializable { + private static final long serialVersionUID = 1L; + + public static final String SERIALIZED_NAME_KEY = "key"; + + @SerializedName(SERIALIZED_NAME_KEY) + @javax.annotation.Nonnull + private String key; + + public AuthSettingsAccessToken() {} + + public AuthSettingsAccessToken key(@javax.annotation.Nonnull String key) { + this.key = key; + return this; + } + + /** + * The plaintext token key value. + * + * @return key + */ + @javax.annotation.Nonnull + public String getKey() { + return key; + } + + public void setKey(@javax.annotation.Nonnull String key) { + this.key = key; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key name of the property + * @param value value of the property + * @return the AuthSettingsAccessToken instance itself + */ + public AuthSettingsAccessToken putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return a map of objects + */ + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key name of the property + * @return an object + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + AuthSettingsAccessToken authSettingsAccessToken = (AuthSettingsAccessToken) o; + return Objects.equals(this.key, authSettingsAccessToken.key) + && Objects.equals( + this.additionalProperties, authSettingsAccessToken.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(key, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class AuthSettingsAccessToken {\n"); + sb.append(" key: ").append(toIndentedString(key)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first + * line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("key"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + openapiRequiredFields.add("key"); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to AuthSettingsAccessToken + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!AuthSettingsAccessToken.openapiRequiredFields + .isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException( + String.format( + "The required field(s) %s in AuthSettingsAccessToken is not found" + + " in the empty JSON string", + AuthSettingsAccessToken.openapiRequiredFields.toString())); + } + } + + // check to make sure all required properties/fields are present in the JSON string + for (String requiredField : AuthSettingsAccessToken.openapiRequiredFields) { + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException( + String.format( + "The required field `%s` is not found in the JSON string: %s", + requiredField, jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if (!jsonObj.get("key").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `key` to be a primitive type in the JSON string" + + " but got `%s`", + jsonObj.get("key").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!AuthSettingsAccessToken.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'AuthSettingsAccessToken' and its + // subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter = + gson.getDelegateAdapter(this, TypeToken.get(AuthSettingsAccessToken.class)); + + return (TypeAdapter) + new TypeAdapter() { + @Override + public void write(JsonWriter out, AuthSettingsAccessToken value) + throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + obj.remove("additionalProperties"); + // serialize additional properties + if (value.getAdditionalProperties() != null) { + for (Map.Entry entry : + value.getAdditionalProperties().entrySet()) { + if (entry.getValue() instanceof String) + obj.addProperty(entry.getKey(), (String) entry.getValue()); + else if (entry.getValue() instanceof Number) + obj.addProperty(entry.getKey(), (Number) entry.getValue()); + else if (entry.getValue() instanceof Boolean) + obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); + else if (entry.getValue() instanceof Character) + obj.addProperty( + entry.getKey(), (Character) entry.getValue()); + else { + JsonElement jsonElement = gson.toJsonTree(entry.getValue()); + if (jsonElement.isJsonArray()) { + obj.add(entry.getKey(), jsonElement.getAsJsonArray()); + } else { + obj.add(entry.getKey(), jsonElement.getAsJsonObject()); + } + } + } + } + elementAdapter.write(out, obj); + } + + @Override + public AuthSettingsAccessToken read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // store additional fields in the deserialized instance + AuthSettingsAccessToken instance = thisAdapter.fromJsonTree(jsonObj); + for (Map.Entry entry : jsonObj.entrySet()) { + if (!openapiFields.contains(entry.getKey())) { + if (entry.getValue().isJsonPrimitive()) { // primitive type + if (entry.getValue().getAsJsonPrimitive().isString()) + instance.putAdditionalProperty( + entry.getKey(), entry.getValue().getAsString()); + else if (entry.getValue().getAsJsonPrimitive().isNumber()) + instance.putAdditionalProperty( + entry.getKey(), entry.getValue().getAsNumber()); + else if (entry.getValue().getAsJsonPrimitive().isBoolean()) + instance.putAdditionalProperty( + entry.getKey(), + entry.getValue().getAsBoolean()); + else + throw new IllegalArgumentException( + String.format( + "The field `%s` has unknown primitive" + + " type. Value: %s", + entry.getKey(), + entry.getValue().toString())); + } else if (entry.getValue().isJsonArray()) { + instance.putAdditionalProperty( + entry.getKey(), + gson.fromJson(entry.getValue(), List.class)); + } else { // JSON object + instance.putAdditionalProperty( + entry.getKey(), + gson.fromJson(entry.getValue(), HashMap.class)); + } + } + } + return instance; + } + }.nullSafe(); + } + } + + /** + * Create an instance of AuthSettingsAccessToken given an JSON string + * + * @param jsonString JSON string + * @return An instance of AuthSettingsAccessToken + * @throws IOException if the JSON string is invalid with respect to AuthSettingsAccessToken + */ + public static AuthSettingsAccessToken fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, AuthSettingsAccessToken.class); + } + + /** + * Convert an instance of AuthSettingsAccessToken to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} diff --git a/sdks/java/src/main/java/com/thoughtspot/client/model/Authentication.java b/sdks/java/src/main/java/com/thoughtspot/client/model/Authentication.java new file mode 100644 index 000000000..bb66ba8d6 --- /dev/null +++ b/sdks/java/src/main/java/com/thoughtspot/client/model/Authentication.java @@ -0,0 +1,408 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client.model; + +import com.google.gson.Gson; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.TypeAdapter; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.annotations.SerializedName; +import com.google.gson.reflect.TypeToken; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import com.thoughtspot.client.JSON; +import java.io.IOException; +import java.io.Serializable; +import java.util.Arrays; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Objects; +import org.openapitools.jackson.nullable.JsonNullable; + +/** Authorization type for the custom action. */ +@javax.annotation.Generated( + value = "org.openapitools.codegen.languages.JavaClientCodegen", + comments = "Generator version: 7.12.0") +public class Authentication implements Serializable { + private static final long serialVersionUID = 1L; + + public static final String SERIALIZED_NAME_AP_I_KEY = "API_Key"; + + @SerializedName(SERIALIZED_NAME_AP_I_KEY) + @javax.annotation.Nullable + private APIKey apIKey; + + public static final String SERIALIZED_NAME_BASIC_AUTH = "Basic_Auth"; + + @SerializedName(SERIALIZED_NAME_BASIC_AUTH) + @javax.annotation.Nullable + private BasicAuth basicAuth; + + public static final String SERIALIZED_NAME_BEARER_TOKEN = "Bearer_Token"; + + @SerializedName(SERIALIZED_NAME_BEARER_TOKEN) + @javax.annotation.Nullable + private String bearerToken; + + public static final String SERIALIZED_NAME_NO_AUTH = "No_Auth"; + + @SerializedName(SERIALIZED_NAME_NO_AUTH) + @javax.annotation.Nullable + private String noAuth; + + public Authentication() {} + + public Authentication apIKey(@javax.annotation.Nullable APIKey apIKey) { + this.apIKey = apIKey; + return this; + } + + /** + * Get apIKey + * + * @return apIKey + */ + @javax.annotation.Nullable + public APIKey getApIKey() { + return apIKey; + } + + public void setApIKey(@javax.annotation.Nullable APIKey apIKey) { + this.apIKey = apIKey; + } + + public Authentication basicAuth(@javax.annotation.Nullable BasicAuth basicAuth) { + this.basicAuth = basicAuth; + return this; + } + + /** + * Get basicAuth + * + * @return basicAuth + */ + @javax.annotation.Nullable + public BasicAuth getBasicAuth() { + return basicAuth; + } + + public void setBasicAuth(@javax.annotation.Nullable BasicAuth basicAuth) { + this.basicAuth = basicAuth; + } + + public Authentication bearerToken(@javax.annotation.Nullable String bearerToken) { + this.bearerToken = bearerToken; + return this; + } + + /** + * Bearer tokens enable requests to authenticate using an access key. + * + * @return bearerToken + */ + @javax.annotation.Nullable + public String getBearerToken() { + return bearerToken; + } + + public void setBearerToken(@javax.annotation.Nullable String bearerToken) { + this.bearerToken = bearerToken; + } + + public Authentication noAuth(@javax.annotation.Nullable String noAuth) { + this.noAuth = noAuth; + return this; + } + + /** + * No authorization. If your request doesn't require authorization. + * + * @return noAuth + */ + @javax.annotation.Nullable + public String getNoAuth() { + return noAuth; + } + + public void setNoAuth(@javax.annotation.Nullable String noAuth) { + this.noAuth = noAuth; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key name of the property + * @param value value of the property + * @return the Authentication instance itself + */ + public Authentication putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return a map of objects + */ + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key name of the property + * @return an object + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + Authentication authentication = (Authentication) o; + return Objects.equals(this.apIKey, authentication.apIKey) + && Objects.equals(this.basicAuth, authentication.basicAuth) + && Objects.equals(this.bearerToken, authentication.bearerToken) + && Objects.equals(this.noAuth, authentication.noAuth) + && Objects.equals(this.additionalProperties, authentication.additionalProperties); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b + || (a != null + && b != null + && a.isPresent() + && b.isPresent() + && Objects.deepEquals(a.get(), b.get())); + } + + @Override + public int hashCode() { + return Objects.hash(apIKey, basicAuth, bearerToken, noAuth, additionalProperties); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; + } + return a.isPresent() ? Arrays.deepHashCode(new Object[] {a.get()}) : 31; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class Authentication {\n"); + sb.append(" apIKey: ").append(toIndentedString(apIKey)).append("\n"); + sb.append(" basicAuth: ").append(toIndentedString(basicAuth)).append("\n"); + sb.append(" bearerToken: ").append(toIndentedString(bearerToken)).append("\n"); + sb.append(" noAuth: ").append(toIndentedString(noAuth)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first + * line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("API_Key"); + openapiFields.add("Basic_Auth"); + openapiFields.add("Bearer_Token"); + openapiFields.add("No_Auth"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to Authentication + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!Authentication.openapiRequiredFields + .isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException( + String.format( + "The required field(s) %s in Authentication is not found in the" + + " empty JSON string", + Authentication.openapiRequiredFields.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // validate the optional field `API_Key` + if (jsonObj.get("API_Key") != null && !jsonObj.get("API_Key").isJsonNull()) { + APIKey.validateJsonElement(jsonObj.get("API_Key")); + } + // validate the optional field `Basic_Auth` + if (jsonObj.get("Basic_Auth") != null && !jsonObj.get("Basic_Auth").isJsonNull()) { + BasicAuth.validateJsonElement(jsonObj.get("Basic_Auth")); + } + if ((jsonObj.get("Bearer_Token") != null && !jsonObj.get("Bearer_Token").isJsonNull()) + && !jsonObj.get("Bearer_Token").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `Bearer_Token` to be a primitive type in the JSON" + + " string but got `%s`", + jsonObj.get("Bearer_Token").toString())); + } + if ((jsonObj.get("No_Auth") != null && !jsonObj.get("No_Auth").isJsonNull()) + && !jsonObj.get("No_Auth").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `No_Auth` to be a primitive type in the JSON" + + " string but got `%s`", + jsonObj.get("No_Auth").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!Authentication.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'Authentication' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter = + gson.getDelegateAdapter(this, TypeToken.get(Authentication.class)); + + return (TypeAdapter) + new TypeAdapter() { + @Override + public void write(JsonWriter out, Authentication value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + obj.remove("additionalProperties"); + // serialize additional properties + if (value.getAdditionalProperties() != null) { + for (Map.Entry entry : + value.getAdditionalProperties().entrySet()) { + if (entry.getValue() instanceof String) + obj.addProperty(entry.getKey(), (String) entry.getValue()); + else if (entry.getValue() instanceof Number) + obj.addProperty(entry.getKey(), (Number) entry.getValue()); + else if (entry.getValue() instanceof Boolean) + obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); + else if (entry.getValue() instanceof Character) + obj.addProperty( + entry.getKey(), (Character) entry.getValue()); + else { + JsonElement jsonElement = gson.toJsonTree(entry.getValue()); + if (jsonElement.isJsonArray()) { + obj.add(entry.getKey(), jsonElement.getAsJsonArray()); + } else { + obj.add(entry.getKey(), jsonElement.getAsJsonObject()); + } + } + } + } + elementAdapter.write(out, obj); + } + + @Override + public Authentication read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // store additional fields in the deserialized instance + Authentication instance = thisAdapter.fromJsonTree(jsonObj); + for (Map.Entry entry : jsonObj.entrySet()) { + if (!openapiFields.contains(entry.getKey())) { + if (entry.getValue().isJsonPrimitive()) { // primitive type + if (entry.getValue().getAsJsonPrimitive().isString()) + instance.putAdditionalProperty( + entry.getKey(), entry.getValue().getAsString()); + else if (entry.getValue().getAsJsonPrimitive().isNumber()) + instance.putAdditionalProperty( + entry.getKey(), entry.getValue().getAsNumber()); + else if (entry.getValue().getAsJsonPrimitive().isBoolean()) + instance.putAdditionalProperty( + entry.getKey(), + entry.getValue().getAsBoolean()); + else + throw new IllegalArgumentException( + String.format( + "The field `%s` has unknown primitive" + + " type. Value: %s", + entry.getKey(), + entry.getValue().toString())); + } else if (entry.getValue().isJsonArray()) { + instance.putAdditionalProperty( + entry.getKey(), + gson.fromJson(entry.getValue(), List.class)); + } else { // JSON object + instance.putAdditionalProperty( + entry.getKey(), + gson.fromJson(entry.getValue(), HashMap.class)); + } + } + } + return instance; + } + }.nullSafe(); + } + } + + /** + * Create an instance of Authentication given an JSON string + * + * @param jsonString JSON string + * @return An instance of Authentication + * @throws IOException if the JSON string is invalid with respect to Authentication + */ + public static Authentication fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, Authentication.class); + } + + /** + * Convert an instance of Authentication to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} diff --git a/sdks/java/src/main/java/com/thoughtspot/client/model/AuthenticationInput.java b/sdks/java/src/main/java/com/thoughtspot/client/model/AuthenticationInput.java new file mode 100644 index 000000000..7e7490eeb --- /dev/null +++ b/sdks/java/src/main/java/com/thoughtspot/client/model/AuthenticationInput.java @@ -0,0 +1,410 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client.model; + +import com.google.gson.Gson; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.TypeAdapter; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.annotations.SerializedName; +import com.google.gson.reflect.TypeToken; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import com.thoughtspot.client.JSON; +import java.io.IOException; +import java.io.Serializable; +import java.util.Arrays; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Objects; +import org.openapitools.jackson.nullable.JsonNullable; + +/** Authorization type for the custom action. */ +@javax.annotation.Generated( + value = "org.openapitools.codegen.languages.JavaClientCodegen", + comments = "Generator version: 7.12.0") +public class AuthenticationInput implements Serializable { + private static final long serialVersionUID = 1L; + + public static final String SERIALIZED_NAME_AP_I_KEY = "API_Key"; + + @SerializedName(SERIALIZED_NAME_AP_I_KEY) + @javax.annotation.Nullable + private APIKeyInput apIKey; + + public static final String SERIALIZED_NAME_BASIC_AUTH = "Basic_Auth"; + + @SerializedName(SERIALIZED_NAME_BASIC_AUTH) + @javax.annotation.Nullable + private BasicAuthInput basicAuth; + + public static final String SERIALIZED_NAME_BEARER_TOKEN = "Bearer_Token"; + + @SerializedName(SERIALIZED_NAME_BEARER_TOKEN) + @javax.annotation.Nullable + private String bearerToken; + + public static final String SERIALIZED_NAME_NO_AUTH = "No_Auth"; + + @SerializedName(SERIALIZED_NAME_NO_AUTH) + @javax.annotation.Nullable + private String noAuth; + + public AuthenticationInput() {} + + public AuthenticationInput apIKey(@javax.annotation.Nullable APIKeyInput apIKey) { + this.apIKey = apIKey; + return this; + } + + /** + * Get apIKey + * + * @return apIKey + */ + @javax.annotation.Nullable + public APIKeyInput getApIKey() { + return apIKey; + } + + public void setApIKey(@javax.annotation.Nullable APIKeyInput apIKey) { + this.apIKey = apIKey; + } + + public AuthenticationInput basicAuth(@javax.annotation.Nullable BasicAuthInput basicAuth) { + this.basicAuth = basicAuth; + return this; + } + + /** + * Get basicAuth + * + * @return basicAuth + */ + @javax.annotation.Nullable + public BasicAuthInput getBasicAuth() { + return basicAuth; + } + + public void setBasicAuth(@javax.annotation.Nullable BasicAuthInput basicAuth) { + this.basicAuth = basicAuth; + } + + public AuthenticationInput bearerToken(@javax.annotation.Nullable String bearerToken) { + this.bearerToken = bearerToken; + return this; + } + + /** + * Bearer tokens enable requests to authenticate using an access key. + * + * @return bearerToken + */ + @javax.annotation.Nullable + public String getBearerToken() { + return bearerToken; + } + + public void setBearerToken(@javax.annotation.Nullable String bearerToken) { + this.bearerToken = bearerToken; + } + + public AuthenticationInput noAuth(@javax.annotation.Nullable String noAuth) { + this.noAuth = noAuth; + return this; + } + + /** + * No authorization. If your request doesn't require authorization. + * + * @return noAuth + */ + @javax.annotation.Nullable + public String getNoAuth() { + return noAuth; + } + + public void setNoAuth(@javax.annotation.Nullable String noAuth) { + this.noAuth = noAuth; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key name of the property + * @param value value of the property + * @return the AuthenticationInput instance itself + */ + public AuthenticationInput putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return a map of objects + */ + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key name of the property + * @return an object + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + AuthenticationInput authenticationInput = (AuthenticationInput) o; + return Objects.equals(this.apIKey, authenticationInput.apIKey) + && Objects.equals(this.basicAuth, authenticationInput.basicAuth) + && Objects.equals(this.bearerToken, authenticationInput.bearerToken) + && Objects.equals(this.noAuth, authenticationInput.noAuth) + && Objects.equals( + this.additionalProperties, authenticationInput.additionalProperties); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b + || (a != null + && b != null + && a.isPresent() + && b.isPresent() + && Objects.deepEquals(a.get(), b.get())); + } + + @Override + public int hashCode() { + return Objects.hash(apIKey, basicAuth, bearerToken, noAuth, additionalProperties); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; + } + return a.isPresent() ? Arrays.deepHashCode(new Object[] {a.get()}) : 31; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class AuthenticationInput {\n"); + sb.append(" apIKey: ").append(toIndentedString(apIKey)).append("\n"); + sb.append(" basicAuth: ").append(toIndentedString(basicAuth)).append("\n"); + sb.append(" bearerToken: ").append(toIndentedString(bearerToken)).append("\n"); + sb.append(" noAuth: ").append(toIndentedString(noAuth)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first + * line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("API_Key"); + openapiFields.add("Basic_Auth"); + openapiFields.add("Bearer_Token"); + openapiFields.add("No_Auth"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to AuthenticationInput + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!AuthenticationInput.openapiRequiredFields + .isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException( + String.format( + "The required field(s) %s in AuthenticationInput is not found in" + + " the empty JSON string", + AuthenticationInput.openapiRequiredFields.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // validate the optional field `API_Key` + if (jsonObj.get("API_Key") != null && !jsonObj.get("API_Key").isJsonNull()) { + APIKeyInput.validateJsonElement(jsonObj.get("API_Key")); + } + // validate the optional field `Basic_Auth` + if (jsonObj.get("Basic_Auth") != null && !jsonObj.get("Basic_Auth").isJsonNull()) { + BasicAuthInput.validateJsonElement(jsonObj.get("Basic_Auth")); + } + if ((jsonObj.get("Bearer_Token") != null && !jsonObj.get("Bearer_Token").isJsonNull()) + && !jsonObj.get("Bearer_Token").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `Bearer_Token` to be a primitive type in the JSON" + + " string but got `%s`", + jsonObj.get("Bearer_Token").toString())); + } + if ((jsonObj.get("No_Auth") != null && !jsonObj.get("No_Auth").isJsonNull()) + && !jsonObj.get("No_Auth").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `No_Auth` to be a primitive type in the JSON" + + " string but got `%s`", + jsonObj.get("No_Auth").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!AuthenticationInput.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'AuthenticationInput' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter = + gson.getDelegateAdapter(this, TypeToken.get(AuthenticationInput.class)); + + return (TypeAdapter) + new TypeAdapter() { + @Override + public void write(JsonWriter out, AuthenticationInput value) + throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + obj.remove("additionalProperties"); + // serialize additional properties + if (value.getAdditionalProperties() != null) { + for (Map.Entry entry : + value.getAdditionalProperties().entrySet()) { + if (entry.getValue() instanceof String) + obj.addProperty(entry.getKey(), (String) entry.getValue()); + else if (entry.getValue() instanceof Number) + obj.addProperty(entry.getKey(), (Number) entry.getValue()); + else if (entry.getValue() instanceof Boolean) + obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); + else if (entry.getValue() instanceof Character) + obj.addProperty( + entry.getKey(), (Character) entry.getValue()); + else { + JsonElement jsonElement = gson.toJsonTree(entry.getValue()); + if (jsonElement.isJsonArray()) { + obj.add(entry.getKey(), jsonElement.getAsJsonArray()); + } else { + obj.add(entry.getKey(), jsonElement.getAsJsonObject()); + } + } + } + } + elementAdapter.write(out, obj); + } + + @Override + public AuthenticationInput read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // store additional fields in the deserialized instance + AuthenticationInput instance = thisAdapter.fromJsonTree(jsonObj); + for (Map.Entry entry : jsonObj.entrySet()) { + if (!openapiFields.contains(entry.getKey())) { + if (entry.getValue().isJsonPrimitive()) { // primitive type + if (entry.getValue().getAsJsonPrimitive().isString()) + instance.putAdditionalProperty( + entry.getKey(), entry.getValue().getAsString()); + else if (entry.getValue().getAsJsonPrimitive().isNumber()) + instance.putAdditionalProperty( + entry.getKey(), entry.getValue().getAsNumber()); + else if (entry.getValue().getAsJsonPrimitive().isBoolean()) + instance.putAdditionalProperty( + entry.getKey(), + entry.getValue().getAsBoolean()); + else + throw new IllegalArgumentException( + String.format( + "The field `%s` has unknown primitive" + + " type. Value: %s", + entry.getKey(), + entry.getValue().toString())); + } else if (entry.getValue().isJsonArray()) { + instance.putAdditionalProperty( + entry.getKey(), + gson.fromJson(entry.getValue(), List.class)); + } else { // JSON object + instance.putAdditionalProperty( + entry.getKey(), + gson.fromJson(entry.getValue(), HashMap.class)); + } + } + } + return instance; + } + }.nullSafe(); + } + } + + /** + * Create an instance of AuthenticationInput given an JSON string + * + * @param jsonString JSON string + * @return An instance of AuthenticationInput + * @throws IOException if the JSON string is invalid with respect to AuthenticationInput + */ + public static AuthenticationInput fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, AuthenticationInput.class); + } + + /** + * Convert an instance of AuthenticationInput to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} diff --git a/sdks/java/src/main/java/com/thoughtspot/client/model/Author.java b/sdks/java/src/main/java/com/thoughtspot/client/model/Author.java new file mode 100644 index 000000000..a22512835 --- /dev/null +++ b/sdks/java/src/main/java/com/thoughtspot/client/model/Author.java @@ -0,0 +1,336 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client.model; + +import com.google.gson.Gson; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.TypeAdapter; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.annotations.SerializedName; +import com.google.gson.reflect.TypeToken; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import com.thoughtspot.client.JSON; +import java.io.IOException; +import java.io.Serializable; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Objects; + +/** Author of the schedule. */ +@javax.annotation.Generated( + value = "org.openapitools.codegen.languages.JavaClientCodegen", + comments = "Generator version: 7.12.0") +public class Author implements Serializable { + private static final long serialVersionUID = 1L; + + public static final String SERIALIZED_NAME_ID = "id"; + + @SerializedName(SERIALIZED_NAME_ID) + @javax.annotation.Nonnull + private String id; + + public static final String SERIALIZED_NAME_NAME = "name"; + + @SerializedName(SERIALIZED_NAME_NAME) + @javax.annotation.Nonnull + private String name; + + public Author() {} + + public Author id(@javax.annotation.Nonnull String id) { + this.id = id; + return this; + } + + /** + * The unique identifier of the object. + * + * @return id + */ + @javax.annotation.Nonnull + public String getId() { + return id; + } + + public void setId(@javax.annotation.Nonnull String id) { + this.id = id; + } + + public Author name(@javax.annotation.Nonnull String name) { + this.name = name; + return this; + } + + /** + * Name of the object. + * + * @return name + */ + @javax.annotation.Nonnull + public String getName() { + return name; + } + + public void setName(@javax.annotation.Nonnull String name) { + this.name = name; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key name of the property + * @param value value of the property + * @return the Author instance itself + */ + public Author putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return a map of objects + */ + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key name of the property + * @return an object + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + Author author = (Author) o; + return Objects.equals(this.id, author.id) + && Objects.equals(this.name, author.name) + && Objects.equals(this.additionalProperties, author.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(id, name, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class Author {\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first + * line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("id"); + openapiFields.add("name"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + openapiRequiredFields.add("id"); + openapiRequiredFields.add("name"); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to Author + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!Author.openapiRequiredFields + .isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException( + String.format( + "The required field(s) %s in Author is not found in the empty JSON" + + " string", + Author.openapiRequiredFields.toString())); + } + } + + // check to make sure all required properties/fields are present in the JSON string + for (String requiredField : Author.openapiRequiredFields) { + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException( + String.format( + "The required field `%s` is not found in the JSON string: %s", + requiredField, jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if (!jsonObj.get("id").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `id` to be a primitive type in the JSON string but" + + " got `%s`", + jsonObj.get("id").toString())); + } + if (!jsonObj.get("name").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `name` to be a primitive type in the JSON string" + + " but got `%s`", + jsonObj.get("name").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!Author.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'Author' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter = + gson.getDelegateAdapter(this, TypeToken.get(Author.class)); + + return (TypeAdapter) + new TypeAdapter() { + @Override + public void write(JsonWriter out, Author value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + obj.remove("additionalProperties"); + // serialize additional properties + if (value.getAdditionalProperties() != null) { + for (Map.Entry entry : + value.getAdditionalProperties().entrySet()) { + if (entry.getValue() instanceof String) + obj.addProperty(entry.getKey(), (String) entry.getValue()); + else if (entry.getValue() instanceof Number) + obj.addProperty(entry.getKey(), (Number) entry.getValue()); + else if (entry.getValue() instanceof Boolean) + obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); + else if (entry.getValue() instanceof Character) + obj.addProperty( + entry.getKey(), (Character) entry.getValue()); + else { + JsonElement jsonElement = gson.toJsonTree(entry.getValue()); + if (jsonElement.isJsonArray()) { + obj.add(entry.getKey(), jsonElement.getAsJsonArray()); + } else { + obj.add(entry.getKey(), jsonElement.getAsJsonObject()); + } + } + } + } + elementAdapter.write(out, obj); + } + + @Override + public Author read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // store additional fields in the deserialized instance + Author instance = thisAdapter.fromJsonTree(jsonObj); + for (Map.Entry entry : jsonObj.entrySet()) { + if (!openapiFields.contains(entry.getKey())) { + if (entry.getValue().isJsonPrimitive()) { // primitive type + if (entry.getValue().getAsJsonPrimitive().isString()) + instance.putAdditionalProperty( + entry.getKey(), entry.getValue().getAsString()); + else if (entry.getValue().getAsJsonPrimitive().isNumber()) + instance.putAdditionalProperty( + entry.getKey(), entry.getValue().getAsNumber()); + else if (entry.getValue().getAsJsonPrimitive().isBoolean()) + instance.putAdditionalProperty( + entry.getKey(), + entry.getValue().getAsBoolean()); + else + throw new IllegalArgumentException( + String.format( + "The field `%s` has unknown primitive" + + " type. Value: %s", + entry.getKey(), + entry.getValue().toString())); + } else if (entry.getValue().isJsonArray()) { + instance.putAdditionalProperty( + entry.getKey(), + gson.fromJson(entry.getValue(), List.class)); + } else { // JSON object + instance.putAdditionalProperty( + entry.getKey(), + gson.fromJson(entry.getValue(), HashMap.class)); + } + } + } + return instance; + } + }.nullSafe(); + } + } + + /** + * Create an instance of Author given an JSON string + * + * @param jsonString JSON string + * @return An instance of Author + * @throws IOException if the JSON string is invalid with respect to Author + */ + public static Author fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, Author.class); + } + + /** + * Convert an instance of Author to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} diff --git a/sdks/java/src/main/java/com/thoughtspot/client/model/AuthorMetadataTypeInput.java b/sdks/java/src/main/java/com/thoughtspot/client/model/AuthorMetadataTypeInput.java new file mode 100644 index 000000000..372178687 --- /dev/null +++ b/sdks/java/src/main/java/com/thoughtspot/client/model/AuthorMetadataTypeInput.java @@ -0,0 +1,421 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client.model; + +import com.google.gson.Gson; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.TypeAdapter; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.reflect.TypeToken; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import com.thoughtspot.client.JSON; +import java.io.IOException; +import java.io.Serializable; +import java.util.Arrays; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Objects; +import org.openapitools.jackson.nullable.JsonNullable; + +/** MetadataType InputType used in Author API's */ +@javax.annotation.Generated( + value = "org.openapitools.codegen.languages.JavaClientCodegen", + comments = "Generator version: 7.12.0") +public class AuthorMetadataTypeInput implements Serializable { + private static final long serialVersionUID = 1L; + + /** + * Type of metadata. Required if the name of the object is set as the identifier. This attribute + * is optional when the object GUID is specified as the identifier. + */ + @JsonAdapter(TypeEnum.Adapter.class) + public enum TypeEnum { + LIVEBOARD("LIVEBOARD"), + + ANSWER("ANSWER"), + + LOGICAL_TABLE("LOGICAL_TABLE"), + + CONNECTION("CONNECTION"); + + private String value; + + TypeEnum(String value) { + this.value = value; + } + + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + public static TypeEnum fromValue(String value) { + for (TypeEnum b : TypeEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + return null; + } + + public static class Adapter extends TypeAdapter { + @Override + public void write(final JsonWriter jsonWriter, final TypeEnum enumeration) + throws IOException { + jsonWriter.value(enumeration.getValue()); + } + + @Override + public TypeEnum read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + return TypeEnum.fromValue(value); + } + } + + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + String value = jsonElement.getAsString(); + TypeEnum.fromValue(value); + } + } + + public static final String SERIALIZED_NAME_TYPE = "type"; + + @SerializedName(SERIALIZED_NAME_TYPE) + @javax.annotation.Nullable + private TypeEnum type; + + public static final String SERIALIZED_NAME_IDENTIFIER = "identifier"; + + @SerializedName(SERIALIZED_NAME_IDENTIFIER) + @javax.annotation.Nonnull + private String identifier; + + public AuthorMetadataTypeInput() {} + + public AuthorMetadataTypeInput type(@javax.annotation.Nullable TypeEnum type) { + this.type = type; + return this; + } + + /** + * Type of metadata. Required if the name of the object is set as the identifier. This attribute + * is optional when the object GUID is specified as the identifier. + * + * @return type + */ + @javax.annotation.Nullable + public TypeEnum getType() { + return type; + } + + public void setType(@javax.annotation.Nullable TypeEnum type) { + this.type = type; + } + + public AuthorMetadataTypeInput identifier(@javax.annotation.Nonnull String identifier) { + this.identifier = identifier; + return this; + } + + /** + * Unique ID or name of the metadata object. + * + * @return identifier + */ + @javax.annotation.Nonnull + public String getIdentifier() { + return identifier; + } + + public void setIdentifier(@javax.annotation.Nonnull String identifier) { + this.identifier = identifier; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key name of the property + * @param value value of the property + * @return the AuthorMetadataTypeInput instance itself + */ + public AuthorMetadataTypeInput putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return a map of objects + */ + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key name of the property + * @return an object + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + AuthorMetadataTypeInput authorMetadataTypeInput = (AuthorMetadataTypeInput) o; + return Objects.equals(this.type, authorMetadataTypeInput.type) + && Objects.equals(this.identifier, authorMetadataTypeInput.identifier) + && Objects.equals( + this.additionalProperties, authorMetadataTypeInput.additionalProperties); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b + || (a != null + && b != null + && a.isPresent() + && b.isPresent() + && Objects.deepEquals(a.get(), b.get())); + } + + @Override + public int hashCode() { + return Objects.hash(type, identifier, additionalProperties); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; + } + return a.isPresent() ? Arrays.deepHashCode(new Object[] {a.get()}) : 31; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class AuthorMetadataTypeInput {\n"); + sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append(" identifier: ").append(toIndentedString(identifier)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first + * line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("type"); + openapiFields.add("identifier"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + openapiRequiredFields.add("identifier"); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to AuthorMetadataTypeInput + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!AuthorMetadataTypeInput.openapiRequiredFields + .isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException( + String.format( + "The required field(s) %s in AuthorMetadataTypeInput is not found" + + " in the empty JSON string", + AuthorMetadataTypeInput.openapiRequiredFields.toString())); + } + } + + // check to make sure all required properties/fields are present in the JSON string + for (String requiredField : AuthorMetadataTypeInput.openapiRequiredFields) { + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException( + String.format( + "The required field `%s` is not found in the JSON string: %s", + requiredField, jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if ((jsonObj.get("type") != null && !jsonObj.get("type").isJsonNull()) + && !jsonObj.get("type").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `type` to be a primitive type in the JSON string" + + " but got `%s`", + jsonObj.get("type").toString())); + } + // validate the optional field `type` + if (jsonObj.get("type") != null && !jsonObj.get("type").isJsonNull()) { + TypeEnum.validateJsonElement(jsonObj.get("type")); + } + if (!jsonObj.get("identifier").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `identifier` to be a primitive type in the JSON" + + " string but got `%s`", + jsonObj.get("identifier").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!AuthorMetadataTypeInput.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'AuthorMetadataTypeInput' and its + // subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter = + gson.getDelegateAdapter(this, TypeToken.get(AuthorMetadataTypeInput.class)); + + return (TypeAdapter) + new TypeAdapter() { + @Override + public void write(JsonWriter out, AuthorMetadataTypeInput value) + throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + obj.remove("additionalProperties"); + // serialize additional properties + if (value.getAdditionalProperties() != null) { + for (Map.Entry entry : + value.getAdditionalProperties().entrySet()) { + if (entry.getValue() instanceof String) + obj.addProperty(entry.getKey(), (String) entry.getValue()); + else if (entry.getValue() instanceof Number) + obj.addProperty(entry.getKey(), (Number) entry.getValue()); + else if (entry.getValue() instanceof Boolean) + obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); + else if (entry.getValue() instanceof Character) + obj.addProperty( + entry.getKey(), (Character) entry.getValue()); + else { + JsonElement jsonElement = gson.toJsonTree(entry.getValue()); + if (jsonElement.isJsonArray()) { + obj.add(entry.getKey(), jsonElement.getAsJsonArray()); + } else { + obj.add(entry.getKey(), jsonElement.getAsJsonObject()); + } + } + } + } + elementAdapter.write(out, obj); + } + + @Override + public AuthorMetadataTypeInput read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // store additional fields in the deserialized instance + AuthorMetadataTypeInput instance = thisAdapter.fromJsonTree(jsonObj); + for (Map.Entry entry : jsonObj.entrySet()) { + if (!openapiFields.contains(entry.getKey())) { + if (entry.getValue().isJsonPrimitive()) { // primitive type + if (entry.getValue().getAsJsonPrimitive().isString()) + instance.putAdditionalProperty( + entry.getKey(), entry.getValue().getAsString()); + else if (entry.getValue().getAsJsonPrimitive().isNumber()) + instance.putAdditionalProperty( + entry.getKey(), entry.getValue().getAsNumber()); + else if (entry.getValue().getAsJsonPrimitive().isBoolean()) + instance.putAdditionalProperty( + entry.getKey(), + entry.getValue().getAsBoolean()); + else + throw new IllegalArgumentException( + String.format( + "The field `%s` has unknown primitive" + + " type. Value: %s", + entry.getKey(), + entry.getValue().toString())); + } else if (entry.getValue().isJsonArray()) { + instance.putAdditionalProperty( + entry.getKey(), + gson.fromJson(entry.getValue(), List.class)); + } else { // JSON object + instance.putAdditionalProperty( + entry.getKey(), + gson.fromJson(entry.getValue(), HashMap.class)); + } + } + } + return instance; + } + }.nullSafe(); + } + } + + /** + * Create an instance of AuthorMetadataTypeInput given an JSON string + * + * @param jsonString JSON string + * @return An instance of AuthorMetadataTypeInput + * @throws IOException if the JSON string is invalid with respect to AuthorMetadataTypeInput + */ + public static AuthorMetadataTypeInput fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, AuthorMetadataTypeInput.class); + } + + /** + * Convert an instance of AuthorMetadataTypeInput to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} diff --git a/sdks/java/src/main/java/com/thoughtspot/client/model/AuthorType.java b/sdks/java/src/main/java/com/thoughtspot/client/model/AuthorType.java new file mode 100644 index 000000000..c990ccbaa --- /dev/null +++ b/sdks/java/src/main/java/com/thoughtspot/client/model/AuthorType.java @@ -0,0 +1,344 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client.model; + +import com.google.gson.Gson; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.TypeAdapter; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.annotations.SerializedName; +import com.google.gson.reflect.TypeToken; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import com.thoughtspot.client.JSON; +import java.io.IOException; +import java.io.Serializable; +import java.util.Arrays; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Objects; +import org.openapitools.jackson.nullable.JsonNullable; + +/** AuthorType */ +@javax.annotation.Generated( + value = "org.openapitools.codegen.languages.JavaClientCodegen", + comments = "Generator version: 7.12.0") +public class AuthorType implements Serializable { + private static final long serialVersionUID = 1L; + + public static final String SERIALIZED_NAME_EMAIL = "email"; + + @SerializedName(SERIALIZED_NAME_EMAIL) + @javax.annotation.Nullable + private String email; + + public static final String SERIALIZED_NAME_USERNAME = "username"; + + @SerializedName(SERIALIZED_NAME_USERNAME) + @javax.annotation.Nullable + private String username; + + public AuthorType() {} + + public AuthorType email(@javax.annotation.Nullable String email) { + this.email = email; + return this; + } + + /** + * Email id of the committer + * + * @return email + */ + @javax.annotation.Nullable + public String getEmail() { + return email; + } + + public void setEmail(@javax.annotation.Nullable String email) { + this.email = email; + } + + public AuthorType username(@javax.annotation.Nullable String username) { + this.username = username; + return this; + } + + /** + * Username of the committer + * + * @return username + */ + @javax.annotation.Nullable + public String getUsername() { + return username; + } + + public void setUsername(@javax.annotation.Nullable String username) { + this.username = username; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key name of the property + * @param value value of the property + * @return the AuthorType instance itself + */ + public AuthorType putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return a map of objects + */ + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key name of the property + * @return an object + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + AuthorType authorType = (AuthorType) o; + return Objects.equals(this.email, authorType.email) + && Objects.equals(this.username, authorType.username) + && Objects.equals(this.additionalProperties, authorType.additionalProperties); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b + || (a != null + && b != null + && a.isPresent() + && b.isPresent() + && Objects.deepEquals(a.get(), b.get())); + } + + @Override + public int hashCode() { + return Objects.hash(email, username, additionalProperties); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; + } + return a.isPresent() ? Arrays.deepHashCode(new Object[] {a.get()}) : 31; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class AuthorType {\n"); + sb.append(" email: ").append(toIndentedString(email)).append("\n"); + sb.append(" username: ").append(toIndentedString(username)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first + * line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("email"); + openapiFields.add("username"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to AuthorType + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!AuthorType.openapiRequiredFields + .isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException( + String.format( + "The required field(s) %s in AuthorType is not found in the empty" + + " JSON string", + AuthorType.openapiRequiredFields.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if ((jsonObj.get("email") != null && !jsonObj.get("email").isJsonNull()) + && !jsonObj.get("email").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `email` to be a primitive type in the JSON string" + + " but got `%s`", + jsonObj.get("email").toString())); + } + if ((jsonObj.get("username") != null && !jsonObj.get("username").isJsonNull()) + && !jsonObj.get("username").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `username` to be a primitive type in the JSON" + + " string but got `%s`", + jsonObj.get("username").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!AuthorType.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'AuthorType' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter = + gson.getDelegateAdapter(this, TypeToken.get(AuthorType.class)); + + return (TypeAdapter) + new TypeAdapter() { + @Override + public void write(JsonWriter out, AuthorType value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + obj.remove("additionalProperties"); + // serialize additional properties + if (value.getAdditionalProperties() != null) { + for (Map.Entry entry : + value.getAdditionalProperties().entrySet()) { + if (entry.getValue() instanceof String) + obj.addProperty(entry.getKey(), (String) entry.getValue()); + else if (entry.getValue() instanceof Number) + obj.addProperty(entry.getKey(), (Number) entry.getValue()); + else if (entry.getValue() instanceof Boolean) + obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); + else if (entry.getValue() instanceof Character) + obj.addProperty( + entry.getKey(), (Character) entry.getValue()); + else { + JsonElement jsonElement = gson.toJsonTree(entry.getValue()); + if (jsonElement.isJsonArray()) { + obj.add(entry.getKey(), jsonElement.getAsJsonArray()); + } else { + obj.add(entry.getKey(), jsonElement.getAsJsonObject()); + } + } + } + } + elementAdapter.write(out, obj); + } + + @Override + public AuthorType read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // store additional fields in the deserialized instance + AuthorType instance = thisAdapter.fromJsonTree(jsonObj); + for (Map.Entry entry : jsonObj.entrySet()) { + if (!openapiFields.contains(entry.getKey())) { + if (entry.getValue().isJsonPrimitive()) { // primitive type + if (entry.getValue().getAsJsonPrimitive().isString()) + instance.putAdditionalProperty( + entry.getKey(), entry.getValue().getAsString()); + else if (entry.getValue().getAsJsonPrimitive().isNumber()) + instance.putAdditionalProperty( + entry.getKey(), entry.getValue().getAsNumber()); + else if (entry.getValue().getAsJsonPrimitive().isBoolean()) + instance.putAdditionalProperty( + entry.getKey(), + entry.getValue().getAsBoolean()); + else + throw new IllegalArgumentException( + String.format( + "The field `%s` has unknown primitive" + + " type. Value: %s", + entry.getKey(), + entry.getValue().toString())); + } else if (entry.getValue().isJsonArray()) { + instance.putAdditionalProperty( + entry.getKey(), + gson.fromJson(entry.getValue(), List.class)); + } else { // JSON object + instance.putAdditionalProperty( + entry.getKey(), + gson.fromJson(entry.getValue(), HashMap.class)); + } + } + } + return instance; + } + }.nullSafe(); + } + } + + /** + * Create an instance of AuthorType given an JSON string + * + * @param jsonString JSON string + * @return An instance of AuthorType + * @throws IOException if the JSON string is invalid with respect to AuthorType + */ + public static AuthorType fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, AuthorType.class); + } + + /** + * Convert an instance of AuthorType to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} diff --git a/sdks/java/src/main/java/com/thoughtspot/client/model/AwsS3Config.java b/sdks/java/src/main/java/com/thoughtspot/client/model/AwsS3Config.java new file mode 100644 index 000000000..e774c5259 --- /dev/null +++ b/sdks/java/src/main/java/com/thoughtspot/client/model/AwsS3Config.java @@ -0,0 +1,463 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client.model; + +import com.google.gson.Gson; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.TypeAdapter; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.annotations.SerializedName; +import com.google.gson.reflect.TypeToken; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import com.thoughtspot.client.JSON; +import java.io.IOException; +import java.io.Serializable; +import java.util.Arrays; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Objects; +import org.openapitools.jackson.nullable.JsonNullable; + +/** AWS S3 storage configuration details. */ +@javax.annotation.Generated( + value = "org.openapitools.codegen.languages.JavaClientCodegen", + comments = "Generator version: 7.12.0") +public class AwsS3Config implements Serializable { + private static final long serialVersionUID = 1L; + + public static final String SERIALIZED_NAME_BUCKET_NAME = "bucket_name"; + + @SerializedName(SERIALIZED_NAME_BUCKET_NAME) + @javax.annotation.Nonnull + private String bucketName; + + public static final String SERIALIZED_NAME_REGION = "region"; + + @SerializedName(SERIALIZED_NAME_REGION) + @javax.annotation.Nonnull + private String region; + + public static final String SERIALIZED_NAME_ROLE_ARN = "role_arn"; + + @SerializedName(SERIALIZED_NAME_ROLE_ARN) + @javax.annotation.Nonnull + private String roleArn; + + public static final String SERIALIZED_NAME_EXTERNAL_ID = "external_id"; + + @SerializedName(SERIALIZED_NAME_EXTERNAL_ID) + @javax.annotation.Nullable + private String externalId; + + public static final String SERIALIZED_NAME_PATH_PREFIX = "path_prefix"; + + @SerializedName(SERIALIZED_NAME_PATH_PREFIX) + @javax.annotation.Nullable + private String pathPrefix; + + public AwsS3Config() {} + + public AwsS3Config bucketName(@javax.annotation.Nonnull String bucketName) { + this.bucketName = bucketName; + return this; + } + + /** + * Name of the S3 bucket where webhook payloads are stored. + * + * @return bucketName + */ + @javax.annotation.Nonnull + public String getBucketName() { + return bucketName; + } + + public void setBucketName(@javax.annotation.Nonnull String bucketName) { + this.bucketName = bucketName; + } + + public AwsS3Config region(@javax.annotation.Nonnull String region) { + this.region = region; + return this; + } + + /** + * AWS region where the S3 bucket is located. + * + * @return region + */ + @javax.annotation.Nonnull + public String getRegion() { + return region; + } + + public void setRegion(@javax.annotation.Nonnull String region) { + this.region = region; + } + + public AwsS3Config roleArn(@javax.annotation.Nonnull String roleArn) { + this.roleArn = roleArn; + return this; + } + + /** + * ARN of the IAM role used for S3 access. + * + * @return roleArn + */ + @javax.annotation.Nonnull + public String getRoleArn() { + return roleArn; + } + + public void setRoleArn(@javax.annotation.Nonnull String roleArn) { + this.roleArn = roleArn; + } + + public AwsS3Config externalId(@javax.annotation.Nullable String externalId) { + this.externalId = externalId; + return this; + } + + /** + * External ID for secure cross-account role assumption. + * + * @return externalId + */ + @javax.annotation.Nullable + public String getExternalId() { + return externalId; + } + + public void setExternalId(@javax.annotation.Nullable String externalId) { + this.externalId = externalId; + } + + public AwsS3Config pathPrefix(@javax.annotation.Nullable String pathPrefix) { + this.pathPrefix = pathPrefix; + return this; + } + + /** + * Path prefix for organizing objects within the bucket. + * + * @return pathPrefix + */ + @javax.annotation.Nullable + public String getPathPrefix() { + return pathPrefix; + } + + public void setPathPrefix(@javax.annotation.Nullable String pathPrefix) { + this.pathPrefix = pathPrefix; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key name of the property + * @param value value of the property + * @return the AwsS3Config instance itself + */ + public AwsS3Config putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return a map of objects + */ + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key name of the property + * @return an object + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + AwsS3Config awsS3Config = (AwsS3Config) o; + return Objects.equals(this.bucketName, awsS3Config.bucketName) + && Objects.equals(this.region, awsS3Config.region) + && Objects.equals(this.roleArn, awsS3Config.roleArn) + && Objects.equals(this.externalId, awsS3Config.externalId) + && Objects.equals(this.pathPrefix, awsS3Config.pathPrefix) + && Objects.equals(this.additionalProperties, awsS3Config.additionalProperties); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b + || (a != null + && b != null + && a.isPresent() + && b.isPresent() + && Objects.deepEquals(a.get(), b.get())); + } + + @Override + public int hashCode() { + return Objects.hash( + bucketName, region, roleArn, externalId, pathPrefix, additionalProperties); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; + } + return a.isPresent() ? Arrays.deepHashCode(new Object[] {a.get()}) : 31; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class AwsS3Config {\n"); + sb.append(" bucketName: ").append(toIndentedString(bucketName)).append("\n"); + sb.append(" region: ").append(toIndentedString(region)).append("\n"); + sb.append(" roleArn: ").append(toIndentedString(roleArn)).append("\n"); + sb.append(" externalId: ").append(toIndentedString(externalId)).append("\n"); + sb.append(" pathPrefix: ").append(toIndentedString(pathPrefix)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first + * line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("bucket_name"); + openapiFields.add("region"); + openapiFields.add("role_arn"); + openapiFields.add("external_id"); + openapiFields.add("path_prefix"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + openapiRequiredFields.add("bucket_name"); + openapiRequiredFields.add("region"); + openapiRequiredFields.add("role_arn"); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to AwsS3Config + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!AwsS3Config.openapiRequiredFields + .isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException( + String.format( + "The required field(s) %s in AwsS3Config is not found in the empty" + + " JSON string", + AwsS3Config.openapiRequiredFields.toString())); + } + } + + // check to make sure all required properties/fields are present in the JSON string + for (String requiredField : AwsS3Config.openapiRequiredFields) { + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException( + String.format( + "The required field `%s` is not found in the JSON string: %s", + requiredField, jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if (!jsonObj.get("bucket_name").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `bucket_name` to be a primitive type in the JSON" + + " string but got `%s`", + jsonObj.get("bucket_name").toString())); + } + if (!jsonObj.get("region").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `region` to be a primitive type in the JSON string" + + " but got `%s`", + jsonObj.get("region").toString())); + } + if (!jsonObj.get("role_arn").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `role_arn` to be a primitive type in the JSON" + + " string but got `%s`", + jsonObj.get("role_arn").toString())); + } + if ((jsonObj.get("external_id") != null && !jsonObj.get("external_id").isJsonNull()) + && !jsonObj.get("external_id").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `external_id` to be a primitive type in the JSON" + + " string but got `%s`", + jsonObj.get("external_id").toString())); + } + if ((jsonObj.get("path_prefix") != null && !jsonObj.get("path_prefix").isJsonNull()) + && !jsonObj.get("path_prefix").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `path_prefix` to be a primitive type in the JSON" + + " string but got `%s`", + jsonObj.get("path_prefix").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!AwsS3Config.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'AwsS3Config' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter = + gson.getDelegateAdapter(this, TypeToken.get(AwsS3Config.class)); + + return (TypeAdapter) + new TypeAdapter() { + @Override + public void write(JsonWriter out, AwsS3Config value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + obj.remove("additionalProperties"); + // serialize additional properties + if (value.getAdditionalProperties() != null) { + for (Map.Entry entry : + value.getAdditionalProperties().entrySet()) { + if (entry.getValue() instanceof String) + obj.addProperty(entry.getKey(), (String) entry.getValue()); + else if (entry.getValue() instanceof Number) + obj.addProperty(entry.getKey(), (Number) entry.getValue()); + else if (entry.getValue() instanceof Boolean) + obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); + else if (entry.getValue() instanceof Character) + obj.addProperty( + entry.getKey(), (Character) entry.getValue()); + else { + JsonElement jsonElement = gson.toJsonTree(entry.getValue()); + if (jsonElement.isJsonArray()) { + obj.add(entry.getKey(), jsonElement.getAsJsonArray()); + } else { + obj.add(entry.getKey(), jsonElement.getAsJsonObject()); + } + } + } + } + elementAdapter.write(out, obj); + } + + @Override + public AwsS3Config read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // store additional fields in the deserialized instance + AwsS3Config instance = thisAdapter.fromJsonTree(jsonObj); + for (Map.Entry entry : jsonObj.entrySet()) { + if (!openapiFields.contains(entry.getKey())) { + if (entry.getValue().isJsonPrimitive()) { // primitive type + if (entry.getValue().getAsJsonPrimitive().isString()) + instance.putAdditionalProperty( + entry.getKey(), entry.getValue().getAsString()); + else if (entry.getValue().getAsJsonPrimitive().isNumber()) + instance.putAdditionalProperty( + entry.getKey(), entry.getValue().getAsNumber()); + else if (entry.getValue().getAsJsonPrimitive().isBoolean()) + instance.putAdditionalProperty( + entry.getKey(), + entry.getValue().getAsBoolean()); + else + throw new IllegalArgumentException( + String.format( + "The field `%s` has unknown primitive" + + " type. Value: %s", + entry.getKey(), + entry.getValue().toString())); + } else if (entry.getValue().isJsonArray()) { + instance.putAdditionalProperty( + entry.getKey(), + gson.fromJson(entry.getValue(), List.class)); + } else { // JSON object + instance.putAdditionalProperty( + entry.getKey(), + gson.fromJson(entry.getValue(), HashMap.class)); + } + } + } + return instance; + } + }.nullSafe(); + } + } + + /** + * Create an instance of AwsS3Config given an JSON string + * + * @param jsonString JSON string + * @return An instance of AwsS3Config + * @throws IOException if the JSON string is invalid with respect to AwsS3Config + */ + public static AwsS3Config fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, AwsS3Config.class); + } + + /** + * Convert an instance of AwsS3Config to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} diff --git a/sdks/java/src/main/java/com/thoughtspot/client/model/AwsS3ConfigInput.java b/sdks/java/src/main/java/com/thoughtspot/client/model/AwsS3ConfigInput.java new file mode 100644 index 000000000..6a3057b0e --- /dev/null +++ b/sdks/java/src/main/java/com/thoughtspot/client/model/AwsS3ConfigInput.java @@ -0,0 +1,468 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client.model; + +import com.google.gson.Gson; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.TypeAdapter; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.annotations.SerializedName; +import com.google.gson.reflect.TypeToken; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import com.thoughtspot.client.JSON; +import java.io.IOException; +import java.io.Serializable; +import java.util.Arrays; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Objects; +import org.openapitools.jackson.nullable.JsonNullable; + +/** Input type for AWS S3 storage configuration. */ +@javax.annotation.Generated( + value = "org.openapitools.codegen.languages.JavaClientCodegen", + comments = "Generator version: 7.12.0") +public class AwsS3ConfigInput implements Serializable { + private static final long serialVersionUID = 1L; + + public static final String SERIALIZED_NAME_BUCKET_NAME = "bucket_name"; + + @SerializedName(SERIALIZED_NAME_BUCKET_NAME) + @javax.annotation.Nonnull + private String bucketName; + + public static final String SERIALIZED_NAME_REGION = "region"; + + @SerializedName(SERIALIZED_NAME_REGION) + @javax.annotation.Nonnull + private String region; + + public static final String SERIALIZED_NAME_ROLE_ARN = "role_arn"; + + @SerializedName(SERIALIZED_NAME_ROLE_ARN) + @javax.annotation.Nonnull + private String roleArn; + + public static final String SERIALIZED_NAME_EXTERNAL_ID = "external_id"; + + @SerializedName(SERIALIZED_NAME_EXTERNAL_ID) + @javax.annotation.Nullable + private String externalId; + + public static final String SERIALIZED_NAME_PATH_PREFIX = "path_prefix"; + + @SerializedName(SERIALIZED_NAME_PATH_PREFIX) + @javax.annotation.Nullable + private String pathPrefix; + + public AwsS3ConfigInput() {} + + public AwsS3ConfigInput bucketName(@javax.annotation.Nonnull String bucketName) { + this.bucketName = bucketName; + return this; + } + + /** + * Name of the S3 bucket where webhook payloads will be stored. Example: + * \"my-webhook-files\" + * + * @return bucketName + */ + @javax.annotation.Nonnull + public String getBucketName() { + return bucketName; + } + + public void setBucketName(@javax.annotation.Nonnull String bucketName) { + this.bucketName = bucketName; + } + + public AwsS3ConfigInput region(@javax.annotation.Nonnull String region) { + this.region = region; + return this; + } + + /** + * AWS region where the S3 bucket is located. Example: \"us-west-2\" + * + * @return region + */ + @javax.annotation.Nonnull + public String getRegion() { + return region; + } + + public void setRegion(@javax.annotation.Nonnull String region) { + this.region = region; + } + + public AwsS3ConfigInput roleArn(@javax.annotation.Nonnull String roleArn) { + this.roleArn = roleArn; + return this; + } + + /** + * ARN of the IAM role to assume for S3 access. Example: + * \"arn:aws:iam::123456789012:role/ThoughtSpotDeliveryRole\" + * + * @return roleArn + */ + @javax.annotation.Nonnull + public String getRoleArn() { + return roleArn; + } + + public void setRoleArn(@javax.annotation.Nonnull String roleArn) { + this.roleArn = roleArn; + } + + public AwsS3ConfigInput externalId(@javax.annotation.Nullable String externalId) { + this.externalId = externalId; + return this; + } + + /** + * External ID for secure cross-account role assumption. Example: + * \"ts-webhook-a1b2c3d4-7890\" + * + * @return externalId + */ + @javax.annotation.Nullable + public String getExternalId() { + return externalId; + } + + public void setExternalId(@javax.annotation.Nullable String externalId) { + this.externalId = externalId; + } + + public AwsS3ConfigInput pathPrefix(@javax.annotation.Nullable String pathPrefix) { + this.pathPrefix = pathPrefix; + return this; + } + + /** + * Optional path prefix for organizing objects within the bucket. Example: + * \"thoughtspot-webhooks/\" + * + * @return pathPrefix + */ + @javax.annotation.Nullable + public String getPathPrefix() { + return pathPrefix; + } + + public void setPathPrefix(@javax.annotation.Nullable String pathPrefix) { + this.pathPrefix = pathPrefix; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key name of the property + * @param value value of the property + * @return the AwsS3ConfigInput instance itself + */ + public AwsS3ConfigInput putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return a map of objects + */ + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key name of the property + * @return an object + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + AwsS3ConfigInput awsS3ConfigInput = (AwsS3ConfigInput) o; + return Objects.equals(this.bucketName, awsS3ConfigInput.bucketName) + && Objects.equals(this.region, awsS3ConfigInput.region) + && Objects.equals(this.roleArn, awsS3ConfigInput.roleArn) + && Objects.equals(this.externalId, awsS3ConfigInput.externalId) + && Objects.equals(this.pathPrefix, awsS3ConfigInput.pathPrefix) + && Objects.equals(this.additionalProperties, awsS3ConfigInput.additionalProperties); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b + || (a != null + && b != null + && a.isPresent() + && b.isPresent() + && Objects.deepEquals(a.get(), b.get())); + } + + @Override + public int hashCode() { + return Objects.hash( + bucketName, region, roleArn, externalId, pathPrefix, additionalProperties); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; + } + return a.isPresent() ? Arrays.deepHashCode(new Object[] {a.get()}) : 31; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class AwsS3ConfigInput {\n"); + sb.append(" bucketName: ").append(toIndentedString(bucketName)).append("\n"); + sb.append(" region: ").append(toIndentedString(region)).append("\n"); + sb.append(" roleArn: ").append(toIndentedString(roleArn)).append("\n"); + sb.append(" externalId: ").append(toIndentedString(externalId)).append("\n"); + sb.append(" pathPrefix: ").append(toIndentedString(pathPrefix)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first + * line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("bucket_name"); + openapiFields.add("region"); + openapiFields.add("role_arn"); + openapiFields.add("external_id"); + openapiFields.add("path_prefix"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + openapiRequiredFields.add("bucket_name"); + openapiRequiredFields.add("region"); + openapiRequiredFields.add("role_arn"); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to AwsS3ConfigInput + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!AwsS3ConfigInput.openapiRequiredFields + .isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException( + String.format( + "The required field(s) %s in AwsS3ConfigInput is not found in the" + + " empty JSON string", + AwsS3ConfigInput.openapiRequiredFields.toString())); + } + } + + // check to make sure all required properties/fields are present in the JSON string + for (String requiredField : AwsS3ConfigInput.openapiRequiredFields) { + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException( + String.format( + "The required field `%s` is not found in the JSON string: %s", + requiredField, jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if (!jsonObj.get("bucket_name").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `bucket_name` to be a primitive type in the JSON" + + " string but got `%s`", + jsonObj.get("bucket_name").toString())); + } + if (!jsonObj.get("region").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `region` to be a primitive type in the JSON string" + + " but got `%s`", + jsonObj.get("region").toString())); + } + if (!jsonObj.get("role_arn").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `role_arn` to be a primitive type in the JSON" + + " string but got `%s`", + jsonObj.get("role_arn").toString())); + } + if ((jsonObj.get("external_id") != null && !jsonObj.get("external_id").isJsonNull()) + && !jsonObj.get("external_id").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `external_id` to be a primitive type in the JSON" + + " string but got `%s`", + jsonObj.get("external_id").toString())); + } + if ((jsonObj.get("path_prefix") != null && !jsonObj.get("path_prefix").isJsonNull()) + && !jsonObj.get("path_prefix").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `path_prefix` to be a primitive type in the JSON" + + " string but got `%s`", + jsonObj.get("path_prefix").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!AwsS3ConfigInput.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'AwsS3ConfigInput' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter = + gson.getDelegateAdapter(this, TypeToken.get(AwsS3ConfigInput.class)); + + return (TypeAdapter) + new TypeAdapter() { + @Override + public void write(JsonWriter out, AwsS3ConfigInput value) + throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + obj.remove("additionalProperties"); + // serialize additional properties + if (value.getAdditionalProperties() != null) { + for (Map.Entry entry : + value.getAdditionalProperties().entrySet()) { + if (entry.getValue() instanceof String) + obj.addProperty(entry.getKey(), (String) entry.getValue()); + else if (entry.getValue() instanceof Number) + obj.addProperty(entry.getKey(), (Number) entry.getValue()); + else if (entry.getValue() instanceof Boolean) + obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); + else if (entry.getValue() instanceof Character) + obj.addProperty( + entry.getKey(), (Character) entry.getValue()); + else { + JsonElement jsonElement = gson.toJsonTree(entry.getValue()); + if (jsonElement.isJsonArray()) { + obj.add(entry.getKey(), jsonElement.getAsJsonArray()); + } else { + obj.add(entry.getKey(), jsonElement.getAsJsonObject()); + } + } + } + } + elementAdapter.write(out, obj); + } + + @Override + public AwsS3ConfigInput read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // store additional fields in the deserialized instance + AwsS3ConfigInput instance = thisAdapter.fromJsonTree(jsonObj); + for (Map.Entry entry : jsonObj.entrySet()) { + if (!openapiFields.contains(entry.getKey())) { + if (entry.getValue().isJsonPrimitive()) { // primitive type + if (entry.getValue().getAsJsonPrimitive().isString()) + instance.putAdditionalProperty( + entry.getKey(), entry.getValue().getAsString()); + else if (entry.getValue().getAsJsonPrimitive().isNumber()) + instance.putAdditionalProperty( + entry.getKey(), entry.getValue().getAsNumber()); + else if (entry.getValue().getAsJsonPrimitive().isBoolean()) + instance.putAdditionalProperty( + entry.getKey(), + entry.getValue().getAsBoolean()); + else + throw new IllegalArgumentException( + String.format( + "The field `%s` has unknown primitive" + + " type. Value: %s", + entry.getKey(), + entry.getValue().toString())); + } else if (entry.getValue().isJsonArray()) { + instance.putAdditionalProperty( + entry.getKey(), + gson.fromJson(entry.getValue(), List.class)); + } else { // JSON object + instance.putAdditionalProperty( + entry.getKey(), + gson.fromJson(entry.getValue(), HashMap.class)); + } + } + } + return instance; + } + }.nullSafe(); + } + } + + /** + * Create an instance of AwsS3ConfigInput given an JSON string + * + * @param jsonString JSON string + * @return An instance of AwsS3ConfigInput + * @throws IOException if the JSON string is invalid with respect to AwsS3ConfigInput + */ + public static AwsS3ConfigInput fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, AwsS3ConfigInput.class); + } + + /** + * Convert an instance of AwsS3ConfigInput to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} diff --git a/sdks/java/src/main/java/com/thoughtspot/client/model/BasicAuth.java b/sdks/java/src/main/java/com/thoughtspot/client/model/BasicAuth.java new file mode 100644 index 000000000..9b7e80788 --- /dev/null +++ b/sdks/java/src/main/java/com/thoughtspot/client/model/BasicAuth.java @@ -0,0 +1,347 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client.model; + +import com.google.gson.Gson; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.TypeAdapter; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.annotations.SerializedName; +import com.google.gson.reflect.TypeToken; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import com.thoughtspot.client.JSON; +import java.io.IOException; +import java.io.Serializable; +import java.util.Arrays; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Objects; +import org.openapitools.jackson.nullable.JsonNullable; + +/** + * Basic Auth: Basic authentication involves sending a verified username and password with your + * request. + */ +@javax.annotation.Generated( + value = "org.openapitools.codegen.languages.JavaClientCodegen", + comments = "Generator version: 7.12.0") +public class BasicAuth implements Serializable { + private static final long serialVersionUID = 1L; + + public static final String SERIALIZED_NAME_PASSWORD = "password"; + + @SerializedName(SERIALIZED_NAME_PASSWORD) + @javax.annotation.Nullable + private String password; + + public static final String SERIALIZED_NAME_USERNAME = "username"; + + @SerializedName(SERIALIZED_NAME_USERNAME) + @javax.annotation.Nullable + private String username; + + public BasicAuth() {} + + public BasicAuth password(@javax.annotation.Nullable String password) { + this.password = password; + return this; + } + + /** + * Password for the basic authentication + * + * @return password + */ + @javax.annotation.Nullable + public String getPassword() { + return password; + } + + public void setPassword(@javax.annotation.Nullable String password) { + this.password = password; + } + + public BasicAuth username(@javax.annotation.Nullable String username) { + this.username = username; + return this; + } + + /** + * Username for the basic authentication + * + * @return username + */ + @javax.annotation.Nullable + public String getUsername() { + return username; + } + + public void setUsername(@javax.annotation.Nullable String username) { + this.username = username; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key name of the property + * @param value value of the property + * @return the BasicAuth instance itself + */ + public BasicAuth putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return a map of objects + */ + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key name of the property + * @return an object + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + BasicAuth basicAuth = (BasicAuth) o; + return Objects.equals(this.password, basicAuth.password) + && Objects.equals(this.username, basicAuth.username) + && Objects.equals(this.additionalProperties, basicAuth.additionalProperties); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b + || (a != null + && b != null + && a.isPresent() + && b.isPresent() + && Objects.deepEquals(a.get(), b.get())); + } + + @Override + public int hashCode() { + return Objects.hash(password, username, additionalProperties); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; + } + return a.isPresent() ? Arrays.deepHashCode(new Object[] {a.get()}) : 31; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class BasicAuth {\n"); + sb.append(" password: ").append(toIndentedString(password)).append("\n"); + sb.append(" username: ").append(toIndentedString(username)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first + * line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("password"); + openapiFields.add("username"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to BasicAuth + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!BasicAuth.openapiRequiredFields + .isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException( + String.format( + "The required field(s) %s in BasicAuth is not found in the empty" + + " JSON string", + BasicAuth.openapiRequiredFields.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if ((jsonObj.get("password") != null && !jsonObj.get("password").isJsonNull()) + && !jsonObj.get("password").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `password` to be a primitive type in the JSON" + + " string but got `%s`", + jsonObj.get("password").toString())); + } + if ((jsonObj.get("username") != null && !jsonObj.get("username").isJsonNull()) + && !jsonObj.get("username").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `username` to be a primitive type in the JSON" + + " string but got `%s`", + jsonObj.get("username").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!BasicAuth.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'BasicAuth' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter = + gson.getDelegateAdapter(this, TypeToken.get(BasicAuth.class)); + + return (TypeAdapter) + new TypeAdapter() { + @Override + public void write(JsonWriter out, BasicAuth value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + obj.remove("additionalProperties"); + // serialize additional properties + if (value.getAdditionalProperties() != null) { + for (Map.Entry entry : + value.getAdditionalProperties().entrySet()) { + if (entry.getValue() instanceof String) + obj.addProperty(entry.getKey(), (String) entry.getValue()); + else if (entry.getValue() instanceof Number) + obj.addProperty(entry.getKey(), (Number) entry.getValue()); + else if (entry.getValue() instanceof Boolean) + obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); + else if (entry.getValue() instanceof Character) + obj.addProperty( + entry.getKey(), (Character) entry.getValue()); + else { + JsonElement jsonElement = gson.toJsonTree(entry.getValue()); + if (jsonElement.isJsonArray()) { + obj.add(entry.getKey(), jsonElement.getAsJsonArray()); + } else { + obj.add(entry.getKey(), jsonElement.getAsJsonObject()); + } + } + } + } + elementAdapter.write(out, obj); + } + + @Override + public BasicAuth read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // store additional fields in the deserialized instance + BasicAuth instance = thisAdapter.fromJsonTree(jsonObj); + for (Map.Entry entry : jsonObj.entrySet()) { + if (!openapiFields.contains(entry.getKey())) { + if (entry.getValue().isJsonPrimitive()) { // primitive type + if (entry.getValue().getAsJsonPrimitive().isString()) + instance.putAdditionalProperty( + entry.getKey(), entry.getValue().getAsString()); + else if (entry.getValue().getAsJsonPrimitive().isNumber()) + instance.putAdditionalProperty( + entry.getKey(), entry.getValue().getAsNumber()); + else if (entry.getValue().getAsJsonPrimitive().isBoolean()) + instance.putAdditionalProperty( + entry.getKey(), + entry.getValue().getAsBoolean()); + else + throw new IllegalArgumentException( + String.format( + "The field `%s` has unknown primitive" + + " type. Value: %s", + entry.getKey(), + entry.getValue().toString())); + } else if (entry.getValue().isJsonArray()) { + instance.putAdditionalProperty( + entry.getKey(), + gson.fromJson(entry.getValue(), List.class)); + } else { // JSON object + instance.putAdditionalProperty( + entry.getKey(), + gson.fromJson(entry.getValue(), HashMap.class)); + } + } + } + return instance; + } + }.nullSafe(); + } + } + + /** + * Create an instance of BasicAuth given an JSON string + * + * @param jsonString JSON string + * @return An instance of BasicAuth + * @throws IOException if the JSON string is invalid with respect to BasicAuth + */ + public static BasicAuth fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, BasicAuth.class); + } + + /** + * Convert an instance of BasicAuth to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} diff --git a/sdks/java/src/main/java/com/thoughtspot/client/model/BasicAuthInput.java b/sdks/java/src/main/java/com/thoughtspot/client/model/BasicAuthInput.java new file mode 100644 index 000000000..80dfd0e4b --- /dev/null +++ b/sdks/java/src/main/java/com/thoughtspot/client/model/BasicAuthInput.java @@ -0,0 +1,347 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client.model; + +import com.google.gson.Gson; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.TypeAdapter; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.annotations.SerializedName; +import com.google.gson.reflect.TypeToken; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import com.thoughtspot.client.JSON; +import java.io.IOException; +import java.io.Serializable; +import java.util.Arrays; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Objects; +import org.openapitools.jackson.nullable.JsonNullable; + +/** + * Basic Auth: Basic authentication involves sending a verified username and password with your + * request. + */ +@javax.annotation.Generated( + value = "org.openapitools.codegen.languages.JavaClientCodegen", + comments = "Generator version: 7.12.0") +public class BasicAuthInput implements Serializable { + private static final long serialVersionUID = 1L; + + public static final String SERIALIZED_NAME_PASSWORD = "password"; + + @SerializedName(SERIALIZED_NAME_PASSWORD) + @javax.annotation.Nullable + private String password; + + public static final String SERIALIZED_NAME_USERNAME = "username"; + + @SerializedName(SERIALIZED_NAME_USERNAME) + @javax.annotation.Nullable + private String username; + + public BasicAuthInput() {} + + public BasicAuthInput password(@javax.annotation.Nullable String password) { + this.password = password; + return this; + } + + /** + * Password for the basic authentication + * + * @return password + */ + @javax.annotation.Nullable + public String getPassword() { + return password; + } + + public void setPassword(@javax.annotation.Nullable String password) { + this.password = password; + } + + public BasicAuthInput username(@javax.annotation.Nullable String username) { + this.username = username; + return this; + } + + /** + * Username for the basic authentication + * + * @return username + */ + @javax.annotation.Nullable + public String getUsername() { + return username; + } + + public void setUsername(@javax.annotation.Nullable String username) { + this.username = username; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key name of the property + * @param value value of the property + * @return the BasicAuthInput instance itself + */ + public BasicAuthInput putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return a map of objects + */ + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key name of the property + * @return an object + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + BasicAuthInput basicAuthInput = (BasicAuthInput) o; + return Objects.equals(this.password, basicAuthInput.password) + && Objects.equals(this.username, basicAuthInput.username) + && Objects.equals(this.additionalProperties, basicAuthInput.additionalProperties); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b + || (a != null + && b != null + && a.isPresent() + && b.isPresent() + && Objects.deepEquals(a.get(), b.get())); + } + + @Override + public int hashCode() { + return Objects.hash(password, username, additionalProperties); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; + } + return a.isPresent() ? Arrays.deepHashCode(new Object[] {a.get()}) : 31; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class BasicAuthInput {\n"); + sb.append(" password: ").append(toIndentedString(password)).append("\n"); + sb.append(" username: ").append(toIndentedString(username)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first + * line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("password"); + openapiFields.add("username"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to BasicAuthInput + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!BasicAuthInput.openapiRequiredFields + .isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException( + String.format( + "The required field(s) %s in BasicAuthInput is not found in the" + + " empty JSON string", + BasicAuthInput.openapiRequiredFields.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if ((jsonObj.get("password") != null && !jsonObj.get("password").isJsonNull()) + && !jsonObj.get("password").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `password` to be a primitive type in the JSON" + + " string but got `%s`", + jsonObj.get("password").toString())); + } + if ((jsonObj.get("username") != null && !jsonObj.get("username").isJsonNull()) + && !jsonObj.get("username").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `username` to be a primitive type in the JSON" + + " string but got `%s`", + jsonObj.get("username").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!BasicAuthInput.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'BasicAuthInput' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter = + gson.getDelegateAdapter(this, TypeToken.get(BasicAuthInput.class)); + + return (TypeAdapter) + new TypeAdapter() { + @Override + public void write(JsonWriter out, BasicAuthInput value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + obj.remove("additionalProperties"); + // serialize additional properties + if (value.getAdditionalProperties() != null) { + for (Map.Entry entry : + value.getAdditionalProperties().entrySet()) { + if (entry.getValue() instanceof String) + obj.addProperty(entry.getKey(), (String) entry.getValue()); + else if (entry.getValue() instanceof Number) + obj.addProperty(entry.getKey(), (Number) entry.getValue()); + else if (entry.getValue() instanceof Boolean) + obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); + else if (entry.getValue() instanceof Character) + obj.addProperty( + entry.getKey(), (Character) entry.getValue()); + else { + JsonElement jsonElement = gson.toJsonTree(entry.getValue()); + if (jsonElement.isJsonArray()) { + obj.add(entry.getKey(), jsonElement.getAsJsonArray()); + } else { + obj.add(entry.getKey(), jsonElement.getAsJsonObject()); + } + } + } + } + elementAdapter.write(out, obj); + } + + @Override + public BasicAuthInput read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // store additional fields in the deserialized instance + BasicAuthInput instance = thisAdapter.fromJsonTree(jsonObj); + for (Map.Entry entry : jsonObj.entrySet()) { + if (!openapiFields.contains(entry.getKey())) { + if (entry.getValue().isJsonPrimitive()) { // primitive type + if (entry.getValue().getAsJsonPrimitive().isString()) + instance.putAdditionalProperty( + entry.getKey(), entry.getValue().getAsString()); + else if (entry.getValue().getAsJsonPrimitive().isNumber()) + instance.putAdditionalProperty( + entry.getKey(), entry.getValue().getAsNumber()); + else if (entry.getValue().getAsJsonPrimitive().isBoolean()) + instance.putAdditionalProperty( + entry.getKey(), + entry.getValue().getAsBoolean()); + else + throw new IllegalArgumentException( + String.format( + "The field `%s` has unknown primitive" + + " type. Value: %s", + entry.getKey(), + entry.getValue().toString())); + } else if (entry.getValue().isJsonArray()) { + instance.putAdditionalProperty( + entry.getKey(), + gson.fromJson(entry.getValue(), List.class)); + } else { // JSON object + instance.putAdditionalProperty( + entry.getKey(), + gson.fromJson(entry.getValue(), HashMap.class)); + } + } + } + return instance; + } + }.nullSafe(); + } + } + + /** + * Create an instance of BasicAuthInput given an JSON string + * + * @param jsonString JSON string + * @return An instance of BasicAuthInput + * @throws IOException if the JSON string is invalid with respect to BasicAuthInput + */ + public static BasicAuthInput fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, BasicAuthInput.class); + } + + /** + * Convert an instance of BasicAuthInput to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} diff --git a/sdks/java/src/main/java/com/thoughtspot/client/model/CALLBACK.java b/sdks/java/src/main/java/com/thoughtspot/client/model/CALLBACK.java new file mode 100644 index 000000000..a6b2f749f --- /dev/null +++ b/sdks/java/src/main/java/com/thoughtspot/client/model/CALLBACK.java @@ -0,0 +1,308 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client.model; + +import com.google.gson.Gson; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.TypeAdapter; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.annotations.SerializedName; +import com.google.gson.reflect.TypeToken; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import com.thoughtspot.client.JSON; +import java.io.IOException; +import java.io.Serializable; +import java.util.Arrays; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Objects; +import org.openapitools.jackson.nullable.JsonNullable; + +/** CALLBACK Custom Action Type */ +@javax.annotation.Generated( + value = "org.openapitools.codegen.languages.JavaClientCodegen", + comments = "Generator version: 7.12.0") +public class CALLBACK implements Serializable { + private static final long serialVersionUID = 1L; + + public static final String SERIALIZED_NAME_REFERENCE = "reference"; + + @SerializedName(SERIALIZED_NAME_REFERENCE) + @javax.annotation.Nullable + private String reference; + + public CALLBACK() {} + + public CALLBACK reference(@javax.annotation.Nullable String reference) { + this.reference = reference; + return this; + } + + /** + * Reference name of the SDK. By default, the value will be set to action name. + * + * @return reference + */ + @javax.annotation.Nullable + public String getReference() { + return reference; + } + + public void setReference(@javax.annotation.Nullable String reference) { + this.reference = reference; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key name of the property + * @param value value of the property + * @return the CALLBACK instance itself + */ + public CALLBACK putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return a map of objects + */ + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key name of the property + * @return an object + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + CALLBACK CALLBACK = (CALLBACK) o; + return Objects.equals(this.reference, CALLBACK.reference) + && Objects.equals(this.additionalProperties, CALLBACK.additionalProperties); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b + || (a != null + && b != null + && a.isPresent() + && b.isPresent() + && Objects.deepEquals(a.get(), b.get())); + } + + @Override + public int hashCode() { + return Objects.hash(reference, additionalProperties); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; + } + return a.isPresent() ? Arrays.deepHashCode(new Object[] {a.get()}) : 31; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class CALLBACK {\n"); + sb.append(" reference: ").append(toIndentedString(reference)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first + * line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("reference"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to CALLBACK + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!CALLBACK.openapiRequiredFields + .isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException( + String.format( + "The required field(s) %s in CALLBACK is not found in the empty" + + " JSON string", + CALLBACK.openapiRequiredFields.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if ((jsonObj.get("reference") != null && !jsonObj.get("reference").isJsonNull()) + && !jsonObj.get("reference").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `reference` to be a primitive type in the JSON" + + " string but got `%s`", + jsonObj.get("reference").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!CALLBACK.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'CALLBACK' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter = + gson.getDelegateAdapter(this, TypeToken.get(CALLBACK.class)); + + return (TypeAdapter) + new TypeAdapter() { + @Override + public void write(JsonWriter out, CALLBACK value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + obj.remove("additionalProperties"); + // serialize additional properties + if (value.getAdditionalProperties() != null) { + for (Map.Entry entry : + value.getAdditionalProperties().entrySet()) { + if (entry.getValue() instanceof String) + obj.addProperty(entry.getKey(), (String) entry.getValue()); + else if (entry.getValue() instanceof Number) + obj.addProperty(entry.getKey(), (Number) entry.getValue()); + else if (entry.getValue() instanceof Boolean) + obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); + else if (entry.getValue() instanceof Character) + obj.addProperty( + entry.getKey(), (Character) entry.getValue()); + else { + JsonElement jsonElement = gson.toJsonTree(entry.getValue()); + if (jsonElement.isJsonArray()) { + obj.add(entry.getKey(), jsonElement.getAsJsonArray()); + } else { + obj.add(entry.getKey(), jsonElement.getAsJsonObject()); + } + } + } + } + elementAdapter.write(out, obj); + } + + @Override + public CALLBACK read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // store additional fields in the deserialized instance + CALLBACK instance = thisAdapter.fromJsonTree(jsonObj); + for (Map.Entry entry : jsonObj.entrySet()) { + if (!openapiFields.contains(entry.getKey())) { + if (entry.getValue().isJsonPrimitive()) { // primitive type + if (entry.getValue().getAsJsonPrimitive().isString()) + instance.putAdditionalProperty( + entry.getKey(), entry.getValue().getAsString()); + else if (entry.getValue().getAsJsonPrimitive().isNumber()) + instance.putAdditionalProperty( + entry.getKey(), entry.getValue().getAsNumber()); + else if (entry.getValue().getAsJsonPrimitive().isBoolean()) + instance.putAdditionalProperty( + entry.getKey(), + entry.getValue().getAsBoolean()); + else + throw new IllegalArgumentException( + String.format( + "The field `%s` has unknown primitive" + + " type. Value: %s", + entry.getKey(), + entry.getValue().toString())); + } else if (entry.getValue().isJsonArray()) { + instance.putAdditionalProperty( + entry.getKey(), + gson.fromJson(entry.getValue(), List.class)); + } else { // JSON object + instance.putAdditionalProperty( + entry.getKey(), + gson.fromJson(entry.getValue(), HashMap.class)); + } + } + } + return instance; + } + }.nullSafe(); + } + } + + /** + * Create an instance of CALLBACK given an JSON string + * + * @param jsonString JSON string + * @return An instance of CALLBACK + * @throws IOException if the JSON string is invalid with respect to CALLBACK + */ + public static CALLBACK fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, CALLBACK.class); + } + + /** + * Convert an instance of CALLBACK to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} diff --git a/sdks/java/src/main/java/com/thoughtspot/client/model/CALLBACKInput.java b/sdks/java/src/main/java/com/thoughtspot/client/model/CALLBACKInput.java new file mode 100644 index 000000000..b5da85d83 --- /dev/null +++ b/sdks/java/src/main/java/com/thoughtspot/client/model/CALLBACKInput.java @@ -0,0 +1,308 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client.model; + +import com.google.gson.Gson; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.TypeAdapter; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.annotations.SerializedName; +import com.google.gson.reflect.TypeToken; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import com.thoughtspot.client.JSON; +import java.io.IOException; +import java.io.Serializable; +import java.util.Arrays; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Objects; +import org.openapitools.jackson.nullable.JsonNullable; + +/** CALLBACK Custom Action Type */ +@javax.annotation.Generated( + value = "org.openapitools.codegen.languages.JavaClientCodegen", + comments = "Generator version: 7.12.0") +public class CALLBACKInput implements Serializable { + private static final long serialVersionUID = 1L; + + public static final String SERIALIZED_NAME_REFERENCE = "reference"; + + @SerializedName(SERIALIZED_NAME_REFERENCE) + @javax.annotation.Nullable + private String reference; + + public CALLBACKInput() {} + + public CALLBACKInput reference(@javax.annotation.Nullable String reference) { + this.reference = reference; + return this; + } + + /** + * Reference name. By default, the value will be set to action name. + * + * @return reference + */ + @javax.annotation.Nullable + public String getReference() { + return reference; + } + + public void setReference(@javax.annotation.Nullable String reference) { + this.reference = reference; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key name of the property + * @param value value of the property + * @return the CALLBACKInput instance itself + */ + public CALLBACKInput putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return a map of objects + */ + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key name of the property + * @return an object + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + CALLBACKInput caLLBACKInput = (CALLBACKInput) o; + return Objects.equals(this.reference, caLLBACKInput.reference) + && Objects.equals(this.additionalProperties, caLLBACKInput.additionalProperties); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b + || (a != null + && b != null + && a.isPresent() + && b.isPresent() + && Objects.deepEquals(a.get(), b.get())); + } + + @Override + public int hashCode() { + return Objects.hash(reference, additionalProperties); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; + } + return a.isPresent() ? Arrays.deepHashCode(new Object[] {a.get()}) : 31; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class CALLBACKInput {\n"); + sb.append(" reference: ").append(toIndentedString(reference)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first + * line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("reference"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to CALLBACKInput + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!CALLBACKInput.openapiRequiredFields + .isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException( + String.format( + "The required field(s) %s in CALLBACKInput is not found in the" + + " empty JSON string", + CALLBACKInput.openapiRequiredFields.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if ((jsonObj.get("reference") != null && !jsonObj.get("reference").isJsonNull()) + && !jsonObj.get("reference").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `reference` to be a primitive type in the JSON" + + " string but got `%s`", + jsonObj.get("reference").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!CALLBACKInput.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'CALLBACKInput' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter = + gson.getDelegateAdapter(this, TypeToken.get(CALLBACKInput.class)); + + return (TypeAdapter) + new TypeAdapter() { + @Override + public void write(JsonWriter out, CALLBACKInput value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + obj.remove("additionalProperties"); + // serialize additional properties + if (value.getAdditionalProperties() != null) { + for (Map.Entry entry : + value.getAdditionalProperties().entrySet()) { + if (entry.getValue() instanceof String) + obj.addProperty(entry.getKey(), (String) entry.getValue()); + else if (entry.getValue() instanceof Number) + obj.addProperty(entry.getKey(), (Number) entry.getValue()); + else if (entry.getValue() instanceof Boolean) + obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); + else if (entry.getValue() instanceof Character) + obj.addProperty( + entry.getKey(), (Character) entry.getValue()); + else { + JsonElement jsonElement = gson.toJsonTree(entry.getValue()); + if (jsonElement.isJsonArray()) { + obj.add(entry.getKey(), jsonElement.getAsJsonArray()); + } else { + obj.add(entry.getKey(), jsonElement.getAsJsonObject()); + } + } + } + } + elementAdapter.write(out, obj); + } + + @Override + public CALLBACKInput read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // store additional fields in the deserialized instance + CALLBACKInput instance = thisAdapter.fromJsonTree(jsonObj); + for (Map.Entry entry : jsonObj.entrySet()) { + if (!openapiFields.contains(entry.getKey())) { + if (entry.getValue().isJsonPrimitive()) { // primitive type + if (entry.getValue().getAsJsonPrimitive().isString()) + instance.putAdditionalProperty( + entry.getKey(), entry.getValue().getAsString()); + else if (entry.getValue().getAsJsonPrimitive().isNumber()) + instance.putAdditionalProperty( + entry.getKey(), entry.getValue().getAsNumber()); + else if (entry.getValue().getAsJsonPrimitive().isBoolean()) + instance.putAdditionalProperty( + entry.getKey(), + entry.getValue().getAsBoolean()); + else + throw new IllegalArgumentException( + String.format( + "The field `%s` has unknown primitive" + + " type. Value: %s", + entry.getKey(), + entry.getValue().toString())); + } else if (entry.getValue().isJsonArray()) { + instance.putAdditionalProperty( + entry.getKey(), + gson.fromJson(entry.getValue(), List.class)); + } else { // JSON object + instance.putAdditionalProperty( + entry.getKey(), + gson.fromJson(entry.getValue(), HashMap.class)); + } + } + } + return instance; + } + }.nullSafe(); + } + } + + /** + * Create an instance of CALLBACKInput given an JSON string + * + * @param jsonString JSON string + * @return An instance of CALLBACKInput + * @throws IOException if the JSON string is invalid with respect to CALLBACKInput + */ + public static CALLBACKInput fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, CALLBACKInput.class); + } + + /** + * Convert an instance of CALLBACKInput to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} diff --git a/sdks/java/src/main/java/com/thoughtspot/client/model/CALLBACKInputMandatory.java b/sdks/java/src/main/java/com/thoughtspot/client/model/CALLBACKInputMandatory.java new file mode 100644 index 000000000..526fedead --- /dev/null +++ b/sdks/java/src/main/java/com/thoughtspot/client/model/CALLBACKInputMandatory.java @@ -0,0 +1,310 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client.model; + +import com.google.gson.Gson; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.TypeAdapter; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.annotations.SerializedName; +import com.google.gson.reflect.TypeToken; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import com.thoughtspot.client.JSON; +import java.io.IOException; +import java.io.Serializable; +import java.util.Arrays; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Objects; +import org.openapitools.jackson.nullable.JsonNullable; + +/** CALLBACK Custom Action Type */ +@javax.annotation.Generated( + value = "org.openapitools.codegen.languages.JavaClientCodegen", + comments = "Generator version: 7.12.0") +public class CALLBACKInputMandatory implements Serializable { + private static final long serialVersionUID = 1L; + + public static final String SERIALIZED_NAME_REFERENCE = "reference"; + + @SerializedName(SERIALIZED_NAME_REFERENCE) + @javax.annotation.Nullable + private String reference; + + public CALLBACKInputMandatory() {} + + public CALLBACKInputMandatory reference(@javax.annotation.Nullable String reference) { + this.reference = reference; + return this; + } + + /** + * Reference name. By default, the value will be set to action name. + * + * @return reference + */ + @javax.annotation.Nullable + public String getReference() { + return reference; + } + + public void setReference(@javax.annotation.Nullable String reference) { + this.reference = reference; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key name of the property + * @param value value of the property + * @return the CALLBACKInputMandatory instance itself + */ + public CALLBACKInputMandatory putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return a map of objects + */ + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key name of the property + * @return an object + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + CALLBACKInputMandatory caLLBACKInputMandatory = (CALLBACKInputMandatory) o; + return Objects.equals(this.reference, caLLBACKInputMandatory.reference) + && Objects.equals( + this.additionalProperties, caLLBACKInputMandatory.additionalProperties); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b + || (a != null + && b != null + && a.isPresent() + && b.isPresent() + && Objects.deepEquals(a.get(), b.get())); + } + + @Override + public int hashCode() { + return Objects.hash(reference, additionalProperties); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; + } + return a.isPresent() ? Arrays.deepHashCode(new Object[] {a.get()}) : 31; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class CALLBACKInputMandatory {\n"); + sb.append(" reference: ").append(toIndentedString(reference)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first + * line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("reference"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to CALLBACKInputMandatory + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!CALLBACKInputMandatory.openapiRequiredFields + .isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException( + String.format( + "The required field(s) %s in CALLBACKInputMandatory is not found" + + " in the empty JSON string", + CALLBACKInputMandatory.openapiRequiredFields.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if ((jsonObj.get("reference") != null && !jsonObj.get("reference").isJsonNull()) + && !jsonObj.get("reference").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `reference` to be a primitive type in the JSON" + + " string but got `%s`", + jsonObj.get("reference").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!CALLBACKInputMandatory.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'CALLBACKInputMandatory' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter = + gson.getDelegateAdapter(this, TypeToken.get(CALLBACKInputMandatory.class)); + + return (TypeAdapter) + new TypeAdapter() { + @Override + public void write(JsonWriter out, CALLBACKInputMandatory value) + throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + obj.remove("additionalProperties"); + // serialize additional properties + if (value.getAdditionalProperties() != null) { + for (Map.Entry entry : + value.getAdditionalProperties().entrySet()) { + if (entry.getValue() instanceof String) + obj.addProperty(entry.getKey(), (String) entry.getValue()); + else if (entry.getValue() instanceof Number) + obj.addProperty(entry.getKey(), (Number) entry.getValue()); + else if (entry.getValue() instanceof Boolean) + obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); + else if (entry.getValue() instanceof Character) + obj.addProperty( + entry.getKey(), (Character) entry.getValue()); + else { + JsonElement jsonElement = gson.toJsonTree(entry.getValue()); + if (jsonElement.isJsonArray()) { + obj.add(entry.getKey(), jsonElement.getAsJsonArray()); + } else { + obj.add(entry.getKey(), jsonElement.getAsJsonObject()); + } + } + } + } + elementAdapter.write(out, obj); + } + + @Override + public CALLBACKInputMandatory read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // store additional fields in the deserialized instance + CALLBACKInputMandatory instance = thisAdapter.fromJsonTree(jsonObj); + for (Map.Entry entry : jsonObj.entrySet()) { + if (!openapiFields.contains(entry.getKey())) { + if (entry.getValue().isJsonPrimitive()) { // primitive type + if (entry.getValue().getAsJsonPrimitive().isString()) + instance.putAdditionalProperty( + entry.getKey(), entry.getValue().getAsString()); + else if (entry.getValue().getAsJsonPrimitive().isNumber()) + instance.putAdditionalProperty( + entry.getKey(), entry.getValue().getAsNumber()); + else if (entry.getValue().getAsJsonPrimitive().isBoolean()) + instance.putAdditionalProperty( + entry.getKey(), + entry.getValue().getAsBoolean()); + else + throw new IllegalArgumentException( + String.format( + "The field `%s` has unknown primitive" + + " type. Value: %s", + entry.getKey(), + entry.getValue().toString())); + } else if (entry.getValue().isJsonArray()) { + instance.putAdditionalProperty( + entry.getKey(), + gson.fromJson(entry.getValue(), List.class)); + } else { // JSON object + instance.putAdditionalProperty( + entry.getKey(), + gson.fromJson(entry.getValue(), HashMap.class)); + } + } + } + return instance; + } + }.nullSafe(); + } + } + + /** + * Create an instance of CALLBACKInputMandatory given an JSON string + * + * @param jsonString JSON string + * @return An instance of CALLBACKInputMandatory + * @throws IOException if the JSON string is invalid with respect to CALLBACKInputMandatory + */ + public static CALLBACKInputMandatory fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, CALLBACKInputMandatory.class); + } + + /** + * Convert an instance of CALLBACKInputMandatory to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} diff --git a/sdks/java/src/main/java/com/thoughtspot/client/model/CalendarResponse.java b/sdks/java/src/main/java/com/thoughtspot/client/model/CalendarResponse.java new file mode 100644 index 000000000..2dbda47c5 --- /dev/null +++ b/sdks/java/src/main/java/com/thoughtspot/client/model/CalendarResponse.java @@ -0,0 +1,543 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client.model; + +import com.google.gson.Gson; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.TypeAdapter; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.annotations.SerializedName; +import com.google.gson.reflect.TypeToken; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import com.thoughtspot.client.JSON; +import java.io.IOException; +import java.io.Serializable; +import java.util.Arrays; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Objects; +import org.openapitools.jackson.nullable.JsonNullable; + +/** CalendarResponse */ +@javax.annotation.Generated( + value = "org.openapitools.codegen.languages.JavaClientCodegen", + comments = "Generator version: 7.12.0") +public class CalendarResponse implements Serializable { + private static final long serialVersionUID = 1L; + + public static final String SERIALIZED_NAME_CALENDAR_NAME = "calendar_name"; + + @SerializedName(SERIALIZED_NAME_CALENDAR_NAME) + @javax.annotation.Nullable + private String calendarName; + + public static final String SERIALIZED_NAME_CONNECTION_NAME = "connection_name"; + + @SerializedName(SERIALIZED_NAME_CONNECTION_NAME) + @javax.annotation.Nullable + private String connectionName; + + public static final String SERIALIZED_NAME_DATA_WAREHOUSE_TYPE = "data_warehouse_type"; + + @SerializedName(SERIALIZED_NAME_DATA_WAREHOUSE_TYPE) + @javax.annotation.Nullable + private String dataWarehouseType; + + public static final String SERIALIZED_NAME_MODIFICATION_TIME_IN_MILLIS = + "modification_time_in_millis"; + + @SerializedName(SERIALIZED_NAME_MODIFICATION_TIME_IN_MILLIS) + @javax.annotation.Nullable + private String modificationTimeInMillis; + + public static final String SERIALIZED_NAME_AUTHOR_NAME = "author_name"; + + @SerializedName(SERIALIZED_NAME_AUTHOR_NAME) + @javax.annotation.Nullable + private String authorName; + + public static final String SERIALIZED_NAME_CONNECTION_ID = "connection_id"; + + @SerializedName(SERIALIZED_NAME_CONNECTION_ID) + @javax.annotation.Nullable + private String connectionId; + + public static final String SERIALIZED_NAME_CALENDAR_ID = "calendar_id"; + + @SerializedName(SERIALIZED_NAME_CALENDAR_ID) + @javax.annotation.Nullable + private String calendarId; + + public CalendarResponse() {} + + public CalendarResponse calendarName(@javax.annotation.Nullable String calendarName) { + this.calendarName = calendarName; + return this; + } + + /** + * Name of the calendar + * + * @return calendarName + */ + @javax.annotation.Nullable + public String getCalendarName() { + return calendarName; + } + + public void setCalendarName(@javax.annotation.Nullable String calendarName) { + this.calendarName = calendarName; + } + + public CalendarResponse connectionName(@javax.annotation.Nullable String connectionName) { + this.connectionName = connectionName; + return this; + } + + /** + * Name of the connection + * + * @return connectionName + */ + @javax.annotation.Nullable + public String getConnectionName() { + return connectionName; + } + + public void setConnectionName(@javax.annotation.Nullable String connectionName) { + this.connectionName = connectionName; + } + + public CalendarResponse dataWarehouseType(@javax.annotation.Nullable String dataWarehouseType) { + this.dataWarehouseType = dataWarehouseType; + return this; + } + + /** + * Type of data warehouse + * + * @return dataWarehouseType + */ + @javax.annotation.Nullable + public String getDataWarehouseType() { + return dataWarehouseType; + } + + public void setDataWarehouseType(@javax.annotation.Nullable String dataWarehouseType) { + this.dataWarehouseType = dataWarehouseType; + } + + public CalendarResponse modificationTimeInMillis( + @javax.annotation.Nullable String modificationTimeInMillis) { + this.modificationTimeInMillis = modificationTimeInMillis; + return this; + } + + /** + * Last modification time in milliseconds + * + * @return modificationTimeInMillis + */ + @javax.annotation.Nullable + public String getModificationTimeInMillis() { + return modificationTimeInMillis; + } + + public void setModificationTimeInMillis( + @javax.annotation.Nullable String modificationTimeInMillis) { + this.modificationTimeInMillis = modificationTimeInMillis; + } + + public CalendarResponse authorName(@javax.annotation.Nullable String authorName) { + this.authorName = authorName; + return this; + } + + /** + * Name of the author who created the calendar + * + * @return authorName + */ + @javax.annotation.Nullable + public String getAuthorName() { + return authorName; + } + + public void setAuthorName(@javax.annotation.Nullable String authorName) { + this.authorName = authorName; + } + + public CalendarResponse connectionId(@javax.annotation.Nullable String connectionId) { + this.connectionId = connectionId; + return this; + } + + /** + * Unique ID of the connection + * + * @return connectionId + */ + @javax.annotation.Nullable + public String getConnectionId() { + return connectionId; + } + + public void setConnectionId(@javax.annotation.Nullable String connectionId) { + this.connectionId = connectionId; + } + + public CalendarResponse calendarId(@javax.annotation.Nullable String calendarId) { + this.calendarId = calendarId; + return this; + } + + /** + * Unique ID of the calendar + * + * @return calendarId + */ + @javax.annotation.Nullable + public String getCalendarId() { + return calendarId; + } + + public void setCalendarId(@javax.annotation.Nullable String calendarId) { + this.calendarId = calendarId; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key name of the property + * @param value value of the property + * @return the CalendarResponse instance itself + */ + public CalendarResponse putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return a map of objects + */ + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key name of the property + * @return an object + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + CalendarResponse calendarResponse = (CalendarResponse) o; + return Objects.equals(this.calendarName, calendarResponse.calendarName) + && Objects.equals(this.connectionName, calendarResponse.connectionName) + && Objects.equals(this.dataWarehouseType, calendarResponse.dataWarehouseType) + && Objects.equals( + this.modificationTimeInMillis, calendarResponse.modificationTimeInMillis) + && Objects.equals(this.authorName, calendarResponse.authorName) + && Objects.equals(this.connectionId, calendarResponse.connectionId) + && Objects.equals(this.calendarId, calendarResponse.calendarId) + && Objects.equals(this.additionalProperties, calendarResponse.additionalProperties); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b + || (a != null + && b != null + && a.isPresent() + && b.isPresent() + && Objects.deepEquals(a.get(), b.get())); + } + + @Override + public int hashCode() { + return Objects.hash( + calendarName, + connectionName, + dataWarehouseType, + modificationTimeInMillis, + authorName, + connectionId, + calendarId, + additionalProperties); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; + } + return a.isPresent() ? Arrays.deepHashCode(new Object[] {a.get()}) : 31; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class CalendarResponse {\n"); + sb.append(" calendarName: ").append(toIndentedString(calendarName)).append("\n"); + sb.append(" connectionName: ").append(toIndentedString(connectionName)).append("\n"); + sb.append(" dataWarehouseType: ") + .append(toIndentedString(dataWarehouseType)) + .append("\n"); + sb.append(" modificationTimeInMillis: ") + .append(toIndentedString(modificationTimeInMillis)) + .append("\n"); + sb.append(" authorName: ").append(toIndentedString(authorName)).append("\n"); + sb.append(" connectionId: ").append(toIndentedString(connectionId)).append("\n"); + sb.append(" calendarId: ").append(toIndentedString(calendarId)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first + * line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("calendar_name"); + openapiFields.add("connection_name"); + openapiFields.add("data_warehouse_type"); + openapiFields.add("modification_time_in_millis"); + openapiFields.add("author_name"); + openapiFields.add("connection_id"); + openapiFields.add("calendar_id"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to CalendarResponse + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!CalendarResponse.openapiRequiredFields + .isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException( + String.format( + "The required field(s) %s in CalendarResponse is not found in the" + + " empty JSON string", + CalendarResponse.openapiRequiredFields.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if ((jsonObj.get("calendar_name") != null && !jsonObj.get("calendar_name").isJsonNull()) + && !jsonObj.get("calendar_name").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `calendar_name` to be a primitive type in the JSON" + + " string but got `%s`", + jsonObj.get("calendar_name").toString())); + } + if ((jsonObj.get("connection_name") != null && !jsonObj.get("connection_name").isJsonNull()) + && !jsonObj.get("connection_name").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `connection_name` to be a primitive type in the" + + " JSON string but got `%s`", + jsonObj.get("connection_name").toString())); + } + if ((jsonObj.get("data_warehouse_type") != null + && !jsonObj.get("data_warehouse_type").isJsonNull()) + && !jsonObj.get("data_warehouse_type").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `data_warehouse_type` to be a primitive type in" + + " the JSON string but got `%s`", + jsonObj.get("data_warehouse_type").toString())); + } + if ((jsonObj.get("modification_time_in_millis") != null + && !jsonObj.get("modification_time_in_millis").isJsonNull()) + && !jsonObj.get("modification_time_in_millis").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `modification_time_in_millis` to be a primitive" + + " type in the JSON string but got `%s`", + jsonObj.get("modification_time_in_millis").toString())); + } + if ((jsonObj.get("author_name") != null && !jsonObj.get("author_name").isJsonNull()) + && !jsonObj.get("author_name").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `author_name` to be a primitive type in the JSON" + + " string but got `%s`", + jsonObj.get("author_name").toString())); + } + if ((jsonObj.get("connection_id") != null && !jsonObj.get("connection_id").isJsonNull()) + && !jsonObj.get("connection_id").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `connection_id` to be a primitive type in the JSON" + + " string but got `%s`", + jsonObj.get("connection_id").toString())); + } + if ((jsonObj.get("calendar_id") != null && !jsonObj.get("calendar_id").isJsonNull()) + && !jsonObj.get("calendar_id").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `calendar_id` to be a primitive type in the JSON" + + " string but got `%s`", + jsonObj.get("calendar_id").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!CalendarResponse.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'CalendarResponse' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter = + gson.getDelegateAdapter(this, TypeToken.get(CalendarResponse.class)); + + return (TypeAdapter) + new TypeAdapter() { + @Override + public void write(JsonWriter out, CalendarResponse value) + throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + obj.remove("additionalProperties"); + // serialize additional properties + if (value.getAdditionalProperties() != null) { + for (Map.Entry entry : + value.getAdditionalProperties().entrySet()) { + if (entry.getValue() instanceof String) + obj.addProperty(entry.getKey(), (String) entry.getValue()); + else if (entry.getValue() instanceof Number) + obj.addProperty(entry.getKey(), (Number) entry.getValue()); + else if (entry.getValue() instanceof Boolean) + obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); + else if (entry.getValue() instanceof Character) + obj.addProperty( + entry.getKey(), (Character) entry.getValue()); + else { + JsonElement jsonElement = gson.toJsonTree(entry.getValue()); + if (jsonElement.isJsonArray()) { + obj.add(entry.getKey(), jsonElement.getAsJsonArray()); + } else { + obj.add(entry.getKey(), jsonElement.getAsJsonObject()); + } + } + } + } + elementAdapter.write(out, obj); + } + + @Override + public CalendarResponse read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // store additional fields in the deserialized instance + CalendarResponse instance = thisAdapter.fromJsonTree(jsonObj); + for (Map.Entry entry : jsonObj.entrySet()) { + if (!openapiFields.contains(entry.getKey())) { + if (entry.getValue().isJsonPrimitive()) { // primitive type + if (entry.getValue().getAsJsonPrimitive().isString()) + instance.putAdditionalProperty( + entry.getKey(), entry.getValue().getAsString()); + else if (entry.getValue().getAsJsonPrimitive().isNumber()) + instance.putAdditionalProperty( + entry.getKey(), entry.getValue().getAsNumber()); + else if (entry.getValue().getAsJsonPrimitive().isBoolean()) + instance.putAdditionalProperty( + entry.getKey(), + entry.getValue().getAsBoolean()); + else + throw new IllegalArgumentException( + String.format( + "The field `%s` has unknown primitive" + + " type. Value: %s", + entry.getKey(), + entry.getValue().toString())); + } else if (entry.getValue().isJsonArray()) { + instance.putAdditionalProperty( + entry.getKey(), + gson.fromJson(entry.getValue(), List.class)); + } else { // JSON object + instance.putAdditionalProperty( + entry.getKey(), + gson.fromJson(entry.getValue(), HashMap.class)); + } + } + } + return instance; + } + }.nullSafe(); + } + } + + /** + * Create an instance of CalendarResponse given an JSON string + * + * @param jsonString JSON string + * @return An instance of CalendarResponse + * @throws IOException if the JSON string is invalid with respect to CalendarResponse + */ + public static CalendarResponse fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, CalendarResponse.class); + } + + /** + * Convert an instance of CalendarResponse to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} diff --git a/sdks/java/src/main/java/com/thoughtspot/client/model/ChangeUserPasswordRequest.java b/sdks/java/src/main/java/com/thoughtspot/client/model/ChangeUserPasswordRequest.java new file mode 100644 index 000000000..007ae98b9 --- /dev/null +++ b/sdks/java/src/main/java/com/thoughtspot/client/model/ChangeUserPasswordRequest.java @@ -0,0 +1,377 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client.model; + +import com.google.gson.Gson; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.TypeAdapter; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.annotations.SerializedName; +import com.google.gson.reflect.TypeToken; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import com.thoughtspot.client.JSON; +import java.io.IOException; +import java.io.Serializable; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Objects; + +/** ChangeUserPasswordRequest */ +@javax.annotation.Generated( + value = "org.openapitools.codegen.languages.JavaClientCodegen", + comments = "Generator version: 7.12.0") +public class ChangeUserPasswordRequest implements Serializable { + private static final long serialVersionUID = 1L; + + public static final String SERIALIZED_NAME_CURRENT_PASSWORD = "current_password"; + + @SerializedName(SERIALIZED_NAME_CURRENT_PASSWORD) + @javax.annotation.Nonnull + private String currentPassword; + + public static final String SERIALIZED_NAME_NEW_PASSWORD = "new_password"; + + @SerializedName(SERIALIZED_NAME_NEW_PASSWORD) + @javax.annotation.Nonnull + private String newPassword; + + public static final String SERIALIZED_NAME_USER_IDENTIFIER = "user_identifier"; + + @SerializedName(SERIALIZED_NAME_USER_IDENTIFIER) + @javax.annotation.Nonnull + private String userIdentifier; + + public ChangeUserPasswordRequest() {} + + public ChangeUserPasswordRequest currentPassword( + @javax.annotation.Nonnull String currentPassword) { + this.currentPassword = currentPassword; + return this; + } + + /** + * Current password of the user. + * + * @return currentPassword + */ + @javax.annotation.Nonnull + public String getCurrentPassword() { + return currentPassword; + } + + public void setCurrentPassword(@javax.annotation.Nonnull String currentPassword) { + this.currentPassword = currentPassword; + } + + public ChangeUserPasswordRequest newPassword(@javax.annotation.Nonnull String newPassword) { + this.newPassword = newPassword; + return this; + } + + /** + * New password for the user. + * + * @return newPassword + */ + @javax.annotation.Nonnull + public String getNewPassword() { + return newPassword; + } + + public void setNewPassword(@javax.annotation.Nonnull String newPassword) { + this.newPassword = newPassword; + } + + public ChangeUserPasswordRequest userIdentifier( + @javax.annotation.Nonnull String userIdentifier) { + this.userIdentifier = userIdentifier; + return this; + } + + /** + * GUID or name of the user. + * + * @return userIdentifier + */ + @javax.annotation.Nonnull + public String getUserIdentifier() { + return userIdentifier; + } + + public void setUserIdentifier(@javax.annotation.Nonnull String userIdentifier) { + this.userIdentifier = userIdentifier; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key name of the property + * @param value value of the property + * @return the ChangeUserPasswordRequest instance itself + */ + public ChangeUserPasswordRequest putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return a map of objects + */ + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key name of the property + * @return an object + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ChangeUserPasswordRequest changeUserPasswordRequest = (ChangeUserPasswordRequest) o; + return Objects.equals(this.currentPassword, changeUserPasswordRequest.currentPassword) + && Objects.equals(this.newPassword, changeUserPasswordRequest.newPassword) + && Objects.equals(this.userIdentifier, changeUserPasswordRequest.userIdentifier) + && Objects.equals( + this.additionalProperties, changeUserPasswordRequest.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(currentPassword, newPassword, userIdentifier, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ChangeUserPasswordRequest {\n"); + sb.append(" currentPassword: ").append(toIndentedString(currentPassword)).append("\n"); + sb.append(" newPassword: ").append(toIndentedString(newPassword)).append("\n"); + sb.append(" userIdentifier: ").append(toIndentedString(userIdentifier)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first + * line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("current_password"); + openapiFields.add("new_password"); + openapiFields.add("user_identifier"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + openapiRequiredFields.add("current_password"); + openapiRequiredFields.add("new_password"); + openapiRequiredFields.add("user_identifier"); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to ChangeUserPasswordRequest + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!ChangeUserPasswordRequest.openapiRequiredFields + .isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException( + String.format( + "The required field(s) %s in ChangeUserPasswordRequest is not" + + " found in the empty JSON string", + ChangeUserPasswordRequest.openapiRequiredFields.toString())); + } + } + + // check to make sure all required properties/fields are present in the JSON string + for (String requiredField : ChangeUserPasswordRequest.openapiRequiredFields) { + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException( + String.format( + "The required field `%s` is not found in the JSON string: %s", + requiredField, jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if (!jsonObj.get("current_password").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `current_password` to be a primitive type in the" + + " JSON string but got `%s`", + jsonObj.get("current_password").toString())); + } + if (!jsonObj.get("new_password").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `new_password` to be a primitive type in the JSON" + + " string but got `%s`", + jsonObj.get("new_password").toString())); + } + if (!jsonObj.get("user_identifier").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `user_identifier` to be a primitive type in the" + + " JSON string but got `%s`", + jsonObj.get("user_identifier").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!ChangeUserPasswordRequest.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'ChangeUserPasswordRequest' and its + // subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter = + gson.getDelegateAdapter(this, TypeToken.get(ChangeUserPasswordRequest.class)); + + return (TypeAdapter) + new TypeAdapter() { + @Override + public void write(JsonWriter out, ChangeUserPasswordRequest value) + throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + obj.remove("additionalProperties"); + // serialize additional properties + if (value.getAdditionalProperties() != null) { + for (Map.Entry entry : + value.getAdditionalProperties().entrySet()) { + if (entry.getValue() instanceof String) + obj.addProperty(entry.getKey(), (String) entry.getValue()); + else if (entry.getValue() instanceof Number) + obj.addProperty(entry.getKey(), (Number) entry.getValue()); + else if (entry.getValue() instanceof Boolean) + obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); + else if (entry.getValue() instanceof Character) + obj.addProperty( + entry.getKey(), (Character) entry.getValue()); + else { + JsonElement jsonElement = gson.toJsonTree(entry.getValue()); + if (jsonElement.isJsonArray()) { + obj.add(entry.getKey(), jsonElement.getAsJsonArray()); + } else { + obj.add(entry.getKey(), jsonElement.getAsJsonObject()); + } + } + } + } + elementAdapter.write(out, obj); + } + + @Override + public ChangeUserPasswordRequest read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // store additional fields in the deserialized instance + ChangeUserPasswordRequest instance = thisAdapter.fromJsonTree(jsonObj); + for (Map.Entry entry : jsonObj.entrySet()) { + if (!openapiFields.contains(entry.getKey())) { + if (entry.getValue().isJsonPrimitive()) { // primitive type + if (entry.getValue().getAsJsonPrimitive().isString()) + instance.putAdditionalProperty( + entry.getKey(), entry.getValue().getAsString()); + else if (entry.getValue().getAsJsonPrimitive().isNumber()) + instance.putAdditionalProperty( + entry.getKey(), entry.getValue().getAsNumber()); + else if (entry.getValue().getAsJsonPrimitive().isBoolean()) + instance.putAdditionalProperty( + entry.getKey(), + entry.getValue().getAsBoolean()); + else + throw new IllegalArgumentException( + String.format( + "The field `%s` has unknown primitive" + + " type. Value: %s", + entry.getKey(), + entry.getValue().toString())); + } else if (entry.getValue().isJsonArray()) { + instance.putAdditionalProperty( + entry.getKey(), + gson.fromJson(entry.getValue(), List.class)); + } else { // JSON object + instance.putAdditionalProperty( + entry.getKey(), + gson.fromJson(entry.getValue(), HashMap.class)); + } + } + } + return instance; + } + }.nullSafe(); + } + } + + /** + * Create an instance of ChangeUserPasswordRequest given an JSON string + * + * @param jsonString JSON string + * @return An instance of ChangeUserPasswordRequest + * @throws IOException if the JSON string is invalid with respect to ChangeUserPasswordRequest + */ + public static ChangeUserPasswordRequest fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, ChangeUserPasswordRequest.class); + } + + /** + * Convert an instance of ChangeUserPasswordRequest to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} diff --git a/sdks/java/src/main/java/com/thoughtspot/client/model/ChannelHistoryEventInfo.java b/sdks/java/src/main/java/com/thoughtspot/client/model/ChannelHistoryEventInfo.java new file mode 100644 index 000000000..5c9ade97f --- /dev/null +++ b/sdks/java/src/main/java/com/thoughtspot/client/model/ChannelHistoryEventInfo.java @@ -0,0 +1,481 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client.model; + +import com.google.gson.Gson; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.TypeAdapter; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.reflect.TypeToken; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import com.thoughtspot.client.JSON; +import java.io.IOException; +import java.io.Serializable; +import java.util.Arrays; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Objects; +import org.openapitools.jackson.nullable.JsonNullable; + +/** Event metadata for the triggering event associated with a job. */ +@javax.annotation.Generated( + value = "org.openapitools.codegen.languages.JavaClientCodegen", + comments = "Generator version: 7.12.0") +public class ChannelHistoryEventInfo implements Serializable { + private static final long serialVersionUID = 1L; + + /** Type of the event. */ + @JsonAdapter(TypeEnum.Adapter.class) + public enum TypeEnum { + LIVEBOARD_SCHEDULE("LIVEBOARD_SCHEDULE"); + + private String value; + + TypeEnum(String value) { + this.value = value; + } + + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + public static TypeEnum fromValue(String value) { + for (TypeEnum b : TypeEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + + public static class Adapter extends TypeAdapter { + @Override + public void write(final JsonWriter jsonWriter, final TypeEnum enumeration) + throws IOException { + jsonWriter.value(enumeration.getValue()); + } + + @Override + public TypeEnum read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + return TypeEnum.fromValue(value); + } + } + + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + String value = jsonElement.getAsString(); + TypeEnum.fromValue(value); + } + } + + public static final String SERIALIZED_NAME_TYPE = "type"; + + @SerializedName(SERIALIZED_NAME_TYPE) + @javax.annotation.Nonnull + private TypeEnum type; + + public static final String SERIALIZED_NAME_ID = "id"; + + @SerializedName(SERIALIZED_NAME_ID) + @javax.annotation.Nonnull + private String id; + + public static final String SERIALIZED_NAME_NAME = "name"; + + @SerializedName(SERIALIZED_NAME_NAME) + @javax.annotation.Nullable + private String name; + + public static final String SERIALIZED_NAME_RUN_ID = "run_id"; + + @SerializedName(SERIALIZED_NAME_RUN_ID) + @javax.annotation.Nullable + private String runId; + + public ChannelHistoryEventInfo() {} + + public ChannelHistoryEventInfo type(@javax.annotation.Nonnull TypeEnum type) { + this.type = type; + return this; + } + + /** + * Type of the event. + * + * @return type + */ + @javax.annotation.Nonnull + public TypeEnum getType() { + return type; + } + + public void setType(@javax.annotation.Nonnull TypeEnum type) { + this.type = type; + } + + public ChannelHistoryEventInfo id(@javax.annotation.Nonnull String id) { + this.id = id; + return this; + } + + /** + * Unique ID of the event. + * + * @return id + */ + @javax.annotation.Nonnull + public String getId() { + return id; + } + + public void setId(@javax.annotation.Nonnull String id) { + this.id = id; + } + + public ChannelHistoryEventInfo name(@javax.annotation.Nullable String name) { + this.name = name; + return this; + } + + /** + * Name of the event. + * + * @return name + */ + @javax.annotation.Nullable + public String getName() { + return name; + } + + public void setName(@javax.annotation.Nullable String name) { + this.name = name; + } + + public ChannelHistoryEventInfo runId(@javax.annotation.Nullable String runId) { + this.runId = runId; + return this; + } + + /** + * Unique run ID for this event execution. + * + * @return runId + */ + @javax.annotation.Nullable + public String getRunId() { + return runId; + } + + public void setRunId(@javax.annotation.Nullable String runId) { + this.runId = runId; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key name of the property + * @param value value of the property + * @return the ChannelHistoryEventInfo instance itself + */ + public ChannelHistoryEventInfo putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return a map of objects + */ + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key name of the property + * @return an object + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ChannelHistoryEventInfo channelHistoryEventInfo = (ChannelHistoryEventInfo) o; + return Objects.equals(this.type, channelHistoryEventInfo.type) + && Objects.equals(this.id, channelHistoryEventInfo.id) + && Objects.equals(this.name, channelHistoryEventInfo.name) + && Objects.equals(this.runId, channelHistoryEventInfo.runId) + && Objects.equals( + this.additionalProperties, channelHistoryEventInfo.additionalProperties); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b + || (a != null + && b != null + && a.isPresent() + && b.isPresent() + && Objects.deepEquals(a.get(), b.get())); + } + + @Override + public int hashCode() { + return Objects.hash(type, id, name, runId, additionalProperties); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; + } + return a.isPresent() ? Arrays.deepHashCode(new Object[] {a.get()}) : 31; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ChannelHistoryEventInfo {\n"); + sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append(" runId: ").append(toIndentedString(runId)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first + * line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("type"); + openapiFields.add("id"); + openapiFields.add("name"); + openapiFields.add("run_id"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + openapiRequiredFields.add("type"); + openapiRequiredFields.add("id"); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to ChannelHistoryEventInfo + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!ChannelHistoryEventInfo.openapiRequiredFields + .isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException( + String.format( + "The required field(s) %s in ChannelHistoryEventInfo is not found" + + " in the empty JSON string", + ChannelHistoryEventInfo.openapiRequiredFields.toString())); + } + } + + // check to make sure all required properties/fields are present in the JSON string + for (String requiredField : ChannelHistoryEventInfo.openapiRequiredFields) { + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException( + String.format( + "The required field `%s` is not found in the JSON string: %s", + requiredField, jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if (!jsonObj.get("type").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `type` to be a primitive type in the JSON string" + + " but got `%s`", + jsonObj.get("type").toString())); + } + // validate the required field `type` + TypeEnum.validateJsonElement(jsonObj.get("type")); + if (!jsonObj.get("id").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `id` to be a primitive type in the JSON string but" + + " got `%s`", + jsonObj.get("id").toString())); + } + if ((jsonObj.get("name") != null && !jsonObj.get("name").isJsonNull()) + && !jsonObj.get("name").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `name` to be a primitive type in the JSON string" + + " but got `%s`", + jsonObj.get("name").toString())); + } + if ((jsonObj.get("run_id") != null && !jsonObj.get("run_id").isJsonNull()) + && !jsonObj.get("run_id").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `run_id` to be a primitive type in the JSON string" + + " but got `%s`", + jsonObj.get("run_id").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!ChannelHistoryEventInfo.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'ChannelHistoryEventInfo' and its + // subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter = + gson.getDelegateAdapter(this, TypeToken.get(ChannelHistoryEventInfo.class)); + + return (TypeAdapter) + new TypeAdapter() { + @Override + public void write(JsonWriter out, ChannelHistoryEventInfo value) + throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + obj.remove("additionalProperties"); + // serialize additional properties + if (value.getAdditionalProperties() != null) { + for (Map.Entry entry : + value.getAdditionalProperties().entrySet()) { + if (entry.getValue() instanceof String) + obj.addProperty(entry.getKey(), (String) entry.getValue()); + else if (entry.getValue() instanceof Number) + obj.addProperty(entry.getKey(), (Number) entry.getValue()); + else if (entry.getValue() instanceof Boolean) + obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); + else if (entry.getValue() instanceof Character) + obj.addProperty( + entry.getKey(), (Character) entry.getValue()); + else { + JsonElement jsonElement = gson.toJsonTree(entry.getValue()); + if (jsonElement.isJsonArray()) { + obj.add(entry.getKey(), jsonElement.getAsJsonArray()); + } else { + obj.add(entry.getKey(), jsonElement.getAsJsonObject()); + } + } + } + } + elementAdapter.write(out, obj); + } + + @Override + public ChannelHistoryEventInfo read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // store additional fields in the deserialized instance + ChannelHistoryEventInfo instance = thisAdapter.fromJsonTree(jsonObj); + for (Map.Entry entry : jsonObj.entrySet()) { + if (!openapiFields.contains(entry.getKey())) { + if (entry.getValue().isJsonPrimitive()) { // primitive type + if (entry.getValue().getAsJsonPrimitive().isString()) + instance.putAdditionalProperty( + entry.getKey(), entry.getValue().getAsString()); + else if (entry.getValue().getAsJsonPrimitive().isNumber()) + instance.putAdditionalProperty( + entry.getKey(), entry.getValue().getAsNumber()); + else if (entry.getValue().getAsJsonPrimitive().isBoolean()) + instance.putAdditionalProperty( + entry.getKey(), + entry.getValue().getAsBoolean()); + else + throw new IllegalArgumentException( + String.format( + "The field `%s` has unknown primitive" + + " type. Value: %s", + entry.getKey(), + entry.getValue().toString())); + } else if (entry.getValue().isJsonArray()) { + instance.putAdditionalProperty( + entry.getKey(), + gson.fromJson(entry.getValue(), List.class)); + } else { // JSON object + instance.putAdditionalProperty( + entry.getKey(), + gson.fromJson(entry.getValue(), HashMap.class)); + } + } + } + return instance; + } + }.nullSafe(); + } + } + + /** + * Create an instance of ChannelHistoryEventInfo given an JSON string + * + * @param jsonString JSON string + * @return An instance of ChannelHistoryEventInfo + * @throws IOException if the JSON string is invalid with respect to ChannelHistoryEventInfo + */ + public static ChannelHistoryEventInfo fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, ChannelHistoryEventInfo.class); + } + + /** + * Convert an instance of ChannelHistoryEventInfo to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} diff --git a/sdks/java/src/main/java/com/thoughtspot/client/model/ChannelHistoryEventInput.java b/sdks/java/src/main/java/com/thoughtspot/client/model/ChannelHistoryEventInput.java new file mode 100644 index 000000000..c0bc9c053 --- /dev/null +++ b/sdks/java/src/main/java/com/thoughtspot/client/model/ChannelHistoryEventInput.java @@ -0,0 +1,409 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client.model; + +import com.google.gson.Gson; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.TypeAdapter; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.reflect.TypeToken; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import com.thoughtspot.client.JSON; +import java.io.IOException; +import java.io.Serializable; +import java.util.Arrays; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Objects; +import org.openapitools.jackson.nullable.JsonNullable; + +/** Event specification for channel history search. */ +@javax.annotation.Generated( + value = "org.openapitools.codegen.languages.JavaClientCodegen", + comments = "Generator version: 7.12.0") +public class ChannelHistoryEventInput implements Serializable { + private static final long serialVersionUID = 1L; + + /** Type of the event. */ + @JsonAdapter(TypeEnum.Adapter.class) + public enum TypeEnum { + LIVEBOARD_SCHEDULE("LIVEBOARD_SCHEDULE"); + + private String value; + + TypeEnum(String value) { + this.value = value; + } + + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + public static TypeEnum fromValue(String value) { + for (TypeEnum b : TypeEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + + public static class Adapter extends TypeAdapter { + @Override + public void write(final JsonWriter jsonWriter, final TypeEnum enumeration) + throws IOException { + jsonWriter.value(enumeration.getValue()); + } + + @Override + public TypeEnum read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + return TypeEnum.fromValue(value); + } + } + + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + String value = jsonElement.getAsString(); + TypeEnum.fromValue(value); + } + } + + public static final String SERIALIZED_NAME_TYPE = "type"; + + @SerializedName(SERIALIZED_NAME_TYPE) + @javax.annotation.Nonnull + private TypeEnum type; + + public static final String SERIALIZED_NAME_IDENTIFIER = "identifier"; + + @SerializedName(SERIALIZED_NAME_IDENTIFIER) + @javax.annotation.Nullable + private String identifier; + + public ChannelHistoryEventInput() {} + + public ChannelHistoryEventInput type(@javax.annotation.Nonnull TypeEnum type) { + this.type = type; + return this; + } + + /** + * Type of the event. + * + * @return type + */ + @javax.annotation.Nonnull + public TypeEnum getType() { + return type; + } + + public void setType(@javax.annotation.Nonnull TypeEnum type) { + this.type = type; + } + + public ChannelHistoryEventInput identifier(@javax.annotation.Nullable String identifier) { + this.identifier = identifier; + return this; + } + + /** + * Unique ID or name of the event. + * + * @return identifier + */ + @javax.annotation.Nullable + public String getIdentifier() { + return identifier; + } + + public void setIdentifier(@javax.annotation.Nullable String identifier) { + this.identifier = identifier; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key name of the property + * @param value value of the property + * @return the ChannelHistoryEventInput instance itself + */ + public ChannelHistoryEventInput putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return a map of objects + */ + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key name of the property + * @return an object + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ChannelHistoryEventInput channelHistoryEventInput = (ChannelHistoryEventInput) o; + return Objects.equals(this.type, channelHistoryEventInput.type) + && Objects.equals(this.identifier, channelHistoryEventInput.identifier) + && Objects.equals( + this.additionalProperties, channelHistoryEventInput.additionalProperties); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b + || (a != null + && b != null + && a.isPresent() + && b.isPresent() + && Objects.deepEquals(a.get(), b.get())); + } + + @Override + public int hashCode() { + return Objects.hash(type, identifier, additionalProperties); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; + } + return a.isPresent() ? Arrays.deepHashCode(new Object[] {a.get()}) : 31; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ChannelHistoryEventInput {\n"); + sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append(" identifier: ").append(toIndentedString(identifier)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first + * line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("type"); + openapiFields.add("identifier"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + openapiRequiredFields.add("type"); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to ChannelHistoryEventInput + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!ChannelHistoryEventInput.openapiRequiredFields + .isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException( + String.format( + "The required field(s) %s in ChannelHistoryEventInput is not found" + + " in the empty JSON string", + ChannelHistoryEventInput.openapiRequiredFields.toString())); + } + } + + // check to make sure all required properties/fields are present in the JSON string + for (String requiredField : ChannelHistoryEventInput.openapiRequiredFields) { + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException( + String.format( + "The required field `%s` is not found in the JSON string: %s", + requiredField, jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if (!jsonObj.get("type").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `type` to be a primitive type in the JSON string" + + " but got `%s`", + jsonObj.get("type").toString())); + } + // validate the required field `type` + TypeEnum.validateJsonElement(jsonObj.get("type")); + if ((jsonObj.get("identifier") != null && !jsonObj.get("identifier").isJsonNull()) + && !jsonObj.get("identifier").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `identifier` to be a primitive type in the JSON" + + " string but got `%s`", + jsonObj.get("identifier").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!ChannelHistoryEventInput.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'ChannelHistoryEventInput' and its + // subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter = + gson.getDelegateAdapter(this, TypeToken.get(ChannelHistoryEventInput.class)); + + return (TypeAdapter) + new TypeAdapter() { + @Override + public void write(JsonWriter out, ChannelHistoryEventInput value) + throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + obj.remove("additionalProperties"); + // serialize additional properties + if (value.getAdditionalProperties() != null) { + for (Map.Entry entry : + value.getAdditionalProperties().entrySet()) { + if (entry.getValue() instanceof String) + obj.addProperty(entry.getKey(), (String) entry.getValue()); + else if (entry.getValue() instanceof Number) + obj.addProperty(entry.getKey(), (Number) entry.getValue()); + else if (entry.getValue() instanceof Boolean) + obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); + else if (entry.getValue() instanceof Character) + obj.addProperty( + entry.getKey(), (Character) entry.getValue()); + else { + JsonElement jsonElement = gson.toJsonTree(entry.getValue()); + if (jsonElement.isJsonArray()) { + obj.add(entry.getKey(), jsonElement.getAsJsonArray()); + } else { + obj.add(entry.getKey(), jsonElement.getAsJsonObject()); + } + } + } + } + elementAdapter.write(out, obj); + } + + @Override + public ChannelHistoryEventInput read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // store additional fields in the deserialized instance + ChannelHistoryEventInput instance = thisAdapter.fromJsonTree(jsonObj); + for (Map.Entry entry : jsonObj.entrySet()) { + if (!openapiFields.contains(entry.getKey())) { + if (entry.getValue().isJsonPrimitive()) { // primitive type + if (entry.getValue().getAsJsonPrimitive().isString()) + instance.putAdditionalProperty( + entry.getKey(), entry.getValue().getAsString()); + else if (entry.getValue().getAsJsonPrimitive().isNumber()) + instance.putAdditionalProperty( + entry.getKey(), entry.getValue().getAsNumber()); + else if (entry.getValue().getAsJsonPrimitive().isBoolean()) + instance.putAdditionalProperty( + entry.getKey(), + entry.getValue().getAsBoolean()); + else + throw new IllegalArgumentException( + String.format( + "The field `%s` has unknown primitive" + + " type. Value: %s", + entry.getKey(), + entry.getValue().toString())); + } else if (entry.getValue().isJsonArray()) { + instance.putAdditionalProperty( + entry.getKey(), + gson.fromJson(entry.getValue(), List.class)); + } else { // JSON object + instance.putAdditionalProperty( + entry.getKey(), + gson.fromJson(entry.getValue(), HashMap.class)); + } + } + } + return instance; + } + }.nullSafe(); + } + } + + /** + * Create an instance of ChannelHistoryEventInput given an JSON string + * + * @param jsonString JSON string + * @return An instance of ChannelHistoryEventInput + * @throws IOException if the JSON string is invalid with respect to ChannelHistoryEventInput + */ + public static ChannelHistoryEventInput fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, ChannelHistoryEventInput.class); + } + + /** + * Convert an instance of ChannelHistoryEventInput to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} diff --git a/sdks/java/src/main/java/com/thoughtspot/client/model/ChannelHistoryJob.java b/sdks/java/src/main/java/com/thoughtspot/client/model/ChannelHistoryJob.java new file mode 100644 index 000000000..5a860aad0 --- /dev/null +++ b/sdks/java/src/main/java/com/thoughtspot/client/model/ChannelHistoryJob.java @@ -0,0 +1,607 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client.model; + +import com.google.gson.Gson; +import com.google.gson.JsonArray; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.TypeAdapter; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.reflect.TypeToken; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import com.thoughtspot.client.JSON; +import java.io.IOException; +import java.io.Serializable; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Objects; +import org.openapitools.jackson.nullable.JsonNullable; + +/** A single job execution record for a channel. */ +@javax.annotation.Generated( + value = "org.openapitools.codegen.languages.JavaClientCodegen", + comments = "Generator version: 7.12.0") +public class ChannelHistoryJob implements Serializable { + private static final long serialVersionUID = 1L; + + public static final String SERIALIZED_NAME_ID = "id"; + + @SerializedName(SERIALIZED_NAME_ID) + @javax.annotation.Nonnull + private String id; + + /** Delivery status of this job. */ + @JsonAdapter(StatusEnum.Adapter.class) + public enum StatusEnum { + PENDING("PENDING"), + + RETRY("RETRY"), + + SUCCESS("SUCCESS"), + + FAILED("FAILED"); + + private String value; + + StatusEnum(String value) { + this.value = value; + } + + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + public static StatusEnum fromValue(String value) { + for (StatusEnum b : StatusEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + + public static class Adapter extends TypeAdapter { + @Override + public void write(final JsonWriter jsonWriter, final StatusEnum enumeration) + throws IOException { + jsonWriter.value(enumeration.getValue()); + } + + @Override + public StatusEnum read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + return StatusEnum.fromValue(value); + } + } + + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + String value = jsonElement.getAsString(); + StatusEnum.fromValue(value); + } + } + + public static final String SERIALIZED_NAME_STATUS = "status"; + + @SerializedName(SERIALIZED_NAME_STATUS) + @javax.annotation.Nonnull + private StatusEnum status; + + public static final String SERIALIZED_NAME_CREATION_TIME_IN_MILLIS = "creation_time_in_millis"; + + @SerializedName(SERIALIZED_NAME_CREATION_TIME_IN_MILLIS) + @javax.annotation.Nonnull + private Float creationTimeInMillis; + + public static final String SERIALIZED_NAME_EVENT = "event"; + + @SerializedName(SERIALIZED_NAME_EVENT) + @javax.annotation.Nullable + private ChannelHistoryEventInfo event; + + public static final String SERIALIZED_NAME_RECIPIENTS = "recipients"; + + @SerializedName(SERIALIZED_NAME_RECIPIENTS) + @javax.annotation.Nullable + private List recipients; + + public static final String SERIALIZED_NAME_DETAIL = "detail"; + + @SerializedName(SERIALIZED_NAME_DETAIL) + @javax.annotation.Nullable + private String detail; + + public static final String SERIALIZED_NAME_TRY_COUNT = "try_count"; + + @SerializedName(SERIALIZED_NAME_TRY_COUNT) + @javax.annotation.Nullable + private Integer tryCount; + + public ChannelHistoryJob() {} + + public ChannelHistoryJob id(@javax.annotation.Nonnull String id) { + this.id = id; + return this; + } + + /** + * Unique identifier for this job. + * + * @return id + */ + @javax.annotation.Nonnull + public String getId() { + return id; + } + + public void setId(@javax.annotation.Nonnull String id) { + this.id = id; + } + + public ChannelHistoryJob status(@javax.annotation.Nonnull StatusEnum status) { + this.status = status; + return this; + } + + /** + * Delivery status of this job. + * + * @return status + */ + @javax.annotation.Nonnull + public StatusEnum getStatus() { + return status; + } + + public void setStatus(@javax.annotation.Nonnull StatusEnum status) { + this.status = status; + } + + public ChannelHistoryJob creationTimeInMillis( + @javax.annotation.Nonnull Float creationTimeInMillis) { + this.creationTimeInMillis = creationTimeInMillis; + return this; + } + + /** + * Timestamp when this job was created (epoch milliseconds). + * + * @return creationTimeInMillis + */ + @javax.annotation.Nonnull + public Float getCreationTimeInMillis() { + return creationTimeInMillis; + } + + public void setCreationTimeInMillis(@javax.annotation.Nonnull Float creationTimeInMillis) { + this.creationTimeInMillis = creationTimeInMillis; + } + + public ChannelHistoryJob event(@javax.annotation.Nullable ChannelHistoryEventInfo event) { + this.event = event; + return this; + } + + /** + * Get event + * + * @return event + */ + @javax.annotation.Nullable + public ChannelHistoryEventInfo getEvent() { + return event; + } + + public void setEvent(@javax.annotation.Nullable ChannelHistoryEventInfo event) { + this.event = event; + } + + public ChannelHistoryJob recipients(@javax.annotation.Nullable List recipients) { + this.recipients = recipients; + return this; + } + + public ChannelHistoryJob addRecipientsItem(JobRecipient recipientsItem) { + if (this.recipients == null) { + this.recipients = new ArrayList<>(); + } + this.recipients.add(recipientsItem); + return this; + } + + /** + * The users, groups or external recipients for this job. + * + * @return recipients + */ + @javax.annotation.Nullable + public List getRecipients() { + return recipients; + } + + public void setRecipients(@javax.annotation.Nullable List recipients) { + this.recipients = recipients; + } + + public ChannelHistoryJob detail(@javax.annotation.Nullable String detail) { + this.detail = detail; + return this; + } + + /** + * Additional delivery details such as HTTP response code or error message. + * + * @return detail + */ + @javax.annotation.Nullable + public String getDetail() { + return detail; + } + + public void setDetail(@javax.annotation.Nullable String detail) { + this.detail = detail; + } + + public ChannelHistoryJob tryCount(@javax.annotation.Nullable Integer tryCount) { + this.tryCount = tryCount; + return this; + } + + /** + * Number of attempts made. 1 indicates first attempt. + * + * @return tryCount + */ + @javax.annotation.Nullable + public Integer getTryCount() { + return tryCount; + } + + public void setTryCount(@javax.annotation.Nullable Integer tryCount) { + this.tryCount = tryCount; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key name of the property + * @param value value of the property + * @return the ChannelHistoryJob instance itself + */ + public ChannelHistoryJob putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return a map of objects + */ + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key name of the property + * @return an object + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ChannelHistoryJob channelHistoryJob = (ChannelHistoryJob) o; + return Objects.equals(this.id, channelHistoryJob.id) + && Objects.equals(this.status, channelHistoryJob.status) + && Objects.equals(this.creationTimeInMillis, channelHistoryJob.creationTimeInMillis) + && Objects.equals(this.event, channelHistoryJob.event) + && Objects.equals(this.recipients, channelHistoryJob.recipients) + && Objects.equals(this.detail, channelHistoryJob.detail) + && Objects.equals(this.tryCount, channelHistoryJob.tryCount) + && Objects.equals( + this.additionalProperties, channelHistoryJob.additionalProperties); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b + || (a != null + && b != null + && a.isPresent() + && b.isPresent() + && Objects.deepEquals(a.get(), b.get())); + } + + @Override + public int hashCode() { + return Objects.hash( + id, + status, + creationTimeInMillis, + event, + recipients, + detail, + tryCount, + additionalProperties); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; + } + return a.isPresent() ? Arrays.deepHashCode(new Object[] {a.get()}) : 31; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ChannelHistoryJob {\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" status: ").append(toIndentedString(status)).append("\n"); + sb.append(" creationTimeInMillis: ") + .append(toIndentedString(creationTimeInMillis)) + .append("\n"); + sb.append(" event: ").append(toIndentedString(event)).append("\n"); + sb.append(" recipients: ").append(toIndentedString(recipients)).append("\n"); + sb.append(" detail: ").append(toIndentedString(detail)).append("\n"); + sb.append(" tryCount: ").append(toIndentedString(tryCount)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first + * line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("id"); + openapiFields.add("status"); + openapiFields.add("creation_time_in_millis"); + openapiFields.add("event"); + openapiFields.add("recipients"); + openapiFields.add("detail"); + openapiFields.add("try_count"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + openapiRequiredFields.add("id"); + openapiRequiredFields.add("status"); + openapiRequiredFields.add("creation_time_in_millis"); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to ChannelHistoryJob + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!ChannelHistoryJob.openapiRequiredFields + .isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException( + String.format( + "The required field(s) %s in ChannelHistoryJob is not found in the" + + " empty JSON string", + ChannelHistoryJob.openapiRequiredFields.toString())); + } + } + + // check to make sure all required properties/fields are present in the JSON string + for (String requiredField : ChannelHistoryJob.openapiRequiredFields) { + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException( + String.format( + "The required field `%s` is not found in the JSON string: %s", + requiredField, jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if (!jsonObj.get("id").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `id` to be a primitive type in the JSON string but" + + " got `%s`", + jsonObj.get("id").toString())); + } + if (!jsonObj.get("status").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `status` to be a primitive type in the JSON string" + + " but got `%s`", + jsonObj.get("status").toString())); + } + // validate the required field `status` + StatusEnum.validateJsonElement(jsonObj.get("status")); + // validate the optional field `event` + if (jsonObj.get("event") != null && !jsonObj.get("event").isJsonNull()) { + ChannelHistoryEventInfo.validateJsonElement(jsonObj.get("event")); + } + if (jsonObj.get("recipients") != null && !jsonObj.get("recipients").isJsonNull()) { + JsonArray jsonArrayrecipients = jsonObj.getAsJsonArray("recipients"); + if (jsonArrayrecipients != null) { + // ensure the json data is an array + if (!jsonObj.get("recipients").isJsonArray()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `recipients` to be an array in the JSON" + + " string but got `%s`", + jsonObj.get("recipients").toString())); + } + + // validate the optional field `recipients` (array) + for (int i = 0; i < jsonArrayrecipients.size(); i++) { + JobRecipient.validateJsonElement(jsonArrayrecipients.get(i)); + } + ; + } + } + if ((jsonObj.get("detail") != null && !jsonObj.get("detail").isJsonNull()) + && !jsonObj.get("detail").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `detail` to be a primitive type in the JSON string" + + " but got `%s`", + jsonObj.get("detail").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!ChannelHistoryJob.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'ChannelHistoryJob' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter = + gson.getDelegateAdapter(this, TypeToken.get(ChannelHistoryJob.class)); + + return (TypeAdapter) + new TypeAdapter() { + @Override + public void write(JsonWriter out, ChannelHistoryJob value) + throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + obj.remove("additionalProperties"); + // serialize additional properties + if (value.getAdditionalProperties() != null) { + for (Map.Entry entry : + value.getAdditionalProperties().entrySet()) { + if (entry.getValue() instanceof String) + obj.addProperty(entry.getKey(), (String) entry.getValue()); + else if (entry.getValue() instanceof Number) + obj.addProperty(entry.getKey(), (Number) entry.getValue()); + else if (entry.getValue() instanceof Boolean) + obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); + else if (entry.getValue() instanceof Character) + obj.addProperty( + entry.getKey(), (Character) entry.getValue()); + else { + JsonElement jsonElement = gson.toJsonTree(entry.getValue()); + if (jsonElement.isJsonArray()) { + obj.add(entry.getKey(), jsonElement.getAsJsonArray()); + } else { + obj.add(entry.getKey(), jsonElement.getAsJsonObject()); + } + } + } + } + elementAdapter.write(out, obj); + } + + @Override + public ChannelHistoryJob read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // store additional fields in the deserialized instance + ChannelHistoryJob instance = thisAdapter.fromJsonTree(jsonObj); + for (Map.Entry entry : jsonObj.entrySet()) { + if (!openapiFields.contains(entry.getKey())) { + if (entry.getValue().isJsonPrimitive()) { // primitive type + if (entry.getValue().getAsJsonPrimitive().isString()) + instance.putAdditionalProperty( + entry.getKey(), entry.getValue().getAsString()); + else if (entry.getValue().getAsJsonPrimitive().isNumber()) + instance.putAdditionalProperty( + entry.getKey(), entry.getValue().getAsNumber()); + else if (entry.getValue().getAsJsonPrimitive().isBoolean()) + instance.putAdditionalProperty( + entry.getKey(), + entry.getValue().getAsBoolean()); + else + throw new IllegalArgumentException( + String.format( + "The field `%s` has unknown primitive" + + " type. Value: %s", + entry.getKey(), + entry.getValue().toString())); + } else if (entry.getValue().isJsonArray()) { + instance.putAdditionalProperty( + entry.getKey(), + gson.fromJson(entry.getValue(), List.class)); + } else { // JSON object + instance.putAdditionalProperty( + entry.getKey(), + gson.fromJson(entry.getValue(), HashMap.class)); + } + } + } + return instance; + } + }.nullSafe(); + } + } + + /** + * Create an instance of ChannelHistoryJob given an JSON string + * + * @param jsonString JSON string + * @return An instance of ChannelHistoryJob + * @throws IOException if the JSON string is invalid with respect to ChannelHistoryJob + */ + public static ChannelHistoryJob fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, ChannelHistoryJob.class); + } + + /** + * Convert an instance of ChannelHistoryJob to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} diff --git a/sdks/java/src/main/java/com/thoughtspot/client/model/ChannelValidationAwsS3Info.java b/sdks/java/src/main/java/com/thoughtspot/client/model/ChannelValidationAwsS3Info.java new file mode 100644 index 000000000..6a4024d2b --- /dev/null +++ b/sdks/java/src/main/java/com/thoughtspot/client/model/ChannelValidationAwsS3Info.java @@ -0,0 +1,383 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client.model; + +import com.google.gson.Gson; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.TypeAdapter; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.annotations.SerializedName; +import com.google.gson.reflect.TypeToken; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import com.thoughtspot.client.JSON; +import java.io.IOException; +import java.io.Serializable; +import java.util.Arrays; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Objects; +import org.openapitools.jackson.nullable.JsonNullable; + +/** AWS S3 storage information returned from a validation step. */ +@javax.annotation.Generated( + value = "org.openapitools.codegen.languages.JavaClientCodegen", + comments = "Generator version: 7.12.0") +public class ChannelValidationAwsS3Info implements Serializable { + private static final long serialVersionUID = 1L; + + public static final String SERIALIZED_NAME_BUCKET_NAME = "bucket_name"; + + @SerializedName(SERIALIZED_NAME_BUCKET_NAME) + @javax.annotation.Nullable + private String bucketName; + + public static final String SERIALIZED_NAME_FILE_NAME = "file_name"; + + @SerializedName(SERIALIZED_NAME_FILE_NAME) + @javax.annotation.Nullable + private String fileName; + + public static final String SERIALIZED_NAME_OBJECT_KEY = "object_key"; + + @SerializedName(SERIALIZED_NAME_OBJECT_KEY) + @javax.annotation.Nullable + private String objectKey; + + public ChannelValidationAwsS3Info() {} + + public ChannelValidationAwsS3Info bucketName(@javax.annotation.Nullable String bucketName) { + this.bucketName = bucketName; + return this; + } + + /** + * Name of the S3 bucket. + * + * @return bucketName + */ + @javax.annotation.Nullable + public String getBucketName() { + return bucketName; + } + + public void setBucketName(@javax.annotation.Nullable String bucketName) { + this.bucketName = bucketName; + } + + public ChannelValidationAwsS3Info fileName(@javax.annotation.Nullable String fileName) { + this.fileName = fileName; + return this; + } + + /** + * Name of the uploaded file. + * + * @return fileName + */ + @javax.annotation.Nullable + public String getFileName() { + return fileName; + } + + public void setFileName(@javax.annotation.Nullable String fileName) { + this.fileName = fileName; + } + + public ChannelValidationAwsS3Info objectKey(@javax.annotation.Nullable String objectKey) { + this.objectKey = objectKey; + return this; + } + + /** + * Key of the object in S3 storage. + * + * @return objectKey + */ + @javax.annotation.Nullable + public String getObjectKey() { + return objectKey; + } + + public void setObjectKey(@javax.annotation.Nullable String objectKey) { + this.objectKey = objectKey; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key name of the property + * @param value value of the property + * @return the ChannelValidationAwsS3Info instance itself + */ + public ChannelValidationAwsS3Info putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return a map of objects + */ + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key name of the property + * @return an object + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ChannelValidationAwsS3Info channelValidationAwsS3Info = (ChannelValidationAwsS3Info) o; + return Objects.equals(this.bucketName, channelValidationAwsS3Info.bucketName) + && Objects.equals(this.fileName, channelValidationAwsS3Info.fileName) + && Objects.equals(this.objectKey, channelValidationAwsS3Info.objectKey) + && Objects.equals( + this.additionalProperties, channelValidationAwsS3Info.additionalProperties); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b + || (a != null + && b != null + && a.isPresent() + && b.isPresent() + && Objects.deepEquals(a.get(), b.get())); + } + + @Override + public int hashCode() { + return Objects.hash(bucketName, fileName, objectKey, additionalProperties); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; + } + return a.isPresent() ? Arrays.deepHashCode(new Object[] {a.get()}) : 31; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ChannelValidationAwsS3Info {\n"); + sb.append(" bucketName: ").append(toIndentedString(bucketName)).append("\n"); + sb.append(" fileName: ").append(toIndentedString(fileName)).append("\n"); + sb.append(" objectKey: ").append(toIndentedString(objectKey)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first + * line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("bucket_name"); + openapiFields.add("file_name"); + openapiFields.add("object_key"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to ChannelValidationAwsS3Info + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!ChannelValidationAwsS3Info.openapiRequiredFields + .isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException( + String.format( + "The required field(s) %s in ChannelValidationAwsS3Info is not" + + " found in the empty JSON string", + ChannelValidationAwsS3Info.openapiRequiredFields.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if ((jsonObj.get("bucket_name") != null && !jsonObj.get("bucket_name").isJsonNull()) + && !jsonObj.get("bucket_name").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `bucket_name` to be a primitive type in the JSON" + + " string but got `%s`", + jsonObj.get("bucket_name").toString())); + } + if ((jsonObj.get("file_name") != null && !jsonObj.get("file_name").isJsonNull()) + && !jsonObj.get("file_name").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `file_name` to be a primitive type in the JSON" + + " string but got `%s`", + jsonObj.get("file_name").toString())); + } + if ((jsonObj.get("object_key") != null && !jsonObj.get("object_key").isJsonNull()) + && !jsonObj.get("object_key").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `object_key` to be a primitive type in the JSON" + + " string but got `%s`", + jsonObj.get("object_key").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!ChannelValidationAwsS3Info.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'ChannelValidationAwsS3Info' and its + // subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter = + gson.getDelegateAdapter(this, TypeToken.get(ChannelValidationAwsS3Info.class)); + + return (TypeAdapter) + new TypeAdapter() { + @Override + public void write(JsonWriter out, ChannelValidationAwsS3Info value) + throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + obj.remove("additionalProperties"); + // serialize additional properties + if (value.getAdditionalProperties() != null) { + for (Map.Entry entry : + value.getAdditionalProperties().entrySet()) { + if (entry.getValue() instanceof String) + obj.addProperty(entry.getKey(), (String) entry.getValue()); + else if (entry.getValue() instanceof Number) + obj.addProperty(entry.getKey(), (Number) entry.getValue()); + else if (entry.getValue() instanceof Boolean) + obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); + else if (entry.getValue() instanceof Character) + obj.addProperty( + entry.getKey(), (Character) entry.getValue()); + else { + JsonElement jsonElement = gson.toJsonTree(entry.getValue()); + if (jsonElement.isJsonArray()) { + obj.add(entry.getKey(), jsonElement.getAsJsonArray()); + } else { + obj.add(entry.getKey(), jsonElement.getAsJsonObject()); + } + } + } + } + elementAdapter.write(out, obj); + } + + @Override + public ChannelValidationAwsS3Info read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // store additional fields in the deserialized instance + ChannelValidationAwsS3Info instance = thisAdapter.fromJsonTree(jsonObj); + for (Map.Entry entry : jsonObj.entrySet()) { + if (!openapiFields.contains(entry.getKey())) { + if (entry.getValue().isJsonPrimitive()) { // primitive type + if (entry.getValue().getAsJsonPrimitive().isString()) + instance.putAdditionalProperty( + entry.getKey(), entry.getValue().getAsString()); + else if (entry.getValue().getAsJsonPrimitive().isNumber()) + instance.putAdditionalProperty( + entry.getKey(), entry.getValue().getAsNumber()); + else if (entry.getValue().getAsJsonPrimitive().isBoolean()) + instance.putAdditionalProperty( + entry.getKey(), + entry.getValue().getAsBoolean()); + else + throw new IllegalArgumentException( + String.format( + "The field `%s` has unknown primitive" + + " type. Value: %s", + entry.getKey(), + entry.getValue().toString())); + } else if (entry.getValue().isJsonArray()) { + instance.putAdditionalProperty( + entry.getKey(), + gson.fromJson(entry.getValue(), List.class)); + } else { // JSON object + instance.putAdditionalProperty( + entry.getKey(), + gson.fromJson(entry.getValue(), HashMap.class)); + } + } + } + return instance; + } + }.nullSafe(); + } + } + + /** + * Create an instance of ChannelValidationAwsS3Info given an JSON string + * + * @param jsonString JSON string + * @return An instance of ChannelValidationAwsS3Info + * @throws IOException if the JSON string is invalid with respect to ChannelValidationAwsS3Info + */ + public static ChannelValidationAwsS3Info fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, ChannelValidationAwsS3Info.class); + } + + /** + * Convert an instance of ChannelValidationAwsS3Info to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} diff --git a/sdks/java/src/main/java/com/thoughtspot/client/model/ChannelValidationDetail.java b/sdks/java/src/main/java/com/thoughtspot/client/model/ChannelValidationDetail.java new file mode 100644 index 000000000..5d9c5508e --- /dev/null +++ b/sdks/java/src/main/java/com/thoughtspot/client/model/ChannelValidationDetail.java @@ -0,0 +1,563 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client.model; + +import com.google.gson.Gson; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.TypeAdapter; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.reflect.TypeToken; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import com.thoughtspot.client.JSON; +import java.io.IOException; +import java.io.Serializable; +import java.util.Arrays; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Objects; +import org.openapitools.jackson.nullable.JsonNullable; + +/** Validation detail result for a sub-step. */ +@javax.annotation.Generated( + value = "org.openapitools.codegen.languages.JavaClientCodegen", + comments = "Generator version: 7.12.0") +public class ChannelValidationDetail implements Serializable { + private static final long serialVersionUID = 1L; + + /** The validation step that was performed. */ + @JsonAdapter(ValidationStepEnum.Adapter.class) + public enum ValidationStepEnum { + HTTP_CONNECTION_CHECK("HTTP_CONNECTION_CHECK"), + + STORAGE_FILE_UPLOAD_CHECK("STORAGE_FILE_UPLOAD_CHECK"); + + private String value; + + ValidationStepEnum(String value) { + this.value = value; + } + + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + public static ValidationStepEnum fromValue(String value) { + for (ValidationStepEnum b : ValidationStepEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + + public static class Adapter extends TypeAdapter { + @Override + public void write(final JsonWriter jsonWriter, final ValidationStepEnum enumeration) + throws IOException { + jsonWriter.value(enumeration.getValue()); + } + + @Override + public ValidationStepEnum read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + return ValidationStepEnum.fromValue(value); + } + } + + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + String value = jsonElement.getAsString(); + ValidationStepEnum.fromValue(value); + } + } + + public static final String SERIALIZED_NAME_VALIDATION_STEP = "validation_step"; + + @SerializedName(SERIALIZED_NAME_VALIDATION_STEP) + @javax.annotation.Nonnull + private ValidationStepEnum validationStep; + + /** Status of this validation step. */ + @JsonAdapter(StatusEnum.Adapter.class) + public enum StatusEnum { + SUCCESS("SUCCESS"), + + FAILED("FAILED"); + + private String value; + + StatusEnum(String value) { + this.value = value; + } + + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + public static StatusEnum fromValue(String value) { + for (StatusEnum b : StatusEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + + public static class Adapter extends TypeAdapter { + @Override + public void write(final JsonWriter jsonWriter, final StatusEnum enumeration) + throws IOException { + jsonWriter.value(enumeration.getValue()); + } + + @Override + public StatusEnum read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + return StatusEnum.fromValue(value); + } + } + + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + String value = jsonElement.getAsString(); + StatusEnum.fromValue(value); + } + } + + public static final String SERIALIZED_NAME_STATUS = "status"; + + @SerializedName(SERIALIZED_NAME_STATUS) + @javax.annotation.Nonnull + private StatusEnum status; + + public static final String SERIALIZED_NAME_HTTP_STATUS = "http_status"; + + @SerializedName(SERIALIZED_NAME_HTTP_STATUS) + @javax.annotation.Nullable + private Integer httpStatus; + + public static final String SERIALIZED_NAME_ERROR_MESSAGE = "error_message"; + + @SerializedName(SERIALIZED_NAME_ERROR_MESSAGE) + @javax.annotation.Nullable + private String errorMessage; + + public static final String SERIALIZED_NAME_AWS_S3_INFO = "aws_s3_info"; + + @SerializedName(SERIALIZED_NAME_AWS_S3_INFO) + @javax.annotation.Nullable + private ChannelValidationAwsS3Info awsS3Info; + + public ChannelValidationDetail() {} + + public ChannelValidationDetail validationStep( + @javax.annotation.Nonnull ValidationStepEnum validationStep) { + this.validationStep = validationStep; + return this; + } + + /** + * The validation step that was performed. + * + * @return validationStep + */ + @javax.annotation.Nonnull + public ValidationStepEnum getValidationStep() { + return validationStep; + } + + public void setValidationStep(@javax.annotation.Nonnull ValidationStepEnum validationStep) { + this.validationStep = validationStep; + } + + public ChannelValidationDetail status(@javax.annotation.Nonnull StatusEnum status) { + this.status = status; + return this; + } + + /** + * Status of this validation step. + * + * @return status + */ + @javax.annotation.Nonnull + public StatusEnum getStatus() { + return status; + } + + public void setStatus(@javax.annotation.Nonnull StatusEnum status) { + this.status = status; + } + + public ChannelValidationDetail httpStatus(@javax.annotation.Nullable Integer httpStatus) { + this.httpStatus = httpStatus; + return this; + } + + /** + * HTTP status code returned by the channel (if applicable). + * + * @return httpStatus + */ + @javax.annotation.Nullable + public Integer getHttpStatus() { + return httpStatus; + } + + public void setHttpStatus(@javax.annotation.Nullable Integer httpStatus) { + this.httpStatus = httpStatus; + } + + public ChannelValidationDetail errorMessage(@javax.annotation.Nullable String errorMessage) { + this.errorMessage = errorMessage; + return this; + } + + /** + * Error message from the channel or validation process. + * + * @return errorMessage + */ + @javax.annotation.Nullable + public String getErrorMessage() { + return errorMessage; + } + + public void setErrorMessage(@javax.annotation.Nullable String errorMessage) { + this.errorMessage = errorMessage; + } + + public ChannelValidationDetail awsS3Info( + @javax.annotation.Nullable ChannelValidationAwsS3Info awsS3Info) { + this.awsS3Info = awsS3Info; + return this; + } + + /** + * Get awsS3Info + * + * @return awsS3Info + */ + @javax.annotation.Nullable + public ChannelValidationAwsS3Info getAwsS3Info() { + return awsS3Info; + } + + public void setAwsS3Info(@javax.annotation.Nullable ChannelValidationAwsS3Info awsS3Info) { + this.awsS3Info = awsS3Info; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key name of the property + * @param value value of the property + * @return the ChannelValidationDetail instance itself + */ + public ChannelValidationDetail putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return a map of objects + */ + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key name of the property + * @return an object + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ChannelValidationDetail channelValidationDetail = (ChannelValidationDetail) o; + return Objects.equals(this.validationStep, channelValidationDetail.validationStep) + && Objects.equals(this.status, channelValidationDetail.status) + && Objects.equals(this.httpStatus, channelValidationDetail.httpStatus) + && Objects.equals(this.errorMessage, channelValidationDetail.errorMessage) + && Objects.equals(this.awsS3Info, channelValidationDetail.awsS3Info) + && Objects.equals( + this.additionalProperties, channelValidationDetail.additionalProperties); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b + || (a != null + && b != null + && a.isPresent() + && b.isPresent() + && Objects.deepEquals(a.get(), b.get())); + } + + @Override + public int hashCode() { + return Objects.hash( + validationStep, status, httpStatus, errorMessage, awsS3Info, additionalProperties); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; + } + return a.isPresent() ? Arrays.deepHashCode(new Object[] {a.get()}) : 31; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ChannelValidationDetail {\n"); + sb.append(" validationStep: ").append(toIndentedString(validationStep)).append("\n"); + sb.append(" status: ").append(toIndentedString(status)).append("\n"); + sb.append(" httpStatus: ").append(toIndentedString(httpStatus)).append("\n"); + sb.append(" errorMessage: ").append(toIndentedString(errorMessage)).append("\n"); + sb.append(" awsS3Info: ").append(toIndentedString(awsS3Info)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first + * line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("validation_step"); + openapiFields.add("status"); + openapiFields.add("http_status"); + openapiFields.add("error_message"); + openapiFields.add("aws_s3_info"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + openapiRequiredFields.add("validation_step"); + openapiRequiredFields.add("status"); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to ChannelValidationDetail + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!ChannelValidationDetail.openapiRequiredFields + .isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException( + String.format( + "The required field(s) %s in ChannelValidationDetail is not found" + + " in the empty JSON string", + ChannelValidationDetail.openapiRequiredFields.toString())); + } + } + + // check to make sure all required properties/fields are present in the JSON string + for (String requiredField : ChannelValidationDetail.openapiRequiredFields) { + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException( + String.format( + "The required field `%s` is not found in the JSON string: %s", + requiredField, jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if (!jsonObj.get("validation_step").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `validation_step` to be a primitive type in the" + + " JSON string but got `%s`", + jsonObj.get("validation_step").toString())); + } + // validate the required field `validation_step` + ValidationStepEnum.validateJsonElement(jsonObj.get("validation_step")); + if (!jsonObj.get("status").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `status` to be a primitive type in the JSON string" + + " but got `%s`", + jsonObj.get("status").toString())); + } + // validate the required field `status` + StatusEnum.validateJsonElement(jsonObj.get("status")); + if ((jsonObj.get("error_message") != null && !jsonObj.get("error_message").isJsonNull()) + && !jsonObj.get("error_message").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `error_message` to be a primitive type in the JSON" + + " string but got `%s`", + jsonObj.get("error_message").toString())); + } + // validate the optional field `aws_s3_info` + if (jsonObj.get("aws_s3_info") != null && !jsonObj.get("aws_s3_info").isJsonNull()) { + ChannelValidationAwsS3Info.validateJsonElement(jsonObj.get("aws_s3_info")); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!ChannelValidationDetail.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'ChannelValidationDetail' and its + // subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter = + gson.getDelegateAdapter(this, TypeToken.get(ChannelValidationDetail.class)); + + return (TypeAdapter) + new TypeAdapter() { + @Override + public void write(JsonWriter out, ChannelValidationDetail value) + throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + obj.remove("additionalProperties"); + // serialize additional properties + if (value.getAdditionalProperties() != null) { + for (Map.Entry entry : + value.getAdditionalProperties().entrySet()) { + if (entry.getValue() instanceof String) + obj.addProperty(entry.getKey(), (String) entry.getValue()); + else if (entry.getValue() instanceof Number) + obj.addProperty(entry.getKey(), (Number) entry.getValue()); + else if (entry.getValue() instanceof Boolean) + obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); + else if (entry.getValue() instanceof Character) + obj.addProperty( + entry.getKey(), (Character) entry.getValue()); + else { + JsonElement jsonElement = gson.toJsonTree(entry.getValue()); + if (jsonElement.isJsonArray()) { + obj.add(entry.getKey(), jsonElement.getAsJsonArray()); + } else { + obj.add(entry.getKey(), jsonElement.getAsJsonObject()); + } + } + } + } + elementAdapter.write(out, obj); + } + + @Override + public ChannelValidationDetail read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // store additional fields in the deserialized instance + ChannelValidationDetail instance = thisAdapter.fromJsonTree(jsonObj); + for (Map.Entry entry : jsonObj.entrySet()) { + if (!openapiFields.contains(entry.getKey())) { + if (entry.getValue().isJsonPrimitive()) { // primitive type + if (entry.getValue().getAsJsonPrimitive().isString()) + instance.putAdditionalProperty( + entry.getKey(), entry.getValue().getAsString()); + else if (entry.getValue().getAsJsonPrimitive().isNumber()) + instance.putAdditionalProperty( + entry.getKey(), entry.getValue().getAsNumber()); + else if (entry.getValue().getAsJsonPrimitive().isBoolean()) + instance.putAdditionalProperty( + entry.getKey(), + entry.getValue().getAsBoolean()); + else + throw new IllegalArgumentException( + String.format( + "The field `%s` has unknown primitive" + + " type. Value: %s", + entry.getKey(), + entry.getValue().toString())); + } else if (entry.getValue().isJsonArray()) { + instance.putAdditionalProperty( + entry.getKey(), + gson.fromJson(entry.getValue(), List.class)); + } else { // JSON object + instance.putAdditionalProperty( + entry.getKey(), + gson.fromJson(entry.getValue(), HashMap.class)); + } + } + } + return instance; + } + }.nullSafe(); + } + } + + /** + * Create an instance of ChannelValidationDetail given an JSON string + * + * @param jsonString JSON string + * @return An instance of ChannelValidationDetail + * @throws IOException if the JSON string is invalid with respect to ChannelValidationDetail + */ + public static ChannelValidationDetail fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, ChannelValidationDetail.class); + } + + /** + * Convert an instance of ChannelValidationDetail to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} diff --git a/sdks/java/src/main/java/com/thoughtspot/client/model/ClusterNonEmbedAccess.java b/sdks/java/src/main/java/com/thoughtspot/client/model/ClusterNonEmbedAccess.java new file mode 100644 index 000000000..47457b541 --- /dev/null +++ b/sdks/java/src/main/java/com/thoughtspot/client/model/ClusterNonEmbedAccess.java @@ -0,0 +1,365 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client.model; + +import com.google.gson.Gson; +import com.google.gson.JsonArray; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.TypeAdapter; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.annotations.SerializedName; +import com.google.gson.reflect.TypeToken; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import com.thoughtspot.client.JSON; +import java.io.IOException; +import java.io.Serializable; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Objects; +import org.openapitools.jackson.nullable.JsonNullable; + +/** Cluster-level non-embed access configuration. */ +@javax.annotation.Generated( + value = "org.openapitools.codegen.languages.JavaClientCodegen", + comments = "Generator version: 7.12.0") +public class ClusterNonEmbedAccess implements Serializable { + private static final long serialVersionUID = 1L; + + public static final String SERIALIZED_NAME_BLOCK_FULL_APP_ACCESS = "block_full_app_access"; + + @SerializedName(SERIALIZED_NAME_BLOCK_FULL_APP_ACCESS) + @javax.annotation.Nullable + private Boolean blockFullAppAccess; + + public static final String SERIALIZED_NAME_GROUPS_WITH_ACCESS = "groups_with_access"; + + @SerializedName(SERIALIZED_NAME_GROUPS_WITH_ACCESS) + @javax.annotation.Nullable + private List groupsWithAccess; + + public ClusterNonEmbedAccess() {} + + public ClusterNonEmbedAccess blockFullAppAccess( + @javax.annotation.Nullable Boolean blockFullAppAccess) { + this.blockFullAppAccess = blockFullAppAccess; + return this; + } + + /** + * Block full application access for non-embedded usage. + * + * @return blockFullAppAccess + */ + @javax.annotation.Nullable + public Boolean getBlockFullAppAccess() { + return blockFullAppAccess; + } + + public void setBlockFullAppAccess(@javax.annotation.Nullable Boolean blockFullAppAccess) { + this.blockFullAppAccess = blockFullAppAccess; + } + + public ClusterNonEmbedAccess groupsWithAccess( + @javax.annotation.Nullable List groupsWithAccess) { + this.groupsWithAccess = groupsWithAccess; + return this; + } + + public ClusterNonEmbedAccess addGroupsWithAccessItem(GroupInfo groupsWithAccessItem) { + if (this.groupsWithAccess == null) { + this.groupsWithAccess = new ArrayList<>(); + } + this.groupsWithAccess.add(groupsWithAccessItem); + return this; + } + + /** + * Groups that have non-embed full app access. Only applicable when orgs feature is disabled. + * Use org_preferences when org feature is enabled. + * + * @return groupsWithAccess + */ + @javax.annotation.Nullable + public List getGroupsWithAccess() { + return groupsWithAccess; + } + + public void setGroupsWithAccess(@javax.annotation.Nullable List groupsWithAccess) { + this.groupsWithAccess = groupsWithAccess; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key name of the property + * @param value value of the property + * @return the ClusterNonEmbedAccess instance itself + */ + public ClusterNonEmbedAccess putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return a map of objects + */ + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key name of the property + * @return an object + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ClusterNonEmbedAccess clusterNonEmbedAccess = (ClusterNonEmbedAccess) o; + return Objects.equals(this.blockFullAppAccess, clusterNonEmbedAccess.blockFullAppAccess) + && Objects.equals(this.groupsWithAccess, clusterNonEmbedAccess.groupsWithAccess) + && Objects.equals( + this.additionalProperties, clusterNonEmbedAccess.additionalProperties); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b + || (a != null + && b != null + && a.isPresent() + && b.isPresent() + && Objects.deepEquals(a.get(), b.get())); + } + + @Override + public int hashCode() { + return Objects.hash(blockFullAppAccess, groupsWithAccess, additionalProperties); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; + } + return a.isPresent() ? Arrays.deepHashCode(new Object[] {a.get()}) : 31; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ClusterNonEmbedAccess {\n"); + sb.append(" blockFullAppAccess: ") + .append(toIndentedString(blockFullAppAccess)) + .append("\n"); + sb.append(" groupsWithAccess: ").append(toIndentedString(groupsWithAccess)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first + * line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("block_full_app_access"); + openapiFields.add("groups_with_access"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to ClusterNonEmbedAccess + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!ClusterNonEmbedAccess.openapiRequiredFields + .isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException( + String.format( + "The required field(s) %s in ClusterNonEmbedAccess is not found in" + + " the empty JSON string", + ClusterNonEmbedAccess.openapiRequiredFields.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if (jsonObj.get("groups_with_access") != null + && !jsonObj.get("groups_with_access").isJsonNull()) { + JsonArray jsonArraygroupsWithAccess = jsonObj.getAsJsonArray("groups_with_access"); + if (jsonArraygroupsWithAccess != null) { + // ensure the json data is an array + if (!jsonObj.get("groups_with_access").isJsonArray()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `groups_with_access` to be an array in the" + + " JSON string but got `%s`", + jsonObj.get("groups_with_access").toString())); + } + + // validate the optional field `groups_with_access` (array) + for (int i = 0; i < jsonArraygroupsWithAccess.size(); i++) { + GroupInfo.validateJsonElement(jsonArraygroupsWithAccess.get(i)); + } + ; + } + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!ClusterNonEmbedAccess.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'ClusterNonEmbedAccess' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter = + gson.getDelegateAdapter(this, TypeToken.get(ClusterNonEmbedAccess.class)); + + return (TypeAdapter) + new TypeAdapter() { + @Override + public void write(JsonWriter out, ClusterNonEmbedAccess value) + throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + obj.remove("additionalProperties"); + // serialize additional properties + if (value.getAdditionalProperties() != null) { + for (Map.Entry entry : + value.getAdditionalProperties().entrySet()) { + if (entry.getValue() instanceof String) + obj.addProperty(entry.getKey(), (String) entry.getValue()); + else if (entry.getValue() instanceof Number) + obj.addProperty(entry.getKey(), (Number) entry.getValue()); + else if (entry.getValue() instanceof Boolean) + obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); + else if (entry.getValue() instanceof Character) + obj.addProperty( + entry.getKey(), (Character) entry.getValue()); + else { + JsonElement jsonElement = gson.toJsonTree(entry.getValue()); + if (jsonElement.isJsonArray()) { + obj.add(entry.getKey(), jsonElement.getAsJsonArray()); + } else { + obj.add(entry.getKey(), jsonElement.getAsJsonObject()); + } + } + } + } + elementAdapter.write(out, obj); + } + + @Override + public ClusterNonEmbedAccess read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // store additional fields in the deserialized instance + ClusterNonEmbedAccess instance = thisAdapter.fromJsonTree(jsonObj); + for (Map.Entry entry : jsonObj.entrySet()) { + if (!openapiFields.contains(entry.getKey())) { + if (entry.getValue().isJsonPrimitive()) { // primitive type + if (entry.getValue().getAsJsonPrimitive().isString()) + instance.putAdditionalProperty( + entry.getKey(), entry.getValue().getAsString()); + else if (entry.getValue().getAsJsonPrimitive().isNumber()) + instance.putAdditionalProperty( + entry.getKey(), entry.getValue().getAsNumber()); + else if (entry.getValue().getAsJsonPrimitive().isBoolean()) + instance.putAdditionalProperty( + entry.getKey(), + entry.getValue().getAsBoolean()); + else + throw new IllegalArgumentException( + String.format( + "The field `%s` has unknown primitive" + + " type. Value: %s", + entry.getKey(), + entry.getValue().toString())); + } else if (entry.getValue().isJsonArray()) { + instance.putAdditionalProperty( + entry.getKey(), + gson.fromJson(entry.getValue(), List.class)); + } else { // JSON object + instance.putAdditionalProperty( + entry.getKey(), + gson.fromJson(entry.getValue(), HashMap.class)); + } + } + } + return instance; + } + }.nullSafe(); + } + } + + /** + * Create an instance of ClusterNonEmbedAccess given an JSON string + * + * @param jsonString JSON string + * @return An instance of ClusterNonEmbedAccess + * @throws IOException if the JSON string is invalid with respect to ClusterNonEmbedAccess + */ + public static ClusterNonEmbedAccess fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, ClusterNonEmbedAccess.class); + } + + /** + * Convert an instance of ClusterNonEmbedAccess to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} diff --git a/sdks/java/src/main/java/com/thoughtspot/client/model/ClusterNonEmbedAccessInput.java b/sdks/java/src/main/java/com/thoughtspot/client/model/ClusterNonEmbedAccessInput.java new file mode 100644 index 000000000..0c8056c79 --- /dev/null +++ b/sdks/java/src/main/java/com/thoughtspot/client/model/ClusterNonEmbedAccessInput.java @@ -0,0 +1,363 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client.model; + +import com.google.gson.Gson; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.TypeAdapter; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.annotations.SerializedName; +import com.google.gson.reflect.TypeToken; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import com.thoughtspot.client.JSON; +import java.io.IOException; +import java.io.Serializable; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Objects; +import org.openapitools.jackson.nullable.JsonNullable; + +/** Input for cluster-level non-embed access configuration. */ +@javax.annotation.Generated( + value = "org.openapitools.codegen.languages.JavaClientCodegen", + comments = "Generator version: 7.12.0") +public class ClusterNonEmbedAccessInput implements Serializable { + private static final long serialVersionUID = 1L; + + public static final String SERIALIZED_NAME_BLOCK_FULL_APP_ACCESS = "block_full_app_access"; + + @SerializedName(SERIALIZED_NAME_BLOCK_FULL_APP_ACCESS) + @javax.annotation.Nullable + private Boolean blockFullAppAccess; + + public static final String SERIALIZED_NAME_GROUPS_IDENTIFIERS_WITH_ACCESS = + "groups_identifiers_with_access"; + + @SerializedName(SERIALIZED_NAME_GROUPS_IDENTIFIERS_WITH_ACCESS) + @javax.annotation.Nullable + private List groupsIdentifiersWithAccess; + + public ClusterNonEmbedAccessInput() {} + + public ClusterNonEmbedAccessInput blockFullAppAccess( + @javax.annotation.Nullable Boolean blockFullAppAccess) { + this.blockFullAppAccess = blockFullAppAccess; + return this; + } + + /** + * Block full application access for non-embedded usage. + * + * @return blockFullAppAccess + */ + @javax.annotation.Nullable + public Boolean getBlockFullAppAccess() { + return blockFullAppAccess; + } + + public void setBlockFullAppAccess(@javax.annotation.Nullable Boolean blockFullAppAccess) { + this.blockFullAppAccess = blockFullAppAccess; + } + + public ClusterNonEmbedAccessInput groupsIdentifiersWithAccess( + @javax.annotation.Nullable List groupsIdentifiersWithAccess) { + this.groupsIdentifiersWithAccess = groupsIdentifiersWithAccess; + return this; + } + + public ClusterNonEmbedAccessInput addGroupsIdentifiersWithAccessItem( + String groupsIdentifiersWithAccessItem) { + if (this.groupsIdentifiersWithAccess == null) { + this.groupsIdentifiersWithAccess = new ArrayList<>(); + } + this.groupsIdentifiersWithAccess.add(groupsIdentifiersWithAccessItem); + return this; + } + + /** + * Group identifiers that are allowed non-embed full app access. Can only be set when orgs + * feature is disabled and block_full_app_access is true. + * + * @return groupsIdentifiersWithAccess + */ + @javax.annotation.Nullable + public List getGroupsIdentifiersWithAccess() { + return groupsIdentifiersWithAccess; + } + + public void setGroupsIdentifiersWithAccess( + @javax.annotation.Nullable List groupsIdentifiersWithAccess) { + this.groupsIdentifiersWithAccess = groupsIdentifiersWithAccess; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key name of the property + * @param value value of the property + * @return the ClusterNonEmbedAccessInput instance itself + */ + public ClusterNonEmbedAccessInput putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return a map of objects + */ + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key name of the property + * @return an object + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ClusterNonEmbedAccessInput clusterNonEmbedAccessInput = (ClusterNonEmbedAccessInput) o; + return Objects.equals( + this.blockFullAppAccess, clusterNonEmbedAccessInput.blockFullAppAccess) + && Objects.equals( + this.groupsIdentifiersWithAccess, + clusterNonEmbedAccessInput.groupsIdentifiersWithAccess) + && Objects.equals( + this.additionalProperties, clusterNonEmbedAccessInput.additionalProperties); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b + || (a != null + && b != null + && a.isPresent() + && b.isPresent() + && Objects.deepEquals(a.get(), b.get())); + } + + @Override + public int hashCode() { + return Objects.hash(blockFullAppAccess, groupsIdentifiersWithAccess, additionalProperties); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; + } + return a.isPresent() ? Arrays.deepHashCode(new Object[] {a.get()}) : 31; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ClusterNonEmbedAccessInput {\n"); + sb.append(" blockFullAppAccess: ") + .append(toIndentedString(blockFullAppAccess)) + .append("\n"); + sb.append(" groupsIdentifiersWithAccess: ") + .append(toIndentedString(groupsIdentifiersWithAccess)) + .append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first + * line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("block_full_app_access"); + openapiFields.add("groups_identifiers_with_access"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to ClusterNonEmbedAccessInput + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!ClusterNonEmbedAccessInput.openapiRequiredFields + .isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException( + String.format( + "The required field(s) %s in ClusterNonEmbedAccessInput is not" + + " found in the empty JSON string", + ClusterNonEmbedAccessInput.openapiRequiredFields.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // ensure the optional json data is an array if present + if (jsonObj.get("groups_identifiers_with_access") != null + && !jsonObj.get("groups_identifiers_with_access").isJsonNull() + && !jsonObj.get("groups_identifiers_with_access").isJsonArray()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `groups_identifiers_with_access` to be an array in" + + " the JSON string but got `%s`", + jsonObj.get("groups_identifiers_with_access").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!ClusterNonEmbedAccessInput.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'ClusterNonEmbedAccessInput' and its + // subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter = + gson.getDelegateAdapter(this, TypeToken.get(ClusterNonEmbedAccessInput.class)); + + return (TypeAdapter) + new TypeAdapter() { + @Override + public void write(JsonWriter out, ClusterNonEmbedAccessInput value) + throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + obj.remove("additionalProperties"); + // serialize additional properties + if (value.getAdditionalProperties() != null) { + for (Map.Entry entry : + value.getAdditionalProperties().entrySet()) { + if (entry.getValue() instanceof String) + obj.addProperty(entry.getKey(), (String) entry.getValue()); + else if (entry.getValue() instanceof Number) + obj.addProperty(entry.getKey(), (Number) entry.getValue()); + else if (entry.getValue() instanceof Boolean) + obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); + else if (entry.getValue() instanceof Character) + obj.addProperty( + entry.getKey(), (Character) entry.getValue()); + else { + JsonElement jsonElement = gson.toJsonTree(entry.getValue()); + if (jsonElement.isJsonArray()) { + obj.add(entry.getKey(), jsonElement.getAsJsonArray()); + } else { + obj.add(entry.getKey(), jsonElement.getAsJsonObject()); + } + } + } + } + elementAdapter.write(out, obj); + } + + @Override + public ClusterNonEmbedAccessInput read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // store additional fields in the deserialized instance + ClusterNonEmbedAccessInput instance = thisAdapter.fromJsonTree(jsonObj); + for (Map.Entry entry : jsonObj.entrySet()) { + if (!openapiFields.contains(entry.getKey())) { + if (entry.getValue().isJsonPrimitive()) { // primitive type + if (entry.getValue().getAsJsonPrimitive().isString()) + instance.putAdditionalProperty( + entry.getKey(), entry.getValue().getAsString()); + else if (entry.getValue().getAsJsonPrimitive().isNumber()) + instance.putAdditionalProperty( + entry.getKey(), entry.getValue().getAsNumber()); + else if (entry.getValue().getAsJsonPrimitive().isBoolean()) + instance.putAdditionalProperty( + entry.getKey(), + entry.getValue().getAsBoolean()); + else + throw new IllegalArgumentException( + String.format( + "The field `%s` has unknown primitive" + + " type. Value: %s", + entry.getKey(), + entry.getValue().toString())); + } else if (entry.getValue().isJsonArray()) { + instance.putAdditionalProperty( + entry.getKey(), + gson.fromJson(entry.getValue(), List.class)); + } else { // JSON object + instance.putAdditionalProperty( + entry.getKey(), + gson.fromJson(entry.getValue(), HashMap.class)); + } + } + } + return instance; + } + }.nullSafe(); + } + } + + /** + * Create an instance of ClusterNonEmbedAccessInput given an JSON string + * + * @param jsonString JSON string + * @return An instance of ClusterNonEmbedAccessInput + * @throws IOException if the JSON string is invalid with respect to ClusterNonEmbedAccessInput + */ + public static ClusterNonEmbedAccessInput fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, ClusterNonEmbedAccessInput.class); + } + + /** + * Convert an instance of ClusterNonEmbedAccessInput to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} diff --git a/sdks/java/src/main/java/com/thoughtspot/client/model/Collection.java b/sdks/java/src/main/java/com/thoughtspot/client/model/Collection.java new file mode 100644 index 000000000..df0bc030d --- /dev/null +++ b/sdks/java/src/main/java/com/thoughtspot/client/model/Collection.java @@ -0,0 +1,633 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client.model; + +import com.google.gson.Gson; +import com.google.gson.JsonArray; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.TypeAdapter; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.annotations.SerializedName; +import com.google.gson.reflect.TypeToken; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import com.thoughtspot.client.JSON; +import java.io.IOException; +import java.io.Serializable; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Objects; +import org.openapitools.jackson.nullable.JsonNullable; + +/** Response object for a collection. */ +@javax.annotation.Generated( + value = "org.openapitools.codegen.languages.JavaClientCodegen", + comments = "Generator version: 7.12.0") +public class Collection implements Serializable { + private static final long serialVersionUID = 1L; + + public static final String SERIALIZED_NAME_ID = "id"; + + @SerializedName(SERIALIZED_NAME_ID) + @javax.annotation.Nonnull + private String id; + + public static final String SERIALIZED_NAME_NAME = "name"; + + @SerializedName(SERIALIZED_NAME_NAME) + @javax.annotation.Nonnull + private String name; + + public static final String SERIALIZED_NAME_DESCRIPTION = "description"; + + @SerializedName(SERIALIZED_NAME_DESCRIPTION) + @javax.annotation.Nullable + private String description; + + public static final String SERIALIZED_NAME_METADATA = "metadata"; + + @SerializedName(SERIALIZED_NAME_METADATA) + @javax.annotation.Nullable + private List metadata; + + public static final String SERIALIZED_NAME_CREATED_AT = "created_at"; + + @SerializedName(SERIALIZED_NAME_CREATED_AT) + @javax.annotation.Nullable + private String createdAt; + + public static final String SERIALIZED_NAME_UPDATED_AT = "updated_at"; + + @SerializedName(SERIALIZED_NAME_UPDATED_AT) + @javax.annotation.Nullable + private String updatedAt; + + public static final String SERIALIZED_NAME_AUTHOR_NAME = "author_name"; + + @SerializedName(SERIALIZED_NAME_AUTHOR_NAME) + @javax.annotation.Nullable + private String authorName; + + public static final String SERIALIZED_NAME_AUTHOR_ID = "author_id"; + + @SerializedName(SERIALIZED_NAME_AUTHOR_ID) + @javax.annotation.Nullable + private String authorId; + + public static final String SERIALIZED_NAME_ORG = "org"; + + @SerializedName(SERIALIZED_NAME_ORG) + @javax.annotation.Nullable + private CollectionEntityIdentifier org; + + public Collection() {} + + public Collection id(@javax.annotation.Nonnull String id) { + this.id = id; + return this; + } + + /** + * Unique identifier of the collection. + * + * @return id + */ + @javax.annotation.Nonnull + public String getId() { + return id; + } + + public void setId(@javax.annotation.Nonnull String id) { + this.id = id; + } + + public Collection name(@javax.annotation.Nonnull String name) { + this.name = name; + return this; + } + + /** + * Name of the collection. + * + * @return name + */ + @javax.annotation.Nonnull + public String getName() { + return name; + } + + public void setName(@javax.annotation.Nonnull String name) { + this.name = name; + } + + public Collection description(@javax.annotation.Nullable String description) { + this.description = description; + return this; + } + + /** + * Description of the collection. + * + * @return description + */ + @javax.annotation.Nullable + public String getDescription() { + return description; + } + + public void setDescription(@javax.annotation.Nullable String description) { + this.description = description; + } + + public Collection metadata(@javax.annotation.Nullable List metadata) { + this.metadata = metadata; + return this; + } + + public Collection addMetadataItem(CollectionMetadataItem metadataItem) { + if (this.metadata == null) { + this.metadata = new ArrayList<>(); + } + this.metadata.add(metadataItem); + return this; + } + + /** + * Metadata objects in the collection. + * + * @return metadata + */ + @javax.annotation.Nullable + public List getMetadata() { + return metadata; + } + + public void setMetadata(@javax.annotation.Nullable List metadata) { + this.metadata = metadata; + } + + public Collection createdAt(@javax.annotation.Nullable String createdAt) { + this.createdAt = createdAt; + return this; + } + + /** + * Creation timestamp in milliseconds. + * + * @return createdAt + */ + @javax.annotation.Nullable + public String getCreatedAt() { + return createdAt; + } + + public void setCreatedAt(@javax.annotation.Nullable String createdAt) { + this.createdAt = createdAt; + } + + public Collection updatedAt(@javax.annotation.Nullable String updatedAt) { + this.updatedAt = updatedAt; + return this; + } + + /** + * Last updated timestamp in milliseconds. + * + * @return updatedAt + */ + @javax.annotation.Nullable + public String getUpdatedAt() { + return updatedAt; + } + + public void setUpdatedAt(@javax.annotation.Nullable String updatedAt) { + this.updatedAt = updatedAt; + } + + public Collection authorName(@javax.annotation.Nullable String authorName) { + this.authorName = authorName; + return this; + } + + /** + * Name of the author who created the collection. + * + * @return authorName + */ + @javax.annotation.Nullable + public String getAuthorName() { + return authorName; + } + + public void setAuthorName(@javax.annotation.Nullable String authorName) { + this.authorName = authorName; + } + + public Collection authorId(@javax.annotation.Nullable String authorId) { + this.authorId = authorId; + return this; + } + + /** + * Unique identifier of the author. + * + * @return authorId + */ + @javax.annotation.Nullable + public String getAuthorId() { + return authorId; + } + + public void setAuthorId(@javax.annotation.Nullable String authorId) { + this.authorId = authorId; + } + + public Collection org(@javax.annotation.Nullable CollectionEntityIdentifier org) { + this.org = org; + return this; + } + + /** + * Get org + * + * @return org + */ + @javax.annotation.Nullable + public CollectionEntityIdentifier getOrg() { + return org; + } + + public void setOrg(@javax.annotation.Nullable CollectionEntityIdentifier org) { + this.org = org; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key name of the property + * @param value value of the property + * @return the Collection instance itself + */ + public Collection putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return a map of objects + */ + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key name of the property + * @return an object + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + Collection collection = (Collection) o; + return Objects.equals(this.id, collection.id) + && Objects.equals(this.name, collection.name) + && Objects.equals(this.description, collection.description) + && Objects.equals(this.metadata, collection.metadata) + && Objects.equals(this.createdAt, collection.createdAt) + && Objects.equals(this.updatedAt, collection.updatedAt) + && Objects.equals(this.authorName, collection.authorName) + && Objects.equals(this.authorId, collection.authorId) + && Objects.equals(this.org, collection.org) + && Objects.equals(this.additionalProperties, collection.additionalProperties); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b + || (a != null + && b != null + && a.isPresent() + && b.isPresent() + && Objects.deepEquals(a.get(), b.get())); + } + + @Override + public int hashCode() { + return Objects.hash( + id, + name, + description, + metadata, + createdAt, + updatedAt, + authorName, + authorId, + org, + additionalProperties); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; + } + return a.isPresent() ? Arrays.deepHashCode(new Object[] {a.get()}) : 31; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class Collection {\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append(" description: ").append(toIndentedString(description)).append("\n"); + sb.append(" metadata: ").append(toIndentedString(metadata)).append("\n"); + sb.append(" createdAt: ").append(toIndentedString(createdAt)).append("\n"); + sb.append(" updatedAt: ").append(toIndentedString(updatedAt)).append("\n"); + sb.append(" authorName: ").append(toIndentedString(authorName)).append("\n"); + sb.append(" authorId: ").append(toIndentedString(authorId)).append("\n"); + sb.append(" org: ").append(toIndentedString(org)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first + * line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("id"); + openapiFields.add("name"); + openapiFields.add("description"); + openapiFields.add("metadata"); + openapiFields.add("created_at"); + openapiFields.add("updated_at"); + openapiFields.add("author_name"); + openapiFields.add("author_id"); + openapiFields.add("org"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + openapiRequiredFields.add("id"); + openapiRequiredFields.add("name"); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to Collection + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!Collection.openapiRequiredFields + .isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException( + String.format( + "The required field(s) %s in Collection is not found in the empty" + + " JSON string", + Collection.openapiRequiredFields.toString())); + } + } + + // check to make sure all required properties/fields are present in the JSON string + for (String requiredField : Collection.openapiRequiredFields) { + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException( + String.format( + "The required field `%s` is not found in the JSON string: %s", + requiredField, jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if (!jsonObj.get("id").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `id` to be a primitive type in the JSON string but" + + " got `%s`", + jsonObj.get("id").toString())); + } + if (!jsonObj.get("name").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `name` to be a primitive type in the JSON string" + + " but got `%s`", + jsonObj.get("name").toString())); + } + if ((jsonObj.get("description") != null && !jsonObj.get("description").isJsonNull()) + && !jsonObj.get("description").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `description` to be a primitive type in the JSON" + + " string but got `%s`", + jsonObj.get("description").toString())); + } + if (jsonObj.get("metadata") != null && !jsonObj.get("metadata").isJsonNull()) { + JsonArray jsonArraymetadata = jsonObj.getAsJsonArray("metadata"); + if (jsonArraymetadata != null) { + // ensure the json data is an array + if (!jsonObj.get("metadata").isJsonArray()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `metadata` to be an array in the JSON" + + " string but got `%s`", + jsonObj.get("metadata").toString())); + } + + // validate the optional field `metadata` (array) + for (int i = 0; i < jsonArraymetadata.size(); i++) { + CollectionMetadataItem.validateJsonElement(jsonArraymetadata.get(i)); + } + ; + } + } + if ((jsonObj.get("created_at") != null && !jsonObj.get("created_at").isJsonNull()) + && !jsonObj.get("created_at").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `created_at` to be a primitive type in the JSON" + + " string but got `%s`", + jsonObj.get("created_at").toString())); + } + if ((jsonObj.get("updated_at") != null && !jsonObj.get("updated_at").isJsonNull()) + && !jsonObj.get("updated_at").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `updated_at` to be a primitive type in the JSON" + + " string but got `%s`", + jsonObj.get("updated_at").toString())); + } + if ((jsonObj.get("author_name") != null && !jsonObj.get("author_name").isJsonNull()) + && !jsonObj.get("author_name").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `author_name` to be a primitive type in the JSON" + + " string but got `%s`", + jsonObj.get("author_name").toString())); + } + if ((jsonObj.get("author_id") != null && !jsonObj.get("author_id").isJsonNull()) + && !jsonObj.get("author_id").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `author_id` to be a primitive type in the JSON" + + " string but got `%s`", + jsonObj.get("author_id").toString())); + } + // validate the optional field `org` + if (jsonObj.get("org") != null && !jsonObj.get("org").isJsonNull()) { + CollectionEntityIdentifier.validateJsonElement(jsonObj.get("org")); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!Collection.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'Collection' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter = + gson.getDelegateAdapter(this, TypeToken.get(Collection.class)); + + return (TypeAdapter) + new TypeAdapter() { + @Override + public void write(JsonWriter out, Collection value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + obj.remove("additionalProperties"); + // serialize additional properties + if (value.getAdditionalProperties() != null) { + for (Map.Entry entry : + value.getAdditionalProperties().entrySet()) { + if (entry.getValue() instanceof String) + obj.addProperty(entry.getKey(), (String) entry.getValue()); + else if (entry.getValue() instanceof Number) + obj.addProperty(entry.getKey(), (Number) entry.getValue()); + else if (entry.getValue() instanceof Boolean) + obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); + else if (entry.getValue() instanceof Character) + obj.addProperty( + entry.getKey(), (Character) entry.getValue()); + else { + JsonElement jsonElement = gson.toJsonTree(entry.getValue()); + if (jsonElement.isJsonArray()) { + obj.add(entry.getKey(), jsonElement.getAsJsonArray()); + } else { + obj.add(entry.getKey(), jsonElement.getAsJsonObject()); + } + } + } + } + elementAdapter.write(out, obj); + } + + @Override + public Collection read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // store additional fields in the deserialized instance + Collection instance = thisAdapter.fromJsonTree(jsonObj); + for (Map.Entry entry : jsonObj.entrySet()) { + if (!openapiFields.contains(entry.getKey())) { + if (entry.getValue().isJsonPrimitive()) { // primitive type + if (entry.getValue().getAsJsonPrimitive().isString()) + instance.putAdditionalProperty( + entry.getKey(), entry.getValue().getAsString()); + else if (entry.getValue().getAsJsonPrimitive().isNumber()) + instance.putAdditionalProperty( + entry.getKey(), entry.getValue().getAsNumber()); + else if (entry.getValue().getAsJsonPrimitive().isBoolean()) + instance.putAdditionalProperty( + entry.getKey(), + entry.getValue().getAsBoolean()); + else + throw new IllegalArgumentException( + String.format( + "The field `%s` has unknown primitive" + + " type. Value: %s", + entry.getKey(), + entry.getValue().toString())); + } else if (entry.getValue().isJsonArray()) { + instance.putAdditionalProperty( + entry.getKey(), + gson.fromJson(entry.getValue(), List.class)); + } else { // JSON object + instance.putAdditionalProperty( + entry.getKey(), + gson.fromJson(entry.getValue(), HashMap.class)); + } + } + } + return instance; + } + }.nullSafe(); + } + } + + /** + * Create an instance of Collection given an JSON string + * + * @param jsonString JSON string + * @return An instance of Collection + * @throws IOException if the JSON string is invalid with respect to Collection + */ + public static Collection fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, Collection.class); + } + + /** + * Convert an instance of Collection to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} diff --git a/sdks/java/src/main/java/com/thoughtspot/client/model/CollectionDeleteResponse.java b/sdks/java/src/main/java/com/thoughtspot/client/model/CollectionDeleteResponse.java new file mode 100644 index 000000000..60dde2b21 --- /dev/null +++ b/sdks/java/src/main/java/com/thoughtspot/client/model/CollectionDeleteResponse.java @@ -0,0 +1,398 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client.model; + +import com.google.gson.Gson; +import com.google.gson.JsonArray; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.TypeAdapter; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.annotations.SerializedName; +import com.google.gson.reflect.TypeToken; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import com.thoughtspot.client.JSON; +import java.io.IOException; +import java.io.Serializable; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Objects; +import org.openapitools.jackson.nullable.JsonNullable; + +/** Response object for delete collection operation. */ +@javax.annotation.Generated( + value = "org.openapitools.codegen.languages.JavaClientCodegen", + comments = "Generator version: 7.12.0") +public class CollectionDeleteResponse implements Serializable { + private static final long serialVersionUID = 1L; + + public static final String SERIALIZED_NAME_METADATA_DELETED = "metadata_deleted"; + + @SerializedName(SERIALIZED_NAME_METADATA_DELETED) + @javax.annotation.Nullable + private List metadataDeleted; + + public static final String SERIALIZED_NAME_METADATA_SKIPPED = "metadata_skipped"; + + @SerializedName(SERIALIZED_NAME_METADATA_SKIPPED) + @javax.annotation.Nullable + private List metadataSkipped; + + public CollectionDeleteResponse() {} + + public CollectionDeleteResponse metadataDeleted( + @javax.annotation.Nullable List metadataDeleted) { + this.metadataDeleted = metadataDeleted; + return this; + } + + public CollectionDeleteResponse addMetadataDeletedItem( + CollectionDeleteTypeIdentifiers metadataDeletedItem) { + if (this.metadataDeleted == null) { + this.metadataDeleted = new ArrayList<>(); + } + this.metadataDeleted.add(metadataDeletedItem); + return this; + } + + /** + * List of metadata objects that were successfully deleted. + * + * @return metadataDeleted + */ + @javax.annotation.Nullable + public List getMetadataDeleted() { + return metadataDeleted; + } + + public void setMetadataDeleted( + @javax.annotation.Nullable List metadataDeleted) { + this.metadataDeleted = metadataDeleted; + } + + public CollectionDeleteResponse metadataSkipped( + @javax.annotation.Nullable List metadataSkipped) { + this.metadataSkipped = metadataSkipped; + return this; + } + + public CollectionDeleteResponse addMetadataSkippedItem( + CollectionDeleteTypeIdentifiers metadataSkippedItem) { + if (this.metadataSkipped == null) { + this.metadataSkipped = new ArrayList<>(); + } + this.metadataSkipped.add(metadataSkippedItem); + return this; + } + + /** + * List of metadata objects that were skipped during deletion. Objects may be skipped due to + * lack of permissions, dependencies, or other constraints. + * + * @return metadataSkipped + */ + @javax.annotation.Nullable + public List getMetadataSkipped() { + return metadataSkipped; + } + + public void setMetadataSkipped( + @javax.annotation.Nullable List metadataSkipped) { + this.metadataSkipped = metadataSkipped; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key name of the property + * @param value value of the property + * @return the CollectionDeleteResponse instance itself + */ + public CollectionDeleteResponse putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return a map of objects + */ + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key name of the property + * @return an object + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + CollectionDeleteResponse collectionDeleteResponse = (CollectionDeleteResponse) o; + return Objects.equals(this.metadataDeleted, collectionDeleteResponse.metadataDeleted) + && Objects.equals(this.metadataSkipped, collectionDeleteResponse.metadataSkipped) + && Objects.equals( + this.additionalProperties, collectionDeleteResponse.additionalProperties); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b + || (a != null + && b != null + && a.isPresent() + && b.isPresent() + && Objects.deepEquals(a.get(), b.get())); + } + + @Override + public int hashCode() { + return Objects.hash(metadataDeleted, metadataSkipped, additionalProperties); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; + } + return a.isPresent() ? Arrays.deepHashCode(new Object[] {a.get()}) : 31; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class CollectionDeleteResponse {\n"); + sb.append(" metadataDeleted: ").append(toIndentedString(metadataDeleted)).append("\n"); + sb.append(" metadataSkipped: ").append(toIndentedString(metadataSkipped)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first + * line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("metadata_deleted"); + openapiFields.add("metadata_skipped"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to CollectionDeleteResponse + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!CollectionDeleteResponse.openapiRequiredFields + .isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException( + String.format( + "The required field(s) %s in CollectionDeleteResponse is not found" + + " in the empty JSON string", + CollectionDeleteResponse.openapiRequiredFields.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if (jsonObj.get("metadata_deleted") != null + && !jsonObj.get("metadata_deleted").isJsonNull()) { + JsonArray jsonArraymetadataDeleted = jsonObj.getAsJsonArray("metadata_deleted"); + if (jsonArraymetadataDeleted != null) { + // ensure the json data is an array + if (!jsonObj.get("metadata_deleted").isJsonArray()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `metadata_deleted` to be an array in the" + + " JSON string but got `%s`", + jsonObj.get("metadata_deleted").toString())); + } + + // validate the optional field `metadata_deleted` (array) + for (int i = 0; i < jsonArraymetadataDeleted.size(); i++) { + CollectionDeleteTypeIdentifiers.validateJsonElement( + jsonArraymetadataDeleted.get(i)); + } + ; + } + } + if (jsonObj.get("metadata_skipped") != null + && !jsonObj.get("metadata_skipped").isJsonNull()) { + JsonArray jsonArraymetadataSkipped = jsonObj.getAsJsonArray("metadata_skipped"); + if (jsonArraymetadataSkipped != null) { + // ensure the json data is an array + if (!jsonObj.get("metadata_skipped").isJsonArray()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `metadata_skipped` to be an array in the" + + " JSON string but got `%s`", + jsonObj.get("metadata_skipped").toString())); + } + + // validate the optional field `metadata_skipped` (array) + for (int i = 0; i < jsonArraymetadataSkipped.size(); i++) { + CollectionDeleteTypeIdentifiers.validateJsonElement( + jsonArraymetadataSkipped.get(i)); + } + ; + } + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!CollectionDeleteResponse.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'CollectionDeleteResponse' and its + // subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter = + gson.getDelegateAdapter(this, TypeToken.get(CollectionDeleteResponse.class)); + + return (TypeAdapter) + new TypeAdapter() { + @Override + public void write(JsonWriter out, CollectionDeleteResponse value) + throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + obj.remove("additionalProperties"); + // serialize additional properties + if (value.getAdditionalProperties() != null) { + for (Map.Entry entry : + value.getAdditionalProperties().entrySet()) { + if (entry.getValue() instanceof String) + obj.addProperty(entry.getKey(), (String) entry.getValue()); + else if (entry.getValue() instanceof Number) + obj.addProperty(entry.getKey(), (Number) entry.getValue()); + else if (entry.getValue() instanceof Boolean) + obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); + else if (entry.getValue() instanceof Character) + obj.addProperty( + entry.getKey(), (Character) entry.getValue()); + else { + JsonElement jsonElement = gson.toJsonTree(entry.getValue()); + if (jsonElement.isJsonArray()) { + obj.add(entry.getKey(), jsonElement.getAsJsonArray()); + } else { + obj.add(entry.getKey(), jsonElement.getAsJsonObject()); + } + } + } + } + elementAdapter.write(out, obj); + } + + @Override + public CollectionDeleteResponse read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // store additional fields in the deserialized instance + CollectionDeleteResponse instance = thisAdapter.fromJsonTree(jsonObj); + for (Map.Entry entry : jsonObj.entrySet()) { + if (!openapiFields.contains(entry.getKey())) { + if (entry.getValue().isJsonPrimitive()) { // primitive type + if (entry.getValue().getAsJsonPrimitive().isString()) + instance.putAdditionalProperty( + entry.getKey(), entry.getValue().getAsString()); + else if (entry.getValue().getAsJsonPrimitive().isNumber()) + instance.putAdditionalProperty( + entry.getKey(), entry.getValue().getAsNumber()); + else if (entry.getValue().getAsJsonPrimitive().isBoolean()) + instance.putAdditionalProperty( + entry.getKey(), + entry.getValue().getAsBoolean()); + else + throw new IllegalArgumentException( + String.format( + "The field `%s` has unknown primitive" + + " type. Value: %s", + entry.getKey(), + entry.getValue().toString())); + } else if (entry.getValue().isJsonArray()) { + instance.putAdditionalProperty( + entry.getKey(), + gson.fromJson(entry.getValue(), List.class)); + } else { // JSON object + instance.putAdditionalProperty( + entry.getKey(), + gson.fromJson(entry.getValue(), HashMap.class)); + } + } + } + return instance; + } + }.nullSafe(); + } + } + + /** + * Create an instance of CollectionDeleteResponse given an JSON string + * + * @param jsonString JSON string + * @return An instance of CollectionDeleteResponse + * @throws IOException if the JSON string is invalid with respect to CollectionDeleteResponse + */ + public static CollectionDeleteResponse fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, CollectionDeleteResponse.class); + } + + /** + * Convert an instance of CollectionDeleteResponse to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} diff --git a/sdks/java/src/main/java/com/thoughtspot/client/model/CollectionDeleteTypeIdentifiers.java b/sdks/java/src/main/java/com/thoughtspot/client/model/CollectionDeleteTypeIdentifiers.java new file mode 100644 index 000000000..ba286bc35 --- /dev/null +++ b/sdks/java/src/main/java/com/thoughtspot/client/model/CollectionDeleteTypeIdentifiers.java @@ -0,0 +1,376 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client.model; + +import com.google.gson.Gson; +import com.google.gson.JsonArray; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.TypeAdapter; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.annotations.SerializedName; +import com.google.gson.reflect.TypeToken; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import com.thoughtspot.client.JSON; +import java.io.IOException; +import java.io.Serializable; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Objects; +import org.openapitools.jackson.nullable.JsonNullable; + +/** Group of metadata objects identified by type. */ +@javax.annotation.Generated( + value = "org.openapitools.codegen.languages.JavaClientCodegen", + comments = "Generator version: 7.12.0") +public class CollectionDeleteTypeIdentifiers implements Serializable { + private static final long serialVersionUID = 1L; + + public static final String SERIALIZED_NAME_TYPE = "type"; + + @SerializedName(SERIALIZED_NAME_TYPE) + @javax.annotation.Nullable + private String type; + + public static final String SERIALIZED_NAME_IDENTIFIERS = "identifiers"; + + @SerializedName(SERIALIZED_NAME_IDENTIFIERS) + @javax.annotation.Nullable + private List identifiers; + + public CollectionDeleteTypeIdentifiers() {} + + public CollectionDeleteTypeIdentifiers type(@javax.annotation.Nullable String type) { + this.type = type; + return this; + } + + /** + * Type of the metadata object (e.g., Collection, Worksheet, Table). + * + * @return type + */ + @javax.annotation.Nullable + public String getType() { + return type; + } + + public void setType(@javax.annotation.Nullable String type) { + this.type = type; + } + + public CollectionDeleteTypeIdentifiers identifiers( + @javax.annotation.Nullable List identifiers) { + this.identifiers = identifiers; + return this; + } + + public CollectionDeleteTypeIdentifiers addIdentifiersItem(GenericInfo identifiersItem) { + if (this.identifiers == null) { + this.identifiers = new ArrayList<>(); + } + this.identifiers.add(identifiersItem); + return this; + } + + /** + * List of metadata identifiers belonging to the given type. + * + * @return identifiers + */ + @javax.annotation.Nullable + public List getIdentifiers() { + return identifiers; + } + + public void setIdentifiers(@javax.annotation.Nullable List identifiers) { + this.identifiers = identifiers; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key name of the property + * @param value value of the property + * @return the CollectionDeleteTypeIdentifiers instance itself + */ + public CollectionDeleteTypeIdentifiers putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return a map of objects + */ + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key name of the property + * @return an object + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + CollectionDeleteTypeIdentifiers collectionDeleteTypeIdentifiers = + (CollectionDeleteTypeIdentifiers) o; + return Objects.equals(this.type, collectionDeleteTypeIdentifiers.type) + && Objects.equals(this.identifiers, collectionDeleteTypeIdentifiers.identifiers) + && Objects.equals( + this.additionalProperties, + collectionDeleteTypeIdentifiers.additionalProperties); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b + || (a != null + && b != null + && a.isPresent() + && b.isPresent() + && Objects.deepEquals(a.get(), b.get())); + } + + @Override + public int hashCode() { + return Objects.hash(type, identifiers, additionalProperties); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; + } + return a.isPresent() ? Arrays.deepHashCode(new Object[] {a.get()}) : 31; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class CollectionDeleteTypeIdentifiers {\n"); + sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append(" identifiers: ").append(toIndentedString(identifiers)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first + * line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("type"); + openapiFields.add("identifiers"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to + * CollectionDeleteTypeIdentifiers + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!CollectionDeleteTypeIdentifiers.openapiRequiredFields + .isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException( + String.format( + "The required field(s) %s in CollectionDeleteTypeIdentifiers is" + + " not found in the empty JSON string", + CollectionDeleteTypeIdentifiers.openapiRequiredFields.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if ((jsonObj.get("type") != null && !jsonObj.get("type").isJsonNull()) + && !jsonObj.get("type").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `type` to be a primitive type in the JSON string" + + " but got `%s`", + jsonObj.get("type").toString())); + } + if (jsonObj.get("identifiers") != null && !jsonObj.get("identifiers").isJsonNull()) { + JsonArray jsonArrayidentifiers = jsonObj.getAsJsonArray("identifiers"); + if (jsonArrayidentifiers != null) { + // ensure the json data is an array + if (!jsonObj.get("identifiers").isJsonArray()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `identifiers` to be an array in the JSON" + + " string but got `%s`", + jsonObj.get("identifiers").toString())); + } + + // validate the optional field `identifiers` (array) + for (int i = 0; i < jsonArrayidentifiers.size(); i++) { + GenericInfo.validateJsonElement(jsonArrayidentifiers.get(i)); + } + ; + } + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!CollectionDeleteTypeIdentifiers.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'CollectionDeleteTypeIdentifiers' and its + // subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter = + gson.getDelegateAdapter( + this, TypeToken.get(CollectionDeleteTypeIdentifiers.class)); + + return (TypeAdapter) + new TypeAdapter() { + @Override + public void write(JsonWriter out, CollectionDeleteTypeIdentifiers value) + throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + obj.remove("additionalProperties"); + // serialize additional properties + if (value.getAdditionalProperties() != null) { + for (Map.Entry entry : + value.getAdditionalProperties().entrySet()) { + if (entry.getValue() instanceof String) + obj.addProperty(entry.getKey(), (String) entry.getValue()); + else if (entry.getValue() instanceof Number) + obj.addProperty(entry.getKey(), (Number) entry.getValue()); + else if (entry.getValue() instanceof Boolean) + obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); + else if (entry.getValue() instanceof Character) + obj.addProperty( + entry.getKey(), (Character) entry.getValue()); + else { + JsonElement jsonElement = gson.toJsonTree(entry.getValue()); + if (jsonElement.isJsonArray()) { + obj.add(entry.getKey(), jsonElement.getAsJsonArray()); + } else { + obj.add(entry.getKey(), jsonElement.getAsJsonObject()); + } + } + } + } + elementAdapter.write(out, obj); + } + + @Override + public CollectionDeleteTypeIdentifiers read(JsonReader in) + throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // store additional fields in the deserialized instance + CollectionDeleteTypeIdentifiers instance = + thisAdapter.fromJsonTree(jsonObj); + for (Map.Entry entry : jsonObj.entrySet()) { + if (!openapiFields.contains(entry.getKey())) { + if (entry.getValue().isJsonPrimitive()) { // primitive type + if (entry.getValue().getAsJsonPrimitive().isString()) + instance.putAdditionalProperty( + entry.getKey(), entry.getValue().getAsString()); + else if (entry.getValue().getAsJsonPrimitive().isNumber()) + instance.putAdditionalProperty( + entry.getKey(), entry.getValue().getAsNumber()); + else if (entry.getValue().getAsJsonPrimitive().isBoolean()) + instance.putAdditionalProperty( + entry.getKey(), + entry.getValue().getAsBoolean()); + else + throw new IllegalArgumentException( + String.format( + "The field `%s` has unknown primitive" + + " type. Value: %s", + entry.getKey(), + entry.getValue().toString())); + } else if (entry.getValue().isJsonArray()) { + instance.putAdditionalProperty( + entry.getKey(), + gson.fromJson(entry.getValue(), List.class)); + } else { // JSON object + instance.putAdditionalProperty( + entry.getKey(), + gson.fromJson(entry.getValue(), HashMap.class)); + } + } + } + return instance; + } + }.nullSafe(); + } + } + + /** + * Create an instance of CollectionDeleteTypeIdentifiers given an JSON string + * + * @param jsonString JSON string + * @return An instance of CollectionDeleteTypeIdentifiers + * @throws IOException if the JSON string is invalid with respect to + * CollectionDeleteTypeIdentifiers + */ + public static CollectionDeleteTypeIdentifiers fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, CollectionDeleteTypeIdentifiers.class); + } + + /** + * Convert an instance of CollectionDeleteTypeIdentifiers to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} diff --git a/sdks/java/src/main/java/com/thoughtspot/client/model/CollectionEntityIdentifier.java b/sdks/java/src/main/java/com/thoughtspot/client/model/CollectionEntityIdentifier.java new file mode 100644 index 000000000..34cb7e4e7 --- /dev/null +++ b/sdks/java/src/main/java/com/thoughtspot/client/model/CollectionEntityIdentifier.java @@ -0,0 +1,347 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client.model; + +import com.google.gson.Gson; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.TypeAdapter; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.annotations.SerializedName; +import com.google.gson.reflect.TypeToken; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import com.thoughtspot.client.JSON; +import java.io.IOException; +import java.io.Serializable; +import java.util.Arrays; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Objects; +import org.openapitools.jackson.nullable.JsonNullable; + +/** Entity identifier with name. */ +@javax.annotation.Generated( + value = "org.openapitools.codegen.languages.JavaClientCodegen", + comments = "Generator version: 7.12.0") +public class CollectionEntityIdentifier implements Serializable { + private static final long serialVersionUID = 1L; + + public static final String SERIALIZED_NAME_IDENTIFIER = "identifier"; + + @SerializedName(SERIALIZED_NAME_IDENTIFIER) + @javax.annotation.Nullable + private String identifier; + + public static final String SERIALIZED_NAME_NAME = "name"; + + @SerializedName(SERIALIZED_NAME_NAME) + @javax.annotation.Nullable + private String name; + + public CollectionEntityIdentifier() {} + + public CollectionEntityIdentifier identifier(@javax.annotation.Nullable String identifier) { + this.identifier = identifier; + return this; + } + + /** + * Unique identifier of the entity. + * + * @return identifier + */ + @javax.annotation.Nullable + public String getIdentifier() { + return identifier; + } + + public void setIdentifier(@javax.annotation.Nullable String identifier) { + this.identifier = identifier; + } + + public CollectionEntityIdentifier name(@javax.annotation.Nullable String name) { + this.name = name; + return this; + } + + /** + * Name of the entity. + * + * @return name + */ + @javax.annotation.Nullable + public String getName() { + return name; + } + + public void setName(@javax.annotation.Nullable String name) { + this.name = name; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key name of the property + * @param value value of the property + * @return the CollectionEntityIdentifier instance itself + */ + public CollectionEntityIdentifier putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return a map of objects + */ + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key name of the property + * @return an object + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + CollectionEntityIdentifier collectionEntityIdentifier = (CollectionEntityIdentifier) o; + return Objects.equals(this.identifier, collectionEntityIdentifier.identifier) + && Objects.equals(this.name, collectionEntityIdentifier.name) + && Objects.equals( + this.additionalProperties, collectionEntityIdentifier.additionalProperties); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b + || (a != null + && b != null + && a.isPresent() + && b.isPresent() + && Objects.deepEquals(a.get(), b.get())); + } + + @Override + public int hashCode() { + return Objects.hash(identifier, name, additionalProperties); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; + } + return a.isPresent() ? Arrays.deepHashCode(new Object[] {a.get()}) : 31; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class CollectionEntityIdentifier {\n"); + sb.append(" identifier: ").append(toIndentedString(identifier)).append("\n"); + sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first + * line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("identifier"); + openapiFields.add("name"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to CollectionEntityIdentifier + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!CollectionEntityIdentifier.openapiRequiredFields + .isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException( + String.format( + "The required field(s) %s in CollectionEntityIdentifier is not" + + " found in the empty JSON string", + CollectionEntityIdentifier.openapiRequiredFields.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if ((jsonObj.get("identifier") != null && !jsonObj.get("identifier").isJsonNull()) + && !jsonObj.get("identifier").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `identifier` to be a primitive type in the JSON" + + " string but got `%s`", + jsonObj.get("identifier").toString())); + } + if ((jsonObj.get("name") != null && !jsonObj.get("name").isJsonNull()) + && !jsonObj.get("name").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `name` to be a primitive type in the JSON string" + + " but got `%s`", + jsonObj.get("name").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!CollectionEntityIdentifier.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'CollectionEntityIdentifier' and its + // subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter = + gson.getDelegateAdapter(this, TypeToken.get(CollectionEntityIdentifier.class)); + + return (TypeAdapter) + new TypeAdapter() { + @Override + public void write(JsonWriter out, CollectionEntityIdentifier value) + throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + obj.remove("additionalProperties"); + // serialize additional properties + if (value.getAdditionalProperties() != null) { + for (Map.Entry entry : + value.getAdditionalProperties().entrySet()) { + if (entry.getValue() instanceof String) + obj.addProperty(entry.getKey(), (String) entry.getValue()); + else if (entry.getValue() instanceof Number) + obj.addProperty(entry.getKey(), (Number) entry.getValue()); + else if (entry.getValue() instanceof Boolean) + obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); + else if (entry.getValue() instanceof Character) + obj.addProperty( + entry.getKey(), (Character) entry.getValue()); + else { + JsonElement jsonElement = gson.toJsonTree(entry.getValue()); + if (jsonElement.isJsonArray()) { + obj.add(entry.getKey(), jsonElement.getAsJsonArray()); + } else { + obj.add(entry.getKey(), jsonElement.getAsJsonObject()); + } + } + } + } + elementAdapter.write(out, obj); + } + + @Override + public CollectionEntityIdentifier read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // store additional fields in the deserialized instance + CollectionEntityIdentifier instance = thisAdapter.fromJsonTree(jsonObj); + for (Map.Entry entry : jsonObj.entrySet()) { + if (!openapiFields.contains(entry.getKey())) { + if (entry.getValue().isJsonPrimitive()) { // primitive type + if (entry.getValue().getAsJsonPrimitive().isString()) + instance.putAdditionalProperty( + entry.getKey(), entry.getValue().getAsString()); + else if (entry.getValue().getAsJsonPrimitive().isNumber()) + instance.putAdditionalProperty( + entry.getKey(), entry.getValue().getAsNumber()); + else if (entry.getValue().getAsJsonPrimitive().isBoolean()) + instance.putAdditionalProperty( + entry.getKey(), + entry.getValue().getAsBoolean()); + else + throw new IllegalArgumentException( + String.format( + "The field `%s` has unknown primitive" + + " type. Value: %s", + entry.getKey(), + entry.getValue().toString())); + } else if (entry.getValue().isJsonArray()) { + instance.putAdditionalProperty( + entry.getKey(), + gson.fromJson(entry.getValue(), List.class)); + } else { // JSON object + instance.putAdditionalProperty( + entry.getKey(), + gson.fromJson(entry.getValue(), HashMap.class)); + } + } + } + return instance; + } + }.nullSafe(); + } + } + + /** + * Create an instance of CollectionEntityIdentifier given an JSON string + * + * @param jsonString JSON string + * @return An instance of CollectionEntityIdentifier + * @throws IOException if the JSON string is invalid with respect to CollectionEntityIdentifier + */ + public static CollectionEntityIdentifier fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, CollectionEntityIdentifier.class); + } + + /** + * Convert an instance of CollectionEntityIdentifier to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} diff --git a/sdks/java/src/main/java/com/thoughtspot/client/model/CollectionMetadataInput.java b/sdks/java/src/main/java/com/thoughtspot/client/model/CollectionMetadataInput.java new file mode 100644 index 000000000..3acf06dbd --- /dev/null +++ b/sdks/java/src/main/java/com/thoughtspot/client/model/CollectionMetadataInput.java @@ -0,0 +1,411 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client.model; + +import com.google.gson.Gson; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.TypeAdapter; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.reflect.TypeToken; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import com.thoughtspot.client.JSON; +import java.io.IOException; +import java.io.Serializable; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Objects; + +/** Input type for metadata to be added to a collection. */ +@javax.annotation.Generated( + value = "org.openapitools.codegen.languages.JavaClientCodegen", + comments = "Generator version: 7.12.0") +public class CollectionMetadataInput implements Serializable { + private static final long serialVersionUID = 1L; + + /** Type of metadata object. */ + @JsonAdapter(TypeEnum.Adapter.class) + public enum TypeEnum { + LIVEBOARD("LIVEBOARD"), + + ANSWER("ANSWER"), + + LOGICAL_TABLE("LOGICAL_TABLE"), + + COLLECTION("COLLECTION"); + + private String value; + + TypeEnum(String value) { + this.value = value; + } + + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + public static TypeEnum fromValue(String value) { + for (TypeEnum b : TypeEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + + public static class Adapter extends TypeAdapter { + @Override + public void write(final JsonWriter jsonWriter, final TypeEnum enumeration) + throws IOException { + jsonWriter.value(enumeration.getValue()); + } + + @Override + public TypeEnum read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + return TypeEnum.fromValue(value); + } + } + + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + String value = jsonElement.getAsString(); + TypeEnum.fromValue(value); + } + } + + public static final String SERIALIZED_NAME_TYPE = "type"; + + @SerializedName(SERIALIZED_NAME_TYPE) + @javax.annotation.Nonnull + private TypeEnum type; + + public static final String SERIALIZED_NAME_IDENTIFIERS = "identifiers"; + + @SerializedName(SERIALIZED_NAME_IDENTIFIERS) + @javax.annotation.Nonnull + private List identifiers; + + public CollectionMetadataInput() {} + + public CollectionMetadataInput type(@javax.annotation.Nonnull TypeEnum type) { + this.type = type; + return this; + } + + /** + * Type of metadata object. + * + * @return type + */ + @javax.annotation.Nonnull + public TypeEnum getType() { + return type; + } + + public void setType(@javax.annotation.Nonnull TypeEnum type) { + this.type = type; + } + + public CollectionMetadataInput identifiers(@javax.annotation.Nonnull List identifiers) { + this.identifiers = identifiers; + return this; + } + + public CollectionMetadataInput addIdentifiersItem(String identifiersItem) { + if (this.identifiers == null) { + this.identifiers = new ArrayList<>(); + } + this.identifiers.add(identifiersItem); + return this; + } + + /** + * List of unique IDs or names of metadata objects. + * + * @return identifiers + */ + @javax.annotation.Nonnull + public List getIdentifiers() { + return identifiers; + } + + public void setIdentifiers(@javax.annotation.Nonnull List identifiers) { + this.identifiers = identifiers; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key name of the property + * @param value value of the property + * @return the CollectionMetadataInput instance itself + */ + public CollectionMetadataInput putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return a map of objects + */ + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key name of the property + * @return an object + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + CollectionMetadataInput collectionMetadataInput = (CollectionMetadataInput) o; + return Objects.equals(this.type, collectionMetadataInput.type) + && Objects.equals(this.identifiers, collectionMetadataInput.identifiers) + && Objects.equals( + this.additionalProperties, collectionMetadataInput.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(type, identifiers, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class CollectionMetadataInput {\n"); + sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append(" identifiers: ").append(toIndentedString(identifiers)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first + * line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("type"); + openapiFields.add("identifiers"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + openapiRequiredFields.add("type"); + openapiRequiredFields.add("identifiers"); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to CollectionMetadataInput + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!CollectionMetadataInput.openapiRequiredFields + .isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException( + String.format( + "The required field(s) %s in CollectionMetadataInput is not found" + + " in the empty JSON string", + CollectionMetadataInput.openapiRequiredFields.toString())); + } + } + + // check to make sure all required properties/fields are present in the JSON string + for (String requiredField : CollectionMetadataInput.openapiRequiredFields) { + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException( + String.format( + "The required field `%s` is not found in the JSON string: %s", + requiredField, jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if (!jsonObj.get("type").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `type` to be a primitive type in the JSON string" + + " but got `%s`", + jsonObj.get("type").toString())); + } + // validate the required field `type` + TypeEnum.validateJsonElement(jsonObj.get("type")); + // ensure the required json array is present + if (jsonObj.get("identifiers") == null) { + throw new IllegalArgumentException( + "Expected the field `linkedContent` to be an array in the JSON string but got" + + " `null`"); + } else if (!jsonObj.get("identifiers").isJsonArray()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `identifiers` to be an array in the JSON string" + + " but got `%s`", + jsonObj.get("identifiers").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!CollectionMetadataInput.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'CollectionMetadataInput' and its + // subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter = + gson.getDelegateAdapter(this, TypeToken.get(CollectionMetadataInput.class)); + + return (TypeAdapter) + new TypeAdapter() { + @Override + public void write(JsonWriter out, CollectionMetadataInput value) + throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + obj.remove("additionalProperties"); + // serialize additional properties + if (value.getAdditionalProperties() != null) { + for (Map.Entry entry : + value.getAdditionalProperties().entrySet()) { + if (entry.getValue() instanceof String) + obj.addProperty(entry.getKey(), (String) entry.getValue()); + else if (entry.getValue() instanceof Number) + obj.addProperty(entry.getKey(), (Number) entry.getValue()); + else if (entry.getValue() instanceof Boolean) + obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); + else if (entry.getValue() instanceof Character) + obj.addProperty( + entry.getKey(), (Character) entry.getValue()); + else { + JsonElement jsonElement = gson.toJsonTree(entry.getValue()); + if (jsonElement.isJsonArray()) { + obj.add(entry.getKey(), jsonElement.getAsJsonArray()); + } else { + obj.add(entry.getKey(), jsonElement.getAsJsonObject()); + } + } + } + } + elementAdapter.write(out, obj); + } + + @Override + public CollectionMetadataInput read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // store additional fields in the deserialized instance + CollectionMetadataInput instance = thisAdapter.fromJsonTree(jsonObj); + for (Map.Entry entry : jsonObj.entrySet()) { + if (!openapiFields.contains(entry.getKey())) { + if (entry.getValue().isJsonPrimitive()) { // primitive type + if (entry.getValue().getAsJsonPrimitive().isString()) + instance.putAdditionalProperty( + entry.getKey(), entry.getValue().getAsString()); + else if (entry.getValue().getAsJsonPrimitive().isNumber()) + instance.putAdditionalProperty( + entry.getKey(), entry.getValue().getAsNumber()); + else if (entry.getValue().getAsJsonPrimitive().isBoolean()) + instance.putAdditionalProperty( + entry.getKey(), + entry.getValue().getAsBoolean()); + else + throw new IllegalArgumentException( + String.format( + "The field `%s` has unknown primitive" + + " type. Value: %s", + entry.getKey(), + entry.getValue().toString())); + } else if (entry.getValue().isJsonArray()) { + instance.putAdditionalProperty( + entry.getKey(), + gson.fromJson(entry.getValue(), List.class)); + } else { // JSON object + instance.putAdditionalProperty( + entry.getKey(), + gson.fromJson(entry.getValue(), HashMap.class)); + } + } + } + return instance; + } + }.nullSafe(); + } + } + + /** + * Create an instance of CollectionMetadataInput given an JSON string + * + * @param jsonString JSON string + * @return An instance of CollectionMetadataInput + * @throws IOException if the JSON string is invalid with respect to CollectionMetadataInput + */ + public static CollectionMetadataInput fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, CollectionMetadataInput.class); + } + + /** + * Convert an instance of CollectionMetadataInput to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} diff --git a/sdks/java/src/main/java/com/thoughtspot/client/model/CollectionMetadataItem.java b/sdks/java/src/main/java/com/thoughtspot/client/model/CollectionMetadataItem.java new file mode 100644 index 000000000..2dc232adb --- /dev/null +++ b/sdks/java/src/main/java/com/thoughtspot/client/model/CollectionMetadataItem.java @@ -0,0 +1,369 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client.model; + +import com.google.gson.Gson; +import com.google.gson.JsonArray; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.TypeAdapter; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.annotations.SerializedName; +import com.google.gson.reflect.TypeToken; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import com.thoughtspot.client.JSON; +import java.io.IOException; +import java.io.Serializable; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Objects; +import org.openapitools.jackson.nullable.JsonNullable; + +/** Metadata item in a collection response. */ +@javax.annotation.Generated( + value = "org.openapitools.codegen.languages.JavaClientCodegen", + comments = "Generator version: 7.12.0") +public class CollectionMetadataItem implements Serializable { + private static final long serialVersionUID = 1L; + + public static final String SERIALIZED_NAME_TYPE = "type"; + + @SerializedName(SERIALIZED_NAME_TYPE) + @javax.annotation.Nullable + private String type; + + public static final String SERIALIZED_NAME_IDENTIFIERS = "identifiers"; + + @SerializedName(SERIALIZED_NAME_IDENTIFIERS) + @javax.annotation.Nullable + private List identifiers; + + public CollectionMetadataItem() {} + + public CollectionMetadataItem type(@javax.annotation.Nullable String type) { + this.type = type; + return this; + } + + /** + * Type of the metadata object. + * + * @return type + */ + @javax.annotation.Nullable + public String getType() { + return type; + } + + public void setType(@javax.annotation.Nullable String type) { + this.type = type; + } + + public CollectionMetadataItem identifiers( + @javax.annotation.Nullable List identifiers) { + this.identifiers = identifiers; + return this; + } + + public CollectionMetadataItem addIdentifiersItem(CollectionEntityIdentifier identifiersItem) { + if (this.identifiers == null) { + this.identifiers = new ArrayList<>(); + } + this.identifiers.add(identifiersItem); + return this; + } + + /** + * List of identifiers for this metadata type. + * + * @return identifiers + */ + @javax.annotation.Nullable + public List getIdentifiers() { + return identifiers; + } + + public void setIdentifiers( + @javax.annotation.Nullable List identifiers) { + this.identifiers = identifiers; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key name of the property + * @param value value of the property + * @return the CollectionMetadataItem instance itself + */ + public CollectionMetadataItem putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return a map of objects + */ + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key name of the property + * @return an object + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + CollectionMetadataItem collectionMetadataItem = (CollectionMetadataItem) o; + return Objects.equals(this.type, collectionMetadataItem.type) + && Objects.equals(this.identifiers, collectionMetadataItem.identifiers) + && Objects.equals( + this.additionalProperties, collectionMetadataItem.additionalProperties); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b + || (a != null + && b != null + && a.isPresent() + && b.isPresent() + && Objects.deepEquals(a.get(), b.get())); + } + + @Override + public int hashCode() { + return Objects.hash(type, identifiers, additionalProperties); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; + } + return a.isPresent() ? Arrays.deepHashCode(new Object[] {a.get()}) : 31; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class CollectionMetadataItem {\n"); + sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append(" identifiers: ").append(toIndentedString(identifiers)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first + * line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("type"); + openapiFields.add("identifiers"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to CollectionMetadataItem + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!CollectionMetadataItem.openapiRequiredFields + .isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException( + String.format( + "The required field(s) %s in CollectionMetadataItem is not found" + + " in the empty JSON string", + CollectionMetadataItem.openapiRequiredFields.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if ((jsonObj.get("type") != null && !jsonObj.get("type").isJsonNull()) + && !jsonObj.get("type").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `type` to be a primitive type in the JSON string" + + " but got `%s`", + jsonObj.get("type").toString())); + } + if (jsonObj.get("identifiers") != null && !jsonObj.get("identifiers").isJsonNull()) { + JsonArray jsonArrayidentifiers = jsonObj.getAsJsonArray("identifiers"); + if (jsonArrayidentifiers != null) { + // ensure the json data is an array + if (!jsonObj.get("identifiers").isJsonArray()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `identifiers` to be an array in the JSON" + + " string but got `%s`", + jsonObj.get("identifiers").toString())); + } + + // validate the optional field `identifiers` (array) + for (int i = 0; i < jsonArrayidentifiers.size(); i++) { + CollectionEntityIdentifier.validateJsonElement(jsonArrayidentifiers.get(i)); + } + ; + } + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!CollectionMetadataItem.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'CollectionMetadataItem' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter = + gson.getDelegateAdapter(this, TypeToken.get(CollectionMetadataItem.class)); + + return (TypeAdapter) + new TypeAdapter() { + @Override + public void write(JsonWriter out, CollectionMetadataItem value) + throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + obj.remove("additionalProperties"); + // serialize additional properties + if (value.getAdditionalProperties() != null) { + for (Map.Entry entry : + value.getAdditionalProperties().entrySet()) { + if (entry.getValue() instanceof String) + obj.addProperty(entry.getKey(), (String) entry.getValue()); + else if (entry.getValue() instanceof Number) + obj.addProperty(entry.getKey(), (Number) entry.getValue()); + else if (entry.getValue() instanceof Boolean) + obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); + else if (entry.getValue() instanceof Character) + obj.addProperty( + entry.getKey(), (Character) entry.getValue()); + else { + JsonElement jsonElement = gson.toJsonTree(entry.getValue()); + if (jsonElement.isJsonArray()) { + obj.add(entry.getKey(), jsonElement.getAsJsonArray()); + } else { + obj.add(entry.getKey(), jsonElement.getAsJsonObject()); + } + } + } + } + elementAdapter.write(out, obj); + } + + @Override + public CollectionMetadataItem read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // store additional fields in the deserialized instance + CollectionMetadataItem instance = thisAdapter.fromJsonTree(jsonObj); + for (Map.Entry entry : jsonObj.entrySet()) { + if (!openapiFields.contains(entry.getKey())) { + if (entry.getValue().isJsonPrimitive()) { // primitive type + if (entry.getValue().getAsJsonPrimitive().isString()) + instance.putAdditionalProperty( + entry.getKey(), entry.getValue().getAsString()); + else if (entry.getValue().getAsJsonPrimitive().isNumber()) + instance.putAdditionalProperty( + entry.getKey(), entry.getValue().getAsNumber()); + else if (entry.getValue().getAsJsonPrimitive().isBoolean()) + instance.putAdditionalProperty( + entry.getKey(), + entry.getValue().getAsBoolean()); + else + throw new IllegalArgumentException( + String.format( + "The field `%s` has unknown primitive" + + " type. Value: %s", + entry.getKey(), + entry.getValue().toString())); + } else if (entry.getValue().isJsonArray()) { + instance.putAdditionalProperty( + entry.getKey(), + gson.fromJson(entry.getValue(), List.class)); + } else { // JSON object + instance.putAdditionalProperty( + entry.getKey(), + gson.fromJson(entry.getValue(), HashMap.class)); + } + } + } + return instance; + } + }.nullSafe(); + } + } + + /** + * Create an instance of CollectionMetadataItem given an JSON string + * + * @param jsonString JSON string + * @return An instance of CollectionMetadataItem + * @throws IOException if the JSON string is invalid with respect to CollectionMetadataItem + */ + public static CollectionMetadataItem fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, CollectionMetadataItem.class); + } + + /** + * Convert an instance of CollectionMetadataItem to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} diff --git a/sdks/java/src/main/java/com/thoughtspot/client/model/CollectionSearchResponse.java b/sdks/java/src/main/java/com/thoughtspot/client/model/CollectionSearchResponse.java new file mode 100644 index 000000000..c8b92cd58 --- /dev/null +++ b/sdks/java/src/main/java/com/thoughtspot/client/model/CollectionSearchResponse.java @@ -0,0 +1,453 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client.model; + +import com.google.gson.Gson; +import com.google.gson.JsonArray; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.TypeAdapter; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.annotations.SerializedName; +import com.google.gson.reflect.TypeToken; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import com.thoughtspot.client.JSON; +import java.io.IOException; +import java.io.Serializable; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Objects; +import org.openapitools.jackson.nullable.JsonNullable; + +/** Response object for search collections operation. */ +@javax.annotation.Generated( + value = "org.openapitools.codegen.languages.JavaClientCodegen", + comments = "Generator version: 7.12.0") +public class CollectionSearchResponse implements Serializable { + private static final long serialVersionUID = 1L; + + public static final String SERIALIZED_NAME_COLLECTIONS = "collections"; + + @SerializedName(SERIALIZED_NAME_COLLECTIONS) + @javax.annotation.Nonnull + private List collections; + + public static final String SERIALIZED_NAME_RECORD_OFFSET = "record_offset"; + + @SerializedName(SERIALIZED_NAME_RECORD_OFFSET) + @javax.annotation.Nullable + private Integer recordOffset; + + public static final String SERIALIZED_NAME_RECORD_SIZE = "record_size"; + + @SerializedName(SERIALIZED_NAME_RECORD_SIZE) + @javax.annotation.Nullable + private Integer recordSize; + + public static final String SERIALIZED_NAME_IS_LAST_BATCH = "is_last_batch"; + + @SerializedName(SERIALIZED_NAME_IS_LAST_BATCH) + @javax.annotation.Nullable + private Boolean isLastBatch; + + public static final String SERIALIZED_NAME_COUNT = "count"; + + @SerializedName(SERIALIZED_NAME_COUNT) + @javax.annotation.Nullable + private Integer count; + + public CollectionSearchResponse() {} + + public CollectionSearchResponse collections( + @javax.annotation.Nonnull List collections) { + this.collections = collections; + return this; + } + + public CollectionSearchResponse addCollectionsItem(Collection collectionsItem) { + if (this.collections == null) { + this.collections = new ArrayList<>(); + } + this.collections.add(collectionsItem); + return this; + } + + /** + * List of collections matching the search criteria. + * + * @return collections + */ + @javax.annotation.Nonnull + public List getCollections() { + return collections; + } + + public void setCollections(@javax.annotation.Nonnull List collections) { + this.collections = collections; + } + + public CollectionSearchResponse recordOffset(@javax.annotation.Nullable Integer recordOffset) { + this.recordOffset = recordOffset; + return this; + } + + /** + * The starting record number from where the records are included. + * + * @return recordOffset + */ + @javax.annotation.Nullable + public Integer getRecordOffset() { + return recordOffset; + } + + public void setRecordOffset(@javax.annotation.Nullable Integer recordOffset) { + this.recordOffset = recordOffset; + } + + public CollectionSearchResponse recordSize(@javax.annotation.Nullable Integer recordSize) { + this.recordSize = recordSize; + return this; + } + + /** + * The number of records returned. + * + * @return recordSize + */ + @javax.annotation.Nullable + public Integer getRecordSize() { + return recordSize; + } + + public void setRecordSize(@javax.annotation.Nullable Integer recordSize) { + this.recordSize = recordSize; + } + + public CollectionSearchResponse isLastBatch(@javax.annotation.Nullable Boolean isLastBatch) { + this.isLastBatch = isLastBatch; + return this; + } + + /** + * Indicates if this is the last batch of results. + * + * @return isLastBatch + */ + @javax.annotation.Nullable + public Boolean getIsLastBatch() { + return isLastBatch; + } + + public void setIsLastBatch(@javax.annotation.Nullable Boolean isLastBatch) { + this.isLastBatch = isLastBatch; + } + + public CollectionSearchResponse count(@javax.annotation.Nullable Integer count) { + this.count = count; + return this; + } + + /** + * Total count of records returned. + * + * @return count + */ + @javax.annotation.Nullable + public Integer getCount() { + return count; + } + + public void setCount(@javax.annotation.Nullable Integer count) { + this.count = count; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key name of the property + * @param value value of the property + * @return the CollectionSearchResponse instance itself + */ + public CollectionSearchResponse putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return a map of objects + */ + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key name of the property + * @return an object + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + CollectionSearchResponse collectionSearchResponse = (CollectionSearchResponse) o; + return Objects.equals(this.collections, collectionSearchResponse.collections) + && Objects.equals(this.recordOffset, collectionSearchResponse.recordOffset) + && Objects.equals(this.recordSize, collectionSearchResponse.recordSize) + && Objects.equals(this.isLastBatch, collectionSearchResponse.isLastBatch) + && Objects.equals(this.count, collectionSearchResponse.count) + && Objects.equals( + this.additionalProperties, collectionSearchResponse.additionalProperties); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b + || (a != null + && b != null + && a.isPresent() + && b.isPresent() + && Objects.deepEquals(a.get(), b.get())); + } + + @Override + public int hashCode() { + return Objects.hash( + collections, recordOffset, recordSize, isLastBatch, count, additionalProperties); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; + } + return a.isPresent() ? Arrays.deepHashCode(new Object[] {a.get()}) : 31; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class CollectionSearchResponse {\n"); + sb.append(" collections: ").append(toIndentedString(collections)).append("\n"); + sb.append(" recordOffset: ").append(toIndentedString(recordOffset)).append("\n"); + sb.append(" recordSize: ").append(toIndentedString(recordSize)).append("\n"); + sb.append(" isLastBatch: ").append(toIndentedString(isLastBatch)).append("\n"); + sb.append(" count: ").append(toIndentedString(count)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first + * line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("collections"); + openapiFields.add("record_offset"); + openapiFields.add("record_size"); + openapiFields.add("is_last_batch"); + openapiFields.add("count"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + openapiRequiredFields.add("collections"); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to CollectionSearchResponse + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!CollectionSearchResponse.openapiRequiredFields + .isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException( + String.format( + "The required field(s) %s in CollectionSearchResponse is not found" + + " in the empty JSON string", + CollectionSearchResponse.openapiRequiredFields.toString())); + } + } + + // check to make sure all required properties/fields are present in the JSON string + for (String requiredField : CollectionSearchResponse.openapiRequiredFields) { + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException( + String.format( + "The required field `%s` is not found in the JSON string: %s", + requiredField, jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // ensure the json data is an array + if (!jsonObj.get("collections").isJsonArray()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `collections` to be an array in the JSON string" + + " but got `%s`", + jsonObj.get("collections").toString())); + } + + JsonArray jsonArraycollections = jsonObj.getAsJsonArray("collections"); + // validate the required field `collections` (array) + for (int i = 0; i < jsonArraycollections.size(); i++) { + Collection.validateJsonElement(jsonArraycollections.get(i)); + } + ; + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!CollectionSearchResponse.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'CollectionSearchResponse' and its + // subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter = + gson.getDelegateAdapter(this, TypeToken.get(CollectionSearchResponse.class)); + + return (TypeAdapter) + new TypeAdapter() { + @Override + public void write(JsonWriter out, CollectionSearchResponse value) + throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + obj.remove("additionalProperties"); + // serialize additional properties + if (value.getAdditionalProperties() != null) { + for (Map.Entry entry : + value.getAdditionalProperties().entrySet()) { + if (entry.getValue() instanceof String) + obj.addProperty(entry.getKey(), (String) entry.getValue()); + else if (entry.getValue() instanceof Number) + obj.addProperty(entry.getKey(), (Number) entry.getValue()); + else if (entry.getValue() instanceof Boolean) + obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); + else if (entry.getValue() instanceof Character) + obj.addProperty( + entry.getKey(), (Character) entry.getValue()); + else { + JsonElement jsonElement = gson.toJsonTree(entry.getValue()); + if (jsonElement.isJsonArray()) { + obj.add(entry.getKey(), jsonElement.getAsJsonArray()); + } else { + obj.add(entry.getKey(), jsonElement.getAsJsonObject()); + } + } + } + } + elementAdapter.write(out, obj); + } + + @Override + public CollectionSearchResponse read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // store additional fields in the deserialized instance + CollectionSearchResponse instance = thisAdapter.fromJsonTree(jsonObj); + for (Map.Entry entry : jsonObj.entrySet()) { + if (!openapiFields.contains(entry.getKey())) { + if (entry.getValue().isJsonPrimitive()) { // primitive type + if (entry.getValue().getAsJsonPrimitive().isString()) + instance.putAdditionalProperty( + entry.getKey(), entry.getValue().getAsString()); + else if (entry.getValue().getAsJsonPrimitive().isNumber()) + instance.putAdditionalProperty( + entry.getKey(), entry.getValue().getAsNumber()); + else if (entry.getValue().getAsJsonPrimitive().isBoolean()) + instance.putAdditionalProperty( + entry.getKey(), + entry.getValue().getAsBoolean()); + else + throw new IllegalArgumentException( + String.format( + "The field `%s` has unknown primitive" + + " type. Value: %s", + entry.getKey(), + entry.getValue().toString())); + } else if (entry.getValue().isJsonArray()) { + instance.putAdditionalProperty( + entry.getKey(), + gson.fromJson(entry.getValue(), List.class)); + } else { // JSON object + instance.putAdditionalProperty( + entry.getKey(), + gson.fromJson(entry.getValue(), HashMap.class)); + } + } + } + return instance; + } + }.nullSafe(); + } + } + + /** + * Create an instance of CollectionSearchResponse given an JSON string + * + * @param jsonString JSON string + * @return An instance of CollectionSearchResponse + * @throws IOException if the JSON string is invalid with respect to CollectionSearchResponse + */ + public static CollectionSearchResponse fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, CollectionSearchResponse.class); + } + + /** + * Convert an instance of CollectionSearchResponse to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} diff --git a/sdks/java/src/main/java/com/thoughtspot/client/model/Column.java b/sdks/java/src/main/java/com/thoughtspot/client/model/Column.java new file mode 100644 index 000000000..8acfcf4f8 --- /dev/null +++ b/sdks/java/src/main/java/com/thoughtspot/client/model/Column.java @@ -0,0 +1,481 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client.model; + +import com.google.gson.Gson; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.TypeAdapter; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.annotations.SerializedName; +import com.google.gson.reflect.TypeToken; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import com.thoughtspot.client.JSON; +import java.io.IOException; +import java.io.Serializable; +import java.util.Arrays; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Objects; +import org.openapitools.jackson.nullable.JsonNullable; + +/** Column */ +@javax.annotation.Generated( + value = "org.openapitools.codegen.languages.JavaClientCodegen", + comments = "Generator version: 7.12.0") +public class Column implements Serializable { + private static final long serialVersionUID = 1L; + + public static final String SERIALIZED_NAME_NAME = "name"; + + @SerializedName(SERIALIZED_NAME_NAME) + @javax.annotation.Nonnull + private String name; + + public static final String SERIALIZED_NAME_DATA_TYPE = "data_type"; + + @SerializedName(SERIALIZED_NAME_DATA_TYPE) + @javax.annotation.Nonnull + private String dataType; + + public static final String SERIALIZED_NAME_IS_AGGREGATE = "is_aggregate"; + + @SerializedName(SERIALIZED_NAME_IS_AGGREGATE) + @javax.annotation.Nullable + private String isAggregate; + + public static final String SERIALIZED_NAME_CAN_IMPORT = "can_import"; + + @SerializedName(SERIALIZED_NAME_CAN_IMPORT) + @javax.annotation.Nullable + private Boolean canImport; + + public static final String SERIALIZED_NAME_SELECTED = "selected"; + + @SerializedName(SERIALIZED_NAME_SELECTED) + @javax.annotation.Nullable + private Boolean selected; + + public static final String SERIALIZED_NAME_IS_LINKED_ACTIVE = "is_linked_active"; + + @SerializedName(SERIALIZED_NAME_IS_LINKED_ACTIVE) + @javax.annotation.Nullable + private Boolean isLinkedActive; + + public Column() {} + + public Column name(@javax.annotation.Nonnull String name) { + this.name = name; + return this; + } + + /** + * Name of the column + * + * @return name + */ + @javax.annotation.Nonnull + public String getName() { + return name; + } + + public void setName(@javax.annotation.Nonnull String name) { + this.name = name; + } + + public Column dataType(@javax.annotation.Nonnull String dataType) { + this.dataType = dataType; + return this; + } + + /** + * Data type of the column + * + * @return dataType + */ + @javax.annotation.Nonnull + public String getDataType() { + return dataType; + } + + public void setDataType(@javax.annotation.Nonnull String dataType) { + this.dataType = dataType; + } + + public Column isAggregate(@javax.annotation.Nullable String isAggregate) { + this.isAggregate = isAggregate; + return this; + } + + /** + * Determines if the column schema is an aggregate + * + * @return isAggregate + */ + @javax.annotation.Nullable + public String getIsAggregate() { + return isAggregate; + } + + public void setIsAggregate(@javax.annotation.Nullable String isAggregate) { + this.isAggregate = isAggregate; + } + + public Column canImport(@javax.annotation.Nullable Boolean canImport) { + this.canImport = canImport; + return this; + } + + /** + * Determines if the column schema can be imported + * + * @return canImport + */ + @javax.annotation.Nullable + public Boolean getCanImport() { + return canImport; + } + + public void setCanImport(@javax.annotation.Nullable Boolean canImport) { + this.canImport = canImport; + } + + public Column selected(@javax.annotation.Nullable Boolean selected) { + this.selected = selected; + return this; + } + + /** + * Determines if the table is selected + * + * @return selected + */ + @javax.annotation.Nullable + public Boolean getSelected() { + return selected; + } + + public void setSelected(@javax.annotation.Nullable Boolean selected) { + this.selected = selected; + } + + public Column isLinkedActive(@javax.annotation.Nullable Boolean isLinkedActive) { + this.isLinkedActive = isLinkedActive; + return this; + } + + /** + * Determines if the table is linked + * + * @return isLinkedActive + */ + @javax.annotation.Nullable + public Boolean getIsLinkedActive() { + return isLinkedActive; + } + + public void setIsLinkedActive(@javax.annotation.Nullable Boolean isLinkedActive) { + this.isLinkedActive = isLinkedActive; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key name of the property + * @param value value of the property + * @return the Column instance itself + */ + public Column putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return a map of objects + */ + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key name of the property + * @return an object + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + Column column = (Column) o; + return Objects.equals(this.name, column.name) + && Objects.equals(this.dataType, column.dataType) + && Objects.equals(this.isAggregate, column.isAggregate) + && Objects.equals(this.canImport, column.canImport) + && Objects.equals(this.selected, column.selected) + && Objects.equals(this.isLinkedActive, column.isLinkedActive) + && Objects.equals(this.additionalProperties, column.additionalProperties); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b + || (a != null + && b != null + && a.isPresent() + && b.isPresent() + && Objects.deepEquals(a.get(), b.get())); + } + + @Override + public int hashCode() { + return Objects.hash( + name, + dataType, + isAggregate, + canImport, + selected, + isLinkedActive, + additionalProperties); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; + } + return a.isPresent() ? Arrays.deepHashCode(new Object[] {a.get()}) : 31; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class Column {\n"); + sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append(" dataType: ").append(toIndentedString(dataType)).append("\n"); + sb.append(" isAggregate: ").append(toIndentedString(isAggregate)).append("\n"); + sb.append(" canImport: ").append(toIndentedString(canImport)).append("\n"); + sb.append(" selected: ").append(toIndentedString(selected)).append("\n"); + sb.append(" isLinkedActive: ").append(toIndentedString(isLinkedActive)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first + * line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("name"); + openapiFields.add("data_type"); + openapiFields.add("is_aggregate"); + openapiFields.add("can_import"); + openapiFields.add("selected"); + openapiFields.add("is_linked_active"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + openapiRequiredFields.add("name"); + openapiRequiredFields.add("data_type"); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to Column + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!Column.openapiRequiredFields + .isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException( + String.format( + "The required field(s) %s in Column is not found in the empty JSON" + + " string", + Column.openapiRequiredFields.toString())); + } + } + + // check to make sure all required properties/fields are present in the JSON string + for (String requiredField : Column.openapiRequiredFields) { + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException( + String.format( + "The required field `%s` is not found in the JSON string: %s", + requiredField, jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if (!jsonObj.get("name").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `name` to be a primitive type in the JSON string" + + " but got `%s`", + jsonObj.get("name").toString())); + } + if (!jsonObj.get("data_type").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `data_type` to be a primitive type in the JSON" + + " string but got `%s`", + jsonObj.get("data_type").toString())); + } + if ((jsonObj.get("is_aggregate") != null && !jsonObj.get("is_aggregate").isJsonNull()) + && !jsonObj.get("is_aggregate").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `is_aggregate` to be a primitive type in the JSON" + + " string but got `%s`", + jsonObj.get("is_aggregate").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!Column.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'Column' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter = + gson.getDelegateAdapter(this, TypeToken.get(Column.class)); + + return (TypeAdapter) + new TypeAdapter() { + @Override + public void write(JsonWriter out, Column value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + obj.remove("additionalProperties"); + // serialize additional properties + if (value.getAdditionalProperties() != null) { + for (Map.Entry entry : + value.getAdditionalProperties().entrySet()) { + if (entry.getValue() instanceof String) + obj.addProperty(entry.getKey(), (String) entry.getValue()); + else if (entry.getValue() instanceof Number) + obj.addProperty(entry.getKey(), (Number) entry.getValue()); + else if (entry.getValue() instanceof Boolean) + obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); + else if (entry.getValue() instanceof Character) + obj.addProperty( + entry.getKey(), (Character) entry.getValue()); + else { + JsonElement jsonElement = gson.toJsonTree(entry.getValue()); + if (jsonElement.isJsonArray()) { + obj.add(entry.getKey(), jsonElement.getAsJsonArray()); + } else { + obj.add(entry.getKey(), jsonElement.getAsJsonObject()); + } + } + } + } + elementAdapter.write(out, obj); + } + + @Override + public Column read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // store additional fields in the deserialized instance + Column instance = thisAdapter.fromJsonTree(jsonObj); + for (Map.Entry entry : jsonObj.entrySet()) { + if (!openapiFields.contains(entry.getKey())) { + if (entry.getValue().isJsonPrimitive()) { // primitive type + if (entry.getValue().getAsJsonPrimitive().isString()) + instance.putAdditionalProperty( + entry.getKey(), entry.getValue().getAsString()); + else if (entry.getValue().getAsJsonPrimitive().isNumber()) + instance.putAdditionalProperty( + entry.getKey(), entry.getValue().getAsNumber()); + else if (entry.getValue().getAsJsonPrimitive().isBoolean()) + instance.putAdditionalProperty( + entry.getKey(), + entry.getValue().getAsBoolean()); + else + throw new IllegalArgumentException( + String.format( + "The field `%s` has unknown primitive" + + " type. Value: %s", + entry.getKey(), + entry.getValue().toString())); + } else if (entry.getValue().isJsonArray()) { + instance.putAdditionalProperty( + entry.getKey(), + gson.fromJson(entry.getValue(), List.class)); + } else { // JSON object + instance.putAdditionalProperty( + entry.getKey(), + gson.fromJson(entry.getValue(), HashMap.class)); + } + } + } + return instance; + } + }.nullSafe(); + } + } + + /** + * Create an instance of Column given an JSON string + * + * @param jsonString JSON string + * @return An instance of Column + * @throws IOException if the JSON string is invalid with respect to Column + */ + public static Column fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, Column.class); + } + + /** + * Convert an instance of Column to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} diff --git a/sdks/java/src/main/java/com/thoughtspot/client/model/ColumnSecurityRule.java b/sdks/java/src/main/java/com/thoughtspot/client/model/ColumnSecurityRule.java new file mode 100644 index 000000000..e8072035a --- /dev/null +++ b/sdks/java/src/main/java/com/thoughtspot/client/model/ColumnSecurityRule.java @@ -0,0 +1,410 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client.model; + +import com.google.gson.Gson; +import com.google.gson.JsonArray; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.TypeAdapter; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.annotations.SerializedName; +import com.google.gson.reflect.TypeToken; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import com.thoughtspot.client.JSON; +import java.io.IOException; +import java.io.Serializable; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Objects; +import org.openapitools.jackson.nullable.JsonNullable; + +/** ColumnSecurityRule */ +@javax.annotation.Generated( + value = "org.openapitools.codegen.languages.JavaClientCodegen", + comments = "Generator version: 7.12.0") +public class ColumnSecurityRule implements Serializable { + private static final long serialVersionUID = 1L; + + public static final String SERIALIZED_NAME_COLUMN = "column"; + + @SerializedName(SERIALIZED_NAME_COLUMN) + @javax.annotation.Nonnull + private ColumnSecurityRuleColumn column; + + public static final String SERIALIZED_NAME_GROUPS = "groups"; + + @SerializedName(SERIALIZED_NAME_GROUPS) + @javax.annotation.Nullable + private List groups; + + public static final String SERIALIZED_NAME_SOURCE_TABLE_DETAILS = "source_table_details"; + + @SerializedName(SERIALIZED_NAME_SOURCE_TABLE_DETAILS) + @javax.annotation.Nullable + private ColumnSecurityRuleSourceTable sourceTableDetails; + + public ColumnSecurityRule() {} + + public ColumnSecurityRule column(@javax.annotation.Nonnull ColumnSecurityRuleColumn column) { + this.column = column; + return this; + } + + /** + * Get column + * + * @return column + */ + @javax.annotation.Nonnull + public ColumnSecurityRuleColumn getColumn() { + return column; + } + + public void setColumn(@javax.annotation.Nonnull ColumnSecurityRuleColumn column) { + this.column = column; + } + + public ColumnSecurityRule groups( + @javax.annotation.Nullable List groups) { + this.groups = groups; + return this; + } + + public ColumnSecurityRule addGroupsItem(ColumnSecurityRuleGroup groupsItem) { + if (this.groups == null) { + this.groups = new ArrayList<>(); + } + this.groups.add(groupsItem); + return this; + } + + /** + * Array of groups that have access to this column + * + * @return groups + */ + @javax.annotation.Nullable + public List getGroups() { + return groups; + } + + public void setGroups(@javax.annotation.Nullable List groups) { + this.groups = groups; + } + + public ColumnSecurityRule sourceTableDetails( + @javax.annotation.Nullable ColumnSecurityRuleSourceTable sourceTableDetails) { + this.sourceTableDetails = sourceTableDetails; + return this; + } + + /** + * Get sourceTableDetails + * + * @return sourceTableDetails + */ + @javax.annotation.Nullable + public ColumnSecurityRuleSourceTable getSourceTableDetails() { + return sourceTableDetails; + } + + public void setSourceTableDetails( + @javax.annotation.Nullable ColumnSecurityRuleSourceTable sourceTableDetails) { + this.sourceTableDetails = sourceTableDetails; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key name of the property + * @param value value of the property + * @return the ColumnSecurityRule instance itself + */ + public ColumnSecurityRule putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return a map of objects + */ + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key name of the property + * @return an object + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ColumnSecurityRule columnSecurityRule = (ColumnSecurityRule) o; + return Objects.equals(this.column, columnSecurityRule.column) + && Objects.equals(this.groups, columnSecurityRule.groups) + && Objects.equals(this.sourceTableDetails, columnSecurityRule.sourceTableDetails) + && Objects.equals( + this.additionalProperties, columnSecurityRule.additionalProperties); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b + || (a != null + && b != null + && a.isPresent() + && b.isPresent() + && Objects.deepEquals(a.get(), b.get())); + } + + @Override + public int hashCode() { + return Objects.hash(column, groups, sourceTableDetails, additionalProperties); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; + } + return a.isPresent() ? Arrays.deepHashCode(new Object[] {a.get()}) : 31; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ColumnSecurityRule {\n"); + sb.append(" column: ").append(toIndentedString(column)).append("\n"); + sb.append(" groups: ").append(toIndentedString(groups)).append("\n"); + sb.append(" sourceTableDetails: ") + .append(toIndentedString(sourceTableDetails)) + .append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first + * line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("column"); + openapiFields.add("groups"); + openapiFields.add("source_table_details"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + openapiRequiredFields.add("column"); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to ColumnSecurityRule + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!ColumnSecurityRule.openapiRequiredFields + .isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException( + String.format( + "The required field(s) %s in ColumnSecurityRule is not found in" + + " the empty JSON string", + ColumnSecurityRule.openapiRequiredFields.toString())); + } + } + + // check to make sure all required properties/fields are present in the JSON string + for (String requiredField : ColumnSecurityRule.openapiRequiredFields) { + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException( + String.format( + "The required field `%s` is not found in the JSON string: %s", + requiredField, jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // validate the required field `column` + ColumnSecurityRuleColumn.validateJsonElement(jsonObj.get("column")); + if (jsonObj.get("groups") != null && !jsonObj.get("groups").isJsonNull()) { + JsonArray jsonArraygroups = jsonObj.getAsJsonArray("groups"); + if (jsonArraygroups != null) { + // ensure the json data is an array + if (!jsonObj.get("groups").isJsonArray()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `groups` to be an array in the JSON string" + + " but got `%s`", + jsonObj.get("groups").toString())); + } + + // validate the optional field `groups` (array) + for (int i = 0; i < jsonArraygroups.size(); i++) { + ColumnSecurityRuleGroup.validateJsonElement(jsonArraygroups.get(i)); + } + ; + } + } + // validate the optional field `source_table_details` + if (jsonObj.get("source_table_details") != null + && !jsonObj.get("source_table_details").isJsonNull()) { + ColumnSecurityRuleSourceTable.validateJsonElement(jsonObj.get("source_table_details")); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!ColumnSecurityRule.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'ColumnSecurityRule' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter = + gson.getDelegateAdapter(this, TypeToken.get(ColumnSecurityRule.class)); + + return (TypeAdapter) + new TypeAdapter() { + @Override + public void write(JsonWriter out, ColumnSecurityRule value) + throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + obj.remove("additionalProperties"); + // serialize additional properties + if (value.getAdditionalProperties() != null) { + for (Map.Entry entry : + value.getAdditionalProperties().entrySet()) { + if (entry.getValue() instanceof String) + obj.addProperty(entry.getKey(), (String) entry.getValue()); + else if (entry.getValue() instanceof Number) + obj.addProperty(entry.getKey(), (Number) entry.getValue()); + else if (entry.getValue() instanceof Boolean) + obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); + else if (entry.getValue() instanceof Character) + obj.addProperty( + entry.getKey(), (Character) entry.getValue()); + else { + JsonElement jsonElement = gson.toJsonTree(entry.getValue()); + if (jsonElement.isJsonArray()) { + obj.add(entry.getKey(), jsonElement.getAsJsonArray()); + } else { + obj.add(entry.getKey(), jsonElement.getAsJsonObject()); + } + } + } + } + elementAdapter.write(out, obj); + } + + @Override + public ColumnSecurityRule read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // store additional fields in the deserialized instance + ColumnSecurityRule instance = thisAdapter.fromJsonTree(jsonObj); + for (Map.Entry entry : jsonObj.entrySet()) { + if (!openapiFields.contains(entry.getKey())) { + if (entry.getValue().isJsonPrimitive()) { // primitive type + if (entry.getValue().getAsJsonPrimitive().isString()) + instance.putAdditionalProperty( + entry.getKey(), entry.getValue().getAsString()); + else if (entry.getValue().getAsJsonPrimitive().isNumber()) + instance.putAdditionalProperty( + entry.getKey(), entry.getValue().getAsNumber()); + else if (entry.getValue().getAsJsonPrimitive().isBoolean()) + instance.putAdditionalProperty( + entry.getKey(), + entry.getValue().getAsBoolean()); + else + throw new IllegalArgumentException( + String.format( + "The field `%s` has unknown primitive" + + " type. Value: %s", + entry.getKey(), + entry.getValue().toString())); + } else if (entry.getValue().isJsonArray()) { + instance.putAdditionalProperty( + entry.getKey(), + gson.fromJson(entry.getValue(), List.class)); + } else { // JSON object + instance.putAdditionalProperty( + entry.getKey(), + gson.fromJson(entry.getValue(), HashMap.class)); + } + } + } + return instance; + } + }.nullSafe(); + } + } + + /** + * Create an instance of ColumnSecurityRule given an JSON string + * + * @param jsonString JSON string + * @return An instance of ColumnSecurityRule + * @throws IOException if the JSON string is invalid with respect to ColumnSecurityRule + */ + public static ColumnSecurityRule fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, ColumnSecurityRule.class); + } + + /** + * Convert an instance of ColumnSecurityRule to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} diff --git a/sdks/java/src/main/java/com/thoughtspot/client/model/ColumnSecurityRuleColumn.java b/sdks/java/src/main/java/com/thoughtspot/client/model/ColumnSecurityRuleColumn.java new file mode 100644 index 000000000..927e6bf7b --- /dev/null +++ b/sdks/java/src/main/java/com/thoughtspot/client/model/ColumnSecurityRuleColumn.java @@ -0,0 +1,339 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client.model; + +import com.google.gson.Gson; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.TypeAdapter; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.annotations.SerializedName; +import com.google.gson.reflect.TypeToken; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import com.thoughtspot.client.JSON; +import java.io.IOException; +import java.io.Serializable; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Objects; + +/** ColumnSecurityRuleColumn */ +@javax.annotation.Generated( + value = "org.openapitools.codegen.languages.JavaClientCodegen", + comments = "Generator version: 7.12.0") +public class ColumnSecurityRuleColumn implements Serializable { + private static final long serialVersionUID = 1L; + + public static final String SERIALIZED_NAME_ID = "id"; + + @SerializedName(SERIALIZED_NAME_ID) + @javax.annotation.Nonnull + private String id; + + public static final String SERIALIZED_NAME_NAME = "name"; + + @SerializedName(SERIALIZED_NAME_NAME) + @javax.annotation.Nonnull + private String name; + + public ColumnSecurityRuleColumn() {} + + public ColumnSecurityRuleColumn id(@javax.annotation.Nonnull String id) { + this.id = id; + return this; + } + + /** + * The unique identifier of the column + * + * @return id + */ + @javax.annotation.Nonnull + public String getId() { + return id; + } + + public void setId(@javax.annotation.Nonnull String id) { + this.id = id; + } + + public ColumnSecurityRuleColumn name(@javax.annotation.Nonnull String name) { + this.name = name; + return this; + } + + /** + * The name of the column + * + * @return name + */ + @javax.annotation.Nonnull + public String getName() { + return name; + } + + public void setName(@javax.annotation.Nonnull String name) { + this.name = name; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key name of the property + * @param value value of the property + * @return the ColumnSecurityRuleColumn instance itself + */ + public ColumnSecurityRuleColumn putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return a map of objects + */ + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key name of the property + * @return an object + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ColumnSecurityRuleColumn columnSecurityRuleColumn = (ColumnSecurityRuleColumn) o; + return Objects.equals(this.id, columnSecurityRuleColumn.id) + && Objects.equals(this.name, columnSecurityRuleColumn.name) + && Objects.equals( + this.additionalProperties, columnSecurityRuleColumn.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(id, name, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ColumnSecurityRuleColumn {\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first + * line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("id"); + openapiFields.add("name"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + openapiRequiredFields.add("id"); + openapiRequiredFields.add("name"); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to ColumnSecurityRuleColumn + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!ColumnSecurityRuleColumn.openapiRequiredFields + .isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException( + String.format( + "The required field(s) %s in ColumnSecurityRuleColumn is not found" + + " in the empty JSON string", + ColumnSecurityRuleColumn.openapiRequiredFields.toString())); + } + } + + // check to make sure all required properties/fields are present in the JSON string + for (String requiredField : ColumnSecurityRuleColumn.openapiRequiredFields) { + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException( + String.format( + "The required field `%s` is not found in the JSON string: %s", + requiredField, jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if (!jsonObj.get("id").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `id` to be a primitive type in the JSON string but" + + " got `%s`", + jsonObj.get("id").toString())); + } + if (!jsonObj.get("name").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `name` to be a primitive type in the JSON string" + + " but got `%s`", + jsonObj.get("name").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!ColumnSecurityRuleColumn.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'ColumnSecurityRuleColumn' and its + // subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter = + gson.getDelegateAdapter(this, TypeToken.get(ColumnSecurityRuleColumn.class)); + + return (TypeAdapter) + new TypeAdapter() { + @Override + public void write(JsonWriter out, ColumnSecurityRuleColumn value) + throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + obj.remove("additionalProperties"); + // serialize additional properties + if (value.getAdditionalProperties() != null) { + for (Map.Entry entry : + value.getAdditionalProperties().entrySet()) { + if (entry.getValue() instanceof String) + obj.addProperty(entry.getKey(), (String) entry.getValue()); + else if (entry.getValue() instanceof Number) + obj.addProperty(entry.getKey(), (Number) entry.getValue()); + else if (entry.getValue() instanceof Boolean) + obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); + else if (entry.getValue() instanceof Character) + obj.addProperty( + entry.getKey(), (Character) entry.getValue()); + else { + JsonElement jsonElement = gson.toJsonTree(entry.getValue()); + if (jsonElement.isJsonArray()) { + obj.add(entry.getKey(), jsonElement.getAsJsonArray()); + } else { + obj.add(entry.getKey(), jsonElement.getAsJsonObject()); + } + } + } + } + elementAdapter.write(out, obj); + } + + @Override + public ColumnSecurityRuleColumn read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // store additional fields in the deserialized instance + ColumnSecurityRuleColumn instance = thisAdapter.fromJsonTree(jsonObj); + for (Map.Entry entry : jsonObj.entrySet()) { + if (!openapiFields.contains(entry.getKey())) { + if (entry.getValue().isJsonPrimitive()) { // primitive type + if (entry.getValue().getAsJsonPrimitive().isString()) + instance.putAdditionalProperty( + entry.getKey(), entry.getValue().getAsString()); + else if (entry.getValue().getAsJsonPrimitive().isNumber()) + instance.putAdditionalProperty( + entry.getKey(), entry.getValue().getAsNumber()); + else if (entry.getValue().getAsJsonPrimitive().isBoolean()) + instance.putAdditionalProperty( + entry.getKey(), + entry.getValue().getAsBoolean()); + else + throw new IllegalArgumentException( + String.format( + "The field `%s` has unknown primitive" + + " type. Value: %s", + entry.getKey(), + entry.getValue().toString())); + } else if (entry.getValue().isJsonArray()) { + instance.putAdditionalProperty( + entry.getKey(), + gson.fromJson(entry.getValue(), List.class)); + } else { // JSON object + instance.putAdditionalProperty( + entry.getKey(), + gson.fromJson(entry.getValue(), HashMap.class)); + } + } + } + return instance; + } + }.nullSafe(); + } + } + + /** + * Create an instance of ColumnSecurityRuleColumn given an JSON string + * + * @param jsonString JSON string + * @return An instance of ColumnSecurityRuleColumn + * @throws IOException if the JSON string is invalid with respect to ColumnSecurityRuleColumn + */ + public static ColumnSecurityRuleColumn fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, ColumnSecurityRuleColumn.class); + } + + /** + * Convert an instance of ColumnSecurityRuleColumn to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} diff --git a/sdks/java/src/main/java/com/thoughtspot/client/model/ColumnSecurityRuleGroup.java b/sdks/java/src/main/java/com/thoughtspot/client/model/ColumnSecurityRuleGroup.java new file mode 100644 index 000000000..8df615e87 --- /dev/null +++ b/sdks/java/src/main/java/com/thoughtspot/client/model/ColumnSecurityRuleGroup.java @@ -0,0 +1,339 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client.model; + +import com.google.gson.Gson; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.TypeAdapter; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.annotations.SerializedName; +import com.google.gson.reflect.TypeToken; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import com.thoughtspot.client.JSON; +import java.io.IOException; +import java.io.Serializable; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Objects; + +/** ColumnSecurityRuleGroup */ +@javax.annotation.Generated( + value = "org.openapitools.codegen.languages.JavaClientCodegen", + comments = "Generator version: 7.12.0") +public class ColumnSecurityRuleGroup implements Serializable { + private static final long serialVersionUID = 1L; + + public static final String SERIALIZED_NAME_ID = "id"; + + @SerializedName(SERIALIZED_NAME_ID) + @javax.annotation.Nonnull + private String id; + + public static final String SERIALIZED_NAME_NAME = "name"; + + @SerializedName(SERIALIZED_NAME_NAME) + @javax.annotation.Nonnull + private String name; + + public ColumnSecurityRuleGroup() {} + + public ColumnSecurityRuleGroup id(@javax.annotation.Nonnull String id) { + this.id = id; + return this; + } + + /** + * The unique identifier of the group + * + * @return id + */ + @javax.annotation.Nonnull + public String getId() { + return id; + } + + public void setId(@javax.annotation.Nonnull String id) { + this.id = id; + } + + public ColumnSecurityRuleGroup name(@javax.annotation.Nonnull String name) { + this.name = name; + return this; + } + + /** + * The name of the group + * + * @return name + */ + @javax.annotation.Nonnull + public String getName() { + return name; + } + + public void setName(@javax.annotation.Nonnull String name) { + this.name = name; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key name of the property + * @param value value of the property + * @return the ColumnSecurityRuleGroup instance itself + */ + public ColumnSecurityRuleGroup putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return a map of objects + */ + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key name of the property + * @return an object + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ColumnSecurityRuleGroup columnSecurityRuleGroup = (ColumnSecurityRuleGroup) o; + return Objects.equals(this.id, columnSecurityRuleGroup.id) + && Objects.equals(this.name, columnSecurityRuleGroup.name) + && Objects.equals( + this.additionalProperties, columnSecurityRuleGroup.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(id, name, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ColumnSecurityRuleGroup {\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first + * line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("id"); + openapiFields.add("name"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + openapiRequiredFields.add("id"); + openapiRequiredFields.add("name"); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to ColumnSecurityRuleGroup + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!ColumnSecurityRuleGroup.openapiRequiredFields + .isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException( + String.format( + "The required field(s) %s in ColumnSecurityRuleGroup is not found" + + " in the empty JSON string", + ColumnSecurityRuleGroup.openapiRequiredFields.toString())); + } + } + + // check to make sure all required properties/fields are present in the JSON string + for (String requiredField : ColumnSecurityRuleGroup.openapiRequiredFields) { + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException( + String.format( + "The required field `%s` is not found in the JSON string: %s", + requiredField, jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if (!jsonObj.get("id").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `id` to be a primitive type in the JSON string but" + + " got `%s`", + jsonObj.get("id").toString())); + } + if (!jsonObj.get("name").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `name` to be a primitive type in the JSON string" + + " but got `%s`", + jsonObj.get("name").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!ColumnSecurityRuleGroup.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'ColumnSecurityRuleGroup' and its + // subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter = + gson.getDelegateAdapter(this, TypeToken.get(ColumnSecurityRuleGroup.class)); + + return (TypeAdapter) + new TypeAdapter() { + @Override + public void write(JsonWriter out, ColumnSecurityRuleGroup value) + throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + obj.remove("additionalProperties"); + // serialize additional properties + if (value.getAdditionalProperties() != null) { + for (Map.Entry entry : + value.getAdditionalProperties().entrySet()) { + if (entry.getValue() instanceof String) + obj.addProperty(entry.getKey(), (String) entry.getValue()); + else if (entry.getValue() instanceof Number) + obj.addProperty(entry.getKey(), (Number) entry.getValue()); + else if (entry.getValue() instanceof Boolean) + obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); + else if (entry.getValue() instanceof Character) + obj.addProperty( + entry.getKey(), (Character) entry.getValue()); + else { + JsonElement jsonElement = gson.toJsonTree(entry.getValue()); + if (jsonElement.isJsonArray()) { + obj.add(entry.getKey(), jsonElement.getAsJsonArray()); + } else { + obj.add(entry.getKey(), jsonElement.getAsJsonObject()); + } + } + } + } + elementAdapter.write(out, obj); + } + + @Override + public ColumnSecurityRuleGroup read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // store additional fields in the deserialized instance + ColumnSecurityRuleGroup instance = thisAdapter.fromJsonTree(jsonObj); + for (Map.Entry entry : jsonObj.entrySet()) { + if (!openapiFields.contains(entry.getKey())) { + if (entry.getValue().isJsonPrimitive()) { // primitive type + if (entry.getValue().getAsJsonPrimitive().isString()) + instance.putAdditionalProperty( + entry.getKey(), entry.getValue().getAsString()); + else if (entry.getValue().getAsJsonPrimitive().isNumber()) + instance.putAdditionalProperty( + entry.getKey(), entry.getValue().getAsNumber()); + else if (entry.getValue().getAsJsonPrimitive().isBoolean()) + instance.putAdditionalProperty( + entry.getKey(), + entry.getValue().getAsBoolean()); + else + throw new IllegalArgumentException( + String.format( + "The field `%s` has unknown primitive" + + " type. Value: %s", + entry.getKey(), + entry.getValue().toString())); + } else if (entry.getValue().isJsonArray()) { + instance.putAdditionalProperty( + entry.getKey(), + gson.fromJson(entry.getValue(), List.class)); + } else { // JSON object + instance.putAdditionalProperty( + entry.getKey(), + gson.fromJson(entry.getValue(), HashMap.class)); + } + } + } + return instance; + } + }.nullSafe(); + } + } + + /** + * Create an instance of ColumnSecurityRuleGroup given an JSON string + * + * @param jsonString JSON string + * @return An instance of ColumnSecurityRuleGroup + * @throws IOException if the JSON string is invalid with respect to ColumnSecurityRuleGroup + */ + public static ColumnSecurityRuleGroup fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, ColumnSecurityRuleGroup.class); + } + + /** + * Convert an instance of ColumnSecurityRuleGroup to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} diff --git a/sdks/java/src/main/java/com/thoughtspot/client/model/ColumnSecurityRuleGroupOperation.java b/sdks/java/src/main/java/com/thoughtspot/client/model/ColumnSecurityRuleGroupOperation.java new file mode 100644 index 000000000..656fee8d7 --- /dev/null +++ b/sdks/java/src/main/java/com/thoughtspot/client/model/ColumnSecurityRuleGroupOperation.java @@ -0,0 +1,419 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client.model; + +import com.google.gson.Gson; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.TypeAdapter; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.reflect.TypeToken; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import com.thoughtspot.client.JSON; +import java.io.IOException; +import java.io.Serializable; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Objects; + +/** ColumnSecurityRuleGroupOperation */ +@javax.annotation.Generated( + value = "org.openapitools.codegen.languages.JavaClientCodegen", + comments = "Generator version: 7.12.0") +public class ColumnSecurityRuleGroupOperation implements Serializable { + private static final long serialVersionUID = 1L; + + /** Type of operation to be performed on the groups */ + @JsonAdapter(OperationEnum.Adapter.class) + public enum OperationEnum { + ADD("ADD"), + + REMOVE("REMOVE"), + + REPLACE("REPLACE"); + + private String value; + + OperationEnum(String value) { + this.value = value; + } + + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + public static OperationEnum fromValue(String value) { + for (OperationEnum b : OperationEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + + public static class Adapter extends TypeAdapter { + @Override + public void write(final JsonWriter jsonWriter, final OperationEnum enumeration) + throws IOException { + jsonWriter.value(enumeration.getValue()); + } + + @Override + public OperationEnum read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + return OperationEnum.fromValue(value); + } + } + + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + String value = jsonElement.getAsString(); + OperationEnum.fromValue(value); + } + } + + public static final String SERIALIZED_NAME_OPERATION = "operation"; + + @SerializedName(SERIALIZED_NAME_OPERATION) + @javax.annotation.Nonnull + private OperationEnum operation; + + public static final String SERIALIZED_NAME_GROUP_IDENTIFIERS = "group_identifiers"; + + @SerializedName(SERIALIZED_NAME_GROUP_IDENTIFIERS) + @javax.annotation.Nonnull + private List groupIdentifiers; + + public ColumnSecurityRuleGroupOperation() {} + + public ColumnSecurityRuleGroupOperation operation( + @javax.annotation.Nonnull OperationEnum operation) { + this.operation = operation; + return this; + } + + /** + * Type of operation to be performed on the groups + * + * @return operation + */ + @javax.annotation.Nonnull + public OperationEnum getOperation() { + return operation; + } + + public void setOperation(@javax.annotation.Nonnull OperationEnum operation) { + this.operation = operation; + } + + public ColumnSecurityRuleGroupOperation groupIdentifiers( + @javax.annotation.Nonnull List groupIdentifiers) { + this.groupIdentifiers = groupIdentifiers; + return this; + } + + public ColumnSecurityRuleGroupOperation addGroupIdentifiersItem(String groupIdentifiersItem) { + if (this.groupIdentifiers == null) { + this.groupIdentifiers = new ArrayList<>(); + } + this.groupIdentifiers.add(groupIdentifiersItem); + return this; + } + + /** + * Array of group identifiers (name or GUID) on which the operation will be performed + * + * @return groupIdentifiers + */ + @javax.annotation.Nonnull + public List getGroupIdentifiers() { + return groupIdentifiers; + } + + public void setGroupIdentifiers(@javax.annotation.Nonnull List groupIdentifiers) { + this.groupIdentifiers = groupIdentifiers; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key name of the property + * @param value value of the property + * @return the ColumnSecurityRuleGroupOperation instance itself + */ + public ColumnSecurityRuleGroupOperation putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return a map of objects + */ + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key name of the property + * @return an object + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ColumnSecurityRuleGroupOperation columnSecurityRuleGroupOperation = + (ColumnSecurityRuleGroupOperation) o; + return Objects.equals(this.operation, columnSecurityRuleGroupOperation.operation) + && Objects.equals( + this.groupIdentifiers, columnSecurityRuleGroupOperation.groupIdentifiers) + && Objects.equals( + this.additionalProperties, + columnSecurityRuleGroupOperation.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(operation, groupIdentifiers, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ColumnSecurityRuleGroupOperation {\n"); + sb.append(" operation: ").append(toIndentedString(operation)).append("\n"); + sb.append(" groupIdentifiers: ").append(toIndentedString(groupIdentifiers)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first + * line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("operation"); + openapiFields.add("group_identifiers"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + openapiRequiredFields.add("operation"); + openapiRequiredFields.add("group_identifiers"); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to + * ColumnSecurityRuleGroupOperation + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!ColumnSecurityRuleGroupOperation.openapiRequiredFields + .isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException( + String.format( + "The required field(s) %s in ColumnSecurityRuleGroupOperation is" + + " not found in the empty JSON string", + ColumnSecurityRuleGroupOperation.openapiRequiredFields.toString())); + } + } + + // check to make sure all required properties/fields are present in the JSON string + for (String requiredField : ColumnSecurityRuleGroupOperation.openapiRequiredFields) { + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException( + String.format( + "The required field `%s` is not found in the JSON string: %s", + requiredField, jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if (!jsonObj.get("operation").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `operation` to be a primitive type in the JSON" + + " string but got `%s`", + jsonObj.get("operation").toString())); + } + // validate the required field `operation` + OperationEnum.validateJsonElement(jsonObj.get("operation")); + // ensure the required json array is present + if (jsonObj.get("group_identifiers") == null) { + throw new IllegalArgumentException( + "Expected the field `linkedContent` to be an array in the JSON string but got" + + " `null`"); + } else if (!jsonObj.get("group_identifiers").isJsonArray()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `group_identifiers` to be an array in the JSON" + + " string but got `%s`", + jsonObj.get("group_identifiers").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!ColumnSecurityRuleGroupOperation.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'ColumnSecurityRuleGroupOperation' and + // its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter = + gson.getDelegateAdapter( + this, TypeToken.get(ColumnSecurityRuleGroupOperation.class)); + + return (TypeAdapter) + new TypeAdapter() { + @Override + public void write(JsonWriter out, ColumnSecurityRuleGroupOperation value) + throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + obj.remove("additionalProperties"); + // serialize additional properties + if (value.getAdditionalProperties() != null) { + for (Map.Entry entry : + value.getAdditionalProperties().entrySet()) { + if (entry.getValue() instanceof String) + obj.addProperty(entry.getKey(), (String) entry.getValue()); + else if (entry.getValue() instanceof Number) + obj.addProperty(entry.getKey(), (Number) entry.getValue()); + else if (entry.getValue() instanceof Boolean) + obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); + else if (entry.getValue() instanceof Character) + obj.addProperty( + entry.getKey(), (Character) entry.getValue()); + else { + JsonElement jsonElement = gson.toJsonTree(entry.getValue()); + if (jsonElement.isJsonArray()) { + obj.add(entry.getKey(), jsonElement.getAsJsonArray()); + } else { + obj.add(entry.getKey(), jsonElement.getAsJsonObject()); + } + } + } + } + elementAdapter.write(out, obj); + } + + @Override + public ColumnSecurityRuleGroupOperation read(JsonReader in) + throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // store additional fields in the deserialized instance + ColumnSecurityRuleGroupOperation instance = + thisAdapter.fromJsonTree(jsonObj); + for (Map.Entry entry : jsonObj.entrySet()) { + if (!openapiFields.contains(entry.getKey())) { + if (entry.getValue().isJsonPrimitive()) { // primitive type + if (entry.getValue().getAsJsonPrimitive().isString()) + instance.putAdditionalProperty( + entry.getKey(), entry.getValue().getAsString()); + else if (entry.getValue().getAsJsonPrimitive().isNumber()) + instance.putAdditionalProperty( + entry.getKey(), entry.getValue().getAsNumber()); + else if (entry.getValue().getAsJsonPrimitive().isBoolean()) + instance.putAdditionalProperty( + entry.getKey(), + entry.getValue().getAsBoolean()); + else + throw new IllegalArgumentException( + String.format( + "The field `%s` has unknown primitive" + + " type. Value: %s", + entry.getKey(), + entry.getValue().toString())); + } else if (entry.getValue().isJsonArray()) { + instance.putAdditionalProperty( + entry.getKey(), + gson.fromJson(entry.getValue(), List.class)); + } else { // JSON object + instance.putAdditionalProperty( + entry.getKey(), + gson.fromJson(entry.getValue(), HashMap.class)); + } + } + } + return instance; + } + }.nullSafe(); + } + } + + /** + * Create an instance of ColumnSecurityRuleGroupOperation given an JSON string + * + * @param jsonString JSON string + * @return An instance of ColumnSecurityRuleGroupOperation + * @throws IOException if the JSON string is invalid with respect to + * ColumnSecurityRuleGroupOperation + */ + public static ColumnSecurityRuleGroupOperation fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, ColumnSecurityRuleGroupOperation.class); + } + + /** + * Convert an instance of ColumnSecurityRuleGroupOperation to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} diff --git a/sdks/java/src/main/java/com/thoughtspot/client/model/ColumnSecurityRuleResponse.java b/sdks/java/src/main/java/com/thoughtspot/client/model/ColumnSecurityRuleResponse.java new file mode 100644 index 000000000..f82b77b88 --- /dev/null +++ b/sdks/java/src/main/java/com/thoughtspot/client/model/ColumnSecurityRuleResponse.java @@ -0,0 +1,412 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client.model; + +import com.google.gson.Gson; +import com.google.gson.JsonArray; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.TypeAdapter; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.annotations.SerializedName; +import com.google.gson.reflect.TypeToken; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import com.thoughtspot.client.JSON; +import java.io.IOException; +import java.io.Serializable; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Objects; +import org.openapitools.jackson.nullable.JsonNullable; + +/** ColumnSecurityRuleResponse */ +@javax.annotation.Generated( + value = "org.openapitools.codegen.languages.JavaClientCodegen", + comments = "Generator version: 7.12.0") +public class ColumnSecurityRuleResponse implements Serializable { + private static final long serialVersionUID = 1L; + + public static final String SERIALIZED_NAME_TABLE_GUID = "table_guid"; + + @SerializedName(SERIALIZED_NAME_TABLE_GUID) + @javax.annotation.Nullable + private String tableGuid; + + public static final String SERIALIZED_NAME_OBJ_ID = "obj_id"; + + @SerializedName(SERIALIZED_NAME_OBJ_ID) + @javax.annotation.Nullable + private String objId; + + public static final String SERIALIZED_NAME_COLUMN_SECURITY_RULES = "column_security_rules"; + + @SerializedName(SERIALIZED_NAME_COLUMN_SECURITY_RULES) + @javax.annotation.Nullable + private List columnSecurityRules; + + public ColumnSecurityRuleResponse() {} + + public ColumnSecurityRuleResponse tableGuid(@javax.annotation.Nullable String tableGuid) { + this.tableGuid = tableGuid; + return this; + } + + /** + * GUID of the table for which the column security rules are fetched + * + * @return tableGuid + */ + @javax.annotation.Nullable + public String getTableGuid() { + return tableGuid; + } + + public void setTableGuid(@javax.annotation.Nullable String tableGuid) { + this.tableGuid = tableGuid; + } + + public ColumnSecurityRuleResponse objId(@javax.annotation.Nullable String objId) { + this.objId = objId; + return this; + } + + /** + * Object ID of the table for which the column security rules are fetched + * + * @return objId + */ + @javax.annotation.Nullable + public String getObjId() { + return objId; + } + + public void setObjId(@javax.annotation.Nullable String objId) { + this.objId = objId; + } + + public ColumnSecurityRuleResponse columnSecurityRules( + @javax.annotation.Nullable List columnSecurityRules) { + this.columnSecurityRules = columnSecurityRules; + return this; + } + + public ColumnSecurityRuleResponse addColumnSecurityRulesItem( + ColumnSecurityRule columnSecurityRulesItem) { + if (this.columnSecurityRules == null) { + this.columnSecurityRules = new ArrayList<>(); + } + this.columnSecurityRules.add(columnSecurityRulesItem); + return this; + } + + /** + * Array containing column security rule objects + * + * @return columnSecurityRules + */ + @javax.annotation.Nullable + public List getColumnSecurityRules() { + return columnSecurityRules; + } + + public void setColumnSecurityRules( + @javax.annotation.Nullable List columnSecurityRules) { + this.columnSecurityRules = columnSecurityRules; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key name of the property + * @param value value of the property + * @return the ColumnSecurityRuleResponse instance itself + */ + public ColumnSecurityRuleResponse putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return a map of objects + */ + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key name of the property + * @return an object + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ColumnSecurityRuleResponse columnSecurityRuleResponse = (ColumnSecurityRuleResponse) o; + return Objects.equals(this.tableGuid, columnSecurityRuleResponse.tableGuid) + && Objects.equals(this.objId, columnSecurityRuleResponse.objId) + && Objects.equals( + this.columnSecurityRules, columnSecurityRuleResponse.columnSecurityRules) + && Objects.equals( + this.additionalProperties, columnSecurityRuleResponse.additionalProperties); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b + || (a != null + && b != null + && a.isPresent() + && b.isPresent() + && Objects.deepEquals(a.get(), b.get())); + } + + @Override + public int hashCode() { + return Objects.hash(tableGuid, objId, columnSecurityRules, additionalProperties); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; + } + return a.isPresent() ? Arrays.deepHashCode(new Object[] {a.get()}) : 31; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ColumnSecurityRuleResponse {\n"); + sb.append(" tableGuid: ").append(toIndentedString(tableGuid)).append("\n"); + sb.append(" objId: ").append(toIndentedString(objId)).append("\n"); + sb.append(" columnSecurityRules: ") + .append(toIndentedString(columnSecurityRules)) + .append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first + * line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("table_guid"); + openapiFields.add("obj_id"); + openapiFields.add("column_security_rules"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to ColumnSecurityRuleResponse + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!ColumnSecurityRuleResponse.openapiRequiredFields + .isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException( + String.format( + "The required field(s) %s in ColumnSecurityRuleResponse is not" + + " found in the empty JSON string", + ColumnSecurityRuleResponse.openapiRequiredFields.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if ((jsonObj.get("table_guid") != null && !jsonObj.get("table_guid").isJsonNull()) + && !jsonObj.get("table_guid").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `table_guid` to be a primitive type in the JSON" + + " string but got `%s`", + jsonObj.get("table_guid").toString())); + } + if ((jsonObj.get("obj_id") != null && !jsonObj.get("obj_id").isJsonNull()) + && !jsonObj.get("obj_id").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `obj_id` to be a primitive type in the JSON string" + + " but got `%s`", + jsonObj.get("obj_id").toString())); + } + if (jsonObj.get("column_security_rules") != null + && !jsonObj.get("column_security_rules").isJsonNull()) { + JsonArray jsonArraycolumnSecurityRules = + jsonObj.getAsJsonArray("column_security_rules"); + if (jsonArraycolumnSecurityRules != null) { + // ensure the json data is an array + if (!jsonObj.get("column_security_rules").isJsonArray()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `column_security_rules` to be an array in" + + " the JSON string but got `%s`", + jsonObj.get("column_security_rules").toString())); + } + + // validate the optional field `column_security_rules` (array) + for (int i = 0; i < jsonArraycolumnSecurityRules.size(); i++) { + ColumnSecurityRule.validateJsonElement(jsonArraycolumnSecurityRules.get(i)); + } + ; + } + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!ColumnSecurityRuleResponse.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'ColumnSecurityRuleResponse' and its + // subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter = + gson.getDelegateAdapter(this, TypeToken.get(ColumnSecurityRuleResponse.class)); + + return (TypeAdapter) + new TypeAdapter() { + @Override + public void write(JsonWriter out, ColumnSecurityRuleResponse value) + throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + obj.remove("additionalProperties"); + // serialize additional properties + if (value.getAdditionalProperties() != null) { + for (Map.Entry entry : + value.getAdditionalProperties().entrySet()) { + if (entry.getValue() instanceof String) + obj.addProperty(entry.getKey(), (String) entry.getValue()); + else if (entry.getValue() instanceof Number) + obj.addProperty(entry.getKey(), (Number) entry.getValue()); + else if (entry.getValue() instanceof Boolean) + obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); + else if (entry.getValue() instanceof Character) + obj.addProperty( + entry.getKey(), (Character) entry.getValue()); + else { + JsonElement jsonElement = gson.toJsonTree(entry.getValue()); + if (jsonElement.isJsonArray()) { + obj.add(entry.getKey(), jsonElement.getAsJsonArray()); + } else { + obj.add(entry.getKey(), jsonElement.getAsJsonObject()); + } + } + } + } + elementAdapter.write(out, obj); + } + + @Override + public ColumnSecurityRuleResponse read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // store additional fields in the deserialized instance + ColumnSecurityRuleResponse instance = thisAdapter.fromJsonTree(jsonObj); + for (Map.Entry entry : jsonObj.entrySet()) { + if (!openapiFields.contains(entry.getKey())) { + if (entry.getValue().isJsonPrimitive()) { // primitive type + if (entry.getValue().getAsJsonPrimitive().isString()) + instance.putAdditionalProperty( + entry.getKey(), entry.getValue().getAsString()); + else if (entry.getValue().getAsJsonPrimitive().isNumber()) + instance.putAdditionalProperty( + entry.getKey(), entry.getValue().getAsNumber()); + else if (entry.getValue().getAsJsonPrimitive().isBoolean()) + instance.putAdditionalProperty( + entry.getKey(), + entry.getValue().getAsBoolean()); + else + throw new IllegalArgumentException( + String.format( + "The field `%s` has unknown primitive" + + " type. Value: %s", + entry.getKey(), + entry.getValue().toString())); + } else if (entry.getValue().isJsonArray()) { + instance.putAdditionalProperty( + entry.getKey(), + gson.fromJson(entry.getValue(), List.class)); + } else { // JSON object + instance.putAdditionalProperty( + entry.getKey(), + gson.fromJson(entry.getValue(), HashMap.class)); + } + } + } + return instance; + } + }.nullSafe(); + } + } + + /** + * Create an instance of ColumnSecurityRuleResponse given an JSON string + * + * @param jsonString JSON string + * @return An instance of ColumnSecurityRuleResponse + * @throws IOException if the JSON string is invalid with respect to ColumnSecurityRuleResponse + */ + public static ColumnSecurityRuleResponse fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, ColumnSecurityRuleResponse.class); + } + + /** + * Convert an instance of ColumnSecurityRuleResponse to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} diff --git a/sdks/java/src/main/java/com/thoughtspot/client/model/ColumnSecurityRuleSourceTable.java b/sdks/java/src/main/java/com/thoughtspot/client/model/ColumnSecurityRuleSourceTable.java new file mode 100644 index 000000000..51dba504d --- /dev/null +++ b/sdks/java/src/main/java/com/thoughtspot/client/model/ColumnSecurityRuleSourceTable.java @@ -0,0 +1,346 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client.model; + +import com.google.gson.Gson; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.TypeAdapter; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.annotations.SerializedName; +import com.google.gson.reflect.TypeToken; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import com.thoughtspot.client.JSON; +import java.io.IOException; +import java.io.Serializable; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Objects; + +/** ColumnSecurityRuleSourceTable */ +@javax.annotation.Generated( + value = "org.openapitools.codegen.languages.JavaClientCodegen", + comments = "Generator version: 7.12.0") +public class ColumnSecurityRuleSourceTable implements Serializable { + private static final long serialVersionUID = 1L; + + public static final String SERIALIZED_NAME_ID = "id"; + + @SerializedName(SERIALIZED_NAME_ID) + @javax.annotation.Nonnull + private String id; + + public static final String SERIALIZED_NAME_NAME = "name"; + + @SerializedName(SERIALIZED_NAME_NAME) + @javax.annotation.Nonnull + private String name; + + public ColumnSecurityRuleSourceTable() {} + + public ColumnSecurityRuleSourceTable id(@javax.annotation.Nonnull String id) { + this.id = id; + return this; + } + + /** + * The unique identifier of the source table + * + * @return id + */ + @javax.annotation.Nonnull + public String getId() { + return id; + } + + public void setId(@javax.annotation.Nonnull String id) { + this.id = id; + } + + public ColumnSecurityRuleSourceTable name(@javax.annotation.Nonnull String name) { + this.name = name; + return this; + } + + /** + * The name of the source table + * + * @return name + */ + @javax.annotation.Nonnull + public String getName() { + return name; + } + + public void setName(@javax.annotation.Nonnull String name) { + this.name = name; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key name of the property + * @param value value of the property + * @return the ColumnSecurityRuleSourceTable instance itself + */ + public ColumnSecurityRuleSourceTable putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return a map of objects + */ + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key name of the property + * @return an object + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ColumnSecurityRuleSourceTable columnSecurityRuleSourceTable = + (ColumnSecurityRuleSourceTable) o; + return Objects.equals(this.id, columnSecurityRuleSourceTable.id) + && Objects.equals(this.name, columnSecurityRuleSourceTable.name) + && Objects.equals( + this.additionalProperties, + columnSecurityRuleSourceTable.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(id, name, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ColumnSecurityRuleSourceTable {\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first + * line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("id"); + openapiFields.add("name"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + openapiRequiredFields.add("id"); + openapiRequiredFields.add("name"); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to + * ColumnSecurityRuleSourceTable + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!ColumnSecurityRuleSourceTable.openapiRequiredFields + .isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException( + String.format( + "The required field(s) %s in ColumnSecurityRuleSourceTable is not" + + " found in the empty JSON string", + ColumnSecurityRuleSourceTable.openapiRequiredFields.toString())); + } + } + + // check to make sure all required properties/fields are present in the JSON string + for (String requiredField : ColumnSecurityRuleSourceTable.openapiRequiredFields) { + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException( + String.format( + "The required field `%s` is not found in the JSON string: %s", + requiredField, jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if (!jsonObj.get("id").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `id` to be a primitive type in the JSON string but" + + " got `%s`", + jsonObj.get("id").toString())); + } + if (!jsonObj.get("name").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `name` to be a primitive type in the JSON string" + + " but got `%s`", + jsonObj.get("name").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!ColumnSecurityRuleSourceTable.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'ColumnSecurityRuleSourceTable' and its + // subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter = + gson.getDelegateAdapter( + this, TypeToken.get(ColumnSecurityRuleSourceTable.class)); + + return (TypeAdapter) + new TypeAdapter() { + @Override + public void write(JsonWriter out, ColumnSecurityRuleSourceTable value) + throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + obj.remove("additionalProperties"); + // serialize additional properties + if (value.getAdditionalProperties() != null) { + for (Map.Entry entry : + value.getAdditionalProperties().entrySet()) { + if (entry.getValue() instanceof String) + obj.addProperty(entry.getKey(), (String) entry.getValue()); + else if (entry.getValue() instanceof Number) + obj.addProperty(entry.getKey(), (Number) entry.getValue()); + else if (entry.getValue() instanceof Boolean) + obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); + else if (entry.getValue() instanceof Character) + obj.addProperty( + entry.getKey(), (Character) entry.getValue()); + else { + JsonElement jsonElement = gson.toJsonTree(entry.getValue()); + if (jsonElement.isJsonArray()) { + obj.add(entry.getKey(), jsonElement.getAsJsonArray()); + } else { + obj.add(entry.getKey(), jsonElement.getAsJsonObject()); + } + } + } + } + elementAdapter.write(out, obj); + } + + @Override + public ColumnSecurityRuleSourceTable read(JsonReader in) + throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // store additional fields in the deserialized instance + ColumnSecurityRuleSourceTable instance = + thisAdapter.fromJsonTree(jsonObj); + for (Map.Entry entry : jsonObj.entrySet()) { + if (!openapiFields.contains(entry.getKey())) { + if (entry.getValue().isJsonPrimitive()) { // primitive type + if (entry.getValue().getAsJsonPrimitive().isString()) + instance.putAdditionalProperty( + entry.getKey(), entry.getValue().getAsString()); + else if (entry.getValue().getAsJsonPrimitive().isNumber()) + instance.putAdditionalProperty( + entry.getKey(), entry.getValue().getAsNumber()); + else if (entry.getValue().getAsJsonPrimitive().isBoolean()) + instance.putAdditionalProperty( + entry.getKey(), + entry.getValue().getAsBoolean()); + else + throw new IllegalArgumentException( + String.format( + "The field `%s` has unknown primitive" + + " type. Value: %s", + entry.getKey(), + entry.getValue().toString())); + } else if (entry.getValue().isJsonArray()) { + instance.putAdditionalProperty( + entry.getKey(), + gson.fromJson(entry.getValue(), List.class)); + } else { // JSON object + instance.putAdditionalProperty( + entry.getKey(), + gson.fromJson(entry.getValue(), HashMap.class)); + } + } + } + return instance; + } + }.nullSafe(); + } + } + + /** + * Create an instance of ColumnSecurityRuleSourceTable given an JSON string + * + * @param jsonString JSON string + * @return An instance of ColumnSecurityRuleSourceTable + * @throws IOException if the JSON string is invalid with respect to + * ColumnSecurityRuleSourceTable + */ + public static ColumnSecurityRuleSourceTable fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, ColumnSecurityRuleSourceTable.class); + } + + /** + * Convert an instance of ColumnSecurityRuleSourceTable to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} diff --git a/sdks/java/src/main/java/com/thoughtspot/client/model/ColumnSecurityRuleTableInput.java b/sdks/java/src/main/java/com/thoughtspot/client/model/ColumnSecurityRuleTableInput.java new file mode 100644 index 000000000..04c355dbc --- /dev/null +++ b/sdks/java/src/main/java/com/thoughtspot/client/model/ColumnSecurityRuleTableInput.java @@ -0,0 +1,354 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client.model; + +import com.google.gson.Gson; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.TypeAdapter; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.annotations.SerializedName; +import com.google.gson.reflect.TypeToken; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import com.thoughtspot.client.JSON; +import java.io.IOException; +import java.io.Serializable; +import java.util.Arrays; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Objects; +import org.openapitools.jackson.nullable.JsonNullable; + +/** ColumnSecurityRuleTableInput */ +@javax.annotation.Generated( + value = "org.openapitools.codegen.languages.JavaClientCodegen", + comments = "Generator version: 7.12.0") +public class ColumnSecurityRuleTableInput implements Serializable { + private static final long serialVersionUID = 1L; + + public static final String SERIALIZED_NAME_IDENTIFIER = "identifier"; + + @SerializedName(SERIALIZED_NAME_IDENTIFIER) + @javax.annotation.Nullable + private String identifier; + + public static final String SERIALIZED_NAME_OBJ_IDENTIFIER = "obj_identifier"; + + @SerializedName(SERIALIZED_NAME_OBJ_IDENTIFIER) + @javax.annotation.Nullable + private String objIdentifier; + + public ColumnSecurityRuleTableInput() {} + + public ColumnSecurityRuleTableInput identifier(@javax.annotation.Nullable String identifier) { + this.identifier = identifier; + return this; + } + + /** + * Name or GUID of the table + * + * @return identifier + */ + @javax.annotation.Nullable + public String getIdentifier() { + return identifier; + } + + public void setIdentifier(@javax.annotation.Nullable String identifier) { + this.identifier = identifier; + } + + public ColumnSecurityRuleTableInput objIdentifier( + @javax.annotation.Nullable String objIdentifier) { + this.objIdentifier = objIdentifier; + return this; + } + + /** + * Object ID of the table + * + * @return objIdentifier + */ + @javax.annotation.Nullable + public String getObjIdentifier() { + return objIdentifier; + } + + public void setObjIdentifier(@javax.annotation.Nullable String objIdentifier) { + this.objIdentifier = objIdentifier; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key name of the property + * @param value value of the property + * @return the ColumnSecurityRuleTableInput instance itself + */ + public ColumnSecurityRuleTableInput putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return a map of objects + */ + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key name of the property + * @return an object + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ColumnSecurityRuleTableInput columnSecurityRuleTableInput = + (ColumnSecurityRuleTableInput) o; + return Objects.equals(this.identifier, columnSecurityRuleTableInput.identifier) + && Objects.equals(this.objIdentifier, columnSecurityRuleTableInput.objIdentifier) + && Objects.equals( + this.additionalProperties, + columnSecurityRuleTableInput.additionalProperties); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b + || (a != null + && b != null + && a.isPresent() + && b.isPresent() + && Objects.deepEquals(a.get(), b.get())); + } + + @Override + public int hashCode() { + return Objects.hash(identifier, objIdentifier, additionalProperties); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; + } + return a.isPresent() ? Arrays.deepHashCode(new Object[] {a.get()}) : 31; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ColumnSecurityRuleTableInput {\n"); + sb.append(" identifier: ").append(toIndentedString(identifier)).append("\n"); + sb.append(" objIdentifier: ").append(toIndentedString(objIdentifier)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first + * line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("identifier"); + openapiFields.add("obj_identifier"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to + * ColumnSecurityRuleTableInput + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!ColumnSecurityRuleTableInput.openapiRequiredFields + .isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException( + String.format( + "The required field(s) %s in ColumnSecurityRuleTableInput is not" + + " found in the empty JSON string", + ColumnSecurityRuleTableInput.openapiRequiredFields.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if ((jsonObj.get("identifier") != null && !jsonObj.get("identifier").isJsonNull()) + && !jsonObj.get("identifier").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `identifier` to be a primitive type in the JSON" + + " string but got `%s`", + jsonObj.get("identifier").toString())); + } + if ((jsonObj.get("obj_identifier") != null && !jsonObj.get("obj_identifier").isJsonNull()) + && !jsonObj.get("obj_identifier").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `obj_identifier` to be a primitive type in the" + + " JSON string but got `%s`", + jsonObj.get("obj_identifier").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!ColumnSecurityRuleTableInput.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'ColumnSecurityRuleTableInput' and its + // subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter = + gson.getDelegateAdapter( + this, TypeToken.get(ColumnSecurityRuleTableInput.class)); + + return (TypeAdapter) + new TypeAdapter() { + @Override + public void write(JsonWriter out, ColumnSecurityRuleTableInput value) + throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + obj.remove("additionalProperties"); + // serialize additional properties + if (value.getAdditionalProperties() != null) { + for (Map.Entry entry : + value.getAdditionalProperties().entrySet()) { + if (entry.getValue() instanceof String) + obj.addProperty(entry.getKey(), (String) entry.getValue()); + else if (entry.getValue() instanceof Number) + obj.addProperty(entry.getKey(), (Number) entry.getValue()); + else if (entry.getValue() instanceof Boolean) + obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); + else if (entry.getValue() instanceof Character) + obj.addProperty( + entry.getKey(), (Character) entry.getValue()); + else { + JsonElement jsonElement = gson.toJsonTree(entry.getValue()); + if (jsonElement.isJsonArray()) { + obj.add(entry.getKey(), jsonElement.getAsJsonArray()); + } else { + obj.add(entry.getKey(), jsonElement.getAsJsonObject()); + } + } + } + } + elementAdapter.write(out, obj); + } + + @Override + public ColumnSecurityRuleTableInput read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // store additional fields in the deserialized instance + ColumnSecurityRuleTableInput instance = + thisAdapter.fromJsonTree(jsonObj); + for (Map.Entry entry : jsonObj.entrySet()) { + if (!openapiFields.contains(entry.getKey())) { + if (entry.getValue().isJsonPrimitive()) { // primitive type + if (entry.getValue().getAsJsonPrimitive().isString()) + instance.putAdditionalProperty( + entry.getKey(), entry.getValue().getAsString()); + else if (entry.getValue().getAsJsonPrimitive().isNumber()) + instance.putAdditionalProperty( + entry.getKey(), entry.getValue().getAsNumber()); + else if (entry.getValue().getAsJsonPrimitive().isBoolean()) + instance.putAdditionalProperty( + entry.getKey(), + entry.getValue().getAsBoolean()); + else + throw new IllegalArgumentException( + String.format( + "The field `%s` has unknown primitive" + + " type. Value: %s", + entry.getKey(), + entry.getValue().toString())); + } else if (entry.getValue().isJsonArray()) { + instance.putAdditionalProperty( + entry.getKey(), + gson.fromJson(entry.getValue(), List.class)); + } else { // JSON object + instance.putAdditionalProperty( + entry.getKey(), + gson.fromJson(entry.getValue(), HashMap.class)); + } + } + } + return instance; + } + }.nullSafe(); + } + } + + /** + * Create an instance of ColumnSecurityRuleTableInput given an JSON string + * + * @param jsonString JSON string + * @return An instance of ColumnSecurityRuleTableInput + * @throws IOException if the JSON string is invalid with respect to + * ColumnSecurityRuleTableInput + */ + public static ColumnSecurityRuleTableInput fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, ColumnSecurityRuleTableInput.class); + } + + /** + * Convert an instance of ColumnSecurityRuleTableInput to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} diff --git a/sdks/java/src/main/java/com/thoughtspot/client/model/ColumnSecurityRuleUpdate.java b/sdks/java/src/main/java/com/thoughtspot/client/model/ColumnSecurityRuleUpdate.java new file mode 100644 index 000000000..0c294bc4a --- /dev/null +++ b/sdks/java/src/main/java/com/thoughtspot/client/model/ColumnSecurityRuleUpdate.java @@ -0,0 +1,413 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client.model; + +import com.google.gson.Gson; +import com.google.gson.JsonArray; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.TypeAdapter; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.annotations.SerializedName; +import com.google.gson.reflect.TypeToken; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import com.thoughtspot.client.JSON; +import java.io.IOException; +import java.io.Serializable; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Objects; +import org.openapitools.jackson.nullable.JsonNullable; + +/** ColumnSecurityRuleUpdate */ +@javax.annotation.Generated( + value = "org.openapitools.codegen.languages.JavaClientCodegen", + comments = "Generator version: 7.12.0") +public class ColumnSecurityRuleUpdate implements Serializable { + private static final long serialVersionUID = 1L; + + public static final String SERIALIZED_NAME_COLUMN_IDENTIFIER = "column_identifier"; + + @SerializedName(SERIALIZED_NAME_COLUMN_IDENTIFIER) + @javax.annotation.Nonnull + private String columnIdentifier; + + public static final String SERIALIZED_NAME_IS_UNSECURED = "is_unsecured"; + + @SerializedName(SERIALIZED_NAME_IS_UNSECURED) + @javax.annotation.Nullable + private Boolean isUnsecured; + + public static final String SERIALIZED_NAME_GROUP_ACCESS = "group_access"; + + @SerializedName(SERIALIZED_NAME_GROUP_ACCESS) + @javax.annotation.Nullable + private List groupAccess; + + public ColumnSecurityRuleUpdate() {} + + public ColumnSecurityRuleUpdate columnIdentifier( + @javax.annotation.Nonnull String columnIdentifier) { + this.columnIdentifier = columnIdentifier; + return this; + } + + /** + * Column identifier (col_id or name) + * + * @return columnIdentifier + */ + @javax.annotation.Nonnull + public String getColumnIdentifier() { + return columnIdentifier; + } + + public void setColumnIdentifier(@javax.annotation.Nonnull String columnIdentifier) { + this.columnIdentifier = columnIdentifier; + } + + public ColumnSecurityRuleUpdate isUnsecured(@javax.annotation.Nullable Boolean isUnsecured) { + this.isUnsecured = isUnsecured; + return this; + } + + /** + * If true, the column will be marked as unprotected and all groups associated with it will be + * removed + * + * @return isUnsecured + */ + @javax.annotation.Nullable + public Boolean getIsUnsecured() { + return isUnsecured; + } + + public void setIsUnsecured(@javax.annotation.Nullable Boolean isUnsecured) { + this.isUnsecured = isUnsecured; + } + + public ColumnSecurityRuleUpdate groupAccess( + @javax.annotation.Nullable List groupAccess) { + this.groupAccess = groupAccess; + return this; + } + + public ColumnSecurityRuleUpdate addGroupAccessItem( + ColumnSecurityRuleGroupOperation groupAccessItem) { + if (this.groupAccess == null) { + this.groupAccess = new ArrayList<>(); + } + this.groupAccess.add(groupAccessItem); + return this; + } + + /** + * Array of group operation objects that specifies the actions for groups to be associated with + * a column + * + * @return groupAccess + */ + @javax.annotation.Nullable + public List getGroupAccess() { + return groupAccess; + } + + public void setGroupAccess( + @javax.annotation.Nullable List groupAccess) { + this.groupAccess = groupAccess; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key name of the property + * @param value value of the property + * @return the ColumnSecurityRuleUpdate instance itself + */ + public ColumnSecurityRuleUpdate putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return a map of objects + */ + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key name of the property + * @return an object + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ColumnSecurityRuleUpdate columnSecurityRuleUpdate = (ColumnSecurityRuleUpdate) o; + return Objects.equals(this.columnIdentifier, columnSecurityRuleUpdate.columnIdentifier) + && Objects.equals(this.isUnsecured, columnSecurityRuleUpdate.isUnsecured) + && Objects.equals(this.groupAccess, columnSecurityRuleUpdate.groupAccess) + && Objects.equals( + this.additionalProperties, columnSecurityRuleUpdate.additionalProperties); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b + || (a != null + && b != null + && a.isPresent() + && b.isPresent() + && Objects.deepEquals(a.get(), b.get())); + } + + @Override + public int hashCode() { + return Objects.hash(columnIdentifier, isUnsecured, groupAccess, additionalProperties); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; + } + return a.isPresent() ? Arrays.deepHashCode(new Object[] {a.get()}) : 31; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ColumnSecurityRuleUpdate {\n"); + sb.append(" columnIdentifier: ").append(toIndentedString(columnIdentifier)).append("\n"); + sb.append(" isUnsecured: ").append(toIndentedString(isUnsecured)).append("\n"); + sb.append(" groupAccess: ").append(toIndentedString(groupAccess)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first + * line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("column_identifier"); + openapiFields.add("is_unsecured"); + openapiFields.add("group_access"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + openapiRequiredFields.add("column_identifier"); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to ColumnSecurityRuleUpdate + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!ColumnSecurityRuleUpdate.openapiRequiredFields + .isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException( + String.format( + "The required field(s) %s in ColumnSecurityRuleUpdate is not found" + + " in the empty JSON string", + ColumnSecurityRuleUpdate.openapiRequiredFields.toString())); + } + } + + // check to make sure all required properties/fields are present in the JSON string + for (String requiredField : ColumnSecurityRuleUpdate.openapiRequiredFields) { + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException( + String.format( + "The required field `%s` is not found in the JSON string: %s", + requiredField, jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if (!jsonObj.get("column_identifier").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `column_identifier` to be a primitive type in the" + + " JSON string but got `%s`", + jsonObj.get("column_identifier").toString())); + } + if (jsonObj.get("group_access") != null && !jsonObj.get("group_access").isJsonNull()) { + JsonArray jsonArraygroupAccess = jsonObj.getAsJsonArray("group_access"); + if (jsonArraygroupAccess != null) { + // ensure the json data is an array + if (!jsonObj.get("group_access").isJsonArray()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `group_access` to be an array in the JSON" + + " string but got `%s`", + jsonObj.get("group_access").toString())); + } + + // validate the optional field `group_access` (array) + for (int i = 0; i < jsonArraygroupAccess.size(); i++) { + ColumnSecurityRuleGroupOperation.validateJsonElement( + jsonArraygroupAccess.get(i)); + } + ; + } + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!ColumnSecurityRuleUpdate.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'ColumnSecurityRuleUpdate' and its + // subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter = + gson.getDelegateAdapter(this, TypeToken.get(ColumnSecurityRuleUpdate.class)); + + return (TypeAdapter) + new TypeAdapter() { + @Override + public void write(JsonWriter out, ColumnSecurityRuleUpdate value) + throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + obj.remove("additionalProperties"); + // serialize additional properties + if (value.getAdditionalProperties() != null) { + for (Map.Entry entry : + value.getAdditionalProperties().entrySet()) { + if (entry.getValue() instanceof String) + obj.addProperty(entry.getKey(), (String) entry.getValue()); + else if (entry.getValue() instanceof Number) + obj.addProperty(entry.getKey(), (Number) entry.getValue()); + else if (entry.getValue() instanceof Boolean) + obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); + else if (entry.getValue() instanceof Character) + obj.addProperty( + entry.getKey(), (Character) entry.getValue()); + else { + JsonElement jsonElement = gson.toJsonTree(entry.getValue()); + if (jsonElement.isJsonArray()) { + obj.add(entry.getKey(), jsonElement.getAsJsonArray()); + } else { + obj.add(entry.getKey(), jsonElement.getAsJsonObject()); + } + } + } + } + elementAdapter.write(out, obj); + } + + @Override + public ColumnSecurityRuleUpdate read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // store additional fields in the deserialized instance + ColumnSecurityRuleUpdate instance = thisAdapter.fromJsonTree(jsonObj); + for (Map.Entry entry : jsonObj.entrySet()) { + if (!openapiFields.contains(entry.getKey())) { + if (entry.getValue().isJsonPrimitive()) { // primitive type + if (entry.getValue().getAsJsonPrimitive().isString()) + instance.putAdditionalProperty( + entry.getKey(), entry.getValue().getAsString()); + else if (entry.getValue().getAsJsonPrimitive().isNumber()) + instance.putAdditionalProperty( + entry.getKey(), entry.getValue().getAsNumber()); + else if (entry.getValue().getAsJsonPrimitive().isBoolean()) + instance.putAdditionalProperty( + entry.getKey(), + entry.getValue().getAsBoolean()); + else + throw new IllegalArgumentException( + String.format( + "The field `%s` has unknown primitive" + + " type. Value: %s", + entry.getKey(), + entry.getValue().toString())); + } else if (entry.getValue().isJsonArray()) { + instance.putAdditionalProperty( + entry.getKey(), + gson.fromJson(entry.getValue(), List.class)); + } else { // JSON object + instance.putAdditionalProperty( + entry.getKey(), + gson.fromJson(entry.getValue(), HashMap.class)); + } + } + } + return instance; + } + }.nullSafe(); + } + } + + /** + * Create an instance of ColumnSecurityRuleUpdate given an JSON string + * + * @param jsonString JSON string + * @return An instance of ColumnSecurityRuleUpdate + * @throws IOException if the JSON string is invalid with respect to ColumnSecurityRuleUpdate + */ + public static ColumnSecurityRuleUpdate fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, ColumnSecurityRuleUpdate.class); + } + + /** + * Convert an instance of ColumnSecurityRuleUpdate to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} diff --git a/sdks/java/src/main/java/com/thoughtspot/client/model/CommitBranchRequest.java b/sdks/java/src/main/java/com/thoughtspot/client/model/CommitBranchRequest.java new file mode 100644 index 000000000..17c6de1c1 --- /dev/null +++ b/sdks/java/src/main/java/com/thoughtspot/client/model/CommitBranchRequest.java @@ -0,0 +1,440 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client.model; + +import com.google.gson.Gson; +import com.google.gson.JsonArray; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.TypeAdapter; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.annotations.SerializedName; +import com.google.gson.reflect.TypeToken; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import com.thoughtspot.client.JSON; +import java.io.IOException; +import java.io.Serializable; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Objects; +import org.openapitools.jackson.nullable.JsonNullable; + +/** CommitBranchRequest */ +@javax.annotation.Generated( + value = "org.openapitools.codegen.languages.JavaClientCodegen", + comments = "Generator version: 7.12.0") +public class CommitBranchRequest implements Serializable { + private static final long serialVersionUID = 1L; + + public static final String SERIALIZED_NAME_METADATA = "metadata"; + + @SerializedName(SERIALIZED_NAME_METADATA) + @javax.annotation.Nonnull + private List metadata; + + public static final String SERIALIZED_NAME_DELETE_AWARE = "delete_aware"; + + @SerializedName(SERIALIZED_NAME_DELETE_AWARE) + @javax.annotation.Nullable + private Boolean deleteAware = true; + + public static final String SERIALIZED_NAME_BRANCH_NAME = "branch_name"; + + @SerializedName(SERIALIZED_NAME_BRANCH_NAME) + @javax.annotation.Nullable + private String branchName; + + public static final String SERIALIZED_NAME_COMMENT = "comment"; + + @SerializedName(SERIALIZED_NAME_COMMENT) + @javax.annotation.Nonnull + private String comment; + + public CommitBranchRequest() {} + + public CommitBranchRequest metadata(@javax.annotation.Nonnull List metadata) { + this.metadata = metadata; + return this; + } + + public CommitBranchRequest addMetadataItem(MetadataObject metadataItem) { + if (this.metadata == null) { + this.metadata = new ArrayList<>(); + } + this.metadata.add(metadataItem); + return this; + } + + /** + * Metadata objects. + * + * @return metadata + */ + @javax.annotation.Nonnull + public List getMetadata() { + return metadata; + } + + public void setMetadata(@javax.annotation.Nonnull List metadata) { + this.metadata = metadata; + } + + public CommitBranchRequest deleteAware(@javax.annotation.Nullable Boolean deleteAware) { + this.deleteAware = deleteAware; + return this; + } + + /** + * Delete the tml files from version control repo if it does not exist in the ThoughSpot + * instance + * + * @return deleteAware + */ + @javax.annotation.Nullable + public Boolean getDeleteAware() { + return deleteAware; + } + + public void setDeleteAware(@javax.annotation.Nullable Boolean deleteAware) { + this.deleteAware = deleteAware; + } + + public CommitBranchRequest branchName(@javax.annotation.Nullable String branchName) { + this.branchName = branchName; + return this; + } + + /** + * Name of the remote branch where object should be pushed Note: If no branch_name is specified, + * then the commit_branch_name will be considered. + * + * @return branchName + */ + @javax.annotation.Nullable + public String getBranchName() { + return branchName; + } + + public void setBranchName(@javax.annotation.Nullable String branchName) { + this.branchName = branchName; + } + + public CommitBranchRequest comment(@javax.annotation.Nonnull String comment) { + this.comment = comment; + return this; + } + + /** + * Comment to be added to the commit + * + * @return comment + */ + @javax.annotation.Nonnull + public String getComment() { + return comment; + } + + public void setComment(@javax.annotation.Nonnull String comment) { + this.comment = comment; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key name of the property + * @param value value of the property + * @return the CommitBranchRequest instance itself + */ + public CommitBranchRequest putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return a map of objects + */ + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key name of the property + * @return an object + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + CommitBranchRequest commitBranchRequest = (CommitBranchRequest) o; + return Objects.equals(this.metadata, commitBranchRequest.metadata) + && Objects.equals(this.deleteAware, commitBranchRequest.deleteAware) + && Objects.equals(this.branchName, commitBranchRequest.branchName) + && Objects.equals(this.comment, commitBranchRequest.comment) + && Objects.equals( + this.additionalProperties, commitBranchRequest.additionalProperties); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b + || (a != null + && b != null + && a.isPresent() + && b.isPresent() + && Objects.deepEquals(a.get(), b.get())); + } + + @Override + public int hashCode() { + return Objects.hash(metadata, deleteAware, branchName, comment, additionalProperties); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; + } + return a.isPresent() ? Arrays.deepHashCode(new Object[] {a.get()}) : 31; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class CommitBranchRequest {\n"); + sb.append(" metadata: ").append(toIndentedString(metadata)).append("\n"); + sb.append(" deleteAware: ").append(toIndentedString(deleteAware)).append("\n"); + sb.append(" branchName: ").append(toIndentedString(branchName)).append("\n"); + sb.append(" comment: ").append(toIndentedString(comment)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first + * line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("metadata"); + openapiFields.add("delete_aware"); + openapiFields.add("branch_name"); + openapiFields.add("comment"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + openapiRequiredFields.add("metadata"); + openapiRequiredFields.add("comment"); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to CommitBranchRequest + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!CommitBranchRequest.openapiRequiredFields + .isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException( + String.format( + "The required field(s) %s in CommitBranchRequest is not found in" + + " the empty JSON string", + CommitBranchRequest.openapiRequiredFields.toString())); + } + } + + // check to make sure all required properties/fields are present in the JSON string + for (String requiredField : CommitBranchRequest.openapiRequiredFields) { + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException( + String.format( + "The required field `%s` is not found in the JSON string: %s", + requiredField, jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // ensure the json data is an array + if (!jsonObj.get("metadata").isJsonArray()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `metadata` to be an array in the JSON string but" + + " got `%s`", + jsonObj.get("metadata").toString())); + } + + JsonArray jsonArraymetadata = jsonObj.getAsJsonArray("metadata"); + // validate the required field `metadata` (array) + for (int i = 0; i < jsonArraymetadata.size(); i++) { + MetadataObject.validateJsonElement(jsonArraymetadata.get(i)); + } + ; + if ((jsonObj.get("branch_name") != null && !jsonObj.get("branch_name").isJsonNull()) + && !jsonObj.get("branch_name").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `branch_name` to be a primitive type in the JSON" + + " string but got `%s`", + jsonObj.get("branch_name").toString())); + } + if (!jsonObj.get("comment").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `comment` to be a primitive type in the JSON" + + " string but got `%s`", + jsonObj.get("comment").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!CommitBranchRequest.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'CommitBranchRequest' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter = + gson.getDelegateAdapter(this, TypeToken.get(CommitBranchRequest.class)); + + return (TypeAdapter) + new TypeAdapter() { + @Override + public void write(JsonWriter out, CommitBranchRequest value) + throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + obj.remove("additionalProperties"); + // serialize additional properties + if (value.getAdditionalProperties() != null) { + for (Map.Entry entry : + value.getAdditionalProperties().entrySet()) { + if (entry.getValue() instanceof String) + obj.addProperty(entry.getKey(), (String) entry.getValue()); + else if (entry.getValue() instanceof Number) + obj.addProperty(entry.getKey(), (Number) entry.getValue()); + else if (entry.getValue() instanceof Boolean) + obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); + else if (entry.getValue() instanceof Character) + obj.addProperty( + entry.getKey(), (Character) entry.getValue()); + else { + JsonElement jsonElement = gson.toJsonTree(entry.getValue()); + if (jsonElement.isJsonArray()) { + obj.add(entry.getKey(), jsonElement.getAsJsonArray()); + } else { + obj.add(entry.getKey(), jsonElement.getAsJsonObject()); + } + } + } + } + elementAdapter.write(out, obj); + } + + @Override + public CommitBranchRequest read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // store additional fields in the deserialized instance + CommitBranchRequest instance = thisAdapter.fromJsonTree(jsonObj); + for (Map.Entry entry : jsonObj.entrySet()) { + if (!openapiFields.contains(entry.getKey())) { + if (entry.getValue().isJsonPrimitive()) { // primitive type + if (entry.getValue().getAsJsonPrimitive().isString()) + instance.putAdditionalProperty( + entry.getKey(), entry.getValue().getAsString()); + else if (entry.getValue().getAsJsonPrimitive().isNumber()) + instance.putAdditionalProperty( + entry.getKey(), entry.getValue().getAsNumber()); + else if (entry.getValue().getAsJsonPrimitive().isBoolean()) + instance.putAdditionalProperty( + entry.getKey(), + entry.getValue().getAsBoolean()); + else + throw new IllegalArgumentException( + String.format( + "The field `%s` has unknown primitive" + + " type. Value: %s", + entry.getKey(), + entry.getValue().toString())); + } else if (entry.getValue().isJsonArray()) { + instance.putAdditionalProperty( + entry.getKey(), + gson.fromJson(entry.getValue(), List.class)); + } else { // JSON object + instance.putAdditionalProperty( + entry.getKey(), + gson.fromJson(entry.getValue(), HashMap.class)); + } + } + } + return instance; + } + }.nullSafe(); + } + } + + /** + * Create an instance of CommitBranchRequest given an JSON string + * + * @param jsonString JSON string + * @return An instance of CommitBranchRequest + * @throws IOException if the JSON string is invalid with respect to CommitBranchRequest + */ + public static CommitBranchRequest fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, CommitBranchRequest.class); + } + + /** + * Convert an instance of CommitBranchRequest to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} diff --git a/sdks/java/src/main/java/com/thoughtspot/client/model/CommitFileType.java b/sdks/java/src/main/java/com/thoughtspot/client/model/CommitFileType.java new file mode 100644 index 000000000..89785e854 --- /dev/null +++ b/sdks/java/src/main/java/com/thoughtspot/client/model/CommitFileType.java @@ -0,0 +1,390 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client.model; + +import com.google.gson.Gson; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.TypeAdapter; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.annotations.SerializedName; +import com.google.gson.reflect.TypeToken; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import com.thoughtspot.client.JSON; +import java.io.IOException; +import java.io.Serializable; +import java.util.Arrays; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Objects; +import org.openapitools.jackson.nullable.JsonNullable; + +/** CommitFileType */ +@javax.annotation.Generated( + value = "org.openapitools.codegen.languages.JavaClientCodegen", + comments = "Generator version: 7.12.0") +public class CommitFileType implements Serializable { + private static final long serialVersionUID = 1L; + + public static final String SERIALIZED_NAME_FILE_NAME = "file_name"; + + @SerializedName(SERIALIZED_NAME_FILE_NAME) + @javax.annotation.Nonnull + private String fileName; + + public static final String SERIALIZED_NAME_STATUS_CODE = "status_code"; + + @SerializedName(SERIALIZED_NAME_STATUS_CODE) + @javax.annotation.Nonnull + private String statusCode; + + public static final String SERIALIZED_NAME_STATUS_MESSAGE = "status_message"; + + @SerializedName(SERIALIZED_NAME_STATUS_MESSAGE) + @javax.annotation.Nullable + private String statusMessage; + + public CommitFileType() {} + + public CommitFileType fileName(@javax.annotation.Nonnull String fileName) { + this.fileName = fileName; + return this; + } + + /** + * Name of the file deployed + * + * @return fileName + */ + @javax.annotation.Nonnull + public String getFileName() { + return fileName; + } + + public void setFileName(@javax.annotation.Nonnull String fileName) { + this.fileName = fileName; + } + + public CommitFileType statusCode(@javax.annotation.Nonnull String statusCode) { + this.statusCode = statusCode; + return this; + } + + /** + * Indicates the status of deployment for the file + * + * @return statusCode + */ + @javax.annotation.Nonnull + public String getStatusCode() { + return statusCode; + } + + public void setStatusCode(@javax.annotation.Nonnull String statusCode) { + this.statusCode = statusCode; + } + + public CommitFileType statusMessage(@javax.annotation.Nullable String statusMessage) { + this.statusMessage = statusMessage; + return this; + } + + /** + * Any error or warning with the deployment + * + * @return statusMessage + */ + @javax.annotation.Nullable + public String getStatusMessage() { + return statusMessage; + } + + public void setStatusMessage(@javax.annotation.Nullable String statusMessage) { + this.statusMessage = statusMessage; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key name of the property + * @param value value of the property + * @return the CommitFileType instance itself + */ + public CommitFileType putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return a map of objects + */ + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key name of the property + * @return an object + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + CommitFileType commitFileType = (CommitFileType) o; + return Objects.equals(this.fileName, commitFileType.fileName) + && Objects.equals(this.statusCode, commitFileType.statusCode) + && Objects.equals(this.statusMessage, commitFileType.statusMessage) + && Objects.equals(this.additionalProperties, commitFileType.additionalProperties); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b + || (a != null + && b != null + && a.isPresent() + && b.isPresent() + && Objects.deepEquals(a.get(), b.get())); + } + + @Override + public int hashCode() { + return Objects.hash(fileName, statusCode, statusMessage, additionalProperties); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; + } + return a.isPresent() ? Arrays.deepHashCode(new Object[] {a.get()}) : 31; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class CommitFileType {\n"); + sb.append(" fileName: ").append(toIndentedString(fileName)).append("\n"); + sb.append(" statusCode: ").append(toIndentedString(statusCode)).append("\n"); + sb.append(" statusMessage: ").append(toIndentedString(statusMessage)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first + * line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("file_name"); + openapiFields.add("status_code"); + openapiFields.add("status_message"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + openapiRequiredFields.add("file_name"); + openapiRequiredFields.add("status_code"); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to CommitFileType + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!CommitFileType.openapiRequiredFields + .isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException( + String.format( + "The required field(s) %s in CommitFileType is not found in the" + + " empty JSON string", + CommitFileType.openapiRequiredFields.toString())); + } + } + + // check to make sure all required properties/fields are present in the JSON string + for (String requiredField : CommitFileType.openapiRequiredFields) { + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException( + String.format( + "The required field `%s` is not found in the JSON string: %s", + requiredField, jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if (!jsonObj.get("file_name").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `file_name` to be a primitive type in the JSON" + + " string but got `%s`", + jsonObj.get("file_name").toString())); + } + if (!jsonObj.get("status_code").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `status_code` to be a primitive type in the JSON" + + " string but got `%s`", + jsonObj.get("status_code").toString())); + } + if ((jsonObj.get("status_message") != null && !jsonObj.get("status_message").isJsonNull()) + && !jsonObj.get("status_message").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `status_message` to be a primitive type in the" + + " JSON string but got `%s`", + jsonObj.get("status_message").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!CommitFileType.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'CommitFileType' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter = + gson.getDelegateAdapter(this, TypeToken.get(CommitFileType.class)); + + return (TypeAdapter) + new TypeAdapter() { + @Override + public void write(JsonWriter out, CommitFileType value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + obj.remove("additionalProperties"); + // serialize additional properties + if (value.getAdditionalProperties() != null) { + for (Map.Entry entry : + value.getAdditionalProperties().entrySet()) { + if (entry.getValue() instanceof String) + obj.addProperty(entry.getKey(), (String) entry.getValue()); + else if (entry.getValue() instanceof Number) + obj.addProperty(entry.getKey(), (Number) entry.getValue()); + else if (entry.getValue() instanceof Boolean) + obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); + else if (entry.getValue() instanceof Character) + obj.addProperty( + entry.getKey(), (Character) entry.getValue()); + else { + JsonElement jsonElement = gson.toJsonTree(entry.getValue()); + if (jsonElement.isJsonArray()) { + obj.add(entry.getKey(), jsonElement.getAsJsonArray()); + } else { + obj.add(entry.getKey(), jsonElement.getAsJsonObject()); + } + } + } + } + elementAdapter.write(out, obj); + } + + @Override + public CommitFileType read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // store additional fields in the deserialized instance + CommitFileType instance = thisAdapter.fromJsonTree(jsonObj); + for (Map.Entry entry : jsonObj.entrySet()) { + if (!openapiFields.contains(entry.getKey())) { + if (entry.getValue().isJsonPrimitive()) { // primitive type + if (entry.getValue().getAsJsonPrimitive().isString()) + instance.putAdditionalProperty( + entry.getKey(), entry.getValue().getAsString()); + else if (entry.getValue().getAsJsonPrimitive().isNumber()) + instance.putAdditionalProperty( + entry.getKey(), entry.getValue().getAsNumber()); + else if (entry.getValue().getAsJsonPrimitive().isBoolean()) + instance.putAdditionalProperty( + entry.getKey(), + entry.getValue().getAsBoolean()); + else + throw new IllegalArgumentException( + String.format( + "The field `%s` has unknown primitive" + + " type. Value: %s", + entry.getKey(), + entry.getValue().toString())); + } else if (entry.getValue().isJsonArray()) { + instance.putAdditionalProperty( + entry.getKey(), + gson.fromJson(entry.getValue(), List.class)); + } else { // JSON object + instance.putAdditionalProperty( + entry.getKey(), + gson.fromJson(entry.getValue(), HashMap.class)); + } + } + } + return instance; + } + }.nullSafe(); + } + } + + /** + * Create an instance of CommitFileType given an JSON string + * + * @param jsonString JSON string + * @return An instance of CommitFileType + * @throws IOException if the JSON string is invalid with respect to CommitFileType + */ + public static CommitFileType fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, CommitFileType.class); + } + + /** + * Convert an instance of CommitFileType to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} diff --git a/sdks/java/src/main/java/com/thoughtspot/client/model/CommitHistoryResponse.java b/sdks/java/src/main/java/com/thoughtspot/client/model/CommitHistoryResponse.java new file mode 100644 index 000000000..3f54afc62 --- /dev/null +++ b/sdks/java/src/main/java/com/thoughtspot/client/model/CommitHistoryResponse.java @@ -0,0 +1,473 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client.model; + +import com.google.gson.Gson; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.TypeAdapter; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.annotations.SerializedName; +import com.google.gson.reflect.TypeToken; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import com.thoughtspot.client.JSON; +import java.io.IOException; +import java.io.Serializable; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Objects; + +/** CommitHistoryResponse */ +@javax.annotation.Generated( + value = "org.openapitools.codegen.languages.JavaClientCodegen", + comments = "Generator version: 7.12.0") +public class CommitHistoryResponse implements Serializable { + private static final long serialVersionUID = 1L; + + public static final String SERIALIZED_NAME_COMMITTER = "committer"; + + @SerializedName(SERIALIZED_NAME_COMMITTER) + @javax.annotation.Nonnull + private CommiterType committer; + + public static final String SERIALIZED_NAME_AUTHOR = "author"; + + @SerializedName(SERIALIZED_NAME_AUTHOR) + @javax.annotation.Nonnull + private AuthorType author; + + public static final String SERIALIZED_NAME_COMMENT = "comment"; + + @SerializedName(SERIALIZED_NAME_COMMENT) + @javax.annotation.Nonnull + private String comment; + + public static final String SERIALIZED_NAME_COMMIT_TIME = "commit_time"; + + @SerializedName(SERIALIZED_NAME_COMMIT_TIME) + @javax.annotation.Nonnull + private String commitTime; + + public static final String SERIALIZED_NAME_COMMIT_ID = "commit_id"; + + @SerializedName(SERIALIZED_NAME_COMMIT_ID) + @javax.annotation.Nonnull + private String commitId; + + public static final String SERIALIZED_NAME_BRANCH = "branch"; + + @SerializedName(SERIALIZED_NAME_BRANCH) + @javax.annotation.Nonnull + private String branch; + + public CommitHistoryResponse() {} + + public CommitHistoryResponse committer(@javax.annotation.Nonnull CommiterType committer) { + this.committer = committer; + return this; + } + + /** + * Get committer + * + * @return committer + */ + @javax.annotation.Nonnull + public CommiterType getCommitter() { + return committer; + } + + public void setCommitter(@javax.annotation.Nonnull CommiterType committer) { + this.committer = committer; + } + + public CommitHistoryResponse author(@javax.annotation.Nonnull AuthorType author) { + this.author = author; + return this; + } + + /** + * Get author + * + * @return author + */ + @javax.annotation.Nonnull + public AuthorType getAuthor() { + return author; + } + + public void setAuthor(@javax.annotation.Nonnull AuthorType author) { + this.author = author; + } + + public CommitHistoryResponse comment(@javax.annotation.Nonnull String comment) { + this.comment = comment; + return this; + } + + /** + * Comments associated with the commit + * + * @return comment + */ + @javax.annotation.Nonnull + public String getComment() { + return comment; + } + + public void setComment(@javax.annotation.Nonnull String comment) { + this.comment = comment; + } + + public CommitHistoryResponse commitTime(@javax.annotation.Nonnull String commitTime) { + this.commitTime = commitTime; + return this; + } + + /** + * Time at which the changes were committed. + * + * @return commitTime + */ + @javax.annotation.Nonnull + public String getCommitTime() { + return commitTime; + } + + public void setCommitTime(@javax.annotation.Nonnull String commitTime) { + this.commitTime = commitTime; + } + + public CommitHistoryResponse commitId(@javax.annotation.Nonnull String commitId) { + this.commitId = commitId; + return this; + } + + /** + * SHA id associated with the commit + * + * @return commitId + */ + @javax.annotation.Nonnull + public String getCommitId() { + return commitId; + } + + public void setCommitId(@javax.annotation.Nonnull String commitId) { + this.commitId = commitId; + } + + public CommitHistoryResponse branch(@javax.annotation.Nonnull String branch) { + this.branch = branch; + return this; + } + + /** + * Branch where changes were committed + * + * @return branch + */ + @javax.annotation.Nonnull + public String getBranch() { + return branch; + } + + public void setBranch(@javax.annotation.Nonnull String branch) { + this.branch = branch; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key name of the property + * @param value value of the property + * @return the CommitHistoryResponse instance itself + */ + public CommitHistoryResponse putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return a map of objects + */ + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key name of the property + * @return an object + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + CommitHistoryResponse commitHistoryResponse = (CommitHistoryResponse) o; + return Objects.equals(this.committer, commitHistoryResponse.committer) + && Objects.equals(this.author, commitHistoryResponse.author) + && Objects.equals(this.comment, commitHistoryResponse.comment) + && Objects.equals(this.commitTime, commitHistoryResponse.commitTime) + && Objects.equals(this.commitId, commitHistoryResponse.commitId) + && Objects.equals(this.branch, commitHistoryResponse.branch) + && Objects.equals( + this.additionalProperties, commitHistoryResponse.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash( + committer, author, comment, commitTime, commitId, branch, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class CommitHistoryResponse {\n"); + sb.append(" committer: ").append(toIndentedString(committer)).append("\n"); + sb.append(" author: ").append(toIndentedString(author)).append("\n"); + sb.append(" comment: ").append(toIndentedString(comment)).append("\n"); + sb.append(" commitTime: ").append(toIndentedString(commitTime)).append("\n"); + sb.append(" commitId: ").append(toIndentedString(commitId)).append("\n"); + sb.append(" branch: ").append(toIndentedString(branch)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first + * line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("committer"); + openapiFields.add("author"); + openapiFields.add("comment"); + openapiFields.add("commit_time"); + openapiFields.add("commit_id"); + openapiFields.add("branch"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + openapiRequiredFields.add("committer"); + openapiRequiredFields.add("author"); + openapiRequiredFields.add("comment"); + openapiRequiredFields.add("commit_time"); + openapiRequiredFields.add("commit_id"); + openapiRequiredFields.add("branch"); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to CommitHistoryResponse + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!CommitHistoryResponse.openapiRequiredFields + .isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException( + String.format( + "The required field(s) %s in CommitHistoryResponse is not found in" + + " the empty JSON string", + CommitHistoryResponse.openapiRequiredFields.toString())); + } + } + + // check to make sure all required properties/fields are present in the JSON string + for (String requiredField : CommitHistoryResponse.openapiRequiredFields) { + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException( + String.format( + "The required field `%s` is not found in the JSON string: %s", + requiredField, jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // validate the required field `committer` + CommiterType.validateJsonElement(jsonObj.get("committer")); + // validate the required field `author` + AuthorType.validateJsonElement(jsonObj.get("author")); + if (!jsonObj.get("comment").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `comment` to be a primitive type in the JSON" + + " string but got `%s`", + jsonObj.get("comment").toString())); + } + if (!jsonObj.get("commit_time").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `commit_time` to be a primitive type in the JSON" + + " string but got `%s`", + jsonObj.get("commit_time").toString())); + } + if (!jsonObj.get("commit_id").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `commit_id` to be a primitive type in the JSON" + + " string but got `%s`", + jsonObj.get("commit_id").toString())); + } + if (!jsonObj.get("branch").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `branch` to be a primitive type in the JSON string" + + " but got `%s`", + jsonObj.get("branch").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!CommitHistoryResponse.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'CommitHistoryResponse' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter = + gson.getDelegateAdapter(this, TypeToken.get(CommitHistoryResponse.class)); + + return (TypeAdapter) + new TypeAdapter() { + @Override + public void write(JsonWriter out, CommitHistoryResponse value) + throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + obj.remove("additionalProperties"); + // serialize additional properties + if (value.getAdditionalProperties() != null) { + for (Map.Entry entry : + value.getAdditionalProperties().entrySet()) { + if (entry.getValue() instanceof String) + obj.addProperty(entry.getKey(), (String) entry.getValue()); + else if (entry.getValue() instanceof Number) + obj.addProperty(entry.getKey(), (Number) entry.getValue()); + else if (entry.getValue() instanceof Boolean) + obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); + else if (entry.getValue() instanceof Character) + obj.addProperty( + entry.getKey(), (Character) entry.getValue()); + else { + JsonElement jsonElement = gson.toJsonTree(entry.getValue()); + if (jsonElement.isJsonArray()) { + obj.add(entry.getKey(), jsonElement.getAsJsonArray()); + } else { + obj.add(entry.getKey(), jsonElement.getAsJsonObject()); + } + } + } + } + elementAdapter.write(out, obj); + } + + @Override + public CommitHistoryResponse read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // store additional fields in the deserialized instance + CommitHistoryResponse instance = thisAdapter.fromJsonTree(jsonObj); + for (Map.Entry entry : jsonObj.entrySet()) { + if (!openapiFields.contains(entry.getKey())) { + if (entry.getValue().isJsonPrimitive()) { // primitive type + if (entry.getValue().getAsJsonPrimitive().isString()) + instance.putAdditionalProperty( + entry.getKey(), entry.getValue().getAsString()); + else if (entry.getValue().getAsJsonPrimitive().isNumber()) + instance.putAdditionalProperty( + entry.getKey(), entry.getValue().getAsNumber()); + else if (entry.getValue().getAsJsonPrimitive().isBoolean()) + instance.putAdditionalProperty( + entry.getKey(), + entry.getValue().getAsBoolean()); + else + throw new IllegalArgumentException( + String.format( + "The field `%s` has unknown primitive" + + " type. Value: %s", + entry.getKey(), + entry.getValue().toString())); + } else if (entry.getValue().isJsonArray()) { + instance.putAdditionalProperty( + entry.getKey(), + gson.fromJson(entry.getValue(), List.class)); + } else { // JSON object + instance.putAdditionalProperty( + entry.getKey(), + gson.fromJson(entry.getValue(), HashMap.class)); + } + } + } + return instance; + } + }.nullSafe(); + } + } + + /** + * Create an instance of CommitHistoryResponse given an JSON string + * + * @param jsonString JSON string + * @return An instance of CommitHistoryResponse + * @throws IOException if the JSON string is invalid with respect to CommitHistoryResponse + */ + public static CommitHistoryResponse fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, CommitHistoryResponse.class); + } + + /** + * Convert an instance of CommitHistoryResponse to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} diff --git a/sdks/java/src/main/java/com/thoughtspot/client/model/CommitResponse.java b/sdks/java/src/main/java/com/thoughtspot/client/model/CommitResponse.java new file mode 100644 index 000000000..05337a590 --- /dev/null +++ b/sdks/java/src/main/java/com/thoughtspot/client/model/CommitResponse.java @@ -0,0 +1,547 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client.model; + +import com.google.gson.Gson; +import com.google.gson.JsonArray; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.TypeAdapter; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.annotations.SerializedName; +import com.google.gson.reflect.TypeToken; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import com.thoughtspot.client.JSON; +import java.io.IOException; +import java.io.Serializable; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Objects; +import org.openapitools.jackson.nullable.JsonNullable; + +/** CommitResponse */ +@javax.annotation.Generated( + value = "org.openapitools.codegen.languages.JavaClientCodegen", + comments = "Generator version: 7.12.0") +public class CommitResponse implements Serializable { + private static final long serialVersionUID = 1L; + + public static final String SERIALIZED_NAME_COMMITTER = "committer"; + + @SerializedName(SERIALIZED_NAME_COMMITTER) + @javax.annotation.Nullable + private CommiterType committer; + + public static final String SERIALIZED_NAME_AUTHOR = "author"; + + @SerializedName(SERIALIZED_NAME_AUTHOR) + @javax.annotation.Nullable + private AuthorType author; + + public static final String SERIALIZED_NAME_COMMENT = "comment"; + + @SerializedName(SERIALIZED_NAME_COMMENT) + @javax.annotation.Nullable + private String comment; + + public static final String SERIALIZED_NAME_COMMIT_TIME = "commit_time"; + + @SerializedName(SERIALIZED_NAME_COMMIT_TIME) + @javax.annotation.Nullable + private String commitTime; + + public static final String SERIALIZED_NAME_COMMIT_ID = "commit_id"; + + @SerializedName(SERIALIZED_NAME_COMMIT_ID) + @javax.annotation.Nullable + private String commitId; + + public static final String SERIALIZED_NAME_BRANCH = "branch"; + + @SerializedName(SERIALIZED_NAME_BRANCH) + @javax.annotation.Nullable + private String branch; + + public static final String SERIALIZED_NAME_COMMITTED_FILES = "committed_files"; + + @SerializedName(SERIALIZED_NAME_COMMITTED_FILES) + @javax.annotation.Nullable + private List committedFiles; + + public CommitResponse() {} + + public CommitResponse committer(@javax.annotation.Nullable CommiterType committer) { + this.committer = committer; + return this; + } + + /** + * Get committer + * + * @return committer + */ + @javax.annotation.Nullable + public CommiterType getCommitter() { + return committer; + } + + public void setCommitter(@javax.annotation.Nullable CommiterType committer) { + this.committer = committer; + } + + public CommitResponse author(@javax.annotation.Nullable AuthorType author) { + this.author = author; + return this; + } + + /** + * Get author + * + * @return author + */ + @javax.annotation.Nullable + public AuthorType getAuthor() { + return author; + } + + public void setAuthor(@javax.annotation.Nullable AuthorType author) { + this.author = author; + } + + public CommitResponse comment(@javax.annotation.Nullable String comment) { + this.comment = comment; + return this; + } + + /** + * Comments associated with the commit + * + * @return comment + */ + @javax.annotation.Nullable + public String getComment() { + return comment; + } + + public void setComment(@javax.annotation.Nullable String comment) { + this.comment = comment; + } + + public CommitResponse commitTime(@javax.annotation.Nullable String commitTime) { + this.commitTime = commitTime; + return this; + } + + /** + * Time at which the changes were committed. + * + * @return commitTime + */ + @javax.annotation.Nullable + public String getCommitTime() { + return commitTime; + } + + public void setCommitTime(@javax.annotation.Nullable String commitTime) { + this.commitTime = commitTime; + } + + public CommitResponse commitId(@javax.annotation.Nullable String commitId) { + this.commitId = commitId; + return this; + } + + /** + * SHA id associated with the commit + * + * @return commitId + */ + @javax.annotation.Nullable + public String getCommitId() { + return commitId; + } + + public void setCommitId(@javax.annotation.Nullable String commitId) { + this.commitId = commitId; + } + + public CommitResponse branch(@javax.annotation.Nullable String branch) { + this.branch = branch; + return this; + } + + /** + * Branch where changes were committed + * + * @return branch + */ + @javax.annotation.Nullable + public String getBranch() { + return branch; + } + + public void setBranch(@javax.annotation.Nullable String branch) { + this.branch = branch; + } + + public CommitResponse committedFiles( + @javax.annotation.Nullable List committedFiles) { + this.committedFiles = committedFiles; + return this; + } + + public CommitResponse addCommittedFilesItem(CommitFileType committedFilesItem) { + if (this.committedFiles == null) { + this.committedFiles = new ArrayList<>(); + } + this.committedFiles.add(committedFilesItem); + return this; + } + + /** + * Files that were pushed as part of this commit + * + * @return committedFiles + */ + @javax.annotation.Nullable + public List getCommittedFiles() { + return committedFiles; + } + + public void setCommittedFiles(@javax.annotation.Nullable List committedFiles) { + this.committedFiles = committedFiles; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key name of the property + * @param value value of the property + * @return the CommitResponse instance itself + */ + public CommitResponse putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return a map of objects + */ + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key name of the property + * @return an object + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + CommitResponse commitResponse = (CommitResponse) o; + return Objects.equals(this.committer, commitResponse.committer) + && Objects.equals(this.author, commitResponse.author) + && Objects.equals(this.comment, commitResponse.comment) + && Objects.equals(this.commitTime, commitResponse.commitTime) + && Objects.equals(this.commitId, commitResponse.commitId) + && Objects.equals(this.branch, commitResponse.branch) + && Objects.equals(this.committedFiles, commitResponse.committedFiles) + && Objects.equals(this.additionalProperties, commitResponse.additionalProperties); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b + || (a != null + && b != null + && a.isPresent() + && b.isPresent() + && Objects.deepEquals(a.get(), b.get())); + } + + @Override + public int hashCode() { + return Objects.hash( + committer, + author, + comment, + commitTime, + commitId, + branch, + committedFiles, + additionalProperties); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; + } + return a.isPresent() ? Arrays.deepHashCode(new Object[] {a.get()}) : 31; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class CommitResponse {\n"); + sb.append(" committer: ").append(toIndentedString(committer)).append("\n"); + sb.append(" author: ").append(toIndentedString(author)).append("\n"); + sb.append(" comment: ").append(toIndentedString(comment)).append("\n"); + sb.append(" commitTime: ").append(toIndentedString(commitTime)).append("\n"); + sb.append(" commitId: ").append(toIndentedString(commitId)).append("\n"); + sb.append(" branch: ").append(toIndentedString(branch)).append("\n"); + sb.append(" committedFiles: ").append(toIndentedString(committedFiles)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first + * line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("committer"); + openapiFields.add("author"); + openapiFields.add("comment"); + openapiFields.add("commit_time"); + openapiFields.add("commit_id"); + openapiFields.add("branch"); + openapiFields.add("committed_files"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to CommitResponse + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!CommitResponse.openapiRequiredFields + .isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException( + String.format( + "The required field(s) %s in CommitResponse is not found in the" + + " empty JSON string", + CommitResponse.openapiRequiredFields.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // validate the optional field `committer` + if (jsonObj.get("committer") != null && !jsonObj.get("committer").isJsonNull()) { + CommiterType.validateJsonElement(jsonObj.get("committer")); + } + // validate the optional field `author` + if (jsonObj.get("author") != null && !jsonObj.get("author").isJsonNull()) { + AuthorType.validateJsonElement(jsonObj.get("author")); + } + if ((jsonObj.get("comment") != null && !jsonObj.get("comment").isJsonNull()) + && !jsonObj.get("comment").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `comment` to be a primitive type in the JSON" + + " string but got `%s`", + jsonObj.get("comment").toString())); + } + if ((jsonObj.get("commit_time") != null && !jsonObj.get("commit_time").isJsonNull()) + && !jsonObj.get("commit_time").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `commit_time` to be a primitive type in the JSON" + + " string but got `%s`", + jsonObj.get("commit_time").toString())); + } + if ((jsonObj.get("commit_id") != null && !jsonObj.get("commit_id").isJsonNull()) + && !jsonObj.get("commit_id").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `commit_id` to be a primitive type in the JSON" + + " string but got `%s`", + jsonObj.get("commit_id").toString())); + } + if ((jsonObj.get("branch") != null && !jsonObj.get("branch").isJsonNull()) + && !jsonObj.get("branch").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `branch` to be a primitive type in the JSON string" + + " but got `%s`", + jsonObj.get("branch").toString())); + } + if (jsonObj.get("committed_files") != null + && !jsonObj.get("committed_files").isJsonNull()) { + JsonArray jsonArraycommittedFiles = jsonObj.getAsJsonArray("committed_files"); + if (jsonArraycommittedFiles != null) { + // ensure the json data is an array + if (!jsonObj.get("committed_files").isJsonArray()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `committed_files` to be an array in the" + + " JSON string but got `%s`", + jsonObj.get("committed_files").toString())); + } + + // validate the optional field `committed_files` (array) + for (int i = 0; i < jsonArraycommittedFiles.size(); i++) { + CommitFileType.validateJsonElement(jsonArraycommittedFiles.get(i)); + } + ; + } + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!CommitResponse.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'CommitResponse' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter = + gson.getDelegateAdapter(this, TypeToken.get(CommitResponse.class)); + + return (TypeAdapter) + new TypeAdapter() { + @Override + public void write(JsonWriter out, CommitResponse value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + obj.remove("additionalProperties"); + // serialize additional properties + if (value.getAdditionalProperties() != null) { + for (Map.Entry entry : + value.getAdditionalProperties().entrySet()) { + if (entry.getValue() instanceof String) + obj.addProperty(entry.getKey(), (String) entry.getValue()); + else if (entry.getValue() instanceof Number) + obj.addProperty(entry.getKey(), (Number) entry.getValue()); + else if (entry.getValue() instanceof Boolean) + obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); + else if (entry.getValue() instanceof Character) + obj.addProperty( + entry.getKey(), (Character) entry.getValue()); + else { + JsonElement jsonElement = gson.toJsonTree(entry.getValue()); + if (jsonElement.isJsonArray()) { + obj.add(entry.getKey(), jsonElement.getAsJsonArray()); + } else { + obj.add(entry.getKey(), jsonElement.getAsJsonObject()); + } + } + } + } + elementAdapter.write(out, obj); + } + + @Override + public CommitResponse read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // store additional fields in the deserialized instance + CommitResponse instance = thisAdapter.fromJsonTree(jsonObj); + for (Map.Entry entry : jsonObj.entrySet()) { + if (!openapiFields.contains(entry.getKey())) { + if (entry.getValue().isJsonPrimitive()) { // primitive type + if (entry.getValue().getAsJsonPrimitive().isString()) + instance.putAdditionalProperty( + entry.getKey(), entry.getValue().getAsString()); + else if (entry.getValue().getAsJsonPrimitive().isNumber()) + instance.putAdditionalProperty( + entry.getKey(), entry.getValue().getAsNumber()); + else if (entry.getValue().getAsJsonPrimitive().isBoolean()) + instance.putAdditionalProperty( + entry.getKey(), + entry.getValue().getAsBoolean()); + else + throw new IllegalArgumentException( + String.format( + "The field `%s` has unknown primitive" + + " type. Value: %s", + entry.getKey(), + entry.getValue().toString())); + } else if (entry.getValue().isJsonArray()) { + instance.putAdditionalProperty( + entry.getKey(), + gson.fromJson(entry.getValue(), List.class)); + } else { // JSON object + instance.putAdditionalProperty( + entry.getKey(), + gson.fromJson(entry.getValue(), HashMap.class)); + } + } + } + return instance; + } + }.nullSafe(); + } + } + + /** + * Create an instance of CommitResponse given an JSON string + * + * @param jsonString JSON string + * @return An instance of CommitResponse + * @throws IOException if the JSON string is invalid with respect to CommitResponse + */ + public static CommitResponse fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, CommitResponse.class); + } + + /** + * Convert an instance of CommitResponse to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} diff --git a/sdks/java/src/main/java/com/thoughtspot/client/model/CommiterType.java b/sdks/java/src/main/java/com/thoughtspot/client/model/CommiterType.java new file mode 100644 index 000000000..74ee60312 --- /dev/null +++ b/sdks/java/src/main/java/com/thoughtspot/client/model/CommiterType.java @@ -0,0 +1,344 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client.model; + +import com.google.gson.Gson; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.TypeAdapter; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.annotations.SerializedName; +import com.google.gson.reflect.TypeToken; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import com.thoughtspot.client.JSON; +import java.io.IOException; +import java.io.Serializable; +import java.util.Arrays; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Objects; +import org.openapitools.jackson.nullable.JsonNullable; + +/** CommiterType */ +@javax.annotation.Generated( + value = "org.openapitools.codegen.languages.JavaClientCodegen", + comments = "Generator version: 7.12.0") +public class CommiterType implements Serializable { + private static final long serialVersionUID = 1L; + + public static final String SERIALIZED_NAME_EMAIL = "email"; + + @SerializedName(SERIALIZED_NAME_EMAIL) + @javax.annotation.Nullable + private String email; + + public static final String SERIALIZED_NAME_USERNAME = "username"; + + @SerializedName(SERIALIZED_NAME_USERNAME) + @javax.annotation.Nullable + private String username; + + public CommiterType() {} + + public CommiterType email(@javax.annotation.Nullable String email) { + this.email = email; + return this; + } + + /** + * Email id of the committer + * + * @return email + */ + @javax.annotation.Nullable + public String getEmail() { + return email; + } + + public void setEmail(@javax.annotation.Nullable String email) { + this.email = email; + } + + public CommiterType username(@javax.annotation.Nullable String username) { + this.username = username; + return this; + } + + /** + * Username of the committer + * + * @return username + */ + @javax.annotation.Nullable + public String getUsername() { + return username; + } + + public void setUsername(@javax.annotation.Nullable String username) { + this.username = username; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key name of the property + * @param value value of the property + * @return the CommiterType instance itself + */ + public CommiterType putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return a map of objects + */ + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key name of the property + * @return an object + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + CommiterType commiterType = (CommiterType) o; + return Objects.equals(this.email, commiterType.email) + && Objects.equals(this.username, commiterType.username) + && Objects.equals(this.additionalProperties, commiterType.additionalProperties); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b + || (a != null + && b != null + && a.isPresent() + && b.isPresent() + && Objects.deepEquals(a.get(), b.get())); + } + + @Override + public int hashCode() { + return Objects.hash(email, username, additionalProperties); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; + } + return a.isPresent() ? Arrays.deepHashCode(new Object[] {a.get()}) : 31; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class CommiterType {\n"); + sb.append(" email: ").append(toIndentedString(email)).append("\n"); + sb.append(" username: ").append(toIndentedString(username)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first + * line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("email"); + openapiFields.add("username"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to CommiterType + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!CommiterType.openapiRequiredFields + .isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException( + String.format( + "The required field(s) %s in CommiterType is not found in the" + + " empty JSON string", + CommiterType.openapiRequiredFields.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if ((jsonObj.get("email") != null && !jsonObj.get("email").isJsonNull()) + && !jsonObj.get("email").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `email` to be a primitive type in the JSON string" + + " but got `%s`", + jsonObj.get("email").toString())); + } + if ((jsonObj.get("username") != null && !jsonObj.get("username").isJsonNull()) + && !jsonObj.get("username").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `username` to be a primitive type in the JSON" + + " string but got `%s`", + jsonObj.get("username").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!CommiterType.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'CommiterType' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter = + gson.getDelegateAdapter(this, TypeToken.get(CommiterType.class)); + + return (TypeAdapter) + new TypeAdapter() { + @Override + public void write(JsonWriter out, CommiterType value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + obj.remove("additionalProperties"); + // serialize additional properties + if (value.getAdditionalProperties() != null) { + for (Map.Entry entry : + value.getAdditionalProperties().entrySet()) { + if (entry.getValue() instanceof String) + obj.addProperty(entry.getKey(), (String) entry.getValue()); + else if (entry.getValue() instanceof Number) + obj.addProperty(entry.getKey(), (Number) entry.getValue()); + else if (entry.getValue() instanceof Boolean) + obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); + else if (entry.getValue() instanceof Character) + obj.addProperty( + entry.getKey(), (Character) entry.getValue()); + else { + JsonElement jsonElement = gson.toJsonTree(entry.getValue()); + if (jsonElement.isJsonArray()) { + obj.add(entry.getKey(), jsonElement.getAsJsonArray()); + } else { + obj.add(entry.getKey(), jsonElement.getAsJsonObject()); + } + } + } + } + elementAdapter.write(out, obj); + } + + @Override + public CommiterType read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // store additional fields in the deserialized instance + CommiterType instance = thisAdapter.fromJsonTree(jsonObj); + for (Map.Entry entry : jsonObj.entrySet()) { + if (!openapiFields.contains(entry.getKey())) { + if (entry.getValue().isJsonPrimitive()) { // primitive type + if (entry.getValue().getAsJsonPrimitive().isString()) + instance.putAdditionalProperty( + entry.getKey(), entry.getValue().getAsString()); + else if (entry.getValue().getAsJsonPrimitive().isNumber()) + instance.putAdditionalProperty( + entry.getKey(), entry.getValue().getAsNumber()); + else if (entry.getValue().getAsJsonPrimitive().isBoolean()) + instance.putAdditionalProperty( + entry.getKey(), + entry.getValue().getAsBoolean()); + else + throw new IllegalArgumentException( + String.format( + "The field `%s` has unknown primitive" + + " type. Value: %s", + entry.getKey(), + entry.getValue().toString())); + } else if (entry.getValue().isJsonArray()) { + instance.putAdditionalProperty( + entry.getKey(), + gson.fromJson(entry.getValue(), List.class)); + } else { // JSON object + instance.putAdditionalProperty( + entry.getKey(), + gson.fromJson(entry.getValue(), HashMap.class)); + } + } + } + return instance; + } + }.nullSafe(); + } + } + + /** + * Create an instance of CommiterType given an JSON string + * + * @param jsonString JSON string + * @return An instance of CommiterType + * @throws IOException if the JSON string is invalid with respect to CommiterType + */ + public static CommiterType fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, CommiterType.class); + } + + /** + * Convert an instance of CommiterType to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} diff --git a/sdks/java/src/main/java/com/thoughtspot/client/model/CommunicationChannelPreferencesResponse.java b/sdks/java/src/main/java/com/thoughtspot/client/model/CommunicationChannelPreferencesResponse.java new file mode 100644 index 000000000..c198f54bd --- /dev/null +++ b/sdks/java/src/main/java/com/thoughtspot/client/model/CommunicationChannelPreferencesResponse.java @@ -0,0 +1,412 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client.model; + +import com.google.gson.Gson; +import com.google.gson.JsonArray; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.TypeAdapter; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.annotations.SerializedName; +import com.google.gson.reflect.TypeToken; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import com.thoughtspot.client.JSON; +import java.io.IOException; +import java.io.Serializable; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Objects; +import org.openapitools.jackson.nullable.JsonNullable; + +/** CommunicationChannelPreferencesResponse */ +@javax.annotation.Generated( + value = "org.openapitools.codegen.languages.JavaClientCodegen", + comments = "Generator version: 7.12.0") +public class CommunicationChannelPreferencesResponse implements Serializable { + private static final long serialVersionUID = 1L; + + public static final String SERIALIZED_NAME_CLUSTER_PREFERENCES = "cluster_preferences"; + + @SerializedName(SERIALIZED_NAME_CLUSTER_PREFERENCES) + @javax.annotation.Nullable + private List clusterPreferences; + + public static final String SERIALIZED_NAME_ORG_PREFERENCES = "org_preferences"; + + @SerializedName(SERIALIZED_NAME_ORG_PREFERENCES) + @javax.annotation.Nullable + private List orgPreferences; + + public CommunicationChannelPreferencesResponse() {} + + public CommunicationChannelPreferencesResponse clusterPreferences( + @javax.annotation.Nullable List clusterPreferences) { + this.clusterPreferences = clusterPreferences; + return this; + } + + public CommunicationChannelPreferencesResponse addClusterPreferencesItem( + EventChannelConfig clusterPreferencesItem) { + if (this.clusterPreferences == null) { + this.clusterPreferences = new ArrayList<>(); + } + this.clusterPreferences.add(clusterPreferencesItem); + return this; + } + + /** + * Cluster-level default configurations. + * + * @return clusterPreferences + */ + @javax.annotation.Nullable + public List getClusterPreferences() { + return clusterPreferences; + } + + public void setClusterPreferences( + @javax.annotation.Nullable List clusterPreferences) { + this.clusterPreferences = clusterPreferences; + } + + public CommunicationChannelPreferencesResponse orgPreferences( + @javax.annotation.Nullable List orgPreferences) { + this.orgPreferences = orgPreferences; + return this; + } + + public CommunicationChannelPreferencesResponse addOrgPreferencesItem( + OrgChannelConfigResponse orgPreferencesItem) { + if (this.orgPreferences == null) { + this.orgPreferences = new ArrayList<>(); + } + this.orgPreferences.add(orgPreferencesItem); + return this; + } + + /** + * Org-specific configurations. + * + * @return orgPreferences + */ + @javax.annotation.Nullable + public List getOrgPreferences() { + return orgPreferences; + } + + public void setOrgPreferences( + @javax.annotation.Nullable List orgPreferences) { + this.orgPreferences = orgPreferences; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key name of the property + * @param value value of the property + * @return the CommunicationChannelPreferencesResponse instance itself + */ + public CommunicationChannelPreferencesResponse putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return a map of objects + */ + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key name of the property + * @return an object + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + CommunicationChannelPreferencesResponse communicationChannelPreferencesResponse = + (CommunicationChannelPreferencesResponse) o; + return Objects.equals( + this.clusterPreferences, + communicationChannelPreferencesResponse.clusterPreferences) + && Objects.equals( + this.orgPreferences, communicationChannelPreferencesResponse.orgPreferences) + && Objects.equals( + this.additionalProperties, + communicationChannelPreferencesResponse.additionalProperties); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b + || (a != null + && b != null + && a.isPresent() + && b.isPresent() + && Objects.deepEquals(a.get(), b.get())); + } + + @Override + public int hashCode() { + return Objects.hash(clusterPreferences, orgPreferences, additionalProperties); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; + } + return a.isPresent() ? Arrays.deepHashCode(new Object[] {a.get()}) : 31; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class CommunicationChannelPreferencesResponse {\n"); + sb.append(" clusterPreferences: ") + .append(toIndentedString(clusterPreferences)) + .append("\n"); + sb.append(" orgPreferences: ").append(toIndentedString(orgPreferences)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first + * line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("cluster_preferences"); + openapiFields.add("org_preferences"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to + * CommunicationChannelPreferencesResponse + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!CommunicationChannelPreferencesResponse.openapiRequiredFields + .isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException( + String.format( + "The required field(s) %s in" + + " CommunicationChannelPreferencesResponse is not found in" + + " the empty JSON string", + CommunicationChannelPreferencesResponse.openapiRequiredFields + .toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if (jsonObj.get("cluster_preferences") != null + && !jsonObj.get("cluster_preferences").isJsonNull()) { + JsonArray jsonArrayclusterPreferences = jsonObj.getAsJsonArray("cluster_preferences"); + if (jsonArrayclusterPreferences != null) { + // ensure the json data is an array + if (!jsonObj.get("cluster_preferences").isJsonArray()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `cluster_preferences` to be an array in" + + " the JSON string but got `%s`", + jsonObj.get("cluster_preferences").toString())); + } + + // validate the optional field `cluster_preferences` (array) + for (int i = 0; i < jsonArrayclusterPreferences.size(); i++) { + EventChannelConfig.validateJsonElement(jsonArrayclusterPreferences.get(i)); + } + ; + } + } + if (jsonObj.get("org_preferences") != null + && !jsonObj.get("org_preferences").isJsonNull()) { + JsonArray jsonArrayorgPreferences = jsonObj.getAsJsonArray("org_preferences"); + if (jsonArrayorgPreferences != null) { + // ensure the json data is an array + if (!jsonObj.get("org_preferences").isJsonArray()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `org_preferences` to be an array in the" + + " JSON string but got `%s`", + jsonObj.get("org_preferences").toString())); + } + + // validate the optional field `org_preferences` (array) + for (int i = 0; i < jsonArrayorgPreferences.size(); i++) { + OrgChannelConfigResponse.validateJsonElement(jsonArrayorgPreferences.get(i)); + } + ; + } + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!CommunicationChannelPreferencesResponse.class.isAssignableFrom( + type.getRawType())) { + return null; // this class only serializes 'CommunicationChannelPreferencesResponse' + // and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter = + gson.getDelegateAdapter( + this, TypeToken.get(CommunicationChannelPreferencesResponse.class)); + + return (TypeAdapter) + new TypeAdapter() { + @Override + public void write( + JsonWriter out, CommunicationChannelPreferencesResponse value) + throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + obj.remove("additionalProperties"); + // serialize additional properties + if (value.getAdditionalProperties() != null) { + for (Map.Entry entry : + value.getAdditionalProperties().entrySet()) { + if (entry.getValue() instanceof String) + obj.addProperty(entry.getKey(), (String) entry.getValue()); + else if (entry.getValue() instanceof Number) + obj.addProperty(entry.getKey(), (Number) entry.getValue()); + else if (entry.getValue() instanceof Boolean) + obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); + else if (entry.getValue() instanceof Character) + obj.addProperty( + entry.getKey(), (Character) entry.getValue()); + else { + JsonElement jsonElement = gson.toJsonTree(entry.getValue()); + if (jsonElement.isJsonArray()) { + obj.add(entry.getKey(), jsonElement.getAsJsonArray()); + } else { + obj.add(entry.getKey(), jsonElement.getAsJsonObject()); + } + } + } + } + elementAdapter.write(out, obj); + } + + @Override + public CommunicationChannelPreferencesResponse read(JsonReader in) + throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // store additional fields in the deserialized instance + CommunicationChannelPreferencesResponse instance = + thisAdapter.fromJsonTree(jsonObj); + for (Map.Entry entry : jsonObj.entrySet()) { + if (!openapiFields.contains(entry.getKey())) { + if (entry.getValue().isJsonPrimitive()) { // primitive type + if (entry.getValue().getAsJsonPrimitive().isString()) + instance.putAdditionalProperty( + entry.getKey(), entry.getValue().getAsString()); + else if (entry.getValue().getAsJsonPrimitive().isNumber()) + instance.putAdditionalProperty( + entry.getKey(), entry.getValue().getAsNumber()); + else if (entry.getValue().getAsJsonPrimitive().isBoolean()) + instance.putAdditionalProperty( + entry.getKey(), + entry.getValue().getAsBoolean()); + else + throw new IllegalArgumentException( + String.format( + "The field `%s` has unknown primitive" + + " type. Value: %s", + entry.getKey(), + entry.getValue().toString())); + } else if (entry.getValue().isJsonArray()) { + instance.putAdditionalProperty( + entry.getKey(), + gson.fromJson(entry.getValue(), List.class)); + } else { // JSON object + instance.putAdditionalProperty( + entry.getKey(), + gson.fromJson(entry.getValue(), HashMap.class)); + } + } + } + return instance; + } + }.nullSafe(); + } + } + + /** + * Create an instance of CommunicationChannelPreferencesResponse given an JSON string + * + * @param jsonString JSON string + * @return An instance of CommunicationChannelPreferencesResponse + * @throws IOException if the JSON string is invalid with respect to + * CommunicationChannelPreferencesResponse + */ + public static CommunicationChannelPreferencesResponse fromJson(String jsonString) + throws IOException { + return JSON.getGson().fromJson(jsonString, CommunicationChannelPreferencesResponse.class); + } + + /** + * Convert an instance of CommunicationChannelPreferencesResponse to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} diff --git a/sdks/java/src/main/java/com/thoughtspot/client/model/CommunicationChannelValidateResponse.java b/sdks/java/src/main/java/com/thoughtspot/client/model/CommunicationChannelValidateResponse.java new file mode 100644 index 000000000..a467f72b5 --- /dev/null +++ b/sdks/java/src/main/java/com/thoughtspot/client/model/CommunicationChannelValidateResponse.java @@ -0,0 +1,742 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client.model; + +import com.google.gson.Gson; +import com.google.gson.JsonArray; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.TypeAdapter; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.reflect.TypeToken; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import com.thoughtspot.client.JSON; +import java.io.IOException; +import java.io.Serializable; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Objects; +import org.openapitools.jackson.nullable.JsonNullable; + +/** Response containing validation results for communication channel configuration. */ +@javax.annotation.Generated( + value = "org.openapitools.codegen.languages.JavaClientCodegen", + comments = "Generator version: 7.12.0") +public class CommunicationChannelValidateResponse implements Serializable { + private static final long serialVersionUID = 1L; + + /** Type of communication channel that was validated. */ + @JsonAdapter(ChannelTypeEnum.Adapter.class) + public enum ChannelTypeEnum { + WEBHOOK("WEBHOOK"); + + private String value; + + ChannelTypeEnum(String value) { + this.value = value; + } + + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + public static ChannelTypeEnum fromValue(String value) { + for (ChannelTypeEnum b : ChannelTypeEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + + public static class Adapter extends TypeAdapter { + @Override + public void write(final JsonWriter jsonWriter, final ChannelTypeEnum enumeration) + throws IOException { + jsonWriter.value(enumeration.getValue()); + } + + @Override + public ChannelTypeEnum read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + return ChannelTypeEnum.fromValue(value); + } + } + + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + String value = jsonElement.getAsString(); + ChannelTypeEnum.fromValue(value); + } + } + + public static final String SERIALIZED_NAME_CHANNEL_TYPE = "channel_type"; + + @SerializedName(SERIALIZED_NAME_CHANNEL_TYPE) + @javax.annotation.Nonnull + private ChannelTypeEnum channelType; + + public static final String SERIALIZED_NAME_CHANNEL_ID = "channel_id"; + + @SerializedName(SERIALIZED_NAME_CHANNEL_ID) + @javax.annotation.Nonnull + private String channelId; + + public static final String SERIALIZED_NAME_CHANNEL_NAME = "channel_name"; + + @SerializedName(SERIALIZED_NAME_CHANNEL_NAME) + @javax.annotation.Nullable + private String channelName; + + /** Event type that was validated. */ + @JsonAdapter(EventTypeEnum.Adapter.class) + public enum EventTypeEnum { + LIVEBOARD_SCHEDULE("LIVEBOARD_SCHEDULE"); + + private String value; + + EventTypeEnum(String value) { + this.value = value; + } + + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + public static EventTypeEnum fromValue(String value) { + for (EventTypeEnum b : EventTypeEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + + public static class Adapter extends TypeAdapter { + @Override + public void write(final JsonWriter jsonWriter, final EventTypeEnum enumeration) + throws IOException { + jsonWriter.value(enumeration.getValue()); + } + + @Override + public EventTypeEnum read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + return EventTypeEnum.fromValue(value); + } + } + + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + String value = jsonElement.getAsString(); + EventTypeEnum.fromValue(value); + } + } + + public static final String SERIALIZED_NAME_EVENT_TYPE = "event_type"; + + @SerializedName(SERIALIZED_NAME_EVENT_TYPE) + @javax.annotation.Nonnull + private EventTypeEnum eventType; + + public static final String SERIALIZED_NAME_JOB_ID = "job_id"; + + @SerializedName(SERIALIZED_NAME_JOB_ID) + @javax.annotation.Nonnull + private String jobId; + + /** Overall result of the validation. */ + @JsonAdapter(ResultCodeEnum.Adapter.class) + public enum ResultCodeEnum { + SUCCESS("SUCCESS"), + + FAILED("FAILED"), + + PARTIAL_SUCCESS("PARTIAL_SUCCESS"); + + private String value; + + ResultCodeEnum(String value) { + this.value = value; + } + + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + public static ResultCodeEnum fromValue(String value) { + for (ResultCodeEnum b : ResultCodeEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + + public static class Adapter extends TypeAdapter { + @Override + public void write(final JsonWriter jsonWriter, final ResultCodeEnum enumeration) + throws IOException { + jsonWriter.value(enumeration.getValue()); + } + + @Override + public ResultCodeEnum read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + return ResultCodeEnum.fromValue(value); + } + } + + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + String value = jsonElement.getAsString(); + ResultCodeEnum.fromValue(value); + } + } + + public static final String SERIALIZED_NAME_RESULT_CODE = "result_code"; + + @SerializedName(SERIALIZED_NAME_RESULT_CODE) + @javax.annotation.Nonnull + private ResultCodeEnum resultCode; + + public static final String SERIALIZED_NAME_DETAILS = "details"; + + @SerializedName(SERIALIZED_NAME_DETAILS) + @javax.annotation.Nullable + private List details; + + public CommunicationChannelValidateResponse() {} + + public CommunicationChannelValidateResponse channelType( + @javax.annotation.Nonnull ChannelTypeEnum channelType) { + this.channelType = channelType; + return this; + } + + /** + * Type of communication channel that was validated. + * + * @return channelType + */ + @javax.annotation.Nonnull + public ChannelTypeEnum getChannelType() { + return channelType; + } + + public void setChannelType(@javax.annotation.Nonnull ChannelTypeEnum channelType) { + this.channelType = channelType; + } + + public CommunicationChannelValidateResponse channelId( + @javax.annotation.Nonnull String channelId) { + this.channelId = channelId; + return this; + } + + /** + * ID of the communication channel (e.g., webhook_id). + * + * @return channelId + */ + @javax.annotation.Nonnull + public String getChannelId() { + return channelId; + } + + public void setChannelId(@javax.annotation.Nonnull String channelId) { + this.channelId = channelId; + } + + public CommunicationChannelValidateResponse channelName( + @javax.annotation.Nullable String channelName) { + this.channelName = channelName; + return this; + } + + /** + * Name of the communication channel (e.g., webhook name). + * + * @return channelName + */ + @javax.annotation.Nullable + public String getChannelName() { + return channelName; + } + + public void setChannelName(@javax.annotation.Nullable String channelName) { + this.channelName = channelName; + } + + public CommunicationChannelValidateResponse eventType( + @javax.annotation.Nonnull EventTypeEnum eventType) { + this.eventType = eventType; + return this; + } + + /** + * Event type that was validated. + * + * @return eventType + */ + @javax.annotation.Nonnull + public EventTypeEnum getEventType() { + return eventType; + } + + public void setEventType(@javax.annotation.Nonnull EventTypeEnum eventType) { + this.eventType = eventType; + } + + public CommunicationChannelValidateResponse jobId(@javax.annotation.Nonnull String jobId) { + this.jobId = jobId; + return this; + } + + /** + * Unique Job Id of the validation. + * + * @return jobId + */ + @javax.annotation.Nonnull + public String getJobId() { + return jobId; + } + + public void setJobId(@javax.annotation.Nonnull String jobId) { + this.jobId = jobId; + } + + public CommunicationChannelValidateResponse resultCode( + @javax.annotation.Nonnull ResultCodeEnum resultCode) { + this.resultCode = resultCode; + return this; + } + + /** + * Overall result of the validation. + * + * @return resultCode + */ + @javax.annotation.Nonnull + public ResultCodeEnum getResultCode() { + return resultCode; + } + + public void setResultCode(@javax.annotation.Nonnull ResultCodeEnum resultCode) { + this.resultCode = resultCode; + } + + public CommunicationChannelValidateResponse details( + @javax.annotation.Nullable List details) { + this.details = details; + return this; + } + + public CommunicationChannelValidateResponse addDetailsItem( + ChannelValidationDetail detailsItem) { + if (this.details == null) { + this.details = new ArrayList<>(); + } + this.details.add(detailsItem); + return this; + } + + /** + * Detailed results of various validation sub-steps. + * + * @return details + */ + @javax.annotation.Nullable + public List getDetails() { + return details; + } + + public void setDetails(@javax.annotation.Nullable List details) { + this.details = details; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key name of the property + * @param value value of the property + * @return the CommunicationChannelValidateResponse instance itself + */ + public CommunicationChannelValidateResponse putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return a map of objects + */ + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key name of the property + * @return an object + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + CommunicationChannelValidateResponse communicationChannelValidateResponse = + (CommunicationChannelValidateResponse) o; + return Objects.equals(this.channelType, communicationChannelValidateResponse.channelType) + && Objects.equals(this.channelId, communicationChannelValidateResponse.channelId) + && Objects.equals( + this.channelName, communicationChannelValidateResponse.channelName) + && Objects.equals(this.eventType, communicationChannelValidateResponse.eventType) + && Objects.equals(this.jobId, communicationChannelValidateResponse.jobId) + && Objects.equals(this.resultCode, communicationChannelValidateResponse.resultCode) + && Objects.equals(this.details, communicationChannelValidateResponse.details) + && Objects.equals( + this.additionalProperties, + communicationChannelValidateResponse.additionalProperties); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b + || (a != null + && b != null + && a.isPresent() + && b.isPresent() + && Objects.deepEquals(a.get(), b.get())); + } + + @Override + public int hashCode() { + return Objects.hash( + channelType, + channelId, + channelName, + eventType, + jobId, + resultCode, + details, + additionalProperties); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; + } + return a.isPresent() ? Arrays.deepHashCode(new Object[] {a.get()}) : 31; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class CommunicationChannelValidateResponse {\n"); + sb.append(" channelType: ").append(toIndentedString(channelType)).append("\n"); + sb.append(" channelId: ").append(toIndentedString(channelId)).append("\n"); + sb.append(" channelName: ").append(toIndentedString(channelName)).append("\n"); + sb.append(" eventType: ").append(toIndentedString(eventType)).append("\n"); + sb.append(" jobId: ").append(toIndentedString(jobId)).append("\n"); + sb.append(" resultCode: ").append(toIndentedString(resultCode)).append("\n"); + sb.append(" details: ").append(toIndentedString(details)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first + * line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("channel_type"); + openapiFields.add("channel_id"); + openapiFields.add("channel_name"); + openapiFields.add("event_type"); + openapiFields.add("job_id"); + openapiFields.add("result_code"); + openapiFields.add("details"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + openapiRequiredFields.add("channel_type"); + openapiRequiredFields.add("channel_id"); + openapiRequiredFields.add("event_type"); + openapiRequiredFields.add("job_id"); + openapiRequiredFields.add("result_code"); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to + * CommunicationChannelValidateResponse + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!CommunicationChannelValidateResponse.openapiRequiredFields + .isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException( + String.format( + "The required field(s) %s in CommunicationChannelValidateResponse" + + " is not found in the empty JSON string", + CommunicationChannelValidateResponse.openapiRequiredFields + .toString())); + } + } + + // check to make sure all required properties/fields are present in the JSON string + for (String requiredField : CommunicationChannelValidateResponse.openapiRequiredFields) { + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException( + String.format( + "The required field `%s` is not found in the JSON string: %s", + requiredField, jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if (!jsonObj.get("channel_type").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `channel_type` to be a primitive type in the JSON" + + " string but got `%s`", + jsonObj.get("channel_type").toString())); + } + // validate the required field `channel_type` + ChannelTypeEnum.validateJsonElement(jsonObj.get("channel_type")); + if (!jsonObj.get("channel_id").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `channel_id` to be a primitive type in the JSON" + + " string but got `%s`", + jsonObj.get("channel_id").toString())); + } + if ((jsonObj.get("channel_name") != null && !jsonObj.get("channel_name").isJsonNull()) + && !jsonObj.get("channel_name").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `channel_name` to be a primitive type in the JSON" + + " string but got `%s`", + jsonObj.get("channel_name").toString())); + } + if (!jsonObj.get("event_type").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `event_type` to be a primitive type in the JSON" + + " string but got `%s`", + jsonObj.get("event_type").toString())); + } + // validate the required field `event_type` + EventTypeEnum.validateJsonElement(jsonObj.get("event_type")); + if (!jsonObj.get("job_id").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `job_id` to be a primitive type in the JSON string" + + " but got `%s`", + jsonObj.get("job_id").toString())); + } + if (!jsonObj.get("result_code").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `result_code` to be a primitive type in the JSON" + + " string but got `%s`", + jsonObj.get("result_code").toString())); + } + // validate the required field `result_code` + ResultCodeEnum.validateJsonElement(jsonObj.get("result_code")); + if (jsonObj.get("details") != null && !jsonObj.get("details").isJsonNull()) { + JsonArray jsonArraydetails = jsonObj.getAsJsonArray("details"); + if (jsonArraydetails != null) { + // ensure the json data is an array + if (!jsonObj.get("details").isJsonArray()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `details` to be an array in the JSON" + + " string but got `%s`", + jsonObj.get("details").toString())); + } + + // validate the optional field `details` (array) + for (int i = 0; i < jsonArraydetails.size(); i++) { + ChannelValidationDetail.validateJsonElement(jsonArraydetails.get(i)); + } + ; + } + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!CommunicationChannelValidateResponse.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'CommunicationChannelValidateResponse' + // and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter = + gson.getDelegateAdapter( + this, TypeToken.get(CommunicationChannelValidateResponse.class)); + + return (TypeAdapter) + new TypeAdapter() { + @Override + public void write( + JsonWriter out, CommunicationChannelValidateResponse value) + throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + obj.remove("additionalProperties"); + // serialize additional properties + if (value.getAdditionalProperties() != null) { + for (Map.Entry entry : + value.getAdditionalProperties().entrySet()) { + if (entry.getValue() instanceof String) + obj.addProperty(entry.getKey(), (String) entry.getValue()); + else if (entry.getValue() instanceof Number) + obj.addProperty(entry.getKey(), (Number) entry.getValue()); + else if (entry.getValue() instanceof Boolean) + obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); + else if (entry.getValue() instanceof Character) + obj.addProperty( + entry.getKey(), (Character) entry.getValue()); + else { + JsonElement jsonElement = gson.toJsonTree(entry.getValue()); + if (jsonElement.isJsonArray()) { + obj.add(entry.getKey(), jsonElement.getAsJsonArray()); + } else { + obj.add(entry.getKey(), jsonElement.getAsJsonObject()); + } + } + } + } + elementAdapter.write(out, obj); + } + + @Override + public CommunicationChannelValidateResponse read(JsonReader in) + throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // store additional fields in the deserialized instance + CommunicationChannelValidateResponse instance = + thisAdapter.fromJsonTree(jsonObj); + for (Map.Entry entry : jsonObj.entrySet()) { + if (!openapiFields.contains(entry.getKey())) { + if (entry.getValue().isJsonPrimitive()) { // primitive type + if (entry.getValue().getAsJsonPrimitive().isString()) + instance.putAdditionalProperty( + entry.getKey(), entry.getValue().getAsString()); + else if (entry.getValue().getAsJsonPrimitive().isNumber()) + instance.putAdditionalProperty( + entry.getKey(), entry.getValue().getAsNumber()); + else if (entry.getValue().getAsJsonPrimitive().isBoolean()) + instance.putAdditionalProperty( + entry.getKey(), + entry.getValue().getAsBoolean()); + else + throw new IllegalArgumentException( + String.format( + "The field `%s` has unknown primitive" + + " type. Value: %s", + entry.getKey(), + entry.getValue().toString())); + } else if (entry.getValue().isJsonArray()) { + instance.putAdditionalProperty( + entry.getKey(), + gson.fromJson(entry.getValue(), List.class)); + } else { // JSON object + instance.putAdditionalProperty( + entry.getKey(), + gson.fromJson(entry.getValue(), HashMap.class)); + } + } + } + return instance; + } + }.nullSafe(); + } + } + + /** + * Create an instance of CommunicationChannelValidateResponse given an JSON string + * + * @param jsonString JSON string + * @return An instance of CommunicationChannelValidateResponse + * @throws IOException if the JSON string is invalid with respect to + * CommunicationChannelValidateResponse + */ + public static CommunicationChannelValidateResponse fromJson(String jsonString) + throws IOException { + return JSON.getGson().fromJson(jsonString, CommunicationChannelValidateResponse.class); + } + + /** + * Convert an instance of CommunicationChannelValidateResponse to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} diff --git a/sdks/java/src/main/java/com/thoughtspot/client/model/ConfigureAuthSettingsRequest.java b/sdks/java/src/main/java/com/thoughtspot/client/model/ConfigureAuthSettingsRequest.java new file mode 100644 index 000000000..591fbaf55 --- /dev/null +++ b/sdks/java/src/main/java/com/thoughtspot/client/model/ConfigureAuthSettingsRequest.java @@ -0,0 +1,462 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client.model; + +import com.google.gson.Gson; +import com.google.gson.JsonArray; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.TypeAdapter; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.reflect.TypeToken; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import com.thoughtspot.client.JSON; +import java.io.IOException; +import java.io.Serializable; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Objects; + +/** ConfigureAuthSettingsRequest */ +@javax.annotation.Generated( + value = "org.openapitools.codegen.languages.JavaClientCodegen", + comments = "Generator version: 7.12.0") +public class ConfigureAuthSettingsRequest implements Serializable { + private static final long serialVersionUID = 1L; + + /** Type of authentication mechanism to configure. Currently supports TRUSTED_AUTH. */ + @JsonAdapter(AuthTypeEnum.Adapter.class) + public enum AuthTypeEnum { + TRUSTED_AUTH("TRUSTED_AUTH"); + + private String value; + + AuthTypeEnum(String value) { + this.value = value; + } + + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + public static AuthTypeEnum fromValue(String value) { + for (AuthTypeEnum b : AuthTypeEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + + public static class Adapter extends TypeAdapter { + @Override + public void write(final JsonWriter jsonWriter, final AuthTypeEnum enumeration) + throws IOException { + jsonWriter.value(enumeration.getValue()); + } + + @Override + public AuthTypeEnum read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + return AuthTypeEnum.fromValue(value); + } + } + + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + String value = jsonElement.getAsString(); + AuthTypeEnum.fromValue(value); + } + } + + public static final String SERIALIZED_NAME_AUTH_TYPE = "auth_type"; + + @SerializedName(SERIALIZED_NAME_AUTH_TYPE) + @javax.annotation.Nonnull + private AuthTypeEnum authType; + + public static final String SERIALIZED_NAME_CLUSTER_PREFERENCES = "cluster_preferences"; + + @SerializedName(SERIALIZED_NAME_CLUSTER_PREFERENCES) + @javax.annotation.Nullable + private AuthClusterPreferencesInput clusterPreferences; + + public static final String SERIALIZED_NAME_ORG_PREFERENCES = "org_preferences"; + + @SerializedName(SERIALIZED_NAME_ORG_PREFERENCES) + @javax.annotation.Nullable + private List orgPreferences; + + public ConfigureAuthSettingsRequest() {} + + public ConfigureAuthSettingsRequest authType(@javax.annotation.Nonnull AuthTypeEnum authType) { + this.authType = authType; + return this; + } + + /** + * Type of authentication mechanism to configure. Currently supports TRUSTED_AUTH. + * + * @return authType + */ + @javax.annotation.Nonnull + public AuthTypeEnum getAuthType() { + return authType; + } + + public void setAuthType(@javax.annotation.Nonnull AuthTypeEnum authType) { + this.authType = authType; + } + + public ConfigureAuthSettingsRequest clusterPreferences( + @javax.annotation.Nullable AuthClusterPreferencesInput clusterPreferences) { + this.clusterPreferences = clusterPreferences; + return this; + } + + /** + * Cluster-level authentication preferences. Omit to leave the existing cluster setting + * unchanged. + * + * @return clusterPreferences + */ + @javax.annotation.Nullable + public AuthClusterPreferencesInput getClusterPreferences() { + return clusterPreferences; + } + + public void setClusterPreferences( + @javax.annotation.Nullable AuthClusterPreferencesInput clusterPreferences) { + this.clusterPreferences = clusterPreferences; + } + + public ConfigureAuthSettingsRequest orgPreferences( + @javax.annotation.Nullable List orgPreferences) { + this.orgPreferences = orgPreferences; + return this; + } + + public ConfigureAuthSettingsRequest addOrgPreferencesItem( + AuthOrgPreferenceInput orgPreferencesItem) { + if (this.orgPreferences == null) { + this.orgPreferences = new ArrayList<>(); + } + this.orgPreferences.add(orgPreferencesItem); + return this; + } + + /** + * Org-level authentication preferences. Each entry identifies an org and the desired status. + * Omit to leave existing org settings unchanged. + * + * @return orgPreferences + */ + @javax.annotation.Nullable + public List getOrgPreferences() { + return orgPreferences; + } + + public void setOrgPreferences( + @javax.annotation.Nullable List orgPreferences) { + this.orgPreferences = orgPreferences; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key name of the property + * @param value value of the property + * @return the ConfigureAuthSettingsRequest instance itself + */ + public ConfigureAuthSettingsRequest putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return a map of objects + */ + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key name of the property + * @return an object + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ConfigureAuthSettingsRequest configureAuthSettingsRequest = + (ConfigureAuthSettingsRequest) o; + return Objects.equals(this.authType, configureAuthSettingsRequest.authType) + && Objects.equals( + this.clusterPreferences, configureAuthSettingsRequest.clusterPreferences) + && Objects.equals(this.orgPreferences, configureAuthSettingsRequest.orgPreferences) + && Objects.equals( + this.additionalProperties, + configureAuthSettingsRequest.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(authType, clusterPreferences, orgPreferences, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ConfigureAuthSettingsRequest {\n"); + sb.append(" authType: ").append(toIndentedString(authType)).append("\n"); + sb.append(" clusterPreferences: ") + .append(toIndentedString(clusterPreferences)) + .append("\n"); + sb.append(" orgPreferences: ").append(toIndentedString(orgPreferences)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first + * line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("auth_type"); + openapiFields.add("cluster_preferences"); + openapiFields.add("org_preferences"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + openapiRequiredFields.add("auth_type"); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to + * ConfigureAuthSettingsRequest + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!ConfigureAuthSettingsRequest.openapiRequiredFields + .isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException( + String.format( + "The required field(s) %s in ConfigureAuthSettingsRequest is not" + + " found in the empty JSON string", + ConfigureAuthSettingsRequest.openapiRequiredFields.toString())); + } + } + + // check to make sure all required properties/fields are present in the JSON string + for (String requiredField : ConfigureAuthSettingsRequest.openapiRequiredFields) { + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException( + String.format( + "The required field `%s` is not found in the JSON string: %s", + requiredField, jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if (!jsonObj.get("auth_type").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `auth_type` to be a primitive type in the JSON" + + " string but got `%s`", + jsonObj.get("auth_type").toString())); + } + // validate the required field `auth_type` + AuthTypeEnum.validateJsonElement(jsonObj.get("auth_type")); + // validate the optional field `cluster_preferences` + if (jsonObj.get("cluster_preferences") != null + && !jsonObj.get("cluster_preferences").isJsonNull()) { + AuthClusterPreferencesInput.validateJsonElement(jsonObj.get("cluster_preferences")); + } + if (jsonObj.get("org_preferences") != null + && !jsonObj.get("org_preferences").isJsonNull()) { + JsonArray jsonArrayorgPreferences = jsonObj.getAsJsonArray("org_preferences"); + if (jsonArrayorgPreferences != null) { + // ensure the json data is an array + if (!jsonObj.get("org_preferences").isJsonArray()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `org_preferences` to be an array in the" + + " JSON string but got `%s`", + jsonObj.get("org_preferences").toString())); + } + + // validate the optional field `org_preferences` (array) + for (int i = 0; i < jsonArrayorgPreferences.size(); i++) { + AuthOrgPreferenceInput.validateJsonElement(jsonArrayorgPreferences.get(i)); + } + ; + } + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!ConfigureAuthSettingsRequest.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'ConfigureAuthSettingsRequest' and its + // subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter = + gson.getDelegateAdapter( + this, TypeToken.get(ConfigureAuthSettingsRequest.class)); + + return (TypeAdapter) + new TypeAdapter() { + @Override + public void write(JsonWriter out, ConfigureAuthSettingsRequest value) + throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + obj.remove("additionalProperties"); + // serialize additional properties + if (value.getAdditionalProperties() != null) { + for (Map.Entry entry : + value.getAdditionalProperties().entrySet()) { + if (entry.getValue() instanceof String) + obj.addProperty(entry.getKey(), (String) entry.getValue()); + else if (entry.getValue() instanceof Number) + obj.addProperty(entry.getKey(), (Number) entry.getValue()); + else if (entry.getValue() instanceof Boolean) + obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); + else if (entry.getValue() instanceof Character) + obj.addProperty( + entry.getKey(), (Character) entry.getValue()); + else { + JsonElement jsonElement = gson.toJsonTree(entry.getValue()); + if (jsonElement.isJsonArray()) { + obj.add(entry.getKey(), jsonElement.getAsJsonArray()); + } else { + obj.add(entry.getKey(), jsonElement.getAsJsonObject()); + } + } + } + } + elementAdapter.write(out, obj); + } + + @Override + public ConfigureAuthSettingsRequest read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // store additional fields in the deserialized instance + ConfigureAuthSettingsRequest instance = + thisAdapter.fromJsonTree(jsonObj); + for (Map.Entry entry : jsonObj.entrySet()) { + if (!openapiFields.contains(entry.getKey())) { + if (entry.getValue().isJsonPrimitive()) { // primitive type + if (entry.getValue().getAsJsonPrimitive().isString()) + instance.putAdditionalProperty( + entry.getKey(), entry.getValue().getAsString()); + else if (entry.getValue().getAsJsonPrimitive().isNumber()) + instance.putAdditionalProperty( + entry.getKey(), entry.getValue().getAsNumber()); + else if (entry.getValue().getAsJsonPrimitive().isBoolean()) + instance.putAdditionalProperty( + entry.getKey(), + entry.getValue().getAsBoolean()); + else + throw new IllegalArgumentException( + String.format( + "The field `%s` has unknown primitive" + + " type. Value: %s", + entry.getKey(), + entry.getValue().toString())); + } else if (entry.getValue().isJsonArray()) { + instance.putAdditionalProperty( + entry.getKey(), + gson.fromJson(entry.getValue(), List.class)); + } else { // JSON object + instance.putAdditionalProperty( + entry.getKey(), + gson.fromJson(entry.getValue(), HashMap.class)); + } + } + } + return instance; + } + }.nullSafe(); + } + } + + /** + * Create an instance of ConfigureAuthSettingsRequest given an JSON string + * + * @param jsonString JSON string + * @return An instance of ConfigureAuthSettingsRequest + * @throws IOException if the JSON string is invalid with respect to + * ConfigureAuthSettingsRequest + */ + public static ConfigureAuthSettingsRequest fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, ConfigureAuthSettingsRequest.class); + } + + /** + * Convert an instance of ConfigureAuthSettingsRequest to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} diff --git a/sdks/java/src/main/java/com/thoughtspot/client/model/ConfigureCommunicationChannelPreferencesRequest.java b/sdks/java/src/main/java/com/thoughtspot/client/model/ConfigureCommunicationChannelPreferencesRequest.java new file mode 100644 index 000000000..40c05cfb5 --- /dev/null +++ b/sdks/java/src/main/java/com/thoughtspot/client/model/ConfigureCommunicationChannelPreferencesRequest.java @@ -0,0 +1,401 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client.model; + +import com.google.gson.Gson; +import com.google.gson.JsonArray; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.TypeAdapter; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.annotations.SerializedName; +import com.google.gson.reflect.TypeToken; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import com.thoughtspot.client.JSON; +import java.io.IOException; +import java.io.Serializable; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Objects; + +/** ConfigureCommunicationChannelPreferencesRequest */ +@javax.annotation.Generated( + value = "org.openapitools.codegen.languages.JavaClientCodegen", + comments = "Generator version: 7.12.0") +public class ConfigureCommunicationChannelPreferencesRequest implements Serializable { + private static final long serialVersionUID = 1L; + + public static final String SERIALIZED_NAME_CLUSTER_PREFERENCES = "cluster_preferences"; + + @SerializedName(SERIALIZED_NAME_CLUSTER_PREFERENCES) + @javax.annotation.Nullable + private List clusterPreferences; + + public static final String SERIALIZED_NAME_ORG_PREFERENCES = "org_preferences"; + + @SerializedName(SERIALIZED_NAME_ORG_PREFERENCES) + @javax.annotation.Nullable + private List orgPreferences; + + public ConfigureCommunicationChannelPreferencesRequest() {} + + public ConfigureCommunicationChannelPreferencesRequest clusterPreferences( + @javax.annotation.Nullable List clusterPreferences) { + this.clusterPreferences = clusterPreferences; + return this; + } + + public ConfigureCommunicationChannelPreferencesRequest addClusterPreferencesItem( + EventChannelConfigInput clusterPreferencesItem) { + if (this.clusterPreferences == null) { + this.clusterPreferences = new ArrayList<>(); + } + this.clusterPreferences.add(clusterPreferencesItem); + return this; + } + + /** + * Cluster-level default configurations. + * + * @return clusterPreferences + */ + @javax.annotation.Nullable + public List getClusterPreferences() { + return clusterPreferences; + } + + public void setClusterPreferences( + @javax.annotation.Nullable List clusterPreferences) { + this.clusterPreferences = clusterPreferences; + } + + public ConfigureCommunicationChannelPreferencesRequest orgPreferences( + @javax.annotation.Nullable List orgPreferences) { + this.orgPreferences = orgPreferences; + return this; + } + + public ConfigureCommunicationChannelPreferencesRequest addOrgPreferencesItem( + OrgChannelConfigInput orgPreferencesItem) { + if (this.orgPreferences == null) { + this.orgPreferences = new ArrayList<>(); + } + this.orgPreferences.add(orgPreferencesItem); + return this; + } + + /** + * Org-specific configurations. + * + * @return orgPreferences + */ + @javax.annotation.Nullable + public List getOrgPreferences() { + return orgPreferences; + } + + public void setOrgPreferences( + @javax.annotation.Nullable List orgPreferences) { + this.orgPreferences = orgPreferences; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key name of the property + * @param value value of the property + * @return the ConfigureCommunicationChannelPreferencesRequest instance itself + */ + public ConfigureCommunicationChannelPreferencesRequest putAdditionalProperty( + String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return a map of objects + */ + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key name of the property + * @return an object + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ConfigureCommunicationChannelPreferencesRequest + configureCommunicationChannelPreferencesRequest = + (ConfigureCommunicationChannelPreferencesRequest) o; + return Objects.equals( + this.clusterPreferences, + configureCommunicationChannelPreferencesRequest.clusterPreferences) + && Objects.equals( + this.orgPreferences, + configureCommunicationChannelPreferencesRequest.orgPreferences) + && Objects.equals( + this.additionalProperties, + configureCommunicationChannelPreferencesRequest.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(clusterPreferences, orgPreferences, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ConfigureCommunicationChannelPreferencesRequest {\n"); + sb.append(" clusterPreferences: ") + .append(toIndentedString(clusterPreferences)) + .append("\n"); + sb.append(" orgPreferences: ").append(toIndentedString(orgPreferences)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first + * line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("cluster_preferences"); + openapiFields.add("org_preferences"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to + * ConfigureCommunicationChannelPreferencesRequest + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!ConfigureCommunicationChannelPreferencesRequest.openapiRequiredFields + .isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException( + String.format( + "The required field(s) %s in" + + " ConfigureCommunicationChannelPreferencesRequest is not" + + " found in the empty JSON string", + ConfigureCommunicationChannelPreferencesRequest + .openapiRequiredFields + .toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if (jsonObj.get("cluster_preferences") != null + && !jsonObj.get("cluster_preferences").isJsonNull()) { + JsonArray jsonArrayclusterPreferences = jsonObj.getAsJsonArray("cluster_preferences"); + if (jsonArrayclusterPreferences != null) { + // ensure the json data is an array + if (!jsonObj.get("cluster_preferences").isJsonArray()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `cluster_preferences` to be an array in" + + " the JSON string but got `%s`", + jsonObj.get("cluster_preferences").toString())); + } + + // validate the optional field `cluster_preferences` (array) + for (int i = 0; i < jsonArrayclusterPreferences.size(); i++) { + EventChannelConfigInput.validateJsonElement(jsonArrayclusterPreferences.get(i)); + } + ; + } + } + if (jsonObj.get("org_preferences") != null + && !jsonObj.get("org_preferences").isJsonNull()) { + JsonArray jsonArrayorgPreferences = jsonObj.getAsJsonArray("org_preferences"); + if (jsonArrayorgPreferences != null) { + // ensure the json data is an array + if (!jsonObj.get("org_preferences").isJsonArray()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `org_preferences` to be an array in the" + + " JSON string but got `%s`", + jsonObj.get("org_preferences").toString())); + } + + // validate the optional field `org_preferences` (array) + for (int i = 0; i < jsonArrayorgPreferences.size(); i++) { + OrgChannelConfigInput.validateJsonElement(jsonArrayorgPreferences.get(i)); + } + ; + } + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!ConfigureCommunicationChannelPreferencesRequest.class.isAssignableFrom( + type.getRawType())) { + return null; // this class only serializes + // 'ConfigureCommunicationChannelPreferencesRequest' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter = + gson.getDelegateAdapter( + this, + TypeToken.get(ConfigureCommunicationChannelPreferencesRequest.class)); + + return (TypeAdapter) + new TypeAdapter() { + @Override + public void write( + JsonWriter out, + ConfigureCommunicationChannelPreferencesRequest value) + throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + obj.remove("additionalProperties"); + // serialize additional properties + if (value.getAdditionalProperties() != null) { + for (Map.Entry entry : + value.getAdditionalProperties().entrySet()) { + if (entry.getValue() instanceof String) + obj.addProperty(entry.getKey(), (String) entry.getValue()); + else if (entry.getValue() instanceof Number) + obj.addProperty(entry.getKey(), (Number) entry.getValue()); + else if (entry.getValue() instanceof Boolean) + obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); + else if (entry.getValue() instanceof Character) + obj.addProperty( + entry.getKey(), (Character) entry.getValue()); + else { + JsonElement jsonElement = gson.toJsonTree(entry.getValue()); + if (jsonElement.isJsonArray()) { + obj.add(entry.getKey(), jsonElement.getAsJsonArray()); + } else { + obj.add(entry.getKey(), jsonElement.getAsJsonObject()); + } + } + } + } + elementAdapter.write(out, obj); + } + + @Override + public ConfigureCommunicationChannelPreferencesRequest read(JsonReader in) + throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // store additional fields in the deserialized instance + ConfigureCommunicationChannelPreferencesRequest instance = + thisAdapter.fromJsonTree(jsonObj); + for (Map.Entry entry : jsonObj.entrySet()) { + if (!openapiFields.contains(entry.getKey())) { + if (entry.getValue().isJsonPrimitive()) { // primitive type + if (entry.getValue().getAsJsonPrimitive().isString()) + instance.putAdditionalProperty( + entry.getKey(), entry.getValue().getAsString()); + else if (entry.getValue().getAsJsonPrimitive().isNumber()) + instance.putAdditionalProperty( + entry.getKey(), entry.getValue().getAsNumber()); + else if (entry.getValue().getAsJsonPrimitive().isBoolean()) + instance.putAdditionalProperty( + entry.getKey(), + entry.getValue().getAsBoolean()); + else + throw new IllegalArgumentException( + String.format( + "The field `%s` has unknown primitive" + + " type. Value: %s", + entry.getKey(), + entry.getValue().toString())); + } else if (entry.getValue().isJsonArray()) { + instance.putAdditionalProperty( + entry.getKey(), + gson.fromJson(entry.getValue(), List.class)); + } else { // JSON object + instance.putAdditionalProperty( + entry.getKey(), + gson.fromJson(entry.getValue(), HashMap.class)); + } + } + } + return instance; + } + }.nullSafe(); + } + } + + /** + * Create an instance of ConfigureCommunicationChannelPreferencesRequest given an JSON string + * + * @param jsonString JSON string + * @return An instance of ConfigureCommunicationChannelPreferencesRequest + * @throws IOException if the JSON string is invalid with respect to + * ConfigureCommunicationChannelPreferencesRequest + */ + public static ConfigureCommunicationChannelPreferencesRequest fromJson(String jsonString) + throws IOException { + return JSON.getGson() + .fromJson(jsonString, ConfigureCommunicationChannelPreferencesRequest.class); + } + + /** + * Convert an instance of ConfigureCommunicationChannelPreferencesRequest to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} diff --git a/sdks/java/src/main/java/com/thoughtspot/client/model/ConfigureSecuritySettingsRequest.java b/sdks/java/src/main/java/com/thoughtspot/client/model/ConfigureSecuritySettingsRequest.java new file mode 100644 index 000000000..aa5a6329e --- /dev/null +++ b/sdks/java/src/main/java/com/thoughtspot/client/model/ConfigureSecuritySettingsRequest.java @@ -0,0 +1,367 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client.model; + +import com.google.gson.Gson; +import com.google.gson.JsonArray; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.TypeAdapter; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.annotations.SerializedName; +import com.google.gson.reflect.TypeToken; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import com.thoughtspot.client.JSON; +import java.io.IOException; +import java.io.Serializable; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Objects; + +/** ConfigureSecuritySettingsRequest */ +@javax.annotation.Generated( + value = "org.openapitools.codegen.languages.JavaClientCodegen", + comments = "Generator version: 7.12.0") +public class ConfigureSecuritySettingsRequest implements Serializable { + private static final long serialVersionUID = 1L; + + public static final String SERIALIZED_NAME_CLUSTER_PREFERENCES = "cluster_preferences"; + + @SerializedName(SERIALIZED_NAME_CLUSTER_PREFERENCES) + @javax.annotation.Nullable + private SecuritySettingsClusterPreferencesInput clusterPreferences; + + public static final String SERIALIZED_NAME_ORG_PREFERENCES = "org_preferences"; + + @SerializedName(SERIALIZED_NAME_ORG_PREFERENCES) + @javax.annotation.Nullable + private List orgPreferences; + + public ConfigureSecuritySettingsRequest() {} + + public ConfigureSecuritySettingsRequest clusterPreferences( + @javax.annotation.Nullable SecuritySettingsClusterPreferencesInput clusterPreferences) { + this.clusterPreferences = clusterPreferences; + return this; + } + + /** + * Cluster-level security preferences. + * + * @return clusterPreferences + */ + @javax.annotation.Nullable + public SecuritySettingsClusterPreferencesInput getClusterPreferences() { + return clusterPreferences; + } + + public void setClusterPreferences( + @javax.annotation.Nullable SecuritySettingsClusterPreferencesInput clusterPreferences) { + this.clusterPreferences = clusterPreferences; + } + + public ConfigureSecuritySettingsRequest orgPreferences( + @javax.annotation.Nullable List orgPreferences) { + this.orgPreferences = orgPreferences; + return this; + } + + public ConfigureSecuritySettingsRequest addOrgPreferencesItem( + SecuritySettingsOrgPreferencesInput orgPreferencesItem) { + if (this.orgPreferences == null) { + this.orgPreferences = new ArrayList<>(); + } + this.orgPreferences.add(orgPreferencesItem); + return this; + } + + /** + * Org-level security preferences for the current org. + * + * @return orgPreferences + */ + @javax.annotation.Nullable + public List getOrgPreferences() { + return orgPreferences; + } + + public void setOrgPreferences( + @javax.annotation.Nullable List orgPreferences) { + this.orgPreferences = orgPreferences; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key name of the property + * @param value value of the property + * @return the ConfigureSecuritySettingsRequest instance itself + */ + public ConfigureSecuritySettingsRequest putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return a map of objects + */ + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key name of the property + * @return an object + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ConfigureSecuritySettingsRequest configureSecuritySettingsRequest = + (ConfigureSecuritySettingsRequest) o; + return Objects.equals( + this.clusterPreferences, + configureSecuritySettingsRequest.clusterPreferences) + && Objects.equals( + this.orgPreferences, configureSecuritySettingsRequest.orgPreferences) + && Objects.equals( + this.additionalProperties, + configureSecuritySettingsRequest.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(clusterPreferences, orgPreferences, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ConfigureSecuritySettingsRequest {\n"); + sb.append(" clusterPreferences: ") + .append(toIndentedString(clusterPreferences)) + .append("\n"); + sb.append(" orgPreferences: ").append(toIndentedString(orgPreferences)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first + * line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("cluster_preferences"); + openapiFields.add("org_preferences"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to + * ConfigureSecuritySettingsRequest + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!ConfigureSecuritySettingsRequest.openapiRequiredFields + .isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException( + String.format( + "The required field(s) %s in ConfigureSecuritySettingsRequest is" + + " not found in the empty JSON string", + ConfigureSecuritySettingsRequest.openapiRequiredFields.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // validate the optional field `cluster_preferences` + if (jsonObj.get("cluster_preferences") != null + && !jsonObj.get("cluster_preferences").isJsonNull()) { + SecuritySettingsClusterPreferencesInput.validateJsonElement( + jsonObj.get("cluster_preferences")); + } + if (jsonObj.get("org_preferences") != null + && !jsonObj.get("org_preferences").isJsonNull()) { + JsonArray jsonArrayorgPreferences = jsonObj.getAsJsonArray("org_preferences"); + if (jsonArrayorgPreferences != null) { + // ensure the json data is an array + if (!jsonObj.get("org_preferences").isJsonArray()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `org_preferences` to be an array in the" + + " JSON string but got `%s`", + jsonObj.get("org_preferences").toString())); + } + + // validate the optional field `org_preferences` (array) + for (int i = 0; i < jsonArrayorgPreferences.size(); i++) { + SecuritySettingsOrgPreferencesInput.validateJsonElement( + jsonArrayorgPreferences.get(i)); + } + ; + } + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!ConfigureSecuritySettingsRequest.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'ConfigureSecuritySettingsRequest' and + // its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter = + gson.getDelegateAdapter( + this, TypeToken.get(ConfigureSecuritySettingsRequest.class)); + + return (TypeAdapter) + new TypeAdapter() { + @Override + public void write(JsonWriter out, ConfigureSecuritySettingsRequest value) + throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + obj.remove("additionalProperties"); + // serialize additional properties + if (value.getAdditionalProperties() != null) { + for (Map.Entry entry : + value.getAdditionalProperties().entrySet()) { + if (entry.getValue() instanceof String) + obj.addProperty(entry.getKey(), (String) entry.getValue()); + else if (entry.getValue() instanceof Number) + obj.addProperty(entry.getKey(), (Number) entry.getValue()); + else if (entry.getValue() instanceof Boolean) + obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); + else if (entry.getValue() instanceof Character) + obj.addProperty( + entry.getKey(), (Character) entry.getValue()); + else { + JsonElement jsonElement = gson.toJsonTree(entry.getValue()); + if (jsonElement.isJsonArray()) { + obj.add(entry.getKey(), jsonElement.getAsJsonArray()); + } else { + obj.add(entry.getKey(), jsonElement.getAsJsonObject()); + } + } + } + } + elementAdapter.write(out, obj); + } + + @Override + public ConfigureSecuritySettingsRequest read(JsonReader in) + throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // store additional fields in the deserialized instance + ConfigureSecuritySettingsRequest instance = + thisAdapter.fromJsonTree(jsonObj); + for (Map.Entry entry : jsonObj.entrySet()) { + if (!openapiFields.contains(entry.getKey())) { + if (entry.getValue().isJsonPrimitive()) { // primitive type + if (entry.getValue().getAsJsonPrimitive().isString()) + instance.putAdditionalProperty( + entry.getKey(), entry.getValue().getAsString()); + else if (entry.getValue().getAsJsonPrimitive().isNumber()) + instance.putAdditionalProperty( + entry.getKey(), entry.getValue().getAsNumber()); + else if (entry.getValue().getAsJsonPrimitive().isBoolean()) + instance.putAdditionalProperty( + entry.getKey(), + entry.getValue().getAsBoolean()); + else + throw new IllegalArgumentException( + String.format( + "The field `%s` has unknown primitive" + + " type. Value: %s", + entry.getKey(), + entry.getValue().toString())); + } else if (entry.getValue().isJsonArray()) { + instance.putAdditionalProperty( + entry.getKey(), + gson.fromJson(entry.getValue(), List.class)); + } else { // JSON object + instance.putAdditionalProperty( + entry.getKey(), + gson.fromJson(entry.getValue(), HashMap.class)); + } + } + } + return instance; + } + }.nullSafe(); + } + } + + /** + * Create an instance of ConfigureSecuritySettingsRequest given an JSON string + * + * @param jsonString JSON string + * @return An instance of ConfigureSecuritySettingsRequest + * @throws IOException if the JSON string is invalid with respect to + * ConfigureSecuritySettingsRequest + */ + public static ConfigureSecuritySettingsRequest fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, ConfigureSecuritySettingsRequest.class); + } + + /** + * Convert an instance of ConfigureSecuritySettingsRequest to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} diff --git a/sdks/java/src/main/java/com/thoughtspot/client/model/ConnectionConfigurationResponse.java b/sdks/java/src/main/java/com/thoughtspot/client/model/ConnectionConfigurationResponse.java new file mode 100644 index 000000000..9856162e5 --- /dev/null +++ b/sdks/java/src/main/java/com/thoughtspot/client/model/ConnectionConfigurationResponse.java @@ -0,0 +1,957 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client.model; + +import com.google.gson.Gson; +import com.google.gson.JsonArray; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.TypeAdapter; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.reflect.TypeToken; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import com.thoughtspot.client.JSON; +import java.io.IOException; +import java.io.Serializable; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Objects; +import org.openapitools.jackson.nullable.JsonNullable; + +/** ConnectionConfigurationResponse */ +@javax.annotation.Generated( + value = "org.openapitools.codegen.languages.JavaClientCodegen", + comments = "Generator version: 7.12.0") +public class ConnectionConfigurationResponse implements Serializable { + private static final long serialVersionUID = 1L; + + public static final String SERIALIZED_NAME_CONFIGURATION_IDENTIFIER = + "configuration_identifier"; + + @SerializedName(SERIALIZED_NAME_CONFIGURATION_IDENTIFIER) + @javax.annotation.Nullable + private String configurationIdentifier; + + public static final String SERIALIZED_NAME_NAME = "name"; + + @SerializedName(SERIALIZED_NAME_NAME) + @javax.annotation.Nullable + private String name; + + public static final String SERIALIZED_NAME_DESCRIPTION = "description"; + + @SerializedName(SERIALIZED_NAME_DESCRIPTION) + @javax.annotation.Nullable + private String description; + + public static final String SERIALIZED_NAME_CONFIGURATION = "configuration"; + + @SerializedName(SERIALIZED_NAME_CONFIGURATION) + @javax.annotation.Nullable + private Object _configuration; + + public static final String SERIALIZED_NAME_POLICY_PRINCIPALS = "policy_principals"; + + @SerializedName(SERIALIZED_NAME_POLICY_PRINCIPALS) + @javax.annotation.Nullable + private List policyPrincipals; + + /** Gets or Sets policyProcesses */ + @JsonAdapter(PolicyProcessesEnum.Adapter.class) + public enum PolicyProcessesEnum { + SAGE_INDEXING("SAGE_INDEXING"), + + ROW_COUNT_STATS("ROW_COUNT_STATS"); + + private String value; + + PolicyProcessesEnum(String value) { + this.value = value; + } + + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + public static PolicyProcessesEnum fromValue(String value) { + for (PolicyProcessesEnum b : PolicyProcessesEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + + public static class Adapter extends TypeAdapter { + @Override + public void write(final JsonWriter jsonWriter, final PolicyProcessesEnum enumeration) + throws IOException { + jsonWriter.value(enumeration.getValue()); + } + + @Override + public PolicyProcessesEnum read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + return PolicyProcessesEnum.fromValue(value); + } + } + + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + String value = jsonElement.getAsString(); + PolicyProcessesEnum.fromValue(value); + } + } + + public static final String SERIALIZED_NAME_POLICY_PROCESSES = "policy_processes"; + + @SerializedName(SERIALIZED_NAME_POLICY_PROCESSES) + @javax.annotation.Nullable + private List policyProcesses; + + public static final String SERIALIZED_NAME_DISABLED = "disabled"; + + @SerializedName(SERIALIZED_NAME_DISABLED) + @javax.annotation.Nullable + private Boolean disabled; + + /** Gets or Sets dataWarehouseType */ + @JsonAdapter(DataWarehouseTypeEnum.Adapter.class) + public enum DataWarehouseTypeEnum { + SNOWFLAKE("SNOWFLAKE"), + + AMAZON_REDSHIFT("AMAZON_REDSHIFT"), + + GOOGLE_BIGQUERY("GOOGLE_BIGQUERY"), + + AZURE_SYNAPSE("AZURE_SYNAPSE"), + + TERADATA("TERADATA"), + + SAP_HANA("SAP_HANA"), + + STARBURST("STARBURST"), + + ORACLE_ADW("ORACLE_ADW"), + + DATABRICKS("DATABRICKS"), + + DENODO("DENODO"), + + DREMIO("DREMIO"), + + TRINO("TRINO"), + + PRESTO("PRESTO"), + + POSTGRES("POSTGRES"), + + SQLSERVER("SQLSERVER"), + + MYSQL("MYSQL"), + + GENERIC_JDBC("GENERIC_JDBC"), + + AMAZON_RDS_POSTGRESQL("AMAZON_RDS_POSTGRESQL"), + + AMAZON_AURORA_POSTGRESQL("AMAZON_AURORA_POSTGRESQL"), + + AMAZON_RDS_MYSQL("AMAZON_RDS_MYSQL"), + + AMAZON_AURORA_MYSQL("AMAZON_AURORA_MYSQL"), + + LOOKER("LOOKER"), + + AMAZON_ATHENA("AMAZON_ATHENA"), + + SINGLESTORE("SINGLESTORE"), + + GCP_SQLSERVER("GCP_SQLSERVER"), + + GCP_ALLOYDB_POSTGRESQL("GCP_ALLOYDB_POSTGRESQL"), + + GCP_POSTGRESQL("GCP_POSTGRESQL"), + + GCP_MYSQL("GCP_MYSQL"), + + MODE("MODE"), + + GOOGLE_SHEETS("GOOGLE_SHEETS"), + + FALCON("FALCON"), + + FALCON_ONPREM("FALCON_ONPREM"), + + CLICKHOUSE("CLICKHOUSE"), + + IOMETE("IOMETE"); + + private String value; + + DataWarehouseTypeEnum(String value) { + this.value = value; + } + + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + public static DataWarehouseTypeEnum fromValue(String value) { + for (DataWarehouseTypeEnum b : DataWarehouseTypeEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + return null; + } + + public static class Adapter extends TypeAdapter { + @Override + public void write(final JsonWriter jsonWriter, final DataWarehouseTypeEnum enumeration) + throws IOException { + jsonWriter.value(enumeration.getValue()); + } + + @Override + public DataWarehouseTypeEnum read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + return DataWarehouseTypeEnum.fromValue(value); + } + } + + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + String value = jsonElement.getAsString(); + DataWarehouseTypeEnum.fromValue(value); + } + } + + public static final String SERIALIZED_NAME_DATA_WAREHOUSE_TYPE = "data_warehouse_type"; + + @SerializedName(SERIALIZED_NAME_DATA_WAREHOUSE_TYPE) + @javax.annotation.Nullable + private DataWarehouseTypeEnum dataWarehouseType; + + /** Gets or Sets policyType */ + @JsonAdapter(PolicyTypeEnum.Adapter.class) + public enum PolicyTypeEnum { + NO_POLICY("NO_POLICY"), + + PRINCIPALS("PRINCIPALS"), + + PROCESSES("PROCESSES"); + + private String value; + + PolicyTypeEnum(String value) { + this.value = value; + } + + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + public static PolicyTypeEnum fromValue(String value) { + for (PolicyTypeEnum b : PolicyTypeEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + return null; + } + + public static class Adapter extends TypeAdapter { + @Override + public void write(final JsonWriter jsonWriter, final PolicyTypeEnum enumeration) + throws IOException { + jsonWriter.value(enumeration.getValue()); + } + + @Override + public PolicyTypeEnum read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + return PolicyTypeEnum.fromValue(value); + } + } + + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + String value = jsonElement.getAsString(); + PolicyTypeEnum.fromValue(value); + } + } + + public static final String SERIALIZED_NAME_POLICY_TYPE = "policy_type"; + + @SerializedName(SERIALIZED_NAME_POLICY_TYPE) + @javax.annotation.Nullable + private PolicyTypeEnum policyType; + + public static final String SERIALIZED_NAME_SAME_AS_PARENT = "same_as_parent"; + + @SerializedName(SERIALIZED_NAME_SAME_AS_PARENT) + @javax.annotation.Nullable + private Boolean sameAsParent; + + public static final String SERIALIZED_NAME_POLICY_PROCESS_OPTIONS = "policy_process_options"; + + @SerializedName(SERIALIZED_NAME_POLICY_PROCESS_OPTIONS) + @javax.annotation.Nullable + private PolicyProcessOptions policyProcessOptions; + + public ConnectionConfigurationResponse() {} + + public ConnectionConfigurationResponse configurationIdentifier( + @javax.annotation.Nullable String configurationIdentifier) { + this.configurationIdentifier = configurationIdentifier; + return this; + } + + /** + * Get configurationIdentifier + * + * @return configurationIdentifier + */ + @javax.annotation.Nullable + public String getConfigurationIdentifier() { + return configurationIdentifier; + } + + public void setConfigurationIdentifier( + @javax.annotation.Nullable String configurationIdentifier) { + this.configurationIdentifier = configurationIdentifier; + } + + public ConnectionConfigurationResponse name(@javax.annotation.Nullable String name) { + this.name = name; + return this; + } + + /** + * Get name + * + * @return name + */ + @javax.annotation.Nullable + public String getName() { + return name; + } + + public void setName(@javax.annotation.Nullable String name) { + this.name = name; + } + + public ConnectionConfigurationResponse description( + @javax.annotation.Nullable String description) { + this.description = description; + return this; + } + + /** + * Get description + * + * @return description + */ + @javax.annotation.Nullable + public String getDescription() { + return description; + } + + public void setDescription(@javax.annotation.Nullable String description) { + this.description = description; + } + + public ConnectionConfigurationResponse _configuration( + @javax.annotation.Nullable Object _configuration) { + this._configuration = _configuration; + return this; + } + + /** + * Get _configuration + * + * @return _configuration + */ + @javax.annotation.Nullable + public Object getConfiguration() { + return _configuration; + } + + public void setConfiguration(@javax.annotation.Nullable Object _configuration) { + this._configuration = _configuration; + } + + public ConnectionConfigurationResponse policyPrincipals( + @javax.annotation.Nullable List policyPrincipals) { + this.policyPrincipals = policyPrincipals; + return this; + } + + public ConnectionConfigurationResponse addPolicyPrincipalsItem( + UserPrincipal policyPrincipalsItem) { + if (this.policyPrincipals == null) { + this.policyPrincipals = new ArrayList<>(); + } + this.policyPrincipals.add(policyPrincipalsItem); + return this; + } + + /** + * Get policyPrincipals + * + * @return policyPrincipals + */ + @javax.annotation.Nullable + public List getPolicyPrincipals() { + return policyPrincipals; + } + + public void setPolicyPrincipals( + @javax.annotation.Nullable List policyPrincipals) { + this.policyPrincipals = policyPrincipals; + } + + public ConnectionConfigurationResponse policyProcesses( + @javax.annotation.Nullable List policyProcesses) { + this.policyProcesses = policyProcesses; + return this; + } + + public ConnectionConfigurationResponse addPolicyProcessesItem( + PolicyProcessesEnum policyProcessesItem) { + if (this.policyProcesses == null) { + this.policyProcesses = new ArrayList<>(); + } + this.policyProcesses.add(policyProcessesItem); + return this; + } + + /** + * Get policyProcesses + * + * @return policyProcesses + */ + @javax.annotation.Nullable + public List getPolicyProcesses() { + return policyProcesses; + } + + public void setPolicyProcesses( + @javax.annotation.Nullable List policyProcesses) { + this.policyProcesses = policyProcesses; + } + + public ConnectionConfigurationResponse disabled(@javax.annotation.Nullable Boolean disabled) { + this.disabled = disabled; + return this; + } + + /** + * Get disabled + * + * @return disabled + */ + @javax.annotation.Nullable + public Boolean getDisabled() { + return disabled; + } + + public void setDisabled(@javax.annotation.Nullable Boolean disabled) { + this.disabled = disabled; + } + + public ConnectionConfigurationResponse dataWarehouseType( + @javax.annotation.Nullable DataWarehouseTypeEnum dataWarehouseType) { + this.dataWarehouseType = dataWarehouseType; + return this; + } + + /** + * Get dataWarehouseType + * + * @return dataWarehouseType + */ + @javax.annotation.Nullable + public DataWarehouseTypeEnum getDataWarehouseType() { + return dataWarehouseType; + } + + public void setDataWarehouseType( + @javax.annotation.Nullable DataWarehouseTypeEnum dataWarehouseType) { + this.dataWarehouseType = dataWarehouseType; + } + + public ConnectionConfigurationResponse policyType( + @javax.annotation.Nullable PolicyTypeEnum policyType) { + this.policyType = policyType; + return this; + } + + /** + * Get policyType + * + * @return policyType + */ + @javax.annotation.Nullable + public PolicyTypeEnum getPolicyType() { + return policyType; + } + + public void setPolicyType(@javax.annotation.Nullable PolicyTypeEnum policyType) { + this.policyType = policyType; + } + + public ConnectionConfigurationResponse sameAsParent( + @javax.annotation.Nullable Boolean sameAsParent) { + this.sameAsParent = sameAsParent; + return this; + } + + /** + * Get sameAsParent + * + * @return sameAsParent + */ + @javax.annotation.Nullable + public Boolean getSameAsParent() { + return sameAsParent; + } + + public void setSameAsParent(@javax.annotation.Nullable Boolean sameAsParent) { + this.sameAsParent = sameAsParent; + } + + public ConnectionConfigurationResponse policyProcessOptions( + @javax.annotation.Nullable PolicyProcessOptions policyProcessOptions) { + this.policyProcessOptions = policyProcessOptions; + return this; + } + + /** + * Get policyProcessOptions + * + * @return policyProcessOptions + */ + @javax.annotation.Nullable + public PolicyProcessOptions getPolicyProcessOptions() { + return policyProcessOptions; + } + + public void setPolicyProcessOptions( + @javax.annotation.Nullable PolicyProcessOptions policyProcessOptions) { + this.policyProcessOptions = policyProcessOptions; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key name of the property + * @param value value of the property + * @return the ConnectionConfigurationResponse instance itself + */ + public ConnectionConfigurationResponse putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return a map of objects + */ + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key name of the property + * @return an object + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ConnectionConfigurationResponse connectionConfigurationResponse = + (ConnectionConfigurationResponse) o; + return Objects.equals( + this.configurationIdentifier, + connectionConfigurationResponse.configurationIdentifier) + && Objects.equals(this.name, connectionConfigurationResponse.name) + && Objects.equals(this.description, connectionConfigurationResponse.description) + && Objects.equals( + this._configuration, connectionConfigurationResponse._configuration) + && Objects.equals( + this.policyPrincipals, connectionConfigurationResponse.policyPrincipals) + && Objects.equals( + this.policyProcesses, connectionConfigurationResponse.policyProcesses) + && Objects.equals(this.disabled, connectionConfigurationResponse.disabled) + && Objects.equals( + this.dataWarehouseType, connectionConfigurationResponse.dataWarehouseType) + && Objects.equals(this.policyType, connectionConfigurationResponse.policyType) + && Objects.equals(this.sameAsParent, connectionConfigurationResponse.sameAsParent) + && Objects.equals( + this.policyProcessOptions, + connectionConfigurationResponse.policyProcessOptions) + && Objects.equals( + this.additionalProperties, + connectionConfigurationResponse.additionalProperties); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b + || (a != null + && b != null + && a.isPresent() + && b.isPresent() + && Objects.deepEquals(a.get(), b.get())); + } + + @Override + public int hashCode() { + return Objects.hash( + configurationIdentifier, + name, + description, + _configuration, + policyPrincipals, + policyProcesses, + disabled, + dataWarehouseType, + policyType, + sameAsParent, + policyProcessOptions, + additionalProperties); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; + } + return a.isPresent() ? Arrays.deepHashCode(new Object[] {a.get()}) : 31; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ConnectionConfigurationResponse {\n"); + sb.append(" configurationIdentifier: ") + .append(toIndentedString(configurationIdentifier)) + .append("\n"); + sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append(" description: ").append(toIndentedString(description)).append("\n"); + sb.append(" _configuration: ").append(toIndentedString(_configuration)).append("\n"); + sb.append(" policyPrincipals: ").append(toIndentedString(policyPrincipals)).append("\n"); + sb.append(" policyProcesses: ").append(toIndentedString(policyProcesses)).append("\n"); + sb.append(" disabled: ").append(toIndentedString(disabled)).append("\n"); + sb.append(" dataWarehouseType: ") + .append(toIndentedString(dataWarehouseType)) + .append("\n"); + sb.append(" policyType: ").append(toIndentedString(policyType)).append("\n"); + sb.append(" sameAsParent: ").append(toIndentedString(sameAsParent)).append("\n"); + sb.append(" policyProcessOptions: ") + .append(toIndentedString(policyProcessOptions)) + .append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first + * line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("configuration_identifier"); + openapiFields.add("name"); + openapiFields.add("description"); + openapiFields.add("configuration"); + openapiFields.add("policy_principals"); + openapiFields.add("policy_processes"); + openapiFields.add("disabled"); + openapiFields.add("data_warehouse_type"); + openapiFields.add("policy_type"); + openapiFields.add("same_as_parent"); + openapiFields.add("policy_process_options"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to + * ConnectionConfigurationResponse + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!ConnectionConfigurationResponse.openapiRequiredFields + .isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException( + String.format( + "The required field(s) %s in ConnectionConfigurationResponse is" + + " not found in the empty JSON string", + ConnectionConfigurationResponse.openapiRequiredFields.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if ((jsonObj.get("configuration_identifier") != null + && !jsonObj.get("configuration_identifier").isJsonNull()) + && !jsonObj.get("configuration_identifier").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `configuration_identifier` to be a primitive type" + + " in the JSON string but got `%s`", + jsonObj.get("configuration_identifier").toString())); + } + if ((jsonObj.get("name") != null && !jsonObj.get("name").isJsonNull()) + && !jsonObj.get("name").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `name` to be a primitive type in the JSON string" + + " but got `%s`", + jsonObj.get("name").toString())); + } + if ((jsonObj.get("description") != null && !jsonObj.get("description").isJsonNull()) + && !jsonObj.get("description").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `description` to be a primitive type in the JSON" + + " string but got `%s`", + jsonObj.get("description").toString())); + } + if (jsonObj.get("policy_principals") != null + && !jsonObj.get("policy_principals").isJsonNull()) { + JsonArray jsonArraypolicyPrincipals = jsonObj.getAsJsonArray("policy_principals"); + if (jsonArraypolicyPrincipals != null) { + // ensure the json data is an array + if (!jsonObj.get("policy_principals").isJsonArray()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `policy_principals` to be an array in the" + + " JSON string but got `%s`", + jsonObj.get("policy_principals").toString())); + } + + // validate the optional field `policy_principals` (array) + for (int i = 0; i < jsonArraypolicyPrincipals.size(); i++) { + UserPrincipal.validateJsonElement(jsonArraypolicyPrincipals.get(i)); + } + ; + } + } + // ensure the optional json data is an array if present + if (jsonObj.get("policy_processes") != null + && !jsonObj.get("policy_processes").isJsonNull() + && !jsonObj.get("policy_processes").isJsonArray()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `policy_processes` to be an array in the JSON" + + " string but got `%s`", + jsonObj.get("policy_processes").toString())); + } + if ((jsonObj.get("data_warehouse_type") != null + && !jsonObj.get("data_warehouse_type").isJsonNull()) + && !jsonObj.get("data_warehouse_type").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `data_warehouse_type` to be a primitive type in" + + " the JSON string but got `%s`", + jsonObj.get("data_warehouse_type").toString())); + } + // validate the optional field `data_warehouse_type` + if (jsonObj.get("data_warehouse_type") != null + && !jsonObj.get("data_warehouse_type").isJsonNull()) { + DataWarehouseTypeEnum.validateJsonElement(jsonObj.get("data_warehouse_type")); + } + if ((jsonObj.get("policy_type") != null && !jsonObj.get("policy_type").isJsonNull()) + && !jsonObj.get("policy_type").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `policy_type` to be a primitive type in the JSON" + + " string but got `%s`", + jsonObj.get("policy_type").toString())); + } + // validate the optional field `policy_type` + if (jsonObj.get("policy_type") != null && !jsonObj.get("policy_type").isJsonNull()) { + PolicyTypeEnum.validateJsonElement(jsonObj.get("policy_type")); + } + // validate the optional field `policy_process_options` + if (jsonObj.get("policy_process_options") != null + && !jsonObj.get("policy_process_options").isJsonNull()) { + PolicyProcessOptions.validateJsonElement(jsonObj.get("policy_process_options")); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!ConnectionConfigurationResponse.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'ConnectionConfigurationResponse' and its + // subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter = + gson.getDelegateAdapter( + this, TypeToken.get(ConnectionConfigurationResponse.class)); + + return (TypeAdapter) + new TypeAdapter() { + @Override + public void write(JsonWriter out, ConnectionConfigurationResponse value) + throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + obj.remove("additionalProperties"); + // serialize additional properties + if (value.getAdditionalProperties() != null) { + for (Map.Entry entry : + value.getAdditionalProperties().entrySet()) { + if (entry.getValue() instanceof String) + obj.addProperty(entry.getKey(), (String) entry.getValue()); + else if (entry.getValue() instanceof Number) + obj.addProperty(entry.getKey(), (Number) entry.getValue()); + else if (entry.getValue() instanceof Boolean) + obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); + else if (entry.getValue() instanceof Character) + obj.addProperty( + entry.getKey(), (Character) entry.getValue()); + else { + JsonElement jsonElement = gson.toJsonTree(entry.getValue()); + if (jsonElement.isJsonArray()) { + obj.add(entry.getKey(), jsonElement.getAsJsonArray()); + } else { + obj.add(entry.getKey(), jsonElement.getAsJsonObject()); + } + } + } + } + elementAdapter.write(out, obj); + } + + @Override + public ConnectionConfigurationResponse read(JsonReader in) + throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // store additional fields in the deserialized instance + ConnectionConfigurationResponse instance = + thisAdapter.fromJsonTree(jsonObj); + for (Map.Entry entry : jsonObj.entrySet()) { + if (!openapiFields.contains(entry.getKey())) { + if (entry.getValue().isJsonPrimitive()) { // primitive type + if (entry.getValue().getAsJsonPrimitive().isString()) + instance.putAdditionalProperty( + entry.getKey(), entry.getValue().getAsString()); + else if (entry.getValue().getAsJsonPrimitive().isNumber()) + instance.putAdditionalProperty( + entry.getKey(), entry.getValue().getAsNumber()); + else if (entry.getValue().getAsJsonPrimitive().isBoolean()) + instance.putAdditionalProperty( + entry.getKey(), + entry.getValue().getAsBoolean()); + else + throw new IllegalArgumentException( + String.format( + "The field `%s` has unknown primitive" + + " type. Value: %s", + entry.getKey(), + entry.getValue().toString())); + } else if (entry.getValue().isJsonArray()) { + instance.putAdditionalProperty( + entry.getKey(), + gson.fromJson(entry.getValue(), List.class)); + } else { // JSON object + instance.putAdditionalProperty( + entry.getKey(), + gson.fromJson(entry.getValue(), HashMap.class)); + } + } + } + return instance; + } + }.nullSafe(); + } + } + + /** + * Create an instance of ConnectionConfigurationResponse given an JSON string + * + * @param jsonString JSON string + * @return An instance of ConnectionConfigurationResponse + * @throws IOException if the JSON string is invalid with respect to + * ConnectionConfigurationResponse + */ + public static ConnectionConfigurationResponse fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, ConnectionConfigurationResponse.class); + } + + /** + * Convert an instance of ConnectionConfigurationResponse to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} diff --git a/sdks/java/src/main/java/com/thoughtspot/client/model/ConnectionConfigurationSearchRequest.java b/sdks/java/src/main/java/com/thoughtspot/client/model/ConnectionConfigurationSearchRequest.java new file mode 100644 index 000000000..587ddf78a --- /dev/null +++ b/sdks/java/src/main/java/com/thoughtspot/client/model/ConnectionConfigurationSearchRequest.java @@ -0,0 +1,458 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client.model; + +import com.google.gson.Gson; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.TypeAdapter; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.reflect.TypeToken; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import com.thoughtspot.client.JSON; +import java.io.IOException; +import java.io.Serializable; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Objects; + +/** ConnectionConfigurationSearchRequest */ +@javax.annotation.Generated( + value = "org.openapitools.codegen.languages.JavaClientCodegen", + comments = "Generator version: 7.12.0") +public class ConnectionConfigurationSearchRequest implements Serializable { + private static final long serialVersionUID = 1L; + + public static final String SERIALIZED_NAME_CONNECTION_IDENTIFIER = "connection_identifier"; + + @SerializedName(SERIALIZED_NAME_CONNECTION_IDENTIFIER) + @javax.annotation.Nonnull + private String connectionIdentifier; + + public static final String SERIALIZED_NAME_CONFIGURATION_IDENTIFIER = + "configuration_identifier"; + + @SerializedName(SERIALIZED_NAME_CONFIGURATION_IDENTIFIER) + @javax.annotation.Nullable + private String configurationIdentifier; + + /** Type of policy. */ + @JsonAdapter(PolicyTypeEnum.Adapter.class) + public enum PolicyTypeEnum { + NO_POLICY("NO_POLICY"), + + PRINCIPALS("PRINCIPALS"), + + PROCESSES("PROCESSES"); + + private String value; + + PolicyTypeEnum(String value) { + this.value = value; + } + + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + public static PolicyTypeEnum fromValue(String value) { + for (PolicyTypeEnum b : PolicyTypeEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + + public static class Adapter extends TypeAdapter { + @Override + public void write(final JsonWriter jsonWriter, final PolicyTypeEnum enumeration) + throws IOException { + jsonWriter.value(enumeration.getValue()); + } + + @Override + public PolicyTypeEnum read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + return PolicyTypeEnum.fromValue(value); + } + } + + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + String value = jsonElement.getAsString(); + PolicyTypeEnum.fromValue(value); + } + } + + public static final String SERIALIZED_NAME_POLICY_TYPE = "policy_type"; + + @SerializedName(SERIALIZED_NAME_POLICY_TYPE) + @javax.annotation.Nullable + private PolicyTypeEnum policyType; + + public ConnectionConfigurationSearchRequest() {} + + public ConnectionConfigurationSearchRequest connectionIdentifier( + @javax.annotation.Nonnull String connectionIdentifier) { + this.connectionIdentifier = connectionIdentifier; + return this; + } + + /** + * Unique ID or name of the connection. + * + * @return connectionIdentifier + */ + @javax.annotation.Nonnull + public String getConnectionIdentifier() { + return connectionIdentifier; + } + + public void setConnectionIdentifier(@javax.annotation.Nonnull String connectionIdentifier) { + this.connectionIdentifier = connectionIdentifier; + } + + public ConnectionConfigurationSearchRequest configurationIdentifier( + @javax.annotation.Nullable String configurationIdentifier) { + this.configurationIdentifier = configurationIdentifier; + return this; + } + + /** + * Unique ID or name of the configuration. + * + * @return configurationIdentifier + */ + @javax.annotation.Nullable + public String getConfigurationIdentifier() { + return configurationIdentifier; + } + + public void setConfigurationIdentifier( + @javax.annotation.Nullable String configurationIdentifier) { + this.configurationIdentifier = configurationIdentifier; + } + + public ConnectionConfigurationSearchRequest policyType( + @javax.annotation.Nullable PolicyTypeEnum policyType) { + this.policyType = policyType; + return this; + } + + /** + * Type of policy. + * + * @return policyType + */ + @javax.annotation.Nullable + public PolicyTypeEnum getPolicyType() { + return policyType; + } + + public void setPolicyType(@javax.annotation.Nullable PolicyTypeEnum policyType) { + this.policyType = policyType; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key name of the property + * @param value value of the property + * @return the ConnectionConfigurationSearchRequest instance itself + */ + public ConnectionConfigurationSearchRequest putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return a map of objects + */ + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key name of the property + * @return an object + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ConnectionConfigurationSearchRequest connectionConfigurationSearchRequest = + (ConnectionConfigurationSearchRequest) o; + return Objects.equals( + this.connectionIdentifier, + connectionConfigurationSearchRequest.connectionIdentifier) + && Objects.equals( + this.configurationIdentifier, + connectionConfigurationSearchRequest.configurationIdentifier) + && Objects.equals(this.policyType, connectionConfigurationSearchRequest.policyType) + && Objects.equals( + this.additionalProperties, + connectionConfigurationSearchRequest.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash( + connectionIdentifier, configurationIdentifier, policyType, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ConnectionConfigurationSearchRequest {\n"); + sb.append(" connectionIdentifier: ") + .append(toIndentedString(connectionIdentifier)) + .append("\n"); + sb.append(" configurationIdentifier: ") + .append(toIndentedString(configurationIdentifier)) + .append("\n"); + sb.append(" policyType: ").append(toIndentedString(policyType)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first + * line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("connection_identifier"); + openapiFields.add("configuration_identifier"); + openapiFields.add("policy_type"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + openapiRequiredFields.add("connection_identifier"); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to + * ConnectionConfigurationSearchRequest + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!ConnectionConfigurationSearchRequest.openapiRequiredFields + .isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException( + String.format( + "The required field(s) %s in ConnectionConfigurationSearchRequest" + + " is not found in the empty JSON string", + ConnectionConfigurationSearchRequest.openapiRequiredFields + .toString())); + } + } + + // check to make sure all required properties/fields are present in the JSON string + for (String requiredField : ConnectionConfigurationSearchRequest.openapiRequiredFields) { + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException( + String.format( + "The required field `%s` is not found in the JSON string: %s", + requiredField, jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if (!jsonObj.get("connection_identifier").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `connection_identifier` to be a primitive type in" + + " the JSON string but got `%s`", + jsonObj.get("connection_identifier").toString())); + } + if ((jsonObj.get("configuration_identifier") != null + && !jsonObj.get("configuration_identifier").isJsonNull()) + && !jsonObj.get("configuration_identifier").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `configuration_identifier` to be a primitive type" + + " in the JSON string but got `%s`", + jsonObj.get("configuration_identifier").toString())); + } + if ((jsonObj.get("policy_type") != null && !jsonObj.get("policy_type").isJsonNull()) + && !jsonObj.get("policy_type").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `policy_type` to be a primitive type in the JSON" + + " string but got `%s`", + jsonObj.get("policy_type").toString())); + } + // validate the optional field `policy_type` + if (jsonObj.get("policy_type") != null && !jsonObj.get("policy_type").isJsonNull()) { + PolicyTypeEnum.validateJsonElement(jsonObj.get("policy_type")); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!ConnectionConfigurationSearchRequest.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'ConnectionConfigurationSearchRequest' + // and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter = + gson.getDelegateAdapter( + this, TypeToken.get(ConnectionConfigurationSearchRequest.class)); + + return (TypeAdapter) + new TypeAdapter() { + @Override + public void write( + JsonWriter out, ConnectionConfigurationSearchRequest value) + throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + obj.remove("additionalProperties"); + // serialize additional properties + if (value.getAdditionalProperties() != null) { + for (Map.Entry entry : + value.getAdditionalProperties().entrySet()) { + if (entry.getValue() instanceof String) + obj.addProperty(entry.getKey(), (String) entry.getValue()); + else if (entry.getValue() instanceof Number) + obj.addProperty(entry.getKey(), (Number) entry.getValue()); + else if (entry.getValue() instanceof Boolean) + obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); + else if (entry.getValue() instanceof Character) + obj.addProperty( + entry.getKey(), (Character) entry.getValue()); + else { + JsonElement jsonElement = gson.toJsonTree(entry.getValue()); + if (jsonElement.isJsonArray()) { + obj.add(entry.getKey(), jsonElement.getAsJsonArray()); + } else { + obj.add(entry.getKey(), jsonElement.getAsJsonObject()); + } + } + } + } + elementAdapter.write(out, obj); + } + + @Override + public ConnectionConfigurationSearchRequest read(JsonReader in) + throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // store additional fields in the deserialized instance + ConnectionConfigurationSearchRequest instance = + thisAdapter.fromJsonTree(jsonObj); + for (Map.Entry entry : jsonObj.entrySet()) { + if (!openapiFields.contains(entry.getKey())) { + if (entry.getValue().isJsonPrimitive()) { // primitive type + if (entry.getValue().getAsJsonPrimitive().isString()) + instance.putAdditionalProperty( + entry.getKey(), entry.getValue().getAsString()); + else if (entry.getValue().getAsJsonPrimitive().isNumber()) + instance.putAdditionalProperty( + entry.getKey(), entry.getValue().getAsNumber()); + else if (entry.getValue().getAsJsonPrimitive().isBoolean()) + instance.putAdditionalProperty( + entry.getKey(), + entry.getValue().getAsBoolean()); + else + throw new IllegalArgumentException( + String.format( + "The field `%s` has unknown primitive" + + " type. Value: %s", + entry.getKey(), + entry.getValue().toString())); + } else if (entry.getValue().isJsonArray()) { + instance.putAdditionalProperty( + entry.getKey(), + gson.fromJson(entry.getValue(), List.class)); + } else { // JSON object + instance.putAdditionalProperty( + entry.getKey(), + gson.fromJson(entry.getValue(), HashMap.class)); + } + } + } + return instance; + } + }.nullSafe(); + } + } + + /** + * Create an instance of ConnectionConfigurationSearchRequest given an JSON string + * + * @param jsonString JSON string + * @return An instance of ConnectionConfigurationSearchRequest + * @throws IOException if the JSON string is invalid with respect to + * ConnectionConfigurationSearchRequest + */ + public static ConnectionConfigurationSearchRequest fromJson(String jsonString) + throws IOException { + return JSON.getGson().fromJson(jsonString, ConnectionConfigurationSearchRequest.class); + } + + /** + * Convert an instance of ConnectionConfigurationSearchRequest to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} diff --git a/sdks/java/src/main/java/com/thoughtspot/client/model/ConnectionInput.java b/sdks/java/src/main/java/com/thoughtspot/client/model/ConnectionInput.java new file mode 100644 index 000000000..2627058ea --- /dev/null +++ b/sdks/java/src/main/java/com/thoughtspot/client/model/ConnectionInput.java @@ -0,0 +1,411 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client.model; + +import com.google.gson.Gson; +import com.google.gson.JsonArray; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.TypeAdapter; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.annotations.SerializedName; +import com.google.gson.reflect.TypeToken; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import com.thoughtspot.client.JSON; +import java.io.IOException; +import java.io.Serializable; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Objects; +import org.openapitools.jackson.nullable.JsonNullable; + +/** ConnectionInput */ +@javax.annotation.Generated( + value = "org.openapitools.codegen.languages.JavaClientCodegen", + comments = "Generator version: 7.12.0") +public class ConnectionInput implements Serializable { + private static final long serialVersionUID = 1L; + + public static final String SERIALIZED_NAME_IDENTIFIER = "identifier"; + + @SerializedName(SERIALIZED_NAME_IDENTIFIER) + @javax.annotation.Nullable + private String identifier; + + public static final String SERIALIZED_NAME_NAME_PATTERN = "name_pattern"; + + @SerializedName(SERIALIZED_NAME_NAME_PATTERN) + @javax.annotation.Nullable + private String namePattern; + + public static final String SERIALIZED_NAME_DATA_WAREHOUSE_OBJECTS = "data_warehouse_objects"; + + @SerializedName(SERIALIZED_NAME_DATA_WAREHOUSE_OBJECTS) + @javax.annotation.Nullable + private List dataWarehouseObjects; + + public ConnectionInput() {} + + public ConnectionInput identifier(@javax.annotation.Nullable String identifier) { + this.identifier = identifier; + return this; + } + + /** + * Unique ID or name of the connection. + * + * @return identifier + */ + @javax.annotation.Nullable + public String getIdentifier() { + return identifier; + } + + public void setIdentifier(@javax.annotation.Nullable String identifier) { + this.identifier = identifier; + } + + public ConnectionInput namePattern(@javax.annotation.Nullable String namePattern) { + this.namePattern = namePattern; + return this; + } + + /** + * A pattern to match case-insensitive name of the connection object. User `%` for a + * wildcard match. + * + * @return namePattern + */ + @javax.annotation.Nullable + public String getNamePattern() { + return namePattern; + } + + public void setNamePattern(@javax.annotation.Nullable String namePattern) { + this.namePattern = namePattern; + } + + public ConnectionInput dataWarehouseObjects( + @javax.annotation.Nullable List dataWarehouseObjects) { + this.dataWarehouseObjects = dataWarehouseObjects; + return this; + } + + public ConnectionInput addDataWarehouseObjectsItem( + DataWarehouseObjectInput dataWarehouseObjectsItem) { + if (this.dataWarehouseObjects == null) { + this.dataWarehouseObjects = new ArrayList<>(); + } + this.dataWarehouseObjects.add(dataWarehouseObjectsItem); + return this; + } + + /** + * Filter options for databases, schemas, tables and columns. + * + * @return dataWarehouseObjects + */ + @javax.annotation.Nullable + public List getDataWarehouseObjects() { + return dataWarehouseObjects; + } + + public void setDataWarehouseObjects( + @javax.annotation.Nullable List dataWarehouseObjects) { + this.dataWarehouseObjects = dataWarehouseObjects; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key name of the property + * @param value value of the property + * @return the ConnectionInput instance itself + */ + public ConnectionInput putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return a map of objects + */ + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key name of the property + * @return an object + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ConnectionInput connectionInput = (ConnectionInput) o; + return Objects.equals(this.identifier, connectionInput.identifier) + && Objects.equals(this.namePattern, connectionInput.namePattern) + && Objects.equals(this.dataWarehouseObjects, connectionInput.dataWarehouseObjects) + && Objects.equals(this.additionalProperties, connectionInput.additionalProperties); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b + || (a != null + && b != null + && a.isPresent() + && b.isPresent() + && Objects.deepEquals(a.get(), b.get())); + } + + @Override + public int hashCode() { + return Objects.hash(identifier, namePattern, dataWarehouseObjects, additionalProperties); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; + } + return a.isPresent() ? Arrays.deepHashCode(new Object[] {a.get()}) : 31; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ConnectionInput {\n"); + sb.append(" identifier: ").append(toIndentedString(identifier)).append("\n"); + sb.append(" namePattern: ").append(toIndentedString(namePattern)).append("\n"); + sb.append(" dataWarehouseObjects: ") + .append(toIndentedString(dataWarehouseObjects)) + .append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first + * line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("identifier"); + openapiFields.add("name_pattern"); + openapiFields.add("data_warehouse_objects"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to ConnectionInput + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!ConnectionInput.openapiRequiredFields + .isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException( + String.format( + "The required field(s) %s in ConnectionInput is not found in the" + + " empty JSON string", + ConnectionInput.openapiRequiredFields.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if ((jsonObj.get("identifier") != null && !jsonObj.get("identifier").isJsonNull()) + && !jsonObj.get("identifier").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `identifier` to be a primitive type in the JSON" + + " string but got `%s`", + jsonObj.get("identifier").toString())); + } + if ((jsonObj.get("name_pattern") != null && !jsonObj.get("name_pattern").isJsonNull()) + && !jsonObj.get("name_pattern").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `name_pattern` to be a primitive type in the JSON" + + " string but got `%s`", + jsonObj.get("name_pattern").toString())); + } + if (jsonObj.get("data_warehouse_objects") != null + && !jsonObj.get("data_warehouse_objects").isJsonNull()) { + JsonArray jsonArraydataWarehouseObjects = + jsonObj.getAsJsonArray("data_warehouse_objects"); + if (jsonArraydataWarehouseObjects != null) { + // ensure the json data is an array + if (!jsonObj.get("data_warehouse_objects").isJsonArray()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `data_warehouse_objects` to be an array in" + + " the JSON string but got `%s`", + jsonObj.get("data_warehouse_objects").toString())); + } + + // validate the optional field `data_warehouse_objects` (array) + for (int i = 0; i < jsonArraydataWarehouseObjects.size(); i++) { + DataWarehouseObjectInput.validateJsonElement( + jsonArraydataWarehouseObjects.get(i)); + } + ; + } + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!ConnectionInput.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'ConnectionInput' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter = + gson.getDelegateAdapter(this, TypeToken.get(ConnectionInput.class)); + + return (TypeAdapter) + new TypeAdapter() { + @Override + public void write(JsonWriter out, ConnectionInput value) + throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + obj.remove("additionalProperties"); + // serialize additional properties + if (value.getAdditionalProperties() != null) { + for (Map.Entry entry : + value.getAdditionalProperties().entrySet()) { + if (entry.getValue() instanceof String) + obj.addProperty(entry.getKey(), (String) entry.getValue()); + else if (entry.getValue() instanceof Number) + obj.addProperty(entry.getKey(), (Number) entry.getValue()); + else if (entry.getValue() instanceof Boolean) + obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); + else if (entry.getValue() instanceof Character) + obj.addProperty( + entry.getKey(), (Character) entry.getValue()); + else { + JsonElement jsonElement = gson.toJsonTree(entry.getValue()); + if (jsonElement.isJsonArray()) { + obj.add(entry.getKey(), jsonElement.getAsJsonArray()); + } else { + obj.add(entry.getKey(), jsonElement.getAsJsonObject()); + } + } + } + } + elementAdapter.write(out, obj); + } + + @Override + public ConnectionInput read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // store additional fields in the deserialized instance + ConnectionInput instance = thisAdapter.fromJsonTree(jsonObj); + for (Map.Entry entry : jsonObj.entrySet()) { + if (!openapiFields.contains(entry.getKey())) { + if (entry.getValue().isJsonPrimitive()) { // primitive type + if (entry.getValue().getAsJsonPrimitive().isString()) + instance.putAdditionalProperty( + entry.getKey(), entry.getValue().getAsString()); + else if (entry.getValue().getAsJsonPrimitive().isNumber()) + instance.putAdditionalProperty( + entry.getKey(), entry.getValue().getAsNumber()); + else if (entry.getValue().getAsJsonPrimitive().isBoolean()) + instance.putAdditionalProperty( + entry.getKey(), + entry.getValue().getAsBoolean()); + else + throw new IllegalArgumentException( + String.format( + "The field `%s` has unknown primitive" + + " type. Value: %s", + entry.getKey(), + entry.getValue().toString())); + } else if (entry.getValue().isJsonArray()) { + instance.putAdditionalProperty( + entry.getKey(), + gson.fromJson(entry.getValue(), List.class)); + } else { // JSON object + instance.putAdditionalProperty( + entry.getKey(), + gson.fromJson(entry.getValue(), HashMap.class)); + } + } + } + return instance; + } + }.nullSafe(); + } + } + + /** + * Create an instance of ConnectionInput given an JSON string + * + * @param jsonString JSON string + * @return An instance of ConnectionInput + * @throws IOException if the JSON string is invalid with respect to ConnectionInput + */ + public static ConnectionInput fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, ConnectionInput.class); + } + + /** + * Convert an instance of ConnectionInput to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} diff --git a/sdks/java/src/main/java/com/thoughtspot/client/model/ContextPayloadV2Input.java b/sdks/java/src/main/java/com/thoughtspot/client/model/ContextPayloadV2Input.java new file mode 100644 index 000000000..b68206ca8 --- /dev/null +++ b/sdks/java/src/main/java/com/thoughtspot/client/model/ContextPayloadV2Input.java @@ -0,0 +1,405 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client.model; + +import com.google.gson.Gson; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.TypeAdapter; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.reflect.TypeToken; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import com.thoughtspot.client.JSON; +import java.io.IOException; +import java.io.Serializable; +import java.util.Arrays; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Objects; +import org.openapitools.jackson.nullable.JsonNullable; + +/** ContextPayloadV2Input */ +@javax.annotation.Generated( + value = "org.openapitools.codegen.languages.JavaClientCodegen", + comments = "Generator version: 7.12.0") +public class ContextPayloadV2Input implements Serializable { + private static final long serialVersionUID = 1L; + + /** Type of the context. */ + @JsonAdapter(TypeEnum.Adapter.class) + public enum TypeEnum { + DATA_SOURCE("data_source"), + + DATA_SOURCE2("DATA_SOURCE"), + + AUTO_MODE("AUTO_MODE"); + + private String value; + + TypeEnum(String value) { + this.value = value; + } + + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + public static TypeEnum fromValue(String value) { + for (TypeEnum b : TypeEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + return null; + } + + public static class Adapter extends TypeAdapter { + @Override + public void write(final JsonWriter jsonWriter, final TypeEnum enumeration) + throws IOException { + jsonWriter.value(enumeration.getValue()); + } + + @Override + public TypeEnum read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + return TypeEnum.fromValue(value); + } + } + + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + String value = jsonElement.getAsString(); + TypeEnum.fromValue(value); + } + } + + public static final String SERIALIZED_NAME_TYPE = "type"; + + @SerializedName(SERIALIZED_NAME_TYPE) + @javax.annotation.Nullable + private TypeEnum type; + + public static final String SERIALIZED_NAME_DATA_SOURCE_CONTEXT = "data_source_context"; + + @SerializedName(SERIALIZED_NAME_DATA_SOURCE_CONTEXT) + @javax.annotation.Nullable + private DataSourceContextInput dataSourceContext; + + public ContextPayloadV2Input() {} + + public ContextPayloadV2Input type(@javax.annotation.Nullable TypeEnum type) { + this.type = type; + return this; + } + + /** + * Type of the context. + * + * @return type + */ + @javax.annotation.Nullable + public TypeEnum getType() { + return type; + } + + public void setType(@javax.annotation.Nullable TypeEnum type) { + this.type = type; + } + + public ContextPayloadV2Input dataSourceContext( + @javax.annotation.Nullable DataSourceContextInput dataSourceContext) { + this.dataSourceContext = dataSourceContext; + return this; + } + + /** + * Get dataSourceContext + * + * @return dataSourceContext + */ + @javax.annotation.Nullable + public DataSourceContextInput getDataSourceContext() { + return dataSourceContext; + } + + public void setDataSourceContext( + @javax.annotation.Nullable DataSourceContextInput dataSourceContext) { + this.dataSourceContext = dataSourceContext; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key name of the property + * @param value value of the property + * @return the ContextPayloadV2Input instance itself + */ + public ContextPayloadV2Input putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return a map of objects + */ + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key name of the property + * @return an object + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ContextPayloadV2Input contextPayloadV2Input = (ContextPayloadV2Input) o; + return Objects.equals(this.type, contextPayloadV2Input.type) + && Objects.equals(this.dataSourceContext, contextPayloadV2Input.dataSourceContext) + && Objects.equals( + this.additionalProperties, contextPayloadV2Input.additionalProperties); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b + || (a != null + && b != null + && a.isPresent() + && b.isPresent() + && Objects.deepEquals(a.get(), b.get())); + } + + @Override + public int hashCode() { + return Objects.hash(type, dataSourceContext, additionalProperties); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; + } + return a.isPresent() ? Arrays.deepHashCode(new Object[] {a.get()}) : 31; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ContextPayloadV2Input {\n"); + sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append(" dataSourceContext: ") + .append(toIndentedString(dataSourceContext)) + .append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first + * line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("type"); + openapiFields.add("data_source_context"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to ContextPayloadV2Input + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!ContextPayloadV2Input.openapiRequiredFields + .isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException( + String.format( + "The required field(s) %s in ContextPayloadV2Input is not found in" + + " the empty JSON string", + ContextPayloadV2Input.openapiRequiredFields.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if ((jsonObj.get("type") != null && !jsonObj.get("type").isJsonNull()) + && !jsonObj.get("type").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `type` to be a primitive type in the JSON string" + + " but got `%s`", + jsonObj.get("type").toString())); + } + // validate the optional field `type` + if (jsonObj.get("type") != null && !jsonObj.get("type").isJsonNull()) { + TypeEnum.validateJsonElement(jsonObj.get("type")); + } + // validate the optional field `data_source_context` + if (jsonObj.get("data_source_context") != null + && !jsonObj.get("data_source_context").isJsonNull()) { + DataSourceContextInput.validateJsonElement(jsonObj.get("data_source_context")); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!ContextPayloadV2Input.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'ContextPayloadV2Input' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter = + gson.getDelegateAdapter(this, TypeToken.get(ContextPayloadV2Input.class)); + + return (TypeAdapter) + new TypeAdapter() { + @Override + public void write(JsonWriter out, ContextPayloadV2Input value) + throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + obj.remove("additionalProperties"); + // serialize additional properties + if (value.getAdditionalProperties() != null) { + for (Map.Entry entry : + value.getAdditionalProperties().entrySet()) { + if (entry.getValue() instanceof String) + obj.addProperty(entry.getKey(), (String) entry.getValue()); + else if (entry.getValue() instanceof Number) + obj.addProperty(entry.getKey(), (Number) entry.getValue()); + else if (entry.getValue() instanceof Boolean) + obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); + else if (entry.getValue() instanceof Character) + obj.addProperty( + entry.getKey(), (Character) entry.getValue()); + else { + JsonElement jsonElement = gson.toJsonTree(entry.getValue()); + if (jsonElement.isJsonArray()) { + obj.add(entry.getKey(), jsonElement.getAsJsonArray()); + } else { + obj.add(entry.getKey(), jsonElement.getAsJsonObject()); + } + } + } + } + elementAdapter.write(out, obj); + } + + @Override + public ContextPayloadV2Input read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // store additional fields in the deserialized instance + ContextPayloadV2Input instance = thisAdapter.fromJsonTree(jsonObj); + for (Map.Entry entry : jsonObj.entrySet()) { + if (!openapiFields.contains(entry.getKey())) { + if (entry.getValue().isJsonPrimitive()) { // primitive type + if (entry.getValue().getAsJsonPrimitive().isString()) + instance.putAdditionalProperty( + entry.getKey(), entry.getValue().getAsString()); + else if (entry.getValue().getAsJsonPrimitive().isNumber()) + instance.putAdditionalProperty( + entry.getKey(), entry.getValue().getAsNumber()); + else if (entry.getValue().getAsJsonPrimitive().isBoolean()) + instance.putAdditionalProperty( + entry.getKey(), + entry.getValue().getAsBoolean()); + else + throw new IllegalArgumentException( + String.format( + "The field `%s` has unknown primitive" + + " type. Value: %s", + entry.getKey(), + entry.getValue().toString())); + } else if (entry.getValue().isJsonArray()) { + instance.putAdditionalProperty( + entry.getKey(), + gson.fromJson(entry.getValue(), List.class)); + } else { // JSON object + instance.putAdditionalProperty( + entry.getKey(), + gson.fromJson(entry.getValue(), HashMap.class)); + } + } + } + return instance; + } + }.nullSafe(); + } + } + + /** + * Create an instance of ContextPayloadV2Input given an JSON string + * + * @param jsonString JSON string + * @return An instance of ContextPayloadV2Input + * @throws IOException if the JSON string is invalid with respect to ContextPayloadV2Input + */ + public static ContextPayloadV2Input fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, ContextPayloadV2Input.class); + } + + /** + * Convert an instance of ContextPayloadV2Input to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} diff --git a/sdks/java/src/main/java/com/thoughtspot/client/model/Conversation.java b/sdks/java/src/main/java/com/thoughtspot/client/model/Conversation.java new file mode 100644 index 000000000..a7196bb0b --- /dev/null +++ b/sdks/java/src/main/java/com/thoughtspot/client/model/Conversation.java @@ -0,0 +1,303 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client.model; + +import com.google.gson.Gson; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.TypeAdapter; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.annotations.SerializedName; +import com.google.gson.reflect.TypeToken; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import com.thoughtspot.client.JSON; +import java.io.IOException; +import java.io.Serializable; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Objects; + +/** Conversation */ +@javax.annotation.Generated( + value = "org.openapitools.codegen.languages.JavaClientCodegen", + comments = "Generator version: 7.12.0") +public class Conversation implements Serializable { + private static final long serialVersionUID = 1L; + + public static final String SERIALIZED_NAME_CONVERSATION_IDENTIFIER = "conversation_identifier"; + + @SerializedName(SERIALIZED_NAME_CONVERSATION_IDENTIFIER) + @javax.annotation.Nonnull + private String conversationIdentifier; + + public Conversation() {} + + public Conversation conversationIdentifier( + @javax.annotation.Nonnull String conversationIdentifier) { + this.conversationIdentifier = conversationIdentifier; + return this; + } + + /** + * Unique identifier of the conversation. + * + * @return conversationIdentifier + */ + @javax.annotation.Nonnull + public String getConversationIdentifier() { + return conversationIdentifier; + } + + public void setConversationIdentifier(@javax.annotation.Nonnull String conversationIdentifier) { + this.conversationIdentifier = conversationIdentifier; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key name of the property + * @param value value of the property + * @return the Conversation instance itself + */ + public Conversation putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return a map of objects + */ + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key name of the property + * @return an object + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + Conversation conversation = (Conversation) o; + return Objects.equals(this.conversationIdentifier, conversation.conversationIdentifier) + && Objects.equals(this.additionalProperties, conversation.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(conversationIdentifier, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class Conversation {\n"); + sb.append(" conversationIdentifier: ") + .append(toIndentedString(conversationIdentifier)) + .append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first + * line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("conversation_identifier"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + openapiRequiredFields.add("conversation_identifier"); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to Conversation + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!Conversation.openapiRequiredFields + .isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException( + String.format( + "The required field(s) %s in Conversation is not found in the" + + " empty JSON string", + Conversation.openapiRequiredFields.toString())); + } + } + + // check to make sure all required properties/fields are present in the JSON string + for (String requiredField : Conversation.openapiRequiredFields) { + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException( + String.format( + "The required field `%s` is not found in the JSON string: %s", + requiredField, jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if (!jsonObj.get("conversation_identifier").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `conversation_identifier` to be a primitive type" + + " in the JSON string but got `%s`", + jsonObj.get("conversation_identifier").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!Conversation.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'Conversation' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter = + gson.getDelegateAdapter(this, TypeToken.get(Conversation.class)); + + return (TypeAdapter) + new TypeAdapter() { + @Override + public void write(JsonWriter out, Conversation value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + obj.remove("additionalProperties"); + // serialize additional properties + if (value.getAdditionalProperties() != null) { + for (Map.Entry entry : + value.getAdditionalProperties().entrySet()) { + if (entry.getValue() instanceof String) + obj.addProperty(entry.getKey(), (String) entry.getValue()); + else if (entry.getValue() instanceof Number) + obj.addProperty(entry.getKey(), (Number) entry.getValue()); + else if (entry.getValue() instanceof Boolean) + obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); + else if (entry.getValue() instanceof Character) + obj.addProperty( + entry.getKey(), (Character) entry.getValue()); + else { + JsonElement jsonElement = gson.toJsonTree(entry.getValue()); + if (jsonElement.isJsonArray()) { + obj.add(entry.getKey(), jsonElement.getAsJsonArray()); + } else { + obj.add(entry.getKey(), jsonElement.getAsJsonObject()); + } + } + } + } + elementAdapter.write(out, obj); + } + + @Override + public Conversation read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // store additional fields in the deserialized instance + Conversation instance = thisAdapter.fromJsonTree(jsonObj); + for (Map.Entry entry : jsonObj.entrySet()) { + if (!openapiFields.contains(entry.getKey())) { + if (entry.getValue().isJsonPrimitive()) { // primitive type + if (entry.getValue().getAsJsonPrimitive().isString()) + instance.putAdditionalProperty( + entry.getKey(), entry.getValue().getAsString()); + else if (entry.getValue().getAsJsonPrimitive().isNumber()) + instance.putAdditionalProperty( + entry.getKey(), entry.getValue().getAsNumber()); + else if (entry.getValue().getAsJsonPrimitive().isBoolean()) + instance.putAdditionalProperty( + entry.getKey(), + entry.getValue().getAsBoolean()); + else + throw new IllegalArgumentException( + String.format( + "The field `%s` has unknown primitive" + + " type. Value: %s", + entry.getKey(), + entry.getValue().toString())); + } else if (entry.getValue().isJsonArray()) { + instance.putAdditionalProperty( + entry.getKey(), + gson.fromJson(entry.getValue(), List.class)); + } else { // JSON object + instance.putAdditionalProperty( + entry.getKey(), + gson.fromJson(entry.getValue(), HashMap.class)); + } + } + } + return instance; + } + }.nullSafe(); + } + } + + /** + * Create an instance of Conversation given an JSON string + * + * @param jsonString JSON string + * @return An instance of Conversation + * @throws IOException if the JSON string is invalid with respect to Conversation + */ + public static Conversation fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, Conversation.class); + } + + /** + * Convert an instance of Conversation to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} diff --git a/sdks/java/src/main/java/com/thoughtspot/client/model/ConversationSettingsInput.java b/sdks/java/src/main/java/com/thoughtspot/client/model/ConversationSettingsInput.java new file mode 100644 index 000000000..dbe36458e --- /dev/null +++ b/sdks/java/src/main/java/com/thoughtspot/client/model/ConversationSettingsInput.java @@ -0,0 +1,415 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client.model; + +import com.google.gson.Gson; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.TypeAdapter; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.annotations.SerializedName; +import com.google.gson.reflect.TypeToken; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import com.thoughtspot.client.JSON; +import java.io.IOException; +import java.io.Serializable; +import java.util.Arrays; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Objects; +import org.openapitools.jackson.nullable.JsonNullable; + +/** ConversationSettingsInput */ +@javax.annotation.Generated( + value = "org.openapitools.codegen.languages.JavaClientCodegen", + comments = "Generator version: 7.12.0") +public class ConversationSettingsInput implements Serializable { + private static final long serialVersionUID = 1L; + + public static final String SERIALIZED_NAME_ENABLE_CONTEXTUAL_CHANGE_ANALYSIS = + "enable_contextual_change_analysis"; + + @SerializedName(SERIALIZED_NAME_ENABLE_CONTEXTUAL_CHANGE_ANALYSIS) + @javax.annotation.Nullable + private Boolean enableContextualChangeAnalysis = true; + + public static final String SERIALIZED_NAME_ENABLE_NATURAL_LANGUAGE_ANSWER_GENERATION = + "enable_natural_language_answer_generation"; + + @SerializedName(SERIALIZED_NAME_ENABLE_NATURAL_LANGUAGE_ANSWER_GENERATION) + @javax.annotation.Nullable + private Boolean enableNaturalLanguageAnswerGeneration = true; + + public static final String SERIALIZED_NAME_ENABLE_REASONING = "enable_reasoning"; + + @SerializedName(SERIALIZED_NAME_ENABLE_REASONING) + @javax.annotation.Nullable + private Boolean enableReasoning = true; + + public static final String SERIALIZED_NAME_ENABLE_SAVE_CHAT = "enable_save_chat"; + + @SerializedName(SERIALIZED_NAME_ENABLE_SAVE_CHAT) + @javax.annotation.Nullable + private Boolean enableSaveChat = false; + + public ConversationSettingsInput() {} + + public ConversationSettingsInput enableContextualChangeAnalysis( + @javax.annotation.Nullable Boolean enableContextualChangeAnalysis) { + this.enableContextualChangeAnalysis = enableContextualChangeAnalysis; + return this; + } + + /** + * Enable contextual change analysis. Default changed from `false` to `true` + * in 26.2.0.cl. Ignored on versions >= 26.2.0.cl where it is always enabled. Version: + * 10.4.0.cl or later + * + * @return enableContextualChangeAnalysis + */ + @javax.annotation.Nullable + public Boolean getEnableContextualChangeAnalysis() { + return enableContextualChangeAnalysis; + } + + public void setEnableContextualChangeAnalysis( + @javax.annotation.Nullable Boolean enableContextualChangeAnalysis) { + this.enableContextualChangeAnalysis = enableContextualChangeAnalysis; + } + + public ConversationSettingsInput enableNaturalLanguageAnswerGeneration( + @javax.annotation.Nullable Boolean enableNaturalLanguageAnswerGeneration) { + this.enableNaturalLanguageAnswerGeneration = enableNaturalLanguageAnswerGeneration; + return this; + } + + /** + * Enable natural language to answer generation. Default changed from `false` to + * `true` in 26.2.0.cl. Ignored on versions >= 26.2.0.cl where it is always + * enabled. Version: 10.4.0.cl or later + * + * @return enableNaturalLanguageAnswerGeneration + */ + @javax.annotation.Nullable + public Boolean getEnableNaturalLanguageAnswerGeneration() { + return enableNaturalLanguageAnswerGeneration; + } + + public void setEnableNaturalLanguageAnswerGeneration( + @javax.annotation.Nullable Boolean enableNaturalLanguageAnswerGeneration) { + this.enableNaturalLanguageAnswerGeneration = enableNaturalLanguageAnswerGeneration; + } + + public ConversationSettingsInput enableReasoning( + @javax.annotation.Nullable Boolean enableReasoning) { + this.enableReasoning = enableReasoning; + return this; + } + + /** + * Enable reasoning. Default changed from `false` to `true` in 26.2.0.cl. + * Ignored on versions >= 26.2.0.cl where it is always enabled. Version: 10.4.0.cl or + * later + * + * @return enableReasoning + */ + @javax.annotation.Nullable + public Boolean getEnableReasoning() { + return enableReasoning; + } + + public void setEnableReasoning(@javax.annotation.Nullable Boolean enableReasoning) { + this.enableReasoning = enableReasoning; + } + + public ConversationSettingsInput enableSaveChat( + @javax.annotation.Nullable Boolean enableSaveChat) { + this.enableSaveChat = enableSaveChat; + return this; + } + + /** + * Enable save conversation. When `true`, the conversation is persisted and can be + * retrieved later via conversation history. Version: 26.5.0.cl or later + * + * @return enableSaveChat + */ + @javax.annotation.Nullable + public Boolean getEnableSaveChat() { + return enableSaveChat; + } + + public void setEnableSaveChat(@javax.annotation.Nullable Boolean enableSaveChat) { + this.enableSaveChat = enableSaveChat; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key name of the property + * @param value value of the property + * @return the ConversationSettingsInput instance itself + */ + public ConversationSettingsInput putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return a map of objects + */ + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key name of the property + * @return an object + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ConversationSettingsInput conversationSettingsInput = (ConversationSettingsInput) o; + return Objects.equals( + this.enableContextualChangeAnalysis, + conversationSettingsInput.enableContextualChangeAnalysis) + && Objects.equals( + this.enableNaturalLanguageAnswerGeneration, + conversationSettingsInput.enableNaturalLanguageAnswerGeneration) + && Objects.equals(this.enableReasoning, conversationSettingsInput.enableReasoning) + && Objects.equals(this.enableSaveChat, conversationSettingsInput.enableSaveChat) + && Objects.equals( + this.additionalProperties, conversationSettingsInput.additionalProperties); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b + || (a != null + && b != null + && a.isPresent() + && b.isPresent() + && Objects.deepEquals(a.get(), b.get())); + } + + @Override + public int hashCode() { + return Objects.hash( + enableContextualChangeAnalysis, + enableNaturalLanguageAnswerGeneration, + enableReasoning, + enableSaveChat, + additionalProperties); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; + } + return a.isPresent() ? Arrays.deepHashCode(new Object[] {a.get()}) : 31; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ConversationSettingsInput {\n"); + sb.append(" enableContextualChangeAnalysis: ") + .append(toIndentedString(enableContextualChangeAnalysis)) + .append("\n"); + sb.append(" enableNaturalLanguageAnswerGeneration: ") + .append(toIndentedString(enableNaturalLanguageAnswerGeneration)) + .append("\n"); + sb.append(" enableReasoning: ").append(toIndentedString(enableReasoning)).append("\n"); + sb.append(" enableSaveChat: ").append(toIndentedString(enableSaveChat)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first + * line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("enable_contextual_change_analysis"); + openapiFields.add("enable_natural_language_answer_generation"); + openapiFields.add("enable_reasoning"); + openapiFields.add("enable_save_chat"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to ConversationSettingsInput + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!ConversationSettingsInput.openapiRequiredFields + .isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException( + String.format( + "The required field(s) %s in ConversationSettingsInput is not" + + " found in the empty JSON string", + ConversationSettingsInput.openapiRequiredFields.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!ConversationSettingsInput.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'ConversationSettingsInput' and its + // subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter = + gson.getDelegateAdapter(this, TypeToken.get(ConversationSettingsInput.class)); + + return (TypeAdapter) + new TypeAdapter() { + @Override + public void write(JsonWriter out, ConversationSettingsInput value) + throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + obj.remove("additionalProperties"); + // serialize additional properties + if (value.getAdditionalProperties() != null) { + for (Map.Entry entry : + value.getAdditionalProperties().entrySet()) { + if (entry.getValue() instanceof String) + obj.addProperty(entry.getKey(), (String) entry.getValue()); + else if (entry.getValue() instanceof Number) + obj.addProperty(entry.getKey(), (Number) entry.getValue()); + else if (entry.getValue() instanceof Boolean) + obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); + else if (entry.getValue() instanceof Character) + obj.addProperty( + entry.getKey(), (Character) entry.getValue()); + else { + JsonElement jsonElement = gson.toJsonTree(entry.getValue()); + if (jsonElement.isJsonArray()) { + obj.add(entry.getKey(), jsonElement.getAsJsonArray()); + } else { + obj.add(entry.getKey(), jsonElement.getAsJsonObject()); + } + } + } + } + elementAdapter.write(out, obj); + } + + @Override + public ConversationSettingsInput read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // store additional fields in the deserialized instance + ConversationSettingsInput instance = thisAdapter.fromJsonTree(jsonObj); + for (Map.Entry entry : jsonObj.entrySet()) { + if (!openapiFields.contains(entry.getKey())) { + if (entry.getValue().isJsonPrimitive()) { // primitive type + if (entry.getValue().getAsJsonPrimitive().isString()) + instance.putAdditionalProperty( + entry.getKey(), entry.getValue().getAsString()); + else if (entry.getValue().getAsJsonPrimitive().isNumber()) + instance.putAdditionalProperty( + entry.getKey(), entry.getValue().getAsNumber()); + else if (entry.getValue().getAsJsonPrimitive().isBoolean()) + instance.putAdditionalProperty( + entry.getKey(), + entry.getValue().getAsBoolean()); + else + throw new IllegalArgumentException( + String.format( + "The field `%s` has unknown primitive" + + " type. Value: %s", + entry.getKey(), + entry.getValue().toString())); + } else if (entry.getValue().isJsonArray()) { + instance.putAdditionalProperty( + entry.getKey(), + gson.fromJson(entry.getValue(), List.class)); + } else { // JSON object + instance.putAdditionalProperty( + entry.getKey(), + gson.fromJson(entry.getValue(), HashMap.class)); + } + } + } + return instance; + } + }.nullSafe(); + } + } + + /** + * Create an instance of ConversationSettingsInput given an JSON string + * + * @param jsonString JSON string + * @return An instance of ConversationSettingsInput + * @throws IOException if the JSON string is invalid with respect to ConversationSettingsInput + */ + public static ConversationSettingsInput fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, ConversationSettingsInput.class); + } + + /** + * Convert an instance of ConversationSettingsInput to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} diff --git a/sdks/java/src/main/java/com/thoughtspot/client/model/ConvertWorksheetToModelRequest.java b/sdks/java/src/main/java/com/thoughtspot/client/model/ConvertWorksheetToModelRequest.java new file mode 100644 index 000000000..ec6e9fbc5 --- /dev/null +++ b/sdks/java/src/main/java/com/thoughtspot/client/model/ConvertWorksheetToModelRequest.java @@ -0,0 +1,442 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client.model; + +import com.google.gson.Gson; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.TypeAdapter; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.annotations.SerializedName; +import com.google.gson.reflect.TypeToken; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import com.thoughtspot.client.JSON; +import java.io.IOException; +import java.io.Serializable; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Objects; +import org.openapitools.jackson.nullable.JsonNullable; + +/** ConvertWorksheetToModelRequest */ +@javax.annotation.Generated( + value = "org.openapitools.codegen.languages.JavaClientCodegen", + comments = "Generator version: 7.12.0") +public class ConvertWorksheetToModelRequest implements Serializable { + private static final long serialVersionUID = 1L; + + public static final String SERIALIZED_NAME_WORKSHEET_IDS = "worksheet_ids"; + + @SerializedName(SERIALIZED_NAME_WORKSHEET_IDS) + @javax.annotation.Nullable + private List worksheetIds; + + public static final String SERIALIZED_NAME_EXCLUDE_WORKSHEET_IDS = "exclude_worksheet_ids"; + + @SerializedName(SERIALIZED_NAME_EXCLUDE_WORKSHEET_IDS) + @javax.annotation.Nullable + private List excludeWorksheetIds; + + public static final String SERIALIZED_NAME_CONVERT_ALL = "convert_all"; + + @SerializedName(SERIALIZED_NAME_CONVERT_ALL) + @javax.annotation.Nullable + private Boolean convertAll = false; + + public static final String SERIALIZED_NAME_APPLY_CHANGES = "apply_changes"; + + @SerializedName(SERIALIZED_NAME_APPLY_CHANGES) + @javax.annotation.Nullable + private Boolean applyChanges = false; + + public ConvertWorksheetToModelRequest() {} + + public ConvertWorksheetToModelRequest worksheetIds( + @javax.annotation.Nullable List worksheetIds) { + this.worksheetIds = worksheetIds; + return this; + } + + public ConvertWorksheetToModelRequest addWorksheetIdsItem(String worksheetIdsItem) { + if (this.worksheetIds == null) { + this.worksheetIds = new ArrayList<>(); + } + this.worksheetIds.add(worksheetIdsItem); + return this; + } + + /** + * List of Worksheet IDs. + * + * @return worksheetIds + */ + @javax.annotation.Nullable + public List getWorksheetIds() { + return worksheetIds; + } + + public void setWorksheetIds(@javax.annotation.Nullable List worksheetIds) { + this.worksheetIds = worksheetIds; + } + + public ConvertWorksheetToModelRequest excludeWorksheetIds( + @javax.annotation.Nullable List excludeWorksheetIds) { + this.excludeWorksheetIds = excludeWorksheetIds; + return this; + } + + public ConvertWorksheetToModelRequest addExcludeWorksheetIdsItem( + String excludeWorksheetIdsItem) { + if (this.excludeWorksheetIds == null) { + this.excludeWorksheetIds = new ArrayList<>(); + } + this.excludeWorksheetIds.add(excludeWorksheetIdsItem); + return this; + } + + /** + * List of Worksheet IDs to be excluded. + * + * @return excludeWorksheetIds + */ + @javax.annotation.Nullable + public List getExcludeWorksheetIds() { + return excludeWorksheetIds; + } + + public void setExcludeWorksheetIds( + @javax.annotation.Nullable List excludeWorksheetIds) { + this.excludeWorksheetIds = excludeWorksheetIds; + } + + public ConvertWorksheetToModelRequest convertAll( + @javax.annotation.Nullable Boolean convertAll) { + this.convertAll = convertAll; + return this; + } + + /** + * Indicates whether all the worksheet needs to be converted to models. + * + * @return convertAll + */ + @javax.annotation.Nullable + public Boolean getConvertAll() { + return convertAll; + } + + public void setConvertAll(@javax.annotation.Nullable Boolean convertAll) { + this.convertAll = convertAll; + } + + public ConvertWorksheetToModelRequest applyChanges( + @javax.annotation.Nullable Boolean applyChanges) { + this.applyChanges = applyChanges; + return this; + } + + /** + * Indicates whether the changes should be applied to database. + * + * @return applyChanges + */ + @javax.annotation.Nullable + public Boolean getApplyChanges() { + return applyChanges; + } + + public void setApplyChanges(@javax.annotation.Nullable Boolean applyChanges) { + this.applyChanges = applyChanges; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key name of the property + * @param value value of the property + * @return the ConvertWorksheetToModelRequest instance itself + */ + public ConvertWorksheetToModelRequest putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return a map of objects + */ + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key name of the property + * @return an object + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ConvertWorksheetToModelRequest convertWorksheetToModelRequest = + (ConvertWorksheetToModelRequest) o; + return Objects.equals(this.worksheetIds, convertWorksheetToModelRequest.worksheetIds) + && Objects.equals( + this.excludeWorksheetIds, + convertWorksheetToModelRequest.excludeWorksheetIds) + && Objects.equals(this.convertAll, convertWorksheetToModelRequest.convertAll) + && Objects.equals(this.applyChanges, convertWorksheetToModelRequest.applyChanges) + && Objects.equals( + this.additionalProperties, + convertWorksheetToModelRequest.additionalProperties); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b + || (a != null + && b != null + && a.isPresent() + && b.isPresent() + && Objects.deepEquals(a.get(), b.get())); + } + + @Override + public int hashCode() { + return Objects.hash( + worksheetIds, excludeWorksheetIds, convertAll, applyChanges, additionalProperties); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; + } + return a.isPresent() ? Arrays.deepHashCode(new Object[] {a.get()}) : 31; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ConvertWorksheetToModelRequest {\n"); + sb.append(" worksheetIds: ").append(toIndentedString(worksheetIds)).append("\n"); + sb.append(" excludeWorksheetIds: ") + .append(toIndentedString(excludeWorksheetIds)) + .append("\n"); + sb.append(" convertAll: ").append(toIndentedString(convertAll)).append("\n"); + sb.append(" applyChanges: ").append(toIndentedString(applyChanges)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first + * line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("worksheet_ids"); + openapiFields.add("exclude_worksheet_ids"); + openapiFields.add("convert_all"); + openapiFields.add("apply_changes"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to + * ConvertWorksheetToModelRequest + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!ConvertWorksheetToModelRequest.openapiRequiredFields + .isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException( + String.format( + "The required field(s) %s in ConvertWorksheetToModelRequest is not" + + " found in the empty JSON string", + ConvertWorksheetToModelRequest.openapiRequiredFields.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // ensure the optional json data is an array if present + if (jsonObj.get("worksheet_ids") != null + && !jsonObj.get("worksheet_ids").isJsonNull() + && !jsonObj.get("worksheet_ids").isJsonArray()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `worksheet_ids` to be an array in the JSON string" + + " but got `%s`", + jsonObj.get("worksheet_ids").toString())); + } + // ensure the optional json data is an array if present + if (jsonObj.get("exclude_worksheet_ids") != null + && !jsonObj.get("exclude_worksheet_ids").isJsonNull() + && !jsonObj.get("exclude_worksheet_ids").isJsonArray()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `exclude_worksheet_ids` to be an array in the JSON" + + " string but got `%s`", + jsonObj.get("exclude_worksheet_ids").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!ConvertWorksheetToModelRequest.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'ConvertWorksheetToModelRequest' and its + // subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter = + gson.getDelegateAdapter( + this, TypeToken.get(ConvertWorksheetToModelRequest.class)); + + return (TypeAdapter) + new TypeAdapter() { + @Override + public void write(JsonWriter out, ConvertWorksheetToModelRequest value) + throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + obj.remove("additionalProperties"); + // serialize additional properties + if (value.getAdditionalProperties() != null) { + for (Map.Entry entry : + value.getAdditionalProperties().entrySet()) { + if (entry.getValue() instanceof String) + obj.addProperty(entry.getKey(), (String) entry.getValue()); + else if (entry.getValue() instanceof Number) + obj.addProperty(entry.getKey(), (Number) entry.getValue()); + else if (entry.getValue() instanceof Boolean) + obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); + else if (entry.getValue() instanceof Character) + obj.addProperty( + entry.getKey(), (Character) entry.getValue()); + else { + JsonElement jsonElement = gson.toJsonTree(entry.getValue()); + if (jsonElement.isJsonArray()) { + obj.add(entry.getKey(), jsonElement.getAsJsonArray()); + } else { + obj.add(entry.getKey(), jsonElement.getAsJsonObject()); + } + } + } + } + elementAdapter.write(out, obj); + } + + @Override + public ConvertWorksheetToModelRequest read(JsonReader in) + throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // store additional fields in the deserialized instance + ConvertWorksheetToModelRequest instance = + thisAdapter.fromJsonTree(jsonObj); + for (Map.Entry entry : jsonObj.entrySet()) { + if (!openapiFields.contains(entry.getKey())) { + if (entry.getValue().isJsonPrimitive()) { // primitive type + if (entry.getValue().getAsJsonPrimitive().isString()) + instance.putAdditionalProperty( + entry.getKey(), entry.getValue().getAsString()); + else if (entry.getValue().getAsJsonPrimitive().isNumber()) + instance.putAdditionalProperty( + entry.getKey(), entry.getValue().getAsNumber()); + else if (entry.getValue().getAsJsonPrimitive().isBoolean()) + instance.putAdditionalProperty( + entry.getKey(), + entry.getValue().getAsBoolean()); + else + throw new IllegalArgumentException( + String.format( + "The field `%s` has unknown primitive" + + " type. Value: %s", + entry.getKey(), + entry.getValue().toString())); + } else if (entry.getValue().isJsonArray()) { + instance.putAdditionalProperty( + entry.getKey(), + gson.fromJson(entry.getValue(), List.class)); + } else { // JSON object + instance.putAdditionalProperty( + entry.getKey(), + gson.fromJson(entry.getValue(), HashMap.class)); + } + } + } + return instance; + } + }.nullSafe(); + } + } + + /** + * Create an instance of ConvertWorksheetToModelRequest given an JSON string + * + * @param jsonString JSON string + * @return An instance of ConvertWorksheetToModelRequest + * @throws IOException if the JSON string is invalid with respect to + * ConvertWorksheetToModelRequest + */ + public static ConvertWorksheetToModelRequest fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, ConvertWorksheetToModelRequest.class); + } + + /** + * Convert an instance of ConvertWorksheetToModelRequest to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} diff --git a/sdks/java/src/main/java/com/thoughtspot/client/model/CopyObjectRequest.java b/sdks/java/src/main/java/com/thoughtspot/client/model/CopyObjectRequest.java new file mode 100644 index 000000000..2853f8f02 --- /dev/null +++ b/sdks/java/src/main/java/com/thoughtspot/client/model/CopyObjectRequest.java @@ -0,0 +1,466 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client.model; + +import com.google.gson.Gson; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.TypeAdapter; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.reflect.TypeToken; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import com.thoughtspot.client.JSON; +import java.io.IOException; +import java.io.Serializable; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Objects; + +/** CopyObjectRequest */ +@javax.annotation.Generated( + value = "org.openapitools.codegen.languages.JavaClientCodegen", + comments = "Generator version: 7.12.0") +public class CopyObjectRequest implements Serializable { + private static final long serialVersionUID = 1L; + + public static final String SERIALIZED_NAME_DESCRIPTION = "description"; + + @SerializedName(SERIALIZED_NAME_DESCRIPTION) + @javax.annotation.Nullable + private String description; + + public static final String SERIALIZED_NAME_IDENTIFIER = "identifier"; + + @SerializedName(SERIALIZED_NAME_IDENTIFIER) + @javax.annotation.Nonnull + private String identifier; + + /** Type of metadata object */ + @JsonAdapter(TypeEnum.Adapter.class) + public enum TypeEnum { + LIVEBOARD("LIVEBOARD"), + + ANSWER("ANSWER"); + + private String value; + + TypeEnum(String value) { + this.value = value; + } + + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + public static TypeEnum fromValue(String value) { + for (TypeEnum b : TypeEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + + public static class Adapter extends TypeAdapter { + @Override + public void write(final JsonWriter jsonWriter, final TypeEnum enumeration) + throws IOException { + jsonWriter.value(enumeration.getValue()); + } + + @Override + public TypeEnum read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + return TypeEnum.fromValue(value); + } + } + + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + String value = jsonElement.getAsString(); + TypeEnum.fromValue(value); + } + } + + public static final String SERIALIZED_NAME_TYPE = "type"; + + @SerializedName(SERIALIZED_NAME_TYPE) + @javax.annotation.Nullable + private TypeEnum type; + + public static final String SERIALIZED_NAME_TITLE = "title"; + + @SerializedName(SERIALIZED_NAME_TITLE) + @javax.annotation.Nullable + private String title; + + public CopyObjectRequest() {} + + public CopyObjectRequest description(@javax.annotation.Nullable String description) { + this.description = description; + return this; + } + + /** + * Description of the new object + * + * @return description + */ + @javax.annotation.Nullable + public String getDescription() { + return description; + } + + public void setDescription(@javax.annotation.Nullable String description) { + this.description = description; + } + + public CopyObjectRequest identifier(@javax.annotation.Nonnull String identifier) { + this.identifier = identifier; + return this; + } + + /** + * GUID of metadata object to be copied (answer id or liveboard id) + * + * @return identifier + */ + @javax.annotation.Nonnull + public String getIdentifier() { + return identifier; + } + + public void setIdentifier(@javax.annotation.Nonnull String identifier) { + this.identifier = identifier; + } + + public CopyObjectRequest type(@javax.annotation.Nullable TypeEnum type) { + this.type = type; + return this; + } + + /** + * Type of metadata object + * + * @return type + */ + @javax.annotation.Nullable + public TypeEnum getType() { + return type; + } + + public void setType(@javax.annotation.Nullable TypeEnum type) { + this.type = type; + } + + public CopyObjectRequest title(@javax.annotation.Nullable String title) { + this.title = title; + return this; + } + + /** + * Title of the new object + * + * @return title + */ + @javax.annotation.Nullable + public String getTitle() { + return title; + } + + public void setTitle(@javax.annotation.Nullable String title) { + this.title = title; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key name of the property + * @param value value of the property + * @return the CopyObjectRequest instance itself + */ + public CopyObjectRequest putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return a map of objects + */ + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key name of the property + * @return an object + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + CopyObjectRequest copyObjectRequest = (CopyObjectRequest) o; + return Objects.equals(this.description, copyObjectRequest.description) + && Objects.equals(this.identifier, copyObjectRequest.identifier) + && Objects.equals(this.type, copyObjectRequest.type) + && Objects.equals(this.title, copyObjectRequest.title) + && Objects.equals( + this.additionalProperties, copyObjectRequest.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(description, identifier, type, title, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class CopyObjectRequest {\n"); + sb.append(" description: ").append(toIndentedString(description)).append("\n"); + sb.append(" identifier: ").append(toIndentedString(identifier)).append("\n"); + sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append(" title: ").append(toIndentedString(title)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first + * line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("description"); + openapiFields.add("identifier"); + openapiFields.add("type"); + openapiFields.add("title"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + openapiRequiredFields.add("identifier"); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to CopyObjectRequest + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!CopyObjectRequest.openapiRequiredFields + .isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException( + String.format( + "The required field(s) %s in CopyObjectRequest is not found in the" + + " empty JSON string", + CopyObjectRequest.openapiRequiredFields.toString())); + } + } + + // check to make sure all required properties/fields are present in the JSON string + for (String requiredField : CopyObjectRequest.openapiRequiredFields) { + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException( + String.format( + "The required field `%s` is not found in the JSON string: %s", + requiredField, jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if ((jsonObj.get("description") != null && !jsonObj.get("description").isJsonNull()) + && !jsonObj.get("description").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `description` to be a primitive type in the JSON" + + " string but got `%s`", + jsonObj.get("description").toString())); + } + if (!jsonObj.get("identifier").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `identifier` to be a primitive type in the JSON" + + " string but got `%s`", + jsonObj.get("identifier").toString())); + } + if ((jsonObj.get("type") != null && !jsonObj.get("type").isJsonNull()) + && !jsonObj.get("type").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `type` to be a primitive type in the JSON string" + + " but got `%s`", + jsonObj.get("type").toString())); + } + // validate the optional field `type` + if (jsonObj.get("type") != null && !jsonObj.get("type").isJsonNull()) { + TypeEnum.validateJsonElement(jsonObj.get("type")); + } + if ((jsonObj.get("title") != null && !jsonObj.get("title").isJsonNull()) + && !jsonObj.get("title").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `title` to be a primitive type in the JSON string" + + " but got `%s`", + jsonObj.get("title").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!CopyObjectRequest.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'CopyObjectRequest' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter = + gson.getDelegateAdapter(this, TypeToken.get(CopyObjectRequest.class)); + + return (TypeAdapter) + new TypeAdapter() { + @Override + public void write(JsonWriter out, CopyObjectRequest value) + throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + obj.remove("additionalProperties"); + // serialize additional properties + if (value.getAdditionalProperties() != null) { + for (Map.Entry entry : + value.getAdditionalProperties().entrySet()) { + if (entry.getValue() instanceof String) + obj.addProperty(entry.getKey(), (String) entry.getValue()); + else if (entry.getValue() instanceof Number) + obj.addProperty(entry.getKey(), (Number) entry.getValue()); + else if (entry.getValue() instanceof Boolean) + obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); + else if (entry.getValue() instanceof Character) + obj.addProperty( + entry.getKey(), (Character) entry.getValue()); + else { + JsonElement jsonElement = gson.toJsonTree(entry.getValue()); + if (jsonElement.isJsonArray()) { + obj.add(entry.getKey(), jsonElement.getAsJsonArray()); + } else { + obj.add(entry.getKey(), jsonElement.getAsJsonObject()); + } + } + } + } + elementAdapter.write(out, obj); + } + + @Override + public CopyObjectRequest read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // store additional fields in the deserialized instance + CopyObjectRequest instance = thisAdapter.fromJsonTree(jsonObj); + for (Map.Entry entry : jsonObj.entrySet()) { + if (!openapiFields.contains(entry.getKey())) { + if (entry.getValue().isJsonPrimitive()) { // primitive type + if (entry.getValue().getAsJsonPrimitive().isString()) + instance.putAdditionalProperty( + entry.getKey(), entry.getValue().getAsString()); + else if (entry.getValue().getAsJsonPrimitive().isNumber()) + instance.putAdditionalProperty( + entry.getKey(), entry.getValue().getAsNumber()); + else if (entry.getValue().getAsJsonPrimitive().isBoolean()) + instance.putAdditionalProperty( + entry.getKey(), + entry.getValue().getAsBoolean()); + else + throw new IllegalArgumentException( + String.format( + "The field `%s` has unknown primitive" + + " type. Value: %s", + entry.getKey(), + entry.getValue().toString())); + } else if (entry.getValue().isJsonArray()) { + instance.putAdditionalProperty( + entry.getKey(), + gson.fromJson(entry.getValue(), List.class)); + } else { // JSON object + instance.putAdditionalProperty( + entry.getKey(), + gson.fromJson(entry.getValue(), HashMap.class)); + } + } + } + return instance; + } + }.nullSafe(); + } + } + + /** + * Create an instance of CopyObjectRequest given an JSON string + * + * @param jsonString JSON string + * @return An instance of CopyObjectRequest + * @throws IOException if the JSON string is invalid with respect to CopyObjectRequest + */ + public static CopyObjectRequest fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, CopyObjectRequest.class); + } + + /** + * Convert an instance of CopyObjectRequest to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} diff --git a/sdks/java/src/main/java/com/thoughtspot/client/model/CreateAgentConversationRequest.java b/sdks/java/src/main/java/com/thoughtspot/client/model/CreateAgentConversationRequest.java new file mode 100644 index 000000000..1c7d42878 --- /dev/null +++ b/sdks/java/src/main/java/com/thoughtspot/client/model/CreateAgentConversationRequest.java @@ -0,0 +1,344 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client.model; + +import com.google.gson.Gson; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.TypeAdapter; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.annotations.SerializedName; +import com.google.gson.reflect.TypeToken; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import com.thoughtspot.client.JSON; +import java.io.IOException; +import java.io.Serializable; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Objects; + +/** CreateAgentConversationRequest */ +@javax.annotation.Generated( + value = "org.openapitools.codegen.languages.JavaClientCodegen", + comments = "Generator version: 7.12.0") +public class CreateAgentConversationRequest implements Serializable { + private static final long serialVersionUID = 1L; + + public static final String SERIALIZED_NAME_METADATA_CONTEXT = "metadata_context"; + + @SerializedName(SERIALIZED_NAME_METADATA_CONTEXT) + @javax.annotation.Nonnull + private ContextPayloadV2Input metadataContext; + + public static final String SERIALIZED_NAME_CONVERSATION_SETTINGS = "conversation_settings"; + + @SerializedName(SERIALIZED_NAME_CONVERSATION_SETTINGS) + @javax.annotation.Nonnull + private ConversationSettingsInput conversationSettings; + + public CreateAgentConversationRequest() {} + + public CreateAgentConversationRequest metadataContext( + @javax.annotation.Nonnull ContextPayloadV2Input metadataContext) { + this.metadataContext = metadataContext; + return this; + } + + /** + * Context for the conversation. + * + * @return metadataContext + */ + @javax.annotation.Nonnull + public ContextPayloadV2Input getMetadataContext() { + return metadataContext; + } + + public void setMetadataContext( + @javax.annotation.Nonnull ContextPayloadV2Input metadataContext) { + this.metadataContext = metadataContext; + } + + public CreateAgentConversationRequest conversationSettings( + @javax.annotation.Nonnull ConversationSettingsInput conversationSettings) { + this.conversationSettings = conversationSettings; + return this; + } + + /** + * Conversation settings. + * + * @return conversationSettings + */ + @javax.annotation.Nonnull + public ConversationSettingsInput getConversationSettings() { + return conversationSettings; + } + + public void setConversationSettings( + @javax.annotation.Nonnull ConversationSettingsInput conversationSettings) { + this.conversationSettings = conversationSettings; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key name of the property + * @param value value of the property + * @return the CreateAgentConversationRequest instance itself + */ + public CreateAgentConversationRequest putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return a map of objects + */ + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key name of the property + * @return an object + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + CreateAgentConversationRequest createAgentConversationRequest = + (CreateAgentConversationRequest) o; + return Objects.equals(this.metadataContext, createAgentConversationRequest.metadataContext) + && Objects.equals( + this.conversationSettings, + createAgentConversationRequest.conversationSettings) + && Objects.equals( + this.additionalProperties, + createAgentConversationRequest.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(metadataContext, conversationSettings, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class CreateAgentConversationRequest {\n"); + sb.append(" metadataContext: ").append(toIndentedString(metadataContext)).append("\n"); + sb.append(" conversationSettings: ") + .append(toIndentedString(conversationSettings)) + .append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first + * line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("metadata_context"); + openapiFields.add("conversation_settings"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + openapiRequiredFields.add("metadata_context"); + openapiRequiredFields.add("conversation_settings"); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to + * CreateAgentConversationRequest + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!CreateAgentConversationRequest.openapiRequiredFields + .isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException( + String.format( + "The required field(s) %s in CreateAgentConversationRequest is not" + + " found in the empty JSON string", + CreateAgentConversationRequest.openapiRequiredFields.toString())); + } + } + + // check to make sure all required properties/fields are present in the JSON string + for (String requiredField : CreateAgentConversationRequest.openapiRequiredFields) { + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException( + String.format( + "The required field `%s` is not found in the JSON string: %s", + requiredField, jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // validate the required field `metadata_context` + ContextPayloadV2Input.validateJsonElement(jsonObj.get("metadata_context")); + // validate the required field `conversation_settings` + ConversationSettingsInput.validateJsonElement(jsonObj.get("conversation_settings")); + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!CreateAgentConversationRequest.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'CreateAgentConversationRequest' and its + // subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter = + gson.getDelegateAdapter( + this, TypeToken.get(CreateAgentConversationRequest.class)); + + return (TypeAdapter) + new TypeAdapter() { + @Override + public void write(JsonWriter out, CreateAgentConversationRequest value) + throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + obj.remove("additionalProperties"); + // serialize additional properties + if (value.getAdditionalProperties() != null) { + for (Map.Entry entry : + value.getAdditionalProperties().entrySet()) { + if (entry.getValue() instanceof String) + obj.addProperty(entry.getKey(), (String) entry.getValue()); + else if (entry.getValue() instanceof Number) + obj.addProperty(entry.getKey(), (Number) entry.getValue()); + else if (entry.getValue() instanceof Boolean) + obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); + else if (entry.getValue() instanceof Character) + obj.addProperty( + entry.getKey(), (Character) entry.getValue()); + else { + JsonElement jsonElement = gson.toJsonTree(entry.getValue()); + if (jsonElement.isJsonArray()) { + obj.add(entry.getKey(), jsonElement.getAsJsonArray()); + } else { + obj.add(entry.getKey(), jsonElement.getAsJsonObject()); + } + } + } + } + elementAdapter.write(out, obj); + } + + @Override + public CreateAgentConversationRequest read(JsonReader in) + throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // store additional fields in the deserialized instance + CreateAgentConversationRequest instance = + thisAdapter.fromJsonTree(jsonObj); + for (Map.Entry entry : jsonObj.entrySet()) { + if (!openapiFields.contains(entry.getKey())) { + if (entry.getValue().isJsonPrimitive()) { // primitive type + if (entry.getValue().getAsJsonPrimitive().isString()) + instance.putAdditionalProperty( + entry.getKey(), entry.getValue().getAsString()); + else if (entry.getValue().getAsJsonPrimitive().isNumber()) + instance.putAdditionalProperty( + entry.getKey(), entry.getValue().getAsNumber()); + else if (entry.getValue().getAsJsonPrimitive().isBoolean()) + instance.putAdditionalProperty( + entry.getKey(), + entry.getValue().getAsBoolean()); + else + throw new IllegalArgumentException( + String.format( + "The field `%s` has unknown primitive" + + " type. Value: %s", + entry.getKey(), + entry.getValue().toString())); + } else if (entry.getValue().isJsonArray()) { + instance.putAdditionalProperty( + entry.getKey(), + gson.fromJson(entry.getValue(), List.class)); + } else { // JSON object + instance.putAdditionalProperty( + entry.getKey(), + gson.fromJson(entry.getValue(), HashMap.class)); + } + } + } + return instance; + } + }.nullSafe(); + } + } + + /** + * Create an instance of CreateAgentConversationRequest given an JSON string + * + * @param jsonString JSON string + * @return An instance of CreateAgentConversationRequest + * @throws IOException if the JSON string is invalid with respect to + * CreateAgentConversationRequest + */ + public static CreateAgentConversationRequest fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, CreateAgentConversationRequest.class); + } + + /** + * Convert an instance of CreateAgentConversationRequest to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} diff --git a/sdks/java/src/main/java/com/thoughtspot/client/model/CreateCalendarRequest.java b/sdks/java/src/main/java/com/thoughtspot/client/model/CreateCalendarRequest.java new file mode 100644 index 000000000..54a26b568 --- /dev/null +++ b/sdks/java/src/main/java/com/thoughtspot/client/model/CreateCalendarRequest.java @@ -0,0 +1,913 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client.model; + +import com.google.gson.Gson; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.TypeAdapter; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.reflect.TypeToken; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import com.thoughtspot.client.JSON; +import java.io.IOException; +import java.io.Serializable; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Objects; + +/** CreateCalendarRequest */ +@javax.annotation.Generated( + value = "org.openapitools.codegen.languages.JavaClientCodegen", + comments = "Generator version: 7.12.0") +public class CreateCalendarRequest implements Serializable { + private static final long serialVersionUID = 1L; + + public static final String SERIALIZED_NAME_NAME = "name"; + + @SerializedName(SERIALIZED_NAME_NAME) + @javax.annotation.Nonnull + private String name; + + /** Type of create operation. */ + @JsonAdapter(CreationMethodEnum.Adapter.class) + public enum CreationMethodEnum { + FROM_INPUT_PARAMS("FROM_INPUT_PARAMS"), + + FROM_EXISTING_TABLE("FROM_EXISTING_TABLE"); + + private String value; + + CreationMethodEnum(String value) { + this.value = value; + } + + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + public static CreationMethodEnum fromValue(String value) { + for (CreationMethodEnum b : CreationMethodEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + + public static class Adapter extends TypeAdapter { + @Override + public void write(final JsonWriter jsonWriter, final CreationMethodEnum enumeration) + throws IOException { + jsonWriter.value(enumeration.getValue()); + } + + @Override + public CreationMethodEnum read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + return CreationMethodEnum.fromValue(value); + } + } + + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + String value = jsonElement.getAsString(); + CreationMethodEnum.fromValue(value); + } + } + + public static final String SERIALIZED_NAME_CREATION_METHOD = "creation_method"; + + @SerializedName(SERIALIZED_NAME_CREATION_METHOD) + @javax.annotation.Nonnull + private CreationMethodEnum creationMethod; + + public static final String SERIALIZED_NAME_TABLE_REFERENCE = "table_reference"; + + @SerializedName(SERIALIZED_NAME_TABLE_REFERENCE) + @javax.annotation.Nonnull + private ExternalTableInput tableReference; + + public static final String SERIALIZED_NAME_START_DATE = "start_date"; + + @SerializedName(SERIALIZED_NAME_START_DATE) + @javax.annotation.Nullable + private String startDate; + + public static final String SERIALIZED_NAME_END_DATE = "end_date"; + + @SerializedName(SERIALIZED_NAME_END_DATE) + @javax.annotation.Nullable + private String endDate; + + /** Type of the calendar. */ + @JsonAdapter(CalendarTypeEnum.Adapter.class) + public enum CalendarTypeEnum { + MONTH_OFFSET("MONTH_OFFSET"), + + FOUR_FOUR_FIVE("FOUR_FOUR_FIVE"), + + FOUR_FIVE_FOUR("FOUR_FIVE_FOUR"), + + FIVE_FOUR_FOUR("FIVE_FOUR_FOUR"); + + private String value; + + CalendarTypeEnum(String value) { + this.value = value; + } + + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + public static CalendarTypeEnum fromValue(String value) { + for (CalendarTypeEnum b : CalendarTypeEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + + public static class Adapter extends TypeAdapter { + @Override + public void write(final JsonWriter jsonWriter, final CalendarTypeEnum enumeration) + throws IOException { + jsonWriter.value(enumeration.getValue()); + } + + @Override + public CalendarTypeEnum read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + return CalendarTypeEnum.fromValue(value); + } + } + + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + String value = jsonElement.getAsString(); + CalendarTypeEnum.fromValue(value); + } + } + + public static final String SERIALIZED_NAME_CALENDAR_TYPE = "calendar_type"; + + @SerializedName(SERIALIZED_NAME_CALENDAR_TYPE) + @javax.annotation.Nullable + private CalendarTypeEnum calendarType = CalendarTypeEnum.MONTH_OFFSET; + + /** + * Specify the month in which the fiscal or custom calendar year should start. For example, if + * you set `month_offset` to \"April\", the custom calendar will treat + * \"April\" as the first month of the year, and the related attributes such as + * quarters and start date will be based on this offset. The default value is + * `January`, which represents the standard calendar year (January to December). + */ + @JsonAdapter(MonthOffsetEnum.Adapter.class) + public enum MonthOffsetEnum { + JANUARY("January"), + + FEBRUARY("February"), + + MARCH("March"), + + APRIL("April"), + + MAY("May"), + + JUNE("June"), + + JULY("July"), + + AUGUST("August"), + + SEPTEMBER("September"), + + OCTOBER("October"), + + NOVEMBER("November"), + + DECEMBER("December"); + + private String value; + + MonthOffsetEnum(String value) { + this.value = value; + } + + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + public static MonthOffsetEnum fromValue(String value) { + for (MonthOffsetEnum b : MonthOffsetEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + + public static class Adapter extends TypeAdapter { + @Override + public void write(final JsonWriter jsonWriter, final MonthOffsetEnum enumeration) + throws IOException { + jsonWriter.value(enumeration.getValue()); + } + + @Override + public MonthOffsetEnum read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + return MonthOffsetEnum.fromValue(value); + } + } + + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + String value = jsonElement.getAsString(); + MonthOffsetEnum.fromValue(value); + } + } + + public static final String SERIALIZED_NAME_MONTH_OFFSET = "month_offset"; + + @SerializedName(SERIALIZED_NAME_MONTH_OFFSET) + @javax.annotation.Nullable + private MonthOffsetEnum monthOffset = MonthOffsetEnum.JANUARY; + + /** Specify the starting day of the week. */ + @JsonAdapter(StartDayOfWeekEnum.Adapter.class) + public enum StartDayOfWeekEnum { + SUNDAY("Sunday"), + + MONDAY("Monday"), + + TUESDAY("Tuesday"), + + WEDNESDAY("Wednesday"), + + THURSDAY("Thursday"), + + FRIDAY("Friday"), + + SATURDAY("Saturday"); + + private String value; + + StartDayOfWeekEnum(String value) { + this.value = value; + } + + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + public static StartDayOfWeekEnum fromValue(String value) { + for (StartDayOfWeekEnum b : StartDayOfWeekEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + + public static class Adapter extends TypeAdapter { + @Override + public void write(final JsonWriter jsonWriter, final StartDayOfWeekEnum enumeration) + throws IOException { + jsonWriter.value(enumeration.getValue()); + } + + @Override + public StartDayOfWeekEnum read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + return StartDayOfWeekEnum.fromValue(value); + } + } + + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + String value = jsonElement.getAsString(); + StartDayOfWeekEnum.fromValue(value); + } + } + + public static final String SERIALIZED_NAME_START_DAY_OF_WEEK = "start_day_of_week"; + + @SerializedName(SERIALIZED_NAME_START_DAY_OF_WEEK) + @javax.annotation.Nullable + private StartDayOfWeekEnum startDayOfWeek = StartDayOfWeekEnum.SUNDAY; + + public static final String SERIALIZED_NAME_QUARTER_NAME_PREFIX = "quarter_name_prefix"; + + @SerializedName(SERIALIZED_NAME_QUARTER_NAME_PREFIX) + @javax.annotation.Nullable + private String quarterNamePrefix = ""; + + public static final String SERIALIZED_NAME_YEAR_NAME_PREFIX = "year_name_prefix"; + + @SerializedName(SERIALIZED_NAME_YEAR_NAME_PREFIX) + @javax.annotation.Nullable + private String yearNamePrefix = ""; + + public CreateCalendarRequest() {} + + public CreateCalendarRequest name(@javax.annotation.Nonnull String name) { + this.name = name; + return this; + } + + /** + * Name of the custom calendar. + * + * @return name + */ + @javax.annotation.Nonnull + public String getName() { + return name; + } + + public void setName(@javax.annotation.Nonnull String name) { + this.name = name; + } + + public CreateCalendarRequest creationMethod( + @javax.annotation.Nonnull CreationMethodEnum creationMethod) { + this.creationMethod = creationMethod; + return this; + } + + /** + * Type of create operation. + * + * @return creationMethod + */ + @javax.annotation.Nonnull + public CreationMethodEnum getCreationMethod() { + return creationMethod; + } + + public void setCreationMethod(@javax.annotation.Nonnull CreationMethodEnum creationMethod) { + this.creationMethod = creationMethod; + } + + public CreateCalendarRequest tableReference( + @javax.annotation.Nonnull ExternalTableInput tableReference) { + this.tableReference = tableReference; + return this; + } + + /** + * Table reference containing connection identifier and table details in this format: + * `{\"connection_identifier\":\"conn1\", + * \"database_name\":\"db1\", \"schema_name\":\"sc1\", + * \"table_name\":\"tb1\"}`. The given table will be created if + * `creation_method` is set as `FROM_INPUT_PARAMS`. + * + * @return tableReference + */ + @javax.annotation.Nonnull + public ExternalTableInput getTableReference() { + return tableReference; + } + + public void setTableReference(@javax.annotation.Nonnull ExternalTableInput tableReference) { + this.tableReference = tableReference; + } + + public CreateCalendarRequest startDate(@javax.annotation.Nullable String startDate) { + this.startDate = startDate; + return this; + } + + /** + * Start date for the calendar in `MM/dd/yyyy` format. This parameter is mandatory if + * `creation_method` is set as `FROM_INPUT_PARAMS`. + * + * @return startDate + */ + @javax.annotation.Nullable + public String getStartDate() { + return startDate; + } + + public void setStartDate(@javax.annotation.Nullable String startDate) { + this.startDate = startDate; + } + + public CreateCalendarRequest endDate(@javax.annotation.Nullable String endDate) { + this.endDate = endDate; + return this; + } + + /** + * End date for the calendar in `MM/dd/yyyy` format. This parameter is mandatory if + * `creation_method` is set as `FROM_INPUT_PARAMS`. + * + * @return endDate + */ + @javax.annotation.Nullable + public String getEndDate() { + return endDate; + } + + public void setEndDate(@javax.annotation.Nullable String endDate) { + this.endDate = endDate; + } + + public CreateCalendarRequest calendarType( + @javax.annotation.Nullable CalendarTypeEnum calendarType) { + this.calendarType = calendarType; + return this; + } + + /** + * Type of the calendar. + * + * @return calendarType + */ + @javax.annotation.Nullable + public CalendarTypeEnum getCalendarType() { + return calendarType; + } + + public void setCalendarType(@javax.annotation.Nullable CalendarTypeEnum calendarType) { + this.calendarType = calendarType; + } + + public CreateCalendarRequest monthOffset( + @javax.annotation.Nullable MonthOffsetEnum monthOffset) { + this.monthOffset = monthOffset; + return this; + } + + /** + * Specify the month in which the fiscal or custom calendar year should start. For example, if + * you set `month_offset` to \"April\", the custom calendar will treat + * \"April\" as the first month of the year, and the related attributes such as + * quarters and start date will be based on this offset. The default value is + * `January`, which represents the standard calendar year (January to December). + * + * @return monthOffset + */ + @javax.annotation.Nullable + public MonthOffsetEnum getMonthOffset() { + return monthOffset; + } + + public void setMonthOffset(@javax.annotation.Nullable MonthOffsetEnum monthOffset) { + this.monthOffset = monthOffset; + } + + public CreateCalendarRequest startDayOfWeek( + @javax.annotation.Nullable StartDayOfWeekEnum startDayOfWeek) { + this.startDayOfWeek = startDayOfWeek; + return this; + } + + /** + * Specify the starting day of the week. + * + * @return startDayOfWeek + */ + @javax.annotation.Nullable + public StartDayOfWeekEnum getStartDayOfWeek() { + return startDayOfWeek; + } + + public void setStartDayOfWeek(@javax.annotation.Nullable StartDayOfWeekEnum startDayOfWeek) { + this.startDayOfWeek = startDayOfWeek; + } + + public CreateCalendarRequest quarterNamePrefix( + @javax.annotation.Nullable String quarterNamePrefix) { + this.quarterNamePrefix = quarterNamePrefix; + return this; + } + + /** + * Prefix to add before the quarter. + * + * @return quarterNamePrefix + */ + @javax.annotation.Nullable + public String getQuarterNamePrefix() { + return quarterNamePrefix; + } + + public void setQuarterNamePrefix(@javax.annotation.Nullable String quarterNamePrefix) { + this.quarterNamePrefix = quarterNamePrefix; + } + + public CreateCalendarRequest yearNamePrefix(@javax.annotation.Nullable String yearNamePrefix) { + this.yearNamePrefix = yearNamePrefix; + return this; + } + + /** + * Prefix to add before the year. + * + * @return yearNamePrefix + */ + @javax.annotation.Nullable + public String getYearNamePrefix() { + return yearNamePrefix; + } + + public void setYearNamePrefix(@javax.annotation.Nullable String yearNamePrefix) { + this.yearNamePrefix = yearNamePrefix; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key name of the property + * @param value value of the property + * @return the CreateCalendarRequest instance itself + */ + public CreateCalendarRequest putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return a map of objects + */ + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key name of the property + * @return an object + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + CreateCalendarRequest createCalendarRequest = (CreateCalendarRequest) o; + return Objects.equals(this.name, createCalendarRequest.name) + && Objects.equals(this.creationMethod, createCalendarRequest.creationMethod) + && Objects.equals(this.tableReference, createCalendarRequest.tableReference) + && Objects.equals(this.startDate, createCalendarRequest.startDate) + && Objects.equals(this.endDate, createCalendarRequest.endDate) + && Objects.equals(this.calendarType, createCalendarRequest.calendarType) + && Objects.equals(this.monthOffset, createCalendarRequest.monthOffset) + && Objects.equals(this.startDayOfWeek, createCalendarRequest.startDayOfWeek) + && Objects.equals(this.quarterNamePrefix, createCalendarRequest.quarterNamePrefix) + && Objects.equals(this.yearNamePrefix, createCalendarRequest.yearNamePrefix) + && Objects.equals( + this.additionalProperties, createCalendarRequest.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash( + name, + creationMethod, + tableReference, + startDate, + endDate, + calendarType, + monthOffset, + startDayOfWeek, + quarterNamePrefix, + yearNamePrefix, + additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class CreateCalendarRequest {\n"); + sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append(" creationMethod: ").append(toIndentedString(creationMethod)).append("\n"); + sb.append(" tableReference: ").append(toIndentedString(tableReference)).append("\n"); + sb.append(" startDate: ").append(toIndentedString(startDate)).append("\n"); + sb.append(" endDate: ").append(toIndentedString(endDate)).append("\n"); + sb.append(" calendarType: ").append(toIndentedString(calendarType)).append("\n"); + sb.append(" monthOffset: ").append(toIndentedString(monthOffset)).append("\n"); + sb.append(" startDayOfWeek: ").append(toIndentedString(startDayOfWeek)).append("\n"); + sb.append(" quarterNamePrefix: ") + .append(toIndentedString(quarterNamePrefix)) + .append("\n"); + sb.append(" yearNamePrefix: ").append(toIndentedString(yearNamePrefix)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first + * line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("name"); + openapiFields.add("creation_method"); + openapiFields.add("table_reference"); + openapiFields.add("start_date"); + openapiFields.add("end_date"); + openapiFields.add("calendar_type"); + openapiFields.add("month_offset"); + openapiFields.add("start_day_of_week"); + openapiFields.add("quarter_name_prefix"); + openapiFields.add("year_name_prefix"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + openapiRequiredFields.add("name"); + openapiRequiredFields.add("creation_method"); + openapiRequiredFields.add("table_reference"); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to CreateCalendarRequest + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!CreateCalendarRequest.openapiRequiredFields + .isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException( + String.format( + "The required field(s) %s in CreateCalendarRequest is not found in" + + " the empty JSON string", + CreateCalendarRequest.openapiRequiredFields.toString())); + } + } + + // check to make sure all required properties/fields are present in the JSON string + for (String requiredField : CreateCalendarRequest.openapiRequiredFields) { + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException( + String.format( + "The required field `%s` is not found in the JSON string: %s", + requiredField, jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if (!jsonObj.get("name").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `name` to be a primitive type in the JSON string" + + " but got `%s`", + jsonObj.get("name").toString())); + } + if (!jsonObj.get("creation_method").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `creation_method` to be a primitive type in the" + + " JSON string but got `%s`", + jsonObj.get("creation_method").toString())); + } + // validate the required field `creation_method` + CreationMethodEnum.validateJsonElement(jsonObj.get("creation_method")); + // validate the required field `table_reference` + ExternalTableInput.validateJsonElement(jsonObj.get("table_reference")); + if ((jsonObj.get("start_date") != null && !jsonObj.get("start_date").isJsonNull()) + && !jsonObj.get("start_date").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `start_date` to be a primitive type in the JSON" + + " string but got `%s`", + jsonObj.get("start_date").toString())); + } + if ((jsonObj.get("end_date") != null && !jsonObj.get("end_date").isJsonNull()) + && !jsonObj.get("end_date").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `end_date` to be a primitive type in the JSON" + + " string but got `%s`", + jsonObj.get("end_date").toString())); + } + if ((jsonObj.get("calendar_type") != null && !jsonObj.get("calendar_type").isJsonNull()) + && !jsonObj.get("calendar_type").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `calendar_type` to be a primitive type in the JSON" + + " string but got `%s`", + jsonObj.get("calendar_type").toString())); + } + // validate the optional field `calendar_type` + if (jsonObj.get("calendar_type") != null && !jsonObj.get("calendar_type").isJsonNull()) { + CalendarTypeEnum.validateJsonElement(jsonObj.get("calendar_type")); + } + if ((jsonObj.get("month_offset") != null && !jsonObj.get("month_offset").isJsonNull()) + && !jsonObj.get("month_offset").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `month_offset` to be a primitive type in the JSON" + + " string but got `%s`", + jsonObj.get("month_offset").toString())); + } + // validate the optional field `month_offset` + if (jsonObj.get("month_offset") != null && !jsonObj.get("month_offset").isJsonNull()) { + MonthOffsetEnum.validateJsonElement(jsonObj.get("month_offset")); + } + if ((jsonObj.get("start_day_of_week") != null + && !jsonObj.get("start_day_of_week").isJsonNull()) + && !jsonObj.get("start_day_of_week").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `start_day_of_week` to be a primitive type in the" + + " JSON string but got `%s`", + jsonObj.get("start_day_of_week").toString())); + } + // validate the optional field `start_day_of_week` + if (jsonObj.get("start_day_of_week") != null + && !jsonObj.get("start_day_of_week").isJsonNull()) { + StartDayOfWeekEnum.validateJsonElement(jsonObj.get("start_day_of_week")); + } + if ((jsonObj.get("quarter_name_prefix") != null + && !jsonObj.get("quarter_name_prefix").isJsonNull()) + && !jsonObj.get("quarter_name_prefix").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `quarter_name_prefix` to be a primitive type in" + + " the JSON string but got `%s`", + jsonObj.get("quarter_name_prefix").toString())); + } + if ((jsonObj.get("year_name_prefix") != null + && !jsonObj.get("year_name_prefix").isJsonNull()) + && !jsonObj.get("year_name_prefix").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `year_name_prefix` to be a primitive type in the" + + " JSON string but got `%s`", + jsonObj.get("year_name_prefix").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!CreateCalendarRequest.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'CreateCalendarRequest' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter = + gson.getDelegateAdapter(this, TypeToken.get(CreateCalendarRequest.class)); + + return (TypeAdapter) + new TypeAdapter() { + @Override + public void write(JsonWriter out, CreateCalendarRequest value) + throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + obj.remove("additionalProperties"); + // serialize additional properties + if (value.getAdditionalProperties() != null) { + for (Map.Entry entry : + value.getAdditionalProperties().entrySet()) { + if (entry.getValue() instanceof String) + obj.addProperty(entry.getKey(), (String) entry.getValue()); + else if (entry.getValue() instanceof Number) + obj.addProperty(entry.getKey(), (Number) entry.getValue()); + else if (entry.getValue() instanceof Boolean) + obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); + else if (entry.getValue() instanceof Character) + obj.addProperty( + entry.getKey(), (Character) entry.getValue()); + else { + JsonElement jsonElement = gson.toJsonTree(entry.getValue()); + if (jsonElement.isJsonArray()) { + obj.add(entry.getKey(), jsonElement.getAsJsonArray()); + } else { + obj.add(entry.getKey(), jsonElement.getAsJsonObject()); + } + } + } + } + elementAdapter.write(out, obj); + } + + @Override + public CreateCalendarRequest read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // store additional fields in the deserialized instance + CreateCalendarRequest instance = thisAdapter.fromJsonTree(jsonObj); + for (Map.Entry entry : jsonObj.entrySet()) { + if (!openapiFields.contains(entry.getKey())) { + if (entry.getValue().isJsonPrimitive()) { // primitive type + if (entry.getValue().getAsJsonPrimitive().isString()) + instance.putAdditionalProperty( + entry.getKey(), entry.getValue().getAsString()); + else if (entry.getValue().getAsJsonPrimitive().isNumber()) + instance.putAdditionalProperty( + entry.getKey(), entry.getValue().getAsNumber()); + else if (entry.getValue().getAsJsonPrimitive().isBoolean()) + instance.putAdditionalProperty( + entry.getKey(), + entry.getValue().getAsBoolean()); + else + throw new IllegalArgumentException( + String.format( + "The field `%s` has unknown primitive" + + " type. Value: %s", + entry.getKey(), + entry.getValue().toString())); + } else if (entry.getValue().isJsonArray()) { + instance.putAdditionalProperty( + entry.getKey(), + gson.fromJson(entry.getValue(), List.class)); + } else { // JSON object + instance.putAdditionalProperty( + entry.getKey(), + gson.fromJson(entry.getValue(), HashMap.class)); + } + } + } + return instance; + } + }.nullSafe(); + } + } + + /** + * Create an instance of CreateCalendarRequest given an JSON string + * + * @param jsonString JSON string + * @return An instance of CreateCalendarRequest + * @throws IOException if the JSON string is invalid with respect to CreateCalendarRequest + */ + public static CreateCalendarRequest fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, CreateCalendarRequest.class); + } + + /** + * Convert an instance of CreateCalendarRequest to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} diff --git a/sdks/java/src/main/java/com/thoughtspot/client/model/CreateCollectionRequest.java b/sdks/java/src/main/java/com/thoughtspot/client/model/CreateCollectionRequest.java new file mode 100644 index 000000000..72616a460 --- /dev/null +++ b/sdks/java/src/main/java/com/thoughtspot/client/model/CreateCollectionRequest.java @@ -0,0 +1,397 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client.model; + +import com.google.gson.Gson; +import com.google.gson.JsonArray; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.TypeAdapter; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.annotations.SerializedName; +import com.google.gson.reflect.TypeToken; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import com.thoughtspot.client.JSON; +import java.io.IOException; +import java.io.Serializable; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Objects; + +/** CreateCollectionRequest */ +@javax.annotation.Generated( + value = "org.openapitools.codegen.languages.JavaClientCodegen", + comments = "Generator version: 7.12.0") +public class CreateCollectionRequest implements Serializable { + private static final long serialVersionUID = 1L; + + public static final String SERIALIZED_NAME_NAME = "name"; + + @SerializedName(SERIALIZED_NAME_NAME) + @javax.annotation.Nonnull + private String name; + + public static final String SERIALIZED_NAME_DESCRIPTION = "description"; + + @SerializedName(SERIALIZED_NAME_DESCRIPTION) + @javax.annotation.Nullable + private String description; + + public static final String SERIALIZED_NAME_METADATA = "metadata"; + + @SerializedName(SERIALIZED_NAME_METADATA) + @javax.annotation.Nullable + private List metadata; + + public CreateCollectionRequest() {} + + public CreateCollectionRequest name(@javax.annotation.Nonnull String name) { + this.name = name; + return this; + } + + /** + * Name of the collection. + * + * @return name + */ + @javax.annotation.Nonnull + public String getName() { + return name; + } + + public void setName(@javax.annotation.Nonnull String name) { + this.name = name; + } + + public CreateCollectionRequest description(@javax.annotation.Nullable String description) { + this.description = description; + return this; + } + + /** + * Description of the collection. + * + * @return description + */ + @javax.annotation.Nullable + public String getDescription() { + return description; + } + + public void setDescription(@javax.annotation.Nullable String description) { + this.description = description; + } + + public CreateCollectionRequest metadata( + @javax.annotation.Nullable List metadata) { + this.metadata = metadata; + return this; + } + + public CreateCollectionRequest addMetadataItem(CollectionMetadataInput metadataItem) { + if (this.metadata == null) { + this.metadata = new ArrayList<>(); + } + this.metadata.add(metadataItem); + return this; + } + + /** + * Metadata objects to add to the collection. + * + * @return metadata + */ + @javax.annotation.Nullable + public List getMetadata() { + return metadata; + } + + public void setMetadata(@javax.annotation.Nullable List metadata) { + this.metadata = metadata; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key name of the property + * @param value value of the property + * @return the CreateCollectionRequest instance itself + */ + public CreateCollectionRequest putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return a map of objects + */ + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key name of the property + * @return an object + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + CreateCollectionRequest createCollectionRequest = (CreateCollectionRequest) o; + return Objects.equals(this.name, createCollectionRequest.name) + && Objects.equals(this.description, createCollectionRequest.description) + && Objects.equals(this.metadata, createCollectionRequest.metadata) + && Objects.equals( + this.additionalProperties, createCollectionRequest.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(name, description, metadata, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class CreateCollectionRequest {\n"); + sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append(" description: ").append(toIndentedString(description)).append("\n"); + sb.append(" metadata: ").append(toIndentedString(metadata)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first + * line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("name"); + openapiFields.add("description"); + openapiFields.add("metadata"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + openapiRequiredFields.add("name"); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to CreateCollectionRequest + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!CreateCollectionRequest.openapiRequiredFields + .isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException( + String.format( + "The required field(s) %s in CreateCollectionRequest is not found" + + " in the empty JSON string", + CreateCollectionRequest.openapiRequiredFields.toString())); + } + } + + // check to make sure all required properties/fields are present in the JSON string + for (String requiredField : CreateCollectionRequest.openapiRequiredFields) { + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException( + String.format( + "The required field `%s` is not found in the JSON string: %s", + requiredField, jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if (!jsonObj.get("name").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `name` to be a primitive type in the JSON string" + + " but got `%s`", + jsonObj.get("name").toString())); + } + if ((jsonObj.get("description") != null && !jsonObj.get("description").isJsonNull()) + && !jsonObj.get("description").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `description` to be a primitive type in the JSON" + + " string but got `%s`", + jsonObj.get("description").toString())); + } + if (jsonObj.get("metadata") != null && !jsonObj.get("metadata").isJsonNull()) { + JsonArray jsonArraymetadata = jsonObj.getAsJsonArray("metadata"); + if (jsonArraymetadata != null) { + // ensure the json data is an array + if (!jsonObj.get("metadata").isJsonArray()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `metadata` to be an array in the JSON" + + " string but got `%s`", + jsonObj.get("metadata").toString())); + } + + // validate the optional field `metadata` (array) + for (int i = 0; i < jsonArraymetadata.size(); i++) { + CollectionMetadataInput.validateJsonElement(jsonArraymetadata.get(i)); + } + ; + } + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!CreateCollectionRequest.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'CreateCollectionRequest' and its + // subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter = + gson.getDelegateAdapter(this, TypeToken.get(CreateCollectionRequest.class)); + + return (TypeAdapter) + new TypeAdapter() { + @Override + public void write(JsonWriter out, CreateCollectionRequest value) + throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + obj.remove("additionalProperties"); + // serialize additional properties + if (value.getAdditionalProperties() != null) { + for (Map.Entry entry : + value.getAdditionalProperties().entrySet()) { + if (entry.getValue() instanceof String) + obj.addProperty(entry.getKey(), (String) entry.getValue()); + else if (entry.getValue() instanceof Number) + obj.addProperty(entry.getKey(), (Number) entry.getValue()); + else if (entry.getValue() instanceof Boolean) + obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); + else if (entry.getValue() instanceof Character) + obj.addProperty( + entry.getKey(), (Character) entry.getValue()); + else { + JsonElement jsonElement = gson.toJsonTree(entry.getValue()); + if (jsonElement.isJsonArray()) { + obj.add(entry.getKey(), jsonElement.getAsJsonArray()); + } else { + obj.add(entry.getKey(), jsonElement.getAsJsonObject()); + } + } + } + } + elementAdapter.write(out, obj); + } + + @Override + public CreateCollectionRequest read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // store additional fields in the deserialized instance + CreateCollectionRequest instance = thisAdapter.fromJsonTree(jsonObj); + for (Map.Entry entry : jsonObj.entrySet()) { + if (!openapiFields.contains(entry.getKey())) { + if (entry.getValue().isJsonPrimitive()) { // primitive type + if (entry.getValue().getAsJsonPrimitive().isString()) + instance.putAdditionalProperty( + entry.getKey(), entry.getValue().getAsString()); + else if (entry.getValue().getAsJsonPrimitive().isNumber()) + instance.putAdditionalProperty( + entry.getKey(), entry.getValue().getAsNumber()); + else if (entry.getValue().getAsJsonPrimitive().isBoolean()) + instance.putAdditionalProperty( + entry.getKey(), + entry.getValue().getAsBoolean()); + else + throw new IllegalArgumentException( + String.format( + "The field `%s` has unknown primitive" + + " type. Value: %s", + entry.getKey(), + entry.getValue().toString())); + } else if (entry.getValue().isJsonArray()) { + instance.putAdditionalProperty( + entry.getKey(), + gson.fromJson(entry.getValue(), List.class)); + } else { // JSON object + instance.putAdditionalProperty( + entry.getKey(), + gson.fromJson(entry.getValue(), HashMap.class)); + } + } + } + return instance; + } + }.nullSafe(); + } + } + + /** + * Create an instance of CreateCollectionRequest given an JSON string + * + * @param jsonString JSON string + * @return An instance of CreateCollectionRequest + * @throws IOException if the JSON string is invalid with respect to CreateCollectionRequest + */ + public static CreateCollectionRequest fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, CreateCollectionRequest.class); + } + + /** + * Convert an instance of CreateCollectionRequest to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} diff --git a/sdks/java/src/main/java/com/thoughtspot/client/model/CreateConfigRequest.java b/sdks/java/src/main/java/com/thoughtspot/client/model/CreateConfigRequest.java new file mode 100644 index 000000000..ed1b10c0f --- /dev/null +++ b/sdks/java/src/main/java/com/thoughtspot/client/model/CreateConfigRequest.java @@ -0,0 +1,603 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client.model; + +import com.google.gson.Gson; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.TypeAdapter; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.annotations.SerializedName; +import com.google.gson.reflect.TypeToken; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import com.thoughtspot.client.JSON; +import java.io.IOException; +import java.io.Serializable; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Objects; +import org.openapitools.jackson.nullable.JsonNullable; + +/** CreateConfigRequest */ +@javax.annotation.Generated( + value = "org.openapitools.codegen.languages.JavaClientCodegen", + comments = "Generator version: 7.12.0") +public class CreateConfigRequest implements Serializable { + private static final long serialVersionUID = 1L; + + public static final String SERIALIZED_NAME_REPOSITORY_URL = "repository_url"; + + @SerializedName(SERIALIZED_NAME_REPOSITORY_URL) + @javax.annotation.Nonnull + private String repositoryUrl; + + public static final String SERIALIZED_NAME_USERNAME = "username"; + + @SerializedName(SERIALIZED_NAME_USERNAME) + @javax.annotation.Nonnull + private String username; + + public static final String SERIALIZED_NAME_ACCESS_TOKEN = "access_token"; + + @SerializedName(SERIALIZED_NAME_ACCESS_TOKEN) + @javax.annotation.Nonnull + private String accessToken; + + public static final String SERIALIZED_NAME_ORG_IDENTIFIER = "org_identifier"; + + @SerializedName(SERIALIZED_NAME_ORG_IDENTIFIER) + @javax.annotation.Nullable + private String orgIdentifier; + + public static final String SERIALIZED_NAME_BRANCH_NAMES = "branch_names"; + + @SerializedName(SERIALIZED_NAME_BRANCH_NAMES) + @javax.annotation.Nullable + private List branchNames; + + public static final String SERIALIZED_NAME_COMMIT_BRANCH_NAME = "commit_branch_name"; + + @SerializedName(SERIALIZED_NAME_COMMIT_BRANCH_NAME) + @javax.annotation.Nullable + private String commitBranchName; + + public static final String SERIALIZED_NAME_ENABLE_GUID_MAPPING = "enable_guid_mapping"; + + @SerializedName(SERIALIZED_NAME_ENABLE_GUID_MAPPING) + @javax.annotation.Nullable + private Boolean enableGuidMapping = true; + + public static final String SERIALIZED_NAME_CONFIGURATION_BRANCH_NAME = + "configuration_branch_name"; + + @SerializedName(SERIALIZED_NAME_CONFIGURATION_BRANCH_NAME) + @javax.annotation.Nullable + private String configurationBranchName; + + public CreateConfigRequest() {} + + public CreateConfigRequest repositoryUrl(@javax.annotation.Nonnull String repositoryUrl) { + this.repositoryUrl = repositoryUrl; + return this; + } + + /** + * URL for connecting to remote repository + * + * @return repositoryUrl + */ + @javax.annotation.Nonnull + public String getRepositoryUrl() { + return repositoryUrl; + } + + public void setRepositoryUrl(@javax.annotation.Nonnull String repositoryUrl) { + this.repositoryUrl = repositoryUrl; + } + + public CreateConfigRequest username(@javax.annotation.Nonnull String username) { + this.username = username; + return this; + } + + /** + * Username to authenticate connection to remote repository + * + * @return username + */ + @javax.annotation.Nonnull + public String getUsername() { + return username; + } + + public void setUsername(@javax.annotation.Nonnull String username) { + this.username = username; + } + + public CreateConfigRequest accessToken(@javax.annotation.Nonnull String accessToken) { + this.accessToken = accessToken; + return this; + } + + /** + * Access token corresponding to the user to authenticate connection to remote repository + * + * @return accessToken + */ + @javax.annotation.Nonnull + public String getAccessToken() { + return accessToken; + } + + public void setAccessToken(@javax.annotation.Nonnull String accessToken) { + this.accessToken = accessToken; + } + + public CreateConfigRequest orgIdentifier(@javax.annotation.Nullable String orgIdentifier) { + this.orgIdentifier = orgIdentifier; + return this; + } + + /** + * Applicable when Orgs is enabled in the cluster List of Org ids or name. Provide value -1 for + * cluster level. Example : [\"OrgID1-or-Name1\", \"OrgID2-or-Name2\"] Note: + * If no value is specified, then the configurations will be returned for all orgs the user has + * access to Version: 9.5.0.cl or later + * + * @return orgIdentifier + */ + @javax.annotation.Nullable + public String getOrgIdentifier() { + return orgIdentifier; + } + + public void setOrgIdentifier(@javax.annotation.Nullable String orgIdentifier) { + this.orgIdentifier = orgIdentifier; + } + + public CreateConfigRequest branchNames(@javax.annotation.Nullable List branchNames) { + this.branchNames = branchNames; + return this; + } + + public CreateConfigRequest addBranchNamesItem(String branchNamesItem) { + if (this.branchNames == null) { + this.branchNames = new ArrayList<>(); + } + this.branchNames.add(branchNamesItem); + return this; + } + + /** + * List the remote branches to configure. Example:[development, production] + * + * @return branchNames + */ + @javax.annotation.Nullable + public List getBranchNames() { + return branchNames; + } + + public void setBranchNames(@javax.annotation.Nullable List branchNames) { + this.branchNames = branchNames; + } + + public CreateConfigRequest commitBranchName( + @javax.annotation.Nullable String commitBranchName) { + this.commitBranchName = commitBranchName; + return this; + } + + /** + * Name of the remote branch where objects from this Thoughtspot instance will be versioned. + * Version: 9.7.0.cl or later + * + * @return commitBranchName + */ + @javax.annotation.Nullable + public String getCommitBranchName() { + return commitBranchName; + } + + public void setCommitBranchName(@javax.annotation.Nullable String commitBranchName) { + this.commitBranchName = commitBranchName; + } + + public CreateConfigRequest enableGuidMapping( + @javax.annotation.Nullable Boolean enableGuidMapping) { + this.enableGuidMapping = enableGuidMapping; + return this; + } + + /** + * Maintain mapping of guid for the deployment to an instance Version: 9.4.0.cl or later + * + * @return enableGuidMapping + */ + @javax.annotation.Nullable + public Boolean getEnableGuidMapping() { + return enableGuidMapping; + } + + public void setEnableGuidMapping(@javax.annotation.Nullable Boolean enableGuidMapping) { + this.enableGuidMapping = enableGuidMapping; + } + + public CreateConfigRequest configurationBranchName( + @javax.annotation.Nullable String configurationBranchName) { + this.configurationBranchName = configurationBranchName; + return this; + } + + /** + * Name of the branch where the configuration files related to operations between Thoughtspot + * and version control repo should be maintained. Note: If no branch name is specified, then by + * default, ts_config_files branch is considered. Ensure this branch exists before + * configuration. Version: 9.7.0.cl or later + * + * @return configurationBranchName + */ + @javax.annotation.Nullable + public String getConfigurationBranchName() { + return configurationBranchName; + } + + public void setConfigurationBranchName( + @javax.annotation.Nullable String configurationBranchName) { + this.configurationBranchName = configurationBranchName; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key name of the property + * @param value value of the property + * @return the CreateConfigRequest instance itself + */ + public CreateConfigRequest putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return a map of objects + */ + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key name of the property + * @return an object + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + CreateConfigRequest createConfigRequest = (CreateConfigRequest) o; + return Objects.equals(this.repositoryUrl, createConfigRequest.repositoryUrl) + && Objects.equals(this.username, createConfigRequest.username) + && Objects.equals(this.accessToken, createConfigRequest.accessToken) + && Objects.equals(this.orgIdentifier, createConfigRequest.orgIdentifier) + && Objects.equals(this.branchNames, createConfigRequest.branchNames) + && Objects.equals(this.commitBranchName, createConfigRequest.commitBranchName) + && Objects.equals(this.enableGuidMapping, createConfigRequest.enableGuidMapping) + && Objects.equals( + this.configurationBranchName, createConfigRequest.configurationBranchName) + && Objects.equals( + this.additionalProperties, createConfigRequest.additionalProperties); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b + || (a != null + && b != null + && a.isPresent() + && b.isPresent() + && Objects.deepEquals(a.get(), b.get())); + } + + @Override + public int hashCode() { + return Objects.hash( + repositoryUrl, + username, + accessToken, + orgIdentifier, + branchNames, + commitBranchName, + enableGuidMapping, + configurationBranchName, + additionalProperties); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; + } + return a.isPresent() ? Arrays.deepHashCode(new Object[] {a.get()}) : 31; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class CreateConfigRequest {\n"); + sb.append(" repositoryUrl: ").append(toIndentedString(repositoryUrl)).append("\n"); + sb.append(" username: ").append(toIndentedString(username)).append("\n"); + sb.append(" accessToken: ").append(toIndentedString(accessToken)).append("\n"); + sb.append(" orgIdentifier: ").append(toIndentedString(orgIdentifier)).append("\n"); + sb.append(" branchNames: ").append(toIndentedString(branchNames)).append("\n"); + sb.append(" commitBranchName: ").append(toIndentedString(commitBranchName)).append("\n"); + sb.append(" enableGuidMapping: ") + .append(toIndentedString(enableGuidMapping)) + .append("\n"); + sb.append(" configurationBranchName: ") + .append(toIndentedString(configurationBranchName)) + .append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first + * line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("repository_url"); + openapiFields.add("username"); + openapiFields.add("access_token"); + openapiFields.add("org_identifier"); + openapiFields.add("branch_names"); + openapiFields.add("commit_branch_name"); + openapiFields.add("enable_guid_mapping"); + openapiFields.add("configuration_branch_name"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + openapiRequiredFields.add("repository_url"); + openapiRequiredFields.add("username"); + openapiRequiredFields.add("access_token"); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to CreateConfigRequest + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!CreateConfigRequest.openapiRequiredFields + .isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException( + String.format( + "The required field(s) %s in CreateConfigRequest is not found in" + + " the empty JSON string", + CreateConfigRequest.openapiRequiredFields.toString())); + } + } + + // check to make sure all required properties/fields are present in the JSON string + for (String requiredField : CreateConfigRequest.openapiRequiredFields) { + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException( + String.format( + "The required field `%s` is not found in the JSON string: %s", + requiredField, jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if (!jsonObj.get("repository_url").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `repository_url` to be a primitive type in the" + + " JSON string but got `%s`", + jsonObj.get("repository_url").toString())); + } + if (!jsonObj.get("username").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `username` to be a primitive type in the JSON" + + " string but got `%s`", + jsonObj.get("username").toString())); + } + if (!jsonObj.get("access_token").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `access_token` to be a primitive type in the JSON" + + " string but got `%s`", + jsonObj.get("access_token").toString())); + } + if ((jsonObj.get("org_identifier") != null && !jsonObj.get("org_identifier").isJsonNull()) + && !jsonObj.get("org_identifier").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `org_identifier` to be a primitive type in the" + + " JSON string but got `%s`", + jsonObj.get("org_identifier").toString())); + } + // ensure the optional json data is an array if present + if (jsonObj.get("branch_names") != null + && !jsonObj.get("branch_names").isJsonNull() + && !jsonObj.get("branch_names").isJsonArray()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `branch_names` to be an array in the JSON string" + + " but got `%s`", + jsonObj.get("branch_names").toString())); + } + if ((jsonObj.get("commit_branch_name") != null + && !jsonObj.get("commit_branch_name").isJsonNull()) + && !jsonObj.get("commit_branch_name").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `commit_branch_name` to be a primitive type in the" + + " JSON string but got `%s`", + jsonObj.get("commit_branch_name").toString())); + } + if ((jsonObj.get("configuration_branch_name") != null + && !jsonObj.get("configuration_branch_name").isJsonNull()) + && !jsonObj.get("configuration_branch_name").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `configuration_branch_name` to be a primitive type" + + " in the JSON string but got `%s`", + jsonObj.get("configuration_branch_name").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!CreateConfigRequest.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'CreateConfigRequest' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter = + gson.getDelegateAdapter(this, TypeToken.get(CreateConfigRequest.class)); + + return (TypeAdapter) + new TypeAdapter() { + @Override + public void write(JsonWriter out, CreateConfigRequest value) + throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + obj.remove("additionalProperties"); + // serialize additional properties + if (value.getAdditionalProperties() != null) { + for (Map.Entry entry : + value.getAdditionalProperties().entrySet()) { + if (entry.getValue() instanceof String) + obj.addProperty(entry.getKey(), (String) entry.getValue()); + else if (entry.getValue() instanceof Number) + obj.addProperty(entry.getKey(), (Number) entry.getValue()); + else if (entry.getValue() instanceof Boolean) + obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); + else if (entry.getValue() instanceof Character) + obj.addProperty( + entry.getKey(), (Character) entry.getValue()); + else { + JsonElement jsonElement = gson.toJsonTree(entry.getValue()); + if (jsonElement.isJsonArray()) { + obj.add(entry.getKey(), jsonElement.getAsJsonArray()); + } else { + obj.add(entry.getKey(), jsonElement.getAsJsonObject()); + } + } + } + } + elementAdapter.write(out, obj); + } + + @Override + public CreateConfigRequest read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // store additional fields in the deserialized instance + CreateConfigRequest instance = thisAdapter.fromJsonTree(jsonObj); + for (Map.Entry entry : jsonObj.entrySet()) { + if (!openapiFields.contains(entry.getKey())) { + if (entry.getValue().isJsonPrimitive()) { // primitive type + if (entry.getValue().getAsJsonPrimitive().isString()) + instance.putAdditionalProperty( + entry.getKey(), entry.getValue().getAsString()); + else if (entry.getValue().getAsJsonPrimitive().isNumber()) + instance.putAdditionalProperty( + entry.getKey(), entry.getValue().getAsNumber()); + else if (entry.getValue().getAsJsonPrimitive().isBoolean()) + instance.putAdditionalProperty( + entry.getKey(), + entry.getValue().getAsBoolean()); + else + throw new IllegalArgumentException( + String.format( + "The field `%s` has unknown primitive" + + " type. Value: %s", + entry.getKey(), + entry.getValue().toString())); + } else if (entry.getValue().isJsonArray()) { + instance.putAdditionalProperty( + entry.getKey(), + gson.fromJson(entry.getValue(), List.class)); + } else { // JSON object + instance.putAdditionalProperty( + entry.getKey(), + gson.fromJson(entry.getValue(), HashMap.class)); + } + } + } + return instance; + } + }.nullSafe(); + } + } + + /** + * Create an instance of CreateConfigRequest given an JSON string + * + * @param jsonString JSON string + * @return An instance of CreateConfigRequest + * @throws IOException if the JSON string is invalid with respect to CreateConfigRequest + */ + public static CreateConfigRequest fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, CreateConfigRequest.class); + } + + /** + * Convert an instance of CreateConfigRequest to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} diff --git a/sdks/java/src/main/java/com/thoughtspot/client/model/CreateConnectionConfigurationRequest.java b/sdks/java/src/main/java/com/thoughtspot/client/model/CreateConnectionConfigurationRequest.java new file mode 100644 index 000000000..e17e97399 --- /dev/null +++ b/sdks/java/src/main/java/com/thoughtspot/client/model/CreateConnectionConfigurationRequest.java @@ -0,0 +1,879 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client.model; + +import com.google.gson.Gson; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.TypeAdapter; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.reflect.TypeToken; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import com.thoughtspot.client.JSON; +import java.io.IOException; +import java.io.Serializable; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Objects; +import org.openapitools.jackson.nullable.JsonNullable; + +/** CreateConnectionConfigurationRequest */ +@javax.annotation.Generated( + value = "org.openapitools.codegen.languages.JavaClientCodegen", + comments = "Generator version: 7.12.0") +public class CreateConnectionConfigurationRequest implements Serializable { + private static final long serialVersionUID = 1L; + + public static final String SERIALIZED_NAME_NAME = "name"; + + @SerializedName(SERIALIZED_NAME_NAME) + @javax.annotation.Nonnull + private String name; + + public static final String SERIALIZED_NAME_DESCRIPTION = "description"; + + @SerializedName(SERIALIZED_NAME_DESCRIPTION) + @javax.annotation.Nullable + private String description; + + public static final String SERIALIZED_NAME_CONNECTION_IDENTIFIER = "connection_identifier"; + + @SerializedName(SERIALIZED_NAME_CONNECTION_IDENTIFIER) + @javax.annotation.Nonnull + private String connectionIdentifier; + + public static final String SERIALIZED_NAME_SAME_AS_PARENT = "same_as_parent"; + + @SerializedName(SERIALIZED_NAME_SAME_AS_PARENT) + @javax.annotation.Nullable + private Boolean sameAsParent = false; + + public static final String SERIALIZED_NAME_POLICY_PROCESS_OPTIONS = "policy_process_options"; + + @SerializedName(SERIALIZED_NAME_POLICY_PROCESS_OPTIONS) + @javax.annotation.Nullable + private PolicyProcessOptionsInput policyProcessOptions; + + /** Type of authentication used for the connection. */ + @JsonAdapter(AuthenticationTypeEnum.Adapter.class) + public enum AuthenticationTypeEnum { + SERVICE_ACCOUNT("SERVICE_ACCOUNT"), + + KEY_PAIR("KEY_PAIR"), + + PERSONAL_ACCESS_TOKEN("PERSONAL_ACCESS_TOKEN"), + + OAUTH_WITH_SERVICE_PRINCIPAL("OAUTH_WITH_SERVICE_PRINCIPAL"), + + OAUTH_CLIENT_CREDENTIALS("OAUTH_CLIENT_CREDENTIALS"); + + private String value; + + AuthenticationTypeEnum(String value) { + this.value = value; + } + + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + public static AuthenticationTypeEnum fromValue(String value) { + for (AuthenticationTypeEnum b : AuthenticationTypeEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + + public static class Adapter extends TypeAdapter { + @Override + public void write(final JsonWriter jsonWriter, final AuthenticationTypeEnum enumeration) + throws IOException { + jsonWriter.value(enumeration.getValue()); + } + + @Override + public AuthenticationTypeEnum read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + return AuthenticationTypeEnum.fromValue(value); + } + } + + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + String value = jsonElement.getAsString(); + AuthenticationTypeEnum.fromValue(value); + } + } + + public static final String SERIALIZED_NAME_AUTHENTICATION_TYPE = "authentication_type"; + + @SerializedName(SERIALIZED_NAME_AUTHENTICATION_TYPE) + @javax.annotation.Nullable + private AuthenticationTypeEnum authenticationType = AuthenticationTypeEnum.SERVICE_ACCOUNT; + + public static final String SERIALIZED_NAME_CONFIGURATION = "configuration"; + + @SerializedName(SERIALIZED_NAME_CONFIGURATION) + @javax.annotation.Nonnull + private Object _configuration; + + /** Type of policy. */ + @JsonAdapter(PolicyTypeEnum.Adapter.class) + public enum PolicyTypeEnum { + NO_POLICY("NO_POLICY"), + + PRINCIPALS("PRINCIPALS"), + + PROCESSES("PROCESSES"); + + private String value; + + PolicyTypeEnum(String value) { + this.value = value; + } + + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + public static PolicyTypeEnum fromValue(String value) { + for (PolicyTypeEnum b : PolicyTypeEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + + public static class Adapter extends TypeAdapter { + @Override + public void write(final JsonWriter jsonWriter, final PolicyTypeEnum enumeration) + throws IOException { + jsonWriter.value(enumeration.getValue()); + } + + @Override + public PolicyTypeEnum read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + return PolicyTypeEnum.fromValue(value); + } + } + + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + String value = jsonElement.getAsString(); + PolicyTypeEnum.fromValue(value); + } + } + + public static final String SERIALIZED_NAME_POLICY_TYPE = "policy_type"; + + @SerializedName(SERIALIZED_NAME_POLICY_TYPE) + @javax.annotation.Nullable + private PolicyTypeEnum policyType = PolicyTypeEnum.NO_POLICY; + + public static final String SERIALIZED_NAME_POLICY_PRINCIPALS = "policy_principals"; + + @SerializedName(SERIALIZED_NAME_POLICY_PRINCIPALS) + @javax.annotation.Nullable + private List policyPrincipals; + + /** Gets or Sets policyProcesses */ + @JsonAdapter(PolicyProcessesEnum.Adapter.class) + public enum PolicyProcessesEnum { + SAGE_INDEXING("SAGE_INDEXING"), + + ROW_COUNT_STATS("ROW_COUNT_STATS"); + + private String value; + + PolicyProcessesEnum(String value) { + this.value = value; + } + + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + public static PolicyProcessesEnum fromValue(String value) { + for (PolicyProcessesEnum b : PolicyProcessesEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + + public static class Adapter extends TypeAdapter { + @Override + public void write(final JsonWriter jsonWriter, final PolicyProcessesEnum enumeration) + throws IOException { + jsonWriter.value(enumeration.getValue()); + } + + @Override + public PolicyProcessesEnum read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + return PolicyProcessesEnum.fromValue(value); + } + } + + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + String value = jsonElement.getAsString(); + PolicyProcessesEnum.fromValue(value); + } + } + + public static final String SERIALIZED_NAME_POLICY_PROCESSES = "policy_processes"; + + @SerializedName(SERIALIZED_NAME_POLICY_PROCESSES) + @javax.annotation.Nullable + private List policyProcesses; + + public CreateConnectionConfigurationRequest() {} + + public CreateConnectionConfigurationRequest name(@javax.annotation.Nonnull String name) { + this.name = name; + return this; + } + + /** + * Unique name for the configuration. + * + * @return name + */ + @javax.annotation.Nonnull + public String getName() { + return name; + } + + public void setName(@javax.annotation.Nonnull String name) { + this.name = name; + } + + public CreateConnectionConfigurationRequest description( + @javax.annotation.Nullable String description) { + this.description = description; + return this; + } + + /** + * Description of the configuration. + * + * @return description + */ + @javax.annotation.Nullable + public String getDescription() { + return description; + } + + public void setDescription(@javax.annotation.Nullable String description) { + this.description = description; + } + + public CreateConnectionConfigurationRequest connectionIdentifier( + @javax.annotation.Nonnull String connectionIdentifier) { + this.connectionIdentifier = connectionIdentifier; + return this; + } + + /** + * Unique ID or name of the connection. + * + * @return connectionIdentifier + */ + @javax.annotation.Nonnull + public String getConnectionIdentifier() { + return connectionIdentifier; + } + + public void setConnectionIdentifier(@javax.annotation.Nonnull String connectionIdentifier) { + this.connectionIdentifier = connectionIdentifier; + } + + public CreateConnectionConfigurationRequest sameAsParent( + @javax.annotation.Nullable Boolean sameAsParent) { + this.sameAsParent = sameAsParent; + return this; + } + + /** + * Specifies whether the connection configuration should inherit all properties and + * authentication type from its parent connection. This attribute is only applicable to + * parameterized connections. When set to true, the configuration uses only the connection + * properties and authentication type inherited from the parent. Version: 26.2.0.cl or later + * + * @return sameAsParent + */ + @javax.annotation.Nullable + public Boolean getSameAsParent() { + return sameAsParent; + } + + public void setSameAsParent(@javax.annotation.Nullable Boolean sameAsParent) { + this.sameAsParent = sameAsParent; + } + + public CreateConnectionConfigurationRequest policyProcessOptions( + @javax.annotation.Nullable PolicyProcessOptionsInput policyProcessOptions) { + this.policyProcessOptions = policyProcessOptions; + return this; + } + + /** + * This attribute is only applicable to parameterized connections. Ensure that the policy is set + * to Processes to allow the configuration to be used exclusively for system processes. Version: + * 26.2.0.cl or later + * + * @return policyProcessOptions + */ + @javax.annotation.Nullable + public PolicyProcessOptionsInput getPolicyProcessOptions() { + return policyProcessOptions; + } + + public void setPolicyProcessOptions( + @javax.annotation.Nullable PolicyProcessOptionsInput policyProcessOptions) { + this.policyProcessOptions = policyProcessOptions; + } + + public CreateConnectionConfigurationRequest authenticationType( + @javax.annotation.Nullable AuthenticationTypeEnum authenticationType) { + this.authenticationType = authenticationType; + return this; + } + + /** + * Type of authentication used for the connection. + * + * @return authenticationType + */ + @javax.annotation.Nullable + public AuthenticationTypeEnum getAuthenticationType() { + return authenticationType; + } + + public void setAuthenticationType( + @javax.annotation.Nullable AuthenticationTypeEnum authenticationType) { + this.authenticationType = authenticationType; + } + + public CreateConnectionConfigurationRequest _configuration( + @javax.annotation.Nonnull Object _configuration) { + this._configuration = _configuration; + return this; + } + + /** + * Configuration properties in JSON. + * + * @return _configuration + */ + @javax.annotation.Nonnull + public Object getConfiguration() { + return _configuration; + } + + public void setConfiguration(@javax.annotation.Nonnull Object _configuration) { + this._configuration = _configuration; + } + + public CreateConnectionConfigurationRequest policyType( + @javax.annotation.Nullable PolicyTypeEnum policyType) { + this.policyType = policyType; + return this; + } + + /** + * Type of policy. + * + * @return policyType + */ + @javax.annotation.Nullable + public PolicyTypeEnum getPolicyType() { + return policyType; + } + + public void setPolicyType(@javax.annotation.Nullable PolicyTypeEnum policyType) { + this.policyType = policyType; + } + + public CreateConnectionConfigurationRequest policyPrincipals( + @javax.annotation.Nullable List policyPrincipals) { + this.policyPrincipals = policyPrincipals; + return this; + } + + public CreateConnectionConfigurationRequest addPolicyPrincipalsItem( + String policyPrincipalsItem) { + if (this.policyPrincipals == null) { + this.policyPrincipals = new ArrayList<>(); + } + this.policyPrincipals.add(policyPrincipalsItem); + return this; + } + + /** + * Unique ID or name of the User and User Groups. + * + * @return policyPrincipals + */ + @javax.annotation.Nullable + public List getPolicyPrincipals() { + return policyPrincipals; + } + + public void setPolicyPrincipals(@javax.annotation.Nullable List policyPrincipals) { + this.policyPrincipals = policyPrincipals; + } + + public CreateConnectionConfigurationRequest policyProcesses( + @javax.annotation.Nullable List policyProcesses) { + this.policyProcesses = policyProcesses; + return this; + } + + public CreateConnectionConfigurationRequest addPolicyProcessesItem( + PolicyProcessesEnum policyProcessesItem) { + if (this.policyProcesses == null) { + this.policyProcesses = new ArrayList<>(); + } + this.policyProcesses.add(policyProcessesItem); + return this; + } + + /** + * Action that the query performed on the data warehouse, such as SAGE_INDEXING and + * ROW_COUNT_STATS. + * + * @return policyProcesses + */ + @javax.annotation.Nullable + public List getPolicyProcesses() { + return policyProcesses; + } + + public void setPolicyProcesses( + @javax.annotation.Nullable List policyProcesses) { + this.policyProcesses = policyProcesses; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key name of the property + * @param value value of the property + * @return the CreateConnectionConfigurationRequest instance itself + */ + public CreateConnectionConfigurationRequest putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return a map of objects + */ + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key name of the property + * @return an object + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + CreateConnectionConfigurationRequest createConnectionConfigurationRequest = + (CreateConnectionConfigurationRequest) o; + return Objects.equals(this.name, createConnectionConfigurationRequest.name) + && Objects.equals( + this.description, createConnectionConfigurationRequest.description) + && Objects.equals( + this.connectionIdentifier, + createConnectionConfigurationRequest.connectionIdentifier) + && Objects.equals( + this.sameAsParent, createConnectionConfigurationRequest.sameAsParent) + && Objects.equals( + this.policyProcessOptions, + createConnectionConfigurationRequest.policyProcessOptions) + && Objects.equals( + this.authenticationType, + createConnectionConfigurationRequest.authenticationType) + && Objects.equals( + this._configuration, createConnectionConfigurationRequest._configuration) + && Objects.equals(this.policyType, createConnectionConfigurationRequest.policyType) + && Objects.equals( + this.policyPrincipals, + createConnectionConfigurationRequest.policyPrincipals) + && Objects.equals( + this.policyProcesses, createConnectionConfigurationRequest.policyProcesses) + && Objects.equals( + this.additionalProperties, + createConnectionConfigurationRequest.additionalProperties); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b + || (a != null + && b != null + && a.isPresent() + && b.isPresent() + && Objects.deepEquals(a.get(), b.get())); + } + + @Override + public int hashCode() { + return Objects.hash( + name, + description, + connectionIdentifier, + sameAsParent, + policyProcessOptions, + authenticationType, + _configuration, + policyType, + policyPrincipals, + policyProcesses, + additionalProperties); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; + } + return a.isPresent() ? Arrays.deepHashCode(new Object[] {a.get()}) : 31; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class CreateConnectionConfigurationRequest {\n"); + sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append(" description: ").append(toIndentedString(description)).append("\n"); + sb.append(" connectionIdentifier: ") + .append(toIndentedString(connectionIdentifier)) + .append("\n"); + sb.append(" sameAsParent: ").append(toIndentedString(sameAsParent)).append("\n"); + sb.append(" policyProcessOptions: ") + .append(toIndentedString(policyProcessOptions)) + .append("\n"); + sb.append(" authenticationType: ") + .append(toIndentedString(authenticationType)) + .append("\n"); + sb.append(" _configuration: ").append(toIndentedString(_configuration)).append("\n"); + sb.append(" policyType: ").append(toIndentedString(policyType)).append("\n"); + sb.append(" policyPrincipals: ").append(toIndentedString(policyPrincipals)).append("\n"); + sb.append(" policyProcesses: ").append(toIndentedString(policyProcesses)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first + * line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("name"); + openapiFields.add("description"); + openapiFields.add("connection_identifier"); + openapiFields.add("same_as_parent"); + openapiFields.add("policy_process_options"); + openapiFields.add("authentication_type"); + openapiFields.add("configuration"); + openapiFields.add("policy_type"); + openapiFields.add("policy_principals"); + openapiFields.add("policy_processes"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + openapiRequiredFields.add("name"); + openapiRequiredFields.add("connection_identifier"); + openapiRequiredFields.add("configuration"); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to + * CreateConnectionConfigurationRequest + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!CreateConnectionConfigurationRequest.openapiRequiredFields + .isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException( + String.format( + "The required field(s) %s in CreateConnectionConfigurationRequest" + + " is not found in the empty JSON string", + CreateConnectionConfigurationRequest.openapiRequiredFields + .toString())); + } + } + + // check to make sure all required properties/fields are present in the JSON string + for (String requiredField : CreateConnectionConfigurationRequest.openapiRequiredFields) { + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException( + String.format( + "The required field `%s` is not found in the JSON string: %s", + requiredField, jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if (!jsonObj.get("name").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `name` to be a primitive type in the JSON string" + + " but got `%s`", + jsonObj.get("name").toString())); + } + if ((jsonObj.get("description") != null && !jsonObj.get("description").isJsonNull()) + && !jsonObj.get("description").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `description` to be a primitive type in the JSON" + + " string but got `%s`", + jsonObj.get("description").toString())); + } + if (!jsonObj.get("connection_identifier").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `connection_identifier` to be a primitive type in" + + " the JSON string but got `%s`", + jsonObj.get("connection_identifier").toString())); + } + // validate the optional field `policy_process_options` + if (jsonObj.get("policy_process_options") != null + && !jsonObj.get("policy_process_options").isJsonNull()) { + PolicyProcessOptionsInput.validateJsonElement(jsonObj.get("policy_process_options")); + } + if ((jsonObj.get("authentication_type") != null + && !jsonObj.get("authentication_type").isJsonNull()) + && !jsonObj.get("authentication_type").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `authentication_type` to be a primitive type in" + + " the JSON string but got `%s`", + jsonObj.get("authentication_type").toString())); + } + // validate the optional field `authentication_type` + if (jsonObj.get("authentication_type") != null + && !jsonObj.get("authentication_type").isJsonNull()) { + AuthenticationTypeEnum.validateJsonElement(jsonObj.get("authentication_type")); + } + if ((jsonObj.get("policy_type") != null && !jsonObj.get("policy_type").isJsonNull()) + && !jsonObj.get("policy_type").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `policy_type` to be a primitive type in the JSON" + + " string but got `%s`", + jsonObj.get("policy_type").toString())); + } + // validate the optional field `policy_type` + if (jsonObj.get("policy_type") != null && !jsonObj.get("policy_type").isJsonNull()) { + PolicyTypeEnum.validateJsonElement(jsonObj.get("policy_type")); + } + // ensure the optional json data is an array if present + if (jsonObj.get("policy_principals") != null + && !jsonObj.get("policy_principals").isJsonNull() + && !jsonObj.get("policy_principals").isJsonArray()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `policy_principals` to be an array in the JSON" + + " string but got `%s`", + jsonObj.get("policy_principals").toString())); + } + // ensure the optional json data is an array if present + if (jsonObj.get("policy_processes") != null + && !jsonObj.get("policy_processes").isJsonNull() + && !jsonObj.get("policy_processes").isJsonArray()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `policy_processes` to be an array in the JSON" + + " string but got `%s`", + jsonObj.get("policy_processes").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!CreateConnectionConfigurationRequest.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'CreateConnectionConfigurationRequest' + // and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter = + gson.getDelegateAdapter( + this, TypeToken.get(CreateConnectionConfigurationRequest.class)); + + return (TypeAdapter) + new TypeAdapter() { + @Override + public void write( + JsonWriter out, CreateConnectionConfigurationRequest value) + throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + obj.remove("additionalProperties"); + // serialize additional properties + if (value.getAdditionalProperties() != null) { + for (Map.Entry entry : + value.getAdditionalProperties().entrySet()) { + if (entry.getValue() instanceof String) + obj.addProperty(entry.getKey(), (String) entry.getValue()); + else if (entry.getValue() instanceof Number) + obj.addProperty(entry.getKey(), (Number) entry.getValue()); + else if (entry.getValue() instanceof Boolean) + obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); + else if (entry.getValue() instanceof Character) + obj.addProperty( + entry.getKey(), (Character) entry.getValue()); + else { + JsonElement jsonElement = gson.toJsonTree(entry.getValue()); + if (jsonElement.isJsonArray()) { + obj.add(entry.getKey(), jsonElement.getAsJsonArray()); + } else { + obj.add(entry.getKey(), jsonElement.getAsJsonObject()); + } + } + } + } + elementAdapter.write(out, obj); + } + + @Override + public CreateConnectionConfigurationRequest read(JsonReader in) + throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // store additional fields in the deserialized instance + CreateConnectionConfigurationRequest instance = + thisAdapter.fromJsonTree(jsonObj); + for (Map.Entry entry : jsonObj.entrySet()) { + if (!openapiFields.contains(entry.getKey())) { + if (entry.getValue().isJsonPrimitive()) { // primitive type + if (entry.getValue().getAsJsonPrimitive().isString()) + instance.putAdditionalProperty( + entry.getKey(), entry.getValue().getAsString()); + else if (entry.getValue().getAsJsonPrimitive().isNumber()) + instance.putAdditionalProperty( + entry.getKey(), entry.getValue().getAsNumber()); + else if (entry.getValue().getAsJsonPrimitive().isBoolean()) + instance.putAdditionalProperty( + entry.getKey(), + entry.getValue().getAsBoolean()); + else + throw new IllegalArgumentException( + String.format( + "The field `%s` has unknown primitive" + + " type. Value: %s", + entry.getKey(), + entry.getValue().toString())); + } else if (entry.getValue().isJsonArray()) { + instance.putAdditionalProperty( + entry.getKey(), + gson.fromJson(entry.getValue(), List.class)); + } else { // JSON object + instance.putAdditionalProperty( + entry.getKey(), + gson.fromJson(entry.getValue(), HashMap.class)); + } + } + } + return instance; + } + }.nullSafe(); + } + } + + /** + * Create an instance of CreateConnectionConfigurationRequest given an JSON string + * + * @param jsonString JSON string + * @return An instance of CreateConnectionConfigurationRequest + * @throws IOException if the JSON string is invalid with respect to + * CreateConnectionConfigurationRequest + */ + public static CreateConnectionConfigurationRequest fromJson(String jsonString) + throws IOException { + return JSON.getGson().fromJson(jsonString, CreateConnectionConfigurationRequest.class); + } + + /** + * Convert an instance of CreateConnectionConfigurationRequest to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} diff --git a/sdks/java/src/main/java/com/thoughtspot/client/model/CreateConnectionRequest.java b/sdks/java/src/main/java/com/thoughtspot/client/model/CreateConnectionRequest.java new file mode 100644 index 000000000..97901e212 --- /dev/null +++ b/sdks/java/src/main/java/com/thoughtspot/client/model/CreateConnectionRequest.java @@ -0,0 +1,584 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client.model; + +import com.google.gson.Gson; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.TypeAdapter; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.reflect.TypeToken; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import com.thoughtspot.client.JSON; +import java.io.IOException; +import java.io.Serializable; +import java.util.Arrays; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Objects; +import org.openapitools.jackson.nullable.JsonNullable; + +/** CreateConnectionRequest */ +@javax.annotation.Generated( + value = "org.openapitools.codegen.languages.JavaClientCodegen", + comments = "Generator version: 7.12.0") +public class CreateConnectionRequest implements Serializable { + private static final long serialVersionUID = 1L; + + public static final String SERIALIZED_NAME_NAME = "name"; + + @SerializedName(SERIALIZED_NAME_NAME) + @javax.annotation.Nonnull + private String name; + + public static final String SERIALIZED_NAME_DESCRIPTION = "description"; + + @SerializedName(SERIALIZED_NAME_DESCRIPTION) + @javax.annotation.Nullable + private String description; + + /** Type of the data warehouse. */ + @JsonAdapter(DataWarehouseTypeEnum.Adapter.class) + public enum DataWarehouseTypeEnum { + SNOWFLAKE("SNOWFLAKE"), + + AMAZON_REDSHIFT("AMAZON_REDSHIFT"), + + GOOGLE_BIGQUERY("GOOGLE_BIGQUERY"), + + AZURE_SYNAPSE("AZURE_SYNAPSE"), + + TERADATA("TERADATA"), + + SAP_HANA("SAP_HANA"), + + STARBURST("STARBURST"), + + ORACLE_ADW("ORACLE_ADW"), + + DATABRICKS("DATABRICKS"), + + DENODO("DENODO"), + + DREMIO("DREMIO"), + + TRINO("TRINO"), + + PRESTO("PRESTO"), + + POSTGRES("POSTGRES"), + + SQLSERVER("SQLSERVER"), + + MYSQL("MYSQL"), + + GENERIC_JDBC("GENERIC_JDBC"), + + AMAZON_RDS_POSTGRESQL("AMAZON_RDS_POSTGRESQL"), + + AMAZON_AURORA_POSTGRESQL("AMAZON_AURORA_POSTGRESQL"), + + AMAZON_RDS_MYSQL("AMAZON_RDS_MYSQL"), + + AMAZON_AURORA_MYSQL("AMAZON_AURORA_MYSQL"), + + LOOKER("LOOKER"), + + AMAZON_ATHENA("AMAZON_ATHENA"), + + SINGLESTORE("SINGLESTORE"), + + GCP_SQLSERVER("GCP_SQLSERVER"), + + GCP_ALLOYDB_POSTGRESQL("GCP_ALLOYDB_POSTGRESQL"), + + GCP_POSTGRESQL("GCP_POSTGRESQL"), + + GCP_MYSQL("GCP_MYSQL"), + + MODE("MODE"), + + GOOGLE_SHEETS("GOOGLE_SHEETS"), + + FALCON("FALCON"), + + FALCON_ONPREM("FALCON_ONPREM"), + + CLICKHOUSE("CLICKHOUSE"), + + IOMETE("IOMETE"); + + private String value; + + DataWarehouseTypeEnum(String value) { + this.value = value; + } + + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + public static DataWarehouseTypeEnum fromValue(String value) { + for (DataWarehouseTypeEnum b : DataWarehouseTypeEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + + public static class Adapter extends TypeAdapter { + @Override + public void write(final JsonWriter jsonWriter, final DataWarehouseTypeEnum enumeration) + throws IOException { + jsonWriter.value(enumeration.getValue()); + } + + @Override + public DataWarehouseTypeEnum read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + return DataWarehouseTypeEnum.fromValue(value); + } + } + + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + String value = jsonElement.getAsString(); + DataWarehouseTypeEnum.fromValue(value); + } + } + + public static final String SERIALIZED_NAME_DATA_WAREHOUSE_TYPE = "data_warehouse_type"; + + @SerializedName(SERIALIZED_NAME_DATA_WAREHOUSE_TYPE) + @javax.annotation.Nonnull + private DataWarehouseTypeEnum dataWarehouseType; + + public static final String SERIALIZED_NAME_DATA_WAREHOUSE_CONFIG = "data_warehouse_config"; + + @SerializedName(SERIALIZED_NAME_DATA_WAREHOUSE_CONFIG) + @javax.annotation.Nonnull + private Object dataWarehouseConfig; + + public static final String SERIALIZED_NAME_VALIDATE = "validate"; + + @SerializedName(SERIALIZED_NAME_VALIDATE) + @javax.annotation.Nullable + private Boolean validate = true; + + public CreateConnectionRequest() {} + + public CreateConnectionRequest name(@javax.annotation.Nonnull String name) { + this.name = name; + return this; + } + + /** + * Unique name for the connection. + * + * @return name + */ + @javax.annotation.Nonnull + public String getName() { + return name; + } + + public void setName(@javax.annotation.Nonnull String name) { + this.name = name; + } + + public CreateConnectionRequest description(@javax.annotation.Nullable String description) { + this.description = description; + return this; + } + + /** + * Description of the connection. + * + * @return description + */ + @javax.annotation.Nullable + public String getDescription() { + return description; + } + + public void setDescription(@javax.annotation.Nullable String description) { + this.description = description; + } + + public CreateConnectionRequest dataWarehouseType( + @javax.annotation.Nonnull DataWarehouseTypeEnum dataWarehouseType) { + this.dataWarehouseType = dataWarehouseType; + return this; + } + + /** + * Type of the data warehouse. + * + * @return dataWarehouseType + */ + @javax.annotation.Nonnull + public DataWarehouseTypeEnum getDataWarehouseType() { + return dataWarehouseType; + } + + public void setDataWarehouseType( + @javax.annotation.Nonnull DataWarehouseTypeEnum dataWarehouseType) { + this.dataWarehouseType = dataWarehouseType; + } + + public CreateConnectionRequest dataWarehouseConfig( + @javax.annotation.Nonnull Object dataWarehouseConfig) { + this.dataWarehouseConfig = dataWarehouseConfig; + return this; + } + + /** + * Connection configuration attributes in JSON format. To create a connection with tables, + * include table attributes. See the documentation above for sample JSON. + * + * @return dataWarehouseConfig + */ + @javax.annotation.Nonnull + public Object getDataWarehouseConfig() { + return dataWarehouseConfig; + } + + public void setDataWarehouseConfig(@javax.annotation.Nonnull Object dataWarehouseConfig) { + this.dataWarehouseConfig = dataWarehouseConfig; + } + + public CreateConnectionRequest validate(@javax.annotation.Nullable Boolean validate) { + this.validate = validate; + return this; + } + + /** + * Validates the connection metadata if tables are included. If you are creating a connection + * without tables, specify `false`. + * + * @return validate + */ + @javax.annotation.Nullable + public Boolean getValidate() { + return validate; + } + + public void setValidate(@javax.annotation.Nullable Boolean validate) { + this.validate = validate; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key name of the property + * @param value value of the property + * @return the CreateConnectionRequest instance itself + */ + public CreateConnectionRequest putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return a map of objects + */ + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key name of the property + * @return an object + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + CreateConnectionRequest createConnectionRequest = (CreateConnectionRequest) o; + return Objects.equals(this.name, createConnectionRequest.name) + && Objects.equals(this.description, createConnectionRequest.description) + && Objects.equals(this.dataWarehouseType, createConnectionRequest.dataWarehouseType) + && Objects.equals( + this.dataWarehouseConfig, createConnectionRequest.dataWarehouseConfig) + && Objects.equals(this.validate, createConnectionRequest.validate) + && Objects.equals( + this.additionalProperties, createConnectionRequest.additionalProperties); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b + || (a != null + && b != null + && a.isPresent() + && b.isPresent() + && Objects.deepEquals(a.get(), b.get())); + } + + @Override + public int hashCode() { + return Objects.hash( + name, + description, + dataWarehouseType, + dataWarehouseConfig, + validate, + additionalProperties); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; + } + return a.isPresent() ? Arrays.deepHashCode(new Object[] {a.get()}) : 31; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class CreateConnectionRequest {\n"); + sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append(" description: ").append(toIndentedString(description)).append("\n"); + sb.append(" dataWarehouseType: ") + .append(toIndentedString(dataWarehouseType)) + .append("\n"); + sb.append(" dataWarehouseConfig: ") + .append(toIndentedString(dataWarehouseConfig)) + .append("\n"); + sb.append(" validate: ").append(toIndentedString(validate)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first + * line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("name"); + openapiFields.add("description"); + openapiFields.add("data_warehouse_type"); + openapiFields.add("data_warehouse_config"); + openapiFields.add("validate"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + openapiRequiredFields.add("name"); + openapiRequiredFields.add("data_warehouse_type"); + openapiRequiredFields.add("data_warehouse_config"); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to CreateConnectionRequest + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!CreateConnectionRequest.openapiRequiredFields + .isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException( + String.format( + "The required field(s) %s in CreateConnectionRequest is not found" + + " in the empty JSON string", + CreateConnectionRequest.openapiRequiredFields.toString())); + } + } + + // check to make sure all required properties/fields are present in the JSON string + for (String requiredField : CreateConnectionRequest.openapiRequiredFields) { + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException( + String.format( + "The required field `%s` is not found in the JSON string: %s", + requiredField, jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if (!jsonObj.get("name").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `name` to be a primitive type in the JSON string" + + " but got `%s`", + jsonObj.get("name").toString())); + } + if ((jsonObj.get("description") != null && !jsonObj.get("description").isJsonNull()) + && !jsonObj.get("description").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `description` to be a primitive type in the JSON" + + " string but got `%s`", + jsonObj.get("description").toString())); + } + if (!jsonObj.get("data_warehouse_type").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `data_warehouse_type` to be a primitive type in" + + " the JSON string but got `%s`", + jsonObj.get("data_warehouse_type").toString())); + } + // validate the required field `data_warehouse_type` + DataWarehouseTypeEnum.validateJsonElement(jsonObj.get("data_warehouse_type")); + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!CreateConnectionRequest.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'CreateConnectionRequest' and its + // subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter = + gson.getDelegateAdapter(this, TypeToken.get(CreateConnectionRequest.class)); + + return (TypeAdapter) + new TypeAdapter() { + @Override + public void write(JsonWriter out, CreateConnectionRequest value) + throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + obj.remove("additionalProperties"); + // serialize additional properties + if (value.getAdditionalProperties() != null) { + for (Map.Entry entry : + value.getAdditionalProperties().entrySet()) { + if (entry.getValue() instanceof String) + obj.addProperty(entry.getKey(), (String) entry.getValue()); + else if (entry.getValue() instanceof Number) + obj.addProperty(entry.getKey(), (Number) entry.getValue()); + else if (entry.getValue() instanceof Boolean) + obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); + else if (entry.getValue() instanceof Character) + obj.addProperty( + entry.getKey(), (Character) entry.getValue()); + else { + JsonElement jsonElement = gson.toJsonTree(entry.getValue()); + if (jsonElement.isJsonArray()) { + obj.add(entry.getKey(), jsonElement.getAsJsonArray()); + } else { + obj.add(entry.getKey(), jsonElement.getAsJsonObject()); + } + } + } + } + elementAdapter.write(out, obj); + } + + @Override + public CreateConnectionRequest read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // store additional fields in the deserialized instance + CreateConnectionRequest instance = thisAdapter.fromJsonTree(jsonObj); + for (Map.Entry entry : jsonObj.entrySet()) { + if (!openapiFields.contains(entry.getKey())) { + if (entry.getValue().isJsonPrimitive()) { // primitive type + if (entry.getValue().getAsJsonPrimitive().isString()) + instance.putAdditionalProperty( + entry.getKey(), entry.getValue().getAsString()); + else if (entry.getValue().getAsJsonPrimitive().isNumber()) + instance.putAdditionalProperty( + entry.getKey(), entry.getValue().getAsNumber()); + else if (entry.getValue().getAsJsonPrimitive().isBoolean()) + instance.putAdditionalProperty( + entry.getKey(), + entry.getValue().getAsBoolean()); + else + throw new IllegalArgumentException( + String.format( + "The field `%s` has unknown primitive" + + " type. Value: %s", + entry.getKey(), + entry.getValue().toString())); + } else if (entry.getValue().isJsonArray()) { + instance.putAdditionalProperty( + entry.getKey(), + gson.fromJson(entry.getValue(), List.class)); + } else { // JSON object + instance.putAdditionalProperty( + entry.getKey(), + gson.fromJson(entry.getValue(), HashMap.class)); + } + } + } + return instance; + } + }.nullSafe(); + } + } + + /** + * Create an instance of CreateConnectionRequest given an JSON string + * + * @param jsonString JSON string + * @return An instance of CreateConnectionRequest + * @throws IOException if the JSON string is invalid with respect to CreateConnectionRequest + */ + public static CreateConnectionRequest fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, CreateConnectionRequest.class); + } + + /** + * Convert an instance of CreateConnectionRequest to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} diff --git a/sdks/java/src/main/java/com/thoughtspot/client/model/CreateConnectionResponse.java b/sdks/java/src/main/java/com/thoughtspot/client/model/CreateConnectionResponse.java new file mode 100644 index 000000000..85a17861b --- /dev/null +++ b/sdks/java/src/main/java/com/thoughtspot/client/model/CreateConnectionResponse.java @@ -0,0 +1,544 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client.model; + +import com.google.gson.Gson; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.TypeAdapter; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.reflect.TypeToken; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import com.thoughtspot.client.JSON; +import java.io.IOException; +import java.io.Serializable; +import java.util.Arrays; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Objects; +import org.openapitools.jackson.nullable.JsonNullable; + +/** CreateConnectionResponse */ +@javax.annotation.Generated( + value = "org.openapitools.codegen.languages.JavaClientCodegen", + comments = "Generator version: 7.12.0") +public class CreateConnectionResponse implements Serializable { + private static final long serialVersionUID = 1L; + + public static final String SERIALIZED_NAME_ID = "id"; + + @SerializedName(SERIALIZED_NAME_ID) + @javax.annotation.Nonnull + private String id; + + public static final String SERIALIZED_NAME_NAME = "name"; + + @SerializedName(SERIALIZED_NAME_NAME) + @javax.annotation.Nonnull + private String name; + + /** Type of data warehouse. */ + @JsonAdapter(DataWarehouseTypeEnum.Adapter.class) + public enum DataWarehouseTypeEnum { + SNOWFLAKE("SNOWFLAKE"), + + AMAZON_REDSHIFT("AMAZON_REDSHIFT"), + + GOOGLE_BIGQUERY("GOOGLE_BIGQUERY"), + + AZURE_SYNAPSE("AZURE_SYNAPSE"), + + TERADATA("TERADATA"), + + SAP_HANA("SAP_HANA"), + + STARBURST("STARBURST"), + + ORACLE_ADW("ORACLE_ADW"), + + DATABRICKS("DATABRICKS"), + + DENODO("DENODO"), + + DREMIO("DREMIO"), + + TRINO("TRINO"), + + PRESTO("PRESTO"), + + POSTGRES("POSTGRES"), + + SQLSERVER("SQLSERVER"), + + MYSQL("MYSQL"), + + GENERIC_JDBC("GENERIC_JDBC"), + + AMAZON_RDS_POSTGRESQL("AMAZON_RDS_POSTGRESQL"), + + AMAZON_AURORA_POSTGRESQL("AMAZON_AURORA_POSTGRESQL"), + + AMAZON_RDS_MYSQL("AMAZON_RDS_MYSQL"), + + AMAZON_AURORA_MYSQL("AMAZON_AURORA_MYSQL"), + + LOOKER("LOOKER"), + + AMAZON_ATHENA("AMAZON_ATHENA"), + + SINGLESTORE("SINGLESTORE"), + + GCP_SQLSERVER("GCP_SQLSERVER"), + + GCP_ALLOYDB_POSTGRESQL("GCP_ALLOYDB_POSTGRESQL"), + + GCP_POSTGRESQL("GCP_POSTGRESQL"), + + GCP_MYSQL("GCP_MYSQL"), + + MODE("MODE"), + + GOOGLE_SHEETS("GOOGLE_SHEETS"), + + FALCON("FALCON"), + + FALCON_ONPREM("FALCON_ONPREM"), + + CLICKHOUSE("CLICKHOUSE"), + + IOMETE("IOMETE"); + + private String value; + + DataWarehouseTypeEnum(String value) { + this.value = value; + } + + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + public static DataWarehouseTypeEnum fromValue(String value) { + for (DataWarehouseTypeEnum b : DataWarehouseTypeEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + + public static class Adapter extends TypeAdapter { + @Override + public void write(final JsonWriter jsonWriter, final DataWarehouseTypeEnum enumeration) + throws IOException { + jsonWriter.value(enumeration.getValue()); + } + + @Override + public DataWarehouseTypeEnum read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + return DataWarehouseTypeEnum.fromValue(value); + } + } + + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + String value = jsonElement.getAsString(); + DataWarehouseTypeEnum.fromValue(value); + } + } + + public static final String SERIALIZED_NAME_DATA_WAREHOUSE_TYPE = "data_warehouse_type"; + + @SerializedName(SERIALIZED_NAME_DATA_WAREHOUSE_TYPE) + @javax.annotation.Nonnull + private DataWarehouseTypeEnum dataWarehouseType; + + public static final String SERIALIZED_NAME_DETAILS = "details"; + + @SerializedName(SERIALIZED_NAME_DETAILS) + @javax.annotation.Nullable + private Object details; + + public CreateConnectionResponse() {} + + public CreateConnectionResponse id(@javax.annotation.Nonnull String id) { + this.id = id; + return this; + } + + /** + * ID of the connection created. + * + * @return id + */ + @javax.annotation.Nonnull + public String getId() { + return id; + } + + public void setId(@javax.annotation.Nonnull String id) { + this.id = id; + } + + public CreateConnectionResponse name(@javax.annotation.Nonnull String name) { + this.name = name; + return this; + } + + /** + * Name of the connection. + * + * @return name + */ + @javax.annotation.Nonnull + public String getName() { + return name; + } + + public void setName(@javax.annotation.Nonnull String name) { + this.name = name; + } + + public CreateConnectionResponse dataWarehouseType( + @javax.annotation.Nonnull DataWarehouseTypeEnum dataWarehouseType) { + this.dataWarehouseType = dataWarehouseType; + return this; + } + + /** + * Type of data warehouse. + * + * @return dataWarehouseType + */ + @javax.annotation.Nonnull + public DataWarehouseTypeEnum getDataWarehouseType() { + return dataWarehouseType; + } + + public void setDataWarehouseType( + @javax.annotation.Nonnull DataWarehouseTypeEnum dataWarehouseType) { + this.dataWarehouseType = dataWarehouseType; + } + + public CreateConnectionResponse details(@javax.annotation.Nullable Object details) { + this.details = details; + return this; + } + + /** + * Details of the connection. + * + * @return details + */ + @javax.annotation.Nullable + public Object getDetails() { + return details; + } + + public void setDetails(@javax.annotation.Nullable Object details) { + this.details = details; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key name of the property + * @param value value of the property + * @return the CreateConnectionResponse instance itself + */ + public CreateConnectionResponse putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return a map of objects + */ + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key name of the property + * @return an object + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + CreateConnectionResponse createConnectionResponse = (CreateConnectionResponse) o; + return Objects.equals(this.id, createConnectionResponse.id) + && Objects.equals(this.name, createConnectionResponse.name) + && Objects.equals( + this.dataWarehouseType, createConnectionResponse.dataWarehouseType) + && Objects.equals(this.details, createConnectionResponse.details) + && Objects.equals( + this.additionalProperties, createConnectionResponse.additionalProperties); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b + || (a != null + && b != null + && a.isPresent() + && b.isPresent() + && Objects.deepEquals(a.get(), b.get())); + } + + @Override + public int hashCode() { + return Objects.hash(id, name, dataWarehouseType, details, additionalProperties); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; + } + return a.isPresent() ? Arrays.deepHashCode(new Object[] {a.get()}) : 31; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class CreateConnectionResponse {\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append(" dataWarehouseType: ") + .append(toIndentedString(dataWarehouseType)) + .append("\n"); + sb.append(" details: ").append(toIndentedString(details)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first + * line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("id"); + openapiFields.add("name"); + openapiFields.add("data_warehouse_type"); + openapiFields.add("details"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + openapiRequiredFields.add("id"); + openapiRequiredFields.add("name"); + openapiRequiredFields.add("data_warehouse_type"); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to CreateConnectionResponse + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!CreateConnectionResponse.openapiRequiredFields + .isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException( + String.format( + "The required field(s) %s in CreateConnectionResponse is not found" + + " in the empty JSON string", + CreateConnectionResponse.openapiRequiredFields.toString())); + } + } + + // check to make sure all required properties/fields are present in the JSON string + for (String requiredField : CreateConnectionResponse.openapiRequiredFields) { + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException( + String.format( + "The required field `%s` is not found in the JSON string: %s", + requiredField, jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if (!jsonObj.get("id").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `id` to be a primitive type in the JSON string but" + + " got `%s`", + jsonObj.get("id").toString())); + } + if (!jsonObj.get("name").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `name` to be a primitive type in the JSON string" + + " but got `%s`", + jsonObj.get("name").toString())); + } + if (!jsonObj.get("data_warehouse_type").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `data_warehouse_type` to be a primitive type in" + + " the JSON string but got `%s`", + jsonObj.get("data_warehouse_type").toString())); + } + // validate the required field `data_warehouse_type` + DataWarehouseTypeEnum.validateJsonElement(jsonObj.get("data_warehouse_type")); + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!CreateConnectionResponse.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'CreateConnectionResponse' and its + // subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter = + gson.getDelegateAdapter(this, TypeToken.get(CreateConnectionResponse.class)); + + return (TypeAdapter) + new TypeAdapter() { + @Override + public void write(JsonWriter out, CreateConnectionResponse value) + throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + obj.remove("additionalProperties"); + // serialize additional properties + if (value.getAdditionalProperties() != null) { + for (Map.Entry entry : + value.getAdditionalProperties().entrySet()) { + if (entry.getValue() instanceof String) + obj.addProperty(entry.getKey(), (String) entry.getValue()); + else if (entry.getValue() instanceof Number) + obj.addProperty(entry.getKey(), (Number) entry.getValue()); + else if (entry.getValue() instanceof Boolean) + obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); + else if (entry.getValue() instanceof Character) + obj.addProperty( + entry.getKey(), (Character) entry.getValue()); + else { + JsonElement jsonElement = gson.toJsonTree(entry.getValue()); + if (jsonElement.isJsonArray()) { + obj.add(entry.getKey(), jsonElement.getAsJsonArray()); + } else { + obj.add(entry.getKey(), jsonElement.getAsJsonObject()); + } + } + } + } + elementAdapter.write(out, obj); + } + + @Override + public CreateConnectionResponse read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // store additional fields in the deserialized instance + CreateConnectionResponse instance = thisAdapter.fromJsonTree(jsonObj); + for (Map.Entry entry : jsonObj.entrySet()) { + if (!openapiFields.contains(entry.getKey())) { + if (entry.getValue().isJsonPrimitive()) { // primitive type + if (entry.getValue().getAsJsonPrimitive().isString()) + instance.putAdditionalProperty( + entry.getKey(), entry.getValue().getAsString()); + else if (entry.getValue().getAsJsonPrimitive().isNumber()) + instance.putAdditionalProperty( + entry.getKey(), entry.getValue().getAsNumber()); + else if (entry.getValue().getAsJsonPrimitive().isBoolean()) + instance.putAdditionalProperty( + entry.getKey(), + entry.getValue().getAsBoolean()); + else + throw new IllegalArgumentException( + String.format( + "The field `%s` has unknown primitive" + + " type. Value: %s", + entry.getKey(), + entry.getValue().toString())); + } else if (entry.getValue().isJsonArray()) { + instance.putAdditionalProperty( + entry.getKey(), + gson.fromJson(entry.getValue(), List.class)); + } else { // JSON object + instance.putAdditionalProperty( + entry.getKey(), + gson.fromJson(entry.getValue(), HashMap.class)); + } + } + } + return instance; + } + }.nullSafe(); + } + } + + /** + * Create an instance of CreateConnectionResponse given an JSON string + * + * @param jsonString JSON string + * @return An instance of CreateConnectionResponse + * @throws IOException if the JSON string is invalid with respect to CreateConnectionResponse + */ + public static CreateConnectionResponse fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, CreateConnectionResponse.class); + } + + /** + * Convert an instance of CreateConnectionResponse to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} diff --git a/sdks/java/src/main/java/com/thoughtspot/client/model/CreateConversationRequest.java b/sdks/java/src/main/java/com/thoughtspot/client/model/CreateConversationRequest.java new file mode 100644 index 000000000..5a7c88258 --- /dev/null +++ b/sdks/java/src/main/java/com/thoughtspot/client/model/CreateConversationRequest.java @@ -0,0 +1,344 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client.model; + +import com.google.gson.Gson; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.TypeAdapter; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.annotations.SerializedName; +import com.google.gson.reflect.TypeToken; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import com.thoughtspot.client.JSON; +import java.io.IOException; +import java.io.Serializable; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Objects; + +/** CreateConversationRequest */ +@javax.annotation.Generated( + value = "org.openapitools.codegen.languages.JavaClientCodegen", + comments = "Generator version: 7.12.0") +public class CreateConversationRequest implements Serializable { + private static final long serialVersionUID = 1L; + + public static final String SERIALIZED_NAME_METADATA_IDENTIFIER = "metadata_identifier"; + + @SerializedName(SERIALIZED_NAME_METADATA_IDENTIFIER) + @javax.annotation.Nonnull + private String metadataIdentifier; + + public static final String SERIALIZED_NAME_TOKENS = "tokens"; + + @SerializedName(SERIALIZED_NAME_TOKENS) + @javax.annotation.Nullable + private String tokens; + + public CreateConversationRequest() {} + + public CreateConversationRequest metadataIdentifier( + @javax.annotation.Nonnull String metadataIdentifier) { + this.metadataIdentifier = metadataIdentifier; + return this; + } + + /** + * ID of the metadata object, such as a Worksheet or Model, to use as a data source for the + * conversation. + * + * @return metadataIdentifier + */ + @javax.annotation.Nonnull + public String getMetadataIdentifier() { + return metadataIdentifier; + } + + public void setMetadataIdentifier(@javax.annotation.Nonnull String metadataIdentifier) { + this.metadataIdentifier = metadataIdentifier; + } + + public CreateConversationRequest tokens(@javax.annotation.Nullable String tokens) { + this.tokens = tokens; + return this; + } + + /** + * Token string to set the context for the conversation. For example,`[sales],[item + * type],[state]`. + * + * @return tokens + */ + @javax.annotation.Nullable + public String getTokens() { + return tokens; + } + + public void setTokens(@javax.annotation.Nullable String tokens) { + this.tokens = tokens; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key name of the property + * @param value value of the property + * @return the CreateConversationRequest instance itself + */ + public CreateConversationRequest putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return a map of objects + */ + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key name of the property + * @return an object + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + CreateConversationRequest createConversationRequest = (CreateConversationRequest) o; + return Objects.equals(this.metadataIdentifier, createConversationRequest.metadataIdentifier) + && Objects.equals(this.tokens, createConversationRequest.tokens) + && Objects.equals( + this.additionalProperties, createConversationRequest.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(metadataIdentifier, tokens, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class CreateConversationRequest {\n"); + sb.append(" metadataIdentifier: ") + .append(toIndentedString(metadataIdentifier)) + .append("\n"); + sb.append(" tokens: ").append(toIndentedString(tokens)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first + * line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("metadata_identifier"); + openapiFields.add("tokens"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + openapiRequiredFields.add("metadata_identifier"); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to CreateConversationRequest + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!CreateConversationRequest.openapiRequiredFields + .isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException( + String.format( + "The required field(s) %s in CreateConversationRequest is not" + + " found in the empty JSON string", + CreateConversationRequest.openapiRequiredFields.toString())); + } + } + + // check to make sure all required properties/fields are present in the JSON string + for (String requiredField : CreateConversationRequest.openapiRequiredFields) { + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException( + String.format( + "The required field `%s` is not found in the JSON string: %s", + requiredField, jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if (!jsonObj.get("metadata_identifier").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `metadata_identifier` to be a primitive type in" + + " the JSON string but got `%s`", + jsonObj.get("metadata_identifier").toString())); + } + if ((jsonObj.get("tokens") != null && !jsonObj.get("tokens").isJsonNull()) + && !jsonObj.get("tokens").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `tokens` to be a primitive type in the JSON string" + + " but got `%s`", + jsonObj.get("tokens").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!CreateConversationRequest.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'CreateConversationRequest' and its + // subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter = + gson.getDelegateAdapter(this, TypeToken.get(CreateConversationRequest.class)); + + return (TypeAdapter) + new TypeAdapter() { + @Override + public void write(JsonWriter out, CreateConversationRequest value) + throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + obj.remove("additionalProperties"); + // serialize additional properties + if (value.getAdditionalProperties() != null) { + for (Map.Entry entry : + value.getAdditionalProperties().entrySet()) { + if (entry.getValue() instanceof String) + obj.addProperty(entry.getKey(), (String) entry.getValue()); + else if (entry.getValue() instanceof Number) + obj.addProperty(entry.getKey(), (Number) entry.getValue()); + else if (entry.getValue() instanceof Boolean) + obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); + else if (entry.getValue() instanceof Character) + obj.addProperty( + entry.getKey(), (Character) entry.getValue()); + else { + JsonElement jsonElement = gson.toJsonTree(entry.getValue()); + if (jsonElement.isJsonArray()) { + obj.add(entry.getKey(), jsonElement.getAsJsonArray()); + } else { + obj.add(entry.getKey(), jsonElement.getAsJsonObject()); + } + } + } + } + elementAdapter.write(out, obj); + } + + @Override + public CreateConversationRequest read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // store additional fields in the deserialized instance + CreateConversationRequest instance = thisAdapter.fromJsonTree(jsonObj); + for (Map.Entry entry : jsonObj.entrySet()) { + if (!openapiFields.contains(entry.getKey())) { + if (entry.getValue().isJsonPrimitive()) { // primitive type + if (entry.getValue().getAsJsonPrimitive().isString()) + instance.putAdditionalProperty( + entry.getKey(), entry.getValue().getAsString()); + else if (entry.getValue().getAsJsonPrimitive().isNumber()) + instance.putAdditionalProperty( + entry.getKey(), entry.getValue().getAsNumber()); + else if (entry.getValue().getAsJsonPrimitive().isBoolean()) + instance.putAdditionalProperty( + entry.getKey(), + entry.getValue().getAsBoolean()); + else + throw new IllegalArgumentException( + String.format( + "The field `%s` has unknown primitive" + + " type. Value: %s", + entry.getKey(), + entry.getValue().toString())); + } else if (entry.getValue().isJsonArray()) { + instance.putAdditionalProperty( + entry.getKey(), + gson.fromJson(entry.getValue(), List.class)); + } else { // JSON object + instance.putAdditionalProperty( + entry.getKey(), + gson.fromJson(entry.getValue(), HashMap.class)); + } + } + } + return instance; + } + }.nullSafe(); + } + } + + /** + * Create an instance of CreateConversationRequest given an JSON string + * + * @param jsonString JSON string + * @return An instance of CreateConversationRequest + * @throws IOException if the JSON string is invalid with respect to CreateConversationRequest + */ + public static CreateConversationRequest fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, CreateConversationRequest.class); + } + + /** + * Convert an instance of CreateConversationRequest to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} diff --git a/sdks/java/src/main/java/com/thoughtspot/client/model/CreateCustomActionRequest.java b/sdks/java/src/main/java/com/thoughtspot/client/model/CreateCustomActionRequest.java new file mode 100644 index 000000000..6fe5175a7 --- /dev/null +++ b/sdks/java/src/main/java/com/thoughtspot/client/model/CreateCustomActionRequest.java @@ -0,0 +1,494 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client.model; + +import com.google.gson.Gson; +import com.google.gson.JsonArray; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.TypeAdapter; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.annotations.SerializedName; +import com.google.gson.reflect.TypeToken; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import com.thoughtspot.client.JSON; +import java.io.IOException; +import java.io.Serializable; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Objects; + +/** CreateCustomActionRequest */ +@javax.annotation.Generated( + value = "org.openapitools.codegen.languages.JavaClientCodegen", + comments = "Generator version: 7.12.0") +public class CreateCustomActionRequest implements Serializable { + private static final long serialVersionUID = 1L; + + public static final String SERIALIZED_NAME_NAME = "name"; + + @SerializedName(SERIALIZED_NAME_NAME) + @javax.annotation.Nonnull + private String name; + + public static final String SERIALIZED_NAME_ACTION_DETAILS = "action_details"; + + @SerializedName(SERIALIZED_NAME_ACTION_DETAILS) + @javax.annotation.Nonnull + private ActionDetailsInputCreate actionDetails; + + public static final String SERIALIZED_NAME_ASSOCIATE_METADATA = "associate_metadata"; + + @SerializedName(SERIALIZED_NAME_ASSOCIATE_METADATA) + @javax.annotation.Nullable + private List associateMetadata; + + public static final String SERIALIZED_NAME_DEFAULT_ACTION_CONFIG = "default_action_config"; + + @SerializedName(SERIALIZED_NAME_DEFAULT_ACTION_CONFIG) + @javax.annotation.Nullable + private DefaultActionConfigInputCreate defaultActionConfig; + + public static final String SERIALIZED_NAME_GROUP_IDENTIFIERS = "group_identifiers"; + + @SerializedName(SERIALIZED_NAME_GROUP_IDENTIFIERS) + @javax.annotation.Nullable + private List groupIdentifiers; + + public CreateCustomActionRequest() {} + + public CreateCustomActionRequest name(@javax.annotation.Nonnull String name) { + this.name = name; + return this; + } + + /** + * Name of the custom action. The custom action name must be unique. + * + * @return name + */ + @javax.annotation.Nonnull + public String getName() { + return name; + } + + public void setName(@javax.annotation.Nonnull String name) { + this.name = name; + } + + public CreateCustomActionRequest actionDetails( + @javax.annotation.Nonnull ActionDetailsInputCreate actionDetails) { + this.actionDetails = actionDetails; + return this; + } + + /** + * Action details includes `Type` and Configuration data for Custom Actions, either + * Callback or URL is required. + * + * @return actionDetails + */ + @javax.annotation.Nonnull + public ActionDetailsInputCreate getActionDetails() { + return actionDetails; + } + + public void setActionDetails(@javax.annotation.Nonnull ActionDetailsInputCreate actionDetails) { + this.actionDetails = actionDetails; + } + + public CreateCustomActionRequest associateMetadata( + @javax.annotation.Nullable List associateMetadata) { + this.associateMetadata = associateMetadata; + return this; + } + + public CreateCustomActionRequest addAssociateMetadataItem( + AssociateMetadataInputCreate associateMetadataItem) { + if (this.associateMetadata == null) { + this.associateMetadata = new ArrayList<>(); + } + this.associateMetadata.add(associateMetadataItem); + return this; + } + + /** + * Metadata objects to which the custom action needs to be associated. + * + * @return associateMetadata + */ + @javax.annotation.Nullable + public List getAssociateMetadata() { + return associateMetadata; + } + + public void setAssociateMetadata( + @javax.annotation.Nullable List associateMetadata) { + this.associateMetadata = associateMetadata; + } + + public CreateCustomActionRequest defaultActionConfig( + @javax.annotation.Nullable DefaultActionConfigInputCreate defaultActionConfig) { + this.defaultActionConfig = defaultActionConfig; + return this; + } + + /** + * Default Custom action configuration. This includes if the custom action is available on all + * visualizations. By default, a custom action is added to all visualizations and Answers. + * + * @return defaultActionConfig + */ + @javax.annotation.Nullable + public DefaultActionConfigInputCreate getDefaultActionConfig() { + return defaultActionConfig; + } + + public void setDefaultActionConfig( + @javax.annotation.Nullable DefaultActionConfigInputCreate defaultActionConfig) { + this.defaultActionConfig = defaultActionConfig; + } + + public CreateCustomActionRequest groupIdentifiers( + @javax.annotation.Nullable List groupIdentifiers) { + this.groupIdentifiers = groupIdentifiers; + return this; + } + + public CreateCustomActionRequest addGroupIdentifiersItem(String groupIdentifiersItem) { + if (this.groupIdentifiers == null) { + this.groupIdentifiers = new ArrayList<>(); + } + this.groupIdentifiers.add(groupIdentifiersItem); + return this; + } + + /** + * Unique ID or name of the groups that can view and access the custom action. + * + * @return groupIdentifiers + */ + @javax.annotation.Nullable + public List getGroupIdentifiers() { + return groupIdentifiers; + } + + public void setGroupIdentifiers(@javax.annotation.Nullable List groupIdentifiers) { + this.groupIdentifiers = groupIdentifiers; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key name of the property + * @param value value of the property + * @return the CreateCustomActionRequest instance itself + */ + public CreateCustomActionRequest putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return a map of objects + */ + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key name of the property + * @return an object + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + CreateCustomActionRequest createCustomActionRequest = (CreateCustomActionRequest) o; + return Objects.equals(this.name, createCustomActionRequest.name) + && Objects.equals(this.actionDetails, createCustomActionRequest.actionDetails) + && Objects.equals( + this.associateMetadata, createCustomActionRequest.associateMetadata) + && Objects.equals( + this.defaultActionConfig, createCustomActionRequest.defaultActionConfig) + && Objects.equals(this.groupIdentifiers, createCustomActionRequest.groupIdentifiers) + && Objects.equals( + this.additionalProperties, createCustomActionRequest.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash( + name, + actionDetails, + associateMetadata, + defaultActionConfig, + groupIdentifiers, + additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class CreateCustomActionRequest {\n"); + sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append(" actionDetails: ").append(toIndentedString(actionDetails)).append("\n"); + sb.append(" associateMetadata: ") + .append(toIndentedString(associateMetadata)) + .append("\n"); + sb.append(" defaultActionConfig: ") + .append(toIndentedString(defaultActionConfig)) + .append("\n"); + sb.append(" groupIdentifiers: ").append(toIndentedString(groupIdentifiers)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first + * line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("name"); + openapiFields.add("action_details"); + openapiFields.add("associate_metadata"); + openapiFields.add("default_action_config"); + openapiFields.add("group_identifiers"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + openapiRequiredFields.add("name"); + openapiRequiredFields.add("action_details"); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to CreateCustomActionRequest + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!CreateCustomActionRequest.openapiRequiredFields + .isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException( + String.format( + "The required field(s) %s in CreateCustomActionRequest is not" + + " found in the empty JSON string", + CreateCustomActionRequest.openapiRequiredFields.toString())); + } + } + + // check to make sure all required properties/fields are present in the JSON string + for (String requiredField : CreateCustomActionRequest.openapiRequiredFields) { + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException( + String.format( + "The required field `%s` is not found in the JSON string: %s", + requiredField, jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if (!jsonObj.get("name").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `name` to be a primitive type in the JSON string" + + " but got `%s`", + jsonObj.get("name").toString())); + } + // validate the required field `action_details` + ActionDetailsInputCreate.validateJsonElement(jsonObj.get("action_details")); + if (jsonObj.get("associate_metadata") != null + && !jsonObj.get("associate_metadata").isJsonNull()) { + JsonArray jsonArrayassociateMetadata = jsonObj.getAsJsonArray("associate_metadata"); + if (jsonArrayassociateMetadata != null) { + // ensure the json data is an array + if (!jsonObj.get("associate_metadata").isJsonArray()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `associate_metadata` to be an array in the" + + " JSON string but got `%s`", + jsonObj.get("associate_metadata").toString())); + } + + // validate the optional field `associate_metadata` (array) + for (int i = 0; i < jsonArrayassociateMetadata.size(); i++) { + AssociateMetadataInputCreate.validateJsonElement( + jsonArrayassociateMetadata.get(i)); + } + ; + } + } + // validate the optional field `default_action_config` + if (jsonObj.get("default_action_config") != null + && !jsonObj.get("default_action_config").isJsonNull()) { + DefaultActionConfigInputCreate.validateJsonElement( + jsonObj.get("default_action_config")); + } + // ensure the optional json data is an array if present + if (jsonObj.get("group_identifiers") != null + && !jsonObj.get("group_identifiers").isJsonNull() + && !jsonObj.get("group_identifiers").isJsonArray()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `group_identifiers` to be an array in the JSON" + + " string but got `%s`", + jsonObj.get("group_identifiers").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!CreateCustomActionRequest.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'CreateCustomActionRequest' and its + // subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter = + gson.getDelegateAdapter(this, TypeToken.get(CreateCustomActionRequest.class)); + + return (TypeAdapter) + new TypeAdapter() { + @Override + public void write(JsonWriter out, CreateCustomActionRequest value) + throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + obj.remove("additionalProperties"); + // serialize additional properties + if (value.getAdditionalProperties() != null) { + for (Map.Entry entry : + value.getAdditionalProperties().entrySet()) { + if (entry.getValue() instanceof String) + obj.addProperty(entry.getKey(), (String) entry.getValue()); + else if (entry.getValue() instanceof Number) + obj.addProperty(entry.getKey(), (Number) entry.getValue()); + else if (entry.getValue() instanceof Boolean) + obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); + else if (entry.getValue() instanceof Character) + obj.addProperty( + entry.getKey(), (Character) entry.getValue()); + else { + JsonElement jsonElement = gson.toJsonTree(entry.getValue()); + if (jsonElement.isJsonArray()) { + obj.add(entry.getKey(), jsonElement.getAsJsonArray()); + } else { + obj.add(entry.getKey(), jsonElement.getAsJsonObject()); + } + } + } + } + elementAdapter.write(out, obj); + } + + @Override + public CreateCustomActionRequest read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // store additional fields in the deserialized instance + CreateCustomActionRequest instance = thisAdapter.fromJsonTree(jsonObj); + for (Map.Entry entry : jsonObj.entrySet()) { + if (!openapiFields.contains(entry.getKey())) { + if (entry.getValue().isJsonPrimitive()) { // primitive type + if (entry.getValue().getAsJsonPrimitive().isString()) + instance.putAdditionalProperty( + entry.getKey(), entry.getValue().getAsString()); + else if (entry.getValue().getAsJsonPrimitive().isNumber()) + instance.putAdditionalProperty( + entry.getKey(), entry.getValue().getAsNumber()); + else if (entry.getValue().getAsJsonPrimitive().isBoolean()) + instance.putAdditionalProperty( + entry.getKey(), + entry.getValue().getAsBoolean()); + else + throw new IllegalArgumentException( + String.format( + "The field `%s` has unknown primitive" + + " type. Value: %s", + entry.getKey(), + entry.getValue().toString())); + } else if (entry.getValue().isJsonArray()) { + instance.putAdditionalProperty( + entry.getKey(), + gson.fromJson(entry.getValue(), List.class)); + } else { // JSON object + instance.putAdditionalProperty( + entry.getKey(), + gson.fromJson(entry.getValue(), HashMap.class)); + } + } + } + return instance; + } + }.nullSafe(); + } + } + + /** + * Create an instance of CreateCustomActionRequest given an JSON string + * + * @param jsonString JSON string + * @return An instance of CreateCustomActionRequest + * @throws IOException if the JSON string is invalid with respect to CreateCustomActionRequest + */ + public static CreateCustomActionRequest fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, CreateCustomActionRequest.class); + } + + /** + * Convert an instance of CreateCustomActionRequest to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} diff --git a/sdks/java/src/main/java/com/thoughtspot/client/model/CreateEmailCustomizationRequest.java b/sdks/java/src/main/java/com/thoughtspot/client/model/CreateEmailCustomizationRequest.java new file mode 100644 index 000000000..748caa8e4 --- /dev/null +++ b/sdks/java/src/main/java/com/thoughtspot/client/model/CreateEmailCustomizationRequest.java @@ -0,0 +1,347 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client.model; + +import com.google.gson.Gson; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.TypeAdapter; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.annotations.SerializedName; +import com.google.gson.reflect.TypeToken; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import com.thoughtspot.client.JSON; +import java.io.IOException; +import java.io.Serializable; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Objects; + +/** CreateEmailCustomizationRequest */ +@javax.annotation.Generated( + value = "org.openapitools.codegen.languages.JavaClientCodegen", + comments = "Generator version: 7.12.0") +public class CreateEmailCustomizationRequest implements Serializable { + private static final long serialVersionUID = 1L; + + public static final String SERIALIZED_NAME_TEMPLATE_PROPERTIES = "template_properties"; + + @SerializedName(SERIALIZED_NAME_TEMPLATE_PROPERTIES) + @javax.annotation.Nonnull + private TemplatePropertiesInputCreate templateProperties; + + public static final String SERIALIZED_NAME_ORG_IDENTIFIER = "org_identifier"; + + @SerializedName(SERIALIZED_NAME_ORG_IDENTIFIER) + @javax.annotation.Nullable + private String orgIdentifier; + + public CreateEmailCustomizationRequest() {} + + public CreateEmailCustomizationRequest templateProperties( + @javax.annotation.Nonnull TemplatePropertiesInputCreate templateProperties) { + this.templateProperties = templateProperties; + return this; + } + + /** + * Email customization configuration as key value pair + * + * @return templateProperties + */ + @javax.annotation.Nonnull + public TemplatePropertiesInputCreate getTemplateProperties() { + return templateProperties; + } + + public void setTemplateProperties( + @javax.annotation.Nonnull TemplatePropertiesInputCreate templateProperties) { + this.templateProperties = templateProperties; + } + + public CreateEmailCustomizationRequest orgIdentifier( + @javax.annotation.Nullable String orgIdentifier) { + this.orgIdentifier = orgIdentifier; + return this; + } + + /** + * Unique ID or name of org Version: 10.12.0.cl or later + * + * @return orgIdentifier + */ + @javax.annotation.Nullable + public String getOrgIdentifier() { + return orgIdentifier; + } + + public void setOrgIdentifier(@javax.annotation.Nullable String orgIdentifier) { + this.orgIdentifier = orgIdentifier; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key name of the property + * @param value value of the property + * @return the CreateEmailCustomizationRequest instance itself + */ + public CreateEmailCustomizationRequest putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return a map of objects + */ + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key name of the property + * @return an object + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + CreateEmailCustomizationRequest createEmailCustomizationRequest = + (CreateEmailCustomizationRequest) o; + return Objects.equals( + this.templateProperties, createEmailCustomizationRequest.templateProperties) + && Objects.equals(this.orgIdentifier, createEmailCustomizationRequest.orgIdentifier) + && Objects.equals( + this.additionalProperties, + createEmailCustomizationRequest.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(templateProperties, orgIdentifier, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class CreateEmailCustomizationRequest {\n"); + sb.append(" templateProperties: ") + .append(toIndentedString(templateProperties)) + .append("\n"); + sb.append(" orgIdentifier: ").append(toIndentedString(orgIdentifier)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first + * line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("template_properties"); + openapiFields.add("org_identifier"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + openapiRequiredFields.add("template_properties"); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to + * CreateEmailCustomizationRequest + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!CreateEmailCustomizationRequest.openapiRequiredFields + .isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException( + String.format( + "The required field(s) %s in CreateEmailCustomizationRequest is" + + " not found in the empty JSON string", + CreateEmailCustomizationRequest.openapiRequiredFields.toString())); + } + } + + // check to make sure all required properties/fields are present in the JSON string + for (String requiredField : CreateEmailCustomizationRequest.openapiRequiredFields) { + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException( + String.format( + "The required field `%s` is not found in the JSON string: %s", + requiredField, jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // validate the required field `template_properties` + TemplatePropertiesInputCreate.validateJsonElement(jsonObj.get("template_properties")); + if ((jsonObj.get("org_identifier") != null && !jsonObj.get("org_identifier").isJsonNull()) + && !jsonObj.get("org_identifier").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `org_identifier` to be a primitive type in the" + + " JSON string but got `%s`", + jsonObj.get("org_identifier").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!CreateEmailCustomizationRequest.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'CreateEmailCustomizationRequest' and its + // subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter = + gson.getDelegateAdapter( + this, TypeToken.get(CreateEmailCustomizationRequest.class)); + + return (TypeAdapter) + new TypeAdapter() { + @Override + public void write(JsonWriter out, CreateEmailCustomizationRequest value) + throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + obj.remove("additionalProperties"); + // serialize additional properties + if (value.getAdditionalProperties() != null) { + for (Map.Entry entry : + value.getAdditionalProperties().entrySet()) { + if (entry.getValue() instanceof String) + obj.addProperty(entry.getKey(), (String) entry.getValue()); + else if (entry.getValue() instanceof Number) + obj.addProperty(entry.getKey(), (Number) entry.getValue()); + else if (entry.getValue() instanceof Boolean) + obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); + else if (entry.getValue() instanceof Character) + obj.addProperty( + entry.getKey(), (Character) entry.getValue()); + else { + JsonElement jsonElement = gson.toJsonTree(entry.getValue()); + if (jsonElement.isJsonArray()) { + obj.add(entry.getKey(), jsonElement.getAsJsonArray()); + } else { + obj.add(entry.getKey(), jsonElement.getAsJsonObject()); + } + } + } + } + elementAdapter.write(out, obj); + } + + @Override + public CreateEmailCustomizationRequest read(JsonReader in) + throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // store additional fields in the deserialized instance + CreateEmailCustomizationRequest instance = + thisAdapter.fromJsonTree(jsonObj); + for (Map.Entry entry : jsonObj.entrySet()) { + if (!openapiFields.contains(entry.getKey())) { + if (entry.getValue().isJsonPrimitive()) { // primitive type + if (entry.getValue().getAsJsonPrimitive().isString()) + instance.putAdditionalProperty( + entry.getKey(), entry.getValue().getAsString()); + else if (entry.getValue().getAsJsonPrimitive().isNumber()) + instance.putAdditionalProperty( + entry.getKey(), entry.getValue().getAsNumber()); + else if (entry.getValue().getAsJsonPrimitive().isBoolean()) + instance.putAdditionalProperty( + entry.getKey(), + entry.getValue().getAsBoolean()); + else + throw new IllegalArgumentException( + String.format( + "The field `%s` has unknown primitive" + + " type. Value: %s", + entry.getKey(), + entry.getValue().toString())); + } else if (entry.getValue().isJsonArray()) { + instance.putAdditionalProperty( + entry.getKey(), + gson.fromJson(entry.getValue(), List.class)); + } else { // JSON object + instance.putAdditionalProperty( + entry.getKey(), + gson.fromJson(entry.getValue(), HashMap.class)); + } + } + } + return instance; + } + }.nullSafe(); + } + } + + /** + * Create an instance of CreateEmailCustomizationRequest given an JSON string + * + * @param jsonString JSON string + * @return An instance of CreateEmailCustomizationRequest + * @throws IOException if the JSON string is invalid with respect to + * CreateEmailCustomizationRequest + */ + public static CreateEmailCustomizationRequest fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, CreateEmailCustomizationRequest.class); + } + + /** + * Convert an instance of CreateEmailCustomizationRequest to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} diff --git a/sdks/java/src/main/java/com/thoughtspot/client/model/CreateEmailCustomizationResponse.java b/sdks/java/src/main/java/com/thoughtspot/client/model/CreateEmailCustomizationResponse.java new file mode 100644 index 000000000..7b06614d9 --- /dev/null +++ b/sdks/java/src/main/java/com/thoughtspot/client/model/CreateEmailCustomizationResponse.java @@ -0,0 +1,411 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client.model; + +import com.google.gson.Gson; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.TypeAdapter; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.annotations.SerializedName; +import com.google.gson.reflect.TypeToken; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import com.thoughtspot.client.JSON; +import java.io.IOException; +import java.io.Serializable; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Objects; + +/** CreateEmailCustomizationResponse */ +@javax.annotation.Generated( + value = "org.openapitools.codegen.languages.JavaClientCodegen", + comments = "Generator version: 7.12.0") +public class CreateEmailCustomizationResponse implements Serializable { + private static final long serialVersionUID = 1L; + + public static final String SERIALIZED_NAME_TENANT_ID = "tenant_id"; + + @SerializedName(SERIALIZED_NAME_TENANT_ID) + @javax.annotation.Nonnull + private String tenantId; + + public static final String SERIALIZED_NAME_ORG = "org"; + + @SerializedName(SERIALIZED_NAME_ORG) + @javax.annotation.Nonnull + private OrgType org; + + public static final String SERIALIZED_NAME_NAME = "name"; + + @SerializedName(SERIALIZED_NAME_NAME) + @javax.annotation.Nonnull + private String name; + + public static final String SERIALIZED_NAME_TEMPLATE_PROPERTIES = "template_properties"; + + @SerializedName(SERIALIZED_NAME_TEMPLATE_PROPERTIES) + @javax.annotation.Nonnull + private Object templateProperties; + + public CreateEmailCustomizationResponse() {} + + public CreateEmailCustomizationResponse tenantId(@javax.annotation.Nonnull String tenantId) { + this.tenantId = tenantId; + return this; + } + + /** + * Tenant ID + * + * @return tenantId + */ + @javax.annotation.Nonnull + public String getTenantId() { + return tenantId; + } + + public void setTenantId(@javax.annotation.Nonnull String tenantId) { + this.tenantId = tenantId; + } + + public CreateEmailCustomizationResponse org(@javax.annotation.Nonnull OrgType org) { + this.org = org; + return this; + } + + /** + * Get org + * + * @return org + */ + @javax.annotation.Nonnull + public OrgType getOrg() { + return org; + } + + public void setOrg(@javax.annotation.Nonnull OrgType org) { + this.org = org; + } + + public CreateEmailCustomizationResponse name(@javax.annotation.Nonnull String name) { + this.name = name; + return this; + } + + /** + * Email customization name. + * + * @return name + */ + @javax.annotation.Nonnull + public String getName() { + return name; + } + + public void setName(@javax.annotation.Nonnull String name) { + this.name = name; + } + + public CreateEmailCustomizationResponse templateProperties( + @javax.annotation.Nonnull Object templateProperties) { + this.templateProperties = templateProperties; + return this; + } + + /** + * Customization configuration for the email + * + * @return templateProperties + */ + @javax.annotation.Nonnull + public Object getTemplateProperties() { + return templateProperties; + } + + public void setTemplateProperties(@javax.annotation.Nonnull Object templateProperties) { + this.templateProperties = templateProperties; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key name of the property + * @param value value of the property + * @return the CreateEmailCustomizationResponse instance itself + */ + public CreateEmailCustomizationResponse putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return a map of objects + */ + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key name of the property + * @return an object + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + CreateEmailCustomizationResponse createEmailCustomizationResponse = + (CreateEmailCustomizationResponse) o; + return Objects.equals(this.tenantId, createEmailCustomizationResponse.tenantId) + && Objects.equals(this.org, createEmailCustomizationResponse.org) + && Objects.equals(this.name, createEmailCustomizationResponse.name) + && Objects.equals( + this.templateProperties, + createEmailCustomizationResponse.templateProperties) + && Objects.equals( + this.additionalProperties, + createEmailCustomizationResponse.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(tenantId, org, name, templateProperties, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class CreateEmailCustomizationResponse {\n"); + sb.append(" tenantId: ").append(toIndentedString(tenantId)).append("\n"); + sb.append(" org: ").append(toIndentedString(org)).append("\n"); + sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append(" templateProperties: ") + .append(toIndentedString(templateProperties)) + .append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first + * line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("tenant_id"); + openapiFields.add("org"); + openapiFields.add("name"); + openapiFields.add("template_properties"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + openapiRequiredFields.add("tenant_id"); + openapiRequiredFields.add("org"); + openapiRequiredFields.add("name"); + openapiRequiredFields.add("template_properties"); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to + * CreateEmailCustomizationResponse + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!CreateEmailCustomizationResponse.openapiRequiredFields + .isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException( + String.format( + "The required field(s) %s in CreateEmailCustomizationResponse is" + + " not found in the empty JSON string", + CreateEmailCustomizationResponse.openapiRequiredFields.toString())); + } + } + + // check to make sure all required properties/fields are present in the JSON string + for (String requiredField : CreateEmailCustomizationResponse.openapiRequiredFields) { + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException( + String.format( + "The required field `%s` is not found in the JSON string: %s", + requiredField, jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if (!jsonObj.get("tenant_id").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `tenant_id` to be a primitive type in the JSON" + + " string but got `%s`", + jsonObj.get("tenant_id").toString())); + } + // validate the required field `org` + OrgType.validateJsonElement(jsonObj.get("org")); + if (!jsonObj.get("name").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `name` to be a primitive type in the JSON string" + + " but got `%s`", + jsonObj.get("name").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!CreateEmailCustomizationResponse.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'CreateEmailCustomizationResponse' and + // its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter = + gson.getDelegateAdapter( + this, TypeToken.get(CreateEmailCustomizationResponse.class)); + + return (TypeAdapter) + new TypeAdapter() { + @Override + public void write(JsonWriter out, CreateEmailCustomizationResponse value) + throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + obj.remove("additionalProperties"); + // serialize additional properties + if (value.getAdditionalProperties() != null) { + for (Map.Entry entry : + value.getAdditionalProperties().entrySet()) { + if (entry.getValue() instanceof String) + obj.addProperty(entry.getKey(), (String) entry.getValue()); + else if (entry.getValue() instanceof Number) + obj.addProperty(entry.getKey(), (Number) entry.getValue()); + else if (entry.getValue() instanceof Boolean) + obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); + else if (entry.getValue() instanceof Character) + obj.addProperty( + entry.getKey(), (Character) entry.getValue()); + else { + JsonElement jsonElement = gson.toJsonTree(entry.getValue()); + if (jsonElement.isJsonArray()) { + obj.add(entry.getKey(), jsonElement.getAsJsonArray()); + } else { + obj.add(entry.getKey(), jsonElement.getAsJsonObject()); + } + } + } + } + elementAdapter.write(out, obj); + } + + @Override + public CreateEmailCustomizationResponse read(JsonReader in) + throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // store additional fields in the deserialized instance + CreateEmailCustomizationResponse instance = + thisAdapter.fromJsonTree(jsonObj); + for (Map.Entry entry : jsonObj.entrySet()) { + if (!openapiFields.contains(entry.getKey())) { + if (entry.getValue().isJsonPrimitive()) { // primitive type + if (entry.getValue().getAsJsonPrimitive().isString()) + instance.putAdditionalProperty( + entry.getKey(), entry.getValue().getAsString()); + else if (entry.getValue().getAsJsonPrimitive().isNumber()) + instance.putAdditionalProperty( + entry.getKey(), entry.getValue().getAsNumber()); + else if (entry.getValue().getAsJsonPrimitive().isBoolean()) + instance.putAdditionalProperty( + entry.getKey(), + entry.getValue().getAsBoolean()); + else + throw new IllegalArgumentException( + String.format( + "The field `%s` has unknown primitive" + + " type. Value: %s", + entry.getKey(), + entry.getValue().toString())); + } else if (entry.getValue().isJsonArray()) { + instance.putAdditionalProperty( + entry.getKey(), + gson.fromJson(entry.getValue(), List.class)); + } else { // JSON object + instance.putAdditionalProperty( + entry.getKey(), + gson.fromJson(entry.getValue(), HashMap.class)); + } + } + } + return instance; + } + }.nullSafe(); + } + } + + /** + * Create an instance of CreateEmailCustomizationResponse given an JSON string + * + * @param jsonString JSON string + * @return An instance of CreateEmailCustomizationResponse + * @throws IOException if the JSON string is invalid with respect to + * CreateEmailCustomizationResponse + */ + public static CreateEmailCustomizationResponse fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, CreateEmailCustomizationResponse.class); + } + + /** + * Convert an instance of CreateEmailCustomizationResponse to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} diff --git a/sdks/java/src/main/java/com/thoughtspot/client/model/CreateOrgRequest.java b/sdks/java/src/main/java/com/thoughtspot/client/model/CreateOrgRequest.java new file mode 100644 index 000000000..75f625468 --- /dev/null +++ b/sdks/java/src/main/java/com/thoughtspot/client/model/CreateOrgRequest.java @@ -0,0 +1,337 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client.model; + +import com.google.gson.Gson; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.TypeAdapter; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.annotations.SerializedName; +import com.google.gson.reflect.TypeToken; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import com.thoughtspot.client.JSON; +import java.io.IOException; +import java.io.Serializable; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Objects; + +/** CreateOrgRequest */ +@javax.annotation.Generated( + value = "org.openapitools.codegen.languages.JavaClientCodegen", + comments = "Generator version: 7.12.0") +public class CreateOrgRequest implements Serializable { + private static final long serialVersionUID = 1L; + + public static final String SERIALIZED_NAME_NAME = "name"; + + @SerializedName(SERIALIZED_NAME_NAME) + @javax.annotation.Nonnull + private String name; + + public static final String SERIALIZED_NAME_DESCRIPTION = "description"; + + @SerializedName(SERIALIZED_NAME_DESCRIPTION) + @javax.annotation.Nullable + private String description; + + public CreateOrgRequest() {} + + public CreateOrgRequest name(@javax.annotation.Nonnull String name) { + this.name = name; + return this; + } + + /** + * Name of the Org. + * + * @return name + */ + @javax.annotation.Nonnull + public String getName() { + return name; + } + + public void setName(@javax.annotation.Nonnull String name) { + this.name = name; + } + + public CreateOrgRequest description(@javax.annotation.Nullable String description) { + this.description = description; + return this; + } + + /** + * Description of the Org. + * + * @return description + */ + @javax.annotation.Nullable + public String getDescription() { + return description; + } + + public void setDescription(@javax.annotation.Nullable String description) { + this.description = description; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key name of the property + * @param value value of the property + * @return the CreateOrgRequest instance itself + */ + public CreateOrgRequest putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return a map of objects + */ + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key name of the property + * @return an object + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + CreateOrgRequest createOrgRequest = (CreateOrgRequest) o; + return Objects.equals(this.name, createOrgRequest.name) + && Objects.equals(this.description, createOrgRequest.description) + && Objects.equals(this.additionalProperties, createOrgRequest.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(name, description, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class CreateOrgRequest {\n"); + sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append(" description: ").append(toIndentedString(description)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first + * line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("name"); + openapiFields.add("description"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + openapiRequiredFields.add("name"); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to CreateOrgRequest + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!CreateOrgRequest.openapiRequiredFields + .isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException( + String.format( + "The required field(s) %s in CreateOrgRequest is not found in the" + + " empty JSON string", + CreateOrgRequest.openapiRequiredFields.toString())); + } + } + + // check to make sure all required properties/fields are present in the JSON string + for (String requiredField : CreateOrgRequest.openapiRequiredFields) { + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException( + String.format( + "The required field `%s` is not found in the JSON string: %s", + requiredField, jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if (!jsonObj.get("name").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `name` to be a primitive type in the JSON string" + + " but got `%s`", + jsonObj.get("name").toString())); + } + if ((jsonObj.get("description") != null && !jsonObj.get("description").isJsonNull()) + && !jsonObj.get("description").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `description` to be a primitive type in the JSON" + + " string but got `%s`", + jsonObj.get("description").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!CreateOrgRequest.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'CreateOrgRequest' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter = + gson.getDelegateAdapter(this, TypeToken.get(CreateOrgRequest.class)); + + return (TypeAdapter) + new TypeAdapter() { + @Override + public void write(JsonWriter out, CreateOrgRequest value) + throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + obj.remove("additionalProperties"); + // serialize additional properties + if (value.getAdditionalProperties() != null) { + for (Map.Entry entry : + value.getAdditionalProperties().entrySet()) { + if (entry.getValue() instanceof String) + obj.addProperty(entry.getKey(), (String) entry.getValue()); + else if (entry.getValue() instanceof Number) + obj.addProperty(entry.getKey(), (Number) entry.getValue()); + else if (entry.getValue() instanceof Boolean) + obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); + else if (entry.getValue() instanceof Character) + obj.addProperty( + entry.getKey(), (Character) entry.getValue()); + else { + JsonElement jsonElement = gson.toJsonTree(entry.getValue()); + if (jsonElement.isJsonArray()) { + obj.add(entry.getKey(), jsonElement.getAsJsonArray()); + } else { + obj.add(entry.getKey(), jsonElement.getAsJsonObject()); + } + } + } + } + elementAdapter.write(out, obj); + } + + @Override + public CreateOrgRequest read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // store additional fields in the deserialized instance + CreateOrgRequest instance = thisAdapter.fromJsonTree(jsonObj); + for (Map.Entry entry : jsonObj.entrySet()) { + if (!openapiFields.contains(entry.getKey())) { + if (entry.getValue().isJsonPrimitive()) { // primitive type + if (entry.getValue().getAsJsonPrimitive().isString()) + instance.putAdditionalProperty( + entry.getKey(), entry.getValue().getAsString()); + else if (entry.getValue().getAsJsonPrimitive().isNumber()) + instance.putAdditionalProperty( + entry.getKey(), entry.getValue().getAsNumber()); + else if (entry.getValue().getAsJsonPrimitive().isBoolean()) + instance.putAdditionalProperty( + entry.getKey(), + entry.getValue().getAsBoolean()); + else + throw new IllegalArgumentException( + String.format( + "The field `%s` has unknown primitive" + + " type. Value: %s", + entry.getKey(), + entry.getValue().toString())); + } else if (entry.getValue().isJsonArray()) { + instance.putAdditionalProperty( + entry.getKey(), + gson.fromJson(entry.getValue(), List.class)); + } else { // JSON object + instance.putAdditionalProperty( + entry.getKey(), + gson.fromJson(entry.getValue(), HashMap.class)); + } + } + } + return instance; + } + }.nullSafe(); + } + } + + /** + * Create an instance of CreateOrgRequest given an JSON string + * + * @param jsonString JSON string + * @return An instance of CreateOrgRequest + * @throws IOException if the JSON string is invalid with respect to CreateOrgRequest + */ + public static CreateOrgRequest fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, CreateOrgRequest.class); + } + + /** + * Convert an instance of CreateOrgRequest to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} diff --git a/sdks/java/src/main/java/com/thoughtspot/client/model/CreateRoleRequest.java b/sdks/java/src/main/java/com/thoughtspot/client/model/CreateRoleRequest.java new file mode 100644 index 000000000..e1358a122 --- /dev/null +++ b/sdks/java/src/main/java/com/thoughtspot/client/model/CreateRoleRequest.java @@ -0,0 +1,567 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client.model; + +import com.google.gson.Gson; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.TypeAdapter; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.reflect.TypeToken; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import com.thoughtspot.client.JSON; +import java.io.IOException; +import java.io.Serializable; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Objects; +import org.openapitools.jackson.nullable.JsonNullable; + +/** CreateRoleRequest */ +@javax.annotation.Generated( + value = "org.openapitools.codegen.languages.JavaClientCodegen", + comments = "Generator version: 7.12.0") +public class CreateRoleRequest implements Serializable { + private static final long serialVersionUID = 1L; + + public static final String SERIALIZED_NAME_NAME = "name"; + + @SerializedName(SERIALIZED_NAME_NAME) + @javax.annotation.Nonnull + private String name; + + public static final String SERIALIZED_NAME_DESCRIPTION = "description"; + + @SerializedName(SERIALIZED_NAME_DESCRIPTION) + @javax.annotation.Nullable + private String description; + + /** Gets or Sets privileges */ + @JsonAdapter(PrivilegesEnum.Adapter.class) + public enum PrivilegesEnum { + USERDATAUPLOADING("USERDATAUPLOADING"), + + DATADOWNLOADING("DATADOWNLOADING"), + + DATAMANAGEMENT("DATAMANAGEMENT"), + + SHAREWITHALL("SHAREWITHALL"), + + JOBSCHEDULING("JOBSCHEDULING"), + + A3_ANALYSIS("A3ANALYSIS"), + + BYPASSRLS("BYPASSRLS"), + + DISABLE_PINBOARD_CREATION("DISABLE_PINBOARD_CREATION"), + + DEVELOPER("DEVELOPER"), + + APPLICATION_ADMINISTRATION("APPLICATION_ADMINISTRATION"), + + USER_ADMINISTRATION("USER_ADMINISTRATION"), + + GROUP_ADMINISTRATION("GROUP_ADMINISTRATION"), + + SYSTEM_INFO_ADMINISTRATION("SYSTEM_INFO_ADMINISTRATION"), + + SYNCMANAGEMENT("SYNCMANAGEMENT"), + + ORG_ADMINISTRATION("ORG_ADMINISTRATION"), + + ROLE_ADMINISTRATION("ROLE_ADMINISTRATION"), + + AUTHENTICATION_ADMINISTRATION("AUTHENTICATION_ADMINISTRATION"), + + BILLING_INFO_ADMINISTRATION("BILLING_INFO_ADMINISTRATION"), + + CONTROL_TRUSTED_AUTH("CONTROL_TRUSTED_AUTH"), + + TAGMANAGEMENT("TAGMANAGEMENT"), + + LIVEBOARD_VERIFIER("LIVEBOARD_VERIFIER"), + + CAN_MANAGE_CUSTOM_CALENDAR("CAN_MANAGE_CUSTOM_CALENDAR"), + + CAN_CREATE_OR_EDIT_CONNECTIONS("CAN_CREATE_OR_EDIT_CONNECTIONS"), + + CAN_MANAGE_WORKSHEET_VIEWS_TABLES("CAN_MANAGE_WORKSHEET_VIEWS_TABLES"), + + CAN_MANAGE_VERSION_CONTROL("CAN_MANAGE_VERSION_CONTROL"), + + THIRDPARTY_ANALYSIS("THIRDPARTY_ANALYSIS"), + + CAN_CREATE_CATALOG("CAN_CREATE_CATALOG"), + + ALLOW_NON_EMBED_FULL_APP_ACCESS("ALLOW_NON_EMBED_FULL_APP_ACCESS"), + + CAN_ACCESS_ANALYST_STUDIO("CAN_ACCESS_ANALYST_STUDIO"), + + CAN_MANAGE_ANALYST_STUDIO("CAN_MANAGE_ANALYST_STUDIO"), + + PREVIEW_DOCUMENT_SEARCH("PREVIEW_DOCUMENT_SEARCH"), + + CAN_MANAGE_VARIABLES("CAN_MANAGE_VARIABLES"), + + CAN_MODIFY_FOLDERS("CAN_MODIFY_FOLDERS"), + + CAN_VIEW_FOLDERS("CAN_VIEW_FOLDERS"), + + CAN_MANAGE_AGENTSPOT("CAN_MANAGE_AGENTSPOT"), + + CAN_ACCESS_AGENTSPOT("CAN_ACCESS_AGENTSPOT"), + + CAN_SETUP_VERSION_CONTROL("CAN_SETUP_VERSION_CONTROL"), + + PREVIEW_THOUGHTSPOT_SAGE("PREVIEW_THOUGHTSPOT_SAGE"), + + CAN_MANAGE_WEBHOOKS("CAN_MANAGE_WEBHOOKS"), + + CAN_DOWNLOAD_VISUALS("CAN_DOWNLOAD_VISUALS"), + + CAN_DOWNLOAD_DETAILED_DATA("CAN_DOWNLOAD_DETAILED_DATA"), + + CAN_USE_SPOTTER("CAN_USE_SPOTTER"); + + private String value; + + PrivilegesEnum(String value) { + this.value = value; + } + + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + public static PrivilegesEnum fromValue(String value) { + for (PrivilegesEnum b : PrivilegesEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + + public static class Adapter extends TypeAdapter { + @Override + public void write(final JsonWriter jsonWriter, final PrivilegesEnum enumeration) + throws IOException { + jsonWriter.value(enumeration.getValue()); + } + + @Override + public PrivilegesEnum read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + return PrivilegesEnum.fromValue(value); + } + } + + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + String value = jsonElement.getAsString(); + PrivilegesEnum.fromValue(value); + } + } + + public static final String SERIALIZED_NAME_PRIVILEGES = "privileges"; + + @SerializedName(SERIALIZED_NAME_PRIVILEGES) + @javax.annotation.Nullable + private List privileges; + + public static final String SERIALIZED_NAME_READ_ONLY = "read_only"; + + @SerializedName(SERIALIZED_NAME_READ_ONLY) + @javax.annotation.Nullable + private Boolean readOnly = false; + + public CreateRoleRequest() {} + + public CreateRoleRequest name(@javax.annotation.Nonnull String name) { + this.name = name; + return this; + } + + /** + * Unique name of the Role. + * + * @return name + */ + @javax.annotation.Nonnull + public String getName() { + return name; + } + + public void setName(@javax.annotation.Nonnull String name) { + this.name = name; + } + + public CreateRoleRequest description(@javax.annotation.Nullable String description) { + this.description = description; + return this; + } + + /** + * Description of the Role. + * + * @return description + */ + @javax.annotation.Nullable + public String getDescription() { + return description; + } + + public void setDescription(@javax.annotation.Nullable String description) { + this.description = description; + } + + public CreateRoleRequest privileges( + @javax.annotation.Nullable List privileges) { + this.privileges = privileges; + return this; + } + + public CreateRoleRequest addPrivilegesItem(PrivilegesEnum privilegesItem) { + if (this.privileges == null) { + this.privileges = new ArrayList<>(); + } + this.privileges.add(privilegesItem); + return this; + } + + /** + * Privileges granted to the Role. See + * [Documentation](https://developers.thoughtspot.com/docs/rbac#_role_categories_and_privileges)for + * supported roles privileges. + * + * @return privileges + */ + @javax.annotation.Nullable + public List getPrivileges() { + return privileges; + } + + public void setPrivileges(@javax.annotation.Nullable List privileges) { + this.privileges = privileges; + } + + public CreateRoleRequest readOnly(@javax.annotation.Nullable Boolean readOnly) { + this.readOnly = readOnly; + return this; + } + + /** + * <div>Version: 10.5.0.cl or later </div> Indicates whether the role is read only. + * A readonly role can neither be updated nor deleted. + * + * @return readOnly + */ + @javax.annotation.Nullable + public Boolean getReadOnly() { + return readOnly; + } + + public void setReadOnly(@javax.annotation.Nullable Boolean readOnly) { + this.readOnly = readOnly; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key name of the property + * @param value value of the property + * @return the CreateRoleRequest instance itself + */ + public CreateRoleRequest putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return a map of objects + */ + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key name of the property + * @return an object + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + CreateRoleRequest createRoleRequest = (CreateRoleRequest) o; + return Objects.equals(this.name, createRoleRequest.name) + && Objects.equals(this.description, createRoleRequest.description) + && Objects.equals(this.privileges, createRoleRequest.privileges) + && Objects.equals(this.readOnly, createRoleRequest.readOnly) + && Objects.equals( + this.additionalProperties, createRoleRequest.additionalProperties); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b + || (a != null + && b != null + && a.isPresent() + && b.isPresent() + && Objects.deepEquals(a.get(), b.get())); + } + + @Override + public int hashCode() { + return Objects.hash(name, description, privileges, readOnly, additionalProperties); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; + } + return a.isPresent() ? Arrays.deepHashCode(new Object[] {a.get()}) : 31; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class CreateRoleRequest {\n"); + sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append(" description: ").append(toIndentedString(description)).append("\n"); + sb.append(" privileges: ").append(toIndentedString(privileges)).append("\n"); + sb.append(" readOnly: ").append(toIndentedString(readOnly)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first + * line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("name"); + openapiFields.add("description"); + openapiFields.add("privileges"); + openapiFields.add("read_only"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + openapiRequiredFields.add("name"); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to CreateRoleRequest + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!CreateRoleRequest.openapiRequiredFields + .isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException( + String.format( + "The required field(s) %s in CreateRoleRequest is not found in the" + + " empty JSON string", + CreateRoleRequest.openapiRequiredFields.toString())); + } + } + + // check to make sure all required properties/fields are present in the JSON string + for (String requiredField : CreateRoleRequest.openapiRequiredFields) { + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException( + String.format( + "The required field `%s` is not found in the JSON string: %s", + requiredField, jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if (!jsonObj.get("name").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `name` to be a primitive type in the JSON string" + + " but got `%s`", + jsonObj.get("name").toString())); + } + if ((jsonObj.get("description") != null && !jsonObj.get("description").isJsonNull()) + && !jsonObj.get("description").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `description` to be a primitive type in the JSON" + + " string but got `%s`", + jsonObj.get("description").toString())); + } + // ensure the optional json data is an array if present + if (jsonObj.get("privileges") != null + && !jsonObj.get("privileges").isJsonNull() + && !jsonObj.get("privileges").isJsonArray()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `privileges` to be an array in the JSON string but" + + " got `%s`", + jsonObj.get("privileges").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!CreateRoleRequest.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'CreateRoleRequest' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter = + gson.getDelegateAdapter(this, TypeToken.get(CreateRoleRequest.class)); + + return (TypeAdapter) + new TypeAdapter() { + @Override + public void write(JsonWriter out, CreateRoleRequest value) + throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + obj.remove("additionalProperties"); + // serialize additional properties + if (value.getAdditionalProperties() != null) { + for (Map.Entry entry : + value.getAdditionalProperties().entrySet()) { + if (entry.getValue() instanceof String) + obj.addProperty(entry.getKey(), (String) entry.getValue()); + else if (entry.getValue() instanceof Number) + obj.addProperty(entry.getKey(), (Number) entry.getValue()); + else if (entry.getValue() instanceof Boolean) + obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); + else if (entry.getValue() instanceof Character) + obj.addProperty( + entry.getKey(), (Character) entry.getValue()); + else { + JsonElement jsonElement = gson.toJsonTree(entry.getValue()); + if (jsonElement.isJsonArray()) { + obj.add(entry.getKey(), jsonElement.getAsJsonArray()); + } else { + obj.add(entry.getKey(), jsonElement.getAsJsonObject()); + } + } + } + } + elementAdapter.write(out, obj); + } + + @Override + public CreateRoleRequest read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // store additional fields in the deserialized instance + CreateRoleRequest instance = thisAdapter.fromJsonTree(jsonObj); + for (Map.Entry entry : jsonObj.entrySet()) { + if (!openapiFields.contains(entry.getKey())) { + if (entry.getValue().isJsonPrimitive()) { // primitive type + if (entry.getValue().getAsJsonPrimitive().isString()) + instance.putAdditionalProperty( + entry.getKey(), entry.getValue().getAsString()); + else if (entry.getValue().getAsJsonPrimitive().isNumber()) + instance.putAdditionalProperty( + entry.getKey(), entry.getValue().getAsNumber()); + else if (entry.getValue().getAsJsonPrimitive().isBoolean()) + instance.putAdditionalProperty( + entry.getKey(), + entry.getValue().getAsBoolean()); + else + throw new IllegalArgumentException( + String.format( + "The field `%s` has unknown primitive" + + " type. Value: %s", + entry.getKey(), + entry.getValue().toString())); + } else if (entry.getValue().isJsonArray()) { + instance.putAdditionalProperty( + entry.getKey(), + gson.fromJson(entry.getValue(), List.class)); + } else { // JSON object + instance.putAdditionalProperty( + entry.getKey(), + gson.fromJson(entry.getValue(), HashMap.class)); + } + } + } + return instance; + } + }.nullSafe(); + } + } + + /** + * Create an instance of CreateRoleRequest given an JSON string + * + * @param jsonString JSON string + * @return An instance of CreateRoleRequest + * @throws IOException if the JSON string is invalid with respect to CreateRoleRequest + */ + public static CreateRoleRequest fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, CreateRoleRequest.class); + } + + /** + * Convert an instance of CreateRoleRequest to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} diff --git a/sdks/java/src/main/java/com/thoughtspot/client/model/CreateScheduleRequest.java b/sdks/java/src/main/java/com/thoughtspot/client/model/CreateScheduleRequest.java new file mode 100644 index 000000000..1557b941b --- /dev/null +++ b/sdks/java/src/main/java/com/thoughtspot/client/model/CreateScheduleRequest.java @@ -0,0 +1,2092 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client.model; + +import com.google.gson.Gson; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.TypeAdapter; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.reflect.TypeToken; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import com.thoughtspot.client.JSON; +import java.io.IOException; +import java.io.Serializable; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Objects; + +/** CreateScheduleRequest */ +@javax.annotation.Generated( + value = "org.openapitools.codegen.languages.JavaClientCodegen", + comments = "Generator version: 7.12.0") +public class CreateScheduleRequest implements Serializable { + private static final long serialVersionUID = 1L; + + public static final String SERIALIZED_NAME_NAME = "name"; + + @SerializedName(SERIALIZED_NAME_NAME) + @javax.annotation.Nonnull + private String name; + + public static final String SERIALIZED_NAME_DESCRIPTION = "description"; + + @SerializedName(SERIALIZED_NAME_DESCRIPTION) + @javax.annotation.Nonnull + private String description; + + /** Type of the metadata object. */ + @JsonAdapter(MetadataTypeEnum.Adapter.class) + public enum MetadataTypeEnum { + LIVEBOARD("LIVEBOARD"); + + private String value; + + MetadataTypeEnum(String value) { + this.value = value; + } + + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + public static MetadataTypeEnum fromValue(String value) { + for (MetadataTypeEnum b : MetadataTypeEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + + public static class Adapter extends TypeAdapter { + @Override + public void write(final JsonWriter jsonWriter, final MetadataTypeEnum enumeration) + throws IOException { + jsonWriter.value(enumeration.getValue()); + } + + @Override + public MetadataTypeEnum read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + return MetadataTypeEnum.fromValue(value); + } + } + + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + String value = jsonElement.getAsString(); + MetadataTypeEnum.fromValue(value); + } + } + + public static final String SERIALIZED_NAME_METADATA_TYPE = "metadata_type"; + + @SerializedName(SERIALIZED_NAME_METADATA_TYPE) + @javax.annotation.Nonnull + private MetadataTypeEnum metadataType; + + public static final String SERIALIZED_NAME_METADATA_IDENTIFIER = "metadata_identifier"; + + @SerializedName(SERIALIZED_NAME_METADATA_IDENTIFIER) + @javax.annotation.Nonnull + private String metadataIdentifier; + + /** Export file format. */ + @JsonAdapter(FileFormatEnum.Adapter.class) + public enum FileFormatEnum { + CSV("CSV"), + + PDF("PDF"), + + XLSX("XLSX"); + + private String value; + + FileFormatEnum(String value) { + this.value = value; + } + + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + public static FileFormatEnum fromValue(String value) { + for (FileFormatEnum b : FileFormatEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + + public static class Adapter extends TypeAdapter { + @Override + public void write(final JsonWriter jsonWriter, final FileFormatEnum enumeration) + throws IOException { + jsonWriter.value(enumeration.getValue()); + } + + @Override + public FileFormatEnum read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + return FileFormatEnum.fromValue(value); + } + } + + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + String value = jsonElement.getAsString(); + FileFormatEnum.fromValue(value); + } + } + + public static final String SERIALIZED_NAME_FILE_FORMAT = "file_format"; + + @SerializedName(SERIALIZED_NAME_FILE_FORMAT) + @javax.annotation.Nullable + private FileFormatEnum fileFormat = FileFormatEnum.PDF; + + public static final String SERIALIZED_NAME_LIVEBOARD_OPTIONS = "liveboard_options"; + + @SerializedName(SERIALIZED_NAME_LIVEBOARD_OPTIONS) + @javax.annotation.Nullable + private LiveboardOptionsInput liveboardOptions; + + public static final String SERIALIZED_NAME_PDF_OPTIONS = "pdf_options"; + + @SerializedName(SERIALIZED_NAME_PDF_OPTIONS) + @javax.annotation.Nullable + private SchedulesPdfOptionsInput pdfOptions; + + /** Time zone */ + @JsonAdapter(TimeZoneEnum.Adapter.class) + public enum TimeZoneEnum { + AFRICA_ABIDJAN("Africa/Abidjan"), + + AFRICA_ACCRA("Africa/Accra"), + + AFRICA_ADDIS_ABABA("Africa/Addis_Ababa"), + + AFRICA_ALGIERS("Africa/Algiers"), + + AFRICA_ASMARA("Africa/Asmara"), + + AFRICA_ASMERA("Africa/Asmera"), + + AFRICA_BAMAKO("Africa/Bamako"), + + AFRICA_BANGUI("Africa/Bangui"), + + AFRICA_BANJUL("Africa/Banjul"), + + AFRICA_BISSAU("Africa/Bissau"), + + AFRICA_BLANTYRE("Africa/Blantyre"), + + AFRICA_BRAZZAVILLE("Africa/Brazzaville"), + + AFRICA_BUJUMBURA("Africa/Bujumbura"), + + AFRICA_CAIRO("Africa/Cairo"), + + AFRICA_CASABLANCA("Africa/Casablanca"), + + AFRICA_CEUTA("Africa/Ceuta"), + + AFRICA_CONAKRY("Africa/Conakry"), + + AFRICA_DAKAR("Africa/Dakar"), + + AFRICA_DAR_ES_SALAAM("Africa/Dar_es_Salaam"), + + AFRICA_DJIBOUTI("Africa/Djibouti"), + + AFRICA_DOUALA("Africa/Douala"), + + AFRICA_EL_AAIUN("Africa/El_Aaiun"), + + AFRICA_FREETOWN("Africa/Freetown"), + + AFRICA_GABORONE("Africa/Gaborone"), + + AFRICA_HARARE("Africa/Harare"), + + AFRICA_JOHANNESBURG("Africa/Johannesburg"), + + AFRICA_JUBA("Africa/Juba"), + + AFRICA_KAMPALA("Africa/Kampala"), + + AFRICA_KHARTOUM("Africa/Khartoum"), + + AFRICA_KIGALI("Africa/Kigali"), + + AFRICA_KINSHASA("Africa/Kinshasa"), + + AFRICA_LAGOS("Africa/Lagos"), + + AFRICA_LIBREVILLE("Africa/Libreville"), + + AFRICA_LOME("Africa/Lome"), + + AFRICA_LUANDA("Africa/Luanda"), + + AFRICA_LUBUMBASHI("Africa/Lubumbashi"), + + AFRICA_LUSAKA("Africa/Lusaka"), + + AFRICA_MALABO("Africa/Malabo"), + + AFRICA_MAPUTO("Africa/Maputo"), + + AFRICA_MASERU("Africa/Maseru"), + + AFRICA_MBABANE("Africa/Mbabane"), + + AFRICA_MOGADISHU("Africa/Mogadishu"), + + AFRICA_MONROVIA("Africa/Monrovia"), + + AFRICA_NAIROBI("Africa/Nairobi"), + + AFRICA_NDJAMENA("Africa/Ndjamena"), + + AFRICA_NIAMEY("Africa/Niamey"), + + AFRICA_NOUAKCHOTT("Africa/Nouakchott"), + + AFRICA_OUAGADOUGOU("Africa/Ouagadougou"), + + AFRICA_PORTO_NOVO("Africa/Porto-Novo"), + + AFRICA_SAO_TOME("Africa/Sao_Tome"), + + AFRICA_TIMBUKTU("Africa/Timbuktu"), + + AFRICA_TRIPOLI("Africa/Tripoli"), + + AFRICA_TUNIS("Africa/Tunis"), + + AFRICA_WINDHOEK("Africa/Windhoek"), + + AMERICA_ADAK("America/Adak"), + + AMERICA_ANCHORAGE("America/Anchorage"), + + AMERICA_ANGUILLA("America/Anguilla"), + + AMERICA_ANTIGUA("America/Antigua"), + + AMERICA_ARAGUAINA("America/Araguaina"), + + AMERICA_ARGENTINA_BUENOS_AIRES("America/Argentina/Buenos_Aires"), + + AMERICA_ARGENTINA_CATAMARCA("America/Argentina/Catamarca"), + + AMERICA_ARGENTINA_COMOD_RIVADAVIA("America/Argentina/ComodRivadavia"), + + AMERICA_ARGENTINA_CORDOBA("America/Argentina/Cordoba"), + + AMERICA_ARGENTINA_JUJUY("America/Argentina/Jujuy"), + + AMERICA_ARGENTINA_LA_RIOJA("America/Argentina/La_Rioja"), + + AMERICA_ARGENTINA_MENDOZA("America/Argentina/Mendoza"), + + AMERICA_ARGENTINA_RIO_GALLEGOS("America/Argentina/Rio_Gallegos"), + + AMERICA_ARGENTINA_SALTA("America/Argentina/Salta"), + + AMERICA_ARGENTINA_SAN_JUAN("America/Argentina/San_Juan"), + + AMERICA_ARGENTINA_SAN_LUIS("America/Argentina/San_Luis"), + + AMERICA_ARGENTINA_TUCUMAN("America/Argentina/Tucuman"), + + AMERICA_ARGENTINA_USHUAIA("America/Argentina/Ushuaia"), + + AMERICA_ARUBA("America/Aruba"), + + AMERICA_ASUNCION("America/Asuncion"), + + AMERICA_ATIKOKAN("America/Atikokan"), + + AMERICA_ATKA("America/Atka"), + + AMERICA_BAHIA("America/Bahia"), + + AMERICA_BAHIA_BANDERAS("America/Bahia_Banderas"), + + AMERICA_BARBADOS("America/Barbados"), + + AMERICA_BELEM("America/Belem"), + + AMERICA_BELIZE("America/Belize"), + + AMERICA_BLANC_SABLON("America/Blanc-Sablon"), + + AMERICA_BOA_VISTA("America/Boa_Vista"), + + AMERICA_BOGOTA("America/Bogota"), + + AMERICA_BOISE("America/Boise"), + + AMERICA_BUENOS_AIRES("America/Buenos_Aires"), + + AMERICA_CAMBRIDGE_BAY("America/Cambridge_Bay"), + + AMERICA_CAMPO_GRANDE("America/Campo_Grande"), + + AMERICA_CANCUN("America/Cancun"), + + AMERICA_CARACAS("America/Caracas"), + + AMERICA_CATAMARCA("America/Catamarca"), + + AMERICA_CAYENNE("America/Cayenne"), + + AMERICA_CAYMAN("America/Cayman"), + + AMERICA_CHICAGO("America/Chicago"), + + AMERICA_CHIHUAHUA("America/Chihuahua"), + + AMERICA_CORAL_HARBOUR("America/Coral_Harbour"), + + AMERICA_CORDOBA("America/Cordoba"), + + AMERICA_COSTA_RICA("America/Costa_Rica"), + + AMERICA_CRESTON("America/Creston"), + + AMERICA_CUIABA("America/Cuiaba"), + + AMERICA_CURACAO("America/Curacao"), + + AMERICA_DANMARKSHAVN("America/Danmarkshavn"), + + AMERICA_DAWSON("America/Dawson"), + + AMERICA_DAWSON_CREEK("America/Dawson_Creek"), + + AMERICA_DENVER("America/Denver"), + + AMERICA_DETROIT("America/Detroit"), + + AMERICA_DOMINICA("America/Dominica"), + + AMERICA_EDMONTON("America/Edmonton"), + + AMERICA_EIRUNEPE("America/Eirunepe"), + + AMERICA_EL_SALVADOR("America/El_Salvador"), + + AMERICA_ENSENADA("America/Ensenada"), + + AMERICA_FORT_NELSON("America/Fort_Nelson"), + + AMERICA_FORT_WAYNE("America/Fort_Wayne"), + + AMERICA_FORTALEZA("America/Fortaleza"), + + AMERICA_GLACE_BAY("America/Glace_Bay"), + + AMERICA_GODTHAB("America/Godthab"), + + AMERICA_GOOSE_BAY("America/Goose_Bay"), + + AMERICA_GRAND_TURK("America/Grand_Turk"), + + AMERICA_GRENADA("America/Grenada"), + + AMERICA_GUADELOUPE("America/Guadeloupe"), + + AMERICA_GUATEMALA("America/Guatemala"), + + AMERICA_GUAYAQUIL("America/Guayaquil"), + + AMERICA_GUYANA("America/Guyana"), + + AMERICA_HALIFAX("America/Halifax"), + + AMERICA_HAVANA("America/Havana"), + + AMERICA_HERMOSILLO("America/Hermosillo"), + + AMERICA_INDIANA_INDIANAPOLIS("America/Indiana/Indianapolis"), + + AMERICA_INDIANA_KNOX("America/Indiana/Knox"), + + AMERICA_INDIANA_MARENGO("America/Indiana/Marengo"), + + AMERICA_INDIANA_PETERSBURG("America/Indiana/Petersburg"), + + AMERICA_INDIANA_TELL_CITY("America/Indiana/Tell_City"), + + AMERICA_INDIANA_VEVAY("America/Indiana/Vevay"), + + AMERICA_INDIANA_VINCENNES("America/Indiana/Vincennes"), + + AMERICA_INDIANA_WINAMAC("America/Indiana/Winamac"), + + AMERICA_INDIANAPOLIS("America/Indianapolis"), + + AMERICA_INUVIK("America/Inuvik"), + + AMERICA_IQALUIT("America/Iqaluit"), + + AMERICA_JAMAICA("America/Jamaica"), + + AMERICA_JUJUY("America/Jujuy"), + + AMERICA_JUNEAU("America/Juneau"), + + AMERICA_KENTUCKY_LOUISVILLE("America/Kentucky/Louisville"), + + AMERICA_KENTUCKY_MONTICELLO("America/Kentucky/Monticello"), + + AMERICA_KNOX_IN("America/Knox_IN"), + + AMERICA_KRALENDIJK("America/Kralendijk"), + + AMERICA_LA_PAZ("America/La_Paz"), + + AMERICA_LIMA("America/Lima"), + + AMERICA_LOS_ANGELES("America/Los_Angeles"), + + AMERICA_LOUISVILLE("America/Louisville"), + + AMERICA_LOWER_PRINCES("America/Lower_Princes"), + + AMERICA_MACEIO("America/Maceio"), + + AMERICA_MANAGUA("America/Managua"), + + AMERICA_MANAUS("America/Manaus"), + + AMERICA_MARIGOT("America/Marigot"), + + AMERICA_MARTINIQUE("America/Martinique"), + + AMERICA_MATAMOROS("America/Matamoros"), + + AMERICA_MAZATLAN("America/Mazatlan"), + + AMERICA_MENDOZA("America/Mendoza"), + + AMERICA_MENOMINEE("America/Menominee"), + + AMERICA_MERIDA("America/Merida"), + + AMERICA_METLAKATLA("America/Metlakatla"), + + AMERICA_MEXICO_CITY("America/Mexico_City"), + + AMERICA_MIQUELON("America/Miquelon"), + + AMERICA_MONCTON("America/Moncton"), + + AMERICA_MONTERREY("America/Monterrey"), + + AMERICA_MONTEVIDEO("America/Montevideo"), + + AMERICA_MONTREAL("America/Montreal"), + + AMERICA_MONTSERRAT("America/Montserrat"), + + AMERICA_NASSAU("America/Nassau"), + + AMERICA_NEW_YORK("America/New_York"), + + AMERICA_NIPIGON("America/Nipigon"), + + AMERICA_NOME("America/Nome"), + + AMERICA_NORONHA("America/Noronha"), + + AMERICA_NORTH_DAKOTA_BEULAH("America/North_Dakota/Beulah"), + + AMERICA_NORTH_DAKOTA_CENTER("America/North_Dakota/Center"), + + AMERICA_NORTH_DAKOTA_NEW_SALEM("America/North_Dakota/New_Salem"), + + AMERICA_NUUK("America/Nuuk"), + + AMERICA_OJINAGA("America/Ojinaga"), + + AMERICA_PANAMA("America/Panama"), + + AMERICA_PANGNIRTUNG("America/Pangnirtung"), + + AMERICA_PARAMARIBO("America/Paramaribo"), + + AMERICA_PHOENIX("America/Phoenix"), + + AMERICA_PORT_AU_PRINCE("America/Port-au-Prince"), + + AMERICA_PORT_OF_SPAIN("America/Port_of_Spain"), + + AMERICA_PORTO_ACRE("America/Porto_Acre"), + + AMERICA_PORTO_VELHO("America/Porto_Velho"), + + AMERICA_PUERTO_RICO("America/Puerto_Rico"), + + AMERICA_PUNTA_ARENAS("America/Punta_Arenas"), + + AMERICA_RAINY_RIVER("America/Rainy_River"), + + AMERICA_RANKIN_INLET("America/Rankin_Inlet"), + + AMERICA_RECIFE("America/Recife"), + + AMERICA_REGINA("America/Regina"), + + AMERICA_RESOLUTE("America/Resolute"), + + AMERICA_RIO_BRANCO("America/Rio_Branco"), + + AMERICA_ROSARIO("America/Rosario"), + + AMERICA_SANTA_ISABEL("America/Santa_Isabel"), + + AMERICA_SANTAREM("America/Santarem"), + + AMERICA_SANTIAGO("America/Santiago"), + + AMERICA_SANTO_DOMINGO("America/Santo_Domingo"), + + AMERICA_SAO_PAULO("America/Sao_Paulo"), + + AMERICA_SCORESBYSUND("America/Scoresbysund"), + + AMERICA_SHIPROCK("America/Shiprock"), + + AMERICA_SITKA("America/Sitka"), + + AMERICA_ST_BARTHELEMY("America/St_Barthelemy"), + + AMERICA_ST_JOHNS("America/St_Johns"), + + AMERICA_ST_KITTS("America/St_Kitts"), + + AMERICA_ST_LUCIA("America/St_Lucia"), + + AMERICA_ST_THOMAS("America/St_Thomas"), + + AMERICA_ST_VINCENT("America/St_Vincent"), + + AMERICA_SWIFT_CURRENT("America/Swift_Current"), + + AMERICA_TEGUCIGALPA("America/Tegucigalpa"), + + AMERICA_THULE("America/Thule"), + + AMERICA_THUNDER_BAY("America/Thunder_Bay"), + + AMERICA_TIJUANA("America/Tijuana"), + + AMERICA_TORONTO("America/Toronto"), + + AMERICA_TORTOLA("America/Tortola"), + + AMERICA_VANCOUVER("America/Vancouver"), + + AMERICA_VIRGIN("America/Virgin"), + + AMERICA_WHITEHORSE("America/Whitehorse"), + + AMERICA_WINNIPEG("America/Winnipeg"), + + AMERICA_YAKUTAT("America/Yakutat"), + + AMERICA_YELLOWKNIFE("America/Yellowknife"), + + ANTARCTICA_CASEY("Antarctica/Casey"), + + ANTARCTICA_DAVIS("Antarctica/Davis"), + + ANTARCTICA_DUMONT_D_URVILLE("Antarctica/DumontDUrville"), + + ANTARCTICA_MACQUARIE("Antarctica/Macquarie"), + + ANTARCTICA_MAWSON("Antarctica/Mawson"), + + ANTARCTICA_MC_MURDO("Antarctica/McMurdo"), + + ANTARCTICA_PALMER("Antarctica/Palmer"), + + ANTARCTICA_ROTHERA("Antarctica/Rothera"), + + ANTARCTICA_SOUTH_POLE("Antarctica/South_Pole"), + + ANTARCTICA_SYOWA("Antarctica/Syowa"), + + ANTARCTICA_TROLL("Antarctica/Troll"), + + ANTARCTICA_VOSTOK("Antarctica/Vostok"), + + ARCTIC_LONGYEARBYEN("Arctic/Longyearbyen"), + + ASIA_ADEN("Asia/Aden"), + + ASIA_ALMATY("Asia/Almaty"), + + ASIA_AMMAN("Asia/Amman"), + + ASIA_ANADYR("Asia/Anadyr"), + + ASIA_AQTAU("Asia/Aqtau"), + + ASIA_AQTOBE("Asia/Aqtobe"), + + ASIA_ASHGABAT("Asia/Ashgabat"), + + ASIA_ASHKHABAD("Asia/Ashkhabad"), + + ASIA_ATYRAU("Asia/Atyrau"), + + ASIA_BAGHDAD("Asia/Baghdad"), + + ASIA_BAHRAIN("Asia/Bahrain"), + + ASIA_BAKU("Asia/Baku"), + + ASIA_BANGKOK("Asia/Bangkok"), + + ASIA_BARNAUL("Asia/Barnaul"), + + ASIA_BEIRUT("Asia/Beirut"), + + ASIA_BISHKEK("Asia/Bishkek"), + + ASIA_BRUNEI("Asia/Brunei"), + + ASIA_CALCUTTA("Asia/Calcutta"), + + ASIA_CHITA("Asia/Chita"), + + ASIA_CHOIBALSAN("Asia/Choibalsan"), + + ASIA_CHONGQING("Asia/Chongqing"), + + ASIA_CHUNGKING("Asia/Chungking"), + + ASIA_COLOMBO("Asia/Colombo"), + + ASIA_DACCA("Asia/Dacca"), + + ASIA_DAMASCUS("Asia/Damascus"), + + ASIA_DHAKA("Asia/Dhaka"), + + ASIA_DILI("Asia/Dili"), + + ASIA_DUBAI("Asia/Dubai"), + + ASIA_DUSHANBE("Asia/Dushanbe"), + + ASIA_FAMAGUSTA("Asia/Famagusta"), + + ASIA_GAZA("Asia/Gaza"), + + ASIA_HARBIN("Asia/Harbin"), + + ASIA_HEBRON("Asia/Hebron"), + + ASIA_HO_CHI_MINH("Asia/Ho_Chi_Minh"), + + ASIA_HONG_KONG("Asia/Hong_Kong"), + + ASIA_HOVD("Asia/Hovd"), + + ASIA_IRKUTSK("Asia/Irkutsk"), + + ASIA_ISTANBUL("Asia/Istanbul"), + + ASIA_JAKARTA("Asia/Jakarta"), + + ASIA_JAYAPURA("Asia/Jayapura"), + + ASIA_JERUSALEM("Asia/Jerusalem"), + + ASIA_KABUL("Asia/Kabul"), + + ASIA_KAMCHATKA("Asia/Kamchatka"), + + ASIA_KARACHI("Asia/Karachi"), + + ASIA_KASHGAR("Asia/Kashgar"), + + ASIA_KATHMANDU("Asia/Kathmandu"), + + ASIA_KATMANDU("Asia/Katmandu"), + + ASIA_KHANDYGA("Asia/Khandyga"), + + ASIA_KOLKATA("Asia/Kolkata"), + + ASIA_KRASNOYARSK("Asia/Krasnoyarsk"), + + ASIA_KUALA_LUMPUR("Asia/Kuala_Lumpur"), + + ASIA_KUCHING("Asia/Kuching"), + + ASIA_KUWAIT("Asia/Kuwait"), + + ASIA_MACAO("Asia/Macao"), + + ASIA_MACAU("Asia/Macau"), + + ASIA_MAGADAN("Asia/Magadan"), + + ASIA_MAKASSAR("Asia/Makassar"), + + ASIA_MANILA("Asia/Manila"), + + ASIA_MUSCAT("Asia/Muscat"), + + ASIA_NICOSIA("Asia/Nicosia"), + + ASIA_NOVOKUZNETSK("Asia/Novokuznetsk"), + + ASIA_NOVOSIBIRSK("Asia/Novosibirsk"), + + ASIA_OMSK("Asia/Omsk"), + + ASIA_ORAL("Asia/Oral"), + + ASIA_PHNOM_PENH("Asia/Phnom_Penh"), + + ASIA_PONTIANAK("Asia/Pontianak"), + + ASIA_PYONGYANG("Asia/Pyongyang"), + + ASIA_QATAR("Asia/Qatar"), + + ASIA_QOSTANAY("Asia/Qostanay"), + + ASIA_QYZYLORDA("Asia/Qyzylorda"), + + ASIA_RANGOON("Asia/Rangoon"), + + ASIA_RIYADH("Asia/Riyadh"), + + ASIA_SAIGON("Asia/Saigon"), + + ASIA_SAKHALIN("Asia/Sakhalin"), + + ASIA_SAMARKAND("Asia/Samarkand"), + + ASIA_SEOUL("Asia/Seoul"), + + ASIA_SHANGHAI("Asia/Shanghai"), + + ASIA_SINGAPORE("Asia/Singapore"), + + ASIA_SREDNEKOLYMSK("Asia/Srednekolymsk"), + + ASIA_TAIPEI("Asia/Taipei"), + + ASIA_TASHKENT("Asia/Tashkent"), + + ASIA_TBILISI("Asia/Tbilisi"), + + ASIA_TEHRAN("Asia/Tehran"), + + ASIA_TEL_AVIV("Asia/Tel_Aviv"), + + ASIA_THIMBU("Asia/Thimbu"), + + ASIA_THIMPHU("Asia/Thimphu"), + + ASIA_TOKYO("Asia/Tokyo"), + + ASIA_TOMSK("Asia/Tomsk"), + + ASIA_UJUNG_PANDANG("Asia/Ujung_Pandang"), + + ASIA_ULAANBAATAR("Asia/Ulaanbaatar"), + + ASIA_ULAN_BATOR("Asia/Ulan_Bator"), + + ASIA_URUMQI("Asia/Urumqi"), + + ASIA_UST_NERA("Asia/Ust-Nera"), + + ASIA_VIENTIANE("Asia/Vientiane"), + + ASIA_VLADIVOSTOK("Asia/Vladivostok"), + + ASIA_YAKUTSK("Asia/Yakutsk"), + + ASIA_YANGON("Asia/Yangon"), + + ASIA_YEKATERINBURG("Asia/Yekaterinburg"), + + ASIA_YEREVAN("Asia/Yerevan"), + + ATLANTIC_AZORES("Atlantic/Azores"), + + ATLANTIC_BERMUDA("Atlantic/Bermuda"), + + ATLANTIC_CANARY("Atlantic/Canary"), + + ATLANTIC_CAPE_VERDE("Atlantic/Cape_Verde"), + + ATLANTIC_FAEROE("Atlantic/Faeroe"), + + ATLANTIC_FAROE("Atlantic/Faroe"), + + ATLANTIC_JAN_MAYEN("Atlantic/Jan_Mayen"), + + ATLANTIC_MADEIRA("Atlantic/Madeira"), + + ATLANTIC_REYKJAVIK("Atlantic/Reykjavik"), + + ATLANTIC_SOUTH_GEORGIA("Atlantic/South_Georgia"), + + ATLANTIC_ST_HELENA("Atlantic/St_Helena"), + + ATLANTIC_STANLEY("Atlantic/Stanley"), + + AUSTRALIA_ACT("Australia/ACT"), + + AUSTRALIA_ADELAIDE("Australia/Adelaide"), + + AUSTRALIA_BRISBANE("Australia/Brisbane"), + + AUSTRALIA_BROKEN_HILL("Australia/Broken_Hill"), + + AUSTRALIA_CANBERRA("Australia/Canberra"), + + AUSTRALIA_CURRIE("Australia/Currie"), + + AUSTRALIA_DARWIN("Australia/Darwin"), + + AUSTRALIA_EUCLA("Australia/Eucla"), + + AUSTRALIA_HOBART("Australia/Hobart"), + + AUSTRALIA_LHI("Australia/LHI"), + + AUSTRALIA_LINDEMAN("Australia/Lindeman"), + + AUSTRALIA_LORD_HOWE("Australia/Lord_Howe"), + + AUSTRALIA_MELBOURNE("Australia/Melbourne"), + + AUSTRALIA_NSW("Australia/NSW"), + + AUSTRALIA_NORTH("Australia/North"), + + AUSTRALIA_PERTH("Australia/Perth"), + + AUSTRALIA_QUEENSLAND("Australia/Queensland"), + + AUSTRALIA_SOUTH("Australia/South"), + + AUSTRALIA_SYDNEY("Australia/Sydney"), + + AUSTRALIA_TASMANIA("Australia/Tasmania"), + + AUSTRALIA_VICTORIA("Australia/Victoria"), + + AUSTRALIA_WEST("Australia/West"), + + AUSTRALIA_YANCOWINNA("Australia/Yancowinna"), + + BRAZIL_ACRE("Brazil/Acre"), + + BRAZIL_DE_NORONHA("Brazil/DeNoronha"), + + BRAZIL_EAST("Brazil/East"), + + BRAZIL_WEST("Brazil/West"), + + CET("CET"), + + CST6_CDT("CST6CDT"), + + CANADA_ATLANTIC("Canada/Atlantic"), + + CANADA_CENTRAL("Canada/Central"), + + CANADA_EASTERN("Canada/Eastern"), + + CANADA_MOUNTAIN("Canada/Mountain"), + + CANADA_NEWFOUNDLAND("Canada/Newfoundland"), + + CANADA_PACIFIC("Canada/Pacific"), + + CANADA_SASKATCHEWAN("Canada/Saskatchewan"), + + CANADA_YUKON("Canada/Yukon"), + + CHILE_CONTINENTAL("Chile/Continental"), + + CHILE_EASTER_ISLAND("Chile/EasterIsland"), + + CUBA("Cuba"), + + EET("EET"), + + EST5_EDT("EST5EDT"), + + EGYPT("Egypt"), + + EIRE("Eire"), + + ETC_GMT("Etc/GMT"), + + ETC_GMT_0("Etc/GMT+0"), + + ETC_GMT_1("Etc/GMT+1"), + + ETC_GMT_10("Etc/GMT+10"), + + ETC_GMT_11("Etc/GMT+11"), + + ETC_GMT_121("Etc/GMT+12"), + + ETC_GMT_2("Etc/GMT+2"), + + ETC_GMT_3("Etc/GMT+3"), + + ETC_GMT_4("Etc/GMT+4"), + + ETC_GMT_5("Etc/GMT+5"), + + ETC_GMT_6("Etc/GMT+6"), + + ETC_GMT_7("Etc/GMT+7"), + + ETC_GMT_8("Etc/GMT+8"), + + ETC_GMT_9("Etc/GMT+9"), + + ETC_GMT_02("Etc/GMT-0"), + + ETC_GMT_12("Etc/GMT-1"), + + ETC_GMT_102("Etc/GMT-10"), + + ETC_GMT_112("Etc/GMT-11"), + + ETC_GMT_122("Etc/GMT-12"), + + ETC_GMT_13("Etc/GMT-13"), + + ETC_GMT_14("Etc/GMT-14"), + + ETC_GMT_22("Etc/GMT-2"), + + ETC_GMT_32("Etc/GMT-3"), + + ETC_GMT_42("Etc/GMT-4"), + + ETC_GMT_52("Etc/GMT-5"), + + ETC_GMT_62("Etc/GMT-6"), + + ETC_GMT_72("Etc/GMT-7"), + + ETC_GMT_82("Etc/GMT-8"), + + ETC_GMT_92("Etc/GMT-9"), + + ETC_GMT0("Etc/GMT0"), + + ETC_GREENWICH("Etc/Greenwich"), + + ETC_UCT("Etc/UCT"), + + ETC_UTC("Etc/UTC"), + + ETC_UNIVERSAL("Etc/Universal"), + + ETC_ZULU("Etc/Zulu"), + + EUROPE_AMSTERDAM("Europe/Amsterdam"), + + EUROPE_ANDORRA("Europe/Andorra"), + + EUROPE_ASTRAKHAN("Europe/Astrakhan"), + + EUROPE_ATHENS("Europe/Athens"), + + EUROPE_BELFAST("Europe/Belfast"), + + EUROPE_BELGRADE("Europe/Belgrade"), + + EUROPE_BERLIN("Europe/Berlin"), + + EUROPE_BRATISLAVA("Europe/Bratislava"), + + EUROPE_BRUSSELS("Europe/Brussels"), + + EUROPE_BUCHAREST("Europe/Bucharest"), + + EUROPE_BUDAPEST("Europe/Budapest"), + + EUROPE_BUSINGEN("Europe/Busingen"), + + EUROPE_CHISINAU("Europe/Chisinau"), + + EUROPE_COPENHAGEN("Europe/Copenhagen"), + + EUROPE_DUBLIN("Europe/Dublin"), + + EUROPE_GIBRALTAR("Europe/Gibraltar"), + + EUROPE_GUERNSEY("Europe/Guernsey"), + + EUROPE_HELSINKI("Europe/Helsinki"), + + EUROPE_ISLE_OF_MAN("Europe/Isle_of_Man"), + + EUROPE_ISTANBUL("Europe/Istanbul"), + + EUROPE_JERSEY("Europe/Jersey"), + + EUROPE_KALININGRAD("Europe/Kaliningrad"), + + EUROPE_KIEV("Europe/Kiev"), + + EUROPE_KIROV("Europe/Kirov"), + + EUROPE_KYIV("Europe/Kyiv"), + + EUROPE_LISBON("Europe/Lisbon"), + + EUROPE_LJUBLJANA("Europe/Ljubljana"), + + EUROPE_LONDON("Europe/London"), + + EUROPE_LUXEMBOURG("Europe/Luxembourg"), + + EUROPE_MADRID("Europe/Madrid"), + + EUROPE_MALTA("Europe/Malta"), + + EUROPE_MARIEHAMN("Europe/Mariehamn"), + + EUROPE_MINSK("Europe/Minsk"), + + EUROPE_MONACO("Europe/Monaco"), + + EUROPE_MOSCOW("Europe/Moscow"), + + EUROPE_NICOSIA("Europe/Nicosia"), + + EUROPE_OSLO("Europe/Oslo"), + + EUROPE_PARIS("Europe/Paris"), + + EUROPE_PODGORICA("Europe/Podgorica"), + + EUROPE_PRAGUE("Europe/Prague"), + + EUROPE_RIGA("Europe/Riga"), + + EUROPE_ROME("Europe/Rome"), + + EUROPE_SAMARA("Europe/Samara"), + + EUROPE_SAN_MARINO("Europe/San_Marino"), + + EUROPE_SARAJEVO("Europe/Sarajevo"), + + EUROPE_SARATOV("Europe/Saratov"), + + EUROPE_SIMFEROPOL("Europe/Simferopol"), + + EUROPE_SKOPJE("Europe/Skopje"), + + EUROPE_SOFIA("Europe/Sofia"), + + EUROPE_STOCKHOLM("Europe/Stockholm"), + + EUROPE_TALLINN("Europe/Tallinn"), + + EUROPE_TIRANE("Europe/Tirane"), + + EUROPE_TIRASPOL("Europe/Tiraspol"), + + EUROPE_ULYANOVSK("Europe/Ulyanovsk"), + + EUROPE_UZHGOROD("Europe/Uzhgorod"), + + EUROPE_VADUZ("Europe/Vaduz"), + + EUROPE_VATICAN("Europe/Vatican"), + + EUROPE_VIENNA("Europe/Vienna"), + + EUROPE_VILNIUS("Europe/Vilnius"), + + EUROPE_VOLGOGRAD("Europe/Volgograd"), + + EUROPE_WARSAW("Europe/Warsaw"), + + EUROPE_ZAGREB("Europe/Zagreb"), + + EUROPE_ZAPOROZHYE("Europe/Zaporozhye"), + + EUROPE_ZURICH("Europe/Zurich"), + + GB("GB"), + + GB_EIRE("GB-Eire"), + + GMT("GMT"), + + GMT0("GMT0"), + + GREENWICH("Greenwich"), + + HONGKONG("Hongkong"), + + ICELAND("Iceland"), + + INDIAN_ANTANANARIVO("Indian/Antananarivo"), + + INDIAN_CHAGOS("Indian/Chagos"), + + INDIAN_CHRISTMAS("Indian/Christmas"), + + INDIAN_COCOS("Indian/Cocos"), + + INDIAN_COMORO("Indian/Comoro"), + + INDIAN_KERGUELEN("Indian/Kerguelen"), + + INDIAN_MAHE("Indian/Mahe"), + + INDIAN_MALDIVES("Indian/Maldives"), + + INDIAN_MAURITIUS("Indian/Mauritius"), + + INDIAN_MAYOTTE("Indian/Mayotte"), + + INDIAN_REUNION("Indian/Reunion"), + + IRAN("Iran"), + + ISRAEL("Israel"), + + JAMAICA("Jamaica"), + + JAPAN("Japan"), + + KWAJALEIN("Kwajalein"), + + LIBYA("Libya"), + + MET("MET"), + + MST7_MDT("MST7MDT"), + + MEXICO_BAJA_NORTE("Mexico/BajaNorte"), + + MEXICO_BAJA_SUR("Mexico/BajaSur"), + + MEXICO_GENERAL("Mexico/General"), + + NZ("NZ"), + + NZ_CHAT("NZ-CHAT"), + + NAVAJO("Navajo"), + + PRC("PRC"), + + PST8_PDT("PST8PDT"), + + PACIFIC_APIA("Pacific/Apia"), + + PACIFIC_AUCKLAND("Pacific/Auckland"), + + PACIFIC_BOUGAINVILLE("Pacific/Bougainville"), + + PACIFIC_CHATHAM("Pacific/Chatham"), + + PACIFIC_CHUUK("Pacific/Chuuk"), + + PACIFIC_EASTER("Pacific/Easter"), + + PACIFIC_EFATE("Pacific/Efate"), + + PACIFIC_ENDERBURY("Pacific/Enderbury"), + + PACIFIC_FAKAOFO("Pacific/Fakaofo"), + + PACIFIC_FIJI("Pacific/Fiji"), + + PACIFIC_FUNAFUTI("Pacific/Funafuti"), + + PACIFIC_GALAPAGOS("Pacific/Galapagos"), + + PACIFIC_GAMBIER("Pacific/Gambier"), + + PACIFIC_GUADALCANAL("Pacific/Guadalcanal"), + + PACIFIC_GUAM("Pacific/Guam"), + + PACIFIC_HONOLULU("Pacific/Honolulu"), + + PACIFIC_JOHNSTON("Pacific/Johnston"), + + PACIFIC_KANTON("Pacific/Kanton"), + + PACIFIC_KIRITIMATI("Pacific/Kiritimati"), + + PACIFIC_KOSRAE("Pacific/Kosrae"), + + PACIFIC_KWAJALEIN("Pacific/Kwajalein"), + + PACIFIC_MAJURO("Pacific/Majuro"), + + PACIFIC_MARQUESAS("Pacific/Marquesas"), + + PACIFIC_MIDWAY("Pacific/Midway"), + + PACIFIC_NAURU("Pacific/Nauru"), + + PACIFIC_NIUE("Pacific/Niue"), + + PACIFIC_NORFOLK("Pacific/Norfolk"), + + PACIFIC_NOUMEA("Pacific/Noumea"), + + PACIFIC_PAGO_PAGO("Pacific/Pago_Pago"), + + PACIFIC_PALAU("Pacific/Palau"), + + PACIFIC_PITCAIRN("Pacific/Pitcairn"), + + PACIFIC_POHNPEI("Pacific/Pohnpei"), + + PACIFIC_PONAPE("Pacific/Ponape"), + + PACIFIC_PORT_MORESBY("Pacific/Port_Moresby"), + + PACIFIC_RAROTONGA("Pacific/Rarotonga"), + + PACIFIC_SAIPAN("Pacific/Saipan"), + + PACIFIC_SAMOA("Pacific/Samoa"), + + PACIFIC_TAHITI("Pacific/Tahiti"), + + PACIFIC_TARAWA("Pacific/Tarawa"), + + PACIFIC_TONGATAPU("Pacific/Tongatapu"), + + PACIFIC_TRUK("Pacific/Truk"), + + PACIFIC_WAKE("Pacific/Wake"), + + PACIFIC_WALLIS("Pacific/Wallis"), + + PACIFIC_YAP("Pacific/Yap"), + + POLAND("Poland"), + + PORTUGAL("Portugal"), + + ROK("ROK"), + + SINGAPORE("Singapore"), + + SYSTEM_V_AST4("SystemV/AST4"), + + SYSTEM_V_AST4_ADT("SystemV/AST4ADT"), + + SYSTEM_V_CST6("SystemV/CST6"), + + SYSTEM_V_CST6_CDT("SystemV/CST6CDT"), + + SYSTEM_V_EST5("SystemV/EST5"), + + SYSTEM_V_EST5_EDT("SystemV/EST5EDT"), + + SYSTEM_V_HST10("SystemV/HST10"), + + SYSTEM_V_MST7("SystemV/MST7"), + + SYSTEM_V_MST7_MDT("SystemV/MST7MDT"), + + SYSTEM_V_PST8("SystemV/PST8"), + + SYSTEM_V_PST8_PDT("SystemV/PST8PDT"), + + SYSTEM_V_YST9("SystemV/YST9"), + + SYSTEM_V_YST9_YDT("SystemV/YST9YDT"), + + TURKEY("Turkey"), + + UCT("UCT"), + + US_ALASKA("US/Alaska"), + + US_ALEUTIAN("US/Aleutian"), + + US_ARIZONA("US/Arizona"), + + US_CENTRAL("US/Central"), + + US_EAST_INDIANA("US/East-Indiana"), + + US_EASTERN("US/Eastern"), + + US_HAWAII("US/Hawaii"), + + US_INDIANA_STARKE("US/Indiana-Starke"), + + US_MICHIGAN("US/Michigan"), + + US_MOUNTAIN("US/Mountain"), + + US_PACIFIC("US/Pacific"), + + US_SAMOA("US/Samoa"), + + UTC("UTC"), + + UNIVERSAL("Universal"), + + W_SU("W-SU"), + + WET("WET"), + + ZULU("Zulu"), + + EST("EST"), + + HST("HST"), + + MST("MST"), + + ACT("ACT"), + + AET("AET"), + + AGT("AGT"), + + ART("ART"), + + AST("AST"), + + BET("BET"), + + BST("BST"), + + CAT("CAT"), + + CNT("CNT"), + + CST("CST"), + + CTT("CTT"), + + EAT("EAT"), + + ECT("ECT"), + + IET("IET"), + + IST("IST"), + + JST("JST"), + + MIT("MIT"), + + NET("NET"), + + NST("NST"), + + PLT("PLT"), + + PNT("PNT"), + + PRT("PRT"), + + PST("PST"), + + SST("SST"), + + VST("VST"); + + private String value; + + TimeZoneEnum(String value) { + this.value = value; + } + + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + public static TimeZoneEnum fromValue(String value) { + for (TimeZoneEnum b : TimeZoneEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + + public static class Adapter extends TypeAdapter { + @Override + public void write(final JsonWriter jsonWriter, final TimeZoneEnum enumeration) + throws IOException { + jsonWriter.value(enumeration.getValue()); + } + + @Override + public TimeZoneEnum read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + return TimeZoneEnum.fromValue(value); + } + } + + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + String value = jsonElement.getAsString(); + TimeZoneEnum.fromValue(value); + } + } + + public static final String SERIALIZED_NAME_TIME_ZONE = "time_zone"; + + @SerializedName(SERIALIZED_NAME_TIME_ZONE) + @javax.annotation.Nonnull + private TimeZoneEnum timeZone = TimeZoneEnum.AMERICA_LOS_ANGELES; + + public static final String SERIALIZED_NAME_FREQUENCY = "frequency"; + + @SerializedName(SERIALIZED_NAME_FREQUENCY) + @javax.annotation.Nullable + private FrequencyInput frequency; + + public static final String SERIALIZED_NAME_RECIPIENT_DETAILS = "recipient_details"; + + @SerializedName(SERIALIZED_NAME_RECIPIENT_DETAILS) + @javax.annotation.Nonnull + private RecipientDetailsInput recipientDetails; + + public static final String SERIALIZED_NAME_PERSONALISED_VIEW_ID = "personalised_view_id"; + + @SerializedName(SERIALIZED_NAME_PERSONALISED_VIEW_ID) + @javax.annotation.Nullable + private String personalisedViewId; + + public CreateScheduleRequest() {} + + public CreateScheduleRequest name(@javax.annotation.Nonnull String name) { + this.name = name; + return this; + } + + /** + * Name of the scheduled job. + * + * @return name + */ + @javax.annotation.Nonnull + public String getName() { + return name; + } + + public void setName(@javax.annotation.Nonnull String name) { + this.name = name; + } + + public CreateScheduleRequest description(@javax.annotation.Nonnull String description) { + this.description = description; + return this; + } + + /** + * Description of the job. + * + * @return description + */ + @javax.annotation.Nonnull + public String getDescription() { + return description; + } + + public void setDescription(@javax.annotation.Nonnull String description) { + this.description = description; + } + + public CreateScheduleRequest metadataType( + @javax.annotation.Nonnull MetadataTypeEnum metadataType) { + this.metadataType = metadataType; + return this; + } + + /** + * Type of the metadata object. + * + * @return metadataType + */ + @javax.annotation.Nonnull + public MetadataTypeEnum getMetadataType() { + return metadataType; + } + + public void setMetadataType(@javax.annotation.Nonnull MetadataTypeEnum metadataType) { + this.metadataType = metadataType; + } + + public CreateScheduleRequest metadataIdentifier( + @javax.annotation.Nonnull String metadataIdentifier) { + this.metadataIdentifier = metadataIdentifier; + return this; + } + + /** + * Unique ID or name of the metadata object. + * + * @return metadataIdentifier + */ + @javax.annotation.Nonnull + public String getMetadataIdentifier() { + return metadataIdentifier; + } + + public void setMetadataIdentifier(@javax.annotation.Nonnull String metadataIdentifier) { + this.metadataIdentifier = metadataIdentifier; + } + + public CreateScheduleRequest fileFormat(@javax.annotation.Nullable FileFormatEnum fileFormat) { + this.fileFormat = fileFormat; + return this; + } + + /** + * Export file format. + * + * @return fileFormat + */ + @javax.annotation.Nullable + public FileFormatEnum getFileFormat() { + return fileFormat; + } + + public void setFileFormat(@javax.annotation.Nullable FileFormatEnum fileFormat) { + this.fileFormat = fileFormat; + } + + public CreateScheduleRequest liveboardOptions( + @javax.annotation.Nullable LiveboardOptionsInput liveboardOptions) { + this.liveboardOptions = liveboardOptions; + return this; + } + + /** + * Options to specify details of Liveboard. + * + * @return liveboardOptions + */ + @javax.annotation.Nullable + public LiveboardOptionsInput getLiveboardOptions() { + return liveboardOptions; + } + + public void setLiveboardOptions( + @javax.annotation.Nullable LiveboardOptionsInput liveboardOptions) { + this.liveboardOptions = liveboardOptions; + } + + public CreateScheduleRequest pdfOptions( + @javax.annotation.Nullable SchedulesPdfOptionsInput pdfOptions) { + this.pdfOptions = pdfOptions; + return this; + } + + /** + * PDF layout and orientation settings. Applicable only if the `file_format` is + * specified as `PDF`. + * + * @return pdfOptions + */ + @javax.annotation.Nullable + public SchedulesPdfOptionsInput getPdfOptions() { + return pdfOptions; + } + + public void setPdfOptions(@javax.annotation.Nullable SchedulesPdfOptionsInput pdfOptions) { + this.pdfOptions = pdfOptions; + } + + public CreateScheduleRequest timeZone(@javax.annotation.Nonnull TimeZoneEnum timeZone) { + this.timeZone = timeZone; + return this; + } + + /** + * Time zone + * + * @return timeZone + */ + @javax.annotation.Nonnull + public TimeZoneEnum getTimeZone() { + return timeZone; + } + + public void setTimeZone(@javax.annotation.Nonnull TimeZoneEnum timeZone) { + this.timeZone = timeZone; + } + + public CreateScheduleRequest frequency(@javax.annotation.Nullable FrequencyInput frequency) { + this.frequency = frequency; + return this; + } + + /** + * Frequency settings for the scheduled job. + * + * @return frequency + */ + @javax.annotation.Nullable + public FrequencyInput getFrequency() { + return frequency; + } + + public void setFrequency(@javax.annotation.Nullable FrequencyInput frequency) { + this.frequency = frequency; + } + + public CreateScheduleRequest recipientDetails( + @javax.annotation.Nonnull RecipientDetailsInput recipientDetails) { + this.recipientDetails = recipientDetails; + return this; + } + + /** + * Recipients of the scheduled job notifications. Add the GUID or name of the ThoughtSpot users + * or groups as recipients in the `principals` array. If a recipient is not a + * ThoughtSpot user, specify email address. + * + * @return recipientDetails + */ + @javax.annotation.Nonnull + public RecipientDetailsInput getRecipientDetails() { + return recipientDetails; + } + + public void setRecipientDetails( + @javax.annotation.Nonnull RecipientDetailsInput recipientDetails) { + this.recipientDetails = recipientDetails; + } + + public CreateScheduleRequest personalisedViewId( + @javax.annotation.Nullable String personalisedViewId) { + this.personalisedViewId = personalisedViewId; + return this; + } + + /** + * Personalised view id of the liveboard to be scheduled. + * + * @return personalisedViewId + */ + @javax.annotation.Nullable + public String getPersonalisedViewId() { + return personalisedViewId; + } + + public void setPersonalisedViewId(@javax.annotation.Nullable String personalisedViewId) { + this.personalisedViewId = personalisedViewId; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key name of the property + * @param value value of the property + * @return the CreateScheduleRequest instance itself + */ + public CreateScheduleRequest putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return a map of objects + */ + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key name of the property + * @return an object + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + CreateScheduleRequest createScheduleRequest = (CreateScheduleRequest) o; + return Objects.equals(this.name, createScheduleRequest.name) + && Objects.equals(this.description, createScheduleRequest.description) + && Objects.equals(this.metadataType, createScheduleRequest.metadataType) + && Objects.equals(this.metadataIdentifier, createScheduleRequest.metadataIdentifier) + && Objects.equals(this.fileFormat, createScheduleRequest.fileFormat) + && Objects.equals(this.liveboardOptions, createScheduleRequest.liveboardOptions) + && Objects.equals(this.pdfOptions, createScheduleRequest.pdfOptions) + && Objects.equals(this.timeZone, createScheduleRequest.timeZone) + && Objects.equals(this.frequency, createScheduleRequest.frequency) + && Objects.equals(this.recipientDetails, createScheduleRequest.recipientDetails) + && Objects.equals(this.personalisedViewId, createScheduleRequest.personalisedViewId) + && Objects.equals( + this.additionalProperties, createScheduleRequest.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash( + name, + description, + metadataType, + metadataIdentifier, + fileFormat, + liveboardOptions, + pdfOptions, + timeZone, + frequency, + recipientDetails, + personalisedViewId, + additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class CreateScheduleRequest {\n"); + sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append(" description: ").append(toIndentedString(description)).append("\n"); + sb.append(" metadataType: ").append(toIndentedString(metadataType)).append("\n"); + sb.append(" metadataIdentifier: ") + .append(toIndentedString(metadataIdentifier)) + .append("\n"); + sb.append(" fileFormat: ").append(toIndentedString(fileFormat)).append("\n"); + sb.append(" liveboardOptions: ").append(toIndentedString(liveboardOptions)).append("\n"); + sb.append(" pdfOptions: ").append(toIndentedString(pdfOptions)).append("\n"); + sb.append(" timeZone: ").append(toIndentedString(timeZone)).append("\n"); + sb.append(" frequency: ").append(toIndentedString(frequency)).append("\n"); + sb.append(" recipientDetails: ").append(toIndentedString(recipientDetails)).append("\n"); + sb.append(" personalisedViewId: ") + .append(toIndentedString(personalisedViewId)) + .append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first + * line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("name"); + openapiFields.add("description"); + openapiFields.add("metadata_type"); + openapiFields.add("metadata_identifier"); + openapiFields.add("file_format"); + openapiFields.add("liveboard_options"); + openapiFields.add("pdf_options"); + openapiFields.add("time_zone"); + openapiFields.add("frequency"); + openapiFields.add("recipient_details"); + openapiFields.add("personalised_view_id"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + openapiRequiredFields.add("name"); + openapiRequiredFields.add("description"); + openapiRequiredFields.add("metadata_type"); + openapiRequiredFields.add("metadata_identifier"); + openapiRequiredFields.add("time_zone"); + openapiRequiredFields.add("recipient_details"); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to CreateScheduleRequest + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!CreateScheduleRequest.openapiRequiredFields + .isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException( + String.format( + "The required field(s) %s in CreateScheduleRequest is not found in" + + " the empty JSON string", + CreateScheduleRequest.openapiRequiredFields.toString())); + } + } + + // check to make sure all required properties/fields are present in the JSON string + for (String requiredField : CreateScheduleRequest.openapiRequiredFields) { + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException( + String.format( + "The required field `%s` is not found in the JSON string: %s", + requiredField, jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if (!jsonObj.get("name").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `name` to be a primitive type in the JSON string" + + " but got `%s`", + jsonObj.get("name").toString())); + } + if (!jsonObj.get("description").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `description` to be a primitive type in the JSON" + + " string but got `%s`", + jsonObj.get("description").toString())); + } + if (!jsonObj.get("metadata_type").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `metadata_type` to be a primitive type in the JSON" + + " string but got `%s`", + jsonObj.get("metadata_type").toString())); + } + // validate the required field `metadata_type` + MetadataTypeEnum.validateJsonElement(jsonObj.get("metadata_type")); + if (!jsonObj.get("metadata_identifier").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `metadata_identifier` to be a primitive type in" + + " the JSON string but got `%s`", + jsonObj.get("metadata_identifier").toString())); + } + if ((jsonObj.get("file_format") != null && !jsonObj.get("file_format").isJsonNull()) + && !jsonObj.get("file_format").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `file_format` to be a primitive type in the JSON" + + " string but got `%s`", + jsonObj.get("file_format").toString())); + } + // validate the optional field `file_format` + if (jsonObj.get("file_format") != null && !jsonObj.get("file_format").isJsonNull()) { + FileFormatEnum.validateJsonElement(jsonObj.get("file_format")); + } + // validate the optional field `liveboard_options` + if (jsonObj.get("liveboard_options") != null + && !jsonObj.get("liveboard_options").isJsonNull()) { + LiveboardOptionsInput.validateJsonElement(jsonObj.get("liveboard_options")); + } + // validate the optional field `pdf_options` + if (jsonObj.get("pdf_options") != null && !jsonObj.get("pdf_options").isJsonNull()) { + SchedulesPdfOptionsInput.validateJsonElement(jsonObj.get("pdf_options")); + } + if (!jsonObj.get("time_zone").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `time_zone` to be a primitive type in the JSON" + + " string but got `%s`", + jsonObj.get("time_zone").toString())); + } + // validate the required field `time_zone` + TimeZoneEnum.validateJsonElement(jsonObj.get("time_zone")); + // validate the optional field `frequency` + if (jsonObj.get("frequency") != null && !jsonObj.get("frequency").isJsonNull()) { + FrequencyInput.validateJsonElement(jsonObj.get("frequency")); + } + // validate the required field `recipient_details` + RecipientDetailsInput.validateJsonElement(jsonObj.get("recipient_details")); + if ((jsonObj.get("personalised_view_id") != null + && !jsonObj.get("personalised_view_id").isJsonNull()) + && !jsonObj.get("personalised_view_id").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `personalised_view_id` to be a primitive type in" + + " the JSON string but got `%s`", + jsonObj.get("personalised_view_id").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!CreateScheduleRequest.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'CreateScheduleRequest' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter = + gson.getDelegateAdapter(this, TypeToken.get(CreateScheduleRequest.class)); + + return (TypeAdapter) + new TypeAdapter() { + @Override + public void write(JsonWriter out, CreateScheduleRequest value) + throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + obj.remove("additionalProperties"); + // serialize additional properties + if (value.getAdditionalProperties() != null) { + for (Map.Entry entry : + value.getAdditionalProperties().entrySet()) { + if (entry.getValue() instanceof String) + obj.addProperty(entry.getKey(), (String) entry.getValue()); + else if (entry.getValue() instanceof Number) + obj.addProperty(entry.getKey(), (Number) entry.getValue()); + else if (entry.getValue() instanceof Boolean) + obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); + else if (entry.getValue() instanceof Character) + obj.addProperty( + entry.getKey(), (Character) entry.getValue()); + else { + JsonElement jsonElement = gson.toJsonTree(entry.getValue()); + if (jsonElement.isJsonArray()) { + obj.add(entry.getKey(), jsonElement.getAsJsonArray()); + } else { + obj.add(entry.getKey(), jsonElement.getAsJsonObject()); + } + } + } + } + elementAdapter.write(out, obj); + } + + @Override + public CreateScheduleRequest read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // store additional fields in the deserialized instance + CreateScheduleRequest instance = thisAdapter.fromJsonTree(jsonObj); + for (Map.Entry entry : jsonObj.entrySet()) { + if (!openapiFields.contains(entry.getKey())) { + if (entry.getValue().isJsonPrimitive()) { // primitive type + if (entry.getValue().getAsJsonPrimitive().isString()) + instance.putAdditionalProperty( + entry.getKey(), entry.getValue().getAsString()); + else if (entry.getValue().getAsJsonPrimitive().isNumber()) + instance.putAdditionalProperty( + entry.getKey(), entry.getValue().getAsNumber()); + else if (entry.getValue().getAsJsonPrimitive().isBoolean()) + instance.putAdditionalProperty( + entry.getKey(), + entry.getValue().getAsBoolean()); + else + throw new IllegalArgumentException( + String.format( + "The field `%s` has unknown primitive" + + " type. Value: %s", + entry.getKey(), + entry.getValue().toString())); + } else if (entry.getValue().isJsonArray()) { + instance.putAdditionalProperty( + entry.getKey(), + gson.fromJson(entry.getValue(), List.class)); + } else { // JSON object + instance.putAdditionalProperty( + entry.getKey(), + gson.fromJson(entry.getValue(), HashMap.class)); + } + } + } + return instance; + } + }.nullSafe(); + } + } + + /** + * Create an instance of CreateScheduleRequest given an JSON string + * + * @param jsonString JSON string + * @return An instance of CreateScheduleRequest + * @throws IOException if the JSON string is invalid with respect to CreateScheduleRequest + */ + public static CreateScheduleRequest fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, CreateScheduleRequest.class); + } + + /** + * Convert an instance of CreateScheduleRequest to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} diff --git a/sdks/java/src/main/java/com/thoughtspot/client/model/CreateTagRequest.java b/sdks/java/src/main/java/com/thoughtspot/client/model/CreateTagRequest.java new file mode 100644 index 000000000..3109a2a35 --- /dev/null +++ b/sdks/java/src/main/java/com/thoughtspot/client/model/CreateTagRequest.java @@ -0,0 +1,337 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client.model; + +import com.google.gson.Gson; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.TypeAdapter; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.annotations.SerializedName; +import com.google.gson.reflect.TypeToken; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import com.thoughtspot.client.JSON; +import java.io.IOException; +import java.io.Serializable; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Objects; + +/** CreateTagRequest */ +@javax.annotation.Generated( + value = "org.openapitools.codegen.languages.JavaClientCodegen", + comments = "Generator version: 7.12.0") +public class CreateTagRequest implements Serializable { + private static final long serialVersionUID = 1L; + + public static final String SERIALIZED_NAME_NAME = "name"; + + @SerializedName(SERIALIZED_NAME_NAME) + @javax.annotation.Nonnull + private String name; + + public static final String SERIALIZED_NAME_COLOR = "color"; + + @SerializedName(SERIALIZED_NAME_COLOR) + @javax.annotation.Nullable + private String color; + + public CreateTagRequest() {} + + public CreateTagRequest name(@javax.annotation.Nonnull String name) { + this.name = name; + return this; + } + + /** + * Name of the tag. + * + * @return name + */ + @javax.annotation.Nonnull + public String getName() { + return name; + } + + public void setName(@javax.annotation.Nonnull String name) { + this.name = name; + } + + public CreateTagRequest color(@javax.annotation.Nullable String color) { + this.color = color; + return this; + } + + /** + * Hex color code to be assigned to the tag. For example, #ff78a9. + * + * @return color + */ + @javax.annotation.Nullable + public String getColor() { + return color; + } + + public void setColor(@javax.annotation.Nullable String color) { + this.color = color; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key name of the property + * @param value value of the property + * @return the CreateTagRequest instance itself + */ + public CreateTagRequest putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return a map of objects + */ + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key name of the property + * @return an object + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + CreateTagRequest createTagRequest = (CreateTagRequest) o; + return Objects.equals(this.name, createTagRequest.name) + && Objects.equals(this.color, createTagRequest.color) + && Objects.equals(this.additionalProperties, createTagRequest.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(name, color, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class CreateTagRequest {\n"); + sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append(" color: ").append(toIndentedString(color)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first + * line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("name"); + openapiFields.add("color"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + openapiRequiredFields.add("name"); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to CreateTagRequest + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!CreateTagRequest.openapiRequiredFields + .isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException( + String.format( + "The required field(s) %s in CreateTagRequest is not found in the" + + " empty JSON string", + CreateTagRequest.openapiRequiredFields.toString())); + } + } + + // check to make sure all required properties/fields are present in the JSON string + for (String requiredField : CreateTagRequest.openapiRequiredFields) { + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException( + String.format( + "The required field `%s` is not found in the JSON string: %s", + requiredField, jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if (!jsonObj.get("name").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `name` to be a primitive type in the JSON string" + + " but got `%s`", + jsonObj.get("name").toString())); + } + if ((jsonObj.get("color") != null && !jsonObj.get("color").isJsonNull()) + && !jsonObj.get("color").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `color` to be a primitive type in the JSON string" + + " but got `%s`", + jsonObj.get("color").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!CreateTagRequest.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'CreateTagRequest' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter = + gson.getDelegateAdapter(this, TypeToken.get(CreateTagRequest.class)); + + return (TypeAdapter) + new TypeAdapter() { + @Override + public void write(JsonWriter out, CreateTagRequest value) + throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + obj.remove("additionalProperties"); + // serialize additional properties + if (value.getAdditionalProperties() != null) { + for (Map.Entry entry : + value.getAdditionalProperties().entrySet()) { + if (entry.getValue() instanceof String) + obj.addProperty(entry.getKey(), (String) entry.getValue()); + else if (entry.getValue() instanceof Number) + obj.addProperty(entry.getKey(), (Number) entry.getValue()); + else if (entry.getValue() instanceof Boolean) + obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); + else if (entry.getValue() instanceof Character) + obj.addProperty( + entry.getKey(), (Character) entry.getValue()); + else { + JsonElement jsonElement = gson.toJsonTree(entry.getValue()); + if (jsonElement.isJsonArray()) { + obj.add(entry.getKey(), jsonElement.getAsJsonArray()); + } else { + obj.add(entry.getKey(), jsonElement.getAsJsonObject()); + } + } + } + } + elementAdapter.write(out, obj); + } + + @Override + public CreateTagRequest read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // store additional fields in the deserialized instance + CreateTagRequest instance = thisAdapter.fromJsonTree(jsonObj); + for (Map.Entry entry : jsonObj.entrySet()) { + if (!openapiFields.contains(entry.getKey())) { + if (entry.getValue().isJsonPrimitive()) { // primitive type + if (entry.getValue().getAsJsonPrimitive().isString()) + instance.putAdditionalProperty( + entry.getKey(), entry.getValue().getAsString()); + else if (entry.getValue().getAsJsonPrimitive().isNumber()) + instance.putAdditionalProperty( + entry.getKey(), entry.getValue().getAsNumber()); + else if (entry.getValue().getAsJsonPrimitive().isBoolean()) + instance.putAdditionalProperty( + entry.getKey(), + entry.getValue().getAsBoolean()); + else + throw new IllegalArgumentException( + String.format( + "The field `%s` has unknown primitive" + + " type. Value: %s", + entry.getKey(), + entry.getValue().toString())); + } else if (entry.getValue().isJsonArray()) { + instance.putAdditionalProperty( + entry.getKey(), + gson.fromJson(entry.getValue(), List.class)); + } else { // JSON object + instance.putAdditionalProperty( + entry.getKey(), + gson.fromJson(entry.getValue(), HashMap.class)); + } + } + } + return instance; + } + }.nullSafe(); + } + } + + /** + * Create an instance of CreateTagRequest given an JSON string + * + * @param jsonString JSON string + * @return An instance of CreateTagRequest + * @throws IOException if the JSON string is invalid with respect to CreateTagRequest + */ + public static CreateTagRequest fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, CreateTagRequest.class); + } + + /** + * Convert an instance of CreateTagRequest to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} diff --git a/sdks/java/src/main/java/com/thoughtspot/client/model/CreateUserGroupRequest.java b/sdks/java/src/main/java/com/thoughtspot/client/model/CreateUserGroupRequest.java new file mode 100644 index 000000000..ae7de95a1 --- /dev/null +++ b/sdks/java/src/main/java/com/thoughtspot/client/model/CreateUserGroupRequest.java @@ -0,0 +1,940 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client.model; + +import com.google.gson.Gson; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.TypeAdapter; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.reflect.TypeToken; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import com.thoughtspot.client.JSON; +import java.io.IOException; +import java.io.Serializable; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Objects; + +/** CreateUserGroupRequest */ +@javax.annotation.Generated( + value = "org.openapitools.codegen.languages.JavaClientCodegen", + comments = "Generator version: 7.12.0") +public class CreateUserGroupRequest implements Serializable { + private static final long serialVersionUID = 1L; + + public static final String SERIALIZED_NAME_NAME = "name"; + + @SerializedName(SERIALIZED_NAME_NAME) + @javax.annotation.Nonnull + private String name; + + public static final String SERIALIZED_NAME_DISPLAY_NAME = "display_name"; + + @SerializedName(SERIALIZED_NAME_DISPLAY_NAME) + @javax.annotation.Nonnull + private String displayName; + + public static final String SERIALIZED_NAME_DEFAULT_LIVEBOARD_IDENTIFIERS = + "default_liveboard_identifiers"; + + @SerializedName(SERIALIZED_NAME_DEFAULT_LIVEBOARD_IDENTIFIERS) + @javax.annotation.Nullable + private List defaultLiveboardIdentifiers; + + public static final String SERIALIZED_NAME_DESCRIPTION = "description"; + + @SerializedName(SERIALIZED_NAME_DESCRIPTION) + @javax.annotation.Nullable + private String description; + + /** Gets or Sets privileges */ + @JsonAdapter(PrivilegesEnum.Adapter.class) + public enum PrivilegesEnum { + ADMINISTRATION("ADMINISTRATION"), + + AUTHORING("AUTHORING"), + + USERDATAUPLOADING("USERDATAUPLOADING"), + + DATADOWNLOADING("DATADOWNLOADING"), + + USERMANAGEMENT("USERMANAGEMENT"), + + DATAMANAGEMENT("DATAMANAGEMENT"), + + SHAREWITHALL("SHAREWITHALL"), + + JOBSCHEDULING("JOBSCHEDULING"), + + A3_ANALYSIS("A3ANALYSIS"), + + EXPERIMENTALFEATUREPRIVILEGE("EXPERIMENTALFEATUREPRIVILEGE"), + + BYPASSRLS("BYPASSRLS"), + + RANALYSIS("RANALYSIS"), + + DEVELOPER("DEVELOPER"), + + USER_ADMINISTRATION("USER_ADMINISTRATION"), + + GROUP_ADMINISTRATION("GROUP_ADMINISTRATION"), + + SYNCMANAGEMENT("SYNCMANAGEMENT"), + + CAN_CREATE_CATALOG("CAN_CREATE_CATALOG"), + + DISABLE_PINBOARD_CREATION("DISABLE_PINBOARD_CREATION"), + + LIVEBOARD_VERIFIER("LIVEBOARD_VERIFIER"), + + PREVIEW_THOUGHTSPOT_SAGE("PREVIEW_THOUGHTSPOT_SAGE"), + + CAN_MANAGE_VERSION_CONTROL("CAN_MANAGE_VERSION_CONTROL"), + + THIRDPARTY_ANALYSIS("THIRDPARTY_ANALYSIS"), + + ALLOW_NON_EMBED_FULL_APP_ACCESS("ALLOW_NON_EMBED_FULL_APP_ACCESS"), + + CAN_ACCESS_ANALYST_STUDIO("CAN_ACCESS_ANALYST_STUDIO"), + + CAN_MANAGE_ANALYST_STUDIO("CAN_MANAGE_ANALYST_STUDIO"), + + CAN_MODIFY_FOLDERS("CAN_MODIFY_FOLDERS"), + + CAN_MANAGE_VARIABLES("CAN_MANAGE_VARIABLES"), + + CAN_VIEW_FOLDERS("CAN_VIEW_FOLDERS"), + + CAN_MANAGE_AGENTSPOT("CAN_MANAGE_AGENTSPOT"), + + CAN_ACCESS_AGENTSPOT("CAN_ACCESS_AGENTSPOT"), + + PREVIEW_DOCUMENT_SEARCH("PREVIEW_DOCUMENT_SEARCH"), + + CAN_SETUP_VERSION_CONTROL("CAN_SETUP_VERSION_CONTROL"), + + CAN_DOWNLOAD_VISUALS("CAN_DOWNLOAD_VISUALS"), + + CAN_DOWNLOAD_DETAILED_DATA("CAN_DOWNLOAD_DETAILED_DATA"), + + CAN_USE_SPOTTER("CAN_USE_SPOTTER"); + + private String value; + + PrivilegesEnum(String value) { + this.value = value; + } + + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + public static PrivilegesEnum fromValue(String value) { + for (PrivilegesEnum b : PrivilegesEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + + public static class Adapter extends TypeAdapter { + @Override + public void write(final JsonWriter jsonWriter, final PrivilegesEnum enumeration) + throws IOException { + jsonWriter.value(enumeration.getValue()); + } + + @Override + public PrivilegesEnum read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + return PrivilegesEnum.fromValue(value); + } + } + + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + String value = jsonElement.getAsString(); + PrivilegesEnum.fromValue(value); + } + } + + public static final String SERIALIZED_NAME_PRIVILEGES = "privileges"; + + @SerializedName(SERIALIZED_NAME_PRIVILEGES) + @javax.annotation.Nullable + private List privileges; + + public static final String SERIALIZED_NAME_SUB_GROUP_IDENTIFIERS = "sub_group_identifiers"; + + @SerializedName(SERIALIZED_NAME_SUB_GROUP_IDENTIFIERS) + @javax.annotation.Nullable + private List subGroupIdentifiers; + + /** Group type. */ + @JsonAdapter(TypeEnum.Adapter.class) + public enum TypeEnum { + LOCAL_GROUP("LOCAL_GROUP"), + + LDAP_GROUP("LDAP_GROUP"), + + TEAM_GROUP("TEAM_GROUP"), + + TENANT_GROUP("TENANT_GROUP"); + + private String value; + + TypeEnum(String value) { + this.value = value; + } + + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + public static TypeEnum fromValue(String value) { + for (TypeEnum b : TypeEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + + public static class Adapter extends TypeAdapter { + @Override + public void write(final JsonWriter jsonWriter, final TypeEnum enumeration) + throws IOException { + jsonWriter.value(enumeration.getValue()); + } + + @Override + public TypeEnum read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + return TypeEnum.fromValue(value); + } + } + + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + String value = jsonElement.getAsString(); + TypeEnum.fromValue(value); + } + } + + public static final String SERIALIZED_NAME_TYPE = "type"; + + @SerializedName(SERIALIZED_NAME_TYPE) + @javax.annotation.Nullable + private TypeEnum type = TypeEnum.LOCAL_GROUP; + + public static final String SERIALIZED_NAME_USER_IDENTIFIERS = "user_identifiers"; + + @SerializedName(SERIALIZED_NAME_USER_IDENTIFIERS) + @javax.annotation.Nullable + private List userIdentifiers; + + /** + * Visibility of the group. To make a group visible to other users and groups, set the + * visibility to SHAREABLE. + */ + @JsonAdapter(VisibilityEnum.Adapter.class) + public enum VisibilityEnum { + SHARABLE("SHARABLE"), + + NON_SHARABLE("NON_SHARABLE"); + + private String value; + + VisibilityEnum(String value) { + this.value = value; + } + + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + public static VisibilityEnum fromValue(String value) { + for (VisibilityEnum b : VisibilityEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + + public static class Adapter extends TypeAdapter { + @Override + public void write(final JsonWriter jsonWriter, final VisibilityEnum enumeration) + throws IOException { + jsonWriter.value(enumeration.getValue()); + } + + @Override + public VisibilityEnum read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + return VisibilityEnum.fromValue(value); + } + } + + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + String value = jsonElement.getAsString(); + VisibilityEnum.fromValue(value); + } + } + + public static final String SERIALIZED_NAME_VISIBILITY = "visibility"; + + @SerializedName(SERIALIZED_NAME_VISIBILITY) + @javax.annotation.Nullable + private VisibilityEnum visibility = VisibilityEnum.SHARABLE; + + public static final String SERIALIZED_NAME_ROLE_IDENTIFIERS = "role_identifiers"; + + @SerializedName(SERIALIZED_NAME_ROLE_IDENTIFIERS) + @javax.annotation.Nullable + private List roleIdentifiers; + + public CreateUserGroupRequest() {} + + public CreateUserGroupRequest name(@javax.annotation.Nonnull String name) { + this.name = name; + return this; + } + + /** + * Name of the group. The group name must be unique. + * + * @return name + */ + @javax.annotation.Nonnull + public String getName() { + return name; + } + + public void setName(@javax.annotation.Nonnull String name) { + this.name = name; + } + + public CreateUserGroupRequest displayName(@javax.annotation.Nonnull String displayName) { + this.displayName = displayName; + return this; + } + + /** + * Display name for the group. + * + * @return displayName + */ + @javax.annotation.Nonnull + public String getDisplayName() { + return displayName; + } + + public void setDisplayName(@javax.annotation.Nonnull String displayName) { + this.displayName = displayName; + } + + public CreateUserGroupRequest defaultLiveboardIdentifiers( + @javax.annotation.Nullable List defaultLiveboardIdentifiers) { + this.defaultLiveboardIdentifiers = defaultLiveboardIdentifiers; + return this; + } + + public CreateUserGroupRequest addDefaultLiveboardIdentifiersItem( + String defaultLiveboardIdentifiersItem) { + if (this.defaultLiveboardIdentifiers == null) { + this.defaultLiveboardIdentifiers = new ArrayList<>(); + } + this.defaultLiveboardIdentifiers.add(defaultLiveboardIdentifiersItem); + return this; + } + + /** + * GUID of the Liveboards to assign as default Liveboards to the users in the group. + * + * @return defaultLiveboardIdentifiers + */ + @javax.annotation.Nullable + public List getDefaultLiveboardIdentifiers() { + return defaultLiveboardIdentifiers; + } + + public void setDefaultLiveboardIdentifiers( + @javax.annotation.Nullable List defaultLiveboardIdentifiers) { + this.defaultLiveboardIdentifiers = defaultLiveboardIdentifiers; + } + + public CreateUserGroupRequest description(@javax.annotation.Nullable String description) { + this.description = description; + return this; + } + + /** + * Description of the group + * + * @return description + */ + @javax.annotation.Nullable + public String getDescription() { + return description; + } + + public void setDescription(@javax.annotation.Nullable String description) { + this.description = description; + } + + public CreateUserGroupRequest privileges( + @javax.annotation.Nullable List privileges) { + this.privileges = privileges; + return this; + } + + public CreateUserGroupRequest addPrivilegesItem(PrivilegesEnum privilegesItem) { + if (this.privileges == null) { + this.privileges = new ArrayList<>(); + } + this.privileges.add(privilegesItem); + return this; + } + + /** + * Privileges to assign to the group + * + * @return privileges + */ + @javax.annotation.Nullable + public List getPrivileges() { + return privileges; + } + + public void setPrivileges(@javax.annotation.Nullable List privileges) { + this.privileges = privileges; + } + + public CreateUserGroupRequest subGroupIdentifiers( + @javax.annotation.Nullable List subGroupIdentifiers) { + this.subGroupIdentifiers = subGroupIdentifiers; + return this; + } + + public CreateUserGroupRequest addSubGroupIdentifiersItem(String subGroupIdentifiersItem) { + if (this.subGroupIdentifiers == null) { + this.subGroupIdentifiers = new ArrayList<>(); + } + this.subGroupIdentifiers.add(subGroupIdentifiersItem); + return this; + } + + /** + * GUID or name of the sub groups. A subgroup is a group assigned to a parent group. + * + * @return subGroupIdentifiers + */ + @javax.annotation.Nullable + public List getSubGroupIdentifiers() { + return subGroupIdentifiers; + } + + public void setSubGroupIdentifiers( + @javax.annotation.Nullable List subGroupIdentifiers) { + this.subGroupIdentifiers = subGroupIdentifiers; + } + + public CreateUserGroupRequest type(@javax.annotation.Nullable TypeEnum type) { + this.type = type; + return this; + } + + /** + * Group type. + * + * @return type + */ + @javax.annotation.Nullable + public TypeEnum getType() { + return type; + } + + public void setType(@javax.annotation.Nullable TypeEnum type) { + this.type = type; + } + + public CreateUserGroupRequest userIdentifiers( + @javax.annotation.Nullable List userIdentifiers) { + this.userIdentifiers = userIdentifiers; + return this; + } + + public CreateUserGroupRequest addUserIdentifiersItem(String userIdentifiersItem) { + if (this.userIdentifiers == null) { + this.userIdentifiers = new ArrayList<>(); + } + this.userIdentifiers.add(userIdentifiersItem); + return this; + } + + /** + * GUID or name of the users to assign to the group. + * + * @return userIdentifiers + */ + @javax.annotation.Nullable + public List getUserIdentifiers() { + return userIdentifiers; + } + + public void setUserIdentifiers(@javax.annotation.Nullable List userIdentifiers) { + this.userIdentifiers = userIdentifiers; + } + + public CreateUserGroupRequest visibility(@javax.annotation.Nullable VisibilityEnum visibility) { + this.visibility = visibility; + return this; + } + + /** + * Visibility of the group. To make a group visible to other users and groups, set the + * visibility to SHAREABLE. + * + * @return visibility + */ + @javax.annotation.Nullable + public VisibilityEnum getVisibility() { + return visibility; + } + + public void setVisibility(@javax.annotation.Nullable VisibilityEnum visibility) { + this.visibility = visibility; + } + + public CreateUserGroupRequest roleIdentifiers( + @javax.annotation.Nullable List roleIdentifiers) { + this.roleIdentifiers = roleIdentifiers; + return this; + } + + public CreateUserGroupRequest addRoleIdentifiersItem(String roleIdentifiersItem) { + if (this.roleIdentifiers == null) { + this.roleIdentifiers = new ArrayList<>(); + } + this.roleIdentifiers.add(roleIdentifiersItem); + return this; + } + + /** + * Role identifiers of the roles that should be assigned to the group. + * + * @return roleIdentifiers + */ + @javax.annotation.Nullable + public List getRoleIdentifiers() { + return roleIdentifiers; + } + + public void setRoleIdentifiers(@javax.annotation.Nullable List roleIdentifiers) { + this.roleIdentifiers = roleIdentifiers; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key name of the property + * @param value value of the property + * @return the CreateUserGroupRequest instance itself + */ + public CreateUserGroupRequest putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return a map of objects + */ + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key name of the property + * @return an object + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + CreateUserGroupRequest createUserGroupRequest = (CreateUserGroupRequest) o; + return Objects.equals(this.name, createUserGroupRequest.name) + && Objects.equals(this.displayName, createUserGroupRequest.displayName) + && Objects.equals( + this.defaultLiveboardIdentifiers, + createUserGroupRequest.defaultLiveboardIdentifiers) + && Objects.equals(this.description, createUserGroupRequest.description) + && Objects.equals(this.privileges, createUserGroupRequest.privileges) + && Objects.equals( + this.subGroupIdentifiers, createUserGroupRequest.subGroupIdentifiers) + && Objects.equals(this.type, createUserGroupRequest.type) + && Objects.equals(this.userIdentifiers, createUserGroupRequest.userIdentifiers) + && Objects.equals(this.visibility, createUserGroupRequest.visibility) + && Objects.equals(this.roleIdentifiers, createUserGroupRequest.roleIdentifiers) + && Objects.equals( + this.additionalProperties, createUserGroupRequest.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash( + name, + displayName, + defaultLiveboardIdentifiers, + description, + privileges, + subGroupIdentifiers, + type, + userIdentifiers, + visibility, + roleIdentifiers, + additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class CreateUserGroupRequest {\n"); + sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append(" displayName: ").append(toIndentedString(displayName)).append("\n"); + sb.append(" defaultLiveboardIdentifiers: ") + .append(toIndentedString(defaultLiveboardIdentifiers)) + .append("\n"); + sb.append(" description: ").append(toIndentedString(description)).append("\n"); + sb.append(" privileges: ").append(toIndentedString(privileges)).append("\n"); + sb.append(" subGroupIdentifiers: ") + .append(toIndentedString(subGroupIdentifiers)) + .append("\n"); + sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append(" userIdentifiers: ").append(toIndentedString(userIdentifiers)).append("\n"); + sb.append(" visibility: ").append(toIndentedString(visibility)).append("\n"); + sb.append(" roleIdentifiers: ").append(toIndentedString(roleIdentifiers)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first + * line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("name"); + openapiFields.add("display_name"); + openapiFields.add("default_liveboard_identifiers"); + openapiFields.add("description"); + openapiFields.add("privileges"); + openapiFields.add("sub_group_identifiers"); + openapiFields.add("type"); + openapiFields.add("user_identifiers"); + openapiFields.add("visibility"); + openapiFields.add("role_identifiers"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + openapiRequiredFields.add("name"); + openapiRequiredFields.add("display_name"); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to CreateUserGroupRequest + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!CreateUserGroupRequest.openapiRequiredFields + .isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException( + String.format( + "The required field(s) %s in CreateUserGroupRequest is not found" + + " in the empty JSON string", + CreateUserGroupRequest.openapiRequiredFields.toString())); + } + } + + // check to make sure all required properties/fields are present in the JSON string + for (String requiredField : CreateUserGroupRequest.openapiRequiredFields) { + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException( + String.format( + "The required field `%s` is not found in the JSON string: %s", + requiredField, jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if (!jsonObj.get("name").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `name` to be a primitive type in the JSON string" + + " but got `%s`", + jsonObj.get("name").toString())); + } + if (!jsonObj.get("display_name").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `display_name` to be a primitive type in the JSON" + + " string but got `%s`", + jsonObj.get("display_name").toString())); + } + // ensure the optional json data is an array if present + if (jsonObj.get("default_liveboard_identifiers") != null + && !jsonObj.get("default_liveboard_identifiers").isJsonNull() + && !jsonObj.get("default_liveboard_identifiers").isJsonArray()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `default_liveboard_identifiers` to be an array in" + + " the JSON string but got `%s`", + jsonObj.get("default_liveboard_identifiers").toString())); + } + if ((jsonObj.get("description") != null && !jsonObj.get("description").isJsonNull()) + && !jsonObj.get("description").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `description` to be a primitive type in the JSON" + + " string but got `%s`", + jsonObj.get("description").toString())); + } + // ensure the optional json data is an array if present + if (jsonObj.get("privileges") != null + && !jsonObj.get("privileges").isJsonNull() + && !jsonObj.get("privileges").isJsonArray()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `privileges` to be an array in the JSON string but" + + " got `%s`", + jsonObj.get("privileges").toString())); + } + // ensure the optional json data is an array if present + if (jsonObj.get("sub_group_identifiers") != null + && !jsonObj.get("sub_group_identifiers").isJsonNull() + && !jsonObj.get("sub_group_identifiers").isJsonArray()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `sub_group_identifiers` to be an array in the JSON" + + " string but got `%s`", + jsonObj.get("sub_group_identifiers").toString())); + } + if ((jsonObj.get("type") != null && !jsonObj.get("type").isJsonNull()) + && !jsonObj.get("type").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `type` to be a primitive type in the JSON string" + + " but got `%s`", + jsonObj.get("type").toString())); + } + // validate the optional field `type` + if (jsonObj.get("type") != null && !jsonObj.get("type").isJsonNull()) { + TypeEnum.validateJsonElement(jsonObj.get("type")); + } + // ensure the optional json data is an array if present + if (jsonObj.get("user_identifiers") != null + && !jsonObj.get("user_identifiers").isJsonNull() + && !jsonObj.get("user_identifiers").isJsonArray()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `user_identifiers` to be an array in the JSON" + + " string but got `%s`", + jsonObj.get("user_identifiers").toString())); + } + if ((jsonObj.get("visibility") != null && !jsonObj.get("visibility").isJsonNull()) + && !jsonObj.get("visibility").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `visibility` to be a primitive type in the JSON" + + " string but got `%s`", + jsonObj.get("visibility").toString())); + } + // validate the optional field `visibility` + if (jsonObj.get("visibility") != null && !jsonObj.get("visibility").isJsonNull()) { + VisibilityEnum.validateJsonElement(jsonObj.get("visibility")); + } + // ensure the optional json data is an array if present + if (jsonObj.get("role_identifiers") != null + && !jsonObj.get("role_identifiers").isJsonNull() + && !jsonObj.get("role_identifiers").isJsonArray()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `role_identifiers` to be an array in the JSON" + + " string but got `%s`", + jsonObj.get("role_identifiers").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!CreateUserGroupRequest.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'CreateUserGroupRequest' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter = + gson.getDelegateAdapter(this, TypeToken.get(CreateUserGroupRequest.class)); + + return (TypeAdapter) + new TypeAdapter() { + @Override + public void write(JsonWriter out, CreateUserGroupRequest value) + throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + obj.remove("additionalProperties"); + // serialize additional properties + if (value.getAdditionalProperties() != null) { + for (Map.Entry entry : + value.getAdditionalProperties().entrySet()) { + if (entry.getValue() instanceof String) + obj.addProperty(entry.getKey(), (String) entry.getValue()); + else if (entry.getValue() instanceof Number) + obj.addProperty(entry.getKey(), (Number) entry.getValue()); + else if (entry.getValue() instanceof Boolean) + obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); + else if (entry.getValue() instanceof Character) + obj.addProperty( + entry.getKey(), (Character) entry.getValue()); + else { + JsonElement jsonElement = gson.toJsonTree(entry.getValue()); + if (jsonElement.isJsonArray()) { + obj.add(entry.getKey(), jsonElement.getAsJsonArray()); + } else { + obj.add(entry.getKey(), jsonElement.getAsJsonObject()); + } + } + } + } + elementAdapter.write(out, obj); + } + + @Override + public CreateUserGroupRequest read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // store additional fields in the deserialized instance + CreateUserGroupRequest instance = thisAdapter.fromJsonTree(jsonObj); + for (Map.Entry entry : jsonObj.entrySet()) { + if (!openapiFields.contains(entry.getKey())) { + if (entry.getValue().isJsonPrimitive()) { // primitive type + if (entry.getValue().getAsJsonPrimitive().isString()) + instance.putAdditionalProperty( + entry.getKey(), entry.getValue().getAsString()); + else if (entry.getValue().getAsJsonPrimitive().isNumber()) + instance.putAdditionalProperty( + entry.getKey(), entry.getValue().getAsNumber()); + else if (entry.getValue().getAsJsonPrimitive().isBoolean()) + instance.putAdditionalProperty( + entry.getKey(), + entry.getValue().getAsBoolean()); + else + throw new IllegalArgumentException( + String.format( + "The field `%s` has unknown primitive" + + " type. Value: %s", + entry.getKey(), + entry.getValue().toString())); + } else if (entry.getValue().isJsonArray()) { + instance.putAdditionalProperty( + entry.getKey(), + gson.fromJson(entry.getValue(), List.class)); + } else { // JSON object + instance.putAdditionalProperty( + entry.getKey(), + gson.fromJson(entry.getValue(), HashMap.class)); + } + } + } + return instance; + } + }.nullSafe(); + } + } + + /** + * Create an instance of CreateUserGroupRequest given an JSON string + * + * @param jsonString JSON string + * @return An instance of CreateUserGroupRequest + * @throws IOException if the JSON string is invalid with respect to CreateUserGroupRequest + */ + public static CreateUserGroupRequest fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, CreateUserGroupRequest.class); + } + + /** + * Convert an instance of CreateUserGroupRequest to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} diff --git a/sdks/java/src/main/java/com/thoughtspot/client/model/CreateUserRequest.java b/sdks/java/src/main/java/com/thoughtspot/client/model/CreateUserRequest.java new file mode 100644 index 000000000..f542ddeee --- /dev/null +++ b/sdks/java/src/main/java/com/thoughtspot/client/model/CreateUserRequest.java @@ -0,0 +1,1356 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client.model; + +import com.google.gson.Gson; +import com.google.gson.JsonArray; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.TypeAdapter; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.reflect.TypeToken; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import com.thoughtspot.client.JSON; +import java.io.IOException; +import java.io.Serializable; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Objects; +import org.openapitools.jackson.nullable.JsonNullable; + +/** CreateUserRequest */ +@javax.annotation.Generated( + value = "org.openapitools.codegen.languages.JavaClientCodegen", + comments = "Generator version: 7.12.0") +public class CreateUserRequest implements Serializable { + private static final long serialVersionUID = 1L; + + public static final String SERIALIZED_NAME_NAME = "name"; + + @SerializedName(SERIALIZED_NAME_NAME) + @javax.annotation.Nonnull + private String name; + + public static final String SERIALIZED_NAME_DISPLAY_NAME = "display_name"; + + @SerializedName(SERIALIZED_NAME_DISPLAY_NAME) + @javax.annotation.Nonnull + private String displayName; + + public static final String SERIALIZED_NAME_PASSWORD = "password"; + + @SerializedName(SERIALIZED_NAME_PASSWORD) + @javax.annotation.Nullable + private String password; + + public static final String SERIALIZED_NAME_EMAIL = "email"; + + @SerializedName(SERIALIZED_NAME_EMAIL) + @javax.annotation.Nonnull + private String email; + + /** Type of the account. */ + @JsonAdapter(AccountTypeEnum.Adapter.class) + public enum AccountTypeEnum { + LOCAL_USER("LOCAL_USER"), + + LDAP_USER("LDAP_USER"), + + SAML_USER("SAML_USER"), + + OIDC_USER("OIDC_USER"), + + REMOTE_USER("REMOTE_USER"); + + private String value; + + AccountTypeEnum(String value) { + this.value = value; + } + + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + public static AccountTypeEnum fromValue(String value) { + for (AccountTypeEnum b : AccountTypeEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + + public static class Adapter extends TypeAdapter { + @Override + public void write(final JsonWriter jsonWriter, final AccountTypeEnum enumeration) + throws IOException { + jsonWriter.value(enumeration.getValue()); + } + + @Override + public AccountTypeEnum read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + return AccountTypeEnum.fromValue(value); + } + } + + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + String value = jsonElement.getAsString(); + AccountTypeEnum.fromValue(value); + } + } + + public static final String SERIALIZED_NAME_ACCOUNT_TYPE = "account_type"; + + @SerializedName(SERIALIZED_NAME_ACCOUNT_TYPE) + @javax.annotation.Nullable + private AccountTypeEnum accountType = AccountTypeEnum.LOCAL_USER; + + /** + * Current status of the user account. The `SUSPENDED` user state indicates a + * transitional state applicable to IAMv2 users only. + */ + @JsonAdapter(AccountStatusEnum.Adapter.class) + public enum AccountStatusEnum { + ACTIVE("ACTIVE"), + + INACTIVE("INACTIVE"), + + EXPIRED("EXPIRED"), + + LOCKED("LOCKED"), + + PENDING("PENDING"), + + SUSPENDED("SUSPENDED"); + + private String value; + + AccountStatusEnum(String value) { + this.value = value; + } + + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + public static AccountStatusEnum fromValue(String value) { + for (AccountStatusEnum b : AccountStatusEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + + public static class Adapter extends TypeAdapter { + @Override + public void write(final JsonWriter jsonWriter, final AccountStatusEnum enumeration) + throws IOException { + jsonWriter.value(enumeration.getValue()); + } + + @Override + public AccountStatusEnum read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + return AccountStatusEnum.fromValue(value); + } + } + + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + String value = jsonElement.getAsString(); + AccountStatusEnum.fromValue(value); + } + } + + public static final String SERIALIZED_NAME_ACCOUNT_STATUS = "account_status"; + + @SerializedName(SERIALIZED_NAME_ACCOUNT_STATUS) + @javax.annotation.Nullable + private AccountStatusEnum accountStatus = AccountStatusEnum.ACTIVE; + + public static final String SERIALIZED_NAME_ORG_IDENTIFIERS = "org_identifiers"; + + @SerializedName(SERIALIZED_NAME_ORG_IDENTIFIERS) + @javax.annotation.Nullable + private List orgIdentifiers; + + public static final String SERIALIZED_NAME_GROUP_IDENTIFIERS = "group_identifiers"; + + @SerializedName(SERIALIZED_NAME_GROUP_IDENTIFIERS) + @javax.annotation.Nullable + private List groupIdentifiers; + + /** + * Visibility of the users. When set to SHARABLE, the user is visible to other users and groups + * when they try to share an object. + */ + @JsonAdapter(VisibilityEnum.Adapter.class) + public enum VisibilityEnum { + SHARABLE("SHARABLE"), + + NON_SHARABLE("NON_SHARABLE"); + + private String value; + + VisibilityEnum(String value) { + this.value = value; + } + + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + public static VisibilityEnum fromValue(String value) { + for (VisibilityEnum b : VisibilityEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + + public static class Adapter extends TypeAdapter { + @Override + public void write(final JsonWriter jsonWriter, final VisibilityEnum enumeration) + throws IOException { + jsonWriter.value(enumeration.getValue()); + } + + @Override + public VisibilityEnum read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + return VisibilityEnum.fromValue(value); + } + } + + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + String value = jsonElement.getAsString(); + VisibilityEnum.fromValue(value); + } + } + + public static final String SERIALIZED_NAME_VISIBILITY = "visibility"; + + @SerializedName(SERIALIZED_NAME_VISIBILITY) + @javax.annotation.Nullable + private VisibilityEnum visibility = VisibilityEnum.SHARABLE; + + public static final String SERIALIZED_NAME_NOTIFY_ON_SHARE = "notify_on_share"; + + @SerializedName(SERIALIZED_NAME_NOTIFY_ON_SHARE) + @javax.annotation.Nullable + private Boolean notifyOnShare = true; + + public static final String SERIALIZED_NAME_SHOW_ONBOARDING_EXPERIENCE = + "show_onboarding_experience"; + + @SerializedName(SERIALIZED_NAME_SHOW_ONBOARDING_EXPERIENCE) + @javax.annotation.Nullable + private Boolean showOnboardingExperience = true; + + public static final String SERIALIZED_NAME_ONBOARDING_EXPERIENCE_COMPLETED = + "onboarding_experience_completed"; + + @SerializedName(SERIALIZED_NAME_ONBOARDING_EXPERIENCE_COMPLETED) + @javax.annotation.Nullable + private Boolean onboardingExperienceCompleted = false; + + public static final String SERIALIZED_NAME_HOME_LIVEBOARD_IDENTIFIER = + "home_liveboard_identifier"; + + @SerializedName(SERIALIZED_NAME_HOME_LIVEBOARD_IDENTIFIER) + @javax.annotation.Nullable + private String homeLiveboardIdentifier; + + public static final String SERIALIZED_NAME_FAVORITE_METADATA = "favorite_metadata"; + + @SerializedName(SERIALIZED_NAME_FAVORITE_METADATA) + @javax.annotation.Nullable + private List favoriteMetadata; + + /** + * Locale for the user. When setting this value, do not set use_browser_language to true, + * otherwise the browser's language setting will take precedence and the preferred_locale + * value will be ignored. + */ + @JsonAdapter(PreferredLocaleEnum.Adapter.class) + public enum PreferredLocaleEnum { + EN_CA("en-CA"), + + EN_GB("en-GB"), + + EN_US("en-US"), + + DE_DE("de-DE"), + + JA_JP("ja-JP"), + + ZH_CN("zh-CN"), + + PT_BR("pt-BR"), + + FR_FR("fr-FR"), + + FR_CA("fr-CA"), + + ES_US("es-US"), + + DA_DK("da-DK"), + + ES_ES("es-ES"), + + FI_FI("fi-FI"), + + SV_SE("sv-SE"), + + NB_NO("nb-NO"), + + PT_PT("pt-PT"), + + NL_NL("nl-NL"), + + IT_IT("it-IT"), + + RU_RU("ru-RU"), + + EN_IN("en-IN"), + + DE_CH("de-CH"), + + EN_NZ("en-NZ"), + + ES_MX("es-MX"), + + EN_AU("en-AU"), + + ZH_HANT("zh-Hant"), + + KO_KR("ko-KR"), + + EN_DE("en-DE"); + + private String value; + + PreferredLocaleEnum(String value) { + this.value = value; + } + + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + public static PreferredLocaleEnum fromValue(String value) { + for (PreferredLocaleEnum b : PreferredLocaleEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + + public static class Adapter extends TypeAdapter { + @Override + public void write(final JsonWriter jsonWriter, final PreferredLocaleEnum enumeration) + throws IOException { + jsonWriter.value(enumeration.getValue()); + } + + @Override + public PreferredLocaleEnum read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + return PreferredLocaleEnum.fromValue(value); + } + } + + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + String value = jsonElement.getAsString(); + PreferredLocaleEnum.fromValue(value); + } + } + + public static final String SERIALIZED_NAME_PREFERRED_LOCALE = "preferred_locale"; + + @SerializedName(SERIALIZED_NAME_PREFERRED_LOCALE) + @javax.annotation.Nullable + private PreferredLocaleEnum preferredLocale; + + public static final String SERIALIZED_NAME_USE_BROWSER_LANGUAGE = "use_browser_language"; + + @SerializedName(SERIALIZED_NAME_USE_BROWSER_LANGUAGE) + @javax.annotation.Nullable + private Boolean useBrowserLanguage; + + public static final String SERIALIZED_NAME_EXTENDED_PROPERTIES = "extended_properties"; + + @SerializedName(SERIALIZED_NAME_EXTENDED_PROPERTIES) + @javax.annotation.Nullable + private Object extendedProperties; + + public static final String SERIALIZED_NAME_EXTENDED_PREFERENCES = "extended_preferences"; + + @SerializedName(SERIALIZED_NAME_EXTENDED_PREFERENCES) + @javax.annotation.Nullable + private Object extendedPreferences; + + public static final String SERIALIZED_NAME_TRIGGER_WELCOME_EMAIL = "trigger_welcome_email"; + + @SerializedName(SERIALIZED_NAME_TRIGGER_WELCOME_EMAIL) + @javax.annotation.Nullable + private Boolean triggerWelcomeEmail; + + public static final String SERIALIZED_NAME_TRIGGER_ACTIVATION_EMAIL = + "trigger_activation_email"; + + @SerializedName(SERIALIZED_NAME_TRIGGER_ACTIVATION_EMAIL) + @javax.annotation.Nullable + private Boolean triggerActivationEmail; + + public CreateUserRequest() {} + + public CreateUserRequest name(@javax.annotation.Nonnull String name) { + this.name = name; + return this; + } + + /** + * Name of the user. The username string must be unique. + * + * @return name + */ + @javax.annotation.Nonnull + public String getName() { + return name; + } + + public void setName(@javax.annotation.Nonnull String name) { + this.name = name; + } + + public CreateUserRequest displayName(@javax.annotation.Nonnull String displayName) { + this.displayName = displayName; + return this; + } + + /** + * A unique display name string for the user account, usually their first and last name + * + * @return displayName + */ + @javax.annotation.Nonnull + public String getDisplayName() { + return displayName; + } + + public void setDisplayName(@javax.annotation.Nonnull String displayName) { + this.displayName = displayName; + } + + public CreateUserRequest password(@javax.annotation.Nullable String password) { + this.password = password; + return this; + } + + /** + * Password for the user account. For IAMv2 users, you must set this password if you do not want + * to trigger an activation email. + * + * @return password + */ + @javax.annotation.Nullable + public String getPassword() { + return password; + } + + public void setPassword(@javax.annotation.Nullable String password) { + this.password = password; + } + + public CreateUserRequest email(@javax.annotation.Nonnull String email) { + this.email = email; + return this; + } + + /** + * Email of the user account + * + * @return email + */ + @javax.annotation.Nonnull + public String getEmail() { + return email; + } + + public void setEmail(@javax.annotation.Nonnull String email) { + this.email = email; + } + + public CreateUserRequest accountType(@javax.annotation.Nullable AccountTypeEnum accountType) { + this.accountType = accountType; + return this; + } + + /** + * Type of the account. + * + * @return accountType + */ + @javax.annotation.Nullable + public AccountTypeEnum getAccountType() { + return accountType; + } + + public void setAccountType(@javax.annotation.Nullable AccountTypeEnum accountType) { + this.accountType = accountType; + } + + public CreateUserRequest accountStatus( + @javax.annotation.Nullable AccountStatusEnum accountStatus) { + this.accountStatus = accountStatus; + return this; + } + + /** + * Current status of the user account. The `SUSPENDED` user state indicates a + * transitional state applicable to IAMv2 users only. + * + * @return accountStatus + */ + @javax.annotation.Nullable + public AccountStatusEnum getAccountStatus() { + return accountStatus; + } + + public void setAccountStatus(@javax.annotation.Nullable AccountStatusEnum accountStatus) { + this.accountStatus = accountStatus; + } + + public CreateUserRequest orgIdentifiers( + @javax.annotation.Nullable List orgIdentifiers) { + this.orgIdentifiers = orgIdentifiers; + return this; + } + + public CreateUserRequest addOrgIdentifiersItem(String orgIdentifiersItem) { + if (this.orgIdentifiers == null) { + this.orgIdentifiers = new ArrayList<>(); + } + this.orgIdentifiers.add(orgIdentifiersItem); + return this; + } + + /** + * List of Org IDs to which the user belongs. + * + * @return orgIdentifiers + */ + @javax.annotation.Nullable + public List getOrgIdentifiers() { + return orgIdentifiers; + } + + public void setOrgIdentifiers(@javax.annotation.Nullable List orgIdentifiers) { + this.orgIdentifiers = orgIdentifiers; + } + + public CreateUserRequest groupIdentifiers( + @javax.annotation.Nullable List groupIdentifiers) { + this.groupIdentifiers = groupIdentifiers; + return this; + } + + public CreateUserRequest addGroupIdentifiersItem(String groupIdentifiersItem) { + if (this.groupIdentifiers == null) { + this.groupIdentifiers = new ArrayList<>(); + } + this.groupIdentifiers.add(groupIdentifiersItem); + return this; + } + + /** + * GUIDs or names of the groups to which the newly created user belongs. + * + * @return groupIdentifiers + */ + @javax.annotation.Nullable + public List getGroupIdentifiers() { + return groupIdentifiers; + } + + public void setGroupIdentifiers(@javax.annotation.Nullable List groupIdentifiers) { + this.groupIdentifiers = groupIdentifiers; + } + + public CreateUserRequest visibility(@javax.annotation.Nullable VisibilityEnum visibility) { + this.visibility = visibility; + return this; + } + + /** + * Visibility of the users. When set to SHARABLE, the user is visible to other users and groups + * when they try to share an object. + * + * @return visibility + */ + @javax.annotation.Nullable + public VisibilityEnum getVisibility() { + return visibility; + } + + public void setVisibility(@javax.annotation.Nullable VisibilityEnum visibility) { + this.visibility = visibility; + } + + public CreateUserRequest notifyOnShare(@javax.annotation.Nullable Boolean notifyOnShare) { + this.notifyOnShare = notifyOnShare; + return this; + } + + /** + * User preference for receiving email notifications when another ThoughtSpot user shares a + * metadata object such as Answer, Liveboard, or Worksheet. + * + * @return notifyOnShare + */ + @javax.annotation.Nullable + public Boolean getNotifyOnShare() { + return notifyOnShare; + } + + public void setNotifyOnShare(@javax.annotation.Nullable Boolean notifyOnShare) { + this.notifyOnShare = notifyOnShare; + } + + public CreateUserRequest showOnboardingExperience( + @javax.annotation.Nullable Boolean showOnboardingExperience) { + this.showOnboardingExperience = showOnboardingExperience; + return this; + } + + /** + * The user preference for revisiting the onboarding experience. + * + * @return showOnboardingExperience + */ + @javax.annotation.Nullable + public Boolean getShowOnboardingExperience() { + return showOnboardingExperience; + } + + public void setShowOnboardingExperience( + @javax.annotation.Nullable Boolean showOnboardingExperience) { + this.showOnboardingExperience = showOnboardingExperience; + } + + public CreateUserRequest onboardingExperienceCompleted( + @javax.annotation.Nullable Boolean onboardingExperienceCompleted) { + this.onboardingExperienceCompleted = onboardingExperienceCompleted; + return this; + } + + /** + * flag to get the on-boarding experience is completed or not. + * + * @return onboardingExperienceCompleted + */ + @javax.annotation.Nullable + public Boolean getOnboardingExperienceCompleted() { + return onboardingExperienceCompleted; + } + + public void setOnboardingExperienceCompleted( + @javax.annotation.Nullable Boolean onboardingExperienceCompleted) { + this.onboardingExperienceCompleted = onboardingExperienceCompleted; + } + + public CreateUserRequest homeLiveboardIdentifier( + @javax.annotation.Nullable String homeLiveboardIdentifier) { + this.homeLiveboardIdentifier = homeLiveboardIdentifier; + return this; + } + + /** + * GUID of the Liveboard to set a default Liveboard for the user. ThoughtSpot displays this + * Liveboard on the Home page when the user logs in. + * + * @return homeLiveboardIdentifier + */ + @javax.annotation.Nullable + public String getHomeLiveboardIdentifier() { + return homeLiveboardIdentifier; + } + + public void setHomeLiveboardIdentifier( + @javax.annotation.Nullable String homeLiveboardIdentifier) { + this.homeLiveboardIdentifier = homeLiveboardIdentifier; + } + + public CreateUserRequest favoriteMetadata( + @javax.annotation.Nullable List favoriteMetadata) { + this.favoriteMetadata = favoriteMetadata; + return this; + } + + public CreateUserRequest addFavoriteMetadataItem(FavoriteMetadataInput favoriteMetadataItem) { + if (this.favoriteMetadata == null) { + this.favoriteMetadata = new ArrayList<>(); + } + this.favoriteMetadata.add(favoriteMetadataItem); + return this; + } + + /** + * Metadata objects to add to the user's favorites list. + * + * @return favoriteMetadata + */ + @javax.annotation.Nullable + public List getFavoriteMetadata() { + return favoriteMetadata; + } + + public void setFavoriteMetadata( + @javax.annotation.Nullable List favoriteMetadata) { + this.favoriteMetadata = favoriteMetadata; + } + + public CreateUserRequest preferredLocale( + @javax.annotation.Nullable PreferredLocaleEnum preferredLocale) { + this.preferredLocale = preferredLocale; + return this; + } + + /** + * Locale for the user. When setting this value, do not set use_browser_language to true, + * otherwise the browser's language setting will take precedence and the preferred_locale + * value will be ignored. + * + * @return preferredLocale + */ + @javax.annotation.Nullable + public PreferredLocaleEnum getPreferredLocale() { + return preferredLocale; + } + + public void setPreferredLocale(@javax.annotation.Nullable PreferredLocaleEnum preferredLocale) { + this.preferredLocale = preferredLocale; + } + + public CreateUserRequest useBrowserLanguage( + @javax.annotation.Nullable Boolean useBrowserLanguage) { + this.useBrowserLanguage = useBrowserLanguage; + return this; + } + + /** + * Flag to indicate whether to use the browser locale for the user in the UI. When set to true, + * the preferred_locale value is unset and the browser's language setting takes precedence. + * Version: 26.3.0.cl or later + * + * @return useBrowserLanguage + */ + @javax.annotation.Nullable + public Boolean getUseBrowserLanguage() { + return useBrowserLanguage; + } + + public void setUseBrowserLanguage(@javax.annotation.Nullable Boolean useBrowserLanguage) { + this.useBrowserLanguage = useBrowserLanguage; + } + + public CreateUserRequest extendedProperties( + @javax.annotation.Nullable Object extendedProperties) { + this.extendedProperties = extendedProperties; + return this; + } + + /** + * Properties for the user + * + * @return extendedProperties + */ + @javax.annotation.Nullable + public Object getExtendedProperties() { + return extendedProperties; + } + + public void setExtendedProperties(@javax.annotation.Nullable Object extendedProperties) { + this.extendedProperties = extendedProperties; + } + + public CreateUserRequest extendedPreferences( + @javax.annotation.Nullable Object extendedPreferences) { + this.extendedPreferences = extendedPreferences; + return this; + } + + /** + * Preferences for the user + * + * @return extendedPreferences + */ + @javax.annotation.Nullable + public Object getExtendedPreferences() { + return extendedPreferences; + } + + public void setExtendedPreferences(@javax.annotation.Nullable Object extendedPreferences) { + this.extendedPreferences = extendedPreferences; + } + + public CreateUserRequest triggerWelcomeEmail( + @javax.annotation.Nullable Boolean triggerWelcomeEmail) { + this.triggerWelcomeEmail = triggerWelcomeEmail; + return this; + } + + /** + * Flag to indicate whether welcome email should be sent to user. This parameter is applied only + * on clusters on which IAM is disabled. + * + * @return triggerWelcomeEmail + */ + @javax.annotation.Nullable + public Boolean getTriggerWelcomeEmail() { + return triggerWelcomeEmail; + } + + public void setTriggerWelcomeEmail(@javax.annotation.Nullable Boolean triggerWelcomeEmail) { + this.triggerWelcomeEmail = triggerWelcomeEmail; + } + + public CreateUserRequest triggerActivationEmail( + @javax.annotation.Nullable Boolean triggerActivationEmail) { + this.triggerActivationEmail = triggerActivationEmail; + return this; + } + + /** + * Flag to indicate whether activation email should be sent to the user. Default value for IAMv2 + * users is set to true. Users must either set this to false, or enter a valid password if they + * do not want to trigger an activation email. + * + * @return triggerActivationEmail + */ + @javax.annotation.Nullable + public Boolean getTriggerActivationEmail() { + return triggerActivationEmail; + } + + public void setTriggerActivationEmail( + @javax.annotation.Nullable Boolean triggerActivationEmail) { + this.triggerActivationEmail = triggerActivationEmail; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key name of the property + * @param value value of the property + * @return the CreateUserRequest instance itself + */ + public CreateUserRequest putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return a map of objects + */ + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key name of the property + * @return an object + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + CreateUserRequest createUserRequest = (CreateUserRequest) o; + return Objects.equals(this.name, createUserRequest.name) + && Objects.equals(this.displayName, createUserRequest.displayName) + && Objects.equals(this.password, createUserRequest.password) + && Objects.equals(this.email, createUserRequest.email) + && Objects.equals(this.accountType, createUserRequest.accountType) + && Objects.equals(this.accountStatus, createUserRequest.accountStatus) + && Objects.equals(this.orgIdentifiers, createUserRequest.orgIdentifiers) + && Objects.equals(this.groupIdentifiers, createUserRequest.groupIdentifiers) + && Objects.equals(this.visibility, createUserRequest.visibility) + && Objects.equals(this.notifyOnShare, createUserRequest.notifyOnShare) + && Objects.equals( + this.showOnboardingExperience, createUserRequest.showOnboardingExperience) + && Objects.equals( + this.onboardingExperienceCompleted, + createUserRequest.onboardingExperienceCompleted) + && Objects.equals( + this.homeLiveboardIdentifier, createUserRequest.homeLiveboardIdentifier) + && Objects.equals(this.favoriteMetadata, createUserRequest.favoriteMetadata) + && Objects.equals(this.preferredLocale, createUserRequest.preferredLocale) + && Objects.equals(this.useBrowserLanguage, createUserRequest.useBrowserLanguage) + && Objects.equals(this.extendedProperties, createUserRequest.extendedProperties) + && Objects.equals(this.extendedPreferences, createUserRequest.extendedPreferences) + && Objects.equals(this.triggerWelcomeEmail, createUserRequest.triggerWelcomeEmail) + && Objects.equals( + this.triggerActivationEmail, createUserRequest.triggerActivationEmail) + && Objects.equals( + this.additionalProperties, createUserRequest.additionalProperties); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b + || (a != null + && b != null + && a.isPresent() + && b.isPresent() + && Objects.deepEquals(a.get(), b.get())); + } + + @Override + public int hashCode() { + return Objects.hash( + name, + displayName, + password, + email, + accountType, + accountStatus, + orgIdentifiers, + groupIdentifiers, + visibility, + notifyOnShare, + showOnboardingExperience, + onboardingExperienceCompleted, + homeLiveboardIdentifier, + favoriteMetadata, + preferredLocale, + useBrowserLanguage, + extendedProperties, + extendedPreferences, + triggerWelcomeEmail, + triggerActivationEmail, + additionalProperties); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; + } + return a.isPresent() ? Arrays.deepHashCode(new Object[] {a.get()}) : 31; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class CreateUserRequest {\n"); + sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append(" displayName: ").append(toIndentedString(displayName)).append("\n"); + sb.append(" password: ").append(toIndentedString(password)).append("\n"); + sb.append(" email: ").append(toIndentedString(email)).append("\n"); + sb.append(" accountType: ").append(toIndentedString(accountType)).append("\n"); + sb.append(" accountStatus: ").append(toIndentedString(accountStatus)).append("\n"); + sb.append(" orgIdentifiers: ").append(toIndentedString(orgIdentifiers)).append("\n"); + sb.append(" groupIdentifiers: ").append(toIndentedString(groupIdentifiers)).append("\n"); + sb.append(" visibility: ").append(toIndentedString(visibility)).append("\n"); + sb.append(" notifyOnShare: ").append(toIndentedString(notifyOnShare)).append("\n"); + sb.append(" showOnboardingExperience: ") + .append(toIndentedString(showOnboardingExperience)) + .append("\n"); + sb.append(" onboardingExperienceCompleted: ") + .append(toIndentedString(onboardingExperienceCompleted)) + .append("\n"); + sb.append(" homeLiveboardIdentifier: ") + .append(toIndentedString(homeLiveboardIdentifier)) + .append("\n"); + sb.append(" favoriteMetadata: ").append(toIndentedString(favoriteMetadata)).append("\n"); + sb.append(" preferredLocale: ").append(toIndentedString(preferredLocale)).append("\n"); + sb.append(" useBrowserLanguage: ") + .append(toIndentedString(useBrowserLanguage)) + .append("\n"); + sb.append(" extendedProperties: ") + .append(toIndentedString(extendedProperties)) + .append("\n"); + sb.append(" extendedPreferences: ") + .append(toIndentedString(extendedPreferences)) + .append("\n"); + sb.append(" triggerWelcomeEmail: ") + .append(toIndentedString(triggerWelcomeEmail)) + .append("\n"); + sb.append(" triggerActivationEmail: ") + .append(toIndentedString(triggerActivationEmail)) + .append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first + * line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("name"); + openapiFields.add("display_name"); + openapiFields.add("password"); + openapiFields.add("email"); + openapiFields.add("account_type"); + openapiFields.add("account_status"); + openapiFields.add("org_identifiers"); + openapiFields.add("group_identifiers"); + openapiFields.add("visibility"); + openapiFields.add("notify_on_share"); + openapiFields.add("show_onboarding_experience"); + openapiFields.add("onboarding_experience_completed"); + openapiFields.add("home_liveboard_identifier"); + openapiFields.add("favorite_metadata"); + openapiFields.add("preferred_locale"); + openapiFields.add("use_browser_language"); + openapiFields.add("extended_properties"); + openapiFields.add("extended_preferences"); + openapiFields.add("trigger_welcome_email"); + openapiFields.add("trigger_activation_email"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + openapiRequiredFields.add("name"); + openapiRequiredFields.add("display_name"); + openapiRequiredFields.add("email"); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to CreateUserRequest + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!CreateUserRequest.openapiRequiredFields + .isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException( + String.format( + "The required field(s) %s in CreateUserRequest is not found in the" + + " empty JSON string", + CreateUserRequest.openapiRequiredFields.toString())); + } + } + + // check to make sure all required properties/fields are present in the JSON string + for (String requiredField : CreateUserRequest.openapiRequiredFields) { + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException( + String.format( + "The required field `%s` is not found in the JSON string: %s", + requiredField, jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if (!jsonObj.get("name").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `name` to be a primitive type in the JSON string" + + " but got `%s`", + jsonObj.get("name").toString())); + } + if (!jsonObj.get("display_name").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `display_name` to be a primitive type in the JSON" + + " string but got `%s`", + jsonObj.get("display_name").toString())); + } + if ((jsonObj.get("password") != null && !jsonObj.get("password").isJsonNull()) + && !jsonObj.get("password").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `password` to be a primitive type in the JSON" + + " string but got `%s`", + jsonObj.get("password").toString())); + } + if (!jsonObj.get("email").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `email` to be a primitive type in the JSON string" + + " but got `%s`", + jsonObj.get("email").toString())); + } + if ((jsonObj.get("account_type") != null && !jsonObj.get("account_type").isJsonNull()) + && !jsonObj.get("account_type").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `account_type` to be a primitive type in the JSON" + + " string but got `%s`", + jsonObj.get("account_type").toString())); + } + // validate the optional field `account_type` + if (jsonObj.get("account_type") != null && !jsonObj.get("account_type").isJsonNull()) { + AccountTypeEnum.validateJsonElement(jsonObj.get("account_type")); + } + if ((jsonObj.get("account_status") != null && !jsonObj.get("account_status").isJsonNull()) + && !jsonObj.get("account_status").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `account_status` to be a primitive type in the" + + " JSON string but got `%s`", + jsonObj.get("account_status").toString())); + } + // validate the optional field `account_status` + if (jsonObj.get("account_status") != null && !jsonObj.get("account_status").isJsonNull()) { + AccountStatusEnum.validateJsonElement(jsonObj.get("account_status")); + } + // ensure the optional json data is an array if present + if (jsonObj.get("org_identifiers") != null + && !jsonObj.get("org_identifiers").isJsonNull() + && !jsonObj.get("org_identifiers").isJsonArray()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `org_identifiers` to be an array in the JSON" + + " string but got `%s`", + jsonObj.get("org_identifiers").toString())); + } + // ensure the optional json data is an array if present + if (jsonObj.get("group_identifiers") != null + && !jsonObj.get("group_identifiers").isJsonNull() + && !jsonObj.get("group_identifiers").isJsonArray()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `group_identifiers` to be an array in the JSON" + + " string but got `%s`", + jsonObj.get("group_identifiers").toString())); + } + if ((jsonObj.get("visibility") != null && !jsonObj.get("visibility").isJsonNull()) + && !jsonObj.get("visibility").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `visibility` to be a primitive type in the JSON" + + " string but got `%s`", + jsonObj.get("visibility").toString())); + } + // validate the optional field `visibility` + if (jsonObj.get("visibility") != null && !jsonObj.get("visibility").isJsonNull()) { + VisibilityEnum.validateJsonElement(jsonObj.get("visibility")); + } + if ((jsonObj.get("home_liveboard_identifier") != null + && !jsonObj.get("home_liveboard_identifier").isJsonNull()) + && !jsonObj.get("home_liveboard_identifier").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `home_liveboard_identifier` to be a primitive type" + + " in the JSON string but got `%s`", + jsonObj.get("home_liveboard_identifier").toString())); + } + if (jsonObj.get("favorite_metadata") != null + && !jsonObj.get("favorite_metadata").isJsonNull()) { + JsonArray jsonArrayfavoriteMetadata = jsonObj.getAsJsonArray("favorite_metadata"); + if (jsonArrayfavoriteMetadata != null) { + // ensure the json data is an array + if (!jsonObj.get("favorite_metadata").isJsonArray()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `favorite_metadata` to be an array in the" + + " JSON string but got `%s`", + jsonObj.get("favorite_metadata").toString())); + } + + // validate the optional field `favorite_metadata` (array) + for (int i = 0; i < jsonArrayfavoriteMetadata.size(); i++) { + FavoriteMetadataInput.validateJsonElement(jsonArrayfavoriteMetadata.get(i)); + } + ; + } + } + if ((jsonObj.get("preferred_locale") != null + && !jsonObj.get("preferred_locale").isJsonNull()) + && !jsonObj.get("preferred_locale").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `preferred_locale` to be a primitive type in the" + + " JSON string but got `%s`", + jsonObj.get("preferred_locale").toString())); + } + // validate the optional field `preferred_locale` + if (jsonObj.get("preferred_locale") != null + && !jsonObj.get("preferred_locale").isJsonNull()) { + PreferredLocaleEnum.validateJsonElement(jsonObj.get("preferred_locale")); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!CreateUserRequest.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'CreateUserRequest' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter = + gson.getDelegateAdapter(this, TypeToken.get(CreateUserRequest.class)); + + return (TypeAdapter) + new TypeAdapter() { + @Override + public void write(JsonWriter out, CreateUserRequest value) + throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + obj.remove("additionalProperties"); + // serialize additional properties + if (value.getAdditionalProperties() != null) { + for (Map.Entry entry : + value.getAdditionalProperties().entrySet()) { + if (entry.getValue() instanceof String) + obj.addProperty(entry.getKey(), (String) entry.getValue()); + else if (entry.getValue() instanceof Number) + obj.addProperty(entry.getKey(), (Number) entry.getValue()); + else if (entry.getValue() instanceof Boolean) + obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); + else if (entry.getValue() instanceof Character) + obj.addProperty( + entry.getKey(), (Character) entry.getValue()); + else { + JsonElement jsonElement = gson.toJsonTree(entry.getValue()); + if (jsonElement.isJsonArray()) { + obj.add(entry.getKey(), jsonElement.getAsJsonArray()); + } else { + obj.add(entry.getKey(), jsonElement.getAsJsonObject()); + } + } + } + } + elementAdapter.write(out, obj); + } + + @Override + public CreateUserRequest read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // store additional fields in the deserialized instance + CreateUserRequest instance = thisAdapter.fromJsonTree(jsonObj); + for (Map.Entry entry : jsonObj.entrySet()) { + if (!openapiFields.contains(entry.getKey())) { + if (entry.getValue().isJsonPrimitive()) { // primitive type + if (entry.getValue().getAsJsonPrimitive().isString()) + instance.putAdditionalProperty( + entry.getKey(), entry.getValue().getAsString()); + else if (entry.getValue().getAsJsonPrimitive().isNumber()) + instance.putAdditionalProperty( + entry.getKey(), entry.getValue().getAsNumber()); + else if (entry.getValue().getAsJsonPrimitive().isBoolean()) + instance.putAdditionalProperty( + entry.getKey(), + entry.getValue().getAsBoolean()); + else + throw new IllegalArgumentException( + String.format( + "The field `%s` has unknown primitive" + + " type. Value: %s", + entry.getKey(), + entry.getValue().toString())); + } else if (entry.getValue().isJsonArray()) { + instance.putAdditionalProperty( + entry.getKey(), + gson.fromJson(entry.getValue(), List.class)); + } else { // JSON object + instance.putAdditionalProperty( + entry.getKey(), + gson.fromJson(entry.getValue(), HashMap.class)); + } + } + } + return instance; + } + }.nullSafe(); + } + } + + /** + * Create an instance of CreateUserRequest given an JSON string + * + * @param jsonString JSON string + * @return An instance of CreateUserRequest + * @throws IOException if the JSON string is invalid with respect to CreateUserRequest + */ + public static CreateUserRequest fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, CreateUserRequest.class); + } + + /** + * Convert an instance of CreateUserRequest to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} diff --git a/sdks/java/src/main/java/com/thoughtspot/client/model/CreateVariableRequest.java b/sdks/java/src/main/java/com/thoughtspot/client/model/CreateVariableRequest.java new file mode 100644 index 000000000..644897d42 --- /dev/null +++ b/sdks/java/src/main/java/com/thoughtspot/client/model/CreateVariableRequest.java @@ -0,0 +1,545 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client.model; + +import com.google.gson.Gson; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.TypeAdapter; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.reflect.TypeToken; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import com.thoughtspot.client.JSON; +import java.io.IOException; +import java.io.Serializable; +import java.util.Arrays; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Objects; +import org.openapitools.jackson.nullable.JsonNullable; + +/** CreateVariableRequest */ +@javax.annotation.Generated( + value = "org.openapitools.codegen.languages.JavaClientCodegen", + comments = "Generator version: 7.12.0") +public class CreateVariableRequest implements Serializable { + private static final long serialVersionUID = 1L; + + /** Type of variable */ + @JsonAdapter(TypeEnum.Adapter.class) + public enum TypeEnum { + CONNECTION_PROPERTY("CONNECTION_PROPERTY"), + + TABLE_MAPPING("TABLE_MAPPING"), + + CONNECTION_PROPERTY_PER_PRINCIPAL("CONNECTION_PROPERTY_PER_PRINCIPAL"), + + FORMULA_VARIABLE("FORMULA_VARIABLE"); + + private String value; + + TypeEnum(String value) { + this.value = value; + } + + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + public static TypeEnum fromValue(String value) { + for (TypeEnum b : TypeEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + + public static class Adapter extends TypeAdapter { + @Override + public void write(final JsonWriter jsonWriter, final TypeEnum enumeration) + throws IOException { + jsonWriter.value(enumeration.getValue()); + } + + @Override + public TypeEnum read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + return TypeEnum.fromValue(value); + } + } + + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + String value = jsonElement.getAsString(); + TypeEnum.fromValue(value); + } + } + + public static final String SERIALIZED_NAME_TYPE = "type"; + + @SerializedName(SERIALIZED_NAME_TYPE) + @javax.annotation.Nonnull + private TypeEnum type; + + public static final String SERIALIZED_NAME_NAME = "name"; + + @SerializedName(SERIALIZED_NAME_NAME) + @javax.annotation.Nonnull + private String name; + + public static final String SERIALIZED_NAME_IS_SENSITIVE = "is_sensitive"; + + @SerializedName(SERIALIZED_NAME_IS_SENSITIVE) + @javax.annotation.Nullable + private Boolean isSensitive = false; + + /** + * Variable Data Type, only for formula_variable type, leave empty for others Version: + * 10.15.0.cl or later + */ + @JsonAdapter(DataTypeEnum.Adapter.class) + public enum DataTypeEnum { + VARCHAR("VARCHAR"), + + INT32("INT32"), + + INT64("INT64"), + + DOUBLE("DOUBLE"), + + DATE("DATE"), + + DATE_TIME("DATE_TIME"); + + private String value; + + DataTypeEnum(String value) { + this.value = value; + } + + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + public static DataTypeEnum fromValue(String value) { + for (DataTypeEnum b : DataTypeEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + + public static class Adapter extends TypeAdapter { + @Override + public void write(final JsonWriter jsonWriter, final DataTypeEnum enumeration) + throws IOException { + jsonWriter.value(enumeration.getValue()); + } + + @Override + public DataTypeEnum read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + return DataTypeEnum.fromValue(value); + } + } + + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + String value = jsonElement.getAsString(); + DataTypeEnum.fromValue(value); + } + } + + public static final String SERIALIZED_NAME_DATA_TYPE = "data_type"; + + @SerializedName(SERIALIZED_NAME_DATA_TYPE) + @javax.annotation.Nullable + private DataTypeEnum dataType; + + public CreateVariableRequest() {} + + public CreateVariableRequest type(@javax.annotation.Nonnull TypeEnum type) { + this.type = type; + return this; + } + + /** + * Type of variable + * + * @return type + */ + @javax.annotation.Nonnull + public TypeEnum getType() { + return type; + } + + public void setType(@javax.annotation.Nonnull TypeEnum type) { + this.type = type; + } + + public CreateVariableRequest name(@javax.annotation.Nonnull String name) { + this.name = name; + return this; + } + + /** + * Name of the variable. This is unique across the cluster. + * + * @return name + */ + @javax.annotation.Nonnull + public String getName() { + return name; + } + + public void setName(@javax.annotation.Nonnull String name) { + this.name = name; + } + + public CreateVariableRequest isSensitive(@javax.annotation.Nullable Boolean isSensitive) { + this.isSensitive = isSensitive; + return this; + } + + /** + * If the variable contains sensitive values like passwords + * + * @return isSensitive + */ + @javax.annotation.Nullable + public Boolean getIsSensitive() { + return isSensitive; + } + + public void setIsSensitive(@javax.annotation.Nullable Boolean isSensitive) { + this.isSensitive = isSensitive; + } + + public CreateVariableRequest dataType(@javax.annotation.Nullable DataTypeEnum dataType) { + this.dataType = dataType; + return this; + } + + /** + * Variable Data Type, only for formula_variable type, leave empty for others Version: + * 10.15.0.cl or later + * + * @return dataType + */ + @javax.annotation.Nullable + public DataTypeEnum getDataType() { + return dataType; + } + + public void setDataType(@javax.annotation.Nullable DataTypeEnum dataType) { + this.dataType = dataType; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key name of the property + * @param value value of the property + * @return the CreateVariableRequest instance itself + */ + public CreateVariableRequest putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return a map of objects + */ + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key name of the property + * @return an object + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + CreateVariableRequest createVariableRequest = (CreateVariableRequest) o; + return Objects.equals(this.type, createVariableRequest.type) + && Objects.equals(this.name, createVariableRequest.name) + && Objects.equals(this.isSensitive, createVariableRequest.isSensitive) + && Objects.equals(this.dataType, createVariableRequest.dataType) + && Objects.equals( + this.additionalProperties, createVariableRequest.additionalProperties); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b + || (a != null + && b != null + && a.isPresent() + && b.isPresent() + && Objects.deepEquals(a.get(), b.get())); + } + + @Override + public int hashCode() { + return Objects.hash(type, name, isSensitive, dataType, additionalProperties); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; + } + return a.isPresent() ? Arrays.deepHashCode(new Object[] {a.get()}) : 31; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class CreateVariableRequest {\n"); + sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append(" isSensitive: ").append(toIndentedString(isSensitive)).append("\n"); + sb.append(" dataType: ").append(toIndentedString(dataType)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first + * line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("type"); + openapiFields.add("name"); + openapiFields.add("is_sensitive"); + openapiFields.add("data_type"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + openapiRequiredFields.add("type"); + openapiRequiredFields.add("name"); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to CreateVariableRequest + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!CreateVariableRequest.openapiRequiredFields + .isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException( + String.format( + "The required field(s) %s in CreateVariableRequest is not found in" + + " the empty JSON string", + CreateVariableRequest.openapiRequiredFields.toString())); + } + } + + // check to make sure all required properties/fields are present in the JSON string + for (String requiredField : CreateVariableRequest.openapiRequiredFields) { + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException( + String.format( + "The required field `%s` is not found in the JSON string: %s", + requiredField, jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if (!jsonObj.get("type").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `type` to be a primitive type in the JSON string" + + " but got `%s`", + jsonObj.get("type").toString())); + } + // validate the required field `type` + TypeEnum.validateJsonElement(jsonObj.get("type")); + if (!jsonObj.get("name").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `name` to be a primitive type in the JSON string" + + " but got `%s`", + jsonObj.get("name").toString())); + } + if ((jsonObj.get("data_type") != null && !jsonObj.get("data_type").isJsonNull()) + && !jsonObj.get("data_type").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `data_type` to be a primitive type in the JSON" + + " string but got `%s`", + jsonObj.get("data_type").toString())); + } + // validate the optional field `data_type` + if (jsonObj.get("data_type") != null && !jsonObj.get("data_type").isJsonNull()) { + DataTypeEnum.validateJsonElement(jsonObj.get("data_type")); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!CreateVariableRequest.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'CreateVariableRequest' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter = + gson.getDelegateAdapter(this, TypeToken.get(CreateVariableRequest.class)); + + return (TypeAdapter) + new TypeAdapter() { + @Override + public void write(JsonWriter out, CreateVariableRequest value) + throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + obj.remove("additionalProperties"); + // serialize additional properties + if (value.getAdditionalProperties() != null) { + for (Map.Entry entry : + value.getAdditionalProperties().entrySet()) { + if (entry.getValue() instanceof String) + obj.addProperty(entry.getKey(), (String) entry.getValue()); + else if (entry.getValue() instanceof Number) + obj.addProperty(entry.getKey(), (Number) entry.getValue()); + else if (entry.getValue() instanceof Boolean) + obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); + else if (entry.getValue() instanceof Character) + obj.addProperty( + entry.getKey(), (Character) entry.getValue()); + else { + JsonElement jsonElement = gson.toJsonTree(entry.getValue()); + if (jsonElement.isJsonArray()) { + obj.add(entry.getKey(), jsonElement.getAsJsonArray()); + } else { + obj.add(entry.getKey(), jsonElement.getAsJsonObject()); + } + } + } + } + elementAdapter.write(out, obj); + } + + @Override + public CreateVariableRequest read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // store additional fields in the deserialized instance + CreateVariableRequest instance = thisAdapter.fromJsonTree(jsonObj); + for (Map.Entry entry : jsonObj.entrySet()) { + if (!openapiFields.contains(entry.getKey())) { + if (entry.getValue().isJsonPrimitive()) { // primitive type + if (entry.getValue().getAsJsonPrimitive().isString()) + instance.putAdditionalProperty( + entry.getKey(), entry.getValue().getAsString()); + else if (entry.getValue().getAsJsonPrimitive().isNumber()) + instance.putAdditionalProperty( + entry.getKey(), entry.getValue().getAsNumber()); + else if (entry.getValue().getAsJsonPrimitive().isBoolean()) + instance.putAdditionalProperty( + entry.getKey(), + entry.getValue().getAsBoolean()); + else + throw new IllegalArgumentException( + String.format( + "The field `%s` has unknown primitive" + + " type. Value: %s", + entry.getKey(), + entry.getValue().toString())); + } else if (entry.getValue().isJsonArray()) { + instance.putAdditionalProperty( + entry.getKey(), + gson.fromJson(entry.getValue(), List.class)); + } else { // JSON object + instance.putAdditionalProperty( + entry.getKey(), + gson.fromJson(entry.getValue(), HashMap.class)); + } + } + } + return instance; + } + }.nullSafe(); + } + } + + /** + * Create an instance of CreateVariableRequest given an JSON string + * + * @param jsonString JSON string + * @return An instance of CreateVariableRequest + * @throws IOException if the JSON string is invalid with respect to CreateVariableRequest + */ + public static CreateVariableRequest fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, CreateVariableRequest.class); + } + + /** + * Convert an instance of CreateVariableRequest to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} diff --git a/sdks/java/src/main/java/com/thoughtspot/client/model/CreateWebhookConfigurationRequest.java b/sdks/java/src/main/java/com/thoughtspot/client/model/CreateWebhookConfigurationRequest.java new file mode 100644 index 000000000..da5f95e5d --- /dev/null +++ b/sdks/java/src/main/java/com/thoughtspot/client/model/CreateWebhookConfigurationRequest.java @@ -0,0 +1,709 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client.model; + +import com.google.gson.Gson; +import com.google.gson.JsonArray; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.TypeAdapter; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.reflect.TypeToken; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import com.thoughtspot.client.JSON; +import java.io.IOException; +import java.io.Serializable; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Objects; + +/** CreateWebhookConfigurationRequest */ +@javax.annotation.Generated( + value = "org.openapitools.codegen.languages.JavaClientCodegen", + comments = "Generator version: 7.12.0") +public class CreateWebhookConfigurationRequest implements Serializable { + private static final long serialVersionUID = 1L; + + public static final String SERIALIZED_NAME_NAME = "name"; + + @SerializedName(SERIALIZED_NAME_NAME) + @javax.annotation.Nonnull + private String name; + + public static final String SERIALIZED_NAME_DESCRIPTION = "description"; + + @SerializedName(SERIALIZED_NAME_DESCRIPTION) + @javax.annotation.Nullable + private String description; + + public static final String SERIALIZED_NAME_URL = "url"; + + @SerializedName(SERIALIZED_NAME_URL) + @javax.annotation.Nonnull + private String url; + + public static final String SERIALIZED_NAME_URL_PARAMS = "url_params"; + + @SerializedName(SERIALIZED_NAME_URL_PARAMS) + @javax.annotation.Nullable + private Object urlParams; + + /** Gets or Sets events */ + @JsonAdapter(EventsEnum.Adapter.class) + public enum EventsEnum { + LIVEBOARD_SCHEDULE("LIVEBOARD_SCHEDULE"); + + private String value; + + EventsEnum(String value) { + this.value = value; + } + + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + public static EventsEnum fromValue(String value) { + for (EventsEnum b : EventsEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + + public static class Adapter extends TypeAdapter { + @Override + public void write(final JsonWriter jsonWriter, final EventsEnum enumeration) + throws IOException { + jsonWriter.value(enumeration.getValue()); + } + + @Override + public EventsEnum read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + return EventsEnum.fromValue(value); + } + } + + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + String value = jsonElement.getAsString(); + EventsEnum.fromValue(value); + } + } + + public static final String SERIALIZED_NAME_EVENTS = "events"; + + @SerializedName(SERIALIZED_NAME_EVENTS) + @javax.annotation.Nonnull + private List events; + + public static final String SERIALIZED_NAME_AUTHENTICATION = "authentication"; + + @SerializedName(SERIALIZED_NAME_AUTHENTICATION) + @javax.annotation.Nullable + private WebhookAuthenticationInput authentication; + + public static final String SERIALIZED_NAME_SIGNATURE_VERIFICATION = "signature_verification"; + + @SerializedName(SERIALIZED_NAME_SIGNATURE_VERIFICATION) + @javax.annotation.Nullable + private WebhookSignatureVerificationInput signatureVerification; + + public static final String SERIALIZED_NAME_STORAGE_DESTINATION = "storage_destination"; + + @SerializedName(SERIALIZED_NAME_STORAGE_DESTINATION) + @javax.annotation.Nullable + private StorageDestinationInput storageDestination; + + public static final String SERIALIZED_NAME_ADDITIONAL_HEADERS = "additional_headers"; + + @SerializedName(SERIALIZED_NAME_ADDITIONAL_HEADERS) + @javax.annotation.Nullable + private List additionalHeaders; + + public CreateWebhookConfigurationRequest() {} + + public CreateWebhookConfigurationRequest name(@javax.annotation.Nonnull String name) { + this.name = name; + return this; + } + + /** + * Name of the webhook configuration. + * + * @return name + */ + @javax.annotation.Nonnull + public String getName() { + return name; + } + + public void setName(@javax.annotation.Nonnull String name) { + this.name = name; + } + + public CreateWebhookConfigurationRequest description( + @javax.annotation.Nullable String description) { + this.description = description; + return this; + } + + /** + * Description of the webhook configuration. + * + * @return description + */ + @javax.annotation.Nullable + public String getDescription() { + return description; + } + + public void setDescription(@javax.annotation.Nullable String description) { + this.description = description; + } + + public CreateWebhookConfigurationRequest url(@javax.annotation.Nonnull String url) { + this.url = url; + return this; + } + + /** + * The webhook endpoint URL. + * + * @return url + */ + @javax.annotation.Nonnull + public String getUrl() { + return url; + } + + public void setUrl(@javax.annotation.Nonnull String url) { + this.url = url; + } + + public CreateWebhookConfigurationRequest urlParams( + @javax.annotation.Nullable Object urlParams) { + this.urlParams = urlParams; + return this; + } + + /** + * Additional URL parameters as key-value pairs. + * + * @return urlParams + */ + @javax.annotation.Nullable + public Object getUrlParams() { + return urlParams; + } + + public void setUrlParams(@javax.annotation.Nullable Object urlParams) { + this.urlParams = urlParams; + } + + public CreateWebhookConfigurationRequest events( + @javax.annotation.Nonnull List events) { + this.events = events; + return this; + } + + public CreateWebhookConfigurationRequest addEventsItem(EventsEnum eventsItem) { + if (this.events == null) { + this.events = new ArrayList<>(); + } + this.events.add(eventsItem); + return this; + } + + /** + * List of events to subscribe to. + * + * @return events + */ + @javax.annotation.Nonnull + public List getEvents() { + return events; + } + + public void setEvents(@javax.annotation.Nonnull List events) { + this.events = events; + } + + public CreateWebhookConfigurationRequest authentication( + @javax.annotation.Nullable WebhookAuthenticationInput authentication) { + this.authentication = authentication; + return this; + } + + /** + * Authorization configuration for the webhook. + * + * @return authentication + */ + @javax.annotation.Nullable + public WebhookAuthenticationInput getAuthentication() { + return authentication; + } + + public void setAuthentication( + @javax.annotation.Nullable WebhookAuthenticationInput authentication) { + this.authentication = authentication; + } + + public CreateWebhookConfigurationRequest signatureVerification( + @javax.annotation.Nullable WebhookSignatureVerificationInput signatureVerification) { + this.signatureVerification = signatureVerification; + return this; + } + + /** + * Configuration for webhook signature verification. + * + * @return signatureVerification + */ + @javax.annotation.Nullable + public WebhookSignatureVerificationInput getSignatureVerification() { + return signatureVerification; + } + + public void setSignatureVerification( + @javax.annotation.Nullable WebhookSignatureVerificationInput signatureVerification) { + this.signatureVerification = signatureVerification; + } + + public CreateWebhookConfigurationRequest storageDestination( + @javax.annotation.Nullable StorageDestinationInput storageDestination) { + this.storageDestination = storageDestination; + return this; + } + + /** + * Configuration for storage destination. Example: {\"storage_type\": + * \"AWS_S3\", \"storage_config\": {\"aws_s3_config\": + * {\"bucket_name\": \"my-webhook-files\", \"region\": + * \"us-west-2\", \"role_arn\": + * \"arn:aws:iam::123456789012:role/ThoughtSpotDeliveryRole\", + * \"external_id\": \"ts-webhook-a1b2c3d4-7890\", \"path_prefix\": + * \"thoughtspot-webhooks/\"}}} Version: 26.3.0.cl or later + * + * @return storageDestination + */ + @javax.annotation.Nullable + public StorageDestinationInput getStorageDestination() { + return storageDestination; + } + + public void setStorageDestination( + @javax.annotation.Nullable StorageDestinationInput storageDestination) { + this.storageDestination = storageDestination; + } + + public CreateWebhookConfigurationRequest additionalHeaders( + @javax.annotation.Nullable List additionalHeaders) { + this.additionalHeaders = additionalHeaders; + return this; + } + + public CreateWebhookConfigurationRequest addAdditionalHeadersItem( + WebhookKeyValuePairInput additionalHeadersItem) { + if (this.additionalHeaders == null) { + this.additionalHeaders = new ArrayList<>(); + } + this.additionalHeaders.add(additionalHeadersItem); + return this; + } + + /** + * Additional headers as an array of key-value pairs. Example: [{\"key\": + * \"X-Custom-Header\", \"value\": \"custom_value\"}] Version: + * 26.4.0.cl or later + * + * @return additionalHeaders + */ + @javax.annotation.Nullable + public List getAdditionalHeaders() { + return additionalHeaders; + } + + public void setAdditionalHeaders( + @javax.annotation.Nullable List additionalHeaders) { + this.additionalHeaders = additionalHeaders; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key name of the property + * @param value value of the property + * @return the CreateWebhookConfigurationRequest instance itself + */ + public CreateWebhookConfigurationRequest putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return a map of objects + */ + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key name of the property + * @return an object + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + CreateWebhookConfigurationRequest createWebhookConfigurationRequest = + (CreateWebhookConfigurationRequest) o; + return Objects.equals(this.name, createWebhookConfigurationRequest.name) + && Objects.equals(this.description, createWebhookConfigurationRequest.description) + && Objects.equals(this.url, createWebhookConfigurationRequest.url) + && Objects.equals(this.urlParams, createWebhookConfigurationRequest.urlParams) + && Objects.equals(this.events, createWebhookConfigurationRequest.events) + && Objects.equals( + this.authentication, createWebhookConfigurationRequest.authentication) + && Objects.equals( + this.signatureVerification, + createWebhookConfigurationRequest.signatureVerification) + && Objects.equals( + this.storageDestination, + createWebhookConfigurationRequest.storageDestination) + && Objects.equals( + this.additionalHeaders, createWebhookConfigurationRequest.additionalHeaders) + && Objects.equals( + this.additionalProperties, + createWebhookConfigurationRequest.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash( + name, + description, + url, + urlParams, + events, + authentication, + signatureVerification, + storageDestination, + additionalHeaders, + additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class CreateWebhookConfigurationRequest {\n"); + sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append(" description: ").append(toIndentedString(description)).append("\n"); + sb.append(" url: ").append(toIndentedString(url)).append("\n"); + sb.append(" urlParams: ").append(toIndentedString(urlParams)).append("\n"); + sb.append(" events: ").append(toIndentedString(events)).append("\n"); + sb.append(" authentication: ").append(toIndentedString(authentication)).append("\n"); + sb.append(" signatureVerification: ") + .append(toIndentedString(signatureVerification)) + .append("\n"); + sb.append(" storageDestination: ") + .append(toIndentedString(storageDestination)) + .append("\n"); + sb.append(" additionalHeaders: ") + .append(toIndentedString(additionalHeaders)) + .append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first + * line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("name"); + openapiFields.add("description"); + openapiFields.add("url"); + openapiFields.add("url_params"); + openapiFields.add("events"); + openapiFields.add("authentication"); + openapiFields.add("signature_verification"); + openapiFields.add("storage_destination"); + openapiFields.add("additional_headers"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + openapiRequiredFields.add("name"); + openapiRequiredFields.add("url"); + openapiRequiredFields.add("events"); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to + * CreateWebhookConfigurationRequest + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!CreateWebhookConfigurationRequest.openapiRequiredFields + .isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException( + String.format( + "The required field(s) %s in CreateWebhookConfigurationRequest is" + + " not found in the empty JSON string", + CreateWebhookConfigurationRequest.openapiRequiredFields + .toString())); + } + } + + // check to make sure all required properties/fields are present in the JSON string + for (String requiredField : CreateWebhookConfigurationRequest.openapiRequiredFields) { + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException( + String.format( + "The required field `%s` is not found in the JSON string: %s", + requiredField, jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if (!jsonObj.get("name").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `name` to be a primitive type in the JSON string" + + " but got `%s`", + jsonObj.get("name").toString())); + } + if ((jsonObj.get("description") != null && !jsonObj.get("description").isJsonNull()) + && !jsonObj.get("description").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `description` to be a primitive type in the JSON" + + " string but got `%s`", + jsonObj.get("description").toString())); + } + if (!jsonObj.get("url").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `url` to be a primitive type in the JSON string" + + " but got `%s`", + jsonObj.get("url").toString())); + } + // ensure the required json array is present + if (jsonObj.get("events") == null) { + throw new IllegalArgumentException( + "Expected the field `linkedContent` to be an array in the JSON string but got" + + " `null`"); + } else if (!jsonObj.get("events").isJsonArray()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `events` to be an array in the JSON string but got" + + " `%s`", + jsonObj.get("events").toString())); + } + // validate the optional field `authentication` + if (jsonObj.get("authentication") != null && !jsonObj.get("authentication").isJsonNull()) { + WebhookAuthenticationInput.validateJsonElement(jsonObj.get("authentication")); + } + // validate the optional field `signature_verification` + if (jsonObj.get("signature_verification") != null + && !jsonObj.get("signature_verification").isJsonNull()) { + WebhookSignatureVerificationInput.validateJsonElement( + jsonObj.get("signature_verification")); + } + // validate the optional field `storage_destination` + if (jsonObj.get("storage_destination") != null + && !jsonObj.get("storage_destination").isJsonNull()) { + StorageDestinationInput.validateJsonElement(jsonObj.get("storage_destination")); + } + if (jsonObj.get("additional_headers") != null + && !jsonObj.get("additional_headers").isJsonNull()) { + JsonArray jsonArrayadditionalHeaders = jsonObj.getAsJsonArray("additional_headers"); + if (jsonArrayadditionalHeaders != null) { + // ensure the json data is an array + if (!jsonObj.get("additional_headers").isJsonArray()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `additional_headers` to be an array in the" + + " JSON string but got `%s`", + jsonObj.get("additional_headers").toString())); + } + + // validate the optional field `additional_headers` (array) + for (int i = 0; i < jsonArrayadditionalHeaders.size(); i++) { + WebhookKeyValuePairInput.validateJsonElement(jsonArrayadditionalHeaders.get(i)); + } + ; + } + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!CreateWebhookConfigurationRequest.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'CreateWebhookConfigurationRequest' and + // its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter = + gson.getDelegateAdapter( + this, TypeToken.get(CreateWebhookConfigurationRequest.class)); + + return (TypeAdapter) + new TypeAdapter() { + @Override + public void write(JsonWriter out, CreateWebhookConfigurationRequest value) + throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + obj.remove("additionalProperties"); + // serialize additional properties + if (value.getAdditionalProperties() != null) { + for (Map.Entry entry : + value.getAdditionalProperties().entrySet()) { + if (entry.getValue() instanceof String) + obj.addProperty(entry.getKey(), (String) entry.getValue()); + else if (entry.getValue() instanceof Number) + obj.addProperty(entry.getKey(), (Number) entry.getValue()); + else if (entry.getValue() instanceof Boolean) + obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); + else if (entry.getValue() instanceof Character) + obj.addProperty( + entry.getKey(), (Character) entry.getValue()); + else { + JsonElement jsonElement = gson.toJsonTree(entry.getValue()); + if (jsonElement.isJsonArray()) { + obj.add(entry.getKey(), jsonElement.getAsJsonArray()); + } else { + obj.add(entry.getKey(), jsonElement.getAsJsonObject()); + } + } + } + } + elementAdapter.write(out, obj); + } + + @Override + public CreateWebhookConfigurationRequest read(JsonReader in) + throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // store additional fields in the deserialized instance + CreateWebhookConfigurationRequest instance = + thisAdapter.fromJsonTree(jsonObj); + for (Map.Entry entry : jsonObj.entrySet()) { + if (!openapiFields.contains(entry.getKey())) { + if (entry.getValue().isJsonPrimitive()) { // primitive type + if (entry.getValue().getAsJsonPrimitive().isString()) + instance.putAdditionalProperty( + entry.getKey(), entry.getValue().getAsString()); + else if (entry.getValue().getAsJsonPrimitive().isNumber()) + instance.putAdditionalProperty( + entry.getKey(), entry.getValue().getAsNumber()); + else if (entry.getValue().getAsJsonPrimitive().isBoolean()) + instance.putAdditionalProperty( + entry.getKey(), + entry.getValue().getAsBoolean()); + else + throw new IllegalArgumentException( + String.format( + "The field `%s` has unknown primitive" + + " type. Value: %s", + entry.getKey(), + entry.getValue().toString())); + } else if (entry.getValue().isJsonArray()) { + instance.putAdditionalProperty( + entry.getKey(), + gson.fromJson(entry.getValue(), List.class)); + } else { // JSON object + instance.putAdditionalProperty( + entry.getKey(), + gson.fromJson(entry.getValue(), HashMap.class)); + } + } + } + return instance; + } + }.nullSafe(); + } + } + + /** + * Create an instance of CreateWebhookConfigurationRequest given an JSON string + * + * @param jsonString JSON string + * @return An instance of CreateWebhookConfigurationRequest + * @throws IOException if the JSON string is invalid with respect to + * CreateWebhookConfigurationRequest + */ + public static CreateWebhookConfigurationRequest fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, CreateWebhookConfigurationRequest.class); + } + + /** + * Convert an instance of CreateWebhookConfigurationRequest to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} diff --git a/sdks/java/src/main/java/com/thoughtspot/client/model/CronExpression.java b/sdks/java/src/main/java/com/thoughtspot/client/model/CronExpression.java new file mode 100644 index 000000000..3940fed71 --- /dev/null +++ b/sdks/java/src/main/java/com/thoughtspot/client/model/CronExpression.java @@ -0,0 +1,481 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client.model; + +import com.google.gson.Gson; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.TypeAdapter; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.annotations.SerializedName; +import com.google.gson.reflect.TypeToken; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import com.thoughtspot.client.JSON; +import java.io.IOException; +import java.io.Serializable; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Objects; + +/** Schedule selected cron expression. */ +@javax.annotation.Generated( + value = "org.openapitools.codegen.languages.JavaClientCodegen", + comments = "Generator version: 7.12.0") +public class CronExpression implements Serializable { + private static final long serialVersionUID = 1L; + + public static final String SERIALIZED_NAME_DAY_OF_MONTH = "day_of_month"; + + @SerializedName(SERIALIZED_NAME_DAY_OF_MONTH) + @javax.annotation.Nonnull + private String dayOfMonth; + + public static final String SERIALIZED_NAME_DAY_OF_WEEK = "day_of_week"; + + @SerializedName(SERIALIZED_NAME_DAY_OF_WEEK) + @javax.annotation.Nonnull + private String dayOfWeek; + + public static final String SERIALIZED_NAME_HOUR = "hour"; + + @SerializedName(SERIALIZED_NAME_HOUR) + @javax.annotation.Nonnull + private String hour; + + public static final String SERIALIZED_NAME_MINUTE = "minute"; + + @SerializedName(SERIALIZED_NAME_MINUTE) + @javax.annotation.Nonnull + private String minute; + + public static final String SERIALIZED_NAME_MONTH = "month"; + + @SerializedName(SERIALIZED_NAME_MONTH) + @javax.annotation.Nonnull + private String month; + + public static final String SERIALIZED_NAME_SECOND = "second"; + + @SerializedName(SERIALIZED_NAME_SECOND) + @javax.annotation.Nonnull + private String second; + + public CronExpression() {} + + public CronExpression dayOfMonth(@javax.annotation.Nonnull String dayOfMonth) { + this.dayOfMonth = dayOfMonth; + return this; + } + + /** + * Day of month of the object. + * + * @return dayOfMonth + */ + @javax.annotation.Nonnull + public String getDayOfMonth() { + return dayOfMonth; + } + + public void setDayOfMonth(@javax.annotation.Nonnull String dayOfMonth) { + this.dayOfMonth = dayOfMonth; + } + + public CronExpression dayOfWeek(@javax.annotation.Nonnull String dayOfWeek) { + this.dayOfWeek = dayOfWeek; + return this; + } + + /** + * Day of Week of the object. + * + * @return dayOfWeek + */ + @javax.annotation.Nonnull + public String getDayOfWeek() { + return dayOfWeek; + } + + public void setDayOfWeek(@javax.annotation.Nonnull String dayOfWeek) { + this.dayOfWeek = dayOfWeek; + } + + public CronExpression hour(@javax.annotation.Nonnull String hour) { + this.hour = hour; + return this; + } + + /** + * Hour of the object. + * + * @return hour + */ + @javax.annotation.Nonnull + public String getHour() { + return hour; + } + + public void setHour(@javax.annotation.Nonnull String hour) { + this.hour = hour; + } + + public CronExpression minute(@javax.annotation.Nonnull String minute) { + this.minute = minute; + return this; + } + + /** + * Minute of the object. + * + * @return minute + */ + @javax.annotation.Nonnull + public String getMinute() { + return minute; + } + + public void setMinute(@javax.annotation.Nonnull String minute) { + this.minute = minute; + } + + public CronExpression month(@javax.annotation.Nonnull String month) { + this.month = month; + return this; + } + + /** + * Month of the object. + * + * @return month + */ + @javax.annotation.Nonnull + public String getMonth() { + return month; + } + + public void setMonth(@javax.annotation.Nonnull String month) { + this.month = month; + } + + public CronExpression second(@javax.annotation.Nonnull String second) { + this.second = second; + return this; + } + + /** + * Second of the object. + * + * @return second + */ + @javax.annotation.Nonnull + public String getSecond() { + return second; + } + + public void setSecond(@javax.annotation.Nonnull String second) { + this.second = second; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key name of the property + * @param value value of the property + * @return the CronExpression instance itself + */ + public CronExpression putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return a map of objects + */ + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key name of the property + * @return an object + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + CronExpression cronExpression = (CronExpression) o; + return Objects.equals(this.dayOfMonth, cronExpression.dayOfMonth) + && Objects.equals(this.dayOfWeek, cronExpression.dayOfWeek) + && Objects.equals(this.hour, cronExpression.hour) + && Objects.equals(this.minute, cronExpression.minute) + && Objects.equals(this.month, cronExpression.month) + && Objects.equals(this.second, cronExpression.second) + && Objects.equals(this.additionalProperties, cronExpression.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash( + dayOfMonth, dayOfWeek, hour, minute, month, second, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class CronExpression {\n"); + sb.append(" dayOfMonth: ").append(toIndentedString(dayOfMonth)).append("\n"); + sb.append(" dayOfWeek: ").append(toIndentedString(dayOfWeek)).append("\n"); + sb.append(" hour: ").append(toIndentedString(hour)).append("\n"); + sb.append(" minute: ").append(toIndentedString(minute)).append("\n"); + sb.append(" month: ").append(toIndentedString(month)).append("\n"); + sb.append(" second: ").append(toIndentedString(second)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first + * line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("day_of_month"); + openapiFields.add("day_of_week"); + openapiFields.add("hour"); + openapiFields.add("minute"); + openapiFields.add("month"); + openapiFields.add("second"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + openapiRequiredFields.add("day_of_month"); + openapiRequiredFields.add("day_of_week"); + openapiRequiredFields.add("hour"); + openapiRequiredFields.add("minute"); + openapiRequiredFields.add("month"); + openapiRequiredFields.add("second"); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to CronExpression + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!CronExpression.openapiRequiredFields + .isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException( + String.format( + "The required field(s) %s in CronExpression is not found in the" + + " empty JSON string", + CronExpression.openapiRequiredFields.toString())); + } + } + + // check to make sure all required properties/fields are present in the JSON string + for (String requiredField : CronExpression.openapiRequiredFields) { + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException( + String.format( + "The required field `%s` is not found in the JSON string: %s", + requiredField, jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if (!jsonObj.get("day_of_month").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `day_of_month` to be a primitive type in the JSON" + + " string but got `%s`", + jsonObj.get("day_of_month").toString())); + } + if (!jsonObj.get("day_of_week").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `day_of_week` to be a primitive type in the JSON" + + " string but got `%s`", + jsonObj.get("day_of_week").toString())); + } + if (!jsonObj.get("hour").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `hour` to be a primitive type in the JSON string" + + " but got `%s`", + jsonObj.get("hour").toString())); + } + if (!jsonObj.get("minute").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `minute` to be a primitive type in the JSON string" + + " but got `%s`", + jsonObj.get("minute").toString())); + } + if (!jsonObj.get("month").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `month` to be a primitive type in the JSON string" + + " but got `%s`", + jsonObj.get("month").toString())); + } + if (!jsonObj.get("second").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `second` to be a primitive type in the JSON string" + + " but got `%s`", + jsonObj.get("second").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!CronExpression.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'CronExpression' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter = + gson.getDelegateAdapter(this, TypeToken.get(CronExpression.class)); + + return (TypeAdapter) + new TypeAdapter() { + @Override + public void write(JsonWriter out, CronExpression value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + obj.remove("additionalProperties"); + // serialize additional properties + if (value.getAdditionalProperties() != null) { + for (Map.Entry entry : + value.getAdditionalProperties().entrySet()) { + if (entry.getValue() instanceof String) + obj.addProperty(entry.getKey(), (String) entry.getValue()); + else if (entry.getValue() instanceof Number) + obj.addProperty(entry.getKey(), (Number) entry.getValue()); + else if (entry.getValue() instanceof Boolean) + obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); + else if (entry.getValue() instanceof Character) + obj.addProperty( + entry.getKey(), (Character) entry.getValue()); + else { + JsonElement jsonElement = gson.toJsonTree(entry.getValue()); + if (jsonElement.isJsonArray()) { + obj.add(entry.getKey(), jsonElement.getAsJsonArray()); + } else { + obj.add(entry.getKey(), jsonElement.getAsJsonObject()); + } + } + } + } + elementAdapter.write(out, obj); + } + + @Override + public CronExpression read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // store additional fields in the deserialized instance + CronExpression instance = thisAdapter.fromJsonTree(jsonObj); + for (Map.Entry entry : jsonObj.entrySet()) { + if (!openapiFields.contains(entry.getKey())) { + if (entry.getValue().isJsonPrimitive()) { // primitive type + if (entry.getValue().getAsJsonPrimitive().isString()) + instance.putAdditionalProperty( + entry.getKey(), entry.getValue().getAsString()); + else if (entry.getValue().getAsJsonPrimitive().isNumber()) + instance.putAdditionalProperty( + entry.getKey(), entry.getValue().getAsNumber()); + else if (entry.getValue().getAsJsonPrimitive().isBoolean()) + instance.putAdditionalProperty( + entry.getKey(), + entry.getValue().getAsBoolean()); + else + throw new IllegalArgumentException( + String.format( + "The field `%s` has unknown primitive" + + " type. Value: %s", + entry.getKey(), + entry.getValue().toString())); + } else if (entry.getValue().isJsonArray()) { + instance.putAdditionalProperty( + entry.getKey(), + gson.fromJson(entry.getValue(), List.class)); + } else { // JSON object + instance.putAdditionalProperty( + entry.getKey(), + gson.fromJson(entry.getValue(), HashMap.class)); + } + } + } + return instance; + } + }.nullSafe(); + } + } + + /** + * Create an instance of CronExpression given an JSON string + * + * @param jsonString JSON string + * @return An instance of CronExpression + * @throws IOException if the JSON string is invalid with respect to CronExpression + */ + public static CronExpression fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, CronExpression.class); + } + + /** + * Convert an instance of CronExpression to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} diff --git a/sdks/java/src/main/java/com/thoughtspot/client/model/CronExpressionInput.java b/sdks/java/src/main/java/com/thoughtspot/client/model/CronExpressionInput.java new file mode 100644 index 000000000..4497f5e17 --- /dev/null +++ b/sdks/java/src/main/java/com/thoughtspot/client/model/CronExpressionInput.java @@ -0,0 +1,483 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client.model; + +import com.google.gson.Gson; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.TypeAdapter; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.annotations.SerializedName; +import com.google.gson.reflect.TypeToken; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import com.thoughtspot.client.JSON; +import java.io.IOException; +import java.io.Serializable; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Objects; + +/** Schedule selected cron expression. */ +@javax.annotation.Generated( + value = "org.openapitools.codegen.languages.JavaClientCodegen", + comments = "Generator version: 7.12.0") +public class CronExpressionInput implements Serializable { + private static final long serialVersionUID = 1L; + + public static final String SERIALIZED_NAME_DAY_OF_MONTH = "day_of_month"; + + @SerializedName(SERIALIZED_NAME_DAY_OF_MONTH) + @javax.annotation.Nonnull + private String dayOfMonth; + + public static final String SERIALIZED_NAME_DAY_OF_WEEK = "day_of_week"; + + @SerializedName(SERIALIZED_NAME_DAY_OF_WEEK) + @javax.annotation.Nonnull + private String dayOfWeek; + + public static final String SERIALIZED_NAME_HOUR = "hour"; + + @SerializedName(SERIALIZED_NAME_HOUR) + @javax.annotation.Nonnull + private String hour; + + public static final String SERIALIZED_NAME_MINUTE = "minute"; + + @SerializedName(SERIALIZED_NAME_MINUTE) + @javax.annotation.Nonnull + private String minute; + + public static final String SERIALIZED_NAME_MONTH = "month"; + + @SerializedName(SERIALIZED_NAME_MONTH) + @javax.annotation.Nonnull + private String month; + + public static final String SERIALIZED_NAME_SECOND = "second"; + + @SerializedName(SERIALIZED_NAME_SECOND) + @javax.annotation.Nonnull + private String second; + + public CronExpressionInput() {} + + public CronExpressionInput dayOfMonth(@javax.annotation.Nonnull String dayOfMonth) { + this.dayOfMonth = dayOfMonth; + return this; + } + + /** + * Day of month of the object. + * + * @return dayOfMonth + */ + @javax.annotation.Nonnull + public String getDayOfMonth() { + return dayOfMonth; + } + + public void setDayOfMonth(@javax.annotation.Nonnull String dayOfMonth) { + this.dayOfMonth = dayOfMonth; + } + + public CronExpressionInput dayOfWeek(@javax.annotation.Nonnull String dayOfWeek) { + this.dayOfWeek = dayOfWeek; + return this; + } + + /** + * Day of Week of the object. + * + * @return dayOfWeek + */ + @javax.annotation.Nonnull + public String getDayOfWeek() { + return dayOfWeek; + } + + public void setDayOfWeek(@javax.annotation.Nonnull String dayOfWeek) { + this.dayOfWeek = dayOfWeek; + } + + public CronExpressionInput hour(@javax.annotation.Nonnull String hour) { + this.hour = hour; + return this; + } + + /** + * Hour of the object. + * + * @return hour + */ + @javax.annotation.Nonnull + public String getHour() { + return hour; + } + + public void setHour(@javax.annotation.Nonnull String hour) { + this.hour = hour; + } + + public CronExpressionInput minute(@javax.annotation.Nonnull String minute) { + this.minute = minute; + return this; + } + + /** + * Minute of the object. + * + * @return minute + */ + @javax.annotation.Nonnull + public String getMinute() { + return minute; + } + + public void setMinute(@javax.annotation.Nonnull String minute) { + this.minute = minute; + } + + public CronExpressionInput month(@javax.annotation.Nonnull String month) { + this.month = month; + return this; + } + + /** + * Month of the object. + * + * @return month + */ + @javax.annotation.Nonnull + public String getMonth() { + return month; + } + + public void setMonth(@javax.annotation.Nonnull String month) { + this.month = month; + } + + public CronExpressionInput second(@javax.annotation.Nonnull String second) { + this.second = second; + return this; + } + + /** + * Second of the object. + * + * @return second + */ + @javax.annotation.Nonnull + public String getSecond() { + return second; + } + + public void setSecond(@javax.annotation.Nonnull String second) { + this.second = second; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key name of the property + * @param value value of the property + * @return the CronExpressionInput instance itself + */ + public CronExpressionInput putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return a map of objects + */ + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key name of the property + * @return an object + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + CronExpressionInput cronExpressionInput = (CronExpressionInput) o; + return Objects.equals(this.dayOfMonth, cronExpressionInput.dayOfMonth) + && Objects.equals(this.dayOfWeek, cronExpressionInput.dayOfWeek) + && Objects.equals(this.hour, cronExpressionInput.hour) + && Objects.equals(this.minute, cronExpressionInput.minute) + && Objects.equals(this.month, cronExpressionInput.month) + && Objects.equals(this.second, cronExpressionInput.second) + && Objects.equals( + this.additionalProperties, cronExpressionInput.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash( + dayOfMonth, dayOfWeek, hour, minute, month, second, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class CronExpressionInput {\n"); + sb.append(" dayOfMonth: ").append(toIndentedString(dayOfMonth)).append("\n"); + sb.append(" dayOfWeek: ").append(toIndentedString(dayOfWeek)).append("\n"); + sb.append(" hour: ").append(toIndentedString(hour)).append("\n"); + sb.append(" minute: ").append(toIndentedString(minute)).append("\n"); + sb.append(" month: ").append(toIndentedString(month)).append("\n"); + sb.append(" second: ").append(toIndentedString(second)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first + * line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("day_of_month"); + openapiFields.add("day_of_week"); + openapiFields.add("hour"); + openapiFields.add("minute"); + openapiFields.add("month"); + openapiFields.add("second"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + openapiRequiredFields.add("day_of_month"); + openapiRequiredFields.add("day_of_week"); + openapiRequiredFields.add("hour"); + openapiRequiredFields.add("minute"); + openapiRequiredFields.add("month"); + openapiRequiredFields.add("second"); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to CronExpressionInput + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!CronExpressionInput.openapiRequiredFields + .isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException( + String.format( + "The required field(s) %s in CronExpressionInput is not found in" + + " the empty JSON string", + CronExpressionInput.openapiRequiredFields.toString())); + } + } + + // check to make sure all required properties/fields are present in the JSON string + for (String requiredField : CronExpressionInput.openapiRequiredFields) { + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException( + String.format( + "The required field `%s` is not found in the JSON string: %s", + requiredField, jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if (!jsonObj.get("day_of_month").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `day_of_month` to be a primitive type in the JSON" + + " string but got `%s`", + jsonObj.get("day_of_month").toString())); + } + if (!jsonObj.get("day_of_week").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `day_of_week` to be a primitive type in the JSON" + + " string but got `%s`", + jsonObj.get("day_of_week").toString())); + } + if (!jsonObj.get("hour").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `hour` to be a primitive type in the JSON string" + + " but got `%s`", + jsonObj.get("hour").toString())); + } + if (!jsonObj.get("minute").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `minute` to be a primitive type in the JSON string" + + " but got `%s`", + jsonObj.get("minute").toString())); + } + if (!jsonObj.get("month").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `month` to be a primitive type in the JSON string" + + " but got `%s`", + jsonObj.get("month").toString())); + } + if (!jsonObj.get("second").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `second` to be a primitive type in the JSON string" + + " but got `%s`", + jsonObj.get("second").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!CronExpressionInput.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'CronExpressionInput' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter = + gson.getDelegateAdapter(this, TypeToken.get(CronExpressionInput.class)); + + return (TypeAdapter) + new TypeAdapter() { + @Override + public void write(JsonWriter out, CronExpressionInput value) + throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + obj.remove("additionalProperties"); + // serialize additional properties + if (value.getAdditionalProperties() != null) { + for (Map.Entry entry : + value.getAdditionalProperties().entrySet()) { + if (entry.getValue() instanceof String) + obj.addProperty(entry.getKey(), (String) entry.getValue()); + else if (entry.getValue() instanceof Number) + obj.addProperty(entry.getKey(), (Number) entry.getValue()); + else if (entry.getValue() instanceof Boolean) + obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); + else if (entry.getValue() instanceof Character) + obj.addProperty( + entry.getKey(), (Character) entry.getValue()); + else { + JsonElement jsonElement = gson.toJsonTree(entry.getValue()); + if (jsonElement.isJsonArray()) { + obj.add(entry.getKey(), jsonElement.getAsJsonArray()); + } else { + obj.add(entry.getKey(), jsonElement.getAsJsonObject()); + } + } + } + } + elementAdapter.write(out, obj); + } + + @Override + public CronExpressionInput read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // store additional fields in the deserialized instance + CronExpressionInput instance = thisAdapter.fromJsonTree(jsonObj); + for (Map.Entry entry : jsonObj.entrySet()) { + if (!openapiFields.contains(entry.getKey())) { + if (entry.getValue().isJsonPrimitive()) { // primitive type + if (entry.getValue().getAsJsonPrimitive().isString()) + instance.putAdditionalProperty( + entry.getKey(), entry.getValue().getAsString()); + else if (entry.getValue().getAsJsonPrimitive().isNumber()) + instance.putAdditionalProperty( + entry.getKey(), entry.getValue().getAsNumber()); + else if (entry.getValue().getAsJsonPrimitive().isBoolean()) + instance.putAdditionalProperty( + entry.getKey(), + entry.getValue().getAsBoolean()); + else + throw new IllegalArgumentException( + String.format( + "The field `%s` has unknown primitive" + + " type. Value: %s", + entry.getKey(), + entry.getValue().toString())); + } else if (entry.getValue().isJsonArray()) { + instance.putAdditionalProperty( + entry.getKey(), + gson.fromJson(entry.getValue(), List.class)); + } else { // JSON object + instance.putAdditionalProperty( + entry.getKey(), + gson.fromJson(entry.getValue(), HashMap.class)); + } + } + } + return instance; + } + }.nullSafe(); + } + } + + /** + * Create an instance of CronExpressionInput given an JSON string + * + * @param jsonString JSON string + * @return An instance of CronExpressionInput + * @throws IOException if the JSON string is invalid with respect to CronExpressionInput + */ + public static CronExpressionInput fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, CronExpressionInput.class); + } + + /** + * Convert an instance of CronExpressionInput to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} diff --git a/sdks/java/src/main/java/com/thoughtspot/client/model/CspSettings.java b/sdks/java/src/main/java/com/thoughtspot/client/model/CspSettings.java new file mode 100644 index 000000000..ae2855770 --- /dev/null +++ b/sdks/java/src/main/java/com/thoughtspot/client/model/CspSettings.java @@ -0,0 +1,590 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client.model; + +import com.google.gson.Gson; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.TypeAdapter; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.annotations.SerializedName; +import com.google.gson.reflect.TypeToken; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import com.thoughtspot.client.JSON; +import java.io.IOException; +import java.io.Serializable; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Objects; +import org.openapitools.jackson.nullable.JsonNullable; + +/** CSP (Content Security Policy) settings. */ +@javax.annotation.Generated( + value = "org.openapitools.codegen.languages.JavaClientCodegen", + comments = "Generator version: 7.12.0") +public class CspSettings implements Serializable { + private static final long serialVersionUID = 1L; + + public static final String SERIALIZED_NAME_CONNECT_SRC_URLS = "connect_src_urls"; + + @SerializedName(SERIALIZED_NAME_CONNECT_SRC_URLS) + @javax.annotation.Nullable + private List connectSrcUrls; + + public static final String SERIALIZED_NAME_FONT_SRC_URLS = "font_src_urls"; + + @SerializedName(SERIALIZED_NAME_FONT_SRC_URLS) + @javax.annotation.Nullable + private List fontSrcUrls; + + public static final String SERIALIZED_NAME_VISUAL_EMBED_HOSTS = "visual_embed_hosts"; + + @SerializedName(SERIALIZED_NAME_VISUAL_EMBED_HOSTS) + @javax.annotation.Nullable + private List visualEmbedHosts; + + public static final String SERIALIZED_NAME_IFRAME_SRC_URLS = "iframe_src_urls"; + + @SerializedName(SERIALIZED_NAME_IFRAME_SRC_URLS) + @javax.annotation.Nullable + private List iframeSrcUrls; + + public static final String SERIALIZED_NAME_IMG_SRC_URLS = "img_src_urls"; + + @SerializedName(SERIALIZED_NAME_IMG_SRC_URLS) + @javax.annotation.Nullable + private List imgSrcUrls; + + public static final String SERIALIZED_NAME_SCRIPT_SRC_URLS = "script_src_urls"; + + @SerializedName(SERIALIZED_NAME_SCRIPT_SRC_URLS) + @javax.annotation.Nullable + private ScriptSrcUrls scriptSrcUrls; + + public static final String SERIALIZED_NAME_STYLE_SRC_URLS = "style_src_urls"; + + @SerializedName(SERIALIZED_NAME_STYLE_SRC_URLS) + @javax.annotation.Nullable + private List styleSrcUrls; + + public CspSettings() {} + + public CspSettings connectSrcUrls(@javax.annotation.Nullable List connectSrcUrls) { + this.connectSrcUrls = connectSrcUrls; + return this; + } + + public CspSettings addConnectSrcUrlsItem(String connectSrcUrlsItem) { + if (this.connectSrcUrls == null) { + this.connectSrcUrls = new ArrayList<>(); + } + this.connectSrcUrls.add(connectSrcUrlsItem); + return this; + } + + /** + * Allowed URLs for connect-src directive. + * + * @return connectSrcUrls + */ + @javax.annotation.Nullable + public List getConnectSrcUrls() { + return connectSrcUrls; + } + + public void setConnectSrcUrls(@javax.annotation.Nullable List connectSrcUrls) { + this.connectSrcUrls = connectSrcUrls; + } + + public CspSettings fontSrcUrls(@javax.annotation.Nullable List fontSrcUrls) { + this.fontSrcUrls = fontSrcUrls; + return this; + } + + public CspSettings addFontSrcUrlsItem(String fontSrcUrlsItem) { + if (this.fontSrcUrls == null) { + this.fontSrcUrls = new ArrayList<>(); + } + this.fontSrcUrls.add(fontSrcUrlsItem); + return this; + } + + /** + * Allowed URLs for font-src directive. + * + * @return fontSrcUrls + */ + @javax.annotation.Nullable + public List getFontSrcUrls() { + return fontSrcUrls; + } + + public void setFontSrcUrls(@javax.annotation.Nullable List fontSrcUrls) { + this.fontSrcUrls = fontSrcUrls; + } + + public CspSettings visualEmbedHosts(@javax.annotation.Nullable List visualEmbedHosts) { + this.visualEmbedHosts = visualEmbedHosts; + return this; + } + + public CspSettings addVisualEmbedHostsItem(String visualEmbedHostsItem) { + if (this.visualEmbedHosts == null) { + this.visualEmbedHosts = new ArrayList<>(); + } + this.visualEmbedHosts.add(visualEmbedHostsItem); + return this; + } + + /** + * Allowed hosts for visual embed (frame-ancestors directive). + * + * @return visualEmbedHosts + */ + @javax.annotation.Nullable + public List getVisualEmbedHosts() { + return visualEmbedHosts; + } + + public void setVisualEmbedHosts(@javax.annotation.Nullable List visualEmbedHosts) { + this.visualEmbedHosts = visualEmbedHosts; + } + + public CspSettings iframeSrcUrls(@javax.annotation.Nullable List iframeSrcUrls) { + this.iframeSrcUrls = iframeSrcUrls; + return this; + } + + public CspSettings addIframeSrcUrlsItem(String iframeSrcUrlsItem) { + if (this.iframeSrcUrls == null) { + this.iframeSrcUrls = new ArrayList<>(); + } + this.iframeSrcUrls.add(iframeSrcUrlsItem); + return this; + } + + /** + * Allowed URLs for frame-src directive. + * + * @return iframeSrcUrls + */ + @javax.annotation.Nullable + public List getIframeSrcUrls() { + return iframeSrcUrls; + } + + public void setIframeSrcUrls(@javax.annotation.Nullable List iframeSrcUrls) { + this.iframeSrcUrls = iframeSrcUrls; + } + + public CspSettings imgSrcUrls(@javax.annotation.Nullable List imgSrcUrls) { + this.imgSrcUrls = imgSrcUrls; + return this; + } + + public CspSettings addImgSrcUrlsItem(String imgSrcUrlsItem) { + if (this.imgSrcUrls == null) { + this.imgSrcUrls = new ArrayList<>(); + } + this.imgSrcUrls.add(imgSrcUrlsItem); + return this; + } + + /** + * Allowed URLs for img-src directive. + * + * @return imgSrcUrls + */ + @javax.annotation.Nullable + public List getImgSrcUrls() { + return imgSrcUrls; + } + + public void setImgSrcUrls(@javax.annotation.Nullable List imgSrcUrls) { + this.imgSrcUrls = imgSrcUrls; + } + + public CspSettings scriptSrcUrls(@javax.annotation.Nullable ScriptSrcUrls scriptSrcUrls) { + this.scriptSrcUrls = scriptSrcUrls; + return this; + } + + /** + * Get scriptSrcUrls + * + * @return scriptSrcUrls + */ + @javax.annotation.Nullable + public ScriptSrcUrls getScriptSrcUrls() { + return scriptSrcUrls; + } + + public void setScriptSrcUrls(@javax.annotation.Nullable ScriptSrcUrls scriptSrcUrls) { + this.scriptSrcUrls = scriptSrcUrls; + } + + public CspSettings styleSrcUrls(@javax.annotation.Nullable List styleSrcUrls) { + this.styleSrcUrls = styleSrcUrls; + return this; + } + + public CspSettings addStyleSrcUrlsItem(String styleSrcUrlsItem) { + if (this.styleSrcUrls == null) { + this.styleSrcUrls = new ArrayList<>(); + } + this.styleSrcUrls.add(styleSrcUrlsItem); + return this; + } + + /** + * Allowed URLs for style-src directive. + * + * @return styleSrcUrls + */ + @javax.annotation.Nullable + public List getStyleSrcUrls() { + return styleSrcUrls; + } + + public void setStyleSrcUrls(@javax.annotation.Nullable List styleSrcUrls) { + this.styleSrcUrls = styleSrcUrls; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key name of the property + * @param value value of the property + * @return the CspSettings instance itself + */ + public CspSettings putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return a map of objects + */ + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key name of the property + * @return an object + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + CspSettings cspSettings = (CspSettings) o; + return Objects.equals(this.connectSrcUrls, cspSettings.connectSrcUrls) + && Objects.equals(this.fontSrcUrls, cspSettings.fontSrcUrls) + && Objects.equals(this.visualEmbedHosts, cspSettings.visualEmbedHosts) + && Objects.equals(this.iframeSrcUrls, cspSettings.iframeSrcUrls) + && Objects.equals(this.imgSrcUrls, cspSettings.imgSrcUrls) + && Objects.equals(this.scriptSrcUrls, cspSettings.scriptSrcUrls) + && Objects.equals(this.styleSrcUrls, cspSettings.styleSrcUrls) + && Objects.equals(this.additionalProperties, cspSettings.additionalProperties); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b + || (a != null + && b != null + && a.isPresent() + && b.isPresent() + && Objects.deepEquals(a.get(), b.get())); + } + + @Override + public int hashCode() { + return Objects.hash( + connectSrcUrls, + fontSrcUrls, + visualEmbedHosts, + iframeSrcUrls, + imgSrcUrls, + scriptSrcUrls, + styleSrcUrls, + additionalProperties); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; + } + return a.isPresent() ? Arrays.deepHashCode(new Object[] {a.get()}) : 31; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class CspSettings {\n"); + sb.append(" connectSrcUrls: ").append(toIndentedString(connectSrcUrls)).append("\n"); + sb.append(" fontSrcUrls: ").append(toIndentedString(fontSrcUrls)).append("\n"); + sb.append(" visualEmbedHosts: ").append(toIndentedString(visualEmbedHosts)).append("\n"); + sb.append(" iframeSrcUrls: ").append(toIndentedString(iframeSrcUrls)).append("\n"); + sb.append(" imgSrcUrls: ").append(toIndentedString(imgSrcUrls)).append("\n"); + sb.append(" scriptSrcUrls: ").append(toIndentedString(scriptSrcUrls)).append("\n"); + sb.append(" styleSrcUrls: ").append(toIndentedString(styleSrcUrls)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first + * line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("connect_src_urls"); + openapiFields.add("font_src_urls"); + openapiFields.add("visual_embed_hosts"); + openapiFields.add("iframe_src_urls"); + openapiFields.add("img_src_urls"); + openapiFields.add("script_src_urls"); + openapiFields.add("style_src_urls"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to CspSettings + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!CspSettings.openapiRequiredFields + .isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException( + String.format( + "The required field(s) %s in CspSettings is not found in the empty" + + " JSON string", + CspSettings.openapiRequiredFields.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // ensure the optional json data is an array if present + if (jsonObj.get("connect_src_urls") != null + && !jsonObj.get("connect_src_urls").isJsonNull() + && !jsonObj.get("connect_src_urls").isJsonArray()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `connect_src_urls` to be an array in the JSON" + + " string but got `%s`", + jsonObj.get("connect_src_urls").toString())); + } + // ensure the optional json data is an array if present + if (jsonObj.get("font_src_urls") != null + && !jsonObj.get("font_src_urls").isJsonNull() + && !jsonObj.get("font_src_urls").isJsonArray()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `font_src_urls` to be an array in the JSON string" + + " but got `%s`", + jsonObj.get("font_src_urls").toString())); + } + // ensure the optional json data is an array if present + if (jsonObj.get("visual_embed_hosts") != null + && !jsonObj.get("visual_embed_hosts").isJsonNull() + && !jsonObj.get("visual_embed_hosts").isJsonArray()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `visual_embed_hosts` to be an array in the JSON" + + " string but got `%s`", + jsonObj.get("visual_embed_hosts").toString())); + } + // ensure the optional json data is an array if present + if (jsonObj.get("iframe_src_urls") != null + && !jsonObj.get("iframe_src_urls").isJsonNull() + && !jsonObj.get("iframe_src_urls").isJsonArray()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `iframe_src_urls` to be an array in the JSON" + + " string but got `%s`", + jsonObj.get("iframe_src_urls").toString())); + } + // ensure the optional json data is an array if present + if (jsonObj.get("img_src_urls") != null + && !jsonObj.get("img_src_urls").isJsonNull() + && !jsonObj.get("img_src_urls").isJsonArray()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `img_src_urls` to be an array in the JSON string" + + " but got `%s`", + jsonObj.get("img_src_urls").toString())); + } + // validate the optional field `script_src_urls` + if (jsonObj.get("script_src_urls") != null + && !jsonObj.get("script_src_urls").isJsonNull()) { + ScriptSrcUrls.validateJsonElement(jsonObj.get("script_src_urls")); + } + // ensure the optional json data is an array if present + if (jsonObj.get("style_src_urls") != null + && !jsonObj.get("style_src_urls").isJsonNull() + && !jsonObj.get("style_src_urls").isJsonArray()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `style_src_urls` to be an array in the JSON string" + + " but got `%s`", + jsonObj.get("style_src_urls").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!CspSettings.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'CspSettings' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter = + gson.getDelegateAdapter(this, TypeToken.get(CspSettings.class)); + + return (TypeAdapter) + new TypeAdapter() { + @Override + public void write(JsonWriter out, CspSettings value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + obj.remove("additionalProperties"); + // serialize additional properties + if (value.getAdditionalProperties() != null) { + for (Map.Entry entry : + value.getAdditionalProperties().entrySet()) { + if (entry.getValue() instanceof String) + obj.addProperty(entry.getKey(), (String) entry.getValue()); + else if (entry.getValue() instanceof Number) + obj.addProperty(entry.getKey(), (Number) entry.getValue()); + else if (entry.getValue() instanceof Boolean) + obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); + else if (entry.getValue() instanceof Character) + obj.addProperty( + entry.getKey(), (Character) entry.getValue()); + else { + JsonElement jsonElement = gson.toJsonTree(entry.getValue()); + if (jsonElement.isJsonArray()) { + obj.add(entry.getKey(), jsonElement.getAsJsonArray()); + } else { + obj.add(entry.getKey(), jsonElement.getAsJsonObject()); + } + } + } + } + elementAdapter.write(out, obj); + } + + @Override + public CspSettings read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // store additional fields in the deserialized instance + CspSettings instance = thisAdapter.fromJsonTree(jsonObj); + for (Map.Entry entry : jsonObj.entrySet()) { + if (!openapiFields.contains(entry.getKey())) { + if (entry.getValue().isJsonPrimitive()) { // primitive type + if (entry.getValue().getAsJsonPrimitive().isString()) + instance.putAdditionalProperty( + entry.getKey(), entry.getValue().getAsString()); + else if (entry.getValue().getAsJsonPrimitive().isNumber()) + instance.putAdditionalProperty( + entry.getKey(), entry.getValue().getAsNumber()); + else if (entry.getValue().getAsJsonPrimitive().isBoolean()) + instance.putAdditionalProperty( + entry.getKey(), + entry.getValue().getAsBoolean()); + else + throw new IllegalArgumentException( + String.format( + "The field `%s` has unknown primitive" + + " type. Value: %s", + entry.getKey(), + entry.getValue().toString())); + } else if (entry.getValue().isJsonArray()) { + instance.putAdditionalProperty( + entry.getKey(), + gson.fromJson(entry.getValue(), List.class)); + } else { // JSON object + instance.putAdditionalProperty( + entry.getKey(), + gson.fromJson(entry.getValue(), HashMap.class)); + } + } + } + return instance; + } + }.nullSafe(); + } + } + + /** + * Create an instance of CspSettings given an JSON string + * + * @param jsonString JSON string + * @return An instance of CspSettings + * @throws IOException if the JSON string is invalid with respect to CspSettings + */ + public static CspSettings fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, CspSettings.class); + } + + /** + * Convert an instance of CspSettings to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} diff --git a/sdks/java/src/main/java/com/thoughtspot/client/model/CspSettingsInput.java b/sdks/java/src/main/java/com/thoughtspot/client/model/CspSettingsInput.java new file mode 100644 index 000000000..76ea1dbb7 --- /dev/null +++ b/sdks/java/src/main/java/com/thoughtspot/client/model/CspSettingsInput.java @@ -0,0 +1,593 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client.model; + +import com.google.gson.Gson; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.TypeAdapter; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.annotations.SerializedName; +import com.google.gson.reflect.TypeToken; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import com.thoughtspot.client.JSON; +import java.io.IOException; +import java.io.Serializable; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Objects; +import org.openapitools.jackson.nullable.JsonNullable; + +/** Input for CSP (Content Security Policy) settings. */ +@javax.annotation.Generated( + value = "org.openapitools.codegen.languages.JavaClientCodegen", + comments = "Generator version: 7.12.0") +public class CspSettingsInput implements Serializable { + private static final long serialVersionUID = 1L; + + public static final String SERIALIZED_NAME_CONNECT_SRC_URLS = "connect_src_urls"; + + @SerializedName(SERIALIZED_NAME_CONNECT_SRC_URLS) + @javax.annotation.Nullable + private List connectSrcUrls; + + public static final String SERIALIZED_NAME_FONT_SRC_URLS = "font_src_urls"; + + @SerializedName(SERIALIZED_NAME_FONT_SRC_URLS) + @javax.annotation.Nullable + private List fontSrcUrls; + + public static final String SERIALIZED_NAME_VISUAL_EMBED_HOSTS = "visual_embed_hosts"; + + @SerializedName(SERIALIZED_NAME_VISUAL_EMBED_HOSTS) + @javax.annotation.Nullable + private List visualEmbedHosts; + + public static final String SERIALIZED_NAME_IFRAME_SRC_URLS = "iframe_src_urls"; + + @SerializedName(SERIALIZED_NAME_IFRAME_SRC_URLS) + @javax.annotation.Nullable + private List iframeSrcUrls; + + public static final String SERIALIZED_NAME_IMG_SRC_URLS = "img_src_urls"; + + @SerializedName(SERIALIZED_NAME_IMG_SRC_URLS) + @javax.annotation.Nullable + private List imgSrcUrls; + + public static final String SERIALIZED_NAME_SCRIPT_SRC_URLS = "script_src_urls"; + + @SerializedName(SERIALIZED_NAME_SCRIPT_SRC_URLS) + @javax.annotation.Nullable + private ScriptSrcUrlsInput scriptSrcUrls; + + public static final String SERIALIZED_NAME_STYLE_SRC_URLS = "style_src_urls"; + + @SerializedName(SERIALIZED_NAME_STYLE_SRC_URLS) + @javax.annotation.Nullable + private List styleSrcUrls; + + public CspSettingsInput() {} + + public CspSettingsInput connectSrcUrls(@javax.annotation.Nullable List connectSrcUrls) { + this.connectSrcUrls = connectSrcUrls; + return this; + } + + public CspSettingsInput addConnectSrcUrlsItem(String connectSrcUrlsItem) { + if (this.connectSrcUrls == null) { + this.connectSrcUrls = new ArrayList<>(); + } + this.connectSrcUrls.add(connectSrcUrlsItem); + return this; + } + + /** + * Allowed URLs for connect-src directive. + * + * @return connectSrcUrls + */ + @javax.annotation.Nullable + public List getConnectSrcUrls() { + return connectSrcUrls; + } + + public void setConnectSrcUrls(@javax.annotation.Nullable List connectSrcUrls) { + this.connectSrcUrls = connectSrcUrls; + } + + public CspSettingsInput fontSrcUrls(@javax.annotation.Nullable List fontSrcUrls) { + this.fontSrcUrls = fontSrcUrls; + return this; + } + + public CspSettingsInput addFontSrcUrlsItem(String fontSrcUrlsItem) { + if (this.fontSrcUrls == null) { + this.fontSrcUrls = new ArrayList<>(); + } + this.fontSrcUrls.add(fontSrcUrlsItem); + return this; + } + + /** + * Allowed URLs for font-src directive. + * + * @return fontSrcUrls + */ + @javax.annotation.Nullable + public List getFontSrcUrls() { + return fontSrcUrls; + } + + public void setFontSrcUrls(@javax.annotation.Nullable List fontSrcUrls) { + this.fontSrcUrls = fontSrcUrls; + } + + public CspSettingsInput visualEmbedHosts( + @javax.annotation.Nullable List visualEmbedHosts) { + this.visualEmbedHosts = visualEmbedHosts; + return this; + } + + public CspSettingsInput addVisualEmbedHostsItem(String visualEmbedHostsItem) { + if (this.visualEmbedHosts == null) { + this.visualEmbedHosts = new ArrayList<>(); + } + this.visualEmbedHosts.add(visualEmbedHostsItem); + return this; + } + + /** + * Allowed hosts for visual embed (frame-ancestors directive). + * + * @return visualEmbedHosts + */ + @javax.annotation.Nullable + public List getVisualEmbedHosts() { + return visualEmbedHosts; + } + + public void setVisualEmbedHosts(@javax.annotation.Nullable List visualEmbedHosts) { + this.visualEmbedHosts = visualEmbedHosts; + } + + public CspSettingsInput iframeSrcUrls(@javax.annotation.Nullable List iframeSrcUrls) { + this.iframeSrcUrls = iframeSrcUrls; + return this; + } + + public CspSettingsInput addIframeSrcUrlsItem(String iframeSrcUrlsItem) { + if (this.iframeSrcUrls == null) { + this.iframeSrcUrls = new ArrayList<>(); + } + this.iframeSrcUrls.add(iframeSrcUrlsItem); + return this; + } + + /** + * Allowed URLs for frame-src directive. + * + * @return iframeSrcUrls + */ + @javax.annotation.Nullable + public List getIframeSrcUrls() { + return iframeSrcUrls; + } + + public void setIframeSrcUrls(@javax.annotation.Nullable List iframeSrcUrls) { + this.iframeSrcUrls = iframeSrcUrls; + } + + public CspSettingsInput imgSrcUrls(@javax.annotation.Nullable List imgSrcUrls) { + this.imgSrcUrls = imgSrcUrls; + return this; + } + + public CspSettingsInput addImgSrcUrlsItem(String imgSrcUrlsItem) { + if (this.imgSrcUrls == null) { + this.imgSrcUrls = new ArrayList<>(); + } + this.imgSrcUrls.add(imgSrcUrlsItem); + return this; + } + + /** + * Allowed URLs for img-src directive. + * + * @return imgSrcUrls + */ + @javax.annotation.Nullable + public List getImgSrcUrls() { + return imgSrcUrls; + } + + public void setImgSrcUrls(@javax.annotation.Nullable List imgSrcUrls) { + this.imgSrcUrls = imgSrcUrls; + } + + public CspSettingsInput scriptSrcUrls( + @javax.annotation.Nullable ScriptSrcUrlsInput scriptSrcUrls) { + this.scriptSrcUrls = scriptSrcUrls; + return this; + } + + /** + * Get scriptSrcUrls + * + * @return scriptSrcUrls + */ + @javax.annotation.Nullable + public ScriptSrcUrlsInput getScriptSrcUrls() { + return scriptSrcUrls; + } + + public void setScriptSrcUrls(@javax.annotation.Nullable ScriptSrcUrlsInput scriptSrcUrls) { + this.scriptSrcUrls = scriptSrcUrls; + } + + public CspSettingsInput styleSrcUrls(@javax.annotation.Nullable List styleSrcUrls) { + this.styleSrcUrls = styleSrcUrls; + return this; + } + + public CspSettingsInput addStyleSrcUrlsItem(String styleSrcUrlsItem) { + if (this.styleSrcUrls == null) { + this.styleSrcUrls = new ArrayList<>(); + } + this.styleSrcUrls.add(styleSrcUrlsItem); + return this; + } + + /** + * Allowed URLs for style-src directive. + * + * @return styleSrcUrls + */ + @javax.annotation.Nullable + public List getStyleSrcUrls() { + return styleSrcUrls; + } + + public void setStyleSrcUrls(@javax.annotation.Nullable List styleSrcUrls) { + this.styleSrcUrls = styleSrcUrls; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key name of the property + * @param value value of the property + * @return the CspSettingsInput instance itself + */ + public CspSettingsInput putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return a map of objects + */ + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key name of the property + * @return an object + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + CspSettingsInput cspSettingsInput = (CspSettingsInput) o; + return Objects.equals(this.connectSrcUrls, cspSettingsInput.connectSrcUrls) + && Objects.equals(this.fontSrcUrls, cspSettingsInput.fontSrcUrls) + && Objects.equals(this.visualEmbedHosts, cspSettingsInput.visualEmbedHosts) + && Objects.equals(this.iframeSrcUrls, cspSettingsInput.iframeSrcUrls) + && Objects.equals(this.imgSrcUrls, cspSettingsInput.imgSrcUrls) + && Objects.equals(this.scriptSrcUrls, cspSettingsInput.scriptSrcUrls) + && Objects.equals(this.styleSrcUrls, cspSettingsInput.styleSrcUrls) + && Objects.equals(this.additionalProperties, cspSettingsInput.additionalProperties); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b + || (a != null + && b != null + && a.isPresent() + && b.isPresent() + && Objects.deepEquals(a.get(), b.get())); + } + + @Override + public int hashCode() { + return Objects.hash( + connectSrcUrls, + fontSrcUrls, + visualEmbedHosts, + iframeSrcUrls, + imgSrcUrls, + scriptSrcUrls, + styleSrcUrls, + additionalProperties); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; + } + return a.isPresent() ? Arrays.deepHashCode(new Object[] {a.get()}) : 31; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class CspSettingsInput {\n"); + sb.append(" connectSrcUrls: ").append(toIndentedString(connectSrcUrls)).append("\n"); + sb.append(" fontSrcUrls: ").append(toIndentedString(fontSrcUrls)).append("\n"); + sb.append(" visualEmbedHosts: ").append(toIndentedString(visualEmbedHosts)).append("\n"); + sb.append(" iframeSrcUrls: ").append(toIndentedString(iframeSrcUrls)).append("\n"); + sb.append(" imgSrcUrls: ").append(toIndentedString(imgSrcUrls)).append("\n"); + sb.append(" scriptSrcUrls: ").append(toIndentedString(scriptSrcUrls)).append("\n"); + sb.append(" styleSrcUrls: ").append(toIndentedString(styleSrcUrls)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first + * line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("connect_src_urls"); + openapiFields.add("font_src_urls"); + openapiFields.add("visual_embed_hosts"); + openapiFields.add("iframe_src_urls"); + openapiFields.add("img_src_urls"); + openapiFields.add("script_src_urls"); + openapiFields.add("style_src_urls"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to CspSettingsInput + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!CspSettingsInput.openapiRequiredFields + .isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException( + String.format( + "The required field(s) %s in CspSettingsInput is not found in the" + + " empty JSON string", + CspSettingsInput.openapiRequiredFields.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // ensure the optional json data is an array if present + if (jsonObj.get("connect_src_urls") != null + && !jsonObj.get("connect_src_urls").isJsonNull() + && !jsonObj.get("connect_src_urls").isJsonArray()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `connect_src_urls` to be an array in the JSON" + + " string but got `%s`", + jsonObj.get("connect_src_urls").toString())); + } + // ensure the optional json data is an array if present + if (jsonObj.get("font_src_urls") != null + && !jsonObj.get("font_src_urls").isJsonNull() + && !jsonObj.get("font_src_urls").isJsonArray()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `font_src_urls` to be an array in the JSON string" + + " but got `%s`", + jsonObj.get("font_src_urls").toString())); + } + // ensure the optional json data is an array if present + if (jsonObj.get("visual_embed_hosts") != null + && !jsonObj.get("visual_embed_hosts").isJsonNull() + && !jsonObj.get("visual_embed_hosts").isJsonArray()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `visual_embed_hosts` to be an array in the JSON" + + " string but got `%s`", + jsonObj.get("visual_embed_hosts").toString())); + } + // ensure the optional json data is an array if present + if (jsonObj.get("iframe_src_urls") != null + && !jsonObj.get("iframe_src_urls").isJsonNull() + && !jsonObj.get("iframe_src_urls").isJsonArray()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `iframe_src_urls` to be an array in the JSON" + + " string but got `%s`", + jsonObj.get("iframe_src_urls").toString())); + } + // ensure the optional json data is an array if present + if (jsonObj.get("img_src_urls") != null + && !jsonObj.get("img_src_urls").isJsonNull() + && !jsonObj.get("img_src_urls").isJsonArray()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `img_src_urls` to be an array in the JSON string" + + " but got `%s`", + jsonObj.get("img_src_urls").toString())); + } + // validate the optional field `script_src_urls` + if (jsonObj.get("script_src_urls") != null + && !jsonObj.get("script_src_urls").isJsonNull()) { + ScriptSrcUrlsInput.validateJsonElement(jsonObj.get("script_src_urls")); + } + // ensure the optional json data is an array if present + if (jsonObj.get("style_src_urls") != null + && !jsonObj.get("style_src_urls").isJsonNull() + && !jsonObj.get("style_src_urls").isJsonArray()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `style_src_urls` to be an array in the JSON string" + + " but got `%s`", + jsonObj.get("style_src_urls").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!CspSettingsInput.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'CspSettingsInput' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter = + gson.getDelegateAdapter(this, TypeToken.get(CspSettingsInput.class)); + + return (TypeAdapter) + new TypeAdapter() { + @Override + public void write(JsonWriter out, CspSettingsInput value) + throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + obj.remove("additionalProperties"); + // serialize additional properties + if (value.getAdditionalProperties() != null) { + for (Map.Entry entry : + value.getAdditionalProperties().entrySet()) { + if (entry.getValue() instanceof String) + obj.addProperty(entry.getKey(), (String) entry.getValue()); + else if (entry.getValue() instanceof Number) + obj.addProperty(entry.getKey(), (Number) entry.getValue()); + else if (entry.getValue() instanceof Boolean) + obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); + else if (entry.getValue() instanceof Character) + obj.addProperty( + entry.getKey(), (Character) entry.getValue()); + else { + JsonElement jsonElement = gson.toJsonTree(entry.getValue()); + if (jsonElement.isJsonArray()) { + obj.add(entry.getKey(), jsonElement.getAsJsonArray()); + } else { + obj.add(entry.getKey(), jsonElement.getAsJsonObject()); + } + } + } + } + elementAdapter.write(out, obj); + } + + @Override + public CspSettingsInput read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // store additional fields in the deserialized instance + CspSettingsInput instance = thisAdapter.fromJsonTree(jsonObj); + for (Map.Entry entry : jsonObj.entrySet()) { + if (!openapiFields.contains(entry.getKey())) { + if (entry.getValue().isJsonPrimitive()) { // primitive type + if (entry.getValue().getAsJsonPrimitive().isString()) + instance.putAdditionalProperty( + entry.getKey(), entry.getValue().getAsString()); + else if (entry.getValue().getAsJsonPrimitive().isNumber()) + instance.putAdditionalProperty( + entry.getKey(), entry.getValue().getAsNumber()); + else if (entry.getValue().getAsJsonPrimitive().isBoolean()) + instance.putAdditionalProperty( + entry.getKey(), + entry.getValue().getAsBoolean()); + else + throw new IllegalArgumentException( + String.format( + "The field `%s` has unknown primitive" + + " type. Value: %s", + entry.getKey(), + entry.getValue().toString())); + } else if (entry.getValue().isJsonArray()) { + instance.putAdditionalProperty( + entry.getKey(), + gson.fromJson(entry.getValue(), List.class)); + } else { // JSON object + instance.putAdditionalProperty( + entry.getKey(), + gson.fromJson(entry.getValue(), HashMap.class)); + } + } + } + return instance; + } + }.nullSafe(); + } + } + + /** + * Create an instance of CspSettingsInput given an JSON string + * + * @param jsonString JSON string + * @return An instance of CspSettingsInput + * @throws IOException if the JSON string is invalid with respect to CspSettingsInput + */ + public static CspSettingsInput fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, CspSettingsInput.class); + } + + /** + * Convert an instance of CspSettingsInput to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} diff --git a/sdks/java/src/main/java/com/thoughtspot/client/model/CustomActionMetadataTypeInput.java b/sdks/java/src/main/java/com/thoughtspot/client/model/CustomActionMetadataTypeInput.java new file mode 100644 index 000000000..ea2a837fc --- /dev/null +++ b/sdks/java/src/main/java/com/thoughtspot/client/model/CustomActionMetadataTypeInput.java @@ -0,0 +1,426 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client.model; + +import com.google.gson.Gson; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.TypeAdapter; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.reflect.TypeToken; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import com.thoughtspot.client.JSON; +import java.io.IOException; +import java.io.Serializable; +import java.util.Arrays; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Objects; +import org.openapitools.jackson.nullable.JsonNullable; + +/** MetadataType InputType used in Custom Action API's */ +@javax.annotation.Generated( + value = "org.openapitools.codegen.languages.JavaClientCodegen", + comments = "Generator version: 7.12.0") +public class CustomActionMetadataTypeInput implements Serializable { + private static final long serialVersionUID = 1L; + + /** + * Type of metadata object. Required if the name of the object is set as the identifier. This + * attribute is optional when the object GUID is specified as the identifier. + */ + @JsonAdapter(TypeEnum.Adapter.class) + public enum TypeEnum { + VISUALIZATION("VISUALIZATION"), + + ANSWER("ANSWER"), + + WORKSHEET("WORKSHEET"); + + private String value; + + TypeEnum(String value) { + this.value = value; + } + + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + public static TypeEnum fromValue(String value) { + for (TypeEnum b : TypeEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + return null; + } + + public static class Adapter extends TypeAdapter { + @Override + public void write(final JsonWriter jsonWriter, final TypeEnum enumeration) + throws IOException { + jsonWriter.value(enumeration.getValue()); + } + + @Override + public TypeEnum read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + return TypeEnum.fromValue(value); + } + } + + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + String value = jsonElement.getAsString(); + TypeEnum.fromValue(value); + } + } + + public static final String SERIALIZED_NAME_TYPE = "type"; + + @SerializedName(SERIALIZED_NAME_TYPE) + @javax.annotation.Nullable + private TypeEnum type; + + public static final String SERIALIZED_NAME_IDENTIFIER = "identifier"; + + @SerializedName(SERIALIZED_NAME_IDENTIFIER) + @javax.annotation.Nonnull + private String identifier; + + public CustomActionMetadataTypeInput() {} + + public CustomActionMetadataTypeInput type(@javax.annotation.Nullable TypeEnum type) { + this.type = type; + return this; + } + + /** + * Type of metadata object. Required if the name of the object is set as the identifier. This + * attribute is optional when the object GUID is specified as the identifier. + * + * @return type + */ + @javax.annotation.Nullable + public TypeEnum getType() { + return type; + } + + public void setType(@javax.annotation.Nullable TypeEnum type) { + this.type = type; + } + + public CustomActionMetadataTypeInput identifier(@javax.annotation.Nonnull String identifier) { + this.identifier = identifier; + return this; + } + + /** + * Unique ID or name of the metadata object. + * + * @return identifier + */ + @javax.annotation.Nonnull + public String getIdentifier() { + return identifier; + } + + public void setIdentifier(@javax.annotation.Nonnull String identifier) { + this.identifier = identifier; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key name of the property + * @param value value of the property + * @return the CustomActionMetadataTypeInput instance itself + */ + public CustomActionMetadataTypeInput putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return a map of objects + */ + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key name of the property + * @return an object + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + CustomActionMetadataTypeInput customActionMetadataTypeInput = + (CustomActionMetadataTypeInput) o; + return Objects.equals(this.type, customActionMetadataTypeInput.type) + && Objects.equals(this.identifier, customActionMetadataTypeInput.identifier) + && Objects.equals( + this.additionalProperties, + customActionMetadataTypeInput.additionalProperties); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b + || (a != null + && b != null + && a.isPresent() + && b.isPresent() + && Objects.deepEquals(a.get(), b.get())); + } + + @Override + public int hashCode() { + return Objects.hash(type, identifier, additionalProperties); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; + } + return a.isPresent() ? Arrays.deepHashCode(new Object[] {a.get()}) : 31; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class CustomActionMetadataTypeInput {\n"); + sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append(" identifier: ").append(toIndentedString(identifier)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first + * line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("type"); + openapiFields.add("identifier"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + openapiRequiredFields.add("identifier"); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to + * CustomActionMetadataTypeInput + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!CustomActionMetadataTypeInput.openapiRequiredFields + .isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException( + String.format( + "The required field(s) %s in CustomActionMetadataTypeInput is not" + + " found in the empty JSON string", + CustomActionMetadataTypeInput.openapiRequiredFields.toString())); + } + } + + // check to make sure all required properties/fields are present in the JSON string + for (String requiredField : CustomActionMetadataTypeInput.openapiRequiredFields) { + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException( + String.format( + "The required field `%s` is not found in the JSON string: %s", + requiredField, jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if ((jsonObj.get("type") != null && !jsonObj.get("type").isJsonNull()) + && !jsonObj.get("type").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `type` to be a primitive type in the JSON string" + + " but got `%s`", + jsonObj.get("type").toString())); + } + // validate the optional field `type` + if (jsonObj.get("type") != null && !jsonObj.get("type").isJsonNull()) { + TypeEnum.validateJsonElement(jsonObj.get("type")); + } + if (!jsonObj.get("identifier").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `identifier` to be a primitive type in the JSON" + + " string but got `%s`", + jsonObj.get("identifier").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!CustomActionMetadataTypeInput.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'CustomActionMetadataTypeInput' and its + // subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter = + gson.getDelegateAdapter( + this, TypeToken.get(CustomActionMetadataTypeInput.class)); + + return (TypeAdapter) + new TypeAdapter() { + @Override + public void write(JsonWriter out, CustomActionMetadataTypeInput value) + throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + obj.remove("additionalProperties"); + // serialize additional properties + if (value.getAdditionalProperties() != null) { + for (Map.Entry entry : + value.getAdditionalProperties().entrySet()) { + if (entry.getValue() instanceof String) + obj.addProperty(entry.getKey(), (String) entry.getValue()); + else if (entry.getValue() instanceof Number) + obj.addProperty(entry.getKey(), (Number) entry.getValue()); + else if (entry.getValue() instanceof Boolean) + obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); + else if (entry.getValue() instanceof Character) + obj.addProperty( + entry.getKey(), (Character) entry.getValue()); + else { + JsonElement jsonElement = gson.toJsonTree(entry.getValue()); + if (jsonElement.isJsonArray()) { + obj.add(entry.getKey(), jsonElement.getAsJsonArray()); + } else { + obj.add(entry.getKey(), jsonElement.getAsJsonObject()); + } + } + } + } + elementAdapter.write(out, obj); + } + + @Override + public CustomActionMetadataTypeInput read(JsonReader in) + throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // store additional fields in the deserialized instance + CustomActionMetadataTypeInput instance = + thisAdapter.fromJsonTree(jsonObj); + for (Map.Entry entry : jsonObj.entrySet()) { + if (!openapiFields.contains(entry.getKey())) { + if (entry.getValue().isJsonPrimitive()) { // primitive type + if (entry.getValue().getAsJsonPrimitive().isString()) + instance.putAdditionalProperty( + entry.getKey(), entry.getValue().getAsString()); + else if (entry.getValue().getAsJsonPrimitive().isNumber()) + instance.putAdditionalProperty( + entry.getKey(), entry.getValue().getAsNumber()); + else if (entry.getValue().getAsJsonPrimitive().isBoolean()) + instance.putAdditionalProperty( + entry.getKey(), + entry.getValue().getAsBoolean()); + else + throw new IllegalArgumentException( + String.format( + "The field `%s` has unknown primitive" + + " type. Value: %s", + entry.getKey(), + entry.getValue().toString())); + } else if (entry.getValue().isJsonArray()) { + instance.putAdditionalProperty( + entry.getKey(), + gson.fromJson(entry.getValue(), List.class)); + } else { // JSON object + instance.putAdditionalProperty( + entry.getKey(), + gson.fromJson(entry.getValue(), HashMap.class)); + } + } + } + return instance; + } + }.nullSafe(); + } + } + + /** + * Create an instance of CustomActionMetadataTypeInput given an JSON string + * + * @param jsonString JSON string + * @return An instance of CustomActionMetadataTypeInput + * @throws IOException if the JSON string is invalid with respect to + * CustomActionMetadataTypeInput + */ + public static CustomActionMetadataTypeInput fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, CustomActionMetadataTypeInput.class); + } + + /** + * Convert an instance of CustomActionMetadataTypeInput to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} diff --git a/sdks/java/src/main/java/com/thoughtspot/client/model/DataSource.java b/sdks/java/src/main/java/com/thoughtspot/client/model/DataSource.java new file mode 100644 index 000000000..924e8f381 --- /dev/null +++ b/sdks/java/src/main/java/com/thoughtspot/client/model/DataSource.java @@ -0,0 +1,368 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client.model; + +import com.google.gson.Gson; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.TypeAdapter; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.annotations.SerializedName; +import com.google.gson.reflect.TypeToken; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import com.thoughtspot.client.JSON; +import java.io.IOException; +import java.io.Serializable; +import java.util.Arrays; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Objects; +import org.openapitools.jackson.nullable.JsonNullable; + +/** DataSource */ +@javax.annotation.Generated( + value = "org.openapitools.codegen.languages.JavaClientCodegen", + comments = "Generator version: 7.12.0") +public class DataSource implements Serializable { + private static final long serialVersionUID = 1L; + + public static final String SERIALIZED_NAME_CONFIDENCE = "confidence"; + + @SerializedName(SERIALIZED_NAME_CONFIDENCE) + @javax.annotation.Nullable + private Float confidence; + + public static final String SERIALIZED_NAME_DETAILS = "details"; + + @SerializedName(SERIALIZED_NAME_DETAILS) + @javax.annotation.Nullable + private EntityHeader details; + + public static final String SERIALIZED_NAME_REASONING = "reasoning"; + + @SerializedName(SERIALIZED_NAME_REASONING) + @javax.annotation.Nullable + private String reasoning; + + public DataSource() {} + + public DataSource confidence(@javax.annotation.Nullable Float confidence) { + this.confidence = confidence; + return this; + } + + /** + * Confidence score for the data source suggestion. + * + * @return confidence + */ + @javax.annotation.Nullable + public Float getConfidence() { + return confidence; + } + + public void setConfidence(@javax.annotation.Nullable Float confidence) { + this.confidence = confidence; + } + + public DataSource details(@javax.annotation.Nullable EntityHeader details) { + this.details = details; + return this; + } + + /** + * Get details + * + * @return details + */ + @javax.annotation.Nullable + public EntityHeader getDetails() { + return details; + } + + public void setDetails(@javax.annotation.Nullable EntityHeader details) { + this.details = details; + } + + public DataSource reasoning(@javax.annotation.Nullable String reasoning) { + this.reasoning = reasoning; + return this; + } + + /** + * LLM reasoning for the data source. + * + * @return reasoning + */ + @javax.annotation.Nullable + public String getReasoning() { + return reasoning; + } + + public void setReasoning(@javax.annotation.Nullable String reasoning) { + this.reasoning = reasoning; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key name of the property + * @param value value of the property + * @return the DataSource instance itself + */ + public DataSource putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return a map of objects + */ + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key name of the property + * @return an object + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + DataSource dataSource = (DataSource) o; + return Objects.equals(this.confidence, dataSource.confidence) + && Objects.equals(this.details, dataSource.details) + && Objects.equals(this.reasoning, dataSource.reasoning) + && Objects.equals(this.additionalProperties, dataSource.additionalProperties); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b + || (a != null + && b != null + && a.isPresent() + && b.isPresent() + && Objects.deepEquals(a.get(), b.get())); + } + + @Override + public int hashCode() { + return Objects.hash(confidence, details, reasoning, additionalProperties); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; + } + return a.isPresent() ? Arrays.deepHashCode(new Object[] {a.get()}) : 31; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class DataSource {\n"); + sb.append(" confidence: ").append(toIndentedString(confidence)).append("\n"); + sb.append(" details: ").append(toIndentedString(details)).append("\n"); + sb.append(" reasoning: ").append(toIndentedString(reasoning)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first + * line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("confidence"); + openapiFields.add("details"); + openapiFields.add("reasoning"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to DataSource + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!DataSource.openapiRequiredFields + .isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException( + String.format( + "The required field(s) %s in DataSource is not found in the empty" + + " JSON string", + DataSource.openapiRequiredFields.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // validate the optional field `details` + if (jsonObj.get("details") != null && !jsonObj.get("details").isJsonNull()) { + EntityHeader.validateJsonElement(jsonObj.get("details")); + } + if ((jsonObj.get("reasoning") != null && !jsonObj.get("reasoning").isJsonNull()) + && !jsonObj.get("reasoning").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `reasoning` to be a primitive type in the JSON" + + " string but got `%s`", + jsonObj.get("reasoning").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!DataSource.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'DataSource' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter = + gson.getDelegateAdapter(this, TypeToken.get(DataSource.class)); + + return (TypeAdapter) + new TypeAdapter() { + @Override + public void write(JsonWriter out, DataSource value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + obj.remove("additionalProperties"); + // serialize additional properties + if (value.getAdditionalProperties() != null) { + for (Map.Entry entry : + value.getAdditionalProperties().entrySet()) { + if (entry.getValue() instanceof String) + obj.addProperty(entry.getKey(), (String) entry.getValue()); + else if (entry.getValue() instanceof Number) + obj.addProperty(entry.getKey(), (Number) entry.getValue()); + else if (entry.getValue() instanceof Boolean) + obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); + else if (entry.getValue() instanceof Character) + obj.addProperty( + entry.getKey(), (Character) entry.getValue()); + else { + JsonElement jsonElement = gson.toJsonTree(entry.getValue()); + if (jsonElement.isJsonArray()) { + obj.add(entry.getKey(), jsonElement.getAsJsonArray()); + } else { + obj.add(entry.getKey(), jsonElement.getAsJsonObject()); + } + } + } + } + elementAdapter.write(out, obj); + } + + @Override + public DataSource read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // store additional fields in the deserialized instance + DataSource instance = thisAdapter.fromJsonTree(jsonObj); + for (Map.Entry entry : jsonObj.entrySet()) { + if (!openapiFields.contains(entry.getKey())) { + if (entry.getValue().isJsonPrimitive()) { // primitive type + if (entry.getValue().getAsJsonPrimitive().isString()) + instance.putAdditionalProperty( + entry.getKey(), entry.getValue().getAsString()); + else if (entry.getValue().getAsJsonPrimitive().isNumber()) + instance.putAdditionalProperty( + entry.getKey(), entry.getValue().getAsNumber()); + else if (entry.getValue().getAsJsonPrimitive().isBoolean()) + instance.putAdditionalProperty( + entry.getKey(), + entry.getValue().getAsBoolean()); + else + throw new IllegalArgumentException( + String.format( + "The field `%s` has unknown primitive" + + " type. Value: %s", + entry.getKey(), + entry.getValue().toString())); + } else if (entry.getValue().isJsonArray()) { + instance.putAdditionalProperty( + entry.getKey(), + gson.fromJson(entry.getValue(), List.class)); + } else { // JSON object + instance.putAdditionalProperty( + entry.getKey(), + gson.fromJson(entry.getValue(), HashMap.class)); + } + } + } + return instance; + } + }.nullSafe(); + } + } + + /** + * Create an instance of DataSource given an JSON string + * + * @param jsonString JSON string + * @return An instance of DataSource + * @throws IOException if the JSON string is invalid with respect to DataSource + */ + public static DataSource fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, DataSource.class); + } + + /** + * Convert an instance of DataSource to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} diff --git a/sdks/java/src/main/java/com/thoughtspot/client/model/DataSourceContextInput.java b/sdks/java/src/main/java/com/thoughtspot/client/model/DataSourceContextInput.java new file mode 100644 index 000000000..0273432cc --- /dev/null +++ b/sdks/java/src/main/java/com/thoughtspot/client/model/DataSourceContextInput.java @@ -0,0 +1,412 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client.model; + +import com.google.gson.Gson; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.TypeAdapter; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.annotations.SerializedName; +import com.google.gson.reflect.TypeToken; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import com.thoughtspot.client.JSON; +import java.io.IOException; +import java.io.Serializable; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Objects; +import org.openapitools.jackson.nullable.JsonNullable; + +/** DataSourceContextInput */ +@javax.annotation.Generated( + value = "org.openapitools.codegen.languages.JavaClientCodegen", + comments = "Generator version: 7.12.0") +public class DataSourceContextInput implements Serializable { + private static final long serialVersionUID = 1L; + + public static final String SERIALIZED_NAME_DATA_SOURCE_IDENTIFIER = "data_source_identifier"; + + @SerializedName(SERIALIZED_NAME_DATA_SOURCE_IDENTIFIER) + @javax.annotation.Nullable + private String dataSourceIdentifier; + + public static final String SERIALIZED_NAME_DATA_SOURCE_IDENTIFIERS = "data_source_identifiers"; + + @SerializedName(SERIALIZED_NAME_DATA_SOURCE_IDENTIFIERS) + @javax.annotation.Nullable + private List dataSourceIdentifiers; + + public static final String SERIALIZED_NAME_GUID = "guid"; + + @SerializedName(SERIALIZED_NAME_GUID) + @javax.annotation.Nullable + private String guid; + + public DataSourceContextInput() {} + + public DataSourceContextInput dataSourceIdentifier( + @javax.annotation.Nullable String dataSourceIdentifier) { + this.dataSourceIdentifier = dataSourceIdentifier; + return this; + } + + /** + * Unique identifier of the data source. Required when context type is DATA_SOURCE and + * `data_source_identifiers` is not provided. At least one of + * `data_source_identifier` or `data_source_identifiers` must be supplied + * for DATA_SOURCE context; omit only when context type is AUTO_MODE. Version: 26.5.0.cl or + * later + * + * @return dataSourceIdentifier + */ + @javax.annotation.Nullable + public String getDataSourceIdentifier() { + return dataSourceIdentifier; + } + + public void setDataSourceIdentifier(@javax.annotation.Nullable String dataSourceIdentifier) { + this.dataSourceIdentifier = dataSourceIdentifier; + } + + public DataSourceContextInput dataSourceIdentifiers( + @javax.annotation.Nullable List dataSourceIdentifiers) { + this.dataSourceIdentifiers = dataSourceIdentifiers; + return this; + } + + public DataSourceContextInput addDataSourceIdentifiersItem(String dataSourceIdentifiersItem) { + if (this.dataSourceIdentifiers == null) { + this.dataSourceIdentifiers = new ArrayList<>(); + } + this.dataSourceIdentifiers.add(dataSourceIdentifiersItem); + return this; + } + + /** + * Unique identifiers of data sources for multi-data-source context. Required when context type + * is DATA_SOURCE and `data_source_identifier` is not provided. Version: 26.5.0.cl or + * later + * + * @return dataSourceIdentifiers + */ + @javax.annotation.Nullable + public List getDataSourceIdentifiers() { + return dataSourceIdentifiers; + } + + public void setDataSourceIdentifiers( + @javax.annotation.Nullable List dataSourceIdentifiers) { + this.dataSourceIdentifiers = dataSourceIdentifiers; + } + + public DataSourceContextInput guid(@javax.annotation.Nullable String guid) { + this.guid = guid; + return this; + } + + /** + * Deprecated. Use `data_source_identifier` instead. Previously required when neither + * `data_source_identifier` nor `data_source_identifiers` was provided for + * DATA_SOURCE context. Version: 26.2.0.cl or later + * + * @return guid + */ + @javax.annotation.Nullable + public String getGuid() { + return guid; + } + + public void setGuid(@javax.annotation.Nullable String guid) { + this.guid = guid; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key name of the property + * @param value value of the property + * @return the DataSourceContextInput instance itself + */ + public DataSourceContextInput putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return a map of objects + */ + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key name of the property + * @return an object + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + DataSourceContextInput dataSourceContextInput = (DataSourceContextInput) o; + return Objects.equals( + this.dataSourceIdentifier, dataSourceContextInput.dataSourceIdentifier) + && Objects.equals( + this.dataSourceIdentifiers, dataSourceContextInput.dataSourceIdentifiers) + && Objects.equals(this.guid, dataSourceContextInput.guid) + && Objects.equals( + this.additionalProperties, dataSourceContextInput.additionalProperties); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b + || (a != null + && b != null + && a.isPresent() + && b.isPresent() + && Objects.deepEquals(a.get(), b.get())); + } + + @Override + public int hashCode() { + return Objects.hash( + dataSourceIdentifier, dataSourceIdentifiers, guid, additionalProperties); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; + } + return a.isPresent() ? Arrays.deepHashCode(new Object[] {a.get()}) : 31; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class DataSourceContextInput {\n"); + sb.append(" dataSourceIdentifier: ") + .append(toIndentedString(dataSourceIdentifier)) + .append("\n"); + sb.append(" dataSourceIdentifiers: ") + .append(toIndentedString(dataSourceIdentifiers)) + .append("\n"); + sb.append(" guid: ").append(toIndentedString(guid)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first + * line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("data_source_identifier"); + openapiFields.add("data_source_identifiers"); + openapiFields.add("guid"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to DataSourceContextInput + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!DataSourceContextInput.openapiRequiredFields + .isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException( + String.format( + "The required field(s) %s in DataSourceContextInput is not found" + + " in the empty JSON string", + DataSourceContextInput.openapiRequiredFields.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if ((jsonObj.get("data_source_identifier") != null + && !jsonObj.get("data_source_identifier").isJsonNull()) + && !jsonObj.get("data_source_identifier").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `data_source_identifier` to be a primitive type in" + + " the JSON string but got `%s`", + jsonObj.get("data_source_identifier").toString())); + } + // ensure the optional json data is an array if present + if (jsonObj.get("data_source_identifiers") != null + && !jsonObj.get("data_source_identifiers").isJsonNull() + && !jsonObj.get("data_source_identifiers").isJsonArray()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `data_source_identifiers` to be an array in the" + + " JSON string but got `%s`", + jsonObj.get("data_source_identifiers").toString())); + } + if ((jsonObj.get("guid") != null && !jsonObj.get("guid").isJsonNull()) + && !jsonObj.get("guid").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `guid` to be a primitive type in the JSON string" + + " but got `%s`", + jsonObj.get("guid").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!DataSourceContextInput.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'DataSourceContextInput' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter = + gson.getDelegateAdapter(this, TypeToken.get(DataSourceContextInput.class)); + + return (TypeAdapter) + new TypeAdapter() { + @Override + public void write(JsonWriter out, DataSourceContextInput value) + throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + obj.remove("additionalProperties"); + // serialize additional properties + if (value.getAdditionalProperties() != null) { + for (Map.Entry entry : + value.getAdditionalProperties().entrySet()) { + if (entry.getValue() instanceof String) + obj.addProperty(entry.getKey(), (String) entry.getValue()); + else if (entry.getValue() instanceof Number) + obj.addProperty(entry.getKey(), (Number) entry.getValue()); + else if (entry.getValue() instanceof Boolean) + obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); + else if (entry.getValue() instanceof Character) + obj.addProperty( + entry.getKey(), (Character) entry.getValue()); + else { + JsonElement jsonElement = gson.toJsonTree(entry.getValue()); + if (jsonElement.isJsonArray()) { + obj.add(entry.getKey(), jsonElement.getAsJsonArray()); + } else { + obj.add(entry.getKey(), jsonElement.getAsJsonObject()); + } + } + } + } + elementAdapter.write(out, obj); + } + + @Override + public DataSourceContextInput read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // store additional fields in the deserialized instance + DataSourceContextInput instance = thisAdapter.fromJsonTree(jsonObj); + for (Map.Entry entry : jsonObj.entrySet()) { + if (!openapiFields.contains(entry.getKey())) { + if (entry.getValue().isJsonPrimitive()) { // primitive type + if (entry.getValue().getAsJsonPrimitive().isString()) + instance.putAdditionalProperty( + entry.getKey(), entry.getValue().getAsString()); + else if (entry.getValue().getAsJsonPrimitive().isNumber()) + instance.putAdditionalProperty( + entry.getKey(), entry.getValue().getAsNumber()); + else if (entry.getValue().getAsJsonPrimitive().isBoolean()) + instance.putAdditionalProperty( + entry.getKey(), + entry.getValue().getAsBoolean()); + else + throw new IllegalArgumentException( + String.format( + "The field `%s` has unknown primitive" + + " type. Value: %s", + entry.getKey(), + entry.getValue().toString())); + } else if (entry.getValue().isJsonArray()) { + instance.putAdditionalProperty( + entry.getKey(), + gson.fromJson(entry.getValue(), List.class)); + } else { // JSON object + instance.putAdditionalProperty( + entry.getKey(), + gson.fromJson(entry.getValue(), HashMap.class)); + } + } + } + return instance; + } + }.nullSafe(); + } + } + + /** + * Create an instance of DataSourceContextInput given an JSON string + * + * @param jsonString JSON string + * @return An instance of DataSourceContextInput + * @throws IOException if the JSON string is invalid with respect to DataSourceContextInput + */ + public static DataSourceContextInput fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, DataSourceContextInput.class); + } + + /** + * Convert an instance of DataSourceContextInput to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} diff --git a/sdks/java/src/main/java/com/thoughtspot/client/model/DataWarehouseObjectInput.java b/sdks/java/src/main/java/com/thoughtspot/client/model/DataWarehouseObjectInput.java new file mode 100644 index 000000000..6cfa1340b --- /dev/null +++ b/sdks/java/src/main/java/com/thoughtspot/client/model/DataWarehouseObjectInput.java @@ -0,0 +1,419 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client.model; + +import com.google.gson.Gson; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.TypeAdapter; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.annotations.SerializedName; +import com.google.gson.reflect.TypeToken; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import com.thoughtspot.client.JSON; +import java.io.IOException; +import java.io.Serializable; +import java.util.Arrays; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Objects; +import org.openapitools.jackson.nullable.JsonNullable; + +/** DataWarehouseObjectInput */ +@javax.annotation.Generated( + value = "org.openapitools.codegen.languages.JavaClientCodegen", + comments = "Generator version: 7.12.0") +public class DataWarehouseObjectInput implements Serializable { + private static final long serialVersionUID = 1L; + + public static final String SERIALIZED_NAME_DATABASE = "database"; + + @SerializedName(SERIALIZED_NAME_DATABASE) + @javax.annotation.Nullable + private String database; + + public static final String SERIALIZED_NAME_SCHEMA = "schema"; + + @SerializedName(SERIALIZED_NAME_SCHEMA) + @javax.annotation.Nullable + private String schema; + + public static final String SERIALIZED_NAME_TABLE = "table"; + + @SerializedName(SERIALIZED_NAME_TABLE) + @javax.annotation.Nullable + private String table; + + public static final String SERIALIZED_NAME_COLUMN = "column"; + + @SerializedName(SERIALIZED_NAME_COLUMN) + @javax.annotation.Nullable + private String column; + + public DataWarehouseObjectInput() {} + + public DataWarehouseObjectInput database(@javax.annotation.Nullable String database) { + this.database = database; + return this; + } + + /** + * Name of the database. + * + * @return database + */ + @javax.annotation.Nullable + public String getDatabase() { + return database; + } + + public void setDatabase(@javax.annotation.Nullable String database) { + this.database = database; + } + + public DataWarehouseObjectInput schema(@javax.annotation.Nullable String schema) { + this.schema = schema; + return this; + } + + /** + * Name of the schema within the database. + * + * @return schema + */ + @javax.annotation.Nullable + public String getSchema() { + return schema; + } + + public void setSchema(@javax.annotation.Nullable String schema) { + this.schema = schema; + } + + public DataWarehouseObjectInput table(@javax.annotation.Nullable String table) { + this.table = table; + return this; + } + + /** + * Name of the table within the schema. + * + * @return table + */ + @javax.annotation.Nullable + public String getTable() { + return table; + } + + public void setTable(@javax.annotation.Nullable String table) { + this.table = table; + } + + public DataWarehouseObjectInput column(@javax.annotation.Nullable String column) { + this.column = column; + return this; + } + + /** + * Name of the column within the table. + * + * @return column + */ + @javax.annotation.Nullable + public String getColumn() { + return column; + } + + public void setColumn(@javax.annotation.Nullable String column) { + this.column = column; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key name of the property + * @param value value of the property + * @return the DataWarehouseObjectInput instance itself + */ + public DataWarehouseObjectInput putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return a map of objects + */ + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key name of the property + * @return an object + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + DataWarehouseObjectInput dataWarehouseObjectInput = (DataWarehouseObjectInput) o; + return Objects.equals(this.database, dataWarehouseObjectInput.database) + && Objects.equals(this.schema, dataWarehouseObjectInput.schema) + && Objects.equals(this.table, dataWarehouseObjectInput.table) + && Objects.equals(this.column, dataWarehouseObjectInput.column) + && Objects.equals( + this.additionalProperties, dataWarehouseObjectInput.additionalProperties); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b + || (a != null + && b != null + && a.isPresent() + && b.isPresent() + && Objects.deepEquals(a.get(), b.get())); + } + + @Override + public int hashCode() { + return Objects.hash(database, schema, table, column, additionalProperties); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; + } + return a.isPresent() ? Arrays.deepHashCode(new Object[] {a.get()}) : 31; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class DataWarehouseObjectInput {\n"); + sb.append(" database: ").append(toIndentedString(database)).append("\n"); + sb.append(" schema: ").append(toIndentedString(schema)).append("\n"); + sb.append(" table: ").append(toIndentedString(table)).append("\n"); + sb.append(" column: ").append(toIndentedString(column)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first + * line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("database"); + openapiFields.add("schema"); + openapiFields.add("table"); + openapiFields.add("column"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to DataWarehouseObjectInput + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!DataWarehouseObjectInput.openapiRequiredFields + .isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException( + String.format( + "The required field(s) %s in DataWarehouseObjectInput is not found" + + " in the empty JSON string", + DataWarehouseObjectInput.openapiRequiredFields.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if ((jsonObj.get("database") != null && !jsonObj.get("database").isJsonNull()) + && !jsonObj.get("database").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `database` to be a primitive type in the JSON" + + " string but got `%s`", + jsonObj.get("database").toString())); + } + if ((jsonObj.get("schema") != null && !jsonObj.get("schema").isJsonNull()) + && !jsonObj.get("schema").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `schema` to be a primitive type in the JSON string" + + " but got `%s`", + jsonObj.get("schema").toString())); + } + if ((jsonObj.get("table") != null && !jsonObj.get("table").isJsonNull()) + && !jsonObj.get("table").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `table` to be a primitive type in the JSON string" + + " but got `%s`", + jsonObj.get("table").toString())); + } + if ((jsonObj.get("column") != null && !jsonObj.get("column").isJsonNull()) + && !jsonObj.get("column").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `column` to be a primitive type in the JSON string" + + " but got `%s`", + jsonObj.get("column").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!DataWarehouseObjectInput.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'DataWarehouseObjectInput' and its + // subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter = + gson.getDelegateAdapter(this, TypeToken.get(DataWarehouseObjectInput.class)); + + return (TypeAdapter) + new TypeAdapter() { + @Override + public void write(JsonWriter out, DataWarehouseObjectInput value) + throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + obj.remove("additionalProperties"); + // serialize additional properties + if (value.getAdditionalProperties() != null) { + for (Map.Entry entry : + value.getAdditionalProperties().entrySet()) { + if (entry.getValue() instanceof String) + obj.addProperty(entry.getKey(), (String) entry.getValue()); + else if (entry.getValue() instanceof Number) + obj.addProperty(entry.getKey(), (Number) entry.getValue()); + else if (entry.getValue() instanceof Boolean) + obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); + else if (entry.getValue() instanceof Character) + obj.addProperty( + entry.getKey(), (Character) entry.getValue()); + else { + JsonElement jsonElement = gson.toJsonTree(entry.getValue()); + if (jsonElement.isJsonArray()) { + obj.add(entry.getKey(), jsonElement.getAsJsonArray()); + } else { + obj.add(entry.getKey(), jsonElement.getAsJsonObject()); + } + } + } + } + elementAdapter.write(out, obj); + } + + @Override + public DataWarehouseObjectInput read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // store additional fields in the deserialized instance + DataWarehouseObjectInput instance = thisAdapter.fromJsonTree(jsonObj); + for (Map.Entry entry : jsonObj.entrySet()) { + if (!openapiFields.contains(entry.getKey())) { + if (entry.getValue().isJsonPrimitive()) { // primitive type + if (entry.getValue().getAsJsonPrimitive().isString()) + instance.putAdditionalProperty( + entry.getKey(), entry.getValue().getAsString()); + else if (entry.getValue().getAsJsonPrimitive().isNumber()) + instance.putAdditionalProperty( + entry.getKey(), entry.getValue().getAsNumber()); + else if (entry.getValue().getAsJsonPrimitive().isBoolean()) + instance.putAdditionalProperty( + entry.getKey(), + entry.getValue().getAsBoolean()); + else + throw new IllegalArgumentException( + String.format( + "The field `%s` has unknown primitive" + + " type. Value: %s", + entry.getKey(), + entry.getValue().toString())); + } else if (entry.getValue().isJsonArray()) { + instance.putAdditionalProperty( + entry.getKey(), + gson.fromJson(entry.getValue(), List.class)); + } else { // JSON object + instance.putAdditionalProperty( + entry.getKey(), + gson.fromJson(entry.getValue(), HashMap.class)); + } + } + } + return instance; + } + }.nullSafe(); + } + } + + /** + * Create an instance of DataWarehouseObjectInput given an JSON string + * + * @param jsonString JSON string + * @return An instance of DataWarehouseObjectInput + * @throws IOException if the JSON string is invalid with respect to DataWarehouseObjectInput + */ + public static DataWarehouseObjectInput fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, DataWarehouseObjectInput.class); + } + + /** + * Convert an instance of DataWarehouseObjectInput to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} diff --git a/sdks/java/src/main/java/com/thoughtspot/client/model/DataWarehouseObjects.java b/sdks/java/src/main/java/com/thoughtspot/client/model/DataWarehouseObjects.java new file mode 100644 index 000000000..d6562bd2b --- /dev/null +++ b/sdks/java/src/main/java/com/thoughtspot/client/model/DataWarehouseObjects.java @@ -0,0 +1,320 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client.model; + +import com.google.gson.Gson; +import com.google.gson.JsonArray; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.TypeAdapter; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.annotations.SerializedName; +import com.google.gson.reflect.TypeToken; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import com.thoughtspot.client.JSON; +import java.io.IOException; +import java.io.Serializable; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Objects; + +/** DataWarehouseObjects */ +@javax.annotation.Generated( + value = "org.openapitools.codegen.languages.JavaClientCodegen", + comments = "Generator version: 7.12.0") +public class DataWarehouseObjects implements Serializable { + private static final long serialVersionUID = 1L; + + public static final String SERIALIZED_NAME_DATABASES = "databases"; + + @SerializedName(SERIALIZED_NAME_DATABASES) + @javax.annotation.Nonnull + private List databases; + + public DataWarehouseObjects() {} + + public DataWarehouseObjects databases(@javax.annotation.Nonnull List databases) { + this.databases = databases; + return this; + } + + public DataWarehouseObjects addDatabasesItem(Database databasesItem) { + if (this.databases == null) { + this.databases = new ArrayList<>(); + } + this.databases.add(databasesItem); + return this; + } + + /** + * Databases of the connection. + * + * @return databases + */ + @javax.annotation.Nonnull + public List getDatabases() { + return databases; + } + + public void setDatabases(@javax.annotation.Nonnull List databases) { + this.databases = databases; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key name of the property + * @param value value of the property + * @return the DataWarehouseObjects instance itself + */ + public DataWarehouseObjects putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return a map of objects + */ + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key name of the property + * @return an object + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + DataWarehouseObjects dataWarehouseObjects = (DataWarehouseObjects) o; + return Objects.equals(this.databases, dataWarehouseObjects.databases) + && Objects.equals( + this.additionalProperties, dataWarehouseObjects.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(databases, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class DataWarehouseObjects {\n"); + sb.append(" databases: ").append(toIndentedString(databases)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first + * line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("databases"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + openapiRequiredFields.add("databases"); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to DataWarehouseObjects + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!DataWarehouseObjects.openapiRequiredFields + .isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException( + String.format( + "The required field(s) %s in DataWarehouseObjects is not found in" + + " the empty JSON string", + DataWarehouseObjects.openapiRequiredFields.toString())); + } + } + + // check to make sure all required properties/fields are present in the JSON string + for (String requiredField : DataWarehouseObjects.openapiRequiredFields) { + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException( + String.format( + "The required field `%s` is not found in the JSON string: %s", + requiredField, jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // ensure the json data is an array + if (!jsonObj.get("databases").isJsonArray()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `databases` to be an array in the JSON string but" + + " got `%s`", + jsonObj.get("databases").toString())); + } + + JsonArray jsonArraydatabases = jsonObj.getAsJsonArray("databases"); + // validate the required field `databases` (array) + for (int i = 0; i < jsonArraydatabases.size(); i++) { + Database.validateJsonElement(jsonArraydatabases.get(i)); + } + ; + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!DataWarehouseObjects.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'DataWarehouseObjects' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter = + gson.getDelegateAdapter(this, TypeToken.get(DataWarehouseObjects.class)); + + return (TypeAdapter) + new TypeAdapter() { + @Override + public void write(JsonWriter out, DataWarehouseObjects value) + throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + obj.remove("additionalProperties"); + // serialize additional properties + if (value.getAdditionalProperties() != null) { + for (Map.Entry entry : + value.getAdditionalProperties().entrySet()) { + if (entry.getValue() instanceof String) + obj.addProperty(entry.getKey(), (String) entry.getValue()); + else if (entry.getValue() instanceof Number) + obj.addProperty(entry.getKey(), (Number) entry.getValue()); + else if (entry.getValue() instanceof Boolean) + obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); + else if (entry.getValue() instanceof Character) + obj.addProperty( + entry.getKey(), (Character) entry.getValue()); + else { + JsonElement jsonElement = gson.toJsonTree(entry.getValue()); + if (jsonElement.isJsonArray()) { + obj.add(entry.getKey(), jsonElement.getAsJsonArray()); + } else { + obj.add(entry.getKey(), jsonElement.getAsJsonObject()); + } + } + } + } + elementAdapter.write(out, obj); + } + + @Override + public DataWarehouseObjects read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // store additional fields in the deserialized instance + DataWarehouseObjects instance = thisAdapter.fromJsonTree(jsonObj); + for (Map.Entry entry : jsonObj.entrySet()) { + if (!openapiFields.contains(entry.getKey())) { + if (entry.getValue().isJsonPrimitive()) { // primitive type + if (entry.getValue().getAsJsonPrimitive().isString()) + instance.putAdditionalProperty( + entry.getKey(), entry.getValue().getAsString()); + else if (entry.getValue().getAsJsonPrimitive().isNumber()) + instance.putAdditionalProperty( + entry.getKey(), entry.getValue().getAsNumber()); + else if (entry.getValue().getAsJsonPrimitive().isBoolean()) + instance.putAdditionalProperty( + entry.getKey(), + entry.getValue().getAsBoolean()); + else + throw new IllegalArgumentException( + String.format( + "The field `%s` has unknown primitive" + + " type. Value: %s", + entry.getKey(), + entry.getValue().toString())); + } else if (entry.getValue().isJsonArray()) { + instance.putAdditionalProperty( + entry.getKey(), + gson.fromJson(entry.getValue(), List.class)); + } else { // JSON object + instance.putAdditionalProperty( + entry.getKey(), + gson.fromJson(entry.getValue(), HashMap.class)); + } + } + } + return instance; + } + }.nullSafe(); + } + } + + /** + * Create an instance of DataWarehouseObjects given an JSON string + * + * @param jsonString JSON string + * @return An instance of DataWarehouseObjects + * @throws IOException if the JSON string is invalid with respect to DataWarehouseObjects + */ + public static DataWarehouseObjects fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, DataWarehouseObjects.class); + } + + /** + * Convert an instance of DataWarehouseObjects to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} diff --git a/sdks/java/src/main/java/com/thoughtspot/client/model/Database.java b/sdks/java/src/main/java/com/thoughtspot/client/model/Database.java new file mode 100644 index 000000000..cc53ef1d2 --- /dev/null +++ b/sdks/java/src/main/java/com/thoughtspot/client/model/Database.java @@ -0,0 +1,403 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client.model; + +import com.google.gson.Gson; +import com.google.gson.JsonArray; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.TypeAdapter; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.annotations.SerializedName; +import com.google.gson.reflect.TypeToken; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import com.thoughtspot.client.JSON; +import java.io.IOException; +import java.io.Serializable; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Objects; +import org.openapitools.jackson.nullable.JsonNullable; + +/** Database */ +@javax.annotation.Generated( + value = "org.openapitools.codegen.languages.JavaClientCodegen", + comments = "Generator version: 7.12.0") +public class Database implements Serializable { + private static final long serialVersionUID = 1L; + + public static final String SERIALIZED_NAME_NAME = "name"; + + @SerializedName(SERIALIZED_NAME_NAME) + @javax.annotation.Nonnull + private String name; + + public static final String SERIALIZED_NAME_SCHEMAS = "schemas"; + + @SerializedName(SERIALIZED_NAME_SCHEMAS) + @javax.annotation.Nullable + private List schemas; + + public static final String SERIALIZED_NAME_AUTO_CREATED = "auto_created"; + + @SerializedName(SERIALIZED_NAME_AUTO_CREATED) + @javax.annotation.Nullable + private Boolean autoCreated; + + public Database() {} + + public Database name(@javax.annotation.Nonnull String name) { + this.name = name; + return this; + } + + /** + * Name of the database. + * + * @return name + */ + @javax.annotation.Nonnull + public String getName() { + return name; + } + + public void setName(@javax.annotation.Nonnull String name) { + this.name = name; + } + + public Database schemas(@javax.annotation.Nullable List schemas) { + this.schemas = schemas; + return this; + } + + public Database addSchemasItem(SchemaObject schemasItem) { + if (this.schemas == null) { + this.schemas = new ArrayList<>(); + } + this.schemas.add(schemasItem); + return this; + } + + /** + * Schemas of the database. + * + * @return schemas + */ + @javax.annotation.Nullable + public List getSchemas() { + return schemas; + } + + public void setSchemas(@javax.annotation.Nullable List schemas) { + this.schemas = schemas; + } + + public Database autoCreated(@javax.annotation.Nullable Boolean autoCreated) { + this.autoCreated = autoCreated; + return this; + } + + /** + * Determines if the object is auto created. + * + * @return autoCreated + */ + @javax.annotation.Nullable + public Boolean getAutoCreated() { + return autoCreated; + } + + public void setAutoCreated(@javax.annotation.Nullable Boolean autoCreated) { + this.autoCreated = autoCreated; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key name of the property + * @param value value of the property + * @return the Database instance itself + */ + public Database putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return a map of objects + */ + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key name of the property + * @return an object + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + Database database = (Database) o; + return Objects.equals(this.name, database.name) + && Objects.equals(this.schemas, database.schemas) + && Objects.equals(this.autoCreated, database.autoCreated) + && Objects.equals(this.additionalProperties, database.additionalProperties); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b + || (a != null + && b != null + && a.isPresent() + && b.isPresent() + && Objects.deepEquals(a.get(), b.get())); + } + + @Override + public int hashCode() { + return Objects.hash(name, schemas, autoCreated, additionalProperties); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; + } + return a.isPresent() ? Arrays.deepHashCode(new Object[] {a.get()}) : 31; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class Database {\n"); + sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append(" schemas: ").append(toIndentedString(schemas)).append("\n"); + sb.append(" autoCreated: ").append(toIndentedString(autoCreated)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first + * line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("name"); + openapiFields.add("schemas"); + openapiFields.add("auto_created"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + openapiRequiredFields.add("name"); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to Database + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!Database.openapiRequiredFields + .isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException( + String.format( + "The required field(s) %s in Database is not found in the empty" + + " JSON string", + Database.openapiRequiredFields.toString())); + } + } + + // check to make sure all required properties/fields are present in the JSON string + for (String requiredField : Database.openapiRequiredFields) { + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException( + String.format( + "The required field `%s` is not found in the JSON string: %s", + requiredField, jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if (!jsonObj.get("name").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `name` to be a primitive type in the JSON string" + + " but got `%s`", + jsonObj.get("name").toString())); + } + if (jsonObj.get("schemas") != null && !jsonObj.get("schemas").isJsonNull()) { + JsonArray jsonArrayschemas = jsonObj.getAsJsonArray("schemas"); + if (jsonArrayschemas != null) { + // ensure the json data is an array + if (!jsonObj.get("schemas").isJsonArray()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `schemas` to be an array in the JSON" + + " string but got `%s`", + jsonObj.get("schemas").toString())); + } + + // validate the optional field `schemas` (array) + for (int i = 0; i < jsonArrayschemas.size(); i++) { + SchemaObject.validateJsonElement(jsonArrayschemas.get(i)); + } + ; + } + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!Database.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'Database' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter = + gson.getDelegateAdapter(this, TypeToken.get(Database.class)); + + return (TypeAdapter) + new TypeAdapter() { + @Override + public void write(JsonWriter out, Database value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + obj.remove("additionalProperties"); + // serialize additional properties + if (value.getAdditionalProperties() != null) { + for (Map.Entry entry : + value.getAdditionalProperties().entrySet()) { + if (entry.getValue() instanceof String) + obj.addProperty(entry.getKey(), (String) entry.getValue()); + else if (entry.getValue() instanceof Number) + obj.addProperty(entry.getKey(), (Number) entry.getValue()); + else if (entry.getValue() instanceof Boolean) + obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); + else if (entry.getValue() instanceof Character) + obj.addProperty( + entry.getKey(), (Character) entry.getValue()); + else { + JsonElement jsonElement = gson.toJsonTree(entry.getValue()); + if (jsonElement.isJsonArray()) { + obj.add(entry.getKey(), jsonElement.getAsJsonArray()); + } else { + obj.add(entry.getKey(), jsonElement.getAsJsonObject()); + } + } + } + } + elementAdapter.write(out, obj); + } + + @Override + public Database read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // store additional fields in the deserialized instance + Database instance = thisAdapter.fromJsonTree(jsonObj); + for (Map.Entry entry : jsonObj.entrySet()) { + if (!openapiFields.contains(entry.getKey())) { + if (entry.getValue().isJsonPrimitive()) { // primitive type + if (entry.getValue().getAsJsonPrimitive().isString()) + instance.putAdditionalProperty( + entry.getKey(), entry.getValue().getAsString()); + else if (entry.getValue().getAsJsonPrimitive().isNumber()) + instance.putAdditionalProperty( + entry.getKey(), entry.getValue().getAsNumber()); + else if (entry.getValue().getAsJsonPrimitive().isBoolean()) + instance.putAdditionalProperty( + entry.getKey(), + entry.getValue().getAsBoolean()); + else + throw new IllegalArgumentException( + String.format( + "The field `%s` has unknown primitive" + + " type. Value: %s", + entry.getKey(), + entry.getValue().toString())); + } else if (entry.getValue().isJsonArray()) { + instance.putAdditionalProperty( + entry.getKey(), + gson.fromJson(entry.getValue(), List.class)); + } else { // JSON object + instance.putAdditionalProperty( + entry.getKey(), + gson.fromJson(entry.getValue(), HashMap.class)); + } + } + } + return instance; + } + }.nullSafe(); + } + } + + /** + * Create an instance of Database given an JSON string + * + * @param jsonString JSON string + * @return An instance of Database + * @throws IOException if the JSON string is invalid with respect to Database + */ + public static Database fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, Database.class); + } + + /** + * Convert an instance of Database to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} diff --git a/sdks/java/src/main/java/com/thoughtspot/client/model/DbtSearchResponse.java b/sdks/java/src/main/java/com/thoughtspot/client/model/DbtSearchResponse.java new file mode 100644 index 000000000..9c15ecff8 --- /dev/null +++ b/sdks/java/src/main/java/com/thoughtspot/client/model/DbtSearchResponse.java @@ -0,0 +1,541 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client.model; + +import com.google.gson.Gson; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.TypeAdapter; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.annotations.SerializedName; +import com.google.gson.reflect.TypeToken; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import com.thoughtspot.client.JSON; +import java.io.IOException; +import java.io.Serializable; +import java.util.Arrays; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Objects; +import org.openapitools.jackson.nullable.JsonNullable; + +/** DbtSearchResponse */ +@javax.annotation.Generated( + value = "org.openapitools.codegen.languages.JavaClientCodegen", + comments = "Generator version: 7.12.0") +public class DbtSearchResponse implements Serializable { + private static final long serialVersionUID = 1L; + + public static final String SERIALIZED_NAME_DBT_CONNECTION_IDENTIFIER = + "dbt_connection_identifier"; + + @SerializedName(SERIALIZED_NAME_DBT_CONNECTION_IDENTIFIER) + @javax.annotation.Nullable + private String dbtConnectionIdentifier; + + public static final String SERIALIZED_NAME_PROJECT_NAME = "project_name"; + + @SerializedName(SERIALIZED_NAME_PROJECT_NAME) + @javax.annotation.Nullable + private String projectName; + + public static final String SERIALIZED_NAME_CONNECTION_ID = "connection_id"; + + @SerializedName(SERIALIZED_NAME_CONNECTION_ID) + @javax.annotation.Nullable + private String connectionId; + + public static final String SERIALIZED_NAME_CONNECTION_NAME = "connection_name"; + + @SerializedName(SERIALIZED_NAME_CONNECTION_NAME) + @javax.annotation.Nullable + private String connectionName; + + public static final String SERIALIZED_NAME_CDW_DATABASE = "cdw_database"; + + @SerializedName(SERIALIZED_NAME_CDW_DATABASE) + @javax.annotation.Nullable + private String cdwDatabase; + + public static final String SERIALIZED_NAME_IMPORT_TYPE = "import_type"; + + @SerializedName(SERIALIZED_NAME_IMPORT_TYPE) + @javax.annotation.Nullable + private String importType; + + public static final String SERIALIZED_NAME_AUTHOR_NAME = "author_name"; + + @SerializedName(SERIALIZED_NAME_AUTHOR_NAME) + @javax.annotation.Nullable + private String authorName; + + public DbtSearchResponse() {} + + public DbtSearchResponse dbtConnectionIdentifier( + @javax.annotation.Nullable String dbtConnectionIdentifier) { + this.dbtConnectionIdentifier = dbtConnectionIdentifier; + return this; + } + + /** + * Get dbtConnectionIdentifier + * + * @return dbtConnectionIdentifier + */ + @javax.annotation.Nullable + public String getDbtConnectionIdentifier() { + return dbtConnectionIdentifier; + } + + public void setDbtConnectionIdentifier( + @javax.annotation.Nullable String dbtConnectionIdentifier) { + this.dbtConnectionIdentifier = dbtConnectionIdentifier; + } + + public DbtSearchResponse projectName(@javax.annotation.Nullable String projectName) { + this.projectName = projectName; + return this; + } + + /** + * Get projectName + * + * @return projectName + */ + @javax.annotation.Nullable + public String getProjectName() { + return projectName; + } + + public void setProjectName(@javax.annotation.Nullable String projectName) { + this.projectName = projectName; + } + + public DbtSearchResponse connectionId(@javax.annotation.Nullable String connectionId) { + this.connectionId = connectionId; + return this; + } + + /** + * Get connectionId + * + * @return connectionId + */ + @javax.annotation.Nullable + public String getConnectionId() { + return connectionId; + } + + public void setConnectionId(@javax.annotation.Nullable String connectionId) { + this.connectionId = connectionId; + } + + public DbtSearchResponse connectionName(@javax.annotation.Nullable String connectionName) { + this.connectionName = connectionName; + return this; + } + + /** + * Get connectionName + * + * @return connectionName + */ + @javax.annotation.Nullable + public String getConnectionName() { + return connectionName; + } + + public void setConnectionName(@javax.annotation.Nullable String connectionName) { + this.connectionName = connectionName; + } + + public DbtSearchResponse cdwDatabase(@javax.annotation.Nullable String cdwDatabase) { + this.cdwDatabase = cdwDatabase; + return this; + } + + /** + * Get cdwDatabase + * + * @return cdwDatabase + */ + @javax.annotation.Nullable + public String getCdwDatabase() { + return cdwDatabase; + } + + public void setCdwDatabase(@javax.annotation.Nullable String cdwDatabase) { + this.cdwDatabase = cdwDatabase; + } + + public DbtSearchResponse importType(@javax.annotation.Nullable String importType) { + this.importType = importType; + return this; + } + + /** + * Get importType + * + * @return importType + */ + @javax.annotation.Nullable + public String getImportType() { + return importType; + } + + public void setImportType(@javax.annotation.Nullable String importType) { + this.importType = importType; + } + + public DbtSearchResponse authorName(@javax.annotation.Nullable String authorName) { + this.authorName = authorName; + return this; + } + + /** + * Get authorName + * + * @return authorName + */ + @javax.annotation.Nullable + public String getAuthorName() { + return authorName; + } + + public void setAuthorName(@javax.annotation.Nullable String authorName) { + this.authorName = authorName; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key name of the property + * @param value value of the property + * @return the DbtSearchResponse instance itself + */ + public DbtSearchResponse putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return a map of objects + */ + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key name of the property + * @return an object + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + DbtSearchResponse dbtSearchResponse = (DbtSearchResponse) o; + return Objects.equals( + this.dbtConnectionIdentifier, dbtSearchResponse.dbtConnectionIdentifier) + && Objects.equals(this.projectName, dbtSearchResponse.projectName) + && Objects.equals(this.connectionId, dbtSearchResponse.connectionId) + && Objects.equals(this.connectionName, dbtSearchResponse.connectionName) + && Objects.equals(this.cdwDatabase, dbtSearchResponse.cdwDatabase) + && Objects.equals(this.importType, dbtSearchResponse.importType) + && Objects.equals(this.authorName, dbtSearchResponse.authorName) + && Objects.equals( + this.additionalProperties, dbtSearchResponse.additionalProperties); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b + || (a != null + && b != null + && a.isPresent() + && b.isPresent() + && Objects.deepEquals(a.get(), b.get())); + } + + @Override + public int hashCode() { + return Objects.hash( + dbtConnectionIdentifier, + projectName, + connectionId, + connectionName, + cdwDatabase, + importType, + authorName, + additionalProperties); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; + } + return a.isPresent() ? Arrays.deepHashCode(new Object[] {a.get()}) : 31; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class DbtSearchResponse {\n"); + sb.append(" dbtConnectionIdentifier: ") + .append(toIndentedString(dbtConnectionIdentifier)) + .append("\n"); + sb.append(" projectName: ").append(toIndentedString(projectName)).append("\n"); + sb.append(" connectionId: ").append(toIndentedString(connectionId)).append("\n"); + sb.append(" connectionName: ").append(toIndentedString(connectionName)).append("\n"); + sb.append(" cdwDatabase: ").append(toIndentedString(cdwDatabase)).append("\n"); + sb.append(" importType: ").append(toIndentedString(importType)).append("\n"); + sb.append(" authorName: ").append(toIndentedString(authorName)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first + * line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("dbt_connection_identifier"); + openapiFields.add("project_name"); + openapiFields.add("connection_id"); + openapiFields.add("connection_name"); + openapiFields.add("cdw_database"); + openapiFields.add("import_type"); + openapiFields.add("author_name"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to DbtSearchResponse + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!DbtSearchResponse.openapiRequiredFields + .isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException( + String.format( + "The required field(s) %s in DbtSearchResponse is not found in the" + + " empty JSON string", + DbtSearchResponse.openapiRequiredFields.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if ((jsonObj.get("dbt_connection_identifier") != null + && !jsonObj.get("dbt_connection_identifier").isJsonNull()) + && !jsonObj.get("dbt_connection_identifier").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `dbt_connection_identifier` to be a primitive type" + + " in the JSON string but got `%s`", + jsonObj.get("dbt_connection_identifier").toString())); + } + if ((jsonObj.get("project_name") != null && !jsonObj.get("project_name").isJsonNull()) + && !jsonObj.get("project_name").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `project_name` to be a primitive type in the JSON" + + " string but got `%s`", + jsonObj.get("project_name").toString())); + } + if ((jsonObj.get("connection_id") != null && !jsonObj.get("connection_id").isJsonNull()) + && !jsonObj.get("connection_id").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `connection_id` to be a primitive type in the JSON" + + " string but got `%s`", + jsonObj.get("connection_id").toString())); + } + if ((jsonObj.get("connection_name") != null && !jsonObj.get("connection_name").isJsonNull()) + && !jsonObj.get("connection_name").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `connection_name` to be a primitive type in the" + + " JSON string but got `%s`", + jsonObj.get("connection_name").toString())); + } + if ((jsonObj.get("cdw_database") != null && !jsonObj.get("cdw_database").isJsonNull()) + && !jsonObj.get("cdw_database").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `cdw_database` to be a primitive type in the JSON" + + " string but got `%s`", + jsonObj.get("cdw_database").toString())); + } + if ((jsonObj.get("import_type") != null && !jsonObj.get("import_type").isJsonNull()) + && !jsonObj.get("import_type").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `import_type` to be a primitive type in the JSON" + + " string but got `%s`", + jsonObj.get("import_type").toString())); + } + if ((jsonObj.get("author_name") != null && !jsonObj.get("author_name").isJsonNull()) + && !jsonObj.get("author_name").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `author_name` to be a primitive type in the JSON" + + " string but got `%s`", + jsonObj.get("author_name").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!DbtSearchResponse.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'DbtSearchResponse' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter = + gson.getDelegateAdapter(this, TypeToken.get(DbtSearchResponse.class)); + + return (TypeAdapter) + new TypeAdapter() { + @Override + public void write(JsonWriter out, DbtSearchResponse value) + throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + obj.remove("additionalProperties"); + // serialize additional properties + if (value.getAdditionalProperties() != null) { + for (Map.Entry entry : + value.getAdditionalProperties().entrySet()) { + if (entry.getValue() instanceof String) + obj.addProperty(entry.getKey(), (String) entry.getValue()); + else if (entry.getValue() instanceof Number) + obj.addProperty(entry.getKey(), (Number) entry.getValue()); + else if (entry.getValue() instanceof Boolean) + obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); + else if (entry.getValue() instanceof Character) + obj.addProperty( + entry.getKey(), (Character) entry.getValue()); + else { + JsonElement jsonElement = gson.toJsonTree(entry.getValue()); + if (jsonElement.isJsonArray()) { + obj.add(entry.getKey(), jsonElement.getAsJsonArray()); + } else { + obj.add(entry.getKey(), jsonElement.getAsJsonObject()); + } + } + } + } + elementAdapter.write(out, obj); + } + + @Override + public DbtSearchResponse read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // store additional fields in the deserialized instance + DbtSearchResponse instance = thisAdapter.fromJsonTree(jsonObj); + for (Map.Entry entry : jsonObj.entrySet()) { + if (!openapiFields.contains(entry.getKey())) { + if (entry.getValue().isJsonPrimitive()) { // primitive type + if (entry.getValue().getAsJsonPrimitive().isString()) + instance.putAdditionalProperty( + entry.getKey(), entry.getValue().getAsString()); + else if (entry.getValue().getAsJsonPrimitive().isNumber()) + instance.putAdditionalProperty( + entry.getKey(), entry.getValue().getAsNumber()); + else if (entry.getValue().getAsJsonPrimitive().isBoolean()) + instance.putAdditionalProperty( + entry.getKey(), + entry.getValue().getAsBoolean()); + else + throw new IllegalArgumentException( + String.format( + "The field `%s` has unknown primitive" + + " type. Value: %s", + entry.getKey(), + entry.getValue().toString())); + } else if (entry.getValue().isJsonArray()) { + instance.putAdditionalProperty( + entry.getKey(), + gson.fromJson(entry.getValue(), List.class)); + } else { // JSON object + instance.putAdditionalProperty( + entry.getKey(), + gson.fromJson(entry.getValue(), HashMap.class)); + } + } + } + return instance; + } + }.nullSafe(); + } + } + + /** + * Create an instance of DbtSearchResponse given an JSON string + * + * @param jsonString JSON string + * @return An instance of DbtSearchResponse + * @throws IOException if the JSON string is invalid with respect to DbtSearchResponse + */ + public static DbtSearchResponse fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, DbtSearchResponse.class); + } + + /** + * Convert an instance of DbtSearchResponse to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} diff --git a/sdks/java/src/main/java/com/thoughtspot/client/model/DeactivateUserRequest.java b/sdks/java/src/main/java/com/thoughtspot/client/model/DeactivateUserRequest.java new file mode 100644 index 000000000..0c94b698d --- /dev/null +++ b/sdks/java/src/main/java/com/thoughtspot/client/model/DeactivateUserRequest.java @@ -0,0 +1,338 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client.model; + +import com.google.gson.Gson; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.TypeAdapter; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.annotations.SerializedName; +import com.google.gson.reflect.TypeToken; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import com.thoughtspot.client.JSON; +import java.io.IOException; +import java.io.Serializable; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Objects; + +/** DeactivateUserRequest */ +@javax.annotation.Generated( + value = "org.openapitools.codegen.languages.JavaClientCodegen", + comments = "Generator version: 7.12.0") +public class DeactivateUserRequest implements Serializable { + private static final long serialVersionUID = 1L; + + public static final String SERIALIZED_NAME_USER_IDENTIFIER = "user_identifier"; + + @SerializedName(SERIALIZED_NAME_USER_IDENTIFIER) + @javax.annotation.Nonnull + private String userIdentifier; + + public static final String SERIALIZED_NAME_BASE_URL = "base_url"; + + @SerializedName(SERIALIZED_NAME_BASE_URL) + @javax.annotation.Nonnull + private String baseUrl; + + public DeactivateUserRequest() {} + + public DeactivateUserRequest userIdentifier(@javax.annotation.Nonnull String userIdentifier) { + this.userIdentifier = userIdentifier; + return this; + } + + /** + * Unique ID or name of the user. + * + * @return userIdentifier + */ + @javax.annotation.Nonnull + public String getUserIdentifier() { + return userIdentifier; + } + + public void setUserIdentifier(@javax.annotation.Nonnull String userIdentifier) { + this.userIdentifier = userIdentifier; + } + + public DeactivateUserRequest baseUrl(@javax.annotation.Nonnull String baseUrl) { + this.baseUrl = baseUrl; + return this; + } + + /** + * Base url of the cluster. + * + * @return baseUrl + */ + @javax.annotation.Nonnull + public String getBaseUrl() { + return baseUrl; + } + + public void setBaseUrl(@javax.annotation.Nonnull String baseUrl) { + this.baseUrl = baseUrl; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key name of the property + * @param value value of the property + * @return the DeactivateUserRequest instance itself + */ + public DeactivateUserRequest putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return a map of objects + */ + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key name of the property + * @return an object + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + DeactivateUserRequest deactivateUserRequest = (DeactivateUserRequest) o; + return Objects.equals(this.userIdentifier, deactivateUserRequest.userIdentifier) + && Objects.equals(this.baseUrl, deactivateUserRequest.baseUrl) + && Objects.equals( + this.additionalProperties, deactivateUserRequest.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(userIdentifier, baseUrl, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class DeactivateUserRequest {\n"); + sb.append(" userIdentifier: ").append(toIndentedString(userIdentifier)).append("\n"); + sb.append(" baseUrl: ").append(toIndentedString(baseUrl)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first + * line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("user_identifier"); + openapiFields.add("base_url"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + openapiRequiredFields.add("user_identifier"); + openapiRequiredFields.add("base_url"); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to DeactivateUserRequest + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!DeactivateUserRequest.openapiRequiredFields + .isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException( + String.format( + "The required field(s) %s in DeactivateUserRequest is not found in" + + " the empty JSON string", + DeactivateUserRequest.openapiRequiredFields.toString())); + } + } + + // check to make sure all required properties/fields are present in the JSON string + for (String requiredField : DeactivateUserRequest.openapiRequiredFields) { + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException( + String.format( + "The required field `%s` is not found in the JSON string: %s", + requiredField, jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if (!jsonObj.get("user_identifier").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `user_identifier` to be a primitive type in the" + + " JSON string but got `%s`", + jsonObj.get("user_identifier").toString())); + } + if (!jsonObj.get("base_url").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `base_url` to be a primitive type in the JSON" + + " string but got `%s`", + jsonObj.get("base_url").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!DeactivateUserRequest.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'DeactivateUserRequest' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter = + gson.getDelegateAdapter(this, TypeToken.get(DeactivateUserRequest.class)); + + return (TypeAdapter) + new TypeAdapter() { + @Override + public void write(JsonWriter out, DeactivateUserRequest value) + throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + obj.remove("additionalProperties"); + // serialize additional properties + if (value.getAdditionalProperties() != null) { + for (Map.Entry entry : + value.getAdditionalProperties().entrySet()) { + if (entry.getValue() instanceof String) + obj.addProperty(entry.getKey(), (String) entry.getValue()); + else if (entry.getValue() instanceof Number) + obj.addProperty(entry.getKey(), (Number) entry.getValue()); + else if (entry.getValue() instanceof Boolean) + obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); + else if (entry.getValue() instanceof Character) + obj.addProperty( + entry.getKey(), (Character) entry.getValue()); + else { + JsonElement jsonElement = gson.toJsonTree(entry.getValue()); + if (jsonElement.isJsonArray()) { + obj.add(entry.getKey(), jsonElement.getAsJsonArray()); + } else { + obj.add(entry.getKey(), jsonElement.getAsJsonObject()); + } + } + } + } + elementAdapter.write(out, obj); + } + + @Override + public DeactivateUserRequest read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // store additional fields in the deserialized instance + DeactivateUserRequest instance = thisAdapter.fromJsonTree(jsonObj); + for (Map.Entry entry : jsonObj.entrySet()) { + if (!openapiFields.contains(entry.getKey())) { + if (entry.getValue().isJsonPrimitive()) { // primitive type + if (entry.getValue().getAsJsonPrimitive().isString()) + instance.putAdditionalProperty( + entry.getKey(), entry.getValue().getAsString()); + else if (entry.getValue().getAsJsonPrimitive().isNumber()) + instance.putAdditionalProperty( + entry.getKey(), entry.getValue().getAsNumber()); + else if (entry.getValue().getAsJsonPrimitive().isBoolean()) + instance.putAdditionalProperty( + entry.getKey(), + entry.getValue().getAsBoolean()); + else + throw new IllegalArgumentException( + String.format( + "The field `%s` has unknown primitive" + + " type. Value: %s", + entry.getKey(), + entry.getValue().toString())); + } else if (entry.getValue().isJsonArray()) { + instance.putAdditionalProperty( + entry.getKey(), + gson.fromJson(entry.getValue(), List.class)); + } else { // JSON object + instance.putAdditionalProperty( + entry.getKey(), + gson.fromJson(entry.getValue(), HashMap.class)); + } + } + } + return instance; + } + }.nullSafe(); + } + } + + /** + * Create an instance of DeactivateUserRequest given an JSON string + * + * @param jsonString JSON string + * @return An instance of DeactivateUserRequest + * @throws IOException if the JSON string is invalid with respect to DeactivateUserRequest + */ + public static DeactivateUserRequest fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, DeactivateUserRequest.class); + } + + /** + * Convert an instance of DeactivateUserRequest to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} diff --git a/sdks/java/src/main/java/com/thoughtspot/client/model/DefaultActionConfig.java b/sdks/java/src/main/java/com/thoughtspot/client/model/DefaultActionConfig.java new file mode 100644 index 000000000..08f59dc81 --- /dev/null +++ b/sdks/java/src/main/java/com/thoughtspot/client/model/DefaultActionConfig.java @@ -0,0 +1,307 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client.model; + +import com.google.gson.Gson; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.TypeAdapter; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.annotations.SerializedName; +import com.google.gson.reflect.TypeToken; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import com.thoughtspot.client.JSON; +import java.io.IOException; +import java.io.Serializable; +import java.util.Arrays; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Objects; +import org.openapitools.jackson.nullable.JsonNullable; + +/** + * Default Custom action configuration. This includes the custom action's visibility across all + * visualizations and Answers. By default, a custom action is added to all visualizations and + * Answers. + */ +@javax.annotation.Generated( + value = "org.openapitools.codegen.languages.JavaClientCodegen", + comments = "Generator version: 7.12.0") +public class DefaultActionConfig implements Serializable { + private static final long serialVersionUID = 1L; + + public static final String SERIALIZED_NAME_VISIBILITY = "visibility"; + + @SerializedName(SERIALIZED_NAME_VISIBILITY) + @javax.annotation.Nullable + private Boolean visibility; + + public DefaultActionConfig() {} + + public DefaultActionConfig visibility(@javax.annotation.Nullable Boolean visibility) { + this.visibility = visibility; + return this; + } + + /** + * Custom action is available on all visualizations. Earlier , the naming convention: + * LOCAL/GLOBAL. TRUE signifies GLOBAL for backward compatibility. + * + * @return visibility + */ + @javax.annotation.Nullable + public Boolean getVisibility() { + return visibility; + } + + public void setVisibility(@javax.annotation.Nullable Boolean visibility) { + this.visibility = visibility; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key name of the property + * @param value value of the property + * @return the DefaultActionConfig instance itself + */ + public DefaultActionConfig putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return a map of objects + */ + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key name of the property + * @return an object + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + DefaultActionConfig defaultActionConfig = (DefaultActionConfig) o; + return Objects.equals(this.visibility, defaultActionConfig.visibility) + && Objects.equals( + this.additionalProperties, defaultActionConfig.additionalProperties); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b + || (a != null + && b != null + && a.isPresent() + && b.isPresent() + && Objects.deepEquals(a.get(), b.get())); + } + + @Override + public int hashCode() { + return Objects.hash(visibility, additionalProperties); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; + } + return a.isPresent() ? Arrays.deepHashCode(new Object[] {a.get()}) : 31; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class DefaultActionConfig {\n"); + sb.append(" visibility: ").append(toIndentedString(visibility)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first + * line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("visibility"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to DefaultActionConfig + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!DefaultActionConfig.openapiRequiredFields + .isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException( + String.format( + "The required field(s) %s in DefaultActionConfig is not found in" + + " the empty JSON string", + DefaultActionConfig.openapiRequiredFields.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!DefaultActionConfig.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'DefaultActionConfig' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter = + gson.getDelegateAdapter(this, TypeToken.get(DefaultActionConfig.class)); + + return (TypeAdapter) + new TypeAdapter() { + @Override + public void write(JsonWriter out, DefaultActionConfig value) + throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + obj.remove("additionalProperties"); + // serialize additional properties + if (value.getAdditionalProperties() != null) { + for (Map.Entry entry : + value.getAdditionalProperties().entrySet()) { + if (entry.getValue() instanceof String) + obj.addProperty(entry.getKey(), (String) entry.getValue()); + else if (entry.getValue() instanceof Number) + obj.addProperty(entry.getKey(), (Number) entry.getValue()); + else if (entry.getValue() instanceof Boolean) + obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); + else if (entry.getValue() instanceof Character) + obj.addProperty( + entry.getKey(), (Character) entry.getValue()); + else { + JsonElement jsonElement = gson.toJsonTree(entry.getValue()); + if (jsonElement.isJsonArray()) { + obj.add(entry.getKey(), jsonElement.getAsJsonArray()); + } else { + obj.add(entry.getKey(), jsonElement.getAsJsonObject()); + } + } + } + } + elementAdapter.write(out, obj); + } + + @Override + public DefaultActionConfig read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // store additional fields in the deserialized instance + DefaultActionConfig instance = thisAdapter.fromJsonTree(jsonObj); + for (Map.Entry entry : jsonObj.entrySet()) { + if (!openapiFields.contains(entry.getKey())) { + if (entry.getValue().isJsonPrimitive()) { // primitive type + if (entry.getValue().getAsJsonPrimitive().isString()) + instance.putAdditionalProperty( + entry.getKey(), entry.getValue().getAsString()); + else if (entry.getValue().getAsJsonPrimitive().isNumber()) + instance.putAdditionalProperty( + entry.getKey(), entry.getValue().getAsNumber()); + else if (entry.getValue().getAsJsonPrimitive().isBoolean()) + instance.putAdditionalProperty( + entry.getKey(), + entry.getValue().getAsBoolean()); + else + throw new IllegalArgumentException( + String.format( + "The field `%s` has unknown primitive" + + " type. Value: %s", + entry.getKey(), + entry.getValue().toString())); + } else if (entry.getValue().isJsonArray()) { + instance.putAdditionalProperty( + entry.getKey(), + gson.fromJson(entry.getValue(), List.class)); + } else { // JSON object + instance.putAdditionalProperty( + entry.getKey(), + gson.fromJson(entry.getValue(), HashMap.class)); + } + } + } + return instance; + } + }.nullSafe(); + } + } + + /** + * Create an instance of DefaultActionConfig given an JSON string + * + * @param jsonString JSON string + * @return An instance of DefaultActionConfig + * @throws IOException if the JSON string is invalid with respect to DefaultActionConfig + */ + public static DefaultActionConfig fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, DefaultActionConfig.class); + } + + /** + * Convert an instance of DefaultActionConfig to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} diff --git a/sdks/java/src/main/java/com/thoughtspot/client/model/DefaultActionConfigInput.java b/sdks/java/src/main/java/com/thoughtspot/client/model/DefaultActionConfigInput.java new file mode 100644 index 000000000..c7a0aadc4 --- /dev/null +++ b/sdks/java/src/main/java/com/thoughtspot/client/model/DefaultActionConfigInput.java @@ -0,0 +1,308 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client.model; + +import com.google.gson.Gson; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.TypeAdapter; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.annotations.SerializedName; +import com.google.gson.reflect.TypeToken; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import com.thoughtspot.client.JSON; +import java.io.IOException; +import java.io.Serializable; +import java.util.Arrays; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Objects; +import org.openapitools.jackson.nullable.JsonNullable; + +/** + * Default Custom action configuration. This includes the custom action's visibility across all + * visualizations and Answers. By default, a custom action is added to all visualizations and + * Answers. + */ +@javax.annotation.Generated( + value = "org.openapitools.codegen.languages.JavaClientCodegen", + comments = "Generator version: 7.12.0") +public class DefaultActionConfigInput implements Serializable { + private static final long serialVersionUID = 1L; + + public static final String SERIALIZED_NAME_VISIBILITY = "visibility"; + + @SerializedName(SERIALIZED_NAME_VISIBILITY) + @javax.annotation.Nullable + private Boolean visibility; + + public DefaultActionConfigInput() {} + + public DefaultActionConfigInput visibility(@javax.annotation.Nullable Boolean visibility) { + this.visibility = visibility; + return this; + } + + /** + * Custom action is available on all visualizations. Earlier naming convention: LOCAL/GLOBAL. + * TRUE signifies GLOBAL for backward compatibility. + * + * @return visibility + */ + @javax.annotation.Nullable + public Boolean getVisibility() { + return visibility; + } + + public void setVisibility(@javax.annotation.Nullable Boolean visibility) { + this.visibility = visibility; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key name of the property + * @param value value of the property + * @return the DefaultActionConfigInput instance itself + */ + public DefaultActionConfigInput putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return a map of objects + */ + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key name of the property + * @return an object + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + DefaultActionConfigInput defaultActionConfigInput = (DefaultActionConfigInput) o; + return Objects.equals(this.visibility, defaultActionConfigInput.visibility) + && Objects.equals( + this.additionalProperties, defaultActionConfigInput.additionalProperties); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b + || (a != null + && b != null + && a.isPresent() + && b.isPresent() + && Objects.deepEquals(a.get(), b.get())); + } + + @Override + public int hashCode() { + return Objects.hash(visibility, additionalProperties); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; + } + return a.isPresent() ? Arrays.deepHashCode(new Object[] {a.get()}) : 31; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class DefaultActionConfigInput {\n"); + sb.append(" visibility: ").append(toIndentedString(visibility)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first + * line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("visibility"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to DefaultActionConfigInput + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!DefaultActionConfigInput.openapiRequiredFields + .isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException( + String.format( + "The required field(s) %s in DefaultActionConfigInput is not found" + + " in the empty JSON string", + DefaultActionConfigInput.openapiRequiredFields.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!DefaultActionConfigInput.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'DefaultActionConfigInput' and its + // subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter = + gson.getDelegateAdapter(this, TypeToken.get(DefaultActionConfigInput.class)); + + return (TypeAdapter) + new TypeAdapter() { + @Override + public void write(JsonWriter out, DefaultActionConfigInput value) + throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + obj.remove("additionalProperties"); + // serialize additional properties + if (value.getAdditionalProperties() != null) { + for (Map.Entry entry : + value.getAdditionalProperties().entrySet()) { + if (entry.getValue() instanceof String) + obj.addProperty(entry.getKey(), (String) entry.getValue()); + else if (entry.getValue() instanceof Number) + obj.addProperty(entry.getKey(), (Number) entry.getValue()); + else if (entry.getValue() instanceof Boolean) + obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); + else if (entry.getValue() instanceof Character) + obj.addProperty( + entry.getKey(), (Character) entry.getValue()); + else { + JsonElement jsonElement = gson.toJsonTree(entry.getValue()); + if (jsonElement.isJsonArray()) { + obj.add(entry.getKey(), jsonElement.getAsJsonArray()); + } else { + obj.add(entry.getKey(), jsonElement.getAsJsonObject()); + } + } + } + } + elementAdapter.write(out, obj); + } + + @Override + public DefaultActionConfigInput read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // store additional fields in the deserialized instance + DefaultActionConfigInput instance = thisAdapter.fromJsonTree(jsonObj); + for (Map.Entry entry : jsonObj.entrySet()) { + if (!openapiFields.contains(entry.getKey())) { + if (entry.getValue().isJsonPrimitive()) { // primitive type + if (entry.getValue().getAsJsonPrimitive().isString()) + instance.putAdditionalProperty( + entry.getKey(), entry.getValue().getAsString()); + else if (entry.getValue().getAsJsonPrimitive().isNumber()) + instance.putAdditionalProperty( + entry.getKey(), entry.getValue().getAsNumber()); + else if (entry.getValue().getAsJsonPrimitive().isBoolean()) + instance.putAdditionalProperty( + entry.getKey(), + entry.getValue().getAsBoolean()); + else + throw new IllegalArgumentException( + String.format( + "The field `%s` has unknown primitive" + + " type. Value: %s", + entry.getKey(), + entry.getValue().toString())); + } else if (entry.getValue().isJsonArray()) { + instance.putAdditionalProperty( + entry.getKey(), + gson.fromJson(entry.getValue(), List.class)); + } else { // JSON object + instance.putAdditionalProperty( + entry.getKey(), + gson.fromJson(entry.getValue(), HashMap.class)); + } + } + } + return instance; + } + }.nullSafe(); + } + } + + /** + * Create an instance of DefaultActionConfigInput given an JSON string + * + * @param jsonString JSON string + * @return An instance of DefaultActionConfigInput + * @throws IOException if the JSON string is invalid with respect to DefaultActionConfigInput + */ + public static DefaultActionConfigInput fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, DefaultActionConfigInput.class); + } + + /** + * Convert an instance of DefaultActionConfigInput to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} diff --git a/sdks/java/src/main/java/com/thoughtspot/client/model/DefaultActionConfigInputCreate.java b/sdks/java/src/main/java/com/thoughtspot/client/model/DefaultActionConfigInputCreate.java new file mode 100644 index 000000000..ddee3527c --- /dev/null +++ b/sdks/java/src/main/java/com/thoughtspot/client/model/DefaultActionConfigInputCreate.java @@ -0,0 +1,316 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client.model; + +import com.google.gson.Gson; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.TypeAdapter; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.annotations.SerializedName; +import com.google.gson.reflect.TypeToken; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import com.thoughtspot.client.JSON; +import java.io.IOException; +import java.io.Serializable; +import java.util.Arrays; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Objects; +import org.openapitools.jackson.nullable.JsonNullable; + +/** + * Default Custom action configuration. This includes the custom action's visibility across all + * visualizations and Answers. By default, a custom action is added to all visualizations and + * Answers. + */ +@javax.annotation.Generated( + value = "org.openapitools.codegen.languages.JavaClientCodegen", + comments = "Generator version: 7.12.0") +public class DefaultActionConfigInputCreate implements Serializable { + private static final long serialVersionUID = 1L; + + public static final String SERIALIZED_NAME_VISIBILITY = "visibility"; + + @SerializedName(SERIALIZED_NAME_VISIBILITY) + @javax.annotation.Nullable + private Boolean visibility = true; + + public DefaultActionConfigInputCreate() {} + + public DefaultActionConfigInputCreate visibility( + @javax.annotation.Nullable Boolean visibility) { + this.visibility = visibility; + return this; + } + + /** + * Custom action is available on all visualizations. Earlier naming convention: LOCAL/GLOBAL. + * TRUE signifies GLOBAL for backward compatibility. Default: true + * + * @return visibility + */ + @javax.annotation.Nullable + public Boolean getVisibility() { + return visibility; + } + + public void setVisibility(@javax.annotation.Nullable Boolean visibility) { + this.visibility = visibility; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key name of the property + * @param value value of the property + * @return the DefaultActionConfigInputCreate instance itself + */ + public DefaultActionConfigInputCreate putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return a map of objects + */ + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key name of the property + * @return an object + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + DefaultActionConfigInputCreate defaultActionConfigInputCreate = + (DefaultActionConfigInputCreate) o; + return Objects.equals(this.visibility, defaultActionConfigInputCreate.visibility) + && Objects.equals( + this.additionalProperties, + defaultActionConfigInputCreate.additionalProperties); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b + || (a != null + && b != null + && a.isPresent() + && b.isPresent() + && Objects.deepEquals(a.get(), b.get())); + } + + @Override + public int hashCode() { + return Objects.hash(visibility, additionalProperties); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; + } + return a.isPresent() ? Arrays.deepHashCode(new Object[] {a.get()}) : 31; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class DefaultActionConfigInputCreate {\n"); + sb.append(" visibility: ").append(toIndentedString(visibility)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first + * line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("visibility"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to + * DefaultActionConfigInputCreate + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!DefaultActionConfigInputCreate.openapiRequiredFields + .isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException( + String.format( + "The required field(s) %s in DefaultActionConfigInputCreate is not" + + " found in the empty JSON string", + DefaultActionConfigInputCreate.openapiRequiredFields.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!DefaultActionConfigInputCreate.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'DefaultActionConfigInputCreate' and its + // subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter = + gson.getDelegateAdapter( + this, TypeToken.get(DefaultActionConfigInputCreate.class)); + + return (TypeAdapter) + new TypeAdapter() { + @Override + public void write(JsonWriter out, DefaultActionConfigInputCreate value) + throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + obj.remove("additionalProperties"); + // serialize additional properties + if (value.getAdditionalProperties() != null) { + for (Map.Entry entry : + value.getAdditionalProperties().entrySet()) { + if (entry.getValue() instanceof String) + obj.addProperty(entry.getKey(), (String) entry.getValue()); + else if (entry.getValue() instanceof Number) + obj.addProperty(entry.getKey(), (Number) entry.getValue()); + else if (entry.getValue() instanceof Boolean) + obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); + else if (entry.getValue() instanceof Character) + obj.addProperty( + entry.getKey(), (Character) entry.getValue()); + else { + JsonElement jsonElement = gson.toJsonTree(entry.getValue()); + if (jsonElement.isJsonArray()) { + obj.add(entry.getKey(), jsonElement.getAsJsonArray()); + } else { + obj.add(entry.getKey(), jsonElement.getAsJsonObject()); + } + } + } + } + elementAdapter.write(out, obj); + } + + @Override + public DefaultActionConfigInputCreate read(JsonReader in) + throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // store additional fields in the deserialized instance + DefaultActionConfigInputCreate instance = + thisAdapter.fromJsonTree(jsonObj); + for (Map.Entry entry : jsonObj.entrySet()) { + if (!openapiFields.contains(entry.getKey())) { + if (entry.getValue().isJsonPrimitive()) { // primitive type + if (entry.getValue().getAsJsonPrimitive().isString()) + instance.putAdditionalProperty( + entry.getKey(), entry.getValue().getAsString()); + else if (entry.getValue().getAsJsonPrimitive().isNumber()) + instance.putAdditionalProperty( + entry.getKey(), entry.getValue().getAsNumber()); + else if (entry.getValue().getAsJsonPrimitive().isBoolean()) + instance.putAdditionalProperty( + entry.getKey(), + entry.getValue().getAsBoolean()); + else + throw new IllegalArgumentException( + String.format( + "The field `%s` has unknown primitive" + + " type. Value: %s", + entry.getKey(), + entry.getValue().toString())); + } else if (entry.getValue().isJsonArray()) { + instance.putAdditionalProperty( + entry.getKey(), + gson.fromJson(entry.getValue(), List.class)); + } else { // JSON object + instance.putAdditionalProperty( + entry.getKey(), + gson.fromJson(entry.getValue(), HashMap.class)); + } + } + } + return instance; + } + }.nullSafe(); + } + } + + /** + * Create an instance of DefaultActionConfigInputCreate given an JSON string + * + * @param jsonString JSON string + * @return An instance of DefaultActionConfigInputCreate + * @throws IOException if the JSON string is invalid with respect to + * DefaultActionConfigInputCreate + */ + public static DefaultActionConfigInputCreate fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, DefaultActionConfigInputCreate.class); + } + + /** + * Convert an instance of DefaultActionConfigInputCreate to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} diff --git a/sdks/java/src/main/java/com/thoughtspot/client/model/DefaultActionConfigSearchInput.java b/sdks/java/src/main/java/com/thoughtspot/client/model/DefaultActionConfigSearchInput.java new file mode 100644 index 000000000..741d2b7ba --- /dev/null +++ b/sdks/java/src/main/java/com/thoughtspot/client/model/DefaultActionConfigSearchInput.java @@ -0,0 +1,316 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client.model; + +import com.google.gson.Gson; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.TypeAdapter; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.annotations.SerializedName; +import com.google.gson.reflect.TypeToken; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import com.thoughtspot.client.JSON; +import java.io.IOException; +import java.io.Serializable; +import java.util.Arrays; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Objects; +import org.openapitools.jackson.nullable.JsonNullable; + +/** + * Default Custom action configuration. This includes the custom action's visibility across all + * visualizations and Answers. By default, a custom action is added to all visualizations and + * Answers. + */ +@javax.annotation.Generated( + value = "org.openapitools.codegen.languages.JavaClientCodegen", + comments = "Generator version: 7.12.0") +public class DefaultActionConfigSearchInput implements Serializable { + private static final long serialVersionUID = 1L; + + public static final String SERIALIZED_NAME_VISIBILITY = "visibility"; + + @SerializedName(SERIALIZED_NAME_VISIBILITY) + @javax.annotation.Nullable + private Boolean visibility; + + public DefaultActionConfigSearchInput() {} + + public DefaultActionConfigSearchInput visibility( + @javax.annotation.Nullable Boolean visibility) { + this.visibility = visibility; + return this; + } + + /** + * Custom action is available on all visualizations. Earlier naming convention: LOCAL/GLOBAL. + * TRUE signifies GLOBAL for backward compatibility. + * + * @return visibility + */ + @javax.annotation.Nullable + public Boolean getVisibility() { + return visibility; + } + + public void setVisibility(@javax.annotation.Nullable Boolean visibility) { + this.visibility = visibility; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key name of the property + * @param value value of the property + * @return the DefaultActionConfigSearchInput instance itself + */ + public DefaultActionConfigSearchInput putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return a map of objects + */ + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key name of the property + * @return an object + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + DefaultActionConfigSearchInput defaultActionConfigSearchInput = + (DefaultActionConfigSearchInput) o; + return Objects.equals(this.visibility, defaultActionConfigSearchInput.visibility) + && Objects.equals( + this.additionalProperties, + defaultActionConfigSearchInput.additionalProperties); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b + || (a != null + && b != null + && a.isPresent() + && b.isPresent() + && Objects.deepEquals(a.get(), b.get())); + } + + @Override + public int hashCode() { + return Objects.hash(visibility, additionalProperties); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; + } + return a.isPresent() ? Arrays.deepHashCode(new Object[] {a.get()}) : 31; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class DefaultActionConfigSearchInput {\n"); + sb.append(" visibility: ").append(toIndentedString(visibility)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first + * line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("visibility"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to + * DefaultActionConfigSearchInput + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!DefaultActionConfigSearchInput.openapiRequiredFields + .isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException( + String.format( + "The required field(s) %s in DefaultActionConfigSearchInput is not" + + " found in the empty JSON string", + DefaultActionConfigSearchInput.openapiRequiredFields.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!DefaultActionConfigSearchInput.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'DefaultActionConfigSearchInput' and its + // subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter = + gson.getDelegateAdapter( + this, TypeToken.get(DefaultActionConfigSearchInput.class)); + + return (TypeAdapter) + new TypeAdapter() { + @Override + public void write(JsonWriter out, DefaultActionConfigSearchInput value) + throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + obj.remove("additionalProperties"); + // serialize additional properties + if (value.getAdditionalProperties() != null) { + for (Map.Entry entry : + value.getAdditionalProperties().entrySet()) { + if (entry.getValue() instanceof String) + obj.addProperty(entry.getKey(), (String) entry.getValue()); + else if (entry.getValue() instanceof Number) + obj.addProperty(entry.getKey(), (Number) entry.getValue()); + else if (entry.getValue() instanceof Boolean) + obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); + else if (entry.getValue() instanceof Character) + obj.addProperty( + entry.getKey(), (Character) entry.getValue()); + else { + JsonElement jsonElement = gson.toJsonTree(entry.getValue()); + if (jsonElement.isJsonArray()) { + obj.add(entry.getKey(), jsonElement.getAsJsonArray()); + } else { + obj.add(entry.getKey(), jsonElement.getAsJsonObject()); + } + } + } + } + elementAdapter.write(out, obj); + } + + @Override + public DefaultActionConfigSearchInput read(JsonReader in) + throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // store additional fields in the deserialized instance + DefaultActionConfigSearchInput instance = + thisAdapter.fromJsonTree(jsonObj); + for (Map.Entry entry : jsonObj.entrySet()) { + if (!openapiFields.contains(entry.getKey())) { + if (entry.getValue().isJsonPrimitive()) { // primitive type + if (entry.getValue().getAsJsonPrimitive().isString()) + instance.putAdditionalProperty( + entry.getKey(), entry.getValue().getAsString()); + else if (entry.getValue().getAsJsonPrimitive().isNumber()) + instance.putAdditionalProperty( + entry.getKey(), entry.getValue().getAsNumber()); + else if (entry.getValue().getAsJsonPrimitive().isBoolean()) + instance.putAdditionalProperty( + entry.getKey(), + entry.getValue().getAsBoolean()); + else + throw new IllegalArgumentException( + String.format( + "The field `%s` has unknown primitive" + + " type. Value: %s", + entry.getKey(), + entry.getValue().toString())); + } else if (entry.getValue().isJsonArray()) { + instance.putAdditionalProperty( + entry.getKey(), + gson.fromJson(entry.getValue(), List.class)); + } else { // JSON object + instance.putAdditionalProperty( + entry.getKey(), + gson.fromJson(entry.getValue(), HashMap.class)); + } + } + } + return instance; + } + }.nullSafe(); + } + } + + /** + * Create an instance of DefaultActionConfigSearchInput given an JSON string + * + * @param jsonString JSON string + * @return An instance of DefaultActionConfigSearchInput + * @throws IOException if the JSON string is invalid with respect to + * DefaultActionConfigSearchInput + */ + public static DefaultActionConfigSearchInput fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, DefaultActionConfigSearchInput.class); + } + + /** + * Convert an instance of DefaultActionConfigSearchInput to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} diff --git a/sdks/java/src/main/java/com/thoughtspot/client/model/DeleteCollectionRequest.java b/sdks/java/src/main/java/com/thoughtspot/client/model/DeleteCollectionRequest.java new file mode 100644 index 000000000..3a442d29d --- /dev/null +++ b/sdks/java/src/main/java/com/thoughtspot/client/model/DeleteCollectionRequest.java @@ -0,0 +1,399 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client.model; + +import com.google.gson.Gson; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.TypeAdapter; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.annotations.SerializedName; +import com.google.gson.reflect.TypeToken; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import com.thoughtspot.client.JSON; +import java.io.IOException; +import java.io.Serializable; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Objects; +import org.openapitools.jackson.nullable.JsonNullable; + +/** DeleteCollectionRequest */ +@javax.annotation.Generated( + value = "org.openapitools.codegen.languages.JavaClientCodegen", + comments = "Generator version: 7.12.0") +public class DeleteCollectionRequest implements Serializable { + private static final long serialVersionUID = 1L; + + public static final String SERIALIZED_NAME_COLLECTION_IDENTIFIERS = "collection_identifiers"; + + @SerializedName(SERIALIZED_NAME_COLLECTION_IDENTIFIERS) + @javax.annotation.Nonnull + private List collectionIdentifiers; + + public static final String SERIALIZED_NAME_DELETE_CHILDREN = "delete_children"; + + @SerializedName(SERIALIZED_NAME_DELETE_CHILDREN) + @javax.annotation.Nullable + private Boolean deleteChildren = false; + + public static final String SERIALIZED_NAME_DRY_RUN = "dry_run"; + + @SerializedName(SERIALIZED_NAME_DRY_RUN) + @javax.annotation.Nullable + private Boolean dryRun = false; + + public DeleteCollectionRequest() {} + + public DeleteCollectionRequest collectionIdentifiers( + @javax.annotation.Nonnull List collectionIdentifiers) { + this.collectionIdentifiers = collectionIdentifiers; + return this; + } + + public DeleteCollectionRequest addCollectionIdentifiersItem(String collectionIdentifiersItem) { + if (this.collectionIdentifiers == null) { + this.collectionIdentifiers = new ArrayList<>(); + } + this.collectionIdentifiers.add(collectionIdentifiersItem); + return this; + } + + /** + * Unique GUIDs of collections to delete. Note: Collection names cannot be used as identifiers + * since duplicate names are allowed. + * + * @return collectionIdentifiers + */ + @javax.annotation.Nonnull + public List getCollectionIdentifiers() { + return collectionIdentifiers; + } + + public void setCollectionIdentifiers( + @javax.annotation.Nonnull List collectionIdentifiers) { + this.collectionIdentifiers = collectionIdentifiers; + } + + public DeleteCollectionRequest deleteChildren( + @javax.annotation.Nullable Boolean deleteChildren) { + this.deleteChildren = deleteChildren; + return this; + } + + /** + * Flag to delete child objects of the collection that the user has access to. + * + * @return deleteChildren + */ + @javax.annotation.Nullable + public Boolean getDeleteChildren() { + return deleteChildren; + } + + public void setDeleteChildren(@javax.annotation.Nullable Boolean deleteChildren) { + this.deleteChildren = deleteChildren; + } + + public DeleteCollectionRequest dryRun(@javax.annotation.Nullable Boolean dryRun) { + this.dryRun = dryRun; + return this; + } + + /** + * Preview deletion without actually deleting. When set to true, returns what would be deleted + * without performing the actual deletion. + * + * @return dryRun + */ + @javax.annotation.Nullable + public Boolean getDryRun() { + return dryRun; + } + + public void setDryRun(@javax.annotation.Nullable Boolean dryRun) { + this.dryRun = dryRun; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key name of the property + * @param value value of the property + * @return the DeleteCollectionRequest instance itself + */ + public DeleteCollectionRequest putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return a map of objects + */ + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key name of the property + * @return an object + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + DeleteCollectionRequest deleteCollectionRequest = (DeleteCollectionRequest) o; + return Objects.equals( + this.collectionIdentifiers, deleteCollectionRequest.collectionIdentifiers) + && Objects.equals(this.deleteChildren, deleteCollectionRequest.deleteChildren) + && Objects.equals(this.dryRun, deleteCollectionRequest.dryRun) + && Objects.equals( + this.additionalProperties, deleteCollectionRequest.additionalProperties); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b + || (a != null + && b != null + && a.isPresent() + && b.isPresent() + && Objects.deepEquals(a.get(), b.get())); + } + + @Override + public int hashCode() { + return Objects.hash(collectionIdentifiers, deleteChildren, dryRun, additionalProperties); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; + } + return a.isPresent() ? Arrays.deepHashCode(new Object[] {a.get()}) : 31; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class DeleteCollectionRequest {\n"); + sb.append(" collectionIdentifiers: ") + .append(toIndentedString(collectionIdentifiers)) + .append("\n"); + sb.append(" deleteChildren: ").append(toIndentedString(deleteChildren)).append("\n"); + sb.append(" dryRun: ").append(toIndentedString(dryRun)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first + * line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("collection_identifiers"); + openapiFields.add("delete_children"); + openapiFields.add("dry_run"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + openapiRequiredFields.add("collection_identifiers"); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to DeleteCollectionRequest + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!DeleteCollectionRequest.openapiRequiredFields + .isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException( + String.format( + "The required field(s) %s in DeleteCollectionRequest is not found" + + " in the empty JSON string", + DeleteCollectionRequest.openapiRequiredFields.toString())); + } + } + + // check to make sure all required properties/fields are present in the JSON string + for (String requiredField : DeleteCollectionRequest.openapiRequiredFields) { + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException( + String.format( + "The required field `%s` is not found in the JSON string: %s", + requiredField, jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // ensure the required json array is present + if (jsonObj.get("collection_identifiers") == null) { + throw new IllegalArgumentException( + "Expected the field `linkedContent` to be an array in the JSON string but got" + + " `null`"); + } else if (!jsonObj.get("collection_identifiers").isJsonArray()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `collection_identifiers` to be an array in the" + + " JSON string but got `%s`", + jsonObj.get("collection_identifiers").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!DeleteCollectionRequest.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'DeleteCollectionRequest' and its + // subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter = + gson.getDelegateAdapter(this, TypeToken.get(DeleteCollectionRequest.class)); + + return (TypeAdapter) + new TypeAdapter() { + @Override + public void write(JsonWriter out, DeleteCollectionRequest value) + throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + obj.remove("additionalProperties"); + // serialize additional properties + if (value.getAdditionalProperties() != null) { + for (Map.Entry entry : + value.getAdditionalProperties().entrySet()) { + if (entry.getValue() instanceof String) + obj.addProperty(entry.getKey(), (String) entry.getValue()); + else if (entry.getValue() instanceof Number) + obj.addProperty(entry.getKey(), (Number) entry.getValue()); + else if (entry.getValue() instanceof Boolean) + obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); + else if (entry.getValue() instanceof Character) + obj.addProperty( + entry.getKey(), (Character) entry.getValue()); + else { + JsonElement jsonElement = gson.toJsonTree(entry.getValue()); + if (jsonElement.isJsonArray()) { + obj.add(entry.getKey(), jsonElement.getAsJsonArray()); + } else { + obj.add(entry.getKey(), jsonElement.getAsJsonObject()); + } + } + } + } + elementAdapter.write(out, obj); + } + + @Override + public DeleteCollectionRequest read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // store additional fields in the deserialized instance + DeleteCollectionRequest instance = thisAdapter.fromJsonTree(jsonObj); + for (Map.Entry entry : jsonObj.entrySet()) { + if (!openapiFields.contains(entry.getKey())) { + if (entry.getValue().isJsonPrimitive()) { // primitive type + if (entry.getValue().getAsJsonPrimitive().isString()) + instance.putAdditionalProperty( + entry.getKey(), entry.getValue().getAsString()); + else if (entry.getValue().getAsJsonPrimitive().isNumber()) + instance.putAdditionalProperty( + entry.getKey(), entry.getValue().getAsNumber()); + else if (entry.getValue().getAsJsonPrimitive().isBoolean()) + instance.putAdditionalProperty( + entry.getKey(), + entry.getValue().getAsBoolean()); + else + throw new IllegalArgumentException( + String.format( + "The field `%s` has unknown primitive" + + " type. Value: %s", + entry.getKey(), + entry.getValue().toString())); + } else if (entry.getValue().isJsonArray()) { + instance.putAdditionalProperty( + entry.getKey(), + gson.fromJson(entry.getValue(), List.class)); + } else { // JSON object + instance.putAdditionalProperty( + entry.getKey(), + gson.fromJson(entry.getValue(), HashMap.class)); + } + } + } + return instance; + } + }.nullSafe(); + } + } + + /** + * Create an instance of DeleteCollectionRequest given an JSON string + * + * @param jsonString JSON string + * @return An instance of DeleteCollectionRequest + * @throws IOException if the JSON string is invalid with respect to DeleteCollectionRequest + */ + public static DeleteCollectionRequest fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, DeleteCollectionRequest.class); + } + + /** + * Convert an instance of DeleteCollectionRequest to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} diff --git a/sdks/java/src/main/java/com/thoughtspot/client/model/DeleteConfigRequest.java b/sdks/java/src/main/java/com/thoughtspot/client/model/DeleteConfigRequest.java new file mode 100644 index 000000000..93fc65695 --- /dev/null +++ b/sdks/java/src/main/java/com/thoughtspot/client/model/DeleteConfigRequest.java @@ -0,0 +1,305 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client.model; + +import com.google.gson.Gson; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.TypeAdapter; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.annotations.SerializedName; +import com.google.gson.reflect.TypeToken; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import com.thoughtspot.client.JSON; +import java.io.IOException; +import java.io.Serializable; +import java.util.Arrays; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Objects; +import org.openapitools.jackson.nullable.JsonNullable; + +/** DeleteConfigRequest */ +@javax.annotation.Generated( + value = "org.openapitools.codegen.languages.JavaClientCodegen", + comments = "Generator version: 7.12.0") +public class DeleteConfigRequest implements Serializable { + private static final long serialVersionUID = 1L; + + public static final String SERIALIZED_NAME_CLUSTER_LEVEL = "cluster_level"; + + @SerializedName(SERIALIZED_NAME_CLUSTER_LEVEL) + @javax.annotation.Nullable + private Boolean clusterLevel; + + public DeleteConfigRequest() {} + + public DeleteConfigRequest clusterLevel(@javax.annotation.Nullable Boolean clusterLevel) { + this.clusterLevel = clusterLevel; + return this; + } + + /** + * Applicable when Orgs is enabled in the cluster Indicator to consider cluster level or org + * level config. Set it to false to delete configuration from current org. If set to true, then + * the configuration at cluster level and orgs that inherited the configuration from cluster + * level will be deleted. Version: 9.5.0.cl or later + * + * @return clusterLevel + */ + @javax.annotation.Nullable + public Boolean getClusterLevel() { + return clusterLevel; + } + + public void setClusterLevel(@javax.annotation.Nullable Boolean clusterLevel) { + this.clusterLevel = clusterLevel; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key name of the property + * @param value value of the property + * @return the DeleteConfigRequest instance itself + */ + public DeleteConfigRequest putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return a map of objects + */ + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key name of the property + * @return an object + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + DeleteConfigRequest deleteConfigRequest = (DeleteConfigRequest) o; + return Objects.equals(this.clusterLevel, deleteConfigRequest.clusterLevel) + && Objects.equals( + this.additionalProperties, deleteConfigRequest.additionalProperties); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b + || (a != null + && b != null + && a.isPresent() + && b.isPresent() + && Objects.deepEquals(a.get(), b.get())); + } + + @Override + public int hashCode() { + return Objects.hash(clusterLevel, additionalProperties); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; + } + return a.isPresent() ? Arrays.deepHashCode(new Object[] {a.get()}) : 31; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class DeleteConfigRequest {\n"); + sb.append(" clusterLevel: ").append(toIndentedString(clusterLevel)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first + * line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("cluster_level"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to DeleteConfigRequest + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!DeleteConfigRequest.openapiRequiredFields + .isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException( + String.format( + "The required field(s) %s in DeleteConfigRequest is not found in" + + " the empty JSON string", + DeleteConfigRequest.openapiRequiredFields.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!DeleteConfigRequest.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'DeleteConfigRequest' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter = + gson.getDelegateAdapter(this, TypeToken.get(DeleteConfigRequest.class)); + + return (TypeAdapter) + new TypeAdapter() { + @Override + public void write(JsonWriter out, DeleteConfigRequest value) + throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + obj.remove("additionalProperties"); + // serialize additional properties + if (value.getAdditionalProperties() != null) { + for (Map.Entry entry : + value.getAdditionalProperties().entrySet()) { + if (entry.getValue() instanceof String) + obj.addProperty(entry.getKey(), (String) entry.getValue()); + else if (entry.getValue() instanceof Number) + obj.addProperty(entry.getKey(), (Number) entry.getValue()); + else if (entry.getValue() instanceof Boolean) + obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); + else if (entry.getValue() instanceof Character) + obj.addProperty( + entry.getKey(), (Character) entry.getValue()); + else { + JsonElement jsonElement = gson.toJsonTree(entry.getValue()); + if (jsonElement.isJsonArray()) { + obj.add(entry.getKey(), jsonElement.getAsJsonArray()); + } else { + obj.add(entry.getKey(), jsonElement.getAsJsonObject()); + } + } + } + } + elementAdapter.write(out, obj); + } + + @Override + public DeleteConfigRequest read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // store additional fields in the deserialized instance + DeleteConfigRequest instance = thisAdapter.fromJsonTree(jsonObj); + for (Map.Entry entry : jsonObj.entrySet()) { + if (!openapiFields.contains(entry.getKey())) { + if (entry.getValue().isJsonPrimitive()) { // primitive type + if (entry.getValue().getAsJsonPrimitive().isString()) + instance.putAdditionalProperty( + entry.getKey(), entry.getValue().getAsString()); + else if (entry.getValue().getAsJsonPrimitive().isNumber()) + instance.putAdditionalProperty( + entry.getKey(), entry.getValue().getAsNumber()); + else if (entry.getValue().getAsJsonPrimitive().isBoolean()) + instance.putAdditionalProperty( + entry.getKey(), + entry.getValue().getAsBoolean()); + else + throw new IllegalArgumentException( + String.format( + "The field `%s` has unknown primitive" + + " type. Value: %s", + entry.getKey(), + entry.getValue().toString())); + } else if (entry.getValue().isJsonArray()) { + instance.putAdditionalProperty( + entry.getKey(), + gson.fromJson(entry.getValue(), List.class)); + } else { // JSON object + instance.putAdditionalProperty( + entry.getKey(), + gson.fromJson(entry.getValue(), HashMap.class)); + } + } + } + return instance; + } + }.nullSafe(); + } + } + + /** + * Create an instance of DeleteConfigRequest given an JSON string + * + * @param jsonString JSON string + * @return An instance of DeleteConfigRequest + * @throws IOException if the JSON string is invalid with respect to DeleteConfigRequest + */ + public static DeleteConfigRequest fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, DeleteConfigRequest.class); + } + + /** + * Convert an instance of DeleteConfigRequest to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} diff --git a/sdks/java/src/main/java/com/thoughtspot/client/model/DeleteConnectionConfigurationRequest.java b/sdks/java/src/main/java/com/thoughtspot/client/model/DeleteConnectionConfigurationRequest.java new file mode 100644 index 000000000..436e9bf77 --- /dev/null +++ b/sdks/java/src/main/java/com/thoughtspot/client/model/DeleteConnectionConfigurationRequest.java @@ -0,0 +1,361 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client.model; + +import com.google.gson.Gson; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.TypeAdapter; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.annotations.SerializedName; +import com.google.gson.reflect.TypeToken; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import com.thoughtspot.client.JSON; +import java.io.IOException; +import java.io.Serializable; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Objects; + +/** DeleteConnectionConfigurationRequest */ +@javax.annotation.Generated( + value = "org.openapitools.codegen.languages.JavaClientCodegen", + comments = "Generator version: 7.12.0") +public class DeleteConnectionConfigurationRequest implements Serializable { + private static final long serialVersionUID = 1L; + + public static final String SERIALIZED_NAME_CONFIGURATION_IDENTIFIER = + "configuration_identifier"; + + @SerializedName(SERIALIZED_NAME_CONFIGURATION_IDENTIFIER) + @javax.annotation.Nonnull + private String configurationIdentifier; + + public static final String SERIALIZED_NAME_CONNECTION_IDENTIFIER = "connection_identifier"; + + @SerializedName(SERIALIZED_NAME_CONNECTION_IDENTIFIER) + @javax.annotation.Nonnull + private String connectionIdentifier; + + public DeleteConnectionConfigurationRequest() {} + + public DeleteConnectionConfigurationRequest configurationIdentifier( + @javax.annotation.Nonnull String configurationIdentifier) { + this.configurationIdentifier = configurationIdentifier; + return this; + } + + /** + * Unique ID or name of the configuration. + * + * @return configurationIdentifier + */ + @javax.annotation.Nonnull + public String getConfigurationIdentifier() { + return configurationIdentifier; + } + + public void setConfigurationIdentifier( + @javax.annotation.Nonnull String configurationIdentifier) { + this.configurationIdentifier = configurationIdentifier; + } + + public DeleteConnectionConfigurationRequest connectionIdentifier( + @javax.annotation.Nonnull String connectionIdentifier) { + this.connectionIdentifier = connectionIdentifier; + return this; + } + + /** + * Unique ID or name of the connection. + * + * @return connectionIdentifier + */ + @javax.annotation.Nonnull + public String getConnectionIdentifier() { + return connectionIdentifier; + } + + public void setConnectionIdentifier(@javax.annotation.Nonnull String connectionIdentifier) { + this.connectionIdentifier = connectionIdentifier; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key name of the property + * @param value value of the property + * @return the DeleteConnectionConfigurationRequest instance itself + */ + public DeleteConnectionConfigurationRequest putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return a map of objects + */ + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key name of the property + * @return an object + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + DeleteConnectionConfigurationRequest deleteConnectionConfigurationRequest = + (DeleteConnectionConfigurationRequest) o; + return Objects.equals( + this.configurationIdentifier, + deleteConnectionConfigurationRequest.configurationIdentifier) + && Objects.equals( + this.connectionIdentifier, + deleteConnectionConfigurationRequest.connectionIdentifier) + && Objects.equals( + this.additionalProperties, + deleteConnectionConfigurationRequest.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(configurationIdentifier, connectionIdentifier, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class DeleteConnectionConfigurationRequest {\n"); + sb.append(" configurationIdentifier: ") + .append(toIndentedString(configurationIdentifier)) + .append("\n"); + sb.append(" connectionIdentifier: ") + .append(toIndentedString(connectionIdentifier)) + .append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first + * line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("configuration_identifier"); + openapiFields.add("connection_identifier"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + openapiRequiredFields.add("configuration_identifier"); + openapiRequiredFields.add("connection_identifier"); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to + * DeleteConnectionConfigurationRequest + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!DeleteConnectionConfigurationRequest.openapiRequiredFields + .isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException( + String.format( + "The required field(s) %s in DeleteConnectionConfigurationRequest" + + " is not found in the empty JSON string", + DeleteConnectionConfigurationRequest.openapiRequiredFields + .toString())); + } + } + + // check to make sure all required properties/fields are present in the JSON string + for (String requiredField : DeleteConnectionConfigurationRequest.openapiRequiredFields) { + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException( + String.format( + "The required field `%s` is not found in the JSON string: %s", + requiredField, jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if (!jsonObj.get("configuration_identifier").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `configuration_identifier` to be a primitive type" + + " in the JSON string but got `%s`", + jsonObj.get("configuration_identifier").toString())); + } + if (!jsonObj.get("connection_identifier").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `connection_identifier` to be a primitive type in" + + " the JSON string but got `%s`", + jsonObj.get("connection_identifier").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!DeleteConnectionConfigurationRequest.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'DeleteConnectionConfigurationRequest' + // and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter = + gson.getDelegateAdapter( + this, TypeToken.get(DeleteConnectionConfigurationRequest.class)); + + return (TypeAdapter) + new TypeAdapter() { + @Override + public void write( + JsonWriter out, DeleteConnectionConfigurationRequest value) + throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + obj.remove("additionalProperties"); + // serialize additional properties + if (value.getAdditionalProperties() != null) { + for (Map.Entry entry : + value.getAdditionalProperties().entrySet()) { + if (entry.getValue() instanceof String) + obj.addProperty(entry.getKey(), (String) entry.getValue()); + else if (entry.getValue() instanceof Number) + obj.addProperty(entry.getKey(), (Number) entry.getValue()); + else if (entry.getValue() instanceof Boolean) + obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); + else if (entry.getValue() instanceof Character) + obj.addProperty( + entry.getKey(), (Character) entry.getValue()); + else { + JsonElement jsonElement = gson.toJsonTree(entry.getValue()); + if (jsonElement.isJsonArray()) { + obj.add(entry.getKey(), jsonElement.getAsJsonArray()); + } else { + obj.add(entry.getKey(), jsonElement.getAsJsonObject()); + } + } + } + } + elementAdapter.write(out, obj); + } + + @Override + public DeleteConnectionConfigurationRequest read(JsonReader in) + throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // store additional fields in the deserialized instance + DeleteConnectionConfigurationRequest instance = + thisAdapter.fromJsonTree(jsonObj); + for (Map.Entry entry : jsonObj.entrySet()) { + if (!openapiFields.contains(entry.getKey())) { + if (entry.getValue().isJsonPrimitive()) { // primitive type + if (entry.getValue().getAsJsonPrimitive().isString()) + instance.putAdditionalProperty( + entry.getKey(), entry.getValue().getAsString()); + else if (entry.getValue().getAsJsonPrimitive().isNumber()) + instance.putAdditionalProperty( + entry.getKey(), entry.getValue().getAsNumber()); + else if (entry.getValue().getAsJsonPrimitive().isBoolean()) + instance.putAdditionalProperty( + entry.getKey(), + entry.getValue().getAsBoolean()); + else + throw new IllegalArgumentException( + String.format( + "The field `%s` has unknown primitive" + + " type. Value: %s", + entry.getKey(), + entry.getValue().toString())); + } else if (entry.getValue().isJsonArray()) { + instance.putAdditionalProperty( + entry.getKey(), + gson.fromJson(entry.getValue(), List.class)); + } else { // JSON object + instance.putAdditionalProperty( + entry.getKey(), + gson.fromJson(entry.getValue(), HashMap.class)); + } + } + } + return instance; + } + }.nullSafe(); + } + } + + /** + * Create an instance of DeleteConnectionConfigurationRequest given an JSON string + * + * @param jsonString JSON string + * @return An instance of DeleteConnectionConfigurationRequest + * @throws IOException if the JSON string is invalid with respect to + * DeleteConnectionConfigurationRequest + */ + public static DeleteConnectionConfigurationRequest fromJson(String jsonString) + throws IOException { + return JSON.getGson().fromJson(jsonString, DeleteConnectionConfigurationRequest.class); + } + + /** + * Convert an instance of DeleteConnectionConfigurationRequest to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} diff --git a/sdks/java/src/main/java/com/thoughtspot/client/model/DeleteConnectionRequest.java b/sdks/java/src/main/java/com/thoughtspot/client/model/DeleteConnectionRequest.java new file mode 100644 index 000000000..83f2a9f7b --- /dev/null +++ b/sdks/java/src/main/java/com/thoughtspot/client/model/DeleteConnectionRequest.java @@ -0,0 +1,307 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client.model; + +import com.google.gson.Gson; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.TypeAdapter; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.annotations.SerializedName; +import com.google.gson.reflect.TypeToken; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import com.thoughtspot.client.JSON; +import java.io.IOException; +import java.io.Serializable; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Objects; + +/** DeleteConnectionRequest */ +@javax.annotation.Generated( + value = "org.openapitools.codegen.languages.JavaClientCodegen", + comments = "Generator version: 7.12.0") +public class DeleteConnectionRequest implements Serializable { + private static final long serialVersionUID = 1L; + + public static final String SERIALIZED_NAME_CONNECTION_IDENTIFIER = "connection_identifier"; + + @SerializedName(SERIALIZED_NAME_CONNECTION_IDENTIFIER) + @javax.annotation.Nonnull + private String connectionIdentifier; + + public DeleteConnectionRequest() {} + + public DeleteConnectionRequest connectionIdentifier( + @javax.annotation.Nonnull String connectionIdentifier) { + this.connectionIdentifier = connectionIdentifier; + return this; + } + + /** + * Unique ID or name of the connection. + * + * @return connectionIdentifier + */ + @javax.annotation.Nonnull + public String getConnectionIdentifier() { + return connectionIdentifier; + } + + public void setConnectionIdentifier(@javax.annotation.Nonnull String connectionIdentifier) { + this.connectionIdentifier = connectionIdentifier; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key name of the property + * @param value value of the property + * @return the DeleteConnectionRequest instance itself + */ + public DeleteConnectionRequest putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return a map of objects + */ + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key name of the property + * @return an object + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + DeleteConnectionRequest deleteConnectionRequest = (DeleteConnectionRequest) o; + return Objects.equals( + this.connectionIdentifier, deleteConnectionRequest.connectionIdentifier) + && Objects.equals( + this.additionalProperties, deleteConnectionRequest.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(connectionIdentifier, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class DeleteConnectionRequest {\n"); + sb.append(" connectionIdentifier: ") + .append(toIndentedString(connectionIdentifier)) + .append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first + * line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("connection_identifier"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + openapiRequiredFields.add("connection_identifier"); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to DeleteConnectionRequest + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!DeleteConnectionRequest.openapiRequiredFields + .isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException( + String.format( + "The required field(s) %s in DeleteConnectionRequest is not found" + + " in the empty JSON string", + DeleteConnectionRequest.openapiRequiredFields.toString())); + } + } + + // check to make sure all required properties/fields are present in the JSON string + for (String requiredField : DeleteConnectionRequest.openapiRequiredFields) { + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException( + String.format( + "The required field `%s` is not found in the JSON string: %s", + requiredField, jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if (!jsonObj.get("connection_identifier").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `connection_identifier` to be a primitive type in" + + " the JSON string but got `%s`", + jsonObj.get("connection_identifier").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!DeleteConnectionRequest.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'DeleteConnectionRequest' and its + // subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter = + gson.getDelegateAdapter(this, TypeToken.get(DeleteConnectionRequest.class)); + + return (TypeAdapter) + new TypeAdapter() { + @Override + public void write(JsonWriter out, DeleteConnectionRequest value) + throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + obj.remove("additionalProperties"); + // serialize additional properties + if (value.getAdditionalProperties() != null) { + for (Map.Entry entry : + value.getAdditionalProperties().entrySet()) { + if (entry.getValue() instanceof String) + obj.addProperty(entry.getKey(), (String) entry.getValue()); + else if (entry.getValue() instanceof Number) + obj.addProperty(entry.getKey(), (Number) entry.getValue()); + else if (entry.getValue() instanceof Boolean) + obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); + else if (entry.getValue() instanceof Character) + obj.addProperty( + entry.getKey(), (Character) entry.getValue()); + else { + JsonElement jsonElement = gson.toJsonTree(entry.getValue()); + if (jsonElement.isJsonArray()) { + obj.add(entry.getKey(), jsonElement.getAsJsonArray()); + } else { + obj.add(entry.getKey(), jsonElement.getAsJsonObject()); + } + } + } + } + elementAdapter.write(out, obj); + } + + @Override + public DeleteConnectionRequest read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // store additional fields in the deserialized instance + DeleteConnectionRequest instance = thisAdapter.fromJsonTree(jsonObj); + for (Map.Entry entry : jsonObj.entrySet()) { + if (!openapiFields.contains(entry.getKey())) { + if (entry.getValue().isJsonPrimitive()) { // primitive type + if (entry.getValue().getAsJsonPrimitive().isString()) + instance.putAdditionalProperty( + entry.getKey(), entry.getValue().getAsString()); + else if (entry.getValue().getAsJsonPrimitive().isNumber()) + instance.putAdditionalProperty( + entry.getKey(), entry.getValue().getAsNumber()); + else if (entry.getValue().getAsJsonPrimitive().isBoolean()) + instance.putAdditionalProperty( + entry.getKey(), + entry.getValue().getAsBoolean()); + else + throw new IllegalArgumentException( + String.format( + "The field `%s` has unknown primitive" + + " type. Value: %s", + entry.getKey(), + entry.getValue().toString())); + } else if (entry.getValue().isJsonArray()) { + instance.putAdditionalProperty( + entry.getKey(), + gson.fromJson(entry.getValue(), List.class)); + } else { // JSON object + instance.putAdditionalProperty( + entry.getKey(), + gson.fromJson(entry.getValue(), HashMap.class)); + } + } + } + return instance; + } + }.nullSafe(); + } + } + + /** + * Create an instance of DeleteConnectionRequest given an JSON string + * + * @param jsonString JSON string + * @return An instance of DeleteConnectionRequest + * @throws IOException if the JSON string is invalid with respect to DeleteConnectionRequest + */ + public static DeleteConnectionRequest fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, DeleteConnectionRequest.class); + } + + /** + * Convert an instance of DeleteConnectionRequest to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} diff --git a/sdks/java/src/main/java/com/thoughtspot/client/model/DeleteMetadataRequest.java b/sdks/java/src/main/java/com/thoughtspot/client/model/DeleteMetadataRequest.java new file mode 100644 index 000000000..660cae1dc --- /dev/null +++ b/sdks/java/src/main/java/com/thoughtspot/client/model/DeleteMetadataRequest.java @@ -0,0 +1,371 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client.model; + +import com.google.gson.Gson; +import com.google.gson.JsonArray; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.TypeAdapter; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.annotations.SerializedName; +import com.google.gson.reflect.TypeToken; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import com.thoughtspot.client.JSON; +import java.io.IOException; +import java.io.Serializable; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Objects; +import org.openapitools.jackson.nullable.JsonNullable; + +/** DeleteMetadataRequest */ +@javax.annotation.Generated( + value = "org.openapitools.codegen.languages.JavaClientCodegen", + comments = "Generator version: 7.12.0") +public class DeleteMetadataRequest implements Serializable { + private static final long serialVersionUID = 1L; + + public static final String SERIALIZED_NAME_METADATA = "metadata"; + + @SerializedName(SERIALIZED_NAME_METADATA) + @javax.annotation.Nonnull + private List metadata; + + public static final String SERIALIZED_NAME_DELETE_DISABLED_OBJECTS = "delete_disabled_objects"; + + @SerializedName(SERIALIZED_NAME_DELETE_DISABLED_OBJECTS) + @javax.annotation.Nullable + private Boolean deleteDisabledObjects = false; + + public DeleteMetadataRequest() {} + + public DeleteMetadataRequest metadata( + @javax.annotation.Nonnull List metadata) { + this.metadata = metadata; + return this; + } + + public DeleteMetadataRequest addMetadataItem(DeleteMetadataTypeInput metadataItem) { + if (this.metadata == null) { + this.metadata = new ArrayList<>(); + } + this.metadata.add(metadataItem); + return this; + } + + /** + * Metadata objects. + * + * @return metadata + */ + @javax.annotation.Nonnull + public List getMetadata() { + return metadata; + } + + public void setMetadata(@javax.annotation.Nonnull List metadata) { + this.metadata = metadata; + } + + public DeleteMetadataRequest deleteDisabledObjects( + @javax.annotation.Nullable Boolean deleteDisabledObjects) { + this.deleteDisabledObjects = deleteDisabledObjects; + return this; + } + + /** + * Indicates whether to delete disabled metadata objects. + * + * @return deleteDisabledObjects + */ + @javax.annotation.Nullable + public Boolean getDeleteDisabledObjects() { + return deleteDisabledObjects; + } + + public void setDeleteDisabledObjects(@javax.annotation.Nullable Boolean deleteDisabledObjects) { + this.deleteDisabledObjects = deleteDisabledObjects; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key name of the property + * @param value value of the property + * @return the DeleteMetadataRequest instance itself + */ + public DeleteMetadataRequest putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return a map of objects + */ + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key name of the property + * @return an object + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + DeleteMetadataRequest deleteMetadataRequest = (DeleteMetadataRequest) o; + return Objects.equals(this.metadata, deleteMetadataRequest.metadata) + && Objects.equals( + this.deleteDisabledObjects, deleteMetadataRequest.deleteDisabledObjects) + && Objects.equals( + this.additionalProperties, deleteMetadataRequest.additionalProperties); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b + || (a != null + && b != null + && a.isPresent() + && b.isPresent() + && Objects.deepEquals(a.get(), b.get())); + } + + @Override + public int hashCode() { + return Objects.hash(metadata, deleteDisabledObjects, additionalProperties); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; + } + return a.isPresent() ? Arrays.deepHashCode(new Object[] {a.get()}) : 31; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class DeleteMetadataRequest {\n"); + sb.append(" metadata: ").append(toIndentedString(metadata)).append("\n"); + sb.append(" deleteDisabledObjects: ") + .append(toIndentedString(deleteDisabledObjects)) + .append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first + * line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("metadata"); + openapiFields.add("delete_disabled_objects"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + openapiRequiredFields.add("metadata"); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to DeleteMetadataRequest + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!DeleteMetadataRequest.openapiRequiredFields + .isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException( + String.format( + "The required field(s) %s in DeleteMetadataRequest is not found in" + + " the empty JSON string", + DeleteMetadataRequest.openapiRequiredFields.toString())); + } + } + + // check to make sure all required properties/fields are present in the JSON string + for (String requiredField : DeleteMetadataRequest.openapiRequiredFields) { + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException( + String.format( + "The required field `%s` is not found in the JSON string: %s", + requiredField, jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // ensure the json data is an array + if (!jsonObj.get("metadata").isJsonArray()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `metadata` to be an array in the JSON string but" + + " got `%s`", + jsonObj.get("metadata").toString())); + } + + JsonArray jsonArraymetadata = jsonObj.getAsJsonArray("metadata"); + // validate the required field `metadata` (array) + for (int i = 0; i < jsonArraymetadata.size(); i++) { + DeleteMetadataTypeInput.validateJsonElement(jsonArraymetadata.get(i)); + } + ; + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!DeleteMetadataRequest.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'DeleteMetadataRequest' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter = + gson.getDelegateAdapter(this, TypeToken.get(DeleteMetadataRequest.class)); + + return (TypeAdapter) + new TypeAdapter() { + @Override + public void write(JsonWriter out, DeleteMetadataRequest value) + throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + obj.remove("additionalProperties"); + // serialize additional properties + if (value.getAdditionalProperties() != null) { + for (Map.Entry entry : + value.getAdditionalProperties().entrySet()) { + if (entry.getValue() instanceof String) + obj.addProperty(entry.getKey(), (String) entry.getValue()); + else if (entry.getValue() instanceof Number) + obj.addProperty(entry.getKey(), (Number) entry.getValue()); + else if (entry.getValue() instanceof Boolean) + obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); + else if (entry.getValue() instanceof Character) + obj.addProperty( + entry.getKey(), (Character) entry.getValue()); + else { + JsonElement jsonElement = gson.toJsonTree(entry.getValue()); + if (jsonElement.isJsonArray()) { + obj.add(entry.getKey(), jsonElement.getAsJsonArray()); + } else { + obj.add(entry.getKey(), jsonElement.getAsJsonObject()); + } + } + } + } + elementAdapter.write(out, obj); + } + + @Override + public DeleteMetadataRequest read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // store additional fields in the deserialized instance + DeleteMetadataRequest instance = thisAdapter.fromJsonTree(jsonObj); + for (Map.Entry entry : jsonObj.entrySet()) { + if (!openapiFields.contains(entry.getKey())) { + if (entry.getValue().isJsonPrimitive()) { // primitive type + if (entry.getValue().getAsJsonPrimitive().isString()) + instance.putAdditionalProperty( + entry.getKey(), entry.getValue().getAsString()); + else if (entry.getValue().getAsJsonPrimitive().isNumber()) + instance.putAdditionalProperty( + entry.getKey(), entry.getValue().getAsNumber()); + else if (entry.getValue().getAsJsonPrimitive().isBoolean()) + instance.putAdditionalProperty( + entry.getKey(), + entry.getValue().getAsBoolean()); + else + throw new IllegalArgumentException( + String.format( + "The field `%s` has unknown primitive" + + " type. Value: %s", + entry.getKey(), + entry.getValue().toString())); + } else if (entry.getValue().isJsonArray()) { + instance.putAdditionalProperty( + entry.getKey(), + gson.fromJson(entry.getValue(), List.class)); + } else { // JSON object + instance.putAdditionalProperty( + entry.getKey(), + gson.fromJson(entry.getValue(), HashMap.class)); + } + } + } + return instance; + } + }.nullSafe(); + } + } + + /** + * Create an instance of DeleteMetadataRequest given an JSON string + * + * @param jsonString JSON string + * @return An instance of DeleteMetadataRequest + * @throws IOException if the JSON string is invalid with respect to DeleteMetadataRequest + */ + public static DeleteMetadataRequest fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, DeleteMetadataRequest.class); + } + + /** + * Convert an instance of DeleteMetadataRequest to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} diff --git a/sdks/java/src/main/java/com/thoughtspot/client/model/DeleteMetadataTypeInput.java b/sdks/java/src/main/java/com/thoughtspot/client/model/DeleteMetadataTypeInput.java new file mode 100644 index 000000000..cb13ddf95 --- /dev/null +++ b/sdks/java/src/main/java/com/thoughtspot/client/model/DeleteMetadataTypeInput.java @@ -0,0 +1,423 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client.model; + +import com.google.gson.Gson; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.TypeAdapter; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.reflect.TypeToken; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import com.thoughtspot.client.JSON; +import java.io.IOException; +import java.io.Serializable; +import java.util.Arrays; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Objects; +import org.openapitools.jackson.nullable.JsonNullable; + +/** MetadataType InputType used in Delete MetadataType API */ +@javax.annotation.Generated( + value = "org.openapitools.codegen.languages.JavaClientCodegen", + comments = "Generator version: 7.12.0") +public class DeleteMetadataTypeInput implements Serializable { + private static final long serialVersionUID = 1L; + + /** + * Type of metadata. Required if the name of the object is set as the identifier. This attribute + * is optional when the object GUID is specified as the identifier. + */ + @JsonAdapter(TypeEnum.Adapter.class) + public enum TypeEnum { + LIVEBOARD("LIVEBOARD"), + + ANSWER("ANSWER"), + + LOGICAL_TABLE("LOGICAL_TABLE"), + + LOGICAL_COLUMN("LOGICAL_COLUMN"), + + LOGICAL_RELATIONSHIP("LOGICAL_RELATIONSHIP"); + + private String value; + + TypeEnum(String value) { + this.value = value; + } + + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + public static TypeEnum fromValue(String value) { + for (TypeEnum b : TypeEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + return null; + } + + public static class Adapter extends TypeAdapter { + @Override + public void write(final JsonWriter jsonWriter, final TypeEnum enumeration) + throws IOException { + jsonWriter.value(enumeration.getValue()); + } + + @Override + public TypeEnum read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + return TypeEnum.fromValue(value); + } + } + + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + String value = jsonElement.getAsString(); + TypeEnum.fromValue(value); + } + } + + public static final String SERIALIZED_NAME_TYPE = "type"; + + @SerializedName(SERIALIZED_NAME_TYPE) + @javax.annotation.Nullable + private TypeEnum type; + + public static final String SERIALIZED_NAME_IDENTIFIER = "identifier"; + + @SerializedName(SERIALIZED_NAME_IDENTIFIER) + @javax.annotation.Nonnull + private String identifier; + + public DeleteMetadataTypeInput() {} + + public DeleteMetadataTypeInput type(@javax.annotation.Nullable TypeEnum type) { + this.type = type; + return this; + } + + /** + * Type of metadata. Required if the name of the object is set as the identifier. This attribute + * is optional when the object GUID is specified as the identifier. + * + * @return type + */ + @javax.annotation.Nullable + public TypeEnum getType() { + return type; + } + + public void setType(@javax.annotation.Nullable TypeEnum type) { + this.type = type; + } + + public DeleteMetadataTypeInput identifier(@javax.annotation.Nonnull String identifier) { + this.identifier = identifier; + return this; + } + + /** + * Unique ID or name of the metadata object. + * + * @return identifier + */ + @javax.annotation.Nonnull + public String getIdentifier() { + return identifier; + } + + public void setIdentifier(@javax.annotation.Nonnull String identifier) { + this.identifier = identifier; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key name of the property + * @param value value of the property + * @return the DeleteMetadataTypeInput instance itself + */ + public DeleteMetadataTypeInput putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return a map of objects + */ + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key name of the property + * @return an object + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + DeleteMetadataTypeInput deleteMetadataTypeInput = (DeleteMetadataTypeInput) o; + return Objects.equals(this.type, deleteMetadataTypeInput.type) + && Objects.equals(this.identifier, deleteMetadataTypeInput.identifier) + && Objects.equals( + this.additionalProperties, deleteMetadataTypeInput.additionalProperties); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b + || (a != null + && b != null + && a.isPresent() + && b.isPresent() + && Objects.deepEquals(a.get(), b.get())); + } + + @Override + public int hashCode() { + return Objects.hash(type, identifier, additionalProperties); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; + } + return a.isPresent() ? Arrays.deepHashCode(new Object[] {a.get()}) : 31; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class DeleteMetadataTypeInput {\n"); + sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append(" identifier: ").append(toIndentedString(identifier)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first + * line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("type"); + openapiFields.add("identifier"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + openapiRequiredFields.add("identifier"); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to DeleteMetadataTypeInput + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!DeleteMetadataTypeInput.openapiRequiredFields + .isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException( + String.format( + "The required field(s) %s in DeleteMetadataTypeInput is not found" + + " in the empty JSON string", + DeleteMetadataTypeInput.openapiRequiredFields.toString())); + } + } + + // check to make sure all required properties/fields are present in the JSON string + for (String requiredField : DeleteMetadataTypeInput.openapiRequiredFields) { + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException( + String.format( + "The required field `%s` is not found in the JSON string: %s", + requiredField, jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if ((jsonObj.get("type") != null && !jsonObj.get("type").isJsonNull()) + && !jsonObj.get("type").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `type` to be a primitive type in the JSON string" + + " but got `%s`", + jsonObj.get("type").toString())); + } + // validate the optional field `type` + if (jsonObj.get("type") != null && !jsonObj.get("type").isJsonNull()) { + TypeEnum.validateJsonElement(jsonObj.get("type")); + } + if (!jsonObj.get("identifier").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `identifier` to be a primitive type in the JSON" + + " string but got `%s`", + jsonObj.get("identifier").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!DeleteMetadataTypeInput.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'DeleteMetadataTypeInput' and its + // subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter = + gson.getDelegateAdapter(this, TypeToken.get(DeleteMetadataTypeInput.class)); + + return (TypeAdapter) + new TypeAdapter() { + @Override + public void write(JsonWriter out, DeleteMetadataTypeInput value) + throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + obj.remove("additionalProperties"); + // serialize additional properties + if (value.getAdditionalProperties() != null) { + for (Map.Entry entry : + value.getAdditionalProperties().entrySet()) { + if (entry.getValue() instanceof String) + obj.addProperty(entry.getKey(), (String) entry.getValue()); + else if (entry.getValue() instanceof Number) + obj.addProperty(entry.getKey(), (Number) entry.getValue()); + else if (entry.getValue() instanceof Boolean) + obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); + else if (entry.getValue() instanceof Character) + obj.addProperty( + entry.getKey(), (Character) entry.getValue()); + else { + JsonElement jsonElement = gson.toJsonTree(entry.getValue()); + if (jsonElement.isJsonArray()) { + obj.add(entry.getKey(), jsonElement.getAsJsonArray()); + } else { + obj.add(entry.getKey(), jsonElement.getAsJsonObject()); + } + } + } + } + elementAdapter.write(out, obj); + } + + @Override + public DeleteMetadataTypeInput read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // store additional fields in the deserialized instance + DeleteMetadataTypeInput instance = thisAdapter.fromJsonTree(jsonObj); + for (Map.Entry entry : jsonObj.entrySet()) { + if (!openapiFields.contains(entry.getKey())) { + if (entry.getValue().isJsonPrimitive()) { // primitive type + if (entry.getValue().getAsJsonPrimitive().isString()) + instance.putAdditionalProperty( + entry.getKey(), entry.getValue().getAsString()); + else if (entry.getValue().getAsJsonPrimitive().isNumber()) + instance.putAdditionalProperty( + entry.getKey(), entry.getValue().getAsNumber()); + else if (entry.getValue().getAsJsonPrimitive().isBoolean()) + instance.putAdditionalProperty( + entry.getKey(), + entry.getValue().getAsBoolean()); + else + throw new IllegalArgumentException( + String.format( + "The field `%s` has unknown primitive" + + " type. Value: %s", + entry.getKey(), + entry.getValue().toString())); + } else if (entry.getValue().isJsonArray()) { + instance.putAdditionalProperty( + entry.getKey(), + gson.fromJson(entry.getValue(), List.class)); + } else { // JSON object + instance.putAdditionalProperty( + entry.getKey(), + gson.fromJson(entry.getValue(), HashMap.class)); + } + } + } + return instance; + } + }.nullSafe(); + } + } + + /** + * Create an instance of DeleteMetadataTypeInput given an JSON string + * + * @param jsonString JSON string + * @return An instance of DeleteMetadataTypeInput + * @throws IOException if the JSON string is invalid with respect to DeleteMetadataTypeInput + */ + public static DeleteMetadataTypeInput fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, DeleteMetadataTypeInput.class); + } + + /** + * Convert an instance of DeleteMetadataTypeInput to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} diff --git a/sdks/java/src/main/java/com/thoughtspot/client/model/DeleteOrgEmailCustomizationRequest.java b/sdks/java/src/main/java/com/thoughtspot/client/model/DeleteOrgEmailCustomizationRequest.java new file mode 100644 index 000000000..63c0a378f --- /dev/null +++ b/sdks/java/src/main/java/com/thoughtspot/client/model/DeleteOrgEmailCustomizationRequest.java @@ -0,0 +1,315 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client.model; + +import com.google.gson.Gson; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.TypeAdapter; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.annotations.SerializedName; +import com.google.gson.reflect.TypeToken; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import com.thoughtspot.client.JSON; +import java.io.IOException; +import java.io.Serializable; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Objects; + +/** DeleteOrgEmailCustomizationRequest */ +@javax.annotation.Generated( + value = "org.openapitools.codegen.languages.JavaClientCodegen", + comments = "Generator version: 7.12.0") +public class DeleteOrgEmailCustomizationRequest implements Serializable { + private static final long serialVersionUID = 1L; + + public static final String SERIALIZED_NAME_ORG_IDENTIFIERS = "org_identifiers"; + + @SerializedName(SERIALIZED_NAME_ORG_IDENTIFIERS) + @javax.annotation.Nullable + private List orgIdentifiers; + + public DeleteOrgEmailCustomizationRequest() {} + + public DeleteOrgEmailCustomizationRequest orgIdentifiers( + @javax.annotation.Nullable List orgIdentifiers) { + this.orgIdentifiers = orgIdentifiers; + return this; + } + + public DeleteOrgEmailCustomizationRequest addOrgIdentifiersItem(String orgIdentifiersItem) { + if (this.orgIdentifiers == null) { + this.orgIdentifiers = new ArrayList<>(); + } + this.orgIdentifiers.add(orgIdentifiersItem); + return this; + } + + /** + * Unique identifier of the organization. + * + * @return orgIdentifiers + */ + @javax.annotation.Nullable + public List getOrgIdentifiers() { + return orgIdentifiers; + } + + public void setOrgIdentifiers(@javax.annotation.Nullable List orgIdentifiers) { + this.orgIdentifiers = orgIdentifiers; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key name of the property + * @param value value of the property + * @return the DeleteOrgEmailCustomizationRequest instance itself + */ + public DeleteOrgEmailCustomizationRequest putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return a map of objects + */ + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key name of the property + * @return an object + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + DeleteOrgEmailCustomizationRequest deleteOrgEmailCustomizationRequest = + (DeleteOrgEmailCustomizationRequest) o; + return Objects.equals( + this.orgIdentifiers, deleteOrgEmailCustomizationRequest.orgIdentifiers) + && Objects.equals( + this.additionalProperties, + deleteOrgEmailCustomizationRequest.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(orgIdentifiers, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class DeleteOrgEmailCustomizationRequest {\n"); + sb.append(" orgIdentifiers: ").append(toIndentedString(orgIdentifiers)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first + * line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("org_identifiers"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to + * DeleteOrgEmailCustomizationRequest + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!DeleteOrgEmailCustomizationRequest.openapiRequiredFields + .isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException( + String.format( + "The required field(s) %s in DeleteOrgEmailCustomizationRequest is" + + " not found in the empty JSON string", + DeleteOrgEmailCustomizationRequest.openapiRequiredFields + .toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // ensure the optional json data is an array if present + if (jsonObj.get("org_identifiers") != null + && !jsonObj.get("org_identifiers").isJsonNull() + && !jsonObj.get("org_identifiers").isJsonArray()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `org_identifiers` to be an array in the JSON" + + " string but got `%s`", + jsonObj.get("org_identifiers").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!DeleteOrgEmailCustomizationRequest.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'DeleteOrgEmailCustomizationRequest' and + // its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter = + gson.getDelegateAdapter( + this, TypeToken.get(DeleteOrgEmailCustomizationRequest.class)); + + return (TypeAdapter) + new TypeAdapter() { + @Override + public void write(JsonWriter out, DeleteOrgEmailCustomizationRequest value) + throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + obj.remove("additionalProperties"); + // serialize additional properties + if (value.getAdditionalProperties() != null) { + for (Map.Entry entry : + value.getAdditionalProperties().entrySet()) { + if (entry.getValue() instanceof String) + obj.addProperty(entry.getKey(), (String) entry.getValue()); + else if (entry.getValue() instanceof Number) + obj.addProperty(entry.getKey(), (Number) entry.getValue()); + else if (entry.getValue() instanceof Boolean) + obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); + else if (entry.getValue() instanceof Character) + obj.addProperty( + entry.getKey(), (Character) entry.getValue()); + else { + JsonElement jsonElement = gson.toJsonTree(entry.getValue()); + if (jsonElement.isJsonArray()) { + obj.add(entry.getKey(), jsonElement.getAsJsonArray()); + } else { + obj.add(entry.getKey(), jsonElement.getAsJsonObject()); + } + } + } + } + elementAdapter.write(out, obj); + } + + @Override + public DeleteOrgEmailCustomizationRequest read(JsonReader in) + throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // store additional fields in the deserialized instance + DeleteOrgEmailCustomizationRequest instance = + thisAdapter.fromJsonTree(jsonObj); + for (Map.Entry entry : jsonObj.entrySet()) { + if (!openapiFields.contains(entry.getKey())) { + if (entry.getValue().isJsonPrimitive()) { // primitive type + if (entry.getValue().getAsJsonPrimitive().isString()) + instance.putAdditionalProperty( + entry.getKey(), entry.getValue().getAsString()); + else if (entry.getValue().getAsJsonPrimitive().isNumber()) + instance.putAdditionalProperty( + entry.getKey(), entry.getValue().getAsNumber()); + else if (entry.getValue().getAsJsonPrimitive().isBoolean()) + instance.putAdditionalProperty( + entry.getKey(), + entry.getValue().getAsBoolean()); + else + throw new IllegalArgumentException( + String.format( + "The field `%s` has unknown primitive" + + " type. Value: %s", + entry.getKey(), + entry.getValue().toString())); + } else if (entry.getValue().isJsonArray()) { + instance.putAdditionalProperty( + entry.getKey(), + gson.fromJson(entry.getValue(), List.class)); + } else { // JSON object + instance.putAdditionalProperty( + entry.getKey(), + gson.fromJson(entry.getValue(), HashMap.class)); + } + } + } + return instance; + } + }.nullSafe(); + } + } + + /** + * Create an instance of DeleteOrgEmailCustomizationRequest given an JSON string + * + * @param jsonString JSON string + * @return An instance of DeleteOrgEmailCustomizationRequest + * @throws IOException if the JSON string is invalid with respect to + * DeleteOrgEmailCustomizationRequest + */ + public static DeleteOrgEmailCustomizationRequest fromJson(String jsonString) + throws IOException { + return JSON.getGson().fromJson(jsonString, DeleteOrgEmailCustomizationRequest.class); + } + + /** + * Convert an instance of DeleteOrgEmailCustomizationRequest to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} diff --git a/sdks/java/src/main/java/com/thoughtspot/client/model/DeleteVariablesRequest.java b/sdks/java/src/main/java/com/thoughtspot/client/model/DeleteVariablesRequest.java new file mode 100644 index 000000000..4d762bbb0 --- /dev/null +++ b/sdks/java/src/main/java/com/thoughtspot/client/model/DeleteVariablesRequest.java @@ -0,0 +1,316 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client.model; + +import com.google.gson.Gson; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.TypeAdapter; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.annotations.SerializedName; +import com.google.gson.reflect.TypeToken; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import com.thoughtspot.client.JSON; +import java.io.IOException; +import java.io.Serializable; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Objects; + +/** DeleteVariablesRequest */ +@javax.annotation.Generated( + value = "org.openapitools.codegen.languages.JavaClientCodegen", + comments = "Generator version: 7.12.0") +public class DeleteVariablesRequest implements Serializable { + private static final long serialVersionUID = 1L; + + public static final String SERIALIZED_NAME_IDENTIFIERS = "identifiers"; + + @SerializedName(SERIALIZED_NAME_IDENTIFIERS) + @javax.annotation.Nonnull + private List identifiers; + + public DeleteVariablesRequest() {} + + public DeleteVariablesRequest identifiers(@javax.annotation.Nonnull List identifiers) { + this.identifiers = identifiers; + return this; + } + + public DeleteVariablesRequest addIdentifiersItem(String identifiersItem) { + if (this.identifiers == null) { + this.identifiers = new ArrayList<>(); + } + this.identifiers.add(identifiersItem); + return this; + } + + /** + * Unique id(s) or name(s) of the variable(s) to delete + * + * @return identifiers + */ + @javax.annotation.Nonnull + public List getIdentifiers() { + return identifiers; + } + + public void setIdentifiers(@javax.annotation.Nonnull List identifiers) { + this.identifiers = identifiers; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key name of the property + * @param value value of the property + * @return the DeleteVariablesRequest instance itself + */ + public DeleteVariablesRequest putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return a map of objects + */ + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key name of the property + * @return an object + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + DeleteVariablesRequest deleteVariablesRequest = (DeleteVariablesRequest) o; + return Objects.equals(this.identifiers, deleteVariablesRequest.identifiers) + && Objects.equals( + this.additionalProperties, deleteVariablesRequest.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(identifiers, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class DeleteVariablesRequest {\n"); + sb.append(" identifiers: ").append(toIndentedString(identifiers)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first + * line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("identifiers"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + openapiRequiredFields.add("identifiers"); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to DeleteVariablesRequest + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!DeleteVariablesRequest.openapiRequiredFields + .isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException( + String.format( + "The required field(s) %s in DeleteVariablesRequest is not found" + + " in the empty JSON string", + DeleteVariablesRequest.openapiRequiredFields.toString())); + } + } + + // check to make sure all required properties/fields are present in the JSON string + for (String requiredField : DeleteVariablesRequest.openapiRequiredFields) { + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException( + String.format( + "The required field `%s` is not found in the JSON string: %s", + requiredField, jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // ensure the required json array is present + if (jsonObj.get("identifiers") == null) { + throw new IllegalArgumentException( + "Expected the field `linkedContent` to be an array in the JSON string but got" + + " `null`"); + } else if (!jsonObj.get("identifiers").isJsonArray()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `identifiers` to be an array in the JSON string" + + " but got `%s`", + jsonObj.get("identifiers").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!DeleteVariablesRequest.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'DeleteVariablesRequest' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter = + gson.getDelegateAdapter(this, TypeToken.get(DeleteVariablesRequest.class)); + + return (TypeAdapter) + new TypeAdapter() { + @Override + public void write(JsonWriter out, DeleteVariablesRequest value) + throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + obj.remove("additionalProperties"); + // serialize additional properties + if (value.getAdditionalProperties() != null) { + for (Map.Entry entry : + value.getAdditionalProperties().entrySet()) { + if (entry.getValue() instanceof String) + obj.addProperty(entry.getKey(), (String) entry.getValue()); + else if (entry.getValue() instanceof Number) + obj.addProperty(entry.getKey(), (Number) entry.getValue()); + else if (entry.getValue() instanceof Boolean) + obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); + else if (entry.getValue() instanceof Character) + obj.addProperty( + entry.getKey(), (Character) entry.getValue()); + else { + JsonElement jsonElement = gson.toJsonTree(entry.getValue()); + if (jsonElement.isJsonArray()) { + obj.add(entry.getKey(), jsonElement.getAsJsonArray()); + } else { + obj.add(entry.getKey(), jsonElement.getAsJsonObject()); + } + } + } + } + elementAdapter.write(out, obj); + } + + @Override + public DeleteVariablesRequest read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // store additional fields in the deserialized instance + DeleteVariablesRequest instance = thisAdapter.fromJsonTree(jsonObj); + for (Map.Entry entry : jsonObj.entrySet()) { + if (!openapiFields.contains(entry.getKey())) { + if (entry.getValue().isJsonPrimitive()) { // primitive type + if (entry.getValue().getAsJsonPrimitive().isString()) + instance.putAdditionalProperty( + entry.getKey(), entry.getValue().getAsString()); + else if (entry.getValue().getAsJsonPrimitive().isNumber()) + instance.putAdditionalProperty( + entry.getKey(), entry.getValue().getAsNumber()); + else if (entry.getValue().getAsJsonPrimitive().isBoolean()) + instance.putAdditionalProperty( + entry.getKey(), + entry.getValue().getAsBoolean()); + else + throw new IllegalArgumentException( + String.format( + "The field `%s` has unknown primitive" + + " type. Value: %s", + entry.getKey(), + entry.getValue().toString())); + } else if (entry.getValue().isJsonArray()) { + instance.putAdditionalProperty( + entry.getKey(), + gson.fromJson(entry.getValue(), List.class)); + } else { // JSON object + instance.putAdditionalProperty( + entry.getKey(), + gson.fromJson(entry.getValue(), HashMap.class)); + } + } + } + return instance; + } + }.nullSafe(); + } + } + + /** + * Create an instance of DeleteVariablesRequest given an JSON string + * + * @param jsonString JSON string + * @return An instance of DeleteVariablesRequest + * @throws IOException if the JSON string is invalid with respect to DeleteVariablesRequest + */ + public static DeleteVariablesRequest fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, DeleteVariablesRequest.class); + } + + /** + * Convert an instance of DeleteVariablesRequest to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} diff --git a/sdks/java/src/main/java/com/thoughtspot/client/model/DeleteWebhookConfigurationsRequest.java b/sdks/java/src/main/java/com/thoughtspot/client/model/DeleteWebhookConfigurationsRequest.java new file mode 100644 index 000000000..f030216c9 --- /dev/null +++ b/sdks/java/src/main/java/com/thoughtspot/client/model/DeleteWebhookConfigurationsRequest.java @@ -0,0 +1,332 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client.model; + +import com.google.gson.Gson; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.TypeAdapter; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.annotations.SerializedName; +import com.google.gson.reflect.TypeToken; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import com.thoughtspot.client.JSON; +import java.io.IOException; +import java.io.Serializable; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Objects; + +/** DeleteWebhookConfigurationsRequest */ +@javax.annotation.Generated( + value = "org.openapitools.codegen.languages.JavaClientCodegen", + comments = "Generator version: 7.12.0") +public class DeleteWebhookConfigurationsRequest implements Serializable { + private static final long serialVersionUID = 1L; + + public static final String SERIALIZED_NAME_WEBHOOK_IDENTIFIERS = "webhook_identifiers"; + + @SerializedName(SERIALIZED_NAME_WEBHOOK_IDENTIFIERS) + @javax.annotation.Nonnull + private List webhookIdentifiers; + + public DeleteWebhookConfigurationsRequest() {} + + public DeleteWebhookConfigurationsRequest webhookIdentifiers( + @javax.annotation.Nonnull List webhookIdentifiers) { + this.webhookIdentifiers = webhookIdentifiers; + return this; + } + + public DeleteWebhookConfigurationsRequest addWebhookIdentifiersItem( + String webhookIdentifiersItem) { + if (this.webhookIdentifiers == null) { + this.webhookIdentifiers = new ArrayList<>(); + } + this.webhookIdentifiers.add(webhookIdentifiersItem); + return this; + } + + /** + * List of webhook identifiers to delete. + * + * @return webhookIdentifiers + */ + @javax.annotation.Nonnull + public List getWebhookIdentifiers() { + return webhookIdentifiers; + } + + public void setWebhookIdentifiers(@javax.annotation.Nonnull List webhookIdentifiers) { + this.webhookIdentifiers = webhookIdentifiers; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key name of the property + * @param value value of the property + * @return the DeleteWebhookConfigurationsRequest instance itself + */ + public DeleteWebhookConfigurationsRequest putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return a map of objects + */ + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key name of the property + * @return an object + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + DeleteWebhookConfigurationsRequest deleteWebhookConfigurationsRequest = + (DeleteWebhookConfigurationsRequest) o; + return Objects.equals( + this.webhookIdentifiers, + deleteWebhookConfigurationsRequest.webhookIdentifiers) + && Objects.equals( + this.additionalProperties, + deleteWebhookConfigurationsRequest.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(webhookIdentifiers, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class DeleteWebhookConfigurationsRequest {\n"); + sb.append(" webhookIdentifiers: ") + .append(toIndentedString(webhookIdentifiers)) + .append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first + * line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("webhook_identifiers"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + openapiRequiredFields.add("webhook_identifiers"); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to + * DeleteWebhookConfigurationsRequest + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!DeleteWebhookConfigurationsRequest.openapiRequiredFields + .isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException( + String.format( + "The required field(s) %s in DeleteWebhookConfigurationsRequest is" + + " not found in the empty JSON string", + DeleteWebhookConfigurationsRequest.openapiRequiredFields + .toString())); + } + } + + // check to make sure all required properties/fields are present in the JSON string + for (String requiredField : DeleteWebhookConfigurationsRequest.openapiRequiredFields) { + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException( + String.format( + "The required field `%s` is not found in the JSON string: %s", + requiredField, jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // ensure the required json array is present + if (jsonObj.get("webhook_identifiers") == null) { + throw new IllegalArgumentException( + "Expected the field `linkedContent` to be an array in the JSON string but got" + + " `null`"); + } else if (!jsonObj.get("webhook_identifiers").isJsonArray()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `webhook_identifiers` to be an array in the JSON" + + " string but got `%s`", + jsonObj.get("webhook_identifiers").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!DeleteWebhookConfigurationsRequest.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'DeleteWebhookConfigurationsRequest' and + // its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter = + gson.getDelegateAdapter( + this, TypeToken.get(DeleteWebhookConfigurationsRequest.class)); + + return (TypeAdapter) + new TypeAdapter() { + @Override + public void write(JsonWriter out, DeleteWebhookConfigurationsRequest value) + throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + obj.remove("additionalProperties"); + // serialize additional properties + if (value.getAdditionalProperties() != null) { + for (Map.Entry entry : + value.getAdditionalProperties().entrySet()) { + if (entry.getValue() instanceof String) + obj.addProperty(entry.getKey(), (String) entry.getValue()); + else if (entry.getValue() instanceof Number) + obj.addProperty(entry.getKey(), (Number) entry.getValue()); + else if (entry.getValue() instanceof Boolean) + obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); + else if (entry.getValue() instanceof Character) + obj.addProperty( + entry.getKey(), (Character) entry.getValue()); + else { + JsonElement jsonElement = gson.toJsonTree(entry.getValue()); + if (jsonElement.isJsonArray()) { + obj.add(entry.getKey(), jsonElement.getAsJsonArray()); + } else { + obj.add(entry.getKey(), jsonElement.getAsJsonObject()); + } + } + } + } + elementAdapter.write(out, obj); + } + + @Override + public DeleteWebhookConfigurationsRequest read(JsonReader in) + throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // store additional fields in the deserialized instance + DeleteWebhookConfigurationsRequest instance = + thisAdapter.fromJsonTree(jsonObj); + for (Map.Entry entry : jsonObj.entrySet()) { + if (!openapiFields.contains(entry.getKey())) { + if (entry.getValue().isJsonPrimitive()) { // primitive type + if (entry.getValue().getAsJsonPrimitive().isString()) + instance.putAdditionalProperty( + entry.getKey(), entry.getValue().getAsString()); + else if (entry.getValue().getAsJsonPrimitive().isNumber()) + instance.putAdditionalProperty( + entry.getKey(), entry.getValue().getAsNumber()); + else if (entry.getValue().getAsJsonPrimitive().isBoolean()) + instance.putAdditionalProperty( + entry.getKey(), + entry.getValue().getAsBoolean()); + else + throw new IllegalArgumentException( + String.format( + "The field `%s` has unknown primitive" + + " type. Value: %s", + entry.getKey(), + entry.getValue().toString())); + } else if (entry.getValue().isJsonArray()) { + instance.putAdditionalProperty( + entry.getKey(), + gson.fromJson(entry.getValue(), List.class)); + } else { // JSON object + instance.putAdditionalProperty( + entry.getKey(), + gson.fromJson(entry.getValue(), HashMap.class)); + } + } + } + return instance; + } + }.nullSafe(); + } + } + + /** + * Create an instance of DeleteWebhookConfigurationsRequest given an JSON string + * + * @param jsonString JSON string + * @return An instance of DeleteWebhookConfigurationsRequest + * @throws IOException if the JSON string is invalid with respect to + * DeleteWebhookConfigurationsRequest + */ + public static DeleteWebhookConfigurationsRequest fromJson(String jsonString) + throws IOException { + return JSON.getGson().fromJson(jsonString, DeleteWebhookConfigurationsRequest.class); + } + + /** + * Convert an instance of DeleteWebhookConfigurationsRequest to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} diff --git a/sdks/java/src/main/java/com/thoughtspot/client/model/DeployCommitRequest.java b/sdks/java/src/main/java/com/thoughtspot/client/model/DeployCommitRequest.java new file mode 100644 index 000000000..ff323797e --- /dev/null +++ b/sdks/java/src/main/java/com/thoughtspot/client/model/DeployCommitRequest.java @@ -0,0 +1,535 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client.model; + +import com.google.gson.Gson; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.TypeAdapter; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.reflect.TypeToken; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import com.thoughtspot.client.JSON; +import java.io.IOException; +import java.io.Serializable; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Objects; + +/** DeployCommitRequest */ +@javax.annotation.Generated( + value = "org.openapitools.codegen.languages.JavaClientCodegen", + comments = "Generator version: 7.12.0") +public class DeployCommitRequest implements Serializable { + private static final long serialVersionUID = 1L; + + public static final String SERIALIZED_NAME_COMMIT_ID = "commit_id"; + + @SerializedName(SERIALIZED_NAME_COMMIT_ID) + @javax.annotation.Nullable + private String commitId; + + public static final String SERIALIZED_NAME_BRANCH_NAME = "branch_name"; + + @SerializedName(SERIALIZED_NAME_BRANCH_NAME) + @javax.annotation.Nonnull + private String branchName; + + /** + * Indicates if all files or only modified file at specified commit point should be considered + */ + @JsonAdapter(DeployTypeEnum.Adapter.class) + public enum DeployTypeEnum { + FULL("FULL"), + + DELTA("DELTA"); + + private String value; + + DeployTypeEnum(String value) { + this.value = value; + } + + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + public static DeployTypeEnum fromValue(String value) { + for (DeployTypeEnum b : DeployTypeEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + + public static class Adapter extends TypeAdapter { + @Override + public void write(final JsonWriter jsonWriter, final DeployTypeEnum enumeration) + throws IOException { + jsonWriter.value(enumeration.getValue()); + } + + @Override + public DeployTypeEnum read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + return DeployTypeEnum.fromValue(value); + } + } + + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + String value = jsonElement.getAsString(); + DeployTypeEnum.fromValue(value); + } + } + + public static final String SERIALIZED_NAME_DEPLOY_TYPE = "deploy_type"; + + @SerializedName(SERIALIZED_NAME_DEPLOY_TYPE) + @javax.annotation.Nullable + private DeployTypeEnum deployType = DeployTypeEnum.DELTA; + + /** + * Define the policy to follow while importing TML in the ThoughtSpot environment. Use + * “ALL_OR_NONE” to cancel the deployment of all ThoughtSpot objects if at least one of them + * fails to import. Use “Partial” to import ThoughtSpot objects that validate successfully even + * if other objects in the same deploy operations fail to import. + */ + @JsonAdapter(DeployPolicyEnum.Adapter.class) + public enum DeployPolicyEnum { + ALL_OR_NONE("ALL_OR_NONE"), + + PARTIAL("PARTIAL"), + + VALIDATE_ONLY("VALIDATE_ONLY"); + + private String value; + + DeployPolicyEnum(String value) { + this.value = value; + } + + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + public static DeployPolicyEnum fromValue(String value) { + for (DeployPolicyEnum b : DeployPolicyEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + + public static class Adapter extends TypeAdapter { + @Override + public void write(final JsonWriter jsonWriter, final DeployPolicyEnum enumeration) + throws IOException { + jsonWriter.value(enumeration.getValue()); + } + + @Override + public DeployPolicyEnum read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + return DeployPolicyEnum.fromValue(value); + } + } + + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + String value = jsonElement.getAsString(); + DeployPolicyEnum.fromValue(value); + } + } + + public static final String SERIALIZED_NAME_DEPLOY_POLICY = "deploy_policy"; + + @SerializedName(SERIALIZED_NAME_DEPLOY_POLICY) + @javax.annotation.Nullable + private DeployPolicyEnum deployPolicy = DeployPolicyEnum.ALL_OR_NONE; + + public DeployCommitRequest() {} + + public DeployCommitRequest commitId(@javax.annotation.Nullable String commitId) { + this.commitId = commitId; + return this; + } + + /** + * Commit_id against which the files should be picked to deploy. Note: If no commit_id is + * specified, then the head of the branch is considered. + * + * @return commitId + */ + @javax.annotation.Nullable + public String getCommitId() { + return commitId; + } + + public void setCommitId(@javax.annotation.Nullable String commitId) { + this.commitId = commitId; + } + + public DeployCommitRequest branchName(@javax.annotation.Nonnull String branchName) { + this.branchName = branchName; + return this; + } + + /** + * Name of the remote branch where changes should be picked + * + * @return branchName + */ + @javax.annotation.Nonnull + public String getBranchName() { + return branchName; + } + + public void setBranchName(@javax.annotation.Nonnull String branchName) { + this.branchName = branchName; + } + + public DeployCommitRequest deployType(@javax.annotation.Nullable DeployTypeEnum deployType) { + this.deployType = deployType; + return this; + } + + /** + * Indicates if all files or only modified file at specified commit point should be considered + * + * @return deployType + */ + @javax.annotation.Nullable + public DeployTypeEnum getDeployType() { + return deployType; + } + + public void setDeployType(@javax.annotation.Nullable DeployTypeEnum deployType) { + this.deployType = deployType; + } + + public DeployCommitRequest deployPolicy( + @javax.annotation.Nullable DeployPolicyEnum deployPolicy) { + this.deployPolicy = deployPolicy; + return this; + } + + /** + * Define the policy to follow while importing TML in the ThoughtSpot environment. Use + * “ALL_OR_NONE” to cancel the deployment of all ThoughtSpot objects if at least one of them + * fails to import. Use “Partial” to import ThoughtSpot objects that validate successfully even + * if other objects in the same deploy operations fail to import. + * + * @return deployPolicy + */ + @javax.annotation.Nullable + public DeployPolicyEnum getDeployPolicy() { + return deployPolicy; + } + + public void setDeployPolicy(@javax.annotation.Nullable DeployPolicyEnum deployPolicy) { + this.deployPolicy = deployPolicy; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key name of the property + * @param value value of the property + * @return the DeployCommitRequest instance itself + */ + public DeployCommitRequest putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return a map of objects + */ + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key name of the property + * @return an object + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + DeployCommitRequest deployCommitRequest = (DeployCommitRequest) o; + return Objects.equals(this.commitId, deployCommitRequest.commitId) + && Objects.equals(this.branchName, deployCommitRequest.branchName) + && Objects.equals(this.deployType, deployCommitRequest.deployType) + && Objects.equals(this.deployPolicy, deployCommitRequest.deployPolicy) + && Objects.equals( + this.additionalProperties, deployCommitRequest.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(commitId, branchName, deployType, deployPolicy, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class DeployCommitRequest {\n"); + sb.append(" commitId: ").append(toIndentedString(commitId)).append("\n"); + sb.append(" branchName: ").append(toIndentedString(branchName)).append("\n"); + sb.append(" deployType: ").append(toIndentedString(deployType)).append("\n"); + sb.append(" deployPolicy: ").append(toIndentedString(deployPolicy)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first + * line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("commit_id"); + openapiFields.add("branch_name"); + openapiFields.add("deploy_type"); + openapiFields.add("deploy_policy"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + openapiRequiredFields.add("branch_name"); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to DeployCommitRequest + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!DeployCommitRequest.openapiRequiredFields + .isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException( + String.format( + "The required field(s) %s in DeployCommitRequest is not found in" + + " the empty JSON string", + DeployCommitRequest.openapiRequiredFields.toString())); + } + } + + // check to make sure all required properties/fields are present in the JSON string + for (String requiredField : DeployCommitRequest.openapiRequiredFields) { + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException( + String.format( + "The required field `%s` is not found in the JSON string: %s", + requiredField, jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if ((jsonObj.get("commit_id") != null && !jsonObj.get("commit_id").isJsonNull()) + && !jsonObj.get("commit_id").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `commit_id` to be a primitive type in the JSON" + + " string but got `%s`", + jsonObj.get("commit_id").toString())); + } + if (!jsonObj.get("branch_name").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `branch_name` to be a primitive type in the JSON" + + " string but got `%s`", + jsonObj.get("branch_name").toString())); + } + if ((jsonObj.get("deploy_type") != null && !jsonObj.get("deploy_type").isJsonNull()) + && !jsonObj.get("deploy_type").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `deploy_type` to be a primitive type in the JSON" + + " string but got `%s`", + jsonObj.get("deploy_type").toString())); + } + // validate the optional field `deploy_type` + if (jsonObj.get("deploy_type") != null && !jsonObj.get("deploy_type").isJsonNull()) { + DeployTypeEnum.validateJsonElement(jsonObj.get("deploy_type")); + } + if ((jsonObj.get("deploy_policy") != null && !jsonObj.get("deploy_policy").isJsonNull()) + && !jsonObj.get("deploy_policy").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `deploy_policy` to be a primitive type in the JSON" + + " string but got `%s`", + jsonObj.get("deploy_policy").toString())); + } + // validate the optional field `deploy_policy` + if (jsonObj.get("deploy_policy") != null && !jsonObj.get("deploy_policy").isJsonNull()) { + DeployPolicyEnum.validateJsonElement(jsonObj.get("deploy_policy")); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!DeployCommitRequest.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'DeployCommitRequest' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter = + gson.getDelegateAdapter(this, TypeToken.get(DeployCommitRequest.class)); + + return (TypeAdapter) + new TypeAdapter() { + @Override + public void write(JsonWriter out, DeployCommitRequest value) + throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + obj.remove("additionalProperties"); + // serialize additional properties + if (value.getAdditionalProperties() != null) { + for (Map.Entry entry : + value.getAdditionalProperties().entrySet()) { + if (entry.getValue() instanceof String) + obj.addProperty(entry.getKey(), (String) entry.getValue()); + else if (entry.getValue() instanceof Number) + obj.addProperty(entry.getKey(), (Number) entry.getValue()); + else if (entry.getValue() instanceof Boolean) + obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); + else if (entry.getValue() instanceof Character) + obj.addProperty( + entry.getKey(), (Character) entry.getValue()); + else { + JsonElement jsonElement = gson.toJsonTree(entry.getValue()); + if (jsonElement.isJsonArray()) { + obj.add(entry.getKey(), jsonElement.getAsJsonArray()); + } else { + obj.add(entry.getKey(), jsonElement.getAsJsonObject()); + } + } + } + } + elementAdapter.write(out, obj); + } + + @Override + public DeployCommitRequest read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // store additional fields in the deserialized instance + DeployCommitRequest instance = thisAdapter.fromJsonTree(jsonObj); + for (Map.Entry entry : jsonObj.entrySet()) { + if (!openapiFields.contains(entry.getKey())) { + if (entry.getValue().isJsonPrimitive()) { // primitive type + if (entry.getValue().getAsJsonPrimitive().isString()) + instance.putAdditionalProperty( + entry.getKey(), entry.getValue().getAsString()); + else if (entry.getValue().getAsJsonPrimitive().isNumber()) + instance.putAdditionalProperty( + entry.getKey(), entry.getValue().getAsNumber()); + else if (entry.getValue().getAsJsonPrimitive().isBoolean()) + instance.putAdditionalProperty( + entry.getKey(), + entry.getValue().getAsBoolean()); + else + throw new IllegalArgumentException( + String.format( + "The field `%s` has unknown primitive" + + " type. Value: %s", + entry.getKey(), + entry.getValue().toString())); + } else if (entry.getValue().isJsonArray()) { + instance.putAdditionalProperty( + entry.getKey(), + gson.fromJson(entry.getValue(), List.class)); + } else { // JSON object + instance.putAdditionalProperty( + entry.getKey(), + gson.fromJson(entry.getValue(), HashMap.class)); + } + } + } + return instance; + } + }.nullSafe(); + } + } + + /** + * Create an instance of DeployCommitRequest given an JSON string + * + * @param jsonString JSON string + * @return An instance of DeployCommitRequest + * @throws IOException if the JSON string is invalid with respect to DeployCommitRequest + */ + public static DeployCommitRequest fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, DeployCommitRequest.class); + } + + /** + * Convert an instance of DeployCommitRequest to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} diff --git a/sdks/java/src/main/java/com/thoughtspot/client/model/DeployResponse.java b/sdks/java/src/main/java/com/thoughtspot/client/model/DeployResponse.java new file mode 100644 index 000000000..9afb4861b --- /dev/null +++ b/sdks/java/src/main/java/com/thoughtspot/client/model/DeployResponse.java @@ -0,0 +1,458 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client.model; + +import com.google.gson.Gson; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.TypeAdapter; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.annotations.SerializedName; +import com.google.gson.reflect.TypeToken; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import com.thoughtspot.client.JSON; +import java.io.IOException; +import java.io.Serializable; +import java.util.Arrays; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Objects; +import org.openapitools.jackson.nullable.JsonNullable; + +/** DeployResponse */ +@javax.annotation.Generated( + value = "org.openapitools.codegen.languages.JavaClientCodegen", + comments = "Generator version: 7.12.0") +public class DeployResponse implements Serializable { + private static final long serialVersionUID = 1L; + + public static final String SERIALIZED_NAME_FILE_NAME = "file_name"; + + @SerializedName(SERIALIZED_NAME_FILE_NAME) + @javax.annotation.Nullable + private String fileName; + + public static final String SERIALIZED_NAME_METADATA_NAME = "metadata_name"; + + @SerializedName(SERIALIZED_NAME_METADATA_NAME) + @javax.annotation.Nullable + private String metadataName; + + public static final String SERIALIZED_NAME_METADATA_TYPE = "metadata_type"; + + @SerializedName(SERIALIZED_NAME_METADATA_TYPE) + @javax.annotation.Nullable + private String metadataType; + + public static final String SERIALIZED_NAME_STATUS_CODE = "status_code"; + + @SerializedName(SERIALIZED_NAME_STATUS_CODE) + @javax.annotation.Nullable + private String statusCode; + + public static final String SERIALIZED_NAME_STATUS_MESSAGE = "status_message"; + + @SerializedName(SERIALIZED_NAME_STATUS_MESSAGE) + @javax.annotation.Nullable + private String statusMessage; + + public DeployResponse() {} + + public DeployResponse fileName(@javax.annotation.Nullable String fileName) { + this.fileName = fileName; + return this; + } + + /** + * Name of the file deployed + * + * @return fileName + */ + @javax.annotation.Nullable + public String getFileName() { + return fileName; + } + + public void setFileName(@javax.annotation.Nullable String fileName) { + this.fileName = fileName; + } + + public DeployResponse metadataName(@javax.annotation.Nullable String metadataName) { + this.metadataName = metadataName; + return this; + } + + /** + * Name of the metadata object + * + * @return metadataName + */ + @javax.annotation.Nullable + public String getMetadataName() { + return metadataName; + } + + public void setMetadataName(@javax.annotation.Nullable String metadataName) { + this.metadataName = metadataName; + } + + public DeployResponse metadataType(@javax.annotation.Nullable String metadataType) { + this.metadataType = metadataType; + return this; + } + + /** + * Type of the metadata object + * + * @return metadataType + */ + @javax.annotation.Nullable + public String getMetadataType() { + return metadataType; + } + + public void setMetadataType(@javax.annotation.Nullable String metadataType) { + this.metadataType = metadataType; + } + + public DeployResponse statusCode(@javax.annotation.Nullable String statusCode) { + this.statusCode = statusCode; + return this; + } + + /** + * Indicates the status of deployment for the file + * + * @return statusCode + */ + @javax.annotation.Nullable + public String getStatusCode() { + return statusCode; + } + + public void setStatusCode(@javax.annotation.Nullable String statusCode) { + this.statusCode = statusCode; + } + + public DeployResponse statusMessage(@javax.annotation.Nullable String statusMessage) { + this.statusMessage = statusMessage; + return this; + } + + /** + * Any error or warning with the deployment + * + * @return statusMessage + */ + @javax.annotation.Nullable + public String getStatusMessage() { + return statusMessage; + } + + public void setStatusMessage(@javax.annotation.Nullable String statusMessage) { + this.statusMessage = statusMessage; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key name of the property + * @param value value of the property + * @return the DeployResponse instance itself + */ + public DeployResponse putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return a map of objects + */ + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key name of the property + * @return an object + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + DeployResponse deployResponse = (DeployResponse) o; + return Objects.equals(this.fileName, deployResponse.fileName) + && Objects.equals(this.metadataName, deployResponse.metadataName) + && Objects.equals(this.metadataType, deployResponse.metadataType) + && Objects.equals(this.statusCode, deployResponse.statusCode) + && Objects.equals(this.statusMessage, deployResponse.statusMessage) + && Objects.equals(this.additionalProperties, deployResponse.additionalProperties); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b + || (a != null + && b != null + && a.isPresent() + && b.isPresent() + && Objects.deepEquals(a.get(), b.get())); + } + + @Override + public int hashCode() { + return Objects.hash( + fileName, + metadataName, + metadataType, + statusCode, + statusMessage, + additionalProperties); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; + } + return a.isPresent() ? Arrays.deepHashCode(new Object[] {a.get()}) : 31; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class DeployResponse {\n"); + sb.append(" fileName: ").append(toIndentedString(fileName)).append("\n"); + sb.append(" metadataName: ").append(toIndentedString(metadataName)).append("\n"); + sb.append(" metadataType: ").append(toIndentedString(metadataType)).append("\n"); + sb.append(" statusCode: ").append(toIndentedString(statusCode)).append("\n"); + sb.append(" statusMessage: ").append(toIndentedString(statusMessage)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first + * line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("file_name"); + openapiFields.add("metadata_name"); + openapiFields.add("metadata_type"); + openapiFields.add("status_code"); + openapiFields.add("status_message"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to DeployResponse + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!DeployResponse.openapiRequiredFields + .isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException( + String.format( + "The required field(s) %s in DeployResponse is not found in the" + + " empty JSON string", + DeployResponse.openapiRequiredFields.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if ((jsonObj.get("file_name") != null && !jsonObj.get("file_name").isJsonNull()) + && !jsonObj.get("file_name").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `file_name` to be a primitive type in the JSON" + + " string but got `%s`", + jsonObj.get("file_name").toString())); + } + if ((jsonObj.get("metadata_name") != null && !jsonObj.get("metadata_name").isJsonNull()) + && !jsonObj.get("metadata_name").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `metadata_name` to be a primitive type in the JSON" + + " string but got `%s`", + jsonObj.get("metadata_name").toString())); + } + if ((jsonObj.get("metadata_type") != null && !jsonObj.get("metadata_type").isJsonNull()) + && !jsonObj.get("metadata_type").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `metadata_type` to be a primitive type in the JSON" + + " string but got `%s`", + jsonObj.get("metadata_type").toString())); + } + if ((jsonObj.get("status_code") != null && !jsonObj.get("status_code").isJsonNull()) + && !jsonObj.get("status_code").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `status_code` to be a primitive type in the JSON" + + " string but got `%s`", + jsonObj.get("status_code").toString())); + } + if ((jsonObj.get("status_message") != null && !jsonObj.get("status_message").isJsonNull()) + && !jsonObj.get("status_message").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `status_message` to be a primitive type in the" + + " JSON string but got `%s`", + jsonObj.get("status_message").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!DeployResponse.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'DeployResponse' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter = + gson.getDelegateAdapter(this, TypeToken.get(DeployResponse.class)); + + return (TypeAdapter) + new TypeAdapter() { + @Override + public void write(JsonWriter out, DeployResponse value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + obj.remove("additionalProperties"); + // serialize additional properties + if (value.getAdditionalProperties() != null) { + for (Map.Entry entry : + value.getAdditionalProperties().entrySet()) { + if (entry.getValue() instanceof String) + obj.addProperty(entry.getKey(), (String) entry.getValue()); + else if (entry.getValue() instanceof Number) + obj.addProperty(entry.getKey(), (Number) entry.getValue()); + else if (entry.getValue() instanceof Boolean) + obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); + else if (entry.getValue() instanceof Character) + obj.addProperty( + entry.getKey(), (Character) entry.getValue()); + else { + JsonElement jsonElement = gson.toJsonTree(entry.getValue()); + if (jsonElement.isJsonArray()) { + obj.add(entry.getKey(), jsonElement.getAsJsonArray()); + } else { + obj.add(entry.getKey(), jsonElement.getAsJsonObject()); + } + } + } + } + elementAdapter.write(out, obj); + } + + @Override + public DeployResponse read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // store additional fields in the deserialized instance + DeployResponse instance = thisAdapter.fromJsonTree(jsonObj); + for (Map.Entry entry : jsonObj.entrySet()) { + if (!openapiFields.contains(entry.getKey())) { + if (entry.getValue().isJsonPrimitive()) { // primitive type + if (entry.getValue().getAsJsonPrimitive().isString()) + instance.putAdditionalProperty( + entry.getKey(), entry.getValue().getAsString()); + else if (entry.getValue().getAsJsonPrimitive().isNumber()) + instance.putAdditionalProperty( + entry.getKey(), entry.getValue().getAsNumber()); + else if (entry.getValue().getAsJsonPrimitive().isBoolean()) + instance.putAdditionalProperty( + entry.getKey(), + entry.getValue().getAsBoolean()); + else + throw new IllegalArgumentException( + String.format( + "The field `%s` has unknown primitive" + + " type. Value: %s", + entry.getKey(), + entry.getValue().toString())); + } else if (entry.getValue().isJsonArray()) { + instance.putAdditionalProperty( + entry.getKey(), + gson.fromJson(entry.getValue(), List.class)); + } else { // JSON object + instance.putAdditionalProperty( + entry.getKey(), + gson.fromJson(entry.getValue(), HashMap.class)); + } + } + } + return instance; + } + }.nullSafe(); + } + } + + /** + * Create an instance of DeployResponse given an JSON string + * + * @param jsonString JSON string + * @return An instance of DeployResponse + * @throws IOException if the JSON string is invalid with respect to DeployResponse + */ + public static DeployResponse fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, DeployResponse.class); + } + + /** + * Convert an instance of DeployResponse to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} diff --git a/sdks/java/src/main/java/com/thoughtspot/client/model/EntityHeader.java b/sdks/java/src/main/java/com/thoughtspot/client/model/EntityHeader.java new file mode 100644 index 000000000..fe97c4799 --- /dev/null +++ b/sdks/java/src/main/java/com/thoughtspot/client/model/EntityHeader.java @@ -0,0 +1,386 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client.model; + +import com.google.gson.Gson; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.TypeAdapter; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.annotations.SerializedName; +import com.google.gson.reflect.TypeToken; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import com.thoughtspot.client.JSON; +import java.io.IOException; +import java.io.Serializable; +import java.util.Arrays; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Objects; +import org.openapitools.jackson.nullable.JsonNullable; + +/** EntityHeader */ +@javax.annotation.Generated( + value = "org.openapitools.codegen.languages.JavaClientCodegen", + comments = "Generator version: 7.12.0") +public class EntityHeader implements Serializable { + private static final long serialVersionUID = 1L; + + public static final String SERIALIZED_NAME_DESCRIPTION = "description"; + + @SerializedName(SERIALIZED_NAME_DESCRIPTION) + @javax.annotation.Nullable + private String description; + + public static final String SERIALIZED_NAME_DATA_SOURCE_NAME = "data_source_name"; + + @SerializedName(SERIALIZED_NAME_DATA_SOURCE_NAME) + @javax.annotation.Nullable + private String dataSourceName; + + public static final String SERIALIZED_NAME_DATA_SOURCE_IDENTIFIER = "data_source_identifier"; + + @SerializedName(SERIALIZED_NAME_DATA_SOURCE_IDENTIFIER) + @javax.annotation.Nullable + private String dataSourceIdentifier; + + public EntityHeader() {} + + public EntityHeader description(@javax.annotation.Nullable String description) { + this.description = description; + return this; + } + + /** + * Description of the data source. + * + * @return description + */ + @javax.annotation.Nullable + public String getDescription() { + return description; + } + + public void setDescription(@javax.annotation.Nullable String description) { + this.description = description; + } + + public EntityHeader dataSourceName(@javax.annotation.Nullable String dataSourceName) { + this.dataSourceName = dataSourceName; + return this; + } + + /** + * Display name of the data source. + * + * @return dataSourceName + */ + @javax.annotation.Nullable + public String getDataSourceName() { + return dataSourceName; + } + + public void setDataSourceName(@javax.annotation.Nullable String dataSourceName) { + this.dataSourceName = dataSourceName; + } + + public EntityHeader dataSourceIdentifier( + @javax.annotation.Nullable String dataSourceIdentifier) { + this.dataSourceIdentifier = dataSourceIdentifier; + return this; + } + + /** + * Unique identifier of the data source. + * + * @return dataSourceIdentifier + */ + @javax.annotation.Nullable + public String getDataSourceIdentifier() { + return dataSourceIdentifier; + } + + public void setDataSourceIdentifier(@javax.annotation.Nullable String dataSourceIdentifier) { + this.dataSourceIdentifier = dataSourceIdentifier; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key name of the property + * @param value value of the property + * @return the EntityHeader instance itself + */ + public EntityHeader putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return a map of objects + */ + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key name of the property + * @return an object + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + EntityHeader entityHeader = (EntityHeader) o; + return Objects.equals(this.description, entityHeader.description) + && Objects.equals(this.dataSourceName, entityHeader.dataSourceName) + && Objects.equals(this.dataSourceIdentifier, entityHeader.dataSourceIdentifier) + && Objects.equals(this.additionalProperties, entityHeader.additionalProperties); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b + || (a != null + && b != null + && a.isPresent() + && b.isPresent() + && Objects.deepEquals(a.get(), b.get())); + } + + @Override + public int hashCode() { + return Objects.hash( + description, dataSourceName, dataSourceIdentifier, additionalProperties); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; + } + return a.isPresent() ? Arrays.deepHashCode(new Object[] {a.get()}) : 31; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class EntityHeader {\n"); + sb.append(" description: ").append(toIndentedString(description)).append("\n"); + sb.append(" dataSourceName: ").append(toIndentedString(dataSourceName)).append("\n"); + sb.append(" dataSourceIdentifier: ") + .append(toIndentedString(dataSourceIdentifier)) + .append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first + * line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("description"); + openapiFields.add("data_source_name"); + openapiFields.add("data_source_identifier"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to EntityHeader + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!EntityHeader.openapiRequiredFields + .isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException( + String.format( + "The required field(s) %s in EntityHeader is not found in the" + + " empty JSON string", + EntityHeader.openapiRequiredFields.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if ((jsonObj.get("description") != null && !jsonObj.get("description").isJsonNull()) + && !jsonObj.get("description").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `description` to be a primitive type in the JSON" + + " string but got `%s`", + jsonObj.get("description").toString())); + } + if ((jsonObj.get("data_source_name") != null + && !jsonObj.get("data_source_name").isJsonNull()) + && !jsonObj.get("data_source_name").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `data_source_name` to be a primitive type in the" + + " JSON string but got `%s`", + jsonObj.get("data_source_name").toString())); + } + if ((jsonObj.get("data_source_identifier") != null + && !jsonObj.get("data_source_identifier").isJsonNull()) + && !jsonObj.get("data_source_identifier").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `data_source_identifier` to be a primitive type in" + + " the JSON string but got `%s`", + jsonObj.get("data_source_identifier").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!EntityHeader.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'EntityHeader' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter = + gson.getDelegateAdapter(this, TypeToken.get(EntityHeader.class)); + + return (TypeAdapter) + new TypeAdapter() { + @Override + public void write(JsonWriter out, EntityHeader value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + obj.remove("additionalProperties"); + // serialize additional properties + if (value.getAdditionalProperties() != null) { + for (Map.Entry entry : + value.getAdditionalProperties().entrySet()) { + if (entry.getValue() instanceof String) + obj.addProperty(entry.getKey(), (String) entry.getValue()); + else if (entry.getValue() instanceof Number) + obj.addProperty(entry.getKey(), (Number) entry.getValue()); + else if (entry.getValue() instanceof Boolean) + obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); + else if (entry.getValue() instanceof Character) + obj.addProperty( + entry.getKey(), (Character) entry.getValue()); + else { + JsonElement jsonElement = gson.toJsonTree(entry.getValue()); + if (jsonElement.isJsonArray()) { + obj.add(entry.getKey(), jsonElement.getAsJsonArray()); + } else { + obj.add(entry.getKey(), jsonElement.getAsJsonObject()); + } + } + } + } + elementAdapter.write(out, obj); + } + + @Override + public EntityHeader read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // store additional fields in the deserialized instance + EntityHeader instance = thisAdapter.fromJsonTree(jsonObj); + for (Map.Entry entry : jsonObj.entrySet()) { + if (!openapiFields.contains(entry.getKey())) { + if (entry.getValue().isJsonPrimitive()) { // primitive type + if (entry.getValue().getAsJsonPrimitive().isString()) + instance.putAdditionalProperty( + entry.getKey(), entry.getValue().getAsString()); + else if (entry.getValue().getAsJsonPrimitive().isNumber()) + instance.putAdditionalProperty( + entry.getKey(), entry.getValue().getAsNumber()); + else if (entry.getValue().getAsJsonPrimitive().isBoolean()) + instance.putAdditionalProperty( + entry.getKey(), + entry.getValue().getAsBoolean()); + else + throw new IllegalArgumentException( + String.format( + "The field `%s` has unknown primitive" + + " type. Value: %s", + entry.getKey(), + entry.getValue().toString())); + } else if (entry.getValue().isJsonArray()) { + instance.putAdditionalProperty( + entry.getKey(), + gson.fromJson(entry.getValue(), List.class)); + } else { // JSON object + instance.putAdditionalProperty( + entry.getKey(), + gson.fromJson(entry.getValue(), HashMap.class)); + } + } + } + return instance; + } + }.nullSafe(); + } + } + + /** + * Create an instance of EntityHeader given an JSON string + * + * @param jsonString JSON string + * @return An instance of EntityHeader + * @throws IOException if the JSON string is invalid with respect to EntityHeader + */ + public static EntityHeader fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, EntityHeader.class); + } + + /** + * Convert an instance of EntityHeader to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} diff --git a/sdks/java/src/main/java/com/thoughtspot/client/model/ErrorResponse.java b/sdks/java/src/main/java/com/thoughtspot/client/model/ErrorResponse.java new file mode 100644 index 000000000..e5dfa8751 --- /dev/null +++ b/sdks/java/src/main/java/com/thoughtspot/client/model/ErrorResponse.java @@ -0,0 +1,300 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client.model; + +import com.google.gson.Gson; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.TypeAdapter; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.annotations.SerializedName; +import com.google.gson.reflect.TypeToken; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import com.thoughtspot.client.JSON; +import java.io.IOException; +import java.io.Serializable; +import java.util.Arrays; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Objects; +import org.openapitools.jackson.nullable.JsonNullable; + +/** ErrorResponse */ +@javax.annotation.Generated( + value = "org.openapitools.codegen.languages.JavaClientCodegen", + comments = "Generator version: 7.12.0") +public class ErrorResponse implements Serializable { + private static final long serialVersionUID = 1L; + + public static final String SERIALIZED_NAME_ERROR = "error"; + + @SerializedName(SERIALIZED_NAME_ERROR) + @javax.annotation.Nullable + private Object error; + + public ErrorResponse() {} + + public ErrorResponse error(@javax.annotation.Nullable Object error) { + this.error = error; + return this; + } + + /** + * Get error + * + * @return error + */ + @javax.annotation.Nullable + public Object getError() { + return error; + } + + public void setError(@javax.annotation.Nullable Object error) { + this.error = error; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key name of the property + * @param value value of the property + * @return the ErrorResponse instance itself + */ + public ErrorResponse putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return a map of objects + */ + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key name of the property + * @return an object + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ErrorResponse errorResponse = (ErrorResponse) o; + return Objects.equals(this.error, errorResponse.error) + && Objects.equals(this.additionalProperties, errorResponse.additionalProperties); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b + || (a != null + && b != null + && a.isPresent() + && b.isPresent() + && Objects.deepEquals(a.get(), b.get())); + } + + @Override + public int hashCode() { + return Objects.hash(error, additionalProperties); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; + } + return a.isPresent() ? Arrays.deepHashCode(new Object[] {a.get()}) : 31; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ErrorResponse {\n"); + sb.append(" error: ").append(toIndentedString(error)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first + * line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("error"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to ErrorResponse + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!ErrorResponse.openapiRequiredFields + .isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException( + String.format( + "The required field(s) %s in ErrorResponse is not found in the" + + " empty JSON string", + ErrorResponse.openapiRequiredFields.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!ErrorResponse.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'ErrorResponse' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter = + gson.getDelegateAdapter(this, TypeToken.get(ErrorResponse.class)); + + return (TypeAdapter) + new TypeAdapter() { + @Override + public void write(JsonWriter out, ErrorResponse value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + obj.remove("additionalProperties"); + // serialize additional properties + if (value.getAdditionalProperties() != null) { + for (Map.Entry entry : + value.getAdditionalProperties().entrySet()) { + if (entry.getValue() instanceof String) + obj.addProperty(entry.getKey(), (String) entry.getValue()); + else if (entry.getValue() instanceof Number) + obj.addProperty(entry.getKey(), (Number) entry.getValue()); + else if (entry.getValue() instanceof Boolean) + obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); + else if (entry.getValue() instanceof Character) + obj.addProperty( + entry.getKey(), (Character) entry.getValue()); + else { + JsonElement jsonElement = gson.toJsonTree(entry.getValue()); + if (jsonElement.isJsonArray()) { + obj.add(entry.getKey(), jsonElement.getAsJsonArray()); + } else { + obj.add(entry.getKey(), jsonElement.getAsJsonObject()); + } + } + } + } + elementAdapter.write(out, obj); + } + + @Override + public ErrorResponse read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // store additional fields in the deserialized instance + ErrorResponse instance = thisAdapter.fromJsonTree(jsonObj); + for (Map.Entry entry : jsonObj.entrySet()) { + if (!openapiFields.contains(entry.getKey())) { + if (entry.getValue().isJsonPrimitive()) { // primitive type + if (entry.getValue().getAsJsonPrimitive().isString()) + instance.putAdditionalProperty( + entry.getKey(), entry.getValue().getAsString()); + else if (entry.getValue().getAsJsonPrimitive().isNumber()) + instance.putAdditionalProperty( + entry.getKey(), entry.getValue().getAsNumber()); + else if (entry.getValue().getAsJsonPrimitive().isBoolean()) + instance.putAdditionalProperty( + entry.getKey(), + entry.getValue().getAsBoolean()); + else + throw new IllegalArgumentException( + String.format( + "The field `%s` has unknown primitive" + + " type. Value: %s", + entry.getKey(), + entry.getValue().toString())); + } else if (entry.getValue().isJsonArray()) { + instance.putAdditionalProperty( + entry.getKey(), + gson.fromJson(entry.getValue(), List.class)); + } else { // JSON object + instance.putAdditionalProperty( + entry.getKey(), + gson.fromJson(entry.getValue(), HashMap.class)); + } + } + } + return instance; + } + }.nullSafe(); + } + } + + /** + * Create an instance of ErrorResponse given an JSON string + * + * @param jsonString JSON string + * @return An instance of ErrorResponse + * @throws IOException if the JSON string is invalid with respect to ErrorResponse + */ + public static ErrorResponse fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, ErrorResponse.class); + } + + /** + * Convert an instance of ErrorResponse to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} diff --git a/sdks/java/src/main/java/com/thoughtspot/client/model/EurekaDataSourceSuggestionResponse.java b/sdks/java/src/main/java/com/thoughtspot/client/model/EurekaDataSourceSuggestionResponse.java new file mode 100644 index 000000000..46ea4e679 --- /dev/null +++ b/sdks/java/src/main/java/com/thoughtspot/client/model/EurekaDataSourceSuggestionResponse.java @@ -0,0 +1,342 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client.model; + +import com.google.gson.Gson; +import com.google.gson.JsonArray; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.TypeAdapter; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.annotations.SerializedName; +import com.google.gson.reflect.TypeToken; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import com.thoughtspot.client.JSON; +import java.io.IOException; +import java.io.Serializable; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Objects; +import org.openapitools.jackson.nullable.JsonNullable; + +/** EurekaDataSourceSuggestionResponse */ +@javax.annotation.Generated( + value = "org.openapitools.codegen.languages.JavaClientCodegen", + comments = "Generator version: 7.12.0") +public class EurekaDataSourceSuggestionResponse implements Serializable { + private static final long serialVersionUID = 1L; + + public static final String SERIALIZED_NAME_DATA_SOURCES = "data_sources"; + + @SerializedName(SERIALIZED_NAME_DATA_SOURCES) + @javax.annotation.Nullable + private List dataSources; + + public EurekaDataSourceSuggestionResponse() {} + + public EurekaDataSourceSuggestionResponse dataSources( + @javax.annotation.Nullable List dataSources) { + this.dataSources = dataSources; + return this; + } + + public EurekaDataSourceSuggestionResponse addDataSourcesItem(DataSource dataSourcesItem) { + if (this.dataSources == null) { + this.dataSources = new ArrayList<>(); + } + this.dataSources.add(dataSourcesItem); + return this; + } + + /** + * List of data sources suggested. + * + * @return dataSources + */ + @javax.annotation.Nullable + public List getDataSources() { + return dataSources; + } + + public void setDataSources(@javax.annotation.Nullable List dataSources) { + this.dataSources = dataSources; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key name of the property + * @param value value of the property + * @return the EurekaDataSourceSuggestionResponse instance itself + */ + public EurekaDataSourceSuggestionResponse putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return a map of objects + */ + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key name of the property + * @return an object + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + EurekaDataSourceSuggestionResponse eurekaDataSourceSuggestionResponse = + (EurekaDataSourceSuggestionResponse) o; + return Objects.equals(this.dataSources, eurekaDataSourceSuggestionResponse.dataSources) + && Objects.equals( + this.additionalProperties, + eurekaDataSourceSuggestionResponse.additionalProperties); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b + || (a != null + && b != null + && a.isPresent() + && b.isPresent() + && Objects.deepEquals(a.get(), b.get())); + } + + @Override + public int hashCode() { + return Objects.hash(dataSources, additionalProperties); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; + } + return a.isPresent() ? Arrays.deepHashCode(new Object[] {a.get()}) : 31; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class EurekaDataSourceSuggestionResponse {\n"); + sb.append(" dataSources: ").append(toIndentedString(dataSources)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first + * line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("data_sources"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to + * EurekaDataSourceSuggestionResponse + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!EurekaDataSourceSuggestionResponse.openapiRequiredFields + .isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException( + String.format( + "The required field(s) %s in EurekaDataSourceSuggestionResponse is" + + " not found in the empty JSON string", + EurekaDataSourceSuggestionResponse.openapiRequiredFields + .toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if (jsonObj.get("data_sources") != null && !jsonObj.get("data_sources").isJsonNull()) { + JsonArray jsonArraydataSources = jsonObj.getAsJsonArray("data_sources"); + if (jsonArraydataSources != null) { + // ensure the json data is an array + if (!jsonObj.get("data_sources").isJsonArray()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `data_sources` to be an array in the JSON" + + " string but got `%s`", + jsonObj.get("data_sources").toString())); + } + + // validate the optional field `data_sources` (array) + for (int i = 0; i < jsonArraydataSources.size(); i++) { + DataSource.validateJsonElement(jsonArraydataSources.get(i)); + } + ; + } + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!EurekaDataSourceSuggestionResponse.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'EurekaDataSourceSuggestionResponse' and + // its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter = + gson.getDelegateAdapter( + this, TypeToken.get(EurekaDataSourceSuggestionResponse.class)); + + return (TypeAdapter) + new TypeAdapter() { + @Override + public void write(JsonWriter out, EurekaDataSourceSuggestionResponse value) + throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + obj.remove("additionalProperties"); + // serialize additional properties + if (value.getAdditionalProperties() != null) { + for (Map.Entry entry : + value.getAdditionalProperties().entrySet()) { + if (entry.getValue() instanceof String) + obj.addProperty(entry.getKey(), (String) entry.getValue()); + else if (entry.getValue() instanceof Number) + obj.addProperty(entry.getKey(), (Number) entry.getValue()); + else if (entry.getValue() instanceof Boolean) + obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); + else if (entry.getValue() instanceof Character) + obj.addProperty( + entry.getKey(), (Character) entry.getValue()); + else { + JsonElement jsonElement = gson.toJsonTree(entry.getValue()); + if (jsonElement.isJsonArray()) { + obj.add(entry.getKey(), jsonElement.getAsJsonArray()); + } else { + obj.add(entry.getKey(), jsonElement.getAsJsonObject()); + } + } + } + } + elementAdapter.write(out, obj); + } + + @Override + public EurekaDataSourceSuggestionResponse read(JsonReader in) + throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // store additional fields in the deserialized instance + EurekaDataSourceSuggestionResponse instance = + thisAdapter.fromJsonTree(jsonObj); + for (Map.Entry entry : jsonObj.entrySet()) { + if (!openapiFields.contains(entry.getKey())) { + if (entry.getValue().isJsonPrimitive()) { // primitive type + if (entry.getValue().getAsJsonPrimitive().isString()) + instance.putAdditionalProperty( + entry.getKey(), entry.getValue().getAsString()); + else if (entry.getValue().getAsJsonPrimitive().isNumber()) + instance.putAdditionalProperty( + entry.getKey(), entry.getValue().getAsNumber()); + else if (entry.getValue().getAsJsonPrimitive().isBoolean()) + instance.putAdditionalProperty( + entry.getKey(), + entry.getValue().getAsBoolean()); + else + throw new IllegalArgumentException( + String.format( + "The field `%s` has unknown primitive" + + " type. Value: %s", + entry.getKey(), + entry.getValue().toString())); + } else if (entry.getValue().isJsonArray()) { + instance.putAdditionalProperty( + entry.getKey(), + gson.fromJson(entry.getValue(), List.class)); + } else { // JSON object + instance.putAdditionalProperty( + entry.getKey(), + gson.fromJson(entry.getValue(), HashMap.class)); + } + } + } + return instance; + } + }.nullSafe(); + } + } + + /** + * Create an instance of EurekaDataSourceSuggestionResponse given an JSON string + * + * @param jsonString JSON string + * @return An instance of EurekaDataSourceSuggestionResponse + * @throws IOException if the JSON string is invalid with respect to + * EurekaDataSourceSuggestionResponse + */ + public static EurekaDataSourceSuggestionResponse fromJson(String jsonString) + throws IOException { + return JSON.getGson().fromJson(jsonString, EurekaDataSourceSuggestionResponse.class); + } + + /** + * Convert an instance of EurekaDataSourceSuggestionResponse to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} diff --git a/sdks/java/src/main/java/com/thoughtspot/client/model/EurekaDecomposeQueryResponse.java b/sdks/java/src/main/java/com/thoughtspot/client/model/EurekaDecomposeQueryResponse.java new file mode 100644 index 000000000..b722a7e30 --- /dev/null +++ b/sdks/java/src/main/java/com/thoughtspot/client/model/EurekaDecomposeQueryResponse.java @@ -0,0 +1,304 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client.model; + +import com.google.gson.Gson; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.TypeAdapter; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.annotations.SerializedName; +import com.google.gson.reflect.TypeToken; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import com.thoughtspot.client.JSON; +import java.io.IOException; +import java.io.Serializable; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Objects; + +/** EurekaDecomposeQueryResponse */ +@javax.annotation.Generated( + value = "org.openapitools.codegen.languages.JavaClientCodegen", + comments = "Generator version: 7.12.0") +public class EurekaDecomposeQueryResponse implements Serializable { + private static final long serialVersionUID = 1L; + + public static final String SERIALIZED_NAME_DECOMPOSED_QUERY_RESPONSE = + "decomposedQueryResponse"; + + @SerializedName(SERIALIZED_NAME_DECOMPOSED_QUERY_RESPONSE) + @javax.annotation.Nullable + private EurekaLLMDecomposeQueryResponse decomposedQueryResponse; + + public EurekaDecomposeQueryResponse() {} + + public EurekaDecomposeQueryResponse decomposedQueryResponse( + @javax.annotation.Nullable EurekaLLMDecomposeQueryResponse decomposedQueryResponse) { + this.decomposedQueryResponse = decomposedQueryResponse; + return this; + } + + /** + * Get decomposedQueryResponse + * + * @return decomposedQueryResponse + */ + @javax.annotation.Nullable + public EurekaLLMDecomposeQueryResponse getDecomposedQueryResponse() { + return decomposedQueryResponse; + } + + public void setDecomposedQueryResponse( + @javax.annotation.Nullable EurekaLLMDecomposeQueryResponse decomposedQueryResponse) { + this.decomposedQueryResponse = decomposedQueryResponse; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key name of the property + * @param value value of the property + * @return the EurekaDecomposeQueryResponse instance itself + */ + public EurekaDecomposeQueryResponse putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return a map of objects + */ + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key name of the property + * @return an object + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + EurekaDecomposeQueryResponse eurekaDecomposeQueryResponse = + (EurekaDecomposeQueryResponse) o; + return Objects.equals( + this.decomposedQueryResponse, + eurekaDecomposeQueryResponse.decomposedQueryResponse) + && Objects.equals( + this.additionalProperties, + eurekaDecomposeQueryResponse.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(decomposedQueryResponse, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class EurekaDecomposeQueryResponse {\n"); + sb.append(" decomposedQueryResponse: ") + .append(toIndentedString(decomposedQueryResponse)) + .append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first + * line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("decomposedQueryResponse"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to + * EurekaDecomposeQueryResponse + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!EurekaDecomposeQueryResponse.openapiRequiredFields + .isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException( + String.format( + "The required field(s) %s in EurekaDecomposeQueryResponse is not" + + " found in the empty JSON string", + EurekaDecomposeQueryResponse.openapiRequiredFields.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // validate the optional field `decomposedQueryResponse` + if (jsonObj.get("decomposedQueryResponse") != null + && !jsonObj.get("decomposedQueryResponse").isJsonNull()) { + EurekaLLMDecomposeQueryResponse.validateJsonElement( + jsonObj.get("decomposedQueryResponse")); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!EurekaDecomposeQueryResponse.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'EurekaDecomposeQueryResponse' and its + // subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter = + gson.getDelegateAdapter( + this, TypeToken.get(EurekaDecomposeQueryResponse.class)); + + return (TypeAdapter) + new TypeAdapter() { + @Override + public void write(JsonWriter out, EurekaDecomposeQueryResponse value) + throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + obj.remove("additionalProperties"); + // serialize additional properties + if (value.getAdditionalProperties() != null) { + for (Map.Entry entry : + value.getAdditionalProperties().entrySet()) { + if (entry.getValue() instanceof String) + obj.addProperty(entry.getKey(), (String) entry.getValue()); + else if (entry.getValue() instanceof Number) + obj.addProperty(entry.getKey(), (Number) entry.getValue()); + else if (entry.getValue() instanceof Boolean) + obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); + else if (entry.getValue() instanceof Character) + obj.addProperty( + entry.getKey(), (Character) entry.getValue()); + else { + JsonElement jsonElement = gson.toJsonTree(entry.getValue()); + if (jsonElement.isJsonArray()) { + obj.add(entry.getKey(), jsonElement.getAsJsonArray()); + } else { + obj.add(entry.getKey(), jsonElement.getAsJsonObject()); + } + } + } + } + elementAdapter.write(out, obj); + } + + @Override + public EurekaDecomposeQueryResponse read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // store additional fields in the deserialized instance + EurekaDecomposeQueryResponse instance = + thisAdapter.fromJsonTree(jsonObj); + for (Map.Entry entry : jsonObj.entrySet()) { + if (!openapiFields.contains(entry.getKey())) { + if (entry.getValue().isJsonPrimitive()) { // primitive type + if (entry.getValue().getAsJsonPrimitive().isString()) + instance.putAdditionalProperty( + entry.getKey(), entry.getValue().getAsString()); + else if (entry.getValue().getAsJsonPrimitive().isNumber()) + instance.putAdditionalProperty( + entry.getKey(), entry.getValue().getAsNumber()); + else if (entry.getValue().getAsJsonPrimitive().isBoolean()) + instance.putAdditionalProperty( + entry.getKey(), + entry.getValue().getAsBoolean()); + else + throw new IllegalArgumentException( + String.format( + "The field `%s` has unknown primitive" + + " type. Value: %s", + entry.getKey(), + entry.getValue().toString())); + } else if (entry.getValue().isJsonArray()) { + instance.putAdditionalProperty( + entry.getKey(), + gson.fromJson(entry.getValue(), List.class)); + } else { // JSON object + instance.putAdditionalProperty( + entry.getKey(), + gson.fromJson(entry.getValue(), HashMap.class)); + } + } + } + return instance; + } + }.nullSafe(); + } + } + + /** + * Create an instance of EurekaDecomposeQueryResponse given an JSON string + * + * @param jsonString JSON string + * @return An instance of EurekaDecomposeQueryResponse + * @throws IOException if the JSON string is invalid with respect to + * EurekaDecomposeQueryResponse + */ + public static EurekaDecomposeQueryResponse fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, EurekaDecomposeQueryResponse.class); + } + + /** + * Convert an instance of EurekaDecomposeQueryResponse to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} diff --git a/sdks/java/src/main/java/com/thoughtspot/client/model/EurekaGetNLInstructionsResponse.java b/sdks/java/src/main/java/com/thoughtspot/client/model/EurekaGetNLInstructionsResponse.java new file mode 100644 index 000000000..c03e78ff6 --- /dev/null +++ b/sdks/java/src/main/java/com/thoughtspot/client/model/EurekaGetNLInstructionsResponse.java @@ -0,0 +1,334 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client.model; + +import com.google.gson.Gson; +import com.google.gson.JsonArray; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.TypeAdapter; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.annotations.SerializedName; +import com.google.gson.reflect.TypeToken; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import com.thoughtspot.client.JSON; +import java.io.IOException; +import java.io.Serializable; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Objects; + +/** EurekaGetNLInstructionsResponse */ +@javax.annotation.Generated( + value = "org.openapitools.codegen.languages.JavaClientCodegen", + comments = "Generator version: 7.12.0") +public class EurekaGetNLInstructionsResponse implements Serializable { + private static final long serialVersionUID = 1L; + + public static final String SERIALIZED_NAME_NL_INSTRUCTIONS_INFO = "nl_instructions_info"; + + @SerializedName(SERIALIZED_NAME_NL_INSTRUCTIONS_INFO) + @javax.annotation.Nonnull + private List nlInstructionsInfo; + + public EurekaGetNLInstructionsResponse() {} + + public EurekaGetNLInstructionsResponse nlInstructionsInfo( + @javax.annotation.Nonnull List nlInstructionsInfo) { + this.nlInstructionsInfo = nlInstructionsInfo; + return this; + } + + public EurekaGetNLInstructionsResponse addNlInstructionsInfoItem( + NLInstructionsInfo nlInstructionsInfoItem) { + if (this.nlInstructionsInfo == null) { + this.nlInstructionsInfo = new ArrayList<>(); + } + this.nlInstructionsInfo.add(nlInstructionsInfoItem); + return this; + } + + /** + * List of NL instructions with their scopes. + * + * @return nlInstructionsInfo + */ + @javax.annotation.Nonnull + public List getNlInstructionsInfo() { + return nlInstructionsInfo; + } + + public void setNlInstructionsInfo( + @javax.annotation.Nonnull List nlInstructionsInfo) { + this.nlInstructionsInfo = nlInstructionsInfo; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key name of the property + * @param value value of the property + * @return the EurekaGetNLInstructionsResponse instance itself + */ + public EurekaGetNLInstructionsResponse putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return a map of objects + */ + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key name of the property + * @return an object + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + EurekaGetNLInstructionsResponse eurekaGetNLInstructionsResponse = + (EurekaGetNLInstructionsResponse) o; + return Objects.equals( + this.nlInstructionsInfo, eurekaGetNLInstructionsResponse.nlInstructionsInfo) + && Objects.equals( + this.additionalProperties, + eurekaGetNLInstructionsResponse.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(nlInstructionsInfo, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class EurekaGetNLInstructionsResponse {\n"); + sb.append(" nlInstructionsInfo: ") + .append(toIndentedString(nlInstructionsInfo)) + .append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first + * line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("nl_instructions_info"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + openapiRequiredFields.add("nl_instructions_info"); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to + * EurekaGetNLInstructionsResponse + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!EurekaGetNLInstructionsResponse.openapiRequiredFields + .isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException( + String.format( + "The required field(s) %s in EurekaGetNLInstructionsResponse is" + + " not found in the empty JSON string", + EurekaGetNLInstructionsResponse.openapiRequiredFields.toString())); + } + } + + // check to make sure all required properties/fields are present in the JSON string + for (String requiredField : EurekaGetNLInstructionsResponse.openapiRequiredFields) { + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException( + String.format( + "The required field `%s` is not found in the JSON string: %s", + requiredField, jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // ensure the json data is an array + if (!jsonObj.get("nl_instructions_info").isJsonArray()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `nl_instructions_info` to be an array in the JSON" + + " string but got `%s`", + jsonObj.get("nl_instructions_info").toString())); + } + + JsonArray jsonArraynlInstructionsInfo = jsonObj.getAsJsonArray("nl_instructions_info"); + // validate the required field `nl_instructions_info` (array) + for (int i = 0; i < jsonArraynlInstructionsInfo.size(); i++) { + NLInstructionsInfo.validateJsonElement(jsonArraynlInstructionsInfo.get(i)); + } + ; + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!EurekaGetNLInstructionsResponse.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'EurekaGetNLInstructionsResponse' and its + // subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter = + gson.getDelegateAdapter( + this, TypeToken.get(EurekaGetNLInstructionsResponse.class)); + + return (TypeAdapter) + new TypeAdapter() { + @Override + public void write(JsonWriter out, EurekaGetNLInstructionsResponse value) + throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + obj.remove("additionalProperties"); + // serialize additional properties + if (value.getAdditionalProperties() != null) { + for (Map.Entry entry : + value.getAdditionalProperties().entrySet()) { + if (entry.getValue() instanceof String) + obj.addProperty(entry.getKey(), (String) entry.getValue()); + else if (entry.getValue() instanceof Number) + obj.addProperty(entry.getKey(), (Number) entry.getValue()); + else if (entry.getValue() instanceof Boolean) + obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); + else if (entry.getValue() instanceof Character) + obj.addProperty( + entry.getKey(), (Character) entry.getValue()); + else { + JsonElement jsonElement = gson.toJsonTree(entry.getValue()); + if (jsonElement.isJsonArray()) { + obj.add(entry.getKey(), jsonElement.getAsJsonArray()); + } else { + obj.add(entry.getKey(), jsonElement.getAsJsonObject()); + } + } + } + } + elementAdapter.write(out, obj); + } + + @Override + public EurekaGetNLInstructionsResponse read(JsonReader in) + throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // store additional fields in the deserialized instance + EurekaGetNLInstructionsResponse instance = + thisAdapter.fromJsonTree(jsonObj); + for (Map.Entry entry : jsonObj.entrySet()) { + if (!openapiFields.contains(entry.getKey())) { + if (entry.getValue().isJsonPrimitive()) { // primitive type + if (entry.getValue().getAsJsonPrimitive().isString()) + instance.putAdditionalProperty( + entry.getKey(), entry.getValue().getAsString()); + else if (entry.getValue().getAsJsonPrimitive().isNumber()) + instance.putAdditionalProperty( + entry.getKey(), entry.getValue().getAsNumber()); + else if (entry.getValue().getAsJsonPrimitive().isBoolean()) + instance.putAdditionalProperty( + entry.getKey(), + entry.getValue().getAsBoolean()); + else + throw new IllegalArgumentException( + String.format( + "The field `%s` has unknown primitive" + + " type. Value: %s", + entry.getKey(), + entry.getValue().toString())); + } else if (entry.getValue().isJsonArray()) { + instance.putAdditionalProperty( + entry.getKey(), + gson.fromJson(entry.getValue(), List.class)); + } else { // JSON object + instance.putAdditionalProperty( + entry.getKey(), + gson.fromJson(entry.getValue(), HashMap.class)); + } + } + } + return instance; + } + }.nullSafe(); + } + } + + /** + * Create an instance of EurekaGetNLInstructionsResponse given an JSON string + * + * @param jsonString JSON string + * @return An instance of EurekaGetNLInstructionsResponse + * @throws IOException if the JSON string is invalid with respect to + * EurekaGetNLInstructionsResponse + */ + public static EurekaGetNLInstructionsResponse fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, EurekaGetNLInstructionsResponse.class); + } + + /** + * Convert an instance of EurekaGetNLInstructionsResponse to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} diff --git a/sdks/java/src/main/java/com/thoughtspot/client/model/EurekaGetRelevantQuestionsResponse.java b/sdks/java/src/main/java/com/thoughtspot/client/model/EurekaGetRelevantQuestionsResponse.java new file mode 100644 index 000000000..dcddf3a09 --- /dev/null +++ b/sdks/java/src/main/java/com/thoughtspot/client/model/EurekaGetRelevantQuestionsResponse.java @@ -0,0 +1,349 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client.model; + +import com.google.gson.Gson; +import com.google.gson.JsonArray; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.TypeAdapter; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.annotations.SerializedName; +import com.google.gson.reflect.TypeToken; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import com.thoughtspot.client.JSON; +import java.io.IOException; +import java.io.Serializable; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Objects; +import org.openapitools.jackson.nullable.JsonNullable; + +/** EurekaGetRelevantQuestionsResponse */ +@javax.annotation.Generated( + value = "org.openapitools.codegen.languages.JavaClientCodegen", + comments = "Generator version: 7.12.0") +public class EurekaGetRelevantQuestionsResponse implements Serializable { + private static final long serialVersionUID = 1L; + + public static final String SERIALIZED_NAME_RELEVANT_QUESTIONS = "relevant_questions"; + + @SerializedName(SERIALIZED_NAME_RELEVANT_QUESTIONS) + @javax.annotation.Nullable + private List relevantQuestions; + + public EurekaGetRelevantQuestionsResponse() {} + + public EurekaGetRelevantQuestionsResponse relevantQuestions( + @javax.annotation.Nullable List relevantQuestions) { + this.relevantQuestions = relevantQuestions; + return this; + } + + public EurekaGetRelevantQuestionsResponse addRelevantQuestionsItem( + EurekaRelevantQuestion relevantQuestionsItem) { + if (this.relevantQuestions == null) { + this.relevantQuestions = new ArrayList<>(); + } + this.relevantQuestions.add(relevantQuestionsItem); + return this; + } + + /** + * List of relevant questions that can be run on their respective data sources. + * + * @return relevantQuestions + */ + @javax.annotation.Nullable + public List getRelevantQuestions() { + return relevantQuestions; + } + + public void setRelevantQuestions( + @javax.annotation.Nullable List relevantQuestions) { + this.relevantQuestions = relevantQuestions; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key name of the property + * @param value value of the property + * @return the EurekaGetRelevantQuestionsResponse instance itself + */ + public EurekaGetRelevantQuestionsResponse putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return a map of objects + */ + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key name of the property + * @return an object + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + EurekaGetRelevantQuestionsResponse eurekaGetRelevantQuestionsResponse = + (EurekaGetRelevantQuestionsResponse) o; + return Objects.equals( + this.relevantQuestions, + eurekaGetRelevantQuestionsResponse.relevantQuestions) + && Objects.equals( + this.additionalProperties, + eurekaGetRelevantQuestionsResponse.additionalProperties); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b + || (a != null + && b != null + && a.isPresent() + && b.isPresent() + && Objects.deepEquals(a.get(), b.get())); + } + + @Override + public int hashCode() { + return Objects.hash(relevantQuestions, additionalProperties); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; + } + return a.isPresent() ? Arrays.deepHashCode(new Object[] {a.get()}) : 31; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class EurekaGetRelevantQuestionsResponse {\n"); + sb.append(" relevantQuestions: ") + .append(toIndentedString(relevantQuestions)) + .append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first + * line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("relevant_questions"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to + * EurekaGetRelevantQuestionsResponse + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!EurekaGetRelevantQuestionsResponse.openapiRequiredFields + .isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException( + String.format( + "The required field(s) %s in EurekaGetRelevantQuestionsResponse is" + + " not found in the empty JSON string", + EurekaGetRelevantQuestionsResponse.openapiRequiredFields + .toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if (jsonObj.get("relevant_questions") != null + && !jsonObj.get("relevant_questions").isJsonNull()) { + JsonArray jsonArrayrelevantQuestions = jsonObj.getAsJsonArray("relevant_questions"); + if (jsonArrayrelevantQuestions != null) { + // ensure the json data is an array + if (!jsonObj.get("relevant_questions").isJsonArray()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `relevant_questions` to be an array in the" + + " JSON string but got `%s`", + jsonObj.get("relevant_questions").toString())); + } + + // validate the optional field `relevant_questions` (array) + for (int i = 0; i < jsonArrayrelevantQuestions.size(); i++) { + EurekaRelevantQuestion.validateJsonElement(jsonArrayrelevantQuestions.get(i)); + } + ; + } + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!EurekaGetRelevantQuestionsResponse.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'EurekaGetRelevantQuestionsResponse' and + // its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter = + gson.getDelegateAdapter( + this, TypeToken.get(EurekaGetRelevantQuestionsResponse.class)); + + return (TypeAdapter) + new TypeAdapter() { + @Override + public void write(JsonWriter out, EurekaGetRelevantQuestionsResponse value) + throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + obj.remove("additionalProperties"); + // serialize additional properties + if (value.getAdditionalProperties() != null) { + for (Map.Entry entry : + value.getAdditionalProperties().entrySet()) { + if (entry.getValue() instanceof String) + obj.addProperty(entry.getKey(), (String) entry.getValue()); + else if (entry.getValue() instanceof Number) + obj.addProperty(entry.getKey(), (Number) entry.getValue()); + else if (entry.getValue() instanceof Boolean) + obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); + else if (entry.getValue() instanceof Character) + obj.addProperty( + entry.getKey(), (Character) entry.getValue()); + else { + JsonElement jsonElement = gson.toJsonTree(entry.getValue()); + if (jsonElement.isJsonArray()) { + obj.add(entry.getKey(), jsonElement.getAsJsonArray()); + } else { + obj.add(entry.getKey(), jsonElement.getAsJsonObject()); + } + } + } + } + elementAdapter.write(out, obj); + } + + @Override + public EurekaGetRelevantQuestionsResponse read(JsonReader in) + throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // store additional fields in the deserialized instance + EurekaGetRelevantQuestionsResponse instance = + thisAdapter.fromJsonTree(jsonObj); + for (Map.Entry entry : jsonObj.entrySet()) { + if (!openapiFields.contains(entry.getKey())) { + if (entry.getValue().isJsonPrimitive()) { // primitive type + if (entry.getValue().getAsJsonPrimitive().isString()) + instance.putAdditionalProperty( + entry.getKey(), entry.getValue().getAsString()); + else if (entry.getValue().getAsJsonPrimitive().isNumber()) + instance.putAdditionalProperty( + entry.getKey(), entry.getValue().getAsNumber()); + else if (entry.getValue().getAsJsonPrimitive().isBoolean()) + instance.putAdditionalProperty( + entry.getKey(), + entry.getValue().getAsBoolean()); + else + throw new IllegalArgumentException( + String.format( + "The field `%s` has unknown primitive" + + " type. Value: %s", + entry.getKey(), + entry.getValue().toString())); + } else if (entry.getValue().isJsonArray()) { + instance.putAdditionalProperty( + entry.getKey(), + gson.fromJson(entry.getValue(), List.class)); + } else { // JSON object + instance.putAdditionalProperty( + entry.getKey(), + gson.fromJson(entry.getValue(), HashMap.class)); + } + } + } + return instance; + } + }.nullSafe(); + } + } + + /** + * Create an instance of EurekaGetRelevantQuestionsResponse given an JSON string + * + * @param jsonString JSON string + * @return An instance of EurekaGetRelevantQuestionsResponse + * @throws IOException if the JSON string is invalid with respect to + * EurekaGetRelevantQuestionsResponse + */ + public static EurekaGetRelevantQuestionsResponse fromJson(String jsonString) + throws IOException { + return JSON.getGson().fromJson(jsonString, EurekaGetRelevantQuestionsResponse.class); + } + + /** + * Convert an instance of EurekaGetRelevantQuestionsResponse to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} diff --git a/sdks/java/src/main/java/com/thoughtspot/client/model/EurekaLLMDecomposeQueryResponse.java b/sdks/java/src/main/java/com/thoughtspot/client/model/EurekaLLMDecomposeQueryResponse.java new file mode 100644 index 000000000..ed9ca9970 --- /dev/null +++ b/sdks/java/src/main/java/com/thoughtspot/client/model/EurekaLLMDecomposeQueryResponse.java @@ -0,0 +1,346 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client.model; + +import com.google.gson.Gson; +import com.google.gson.JsonArray; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.TypeAdapter; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.annotations.SerializedName; +import com.google.gson.reflect.TypeToken; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import com.thoughtspot.client.JSON; +import java.io.IOException; +import java.io.Serializable; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Objects; +import org.openapitools.jackson.nullable.JsonNullable; + +/** EurekaLLMDecomposeQueryResponse */ +@javax.annotation.Generated( + value = "org.openapitools.codegen.languages.JavaClientCodegen", + comments = "Generator version: 7.12.0") +public class EurekaLLMDecomposeQueryResponse implements Serializable { + private static final long serialVersionUID = 1L; + + public static final String SERIALIZED_NAME_DECOMPOSED_QUERIES = "decomposedQueries"; + + @SerializedName(SERIALIZED_NAME_DECOMPOSED_QUERIES) + @javax.annotation.Nullable + private List decomposedQueries; + + public EurekaLLMDecomposeQueryResponse() {} + + public EurekaLLMDecomposeQueryResponse decomposedQueries( + @javax.annotation.Nullable List decomposedQueries) { + this.decomposedQueries = decomposedQueries; + return this; + } + + public EurekaLLMDecomposeQueryResponse addDecomposedQueriesItem( + EurekaLLMSuggestedQuery decomposedQueriesItem) { + if (this.decomposedQueries == null) { + this.decomposedQueries = new ArrayList<>(); + } + this.decomposedQueries.add(decomposedQueriesItem); + return this; + } + + /** + * List of analytical questions that can be run on their respective worksheet/data sources. + * + * @return decomposedQueries + */ + @javax.annotation.Nullable + public List getDecomposedQueries() { + return decomposedQueries; + } + + public void setDecomposedQueries( + @javax.annotation.Nullable List decomposedQueries) { + this.decomposedQueries = decomposedQueries; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key name of the property + * @param value value of the property + * @return the EurekaLLMDecomposeQueryResponse instance itself + */ + public EurekaLLMDecomposeQueryResponse putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return a map of objects + */ + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key name of the property + * @return an object + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + EurekaLLMDecomposeQueryResponse eurekaLLMDecomposeQueryResponse = + (EurekaLLMDecomposeQueryResponse) o; + return Objects.equals( + this.decomposedQueries, eurekaLLMDecomposeQueryResponse.decomposedQueries) + && Objects.equals( + this.additionalProperties, + eurekaLLMDecomposeQueryResponse.additionalProperties); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b + || (a != null + && b != null + && a.isPresent() + && b.isPresent() + && Objects.deepEquals(a.get(), b.get())); + } + + @Override + public int hashCode() { + return Objects.hash(decomposedQueries, additionalProperties); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; + } + return a.isPresent() ? Arrays.deepHashCode(new Object[] {a.get()}) : 31; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class EurekaLLMDecomposeQueryResponse {\n"); + sb.append(" decomposedQueries: ") + .append(toIndentedString(decomposedQueries)) + .append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first + * line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("decomposedQueries"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to + * EurekaLLMDecomposeQueryResponse + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!EurekaLLMDecomposeQueryResponse.openapiRequiredFields + .isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException( + String.format( + "The required field(s) %s in EurekaLLMDecomposeQueryResponse is" + + " not found in the empty JSON string", + EurekaLLMDecomposeQueryResponse.openapiRequiredFields.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if (jsonObj.get("decomposedQueries") != null + && !jsonObj.get("decomposedQueries").isJsonNull()) { + JsonArray jsonArraydecomposedQueries = jsonObj.getAsJsonArray("decomposedQueries"); + if (jsonArraydecomposedQueries != null) { + // ensure the json data is an array + if (!jsonObj.get("decomposedQueries").isJsonArray()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `decomposedQueries` to be an array in the" + + " JSON string but got `%s`", + jsonObj.get("decomposedQueries").toString())); + } + + // validate the optional field `decomposedQueries` (array) + for (int i = 0; i < jsonArraydecomposedQueries.size(); i++) { + EurekaLLMSuggestedQuery.validateJsonElement(jsonArraydecomposedQueries.get(i)); + } + ; + } + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!EurekaLLMDecomposeQueryResponse.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'EurekaLLMDecomposeQueryResponse' and its + // subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter = + gson.getDelegateAdapter( + this, TypeToken.get(EurekaLLMDecomposeQueryResponse.class)); + + return (TypeAdapter) + new TypeAdapter() { + @Override + public void write(JsonWriter out, EurekaLLMDecomposeQueryResponse value) + throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + obj.remove("additionalProperties"); + // serialize additional properties + if (value.getAdditionalProperties() != null) { + for (Map.Entry entry : + value.getAdditionalProperties().entrySet()) { + if (entry.getValue() instanceof String) + obj.addProperty(entry.getKey(), (String) entry.getValue()); + else if (entry.getValue() instanceof Number) + obj.addProperty(entry.getKey(), (Number) entry.getValue()); + else if (entry.getValue() instanceof Boolean) + obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); + else if (entry.getValue() instanceof Character) + obj.addProperty( + entry.getKey(), (Character) entry.getValue()); + else { + JsonElement jsonElement = gson.toJsonTree(entry.getValue()); + if (jsonElement.isJsonArray()) { + obj.add(entry.getKey(), jsonElement.getAsJsonArray()); + } else { + obj.add(entry.getKey(), jsonElement.getAsJsonObject()); + } + } + } + } + elementAdapter.write(out, obj); + } + + @Override + public EurekaLLMDecomposeQueryResponse read(JsonReader in) + throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // store additional fields in the deserialized instance + EurekaLLMDecomposeQueryResponse instance = + thisAdapter.fromJsonTree(jsonObj); + for (Map.Entry entry : jsonObj.entrySet()) { + if (!openapiFields.contains(entry.getKey())) { + if (entry.getValue().isJsonPrimitive()) { // primitive type + if (entry.getValue().getAsJsonPrimitive().isString()) + instance.putAdditionalProperty( + entry.getKey(), entry.getValue().getAsString()); + else if (entry.getValue().getAsJsonPrimitive().isNumber()) + instance.putAdditionalProperty( + entry.getKey(), entry.getValue().getAsNumber()); + else if (entry.getValue().getAsJsonPrimitive().isBoolean()) + instance.putAdditionalProperty( + entry.getKey(), + entry.getValue().getAsBoolean()); + else + throw new IllegalArgumentException( + String.format( + "The field `%s` has unknown primitive" + + " type. Value: %s", + entry.getKey(), + entry.getValue().toString())); + } else if (entry.getValue().isJsonArray()) { + instance.putAdditionalProperty( + entry.getKey(), + gson.fromJson(entry.getValue(), List.class)); + } else { // JSON object + instance.putAdditionalProperty( + entry.getKey(), + gson.fromJson(entry.getValue(), HashMap.class)); + } + } + } + return instance; + } + }.nullSafe(); + } + } + + /** + * Create an instance of EurekaLLMDecomposeQueryResponse given an JSON string + * + * @param jsonString JSON string + * @return An instance of EurekaLLMDecomposeQueryResponse + * @throws IOException if the JSON string is invalid with respect to + * EurekaLLMDecomposeQueryResponse + */ + public static EurekaLLMDecomposeQueryResponse fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, EurekaLLMDecomposeQueryResponse.class); + } + + /** + * Convert an instance of EurekaLLMDecomposeQueryResponse to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} diff --git a/sdks/java/src/main/java/com/thoughtspot/client/model/EurekaLLMSuggestedQuery.java b/sdks/java/src/main/java/com/thoughtspot/client/model/EurekaLLMSuggestedQuery.java new file mode 100644 index 000000000..e8f1f35cf --- /dev/null +++ b/sdks/java/src/main/java/com/thoughtspot/client/model/EurekaLLMSuggestedQuery.java @@ -0,0 +1,384 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client.model; + +import com.google.gson.Gson; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.TypeAdapter; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.annotations.SerializedName; +import com.google.gson.reflect.TypeToken; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import com.thoughtspot.client.JSON; +import java.io.IOException; +import java.io.Serializable; +import java.util.Arrays; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Objects; +import org.openapitools.jackson.nullable.JsonNullable; + +/** EurekaLLMSuggestedQuery */ +@javax.annotation.Generated( + value = "org.openapitools.codegen.languages.JavaClientCodegen", + comments = "Generator version: 7.12.0") +public class EurekaLLMSuggestedQuery implements Serializable { + private static final long serialVersionUID = 1L; + + public static final String SERIALIZED_NAME_QUERY = "query"; + + @SerializedName(SERIALIZED_NAME_QUERY) + @javax.annotation.Nullable + private String query; + + public static final String SERIALIZED_NAME_WORKSHEET_ID = "worksheetId"; + + @SerializedName(SERIALIZED_NAME_WORKSHEET_ID) + @javax.annotation.Nullable + private String worksheetId; + + public static final String SERIALIZED_NAME_WORKSHEET_NAME = "worksheetName"; + + @SerializedName(SERIALIZED_NAME_WORKSHEET_NAME) + @javax.annotation.Nullable + private String worksheetName; + + public EurekaLLMSuggestedQuery() {} + + public EurekaLLMSuggestedQuery query(@javax.annotation.Nullable String query) { + this.query = query; + return this; + } + + /** + * NL query that can be run using spotter aka natural language search to get an AI generated + * answer. + * + * @return query + */ + @javax.annotation.Nullable + public String getQuery() { + return query; + } + + public void setQuery(@javax.annotation.Nullable String query) { + this.query = query; + } + + public EurekaLLMSuggestedQuery worksheetId(@javax.annotation.Nullable String worksheetId) { + this.worksheetId = worksheetId; + return this; + } + + /** + * Unique identifier of the worksheet on which this query can be run on. + * + * @return worksheetId + */ + @javax.annotation.Nullable + public String getWorksheetId() { + return worksheetId; + } + + public void setWorksheetId(@javax.annotation.Nullable String worksheetId) { + this.worksheetId = worksheetId; + } + + public EurekaLLMSuggestedQuery worksheetName(@javax.annotation.Nullable String worksheetName) { + this.worksheetName = worksheetName; + return this; + } + + /** + * Display name of the worksheet on which this query can be run on. + * + * @return worksheetName + */ + @javax.annotation.Nullable + public String getWorksheetName() { + return worksheetName; + } + + public void setWorksheetName(@javax.annotation.Nullable String worksheetName) { + this.worksheetName = worksheetName; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key name of the property + * @param value value of the property + * @return the EurekaLLMSuggestedQuery instance itself + */ + public EurekaLLMSuggestedQuery putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return a map of objects + */ + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key name of the property + * @return an object + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + EurekaLLMSuggestedQuery eurekaLLMSuggestedQuery = (EurekaLLMSuggestedQuery) o; + return Objects.equals(this.query, eurekaLLMSuggestedQuery.query) + && Objects.equals(this.worksheetId, eurekaLLMSuggestedQuery.worksheetId) + && Objects.equals(this.worksheetName, eurekaLLMSuggestedQuery.worksheetName) + && Objects.equals( + this.additionalProperties, eurekaLLMSuggestedQuery.additionalProperties); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b + || (a != null + && b != null + && a.isPresent() + && b.isPresent() + && Objects.deepEquals(a.get(), b.get())); + } + + @Override + public int hashCode() { + return Objects.hash(query, worksheetId, worksheetName, additionalProperties); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; + } + return a.isPresent() ? Arrays.deepHashCode(new Object[] {a.get()}) : 31; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class EurekaLLMSuggestedQuery {\n"); + sb.append(" query: ").append(toIndentedString(query)).append("\n"); + sb.append(" worksheetId: ").append(toIndentedString(worksheetId)).append("\n"); + sb.append(" worksheetName: ").append(toIndentedString(worksheetName)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first + * line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("query"); + openapiFields.add("worksheetId"); + openapiFields.add("worksheetName"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to EurekaLLMSuggestedQuery + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!EurekaLLMSuggestedQuery.openapiRequiredFields + .isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException( + String.format( + "The required field(s) %s in EurekaLLMSuggestedQuery is not found" + + " in the empty JSON string", + EurekaLLMSuggestedQuery.openapiRequiredFields.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if ((jsonObj.get("query") != null && !jsonObj.get("query").isJsonNull()) + && !jsonObj.get("query").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `query` to be a primitive type in the JSON string" + + " but got `%s`", + jsonObj.get("query").toString())); + } + if ((jsonObj.get("worksheetId") != null && !jsonObj.get("worksheetId").isJsonNull()) + && !jsonObj.get("worksheetId").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `worksheetId` to be a primitive type in the JSON" + + " string but got `%s`", + jsonObj.get("worksheetId").toString())); + } + if ((jsonObj.get("worksheetName") != null && !jsonObj.get("worksheetName").isJsonNull()) + && !jsonObj.get("worksheetName").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `worksheetName` to be a primitive type in the JSON" + + " string but got `%s`", + jsonObj.get("worksheetName").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!EurekaLLMSuggestedQuery.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'EurekaLLMSuggestedQuery' and its + // subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter = + gson.getDelegateAdapter(this, TypeToken.get(EurekaLLMSuggestedQuery.class)); + + return (TypeAdapter) + new TypeAdapter() { + @Override + public void write(JsonWriter out, EurekaLLMSuggestedQuery value) + throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + obj.remove("additionalProperties"); + // serialize additional properties + if (value.getAdditionalProperties() != null) { + for (Map.Entry entry : + value.getAdditionalProperties().entrySet()) { + if (entry.getValue() instanceof String) + obj.addProperty(entry.getKey(), (String) entry.getValue()); + else if (entry.getValue() instanceof Number) + obj.addProperty(entry.getKey(), (Number) entry.getValue()); + else if (entry.getValue() instanceof Boolean) + obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); + else if (entry.getValue() instanceof Character) + obj.addProperty( + entry.getKey(), (Character) entry.getValue()); + else { + JsonElement jsonElement = gson.toJsonTree(entry.getValue()); + if (jsonElement.isJsonArray()) { + obj.add(entry.getKey(), jsonElement.getAsJsonArray()); + } else { + obj.add(entry.getKey(), jsonElement.getAsJsonObject()); + } + } + } + } + elementAdapter.write(out, obj); + } + + @Override + public EurekaLLMSuggestedQuery read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // store additional fields in the deserialized instance + EurekaLLMSuggestedQuery instance = thisAdapter.fromJsonTree(jsonObj); + for (Map.Entry entry : jsonObj.entrySet()) { + if (!openapiFields.contains(entry.getKey())) { + if (entry.getValue().isJsonPrimitive()) { // primitive type + if (entry.getValue().getAsJsonPrimitive().isString()) + instance.putAdditionalProperty( + entry.getKey(), entry.getValue().getAsString()); + else if (entry.getValue().getAsJsonPrimitive().isNumber()) + instance.putAdditionalProperty( + entry.getKey(), entry.getValue().getAsNumber()); + else if (entry.getValue().getAsJsonPrimitive().isBoolean()) + instance.putAdditionalProperty( + entry.getKey(), + entry.getValue().getAsBoolean()); + else + throw new IllegalArgumentException( + String.format( + "The field `%s` has unknown primitive" + + " type. Value: %s", + entry.getKey(), + entry.getValue().toString())); + } else if (entry.getValue().isJsonArray()) { + instance.putAdditionalProperty( + entry.getKey(), + gson.fromJson(entry.getValue(), List.class)); + } else { // JSON object + instance.putAdditionalProperty( + entry.getKey(), + gson.fromJson(entry.getValue(), HashMap.class)); + } + } + } + return instance; + } + }.nullSafe(); + } + } + + /** + * Create an instance of EurekaLLMSuggestedQuery given an JSON string + * + * @param jsonString JSON string + * @return An instance of EurekaLLMSuggestedQuery + * @throws IOException if the JSON string is invalid with respect to EurekaLLMSuggestedQuery + */ + public static EurekaLLMSuggestedQuery fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, EurekaLLMSuggestedQuery.class); + } + + /** + * Convert an instance of EurekaLLMSuggestedQuery to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} diff --git a/sdks/java/src/main/java/com/thoughtspot/client/model/EurekaRelevantQuestion.java b/sdks/java/src/main/java/com/thoughtspot/client/model/EurekaRelevantQuestion.java new file mode 100644 index 000000000..4989a5d3c --- /dev/null +++ b/sdks/java/src/main/java/com/thoughtspot/client/model/EurekaRelevantQuestion.java @@ -0,0 +1,389 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client.model; + +import com.google.gson.Gson; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.TypeAdapter; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.annotations.SerializedName; +import com.google.gson.reflect.TypeToken; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import com.thoughtspot.client.JSON; +import java.io.IOException; +import java.io.Serializable; +import java.util.Arrays; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Objects; +import org.openapitools.jackson.nullable.JsonNullable; + +/** EurekaRelevantQuestion */ +@javax.annotation.Generated( + value = "org.openapitools.codegen.languages.JavaClientCodegen", + comments = "Generator version: 7.12.0") +public class EurekaRelevantQuestion implements Serializable { + private static final long serialVersionUID = 1L; + + public static final String SERIALIZED_NAME_QUERY = "query"; + + @SerializedName(SERIALIZED_NAME_QUERY) + @javax.annotation.Nullable + private String query; + + public static final String SERIALIZED_NAME_DATA_SOURCE_IDENTIFIER = "data_source_identifier"; + + @SerializedName(SERIALIZED_NAME_DATA_SOURCE_IDENTIFIER) + @javax.annotation.Nullable + private String dataSourceIdentifier; + + public static final String SERIALIZED_NAME_DATA_SOURCE_NAME = "data_source_name"; + + @SerializedName(SERIALIZED_NAME_DATA_SOURCE_NAME) + @javax.annotation.Nullable + private String dataSourceName; + + public EurekaRelevantQuestion() {} + + public EurekaRelevantQuestion query(@javax.annotation.Nullable String query) { + this.query = query; + return this; + } + + /** + * NL query that can be run using spotter aka natural language search to get an AI generated + * answer. + * + * @return query + */ + @javax.annotation.Nullable + public String getQuery() { + return query; + } + + public void setQuery(@javax.annotation.Nullable String query) { + this.query = query; + } + + public EurekaRelevantQuestion dataSourceIdentifier( + @javax.annotation.Nullable String dataSourceIdentifier) { + this.dataSourceIdentifier = dataSourceIdentifier; + return this; + } + + /** + * Unique identifier of the data source on which this query can be run on. + * + * @return dataSourceIdentifier + */ + @javax.annotation.Nullable + public String getDataSourceIdentifier() { + return dataSourceIdentifier; + } + + public void setDataSourceIdentifier(@javax.annotation.Nullable String dataSourceIdentifier) { + this.dataSourceIdentifier = dataSourceIdentifier; + } + + public EurekaRelevantQuestion dataSourceName(@javax.annotation.Nullable String dataSourceName) { + this.dataSourceName = dataSourceName; + return this; + } + + /** + * Display name of the data source on which this query can be run on. + * + * @return dataSourceName + */ + @javax.annotation.Nullable + public String getDataSourceName() { + return dataSourceName; + } + + public void setDataSourceName(@javax.annotation.Nullable String dataSourceName) { + this.dataSourceName = dataSourceName; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key name of the property + * @param value value of the property + * @return the EurekaRelevantQuestion instance itself + */ + public EurekaRelevantQuestion putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return a map of objects + */ + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key name of the property + * @return an object + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + EurekaRelevantQuestion eurekaRelevantQuestion = (EurekaRelevantQuestion) o; + return Objects.equals(this.query, eurekaRelevantQuestion.query) + && Objects.equals( + this.dataSourceIdentifier, eurekaRelevantQuestion.dataSourceIdentifier) + && Objects.equals(this.dataSourceName, eurekaRelevantQuestion.dataSourceName) + && Objects.equals( + this.additionalProperties, eurekaRelevantQuestion.additionalProperties); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b + || (a != null + && b != null + && a.isPresent() + && b.isPresent() + && Objects.deepEquals(a.get(), b.get())); + } + + @Override + public int hashCode() { + return Objects.hash(query, dataSourceIdentifier, dataSourceName, additionalProperties); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; + } + return a.isPresent() ? Arrays.deepHashCode(new Object[] {a.get()}) : 31; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class EurekaRelevantQuestion {\n"); + sb.append(" query: ").append(toIndentedString(query)).append("\n"); + sb.append(" dataSourceIdentifier: ") + .append(toIndentedString(dataSourceIdentifier)) + .append("\n"); + sb.append(" dataSourceName: ").append(toIndentedString(dataSourceName)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first + * line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("query"); + openapiFields.add("data_source_identifier"); + openapiFields.add("data_source_name"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to EurekaRelevantQuestion + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!EurekaRelevantQuestion.openapiRequiredFields + .isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException( + String.format( + "The required field(s) %s in EurekaRelevantQuestion is not found" + + " in the empty JSON string", + EurekaRelevantQuestion.openapiRequiredFields.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if ((jsonObj.get("query") != null && !jsonObj.get("query").isJsonNull()) + && !jsonObj.get("query").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `query` to be a primitive type in the JSON string" + + " but got `%s`", + jsonObj.get("query").toString())); + } + if ((jsonObj.get("data_source_identifier") != null + && !jsonObj.get("data_source_identifier").isJsonNull()) + && !jsonObj.get("data_source_identifier").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `data_source_identifier` to be a primitive type in" + + " the JSON string but got `%s`", + jsonObj.get("data_source_identifier").toString())); + } + if ((jsonObj.get("data_source_name") != null + && !jsonObj.get("data_source_name").isJsonNull()) + && !jsonObj.get("data_source_name").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `data_source_name` to be a primitive type in the" + + " JSON string but got `%s`", + jsonObj.get("data_source_name").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!EurekaRelevantQuestion.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'EurekaRelevantQuestion' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter = + gson.getDelegateAdapter(this, TypeToken.get(EurekaRelevantQuestion.class)); + + return (TypeAdapter) + new TypeAdapter() { + @Override + public void write(JsonWriter out, EurekaRelevantQuestion value) + throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + obj.remove("additionalProperties"); + // serialize additional properties + if (value.getAdditionalProperties() != null) { + for (Map.Entry entry : + value.getAdditionalProperties().entrySet()) { + if (entry.getValue() instanceof String) + obj.addProperty(entry.getKey(), (String) entry.getValue()); + else if (entry.getValue() instanceof Number) + obj.addProperty(entry.getKey(), (Number) entry.getValue()); + else if (entry.getValue() instanceof Boolean) + obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); + else if (entry.getValue() instanceof Character) + obj.addProperty( + entry.getKey(), (Character) entry.getValue()); + else { + JsonElement jsonElement = gson.toJsonTree(entry.getValue()); + if (jsonElement.isJsonArray()) { + obj.add(entry.getKey(), jsonElement.getAsJsonArray()); + } else { + obj.add(entry.getKey(), jsonElement.getAsJsonObject()); + } + } + } + } + elementAdapter.write(out, obj); + } + + @Override + public EurekaRelevantQuestion read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // store additional fields in the deserialized instance + EurekaRelevantQuestion instance = thisAdapter.fromJsonTree(jsonObj); + for (Map.Entry entry : jsonObj.entrySet()) { + if (!openapiFields.contains(entry.getKey())) { + if (entry.getValue().isJsonPrimitive()) { // primitive type + if (entry.getValue().getAsJsonPrimitive().isString()) + instance.putAdditionalProperty( + entry.getKey(), entry.getValue().getAsString()); + else if (entry.getValue().getAsJsonPrimitive().isNumber()) + instance.putAdditionalProperty( + entry.getKey(), entry.getValue().getAsNumber()); + else if (entry.getValue().getAsJsonPrimitive().isBoolean()) + instance.putAdditionalProperty( + entry.getKey(), + entry.getValue().getAsBoolean()); + else + throw new IllegalArgumentException( + String.format( + "The field `%s` has unknown primitive" + + " type. Value: %s", + entry.getKey(), + entry.getValue().toString())); + } else if (entry.getValue().isJsonArray()) { + instance.putAdditionalProperty( + entry.getKey(), + gson.fromJson(entry.getValue(), List.class)); + } else { // JSON object + instance.putAdditionalProperty( + entry.getKey(), + gson.fromJson(entry.getValue(), HashMap.class)); + } + } + } + return instance; + } + }.nullSafe(); + } + } + + /** + * Create an instance of EurekaRelevantQuestion given an JSON string + * + * @param jsonString JSON string + * @return An instance of EurekaRelevantQuestion + * @throws IOException if the JSON string is invalid with respect to EurekaRelevantQuestion + */ + public static EurekaRelevantQuestion fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, EurekaRelevantQuestion.class); + } + + /** + * Convert an instance of EurekaRelevantQuestion to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} diff --git a/sdks/java/src/main/java/com/thoughtspot/client/model/EurekaSetNLInstructionsResponse.java b/sdks/java/src/main/java/com/thoughtspot/client/model/EurekaSetNLInstructionsResponse.java new file mode 100644 index 000000000..c22a19358 --- /dev/null +++ b/sdks/java/src/main/java/com/thoughtspot/client/model/EurekaSetNLInstructionsResponse.java @@ -0,0 +1,303 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client.model; + +import com.google.gson.Gson; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.TypeAdapter; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.annotations.SerializedName; +import com.google.gson.reflect.TypeToken; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import com.thoughtspot.client.JSON; +import java.io.IOException; +import java.io.Serializable; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Objects; + +/** EurekaSetNLInstructionsResponse */ +@javax.annotation.Generated( + value = "org.openapitools.codegen.languages.JavaClientCodegen", + comments = "Generator version: 7.12.0") +public class EurekaSetNLInstructionsResponse implements Serializable { + private static final long serialVersionUID = 1L; + + public static final String SERIALIZED_NAME_SUCCESS = "success"; + + @SerializedName(SERIALIZED_NAME_SUCCESS) + @javax.annotation.Nonnull + private Boolean success; + + public EurekaSetNLInstructionsResponse() {} + + public EurekaSetNLInstructionsResponse success(@javax.annotation.Nonnull Boolean success) { + this.success = success; + return this; + } + + /** + * Success status of the operation. + * + * @return success + */ + @javax.annotation.Nonnull + public Boolean getSuccess() { + return success; + } + + public void setSuccess(@javax.annotation.Nonnull Boolean success) { + this.success = success; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key name of the property + * @param value value of the property + * @return the EurekaSetNLInstructionsResponse instance itself + */ + public EurekaSetNLInstructionsResponse putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return a map of objects + */ + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key name of the property + * @return an object + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + EurekaSetNLInstructionsResponse eurekaSetNLInstructionsResponse = + (EurekaSetNLInstructionsResponse) o; + return Objects.equals(this.success, eurekaSetNLInstructionsResponse.success) + && Objects.equals( + this.additionalProperties, + eurekaSetNLInstructionsResponse.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(success, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class EurekaSetNLInstructionsResponse {\n"); + sb.append(" success: ").append(toIndentedString(success)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first + * line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("success"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + openapiRequiredFields.add("success"); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to + * EurekaSetNLInstructionsResponse + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!EurekaSetNLInstructionsResponse.openapiRequiredFields + .isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException( + String.format( + "The required field(s) %s in EurekaSetNLInstructionsResponse is" + + " not found in the empty JSON string", + EurekaSetNLInstructionsResponse.openapiRequiredFields.toString())); + } + } + + // check to make sure all required properties/fields are present in the JSON string + for (String requiredField : EurekaSetNLInstructionsResponse.openapiRequiredFields) { + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException( + String.format( + "The required field `%s` is not found in the JSON string: %s", + requiredField, jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!EurekaSetNLInstructionsResponse.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'EurekaSetNLInstructionsResponse' and its + // subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter = + gson.getDelegateAdapter( + this, TypeToken.get(EurekaSetNLInstructionsResponse.class)); + + return (TypeAdapter) + new TypeAdapter() { + @Override + public void write(JsonWriter out, EurekaSetNLInstructionsResponse value) + throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + obj.remove("additionalProperties"); + // serialize additional properties + if (value.getAdditionalProperties() != null) { + for (Map.Entry entry : + value.getAdditionalProperties().entrySet()) { + if (entry.getValue() instanceof String) + obj.addProperty(entry.getKey(), (String) entry.getValue()); + else if (entry.getValue() instanceof Number) + obj.addProperty(entry.getKey(), (Number) entry.getValue()); + else if (entry.getValue() instanceof Boolean) + obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); + else if (entry.getValue() instanceof Character) + obj.addProperty( + entry.getKey(), (Character) entry.getValue()); + else { + JsonElement jsonElement = gson.toJsonTree(entry.getValue()); + if (jsonElement.isJsonArray()) { + obj.add(entry.getKey(), jsonElement.getAsJsonArray()); + } else { + obj.add(entry.getKey(), jsonElement.getAsJsonObject()); + } + } + } + } + elementAdapter.write(out, obj); + } + + @Override + public EurekaSetNLInstructionsResponse read(JsonReader in) + throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // store additional fields in the deserialized instance + EurekaSetNLInstructionsResponse instance = + thisAdapter.fromJsonTree(jsonObj); + for (Map.Entry entry : jsonObj.entrySet()) { + if (!openapiFields.contains(entry.getKey())) { + if (entry.getValue().isJsonPrimitive()) { // primitive type + if (entry.getValue().getAsJsonPrimitive().isString()) + instance.putAdditionalProperty( + entry.getKey(), entry.getValue().getAsString()); + else if (entry.getValue().getAsJsonPrimitive().isNumber()) + instance.putAdditionalProperty( + entry.getKey(), entry.getValue().getAsNumber()); + else if (entry.getValue().getAsJsonPrimitive().isBoolean()) + instance.putAdditionalProperty( + entry.getKey(), + entry.getValue().getAsBoolean()); + else + throw new IllegalArgumentException( + String.format( + "The field `%s` has unknown primitive" + + " type. Value: %s", + entry.getKey(), + entry.getValue().toString())); + } else if (entry.getValue().isJsonArray()) { + instance.putAdditionalProperty( + entry.getKey(), + gson.fromJson(entry.getValue(), List.class)); + } else { // JSON object + instance.putAdditionalProperty( + entry.getKey(), + gson.fromJson(entry.getValue(), HashMap.class)); + } + } + } + return instance; + } + }.nullSafe(); + } + } + + /** + * Create an instance of EurekaSetNLInstructionsResponse given an JSON string + * + * @param jsonString JSON string + * @return An instance of EurekaSetNLInstructionsResponse + * @throws IOException if the JSON string is invalid with respect to + * EurekaSetNLInstructionsResponse + */ + public static EurekaSetNLInstructionsResponse fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, EurekaSetNLInstructionsResponse.class); + } + + /** + * Convert an instance of EurekaSetNLInstructionsResponse to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} diff --git a/sdks/java/src/main/java/com/thoughtspot/client/model/EventChannelConfig.java b/sdks/java/src/main/java/com/thoughtspot/client/model/EventChannelConfig.java new file mode 100644 index 000000000..b17fb4b1e --- /dev/null +++ b/sdks/java/src/main/java/com/thoughtspot/client/model/EventChannelConfig.java @@ -0,0 +1,456 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client.model; + +import com.google.gson.Gson; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.TypeAdapter; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.reflect.TypeToken; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import com.thoughtspot.client.JSON; +import java.io.IOException; +import java.io.Serializable; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Objects; + +/** EventChannelConfig */ +@javax.annotation.Generated( + value = "org.openapitools.codegen.languages.JavaClientCodegen", + comments = "Generator version: 7.12.0") +public class EventChannelConfig implements Serializable { + private static final long serialVersionUID = 1L; + + /** Type of event for which communication channels are configured */ + @JsonAdapter(EventTypeEnum.Adapter.class) + public enum EventTypeEnum { + LIVEBOARD_SCHEDULE("LIVEBOARD_SCHEDULE"); + + private String value; + + EventTypeEnum(String value) { + this.value = value; + } + + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + public static EventTypeEnum fromValue(String value) { + for (EventTypeEnum b : EventTypeEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + + public static class Adapter extends TypeAdapter { + @Override + public void write(final JsonWriter jsonWriter, final EventTypeEnum enumeration) + throws IOException { + jsonWriter.value(enumeration.getValue()); + } + + @Override + public EventTypeEnum read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + return EventTypeEnum.fromValue(value); + } + } + + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + String value = jsonElement.getAsString(); + EventTypeEnum.fromValue(value); + } + } + + public static final String SERIALIZED_NAME_EVENT_TYPE = "event_type"; + + @SerializedName(SERIALIZED_NAME_EVENT_TYPE) + @javax.annotation.Nonnull + private EventTypeEnum eventType; + + /** Gets or Sets channels */ + @JsonAdapter(ChannelsEnum.Adapter.class) + public enum ChannelsEnum { + EMAIL("EMAIL"), + + WEBHOOK("WEBHOOK"); + + private String value; + + ChannelsEnum(String value) { + this.value = value; + } + + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + public static ChannelsEnum fromValue(String value) { + for (ChannelsEnum b : ChannelsEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + + public static class Adapter extends TypeAdapter { + @Override + public void write(final JsonWriter jsonWriter, final ChannelsEnum enumeration) + throws IOException { + jsonWriter.value(enumeration.getValue()); + } + + @Override + public ChannelsEnum read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + return ChannelsEnum.fromValue(value); + } + } + + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + String value = jsonElement.getAsString(); + ChannelsEnum.fromValue(value); + } + } + + public static final String SERIALIZED_NAME_CHANNELS = "channels"; + + @SerializedName(SERIALIZED_NAME_CHANNELS) + @javax.annotation.Nonnull + private List channels; + + public EventChannelConfig() {} + + public EventChannelConfig eventType(@javax.annotation.Nonnull EventTypeEnum eventType) { + this.eventType = eventType; + return this; + } + + /** + * Type of event for which communication channels are configured + * + * @return eventType + */ + @javax.annotation.Nonnull + public EventTypeEnum getEventType() { + return eventType; + } + + public void setEventType(@javax.annotation.Nonnull EventTypeEnum eventType) { + this.eventType = eventType; + } + + public EventChannelConfig channels(@javax.annotation.Nonnull List channels) { + this.channels = channels; + return this; + } + + public EventChannelConfig addChannelsItem(ChannelsEnum channelsItem) { + if (this.channels == null) { + this.channels = new ArrayList<>(); + } + this.channels.add(channelsItem); + return this; + } + + /** + * Communication channels enabled for this event type. Empty array indicates no channels are + * enabled. + * + * @return channels + */ + @javax.annotation.Nonnull + public List getChannels() { + return channels; + } + + public void setChannels(@javax.annotation.Nonnull List channels) { + this.channels = channels; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key name of the property + * @param value value of the property + * @return the EventChannelConfig instance itself + */ + public EventChannelConfig putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return a map of objects + */ + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key name of the property + * @return an object + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + EventChannelConfig eventChannelConfig = (EventChannelConfig) o; + return Objects.equals(this.eventType, eventChannelConfig.eventType) + && Objects.equals(this.channels, eventChannelConfig.channels) + && Objects.equals( + this.additionalProperties, eventChannelConfig.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(eventType, channels, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class EventChannelConfig {\n"); + sb.append(" eventType: ").append(toIndentedString(eventType)).append("\n"); + sb.append(" channels: ").append(toIndentedString(channels)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first + * line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("event_type"); + openapiFields.add("channels"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + openapiRequiredFields.add("event_type"); + openapiRequiredFields.add("channels"); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to EventChannelConfig + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!EventChannelConfig.openapiRequiredFields + .isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException( + String.format( + "The required field(s) %s in EventChannelConfig is not found in" + + " the empty JSON string", + EventChannelConfig.openapiRequiredFields.toString())); + } + } + + // check to make sure all required properties/fields are present in the JSON string + for (String requiredField : EventChannelConfig.openapiRequiredFields) { + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException( + String.format( + "The required field `%s` is not found in the JSON string: %s", + requiredField, jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if (!jsonObj.get("event_type").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `event_type` to be a primitive type in the JSON" + + " string but got `%s`", + jsonObj.get("event_type").toString())); + } + // validate the required field `event_type` + EventTypeEnum.validateJsonElement(jsonObj.get("event_type")); + // ensure the required json array is present + if (jsonObj.get("channels") == null) { + throw new IllegalArgumentException( + "Expected the field `linkedContent` to be an array in the JSON string but got" + + " `null`"); + } else if (!jsonObj.get("channels").isJsonArray()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `channels` to be an array in the JSON string but" + + " got `%s`", + jsonObj.get("channels").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!EventChannelConfig.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'EventChannelConfig' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter = + gson.getDelegateAdapter(this, TypeToken.get(EventChannelConfig.class)); + + return (TypeAdapter) + new TypeAdapter() { + @Override + public void write(JsonWriter out, EventChannelConfig value) + throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + obj.remove("additionalProperties"); + // serialize additional properties + if (value.getAdditionalProperties() != null) { + for (Map.Entry entry : + value.getAdditionalProperties().entrySet()) { + if (entry.getValue() instanceof String) + obj.addProperty(entry.getKey(), (String) entry.getValue()); + else if (entry.getValue() instanceof Number) + obj.addProperty(entry.getKey(), (Number) entry.getValue()); + else if (entry.getValue() instanceof Boolean) + obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); + else if (entry.getValue() instanceof Character) + obj.addProperty( + entry.getKey(), (Character) entry.getValue()); + else { + JsonElement jsonElement = gson.toJsonTree(entry.getValue()); + if (jsonElement.isJsonArray()) { + obj.add(entry.getKey(), jsonElement.getAsJsonArray()); + } else { + obj.add(entry.getKey(), jsonElement.getAsJsonObject()); + } + } + } + } + elementAdapter.write(out, obj); + } + + @Override + public EventChannelConfig read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // store additional fields in the deserialized instance + EventChannelConfig instance = thisAdapter.fromJsonTree(jsonObj); + for (Map.Entry entry : jsonObj.entrySet()) { + if (!openapiFields.contains(entry.getKey())) { + if (entry.getValue().isJsonPrimitive()) { // primitive type + if (entry.getValue().getAsJsonPrimitive().isString()) + instance.putAdditionalProperty( + entry.getKey(), entry.getValue().getAsString()); + else if (entry.getValue().getAsJsonPrimitive().isNumber()) + instance.putAdditionalProperty( + entry.getKey(), entry.getValue().getAsNumber()); + else if (entry.getValue().getAsJsonPrimitive().isBoolean()) + instance.putAdditionalProperty( + entry.getKey(), + entry.getValue().getAsBoolean()); + else + throw new IllegalArgumentException( + String.format( + "The field `%s` has unknown primitive" + + " type. Value: %s", + entry.getKey(), + entry.getValue().toString())); + } else if (entry.getValue().isJsonArray()) { + instance.putAdditionalProperty( + entry.getKey(), + gson.fromJson(entry.getValue(), List.class)); + } else { // JSON object + instance.putAdditionalProperty( + entry.getKey(), + gson.fromJson(entry.getValue(), HashMap.class)); + } + } + } + return instance; + } + }.nullSafe(); + } + } + + /** + * Create an instance of EventChannelConfig given an JSON string + * + * @param jsonString JSON string + * @return An instance of EventChannelConfig + * @throws IOException if the JSON string is invalid with respect to EventChannelConfig + */ + public static EventChannelConfig fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, EventChannelConfig.class); + } + + /** + * Convert an instance of EventChannelConfig to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} diff --git a/sdks/java/src/main/java/com/thoughtspot/client/model/EventChannelConfigInput.java b/sdks/java/src/main/java/com/thoughtspot/client/model/EventChannelConfigInput.java new file mode 100644 index 000000000..f7bed19a9 --- /dev/null +++ b/sdks/java/src/main/java/com/thoughtspot/client/model/EventChannelConfigInput.java @@ -0,0 +1,457 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client.model; + +import com.google.gson.Gson; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.TypeAdapter; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.reflect.TypeToken; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import com.thoughtspot.client.JSON; +import java.io.IOException; +import java.io.Serializable; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Objects; + +/** EventChannelConfigInput */ +@javax.annotation.Generated( + value = "org.openapitools.codegen.languages.JavaClientCodegen", + comments = "Generator version: 7.12.0") +public class EventChannelConfigInput implements Serializable { + private static final long serialVersionUID = 1L; + + /** Type of event for which communication channels are configured */ + @JsonAdapter(EventTypeEnum.Adapter.class) + public enum EventTypeEnum { + LIVEBOARD_SCHEDULE("LIVEBOARD_SCHEDULE"); + + private String value; + + EventTypeEnum(String value) { + this.value = value; + } + + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + public static EventTypeEnum fromValue(String value) { + for (EventTypeEnum b : EventTypeEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + + public static class Adapter extends TypeAdapter { + @Override + public void write(final JsonWriter jsonWriter, final EventTypeEnum enumeration) + throws IOException { + jsonWriter.value(enumeration.getValue()); + } + + @Override + public EventTypeEnum read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + return EventTypeEnum.fromValue(value); + } + } + + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + String value = jsonElement.getAsString(); + EventTypeEnum.fromValue(value); + } + } + + public static final String SERIALIZED_NAME_EVENT_TYPE = "event_type"; + + @SerializedName(SERIALIZED_NAME_EVENT_TYPE) + @javax.annotation.Nonnull + private EventTypeEnum eventType; + + /** Gets or Sets channels */ + @JsonAdapter(ChannelsEnum.Adapter.class) + public enum ChannelsEnum { + EMAIL("EMAIL"), + + WEBHOOK("WEBHOOK"); + + private String value; + + ChannelsEnum(String value) { + this.value = value; + } + + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + public static ChannelsEnum fromValue(String value) { + for (ChannelsEnum b : ChannelsEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + + public static class Adapter extends TypeAdapter { + @Override + public void write(final JsonWriter jsonWriter, final ChannelsEnum enumeration) + throws IOException { + jsonWriter.value(enumeration.getValue()); + } + + @Override + public ChannelsEnum read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + return ChannelsEnum.fromValue(value); + } + } + + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + String value = jsonElement.getAsString(); + ChannelsEnum.fromValue(value); + } + } + + public static final String SERIALIZED_NAME_CHANNELS = "channels"; + + @SerializedName(SERIALIZED_NAME_CHANNELS) + @javax.annotation.Nonnull + private List channels; + + public EventChannelConfigInput() {} + + public EventChannelConfigInput eventType(@javax.annotation.Nonnull EventTypeEnum eventType) { + this.eventType = eventType; + return this; + } + + /** + * Type of event for which communication channels are configured + * + * @return eventType + */ + @javax.annotation.Nonnull + public EventTypeEnum getEventType() { + return eventType; + } + + public void setEventType(@javax.annotation.Nonnull EventTypeEnum eventType) { + this.eventType = eventType; + } + + public EventChannelConfigInput channels(@javax.annotation.Nonnull List channels) { + this.channels = channels; + return this; + } + + public EventChannelConfigInput addChannelsItem(ChannelsEnum channelsItem) { + if (this.channels == null) { + this.channels = new ArrayList<>(); + } + this.channels.add(channelsItem); + return this; + } + + /** + * Communication channels enabled for this event type. Empty array disables all channels for + * this event. + * + * @return channels + */ + @javax.annotation.Nonnull + public List getChannels() { + return channels; + } + + public void setChannels(@javax.annotation.Nonnull List channels) { + this.channels = channels; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key name of the property + * @param value value of the property + * @return the EventChannelConfigInput instance itself + */ + public EventChannelConfigInput putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return a map of objects + */ + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key name of the property + * @return an object + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + EventChannelConfigInput eventChannelConfigInput = (EventChannelConfigInput) o; + return Objects.equals(this.eventType, eventChannelConfigInput.eventType) + && Objects.equals(this.channels, eventChannelConfigInput.channels) + && Objects.equals( + this.additionalProperties, eventChannelConfigInput.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(eventType, channels, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class EventChannelConfigInput {\n"); + sb.append(" eventType: ").append(toIndentedString(eventType)).append("\n"); + sb.append(" channels: ").append(toIndentedString(channels)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first + * line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("event_type"); + openapiFields.add("channels"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + openapiRequiredFields.add("event_type"); + openapiRequiredFields.add("channels"); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to EventChannelConfigInput + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!EventChannelConfigInput.openapiRequiredFields + .isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException( + String.format( + "The required field(s) %s in EventChannelConfigInput is not found" + + " in the empty JSON string", + EventChannelConfigInput.openapiRequiredFields.toString())); + } + } + + // check to make sure all required properties/fields are present in the JSON string + for (String requiredField : EventChannelConfigInput.openapiRequiredFields) { + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException( + String.format( + "The required field `%s` is not found in the JSON string: %s", + requiredField, jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if (!jsonObj.get("event_type").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `event_type` to be a primitive type in the JSON" + + " string but got `%s`", + jsonObj.get("event_type").toString())); + } + // validate the required field `event_type` + EventTypeEnum.validateJsonElement(jsonObj.get("event_type")); + // ensure the required json array is present + if (jsonObj.get("channels") == null) { + throw new IllegalArgumentException( + "Expected the field `linkedContent` to be an array in the JSON string but got" + + " `null`"); + } else if (!jsonObj.get("channels").isJsonArray()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `channels` to be an array in the JSON string but" + + " got `%s`", + jsonObj.get("channels").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!EventChannelConfigInput.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'EventChannelConfigInput' and its + // subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter = + gson.getDelegateAdapter(this, TypeToken.get(EventChannelConfigInput.class)); + + return (TypeAdapter) + new TypeAdapter() { + @Override + public void write(JsonWriter out, EventChannelConfigInput value) + throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + obj.remove("additionalProperties"); + // serialize additional properties + if (value.getAdditionalProperties() != null) { + for (Map.Entry entry : + value.getAdditionalProperties().entrySet()) { + if (entry.getValue() instanceof String) + obj.addProperty(entry.getKey(), (String) entry.getValue()); + else if (entry.getValue() instanceof Number) + obj.addProperty(entry.getKey(), (Number) entry.getValue()); + else if (entry.getValue() instanceof Boolean) + obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); + else if (entry.getValue() instanceof Character) + obj.addProperty( + entry.getKey(), (Character) entry.getValue()); + else { + JsonElement jsonElement = gson.toJsonTree(entry.getValue()); + if (jsonElement.isJsonArray()) { + obj.add(entry.getKey(), jsonElement.getAsJsonArray()); + } else { + obj.add(entry.getKey(), jsonElement.getAsJsonObject()); + } + } + } + } + elementAdapter.write(out, obj); + } + + @Override + public EventChannelConfigInput read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // store additional fields in the deserialized instance + EventChannelConfigInput instance = thisAdapter.fromJsonTree(jsonObj); + for (Map.Entry entry : jsonObj.entrySet()) { + if (!openapiFields.contains(entry.getKey())) { + if (entry.getValue().isJsonPrimitive()) { // primitive type + if (entry.getValue().getAsJsonPrimitive().isString()) + instance.putAdditionalProperty( + entry.getKey(), entry.getValue().getAsString()); + else if (entry.getValue().getAsJsonPrimitive().isNumber()) + instance.putAdditionalProperty( + entry.getKey(), entry.getValue().getAsNumber()); + else if (entry.getValue().getAsJsonPrimitive().isBoolean()) + instance.putAdditionalProperty( + entry.getKey(), + entry.getValue().getAsBoolean()); + else + throw new IllegalArgumentException( + String.format( + "The field `%s` has unknown primitive" + + " type. Value: %s", + entry.getKey(), + entry.getValue().toString())); + } else if (entry.getValue().isJsonArray()) { + instance.putAdditionalProperty( + entry.getKey(), + gson.fromJson(entry.getValue(), List.class)); + } else { // JSON object + instance.putAdditionalProperty( + entry.getKey(), + gson.fromJson(entry.getValue(), HashMap.class)); + } + } + } + return instance; + } + }.nullSafe(); + } + } + + /** + * Create an instance of EventChannelConfigInput given an JSON string + * + * @param jsonString JSON string + * @return An instance of EventChannelConfigInput + * @throws IOException if the JSON string is invalid with respect to EventChannelConfigInput + */ + public static EventChannelConfigInput fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, EventChannelConfigInput.class); + } + + /** + * Convert an instance of EventChannelConfigInput to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} diff --git a/sdks/java/src/main/java/com/thoughtspot/client/model/ExcludeMetadataListItemInput.java b/sdks/java/src/main/java/com/thoughtspot/client/model/ExcludeMetadataListItemInput.java new file mode 100644 index 000000000..36635225a --- /dev/null +++ b/sdks/java/src/main/java/com/thoughtspot/client/model/ExcludeMetadataListItemInput.java @@ -0,0 +1,429 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client.model; + +import com.google.gson.Gson; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.TypeAdapter; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.reflect.TypeToken; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import com.thoughtspot.client.JSON; +import java.io.IOException; +import java.io.Serializable; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Objects; + +/** ExcludeMetadataListItemInput */ +@javax.annotation.Generated( + value = "org.openapitools.codegen.languages.JavaClientCodegen", + comments = "Generator version: 7.12.0") +public class ExcludeMetadataListItemInput implements Serializable { + private static final long serialVersionUID = 1L; + + public static final String SERIALIZED_NAME_IDENTIFIER = "identifier"; + + @SerializedName(SERIALIZED_NAME_IDENTIFIER) + @javax.annotation.Nonnull + private String identifier; + + /** + * Type of metadata. Required if the name of the object is set as identifier. This attribute is + * optional when the object GUID is specified as identifier. 1. Liveboard 2. Answers 3. + * LOGICAL_TABLE for any data object such as table, worksheet or view 4. LOGICAL_COLUMN for a + * column of any data object such as table, worksheet or view 5. CONNECTION for connection + * objects 6. TAG for tag objects 7. USER for user objects 8. USER_GROUP for group objects 9. + * LOGICAL_RELATIONSHIP for table or worksheet joins. A join combines from one or several data + * object by using matching values. 10. INSIGHT_SPEC for SpotIQ objects + */ + @JsonAdapter(TypeEnum.Adapter.class) + public enum TypeEnum { + LIVEBOARD("LIVEBOARD"), + + ANSWER("ANSWER"), + + LOGICAL_TABLE("LOGICAL_TABLE"), + + LOGICAL_COLUMN("LOGICAL_COLUMN"), + + CONNECTION("CONNECTION"), + + TAG("TAG"), + + USER("USER"), + + USER_GROUP("USER_GROUP"), + + LOGICAL_RELATIONSHIP("LOGICAL_RELATIONSHIP"), + + INSIGHT_SPEC("INSIGHT_SPEC"); + + private String value; + + TypeEnum(String value) { + this.value = value; + } + + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + public static TypeEnum fromValue(String value) { + for (TypeEnum b : TypeEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + + public static class Adapter extends TypeAdapter { + @Override + public void write(final JsonWriter jsonWriter, final TypeEnum enumeration) + throws IOException { + jsonWriter.value(enumeration.getValue()); + } + + @Override + public TypeEnum read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + return TypeEnum.fromValue(value); + } + } + + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + String value = jsonElement.getAsString(); + TypeEnum.fromValue(value); + } + } + + public static final String SERIALIZED_NAME_TYPE = "type"; + + @SerializedName(SERIALIZED_NAME_TYPE) + @javax.annotation.Nonnull + private TypeEnum type; + + public ExcludeMetadataListItemInput() {} + + public ExcludeMetadataListItemInput identifier(@javax.annotation.Nonnull String identifier) { + this.identifier = identifier; + return this; + } + + /** + * Unique ID or name of the metadata. + * + * @return identifier + */ + @javax.annotation.Nonnull + public String getIdentifier() { + return identifier; + } + + public void setIdentifier(@javax.annotation.Nonnull String identifier) { + this.identifier = identifier; + } + + public ExcludeMetadataListItemInput type(@javax.annotation.Nonnull TypeEnum type) { + this.type = type; + return this; + } + + /** + * Type of metadata. Required if the name of the object is set as identifier. This attribute is + * optional when the object GUID is specified as identifier. 1. Liveboard 2. Answers 3. + * LOGICAL_TABLE for any data object such as table, worksheet or view 4. LOGICAL_COLUMN for a + * column of any data object such as table, worksheet or view 5. CONNECTION for connection + * objects 6. TAG for tag objects 7. USER for user objects 8. USER_GROUP for group objects 9. + * LOGICAL_RELATIONSHIP for table or worksheet joins. A join combines from one or several data + * object by using matching values. 10. INSIGHT_SPEC for SpotIQ objects + * + * @return type + */ + @javax.annotation.Nonnull + public TypeEnum getType() { + return type; + } + + public void setType(@javax.annotation.Nonnull TypeEnum type) { + this.type = type; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key name of the property + * @param value value of the property + * @return the ExcludeMetadataListItemInput instance itself + */ + public ExcludeMetadataListItemInput putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return a map of objects + */ + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key name of the property + * @return an object + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ExcludeMetadataListItemInput excludeMetadataListItemInput = + (ExcludeMetadataListItemInput) o; + return Objects.equals(this.identifier, excludeMetadataListItemInput.identifier) + && Objects.equals(this.type, excludeMetadataListItemInput.type) + && Objects.equals( + this.additionalProperties, + excludeMetadataListItemInput.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(identifier, type, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ExcludeMetadataListItemInput {\n"); + sb.append(" identifier: ").append(toIndentedString(identifier)).append("\n"); + sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first + * line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("identifier"); + openapiFields.add("type"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + openapiRequiredFields.add("identifier"); + openapiRequiredFields.add("type"); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to + * ExcludeMetadataListItemInput + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!ExcludeMetadataListItemInput.openapiRequiredFields + .isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException( + String.format( + "The required field(s) %s in ExcludeMetadataListItemInput is not" + + " found in the empty JSON string", + ExcludeMetadataListItemInput.openapiRequiredFields.toString())); + } + } + + // check to make sure all required properties/fields are present in the JSON string + for (String requiredField : ExcludeMetadataListItemInput.openapiRequiredFields) { + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException( + String.format( + "The required field `%s` is not found in the JSON string: %s", + requiredField, jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if (!jsonObj.get("identifier").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `identifier` to be a primitive type in the JSON" + + " string but got `%s`", + jsonObj.get("identifier").toString())); + } + if (!jsonObj.get("type").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `type` to be a primitive type in the JSON string" + + " but got `%s`", + jsonObj.get("type").toString())); + } + // validate the required field `type` + TypeEnum.validateJsonElement(jsonObj.get("type")); + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!ExcludeMetadataListItemInput.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'ExcludeMetadataListItemInput' and its + // subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter = + gson.getDelegateAdapter( + this, TypeToken.get(ExcludeMetadataListItemInput.class)); + + return (TypeAdapter) + new TypeAdapter() { + @Override + public void write(JsonWriter out, ExcludeMetadataListItemInput value) + throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + obj.remove("additionalProperties"); + // serialize additional properties + if (value.getAdditionalProperties() != null) { + for (Map.Entry entry : + value.getAdditionalProperties().entrySet()) { + if (entry.getValue() instanceof String) + obj.addProperty(entry.getKey(), (String) entry.getValue()); + else if (entry.getValue() instanceof Number) + obj.addProperty(entry.getKey(), (Number) entry.getValue()); + else if (entry.getValue() instanceof Boolean) + obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); + else if (entry.getValue() instanceof Character) + obj.addProperty( + entry.getKey(), (Character) entry.getValue()); + else { + JsonElement jsonElement = gson.toJsonTree(entry.getValue()); + if (jsonElement.isJsonArray()) { + obj.add(entry.getKey(), jsonElement.getAsJsonArray()); + } else { + obj.add(entry.getKey(), jsonElement.getAsJsonObject()); + } + } + } + } + elementAdapter.write(out, obj); + } + + @Override + public ExcludeMetadataListItemInput read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // store additional fields in the deserialized instance + ExcludeMetadataListItemInput instance = + thisAdapter.fromJsonTree(jsonObj); + for (Map.Entry entry : jsonObj.entrySet()) { + if (!openapiFields.contains(entry.getKey())) { + if (entry.getValue().isJsonPrimitive()) { // primitive type + if (entry.getValue().getAsJsonPrimitive().isString()) + instance.putAdditionalProperty( + entry.getKey(), entry.getValue().getAsString()); + else if (entry.getValue().getAsJsonPrimitive().isNumber()) + instance.putAdditionalProperty( + entry.getKey(), entry.getValue().getAsNumber()); + else if (entry.getValue().getAsJsonPrimitive().isBoolean()) + instance.putAdditionalProperty( + entry.getKey(), + entry.getValue().getAsBoolean()); + else + throw new IllegalArgumentException( + String.format( + "The field `%s` has unknown primitive" + + " type. Value: %s", + entry.getKey(), + entry.getValue().toString())); + } else if (entry.getValue().isJsonArray()) { + instance.putAdditionalProperty( + entry.getKey(), + gson.fromJson(entry.getValue(), List.class)); + } else { // JSON object + instance.putAdditionalProperty( + entry.getKey(), + gson.fromJson(entry.getValue(), HashMap.class)); + } + } + } + return instance; + } + }.nullSafe(); + } + } + + /** + * Create an instance of ExcludeMetadataListItemInput given an JSON string + * + * @param jsonString JSON string + * @return An instance of ExcludeMetadataListItemInput + * @throws IOException if the JSON string is invalid with respect to + * ExcludeMetadataListItemInput + */ + public static ExcludeMetadataListItemInput fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, ExcludeMetadataListItemInput.class); + } + + /** + * Convert an instance of ExcludeMetadataListItemInput to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} diff --git a/sdks/java/src/main/java/com/thoughtspot/client/model/ExportAnswerReportRequest.java b/sdks/java/src/main/java/com/thoughtspot/client/model/ExportAnswerReportRequest.java new file mode 100644 index 000000000..dc83fc9e9 --- /dev/null +++ b/sdks/java/src/main/java/com/thoughtspot/client/model/ExportAnswerReportRequest.java @@ -0,0 +1,769 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client.model; + +import com.google.gson.Gson; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.TypeAdapter; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.reflect.TypeToken; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import com.thoughtspot.client.JSON; +import java.io.IOException; +import java.io.Serializable; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Objects; + +/** ExportAnswerReportRequest */ +@javax.annotation.Generated( + value = "org.openapitools.codegen.languages.JavaClientCodegen", + comments = "Generator version: 7.12.0") +public class ExportAnswerReportRequest implements Serializable { + private static final long serialVersionUID = 1L; + + public static final String SERIALIZED_NAME_METADATA_IDENTIFIER = "metadata_identifier"; + + @SerializedName(SERIALIZED_NAME_METADATA_IDENTIFIER) + @javax.annotation.Nullable + private String metadataIdentifier; + + public static final String SERIALIZED_NAME_SESSION_IDENTIFIER = "session_identifier"; + + @SerializedName(SERIALIZED_NAME_SESSION_IDENTIFIER) + @javax.annotation.Nullable + private String sessionIdentifier; + + public static final String SERIALIZED_NAME_GENERATION_NUMBER = "generation_number"; + + @SerializedName(SERIALIZED_NAME_GENERATION_NUMBER) + @javax.annotation.Nullable + private Integer generationNumber; + + /** Export file format. */ + @JsonAdapter(FileFormatEnum.Adapter.class) + public enum FileFormatEnum { + CSV("CSV"), + + PDF("PDF"), + + XLSX("XLSX"), + + PNG("PNG"); + + private String value; + + FileFormatEnum(String value) { + this.value = value; + } + + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + public static FileFormatEnum fromValue(String value) { + for (FileFormatEnum b : FileFormatEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + + public static class Adapter extends TypeAdapter { + @Override + public void write(final JsonWriter jsonWriter, final FileFormatEnum enumeration) + throws IOException { + jsonWriter.value(enumeration.getValue()); + } + + @Override + public FileFormatEnum read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + return FileFormatEnum.fromValue(value); + } + } + + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + String value = jsonElement.getAsString(); + FileFormatEnum.fromValue(value); + } + } + + public static final String SERIALIZED_NAME_FILE_FORMAT = "file_format"; + + @SerializedName(SERIALIZED_NAME_FILE_FORMAT) + @javax.annotation.Nullable + private FileFormatEnum fileFormat = FileFormatEnum.CSV; + + public static final String SERIALIZED_NAME_RUNTIME_FILTER = "runtime_filter"; + + @SerializedName(SERIALIZED_NAME_RUNTIME_FILTER) + @javax.annotation.Nullable + private Object runtimeFilter; + + public static final String SERIALIZED_NAME_RUNTIME_SORT = "runtime_sort"; + + @SerializedName(SERIALIZED_NAME_RUNTIME_SORT) + @javax.annotation.Nullable + private Object runtimeSort; + + public static final String SERIALIZED_NAME_RUNTIME_PARAM_OVERRIDE = "runtime_param_override"; + + @SerializedName(SERIALIZED_NAME_RUNTIME_PARAM_OVERRIDE) + @javax.annotation.Nullable + private Object runtimeParamOverride; + + public static final String SERIALIZED_NAME_REGIONAL_SETTINGS = "regional_settings"; + + @SerializedName(SERIALIZED_NAME_REGIONAL_SETTINGS) + @javax.annotation.Nullable + private RegionalSettingsInput regionalSettings; + + public static final String SERIALIZED_NAME_PNG_OPTIONS = "png_options"; + + @SerializedName(SERIALIZED_NAME_PNG_OPTIONS) + @javax.annotation.Nullable + private AnswerPngOptionsInput pngOptions; + + public static final String SERIALIZED_NAME_PERSONALISED_VIEW_IDENTIFIER = + "personalised_view_identifier"; + + @SerializedName(SERIALIZED_NAME_PERSONALISED_VIEW_IDENTIFIER) + @javax.annotation.Nullable + private String personalisedViewIdentifier; + + /** Type of the answer being exported. Version: 26.6.0.cl or later */ + @JsonAdapter(TypeEnum.Adapter.class) + public enum TypeEnum { + SAVED("SAVED"), + + PINNED("PINNED"); + + private String value; + + TypeEnum(String value) { + this.value = value; + } + + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + public static TypeEnum fromValue(String value) { + for (TypeEnum b : TypeEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + + public static class Adapter extends TypeAdapter { + @Override + public void write(final JsonWriter jsonWriter, final TypeEnum enumeration) + throws IOException { + jsonWriter.value(enumeration.getValue()); + } + + @Override + public TypeEnum read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + return TypeEnum.fromValue(value); + } + } + + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + String value = jsonElement.getAsString(); + TypeEnum.fromValue(value); + } + } + + public static final String SERIALIZED_NAME_TYPE = "type"; + + @SerializedName(SERIALIZED_NAME_TYPE) + @javax.annotation.Nullable + private TypeEnum type = TypeEnum.SAVED; + + public ExportAnswerReportRequest() {} + + public ExportAnswerReportRequest metadataIdentifier( + @javax.annotation.Nullable String metadataIdentifier) { + this.metadataIdentifier = metadataIdentifier; + return this; + } + + /** + * Unique ID or name of the metadata object. + * + * @return metadataIdentifier + */ + @javax.annotation.Nullable + public String getMetadataIdentifier() { + return metadataIdentifier; + } + + public void setMetadataIdentifier(@javax.annotation.Nullable String metadataIdentifier) { + this.metadataIdentifier = metadataIdentifier; + } + + public ExportAnswerReportRequest sessionIdentifier( + @javax.annotation.Nullable String sessionIdentifier) { + this.sessionIdentifier = sessionIdentifier; + return this; + } + + /** + * Unique ID of the answer session. + * + * @return sessionIdentifier + */ + @javax.annotation.Nullable + public String getSessionIdentifier() { + return sessionIdentifier; + } + + public void setSessionIdentifier(@javax.annotation.Nullable String sessionIdentifier) { + this.sessionIdentifier = sessionIdentifier; + } + + public ExportAnswerReportRequest generationNumber( + @javax.annotation.Nullable Integer generationNumber) { + this.generationNumber = generationNumber; + return this; + } + + /** + * Generation number of the answer session. + * + * @return generationNumber + */ + @javax.annotation.Nullable + public Integer getGenerationNumber() { + return generationNumber; + } + + public void setGenerationNumber(@javax.annotation.Nullable Integer generationNumber) { + this.generationNumber = generationNumber; + } + + public ExportAnswerReportRequest fileFormat( + @javax.annotation.Nullable FileFormatEnum fileFormat) { + this.fileFormat = fileFormat; + return this; + } + + /** + * Export file format. + * + * @return fileFormat + */ + @javax.annotation.Nullable + public FileFormatEnum getFileFormat() { + return fileFormat; + } + + public void setFileFormat(@javax.annotation.Nullable FileFormatEnum fileFormat) { + this.fileFormat = fileFormat; + } + + public ExportAnswerReportRequest runtimeFilter( + @javax.annotation.Nullable Object runtimeFilter) { + this.runtimeFilter = runtimeFilter; + return this; + } + + /** + * JSON string representing runtime filter. { col1:region, op1: EQ, val1: northeast } + * + * @return runtimeFilter + */ + @javax.annotation.Nullable + public Object getRuntimeFilter() { + return runtimeFilter; + } + + public void setRuntimeFilter(@javax.annotation.Nullable Object runtimeFilter) { + this.runtimeFilter = runtimeFilter; + } + + public ExportAnswerReportRequest runtimeSort(@javax.annotation.Nullable Object runtimeSort) { + this.runtimeSort = runtimeSort; + return this; + } + + /** + * JSON string representing runtime sort. { sortCol1: region, asc1 :true, sortCol2 : date } + * + * @return runtimeSort + */ + @javax.annotation.Nullable + public Object getRuntimeSort() { + return runtimeSort; + } + + public void setRuntimeSort(@javax.annotation.Nullable Object runtimeSort) { + this.runtimeSort = runtimeSort; + } + + public ExportAnswerReportRequest runtimeParamOverride( + @javax.annotation.Nullable Object runtimeParamOverride) { + this.runtimeParamOverride = runtimeParamOverride; + return this; + } + + /** + * JSON object for setting values of parameters in runtime. + * + * @return runtimeParamOverride + */ + @javax.annotation.Nullable + public Object getRuntimeParamOverride() { + return runtimeParamOverride; + } + + public void setRuntimeParamOverride(@javax.annotation.Nullable Object runtimeParamOverride) { + this.runtimeParamOverride = runtimeParamOverride; + } + + public ExportAnswerReportRequest regionalSettings( + @javax.annotation.Nullable RegionalSettingsInput regionalSettings) { + this.regionalSettings = regionalSettings; + return this; + } + + /** + * Options for specific region specific overrides to support date/number/string/currency + * formatting. + * + * @return regionalSettings + */ + @javax.annotation.Nullable + public RegionalSettingsInput getRegionalSettings() { + return regionalSettings; + } + + public void setRegionalSettings( + @javax.annotation.Nullable RegionalSettingsInput regionalSettings) { + this.regionalSettings = regionalSettings; + } + + public ExportAnswerReportRequest pngOptions( + @javax.annotation.Nullable AnswerPngOptionsInput pngOptions) { + this.pngOptions = pngOptions; + return this; + } + + /** + * Options for PNG export. Version: 26.6.0.cl or later + * + * @return pngOptions + */ + @javax.annotation.Nullable + public AnswerPngOptionsInput getPngOptions() { + return pngOptions; + } + + public void setPngOptions(@javax.annotation.Nullable AnswerPngOptionsInput pngOptions) { + this.pngOptions = pngOptions; + } + + public ExportAnswerReportRequest personalisedViewIdentifier( + @javax.annotation.Nullable String personalisedViewIdentifier) { + this.personalisedViewIdentifier = personalisedViewIdentifier; + return this; + } + + /** + * GUID or name of the personalised view of the Answer object. Version: 26.6.0.cl or later + * + * @return personalisedViewIdentifier + */ + @javax.annotation.Nullable + public String getPersonalisedViewIdentifier() { + return personalisedViewIdentifier; + } + + public void setPersonalisedViewIdentifier( + @javax.annotation.Nullable String personalisedViewIdentifier) { + this.personalisedViewIdentifier = personalisedViewIdentifier; + } + + public ExportAnswerReportRequest type(@javax.annotation.Nullable TypeEnum type) { + this.type = type; + return this; + } + + /** + * Type of the answer being exported. Version: 26.6.0.cl or later + * + * @return type + */ + @javax.annotation.Nullable + public TypeEnum getType() { + return type; + } + + public void setType(@javax.annotation.Nullable TypeEnum type) { + this.type = type; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key name of the property + * @param value value of the property + * @return the ExportAnswerReportRequest instance itself + */ + public ExportAnswerReportRequest putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return a map of objects + */ + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key name of the property + * @return an object + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ExportAnswerReportRequest exportAnswerReportRequest = (ExportAnswerReportRequest) o; + return Objects.equals(this.metadataIdentifier, exportAnswerReportRequest.metadataIdentifier) + && Objects.equals( + this.sessionIdentifier, exportAnswerReportRequest.sessionIdentifier) + && Objects.equals(this.generationNumber, exportAnswerReportRequest.generationNumber) + && Objects.equals(this.fileFormat, exportAnswerReportRequest.fileFormat) + && Objects.equals(this.runtimeFilter, exportAnswerReportRequest.runtimeFilter) + && Objects.equals(this.runtimeSort, exportAnswerReportRequest.runtimeSort) + && Objects.equals( + this.runtimeParamOverride, exportAnswerReportRequest.runtimeParamOverride) + && Objects.equals(this.regionalSettings, exportAnswerReportRequest.regionalSettings) + && Objects.equals(this.pngOptions, exportAnswerReportRequest.pngOptions) + && Objects.equals( + this.personalisedViewIdentifier, + exportAnswerReportRequest.personalisedViewIdentifier) + && Objects.equals(this.type, exportAnswerReportRequest.type) + && Objects.equals( + this.additionalProperties, exportAnswerReportRequest.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash( + metadataIdentifier, + sessionIdentifier, + generationNumber, + fileFormat, + runtimeFilter, + runtimeSort, + runtimeParamOverride, + regionalSettings, + pngOptions, + personalisedViewIdentifier, + type, + additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ExportAnswerReportRequest {\n"); + sb.append(" metadataIdentifier: ") + .append(toIndentedString(metadataIdentifier)) + .append("\n"); + sb.append(" sessionIdentifier: ") + .append(toIndentedString(sessionIdentifier)) + .append("\n"); + sb.append(" generationNumber: ").append(toIndentedString(generationNumber)).append("\n"); + sb.append(" fileFormat: ").append(toIndentedString(fileFormat)).append("\n"); + sb.append(" runtimeFilter: ").append(toIndentedString(runtimeFilter)).append("\n"); + sb.append(" runtimeSort: ").append(toIndentedString(runtimeSort)).append("\n"); + sb.append(" runtimeParamOverride: ") + .append(toIndentedString(runtimeParamOverride)) + .append("\n"); + sb.append(" regionalSettings: ").append(toIndentedString(regionalSettings)).append("\n"); + sb.append(" pngOptions: ").append(toIndentedString(pngOptions)).append("\n"); + sb.append(" personalisedViewIdentifier: ") + .append(toIndentedString(personalisedViewIdentifier)) + .append("\n"); + sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first + * line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("metadata_identifier"); + openapiFields.add("session_identifier"); + openapiFields.add("generation_number"); + openapiFields.add("file_format"); + openapiFields.add("runtime_filter"); + openapiFields.add("runtime_sort"); + openapiFields.add("runtime_param_override"); + openapiFields.add("regional_settings"); + openapiFields.add("png_options"); + openapiFields.add("personalised_view_identifier"); + openapiFields.add("type"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to ExportAnswerReportRequest + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!ExportAnswerReportRequest.openapiRequiredFields + .isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException( + String.format( + "The required field(s) %s in ExportAnswerReportRequest is not" + + " found in the empty JSON string", + ExportAnswerReportRequest.openapiRequiredFields.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if ((jsonObj.get("metadata_identifier") != null + && !jsonObj.get("metadata_identifier").isJsonNull()) + && !jsonObj.get("metadata_identifier").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `metadata_identifier` to be a primitive type in" + + " the JSON string but got `%s`", + jsonObj.get("metadata_identifier").toString())); + } + if ((jsonObj.get("session_identifier") != null + && !jsonObj.get("session_identifier").isJsonNull()) + && !jsonObj.get("session_identifier").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `session_identifier` to be a primitive type in the" + + " JSON string but got `%s`", + jsonObj.get("session_identifier").toString())); + } + if ((jsonObj.get("file_format") != null && !jsonObj.get("file_format").isJsonNull()) + && !jsonObj.get("file_format").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `file_format` to be a primitive type in the JSON" + + " string but got `%s`", + jsonObj.get("file_format").toString())); + } + // validate the optional field `file_format` + if (jsonObj.get("file_format") != null && !jsonObj.get("file_format").isJsonNull()) { + FileFormatEnum.validateJsonElement(jsonObj.get("file_format")); + } + // validate the optional field `regional_settings` + if (jsonObj.get("regional_settings") != null + && !jsonObj.get("regional_settings").isJsonNull()) { + RegionalSettingsInput.validateJsonElement(jsonObj.get("regional_settings")); + } + // validate the optional field `png_options` + if (jsonObj.get("png_options") != null && !jsonObj.get("png_options").isJsonNull()) { + AnswerPngOptionsInput.validateJsonElement(jsonObj.get("png_options")); + } + if ((jsonObj.get("personalised_view_identifier") != null + && !jsonObj.get("personalised_view_identifier").isJsonNull()) + && !jsonObj.get("personalised_view_identifier").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `personalised_view_identifier` to be a primitive" + + " type in the JSON string but got `%s`", + jsonObj.get("personalised_view_identifier").toString())); + } + if ((jsonObj.get("type") != null && !jsonObj.get("type").isJsonNull()) + && !jsonObj.get("type").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `type` to be a primitive type in the JSON string" + + " but got `%s`", + jsonObj.get("type").toString())); + } + // validate the optional field `type` + if (jsonObj.get("type") != null && !jsonObj.get("type").isJsonNull()) { + TypeEnum.validateJsonElement(jsonObj.get("type")); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!ExportAnswerReportRequest.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'ExportAnswerReportRequest' and its + // subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter = + gson.getDelegateAdapter(this, TypeToken.get(ExportAnswerReportRequest.class)); + + return (TypeAdapter) + new TypeAdapter() { + @Override + public void write(JsonWriter out, ExportAnswerReportRequest value) + throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + obj.remove("additionalProperties"); + // serialize additional properties + if (value.getAdditionalProperties() != null) { + for (Map.Entry entry : + value.getAdditionalProperties().entrySet()) { + if (entry.getValue() instanceof String) + obj.addProperty(entry.getKey(), (String) entry.getValue()); + else if (entry.getValue() instanceof Number) + obj.addProperty(entry.getKey(), (Number) entry.getValue()); + else if (entry.getValue() instanceof Boolean) + obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); + else if (entry.getValue() instanceof Character) + obj.addProperty( + entry.getKey(), (Character) entry.getValue()); + else { + JsonElement jsonElement = gson.toJsonTree(entry.getValue()); + if (jsonElement.isJsonArray()) { + obj.add(entry.getKey(), jsonElement.getAsJsonArray()); + } else { + obj.add(entry.getKey(), jsonElement.getAsJsonObject()); + } + } + } + } + elementAdapter.write(out, obj); + } + + @Override + public ExportAnswerReportRequest read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // store additional fields in the deserialized instance + ExportAnswerReportRequest instance = thisAdapter.fromJsonTree(jsonObj); + for (Map.Entry entry : jsonObj.entrySet()) { + if (!openapiFields.contains(entry.getKey())) { + if (entry.getValue().isJsonPrimitive()) { // primitive type + if (entry.getValue().getAsJsonPrimitive().isString()) + instance.putAdditionalProperty( + entry.getKey(), entry.getValue().getAsString()); + else if (entry.getValue().getAsJsonPrimitive().isNumber()) + instance.putAdditionalProperty( + entry.getKey(), entry.getValue().getAsNumber()); + else if (entry.getValue().getAsJsonPrimitive().isBoolean()) + instance.putAdditionalProperty( + entry.getKey(), + entry.getValue().getAsBoolean()); + else + throw new IllegalArgumentException( + String.format( + "The field `%s` has unknown primitive" + + " type. Value: %s", + entry.getKey(), + entry.getValue().toString())); + } else if (entry.getValue().isJsonArray()) { + instance.putAdditionalProperty( + entry.getKey(), + gson.fromJson(entry.getValue(), List.class)); + } else { // JSON object + instance.putAdditionalProperty( + entry.getKey(), + gson.fromJson(entry.getValue(), HashMap.class)); + } + } + } + return instance; + } + }.nullSafe(); + } + } + + /** + * Create an instance of ExportAnswerReportRequest given an JSON string + * + * @param jsonString JSON string + * @return An instance of ExportAnswerReportRequest + * @throws IOException if the JSON string is invalid with respect to ExportAnswerReportRequest + */ + public static ExportAnswerReportRequest fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, ExportAnswerReportRequest.class); + } + + /** + * Convert an instance of ExportAnswerReportRequest to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} diff --git a/sdks/java/src/main/java/com/thoughtspot/client/model/ExportLiveboardReportRequest.java b/sdks/java/src/main/java/com/thoughtspot/client/model/ExportLiveboardReportRequest.java new file mode 100644 index 000000000..a5fe59d14 --- /dev/null +++ b/sdks/java/src/main/java/com/thoughtspot/client/model/ExportLiveboardReportRequest.java @@ -0,0 +1,853 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client.model; + +import com.google.gson.Gson; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.TypeAdapter; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.reflect.TypeToken; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import com.thoughtspot.client.JSON; +import java.io.IOException; +import java.io.Serializable; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Objects; + +/** ExportLiveboardReportRequest */ +@javax.annotation.Generated( + value = "org.openapitools.codegen.languages.JavaClientCodegen", + comments = "Generator version: 7.12.0") +public class ExportLiveboardReportRequest implements Serializable { + private static final long serialVersionUID = 1L; + + public static final String SERIALIZED_NAME_METADATA_IDENTIFIER = "metadata_identifier"; + + @SerializedName(SERIALIZED_NAME_METADATA_IDENTIFIER) + @javax.annotation.Nonnull + private String metadataIdentifier; + + public static final String SERIALIZED_NAME_TAB_IDENTIFIERS = "tab_identifiers"; + + @SerializedName(SERIALIZED_NAME_TAB_IDENTIFIERS) + @javax.annotation.Nullable + private List tabIdentifiers; + + public static final String SERIALIZED_NAME_PERSONALISED_VIEW_IDENTIFIER = + "personalised_view_identifier"; + + @SerializedName(SERIALIZED_NAME_PERSONALISED_VIEW_IDENTIFIER) + @javax.annotation.Nullable + private String personalisedViewIdentifier; + + public static final String SERIALIZED_NAME_VISUALIZATION_IDENTIFIERS = + "visualization_identifiers"; + + @SerializedName(SERIALIZED_NAME_VISUALIZATION_IDENTIFIERS) + @javax.annotation.Nullable + private List visualizationIdentifiers; + + public static final String SERIALIZED_NAME_TRANSIENT_CONTENT = "transient_content"; + + @SerializedName(SERIALIZED_NAME_TRANSIENT_CONTENT) + @javax.annotation.Nullable + private String transientContent; + + /** Export file format. */ + @JsonAdapter(FileFormatEnum.Adapter.class) + public enum FileFormatEnum { + PDF("PDF"), + + PNG("PNG"), + + CSV("CSV"), + + XLSX("XLSX"); + + private String value; + + FileFormatEnum(String value) { + this.value = value; + } + + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + public static FileFormatEnum fromValue(String value) { + for (FileFormatEnum b : FileFormatEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + + public static class Adapter extends TypeAdapter { + @Override + public void write(final JsonWriter jsonWriter, final FileFormatEnum enumeration) + throws IOException { + jsonWriter.value(enumeration.getValue()); + } + + @Override + public FileFormatEnum read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + return FileFormatEnum.fromValue(value); + } + } + + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + String value = jsonElement.getAsString(); + FileFormatEnum.fromValue(value); + } + } + + public static final String SERIALIZED_NAME_FILE_FORMAT = "file_format"; + + @SerializedName(SERIALIZED_NAME_FILE_FORMAT) + @javax.annotation.Nullable + private FileFormatEnum fileFormat = FileFormatEnum.PDF; + + public static final String SERIALIZED_NAME_RUNTIME_FILTER = "runtime_filter"; + + @SerializedName(SERIALIZED_NAME_RUNTIME_FILTER) + @javax.annotation.Nullable + private Object runtimeFilter; + + public static final String SERIALIZED_NAME_OVERRIDE_FILTERS = "override_filters"; + + @SerializedName(SERIALIZED_NAME_OVERRIDE_FILTERS) + @javax.annotation.Nullable + private Object overrideFilters; + + public static final String SERIALIZED_NAME_RUNTIME_SORT = "runtime_sort"; + + @SerializedName(SERIALIZED_NAME_RUNTIME_SORT) + @javax.annotation.Nullable + private Object runtimeSort; + + public static final String SERIALIZED_NAME_PDF_OPTIONS = "pdf_options"; + + @SerializedName(SERIALIZED_NAME_PDF_OPTIONS) + @javax.annotation.Nullable + private PdfOptionsInput pdfOptions; + + public static final String SERIALIZED_NAME_PNG_OPTIONS = "png_options"; + + @SerializedName(SERIALIZED_NAME_PNG_OPTIONS) + @javax.annotation.Nullable + private PngOptionsInput pngOptions; + + public static final String SERIALIZED_NAME_RUNTIME_PARAM_OVERRIDE = "runtime_param_override"; + + @SerializedName(SERIALIZED_NAME_RUNTIME_PARAM_OVERRIDE) + @javax.annotation.Nullable + private Object runtimeParamOverride; + + public static final String SERIALIZED_NAME_REGIONAL_SETTINGS = "regional_settings"; + + @SerializedName(SERIALIZED_NAME_REGIONAL_SETTINGS) + @javax.annotation.Nullable + private RegionalSettingsInput regionalSettings; + + public ExportLiveboardReportRequest() {} + + public ExportLiveboardReportRequest metadataIdentifier( + @javax.annotation.Nonnull String metadataIdentifier) { + this.metadataIdentifier = metadataIdentifier; + return this; + } + + /** + * GUID or name of the Liveboard object. + * + * @return metadataIdentifier + */ + @javax.annotation.Nonnull + public String getMetadataIdentifier() { + return metadataIdentifier; + } + + public void setMetadataIdentifier(@javax.annotation.Nonnull String metadataIdentifier) { + this.metadataIdentifier = metadataIdentifier; + } + + public ExportLiveboardReportRequest tabIdentifiers( + @javax.annotation.Nullable List tabIdentifiers) { + this.tabIdentifiers = tabIdentifiers; + return this; + } + + public ExportLiveboardReportRequest addTabIdentifiersItem(String tabIdentifiersItem) { + if (this.tabIdentifiers == null) { + this.tabIdentifiers = new ArrayList<>(); + } + this.tabIdentifiers.add(tabIdentifiersItem); + return this; + } + + /** + * GUID or name of the tab of the Liveboard object. Version: 10.9.0.cl or later + * + * @return tabIdentifiers + */ + @javax.annotation.Nullable + public List getTabIdentifiers() { + return tabIdentifiers; + } + + public void setTabIdentifiers(@javax.annotation.Nullable List tabIdentifiers) { + this.tabIdentifiers = tabIdentifiers; + } + + public ExportLiveboardReportRequest personalisedViewIdentifier( + @javax.annotation.Nullable String personalisedViewIdentifier) { + this.personalisedViewIdentifier = personalisedViewIdentifier; + return this; + } + + /** + * GUID or name of the personalised view of the Liveboard object. Version: 10.9.0.cl or later + * + * @return personalisedViewIdentifier + */ + @javax.annotation.Nullable + public String getPersonalisedViewIdentifier() { + return personalisedViewIdentifier; + } + + public void setPersonalisedViewIdentifier( + @javax.annotation.Nullable String personalisedViewIdentifier) { + this.personalisedViewIdentifier = personalisedViewIdentifier; + } + + public ExportLiveboardReportRequest visualizationIdentifiers( + @javax.annotation.Nullable List visualizationIdentifiers) { + this.visualizationIdentifiers = visualizationIdentifiers; + return this; + } + + public ExportLiveboardReportRequest addVisualizationIdentifiersItem( + String visualizationIdentifiersItem) { + if (this.visualizationIdentifiers == null) { + this.visualizationIdentifiers = new ArrayList<>(); + } + this.visualizationIdentifiers.add(visualizationIdentifiersItem); + return this; + } + + /** + * GUID or name of visualizations on the Liveboard. If this parameter is not defined, the API + * returns a report with all visualizations saved on a Liveboard. + * + * @return visualizationIdentifiers + */ + @javax.annotation.Nullable + public List getVisualizationIdentifiers() { + return visualizationIdentifiers; + } + + public void setVisualizationIdentifiers( + @javax.annotation.Nullable List visualizationIdentifiers) { + this.visualizationIdentifiers = visualizationIdentifiers; + } + + public ExportLiveboardReportRequest transientContent( + @javax.annotation.Nullable String transientContent) { + this.transientContent = transientContent; + return this; + } + + /** + * Transient content of the Liveboard. + * + * @return transientContent + */ + @javax.annotation.Nullable + public String getTransientContent() { + return transientContent; + } + + public void setTransientContent(@javax.annotation.Nullable String transientContent) { + this.transientContent = transientContent; + } + + public ExportLiveboardReportRequest fileFormat( + @javax.annotation.Nullable FileFormatEnum fileFormat) { + this.fileFormat = fileFormat; + return this; + } + + /** + * Export file format. + * + * @return fileFormat + */ + @javax.annotation.Nullable + public FileFormatEnum getFileFormat() { + return fileFormat; + } + + public void setFileFormat(@javax.annotation.Nullable FileFormatEnum fileFormat) { + this.fileFormat = fileFormat; + } + + public ExportLiveboardReportRequest runtimeFilter( + @javax.annotation.Nullable Object runtimeFilter) { + this.runtimeFilter = runtimeFilter; + return this; + } + + /** + * JSON object with representing filter condition to apply filters at runtime. For example, + * {\"col1\": \"region\", \"op1\": \"EQ\", + * \"val1\": \"northeast\" }. You can add multiple keys by incrementing the + * number at the end, for example, col2, op2, val2. For more information, see [API + * Documentation](https://developers.thoughtspot.com/docs/fetch-data-and-report-apis#_runtime_filters). + * + * @return runtimeFilter + */ + @javax.annotation.Nullable + public Object getRuntimeFilter() { + return runtimeFilter; + } + + public void setRuntimeFilter(@javax.annotation.Nullable Object runtimeFilter) { + this.runtimeFilter = runtimeFilter; + } + + public ExportLiveboardReportRequest overrideFilters( + @javax.annotation.Nullable Object overrideFilters) { + this.overrideFilters = overrideFilters; + return this; + } + + /** + * Applied to the liveboard and overrides any filters already applied on the same columns in + * liveboard. Following example illustrate different kinds of filters: { + * \"override_filters\": [ { \"column_name\": \"Color\", + * \"generic_filter\": { \"op\": \"IN\", \"values\": [ + * \"almond\", \"turquoise\" ] }, \"negate\": false }, { + * \"column_name\": \"Commit Date\", \"date_filter\": { + * \"datePeriod\": \"HOUR\", \"number\": 3, \"type\": + * \"LAST_N_PERIOD\", \"op\": \"EQ\" } }, { + * \"column_name\": \"Sales\", \"generic_filter\": { + * \"op\": \"BW_INC\", \"values\": [ \"100000\", + * \"70000\" ] }, \"negate\": true } ] } + * + * @return overrideFilters + */ + @javax.annotation.Nullable + public Object getOverrideFilters() { + return overrideFilters; + } + + public void setOverrideFilters(@javax.annotation.Nullable Object overrideFilters) { + this.overrideFilters = overrideFilters; + } + + public ExportLiveboardReportRequest runtimeSort(@javax.annotation.Nullable Object runtimeSort) { + this.runtimeSort = runtimeSort; + return this; + } + + /** + * JSON string representing runtime sort. For example, {\"sortCol1\": + * \"region\", \"asc1\" : true}. For more information, see [API + * Documentation](https://developers.thoughtspot.com/docs/fetch-data-and-report-apis#_runtime_sort). + * + * @return runtimeSort + */ + @javax.annotation.Nullable + public Object getRuntimeSort() { + return runtimeSort; + } + + public void setRuntimeSort(@javax.annotation.Nullable Object runtimeSort) { + this.runtimeSort = runtimeSort; + } + + public ExportLiveboardReportRequest pdfOptions( + @javax.annotation.Nullable PdfOptionsInput pdfOptions) { + this.pdfOptions = pdfOptions; + return this; + } + + /** + * Options for PDF export. + * + * @return pdfOptions + */ + @javax.annotation.Nullable + public PdfOptionsInput getPdfOptions() { + return pdfOptions; + } + + public void setPdfOptions(@javax.annotation.Nullable PdfOptionsInput pdfOptions) { + this.pdfOptions = pdfOptions; + } + + public ExportLiveboardReportRequest pngOptions( + @javax.annotation.Nullable PngOptionsInput pngOptions) { + this.pngOptions = pngOptions; + return this; + } + + /** + * Options for PNG export. + * + * @return pngOptions + */ + @javax.annotation.Nullable + public PngOptionsInput getPngOptions() { + return pngOptions; + } + + public void setPngOptions(@javax.annotation.Nullable PngOptionsInput pngOptions) { + this.pngOptions = pngOptions; + } + + public ExportLiveboardReportRequest runtimeParamOverride( + @javax.annotation.Nullable Object runtimeParamOverride) { + this.runtimeParamOverride = runtimeParamOverride; + return this; + } + + /** + * JSON object for setting values of parameters at runtime. For example, <code> + * {\"param1\": \"Double List Param\", \"paramVal1\": + * 0.5}</code>. You can add multiple keys by incrementing the number at the end, for + * example, param2, paramVal2. For more information, see [API + * Documentation](https://developers.thoughtspot.com/docs/fetch-data-and-report-apis#_runtime_parameters). + * + * @return runtimeParamOverride + */ + @javax.annotation.Nullable + public Object getRuntimeParamOverride() { + return runtimeParamOverride; + } + + public void setRuntimeParamOverride(@javax.annotation.Nullable Object runtimeParamOverride) { + this.runtimeParamOverride = runtimeParamOverride; + } + + public ExportLiveboardReportRequest regionalSettings( + @javax.annotation.Nullable RegionalSettingsInput regionalSettings) { + this.regionalSettings = regionalSettings; + return this; + } + + /** + * Options for specific region specific overrides to support date/number/string/currency + * formatting. + * + * @return regionalSettings + */ + @javax.annotation.Nullable + public RegionalSettingsInput getRegionalSettings() { + return regionalSettings; + } + + public void setRegionalSettings( + @javax.annotation.Nullable RegionalSettingsInput regionalSettings) { + this.regionalSettings = regionalSettings; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key name of the property + * @param value value of the property + * @return the ExportLiveboardReportRequest instance itself + */ + public ExportLiveboardReportRequest putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return a map of objects + */ + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key name of the property + * @return an object + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ExportLiveboardReportRequest exportLiveboardReportRequest = + (ExportLiveboardReportRequest) o; + return Objects.equals( + this.metadataIdentifier, exportLiveboardReportRequest.metadataIdentifier) + && Objects.equals(this.tabIdentifiers, exportLiveboardReportRequest.tabIdentifiers) + && Objects.equals( + this.personalisedViewIdentifier, + exportLiveboardReportRequest.personalisedViewIdentifier) + && Objects.equals( + this.visualizationIdentifiers, + exportLiveboardReportRequest.visualizationIdentifiers) + && Objects.equals( + this.transientContent, exportLiveboardReportRequest.transientContent) + && Objects.equals(this.fileFormat, exportLiveboardReportRequest.fileFormat) + && Objects.equals(this.runtimeFilter, exportLiveboardReportRequest.runtimeFilter) + && Objects.equals( + this.overrideFilters, exportLiveboardReportRequest.overrideFilters) + && Objects.equals(this.runtimeSort, exportLiveboardReportRequest.runtimeSort) + && Objects.equals(this.pdfOptions, exportLiveboardReportRequest.pdfOptions) + && Objects.equals(this.pngOptions, exportLiveboardReportRequest.pngOptions) + && Objects.equals( + this.runtimeParamOverride, + exportLiveboardReportRequest.runtimeParamOverride) + && Objects.equals( + this.regionalSettings, exportLiveboardReportRequest.regionalSettings) + && Objects.equals( + this.additionalProperties, + exportLiveboardReportRequest.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash( + metadataIdentifier, + tabIdentifiers, + personalisedViewIdentifier, + visualizationIdentifiers, + transientContent, + fileFormat, + runtimeFilter, + overrideFilters, + runtimeSort, + pdfOptions, + pngOptions, + runtimeParamOverride, + regionalSettings, + additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ExportLiveboardReportRequest {\n"); + sb.append(" metadataIdentifier: ") + .append(toIndentedString(metadataIdentifier)) + .append("\n"); + sb.append(" tabIdentifiers: ").append(toIndentedString(tabIdentifiers)).append("\n"); + sb.append(" personalisedViewIdentifier: ") + .append(toIndentedString(personalisedViewIdentifier)) + .append("\n"); + sb.append(" visualizationIdentifiers: ") + .append(toIndentedString(visualizationIdentifiers)) + .append("\n"); + sb.append(" transientContent: ").append(toIndentedString(transientContent)).append("\n"); + sb.append(" fileFormat: ").append(toIndentedString(fileFormat)).append("\n"); + sb.append(" runtimeFilter: ").append(toIndentedString(runtimeFilter)).append("\n"); + sb.append(" overrideFilters: ").append(toIndentedString(overrideFilters)).append("\n"); + sb.append(" runtimeSort: ").append(toIndentedString(runtimeSort)).append("\n"); + sb.append(" pdfOptions: ").append(toIndentedString(pdfOptions)).append("\n"); + sb.append(" pngOptions: ").append(toIndentedString(pngOptions)).append("\n"); + sb.append(" runtimeParamOverride: ") + .append(toIndentedString(runtimeParamOverride)) + .append("\n"); + sb.append(" regionalSettings: ").append(toIndentedString(regionalSettings)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first + * line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("metadata_identifier"); + openapiFields.add("tab_identifiers"); + openapiFields.add("personalised_view_identifier"); + openapiFields.add("visualization_identifiers"); + openapiFields.add("transient_content"); + openapiFields.add("file_format"); + openapiFields.add("runtime_filter"); + openapiFields.add("override_filters"); + openapiFields.add("runtime_sort"); + openapiFields.add("pdf_options"); + openapiFields.add("png_options"); + openapiFields.add("runtime_param_override"); + openapiFields.add("regional_settings"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + openapiRequiredFields.add("metadata_identifier"); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to + * ExportLiveboardReportRequest + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!ExportLiveboardReportRequest.openapiRequiredFields + .isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException( + String.format( + "The required field(s) %s in ExportLiveboardReportRequest is not" + + " found in the empty JSON string", + ExportLiveboardReportRequest.openapiRequiredFields.toString())); + } + } + + // check to make sure all required properties/fields are present in the JSON string + for (String requiredField : ExportLiveboardReportRequest.openapiRequiredFields) { + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException( + String.format( + "The required field `%s` is not found in the JSON string: %s", + requiredField, jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if (!jsonObj.get("metadata_identifier").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `metadata_identifier` to be a primitive type in" + + " the JSON string but got `%s`", + jsonObj.get("metadata_identifier").toString())); + } + // ensure the optional json data is an array if present + if (jsonObj.get("tab_identifiers") != null + && !jsonObj.get("tab_identifiers").isJsonNull() + && !jsonObj.get("tab_identifiers").isJsonArray()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `tab_identifiers` to be an array in the JSON" + + " string but got `%s`", + jsonObj.get("tab_identifiers").toString())); + } + if ((jsonObj.get("personalised_view_identifier") != null + && !jsonObj.get("personalised_view_identifier").isJsonNull()) + && !jsonObj.get("personalised_view_identifier").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `personalised_view_identifier` to be a primitive" + + " type in the JSON string but got `%s`", + jsonObj.get("personalised_view_identifier").toString())); + } + // ensure the optional json data is an array if present + if (jsonObj.get("visualization_identifiers") != null + && !jsonObj.get("visualization_identifiers").isJsonNull() + && !jsonObj.get("visualization_identifiers").isJsonArray()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `visualization_identifiers` to be an array in the" + + " JSON string but got `%s`", + jsonObj.get("visualization_identifiers").toString())); + } + if ((jsonObj.get("transient_content") != null + && !jsonObj.get("transient_content").isJsonNull()) + && !jsonObj.get("transient_content").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `transient_content` to be a primitive type in the" + + " JSON string but got `%s`", + jsonObj.get("transient_content").toString())); + } + if ((jsonObj.get("file_format") != null && !jsonObj.get("file_format").isJsonNull()) + && !jsonObj.get("file_format").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `file_format` to be a primitive type in the JSON" + + " string but got `%s`", + jsonObj.get("file_format").toString())); + } + // validate the optional field `file_format` + if (jsonObj.get("file_format") != null && !jsonObj.get("file_format").isJsonNull()) { + FileFormatEnum.validateJsonElement(jsonObj.get("file_format")); + } + // validate the optional field `pdf_options` + if (jsonObj.get("pdf_options") != null && !jsonObj.get("pdf_options").isJsonNull()) { + PdfOptionsInput.validateJsonElement(jsonObj.get("pdf_options")); + } + // validate the optional field `png_options` + if (jsonObj.get("png_options") != null && !jsonObj.get("png_options").isJsonNull()) { + PngOptionsInput.validateJsonElement(jsonObj.get("png_options")); + } + // validate the optional field `regional_settings` + if (jsonObj.get("regional_settings") != null + && !jsonObj.get("regional_settings").isJsonNull()) { + RegionalSettingsInput.validateJsonElement(jsonObj.get("regional_settings")); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!ExportLiveboardReportRequest.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'ExportLiveboardReportRequest' and its + // subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter = + gson.getDelegateAdapter( + this, TypeToken.get(ExportLiveboardReportRequest.class)); + + return (TypeAdapter) + new TypeAdapter() { + @Override + public void write(JsonWriter out, ExportLiveboardReportRequest value) + throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + obj.remove("additionalProperties"); + // serialize additional properties + if (value.getAdditionalProperties() != null) { + for (Map.Entry entry : + value.getAdditionalProperties().entrySet()) { + if (entry.getValue() instanceof String) + obj.addProperty(entry.getKey(), (String) entry.getValue()); + else if (entry.getValue() instanceof Number) + obj.addProperty(entry.getKey(), (Number) entry.getValue()); + else if (entry.getValue() instanceof Boolean) + obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); + else if (entry.getValue() instanceof Character) + obj.addProperty( + entry.getKey(), (Character) entry.getValue()); + else { + JsonElement jsonElement = gson.toJsonTree(entry.getValue()); + if (jsonElement.isJsonArray()) { + obj.add(entry.getKey(), jsonElement.getAsJsonArray()); + } else { + obj.add(entry.getKey(), jsonElement.getAsJsonObject()); + } + } + } + } + elementAdapter.write(out, obj); + } + + @Override + public ExportLiveboardReportRequest read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // store additional fields in the deserialized instance + ExportLiveboardReportRequest instance = + thisAdapter.fromJsonTree(jsonObj); + for (Map.Entry entry : jsonObj.entrySet()) { + if (!openapiFields.contains(entry.getKey())) { + if (entry.getValue().isJsonPrimitive()) { // primitive type + if (entry.getValue().getAsJsonPrimitive().isString()) + instance.putAdditionalProperty( + entry.getKey(), entry.getValue().getAsString()); + else if (entry.getValue().getAsJsonPrimitive().isNumber()) + instance.putAdditionalProperty( + entry.getKey(), entry.getValue().getAsNumber()); + else if (entry.getValue().getAsJsonPrimitive().isBoolean()) + instance.putAdditionalProperty( + entry.getKey(), + entry.getValue().getAsBoolean()); + else + throw new IllegalArgumentException( + String.format( + "The field `%s` has unknown primitive" + + " type. Value: %s", + entry.getKey(), + entry.getValue().toString())); + } else if (entry.getValue().isJsonArray()) { + instance.putAdditionalProperty( + entry.getKey(), + gson.fromJson(entry.getValue(), List.class)); + } else { // JSON object + instance.putAdditionalProperty( + entry.getKey(), + gson.fromJson(entry.getValue(), HashMap.class)); + } + } + } + return instance; + } + }.nullSafe(); + } + } + + /** + * Create an instance of ExportLiveboardReportRequest given an JSON string + * + * @param jsonString JSON string + * @return An instance of ExportLiveboardReportRequest + * @throws IOException if the JSON string is invalid with respect to + * ExportLiveboardReportRequest + */ + public static ExportLiveboardReportRequest fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, ExportLiveboardReportRequest.class); + } + + /** + * Convert an instance of ExportLiveboardReportRequest to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} diff --git a/sdks/java/src/main/java/com/thoughtspot/client/model/ExportMetadataTMLBatchedRequest.java b/sdks/java/src/main/java/com/thoughtspot/client/model/ExportMetadataTMLBatchedRequest.java new file mode 100644 index 000000000..863be7158 --- /dev/null +++ b/sdks/java/src/main/java/com/thoughtspot/client/model/ExportMetadataTMLBatchedRequest.java @@ -0,0 +1,602 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client.model; + +import com.google.gson.Gson; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.TypeAdapter; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.reflect.TypeToken; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import com.thoughtspot.client.JSON; +import java.io.IOException; +import java.io.Serializable; +import java.util.Arrays; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Objects; +import org.openapitools.jackson.nullable.JsonNullable; + +/** ExportMetadataTMLBatchedRequest */ +@javax.annotation.Generated( + value = "org.openapitools.codegen.languages.JavaClientCodegen", + comments = "Generator version: 7.12.0") +public class ExportMetadataTMLBatchedRequest implements Serializable { + private static final long serialVersionUID = 1L; + + /** Type of metadata object to export, can be one of USER | ROLE | USER_GROUP */ + @JsonAdapter(MetadataTypeEnum.Adapter.class) + public enum MetadataTypeEnum { + USER("USER"), + + USER_GROUP("USER_GROUP"), + + ROLE("ROLE"); + + private String value; + + MetadataTypeEnum(String value) { + this.value = value; + } + + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + public static MetadataTypeEnum fromValue(String value) { + for (MetadataTypeEnum b : MetadataTypeEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + + public static class Adapter extends TypeAdapter { + @Override + public void write(final JsonWriter jsonWriter, final MetadataTypeEnum enumeration) + throws IOException { + jsonWriter.value(enumeration.getValue()); + } + + @Override + public MetadataTypeEnum read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + return MetadataTypeEnum.fromValue(value); + } + } + + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + String value = jsonElement.getAsString(); + MetadataTypeEnum.fromValue(value); + } + } + + public static final String SERIALIZED_NAME_METADATA_TYPE = "metadata_type"; + + @SerializedName(SERIALIZED_NAME_METADATA_TYPE) + @javax.annotation.Nonnull + private MetadataTypeEnum metadataType; + + public static final String SERIALIZED_NAME_BATCH_OFFSET = "batch_offset"; + + @SerializedName(SERIALIZED_NAME_BATCH_OFFSET) + @javax.annotation.Nullable + private Integer batchOffset = 0; + + public static final String SERIALIZED_NAME_BATCH_SIZE = "batch_size"; + + @SerializedName(SERIALIZED_NAME_BATCH_SIZE) + @javax.annotation.Nullable + private Integer batchSize = 20; + + /** TML EDOC content format. */ + @JsonAdapter(EdocFormatEnum.Adapter.class) + public enum EdocFormatEnum { + JSON("JSON"), + + YAML("YAML"); + + private String value; + + EdocFormatEnum(String value) { + this.value = value; + } + + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + public static EdocFormatEnum fromValue(String value) { + for (EdocFormatEnum b : EdocFormatEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + + public static class Adapter extends TypeAdapter { + @Override + public void write(final JsonWriter jsonWriter, final EdocFormatEnum enumeration) + throws IOException { + jsonWriter.value(enumeration.getValue()); + } + + @Override + public EdocFormatEnum read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + return EdocFormatEnum.fromValue(value); + } + } + + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + String value = jsonElement.getAsString(); + EdocFormatEnum.fromValue(value); + } + } + + public static final String SERIALIZED_NAME_EDOC_FORMAT = "edoc_format"; + + @SerializedName(SERIALIZED_NAME_EDOC_FORMAT) + @javax.annotation.Nullable + private EdocFormatEnum edocFormat = EdocFormatEnum.JSON; + + public static final String SERIALIZED_NAME_EXPORT_DEPENDENT = "export_dependent"; + + @SerializedName(SERIALIZED_NAME_EXPORT_DEPENDENT) + @javax.annotation.Nullable + private Boolean exportDependent = false; + + public static final String SERIALIZED_NAME_ALL_ORGS_OVERRIDE = "all_orgs_override"; + + @SerializedName(SERIALIZED_NAME_ALL_ORGS_OVERRIDE) + @javax.annotation.Nullable + private Boolean allOrgsOverride = false; + + public ExportMetadataTMLBatchedRequest() {} + + public ExportMetadataTMLBatchedRequest metadataType( + @javax.annotation.Nonnull MetadataTypeEnum metadataType) { + this.metadataType = metadataType; + return this; + } + + /** + * Type of metadata object to export, can be one of USER | ROLE | USER_GROUP + * + * @return metadataType + */ + @javax.annotation.Nonnull + public MetadataTypeEnum getMetadataType() { + return metadataType; + } + + public void setMetadataType(@javax.annotation.Nonnull MetadataTypeEnum metadataType) { + this.metadataType = metadataType; + } + + public ExportMetadataTMLBatchedRequest batchOffset( + @javax.annotation.Nullable Integer batchOffset) { + this.batchOffset = batchOffset; + return this; + } + + /** + * Indicates the position within the complete set from where the API should begin returning + * objects. + * + * @return batchOffset + */ + @javax.annotation.Nullable + public Integer getBatchOffset() { + return batchOffset; + } + + public void setBatchOffset(@javax.annotation.Nullable Integer batchOffset) { + this.batchOffset = batchOffset; + } + + public ExportMetadataTMLBatchedRequest batchSize(@javax.annotation.Nullable Integer batchSize) { + this.batchSize = batchSize; + return this; + } + + /** + * Determines the number of objects or items to be retrieved in a single request. + * + * @return batchSize + */ + @javax.annotation.Nullable + public Integer getBatchSize() { + return batchSize; + } + + public void setBatchSize(@javax.annotation.Nullable Integer batchSize) { + this.batchSize = batchSize; + } + + public ExportMetadataTMLBatchedRequest edocFormat( + @javax.annotation.Nullable EdocFormatEnum edocFormat) { + this.edocFormat = edocFormat; + return this; + } + + /** + * TML EDOC content format. + * + * @return edocFormat + */ + @javax.annotation.Nullable + public EdocFormatEnum getEdocFormat() { + return edocFormat; + } + + public void setEdocFormat(@javax.annotation.Nullable EdocFormatEnum edocFormat) { + this.edocFormat = edocFormat; + } + + public ExportMetadataTMLBatchedRequest exportDependent( + @javax.annotation.Nullable Boolean exportDependent) { + this.exportDependent = exportDependent; + return this; + } + + /** + * Indicates whether to export dependent metadata objects of specified metadata objects. + * + * @return exportDependent + */ + @javax.annotation.Nullable + public Boolean getExportDependent() { + return exportDependent; + } + + public void setExportDependent(@javax.annotation.Nullable Boolean exportDependent) { + this.exportDependent = exportDependent; + } + + public ExportMetadataTMLBatchedRequest allOrgsOverride( + @javax.annotation.Nullable Boolean allOrgsOverride) { + this.allOrgsOverride = allOrgsOverride; + return this; + } + + /** + * Indicates whether to export is happening from all orgs context. + * + * @return allOrgsOverride + */ + @javax.annotation.Nullable + public Boolean getAllOrgsOverride() { + return allOrgsOverride; + } + + public void setAllOrgsOverride(@javax.annotation.Nullable Boolean allOrgsOverride) { + this.allOrgsOverride = allOrgsOverride; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key name of the property + * @param value value of the property + * @return the ExportMetadataTMLBatchedRequest instance itself + */ + public ExportMetadataTMLBatchedRequest putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return a map of objects + */ + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key name of the property + * @return an object + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ExportMetadataTMLBatchedRequest exportMetadataTMLBatchedRequest = + (ExportMetadataTMLBatchedRequest) o; + return Objects.equals(this.metadataType, exportMetadataTMLBatchedRequest.metadataType) + && Objects.equals(this.batchOffset, exportMetadataTMLBatchedRequest.batchOffset) + && Objects.equals(this.batchSize, exportMetadataTMLBatchedRequest.batchSize) + && Objects.equals(this.edocFormat, exportMetadataTMLBatchedRequest.edocFormat) + && Objects.equals( + this.exportDependent, exportMetadataTMLBatchedRequest.exportDependent) + && Objects.equals( + this.allOrgsOverride, exportMetadataTMLBatchedRequest.allOrgsOverride) + && Objects.equals( + this.additionalProperties, + exportMetadataTMLBatchedRequest.additionalProperties); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b + || (a != null + && b != null + && a.isPresent() + && b.isPresent() + && Objects.deepEquals(a.get(), b.get())); + } + + @Override + public int hashCode() { + return Objects.hash( + metadataType, + batchOffset, + batchSize, + edocFormat, + exportDependent, + allOrgsOverride, + additionalProperties); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; + } + return a.isPresent() ? Arrays.deepHashCode(new Object[] {a.get()}) : 31; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ExportMetadataTMLBatchedRequest {\n"); + sb.append(" metadataType: ").append(toIndentedString(metadataType)).append("\n"); + sb.append(" batchOffset: ").append(toIndentedString(batchOffset)).append("\n"); + sb.append(" batchSize: ").append(toIndentedString(batchSize)).append("\n"); + sb.append(" edocFormat: ").append(toIndentedString(edocFormat)).append("\n"); + sb.append(" exportDependent: ").append(toIndentedString(exportDependent)).append("\n"); + sb.append(" allOrgsOverride: ").append(toIndentedString(allOrgsOverride)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first + * line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("metadata_type"); + openapiFields.add("batch_offset"); + openapiFields.add("batch_size"); + openapiFields.add("edoc_format"); + openapiFields.add("export_dependent"); + openapiFields.add("all_orgs_override"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + openapiRequiredFields.add("metadata_type"); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to + * ExportMetadataTMLBatchedRequest + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!ExportMetadataTMLBatchedRequest.openapiRequiredFields + .isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException( + String.format( + "The required field(s) %s in ExportMetadataTMLBatchedRequest is" + + " not found in the empty JSON string", + ExportMetadataTMLBatchedRequest.openapiRequiredFields.toString())); + } + } + + // check to make sure all required properties/fields are present in the JSON string + for (String requiredField : ExportMetadataTMLBatchedRequest.openapiRequiredFields) { + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException( + String.format( + "The required field `%s` is not found in the JSON string: %s", + requiredField, jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if (!jsonObj.get("metadata_type").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `metadata_type` to be a primitive type in the JSON" + + " string but got `%s`", + jsonObj.get("metadata_type").toString())); + } + // validate the required field `metadata_type` + MetadataTypeEnum.validateJsonElement(jsonObj.get("metadata_type")); + if ((jsonObj.get("edoc_format") != null && !jsonObj.get("edoc_format").isJsonNull()) + && !jsonObj.get("edoc_format").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `edoc_format` to be a primitive type in the JSON" + + " string but got `%s`", + jsonObj.get("edoc_format").toString())); + } + // validate the optional field `edoc_format` + if (jsonObj.get("edoc_format") != null && !jsonObj.get("edoc_format").isJsonNull()) { + EdocFormatEnum.validateJsonElement(jsonObj.get("edoc_format")); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!ExportMetadataTMLBatchedRequest.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'ExportMetadataTMLBatchedRequest' and its + // subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter = + gson.getDelegateAdapter( + this, TypeToken.get(ExportMetadataTMLBatchedRequest.class)); + + return (TypeAdapter) + new TypeAdapter() { + @Override + public void write(JsonWriter out, ExportMetadataTMLBatchedRequest value) + throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + obj.remove("additionalProperties"); + // serialize additional properties + if (value.getAdditionalProperties() != null) { + for (Map.Entry entry : + value.getAdditionalProperties().entrySet()) { + if (entry.getValue() instanceof String) + obj.addProperty(entry.getKey(), (String) entry.getValue()); + else if (entry.getValue() instanceof Number) + obj.addProperty(entry.getKey(), (Number) entry.getValue()); + else if (entry.getValue() instanceof Boolean) + obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); + else if (entry.getValue() instanceof Character) + obj.addProperty( + entry.getKey(), (Character) entry.getValue()); + else { + JsonElement jsonElement = gson.toJsonTree(entry.getValue()); + if (jsonElement.isJsonArray()) { + obj.add(entry.getKey(), jsonElement.getAsJsonArray()); + } else { + obj.add(entry.getKey(), jsonElement.getAsJsonObject()); + } + } + } + } + elementAdapter.write(out, obj); + } + + @Override + public ExportMetadataTMLBatchedRequest read(JsonReader in) + throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // store additional fields in the deserialized instance + ExportMetadataTMLBatchedRequest instance = + thisAdapter.fromJsonTree(jsonObj); + for (Map.Entry entry : jsonObj.entrySet()) { + if (!openapiFields.contains(entry.getKey())) { + if (entry.getValue().isJsonPrimitive()) { // primitive type + if (entry.getValue().getAsJsonPrimitive().isString()) + instance.putAdditionalProperty( + entry.getKey(), entry.getValue().getAsString()); + else if (entry.getValue().getAsJsonPrimitive().isNumber()) + instance.putAdditionalProperty( + entry.getKey(), entry.getValue().getAsNumber()); + else if (entry.getValue().getAsJsonPrimitive().isBoolean()) + instance.putAdditionalProperty( + entry.getKey(), + entry.getValue().getAsBoolean()); + else + throw new IllegalArgumentException( + String.format( + "The field `%s` has unknown primitive" + + " type. Value: %s", + entry.getKey(), + entry.getValue().toString())); + } else if (entry.getValue().isJsonArray()) { + instance.putAdditionalProperty( + entry.getKey(), + gson.fromJson(entry.getValue(), List.class)); + } else { // JSON object + instance.putAdditionalProperty( + entry.getKey(), + gson.fromJson(entry.getValue(), HashMap.class)); + } + } + } + return instance; + } + }.nullSafe(); + } + } + + /** + * Create an instance of ExportMetadataTMLBatchedRequest given an JSON string + * + * @param jsonString JSON string + * @return An instance of ExportMetadataTMLBatchedRequest + * @throws IOException if the JSON string is invalid with respect to + * ExportMetadataTMLBatchedRequest + */ + public static ExportMetadataTMLBatchedRequest fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, ExportMetadataTMLBatchedRequest.class); + } + + /** + * Convert an instance of ExportMetadataTMLBatchedRequest to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} diff --git a/sdks/java/src/main/java/com/thoughtspot/client/model/ExportMetadataTMLRequest.java b/sdks/java/src/main/java/com/thoughtspot/client/model/ExportMetadataTMLRequest.java new file mode 100644 index 000000000..beba5ff86 --- /dev/null +++ b/sdks/java/src/main/java/com/thoughtspot/client/model/ExportMetadataTMLRequest.java @@ -0,0 +1,737 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client.model; + +import com.google.gson.Gson; +import com.google.gson.JsonArray; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.TypeAdapter; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.reflect.TypeToken; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import com.thoughtspot.client.JSON; +import java.io.IOException; +import java.io.Serializable; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Objects; +import org.openapitools.jackson.nullable.JsonNullable; + +/** ExportMetadataTMLRequest */ +@javax.annotation.Generated( + value = "org.openapitools.codegen.languages.JavaClientCodegen", + comments = "Generator version: 7.12.0") +public class ExportMetadataTMLRequest implements Serializable { + private static final long serialVersionUID = 1L; + + public static final String SERIALIZED_NAME_METADATA = "metadata"; + + @SerializedName(SERIALIZED_NAME_METADATA) + @javax.annotation.Nonnull + private List metadata; + + public static final String SERIALIZED_NAME_EXPORT_ASSOCIATED = "export_associated"; + + @SerializedName(SERIALIZED_NAME_EXPORT_ASSOCIATED) + @javax.annotation.Nullable + private Boolean exportAssociated = false; + + public static final String SERIALIZED_NAME_EXPORT_FQN = "export_fqn"; + + @SerializedName(SERIALIZED_NAME_EXPORT_FQN) + @javax.annotation.Nullable + private Boolean exportFqn = false; + + /** + * TML EDOC content format. **Note: exporting in YAML format currently requires manual + * formatting of the output. For more details on the workaround, please click + * [here](https://developers.thoughtspot.com/docs/known-issues#_version_9_12_0_cl)** + */ + @JsonAdapter(EdocFormatEnum.Adapter.class) + public enum EdocFormatEnum { + JSON("JSON"), + + YAML("YAML"); + + private String value; + + EdocFormatEnum(String value) { + this.value = value; + } + + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + public static EdocFormatEnum fromValue(String value) { + for (EdocFormatEnum b : EdocFormatEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + + public static class Adapter extends TypeAdapter { + @Override + public void write(final JsonWriter jsonWriter, final EdocFormatEnum enumeration) + throws IOException { + jsonWriter.value(enumeration.getValue()); + } + + @Override + public EdocFormatEnum read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + return EdocFormatEnum.fromValue(value); + } + } + + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + String value = jsonElement.getAsString(); + EdocFormatEnum.fromValue(value); + } + } + + public static final String SERIALIZED_NAME_EDOC_FORMAT = "edoc_format"; + + @SerializedName(SERIALIZED_NAME_EDOC_FORMAT) + @javax.annotation.Nullable + private EdocFormatEnum edocFormat = EdocFormatEnum.JSON; + + /** Indicates whether to export worksheet TML in DEFAULT or V1 or V2 version. */ + @JsonAdapter(ExportSchemaVersionEnum.Adapter.class) + public enum ExportSchemaVersionEnum { + DEFAULT("DEFAULT"), + + V1("V1"), + + V2("V2"); + + private String value; + + ExportSchemaVersionEnum(String value) { + this.value = value; + } + + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + public static ExportSchemaVersionEnum fromValue(String value) { + for (ExportSchemaVersionEnum b : ExportSchemaVersionEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + + public static class Adapter extends TypeAdapter { + @Override + public void write( + final JsonWriter jsonWriter, final ExportSchemaVersionEnum enumeration) + throws IOException { + jsonWriter.value(enumeration.getValue()); + } + + @Override + public ExportSchemaVersionEnum read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + return ExportSchemaVersionEnum.fromValue(value); + } + } + + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + String value = jsonElement.getAsString(); + ExportSchemaVersionEnum.fromValue(value); + } + } + + public static final String SERIALIZED_NAME_EXPORT_SCHEMA_VERSION = "export_schema_version"; + + @SerializedName(SERIALIZED_NAME_EXPORT_SCHEMA_VERSION) + @javax.annotation.Nullable + private ExportSchemaVersionEnum exportSchemaVersion = ExportSchemaVersionEnum.DEFAULT; + + public static final String SERIALIZED_NAME_EXPORT_DEPENDENT = "export_dependent"; + + @SerializedName(SERIALIZED_NAME_EXPORT_DEPENDENT) + @javax.annotation.Nullable + private Boolean exportDependent = false; + + public static final String SERIALIZED_NAME_EXPORT_CONNECTION_AS_DEPENDENT = + "export_connection_as_dependent"; + + @SerializedName(SERIALIZED_NAME_EXPORT_CONNECTION_AS_DEPENDENT) + @javax.annotation.Nullable + private Boolean exportConnectionAsDependent = false; + + public static final String SERIALIZED_NAME_ALL_ORGS_OVERRIDE = "all_orgs_override"; + + @SerializedName(SERIALIZED_NAME_ALL_ORGS_OVERRIDE) + @javax.annotation.Nullable + private Boolean allOrgsOverride = false; + + public static final String SERIALIZED_NAME_EXPORT_OPTIONS = "export_options"; + + @SerializedName(SERIALIZED_NAME_EXPORT_OPTIONS) + @javax.annotation.Nullable + private ExportOptions exportOptions; + + public ExportMetadataTMLRequest() {} + + public ExportMetadataTMLRequest metadata( + @javax.annotation.Nonnull List metadata) { + this.metadata = metadata; + return this; + } + + public ExportMetadataTMLRequest addMetadataItem(ExportMetadataTypeInput metadataItem) { + if (this.metadata == null) { + this.metadata = new ArrayList<>(); + } + this.metadata.add(metadataItem); + return this; + } + + /** + * Metadata objects. + * + * @return metadata + */ + @javax.annotation.Nonnull + public List getMetadata() { + return metadata; + } + + public void setMetadata(@javax.annotation.Nonnull List metadata) { + this.metadata = metadata; + } + + public ExportMetadataTMLRequest exportAssociated( + @javax.annotation.Nullable Boolean exportAssociated) { + this.exportAssociated = exportAssociated; + return this; + } + + /** + * Indicates whether to export associated metadata objects of specified metadata objects. + * + * @return exportAssociated + */ + @javax.annotation.Nullable + public Boolean getExportAssociated() { + return exportAssociated; + } + + public void setExportAssociated(@javax.annotation.Nullable Boolean exportAssociated) { + this.exportAssociated = exportAssociated; + } + + public ExportMetadataTMLRequest exportFqn(@javax.annotation.Nullable Boolean exportFqn) { + this.exportFqn = exportFqn; + return this; + } + + /** + * Adds FQNs of the referenced objects. For example, if you are exporting a Liveboard and its + * associated objects, the API returns the Liveboard TML data with the FQNs of the referenced + * worksheet. If the exported TML data includes FQNs, you don't need to manually add FQNs of + * the referenced objects during TML import. + * + * @return exportFqn + */ + @javax.annotation.Nullable + public Boolean getExportFqn() { + return exportFqn; + } + + public void setExportFqn(@javax.annotation.Nullable Boolean exportFqn) { + this.exportFqn = exportFqn; + } + + public ExportMetadataTMLRequest edocFormat( + @javax.annotation.Nullable EdocFormatEnum edocFormat) { + this.edocFormat = edocFormat; + return this; + } + + /** + * TML EDOC content format. **Note: exporting in YAML format currently requires manual + * formatting of the output. For more details on the workaround, please click + * [here](https://developers.thoughtspot.com/docs/known-issues#_version_9_12_0_cl)** + * + * @return edocFormat + */ + @javax.annotation.Nullable + public EdocFormatEnum getEdocFormat() { + return edocFormat; + } + + public void setEdocFormat(@javax.annotation.Nullable EdocFormatEnum edocFormat) { + this.edocFormat = edocFormat; + } + + public ExportMetadataTMLRequest exportSchemaVersion( + @javax.annotation.Nullable ExportSchemaVersionEnum exportSchemaVersion) { + this.exportSchemaVersion = exportSchemaVersion; + return this; + } + + /** + * Indicates whether to export worksheet TML in DEFAULT or V1 or V2 version. + * + * @return exportSchemaVersion + */ + @javax.annotation.Nullable + public ExportSchemaVersionEnum getExportSchemaVersion() { + return exportSchemaVersion; + } + + public void setExportSchemaVersion( + @javax.annotation.Nullable ExportSchemaVersionEnum exportSchemaVersion) { + this.exportSchemaVersion = exportSchemaVersion; + } + + public ExportMetadataTMLRequest exportDependent( + @javax.annotation.Nullable Boolean exportDependent) { + this.exportDependent = exportDependent; + return this; + } + + /** + * Indicates whether to export table while exporting connection. + * + * @return exportDependent + */ + @javax.annotation.Nullable + public Boolean getExportDependent() { + return exportDependent; + } + + public void setExportDependent(@javax.annotation.Nullable Boolean exportDependent) { + this.exportDependent = exportDependent; + } + + public ExportMetadataTMLRequest exportConnectionAsDependent( + @javax.annotation.Nullable Boolean exportConnectionAsDependent) { + this.exportConnectionAsDependent = exportConnectionAsDependent; + return this; + } + + /** + * Indicates whether to export connection as dependent while exporting + * table/worksheet/answer/liveboard. This will only be active when export_associated is true. + * + * @return exportConnectionAsDependent + */ + @javax.annotation.Nullable + public Boolean getExportConnectionAsDependent() { + return exportConnectionAsDependent; + } + + public void setExportConnectionAsDependent( + @javax.annotation.Nullable Boolean exportConnectionAsDependent) { + this.exportConnectionAsDependent = exportConnectionAsDependent; + } + + public ExportMetadataTMLRequest allOrgsOverride( + @javax.annotation.Nullable Boolean allOrgsOverride) { + this.allOrgsOverride = allOrgsOverride; + return this; + } + + /** + * Indicates whether to export is happening from all orgs context. + * + * @return allOrgsOverride + */ + @javax.annotation.Nullable + public Boolean getAllOrgsOverride() { + return allOrgsOverride; + } + + public void setAllOrgsOverride(@javax.annotation.Nullable Boolean allOrgsOverride) { + this.allOrgsOverride = allOrgsOverride; + } + + public ExportMetadataTMLRequest exportOptions( + @javax.annotation.Nullable ExportOptions exportOptions) { + this.exportOptions = exportOptions; + return this; + } + + /** + * Flags to specify additional options for export. Version: 10.6.0.cl or later + * + * @return exportOptions + */ + @javax.annotation.Nullable + public ExportOptions getExportOptions() { + return exportOptions; + } + + public void setExportOptions(@javax.annotation.Nullable ExportOptions exportOptions) { + this.exportOptions = exportOptions; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key name of the property + * @param value value of the property + * @return the ExportMetadataTMLRequest instance itself + */ + public ExportMetadataTMLRequest putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return a map of objects + */ + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key name of the property + * @return an object + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ExportMetadataTMLRequest exportMetadataTMLRequest = (ExportMetadataTMLRequest) o; + return Objects.equals(this.metadata, exportMetadataTMLRequest.metadata) + && Objects.equals(this.exportAssociated, exportMetadataTMLRequest.exportAssociated) + && Objects.equals(this.exportFqn, exportMetadataTMLRequest.exportFqn) + && Objects.equals(this.edocFormat, exportMetadataTMLRequest.edocFormat) + && Objects.equals( + this.exportSchemaVersion, exportMetadataTMLRequest.exportSchemaVersion) + && Objects.equals(this.exportDependent, exportMetadataTMLRequest.exportDependent) + && Objects.equals( + this.exportConnectionAsDependent, + exportMetadataTMLRequest.exportConnectionAsDependent) + && Objects.equals(this.allOrgsOverride, exportMetadataTMLRequest.allOrgsOverride) + && Objects.equals(this.exportOptions, exportMetadataTMLRequest.exportOptions) + && Objects.equals( + this.additionalProperties, exportMetadataTMLRequest.additionalProperties); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b + || (a != null + && b != null + && a.isPresent() + && b.isPresent() + && Objects.deepEquals(a.get(), b.get())); + } + + @Override + public int hashCode() { + return Objects.hash( + metadata, + exportAssociated, + exportFqn, + edocFormat, + exportSchemaVersion, + exportDependent, + exportConnectionAsDependent, + allOrgsOverride, + exportOptions, + additionalProperties); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; + } + return a.isPresent() ? Arrays.deepHashCode(new Object[] {a.get()}) : 31; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ExportMetadataTMLRequest {\n"); + sb.append(" metadata: ").append(toIndentedString(metadata)).append("\n"); + sb.append(" exportAssociated: ").append(toIndentedString(exportAssociated)).append("\n"); + sb.append(" exportFqn: ").append(toIndentedString(exportFqn)).append("\n"); + sb.append(" edocFormat: ").append(toIndentedString(edocFormat)).append("\n"); + sb.append(" exportSchemaVersion: ") + .append(toIndentedString(exportSchemaVersion)) + .append("\n"); + sb.append(" exportDependent: ").append(toIndentedString(exportDependent)).append("\n"); + sb.append(" exportConnectionAsDependent: ") + .append(toIndentedString(exportConnectionAsDependent)) + .append("\n"); + sb.append(" allOrgsOverride: ").append(toIndentedString(allOrgsOverride)).append("\n"); + sb.append(" exportOptions: ").append(toIndentedString(exportOptions)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first + * line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("metadata"); + openapiFields.add("export_associated"); + openapiFields.add("export_fqn"); + openapiFields.add("edoc_format"); + openapiFields.add("export_schema_version"); + openapiFields.add("export_dependent"); + openapiFields.add("export_connection_as_dependent"); + openapiFields.add("all_orgs_override"); + openapiFields.add("export_options"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + openapiRequiredFields.add("metadata"); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to ExportMetadataTMLRequest + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!ExportMetadataTMLRequest.openapiRequiredFields + .isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException( + String.format( + "The required field(s) %s in ExportMetadataTMLRequest is not found" + + " in the empty JSON string", + ExportMetadataTMLRequest.openapiRequiredFields.toString())); + } + } + + // check to make sure all required properties/fields are present in the JSON string + for (String requiredField : ExportMetadataTMLRequest.openapiRequiredFields) { + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException( + String.format( + "The required field `%s` is not found in the JSON string: %s", + requiredField, jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // ensure the json data is an array + if (!jsonObj.get("metadata").isJsonArray()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `metadata` to be an array in the JSON string but" + + " got `%s`", + jsonObj.get("metadata").toString())); + } + + JsonArray jsonArraymetadata = jsonObj.getAsJsonArray("metadata"); + // validate the required field `metadata` (array) + for (int i = 0; i < jsonArraymetadata.size(); i++) { + ExportMetadataTypeInput.validateJsonElement(jsonArraymetadata.get(i)); + } + ; + if ((jsonObj.get("edoc_format") != null && !jsonObj.get("edoc_format").isJsonNull()) + && !jsonObj.get("edoc_format").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `edoc_format` to be a primitive type in the JSON" + + " string but got `%s`", + jsonObj.get("edoc_format").toString())); + } + // validate the optional field `edoc_format` + if (jsonObj.get("edoc_format") != null && !jsonObj.get("edoc_format").isJsonNull()) { + EdocFormatEnum.validateJsonElement(jsonObj.get("edoc_format")); + } + if ((jsonObj.get("export_schema_version") != null + && !jsonObj.get("export_schema_version").isJsonNull()) + && !jsonObj.get("export_schema_version").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `export_schema_version` to be a primitive type in" + + " the JSON string but got `%s`", + jsonObj.get("export_schema_version").toString())); + } + // validate the optional field `export_schema_version` + if (jsonObj.get("export_schema_version") != null + && !jsonObj.get("export_schema_version").isJsonNull()) { + ExportSchemaVersionEnum.validateJsonElement(jsonObj.get("export_schema_version")); + } + // validate the optional field `export_options` + if (jsonObj.get("export_options") != null && !jsonObj.get("export_options").isJsonNull()) { + ExportOptions.validateJsonElement(jsonObj.get("export_options")); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!ExportMetadataTMLRequest.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'ExportMetadataTMLRequest' and its + // subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter = + gson.getDelegateAdapter(this, TypeToken.get(ExportMetadataTMLRequest.class)); + + return (TypeAdapter) + new TypeAdapter() { + @Override + public void write(JsonWriter out, ExportMetadataTMLRequest value) + throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + obj.remove("additionalProperties"); + // serialize additional properties + if (value.getAdditionalProperties() != null) { + for (Map.Entry entry : + value.getAdditionalProperties().entrySet()) { + if (entry.getValue() instanceof String) + obj.addProperty(entry.getKey(), (String) entry.getValue()); + else if (entry.getValue() instanceof Number) + obj.addProperty(entry.getKey(), (Number) entry.getValue()); + else if (entry.getValue() instanceof Boolean) + obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); + else if (entry.getValue() instanceof Character) + obj.addProperty( + entry.getKey(), (Character) entry.getValue()); + else { + JsonElement jsonElement = gson.toJsonTree(entry.getValue()); + if (jsonElement.isJsonArray()) { + obj.add(entry.getKey(), jsonElement.getAsJsonArray()); + } else { + obj.add(entry.getKey(), jsonElement.getAsJsonObject()); + } + } + } + } + elementAdapter.write(out, obj); + } + + @Override + public ExportMetadataTMLRequest read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // store additional fields in the deserialized instance + ExportMetadataTMLRequest instance = thisAdapter.fromJsonTree(jsonObj); + for (Map.Entry entry : jsonObj.entrySet()) { + if (!openapiFields.contains(entry.getKey())) { + if (entry.getValue().isJsonPrimitive()) { // primitive type + if (entry.getValue().getAsJsonPrimitive().isString()) + instance.putAdditionalProperty( + entry.getKey(), entry.getValue().getAsString()); + else if (entry.getValue().getAsJsonPrimitive().isNumber()) + instance.putAdditionalProperty( + entry.getKey(), entry.getValue().getAsNumber()); + else if (entry.getValue().getAsJsonPrimitive().isBoolean()) + instance.putAdditionalProperty( + entry.getKey(), + entry.getValue().getAsBoolean()); + else + throw new IllegalArgumentException( + String.format( + "The field `%s` has unknown primitive" + + " type. Value: %s", + entry.getKey(), + entry.getValue().toString())); + } else if (entry.getValue().isJsonArray()) { + instance.putAdditionalProperty( + entry.getKey(), + gson.fromJson(entry.getValue(), List.class)); + } else { // JSON object + instance.putAdditionalProperty( + entry.getKey(), + gson.fromJson(entry.getValue(), HashMap.class)); + } + } + } + return instance; + } + }.nullSafe(); + } + } + + /** + * Create an instance of ExportMetadataTMLRequest given an JSON string + * + * @param jsonString JSON string + * @return An instance of ExportMetadataTMLRequest + * @throws IOException if the JSON string is invalid with respect to ExportMetadataTMLRequest + */ + public static ExportMetadataTMLRequest fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, ExportMetadataTMLRequest.class); + } + + /** + * Convert an instance of ExportMetadataTMLRequest to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} diff --git a/sdks/java/src/main/java/com/thoughtspot/client/model/ExportMetadataTypeInput.java b/sdks/java/src/main/java/com/thoughtspot/client/model/ExportMetadataTypeInput.java new file mode 100644 index 000000000..702dbe05b --- /dev/null +++ b/sdks/java/src/main/java/com/thoughtspot/client/model/ExportMetadataTypeInput.java @@ -0,0 +1,494 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client.model; + +import com.google.gson.Gson; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.TypeAdapter; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.reflect.TypeToken; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import com.thoughtspot.client.JSON; +import java.io.IOException; +import java.io.Serializable; +import java.util.Arrays; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Objects; +import org.openapitools.jackson.nullable.JsonNullable; + +/** MetadataType InputType used in Export MetadataType API */ +@javax.annotation.Generated( + value = "org.openapitools.codegen.languages.JavaClientCodegen", + comments = "Generator version: 7.12.0") +public class ExportMetadataTypeInput implements Serializable { + private static final long serialVersionUID = 1L; + + /** + * Type of metadata. Required if the name of the object is set as the identifier. This attribute + * is optional when the object GUID is specified as the identifier. + */ + @JsonAdapter(TypeEnum.Adapter.class) + public enum TypeEnum { + LIVEBOARD("LIVEBOARD"), + + ANSWER("ANSWER"), + + LOGICAL_TABLE("LOGICAL_TABLE"), + + CONNECTION("CONNECTION"), + + CUSTOM_ACTION("CUSTOM_ACTION"), + + USER("USER"), + + USER_GROUP("USER_GROUP"), + + ROLE("ROLE"), + + FEEDBACK("FEEDBACK"); + + private String value; + + TypeEnum(String value) { + this.value = value; + } + + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + public static TypeEnum fromValue(String value) { + for (TypeEnum b : TypeEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + return null; + } + + public static class Adapter extends TypeAdapter { + @Override + public void write(final JsonWriter jsonWriter, final TypeEnum enumeration) + throws IOException { + jsonWriter.value(enumeration.getValue()); + } + + @Override + public TypeEnum read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + return TypeEnum.fromValue(value); + } + } + + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + String value = jsonElement.getAsString(); + TypeEnum.fromValue(value); + } + } + + public static final String SERIALIZED_NAME_TYPE = "type"; + + @SerializedName(SERIALIZED_NAME_TYPE) + @javax.annotation.Nullable + private TypeEnum type; + + public static final String SERIALIZED_NAME_IDENTIFIER = "identifier"; + + @SerializedName(SERIALIZED_NAME_IDENTIFIER) + @javax.annotation.Nullable + private String identifier; + + public static final String SERIALIZED_NAME_SESSION_IDENTIFIER = "session_identifier"; + + @SerializedName(SERIALIZED_NAME_SESSION_IDENTIFIER) + @javax.annotation.Nullable + private String sessionIdentifier; + + public static final String SERIALIZED_NAME_GENERATION_NUMBER = "generation_number"; + + @SerializedName(SERIALIZED_NAME_GENERATION_NUMBER) + @javax.annotation.Nullable + private Integer generationNumber; + + public ExportMetadataTypeInput() {} + + public ExportMetadataTypeInput type(@javax.annotation.Nullable TypeEnum type) { + this.type = type; + return this; + } + + /** + * Type of metadata. Required if the name of the object is set as the identifier. This attribute + * is optional when the object GUID is specified as the identifier. + * + * @return type + */ + @javax.annotation.Nullable + public TypeEnum getType() { + return type; + } + + public void setType(@javax.annotation.Nullable TypeEnum type) { + this.type = type; + } + + public ExportMetadataTypeInput identifier(@javax.annotation.Nullable String identifier) { + this.identifier = identifier; + return this; + } + + /** + * Unique ID or name of the metadata object. Not required if the metadata type is ANSWER when + * session_id and generation_number is set. + * + * @return identifier + */ + @javax.annotation.Nullable + public String getIdentifier() { + return identifier; + } + + public void setIdentifier(@javax.annotation.Nullable String identifier) { + this.identifier = identifier; + } + + public ExportMetadataTypeInput sessionIdentifier( + @javax.annotation.Nullable String sessionIdentifier) { + this.sessionIdentifier = sessionIdentifier; + return this; + } + + /** + * Unique ID of the Answer session. Required if the metadata type is ANSWER and identifier is + * not set. + * + * @return sessionIdentifier + */ + @javax.annotation.Nullable + public String getSessionIdentifier() { + return sessionIdentifier; + } + + public void setSessionIdentifier(@javax.annotation.Nullable String sessionIdentifier) { + this.sessionIdentifier = sessionIdentifier; + } + + public ExportMetadataTypeInput generationNumber( + @javax.annotation.Nullable Integer generationNumber) { + this.generationNumber = generationNumber; + return this; + } + + /** + * Generation Number of the Answer session. Required if the metadata type is ANSWER and + * identifier is not set. + * + * @return generationNumber + */ + @javax.annotation.Nullable + public Integer getGenerationNumber() { + return generationNumber; + } + + public void setGenerationNumber(@javax.annotation.Nullable Integer generationNumber) { + this.generationNumber = generationNumber; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key name of the property + * @param value value of the property + * @return the ExportMetadataTypeInput instance itself + */ + public ExportMetadataTypeInput putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return a map of objects + */ + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key name of the property + * @return an object + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ExportMetadataTypeInput exportMetadataTypeInput = (ExportMetadataTypeInput) o; + return Objects.equals(this.type, exportMetadataTypeInput.type) + && Objects.equals(this.identifier, exportMetadataTypeInput.identifier) + && Objects.equals(this.sessionIdentifier, exportMetadataTypeInput.sessionIdentifier) + && Objects.equals(this.generationNumber, exportMetadataTypeInput.generationNumber) + && Objects.equals( + this.additionalProperties, exportMetadataTypeInput.additionalProperties); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b + || (a != null + && b != null + && a.isPresent() + && b.isPresent() + && Objects.deepEquals(a.get(), b.get())); + } + + @Override + public int hashCode() { + return Objects.hash( + type, identifier, sessionIdentifier, generationNumber, additionalProperties); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; + } + return a.isPresent() ? Arrays.deepHashCode(new Object[] {a.get()}) : 31; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ExportMetadataTypeInput {\n"); + sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append(" identifier: ").append(toIndentedString(identifier)).append("\n"); + sb.append(" sessionIdentifier: ") + .append(toIndentedString(sessionIdentifier)) + .append("\n"); + sb.append(" generationNumber: ").append(toIndentedString(generationNumber)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first + * line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("type"); + openapiFields.add("identifier"); + openapiFields.add("session_identifier"); + openapiFields.add("generation_number"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to ExportMetadataTypeInput + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!ExportMetadataTypeInput.openapiRequiredFields + .isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException( + String.format( + "The required field(s) %s in ExportMetadataTypeInput is not found" + + " in the empty JSON string", + ExportMetadataTypeInput.openapiRequiredFields.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if ((jsonObj.get("type") != null && !jsonObj.get("type").isJsonNull()) + && !jsonObj.get("type").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `type` to be a primitive type in the JSON string" + + " but got `%s`", + jsonObj.get("type").toString())); + } + // validate the optional field `type` + if (jsonObj.get("type") != null && !jsonObj.get("type").isJsonNull()) { + TypeEnum.validateJsonElement(jsonObj.get("type")); + } + if ((jsonObj.get("identifier") != null && !jsonObj.get("identifier").isJsonNull()) + && !jsonObj.get("identifier").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `identifier` to be a primitive type in the JSON" + + " string but got `%s`", + jsonObj.get("identifier").toString())); + } + if ((jsonObj.get("session_identifier") != null + && !jsonObj.get("session_identifier").isJsonNull()) + && !jsonObj.get("session_identifier").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `session_identifier` to be a primitive type in the" + + " JSON string but got `%s`", + jsonObj.get("session_identifier").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!ExportMetadataTypeInput.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'ExportMetadataTypeInput' and its + // subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter = + gson.getDelegateAdapter(this, TypeToken.get(ExportMetadataTypeInput.class)); + + return (TypeAdapter) + new TypeAdapter() { + @Override + public void write(JsonWriter out, ExportMetadataTypeInput value) + throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + obj.remove("additionalProperties"); + // serialize additional properties + if (value.getAdditionalProperties() != null) { + for (Map.Entry entry : + value.getAdditionalProperties().entrySet()) { + if (entry.getValue() instanceof String) + obj.addProperty(entry.getKey(), (String) entry.getValue()); + else if (entry.getValue() instanceof Number) + obj.addProperty(entry.getKey(), (Number) entry.getValue()); + else if (entry.getValue() instanceof Boolean) + obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); + else if (entry.getValue() instanceof Character) + obj.addProperty( + entry.getKey(), (Character) entry.getValue()); + else { + JsonElement jsonElement = gson.toJsonTree(entry.getValue()); + if (jsonElement.isJsonArray()) { + obj.add(entry.getKey(), jsonElement.getAsJsonArray()); + } else { + obj.add(entry.getKey(), jsonElement.getAsJsonObject()); + } + } + } + } + elementAdapter.write(out, obj); + } + + @Override + public ExportMetadataTypeInput read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // store additional fields in the deserialized instance + ExportMetadataTypeInput instance = thisAdapter.fromJsonTree(jsonObj); + for (Map.Entry entry : jsonObj.entrySet()) { + if (!openapiFields.contains(entry.getKey())) { + if (entry.getValue().isJsonPrimitive()) { // primitive type + if (entry.getValue().getAsJsonPrimitive().isString()) + instance.putAdditionalProperty( + entry.getKey(), entry.getValue().getAsString()); + else if (entry.getValue().getAsJsonPrimitive().isNumber()) + instance.putAdditionalProperty( + entry.getKey(), entry.getValue().getAsNumber()); + else if (entry.getValue().getAsJsonPrimitive().isBoolean()) + instance.putAdditionalProperty( + entry.getKey(), + entry.getValue().getAsBoolean()); + else + throw new IllegalArgumentException( + String.format( + "The field `%s` has unknown primitive" + + " type. Value: %s", + entry.getKey(), + entry.getValue().toString())); + } else if (entry.getValue().isJsonArray()) { + instance.putAdditionalProperty( + entry.getKey(), + gson.fromJson(entry.getValue(), List.class)); + } else { // JSON object + instance.putAdditionalProperty( + entry.getKey(), + gson.fromJson(entry.getValue(), HashMap.class)); + } + } + } + return instance; + } + }.nullSafe(); + } + } + + /** + * Create an instance of ExportMetadataTypeInput given an JSON string + * + * @param jsonString JSON string + * @return An instance of ExportMetadataTypeInput + * @throws IOException if the JSON string is invalid with respect to ExportMetadataTypeInput + */ + public static ExportMetadataTypeInput fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, ExportMetadataTypeInput.class); + } + + /** + * Convert an instance of ExportMetadataTypeInput to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} diff --git a/sdks/java/src/main/java/com/thoughtspot/client/model/ExportOptions.java b/sdks/java/src/main/java/com/thoughtspot/client/model/ExportOptions.java new file mode 100644 index 000000000..7a1dd5c4c --- /dev/null +++ b/sdks/java/src/main/java/com/thoughtspot/client/model/ExportOptions.java @@ -0,0 +1,476 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client.model; + +import com.google.gson.Gson; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.TypeAdapter; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.annotations.SerializedName; +import com.google.gson.reflect.TypeToken; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import com.thoughtspot.client.JSON; +import java.io.IOException; +import java.io.Serializable; +import java.util.Arrays; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Objects; +import org.openapitools.jackson.nullable.JsonNullable; + +/** + * Flags to specify additional options for export. This will only be active when UserDefinedId in + * TML is enabled. + */ +@javax.annotation.Generated( + value = "org.openapitools.codegen.languages.JavaClientCodegen", + comments = "Generator version: 7.12.0") +public class ExportOptions implements Serializable { + private static final long serialVersionUID = 1L; + + public static final String SERIALIZED_NAME_INCLUDE_OBJ_ID_REF = "include_obj_id_ref"; + + @SerializedName(SERIALIZED_NAME_INCLUDE_OBJ_ID_REF) + @javax.annotation.Nullable + private Boolean includeObjIdRef = false; + + public static final String SERIALIZED_NAME_INCLUDE_GUID = "include_guid"; + + @SerializedName(SERIALIZED_NAME_INCLUDE_GUID) + @javax.annotation.Nullable + private Boolean includeGuid = true; + + public static final String SERIALIZED_NAME_INCLUDE_OBJ_ID = "include_obj_id"; + + @SerializedName(SERIALIZED_NAME_INCLUDE_OBJ_ID) + @javax.annotation.Nullable + private Boolean includeObjId = false; + + public static final String SERIALIZED_NAME_EXPORT_WITH_ASSOCIATED_FEEDBACKS = + "export_with_associated_feedbacks"; + + @SerializedName(SERIALIZED_NAME_EXPORT_WITH_ASSOCIATED_FEEDBACKS) + @javax.annotation.Nullable + private Boolean exportWithAssociatedFeedbacks = false; + + public static final String SERIALIZED_NAME_EXPORT_COLUMN_SECURITY_RULES = + "export_column_security_rules"; + + @SerializedName(SERIALIZED_NAME_EXPORT_COLUMN_SECURITY_RULES) + @javax.annotation.Nullable + private Boolean exportColumnSecurityRules = false; + + public static final String SERIALIZED_NAME_EXPORT_WITH_COLUMN_ALIASES = + "export_with_column_aliases"; + + @SerializedName(SERIALIZED_NAME_EXPORT_WITH_COLUMN_ALIASES) + @javax.annotation.Nullable + private Boolean exportWithColumnAliases = false; + + public ExportOptions() {} + + public ExportOptions includeObjIdRef(@javax.annotation.Nullable Boolean includeObjIdRef) { + this.includeObjIdRef = includeObjIdRef; + return this; + } + + /** + * Boolean Flag to export Object ID of referenced object. This flag will work only after the + * Object ID feature has been enabled. Please contact support to enable the feature. + * + * @return includeObjIdRef + */ + @javax.annotation.Nullable + public Boolean getIncludeObjIdRef() { + return includeObjIdRef; + } + + public void setIncludeObjIdRef(@javax.annotation.Nullable Boolean includeObjIdRef) { + this.includeObjIdRef = includeObjIdRef; + } + + public ExportOptions includeGuid(@javax.annotation.Nullable Boolean includeGuid) { + this.includeGuid = includeGuid; + return this; + } + + /** + * Boolean flag to export guid of the object. This flag will work only after the Object ID + * feature has been enabled. Please contact support to enable the feature. + * + * @return includeGuid + */ + @javax.annotation.Nullable + public Boolean getIncludeGuid() { + return includeGuid; + } + + public void setIncludeGuid(@javax.annotation.Nullable Boolean includeGuid) { + this.includeGuid = includeGuid; + } + + public ExportOptions includeObjId(@javax.annotation.Nullable Boolean includeObjId) { + this.includeObjId = includeObjId; + return this; + } + + /** + * Boolean flag to export Object ID of the object. This flag will work only after the Object ID + * feature has been enabled. Please contact support to enable the feature. + * + * @return includeObjId + */ + @javax.annotation.Nullable + public Boolean getIncludeObjId() { + return includeObjId; + } + + public void setIncludeObjId(@javax.annotation.Nullable Boolean includeObjId) { + this.includeObjId = includeObjId; + } + + public ExportOptions exportWithAssociatedFeedbacks( + @javax.annotation.Nullable Boolean exportWithAssociatedFeedbacks) { + this.exportWithAssociatedFeedbacks = exportWithAssociatedFeedbacks; + return this; + } + + /** + * Boolean flag indicating whether to export associated feedbacks of the object. This will only + * be respected when the object can have feedbacks. Version: 10.7.0.cl or later + * + * @return exportWithAssociatedFeedbacks + */ + @javax.annotation.Nullable + public Boolean getExportWithAssociatedFeedbacks() { + return exportWithAssociatedFeedbacks; + } + + public void setExportWithAssociatedFeedbacks( + @javax.annotation.Nullable Boolean exportWithAssociatedFeedbacks) { + this.exportWithAssociatedFeedbacks = exportWithAssociatedFeedbacks; + } + + public ExportOptions exportColumnSecurityRules( + @javax.annotation.Nullable Boolean exportColumnSecurityRules) { + this.exportColumnSecurityRules = exportColumnSecurityRules; + return this; + } + + /** + * Boolean flag indicating whether to export column security rules of the object. This will only + * be respected when the object can have column security rules and export_associated is true. + * Version: 10.12.0.cl or later + * + * @return exportColumnSecurityRules + */ + @javax.annotation.Nullable + public Boolean getExportColumnSecurityRules() { + return exportColumnSecurityRules; + } + + public void setExportColumnSecurityRules( + @javax.annotation.Nullable Boolean exportColumnSecurityRules) { + this.exportColumnSecurityRules = exportColumnSecurityRules; + } + + public ExportOptions exportWithColumnAliases( + @javax.annotation.Nullable Boolean exportWithColumnAliases) { + this.exportWithColumnAliases = exportWithColumnAliases; + return this; + } + + /** + * Boolean flag indicating whether to export column aliases of the model. This will only be + * respected when the object can have column aliases. Version: 10.13.0.cl or later + * + * @return exportWithColumnAliases + */ + @javax.annotation.Nullable + public Boolean getExportWithColumnAliases() { + return exportWithColumnAliases; + } + + public void setExportWithColumnAliases( + @javax.annotation.Nullable Boolean exportWithColumnAliases) { + this.exportWithColumnAliases = exportWithColumnAliases; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key name of the property + * @param value value of the property + * @return the ExportOptions instance itself + */ + public ExportOptions putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return a map of objects + */ + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key name of the property + * @return an object + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ExportOptions exportOptions = (ExportOptions) o; + return Objects.equals(this.includeObjIdRef, exportOptions.includeObjIdRef) + && Objects.equals(this.includeGuid, exportOptions.includeGuid) + && Objects.equals(this.includeObjId, exportOptions.includeObjId) + && Objects.equals( + this.exportWithAssociatedFeedbacks, + exportOptions.exportWithAssociatedFeedbacks) + && Objects.equals( + this.exportColumnSecurityRules, exportOptions.exportColumnSecurityRules) + && Objects.equals( + this.exportWithColumnAliases, exportOptions.exportWithColumnAliases) + && Objects.equals(this.additionalProperties, exportOptions.additionalProperties); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b + || (a != null + && b != null + && a.isPresent() + && b.isPresent() + && Objects.deepEquals(a.get(), b.get())); + } + + @Override + public int hashCode() { + return Objects.hash( + includeObjIdRef, + includeGuid, + includeObjId, + exportWithAssociatedFeedbacks, + exportColumnSecurityRules, + exportWithColumnAliases, + additionalProperties); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; + } + return a.isPresent() ? Arrays.deepHashCode(new Object[] {a.get()}) : 31; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ExportOptions {\n"); + sb.append(" includeObjIdRef: ").append(toIndentedString(includeObjIdRef)).append("\n"); + sb.append(" includeGuid: ").append(toIndentedString(includeGuid)).append("\n"); + sb.append(" includeObjId: ").append(toIndentedString(includeObjId)).append("\n"); + sb.append(" exportWithAssociatedFeedbacks: ") + .append(toIndentedString(exportWithAssociatedFeedbacks)) + .append("\n"); + sb.append(" exportColumnSecurityRules: ") + .append(toIndentedString(exportColumnSecurityRules)) + .append("\n"); + sb.append(" exportWithColumnAliases: ") + .append(toIndentedString(exportWithColumnAliases)) + .append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first + * line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("include_obj_id_ref"); + openapiFields.add("include_guid"); + openapiFields.add("include_obj_id"); + openapiFields.add("export_with_associated_feedbacks"); + openapiFields.add("export_column_security_rules"); + openapiFields.add("export_with_column_aliases"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to ExportOptions + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!ExportOptions.openapiRequiredFields + .isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException( + String.format( + "The required field(s) %s in ExportOptions is not found in the" + + " empty JSON string", + ExportOptions.openapiRequiredFields.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!ExportOptions.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'ExportOptions' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter = + gson.getDelegateAdapter(this, TypeToken.get(ExportOptions.class)); + + return (TypeAdapter) + new TypeAdapter() { + @Override + public void write(JsonWriter out, ExportOptions value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + obj.remove("additionalProperties"); + // serialize additional properties + if (value.getAdditionalProperties() != null) { + for (Map.Entry entry : + value.getAdditionalProperties().entrySet()) { + if (entry.getValue() instanceof String) + obj.addProperty(entry.getKey(), (String) entry.getValue()); + else if (entry.getValue() instanceof Number) + obj.addProperty(entry.getKey(), (Number) entry.getValue()); + else if (entry.getValue() instanceof Boolean) + obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); + else if (entry.getValue() instanceof Character) + obj.addProperty( + entry.getKey(), (Character) entry.getValue()); + else { + JsonElement jsonElement = gson.toJsonTree(entry.getValue()); + if (jsonElement.isJsonArray()) { + obj.add(entry.getKey(), jsonElement.getAsJsonArray()); + } else { + obj.add(entry.getKey(), jsonElement.getAsJsonObject()); + } + } + } + } + elementAdapter.write(out, obj); + } + + @Override + public ExportOptions read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // store additional fields in the deserialized instance + ExportOptions instance = thisAdapter.fromJsonTree(jsonObj); + for (Map.Entry entry : jsonObj.entrySet()) { + if (!openapiFields.contains(entry.getKey())) { + if (entry.getValue().isJsonPrimitive()) { // primitive type + if (entry.getValue().getAsJsonPrimitive().isString()) + instance.putAdditionalProperty( + entry.getKey(), entry.getValue().getAsString()); + else if (entry.getValue().getAsJsonPrimitive().isNumber()) + instance.putAdditionalProperty( + entry.getKey(), entry.getValue().getAsNumber()); + else if (entry.getValue().getAsJsonPrimitive().isBoolean()) + instance.putAdditionalProperty( + entry.getKey(), + entry.getValue().getAsBoolean()); + else + throw new IllegalArgumentException( + String.format( + "The field `%s` has unknown primitive" + + " type. Value: %s", + entry.getKey(), + entry.getValue().toString())); + } else if (entry.getValue().isJsonArray()) { + instance.putAdditionalProperty( + entry.getKey(), + gson.fromJson(entry.getValue(), List.class)); + } else { // JSON object + instance.putAdditionalProperty( + entry.getKey(), + gson.fromJson(entry.getValue(), HashMap.class)); + } + } + } + return instance; + } + }.nullSafe(); + } + } + + /** + * Create an instance of ExportOptions given an JSON string + * + * @param jsonString JSON string + * @return An instance of ExportOptions + * @throws IOException if the JSON string is invalid with respect to ExportOptions + */ + public static ExportOptions fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, ExportOptions.class); + } + + /** + * Convert an instance of ExportOptions to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} diff --git a/sdks/java/src/main/java/com/thoughtspot/client/model/ExternalTableInput.java b/sdks/java/src/main/java/com/thoughtspot/client/model/ExternalTableInput.java new file mode 100644 index 000000000..ee2adea41 --- /dev/null +++ b/sdks/java/src/main/java/com/thoughtspot/client/model/ExternalTableInput.java @@ -0,0 +1,432 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client.model; + +import com.google.gson.Gson; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.TypeAdapter; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.annotations.SerializedName; +import com.google.gson.reflect.TypeToken; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import com.thoughtspot.client.JSON; +import java.io.IOException; +import java.io.Serializable; +import java.util.Arrays; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Objects; +import org.openapitools.jackson.nullable.JsonNullable; + +/** ExternalTableInput */ +@javax.annotation.Generated( + value = "org.openapitools.codegen.languages.JavaClientCodegen", + comments = "Generator version: 7.12.0") +public class ExternalTableInput implements Serializable { + private static final long serialVersionUID = 1L; + + public static final String SERIALIZED_NAME_CONNECTION_IDENTIFIER = "connection_identifier"; + + @SerializedName(SERIALIZED_NAME_CONNECTION_IDENTIFIER) + @javax.annotation.Nonnull + private String connectionIdentifier; + + public static final String SERIALIZED_NAME_DATABASE_NAME = "database_name"; + + @SerializedName(SERIALIZED_NAME_DATABASE_NAME) + @javax.annotation.Nullable + private String databaseName = ""; + + public static final String SERIALIZED_NAME_SCHEMA_NAME = "schema_name"; + + @SerializedName(SERIALIZED_NAME_SCHEMA_NAME) + @javax.annotation.Nullable + private String schemaName = ""; + + public static final String SERIALIZED_NAME_TABLE_NAME = "table_name"; + + @SerializedName(SERIALIZED_NAME_TABLE_NAME) + @javax.annotation.Nonnull + private String tableName; + + public ExternalTableInput() {} + + public ExternalTableInput connectionIdentifier( + @javax.annotation.Nonnull String connectionIdentifier) { + this.connectionIdentifier = connectionIdentifier; + return this; + } + + /** + * Unique ID or name of the connection. + * + * @return connectionIdentifier + */ + @javax.annotation.Nonnull + public String getConnectionIdentifier() { + return connectionIdentifier; + } + + public void setConnectionIdentifier(@javax.annotation.Nonnull String connectionIdentifier) { + this.connectionIdentifier = connectionIdentifier; + } + + public ExternalTableInput databaseName(@javax.annotation.Nullable String databaseName) { + this.databaseName = databaseName; + return this; + } + + /** + * Name of the database. + * + * @return databaseName + */ + @javax.annotation.Nullable + public String getDatabaseName() { + return databaseName; + } + + public void setDatabaseName(@javax.annotation.Nullable String databaseName) { + this.databaseName = databaseName; + } + + public ExternalTableInput schemaName(@javax.annotation.Nullable String schemaName) { + this.schemaName = schemaName; + return this; + } + + /** + * Name of the schema. + * + * @return schemaName + */ + @javax.annotation.Nullable + public String getSchemaName() { + return schemaName; + } + + public void setSchemaName(@javax.annotation.Nullable String schemaName) { + this.schemaName = schemaName; + } + + public ExternalTableInput tableName(@javax.annotation.Nonnull String tableName) { + this.tableName = tableName; + return this; + } + + /** + * Name of the table. Table names may be case-sensitive depending on the database system. + * + * @return tableName + */ + @javax.annotation.Nonnull + public String getTableName() { + return tableName; + } + + public void setTableName(@javax.annotation.Nonnull String tableName) { + this.tableName = tableName; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key name of the property + * @param value value of the property + * @return the ExternalTableInput instance itself + */ + public ExternalTableInput putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return a map of objects + */ + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key name of the property + * @return an object + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ExternalTableInput externalTableInput = (ExternalTableInput) o; + return Objects.equals(this.connectionIdentifier, externalTableInput.connectionIdentifier) + && Objects.equals(this.databaseName, externalTableInput.databaseName) + && Objects.equals(this.schemaName, externalTableInput.schemaName) + && Objects.equals(this.tableName, externalTableInput.tableName) + && Objects.equals( + this.additionalProperties, externalTableInput.additionalProperties); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b + || (a != null + && b != null + && a.isPresent() + && b.isPresent() + && Objects.deepEquals(a.get(), b.get())); + } + + @Override + public int hashCode() { + return Objects.hash( + connectionIdentifier, databaseName, schemaName, tableName, additionalProperties); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; + } + return a.isPresent() ? Arrays.deepHashCode(new Object[] {a.get()}) : 31; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ExternalTableInput {\n"); + sb.append(" connectionIdentifier: ") + .append(toIndentedString(connectionIdentifier)) + .append("\n"); + sb.append(" databaseName: ").append(toIndentedString(databaseName)).append("\n"); + sb.append(" schemaName: ").append(toIndentedString(schemaName)).append("\n"); + sb.append(" tableName: ").append(toIndentedString(tableName)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first + * line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("connection_identifier"); + openapiFields.add("database_name"); + openapiFields.add("schema_name"); + openapiFields.add("table_name"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + openapiRequiredFields.add("connection_identifier"); + openapiRequiredFields.add("table_name"); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to ExternalTableInput + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!ExternalTableInput.openapiRequiredFields + .isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException( + String.format( + "The required field(s) %s in ExternalTableInput is not found in" + + " the empty JSON string", + ExternalTableInput.openapiRequiredFields.toString())); + } + } + + // check to make sure all required properties/fields are present in the JSON string + for (String requiredField : ExternalTableInput.openapiRequiredFields) { + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException( + String.format( + "The required field `%s` is not found in the JSON string: %s", + requiredField, jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if (!jsonObj.get("connection_identifier").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `connection_identifier` to be a primitive type in" + + " the JSON string but got `%s`", + jsonObj.get("connection_identifier").toString())); + } + if ((jsonObj.get("database_name") != null && !jsonObj.get("database_name").isJsonNull()) + && !jsonObj.get("database_name").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `database_name` to be a primitive type in the JSON" + + " string but got `%s`", + jsonObj.get("database_name").toString())); + } + if ((jsonObj.get("schema_name") != null && !jsonObj.get("schema_name").isJsonNull()) + && !jsonObj.get("schema_name").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `schema_name` to be a primitive type in the JSON" + + " string but got `%s`", + jsonObj.get("schema_name").toString())); + } + if (!jsonObj.get("table_name").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `table_name` to be a primitive type in the JSON" + + " string but got `%s`", + jsonObj.get("table_name").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!ExternalTableInput.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'ExternalTableInput' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter = + gson.getDelegateAdapter(this, TypeToken.get(ExternalTableInput.class)); + + return (TypeAdapter) + new TypeAdapter() { + @Override + public void write(JsonWriter out, ExternalTableInput value) + throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + obj.remove("additionalProperties"); + // serialize additional properties + if (value.getAdditionalProperties() != null) { + for (Map.Entry entry : + value.getAdditionalProperties().entrySet()) { + if (entry.getValue() instanceof String) + obj.addProperty(entry.getKey(), (String) entry.getValue()); + else if (entry.getValue() instanceof Number) + obj.addProperty(entry.getKey(), (Number) entry.getValue()); + else if (entry.getValue() instanceof Boolean) + obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); + else if (entry.getValue() instanceof Character) + obj.addProperty( + entry.getKey(), (Character) entry.getValue()); + else { + JsonElement jsonElement = gson.toJsonTree(entry.getValue()); + if (jsonElement.isJsonArray()) { + obj.add(entry.getKey(), jsonElement.getAsJsonArray()); + } else { + obj.add(entry.getKey(), jsonElement.getAsJsonObject()); + } + } + } + } + elementAdapter.write(out, obj); + } + + @Override + public ExternalTableInput read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // store additional fields in the deserialized instance + ExternalTableInput instance = thisAdapter.fromJsonTree(jsonObj); + for (Map.Entry entry : jsonObj.entrySet()) { + if (!openapiFields.contains(entry.getKey())) { + if (entry.getValue().isJsonPrimitive()) { // primitive type + if (entry.getValue().getAsJsonPrimitive().isString()) + instance.putAdditionalProperty( + entry.getKey(), entry.getValue().getAsString()); + else if (entry.getValue().getAsJsonPrimitive().isNumber()) + instance.putAdditionalProperty( + entry.getKey(), entry.getValue().getAsNumber()); + else if (entry.getValue().getAsJsonPrimitive().isBoolean()) + instance.putAdditionalProperty( + entry.getKey(), + entry.getValue().getAsBoolean()); + else + throw new IllegalArgumentException( + String.format( + "The field `%s` has unknown primitive" + + " type. Value: %s", + entry.getKey(), + entry.getValue().toString())); + } else if (entry.getValue().isJsonArray()) { + instance.putAdditionalProperty( + entry.getKey(), + gson.fromJson(entry.getValue(), List.class)); + } else { // JSON object + instance.putAdditionalProperty( + entry.getKey(), + gson.fromJson(entry.getValue(), HashMap.class)); + } + } + } + return instance; + } + }.nullSafe(); + } + } + + /** + * Create an instance of ExternalTableInput given an JSON string + * + * @param jsonString JSON string + * @return An instance of ExternalTableInput + * @throws IOException if the JSON string is invalid with respect to ExternalTableInput + */ + public static ExternalTableInput fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, ExternalTableInput.class); + } + + /** + * Convert an instance of ExternalTableInput to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} diff --git a/sdks/java/src/main/java/com/thoughtspot/client/model/FavoriteMetadataInput.java b/sdks/java/src/main/java/com/thoughtspot/client/model/FavoriteMetadataInput.java new file mode 100644 index 000000000..8b90ccacb --- /dev/null +++ b/sdks/java/src/main/java/com/thoughtspot/client/model/FavoriteMetadataInput.java @@ -0,0 +1,406 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client.model; + +import com.google.gson.Gson; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.TypeAdapter; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.reflect.TypeToken; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import com.thoughtspot.client.JSON; +import java.io.IOException; +import java.io.Serializable; +import java.util.Arrays; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Objects; +import org.openapitools.jackson.nullable.JsonNullable; + +/** FavoriteMetadataInput */ +@javax.annotation.Generated( + value = "org.openapitools.codegen.languages.JavaClientCodegen", + comments = "Generator version: 7.12.0") +public class FavoriteMetadataInput implements Serializable { + private static final long serialVersionUID = 1L; + + public static final String SERIALIZED_NAME_IDENTIFIER = "identifier"; + + @SerializedName(SERIALIZED_NAME_IDENTIFIER) + @javax.annotation.Nullable + private String identifier; + + /** + * Type of metadata object. Required if the name of the object is set as the identifier. This + * attribute is optional when the object GUID is specified as the identifier. + */ + @JsonAdapter(TypeEnum.Adapter.class) + public enum TypeEnum { + LIVEBOARD("LIVEBOARD"), + + ANSWER("ANSWER"); + + private String value; + + TypeEnum(String value) { + this.value = value; + } + + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + public static TypeEnum fromValue(String value) { + for (TypeEnum b : TypeEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + return null; + } + + public static class Adapter extends TypeAdapter { + @Override + public void write(final JsonWriter jsonWriter, final TypeEnum enumeration) + throws IOException { + jsonWriter.value(enumeration.getValue()); + } + + @Override + public TypeEnum read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + return TypeEnum.fromValue(value); + } + } + + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + String value = jsonElement.getAsString(); + TypeEnum.fromValue(value); + } + } + + public static final String SERIALIZED_NAME_TYPE = "type"; + + @SerializedName(SERIALIZED_NAME_TYPE) + @javax.annotation.Nullable + private TypeEnum type; + + public FavoriteMetadataInput() {} + + public FavoriteMetadataInput identifier(@javax.annotation.Nullable String identifier) { + this.identifier = identifier; + return this; + } + + /** + * Unique ID or name of the metadata object. + * + * @return identifier + */ + @javax.annotation.Nullable + public String getIdentifier() { + return identifier; + } + + public void setIdentifier(@javax.annotation.Nullable String identifier) { + this.identifier = identifier; + } + + public FavoriteMetadataInput type(@javax.annotation.Nullable TypeEnum type) { + this.type = type; + return this; + } + + /** + * Type of metadata object. Required if the name of the object is set as the identifier. This + * attribute is optional when the object GUID is specified as the identifier. + * + * @return type + */ + @javax.annotation.Nullable + public TypeEnum getType() { + return type; + } + + public void setType(@javax.annotation.Nullable TypeEnum type) { + this.type = type; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key name of the property + * @param value value of the property + * @return the FavoriteMetadataInput instance itself + */ + public FavoriteMetadataInput putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return a map of objects + */ + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key name of the property + * @return an object + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + FavoriteMetadataInput favoriteMetadataInput = (FavoriteMetadataInput) o; + return Objects.equals(this.identifier, favoriteMetadataInput.identifier) + && Objects.equals(this.type, favoriteMetadataInput.type) + && Objects.equals( + this.additionalProperties, favoriteMetadataInput.additionalProperties); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b + || (a != null + && b != null + && a.isPresent() + && b.isPresent() + && Objects.deepEquals(a.get(), b.get())); + } + + @Override + public int hashCode() { + return Objects.hash(identifier, type, additionalProperties); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; + } + return a.isPresent() ? Arrays.deepHashCode(new Object[] {a.get()}) : 31; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class FavoriteMetadataInput {\n"); + sb.append(" identifier: ").append(toIndentedString(identifier)).append("\n"); + sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first + * line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("identifier"); + openapiFields.add("type"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to FavoriteMetadataInput + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!FavoriteMetadataInput.openapiRequiredFields + .isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException( + String.format( + "The required field(s) %s in FavoriteMetadataInput is not found in" + + " the empty JSON string", + FavoriteMetadataInput.openapiRequiredFields.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if ((jsonObj.get("identifier") != null && !jsonObj.get("identifier").isJsonNull()) + && !jsonObj.get("identifier").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `identifier` to be a primitive type in the JSON" + + " string but got `%s`", + jsonObj.get("identifier").toString())); + } + if ((jsonObj.get("type") != null && !jsonObj.get("type").isJsonNull()) + && !jsonObj.get("type").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `type` to be a primitive type in the JSON string" + + " but got `%s`", + jsonObj.get("type").toString())); + } + // validate the optional field `type` + if (jsonObj.get("type") != null && !jsonObj.get("type").isJsonNull()) { + TypeEnum.validateJsonElement(jsonObj.get("type")); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!FavoriteMetadataInput.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'FavoriteMetadataInput' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter = + gson.getDelegateAdapter(this, TypeToken.get(FavoriteMetadataInput.class)); + + return (TypeAdapter) + new TypeAdapter() { + @Override + public void write(JsonWriter out, FavoriteMetadataInput value) + throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + obj.remove("additionalProperties"); + // serialize additional properties + if (value.getAdditionalProperties() != null) { + for (Map.Entry entry : + value.getAdditionalProperties().entrySet()) { + if (entry.getValue() instanceof String) + obj.addProperty(entry.getKey(), (String) entry.getValue()); + else if (entry.getValue() instanceof Number) + obj.addProperty(entry.getKey(), (Number) entry.getValue()); + else if (entry.getValue() instanceof Boolean) + obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); + else if (entry.getValue() instanceof Character) + obj.addProperty( + entry.getKey(), (Character) entry.getValue()); + else { + JsonElement jsonElement = gson.toJsonTree(entry.getValue()); + if (jsonElement.isJsonArray()) { + obj.add(entry.getKey(), jsonElement.getAsJsonArray()); + } else { + obj.add(entry.getKey(), jsonElement.getAsJsonObject()); + } + } + } + } + elementAdapter.write(out, obj); + } + + @Override + public FavoriteMetadataInput read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // store additional fields in the deserialized instance + FavoriteMetadataInput instance = thisAdapter.fromJsonTree(jsonObj); + for (Map.Entry entry : jsonObj.entrySet()) { + if (!openapiFields.contains(entry.getKey())) { + if (entry.getValue().isJsonPrimitive()) { // primitive type + if (entry.getValue().getAsJsonPrimitive().isString()) + instance.putAdditionalProperty( + entry.getKey(), entry.getValue().getAsString()); + else if (entry.getValue().getAsJsonPrimitive().isNumber()) + instance.putAdditionalProperty( + entry.getKey(), entry.getValue().getAsNumber()); + else if (entry.getValue().getAsJsonPrimitive().isBoolean()) + instance.putAdditionalProperty( + entry.getKey(), + entry.getValue().getAsBoolean()); + else + throw new IllegalArgumentException( + String.format( + "The field `%s` has unknown primitive" + + " type. Value: %s", + entry.getKey(), + entry.getValue().toString())); + } else if (entry.getValue().isJsonArray()) { + instance.putAdditionalProperty( + entry.getKey(), + gson.fromJson(entry.getValue(), List.class)); + } else { // JSON object + instance.putAdditionalProperty( + entry.getKey(), + gson.fromJson(entry.getValue(), HashMap.class)); + } + } + } + return instance; + } + }.nullSafe(); + } + } + + /** + * Create an instance of FavoriteMetadataInput given an JSON string + * + * @param jsonString JSON string + * @return An instance of FavoriteMetadataInput + * @throws IOException if the JSON string is invalid with respect to FavoriteMetadataInput + */ + public static FavoriteMetadataInput fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, FavoriteMetadataInput.class); + } + + /** + * Convert an instance of FavoriteMetadataInput to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} diff --git a/sdks/java/src/main/java/com/thoughtspot/client/model/FavoriteMetadataItem.java b/sdks/java/src/main/java/com/thoughtspot/client/model/FavoriteMetadataItem.java new file mode 100644 index 000000000..14614ed42 --- /dev/null +++ b/sdks/java/src/main/java/com/thoughtspot/client/model/FavoriteMetadataItem.java @@ -0,0 +1,446 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client.model; + +import com.google.gson.Gson; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.TypeAdapter; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.reflect.TypeToken; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import com.thoughtspot.client.JSON; +import java.io.IOException; +import java.io.Serializable; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Objects; + +/** FavoriteMetadataItem */ +@javax.annotation.Generated( + value = "org.openapitools.codegen.languages.JavaClientCodegen", + comments = "Generator version: 7.12.0") +public class FavoriteMetadataItem implements Serializable { + private static final long serialVersionUID = 1L; + + public static final String SERIALIZED_NAME_ID = "id"; + + @SerializedName(SERIALIZED_NAME_ID) + @javax.annotation.Nonnull + private String id; + + public static final String SERIALIZED_NAME_NAME = "name"; + + @SerializedName(SERIALIZED_NAME_NAME) + @javax.annotation.Nonnull + private String name; + + /** + * Type of metadata object. Required if the name of the object is set as the identifier. This + * attribute is optional when the object GUID is specified as the identifier. + */ + @JsonAdapter(TypeEnum.Adapter.class) + public enum TypeEnum { + LIVEBOARD("LIVEBOARD"), + + ANSWER("ANSWER"), + + LOGICAL_TABLE("LOGICAL_TABLE"), + + LOGICAL_COLUMN("LOGICAL_COLUMN"), + + CONNECTION("CONNECTION"), + + TAG("TAG"), + + USER("USER"), + + USER_GROUP("USER_GROUP"), + + LOGICAL_RELATIONSHIP("LOGICAL_RELATIONSHIP"); + + private String value; + + TypeEnum(String value) { + this.value = value; + } + + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + public static TypeEnum fromValue(String value) { + for (TypeEnum b : TypeEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + + public static class Adapter extends TypeAdapter { + @Override + public void write(final JsonWriter jsonWriter, final TypeEnum enumeration) + throws IOException { + jsonWriter.value(enumeration.getValue()); + } + + @Override + public TypeEnum read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + return TypeEnum.fromValue(value); + } + } + + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + String value = jsonElement.getAsString(); + TypeEnum.fromValue(value); + } + } + + public static final String SERIALIZED_NAME_TYPE = "type"; + + @SerializedName(SERIALIZED_NAME_TYPE) + @javax.annotation.Nonnull + private TypeEnum type; + + public FavoriteMetadataItem() {} + + public FavoriteMetadataItem id(@javax.annotation.Nonnull String id) { + this.id = id; + return this; + } + + /** + * Unique ID of the metadata object. + * + * @return id + */ + @javax.annotation.Nonnull + public String getId() { + return id; + } + + public void setId(@javax.annotation.Nonnull String id) { + this.id = id; + } + + public FavoriteMetadataItem name(@javax.annotation.Nonnull String name) { + this.name = name; + return this; + } + + /** + * name of the metadata object. + * + * @return name + */ + @javax.annotation.Nonnull + public String getName() { + return name; + } + + public void setName(@javax.annotation.Nonnull String name) { + this.name = name; + } + + public FavoriteMetadataItem type(@javax.annotation.Nonnull TypeEnum type) { + this.type = type; + return this; + } + + /** + * Type of metadata object. Required if the name of the object is set as the identifier. This + * attribute is optional when the object GUID is specified as the identifier. + * + * @return type + */ + @javax.annotation.Nonnull + public TypeEnum getType() { + return type; + } + + public void setType(@javax.annotation.Nonnull TypeEnum type) { + this.type = type; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key name of the property + * @param value value of the property + * @return the FavoriteMetadataItem instance itself + */ + public FavoriteMetadataItem putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return a map of objects + */ + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key name of the property + * @return an object + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + FavoriteMetadataItem favoriteMetadataItem = (FavoriteMetadataItem) o; + return Objects.equals(this.id, favoriteMetadataItem.id) + && Objects.equals(this.name, favoriteMetadataItem.name) + && Objects.equals(this.type, favoriteMetadataItem.type) + && Objects.equals( + this.additionalProperties, favoriteMetadataItem.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(id, name, type, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class FavoriteMetadataItem {\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first + * line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("id"); + openapiFields.add("name"); + openapiFields.add("type"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + openapiRequiredFields.add("id"); + openapiRequiredFields.add("name"); + openapiRequiredFields.add("type"); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to FavoriteMetadataItem + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!FavoriteMetadataItem.openapiRequiredFields + .isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException( + String.format( + "The required field(s) %s in FavoriteMetadataItem is not found in" + + " the empty JSON string", + FavoriteMetadataItem.openapiRequiredFields.toString())); + } + } + + // check to make sure all required properties/fields are present in the JSON string + for (String requiredField : FavoriteMetadataItem.openapiRequiredFields) { + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException( + String.format( + "The required field `%s` is not found in the JSON string: %s", + requiredField, jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if (!jsonObj.get("id").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `id` to be a primitive type in the JSON string but" + + " got `%s`", + jsonObj.get("id").toString())); + } + if (!jsonObj.get("name").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `name` to be a primitive type in the JSON string" + + " but got `%s`", + jsonObj.get("name").toString())); + } + if (!jsonObj.get("type").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `type` to be a primitive type in the JSON string" + + " but got `%s`", + jsonObj.get("type").toString())); + } + // validate the required field `type` + TypeEnum.validateJsonElement(jsonObj.get("type")); + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!FavoriteMetadataItem.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'FavoriteMetadataItem' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter = + gson.getDelegateAdapter(this, TypeToken.get(FavoriteMetadataItem.class)); + + return (TypeAdapter) + new TypeAdapter() { + @Override + public void write(JsonWriter out, FavoriteMetadataItem value) + throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + obj.remove("additionalProperties"); + // serialize additional properties + if (value.getAdditionalProperties() != null) { + for (Map.Entry entry : + value.getAdditionalProperties().entrySet()) { + if (entry.getValue() instanceof String) + obj.addProperty(entry.getKey(), (String) entry.getValue()); + else if (entry.getValue() instanceof Number) + obj.addProperty(entry.getKey(), (Number) entry.getValue()); + else if (entry.getValue() instanceof Boolean) + obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); + else if (entry.getValue() instanceof Character) + obj.addProperty( + entry.getKey(), (Character) entry.getValue()); + else { + JsonElement jsonElement = gson.toJsonTree(entry.getValue()); + if (jsonElement.isJsonArray()) { + obj.add(entry.getKey(), jsonElement.getAsJsonArray()); + } else { + obj.add(entry.getKey(), jsonElement.getAsJsonObject()); + } + } + } + } + elementAdapter.write(out, obj); + } + + @Override + public FavoriteMetadataItem read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // store additional fields in the deserialized instance + FavoriteMetadataItem instance = thisAdapter.fromJsonTree(jsonObj); + for (Map.Entry entry : jsonObj.entrySet()) { + if (!openapiFields.contains(entry.getKey())) { + if (entry.getValue().isJsonPrimitive()) { // primitive type + if (entry.getValue().getAsJsonPrimitive().isString()) + instance.putAdditionalProperty( + entry.getKey(), entry.getValue().getAsString()); + else if (entry.getValue().getAsJsonPrimitive().isNumber()) + instance.putAdditionalProperty( + entry.getKey(), entry.getValue().getAsNumber()); + else if (entry.getValue().getAsJsonPrimitive().isBoolean()) + instance.putAdditionalProperty( + entry.getKey(), + entry.getValue().getAsBoolean()); + else + throw new IllegalArgumentException( + String.format( + "The field `%s` has unknown primitive" + + " type. Value: %s", + entry.getKey(), + entry.getValue().toString())); + } else if (entry.getValue().isJsonArray()) { + instance.putAdditionalProperty( + entry.getKey(), + gson.fromJson(entry.getValue(), List.class)); + } else { // JSON object + instance.putAdditionalProperty( + entry.getKey(), + gson.fromJson(entry.getValue(), HashMap.class)); + } + } + } + return instance; + } + }.nullSafe(); + } + } + + /** + * Create an instance of FavoriteMetadataItem given an JSON string + * + * @param jsonString JSON string + * @return An instance of FavoriteMetadataItem + * @throws IOException if the JSON string is invalid with respect to FavoriteMetadataItem + */ + public static FavoriteMetadataItem fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, FavoriteMetadataItem.class); + } + + /** + * Convert an instance of FavoriteMetadataItem to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} diff --git a/sdks/java/src/main/java/com/thoughtspot/client/model/FavoriteObjectOptionsInput.java b/sdks/java/src/main/java/com/thoughtspot/client/model/FavoriteObjectOptionsInput.java new file mode 100644 index 000000000..43776aed5 --- /dev/null +++ b/sdks/java/src/main/java/com/thoughtspot/client/model/FavoriteObjectOptionsInput.java @@ -0,0 +1,352 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client.model; + +import com.google.gson.Gson; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.TypeAdapter; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.annotations.SerializedName; +import com.google.gson.reflect.TypeToken; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import com.thoughtspot.client.JSON; +import java.io.IOException; +import java.io.Serializable; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Objects; +import org.openapitools.jackson.nullable.JsonNullable; + +/** Favorite object options. */ +@javax.annotation.Generated( + value = "org.openapitools.codegen.languages.JavaClientCodegen", + comments = "Generator version: 7.12.0") +public class FavoriteObjectOptionsInput implements Serializable { + private static final long serialVersionUID = 1L; + + public static final String SERIALIZED_NAME_INCLUDE = "include"; + + @SerializedName(SERIALIZED_NAME_INCLUDE) + @javax.annotation.Nullable + private Boolean include = false; + + public static final String SERIALIZED_NAME_USER_IDENTIFIERS = "user_identifiers"; + + @SerializedName(SERIALIZED_NAME_USER_IDENTIFIERS) + @javax.annotation.Nullable + private List userIdentifiers; + + public FavoriteObjectOptionsInput() {} + + public FavoriteObjectOptionsInput include(@javax.annotation.Nullable Boolean include) { + this.include = include; + return this; + } + + /** + * Includes objects marked as favorite for the specified users. + * + * @return include + */ + @javax.annotation.Nullable + public Boolean getInclude() { + return include; + } + + public void setInclude(@javax.annotation.Nullable Boolean include) { + this.include = include; + } + + public FavoriteObjectOptionsInput userIdentifiers( + @javax.annotation.Nullable List userIdentifiers) { + this.userIdentifiers = userIdentifiers; + return this; + } + + public FavoriteObjectOptionsInput addUserIdentifiersItem(String userIdentifiersItem) { + if (this.userIdentifiers == null) { + this.userIdentifiers = new ArrayList<>(); + } + this.userIdentifiers.add(userIdentifiersItem); + return this; + } + + /** + * Unique ID or name of the users. If not specified, the favorite objects of current logged in + * user are returned. + * + * @return userIdentifiers + */ + @javax.annotation.Nullable + public List getUserIdentifiers() { + return userIdentifiers; + } + + public void setUserIdentifiers(@javax.annotation.Nullable List userIdentifiers) { + this.userIdentifiers = userIdentifiers; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key name of the property + * @param value value of the property + * @return the FavoriteObjectOptionsInput instance itself + */ + public FavoriteObjectOptionsInput putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return a map of objects + */ + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key name of the property + * @return an object + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + FavoriteObjectOptionsInput favoriteObjectOptionsInput = (FavoriteObjectOptionsInput) o; + return Objects.equals(this.include, favoriteObjectOptionsInput.include) + && Objects.equals(this.userIdentifiers, favoriteObjectOptionsInput.userIdentifiers) + && Objects.equals( + this.additionalProperties, favoriteObjectOptionsInput.additionalProperties); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b + || (a != null + && b != null + && a.isPresent() + && b.isPresent() + && Objects.deepEquals(a.get(), b.get())); + } + + @Override + public int hashCode() { + return Objects.hash(include, userIdentifiers, additionalProperties); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; + } + return a.isPresent() ? Arrays.deepHashCode(new Object[] {a.get()}) : 31; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class FavoriteObjectOptionsInput {\n"); + sb.append(" include: ").append(toIndentedString(include)).append("\n"); + sb.append(" userIdentifiers: ").append(toIndentedString(userIdentifiers)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first + * line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("include"); + openapiFields.add("user_identifiers"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to FavoriteObjectOptionsInput + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!FavoriteObjectOptionsInput.openapiRequiredFields + .isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException( + String.format( + "The required field(s) %s in FavoriteObjectOptionsInput is not" + + " found in the empty JSON string", + FavoriteObjectOptionsInput.openapiRequiredFields.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // ensure the optional json data is an array if present + if (jsonObj.get("user_identifiers") != null + && !jsonObj.get("user_identifiers").isJsonNull() + && !jsonObj.get("user_identifiers").isJsonArray()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `user_identifiers` to be an array in the JSON" + + " string but got `%s`", + jsonObj.get("user_identifiers").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!FavoriteObjectOptionsInput.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'FavoriteObjectOptionsInput' and its + // subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter = + gson.getDelegateAdapter(this, TypeToken.get(FavoriteObjectOptionsInput.class)); + + return (TypeAdapter) + new TypeAdapter() { + @Override + public void write(JsonWriter out, FavoriteObjectOptionsInput value) + throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + obj.remove("additionalProperties"); + // serialize additional properties + if (value.getAdditionalProperties() != null) { + for (Map.Entry entry : + value.getAdditionalProperties().entrySet()) { + if (entry.getValue() instanceof String) + obj.addProperty(entry.getKey(), (String) entry.getValue()); + else if (entry.getValue() instanceof Number) + obj.addProperty(entry.getKey(), (Number) entry.getValue()); + else if (entry.getValue() instanceof Boolean) + obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); + else if (entry.getValue() instanceof Character) + obj.addProperty( + entry.getKey(), (Character) entry.getValue()); + else { + JsonElement jsonElement = gson.toJsonTree(entry.getValue()); + if (jsonElement.isJsonArray()) { + obj.add(entry.getKey(), jsonElement.getAsJsonArray()); + } else { + obj.add(entry.getKey(), jsonElement.getAsJsonObject()); + } + } + } + } + elementAdapter.write(out, obj); + } + + @Override + public FavoriteObjectOptionsInput read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // store additional fields in the deserialized instance + FavoriteObjectOptionsInput instance = thisAdapter.fromJsonTree(jsonObj); + for (Map.Entry entry : jsonObj.entrySet()) { + if (!openapiFields.contains(entry.getKey())) { + if (entry.getValue().isJsonPrimitive()) { // primitive type + if (entry.getValue().getAsJsonPrimitive().isString()) + instance.putAdditionalProperty( + entry.getKey(), entry.getValue().getAsString()); + else if (entry.getValue().getAsJsonPrimitive().isNumber()) + instance.putAdditionalProperty( + entry.getKey(), entry.getValue().getAsNumber()); + else if (entry.getValue().getAsJsonPrimitive().isBoolean()) + instance.putAdditionalProperty( + entry.getKey(), + entry.getValue().getAsBoolean()); + else + throw new IllegalArgumentException( + String.format( + "The field `%s` has unknown primitive" + + " type. Value: %s", + entry.getKey(), + entry.getValue().toString())); + } else if (entry.getValue().isJsonArray()) { + instance.putAdditionalProperty( + entry.getKey(), + gson.fromJson(entry.getValue(), List.class)); + } else { // JSON object + instance.putAdditionalProperty( + entry.getKey(), + gson.fromJson(entry.getValue(), HashMap.class)); + } + } + } + return instance; + } + }.nullSafe(); + } + } + + /** + * Create an instance of FavoriteObjectOptionsInput given an JSON string + * + * @param jsonString JSON string + * @return An instance of FavoriteObjectOptionsInput + * @throws IOException if the JSON string is invalid with respect to FavoriteObjectOptionsInput + */ + public static FavoriteObjectOptionsInput fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, FavoriteObjectOptionsInput.class); + } + + /** + * Convert an instance of FavoriteObjectOptionsInput to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} diff --git a/sdks/java/src/main/java/com/thoughtspot/client/model/FetchAnswerDataRequest.java b/sdks/java/src/main/java/com/thoughtspot/client/model/FetchAnswerDataRequest.java new file mode 100644 index 000000000..a2fa1d1c3 --- /dev/null +++ b/sdks/java/src/main/java/com/thoughtspot/client/model/FetchAnswerDataRequest.java @@ -0,0 +1,564 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client.model; + +import com.google.gson.Gson; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.TypeAdapter; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.reflect.TypeToken; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import com.thoughtspot.client.JSON; +import java.io.IOException; +import java.io.Serializable; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Objects; + +/** FetchAnswerDataRequest */ +@javax.annotation.Generated( + value = "org.openapitools.codegen.languages.JavaClientCodegen", + comments = "Generator version: 7.12.0") +public class FetchAnswerDataRequest implements Serializable { + private static final long serialVersionUID = 1L; + + public static final String SERIALIZED_NAME_METADATA_IDENTIFIER = "metadata_identifier"; + + @SerializedName(SERIALIZED_NAME_METADATA_IDENTIFIER) + @javax.annotation.Nonnull + private String metadataIdentifier; + + /** + * JSON output in compact or full format. The FULL option is available in 9.12.5.cl or later. + */ + @JsonAdapter(DataFormatEnum.Adapter.class) + public enum DataFormatEnum { + FULL("FULL"), + + COMPACT("COMPACT"); + + private String value; + + DataFormatEnum(String value) { + this.value = value; + } + + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + public static DataFormatEnum fromValue(String value) { + for (DataFormatEnum b : DataFormatEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + + public static class Adapter extends TypeAdapter { + @Override + public void write(final JsonWriter jsonWriter, final DataFormatEnum enumeration) + throws IOException { + jsonWriter.value(enumeration.getValue()); + } + + @Override + public DataFormatEnum read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + return DataFormatEnum.fromValue(value); + } + } + + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + String value = jsonElement.getAsString(); + DataFormatEnum.fromValue(value); + } + } + + public static final String SERIALIZED_NAME_DATA_FORMAT = "data_format"; + + @SerializedName(SERIALIZED_NAME_DATA_FORMAT) + @javax.annotation.Nullable + private DataFormatEnum dataFormat = DataFormatEnum.COMPACT; + + public static final String SERIALIZED_NAME_RECORD_OFFSET = "record_offset"; + + @SerializedName(SERIALIZED_NAME_RECORD_OFFSET) + @javax.annotation.Nullable + private Integer recordOffset = 0; + + public static final String SERIALIZED_NAME_RECORD_SIZE = "record_size"; + + @SerializedName(SERIALIZED_NAME_RECORD_SIZE) + @javax.annotation.Nullable + private Integer recordSize = 10; + + public static final String SERIALIZED_NAME_RUNTIME_FILTER = "runtime_filter"; + + @SerializedName(SERIALIZED_NAME_RUNTIME_FILTER) + @javax.annotation.Nullable + private Object runtimeFilter; + + public static final String SERIALIZED_NAME_RUNTIME_SORT = "runtime_sort"; + + @SerializedName(SERIALIZED_NAME_RUNTIME_SORT) + @javax.annotation.Nullable + private Object runtimeSort; + + public static final String SERIALIZED_NAME_RUNTIME_PARAM_OVERRIDE = "runtime_param_override"; + + @SerializedName(SERIALIZED_NAME_RUNTIME_PARAM_OVERRIDE) + @javax.annotation.Nullable + private Object runtimeParamOverride; + + public FetchAnswerDataRequest() {} + + public FetchAnswerDataRequest metadataIdentifier( + @javax.annotation.Nonnull String metadataIdentifier) { + this.metadataIdentifier = metadataIdentifier; + return this; + } + + /** + * GUID or name of the Answer. + * + * @return metadataIdentifier + */ + @javax.annotation.Nonnull + public String getMetadataIdentifier() { + return metadataIdentifier; + } + + public void setMetadataIdentifier(@javax.annotation.Nonnull String metadataIdentifier) { + this.metadataIdentifier = metadataIdentifier; + } + + public FetchAnswerDataRequest dataFormat(@javax.annotation.Nullable DataFormatEnum dataFormat) { + this.dataFormat = dataFormat; + return this; + } + + /** + * JSON output in compact or full format. The FULL option is available in 9.12.5.cl or later. + * + * @return dataFormat + */ + @javax.annotation.Nullable + public DataFormatEnum getDataFormat() { + return dataFormat; + } + + public void setDataFormat(@javax.annotation.Nullable DataFormatEnum dataFormat) { + this.dataFormat = dataFormat; + } + + public FetchAnswerDataRequest recordOffset(@javax.annotation.Nullable Integer recordOffset) { + this.recordOffset = recordOffset; + return this; + } + + /** + * The starting record number from where the records should be included. + * + * @return recordOffset + */ + @javax.annotation.Nullable + public Integer getRecordOffset() { + return recordOffset; + } + + public void setRecordOffset(@javax.annotation.Nullable Integer recordOffset) { + this.recordOffset = recordOffset; + } + + public FetchAnswerDataRequest recordSize(@javax.annotation.Nullable Integer recordSize) { + this.recordSize = recordSize; + return this; + } + + /** + * The number of records to include in a batch. + * + * @return recordSize + */ + @javax.annotation.Nullable + public Integer getRecordSize() { + return recordSize; + } + + public void setRecordSize(@javax.annotation.Nullable Integer recordSize) { + this.recordSize = recordSize; + } + + public FetchAnswerDataRequest runtimeFilter(@javax.annotation.Nullable Object runtimeFilter) { + this.runtimeFilter = runtimeFilter; + return this; + } + + /** + * JSON object with representing filter condition to apply filters at runtime. For example, + * <code> {\"col1\": \"item type\", \"op1\": + * \"EQ\", \"val1\": \"Bags\"} </code>. You can add multiple + * keys by incrementing the number at the end, for example, col2, op2, val2, and col3, op3, + * val3. For more information, see [API + * Documentation](https://developers.thoughtspot.com/docs/fetch-data-and-report-apis#_runtime_filters). + * + * @return runtimeFilter + */ + @javax.annotation.Nullable + public Object getRuntimeFilter() { + return runtimeFilter; + } + + public void setRuntimeFilter(@javax.annotation.Nullable Object runtimeFilter) { + this.runtimeFilter = runtimeFilter; + } + + public FetchAnswerDataRequest runtimeSort(@javax.annotation.Nullable Object runtimeSort) { + this.runtimeSort = runtimeSort; + return this; + } + + /** + * JSON object representing columns to sort data at runtime. For example, <code> + * {\"sortCol1\": \"sales\", \"asc1\": true} </code>. You + * can add multiple keys by incrementing the number at the end, for example, sortCol1, asc2. For + * more information, see [API + * Documentation](https://developers.thoughtspot.com/docs/fetch-data-and-report-apis#_runtime_sort). + * + * @return runtimeSort + */ + @javax.annotation.Nullable + public Object getRuntimeSort() { + return runtimeSort; + } + + public void setRuntimeSort(@javax.annotation.Nullable Object runtimeSort) { + this.runtimeSort = runtimeSort; + } + + public FetchAnswerDataRequest runtimeParamOverride( + @javax.annotation.Nullable Object runtimeParamOverride) { + this.runtimeParamOverride = runtimeParamOverride; + return this; + } + + /** + * JSON object for setting values of parameters at runtime. For example, <code> + * {\"param1\": \"Double List Param\", \"paramVal1\": + * 0.5}</code>. You can add multiple keys by incrementing the number at the end, for + * example, param2, paramVal2. For more information, see [API + * Documentation](https://developers.thoughtspot.com/docs/fetch-data-and-report-apis#_runtime_parameters). + * + * @return runtimeParamOverride + */ + @javax.annotation.Nullable + public Object getRuntimeParamOverride() { + return runtimeParamOverride; + } + + public void setRuntimeParamOverride(@javax.annotation.Nullable Object runtimeParamOverride) { + this.runtimeParamOverride = runtimeParamOverride; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key name of the property + * @param value value of the property + * @return the FetchAnswerDataRequest instance itself + */ + public FetchAnswerDataRequest putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return a map of objects + */ + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key name of the property + * @return an object + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + FetchAnswerDataRequest fetchAnswerDataRequest = (FetchAnswerDataRequest) o; + return Objects.equals(this.metadataIdentifier, fetchAnswerDataRequest.metadataIdentifier) + && Objects.equals(this.dataFormat, fetchAnswerDataRequest.dataFormat) + && Objects.equals(this.recordOffset, fetchAnswerDataRequest.recordOffset) + && Objects.equals(this.recordSize, fetchAnswerDataRequest.recordSize) + && Objects.equals(this.runtimeFilter, fetchAnswerDataRequest.runtimeFilter) + && Objects.equals(this.runtimeSort, fetchAnswerDataRequest.runtimeSort) + && Objects.equals( + this.runtimeParamOverride, fetchAnswerDataRequest.runtimeParamOverride) + && Objects.equals( + this.additionalProperties, fetchAnswerDataRequest.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash( + metadataIdentifier, + dataFormat, + recordOffset, + recordSize, + runtimeFilter, + runtimeSort, + runtimeParamOverride, + additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class FetchAnswerDataRequest {\n"); + sb.append(" metadataIdentifier: ") + .append(toIndentedString(metadataIdentifier)) + .append("\n"); + sb.append(" dataFormat: ").append(toIndentedString(dataFormat)).append("\n"); + sb.append(" recordOffset: ").append(toIndentedString(recordOffset)).append("\n"); + sb.append(" recordSize: ").append(toIndentedString(recordSize)).append("\n"); + sb.append(" runtimeFilter: ").append(toIndentedString(runtimeFilter)).append("\n"); + sb.append(" runtimeSort: ").append(toIndentedString(runtimeSort)).append("\n"); + sb.append(" runtimeParamOverride: ") + .append(toIndentedString(runtimeParamOverride)) + .append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first + * line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("metadata_identifier"); + openapiFields.add("data_format"); + openapiFields.add("record_offset"); + openapiFields.add("record_size"); + openapiFields.add("runtime_filter"); + openapiFields.add("runtime_sort"); + openapiFields.add("runtime_param_override"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + openapiRequiredFields.add("metadata_identifier"); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to FetchAnswerDataRequest + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!FetchAnswerDataRequest.openapiRequiredFields + .isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException( + String.format( + "The required field(s) %s in FetchAnswerDataRequest is not found" + + " in the empty JSON string", + FetchAnswerDataRequest.openapiRequiredFields.toString())); + } + } + + // check to make sure all required properties/fields are present in the JSON string + for (String requiredField : FetchAnswerDataRequest.openapiRequiredFields) { + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException( + String.format( + "The required field `%s` is not found in the JSON string: %s", + requiredField, jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if (!jsonObj.get("metadata_identifier").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `metadata_identifier` to be a primitive type in" + + " the JSON string but got `%s`", + jsonObj.get("metadata_identifier").toString())); + } + if ((jsonObj.get("data_format") != null && !jsonObj.get("data_format").isJsonNull()) + && !jsonObj.get("data_format").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `data_format` to be a primitive type in the JSON" + + " string but got `%s`", + jsonObj.get("data_format").toString())); + } + // validate the optional field `data_format` + if (jsonObj.get("data_format") != null && !jsonObj.get("data_format").isJsonNull()) { + DataFormatEnum.validateJsonElement(jsonObj.get("data_format")); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!FetchAnswerDataRequest.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'FetchAnswerDataRequest' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter = + gson.getDelegateAdapter(this, TypeToken.get(FetchAnswerDataRequest.class)); + + return (TypeAdapter) + new TypeAdapter() { + @Override + public void write(JsonWriter out, FetchAnswerDataRequest value) + throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + obj.remove("additionalProperties"); + // serialize additional properties + if (value.getAdditionalProperties() != null) { + for (Map.Entry entry : + value.getAdditionalProperties().entrySet()) { + if (entry.getValue() instanceof String) + obj.addProperty(entry.getKey(), (String) entry.getValue()); + else if (entry.getValue() instanceof Number) + obj.addProperty(entry.getKey(), (Number) entry.getValue()); + else if (entry.getValue() instanceof Boolean) + obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); + else if (entry.getValue() instanceof Character) + obj.addProperty( + entry.getKey(), (Character) entry.getValue()); + else { + JsonElement jsonElement = gson.toJsonTree(entry.getValue()); + if (jsonElement.isJsonArray()) { + obj.add(entry.getKey(), jsonElement.getAsJsonArray()); + } else { + obj.add(entry.getKey(), jsonElement.getAsJsonObject()); + } + } + } + } + elementAdapter.write(out, obj); + } + + @Override + public FetchAnswerDataRequest read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // store additional fields in the deserialized instance + FetchAnswerDataRequest instance = thisAdapter.fromJsonTree(jsonObj); + for (Map.Entry entry : jsonObj.entrySet()) { + if (!openapiFields.contains(entry.getKey())) { + if (entry.getValue().isJsonPrimitive()) { // primitive type + if (entry.getValue().getAsJsonPrimitive().isString()) + instance.putAdditionalProperty( + entry.getKey(), entry.getValue().getAsString()); + else if (entry.getValue().getAsJsonPrimitive().isNumber()) + instance.putAdditionalProperty( + entry.getKey(), entry.getValue().getAsNumber()); + else if (entry.getValue().getAsJsonPrimitive().isBoolean()) + instance.putAdditionalProperty( + entry.getKey(), + entry.getValue().getAsBoolean()); + else + throw new IllegalArgumentException( + String.format( + "The field `%s` has unknown primitive" + + " type. Value: %s", + entry.getKey(), + entry.getValue().toString())); + } else if (entry.getValue().isJsonArray()) { + instance.putAdditionalProperty( + entry.getKey(), + gson.fromJson(entry.getValue(), List.class)); + } else { // JSON object + instance.putAdditionalProperty( + entry.getKey(), + gson.fromJson(entry.getValue(), HashMap.class)); + } + } + } + return instance; + } + }.nullSafe(); + } + } + + /** + * Create an instance of FetchAnswerDataRequest given an JSON string + * + * @param jsonString JSON string + * @return An instance of FetchAnswerDataRequest + * @throws IOException if the JSON string is invalid with respect to FetchAnswerDataRequest + */ + public static FetchAnswerDataRequest fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, FetchAnswerDataRequest.class); + } + + /** + * Convert an instance of FetchAnswerDataRequest to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} diff --git a/sdks/java/src/main/java/com/thoughtspot/client/model/FetchAnswerSqlQueryRequest.java b/sdks/java/src/main/java/com/thoughtspot/client/model/FetchAnswerSqlQueryRequest.java new file mode 100644 index 000000000..9141f93bb --- /dev/null +++ b/sdks/java/src/main/java/com/thoughtspot/client/model/FetchAnswerSqlQueryRequest.java @@ -0,0 +1,307 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client.model; + +import com.google.gson.Gson; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.TypeAdapter; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.annotations.SerializedName; +import com.google.gson.reflect.TypeToken; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import com.thoughtspot.client.JSON; +import java.io.IOException; +import java.io.Serializable; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Objects; + +/** FetchAnswerSqlQueryRequest */ +@javax.annotation.Generated( + value = "org.openapitools.codegen.languages.JavaClientCodegen", + comments = "Generator version: 7.12.0") +public class FetchAnswerSqlQueryRequest implements Serializable { + private static final long serialVersionUID = 1L; + + public static final String SERIALIZED_NAME_METADATA_IDENTIFIER = "metadata_identifier"; + + @SerializedName(SERIALIZED_NAME_METADATA_IDENTIFIER) + @javax.annotation.Nonnull + private String metadataIdentifier; + + public FetchAnswerSqlQueryRequest() {} + + public FetchAnswerSqlQueryRequest metadataIdentifier( + @javax.annotation.Nonnull String metadataIdentifier) { + this.metadataIdentifier = metadataIdentifier; + return this; + } + + /** + * ID or name of an Answer. + * + * @return metadataIdentifier + */ + @javax.annotation.Nonnull + public String getMetadataIdentifier() { + return metadataIdentifier; + } + + public void setMetadataIdentifier(@javax.annotation.Nonnull String metadataIdentifier) { + this.metadataIdentifier = metadataIdentifier; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key name of the property + * @param value value of the property + * @return the FetchAnswerSqlQueryRequest instance itself + */ + public FetchAnswerSqlQueryRequest putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return a map of objects + */ + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key name of the property + * @return an object + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + FetchAnswerSqlQueryRequest fetchAnswerSqlQueryRequest = (FetchAnswerSqlQueryRequest) o; + return Objects.equals( + this.metadataIdentifier, fetchAnswerSqlQueryRequest.metadataIdentifier) + && Objects.equals( + this.additionalProperties, fetchAnswerSqlQueryRequest.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(metadataIdentifier, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class FetchAnswerSqlQueryRequest {\n"); + sb.append(" metadataIdentifier: ") + .append(toIndentedString(metadataIdentifier)) + .append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first + * line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("metadata_identifier"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + openapiRequiredFields.add("metadata_identifier"); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to FetchAnswerSqlQueryRequest + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!FetchAnswerSqlQueryRequest.openapiRequiredFields + .isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException( + String.format( + "The required field(s) %s in FetchAnswerSqlQueryRequest is not" + + " found in the empty JSON string", + FetchAnswerSqlQueryRequest.openapiRequiredFields.toString())); + } + } + + // check to make sure all required properties/fields are present in the JSON string + for (String requiredField : FetchAnswerSqlQueryRequest.openapiRequiredFields) { + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException( + String.format( + "The required field `%s` is not found in the JSON string: %s", + requiredField, jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if (!jsonObj.get("metadata_identifier").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `metadata_identifier` to be a primitive type in" + + " the JSON string but got `%s`", + jsonObj.get("metadata_identifier").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!FetchAnswerSqlQueryRequest.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'FetchAnswerSqlQueryRequest' and its + // subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter = + gson.getDelegateAdapter(this, TypeToken.get(FetchAnswerSqlQueryRequest.class)); + + return (TypeAdapter) + new TypeAdapter() { + @Override + public void write(JsonWriter out, FetchAnswerSqlQueryRequest value) + throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + obj.remove("additionalProperties"); + // serialize additional properties + if (value.getAdditionalProperties() != null) { + for (Map.Entry entry : + value.getAdditionalProperties().entrySet()) { + if (entry.getValue() instanceof String) + obj.addProperty(entry.getKey(), (String) entry.getValue()); + else if (entry.getValue() instanceof Number) + obj.addProperty(entry.getKey(), (Number) entry.getValue()); + else if (entry.getValue() instanceof Boolean) + obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); + else if (entry.getValue() instanceof Character) + obj.addProperty( + entry.getKey(), (Character) entry.getValue()); + else { + JsonElement jsonElement = gson.toJsonTree(entry.getValue()); + if (jsonElement.isJsonArray()) { + obj.add(entry.getKey(), jsonElement.getAsJsonArray()); + } else { + obj.add(entry.getKey(), jsonElement.getAsJsonObject()); + } + } + } + } + elementAdapter.write(out, obj); + } + + @Override + public FetchAnswerSqlQueryRequest read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // store additional fields in the deserialized instance + FetchAnswerSqlQueryRequest instance = thisAdapter.fromJsonTree(jsonObj); + for (Map.Entry entry : jsonObj.entrySet()) { + if (!openapiFields.contains(entry.getKey())) { + if (entry.getValue().isJsonPrimitive()) { // primitive type + if (entry.getValue().getAsJsonPrimitive().isString()) + instance.putAdditionalProperty( + entry.getKey(), entry.getValue().getAsString()); + else if (entry.getValue().getAsJsonPrimitive().isNumber()) + instance.putAdditionalProperty( + entry.getKey(), entry.getValue().getAsNumber()); + else if (entry.getValue().getAsJsonPrimitive().isBoolean()) + instance.putAdditionalProperty( + entry.getKey(), + entry.getValue().getAsBoolean()); + else + throw new IllegalArgumentException( + String.format( + "The field `%s` has unknown primitive" + + " type. Value: %s", + entry.getKey(), + entry.getValue().toString())); + } else if (entry.getValue().isJsonArray()) { + instance.putAdditionalProperty( + entry.getKey(), + gson.fromJson(entry.getValue(), List.class)); + } else { // JSON object + instance.putAdditionalProperty( + entry.getKey(), + gson.fromJson(entry.getValue(), HashMap.class)); + } + } + } + return instance; + } + }.nullSafe(); + } + } + + /** + * Create an instance of FetchAnswerSqlQueryRequest given an JSON string + * + * @param jsonString JSON string + * @return An instance of FetchAnswerSqlQueryRequest + * @throws IOException if the JSON string is invalid with respect to FetchAnswerSqlQueryRequest + */ + public static FetchAnswerSqlQueryRequest fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, FetchAnswerSqlQueryRequest.class); + } + + /** + * Convert an instance of FetchAnswerSqlQueryRequest to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} diff --git a/sdks/java/src/main/java/com/thoughtspot/client/model/FetchAsyncImportTaskStatusRequest.java b/sdks/java/src/main/java/com/thoughtspot/client/model/FetchAsyncImportTaskStatusRequest.java new file mode 100644 index 000000000..351e778cc --- /dev/null +++ b/sdks/java/src/main/java/com/thoughtspot/client/model/FetchAsyncImportTaskStatusRequest.java @@ -0,0 +1,572 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client.model; + +import com.google.gson.Gson; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.TypeAdapter; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.reflect.TypeToken; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import com.thoughtspot.client.JSON; +import java.io.IOException; +import java.io.Serializable; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Objects; +import org.openapitools.jackson.nullable.JsonNullable; + +/** FetchAsyncImportTaskStatusRequest */ +@javax.annotation.Generated( + value = "org.openapitools.codegen.languages.JavaClientCodegen", + comments = "Generator version: 7.12.0") +public class FetchAsyncImportTaskStatusRequest implements Serializable { + private static final long serialVersionUID = 1L; + + public static final String SERIALIZED_NAME_TASK_IDS = "task_ids"; + + @SerializedName(SERIALIZED_NAME_TASK_IDS) + @javax.annotation.Nullable + private List taskIds; + + /** Gets or Sets taskStatus */ + @JsonAdapter(TaskStatusEnum.Adapter.class) + public enum TaskStatusEnum { + COMPLETED("COMPLETED"), + + IN_QUEUE("IN_QUEUE"), + + IN_PROGRESS("IN_PROGRESS"), + + FAILED("FAILED"); + + private String value; + + TaskStatusEnum(String value) { + this.value = value; + } + + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + public static TaskStatusEnum fromValue(String value) { + for (TaskStatusEnum b : TaskStatusEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + + public static class Adapter extends TypeAdapter { + @Override + public void write(final JsonWriter jsonWriter, final TaskStatusEnum enumeration) + throws IOException { + jsonWriter.value(enumeration.getValue()); + } + + @Override + public TaskStatusEnum read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + return TaskStatusEnum.fromValue(value); + } + } + + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + String value = jsonElement.getAsString(); + TaskStatusEnum.fromValue(value); + } + } + + public static final String SERIALIZED_NAME_TASK_STATUS = "task_status"; + + @SerializedName(SERIALIZED_NAME_TASK_STATUS) + @javax.annotation.Nullable + private List taskStatus; + + public static final String SERIALIZED_NAME_AUTHOR_IDENTIFIER = "author_identifier"; + + @SerializedName(SERIALIZED_NAME_AUTHOR_IDENTIFIER) + @javax.annotation.Nullable + private String authorIdentifier; + + public static final String SERIALIZED_NAME_RECORD_OFFSET = "record_offset"; + + @SerializedName(SERIALIZED_NAME_RECORD_OFFSET) + @javax.annotation.Nullable + private Integer recordOffset = 0; + + public static final String SERIALIZED_NAME_RECORD_SIZE = "record_size"; + + @SerializedName(SERIALIZED_NAME_RECORD_SIZE) + @javax.annotation.Nullable + private Integer recordSize = 5; + + public static final String SERIALIZED_NAME_INCLUDE_IMPORT_RESPONSE = "include_import_response"; + + @SerializedName(SERIALIZED_NAME_INCLUDE_IMPORT_RESPONSE) + @javax.annotation.Nullable + private Boolean includeImportResponse = false; + + public FetchAsyncImportTaskStatusRequest() {} + + public FetchAsyncImportTaskStatusRequest taskIds( + @javax.annotation.Nullable List taskIds) { + this.taskIds = taskIds; + return this; + } + + public FetchAsyncImportTaskStatusRequest addTaskIdsItem(String taskIdsItem) { + if (this.taskIds == null) { + this.taskIds = new ArrayList<>(); + } + this.taskIds.add(taskIdsItem); + return this; + } + + /** + * List of task IDs to fetch status for. + * + * @return taskIds + */ + @javax.annotation.Nullable + public List getTaskIds() { + return taskIds; + } + + public void setTaskIds(@javax.annotation.Nullable List taskIds) { + this.taskIds = taskIds; + } + + public FetchAsyncImportTaskStatusRequest taskStatus( + @javax.annotation.Nullable List taskStatus) { + this.taskStatus = taskStatus; + return this; + } + + public FetchAsyncImportTaskStatusRequest addTaskStatusItem(TaskStatusEnum taskStatusItem) { + if (this.taskStatus == null) { + this.taskStatus = new ArrayList<>(); + } + this.taskStatus.add(taskStatusItem); + return this; + } + + /** + * List of task statuses to filter on. Valid values: [IN_QUEUE, IN_PROGRESS, COMPLETED, FAILED] + * + * @return taskStatus + */ + @javax.annotation.Nullable + public List getTaskStatus() { + return taskStatus; + } + + public void setTaskStatus(@javax.annotation.Nullable List taskStatus) { + this.taskStatus = taskStatus; + } + + public FetchAsyncImportTaskStatusRequest authorIdentifier( + @javax.annotation.Nullable String authorIdentifier) { + this.authorIdentifier = authorIdentifier; + return this; + } + + /** + * Author GUID or name of async import tasks to filter on. + * + * @return authorIdentifier + */ + @javax.annotation.Nullable + public String getAuthorIdentifier() { + return authorIdentifier; + } + + public void setAuthorIdentifier(@javax.annotation.Nullable String authorIdentifier) { + this.authorIdentifier = authorIdentifier; + } + + public FetchAsyncImportTaskStatusRequest recordOffset( + @javax.annotation.Nullable Integer recordOffset) { + this.recordOffset = recordOffset; + return this; + } + + /** + * The offset point, starting from where the task status should be included in the response. + * + * @return recordOffset + */ + @javax.annotation.Nullable + public Integer getRecordOffset() { + return recordOffset; + } + + public void setRecordOffset(@javax.annotation.Nullable Integer recordOffset) { + this.recordOffset = recordOffset; + } + + public FetchAsyncImportTaskStatusRequest recordSize( + @javax.annotation.Nullable Integer recordSize) { + this.recordSize = recordSize; + return this; + } + + /** + * The number of task statuses that should be included in the response starting from offset + * position. + * + * @return recordSize + */ + @javax.annotation.Nullable + public Integer getRecordSize() { + return recordSize; + } + + public void setRecordSize(@javax.annotation.Nullable Integer recordSize) { + this.recordSize = recordSize; + } + + public FetchAsyncImportTaskStatusRequest includeImportResponse( + @javax.annotation.Nullable Boolean includeImportResponse) { + this.includeImportResponse = includeImportResponse; + return this; + } + + /** + * Boolean flag to specify whether to include import response in the task status objects. + * + * @return includeImportResponse + */ + @javax.annotation.Nullable + public Boolean getIncludeImportResponse() { + return includeImportResponse; + } + + public void setIncludeImportResponse(@javax.annotation.Nullable Boolean includeImportResponse) { + this.includeImportResponse = includeImportResponse; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key name of the property + * @param value value of the property + * @return the FetchAsyncImportTaskStatusRequest instance itself + */ + public FetchAsyncImportTaskStatusRequest putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return a map of objects + */ + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key name of the property + * @return an object + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + FetchAsyncImportTaskStatusRequest fetchAsyncImportTaskStatusRequest = + (FetchAsyncImportTaskStatusRequest) o; + return Objects.equals(this.taskIds, fetchAsyncImportTaskStatusRequest.taskIds) + && Objects.equals(this.taskStatus, fetchAsyncImportTaskStatusRequest.taskStatus) + && Objects.equals( + this.authorIdentifier, fetchAsyncImportTaskStatusRequest.authorIdentifier) + && Objects.equals(this.recordOffset, fetchAsyncImportTaskStatusRequest.recordOffset) + && Objects.equals(this.recordSize, fetchAsyncImportTaskStatusRequest.recordSize) + && Objects.equals( + this.includeImportResponse, + fetchAsyncImportTaskStatusRequest.includeImportResponse) + && Objects.equals( + this.additionalProperties, + fetchAsyncImportTaskStatusRequest.additionalProperties); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b + || (a != null + && b != null + && a.isPresent() + && b.isPresent() + && Objects.deepEquals(a.get(), b.get())); + } + + @Override + public int hashCode() { + return Objects.hash( + taskIds, + taskStatus, + authorIdentifier, + recordOffset, + recordSize, + includeImportResponse, + additionalProperties); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; + } + return a.isPresent() ? Arrays.deepHashCode(new Object[] {a.get()}) : 31; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class FetchAsyncImportTaskStatusRequest {\n"); + sb.append(" taskIds: ").append(toIndentedString(taskIds)).append("\n"); + sb.append(" taskStatus: ").append(toIndentedString(taskStatus)).append("\n"); + sb.append(" authorIdentifier: ").append(toIndentedString(authorIdentifier)).append("\n"); + sb.append(" recordOffset: ").append(toIndentedString(recordOffset)).append("\n"); + sb.append(" recordSize: ").append(toIndentedString(recordSize)).append("\n"); + sb.append(" includeImportResponse: ") + .append(toIndentedString(includeImportResponse)) + .append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first + * line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("task_ids"); + openapiFields.add("task_status"); + openapiFields.add("author_identifier"); + openapiFields.add("record_offset"); + openapiFields.add("record_size"); + openapiFields.add("include_import_response"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to + * FetchAsyncImportTaskStatusRequest + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!FetchAsyncImportTaskStatusRequest.openapiRequiredFields + .isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException( + String.format( + "The required field(s) %s in FetchAsyncImportTaskStatusRequest is" + + " not found in the empty JSON string", + FetchAsyncImportTaskStatusRequest.openapiRequiredFields + .toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // ensure the optional json data is an array if present + if (jsonObj.get("task_ids") != null + && !jsonObj.get("task_ids").isJsonNull() + && !jsonObj.get("task_ids").isJsonArray()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `task_ids` to be an array in the JSON string but" + + " got `%s`", + jsonObj.get("task_ids").toString())); + } + // ensure the optional json data is an array if present + if (jsonObj.get("task_status") != null + && !jsonObj.get("task_status").isJsonNull() + && !jsonObj.get("task_status").isJsonArray()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `task_status` to be an array in the JSON string" + + " but got `%s`", + jsonObj.get("task_status").toString())); + } + if ((jsonObj.get("author_identifier") != null + && !jsonObj.get("author_identifier").isJsonNull()) + && !jsonObj.get("author_identifier").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `author_identifier` to be a primitive type in the" + + " JSON string but got `%s`", + jsonObj.get("author_identifier").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!FetchAsyncImportTaskStatusRequest.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'FetchAsyncImportTaskStatusRequest' and + // its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter = + gson.getDelegateAdapter( + this, TypeToken.get(FetchAsyncImportTaskStatusRequest.class)); + + return (TypeAdapter) + new TypeAdapter() { + @Override + public void write(JsonWriter out, FetchAsyncImportTaskStatusRequest value) + throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + obj.remove("additionalProperties"); + // serialize additional properties + if (value.getAdditionalProperties() != null) { + for (Map.Entry entry : + value.getAdditionalProperties().entrySet()) { + if (entry.getValue() instanceof String) + obj.addProperty(entry.getKey(), (String) entry.getValue()); + else if (entry.getValue() instanceof Number) + obj.addProperty(entry.getKey(), (Number) entry.getValue()); + else if (entry.getValue() instanceof Boolean) + obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); + else if (entry.getValue() instanceof Character) + obj.addProperty( + entry.getKey(), (Character) entry.getValue()); + else { + JsonElement jsonElement = gson.toJsonTree(entry.getValue()); + if (jsonElement.isJsonArray()) { + obj.add(entry.getKey(), jsonElement.getAsJsonArray()); + } else { + obj.add(entry.getKey(), jsonElement.getAsJsonObject()); + } + } + } + } + elementAdapter.write(out, obj); + } + + @Override + public FetchAsyncImportTaskStatusRequest read(JsonReader in) + throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // store additional fields in the deserialized instance + FetchAsyncImportTaskStatusRequest instance = + thisAdapter.fromJsonTree(jsonObj); + for (Map.Entry entry : jsonObj.entrySet()) { + if (!openapiFields.contains(entry.getKey())) { + if (entry.getValue().isJsonPrimitive()) { // primitive type + if (entry.getValue().getAsJsonPrimitive().isString()) + instance.putAdditionalProperty( + entry.getKey(), entry.getValue().getAsString()); + else if (entry.getValue().getAsJsonPrimitive().isNumber()) + instance.putAdditionalProperty( + entry.getKey(), entry.getValue().getAsNumber()); + else if (entry.getValue().getAsJsonPrimitive().isBoolean()) + instance.putAdditionalProperty( + entry.getKey(), + entry.getValue().getAsBoolean()); + else + throw new IllegalArgumentException( + String.format( + "The field `%s` has unknown primitive" + + " type. Value: %s", + entry.getKey(), + entry.getValue().toString())); + } else if (entry.getValue().isJsonArray()) { + instance.putAdditionalProperty( + entry.getKey(), + gson.fromJson(entry.getValue(), List.class)); + } else { // JSON object + instance.putAdditionalProperty( + entry.getKey(), + gson.fromJson(entry.getValue(), HashMap.class)); + } + } + } + return instance; + } + }.nullSafe(); + } + } + + /** + * Create an instance of FetchAsyncImportTaskStatusRequest given an JSON string + * + * @param jsonString JSON string + * @return An instance of FetchAsyncImportTaskStatusRequest + * @throws IOException if the JSON string is invalid with respect to + * FetchAsyncImportTaskStatusRequest + */ + public static FetchAsyncImportTaskStatusRequest fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, FetchAsyncImportTaskStatusRequest.class); + } + + /** + * Convert an instance of FetchAsyncImportTaskStatusRequest to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} diff --git a/sdks/java/src/main/java/com/thoughtspot/client/model/FetchColumnSecurityRulesRequest.java b/sdks/java/src/main/java/com/thoughtspot/client/model/FetchColumnSecurityRulesRequest.java new file mode 100644 index 000000000..ceeeeb40c --- /dev/null +++ b/sdks/java/src/main/java/com/thoughtspot/client/model/FetchColumnSecurityRulesRequest.java @@ -0,0 +1,329 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client.model; + +import com.google.gson.Gson; +import com.google.gson.JsonArray; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.TypeAdapter; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.annotations.SerializedName; +import com.google.gson.reflect.TypeToken; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import com.thoughtspot.client.JSON; +import java.io.IOException; +import java.io.Serializable; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Objects; + +/** FetchColumnSecurityRulesRequest */ +@javax.annotation.Generated( + value = "org.openapitools.codegen.languages.JavaClientCodegen", + comments = "Generator version: 7.12.0") +public class FetchColumnSecurityRulesRequest implements Serializable { + private static final long serialVersionUID = 1L; + + public static final String SERIALIZED_NAME_TABLES = "tables"; + + @SerializedName(SERIALIZED_NAME_TABLES) + @javax.annotation.Nonnull + private List tables; + + public FetchColumnSecurityRulesRequest() {} + + public FetchColumnSecurityRulesRequest tables( + @javax.annotation.Nonnull List tables) { + this.tables = tables; + return this; + } + + public FetchColumnSecurityRulesRequest addTablesItem(ColumnSecurityRuleTableInput tablesItem) { + if (this.tables == null) { + this.tables = new ArrayList<>(); + } + this.tables.add(tablesItem); + return this; + } + + /** + * Array of table identifier objects for which to fetch column security rules + * + * @return tables + */ + @javax.annotation.Nonnull + public List getTables() { + return tables; + } + + public void setTables(@javax.annotation.Nonnull List tables) { + this.tables = tables; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key name of the property + * @param value value of the property + * @return the FetchColumnSecurityRulesRequest instance itself + */ + public FetchColumnSecurityRulesRequest putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return a map of objects + */ + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key name of the property + * @return an object + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + FetchColumnSecurityRulesRequest fetchColumnSecurityRulesRequest = + (FetchColumnSecurityRulesRequest) o; + return Objects.equals(this.tables, fetchColumnSecurityRulesRequest.tables) + && Objects.equals( + this.additionalProperties, + fetchColumnSecurityRulesRequest.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(tables, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class FetchColumnSecurityRulesRequest {\n"); + sb.append(" tables: ").append(toIndentedString(tables)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first + * line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("tables"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + openapiRequiredFields.add("tables"); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to + * FetchColumnSecurityRulesRequest + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!FetchColumnSecurityRulesRequest.openapiRequiredFields + .isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException( + String.format( + "The required field(s) %s in FetchColumnSecurityRulesRequest is" + + " not found in the empty JSON string", + FetchColumnSecurityRulesRequest.openapiRequiredFields.toString())); + } + } + + // check to make sure all required properties/fields are present in the JSON string + for (String requiredField : FetchColumnSecurityRulesRequest.openapiRequiredFields) { + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException( + String.format( + "The required field `%s` is not found in the JSON string: %s", + requiredField, jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // ensure the json data is an array + if (!jsonObj.get("tables").isJsonArray()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `tables` to be an array in the JSON string but got" + + " `%s`", + jsonObj.get("tables").toString())); + } + + JsonArray jsonArraytables = jsonObj.getAsJsonArray("tables"); + // validate the required field `tables` (array) + for (int i = 0; i < jsonArraytables.size(); i++) { + ColumnSecurityRuleTableInput.validateJsonElement(jsonArraytables.get(i)); + } + ; + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!FetchColumnSecurityRulesRequest.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'FetchColumnSecurityRulesRequest' and its + // subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter = + gson.getDelegateAdapter( + this, TypeToken.get(FetchColumnSecurityRulesRequest.class)); + + return (TypeAdapter) + new TypeAdapter() { + @Override + public void write(JsonWriter out, FetchColumnSecurityRulesRequest value) + throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + obj.remove("additionalProperties"); + // serialize additional properties + if (value.getAdditionalProperties() != null) { + for (Map.Entry entry : + value.getAdditionalProperties().entrySet()) { + if (entry.getValue() instanceof String) + obj.addProperty(entry.getKey(), (String) entry.getValue()); + else if (entry.getValue() instanceof Number) + obj.addProperty(entry.getKey(), (Number) entry.getValue()); + else if (entry.getValue() instanceof Boolean) + obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); + else if (entry.getValue() instanceof Character) + obj.addProperty( + entry.getKey(), (Character) entry.getValue()); + else { + JsonElement jsonElement = gson.toJsonTree(entry.getValue()); + if (jsonElement.isJsonArray()) { + obj.add(entry.getKey(), jsonElement.getAsJsonArray()); + } else { + obj.add(entry.getKey(), jsonElement.getAsJsonObject()); + } + } + } + } + elementAdapter.write(out, obj); + } + + @Override + public FetchColumnSecurityRulesRequest read(JsonReader in) + throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // store additional fields in the deserialized instance + FetchColumnSecurityRulesRequest instance = + thisAdapter.fromJsonTree(jsonObj); + for (Map.Entry entry : jsonObj.entrySet()) { + if (!openapiFields.contains(entry.getKey())) { + if (entry.getValue().isJsonPrimitive()) { // primitive type + if (entry.getValue().getAsJsonPrimitive().isString()) + instance.putAdditionalProperty( + entry.getKey(), entry.getValue().getAsString()); + else if (entry.getValue().getAsJsonPrimitive().isNumber()) + instance.putAdditionalProperty( + entry.getKey(), entry.getValue().getAsNumber()); + else if (entry.getValue().getAsJsonPrimitive().isBoolean()) + instance.putAdditionalProperty( + entry.getKey(), + entry.getValue().getAsBoolean()); + else + throw new IllegalArgumentException( + String.format( + "The field `%s` has unknown primitive" + + " type. Value: %s", + entry.getKey(), + entry.getValue().toString())); + } else if (entry.getValue().isJsonArray()) { + instance.putAdditionalProperty( + entry.getKey(), + gson.fromJson(entry.getValue(), List.class)); + } else { // JSON object + instance.putAdditionalProperty( + entry.getKey(), + gson.fromJson(entry.getValue(), HashMap.class)); + } + } + } + return instance; + } + }.nullSafe(); + } + } + + /** + * Create an instance of FetchColumnSecurityRulesRequest given an JSON string + * + * @param jsonString JSON string + * @return An instance of FetchColumnSecurityRulesRequest + * @throws IOException if the JSON string is invalid with respect to + * FetchColumnSecurityRulesRequest + */ + public static FetchColumnSecurityRulesRequest fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, FetchColumnSecurityRulesRequest.class); + } + + /** + * Convert an instance of FetchColumnSecurityRulesRequest to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} diff --git a/sdks/java/src/main/java/com/thoughtspot/client/model/FetchConnectionDiffStatusResponse.java b/sdks/java/src/main/java/com/thoughtspot/client/model/FetchConnectionDiffStatusResponse.java new file mode 100644 index 000000000..3cd1f9088 --- /dev/null +++ b/sdks/java/src/main/java/com/thoughtspot/client/model/FetchConnectionDiffStatusResponse.java @@ -0,0 +1,311 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client.model; + +import com.google.gson.Gson; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.TypeAdapter; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.annotations.SerializedName; +import com.google.gson.reflect.TypeToken; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import com.thoughtspot.client.JSON; +import java.io.IOException; +import java.io.Serializable; +import java.util.Arrays; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Objects; +import org.openapitools.jackson.nullable.JsonNullable; + +/** FetchConnectionDiffStatusResponse */ +@javax.annotation.Generated( + value = "org.openapitools.codegen.languages.JavaClientCodegen", + comments = "Generator version: 7.12.0") +public class FetchConnectionDiffStatusResponse implements Serializable { + private static final long serialVersionUID = 1L; + + public static final String SERIALIZED_NAME_STATUS = "status"; + + @SerializedName(SERIALIZED_NAME_STATUS) + @javax.annotation.Nullable + private Boolean status; + + public FetchConnectionDiffStatusResponse() {} + + public FetchConnectionDiffStatusResponse status(@javax.annotation.Nullable Boolean status) { + this.status = status; + return this; + } + + /** + * Status of the connection diff. + * + * @return status + */ + @javax.annotation.Nullable + public Boolean getStatus() { + return status; + } + + public void setStatus(@javax.annotation.Nullable Boolean status) { + this.status = status; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key name of the property + * @param value value of the property + * @return the FetchConnectionDiffStatusResponse instance itself + */ + public FetchConnectionDiffStatusResponse putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return a map of objects + */ + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key name of the property + * @return an object + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + FetchConnectionDiffStatusResponse fetchConnectionDiffStatusResponse = + (FetchConnectionDiffStatusResponse) o; + return Objects.equals(this.status, fetchConnectionDiffStatusResponse.status) + && Objects.equals( + this.additionalProperties, + fetchConnectionDiffStatusResponse.additionalProperties); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b + || (a != null + && b != null + && a.isPresent() + && b.isPresent() + && Objects.deepEquals(a.get(), b.get())); + } + + @Override + public int hashCode() { + return Objects.hash(status, additionalProperties); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; + } + return a.isPresent() ? Arrays.deepHashCode(new Object[] {a.get()}) : 31; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class FetchConnectionDiffStatusResponse {\n"); + sb.append(" status: ").append(toIndentedString(status)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first + * line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("status"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to + * FetchConnectionDiffStatusResponse + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!FetchConnectionDiffStatusResponse.openapiRequiredFields + .isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException( + String.format( + "The required field(s) %s in FetchConnectionDiffStatusResponse is" + + " not found in the empty JSON string", + FetchConnectionDiffStatusResponse.openapiRequiredFields + .toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!FetchConnectionDiffStatusResponse.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'FetchConnectionDiffStatusResponse' and + // its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter = + gson.getDelegateAdapter( + this, TypeToken.get(FetchConnectionDiffStatusResponse.class)); + + return (TypeAdapter) + new TypeAdapter() { + @Override + public void write(JsonWriter out, FetchConnectionDiffStatusResponse value) + throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + obj.remove("additionalProperties"); + // serialize additional properties + if (value.getAdditionalProperties() != null) { + for (Map.Entry entry : + value.getAdditionalProperties().entrySet()) { + if (entry.getValue() instanceof String) + obj.addProperty(entry.getKey(), (String) entry.getValue()); + else if (entry.getValue() instanceof Number) + obj.addProperty(entry.getKey(), (Number) entry.getValue()); + else if (entry.getValue() instanceof Boolean) + obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); + else if (entry.getValue() instanceof Character) + obj.addProperty( + entry.getKey(), (Character) entry.getValue()); + else { + JsonElement jsonElement = gson.toJsonTree(entry.getValue()); + if (jsonElement.isJsonArray()) { + obj.add(entry.getKey(), jsonElement.getAsJsonArray()); + } else { + obj.add(entry.getKey(), jsonElement.getAsJsonObject()); + } + } + } + } + elementAdapter.write(out, obj); + } + + @Override + public FetchConnectionDiffStatusResponse read(JsonReader in) + throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // store additional fields in the deserialized instance + FetchConnectionDiffStatusResponse instance = + thisAdapter.fromJsonTree(jsonObj); + for (Map.Entry entry : jsonObj.entrySet()) { + if (!openapiFields.contains(entry.getKey())) { + if (entry.getValue().isJsonPrimitive()) { // primitive type + if (entry.getValue().getAsJsonPrimitive().isString()) + instance.putAdditionalProperty( + entry.getKey(), entry.getValue().getAsString()); + else if (entry.getValue().getAsJsonPrimitive().isNumber()) + instance.putAdditionalProperty( + entry.getKey(), entry.getValue().getAsNumber()); + else if (entry.getValue().getAsJsonPrimitive().isBoolean()) + instance.putAdditionalProperty( + entry.getKey(), + entry.getValue().getAsBoolean()); + else + throw new IllegalArgumentException( + String.format( + "The field `%s` has unknown primitive" + + " type. Value: %s", + entry.getKey(), + entry.getValue().toString())); + } else if (entry.getValue().isJsonArray()) { + instance.putAdditionalProperty( + entry.getKey(), + gson.fromJson(entry.getValue(), List.class)); + } else { // JSON object + instance.putAdditionalProperty( + entry.getKey(), + gson.fromJson(entry.getValue(), HashMap.class)); + } + } + } + return instance; + } + }.nullSafe(); + } + } + + /** + * Create an instance of FetchConnectionDiffStatusResponse given an JSON string + * + * @param jsonString JSON string + * @return An instance of FetchConnectionDiffStatusResponse + * @throws IOException if the JSON string is invalid with respect to + * FetchConnectionDiffStatusResponse + */ + public static FetchConnectionDiffStatusResponse fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, FetchConnectionDiffStatusResponse.class); + } + + /** + * Convert an instance of FetchConnectionDiffStatusResponse to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} diff --git a/sdks/java/src/main/java/com/thoughtspot/client/model/FetchLiveboardDataRequest.java b/sdks/java/src/main/java/com/thoughtspot/client/model/FetchLiveboardDataRequest.java new file mode 100644 index 000000000..dd6628281 --- /dev/null +++ b/sdks/java/src/main/java/com/thoughtspot/client/model/FetchLiveboardDataRequest.java @@ -0,0 +1,662 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client.model; + +import com.google.gson.Gson; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.TypeAdapter; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.reflect.TypeToken; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import com.thoughtspot.client.JSON; +import java.io.IOException; +import java.io.Serializable; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Objects; + +/** FetchLiveboardDataRequest */ +@javax.annotation.Generated( + value = "org.openapitools.codegen.languages.JavaClientCodegen", + comments = "Generator version: 7.12.0") +public class FetchLiveboardDataRequest implements Serializable { + private static final long serialVersionUID = 1L; + + public static final String SERIALIZED_NAME_METADATA_IDENTIFIER = "metadata_identifier"; + + @SerializedName(SERIALIZED_NAME_METADATA_IDENTIFIER) + @javax.annotation.Nonnull + private String metadataIdentifier; + + public static final String SERIALIZED_NAME_VISUALIZATION_IDENTIFIERS = + "visualization_identifiers"; + + @SerializedName(SERIALIZED_NAME_VISUALIZATION_IDENTIFIERS) + @javax.annotation.Nullable + private List visualizationIdentifiers; + + public static final String SERIALIZED_NAME_TRANSIENT_CONTENT = "transient_content"; + + @SerializedName(SERIALIZED_NAME_TRANSIENT_CONTENT) + @javax.annotation.Nullable + private String transientContent; + + /** + * JSON output in compact or full format. The FULL option is available in 9.12.5.cl or later. + */ + @JsonAdapter(DataFormatEnum.Adapter.class) + public enum DataFormatEnum { + FULL("FULL"), + + COMPACT("COMPACT"); + + private String value; + + DataFormatEnum(String value) { + this.value = value; + } + + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + public static DataFormatEnum fromValue(String value) { + for (DataFormatEnum b : DataFormatEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + + public static class Adapter extends TypeAdapter { + @Override + public void write(final JsonWriter jsonWriter, final DataFormatEnum enumeration) + throws IOException { + jsonWriter.value(enumeration.getValue()); + } + + @Override + public DataFormatEnum read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + return DataFormatEnum.fromValue(value); + } + } + + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + String value = jsonElement.getAsString(); + DataFormatEnum.fromValue(value); + } + } + + public static final String SERIALIZED_NAME_DATA_FORMAT = "data_format"; + + @SerializedName(SERIALIZED_NAME_DATA_FORMAT) + @javax.annotation.Nullable + private DataFormatEnum dataFormat = DataFormatEnum.COMPACT; + + public static final String SERIALIZED_NAME_RECORD_OFFSET = "record_offset"; + + @SerializedName(SERIALIZED_NAME_RECORD_OFFSET) + @javax.annotation.Nullable + private Integer recordOffset = 0; + + public static final String SERIALIZED_NAME_RECORD_SIZE = "record_size"; + + @SerializedName(SERIALIZED_NAME_RECORD_SIZE) + @javax.annotation.Nullable + private Integer recordSize = 10; + + public static final String SERIALIZED_NAME_RUNTIME_FILTER = "runtime_filter"; + + @SerializedName(SERIALIZED_NAME_RUNTIME_FILTER) + @javax.annotation.Nullable + private Object runtimeFilter; + + public static final String SERIALIZED_NAME_RUNTIME_SORT = "runtime_sort"; + + @SerializedName(SERIALIZED_NAME_RUNTIME_SORT) + @javax.annotation.Nullable + private Object runtimeSort; + + public static final String SERIALIZED_NAME_RUNTIME_PARAM_OVERRIDE = "runtime_param_override"; + + @SerializedName(SERIALIZED_NAME_RUNTIME_PARAM_OVERRIDE) + @javax.annotation.Nullable + private Object runtimeParamOverride; + + public FetchLiveboardDataRequest() {} + + public FetchLiveboardDataRequest metadataIdentifier( + @javax.annotation.Nonnull String metadataIdentifier) { + this.metadataIdentifier = metadataIdentifier; + return this; + } + + /** + * GUID or name of the Liveboard. + * + * @return metadataIdentifier + */ + @javax.annotation.Nonnull + public String getMetadataIdentifier() { + return metadataIdentifier; + } + + public void setMetadataIdentifier(@javax.annotation.Nonnull String metadataIdentifier) { + this.metadataIdentifier = metadataIdentifier; + } + + public FetchLiveboardDataRequest visualizationIdentifiers( + @javax.annotation.Nullable List visualizationIdentifiers) { + this.visualizationIdentifiers = visualizationIdentifiers; + return this; + } + + public FetchLiveboardDataRequest addVisualizationIdentifiersItem( + String visualizationIdentifiersItem) { + if (this.visualizationIdentifiers == null) { + this.visualizationIdentifiers = new ArrayList<>(); + } + this.visualizationIdentifiers.add(visualizationIdentifiersItem); + return this; + } + + /** + * GUIDs or names of the visualizations on the Liveboard. + * + * @return visualizationIdentifiers + */ + @javax.annotation.Nullable + public List getVisualizationIdentifiers() { + return visualizationIdentifiers; + } + + public void setVisualizationIdentifiers( + @javax.annotation.Nullable List visualizationIdentifiers) { + this.visualizationIdentifiers = visualizationIdentifiers; + } + + public FetchLiveboardDataRequest transientContent( + @javax.annotation.Nullable String transientContent) { + this.transientContent = transientContent; + return this; + } + + /** + * Transient content of the Liveboard. + * + * @return transientContent + */ + @javax.annotation.Nullable + public String getTransientContent() { + return transientContent; + } + + public void setTransientContent(@javax.annotation.Nullable String transientContent) { + this.transientContent = transientContent; + } + + public FetchLiveboardDataRequest dataFormat( + @javax.annotation.Nullable DataFormatEnum dataFormat) { + this.dataFormat = dataFormat; + return this; + } + + /** + * JSON output in compact or full format. The FULL option is available in 9.12.5.cl or later. + * + * @return dataFormat + */ + @javax.annotation.Nullable + public DataFormatEnum getDataFormat() { + return dataFormat; + } + + public void setDataFormat(@javax.annotation.Nullable DataFormatEnum dataFormat) { + this.dataFormat = dataFormat; + } + + public FetchLiveboardDataRequest recordOffset(@javax.annotation.Nullable Integer recordOffset) { + this.recordOffset = recordOffset; + return this; + } + + /** + * The starting record number from where the records should be included. + * + * @return recordOffset + */ + @javax.annotation.Nullable + public Integer getRecordOffset() { + return recordOffset; + } + + public void setRecordOffset(@javax.annotation.Nullable Integer recordOffset) { + this.recordOffset = recordOffset; + } + + public FetchLiveboardDataRequest recordSize(@javax.annotation.Nullable Integer recordSize) { + this.recordSize = recordSize; + return this; + } + + /** + * The number of records to include in a batch. + * + * @return recordSize + */ + @javax.annotation.Nullable + public Integer getRecordSize() { + return recordSize; + } + + public void setRecordSize(@javax.annotation.Nullable Integer recordSize) { + this.recordSize = recordSize; + } + + public FetchLiveboardDataRequest runtimeFilter( + @javax.annotation.Nullable Object runtimeFilter) { + this.runtimeFilter = runtimeFilter; + return this; + } + + /** + * JSON object with representing filter condition to apply filters at runtime. For example, + * <code> {\"col1\": \"item type\", \"op1\": + * \"EQ\", \"val1\": \"Bags\"} </code>. You can add multiple + * keys by incrementing the number at the end, for example, col2, op2, val2, and col3, op3, + * val3. For more information, see [API + * Documentation](https://developers.thoughtspot.com/docs/fetch-data-and-report-apis#_runtime_filters). + * + * @return runtimeFilter + */ + @javax.annotation.Nullable + public Object getRuntimeFilter() { + return runtimeFilter; + } + + public void setRuntimeFilter(@javax.annotation.Nullable Object runtimeFilter) { + this.runtimeFilter = runtimeFilter; + } + + public FetchLiveboardDataRequest runtimeSort(@javax.annotation.Nullable Object runtimeSort) { + this.runtimeSort = runtimeSort; + return this; + } + + /** + * JSON object representing columns to sort data at runtime. For example, <code> + * {\"sortCol1\": \"sales\", \"asc1\": true} </code>. You + * can add multiple keys by incrementing the number at the end, for example, sortCol1, asc2. For + * more information, see [API + * Documentation](https://developers.thoughtspot.com/docs/fetch-data-and-report-apis#_runtime_sort). + * + * @return runtimeSort + */ + @javax.annotation.Nullable + public Object getRuntimeSort() { + return runtimeSort; + } + + public void setRuntimeSort(@javax.annotation.Nullable Object runtimeSort) { + this.runtimeSort = runtimeSort; + } + + public FetchLiveboardDataRequest runtimeParamOverride( + @javax.annotation.Nullable Object runtimeParamOverride) { + this.runtimeParamOverride = runtimeParamOverride; + return this; + } + + /** + * JSON object for setting values of parameters at runtime. For example, <code> + * {\"param1\": \"Double List Param\", \"paramVal1\": + * 0.5}</code>. You can add multiple keys by incrementing the number at the end, for + * example, param2, paramVal2. For more information, see [API + * Documentation](https://developers.thoughtspot.com/docs/fetch-data-and-report-apis#_runtime_parameters). + * + * @return runtimeParamOverride + */ + @javax.annotation.Nullable + public Object getRuntimeParamOverride() { + return runtimeParamOverride; + } + + public void setRuntimeParamOverride(@javax.annotation.Nullable Object runtimeParamOverride) { + this.runtimeParamOverride = runtimeParamOverride; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key name of the property + * @param value value of the property + * @return the FetchLiveboardDataRequest instance itself + */ + public FetchLiveboardDataRequest putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return a map of objects + */ + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key name of the property + * @return an object + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + FetchLiveboardDataRequest fetchLiveboardDataRequest = (FetchLiveboardDataRequest) o; + return Objects.equals(this.metadataIdentifier, fetchLiveboardDataRequest.metadataIdentifier) + && Objects.equals( + this.visualizationIdentifiers, + fetchLiveboardDataRequest.visualizationIdentifiers) + && Objects.equals(this.transientContent, fetchLiveboardDataRequest.transientContent) + && Objects.equals(this.dataFormat, fetchLiveboardDataRequest.dataFormat) + && Objects.equals(this.recordOffset, fetchLiveboardDataRequest.recordOffset) + && Objects.equals(this.recordSize, fetchLiveboardDataRequest.recordSize) + && Objects.equals(this.runtimeFilter, fetchLiveboardDataRequest.runtimeFilter) + && Objects.equals(this.runtimeSort, fetchLiveboardDataRequest.runtimeSort) + && Objects.equals( + this.runtimeParamOverride, fetchLiveboardDataRequest.runtimeParamOverride) + && Objects.equals( + this.additionalProperties, fetchLiveboardDataRequest.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash( + metadataIdentifier, + visualizationIdentifiers, + transientContent, + dataFormat, + recordOffset, + recordSize, + runtimeFilter, + runtimeSort, + runtimeParamOverride, + additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class FetchLiveboardDataRequest {\n"); + sb.append(" metadataIdentifier: ") + .append(toIndentedString(metadataIdentifier)) + .append("\n"); + sb.append(" visualizationIdentifiers: ") + .append(toIndentedString(visualizationIdentifiers)) + .append("\n"); + sb.append(" transientContent: ").append(toIndentedString(transientContent)).append("\n"); + sb.append(" dataFormat: ").append(toIndentedString(dataFormat)).append("\n"); + sb.append(" recordOffset: ").append(toIndentedString(recordOffset)).append("\n"); + sb.append(" recordSize: ").append(toIndentedString(recordSize)).append("\n"); + sb.append(" runtimeFilter: ").append(toIndentedString(runtimeFilter)).append("\n"); + sb.append(" runtimeSort: ").append(toIndentedString(runtimeSort)).append("\n"); + sb.append(" runtimeParamOverride: ") + .append(toIndentedString(runtimeParamOverride)) + .append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first + * line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("metadata_identifier"); + openapiFields.add("visualization_identifiers"); + openapiFields.add("transient_content"); + openapiFields.add("data_format"); + openapiFields.add("record_offset"); + openapiFields.add("record_size"); + openapiFields.add("runtime_filter"); + openapiFields.add("runtime_sort"); + openapiFields.add("runtime_param_override"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + openapiRequiredFields.add("metadata_identifier"); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to FetchLiveboardDataRequest + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!FetchLiveboardDataRequest.openapiRequiredFields + .isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException( + String.format( + "The required field(s) %s in FetchLiveboardDataRequest is not" + + " found in the empty JSON string", + FetchLiveboardDataRequest.openapiRequiredFields.toString())); + } + } + + // check to make sure all required properties/fields are present in the JSON string + for (String requiredField : FetchLiveboardDataRequest.openapiRequiredFields) { + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException( + String.format( + "The required field `%s` is not found in the JSON string: %s", + requiredField, jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if (!jsonObj.get("metadata_identifier").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `metadata_identifier` to be a primitive type in" + + " the JSON string but got `%s`", + jsonObj.get("metadata_identifier").toString())); + } + // ensure the optional json data is an array if present + if (jsonObj.get("visualization_identifiers") != null + && !jsonObj.get("visualization_identifiers").isJsonNull() + && !jsonObj.get("visualization_identifiers").isJsonArray()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `visualization_identifiers` to be an array in the" + + " JSON string but got `%s`", + jsonObj.get("visualization_identifiers").toString())); + } + if ((jsonObj.get("transient_content") != null + && !jsonObj.get("transient_content").isJsonNull()) + && !jsonObj.get("transient_content").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `transient_content` to be a primitive type in the" + + " JSON string but got `%s`", + jsonObj.get("transient_content").toString())); + } + if ((jsonObj.get("data_format") != null && !jsonObj.get("data_format").isJsonNull()) + && !jsonObj.get("data_format").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `data_format` to be a primitive type in the JSON" + + " string but got `%s`", + jsonObj.get("data_format").toString())); + } + // validate the optional field `data_format` + if (jsonObj.get("data_format") != null && !jsonObj.get("data_format").isJsonNull()) { + DataFormatEnum.validateJsonElement(jsonObj.get("data_format")); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!FetchLiveboardDataRequest.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'FetchLiveboardDataRequest' and its + // subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter = + gson.getDelegateAdapter(this, TypeToken.get(FetchLiveboardDataRequest.class)); + + return (TypeAdapter) + new TypeAdapter() { + @Override + public void write(JsonWriter out, FetchLiveboardDataRequest value) + throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + obj.remove("additionalProperties"); + // serialize additional properties + if (value.getAdditionalProperties() != null) { + for (Map.Entry entry : + value.getAdditionalProperties().entrySet()) { + if (entry.getValue() instanceof String) + obj.addProperty(entry.getKey(), (String) entry.getValue()); + else if (entry.getValue() instanceof Number) + obj.addProperty(entry.getKey(), (Number) entry.getValue()); + else if (entry.getValue() instanceof Boolean) + obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); + else if (entry.getValue() instanceof Character) + obj.addProperty( + entry.getKey(), (Character) entry.getValue()); + else { + JsonElement jsonElement = gson.toJsonTree(entry.getValue()); + if (jsonElement.isJsonArray()) { + obj.add(entry.getKey(), jsonElement.getAsJsonArray()); + } else { + obj.add(entry.getKey(), jsonElement.getAsJsonObject()); + } + } + } + } + elementAdapter.write(out, obj); + } + + @Override + public FetchLiveboardDataRequest read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // store additional fields in the deserialized instance + FetchLiveboardDataRequest instance = thisAdapter.fromJsonTree(jsonObj); + for (Map.Entry entry : jsonObj.entrySet()) { + if (!openapiFields.contains(entry.getKey())) { + if (entry.getValue().isJsonPrimitive()) { // primitive type + if (entry.getValue().getAsJsonPrimitive().isString()) + instance.putAdditionalProperty( + entry.getKey(), entry.getValue().getAsString()); + else if (entry.getValue().getAsJsonPrimitive().isNumber()) + instance.putAdditionalProperty( + entry.getKey(), entry.getValue().getAsNumber()); + else if (entry.getValue().getAsJsonPrimitive().isBoolean()) + instance.putAdditionalProperty( + entry.getKey(), + entry.getValue().getAsBoolean()); + else + throw new IllegalArgumentException( + String.format( + "The field `%s` has unknown primitive" + + " type. Value: %s", + entry.getKey(), + entry.getValue().toString())); + } else if (entry.getValue().isJsonArray()) { + instance.putAdditionalProperty( + entry.getKey(), + gson.fromJson(entry.getValue(), List.class)); + } else { // JSON object + instance.putAdditionalProperty( + entry.getKey(), + gson.fromJson(entry.getValue(), HashMap.class)); + } + } + } + return instance; + } + }.nullSafe(); + } + } + + /** + * Create an instance of FetchLiveboardDataRequest given an JSON string + * + * @param jsonString JSON string + * @return An instance of FetchLiveboardDataRequest + * @throws IOException if the JSON string is invalid with respect to FetchLiveboardDataRequest + */ + public static FetchLiveboardDataRequest fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, FetchLiveboardDataRequest.class); + } + + /** + * Convert an instance of FetchLiveboardDataRequest to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} diff --git a/sdks/java/src/main/java/com/thoughtspot/client/model/FetchLiveboardSqlQueryRequest.java b/sdks/java/src/main/java/com/thoughtspot/client/model/FetchLiveboardSqlQueryRequest.java new file mode 100644 index 000000000..4b53b9e9c --- /dev/null +++ b/sdks/java/src/main/java/com/thoughtspot/client/model/FetchLiveboardSqlQueryRequest.java @@ -0,0 +1,369 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client.model; + +import com.google.gson.Gson; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.TypeAdapter; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.annotations.SerializedName; +import com.google.gson.reflect.TypeToken; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import com.thoughtspot.client.JSON; +import java.io.IOException; +import java.io.Serializable; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Objects; + +/** FetchLiveboardSqlQueryRequest */ +@javax.annotation.Generated( + value = "org.openapitools.codegen.languages.JavaClientCodegen", + comments = "Generator version: 7.12.0") +public class FetchLiveboardSqlQueryRequest implements Serializable { + private static final long serialVersionUID = 1L; + + public static final String SERIALIZED_NAME_METADATA_IDENTIFIER = "metadata_identifier"; + + @SerializedName(SERIALIZED_NAME_METADATA_IDENTIFIER) + @javax.annotation.Nonnull + private String metadataIdentifier; + + public static final String SERIALIZED_NAME_VISUALIZATION_IDENTIFIERS = + "visualization_identifiers"; + + @SerializedName(SERIALIZED_NAME_VISUALIZATION_IDENTIFIERS) + @javax.annotation.Nullable + private List visualizationIdentifiers; + + public FetchLiveboardSqlQueryRequest() {} + + public FetchLiveboardSqlQueryRequest metadataIdentifier( + @javax.annotation.Nonnull String metadataIdentifier) { + this.metadataIdentifier = metadataIdentifier; + return this; + } + + /** + * ID or name of the Liveboard. + * + * @return metadataIdentifier + */ + @javax.annotation.Nonnull + public String getMetadataIdentifier() { + return metadataIdentifier; + } + + public void setMetadataIdentifier(@javax.annotation.Nonnull String metadataIdentifier) { + this.metadataIdentifier = metadataIdentifier; + } + + public FetchLiveboardSqlQueryRequest visualizationIdentifiers( + @javax.annotation.Nullable List visualizationIdentifiers) { + this.visualizationIdentifiers = visualizationIdentifiers; + return this; + } + + public FetchLiveboardSqlQueryRequest addVisualizationIdentifiersItem( + String visualizationIdentifiersItem) { + if (this.visualizationIdentifiers == null) { + this.visualizationIdentifiers = new ArrayList<>(); + } + this.visualizationIdentifiers.add(visualizationIdentifiersItem); + return this; + } + + /** + * Unique ID or name of visualizations. + * + * @return visualizationIdentifiers + */ + @javax.annotation.Nullable + public List getVisualizationIdentifiers() { + return visualizationIdentifiers; + } + + public void setVisualizationIdentifiers( + @javax.annotation.Nullable List visualizationIdentifiers) { + this.visualizationIdentifiers = visualizationIdentifiers; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key name of the property + * @param value value of the property + * @return the FetchLiveboardSqlQueryRequest instance itself + */ + public FetchLiveboardSqlQueryRequest putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return a map of objects + */ + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key name of the property + * @return an object + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + FetchLiveboardSqlQueryRequest fetchLiveboardSqlQueryRequest = + (FetchLiveboardSqlQueryRequest) o; + return Objects.equals( + this.metadataIdentifier, fetchLiveboardSqlQueryRequest.metadataIdentifier) + && Objects.equals( + this.visualizationIdentifiers, + fetchLiveboardSqlQueryRequest.visualizationIdentifiers) + && Objects.equals( + this.additionalProperties, + fetchLiveboardSqlQueryRequest.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(metadataIdentifier, visualizationIdentifiers, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class FetchLiveboardSqlQueryRequest {\n"); + sb.append(" metadataIdentifier: ") + .append(toIndentedString(metadataIdentifier)) + .append("\n"); + sb.append(" visualizationIdentifiers: ") + .append(toIndentedString(visualizationIdentifiers)) + .append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first + * line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("metadata_identifier"); + openapiFields.add("visualization_identifiers"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + openapiRequiredFields.add("metadata_identifier"); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to + * FetchLiveboardSqlQueryRequest + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!FetchLiveboardSqlQueryRequest.openapiRequiredFields + .isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException( + String.format( + "The required field(s) %s in FetchLiveboardSqlQueryRequest is not" + + " found in the empty JSON string", + FetchLiveboardSqlQueryRequest.openapiRequiredFields.toString())); + } + } + + // check to make sure all required properties/fields are present in the JSON string + for (String requiredField : FetchLiveboardSqlQueryRequest.openapiRequiredFields) { + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException( + String.format( + "The required field `%s` is not found in the JSON string: %s", + requiredField, jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if (!jsonObj.get("metadata_identifier").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `metadata_identifier` to be a primitive type in" + + " the JSON string but got `%s`", + jsonObj.get("metadata_identifier").toString())); + } + // ensure the optional json data is an array if present + if (jsonObj.get("visualization_identifiers") != null + && !jsonObj.get("visualization_identifiers").isJsonNull() + && !jsonObj.get("visualization_identifiers").isJsonArray()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `visualization_identifiers` to be an array in the" + + " JSON string but got `%s`", + jsonObj.get("visualization_identifiers").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!FetchLiveboardSqlQueryRequest.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'FetchLiveboardSqlQueryRequest' and its + // subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter = + gson.getDelegateAdapter( + this, TypeToken.get(FetchLiveboardSqlQueryRequest.class)); + + return (TypeAdapter) + new TypeAdapter() { + @Override + public void write(JsonWriter out, FetchLiveboardSqlQueryRequest value) + throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + obj.remove("additionalProperties"); + // serialize additional properties + if (value.getAdditionalProperties() != null) { + for (Map.Entry entry : + value.getAdditionalProperties().entrySet()) { + if (entry.getValue() instanceof String) + obj.addProperty(entry.getKey(), (String) entry.getValue()); + else if (entry.getValue() instanceof Number) + obj.addProperty(entry.getKey(), (Number) entry.getValue()); + else if (entry.getValue() instanceof Boolean) + obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); + else if (entry.getValue() instanceof Character) + obj.addProperty( + entry.getKey(), (Character) entry.getValue()); + else { + JsonElement jsonElement = gson.toJsonTree(entry.getValue()); + if (jsonElement.isJsonArray()) { + obj.add(entry.getKey(), jsonElement.getAsJsonArray()); + } else { + obj.add(entry.getKey(), jsonElement.getAsJsonObject()); + } + } + } + } + elementAdapter.write(out, obj); + } + + @Override + public FetchLiveboardSqlQueryRequest read(JsonReader in) + throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // store additional fields in the deserialized instance + FetchLiveboardSqlQueryRequest instance = + thisAdapter.fromJsonTree(jsonObj); + for (Map.Entry entry : jsonObj.entrySet()) { + if (!openapiFields.contains(entry.getKey())) { + if (entry.getValue().isJsonPrimitive()) { // primitive type + if (entry.getValue().getAsJsonPrimitive().isString()) + instance.putAdditionalProperty( + entry.getKey(), entry.getValue().getAsString()); + else if (entry.getValue().getAsJsonPrimitive().isNumber()) + instance.putAdditionalProperty( + entry.getKey(), entry.getValue().getAsNumber()); + else if (entry.getValue().getAsJsonPrimitive().isBoolean()) + instance.putAdditionalProperty( + entry.getKey(), + entry.getValue().getAsBoolean()); + else + throw new IllegalArgumentException( + String.format( + "The field `%s` has unknown primitive" + + " type. Value: %s", + entry.getKey(), + entry.getValue().toString())); + } else if (entry.getValue().isJsonArray()) { + instance.putAdditionalProperty( + entry.getKey(), + gson.fromJson(entry.getValue(), List.class)); + } else { // JSON object + instance.putAdditionalProperty( + entry.getKey(), + gson.fromJson(entry.getValue(), HashMap.class)); + } + } + } + return instance; + } + }.nullSafe(); + } + } + + /** + * Create an instance of FetchLiveboardSqlQueryRequest given an JSON string + * + * @param jsonString JSON string + * @return An instance of FetchLiveboardSqlQueryRequest + * @throws IOException if the JSON string is invalid with respect to + * FetchLiveboardSqlQueryRequest + */ + public static FetchLiveboardSqlQueryRequest fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, FetchLiveboardSqlQueryRequest.class); + } + + /** + * Convert an instance of FetchLiveboardSqlQueryRequest to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} diff --git a/sdks/java/src/main/java/com/thoughtspot/client/model/FetchLogsRequest.java b/sdks/java/src/main/java/com/thoughtspot/client/model/FetchLogsRequest.java new file mode 100644 index 000000000..36adcc6dd --- /dev/null +++ b/sdks/java/src/main/java/com/thoughtspot/client/model/FetchLogsRequest.java @@ -0,0 +1,469 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client.model; + +import com.google.gson.Gson; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.TypeAdapter; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.reflect.TypeToken; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import com.thoughtspot.client.JSON; +import java.io.IOException; +import java.io.Serializable; +import java.util.Arrays; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Objects; +import org.openapitools.jackson.nullable.JsonNullable; + +/** FetchLogsRequest */ +@javax.annotation.Generated( + value = "org.openapitools.codegen.languages.JavaClientCodegen", + comments = "Generator version: 7.12.0") +public class FetchLogsRequest implements Serializable { + private static final long serialVersionUID = 1L; + + /** Name of the log type */ + @JsonAdapter(LogTypeEnum.Adapter.class) + public enum LogTypeEnum { + SECURITY_AUDIT("SECURITY_AUDIT"); + + private String value; + + LogTypeEnum(String value) { + this.value = value; + } + + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + public static LogTypeEnum fromValue(String value) { + for (LogTypeEnum b : LogTypeEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + + public static class Adapter extends TypeAdapter { + @Override + public void write(final JsonWriter jsonWriter, final LogTypeEnum enumeration) + throws IOException { + jsonWriter.value(enumeration.getValue()); + } + + @Override + public LogTypeEnum read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + return LogTypeEnum.fromValue(value); + } + } + + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + String value = jsonElement.getAsString(); + LogTypeEnum.fromValue(value); + } + } + + public static final String SERIALIZED_NAME_LOG_TYPE = "log_type"; + + @SerializedName(SERIALIZED_NAME_LOG_TYPE) + @javax.annotation.Nonnull + private LogTypeEnum logType; + + public static final String SERIALIZED_NAME_START_EPOCH_TIME_IN_MILLIS = + "start_epoch_time_in_millis"; + + @SerializedName(SERIALIZED_NAME_START_EPOCH_TIME_IN_MILLIS) + @javax.annotation.Nullable + private Float startEpochTimeInMillis; + + public static final String SERIALIZED_NAME_END_EPOCH_TIME_IN_MILLIS = + "end_epoch_time_in_millis"; + + @SerializedName(SERIALIZED_NAME_END_EPOCH_TIME_IN_MILLIS) + @javax.annotation.Nullable + private Float endEpochTimeInMillis; + + public static final String SERIALIZED_NAME_GET_ALL_LOGS = "get_all_logs"; + + @SerializedName(SERIALIZED_NAME_GET_ALL_LOGS) + @javax.annotation.Nullable + private Boolean getAllLogs = true; + + public FetchLogsRequest() {} + + public FetchLogsRequest logType(@javax.annotation.Nonnull LogTypeEnum logType) { + this.logType = logType; + return this; + } + + /** + * Name of the log type + * + * @return logType + */ + @javax.annotation.Nonnull + public LogTypeEnum getLogType() { + return logType; + } + + public void setLogType(@javax.annotation.Nonnull LogTypeEnum logType) { + this.logType = logType; + } + + public FetchLogsRequest startEpochTimeInMillis( + @javax.annotation.Nullable Float startEpochTimeInMillis) { + this.startEpochTimeInMillis = startEpochTimeInMillis; + return this; + } + + /** + * Start time in EPOCH format + * + * @return startEpochTimeInMillis + */ + @javax.annotation.Nullable + public Float getStartEpochTimeInMillis() { + return startEpochTimeInMillis; + } + + public void setStartEpochTimeInMillis(@javax.annotation.Nullable Float startEpochTimeInMillis) { + this.startEpochTimeInMillis = startEpochTimeInMillis; + } + + public FetchLogsRequest endEpochTimeInMillis( + @javax.annotation.Nullable Float endEpochTimeInMillis) { + this.endEpochTimeInMillis = endEpochTimeInMillis; + return this; + } + + /** + * End time in EPOCH format + * + * @return endEpochTimeInMillis + */ + @javax.annotation.Nullable + public Float getEndEpochTimeInMillis() { + return endEpochTimeInMillis; + } + + public void setEndEpochTimeInMillis(@javax.annotation.Nullable Float endEpochTimeInMillis) { + this.endEpochTimeInMillis = endEpochTimeInMillis; + } + + public FetchLogsRequest getAllLogs(@javax.annotation.Nullable Boolean getAllLogs) { + this.getAllLogs = getAllLogs; + return this; + } + + /** + * Fetch all the logs. This is available from 9.10.5.cl + * + * @return getAllLogs + */ + @javax.annotation.Nullable + public Boolean getGetAllLogs() { + return getAllLogs; + } + + public void setGetAllLogs(@javax.annotation.Nullable Boolean getAllLogs) { + this.getAllLogs = getAllLogs; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key name of the property + * @param value value of the property + * @return the FetchLogsRequest instance itself + */ + public FetchLogsRequest putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return a map of objects + */ + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key name of the property + * @return an object + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + FetchLogsRequest fetchLogsRequest = (FetchLogsRequest) o; + return Objects.equals(this.logType, fetchLogsRequest.logType) + && Objects.equals( + this.startEpochTimeInMillis, fetchLogsRequest.startEpochTimeInMillis) + && Objects.equals(this.endEpochTimeInMillis, fetchLogsRequest.endEpochTimeInMillis) + && Objects.equals(this.getAllLogs, fetchLogsRequest.getAllLogs) + && Objects.equals(this.additionalProperties, fetchLogsRequest.additionalProperties); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b + || (a != null + && b != null + && a.isPresent() + && b.isPresent() + && Objects.deepEquals(a.get(), b.get())); + } + + @Override + public int hashCode() { + return Objects.hash( + logType, + startEpochTimeInMillis, + endEpochTimeInMillis, + getAllLogs, + additionalProperties); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; + } + return a.isPresent() ? Arrays.deepHashCode(new Object[] {a.get()}) : 31; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class FetchLogsRequest {\n"); + sb.append(" logType: ").append(toIndentedString(logType)).append("\n"); + sb.append(" startEpochTimeInMillis: ") + .append(toIndentedString(startEpochTimeInMillis)) + .append("\n"); + sb.append(" endEpochTimeInMillis: ") + .append(toIndentedString(endEpochTimeInMillis)) + .append("\n"); + sb.append(" getAllLogs: ").append(toIndentedString(getAllLogs)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first + * line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("log_type"); + openapiFields.add("start_epoch_time_in_millis"); + openapiFields.add("end_epoch_time_in_millis"); + openapiFields.add("get_all_logs"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + openapiRequiredFields.add("log_type"); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to FetchLogsRequest + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!FetchLogsRequest.openapiRequiredFields + .isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException( + String.format( + "The required field(s) %s in FetchLogsRequest is not found in the" + + " empty JSON string", + FetchLogsRequest.openapiRequiredFields.toString())); + } + } + + // check to make sure all required properties/fields are present in the JSON string + for (String requiredField : FetchLogsRequest.openapiRequiredFields) { + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException( + String.format( + "The required field `%s` is not found in the JSON string: %s", + requiredField, jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if (!jsonObj.get("log_type").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `log_type` to be a primitive type in the JSON" + + " string but got `%s`", + jsonObj.get("log_type").toString())); + } + // validate the required field `log_type` + LogTypeEnum.validateJsonElement(jsonObj.get("log_type")); + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!FetchLogsRequest.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'FetchLogsRequest' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter = + gson.getDelegateAdapter(this, TypeToken.get(FetchLogsRequest.class)); + + return (TypeAdapter) + new TypeAdapter() { + @Override + public void write(JsonWriter out, FetchLogsRequest value) + throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + obj.remove("additionalProperties"); + // serialize additional properties + if (value.getAdditionalProperties() != null) { + for (Map.Entry entry : + value.getAdditionalProperties().entrySet()) { + if (entry.getValue() instanceof String) + obj.addProperty(entry.getKey(), (String) entry.getValue()); + else if (entry.getValue() instanceof Number) + obj.addProperty(entry.getKey(), (Number) entry.getValue()); + else if (entry.getValue() instanceof Boolean) + obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); + else if (entry.getValue() instanceof Character) + obj.addProperty( + entry.getKey(), (Character) entry.getValue()); + else { + JsonElement jsonElement = gson.toJsonTree(entry.getValue()); + if (jsonElement.isJsonArray()) { + obj.add(entry.getKey(), jsonElement.getAsJsonArray()); + } else { + obj.add(entry.getKey(), jsonElement.getAsJsonObject()); + } + } + } + } + elementAdapter.write(out, obj); + } + + @Override + public FetchLogsRequest read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // store additional fields in the deserialized instance + FetchLogsRequest instance = thisAdapter.fromJsonTree(jsonObj); + for (Map.Entry entry : jsonObj.entrySet()) { + if (!openapiFields.contains(entry.getKey())) { + if (entry.getValue().isJsonPrimitive()) { // primitive type + if (entry.getValue().getAsJsonPrimitive().isString()) + instance.putAdditionalProperty( + entry.getKey(), entry.getValue().getAsString()); + else if (entry.getValue().getAsJsonPrimitive().isNumber()) + instance.putAdditionalProperty( + entry.getKey(), entry.getValue().getAsNumber()); + else if (entry.getValue().getAsJsonPrimitive().isBoolean()) + instance.putAdditionalProperty( + entry.getKey(), + entry.getValue().getAsBoolean()); + else + throw new IllegalArgumentException( + String.format( + "The field `%s` has unknown primitive" + + " type. Value: %s", + entry.getKey(), + entry.getValue().toString())); + } else if (entry.getValue().isJsonArray()) { + instance.putAdditionalProperty( + entry.getKey(), + gson.fromJson(entry.getValue(), List.class)); + } else { // JSON object + instance.putAdditionalProperty( + entry.getKey(), + gson.fromJson(entry.getValue(), HashMap.class)); + } + } + } + return instance; + } + }.nullSafe(); + } + } + + /** + * Create an instance of FetchLogsRequest given an JSON string + * + * @param jsonString JSON string + * @return An instance of FetchLogsRequest + * @throws IOException if the JSON string is invalid with respect to FetchLogsRequest + */ + public static FetchLogsRequest fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, FetchLogsRequest.class); + } + + /** + * Convert an instance of FetchLogsRequest to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} diff --git a/sdks/java/src/main/java/com/thoughtspot/client/model/FetchObjectPrivilegesRequest.java b/sdks/java/src/main/java/com/thoughtspot/client/model/FetchObjectPrivilegesRequest.java new file mode 100644 index 000000000..231b5c810 --- /dev/null +++ b/sdks/java/src/main/java/com/thoughtspot/client/model/FetchObjectPrivilegesRequest.java @@ -0,0 +1,446 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client.model; + +import com.google.gson.Gson; +import com.google.gson.JsonArray; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.TypeAdapter; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.annotations.SerializedName; +import com.google.gson.reflect.TypeToken; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import com.thoughtspot.client.JSON; +import java.io.IOException; +import java.io.Serializable; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Objects; + +/** FetchObjectPrivilegesRequest */ +@javax.annotation.Generated( + value = "org.openapitools.codegen.languages.JavaClientCodegen", + comments = "Generator version: 7.12.0") +public class FetchObjectPrivilegesRequest implements Serializable { + private static final long serialVersionUID = 1L; + + public static final String SERIALIZED_NAME_METADATA = "metadata"; + + @SerializedName(SERIALIZED_NAME_METADATA) + @javax.annotation.Nonnull + private List metadata; + + public static final String SERIALIZED_NAME_PRINCIPALS = "principals"; + + @SerializedName(SERIALIZED_NAME_PRINCIPALS) + @javax.annotation.Nullable + private List principals; + + public static final String SERIALIZED_NAME_RECORD_OFFSET = "record_offset"; + + @SerializedName(SERIALIZED_NAME_RECORD_OFFSET) + @javax.annotation.Nullable + private Integer recordOffset = 0; + + public static final String SERIALIZED_NAME_RECORD_SIZE = "record_size"; + + @SerializedName(SERIALIZED_NAME_RECORD_SIZE) + @javax.annotation.Nullable + private Integer recordSize = 20; + + public FetchObjectPrivilegesRequest() {} + + public FetchObjectPrivilegesRequest metadata( + @javax.annotation.Nonnull List metadata) { + this.metadata = metadata; + return this; + } + + public FetchObjectPrivilegesRequest addMetadataItem( + ObjectPrivilegesMetadataInput metadataItem) { + if (this.metadata == null) { + this.metadata = new ArrayList<>(); + } + this.metadata.add(metadataItem); + return this; + } + + /** + * Metadata objects for which you want to fetch object privileges. For now only LOGICAL_TABLE is + * supported. It may be extended to other metadata types in the future. + * + * @return metadata + */ + @javax.annotation.Nonnull + public List getMetadata() { + return metadata; + } + + public void setMetadata( + @javax.annotation.Nonnull List metadata) { + this.metadata = metadata; + } + + public FetchObjectPrivilegesRequest principals( + @javax.annotation.Nullable List principals) { + this.principals = principals; + return this; + } + + public FetchObjectPrivilegesRequest addPrincipalsItem(PrincipalsInput principalsItem) { + if (this.principals == null) { + this.principals = new ArrayList<>(); + } + this.principals.add(principalsItem); + return this; + } + + /** + * User or group objects for which you want to fetch object privileges. If not specified, the + * API returns all users and groups that have object privileges on the specified metadata + * objects. + * + * @return principals + */ + @javax.annotation.Nullable + public List getPrincipals() { + return principals; + } + + public void setPrincipals(@javax.annotation.Nullable List principals) { + this.principals = principals; + } + + public FetchObjectPrivilegesRequest recordOffset( + @javax.annotation.Nullable Integer recordOffset) { + this.recordOffset = recordOffset; + return this; + } + + /** + * The starting record number from where the records should be included for each metadata type. + * + * @return recordOffset + */ + @javax.annotation.Nullable + public Integer getRecordOffset() { + return recordOffset; + } + + public void setRecordOffset(@javax.annotation.Nullable Integer recordOffset) { + this.recordOffset = recordOffset; + } + + public FetchObjectPrivilegesRequest recordSize(@javax.annotation.Nullable Integer recordSize) { + this.recordSize = recordSize; + return this; + } + + /** + * The number of records that should be included for each metadata type. + * + * @return recordSize + */ + @javax.annotation.Nullable + public Integer getRecordSize() { + return recordSize; + } + + public void setRecordSize(@javax.annotation.Nullable Integer recordSize) { + this.recordSize = recordSize; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key name of the property + * @param value value of the property + * @return the FetchObjectPrivilegesRequest instance itself + */ + public FetchObjectPrivilegesRequest putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return a map of objects + */ + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key name of the property + * @return an object + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + FetchObjectPrivilegesRequest fetchObjectPrivilegesRequest = + (FetchObjectPrivilegesRequest) o; + return Objects.equals(this.metadata, fetchObjectPrivilegesRequest.metadata) + && Objects.equals(this.principals, fetchObjectPrivilegesRequest.principals) + && Objects.equals(this.recordOffset, fetchObjectPrivilegesRequest.recordOffset) + && Objects.equals(this.recordSize, fetchObjectPrivilegesRequest.recordSize) + && Objects.equals( + this.additionalProperties, + fetchObjectPrivilegesRequest.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(metadata, principals, recordOffset, recordSize, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class FetchObjectPrivilegesRequest {\n"); + sb.append(" metadata: ").append(toIndentedString(metadata)).append("\n"); + sb.append(" principals: ").append(toIndentedString(principals)).append("\n"); + sb.append(" recordOffset: ").append(toIndentedString(recordOffset)).append("\n"); + sb.append(" recordSize: ").append(toIndentedString(recordSize)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first + * line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("metadata"); + openapiFields.add("principals"); + openapiFields.add("record_offset"); + openapiFields.add("record_size"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + openapiRequiredFields.add("metadata"); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to + * FetchObjectPrivilegesRequest + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!FetchObjectPrivilegesRequest.openapiRequiredFields + .isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException( + String.format( + "The required field(s) %s in FetchObjectPrivilegesRequest is not" + + " found in the empty JSON string", + FetchObjectPrivilegesRequest.openapiRequiredFields.toString())); + } + } + + // check to make sure all required properties/fields are present in the JSON string + for (String requiredField : FetchObjectPrivilegesRequest.openapiRequiredFields) { + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException( + String.format( + "The required field `%s` is not found in the JSON string: %s", + requiredField, jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // ensure the json data is an array + if (!jsonObj.get("metadata").isJsonArray()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `metadata` to be an array in the JSON string but" + + " got `%s`", + jsonObj.get("metadata").toString())); + } + + JsonArray jsonArraymetadata = jsonObj.getAsJsonArray("metadata"); + // validate the required field `metadata` (array) + for (int i = 0; i < jsonArraymetadata.size(); i++) { + ObjectPrivilegesMetadataInput.validateJsonElement(jsonArraymetadata.get(i)); + } + ; + if (jsonObj.get("principals") != null && !jsonObj.get("principals").isJsonNull()) { + JsonArray jsonArrayprincipals = jsonObj.getAsJsonArray("principals"); + if (jsonArrayprincipals != null) { + // ensure the json data is an array + if (!jsonObj.get("principals").isJsonArray()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `principals` to be an array in the JSON" + + " string but got `%s`", + jsonObj.get("principals").toString())); + } + + // validate the optional field `principals` (array) + for (int i = 0; i < jsonArrayprincipals.size(); i++) { + PrincipalsInput.validateJsonElement(jsonArrayprincipals.get(i)); + } + ; + } + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!FetchObjectPrivilegesRequest.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'FetchObjectPrivilegesRequest' and its + // subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter = + gson.getDelegateAdapter( + this, TypeToken.get(FetchObjectPrivilegesRequest.class)); + + return (TypeAdapter) + new TypeAdapter() { + @Override + public void write(JsonWriter out, FetchObjectPrivilegesRequest value) + throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + obj.remove("additionalProperties"); + // serialize additional properties + if (value.getAdditionalProperties() != null) { + for (Map.Entry entry : + value.getAdditionalProperties().entrySet()) { + if (entry.getValue() instanceof String) + obj.addProperty(entry.getKey(), (String) entry.getValue()); + else if (entry.getValue() instanceof Number) + obj.addProperty(entry.getKey(), (Number) entry.getValue()); + else if (entry.getValue() instanceof Boolean) + obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); + else if (entry.getValue() instanceof Character) + obj.addProperty( + entry.getKey(), (Character) entry.getValue()); + else { + JsonElement jsonElement = gson.toJsonTree(entry.getValue()); + if (jsonElement.isJsonArray()) { + obj.add(entry.getKey(), jsonElement.getAsJsonArray()); + } else { + obj.add(entry.getKey(), jsonElement.getAsJsonObject()); + } + } + } + } + elementAdapter.write(out, obj); + } + + @Override + public FetchObjectPrivilegesRequest read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // store additional fields in the deserialized instance + FetchObjectPrivilegesRequest instance = + thisAdapter.fromJsonTree(jsonObj); + for (Map.Entry entry : jsonObj.entrySet()) { + if (!openapiFields.contains(entry.getKey())) { + if (entry.getValue().isJsonPrimitive()) { // primitive type + if (entry.getValue().getAsJsonPrimitive().isString()) + instance.putAdditionalProperty( + entry.getKey(), entry.getValue().getAsString()); + else if (entry.getValue().getAsJsonPrimitive().isNumber()) + instance.putAdditionalProperty( + entry.getKey(), entry.getValue().getAsNumber()); + else if (entry.getValue().getAsJsonPrimitive().isBoolean()) + instance.putAdditionalProperty( + entry.getKey(), + entry.getValue().getAsBoolean()); + else + throw new IllegalArgumentException( + String.format( + "The field `%s` has unknown primitive" + + " type. Value: %s", + entry.getKey(), + entry.getValue().toString())); + } else if (entry.getValue().isJsonArray()) { + instance.putAdditionalProperty( + entry.getKey(), + gson.fromJson(entry.getValue(), List.class)); + } else { // JSON object + instance.putAdditionalProperty( + entry.getKey(), + gson.fromJson(entry.getValue(), HashMap.class)); + } + } + } + return instance; + } + }.nullSafe(); + } + } + + /** + * Create an instance of FetchObjectPrivilegesRequest given an JSON string + * + * @param jsonString JSON string + * @return An instance of FetchObjectPrivilegesRequest + * @throws IOException if the JSON string is invalid with respect to + * FetchObjectPrivilegesRequest + */ + public static FetchObjectPrivilegesRequest fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, FetchObjectPrivilegesRequest.class); + } + + /** + * Convert an instance of FetchObjectPrivilegesRequest to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} diff --git a/sdks/java/src/main/java/com/thoughtspot/client/model/FetchPermissionsOfPrincipalsRequest.java b/sdks/java/src/main/java/com/thoughtspot/client/model/FetchPermissionsOfPrincipalsRequest.java new file mode 100644 index 000000000..2913f61ae --- /dev/null +++ b/sdks/java/src/main/java/com/thoughtspot/client/model/FetchPermissionsOfPrincipalsRequest.java @@ -0,0 +1,567 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client.model; + +import com.google.gson.Gson; +import com.google.gson.JsonArray; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.TypeAdapter; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.reflect.TypeToken; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import com.thoughtspot.client.JSON; +import java.io.IOException; +import java.io.Serializable; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Objects; + +/** FetchPermissionsOfPrincipalsRequest */ +@javax.annotation.Generated( + value = "org.openapitools.codegen.languages.JavaClientCodegen", + comments = "Generator version: 7.12.0") +public class FetchPermissionsOfPrincipalsRequest implements Serializable { + private static final long serialVersionUID = 1L; + + public static final String SERIALIZED_NAME_PRINCIPALS = "principals"; + + @SerializedName(SERIALIZED_NAME_PRINCIPALS) + @javax.annotation.Nonnull + private List principals; + + public static final String SERIALIZED_NAME_METADATA = "metadata"; + + @SerializedName(SERIALIZED_NAME_METADATA) + @javax.annotation.Nullable + private List metadata; + + public static final String SERIALIZED_NAME_RECORD_OFFSET = "record_offset"; + + @SerializedName(SERIALIZED_NAME_RECORD_OFFSET) + @javax.annotation.Nullable + private Integer recordOffset = 0; + + public static final String SERIALIZED_NAME_RECORD_SIZE = "record_size"; + + @SerializedName(SERIALIZED_NAME_RECORD_SIZE) + @javax.annotation.Nullable + private Integer recordSize = -1; + + /** When no metadata objects input is passed, metadata objects of this type are fetched. */ + @JsonAdapter(DefaultMetadataTypeEnum.Adapter.class) + public enum DefaultMetadataTypeEnum { + ALL("ALL"), + + LIVEBOARD("LIVEBOARD"), + + ANSWER("ANSWER"), + + LOGICAL_TABLE("LOGICAL_TABLE"), + + LOGICAL_COLUMN("LOGICAL_COLUMN"), + + CONNECTION("CONNECTION"), + + COLLECTION("COLLECTION"); + + private String value; + + DefaultMetadataTypeEnum(String value) { + this.value = value; + } + + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + public static DefaultMetadataTypeEnum fromValue(String value) { + for (DefaultMetadataTypeEnum b : DefaultMetadataTypeEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + + public static class Adapter extends TypeAdapter { + @Override + public void write( + final JsonWriter jsonWriter, final DefaultMetadataTypeEnum enumeration) + throws IOException { + jsonWriter.value(enumeration.getValue()); + } + + @Override + public DefaultMetadataTypeEnum read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + return DefaultMetadataTypeEnum.fromValue(value); + } + } + + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + String value = jsonElement.getAsString(); + DefaultMetadataTypeEnum.fromValue(value); + } + } + + public static final String SERIALIZED_NAME_DEFAULT_METADATA_TYPE = "default_metadata_type"; + + @SerializedName(SERIALIZED_NAME_DEFAULT_METADATA_TYPE) + @javax.annotation.Nullable + private DefaultMetadataTypeEnum defaultMetadataType; + + public FetchPermissionsOfPrincipalsRequest() {} + + public FetchPermissionsOfPrincipalsRequest principals( + @javax.annotation.Nonnull List principals) { + this.principals = principals; + return this; + } + + public FetchPermissionsOfPrincipalsRequest addPrincipalsItem(PrincipalsInput principalsItem) { + if (this.principals == null) { + this.principals = new ArrayList<>(); + } + this.principals.add(principalsItem); + return this; + } + + /** + * GUID or name of the user or group. + * + * @return principals + */ + @javax.annotation.Nonnull + public List getPrincipals() { + return principals; + } + + public void setPrincipals(@javax.annotation.Nonnull List principals) { + this.principals = principals; + } + + public FetchPermissionsOfPrincipalsRequest metadata( + @javax.annotation.Nullable List metadata) { + this.metadata = metadata; + return this; + } + + public FetchPermissionsOfPrincipalsRequest addMetadataItem( + PermissionsMetadataTypeInput metadataItem) { + if (this.metadata == null) { + this.metadata = new ArrayList<>(); + } + this.metadata.add(metadataItem); + return this; + } + + /** + * Metadata objects for which you want to fetch permission details. If not specified, the API + * returns permission details for all metadata objects that the specified users and groups can + * access. + * + * @return metadata + */ + @javax.annotation.Nullable + public List getMetadata() { + return metadata; + } + + public void setMetadata( + @javax.annotation.Nullable List metadata) { + this.metadata = metadata; + } + + public FetchPermissionsOfPrincipalsRequest recordOffset( + @javax.annotation.Nullable Integer recordOffset) { + this.recordOffset = recordOffset; + return this; + } + + /** + * The starting record number from where the records should be included for each metadata type. + * + * @return recordOffset + */ + @javax.annotation.Nullable + public Integer getRecordOffset() { + return recordOffset; + } + + public void setRecordOffset(@javax.annotation.Nullable Integer recordOffset) { + this.recordOffset = recordOffset; + } + + public FetchPermissionsOfPrincipalsRequest recordSize( + @javax.annotation.Nullable Integer recordSize) { + this.recordSize = recordSize; + return this; + } + + /** + * The number of records that should be included for each metadata type. + * + * @return recordSize + */ + @javax.annotation.Nullable + public Integer getRecordSize() { + return recordSize; + } + + public void setRecordSize(@javax.annotation.Nullable Integer recordSize) { + this.recordSize = recordSize; + } + + public FetchPermissionsOfPrincipalsRequest defaultMetadataType( + @javax.annotation.Nullable DefaultMetadataTypeEnum defaultMetadataType) { + this.defaultMetadataType = defaultMetadataType; + return this; + } + + /** + * When no metadata objects input is passed, metadata objects of this type are fetched. + * + * @return defaultMetadataType + */ + @javax.annotation.Nullable + public DefaultMetadataTypeEnum getDefaultMetadataType() { + return defaultMetadataType; + } + + public void setDefaultMetadataType( + @javax.annotation.Nullable DefaultMetadataTypeEnum defaultMetadataType) { + this.defaultMetadataType = defaultMetadataType; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key name of the property + * @param value value of the property + * @return the FetchPermissionsOfPrincipalsRequest instance itself + */ + public FetchPermissionsOfPrincipalsRequest putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return a map of objects + */ + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key name of the property + * @return an object + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + FetchPermissionsOfPrincipalsRequest fetchPermissionsOfPrincipalsRequest = + (FetchPermissionsOfPrincipalsRequest) o; + return Objects.equals(this.principals, fetchPermissionsOfPrincipalsRequest.principals) + && Objects.equals(this.metadata, fetchPermissionsOfPrincipalsRequest.metadata) + && Objects.equals( + this.recordOffset, fetchPermissionsOfPrincipalsRequest.recordOffset) + && Objects.equals(this.recordSize, fetchPermissionsOfPrincipalsRequest.recordSize) + && Objects.equals( + this.defaultMetadataType, + fetchPermissionsOfPrincipalsRequest.defaultMetadataType) + && Objects.equals( + this.additionalProperties, + fetchPermissionsOfPrincipalsRequest.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash( + principals, + metadata, + recordOffset, + recordSize, + defaultMetadataType, + additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class FetchPermissionsOfPrincipalsRequest {\n"); + sb.append(" principals: ").append(toIndentedString(principals)).append("\n"); + sb.append(" metadata: ").append(toIndentedString(metadata)).append("\n"); + sb.append(" recordOffset: ").append(toIndentedString(recordOffset)).append("\n"); + sb.append(" recordSize: ").append(toIndentedString(recordSize)).append("\n"); + sb.append(" defaultMetadataType: ") + .append(toIndentedString(defaultMetadataType)) + .append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first + * line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("principals"); + openapiFields.add("metadata"); + openapiFields.add("record_offset"); + openapiFields.add("record_size"); + openapiFields.add("default_metadata_type"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + openapiRequiredFields.add("principals"); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to + * FetchPermissionsOfPrincipalsRequest + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!FetchPermissionsOfPrincipalsRequest.openapiRequiredFields + .isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException( + String.format( + "The required field(s) %s in FetchPermissionsOfPrincipalsRequest" + + " is not found in the empty JSON string", + FetchPermissionsOfPrincipalsRequest.openapiRequiredFields + .toString())); + } + } + + // check to make sure all required properties/fields are present in the JSON string + for (String requiredField : FetchPermissionsOfPrincipalsRequest.openapiRequiredFields) { + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException( + String.format( + "The required field `%s` is not found in the JSON string: %s", + requiredField, jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // ensure the json data is an array + if (!jsonObj.get("principals").isJsonArray()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `principals` to be an array in the JSON string but" + + " got `%s`", + jsonObj.get("principals").toString())); + } + + JsonArray jsonArrayprincipals = jsonObj.getAsJsonArray("principals"); + // validate the required field `principals` (array) + for (int i = 0; i < jsonArrayprincipals.size(); i++) { + PrincipalsInput.validateJsonElement(jsonArrayprincipals.get(i)); + } + ; + if (jsonObj.get("metadata") != null && !jsonObj.get("metadata").isJsonNull()) { + JsonArray jsonArraymetadata = jsonObj.getAsJsonArray("metadata"); + if (jsonArraymetadata != null) { + // ensure the json data is an array + if (!jsonObj.get("metadata").isJsonArray()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `metadata` to be an array in the JSON" + + " string but got `%s`", + jsonObj.get("metadata").toString())); + } + + // validate the optional field `metadata` (array) + for (int i = 0; i < jsonArraymetadata.size(); i++) { + PermissionsMetadataTypeInput.validateJsonElement(jsonArraymetadata.get(i)); + } + ; + } + } + if ((jsonObj.get("default_metadata_type") != null + && !jsonObj.get("default_metadata_type").isJsonNull()) + && !jsonObj.get("default_metadata_type").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `default_metadata_type` to be a primitive type in" + + " the JSON string but got `%s`", + jsonObj.get("default_metadata_type").toString())); + } + // validate the optional field `default_metadata_type` + if (jsonObj.get("default_metadata_type") != null + && !jsonObj.get("default_metadata_type").isJsonNull()) { + DefaultMetadataTypeEnum.validateJsonElement(jsonObj.get("default_metadata_type")); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!FetchPermissionsOfPrincipalsRequest.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'FetchPermissionsOfPrincipalsRequest' and + // its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter = + gson.getDelegateAdapter( + this, TypeToken.get(FetchPermissionsOfPrincipalsRequest.class)); + + return (TypeAdapter) + new TypeAdapter() { + @Override + public void write(JsonWriter out, FetchPermissionsOfPrincipalsRequest value) + throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + obj.remove("additionalProperties"); + // serialize additional properties + if (value.getAdditionalProperties() != null) { + for (Map.Entry entry : + value.getAdditionalProperties().entrySet()) { + if (entry.getValue() instanceof String) + obj.addProperty(entry.getKey(), (String) entry.getValue()); + else if (entry.getValue() instanceof Number) + obj.addProperty(entry.getKey(), (Number) entry.getValue()); + else if (entry.getValue() instanceof Boolean) + obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); + else if (entry.getValue() instanceof Character) + obj.addProperty( + entry.getKey(), (Character) entry.getValue()); + else { + JsonElement jsonElement = gson.toJsonTree(entry.getValue()); + if (jsonElement.isJsonArray()) { + obj.add(entry.getKey(), jsonElement.getAsJsonArray()); + } else { + obj.add(entry.getKey(), jsonElement.getAsJsonObject()); + } + } + } + } + elementAdapter.write(out, obj); + } + + @Override + public FetchPermissionsOfPrincipalsRequest read(JsonReader in) + throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // store additional fields in the deserialized instance + FetchPermissionsOfPrincipalsRequest instance = + thisAdapter.fromJsonTree(jsonObj); + for (Map.Entry entry : jsonObj.entrySet()) { + if (!openapiFields.contains(entry.getKey())) { + if (entry.getValue().isJsonPrimitive()) { // primitive type + if (entry.getValue().getAsJsonPrimitive().isString()) + instance.putAdditionalProperty( + entry.getKey(), entry.getValue().getAsString()); + else if (entry.getValue().getAsJsonPrimitive().isNumber()) + instance.putAdditionalProperty( + entry.getKey(), entry.getValue().getAsNumber()); + else if (entry.getValue().getAsJsonPrimitive().isBoolean()) + instance.putAdditionalProperty( + entry.getKey(), + entry.getValue().getAsBoolean()); + else + throw new IllegalArgumentException( + String.format( + "The field `%s` has unknown primitive" + + " type. Value: %s", + entry.getKey(), + entry.getValue().toString())); + } else if (entry.getValue().isJsonArray()) { + instance.putAdditionalProperty( + entry.getKey(), + gson.fromJson(entry.getValue(), List.class)); + } else { // JSON object + instance.putAdditionalProperty( + entry.getKey(), + gson.fromJson(entry.getValue(), HashMap.class)); + } + } + } + return instance; + } + }.nullSafe(); + } + } + + /** + * Create an instance of FetchPermissionsOfPrincipalsRequest given an JSON string + * + * @param jsonString JSON string + * @return An instance of FetchPermissionsOfPrincipalsRequest + * @throws IOException if the JSON string is invalid with respect to + * FetchPermissionsOfPrincipalsRequest + */ + public static FetchPermissionsOfPrincipalsRequest fromJson(String jsonString) + throws IOException { + return JSON.getGson().fromJson(jsonString, FetchPermissionsOfPrincipalsRequest.class); + } + + /** + * Convert an instance of FetchPermissionsOfPrincipalsRequest to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} diff --git a/sdks/java/src/main/java/com/thoughtspot/client/model/FetchPermissionsOnMetadataRequest.java b/sdks/java/src/main/java/com/thoughtspot/client/model/FetchPermissionsOnMetadataRequest.java new file mode 100644 index 000000000..38323e70f --- /dev/null +++ b/sdks/java/src/main/java/com/thoughtspot/client/model/FetchPermissionsOnMetadataRequest.java @@ -0,0 +1,547 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client.model; + +import com.google.gson.Gson; +import com.google.gson.JsonArray; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.TypeAdapter; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.annotations.SerializedName; +import com.google.gson.reflect.TypeToken; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import com.thoughtspot.client.JSON; +import java.io.IOException; +import java.io.Serializable; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Objects; +import org.openapitools.jackson.nullable.JsonNullable; + +/** FetchPermissionsOnMetadataRequest */ +@javax.annotation.Generated( + value = "org.openapitools.codegen.languages.JavaClientCodegen", + comments = "Generator version: 7.12.0") +public class FetchPermissionsOnMetadataRequest implements Serializable { + private static final long serialVersionUID = 1L; + + public static final String SERIALIZED_NAME_METADATA = "metadata"; + + @SerializedName(SERIALIZED_NAME_METADATA) + @javax.annotation.Nonnull + private List metadata; + + public static final String SERIALIZED_NAME_PRINCIPALS = "principals"; + + @SerializedName(SERIALIZED_NAME_PRINCIPALS) + @javax.annotation.Nullable + private List principals; + + public static final String SERIALIZED_NAME_INCLUDE_DEPENDENT_OBJECTS = + "include_dependent_objects"; + + @SerializedName(SERIALIZED_NAME_INCLUDE_DEPENDENT_OBJECTS) + @javax.annotation.Nullable + private Boolean includeDependentObjects = false; + + public static final String SERIALIZED_NAME_RECORD_OFFSET = "record_offset"; + + @SerializedName(SERIALIZED_NAME_RECORD_OFFSET) + @javax.annotation.Nullable + private Integer recordOffset = 0; + + public static final String SERIALIZED_NAME_RECORD_SIZE = "record_size"; + + @SerializedName(SERIALIZED_NAME_RECORD_SIZE) + @javax.annotation.Nullable + private Integer recordSize = -1; + + public static final String SERIALIZED_NAME_PERMISSION_TYPE = "permission_type"; + + @SerializedName(SERIALIZED_NAME_PERMISSION_TYPE) + @javax.annotation.Nullable + private String permissionType; + + public FetchPermissionsOnMetadataRequest() {} + + public FetchPermissionsOnMetadataRequest metadata( + @javax.annotation.Nonnull List metadata) { + this.metadata = metadata; + return this; + } + + public FetchPermissionsOnMetadataRequest addMetadataItem( + PermissionsMetadataTypeInput metadataItem) { + if (this.metadata == null) { + this.metadata = new ArrayList<>(); + } + this.metadata.add(metadataItem); + return this; + } + + /** + * GUID or name of the metadata object. + * + * @return metadata + */ + @javax.annotation.Nonnull + public List getMetadata() { + return metadata; + } + + public void setMetadata(@javax.annotation.Nonnull List metadata) { + this.metadata = metadata; + } + + public FetchPermissionsOnMetadataRequest principals( + @javax.annotation.Nullable List principals) { + this.principals = principals; + return this; + } + + public FetchPermissionsOnMetadataRequest addPrincipalsItem(PrincipalsInput principalsItem) { + if (this.principals == null) { + this.principals = new ArrayList<>(); + } + this.principals.add(principalsItem); + return this; + } + + /** + * User or group objects for which you want to fetch permissions. If not specified, the API + * returns all users and groups that can access the specified metadata objects. + * + * @return principals + */ + @javax.annotation.Nullable + public List getPrincipals() { + return principals; + } + + public void setPrincipals(@javax.annotation.Nullable List principals) { + this.principals = principals; + } + + public FetchPermissionsOnMetadataRequest includeDependentObjects( + @javax.annotation.Nullable Boolean includeDependentObjects) { + this.includeDependentObjects = includeDependentObjects; + return this; + } + + /** + * Indicates whether to fetch permissions of dependent metadata objects. + * + * @return includeDependentObjects + */ + @javax.annotation.Nullable + public Boolean getIncludeDependentObjects() { + return includeDependentObjects; + } + + public void setIncludeDependentObjects( + @javax.annotation.Nullable Boolean includeDependentObjects) { + this.includeDependentObjects = includeDependentObjects; + } + + public FetchPermissionsOnMetadataRequest recordOffset( + @javax.annotation.Nullable Integer recordOffset) { + this.recordOffset = recordOffset; + return this; + } + + /** + * The starting record number from where the records should be included for each metadata type. + * + * @return recordOffset + */ + @javax.annotation.Nullable + public Integer getRecordOffset() { + return recordOffset; + } + + public void setRecordOffset(@javax.annotation.Nullable Integer recordOffset) { + this.recordOffset = recordOffset; + } + + public FetchPermissionsOnMetadataRequest recordSize( + @javax.annotation.Nullable Integer recordSize) { + this.recordSize = recordSize; + return this; + } + + /** + * The number of records that should be included for each metadata type. + * + * @return recordSize + */ + @javax.annotation.Nullable + public Integer getRecordSize() { + return recordSize; + } + + public void setRecordSize(@javax.annotation.Nullable Integer recordSize) { + this.recordSize = recordSize; + } + + public FetchPermissionsOnMetadataRequest permissionType( + @javax.annotation.Nullable String permissionType) { + this.permissionType = permissionType; + return this; + } + + /** + * <div>Version: 10.3.0.cl or later </div> Specifies the type of permission. Valid + * values are: EFFECTIVE - If the user permission to the metadata objects is granted by the + * privileges assigned to the groups to which they belong. DEFINED - If a user or user group + * received access to metadata objects via object sharing by another user. + * + * @return permissionType + */ + @javax.annotation.Nullable + public String getPermissionType() { + return permissionType; + } + + public void setPermissionType(@javax.annotation.Nullable String permissionType) { + this.permissionType = permissionType; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key name of the property + * @param value value of the property + * @return the FetchPermissionsOnMetadataRequest instance itself + */ + public FetchPermissionsOnMetadataRequest putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return a map of objects + */ + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key name of the property + * @return an object + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + FetchPermissionsOnMetadataRequest fetchPermissionsOnMetadataRequest = + (FetchPermissionsOnMetadataRequest) o; + return Objects.equals(this.metadata, fetchPermissionsOnMetadataRequest.metadata) + && Objects.equals(this.principals, fetchPermissionsOnMetadataRequest.principals) + && Objects.equals( + this.includeDependentObjects, + fetchPermissionsOnMetadataRequest.includeDependentObjects) + && Objects.equals(this.recordOffset, fetchPermissionsOnMetadataRequest.recordOffset) + && Objects.equals(this.recordSize, fetchPermissionsOnMetadataRequest.recordSize) + && Objects.equals( + this.permissionType, fetchPermissionsOnMetadataRequest.permissionType) + && Objects.equals( + this.additionalProperties, + fetchPermissionsOnMetadataRequest.additionalProperties); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b + || (a != null + && b != null + && a.isPresent() + && b.isPresent() + && Objects.deepEquals(a.get(), b.get())); + } + + @Override + public int hashCode() { + return Objects.hash( + metadata, + principals, + includeDependentObjects, + recordOffset, + recordSize, + permissionType, + additionalProperties); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; + } + return a.isPresent() ? Arrays.deepHashCode(new Object[] {a.get()}) : 31; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class FetchPermissionsOnMetadataRequest {\n"); + sb.append(" metadata: ").append(toIndentedString(metadata)).append("\n"); + sb.append(" principals: ").append(toIndentedString(principals)).append("\n"); + sb.append(" includeDependentObjects: ") + .append(toIndentedString(includeDependentObjects)) + .append("\n"); + sb.append(" recordOffset: ").append(toIndentedString(recordOffset)).append("\n"); + sb.append(" recordSize: ").append(toIndentedString(recordSize)).append("\n"); + sb.append(" permissionType: ").append(toIndentedString(permissionType)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first + * line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("metadata"); + openapiFields.add("principals"); + openapiFields.add("include_dependent_objects"); + openapiFields.add("record_offset"); + openapiFields.add("record_size"); + openapiFields.add("permission_type"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + openapiRequiredFields.add("metadata"); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to + * FetchPermissionsOnMetadataRequest + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!FetchPermissionsOnMetadataRequest.openapiRequiredFields + .isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException( + String.format( + "The required field(s) %s in FetchPermissionsOnMetadataRequest is" + + " not found in the empty JSON string", + FetchPermissionsOnMetadataRequest.openapiRequiredFields + .toString())); + } + } + + // check to make sure all required properties/fields are present in the JSON string + for (String requiredField : FetchPermissionsOnMetadataRequest.openapiRequiredFields) { + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException( + String.format( + "The required field `%s` is not found in the JSON string: %s", + requiredField, jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // ensure the json data is an array + if (!jsonObj.get("metadata").isJsonArray()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `metadata` to be an array in the JSON string but" + + " got `%s`", + jsonObj.get("metadata").toString())); + } + + JsonArray jsonArraymetadata = jsonObj.getAsJsonArray("metadata"); + // validate the required field `metadata` (array) + for (int i = 0; i < jsonArraymetadata.size(); i++) { + PermissionsMetadataTypeInput.validateJsonElement(jsonArraymetadata.get(i)); + } + ; + if (jsonObj.get("principals") != null && !jsonObj.get("principals").isJsonNull()) { + JsonArray jsonArrayprincipals = jsonObj.getAsJsonArray("principals"); + if (jsonArrayprincipals != null) { + // ensure the json data is an array + if (!jsonObj.get("principals").isJsonArray()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `principals` to be an array in the JSON" + + " string but got `%s`", + jsonObj.get("principals").toString())); + } + + // validate the optional field `principals` (array) + for (int i = 0; i < jsonArrayprincipals.size(); i++) { + PrincipalsInput.validateJsonElement(jsonArrayprincipals.get(i)); + } + ; + } + } + if ((jsonObj.get("permission_type") != null && !jsonObj.get("permission_type").isJsonNull()) + && !jsonObj.get("permission_type").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `permission_type` to be a primitive type in the" + + " JSON string but got `%s`", + jsonObj.get("permission_type").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!FetchPermissionsOnMetadataRequest.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'FetchPermissionsOnMetadataRequest' and + // its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter = + gson.getDelegateAdapter( + this, TypeToken.get(FetchPermissionsOnMetadataRequest.class)); + + return (TypeAdapter) + new TypeAdapter() { + @Override + public void write(JsonWriter out, FetchPermissionsOnMetadataRequest value) + throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + obj.remove("additionalProperties"); + // serialize additional properties + if (value.getAdditionalProperties() != null) { + for (Map.Entry entry : + value.getAdditionalProperties().entrySet()) { + if (entry.getValue() instanceof String) + obj.addProperty(entry.getKey(), (String) entry.getValue()); + else if (entry.getValue() instanceof Number) + obj.addProperty(entry.getKey(), (Number) entry.getValue()); + else if (entry.getValue() instanceof Boolean) + obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); + else if (entry.getValue() instanceof Character) + obj.addProperty( + entry.getKey(), (Character) entry.getValue()); + else { + JsonElement jsonElement = gson.toJsonTree(entry.getValue()); + if (jsonElement.isJsonArray()) { + obj.add(entry.getKey(), jsonElement.getAsJsonArray()); + } else { + obj.add(entry.getKey(), jsonElement.getAsJsonObject()); + } + } + } + } + elementAdapter.write(out, obj); + } + + @Override + public FetchPermissionsOnMetadataRequest read(JsonReader in) + throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // store additional fields in the deserialized instance + FetchPermissionsOnMetadataRequest instance = + thisAdapter.fromJsonTree(jsonObj); + for (Map.Entry entry : jsonObj.entrySet()) { + if (!openapiFields.contains(entry.getKey())) { + if (entry.getValue().isJsonPrimitive()) { // primitive type + if (entry.getValue().getAsJsonPrimitive().isString()) + instance.putAdditionalProperty( + entry.getKey(), entry.getValue().getAsString()); + else if (entry.getValue().getAsJsonPrimitive().isNumber()) + instance.putAdditionalProperty( + entry.getKey(), entry.getValue().getAsNumber()); + else if (entry.getValue().getAsJsonPrimitive().isBoolean()) + instance.putAdditionalProperty( + entry.getKey(), + entry.getValue().getAsBoolean()); + else + throw new IllegalArgumentException( + String.format( + "The field `%s` has unknown primitive" + + " type. Value: %s", + entry.getKey(), + entry.getValue().toString())); + } else if (entry.getValue().isJsonArray()) { + instance.putAdditionalProperty( + entry.getKey(), + gson.fromJson(entry.getValue(), List.class)); + } else { // JSON object + instance.putAdditionalProperty( + entry.getKey(), + gson.fromJson(entry.getValue(), HashMap.class)); + } + } + } + return instance; + } + }.nullSafe(); + } + } + + /** + * Create an instance of FetchPermissionsOnMetadataRequest given an JSON string + * + * @param jsonString JSON string + * @return An instance of FetchPermissionsOnMetadataRequest + * @throws IOException if the JSON string is invalid with respect to + * FetchPermissionsOnMetadataRequest + */ + public static FetchPermissionsOnMetadataRequest fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, FetchPermissionsOnMetadataRequest.class); + } + + /** + * Convert an instance of FetchPermissionsOnMetadataRequest to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} diff --git a/sdks/java/src/main/java/com/thoughtspot/client/model/FilterRules.java b/sdks/java/src/main/java/com/thoughtspot/client/model/FilterRules.java new file mode 100644 index 000000000..271ea81b1 --- /dev/null +++ b/sdks/java/src/main/java/com/thoughtspot/client/model/FilterRules.java @@ -0,0 +1,468 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client.model; + +import com.google.gson.Gson; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.TypeAdapter; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.reflect.TypeToken; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import com.thoughtspot.client.JSON; +import java.io.IOException; +import java.io.Serializable; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Objects; + +/** Filter Rules to be applied on Objects. */ +@javax.annotation.Generated( + value = "org.openapitools.codegen.languages.JavaClientCodegen", + comments = "Generator version: 7.12.0") +public class FilterRules implements Serializable { + private static final long serialVersionUID = 1L; + + public static final String SERIALIZED_NAME_COLUMN_NAME = "column_name"; + + @SerializedName(SERIALIZED_NAME_COLUMN_NAME) + @javax.annotation.Nonnull + private String columnName; + + /** The operator to use for filtering. Example: EQ (equals), GT(greater than), etc. */ + @JsonAdapter(OperatorEnum.Adapter.class) + public enum OperatorEnum { + EQ("EQ"), + + NE("NE"), + + LT("LT"), + + LE("LE"), + + GT("GT"), + + GE("GE"), + + IN("IN"), + + BW("BW"), + + CONTAINS("CONTAINS"), + + BEGINS_WITH("BEGINS_WITH"), + + ENDS_WITH("ENDS_WITH"), + + BW_INC("BW_INC"), + + BW_INC_MIN("BW_INC_MIN"), + + BW_INC_MAX("BW_INC_MAX"), + + LIKE("LIKE"), + + NOT_IN("NOT_IN"); + + private String value; + + OperatorEnum(String value) { + this.value = value; + } + + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + public static OperatorEnum fromValue(String value) { + for (OperatorEnum b : OperatorEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + + public static class Adapter extends TypeAdapter { + @Override + public void write(final JsonWriter jsonWriter, final OperatorEnum enumeration) + throws IOException { + jsonWriter.value(enumeration.getValue()); + } + + @Override + public OperatorEnum read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + return OperatorEnum.fromValue(value); + } + } + + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + String value = jsonElement.getAsString(); + OperatorEnum.fromValue(value); + } + } + + public static final String SERIALIZED_NAME_OPERATOR = "operator"; + + @SerializedName(SERIALIZED_NAME_OPERATOR) + @javax.annotation.Nonnull + private OperatorEnum operator; + + public static final String SERIALIZED_NAME_VALUES = "values"; + + @SerializedName(SERIALIZED_NAME_VALUES) + @javax.annotation.Nonnull + private List values; + + public FilterRules() {} + + public FilterRules columnName(@javax.annotation.Nonnull String columnName) { + this.columnName = columnName; + return this; + } + + /** + * The name of the column to apply the filter on. + * + * @return columnName + */ + @javax.annotation.Nonnull + public String getColumnName() { + return columnName; + } + + public void setColumnName(@javax.annotation.Nonnull String columnName) { + this.columnName = columnName; + } + + public FilterRules operator(@javax.annotation.Nonnull OperatorEnum operator) { + this.operator = operator; + return this; + } + + /** + * The operator to use for filtering. Example: EQ (equals), GT(greater than), etc. + * + * @return operator + */ + @javax.annotation.Nonnull + public OperatorEnum getOperator() { + return operator; + } + + public void setOperator(@javax.annotation.Nonnull OperatorEnum operator) { + this.operator = operator; + } + + public FilterRules values(@javax.annotation.Nonnull List values) { + this.values = values; + return this; + } + + public FilterRules addValuesItem(Object valuesItem) { + if (this.values == null) { + this.values = new ArrayList<>(); + } + this.values.add(valuesItem); + return this; + } + + /** + * The values to filter on. To get all records, use TS_WILDCARD_ALL as values. + * + * @return values + */ + @javax.annotation.Nonnull + public List getValues() { + return values; + } + + public void setValues(@javax.annotation.Nonnull List values) { + this.values = values; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key name of the property + * @param value value of the property + * @return the FilterRules instance itself + */ + public FilterRules putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return a map of objects + */ + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key name of the property + * @return an object + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + FilterRules filterRules = (FilterRules) o; + return Objects.equals(this.columnName, filterRules.columnName) + && Objects.equals(this.operator, filterRules.operator) + && Objects.equals(this.values, filterRules.values) + && Objects.equals(this.additionalProperties, filterRules.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(columnName, operator, values, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class FilterRules {\n"); + sb.append(" columnName: ").append(toIndentedString(columnName)).append("\n"); + sb.append(" operator: ").append(toIndentedString(operator)).append("\n"); + sb.append(" values: ").append(toIndentedString(values)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first + * line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("column_name"); + openapiFields.add("operator"); + openapiFields.add("values"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + openapiRequiredFields.add("column_name"); + openapiRequiredFields.add("operator"); + openapiRequiredFields.add("values"); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to FilterRules + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!FilterRules.openapiRequiredFields + .isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException( + String.format( + "The required field(s) %s in FilterRules is not found in the empty" + + " JSON string", + FilterRules.openapiRequiredFields.toString())); + } + } + + // check to make sure all required properties/fields are present in the JSON string + for (String requiredField : FilterRules.openapiRequiredFields) { + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException( + String.format( + "The required field `%s` is not found in the JSON string: %s", + requiredField, jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if (!jsonObj.get("column_name").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `column_name` to be a primitive type in the JSON" + + " string but got `%s`", + jsonObj.get("column_name").toString())); + } + if (!jsonObj.get("operator").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `operator` to be a primitive type in the JSON" + + " string but got `%s`", + jsonObj.get("operator").toString())); + } + // validate the required field `operator` + OperatorEnum.validateJsonElement(jsonObj.get("operator")); + // ensure the required json array is present + if (jsonObj.get("values") == null) { + throw new IllegalArgumentException( + "Expected the field `linkedContent` to be an array in the JSON string but got" + + " `null`"); + } else if (!jsonObj.get("values").isJsonArray()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `values` to be an array in the JSON string but got" + + " `%s`", + jsonObj.get("values").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!FilterRules.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'FilterRules' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter = + gson.getDelegateAdapter(this, TypeToken.get(FilterRules.class)); + + return (TypeAdapter) + new TypeAdapter() { + @Override + public void write(JsonWriter out, FilterRules value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + obj.remove("additionalProperties"); + // serialize additional properties + if (value.getAdditionalProperties() != null) { + for (Map.Entry entry : + value.getAdditionalProperties().entrySet()) { + if (entry.getValue() instanceof String) + obj.addProperty(entry.getKey(), (String) entry.getValue()); + else if (entry.getValue() instanceof Number) + obj.addProperty(entry.getKey(), (Number) entry.getValue()); + else if (entry.getValue() instanceof Boolean) + obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); + else if (entry.getValue() instanceof Character) + obj.addProperty( + entry.getKey(), (Character) entry.getValue()); + else { + JsonElement jsonElement = gson.toJsonTree(entry.getValue()); + if (jsonElement.isJsonArray()) { + obj.add(entry.getKey(), jsonElement.getAsJsonArray()); + } else { + obj.add(entry.getKey(), jsonElement.getAsJsonObject()); + } + } + } + } + elementAdapter.write(out, obj); + } + + @Override + public FilterRules read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // store additional fields in the deserialized instance + FilterRules instance = thisAdapter.fromJsonTree(jsonObj); + for (Map.Entry entry : jsonObj.entrySet()) { + if (!openapiFields.contains(entry.getKey())) { + if (entry.getValue().isJsonPrimitive()) { // primitive type + if (entry.getValue().getAsJsonPrimitive().isString()) + instance.putAdditionalProperty( + entry.getKey(), entry.getValue().getAsString()); + else if (entry.getValue().getAsJsonPrimitive().isNumber()) + instance.putAdditionalProperty( + entry.getKey(), entry.getValue().getAsNumber()); + else if (entry.getValue().getAsJsonPrimitive().isBoolean()) + instance.putAdditionalProperty( + entry.getKey(), + entry.getValue().getAsBoolean()); + else + throw new IllegalArgumentException( + String.format( + "The field `%s` has unknown primitive" + + " type. Value: %s", + entry.getKey(), + entry.getValue().toString())); + } else if (entry.getValue().isJsonArray()) { + instance.putAdditionalProperty( + entry.getKey(), + gson.fromJson(entry.getValue(), List.class)); + } else { // JSON object + instance.putAdditionalProperty( + entry.getKey(), + gson.fromJson(entry.getValue(), HashMap.class)); + } + } + } + return instance; + } + }.nullSafe(); + } + } + + /** + * Create an instance of FilterRules given an JSON string + * + * @param jsonString JSON string + * @return An instance of FilterRules + * @throws IOException if the JSON string is invalid with respect to FilterRules + */ + public static FilterRules fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, FilterRules.class); + } + + /** + * Convert an instance of FilterRules to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} diff --git a/sdks/java/src/main/java/com/thoughtspot/client/model/ForceLogoutUsersRequest.java b/sdks/java/src/main/java/com/thoughtspot/client/model/ForceLogoutUsersRequest.java new file mode 100644 index 000000000..6999a99ba --- /dev/null +++ b/sdks/java/src/main/java/com/thoughtspot/client/model/ForceLogoutUsersRequest.java @@ -0,0 +1,305 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client.model; + +import com.google.gson.Gson; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.TypeAdapter; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.annotations.SerializedName; +import com.google.gson.reflect.TypeToken; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import com.thoughtspot.client.JSON; +import java.io.IOException; +import java.io.Serializable; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Objects; + +/** ForceLogoutUsersRequest */ +@javax.annotation.Generated( + value = "org.openapitools.codegen.languages.JavaClientCodegen", + comments = "Generator version: 7.12.0") +public class ForceLogoutUsersRequest implements Serializable { + private static final long serialVersionUID = 1L; + + public static final String SERIALIZED_NAME_USER_IDENTIFIERS = "user_identifiers"; + + @SerializedName(SERIALIZED_NAME_USER_IDENTIFIERS) + @javax.annotation.Nullable + private List userIdentifiers; + + public ForceLogoutUsersRequest() {} + + public ForceLogoutUsersRequest userIdentifiers( + @javax.annotation.Nullable List userIdentifiers) { + this.userIdentifiers = userIdentifiers; + return this; + } + + public ForceLogoutUsersRequest addUserIdentifiersItem(String userIdentifiersItem) { + if (this.userIdentifiers == null) { + this.userIdentifiers = new ArrayList<>(); + } + this.userIdentifiers.add(userIdentifiersItem); + return this; + } + + /** + * GUID or name of the users for force logging out their sessions. + * + * @return userIdentifiers + */ + @javax.annotation.Nullable + public List getUserIdentifiers() { + return userIdentifiers; + } + + public void setUserIdentifiers(@javax.annotation.Nullable List userIdentifiers) { + this.userIdentifiers = userIdentifiers; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key name of the property + * @param value value of the property + * @return the ForceLogoutUsersRequest instance itself + */ + public ForceLogoutUsersRequest putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return a map of objects + */ + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key name of the property + * @return an object + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ForceLogoutUsersRequest forceLogoutUsersRequest = (ForceLogoutUsersRequest) o; + return Objects.equals(this.userIdentifiers, forceLogoutUsersRequest.userIdentifiers) + && Objects.equals( + this.additionalProperties, forceLogoutUsersRequest.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(userIdentifiers, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ForceLogoutUsersRequest {\n"); + sb.append(" userIdentifiers: ").append(toIndentedString(userIdentifiers)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first + * line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("user_identifiers"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to ForceLogoutUsersRequest + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!ForceLogoutUsersRequest.openapiRequiredFields + .isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException( + String.format( + "The required field(s) %s in ForceLogoutUsersRequest is not found" + + " in the empty JSON string", + ForceLogoutUsersRequest.openapiRequiredFields.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // ensure the optional json data is an array if present + if (jsonObj.get("user_identifiers") != null + && !jsonObj.get("user_identifiers").isJsonNull() + && !jsonObj.get("user_identifiers").isJsonArray()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `user_identifiers` to be an array in the JSON" + + " string but got `%s`", + jsonObj.get("user_identifiers").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!ForceLogoutUsersRequest.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'ForceLogoutUsersRequest' and its + // subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter = + gson.getDelegateAdapter(this, TypeToken.get(ForceLogoutUsersRequest.class)); + + return (TypeAdapter) + new TypeAdapter() { + @Override + public void write(JsonWriter out, ForceLogoutUsersRequest value) + throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + obj.remove("additionalProperties"); + // serialize additional properties + if (value.getAdditionalProperties() != null) { + for (Map.Entry entry : + value.getAdditionalProperties().entrySet()) { + if (entry.getValue() instanceof String) + obj.addProperty(entry.getKey(), (String) entry.getValue()); + else if (entry.getValue() instanceof Number) + obj.addProperty(entry.getKey(), (Number) entry.getValue()); + else if (entry.getValue() instanceof Boolean) + obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); + else if (entry.getValue() instanceof Character) + obj.addProperty( + entry.getKey(), (Character) entry.getValue()); + else { + JsonElement jsonElement = gson.toJsonTree(entry.getValue()); + if (jsonElement.isJsonArray()) { + obj.add(entry.getKey(), jsonElement.getAsJsonArray()); + } else { + obj.add(entry.getKey(), jsonElement.getAsJsonObject()); + } + } + } + } + elementAdapter.write(out, obj); + } + + @Override + public ForceLogoutUsersRequest read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // store additional fields in the deserialized instance + ForceLogoutUsersRequest instance = thisAdapter.fromJsonTree(jsonObj); + for (Map.Entry entry : jsonObj.entrySet()) { + if (!openapiFields.contains(entry.getKey())) { + if (entry.getValue().isJsonPrimitive()) { // primitive type + if (entry.getValue().getAsJsonPrimitive().isString()) + instance.putAdditionalProperty( + entry.getKey(), entry.getValue().getAsString()); + else if (entry.getValue().getAsJsonPrimitive().isNumber()) + instance.putAdditionalProperty( + entry.getKey(), entry.getValue().getAsNumber()); + else if (entry.getValue().getAsJsonPrimitive().isBoolean()) + instance.putAdditionalProperty( + entry.getKey(), + entry.getValue().getAsBoolean()); + else + throw new IllegalArgumentException( + String.format( + "The field `%s` has unknown primitive" + + " type. Value: %s", + entry.getKey(), + entry.getValue().toString())); + } else if (entry.getValue().isJsonArray()) { + instance.putAdditionalProperty( + entry.getKey(), + gson.fromJson(entry.getValue(), List.class)); + } else { // JSON object + instance.putAdditionalProperty( + entry.getKey(), + gson.fromJson(entry.getValue(), HashMap.class)); + } + } + } + return instance; + } + }.nullSafe(); + } + } + + /** + * Create an instance of ForceLogoutUsersRequest given an JSON string + * + * @param jsonString JSON string + * @return An instance of ForceLogoutUsersRequest + * @throws IOException if the JSON string is invalid with respect to ForceLogoutUsersRequest + */ + public static ForceLogoutUsersRequest fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, ForceLogoutUsersRequest.class); + } + + /** + * Convert an instance of ForceLogoutUsersRequest to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} diff --git a/sdks/java/src/main/java/com/thoughtspot/client/model/Frequency.java b/sdks/java/src/main/java/com/thoughtspot/client/model/Frequency.java new file mode 100644 index 000000000..bd993174a --- /dev/null +++ b/sdks/java/src/main/java/com/thoughtspot/client/model/Frequency.java @@ -0,0 +1,295 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client.model; + +import com.google.gson.Gson; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.TypeAdapter; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.annotations.SerializedName; +import com.google.gson.reflect.TypeToken; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import com.thoughtspot.client.JSON; +import java.io.IOException; +import java.io.Serializable; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Objects; + +/** Configuration of schedule with cron expression */ +@javax.annotation.Generated( + value = "org.openapitools.codegen.languages.JavaClientCodegen", + comments = "Generator version: 7.12.0") +public class Frequency implements Serializable { + private static final long serialVersionUID = 1L; + + public static final String SERIALIZED_NAME_CRON_EXPRESSION = "cron_expression"; + + @SerializedName(SERIALIZED_NAME_CRON_EXPRESSION) + @javax.annotation.Nonnull + private CronExpression cronExpression; + + public Frequency() {} + + public Frequency cronExpression(@javax.annotation.Nonnull CronExpression cronExpression) { + this.cronExpression = cronExpression; + return this; + } + + /** + * Get cronExpression + * + * @return cronExpression + */ + @javax.annotation.Nonnull + public CronExpression getCronExpression() { + return cronExpression; + } + + public void setCronExpression(@javax.annotation.Nonnull CronExpression cronExpression) { + this.cronExpression = cronExpression; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key name of the property + * @param value value of the property + * @return the Frequency instance itself + */ + public Frequency putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return a map of objects + */ + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key name of the property + * @return an object + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + Frequency frequency = (Frequency) o; + return Objects.equals(this.cronExpression, frequency.cronExpression) + && Objects.equals(this.additionalProperties, frequency.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(cronExpression, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class Frequency {\n"); + sb.append(" cronExpression: ").append(toIndentedString(cronExpression)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first + * line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("cron_expression"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + openapiRequiredFields.add("cron_expression"); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to Frequency + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!Frequency.openapiRequiredFields + .isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException( + String.format( + "The required field(s) %s in Frequency is not found in the empty" + + " JSON string", + Frequency.openapiRequiredFields.toString())); + } + } + + // check to make sure all required properties/fields are present in the JSON string + for (String requiredField : Frequency.openapiRequiredFields) { + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException( + String.format( + "The required field `%s` is not found in the JSON string: %s", + requiredField, jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // validate the required field `cron_expression` + CronExpression.validateJsonElement(jsonObj.get("cron_expression")); + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!Frequency.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'Frequency' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter = + gson.getDelegateAdapter(this, TypeToken.get(Frequency.class)); + + return (TypeAdapter) + new TypeAdapter() { + @Override + public void write(JsonWriter out, Frequency value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + obj.remove("additionalProperties"); + // serialize additional properties + if (value.getAdditionalProperties() != null) { + for (Map.Entry entry : + value.getAdditionalProperties().entrySet()) { + if (entry.getValue() instanceof String) + obj.addProperty(entry.getKey(), (String) entry.getValue()); + else if (entry.getValue() instanceof Number) + obj.addProperty(entry.getKey(), (Number) entry.getValue()); + else if (entry.getValue() instanceof Boolean) + obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); + else if (entry.getValue() instanceof Character) + obj.addProperty( + entry.getKey(), (Character) entry.getValue()); + else { + JsonElement jsonElement = gson.toJsonTree(entry.getValue()); + if (jsonElement.isJsonArray()) { + obj.add(entry.getKey(), jsonElement.getAsJsonArray()); + } else { + obj.add(entry.getKey(), jsonElement.getAsJsonObject()); + } + } + } + } + elementAdapter.write(out, obj); + } + + @Override + public Frequency read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // store additional fields in the deserialized instance + Frequency instance = thisAdapter.fromJsonTree(jsonObj); + for (Map.Entry entry : jsonObj.entrySet()) { + if (!openapiFields.contains(entry.getKey())) { + if (entry.getValue().isJsonPrimitive()) { // primitive type + if (entry.getValue().getAsJsonPrimitive().isString()) + instance.putAdditionalProperty( + entry.getKey(), entry.getValue().getAsString()); + else if (entry.getValue().getAsJsonPrimitive().isNumber()) + instance.putAdditionalProperty( + entry.getKey(), entry.getValue().getAsNumber()); + else if (entry.getValue().getAsJsonPrimitive().isBoolean()) + instance.putAdditionalProperty( + entry.getKey(), + entry.getValue().getAsBoolean()); + else + throw new IllegalArgumentException( + String.format( + "The field `%s` has unknown primitive" + + " type. Value: %s", + entry.getKey(), + entry.getValue().toString())); + } else if (entry.getValue().isJsonArray()) { + instance.putAdditionalProperty( + entry.getKey(), + gson.fromJson(entry.getValue(), List.class)); + } else { // JSON object + instance.putAdditionalProperty( + entry.getKey(), + gson.fromJson(entry.getValue(), HashMap.class)); + } + } + } + return instance; + } + }.nullSafe(); + } + } + + /** + * Create an instance of Frequency given an JSON string + * + * @param jsonString JSON string + * @return An instance of Frequency + * @throws IOException if the JSON string is invalid with respect to Frequency + */ + public static Frequency fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, Frequency.class); + } + + /** + * Convert an instance of Frequency to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} diff --git a/sdks/java/src/main/java/com/thoughtspot/client/model/FrequencyInput.java b/sdks/java/src/main/java/com/thoughtspot/client/model/FrequencyInput.java new file mode 100644 index 000000000..5d84b37b4 --- /dev/null +++ b/sdks/java/src/main/java/com/thoughtspot/client/model/FrequencyInput.java @@ -0,0 +1,296 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client.model; + +import com.google.gson.Gson; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.TypeAdapter; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.annotations.SerializedName; +import com.google.gson.reflect.TypeToken; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import com.thoughtspot.client.JSON; +import java.io.IOException; +import java.io.Serializable; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Objects; + +/** Configuration of schedule with cron expression */ +@javax.annotation.Generated( + value = "org.openapitools.codegen.languages.JavaClientCodegen", + comments = "Generator version: 7.12.0") +public class FrequencyInput implements Serializable { + private static final long serialVersionUID = 1L; + + public static final String SERIALIZED_NAME_CRON_EXPRESSION = "cron_expression"; + + @SerializedName(SERIALIZED_NAME_CRON_EXPRESSION) + @javax.annotation.Nonnull + private CronExpressionInput cronExpression; + + public FrequencyInput() {} + + public FrequencyInput cronExpression( + @javax.annotation.Nonnull CronExpressionInput cronExpression) { + this.cronExpression = cronExpression; + return this; + } + + /** + * Get cronExpression + * + * @return cronExpression + */ + @javax.annotation.Nonnull + public CronExpressionInput getCronExpression() { + return cronExpression; + } + + public void setCronExpression(@javax.annotation.Nonnull CronExpressionInput cronExpression) { + this.cronExpression = cronExpression; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key name of the property + * @param value value of the property + * @return the FrequencyInput instance itself + */ + public FrequencyInput putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return a map of objects + */ + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key name of the property + * @return an object + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + FrequencyInput frequencyInput = (FrequencyInput) o; + return Objects.equals(this.cronExpression, frequencyInput.cronExpression) + && Objects.equals(this.additionalProperties, frequencyInput.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(cronExpression, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class FrequencyInput {\n"); + sb.append(" cronExpression: ").append(toIndentedString(cronExpression)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first + * line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("cron_expression"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + openapiRequiredFields.add("cron_expression"); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to FrequencyInput + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!FrequencyInput.openapiRequiredFields + .isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException( + String.format( + "The required field(s) %s in FrequencyInput is not found in the" + + " empty JSON string", + FrequencyInput.openapiRequiredFields.toString())); + } + } + + // check to make sure all required properties/fields are present in the JSON string + for (String requiredField : FrequencyInput.openapiRequiredFields) { + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException( + String.format( + "The required field `%s` is not found in the JSON string: %s", + requiredField, jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // validate the required field `cron_expression` + CronExpressionInput.validateJsonElement(jsonObj.get("cron_expression")); + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!FrequencyInput.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'FrequencyInput' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter = + gson.getDelegateAdapter(this, TypeToken.get(FrequencyInput.class)); + + return (TypeAdapter) + new TypeAdapter() { + @Override + public void write(JsonWriter out, FrequencyInput value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + obj.remove("additionalProperties"); + // serialize additional properties + if (value.getAdditionalProperties() != null) { + for (Map.Entry entry : + value.getAdditionalProperties().entrySet()) { + if (entry.getValue() instanceof String) + obj.addProperty(entry.getKey(), (String) entry.getValue()); + else if (entry.getValue() instanceof Number) + obj.addProperty(entry.getKey(), (Number) entry.getValue()); + else if (entry.getValue() instanceof Boolean) + obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); + else if (entry.getValue() instanceof Character) + obj.addProperty( + entry.getKey(), (Character) entry.getValue()); + else { + JsonElement jsonElement = gson.toJsonTree(entry.getValue()); + if (jsonElement.isJsonArray()) { + obj.add(entry.getKey(), jsonElement.getAsJsonArray()); + } else { + obj.add(entry.getKey(), jsonElement.getAsJsonObject()); + } + } + } + } + elementAdapter.write(out, obj); + } + + @Override + public FrequencyInput read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // store additional fields in the deserialized instance + FrequencyInput instance = thisAdapter.fromJsonTree(jsonObj); + for (Map.Entry entry : jsonObj.entrySet()) { + if (!openapiFields.contains(entry.getKey())) { + if (entry.getValue().isJsonPrimitive()) { // primitive type + if (entry.getValue().getAsJsonPrimitive().isString()) + instance.putAdditionalProperty( + entry.getKey(), entry.getValue().getAsString()); + else if (entry.getValue().getAsJsonPrimitive().isNumber()) + instance.putAdditionalProperty( + entry.getKey(), entry.getValue().getAsNumber()); + else if (entry.getValue().getAsJsonPrimitive().isBoolean()) + instance.putAdditionalProperty( + entry.getKey(), + entry.getValue().getAsBoolean()); + else + throw new IllegalArgumentException( + String.format( + "The field `%s` has unknown primitive" + + " type. Value: %s", + entry.getKey(), + entry.getValue().toString())); + } else if (entry.getValue().isJsonArray()) { + instance.putAdditionalProperty( + entry.getKey(), + gson.fromJson(entry.getValue(), List.class)); + } else { // JSON object + instance.putAdditionalProperty( + entry.getKey(), + gson.fromJson(entry.getValue(), HashMap.class)); + } + } + } + return instance; + } + }.nullSafe(); + } + } + + /** + * Create an instance of FrequencyInput given an JSON string + * + * @param jsonString JSON string + * @return An instance of FrequencyInput + * @throws IOException if the JSON string is invalid with respect to FrequencyInput + */ + public static FrequencyInput fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, FrequencyInput.class); + } + + /** + * Convert an instance of FrequencyInput to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} diff --git a/sdks/java/src/main/java/com/thoughtspot/client/model/GenerateCSVRequest.java b/sdks/java/src/main/java/com/thoughtspot/client/model/GenerateCSVRequest.java new file mode 100644 index 000000000..ea89b3fe7 --- /dev/null +++ b/sdks/java/src/main/java/com/thoughtspot/client/model/GenerateCSVRequest.java @@ -0,0 +1,735 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client.model; + +import com.google.gson.Gson; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.TypeAdapter; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.reflect.TypeToken; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import com.thoughtspot.client.JSON; +import java.io.IOException; +import java.io.Serializable; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Objects; + +/** GenerateCSVRequest */ +@javax.annotation.Generated( + value = "org.openapitools.codegen.languages.JavaClientCodegen", + comments = "Generator version: 7.12.0") +public class GenerateCSVRequest implements Serializable { + private static final long serialVersionUID = 1L; + + public static final String SERIALIZED_NAME_START_DATE = "start_date"; + + @SerializedName(SERIALIZED_NAME_START_DATE) + @javax.annotation.Nonnull + private String startDate; + + public static final String SERIALIZED_NAME_END_DATE = "end_date"; + + @SerializedName(SERIALIZED_NAME_END_DATE) + @javax.annotation.Nonnull + private String endDate; + + /** Type of the calendar. */ + @JsonAdapter(CalendarTypeEnum.Adapter.class) + public enum CalendarTypeEnum { + MONTH_OFFSET("MONTH_OFFSET"), + + FOUR_FOUR_FIVE("FOUR_FOUR_FIVE"), + + FOUR_FIVE_FOUR("FOUR_FIVE_FOUR"), + + FIVE_FOUR_FOUR("FIVE_FOUR_FOUR"); + + private String value; + + CalendarTypeEnum(String value) { + this.value = value; + } + + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + public static CalendarTypeEnum fromValue(String value) { + for (CalendarTypeEnum b : CalendarTypeEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + + public static class Adapter extends TypeAdapter { + @Override + public void write(final JsonWriter jsonWriter, final CalendarTypeEnum enumeration) + throws IOException { + jsonWriter.value(enumeration.getValue()); + } + + @Override + public CalendarTypeEnum read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + return CalendarTypeEnum.fromValue(value); + } + } + + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + String value = jsonElement.getAsString(); + CalendarTypeEnum.fromValue(value); + } + } + + public static final String SERIALIZED_NAME_CALENDAR_TYPE = "calendar_type"; + + @SerializedName(SERIALIZED_NAME_CALENDAR_TYPE) + @javax.annotation.Nullable + private CalendarTypeEnum calendarType = CalendarTypeEnum.MONTH_OFFSET; + + /** Month offset to start calendar from `January`. */ + @JsonAdapter(MonthOffsetEnum.Adapter.class) + public enum MonthOffsetEnum { + JANUARY("January"), + + FEBRUARY("February"), + + MARCH("March"), + + APRIL("April"), + + MAY("May"), + + JUNE("June"), + + JULY("July"), + + AUGUST("August"), + + SEPTEMBER("September"), + + OCTOBER("October"), + + NOVEMBER("November"), + + DECEMBER("December"); + + private String value; + + MonthOffsetEnum(String value) { + this.value = value; + } + + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + public static MonthOffsetEnum fromValue(String value) { + for (MonthOffsetEnum b : MonthOffsetEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + + public static class Adapter extends TypeAdapter { + @Override + public void write(final JsonWriter jsonWriter, final MonthOffsetEnum enumeration) + throws IOException { + jsonWriter.value(enumeration.getValue()); + } + + @Override + public MonthOffsetEnum read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + return MonthOffsetEnum.fromValue(value); + } + } + + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + String value = jsonElement.getAsString(); + MonthOffsetEnum.fromValue(value); + } + } + + public static final String SERIALIZED_NAME_MONTH_OFFSET = "month_offset"; + + @SerializedName(SERIALIZED_NAME_MONTH_OFFSET) + @javax.annotation.Nullable + private MonthOffsetEnum monthOffset = MonthOffsetEnum.JANUARY; + + /** Specify the starting day of the week. */ + @JsonAdapter(StartDayOfWeekEnum.Adapter.class) + public enum StartDayOfWeekEnum { + SUNDAY("Sunday"), + + MONDAY("Monday"), + + TUESDAY("Tuesday"), + + WEDNESDAY("Wednesday"), + + THURSDAY("Thursday"), + + FRIDAY("Friday"), + + SATURDAY("Saturday"); + + private String value; + + StartDayOfWeekEnum(String value) { + this.value = value; + } + + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + public static StartDayOfWeekEnum fromValue(String value) { + for (StartDayOfWeekEnum b : StartDayOfWeekEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + + public static class Adapter extends TypeAdapter { + @Override + public void write(final JsonWriter jsonWriter, final StartDayOfWeekEnum enumeration) + throws IOException { + jsonWriter.value(enumeration.getValue()); + } + + @Override + public StartDayOfWeekEnum read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + return StartDayOfWeekEnum.fromValue(value); + } + } + + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + String value = jsonElement.getAsString(); + StartDayOfWeekEnum.fromValue(value); + } + } + + public static final String SERIALIZED_NAME_START_DAY_OF_WEEK = "start_day_of_week"; + + @SerializedName(SERIALIZED_NAME_START_DAY_OF_WEEK) + @javax.annotation.Nullable + private StartDayOfWeekEnum startDayOfWeek = StartDayOfWeekEnum.SUNDAY; + + public static final String SERIALIZED_NAME_QUARTER_NAME_PREFIX = "quarter_name_prefix"; + + @SerializedName(SERIALIZED_NAME_QUARTER_NAME_PREFIX) + @javax.annotation.Nullable + private String quarterNamePrefix; + + public static final String SERIALIZED_NAME_YEAR_NAME_PREFIX = "year_name_prefix"; + + @SerializedName(SERIALIZED_NAME_YEAR_NAME_PREFIX) + @javax.annotation.Nullable + private String yearNamePrefix; + + public GenerateCSVRequest() {} + + public GenerateCSVRequest startDate(@javax.annotation.Nonnull String startDate) { + this.startDate = startDate; + return this; + } + + /** + * Start date for the calendar in `MM/dd/yyyy` format. + * + * @return startDate + */ + @javax.annotation.Nonnull + public String getStartDate() { + return startDate; + } + + public void setStartDate(@javax.annotation.Nonnull String startDate) { + this.startDate = startDate; + } + + public GenerateCSVRequest endDate(@javax.annotation.Nonnull String endDate) { + this.endDate = endDate; + return this; + } + + /** + * End date for the calendar in `MM/dd/yyyy` format. + * + * @return endDate + */ + @javax.annotation.Nonnull + public String getEndDate() { + return endDate; + } + + public void setEndDate(@javax.annotation.Nonnull String endDate) { + this.endDate = endDate; + } + + public GenerateCSVRequest calendarType( + @javax.annotation.Nullable CalendarTypeEnum calendarType) { + this.calendarType = calendarType; + return this; + } + + /** + * Type of the calendar. + * + * @return calendarType + */ + @javax.annotation.Nullable + public CalendarTypeEnum getCalendarType() { + return calendarType; + } + + public void setCalendarType(@javax.annotation.Nullable CalendarTypeEnum calendarType) { + this.calendarType = calendarType; + } + + public GenerateCSVRequest monthOffset(@javax.annotation.Nullable MonthOffsetEnum monthOffset) { + this.monthOffset = monthOffset; + return this; + } + + /** + * Month offset to start calendar from `January`. + * + * @return monthOffset + */ + @javax.annotation.Nullable + public MonthOffsetEnum getMonthOffset() { + return monthOffset; + } + + public void setMonthOffset(@javax.annotation.Nullable MonthOffsetEnum monthOffset) { + this.monthOffset = monthOffset; + } + + public GenerateCSVRequest startDayOfWeek( + @javax.annotation.Nullable StartDayOfWeekEnum startDayOfWeek) { + this.startDayOfWeek = startDayOfWeek; + return this; + } + + /** + * Specify the starting day of the week. + * + * @return startDayOfWeek + */ + @javax.annotation.Nullable + public StartDayOfWeekEnum getStartDayOfWeek() { + return startDayOfWeek; + } + + public void setStartDayOfWeek(@javax.annotation.Nullable StartDayOfWeekEnum startDayOfWeek) { + this.startDayOfWeek = startDayOfWeek; + } + + public GenerateCSVRequest quarterNamePrefix( + @javax.annotation.Nullable String quarterNamePrefix) { + this.quarterNamePrefix = quarterNamePrefix; + return this; + } + + /** + * Prefix to add before the quarter. + * + * @return quarterNamePrefix + */ + @javax.annotation.Nullable + public String getQuarterNamePrefix() { + return quarterNamePrefix; + } + + public void setQuarterNamePrefix(@javax.annotation.Nullable String quarterNamePrefix) { + this.quarterNamePrefix = quarterNamePrefix; + } + + public GenerateCSVRequest yearNamePrefix(@javax.annotation.Nullable String yearNamePrefix) { + this.yearNamePrefix = yearNamePrefix; + return this; + } + + /** + * Prefix to add before the year. + * + * @return yearNamePrefix + */ + @javax.annotation.Nullable + public String getYearNamePrefix() { + return yearNamePrefix; + } + + public void setYearNamePrefix(@javax.annotation.Nullable String yearNamePrefix) { + this.yearNamePrefix = yearNamePrefix; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key name of the property + * @param value value of the property + * @return the GenerateCSVRequest instance itself + */ + public GenerateCSVRequest putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return a map of objects + */ + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key name of the property + * @return an object + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + GenerateCSVRequest generateCSVRequest = (GenerateCSVRequest) o; + return Objects.equals(this.startDate, generateCSVRequest.startDate) + && Objects.equals(this.endDate, generateCSVRequest.endDate) + && Objects.equals(this.calendarType, generateCSVRequest.calendarType) + && Objects.equals(this.monthOffset, generateCSVRequest.monthOffset) + && Objects.equals(this.startDayOfWeek, generateCSVRequest.startDayOfWeek) + && Objects.equals(this.quarterNamePrefix, generateCSVRequest.quarterNamePrefix) + && Objects.equals(this.yearNamePrefix, generateCSVRequest.yearNamePrefix) + && Objects.equals( + this.additionalProperties, generateCSVRequest.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash( + startDate, + endDate, + calendarType, + monthOffset, + startDayOfWeek, + quarterNamePrefix, + yearNamePrefix, + additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class GenerateCSVRequest {\n"); + sb.append(" startDate: ").append(toIndentedString(startDate)).append("\n"); + sb.append(" endDate: ").append(toIndentedString(endDate)).append("\n"); + sb.append(" calendarType: ").append(toIndentedString(calendarType)).append("\n"); + sb.append(" monthOffset: ").append(toIndentedString(monthOffset)).append("\n"); + sb.append(" startDayOfWeek: ").append(toIndentedString(startDayOfWeek)).append("\n"); + sb.append(" quarterNamePrefix: ") + .append(toIndentedString(quarterNamePrefix)) + .append("\n"); + sb.append(" yearNamePrefix: ").append(toIndentedString(yearNamePrefix)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first + * line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("start_date"); + openapiFields.add("end_date"); + openapiFields.add("calendar_type"); + openapiFields.add("month_offset"); + openapiFields.add("start_day_of_week"); + openapiFields.add("quarter_name_prefix"); + openapiFields.add("year_name_prefix"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + openapiRequiredFields.add("start_date"); + openapiRequiredFields.add("end_date"); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to GenerateCSVRequest + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!GenerateCSVRequest.openapiRequiredFields + .isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException( + String.format( + "The required field(s) %s in GenerateCSVRequest is not found in" + + " the empty JSON string", + GenerateCSVRequest.openapiRequiredFields.toString())); + } + } + + // check to make sure all required properties/fields are present in the JSON string + for (String requiredField : GenerateCSVRequest.openapiRequiredFields) { + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException( + String.format( + "The required field `%s` is not found in the JSON string: %s", + requiredField, jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if (!jsonObj.get("start_date").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `start_date` to be a primitive type in the JSON" + + " string but got `%s`", + jsonObj.get("start_date").toString())); + } + if (!jsonObj.get("end_date").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `end_date` to be a primitive type in the JSON" + + " string but got `%s`", + jsonObj.get("end_date").toString())); + } + if ((jsonObj.get("calendar_type") != null && !jsonObj.get("calendar_type").isJsonNull()) + && !jsonObj.get("calendar_type").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `calendar_type` to be a primitive type in the JSON" + + " string but got `%s`", + jsonObj.get("calendar_type").toString())); + } + // validate the optional field `calendar_type` + if (jsonObj.get("calendar_type") != null && !jsonObj.get("calendar_type").isJsonNull()) { + CalendarTypeEnum.validateJsonElement(jsonObj.get("calendar_type")); + } + if ((jsonObj.get("month_offset") != null && !jsonObj.get("month_offset").isJsonNull()) + && !jsonObj.get("month_offset").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `month_offset` to be a primitive type in the JSON" + + " string but got `%s`", + jsonObj.get("month_offset").toString())); + } + // validate the optional field `month_offset` + if (jsonObj.get("month_offset") != null && !jsonObj.get("month_offset").isJsonNull()) { + MonthOffsetEnum.validateJsonElement(jsonObj.get("month_offset")); + } + if ((jsonObj.get("start_day_of_week") != null + && !jsonObj.get("start_day_of_week").isJsonNull()) + && !jsonObj.get("start_day_of_week").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `start_day_of_week` to be a primitive type in the" + + " JSON string but got `%s`", + jsonObj.get("start_day_of_week").toString())); + } + // validate the optional field `start_day_of_week` + if (jsonObj.get("start_day_of_week") != null + && !jsonObj.get("start_day_of_week").isJsonNull()) { + StartDayOfWeekEnum.validateJsonElement(jsonObj.get("start_day_of_week")); + } + if ((jsonObj.get("quarter_name_prefix") != null + && !jsonObj.get("quarter_name_prefix").isJsonNull()) + && !jsonObj.get("quarter_name_prefix").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `quarter_name_prefix` to be a primitive type in" + + " the JSON string but got `%s`", + jsonObj.get("quarter_name_prefix").toString())); + } + if ((jsonObj.get("year_name_prefix") != null + && !jsonObj.get("year_name_prefix").isJsonNull()) + && !jsonObj.get("year_name_prefix").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `year_name_prefix` to be a primitive type in the" + + " JSON string but got `%s`", + jsonObj.get("year_name_prefix").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!GenerateCSVRequest.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'GenerateCSVRequest' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter = + gson.getDelegateAdapter(this, TypeToken.get(GenerateCSVRequest.class)); + + return (TypeAdapter) + new TypeAdapter() { + @Override + public void write(JsonWriter out, GenerateCSVRequest value) + throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + obj.remove("additionalProperties"); + // serialize additional properties + if (value.getAdditionalProperties() != null) { + for (Map.Entry entry : + value.getAdditionalProperties().entrySet()) { + if (entry.getValue() instanceof String) + obj.addProperty(entry.getKey(), (String) entry.getValue()); + else if (entry.getValue() instanceof Number) + obj.addProperty(entry.getKey(), (Number) entry.getValue()); + else if (entry.getValue() instanceof Boolean) + obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); + else if (entry.getValue() instanceof Character) + obj.addProperty( + entry.getKey(), (Character) entry.getValue()); + else { + JsonElement jsonElement = gson.toJsonTree(entry.getValue()); + if (jsonElement.isJsonArray()) { + obj.add(entry.getKey(), jsonElement.getAsJsonArray()); + } else { + obj.add(entry.getKey(), jsonElement.getAsJsonObject()); + } + } + } + } + elementAdapter.write(out, obj); + } + + @Override + public GenerateCSVRequest read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // store additional fields in the deserialized instance + GenerateCSVRequest instance = thisAdapter.fromJsonTree(jsonObj); + for (Map.Entry entry : jsonObj.entrySet()) { + if (!openapiFields.contains(entry.getKey())) { + if (entry.getValue().isJsonPrimitive()) { // primitive type + if (entry.getValue().getAsJsonPrimitive().isString()) + instance.putAdditionalProperty( + entry.getKey(), entry.getValue().getAsString()); + else if (entry.getValue().getAsJsonPrimitive().isNumber()) + instance.putAdditionalProperty( + entry.getKey(), entry.getValue().getAsNumber()); + else if (entry.getValue().getAsJsonPrimitive().isBoolean()) + instance.putAdditionalProperty( + entry.getKey(), + entry.getValue().getAsBoolean()); + else + throw new IllegalArgumentException( + String.format( + "The field `%s` has unknown primitive" + + " type. Value: %s", + entry.getKey(), + entry.getValue().toString())); + } else if (entry.getValue().isJsonArray()) { + instance.putAdditionalProperty( + entry.getKey(), + gson.fromJson(entry.getValue(), List.class)); + } else { // JSON object + instance.putAdditionalProperty( + entry.getKey(), + gson.fromJson(entry.getValue(), HashMap.class)); + } + } + } + return instance; + } + }.nullSafe(); + } + } + + /** + * Create an instance of GenerateCSVRequest given an JSON string + * + * @param jsonString JSON string + * @return An instance of GenerateCSVRequest + * @throws IOException if the JSON string is invalid with respect to GenerateCSVRequest + */ + public static GenerateCSVRequest fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, GenerateCSVRequest.class); + } + + /** + * Convert an instance of GenerateCSVRequest to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} diff --git a/sdks/java/src/main/java/com/thoughtspot/client/model/GenericInfo.java b/sdks/java/src/main/java/com/thoughtspot/client/model/GenericInfo.java new file mode 100644 index 000000000..ad8f1d7c6 --- /dev/null +++ b/sdks/java/src/main/java/com/thoughtspot/client/model/GenericInfo.java @@ -0,0 +1,344 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client.model; + +import com.google.gson.Gson; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.TypeAdapter; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.annotations.SerializedName; +import com.google.gson.reflect.TypeToken; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import com.thoughtspot.client.JSON; +import java.io.IOException; +import java.io.Serializable; +import java.util.Arrays; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Objects; +import org.openapitools.jackson.nullable.JsonNullable; + +/** GenericInfo */ +@javax.annotation.Generated( + value = "org.openapitools.codegen.languages.JavaClientCodegen", + comments = "Generator version: 7.12.0") +public class GenericInfo implements Serializable { + private static final long serialVersionUID = 1L; + + public static final String SERIALIZED_NAME_ID = "id"; + + @SerializedName(SERIALIZED_NAME_ID) + @javax.annotation.Nullable + private String id; + + public static final String SERIALIZED_NAME_NAME = "name"; + + @SerializedName(SERIALIZED_NAME_NAME) + @javax.annotation.Nullable + private String name; + + public GenericInfo() {} + + public GenericInfo id(@javax.annotation.Nullable String id) { + this.id = id; + return this; + } + + /** + * Get id + * + * @return id + */ + @javax.annotation.Nullable + public String getId() { + return id; + } + + public void setId(@javax.annotation.Nullable String id) { + this.id = id; + } + + public GenericInfo name(@javax.annotation.Nullable String name) { + this.name = name; + return this; + } + + /** + * Get name + * + * @return name + */ + @javax.annotation.Nullable + public String getName() { + return name; + } + + public void setName(@javax.annotation.Nullable String name) { + this.name = name; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key name of the property + * @param value value of the property + * @return the GenericInfo instance itself + */ + public GenericInfo putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return a map of objects + */ + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key name of the property + * @return an object + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + GenericInfo genericInfo = (GenericInfo) o; + return Objects.equals(this.id, genericInfo.id) + && Objects.equals(this.name, genericInfo.name) + && Objects.equals(this.additionalProperties, genericInfo.additionalProperties); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b + || (a != null + && b != null + && a.isPresent() + && b.isPresent() + && Objects.deepEquals(a.get(), b.get())); + } + + @Override + public int hashCode() { + return Objects.hash(id, name, additionalProperties); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; + } + return a.isPresent() ? Arrays.deepHashCode(new Object[] {a.get()}) : 31; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class GenericInfo {\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first + * line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("id"); + openapiFields.add("name"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to GenericInfo + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!GenericInfo.openapiRequiredFields + .isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException( + String.format( + "The required field(s) %s in GenericInfo is not found in the empty" + + " JSON string", + GenericInfo.openapiRequiredFields.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if ((jsonObj.get("id") != null && !jsonObj.get("id").isJsonNull()) + && !jsonObj.get("id").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `id` to be a primitive type in the JSON string but" + + " got `%s`", + jsonObj.get("id").toString())); + } + if ((jsonObj.get("name") != null && !jsonObj.get("name").isJsonNull()) + && !jsonObj.get("name").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `name` to be a primitive type in the JSON string" + + " but got `%s`", + jsonObj.get("name").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!GenericInfo.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'GenericInfo' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter = + gson.getDelegateAdapter(this, TypeToken.get(GenericInfo.class)); + + return (TypeAdapter) + new TypeAdapter() { + @Override + public void write(JsonWriter out, GenericInfo value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + obj.remove("additionalProperties"); + // serialize additional properties + if (value.getAdditionalProperties() != null) { + for (Map.Entry entry : + value.getAdditionalProperties().entrySet()) { + if (entry.getValue() instanceof String) + obj.addProperty(entry.getKey(), (String) entry.getValue()); + else if (entry.getValue() instanceof Number) + obj.addProperty(entry.getKey(), (Number) entry.getValue()); + else if (entry.getValue() instanceof Boolean) + obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); + else if (entry.getValue() instanceof Character) + obj.addProperty( + entry.getKey(), (Character) entry.getValue()); + else { + JsonElement jsonElement = gson.toJsonTree(entry.getValue()); + if (jsonElement.isJsonArray()) { + obj.add(entry.getKey(), jsonElement.getAsJsonArray()); + } else { + obj.add(entry.getKey(), jsonElement.getAsJsonObject()); + } + } + } + } + elementAdapter.write(out, obj); + } + + @Override + public GenericInfo read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // store additional fields in the deserialized instance + GenericInfo instance = thisAdapter.fromJsonTree(jsonObj); + for (Map.Entry entry : jsonObj.entrySet()) { + if (!openapiFields.contains(entry.getKey())) { + if (entry.getValue().isJsonPrimitive()) { // primitive type + if (entry.getValue().getAsJsonPrimitive().isString()) + instance.putAdditionalProperty( + entry.getKey(), entry.getValue().getAsString()); + else if (entry.getValue().getAsJsonPrimitive().isNumber()) + instance.putAdditionalProperty( + entry.getKey(), entry.getValue().getAsNumber()); + else if (entry.getValue().getAsJsonPrimitive().isBoolean()) + instance.putAdditionalProperty( + entry.getKey(), + entry.getValue().getAsBoolean()); + else + throw new IllegalArgumentException( + String.format( + "The field `%s` has unknown primitive" + + " type. Value: %s", + entry.getKey(), + entry.getValue().toString())); + } else if (entry.getValue().isJsonArray()) { + instance.putAdditionalProperty( + entry.getKey(), + gson.fromJson(entry.getValue(), List.class)); + } else { // JSON object + instance.putAdditionalProperty( + entry.getKey(), + gson.fromJson(entry.getValue(), HashMap.class)); + } + } + } + return instance; + } + }.nullSafe(); + } + } + + /** + * Create an instance of GenericInfo given an JSON string + * + * @param jsonString JSON string + * @return An instance of GenericInfo + * @throws IOException if the JSON string is invalid with respect to GenericInfo + */ + public static GenericInfo fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, GenericInfo.class); + } + + /** + * Convert an instance of GenericInfo to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} diff --git a/sdks/java/src/main/java/com/thoughtspot/client/model/GetAsyncImportStatusResponse.java b/sdks/java/src/main/java/com/thoughtspot/client/model/GetAsyncImportStatusResponse.java new file mode 100644 index 000000000..5ef251667 --- /dev/null +++ b/sdks/java/src/main/java/com/thoughtspot/client/model/GetAsyncImportStatusResponse.java @@ -0,0 +1,369 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client.model; + +import com.google.gson.Gson; +import com.google.gson.JsonArray; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.TypeAdapter; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.annotations.SerializedName; +import com.google.gson.reflect.TypeToken; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import com.thoughtspot.client.JSON; +import java.io.IOException; +import java.io.Serializable; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Objects; +import org.openapitools.jackson.nullable.JsonNullable; + +/** GetAsyncImportStatusResponse */ +@javax.annotation.Generated( + value = "org.openapitools.codegen.languages.JavaClientCodegen", + comments = "Generator version: 7.12.0") +public class GetAsyncImportStatusResponse implements Serializable { + private static final long serialVersionUID = 1L; + + public static final String SERIALIZED_NAME_STATUS_LIST = "status_list"; + + @SerializedName(SERIALIZED_NAME_STATUS_LIST) + @javax.annotation.Nullable + private List statusList; + + public static final String SERIALIZED_NAME_LAST_BATCH = "last_batch"; + + @SerializedName(SERIALIZED_NAME_LAST_BATCH) + @javax.annotation.Nullable + private Boolean lastBatch; + + public GetAsyncImportStatusResponse() {} + + public GetAsyncImportStatusResponse statusList( + @javax.annotation.Nullable List statusList) { + this.statusList = statusList; + return this; + } + + public GetAsyncImportStatusResponse addStatusListItem( + ImportEPackAsyncTaskStatus statusListItem) { + if (this.statusList == null) { + this.statusList = new ArrayList<>(); + } + this.statusList.add(statusListItem); + return this; + } + + /** + * List of task statuses. + * + * @return statusList + */ + @javax.annotation.Nullable + public List getStatusList() { + return statusList; + } + + public void setStatusList( + @javax.annotation.Nullable List statusList) { + this.statusList = statusList; + } + + public GetAsyncImportStatusResponse lastBatch(@javax.annotation.Nullable Boolean lastBatch) { + this.lastBatch = lastBatch; + return this; + } + + /** + * Indicates whether there are more task statuses to fetch. + * + * @return lastBatch + */ + @javax.annotation.Nullable + public Boolean getLastBatch() { + return lastBatch; + } + + public void setLastBatch(@javax.annotation.Nullable Boolean lastBatch) { + this.lastBatch = lastBatch; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key name of the property + * @param value value of the property + * @return the GetAsyncImportStatusResponse instance itself + */ + public GetAsyncImportStatusResponse putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return a map of objects + */ + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key name of the property + * @return an object + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + GetAsyncImportStatusResponse getAsyncImportStatusResponse = + (GetAsyncImportStatusResponse) o; + return Objects.equals(this.statusList, getAsyncImportStatusResponse.statusList) + && Objects.equals(this.lastBatch, getAsyncImportStatusResponse.lastBatch) + && Objects.equals( + this.additionalProperties, + getAsyncImportStatusResponse.additionalProperties); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b + || (a != null + && b != null + && a.isPresent() + && b.isPresent() + && Objects.deepEquals(a.get(), b.get())); + } + + @Override + public int hashCode() { + return Objects.hash(statusList, lastBatch, additionalProperties); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; + } + return a.isPresent() ? Arrays.deepHashCode(new Object[] {a.get()}) : 31; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class GetAsyncImportStatusResponse {\n"); + sb.append(" statusList: ").append(toIndentedString(statusList)).append("\n"); + sb.append(" lastBatch: ").append(toIndentedString(lastBatch)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first + * line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("status_list"); + openapiFields.add("last_batch"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to + * GetAsyncImportStatusResponse + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!GetAsyncImportStatusResponse.openapiRequiredFields + .isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException( + String.format( + "The required field(s) %s in GetAsyncImportStatusResponse is not" + + " found in the empty JSON string", + GetAsyncImportStatusResponse.openapiRequiredFields.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if (jsonObj.get("status_list") != null && !jsonObj.get("status_list").isJsonNull()) { + JsonArray jsonArraystatusList = jsonObj.getAsJsonArray("status_list"); + if (jsonArraystatusList != null) { + // ensure the json data is an array + if (!jsonObj.get("status_list").isJsonArray()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `status_list` to be an array in the JSON" + + " string but got `%s`", + jsonObj.get("status_list").toString())); + } + + // validate the optional field `status_list` (array) + for (int i = 0; i < jsonArraystatusList.size(); i++) { + ImportEPackAsyncTaskStatus.validateJsonElement(jsonArraystatusList.get(i)); + } + ; + } + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!GetAsyncImportStatusResponse.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'GetAsyncImportStatusResponse' and its + // subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter = + gson.getDelegateAdapter( + this, TypeToken.get(GetAsyncImportStatusResponse.class)); + + return (TypeAdapter) + new TypeAdapter() { + @Override + public void write(JsonWriter out, GetAsyncImportStatusResponse value) + throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + obj.remove("additionalProperties"); + // serialize additional properties + if (value.getAdditionalProperties() != null) { + for (Map.Entry entry : + value.getAdditionalProperties().entrySet()) { + if (entry.getValue() instanceof String) + obj.addProperty(entry.getKey(), (String) entry.getValue()); + else if (entry.getValue() instanceof Number) + obj.addProperty(entry.getKey(), (Number) entry.getValue()); + else if (entry.getValue() instanceof Boolean) + obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); + else if (entry.getValue() instanceof Character) + obj.addProperty( + entry.getKey(), (Character) entry.getValue()); + else { + JsonElement jsonElement = gson.toJsonTree(entry.getValue()); + if (jsonElement.isJsonArray()) { + obj.add(entry.getKey(), jsonElement.getAsJsonArray()); + } else { + obj.add(entry.getKey(), jsonElement.getAsJsonObject()); + } + } + } + } + elementAdapter.write(out, obj); + } + + @Override + public GetAsyncImportStatusResponse read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // store additional fields in the deserialized instance + GetAsyncImportStatusResponse instance = + thisAdapter.fromJsonTree(jsonObj); + for (Map.Entry entry : jsonObj.entrySet()) { + if (!openapiFields.contains(entry.getKey())) { + if (entry.getValue().isJsonPrimitive()) { // primitive type + if (entry.getValue().getAsJsonPrimitive().isString()) + instance.putAdditionalProperty( + entry.getKey(), entry.getValue().getAsString()); + else if (entry.getValue().getAsJsonPrimitive().isNumber()) + instance.putAdditionalProperty( + entry.getKey(), entry.getValue().getAsNumber()); + else if (entry.getValue().getAsJsonPrimitive().isBoolean()) + instance.putAdditionalProperty( + entry.getKey(), + entry.getValue().getAsBoolean()); + else + throw new IllegalArgumentException( + String.format( + "The field `%s` has unknown primitive" + + " type. Value: %s", + entry.getKey(), + entry.getValue().toString())); + } else if (entry.getValue().isJsonArray()) { + instance.putAdditionalProperty( + entry.getKey(), + gson.fromJson(entry.getValue(), List.class)); + } else { // JSON object + instance.putAdditionalProperty( + entry.getKey(), + gson.fromJson(entry.getValue(), HashMap.class)); + } + } + } + return instance; + } + }.nullSafe(); + } + } + + /** + * Create an instance of GetAsyncImportStatusResponse given an JSON string + * + * @param jsonString JSON string + * @return An instance of GetAsyncImportStatusResponse + * @throws IOException if the JSON string is invalid with respect to + * GetAsyncImportStatusResponse + */ + public static GetAsyncImportStatusResponse fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, GetAsyncImportStatusResponse.class); + } + + /** + * Convert an instance of GetAsyncImportStatusResponse to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} diff --git a/sdks/java/src/main/java/com/thoughtspot/client/model/GetCustomAccessTokenRequest.java b/sdks/java/src/main/java/com/thoughtspot/client/model/GetCustomAccessTokenRequest.java new file mode 100644 index 000000000..52adb51f4 --- /dev/null +++ b/sdks/java/src/main/java/com/thoughtspot/client/model/GetCustomAccessTokenRequest.java @@ -0,0 +1,980 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client.model; + +import com.google.gson.Gson; +import com.google.gson.JsonArray; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.TypeAdapter; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.reflect.TypeToken; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import com.thoughtspot.client.JSON; +import java.io.IOException; +import java.io.Serializable; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Objects; +import org.openapitools.jackson.nullable.JsonNullable; + +/** GetCustomAccessTokenRequest */ +@javax.annotation.Generated( + value = "org.openapitools.codegen.languages.JavaClientCodegen", + comments = "Generator version: 7.12.0") +public class GetCustomAccessTokenRequest implements Serializable { + private static final long serialVersionUID = 1L; + + public static final String SERIALIZED_NAME_USERNAME = "username"; + + @SerializedName(SERIALIZED_NAME_USERNAME) + @javax.annotation.Nonnull + private String username; + + public static final String SERIALIZED_NAME_PASSWORD = "password"; + + @SerializedName(SERIALIZED_NAME_PASSWORD) + @javax.annotation.Nullable + private String password = ""; + + public static final String SERIALIZED_NAME_SECRET_KEY = "secret_key"; + + @SerializedName(SERIALIZED_NAME_SECRET_KEY) + @javax.annotation.Nullable + private String secretKey = ""; + + public static final String SERIALIZED_NAME_VALIDITY_TIME_IN_SEC = "validity_time_in_sec"; + + @SerializedName(SERIALIZED_NAME_VALIDITY_TIME_IN_SEC) + @javax.annotation.Nullable + private Integer validityTimeInSec = 300; + + public static final String SERIALIZED_NAME_ORG_IDENTIFIER = "org_identifier"; + + @SerializedName(SERIALIZED_NAME_ORG_IDENTIFIER) + @javax.annotation.Nullable + private String orgIdentifier; + + /** + * Indicates whether the specified attributes should be persisted or not. RESET and NONE are not + * applicable if you are setting variable_values. + */ + @JsonAdapter(PersistOptionEnum.Adapter.class) + public enum PersistOptionEnum { + REPLACE("REPLACE"), + + APPEND("APPEND"), + + NONE("NONE"), + + RESET("RESET"); + + private String value; + + PersistOptionEnum(String value) { + this.value = value; + } + + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + public static PersistOptionEnum fromValue(String value) { + for (PersistOptionEnum b : PersistOptionEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + + public static class Adapter extends TypeAdapter { + @Override + public void write(final JsonWriter jsonWriter, final PersistOptionEnum enumeration) + throws IOException { + jsonWriter.value(enumeration.getValue()); + } + + @Override + public PersistOptionEnum read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + return PersistOptionEnum.fromValue(value); + } + } + + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + String value = jsonElement.getAsString(); + PersistOptionEnum.fromValue(value); + } + } + + public static final String SERIALIZED_NAME_PERSIST_OPTION = "persist_option"; + + @SerializedName(SERIALIZED_NAME_PERSIST_OPTION) + @javax.annotation.Nonnull + private PersistOptionEnum persistOption; + + public static final String SERIALIZED_NAME_FILTER_RULES = "filter_rules"; + + @SerializedName(SERIALIZED_NAME_FILTER_RULES) + @javax.annotation.Nullable + private List filterRules; + + public static final String SERIALIZED_NAME_PARAMETER_VALUES = "parameter_values"; + + @SerializedName(SERIALIZED_NAME_PARAMETER_VALUES) + @javax.annotation.Nullable + private List parameterValues; + + public static final String SERIALIZED_NAME_VARIABLE_VALUES = "variable_values"; + + @SerializedName(SERIALIZED_NAME_VARIABLE_VALUES) + @javax.annotation.Nullable + private List variableValues; + + public static final String SERIALIZED_NAME_OBJECTS = "objects"; + + @SerializedName(SERIALIZED_NAME_OBJECTS) + @javax.annotation.Nullable + private List objects; + + public static final String SERIALIZED_NAME_EMAIL = "email"; + + @SerializedName(SERIALIZED_NAME_EMAIL) + @javax.annotation.Nullable + private String email; + + public static final String SERIALIZED_NAME_DISPLAY_NAME = "display_name"; + + @SerializedName(SERIALIZED_NAME_DISPLAY_NAME) + @javax.annotation.Nullable + private String displayName; + + public static final String SERIALIZED_NAME_GROUPS = "groups"; + + @SerializedName(SERIALIZED_NAME_GROUPS) + @javax.annotation.Nullable + private List groups; + + public static final String SERIALIZED_NAME_AUTO_CREATE = "auto_create"; + + @SerializedName(SERIALIZED_NAME_AUTO_CREATE) + @javax.annotation.Nullable + private Boolean autoCreate = true; + + public GetCustomAccessTokenRequest() {} + + public GetCustomAccessTokenRequest username(@javax.annotation.Nonnull String username) { + this.username = username; + return this; + } + + /** + * Username of the ThoughtSpot user. The username is stored in the `name` attribute of + * the user object. + * + * @return username + */ + @javax.annotation.Nonnull + public String getUsername() { + return username; + } + + public void setUsername(@javax.annotation.Nonnull String username) { + this.username = username; + } + + public GetCustomAccessTokenRequest password(@javax.annotation.Nullable String password) { + this.password = password; + return this; + } + + /** + * Password of the user account + * + * @return password + */ + @javax.annotation.Nullable + public String getPassword() { + return password; + } + + public void setPassword(@javax.annotation.Nullable String password) { + this.password = password; + } + + public GetCustomAccessTokenRequest secretKey(@javax.annotation.Nullable String secretKey) { + this.secretKey = secretKey; + return this; + } + + /** + * The secret key string provided by the ThoughtSpot application server. ThoughtSpot generates a + * secret key when Trusted authentication is enabled. + * + * @return secretKey + */ + @javax.annotation.Nullable + public String getSecretKey() { + return secretKey; + } + + public void setSecretKey(@javax.annotation.Nullable String secretKey) { + this.secretKey = secretKey; + } + + public GetCustomAccessTokenRequest validityTimeInSec( + @javax.annotation.Nullable Integer validityTimeInSec) { + this.validityTimeInSec = validityTimeInSec; + return this; + } + + /** + * Token validity duration in seconds + * + * @return validityTimeInSec + */ + @javax.annotation.Nullable + public Integer getValidityTimeInSec() { + return validityTimeInSec; + } + + public void setValidityTimeInSec(@javax.annotation.Nullable Integer validityTimeInSec) { + this.validityTimeInSec = validityTimeInSec; + } + + public GetCustomAccessTokenRequest orgIdentifier( + @javax.annotation.Nullable String orgIdentifier) { + this.orgIdentifier = orgIdentifier; + return this; + } + + /** + * ID or name of the Org context to log in to. If the Org ID or name is not specified but a + * secret key is provided, the user will be logged into the Org associated with the secret key. + * If neither the Org ID/name nor the secret key is provided, the user will be logged into the + * Org context from their previous login session. + * + * @return orgIdentifier + */ + @javax.annotation.Nullable + public String getOrgIdentifier() { + return orgIdentifier; + } + + public void setOrgIdentifier(@javax.annotation.Nullable String orgIdentifier) { + this.orgIdentifier = orgIdentifier; + } + + public GetCustomAccessTokenRequest persistOption( + @javax.annotation.Nonnull PersistOptionEnum persistOption) { + this.persistOption = persistOption; + return this; + } + + /** + * Indicates whether the specified attributes should be persisted or not. RESET and NONE are not + * applicable if you are setting variable_values. + * + * @return persistOption + */ + @javax.annotation.Nonnull + public PersistOptionEnum getPersistOption() { + return persistOption; + } + + public void setPersistOption(@javax.annotation.Nonnull PersistOptionEnum persistOption) { + this.persistOption = persistOption; + } + + public GetCustomAccessTokenRequest filterRules( + @javax.annotation.Nullable List filterRules) { + this.filterRules = filterRules; + return this; + } + + public GetCustomAccessTokenRequest addFilterRulesItem(FilterRules filterRulesItem) { + if (this.filterRules == null) { + this.filterRules = new ArrayList<>(); + } + this.filterRules.add(filterRulesItem); + return this; + } + + /** + * Filter rules. + * + * @return filterRules + */ + @javax.annotation.Nullable + public List getFilterRules() { + return filterRules; + } + + public void setFilterRules(@javax.annotation.Nullable List filterRules) { + this.filterRules = filterRules; + } + + public GetCustomAccessTokenRequest parameterValues( + @javax.annotation.Nullable List parameterValues) { + this.parameterValues = parameterValues; + return this; + } + + public GetCustomAccessTokenRequest addParameterValuesItem(ParameterValues parameterValuesItem) { + if (this.parameterValues == null) { + this.parameterValues = new ArrayList<>(); + } + this.parameterValues.add(parameterValuesItem); + return this; + } + + /** + * Allows developers to assign parameter values for existing parameters to a user at login. + * Note: Using parameter values for row level security use cases will ultimately be deprecated. + * Developers can still pass data security values via the Custom Access token via the + * variable_values field and create RLS rules based on custom variables. Please refer to the + * [ABAC via RLS documentation](https://developers.thoughtspot.com/docs/abac-user-parameters) + * for more details. + * + * @return parameterValues + */ + @javax.annotation.Nullable + public List getParameterValues() { + return parameterValues; + } + + public void setParameterValues( + @javax.annotation.Nullable List parameterValues) { + this.parameterValues = parameterValues; + } + + public GetCustomAccessTokenRequest variableValues( + @javax.annotation.Nullable List variableValues) { + this.variableValues = variableValues; + return this; + } + + public GetCustomAccessTokenRequest addVariableValuesItem(VariableValues variableValuesItem) { + if (this.variableValues == null) { + this.variableValues = new ArrayList<>(); + } + this.variableValues.add(variableValuesItem); + return this; + } + + /** + * List of variable values where `name` references an existing formula variable and + * `values` is any value from the corresponding column. Version: 10.14.0.cl or later + * + * @return variableValues + */ + @javax.annotation.Nullable + public List getVariableValues() { + return variableValues; + } + + public void setVariableValues(@javax.annotation.Nullable List variableValues) { + this.variableValues = variableValues; + } + + public GetCustomAccessTokenRequest objects( + @javax.annotation.Nullable List objects) { + this.objects = objects; + return this; + } + + public GetCustomAccessTokenRequest addObjectsItem(TokenAccessScopeObject objectsItem) { + if (this.objects == null) { + this.objects = new ArrayList<>(); + } + this.objects.add(objectsItem); + return this; + } + + /** + * Objects on which the parameter and variable values should be applied to + * + * @return objects + */ + @javax.annotation.Nullable + public List getObjects() { + return objects; + } + + public void setObjects(@javax.annotation.Nullable List objects) { + this.objects = objects; + } + + public GetCustomAccessTokenRequest email(@javax.annotation.Nullable String email) { + this.email = email; + return this; + } + + /** + * (just-in-time (JIT) provisioning)Email address of the user. Specify this attribute when + * creating a new user. + * + * @return email + */ + @javax.annotation.Nullable + public String getEmail() { + return email; + } + + public void setEmail(@javax.annotation.Nullable String email) { + this.email = email; + } + + public GetCustomAccessTokenRequest displayName(@javax.annotation.Nullable String displayName) { + this.displayName = displayName; + return this; + } + + /** + * (just-in-time (JIT) provisioning) Indicates display name of the user. Specify this attribute + * when creating a new user. + * + * @return displayName + */ + @javax.annotation.Nullable + public String getDisplayName() { + return displayName; + } + + public void setDisplayName(@javax.annotation.Nullable String displayName) { + this.displayName = displayName; + } + + public GetCustomAccessTokenRequest groups(@javax.annotation.Nullable List groups) { + this.groups = groups; + return this; + } + + public GetCustomAccessTokenRequest addGroupsItem(GroupObject groupsItem) { + if (this.groups == null) { + this.groups = new ArrayList<>(); + } + this.groups.add(groupsItem); + return this; + } + + /** + * (just-in-time (JIT) provisioning) ID or name of the groups to which the newly created user + * belongs. Specify this attribute when creating a new user. + * + * @return groups + */ + @javax.annotation.Nullable + public List getGroups() { + return groups; + } + + public void setGroups(@javax.annotation.Nullable List groups) { + this.groups = groups; + } + + public GetCustomAccessTokenRequest autoCreate(@javax.annotation.Nullable Boolean autoCreate) { + this.autoCreate = autoCreate; + return this; + } + + /** + * Creates a new user if the specified username does not exist in ThoughtSpot. To provision a + * user just-in-time (JIT), set this attribute to true. Note: For JIT provisioning of a user, + * the secret_key is required. New formula variables won't be created. Version: 10.5.0.cl or + * later + * + * @return autoCreate + */ + @javax.annotation.Nullable + public Boolean getAutoCreate() { + return autoCreate; + } + + public void setAutoCreate(@javax.annotation.Nullable Boolean autoCreate) { + this.autoCreate = autoCreate; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key name of the property + * @param value value of the property + * @return the GetCustomAccessTokenRequest instance itself + */ + public GetCustomAccessTokenRequest putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return a map of objects + */ + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key name of the property + * @return an object + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + GetCustomAccessTokenRequest getCustomAccessTokenRequest = (GetCustomAccessTokenRequest) o; + return Objects.equals(this.username, getCustomAccessTokenRequest.username) + && Objects.equals(this.password, getCustomAccessTokenRequest.password) + && Objects.equals(this.secretKey, getCustomAccessTokenRequest.secretKey) + && Objects.equals( + this.validityTimeInSec, getCustomAccessTokenRequest.validityTimeInSec) + && Objects.equals(this.orgIdentifier, getCustomAccessTokenRequest.orgIdentifier) + && Objects.equals(this.persistOption, getCustomAccessTokenRequest.persistOption) + && Objects.equals(this.filterRules, getCustomAccessTokenRequest.filterRules) + && Objects.equals(this.parameterValues, getCustomAccessTokenRequest.parameterValues) + && Objects.equals(this.variableValues, getCustomAccessTokenRequest.variableValues) + && Objects.equals(this.objects, getCustomAccessTokenRequest.objects) + && Objects.equals(this.email, getCustomAccessTokenRequest.email) + && Objects.equals(this.displayName, getCustomAccessTokenRequest.displayName) + && Objects.equals(this.groups, getCustomAccessTokenRequest.groups) + && Objects.equals(this.autoCreate, getCustomAccessTokenRequest.autoCreate) + && Objects.equals( + this.additionalProperties, + getCustomAccessTokenRequest.additionalProperties); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b + || (a != null + && b != null + && a.isPresent() + && b.isPresent() + && Objects.deepEquals(a.get(), b.get())); + } + + @Override + public int hashCode() { + return Objects.hash( + username, + password, + secretKey, + validityTimeInSec, + orgIdentifier, + persistOption, + filterRules, + parameterValues, + variableValues, + objects, + email, + displayName, + groups, + autoCreate, + additionalProperties); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; + } + return a.isPresent() ? Arrays.deepHashCode(new Object[] {a.get()}) : 31; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class GetCustomAccessTokenRequest {\n"); + sb.append(" username: ").append(toIndentedString(username)).append("\n"); + sb.append(" password: ").append(toIndentedString(password)).append("\n"); + sb.append(" secretKey: ").append(toIndentedString(secretKey)).append("\n"); + sb.append(" validityTimeInSec: ") + .append(toIndentedString(validityTimeInSec)) + .append("\n"); + sb.append(" orgIdentifier: ").append(toIndentedString(orgIdentifier)).append("\n"); + sb.append(" persistOption: ").append(toIndentedString(persistOption)).append("\n"); + sb.append(" filterRules: ").append(toIndentedString(filterRules)).append("\n"); + sb.append(" parameterValues: ").append(toIndentedString(parameterValues)).append("\n"); + sb.append(" variableValues: ").append(toIndentedString(variableValues)).append("\n"); + sb.append(" objects: ").append(toIndentedString(objects)).append("\n"); + sb.append(" email: ").append(toIndentedString(email)).append("\n"); + sb.append(" displayName: ").append(toIndentedString(displayName)).append("\n"); + sb.append(" groups: ").append(toIndentedString(groups)).append("\n"); + sb.append(" autoCreate: ").append(toIndentedString(autoCreate)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first + * line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("username"); + openapiFields.add("password"); + openapiFields.add("secret_key"); + openapiFields.add("validity_time_in_sec"); + openapiFields.add("org_identifier"); + openapiFields.add("persist_option"); + openapiFields.add("filter_rules"); + openapiFields.add("parameter_values"); + openapiFields.add("variable_values"); + openapiFields.add("objects"); + openapiFields.add("email"); + openapiFields.add("display_name"); + openapiFields.add("groups"); + openapiFields.add("auto_create"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + openapiRequiredFields.add("username"); + openapiRequiredFields.add("persist_option"); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to + * GetCustomAccessTokenRequest + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!GetCustomAccessTokenRequest.openapiRequiredFields + .isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException( + String.format( + "The required field(s) %s in GetCustomAccessTokenRequest is not" + + " found in the empty JSON string", + GetCustomAccessTokenRequest.openapiRequiredFields.toString())); + } + } + + // check to make sure all required properties/fields are present in the JSON string + for (String requiredField : GetCustomAccessTokenRequest.openapiRequiredFields) { + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException( + String.format( + "The required field `%s` is not found in the JSON string: %s", + requiredField, jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if (!jsonObj.get("username").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `username` to be a primitive type in the JSON" + + " string but got `%s`", + jsonObj.get("username").toString())); + } + if ((jsonObj.get("password") != null && !jsonObj.get("password").isJsonNull()) + && !jsonObj.get("password").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `password` to be a primitive type in the JSON" + + " string but got `%s`", + jsonObj.get("password").toString())); + } + if ((jsonObj.get("secret_key") != null && !jsonObj.get("secret_key").isJsonNull()) + && !jsonObj.get("secret_key").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `secret_key` to be a primitive type in the JSON" + + " string but got `%s`", + jsonObj.get("secret_key").toString())); + } + if ((jsonObj.get("org_identifier") != null && !jsonObj.get("org_identifier").isJsonNull()) + && !jsonObj.get("org_identifier").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `org_identifier` to be a primitive type in the" + + " JSON string but got `%s`", + jsonObj.get("org_identifier").toString())); + } + if (!jsonObj.get("persist_option").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `persist_option` to be a primitive type in the" + + " JSON string but got `%s`", + jsonObj.get("persist_option").toString())); + } + // validate the required field `persist_option` + PersistOptionEnum.validateJsonElement(jsonObj.get("persist_option")); + if (jsonObj.get("filter_rules") != null && !jsonObj.get("filter_rules").isJsonNull()) { + JsonArray jsonArrayfilterRules = jsonObj.getAsJsonArray("filter_rules"); + if (jsonArrayfilterRules != null) { + // ensure the json data is an array + if (!jsonObj.get("filter_rules").isJsonArray()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `filter_rules` to be an array in the JSON" + + " string but got `%s`", + jsonObj.get("filter_rules").toString())); + } + + // validate the optional field `filter_rules` (array) + for (int i = 0; i < jsonArrayfilterRules.size(); i++) { + FilterRules.validateJsonElement(jsonArrayfilterRules.get(i)); + } + ; + } + } + if (jsonObj.get("parameter_values") != null + && !jsonObj.get("parameter_values").isJsonNull()) { + JsonArray jsonArrayparameterValues = jsonObj.getAsJsonArray("parameter_values"); + if (jsonArrayparameterValues != null) { + // ensure the json data is an array + if (!jsonObj.get("parameter_values").isJsonArray()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `parameter_values` to be an array in the" + + " JSON string but got `%s`", + jsonObj.get("parameter_values").toString())); + } + + // validate the optional field `parameter_values` (array) + for (int i = 0; i < jsonArrayparameterValues.size(); i++) { + ParameterValues.validateJsonElement(jsonArrayparameterValues.get(i)); + } + ; + } + } + if (jsonObj.get("variable_values") != null + && !jsonObj.get("variable_values").isJsonNull()) { + JsonArray jsonArrayvariableValues = jsonObj.getAsJsonArray("variable_values"); + if (jsonArrayvariableValues != null) { + // ensure the json data is an array + if (!jsonObj.get("variable_values").isJsonArray()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `variable_values` to be an array in the" + + " JSON string but got `%s`", + jsonObj.get("variable_values").toString())); + } + + // validate the optional field `variable_values` (array) + for (int i = 0; i < jsonArrayvariableValues.size(); i++) { + VariableValues.validateJsonElement(jsonArrayvariableValues.get(i)); + } + ; + } + } + if (jsonObj.get("objects") != null && !jsonObj.get("objects").isJsonNull()) { + JsonArray jsonArrayobjects = jsonObj.getAsJsonArray("objects"); + if (jsonArrayobjects != null) { + // ensure the json data is an array + if (!jsonObj.get("objects").isJsonArray()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `objects` to be an array in the JSON" + + " string but got `%s`", + jsonObj.get("objects").toString())); + } + + // validate the optional field `objects` (array) + for (int i = 0; i < jsonArrayobjects.size(); i++) { + TokenAccessScopeObject.validateJsonElement(jsonArrayobjects.get(i)); + } + ; + } + } + if ((jsonObj.get("email") != null && !jsonObj.get("email").isJsonNull()) + && !jsonObj.get("email").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `email` to be a primitive type in the JSON string" + + " but got `%s`", + jsonObj.get("email").toString())); + } + if ((jsonObj.get("display_name") != null && !jsonObj.get("display_name").isJsonNull()) + && !jsonObj.get("display_name").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `display_name` to be a primitive type in the JSON" + + " string but got `%s`", + jsonObj.get("display_name").toString())); + } + if (jsonObj.get("groups") != null && !jsonObj.get("groups").isJsonNull()) { + JsonArray jsonArraygroups = jsonObj.getAsJsonArray("groups"); + if (jsonArraygroups != null) { + // ensure the json data is an array + if (!jsonObj.get("groups").isJsonArray()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `groups` to be an array in the JSON string" + + " but got `%s`", + jsonObj.get("groups").toString())); + } + + // validate the optional field `groups` (array) + for (int i = 0; i < jsonArraygroups.size(); i++) { + GroupObject.validateJsonElement(jsonArraygroups.get(i)); + } + ; + } + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!GetCustomAccessTokenRequest.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'GetCustomAccessTokenRequest' and its + // subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter = + gson.getDelegateAdapter(this, TypeToken.get(GetCustomAccessTokenRequest.class)); + + return (TypeAdapter) + new TypeAdapter() { + @Override + public void write(JsonWriter out, GetCustomAccessTokenRequest value) + throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + obj.remove("additionalProperties"); + // serialize additional properties + if (value.getAdditionalProperties() != null) { + for (Map.Entry entry : + value.getAdditionalProperties().entrySet()) { + if (entry.getValue() instanceof String) + obj.addProperty(entry.getKey(), (String) entry.getValue()); + else if (entry.getValue() instanceof Number) + obj.addProperty(entry.getKey(), (Number) entry.getValue()); + else if (entry.getValue() instanceof Boolean) + obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); + else if (entry.getValue() instanceof Character) + obj.addProperty( + entry.getKey(), (Character) entry.getValue()); + else { + JsonElement jsonElement = gson.toJsonTree(entry.getValue()); + if (jsonElement.isJsonArray()) { + obj.add(entry.getKey(), jsonElement.getAsJsonArray()); + } else { + obj.add(entry.getKey(), jsonElement.getAsJsonObject()); + } + } + } + } + elementAdapter.write(out, obj); + } + + @Override + public GetCustomAccessTokenRequest read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // store additional fields in the deserialized instance + GetCustomAccessTokenRequest instance = + thisAdapter.fromJsonTree(jsonObj); + for (Map.Entry entry : jsonObj.entrySet()) { + if (!openapiFields.contains(entry.getKey())) { + if (entry.getValue().isJsonPrimitive()) { // primitive type + if (entry.getValue().getAsJsonPrimitive().isString()) + instance.putAdditionalProperty( + entry.getKey(), entry.getValue().getAsString()); + else if (entry.getValue().getAsJsonPrimitive().isNumber()) + instance.putAdditionalProperty( + entry.getKey(), entry.getValue().getAsNumber()); + else if (entry.getValue().getAsJsonPrimitive().isBoolean()) + instance.putAdditionalProperty( + entry.getKey(), + entry.getValue().getAsBoolean()); + else + throw new IllegalArgumentException( + String.format( + "The field `%s` has unknown primitive" + + " type. Value: %s", + entry.getKey(), + entry.getValue().toString())); + } else if (entry.getValue().isJsonArray()) { + instance.putAdditionalProperty( + entry.getKey(), + gson.fromJson(entry.getValue(), List.class)); + } else { // JSON object + instance.putAdditionalProperty( + entry.getKey(), + gson.fromJson(entry.getValue(), HashMap.class)); + } + } + } + return instance; + } + }.nullSafe(); + } + } + + /** + * Create an instance of GetCustomAccessTokenRequest given an JSON string + * + * @param jsonString JSON string + * @return An instance of GetCustomAccessTokenRequest + * @throws IOException if the JSON string is invalid with respect to GetCustomAccessTokenRequest + */ + public static GetCustomAccessTokenRequest fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, GetCustomAccessTokenRequest.class); + } + + /** + * Convert an instance of GetCustomAccessTokenRequest to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} diff --git a/sdks/java/src/main/java/com/thoughtspot/client/model/GetDataSourceSuggestionsRequest.java b/sdks/java/src/main/java/com/thoughtspot/client/model/GetDataSourceSuggestionsRequest.java new file mode 100644 index 000000000..6cc4a2abc --- /dev/null +++ b/sdks/java/src/main/java/com/thoughtspot/client/model/GetDataSourceSuggestionsRequest.java @@ -0,0 +1,310 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client.model; + +import com.google.gson.Gson; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.TypeAdapter; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.annotations.SerializedName; +import com.google.gson.reflect.TypeToken; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import com.thoughtspot.client.JSON; +import java.io.IOException; +import java.io.Serializable; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Objects; + +/** GetDataSourceSuggestionsRequest */ +@javax.annotation.Generated( + value = "org.openapitools.codegen.languages.JavaClientCodegen", + comments = "Generator version: 7.12.0") +public class GetDataSourceSuggestionsRequest implements Serializable { + private static final long serialVersionUID = 1L; + + public static final String SERIALIZED_NAME_QUERY = "query"; + + @SerializedName(SERIALIZED_NAME_QUERY) + @javax.annotation.Nonnull + private String query; + + public GetDataSourceSuggestionsRequest() {} + + public GetDataSourceSuggestionsRequest query(@javax.annotation.Nonnull String query) { + this.query = query; + return this; + } + + /** + * User query used to suggest data sources. + * + * @return query + */ + @javax.annotation.Nonnull + public String getQuery() { + return query; + } + + public void setQuery(@javax.annotation.Nonnull String query) { + this.query = query; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key name of the property + * @param value value of the property + * @return the GetDataSourceSuggestionsRequest instance itself + */ + public GetDataSourceSuggestionsRequest putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return a map of objects + */ + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key name of the property + * @return an object + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + GetDataSourceSuggestionsRequest getDataSourceSuggestionsRequest = + (GetDataSourceSuggestionsRequest) o; + return Objects.equals(this.query, getDataSourceSuggestionsRequest.query) + && Objects.equals( + this.additionalProperties, + getDataSourceSuggestionsRequest.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(query, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class GetDataSourceSuggestionsRequest {\n"); + sb.append(" query: ").append(toIndentedString(query)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first + * line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("query"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + openapiRequiredFields.add("query"); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to + * GetDataSourceSuggestionsRequest + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!GetDataSourceSuggestionsRequest.openapiRequiredFields + .isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException( + String.format( + "The required field(s) %s in GetDataSourceSuggestionsRequest is" + + " not found in the empty JSON string", + GetDataSourceSuggestionsRequest.openapiRequiredFields.toString())); + } + } + + // check to make sure all required properties/fields are present in the JSON string + for (String requiredField : GetDataSourceSuggestionsRequest.openapiRequiredFields) { + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException( + String.format( + "The required field `%s` is not found in the JSON string: %s", + requiredField, jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if (!jsonObj.get("query").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `query` to be a primitive type in the JSON string" + + " but got `%s`", + jsonObj.get("query").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!GetDataSourceSuggestionsRequest.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'GetDataSourceSuggestionsRequest' and its + // subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter = + gson.getDelegateAdapter( + this, TypeToken.get(GetDataSourceSuggestionsRequest.class)); + + return (TypeAdapter) + new TypeAdapter() { + @Override + public void write(JsonWriter out, GetDataSourceSuggestionsRequest value) + throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + obj.remove("additionalProperties"); + // serialize additional properties + if (value.getAdditionalProperties() != null) { + for (Map.Entry entry : + value.getAdditionalProperties().entrySet()) { + if (entry.getValue() instanceof String) + obj.addProperty(entry.getKey(), (String) entry.getValue()); + else if (entry.getValue() instanceof Number) + obj.addProperty(entry.getKey(), (Number) entry.getValue()); + else if (entry.getValue() instanceof Boolean) + obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); + else if (entry.getValue() instanceof Character) + obj.addProperty( + entry.getKey(), (Character) entry.getValue()); + else { + JsonElement jsonElement = gson.toJsonTree(entry.getValue()); + if (jsonElement.isJsonArray()) { + obj.add(entry.getKey(), jsonElement.getAsJsonArray()); + } else { + obj.add(entry.getKey(), jsonElement.getAsJsonObject()); + } + } + } + } + elementAdapter.write(out, obj); + } + + @Override + public GetDataSourceSuggestionsRequest read(JsonReader in) + throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // store additional fields in the deserialized instance + GetDataSourceSuggestionsRequest instance = + thisAdapter.fromJsonTree(jsonObj); + for (Map.Entry entry : jsonObj.entrySet()) { + if (!openapiFields.contains(entry.getKey())) { + if (entry.getValue().isJsonPrimitive()) { // primitive type + if (entry.getValue().getAsJsonPrimitive().isString()) + instance.putAdditionalProperty( + entry.getKey(), entry.getValue().getAsString()); + else if (entry.getValue().getAsJsonPrimitive().isNumber()) + instance.putAdditionalProperty( + entry.getKey(), entry.getValue().getAsNumber()); + else if (entry.getValue().getAsJsonPrimitive().isBoolean()) + instance.putAdditionalProperty( + entry.getKey(), + entry.getValue().getAsBoolean()); + else + throw new IllegalArgumentException( + String.format( + "The field `%s` has unknown primitive" + + " type. Value: %s", + entry.getKey(), + entry.getValue().toString())); + } else if (entry.getValue().isJsonArray()) { + instance.putAdditionalProperty( + entry.getKey(), + gson.fromJson(entry.getValue(), List.class)); + } else { // JSON object + instance.putAdditionalProperty( + entry.getKey(), + gson.fromJson(entry.getValue(), HashMap.class)); + } + } + } + return instance; + } + }.nullSafe(); + } + } + + /** + * Create an instance of GetDataSourceSuggestionsRequest given an JSON string + * + * @param jsonString JSON string + * @return An instance of GetDataSourceSuggestionsRequest + * @throws IOException if the JSON string is invalid with respect to + * GetDataSourceSuggestionsRequest + */ + public static GetDataSourceSuggestionsRequest fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, GetDataSourceSuggestionsRequest.class); + } + + /** + * Convert an instance of GetDataSourceSuggestionsRequest to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} diff --git a/sdks/java/src/main/java/com/thoughtspot/client/model/GetFullAccessTokenRequest.java b/sdks/java/src/main/java/com/thoughtspot/client/model/GetFullAccessTokenRequest.java new file mode 100644 index 000000000..c8b360c44 --- /dev/null +++ b/sdks/java/src/main/java/com/thoughtspot/client/model/GetFullAccessTokenRequest.java @@ -0,0 +1,658 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client.model; + +import com.google.gson.Gson; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.TypeAdapter; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.annotations.SerializedName; +import com.google.gson.reflect.TypeToken; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import com.thoughtspot.client.JSON; +import java.io.IOException; +import java.io.Serializable; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Objects; +import org.openapitools.jackson.nullable.JsonNullable; + +/** GetFullAccessTokenRequest */ +@javax.annotation.Generated( + value = "org.openapitools.codegen.languages.JavaClientCodegen", + comments = "Generator version: 7.12.0") +public class GetFullAccessTokenRequest implements Serializable { + private static final long serialVersionUID = 1L; + + public static final String SERIALIZED_NAME_USERNAME = "username"; + + @SerializedName(SERIALIZED_NAME_USERNAME) + @javax.annotation.Nonnull + private String username; + + public static final String SERIALIZED_NAME_PASSWORD = "password"; + + @SerializedName(SERIALIZED_NAME_PASSWORD) + @javax.annotation.Nullable + private String password = ""; + + public static final String SERIALIZED_NAME_SECRET_KEY = "secret_key"; + + @SerializedName(SERIALIZED_NAME_SECRET_KEY) + @javax.annotation.Nullable + private String secretKey = ""; + + public static final String SERIALIZED_NAME_VALIDITY_TIME_IN_SEC = "validity_time_in_sec"; + + @SerializedName(SERIALIZED_NAME_VALIDITY_TIME_IN_SEC) + @javax.annotation.Nullable + private Integer validityTimeInSec = 300; + + public static final String SERIALIZED_NAME_ORG_ID = "org_id"; + + @SerializedName(SERIALIZED_NAME_ORG_ID) + @javax.annotation.Nullable + private Integer orgId; + + public static final String SERIALIZED_NAME_EMAIL = "email"; + + @SerializedName(SERIALIZED_NAME_EMAIL) + @javax.annotation.Nullable + private String email; + + public static final String SERIALIZED_NAME_DISPLAY_NAME = "display_name"; + + @SerializedName(SERIALIZED_NAME_DISPLAY_NAME) + @javax.annotation.Nullable + private String displayName; + + public static final String SERIALIZED_NAME_AUTO_CREATE = "auto_create"; + + @SerializedName(SERIALIZED_NAME_AUTO_CREATE) + @javax.annotation.Nullable + private Boolean autoCreate = false; + + public static final String SERIALIZED_NAME_GROUP_IDENTIFIERS = "group_identifiers"; + + @SerializedName(SERIALIZED_NAME_GROUP_IDENTIFIERS) + @javax.annotation.Nullable + private List groupIdentifiers; + + public static final String SERIALIZED_NAME_USER_PARAMETERS = "user_parameters"; + + @SerializedName(SERIALIZED_NAME_USER_PARAMETERS) + @javax.annotation.Nullable + private UserParameterOptions userParameters; + + public GetFullAccessTokenRequest() {} + + public GetFullAccessTokenRequest username(@javax.annotation.Nonnull String username) { + this.username = username; + return this; + } + + /** + * Username of the ThoughtSpot user. The username is stored in the `name` attribute of + * the user object. + * + * @return username + */ + @javax.annotation.Nonnull + public String getUsername() { + return username; + } + + public void setUsername(@javax.annotation.Nonnull String username) { + this.username = username; + } + + public GetFullAccessTokenRequest password(@javax.annotation.Nullable String password) { + this.password = password; + return this; + } + + /** + * Password of the user account + * + * @return password + */ + @javax.annotation.Nullable + public String getPassword() { + return password; + } + + public void setPassword(@javax.annotation.Nullable String password) { + this.password = password; + } + + public GetFullAccessTokenRequest secretKey(@javax.annotation.Nullable String secretKey) { + this.secretKey = secretKey; + return this; + } + + /** + * The secret key string provided by the ThoughtSpot application server. ThoughtSpot generates a + * secret key when Trusted authentication is enabled. + * + * @return secretKey + */ + @javax.annotation.Nullable + public String getSecretKey() { + return secretKey; + } + + public void setSecretKey(@javax.annotation.Nullable String secretKey) { + this.secretKey = secretKey; + } + + public GetFullAccessTokenRequest validityTimeInSec( + @javax.annotation.Nullable Integer validityTimeInSec) { + this.validityTimeInSec = validityTimeInSec; + return this; + } + + /** + * Token validity duration in seconds + * + * @return validityTimeInSec + */ + @javax.annotation.Nullable + public Integer getValidityTimeInSec() { + return validityTimeInSec; + } + + public void setValidityTimeInSec(@javax.annotation.Nullable Integer validityTimeInSec) { + this.validityTimeInSec = validityTimeInSec; + } + + public GetFullAccessTokenRequest orgId(@javax.annotation.Nullable Integer orgId) { + this.orgId = orgId; + return this; + } + + /** + * ID of the Org context to log in to. If the Org ID is not specified and secret key is provided + * then user will be logged into the org corresponding to the secret key, and if secret key is + * not provided then user will be logged in to the Org context of their previous login session. + * + * @return orgId + */ + @javax.annotation.Nullable + public Integer getOrgId() { + return orgId; + } + + public void setOrgId(@javax.annotation.Nullable Integer orgId) { + this.orgId = orgId; + } + + public GetFullAccessTokenRequest email(@javax.annotation.Nullable String email) { + this.email = email; + return this; + } + + /** + * Email address of the user. Specify this attribute when creating a new user (just-in-time + * (JIT) provisioning). + * + * @return email + */ + @javax.annotation.Nullable + public String getEmail() { + return email; + } + + public void setEmail(@javax.annotation.Nullable String email) { + this.email = email; + } + + public GetFullAccessTokenRequest displayName(@javax.annotation.Nullable String displayName) { + this.displayName = displayName; + return this; + } + + /** + * Indicates display name of the user. Use this parameter to provision a user just-in-time + * (JIT). + * + * @return displayName + */ + @javax.annotation.Nullable + public String getDisplayName() { + return displayName; + } + + public void setDisplayName(@javax.annotation.Nullable String displayName) { + this.displayName = displayName; + } + + public GetFullAccessTokenRequest autoCreate(@javax.annotation.Nullable Boolean autoCreate) { + this.autoCreate = autoCreate; + return this; + } + + /** + * Creates a new user if the specified username does not already exist in ThoughtSpot. To + * provision a user just-in-time (JIT), set this attribute to true. Note: For JIT provisioning + * of a user, the secret_key is required. + * + * @return autoCreate + */ + @javax.annotation.Nullable + public Boolean getAutoCreate() { + return autoCreate; + } + + public void setAutoCreate(@javax.annotation.Nullable Boolean autoCreate) { + this.autoCreate = autoCreate; + } + + public GetFullAccessTokenRequest groupIdentifiers( + @javax.annotation.Nullable List groupIdentifiers) { + this.groupIdentifiers = groupIdentifiers; + return this; + } + + public GetFullAccessTokenRequest addGroupIdentifiersItem(String groupIdentifiersItem) { + if (this.groupIdentifiers == null) { + this.groupIdentifiers = new ArrayList<>(); + } + this.groupIdentifiers.add(groupIdentifiersItem); + return this; + } + + /** + * ID or name of the groups to which the newly created user belongs. Use this parameter to + * provision a user just-in-time (JIT). + * + * @return groupIdentifiers + */ + @javax.annotation.Nullable + public List getGroupIdentifiers() { + return groupIdentifiers; + } + + public void setGroupIdentifiers(@javax.annotation.Nullable List groupIdentifiers) { + this.groupIdentifiers = groupIdentifiers; + } + + public GetFullAccessTokenRequest userParameters( + @javax.annotation.Nullable UserParameterOptions userParameters) { + this.userParameters = userParameters; + return this; + } + + /** + * <div>Deprecated: 10.4.0.cl and later </div> Define attributes such as Runtime + * filters and Runtime parameters to send security entitlements to a user session. For more + * information, see + * [Documentation](https://developers.thoughtspot.com/docs/abac-user-parameters). + * + * @return userParameters + */ + @javax.annotation.Nullable + public UserParameterOptions getUserParameters() { + return userParameters; + } + + public void setUserParameters(@javax.annotation.Nullable UserParameterOptions userParameters) { + this.userParameters = userParameters; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key name of the property + * @param value value of the property + * @return the GetFullAccessTokenRequest instance itself + */ + public GetFullAccessTokenRequest putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return a map of objects + */ + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key name of the property + * @return an object + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + GetFullAccessTokenRequest getFullAccessTokenRequest = (GetFullAccessTokenRequest) o; + return Objects.equals(this.username, getFullAccessTokenRequest.username) + && Objects.equals(this.password, getFullAccessTokenRequest.password) + && Objects.equals(this.secretKey, getFullAccessTokenRequest.secretKey) + && Objects.equals( + this.validityTimeInSec, getFullAccessTokenRequest.validityTimeInSec) + && Objects.equals(this.orgId, getFullAccessTokenRequest.orgId) + && Objects.equals(this.email, getFullAccessTokenRequest.email) + && Objects.equals(this.displayName, getFullAccessTokenRequest.displayName) + && Objects.equals(this.autoCreate, getFullAccessTokenRequest.autoCreate) + && Objects.equals(this.groupIdentifiers, getFullAccessTokenRequest.groupIdentifiers) + && Objects.equals(this.userParameters, getFullAccessTokenRequest.userParameters) + && Objects.equals( + this.additionalProperties, getFullAccessTokenRequest.additionalProperties); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b + || (a != null + && b != null + && a.isPresent() + && b.isPresent() + && Objects.deepEquals(a.get(), b.get())); + } + + @Override + public int hashCode() { + return Objects.hash( + username, + password, + secretKey, + validityTimeInSec, + orgId, + email, + displayName, + autoCreate, + groupIdentifiers, + userParameters, + additionalProperties); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; + } + return a.isPresent() ? Arrays.deepHashCode(new Object[] {a.get()}) : 31; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class GetFullAccessTokenRequest {\n"); + sb.append(" username: ").append(toIndentedString(username)).append("\n"); + sb.append(" password: ").append(toIndentedString(password)).append("\n"); + sb.append(" secretKey: ").append(toIndentedString(secretKey)).append("\n"); + sb.append(" validityTimeInSec: ") + .append(toIndentedString(validityTimeInSec)) + .append("\n"); + sb.append(" orgId: ").append(toIndentedString(orgId)).append("\n"); + sb.append(" email: ").append(toIndentedString(email)).append("\n"); + sb.append(" displayName: ").append(toIndentedString(displayName)).append("\n"); + sb.append(" autoCreate: ").append(toIndentedString(autoCreate)).append("\n"); + sb.append(" groupIdentifiers: ").append(toIndentedString(groupIdentifiers)).append("\n"); + sb.append(" userParameters: ").append(toIndentedString(userParameters)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first + * line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("username"); + openapiFields.add("password"); + openapiFields.add("secret_key"); + openapiFields.add("validity_time_in_sec"); + openapiFields.add("org_id"); + openapiFields.add("email"); + openapiFields.add("display_name"); + openapiFields.add("auto_create"); + openapiFields.add("group_identifiers"); + openapiFields.add("user_parameters"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + openapiRequiredFields.add("username"); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to GetFullAccessTokenRequest + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!GetFullAccessTokenRequest.openapiRequiredFields + .isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException( + String.format( + "The required field(s) %s in GetFullAccessTokenRequest is not" + + " found in the empty JSON string", + GetFullAccessTokenRequest.openapiRequiredFields.toString())); + } + } + + // check to make sure all required properties/fields are present in the JSON string + for (String requiredField : GetFullAccessTokenRequest.openapiRequiredFields) { + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException( + String.format( + "The required field `%s` is not found in the JSON string: %s", + requiredField, jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if (!jsonObj.get("username").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `username` to be a primitive type in the JSON" + + " string but got `%s`", + jsonObj.get("username").toString())); + } + if ((jsonObj.get("password") != null && !jsonObj.get("password").isJsonNull()) + && !jsonObj.get("password").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `password` to be a primitive type in the JSON" + + " string but got `%s`", + jsonObj.get("password").toString())); + } + if ((jsonObj.get("secret_key") != null && !jsonObj.get("secret_key").isJsonNull()) + && !jsonObj.get("secret_key").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `secret_key` to be a primitive type in the JSON" + + " string but got `%s`", + jsonObj.get("secret_key").toString())); + } + if ((jsonObj.get("email") != null && !jsonObj.get("email").isJsonNull()) + && !jsonObj.get("email").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `email` to be a primitive type in the JSON string" + + " but got `%s`", + jsonObj.get("email").toString())); + } + if ((jsonObj.get("display_name") != null && !jsonObj.get("display_name").isJsonNull()) + && !jsonObj.get("display_name").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `display_name` to be a primitive type in the JSON" + + " string but got `%s`", + jsonObj.get("display_name").toString())); + } + // ensure the optional json data is an array if present + if (jsonObj.get("group_identifiers") != null + && !jsonObj.get("group_identifiers").isJsonNull() + && !jsonObj.get("group_identifiers").isJsonArray()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `group_identifiers` to be an array in the JSON" + + " string but got `%s`", + jsonObj.get("group_identifiers").toString())); + } + // validate the optional field `user_parameters` + if (jsonObj.get("user_parameters") != null + && !jsonObj.get("user_parameters").isJsonNull()) { + UserParameterOptions.validateJsonElement(jsonObj.get("user_parameters")); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!GetFullAccessTokenRequest.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'GetFullAccessTokenRequest' and its + // subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter = + gson.getDelegateAdapter(this, TypeToken.get(GetFullAccessTokenRequest.class)); + + return (TypeAdapter) + new TypeAdapter() { + @Override + public void write(JsonWriter out, GetFullAccessTokenRequest value) + throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + obj.remove("additionalProperties"); + // serialize additional properties + if (value.getAdditionalProperties() != null) { + for (Map.Entry entry : + value.getAdditionalProperties().entrySet()) { + if (entry.getValue() instanceof String) + obj.addProperty(entry.getKey(), (String) entry.getValue()); + else if (entry.getValue() instanceof Number) + obj.addProperty(entry.getKey(), (Number) entry.getValue()); + else if (entry.getValue() instanceof Boolean) + obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); + else if (entry.getValue() instanceof Character) + obj.addProperty( + entry.getKey(), (Character) entry.getValue()); + else { + JsonElement jsonElement = gson.toJsonTree(entry.getValue()); + if (jsonElement.isJsonArray()) { + obj.add(entry.getKey(), jsonElement.getAsJsonArray()); + } else { + obj.add(entry.getKey(), jsonElement.getAsJsonObject()); + } + } + } + } + elementAdapter.write(out, obj); + } + + @Override + public GetFullAccessTokenRequest read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // store additional fields in the deserialized instance + GetFullAccessTokenRequest instance = thisAdapter.fromJsonTree(jsonObj); + for (Map.Entry entry : jsonObj.entrySet()) { + if (!openapiFields.contains(entry.getKey())) { + if (entry.getValue().isJsonPrimitive()) { // primitive type + if (entry.getValue().getAsJsonPrimitive().isString()) + instance.putAdditionalProperty( + entry.getKey(), entry.getValue().getAsString()); + else if (entry.getValue().getAsJsonPrimitive().isNumber()) + instance.putAdditionalProperty( + entry.getKey(), entry.getValue().getAsNumber()); + else if (entry.getValue().getAsJsonPrimitive().isBoolean()) + instance.putAdditionalProperty( + entry.getKey(), + entry.getValue().getAsBoolean()); + else + throw new IllegalArgumentException( + String.format( + "The field `%s` has unknown primitive" + + " type. Value: %s", + entry.getKey(), + entry.getValue().toString())); + } else if (entry.getValue().isJsonArray()) { + instance.putAdditionalProperty( + entry.getKey(), + gson.fromJson(entry.getValue(), List.class)); + } else { // JSON object + instance.putAdditionalProperty( + entry.getKey(), + gson.fromJson(entry.getValue(), HashMap.class)); + } + } + } + return instance; + } + }.nullSafe(); + } + } + + /** + * Create an instance of GetFullAccessTokenRequest given an JSON string + * + * @param jsonString JSON string + * @return An instance of GetFullAccessTokenRequest + * @throws IOException if the JSON string is invalid with respect to GetFullAccessTokenRequest + */ + public static GetFullAccessTokenRequest fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, GetFullAccessTokenRequest.class); + } + + /** + * Convert an instance of GetFullAccessTokenRequest to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} diff --git a/sdks/java/src/main/java/com/thoughtspot/client/model/GetNLInstructionsRequest.java b/sdks/java/src/main/java/com/thoughtspot/client/model/GetNLInstructionsRequest.java new file mode 100644 index 000000000..6ede30809 --- /dev/null +++ b/sdks/java/src/main/java/com/thoughtspot/client/model/GetNLInstructionsRequest.java @@ -0,0 +1,307 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client.model; + +import com.google.gson.Gson; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.TypeAdapter; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.annotations.SerializedName; +import com.google.gson.reflect.TypeToken; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import com.thoughtspot.client.JSON; +import java.io.IOException; +import java.io.Serializable; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Objects; + +/** GetNLInstructionsRequest */ +@javax.annotation.Generated( + value = "org.openapitools.codegen.languages.JavaClientCodegen", + comments = "Generator version: 7.12.0") +public class GetNLInstructionsRequest implements Serializable { + private static final long serialVersionUID = 1L; + + public static final String SERIALIZED_NAME_DATA_SOURCE_IDENTIFIER = "data_source_identifier"; + + @SerializedName(SERIALIZED_NAME_DATA_SOURCE_IDENTIFIER) + @javax.annotation.Nonnull + private String dataSourceIdentifier; + + public GetNLInstructionsRequest() {} + + public GetNLInstructionsRequest dataSourceIdentifier( + @javax.annotation.Nonnull String dataSourceIdentifier) { + this.dataSourceIdentifier = dataSourceIdentifier; + return this; + } + + /** + * Unique ID or name of the data-model for which to retrieve NL instructions. + * + * @return dataSourceIdentifier + */ + @javax.annotation.Nonnull + public String getDataSourceIdentifier() { + return dataSourceIdentifier; + } + + public void setDataSourceIdentifier(@javax.annotation.Nonnull String dataSourceIdentifier) { + this.dataSourceIdentifier = dataSourceIdentifier; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key name of the property + * @param value value of the property + * @return the GetNLInstructionsRequest instance itself + */ + public GetNLInstructionsRequest putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return a map of objects + */ + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key name of the property + * @return an object + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + GetNLInstructionsRequest getNLInstructionsRequest = (GetNLInstructionsRequest) o; + return Objects.equals( + this.dataSourceIdentifier, getNLInstructionsRequest.dataSourceIdentifier) + && Objects.equals( + this.additionalProperties, getNLInstructionsRequest.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(dataSourceIdentifier, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class GetNLInstructionsRequest {\n"); + sb.append(" dataSourceIdentifier: ") + .append(toIndentedString(dataSourceIdentifier)) + .append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first + * line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("data_source_identifier"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + openapiRequiredFields.add("data_source_identifier"); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to GetNLInstructionsRequest + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!GetNLInstructionsRequest.openapiRequiredFields + .isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException( + String.format( + "The required field(s) %s in GetNLInstructionsRequest is not found" + + " in the empty JSON string", + GetNLInstructionsRequest.openapiRequiredFields.toString())); + } + } + + // check to make sure all required properties/fields are present in the JSON string + for (String requiredField : GetNLInstructionsRequest.openapiRequiredFields) { + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException( + String.format( + "The required field `%s` is not found in the JSON string: %s", + requiredField, jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if (!jsonObj.get("data_source_identifier").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `data_source_identifier` to be a primitive type in" + + " the JSON string but got `%s`", + jsonObj.get("data_source_identifier").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!GetNLInstructionsRequest.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'GetNLInstructionsRequest' and its + // subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter = + gson.getDelegateAdapter(this, TypeToken.get(GetNLInstructionsRequest.class)); + + return (TypeAdapter) + new TypeAdapter() { + @Override + public void write(JsonWriter out, GetNLInstructionsRequest value) + throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + obj.remove("additionalProperties"); + // serialize additional properties + if (value.getAdditionalProperties() != null) { + for (Map.Entry entry : + value.getAdditionalProperties().entrySet()) { + if (entry.getValue() instanceof String) + obj.addProperty(entry.getKey(), (String) entry.getValue()); + else if (entry.getValue() instanceof Number) + obj.addProperty(entry.getKey(), (Number) entry.getValue()); + else if (entry.getValue() instanceof Boolean) + obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); + else if (entry.getValue() instanceof Character) + obj.addProperty( + entry.getKey(), (Character) entry.getValue()); + else { + JsonElement jsonElement = gson.toJsonTree(entry.getValue()); + if (jsonElement.isJsonArray()) { + obj.add(entry.getKey(), jsonElement.getAsJsonArray()); + } else { + obj.add(entry.getKey(), jsonElement.getAsJsonObject()); + } + } + } + } + elementAdapter.write(out, obj); + } + + @Override + public GetNLInstructionsRequest read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // store additional fields in the deserialized instance + GetNLInstructionsRequest instance = thisAdapter.fromJsonTree(jsonObj); + for (Map.Entry entry : jsonObj.entrySet()) { + if (!openapiFields.contains(entry.getKey())) { + if (entry.getValue().isJsonPrimitive()) { // primitive type + if (entry.getValue().getAsJsonPrimitive().isString()) + instance.putAdditionalProperty( + entry.getKey(), entry.getValue().getAsString()); + else if (entry.getValue().getAsJsonPrimitive().isNumber()) + instance.putAdditionalProperty( + entry.getKey(), entry.getValue().getAsNumber()); + else if (entry.getValue().getAsJsonPrimitive().isBoolean()) + instance.putAdditionalProperty( + entry.getKey(), + entry.getValue().getAsBoolean()); + else + throw new IllegalArgumentException( + String.format( + "The field `%s` has unknown primitive" + + " type. Value: %s", + entry.getKey(), + entry.getValue().toString())); + } else if (entry.getValue().isJsonArray()) { + instance.putAdditionalProperty( + entry.getKey(), + gson.fromJson(entry.getValue(), List.class)); + } else { // JSON object + instance.putAdditionalProperty( + entry.getKey(), + gson.fromJson(entry.getValue(), HashMap.class)); + } + } + } + return instance; + } + }.nullSafe(); + } + } + + /** + * Create an instance of GetNLInstructionsRequest given an JSON string + * + * @param jsonString JSON string + * @return An instance of GetNLInstructionsRequest + * @throws IOException if the JSON string is invalid with respect to GetNLInstructionsRequest + */ + public static GetNLInstructionsRequest fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, GetNLInstructionsRequest.class); + } + + /** + * Convert an instance of GetNLInstructionsRequest to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} diff --git a/sdks/java/src/main/java/com/thoughtspot/client/model/GetObjectAccessTokenRequest.java b/sdks/java/src/main/java/com/thoughtspot/client/model/GetObjectAccessTokenRequest.java new file mode 100644 index 000000000..08228d67b --- /dev/null +++ b/sdks/java/src/main/java/com/thoughtspot/client/model/GetObjectAccessTokenRequest.java @@ -0,0 +1,700 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client.model; + +import com.google.gson.Gson; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.TypeAdapter; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.annotations.SerializedName; +import com.google.gson.reflect.TypeToken; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import com.thoughtspot.client.JSON; +import java.io.IOException; +import java.io.Serializable; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Objects; +import org.openapitools.jackson.nullable.JsonNullable; + +/** GetObjectAccessTokenRequest */ +@javax.annotation.Generated( + value = "org.openapitools.codegen.languages.JavaClientCodegen", + comments = "Generator version: 7.12.0") +public class GetObjectAccessTokenRequest implements Serializable { + private static final long serialVersionUID = 1L; + + public static final String SERIALIZED_NAME_USERNAME = "username"; + + @SerializedName(SERIALIZED_NAME_USERNAME) + @javax.annotation.Nonnull + private String username; + + public static final String SERIALIZED_NAME_OBJECT_ID = "object_id"; + + @SerializedName(SERIALIZED_NAME_OBJECT_ID) + @javax.annotation.Nullable + private String objectId; + + public static final String SERIALIZED_NAME_PASSWORD = "password"; + + @SerializedName(SERIALIZED_NAME_PASSWORD) + @javax.annotation.Nullable + private String password = ""; + + public static final String SERIALIZED_NAME_SECRET_KEY = "secret_key"; + + @SerializedName(SERIALIZED_NAME_SECRET_KEY) + @javax.annotation.Nullable + private String secretKey = ""; + + public static final String SERIALIZED_NAME_VALIDITY_TIME_IN_SEC = "validity_time_in_sec"; + + @SerializedName(SERIALIZED_NAME_VALIDITY_TIME_IN_SEC) + @javax.annotation.Nullable + private Integer validityTimeInSec = 300; + + public static final String SERIALIZED_NAME_ORG_ID = "org_id"; + + @SerializedName(SERIALIZED_NAME_ORG_ID) + @javax.annotation.Nullable + private Integer orgId; + + public static final String SERIALIZED_NAME_EMAIL = "email"; + + @SerializedName(SERIALIZED_NAME_EMAIL) + @javax.annotation.Nullable + private String email; + + public static final String SERIALIZED_NAME_DISPLAY_NAME = "display_name"; + + @SerializedName(SERIALIZED_NAME_DISPLAY_NAME) + @javax.annotation.Nullable + private String displayName; + + public static final String SERIALIZED_NAME_AUTO_CREATE = "auto_create"; + + @SerializedName(SERIALIZED_NAME_AUTO_CREATE) + @javax.annotation.Nullable + private Boolean autoCreate = false; + + public static final String SERIALIZED_NAME_GROUP_IDENTIFIERS = "group_identifiers"; + + @SerializedName(SERIALIZED_NAME_GROUP_IDENTIFIERS) + @javax.annotation.Nullable + private List groupIdentifiers; + + public static final String SERIALIZED_NAME_USER_PARAMETERS = "user_parameters"; + + @SerializedName(SERIALIZED_NAME_USER_PARAMETERS) + @javax.annotation.Nullable + private UserParameterOptions userParameters; + + public GetObjectAccessTokenRequest() {} + + public GetObjectAccessTokenRequest username(@javax.annotation.Nonnull String username) { + this.username = username; + return this; + } + + /** + * Username of the ThoughtSpot user. The username is stored in the `name` attribute of + * the user object. + * + * @return username + */ + @javax.annotation.Nonnull + public String getUsername() { + return username; + } + + public void setUsername(@javax.annotation.Nonnull String username) { + this.username = username; + } + + public GetObjectAccessTokenRequest objectId(@javax.annotation.Nullable String objectId) { + this.objectId = objectId; + return this; + } + + /** + * GUID of the ThoughtSpot metadata object that the user can access. The bearer will only have + * access to the object specified in the API request. + * + * @return objectId + */ + @javax.annotation.Nullable + public String getObjectId() { + return objectId; + } + + public void setObjectId(@javax.annotation.Nullable String objectId) { + this.objectId = objectId; + } + + public GetObjectAccessTokenRequest password(@javax.annotation.Nullable String password) { + this.password = password; + return this; + } + + /** + * Password of the user account + * + * @return password + */ + @javax.annotation.Nullable + public String getPassword() { + return password; + } + + public void setPassword(@javax.annotation.Nullable String password) { + this.password = password; + } + + public GetObjectAccessTokenRequest secretKey(@javax.annotation.Nullable String secretKey) { + this.secretKey = secretKey; + return this; + } + + /** + * The secret key string provided by the ThoughtSpot application server. ThoughtSpot generates a + * secret key when Trusted authentication is enabled. + * + * @return secretKey + */ + @javax.annotation.Nullable + public String getSecretKey() { + return secretKey; + } + + public void setSecretKey(@javax.annotation.Nullable String secretKey) { + this.secretKey = secretKey; + } + + public GetObjectAccessTokenRequest validityTimeInSec( + @javax.annotation.Nullable Integer validityTimeInSec) { + this.validityTimeInSec = validityTimeInSec; + return this; + } + + /** + * Token validity duration in seconds + * + * @return validityTimeInSec + */ + @javax.annotation.Nullable + public Integer getValidityTimeInSec() { + return validityTimeInSec; + } + + public void setValidityTimeInSec(@javax.annotation.Nullable Integer validityTimeInSec) { + this.validityTimeInSec = validityTimeInSec; + } + + public GetObjectAccessTokenRequest orgId(@javax.annotation.Nullable Integer orgId) { + this.orgId = orgId; + return this; + } + + /** + * ID of the Org context to log in to. If the Org ID is not specified and secret key is provided + * then user will be logged into the org corresponding to the secret key, and if secret key is + * not provided then user will be logged in to the Org context of their previous login session. + * + * @return orgId + */ + @javax.annotation.Nullable + public Integer getOrgId() { + return orgId; + } + + public void setOrgId(@javax.annotation.Nullable Integer orgId) { + this.orgId = orgId; + } + + public GetObjectAccessTokenRequest email(@javax.annotation.Nullable String email) { + this.email = email; + return this; + } + + /** + * Email address of the user. Specify this attribute when creating a new user (just-in-time + * (JIT) provisioning). + * + * @return email + */ + @javax.annotation.Nullable + public String getEmail() { + return email; + } + + public void setEmail(@javax.annotation.Nullable String email) { + this.email = email; + } + + public GetObjectAccessTokenRequest displayName(@javax.annotation.Nullable String displayName) { + this.displayName = displayName; + return this; + } + + /** + * Display name of the user. Specify this attribute when creating a new user (just-in-time (JIT) + * provisioning). + * + * @return displayName + */ + @javax.annotation.Nullable + public String getDisplayName() { + return displayName; + } + + public void setDisplayName(@javax.annotation.Nullable String displayName) { + this.displayName = displayName; + } + + public GetObjectAccessTokenRequest autoCreate(@javax.annotation.Nullable Boolean autoCreate) { + this.autoCreate = autoCreate; + return this; + } + + /** + * Creates a new user if the specified username does not exist in ThoughtSpot. To provision a + * user just-in-time (JIT), set this attribute to true. Note: For JIT provisioning of a user, + * the secret_key is required. + * + * @return autoCreate + */ + @javax.annotation.Nullable + public Boolean getAutoCreate() { + return autoCreate; + } + + public void setAutoCreate(@javax.annotation.Nullable Boolean autoCreate) { + this.autoCreate = autoCreate; + } + + public GetObjectAccessTokenRequest groupIdentifiers( + @javax.annotation.Nullable List groupIdentifiers) { + this.groupIdentifiers = groupIdentifiers; + return this; + } + + public GetObjectAccessTokenRequest addGroupIdentifiersItem(String groupIdentifiersItem) { + if (this.groupIdentifiers == null) { + this.groupIdentifiers = new ArrayList<>(); + } + this.groupIdentifiers.add(groupIdentifiersItem); + return this; + } + + /** + * Unique ID or name of the groups to which you want to assign the new user. You can specify + * this attribute to dynamically assign privileges during just-in-time (JIT) provisioning. + * + * @return groupIdentifiers + */ + @javax.annotation.Nullable + public List getGroupIdentifiers() { + return groupIdentifiers; + } + + public void setGroupIdentifiers(@javax.annotation.Nullable List groupIdentifiers) { + this.groupIdentifiers = groupIdentifiers; + } + + public GetObjectAccessTokenRequest userParameters( + @javax.annotation.Nullable UserParameterOptions userParameters) { + this.userParameters = userParameters; + return this; + } + + /** + * <div>Deprecated: 10.4.0.cl and later </div> Define attributes such as Runtime + * filters and Runtime parameters to send security entitlements to a user session. For more + * information, see + * [Documentation](https://developers.thoughtspot.com/docs/abac-user-parameters). + * + * @return userParameters + */ + @javax.annotation.Nullable + public UserParameterOptions getUserParameters() { + return userParameters; + } + + public void setUserParameters(@javax.annotation.Nullable UserParameterOptions userParameters) { + this.userParameters = userParameters; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key name of the property + * @param value value of the property + * @return the GetObjectAccessTokenRequest instance itself + */ + public GetObjectAccessTokenRequest putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return a map of objects + */ + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key name of the property + * @return an object + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + GetObjectAccessTokenRequest getObjectAccessTokenRequest = (GetObjectAccessTokenRequest) o; + return Objects.equals(this.username, getObjectAccessTokenRequest.username) + && Objects.equals(this.objectId, getObjectAccessTokenRequest.objectId) + && Objects.equals(this.password, getObjectAccessTokenRequest.password) + && Objects.equals(this.secretKey, getObjectAccessTokenRequest.secretKey) + && Objects.equals( + this.validityTimeInSec, getObjectAccessTokenRequest.validityTimeInSec) + && Objects.equals(this.orgId, getObjectAccessTokenRequest.orgId) + && Objects.equals(this.email, getObjectAccessTokenRequest.email) + && Objects.equals(this.displayName, getObjectAccessTokenRequest.displayName) + && Objects.equals(this.autoCreate, getObjectAccessTokenRequest.autoCreate) + && Objects.equals( + this.groupIdentifiers, getObjectAccessTokenRequest.groupIdentifiers) + && Objects.equals(this.userParameters, getObjectAccessTokenRequest.userParameters) + && Objects.equals( + this.additionalProperties, + getObjectAccessTokenRequest.additionalProperties); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b + || (a != null + && b != null + && a.isPresent() + && b.isPresent() + && Objects.deepEquals(a.get(), b.get())); + } + + @Override + public int hashCode() { + return Objects.hash( + username, + objectId, + password, + secretKey, + validityTimeInSec, + orgId, + email, + displayName, + autoCreate, + groupIdentifiers, + userParameters, + additionalProperties); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; + } + return a.isPresent() ? Arrays.deepHashCode(new Object[] {a.get()}) : 31; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class GetObjectAccessTokenRequest {\n"); + sb.append(" username: ").append(toIndentedString(username)).append("\n"); + sb.append(" objectId: ").append(toIndentedString(objectId)).append("\n"); + sb.append(" password: ").append(toIndentedString(password)).append("\n"); + sb.append(" secretKey: ").append(toIndentedString(secretKey)).append("\n"); + sb.append(" validityTimeInSec: ") + .append(toIndentedString(validityTimeInSec)) + .append("\n"); + sb.append(" orgId: ").append(toIndentedString(orgId)).append("\n"); + sb.append(" email: ").append(toIndentedString(email)).append("\n"); + sb.append(" displayName: ").append(toIndentedString(displayName)).append("\n"); + sb.append(" autoCreate: ").append(toIndentedString(autoCreate)).append("\n"); + sb.append(" groupIdentifiers: ").append(toIndentedString(groupIdentifiers)).append("\n"); + sb.append(" userParameters: ").append(toIndentedString(userParameters)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first + * line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("username"); + openapiFields.add("object_id"); + openapiFields.add("password"); + openapiFields.add("secret_key"); + openapiFields.add("validity_time_in_sec"); + openapiFields.add("org_id"); + openapiFields.add("email"); + openapiFields.add("display_name"); + openapiFields.add("auto_create"); + openapiFields.add("group_identifiers"); + openapiFields.add("user_parameters"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + openapiRequiredFields.add("username"); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to + * GetObjectAccessTokenRequest + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!GetObjectAccessTokenRequest.openapiRequiredFields + .isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException( + String.format( + "The required field(s) %s in GetObjectAccessTokenRequest is not" + + " found in the empty JSON string", + GetObjectAccessTokenRequest.openapiRequiredFields.toString())); + } + } + + // check to make sure all required properties/fields are present in the JSON string + for (String requiredField : GetObjectAccessTokenRequest.openapiRequiredFields) { + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException( + String.format( + "The required field `%s` is not found in the JSON string: %s", + requiredField, jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if (!jsonObj.get("username").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `username` to be a primitive type in the JSON" + + " string but got `%s`", + jsonObj.get("username").toString())); + } + if ((jsonObj.get("object_id") != null && !jsonObj.get("object_id").isJsonNull()) + && !jsonObj.get("object_id").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `object_id` to be a primitive type in the JSON" + + " string but got `%s`", + jsonObj.get("object_id").toString())); + } + if ((jsonObj.get("password") != null && !jsonObj.get("password").isJsonNull()) + && !jsonObj.get("password").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `password` to be a primitive type in the JSON" + + " string but got `%s`", + jsonObj.get("password").toString())); + } + if ((jsonObj.get("secret_key") != null && !jsonObj.get("secret_key").isJsonNull()) + && !jsonObj.get("secret_key").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `secret_key` to be a primitive type in the JSON" + + " string but got `%s`", + jsonObj.get("secret_key").toString())); + } + if ((jsonObj.get("email") != null && !jsonObj.get("email").isJsonNull()) + && !jsonObj.get("email").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `email` to be a primitive type in the JSON string" + + " but got `%s`", + jsonObj.get("email").toString())); + } + if ((jsonObj.get("display_name") != null && !jsonObj.get("display_name").isJsonNull()) + && !jsonObj.get("display_name").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `display_name` to be a primitive type in the JSON" + + " string but got `%s`", + jsonObj.get("display_name").toString())); + } + // ensure the optional json data is an array if present + if (jsonObj.get("group_identifiers") != null + && !jsonObj.get("group_identifiers").isJsonNull() + && !jsonObj.get("group_identifiers").isJsonArray()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `group_identifiers` to be an array in the JSON" + + " string but got `%s`", + jsonObj.get("group_identifiers").toString())); + } + // validate the optional field `user_parameters` + if (jsonObj.get("user_parameters") != null + && !jsonObj.get("user_parameters").isJsonNull()) { + UserParameterOptions.validateJsonElement(jsonObj.get("user_parameters")); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!GetObjectAccessTokenRequest.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'GetObjectAccessTokenRequest' and its + // subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter = + gson.getDelegateAdapter(this, TypeToken.get(GetObjectAccessTokenRequest.class)); + + return (TypeAdapter) + new TypeAdapter() { + @Override + public void write(JsonWriter out, GetObjectAccessTokenRequest value) + throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + obj.remove("additionalProperties"); + // serialize additional properties + if (value.getAdditionalProperties() != null) { + for (Map.Entry entry : + value.getAdditionalProperties().entrySet()) { + if (entry.getValue() instanceof String) + obj.addProperty(entry.getKey(), (String) entry.getValue()); + else if (entry.getValue() instanceof Number) + obj.addProperty(entry.getKey(), (Number) entry.getValue()); + else if (entry.getValue() instanceof Boolean) + obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); + else if (entry.getValue() instanceof Character) + obj.addProperty( + entry.getKey(), (Character) entry.getValue()); + else { + JsonElement jsonElement = gson.toJsonTree(entry.getValue()); + if (jsonElement.isJsonArray()) { + obj.add(entry.getKey(), jsonElement.getAsJsonArray()); + } else { + obj.add(entry.getKey(), jsonElement.getAsJsonObject()); + } + } + } + } + elementAdapter.write(out, obj); + } + + @Override + public GetObjectAccessTokenRequest read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // store additional fields in the deserialized instance + GetObjectAccessTokenRequest instance = + thisAdapter.fromJsonTree(jsonObj); + for (Map.Entry entry : jsonObj.entrySet()) { + if (!openapiFields.contains(entry.getKey())) { + if (entry.getValue().isJsonPrimitive()) { // primitive type + if (entry.getValue().getAsJsonPrimitive().isString()) + instance.putAdditionalProperty( + entry.getKey(), entry.getValue().getAsString()); + else if (entry.getValue().getAsJsonPrimitive().isNumber()) + instance.putAdditionalProperty( + entry.getKey(), entry.getValue().getAsNumber()); + else if (entry.getValue().getAsJsonPrimitive().isBoolean()) + instance.putAdditionalProperty( + entry.getKey(), + entry.getValue().getAsBoolean()); + else + throw new IllegalArgumentException( + String.format( + "The field `%s` has unknown primitive" + + " type. Value: %s", + entry.getKey(), + entry.getValue().toString())); + } else if (entry.getValue().isJsonArray()) { + instance.putAdditionalProperty( + entry.getKey(), + gson.fromJson(entry.getValue(), List.class)); + } else { // JSON object + instance.putAdditionalProperty( + entry.getKey(), + gson.fromJson(entry.getValue(), HashMap.class)); + } + } + } + return instance; + } + }.nullSafe(); + } + } + + /** + * Create an instance of GetObjectAccessTokenRequest given an JSON string + * + * @param jsonString JSON string + * @return An instance of GetObjectAccessTokenRequest + * @throws IOException if the JSON string is invalid with respect to GetObjectAccessTokenRequest + */ + public static GetObjectAccessTokenRequest fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, GetObjectAccessTokenRequest.class); + } + + /** + * Convert an instance of GetObjectAccessTokenRequest to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} diff --git a/sdks/java/src/main/java/com/thoughtspot/client/model/GetRelevantQuestionsRequest.java b/sdks/java/src/main/java/com/thoughtspot/client/model/GetRelevantQuestionsRequest.java new file mode 100644 index 000000000..b99532921 --- /dev/null +++ b/sdks/java/src/main/java/com/thoughtspot/client/model/GetRelevantQuestionsRequest.java @@ -0,0 +1,459 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client.model; + +import com.google.gson.Gson; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.TypeAdapter; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.annotations.SerializedName; +import com.google.gson.reflect.TypeToken; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import com.thoughtspot.client.JSON; +import java.io.IOException; +import java.io.Serializable; +import java.util.Arrays; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Objects; +import org.openapitools.jackson.nullable.JsonNullable; + +/** GetRelevantQuestionsRequest */ +@javax.annotation.Generated( + value = "org.openapitools.codegen.languages.JavaClientCodegen", + comments = "Generator version: 7.12.0") +public class GetRelevantQuestionsRequest implements Serializable { + private static final long serialVersionUID = 1L; + + public static final String SERIALIZED_NAME_METADATA_CONTEXT = "metadata_context"; + + @SerializedName(SERIALIZED_NAME_METADATA_CONTEXT) + @javax.annotation.Nonnull + private MetadataContext metadataContext; + + public static final String SERIALIZED_NAME_LIMIT_RELEVANT_QUESTIONS = + "limit_relevant_questions"; + + @SerializedName(SERIALIZED_NAME_LIMIT_RELEVANT_QUESTIONS) + @javax.annotation.Nullable + private Integer limitRelevantQuestions; + + public static final String SERIALIZED_NAME_BYPASS_CACHE = "bypass_cache"; + + @SerializedName(SERIALIZED_NAME_BYPASS_CACHE) + @javax.annotation.Nullable + private Boolean bypassCache; + + public static final String SERIALIZED_NAME_QUERY = "query"; + + @SerializedName(SERIALIZED_NAME_QUERY) + @javax.annotation.Nonnull + private String query; + + public static final String SERIALIZED_NAME_AI_CONTEXT = "ai_context"; + + @SerializedName(SERIALIZED_NAME_AI_CONTEXT) + @javax.annotation.Nullable + private AIContext aiContext; + + public GetRelevantQuestionsRequest() {} + + public GetRelevantQuestionsRequest metadataContext( + @javax.annotation.Nonnull MetadataContext metadataContext) { + this.metadataContext = metadataContext; + return this; + } + + /** + * metadata for the query to enable generation of relevant sub-questions; at least one context + * identifier is required. + * + * @return metadataContext + */ + @javax.annotation.Nonnull + public MetadataContext getMetadataContext() { + return metadataContext; + } + + public void setMetadataContext(@javax.annotation.Nonnull MetadataContext metadataContext) { + this.metadataContext = metadataContext; + } + + public GetRelevantQuestionsRequest limitRelevantQuestions( + @javax.annotation.Nullable Integer limitRelevantQuestions) { + this.limitRelevantQuestions = limitRelevantQuestions; + return this; + } + + /** + * Maximum number of relevant questions that is allowed in the response, default = 5. + * + * @return limitRelevantQuestions + */ + @javax.annotation.Nullable + public Integer getLimitRelevantQuestions() { + return limitRelevantQuestions; + } + + public void setLimitRelevantQuestions( + @javax.annotation.Nullable Integer limitRelevantQuestions) { + this.limitRelevantQuestions = limitRelevantQuestions; + } + + public GetRelevantQuestionsRequest bypassCache(@javax.annotation.Nullable Boolean bypassCache) { + this.bypassCache = bypassCache; + return this; + } + + /** + * If true, results are not returned from cache & calculated every time. + * + * @return bypassCache + */ + @javax.annotation.Nullable + public Boolean getBypassCache() { + return bypassCache; + } + + public void setBypassCache(@javax.annotation.Nullable Boolean bypassCache) { + this.bypassCache = bypassCache; + } + + public GetRelevantQuestionsRequest query(@javax.annotation.Nonnull String query) { + this.query = query; + return this; + } + + /** + * A user query that requires breaking down into smaller, more manageable analytical questions + * to facilitate better understanding and analysis. + * + * @return query + */ + @javax.annotation.Nonnull + public String getQuery() { + return query; + } + + public void setQuery(@javax.annotation.Nonnull String query) { + this.query = query; + } + + public GetRelevantQuestionsRequest aiContext(@javax.annotation.Nullable AIContext aiContext) { + this.aiContext = aiContext; + return this; + } + + /** + * Additional context to guide the response. + * + * @return aiContext + */ + @javax.annotation.Nullable + public AIContext getAiContext() { + return aiContext; + } + + public void setAiContext(@javax.annotation.Nullable AIContext aiContext) { + this.aiContext = aiContext; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key name of the property + * @param value value of the property + * @return the GetRelevantQuestionsRequest instance itself + */ + public GetRelevantQuestionsRequest putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return a map of objects + */ + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key name of the property + * @return an object + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + GetRelevantQuestionsRequest getRelevantQuestionsRequest = (GetRelevantQuestionsRequest) o; + return Objects.equals(this.metadataContext, getRelevantQuestionsRequest.metadataContext) + && Objects.equals( + this.limitRelevantQuestions, + getRelevantQuestionsRequest.limitRelevantQuestions) + && Objects.equals(this.bypassCache, getRelevantQuestionsRequest.bypassCache) + && Objects.equals(this.query, getRelevantQuestionsRequest.query) + && Objects.equals(this.aiContext, getRelevantQuestionsRequest.aiContext) + && Objects.equals( + this.additionalProperties, + getRelevantQuestionsRequest.additionalProperties); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b + || (a != null + && b != null + && a.isPresent() + && b.isPresent() + && Objects.deepEquals(a.get(), b.get())); + } + + @Override + public int hashCode() { + return Objects.hash( + metadataContext, + limitRelevantQuestions, + bypassCache, + query, + aiContext, + additionalProperties); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; + } + return a.isPresent() ? Arrays.deepHashCode(new Object[] {a.get()}) : 31; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class GetRelevantQuestionsRequest {\n"); + sb.append(" metadataContext: ").append(toIndentedString(metadataContext)).append("\n"); + sb.append(" limitRelevantQuestions: ") + .append(toIndentedString(limitRelevantQuestions)) + .append("\n"); + sb.append(" bypassCache: ").append(toIndentedString(bypassCache)).append("\n"); + sb.append(" query: ").append(toIndentedString(query)).append("\n"); + sb.append(" aiContext: ").append(toIndentedString(aiContext)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first + * line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("metadata_context"); + openapiFields.add("limit_relevant_questions"); + openapiFields.add("bypass_cache"); + openapiFields.add("query"); + openapiFields.add("ai_context"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + openapiRequiredFields.add("metadata_context"); + openapiRequiredFields.add("query"); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to + * GetRelevantQuestionsRequest + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!GetRelevantQuestionsRequest.openapiRequiredFields + .isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException( + String.format( + "The required field(s) %s in GetRelevantQuestionsRequest is not" + + " found in the empty JSON string", + GetRelevantQuestionsRequest.openapiRequiredFields.toString())); + } + } + + // check to make sure all required properties/fields are present in the JSON string + for (String requiredField : GetRelevantQuestionsRequest.openapiRequiredFields) { + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException( + String.format( + "The required field `%s` is not found in the JSON string: %s", + requiredField, jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // validate the required field `metadata_context` + MetadataContext.validateJsonElement(jsonObj.get("metadata_context")); + if (!jsonObj.get("query").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `query` to be a primitive type in the JSON string" + + " but got `%s`", + jsonObj.get("query").toString())); + } + // validate the optional field `ai_context` + if (jsonObj.get("ai_context") != null && !jsonObj.get("ai_context").isJsonNull()) { + AIContext.validateJsonElement(jsonObj.get("ai_context")); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!GetRelevantQuestionsRequest.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'GetRelevantQuestionsRequest' and its + // subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter = + gson.getDelegateAdapter(this, TypeToken.get(GetRelevantQuestionsRequest.class)); + + return (TypeAdapter) + new TypeAdapter() { + @Override + public void write(JsonWriter out, GetRelevantQuestionsRequest value) + throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + obj.remove("additionalProperties"); + // serialize additional properties + if (value.getAdditionalProperties() != null) { + for (Map.Entry entry : + value.getAdditionalProperties().entrySet()) { + if (entry.getValue() instanceof String) + obj.addProperty(entry.getKey(), (String) entry.getValue()); + else if (entry.getValue() instanceof Number) + obj.addProperty(entry.getKey(), (Number) entry.getValue()); + else if (entry.getValue() instanceof Boolean) + obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); + else if (entry.getValue() instanceof Character) + obj.addProperty( + entry.getKey(), (Character) entry.getValue()); + else { + JsonElement jsonElement = gson.toJsonTree(entry.getValue()); + if (jsonElement.isJsonArray()) { + obj.add(entry.getKey(), jsonElement.getAsJsonArray()); + } else { + obj.add(entry.getKey(), jsonElement.getAsJsonObject()); + } + } + } + } + elementAdapter.write(out, obj); + } + + @Override + public GetRelevantQuestionsRequest read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // store additional fields in the deserialized instance + GetRelevantQuestionsRequest instance = + thisAdapter.fromJsonTree(jsonObj); + for (Map.Entry entry : jsonObj.entrySet()) { + if (!openapiFields.contains(entry.getKey())) { + if (entry.getValue().isJsonPrimitive()) { // primitive type + if (entry.getValue().getAsJsonPrimitive().isString()) + instance.putAdditionalProperty( + entry.getKey(), entry.getValue().getAsString()); + else if (entry.getValue().getAsJsonPrimitive().isNumber()) + instance.putAdditionalProperty( + entry.getKey(), entry.getValue().getAsNumber()); + else if (entry.getValue().getAsJsonPrimitive().isBoolean()) + instance.putAdditionalProperty( + entry.getKey(), + entry.getValue().getAsBoolean()); + else + throw new IllegalArgumentException( + String.format( + "The field `%s` has unknown primitive" + + " type. Value: %s", + entry.getKey(), + entry.getValue().toString())); + } else if (entry.getValue().isJsonArray()) { + instance.putAdditionalProperty( + entry.getKey(), + gson.fromJson(entry.getValue(), List.class)); + } else { // JSON object + instance.putAdditionalProperty( + entry.getKey(), + gson.fromJson(entry.getValue(), HashMap.class)); + } + } + } + return instance; + } + }.nullSafe(); + } + } + + /** + * Create an instance of GetRelevantQuestionsRequest given an JSON string + * + * @param jsonString JSON string + * @return An instance of GetRelevantQuestionsRequest + * @throws IOException if the JSON string is invalid with respect to GetRelevantQuestionsRequest + */ + public static GetRelevantQuestionsRequest fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, GetRelevantQuestionsRequest.class); + } + + /** + * Convert an instance of GetRelevantQuestionsRequest to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} diff --git a/sdks/java/src/main/java/com/thoughtspot/client/model/GetTokenResponse.java b/sdks/java/src/main/java/com/thoughtspot/client/model/GetTokenResponse.java new file mode 100644 index 000000000..bbec6492e --- /dev/null +++ b/sdks/java/src/main/java/com/thoughtspot/client/model/GetTokenResponse.java @@ -0,0 +1,445 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client.model; + +import com.google.gson.Gson; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.TypeAdapter; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.annotations.SerializedName; +import com.google.gson.reflect.TypeToken; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import com.thoughtspot.client.JSON; +import java.io.IOException; +import java.io.Serializable; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Objects; + +/** GetTokenResponse */ +@javax.annotation.Generated( + value = "org.openapitools.codegen.languages.JavaClientCodegen", + comments = "Generator version: 7.12.0") +public class GetTokenResponse implements Serializable { + private static final long serialVersionUID = 1L; + + public static final String SERIALIZED_NAME_TOKEN = "token"; + + @SerializedName(SERIALIZED_NAME_TOKEN) + @javax.annotation.Nonnull + private String token; + + public static final String SERIALIZED_NAME_CREATION_TIME_IN_MILLIS = "creation_time_in_millis"; + + @SerializedName(SERIALIZED_NAME_CREATION_TIME_IN_MILLIS) + @javax.annotation.Nonnull + private Float creationTimeInMillis; + + public static final String SERIALIZED_NAME_EXPIRATION_TIME_IN_MILLIS = + "expiration_time_in_millis"; + + @SerializedName(SERIALIZED_NAME_EXPIRATION_TIME_IN_MILLIS) + @javax.annotation.Nonnull + private Float expirationTimeInMillis; + + public static final String SERIALIZED_NAME_VALID_FOR_USER_ID = "valid_for_user_id"; + + @SerializedName(SERIALIZED_NAME_VALID_FOR_USER_ID) + @javax.annotation.Nonnull + private String validForUserId; + + public static final String SERIALIZED_NAME_VALID_FOR_USERNAME = "valid_for_username"; + + @SerializedName(SERIALIZED_NAME_VALID_FOR_USERNAME) + @javax.annotation.Nonnull + private String validForUsername; + + public GetTokenResponse() {} + + public GetTokenResponse token(@javax.annotation.Nonnull String token) { + this.token = token; + return this; + } + + /** + * Bearer auth token. + * + * @return token + */ + @javax.annotation.Nonnull + public String getToken() { + return token; + } + + public void setToken(@javax.annotation.Nonnull String token) { + this.token = token; + } + + public GetTokenResponse creationTimeInMillis( + @javax.annotation.Nonnull Float creationTimeInMillis) { + this.creationTimeInMillis = creationTimeInMillis; + return this; + } + + /** + * Token creation time in milliseconds. + * + * @return creationTimeInMillis + */ + @javax.annotation.Nonnull + public Float getCreationTimeInMillis() { + return creationTimeInMillis; + } + + public void setCreationTimeInMillis(@javax.annotation.Nonnull Float creationTimeInMillis) { + this.creationTimeInMillis = creationTimeInMillis; + } + + public GetTokenResponse expirationTimeInMillis( + @javax.annotation.Nonnull Float expirationTimeInMillis) { + this.expirationTimeInMillis = expirationTimeInMillis; + return this; + } + + /** + * Token expiration time in milliseconds. + * + * @return expirationTimeInMillis + */ + @javax.annotation.Nonnull + public Float getExpirationTimeInMillis() { + return expirationTimeInMillis; + } + + public void setExpirationTimeInMillis(@javax.annotation.Nonnull Float expirationTimeInMillis) { + this.expirationTimeInMillis = expirationTimeInMillis; + } + + public GetTokenResponse validForUserId(@javax.annotation.Nonnull String validForUserId) { + this.validForUserId = validForUserId; + return this; + } + + /** + * Username to whom the token is issued. + * + * @return validForUserId + */ + @javax.annotation.Nonnull + public String getValidForUserId() { + return validForUserId; + } + + public void setValidForUserId(@javax.annotation.Nonnull String validForUserId) { + this.validForUserId = validForUserId; + } + + public GetTokenResponse validForUsername(@javax.annotation.Nonnull String validForUsername) { + this.validForUsername = validForUsername; + return this; + } + + /** + * Unique identifier of the user to whom the token is issued. + * + * @return validForUsername + */ + @javax.annotation.Nonnull + public String getValidForUsername() { + return validForUsername; + } + + public void setValidForUsername(@javax.annotation.Nonnull String validForUsername) { + this.validForUsername = validForUsername; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key name of the property + * @param value value of the property + * @return the GetTokenResponse instance itself + */ + public GetTokenResponse putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return a map of objects + */ + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key name of the property + * @return an object + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + GetTokenResponse getTokenResponse = (GetTokenResponse) o; + return Objects.equals(this.token, getTokenResponse.token) + && Objects.equals(this.creationTimeInMillis, getTokenResponse.creationTimeInMillis) + && Objects.equals( + this.expirationTimeInMillis, getTokenResponse.expirationTimeInMillis) + && Objects.equals(this.validForUserId, getTokenResponse.validForUserId) + && Objects.equals(this.validForUsername, getTokenResponse.validForUsername) + && Objects.equals(this.additionalProperties, getTokenResponse.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash( + token, + creationTimeInMillis, + expirationTimeInMillis, + validForUserId, + validForUsername, + additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class GetTokenResponse {\n"); + sb.append(" token: ").append(toIndentedString(token)).append("\n"); + sb.append(" creationTimeInMillis: ") + .append(toIndentedString(creationTimeInMillis)) + .append("\n"); + sb.append(" expirationTimeInMillis: ") + .append(toIndentedString(expirationTimeInMillis)) + .append("\n"); + sb.append(" validForUserId: ").append(toIndentedString(validForUserId)).append("\n"); + sb.append(" validForUsername: ").append(toIndentedString(validForUsername)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first + * line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("token"); + openapiFields.add("creation_time_in_millis"); + openapiFields.add("expiration_time_in_millis"); + openapiFields.add("valid_for_user_id"); + openapiFields.add("valid_for_username"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + openapiRequiredFields.add("token"); + openapiRequiredFields.add("creation_time_in_millis"); + openapiRequiredFields.add("expiration_time_in_millis"); + openapiRequiredFields.add("valid_for_user_id"); + openapiRequiredFields.add("valid_for_username"); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to GetTokenResponse + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!GetTokenResponse.openapiRequiredFields + .isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException( + String.format( + "The required field(s) %s in GetTokenResponse is not found in the" + + " empty JSON string", + GetTokenResponse.openapiRequiredFields.toString())); + } + } + + // check to make sure all required properties/fields are present in the JSON string + for (String requiredField : GetTokenResponse.openapiRequiredFields) { + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException( + String.format( + "The required field `%s` is not found in the JSON string: %s", + requiredField, jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if (!jsonObj.get("token").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `token` to be a primitive type in the JSON string" + + " but got `%s`", + jsonObj.get("token").toString())); + } + if (!jsonObj.get("valid_for_user_id").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `valid_for_user_id` to be a primitive type in the" + + " JSON string but got `%s`", + jsonObj.get("valid_for_user_id").toString())); + } + if (!jsonObj.get("valid_for_username").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `valid_for_username` to be a primitive type in the" + + " JSON string but got `%s`", + jsonObj.get("valid_for_username").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!GetTokenResponse.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'GetTokenResponse' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter = + gson.getDelegateAdapter(this, TypeToken.get(GetTokenResponse.class)); + + return (TypeAdapter) + new TypeAdapter() { + @Override + public void write(JsonWriter out, GetTokenResponse value) + throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + obj.remove("additionalProperties"); + // serialize additional properties + if (value.getAdditionalProperties() != null) { + for (Map.Entry entry : + value.getAdditionalProperties().entrySet()) { + if (entry.getValue() instanceof String) + obj.addProperty(entry.getKey(), (String) entry.getValue()); + else if (entry.getValue() instanceof Number) + obj.addProperty(entry.getKey(), (Number) entry.getValue()); + else if (entry.getValue() instanceof Boolean) + obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); + else if (entry.getValue() instanceof Character) + obj.addProperty( + entry.getKey(), (Character) entry.getValue()); + else { + JsonElement jsonElement = gson.toJsonTree(entry.getValue()); + if (jsonElement.isJsonArray()) { + obj.add(entry.getKey(), jsonElement.getAsJsonArray()); + } else { + obj.add(entry.getKey(), jsonElement.getAsJsonObject()); + } + } + } + } + elementAdapter.write(out, obj); + } + + @Override + public GetTokenResponse read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // store additional fields in the deserialized instance + GetTokenResponse instance = thisAdapter.fromJsonTree(jsonObj); + for (Map.Entry entry : jsonObj.entrySet()) { + if (!openapiFields.contains(entry.getKey())) { + if (entry.getValue().isJsonPrimitive()) { // primitive type + if (entry.getValue().getAsJsonPrimitive().isString()) + instance.putAdditionalProperty( + entry.getKey(), entry.getValue().getAsString()); + else if (entry.getValue().getAsJsonPrimitive().isNumber()) + instance.putAdditionalProperty( + entry.getKey(), entry.getValue().getAsNumber()); + else if (entry.getValue().getAsJsonPrimitive().isBoolean()) + instance.putAdditionalProperty( + entry.getKey(), + entry.getValue().getAsBoolean()); + else + throw new IllegalArgumentException( + String.format( + "The field `%s` has unknown primitive" + + " type. Value: %s", + entry.getKey(), + entry.getValue().toString())); + } else if (entry.getValue().isJsonArray()) { + instance.putAdditionalProperty( + entry.getKey(), + gson.fromJson(entry.getValue(), List.class)); + } else { // JSON object + instance.putAdditionalProperty( + entry.getKey(), + gson.fromJson(entry.getValue(), HashMap.class)); + } + } + } + return instance; + } + }.nullSafe(); + } + } + + /** + * Create an instance of GetTokenResponse given an JSON string + * + * @param jsonString JSON string + * @return An instance of GetTokenResponse + * @throws IOException if the JSON string is invalid with respect to GetTokenResponse + */ + public static GetTokenResponse fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, GetTokenResponse.class); + } + + /** + * Convert an instance of GetTokenResponse to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} diff --git a/sdks/java/src/main/java/com/thoughtspot/client/model/GroupInfo.java b/sdks/java/src/main/java/com/thoughtspot/client/model/GroupInfo.java new file mode 100644 index 000000000..a23470f65 --- /dev/null +++ b/sdks/java/src/main/java/com/thoughtspot/client/model/GroupInfo.java @@ -0,0 +1,344 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client.model; + +import com.google.gson.Gson; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.TypeAdapter; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.annotations.SerializedName; +import com.google.gson.reflect.TypeToken; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import com.thoughtspot.client.JSON; +import java.io.IOException; +import java.io.Serializable; +import java.util.Arrays; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Objects; +import org.openapitools.jackson.nullable.JsonNullable; + +/** Group information for non-embed access. */ +@javax.annotation.Generated( + value = "org.openapitools.codegen.languages.JavaClientCodegen", + comments = "Generator version: 7.12.0") +public class GroupInfo implements Serializable { + private static final long serialVersionUID = 1L; + + public static final String SERIALIZED_NAME_ID = "id"; + + @SerializedName(SERIALIZED_NAME_ID) + @javax.annotation.Nullable + private String id; + + public static final String SERIALIZED_NAME_NAME = "name"; + + @SerializedName(SERIALIZED_NAME_NAME) + @javax.annotation.Nullable + private String name; + + public GroupInfo() {} + + public GroupInfo id(@javax.annotation.Nullable String id) { + this.id = id; + return this; + } + + /** + * Unique identifier of the group. + * + * @return id + */ + @javax.annotation.Nullable + public String getId() { + return id; + } + + public void setId(@javax.annotation.Nullable String id) { + this.id = id; + } + + public GroupInfo name(@javax.annotation.Nullable String name) { + this.name = name; + return this; + } + + /** + * Name of the group. + * + * @return name + */ + @javax.annotation.Nullable + public String getName() { + return name; + } + + public void setName(@javax.annotation.Nullable String name) { + this.name = name; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key name of the property + * @param value value of the property + * @return the GroupInfo instance itself + */ + public GroupInfo putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return a map of objects + */ + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key name of the property + * @return an object + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + GroupInfo groupInfo = (GroupInfo) o; + return Objects.equals(this.id, groupInfo.id) + && Objects.equals(this.name, groupInfo.name) + && Objects.equals(this.additionalProperties, groupInfo.additionalProperties); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b + || (a != null + && b != null + && a.isPresent() + && b.isPresent() + && Objects.deepEquals(a.get(), b.get())); + } + + @Override + public int hashCode() { + return Objects.hash(id, name, additionalProperties); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; + } + return a.isPresent() ? Arrays.deepHashCode(new Object[] {a.get()}) : 31; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class GroupInfo {\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first + * line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("id"); + openapiFields.add("name"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to GroupInfo + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!GroupInfo.openapiRequiredFields + .isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException( + String.format( + "The required field(s) %s in GroupInfo is not found in the empty" + + " JSON string", + GroupInfo.openapiRequiredFields.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if ((jsonObj.get("id") != null && !jsonObj.get("id").isJsonNull()) + && !jsonObj.get("id").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `id` to be a primitive type in the JSON string but" + + " got `%s`", + jsonObj.get("id").toString())); + } + if ((jsonObj.get("name") != null && !jsonObj.get("name").isJsonNull()) + && !jsonObj.get("name").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `name` to be a primitive type in the JSON string" + + " but got `%s`", + jsonObj.get("name").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!GroupInfo.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'GroupInfo' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter = + gson.getDelegateAdapter(this, TypeToken.get(GroupInfo.class)); + + return (TypeAdapter) + new TypeAdapter() { + @Override + public void write(JsonWriter out, GroupInfo value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + obj.remove("additionalProperties"); + // serialize additional properties + if (value.getAdditionalProperties() != null) { + for (Map.Entry entry : + value.getAdditionalProperties().entrySet()) { + if (entry.getValue() instanceof String) + obj.addProperty(entry.getKey(), (String) entry.getValue()); + else if (entry.getValue() instanceof Number) + obj.addProperty(entry.getKey(), (Number) entry.getValue()); + else if (entry.getValue() instanceof Boolean) + obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); + else if (entry.getValue() instanceof Character) + obj.addProperty( + entry.getKey(), (Character) entry.getValue()); + else { + JsonElement jsonElement = gson.toJsonTree(entry.getValue()); + if (jsonElement.isJsonArray()) { + obj.add(entry.getKey(), jsonElement.getAsJsonArray()); + } else { + obj.add(entry.getKey(), jsonElement.getAsJsonObject()); + } + } + } + } + elementAdapter.write(out, obj); + } + + @Override + public GroupInfo read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // store additional fields in the deserialized instance + GroupInfo instance = thisAdapter.fromJsonTree(jsonObj); + for (Map.Entry entry : jsonObj.entrySet()) { + if (!openapiFields.contains(entry.getKey())) { + if (entry.getValue().isJsonPrimitive()) { // primitive type + if (entry.getValue().getAsJsonPrimitive().isString()) + instance.putAdditionalProperty( + entry.getKey(), entry.getValue().getAsString()); + else if (entry.getValue().getAsJsonPrimitive().isNumber()) + instance.putAdditionalProperty( + entry.getKey(), entry.getValue().getAsNumber()); + else if (entry.getValue().getAsJsonPrimitive().isBoolean()) + instance.putAdditionalProperty( + entry.getKey(), + entry.getValue().getAsBoolean()); + else + throw new IllegalArgumentException( + String.format( + "The field `%s` has unknown primitive" + + " type. Value: %s", + entry.getKey(), + entry.getValue().toString())); + } else if (entry.getValue().isJsonArray()) { + instance.putAdditionalProperty( + entry.getKey(), + gson.fromJson(entry.getValue(), List.class)); + } else { // JSON object + instance.putAdditionalProperty( + entry.getKey(), + gson.fromJson(entry.getValue(), HashMap.class)); + } + } + } + return instance; + } + }.nullSafe(); + } + } + + /** + * Create an instance of GroupInfo given an JSON string + * + * @param jsonString JSON string + * @return An instance of GroupInfo + * @throws IOException if the JSON string is invalid with respect to GroupInfo + */ + public static GroupInfo fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, GroupInfo.class); + } + + /** + * Convert an instance of GroupInfo to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} diff --git a/sdks/java/src/main/java/com/thoughtspot/client/model/GroupObject.java b/sdks/java/src/main/java/com/thoughtspot/client/model/GroupObject.java new file mode 100644 index 000000000..856e8c794 --- /dev/null +++ b/sdks/java/src/main/java/com/thoughtspot/client/model/GroupObject.java @@ -0,0 +1,308 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client.model; + +import com.google.gson.Gson; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.TypeAdapter; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.annotations.SerializedName; +import com.google.gson.reflect.TypeToken; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import com.thoughtspot.client.JSON; +import java.io.IOException; +import java.io.Serializable; +import java.util.Arrays; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Objects; +import org.openapitools.jackson.nullable.JsonNullable; + +/** Groups objects. */ +@javax.annotation.Generated( + value = "org.openapitools.codegen.languages.JavaClientCodegen", + comments = "Generator version: 7.12.0") +public class GroupObject implements Serializable { + private static final long serialVersionUID = 1L; + + public static final String SERIALIZED_NAME_IDENTIFIER = "identifier"; + + @SerializedName(SERIALIZED_NAME_IDENTIFIER) + @javax.annotation.Nullable + private String identifier; + + public GroupObject() {} + + public GroupObject identifier(@javax.annotation.Nullable String identifier) { + this.identifier = identifier; + return this; + } + + /** + * Get identifier + * + * @return identifier + */ + @javax.annotation.Nullable + public String getIdentifier() { + return identifier; + } + + public void setIdentifier(@javax.annotation.Nullable String identifier) { + this.identifier = identifier; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key name of the property + * @param value value of the property + * @return the GroupObject instance itself + */ + public GroupObject putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return a map of objects + */ + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key name of the property + * @return an object + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + GroupObject groupObject = (GroupObject) o; + return Objects.equals(this.identifier, groupObject.identifier) + && Objects.equals(this.additionalProperties, groupObject.additionalProperties); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b + || (a != null + && b != null + && a.isPresent() + && b.isPresent() + && Objects.deepEquals(a.get(), b.get())); + } + + @Override + public int hashCode() { + return Objects.hash(identifier, additionalProperties); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; + } + return a.isPresent() ? Arrays.deepHashCode(new Object[] {a.get()}) : 31; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class GroupObject {\n"); + sb.append(" identifier: ").append(toIndentedString(identifier)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first + * line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("identifier"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to GroupObject + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!GroupObject.openapiRequiredFields + .isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException( + String.format( + "The required field(s) %s in GroupObject is not found in the empty" + + " JSON string", + GroupObject.openapiRequiredFields.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if ((jsonObj.get("identifier") != null && !jsonObj.get("identifier").isJsonNull()) + && !jsonObj.get("identifier").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `identifier` to be a primitive type in the JSON" + + " string but got `%s`", + jsonObj.get("identifier").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!GroupObject.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'GroupObject' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter = + gson.getDelegateAdapter(this, TypeToken.get(GroupObject.class)); + + return (TypeAdapter) + new TypeAdapter() { + @Override + public void write(JsonWriter out, GroupObject value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + obj.remove("additionalProperties"); + // serialize additional properties + if (value.getAdditionalProperties() != null) { + for (Map.Entry entry : + value.getAdditionalProperties().entrySet()) { + if (entry.getValue() instanceof String) + obj.addProperty(entry.getKey(), (String) entry.getValue()); + else if (entry.getValue() instanceof Number) + obj.addProperty(entry.getKey(), (Number) entry.getValue()); + else if (entry.getValue() instanceof Boolean) + obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); + else if (entry.getValue() instanceof Character) + obj.addProperty( + entry.getKey(), (Character) entry.getValue()); + else { + JsonElement jsonElement = gson.toJsonTree(entry.getValue()); + if (jsonElement.isJsonArray()) { + obj.add(entry.getKey(), jsonElement.getAsJsonArray()); + } else { + obj.add(entry.getKey(), jsonElement.getAsJsonObject()); + } + } + } + } + elementAdapter.write(out, obj); + } + + @Override + public GroupObject read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // store additional fields in the deserialized instance + GroupObject instance = thisAdapter.fromJsonTree(jsonObj); + for (Map.Entry entry : jsonObj.entrySet()) { + if (!openapiFields.contains(entry.getKey())) { + if (entry.getValue().isJsonPrimitive()) { // primitive type + if (entry.getValue().getAsJsonPrimitive().isString()) + instance.putAdditionalProperty( + entry.getKey(), entry.getValue().getAsString()); + else if (entry.getValue().getAsJsonPrimitive().isNumber()) + instance.putAdditionalProperty( + entry.getKey(), entry.getValue().getAsNumber()); + else if (entry.getValue().getAsJsonPrimitive().isBoolean()) + instance.putAdditionalProperty( + entry.getKey(), + entry.getValue().getAsBoolean()); + else + throw new IllegalArgumentException( + String.format( + "The field `%s` has unknown primitive" + + " type. Value: %s", + entry.getKey(), + entry.getValue().toString())); + } else if (entry.getValue().isJsonArray()) { + instance.putAdditionalProperty( + entry.getKey(), + gson.fromJson(entry.getValue(), List.class)); + } else { // JSON object + instance.putAdditionalProperty( + entry.getKey(), + gson.fromJson(entry.getValue(), HashMap.class)); + } + } + } + return instance; + } + }.nullSafe(); + } + } + + /** + * Create an instance of GroupObject given an JSON string + * + * @param jsonString JSON string + * @return An instance of GroupObject + * @throws IOException if the JSON string is invalid with respect to GroupObject + */ + public static GroupObject fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, GroupObject.class); + } + + /** + * Convert an instance of GroupObject to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} diff --git a/sdks/java/src/main/java/com/thoughtspot/client/model/GroupsImportListInput.java b/sdks/java/src/main/java/com/thoughtspot/client/model/GroupsImportListInput.java new file mode 100644 index 000000000..ff0451b3d --- /dev/null +++ b/sdks/java/src/main/java/com/thoughtspot/client/model/GroupsImportListInput.java @@ -0,0 +1,911 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client.model; + +import com.google.gson.Gson; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.TypeAdapter; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.reflect.TypeToken; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import com.thoughtspot.client.JSON; +import java.io.IOException; +import java.io.Serializable; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Objects; +import org.openapitools.jackson.nullable.JsonNullable; + +/** GroupsImportListInput */ +@javax.annotation.Generated( + value = "org.openapitools.codegen.languages.JavaClientCodegen", + comments = "Generator version: 7.12.0") +public class GroupsImportListInput implements Serializable { + private static final long serialVersionUID = 1L; + + public static final String SERIALIZED_NAME_DISPLAY_NAME = "display_name"; + + @SerializedName(SERIALIZED_NAME_DISPLAY_NAME) + @javax.annotation.Nonnull + private String displayName; + + public static final String SERIALIZED_NAME_GROUP_IDENTIFIER = "group_identifier"; + + @SerializedName(SERIALIZED_NAME_GROUP_IDENTIFIER) + @javax.annotation.Nonnull + private String groupIdentifier; + + public static final String SERIALIZED_NAME_DEFAULT_LIVEBOARD_IDENTIFIERS = + "default_liveboard_identifiers"; + + @SerializedName(SERIALIZED_NAME_DEFAULT_LIVEBOARD_IDENTIFIERS) + @javax.annotation.Nullable + private List defaultLiveboardIdentifiers; + + public static final String SERIALIZED_NAME_DESCRIPTION = "description"; + + @SerializedName(SERIALIZED_NAME_DESCRIPTION) + @javax.annotation.Nullable + private String description; + + /** Gets or Sets privileges */ + @JsonAdapter(PrivilegesEnum.Adapter.class) + public enum PrivilegesEnum { + ADMINISTRATION("ADMINISTRATION"), + + AUTHORING("AUTHORING"), + + USERDATAUPLOADING("USERDATAUPLOADING"), + + DATADOWNLOADING("DATADOWNLOADING"), + + USERMANAGEMENT("USERMANAGEMENT"), + + DATAMANAGEMENT("DATAMANAGEMENT"), + + SHAREWITHALL("SHAREWITHALL"), + + JOBSCHEDULING("JOBSCHEDULING"), + + A3_ANALYSIS("A3ANALYSIS"), + + EXPERIMENTALFEATUREPRIVILEGE("EXPERIMENTALFEATUREPRIVILEGE"), + + BYPASSRLS("BYPASSRLS"), + + RANALYSIS("RANALYSIS"), + + DEVELOPER("DEVELOPER"), + + USER_ADMINISTRATION("USER_ADMINISTRATION"), + + GROUP_ADMINISTRATION("GROUP_ADMINISTRATION"), + + SYNCMANAGEMENT("SYNCMANAGEMENT"), + + CAN_CREATE_CATALOG("CAN_CREATE_CATALOG"), + + DISABLE_PINBOARD_CREATION("DISABLE_PINBOARD_CREATION"), + + LIVEBOARD_VERIFIER("LIVEBOARD_VERIFIER"), + + PREVIEW_THOUGHTSPOT_SAGE("PREVIEW_THOUGHTSPOT_SAGE"), + + CAN_MANAGE_VERSION_CONTROL("CAN_MANAGE_VERSION_CONTROL"), + + THIRDPARTY_ANALYSIS("THIRDPARTY_ANALYSIS"), + + ALLOW_NON_EMBED_FULL_APP_ACCESS("ALLOW_NON_EMBED_FULL_APP_ACCESS"), + + CAN_ACCESS_ANALYST_STUDIO("CAN_ACCESS_ANALYST_STUDIO"), + + CAN_MANAGE_ANALYST_STUDIO("CAN_MANAGE_ANALYST_STUDIO"), + + CAN_MODIFY_FOLDERS("CAN_MODIFY_FOLDERS"), + + CAN_MANAGE_VARIABLES("CAN_MANAGE_VARIABLES"), + + CAN_VIEW_FOLDERS("CAN_VIEW_FOLDERS"), + + CAN_MANAGE_AGENTSPOT("CAN_MANAGE_AGENTSPOT"), + + CAN_ACCESS_AGENTSPOT("CAN_ACCESS_AGENTSPOT"), + + PREVIEW_DOCUMENT_SEARCH("PREVIEW_DOCUMENT_SEARCH"), + + CAN_SETUP_VERSION_CONTROL("CAN_SETUP_VERSION_CONTROL"), + + CAN_DOWNLOAD_VISUALS("CAN_DOWNLOAD_VISUALS"), + + CAN_DOWNLOAD_DETAILED_DATA("CAN_DOWNLOAD_DETAILED_DATA"), + + CAN_USE_SPOTTER("CAN_USE_SPOTTER"); + + private String value; + + PrivilegesEnum(String value) { + this.value = value; + } + + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + public static PrivilegesEnum fromValue(String value) { + for (PrivilegesEnum b : PrivilegesEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + + public static class Adapter extends TypeAdapter { + @Override + public void write(final JsonWriter jsonWriter, final PrivilegesEnum enumeration) + throws IOException { + jsonWriter.value(enumeration.getValue()); + } + + @Override + public PrivilegesEnum read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + return PrivilegesEnum.fromValue(value); + } + } + + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + String value = jsonElement.getAsString(); + PrivilegesEnum.fromValue(value); + } + } + + public static final String SERIALIZED_NAME_PRIVILEGES = "privileges"; + + @SerializedName(SERIALIZED_NAME_PRIVILEGES) + @javax.annotation.Nullable + private List privileges; + + public static final String SERIALIZED_NAME_SUB_GROUP_IDENTIFIERS = "sub_group_identifiers"; + + @SerializedName(SERIALIZED_NAME_SUB_GROUP_IDENTIFIERS) + @javax.annotation.Nullable + private List subGroupIdentifiers; + + /** Type of the group. */ + @JsonAdapter(TypeEnum.Adapter.class) + public enum TypeEnum { + LOCAL_GROUP("LOCAL_GROUP"), + + LDAP_GROUP("LDAP_GROUP"), + + TEAM_GROUP("TEAM_GROUP"), + + TENANT_GROUP("TENANT_GROUP"); + + private String value; + + TypeEnum(String value) { + this.value = value; + } + + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + public static TypeEnum fromValue(String value) { + for (TypeEnum b : TypeEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + return null; + } + + public static class Adapter extends TypeAdapter { + @Override + public void write(final JsonWriter jsonWriter, final TypeEnum enumeration) + throws IOException { + jsonWriter.value(enumeration.getValue()); + } + + @Override + public TypeEnum read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + return TypeEnum.fromValue(value); + } + } + + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + String value = jsonElement.getAsString(); + TypeEnum.fromValue(value); + } + } + + public static final String SERIALIZED_NAME_TYPE = "type"; + + @SerializedName(SERIALIZED_NAME_TYPE) + @javax.annotation.Nullable + private TypeEnum type; + + public static final String SERIALIZED_NAME_USER_IDENTIFIERS = "user_identifiers"; + + @SerializedName(SERIALIZED_NAME_USER_IDENTIFIERS) + @javax.annotation.Nullable + private List userIdentifiers; + + /** + * Visibility of the group. The SHARABLE makes a group visible to other users and groups, and + * thus allows them to share objects. + */ + @JsonAdapter(VisibilityEnum.Adapter.class) + public enum VisibilityEnum { + SHARABLE("SHARABLE"), + + NON_SHARABLE("NON_SHARABLE"); + + private String value; + + VisibilityEnum(String value) { + this.value = value; + } + + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + public static VisibilityEnum fromValue(String value) { + for (VisibilityEnum b : VisibilityEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + return null; + } + + public static class Adapter extends TypeAdapter { + @Override + public void write(final JsonWriter jsonWriter, final VisibilityEnum enumeration) + throws IOException { + jsonWriter.value(enumeration.getValue()); + } + + @Override + public VisibilityEnum read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + return VisibilityEnum.fromValue(value); + } + } + + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + String value = jsonElement.getAsString(); + VisibilityEnum.fromValue(value); + } + } + + public static final String SERIALIZED_NAME_VISIBILITY = "visibility"; + + @SerializedName(SERIALIZED_NAME_VISIBILITY) + @javax.annotation.Nullable + private VisibilityEnum visibility; + + public GroupsImportListInput() {} + + public GroupsImportListInput displayName(@javax.annotation.Nonnull String displayName) { + this.displayName = displayName; + return this; + } + + /** + * Unique display name of the group. + * + * @return displayName + */ + @javax.annotation.Nonnull + public String getDisplayName() { + return displayName; + } + + public void setDisplayName(@javax.annotation.Nonnull String displayName) { + this.displayName = displayName; + } + + public GroupsImportListInput groupIdentifier(@javax.annotation.Nonnull String groupIdentifier) { + this.groupIdentifier = groupIdentifier; + return this; + } + + /** + * Unique ID or name of the group. + * + * @return groupIdentifier + */ + @javax.annotation.Nonnull + public String getGroupIdentifier() { + return groupIdentifier; + } + + public void setGroupIdentifier(@javax.annotation.Nonnull String groupIdentifier) { + this.groupIdentifier = groupIdentifier; + } + + public GroupsImportListInput defaultLiveboardIdentifiers( + @javax.annotation.Nullable List defaultLiveboardIdentifiers) { + this.defaultLiveboardIdentifiers = defaultLiveboardIdentifiers; + return this; + } + + public GroupsImportListInput addDefaultLiveboardIdentifiersItem( + String defaultLiveboardIdentifiersItem) { + if (this.defaultLiveboardIdentifiers == null) { + this.defaultLiveboardIdentifiers = new ArrayList<>(); + } + this.defaultLiveboardIdentifiers.add(defaultLiveboardIdentifiersItem); + return this; + } + + /** + * Unique ID of Liveboards that will be assigned as default Liveboards to the users in the + * group. + * + * @return defaultLiveboardIdentifiers + */ + @javax.annotation.Nullable + public List getDefaultLiveboardIdentifiers() { + return defaultLiveboardIdentifiers; + } + + public void setDefaultLiveboardIdentifiers( + @javax.annotation.Nullable List defaultLiveboardIdentifiers) { + this.defaultLiveboardIdentifiers = defaultLiveboardIdentifiers; + } + + public GroupsImportListInput description(@javax.annotation.Nullable String description) { + this.description = description; + return this; + } + + /** + * Description of the group. + * + * @return description + */ + @javax.annotation.Nullable + public String getDescription() { + return description; + } + + public void setDescription(@javax.annotation.Nullable String description) { + this.description = description; + } + + public GroupsImportListInput privileges( + @javax.annotation.Nullable List privileges) { + this.privileges = privileges; + return this; + } + + public GroupsImportListInput addPrivilegesItem(PrivilegesEnum privilegesItem) { + if (this.privileges == null) { + this.privileges = new ArrayList<>(); + } + this.privileges.add(privilegesItem); + return this; + } + + /** + * Privileges that will be assigned to the group. + * + * @return privileges + */ + @javax.annotation.Nullable + public List getPrivileges() { + return privileges; + } + + public void setPrivileges(@javax.annotation.Nullable List privileges) { + this.privileges = privileges; + } + + public GroupsImportListInput subGroupIdentifiers( + @javax.annotation.Nullable List subGroupIdentifiers) { + this.subGroupIdentifiers = subGroupIdentifiers; + return this; + } + + public GroupsImportListInput addSubGroupIdentifiersItem(String subGroupIdentifiersItem) { + if (this.subGroupIdentifiers == null) { + this.subGroupIdentifiers = new ArrayList<>(); + } + this.subGroupIdentifiers.add(subGroupIdentifiersItem); + return this; + } + + /** + * Unique ID or name of the sub-groups to add to the group. + * + * @return subGroupIdentifiers + */ + @javax.annotation.Nullable + public List getSubGroupIdentifiers() { + return subGroupIdentifiers; + } + + public void setSubGroupIdentifiers( + @javax.annotation.Nullable List subGroupIdentifiers) { + this.subGroupIdentifiers = subGroupIdentifiers; + } + + public GroupsImportListInput type(@javax.annotation.Nullable TypeEnum type) { + this.type = type; + return this; + } + + /** + * Type of the group. + * + * @return type + */ + @javax.annotation.Nullable + public TypeEnum getType() { + return type; + } + + public void setType(@javax.annotation.Nullable TypeEnum type) { + this.type = type; + } + + public GroupsImportListInput userIdentifiers( + @javax.annotation.Nullable List userIdentifiers) { + this.userIdentifiers = userIdentifiers; + return this; + } + + public GroupsImportListInput addUserIdentifiersItem(String userIdentifiersItem) { + if (this.userIdentifiers == null) { + this.userIdentifiers = new ArrayList<>(); + } + this.userIdentifiers.add(userIdentifiersItem); + return this; + } + + /** + * Unique ID or name of the users to assign to the group. + * + * @return userIdentifiers + */ + @javax.annotation.Nullable + public List getUserIdentifiers() { + return userIdentifiers; + } + + public void setUserIdentifiers(@javax.annotation.Nullable List userIdentifiers) { + this.userIdentifiers = userIdentifiers; + } + + public GroupsImportListInput visibility(@javax.annotation.Nullable VisibilityEnum visibility) { + this.visibility = visibility; + return this; + } + + /** + * Visibility of the group. The SHARABLE makes a group visible to other users and groups, and + * thus allows them to share objects. + * + * @return visibility + */ + @javax.annotation.Nullable + public VisibilityEnum getVisibility() { + return visibility; + } + + public void setVisibility(@javax.annotation.Nullable VisibilityEnum visibility) { + this.visibility = visibility; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key name of the property + * @param value value of the property + * @return the GroupsImportListInput instance itself + */ + public GroupsImportListInput putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return a map of objects + */ + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key name of the property + * @return an object + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + GroupsImportListInput groupsImportListInput = (GroupsImportListInput) o; + return Objects.equals(this.displayName, groupsImportListInput.displayName) + && Objects.equals(this.groupIdentifier, groupsImportListInput.groupIdentifier) + && Objects.equals( + this.defaultLiveboardIdentifiers, + groupsImportListInput.defaultLiveboardIdentifiers) + && Objects.equals(this.description, groupsImportListInput.description) + && Objects.equals(this.privileges, groupsImportListInput.privileges) + && Objects.equals( + this.subGroupIdentifiers, groupsImportListInput.subGroupIdentifiers) + && Objects.equals(this.type, groupsImportListInput.type) + && Objects.equals(this.userIdentifiers, groupsImportListInput.userIdentifiers) + && Objects.equals(this.visibility, groupsImportListInput.visibility) + && Objects.equals( + this.additionalProperties, groupsImportListInput.additionalProperties); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b + || (a != null + && b != null + && a.isPresent() + && b.isPresent() + && Objects.deepEquals(a.get(), b.get())); + } + + @Override + public int hashCode() { + return Objects.hash( + displayName, + groupIdentifier, + defaultLiveboardIdentifiers, + description, + privileges, + subGroupIdentifiers, + type, + userIdentifiers, + visibility, + additionalProperties); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; + } + return a.isPresent() ? Arrays.deepHashCode(new Object[] {a.get()}) : 31; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class GroupsImportListInput {\n"); + sb.append(" displayName: ").append(toIndentedString(displayName)).append("\n"); + sb.append(" groupIdentifier: ").append(toIndentedString(groupIdentifier)).append("\n"); + sb.append(" defaultLiveboardIdentifiers: ") + .append(toIndentedString(defaultLiveboardIdentifiers)) + .append("\n"); + sb.append(" description: ").append(toIndentedString(description)).append("\n"); + sb.append(" privileges: ").append(toIndentedString(privileges)).append("\n"); + sb.append(" subGroupIdentifiers: ") + .append(toIndentedString(subGroupIdentifiers)) + .append("\n"); + sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append(" userIdentifiers: ").append(toIndentedString(userIdentifiers)).append("\n"); + sb.append(" visibility: ").append(toIndentedString(visibility)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first + * line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("display_name"); + openapiFields.add("group_identifier"); + openapiFields.add("default_liveboard_identifiers"); + openapiFields.add("description"); + openapiFields.add("privileges"); + openapiFields.add("sub_group_identifiers"); + openapiFields.add("type"); + openapiFields.add("user_identifiers"); + openapiFields.add("visibility"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + openapiRequiredFields.add("display_name"); + openapiRequiredFields.add("group_identifier"); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to GroupsImportListInput + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!GroupsImportListInput.openapiRequiredFields + .isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException( + String.format( + "The required field(s) %s in GroupsImportListInput is not found in" + + " the empty JSON string", + GroupsImportListInput.openapiRequiredFields.toString())); + } + } + + // check to make sure all required properties/fields are present in the JSON string + for (String requiredField : GroupsImportListInput.openapiRequiredFields) { + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException( + String.format( + "The required field `%s` is not found in the JSON string: %s", + requiredField, jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if (!jsonObj.get("display_name").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `display_name` to be a primitive type in the JSON" + + " string but got `%s`", + jsonObj.get("display_name").toString())); + } + if (!jsonObj.get("group_identifier").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `group_identifier` to be a primitive type in the" + + " JSON string but got `%s`", + jsonObj.get("group_identifier").toString())); + } + // ensure the optional json data is an array if present + if (jsonObj.get("default_liveboard_identifiers") != null + && !jsonObj.get("default_liveboard_identifiers").isJsonNull() + && !jsonObj.get("default_liveboard_identifiers").isJsonArray()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `default_liveboard_identifiers` to be an array in" + + " the JSON string but got `%s`", + jsonObj.get("default_liveboard_identifiers").toString())); + } + if ((jsonObj.get("description") != null && !jsonObj.get("description").isJsonNull()) + && !jsonObj.get("description").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `description` to be a primitive type in the JSON" + + " string but got `%s`", + jsonObj.get("description").toString())); + } + // ensure the optional json data is an array if present + if (jsonObj.get("privileges") != null + && !jsonObj.get("privileges").isJsonNull() + && !jsonObj.get("privileges").isJsonArray()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `privileges` to be an array in the JSON string but" + + " got `%s`", + jsonObj.get("privileges").toString())); + } + // ensure the optional json data is an array if present + if (jsonObj.get("sub_group_identifiers") != null + && !jsonObj.get("sub_group_identifiers").isJsonNull() + && !jsonObj.get("sub_group_identifiers").isJsonArray()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `sub_group_identifiers` to be an array in the JSON" + + " string but got `%s`", + jsonObj.get("sub_group_identifiers").toString())); + } + if ((jsonObj.get("type") != null && !jsonObj.get("type").isJsonNull()) + && !jsonObj.get("type").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `type` to be a primitive type in the JSON string" + + " but got `%s`", + jsonObj.get("type").toString())); + } + // validate the optional field `type` + if (jsonObj.get("type") != null && !jsonObj.get("type").isJsonNull()) { + TypeEnum.validateJsonElement(jsonObj.get("type")); + } + // ensure the optional json data is an array if present + if (jsonObj.get("user_identifiers") != null + && !jsonObj.get("user_identifiers").isJsonNull() + && !jsonObj.get("user_identifiers").isJsonArray()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `user_identifiers` to be an array in the JSON" + + " string but got `%s`", + jsonObj.get("user_identifiers").toString())); + } + if ((jsonObj.get("visibility") != null && !jsonObj.get("visibility").isJsonNull()) + && !jsonObj.get("visibility").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `visibility` to be a primitive type in the JSON" + + " string but got `%s`", + jsonObj.get("visibility").toString())); + } + // validate the optional field `visibility` + if (jsonObj.get("visibility") != null && !jsonObj.get("visibility").isJsonNull()) { + VisibilityEnum.validateJsonElement(jsonObj.get("visibility")); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!GroupsImportListInput.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'GroupsImportListInput' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter = + gson.getDelegateAdapter(this, TypeToken.get(GroupsImportListInput.class)); + + return (TypeAdapter) + new TypeAdapter() { + @Override + public void write(JsonWriter out, GroupsImportListInput value) + throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + obj.remove("additionalProperties"); + // serialize additional properties + if (value.getAdditionalProperties() != null) { + for (Map.Entry entry : + value.getAdditionalProperties().entrySet()) { + if (entry.getValue() instanceof String) + obj.addProperty(entry.getKey(), (String) entry.getValue()); + else if (entry.getValue() instanceof Number) + obj.addProperty(entry.getKey(), (Number) entry.getValue()); + else if (entry.getValue() instanceof Boolean) + obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); + else if (entry.getValue() instanceof Character) + obj.addProperty( + entry.getKey(), (Character) entry.getValue()); + else { + JsonElement jsonElement = gson.toJsonTree(entry.getValue()); + if (jsonElement.isJsonArray()) { + obj.add(entry.getKey(), jsonElement.getAsJsonArray()); + } else { + obj.add(entry.getKey(), jsonElement.getAsJsonObject()); + } + } + } + } + elementAdapter.write(out, obj); + } + + @Override + public GroupsImportListInput read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // store additional fields in the deserialized instance + GroupsImportListInput instance = thisAdapter.fromJsonTree(jsonObj); + for (Map.Entry entry : jsonObj.entrySet()) { + if (!openapiFields.contains(entry.getKey())) { + if (entry.getValue().isJsonPrimitive()) { // primitive type + if (entry.getValue().getAsJsonPrimitive().isString()) + instance.putAdditionalProperty( + entry.getKey(), entry.getValue().getAsString()); + else if (entry.getValue().getAsJsonPrimitive().isNumber()) + instance.putAdditionalProperty( + entry.getKey(), entry.getValue().getAsNumber()); + else if (entry.getValue().getAsJsonPrimitive().isBoolean()) + instance.putAdditionalProperty( + entry.getKey(), + entry.getValue().getAsBoolean()); + else + throw new IllegalArgumentException( + String.format( + "The field `%s` has unknown primitive" + + " type. Value: %s", + entry.getKey(), + entry.getValue().toString())); + } else if (entry.getValue().isJsonArray()) { + instance.putAdditionalProperty( + entry.getKey(), + gson.fromJson(entry.getValue(), List.class)); + } else { // JSON object + instance.putAdditionalProperty( + entry.getKey(), + gson.fromJson(entry.getValue(), HashMap.class)); + } + } + } + return instance; + } + }.nullSafe(); + } + } + + /** + * Create an instance of GroupsImportListInput given an JSON string + * + * @param jsonString JSON string + * @return An instance of GroupsImportListInput + * @throws IOException if the JSON string is invalid with respect to GroupsImportListInput + */ + public static GroupsImportListInput fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, GroupsImportListInput.class); + } + + /** + * Convert an instance of GroupsImportListInput to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} diff --git a/sdks/java/src/main/java/com/thoughtspot/client/model/HeaderAttributeInput.java b/sdks/java/src/main/java/com/thoughtspot/client/model/HeaderAttributeInput.java new file mode 100644 index 000000000..36f429aad --- /dev/null +++ b/sdks/java/src/main/java/com/thoughtspot/client/model/HeaderAttributeInput.java @@ -0,0 +1,338 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client.model; + +import com.google.gson.Gson; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.TypeAdapter; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.annotations.SerializedName; +import com.google.gson.reflect.TypeToken; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import com.thoughtspot.client.JSON; +import java.io.IOException; +import java.io.Serializable; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Objects; + +/** Attribute to update in a header. */ +@javax.annotation.Generated( + value = "org.openapitools.codegen.languages.JavaClientCodegen", + comments = "Generator version: 7.12.0") +public class HeaderAttributeInput implements Serializable { + private static final long serialVersionUID = 1L; + + public static final String SERIALIZED_NAME_NAME = "name"; + + @SerializedName(SERIALIZED_NAME_NAME) + @javax.annotation.Nonnull + private String name; + + public static final String SERIALIZED_NAME_VALUE = "value"; + + @SerializedName(SERIALIZED_NAME_VALUE) + @javax.annotation.Nonnull + private String value; + + public HeaderAttributeInput() {} + + public HeaderAttributeInput name(@javax.annotation.Nonnull String name) { + this.name = name; + return this; + } + + /** + * Attribute name to be updated. + * + * @return name + */ + @javax.annotation.Nonnull + public String getName() { + return name; + } + + public void setName(@javax.annotation.Nonnull String name) { + this.name = name; + } + + public HeaderAttributeInput value(@javax.annotation.Nonnull String value) { + this.value = value; + return this; + } + + /** + * Attribute's new value. + * + * @return value + */ + @javax.annotation.Nonnull + public String getValue() { + return value; + } + + public void setValue(@javax.annotation.Nonnull String value) { + this.value = value; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key name of the property + * @param value value of the property + * @return the HeaderAttributeInput instance itself + */ + public HeaderAttributeInput putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return a map of objects + */ + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key name of the property + * @return an object + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + HeaderAttributeInput headerAttributeInput = (HeaderAttributeInput) o; + return Objects.equals(this.name, headerAttributeInput.name) + && Objects.equals(this.value, headerAttributeInput.value) + && Objects.equals( + this.additionalProperties, headerAttributeInput.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(name, value, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class HeaderAttributeInput {\n"); + sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append(" value: ").append(toIndentedString(value)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first + * line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("name"); + openapiFields.add("value"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + openapiRequiredFields.add("name"); + openapiRequiredFields.add("value"); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to HeaderAttributeInput + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!HeaderAttributeInput.openapiRequiredFields + .isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException( + String.format( + "The required field(s) %s in HeaderAttributeInput is not found in" + + " the empty JSON string", + HeaderAttributeInput.openapiRequiredFields.toString())); + } + } + + // check to make sure all required properties/fields are present in the JSON string + for (String requiredField : HeaderAttributeInput.openapiRequiredFields) { + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException( + String.format( + "The required field `%s` is not found in the JSON string: %s", + requiredField, jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if (!jsonObj.get("name").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `name` to be a primitive type in the JSON string" + + " but got `%s`", + jsonObj.get("name").toString())); + } + if (!jsonObj.get("value").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `value` to be a primitive type in the JSON string" + + " but got `%s`", + jsonObj.get("value").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!HeaderAttributeInput.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'HeaderAttributeInput' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter = + gson.getDelegateAdapter(this, TypeToken.get(HeaderAttributeInput.class)); + + return (TypeAdapter) + new TypeAdapter() { + @Override + public void write(JsonWriter out, HeaderAttributeInput value) + throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + obj.remove("additionalProperties"); + // serialize additional properties + if (value.getAdditionalProperties() != null) { + for (Map.Entry entry : + value.getAdditionalProperties().entrySet()) { + if (entry.getValue() instanceof String) + obj.addProperty(entry.getKey(), (String) entry.getValue()); + else if (entry.getValue() instanceof Number) + obj.addProperty(entry.getKey(), (Number) entry.getValue()); + else if (entry.getValue() instanceof Boolean) + obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); + else if (entry.getValue() instanceof Character) + obj.addProperty( + entry.getKey(), (Character) entry.getValue()); + else { + JsonElement jsonElement = gson.toJsonTree(entry.getValue()); + if (jsonElement.isJsonArray()) { + obj.add(entry.getKey(), jsonElement.getAsJsonArray()); + } else { + obj.add(entry.getKey(), jsonElement.getAsJsonObject()); + } + } + } + } + elementAdapter.write(out, obj); + } + + @Override + public HeaderAttributeInput read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // store additional fields in the deserialized instance + HeaderAttributeInput instance = thisAdapter.fromJsonTree(jsonObj); + for (Map.Entry entry : jsonObj.entrySet()) { + if (!openapiFields.contains(entry.getKey())) { + if (entry.getValue().isJsonPrimitive()) { // primitive type + if (entry.getValue().getAsJsonPrimitive().isString()) + instance.putAdditionalProperty( + entry.getKey(), entry.getValue().getAsString()); + else if (entry.getValue().getAsJsonPrimitive().isNumber()) + instance.putAdditionalProperty( + entry.getKey(), entry.getValue().getAsNumber()); + else if (entry.getValue().getAsJsonPrimitive().isBoolean()) + instance.putAdditionalProperty( + entry.getKey(), + entry.getValue().getAsBoolean()); + else + throw new IllegalArgumentException( + String.format( + "The field `%s` has unknown primitive" + + " type. Value: %s", + entry.getKey(), + entry.getValue().toString())); + } else if (entry.getValue().isJsonArray()) { + instance.putAdditionalProperty( + entry.getKey(), + gson.fromJson(entry.getValue(), List.class)); + } else { // JSON object + instance.putAdditionalProperty( + entry.getKey(), + gson.fromJson(entry.getValue(), HashMap.class)); + } + } + } + return instance; + } + }.nullSafe(); + } + } + + /** + * Create an instance of HeaderAttributeInput given an JSON string + * + * @param jsonString JSON string + * @return An instance of HeaderAttributeInput + * @throws IOException if the JSON string is invalid with respect to HeaderAttributeInput + */ + public static HeaderAttributeInput fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, HeaderAttributeInput.class); + } + + /** + * Convert an instance of HeaderAttributeInput to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} diff --git a/sdks/java/src/main/java/com/thoughtspot/client/model/HeaderUpdateInput.java b/sdks/java/src/main/java/com/thoughtspot/client/model/HeaderUpdateInput.java new file mode 100644 index 000000000..8783b9304 --- /dev/null +++ b/sdks/java/src/main/java/com/thoughtspot/client/model/HeaderUpdateInput.java @@ -0,0 +1,515 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client.model; + +import com.google.gson.Gson; +import com.google.gson.JsonArray; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.TypeAdapter; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.reflect.TypeToken; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import com.thoughtspot.client.JSON; +import java.io.IOException; +import java.io.Serializable; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Objects; +import org.openapitools.jackson.nullable.JsonNullable; + +/** Favorite object options. */ +@javax.annotation.Generated( + value = "org.openapitools.codegen.languages.JavaClientCodegen", + comments = "Generator version: 7.12.0") +public class HeaderUpdateInput implements Serializable { + private static final long serialVersionUID = 1L; + + public static final String SERIALIZED_NAME_IDENTIFIER = "identifier"; + + @SerializedName(SERIALIZED_NAME_IDENTIFIER) + @javax.annotation.Nullable + private String identifier; + + public static final String SERIALIZED_NAME_OBJ_IDENTIFIER = "obj_identifier"; + + @SerializedName(SERIALIZED_NAME_OBJ_IDENTIFIER) + @javax.annotation.Nullable + private String objIdentifier; + + /** Optional type of the header object. */ + @JsonAdapter(TypeEnum.Adapter.class) + public enum TypeEnum { + ANSWER("ANSWER"), + + LOGICAL_TABLE("LOGICAL_TABLE"), + + LOGICAL_COLUMN("LOGICAL_COLUMN"), + + LIVEBOARD("LIVEBOARD"), + + ACTION_OBJECT("ACTION_OBJECT"), + + DATA_SOURCE("DATA_SOURCE"), + + USER("USER"), + + USER_GROUP("USER_GROUP"); + + private String value; + + TypeEnum(String value) { + this.value = value; + } + + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + public static TypeEnum fromValue(String value) { + for (TypeEnum b : TypeEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + return null; + } + + public static class Adapter extends TypeAdapter { + @Override + public void write(final JsonWriter jsonWriter, final TypeEnum enumeration) + throws IOException { + jsonWriter.value(enumeration.getValue()); + } + + @Override + public TypeEnum read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + return TypeEnum.fromValue(value); + } + } + + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + String value = jsonElement.getAsString(); + TypeEnum.fromValue(value); + } + } + + public static final String SERIALIZED_NAME_TYPE = "type"; + + @SerializedName(SERIALIZED_NAME_TYPE) + @javax.annotation.Nullable + private TypeEnum type; + + public static final String SERIALIZED_NAME_ATTRIBUTES = "attributes"; + + @SerializedName(SERIALIZED_NAME_ATTRIBUTES) + @javax.annotation.Nonnull + private List attributes; + + public HeaderUpdateInput() {} + + public HeaderUpdateInput identifier(@javax.annotation.Nullable String identifier) { + this.identifier = identifier; + return this; + } + + /** + * Unique ID of a specified type to identify the header. + * + * @return identifier + */ + @javax.annotation.Nullable + public String getIdentifier() { + return identifier; + } + + public void setIdentifier(@javax.annotation.Nullable String identifier) { + this.identifier = identifier; + } + + public HeaderUpdateInput objIdentifier(@javax.annotation.Nullable String objIdentifier) { + this.objIdentifier = objIdentifier; + return this; + } + + /** + * Custom object identifier to uniquely identify header. + * + * @return objIdentifier + */ + @javax.annotation.Nullable + public String getObjIdentifier() { + return objIdentifier; + } + + public void setObjIdentifier(@javax.annotation.Nullable String objIdentifier) { + this.objIdentifier = objIdentifier; + } + + public HeaderUpdateInput type(@javax.annotation.Nullable TypeEnum type) { + this.type = type; + return this; + } + + /** + * Optional type of the header object. + * + * @return type + */ + @javax.annotation.Nullable + public TypeEnum getType() { + return type; + } + + public void setType(@javax.annotation.Nullable TypeEnum type) { + this.type = type; + } + + public HeaderUpdateInput attributes( + @javax.annotation.Nonnull List attributes) { + this.attributes = attributes; + return this; + } + + public HeaderUpdateInput addAttributesItem(HeaderAttributeInput attributesItem) { + if (this.attributes == null) { + this.attributes = new ArrayList<>(); + } + this.attributes.add(attributesItem); + return this; + } + + /** + * List of attributes to update + * + * @return attributes + */ + @javax.annotation.Nonnull + public List getAttributes() { + return attributes; + } + + public void setAttributes(@javax.annotation.Nonnull List attributes) { + this.attributes = attributes; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key name of the property + * @param value value of the property + * @return the HeaderUpdateInput instance itself + */ + public HeaderUpdateInput putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return a map of objects + */ + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key name of the property + * @return an object + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + HeaderUpdateInput headerUpdateInput = (HeaderUpdateInput) o; + return Objects.equals(this.identifier, headerUpdateInput.identifier) + && Objects.equals(this.objIdentifier, headerUpdateInput.objIdentifier) + && Objects.equals(this.type, headerUpdateInput.type) + && Objects.equals(this.attributes, headerUpdateInput.attributes) + && Objects.equals( + this.additionalProperties, headerUpdateInput.additionalProperties); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b + || (a != null + && b != null + && a.isPresent() + && b.isPresent() + && Objects.deepEquals(a.get(), b.get())); + } + + @Override + public int hashCode() { + return Objects.hash(identifier, objIdentifier, type, attributes, additionalProperties); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; + } + return a.isPresent() ? Arrays.deepHashCode(new Object[] {a.get()}) : 31; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class HeaderUpdateInput {\n"); + sb.append(" identifier: ").append(toIndentedString(identifier)).append("\n"); + sb.append(" objIdentifier: ").append(toIndentedString(objIdentifier)).append("\n"); + sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append(" attributes: ").append(toIndentedString(attributes)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first + * line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("identifier"); + openapiFields.add("obj_identifier"); + openapiFields.add("type"); + openapiFields.add("attributes"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + openapiRequiredFields.add("attributes"); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to HeaderUpdateInput + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!HeaderUpdateInput.openapiRequiredFields + .isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException( + String.format( + "The required field(s) %s in HeaderUpdateInput is not found in the" + + " empty JSON string", + HeaderUpdateInput.openapiRequiredFields.toString())); + } + } + + // check to make sure all required properties/fields are present in the JSON string + for (String requiredField : HeaderUpdateInput.openapiRequiredFields) { + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException( + String.format( + "The required field `%s` is not found in the JSON string: %s", + requiredField, jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if ((jsonObj.get("identifier") != null && !jsonObj.get("identifier").isJsonNull()) + && !jsonObj.get("identifier").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `identifier` to be a primitive type in the JSON" + + " string but got `%s`", + jsonObj.get("identifier").toString())); + } + if ((jsonObj.get("obj_identifier") != null && !jsonObj.get("obj_identifier").isJsonNull()) + && !jsonObj.get("obj_identifier").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `obj_identifier` to be a primitive type in the" + + " JSON string but got `%s`", + jsonObj.get("obj_identifier").toString())); + } + if ((jsonObj.get("type") != null && !jsonObj.get("type").isJsonNull()) + && !jsonObj.get("type").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `type` to be a primitive type in the JSON string" + + " but got `%s`", + jsonObj.get("type").toString())); + } + // validate the optional field `type` + if (jsonObj.get("type") != null && !jsonObj.get("type").isJsonNull()) { + TypeEnum.validateJsonElement(jsonObj.get("type")); + } + // ensure the json data is an array + if (!jsonObj.get("attributes").isJsonArray()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `attributes` to be an array in the JSON string but" + + " got `%s`", + jsonObj.get("attributes").toString())); + } + + JsonArray jsonArrayattributes = jsonObj.getAsJsonArray("attributes"); + // validate the required field `attributes` (array) + for (int i = 0; i < jsonArrayattributes.size(); i++) { + HeaderAttributeInput.validateJsonElement(jsonArrayattributes.get(i)); + } + ; + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!HeaderUpdateInput.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'HeaderUpdateInput' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter = + gson.getDelegateAdapter(this, TypeToken.get(HeaderUpdateInput.class)); + + return (TypeAdapter) + new TypeAdapter() { + @Override + public void write(JsonWriter out, HeaderUpdateInput value) + throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + obj.remove("additionalProperties"); + // serialize additional properties + if (value.getAdditionalProperties() != null) { + for (Map.Entry entry : + value.getAdditionalProperties().entrySet()) { + if (entry.getValue() instanceof String) + obj.addProperty(entry.getKey(), (String) entry.getValue()); + else if (entry.getValue() instanceof Number) + obj.addProperty(entry.getKey(), (Number) entry.getValue()); + else if (entry.getValue() instanceof Boolean) + obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); + else if (entry.getValue() instanceof Character) + obj.addProperty( + entry.getKey(), (Character) entry.getValue()); + else { + JsonElement jsonElement = gson.toJsonTree(entry.getValue()); + if (jsonElement.isJsonArray()) { + obj.add(entry.getKey(), jsonElement.getAsJsonArray()); + } else { + obj.add(entry.getKey(), jsonElement.getAsJsonObject()); + } + } + } + } + elementAdapter.write(out, obj); + } + + @Override + public HeaderUpdateInput read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // store additional fields in the deserialized instance + HeaderUpdateInput instance = thisAdapter.fromJsonTree(jsonObj); + for (Map.Entry entry : jsonObj.entrySet()) { + if (!openapiFields.contains(entry.getKey())) { + if (entry.getValue().isJsonPrimitive()) { // primitive type + if (entry.getValue().getAsJsonPrimitive().isString()) + instance.putAdditionalProperty( + entry.getKey(), entry.getValue().getAsString()); + else if (entry.getValue().getAsJsonPrimitive().isNumber()) + instance.putAdditionalProperty( + entry.getKey(), entry.getValue().getAsNumber()); + else if (entry.getValue().getAsJsonPrimitive().isBoolean()) + instance.putAdditionalProperty( + entry.getKey(), + entry.getValue().getAsBoolean()); + else + throw new IllegalArgumentException( + String.format( + "The field `%s` has unknown primitive" + + " type. Value: %s", + entry.getKey(), + entry.getValue().toString())); + } else if (entry.getValue().isJsonArray()) { + instance.putAdditionalProperty( + entry.getKey(), + gson.fromJson(entry.getValue(), List.class)); + } else { // JSON object + instance.putAdditionalProperty( + entry.getKey(), + gson.fromJson(entry.getValue(), HashMap.class)); + } + } + } + return instance; + } + }.nullSafe(); + } + } + + /** + * Create an instance of HeaderUpdateInput given an JSON string + * + * @param jsonString JSON string + * @return An instance of HeaderUpdateInput + * @throws IOException if the JSON string is invalid with respect to HeaderUpdateInput + */ + public static HeaderUpdateInput fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, HeaderUpdateInput.class); + } + + /** + * Convert an instance of HeaderUpdateInput to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} diff --git a/sdks/java/src/main/java/com/thoughtspot/client/model/ImportEPackAsyncTaskStatus.java b/sdks/java/src/main/java/com/thoughtspot/client/model/ImportEPackAsyncTaskStatus.java new file mode 100644 index 000000000..adf1a50d5 --- /dev/null +++ b/sdks/java/src/main/java/com/thoughtspot/client/model/ImportEPackAsyncTaskStatus.java @@ -0,0 +1,900 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client.model; + +import com.google.gson.Gson; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.TypeAdapter; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.reflect.TypeToken; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import com.thoughtspot.client.JSON; +import java.io.IOException; +import java.io.Serializable; +import java.util.Arrays; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Objects; +import org.openapitools.jackson.nullable.JsonNullable; + +/** ImportEPackAsyncTaskStatus */ +@javax.annotation.Generated( + value = "org.openapitools.codegen.languages.JavaClientCodegen", + comments = "Generator version: 7.12.0") +public class ImportEPackAsyncTaskStatus implements Serializable { + private static final long serialVersionUID = 1L; + + public static final String SERIALIZED_NAME_TENANT_ID = "tenant_id"; + + @SerializedName(SERIALIZED_NAME_TENANT_ID) + @javax.annotation.Nullable + private String tenantId; + + public static final String SERIALIZED_NAME_ORG_ID = "org_id"; + + @SerializedName(SERIALIZED_NAME_ORG_ID) + @javax.annotation.Nullable + private Integer orgId; + + public static final String SERIALIZED_NAME_TASK_ID = "task_id"; + + @SerializedName(SERIALIZED_NAME_TASK_ID) + @javax.annotation.Nullable + private String taskId; + + public static final String SERIALIZED_NAME_TASK_NAME = "task_name"; + + @SerializedName(SERIALIZED_NAME_TASK_NAME) + @javax.annotation.Nullable + private String taskName; + + public static final String SERIALIZED_NAME_IMPORT_RESPONSE = "import_response"; + + @SerializedName(SERIALIZED_NAME_IMPORT_RESPONSE) + @javax.annotation.Nullable + private Object importResponse; + + /** Current status of the task. */ + @JsonAdapter(TaskStatusEnum.Adapter.class) + public enum TaskStatusEnum { + COMPLETED("COMPLETED"), + + IN_QUEUE("IN_QUEUE"), + + IN_PROGRESS("IN_PROGRESS"), + + FAILED("FAILED"); + + private String value; + + TaskStatusEnum(String value) { + this.value = value; + } + + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + public static TaskStatusEnum fromValue(String value) { + for (TaskStatusEnum b : TaskStatusEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + return null; + } + + public static class Adapter extends TypeAdapter { + @Override + public void write(final JsonWriter jsonWriter, final TaskStatusEnum enumeration) + throws IOException { + jsonWriter.value(enumeration.getValue()); + } + + @Override + public TaskStatusEnum read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + return TaskStatusEnum.fromValue(value); + } + } + + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + String value = jsonElement.getAsString(); + TaskStatusEnum.fromValue(value); + } + } + + public static final String SERIALIZED_NAME_TASK_STATUS = "task_status"; + + @SerializedName(SERIALIZED_NAME_TASK_STATUS) + @javax.annotation.Nullable + private TaskStatusEnum taskStatus; + + public static final String SERIALIZED_NAME_AUTHOR_ID = "author_id"; + + @SerializedName(SERIALIZED_NAME_AUTHOR_ID) + @javax.annotation.Nullable + private String authorId; + + /** Policy used for the import task. */ + @JsonAdapter(ImportPolicyEnum.Adapter.class) + public enum ImportPolicyEnum { + PARTIAL("PARTIAL"), + + ALL_OR_NONE("ALL_OR_NONE"), + + VALIDATE_ONLY("VALIDATE_ONLY"), + + PARTIAL_OBJECT("PARTIAL_OBJECT"); + + private String value; + + ImportPolicyEnum(String value) { + this.value = value; + } + + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + public static ImportPolicyEnum fromValue(String value) { + for (ImportPolicyEnum b : ImportPolicyEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + return null; + } + + public static class Adapter extends TypeAdapter { + @Override + public void write(final JsonWriter jsonWriter, final ImportPolicyEnum enumeration) + throws IOException { + jsonWriter.value(enumeration.getValue()); + } + + @Override + public ImportPolicyEnum read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + return ImportPolicyEnum.fromValue(value); + } + } + + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + String value = jsonElement.getAsString(); + ImportPolicyEnum.fromValue(value); + } + } + + public static final String SERIALIZED_NAME_IMPORT_POLICY = "import_policy"; + + @SerializedName(SERIALIZED_NAME_IMPORT_POLICY) + @javax.annotation.Nullable + private ImportPolicyEnum importPolicy; + + public static final String SERIALIZED_NAME_CREATED_AT = "created_at"; + + @SerializedName(SERIALIZED_NAME_CREATED_AT) + @javax.annotation.Nullable + private Float createdAt; + + public static final String SERIALIZED_NAME_IN_PROGRESS_AT = "in_progress_at"; + + @SerializedName(SERIALIZED_NAME_IN_PROGRESS_AT) + @javax.annotation.Nullable + private Float inProgressAt; + + public static final String SERIALIZED_NAME_COMPLETED_AT = "completed_at"; + + @SerializedName(SERIALIZED_NAME_COMPLETED_AT) + @javax.annotation.Nullable + private Float completedAt; + + public static final String SERIALIZED_NAME_TOTAL_OBJECT_COUNT = "total_object_count"; + + @SerializedName(SERIALIZED_NAME_TOTAL_OBJECT_COUNT) + @javax.annotation.Nullable + private Integer totalObjectCount; + + public static final String SERIALIZED_NAME_OBJECT_PROCESSED_COUNT = "object_processed_count"; + + @SerializedName(SERIALIZED_NAME_OBJECT_PROCESSED_COUNT) + @javax.annotation.Nullable + private Integer objectProcessedCount; + + public static final String SERIALIZED_NAME_MODIFIED_AT = "modified_at"; + + @SerializedName(SERIALIZED_NAME_MODIFIED_AT) + @javax.annotation.Nullable + private Float modifiedAt; + + public static final String SERIALIZED_NAME_AUTHOR_DISPLAY_NAME = "author_display_name"; + + @SerializedName(SERIALIZED_NAME_AUTHOR_DISPLAY_NAME) + @javax.annotation.Nullable + private String authorDisplayName; + + public ImportEPackAsyncTaskStatus() {} + + public ImportEPackAsyncTaskStatus tenantId(@javax.annotation.Nullable String tenantId) { + this.tenantId = tenantId; + return this; + } + + /** + * GUID of tenant from which the task is initiated. + * + * @return tenantId + */ + @javax.annotation.Nullable + public String getTenantId() { + return tenantId; + } + + public void setTenantId(@javax.annotation.Nullable String tenantId) { + this.tenantId = tenantId; + } + + public ImportEPackAsyncTaskStatus orgId(@javax.annotation.Nullable Integer orgId) { + this.orgId = orgId; + return this; + } + + /** + * Organisation ID of the user who initiated the task. + * + * @return orgId + */ + @javax.annotation.Nullable + public Integer getOrgId() { + return orgId; + } + + public void setOrgId(@javax.annotation.Nullable Integer orgId) { + this.orgId = orgId; + } + + public ImportEPackAsyncTaskStatus taskId(@javax.annotation.Nullable String taskId) { + this.taskId = taskId; + return this; + } + + /** + * Unique identifier for the task. + * + * @return taskId + */ + @javax.annotation.Nullable + public String getTaskId() { + return taskId; + } + + public void setTaskId(@javax.annotation.Nullable String taskId) { + this.taskId = taskId; + } + + public ImportEPackAsyncTaskStatus taskName(@javax.annotation.Nullable String taskName) { + this.taskName = taskName; + return this; + } + + /** + * Name of the task. + * + * @return taskName + */ + @javax.annotation.Nullable + public String getTaskName() { + return taskName; + } + + public void setTaskName(@javax.annotation.Nullable String taskName) { + this.taskName = taskName; + } + + public ImportEPackAsyncTaskStatus importResponse( + @javax.annotation.Nullable Object importResponse) { + this.importResponse = importResponse; + return this; + } + + /** + * Response of imported objects so far. + * + * @return importResponse + */ + @javax.annotation.Nullable + public Object getImportResponse() { + return importResponse; + } + + public void setImportResponse(@javax.annotation.Nullable Object importResponse) { + this.importResponse = importResponse; + } + + public ImportEPackAsyncTaskStatus taskStatus( + @javax.annotation.Nullable TaskStatusEnum taskStatus) { + this.taskStatus = taskStatus; + return this; + } + + /** + * Current status of the task. + * + * @return taskStatus + */ + @javax.annotation.Nullable + public TaskStatusEnum getTaskStatus() { + return taskStatus; + } + + public void setTaskStatus(@javax.annotation.Nullable TaskStatusEnum taskStatus) { + this.taskStatus = taskStatus; + } + + public ImportEPackAsyncTaskStatus authorId(@javax.annotation.Nullable String authorId) { + this.authorId = authorId; + return this; + } + + /** + * ID of the user who initiated the task. + * + * @return authorId + */ + @javax.annotation.Nullable + public String getAuthorId() { + return authorId; + } + + public void setAuthorId(@javax.annotation.Nullable String authorId) { + this.authorId = authorId; + } + + public ImportEPackAsyncTaskStatus importPolicy( + @javax.annotation.Nullable ImportPolicyEnum importPolicy) { + this.importPolicy = importPolicy; + return this; + } + + /** + * Policy used for the import task. + * + * @return importPolicy + */ + @javax.annotation.Nullable + public ImportPolicyEnum getImportPolicy() { + return importPolicy; + } + + public void setImportPolicy(@javax.annotation.Nullable ImportPolicyEnum importPolicy) { + this.importPolicy = importPolicy; + } + + public ImportEPackAsyncTaskStatus createdAt(@javax.annotation.Nullable Float createdAt) { + this.createdAt = createdAt; + return this; + } + + /** + * Time when the task was created (in ms since epoch). + * + * @return createdAt + */ + @javax.annotation.Nullable + public Float getCreatedAt() { + return createdAt; + } + + public void setCreatedAt(@javax.annotation.Nullable Float createdAt) { + this.createdAt = createdAt; + } + + public ImportEPackAsyncTaskStatus inProgressAt(@javax.annotation.Nullable Float inProgressAt) { + this.inProgressAt = inProgressAt; + return this; + } + + /** + * Time when the task started (in ms since epoch). + * + * @return inProgressAt + */ + @javax.annotation.Nullable + public Float getInProgressAt() { + return inProgressAt; + } + + public void setInProgressAt(@javax.annotation.Nullable Float inProgressAt) { + this.inProgressAt = inProgressAt; + } + + public ImportEPackAsyncTaskStatus completedAt(@javax.annotation.Nullable Float completedAt) { + this.completedAt = completedAt; + return this; + } + + /** + * Time when the task was completed (in ms since epoch). + * + * @return completedAt + */ + @javax.annotation.Nullable + public Float getCompletedAt() { + return completedAt; + } + + public void setCompletedAt(@javax.annotation.Nullable Float completedAt) { + this.completedAt = completedAt; + } + + public ImportEPackAsyncTaskStatus totalObjectCount( + @javax.annotation.Nullable Integer totalObjectCount) { + this.totalObjectCount = totalObjectCount; + return this; + } + + /** + * Total number of objects to process. + * + * @return totalObjectCount + */ + @javax.annotation.Nullable + public Integer getTotalObjectCount() { + return totalObjectCount; + } + + public void setTotalObjectCount(@javax.annotation.Nullable Integer totalObjectCount) { + this.totalObjectCount = totalObjectCount; + } + + public ImportEPackAsyncTaskStatus objectProcessedCount( + @javax.annotation.Nullable Integer objectProcessedCount) { + this.objectProcessedCount = objectProcessedCount; + return this; + } + + /** + * Number of objects processed so far. + * + * @return objectProcessedCount + */ + @javax.annotation.Nullable + public Integer getObjectProcessedCount() { + return objectProcessedCount; + } + + public void setObjectProcessedCount(@javax.annotation.Nullable Integer objectProcessedCount) { + this.objectProcessedCount = objectProcessedCount; + } + + public ImportEPackAsyncTaskStatus modifiedAt(@javax.annotation.Nullable Float modifiedAt) { + this.modifiedAt = modifiedAt; + return this; + } + + /** + * Last time the task status was updated (in ms since epoch). + * + * @return modifiedAt + */ + @javax.annotation.Nullable + public Float getModifiedAt() { + return modifiedAt; + } + + public void setModifiedAt(@javax.annotation.Nullable Float modifiedAt) { + this.modifiedAt = modifiedAt; + } + + public ImportEPackAsyncTaskStatus authorDisplayName( + @javax.annotation.Nullable String authorDisplayName) { + this.authorDisplayName = authorDisplayName; + return this; + } + + /** + * Display name of the user who initiated the task. + * + * @return authorDisplayName + */ + @javax.annotation.Nullable + public String getAuthorDisplayName() { + return authorDisplayName; + } + + public void setAuthorDisplayName(@javax.annotation.Nullable String authorDisplayName) { + this.authorDisplayName = authorDisplayName; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key name of the property + * @param value value of the property + * @return the ImportEPackAsyncTaskStatus instance itself + */ + public ImportEPackAsyncTaskStatus putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return a map of objects + */ + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key name of the property + * @return an object + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ImportEPackAsyncTaskStatus importEPackAsyncTaskStatus = (ImportEPackAsyncTaskStatus) o; + return Objects.equals(this.tenantId, importEPackAsyncTaskStatus.tenantId) + && Objects.equals(this.orgId, importEPackAsyncTaskStatus.orgId) + && Objects.equals(this.taskId, importEPackAsyncTaskStatus.taskId) + && Objects.equals(this.taskName, importEPackAsyncTaskStatus.taskName) + && Objects.equals(this.importResponse, importEPackAsyncTaskStatus.importResponse) + && Objects.equals(this.taskStatus, importEPackAsyncTaskStatus.taskStatus) + && Objects.equals(this.authorId, importEPackAsyncTaskStatus.authorId) + && Objects.equals(this.importPolicy, importEPackAsyncTaskStatus.importPolicy) + && Objects.equals(this.createdAt, importEPackAsyncTaskStatus.createdAt) + && Objects.equals(this.inProgressAt, importEPackAsyncTaskStatus.inProgressAt) + && Objects.equals(this.completedAt, importEPackAsyncTaskStatus.completedAt) + && Objects.equals( + this.totalObjectCount, importEPackAsyncTaskStatus.totalObjectCount) + && Objects.equals( + this.objectProcessedCount, importEPackAsyncTaskStatus.objectProcessedCount) + && Objects.equals(this.modifiedAt, importEPackAsyncTaskStatus.modifiedAt) + && Objects.equals( + this.authorDisplayName, importEPackAsyncTaskStatus.authorDisplayName) + && Objects.equals( + this.additionalProperties, importEPackAsyncTaskStatus.additionalProperties); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b + || (a != null + && b != null + && a.isPresent() + && b.isPresent() + && Objects.deepEquals(a.get(), b.get())); + } + + @Override + public int hashCode() { + return Objects.hash( + tenantId, + orgId, + taskId, + taskName, + importResponse, + taskStatus, + authorId, + importPolicy, + createdAt, + inProgressAt, + completedAt, + totalObjectCount, + objectProcessedCount, + modifiedAt, + authorDisplayName, + additionalProperties); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; + } + return a.isPresent() ? Arrays.deepHashCode(new Object[] {a.get()}) : 31; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ImportEPackAsyncTaskStatus {\n"); + sb.append(" tenantId: ").append(toIndentedString(tenantId)).append("\n"); + sb.append(" orgId: ").append(toIndentedString(orgId)).append("\n"); + sb.append(" taskId: ").append(toIndentedString(taskId)).append("\n"); + sb.append(" taskName: ").append(toIndentedString(taskName)).append("\n"); + sb.append(" importResponse: ").append(toIndentedString(importResponse)).append("\n"); + sb.append(" taskStatus: ").append(toIndentedString(taskStatus)).append("\n"); + sb.append(" authorId: ").append(toIndentedString(authorId)).append("\n"); + sb.append(" importPolicy: ").append(toIndentedString(importPolicy)).append("\n"); + sb.append(" createdAt: ").append(toIndentedString(createdAt)).append("\n"); + sb.append(" inProgressAt: ").append(toIndentedString(inProgressAt)).append("\n"); + sb.append(" completedAt: ").append(toIndentedString(completedAt)).append("\n"); + sb.append(" totalObjectCount: ").append(toIndentedString(totalObjectCount)).append("\n"); + sb.append(" objectProcessedCount: ") + .append(toIndentedString(objectProcessedCount)) + .append("\n"); + sb.append(" modifiedAt: ").append(toIndentedString(modifiedAt)).append("\n"); + sb.append(" authorDisplayName: ") + .append(toIndentedString(authorDisplayName)) + .append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first + * line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("tenant_id"); + openapiFields.add("org_id"); + openapiFields.add("task_id"); + openapiFields.add("task_name"); + openapiFields.add("import_response"); + openapiFields.add("task_status"); + openapiFields.add("author_id"); + openapiFields.add("import_policy"); + openapiFields.add("created_at"); + openapiFields.add("in_progress_at"); + openapiFields.add("completed_at"); + openapiFields.add("total_object_count"); + openapiFields.add("object_processed_count"); + openapiFields.add("modified_at"); + openapiFields.add("author_display_name"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to ImportEPackAsyncTaskStatus + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!ImportEPackAsyncTaskStatus.openapiRequiredFields + .isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException( + String.format( + "The required field(s) %s in ImportEPackAsyncTaskStatus is not" + + " found in the empty JSON string", + ImportEPackAsyncTaskStatus.openapiRequiredFields.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if ((jsonObj.get("tenant_id") != null && !jsonObj.get("tenant_id").isJsonNull()) + && !jsonObj.get("tenant_id").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `tenant_id` to be a primitive type in the JSON" + + " string but got `%s`", + jsonObj.get("tenant_id").toString())); + } + if ((jsonObj.get("task_id") != null && !jsonObj.get("task_id").isJsonNull()) + && !jsonObj.get("task_id").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `task_id` to be a primitive type in the JSON" + + " string but got `%s`", + jsonObj.get("task_id").toString())); + } + if ((jsonObj.get("task_name") != null && !jsonObj.get("task_name").isJsonNull()) + && !jsonObj.get("task_name").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `task_name` to be a primitive type in the JSON" + + " string but got `%s`", + jsonObj.get("task_name").toString())); + } + if ((jsonObj.get("task_status") != null && !jsonObj.get("task_status").isJsonNull()) + && !jsonObj.get("task_status").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `task_status` to be a primitive type in the JSON" + + " string but got `%s`", + jsonObj.get("task_status").toString())); + } + // validate the optional field `task_status` + if (jsonObj.get("task_status") != null && !jsonObj.get("task_status").isJsonNull()) { + TaskStatusEnum.validateJsonElement(jsonObj.get("task_status")); + } + if ((jsonObj.get("author_id") != null && !jsonObj.get("author_id").isJsonNull()) + && !jsonObj.get("author_id").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `author_id` to be a primitive type in the JSON" + + " string but got `%s`", + jsonObj.get("author_id").toString())); + } + if ((jsonObj.get("import_policy") != null && !jsonObj.get("import_policy").isJsonNull()) + && !jsonObj.get("import_policy").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `import_policy` to be a primitive type in the JSON" + + " string but got `%s`", + jsonObj.get("import_policy").toString())); + } + // validate the optional field `import_policy` + if (jsonObj.get("import_policy") != null && !jsonObj.get("import_policy").isJsonNull()) { + ImportPolicyEnum.validateJsonElement(jsonObj.get("import_policy")); + } + if ((jsonObj.get("author_display_name") != null + && !jsonObj.get("author_display_name").isJsonNull()) + && !jsonObj.get("author_display_name").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `author_display_name` to be a primitive type in" + + " the JSON string but got `%s`", + jsonObj.get("author_display_name").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!ImportEPackAsyncTaskStatus.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'ImportEPackAsyncTaskStatus' and its + // subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter = + gson.getDelegateAdapter(this, TypeToken.get(ImportEPackAsyncTaskStatus.class)); + + return (TypeAdapter) + new TypeAdapter() { + @Override + public void write(JsonWriter out, ImportEPackAsyncTaskStatus value) + throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + obj.remove("additionalProperties"); + // serialize additional properties + if (value.getAdditionalProperties() != null) { + for (Map.Entry entry : + value.getAdditionalProperties().entrySet()) { + if (entry.getValue() instanceof String) + obj.addProperty(entry.getKey(), (String) entry.getValue()); + else if (entry.getValue() instanceof Number) + obj.addProperty(entry.getKey(), (Number) entry.getValue()); + else if (entry.getValue() instanceof Boolean) + obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); + else if (entry.getValue() instanceof Character) + obj.addProperty( + entry.getKey(), (Character) entry.getValue()); + else { + JsonElement jsonElement = gson.toJsonTree(entry.getValue()); + if (jsonElement.isJsonArray()) { + obj.add(entry.getKey(), jsonElement.getAsJsonArray()); + } else { + obj.add(entry.getKey(), jsonElement.getAsJsonObject()); + } + } + } + } + elementAdapter.write(out, obj); + } + + @Override + public ImportEPackAsyncTaskStatus read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // store additional fields in the deserialized instance + ImportEPackAsyncTaskStatus instance = thisAdapter.fromJsonTree(jsonObj); + for (Map.Entry entry : jsonObj.entrySet()) { + if (!openapiFields.contains(entry.getKey())) { + if (entry.getValue().isJsonPrimitive()) { // primitive type + if (entry.getValue().getAsJsonPrimitive().isString()) + instance.putAdditionalProperty( + entry.getKey(), entry.getValue().getAsString()); + else if (entry.getValue().getAsJsonPrimitive().isNumber()) + instance.putAdditionalProperty( + entry.getKey(), entry.getValue().getAsNumber()); + else if (entry.getValue().getAsJsonPrimitive().isBoolean()) + instance.putAdditionalProperty( + entry.getKey(), + entry.getValue().getAsBoolean()); + else + throw new IllegalArgumentException( + String.format( + "The field `%s` has unknown primitive" + + " type. Value: %s", + entry.getKey(), + entry.getValue().toString())); + } else if (entry.getValue().isJsonArray()) { + instance.putAdditionalProperty( + entry.getKey(), + gson.fromJson(entry.getValue(), List.class)); + } else { // JSON object + instance.putAdditionalProperty( + entry.getKey(), + gson.fromJson(entry.getValue(), HashMap.class)); + } + } + } + return instance; + } + }.nullSafe(); + } + } + + /** + * Create an instance of ImportEPackAsyncTaskStatus given an JSON string + * + * @param jsonString JSON string + * @return An instance of ImportEPackAsyncTaskStatus + * @throws IOException if the JSON string is invalid with respect to ImportEPackAsyncTaskStatus + */ + public static ImportEPackAsyncTaskStatus fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, ImportEPackAsyncTaskStatus.class); + } + + /** + * Convert an instance of ImportEPackAsyncTaskStatus to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} diff --git a/sdks/java/src/main/java/com/thoughtspot/client/model/ImportMetadataTMLAsyncRequest.java b/sdks/java/src/main/java/com/thoughtspot/client/model/ImportMetadataTMLAsyncRequest.java new file mode 100644 index 000000000..d72b692a1 --- /dev/null +++ b/sdks/java/src/main/java/com/thoughtspot/client/model/ImportMetadataTMLAsyncRequest.java @@ -0,0 +1,575 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client.model; + +import com.google.gson.Gson; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.TypeAdapter; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.reflect.TypeToken; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import com.thoughtspot.client.JSON; +import java.io.IOException; +import java.io.Serializable; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Objects; +import org.openapitools.jackson.nullable.JsonNullable; + +/** ImportMetadataTMLAsyncRequest */ +@javax.annotation.Generated( + value = "org.openapitools.codegen.languages.JavaClientCodegen", + comments = "Generator version: 7.12.0") +public class ImportMetadataTMLAsyncRequest implements Serializable { + private static final long serialVersionUID = 1L; + + public static final String SERIALIZED_NAME_METADATA_TMLS = "metadata_tmls"; + + @SerializedName(SERIALIZED_NAME_METADATA_TMLS) + @javax.annotation.Nonnull + private List metadataTmls; + + public static final String SERIALIZED_NAME_CREATE_NEW = "create_new"; + + @SerializedName(SERIALIZED_NAME_CREATE_NEW) + @javax.annotation.Nullable + private Boolean createNew = false; + + public static final String SERIALIZED_NAME_ALL_ORGS_OVERRIDE = "all_orgs_override"; + + @SerializedName(SERIALIZED_NAME_ALL_ORGS_OVERRIDE) + @javax.annotation.Nullable + private Boolean allOrgsOverride = false; + + /** + * <div>Version: 10.5.0.cl or later </div> Policy to be followed while importing the + * TML. Valid values are [PARTIAL_OBJECT, PARTIAL, VALIDATE_ONLY, ALL_OR_NONE] + */ + @JsonAdapter(ImportPolicyEnum.Adapter.class) + public enum ImportPolicyEnum { + PARTIAL("PARTIAL"), + + ALL_OR_NONE("ALL_OR_NONE"), + + VALIDATE_ONLY("VALIDATE_ONLY"), + + PARTIAL_OBJECT("PARTIAL_OBJECT"); + + private String value; + + ImportPolicyEnum(String value) { + this.value = value; + } + + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + public static ImportPolicyEnum fromValue(String value) { + for (ImportPolicyEnum b : ImportPolicyEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + + public static class Adapter extends TypeAdapter { + @Override + public void write(final JsonWriter jsonWriter, final ImportPolicyEnum enumeration) + throws IOException { + jsonWriter.value(enumeration.getValue()); + } + + @Override + public ImportPolicyEnum read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + return ImportPolicyEnum.fromValue(value); + } + } + + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + String value = jsonElement.getAsString(); + ImportPolicyEnum.fromValue(value); + } + } + + public static final String SERIALIZED_NAME_IMPORT_POLICY = "import_policy"; + + @SerializedName(SERIALIZED_NAME_IMPORT_POLICY) + @javax.annotation.Nullable + private ImportPolicyEnum importPolicy = ImportPolicyEnum.PARTIAL_OBJECT; + + public static final String SERIALIZED_NAME_SKIP_DIFF_CHECK = "skip_diff_check"; + + @SerializedName(SERIALIZED_NAME_SKIP_DIFF_CHECK) + @javax.annotation.Nullable + private Boolean skipDiffCheck = false; + + public static final String SERIALIZED_NAME_ENABLE_LARGE_METADATA_VALIDATION = + "enable_large_metadata_validation"; + + @SerializedName(SERIALIZED_NAME_ENABLE_LARGE_METADATA_VALIDATION) + @javax.annotation.Nullable + private Boolean enableLargeMetadataValidation = false; + + public ImportMetadataTMLAsyncRequest() {} + + public ImportMetadataTMLAsyncRequest metadataTmls( + @javax.annotation.Nonnull List metadataTmls) { + this.metadataTmls = metadataTmls; + return this; + } + + public ImportMetadataTMLAsyncRequest addMetadataTmlsItem(String metadataTmlsItem) { + if (this.metadataTmls == null) { + this.metadataTmls = new ArrayList<>(); + } + this.metadataTmls.add(metadataTmlsItem); + return this; + } + + /** + * Details of TML objects. + * + * @return metadataTmls + */ + @javax.annotation.Nonnull + public List getMetadataTmls() { + return metadataTmls; + } + + public void setMetadataTmls(@javax.annotation.Nonnull List metadataTmls) { + this.metadataTmls = metadataTmls; + } + + public ImportMetadataTMLAsyncRequest createNew(@javax.annotation.Nullable Boolean createNew) { + this.createNew = createNew; + return this; + } + + /** + * If selected, creates TML objects with new GUIDs. + * + * @return createNew + */ + @javax.annotation.Nullable + public Boolean getCreateNew() { + return createNew; + } + + public void setCreateNew(@javax.annotation.Nullable Boolean createNew) { + this.createNew = createNew; + } + + public ImportMetadataTMLAsyncRequest allOrgsOverride( + @javax.annotation.Nullable Boolean allOrgsOverride) { + this.allOrgsOverride = allOrgsOverride; + return this; + } + + /** + * If import is happening from all orgs context. + * + * @return allOrgsOverride + */ + @javax.annotation.Nullable + public Boolean getAllOrgsOverride() { + return allOrgsOverride; + } + + public void setAllOrgsOverride(@javax.annotation.Nullable Boolean allOrgsOverride) { + this.allOrgsOverride = allOrgsOverride; + } + + public ImportMetadataTMLAsyncRequest importPolicy( + @javax.annotation.Nullable ImportPolicyEnum importPolicy) { + this.importPolicy = importPolicy; + return this; + } + + /** + * <div>Version: 10.5.0.cl or later </div> Policy to be followed while importing the + * TML. Valid values are [PARTIAL_OBJECT, PARTIAL, VALIDATE_ONLY, ALL_OR_NONE] + * + * @return importPolicy + */ + @javax.annotation.Nullable + public ImportPolicyEnum getImportPolicy() { + return importPolicy; + } + + public void setImportPolicy(@javax.annotation.Nullable ImportPolicyEnum importPolicy) { + this.importPolicy = importPolicy; + } + + public ImportMetadataTMLAsyncRequest skipDiffCheck( + @javax.annotation.Nullable Boolean skipDiffCheck) { + this.skipDiffCheck = skipDiffCheck; + return this; + } + + /** + * <div>Version: 10.6.0.cl or later </div> Boolean Flag to skip TML diff check + * before processing object TMLs. + * + * @return skipDiffCheck + */ + @javax.annotation.Nullable + public Boolean getSkipDiffCheck() { + return skipDiffCheck; + } + + public void setSkipDiffCheck(@javax.annotation.Nullable Boolean skipDiffCheck) { + this.skipDiffCheck = skipDiffCheck; + } + + public ImportMetadataTMLAsyncRequest enableLargeMetadataValidation( + @javax.annotation.Nullable Boolean enableLargeMetadataValidation) { + this.enableLargeMetadataValidation = enableLargeMetadataValidation; + return this; + } + + /** + * <div>Version: 10.5.0.cl or later </div> Boolean to indicate if the large metadata + * validation should be enabled. + * + * @return enableLargeMetadataValidation + */ + @javax.annotation.Nullable + public Boolean getEnableLargeMetadataValidation() { + return enableLargeMetadataValidation; + } + + public void setEnableLargeMetadataValidation( + @javax.annotation.Nullable Boolean enableLargeMetadataValidation) { + this.enableLargeMetadataValidation = enableLargeMetadataValidation; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key name of the property + * @param value value of the property + * @return the ImportMetadataTMLAsyncRequest instance itself + */ + public ImportMetadataTMLAsyncRequest putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return a map of objects + */ + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key name of the property + * @return an object + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ImportMetadataTMLAsyncRequest importMetadataTMLAsyncRequest = + (ImportMetadataTMLAsyncRequest) o; + return Objects.equals(this.metadataTmls, importMetadataTMLAsyncRequest.metadataTmls) + && Objects.equals(this.createNew, importMetadataTMLAsyncRequest.createNew) + && Objects.equals( + this.allOrgsOverride, importMetadataTMLAsyncRequest.allOrgsOverride) + && Objects.equals(this.importPolicy, importMetadataTMLAsyncRequest.importPolicy) + && Objects.equals(this.skipDiffCheck, importMetadataTMLAsyncRequest.skipDiffCheck) + && Objects.equals( + this.enableLargeMetadataValidation, + importMetadataTMLAsyncRequest.enableLargeMetadataValidation) + && Objects.equals( + this.additionalProperties, + importMetadataTMLAsyncRequest.additionalProperties); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b + || (a != null + && b != null + && a.isPresent() + && b.isPresent() + && Objects.deepEquals(a.get(), b.get())); + } + + @Override + public int hashCode() { + return Objects.hash( + metadataTmls, + createNew, + allOrgsOverride, + importPolicy, + skipDiffCheck, + enableLargeMetadataValidation, + additionalProperties); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; + } + return a.isPresent() ? Arrays.deepHashCode(new Object[] {a.get()}) : 31; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ImportMetadataTMLAsyncRequest {\n"); + sb.append(" metadataTmls: ").append(toIndentedString(metadataTmls)).append("\n"); + sb.append(" createNew: ").append(toIndentedString(createNew)).append("\n"); + sb.append(" allOrgsOverride: ").append(toIndentedString(allOrgsOverride)).append("\n"); + sb.append(" importPolicy: ").append(toIndentedString(importPolicy)).append("\n"); + sb.append(" skipDiffCheck: ").append(toIndentedString(skipDiffCheck)).append("\n"); + sb.append(" enableLargeMetadataValidation: ") + .append(toIndentedString(enableLargeMetadataValidation)) + .append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first + * line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("metadata_tmls"); + openapiFields.add("create_new"); + openapiFields.add("all_orgs_override"); + openapiFields.add("import_policy"); + openapiFields.add("skip_diff_check"); + openapiFields.add("enable_large_metadata_validation"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + openapiRequiredFields.add("metadata_tmls"); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to + * ImportMetadataTMLAsyncRequest + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!ImportMetadataTMLAsyncRequest.openapiRequiredFields + .isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException( + String.format( + "The required field(s) %s in ImportMetadataTMLAsyncRequest is not" + + " found in the empty JSON string", + ImportMetadataTMLAsyncRequest.openapiRequiredFields.toString())); + } + } + + // check to make sure all required properties/fields are present in the JSON string + for (String requiredField : ImportMetadataTMLAsyncRequest.openapiRequiredFields) { + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException( + String.format( + "The required field `%s` is not found in the JSON string: %s", + requiredField, jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // ensure the required json array is present + if (jsonObj.get("metadata_tmls") == null) { + throw new IllegalArgumentException( + "Expected the field `linkedContent` to be an array in the JSON string but got" + + " `null`"); + } else if (!jsonObj.get("metadata_tmls").isJsonArray()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `metadata_tmls` to be an array in the JSON string" + + " but got `%s`", + jsonObj.get("metadata_tmls").toString())); + } + if ((jsonObj.get("import_policy") != null && !jsonObj.get("import_policy").isJsonNull()) + && !jsonObj.get("import_policy").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `import_policy` to be a primitive type in the JSON" + + " string but got `%s`", + jsonObj.get("import_policy").toString())); + } + // validate the optional field `import_policy` + if (jsonObj.get("import_policy") != null && !jsonObj.get("import_policy").isJsonNull()) { + ImportPolicyEnum.validateJsonElement(jsonObj.get("import_policy")); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!ImportMetadataTMLAsyncRequest.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'ImportMetadataTMLAsyncRequest' and its + // subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter = + gson.getDelegateAdapter( + this, TypeToken.get(ImportMetadataTMLAsyncRequest.class)); + + return (TypeAdapter) + new TypeAdapter() { + @Override + public void write(JsonWriter out, ImportMetadataTMLAsyncRequest value) + throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + obj.remove("additionalProperties"); + // serialize additional properties + if (value.getAdditionalProperties() != null) { + for (Map.Entry entry : + value.getAdditionalProperties().entrySet()) { + if (entry.getValue() instanceof String) + obj.addProperty(entry.getKey(), (String) entry.getValue()); + else if (entry.getValue() instanceof Number) + obj.addProperty(entry.getKey(), (Number) entry.getValue()); + else if (entry.getValue() instanceof Boolean) + obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); + else if (entry.getValue() instanceof Character) + obj.addProperty( + entry.getKey(), (Character) entry.getValue()); + else { + JsonElement jsonElement = gson.toJsonTree(entry.getValue()); + if (jsonElement.isJsonArray()) { + obj.add(entry.getKey(), jsonElement.getAsJsonArray()); + } else { + obj.add(entry.getKey(), jsonElement.getAsJsonObject()); + } + } + } + } + elementAdapter.write(out, obj); + } + + @Override + public ImportMetadataTMLAsyncRequest read(JsonReader in) + throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // store additional fields in the deserialized instance + ImportMetadataTMLAsyncRequest instance = + thisAdapter.fromJsonTree(jsonObj); + for (Map.Entry entry : jsonObj.entrySet()) { + if (!openapiFields.contains(entry.getKey())) { + if (entry.getValue().isJsonPrimitive()) { // primitive type + if (entry.getValue().getAsJsonPrimitive().isString()) + instance.putAdditionalProperty( + entry.getKey(), entry.getValue().getAsString()); + else if (entry.getValue().getAsJsonPrimitive().isNumber()) + instance.putAdditionalProperty( + entry.getKey(), entry.getValue().getAsNumber()); + else if (entry.getValue().getAsJsonPrimitive().isBoolean()) + instance.putAdditionalProperty( + entry.getKey(), + entry.getValue().getAsBoolean()); + else + throw new IllegalArgumentException( + String.format( + "The field `%s` has unknown primitive" + + " type. Value: %s", + entry.getKey(), + entry.getValue().toString())); + } else if (entry.getValue().isJsonArray()) { + instance.putAdditionalProperty( + entry.getKey(), + gson.fromJson(entry.getValue(), List.class)); + } else { // JSON object + instance.putAdditionalProperty( + entry.getKey(), + gson.fromJson(entry.getValue(), HashMap.class)); + } + } + } + return instance; + } + }.nullSafe(); + } + } + + /** + * Create an instance of ImportMetadataTMLAsyncRequest given an JSON string + * + * @param jsonString JSON string + * @return An instance of ImportMetadataTMLAsyncRequest + * @throws IOException if the JSON string is invalid with respect to + * ImportMetadataTMLAsyncRequest + */ + public static ImportMetadataTMLAsyncRequest fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, ImportMetadataTMLAsyncRequest.class); + } + + /** + * Convert an instance of ImportMetadataTMLAsyncRequest to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} diff --git a/sdks/java/src/main/java/com/thoughtspot/client/model/ImportMetadataTMLRequest.java b/sdks/java/src/main/java/com/thoughtspot/client/model/ImportMetadataTMLRequest.java new file mode 100644 index 000000000..6f08361ac --- /dev/null +++ b/sdks/java/src/main/java/com/thoughtspot/client/model/ImportMetadataTMLRequest.java @@ -0,0 +1,566 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client.model; + +import com.google.gson.Gson; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.TypeAdapter; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.reflect.TypeToken; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import com.thoughtspot.client.JSON; +import java.io.IOException; +import java.io.Serializable; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Objects; +import org.openapitools.jackson.nullable.JsonNullable; + +/** ImportMetadataTMLRequest */ +@javax.annotation.Generated( + value = "org.openapitools.codegen.languages.JavaClientCodegen", + comments = "Generator version: 7.12.0") +public class ImportMetadataTMLRequest implements Serializable { + private static final long serialVersionUID = 1L; + + public static final String SERIALIZED_NAME_METADATA_TMLS = "metadata_tmls"; + + @SerializedName(SERIALIZED_NAME_METADATA_TMLS) + @javax.annotation.Nonnull + private List metadataTmls; + + /** Specifies the import policy for the TML import. */ + @JsonAdapter(ImportPolicyEnum.Adapter.class) + public enum ImportPolicyEnum { + PARTIAL("PARTIAL"), + + ALL_OR_NONE("ALL_OR_NONE"), + + VALIDATE_ONLY("VALIDATE_ONLY"), + + PARTIAL_OBJECT("PARTIAL_OBJECT"); + + private String value; + + ImportPolicyEnum(String value) { + this.value = value; + } + + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + public static ImportPolicyEnum fromValue(String value) { + for (ImportPolicyEnum b : ImportPolicyEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + + public static class Adapter extends TypeAdapter { + @Override + public void write(final JsonWriter jsonWriter, final ImportPolicyEnum enumeration) + throws IOException { + jsonWriter.value(enumeration.getValue()); + } + + @Override + public ImportPolicyEnum read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + return ImportPolicyEnum.fromValue(value); + } + } + + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + String value = jsonElement.getAsString(); + ImportPolicyEnum.fromValue(value); + } + } + + public static final String SERIALIZED_NAME_IMPORT_POLICY = "import_policy"; + + @SerializedName(SERIALIZED_NAME_IMPORT_POLICY) + @javax.annotation.Nullable + private ImportPolicyEnum importPolicy = ImportPolicyEnum.PARTIAL; + + public static final String SERIALIZED_NAME_CREATE_NEW = "create_new"; + + @SerializedName(SERIALIZED_NAME_CREATE_NEW) + @javax.annotation.Nullable + private Boolean createNew = false; + + public static final String SERIALIZED_NAME_ALL_ORGS_OVERRIDE = "all_orgs_override"; + + @SerializedName(SERIALIZED_NAME_ALL_ORGS_OVERRIDE) + @javax.annotation.Nullable + private Boolean allOrgsOverride = false; + + public static final String SERIALIZED_NAME_SKIP_DIFF_CHECK = "skip_diff_check"; + + @SerializedName(SERIALIZED_NAME_SKIP_DIFF_CHECK) + @javax.annotation.Nullable + private Boolean skipDiffCheck = false; + + public static final String SERIALIZED_NAME_ENABLE_LARGE_METADATA_VALIDATION = + "enable_large_metadata_validation"; + + @SerializedName(SERIALIZED_NAME_ENABLE_LARGE_METADATA_VALIDATION) + @javax.annotation.Nullable + private Boolean enableLargeMetadataValidation = false; + + public ImportMetadataTMLRequest() {} + + public ImportMetadataTMLRequest metadataTmls( + @javax.annotation.Nonnull List metadataTmls) { + this.metadataTmls = metadataTmls; + return this; + } + + public ImportMetadataTMLRequest addMetadataTmlsItem(String metadataTmlsItem) { + if (this.metadataTmls == null) { + this.metadataTmls = new ArrayList<>(); + } + this.metadataTmls.add(metadataTmlsItem); + return this; + } + + /** + * Details of TML objects. **Note: importing TML in YAML format, when coming directly from our + * Playground, is currently requires manual formatting. For more details on the workaround, + * please click + * [here](https://developers.thoughtspot.com/docs/known-issues#_version_9_12_0_cl)** + * + * @return metadataTmls + */ + @javax.annotation.Nonnull + public List getMetadataTmls() { + return metadataTmls; + } + + public void setMetadataTmls(@javax.annotation.Nonnull List metadataTmls) { + this.metadataTmls = metadataTmls; + } + + public ImportMetadataTMLRequest importPolicy( + @javax.annotation.Nullable ImportPolicyEnum importPolicy) { + this.importPolicy = importPolicy; + return this; + } + + /** + * Specifies the import policy for the TML import. + * + * @return importPolicy + */ + @javax.annotation.Nullable + public ImportPolicyEnum getImportPolicy() { + return importPolicy; + } + + public void setImportPolicy(@javax.annotation.Nullable ImportPolicyEnum importPolicy) { + this.importPolicy = importPolicy; + } + + public ImportMetadataTMLRequest createNew(@javax.annotation.Nullable Boolean createNew) { + this.createNew = createNew; + return this; + } + + /** + * If selected, creates TML objects with new GUIDs. + * + * @return createNew + */ + @javax.annotation.Nullable + public Boolean getCreateNew() { + return createNew; + } + + public void setCreateNew(@javax.annotation.Nullable Boolean createNew) { + this.createNew = createNew; + } + + public ImportMetadataTMLRequest allOrgsOverride( + @javax.annotation.Nullable Boolean allOrgsOverride) { + this.allOrgsOverride = allOrgsOverride; + return this; + } + + /** + * If import is happening from all orgs context. + * + * @return allOrgsOverride + */ + @javax.annotation.Nullable + public Boolean getAllOrgsOverride() { + return allOrgsOverride; + } + + public void setAllOrgsOverride(@javax.annotation.Nullable Boolean allOrgsOverride) { + this.allOrgsOverride = allOrgsOverride; + } + + public ImportMetadataTMLRequest skipDiffCheck( + @javax.annotation.Nullable Boolean skipDiffCheck) { + this.skipDiffCheck = skipDiffCheck; + return this; + } + + /** + * <div>Version: 10.6.0.cl or later </div> Boolean Flag to skip TML diff check + * before processing object TMLs. + * + * @return skipDiffCheck + */ + @javax.annotation.Nullable + public Boolean getSkipDiffCheck() { + return skipDiffCheck; + } + + public void setSkipDiffCheck(@javax.annotation.Nullable Boolean skipDiffCheck) { + this.skipDiffCheck = skipDiffCheck; + } + + public ImportMetadataTMLRequest enableLargeMetadataValidation( + @javax.annotation.Nullable Boolean enableLargeMetadataValidation) { + this.enableLargeMetadataValidation = enableLargeMetadataValidation; + return this; + } + + /** + * <div>Version: 10.5.0.cl or later </div> Boolean to indicate if the large metadata + * validation should be enabled. + * + * @return enableLargeMetadataValidation + */ + @javax.annotation.Nullable + public Boolean getEnableLargeMetadataValidation() { + return enableLargeMetadataValidation; + } + + public void setEnableLargeMetadataValidation( + @javax.annotation.Nullable Boolean enableLargeMetadataValidation) { + this.enableLargeMetadataValidation = enableLargeMetadataValidation; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key name of the property + * @param value value of the property + * @return the ImportMetadataTMLRequest instance itself + */ + public ImportMetadataTMLRequest putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return a map of objects + */ + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key name of the property + * @return an object + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ImportMetadataTMLRequest importMetadataTMLRequest = (ImportMetadataTMLRequest) o; + return Objects.equals(this.metadataTmls, importMetadataTMLRequest.metadataTmls) + && Objects.equals(this.importPolicy, importMetadataTMLRequest.importPolicy) + && Objects.equals(this.createNew, importMetadataTMLRequest.createNew) + && Objects.equals(this.allOrgsOverride, importMetadataTMLRequest.allOrgsOverride) + && Objects.equals(this.skipDiffCheck, importMetadataTMLRequest.skipDiffCheck) + && Objects.equals( + this.enableLargeMetadataValidation, + importMetadataTMLRequest.enableLargeMetadataValidation) + && Objects.equals( + this.additionalProperties, importMetadataTMLRequest.additionalProperties); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b + || (a != null + && b != null + && a.isPresent() + && b.isPresent() + && Objects.deepEquals(a.get(), b.get())); + } + + @Override + public int hashCode() { + return Objects.hash( + metadataTmls, + importPolicy, + createNew, + allOrgsOverride, + skipDiffCheck, + enableLargeMetadataValidation, + additionalProperties); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; + } + return a.isPresent() ? Arrays.deepHashCode(new Object[] {a.get()}) : 31; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ImportMetadataTMLRequest {\n"); + sb.append(" metadataTmls: ").append(toIndentedString(metadataTmls)).append("\n"); + sb.append(" importPolicy: ").append(toIndentedString(importPolicy)).append("\n"); + sb.append(" createNew: ").append(toIndentedString(createNew)).append("\n"); + sb.append(" allOrgsOverride: ").append(toIndentedString(allOrgsOverride)).append("\n"); + sb.append(" skipDiffCheck: ").append(toIndentedString(skipDiffCheck)).append("\n"); + sb.append(" enableLargeMetadataValidation: ") + .append(toIndentedString(enableLargeMetadataValidation)) + .append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first + * line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("metadata_tmls"); + openapiFields.add("import_policy"); + openapiFields.add("create_new"); + openapiFields.add("all_orgs_override"); + openapiFields.add("skip_diff_check"); + openapiFields.add("enable_large_metadata_validation"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + openapiRequiredFields.add("metadata_tmls"); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to ImportMetadataTMLRequest + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!ImportMetadataTMLRequest.openapiRequiredFields + .isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException( + String.format( + "The required field(s) %s in ImportMetadataTMLRequest is not found" + + " in the empty JSON string", + ImportMetadataTMLRequest.openapiRequiredFields.toString())); + } + } + + // check to make sure all required properties/fields are present in the JSON string + for (String requiredField : ImportMetadataTMLRequest.openapiRequiredFields) { + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException( + String.format( + "The required field `%s` is not found in the JSON string: %s", + requiredField, jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // ensure the required json array is present + if (jsonObj.get("metadata_tmls") == null) { + throw new IllegalArgumentException( + "Expected the field `linkedContent` to be an array in the JSON string but got" + + " `null`"); + } else if (!jsonObj.get("metadata_tmls").isJsonArray()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `metadata_tmls` to be an array in the JSON string" + + " but got `%s`", + jsonObj.get("metadata_tmls").toString())); + } + if ((jsonObj.get("import_policy") != null && !jsonObj.get("import_policy").isJsonNull()) + && !jsonObj.get("import_policy").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `import_policy` to be a primitive type in the JSON" + + " string but got `%s`", + jsonObj.get("import_policy").toString())); + } + // validate the optional field `import_policy` + if (jsonObj.get("import_policy") != null && !jsonObj.get("import_policy").isJsonNull()) { + ImportPolicyEnum.validateJsonElement(jsonObj.get("import_policy")); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!ImportMetadataTMLRequest.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'ImportMetadataTMLRequest' and its + // subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter = + gson.getDelegateAdapter(this, TypeToken.get(ImportMetadataTMLRequest.class)); + + return (TypeAdapter) + new TypeAdapter() { + @Override + public void write(JsonWriter out, ImportMetadataTMLRequest value) + throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + obj.remove("additionalProperties"); + // serialize additional properties + if (value.getAdditionalProperties() != null) { + for (Map.Entry entry : + value.getAdditionalProperties().entrySet()) { + if (entry.getValue() instanceof String) + obj.addProperty(entry.getKey(), (String) entry.getValue()); + else if (entry.getValue() instanceof Number) + obj.addProperty(entry.getKey(), (Number) entry.getValue()); + else if (entry.getValue() instanceof Boolean) + obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); + else if (entry.getValue() instanceof Character) + obj.addProperty( + entry.getKey(), (Character) entry.getValue()); + else { + JsonElement jsonElement = gson.toJsonTree(entry.getValue()); + if (jsonElement.isJsonArray()) { + obj.add(entry.getKey(), jsonElement.getAsJsonArray()); + } else { + obj.add(entry.getKey(), jsonElement.getAsJsonObject()); + } + } + } + } + elementAdapter.write(out, obj); + } + + @Override + public ImportMetadataTMLRequest read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // store additional fields in the deserialized instance + ImportMetadataTMLRequest instance = thisAdapter.fromJsonTree(jsonObj); + for (Map.Entry entry : jsonObj.entrySet()) { + if (!openapiFields.contains(entry.getKey())) { + if (entry.getValue().isJsonPrimitive()) { // primitive type + if (entry.getValue().getAsJsonPrimitive().isString()) + instance.putAdditionalProperty( + entry.getKey(), entry.getValue().getAsString()); + else if (entry.getValue().getAsJsonPrimitive().isNumber()) + instance.putAdditionalProperty( + entry.getKey(), entry.getValue().getAsNumber()); + else if (entry.getValue().getAsJsonPrimitive().isBoolean()) + instance.putAdditionalProperty( + entry.getKey(), + entry.getValue().getAsBoolean()); + else + throw new IllegalArgumentException( + String.format( + "The field `%s` has unknown primitive" + + " type. Value: %s", + entry.getKey(), + entry.getValue().toString())); + } else if (entry.getValue().isJsonArray()) { + instance.putAdditionalProperty( + entry.getKey(), + gson.fromJson(entry.getValue(), List.class)); + } else { // JSON object + instance.putAdditionalProperty( + entry.getKey(), + gson.fromJson(entry.getValue(), HashMap.class)); + } + } + } + return instance; + } + }.nullSafe(); + } + } + + /** + * Create an instance of ImportMetadataTMLRequest given an JSON string + * + * @param jsonString JSON string + * @return An instance of ImportMetadataTMLRequest + * @throws IOException if the JSON string is invalid with respect to ImportMetadataTMLRequest + */ + public static ImportMetadataTMLRequest fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, ImportMetadataTMLRequest.class); + } + + /** + * Convert an instance of ImportMetadataTMLRequest to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} diff --git a/sdks/java/src/main/java/com/thoughtspot/client/model/ImportUser.java b/sdks/java/src/main/java/com/thoughtspot/client/model/ImportUser.java new file mode 100644 index 000000000..43aef8eed --- /dev/null +++ b/sdks/java/src/main/java/com/thoughtspot/client/model/ImportUser.java @@ -0,0 +1,1208 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client.model; + +import com.google.gson.Gson; +import com.google.gson.JsonArray; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.TypeAdapter; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.reflect.TypeToken; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import com.thoughtspot.client.JSON; +import java.io.IOException; +import java.io.Serializable; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Objects; +import org.openapitools.jackson.nullable.JsonNullable; + +/** ImportUser */ +@javax.annotation.Generated( + value = "org.openapitools.codegen.languages.JavaClientCodegen", + comments = "Generator version: 7.12.0") +public class ImportUser implements Serializable { + private static final long serialVersionUID = 1L; + + public static final String SERIALIZED_NAME_USER_IDENTIFIER = "user_identifier"; + + @SerializedName(SERIALIZED_NAME_USER_IDENTIFIER) + @javax.annotation.Nonnull + private String userIdentifier; + + public static final String SERIALIZED_NAME_DISPLAY_NAME = "display_name"; + + @SerializedName(SERIALIZED_NAME_DISPLAY_NAME) + @javax.annotation.Nonnull + private String displayName; + + public static final String SERIALIZED_NAME_PASSWORD = "password"; + + @SerializedName(SERIALIZED_NAME_PASSWORD) + @javax.annotation.Nullable + private String password; + + /** Type of the user account. */ + @JsonAdapter(AccountTypeEnum.Adapter.class) + public enum AccountTypeEnum { + LOCAL_USER("LOCAL_USER"), + + LDAP_USER("LDAP_USER"), + + SAML_USER("SAML_USER"), + + OIDC_USER("OIDC_USER"), + + REMOTE_USER("REMOTE_USER"); + + private String value; + + AccountTypeEnum(String value) { + this.value = value; + } + + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + public static AccountTypeEnum fromValue(String value) { + for (AccountTypeEnum b : AccountTypeEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + return null; + } + + public static class Adapter extends TypeAdapter { + @Override + public void write(final JsonWriter jsonWriter, final AccountTypeEnum enumeration) + throws IOException { + jsonWriter.value(enumeration.getValue()); + } + + @Override + public AccountTypeEnum read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + return AccountTypeEnum.fromValue(value); + } + } + + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + String value = jsonElement.getAsString(); + AccountTypeEnum.fromValue(value); + } + } + + public static final String SERIALIZED_NAME_ACCOUNT_TYPE = "account_type"; + + @SerializedName(SERIALIZED_NAME_ACCOUNT_TYPE) + @javax.annotation.Nullable + private AccountTypeEnum accountType; + + /** Status of the user account. */ + @JsonAdapter(AccountStatusEnum.Adapter.class) + public enum AccountStatusEnum { + ACTIVE("ACTIVE"), + + INACTIVE("INACTIVE"), + + EXPIRED("EXPIRED"), + + LOCKED("LOCKED"), + + PENDING("PENDING"), + + SUSPENDED("SUSPENDED"); + + private String value; + + AccountStatusEnum(String value) { + this.value = value; + } + + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + public static AccountStatusEnum fromValue(String value) { + for (AccountStatusEnum b : AccountStatusEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + return null; + } + + public static class Adapter extends TypeAdapter { + @Override + public void write(final JsonWriter jsonWriter, final AccountStatusEnum enumeration) + throws IOException { + jsonWriter.value(enumeration.getValue()); + } + + @Override + public AccountStatusEnum read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + return AccountStatusEnum.fromValue(value); + } + } + + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + String value = jsonElement.getAsString(); + AccountStatusEnum.fromValue(value); + } + } + + public static final String SERIALIZED_NAME_ACCOUNT_STATUS = "account_status"; + + @SerializedName(SERIALIZED_NAME_ACCOUNT_STATUS) + @javax.annotation.Nullable + private AccountStatusEnum accountStatus; + + public static final String SERIALIZED_NAME_EMAIL = "email"; + + @SerializedName(SERIALIZED_NAME_EMAIL) + @javax.annotation.Nullable + private String email; + + public static final String SERIALIZED_NAME_ORG_IDENTIFIERS = "org_identifiers"; + + @SerializedName(SERIALIZED_NAME_ORG_IDENTIFIERS) + @javax.annotation.Nullable + private List orgIdentifiers; + + public static final String SERIALIZED_NAME_GROUP_IDENTIFIERS = "group_identifiers"; + + @SerializedName(SERIALIZED_NAME_GROUP_IDENTIFIERS) + @javax.annotation.Nullable + private List groupIdentifiers; + + /** + * Visibility of the users. The SHARABLE property makes a user visible to other users and group, + * who can share objects with the user. + */ + @JsonAdapter(VisibilityEnum.Adapter.class) + public enum VisibilityEnum { + SHARABLE("SHARABLE"), + + NON_SHARABLE("NON_SHARABLE"); + + private String value; + + VisibilityEnum(String value) { + this.value = value; + } + + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + public static VisibilityEnum fromValue(String value) { + for (VisibilityEnum b : VisibilityEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + return null; + } + + public static class Adapter extends TypeAdapter { + @Override + public void write(final JsonWriter jsonWriter, final VisibilityEnum enumeration) + throws IOException { + jsonWriter.value(enumeration.getValue()); + } + + @Override + public VisibilityEnum read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + return VisibilityEnum.fromValue(value); + } + } + + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + String value = jsonElement.getAsString(); + VisibilityEnum.fromValue(value); + } + } + + public static final String SERIALIZED_NAME_VISIBILITY = "visibility"; + + @SerializedName(SERIALIZED_NAME_VISIBILITY) + @javax.annotation.Nullable + private VisibilityEnum visibility; + + public static final String SERIALIZED_NAME_NOTIFY_ON_SHARE = "notify_on_share"; + + @SerializedName(SERIALIZED_NAME_NOTIFY_ON_SHARE) + @javax.annotation.Nullable + private Boolean notifyOnShare = true; + + public static final String SERIALIZED_NAME_SHOW_ONBOARDING_EXPERIENCE = + "show_onboarding_experience"; + + @SerializedName(SERIALIZED_NAME_SHOW_ONBOARDING_EXPERIENCE) + @javax.annotation.Nullable + private Boolean showOnboardingExperience; + + public static final String SERIALIZED_NAME_ONBOARDING_EXPERIENCE_COMPLETED = + "onboarding_experience_completed"; + + @SerializedName(SERIALIZED_NAME_ONBOARDING_EXPERIENCE_COMPLETED) + @javax.annotation.Nullable + private Boolean onboardingExperienceCompleted; + + public static final String SERIALIZED_NAME_HOME_LIVEBOARD_IDENTIFIER = + "home_liveboard_identifier"; + + @SerializedName(SERIALIZED_NAME_HOME_LIVEBOARD_IDENTIFIER) + @javax.annotation.Nullable + private String homeLiveboardIdentifier; + + public static final String SERIALIZED_NAME_FAVORITE_METADATA = "favorite_metadata"; + + @SerializedName(SERIALIZED_NAME_FAVORITE_METADATA) + @javax.annotation.Nullable + private List favoriteMetadata; + + /** + * Locale for the user. When setting this value, do not set use_browser_language to true, + * otherwise the browser's language setting will take precedence and the preferred_locale + * value will be ignored. + */ + @JsonAdapter(PreferredLocaleEnum.Adapter.class) + public enum PreferredLocaleEnum { + EN_CA("en-CA"), + + EN_GB("en-GB"), + + EN_US("en-US"), + + DE_DE("de-DE"), + + JA_JP("ja-JP"), + + ZH_CN("zh-CN"), + + PT_BR("pt-BR"), + + FR_FR("fr-FR"), + + FR_CA("fr-CA"), + + ES_US("es-US"), + + DA_DK("da-DK"), + + ES_ES("es-ES"), + + FI_FI("fi-FI"), + + SV_SE("sv-SE"), + + NB_NO("nb-NO"), + + PT_PT("pt-PT"), + + NL_NL("nl-NL"), + + IT_IT("it-IT"), + + RU_RU("ru-RU"), + + EN_IN("en-IN"), + + DE_CH("de-CH"), + + EN_NZ("en-NZ"), + + ES_MX("es-MX"), + + EN_AU("en-AU"), + + ZH_HANT("zh-Hant"), + + KO_KR("ko-KR"), + + EN_DE("en-DE"); + + private String value; + + PreferredLocaleEnum(String value) { + this.value = value; + } + + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + public static PreferredLocaleEnum fromValue(String value) { + for (PreferredLocaleEnum b : PreferredLocaleEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + return null; + } + + public static class Adapter extends TypeAdapter { + @Override + public void write(final JsonWriter jsonWriter, final PreferredLocaleEnum enumeration) + throws IOException { + jsonWriter.value(enumeration.getValue()); + } + + @Override + public PreferredLocaleEnum read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + return PreferredLocaleEnum.fromValue(value); + } + } + + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + String value = jsonElement.getAsString(); + PreferredLocaleEnum.fromValue(value); + } + } + + public static final String SERIALIZED_NAME_PREFERRED_LOCALE = "preferred_locale"; + + @SerializedName(SERIALIZED_NAME_PREFERRED_LOCALE) + @javax.annotation.Nullable + private PreferredLocaleEnum preferredLocale; + + public static final String SERIALIZED_NAME_USE_BROWSER_LANGUAGE = "use_browser_language"; + + @SerializedName(SERIALIZED_NAME_USE_BROWSER_LANGUAGE) + @javax.annotation.Nullable + private Boolean useBrowserLanguage; + + public ImportUser() {} + + public ImportUser userIdentifier(@javax.annotation.Nonnull String userIdentifier) { + this.userIdentifier = userIdentifier; + return this; + } + + /** + * Unique ID or name of the user. + * + * @return userIdentifier + */ + @javax.annotation.Nonnull + public String getUserIdentifier() { + return userIdentifier; + } + + public void setUserIdentifier(@javax.annotation.Nonnull String userIdentifier) { + this.userIdentifier = userIdentifier; + } + + public ImportUser displayName(@javax.annotation.Nonnull String displayName) { + this.displayName = displayName; + return this; + } + + /** + * Display name of the user. + * + * @return displayName + */ + @javax.annotation.Nonnull + public String getDisplayName() { + return displayName; + } + + public void setDisplayName(@javax.annotation.Nonnull String displayName) { + this.displayName = displayName; + } + + public ImportUser password(@javax.annotation.Nullable String password) { + this.password = password; + return this; + } + + /** + * Password of the user. + * + * @return password + */ + @javax.annotation.Nullable + public String getPassword() { + return password; + } + + public void setPassword(@javax.annotation.Nullable String password) { + this.password = password; + } + + public ImportUser accountType(@javax.annotation.Nullable AccountTypeEnum accountType) { + this.accountType = accountType; + return this; + } + + /** + * Type of the user account. + * + * @return accountType + */ + @javax.annotation.Nullable + public AccountTypeEnum getAccountType() { + return accountType; + } + + public void setAccountType(@javax.annotation.Nullable AccountTypeEnum accountType) { + this.accountType = accountType; + } + + public ImportUser accountStatus(@javax.annotation.Nullable AccountStatusEnum accountStatus) { + this.accountStatus = accountStatus; + return this; + } + + /** + * Status of the user account. + * + * @return accountStatus + */ + @javax.annotation.Nullable + public AccountStatusEnum getAccountStatus() { + return accountStatus; + } + + public void setAccountStatus(@javax.annotation.Nullable AccountStatusEnum accountStatus) { + this.accountStatus = accountStatus; + } + + public ImportUser email(@javax.annotation.Nullable String email) { + this.email = email; + return this; + } + + /** + * Email address of the user. + * + * @return email + */ + @javax.annotation.Nullable + public String getEmail() { + return email; + } + + public void setEmail(@javax.annotation.Nullable String email) { + this.email = email; + } + + public ImportUser orgIdentifiers(@javax.annotation.Nullable List orgIdentifiers) { + this.orgIdentifiers = orgIdentifiers; + return this; + } + + public ImportUser addOrgIdentifiersItem(String orgIdentifiersItem) { + if (this.orgIdentifiers == null) { + this.orgIdentifiers = new ArrayList<>(); + } + this.orgIdentifiers.add(orgIdentifiersItem); + return this; + } + + /** + * ID or name of the Orgs to which the user belongs. + * + * @return orgIdentifiers + */ + @javax.annotation.Nullable + public List getOrgIdentifiers() { + return orgIdentifiers; + } + + public void setOrgIdentifiers(@javax.annotation.Nullable List orgIdentifiers) { + this.orgIdentifiers = orgIdentifiers; + } + + public ImportUser groupIdentifiers(@javax.annotation.Nullable List groupIdentifiers) { + this.groupIdentifiers = groupIdentifiers; + return this; + } + + public ImportUser addGroupIdentifiersItem(String groupIdentifiersItem) { + if (this.groupIdentifiers == null) { + this.groupIdentifiers = new ArrayList<>(); + } + this.groupIdentifiers.add(groupIdentifiersItem); + return this; + } + + /** + * ID or name of the groups to which the user belongs. + * + * @return groupIdentifiers + */ + @javax.annotation.Nullable + public List getGroupIdentifiers() { + return groupIdentifiers; + } + + public void setGroupIdentifiers(@javax.annotation.Nullable List groupIdentifiers) { + this.groupIdentifiers = groupIdentifiers; + } + + public ImportUser visibility(@javax.annotation.Nullable VisibilityEnum visibility) { + this.visibility = visibility; + return this; + } + + /** + * Visibility of the users. The SHARABLE property makes a user visible to other users and group, + * who can share objects with the user. + * + * @return visibility + */ + @javax.annotation.Nullable + public VisibilityEnum getVisibility() { + return visibility; + } + + public void setVisibility(@javax.annotation.Nullable VisibilityEnum visibility) { + this.visibility = visibility; + } + + public ImportUser notifyOnShare(@javax.annotation.Nullable Boolean notifyOnShare) { + this.notifyOnShare = notifyOnShare; + return this; + } + + /** + * Notify user when other users or groups share metadata objects + * + * @return notifyOnShare + */ + @javax.annotation.Nullable + public Boolean getNotifyOnShare() { + return notifyOnShare; + } + + public void setNotifyOnShare(@javax.annotation.Nullable Boolean notifyOnShare) { + this.notifyOnShare = notifyOnShare; + } + + public ImportUser showOnboardingExperience( + @javax.annotation.Nullable Boolean showOnboardingExperience) { + this.showOnboardingExperience = showOnboardingExperience; + return this; + } + + /** + * Show or hide the new user onboarding walkthroughs + * + * @return showOnboardingExperience + */ + @javax.annotation.Nullable + public Boolean getShowOnboardingExperience() { + return showOnboardingExperience; + } + + public void setShowOnboardingExperience( + @javax.annotation.Nullable Boolean showOnboardingExperience) { + this.showOnboardingExperience = showOnboardingExperience; + } + + public ImportUser onboardingExperienceCompleted( + @javax.annotation.Nullable Boolean onboardingExperienceCompleted) { + this.onboardingExperienceCompleted = onboardingExperienceCompleted; + return this; + } + + /** + * Revisit the new user onboarding walkthroughs + * + * @return onboardingExperienceCompleted + */ + @javax.annotation.Nullable + public Boolean getOnboardingExperienceCompleted() { + return onboardingExperienceCompleted; + } + + public void setOnboardingExperienceCompleted( + @javax.annotation.Nullable Boolean onboardingExperienceCompleted) { + this.onboardingExperienceCompleted = onboardingExperienceCompleted; + } + + public ImportUser homeLiveboardIdentifier( + @javax.annotation.Nullable String homeLiveboardIdentifier) { + this.homeLiveboardIdentifier = homeLiveboardIdentifier; + return this; + } + + /** + * Unique ID or name of the default Liveboard assigned to the user. + * + * @return homeLiveboardIdentifier + */ + @javax.annotation.Nullable + public String getHomeLiveboardIdentifier() { + return homeLiveboardIdentifier; + } + + public void setHomeLiveboardIdentifier( + @javax.annotation.Nullable String homeLiveboardIdentifier) { + this.homeLiveboardIdentifier = homeLiveboardIdentifier; + } + + public ImportUser favoriteMetadata( + @javax.annotation.Nullable List favoriteMetadata) { + this.favoriteMetadata = favoriteMetadata; + return this; + } + + public ImportUser addFavoriteMetadataItem(FavoriteMetadataInput favoriteMetadataItem) { + if (this.favoriteMetadata == null) { + this.favoriteMetadata = new ArrayList<>(); + } + this.favoriteMetadata.add(favoriteMetadataItem); + return this; + } + + /** + * Metadata objects to add to the user's favorites list. + * + * @return favoriteMetadata + */ + @javax.annotation.Nullable + public List getFavoriteMetadata() { + return favoriteMetadata; + } + + public void setFavoriteMetadata( + @javax.annotation.Nullable List favoriteMetadata) { + this.favoriteMetadata = favoriteMetadata; + } + + public ImportUser preferredLocale( + @javax.annotation.Nullable PreferredLocaleEnum preferredLocale) { + this.preferredLocale = preferredLocale; + return this; + } + + /** + * Locale for the user. When setting this value, do not set use_browser_language to true, + * otherwise the browser's language setting will take precedence and the preferred_locale + * value will be ignored. + * + * @return preferredLocale + */ + @javax.annotation.Nullable + public PreferredLocaleEnum getPreferredLocale() { + return preferredLocale; + } + + public void setPreferredLocale(@javax.annotation.Nullable PreferredLocaleEnum preferredLocale) { + this.preferredLocale = preferredLocale; + } + + public ImportUser useBrowserLanguage(@javax.annotation.Nullable Boolean useBrowserLanguage) { + this.useBrowserLanguage = useBrowserLanguage; + return this; + } + + /** + * Flag to indicate whether to use the browser locale for the user in the UI. When set to true, + * the preferred_locale value is unset and the browser's language setting takes precedence. + * Version: 26.3.0.cl or later + * + * @return useBrowserLanguage + */ + @javax.annotation.Nullable + public Boolean getUseBrowserLanguage() { + return useBrowserLanguage; + } + + public void setUseBrowserLanguage(@javax.annotation.Nullable Boolean useBrowserLanguage) { + this.useBrowserLanguage = useBrowserLanguage; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key name of the property + * @param value value of the property + * @return the ImportUser instance itself + */ + public ImportUser putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return a map of objects + */ + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key name of the property + * @return an object + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ImportUser importUser = (ImportUser) o; + return Objects.equals(this.userIdentifier, importUser.userIdentifier) + && Objects.equals(this.displayName, importUser.displayName) + && Objects.equals(this.password, importUser.password) + && Objects.equals(this.accountType, importUser.accountType) + && Objects.equals(this.accountStatus, importUser.accountStatus) + && Objects.equals(this.email, importUser.email) + && Objects.equals(this.orgIdentifiers, importUser.orgIdentifiers) + && Objects.equals(this.groupIdentifiers, importUser.groupIdentifiers) + && Objects.equals(this.visibility, importUser.visibility) + && Objects.equals(this.notifyOnShare, importUser.notifyOnShare) + && Objects.equals( + this.showOnboardingExperience, importUser.showOnboardingExperience) + && Objects.equals( + this.onboardingExperienceCompleted, + importUser.onboardingExperienceCompleted) + && Objects.equals(this.homeLiveboardIdentifier, importUser.homeLiveboardIdentifier) + && Objects.equals(this.favoriteMetadata, importUser.favoriteMetadata) + && Objects.equals(this.preferredLocale, importUser.preferredLocale) + && Objects.equals(this.useBrowserLanguage, importUser.useBrowserLanguage) + && Objects.equals(this.additionalProperties, importUser.additionalProperties); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b + || (a != null + && b != null + && a.isPresent() + && b.isPresent() + && Objects.deepEquals(a.get(), b.get())); + } + + @Override + public int hashCode() { + return Objects.hash( + userIdentifier, + displayName, + password, + accountType, + accountStatus, + email, + orgIdentifiers, + groupIdentifiers, + visibility, + notifyOnShare, + showOnboardingExperience, + onboardingExperienceCompleted, + homeLiveboardIdentifier, + favoriteMetadata, + preferredLocale, + useBrowserLanguage, + additionalProperties); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; + } + return a.isPresent() ? Arrays.deepHashCode(new Object[] {a.get()}) : 31; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ImportUser {\n"); + sb.append(" userIdentifier: ").append(toIndentedString(userIdentifier)).append("\n"); + sb.append(" displayName: ").append(toIndentedString(displayName)).append("\n"); + sb.append(" password: ").append(toIndentedString(password)).append("\n"); + sb.append(" accountType: ").append(toIndentedString(accountType)).append("\n"); + sb.append(" accountStatus: ").append(toIndentedString(accountStatus)).append("\n"); + sb.append(" email: ").append(toIndentedString(email)).append("\n"); + sb.append(" orgIdentifiers: ").append(toIndentedString(orgIdentifiers)).append("\n"); + sb.append(" groupIdentifiers: ").append(toIndentedString(groupIdentifiers)).append("\n"); + sb.append(" visibility: ").append(toIndentedString(visibility)).append("\n"); + sb.append(" notifyOnShare: ").append(toIndentedString(notifyOnShare)).append("\n"); + sb.append(" showOnboardingExperience: ") + .append(toIndentedString(showOnboardingExperience)) + .append("\n"); + sb.append(" onboardingExperienceCompleted: ") + .append(toIndentedString(onboardingExperienceCompleted)) + .append("\n"); + sb.append(" homeLiveboardIdentifier: ") + .append(toIndentedString(homeLiveboardIdentifier)) + .append("\n"); + sb.append(" favoriteMetadata: ").append(toIndentedString(favoriteMetadata)).append("\n"); + sb.append(" preferredLocale: ").append(toIndentedString(preferredLocale)).append("\n"); + sb.append(" useBrowserLanguage: ") + .append(toIndentedString(useBrowserLanguage)) + .append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first + * line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("user_identifier"); + openapiFields.add("display_name"); + openapiFields.add("password"); + openapiFields.add("account_type"); + openapiFields.add("account_status"); + openapiFields.add("email"); + openapiFields.add("org_identifiers"); + openapiFields.add("group_identifiers"); + openapiFields.add("visibility"); + openapiFields.add("notify_on_share"); + openapiFields.add("show_onboarding_experience"); + openapiFields.add("onboarding_experience_completed"); + openapiFields.add("home_liveboard_identifier"); + openapiFields.add("favorite_metadata"); + openapiFields.add("preferred_locale"); + openapiFields.add("use_browser_language"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + openapiRequiredFields.add("user_identifier"); + openapiRequiredFields.add("display_name"); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to ImportUser + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!ImportUser.openapiRequiredFields + .isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException( + String.format( + "The required field(s) %s in ImportUser is not found in the empty" + + " JSON string", + ImportUser.openapiRequiredFields.toString())); + } + } + + // check to make sure all required properties/fields are present in the JSON string + for (String requiredField : ImportUser.openapiRequiredFields) { + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException( + String.format( + "The required field `%s` is not found in the JSON string: %s", + requiredField, jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if (!jsonObj.get("user_identifier").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `user_identifier` to be a primitive type in the" + + " JSON string but got `%s`", + jsonObj.get("user_identifier").toString())); + } + if (!jsonObj.get("display_name").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `display_name` to be a primitive type in the JSON" + + " string but got `%s`", + jsonObj.get("display_name").toString())); + } + if ((jsonObj.get("password") != null && !jsonObj.get("password").isJsonNull()) + && !jsonObj.get("password").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `password` to be a primitive type in the JSON" + + " string but got `%s`", + jsonObj.get("password").toString())); + } + if ((jsonObj.get("account_type") != null && !jsonObj.get("account_type").isJsonNull()) + && !jsonObj.get("account_type").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `account_type` to be a primitive type in the JSON" + + " string but got `%s`", + jsonObj.get("account_type").toString())); + } + // validate the optional field `account_type` + if (jsonObj.get("account_type") != null && !jsonObj.get("account_type").isJsonNull()) { + AccountTypeEnum.validateJsonElement(jsonObj.get("account_type")); + } + if ((jsonObj.get("account_status") != null && !jsonObj.get("account_status").isJsonNull()) + && !jsonObj.get("account_status").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `account_status` to be a primitive type in the" + + " JSON string but got `%s`", + jsonObj.get("account_status").toString())); + } + // validate the optional field `account_status` + if (jsonObj.get("account_status") != null && !jsonObj.get("account_status").isJsonNull()) { + AccountStatusEnum.validateJsonElement(jsonObj.get("account_status")); + } + if ((jsonObj.get("email") != null && !jsonObj.get("email").isJsonNull()) + && !jsonObj.get("email").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `email` to be a primitive type in the JSON string" + + " but got `%s`", + jsonObj.get("email").toString())); + } + // ensure the optional json data is an array if present + if (jsonObj.get("org_identifiers") != null + && !jsonObj.get("org_identifiers").isJsonNull() + && !jsonObj.get("org_identifiers").isJsonArray()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `org_identifiers` to be an array in the JSON" + + " string but got `%s`", + jsonObj.get("org_identifiers").toString())); + } + // ensure the optional json data is an array if present + if (jsonObj.get("group_identifiers") != null + && !jsonObj.get("group_identifiers").isJsonNull() + && !jsonObj.get("group_identifiers").isJsonArray()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `group_identifiers` to be an array in the JSON" + + " string but got `%s`", + jsonObj.get("group_identifiers").toString())); + } + if ((jsonObj.get("visibility") != null && !jsonObj.get("visibility").isJsonNull()) + && !jsonObj.get("visibility").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `visibility` to be a primitive type in the JSON" + + " string but got `%s`", + jsonObj.get("visibility").toString())); + } + // validate the optional field `visibility` + if (jsonObj.get("visibility") != null && !jsonObj.get("visibility").isJsonNull()) { + VisibilityEnum.validateJsonElement(jsonObj.get("visibility")); + } + if ((jsonObj.get("home_liveboard_identifier") != null + && !jsonObj.get("home_liveboard_identifier").isJsonNull()) + && !jsonObj.get("home_liveboard_identifier").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `home_liveboard_identifier` to be a primitive type" + + " in the JSON string but got `%s`", + jsonObj.get("home_liveboard_identifier").toString())); + } + if (jsonObj.get("favorite_metadata") != null + && !jsonObj.get("favorite_metadata").isJsonNull()) { + JsonArray jsonArrayfavoriteMetadata = jsonObj.getAsJsonArray("favorite_metadata"); + if (jsonArrayfavoriteMetadata != null) { + // ensure the json data is an array + if (!jsonObj.get("favorite_metadata").isJsonArray()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `favorite_metadata` to be an array in the" + + " JSON string but got `%s`", + jsonObj.get("favorite_metadata").toString())); + } + + // validate the optional field `favorite_metadata` (array) + for (int i = 0; i < jsonArrayfavoriteMetadata.size(); i++) { + FavoriteMetadataInput.validateJsonElement(jsonArrayfavoriteMetadata.get(i)); + } + ; + } + } + if ((jsonObj.get("preferred_locale") != null + && !jsonObj.get("preferred_locale").isJsonNull()) + && !jsonObj.get("preferred_locale").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `preferred_locale` to be a primitive type in the" + + " JSON string but got `%s`", + jsonObj.get("preferred_locale").toString())); + } + // validate the optional field `preferred_locale` + if (jsonObj.get("preferred_locale") != null + && !jsonObj.get("preferred_locale").isJsonNull()) { + PreferredLocaleEnum.validateJsonElement(jsonObj.get("preferred_locale")); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!ImportUser.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'ImportUser' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter = + gson.getDelegateAdapter(this, TypeToken.get(ImportUser.class)); + + return (TypeAdapter) + new TypeAdapter() { + @Override + public void write(JsonWriter out, ImportUser value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + obj.remove("additionalProperties"); + // serialize additional properties + if (value.getAdditionalProperties() != null) { + for (Map.Entry entry : + value.getAdditionalProperties().entrySet()) { + if (entry.getValue() instanceof String) + obj.addProperty(entry.getKey(), (String) entry.getValue()); + else if (entry.getValue() instanceof Number) + obj.addProperty(entry.getKey(), (Number) entry.getValue()); + else if (entry.getValue() instanceof Boolean) + obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); + else if (entry.getValue() instanceof Character) + obj.addProperty( + entry.getKey(), (Character) entry.getValue()); + else { + JsonElement jsonElement = gson.toJsonTree(entry.getValue()); + if (jsonElement.isJsonArray()) { + obj.add(entry.getKey(), jsonElement.getAsJsonArray()); + } else { + obj.add(entry.getKey(), jsonElement.getAsJsonObject()); + } + } + } + } + elementAdapter.write(out, obj); + } + + @Override + public ImportUser read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // store additional fields in the deserialized instance + ImportUser instance = thisAdapter.fromJsonTree(jsonObj); + for (Map.Entry entry : jsonObj.entrySet()) { + if (!openapiFields.contains(entry.getKey())) { + if (entry.getValue().isJsonPrimitive()) { // primitive type + if (entry.getValue().getAsJsonPrimitive().isString()) + instance.putAdditionalProperty( + entry.getKey(), entry.getValue().getAsString()); + else if (entry.getValue().getAsJsonPrimitive().isNumber()) + instance.putAdditionalProperty( + entry.getKey(), entry.getValue().getAsNumber()); + else if (entry.getValue().getAsJsonPrimitive().isBoolean()) + instance.putAdditionalProperty( + entry.getKey(), + entry.getValue().getAsBoolean()); + else + throw new IllegalArgumentException( + String.format( + "The field `%s` has unknown primitive" + + " type. Value: %s", + entry.getKey(), + entry.getValue().toString())); + } else if (entry.getValue().isJsonArray()) { + instance.putAdditionalProperty( + entry.getKey(), + gson.fromJson(entry.getValue(), List.class)); + } else { // JSON object + instance.putAdditionalProperty( + entry.getKey(), + gson.fromJson(entry.getValue(), HashMap.class)); + } + } + } + return instance; + } + }.nullSafe(); + } + } + + /** + * Create an instance of ImportUser given an JSON string + * + * @param jsonString JSON string + * @return An instance of ImportUser + * @throws IOException if the JSON string is invalid with respect to ImportUser + */ + public static ImportUser fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, ImportUser.class); + } + + /** + * Convert an instance of ImportUser to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} diff --git a/sdks/java/src/main/java/com/thoughtspot/client/model/ImportUserGroupsRequest.java b/sdks/java/src/main/java/com/thoughtspot/client/model/ImportUserGroupsRequest.java new file mode 100644 index 000000000..d9ba45845 --- /dev/null +++ b/sdks/java/src/main/java/com/thoughtspot/client/model/ImportUserGroupsRequest.java @@ -0,0 +1,397 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client.model; + +import com.google.gson.Gson; +import com.google.gson.JsonArray; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.TypeAdapter; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.annotations.SerializedName; +import com.google.gson.reflect.TypeToken; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import com.thoughtspot.client.JSON; +import java.io.IOException; +import java.io.Serializable; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Objects; +import org.openapitools.jackson.nullable.JsonNullable; + +/** ImportUserGroupsRequest */ +@javax.annotation.Generated( + value = "org.openapitools.codegen.languages.JavaClientCodegen", + comments = "Generator version: 7.12.0") +public class ImportUserGroupsRequest implements Serializable { + private static final long serialVersionUID = 1L; + + public static final String SERIALIZED_NAME_GROUPS = "groups"; + + @SerializedName(SERIALIZED_NAME_GROUPS) + @javax.annotation.Nullable + private List groups; + + public static final String SERIALIZED_NAME_DELETE_UNSPECIFIED_GROUPS = + "delete_unspecified_groups"; + + @SerializedName(SERIALIZED_NAME_DELETE_UNSPECIFIED_GROUPS) + @javax.annotation.Nullable + private Boolean deleteUnspecifiedGroups = false; + + public static final String SERIALIZED_NAME_DRY_RUN = "dry_run"; + + @SerializedName(SERIALIZED_NAME_DRY_RUN) + @javax.annotation.Nullable + private Boolean dryRun = true; + + public ImportUserGroupsRequest() {} + + public ImportUserGroupsRequest groups( + @javax.annotation.Nullable List groups) { + this.groups = groups; + return this; + } + + public ImportUserGroupsRequest addGroupsItem(GroupsImportListInput groupsItem) { + if (this.groups == null) { + this.groups = new ArrayList<>(); + } + this.groups.add(groupsItem); + return this; + } + + /** + * Details of groups which are to be imported + * + * @return groups + */ + @javax.annotation.Nullable + public List getGroups() { + return groups; + } + + public void setGroups(@javax.annotation.Nullable List groups) { + this.groups = groups; + } + + public ImportUserGroupsRequest deleteUnspecifiedGroups( + @javax.annotation.Nullable Boolean deleteUnspecifiedGroups) { + this.deleteUnspecifiedGroups = deleteUnspecifiedGroups; + return this; + } + + /** + * If set to true, removes groups that are not specified in the API request. + * + * @return deleteUnspecifiedGroups + */ + @javax.annotation.Nullable + public Boolean getDeleteUnspecifiedGroups() { + return deleteUnspecifiedGroups; + } + + public void setDeleteUnspecifiedGroups( + @javax.annotation.Nullable Boolean deleteUnspecifiedGroups) { + this.deleteUnspecifiedGroups = deleteUnspecifiedGroups; + } + + public ImportUserGroupsRequest dryRun(@javax.annotation.Nullable Boolean dryRun) { + this.dryRun = dryRun; + return this; + } + + /** + * If true, the API performs a test operation and returns user IDs whose data will be edited + * after the import. + * + * @return dryRun + */ + @javax.annotation.Nullable + public Boolean getDryRun() { + return dryRun; + } + + public void setDryRun(@javax.annotation.Nullable Boolean dryRun) { + this.dryRun = dryRun; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key name of the property + * @param value value of the property + * @return the ImportUserGroupsRequest instance itself + */ + public ImportUserGroupsRequest putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return a map of objects + */ + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key name of the property + * @return an object + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ImportUserGroupsRequest importUserGroupsRequest = (ImportUserGroupsRequest) o; + return Objects.equals(this.groups, importUserGroupsRequest.groups) + && Objects.equals( + this.deleteUnspecifiedGroups, + importUserGroupsRequest.deleteUnspecifiedGroups) + && Objects.equals(this.dryRun, importUserGroupsRequest.dryRun) + && Objects.equals( + this.additionalProperties, importUserGroupsRequest.additionalProperties); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b + || (a != null + && b != null + && a.isPresent() + && b.isPresent() + && Objects.deepEquals(a.get(), b.get())); + } + + @Override + public int hashCode() { + return Objects.hash(groups, deleteUnspecifiedGroups, dryRun, additionalProperties); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; + } + return a.isPresent() ? Arrays.deepHashCode(new Object[] {a.get()}) : 31; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ImportUserGroupsRequest {\n"); + sb.append(" groups: ").append(toIndentedString(groups)).append("\n"); + sb.append(" deleteUnspecifiedGroups: ") + .append(toIndentedString(deleteUnspecifiedGroups)) + .append("\n"); + sb.append(" dryRun: ").append(toIndentedString(dryRun)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first + * line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("groups"); + openapiFields.add("delete_unspecified_groups"); + openapiFields.add("dry_run"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to ImportUserGroupsRequest + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!ImportUserGroupsRequest.openapiRequiredFields + .isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException( + String.format( + "The required field(s) %s in ImportUserGroupsRequest is not found" + + " in the empty JSON string", + ImportUserGroupsRequest.openapiRequiredFields.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if (jsonObj.get("groups") != null && !jsonObj.get("groups").isJsonNull()) { + JsonArray jsonArraygroups = jsonObj.getAsJsonArray("groups"); + if (jsonArraygroups != null) { + // ensure the json data is an array + if (!jsonObj.get("groups").isJsonArray()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `groups` to be an array in the JSON string" + + " but got `%s`", + jsonObj.get("groups").toString())); + } + + // validate the optional field `groups` (array) + for (int i = 0; i < jsonArraygroups.size(); i++) { + GroupsImportListInput.validateJsonElement(jsonArraygroups.get(i)); + } + ; + } + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!ImportUserGroupsRequest.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'ImportUserGroupsRequest' and its + // subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter = + gson.getDelegateAdapter(this, TypeToken.get(ImportUserGroupsRequest.class)); + + return (TypeAdapter) + new TypeAdapter() { + @Override + public void write(JsonWriter out, ImportUserGroupsRequest value) + throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + obj.remove("additionalProperties"); + // serialize additional properties + if (value.getAdditionalProperties() != null) { + for (Map.Entry entry : + value.getAdditionalProperties().entrySet()) { + if (entry.getValue() instanceof String) + obj.addProperty(entry.getKey(), (String) entry.getValue()); + else if (entry.getValue() instanceof Number) + obj.addProperty(entry.getKey(), (Number) entry.getValue()); + else if (entry.getValue() instanceof Boolean) + obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); + else if (entry.getValue() instanceof Character) + obj.addProperty( + entry.getKey(), (Character) entry.getValue()); + else { + JsonElement jsonElement = gson.toJsonTree(entry.getValue()); + if (jsonElement.isJsonArray()) { + obj.add(entry.getKey(), jsonElement.getAsJsonArray()); + } else { + obj.add(entry.getKey(), jsonElement.getAsJsonObject()); + } + } + } + } + elementAdapter.write(out, obj); + } + + @Override + public ImportUserGroupsRequest read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // store additional fields in the deserialized instance + ImportUserGroupsRequest instance = thisAdapter.fromJsonTree(jsonObj); + for (Map.Entry entry : jsonObj.entrySet()) { + if (!openapiFields.contains(entry.getKey())) { + if (entry.getValue().isJsonPrimitive()) { // primitive type + if (entry.getValue().getAsJsonPrimitive().isString()) + instance.putAdditionalProperty( + entry.getKey(), entry.getValue().getAsString()); + else if (entry.getValue().getAsJsonPrimitive().isNumber()) + instance.putAdditionalProperty( + entry.getKey(), entry.getValue().getAsNumber()); + else if (entry.getValue().getAsJsonPrimitive().isBoolean()) + instance.putAdditionalProperty( + entry.getKey(), + entry.getValue().getAsBoolean()); + else + throw new IllegalArgumentException( + String.format( + "The field `%s` has unknown primitive" + + " type. Value: %s", + entry.getKey(), + entry.getValue().toString())); + } else if (entry.getValue().isJsonArray()) { + instance.putAdditionalProperty( + entry.getKey(), + gson.fromJson(entry.getValue(), List.class)); + } else { // JSON object + instance.putAdditionalProperty( + entry.getKey(), + gson.fromJson(entry.getValue(), HashMap.class)); + } + } + } + return instance; + } + }.nullSafe(); + } + } + + /** + * Create an instance of ImportUserGroupsRequest given an JSON string + * + * @param jsonString JSON string + * @return An instance of ImportUserGroupsRequest + * @throws IOException if the JSON string is invalid with respect to ImportUserGroupsRequest + */ + public static ImportUserGroupsRequest fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, ImportUserGroupsRequest.class); + } + + /** + * Convert an instance of ImportUserGroupsRequest to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} diff --git a/sdks/java/src/main/java/com/thoughtspot/client/model/ImportUserGroupsResponse.java b/sdks/java/src/main/java/com/thoughtspot/client/model/ImportUserGroupsResponse.java new file mode 100644 index 000000000..ccfa83953 --- /dev/null +++ b/sdks/java/src/main/java/com/thoughtspot/client/model/ImportUserGroupsResponse.java @@ -0,0 +1,428 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client.model; + +import com.google.gson.Gson; +import com.google.gson.JsonArray; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.TypeAdapter; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.annotations.SerializedName; +import com.google.gson.reflect.TypeToken; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import com.thoughtspot.client.JSON; +import java.io.IOException; +import java.io.Serializable; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Objects; + +/** ImportUserGroupsResponse */ +@javax.annotation.Generated( + value = "org.openapitools.codegen.languages.JavaClientCodegen", + comments = "Generator version: 7.12.0") +public class ImportUserGroupsResponse implements Serializable { + private static final long serialVersionUID = 1L; + + public static final String SERIALIZED_NAME_GROUPS_ADDED = "groups_added"; + + @SerializedName(SERIALIZED_NAME_GROUPS_ADDED) + @javax.annotation.Nonnull + private List groupsAdded; + + public static final String SERIALIZED_NAME_GROUPS_DELETED = "groups_deleted"; + + @SerializedName(SERIALIZED_NAME_GROUPS_DELETED) + @javax.annotation.Nonnull + private List groupsDeleted; + + public static final String SERIALIZED_NAME_GROUPS_UPDATED = "groups_updated"; + + @SerializedName(SERIALIZED_NAME_GROUPS_UPDATED) + @javax.annotation.Nonnull + private List groupsUpdated; + + public ImportUserGroupsResponse() {} + + public ImportUserGroupsResponse groupsAdded( + @javax.annotation.Nonnull List groupsAdded) { + this.groupsAdded = groupsAdded; + return this; + } + + public ImportUserGroupsResponse addGroupsAddedItem(UserGroup groupsAddedItem) { + if (this.groupsAdded == null) { + this.groupsAdded = new ArrayList<>(); + } + this.groupsAdded.add(groupsAddedItem); + return this; + } + + /** + * The groups which are added into the system. + * + * @return groupsAdded + */ + @javax.annotation.Nonnull + public List getGroupsAdded() { + return groupsAdded; + } + + public void setGroupsAdded(@javax.annotation.Nonnull List groupsAdded) { + this.groupsAdded = groupsAdded; + } + + public ImportUserGroupsResponse groupsDeleted( + @javax.annotation.Nonnull List groupsDeleted) { + this.groupsDeleted = groupsDeleted; + return this; + } + + public ImportUserGroupsResponse addGroupsDeletedItem(UserGroup groupsDeletedItem) { + if (this.groupsDeleted == null) { + this.groupsDeleted = new ArrayList<>(); + } + this.groupsDeleted.add(groupsDeletedItem); + return this; + } + + /** + * The groups which are deleted from the system. + * + * @return groupsDeleted + */ + @javax.annotation.Nonnull + public List getGroupsDeleted() { + return groupsDeleted; + } + + public void setGroupsDeleted(@javax.annotation.Nonnull List groupsDeleted) { + this.groupsDeleted = groupsDeleted; + } + + public ImportUserGroupsResponse groupsUpdated( + @javax.annotation.Nonnull List groupsUpdated) { + this.groupsUpdated = groupsUpdated; + return this; + } + + public ImportUserGroupsResponse addGroupsUpdatedItem(UserGroup groupsUpdatedItem) { + if (this.groupsUpdated == null) { + this.groupsUpdated = new ArrayList<>(); + } + this.groupsUpdated.add(groupsUpdatedItem); + return this; + } + + /** + * The groups which are updated in the system. + * + * @return groupsUpdated + */ + @javax.annotation.Nonnull + public List getGroupsUpdated() { + return groupsUpdated; + } + + public void setGroupsUpdated(@javax.annotation.Nonnull List groupsUpdated) { + this.groupsUpdated = groupsUpdated; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key name of the property + * @param value value of the property + * @return the ImportUserGroupsResponse instance itself + */ + public ImportUserGroupsResponse putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return a map of objects + */ + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key name of the property + * @return an object + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ImportUserGroupsResponse importUserGroupsResponse = (ImportUserGroupsResponse) o; + return Objects.equals(this.groupsAdded, importUserGroupsResponse.groupsAdded) + && Objects.equals(this.groupsDeleted, importUserGroupsResponse.groupsDeleted) + && Objects.equals(this.groupsUpdated, importUserGroupsResponse.groupsUpdated) + && Objects.equals( + this.additionalProperties, importUserGroupsResponse.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(groupsAdded, groupsDeleted, groupsUpdated, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ImportUserGroupsResponse {\n"); + sb.append(" groupsAdded: ").append(toIndentedString(groupsAdded)).append("\n"); + sb.append(" groupsDeleted: ").append(toIndentedString(groupsDeleted)).append("\n"); + sb.append(" groupsUpdated: ").append(toIndentedString(groupsUpdated)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first + * line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("groups_added"); + openapiFields.add("groups_deleted"); + openapiFields.add("groups_updated"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + openapiRequiredFields.add("groups_added"); + openapiRequiredFields.add("groups_deleted"); + openapiRequiredFields.add("groups_updated"); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to ImportUserGroupsResponse + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!ImportUserGroupsResponse.openapiRequiredFields + .isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException( + String.format( + "The required field(s) %s in ImportUserGroupsResponse is not found" + + " in the empty JSON string", + ImportUserGroupsResponse.openapiRequiredFields.toString())); + } + } + + // check to make sure all required properties/fields are present in the JSON string + for (String requiredField : ImportUserGroupsResponse.openapiRequiredFields) { + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException( + String.format( + "The required field `%s` is not found in the JSON string: %s", + requiredField, jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // ensure the json data is an array + if (!jsonObj.get("groups_added").isJsonArray()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `groups_added` to be an array in the JSON string" + + " but got `%s`", + jsonObj.get("groups_added").toString())); + } + + JsonArray jsonArraygroupsAdded = jsonObj.getAsJsonArray("groups_added"); + // validate the required field `groups_added` (array) + for (int i = 0; i < jsonArraygroupsAdded.size(); i++) { + UserGroup.validateJsonElement(jsonArraygroupsAdded.get(i)); + } + ; + // ensure the json data is an array + if (!jsonObj.get("groups_deleted").isJsonArray()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `groups_deleted` to be an array in the JSON string" + + " but got `%s`", + jsonObj.get("groups_deleted").toString())); + } + + JsonArray jsonArraygroupsDeleted = jsonObj.getAsJsonArray("groups_deleted"); + // validate the required field `groups_deleted` (array) + for (int i = 0; i < jsonArraygroupsDeleted.size(); i++) { + UserGroup.validateJsonElement(jsonArraygroupsDeleted.get(i)); + } + ; + // ensure the json data is an array + if (!jsonObj.get("groups_updated").isJsonArray()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `groups_updated` to be an array in the JSON string" + + " but got `%s`", + jsonObj.get("groups_updated").toString())); + } + + JsonArray jsonArraygroupsUpdated = jsonObj.getAsJsonArray("groups_updated"); + // validate the required field `groups_updated` (array) + for (int i = 0; i < jsonArraygroupsUpdated.size(); i++) { + UserGroup.validateJsonElement(jsonArraygroupsUpdated.get(i)); + } + ; + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!ImportUserGroupsResponse.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'ImportUserGroupsResponse' and its + // subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter = + gson.getDelegateAdapter(this, TypeToken.get(ImportUserGroupsResponse.class)); + + return (TypeAdapter) + new TypeAdapter() { + @Override + public void write(JsonWriter out, ImportUserGroupsResponse value) + throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + obj.remove("additionalProperties"); + // serialize additional properties + if (value.getAdditionalProperties() != null) { + for (Map.Entry entry : + value.getAdditionalProperties().entrySet()) { + if (entry.getValue() instanceof String) + obj.addProperty(entry.getKey(), (String) entry.getValue()); + else if (entry.getValue() instanceof Number) + obj.addProperty(entry.getKey(), (Number) entry.getValue()); + else if (entry.getValue() instanceof Boolean) + obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); + else if (entry.getValue() instanceof Character) + obj.addProperty( + entry.getKey(), (Character) entry.getValue()); + else { + JsonElement jsonElement = gson.toJsonTree(entry.getValue()); + if (jsonElement.isJsonArray()) { + obj.add(entry.getKey(), jsonElement.getAsJsonArray()); + } else { + obj.add(entry.getKey(), jsonElement.getAsJsonObject()); + } + } + } + } + elementAdapter.write(out, obj); + } + + @Override + public ImportUserGroupsResponse read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // store additional fields in the deserialized instance + ImportUserGroupsResponse instance = thisAdapter.fromJsonTree(jsonObj); + for (Map.Entry entry : jsonObj.entrySet()) { + if (!openapiFields.contains(entry.getKey())) { + if (entry.getValue().isJsonPrimitive()) { // primitive type + if (entry.getValue().getAsJsonPrimitive().isString()) + instance.putAdditionalProperty( + entry.getKey(), entry.getValue().getAsString()); + else if (entry.getValue().getAsJsonPrimitive().isNumber()) + instance.putAdditionalProperty( + entry.getKey(), entry.getValue().getAsNumber()); + else if (entry.getValue().getAsJsonPrimitive().isBoolean()) + instance.putAdditionalProperty( + entry.getKey(), + entry.getValue().getAsBoolean()); + else + throw new IllegalArgumentException( + String.format( + "The field `%s` has unknown primitive" + + " type. Value: %s", + entry.getKey(), + entry.getValue().toString())); + } else if (entry.getValue().isJsonArray()) { + instance.putAdditionalProperty( + entry.getKey(), + gson.fromJson(entry.getValue(), List.class)); + } else { // JSON object + instance.putAdditionalProperty( + entry.getKey(), + gson.fromJson(entry.getValue(), HashMap.class)); + } + } + } + return instance; + } + }.nullSafe(); + } + } + + /** + * Create an instance of ImportUserGroupsResponse given an JSON string + * + * @param jsonString JSON string + * @return An instance of ImportUserGroupsResponse + * @throws IOException if the JSON string is invalid with respect to ImportUserGroupsResponse + */ + public static ImportUserGroupsResponse fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, ImportUserGroupsResponse.class); + } + + /** + * Convert an instance of ImportUserGroupsResponse to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} diff --git a/sdks/java/src/main/java/com/thoughtspot/client/model/ImportUserType.java b/sdks/java/src/main/java/com/thoughtspot/client/model/ImportUserType.java new file mode 100644 index 000000000..72fff5294 --- /dev/null +++ b/sdks/java/src/main/java/com/thoughtspot/client/model/ImportUserType.java @@ -0,0 +1,354 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client.model; + +import com.google.gson.Gson; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.TypeAdapter; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.annotations.SerializedName; +import com.google.gson.reflect.TypeToken; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import com.thoughtspot.client.JSON; +import java.io.IOException; +import java.io.Serializable; +import java.util.Arrays; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Objects; +import org.openapitools.jackson.nullable.JsonNullable; + +/** ImportUserType */ +@javax.annotation.Generated( + value = "org.openapitools.codegen.languages.JavaClientCodegen", + comments = "Generator version: 7.12.0") +public class ImportUserType implements Serializable { + private static final long serialVersionUID = 1L; + + public static final String SERIALIZED_NAME_ID = "id"; + + @SerializedName(SERIALIZED_NAME_ID) + @javax.annotation.Nullable + private String id; + + public static final String SERIALIZED_NAME_NAME = "name"; + + @SerializedName(SERIALIZED_NAME_NAME) + @javax.annotation.Nonnull + private String name; + + public ImportUserType() {} + + public ImportUserType id(@javax.annotation.Nullable String id) { + this.id = id; + return this; + } + + /** + * Unique identifier of the user. + * + * @return id + */ + @javax.annotation.Nullable + public String getId() { + return id; + } + + public void setId(@javax.annotation.Nullable String id) { + this.id = id; + } + + public ImportUserType name(@javax.annotation.Nonnull String name) { + this.name = name; + return this; + } + + /** + * Name of the user. + * + * @return name + */ + @javax.annotation.Nonnull + public String getName() { + return name; + } + + public void setName(@javax.annotation.Nonnull String name) { + this.name = name; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key name of the property + * @param value value of the property + * @return the ImportUserType instance itself + */ + public ImportUserType putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return a map of objects + */ + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key name of the property + * @return an object + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ImportUserType importUserType = (ImportUserType) o; + return Objects.equals(this.id, importUserType.id) + && Objects.equals(this.name, importUserType.name) + && Objects.equals(this.additionalProperties, importUserType.additionalProperties); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b + || (a != null + && b != null + && a.isPresent() + && b.isPresent() + && Objects.deepEquals(a.get(), b.get())); + } + + @Override + public int hashCode() { + return Objects.hash(id, name, additionalProperties); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; + } + return a.isPresent() ? Arrays.deepHashCode(new Object[] {a.get()}) : 31; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ImportUserType {\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first + * line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("id"); + openapiFields.add("name"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + openapiRequiredFields.add("name"); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to ImportUserType + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!ImportUserType.openapiRequiredFields + .isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException( + String.format( + "The required field(s) %s in ImportUserType is not found in the" + + " empty JSON string", + ImportUserType.openapiRequiredFields.toString())); + } + } + + // check to make sure all required properties/fields are present in the JSON string + for (String requiredField : ImportUserType.openapiRequiredFields) { + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException( + String.format( + "The required field `%s` is not found in the JSON string: %s", + requiredField, jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if ((jsonObj.get("id") != null && !jsonObj.get("id").isJsonNull()) + && !jsonObj.get("id").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `id` to be a primitive type in the JSON string but" + + " got `%s`", + jsonObj.get("id").toString())); + } + if (!jsonObj.get("name").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `name` to be a primitive type in the JSON string" + + " but got `%s`", + jsonObj.get("name").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!ImportUserType.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'ImportUserType' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter = + gson.getDelegateAdapter(this, TypeToken.get(ImportUserType.class)); + + return (TypeAdapter) + new TypeAdapter() { + @Override + public void write(JsonWriter out, ImportUserType value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + obj.remove("additionalProperties"); + // serialize additional properties + if (value.getAdditionalProperties() != null) { + for (Map.Entry entry : + value.getAdditionalProperties().entrySet()) { + if (entry.getValue() instanceof String) + obj.addProperty(entry.getKey(), (String) entry.getValue()); + else if (entry.getValue() instanceof Number) + obj.addProperty(entry.getKey(), (Number) entry.getValue()); + else if (entry.getValue() instanceof Boolean) + obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); + else if (entry.getValue() instanceof Character) + obj.addProperty( + entry.getKey(), (Character) entry.getValue()); + else { + JsonElement jsonElement = gson.toJsonTree(entry.getValue()); + if (jsonElement.isJsonArray()) { + obj.add(entry.getKey(), jsonElement.getAsJsonArray()); + } else { + obj.add(entry.getKey(), jsonElement.getAsJsonObject()); + } + } + } + } + elementAdapter.write(out, obj); + } + + @Override + public ImportUserType read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // store additional fields in the deserialized instance + ImportUserType instance = thisAdapter.fromJsonTree(jsonObj); + for (Map.Entry entry : jsonObj.entrySet()) { + if (!openapiFields.contains(entry.getKey())) { + if (entry.getValue().isJsonPrimitive()) { // primitive type + if (entry.getValue().getAsJsonPrimitive().isString()) + instance.putAdditionalProperty( + entry.getKey(), entry.getValue().getAsString()); + else if (entry.getValue().getAsJsonPrimitive().isNumber()) + instance.putAdditionalProperty( + entry.getKey(), entry.getValue().getAsNumber()); + else if (entry.getValue().getAsJsonPrimitive().isBoolean()) + instance.putAdditionalProperty( + entry.getKey(), + entry.getValue().getAsBoolean()); + else + throw new IllegalArgumentException( + String.format( + "The field `%s` has unknown primitive" + + " type. Value: %s", + entry.getKey(), + entry.getValue().toString())); + } else if (entry.getValue().isJsonArray()) { + instance.putAdditionalProperty( + entry.getKey(), + gson.fromJson(entry.getValue(), List.class)); + } else { // JSON object + instance.putAdditionalProperty( + entry.getKey(), + gson.fromJson(entry.getValue(), HashMap.class)); + } + } + } + return instance; + } + }.nullSafe(); + } + } + + /** + * Create an instance of ImportUserType given an JSON string + * + * @param jsonString JSON string + * @return An instance of ImportUserType + * @throws IOException if the JSON string is invalid with respect to ImportUserType + */ + public static ImportUserType fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, ImportUserType.class); + } + + /** + * Convert an instance of ImportUserType to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} diff --git a/sdks/java/src/main/java/com/thoughtspot/client/model/ImportUsersRequest.java b/sdks/java/src/main/java/com/thoughtspot/client/model/ImportUsersRequest.java new file mode 100644 index 000000000..4b6756bf1 --- /dev/null +++ b/sdks/java/src/main/java/com/thoughtspot/client/model/ImportUsersRequest.java @@ -0,0 +1,440 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client.model; + +import com.google.gson.Gson; +import com.google.gson.JsonArray; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.TypeAdapter; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.annotations.SerializedName; +import com.google.gson.reflect.TypeToken; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import com.thoughtspot.client.JSON; +import java.io.IOException; +import java.io.Serializable; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Objects; +import org.openapitools.jackson.nullable.JsonNullable; + +/** ImportUsersRequest */ +@javax.annotation.Generated( + value = "org.openapitools.codegen.languages.JavaClientCodegen", + comments = "Generator version: 7.12.0") +public class ImportUsersRequest implements Serializable { + private static final long serialVersionUID = 1L; + + public static final String SERIALIZED_NAME_USERS = "users"; + + @SerializedName(SERIALIZED_NAME_USERS) + @javax.annotation.Nonnull + private List users; + + public static final String SERIALIZED_NAME_DEFAULT_PASSWORD = "default_password"; + + @SerializedName(SERIALIZED_NAME_DEFAULT_PASSWORD) + @javax.annotation.Nullable + private String defaultPassword; + + public static final String SERIALIZED_NAME_DRY_RUN = "dry_run"; + + @SerializedName(SERIALIZED_NAME_DRY_RUN) + @javax.annotation.Nullable + private Boolean dryRun = true; + + public static final String SERIALIZED_NAME_DELETE_UNSPECIFIED_USERS = + "delete_unspecified_users"; + + @SerializedName(SERIALIZED_NAME_DELETE_UNSPECIFIED_USERS) + @javax.annotation.Nullable + private Boolean deleteUnspecifiedUsers = false; + + public ImportUsersRequest() {} + + public ImportUsersRequest users(@javax.annotation.Nonnull List users) { + this.users = users; + return this; + } + + public ImportUsersRequest addUsersItem(ImportUser usersItem) { + if (this.users == null) { + this.users = new ArrayList<>(); + } + this.users.add(usersItem); + return this; + } + + /** + * List of users needs to be imported. + * + * @return users + */ + @javax.annotation.Nonnull + public List getUsers() { + return users; + } + + public void setUsers(@javax.annotation.Nonnull List users) { + this.users = users; + } + + public ImportUsersRequest defaultPassword(@javax.annotation.Nullable String defaultPassword) { + this.defaultPassword = defaultPassword; + return this; + } + + /** + * The default password to assign to users if they do not have a password assigned in + * ThoughtSpot. + * + * @return defaultPassword + */ + @javax.annotation.Nullable + public String getDefaultPassword() { + return defaultPassword; + } + + public void setDefaultPassword(@javax.annotation.Nullable String defaultPassword) { + this.defaultPassword = defaultPassword; + } + + public ImportUsersRequest dryRun(@javax.annotation.Nullable Boolean dryRun) { + this.dryRun = dryRun; + return this; + } + + /** + * If true, the API performs a test operation and returns user IDs whose data will be edited + * after the import. + * + * @return dryRun + */ + @javax.annotation.Nullable + public Boolean getDryRun() { + return dryRun; + } + + public void setDryRun(@javax.annotation.Nullable Boolean dryRun) { + this.dryRun = dryRun; + } + + public ImportUsersRequest deleteUnspecifiedUsers( + @javax.annotation.Nullable Boolean deleteUnspecifiedUsers) { + this.deleteUnspecifiedUsers = deleteUnspecifiedUsers; + return this; + } + + /** + * If set to true, removes the users that are not specified in the API request. + * + * @return deleteUnspecifiedUsers + */ + @javax.annotation.Nullable + public Boolean getDeleteUnspecifiedUsers() { + return deleteUnspecifiedUsers; + } + + public void setDeleteUnspecifiedUsers( + @javax.annotation.Nullable Boolean deleteUnspecifiedUsers) { + this.deleteUnspecifiedUsers = deleteUnspecifiedUsers; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key name of the property + * @param value value of the property + * @return the ImportUsersRequest instance itself + */ + public ImportUsersRequest putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return a map of objects + */ + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key name of the property + * @return an object + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ImportUsersRequest importUsersRequest = (ImportUsersRequest) o; + return Objects.equals(this.users, importUsersRequest.users) + && Objects.equals(this.defaultPassword, importUsersRequest.defaultPassword) + && Objects.equals(this.dryRun, importUsersRequest.dryRun) + && Objects.equals( + this.deleteUnspecifiedUsers, importUsersRequest.deleteUnspecifiedUsers) + && Objects.equals( + this.additionalProperties, importUsersRequest.additionalProperties); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b + || (a != null + && b != null + && a.isPresent() + && b.isPresent() + && Objects.deepEquals(a.get(), b.get())); + } + + @Override + public int hashCode() { + return Objects.hash( + users, defaultPassword, dryRun, deleteUnspecifiedUsers, additionalProperties); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; + } + return a.isPresent() ? Arrays.deepHashCode(new Object[] {a.get()}) : 31; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ImportUsersRequest {\n"); + sb.append(" users: ").append(toIndentedString(users)).append("\n"); + sb.append(" defaultPassword: ").append(toIndentedString(defaultPassword)).append("\n"); + sb.append(" dryRun: ").append(toIndentedString(dryRun)).append("\n"); + sb.append(" deleteUnspecifiedUsers: ") + .append(toIndentedString(deleteUnspecifiedUsers)) + .append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first + * line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("users"); + openapiFields.add("default_password"); + openapiFields.add("dry_run"); + openapiFields.add("delete_unspecified_users"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + openapiRequiredFields.add("users"); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to ImportUsersRequest + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!ImportUsersRequest.openapiRequiredFields + .isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException( + String.format( + "The required field(s) %s in ImportUsersRequest is not found in" + + " the empty JSON string", + ImportUsersRequest.openapiRequiredFields.toString())); + } + } + + // check to make sure all required properties/fields are present in the JSON string + for (String requiredField : ImportUsersRequest.openapiRequiredFields) { + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException( + String.format( + "The required field `%s` is not found in the JSON string: %s", + requiredField, jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // ensure the json data is an array + if (!jsonObj.get("users").isJsonArray()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `users` to be an array in the JSON string but got" + + " `%s`", + jsonObj.get("users").toString())); + } + + JsonArray jsonArrayusers = jsonObj.getAsJsonArray("users"); + // validate the required field `users` (array) + for (int i = 0; i < jsonArrayusers.size(); i++) { + ImportUser.validateJsonElement(jsonArrayusers.get(i)); + } + ; + if ((jsonObj.get("default_password") != null + && !jsonObj.get("default_password").isJsonNull()) + && !jsonObj.get("default_password").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `default_password` to be a primitive type in the" + + " JSON string but got `%s`", + jsonObj.get("default_password").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!ImportUsersRequest.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'ImportUsersRequest' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter = + gson.getDelegateAdapter(this, TypeToken.get(ImportUsersRequest.class)); + + return (TypeAdapter) + new TypeAdapter() { + @Override + public void write(JsonWriter out, ImportUsersRequest value) + throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + obj.remove("additionalProperties"); + // serialize additional properties + if (value.getAdditionalProperties() != null) { + for (Map.Entry entry : + value.getAdditionalProperties().entrySet()) { + if (entry.getValue() instanceof String) + obj.addProperty(entry.getKey(), (String) entry.getValue()); + else if (entry.getValue() instanceof Number) + obj.addProperty(entry.getKey(), (Number) entry.getValue()); + else if (entry.getValue() instanceof Boolean) + obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); + else if (entry.getValue() instanceof Character) + obj.addProperty( + entry.getKey(), (Character) entry.getValue()); + else { + JsonElement jsonElement = gson.toJsonTree(entry.getValue()); + if (jsonElement.isJsonArray()) { + obj.add(entry.getKey(), jsonElement.getAsJsonArray()); + } else { + obj.add(entry.getKey(), jsonElement.getAsJsonObject()); + } + } + } + } + elementAdapter.write(out, obj); + } + + @Override + public ImportUsersRequest read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // store additional fields in the deserialized instance + ImportUsersRequest instance = thisAdapter.fromJsonTree(jsonObj); + for (Map.Entry entry : jsonObj.entrySet()) { + if (!openapiFields.contains(entry.getKey())) { + if (entry.getValue().isJsonPrimitive()) { // primitive type + if (entry.getValue().getAsJsonPrimitive().isString()) + instance.putAdditionalProperty( + entry.getKey(), entry.getValue().getAsString()); + else if (entry.getValue().getAsJsonPrimitive().isNumber()) + instance.putAdditionalProperty( + entry.getKey(), entry.getValue().getAsNumber()); + else if (entry.getValue().getAsJsonPrimitive().isBoolean()) + instance.putAdditionalProperty( + entry.getKey(), + entry.getValue().getAsBoolean()); + else + throw new IllegalArgumentException( + String.format( + "The field `%s` has unknown primitive" + + " type. Value: %s", + entry.getKey(), + entry.getValue().toString())); + } else if (entry.getValue().isJsonArray()) { + instance.putAdditionalProperty( + entry.getKey(), + gson.fromJson(entry.getValue(), List.class)); + } else { // JSON object + instance.putAdditionalProperty( + entry.getKey(), + gson.fromJson(entry.getValue(), HashMap.class)); + } + } + } + return instance; + } + }.nullSafe(); + } + } + + /** + * Create an instance of ImportUsersRequest given an JSON string + * + * @param jsonString JSON string + * @return An instance of ImportUsersRequest + * @throws IOException if the JSON string is invalid with respect to ImportUsersRequest + */ + public static ImportUsersRequest fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, ImportUsersRequest.class); + } + + /** + * Convert an instance of ImportUsersRequest to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} diff --git a/sdks/java/src/main/java/com/thoughtspot/client/model/ImportUsersResponse.java b/sdks/java/src/main/java/com/thoughtspot/client/model/ImportUsersResponse.java new file mode 100644 index 000000000..870171b5d --- /dev/null +++ b/sdks/java/src/main/java/com/thoughtspot/client/model/ImportUsersResponse.java @@ -0,0 +1,444 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client.model; + +import com.google.gson.Gson; +import com.google.gson.JsonArray; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.TypeAdapter; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.annotations.SerializedName; +import com.google.gson.reflect.TypeToken; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import com.thoughtspot.client.JSON; +import java.io.IOException; +import java.io.Serializable; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Objects; +import org.openapitools.jackson.nullable.JsonNullable; + +/** ImportUsersResponse */ +@javax.annotation.Generated( + value = "org.openapitools.codegen.languages.JavaClientCodegen", + comments = "Generator version: 7.12.0") +public class ImportUsersResponse implements Serializable { + private static final long serialVersionUID = 1L; + + public static final String SERIALIZED_NAME_USERS_ADDED = "users_added"; + + @SerializedName(SERIALIZED_NAME_USERS_ADDED) + @javax.annotation.Nullable + private List usersAdded; + + public static final String SERIALIZED_NAME_USERS_UPDATED = "users_updated"; + + @SerializedName(SERIALIZED_NAME_USERS_UPDATED) + @javax.annotation.Nullable + private List usersUpdated; + + public static final String SERIALIZED_NAME_USERS_DELETED = "users_deleted"; + + @SerializedName(SERIALIZED_NAME_USERS_DELETED) + @javax.annotation.Nullable + private List usersDeleted; + + public ImportUsersResponse() {} + + public ImportUsersResponse usersAdded( + @javax.annotation.Nullable List usersAdded) { + this.usersAdded = usersAdded; + return this; + } + + public ImportUsersResponse addUsersAddedItem(ImportUserType usersAddedItem) { + if (this.usersAdded == null) { + this.usersAdded = new ArrayList<>(); + } + this.usersAdded.add(usersAddedItem); + return this; + } + + /** + * Get usersAdded + * + * @return usersAdded + */ + @javax.annotation.Nullable + public List getUsersAdded() { + return usersAdded; + } + + public void setUsersAdded(@javax.annotation.Nullable List usersAdded) { + this.usersAdded = usersAdded; + } + + public ImportUsersResponse usersUpdated( + @javax.annotation.Nullable List usersUpdated) { + this.usersUpdated = usersUpdated; + return this; + } + + public ImportUsersResponse addUsersUpdatedItem(ImportUserType usersUpdatedItem) { + if (this.usersUpdated == null) { + this.usersUpdated = new ArrayList<>(); + } + this.usersUpdated.add(usersUpdatedItem); + return this; + } + + /** + * Get usersUpdated + * + * @return usersUpdated + */ + @javax.annotation.Nullable + public List getUsersUpdated() { + return usersUpdated; + } + + public void setUsersUpdated(@javax.annotation.Nullable List usersUpdated) { + this.usersUpdated = usersUpdated; + } + + public ImportUsersResponse usersDeleted( + @javax.annotation.Nullable List usersDeleted) { + this.usersDeleted = usersDeleted; + return this; + } + + public ImportUsersResponse addUsersDeletedItem(ImportUserType usersDeletedItem) { + if (this.usersDeleted == null) { + this.usersDeleted = new ArrayList<>(); + } + this.usersDeleted.add(usersDeletedItem); + return this; + } + + /** + * Get usersDeleted + * + * @return usersDeleted + */ + @javax.annotation.Nullable + public List getUsersDeleted() { + return usersDeleted; + } + + public void setUsersDeleted(@javax.annotation.Nullable List usersDeleted) { + this.usersDeleted = usersDeleted; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key name of the property + * @param value value of the property + * @return the ImportUsersResponse instance itself + */ + public ImportUsersResponse putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return a map of objects + */ + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key name of the property + * @return an object + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ImportUsersResponse importUsersResponse = (ImportUsersResponse) o; + return Objects.equals(this.usersAdded, importUsersResponse.usersAdded) + && Objects.equals(this.usersUpdated, importUsersResponse.usersUpdated) + && Objects.equals(this.usersDeleted, importUsersResponse.usersDeleted) + && Objects.equals( + this.additionalProperties, importUsersResponse.additionalProperties); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b + || (a != null + && b != null + && a.isPresent() + && b.isPresent() + && Objects.deepEquals(a.get(), b.get())); + } + + @Override + public int hashCode() { + return Objects.hash(usersAdded, usersUpdated, usersDeleted, additionalProperties); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; + } + return a.isPresent() ? Arrays.deepHashCode(new Object[] {a.get()}) : 31; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ImportUsersResponse {\n"); + sb.append(" usersAdded: ").append(toIndentedString(usersAdded)).append("\n"); + sb.append(" usersUpdated: ").append(toIndentedString(usersUpdated)).append("\n"); + sb.append(" usersDeleted: ").append(toIndentedString(usersDeleted)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first + * line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("users_added"); + openapiFields.add("users_updated"); + openapiFields.add("users_deleted"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to ImportUsersResponse + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!ImportUsersResponse.openapiRequiredFields + .isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException( + String.format( + "The required field(s) %s in ImportUsersResponse is not found in" + + " the empty JSON string", + ImportUsersResponse.openapiRequiredFields.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if (jsonObj.get("users_added") != null && !jsonObj.get("users_added").isJsonNull()) { + JsonArray jsonArrayusersAdded = jsonObj.getAsJsonArray("users_added"); + if (jsonArrayusersAdded != null) { + // ensure the json data is an array + if (!jsonObj.get("users_added").isJsonArray()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `users_added` to be an array in the JSON" + + " string but got `%s`", + jsonObj.get("users_added").toString())); + } + + // validate the optional field `users_added` (array) + for (int i = 0; i < jsonArrayusersAdded.size(); i++) { + ImportUserType.validateJsonElement(jsonArrayusersAdded.get(i)); + } + ; + } + } + if (jsonObj.get("users_updated") != null && !jsonObj.get("users_updated").isJsonNull()) { + JsonArray jsonArrayusersUpdated = jsonObj.getAsJsonArray("users_updated"); + if (jsonArrayusersUpdated != null) { + // ensure the json data is an array + if (!jsonObj.get("users_updated").isJsonArray()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `users_updated` to be an array in the JSON" + + " string but got `%s`", + jsonObj.get("users_updated").toString())); + } + + // validate the optional field `users_updated` (array) + for (int i = 0; i < jsonArrayusersUpdated.size(); i++) { + ImportUserType.validateJsonElement(jsonArrayusersUpdated.get(i)); + } + ; + } + } + if (jsonObj.get("users_deleted") != null && !jsonObj.get("users_deleted").isJsonNull()) { + JsonArray jsonArrayusersDeleted = jsonObj.getAsJsonArray("users_deleted"); + if (jsonArrayusersDeleted != null) { + // ensure the json data is an array + if (!jsonObj.get("users_deleted").isJsonArray()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `users_deleted` to be an array in the JSON" + + " string but got `%s`", + jsonObj.get("users_deleted").toString())); + } + + // validate the optional field `users_deleted` (array) + for (int i = 0; i < jsonArrayusersDeleted.size(); i++) { + ImportUserType.validateJsonElement(jsonArrayusersDeleted.get(i)); + } + ; + } + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!ImportUsersResponse.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'ImportUsersResponse' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter = + gson.getDelegateAdapter(this, TypeToken.get(ImportUsersResponse.class)); + + return (TypeAdapter) + new TypeAdapter() { + @Override + public void write(JsonWriter out, ImportUsersResponse value) + throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + obj.remove("additionalProperties"); + // serialize additional properties + if (value.getAdditionalProperties() != null) { + for (Map.Entry entry : + value.getAdditionalProperties().entrySet()) { + if (entry.getValue() instanceof String) + obj.addProperty(entry.getKey(), (String) entry.getValue()); + else if (entry.getValue() instanceof Number) + obj.addProperty(entry.getKey(), (Number) entry.getValue()); + else if (entry.getValue() instanceof Boolean) + obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); + else if (entry.getValue() instanceof Character) + obj.addProperty( + entry.getKey(), (Character) entry.getValue()); + else { + JsonElement jsonElement = gson.toJsonTree(entry.getValue()); + if (jsonElement.isJsonArray()) { + obj.add(entry.getKey(), jsonElement.getAsJsonArray()); + } else { + obj.add(entry.getKey(), jsonElement.getAsJsonObject()); + } + } + } + } + elementAdapter.write(out, obj); + } + + @Override + public ImportUsersResponse read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // store additional fields in the deserialized instance + ImportUsersResponse instance = thisAdapter.fromJsonTree(jsonObj); + for (Map.Entry entry : jsonObj.entrySet()) { + if (!openapiFields.contains(entry.getKey())) { + if (entry.getValue().isJsonPrimitive()) { // primitive type + if (entry.getValue().getAsJsonPrimitive().isString()) + instance.putAdditionalProperty( + entry.getKey(), entry.getValue().getAsString()); + else if (entry.getValue().getAsJsonPrimitive().isNumber()) + instance.putAdditionalProperty( + entry.getKey(), entry.getValue().getAsNumber()); + else if (entry.getValue().getAsJsonPrimitive().isBoolean()) + instance.putAdditionalProperty( + entry.getKey(), + entry.getValue().getAsBoolean()); + else + throw new IllegalArgumentException( + String.format( + "The field `%s` has unknown primitive" + + " type. Value: %s", + entry.getKey(), + entry.getValue().toString())); + } else if (entry.getValue().isJsonArray()) { + instance.putAdditionalProperty( + entry.getKey(), + gson.fromJson(entry.getValue(), List.class)); + } else { // JSON object + instance.putAdditionalProperty( + entry.getKey(), + gson.fromJson(entry.getValue(), HashMap.class)); + } + } + } + return instance; + } + }.nullSafe(); + } + } + + /** + * Create an instance of ImportUsersResponse given an JSON string + * + * @param jsonString JSON string + * @return An instance of ImportUsersResponse + * @throws IOException if the JSON string is invalid with respect to ImportUsersResponse + */ + public static ImportUsersResponse fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, ImportUsersResponse.class); + } + + /** + * Convert an instance of ImportUsersResponse to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} diff --git a/sdks/java/src/main/java/com/thoughtspot/client/model/InputEurekaNLSRequest.java b/sdks/java/src/main/java/com/thoughtspot/client/model/InputEurekaNLSRequest.java new file mode 100644 index 000000000..51bd71d2f --- /dev/null +++ b/sdks/java/src/main/java/com/thoughtspot/client/model/InputEurekaNLSRequest.java @@ -0,0 +1,416 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client.model; + +import com.google.gson.Gson; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.TypeAdapter; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.annotations.SerializedName; +import com.google.gson.reflect.TypeToken; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import com.thoughtspot.client.JSON; +import java.io.IOException; +import java.io.Serializable; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Objects; +import org.openapitools.jackson.nullable.JsonNullable; + +/** InputEurekaNLSRequest */ +@javax.annotation.Generated( + value = "org.openapitools.codegen.languages.JavaClientCodegen", + comments = "Generator version: 7.12.0") +public class InputEurekaNLSRequest implements Serializable { + private static final long serialVersionUID = 1L; + + public static final String SERIALIZED_NAME_AGENT_VERSION = "agentVersion"; + + @SerializedName(SERIALIZED_NAME_AGENT_VERSION) + @javax.annotation.Nullable + private Integer agentVersion; + + public static final String SERIALIZED_NAME_BYPASS_CACHE = "bypassCache"; + + @SerializedName(SERIALIZED_NAME_BYPASS_CACHE) + @javax.annotation.Nullable + private Boolean bypassCache; + + public static final String SERIALIZED_NAME_INSTRUCTIONS = "instructions"; + + @SerializedName(SERIALIZED_NAME_INSTRUCTIONS) + @javax.annotation.Nullable + private List instructions; + + public static final String SERIALIZED_NAME_QUERY = "query"; + + @SerializedName(SERIALIZED_NAME_QUERY) + @javax.annotation.Nullable + private String query; + + public InputEurekaNLSRequest() {} + + public InputEurekaNLSRequest agentVersion(@javax.annotation.Nullable Integer agentVersion) { + this.agentVersion = agentVersion; + return this; + } + + /** + * Cluster version like 10.4.0.cl, 10.5.0.cl, so on. + * + * @return agentVersion + */ + @javax.annotation.Nullable + public Integer getAgentVersion() { + return agentVersion; + } + + public void setAgentVersion(@javax.annotation.Nullable Integer agentVersion) { + this.agentVersion = agentVersion; + } + + public InputEurekaNLSRequest bypassCache(@javax.annotation.Nullable Boolean bypassCache) { + this.bypassCache = bypassCache; + return this; + } + + /** + * If true, results are not returned from cache & calculated every time. Can incur high + * costs & latency. + * + * @return bypassCache + */ + @javax.annotation.Nullable + public Boolean getBypassCache() { + return bypassCache; + } + + public void setBypassCache(@javax.annotation.Nullable Boolean bypassCache) { + this.bypassCache = bypassCache; + } + + public InputEurekaNLSRequest instructions( + @javax.annotation.Nullable List instructions) { + this.instructions = instructions; + return this; + } + + public InputEurekaNLSRequest addInstructionsItem(String instructionsItem) { + if (this.instructions == null) { + this.instructions = new ArrayList<>(); + } + this.instructions.add(instructionsItem); + return this; + } + + /** + * User specific instructions for processing the @query. + * + * @return instructions + */ + @javax.annotation.Nullable + public List getInstructions() { + return instructions; + } + + public void setInstructions(@javax.annotation.Nullable List instructions) { + this.instructions = instructions; + } + + public InputEurekaNLSRequest query(@javax.annotation.Nullable String query) { + this.query = query; + return this; + } + + /** + * User query which is a topical/goal oriented question that needs to be broken down into + * smaller simple analytical questions. + * + * @return query + */ + @javax.annotation.Nullable + public String getQuery() { + return query; + } + + public void setQuery(@javax.annotation.Nullable String query) { + this.query = query; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key name of the property + * @param value value of the property + * @return the InputEurekaNLSRequest instance itself + */ + public InputEurekaNLSRequest putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return a map of objects + */ + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key name of the property + * @return an object + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + InputEurekaNLSRequest inputEurekaNLSRequest = (InputEurekaNLSRequest) o; + return Objects.equals(this.agentVersion, inputEurekaNLSRequest.agentVersion) + && Objects.equals(this.bypassCache, inputEurekaNLSRequest.bypassCache) + && Objects.equals(this.instructions, inputEurekaNLSRequest.instructions) + && Objects.equals(this.query, inputEurekaNLSRequest.query) + && Objects.equals( + this.additionalProperties, inputEurekaNLSRequest.additionalProperties); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b + || (a != null + && b != null + && a.isPresent() + && b.isPresent() + && Objects.deepEquals(a.get(), b.get())); + } + + @Override + public int hashCode() { + return Objects.hash(agentVersion, bypassCache, instructions, query, additionalProperties); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; + } + return a.isPresent() ? Arrays.deepHashCode(new Object[] {a.get()}) : 31; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class InputEurekaNLSRequest {\n"); + sb.append(" agentVersion: ").append(toIndentedString(agentVersion)).append("\n"); + sb.append(" bypassCache: ").append(toIndentedString(bypassCache)).append("\n"); + sb.append(" instructions: ").append(toIndentedString(instructions)).append("\n"); + sb.append(" query: ").append(toIndentedString(query)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first + * line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("agentVersion"); + openapiFields.add("bypassCache"); + openapiFields.add("instructions"); + openapiFields.add("query"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to InputEurekaNLSRequest + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!InputEurekaNLSRequest.openapiRequiredFields + .isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException( + String.format( + "The required field(s) %s in InputEurekaNLSRequest is not found in" + + " the empty JSON string", + InputEurekaNLSRequest.openapiRequiredFields.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // ensure the optional json data is an array if present + if (jsonObj.get("instructions") != null + && !jsonObj.get("instructions").isJsonNull() + && !jsonObj.get("instructions").isJsonArray()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `instructions` to be an array in the JSON string" + + " but got `%s`", + jsonObj.get("instructions").toString())); + } + if ((jsonObj.get("query") != null && !jsonObj.get("query").isJsonNull()) + && !jsonObj.get("query").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `query` to be a primitive type in the JSON string" + + " but got `%s`", + jsonObj.get("query").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!InputEurekaNLSRequest.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'InputEurekaNLSRequest' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter = + gson.getDelegateAdapter(this, TypeToken.get(InputEurekaNLSRequest.class)); + + return (TypeAdapter) + new TypeAdapter() { + @Override + public void write(JsonWriter out, InputEurekaNLSRequest value) + throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + obj.remove("additionalProperties"); + // serialize additional properties + if (value.getAdditionalProperties() != null) { + for (Map.Entry entry : + value.getAdditionalProperties().entrySet()) { + if (entry.getValue() instanceof String) + obj.addProperty(entry.getKey(), (String) entry.getValue()); + else if (entry.getValue() instanceof Number) + obj.addProperty(entry.getKey(), (Number) entry.getValue()); + else if (entry.getValue() instanceof Boolean) + obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); + else if (entry.getValue() instanceof Character) + obj.addProperty( + entry.getKey(), (Character) entry.getValue()); + else { + JsonElement jsonElement = gson.toJsonTree(entry.getValue()); + if (jsonElement.isJsonArray()) { + obj.add(entry.getKey(), jsonElement.getAsJsonArray()); + } else { + obj.add(entry.getKey(), jsonElement.getAsJsonObject()); + } + } + } + } + elementAdapter.write(out, obj); + } + + @Override + public InputEurekaNLSRequest read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // store additional fields in the deserialized instance + InputEurekaNLSRequest instance = thisAdapter.fromJsonTree(jsonObj); + for (Map.Entry entry : jsonObj.entrySet()) { + if (!openapiFields.contains(entry.getKey())) { + if (entry.getValue().isJsonPrimitive()) { // primitive type + if (entry.getValue().getAsJsonPrimitive().isString()) + instance.putAdditionalProperty( + entry.getKey(), entry.getValue().getAsString()); + else if (entry.getValue().getAsJsonPrimitive().isNumber()) + instance.putAdditionalProperty( + entry.getKey(), entry.getValue().getAsNumber()); + else if (entry.getValue().getAsJsonPrimitive().isBoolean()) + instance.putAdditionalProperty( + entry.getKey(), + entry.getValue().getAsBoolean()); + else + throw new IllegalArgumentException( + String.format( + "The field `%s` has unknown primitive" + + " type. Value: %s", + entry.getKey(), + entry.getValue().toString())); + } else if (entry.getValue().isJsonArray()) { + instance.putAdditionalProperty( + entry.getKey(), + gson.fromJson(entry.getValue(), List.class)); + } else { // JSON object + instance.putAdditionalProperty( + entry.getKey(), + gson.fromJson(entry.getValue(), HashMap.class)); + } + } + } + return instance; + } + }.nullSafe(); + } + } + + /** + * Create an instance of InputEurekaNLSRequest given an JSON string + * + * @param jsonString JSON string + * @return An instance of InputEurekaNLSRequest + * @throws IOException if the JSON string is invalid with respect to InputEurekaNLSRequest + */ + public static InputEurekaNLSRequest fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, InputEurekaNLSRequest.class); + } + + /** + * Convert an instance of InputEurekaNLSRequest to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} diff --git a/sdks/java/src/main/java/com/thoughtspot/client/model/JWTMetadataObject.java b/sdks/java/src/main/java/com/thoughtspot/client/model/JWTMetadataObject.java new file mode 100644 index 000000000..f4c9e01f0 --- /dev/null +++ b/sdks/java/src/main/java/com/thoughtspot/client/model/JWTMetadataObject.java @@ -0,0 +1,400 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client.model; + +import com.google.gson.Gson; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.TypeAdapter; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.reflect.TypeToken; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import com.thoughtspot.client.JSON; +import java.io.IOException; +import java.io.Serializable; +import java.util.Arrays; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Objects; +import org.openapitools.jackson.nullable.JsonNullable; + +/** Metadata objects. */ +@javax.annotation.Generated( + value = "org.openapitools.codegen.languages.JavaClientCodegen", + comments = "Generator version: 7.12.0") +public class JWTMetadataObject implements Serializable { + private static final long serialVersionUID = 1L; + + public static final String SERIALIZED_NAME_IDENTIFIER = "identifier"; + + @SerializedName(SERIALIZED_NAME_IDENTIFIER) + @javax.annotation.Nullable + private String identifier; + + /** Gets or Sets type */ + @JsonAdapter(TypeEnum.Adapter.class) + public enum TypeEnum { + LOGICAL_TABLE("LOGICAL_TABLE"); + + private String value; + + TypeEnum(String value) { + this.value = value; + } + + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + public static TypeEnum fromValue(String value) { + for (TypeEnum b : TypeEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + return null; + } + + public static class Adapter extends TypeAdapter { + @Override + public void write(final JsonWriter jsonWriter, final TypeEnum enumeration) + throws IOException { + jsonWriter.value(enumeration.getValue()); + } + + @Override + public TypeEnum read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + return TypeEnum.fromValue(value); + } + } + + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + String value = jsonElement.getAsString(); + TypeEnum.fromValue(value); + } + } + + public static final String SERIALIZED_NAME_TYPE = "type"; + + @SerializedName(SERIALIZED_NAME_TYPE) + @javax.annotation.Nullable + private TypeEnum type; + + public JWTMetadataObject() {} + + public JWTMetadataObject identifier(@javax.annotation.Nullable String identifier) { + this.identifier = identifier; + return this; + } + + /** + * Get identifier + * + * @return identifier + */ + @javax.annotation.Nullable + public String getIdentifier() { + return identifier; + } + + public void setIdentifier(@javax.annotation.Nullable String identifier) { + this.identifier = identifier; + } + + public JWTMetadataObject type(@javax.annotation.Nullable TypeEnum type) { + this.type = type; + return this; + } + + /** + * Get type + * + * @return type + */ + @javax.annotation.Nullable + public TypeEnum getType() { + return type; + } + + public void setType(@javax.annotation.Nullable TypeEnum type) { + this.type = type; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key name of the property + * @param value value of the property + * @return the JWTMetadataObject instance itself + */ + public JWTMetadataObject putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return a map of objects + */ + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key name of the property + * @return an object + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + JWTMetadataObject jwTMetadataObject = (JWTMetadataObject) o; + return Objects.equals(this.identifier, jwTMetadataObject.identifier) + && Objects.equals(this.type, jwTMetadataObject.type) + && Objects.equals( + this.additionalProperties, jwTMetadataObject.additionalProperties); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b + || (a != null + && b != null + && a.isPresent() + && b.isPresent() + && Objects.deepEquals(a.get(), b.get())); + } + + @Override + public int hashCode() { + return Objects.hash(identifier, type, additionalProperties); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; + } + return a.isPresent() ? Arrays.deepHashCode(new Object[] {a.get()}) : 31; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class JWTMetadataObject {\n"); + sb.append(" identifier: ").append(toIndentedString(identifier)).append("\n"); + sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first + * line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("identifier"); + openapiFields.add("type"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to JWTMetadataObject + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!JWTMetadataObject.openapiRequiredFields + .isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException( + String.format( + "The required field(s) %s in JWTMetadataObject is not found in the" + + " empty JSON string", + JWTMetadataObject.openapiRequiredFields.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if ((jsonObj.get("identifier") != null && !jsonObj.get("identifier").isJsonNull()) + && !jsonObj.get("identifier").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `identifier` to be a primitive type in the JSON" + + " string but got `%s`", + jsonObj.get("identifier").toString())); + } + if ((jsonObj.get("type") != null && !jsonObj.get("type").isJsonNull()) + && !jsonObj.get("type").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `type` to be a primitive type in the JSON string" + + " but got `%s`", + jsonObj.get("type").toString())); + } + // validate the optional field `type` + if (jsonObj.get("type") != null && !jsonObj.get("type").isJsonNull()) { + TypeEnum.validateJsonElement(jsonObj.get("type")); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!JWTMetadataObject.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'JWTMetadataObject' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter = + gson.getDelegateAdapter(this, TypeToken.get(JWTMetadataObject.class)); + + return (TypeAdapter) + new TypeAdapter() { + @Override + public void write(JsonWriter out, JWTMetadataObject value) + throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + obj.remove("additionalProperties"); + // serialize additional properties + if (value.getAdditionalProperties() != null) { + for (Map.Entry entry : + value.getAdditionalProperties().entrySet()) { + if (entry.getValue() instanceof String) + obj.addProperty(entry.getKey(), (String) entry.getValue()); + else if (entry.getValue() instanceof Number) + obj.addProperty(entry.getKey(), (Number) entry.getValue()); + else if (entry.getValue() instanceof Boolean) + obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); + else if (entry.getValue() instanceof Character) + obj.addProperty( + entry.getKey(), (Character) entry.getValue()); + else { + JsonElement jsonElement = gson.toJsonTree(entry.getValue()); + if (jsonElement.isJsonArray()) { + obj.add(entry.getKey(), jsonElement.getAsJsonArray()); + } else { + obj.add(entry.getKey(), jsonElement.getAsJsonObject()); + } + } + } + } + elementAdapter.write(out, obj); + } + + @Override + public JWTMetadataObject read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // store additional fields in the deserialized instance + JWTMetadataObject instance = thisAdapter.fromJsonTree(jsonObj); + for (Map.Entry entry : jsonObj.entrySet()) { + if (!openapiFields.contains(entry.getKey())) { + if (entry.getValue().isJsonPrimitive()) { // primitive type + if (entry.getValue().getAsJsonPrimitive().isString()) + instance.putAdditionalProperty( + entry.getKey(), entry.getValue().getAsString()); + else if (entry.getValue().getAsJsonPrimitive().isNumber()) + instance.putAdditionalProperty( + entry.getKey(), entry.getValue().getAsNumber()); + else if (entry.getValue().getAsJsonPrimitive().isBoolean()) + instance.putAdditionalProperty( + entry.getKey(), + entry.getValue().getAsBoolean()); + else + throw new IllegalArgumentException( + String.format( + "The field `%s` has unknown primitive" + + " type. Value: %s", + entry.getKey(), + entry.getValue().toString())); + } else if (entry.getValue().isJsonArray()) { + instance.putAdditionalProperty( + entry.getKey(), + gson.fromJson(entry.getValue(), List.class)); + } else { // JSON object + instance.putAdditionalProperty( + entry.getKey(), + gson.fromJson(entry.getValue(), HashMap.class)); + } + } + } + return instance; + } + }.nullSafe(); + } + } + + /** + * Create an instance of JWTMetadataObject given an JSON string + * + * @param jsonString JSON string + * @return An instance of JWTMetadataObject + * @throws IOException if the JSON string is invalid with respect to JWTMetadataObject + */ + public static JWTMetadataObject fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, JWTMetadataObject.class); + } + + /** + * Convert an instance of JWTMetadataObject to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} diff --git a/sdks/java/src/main/java/com/thoughtspot/client/model/JWTParameter.java b/sdks/java/src/main/java/com/thoughtspot/client/model/JWTParameter.java new file mode 100644 index 000000000..f42c9e57d --- /dev/null +++ b/sdks/java/src/main/java/com/thoughtspot/client/model/JWTParameter.java @@ -0,0 +1,359 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client.model; + +import com.google.gson.Gson; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.TypeAdapter; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.annotations.SerializedName; +import com.google.gson.reflect.TypeToken; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import com.thoughtspot.client.JSON; +import java.io.IOException; +import java.io.Serializable; +import java.util.Arrays; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Objects; +import org.openapitools.jackson.nullable.JsonNullable; + +/** List of runtime parameters need to set during the session. */ +@javax.annotation.Generated( + value = "org.openapitools.codegen.languages.JavaClientCodegen", + comments = "Generator version: 7.12.0") +public class JWTParameter implements Serializable { + private static final long serialVersionUID = 1L; + + public static final String SERIALIZED_NAME_RUNTIME_FILTER = "runtime_filter"; + + @SerializedName(SERIALIZED_NAME_RUNTIME_FILTER) + @javax.annotation.Nullable + private Object runtimeFilter; + + public static final String SERIALIZED_NAME_RUNTIME_SORT = "runtime_sort"; + + @SerializedName(SERIALIZED_NAME_RUNTIME_SORT) + @javax.annotation.Nullable + private Object runtimeSort; + + public static final String SERIALIZED_NAME_RUNTIME_PARAM_OVERRIDE = "runtime_param_override"; + + @SerializedName(SERIALIZED_NAME_RUNTIME_PARAM_OVERRIDE) + @javax.annotation.Nullable + private Object runtimeParamOverride; + + public JWTParameter() {} + + public JWTParameter runtimeFilter(@javax.annotation.Nullable Object runtimeFilter) { + this.runtimeFilter = runtimeFilter; + return this; + } + + /** + * Runtime filter parameter type in JWT. + * + * @return runtimeFilter + */ + @javax.annotation.Nullable + public Object getRuntimeFilter() { + return runtimeFilter; + } + + public void setRuntimeFilter(@javax.annotation.Nullable Object runtimeFilter) { + this.runtimeFilter = runtimeFilter; + } + + public JWTParameter runtimeSort(@javax.annotation.Nullable Object runtimeSort) { + this.runtimeSort = runtimeSort; + return this; + } + + /** + * Runtime sort parameter type in JWT. + * + * @return runtimeSort + */ + @javax.annotation.Nullable + public Object getRuntimeSort() { + return runtimeSort; + } + + public void setRuntimeSort(@javax.annotation.Nullable Object runtimeSort) { + this.runtimeSort = runtimeSort; + } + + public JWTParameter runtimeParamOverride( + @javax.annotation.Nullable Object runtimeParamOverride) { + this.runtimeParamOverride = runtimeParamOverride; + return this; + } + + /** + * Runtime param override type in JWT. + * + * @return runtimeParamOverride + */ + @javax.annotation.Nullable + public Object getRuntimeParamOverride() { + return runtimeParamOverride; + } + + public void setRuntimeParamOverride(@javax.annotation.Nullable Object runtimeParamOverride) { + this.runtimeParamOverride = runtimeParamOverride; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key name of the property + * @param value value of the property + * @return the JWTParameter instance itself + */ + public JWTParameter putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return a map of objects + */ + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key name of the property + * @return an object + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + JWTParameter jwTParameter = (JWTParameter) o; + return Objects.equals(this.runtimeFilter, jwTParameter.runtimeFilter) + && Objects.equals(this.runtimeSort, jwTParameter.runtimeSort) + && Objects.equals(this.runtimeParamOverride, jwTParameter.runtimeParamOverride) + && Objects.equals(this.additionalProperties, jwTParameter.additionalProperties); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b + || (a != null + && b != null + && a.isPresent() + && b.isPresent() + && Objects.deepEquals(a.get(), b.get())); + } + + @Override + public int hashCode() { + return Objects.hash(runtimeFilter, runtimeSort, runtimeParamOverride, additionalProperties); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; + } + return a.isPresent() ? Arrays.deepHashCode(new Object[] {a.get()}) : 31; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class JWTParameter {\n"); + sb.append(" runtimeFilter: ").append(toIndentedString(runtimeFilter)).append("\n"); + sb.append(" runtimeSort: ").append(toIndentedString(runtimeSort)).append("\n"); + sb.append(" runtimeParamOverride: ") + .append(toIndentedString(runtimeParamOverride)) + .append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first + * line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("runtime_filter"); + openapiFields.add("runtime_sort"); + openapiFields.add("runtime_param_override"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to JWTParameter + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!JWTParameter.openapiRequiredFields + .isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException( + String.format( + "The required field(s) %s in JWTParameter is not found in the" + + " empty JSON string", + JWTParameter.openapiRequiredFields.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!JWTParameter.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'JWTParameter' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter = + gson.getDelegateAdapter(this, TypeToken.get(JWTParameter.class)); + + return (TypeAdapter) + new TypeAdapter() { + @Override + public void write(JsonWriter out, JWTParameter value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + obj.remove("additionalProperties"); + // serialize additional properties + if (value.getAdditionalProperties() != null) { + for (Map.Entry entry : + value.getAdditionalProperties().entrySet()) { + if (entry.getValue() instanceof String) + obj.addProperty(entry.getKey(), (String) entry.getValue()); + else if (entry.getValue() instanceof Number) + obj.addProperty(entry.getKey(), (Number) entry.getValue()); + else if (entry.getValue() instanceof Boolean) + obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); + else if (entry.getValue() instanceof Character) + obj.addProperty( + entry.getKey(), (Character) entry.getValue()); + else { + JsonElement jsonElement = gson.toJsonTree(entry.getValue()); + if (jsonElement.isJsonArray()) { + obj.add(entry.getKey(), jsonElement.getAsJsonArray()); + } else { + obj.add(entry.getKey(), jsonElement.getAsJsonObject()); + } + } + } + } + elementAdapter.write(out, obj); + } + + @Override + public JWTParameter read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // store additional fields in the deserialized instance + JWTParameter instance = thisAdapter.fromJsonTree(jsonObj); + for (Map.Entry entry : jsonObj.entrySet()) { + if (!openapiFields.contains(entry.getKey())) { + if (entry.getValue().isJsonPrimitive()) { // primitive type + if (entry.getValue().getAsJsonPrimitive().isString()) + instance.putAdditionalProperty( + entry.getKey(), entry.getValue().getAsString()); + else if (entry.getValue().getAsJsonPrimitive().isNumber()) + instance.putAdditionalProperty( + entry.getKey(), entry.getValue().getAsNumber()); + else if (entry.getValue().getAsJsonPrimitive().isBoolean()) + instance.putAdditionalProperty( + entry.getKey(), + entry.getValue().getAsBoolean()); + else + throw new IllegalArgumentException( + String.format( + "The field `%s` has unknown primitive" + + " type. Value: %s", + entry.getKey(), + entry.getValue().toString())); + } else if (entry.getValue().isJsonArray()) { + instance.putAdditionalProperty( + entry.getKey(), + gson.fromJson(entry.getValue(), List.class)); + } else { // JSON object + instance.putAdditionalProperty( + entry.getKey(), + gson.fromJson(entry.getValue(), HashMap.class)); + } + } + } + return instance; + } + }.nullSafe(); + } + } + + /** + * Create an instance of JWTParameter given an JSON string + * + * @param jsonString JSON string + * @return An instance of JWTParameter + * @throws IOException if the JSON string is invalid with respect to JWTParameter + */ + public static JWTParameter fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, JWTParameter.class); + } + + /** + * Convert an instance of JWTParameter to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} diff --git a/sdks/java/src/main/java/com/thoughtspot/client/model/JWTUserOptions.java b/sdks/java/src/main/java/com/thoughtspot/client/model/JWTUserOptions.java new file mode 100644 index 000000000..dd7b3d5bf --- /dev/null +++ b/sdks/java/src/main/java/com/thoughtspot/client/model/JWTUserOptions.java @@ -0,0 +1,378 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client.model; + +import com.google.gson.Gson; +import com.google.gson.JsonArray; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.TypeAdapter; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.annotations.SerializedName; +import com.google.gson.reflect.TypeToken; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import com.thoughtspot.client.JSON; +import java.io.IOException; +import java.io.Serializable; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Objects; +import org.openapitools.jackson.nullable.JsonNullable; + +/** + * JWT user options to create a JWT token given the payload. *Deprecated in 9.12.0.cl. Use + * user_parameters instead.* + */ +@javax.annotation.Generated( + value = "org.openapitools.codegen.languages.JavaClientCodegen", + comments = "Generator version: 7.12.0") +public class JWTUserOptions implements Serializable { + private static final long serialVersionUID = 1L; + + public static final String SERIALIZED_NAME_PARAMETERS = "parameters"; + + @SerializedName(SERIALIZED_NAME_PARAMETERS) + @javax.annotation.Nullable + private List parameters; + + public static final String SERIALIZED_NAME_METADATA = "metadata"; + + @SerializedName(SERIALIZED_NAME_METADATA) + @javax.annotation.Nullable + private List metadata; + + public JWTUserOptions() {} + + public JWTUserOptions parameters(@javax.annotation.Nullable List parameters) { + this.parameters = parameters; + return this; + } + + public JWTUserOptions addParametersItem(Object parametersItem) { + if (this.parameters == null) { + this.parameters = new ArrayList<>(); + } + this.parameters.add(parametersItem); + return this; + } + + /** + * Get parameters + * + * @return parameters + */ + @javax.annotation.Nullable + public List getParameters() { + return parameters; + } + + public void setParameters(@javax.annotation.Nullable List parameters) { + this.parameters = parameters; + } + + public JWTUserOptions metadata(@javax.annotation.Nullable List metadata) { + this.metadata = metadata; + return this; + } + + public JWTUserOptions addMetadataItem(JWTMetadataObject metadataItem) { + if (this.metadata == null) { + this.metadata = new ArrayList<>(); + } + this.metadata.add(metadataItem); + return this; + } + + /** + * Get metadata + * + * @return metadata + */ + @javax.annotation.Nullable + public List getMetadata() { + return metadata; + } + + public void setMetadata(@javax.annotation.Nullable List metadata) { + this.metadata = metadata; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key name of the property + * @param value value of the property + * @return the JWTUserOptions instance itself + */ + public JWTUserOptions putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return a map of objects + */ + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key name of the property + * @return an object + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + JWTUserOptions jwTUserOptions = (JWTUserOptions) o; + return Objects.equals(this.parameters, jwTUserOptions.parameters) + && Objects.equals(this.metadata, jwTUserOptions.metadata) + && Objects.equals(this.additionalProperties, jwTUserOptions.additionalProperties); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b + || (a != null + && b != null + && a.isPresent() + && b.isPresent() + && Objects.deepEquals(a.get(), b.get())); + } + + @Override + public int hashCode() { + return Objects.hash(parameters, metadata, additionalProperties); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; + } + return a.isPresent() ? Arrays.deepHashCode(new Object[] {a.get()}) : 31; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class JWTUserOptions {\n"); + sb.append(" parameters: ").append(toIndentedString(parameters)).append("\n"); + sb.append(" metadata: ").append(toIndentedString(metadata)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first + * line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("parameters"); + openapiFields.add("metadata"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to JWTUserOptions + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!JWTUserOptions.openapiRequiredFields + .isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException( + String.format( + "The required field(s) %s in JWTUserOptions is not found in the" + + " empty JSON string", + JWTUserOptions.openapiRequiredFields.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // ensure the optional json data is an array if present + if (jsonObj.get("parameters") != null + && !jsonObj.get("parameters").isJsonNull() + && !jsonObj.get("parameters").isJsonArray()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `parameters` to be an array in the JSON string but" + + " got `%s`", + jsonObj.get("parameters").toString())); + } + if (jsonObj.get("metadata") != null && !jsonObj.get("metadata").isJsonNull()) { + JsonArray jsonArraymetadata = jsonObj.getAsJsonArray("metadata"); + if (jsonArraymetadata != null) { + // ensure the json data is an array + if (!jsonObj.get("metadata").isJsonArray()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `metadata` to be an array in the JSON" + + " string but got `%s`", + jsonObj.get("metadata").toString())); + } + + // validate the optional field `metadata` (array) + for (int i = 0; i < jsonArraymetadata.size(); i++) { + JWTMetadataObject.validateJsonElement(jsonArraymetadata.get(i)); + } + ; + } + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!JWTUserOptions.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'JWTUserOptions' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter = + gson.getDelegateAdapter(this, TypeToken.get(JWTUserOptions.class)); + + return (TypeAdapter) + new TypeAdapter() { + @Override + public void write(JsonWriter out, JWTUserOptions value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + obj.remove("additionalProperties"); + // serialize additional properties + if (value.getAdditionalProperties() != null) { + for (Map.Entry entry : + value.getAdditionalProperties().entrySet()) { + if (entry.getValue() instanceof String) + obj.addProperty(entry.getKey(), (String) entry.getValue()); + else if (entry.getValue() instanceof Number) + obj.addProperty(entry.getKey(), (Number) entry.getValue()); + else if (entry.getValue() instanceof Boolean) + obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); + else if (entry.getValue() instanceof Character) + obj.addProperty( + entry.getKey(), (Character) entry.getValue()); + else { + JsonElement jsonElement = gson.toJsonTree(entry.getValue()); + if (jsonElement.isJsonArray()) { + obj.add(entry.getKey(), jsonElement.getAsJsonArray()); + } else { + obj.add(entry.getKey(), jsonElement.getAsJsonObject()); + } + } + } + } + elementAdapter.write(out, obj); + } + + @Override + public JWTUserOptions read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // store additional fields in the deserialized instance + JWTUserOptions instance = thisAdapter.fromJsonTree(jsonObj); + for (Map.Entry entry : jsonObj.entrySet()) { + if (!openapiFields.contains(entry.getKey())) { + if (entry.getValue().isJsonPrimitive()) { // primitive type + if (entry.getValue().getAsJsonPrimitive().isString()) + instance.putAdditionalProperty( + entry.getKey(), entry.getValue().getAsString()); + else if (entry.getValue().getAsJsonPrimitive().isNumber()) + instance.putAdditionalProperty( + entry.getKey(), entry.getValue().getAsNumber()); + else if (entry.getValue().getAsJsonPrimitive().isBoolean()) + instance.putAdditionalProperty( + entry.getKey(), + entry.getValue().getAsBoolean()); + else + throw new IllegalArgumentException( + String.format( + "The field `%s` has unknown primitive" + + " type. Value: %s", + entry.getKey(), + entry.getValue().toString())); + } else if (entry.getValue().isJsonArray()) { + instance.putAdditionalProperty( + entry.getKey(), + gson.fromJson(entry.getValue(), List.class)); + } else { // JSON object + instance.putAdditionalProperty( + entry.getKey(), + gson.fromJson(entry.getValue(), HashMap.class)); + } + } + } + return instance; + } + }.nullSafe(); + } + } + + /** + * Create an instance of JWTUserOptions given an JSON string + * + * @param jsonString JSON string + * @return An instance of JWTUserOptions + * @throws IOException if the JSON string is invalid with respect to JWTUserOptions + */ + public static JWTUserOptions fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, JWTUserOptions.class); + } + + /** + * Convert an instance of JWTUserOptions to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} diff --git a/sdks/java/src/main/java/com/thoughtspot/client/model/JWTUserOptionsFull.java b/sdks/java/src/main/java/com/thoughtspot/client/model/JWTUserOptionsFull.java new file mode 100644 index 000000000..de05e5180 --- /dev/null +++ b/sdks/java/src/main/java/com/thoughtspot/client/model/JWTUserOptionsFull.java @@ -0,0 +1,334 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client.model; + +import com.google.gson.Gson; +import com.google.gson.JsonArray; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.TypeAdapter; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.annotations.SerializedName; +import com.google.gson.reflect.TypeToken; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import com.thoughtspot.client.JSON; +import java.io.IOException; +import java.io.Serializable; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Objects; +import org.openapitools.jackson.nullable.JsonNullable; + +/** + * JWT user options to create a JWT token given the payload. *Deprecated in 9.12.0.cl. Use + * user_parameters instead.* + */ +@javax.annotation.Generated( + value = "org.openapitools.codegen.languages.JavaClientCodegen", + comments = "Generator version: 7.12.0") +public class JWTUserOptionsFull implements Serializable { + private static final long serialVersionUID = 1L; + + public static final String SERIALIZED_NAME_PARAMETERS = "parameters"; + + @SerializedName(SERIALIZED_NAME_PARAMETERS) + @javax.annotation.Nullable + private List parameters; + + public JWTUserOptionsFull() {} + + public JWTUserOptionsFull parameters(@javax.annotation.Nullable List parameters) { + this.parameters = parameters; + return this; + } + + public JWTUserOptionsFull addParametersItem(JWTParameter parametersItem) { + if (this.parameters == null) { + this.parameters = new ArrayList<>(); + } + this.parameters.add(parametersItem); + return this; + } + + /** + * Get parameters + * + * @return parameters + */ + @javax.annotation.Nullable + public List getParameters() { + return parameters; + } + + public void setParameters(@javax.annotation.Nullable List parameters) { + this.parameters = parameters; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key name of the property + * @param value value of the property + * @return the JWTUserOptionsFull instance itself + */ + public JWTUserOptionsFull putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return a map of objects + */ + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key name of the property + * @return an object + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + JWTUserOptionsFull jwTUserOptionsFull = (JWTUserOptionsFull) o; + return Objects.equals(this.parameters, jwTUserOptionsFull.parameters) + && Objects.equals( + this.additionalProperties, jwTUserOptionsFull.additionalProperties); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b + || (a != null + && b != null + && a.isPresent() + && b.isPresent() + && Objects.deepEquals(a.get(), b.get())); + } + + @Override + public int hashCode() { + return Objects.hash(parameters, additionalProperties); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; + } + return a.isPresent() ? Arrays.deepHashCode(new Object[] {a.get()}) : 31; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class JWTUserOptionsFull {\n"); + sb.append(" parameters: ").append(toIndentedString(parameters)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first + * line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("parameters"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to JWTUserOptionsFull + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!JWTUserOptionsFull.openapiRequiredFields + .isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException( + String.format( + "The required field(s) %s in JWTUserOptionsFull is not found in" + + " the empty JSON string", + JWTUserOptionsFull.openapiRequiredFields.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if (jsonObj.get("parameters") != null && !jsonObj.get("parameters").isJsonNull()) { + JsonArray jsonArrayparameters = jsonObj.getAsJsonArray("parameters"); + if (jsonArrayparameters != null) { + // ensure the json data is an array + if (!jsonObj.get("parameters").isJsonArray()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `parameters` to be an array in the JSON" + + " string but got `%s`", + jsonObj.get("parameters").toString())); + } + + // validate the optional field `parameters` (array) + for (int i = 0; i < jsonArrayparameters.size(); i++) { + JWTParameter.validateJsonElement(jsonArrayparameters.get(i)); + } + ; + } + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!JWTUserOptionsFull.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'JWTUserOptionsFull' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter = + gson.getDelegateAdapter(this, TypeToken.get(JWTUserOptionsFull.class)); + + return (TypeAdapter) + new TypeAdapter() { + @Override + public void write(JsonWriter out, JWTUserOptionsFull value) + throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + obj.remove("additionalProperties"); + // serialize additional properties + if (value.getAdditionalProperties() != null) { + for (Map.Entry entry : + value.getAdditionalProperties().entrySet()) { + if (entry.getValue() instanceof String) + obj.addProperty(entry.getKey(), (String) entry.getValue()); + else if (entry.getValue() instanceof Number) + obj.addProperty(entry.getKey(), (Number) entry.getValue()); + else if (entry.getValue() instanceof Boolean) + obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); + else if (entry.getValue() instanceof Character) + obj.addProperty( + entry.getKey(), (Character) entry.getValue()); + else { + JsonElement jsonElement = gson.toJsonTree(entry.getValue()); + if (jsonElement.isJsonArray()) { + obj.add(entry.getKey(), jsonElement.getAsJsonArray()); + } else { + obj.add(entry.getKey(), jsonElement.getAsJsonObject()); + } + } + } + } + elementAdapter.write(out, obj); + } + + @Override + public JWTUserOptionsFull read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // store additional fields in the deserialized instance + JWTUserOptionsFull instance = thisAdapter.fromJsonTree(jsonObj); + for (Map.Entry entry : jsonObj.entrySet()) { + if (!openapiFields.contains(entry.getKey())) { + if (entry.getValue().isJsonPrimitive()) { // primitive type + if (entry.getValue().getAsJsonPrimitive().isString()) + instance.putAdditionalProperty( + entry.getKey(), entry.getValue().getAsString()); + else if (entry.getValue().getAsJsonPrimitive().isNumber()) + instance.putAdditionalProperty( + entry.getKey(), entry.getValue().getAsNumber()); + else if (entry.getValue().getAsJsonPrimitive().isBoolean()) + instance.putAdditionalProperty( + entry.getKey(), + entry.getValue().getAsBoolean()); + else + throw new IllegalArgumentException( + String.format( + "The field `%s` has unknown primitive" + + " type. Value: %s", + entry.getKey(), + entry.getValue().toString())); + } else if (entry.getValue().isJsonArray()) { + instance.putAdditionalProperty( + entry.getKey(), + gson.fromJson(entry.getValue(), List.class)); + } else { // JSON object + instance.putAdditionalProperty( + entry.getKey(), + gson.fromJson(entry.getValue(), HashMap.class)); + } + } + } + return instance; + } + }.nullSafe(); + } + } + + /** + * Create an instance of JWTUserOptionsFull given an JSON string + * + * @param jsonString JSON string + * @return An instance of JWTUserOptionsFull + * @throws IOException if the JSON string is invalid with respect to JWTUserOptionsFull + */ + public static JWTUserOptionsFull fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, JWTUserOptionsFull.class); + } + + /** + * Convert an instance of JWTUserOptionsFull to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} diff --git a/sdks/java/src/main/java/com/thoughtspot/client/model/JobRecipient.java b/sdks/java/src/main/java/com/thoughtspot/client/model/JobRecipient.java new file mode 100644 index 000000000..a56d3b00d --- /dev/null +++ b/sdks/java/src/main/java/com/thoughtspot/client/model/JobRecipient.java @@ -0,0 +1,480 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client.model; + +import com.google.gson.Gson; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.TypeAdapter; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.reflect.TypeToken; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import com.thoughtspot.client.JSON; +import java.io.IOException; +import java.io.Serializable; +import java.util.Arrays; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Objects; +import org.openapitools.jackson.nullable.JsonNullable; + +/** A recipient (user, group, or external) for a job execution. */ +@javax.annotation.Generated( + value = "org.openapitools.codegen.languages.JavaClientCodegen", + comments = "Generator version: 7.12.0") +public class JobRecipient implements Serializable { + private static final long serialVersionUID = 1L; + + /** Type of the recipient. */ + @JsonAdapter(TypeEnum.Adapter.class) + public enum TypeEnum { + USER("USER"), + + EXTERNAL("EXTERNAL"); + + private String value; + + TypeEnum(String value) { + this.value = value; + } + + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + public static TypeEnum fromValue(String value) { + for (TypeEnum b : TypeEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + + public static class Adapter extends TypeAdapter { + @Override + public void write(final JsonWriter jsonWriter, final TypeEnum enumeration) + throws IOException { + jsonWriter.value(enumeration.getValue()); + } + + @Override + public TypeEnum read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + return TypeEnum.fromValue(value); + } + } + + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + String value = jsonElement.getAsString(); + TypeEnum.fromValue(value); + } + } + + public static final String SERIALIZED_NAME_TYPE = "type"; + + @SerializedName(SERIALIZED_NAME_TYPE) + @javax.annotation.Nonnull + private TypeEnum type; + + public static final String SERIALIZED_NAME_ID = "id"; + + @SerializedName(SERIALIZED_NAME_ID) + @javax.annotation.Nullable + private String id; + + public static final String SERIALIZED_NAME_NAME = "name"; + + @SerializedName(SERIALIZED_NAME_NAME) + @javax.annotation.Nullable + private String name; + + public static final String SERIALIZED_NAME_EMAIL = "email"; + + @SerializedName(SERIALIZED_NAME_EMAIL) + @javax.annotation.Nullable + private String email; + + public JobRecipient() {} + + public JobRecipient type(@javax.annotation.Nonnull TypeEnum type) { + this.type = type; + return this; + } + + /** + * Type of the recipient. + * + * @return type + */ + @javax.annotation.Nonnull + public TypeEnum getType() { + return type; + } + + public void setType(@javax.annotation.Nonnull TypeEnum type) { + this.type = type; + } + + public JobRecipient id(@javax.annotation.Nullable String id) { + this.id = id; + return this; + } + + /** + * Unique ID of the recipient. + * + * @return id + */ + @javax.annotation.Nullable + public String getId() { + return id; + } + + public void setId(@javax.annotation.Nullable String id) { + this.id = id; + } + + public JobRecipient name(@javax.annotation.Nullable String name) { + this.name = name; + return this; + } + + /** + * Name of the recipient. + * + * @return name + */ + @javax.annotation.Nullable + public String getName() { + return name; + } + + public void setName(@javax.annotation.Nullable String name) { + this.name = name; + } + + public JobRecipient email(@javax.annotation.Nullable String email) { + this.email = email; + return this; + } + + /** + * Email of the recipient. + * + * @return email + */ + @javax.annotation.Nullable + public String getEmail() { + return email; + } + + public void setEmail(@javax.annotation.Nullable String email) { + this.email = email; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key name of the property + * @param value value of the property + * @return the JobRecipient instance itself + */ + public JobRecipient putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return a map of objects + */ + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key name of the property + * @return an object + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + JobRecipient jobRecipient = (JobRecipient) o; + return Objects.equals(this.type, jobRecipient.type) + && Objects.equals(this.id, jobRecipient.id) + && Objects.equals(this.name, jobRecipient.name) + && Objects.equals(this.email, jobRecipient.email) + && Objects.equals(this.additionalProperties, jobRecipient.additionalProperties); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b + || (a != null + && b != null + && a.isPresent() + && b.isPresent() + && Objects.deepEquals(a.get(), b.get())); + } + + @Override + public int hashCode() { + return Objects.hash(type, id, name, email, additionalProperties); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; + } + return a.isPresent() ? Arrays.deepHashCode(new Object[] {a.get()}) : 31; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class JobRecipient {\n"); + sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append(" email: ").append(toIndentedString(email)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first + * line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("type"); + openapiFields.add("id"); + openapiFields.add("name"); + openapiFields.add("email"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + openapiRequiredFields.add("type"); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to JobRecipient + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!JobRecipient.openapiRequiredFields + .isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException( + String.format( + "The required field(s) %s in JobRecipient is not found in the" + + " empty JSON string", + JobRecipient.openapiRequiredFields.toString())); + } + } + + // check to make sure all required properties/fields are present in the JSON string + for (String requiredField : JobRecipient.openapiRequiredFields) { + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException( + String.format( + "The required field `%s` is not found in the JSON string: %s", + requiredField, jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if (!jsonObj.get("type").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `type` to be a primitive type in the JSON string" + + " but got `%s`", + jsonObj.get("type").toString())); + } + // validate the required field `type` + TypeEnum.validateJsonElement(jsonObj.get("type")); + if ((jsonObj.get("id") != null && !jsonObj.get("id").isJsonNull()) + && !jsonObj.get("id").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `id` to be a primitive type in the JSON string but" + + " got `%s`", + jsonObj.get("id").toString())); + } + if ((jsonObj.get("name") != null && !jsonObj.get("name").isJsonNull()) + && !jsonObj.get("name").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `name` to be a primitive type in the JSON string" + + " but got `%s`", + jsonObj.get("name").toString())); + } + if ((jsonObj.get("email") != null && !jsonObj.get("email").isJsonNull()) + && !jsonObj.get("email").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `email` to be a primitive type in the JSON string" + + " but got `%s`", + jsonObj.get("email").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!JobRecipient.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'JobRecipient' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter = + gson.getDelegateAdapter(this, TypeToken.get(JobRecipient.class)); + + return (TypeAdapter) + new TypeAdapter() { + @Override + public void write(JsonWriter out, JobRecipient value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + obj.remove("additionalProperties"); + // serialize additional properties + if (value.getAdditionalProperties() != null) { + for (Map.Entry entry : + value.getAdditionalProperties().entrySet()) { + if (entry.getValue() instanceof String) + obj.addProperty(entry.getKey(), (String) entry.getValue()); + else if (entry.getValue() instanceof Number) + obj.addProperty(entry.getKey(), (Number) entry.getValue()); + else if (entry.getValue() instanceof Boolean) + obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); + else if (entry.getValue() instanceof Character) + obj.addProperty( + entry.getKey(), (Character) entry.getValue()); + else { + JsonElement jsonElement = gson.toJsonTree(entry.getValue()); + if (jsonElement.isJsonArray()) { + obj.add(entry.getKey(), jsonElement.getAsJsonArray()); + } else { + obj.add(entry.getKey(), jsonElement.getAsJsonObject()); + } + } + } + } + elementAdapter.write(out, obj); + } + + @Override + public JobRecipient read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // store additional fields in the deserialized instance + JobRecipient instance = thisAdapter.fromJsonTree(jsonObj); + for (Map.Entry entry : jsonObj.entrySet()) { + if (!openapiFields.contains(entry.getKey())) { + if (entry.getValue().isJsonPrimitive()) { // primitive type + if (entry.getValue().getAsJsonPrimitive().isString()) + instance.putAdditionalProperty( + entry.getKey(), entry.getValue().getAsString()); + else if (entry.getValue().getAsJsonPrimitive().isNumber()) + instance.putAdditionalProperty( + entry.getKey(), entry.getValue().getAsNumber()); + else if (entry.getValue().getAsJsonPrimitive().isBoolean()) + instance.putAdditionalProperty( + entry.getKey(), + entry.getValue().getAsBoolean()); + else + throw new IllegalArgumentException( + String.format( + "The field `%s` has unknown primitive" + + " type. Value: %s", + entry.getKey(), + entry.getValue().toString())); + } else if (entry.getValue().isJsonArray()) { + instance.putAdditionalProperty( + entry.getKey(), + gson.fromJson(entry.getValue(), List.class)); + } else { // JSON object + instance.putAdditionalProperty( + entry.getKey(), + gson.fromJson(entry.getValue(), HashMap.class)); + } + } + } + return instance; + } + }.nullSafe(); + } + } + + /** + * Create an instance of JobRecipient given an JSON string + * + * @param jsonString JSON string + * @return An instance of JobRecipient + * @throws IOException if the JSON string is invalid with respect to JobRecipient + */ + public static JobRecipient fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, JobRecipient.class); + } + + /** + * Convert an instance of JobRecipient to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} diff --git a/sdks/java/src/main/java/com/thoughtspot/client/model/LiveboardContent.java b/sdks/java/src/main/java/com/thoughtspot/client/model/LiveboardContent.java new file mode 100644 index 000000000..1d419c13d --- /dev/null +++ b/sdks/java/src/main/java/com/thoughtspot/client/model/LiveboardContent.java @@ -0,0 +1,622 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client.model; + +import com.google.gson.Gson; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.TypeAdapter; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.annotations.SerializedName; +import com.google.gson.reflect.TypeToken; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import com.thoughtspot.client.JSON; +import java.io.IOException; +import java.io.Serializable; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Objects; +import org.openapitools.jackson.nullable.JsonNullable; + +/** LiveboardContent */ +@javax.annotation.Generated( + value = "org.openapitools.codegen.languages.JavaClientCodegen", + comments = "Generator version: 7.12.0") +public class LiveboardContent implements Serializable { + private static final long serialVersionUID = 1L; + + public static final String SERIALIZED_NAME_AVAILABLE_DATA_ROW_COUNT = + "available_data_row_count"; + + @SerializedName(SERIALIZED_NAME_AVAILABLE_DATA_ROW_COUNT) + @javax.annotation.Nonnull + private Integer availableDataRowCount; + + public static final String SERIALIZED_NAME_COLUMN_NAMES = "column_names"; + + @SerializedName(SERIALIZED_NAME_COLUMN_NAMES) + @javax.annotation.Nonnull + private List columnNames; + + public static final String SERIALIZED_NAME_DATA_ROWS = "data_rows"; + + @SerializedName(SERIALIZED_NAME_DATA_ROWS) + @javax.annotation.Nonnull + private List dataRows; + + public static final String SERIALIZED_NAME_RECORD_OFFSET = "record_offset"; + + @SerializedName(SERIALIZED_NAME_RECORD_OFFSET) + @javax.annotation.Nonnull + private Integer recordOffset; + + public static final String SERIALIZED_NAME_RECORD_SIZE = "record_size"; + + @SerializedName(SERIALIZED_NAME_RECORD_SIZE) + @javax.annotation.Nonnull + private Integer recordSize; + + public static final String SERIALIZED_NAME_RETURNED_DATA_ROW_COUNT = "returned_data_row_count"; + + @SerializedName(SERIALIZED_NAME_RETURNED_DATA_ROW_COUNT) + @javax.annotation.Nonnull + private Integer returnedDataRowCount; + + public static final String SERIALIZED_NAME_SAMPLING_RATIO = "sampling_ratio"; + + @SerializedName(SERIALIZED_NAME_SAMPLING_RATIO) + @javax.annotation.Nonnull + private Float samplingRatio; + + public static final String SERIALIZED_NAME_VISUALIZATION_ID = "visualization_id"; + + @SerializedName(SERIALIZED_NAME_VISUALIZATION_ID) + @javax.annotation.Nullable + private String visualizationId; + + public static final String SERIALIZED_NAME_VISUALIZATION_NAME = "visualization_name"; + + @SerializedName(SERIALIZED_NAME_VISUALIZATION_NAME) + @javax.annotation.Nullable + private String visualizationName; + + public LiveboardContent() {} + + public LiveboardContent availableDataRowCount( + @javax.annotation.Nonnull Integer availableDataRowCount) { + this.availableDataRowCount = availableDataRowCount; + return this; + } + + /** + * Total available data row count. + * + * @return availableDataRowCount + */ + @javax.annotation.Nonnull + public Integer getAvailableDataRowCount() { + return availableDataRowCount; + } + + public void setAvailableDataRowCount(@javax.annotation.Nonnull Integer availableDataRowCount) { + this.availableDataRowCount = availableDataRowCount; + } + + public LiveboardContent columnNames(@javax.annotation.Nonnull List columnNames) { + this.columnNames = columnNames; + return this; + } + + public LiveboardContent addColumnNamesItem(String columnNamesItem) { + if (this.columnNames == null) { + this.columnNames = new ArrayList<>(); + } + this.columnNames.add(columnNamesItem); + return this; + } + + /** + * Name of the columns. + * + * @return columnNames + */ + @javax.annotation.Nonnull + public List getColumnNames() { + return columnNames; + } + + public void setColumnNames(@javax.annotation.Nonnull List columnNames) { + this.columnNames = columnNames; + } + + public LiveboardContent dataRows(@javax.annotation.Nonnull List dataRows) { + this.dataRows = dataRows; + return this; + } + + public LiveboardContent addDataRowsItem(Object dataRowsItem) { + if (this.dataRows == null) { + this.dataRows = new ArrayList<>(); + } + this.dataRows.add(dataRowsItem); + return this; + } + + /** + * Rows of data set. + * + * @return dataRows + */ + @javax.annotation.Nonnull + public List getDataRows() { + return dataRows; + } + + public void setDataRows(@javax.annotation.Nonnull List dataRows) { + this.dataRows = dataRows; + } + + public LiveboardContent recordOffset(@javax.annotation.Nonnull Integer recordOffset) { + this.recordOffset = recordOffset; + return this; + } + + /** + * The starting record number from where the records should be included. + * + * @return recordOffset + */ + @javax.annotation.Nonnull + public Integer getRecordOffset() { + return recordOffset; + } + + public void setRecordOffset(@javax.annotation.Nonnull Integer recordOffset) { + this.recordOffset = recordOffset; + } + + public LiveboardContent recordSize(@javax.annotation.Nonnull Integer recordSize) { + this.recordSize = recordSize; + return this; + } + + /** + * The number of records that should be included. + * + * @return recordSize + */ + @javax.annotation.Nonnull + public Integer getRecordSize() { + return recordSize; + } + + public void setRecordSize(@javax.annotation.Nonnull Integer recordSize) { + this.recordSize = recordSize; + } + + public LiveboardContent returnedDataRowCount( + @javax.annotation.Nonnull Integer returnedDataRowCount) { + this.returnedDataRowCount = returnedDataRowCount; + return this; + } + + /** + * Total returned data row count. + * + * @return returnedDataRowCount + */ + @javax.annotation.Nonnull + public Integer getReturnedDataRowCount() { + return returnedDataRowCount; + } + + public void setReturnedDataRowCount(@javax.annotation.Nonnull Integer returnedDataRowCount) { + this.returnedDataRowCount = returnedDataRowCount; + } + + public LiveboardContent samplingRatio(@javax.annotation.Nonnull Float samplingRatio) { + this.samplingRatio = samplingRatio; + return this; + } + + /** + * Sampling ratio (0 to 1). If the query was sampled, it is the ratio of keys returned in the + * data set to the total number of keys expected in the query. If the value is 1.0, this means + * that the complete result is returned. + * + * @return samplingRatio + */ + @javax.annotation.Nonnull + public Float getSamplingRatio() { + return samplingRatio; + } + + public void setSamplingRatio(@javax.annotation.Nonnull Float samplingRatio) { + this.samplingRatio = samplingRatio; + } + + public LiveboardContent visualizationId(@javax.annotation.Nullable String visualizationId) { + this.visualizationId = visualizationId; + return this; + } + + /** + * Unique ID of the visualization. + * + * @return visualizationId + */ + @javax.annotation.Nullable + public String getVisualizationId() { + return visualizationId; + } + + public void setVisualizationId(@javax.annotation.Nullable String visualizationId) { + this.visualizationId = visualizationId; + } + + public LiveboardContent visualizationName(@javax.annotation.Nullable String visualizationName) { + this.visualizationName = visualizationName; + return this; + } + + /** + * Name of the visualization. + * + * @return visualizationName + */ + @javax.annotation.Nullable + public String getVisualizationName() { + return visualizationName; + } + + public void setVisualizationName(@javax.annotation.Nullable String visualizationName) { + this.visualizationName = visualizationName; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key name of the property + * @param value value of the property + * @return the LiveboardContent instance itself + */ + public LiveboardContent putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return a map of objects + */ + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key name of the property + * @return an object + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + LiveboardContent liveboardContent = (LiveboardContent) o; + return Objects.equals(this.availableDataRowCount, liveboardContent.availableDataRowCount) + && Objects.equals(this.columnNames, liveboardContent.columnNames) + && Objects.equals(this.dataRows, liveboardContent.dataRows) + && Objects.equals(this.recordOffset, liveboardContent.recordOffset) + && Objects.equals(this.recordSize, liveboardContent.recordSize) + && Objects.equals(this.returnedDataRowCount, liveboardContent.returnedDataRowCount) + && Objects.equals(this.samplingRatio, liveboardContent.samplingRatio) + && Objects.equals(this.visualizationId, liveboardContent.visualizationId) + && Objects.equals(this.visualizationName, liveboardContent.visualizationName) + && Objects.equals(this.additionalProperties, liveboardContent.additionalProperties); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b + || (a != null + && b != null + && a.isPresent() + && b.isPresent() + && Objects.deepEquals(a.get(), b.get())); + } + + @Override + public int hashCode() { + return Objects.hash( + availableDataRowCount, + columnNames, + dataRows, + recordOffset, + recordSize, + returnedDataRowCount, + samplingRatio, + visualizationId, + visualizationName, + additionalProperties); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; + } + return a.isPresent() ? Arrays.deepHashCode(new Object[] {a.get()}) : 31; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class LiveboardContent {\n"); + sb.append(" availableDataRowCount: ") + .append(toIndentedString(availableDataRowCount)) + .append("\n"); + sb.append(" columnNames: ").append(toIndentedString(columnNames)).append("\n"); + sb.append(" dataRows: ").append(toIndentedString(dataRows)).append("\n"); + sb.append(" recordOffset: ").append(toIndentedString(recordOffset)).append("\n"); + sb.append(" recordSize: ").append(toIndentedString(recordSize)).append("\n"); + sb.append(" returnedDataRowCount: ") + .append(toIndentedString(returnedDataRowCount)) + .append("\n"); + sb.append(" samplingRatio: ").append(toIndentedString(samplingRatio)).append("\n"); + sb.append(" visualizationId: ").append(toIndentedString(visualizationId)).append("\n"); + sb.append(" visualizationName: ") + .append(toIndentedString(visualizationName)) + .append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first + * line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("available_data_row_count"); + openapiFields.add("column_names"); + openapiFields.add("data_rows"); + openapiFields.add("record_offset"); + openapiFields.add("record_size"); + openapiFields.add("returned_data_row_count"); + openapiFields.add("sampling_ratio"); + openapiFields.add("visualization_id"); + openapiFields.add("visualization_name"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + openapiRequiredFields.add("available_data_row_count"); + openapiRequiredFields.add("column_names"); + openapiRequiredFields.add("data_rows"); + openapiRequiredFields.add("record_offset"); + openapiRequiredFields.add("record_size"); + openapiRequiredFields.add("returned_data_row_count"); + openapiRequiredFields.add("sampling_ratio"); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to LiveboardContent + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!LiveboardContent.openapiRequiredFields + .isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException( + String.format( + "The required field(s) %s in LiveboardContent is not found in the" + + " empty JSON string", + LiveboardContent.openapiRequiredFields.toString())); + } + } + + // check to make sure all required properties/fields are present in the JSON string + for (String requiredField : LiveboardContent.openapiRequiredFields) { + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException( + String.format( + "The required field `%s` is not found in the JSON string: %s", + requiredField, jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // ensure the required json array is present + if (jsonObj.get("column_names") == null) { + throw new IllegalArgumentException( + "Expected the field `linkedContent` to be an array in the JSON string but got" + + " `null`"); + } else if (!jsonObj.get("column_names").isJsonArray()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `column_names` to be an array in the JSON string" + + " but got `%s`", + jsonObj.get("column_names").toString())); + } + // ensure the required json array is present + if (jsonObj.get("data_rows") == null) { + throw new IllegalArgumentException( + "Expected the field `linkedContent` to be an array in the JSON string but got" + + " `null`"); + } else if (!jsonObj.get("data_rows").isJsonArray()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `data_rows` to be an array in the JSON string but" + + " got `%s`", + jsonObj.get("data_rows").toString())); + } + if ((jsonObj.get("visualization_id") != null + && !jsonObj.get("visualization_id").isJsonNull()) + && !jsonObj.get("visualization_id").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `visualization_id` to be a primitive type in the" + + " JSON string but got `%s`", + jsonObj.get("visualization_id").toString())); + } + if ((jsonObj.get("visualization_name") != null + && !jsonObj.get("visualization_name").isJsonNull()) + && !jsonObj.get("visualization_name").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `visualization_name` to be a primitive type in the" + + " JSON string but got `%s`", + jsonObj.get("visualization_name").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!LiveboardContent.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'LiveboardContent' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter = + gson.getDelegateAdapter(this, TypeToken.get(LiveboardContent.class)); + + return (TypeAdapter) + new TypeAdapter() { + @Override + public void write(JsonWriter out, LiveboardContent value) + throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + obj.remove("additionalProperties"); + // serialize additional properties + if (value.getAdditionalProperties() != null) { + for (Map.Entry entry : + value.getAdditionalProperties().entrySet()) { + if (entry.getValue() instanceof String) + obj.addProperty(entry.getKey(), (String) entry.getValue()); + else if (entry.getValue() instanceof Number) + obj.addProperty(entry.getKey(), (Number) entry.getValue()); + else if (entry.getValue() instanceof Boolean) + obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); + else if (entry.getValue() instanceof Character) + obj.addProperty( + entry.getKey(), (Character) entry.getValue()); + else { + JsonElement jsonElement = gson.toJsonTree(entry.getValue()); + if (jsonElement.isJsonArray()) { + obj.add(entry.getKey(), jsonElement.getAsJsonArray()); + } else { + obj.add(entry.getKey(), jsonElement.getAsJsonObject()); + } + } + } + } + elementAdapter.write(out, obj); + } + + @Override + public LiveboardContent read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // store additional fields in the deserialized instance + LiveboardContent instance = thisAdapter.fromJsonTree(jsonObj); + for (Map.Entry entry : jsonObj.entrySet()) { + if (!openapiFields.contains(entry.getKey())) { + if (entry.getValue().isJsonPrimitive()) { // primitive type + if (entry.getValue().getAsJsonPrimitive().isString()) + instance.putAdditionalProperty( + entry.getKey(), entry.getValue().getAsString()); + else if (entry.getValue().getAsJsonPrimitive().isNumber()) + instance.putAdditionalProperty( + entry.getKey(), entry.getValue().getAsNumber()); + else if (entry.getValue().getAsJsonPrimitive().isBoolean()) + instance.putAdditionalProperty( + entry.getKey(), + entry.getValue().getAsBoolean()); + else + throw new IllegalArgumentException( + String.format( + "The field `%s` has unknown primitive" + + " type. Value: %s", + entry.getKey(), + entry.getValue().toString())); + } else if (entry.getValue().isJsonArray()) { + instance.putAdditionalProperty( + entry.getKey(), + gson.fromJson(entry.getValue(), List.class)); + } else { // JSON object + instance.putAdditionalProperty( + entry.getKey(), + gson.fromJson(entry.getValue(), HashMap.class)); + } + } + } + return instance; + } + }.nullSafe(); + } + } + + /** + * Create an instance of LiveboardContent given an JSON string + * + * @param jsonString JSON string + * @return An instance of LiveboardContent + * @throws IOException if the JSON string is invalid with respect to LiveboardContent + */ + public static LiveboardContent fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, LiveboardContent.class); + } + + /** + * Convert an instance of LiveboardContent to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} diff --git a/sdks/java/src/main/java/com/thoughtspot/client/model/LiveboardDataResponse.java b/sdks/java/src/main/java/com/thoughtspot/client/model/LiveboardDataResponse.java new file mode 100644 index 000000000..7d791e41b --- /dev/null +++ b/sdks/java/src/main/java/com/thoughtspot/client/model/LiveboardDataResponse.java @@ -0,0 +1,393 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client.model; + +import com.google.gson.Gson; +import com.google.gson.JsonArray; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.TypeAdapter; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.annotations.SerializedName; +import com.google.gson.reflect.TypeToken; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import com.thoughtspot.client.JSON; +import java.io.IOException; +import java.io.Serializable; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Objects; + +/** LiveboardDataResponse */ +@javax.annotation.Generated( + value = "org.openapitools.codegen.languages.JavaClientCodegen", + comments = "Generator version: 7.12.0") +public class LiveboardDataResponse implements Serializable { + private static final long serialVersionUID = 1L; + + public static final String SERIALIZED_NAME_METADATA_ID = "metadata_id"; + + @SerializedName(SERIALIZED_NAME_METADATA_ID) + @javax.annotation.Nonnull + private String metadataId; + + public static final String SERIALIZED_NAME_METADATA_NAME = "metadata_name"; + + @SerializedName(SERIALIZED_NAME_METADATA_NAME) + @javax.annotation.Nonnull + private String metadataName; + + public static final String SERIALIZED_NAME_CONTENTS = "contents"; + + @SerializedName(SERIALIZED_NAME_CONTENTS) + @javax.annotation.Nonnull + private List contents; + + public LiveboardDataResponse() {} + + public LiveboardDataResponse metadataId(@javax.annotation.Nonnull String metadataId) { + this.metadataId = metadataId; + return this; + } + + /** + * The unique identifier of the object + * + * @return metadataId + */ + @javax.annotation.Nonnull + public String getMetadataId() { + return metadataId; + } + + public void setMetadataId(@javax.annotation.Nonnull String metadataId) { + this.metadataId = metadataId; + } + + public LiveboardDataResponse metadataName(@javax.annotation.Nonnull String metadataName) { + this.metadataName = metadataName; + return this; + } + + /** + * Name of the metadata object + * + * @return metadataName + */ + @javax.annotation.Nonnull + public String getMetadataName() { + return metadataName; + } + + public void setMetadataName(@javax.annotation.Nonnull String metadataName) { + this.metadataName = metadataName; + } + + public LiveboardDataResponse contents( + @javax.annotation.Nonnull List contents) { + this.contents = contents; + return this; + } + + public LiveboardDataResponse addContentsItem(LiveboardContent contentsItem) { + if (this.contents == null) { + this.contents = new ArrayList<>(); + } + this.contents.add(contentsItem); + return this; + } + + /** + * Data content of metadata objects + * + * @return contents + */ + @javax.annotation.Nonnull + public List getContents() { + return contents; + } + + public void setContents(@javax.annotation.Nonnull List contents) { + this.contents = contents; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key name of the property + * @param value value of the property + * @return the LiveboardDataResponse instance itself + */ + public LiveboardDataResponse putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return a map of objects + */ + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key name of the property + * @return an object + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + LiveboardDataResponse liveboardDataResponse = (LiveboardDataResponse) o; + return Objects.equals(this.metadataId, liveboardDataResponse.metadataId) + && Objects.equals(this.metadataName, liveboardDataResponse.metadataName) + && Objects.equals(this.contents, liveboardDataResponse.contents) + && Objects.equals( + this.additionalProperties, liveboardDataResponse.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(metadataId, metadataName, contents, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class LiveboardDataResponse {\n"); + sb.append(" metadataId: ").append(toIndentedString(metadataId)).append("\n"); + sb.append(" metadataName: ").append(toIndentedString(metadataName)).append("\n"); + sb.append(" contents: ").append(toIndentedString(contents)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first + * line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("metadata_id"); + openapiFields.add("metadata_name"); + openapiFields.add("contents"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + openapiRequiredFields.add("metadata_id"); + openapiRequiredFields.add("metadata_name"); + openapiRequiredFields.add("contents"); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to LiveboardDataResponse + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!LiveboardDataResponse.openapiRequiredFields + .isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException( + String.format( + "The required field(s) %s in LiveboardDataResponse is not found in" + + " the empty JSON string", + LiveboardDataResponse.openapiRequiredFields.toString())); + } + } + + // check to make sure all required properties/fields are present in the JSON string + for (String requiredField : LiveboardDataResponse.openapiRequiredFields) { + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException( + String.format( + "The required field `%s` is not found in the JSON string: %s", + requiredField, jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if (!jsonObj.get("metadata_id").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `metadata_id` to be a primitive type in the JSON" + + " string but got `%s`", + jsonObj.get("metadata_id").toString())); + } + if (!jsonObj.get("metadata_name").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `metadata_name` to be a primitive type in the JSON" + + " string but got `%s`", + jsonObj.get("metadata_name").toString())); + } + // ensure the json data is an array + if (!jsonObj.get("contents").isJsonArray()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `contents` to be an array in the JSON string but" + + " got `%s`", + jsonObj.get("contents").toString())); + } + + JsonArray jsonArraycontents = jsonObj.getAsJsonArray("contents"); + // validate the required field `contents` (array) + for (int i = 0; i < jsonArraycontents.size(); i++) { + LiveboardContent.validateJsonElement(jsonArraycontents.get(i)); + } + ; + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!LiveboardDataResponse.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'LiveboardDataResponse' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter = + gson.getDelegateAdapter(this, TypeToken.get(LiveboardDataResponse.class)); + + return (TypeAdapter) + new TypeAdapter() { + @Override + public void write(JsonWriter out, LiveboardDataResponse value) + throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + obj.remove("additionalProperties"); + // serialize additional properties + if (value.getAdditionalProperties() != null) { + for (Map.Entry entry : + value.getAdditionalProperties().entrySet()) { + if (entry.getValue() instanceof String) + obj.addProperty(entry.getKey(), (String) entry.getValue()); + else if (entry.getValue() instanceof Number) + obj.addProperty(entry.getKey(), (Number) entry.getValue()); + else if (entry.getValue() instanceof Boolean) + obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); + else if (entry.getValue() instanceof Character) + obj.addProperty( + entry.getKey(), (Character) entry.getValue()); + else { + JsonElement jsonElement = gson.toJsonTree(entry.getValue()); + if (jsonElement.isJsonArray()) { + obj.add(entry.getKey(), jsonElement.getAsJsonArray()); + } else { + obj.add(entry.getKey(), jsonElement.getAsJsonObject()); + } + } + } + } + elementAdapter.write(out, obj); + } + + @Override + public LiveboardDataResponse read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // store additional fields in the deserialized instance + LiveboardDataResponse instance = thisAdapter.fromJsonTree(jsonObj); + for (Map.Entry entry : jsonObj.entrySet()) { + if (!openapiFields.contains(entry.getKey())) { + if (entry.getValue().isJsonPrimitive()) { // primitive type + if (entry.getValue().getAsJsonPrimitive().isString()) + instance.putAdditionalProperty( + entry.getKey(), entry.getValue().getAsString()); + else if (entry.getValue().getAsJsonPrimitive().isNumber()) + instance.putAdditionalProperty( + entry.getKey(), entry.getValue().getAsNumber()); + else if (entry.getValue().getAsJsonPrimitive().isBoolean()) + instance.putAdditionalProperty( + entry.getKey(), + entry.getValue().getAsBoolean()); + else + throw new IllegalArgumentException( + String.format( + "The field `%s` has unknown primitive" + + " type. Value: %s", + entry.getKey(), + entry.getValue().toString())); + } else if (entry.getValue().isJsonArray()) { + instance.putAdditionalProperty( + entry.getKey(), + gson.fromJson(entry.getValue(), List.class)); + } else { // JSON object + instance.putAdditionalProperty( + entry.getKey(), + gson.fromJson(entry.getValue(), HashMap.class)); + } + } + } + return instance; + } + }.nullSafe(); + } + } + + /** + * Create an instance of LiveboardDataResponse given an JSON string + * + * @param jsonString JSON string + * @return An instance of LiveboardDataResponse + * @throws IOException if the JSON string is invalid with respect to LiveboardDataResponse + */ + public static LiveboardDataResponse fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, LiveboardDataResponse.class); + } + + /** + * Convert an instance of LiveboardDataResponse to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} diff --git a/sdks/java/src/main/java/com/thoughtspot/client/model/LiveboardOptions.java b/sdks/java/src/main/java/com/thoughtspot/client/model/LiveboardOptions.java new file mode 100644 index 000000000..3e4e3937a --- /dev/null +++ b/sdks/java/src/main/java/com/thoughtspot/client/model/LiveboardOptions.java @@ -0,0 +1,321 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client.model; + +import com.google.gson.Gson; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.TypeAdapter; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.annotations.SerializedName; +import com.google.gson.reflect.TypeToken; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import com.thoughtspot.client.JSON; +import java.io.IOException; +import java.io.Serializable; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Objects; + +/** Options to specify details of Liveboard. */ +@javax.annotation.Generated( + value = "org.openapitools.codegen.languages.JavaClientCodegen", + comments = "Generator version: 7.12.0") +public class LiveboardOptions implements Serializable { + private static final long serialVersionUID = 1L; + + public static final String SERIALIZED_NAME_VISUALIZATION_IDENTIFIERS = + "visualization_identifiers"; + + @SerializedName(SERIALIZED_NAME_VISUALIZATION_IDENTIFIERS) + @javax.annotation.Nonnull + private List visualizationIdentifiers; + + public LiveboardOptions() {} + + public LiveboardOptions visualizationIdentifiers( + @javax.annotation.Nonnull List visualizationIdentifiers) { + this.visualizationIdentifiers = visualizationIdentifiers; + return this; + } + + public LiveboardOptions addVisualizationIdentifiersItem(String visualizationIdentifiersItem) { + if (this.visualizationIdentifiers == null) { + this.visualizationIdentifiers = new ArrayList<>(); + } + this.visualizationIdentifiers.add(visualizationIdentifiersItem); + return this; + } + + /** + * Unique ID or name of visualizations. + * + * @return visualizationIdentifiers + */ + @javax.annotation.Nonnull + public List getVisualizationIdentifiers() { + return visualizationIdentifiers; + } + + public void setVisualizationIdentifiers( + @javax.annotation.Nonnull List visualizationIdentifiers) { + this.visualizationIdentifiers = visualizationIdentifiers; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key name of the property + * @param value value of the property + * @return the LiveboardOptions instance itself + */ + public LiveboardOptions putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return a map of objects + */ + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key name of the property + * @return an object + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + LiveboardOptions liveboardOptions = (LiveboardOptions) o; + return Objects.equals( + this.visualizationIdentifiers, liveboardOptions.visualizationIdentifiers) + && Objects.equals(this.additionalProperties, liveboardOptions.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(visualizationIdentifiers, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class LiveboardOptions {\n"); + sb.append(" visualizationIdentifiers: ") + .append(toIndentedString(visualizationIdentifiers)) + .append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first + * line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("visualization_identifiers"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + openapiRequiredFields.add("visualization_identifiers"); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to LiveboardOptions + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!LiveboardOptions.openapiRequiredFields + .isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException( + String.format( + "The required field(s) %s in LiveboardOptions is not found in the" + + " empty JSON string", + LiveboardOptions.openapiRequiredFields.toString())); + } + } + + // check to make sure all required properties/fields are present in the JSON string + for (String requiredField : LiveboardOptions.openapiRequiredFields) { + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException( + String.format( + "The required field `%s` is not found in the JSON string: %s", + requiredField, jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // ensure the required json array is present + if (jsonObj.get("visualization_identifiers") == null) { + throw new IllegalArgumentException( + "Expected the field `linkedContent` to be an array in the JSON string but got" + + " `null`"); + } else if (!jsonObj.get("visualization_identifiers").isJsonArray()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `visualization_identifiers` to be an array in the" + + " JSON string but got `%s`", + jsonObj.get("visualization_identifiers").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!LiveboardOptions.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'LiveboardOptions' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter = + gson.getDelegateAdapter(this, TypeToken.get(LiveboardOptions.class)); + + return (TypeAdapter) + new TypeAdapter() { + @Override + public void write(JsonWriter out, LiveboardOptions value) + throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + obj.remove("additionalProperties"); + // serialize additional properties + if (value.getAdditionalProperties() != null) { + for (Map.Entry entry : + value.getAdditionalProperties().entrySet()) { + if (entry.getValue() instanceof String) + obj.addProperty(entry.getKey(), (String) entry.getValue()); + else if (entry.getValue() instanceof Number) + obj.addProperty(entry.getKey(), (Number) entry.getValue()); + else if (entry.getValue() instanceof Boolean) + obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); + else if (entry.getValue() instanceof Character) + obj.addProperty( + entry.getKey(), (Character) entry.getValue()); + else { + JsonElement jsonElement = gson.toJsonTree(entry.getValue()); + if (jsonElement.isJsonArray()) { + obj.add(entry.getKey(), jsonElement.getAsJsonArray()); + } else { + obj.add(entry.getKey(), jsonElement.getAsJsonObject()); + } + } + } + } + elementAdapter.write(out, obj); + } + + @Override + public LiveboardOptions read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // store additional fields in the deserialized instance + LiveboardOptions instance = thisAdapter.fromJsonTree(jsonObj); + for (Map.Entry entry : jsonObj.entrySet()) { + if (!openapiFields.contains(entry.getKey())) { + if (entry.getValue().isJsonPrimitive()) { // primitive type + if (entry.getValue().getAsJsonPrimitive().isString()) + instance.putAdditionalProperty( + entry.getKey(), entry.getValue().getAsString()); + else if (entry.getValue().getAsJsonPrimitive().isNumber()) + instance.putAdditionalProperty( + entry.getKey(), entry.getValue().getAsNumber()); + else if (entry.getValue().getAsJsonPrimitive().isBoolean()) + instance.putAdditionalProperty( + entry.getKey(), + entry.getValue().getAsBoolean()); + else + throw new IllegalArgumentException( + String.format( + "The field `%s` has unknown primitive" + + " type. Value: %s", + entry.getKey(), + entry.getValue().toString())); + } else if (entry.getValue().isJsonArray()) { + instance.putAdditionalProperty( + entry.getKey(), + gson.fromJson(entry.getValue(), List.class)); + } else { // JSON object + instance.putAdditionalProperty( + entry.getKey(), + gson.fromJson(entry.getValue(), HashMap.class)); + } + } + } + return instance; + } + }.nullSafe(); + } + } + + /** + * Create an instance of LiveboardOptions given an JSON string + * + * @param jsonString JSON string + * @return An instance of LiveboardOptions + * @throws IOException if the JSON string is invalid with respect to LiveboardOptions + */ + public static LiveboardOptions fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, LiveboardOptions.class); + } + + /** + * Convert an instance of LiveboardOptions to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} diff --git a/sdks/java/src/main/java/com/thoughtspot/client/model/LiveboardOptionsInput.java b/sdks/java/src/main/java/com/thoughtspot/client/model/LiveboardOptionsInput.java new file mode 100644 index 000000000..2af98f680 --- /dev/null +++ b/sdks/java/src/main/java/com/thoughtspot/client/model/LiveboardOptionsInput.java @@ -0,0 +1,324 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client.model; + +import com.google.gson.Gson; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.TypeAdapter; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.annotations.SerializedName; +import com.google.gson.reflect.TypeToken; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import com.thoughtspot.client.JSON; +import java.io.IOException; +import java.io.Serializable; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Objects; + +/** Options to specify details of Liveboard. */ +@javax.annotation.Generated( + value = "org.openapitools.codegen.languages.JavaClientCodegen", + comments = "Generator version: 7.12.0") +public class LiveboardOptionsInput implements Serializable { + private static final long serialVersionUID = 1L; + + public static final String SERIALIZED_NAME_VISUALIZATION_IDENTIFIERS = + "visualization_identifiers"; + + @SerializedName(SERIALIZED_NAME_VISUALIZATION_IDENTIFIERS) + @javax.annotation.Nonnull + private List visualizationIdentifiers; + + public LiveboardOptionsInput() {} + + public LiveboardOptionsInput visualizationIdentifiers( + @javax.annotation.Nonnull List visualizationIdentifiers) { + this.visualizationIdentifiers = visualizationIdentifiers; + return this; + } + + public LiveboardOptionsInput addVisualizationIdentifiersItem( + String visualizationIdentifiersItem) { + if (this.visualizationIdentifiers == null) { + this.visualizationIdentifiers = new ArrayList<>(); + } + this.visualizationIdentifiers.add(visualizationIdentifiersItem); + return this; + } + + /** + * Unique ID or name of visualizations. + * + * @return visualizationIdentifiers + */ + @javax.annotation.Nonnull + public List getVisualizationIdentifiers() { + return visualizationIdentifiers; + } + + public void setVisualizationIdentifiers( + @javax.annotation.Nonnull List visualizationIdentifiers) { + this.visualizationIdentifiers = visualizationIdentifiers; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key name of the property + * @param value value of the property + * @return the LiveboardOptionsInput instance itself + */ + public LiveboardOptionsInput putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return a map of objects + */ + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key name of the property + * @return an object + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + LiveboardOptionsInput liveboardOptionsInput = (LiveboardOptionsInput) o; + return Objects.equals( + this.visualizationIdentifiers, + liveboardOptionsInput.visualizationIdentifiers) + && Objects.equals( + this.additionalProperties, liveboardOptionsInput.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(visualizationIdentifiers, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class LiveboardOptionsInput {\n"); + sb.append(" visualizationIdentifiers: ") + .append(toIndentedString(visualizationIdentifiers)) + .append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first + * line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("visualization_identifiers"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + openapiRequiredFields.add("visualization_identifiers"); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to LiveboardOptionsInput + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!LiveboardOptionsInput.openapiRequiredFields + .isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException( + String.format( + "The required field(s) %s in LiveboardOptionsInput is not found in" + + " the empty JSON string", + LiveboardOptionsInput.openapiRequiredFields.toString())); + } + } + + // check to make sure all required properties/fields are present in the JSON string + for (String requiredField : LiveboardOptionsInput.openapiRequiredFields) { + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException( + String.format( + "The required field `%s` is not found in the JSON string: %s", + requiredField, jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // ensure the required json array is present + if (jsonObj.get("visualization_identifiers") == null) { + throw new IllegalArgumentException( + "Expected the field `linkedContent` to be an array in the JSON string but got" + + " `null`"); + } else if (!jsonObj.get("visualization_identifiers").isJsonArray()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `visualization_identifiers` to be an array in the" + + " JSON string but got `%s`", + jsonObj.get("visualization_identifiers").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!LiveboardOptionsInput.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'LiveboardOptionsInput' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter = + gson.getDelegateAdapter(this, TypeToken.get(LiveboardOptionsInput.class)); + + return (TypeAdapter) + new TypeAdapter() { + @Override + public void write(JsonWriter out, LiveboardOptionsInput value) + throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + obj.remove("additionalProperties"); + // serialize additional properties + if (value.getAdditionalProperties() != null) { + for (Map.Entry entry : + value.getAdditionalProperties().entrySet()) { + if (entry.getValue() instanceof String) + obj.addProperty(entry.getKey(), (String) entry.getValue()); + else if (entry.getValue() instanceof Number) + obj.addProperty(entry.getKey(), (Number) entry.getValue()); + else if (entry.getValue() instanceof Boolean) + obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); + else if (entry.getValue() instanceof Character) + obj.addProperty( + entry.getKey(), (Character) entry.getValue()); + else { + JsonElement jsonElement = gson.toJsonTree(entry.getValue()); + if (jsonElement.isJsonArray()) { + obj.add(entry.getKey(), jsonElement.getAsJsonArray()); + } else { + obj.add(entry.getKey(), jsonElement.getAsJsonObject()); + } + } + } + } + elementAdapter.write(out, obj); + } + + @Override + public LiveboardOptionsInput read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // store additional fields in the deserialized instance + LiveboardOptionsInput instance = thisAdapter.fromJsonTree(jsonObj); + for (Map.Entry entry : jsonObj.entrySet()) { + if (!openapiFields.contains(entry.getKey())) { + if (entry.getValue().isJsonPrimitive()) { // primitive type + if (entry.getValue().getAsJsonPrimitive().isString()) + instance.putAdditionalProperty( + entry.getKey(), entry.getValue().getAsString()); + else if (entry.getValue().getAsJsonPrimitive().isNumber()) + instance.putAdditionalProperty( + entry.getKey(), entry.getValue().getAsNumber()); + else if (entry.getValue().getAsJsonPrimitive().isBoolean()) + instance.putAdditionalProperty( + entry.getKey(), + entry.getValue().getAsBoolean()); + else + throw new IllegalArgumentException( + String.format( + "The field `%s` has unknown primitive" + + " type. Value: %s", + entry.getKey(), + entry.getValue().toString())); + } else if (entry.getValue().isJsonArray()) { + instance.putAdditionalProperty( + entry.getKey(), + gson.fromJson(entry.getValue(), List.class)); + } else { // JSON object + instance.putAdditionalProperty( + entry.getKey(), + gson.fromJson(entry.getValue(), HashMap.class)); + } + } + } + return instance; + } + }.nullSafe(); + } + } + + /** + * Create an instance of LiveboardOptionsInput given an JSON string + * + * @param jsonString JSON string + * @return An instance of LiveboardOptionsInput + * @throws IOException if the JSON string is invalid with respect to LiveboardOptionsInput + */ + public static LiveboardOptionsInput fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, LiveboardOptionsInput.class); + } + + /** + * Convert an instance of LiveboardOptionsInput to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} diff --git a/sdks/java/src/main/java/com/thoughtspot/client/model/LogResponse.java b/sdks/java/src/main/java/com/thoughtspot/client/model/LogResponse.java new file mode 100644 index 000000000..5a5c7464d --- /dev/null +++ b/sdks/java/src/main/java/com/thoughtspot/client/model/LogResponse.java @@ -0,0 +1,336 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client.model; + +import com.google.gson.Gson; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.TypeAdapter; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.annotations.SerializedName; +import com.google.gson.reflect.TypeToken; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import com.thoughtspot.client.JSON; +import java.io.IOException; +import java.io.Serializable; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Objects; + +/** LogResponse */ +@javax.annotation.Generated( + value = "org.openapitools.codegen.languages.JavaClientCodegen", + comments = "Generator version: 7.12.0") +public class LogResponse implements Serializable { + private static final long serialVersionUID = 1L; + + public static final String SERIALIZED_NAME_DATE = "date"; + + @SerializedName(SERIALIZED_NAME_DATE) + @javax.annotation.Nonnull + private String date; + + public static final String SERIALIZED_NAME_LOG = "log"; + + @SerializedName(SERIALIZED_NAME_LOG) + @javax.annotation.Nonnull + private String log; + + public LogResponse() {} + + public LogResponse date(@javax.annotation.Nonnull String date) { + this.date = date; + return this; + } + + /** + * Date timestamp of the log entry + * + * @return date + */ + @javax.annotation.Nonnull + public String getDate() { + return date; + } + + public void setDate(@javax.annotation.Nonnull String date) { + this.date = date; + } + + public LogResponse log(@javax.annotation.Nonnull String log) { + this.log = log; + return this; + } + + /** + * Log data + * + * @return log + */ + @javax.annotation.Nonnull + public String getLog() { + return log; + } + + public void setLog(@javax.annotation.Nonnull String log) { + this.log = log; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key name of the property + * @param value value of the property + * @return the LogResponse instance itself + */ + public LogResponse putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return a map of objects + */ + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key name of the property + * @return an object + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + LogResponse logResponse = (LogResponse) o; + return Objects.equals(this.date, logResponse.date) + && Objects.equals(this.log, logResponse.log) + && Objects.equals(this.additionalProperties, logResponse.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(date, log, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class LogResponse {\n"); + sb.append(" date: ").append(toIndentedString(date)).append("\n"); + sb.append(" log: ").append(toIndentedString(log)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first + * line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("date"); + openapiFields.add("log"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + openapiRequiredFields.add("date"); + openapiRequiredFields.add("log"); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to LogResponse + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!LogResponse.openapiRequiredFields + .isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException( + String.format( + "The required field(s) %s in LogResponse is not found in the empty" + + " JSON string", + LogResponse.openapiRequiredFields.toString())); + } + } + + // check to make sure all required properties/fields are present in the JSON string + for (String requiredField : LogResponse.openapiRequiredFields) { + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException( + String.format( + "The required field `%s` is not found in the JSON string: %s", + requiredField, jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if (!jsonObj.get("date").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `date` to be a primitive type in the JSON string" + + " but got `%s`", + jsonObj.get("date").toString())); + } + if (!jsonObj.get("log").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `log` to be a primitive type in the JSON string" + + " but got `%s`", + jsonObj.get("log").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!LogResponse.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'LogResponse' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter = + gson.getDelegateAdapter(this, TypeToken.get(LogResponse.class)); + + return (TypeAdapter) + new TypeAdapter() { + @Override + public void write(JsonWriter out, LogResponse value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + obj.remove("additionalProperties"); + // serialize additional properties + if (value.getAdditionalProperties() != null) { + for (Map.Entry entry : + value.getAdditionalProperties().entrySet()) { + if (entry.getValue() instanceof String) + obj.addProperty(entry.getKey(), (String) entry.getValue()); + else if (entry.getValue() instanceof Number) + obj.addProperty(entry.getKey(), (Number) entry.getValue()); + else if (entry.getValue() instanceof Boolean) + obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); + else if (entry.getValue() instanceof Character) + obj.addProperty( + entry.getKey(), (Character) entry.getValue()); + else { + JsonElement jsonElement = gson.toJsonTree(entry.getValue()); + if (jsonElement.isJsonArray()) { + obj.add(entry.getKey(), jsonElement.getAsJsonArray()); + } else { + obj.add(entry.getKey(), jsonElement.getAsJsonObject()); + } + } + } + } + elementAdapter.write(out, obj); + } + + @Override + public LogResponse read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // store additional fields in the deserialized instance + LogResponse instance = thisAdapter.fromJsonTree(jsonObj); + for (Map.Entry entry : jsonObj.entrySet()) { + if (!openapiFields.contains(entry.getKey())) { + if (entry.getValue().isJsonPrimitive()) { // primitive type + if (entry.getValue().getAsJsonPrimitive().isString()) + instance.putAdditionalProperty( + entry.getKey(), entry.getValue().getAsString()); + else if (entry.getValue().getAsJsonPrimitive().isNumber()) + instance.putAdditionalProperty( + entry.getKey(), entry.getValue().getAsNumber()); + else if (entry.getValue().getAsJsonPrimitive().isBoolean()) + instance.putAdditionalProperty( + entry.getKey(), + entry.getValue().getAsBoolean()); + else + throw new IllegalArgumentException( + String.format( + "The field `%s` has unknown primitive" + + " type. Value: %s", + entry.getKey(), + entry.getValue().toString())); + } else if (entry.getValue().isJsonArray()) { + instance.putAdditionalProperty( + entry.getKey(), + gson.fromJson(entry.getValue(), List.class)); + } else { // JSON object + instance.putAdditionalProperty( + entry.getKey(), + gson.fromJson(entry.getValue(), HashMap.class)); + } + } + } + return instance; + } + }.nullSafe(); + } + } + + /** + * Create an instance of LogResponse given an JSON string + * + * @param jsonString JSON string + * @return An instance of LogResponse + * @throws IOException if the JSON string is invalid with respect to LogResponse + */ + public static LogResponse fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, LogResponse.class); + } + + /** + * Convert an instance of LogResponse to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} diff --git a/sdks/java/src/main/java/com/thoughtspot/client/model/LoginRequest.java b/sdks/java/src/main/java/com/thoughtspot/client/model/LoginRequest.java new file mode 100644 index 000000000..e243ec049 --- /dev/null +++ b/sdks/java/src/main/java/com/thoughtspot/client/model/LoginRequest.java @@ -0,0 +1,410 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client.model; + +import com.google.gson.Gson; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.TypeAdapter; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.annotations.SerializedName; +import com.google.gson.reflect.TypeToken; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import com.thoughtspot.client.JSON; +import java.io.IOException; +import java.io.Serializable; +import java.util.Arrays; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Objects; +import org.openapitools.jackson.nullable.JsonNullable; + +/** LoginRequest */ +@javax.annotation.Generated( + value = "org.openapitools.codegen.languages.JavaClientCodegen", + comments = "Generator version: 7.12.0") +public class LoginRequest implements Serializable { + private static final long serialVersionUID = 1L; + + public static final String SERIALIZED_NAME_USERNAME = "username"; + + @SerializedName(SERIALIZED_NAME_USERNAME) + @javax.annotation.Nullable + private String username; + + public static final String SERIALIZED_NAME_PASSWORD = "password"; + + @SerializedName(SERIALIZED_NAME_PASSWORD) + @javax.annotation.Nullable + private String password; + + public static final String SERIALIZED_NAME_ORG_IDENTIFIER = "org_identifier"; + + @SerializedName(SERIALIZED_NAME_ORG_IDENTIFIER) + @javax.annotation.Nullable + private String orgIdentifier; + + public static final String SERIALIZED_NAME_REMEMBER_ME = "remember_me"; + + @SerializedName(SERIALIZED_NAME_REMEMBER_ME) + @javax.annotation.Nullable + private Boolean rememberMe = false; + + public LoginRequest() {} + + public LoginRequest username(@javax.annotation.Nullable String username) { + this.username = username; + return this; + } + + /** + * Username of the ThoughtSpot user + * + * @return username + */ + @javax.annotation.Nullable + public String getUsername() { + return username; + } + + public void setUsername(@javax.annotation.Nullable String username) { + this.username = username; + } + + public LoginRequest password(@javax.annotation.Nullable String password) { + this.password = password; + return this; + } + + /** + * Password of the user account + * + * @return password + */ + @javax.annotation.Nullable + public String getPassword() { + return password; + } + + public void setPassword(@javax.annotation.Nullable String password) { + this.password = password; + } + + public LoginRequest orgIdentifier(@javax.annotation.Nullable String orgIdentifier) { + this.orgIdentifier = orgIdentifier; + return this; + } + + /** + * ID of the Org context to log in to. If Org ID is not specified, the user will be logged in to + * the Org context of their previous login session. + * + * @return orgIdentifier + */ + @javax.annotation.Nullable + public String getOrgIdentifier() { + return orgIdentifier; + } + + public void setOrgIdentifier(@javax.annotation.Nullable String orgIdentifier) { + this.orgIdentifier = orgIdentifier; + } + + public LoginRequest rememberMe(@javax.annotation.Nullable Boolean rememberMe) { + this.rememberMe = rememberMe; + return this; + } + + /** + * A flag to remember the user session. When set to true, a session cookie is created and used + * in subsequent API requests. + * + * @return rememberMe + */ + @javax.annotation.Nullable + public Boolean getRememberMe() { + return rememberMe; + } + + public void setRememberMe(@javax.annotation.Nullable Boolean rememberMe) { + this.rememberMe = rememberMe; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key name of the property + * @param value value of the property + * @return the LoginRequest instance itself + */ + public LoginRequest putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return a map of objects + */ + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key name of the property + * @return an object + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + LoginRequest loginRequest = (LoginRequest) o; + return Objects.equals(this.username, loginRequest.username) + && Objects.equals(this.password, loginRequest.password) + && Objects.equals(this.orgIdentifier, loginRequest.orgIdentifier) + && Objects.equals(this.rememberMe, loginRequest.rememberMe) + && Objects.equals(this.additionalProperties, loginRequest.additionalProperties); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b + || (a != null + && b != null + && a.isPresent() + && b.isPresent() + && Objects.deepEquals(a.get(), b.get())); + } + + @Override + public int hashCode() { + return Objects.hash(username, password, orgIdentifier, rememberMe, additionalProperties); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; + } + return a.isPresent() ? Arrays.deepHashCode(new Object[] {a.get()}) : 31; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class LoginRequest {\n"); + sb.append(" username: ").append(toIndentedString(username)).append("\n"); + sb.append(" password: ").append(toIndentedString(password)).append("\n"); + sb.append(" orgIdentifier: ").append(toIndentedString(orgIdentifier)).append("\n"); + sb.append(" rememberMe: ").append(toIndentedString(rememberMe)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first + * line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("username"); + openapiFields.add("password"); + openapiFields.add("org_identifier"); + openapiFields.add("remember_me"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to LoginRequest + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!LoginRequest.openapiRequiredFields + .isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException( + String.format( + "The required field(s) %s in LoginRequest is not found in the" + + " empty JSON string", + LoginRequest.openapiRequiredFields.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if ((jsonObj.get("username") != null && !jsonObj.get("username").isJsonNull()) + && !jsonObj.get("username").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `username` to be a primitive type in the JSON" + + " string but got `%s`", + jsonObj.get("username").toString())); + } + if ((jsonObj.get("password") != null && !jsonObj.get("password").isJsonNull()) + && !jsonObj.get("password").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `password` to be a primitive type in the JSON" + + " string but got `%s`", + jsonObj.get("password").toString())); + } + if ((jsonObj.get("org_identifier") != null && !jsonObj.get("org_identifier").isJsonNull()) + && !jsonObj.get("org_identifier").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `org_identifier` to be a primitive type in the" + + " JSON string but got `%s`", + jsonObj.get("org_identifier").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!LoginRequest.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'LoginRequest' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter = + gson.getDelegateAdapter(this, TypeToken.get(LoginRequest.class)); + + return (TypeAdapter) + new TypeAdapter() { + @Override + public void write(JsonWriter out, LoginRequest value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + obj.remove("additionalProperties"); + // serialize additional properties + if (value.getAdditionalProperties() != null) { + for (Map.Entry entry : + value.getAdditionalProperties().entrySet()) { + if (entry.getValue() instanceof String) + obj.addProperty(entry.getKey(), (String) entry.getValue()); + else if (entry.getValue() instanceof Number) + obj.addProperty(entry.getKey(), (Number) entry.getValue()); + else if (entry.getValue() instanceof Boolean) + obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); + else if (entry.getValue() instanceof Character) + obj.addProperty( + entry.getKey(), (Character) entry.getValue()); + else { + JsonElement jsonElement = gson.toJsonTree(entry.getValue()); + if (jsonElement.isJsonArray()) { + obj.add(entry.getKey(), jsonElement.getAsJsonArray()); + } else { + obj.add(entry.getKey(), jsonElement.getAsJsonObject()); + } + } + } + } + elementAdapter.write(out, obj); + } + + @Override + public LoginRequest read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // store additional fields in the deserialized instance + LoginRequest instance = thisAdapter.fromJsonTree(jsonObj); + for (Map.Entry entry : jsonObj.entrySet()) { + if (!openapiFields.contains(entry.getKey())) { + if (entry.getValue().isJsonPrimitive()) { // primitive type + if (entry.getValue().getAsJsonPrimitive().isString()) + instance.putAdditionalProperty( + entry.getKey(), entry.getValue().getAsString()); + else if (entry.getValue().getAsJsonPrimitive().isNumber()) + instance.putAdditionalProperty( + entry.getKey(), entry.getValue().getAsNumber()); + else if (entry.getValue().getAsJsonPrimitive().isBoolean()) + instance.putAdditionalProperty( + entry.getKey(), + entry.getValue().getAsBoolean()); + else + throw new IllegalArgumentException( + String.format( + "The field `%s` has unknown primitive" + + " type. Value: %s", + entry.getKey(), + entry.getValue().toString())); + } else if (entry.getValue().isJsonArray()) { + instance.putAdditionalProperty( + entry.getKey(), + gson.fromJson(entry.getValue(), List.class)); + } else { // JSON object + instance.putAdditionalProperty( + entry.getKey(), + gson.fromJson(entry.getValue(), HashMap.class)); + } + } + } + return instance; + } + }.nullSafe(); + } + } + + /** + * Create an instance of LoginRequest given an JSON string + * + * @param jsonString JSON string + * @return An instance of LoginRequest + * @throws IOException if the JSON string is invalid with respect to LoginRequest + */ + public static LoginRequest fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, LoginRequest.class); + } + + /** + * Convert an instance of LoginRequest to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} diff --git a/sdks/java/src/main/java/com/thoughtspot/client/model/ManageObjectPrivilegeRequest.java b/sdks/java/src/main/java/com/thoughtspot/client/model/ManageObjectPrivilegeRequest.java new file mode 100644 index 000000000..ae4673da1 --- /dev/null +++ b/sdks/java/src/main/java/com/thoughtspot/client/model/ManageObjectPrivilegeRequest.java @@ -0,0 +1,681 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client.model; + +import com.google.gson.Gson; +import com.google.gson.JsonArray; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.TypeAdapter; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.reflect.TypeToken; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import com.thoughtspot.client.JSON; +import java.io.IOException; +import java.io.Serializable; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Objects; + +/** ManageObjectPrivilegeRequest */ +@javax.annotation.Generated( + value = "org.openapitools.codegen.languages.JavaClientCodegen", + comments = "Generator version: 7.12.0") +public class ManageObjectPrivilegeRequest implements Serializable { + private static final long serialVersionUID = 1L; + + /** + * Operation to perform to manage object privileges. Available operations are: `ADD`, + * `REMOVE`. + */ + @JsonAdapter(OperationEnum.Adapter.class) + public enum OperationEnum { + ADD("ADD"), + + REMOVE("REMOVE"); + + private String value; + + OperationEnum(String value) { + this.value = value; + } + + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + public static OperationEnum fromValue(String value) { + for (OperationEnum b : OperationEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + + public static class Adapter extends TypeAdapter { + @Override + public void write(final JsonWriter jsonWriter, final OperationEnum enumeration) + throws IOException { + jsonWriter.value(enumeration.getValue()); + } + + @Override + public OperationEnum read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + return OperationEnum.fromValue(value); + } + } + + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + String value = jsonElement.getAsString(); + OperationEnum.fromValue(value); + } + } + + public static final String SERIALIZED_NAME_OPERATION = "operation"; + + @SerializedName(SERIALIZED_NAME_OPERATION) + @javax.annotation.Nonnull + private OperationEnum operation; + + /** + * Type of metadata objects on which you want to perform the operation. For now only + * LOGICAL_TABLE is supported. It may be extended to other metadata types in the future. + */ + @JsonAdapter(MetadataTypeEnum.Adapter.class) + public enum MetadataTypeEnum { + LOGICAL_TABLE("LOGICAL_TABLE"); + + private String value; + + MetadataTypeEnum(String value) { + this.value = value; + } + + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + public static MetadataTypeEnum fromValue(String value) { + for (MetadataTypeEnum b : MetadataTypeEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + + public static class Adapter extends TypeAdapter { + @Override + public void write(final JsonWriter jsonWriter, final MetadataTypeEnum enumeration) + throws IOException { + jsonWriter.value(enumeration.getValue()); + } + + @Override + public MetadataTypeEnum read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + return MetadataTypeEnum.fromValue(value); + } + } + + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + String value = jsonElement.getAsString(); + MetadataTypeEnum.fromValue(value); + } + } + + public static final String SERIALIZED_NAME_METADATA_TYPE = "metadata_type"; + + @SerializedName(SERIALIZED_NAME_METADATA_TYPE) + @javax.annotation.Nonnull + private MetadataTypeEnum metadataType; + + /** Gets or Sets objectPrivilegeTypes */ + @JsonAdapter(ObjectPrivilegeTypesEnum.Adapter.class) + public enum ObjectPrivilegeTypesEnum { + SPOTTER_COACHING_PRIVILEGE("SPOTTER_COACHING_PRIVILEGE"); + + private String value; + + ObjectPrivilegeTypesEnum(String value) { + this.value = value; + } + + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + public static ObjectPrivilegeTypesEnum fromValue(String value) { + for (ObjectPrivilegeTypesEnum b : ObjectPrivilegeTypesEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + + public static class Adapter extends TypeAdapter { + @Override + public void write( + final JsonWriter jsonWriter, final ObjectPrivilegeTypesEnum enumeration) + throws IOException { + jsonWriter.value(enumeration.getValue()); + } + + @Override + public ObjectPrivilegeTypesEnum read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + return ObjectPrivilegeTypesEnum.fromValue(value); + } + } + + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + String value = jsonElement.getAsString(); + ObjectPrivilegeTypesEnum.fromValue(value); + } + } + + public static final String SERIALIZED_NAME_OBJECT_PRIVILEGE_TYPES = "object_privilege_types"; + + @SerializedName(SERIALIZED_NAME_OBJECT_PRIVILEGE_TYPES) + @javax.annotation.Nonnull + private List objectPrivilegeTypes; + + public static final String SERIALIZED_NAME_METADATA_IDENTIFIERS = "metadata_identifiers"; + + @SerializedName(SERIALIZED_NAME_METADATA_IDENTIFIERS) + @javax.annotation.Nonnull + private List metadataIdentifiers; + + public static final String SERIALIZED_NAME_PRINCIPALS = "principals"; + + @SerializedName(SERIALIZED_NAME_PRINCIPALS) + @javax.annotation.Nonnull + private List principals; + + public ManageObjectPrivilegeRequest() {} + + public ManageObjectPrivilegeRequest operation( + @javax.annotation.Nonnull OperationEnum operation) { + this.operation = operation; + return this; + } + + /** + * Operation to perform to manage object privileges. Available operations are: `ADD`, + * `REMOVE`. + * + * @return operation + */ + @javax.annotation.Nonnull + public OperationEnum getOperation() { + return operation; + } + + public void setOperation(@javax.annotation.Nonnull OperationEnum operation) { + this.operation = operation; + } + + public ManageObjectPrivilegeRequest metadataType( + @javax.annotation.Nonnull MetadataTypeEnum metadataType) { + this.metadataType = metadataType; + return this; + } + + /** + * Type of metadata objects on which you want to perform the operation. For now only + * LOGICAL_TABLE is supported. It may be extended to other metadata types in the future. + * + * @return metadataType + */ + @javax.annotation.Nonnull + public MetadataTypeEnum getMetadataType() { + return metadataType; + } + + public void setMetadataType(@javax.annotation.Nonnull MetadataTypeEnum metadataType) { + this.metadataType = metadataType; + } + + public ManageObjectPrivilegeRequest objectPrivilegeTypes( + @javax.annotation.Nonnull List objectPrivilegeTypes) { + this.objectPrivilegeTypes = objectPrivilegeTypes; + return this; + } + + public ManageObjectPrivilegeRequest addObjectPrivilegeTypesItem( + ObjectPrivilegeTypesEnum objectPrivilegeTypesItem) { + if (this.objectPrivilegeTypes == null) { + this.objectPrivilegeTypes = new ArrayList<>(); + } + this.objectPrivilegeTypes.add(objectPrivilegeTypesItem); + return this; + } + + /** + * List of object privilege types on which you want to perform the operation. + * + * @return objectPrivilegeTypes + */ + @javax.annotation.Nonnull + public List getObjectPrivilegeTypes() { + return objectPrivilegeTypes; + } + + public void setObjectPrivilegeTypes( + @javax.annotation.Nonnull List objectPrivilegeTypes) { + this.objectPrivilegeTypes = objectPrivilegeTypes; + } + + public ManageObjectPrivilegeRequest metadataIdentifiers( + @javax.annotation.Nonnull List metadataIdentifiers) { + this.metadataIdentifiers = metadataIdentifiers; + return this; + } + + public ManageObjectPrivilegeRequest addMetadataIdentifiersItem(String metadataIdentifiersItem) { + if (this.metadataIdentifiers == null) { + this.metadataIdentifiers = new ArrayList<>(); + } + this.metadataIdentifiers.add(metadataIdentifiersItem); + return this; + } + + /** + * List of metadata identifiers (GUID or name) on which you want to perform the operation. + * + * @return metadataIdentifiers + */ + @javax.annotation.Nonnull + public List getMetadataIdentifiers() { + return metadataIdentifiers; + } + + public void setMetadataIdentifiers(@javax.annotation.Nonnull List metadataIdentifiers) { + this.metadataIdentifiers = metadataIdentifiers; + } + + public ManageObjectPrivilegeRequest principals( + @javax.annotation.Nonnull List principals) { + this.principals = principals; + return this; + } + + public ManageObjectPrivilegeRequest addPrincipalsItem(PrincipalsInput principalsItem) { + if (this.principals == null) { + this.principals = new ArrayList<>(); + } + this.principals.add(principalsItem); + return this; + } + + /** + * User or group objects (GUID or name) to which you want to apply the given operation and given + * object privileges. + * + * @return principals + */ + @javax.annotation.Nonnull + public List getPrincipals() { + return principals; + } + + public void setPrincipals(@javax.annotation.Nonnull List principals) { + this.principals = principals; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key name of the property + * @param value value of the property + * @return the ManageObjectPrivilegeRequest instance itself + */ + public ManageObjectPrivilegeRequest putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return a map of objects + */ + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key name of the property + * @return an object + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ManageObjectPrivilegeRequest manageObjectPrivilegeRequest = + (ManageObjectPrivilegeRequest) o; + return Objects.equals(this.operation, manageObjectPrivilegeRequest.operation) + && Objects.equals(this.metadataType, manageObjectPrivilegeRequest.metadataType) + && Objects.equals( + this.objectPrivilegeTypes, + manageObjectPrivilegeRequest.objectPrivilegeTypes) + && Objects.equals( + this.metadataIdentifiers, manageObjectPrivilegeRequest.metadataIdentifiers) + && Objects.equals(this.principals, manageObjectPrivilegeRequest.principals) + && Objects.equals( + this.additionalProperties, + manageObjectPrivilegeRequest.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash( + operation, + metadataType, + objectPrivilegeTypes, + metadataIdentifiers, + principals, + additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ManageObjectPrivilegeRequest {\n"); + sb.append(" operation: ").append(toIndentedString(operation)).append("\n"); + sb.append(" metadataType: ").append(toIndentedString(metadataType)).append("\n"); + sb.append(" objectPrivilegeTypes: ") + .append(toIndentedString(objectPrivilegeTypes)) + .append("\n"); + sb.append(" metadataIdentifiers: ") + .append(toIndentedString(metadataIdentifiers)) + .append("\n"); + sb.append(" principals: ").append(toIndentedString(principals)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first + * line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("operation"); + openapiFields.add("metadata_type"); + openapiFields.add("object_privilege_types"); + openapiFields.add("metadata_identifiers"); + openapiFields.add("principals"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + openapiRequiredFields.add("operation"); + openapiRequiredFields.add("metadata_type"); + openapiRequiredFields.add("object_privilege_types"); + openapiRequiredFields.add("metadata_identifiers"); + openapiRequiredFields.add("principals"); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to + * ManageObjectPrivilegeRequest + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!ManageObjectPrivilegeRequest.openapiRequiredFields + .isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException( + String.format( + "The required field(s) %s in ManageObjectPrivilegeRequest is not" + + " found in the empty JSON string", + ManageObjectPrivilegeRequest.openapiRequiredFields.toString())); + } + } + + // check to make sure all required properties/fields are present in the JSON string + for (String requiredField : ManageObjectPrivilegeRequest.openapiRequiredFields) { + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException( + String.format( + "The required field `%s` is not found in the JSON string: %s", + requiredField, jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if (!jsonObj.get("operation").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `operation` to be a primitive type in the JSON" + + " string but got `%s`", + jsonObj.get("operation").toString())); + } + // validate the required field `operation` + OperationEnum.validateJsonElement(jsonObj.get("operation")); + if (!jsonObj.get("metadata_type").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `metadata_type` to be a primitive type in the JSON" + + " string but got `%s`", + jsonObj.get("metadata_type").toString())); + } + // validate the required field `metadata_type` + MetadataTypeEnum.validateJsonElement(jsonObj.get("metadata_type")); + // ensure the required json array is present + if (jsonObj.get("object_privilege_types") == null) { + throw new IllegalArgumentException( + "Expected the field `linkedContent` to be an array in the JSON string but got" + + " `null`"); + } else if (!jsonObj.get("object_privilege_types").isJsonArray()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `object_privilege_types` to be an array in the" + + " JSON string but got `%s`", + jsonObj.get("object_privilege_types").toString())); + } + // ensure the required json array is present + if (jsonObj.get("metadata_identifiers") == null) { + throw new IllegalArgumentException( + "Expected the field `linkedContent` to be an array in the JSON string but got" + + " `null`"); + } else if (!jsonObj.get("metadata_identifiers").isJsonArray()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `metadata_identifiers` to be an array in the JSON" + + " string but got `%s`", + jsonObj.get("metadata_identifiers").toString())); + } + // ensure the json data is an array + if (!jsonObj.get("principals").isJsonArray()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `principals` to be an array in the JSON string but" + + " got `%s`", + jsonObj.get("principals").toString())); + } + + JsonArray jsonArrayprincipals = jsonObj.getAsJsonArray("principals"); + // validate the required field `principals` (array) + for (int i = 0; i < jsonArrayprincipals.size(); i++) { + PrincipalsInput.validateJsonElement(jsonArrayprincipals.get(i)); + } + ; + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!ManageObjectPrivilegeRequest.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'ManageObjectPrivilegeRequest' and its + // subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter = + gson.getDelegateAdapter( + this, TypeToken.get(ManageObjectPrivilegeRequest.class)); + + return (TypeAdapter) + new TypeAdapter() { + @Override + public void write(JsonWriter out, ManageObjectPrivilegeRequest value) + throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + obj.remove("additionalProperties"); + // serialize additional properties + if (value.getAdditionalProperties() != null) { + for (Map.Entry entry : + value.getAdditionalProperties().entrySet()) { + if (entry.getValue() instanceof String) + obj.addProperty(entry.getKey(), (String) entry.getValue()); + else if (entry.getValue() instanceof Number) + obj.addProperty(entry.getKey(), (Number) entry.getValue()); + else if (entry.getValue() instanceof Boolean) + obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); + else if (entry.getValue() instanceof Character) + obj.addProperty( + entry.getKey(), (Character) entry.getValue()); + else { + JsonElement jsonElement = gson.toJsonTree(entry.getValue()); + if (jsonElement.isJsonArray()) { + obj.add(entry.getKey(), jsonElement.getAsJsonArray()); + } else { + obj.add(entry.getKey(), jsonElement.getAsJsonObject()); + } + } + } + } + elementAdapter.write(out, obj); + } + + @Override + public ManageObjectPrivilegeRequest read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // store additional fields in the deserialized instance + ManageObjectPrivilegeRequest instance = + thisAdapter.fromJsonTree(jsonObj); + for (Map.Entry entry : jsonObj.entrySet()) { + if (!openapiFields.contains(entry.getKey())) { + if (entry.getValue().isJsonPrimitive()) { // primitive type + if (entry.getValue().getAsJsonPrimitive().isString()) + instance.putAdditionalProperty( + entry.getKey(), entry.getValue().getAsString()); + else if (entry.getValue().getAsJsonPrimitive().isNumber()) + instance.putAdditionalProperty( + entry.getKey(), entry.getValue().getAsNumber()); + else if (entry.getValue().getAsJsonPrimitive().isBoolean()) + instance.putAdditionalProperty( + entry.getKey(), + entry.getValue().getAsBoolean()); + else + throw new IllegalArgumentException( + String.format( + "The field `%s` has unknown primitive" + + " type. Value: %s", + entry.getKey(), + entry.getValue().toString())); + } else if (entry.getValue().isJsonArray()) { + instance.putAdditionalProperty( + entry.getKey(), + gson.fromJson(entry.getValue(), List.class)); + } else { // JSON object + instance.putAdditionalProperty( + entry.getKey(), + gson.fromJson(entry.getValue(), HashMap.class)); + } + } + } + return instance; + } + }.nullSafe(); + } + } + + /** + * Create an instance of ManageObjectPrivilegeRequest given an JSON string + * + * @param jsonString JSON string + * @return An instance of ManageObjectPrivilegeRequest + * @throws IOException if the JSON string is invalid with respect to + * ManageObjectPrivilegeRequest + */ + public static ManageObjectPrivilegeRequest fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, ManageObjectPrivilegeRequest.class); + } + + /** + * Convert an instance of ManageObjectPrivilegeRequest to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} diff --git a/sdks/java/src/main/java/com/thoughtspot/client/model/MetadataAssociationItem.java b/sdks/java/src/main/java/com/thoughtspot/client/model/MetadataAssociationItem.java new file mode 100644 index 000000000..f4634b797 --- /dev/null +++ b/sdks/java/src/main/java/com/thoughtspot/client/model/MetadataAssociationItem.java @@ -0,0 +1,372 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client.model; + +import com.google.gson.Gson; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.TypeAdapter; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.annotations.SerializedName; +import com.google.gson.reflect.TypeToken; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import com.thoughtspot.client.JSON; +import java.io.IOException; +import java.io.Serializable; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Objects; + +/** MetadataAssociationItem */ +@javax.annotation.Generated( + value = "org.openapitools.codegen.languages.JavaClientCodegen", + comments = "Generator version: 7.12.0") +public class MetadataAssociationItem implements Serializable { + private static final long serialVersionUID = 1L; + + public static final String SERIALIZED_NAME_ACTION_CONFIG = "action_config"; + + @SerializedName(SERIALIZED_NAME_ACTION_CONFIG) + @javax.annotation.Nonnull + private ActionConfig actionConfig; + + public static final String SERIALIZED_NAME_IDENTIFIER = "identifier"; + + @SerializedName(SERIALIZED_NAME_IDENTIFIER) + @javax.annotation.Nonnull + private String identifier; + + public static final String SERIALIZED_NAME_TYPE = "type"; + + @SerializedName(SERIALIZED_NAME_TYPE) + @javax.annotation.Nonnull + private String type; + + public MetadataAssociationItem() {} + + public MetadataAssociationItem actionConfig( + @javax.annotation.Nonnull ActionConfig actionConfig) { + this.actionConfig = actionConfig; + return this; + } + + /** + * Get actionConfig + * + * @return actionConfig + */ + @javax.annotation.Nonnull + public ActionConfig getActionConfig() { + return actionConfig; + } + + public void setActionConfig(@javax.annotation.Nonnull ActionConfig actionConfig) { + this.actionConfig = actionConfig; + } + + public MetadataAssociationItem identifier(@javax.annotation.Nonnull String identifier) { + this.identifier = identifier; + return this; + } + + /** + * Unique ID or name of the metadata. + * + * @return identifier + */ + @javax.annotation.Nonnull + public String getIdentifier() { + return identifier; + } + + public void setIdentifier(@javax.annotation.Nonnull String identifier) { + this.identifier = identifier; + } + + public MetadataAssociationItem type(@javax.annotation.Nonnull String type) { + this.type = type; + return this; + } + + /** + * Type of metadata. Required if the name of the object is set as the identifier. This attribute + * is optional when the object GUID is specified as the identifier. + * + * @return type + */ + @javax.annotation.Nonnull + public String getType() { + return type; + } + + public void setType(@javax.annotation.Nonnull String type) { + this.type = type; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key name of the property + * @param value value of the property + * @return the MetadataAssociationItem instance itself + */ + public MetadataAssociationItem putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return a map of objects + */ + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key name of the property + * @return an object + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + MetadataAssociationItem metadataAssociationItem = (MetadataAssociationItem) o; + return Objects.equals(this.actionConfig, metadataAssociationItem.actionConfig) + && Objects.equals(this.identifier, metadataAssociationItem.identifier) + && Objects.equals(this.type, metadataAssociationItem.type) + && Objects.equals( + this.additionalProperties, metadataAssociationItem.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(actionConfig, identifier, type, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class MetadataAssociationItem {\n"); + sb.append(" actionConfig: ").append(toIndentedString(actionConfig)).append("\n"); + sb.append(" identifier: ").append(toIndentedString(identifier)).append("\n"); + sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first + * line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("action_config"); + openapiFields.add("identifier"); + openapiFields.add("type"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + openapiRequiredFields.add("action_config"); + openapiRequiredFields.add("identifier"); + openapiRequiredFields.add("type"); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to MetadataAssociationItem + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!MetadataAssociationItem.openapiRequiredFields + .isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException( + String.format( + "The required field(s) %s in MetadataAssociationItem is not found" + + " in the empty JSON string", + MetadataAssociationItem.openapiRequiredFields.toString())); + } + } + + // check to make sure all required properties/fields are present in the JSON string + for (String requiredField : MetadataAssociationItem.openapiRequiredFields) { + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException( + String.format( + "The required field `%s` is not found in the JSON string: %s", + requiredField, jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // validate the required field `action_config` + ActionConfig.validateJsonElement(jsonObj.get("action_config")); + if (!jsonObj.get("identifier").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `identifier` to be a primitive type in the JSON" + + " string but got `%s`", + jsonObj.get("identifier").toString())); + } + if (!jsonObj.get("type").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `type` to be a primitive type in the JSON string" + + " but got `%s`", + jsonObj.get("type").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!MetadataAssociationItem.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'MetadataAssociationItem' and its + // subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter = + gson.getDelegateAdapter(this, TypeToken.get(MetadataAssociationItem.class)); + + return (TypeAdapter) + new TypeAdapter() { + @Override + public void write(JsonWriter out, MetadataAssociationItem value) + throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + obj.remove("additionalProperties"); + // serialize additional properties + if (value.getAdditionalProperties() != null) { + for (Map.Entry entry : + value.getAdditionalProperties().entrySet()) { + if (entry.getValue() instanceof String) + obj.addProperty(entry.getKey(), (String) entry.getValue()); + else if (entry.getValue() instanceof Number) + obj.addProperty(entry.getKey(), (Number) entry.getValue()); + else if (entry.getValue() instanceof Boolean) + obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); + else if (entry.getValue() instanceof Character) + obj.addProperty( + entry.getKey(), (Character) entry.getValue()); + else { + JsonElement jsonElement = gson.toJsonTree(entry.getValue()); + if (jsonElement.isJsonArray()) { + obj.add(entry.getKey(), jsonElement.getAsJsonArray()); + } else { + obj.add(entry.getKey(), jsonElement.getAsJsonObject()); + } + } + } + } + elementAdapter.write(out, obj); + } + + @Override + public MetadataAssociationItem read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // store additional fields in the deserialized instance + MetadataAssociationItem instance = thisAdapter.fromJsonTree(jsonObj); + for (Map.Entry entry : jsonObj.entrySet()) { + if (!openapiFields.contains(entry.getKey())) { + if (entry.getValue().isJsonPrimitive()) { // primitive type + if (entry.getValue().getAsJsonPrimitive().isString()) + instance.putAdditionalProperty( + entry.getKey(), entry.getValue().getAsString()); + else if (entry.getValue().getAsJsonPrimitive().isNumber()) + instance.putAdditionalProperty( + entry.getKey(), entry.getValue().getAsNumber()); + else if (entry.getValue().getAsJsonPrimitive().isBoolean()) + instance.putAdditionalProperty( + entry.getKey(), + entry.getValue().getAsBoolean()); + else + throw new IllegalArgumentException( + String.format( + "The field `%s` has unknown primitive" + + " type. Value: %s", + entry.getKey(), + entry.getValue().toString())); + } else if (entry.getValue().isJsonArray()) { + instance.putAdditionalProperty( + entry.getKey(), + gson.fromJson(entry.getValue(), List.class)); + } else { // JSON object + instance.putAdditionalProperty( + entry.getKey(), + gson.fromJson(entry.getValue(), HashMap.class)); + } + } + } + return instance; + } + }.nullSafe(); + } + } + + /** + * Create an instance of MetadataAssociationItem given an JSON string + * + * @param jsonString JSON string + * @return An instance of MetadataAssociationItem + * @throws IOException if the JSON string is invalid with respect to MetadataAssociationItem + */ + public static MetadataAssociationItem fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, MetadataAssociationItem.class); + } + + /** + * Convert an instance of MetadataAssociationItem to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} diff --git a/sdks/java/src/main/java/com/thoughtspot/client/model/MetadataContext.java b/sdks/java/src/main/java/com/thoughtspot/client/model/MetadataContext.java new file mode 100644 index 000000000..93dadd882 --- /dev/null +++ b/sdks/java/src/main/java/com/thoughtspot/client/model/MetadataContext.java @@ -0,0 +1,471 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client.model; + +import com.google.gson.Gson; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.TypeAdapter; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.annotations.SerializedName; +import com.google.gson.reflect.TypeToken; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import com.thoughtspot.client.JSON; +import java.io.IOException; +import java.io.Serializable; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Objects; +import org.openapitools.jackson.nullable.JsonNullable; + +/** MetadataContext */ +@javax.annotation.Generated( + value = "org.openapitools.codegen.languages.JavaClientCodegen", + comments = "Generator version: 7.12.0") +public class MetadataContext implements Serializable { + private static final long serialVersionUID = 1L; + + public static final String SERIALIZED_NAME_DATA_SOURCE_IDENTIFIERS = "data_source_identifiers"; + + @SerializedName(SERIALIZED_NAME_DATA_SOURCE_IDENTIFIERS) + @javax.annotation.Nullable + private List dataSourceIdentifiers; + + public static final String SERIALIZED_NAME_ANSWER_IDENTIFIERS = "answer_identifiers"; + + @SerializedName(SERIALIZED_NAME_ANSWER_IDENTIFIERS) + @javax.annotation.Nullable + private List answerIdentifiers; + + public static final String SERIALIZED_NAME_CONVERSATION_IDENTIFIER = "conversation_identifier"; + + @SerializedName(SERIALIZED_NAME_CONVERSATION_IDENTIFIER) + @javax.annotation.Nullable + private String conversationIdentifier; + + public static final String SERIALIZED_NAME_LIVEBOARD_IDENTIFIERS = "liveboard_identifiers"; + + @SerializedName(SERIALIZED_NAME_LIVEBOARD_IDENTIFIERS) + @javax.annotation.Nullable + private List liveboardIdentifiers; + + public MetadataContext() {} + + public MetadataContext dataSourceIdentifiers( + @javax.annotation.Nullable List dataSourceIdentifiers) { + this.dataSourceIdentifiers = dataSourceIdentifiers; + return this; + } + + public MetadataContext addDataSourceIdentifiersItem(String dataSourceIdentifiersItem) { + if (this.dataSourceIdentifiers == null) { + this.dataSourceIdentifiers = new ArrayList<>(); + } + this.dataSourceIdentifiers.add(dataSourceIdentifiersItem); + return this; + } + + /** + * List of data_source_identifiers to provide context for breaking down user query into + * analytical queries that can be run on them. + * + * @return dataSourceIdentifiers + */ + @javax.annotation.Nullable + public List getDataSourceIdentifiers() { + return dataSourceIdentifiers; + } + + public void setDataSourceIdentifiers( + @javax.annotation.Nullable List dataSourceIdentifiers) { + this.dataSourceIdentifiers = dataSourceIdentifiers; + } + + public MetadataContext answerIdentifiers( + @javax.annotation.Nullable List answerIdentifiers) { + this.answerIdentifiers = answerIdentifiers; + return this; + } + + public MetadataContext addAnswerIdentifiersItem(String answerIdentifiersItem) { + if (this.answerIdentifiers == null) { + this.answerIdentifiers = new ArrayList<>(); + } + this.answerIdentifiers.add(answerIdentifiersItem); + return this; + } + + /** + * List of answer unique identifiers (GUIDs) whose data will be used to guide the response. + * + * @return answerIdentifiers + */ + @javax.annotation.Nullable + public List getAnswerIdentifiers() { + return answerIdentifiers; + } + + public void setAnswerIdentifiers(@javax.annotation.Nullable List answerIdentifiers) { + this.answerIdentifiers = answerIdentifiers; + } + + public MetadataContext conversationIdentifier( + @javax.annotation.Nullable String conversationIdentifier) { + this.conversationIdentifier = conversationIdentifier; + return this; + } + + /** + * Unique identifier to denote current conversation. + * + * @return conversationIdentifier + */ + @javax.annotation.Nullable + public String getConversationIdentifier() { + return conversationIdentifier; + } + + public void setConversationIdentifier( + @javax.annotation.Nullable String conversationIdentifier) { + this.conversationIdentifier = conversationIdentifier; + } + + public MetadataContext liveboardIdentifiers( + @javax.annotation.Nullable List liveboardIdentifiers) { + this.liveboardIdentifiers = liveboardIdentifiers; + return this; + } + + public MetadataContext addLiveboardIdentifiersItem(String liveboardIdentifiersItem) { + if (this.liveboardIdentifiers == null) { + this.liveboardIdentifiers = new ArrayList<>(); + } + this.liveboardIdentifiers.add(liveboardIdentifiersItem); + return this; + } + + /** + * List of liveboard unique identifiers (GUIDs) whose data will be used to guide the response. + * + * @return liveboardIdentifiers + */ + @javax.annotation.Nullable + public List getLiveboardIdentifiers() { + return liveboardIdentifiers; + } + + public void setLiveboardIdentifiers( + @javax.annotation.Nullable List liveboardIdentifiers) { + this.liveboardIdentifiers = liveboardIdentifiers; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key name of the property + * @param value value of the property + * @return the MetadataContext instance itself + */ + public MetadataContext putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return a map of objects + */ + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key name of the property + * @return an object + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + MetadataContext metadataContext = (MetadataContext) o; + return Objects.equals(this.dataSourceIdentifiers, metadataContext.dataSourceIdentifiers) + && Objects.equals(this.answerIdentifiers, metadataContext.answerIdentifiers) + && Objects.equals( + this.conversationIdentifier, metadataContext.conversationIdentifier) + && Objects.equals(this.liveboardIdentifiers, metadataContext.liveboardIdentifiers) + && Objects.equals(this.additionalProperties, metadataContext.additionalProperties); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b + || (a != null + && b != null + && a.isPresent() + && b.isPresent() + && Objects.deepEquals(a.get(), b.get())); + } + + @Override + public int hashCode() { + return Objects.hash( + dataSourceIdentifiers, + answerIdentifiers, + conversationIdentifier, + liveboardIdentifiers, + additionalProperties); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; + } + return a.isPresent() ? Arrays.deepHashCode(new Object[] {a.get()}) : 31; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class MetadataContext {\n"); + sb.append(" dataSourceIdentifiers: ") + .append(toIndentedString(dataSourceIdentifiers)) + .append("\n"); + sb.append(" answerIdentifiers: ") + .append(toIndentedString(answerIdentifiers)) + .append("\n"); + sb.append(" conversationIdentifier: ") + .append(toIndentedString(conversationIdentifier)) + .append("\n"); + sb.append(" liveboardIdentifiers: ") + .append(toIndentedString(liveboardIdentifiers)) + .append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first + * line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("data_source_identifiers"); + openapiFields.add("answer_identifiers"); + openapiFields.add("conversation_identifier"); + openapiFields.add("liveboard_identifiers"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to MetadataContext + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!MetadataContext.openapiRequiredFields + .isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException( + String.format( + "The required field(s) %s in MetadataContext is not found in the" + + " empty JSON string", + MetadataContext.openapiRequiredFields.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // ensure the optional json data is an array if present + if (jsonObj.get("data_source_identifiers") != null + && !jsonObj.get("data_source_identifiers").isJsonNull() + && !jsonObj.get("data_source_identifiers").isJsonArray()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `data_source_identifiers` to be an array in the" + + " JSON string but got `%s`", + jsonObj.get("data_source_identifiers").toString())); + } + // ensure the optional json data is an array if present + if (jsonObj.get("answer_identifiers") != null + && !jsonObj.get("answer_identifiers").isJsonNull() + && !jsonObj.get("answer_identifiers").isJsonArray()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `answer_identifiers` to be an array in the JSON" + + " string but got `%s`", + jsonObj.get("answer_identifiers").toString())); + } + if ((jsonObj.get("conversation_identifier") != null + && !jsonObj.get("conversation_identifier").isJsonNull()) + && !jsonObj.get("conversation_identifier").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `conversation_identifier` to be a primitive type" + + " in the JSON string but got `%s`", + jsonObj.get("conversation_identifier").toString())); + } + // ensure the optional json data is an array if present + if (jsonObj.get("liveboard_identifiers") != null + && !jsonObj.get("liveboard_identifiers").isJsonNull() + && !jsonObj.get("liveboard_identifiers").isJsonArray()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `liveboard_identifiers` to be an array in the JSON" + + " string but got `%s`", + jsonObj.get("liveboard_identifiers").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!MetadataContext.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'MetadataContext' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter = + gson.getDelegateAdapter(this, TypeToken.get(MetadataContext.class)); + + return (TypeAdapter) + new TypeAdapter() { + @Override + public void write(JsonWriter out, MetadataContext value) + throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + obj.remove("additionalProperties"); + // serialize additional properties + if (value.getAdditionalProperties() != null) { + for (Map.Entry entry : + value.getAdditionalProperties().entrySet()) { + if (entry.getValue() instanceof String) + obj.addProperty(entry.getKey(), (String) entry.getValue()); + else if (entry.getValue() instanceof Number) + obj.addProperty(entry.getKey(), (Number) entry.getValue()); + else if (entry.getValue() instanceof Boolean) + obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); + else if (entry.getValue() instanceof Character) + obj.addProperty( + entry.getKey(), (Character) entry.getValue()); + else { + JsonElement jsonElement = gson.toJsonTree(entry.getValue()); + if (jsonElement.isJsonArray()) { + obj.add(entry.getKey(), jsonElement.getAsJsonArray()); + } else { + obj.add(entry.getKey(), jsonElement.getAsJsonObject()); + } + } + } + } + elementAdapter.write(out, obj); + } + + @Override + public MetadataContext read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // store additional fields in the deserialized instance + MetadataContext instance = thisAdapter.fromJsonTree(jsonObj); + for (Map.Entry entry : jsonObj.entrySet()) { + if (!openapiFields.contains(entry.getKey())) { + if (entry.getValue().isJsonPrimitive()) { // primitive type + if (entry.getValue().getAsJsonPrimitive().isString()) + instance.putAdditionalProperty( + entry.getKey(), entry.getValue().getAsString()); + else if (entry.getValue().getAsJsonPrimitive().isNumber()) + instance.putAdditionalProperty( + entry.getKey(), entry.getValue().getAsNumber()); + else if (entry.getValue().getAsJsonPrimitive().isBoolean()) + instance.putAdditionalProperty( + entry.getKey(), + entry.getValue().getAsBoolean()); + else + throw new IllegalArgumentException( + String.format( + "The field `%s` has unknown primitive" + + " type. Value: %s", + entry.getKey(), + entry.getValue().toString())); + } else if (entry.getValue().isJsonArray()) { + instance.putAdditionalProperty( + entry.getKey(), + gson.fromJson(entry.getValue(), List.class)); + } else { // JSON object + instance.putAdditionalProperty( + entry.getKey(), + gson.fromJson(entry.getValue(), HashMap.class)); + } + } + } + return instance; + } + }.nullSafe(); + } + } + + /** + * Create an instance of MetadataContext given an JSON string + * + * @param jsonString JSON string + * @return An instance of MetadataContext + * @throws IOException if the JSON string is invalid with respect to MetadataContext + */ + public static MetadataContext fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, MetadataContext.class); + } + + /** + * Convert an instance of MetadataContext to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} diff --git a/sdks/java/src/main/java/com/thoughtspot/client/model/MetadataInput.java b/sdks/java/src/main/java/com/thoughtspot/client/model/MetadataInput.java new file mode 100644 index 000000000..1340375c2 --- /dev/null +++ b/sdks/java/src/main/java/com/thoughtspot/client/model/MetadataInput.java @@ -0,0 +1,398 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client.model; + +import com.google.gson.Gson; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.TypeAdapter; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.reflect.TypeToken; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import com.thoughtspot.client.JSON; +import java.io.IOException; +import java.io.Serializable; +import java.util.Arrays; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Objects; +import org.openapitools.jackson.nullable.JsonNullable; + +/** MetadataInput */ +@javax.annotation.Generated( + value = "org.openapitools.codegen.languages.JavaClientCodegen", + comments = "Generator version: 7.12.0") +public class MetadataInput implements Serializable { + private static final long serialVersionUID = 1L; + + public static final String SERIALIZED_NAME_IDENTIFIER = "identifier"; + + @SerializedName(SERIALIZED_NAME_IDENTIFIER) + @javax.annotation.Nullable + private String identifier; + + /** Gets or Sets type */ + @JsonAdapter(TypeEnum.Adapter.class) + public enum TypeEnum { + LIVEBOARD("LIVEBOARD"); + + private String value; + + TypeEnum(String value) { + this.value = value; + } + + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + public static TypeEnum fromValue(String value) { + for (TypeEnum b : TypeEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + return null; + } + + public static class Adapter extends TypeAdapter { + @Override + public void write(final JsonWriter jsonWriter, final TypeEnum enumeration) + throws IOException { + jsonWriter.value(enumeration.getValue()); + } + + @Override + public TypeEnum read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + return TypeEnum.fromValue(value); + } + } + + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + String value = jsonElement.getAsString(); + TypeEnum.fromValue(value); + } + } + + public static final String SERIALIZED_NAME_TYPE = "type"; + + @SerializedName(SERIALIZED_NAME_TYPE) + @javax.annotation.Nullable + private TypeEnum type; + + public MetadataInput() {} + + public MetadataInput identifier(@javax.annotation.Nullable String identifier) { + this.identifier = identifier; + return this; + } + + /** + * Get identifier + * + * @return identifier + */ + @javax.annotation.Nullable + public String getIdentifier() { + return identifier; + } + + public void setIdentifier(@javax.annotation.Nullable String identifier) { + this.identifier = identifier; + } + + public MetadataInput type(@javax.annotation.Nullable TypeEnum type) { + this.type = type; + return this; + } + + /** + * Get type + * + * @return type + */ + @javax.annotation.Nullable + public TypeEnum getType() { + return type; + } + + public void setType(@javax.annotation.Nullable TypeEnum type) { + this.type = type; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key name of the property + * @param value value of the property + * @return the MetadataInput instance itself + */ + public MetadataInput putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return a map of objects + */ + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key name of the property + * @return an object + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + MetadataInput metadataInput = (MetadataInput) o; + return Objects.equals(this.identifier, metadataInput.identifier) + && Objects.equals(this.type, metadataInput.type) + && Objects.equals(this.additionalProperties, metadataInput.additionalProperties); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b + || (a != null + && b != null + && a.isPresent() + && b.isPresent() + && Objects.deepEquals(a.get(), b.get())); + } + + @Override + public int hashCode() { + return Objects.hash(identifier, type, additionalProperties); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; + } + return a.isPresent() ? Arrays.deepHashCode(new Object[] {a.get()}) : 31; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class MetadataInput {\n"); + sb.append(" identifier: ").append(toIndentedString(identifier)).append("\n"); + sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first + * line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("identifier"); + openapiFields.add("type"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to MetadataInput + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!MetadataInput.openapiRequiredFields + .isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException( + String.format( + "The required field(s) %s in MetadataInput is not found in the" + + " empty JSON string", + MetadataInput.openapiRequiredFields.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if ((jsonObj.get("identifier") != null && !jsonObj.get("identifier").isJsonNull()) + && !jsonObj.get("identifier").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `identifier` to be a primitive type in the JSON" + + " string but got `%s`", + jsonObj.get("identifier").toString())); + } + if ((jsonObj.get("type") != null && !jsonObj.get("type").isJsonNull()) + && !jsonObj.get("type").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `type` to be a primitive type in the JSON string" + + " but got `%s`", + jsonObj.get("type").toString())); + } + // validate the optional field `type` + if (jsonObj.get("type") != null && !jsonObj.get("type").isJsonNull()) { + TypeEnum.validateJsonElement(jsonObj.get("type")); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!MetadataInput.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'MetadataInput' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter = + gson.getDelegateAdapter(this, TypeToken.get(MetadataInput.class)); + + return (TypeAdapter) + new TypeAdapter() { + @Override + public void write(JsonWriter out, MetadataInput value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + obj.remove("additionalProperties"); + // serialize additional properties + if (value.getAdditionalProperties() != null) { + for (Map.Entry entry : + value.getAdditionalProperties().entrySet()) { + if (entry.getValue() instanceof String) + obj.addProperty(entry.getKey(), (String) entry.getValue()); + else if (entry.getValue() instanceof Number) + obj.addProperty(entry.getKey(), (Number) entry.getValue()); + else if (entry.getValue() instanceof Boolean) + obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); + else if (entry.getValue() instanceof Character) + obj.addProperty( + entry.getKey(), (Character) entry.getValue()); + else { + JsonElement jsonElement = gson.toJsonTree(entry.getValue()); + if (jsonElement.isJsonArray()) { + obj.add(entry.getKey(), jsonElement.getAsJsonArray()); + } else { + obj.add(entry.getKey(), jsonElement.getAsJsonObject()); + } + } + } + } + elementAdapter.write(out, obj); + } + + @Override + public MetadataInput read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // store additional fields in the deserialized instance + MetadataInput instance = thisAdapter.fromJsonTree(jsonObj); + for (Map.Entry entry : jsonObj.entrySet()) { + if (!openapiFields.contains(entry.getKey())) { + if (entry.getValue().isJsonPrimitive()) { // primitive type + if (entry.getValue().getAsJsonPrimitive().isString()) + instance.putAdditionalProperty( + entry.getKey(), entry.getValue().getAsString()); + else if (entry.getValue().getAsJsonPrimitive().isNumber()) + instance.putAdditionalProperty( + entry.getKey(), entry.getValue().getAsNumber()); + else if (entry.getValue().getAsJsonPrimitive().isBoolean()) + instance.putAdditionalProperty( + entry.getKey(), + entry.getValue().getAsBoolean()); + else + throw new IllegalArgumentException( + String.format( + "The field `%s` has unknown primitive" + + " type. Value: %s", + entry.getKey(), + entry.getValue().toString())); + } else if (entry.getValue().isJsonArray()) { + instance.putAdditionalProperty( + entry.getKey(), + gson.fromJson(entry.getValue(), List.class)); + } else { // JSON object + instance.putAdditionalProperty( + entry.getKey(), + gson.fromJson(entry.getValue(), HashMap.class)); + } + } + } + return instance; + } + }.nullSafe(); + } + } + + /** + * Create an instance of MetadataInput given an JSON string + * + * @param jsonString JSON string + * @return An instance of MetadataInput + * @throws IOException if the JSON string is invalid with respect to MetadataInput + */ + public static MetadataInput fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, MetadataInput.class); + } + + /** + * Convert an instance of MetadataInput to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} diff --git a/sdks/java/src/main/java/com/thoughtspot/client/model/MetadataListItemInput.java b/sdks/java/src/main/java/com/thoughtspot/client/model/MetadataListItemInput.java new file mode 100644 index 000000000..8029d6385 --- /dev/null +++ b/sdks/java/src/main/java/com/thoughtspot/client/model/MetadataListItemInput.java @@ -0,0 +1,614 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client.model; + +import com.google.gson.Gson; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.TypeAdapter; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.reflect.TypeToken; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import com.thoughtspot.client.JSON; +import java.io.IOException; +import java.io.Serializable; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Objects; +import org.openapitools.jackson.nullable.JsonNullable; + +/** MetadataListItemInput */ +@javax.annotation.Generated( + value = "org.openapitools.codegen.languages.JavaClientCodegen", + comments = "Generator version: 7.12.0") +public class MetadataListItemInput implements Serializable { + private static final long serialVersionUID = 1L; + + public static final String SERIALIZED_NAME_IDENTIFIER = "identifier"; + + @SerializedName(SERIALIZED_NAME_IDENTIFIER) + @javax.annotation.Nullable + private String identifier; + + public static final String SERIALIZED_NAME_OBJ_IDENTIFIER = "obj_identifier"; + + @SerializedName(SERIALIZED_NAME_OBJ_IDENTIFIER) + @javax.annotation.Nullable + private String objIdentifier; + + public static final String SERIALIZED_NAME_NAME_PATTERN = "name_pattern"; + + @SerializedName(SERIALIZED_NAME_NAME_PATTERN) + @javax.annotation.Nullable + private String namePattern; + + /** + * Type of metadata. Required if the name of the object is set as identifier. This attribute is + * optional when the object GUID is specified as identifier. 1. Liveboard 2. Answers 3. + * LOGICAL_TABLE for any data object such as table, worksheet or view. 4. LOGICAL_COLUMN for a + * column of any data object such as table, worksheet or view. 5. CONNECTION for creating or + * modify data connections. 6. TAG for tag objects. 7. USER for user objects. 8. USER_GROUP for + * group objects. 9. LOGICAL_RELATIONSHIP for table or worksheet joins. A join combines from one + * or several data object by using matching values 10. INSIGHT_SPEC for SpotIQ objects + */ + @JsonAdapter(TypeEnum.Adapter.class) + public enum TypeEnum { + LIVEBOARD("LIVEBOARD"), + + ANSWER("ANSWER"), + + LOGICAL_TABLE("LOGICAL_TABLE"), + + LOGICAL_COLUMN("LOGICAL_COLUMN"), + + CONNECTION("CONNECTION"), + + TAG("TAG"), + + USER("USER"), + + USER_GROUP("USER_GROUP"), + + LOGICAL_RELATIONSHIP("LOGICAL_RELATIONSHIP"), + + INSIGHT_SPEC("INSIGHT_SPEC"); + + private String value; + + TypeEnum(String value) { + this.value = value; + } + + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + public static TypeEnum fromValue(String value) { + for (TypeEnum b : TypeEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + return null; + } + + public static class Adapter extends TypeAdapter { + @Override + public void write(final JsonWriter jsonWriter, final TypeEnum enumeration) + throws IOException { + jsonWriter.value(enumeration.getValue()); + } + + @Override + public TypeEnum read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + return TypeEnum.fromValue(value); + } + } + + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + String value = jsonElement.getAsString(); + TypeEnum.fromValue(value); + } + } + + public static final String SERIALIZED_NAME_TYPE = "type"; + + @SerializedName(SERIALIZED_NAME_TYPE) + @javax.annotation.Nullable + private TypeEnum type; + + /** Gets or Sets subtypes */ + @JsonAdapter(SubtypesEnum.Adapter.class) + public enum SubtypesEnum { + ONE_TO_ONE_LOGICAL("ONE_TO_ONE_LOGICAL"), + + WORKSHEET("WORKSHEET"), + + PRIVATE_WORKSHEET("PRIVATE_WORKSHEET"), + + USER_DEFINED("USER_DEFINED"), + + AGGR_WORKSHEET("AGGR_WORKSHEET"), + + SQL_VIEW("SQL_VIEW"); + + private String value; + + SubtypesEnum(String value) { + this.value = value; + } + + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + public static SubtypesEnum fromValue(String value) { + for (SubtypesEnum b : SubtypesEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + + public static class Adapter extends TypeAdapter { + @Override + public void write(final JsonWriter jsonWriter, final SubtypesEnum enumeration) + throws IOException { + jsonWriter.value(enumeration.getValue()); + } + + @Override + public SubtypesEnum read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + return SubtypesEnum.fromValue(value); + } + } + + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + String value = jsonElement.getAsString(); + SubtypesEnum.fromValue(value); + } + } + + public static final String SERIALIZED_NAME_SUBTYPES = "subtypes"; + + @SerializedName(SERIALIZED_NAME_SUBTYPES) + @javax.annotation.Nullable + private List subtypes; + + public MetadataListItemInput() {} + + public MetadataListItemInput identifier(@javax.annotation.Nullable String identifier) { + this.identifier = identifier; + return this; + } + + /** + * Unique ID or name of the metadata. + * + * @return identifier + */ + @javax.annotation.Nullable + public String getIdentifier() { + return identifier; + } + + public void setIdentifier(@javax.annotation.Nullable String identifier) { + this.identifier = identifier; + } + + public MetadataListItemInput objIdentifier(@javax.annotation.Nullable String objIdentifier) { + this.objIdentifier = objIdentifier; + return this; + } + + /** + * CustomObjectId of the metadata. + * + * @return objIdentifier + */ + @javax.annotation.Nullable + public String getObjIdentifier() { + return objIdentifier; + } + + public void setObjIdentifier(@javax.annotation.Nullable String objIdentifier) { + this.objIdentifier = objIdentifier; + } + + public MetadataListItemInput namePattern(@javax.annotation.Nullable String namePattern) { + this.namePattern = namePattern; + return this; + } + + /** + * A pattern to match the case-insensitive name of the metadata object. User % for a wildcard + * match. + * + * @return namePattern + */ + @javax.annotation.Nullable + public String getNamePattern() { + return namePattern; + } + + public void setNamePattern(@javax.annotation.Nullable String namePattern) { + this.namePattern = namePattern; + } + + public MetadataListItemInput type(@javax.annotation.Nullable TypeEnum type) { + this.type = type; + return this; + } + + /** + * Type of metadata. Required if the name of the object is set as identifier. This attribute is + * optional when the object GUID is specified as identifier. 1. Liveboard 2. Answers 3. + * LOGICAL_TABLE for any data object such as table, worksheet or view. 4. LOGICAL_COLUMN for a + * column of any data object such as table, worksheet or view. 5. CONNECTION for creating or + * modify data connections. 6. TAG for tag objects. 7. USER for user objects. 8. USER_GROUP for + * group objects. 9. LOGICAL_RELATIONSHIP for table or worksheet joins. A join combines from one + * or several data object by using matching values 10. INSIGHT_SPEC for SpotIQ objects + * + * @return type + */ + @javax.annotation.Nullable + public TypeEnum getType() { + return type; + } + + public void setType(@javax.annotation.Nullable TypeEnum type) { + this.type = type; + } + + public MetadataListItemInput subtypes(@javax.annotation.Nullable List subtypes) { + this.subtypes = subtypes; + return this; + } + + public MetadataListItemInput addSubtypesItem(SubtypesEnum subtypesItem) { + if (this.subtypes == null) { + this.subtypes = new ArrayList<>(); + } + this.subtypes.add(subtypesItem); + return this; + } + + /** + * List of subtype of metadata. Applies for LOGICAL_TABLE type with the following valid values. + * 1. ONE_TO_ONE_LOGICAL 2. WORKSHEET 3. PRIVATE_WORKSHEET. 4. USER_DEFINED. 5. AGGR_WORKSHEET. + * 6. SQL_VIEW Version: 10.11.0.cl or later + * + * @return subtypes + */ + @javax.annotation.Nullable + public List getSubtypes() { + return subtypes; + } + + public void setSubtypes(@javax.annotation.Nullable List subtypes) { + this.subtypes = subtypes; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key name of the property + * @param value value of the property + * @return the MetadataListItemInput instance itself + */ + public MetadataListItemInput putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return a map of objects + */ + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key name of the property + * @return an object + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + MetadataListItemInput metadataListItemInput = (MetadataListItemInput) o; + return Objects.equals(this.identifier, metadataListItemInput.identifier) + && Objects.equals(this.objIdentifier, metadataListItemInput.objIdentifier) + && Objects.equals(this.namePattern, metadataListItemInput.namePattern) + && Objects.equals(this.type, metadataListItemInput.type) + && Objects.equals(this.subtypes, metadataListItemInput.subtypes) + && Objects.equals( + this.additionalProperties, metadataListItemInput.additionalProperties); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b + || (a != null + && b != null + && a.isPresent() + && b.isPresent() + && Objects.deepEquals(a.get(), b.get())); + } + + @Override + public int hashCode() { + return Objects.hash( + identifier, objIdentifier, namePattern, type, subtypes, additionalProperties); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; + } + return a.isPresent() ? Arrays.deepHashCode(new Object[] {a.get()}) : 31; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class MetadataListItemInput {\n"); + sb.append(" identifier: ").append(toIndentedString(identifier)).append("\n"); + sb.append(" objIdentifier: ").append(toIndentedString(objIdentifier)).append("\n"); + sb.append(" namePattern: ").append(toIndentedString(namePattern)).append("\n"); + sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append(" subtypes: ").append(toIndentedString(subtypes)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first + * line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("identifier"); + openapiFields.add("obj_identifier"); + openapiFields.add("name_pattern"); + openapiFields.add("type"); + openapiFields.add("subtypes"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to MetadataListItemInput + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!MetadataListItemInput.openapiRequiredFields + .isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException( + String.format( + "The required field(s) %s in MetadataListItemInput is not found in" + + " the empty JSON string", + MetadataListItemInput.openapiRequiredFields.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if ((jsonObj.get("identifier") != null && !jsonObj.get("identifier").isJsonNull()) + && !jsonObj.get("identifier").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `identifier` to be a primitive type in the JSON" + + " string but got `%s`", + jsonObj.get("identifier").toString())); + } + if ((jsonObj.get("obj_identifier") != null && !jsonObj.get("obj_identifier").isJsonNull()) + && !jsonObj.get("obj_identifier").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `obj_identifier` to be a primitive type in the" + + " JSON string but got `%s`", + jsonObj.get("obj_identifier").toString())); + } + if ((jsonObj.get("name_pattern") != null && !jsonObj.get("name_pattern").isJsonNull()) + && !jsonObj.get("name_pattern").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `name_pattern` to be a primitive type in the JSON" + + " string but got `%s`", + jsonObj.get("name_pattern").toString())); + } + if ((jsonObj.get("type") != null && !jsonObj.get("type").isJsonNull()) + && !jsonObj.get("type").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `type` to be a primitive type in the JSON string" + + " but got `%s`", + jsonObj.get("type").toString())); + } + // validate the optional field `type` + if (jsonObj.get("type") != null && !jsonObj.get("type").isJsonNull()) { + TypeEnum.validateJsonElement(jsonObj.get("type")); + } + // ensure the optional json data is an array if present + if (jsonObj.get("subtypes") != null + && !jsonObj.get("subtypes").isJsonNull() + && !jsonObj.get("subtypes").isJsonArray()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `subtypes` to be an array in the JSON string but" + + " got `%s`", + jsonObj.get("subtypes").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!MetadataListItemInput.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'MetadataListItemInput' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter = + gson.getDelegateAdapter(this, TypeToken.get(MetadataListItemInput.class)); + + return (TypeAdapter) + new TypeAdapter() { + @Override + public void write(JsonWriter out, MetadataListItemInput value) + throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + obj.remove("additionalProperties"); + // serialize additional properties + if (value.getAdditionalProperties() != null) { + for (Map.Entry entry : + value.getAdditionalProperties().entrySet()) { + if (entry.getValue() instanceof String) + obj.addProperty(entry.getKey(), (String) entry.getValue()); + else if (entry.getValue() instanceof Number) + obj.addProperty(entry.getKey(), (Number) entry.getValue()); + else if (entry.getValue() instanceof Boolean) + obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); + else if (entry.getValue() instanceof Character) + obj.addProperty( + entry.getKey(), (Character) entry.getValue()); + else { + JsonElement jsonElement = gson.toJsonTree(entry.getValue()); + if (jsonElement.isJsonArray()) { + obj.add(entry.getKey(), jsonElement.getAsJsonArray()); + } else { + obj.add(entry.getKey(), jsonElement.getAsJsonObject()); + } + } + } + } + elementAdapter.write(out, obj); + } + + @Override + public MetadataListItemInput read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // store additional fields in the deserialized instance + MetadataListItemInput instance = thisAdapter.fromJsonTree(jsonObj); + for (Map.Entry entry : jsonObj.entrySet()) { + if (!openapiFields.contains(entry.getKey())) { + if (entry.getValue().isJsonPrimitive()) { // primitive type + if (entry.getValue().getAsJsonPrimitive().isString()) + instance.putAdditionalProperty( + entry.getKey(), entry.getValue().getAsString()); + else if (entry.getValue().getAsJsonPrimitive().isNumber()) + instance.putAdditionalProperty( + entry.getKey(), entry.getValue().getAsNumber()); + else if (entry.getValue().getAsJsonPrimitive().isBoolean()) + instance.putAdditionalProperty( + entry.getKey(), + entry.getValue().getAsBoolean()); + else + throw new IllegalArgumentException( + String.format( + "The field `%s` has unknown primitive" + + " type. Value: %s", + entry.getKey(), + entry.getValue().toString())); + } else if (entry.getValue().isJsonArray()) { + instance.putAdditionalProperty( + entry.getKey(), + gson.fromJson(entry.getValue(), List.class)); + } else { // JSON object + instance.putAdditionalProperty( + entry.getKey(), + gson.fromJson(entry.getValue(), HashMap.class)); + } + } + } + return instance; + } + }.nullSafe(); + } + } + + /** + * Create an instance of MetadataListItemInput given an JSON string + * + * @param jsonString JSON string + * @return An instance of MetadataListItemInput + * @throws IOException if the JSON string is invalid with respect to MetadataListItemInput + */ + public static MetadataListItemInput fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, MetadataListItemInput.class); + } + + /** + * Convert an instance of MetadataListItemInput to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} diff --git a/sdks/java/src/main/java/com/thoughtspot/client/model/MetadataObject.java b/sdks/java/src/main/java/com/thoughtspot/client/model/MetadataObject.java new file mode 100644 index 000000000..5cd11086b --- /dev/null +++ b/sdks/java/src/main/java/com/thoughtspot/client/model/MetadataObject.java @@ -0,0 +1,418 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client.model; + +import com.google.gson.Gson; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.TypeAdapter; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.reflect.TypeToken; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import com.thoughtspot.client.JSON; +import java.io.IOException; +import java.io.Serializable; +import java.util.Arrays; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Objects; +import org.openapitools.jackson.nullable.JsonNullable; + +/** MetadataObject */ +@javax.annotation.Generated( + value = "org.openapitools.codegen.languages.JavaClientCodegen", + comments = "Generator version: 7.12.0") +public class MetadataObject implements Serializable { + private static final long serialVersionUID = 1L; + + public static final String SERIALIZED_NAME_IDENTIFIER = "identifier"; + + @SerializedName(SERIALIZED_NAME_IDENTIFIER) + @javax.annotation.Nonnull + private String identifier; + + /** + * Type of metadata. Required if the name of the object is set as the identifier. This attribute + * is optional when the object GUID is specified as the identifier. + */ + @JsonAdapter(TypeEnum.Adapter.class) + public enum TypeEnum { + LIVEBOARD("LIVEBOARD"), + + ANSWER("ANSWER"), + + LOGICAL_TABLE("LOGICAL_TABLE"), + + CUSTOM_ACTION("CUSTOM_ACTION"); + + private String value; + + TypeEnum(String value) { + this.value = value; + } + + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + public static TypeEnum fromValue(String value) { + for (TypeEnum b : TypeEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + return null; + } + + public static class Adapter extends TypeAdapter { + @Override + public void write(final JsonWriter jsonWriter, final TypeEnum enumeration) + throws IOException { + jsonWriter.value(enumeration.getValue()); + } + + @Override + public TypeEnum read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + return TypeEnum.fromValue(value); + } + } + + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + String value = jsonElement.getAsString(); + TypeEnum.fromValue(value); + } + } + + public static final String SERIALIZED_NAME_TYPE = "type"; + + @SerializedName(SERIALIZED_NAME_TYPE) + @javax.annotation.Nullable + private TypeEnum type; + + public MetadataObject() {} + + public MetadataObject identifier(@javax.annotation.Nonnull String identifier) { + this.identifier = identifier; + return this; + } + + /** + * Unique ID or name of the metadata + * + * @return identifier + */ + @javax.annotation.Nonnull + public String getIdentifier() { + return identifier; + } + + public void setIdentifier(@javax.annotation.Nonnull String identifier) { + this.identifier = identifier; + } + + public MetadataObject type(@javax.annotation.Nullable TypeEnum type) { + this.type = type; + return this; + } + + /** + * Type of metadata. Required if the name of the object is set as the identifier. This attribute + * is optional when the object GUID is specified as the identifier. + * + * @return type + */ + @javax.annotation.Nullable + public TypeEnum getType() { + return type; + } + + public void setType(@javax.annotation.Nullable TypeEnum type) { + this.type = type; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key name of the property + * @param value value of the property + * @return the MetadataObject instance itself + */ + public MetadataObject putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return a map of objects + */ + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key name of the property + * @return an object + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + MetadataObject metadataObject = (MetadataObject) o; + return Objects.equals(this.identifier, metadataObject.identifier) + && Objects.equals(this.type, metadataObject.type) + && Objects.equals(this.additionalProperties, metadataObject.additionalProperties); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b + || (a != null + && b != null + && a.isPresent() + && b.isPresent() + && Objects.deepEquals(a.get(), b.get())); + } + + @Override + public int hashCode() { + return Objects.hash(identifier, type, additionalProperties); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; + } + return a.isPresent() ? Arrays.deepHashCode(new Object[] {a.get()}) : 31; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class MetadataObject {\n"); + sb.append(" identifier: ").append(toIndentedString(identifier)).append("\n"); + sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first + * line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("identifier"); + openapiFields.add("type"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + openapiRequiredFields.add("identifier"); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to MetadataObject + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!MetadataObject.openapiRequiredFields + .isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException( + String.format( + "The required field(s) %s in MetadataObject is not found in the" + + " empty JSON string", + MetadataObject.openapiRequiredFields.toString())); + } + } + + // check to make sure all required properties/fields are present in the JSON string + for (String requiredField : MetadataObject.openapiRequiredFields) { + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException( + String.format( + "The required field `%s` is not found in the JSON string: %s", + requiredField, jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if (!jsonObj.get("identifier").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `identifier` to be a primitive type in the JSON" + + " string but got `%s`", + jsonObj.get("identifier").toString())); + } + if ((jsonObj.get("type") != null && !jsonObj.get("type").isJsonNull()) + && !jsonObj.get("type").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `type` to be a primitive type in the JSON string" + + " but got `%s`", + jsonObj.get("type").toString())); + } + // validate the optional field `type` + if (jsonObj.get("type") != null && !jsonObj.get("type").isJsonNull()) { + TypeEnum.validateJsonElement(jsonObj.get("type")); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!MetadataObject.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'MetadataObject' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter = + gson.getDelegateAdapter(this, TypeToken.get(MetadataObject.class)); + + return (TypeAdapter) + new TypeAdapter() { + @Override + public void write(JsonWriter out, MetadataObject value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + obj.remove("additionalProperties"); + // serialize additional properties + if (value.getAdditionalProperties() != null) { + for (Map.Entry entry : + value.getAdditionalProperties().entrySet()) { + if (entry.getValue() instanceof String) + obj.addProperty(entry.getKey(), (String) entry.getValue()); + else if (entry.getValue() instanceof Number) + obj.addProperty(entry.getKey(), (Number) entry.getValue()); + else if (entry.getValue() instanceof Boolean) + obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); + else if (entry.getValue() instanceof Character) + obj.addProperty( + entry.getKey(), (Character) entry.getValue()); + else { + JsonElement jsonElement = gson.toJsonTree(entry.getValue()); + if (jsonElement.isJsonArray()) { + obj.add(entry.getKey(), jsonElement.getAsJsonArray()); + } else { + obj.add(entry.getKey(), jsonElement.getAsJsonObject()); + } + } + } + } + elementAdapter.write(out, obj); + } + + @Override + public MetadataObject read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // store additional fields in the deserialized instance + MetadataObject instance = thisAdapter.fromJsonTree(jsonObj); + for (Map.Entry entry : jsonObj.entrySet()) { + if (!openapiFields.contains(entry.getKey())) { + if (entry.getValue().isJsonPrimitive()) { // primitive type + if (entry.getValue().getAsJsonPrimitive().isString()) + instance.putAdditionalProperty( + entry.getKey(), entry.getValue().getAsString()); + else if (entry.getValue().getAsJsonPrimitive().isNumber()) + instance.putAdditionalProperty( + entry.getKey(), entry.getValue().getAsNumber()); + else if (entry.getValue().getAsJsonPrimitive().isBoolean()) + instance.putAdditionalProperty( + entry.getKey(), + entry.getValue().getAsBoolean()); + else + throw new IllegalArgumentException( + String.format( + "The field `%s` has unknown primitive" + + " type. Value: %s", + entry.getKey(), + entry.getValue().toString())); + } else if (entry.getValue().isJsonArray()) { + instance.putAdditionalProperty( + entry.getKey(), + gson.fromJson(entry.getValue(), List.class)); + } else { // JSON object + instance.putAdditionalProperty( + entry.getKey(), + gson.fromJson(entry.getValue(), HashMap.class)); + } + } + } + return instance; + } + }.nullSafe(); + } + } + + /** + * Create an instance of MetadataObject given an JSON string + * + * @param jsonString JSON string + * @return An instance of MetadataObject + * @throws IOException if the JSON string is invalid with respect to MetadataObject + */ + public static MetadataObject fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, MetadataObject.class); + } + + /** + * Convert an instance of MetadataObject to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} diff --git a/sdks/java/src/main/java/com/thoughtspot/client/model/MetadataResponse.java b/sdks/java/src/main/java/com/thoughtspot/client/model/MetadataResponse.java new file mode 100644 index 000000000..8359de672 --- /dev/null +++ b/sdks/java/src/main/java/com/thoughtspot/client/model/MetadataResponse.java @@ -0,0 +1,443 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client.model; + +import com.google.gson.Gson; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.TypeAdapter; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.reflect.TypeToken; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import com.thoughtspot.client.JSON; +import java.io.IOException; +import java.io.Serializable; +import java.util.Arrays; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Objects; +import org.openapitools.jackson.nullable.JsonNullable; + +/** MetadataResponse */ +@javax.annotation.Generated( + value = "org.openapitools.codegen.languages.JavaClientCodegen", + comments = "Generator version: 7.12.0") +public class MetadataResponse implements Serializable { + private static final long serialVersionUID = 1L; + + public static final String SERIALIZED_NAME_NAME = "name"; + + @SerializedName(SERIALIZED_NAME_NAME) + @javax.annotation.Nullable + private String name; + + public static final String SERIALIZED_NAME_ID = "id"; + + @SerializedName(SERIALIZED_NAME_ID) + @javax.annotation.Nonnull + private String id; + + /** Gets or Sets type */ + @JsonAdapter(TypeEnum.Adapter.class) + public enum TypeEnum { + LIVEBOARD("LIVEBOARD"); + + private String value; + + TypeEnum(String value) { + this.value = value; + } + + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + public static TypeEnum fromValue(String value) { + for (TypeEnum b : TypeEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + + public static class Adapter extends TypeAdapter { + @Override + public void write(final JsonWriter jsonWriter, final TypeEnum enumeration) + throws IOException { + jsonWriter.value(enumeration.getValue()); + } + + @Override + public TypeEnum read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + return TypeEnum.fromValue(value); + } + } + + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + String value = jsonElement.getAsString(); + TypeEnum.fromValue(value); + } + } + + public static final String SERIALIZED_NAME_TYPE = "type"; + + @SerializedName(SERIALIZED_NAME_TYPE) + @javax.annotation.Nonnull + private TypeEnum type; + + public MetadataResponse() {} + + public MetadataResponse name(@javax.annotation.Nullable String name) { + this.name = name; + return this; + } + + /** + * Get name + * + * @return name + */ + @javax.annotation.Nullable + public String getName() { + return name; + } + + public void setName(@javax.annotation.Nullable String name) { + this.name = name; + } + + public MetadataResponse id(@javax.annotation.Nonnull String id) { + this.id = id; + return this; + } + + /** + * Get id + * + * @return id + */ + @javax.annotation.Nonnull + public String getId() { + return id; + } + + public void setId(@javax.annotation.Nonnull String id) { + this.id = id; + } + + public MetadataResponse type(@javax.annotation.Nonnull TypeEnum type) { + this.type = type; + return this; + } + + /** + * Get type + * + * @return type + */ + @javax.annotation.Nonnull + public TypeEnum getType() { + return type; + } + + public void setType(@javax.annotation.Nonnull TypeEnum type) { + this.type = type; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key name of the property + * @param value value of the property + * @return the MetadataResponse instance itself + */ + public MetadataResponse putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return a map of objects + */ + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key name of the property + * @return an object + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + MetadataResponse metadataResponse = (MetadataResponse) o; + return Objects.equals(this.name, metadataResponse.name) + && Objects.equals(this.id, metadataResponse.id) + && Objects.equals(this.type, metadataResponse.type) + && Objects.equals(this.additionalProperties, metadataResponse.additionalProperties); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b + || (a != null + && b != null + && a.isPresent() + && b.isPresent() + && Objects.deepEquals(a.get(), b.get())); + } + + @Override + public int hashCode() { + return Objects.hash(name, id, type, additionalProperties); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; + } + return a.isPresent() ? Arrays.deepHashCode(new Object[] {a.get()}) : 31; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class MetadataResponse {\n"); + sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first + * line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("name"); + openapiFields.add("id"); + openapiFields.add("type"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + openapiRequiredFields.add("id"); + openapiRequiredFields.add("type"); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to MetadataResponse + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!MetadataResponse.openapiRequiredFields + .isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException( + String.format( + "The required field(s) %s in MetadataResponse is not found in the" + + " empty JSON string", + MetadataResponse.openapiRequiredFields.toString())); + } + } + + // check to make sure all required properties/fields are present in the JSON string + for (String requiredField : MetadataResponse.openapiRequiredFields) { + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException( + String.format( + "The required field `%s` is not found in the JSON string: %s", + requiredField, jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if ((jsonObj.get("name") != null && !jsonObj.get("name").isJsonNull()) + && !jsonObj.get("name").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `name` to be a primitive type in the JSON string" + + " but got `%s`", + jsonObj.get("name").toString())); + } + if (!jsonObj.get("id").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `id` to be a primitive type in the JSON string but" + + " got `%s`", + jsonObj.get("id").toString())); + } + if (!jsonObj.get("type").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `type` to be a primitive type in the JSON string" + + " but got `%s`", + jsonObj.get("type").toString())); + } + // validate the required field `type` + TypeEnum.validateJsonElement(jsonObj.get("type")); + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!MetadataResponse.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'MetadataResponse' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter = + gson.getDelegateAdapter(this, TypeToken.get(MetadataResponse.class)); + + return (TypeAdapter) + new TypeAdapter() { + @Override + public void write(JsonWriter out, MetadataResponse value) + throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + obj.remove("additionalProperties"); + // serialize additional properties + if (value.getAdditionalProperties() != null) { + for (Map.Entry entry : + value.getAdditionalProperties().entrySet()) { + if (entry.getValue() instanceof String) + obj.addProperty(entry.getKey(), (String) entry.getValue()); + else if (entry.getValue() instanceof Number) + obj.addProperty(entry.getKey(), (Number) entry.getValue()); + else if (entry.getValue() instanceof Boolean) + obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); + else if (entry.getValue() instanceof Character) + obj.addProperty( + entry.getKey(), (Character) entry.getValue()); + else { + JsonElement jsonElement = gson.toJsonTree(entry.getValue()); + if (jsonElement.isJsonArray()) { + obj.add(entry.getKey(), jsonElement.getAsJsonArray()); + } else { + obj.add(entry.getKey(), jsonElement.getAsJsonObject()); + } + } + } + } + elementAdapter.write(out, obj); + } + + @Override + public MetadataResponse read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // store additional fields in the deserialized instance + MetadataResponse instance = thisAdapter.fromJsonTree(jsonObj); + for (Map.Entry entry : jsonObj.entrySet()) { + if (!openapiFields.contains(entry.getKey())) { + if (entry.getValue().isJsonPrimitive()) { // primitive type + if (entry.getValue().getAsJsonPrimitive().isString()) + instance.putAdditionalProperty( + entry.getKey(), entry.getValue().getAsString()); + else if (entry.getValue().getAsJsonPrimitive().isNumber()) + instance.putAdditionalProperty( + entry.getKey(), entry.getValue().getAsNumber()); + else if (entry.getValue().getAsJsonPrimitive().isBoolean()) + instance.putAdditionalProperty( + entry.getKey(), + entry.getValue().getAsBoolean()); + else + throw new IllegalArgumentException( + String.format( + "The field `%s` has unknown primitive" + + " type. Value: %s", + entry.getKey(), + entry.getValue().toString())); + } else if (entry.getValue().isJsonArray()) { + instance.putAdditionalProperty( + entry.getKey(), + gson.fromJson(entry.getValue(), List.class)); + } else { // JSON object + instance.putAdditionalProperty( + entry.getKey(), + gson.fromJson(entry.getValue(), HashMap.class)); + } + } + } + return instance; + } + }.nullSafe(); + } + } + + /** + * Create an instance of MetadataResponse given an JSON string + * + * @param jsonString JSON string + * @return An instance of MetadataResponse + * @throws IOException if the JSON string is invalid with respect to MetadataResponse + */ + public static MetadataResponse fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, MetadataResponse.class); + } + + /** + * Convert an instance of MetadataResponse to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} diff --git a/sdks/java/src/main/java/com/thoughtspot/client/model/MetadataSearchResponse.java b/sdks/java/src/main/java/com/thoughtspot/client/model/MetadataSearchResponse.java new file mode 100644 index 000000000..e179cecd7 --- /dev/null +++ b/sdks/java/src/main/java/com/thoughtspot/client/model/MetadataSearchResponse.java @@ -0,0 +1,724 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client.model; + +import com.google.gson.Gson; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.TypeAdapter; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.reflect.TypeToken; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import com.thoughtspot.client.JSON; +import java.io.IOException; +import java.io.Serializable; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Objects; +import org.openapitools.jackson.nullable.JsonNullable; + +/** Metadata Search Response Object. */ +@javax.annotation.Generated( + value = "org.openapitools.codegen.languages.JavaClientCodegen", + comments = "Generator version: 7.12.0") +public class MetadataSearchResponse implements Serializable { + private static final long serialVersionUID = 1L; + + public static final String SERIALIZED_NAME_METADATA_ID = "metadata_id"; + + @SerializedName(SERIALIZED_NAME_METADATA_ID) + @javax.annotation.Nullable + private String metadataId; + + public static final String SERIALIZED_NAME_METADATA_NAME = "metadata_name"; + + @SerializedName(SERIALIZED_NAME_METADATA_NAME) + @javax.annotation.Nullable + private String metadataName; + + /** Type of the metadata. */ + @JsonAdapter(MetadataTypeEnum.Adapter.class) + public enum MetadataTypeEnum { + LIVEBOARD("LIVEBOARD"), + + ANSWER("ANSWER"), + + LOGICAL_TABLE("LOGICAL_TABLE"), + + LOGICAL_COLUMN("LOGICAL_COLUMN"), + + CONNECTION("CONNECTION"), + + TAG("TAG"), + + USER("USER"), + + USER_GROUP("USER_GROUP"), + + LOGICAL_RELATIONSHIP("LOGICAL_RELATIONSHIP"), + + INSIGHT_SPEC("INSIGHT_SPEC"); + + private String value; + + MetadataTypeEnum(String value) { + this.value = value; + } + + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + public static MetadataTypeEnum fromValue(String value) { + for (MetadataTypeEnum b : MetadataTypeEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + + public static class Adapter extends TypeAdapter { + @Override + public void write(final JsonWriter jsonWriter, final MetadataTypeEnum enumeration) + throws IOException { + jsonWriter.value(enumeration.getValue()); + } + + @Override + public MetadataTypeEnum read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + return MetadataTypeEnum.fromValue(value); + } + } + + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + String value = jsonElement.getAsString(); + MetadataTypeEnum.fromValue(value); + } + } + + public static final String SERIALIZED_NAME_METADATA_TYPE = "metadata_type"; + + @SerializedName(SERIALIZED_NAME_METADATA_TYPE) + @javax.annotation.Nonnull + private MetadataTypeEnum metadataType; + + public static final String SERIALIZED_NAME_METADATA_OBJ_ID = "metadata_obj_id"; + + @SerializedName(SERIALIZED_NAME_METADATA_OBJ_ID) + @javax.annotation.Nullable + private String metadataObjId; + + public static final String SERIALIZED_NAME_DEPENDENT_OBJECTS = "dependent_objects"; + + @SerializedName(SERIALIZED_NAME_DEPENDENT_OBJECTS) + @javax.annotation.Nullable + private Object dependentObjects; + + public static final String SERIALIZED_NAME_INCOMPLETE_OBJECTS = "incomplete_objects"; + + @SerializedName(SERIALIZED_NAME_INCOMPLETE_OBJECTS) + @javax.annotation.Nullable + private List incompleteObjects; + + public static final String SERIALIZED_NAME_METADATA_DETAIL = "metadata_detail"; + + @SerializedName(SERIALIZED_NAME_METADATA_DETAIL) + @javax.annotation.Nullable + private Object metadataDetail; + + public static final String SERIALIZED_NAME_METADATA_HEADER = "metadata_header"; + + @SerializedName(SERIALIZED_NAME_METADATA_HEADER) + @javax.annotation.Nullable + private Object metadataHeader; + + public static final String SERIALIZED_NAME_VISUALIZATION_HEADERS = "visualization_headers"; + + @SerializedName(SERIALIZED_NAME_VISUALIZATION_HEADERS) + @javax.annotation.Nullable + private List visualizationHeaders; + + public static final String SERIALIZED_NAME_STATS = "stats"; + + @SerializedName(SERIALIZED_NAME_STATS) + @javax.annotation.Nullable + private Object stats; + + public MetadataSearchResponse() {} + + public MetadataSearchResponse metadataId(@javax.annotation.Nullable String metadataId) { + this.metadataId = metadataId; + return this; + } + + /** + * Unique identifier of the metadata. + * + * @return metadataId + */ + @javax.annotation.Nullable + public String getMetadataId() { + return metadataId; + } + + public void setMetadataId(@javax.annotation.Nullable String metadataId) { + this.metadataId = metadataId; + } + + public MetadataSearchResponse metadataName(@javax.annotation.Nullable String metadataName) { + this.metadataName = metadataName; + return this; + } + + /** + * Name of the metadata. + * + * @return metadataName + */ + @javax.annotation.Nullable + public String getMetadataName() { + return metadataName; + } + + public void setMetadataName(@javax.annotation.Nullable String metadataName) { + this.metadataName = metadataName; + } + + public MetadataSearchResponse metadataType( + @javax.annotation.Nonnull MetadataTypeEnum metadataType) { + this.metadataType = metadataType; + return this; + } + + /** + * Type of the metadata. + * + * @return metadataType + */ + @javax.annotation.Nonnull + public MetadataTypeEnum getMetadataType() { + return metadataType; + } + + public void setMetadataType(@javax.annotation.Nonnull MetadataTypeEnum metadataType) { + this.metadataType = metadataType; + } + + public MetadataSearchResponse metadataObjId(@javax.annotation.Nullable String metadataObjId) { + this.metadataObjId = metadataObjId; + return this; + } + + /** + * Custom identifier of the metadata. (Available from 10.8.0.cl onwards) + * + * @return metadataObjId + */ + @javax.annotation.Nullable + public String getMetadataObjId() { + return metadataObjId; + } + + public void setMetadataObjId(@javax.annotation.Nullable String metadataObjId) { + this.metadataObjId = metadataObjId; + } + + public MetadataSearchResponse dependentObjects( + @javax.annotation.Nullable Object dependentObjects) { + this.dependentObjects = dependentObjects; + return this; + } + + /** + * Details of dependent objects of the metadata objects. + * + * @return dependentObjects + */ + @javax.annotation.Nullable + public Object getDependentObjects() { + return dependentObjects; + } + + public void setDependentObjects(@javax.annotation.Nullable Object dependentObjects) { + this.dependentObjects = dependentObjects; + } + + public MetadataSearchResponse incompleteObjects( + @javax.annotation.Nullable List incompleteObjects) { + this.incompleteObjects = incompleteObjects; + return this; + } + + public MetadataSearchResponse addIncompleteObjectsItem(Object incompleteObjectsItem) { + if (this.incompleteObjects == null) { + this.incompleteObjects = new ArrayList<>(); + } + this.incompleteObjects.add(incompleteObjectsItem); + return this; + } + + /** + * Details of incomplete information of the metadata objects if any. + * + * @return incompleteObjects + */ + @javax.annotation.Nullable + public List getIncompleteObjects() { + return incompleteObjects; + } + + public void setIncompleteObjects(@javax.annotation.Nullable List incompleteObjects) { + this.incompleteObjects = incompleteObjects; + } + + public MetadataSearchResponse metadataDetail(@javax.annotation.Nullable Object metadataDetail) { + this.metadataDetail = metadataDetail; + return this; + } + + /** + * Complete details of the metadata objects. + * + * @return metadataDetail + */ + @javax.annotation.Nullable + public Object getMetadataDetail() { + return metadataDetail; + } + + public void setMetadataDetail(@javax.annotation.Nullable Object metadataDetail) { + this.metadataDetail = metadataDetail; + } + + public MetadataSearchResponse metadataHeader(@javax.annotation.Nullable Object metadataHeader) { + this.metadataHeader = metadataHeader; + return this; + } + + /** + * Header information of the metadata objects. + * + * @return metadataHeader + */ + @javax.annotation.Nullable + public Object getMetadataHeader() { + return metadataHeader; + } + + public void setMetadataHeader(@javax.annotation.Nullable Object metadataHeader) { + this.metadataHeader = metadataHeader; + } + + public MetadataSearchResponse visualizationHeaders( + @javax.annotation.Nullable List visualizationHeaders) { + this.visualizationHeaders = visualizationHeaders; + return this; + } + + public MetadataSearchResponse addVisualizationHeadersItem(Object visualizationHeadersItem) { + if (this.visualizationHeaders == null) { + this.visualizationHeaders = new ArrayList<>(); + } + this.visualizationHeaders.add(visualizationHeadersItem); + return this; + } + + /** + * Visualization header information of the metadata objects. + * + * @return visualizationHeaders + */ + @javax.annotation.Nullable + public List getVisualizationHeaders() { + return visualizationHeaders; + } + + public void setVisualizationHeaders( + @javax.annotation.Nullable List visualizationHeaders) { + this.visualizationHeaders = visualizationHeaders; + } + + public MetadataSearchResponse stats(@javax.annotation.Nullable Object stats) { + this.stats = stats; + return this; + } + + /** + * Stats of the metadata object. Includes views, favorites, last_accessed. + * + * @return stats + */ + @javax.annotation.Nullable + public Object getStats() { + return stats; + } + + public void setStats(@javax.annotation.Nullable Object stats) { + this.stats = stats; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key name of the property + * @param value value of the property + * @return the MetadataSearchResponse instance itself + */ + public MetadataSearchResponse putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return a map of objects + */ + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key name of the property + * @return an object + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + MetadataSearchResponse metadataSearchResponse = (MetadataSearchResponse) o; + return Objects.equals(this.metadataId, metadataSearchResponse.metadataId) + && Objects.equals(this.metadataName, metadataSearchResponse.metadataName) + && Objects.equals(this.metadataType, metadataSearchResponse.metadataType) + && Objects.equals(this.metadataObjId, metadataSearchResponse.metadataObjId) + && Objects.equals(this.dependentObjects, metadataSearchResponse.dependentObjects) + && Objects.equals(this.incompleteObjects, metadataSearchResponse.incompleteObjects) + && Objects.equals(this.metadataDetail, metadataSearchResponse.metadataDetail) + && Objects.equals(this.metadataHeader, metadataSearchResponse.metadataHeader) + && Objects.equals( + this.visualizationHeaders, metadataSearchResponse.visualizationHeaders) + && Objects.equals(this.stats, metadataSearchResponse.stats) + && Objects.equals( + this.additionalProperties, metadataSearchResponse.additionalProperties); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b + || (a != null + && b != null + && a.isPresent() + && b.isPresent() + && Objects.deepEquals(a.get(), b.get())); + } + + @Override + public int hashCode() { + return Objects.hash( + metadataId, + metadataName, + metadataType, + metadataObjId, + dependentObjects, + incompleteObjects, + metadataDetail, + metadataHeader, + visualizationHeaders, + stats, + additionalProperties); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; + } + return a.isPresent() ? Arrays.deepHashCode(new Object[] {a.get()}) : 31; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class MetadataSearchResponse {\n"); + sb.append(" metadataId: ").append(toIndentedString(metadataId)).append("\n"); + sb.append(" metadataName: ").append(toIndentedString(metadataName)).append("\n"); + sb.append(" metadataType: ").append(toIndentedString(metadataType)).append("\n"); + sb.append(" metadataObjId: ").append(toIndentedString(metadataObjId)).append("\n"); + sb.append(" dependentObjects: ").append(toIndentedString(dependentObjects)).append("\n"); + sb.append(" incompleteObjects: ") + .append(toIndentedString(incompleteObjects)) + .append("\n"); + sb.append(" metadataDetail: ").append(toIndentedString(metadataDetail)).append("\n"); + sb.append(" metadataHeader: ").append(toIndentedString(metadataHeader)).append("\n"); + sb.append(" visualizationHeaders: ") + .append(toIndentedString(visualizationHeaders)) + .append("\n"); + sb.append(" stats: ").append(toIndentedString(stats)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first + * line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("metadata_id"); + openapiFields.add("metadata_name"); + openapiFields.add("metadata_type"); + openapiFields.add("metadata_obj_id"); + openapiFields.add("dependent_objects"); + openapiFields.add("incomplete_objects"); + openapiFields.add("metadata_detail"); + openapiFields.add("metadata_header"); + openapiFields.add("visualization_headers"); + openapiFields.add("stats"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + openapiRequiredFields.add("metadata_type"); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to MetadataSearchResponse + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!MetadataSearchResponse.openapiRequiredFields + .isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException( + String.format( + "The required field(s) %s in MetadataSearchResponse is not found" + + " in the empty JSON string", + MetadataSearchResponse.openapiRequiredFields.toString())); + } + } + + // check to make sure all required properties/fields are present in the JSON string + for (String requiredField : MetadataSearchResponse.openapiRequiredFields) { + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException( + String.format( + "The required field `%s` is not found in the JSON string: %s", + requiredField, jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if ((jsonObj.get("metadata_id") != null && !jsonObj.get("metadata_id").isJsonNull()) + && !jsonObj.get("metadata_id").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `metadata_id` to be a primitive type in the JSON" + + " string but got `%s`", + jsonObj.get("metadata_id").toString())); + } + if ((jsonObj.get("metadata_name") != null && !jsonObj.get("metadata_name").isJsonNull()) + && !jsonObj.get("metadata_name").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `metadata_name` to be a primitive type in the JSON" + + " string but got `%s`", + jsonObj.get("metadata_name").toString())); + } + if (!jsonObj.get("metadata_type").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `metadata_type` to be a primitive type in the JSON" + + " string but got `%s`", + jsonObj.get("metadata_type").toString())); + } + // validate the required field `metadata_type` + MetadataTypeEnum.validateJsonElement(jsonObj.get("metadata_type")); + if ((jsonObj.get("metadata_obj_id") != null && !jsonObj.get("metadata_obj_id").isJsonNull()) + && !jsonObj.get("metadata_obj_id").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `metadata_obj_id` to be a primitive type in the" + + " JSON string but got `%s`", + jsonObj.get("metadata_obj_id").toString())); + } + // ensure the optional json data is an array if present + if (jsonObj.get("incomplete_objects") != null + && !jsonObj.get("incomplete_objects").isJsonNull() + && !jsonObj.get("incomplete_objects").isJsonArray()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `incomplete_objects` to be an array in the JSON" + + " string but got `%s`", + jsonObj.get("incomplete_objects").toString())); + } + // ensure the optional json data is an array if present + if (jsonObj.get("visualization_headers") != null + && !jsonObj.get("visualization_headers").isJsonNull() + && !jsonObj.get("visualization_headers").isJsonArray()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `visualization_headers` to be an array in the JSON" + + " string but got `%s`", + jsonObj.get("visualization_headers").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!MetadataSearchResponse.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'MetadataSearchResponse' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter = + gson.getDelegateAdapter(this, TypeToken.get(MetadataSearchResponse.class)); + + return (TypeAdapter) + new TypeAdapter() { + @Override + public void write(JsonWriter out, MetadataSearchResponse value) + throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + obj.remove("additionalProperties"); + // serialize additional properties + if (value.getAdditionalProperties() != null) { + for (Map.Entry entry : + value.getAdditionalProperties().entrySet()) { + if (entry.getValue() instanceof String) + obj.addProperty(entry.getKey(), (String) entry.getValue()); + else if (entry.getValue() instanceof Number) + obj.addProperty(entry.getKey(), (Number) entry.getValue()); + else if (entry.getValue() instanceof Boolean) + obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); + else if (entry.getValue() instanceof Character) + obj.addProperty( + entry.getKey(), (Character) entry.getValue()); + else { + JsonElement jsonElement = gson.toJsonTree(entry.getValue()); + if (jsonElement.isJsonArray()) { + obj.add(entry.getKey(), jsonElement.getAsJsonArray()); + } else { + obj.add(entry.getKey(), jsonElement.getAsJsonObject()); + } + } + } + } + elementAdapter.write(out, obj); + } + + @Override + public MetadataSearchResponse read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // store additional fields in the deserialized instance + MetadataSearchResponse instance = thisAdapter.fromJsonTree(jsonObj); + for (Map.Entry entry : jsonObj.entrySet()) { + if (!openapiFields.contains(entry.getKey())) { + if (entry.getValue().isJsonPrimitive()) { // primitive type + if (entry.getValue().getAsJsonPrimitive().isString()) + instance.putAdditionalProperty( + entry.getKey(), entry.getValue().getAsString()); + else if (entry.getValue().getAsJsonPrimitive().isNumber()) + instance.putAdditionalProperty( + entry.getKey(), entry.getValue().getAsNumber()); + else if (entry.getValue().getAsJsonPrimitive().isBoolean()) + instance.putAdditionalProperty( + entry.getKey(), + entry.getValue().getAsBoolean()); + else + throw new IllegalArgumentException( + String.format( + "The field `%s` has unknown primitive" + + " type. Value: %s", + entry.getKey(), + entry.getValue().toString())); + } else if (entry.getValue().isJsonArray()) { + instance.putAdditionalProperty( + entry.getKey(), + gson.fromJson(entry.getValue(), List.class)); + } else { // JSON object + instance.putAdditionalProperty( + entry.getKey(), + gson.fromJson(entry.getValue(), HashMap.class)); + } + } + } + return instance; + } + }.nullSafe(); + } + } + + /** + * Create an instance of MetadataSearchResponse given an JSON string + * + * @param jsonString JSON string + * @return An instance of MetadataSearchResponse + * @throws IOException if the JSON string is invalid with respect to MetadataSearchResponse + */ + public static MetadataSearchResponse fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, MetadataSearchResponse.class); + } + + /** + * Convert an instance of MetadataSearchResponse to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} diff --git a/sdks/java/src/main/java/com/thoughtspot/client/model/MetadataSearchSortOptions.java b/sdks/java/src/main/java/com/thoughtspot/client/model/MetadataSearchSortOptions.java new file mode 100644 index 000000000..7eac47c78 --- /dev/null +++ b/sdks/java/src/main/java/com/thoughtspot/client/model/MetadataSearchSortOptions.java @@ -0,0 +1,470 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client.model; + +import com.google.gson.Gson; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.TypeAdapter; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.reflect.TypeToken; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import com.thoughtspot.client.JSON; +import java.io.IOException; +import java.io.Serializable; +import java.util.Arrays; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Objects; +import org.openapitools.jackson.nullable.JsonNullable; + +/** Sort options. */ +@javax.annotation.Generated( + value = "org.openapitools.codegen.languages.JavaClientCodegen", + comments = "Generator version: 7.12.0") +public class MetadataSearchSortOptions implements Serializable { + private static final long serialVersionUID = 1L; + + /** Name of the field to apply the sort on. */ + @JsonAdapter(FieldNameEnum.Adapter.class) + public enum FieldNameEnum { + NAME("NAME"), + + DISPLAY_NAME("DISPLAY_NAME"), + + AUTHOR("AUTHOR"), + + CREATED("CREATED"), + + MODIFIED("MODIFIED"), + + VIEWS("VIEWS"), + + FAVORITES("FAVORITES"), + + LAST_ACCESSED("LAST_ACCESSED"); + + private String value; + + FieldNameEnum(String value) { + this.value = value; + } + + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + public static FieldNameEnum fromValue(String value) { + for (FieldNameEnum b : FieldNameEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + return null; + } + + public static class Adapter extends TypeAdapter { + @Override + public void write(final JsonWriter jsonWriter, final FieldNameEnum enumeration) + throws IOException { + jsonWriter.value(enumeration.getValue()); + } + + @Override + public FieldNameEnum read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + return FieldNameEnum.fromValue(value); + } + } + + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + String value = jsonElement.getAsString(); + FieldNameEnum.fromValue(value); + } + } + + public static final String SERIALIZED_NAME_FIELD_NAME = "field_name"; + + @SerializedName(SERIALIZED_NAME_FIELD_NAME) + @javax.annotation.Nullable + private FieldNameEnum fieldName; + + /** Sort order : ASC(Ascending) or DESC(Descending). */ + @JsonAdapter(OrderEnum.Adapter.class) + public enum OrderEnum { + ASC("ASC"), + + DESC("DESC"); + + private String value; + + OrderEnum(String value) { + this.value = value; + } + + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + public static OrderEnum fromValue(String value) { + for (OrderEnum b : OrderEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + return null; + } + + public static class Adapter extends TypeAdapter { + @Override + public void write(final JsonWriter jsonWriter, final OrderEnum enumeration) + throws IOException { + jsonWriter.value(enumeration.getValue()); + } + + @Override + public OrderEnum read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + return OrderEnum.fromValue(value); + } + } + + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + String value = jsonElement.getAsString(); + OrderEnum.fromValue(value); + } + } + + public static final String SERIALIZED_NAME_ORDER = "order"; + + @SerializedName(SERIALIZED_NAME_ORDER) + @javax.annotation.Nullable + private OrderEnum order; + + public MetadataSearchSortOptions() {} + + public MetadataSearchSortOptions fieldName(@javax.annotation.Nullable FieldNameEnum fieldName) { + this.fieldName = fieldName; + return this; + } + + /** + * Name of the field to apply the sort on. + * + * @return fieldName + */ + @javax.annotation.Nullable + public FieldNameEnum getFieldName() { + return fieldName; + } + + public void setFieldName(@javax.annotation.Nullable FieldNameEnum fieldName) { + this.fieldName = fieldName; + } + + public MetadataSearchSortOptions order(@javax.annotation.Nullable OrderEnum order) { + this.order = order; + return this; + } + + /** + * Sort order : ASC(Ascending) or DESC(Descending). + * + * @return order + */ + @javax.annotation.Nullable + public OrderEnum getOrder() { + return order; + } + + public void setOrder(@javax.annotation.Nullable OrderEnum order) { + this.order = order; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key name of the property + * @param value value of the property + * @return the MetadataSearchSortOptions instance itself + */ + public MetadataSearchSortOptions putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return a map of objects + */ + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key name of the property + * @return an object + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + MetadataSearchSortOptions metadataSearchSortOptions = (MetadataSearchSortOptions) o; + return Objects.equals(this.fieldName, metadataSearchSortOptions.fieldName) + && Objects.equals(this.order, metadataSearchSortOptions.order) + && Objects.equals( + this.additionalProperties, metadataSearchSortOptions.additionalProperties); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b + || (a != null + && b != null + && a.isPresent() + && b.isPresent() + && Objects.deepEquals(a.get(), b.get())); + } + + @Override + public int hashCode() { + return Objects.hash(fieldName, order, additionalProperties); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; + } + return a.isPresent() ? Arrays.deepHashCode(new Object[] {a.get()}) : 31; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class MetadataSearchSortOptions {\n"); + sb.append(" fieldName: ").append(toIndentedString(fieldName)).append("\n"); + sb.append(" order: ").append(toIndentedString(order)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first + * line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("field_name"); + openapiFields.add("order"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to MetadataSearchSortOptions + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!MetadataSearchSortOptions.openapiRequiredFields + .isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException( + String.format( + "The required field(s) %s in MetadataSearchSortOptions is not" + + " found in the empty JSON string", + MetadataSearchSortOptions.openapiRequiredFields.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if ((jsonObj.get("field_name") != null && !jsonObj.get("field_name").isJsonNull()) + && !jsonObj.get("field_name").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `field_name` to be a primitive type in the JSON" + + " string but got `%s`", + jsonObj.get("field_name").toString())); + } + // validate the optional field `field_name` + if (jsonObj.get("field_name") != null && !jsonObj.get("field_name").isJsonNull()) { + FieldNameEnum.validateJsonElement(jsonObj.get("field_name")); + } + if ((jsonObj.get("order") != null && !jsonObj.get("order").isJsonNull()) + && !jsonObj.get("order").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `order` to be a primitive type in the JSON string" + + " but got `%s`", + jsonObj.get("order").toString())); + } + // validate the optional field `order` + if (jsonObj.get("order") != null && !jsonObj.get("order").isJsonNull()) { + OrderEnum.validateJsonElement(jsonObj.get("order")); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!MetadataSearchSortOptions.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'MetadataSearchSortOptions' and its + // subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter = + gson.getDelegateAdapter(this, TypeToken.get(MetadataSearchSortOptions.class)); + + return (TypeAdapter) + new TypeAdapter() { + @Override + public void write(JsonWriter out, MetadataSearchSortOptions value) + throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + obj.remove("additionalProperties"); + // serialize additional properties + if (value.getAdditionalProperties() != null) { + for (Map.Entry entry : + value.getAdditionalProperties().entrySet()) { + if (entry.getValue() instanceof String) + obj.addProperty(entry.getKey(), (String) entry.getValue()); + else if (entry.getValue() instanceof Number) + obj.addProperty(entry.getKey(), (Number) entry.getValue()); + else if (entry.getValue() instanceof Boolean) + obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); + else if (entry.getValue() instanceof Character) + obj.addProperty( + entry.getKey(), (Character) entry.getValue()); + else { + JsonElement jsonElement = gson.toJsonTree(entry.getValue()); + if (jsonElement.isJsonArray()) { + obj.add(entry.getKey(), jsonElement.getAsJsonArray()); + } else { + obj.add(entry.getKey(), jsonElement.getAsJsonObject()); + } + } + } + } + elementAdapter.write(out, obj); + } + + @Override + public MetadataSearchSortOptions read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // store additional fields in the deserialized instance + MetadataSearchSortOptions instance = thisAdapter.fromJsonTree(jsonObj); + for (Map.Entry entry : jsonObj.entrySet()) { + if (!openapiFields.contains(entry.getKey())) { + if (entry.getValue().isJsonPrimitive()) { // primitive type + if (entry.getValue().getAsJsonPrimitive().isString()) + instance.putAdditionalProperty( + entry.getKey(), entry.getValue().getAsString()); + else if (entry.getValue().getAsJsonPrimitive().isNumber()) + instance.putAdditionalProperty( + entry.getKey(), entry.getValue().getAsNumber()); + else if (entry.getValue().getAsJsonPrimitive().isBoolean()) + instance.putAdditionalProperty( + entry.getKey(), + entry.getValue().getAsBoolean()); + else + throw new IllegalArgumentException( + String.format( + "The field `%s` has unknown primitive" + + " type. Value: %s", + entry.getKey(), + entry.getValue().toString())); + } else if (entry.getValue().isJsonArray()) { + instance.putAdditionalProperty( + entry.getKey(), + gson.fromJson(entry.getValue(), List.class)); + } else { // JSON object + instance.putAdditionalProperty( + entry.getKey(), + gson.fromJson(entry.getValue(), HashMap.class)); + } + } + } + return instance; + } + }.nullSafe(); + } + } + + /** + * Create an instance of MetadataSearchSortOptions given an JSON string + * + * @param jsonString JSON string + * @return An instance of MetadataSearchSortOptions + * @throws IOException if the JSON string is invalid with respect to MetadataSearchSortOptions + */ + public static MetadataSearchSortOptions fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, MetadataSearchSortOptions.class); + } + + /** + * Convert an instance of MetadataSearchSortOptions to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} diff --git a/sdks/java/src/main/java/com/thoughtspot/client/model/ModelTableList.java b/sdks/java/src/main/java/com/thoughtspot/client/model/ModelTableList.java new file mode 100644 index 000000000..ba1980fff --- /dev/null +++ b/sdks/java/src/main/java/com/thoughtspot/client/model/ModelTableList.java @@ -0,0 +1,405 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client.model; + +import com.google.gson.Gson; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.TypeAdapter; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.annotations.SerializedName; +import com.google.gson.reflect.TypeToken; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import com.thoughtspot.client.JSON; +import java.io.IOException; +import java.io.Serializable; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Objects; +import org.openapitools.jackson.nullable.JsonNullable; + +/** ModelTableList */ +@javax.annotation.Generated( + value = "org.openapitools.codegen.languages.JavaClientCodegen", + comments = "Generator version: 7.12.0") +public class ModelTableList implements Serializable { + private static final long serialVersionUID = 1L; + + public static final String SERIALIZED_NAME_MODEL_NAME = "model_name"; + + @SerializedName(SERIALIZED_NAME_MODEL_NAME) + @javax.annotation.Nonnull + private String modelName; + + public static final String SERIALIZED_NAME_MODEL_PATH = "model_path"; + + @SerializedName(SERIALIZED_NAME_MODEL_PATH) + @javax.annotation.Nullable + private String modelPath; + + public static final String SERIALIZED_NAME_TABLES = "tables"; + + @SerializedName(SERIALIZED_NAME_TABLES) + @javax.annotation.Nonnull + private List tables; + + public ModelTableList() {} + + public ModelTableList modelName(@javax.annotation.Nonnull String modelName) { + this.modelName = modelName; + return this; + } + + /** + * Name of the Model. + * + * @return modelName + */ + @javax.annotation.Nonnull + public String getModelName() { + return modelName; + } + + public void setModelName(@javax.annotation.Nonnull String modelName) { + this.modelName = modelName; + } + + public ModelTableList modelPath(@javax.annotation.Nullable String modelPath) { + this.modelPath = modelPath; + return this; + } + + /** + * Model directory path, this is optional param and required if there are duplicate models with + * the same name. + * + * @return modelPath + */ + @javax.annotation.Nullable + public String getModelPath() { + return modelPath; + } + + public void setModelPath(@javax.annotation.Nullable String modelPath) { + this.modelPath = modelPath; + } + + public ModelTableList tables(@javax.annotation.Nonnull List tables) { + this.tables = tables; + return this; + } + + public ModelTableList addTablesItem(String tablesItem) { + if (this.tables == null) { + this.tables = new ArrayList<>(); + } + this.tables.add(tablesItem); + return this; + } + + /** + * List of Tables. + * + * @return tables + */ + @javax.annotation.Nonnull + public List getTables() { + return tables; + } + + public void setTables(@javax.annotation.Nonnull List tables) { + this.tables = tables; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key name of the property + * @param value value of the property + * @return the ModelTableList instance itself + */ + public ModelTableList putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return a map of objects + */ + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key name of the property + * @return an object + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ModelTableList modelTableList = (ModelTableList) o; + return Objects.equals(this.modelName, modelTableList.modelName) + && Objects.equals(this.modelPath, modelTableList.modelPath) + && Objects.equals(this.tables, modelTableList.tables) + && Objects.equals(this.additionalProperties, modelTableList.additionalProperties); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b + || (a != null + && b != null + && a.isPresent() + && b.isPresent() + && Objects.deepEquals(a.get(), b.get())); + } + + @Override + public int hashCode() { + return Objects.hash(modelName, modelPath, tables, additionalProperties); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; + } + return a.isPresent() ? Arrays.deepHashCode(new Object[] {a.get()}) : 31; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ModelTableList {\n"); + sb.append(" modelName: ").append(toIndentedString(modelName)).append("\n"); + sb.append(" modelPath: ").append(toIndentedString(modelPath)).append("\n"); + sb.append(" tables: ").append(toIndentedString(tables)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first + * line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("model_name"); + openapiFields.add("model_path"); + openapiFields.add("tables"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + openapiRequiredFields.add("model_name"); + openapiRequiredFields.add("tables"); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to ModelTableList + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!ModelTableList.openapiRequiredFields + .isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException( + String.format( + "The required field(s) %s in ModelTableList is not found in the" + + " empty JSON string", + ModelTableList.openapiRequiredFields.toString())); + } + } + + // check to make sure all required properties/fields are present in the JSON string + for (String requiredField : ModelTableList.openapiRequiredFields) { + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException( + String.format( + "The required field `%s` is not found in the JSON string: %s", + requiredField, jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if (!jsonObj.get("model_name").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `model_name` to be a primitive type in the JSON" + + " string but got `%s`", + jsonObj.get("model_name").toString())); + } + if ((jsonObj.get("model_path") != null && !jsonObj.get("model_path").isJsonNull()) + && !jsonObj.get("model_path").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `model_path` to be a primitive type in the JSON" + + " string but got `%s`", + jsonObj.get("model_path").toString())); + } + // ensure the required json array is present + if (jsonObj.get("tables") == null) { + throw new IllegalArgumentException( + "Expected the field `linkedContent` to be an array in the JSON string but got" + + " `null`"); + } else if (!jsonObj.get("tables").isJsonArray()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `tables` to be an array in the JSON string but got" + + " `%s`", + jsonObj.get("tables").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!ModelTableList.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'ModelTableList' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter = + gson.getDelegateAdapter(this, TypeToken.get(ModelTableList.class)); + + return (TypeAdapter) + new TypeAdapter() { + @Override + public void write(JsonWriter out, ModelTableList value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + obj.remove("additionalProperties"); + // serialize additional properties + if (value.getAdditionalProperties() != null) { + for (Map.Entry entry : + value.getAdditionalProperties().entrySet()) { + if (entry.getValue() instanceof String) + obj.addProperty(entry.getKey(), (String) entry.getValue()); + else if (entry.getValue() instanceof Number) + obj.addProperty(entry.getKey(), (Number) entry.getValue()); + else if (entry.getValue() instanceof Boolean) + obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); + else if (entry.getValue() instanceof Character) + obj.addProperty( + entry.getKey(), (Character) entry.getValue()); + else { + JsonElement jsonElement = gson.toJsonTree(entry.getValue()); + if (jsonElement.isJsonArray()) { + obj.add(entry.getKey(), jsonElement.getAsJsonArray()); + } else { + obj.add(entry.getKey(), jsonElement.getAsJsonObject()); + } + } + } + } + elementAdapter.write(out, obj); + } + + @Override + public ModelTableList read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // store additional fields in the deserialized instance + ModelTableList instance = thisAdapter.fromJsonTree(jsonObj); + for (Map.Entry entry : jsonObj.entrySet()) { + if (!openapiFields.contains(entry.getKey())) { + if (entry.getValue().isJsonPrimitive()) { // primitive type + if (entry.getValue().getAsJsonPrimitive().isString()) + instance.putAdditionalProperty( + entry.getKey(), entry.getValue().getAsString()); + else if (entry.getValue().getAsJsonPrimitive().isNumber()) + instance.putAdditionalProperty( + entry.getKey(), entry.getValue().getAsNumber()); + else if (entry.getValue().getAsJsonPrimitive().isBoolean()) + instance.putAdditionalProperty( + entry.getKey(), + entry.getValue().getAsBoolean()); + else + throw new IllegalArgumentException( + String.format( + "The field `%s` has unknown primitive" + + " type. Value: %s", + entry.getKey(), + entry.getValue().toString())); + } else if (entry.getValue().isJsonArray()) { + instance.putAdditionalProperty( + entry.getKey(), + gson.fromJson(entry.getValue(), List.class)); + } else { // JSON object + instance.putAdditionalProperty( + entry.getKey(), + gson.fromJson(entry.getValue(), HashMap.class)); + } + } + } + return instance; + } + }.nullSafe(); + } + } + + /** + * Create an instance of ModelTableList given an JSON string + * + * @param jsonString JSON string + * @return An instance of ModelTableList + * @throws IOException if the JSON string is invalid with respect to ModelTableList + */ + public static ModelTableList fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, ModelTableList.class); + } + + /** + * Convert an instance of ModelTableList to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} diff --git a/sdks/java/src/main/java/com/thoughtspot/client/model/NLInstructionsInfo.java b/sdks/java/src/main/java/com/thoughtspot/client/model/NLInstructionsInfo.java new file mode 100644 index 000000000..f1773ac53 --- /dev/null +++ b/sdks/java/src/main/java/com/thoughtspot/client/model/NLInstructionsInfo.java @@ -0,0 +1,404 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client.model; + +import com.google.gson.Gson; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.TypeAdapter; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.reflect.TypeToken; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import com.thoughtspot.client.JSON; +import java.io.IOException; +import java.io.Serializable; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Objects; + +/** NLInstructionsInfo */ +@javax.annotation.Generated( + value = "org.openapitools.codegen.languages.JavaClientCodegen", + comments = "Generator version: 7.12.0") +public class NLInstructionsInfo implements Serializable { + private static final long serialVersionUID = 1L; + + public static final String SERIALIZED_NAME_INSTRUCTIONS = "instructions"; + + @SerializedName(SERIALIZED_NAME_INSTRUCTIONS) + @javax.annotation.Nonnull + private List instructions; + + /** Scope of the instruction. */ + @JsonAdapter(ScopeEnum.Adapter.class) + public enum ScopeEnum { + GLOBAL("GLOBAL"); + + private String value; + + ScopeEnum(String value) { + this.value = value; + } + + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + public static ScopeEnum fromValue(String value) { + for (ScopeEnum b : ScopeEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + + public static class Adapter extends TypeAdapter { + @Override + public void write(final JsonWriter jsonWriter, final ScopeEnum enumeration) + throws IOException { + jsonWriter.value(enumeration.getValue()); + } + + @Override + public ScopeEnum read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + return ScopeEnum.fromValue(value); + } + } + + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + String value = jsonElement.getAsString(); + ScopeEnum.fromValue(value); + } + } + + public static final String SERIALIZED_NAME_SCOPE = "scope"; + + @SerializedName(SERIALIZED_NAME_SCOPE) + @javax.annotation.Nonnull + private ScopeEnum scope; + + public NLInstructionsInfo() {} + + public NLInstructionsInfo instructions(@javax.annotation.Nonnull List instructions) { + this.instructions = instructions; + return this; + } + + public NLInstructionsInfo addInstructionsItem(String instructionsItem) { + if (this.instructions == null) { + this.instructions = new ArrayList<>(); + } + this.instructions.add(instructionsItem); + return this; + } + + /** + * User instructions for natural language processing. + * + * @return instructions + */ + @javax.annotation.Nonnull + public List getInstructions() { + return instructions; + } + + public void setInstructions(@javax.annotation.Nonnull List instructions) { + this.instructions = instructions; + } + + public NLInstructionsInfo scope(@javax.annotation.Nonnull ScopeEnum scope) { + this.scope = scope; + return this; + } + + /** + * Scope of the instruction. + * + * @return scope + */ + @javax.annotation.Nonnull + public ScopeEnum getScope() { + return scope; + } + + public void setScope(@javax.annotation.Nonnull ScopeEnum scope) { + this.scope = scope; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key name of the property + * @param value value of the property + * @return the NLInstructionsInfo instance itself + */ + public NLInstructionsInfo putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return a map of objects + */ + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key name of the property + * @return an object + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + NLInstructionsInfo nlInstructionsInfo = (NLInstructionsInfo) o; + return Objects.equals(this.instructions, nlInstructionsInfo.instructions) + && Objects.equals(this.scope, nlInstructionsInfo.scope) + && Objects.equals( + this.additionalProperties, nlInstructionsInfo.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(instructions, scope, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class NLInstructionsInfo {\n"); + sb.append(" instructions: ").append(toIndentedString(instructions)).append("\n"); + sb.append(" scope: ").append(toIndentedString(scope)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first + * line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("instructions"); + openapiFields.add("scope"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + openapiRequiredFields.add("instructions"); + openapiRequiredFields.add("scope"); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to NLInstructionsInfo + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!NLInstructionsInfo.openapiRequiredFields + .isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException( + String.format( + "The required field(s) %s in NLInstructionsInfo is not found in" + + " the empty JSON string", + NLInstructionsInfo.openapiRequiredFields.toString())); + } + } + + // check to make sure all required properties/fields are present in the JSON string + for (String requiredField : NLInstructionsInfo.openapiRequiredFields) { + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException( + String.format( + "The required field `%s` is not found in the JSON string: %s", + requiredField, jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // ensure the required json array is present + if (jsonObj.get("instructions") == null) { + throw new IllegalArgumentException( + "Expected the field `linkedContent` to be an array in the JSON string but got" + + " `null`"); + } else if (!jsonObj.get("instructions").isJsonArray()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `instructions` to be an array in the JSON string" + + " but got `%s`", + jsonObj.get("instructions").toString())); + } + if (!jsonObj.get("scope").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `scope` to be a primitive type in the JSON string" + + " but got `%s`", + jsonObj.get("scope").toString())); + } + // validate the required field `scope` + ScopeEnum.validateJsonElement(jsonObj.get("scope")); + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!NLInstructionsInfo.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'NLInstructionsInfo' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter = + gson.getDelegateAdapter(this, TypeToken.get(NLInstructionsInfo.class)); + + return (TypeAdapter) + new TypeAdapter() { + @Override + public void write(JsonWriter out, NLInstructionsInfo value) + throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + obj.remove("additionalProperties"); + // serialize additional properties + if (value.getAdditionalProperties() != null) { + for (Map.Entry entry : + value.getAdditionalProperties().entrySet()) { + if (entry.getValue() instanceof String) + obj.addProperty(entry.getKey(), (String) entry.getValue()); + else if (entry.getValue() instanceof Number) + obj.addProperty(entry.getKey(), (Number) entry.getValue()); + else if (entry.getValue() instanceof Boolean) + obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); + else if (entry.getValue() instanceof Character) + obj.addProperty( + entry.getKey(), (Character) entry.getValue()); + else { + JsonElement jsonElement = gson.toJsonTree(entry.getValue()); + if (jsonElement.isJsonArray()) { + obj.add(entry.getKey(), jsonElement.getAsJsonArray()); + } else { + obj.add(entry.getKey(), jsonElement.getAsJsonObject()); + } + } + } + } + elementAdapter.write(out, obj); + } + + @Override + public NLInstructionsInfo read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // store additional fields in the deserialized instance + NLInstructionsInfo instance = thisAdapter.fromJsonTree(jsonObj); + for (Map.Entry entry : jsonObj.entrySet()) { + if (!openapiFields.contains(entry.getKey())) { + if (entry.getValue().isJsonPrimitive()) { // primitive type + if (entry.getValue().getAsJsonPrimitive().isString()) + instance.putAdditionalProperty( + entry.getKey(), entry.getValue().getAsString()); + else if (entry.getValue().getAsJsonPrimitive().isNumber()) + instance.putAdditionalProperty( + entry.getKey(), entry.getValue().getAsNumber()); + else if (entry.getValue().getAsJsonPrimitive().isBoolean()) + instance.putAdditionalProperty( + entry.getKey(), + entry.getValue().getAsBoolean()); + else + throw new IllegalArgumentException( + String.format( + "The field `%s` has unknown primitive" + + " type. Value: %s", + entry.getKey(), + entry.getValue().toString())); + } else if (entry.getValue().isJsonArray()) { + instance.putAdditionalProperty( + entry.getKey(), + gson.fromJson(entry.getValue(), List.class)); + } else { // JSON object + instance.putAdditionalProperty( + entry.getKey(), + gson.fromJson(entry.getValue(), HashMap.class)); + } + } + } + return instance; + } + }.nullSafe(); + } + } + + /** + * Create an instance of NLInstructionsInfo given an JSON string + * + * @param jsonString JSON string + * @return An instance of NLInstructionsInfo + * @throws IOException if the JSON string is invalid with respect to NLInstructionsInfo + */ + public static NLInstructionsInfo fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, NLInstructionsInfo.class); + } + + /** + * Convert an instance of NLInstructionsInfo to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} diff --git a/sdks/java/src/main/java/com/thoughtspot/client/model/NLInstructionsInfoInput.java b/sdks/java/src/main/java/com/thoughtspot/client/model/NLInstructionsInfoInput.java new file mode 100644 index 000000000..57e96dcba --- /dev/null +++ b/sdks/java/src/main/java/com/thoughtspot/client/model/NLInstructionsInfoInput.java @@ -0,0 +1,406 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client.model; + +import com.google.gson.Gson; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.TypeAdapter; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.reflect.TypeToken; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import com.thoughtspot.client.JSON; +import java.io.IOException; +import java.io.Serializable; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Objects; + +/** NLInstructionsInfoInput */ +@javax.annotation.Generated( + value = "org.openapitools.codegen.languages.JavaClientCodegen", + comments = "Generator version: 7.12.0") +public class NLInstructionsInfoInput implements Serializable { + private static final long serialVersionUID = 1L; + + public static final String SERIALIZED_NAME_INSTRUCTIONS = "instructions"; + + @SerializedName(SERIALIZED_NAME_INSTRUCTIONS) + @javax.annotation.Nonnull + private List instructions; + + /** Scope of the instruction (USER or GLOBAL). Defaults to GLOBAL. */ + @JsonAdapter(ScopeEnum.Adapter.class) + public enum ScopeEnum { + GLOBAL("GLOBAL"); + + private String value; + + ScopeEnum(String value) { + this.value = value; + } + + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + public static ScopeEnum fromValue(String value) { + for (ScopeEnum b : ScopeEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + + public static class Adapter extends TypeAdapter { + @Override + public void write(final JsonWriter jsonWriter, final ScopeEnum enumeration) + throws IOException { + jsonWriter.value(enumeration.getValue()); + } + + @Override + public ScopeEnum read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + return ScopeEnum.fromValue(value); + } + } + + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + String value = jsonElement.getAsString(); + ScopeEnum.fromValue(value); + } + } + + public static final String SERIALIZED_NAME_SCOPE = "scope"; + + @SerializedName(SERIALIZED_NAME_SCOPE) + @javax.annotation.Nonnull + private ScopeEnum scope; + + public NLInstructionsInfoInput() {} + + public NLInstructionsInfoInput instructions( + @javax.annotation.Nonnull List instructions) { + this.instructions = instructions; + return this; + } + + public NLInstructionsInfoInput addInstructionsItem(String instructionsItem) { + if (this.instructions == null) { + this.instructions = new ArrayList<>(); + } + this.instructions.add(instructionsItem); + return this; + } + + /** + * User instructions for natural language processing. + * + * @return instructions + */ + @javax.annotation.Nonnull + public List getInstructions() { + return instructions; + } + + public void setInstructions(@javax.annotation.Nonnull List instructions) { + this.instructions = instructions; + } + + public NLInstructionsInfoInput scope(@javax.annotation.Nonnull ScopeEnum scope) { + this.scope = scope; + return this; + } + + /** + * Scope of the instruction (USER or GLOBAL). Defaults to GLOBAL. + * + * @return scope + */ + @javax.annotation.Nonnull + public ScopeEnum getScope() { + return scope; + } + + public void setScope(@javax.annotation.Nonnull ScopeEnum scope) { + this.scope = scope; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key name of the property + * @param value value of the property + * @return the NLInstructionsInfoInput instance itself + */ + public NLInstructionsInfoInput putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return a map of objects + */ + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key name of the property + * @return an object + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + NLInstructionsInfoInput nlInstructionsInfoInput = (NLInstructionsInfoInput) o; + return Objects.equals(this.instructions, nlInstructionsInfoInput.instructions) + && Objects.equals(this.scope, nlInstructionsInfoInput.scope) + && Objects.equals( + this.additionalProperties, nlInstructionsInfoInput.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(instructions, scope, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class NLInstructionsInfoInput {\n"); + sb.append(" instructions: ").append(toIndentedString(instructions)).append("\n"); + sb.append(" scope: ").append(toIndentedString(scope)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first + * line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("instructions"); + openapiFields.add("scope"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + openapiRequiredFields.add("instructions"); + openapiRequiredFields.add("scope"); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to NLInstructionsInfoInput + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!NLInstructionsInfoInput.openapiRequiredFields + .isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException( + String.format( + "The required field(s) %s in NLInstructionsInfoInput is not found" + + " in the empty JSON string", + NLInstructionsInfoInput.openapiRequiredFields.toString())); + } + } + + // check to make sure all required properties/fields are present in the JSON string + for (String requiredField : NLInstructionsInfoInput.openapiRequiredFields) { + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException( + String.format( + "The required field `%s` is not found in the JSON string: %s", + requiredField, jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // ensure the required json array is present + if (jsonObj.get("instructions") == null) { + throw new IllegalArgumentException( + "Expected the field `linkedContent` to be an array in the JSON string but got" + + " `null`"); + } else if (!jsonObj.get("instructions").isJsonArray()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `instructions` to be an array in the JSON string" + + " but got `%s`", + jsonObj.get("instructions").toString())); + } + if (!jsonObj.get("scope").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `scope` to be a primitive type in the JSON string" + + " but got `%s`", + jsonObj.get("scope").toString())); + } + // validate the required field `scope` + ScopeEnum.validateJsonElement(jsonObj.get("scope")); + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!NLInstructionsInfoInput.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'NLInstructionsInfoInput' and its + // subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter = + gson.getDelegateAdapter(this, TypeToken.get(NLInstructionsInfoInput.class)); + + return (TypeAdapter) + new TypeAdapter() { + @Override + public void write(JsonWriter out, NLInstructionsInfoInput value) + throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + obj.remove("additionalProperties"); + // serialize additional properties + if (value.getAdditionalProperties() != null) { + for (Map.Entry entry : + value.getAdditionalProperties().entrySet()) { + if (entry.getValue() instanceof String) + obj.addProperty(entry.getKey(), (String) entry.getValue()); + else if (entry.getValue() instanceof Number) + obj.addProperty(entry.getKey(), (Number) entry.getValue()); + else if (entry.getValue() instanceof Boolean) + obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); + else if (entry.getValue() instanceof Character) + obj.addProperty( + entry.getKey(), (Character) entry.getValue()); + else { + JsonElement jsonElement = gson.toJsonTree(entry.getValue()); + if (jsonElement.isJsonArray()) { + obj.add(entry.getKey(), jsonElement.getAsJsonArray()); + } else { + obj.add(entry.getKey(), jsonElement.getAsJsonObject()); + } + } + } + } + elementAdapter.write(out, obj); + } + + @Override + public NLInstructionsInfoInput read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // store additional fields in the deserialized instance + NLInstructionsInfoInput instance = thisAdapter.fromJsonTree(jsonObj); + for (Map.Entry entry : jsonObj.entrySet()) { + if (!openapiFields.contains(entry.getKey())) { + if (entry.getValue().isJsonPrimitive()) { // primitive type + if (entry.getValue().getAsJsonPrimitive().isString()) + instance.putAdditionalProperty( + entry.getKey(), entry.getValue().getAsString()); + else if (entry.getValue().getAsJsonPrimitive().isNumber()) + instance.putAdditionalProperty( + entry.getKey(), entry.getValue().getAsNumber()); + else if (entry.getValue().getAsJsonPrimitive().isBoolean()) + instance.putAdditionalProperty( + entry.getKey(), + entry.getValue().getAsBoolean()); + else + throw new IllegalArgumentException( + String.format( + "The field `%s` has unknown primitive" + + " type. Value: %s", + entry.getKey(), + entry.getValue().toString())); + } else if (entry.getValue().isJsonArray()) { + instance.putAdditionalProperty( + entry.getKey(), + gson.fromJson(entry.getValue(), List.class)); + } else { // JSON object + instance.putAdditionalProperty( + entry.getKey(), + gson.fromJson(entry.getValue(), HashMap.class)); + } + } + } + return instance; + } + }.nullSafe(); + } + } + + /** + * Create an instance of NLInstructionsInfoInput given an JSON string + * + * @param jsonString JSON string + * @return An instance of NLInstructionsInfoInput + * @throws IOException if the JSON string is invalid with respect to NLInstructionsInfoInput + */ + public static NLInstructionsInfoInput fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, NLInstructionsInfoInput.class); + } + + /** + * Convert an instance of NLInstructionsInfoInput to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} diff --git a/sdks/java/src/main/java/com/thoughtspot/client/model/ObjectIDAndName.java b/sdks/java/src/main/java/com/thoughtspot/client/model/ObjectIDAndName.java new file mode 100644 index 000000000..695e25e66 --- /dev/null +++ b/sdks/java/src/main/java/com/thoughtspot/client/model/ObjectIDAndName.java @@ -0,0 +1,345 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client.model; + +import com.google.gson.Gson; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.TypeAdapter; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.annotations.SerializedName; +import com.google.gson.reflect.TypeToken; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import com.thoughtspot.client.JSON; +import java.io.IOException; +import java.io.Serializable; +import java.util.Arrays; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Objects; +import org.openapitools.jackson.nullable.JsonNullable; + +/** The object representation with ID and Name. */ +@javax.annotation.Generated( + value = "org.openapitools.codegen.languages.JavaClientCodegen", + comments = "Generator version: 7.12.0") +public class ObjectIDAndName implements Serializable { + private static final long serialVersionUID = 1L; + + public static final String SERIALIZED_NAME_ID = "id"; + + @SerializedName(SERIALIZED_NAME_ID) + @javax.annotation.Nullable + private String id; + + public static final String SERIALIZED_NAME_NAME = "name"; + + @SerializedName(SERIALIZED_NAME_NAME) + @javax.annotation.Nullable + private String name; + + public ObjectIDAndName() {} + + public ObjectIDAndName id(@javax.annotation.Nullable String id) { + this.id = id; + return this; + } + + /** + * The unique identifier of the object. + * + * @return id + */ + @javax.annotation.Nullable + public String getId() { + return id; + } + + public void setId(@javax.annotation.Nullable String id) { + this.id = id; + } + + public ObjectIDAndName name(@javax.annotation.Nullable String name) { + this.name = name; + return this; + } + + /** + * Name of the object. + * + * @return name + */ + @javax.annotation.Nullable + public String getName() { + return name; + } + + public void setName(@javax.annotation.Nullable String name) { + this.name = name; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key name of the property + * @param value value of the property + * @return the ObjectIDAndName instance itself + */ + public ObjectIDAndName putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return a map of objects + */ + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key name of the property + * @return an object + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ObjectIDAndName objectIDAndName = (ObjectIDAndName) o; + return Objects.equals(this.id, objectIDAndName.id) + && Objects.equals(this.name, objectIDAndName.name) + && Objects.equals(this.additionalProperties, objectIDAndName.additionalProperties); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b + || (a != null + && b != null + && a.isPresent() + && b.isPresent() + && Objects.deepEquals(a.get(), b.get())); + } + + @Override + public int hashCode() { + return Objects.hash(id, name, additionalProperties); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; + } + return a.isPresent() ? Arrays.deepHashCode(new Object[] {a.get()}) : 31; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ObjectIDAndName {\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first + * line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("id"); + openapiFields.add("name"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to ObjectIDAndName + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!ObjectIDAndName.openapiRequiredFields + .isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException( + String.format( + "The required field(s) %s in ObjectIDAndName is not found in the" + + " empty JSON string", + ObjectIDAndName.openapiRequiredFields.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if ((jsonObj.get("id") != null && !jsonObj.get("id").isJsonNull()) + && !jsonObj.get("id").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `id` to be a primitive type in the JSON string but" + + " got `%s`", + jsonObj.get("id").toString())); + } + if ((jsonObj.get("name") != null && !jsonObj.get("name").isJsonNull()) + && !jsonObj.get("name").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `name` to be a primitive type in the JSON string" + + " but got `%s`", + jsonObj.get("name").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!ObjectIDAndName.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'ObjectIDAndName' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter = + gson.getDelegateAdapter(this, TypeToken.get(ObjectIDAndName.class)); + + return (TypeAdapter) + new TypeAdapter() { + @Override + public void write(JsonWriter out, ObjectIDAndName value) + throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + obj.remove("additionalProperties"); + // serialize additional properties + if (value.getAdditionalProperties() != null) { + for (Map.Entry entry : + value.getAdditionalProperties().entrySet()) { + if (entry.getValue() instanceof String) + obj.addProperty(entry.getKey(), (String) entry.getValue()); + else if (entry.getValue() instanceof Number) + obj.addProperty(entry.getKey(), (Number) entry.getValue()); + else if (entry.getValue() instanceof Boolean) + obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); + else if (entry.getValue() instanceof Character) + obj.addProperty( + entry.getKey(), (Character) entry.getValue()); + else { + JsonElement jsonElement = gson.toJsonTree(entry.getValue()); + if (jsonElement.isJsonArray()) { + obj.add(entry.getKey(), jsonElement.getAsJsonArray()); + } else { + obj.add(entry.getKey(), jsonElement.getAsJsonObject()); + } + } + } + } + elementAdapter.write(out, obj); + } + + @Override + public ObjectIDAndName read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // store additional fields in the deserialized instance + ObjectIDAndName instance = thisAdapter.fromJsonTree(jsonObj); + for (Map.Entry entry : jsonObj.entrySet()) { + if (!openapiFields.contains(entry.getKey())) { + if (entry.getValue().isJsonPrimitive()) { // primitive type + if (entry.getValue().getAsJsonPrimitive().isString()) + instance.putAdditionalProperty( + entry.getKey(), entry.getValue().getAsString()); + else if (entry.getValue().getAsJsonPrimitive().isNumber()) + instance.putAdditionalProperty( + entry.getKey(), entry.getValue().getAsNumber()); + else if (entry.getValue().getAsJsonPrimitive().isBoolean()) + instance.putAdditionalProperty( + entry.getKey(), + entry.getValue().getAsBoolean()); + else + throw new IllegalArgumentException( + String.format( + "The field `%s` has unknown primitive" + + " type. Value: %s", + entry.getKey(), + entry.getValue().toString())); + } else if (entry.getValue().isJsonArray()) { + instance.putAdditionalProperty( + entry.getKey(), + gson.fromJson(entry.getValue(), List.class)); + } else { // JSON object + instance.putAdditionalProperty( + entry.getKey(), + gson.fromJson(entry.getValue(), HashMap.class)); + } + } + } + return instance; + } + }.nullSafe(); + } + } + + /** + * Create an instance of ObjectIDAndName given an JSON string + * + * @param jsonString JSON string + * @return An instance of ObjectIDAndName + * @throws IOException if the JSON string is invalid with respect to ObjectIDAndName + */ + public static ObjectIDAndName fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, ObjectIDAndName.class); + } + + /** + * Convert an instance of ObjectIDAndName to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} diff --git a/sdks/java/src/main/java/com/thoughtspot/client/model/ObjectPrivilegesMetadataInput.java b/sdks/java/src/main/java/com/thoughtspot/client/model/ObjectPrivilegesMetadataInput.java new file mode 100644 index 000000000..4f7ecf31b --- /dev/null +++ b/sdks/java/src/main/java/com/thoughtspot/client/model/ObjectPrivilegesMetadataInput.java @@ -0,0 +1,422 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client.model; + +import com.google.gson.Gson; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.TypeAdapter; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.reflect.TypeToken; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import com.thoughtspot.client.JSON; +import java.io.IOException; +import java.io.Serializable; +import java.util.Arrays; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Objects; +import org.openapitools.jackson.nullable.JsonNullable; + +/** ObjectPrivilegesMetadataInput */ +@javax.annotation.Generated( + value = "org.openapitools.codegen.languages.JavaClientCodegen", + comments = "Generator version: 7.12.0") +public class ObjectPrivilegesMetadataInput implements Serializable { + private static final long serialVersionUID = 1L; + + /** + * Type of metadata object. Required if the name of the object is set as the identifier. This + * attribute is optional when the object GUID is specified as the identifier. + */ + @JsonAdapter(TypeEnum.Adapter.class) + public enum TypeEnum { + LOGICAL_TABLE("LOGICAL_TABLE"); + + private String value; + + TypeEnum(String value) { + this.value = value; + } + + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + public static TypeEnum fromValue(String value) { + for (TypeEnum b : TypeEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + return null; + } + + public static class Adapter extends TypeAdapter { + @Override + public void write(final JsonWriter jsonWriter, final TypeEnum enumeration) + throws IOException { + jsonWriter.value(enumeration.getValue()); + } + + @Override + public TypeEnum read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + return TypeEnum.fromValue(value); + } + } + + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + String value = jsonElement.getAsString(); + TypeEnum.fromValue(value); + } + } + + public static final String SERIALIZED_NAME_TYPE = "type"; + + @SerializedName(SERIALIZED_NAME_TYPE) + @javax.annotation.Nullable + private TypeEnum type; + + public static final String SERIALIZED_NAME_IDENTIFIER = "identifier"; + + @SerializedName(SERIALIZED_NAME_IDENTIFIER) + @javax.annotation.Nonnull + private String identifier; + + public ObjectPrivilegesMetadataInput() {} + + public ObjectPrivilegesMetadataInput type(@javax.annotation.Nullable TypeEnum type) { + this.type = type; + return this; + } + + /** + * Type of metadata object. Required if the name of the object is set as the identifier. This + * attribute is optional when the object GUID is specified as the identifier. + * + * @return type + */ + @javax.annotation.Nullable + public TypeEnum getType() { + return type; + } + + public void setType(@javax.annotation.Nullable TypeEnum type) { + this.type = type; + } + + public ObjectPrivilegesMetadataInput identifier(@javax.annotation.Nonnull String identifier) { + this.identifier = identifier; + return this; + } + + /** + * Unique ID or name of the metadata object. + * + * @return identifier + */ + @javax.annotation.Nonnull + public String getIdentifier() { + return identifier; + } + + public void setIdentifier(@javax.annotation.Nonnull String identifier) { + this.identifier = identifier; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key name of the property + * @param value value of the property + * @return the ObjectPrivilegesMetadataInput instance itself + */ + public ObjectPrivilegesMetadataInput putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return a map of objects + */ + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key name of the property + * @return an object + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ObjectPrivilegesMetadataInput objectPrivilegesMetadataInput = + (ObjectPrivilegesMetadataInput) o; + return Objects.equals(this.type, objectPrivilegesMetadataInput.type) + && Objects.equals(this.identifier, objectPrivilegesMetadataInput.identifier) + && Objects.equals( + this.additionalProperties, + objectPrivilegesMetadataInput.additionalProperties); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b + || (a != null + && b != null + && a.isPresent() + && b.isPresent() + && Objects.deepEquals(a.get(), b.get())); + } + + @Override + public int hashCode() { + return Objects.hash(type, identifier, additionalProperties); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; + } + return a.isPresent() ? Arrays.deepHashCode(new Object[] {a.get()}) : 31; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ObjectPrivilegesMetadataInput {\n"); + sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append(" identifier: ").append(toIndentedString(identifier)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first + * line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("type"); + openapiFields.add("identifier"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + openapiRequiredFields.add("identifier"); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to + * ObjectPrivilegesMetadataInput + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!ObjectPrivilegesMetadataInput.openapiRequiredFields + .isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException( + String.format( + "The required field(s) %s in ObjectPrivilegesMetadataInput is not" + + " found in the empty JSON string", + ObjectPrivilegesMetadataInput.openapiRequiredFields.toString())); + } + } + + // check to make sure all required properties/fields are present in the JSON string + for (String requiredField : ObjectPrivilegesMetadataInput.openapiRequiredFields) { + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException( + String.format( + "The required field `%s` is not found in the JSON string: %s", + requiredField, jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if ((jsonObj.get("type") != null && !jsonObj.get("type").isJsonNull()) + && !jsonObj.get("type").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `type` to be a primitive type in the JSON string" + + " but got `%s`", + jsonObj.get("type").toString())); + } + // validate the optional field `type` + if (jsonObj.get("type") != null && !jsonObj.get("type").isJsonNull()) { + TypeEnum.validateJsonElement(jsonObj.get("type")); + } + if (!jsonObj.get("identifier").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `identifier` to be a primitive type in the JSON" + + " string but got `%s`", + jsonObj.get("identifier").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!ObjectPrivilegesMetadataInput.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'ObjectPrivilegesMetadataInput' and its + // subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter = + gson.getDelegateAdapter( + this, TypeToken.get(ObjectPrivilegesMetadataInput.class)); + + return (TypeAdapter) + new TypeAdapter() { + @Override + public void write(JsonWriter out, ObjectPrivilegesMetadataInput value) + throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + obj.remove("additionalProperties"); + // serialize additional properties + if (value.getAdditionalProperties() != null) { + for (Map.Entry entry : + value.getAdditionalProperties().entrySet()) { + if (entry.getValue() instanceof String) + obj.addProperty(entry.getKey(), (String) entry.getValue()); + else if (entry.getValue() instanceof Number) + obj.addProperty(entry.getKey(), (Number) entry.getValue()); + else if (entry.getValue() instanceof Boolean) + obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); + else if (entry.getValue() instanceof Character) + obj.addProperty( + entry.getKey(), (Character) entry.getValue()); + else { + JsonElement jsonElement = gson.toJsonTree(entry.getValue()); + if (jsonElement.isJsonArray()) { + obj.add(entry.getKey(), jsonElement.getAsJsonArray()); + } else { + obj.add(entry.getKey(), jsonElement.getAsJsonObject()); + } + } + } + } + elementAdapter.write(out, obj); + } + + @Override + public ObjectPrivilegesMetadataInput read(JsonReader in) + throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // store additional fields in the deserialized instance + ObjectPrivilegesMetadataInput instance = + thisAdapter.fromJsonTree(jsonObj); + for (Map.Entry entry : jsonObj.entrySet()) { + if (!openapiFields.contains(entry.getKey())) { + if (entry.getValue().isJsonPrimitive()) { // primitive type + if (entry.getValue().getAsJsonPrimitive().isString()) + instance.putAdditionalProperty( + entry.getKey(), entry.getValue().getAsString()); + else if (entry.getValue().getAsJsonPrimitive().isNumber()) + instance.putAdditionalProperty( + entry.getKey(), entry.getValue().getAsNumber()); + else if (entry.getValue().getAsJsonPrimitive().isBoolean()) + instance.putAdditionalProperty( + entry.getKey(), + entry.getValue().getAsBoolean()); + else + throw new IllegalArgumentException( + String.format( + "The field `%s` has unknown primitive" + + " type. Value: %s", + entry.getKey(), + entry.getValue().toString())); + } else if (entry.getValue().isJsonArray()) { + instance.putAdditionalProperty( + entry.getKey(), + gson.fromJson(entry.getValue(), List.class)); + } else { // JSON object + instance.putAdditionalProperty( + entry.getKey(), + gson.fromJson(entry.getValue(), HashMap.class)); + } + } + } + return instance; + } + }.nullSafe(); + } + } + + /** + * Create an instance of ObjectPrivilegesMetadataInput given an JSON string + * + * @param jsonString JSON string + * @return An instance of ObjectPrivilegesMetadataInput + * @throws IOException if the JSON string is invalid with respect to + * ObjectPrivilegesMetadataInput + */ + public static ObjectPrivilegesMetadataInput fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, ObjectPrivilegesMetadataInput.class); + } + + /** + * Convert an instance of ObjectPrivilegesMetadataInput to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} diff --git a/sdks/java/src/main/java/com/thoughtspot/client/model/ObjectPrivilegesOfMetadataResponse.java b/sdks/java/src/main/java/com/thoughtspot/client/model/ObjectPrivilegesOfMetadataResponse.java new file mode 100644 index 000000000..14ab4e710 --- /dev/null +++ b/sdks/java/src/main/java/com/thoughtspot/client/model/ObjectPrivilegesOfMetadataResponse.java @@ -0,0 +1,319 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client.model; + +import com.google.gson.Gson; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.TypeAdapter; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.annotations.SerializedName; +import com.google.gson.reflect.TypeToken; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import com.thoughtspot.client.JSON; +import java.io.IOException; +import java.io.Serializable; +import java.util.Arrays; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Objects; +import org.openapitools.jackson.nullable.JsonNullable; + +/** ObjectPrivilegesOfMetadataResponse */ +@javax.annotation.Generated( + value = "org.openapitools.codegen.languages.JavaClientCodegen", + comments = "Generator version: 7.12.0") +public class ObjectPrivilegesOfMetadataResponse implements Serializable { + private static final long serialVersionUID = 1L; + + public static final String SERIALIZED_NAME_METADATA_OBJECT_PRIVILEGES = + "metadata_object_privileges"; + + @SerializedName(SERIALIZED_NAME_METADATA_OBJECT_PRIVILEGES) + @javax.annotation.Nullable + private Object metadataObjectPrivileges; + + public ObjectPrivilegesOfMetadataResponse() {} + + public ObjectPrivilegesOfMetadataResponse metadataObjectPrivileges( + @javax.annotation.Nullable Object metadataObjectPrivileges) { + this.metadataObjectPrivileges = metadataObjectPrivileges; + return this; + } + + /** + * Get metadataObjectPrivileges + * + * @return metadataObjectPrivileges + */ + @javax.annotation.Nullable + public Object getMetadataObjectPrivileges() { + return metadataObjectPrivileges; + } + + public void setMetadataObjectPrivileges( + @javax.annotation.Nullable Object metadataObjectPrivileges) { + this.metadataObjectPrivileges = metadataObjectPrivileges; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key name of the property + * @param value value of the property + * @return the ObjectPrivilegesOfMetadataResponse instance itself + */ + public ObjectPrivilegesOfMetadataResponse putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return a map of objects + */ + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key name of the property + * @return an object + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ObjectPrivilegesOfMetadataResponse objectPrivilegesOfMetadataResponse = + (ObjectPrivilegesOfMetadataResponse) o; + return Objects.equals( + this.metadataObjectPrivileges, + objectPrivilegesOfMetadataResponse.metadataObjectPrivileges) + && Objects.equals( + this.additionalProperties, + objectPrivilegesOfMetadataResponse.additionalProperties); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b + || (a != null + && b != null + && a.isPresent() + && b.isPresent() + && Objects.deepEquals(a.get(), b.get())); + } + + @Override + public int hashCode() { + return Objects.hash(metadataObjectPrivileges, additionalProperties); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; + } + return a.isPresent() ? Arrays.deepHashCode(new Object[] {a.get()}) : 31; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ObjectPrivilegesOfMetadataResponse {\n"); + sb.append(" metadataObjectPrivileges: ") + .append(toIndentedString(metadataObjectPrivileges)) + .append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first + * line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("metadata_object_privileges"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to + * ObjectPrivilegesOfMetadataResponse + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!ObjectPrivilegesOfMetadataResponse.openapiRequiredFields + .isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException( + String.format( + "The required field(s) %s in ObjectPrivilegesOfMetadataResponse is" + + " not found in the empty JSON string", + ObjectPrivilegesOfMetadataResponse.openapiRequiredFields + .toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!ObjectPrivilegesOfMetadataResponse.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'ObjectPrivilegesOfMetadataResponse' and + // its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter = + gson.getDelegateAdapter( + this, TypeToken.get(ObjectPrivilegesOfMetadataResponse.class)); + + return (TypeAdapter) + new TypeAdapter() { + @Override + public void write(JsonWriter out, ObjectPrivilegesOfMetadataResponse value) + throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + obj.remove("additionalProperties"); + // serialize additional properties + if (value.getAdditionalProperties() != null) { + for (Map.Entry entry : + value.getAdditionalProperties().entrySet()) { + if (entry.getValue() instanceof String) + obj.addProperty(entry.getKey(), (String) entry.getValue()); + else if (entry.getValue() instanceof Number) + obj.addProperty(entry.getKey(), (Number) entry.getValue()); + else if (entry.getValue() instanceof Boolean) + obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); + else if (entry.getValue() instanceof Character) + obj.addProperty( + entry.getKey(), (Character) entry.getValue()); + else { + JsonElement jsonElement = gson.toJsonTree(entry.getValue()); + if (jsonElement.isJsonArray()) { + obj.add(entry.getKey(), jsonElement.getAsJsonArray()); + } else { + obj.add(entry.getKey(), jsonElement.getAsJsonObject()); + } + } + } + } + elementAdapter.write(out, obj); + } + + @Override + public ObjectPrivilegesOfMetadataResponse read(JsonReader in) + throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // store additional fields in the deserialized instance + ObjectPrivilegesOfMetadataResponse instance = + thisAdapter.fromJsonTree(jsonObj); + for (Map.Entry entry : jsonObj.entrySet()) { + if (!openapiFields.contains(entry.getKey())) { + if (entry.getValue().isJsonPrimitive()) { // primitive type + if (entry.getValue().getAsJsonPrimitive().isString()) + instance.putAdditionalProperty( + entry.getKey(), entry.getValue().getAsString()); + else if (entry.getValue().getAsJsonPrimitive().isNumber()) + instance.putAdditionalProperty( + entry.getKey(), entry.getValue().getAsNumber()); + else if (entry.getValue().getAsJsonPrimitive().isBoolean()) + instance.putAdditionalProperty( + entry.getKey(), + entry.getValue().getAsBoolean()); + else + throw new IllegalArgumentException( + String.format( + "The field `%s` has unknown primitive" + + " type. Value: %s", + entry.getKey(), + entry.getValue().toString())); + } else if (entry.getValue().isJsonArray()) { + instance.putAdditionalProperty( + entry.getKey(), + gson.fromJson(entry.getValue(), List.class)); + } else { // JSON object + instance.putAdditionalProperty( + entry.getKey(), + gson.fromJson(entry.getValue(), HashMap.class)); + } + } + } + return instance; + } + }.nullSafe(); + } + } + + /** + * Create an instance of ObjectPrivilegesOfMetadataResponse given an JSON string + * + * @param jsonString JSON string + * @return An instance of ObjectPrivilegesOfMetadataResponse + * @throws IOException if the JSON string is invalid with respect to + * ObjectPrivilegesOfMetadataResponse + */ + public static ObjectPrivilegesOfMetadataResponse fromJson(String jsonString) + throws IOException { + return JSON.getGson().fromJson(jsonString, ObjectPrivilegesOfMetadataResponse.class); + } + + /** + * Convert an instance of ObjectPrivilegesOfMetadataResponse to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} diff --git a/sdks/java/src/main/java/com/thoughtspot/client/model/Org.java b/sdks/java/src/main/java/com/thoughtspot/client/model/Org.java new file mode 100644 index 000000000..84ee7e56d --- /dev/null +++ b/sdks/java/src/main/java/com/thoughtspot/client/model/Org.java @@ -0,0 +1,329 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client.model; + +import com.google.gson.Gson; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.TypeAdapter; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.annotations.SerializedName; +import com.google.gson.reflect.TypeToken; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import com.thoughtspot.client.JSON; +import java.io.IOException; +import java.io.Serializable; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Objects; + +/** The current Org context of the user. */ +@javax.annotation.Generated( + value = "org.openapitools.codegen.languages.JavaClientCodegen", + comments = "Generator version: 7.12.0") +public class Org implements Serializable { + private static final long serialVersionUID = 1L; + + public static final String SERIALIZED_NAME_ID = "id"; + + @SerializedName(SERIALIZED_NAME_ID) + @javax.annotation.Nonnull + private Integer id; + + public static final String SERIALIZED_NAME_NAME = "name"; + + @SerializedName(SERIALIZED_NAME_NAME) + @javax.annotation.Nonnull + private String name; + + public Org() {} + + public Org id(@javax.annotation.Nonnull Integer id) { + this.id = id; + return this; + } + + /** + * The ID of the object. + * + * @return id + */ + @javax.annotation.Nonnull + public Integer getId() { + return id; + } + + public void setId(@javax.annotation.Nonnull Integer id) { + this.id = id; + } + + public Org name(@javax.annotation.Nonnull String name) { + this.name = name; + return this; + } + + /** + * Name of the object. + * + * @return name + */ + @javax.annotation.Nonnull + public String getName() { + return name; + } + + public void setName(@javax.annotation.Nonnull String name) { + this.name = name; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key name of the property + * @param value value of the property + * @return the Org instance itself + */ + public Org putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return a map of objects + */ + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key name of the property + * @return an object + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + Org org = (Org) o; + return Objects.equals(this.id, org.id) + && Objects.equals(this.name, org.name) + && Objects.equals(this.additionalProperties, org.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(id, name, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class Org {\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first + * line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("id"); + openapiFields.add("name"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + openapiRequiredFields.add("id"); + openapiRequiredFields.add("name"); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to Org + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!Org.openapiRequiredFields + .isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException( + String.format( + "The required field(s) %s in Org is not found in the empty JSON" + + " string", + Org.openapiRequiredFields.toString())); + } + } + + // check to make sure all required properties/fields are present in the JSON string + for (String requiredField : Org.openapiRequiredFields) { + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException( + String.format( + "The required field `%s` is not found in the JSON string: %s", + requiredField, jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if (!jsonObj.get("name").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `name` to be a primitive type in the JSON string" + + " but got `%s`", + jsonObj.get("name").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!Org.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'Org' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter = + gson.getDelegateAdapter(this, TypeToken.get(Org.class)); + + return (TypeAdapter) + new TypeAdapter() { + @Override + public void write(JsonWriter out, Org value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + obj.remove("additionalProperties"); + // serialize additional properties + if (value.getAdditionalProperties() != null) { + for (Map.Entry entry : + value.getAdditionalProperties().entrySet()) { + if (entry.getValue() instanceof String) + obj.addProperty(entry.getKey(), (String) entry.getValue()); + else if (entry.getValue() instanceof Number) + obj.addProperty(entry.getKey(), (Number) entry.getValue()); + else if (entry.getValue() instanceof Boolean) + obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); + else if (entry.getValue() instanceof Character) + obj.addProperty( + entry.getKey(), (Character) entry.getValue()); + else { + JsonElement jsonElement = gson.toJsonTree(entry.getValue()); + if (jsonElement.isJsonArray()) { + obj.add(entry.getKey(), jsonElement.getAsJsonArray()); + } else { + obj.add(entry.getKey(), jsonElement.getAsJsonObject()); + } + } + } + } + elementAdapter.write(out, obj); + } + + @Override + public Org read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // store additional fields in the deserialized instance + Org instance = thisAdapter.fromJsonTree(jsonObj); + for (Map.Entry entry : jsonObj.entrySet()) { + if (!openapiFields.contains(entry.getKey())) { + if (entry.getValue().isJsonPrimitive()) { // primitive type + if (entry.getValue().getAsJsonPrimitive().isString()) + instance.putAdditionalProperty( + entry.getKey(), entry.getValue().getAsString()); + else if (entry.getValue().getAsJsonPrimitive().isNumber()) + instance.putAdditionalProperty( + entry.getKey(), entry.getValue().getAsNumber()); + else if (entry.getValue().getAsJsonPrimitive().isBoolean()) + instance.putAdditionalProperty( + entry.getKey(), + entry.getValue().getAsBoolean()); + else + throw new IllegalArgumentException( + String.format( + "The field `%s` has unknown primitive" + + " type. Value: %s", + entry.getKey(), + entry.getValue().toString())); + } else if (entry.getValue().isJsonArray()) { + instance.putAdditionalProperty( + entry.getKey(), + gson.fromJson(entry.getValue(), List.class)); + } else { // JSON object + instance.putAdditionalProperty( + entry.getKey(), + gson.fromJson(entry.getValue(), HashMap.class)); + } + } + } + return instance; + } + }.nullSafe(); + } + } + + /** + * Create an instance of Org given an JSON string + * + * @param jsonString JSON string + * @return An instance of Org + * @throws IOException if the JSON string is invalid with respect to Org + */ + public static Org fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, Org.class); + } + + /** + * Convert an instance of Org to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} diff --git a/sdks/java/src/main/java/com/thoughtspot/client/model/OrgChannelConfigInput.java b/sdks/java/src/main/java/com/thoughtspot/client/model/OrgChannelConfigInput.java new file mode 100644 index 000000000..40b581522 --- /dev/null +++ b/sdks/java/src/main/java/com/thoughtspot/client/model/OrgChannelConfigInput.java @@ -0,0 +1,573 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client.model; + +import com.google.gson.Gson; +import com.google.gson.JsonArray; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.TypeAdapter; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.reflect.TypeToken; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import com.thoughtspot.client.JSON; +import java.io.IOException; +import java.io.Serializable; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Objects; +import org.openapitools.jackson.nullable.JsonNullable; + +/** OrgChannelConfigInput */ +@javax.annotation.Generated( + value = "org.openapitools.codegen.languages.JavaClientCodegen", + comments = "Generator version: 7.12.0") +public class OrgChannelConfigInput implements Serializable { + private static final long serialVersionUID = 1L; + + public static final String SERIALIZED_NAME_ORG_IDENTIFIER = "org_identifier"; + + @SerializedName(SERIALIZED_NAME_ORG_IDENTIFIER) + @javax.annotation.Nonnull + private String orgIdentifier; + + /** + * Operation to perform. REPLACE: Update preferences (default). RESET: Remove org-specific + * configurations, causing fallback to cluster-level preferences. + */ + @JsonAdapter(OperationEnum.Adapter.class) + public enum OperationEnum { + REPLACE("REPLACE"), + + RESET("RESET"); + + private String value; + + OperationEnum(String value) { + this.value = value; + } + + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + public static OperationEnum fromValue(String value) { + for (OperationEnum b : OperationEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + return null; + } + + public static class Adapter extends TypeAdapter { + @Override + public void write(final JsonWriter jsonWriter, final OperationEnum enumeration) + throws IOException { + jsonWriter.value(enumeration.getValue()); + } + + @Override + public OperationEnum read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + return OperationEnum.fromValue(value); + } + } + + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + String value = jsonElement.getAsString(); + OperationEnum.fromValue(value); + } + } + + public static final String SERIALIZED_NAME_OPERATION = "operation"; + + @SerializedName(SERIALIZED_NAME_OPERATION) + @javax.annotation.Nullable + private OperationEnum operation = OperationEnum.REPLACE; + + public static final String SERIALIZED_NAME_PREFERENCES = "preferences"; + + @SerializedName(SERIALIZED_NAME_PREFERENCES) + @javax.annotation.Nullable + private List preferences; + + /** Gets or Sets resetEvents */ + @JsonAdapter(ResetEventsEnum.Adapter.class) + public enum ResetEventsEnum { + LIVEBOARD_SCHEDULE("LIVEBOARD_SCHEDULE"); + + private String value; + + ResetEventsEnum(String value) { + this.value = value; + } + + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + public static ResetEventsEnum fromValue(String value) { + for (ResetEventsEnum b : ResetEventsEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + + public static class Adapter extends TypeAdapter { + @Override + public void write(final JsonWriter jsonWriter, final ResetEventsEnum enumeration) + throws IOException { + jsonWriter.value(enumeration.getValue()); + } + + @Override + public ResetEventsEnum read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + return ResetEventsEnum.fromValue(value); + } + } + + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + String value = jsonElement.getAsString(); + ResetEventsEnum.fromValue(value); + } + } + + public static final String SERIALIZED_NAME_RESET_EVENTS = "reset_events"; + + @SerializedName(SERIALIZED_NAME_RESET_EVENTS) + @javax.annotation.Nullable + private List resetEvents; + + public OrgChannelConfigInput() {} + + public OrgChannelConfigInput orgIdentifier(@javax.annotation.Nonnull String orgIdentifier) { + this.orgIdentifier = orgIdentifier; + return this; + } + + /** + * Unique identifier or name of the org + * + * @return orgIdentifier + */ + @javax.annotation.Nonnull + public String getOrgIdentifier() { + return orgIdentifier; + } + + public void setOrgIdentifier(@javax.annotation.Nonnull String orgIdentifier) { + this.orgIdentifier = orgIdentifier; + } + + public OrgChannelConfigInput operation(@javax.annotation.Nullable OperationEnum operation) { + this.operation = operation; + return this; + } + + /** + * Operation to perform. REPLACE: Update preferences (default). RESET: Remove org-specific + * configurations, causing fallback to cluster-level preferences. + * + * @return operation + */ + @javax.annotation.Nullable + public OperationEnum getOperation() { + return operation; + } + + public void setOperation(@javax.annotation.Nullable OperationEnum operation) { + this.operation = operation; + } + + public OrgChannelConfigInput preferences( + @javax.annotation.Nullable List preferences) { + this.preferences = preferences; + return this; + } + + public OrgChannelConfigInput addPreferencesItem(EventChannelConfigInput preferencesItem) { + if (this.preferences == null) { + this.preferences = new ArrayList<>(); + } + this.preferences.add(preferencesItem); + return this; + } + + /** + * Event-specific configurations. Required for REPLACE operation. + * + * @return preferences + */ + @javax.annotation.Nullable + public List getPreferences() { + return preferences; + } + + public void setPreferences( + @javax.annotation.Nullable List preferences) { + this.preferences = preferences; + } + + public OrgChannelConfigInput resetEvents( + @javax.annotation.Nullable List resetEvents) { + this.resetEvents = resetEvents; + return this; + } + + public OrgChannelConfigInput addResetEventsItem(ResetEventsEnum resetEventsItem) { + if (this.resetEvents == null) { + this.resetEvents = new ArrayList<>(); + } + this.resetEvents.add(resetEventsItem); + return this; + } + + /** + * Event types to reset. Required for RESET operation. Org-specific configurations for these + * events will be removed, causing fallback to cluster-level preferences. + * + * @return resetEvents + */ + @javax.annotation.Nullable + public List getResetEvents() { + return resetEvents; + } + + public void setResetEvents(@javax.annotation.Nullable List resetEvents) { + this.resetEvents = resetEvents; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key name of the property + * @param value value of the property + * @return the OrgChannelConfigInput instance itself + */ + public OrgChannelConfigInput putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return a map of objects + */ + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key name of the property + * @return an object + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + OrgChannelConfigInput orgChannelConfigInput = (OrgChannelConfigInput) o; + return Objects.equals(this.orgIdentifier, orgChannelConfigInput.orgIdentifier) + && Objects.equals(this.operation, orgChannelConfigInput.operation) + && Objects.equals(this.preferences, orgChannelConfigInput.preferences) + && Objects.equals(this.resetEvents, orgChannelConfigInput.resetEvents) + && Objects.equals( + this.additionalProperties, orgChannelConfigInput.additionalProperties); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b + || (a != null + && b != null + && a.isPresent() + && b.isPresent() + && Objects.deepEquals(a.get(), b.get())); + } + + @Override + public int hashCode() { + return Objects.hash( + orgIdentifier, operation, preferences, resetEvents, additionalProperties); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; + } + return a.isPresent() ? Arrays.deepHashCode(new Object[] {a.get()}) : 31; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class OrgChannelConfigInput {\n"); + sb.append(" orgIdentifier: ").append(toIndentedString(orgIdentifier)).append("\n"); + sb.append(" operation: ").append(toIndentedString(operation)).append("\n"); + sb.append(" preferences: ").append(toIndentedString(preferences)).append("\n"); + sb.append(" resetEvents: ").append(toIndentedString(resetEvents)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first + * line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("org_identifier"); + openapiFields.add("operation"); + openapiFields.add("preferences"); + openapiFields.add("reset_events"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + openapiRequiredFields.add("org_identifier"); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to OrgChannelConfigInput + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!OrgChannelConfigInput.openapiRequiredFields + .isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException( + String.format( + "The required field(s) %s in OrgChannelConfigInput is not found in" + + " the empty JSON string", + OrgChannelConfigInput.openapiRequiredFields.toString())); + } + } + + // check to make sure all required properties/fields are present in the JSON string + for (String requiredField : OrgChannelConfigInput.openapiRequiredFields) { + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException( + String.format( + "The required field `%s` is not found in the JSON string: %s", + requiredField, jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if (!jsonObj.get("org_identifier").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `org_identifier` to be a primitive type in the" + + " JSON string but got `%s`", + jsonObj.get("org_identifier").toString())); + } + if ((jsonObj.get("operation") != null && !jsonObj.get("operation").isJsonNull()) + && !jsonObj.get("operation").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `operation` to be a primitive type in the JSON" + + " string but got `%s`", + jsonObj.get("operation").toString())); + } + // validate the optional field `operation` + if (jsonObj.get("operation") != null && !jsonObj.get("operation").isJsonNull()) { + OperationEnum.validateJsonElement(jsonObj.get("operation")); + } + if (jsonObj.get("preferences") != null && !jsonObj.get("preferences").isJsonNull()) { + JsonArray jsonArraypreferences = jsonObj.getAsJsonArray("preferences"); + if (jsonArraypreferences != null) { + // ensure the json data is an array + if (!jsonObj.get("preferences").isJsonArray()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `preferences` to be an array in the JSON" + + " string but got `%s`", + jsonObj.get("preferences").toString())); + } + + // validate the optional field `preferences` (array) + for (int i = 0; i < jsonArraypreferences.size(); i++) { + EventChannelConfigInput.validateJsonElement(jsonArraypreferences.get(i)); + } + ; + } + } + // ensure the optional json data is an array if present + if (jsonObj.get("reset_events") != null + && !jsonObj.get("reset_events").isJsonNull() + && !jsonObj.get("reset_events").isJsonArray()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `reset_events` to be an array in the JSON string" + + " but got `%s`", + jsonObj.get("reset_events").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!OrgChannelConfigInput.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'OrgChannelConfigInput' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter = + gson.getDelegateAdapter(this, TypeToken.get(OrgChannelConfigInput.class)); + + return (TypeAdapter) + new TypeAdapter() { + @Override + public void write(JsonWriter out, OrgChannelConfigInput value) + throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + obj.remove("additionalProperties"); + // serialize additional properties + if (value.getAdditionalProperties() != null) { + for (Map.Entry entry : + value.getAdditionalProperties().entrySet()) { + if (entry.getValue() instanceof String) + obj.addProperty(entry.getKey(), (String) entry.getValue()); + else if (entry.getValue() instanceof Number) + obj.addProperty(entry.getKey(), (Number) entry.getValue()); + else if (entry.getValue() instanceof Boolean) + obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); + else if (entry.getValue() instanceof Character) + obj.addProperty( + entry.getKey(), (Character) entry.getValue()); + else { + JsonElement jsonElement = gson.toJsonTree(entry.getValue()); + if (jsonElement.isJsonArray()) { + obj.add(entry.getKey(), jsonElement.getAsJsonArray()); + } else { + obj.add(entry.getKey(), jsonElement.getAsJsonObject()); + } + } + } + } + elementAdapter.write(out, obj); + } + + @Override + public OrgChannelConfigInput read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // store additional fields in the deserialized instance + OrgChannelConfigInput instance = thisAdapter.fromJsonTree(jsonObj); + for (Map.Entry entry : jsonObj.entrySet()) { + if (!openapiFields.contains(entry.getKey())) { + if (entry.getValue().isJsonPrimitive()) { // primitive type + if (entry.getValue().getAsJsonPrimitive().isString()) + instance.putAdditionalProperty( + entry.getKey(), entry.getValue().getAsString()); + else if (entry.getValue().getAsJsonPrimitive().isNumber()) + instance.putAdditionalProperty( + entry.getKey(), entry.getValue().getAsNumber()); + else if (entry.getValue().getAsJsonPrimitive().isBoolean()) + instance.putAdditionalProperty( + entry.getKey(), + entry.getValue().getAsBoolean()); + else + throw new IllegalArgumentException( + String.format( + "The field `%s` has unknown primitive" + + " type. Value: %s", + entry.getKey(), + entry.getValue().toString())); + } else if (entry.getValue().isJsonArray()) { + instance.putAdditionalProperty( + entry.getKey(), + gson.fromJson(entry.getValue(), List.class)); + } else { // JSON object + instance.putAdditionalProperty( + entry.getKey(), + gson.fromJson(entry.getValue(), HashMap.class)); + } + } + } + return instance; + } + }.nullSafe(); + } + } + + /** + * Create an instance of OrgChannelConfigInput given an JSON string + * + * @param jsonString JSON string + * @return An instance of OrgChannelConfigInput + * @throws IOException if the JSON string is invalid with respect to OrgChannelConfigInput + */ + public static OrgChannelConfigInput fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, OrgChannelConfigInput.class); + } + + /** + * Convert an instance of OrgChannelConfigInput to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} diff --git a/sdks/java/src/main/java/com/thoughtspot/client/model/OrgChannelConfigResponse.java b/sdks/java/src/main/java/com/thoughtspot/client/model/OrgChannelConfigResponse.java new file mode 100644 index 000000000..08f92aec2 --- /dev/null +++ b/sdks/java/src/main/java/com/thoughtspot/client/model/OrgChannelConfigResponse.java @@ -0,0 +1,353 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client.model; + +import com.google.gson.Gson; +import com.google.gson.JsonArray; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.TypeAdapter; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.annotations.SerializedName; +import com.google.gson.reflect.TypeToken; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import com.thoughtspot.client.JSON; +import java.io.IOException; +import java.io.Serializable; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Objects; + +/** OrgChannelConfigResponse */ +@javax.annotation.Generated( + value = "org.openapitools.codegen.languages.JavaClientCodegen", + comments = "Generator version: 7.12.0") +public class OrgChannelConfigResponse implements Serializable { + private static final long serialVersionUID = 1L; + + public static final String SERIALIZED_NAME_ORG = "org"; + + @SerializedName(SERIALIZED_NAME_ORG) + @javax.annotation.Nonnull + private OrgDetails org; + + public static final String SERIALIZED_NAME_PREFERENCES = "preferences"; + + @SerializedName(SERIALIZED_NAME_PREFERENCES) + @javax.annotation.Nonnull + private List preferences; + + public OrgChannelConfigResponse() {} + + public OrgChannelConfigResponse org(@javax.annotation.Nonnull OrgDetails org) { + this.org = org; + return this; + } + + /** + * Get org + * + * @return org + */ + @javax.annotation.Nonnull + public OrgDetails getOrg() { + return org; + } + + public void setOrg(@javax.annotation.Nonnull OrgDetails org) { + this.org = org; + } + + public OrgChannelConfigResponse preferences( + @javax.annotation.Nonnull List preferences) { + this.preferences = preferences; + return this; + } + + public OrgChannelConfigResponse addPreferencesItem(EventChannelConfig preferencesItem) { + if (this.preferences == null) { + this.preferences = new ArrayList<>(); + } + this.preferences.add(preferencesItem); + return this; + } + + /** + * Event-specific communication channel configurations for this org + * + * @return preferences + */ + @javax.annotation.Nonnull + public List getPreferences() { + return preferences; + } + + public void setPreferences(@javax.annotation.Nonnull List preferences) { + this.preferences = preferences; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key name of the property + * @param value value of the property + * @return the OrgChannelConfigResponse instance itself + */ + public OrgChannelConfigResponse putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return a map of objects + */ + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key name of the property + * @return an object + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + OrgChannelConfigResponse orgChannelConfigResponse = (OrgChannelConfigResponse) o; + return Objects.equals(this.org, orgChannelConfigResponse.org) + && Objects.equals(this.preferences, orgChannelConfigResponse.preferences) + && Objects.equals( + this.additionalProperties, orgChannelConfigResponse.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(org, preferences, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class OrgChannelConfigResponse {\n"); + sb.append(" org: ").append(toIndentedString(org)).append("\n"); + sb.append(" preferences: ").append(toIndentedString(preferences)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first + * line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("org"); + openapiFields.add("preferences"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + openapiRequiredFields.add("org"); + openapiRequiredFields.add("preferences"); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to OrgChannelConfigResponse + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!OrgChannelConfigResponse.openapiRequiredFields + .isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException( + String.format( + "The required field(s) %s in OrgChannelConfigResponse is not found" + + " in the empty JSON string", + OrgChannelConfigResponse.openapiRequiredFields.toString())); + } + } + + // check to make sure all required properties/fields are present in the JSON string + for (String requiredField : OrgChannelConfigResponse.openapiRequiredFields) { + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException( + String.format( + "The required field `%s` is not found in the JSON string: %s", + requiredField, jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // validate the required field `org` + OrgDetails.validateJsonElement(jsonObj.get("org")); + // ensure the json data is an array + if (!jsonObj.get("preferences").isJsonArray()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `preferences` to be an array in the JSON string" + + " but got `%s`", + jsonObj.get("preferences").toString())); + } + + JsonArray jsonArraypreferences = jsonObj.getAsJsonArray("preferences"); + // validate the required field `preferences` (array) + for (int i = 0; i < jsonArraypreferences.size(); i++) { + EventChannelConfig.validateJsonElement(jsonArraypreferences.get(i)); + } + ; + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!OrgChannelConfigResponse.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'OrgChannelConfigResponse' and its + // subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter = + gson.getDelegateAdapter(this, TypeToken.get(OrgChannelConfigResponse.class)); + + return (TypeAdapter) + new TypeAdapter() { + @Override + public void write(JsonWriter out, OrgChannelConfigResponse value) + throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + obj.remove("additionalProperties"); + // serialize additional properties + if (value.getAdditionalProperties() != null) { + for (Map.Entry entry : + value.getAdditionalProperties().entrySet()) { + if (entry.getValue() instanceof String) + obj.addProperty(entry.getKey(), (String) entry.getValue()); + else if (entry.getValue() instanceof Number) + obj.addProperty(entry.getKey(), (Number) entry.getValue()); + else if (entry.getValue() instanceof Boolean) + obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); + else if (entry.getValue() instanceof Character) + obj.addProperty( + entry.getKey(), (Character) entry.getValue()); + else { + JsonElement jsonElement = gson.toJsonTree(entry.getValue()); + if (jsonElement.isJsonArray()) { + obj.add(entry.getKey(), jsonElement.getAsJsonArray()); + } else { + obj.add(entry.getKey(), jsonElement.getAsJsonObject()); + } + } + } + } + elementAdapter.write(out, obj); + } + + @Override + public OrgChannelConfigResponse read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // store additional fields in the deserialized instance + OrgChannelConfigResponse instance = thisAdapter.fromJsonTree(jsonObj); + for (Map.Entry entry : jsonObj.entrySet()) { + if (!openapiFields.contains(entry.getKey())) { + if (entry.getValue().isJsonPrimitive()) { // primitive type + if (entry.getValue().getAsJsonPrimitive().isString()) + instance.putAdditionalProperty( + entry.getKey(), entry.getValue().getAsString()); + else if (entry.getValue().getAsJsonPrimitive().isNumber()) + instance.putAdditionalProperty( + entry.getKey(), entry.getValue().getAsNumber()); + else if (entry.getValue().getAsJsonPrimitive().isBoolean()) + instance.putAdditionalProperty( + entry.getKey(), + entry.getValue().getAsBoolean()); + else + throw new IllegalArgumentException( + String.format( + "The field `%s` has unknown primitive" + + " type. Value: %s", + entry.getKey(), + entry.getValue().toString())); + } else if (entry.getValue().isJsonArray()) { + instance.putAdditionalProperty( + entry.getKey(), + gson.fromJson(entry.getValue(), List.class)); + } else { // JSON object + instance.putAdditionalProperty( + entry.getKey(), + gson.fromJson(entry.getValue(), HashMap.class)); + } + } + } + return instance; + } + }.nullSafe(); + } + } + + /** + * Create an instance of OrgChannelConfigResponse given an JSON string + * + * @param jsonString JSON string + * @return An instance of OrgChannelConfigResponse + * @throws IOException if the JSON string is invalid with respect to OrgChannelConfigResponse + */ + public static OrgChannelConfigResponse fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, OrgChannelConfigResponse.class); + } + + /** + * Convert an instance of OrgChannelConfigResponse to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} diff --git a/sdks/java/src/main/java/com/thoughtspot/client/model/OrgDetails.java b/sdks/java/src/main/java/com/thoughtspot/client/model/OrgDetails.java new file mode 100644 index 000000000..49af727f7 --- /dev/null +++ b/sdks/java/src/main/java/com/thoughtspot/client/model/OrgDetails.java @@ -0,0 +1,336 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client.model; + +import com.google.gson.Gson; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.TypeAdapter; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.annotations.SerializedName; +import com.google.gson.reflect.TypeToken; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import com.thoughtspot.client.JSON; +import java.io.IOException; +import java.io.Serializable; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Objects; + +/** OrgDetails */ +@javax.annotation.Generated( + value = "org.openapitools.codegen.languages.JavaClientCodegen", + comments = "Generator version: 7.12.0") +public class OrgDetails implements Serializable { + private static final long serialVersionUID = 1L; + + public static final String SERIALIZED_NAME_ID = "id"; + + @SerializedName(SERIALIZED_NAME_ID) + @javax.annotation.Nonnull + private String id; + + public static final String SERIALIZED_NAME_NAME = "name"; + + @SerializedName(SERIALIZED_NAME_NAME) + @javax.annotation.Nonnull + private String name; + + public OrgDetails() {} + + public OrgDetails id(@javax.annotation.Nonnull String id) { + this.id = id; + return this; + } + + /** + * Unique id of the org + * + * @return id + */ + @javax.annotation.Nonnull + public String getId() { + return id; + } + + public void setId(@javax.annotation.Nonnull String id) { + this.id = id; + } + + public OrgDetails name(@javax.annotation.Nonnull String name) { + this.name = name; + return this; + } + + /** + * Name of the org + * + * @return name + */ + @javax.annotation.Nonnull + public String getName() { + return name; + } + + public void setName(@javax.annotation.Nonnull String name) { + this.name = name; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key name of the property + * @param value value of the property + * @return the OrgDetails instance itself + */ + public OrgDetails putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return a map of objects + */ + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key name of the property + * @return an object + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + OrgDetails orgDetails = (OrgDetails) o; + return Objects.equals(this.id, orgDetails.id) + && Objects.equals(this.name, orgDetails.name) + && Objects.equals(this.additionalProperties, orgDetails.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(id, name, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class OrgDetails {\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first + * line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("id"); + openapiFields.add("name"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + openapiRequiredFields.add("id"); + openapiRequiredFields.add("name"); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to OrgDetails + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!OrgDetails.openapiRequiredFields + .isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException( + String.format( + "The required field(s) %s in OrgDetails is not found in the empty" + + " JSON string", + OrgDetails.openapiRequiredFields.toString())); + } + } + + // check to make sure all required properties/fields are present in the JSON string + for (String requiredField : OrgDetails.openapiRequiredFields) { + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException( + String.format( + "The required field `%s` is not found in the JSON string: %s", + requiredField, jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if (!jsonObj.get("id").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `id` to be a primitive type in the JSON string but" + + " got `%s`", + jsonObj.get("id").toString())); + } + if (!jsonObj.get("name").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `name` to be a primitive type in the JSON string" + + " but got `%s`", + jsonObj.get("name").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!OrgDetails.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'OrgDetails' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter = + gson.getDelegateAdapter(this, TypeToken.get(OrgDetails.class)); + + return (TypeAdapter) + new TypeAdapter() { + @Override + public void write(JsonWriter out, OrgDetails value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + obj.remove("additionalProperties"); + // serialize additional properties + if (value.getAdditionalProperties() != null) { + for (Map.Entry entry : + value.getAdditionalProperties().entrySet()) { + if (entry.getValue() instanceof String) + obj.addProperty(entry.getKey(), (String) entry.getValue()); + else if (entry.getValue() instanceof Number) + obj.addProperty(entry.getKey(), (Number) entry.getValue()); + else if (entry.getValue() instanceof Boolean) + obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); + else if (entry.getValue() instanceof Character) + obj.addProperty( + entry.getKey(), (Character) entry.getValue()); + else { + JsonElement jsonElement = gson.toJsonTree(entry.getValue()); + if (jsonElement.isJsonArray()) { + obj.add(entry.getKey(), jsonElement.getAsJsonArray()); + } else { + obj.add(entry.getKey(), jsonElement.getAsJsonObject()); + } + } + } + } + elementAdapter.write(out, obj); + } + + @Override + public OrgDetails read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // store additional fields in the deserialized instance + OrgDetails instance = thisAdapter.fromJsonTree(jsonObj); + for (Map.Entry entry : jsonObj.entrySet()) { + if (!openapiFields.contains(entry.getKey())) { + if (entry.getValue().isJsonPrimitive()) { // primitive type + if (entry.getValue().getAsJsonPrimitive().isString()) + instance.putAdditionalProperty( + entry.getKey(), entry.getValue().getAsString()); + else if (entry.getValue().getAsJsonPrimitive().isNumber()) + instance.putAdditionalProperty( + entry.getKey(), entry.getValue().getAsNumber()); + else if (entry.getValue().getAsJsonPrimitive().isBoolean()) + instance.putAdditionalProperty( + entry.getKey(), + entry.getValue().getAsBoolean()); + else + throw new IllegalArgumentException( + String.format( + "The field `%s` has unknown primitive" + + " type. Value: %s", + entry.getKey(), + entry.getValue().toString())); + } else if (entry.getValue().isJsonArray()) { + instance.putAdditionalProperty( + entry.getKey(), + gson.fromJson(entry.getValue(), List.class)); + } else { // JSON object + instance.putAdditionalProperty( + entry.getKey(), + gson.fromJson(entry.getValue(), HashMap.class)); + } + } + } + return instance; + } + }.nullSafe(); + } + } + + /** + * Create an instance of OrgDetails given an JSON string + * + * @param jsonString JSON string + * @return An instance of OrgDetails + * @throws IOException if the JSON string is invalid with respect to OrgDetails + */ + public static OrgDetails fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, OrgDetails.class); + } + + /** + * Convert an instance of OrgDetails to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} diff --git a/sdks/java/src/main/java/com/thoughtspot/client/model/OrgInfo.java b/sdks/java/src/main/java/com/thoughtspot/client/model/OrgInfo.java new file mode 100644 index 000000000..ece2c5a6d --- /dev/null +++ b/sdks/java/src/main/java/com/thoughtspot/client/model/OrgInfo.java @@ -0,0 +1,347 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client.model; + +import com.google.gson.Gson; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.TypeAdapter; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.annotations.SerializedName; +import com.google.gson.reflect.TypeToken; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import com.thoughtspot.client.JSON; +import java.io.IOException; +import java.io.Serializable; +import java.util.Arrays; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Objects; +import org.openapitools.jackson.nullable.JsonNullable; + +/** OrgInfo */ +@javax.annotation.Generated( + value = "org.openapitools.codegen.languages.JavaClientCodegen", + comments = "Generator version: 7.12.0") +public class OrgInfo implements Serializable { + private static final long serialVersionUID = 1L; + + public static final String SERIALIZED_NAME_ID = "id"; + + @SerializedName(SERIALIZED_NAME_ID) + @javax.annotation.Nonnull + private Integer id; + + public static final String SERIALIZED_NAME_NAME = "name"; + + @SerializedName(SERIALIZED_NAME_NAME) + @javax.annotation.Nullable + private String name; + + public OrgInfo() {} + + public OrgInfo id(@javax.annotation.Nonnull Integer id) { + this.id = id; + return this; + } + + /** + * Id. + * + * @return id + */ + @javax.annotation.Nonnull + public Integer getId() { + return id; + } + + public void setId(@javax.annotation.Nonnull Integer id) { + this.id = id; + } + + public OrgInfo name(@javax.annotation.Nullable String name) { + this.name = name; + return this; + } + + /** + * Name. + * + * @return name + */ + @javax.annotation.Nullable + public String getName() { + return name; + } + + public void setName(@javax.annotation.Nullable String name) { + this.name = name; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key name of the property + * @param value value of the property + * @return the OrgInfo instance itself + */ + public OrgInfo putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return a map of objects + */ + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key name of the property + * @return an object + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + OrgInfo orgInfo = (OrgInfo) o; + return Objects.equals(this.id, orgInfo.id) + && Objects.equals(this.name, orgInfo.name) + && Objects.equals(this.additionalProperties, orgInfo.additionalProperties); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b + || (a != null + && b != null + && a.isPresent() + && b.isPresent() + && Objects.deepEquals(a.get(), b.get())); + } + + @Override + public int hashCode() { + return Objects.hash(id, name, additionalProperties); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; + } + return a.isPresent() ? Arrays.deepHashCode(new Object[] {a.get()}) : 31; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class OrgInfo {\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first + * line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("id"); + openapiFields.add("name"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + openapiRequiredFields.add("id"); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to OrgInfo + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!OrgInfo.openapiRequiredFields + .isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException( + String.format( + "The required field(s) %s in OrgInfo is not found in the empty" + + " JSON string", + OrgInfo.openapiRequiredFields.toString())); + } + } + + // check to make sure all required properties/fields are present in the JSON string + for (String requiredField : OrgInfo.openapiRequiredFields) { + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException( + String.format( + "The required field `%s` is not found in the JSON string: %s", + requiredField, jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if ((jsonObj.get("name") != null && !jsonObj.get("name").isJsonNull()) + && !jsonObj.get("name").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `name` to be a primitive type in the JSON string" + + " but got `%s`", + jsonObj.get("name").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!OrgInfo.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'OrgInfo' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter = + gson.getDelegateAdapter(this, TypeToken.get(OrgInfo.class)); + + return (TypeAdapter) + new TypeAdapter() { + @Override + public void write(JsonWriter out, OrgInfo value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + obj.remove("additionalProperties"); + // serialize additional properties + if (value.getAdditionalProperties() != null) { + for (Map.Entry entry : + value.getAdditionalProperties().entrySet()) { + if (entry.getValue() instanceof String) + obj.addProperty(entry.getKey(), (String) entry.getValue()); + else if (entry.getValue() instanceof Number) + obj.addProperty(entry.getKey(), (Number) entry.getValue()); + else if (entry.getValue() instanceof Boolean) + obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); + else if (entry.getValue() instanceof Character) + obj.addProperty( + entry.getKey(), (Character) entry.getValue()); + else { + JsonElement jsonElement = gson.toJsonTree(entry.getValue()); + if (jsonElement.isJsonArray()) { + obj.add(entry.getKey(), jsonElement.getAsJsonArray()); + } else { + obj.add(entry.getKey(), jsonElement.getAsJsonObject()); + } + } + } + } + elementAdapter.write(out, obj); + } + + @Override + public OrgInfo read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // store additional fields in the deserialized instance + OrgInfo instance = thisAdapter.fromJsonTree(jsonObj); + for (Map.Entry entry : jsonObj.entrySet()) { + if (!openapiFields.contains(entry.getKey())) { + if (entry.getValue().isJsonPrimitive()) { // primitive type + if (entry.getValue().getAsJsonPrimitive().isString()) + instance.putAdditionalProperty( + entry.getKey(), entry.getValue().getAsString()); + else if (entry.getValue().getAsJsonPrimitive().isNumber()) + instance.putAdditionalProperty( + entry.getKey(), entry.getValue().getAsNumber()); + else if (entry.getValue().getAsJsonPrimitive().isBoolean()) + instance.putAdditionalProperty( + entry.getKey(), + entry.getValue().getAsBoolean()); + else + throw new IllegalArgumentException( + String.format( + "The field `%s` has unknown primitive" + + " type. Value: %s", + entry.getKey(), + entry.getValue().toString())); + } else if (entry.getValue().isJsonArray()) { + instance.putAdditionalProperty( + entry.getKey(), + gson.fromJson(entry.getValue(), List.class)); + } else { // JSON object + instance.putAdditionalProperty( + entry.getKey(), + gson.fromJson(entry.getValue(), HashMap.class)); + } + } + } + return instance; + } + }.nullSafe(); + } + } + + /** + * Create an instance of OrgInfo given an JSON string + * + * @param jsonString JSON string + * @return An instance of OrgInfo + * @throws IOException if the JSON string is invalid with respect to OrgInfo + */ + public static OrgInfo fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, OrgInfo.class); + } + + /** + * Convert an instance of OrgInfo to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} diff --git a/sdks/java/src/main/java/com/thoughtspot/client/model/OrgNonEmbedAccess.java b/sdks/java/src/main/java/com/thoughtspot/client/model/OrgNonEmbedAccess.java new file mode 100644 index 000000000..e9364833e --- /dev/null +++ b/sdks/java/src/main/java/com/thoughtspot/client/model/OrgNonEmbedAccess.java @@ -0,0 +1,364 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client.model; + +import com.google.gson.Gson; +import com.google.gson.JsonArray; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.TypeAdapter; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.annotations.SerializedName; +import com.google.gson.reflect.TypeToken; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import com.thoughtspot.client.JSON; +import java.io.IOException; +import java.io.Serializable; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Objects; +import org.openapitools.jackson.nullable.JsonNullable; + +/** Org-level non-embed access configuration. */ +@javax.annotation.Generated( + value = "org.openapitools.codegen.languages.JavaClientCodegen", + comments = "Generator version: 7.12.0") +public class OrgNonEmbedAccess implements Serializable { + private static final long serialVersionUID = 1L; + + public static final String SERIALIZED_NAME_BLOCK_FULL_APP_ACCESS = "block_full_app_access"; + + @SerializedName(SERIALIZED_NAME_BLOCK_FULL_APP_ACCESS) + @javax.annotation.Nullable + private Boolean blockFullAppAccess; + + public static final String SERIALIZED_NAME_GROUPS_WITH_ACCESS = "groups_with_access"; + + @SerializedName(SERIALIZED_NAME_GROUPS_WITH_ACCESS) + @javax.annotation.Nullable + private List groupsWithAccess; + + public OrgNonEmbedAccess() {} + + public OrgNonEmbedAccess blockFullAppAccess( + @javax.annotation.Nullable Boolean blockFullAppAccess) { + this.blockFullAppAccess = blockFullAppAccess; + return this; + } + + /** + * Block full application access for non-embedded usage. + * + * @return blockFullAppAccess + */ + @javax.annotation.Nullable + public Boolean getBlockFullAppAccess() { + return blockFullAppAccess; + } + + public void setBlockFullAppAccess(@javax.annotation.Nullable Boolean blockFullAppAccess) { + this.blockFullAppAccess = blockFullAppAccess; + } + + public OrgNonEmbedAccess groupsWithAccess( + @javax.annotation.Nullable List groupsWithAccess) { + this.groupsWithAccess = groupsWithAccess; + return this; + } + + public OrgNonEmbedAccess addGroupsWithAccessItem(GroupInfo groupsWithAccessItem) { + if (this.groupsWithAccess == null) { + this.groupsWithAccess = new ArrayList<>(); + } + this.groupsWithAccess.add(groupsWithAccessItem); + return this; + } + + /** + * Groups that have non-embed full app access. + * + * @return groupsWithAccess + */ + @javax.annotation.Nullable + public List getGroupsWithAccess() { + return groupsWithAccess; + } + + public void setGroupsWithAccess(@javax.annotation.Nullable List groupsWithAccess) { + this.groupsWithAccess = groupsWithAccess; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key name of the property + * @param value value of the property + * @return the OrgNonEmbedAccess instance itself + */ + public OrgNonEmbedAccess putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return a map of objects + */ + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key name of the property + * @return an object + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + OrgNonEmbedAccess orgNonEmbedAccess = (OrgNonEmbedAccess) o; + return Objects.equals(this.blockFullAppAccess, orgNonEmbedAccess.blockFullAppAccess) + && Objects.equals(this.groupsWithAccess, orgNonEmbedAccess.groupsWithAccess) + && Objects.equals( + this.additionalProperties, orgNonEmbedAccess.additionalProperties); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b + || (a != null + && b != null + && a.isPresent() + && b.isPresent() + && Objects.deepEquals(a.get(), b.get())); + } + + @Override + public int hashCode() { + return Objects.hash(blockFullAppAccess, groupsWithAccess, additionalProperties); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; + } + return a.isPresent() ? Arrays.deepHashCode(new Object[] {a.get()}) : 31; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class OrgNonEmbedAccess {\n"); + sb.append(" blockFullAppAccess: ") + .append(toIndentedString(blockFullAppAccess)) + .append("\n"); + sb.append(" groupsWithAccess: ").append(toIndentedString(groupsWithAccess)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first + * line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("block_full_app_access"); + openapiFields.add("groups_with_access"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to OrgNonEmbedAccess + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!OrgNonEmbedAccess.openapiRequiredFields + .isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException( + String.format( + "The required field(s) %s in OrgNonEmbedAccess is not found in the" + + " empty JSON string", + OrgNonEmbedAccess.openapiRequiredFields.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if (jsonObj.get("groups_with_access") != null + && !jsonObj.get("groups_with_access").isJsonNull()) { + JsonArray jsonArraygroupsWithAccess = jsonObj.getAsJsonArray("groups_with_access"); + if (jsonArraygroupsWithAccess != null) { + // ensure the json data is an array + if (!jsonObj.get("groups_with_access").isJsonArray()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `groups_with_access` to be an array in the" + + " JSON string but got `%s`", + jsonObj.get("groups_with_access").toString())); + } + + // validate the optional field `groups_with_access` (array) + for (int i = 0; i < jsonArraygroupsWithAccess.size(); i++) { + GroupInfo.validateJsonElement(jsonArraygroupsWithAccess.get(i)); + } + ; + } + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!OrgNonEmbedAccess.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'OrgNonEmbedAccess' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter = + gson.getDelegateAdapter(this, TypeToken.get(OrgNonEmbedAccess.class)); + + return (TypeAdapter) + new TypeAdapter() { + @Override + public void write(JsonWriter out, OrgNonEmbedAccess value) + throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + obj.remove("additionalProperties"); + // serialize additional properties + if (value.getAdditionalProperties() != null) { + for (Map.Entry entry : + value.getAdditionalProperties().entrySet()) { + if (entry.getValue() instanceof String) + obj.addProperty(entry.getKey(), (String) entry.getValue()); + else if (entry.getValue() instanceof Number) + obj.addProperty(entry.getKey(), (Number) entry.getValue()); + else if (entry.getValue() instanceof Boolean) + obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); + else if (entry.getValue() instanceof Character) + obj.addProperty( + entry.getKey(), (Character) entry.getValue()); + else { + JsonElement jsonElement = gson.toJsonTree(entry.getValue()); + if (jsonElement.isJsonArray()) { + obj.add(entry.getKey(), jsonElement.getAsJsonArray()); + } else { + obj.add(entry.getKey(), jsonElement.getAsJsonObject()); + } + } + } + } + elementAdapter.write(out, obj); + } + + @Override + public OrgNonEmbedAccess read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // store additional fields in the deserialized instance + OrgNonEmbedAccess instance = thisAdapter.fromJsonTree(jsonObj); + for (Map.Entry entry : jsonObj.entrySet()) { + if (!openapiFields.contains(entry.getKey())) { + if (entry.getValue().isJsonPrimitive()) { // primitive type + if (entry.getValue().getAsJsonPrimitive().isString()) + instance.putAdditionalProperty( + entry.getKey(), entry.getValue().getAsString()); + else if (entry.getValue().getAsJsonPrimitive().isNumber()) + instance.putAdditionalProperty( + entry.getKey(), entry.getValue().getAsNumber()); + else if (entry.getValue().getAsJsonPrimitive().isBoolean()) + instance.putAdditionalProperty( + entry.getKey(), + entry.getValue().getAsBoolean()); + else + throw new IllegalArgumentException( + String.format( + "The field `%s` has unknown primitive" + + " type. Value: %s", + entry.getKey(), + entry.getValue().toString())); + } else if (entry.getValue().isJsonArray()) { + instance.putAdditionalProperty( + entry.getKey(), + gson.fromJson(entry.getValue(), List.class)); + } else { // JSON object + instance.putAdditionalProperty( + entry.getKey(), + gson.fromJson(entry.getValue(), HashMap.class)); + } + } + } + return instance; + } + }.nullSafe(); + } + } + + /** + * Create an instance of OrgNonEmbedAccess given an JSON string + * + * @param jsonString JSON string + * @return An instance of OrgNonEmbedAccess + * @throws IOException if the JSON string is invalid with respect to OrgNonEmbedAccess + */ + public static OrgNonEmbedAccess fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, OrgNonEmbedAccess.class); + } + + /** + * Convert an instance of OrgNonEmbedAccess to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} diff --git a/sdks/java/src/main/java/com/thoughtspot/client/model/OrgNonEmbedAccessInput.java b/sdks/java/src/main/java/com/thoughtspot/client/model/OrgNonEmbedAccessInput.java new file mode 100644 index 000000000..8ce0d6eb4 --- /dev/null +++ b/sdks/java/src/main/java/com/thoughtspot/client/model/OrgNonEmbedAccessInput.java @@ -0,0 +1,361 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client.model; + +import com.google.gson.Gson; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.TypeAdapter; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.annotations.SerializedName; +import com.google.gson.reflect.TypeToken; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import com.thoughtspot.client.JSON; +import java.io.IOException; +import java.io.Serializable; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Objects; +import org.openapitools.jackson.nullable.JsonNullable; + +/** Input for org-level non-embed access configuration. */ +@javax.annotation.Generated( + value = "org.openapitools.codegen.languages.JavaClientCodegen", + comments = "Generator version: 7.12.0") +public class OrgNonEmbedAccessInput implements Serializable { + private static final long serialVersionUID = 1L; + + public static final String SERIALIZED_NAME_BLOCK_FULL_APP_ACCESS = "block_full_app_access"; + + @SerializedName(SERIALIZED_NAME_BLOCK_FULL_APP_ACCESS) + @javax.annotation.Nullable + private Boolean blockFullAppAccess; + + public static final String SERIALIZED_NAME_GROUPS_IDENTIFIERS_WITH_ACCESS = + "groups_identifiers_with_access"; + + @SerializedName(SERIALIZED_NAME_GROUPS_IDENTIFIERS_WITH_ACCESS) + @javax.annotation.Nullable + private List groupsIdentifiersWithAccess; + + public OrgNonEmbedAccessInput() {} + + public OrgNonEmbedAccessInput blockFullAppAccess( + @javax.annotation.Nullable Boolean blockFullAppAccess) { + this.blockFullAppAccess = blockFullAppAccess; + return this; + } + + /** + * Block full application access for non-embedded usage. + * + * @return blockFullAppAccess + */ + @javax.annotation.Nullable + public Boolean getBlockFullAppAccess() { + return blockFullAppAccess; + } + + public void setBlockFullAppAccess(@javax.annotation.Nullable Boolean blockFullAppAccess) { + this.blockFullAppAccess = blockFullAppAccess; + } + + public OrgNonEmbedAccessInput groupsIdentifiersWithAccess( + @javax.annotation.Nullable List groupsIdentifiersWithAccess) { + this.groupsIdentifiersWithAccess = groupsIdentifiersWithAccess; + return this; + } + + public OrgNonEmbedAccessInput addGroupsIdentifiersWithAccessItem( + String groupsIdentifiersWithAccessItem) { + if (this.groupsIdentifiersWithAccess == null) { + this.groupsIdentifiersWithAccess = new ArrayList<>(); + } + this.groupsIdentifiersWithAccess.add(groupsIdentifiersWithAccessItem); + return this; + } + + /** + * Group identifiers that are allowed non-embed full app access. Can only be set if + * block_full_app_access is true. + * + * @return groupsIdentifiersWithAccess + */ + @javax.annotation.Nullable + public List getGroupsIdentifiersWithAccess() { + return groupsIdentifiersWithAccess; + } + + public void setGroupsIdentifiersWithAccess( + @javax.annotation.Nullable List groupsIdentifiersWithAccess) { + this.groupsIdentifiersWithAccess = groupsIdentifiersWithAccess; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key name of the property + * @param value value of the property + * @return the OrgNonEmbedAccessInput instance itself + */ + public OrgNonEmbedAccessInput putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return a map of objects + */ + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key name of the property + * @return an object + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + OrgNonEmbedAccessInput orgNonEmbedAccessInput = (OrgNonEmbedAccessInput) o; + return Objects.equals(this.blockFullAppAccess, orgNonEmbedAccessInput.blockFullAppAccess) + && Objects.equals( + this.groupsIdentifiersWithAccess, + orgNonEmbedAccessInput.groupsIdentifiersWithAccess) + && Objects.equals( + this.additionalProperties, orgNonEmbedAccessInput.additionalProperties); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b + || (a != null + && b != null + && a.isPresent() + && b.isPresent() + && Objects.deepEquals(a.get(), b.get())); + } + + @Override + public int hashCode() { + return Objects.hash(blockFullAppAccess, groupsIdentifiersWithAccess, additionalProperties); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; + } + return a.isPresent() ? Arrays.deepHashCode(new Object[] {a.get()}) : 31; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class OrgNonEmbedAccessInput {\n"); + sb.append(" blockFullAppAccess: ") + .append(toIndentedString(blockFullAppAccess)) + .append("\n"); + sb.append(" groupsIdentifiersWithAccess: ") + .append(toIndentedString(groupsIdentifiersWithAccess)) + .append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first + * line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("block_full_app_access"); + openapiFields.add("groups_identifiers_with_access"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to OrgNonEmbedAccessInput + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!OrgNonEmbedAccessInput.openapiRequiredFields + .isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException( + String.format( + "The required field(s) %s in OrgNonEmbedAccessInput is not found" + + " in the empty JSON string", + OrgNonEmbedAccessInput.openapiRequiredFields.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // ensure the optional json data is an array if present + if (jsonObj.get("groups_identifiers_with_access") != null + && !jsonObj.get("groups_identifiers_with_access").isJsonNull() + && !jsonObj.get("groups_identifiers_with_access").isJsonArray()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `groups_identifiers_with_access` to be an array in" + + " the JSON string but got `%s`", + jsonObj.get("groups_identifiers_with_access").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!OrgNonEmbedAccessInput.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'OrgNonEmbedAccessInput' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter = + gson.getDelegateAdapter(this, TypeToken.get(OrgNonEmbedAccessInput.class)); + + return (TypeAdapter) + new TypeAdapter() { + @Override + public void write(JsonWriter out, OrgNonEmbedAccessInput value) + throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + obj.remove("additionalProperties"); + // serialize additional properties + if (value.getAdditionalProperties() != null) { + for (Map.Entry entry : + value.getAdditionalProperties().entrySet()) { + if (entry.getValue() instanceof String) + obj.addProperty(entry.getKey(), (String) entry.getValue()); + else if (entry.getValue() instanceof Number) + obj.addProperty(entry.getKey(), (Number) entry.getValue()); + else if (entry.getValue() instanceof Boolean) + obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); + else if (entry.getValue() instanceof Character) + obj.addProperty( + entry.getKey(), (Character) entry.getValue()); + else { + JsonElement jsonElement = gson.toJsonTree(entry.getValue()); + if (jsonElement.isJsonArray()) { + obj.add(entry.getKey(), jsonElement.getAsJsonArray()); + } else { + obj.add(entry.getKey(), jsonElement.getAsJsonObject()); + } + } + } + } + elementAdapter.write(out, obj); + } + + @Override + public OrgNonEmbedAccessInput read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // store additional fields in the deserialized instance + OrgNonEmbedAccessInput instance = thisAdapter.fromJsonTree(jsonObj); + for (Map.Entry entry : jsonObj.entrySet()) { + if (!openapiFields.contains(entry.getKey())) { + if (entry.getValue().isJsonPrimitive()) { // primitive type + if (entry.getValue().getAsJsonPrimitive().isString()) + instance.putAdditionalProperty( + entry.getKey(), entry.getValue().getAsString()); + else if (entry.getValue().getAsJsonPrimitive().isNumber()) + instance.putAdditionalProperty( + entry.getKey(), entry.getValue().getAsNumber()); + else if (entry.getValue().getAsJsonPrimitive().isBoolean()) + instance.putAdditionalProperty( + entry.getKey(), + entry.getValue().getAsBoolean()); + else + throw new IllegalArgumentException( + String.format( + "The field `%s` has unknown primitive" + + " type. Value: %s", + entry.getKey(), + entry.getValue().toString())); + } else if (entry.getValue().isJsonArray()) { + instance.putAdditionalProperty( + entry.getKey(), + gson.fromJson(entry.getValue(), List.class)); + } else { // JSON object + instance.putAdditionalProperty( + entry.getKey(), + gson.fromJson(entry.getValue(), HashMap.class)); + } + } + } + return instance; + } + }.nullSafe(); + } + } + + /** + * Create an instance of OrgNonEmbedAccessInput given an JSON string + * + * @param jsonString JSON string + * @return An instance of OrgNonEmbedAccessInput + * @throws IOException if the JSON string is invalid with respect to OrgNonEmbedAccessInput + */ + public static OrgNonEmbedAccessInput fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, OrgNonEmbedAccessInput.class); + } + + /** + * Convert an instance of OrgNonEmbedAccessInput to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} diff --git a/sdks/java/src/main/java/com/thoughtspot/client/model/OrgPreferenceSearchCriteriaInput.java b/sdks/java/src/main/java/com/thoughtspot/client/model/OrgPreferenceSearchCriteriaInput.java new file mode 100644 index 000000000..093080f13 --- /dev/null +++ b/sdks/java/src/main/java/com/thoughtspot/client/model/OrgPreferenceSearchCriteriaInput.java @@ -0,0 +1,427 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client.model; + +import com.google.gson.Gson; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.TypeAdapter; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.reflect.TypeToken; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import com.thoughtspot.client.JSON; +import java.io.IOException; +import java.io.Serializable; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Objects; +import org.openapitools.jackson.nullable.JsonNullable; + +/** OrgPreferenceSearchCriteriaInput */ +@javax.annotation.Generated( + value = "org.openapitools.codegen.languages.JavaClientCodegen", + comments = "Generator version: 7.12.0") +public class OrgPreferenceSearchCriteriaInput implements Serializable { + private static final long serialVersionUID = 1L; + + public static final String SERIALIZED_NAME_ORG_IDENTIFIER = "org_identifier"; + + @SerializedName(SERIALIZED_NAME_ORG_IDENTIFIER) + @javax.annotation.Nonnull + private String orgIdentifier; + + /** Gets or Sets eventTypes */ + @JsonAdapter(EventTypesEnum.Adapter.class) + public enum EventTypesEnum { + LIVEBOARD_SCHEDULE("LIVEBOARD_SCHEDULE"); + + private String value; + + EventTypesEnum(String value) { + this.value = value; + } + + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + public static EventTypesEnum fromValue(String value) { + for (EventTypesEnum b : EventTypesEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + + public static class Adapter extends TypeAdapter { + @Override + public void write(final JsonWriter jsonWriter, final EventTypesEnum enumeration) + throws IOException { + jsonWriter.value(enumeration.getValue()); + } + + @Override + public EventTypesEnum read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + return EventTypesEnum.fromValue(value); + } + } + + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + String value = jsonElement.getAsString(); + EventTypesEnum.fromValue(value); + } + } + + public static final String SERIALIZED_NAME_EVENT_TYPES = "event_types"; + + @SerializedName(SERIALIZED_NAME_EVENT_TYPES) + @javax.annotation.Nullable + private List eventTypes; + + public OrgPreferenceSearchCriteriaInput() {} + + public OrgPreferenceSearchCriteriaInput orgIdentifier( + @javax.annotation.Nonnull String orgIdentifier) { + this.orgIdentifier = orgIdentifier; + return this; + } + + /** + * Unique identifier or name of the org + * + * @return orgIdentifier + */ + @javax.annotation.Nonnull + public String getOrgIdentifier() { + return orgIdentifier; + } + + public void setOrgIdentifier(@javax.annotation.Nonnull String orgIdentifier) { + this.orgIdentifier = orgIdentifier; + } + + public OrgPreferenceSearchCriteriaInput eventTypes( + @javax.annotation.Nullable List eventTypes) { + this.eventTypes = eventTypes; + return this; + } + + public OrgPreferenceSearchCriteriaInput addEventTypesItem(EventTypesEnum eventTypesItem) { + if (this.eventTypes == null) { + this.eventTypes = new ArrayList<>(); + } + this.eventTypes.add(eventTypesItem); + return this; + } + + /** + * Event types to search for. If not provided, all event types for this org are returned. + * + * @return eventTypes + */ + @javax.annotation.Nullable + public List getEventTypes() { + return eventTypes; + } + + public void setEventTypes(@javax.annotation.Nullable List eventTypes) { + this.eventTypes = eventTypes; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key name of the property + * @param value value of the property + * @return the OrgPreferenceSearchCriteriaInput instance itself + */ + public OrgPreferenceSearchCriteriaInput putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return a map of objects + */ + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key name of the property + * @return an object + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + OrgPreferenceSearchCriteriaInput orgPreferenceSearchCriteriaInput = + (OrgPreferenceSearchCriteriaInput) o; + return Objects.equals(this.orgIdentifier, orgPreferenceSearchCriteriaInput.orgIdentifier) + && Objects.equals(this.eventTypes, orgPreferenceSearchCriteriaInput.eventTypes) + && Objects.equals( + this.additionalProperties, + orgPreferenceSearchCriteriaInput.additionalProperties); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b + || (a != null + && b != null + && a.isPresent() + && b.isPresent() + && Objects.deepEquals(a.get(), b.get())); + } + + @Override + public int hashCode() { + return Objects.hash(orgIdentifier, eventTypes, additionalProperties); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; + } + return a.isPresent() ? Arrays.deepHashCode(new Object[] {a.get()}) : 31; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class OrgPreferenceSearchCriteriaInput {\n"); + sb.append(" orgIdentifier: ").append(toIndentedString(orgIdentifier)).append("\n"); + sb.append(" eventTypes: ").append(toIndentedString(eventTypes)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first + * line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("org_identifier"); + openapiFields.add("event_types"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + openapiRequiredFields.add("org_identifier"); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to + * OrgPreferenceSearchCriteriaInput + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!OrgPreferenceSearchCriteriaInput.openapiRequiredFields + .isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException( + String.format( + "The required field(s) %s in OrgPreferenceSearchCriteriaInput is" + + " not found in the empty JSON string", + OrgPreferenceSearchCriteriaInput.openapiRequiredFields.toString())); + } + } + + // check to make sure all required properties/fields are present in the JSON string + for (String requiredField : OrgPreferenceSearchCriteriaInput.openapiRequiredFields) { + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException( + String.format( + "The required field `%s` is not found in the JSON string: %s", + requiredField, jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if (!jsonObj.get("org_identifier").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `org_identifier` to be a primitive type in the" + + " JSON string but got `%s`", + jsonObj.get("org_identifier").toString())); + } + // ensure the optional json data is an array if present + if (jsonObj.get("event_types") != null + && !jsonObj.get("event_types").isJsonNull() + && !jsonObj.get("event_types").isJsonArray()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `event_types` to be an array in the JSON string" + + " but got `%s`", + jsonObj.get("event_types").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!OrgPreferenceSearchCriteriaInput.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'OrgPreferenceSearchCriteriaInput' and + // its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter = + gson.getDelegateAdapter( + this, TypeToken.get(OrgPreferenceSearchCriteriaInput.class)); + + return (TypeAdapter) + new TypeAdapter() { + @Override + public void write(JsonWriter out, OrgPreferenceSearchCriteriaInput value) + throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + obj.remove("additionalProperties"); + // serialize additional properties + if (value.getAdditionalProperties() != null) { + for (Map.Entry entry : + value.getAdditionalProperties().entrySet()) { + if (entry.getValue() instanceof String) + obj.addProperty(entry.getKey(), (String) entry.getValue()); + else if (entry.getValue() instanceof Number) + obj.addProperty(entry.getKey(), (Number) entry.getValue()); + else if (entry.getValue() instanceof Boolean) + obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); + else if (entry.getValue() instanceof Character) + obj.addProperty( + entry.getKey(), (Character) entry.getValue()); + else { + JsonElement jsonElement = gson.toJsonTree(entry.getValue()); + if (jsonElement.isJsonArray()) { + obj.add(entry.getKey(), jsonElement.getAsJsonArray()); + } else { + obj.add(entry.getKey(), jsonElement.getAsJsonObject()); + } + } + } + } + elementAdapter.write(out, obj); + } + + @Override + public OrgPreferenceSearchCriteriaInput read(JsonReader in) + throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // store additional fields in the deserialized instance + OrgPreferenceSearchCriteriaInput instance = + thisAdapter.fromJsonTree(jsonObj); + for (Map.Entry entry : jsonObj.entrySet()) { + if (!openapiFields.contains(entry.getKey())) { + if (entry.getValue().isJsonPrimitive()) { // primitive type + if (entry.getValue().getAsJsonPrimitive().isString()) + instance.putAdditionalProperty( + entry.getKey(), entry.getValue().getAsString()); + else if (entry.getValue().getAsJsonPrimitive().isNumber()) + instance.putAdditionalProperty( + entry.getKey(), entry.getValue().getAsNumber()); + else if (entry.getValue().getAsJsonPrimitive().isBoolean()) + instance.putAdditionalProperty( + entry.getKey(), + entry.getValue().getAsBoolean()); + else + throw new IllegalArgumentException( + String.format( + "The field `%s` has unknown primitive" + + " type. Value: %s", + entry.getKey(), + entry.getValue().toString())); + } else if (entry.getValue().isJsonArray()) { + instance.putAdditionalProperty( + entry.getKey(), + gson.fromJson(entry.getValue(), List.class)); + } else { // JSON object + instance.putAdditionalProperty( + entry.getKey(), + gson.fromJson(entry.getValue(), HashMap.class)); + } + } + } + return instance; + } + }.nullSafe(); + } + } + + /** + * Create an instance of OrgPreferenceSearchCriteriaInput given an JSON string + * + * @param jsonString JSON string + * @return An instance of OrgPreferenceSearchCriteriaInput + * @throws IOException if the JSON string is invalid with respect to + * OrgPreferenceSearchCriteriaInput + */ + public static OrgPreferenceSearchCriteriaInput fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, OrgPreferenceSearchCriteriaInput.class); + } + + /** + * Convert an instance of OrgPreferenceSearchCriteriaInput to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} diff --git a/sdks/java/src/main/java/com/thoughtspot/client/model/OrgResponse.java b/sdks/java/src/main/java/com/thoughtspot/client/model/OrgResponse.java new file mode 100644 index 000000000..70ae00e73 --- /dev/null +++ b/sdks/java/src/main/java/com/thoughtspot/client/model/OrgResponse.java @@ -0,0 +1,555 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client.model; + +import com.google.gson.Gson; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.TypeAdapter; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.reflect.TypeToken; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import com.thoughtspot.client.JSON; +import java.io.IOException; +import java.io.Serializable; +import java.util.Arrays; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Objects; +import org.openapitools.jackson.nullable.JsonNullable; + +/** OrgResponse */ +@javax.annotation.Generated( + value = "org.openapitools.codegen.languages.JavaClientCodegen", + comments = "Generator version: 7.12.0") +public class OrgResponse implements Serializable { + private static final long serialVersionUID = 1L; + + public static final String SERIALIZED_NAME_ID = "id"; + + @SerializedName(SERIALIZED_NAME_ID) + @javax.annotation.Nullable + private Integer id; + + public static final String SERIALIZED_NAME_NAME = "name"; + + @SerializedName(SERIALIZED_NAME_NAME) + @javax.annotation.Nullable + private String name; + + /** Status of the Org. */ + @JsonAdapter(StatusEnum.Adapter.class) + public enum StatusEnum { + ACTIVE("ACTIVE"), + + IN_ACTIVE("IN_ACTIVE"); + + private String value; + + StatusEnum(String value) { + this.value = value; + } + + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + public static StatusEnum fromValue(String value) { + for (StatusEnum b : StatusEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + return null; + } + + public static class Adapter extends TypeAdapter { + @Override + public void write(final JsonWriter jsonWriter, final StatusEnum enumeration) + throws IOException { + jsonWriter.value(enumeration.getValue()); + } + + @Override + public StatusEnum read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + return StatusEnum.fromValue(value); + } + } + + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + String value = jsonElement.getAsString(); + StatusEnum.fromValue(value); + } + } + + public static final String SERIALIZED_NAME_STATUS = "status"; + + @SerializedName(SERIALIZED_NAME_STATUS) + @javax.annotation.Nullable + private StatusEnum status; + + public static final String SERIALIZED_NAME_DESCRIPTION = "description"; + + @SerializedName(SERIALIZED_NAME_DESCRIPTION) + @javax.annotation.Nullable + private String description; + + /** Visibility of the Org. */ + @JsonAdapter(VisibilityEnum.Adapter.class) + public enum VisibilityEnum { + SHOW("SHOW"), + + HIDDEN("HIDDEN"); + + private String value; + + VisibilityEnum(String value) { + this.value = value; + } + + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + public static VisibilityEnum fromValue(String value) { + for (VisibilityEnum b : VisibilityEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + return null; + } + + public static class Adapter extends TypeAdapter { + @Override + public void write(final JsonWriter jsonWriter, final VisibilityEnum enumeration) + throws IOException { + jsonWriter.value(enumeration.getValue()); + } + + @Override + public VisibilityEnum read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + return VisibilityEnum.fromValue(value); + } + } + + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + String value = jsonElement.getAsString(); + VisibilityEnum.fromValue(value); + } + } + + public static final String SERIALIZED_NAME_VISIBILITY = "visibility"; + + @SerializedName(SERIALIZED_NAME_VISIBILITY) + @javax.annotation.Nullable + private VisibilityEnum visibility; + + public OrgResponse() {} + + public OrgResponse id(@javax.annotation.Nullable Integer id) { + this.id = id; + return this; + } + + /** + * Unique identifier of the Org. + * + * @return id + */ + @javax.annotation.Nullable + public Integer getId() { + return id; + } + + public void setId(@javax.annotation.Nullable Integer id) { + this.id = id; + } + + public OrgResponse name(@javax.annotation.Nullable String name) { + this.name = name; + return this; + } + + /** + * Name of the Org. + * + * @return name + */ + @javax.annotation.Nullable + public String getName() { + return name; + } + + public void setName(@javax.annotation.Nullable String name) { + this.name = name; + } + + public OrgResponse status(@javax.annotation.Nullable StatusEnum status) { + this.status = status; + return this; + } + + /** + * Status of the Org. + * + * @return status + */ + @javax.annotation.Nullable + public StatusEnum getStatus() { + return status; + } + + public void setStatus(@javax.annotation.Nullable StatusEnum status) { + this.status = status; + } + + public OrgResponse description(@javax.annotation.Nullable String description) { + this.description = description; + return this; + } + + /** + * Description of the Org. + * + * @return description + */ + @javax.annotation.Nullable + public String getDescription() { + return description; + } + + public void setDescription(@javax.annotation.Nullable String description) { + this.description = description; + } + + public OrgResponse visibility(@javax.annotation.Nullable VisibilityEnum visibility) { + this.visibility = visibility; + return this; + } + + /** + * Visibility of the Org. + * + * @return visibility + */ + @javax.annotation.Nullable + public VisibilityEnum getVisibility() { + return visibility; + } + + public void setVisibility(@javax.annotation.Nullable VisibilityEnum visibility) { + this.visibility = visibility; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key name of the property + * @param value value of the property + * @return the OrgResponse instance itself + */ + public OrgResponse putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return a map of objects + */ + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key name of the property + * @return an object + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + OrgResponse orgResponse = (OrgResponse) o; + return Objects.equals(this.id, orgResponse.id) + && Objects.equals(this.name, orgResponse.name) + && Objects.equals(this.status, orgResponse.status) + && Objects.equals(this.description, orgResponse.description) + && Objects.equals(this.visibility, orgResponse.visibility) + && Objects.equals(this.additionalProperties, orgResponse.additionalProperties); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b + || (a != null + && b != null + && a.isPresent() + && b.isPresent() + && Objects.deepEquals(a.get(), b.get())); + } + + @Override + public int hashCode() { + return Objects.hash(id, name, status, description, visibility, additionalProperties); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; + } + return a.isPresent() ? Arrays.deepHashCode(new Object[] {a.get()}) : 31; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class OrgResponse {\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append(" status: ").append(toIndentedString(status)).append("\n"); + sb.append(" description: ").append(toIndentedString(description)).append("\n"); + sb.append(" visibility: ").append(toIndentedString(visibility)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first + * line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("id"); + openapiFields.add("name"); + openapiFields.add("status"); + openapiFields.add("description"); + openapiFields.add("visibility"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to OrgResponse + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!OrgResponse.openapiRequiredFields + .isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException( + String.format( + "The required field(s) %s in OrgResponse is not found in the empty" + + " JSON string", + OrgResponse.openapiRequiredFields.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if ((jsonObj.get("name") != null && !jsonObj.get("name").isJsonNull()) + && !jsonObj.get("name").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `name` to be a primitive type in the JSON string" + + " but got `%s`", + jsonObj.get("name").toString())); + } + if ((jsonObj.get("status") != null && !jsonObj.get("status").isJsonNull()) + && !jsonObj.get("status").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `status` to be a primitive type in the JSON string" + + " but got `%s`", + jsonObj.get("status").toString())); + } + // validate the optional field `status` + if (jsonObj.get("status") != null && !jsonObj.get("status").isJsonNull()) { + StatusEnum.validateJsonElement(jsonObj.get("status")); + } + if ((jsonObj.get("description") != null && !jsonObj.get("description").isJsonNull()) + && !jsonObj.get("description").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `description` to be a primitive type in the JSON" + + " string but got `%s`", + jsonObj.get("description").toString())); + } + if ((jsonObj.get("visibility") != null && !jsonObj.get("visibility").isJsonNull()) + && !jsonObj.get("visibility").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `visibility` to be a primitive type in the JSON" + + " string but got `%s`", + jsonObj.get("visibility").toString())); + } + // validate the optional field `visibility` + if (jsonObj.get("visibility") != null && !jsonObj.get("visibility").isJsonNull()) { + VisibilityEnum.validateJsonElement(jsonObj.get("visibility")); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!OrgResponse.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'OrgResponse' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter = + gson.getDelegateAdapter(this, TypeToken.get(OrgResponse.class)); + + return (TypeAdapter) + new TypeAdapter() { + @Override + public void write(JsonWriter out, OrgResponse value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + obj.remove("additionalProperties"); + // serialize additional properties + if (value.getAdditionalProperties() != null) { + for (Map.Entry entry : + value.getAdditionalProperties().entrySet()) { + if (entry.getValue() instanceof String) + obj.addProperty(entry.getKey(), (String) entry.getValue()); + else if (entry.getValue() instanceof Number) + obj.addProperty(entry.getKey(), (Number) entry.getValue()); + else if (entry.getValue() instanceof Boolean) + obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); + else if (entry.getValue() instanceof Character) + obj.addProperty( + entry.getKey(), (Character) entry.getValue()); + else { + JsonElement jsonElement = gson.toJsonTree(entry.getValue()); + if (jsonElement.isJsonArray()) { + obj.add(entry.getKey(), jsonElement.getAsJsonArray()); + } else { + obj.add(entry.getKey(), jsonElement.getAsJsonObject()); + } + } + } + } + elementAdapter.write(out, obj); + } + + @Override + public OrgResponse read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // store additional fields in the deserialized instance + OrgResponse instance = thisAdapter.fromJsonTree(jsonObj); + for (Map.Entry entry : jsonObj.entrySet()) { + if (!openapiFields.contains(entry.getKey())) { + if (entry.getValue().isJsonPrimitive()) { // primitive type + if (entry.getValue().getAsJsonPrimitive().isString()) + instance.putAdditionalProperty( + entry.getKey(), entry.getValue().getAsString()); + else if (entry.getValue().getAsJsonPrimitive().isNumber()) + instance.putAdditionalProperty( + entry.getKey(), entry.getValue().getAsNumber()); + else if (entry.getValue().getAsJsonPrimitive().isBoolean()) + instance.putAdditionalProperty( + entry.getKey(), + entry.getValue().getAsBoolean()); + else + throw new IllegalArgumentException( + String.format( + "The field `%s` has unknown primitive" + + " type. Value: %s", + entry.getKey(), + entry.getValue().toString())); + } else if (entry.getValue().isJsonArray()) { + instance.putAdditionalProperty( + entry.getKey(), + gson.fromJson(entry.getValue(), List.class)); + } else { // JSON object + instance.putAdditionalProperty( + entry.getKey(), + gson.fromJson(entry.getValue(), HashMap.class)); + } + } + } + return instance; + } + }.nullSafe(); + } + } + + /** + * Create an instance of OrgResponse given an JSON string + * + * @param jsonString JSON string + * @return An instance of OrgResponse + * @throws IOException if the JSON string is invalid with respect to OrgResponse + */ + public static OrgResponse fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, OrgResponse.class); + } + + /** + * Convert an instance of OrgResponse to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} diff --git a/sdks/java/src/main/java/com/thoughtspot/client/model/OrgType.java b/sdks/java/src/main/java/com/thoughtspot/client/model/OrgType.java new file mode 100644 index 000000000..7c581d980 --- /dev/null +++ b/sdks/java/src/main/java/com/thoughtspot/client/model/OrgType.java @@ -0,0 +1,336 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client.model; + +import com.google.gson.Gson; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.TypeAdapter; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.annotations.SerializedName; +import com.google.gson.reflect.TypeToken; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import com.thoughtspot.client.JSON; +import java.io.IOException; +import java.io.Serializable; +import java.util.Arrays; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Objects; +import org.openapitools.jackson.nullable.JsonNullable; + +/** OrgType */ +@javax.annotation.Generated( + value = "org.openapitools.codegen.languages.JavaClientCodegen", + comments = "Generator version: 7.12.0") +public class OrgType implements Serializable { + private static final long serialVersionUID = 1L; + + public static final String SERIALIZED_NAME_NAME = "name"; + + @SerializedName(SERIALIZED_NAME_NAME) + @javax.annotation.Nullable + private String name; + + public static final String SERIALIZED_NAME_ID = "id"; + + @SerializedName(SERIALIZED_NAME_ID) + @javax.annotation.Nullable + private Integer id; + + public OrgType() {} + + public OrgType name(@javax.annotation.Nullable String name) { + this.name = name; + return this; + } + + /** + * Get name + * + * @return name + */ + @javax.annotation.Nullable + public String getName() { + return name; + } + + public void setName(@javax.annotation.Nullable String name) { + this.name = name; + } + + public OrgType id(@javax.annotation.Nullable Integer id) { + this.id = id; + return this; + } + + /** + * Get id + * + * @return id + */ + @javax.annotation.Nullable + public Integer getId() { + return id; + } + + public void setId(@javax.annotation.Nullable Integer id) { + this.id = id; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key name of the property + * @param value value of the property + * @return the OrgType instance itself + */ + public OrgType putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return a map of objects + */ + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key name of the property + * @return an object + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + OrgType orgType = (OrgType) o; + return Objects.equals(this.name, orgType.name) + && Objects.equals(this.id, orgType.id) + && Objects.equals(this.additionalProperties, orgType.additionalProperties); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b + || (a != null + && b != null + && a.isPresent() + && b.isPresent() + && Objects.deepEquals(a.get(), b.get())); + } + + @Override + public int hashCode() { + return Objects.hash(name, id, additionalProperties); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; + } + return a.isPresent() ? Arrays.deepHashCode(new Object[] {a.get()}) : 31; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class OrgType {\n"); + sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first + * line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("name"); + openapiFields.add("id"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to OrgType + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!OrgType.openapiRequiredFields + .isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException( + String.format( + "The required field(s) %s in OrgType is not found in the empty" + + " JSON string", + OrgType.openapiRequiredFields.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if ((jsonObj.get("name") != null && !jsonObj.get("name").isJsonNull()) + && !jsonObj.get("name").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `name` to be a primitive type in the JSON string" + + " but got `%s`", + jsonObj.get("name").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!OrgType.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'OrgType' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter = + gson.getDelegateAdapter(this, TypeToken.get(OrgType.class)); + + return (TypeAdapter) + new TypeAdapter() { + @Override + public void write(JsonWriter out, OrgType value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + obj.remove("additionalProperties"); + // serialize additional properties + if (value.getAdditionalProperties() != null) { + for (Map.Entry entry : + value.getAdditionalProperties().entrySet()) { + if (entry.getValue() instanceof String) + obj.addProperty(entry.getKey(), (String) entry.getValue()); + else if (entry.getValue() instanceof Number) + obj.addProperty(entry.getKey(), (Number) entry.getValue()); + else if (entry.getValue() instanceof Boolean) + obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); + else if (entry.getValue() instanceof Character) + obj.addProperty( + entry.getKey(), (Character) entry.getValue()); + else { + JsonElement jsonElement = gson.toJsonTree(entry.getValue()); + if (jsonElement.isJsonArray()) { + obj.add(entry.getKey(), jsonElement.getAsJsonArray()); + } else { + obj.add(entry.getKey(), jsonElement.getAsJsonObject()); + } + } + } + } + elementAdapter.write(out, obj); + } + + @Override + public OrgType read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // store additional fields in the deserialized instance + OrgType instance = thisAdapter.fromJsonTree(jsonObj); + for (Map.Entry entry : jsonObj.entrySet()) { + if (!openapiFields.contains(entry.getKey())) { + if (entry.getValue().isJsonPrimitive()) { // primitive type + if (entry.getValue().getAsJsonPrimitive().isString()) + instance.putAdditionalProperty( + entry.getKey(), entry.getValue().getAsString()); + else if (entry.getValue().getAsJsonPrimitive().isNumber()) + instance.putAdditionalProperty( + entry.getKey(), entry.getValue().getAsNumber()); + else if (entry.getValue().getAsJsonPrimitive().isBoolean()) + instance.putAdditionalProperty( + entry.getKey(), + entry.getValue().getAsBoolean()); + else + throw new IllegalArgumentException( + String.format( + "The field `%s` has unknown primitive" + + " type. Value: %s", + entry.getKey(), + entry.getValue().toString())); + } else if (entry.getValue().isJsonArray()) { + instance.putAdditionalProperty( + entry.getKey(), + gson.fromJson(entry.getValue(), List.class)); + } else { // JSON object + instance.putAdditionalProperty( + entry.getKey(), + gson.fromJson(entry.getValue(), HashMap.class)); + } + } + } + return instance; + } + }.nullSafe(); + } + } + + /** + * Create an instance of OrgType given an JSON string + * + * @param jsonString JSON string + * @return An instance of OrgType + * @throws IOException if the JSON string is invalid with respect to OrgType + */ + public static OrgType fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, OrgType.class); + } + + /** + * Convert an instance of OrgType to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} diff --git a/sdks/java/src/main/java/com/thoughtspot/client/model/ParameterValues.java b/sdks/java/src/main/java/com/thoughtspot/client/model/ParameterValues.java new file mode 100644 index 000000000..a002565c3 --- /dev/null +++ b/sdks/java/src/main/java/com/thoughtspot/client/model/ParameterValues.java @@ -0,0 +1,351 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client.model; + +import com.google.gson.Gson; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.TypeAdapter; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.annotations.SerializedName; +import com.google.gson.reflect.TypeToken; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import com.thoughtspot.client.JSON; +import java.io.IOException; +import java.io.Serializable; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Objects; + +/** Filter Rules to be applied on Objects. */ +@javax.annotation.Generated( + value = "org.openapitools.codegen.languages.JavaClientCodegen", + comments = "Generator version: 7.12.0") +public class ParameterValues implements Serializable { + private static final long serialVersionUID = 1L; + + public static final String SERIALIZED_NAME_NAME = "name"; + + @SerializedName(SERIALIZED_NAME_NAME) + @javax.annotation.Nonnull + private String name; + + public static final String SERIALIZED_NAME_VALUES = "values"; + + @SerializedName(SERIALIZED_NAME_VALUES) + @javax.annotation.Nonnull + private List values; + + public ParameterValues() {} + + public ParameterValues name(@javax.annotation.Nonnull String name) { + this.name = name; + return this; + } + + /** + * The name of the column to apply the filter on. + * + * @return name + */ + @javax.annotation.Nonnull + public String getName() { + return name; + } + + public void setName(@javax.annotation.Nonnull String name) { + this.name = name; + } + + public ParameterValues values(@javax.annotation.Nonnull List values) { + this.values = values; + return this; + } + + public ParameterValues addValuesItem(Object valuesItem) { + if (this.values == null) { + this.values = new ArrayList<>(); + } + this.values.add(valuesItem); + return this; + } + + /** + * The values to filter on. Only single value is supported currently. + * + * @return values + */ + @javax.annotation.Nonnull + public List getValues() { + return values; + } + + public void setValues(@javax.annotation.Nonnull List values) { + this.values = values; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key name of the property + * @param value value of the property + * @return the ParameterValues instance itself + */ + public ParameterValues putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return a map of objects + */ + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key name of the property + * @return an object + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ParameterValues parameterValues = (ParameterValues) o; + return Objects.equals(this.name, parameterValues.name) + && Objects.equals(this.values, parameterValues.values) + && Objects.equals(this.additionalProperties, parameterValues.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(name, values, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ParameterValues {\n"); + sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append(" values: ").append(toIndentedString(values)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first + * line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("name"); + openapiFields.add("values"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + openapiRequiredFields.add("name"); + openapiRequiredFields.add("values"); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to ParameterValues + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!ParameterValues.openapiRequiredFields + .isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException( + String.format( + "The required field(s) %s in ParameterValues is not found in the" + + " empty JSON string", + ParameterValues.openapiRequiredFields.toString())); + } + } + + // check to make sure all required properties/fields are present in the JSON string + for (String requiredField : ParameterValues.openapiRequiredFields) { + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException( + String.format( + "The required field `%s` is not found in the JSON string: %s", + requiredField, jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if (!jsonObj.get("name").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `name` to be a primitive type in the JSON string" + + " but got `%s`", + jsonObj.get("name").toString())); + } + // ensure the required json array is present + if (jsonObj.get("values") == null) { + throw new IllegalArgumentException( + "Expected the field `linkedContent` to be an array in the JSON string but got" + + " `null`"); + } else if (!jsonObj.get("values").isJsonArray()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `values` to be an array in the JSON string but got" + + " `%s`", + jsonObj.get("values").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!ParameterValues.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'ParameterValues' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter = + gson.getDelegateAdapter(this, TypeToken.get(ParameterValues.class)); + + return (TypeAdapter) + new TypeAdapter() { + @Override + public void write(JsonWriter out, ParameterValues value) + throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + obj.remove("additionalProperties"); + // serialize additional properties + if (value.getAdditionalProperties() != null) { + for (Map.Entry entry : + value.getAdditionalProperties().entrySet()) { + if (entry.getValue() instanceof String) + obj.addProperty(entry.getKey(), (String) entry.getValue()); + else if (entry.getValue() instanceof Number) + obj.addProperty(entry.getKey(), (Number) entry.getValue()); + else if (entry.getValue() instanceof Boolean) + obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); + else if (entry.getValue() instanceof Character) + obj.addProperty( + entry.getKey(), (Character) entry.getValue()); + else { + JsonElement jsonElement = gson.toJsonTree(entry.getValue()); + if (jsonElement.isJsonArray()) { + obj.add(entry.getKey(), jsonElement.getAsJsonArray()); + } else { + obj.add(entry.getKey(), jsonElement.getAsJsonObject()); + } + } + } + } + elementAdapter.write(out, obj); + } + + @Override + public ParameterValues read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // store additional fields in the deserialized instance + ParameterValues instance = thisAdapter.fromJsonTree(jsonObj); + for (Map.Entry entry : jsonObj.entrySet()) { + if (!openapiFields.contains(entry.getKey())) { + if (entry.getValue().isJsonPrimitive()) { // primitive type + if (entry.getValue().getAsJsonPrimitive().isString()) + instance.putAdditionalProperty( + entry.getKey(), entry.getValue().getAsString()); + else if (entry.getValue().getAsJsonPrimitive().isNumber()) + instance.putAdditionalProperty( + entry.getKey(), entry.getValue().getAsNumber()); + else if (entry.getValue().getAsJsonPrimitive().isBoolean()) + instance.putAdditionalProperty( + entry.getKey(), + entry.getValue().getAsBoolean()); + else + throw new IllegalArgumentException( + String.format( + "The field `%s` has unknown primitive" + + " type. Value: %s", + entry.getKey(), + entry.getValue().toString())); + } else if (entry.getValue().isJsonArray()) { + instance.putAdditionalProperty( + entry.getKey(), + gson.fromJson(entry.getValue(), List.class)); + } else { // JSON object + instance.putAdditionalProperty( + entry.getKey(), + gson.fromJson(entry.getValue(), HashMap.class)); + } + } + } + return instance; + } + }.nullSafe(); + } + } + + /** + * Create an instance of ParameterValues given an JSON string + * + * @param jsonString JSON string + * @return An instance of ParameterValues + * @throws IOException if the JSON string is invalid with respect to ParameterValues + */ + public static ParameterValues fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, ParameterValues.class); + } + + /** + * Convert an instance of ParameterValues to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} diff --git a/sdks/java/src/main/java/com/thoughtspot/client/model/ParameterizeMetadataFieldsRequest.java b/sdks/java/src/main/java/com/thoughtspot/client/model/ParameterizeMetadataFieldsRequest.java new file mode 100644 index 000000000..d9c8e1e3a --- /dev/null +++ b/sdks/java/src/main/java/com/thoughtspot/client/model/ParameterizeMetadataFieldsRequest.java @@ -0,0 +1,599 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client.model; + +import com.google.gson.Gson; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.TypeAdapter; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.reflect.TypeToken; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import com.thoughtspot.client.JSON; +import java.io.IOException; +import java.io.Serializable; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Objects; + +/** ParameterizeMetadataFieldsRequest */ +@javax.annotation.Generated( + value = "org.openapitools.codegen.languages.JavaClientCodegen", + comments = "Generator version: 7.12.0") +public class ParameterizeMetadataFieldsRequest implements Serializable { + private static final long serialVersionUID = 1L; + + /** Type of metadata object to parameterize. */ + @JsonAdapter(MetadataTypeEnum.Adapter.class) + public enum MetadataTypeEnum { + LOGICAL_TABLE("LOGICAL_TABLE"), + + CONNECTION("CONNECTION"), + + CONNECTION_CONFIG("CONNECTION_CONFIG"); + + private String value; + + MetadataTypeEnum(String value) { + this.value = value; + } + + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + public static MetadataTypeEnum fromValue(String value) { + for (MetadataTypeEnum b : MetadataTypeEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + + public static class Adapter extends TypeAdapter { + @Override + public void write(final JsonWriter jsonWriter, final MetadataTypeEnum enumeration) + throws IOException { + jsonWriter.value(enumeration.getValue()); + } + + @Override + public MetadataTypeEnum read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + return MetadataTypeEnum.fromValue(value); + } + } + + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + String value = jsonElement.getAsString(); + MetadataTypeEnum.fromValue(value); + } + } + + public static final String SERIALIZED_NAME_METADATA_TYPE = "metadata_type"; + + @SerializedName(SERIALIZED_NAME_METADATA_TYPE) + @javax.annotation.Nullable + private MetadataTypeEnum metadataType; + + public static final String SERIALIZED_NAME_METADATA_IDENTIFIER = "metadata_identifier"; + + @SerializedName(SERIALIZED_NAME_METADATA_IDENTIFIER) + @javax.annotation.Nonnull + private String metadataIdentifier; + + /** Type of field in the metadata to parameterize. */ + @JsonAdapter(FieldTypeEnum.Adapter.class) + public enum FieldTypeEnum { + ATTRIBUTE("ATTRIBUTE"), + + CONNECTION_PROPERTY("CONNECTION_PROPERTY"); + + private String value; + + FieldTypeEnum(String value) { + this.value = value; + } + + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + public static FieldTypeEnum fromValue(String value) { + for (FieldTypeEnum b : FieldTypeEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + + public static class Adapter extends TypeAdapter { + @Override + public void write(final JsonWriter jsonWriter, final FieldTypeEnum enumeration) + throws IOException { + jsonWriter.value(enumeration.getValue()); + } + + @Override + public FieldTypeEnum read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + return FieldTypeEnum.fromValue(value); + } + } + + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + String value = jsonElement.getAsString(); + FieldTypeEnum.fromValue(value); + } + } + + public static final String SERIALIZED_NAME_FIELD_TYPE = "field_type"; + + @SerializedName(SERIALIZED_NAME_FIELD_TYPE) + @javax.annotation.Nonnull + private FieldTypeEnum fieldType; + + public static final String SERIALIZED_NAME_FIELD_NAMES = "field_names"; + + @SerializedName(SERIALIZED_NAME_FIELD_NAMES) + @javax.annotation.Nonnull + private List fieldNames; + + public static final String SERIALIZED_NAME_VARIABLE_IDENTIFIER = "variable_identifier"; + + @SerializedName(SERIALIZED_NAME_VARIABLE_IDENTIFIER) + @javax.annotation.Nonnull + private String variableIdentifier; + + public ParameterizeMetadataFieldsRequest() {} + + public ParameterizeMetadataFieldsRequest metadataType( + @javax.annotation.Nullable MetadataTypeEnum metadataType) { + this.metadataType = metadataType; + return this; + } + + /** + * Type of metadata object to parameterize. + * + * @return metadataType + */ + @javax.annotation.Nullable + public MetadataTypeEnum getMetadataType() { + return metadataType; + } + + public void setMetadataType(@javax.annotation.Nullable MetadataTypeEnum metadataType) { + this.metadataType = metadataType; + } + + public ParameterizeMetadataFieldsRequest metadataIdentifier( + @javax.annotation.Nonnull String metadataIdentifier) { + this.metadataIdentifier = metadataIdentifier; + return this; + } + + /** + * Unique ID or name of the metadata object to parameterize. + * + * @return metadataIdentifier + */ + @javax.annotation.Nonnull + public String getMetadataIdentifier() { + return metadataIdentifier; + } + + public void setMetadataIdentifier(@javax.annotation.Nonnull String metadataIdentifier) { + this.metadataIdentifier = metadataIdentifier; + } + + public ParameterizeMetadataFieldsRequest fieldType( + @javax.annotation.Nonnull FieldTypeEnum fieldType) { + this.fieldType = fieldType; + return this; + } + + /** + * Type of field in the metadata to parameterize. + * + * @return fieldType + */ + @javax.annotation.Nonnull + public FieldTypeEnum getFieldType() { + return fieldType; + } + + public void setFieldType(@javax.annotation.Nonnull FieldTypeEnum fieldType) { + this.fieldType = fieldType; + } + + public ParameterizeMetadataFieldsRequest fieldNames( + @javax.annotation.Nonnull List fieldNames) { + this.fieldNames = fieldNames; + return this; + } + + public ParameterizeMetadataFieldsRequest addFieldNamesItem(String fieldNamesItem) { + if (this.fieldNames == null) { + this.fieldNames = new ArrayList<>(); + } + this.fieldNames.add(fieldNamesItem); + return this; + } + + /** + * JSON array of field names to parameterize. Example: [schemaName, databaseName, tableName] + * + * @return fieldNames + */ + @javax.annotation.Nonnull + public List getFieldNames() { + return fieldNames; + } + + public void setFieldNames(@javax.annotation.Nonnull List fieldNames) { + this.fieldNames = fieldNames; + } + + public ParameterizeMetadataFieldsRequest variableIdentifier( + @javax.annotation.Nonnull String variableIdentifier) { + this.variableIdentifier = variableIdentifier; + return this; + } + + /** + * Unique ID or name of the variable to use for parameterization of these fields. + * + * @return variableIdentifier + */ + @javax.annotation.Nonnull + public String getVariableIdentifier() { + return variableIdentifier; + } + + public void setVariableIdentifier(@javax.annotation.Nonnull String variableIdentifier) { + this.variableIdentifier = variableIdentifier; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key name of the property + * @param value value of the property + * @return the ParameterizeMetadataFieldsRequest instance itself + */ + public ParameterizeMetadataFieldsRequest putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return a map of objects + */ + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key name of the property + * @return an object + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ParameterizeMetadataFieldsRequest parameterizeMetadataFieldsRequest = + (ParameterizeMetadataFieldsRequest) o; + return Objects.equals(this.metadataType, parameterizeMetadataFieldsRequest.metadataType) + && Objects.equals( + this.metadataIdentifier, + parameterizeMetadataFieldsRequest.metadataIdentifier) + && Objects.equals(this.fieldType, parameterizeMetadataFieldsRequest.fieldType) + && Objects.equals(this.fieldNames, parameterizeMetadataFieldsRequest.fieldNames) + && Objects.equals( + this.variableIdentifier, + parameterizeMetadataFieldsRequest.variableIdentifier) + && Objects.equals( + this.additionalProperties, + parameterizeMetadataFieldsRequest.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash( + metadataType, + metadataIdentifier, + fieldType, + fieldNames, + variableIdentifier, + additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ParameterizeMetadataFieldsRequest {\n"); + sb.append(" metadataType: ").append(toIndentedString(metadataType)).append("\n"); + sb.append(" metadataIdentifier: ") + .append(toIndentedString(metadataIdentifier)) + .append("\n"); + sb.append(" fieldType: ").append(toIndentedString(fieldType)).append("\n"); + sb.append(" fieldNames: ").append(toIndentedString(fieldNames)).append("\n"); + sb.append(" variableIdentifier: ") + .append(toIndentedString(variableIdentifier)) + .append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first + * line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("metadata_type"); + openapiFields.add("metadata_identifier"); + openapiFields.add("field_type"); + openapiFields.add("field_names"); + openapiFields.add("variable_identifier"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + openapiRequiredFields.add("metadata_identifier"); + openapiRequiredFields.add("field_type"); + openapiRequiredFields.add("field_names"); + openapiRequiredFields.add("variable_identifier"); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to + * ParameterizeMetadataFieldsRequest + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!ParameterizeMetadataFieldsRequest.openapiRequiredFields + .isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException( + String.format( + "The required field(s) %s in ParameterizeMetadataFieldsRequest is" + + " not found in the empty JSON string", + ParameterizeMetadataFieldsRequest.openapiRequiredFields + .toString())); + } + } + + // check to make sure all required properties/fields are present in the JSON string + for (String requiredField : ParameterizeMetadataFieldsRequest.openapiRequiredFields) { + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException( + String.format( + "The required field `%s` is not found in the JSON string: %s", + requiredField, jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if ((jsonObj.get("metadata_type") != null && !jsonObj.get("metadata_type").isJsonNull()) + && !jsonObj.get("metadata_type").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `metadata_type` to be a primitive type in the JSON" + + " string but got `%s`", + jsonObj.get("metadata_type").toString())); + } + // validate the optional field `metadata_type` + if (jsonObj.get("metadata_type") != null && !jsonObj.get("metadata_type").isJsonNull()) { + MetadataTypeEnum.validateJsonElement(jsonObj.get("metadata_type")); + } + if (!jsonObj.get("metadata_identifier").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `metadata_identifier` to be a primitive type in" + + " the JSON string but got `%s`", + jsonObj.get("metadata_identifier").toString())); + } + if (!jsonObj.get("field_type").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `field_type` to be a primitive type in the JSON" + + " string but got `%s`", + jsonObj.get("field_type").toString())); + } + // validate the required field `field_type` + FieldTypeEnum.validateJsonElement(jsonObj.get("field_type")); + // ensure the required json array is present + if (jsonObj.get("field_names") == null) { + throw new IllegalArgumentException( + "Expected the field `linkedContent` to be an array in the JSON string but got" + + " `null`"); + } else if (!jsonObj.get("field_names").isJsonArray()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `field_names` to be an array in the JSON string" + + " but got `%s`", + jsonObj.get("field_names").toString())); + } + if (!jsonObj.get("variable_identifier").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `variable_identifier` to be a primitive type in" + + " the JSON string but got `%s`", + jsonObj.get("variable_identifier").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!ParameterizeMetadataFieldsRequest.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'ParameterizeMetadataFieldsRequest' and + // its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter = + gson.getDelegateAdapter( + this, TypeToken.get(ParameterizeMetadataFieldsRequest.class)); + + return (TypeAdapter) + new TypeAdapter() { + @Override + public void write(JsonWriter out, ParameterizeMetadataFieldsRequest value) + throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + obj.remove("additionalProperties"); + // serialize additional properties + if (value.getAdditionalProperties() != null) { + for (Map.Entry entry : + value.getAdditionalProperties().entrySet()) { + if (entry.getValue() instanceof String) + obj.addProperty(entry.getKey(), (String) entry.getValue()); + else if (entry.getValue() instanceof Number) + obj.addProperty(entry.getKey(), (Number) entry.getValue()); + else if (entry.getValue() instanceof Boolean) + obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); + else if (entry.getValue() instanceof Character) + obj.addProperty( + entry.getKey(), (Character) entry.getValue()); + else { + JsonElement jsonElement = gson.toJsonTree(entry.getValue()); + if (jsonElement.isJsonArray()) { + obj.add(entry.getKey(), jsonElement.getAsJsonArray()); + } else { + obj.add(entry.getKey(), jsonElement.getAsJsonObject()); + } + } + } + } + elementAdapter.write(out, obj); + } + + @Override + public ParameterizeMetadataFieldsRequest read(JsonReader in) + throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // store additional fields in the deserialized instance + ParameterizeMetadataFieldsRequest instance = + thisAdapter.fromJsonTree(jsonObj); + for (Map.Entry entry : jsonObj.entrySet()) { + if (!openapiFields.contains(entry.getKey())) { + if (entry.getValue().isJsonPrimitive()) { // primitive type + if (entry.getValue().getAsJsonPrimitive().isString()) + instance.putAdditionalProperty( + entry.getKey(), entry.getValue().getAsString()); + else if (entry.getValue().getAsJsonPrimitive().isNumber()) + instance.putAdditionalProperty( + entry.getKey(), entry.getValue().getAsNumber()); + else if (entry.getValue().getAsJsonPrimitive().isBoolean()) + instance.putAdditionalProperty( + entry.getKey(), + entry.getValue().getAsBoolean()); + else + throw new IllegalArgumentException( + String.format( + "The field `%s` has unknown primitive" + + " type. Value: %s", + entry.getKey(), + entry.getValue().toString())); + } else if (entry.getValue().isJsonArray()) { + instance.putAdditionalProperty( + entry.getKey(), + gson.fromJson(entry.getValue(), List.class)); + } else { // JSON object + instance.putAdditionalProperty( + entry.getKey(), + gson.fromJson(entry.getValue(), HashMap.class)); + } + } + } + return instance; + } + }.nullSafe(); + } + } + + /** + * Create an instance of ParameterizeMetadataFieldsRequest given an JSON string + * + * @param jsonString JSON string + * @return An instance of ParameterizeMetadataFieldsRequest + * @throws IOException if the JSON string is invalid with respect to + * ParameterizeMetadataFieldsRequest + */ + public static ParameterizeMetadataFieldsRequest fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, ParameterizeMetadataFieldsRequest.class); + } + + /** + * Convert an instance of ParameterizeMetadataFieldsRequest to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} diff --git a/sdks/java/src/main/java/com/thoughtspot/client/model/ParameterizeMetadataRequest.java b/sdks/java/src/main/java/com/thoughtspot/client/model/ParameterizeMetadataRequest.java new file mode 100644 index 000000000..34090892f --- /dev/null +++ b/sdks/java/src/main/java/com/thoughtspot/client/model/ParameterizeMetadataRequest.java @@ -0,0 +1,577 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client.model; + +import com.google.gson.Gson; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.TypeAdapter; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.reflect.TypeToken; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import com.thoughtspot.client.JSON; +import java.io.IOException; +import java.io.Serializable; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Objects; + +/** ParameterizeMetadataRequest */ +@javax.annotation.Generated( + value = "org.openapitools.codegen.languages.JavaClientCodegen", + comments = "Generator version: 7.12.0") +public class ParameterizeMetadataRequest implements Serializable { + private static final long serialVersionUID = 1L; + + /** Type of metadata object to parameterize. */ + @JsonAdapter(MetadataTypeEnum.Adapter.class) + public enum MetadataTypeEnum { + LOGICAL_TABLE("LOGICAL_TABLE"), + + CONNECTION("CONNECTION"), + + CONNECTION_CONFIG("CONNECTION_CONFIG"); + + private String value; + + MetadataTypeEnum(String value) { + this.value = value; + } + + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + public static MetadataTypeEnum fromValue(String value) { + for (MetadataTypeEnum b : MetadataTypeEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + + public static class Adapter extends TypeAdapter { + @Override + public void write(final JsonWriter jsonWriter, final MetadataTypeEnum enumeration) + throws IOException { + jsonWriter.value(enumeration.getValue()); + } + + @Override + public MetadataTypeEnum read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + return MetadataTypeEnum.fromValue(value); + } + } + + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + String value = jsonElement.getAsString(); + MetadataTypeEnum.fromValue(value); + } + } + + public static final String SERIALIZED_NAME_METADATA_TYPE = "metadata_type"; + + @SerializedName(SERIALIZED_NAME_METADATA_TYPE) + @javax.annotation.Nullable + private MetadataTypeEnum metadataType; + + public static final String SERIALIZED_NAME_METADATA_IDENTIFIER = "metadata_identifier"; + + @SerializedName(SERIALIZED_NAME_METADATA_IDENTIFIER) + @javax.annotation.Nonnull + private String metadataIdentifier; + + /** Type of field in the metadata to parameterize. */ + @JsonAdapter(FieldTypeEnum.Adapter.class) + public enum FieldTypeEnum { + ATTRIBUTE("ATTRIBUTE"), + + CONNECTION_PROPERTY("CONNECTION_PROPERTY"); + + private String value; + + FieldTypeEnum(String value) { + this.value = value; + } + + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + public static FieldTypeEnum fromValue(String value) { + for (FieldTypeEnum b : FieldTypeEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + + public static class Adapter extends TypeAdapter { + @Override + public void write(final JsonWriter jsonWriter, final FieldTypeEnum enumeration) + throws IOException { + jsonWriter.value(enumeration.getValue()); + } + + @Override + public FieldTypeEnum read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + return FieldTypeEnum.fromValue(value); + } + } + + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + String value = jsonElement.getAsString(); + FieldTypeEnum.fromValue(value); + } + } + + public static final String SERIALIZED_NAME_FIELD_TYPE = "field_type"; + + @SerializedName(SERIALIZED_NAME_FIELD_TYPE) + @javax.annotation.Nonnull + private FieldTypeEnum fieldType; + + public static final String SERIALIZED_NAME_FIELD_NAME = "field_name"; + + @SerializedName(SERIALIZED_NAME_FIELD_NAME) + @javax.annotation.Nonnull + private String fieldName; + + public static final String SERIALIZED_NAME_VARIABLE_IDENTIFIER = "variable_identifier"; + + @SerializedName(SERIALIZED_NAME_VARIABLE_IDENTIFIER) + @javax.annotation.Nonnull + private String variableIdentifier; + + public ParameterizeMetadataRequest() {} + + public ParameterizeMetadataRequest metadataType( + @javax.annotation.Nullable MetadataTypeEnum metadataType) { + this.metadataType = metadataType; + return this; + } + + /** + * Type of metadata object to parameterize. + * + * @return metadataType + */ + @javax.annotation.Nullable + public MetadataTypeEnum getMetadataType() { + return metadataType; + } + + public void setMetadataType(@javax.annotation.Nullable MetadataTypeEnum metadataType) { + this.metadataType = metadataType; + } + + public ParameterizeMetadataRequest metadataIdentifier( + @javax.annotation.Nonnull String metadataIdentifier) { + this.metadataIdentifier = metadataIdentifier; + return this; + } + + /** + * Unique ID or name of the metadata object to parameterize. + * + * @return metadataIdentifier + */ + @javax.annotation.Nonnull + public String getMetadataIdentifier() { + return metadataIdentifier; + } + + public void setMetadataIdentifier(@javax.annotation.Nonnull String metadataIdentifier) { + this.metadataIdentifier = metadataIdentifier; + } + + public ParameterizeMetadataRequest fieldType( + @javax.annotation.Nonnull FieldTypeEnum fieldType) { + this.fieldType = fieldType; + return this; + } + + /** + * Type of field in the metadata to parameterize. + * + * @return fieldType + */ + @javax.annotation.Nonnull + public FieldTypeEnum getFieldType() { + return fieldType; + } + + public void setFieldType(@javax.annotation.Nonnull FieldTypeEnum fieldType) { + this.fieldType = fieldType; + } + + public ParameterizeMetadataRequest fieldName(@javax.annotation.Nonnull String fieldName) { + this.fieldName = fieldName; + return this; + } + + /** + * Name of the field which needs to be parameterized. + * + * @return fieldName + */ + @javax.annotation.Nonnull + public String getFieldName() { + return fieldName; + } + + public void setFieldName(@javax.annotation.Nonnull String fieldName) { + this.fieldName = fieldName; + } + + public ParameterizeMetadataRequest variableIdentifier( + @javax.annotation.Nonnull String variableIdentifier) { + this.variableIdentifier = variableIdentifier; + return this; + } + + /** + * Unique ID or name of the variable to use for parameterization + * + * @return variableIdentifier + */ + @javax.annotation.Nonnull + public String getVariableIdentifier() { + return variableIdentifier; + } + + public void setVariableIdentifier(@javax.annotation.Nonnull String variableIdentifier) { + this.variableIdentifier = variableIdentifier; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key name of the property + * @param value value of the property + * @return the ParameterizeMetadataRequest instance itself + */ + public ParameterizeMetadataRequest putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return a map of objects + */ + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key name of the property + * @return an object + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ParameterizeMetadataRequest parameterizeMetadataRequest = (ParameterizeMetadataRequest) o; + return Objects.equals(this.metadataType, parameterizeMetadataRequest.metadataType) + && Objects.equals( + this.metadataIdentifier, parameterizeMetadataRequest.metadataIdentifier) + && Objects.equals(this.fieldType, parameterizeMetadataRequest.fieldType) + && Objects.equals(this.fieldName, parameterizeMetadataRequest.fieldName) + && Objects.equals( + this.variableIdentifier, parameterizeMetadataRequest.variableIdentifier) + && Objects.equals( + this.additionalProperties, + parameterizeMetadataRequest.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash( + metadataType, + metadataIdentifier, + fieldType, + fieldName, + variableIdentifier, + additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ParameterizeMetadataRequest {\n"); + sb.append(" metadataType: ").append(toIndentedString(metadataType)).append("\n"); + sb.append(" metadataIdentifier: ") + .append(toIndentedString(metadataIdentifier)) + .append("\n"); + sb.append(" fieldType: ").append(toIndentedString(fieldType)).append("\n"); + sb.append(" fieldName: ").append(toIndentedString(fieldName)).append("\n"); + sb.append(" variableIdentifier: ") + .append(toIndentedString(variableIdentifier)) + .append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first + * line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("metadata_type"); + openapiFields.add("metadata_identifier"); + openapiFields.add("field_type"); + openapiFields.add("field_name"); + openapiFields.add("variable_identifier"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + openapiRequiredFields.add("metadata_identifier"); + openapiRequiredFields.add("field_type"); + openapiRequiredFields.add("field_name"); + openapiRequiredFields.add("variable_identifier"); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to + * ParameterizeMetadataRequest + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!ParameterizeMetadataRequest.openapiRequiredFields + .isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException( + String.format( + "The required field(s) %s in ParameterizeMetadataRequest is not" + + " found in the empty JSON string", + ParameterizeMetadataRequest.openapiRequiredFields.toString())); + } + } + + // check to make sure all required properties/fields are present in the JSON string + for (String requiredField : ParameterizeMetadataRequest.openapiRequiredFields) { + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException( + String.format( + "The required field `%s` is not found in the JSON string: %s", + requiredField, jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if ((jsonObj.get("metadata_type") != null && !jsonObj.get("metadata_type").isJsonNull()) + && !jsonObj.get("metadata_type").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `metadata_type` to be a primitive type in the JSON" + + " string but got `%s`", + jsonObj.get("metadata_type").toString())); + } + // validate the optional field `metadata_type` + if (jsonObj.get("metadata_type") != null && !jsonObj.get("metadata_type").isJsonNull()) { + MetadataTypeEnum.validateJsonElement(jsonObj.get("metadata_type")); + } + if (!jsonObj.get("metadata_identifier").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `metadata_identifier` to be a primitive type in" + + " the JSON string but got `%s`", + jsonObj.get("metadata_identifier").toString())); + } + if (!jsonObj.get("field_type").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `field_type` to be a primitive type in the JSON" + + " string but got `%s`", + jsonObj.get("field_type").toString())); + } + // validate the required field `field_type` + FieldTypeEnum.validateJsonElement(jsonObj.get("field_type")); + if (!jsonObj.get("field_name").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `field_name` to be a primitive type in the JSON" + + " string but got `%s`", + jsonObj.get("field_name").toString())); + } + if (!jsonObj.get("variable_identifier").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `variable_identifier` to be a primitive type in" + + " the JSON string but got `%s`", + jsonObj.get("variable_identifier").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!ParameterizeMetadataRequest.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'ParameterizeMetadataRequest' and its + // subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter = + gson.getDelegateAdapter(this, TypeToken.get(ParameterizeMetadataRequest.class)); + + return (TypeAdapter) + new TypeAdapter() { + @Override + public void write(JsonWriter out, ParameterizeMetadataRequest value) + throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + obj.remove("additionalProperties"); + // serialize additional properties + if (value.getAdditionalProperties() != null) { + for (Map.Entry entry : + value.getAdditionalProperties().entrySet()) { + if (entry.getValue() instanceof String) + obj.addProperty(entry.getKey(), (String) entry.getValue()); + else if (entry.getValue() instanceof Number) + obj.addProperty(entry.getKey(), (Number) entry.getValue()); + else if (entry.getValue() instanceof Boolean) + obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); + else if (entry.getValue() instanceof Character) + obj.addProperty( + entry.getKey(), (Character) entry.getValue()); + else { + JsonElement jsonElement = gson.toJsonTree(entry.getValue()); + if (jsonElement.isJsonArray()) { + obj.add(entry.getKey(), jsonElement.getAsJsonArray()); + } else { + obj.add(entry.getKey(), jsonElement.getAsJsonObject()); + } + } + } + } + elementAdapter.write(out, obj); + } + + @Override + public ParameterizeMetadataRequest read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // store additional fields in the deserialized instance + ParameterizeMetadataRequest instance = + thisAdapter.fromJsonTree(jsonObj); + for (Map.Entry entry : jsonObj.entrySet()) { + if (!openapiFields.contains(entry.getKey())) { + if (entry.getValue().isJsonPrimitive()) { // primitive type + if (entry.getValue().getAsJsonPrimitive().isString()) + instance.putAdditionalProperty( + entry.getKey(), entry.getValue().getAsString()); + else if (entry.getValue().getAsJsonPrimitive().isNumber()) + instance.putAdditionalProperty( + entry.getKey(), entry.getValue().getAsNumber()); + else if (entry.getValue().getAsJsonPrimitive().isBoolean()) + instance.putAdditionalProperty( + entry.getKey(), + entry.getValue().getAsBoolean()); + else + throw new IllegalArgumentException( + String.format( + "The field `%s` has unknown primitive" + + " type. Value: %s", + entry.getKey(), + entry.getValue().toString())); + } else if (entry.getValue().isJsonArray()) { + instance.putAdditionalProperty( + entry.getKey(), + gson.fromJson(entry.getValue(), List.class)); + } else { // JSON object + instance.putAdditionalProperty( + entry.getKey(), + gson.fromJson(entry.getValue(), HashMap.class)); + } + } + } + return instance; + } + }.nullSafe(); + } + } + + /** + * Create an instance of ParameterizeMetadataRequest given an JSON string + * + * @param jsonString JSON string + * @return An instance of ParameterizeMetadataRequest + * @throws IOException if the JSON string is invalid with respect to ParameterizeMetadataRequest + */ + public static ParameterizeMetadataRequest fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, ParameterizeMetadataRequest.class); + } + + /** + * Convert an instance of ParameterizeMetadataRequest to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} diff --git a/sdks/java/src/main/java/com/thoughtspot/client/model/ParametersListItem.java b/sdks/java/src/main/java/com/thoughtspot/client/model/ParametersListItem.java new file mode 100644 index 000000000..80f74d69d --- /dev/null +++ b/sdks/java/src/main/java/com/thoughtspot/client/model/ParametersListItem.java @@ -0,0 +1,346 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client.model; + +import com.google.gson.Gson; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.TypeAdapter; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.annotations.SerializedName; +import com.google.gson.reflect.TypeToken; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import com.thoughtspot.client.JSON; +import java.io.IOException; +import java.io.Serializable; +import java.util.Arrays; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Objects; +import org.openapitools.jackson.nullable.JsonNullable; + +/** ParametersListItem */ +@javax.annotation.Generated( + value = "org.openapitools.codegen.languages.JavaClientCodegen", + comments = "Generator version: 7.12.0") +public class ParametersListItem implements Serializable { + private static final long serialVersionUID = 1L; + + public static final String SERIALIZED_NAME_KEY = "key"; + + @SerializedName(SERIALIZED_NAME_KEY) + @javax.annotation.Nullable + private String key; + + public static final String SERIALIZED_NAME_VALUE = "value"; + + @SerializedName(SERIALIZED_NAME_VALUE) + @javax.annotation.Nullable + private String value; + + public ParametersListItem() {} + + public ParametersListItem key(@javax.annotation.Nullable String key) { + this.key = key; + return this; + } + + /** + * Key for the url query parameter + * + * @return key + */ + @javax.annotation.Nullable + public String getKey() { + return key; + } + + public void setKey(@javax.annotation.Nullable String key) { + this.key = key; + } + + public ParametersListItem value(@javax.annotation.Nullable String value) { + this.value = value; + return this; + } + + /** + * Value for the url query parameter + * + * @return value + */ + @javax.annotation.Nullable + public String getValue() { + return value; + } + + public void setValue(@javax.annotation.Nullable String value) { + this.value = value; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key name of the property + * @param value value of the property + * @return the ParametersListItem instance itself + */ + public ParametersListItem putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return a map of objects + */ + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key name of the property + * @return an object + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ParametersListItem parametersListItem = (ParametersListItem) o; + return Objects.equals(this.key, parametersListItem.key) + && Objects.equals(this.value, parametersListItem.value) + && Objects.equals( + this.additionalProperties, parametersListItem.additionalProperties); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b + || (a != null + && b != null + && a.isPresent() + && b.isPresent() + && Objects.deepEquals(a.get(), b.get())); + } + + @Override + public int hashCode() { + return Objects.hash(key, value, additionalProperties); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; + } + return a.isPresent() ? Arrays.deepHashCode(new Object[] {a.get()}) : 31; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ParametersListItem {\n"); + sb.append(" key: ").append(toIndentedString(key)).append("\n"); + sb.append(" value: ").append(toIndentedString(value)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first + * line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("key"); + openapiFields.add("value"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to ParametersListItem + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!ParametersListItem.openapiRequiredFields + .isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException( + String.format( + "The required field(s) %s in ParametersListItem is not found in" + + " the empty JSON string", + ParametersListItem.openapiRequiredFields.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if ((jsonObj.get("key") != null && !jsonObj.get("key").isJsonNull()) + && !jsonObj.get("key").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `key` to be a primitive type in the JSON string" + + " but got `%s`", + jsonObj.get("key").toString())); + } + if ((jsonObj.get("value") != null && !jsonObj.get("value").isJsonNull()) + && !jsonObj.get("value").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `value` to be a primitive type in the JSON string" + + " but got `%s`", + jsonObj.get("value").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!ParametersListItem.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'ParametersListItem' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter = + gson.getDelegateAdapter(this, TypeToken.get(ParametersListItem.class)); + + return (TypeAdapter) + new TypeAdapter() { + @Override + public void write(JsonWriter out, ParametersListItem value) + throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + obj.remove("additionalProperties"); + // serialize additional properties + if (value.getAdditionalProperties() != null) { + for (Map.Entry entry : + value.getAdditionalProperties().entrySet()) { + if (entry.getValue() instanceof String) + obj.addProperty(entry.getKey(), (String) entry.getValue()); + else if (entry.getValue() instanceof Number) + obj.addProperty(entry.getKey(), (Number) entry.getValue()); + else if (entry.getValue() instanceof Boolean) + obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); + else if (entry.getValue() instanceof Character) + obj.addProperty( + entry.getKey(), (Character) entry.getValue()); + else { + JsonElement jsonElement = gson.toJsonTree(entry.getValue()); + if (jsonElement.isJsonArray()) { + obj.add(entry.getKey(), jsonElement.getAsJsonArray()); + } else { + obj.add(entry.getKey(), jsonElement.getAsJsonObject()); + } + } + } + } + elementAdapter.write(out, obj); + } + + @Override + public ParametersListItem read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // store additional fields in the deserialized instance + ParametersListItem instance = thisAdapter.fromJsonTree(jsonObj); + for (Map.Entry entry : jsonObj.entrySet()) { + if (!openapiFields.contains(entry.getKey())) { + if (entry.getValue().isJsonPrimitive()) { // primitive type + if (entry.getValue().getAsJsonPrimitive().isString()) + instance.putAdditionalProperty( + entry.getKey(), entry.getValue().getAsString()); + else if (entry.getValue().getAsJsonPrimitive().isNumber()) + instance.putAdditionalProperty( + entry.getKey(), entry.getValue().getAsNumber()); + else if (entry.getValue().getAsJsonPrimitive().isBoolean()) + instance.putAdditionalProperty( + entry.getKey(), + entry.getValue().getAsBoolean()); + else + throw new IllegalArgumentException( + String.format( + "The field `%s` has unknown primitive" + + " type. Value: %s", + entry.getKey(), + entry.getValue().toString())); + } else if (entry.getValue().isJsonArray()) { + instance.putAdditionalProperty( + entry.getKey(), + gson.fromJson(entry.getValue(), List.class)); + } else { // JSON object + instance.putAdditionalProperty( + entry.getKey(), + gson.fromJson(entry.getValue(), HashMap.class)); + } + } + } + return instance; + } + }.nullSafe(); + } + } + + /** + * Create an instance of ParametersListItem given an JSON string + * + * @param jsonString JSON string + * @return An instance of ParametersListItem + * @throws IOException if the JSON string is invalid with respect to ParametersListItem + */ + public static ParametersListItem fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, ParametersListItem.class); + } + + /** + * Convert an instance of ParametersListItem to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} diff --git a/sdks/java/src/main/java/com/thoughtspot/client/model/ParametersListItemInput.java b/sdks/java/src/main/java/com/thoughtspot/client/model/ParametersListItemInput.java new file mode 100644 index 000000000..ee2dcb0cd --- /dev/null +++ b/sdks/java/src/main/java/com/thoughtspot/client/model/ParametersListItemInput.java @@ -0,0 +1,347 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client.model; + +import com.google.gson.Gson; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.TypeAdapter; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.annotations.SerializedName; +import com.google.gson.reflect.TypeToken; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import com.thoughtspot.client.JSON; +import java.io.IOException; +import java.io.Serializable; +import java.util.Arrays; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Objects; +import org.openapitools.jackson.nullable.JsonNullable; + +/** ParametersListItemInput */ +@javax.annotation.Generated( + value = "org.openapitools.codegen.languages.JavaClientCodegen", + comments = "Generator version: 7.12.0") +public class ParametersListItemInput implements Serializable { + private static final long serialVersionUID = 1L; + + public static final String SERIALIZED_NAME_KEY = "key"; + + @SerializedName(SERIALIZED_NAME_KEY) + @javax.annotation.Nullable + private String key; + + public static final String SERIALIZED_NAME_VALUE = "value"; + + @SerializedName(SERIALIZED_NAME_VALUE) + @javax.annotation.Nullable + private String value; + + public ParametersListItemInput() {} + + public ParametersListItemInput key(@javax.annotation.Nullable String key) { + this.key = key; + return this; + } + + /** + * Key for the url query parameter + * + * @return key + */ + @javax.annotation.Nullable + public String getKey() { + return key; + } + + public void setKey(@javax.annotation.Nullable String key) { + this.key = key; + } + + public ParametersListItemInput value(@javax.annotation.Nullable String value) { + this.value = value; + return this; + } + + /** + * Value for the url query parameter + * + * @return value + */ + @javax.annotation.Nullable + public String getValue() { + return value; + } + + public void setValue(@javax.annotation.Nullable String value) { + this.value = value; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key name of the property + * @param value value of the property + * @return the ParametersListItemInput instance itself + */ + public ParametersListItemInput putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return a map of objects + */ + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key name of the property + * @return an object + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ParametersListItemInput parametersListItemInput = (ParametersListItemInput) o; + return Objects.equals(this.key, parametersListItemInput.key) + && Objects.equals(this.value, parametersListItemInput.value) + && Objects.equals( + this.additionalProperties, parametersListItemInput.additionalProperties); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b + || (a != null + && b != null + && a.isPresent() + && b.isPresent() + && Objects.deepEquals(a.get(), b.get())); + } + + @Override + public int hashCode() { + return Objects.hash(key, value, additionalProperties); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; + } + return a.isPresent() ? Arrays.deepHashCode(new Object[] {a.get()}) : 31; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ParametersListItemInput {\n"); + sb.append(" key: ").append(toIndentedString(key)).append("\n"); + sb.append(" value: ").append(toIndentedString(value)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first + * line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("key"); + openapiFields.add("value"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to ParametersListItemInput + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!ParametersListItemInput.openapiRequiredFields + .isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException( + String.format( + "The required field(s) %s in ParametersListItemInput is not found" + + " in the empty JSON string", + ParametersListItemInput.openapiRequiredFields.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if ((jsonObj.get("key") != null && !jsonObj.get("key").isJsonNull()) + && !jsonObj.get("key").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `key` to be a primitive type in the JSON string" + + " but got `%s`", + jsonObj.get("key").toString())); + } + if ((jsonObj.get("value") != null && !jsonObj.get("value").isJsonNull()) + && !jsonObj.get("value").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `value` to be a primitive type in the JSON string" + + " but got `%s`", + jsonObj.get("value").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!ParametersListItemInput.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'ParametersListItemInput' and its + // subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter = + gson.getDelegateAdapter(this, TypeToken.get(ParametersListItemInput.class)); + + return (TypeAdapter) + new TypeAdapter() { + @Override + public void write(JsonWriter out, ParametersListItemInput value) + throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + obj.remove("additionalProperties"); + // serialize additional properties + if (value.getAdditionalProperties() != null) { + for (Map.Entry entry : + value.getAdditionalProperties().entrySet()) { + if (entry.getValue() instanceof String) + obj.addProperty(entry.getKey(), (String) entry.getValue()); + else if (entry.getValue() instanceof Number) + obj.addProperty(entry.getKey(), (Number) entry.getValue()); + else if (entry.getValue() instanceof Boolean) + obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); + else if (entry.getValue() instanceof Character) + obj.addProperty( + entry.getKey(), (Character) entry.getValue()); + else { + JsonElement jsonElement = gson.toJsonTree(entry.getValue()); + if (jsonElement.isJsonArray()) { + obj.add(entry.getKey(), jsonElement.getAsJsonArray()); + } else { + obj.add(entry.getKey(), jsonElement.getAsJsonObject()); + } + } + } + } + elementAdapter.write(out, obj); + } + + @Override + public ParametersListItemInput read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // store additional fields in the deserialized instance + ParametersListItemInput instance = thisAdapter.fromJsonTree(jsonObj); + for (Map.Entry entry : jsonObj.entrySet()) { + if (!openapiFields.contains(entry.getKey())) { + if (entry.getValue().isJsonPrimitive()) { // primitive type + if (entry.getValue().getAsJsonPrimitive().isString()) + instance.putAdditionalProperty( + entry.getKey(), entry.getValue().getAsString()); + else if (entry.getValue().getAsJsonPrimitive().isNumber()) + instance.putAdditionalProperty( + entry.getKey(), entry.getValue().getAsNumber()); + else if (entry.getValue().getAsJsonPrimitive().isBoolean()) + instance.putAdditionalProperty( + entry.getKey(), + entry.getValue().getAsBoolean()); + else + throw new IllegalArgumentException( + String.format( + "The field `%s` has unknown primitive" + + " type. Value: %s", + entry.getKey(), + entry.getValue().toString())); + } else if (entry.getValue().isJsonArray()) { + instance.putAdditionalProperty( + entry.getKey(), + gson.fromJson(entry.getValue(), List.class)); + } else { // JSON object + instance.putAdditionalProperty( + entry.getKey(), + gson.fromJson(entry.getValue(), HashMap.class)); + } + } + } + return instance; + } + }.nullSafe(); + } + } + + /** + * Create an instance of ParametersListItemInput given an JSON string + * + * @param jsonString JSON string + * @return An instance of ParametersListItemInput + * @throws IOException if the JSON string is invalid with respect to ParametersListItemInput + */ + public static ParametersListItemInput fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, ParametersListItemInput.class); + } + + /** + * Convert an instance of ParametersListItemInput to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} diff --git a/sdks/java/src/main/java/com/thoughtspot/client/model/PdfOptions.java b/sdks/java/src/main/java/com/thoughtspot/client/model/PdfOptions.java new file mode 100644 index 000000000..8129ac04a --- /dev/null +++ b/sdks/java/src/main/java/com/thoughtspot/client/model/PdfOptions.java @@ -0,0 +1,624 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client.model; + +import com.google.gson.Gson; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.TypeAdapter; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.reflect.TypeToken; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import com.thoughtspot.client.JSON; +import java.io.IOException; +import java.io.Serializable; +import java.util.Arrays; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Objects; +import org.openapitools.jackson.nullable.JsonNullable; + +/** Options for PDF export. */ +@javax.annotation.Generated( + value = "org.openapitools.codegen.languages.JavaClientCodegen", + comments = "Generator version: 7.12.0") +public class PdfOptions implements Serializable { + private static final long serialVersionUID = 1L; + + public static final String SERIALIZED_NAME_COMPLETE_LIVEBOARD = "complete_liveboard"; + + @SerializedName(SERIALIZED_NAME_COMPLETE_LIVEBOARD) + @javax.annotation.Nullable + private Boolean completeLiveboard; + + public static final String SERIALIZED_NAME_INCLUDE_COVER_PAGE = "include_cover_page"; + + @SerializedName(SERIALIZED_NAME_INCLUDE_COVER_PAGE) + @javax.annotation.Nullable + private Boolean includeCoverPage; + + public static final String SERIALIZED_NAME_INCLUDE_CUSTOM_LOGO = "include_custom_logo"; + + @SerializedName(SERIALIZED_NAME_INCLUDE_CUSTOM_LOGO) + @javax.annotation.Nullable + private Boolean includeCustomLogo; + + public static final String SERIALIZED_NAME_INCLUDE_FILTER_PAGE = "include_filter_page"; + + @SerializedName(SERIALIZED_NAME_INCLUDE_FILTER_PAGE) + @javax.annotation.Nullable + private Boolean includeFilterPage; + + public static final String SERIALIZED_NAME_INCLUDE_PAGE_NUMBER = "include_page_number"; + + @SerializedName(SERIALIZED_NAME_INCLUDE_PAGE_NUMBER) + @javax.annotation.Nullable + private Boolean includePageNumber; + + public static final String SERIALIZED_NAME_PAGE_FOOTER_TEXT = "page_footer_text"; + + @SerializedName(SERIALIZED_NAME_PAGE_FOOTER_TEXT) + @javax.annotation.Nullable + private String pageFooterText; + + public static final String SERIALIZED_NAME_PAGE_ORIENTATION = "page_orientation"; + + @SerializedName(SERIALIZED_NAME_PAGE_ORIENTATION) + @javax.annotation.Nullable + private String pageOrientation; + + /** Page size. */ + @JsonAdapter(PageSizeEnum.Adapter.class) + public enum PageSizeEnum { + A4("A4"), + + TAB_BASED("TAB_BASED"); + + private String value; + + PageSizeEnum(String value) { + this.value = value; + } + + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + public static PageSizeEnum fromValue(String value) { + for (PageSizeEnum b : PageSizeEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + return null; + } + + public static class Adapter extends TypeAdapter { + @Override + public void write(final JsonWriter jsonWriter, final PageSizeEnum enumeration) + throws IOException { + jsonWriter.value(enumeration.getValue()); + } + + @Override + public PageSizeEnum read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + return PageSizeEnum.fromValue(value); + } + } + + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + String value = jsonElement.getAsString(); + PageSizeEnum.fromValue(value); + } + } + + public static final String SERIALIZED_NAME_PAGE_SIZE = "page_size"; + + @SerializedName(SERIALIZED_NAME_PAGE_SIZE) + @javax.annotation.Nullable + private PageSizeEnum pageSize; + + public static final String SERIALIZED_NAME_TRUNCATE_TABLE = "truncate_table"; + + @SerializedName(SERIALIZED_NAME_TRUNCATE_TABLE) + @javax.annotation.Nullable + private Boolean truncateTable; + + public PdfOptions() {} + + public PdfOptions completeLiveboard(@javax.annotation.Nullable Boolean completeLiveboard) { + this.completeLiveboard = completeLiveboard; + return this; + } + + /** + * Indicates whether to include complete Liveboard. + * + * @return completeLiveboard + */ + @javax.annotation.Nullable + public Boolean getCompleteLiveboard() { + return completeLiveboard; + } + + public void setCompleteLiveboard(@javax.annotation.Nullable Boolean completeLiveboard) { + this.completeLiveboard = completeLiveboard; + } + + public PdfOptions includeCoverPage(@javax.annotation.Nullable Boolean includeCoverPage) { + this.includeCoverPage = includeCoverPage; + return this; + } + + /** + * Indicates whether to include cover page with the Liveboard title. + * + * @return includeCoverPage + */ + @javax.annotation.Nullable + public Boolean getIncludeCoverPage() { + return includeCoverPage; + } + + public void setIncludeCoverPage(@javax.annotation.Nullable Boolean includeCoverPage) { + this.includeCoverPage = includeCoverPage; + } + + public PdfOptions includeCustomLogo(@javax.annotation.Nullable Boolean includeCustomLogo) { + this.includeCustomLogo = includeCustomLogo; + return this; + } + + /** + * Indicates whether to include customized wide logo in the footer if available. + * + * @return includeCustomLogo + */ + @javax.annotation.Nullable + public Boolean getIncludeCustomLogo() { + return includeCustomLogo; + } + + public void setIncludeCustomLogo(@javax.annotation.Nullable Boolean includeCustomLogo) { + this.includeCustomLogo = includeCustomLogo; + } + + public PdfOptions includeFilterPage(@javax.annotation.Nullable Boolean includeFilterPage) { + this.includeFilterPage = includeFilterPage; + return this; + } + + /** + * Indicates whether to include a page with all applied filters. + * + * @return includeFilterPage + */ + @javax.annotation.Nullable + public Boolean getIncludeFilterPage() { + return includeFilterPage; + } + + public void setIncludeFilterPage(@javax.annotation.Nullable Boolean includeFilterPage) { + this.includeFilterPage = includeFilterPage; + } + + public PdfOptions includePageNumber(@javax.annotation.Nullable Boolean includePageNumber) { + this.includePageNumber = includePageNumber; + return this; + } + + /** + * Indicates whether to include page number in the footer of each page + * + * @return includePageNumber + */ + @javax.annotation.Nullable + public Boolean getIncludePageNumber() { + return includePageNumber; + } + + public void setIncludePageNumber(@javax.annotation.Nullable Boolean includePageNumber) { + this.includePageNumber = includePageNumber; + } + + public PdfOptions pageFooterText(@javax.annotation.Nullable String pageFooterText) { + this.pageFooterText = pageFooterText; + return this; + } + + /** + * Text to include in the footer of each page. + * + * @return pageFooterText + */ + @javax.annotation.Nullable + public String getPageFooterText() { + return pageFooterText; + } + + public void setPageFooterText(@javax.annotation.Nullable String pageFooterText) { + this.pageFooterText = pageFooterText; + } + + public PdfOptions pageOrientation(@javax.annotation.Nullable String pageOrientation) { + this.pageOrientation = pageOrientation; + return this; + } + + /** + * Page orientation of the PDF. + * + * @return pageOrientation + */ + @javax.annotation.Nullable + public String getPageOrientation() { + return pageOrientation; + } + + public void setPageOrientation(@javax.annotation.Nullable String pageOrientation) { + this.pageOrientation = pageOrientation; + } + + public PdfOptions pageSize(@javax.annotation.Nullable PageSizeEnum pageSize) { + this.pageSize = pageSize; + return this; + } + + /** + * Page size. + * + * @return pageSize + */ + @javax.annotation.Nullable + public PageSizeEnum getPageSize() { + return pageSize; + } + + public void setPageSize(@javax.annotation.Nullable PageSizeEnum pageSize) { + this.pageSize = pageSize; + } + + public PdfOptions truncateTable(@javax.annotation.Nullable Boolean truncateTable) { + this.truncateTable = truncateTable; + return this; + } + + /** + * Indicates whether to include only first page of the tables. + * + * @return truncateTable + */ + @javax.annotation.Nullable + public Boolean getTruncateTable() { + return truncateTable; + } + + public void setTruncateTable(@javax.annotation.Nullable Boolean truncateTable) { + this.truncateTable = truncateTable; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key name of the property + * @param value value of the property + * @return the PdfOptions instance itself + */ + public PdfOptions putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return a map of objects + */ + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key name of the property + * @return an object + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + PdfOptions pdfOptions = (PdfOptions) o; + return Objects.equals(this.completeLiveboard, pdfOptions.completeLiveboard) + && Objects.equals(this.includeCoverPage, pdfOptions.includeCoverPage) + && Objects.equals(this.includeCustomLogo, pdfOptions.includeCustomLogo) + && Objects.equals(this.includeFilterPage, pdfOptions.includeFilterPage) + && Objects.equals(this.includePageNumber, pdfOptions.includePageNumber) + && Objects.equals(this.pageFooterText, pdfOptions.pageFooterText) + && Objects.equals(this.pageOrientation, pdfOptions.pageOrientation) + && Objects.equals(this.pageSize, pdfOptions.pageSize) + && Objects.equals(this.truncateTable, pdfOptions.truncateTable) + && Objects.equals(this.additionalProperties, pdfOptions.additionalProperties); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b + || (a != null + && b != null + && a.isPresent() + && b.isPresent() + && Objects.deepEquals(a.get(), b.get())); + } + + @Override + public int hashCode() { + return Objects.hash( + completeLiveboard, + includeCoverPage, + includeCustomLogo, + includeFilterPage, + includePageNumber, + pageFooterText, + pageOrientation, + pageSize, + truncateTable, + additionalProperties); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; + } + return a.isPresent() ? Arrays.deepHashCode(new Object[] {a.get()}) : 31; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class PdfOptions {\n"); + sb.append(" completeLiveboard: ") + .append(toIndentedString(completeLiveboard)) + .append("\n"); + sb.append(" includeCoverPage: ").append(toIndentedString(includeCoverPage)).append("\n"); + sb.append(" includeCustomLogo: ") + .append(toIndentedString(includeCustomLogo)) + .append("\n"); + sb.append(" includeFilterPage: ") + .append(toIndentedString(includeFilterPage)) + .append("\n"); + sb.append(" includePageNumber: ") + .append(toIndentedString(includePageNumber)) + .append("\n"); + sb.append(" pageFooterText: ").append(toIndentedString(pageFooterText)).append("\n"); + sb.append(" pageOrientation: ").append(toIndentedString(pageOrientation)).append("\n"); + sb.append(" pageSize: ").append(toIndentedString(pageSize)).append("\n"); + sb.append(" truncateTable: ").append(toIndentedString(truncateTable)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first + * line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("complete_liveboard"); + openapiFields.add("include_cover_page"); + openapiFields.add("include_custom_logo"); + openapiFields.add("include_filter_page"); + openapiFields.add("include_page_number"); + openapiFields.add("page_footer_text"); + openapiFields.add("page_orientation"); + openapiFields.add("page_size"); + openapiFields.add("truncate_table"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to PdfOptions + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!PdfOptions.openapiRequiredFields + .isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException( + String.format( + "The required field(s) %s in PdfOptions is not found in the empty" + + " JSON string", + PdfOptions.openapiRequiredFields.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if ((jsonObj.get("page_footer_text") != null + && !jsonObj.get("page_footer_text").isJsonNull()) + && !jsonObj.get("page_footer_text").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `page_footer_text` to be a primitive type in the" + + " JSON string but got `%s`", + jsonObj.get("page_footer_text").toString())); + } + if ((jsonObj.get("page_orientation") != null + && !jsonObj.get("page_orientation").isJsonNull()) + && !jsonObj.get("page_orientation").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `page_orientation` to be a primitive type in the" + + " JSON string but got `%s`", + jsonObj.get("page_orientation").toString())); + } + if ((jsonObj.get("page_size") != null && !jsonObj.get("page_size").isJsonNull()) + && !jsonObj.get("page_size").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `page_size` to be a primitive type in the JSON" + + " string but got `%s`", + jsonObj.get("page_size").toString())); + } + // validate the optional field `page_size` + if (jsonObj.get("page_size") != null && !jsonObj.get("page_size").isJsonNull()) { + PageSizeEnum.validateJsonElement(jsonObj.get("page_size")); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!PdfOptions.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'PdfOptions' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter = + gson.getDelegateAdapter(this, TypeToken.get(PdfOptions.class)); + + return (TypeAdapter) + new TypeAdapter() { + @Override + public void write(JsonWriter out, PdfOptions value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + obj.remove("additionalProperties"); + // serialize additional properties + if (value.getAdditionalProperties() != null) { + for (Map.Entry entry : + value.getAdditionalProperties().entrySet()) { + if (entry.getValue() instanceof String) + obj.addProperty(entry.getKey(), (String) entry.getValue()); + else if (entry.getValue() instanceof Number) + obj.addProperty(entry.getKey(), (Number) entry.getValue()); + else if (entry.getValue() instanceof Boolean) + obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); + else if (entry.getValue() instanceof Character) + obj.addProperty( + entry.getKey(), (Character) entry.getValue()); + else { + JsonElement jsonElement = gson.toJsonTree(entry.getValue()); + if (jsonElement.isJsonArray()) { + obj.add(entry.getKey(), jsonElement.getAsJsonArray()); + } else { + obj.add(entry.getKey(), jsonElement.getAsJsonObject()); + } + } + } + } + elementAdapter.write(out, obj); + } + + @Override + public PdfOptions read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // store additional fields in the deserialized instance + PdfOptions instance = thisAdapter.fromJsonTree(jsonObj); + for (Map.Entry entry : jsonObj.entrySet()) { + if (!openapiFields.contains(entry.getKey())) { + if (entry.getValue().isJsonPrimitive()) { // primitive type + if (entry.getValue().getAsJsonPrimitive().isString()) + instance.putAdditionalProperty( + entry.getKey(), entry.getValue().getAsString()); + else if (entry.getValue().getAsJsonPrimitive().isNumber()) + instance.putAdditionalProperty( + entry.getKey(), entry.getValue().getAsNumber()); + else if (entry.getValue().getAsJsonPrimitive().isBoolean()) + instance.putAdditionalProperty( + entry.getKey(), + entry.getValue().getAsBoolean()); + else + throw new IllegalArgumentException( + String.format( + "The field `%s` has unknown primitive" + + " type. Value: %s", + entry.getKey(), + entry.getValue().toString())); + } else if (entry.getValue().isJsonArray()) { + instance.putAdditionalProperty( + entry.getKey(), + gson.fromJson(entry.getValue(), List.class)); + } else { // JSON object + instance.putAdditionalProperty( + entry.getKey(), + gson.fromJson(entry.getValue(), HashMap.class)); + } + } + } + return instance; + } + }.nullSafe(); + } + } + + /** + * Create an instance of PdfOptions given an JSON string + * + * @param jsonString JSON string + * @return An instance of PdfOptions + * @throws IOException if the JSON string is invalid with respect to PdfOptions + */ + public static PdfOptions fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, PdfOptions.class); + } + + /** + * Convert an instance of PdfOptions to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} diff --git a/sdks/java/src/main/java/com/thoughtspot/client/model/PdfOptionsInput.java b/sdks/java/src/main/java/com/thoughtspot/client/model/PdfOptionsInput.java new file mode 100644 index 000000000..d48f5ca46 --- /dev/null +++ b/sdks/java/src/main/java/com/thoughtspot/client/model/PdfOptionsInput.java @@ -0,0 +1,691 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client.model; + +import com.google.gson.Gson; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.TypeAdapter; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.reflect.TypeToken; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import com.thoughtspot.client.JSON; +import java.io.IOException; +import java.io.Serializable; +import java.util.Arrays; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Objects; +import org.openapitools.jackson.nullable.JsonNullable; + +/** PdfOptionsInput */ +@javax.annotation.Generated( + value = "org.openapitools.codegen.languages.JavaClientCodegen", + comments = "Generator version: 7.12.0") +public class PdfOptionsInput implements Serializable { + private static final long serialVersionUID = 1L; + + /** + * Size of PDF page. `A4` generates a paginated A4 PDF. `CONTINUOUS` + * generates a continuous PDF that matches the Liveboard layout. Each Liveboard tab has its own + * page of variable length. Defaults to `A4` if not specified. Version: 26.5.0.cl or + * later + */ + @JsonAdapter(PageSizeEnum.Adapter.class) + public enum PageSizeEnum { + A4("A4"), + + CONTINUOUS("CONTINUOUS"); + + private String value; + + PageSizeEnum(String value) { + this.value = value; + } + + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + public static PageSizeEnum fromValue(String value) { + for (PageSizeEnum b : PageSizeEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + return null; + } + + public static class Adapter extends TypeAdapter { + @Override + public void write(final JsonWriter jsonWriter, final PageSizeEnum enumeration) + throws IOException { + jsonWriter.value(enumeration.getValue()); + } + + @Override + public PageSizeEnum read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + return PageSizeEnum.fromValue(value); + } + } + + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + String value = jsonElement.getAsString(); + PageSizeEnum.fromValue(value); + } + } + + public static final String SERIALIZED_NAME_PAGE_SIZE = "page_size"; + + @SerializedName(SERIALIZED_NAME_PAGE_SIZE) + @javax.annotation.Nullable + private PageSizeEnum pageSize; + + public static final String SERIALIZED_NAME_ZOOM_LEVEL = "zoom_level"; + + @SerializedName(SERIALIZED_NAME_ZOOM_LEVEL) + @javax.annotation.Nullable + private Integer zoomLevel; + + public static final String SERIALIZED_NAME_INCLUDE_COVER_PAGE = "include_cover_page"; + + @SerializedName(SERIALIZED_NAME_INCLUDE_COVER_PAGE) + @javax.annotation.Nullable + private Boolean includeCoverPage = true; + + public static final String SERIALIZED_NAME_INCLUDE_CUSTOM_LOGO = "include_custom_logo"; + + @SerializedName(SERIALIZED_NAME_INCLUDE_CUSTOM_LOGO) + @javax.annotation.Nullable + private Boolean includeCustomLogo = true; + + public static final String SERIALIZED_NAME_INCLUDE_FILTER_PAGE = "include_filter_page"; + + @SerializedName(SERIALIZED_NAME_INCLUDE_FILTER_PAGE) + @javax.annotation.Nullable + private Boolean includeFilterPage = true; + + public static final String SERIALIZED_NAME_INCLUDE_PAGE_NUMBER = "include_page_number"; + + @SerializedName(SERIALIZED_NAME_INCLUDE_PAGE_NUMBER) + @javax.annotation.Nullable + private Boolean includePageNumber = true; + + /** Page orientation of the PDF. */ + @JsonAdapter(PageOrientationEnum.Adapter.class) + public enum PageOrientationEnum { + PORTRAIT("PORTRAIT"), + + LANDSCAPE("LANDSCAPE"); + + private String value; + + PageOrientationEnum(String value) { + this.value = value; + } + + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + public static PageOrientationEnum fromValue(String value) { + for (PageOrientationEnum b : PageOrientationEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + return null; + } + + public static class Adapter extends TypeAdapter { + @Override + public void write(final JsonWriter jsonWriter, final PageOrientationEnum enumeration) + throws IOException { + jsonWriter.value(enumeration.getValue()); + } + + @Override + public PageOrientationEnum read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + return PageOrientationEnum.fromValue(value); + } + } + + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + String value = jsonElement.getAsString(); + PageOrientationEnum.fromValue(value); + } + } + + public static final String SERIALIZED_NAME_PAGE_ORIENTATION = "page_orientation"; + + @SerializedName(SERIALIZED_NAME_PAGE_ORIENTATION) + @javax.annotation.Nullable + private PageOrientationEnum pageOrientation = PageOrientationEnum.PORTRAIT; + + public static final String SERIALIZED_NAME_TRUNCATE_TABLE = "truncate_table"; + + @SerializedName(SERIALIZED_NAME_TRUNCATE_TABLE) + @javax.annotation.Nullable + private Boolean truncateTable = false; + + public static final String SERIALIZED_NAME_PAGE_FOOTER_TEXT = "page_footer_text"; + + @SerializedName(SERIALIZED_NAME_PAGE_FOOTER_TEXT) + @javax.annotation.Nullable + private String pageFooterText; + + public PdfOptionsInput() {} + + public PdfOptionsInput pageSize(@javax.annotation.Nullable PageSizeEnum pageSize) { + this.pageSize = pageSize; + return this; + } + + /** + * Size of PDF page. `A4` generates a paginated A4 PDF. `CONTINUOUS` + * generates a continuous PDF that matches the Liveboard layout. Each Liveboard tab has its own + * page of variable length. Defaults to `A4` if not specified. Version: 26.5.0.cl or + * later + * + * @return pageSize + */ + @javax.annotation.Nullable + public PageSizeEnum getPageSize() { + return pageSize; + } + + public void setPageSize(@javax.annotation.Nullable PageSizeEnum pageSize) { + this.pageSize = pageSize; + } + + public PdfOptionsInput zoomLevel(@javax.annotation.Nullable Integer zoomLevel) { + this.zoomLevel = zoomLevel; + return this; + } + + /** + * Zoom level percentage for the PDF. Only applicable when `page_size` is + * `CONTINUOUS`. Acceptable values are integers in the range [45, 175]. Defaults to + * 100 if not specified. Version: 26.5.0.cl or later + * + * @return zoomLevel + */ + @javax.annotation.Nullable + public Integer getZoomLevel() { + return zoomLevel; + } + + public void setZoomLevel(@javax.annotation.Nullable Integer zoomLevel) { + this.zoomLevel = zoomLevel; + } + + public PdfOptionsInput includeCoverPage(@javax.annotation.Nullable Boolean includeCoverPage) { + this.includeCoverPage = includeCoverPage; + return this; + } + + /** + * Indicates whether to include the cover page with the Liveboard title. + * + * @return includeCoverPage + */ + @javax.annotation.Nullable + public Boolean getIncludeCoverPage() { + return includeCoverPage; + } + + public void setIncludeCoverPage(@javax.annotation.Nullable Boolean includeCoverPage) { + this.includeCoverPage = includeCoverPage; + } + + public PdfOptionsInput includeCustomLogo(@javax.annotation.Nullable Boolean includeCustomLogo) { + this.includeCustomLogo = includeCustomLogo; + return this; + } + + /** + * Indicates whether to include customized wide logo in the footer if available. + * + * @return includeCustomLogo + */ + @javax.annotation.Nullable + public Boolean getIncludeCustomLogo() { + return includeCustomLogo; + } + + public void setIncludeCustomLogo(@javax.annotation.Nullable Boolean includeCustomLogo) { + this.includeCustomLogo = includeCustomLogo; + } + + public PdfOptionsInput includeFilterPage(@javax.annotation.Nullable Boolean includeFilterPage) { + this.includeFilterPage = includeFilterPage; + return this; + } + + /** + * Indicates whether to include a page with all applied filters. For `CONTINUOUS` + * page_size, this parameter indicates whether to include the filter header. + * + * @return includeFilterPage + */ + @javax.annotation.Nullable + public Boolean getIncludeFilterPage() { + return includeFilterPage; + } + + public void setIncludeFilterPage(@javax.annotation.Nullable Boolean includeFilterPage) { + this.includeFilterPage = includeFilterPage; + } + + public PdfOptionsInput includePageNumber(@javax.annotation.Nullable Boolean includePageNumber) { + this.includePageNumber = includePageNumber; + return this; + } + + /** + * Indicates whether to include page number in the footer of each page. + * + * @return includePageNumber + */ + @javax.annotation.Nullable + public Boolean getIncludePageNumber() { + return includePageNumber; + } + + public void setIncludePageNumber(@javax.annotation.Nullable Boolean includePageNumber) { + this.includePageNumber = includePageNumber; + } + + public PdfOptionsInput pageOrientation( + @javax.annotation.Nullable PageOrientationEnum pageOrientation) { + this.pageOrientation = pageOrientation; + return this; + } + + /** + * Page orientation of the PDF. + * + * @return pageOrientation + */ + @javax.annotation.Nullable + public PageOrientationEnum getPageOrientation() { + return pageOrientation; + } + + public void setPageOrientation(@javax.annotation.Nullable PageOrientationEnum pageOrientation) { + this.pageOrientation = pageOrientation; + } + + public PdfOptionsInput truncateTable(@javax.annotation.Nullable Boolean truncateTable) { + this.truncateTable = truncateTable; + return this; + } + + /** + * Indicates whether to include only the first page of the tables. + * + * @return truncateTable + */ + @javax.annotation.Nullable + public Boolean getTruncateTable() { + return truncateTable; + } + + public void setTruncateTable(@javax.annotation.Nullable Boolean truncateTable) { + this.truncateTable = truncateTable; + } + + public PdfOptionsInput pageFooterText(@javax.annotation.Nullable String pageFooterText) { + this.pageFooterText = pageFooterText; + return this; + } + + /** + * Text to include in the footer of each page. + * + * @return pageFooterText + */ + @javax.annotation.Nullable + public String getPageFooterText() { + return pageFooterText; + } + + public void setPageFooterText(@javax.annotation.Nullable String pageFooterText) { + this.pageFooterText = pageFooterText; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key name of the property + * @param value value of the property + * @return the PdfOptionsInput instance itself + */ + public PdfOptionsInput putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return a map of objects + */ + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key name of the property + * @return an object + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + PdfOptionsInput pdfOptionsInput = (PdfOptionsInput) o; + return Objects.equals(this.pageSize, pdfOptionsInput.pageSize) + && Objects.equals(this.zoomLevel, pdfOptionsInput.zoomLevel) + && Objects.equals(this.includeCoverPage, pdfOptionsInput.includeCoverPage) + && Objects.equals(this.includeCustomLogo, pdfOptionsInput.includeCustomLogo) + && Objects.equals(this.includeFilterPage, pdfOptionsInput.includeFilterPage) + && Objects.equals(this.includePageNumber, pdfOptionsInput.includePageNumber) + && Objects.equals(this.pageOrientation, pdfOptionsInput.pageOrientation) + && Objects.equals(this.truncateTable, pdfOptionsInput.truncateTable) + && Objects.equals(this.pageFooterText, pdfOptionsInput.pageFooterText) + && Objects.equals(this.additionalProperties, pdfOptionsInput.additionalProperties); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b + || (a != null + && b != null + && a.isPresent() + && b.isPresent() + && Objects.deepEquals(a.get(), b.get())); + } + + @Override + public int hashCode() { + return Objects.hash( + pageSize, + zoomLevel, + includeCoverPage, + includeCustomLogo, + includeFilterPage, + includePageNumber, + pageOrientation, + truncateTable, + pageFooterText, + additionalProperties); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; + } + return a.isPresent() ? Arrays.deepHashCode(new Object[] {a.get()}) : 31; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class PdfOptionsInput {\n"); + sb.append(" pageSize: ").append(toIndentedString(pageSize)).append("\n"); + sb.append(" zoomLevel: ").append(toIndentedString(zoomLevel)).append("\n"); + sb.append(" includeCoverPage: ").append(toIndentedString(includeCoverPage)).append("\n"); + sb.append(" includeCustomLogo: ") + .append(toIndentedString(includeCustomLogo)) + .append("\n"); + sb.append(" includeFilterPage: ") + .append(toIndentedString(includeFilterPage)) + .append("\n"); + sb.append(" includePageNumber: ") + .append(toIndentedString(includePageNumber)) + .append("\n"); + sb.append(" pageOrientation: ").append(toIndentedString(pageOrientation)).append("\n"); + sb.append(" truncateTable: ").append(toIndentedString(truncateTable)).append("\n"); + sb.append(" pageFooterText: ").append(toIndentedString(pageFooterText)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first + * line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("page_size"); + openapiFields.add("zoom_level"); + openapiFields.add("include_cover_page"); + openapiFields.add("include_custom_logo"); + openapiFields.add("include_filter_page"); + openapiFields.add("include_page_number"); + openapiFields.add("page_orientation"); + openapiFields.add("truncate_table"); + openapiFields.add("page_footer_text"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to PdfOptionsInput + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!PdfOptionsInput.openapiRequiredFields + .isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException( + String.format( + "The required field(s) %s in PdfOptionsInput is not found in the" + + " empty JSON string", + PdfOptionsInput.openapiRequiredFields.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if ((jsonObj.get("page_size") != null && !jsonObj.get("page_size").isJsonNull()) + && !jsonObj.get("page_size").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `page_size` to be a primitive type in the JSON" + + " string but got `%s`", + jsonObj.get("page_size").toString())); + } + // validate the optional field `page_size` + if (jsonObj.get("page_size") != null && !jsonObj.get("page_size").isJsonNull()) { + PageSizeEnum.validateJsonElement(jsonObj.get("page_size")); + } + if ((jsonObj.get("page_orientation") != null + && !jsonObj.get("page_orientation").isJsonNull()) + && !jsonObj.get("page_orientation").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `page_orientation` to be a primitive type in the" + + " JSON string but got `%s`", + jsonObj.get("page_orientation").toString())); + } + // validate the optional field `page_orientation` + if (jsonObj.get("page_orientation") != null + && !jsonObj.get("page_orientation").isJsonNull()) { + PageOrientationEnum.validateJsonElement(jsonObj.get("page_orientation")); + } + if ((jsonObj.get("page_footer_text") != null + && !jsonObj.get("page_footer_text").isJsonNull()) + && !jsonObj.get("page_footer_text").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `page_footer_text` to be a primitive type in the" + + " JSON string but got `%s`", + jsonObj.get("page_footer_text").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!PdfOptionsInput.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'PdfOptionsInput' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter = + gson.getDelegateAdapter(this, TypeToken.get(PdfOptionsInput.class)); + + return (TypeAdapter) + new TypeAdapter() { + @Override + public void write(JsonWriter out, PdfOptionsInput value) + throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + obj.remove("additionalProperties"); + // serialize additional properties + if (value.getAdditionalProperties() != null) { + for (Map.Entry entry : + value.getAdditionalProperties().entrySet()) { + if (entry.getValue() instanceof String) + obj.addProperty(entry.getKey(), (String) entry.getValue()); + else if (entry.getValue() instanceof Number) + obj.addProperty(entry.getKey(), (Number) entry.getValue()); + else if (entry.getValue() instanceof Boolean) + obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); + else if (entry.getValue() instanceof Character) + obj.addProperty( + entry.getKey(), (Character) entry.getValue()); + else { + JsonElement jsonElement = gson.toJsonTree(entry.getValue()); + if (jsonElement.isJsonArray()) { + obj.add(entry.getKey(), jsonElement.getAsJsonArray()); + } else { + obj.add(entry.getKey(), jsonElement.getAsJsonObject()); + } + } + } + } + elementAdapter.write(out, obj); + } + + @Override + public PdfOptionsInput read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // store additional fields in the deserialized instance + PdfOptionsInput instance = thisAdapter.fromJsonTree(jsonObj); + for (Map.Entry entry : jsonObj.entrySet()) { + if (!openapiFields.contains(entry.getKey())) { + if (entry.getValue().isJsonPrimitive()) { // primitive type + if (entry.getValue().getAsJsonPrimitive().isString()) + instance.putAdditionalProperty( + entry.getKey(), entry.getValue().getAsString()); + else if (entry.getValue().getAsJsonPrimitive().isNumber()) + instance.putAdditionalProperty( + entry.getKey(), entry.getValue().getAsNumber()); + else if (entry.getValue().getAsJsonPrimitive().isBoolean()) + instance.putAdditionalProperty( + entry.getKey(), + entry.getValue().getAsBoolean()); + else + throw new IllegalArgumentException( + String.format( + "The field `%s` has unknown primitive" + + " type. Value: %s", + entry.getKey(), + entry.getValue().toString())); + } else if (entry.getValue().isJsonArray()) { + instance.putAdditionalProperty( + entry.getKey(), + gson.fromJson(entry.getValue(), List.class)); + } else { // JSON object + instance.putAdditionalProperty( + entry.getKey(), + gson.fromJson(entry.getValue(), HashMap.class)); + } + } + } + return instance; + } + }.nullSafe(); + } + } + + /** + * Create an instance of PdfOptionsInput given an JSON string + * + * @param jsonString JSON string + * @return An instance of PdfOptionsInput + * @throws IOException if the JSON string is invalid with respect to PdfOptionsInput + */ + public static PdfOptionsInput fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, PdfOptionsInput.class); + } + + /** + * Convert an instance of PdfOptionsInput to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} diff --git a/sdks/java/src/main/java/com/thoughtspot/client/model/PermissionInput.java b/sdks/java/src/main/java/com/thoughtspot/client/model/PermissionInput.java new file mode 100644 index 000000000..76a4d8d5c --- /dev/null +++ b/sdks/java/src/main/java/com/thoughtspot/client/model/PermissionInput.java @@ -0,0 +1,388 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client.model; + +import com.google.gson.Gson; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.TypeAdapter; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.reflect.TypeToken; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import com.thoughtspot.client.JSON; +import java.io.IOException; +import java.io.Serializable; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Objects; + +/** Details of users or groups. */ +@javax.annotation.Generated( + value = "org.openapitools.codegen.languages.JavaClientCodegen", + comments = "Generator version: 7.12.0") +public class PermissionInput implements Serializable { + private static final long serialVersionUID = 1L; + + public static final String SERIALIZED_NAME_PRINCIPAL = "principal"; + + @SerializedName(SERIALIZED_NAME_PRINCIPAL) + @javax.annotation.Nonnull + private PrincipalsInput principal; + + /** Object share mode. */ + @JsonAdapter(ShareModeEnum.Adapter.class) + public enum ShareModeEnum { + READ_ONLY("READ_ONLY"), + + MODIFY("MODIFY"), + + NO_ACCESS("NO_ACCESS"); + + private String value; + + ShareModeEnum(String value) { + this.value = value; + } + + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + public static ShareModeEnum fromValue(String value) { + for (ShareModeEnum b : ShareModeEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + + public static class Adapter extends TypeAdapter { + @Override + public void write(final JsonWriter jsonWriter, final ShareModeEnum enumeration) + throws IOException { + jsonWriter.value(enumeration.getValue()); + } + + @Override + public ShareModeEnum read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + return ShareModeEnum.fromValue(value); + } + } + + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + String value = jsonElement.getAsString(); + ShareModeEnum.fromValue(value); + } + } + + public static final String SERIALIZED_NAME_SHARE_MODE = "share_mode"; + + @SerializedName(SERIALIZED_NAME_SHARE_MODE) + @javax.annotation.Nonnull + private ShareModeEnum shareMode; + + public PermissionInput() {} + + public PermissionInput principal(@javax.annotation.Nonnull PrincipalsInput principal) { + this.principal = principal; + return this; + } + + /** + * Get principal + * + * @return principal + */ + @javax.annotation.Nonnull + public PrincipalsInput getPrincipal() { + return principal; + } + + public void setPrincipal(@javax.annotation.Nonnull PrincipalsInput principal) { + this.principal = principal; + } + + public PermissionInput shareMode(@javax.annotation.Nonnull ShareModeEnum shareMode) { + this.shareMode = shareMode; + return this; + } + + /** + * Object share mode. + * + * @return shareMode + */ + @javax.annotation.Nonnull + public ShareModeEnum getShareMode() { + return shareMode; + } + + public void setShareMode(@javax.annotation.Nonnull ShareModeEnum shareMode) { + this.shareMode = shareMode; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key name of the property + * @param value value of the property + * @return the PermissionInput instance itself + */ + public PermissionInput putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return a map of objects + */ + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key name of the property + * @return an object + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + PermissionInput permissionInput = (PermissionInput) o; + return Objects.equals(this.principal, permissionInput.principal) + && Objects.equals(this.shareMode, permissionInput.shareMode) + && Objects.equals(this.additionalProperties, permissionInput.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(principal, shareMode, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class PermissionInput {\n"); + sb.append(" principal: ").append(toIndentedString(principal)).append("\n"); + sb.append(" shareMode: ").append(toIndentedString(shareMode)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first + * line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("principal"); + openapiFields.add("share_mode"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + openapiRequiredFields.add("principal"); + openapiRequiredFields.add("share_mode"); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to PermissionInput + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!PermissionInput.openapiRequiredFields + .isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException( + String.format( + "The required field(s) %s in PermissionInput is not found in the" + + " empty JSON string", + PermissionInput.openapiRequiredFields.toString())); + } + } + + // check to make sure all required properties/fields are present in the JSON string + for (String requiredField : PermissionInput.openapiRequiredFields) { + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException( + String.format( + "The required field `%s` is not found in the JSON string: %s", + requiredField, jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // validate the required field `principal` + PrincipalsInput.validateJsonElement(jsonObj.get("principal")); + if (!jsonObj.get("share_mode").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `share_mode` to be a primitive type in the JSON" + + " string but got `%s`", + jsonObj.get("share_mode").toString())); + } + // validate the required field `share_mode` + ShareModeEnum.validateJsonElement(jsonObj.get("share_mode")); + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!PermissionInput.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'PermissionInput' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter = + gson.getDelegateAdapter(this, TypeToken.get(PermissionInput.class)); + + return (TypeAdapter) + new TypeAdapter() { + @Override + public void write(JsonWriter out, PermissionInput value) + throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + obj.remove("additionalProperties"); + // serialize additional properties + if (value.getAdditionalProperties() != null) { + for (Map.Entry entry : + value.getAdditionalProperties().entrySet()) { + if (entry.getValue() instanceof String) + obj.addProperty(entry.getKey(), (String) entry.getValue()); + else if (entry.getValue() instanceof Number) + obj.addProperty(entry.getKey(), (Number) entry.getValue()); + else if (entry.getValue() instanceof Boolean) + obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); + else if (entry.getValue() instanceof Character) + obj.addProperty( + entry.getKey(), (Character) entry.getValue()); + else { + JsonElement jsonElement = gson.toJsonTree(entry.getValue()); + if (jsonElement.isJsonArray()) { + obj.add(entry.getKey(), jsonElement.getAsJsonArray()); + } else { + obj.add(entry.getKey(), jsonElement.getAsJsonObject()); + } + } + } + } + elementAdapter.write(out, obj); + } + + @Override + public PermissionInput read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // store additional fields in the deserialized instance + PermissionInput instance = thisAdapter.fromJsonTree(jsonObj); + for (Map.Entry entry : jsonObj.entrySet()) { + if (!openapiFields.contains(entry.getKey())) { + if (entry.getValue().isJsonPrimitive()) { // primitive type + if (entry.getValue().getAsJsonPrimitive().isString()) + instance.putAdditionalProperty( + entry.getKey(), entry.getValue().getAsString()); + else if (entry.getValue().getAsJsonPrimitive().isNumber()) + instance.putAdditionalProperty( + entry.getKey(), entry.getValue().getAsNumber()); + else if (entry.getValue().getAsJsonPrimitive().isBoolean()) + instance.putAdditionalProperty( + entry.getKey(), + entry.getValue().getAsBoolean()); + else + throw new IllegalArgumentException( + String.format( + "The field `%s` has unknown primitive" + + " type. Value: %s", + entry.getKey(), + entry.getValue().toString())); + } else if (entry.getValue().isJsonArray()) { + instance.putAdditionalProperty( + entry.getKey(), + gson.fromJson(entry.getValue(), List.class)); + } else { // JSON object + instance.putAdditionalProperty( + entry.getKey(), + gson.fromJson(entry.getValue(), HashMap.class)); + } + } + } + return instance; + } + }.nullSafe(); + } + } + + /** + * Create an instance of PermissionInput given an JSON string + * + * @param jsonString JSON string + * @return An instance of PermissionInput + * @throws IOException if the JSON string is invalid with respect to PermissionInput + */ + public static PermissionInput fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, PermissionInput.class); + } + + /** + * Convert an instance of PermissionInput to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} diff --git a/sdks/java/src/main/java/com/thoughtspot/client/model/PermissionOfMetadataResponse.java b/sdks/java/src/main/java/com/thoughtspot/client/model/PermissionOfMetadataResponse.java new file mode 100644 index 000000000..0a46c6afc --- /dev/null +++ b/sdks/java/src/main/java/com/thoughtspot/client/model/PermissionOfMetadataResponse.java @@ -0,0 +1,316 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client.model; + +import com.google.gson.Gson; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.TypeAdapter; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.annotations.SerializedName; +import com.google.gson.reflect.TypeToken; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import com.thoughtspot.client.JSON; +import java.io.IOException; +import java.io.Serializable; +import java.util.Arrays; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Objects; +import org.openapitools.jackson.nullable.JsonNullable; + +/** PermissionOfMetadataResponse */ +@javax.annotation.Generated( + value = "org.openapitools.codegen.languages.JavaClientCodegen", + comments = "Generator version: 7.12.0") +public class PermissionOfMetadataResponse implements Serializable { + private static final long serialVersionUID = 1L; + + public static final String SERIALIZED_NAME_METADATA_PERMISSION_DETAILS = + "metadata_permission_details"; + + @SerializedName(SERIALIZED_NAME_METADATA_PERMISSION_DETAILS) + @javax.annotation.Nullable + private Object metadataPermissionDetails; + + public PermissionOfMetadataResponse() {} + + public PermissionOfMetadataResponse metadataPermissionDetails( + @javax.annotation.Nullable Object metadataPermissionDetails) { + this.metadataPermissionDetails = metadataPermissionDetails; + return this; + } + + /** + * Get metadataPermissionDetails + * + * @return metadataPermissionDetails + */ + @javax.annotation.Nullable + public Object getMetadataPermissionDetails() { + return metadataPermissionDetails; + } + + public void setMetadataPermissionDetails( + @javax.annotation.Nullable Object metadataPermissionDetails) { + this.metadataPermissionDetails = metadataPermissionDetails; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key name of the property + * @param value value of the property + * @return the PermissionOfMetadataResponse instance itself + */ + public PermissionOfMetadataResponse putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return a map of objects + */ + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key name of the property + * @return an object + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + PermissionOfMetadataResponse permissionOfMetadataResponse = + (PermissionOfMetadataResponse) o; + return Objects.equals( + this.metadataPermissionDetails, + permissionOfMetadataResponse.metadataPermissionDetails) + && Objects.equals( + this.additionalProperties, + permissionOfMetadataResponse.additionalProperties); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b + || (a != null + && b != null + && a.isPresent() + && b.isPresent() + && Objects.deepEquals(a.get(), b.get())); + } + + @Override + public int hashCode() { + return Objects.hash(metadataPermissionDetails, additionalProperties); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; + } + return a.isPresent() ? Arrays.deepHashCode(new Object[] {a.get()}) : 31; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class PermissionOfMetadataResponse {\n"); + sb.append(" metadataPermissionDetails: ") + .append(toIndentedString(metadataPermissionDetails)) + .append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first + * line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("metadata_permission_details"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to + * PermissionOfMetadataResponse + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!PermissionOfMetadataResponse.openapiRequiredFields + .isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException( + String.format( + "The required field(s) %s in PermissionOfMetadataResponse is not" + + " found in the empty JSON string", + PermissionOfMetadataResponse.openapiRequiredFields.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!PermissionOfMetadataResponse.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'PermissionOfMetadataResponse' and its + // subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter = + gson.getDelegateAdapter( + this, TypeToken.get(PermissionOfMetadataResponse.class)); + + return (TypeAdapter) + new TypeAdapter() { + @Override + public void write(JsonWriter out, PermissionOfMetadataResponse value) + throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + obj.remove("additionalProperties"); + // serialize additional properties + if (value.getAdditionalProperties() != null) { + for (Map.Entry entry : + value.getAdditionalProperties().entrySet()) { + if (entry.getValue() instanceof String) + obj.addProperty(entry.getKey(), (String) entry.getValue()); + else if (entry.getValue() instanceof Number) + obj.addProperty(entry.getKey(), (Number) entry.getValue()); + else if (entry.getValue() instanceof Boolean) + obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); + else if (entry.getValue() instanceof Character) + obj.addProperty( + entry.getKey(), (Character) entry.getValue()); + else { + JsonElement jsonElement = gson.toJsonTree(entry.getValue()); + if (jsonElement.isJsonArray()) { + obj.add(entry.getKey(), jsonElement.getAsJsonArray()); + } else { + obj.add(entry.getKey(), jsonElement.getAsJsonObject()); + } + } + } + } + elementAdapter.write(out, obj); + } + + @Override + public PermissionOfMetadataResponse read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // store additional fields in the deserialized instance + PermissionOfMetadataResponse instance = + thisAdapter.fromJsonTree(jsonObj); + for (Map.Entry entry : jsonObj.entrySet()) { + if (!openapiFields.contains(entry.getKey())) { + if (entry.getValue().isJsonPrimitive()) { // primitive type + if (entry.getValue().getAsJsonPrimitive().isString()) + instance.putAdditionalProperty( + entry.getKey(), entry.getValue().getAsString()); + else if (entry.getValue().getAsJsonPrimitive().isNumber()) + instance.putAdditionalProperty( + entry.getKey(), entry.getValue().getAsNumber()); + else if (entry.getValue().getAsJsonPrimitive().isBoolean()) + instance.putAdditionalProperty( + entry.getKey(), + entry.getValue().getAsBoolean()); + else + throw new IllegalArgumentException( + String.format( + "The field `%s` has unknown primitive" + + " type. Value: %s", + entry.getKey(), + entry.getValue().toString())); + } else if (entry.getValue().isJsonArray()) { + instance.putAdditionalProperty( + entry.getKey(), + gson.fromJson(entry.getValue(), List.class)); + } else { // JSON object + instance.putAdditionalProperty( + entry.getKey(), + gson.fromJson(entry.getValue(), HashMap.class)); + } + } + } + return instance; + } + }.nullSafe(); + } + } + + /** + * Create an instance of PermissionOfMetadataResponse given an JSON string + * + * @param jsonString JSON string + * @return An instance of PermissionOfMetadataResponse + * @throws IOException if the JSON string is invalid with respect to + * PermissionOfMetadataResponse + */ + public static PermissionOfMetadataResponse fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, PermissionOfMetadataResponse.class); + } + + /** + * Convert an instance of PermissionOfMetadataResponse to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} diff --git a/sdks/java/src/main/java/com/thoughtspot/client/model/PermissionOfPrincipalsResponse.java b/sdks/java/src/main/java/com/thoughtspot/client/model/PermissionOfPrincipalsResponse.java new file mode 100644 index 000000000..061e00c62 --- /dev/null +++ b/sdks/java/src/main/java/com/thoughtspot/client/model/PermissionOfPrincipalsResponse.java @@ -0,0 +1,317 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client.model; + +import com.google.gson.Gson; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.TypeAdapter; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.annotations.SerializedName; +import com.google.gson.reflect.TypeToken; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import com.thoughtspot.client.JSON; +import java.io.IOException; +import java.io.Serializable; +import java.util.Arrays; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Objects; +import org.openapitools.jackson.nullable.JsonNullable; + +/** PermissionOfPrincipalsResponse */ +@javax.annotation.Generated( + value = "org.openapitools.codegen.languages.JavaClientCodegen", + comments = "Generator version: 7.12.0") +public class PermissionOfPrincipalsResponse implements Serializable { + private static final long serialVersionUID = 1L; + + public static final String SERIALIZED_NAME_PRINCIPAL_PERMISSION_DETAILS = + "principal_permission_details"; + + @SerializedName(SERIALIZED_NAME_PRINCIPAL_PERMISSION_DETAILS) + @javax.annotation.Nullable + private Object principalPermissionDetails; + + public PermissionOfPrincipalsResponse() {} + + public PermissionOfPrincipalsResponse principalPermissionDetails( + @javax.annotation.Nullable Object principalPermissionDetails) { + this.principalPermissionDetails = principalPermissionDetails; + return this; + } + + /** + * Get principalPermissionDetails + * + * @return principalPermissionDetails + */ + @javax.annotation.Nullable + public Object getPrincipalPermissionDetails() { + return principalPermissionDetails; + } + + public void setPrincipalPermissionDetails( + @javax.annotation.Nullable Object principalPermissionDetails) { + this.principalPermissionDetails = principalPermissionDetails; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key name of the property + * @param value value of the property + * @return the PermissionOfPrincipalsResponse instance itself + */ + public PermissionOfPrincipalsResponse putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return a map of objects + */ + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key name of the property + * @return an object + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + PermissionOfPrincipalsResponse permissionOfPrincipalsResponse = + (PermissionOfPrincipalsResponse) o; + return Objects.equals( + this.principalPermissionDetails, + permissionOfPrincipalsResponse.principalPermissionDetails) + && Objects.equals( + this.additionalProperties, + permissionOfPrincipalsResponse.additionalProperties); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b + || (a != null + && b != null + && a.isPresent() + && b.isPresent() + && Objects.deepEquals(a.get(), b.get())); + } + + @Override + public int hashCode() { + return Objects.hash(principalPermissionDetails, additionalProperties); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; + } + return a.isPresent() ? Arrays.deepHashCode(new Object[] {a.get()}) : 31; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class PermissionOfPrincipalsResponse {\n"); + sb.append(" principalPermissionDetails: ") + .append(toIndentedString(principalPermissionDetails)) + .append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first + * line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("principal_permission_details"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to + * PermissionOfPrincipalsResponse + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!PermissionOfPrincipalsResponse.openapiRequiredFields + .isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException( + String.format( + "The required field(s) %s in PermissionOfPrincipalsResponse is not" + + " found in the empty JSON string", + PermissionOfPrincipalsResponse.openapiRequiredFields.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!PermissionOfPrincipalsResponse.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'PermissionOfPrincipalsResponse' and its + // subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter = + gson.getDelegateAdapter( + this, TypeToken.get(PermissionOfPrincipalsResponse.class)); + + return (TypeAdapter) + new TypeAdapter() { + @Override + public void write(JsonWriter out, PermissionOfPrincipalsResponse value) + throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + obj.remove("additionalProperties"); + // serialize additional properties + if (value.getAdditionalProperties() != null) { + for (Map.Entry entry : + value.getAdditionalProperties().entrySet()) { + if (entry.getValue() instanceof String) + obj.addProperty(entry.getKey(), (String) entry.getValue()); + else if (entry.getValue() instanceof Number) + obj.addProperty(entry.getKey(), (Number) entry.getValue()); + else if (entry.getValue() instanceof Boolean) + obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); + else if (entry.getValue() instanceof Character) + obj.addProperty( + entry.getKey(), (Character) entry.getValue()); + else { + JsonElement jsonElement = gson.toJsonTree(entry.getValue()); + if (jsonElement.isJsonArray()) { + obj.add(entry.getKey(), jsonElement.getAsJsonArray()); + } else { + obj.add(entry.getKey(), jsonElement.getAsJsonObject()); + } + } + } + } + elementAdapter.write(out, obj); + } + + @Override + public PermissionOfPrincipalsResponse read(JsonReader in) + throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // store additional fields in the deserialized instance + PermissionOfPrincipalsResponse instance = + thisAdapter.fromJsonTree(jsonObj); + for (Map.Entry entry : jsonObj.entrySet()) { + if (!openapiFields.contains(entry.getKey())) { + if (entry.getValue().isJsonPrimitive()) { // primitive type + if (entry.getValue().getAsJsonPrimitive().isString()) + instance.putAdditionalProperty( + entry.getKey(), entry.getValue().getAsString()); + else if (entry.getValue().getAsJsonPrimitive().isNumber()) + instance.putAdditionalProperty( + entry.getKey(), entry.getValue().getAsNumber()); + else if (entry.getValue().getAsJsonPrimitive().isBoolean()) + instance.putAdditionalProperty( + entry.getKey(), + entry.getValue().getAsBoolean()); + else + throw new IllegalArgumentException( + String.format( + "The field `%s` has unknown primitive" + + " type. Value: %s", + entry.getKey(), + entry.getValue().toString())); + } else if (entry.getValue().isJsonArray()) { + instance.putAdditionalProperty( + entry.getKey(), + gson.fromJson(entry.getValue(), List.class)); + } else { // JSON object + instance.putAdditionalProperty( + entry.getKey(), + gson.fromJson(entry.getValue(), HashMap.class)); + } + } + } + return instance; + } + }.nullSafe(); + } + } + + /** + * Create an instance of PermissionOfPrincipalsResponse given an JSON string + * + * @param jsonString JSON string + * @return An instance of PermissionOfPrincipalsResponse + * @throws IOException if the JSON string is invalid with respect to + * PermissionOfPrincipalsResponse + */ + public static PermissionOfPrincipalsResponse fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, PermissionOfPrincipalsResponse.class); + } + + /** + * Convert an instance of PermissionOfPrincipalsResponse to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} diff --git a/sdks/java/src/main/java/com/thoughtspot/client/model/PermissionsMetadataTypeInput.java b/sdks/java/src/main/java/com/thoughtspot/client/model/PermissionsMetadataTypeInput.java new file mode 100644 index 000000000..aae9c6d72 --- /dev/null +++ b/sdks/java/src/main/java/com/thoughtspot/client/model/PermissionsMetadataTypeInput.java @@ -0,0 +1,431 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client.model; + +import com.google.gson.Gson; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.TypeAdapter; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.reflect.TypeToken; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import com.thoughtspot.client.JSON; +import java.io.IOException; +import java.io.Serializable; +import java.util.Arrays; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Objects; +import org.openapitools.jackson.nullable.JsonNullable; + +/** MetadataType InputType used in Permission API's */ +@javax.annotation.Generated( + value = "org.openapitools.codegen.languages.JavaClientCodegen", + comments = "Generator version: 7.12.0") +public class PermissionsMetadataTypeInput implements Serializable { + private static final long serialVersionUID = 1L; + + /** + * Type of metadata object. Required if the name of the object is set as the identifier. This + * attribute is optional when the object GUID is specified as the identifier. + */ + @JsonAdapter(TypeEnum.Adapter.class) + public enum TypeEnum { + LIVEBOARD("LIVEBOARD"), + + ANSWER("ANSWER"), + + LOGICAL_TABLE("LOGICAL_TABLE"), + + LOGICAL_COLUMN("LOGICAL_COLUMN"), + + CONNECTION("CONNECTION"), + + COLLECTION("COLLECTION"); + + private String value; + + TypeEnum(String value) { + this.value = value; + } + + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + public static TypeEnum fromValue(String value) { + for (TypeEnum b : TypeEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + return null; + } + + public static class Adapter extends TypeAdapter { + @Override + public void write(final JsonWriter jsonWriter, final TypeEnum enumeration) + throws IOException { + jsonWriter.value(enumeration.getValue()); + } + + @Override + public TypeEnum read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + return TypeEnum.fromValue(value); + } + } + + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + String value = jsonElement.getAsString(); + TypeEnum.fromValue(value); + } + } + + public static final String SERIALIZED_NAME_TYPE = "type"; + + @SerializedName(SERIALIZED_NAME_TYPE) + @javax.annotation.Nullable + private TypeEnum type; + + public static final String SERIALIZED_NAME_IDENTIFIER = "identifier"; + + @SerializedName(SERIALIZED_NAME_IDENTIFIER) + @javax.annotation.Nonnull + private String identifier; + + public PermissionsMetadataTypeInput() {} + + public PermissionsMetadataTypeInput type(@javax.annotation.Nullable TypeEnum type) { + this.type = type; + return this; + } + + /** + * Type of metadata object. Required if the name of the object is set as the identifier. This + * attribute is optional when the object GUID is specified as the identifier. + * + * @return type + */ + @javax.annotation.Nullable + public TypeEnum getType() { + return type; + } + + public void setType(@javax.annotation.Nullable TypeEnum type) { + this.type = type; + } + + public PermissionsMetadataTypeInput identifier(@javax.annotation.Nonnull String identifier) { + this.identifier = identifier; + return this; + } + + /** + * Unique ID or name of the metadata object. + * + * @return identifier + */ + @javax.annotation.Nonnull + public String getIdentifier() { + return identifier; + } + + public void setIdentifier(@javax.annotation.Nonnull String identifier) { + this.identifier = identifier; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key name of the property + * @param value value of the property + * @return the PermissionsMetadataTypeInput instance itself + */ + public PermissionsMetadataTypeInput putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return a map of objects + */ + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key name of the property + * @return an object + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + PermissionsMetadataTypeInput permissionsMetadataTypeInput = + (PermissionsMetadataTypeInput) o; + return Objects.equals(this.type, permissionsMetadataTypeInput.type) + && Objects.equals(this.identifier, permissionsMetadataTypeInput.identifier) + && Objects.equals( + this.additionalProperties, + permissionsMetadataTypeInput.additionalProperties); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b + || (a != null + && b != null + && a.isPresent() + && b.isPresent() + && Objects.deepEquals(a.get(), b.get())); + } + + @Override + public int hashCode() { + return Objects.hash(type, identifier, additionalProperties); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; + } + return a.isPresent() ? Arrays.deepHashCode(new Object[] {a.get()}) : 31; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class PermissionsMetadataTypeInput {\n"); + sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append(" identifier: ").append(toIndentedString(identifier)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first + * line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("type"); + openapiFields.add("identifier"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + openapiRequiredFields.add("identifier"); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to + * PermissionsMetadataTypeInput + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!PermissionsMetadataTypeInput.openapiRequiredFields + .isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException( + String.format( + "The required field(s) %s in PermissionsMetadataTypeInput is not" + + " found in the empty JSON string", + PermissionsMetadataTypeInput.openapiRequiredFields.toString())); + } + } + + // check to make sure all required properties/fields are present in the JSON string + for (String requiredField : PermissionsMetadataTypeInput.openapiRequiredFields) { + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException( + String.format( + "The required field `%s` is not found in the JSON string: %s", + requiredField, jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if ((jsonObj.get("type") != null && !jsonObj.get("type").isJsonNull()) + && !jsonObj.get("type").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `type` to be a primitive type in the JSON string" + + " but got `%s`", + jsonObj.get("type").toString())); + } + // validate the optional field `type` + if (jsonObj.get("type") != null && !jsonObj.get("type").isJsonNull()) { + TypeEnum.validateJsonElement(jsonObj.get("type")); + } + if (!jsonObj.get("identifier").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `identifier` to be a primitive type in the JSON" + + " string but got `%s`", + jsonObj.get("identifier").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!PermissionsMetadataTypeInput.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'PermissionsMetadataTypeInput' and its + // subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter = + gson.getDelegateAdapter( + this, TypeToken.get(PermissionsMetadataTypeInput.class)); + + return (TypeAdapter) + new TypeAdapter() { + @Override + public void write(JsonWriter out, PermissionsMetadataTypeInput value) + throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + obj.remove("additionalProperties"); + // serialize additional properties + if (value.getAdditionalProperties() != null) { + for (Map.Entry entry : + value.getAdditionalProperties().entrySet()) { + if (entry.getValue() instanceof String) + obj.addProperty(entry.getKey(), (String) entry.getValue()); + else if (entry.getValue() instanceof Number) + obj.addProperty(entry.getKey(), (Number) entry.getValue()); + else if (entry.getValue() instanceof Boolean) + obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); + else if (entry.getValue() instanceof Character) + obj.addProperty( + entry.getKey(), (Character) entry.getValue()); + else { + JsonElement jsonElement = gson.toJsonTree(entry.getValue()); + if (jsonElement.isJsonArray()) { + obj.add(entry.getKey(), jsonElement.getAsJsonArray()); + } else { + obj.add(entry.getKey(), jsonElement.getAsJsonObject()); + } + } + } + } + elementAdapter.write(out, obj); + } + + @Override + public PermissionsMetadataTypeInput read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // store additional fields in the deserialized instance + PermissionsMetadataTypeInput instance = + thisAdapter.fromJsonTree(jsonObj); + for (Map.Entry entry : jsonObj.entrySet()) { + if (!openapiFields.contains(entry.getKey())) { + if (entry.getValue().isJsonPrimitive()) { // primitive type + if (entry.getValue().getAsJsonPrimitive().isString()) + instance.putAdditionalProperty( + entry.getKey(), entry.getValue().getAsString()); + else if (entry.getValue().getAsJsonPrimitive().isNumber()) + instance.putAdditionalProperty( + entry.getKey(), entry.getValue().getAsNumber()); + else if (entry.getValue().getAsJsonPrimitive().isBoolean()) + instance.putAdditionalProperty( + entry.getKey(), + entry.getValue().getAsBoolean()); + else + throw new IllegalArgumentException( + String.format( + "The field `%s` has unknown primitive" + + " type. Value: %s", + entry.getKey(), + entry.getValue().toString())); + } else if (entry.getValue().isJsonArray()) { + instance.putAdditionalProperty( + entry.getKey(), + gson.fromJson(entry.getValue(), List.class)); + } else { // JSON object + instance.putAdditionalProperty( + entry.getKey(), + gson.fromJson(entry.getValue(), HashMap.class)); + } + } + } + return instance; + } + }.nullSafe(); + } + } + + /** + * Create an instance of PermissionsMetadataTypeInput given an JSON string + * + * @param jsonString JSON string + * @return An instance of PermissionsMetadataTypeInput + * @throws IOException if the JSON string is invalid with respect to + * PermissionsMetadataTypeInput + */ + public static PermissionsMetadataTypeInput fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, PermissionsMetadataTypeInput.class); + } + + /** + * Convert an instance of PermissionsMetadataTypeInput to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} diff --git a/sdks/java/src/main/java/com/thoughtspot/client/model/PngOptionsInput.java b/sdks/java/src/main/java/com/thoughtspot/client/model/PngOptionsInput.java new file mode 100644 index 000000000..efcf76628 --- /dev/null +++ b/sdks/java/src/main/java/com/thoughtspot/client/model/PngOptionsInput.java @@ -0,0 +1,463 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client.model; + +import com.google.gson.Gson; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.TypeAdapter; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.annotations.SerializedName; +import com.google.gson.reflect.TypeToken; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import com.thoughtspot.client.JSON; +import java.io.IOException; +import java.io.Serializable; +import java.util.Arrays; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Objects; +import org.openapitools.jackson.nullable.JsonNullable; + +/** PngOptionsInput */ +@javax.annotation.Generated( + value = "org.openapitools.codegen.languages.JavaClientCodegen", + comments = "Generator version: 7.12.0") +public class PngOptionsInput implements Serializable { + private static final long serialVersionUID = 1L; + + public static final String SERIALIZED_NAME_INCLUDE_COVER_PAGE = "include_cover_page"; + + @SerializedName(SERIALIZED_NAME_INCLUDE_COVER_PAGE) + @javax.annotation.Nullable + private Boolean includeCoverPage = false; + + public static final String SERIALIZED_NAME_INCLUDE_FILTER_PAGE = "include_filter_page"; + + @SerializedName(SERIALIZED_NAME_INCLUDE_FILTER_PAGE) + @javax.annotation.Nullable + private Boolean includeFilterPage = false; + + public static final String SERIALIZED_NAME_PERSONALISED_VIEW_ID = "personalised_view_id"; + + @SerializedName(SERIALIZED_NAME_PERSONALISED_VIEW_ID) + @javax.annotation.Nullable + private String personalisedViewId; + + public static final String SERIALIZED_NAME_IMAGE_RESOLUTION = "image_resolution"; + + @SerializedName(SERIALIZED_NAME_IMAGE_RESOLUTION) + @javax.annotation.Nullable + private Integer imageResolution; + + public static final String SERIALIZED_NAME_IMAGE_SCALE = "image_scale"; + + @SerializedName(SERIALIZED_NAME_IMAGE_SCALE) + @javax.annotation.Nullable + private Integer imageScale; + + public static final String SERIALIZED_NAME_INCLUDE_HEADER = "include_header"; + + @SerializedName(SERIALIZED_NAME_INCLUDE_HEADER) + @javax.annotation.Nullable + private Boolean includeHeader = false; + + public PngOptionsInput() {} + + public PngOptionsInput includeCoverPage(@javax.annotation.Nullable Boolean includeCoverPage) { + this.includeCoverPage = includeCoverPage; + return this; + } + + /** + * Indicates whether to include the cover page with the Liveboard title. + * + * @return includeCoverPage + */ + @javax.annotation.Nullable + public Boolean getIncludeCoverPage() { + return includeCoverPage; + } + + public void setIncludeCoverPage(@javax.annotation.Nullable Boolean includeCoverPage) { + this.includeCoverPage = includeCoverPage; + } + + public PngOptionsInput includeFilterPage(@javax.annotation.Nullable Boolean includeFilterPage) { + this.includeFilterPage = includeFilterPage; + return this; + } + + /** + * Indicates whether to include a page with all applied filters. + * + * @return includeFilterPage + */ + @javax.annotation.Nullable + public Boolean getIncludeFilterPage() { + return includeFilterPage; + } + + public void setIncludeFilterPage(@javax.annotation.Nullable Boolean includeFilterPage) { + this.includeFilterPage = includeFilterPage; + } + + public PngOptionsInput personalisedViewId( + @javax.annotation.Nullable String personalisedViewId) { + this.personalisedViewId = personalisedViewId; + return this; + } + + /** + * Indicates personalised view of the Liveboard in case of png + * + * @return personalisedViewId + */ + @javax.annotation.Nullable + public String getPersonalisedViewId() { + return personalisedViewId; + } + + public void setPersonalisedViewId(@javax.annotation.Nullable String personalisedViewId) { + this.personalisedViewId = personalisedViewId; + } + + public PngOptionsInput imageResolution(@javax.annotation.Nullable Integer imageResolution) { + this.imageResolution = imageResolution; + return this; + } + + /** + * Desired width of the Liveboard image in pixels. Ex. 1920 for Full HD image Version: 10.9.0.cl + * or later + * + * @return imageResolution + */ + @javax.annotation.Nullable + public Integer getImageResolution() { + return imageResolution; + } + + public void setImageResolution(@javax.annotation.Nullable Integer imageResolution) { + this.imageResolution = imageResolution; + } + + public PngOptionsInput imageScale(@javax.annotation.Nullable Integer imageScale) { + this.imageScale = imageScale; + return this; + } + + /** + * The scale of the image in percentage. Ex. 100 for 100% scale. Version: 10.9.0.cl or later + * + * @return imageScale + */ + @javax.annotation.Nullable + public Integer getImageScale() { + return imageScale; + } + + public void setImageScale(@javax.annotation.Nullable Integer imageScale) { + this.imageScale = imageScale; + } + + public PngOptionsInput includeHeader(@javax.annotation.Nullable Boolean includeHeader) { + this.includeHeader = includeHeader; + return this; + } + + /** + * Indicates whether to include the header of the liveboard. Version: 10.9.0.cl or later + * + * @return includeHeader + */ + @javax.annotation.Nullable + public Boolean getIncludeHeader() { + return includeHeader; + } + + public void setIncludeHeader(@javax.annotation.Nullable Boolean includeHeader) { + this.includeHeader = includeHeader; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key name of the property + * @param value value of the property + * @return the PngOptionsInput instance itself + */ + public PngOptionsInput putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return a map of objects + */ + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key name of the property + * @return an object + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + PngOptionsInput pngOptionsInput = (PngOptionsInput) o; + return Objects.equals(this.includeCoverPage, pngOptionsInput.includeCoverPage) + && Objects.equals(this.includeFilterPage, pngOptionsInput.includeFilterPage) + && Objects.equals(this.personalisedViewId, pngOptionsInput.personalisedViewId) + && Objects.equals(this.imageResolution, pngOptionsInput.imageResolution) + && Objects.equals(this.imageScale, pngOptionsInput.imageScale) + && Objects.equals(this.includeHeader, pngOptionsInput.includeHeader) + && Objects.equals(this.additionalProperties, pngOptionsInput.additionalProperties); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b + || (a != null + && b != null + && a.isPresent() + && b.isPresent() + && Objects.deepEquals(a.get(), b.get())); + } + + @Override + public int hashCode() { + return Objects.hash( + includeCoverPage, + includeFilterPage, + personalisedViewId, + imageResolution, + imageScale, + includeHeader, + additionalProperties); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; + } + return a.isPresent() ? Arrays.deepHashCode(new Object[] {a.get()}) : 31; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class PngOptionsInput {\n"); + sb.append(" includeCoverPage: ").append(toIndentedString(includeCoverPage)).append("\n"); + sb.append(" includeFilterPage: ") + .append(toIndentedString(includeFilterPage)) + .append("\n"); + sb.append(" personalisedViewId: ") + .append(toIndentedString(personalisedViewId)) + .append("\n"); + sb.append(" imageResolution: ").append(toIndentedString(imageResolution)).append("\n"); + sb.append(" imageScale: ").append(toIndentedString(imageScale)).append("\n"); + sb.append(" includeHeader: ").append(toIndentedString(includeHeader)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first + * line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("include_cover_page"); + openapiFields.add("include_filter_page"); + openapiFields.add("personalised_view_id"); + openapiFields.add("image_resolution"); + openapiFields.add("image_scale"); + openapiFields.add("include_header"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to PngOptionsInput + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!PngOptionsInput.openapiRequiredFields + .isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException( + String.format( + "The required field(s) %s in PngOptionsInput is not found in the" + + " empty JSON string", + PngOptionsInput.openapiRequiredFields.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if ((jsonObj.get("personalised_view_id") != null + && !jsonObj.get("personalised_view_id").isJsonNull()) + && !jsonObj.get("personalised_view_id").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `personalised_view_id` to be a primitive type in" + + " the JSON string but got `%s`", + jsonObj.get("personalised_view_id").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!PngOptionsInput.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'PngOptionsInput' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter = + gson.getDelegateAdapter(this, TypeToken.get(PngOptionsInput.class)); + + return (TypeAdapter) + new TypeAdapter() { + @Override + public void write(JsonWriter out, PngOptionsInput value) + throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + obj.remove("additionalProperties"); + // serialize additional properties + if (value.getAdditionalProperties() != null) { + for (Map.Entry entry : + value.getAdditionalProperties().entrySet()) { + if (entry.getValue() instanceof String) + obj.addProperty(entry.getKey(), (String) entry.getValue()); + else if (entry.getValue() instanceof Number) + obj.addProperty(entry.getKey(), (Number) entry.getValue()); + else if (entry.getValue() instanceof Boolean) + obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); + else if (entry.getValue() instanceof Character) + obj.addProperty( + entry.getKey(), (Character) entry.getValue()); + else { + JsonElement jsonElement = gson.toJsonTree(entry.getValue()); + if (jsonElement.isJsonArray()) { + obj.add(entry.getKey(), jsonElement.getAsJsonArray()); + } else { + obj.add(entry.getKey(), jsonElement.getAsJsonObject()); + } + } + } + } + elementAdapter.write(out, obj); + } + + @Override + public PngOptionsInput read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // store additional fields in the deserialized instance + PngOptionsInput instance = thisAdapter.fromJsonTree(jsonObj); + for (Map.Entry entry : jsonObj.entrySet()) { + if (!openapiFields.contains(entry.getKey())) { + if (entry.getValue().isJsonPrimitive()) { // primitive type + if (entry.getValue().getAsJsonPrimitive().isString()) + instance.putAdditionalProperty( + entry.getKey(), entry.getValue().getAsString()); + else if (entry.getValue().getAsJsonPrimitive().isNumber()) + instance.putAdditionalProperty( + entry.getKey(), entry.getValue().getAsNumber()); + else if (entry.getValue().getAsJsonPrimitive().isBoolean()) + instance.putAdditionalProperty( + entry.getKey(), + entry.getValue().getAsBoolean()); + else + throw new IllegalArgumentException( + String.format( + "The field `%s` has unknown primitive" + + " type. Value: %s", + entry.getKey(), + entry.getValue().toString())); + } else if (entry.getValue().isJsonArray()) { + instance.putAdditionalProperty( + entry.getKey(), + gson.fromJson(entry.getValue(), List.class)); + } else { // JSON object + instance.putAdditionalProperty( + entry.getKey(), + gson.fromJson(entry.getValue(), HashMap.class)); + } + } + } + return instance; + } + }.nullSafe(); + } + } + + /** + * Create an instance of PngOptionsInput given an JSON string + * + * @param jsonString JSON string + * @return An instance of PngOptionsInput + * @throws IOException if the JSON string is invalid with respect to PngOptionsInput + */ + public static PngOptionsInput fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, PngOptionsInput.class); + } + + /** + * Convert an instance of PngOptionsInput to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} diff --git a/sdks/java/src/main/java/com/thoughtspot/client/model/PolicyProcessOptions.java b/sdks/java/src/main/java/com/thoughtspot/client/model/PolicyProcessOptions.java new file mode 100644 index 000000000..de4f2a4d6 --- /dev/null +++ b/sdks/java/src/main/java/com/thoughtspot/client/model/PolicyProcessOptions.java @@ -0,0 +1,311 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client.model; + +import com.google.gson.Gson; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.TypeAdapter; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.annotations.SerializedName; +import com.google.gson.reflect.TypeToken; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import com.thoughtspot.client.JSON; +import java.io.IOException; +import java.io.Serializable; +import java.util.Arrays; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Objects; +import org.openapitools.jackson.nullable.JsonNullable; + +/** PolicyProcessOptions */ +@javax.annotation.Generated( + value = "org.openapitools.codegen.languages.JavaClientCodegen", + comments = "Generator version: 7.12.0") +public class PolicyProcessOptions implements Serializable { + private static final long serialVersionUID = 1L; + + public static final String SERIALIZED_NAME_IMPERSONATE_USER = "impersonate_user"; + + @SerializedName(SERIALIZED_NAME_IMPERSONATE_USER) + @javax.annotation.Nullable + private String impersonateUser; + + public PolicyProcessOptions() {} + + public PolicyProcessOptions impersonateUser(@javax.annotation.Nullable String impersonateUser) { + this.impersonateUser = impersonateUser; + return this; + } + + /** + * Get impersonateUser + * + * @return impersonateUser + */ + @javax.annotation.Nullable + public String getImpersonateUser() { + return impersonateUser; + } + + public void setImpersonateUser(@javax.annotation.Nullable String impersonateUser) { + this.impersonateUser = impersonateUser; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key name of the property + * @param value value of the property + * @return the PolicyProcessOptions instance itself + */ + public PolicyProcessOptions putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return a map of objects + */ + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key name of the property + * @return an object + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + PolicyProcessOptions policyProcessOptions = (PolicyProcessOptions) o; + return Objects.equals(this.impersonateUser, policyProcessOptions.impersonateUser) + && Objects.equals( + this.additionalProperties, policyProcessOptions.additionalProperties); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b + || (a != null + && b != null + && a.isPresent() + && b.isPresent() + && Objects.deepEquals(a.get(), b.get())); + } + + @Override + public int hashCode() { + return Objects.hash(impersonateUser, additionalProperties); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; + } + return a.isPresent() ? Arrays.deepHashCode(new Object[] {a.get()}) : 31; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class PolicyProcessOptions {\n"); + sb.append(" impersonateUser: ").append(toIndentedString(impersonateUser)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first + * line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("impersonate_user"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to PolicyProcessOptions + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!PolicyProcessOptions.openapiRequiredFields + .isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException( + String.format( + "The required field(s) %s in PolicyProcessOptions is not found in" + + " the empty JSON string", + PolicyProcessOptions.openapiRequiredFields.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if ((jsonObj.get("impersonate_user") != null + && !jsonObj.get("impersonate_user").isJsonNull()) + && !jsonObj.get("impersonate_user").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `impersonate_user` to be a primitive type in the" + + " JSON string but got `%s`", + jsonObj.get("impersonate_user").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!PolicyProcessOptions.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'PolicyProcessOptions' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter = + gson.getDelegateAdapter(this, TypeToken.get(PolicyProcessOptions.class)); + + return (TypeAdapter) + new TypeAdapter() { + @Override + public void write(JsonWriter out, PolicyProcessOptions value) + throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + obj.remove("additionalProperties"); + // serialize additional properties + if (value.getAdditionalProperties() != null) { + for (Map.Entry entry : + value.getAdditionalProperties().entrySet()) { + if (entry.getValue() instanceof String) + obj.addProperty(entry.getKey(), (String) entry.getValue()); + else if (entry.getValue() instanceof Number) + obj.addProperty(entry.getKey(), (Number) entry.getValue()); + else if (entry.getValue() instanceof Boolean) + obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); + else if (entry.getValue() instanceof Character) + obj.addProperty( + entry.getKey(), (Character) entry.getValue()); + else { + JsonElement jsonElement = gson.toJsonTree(entry.getValue()); + if (jsonElement.isJsonArray()) { + obj.add(entry.getKey(), jsonElement.getAsJsonArray()); + } else { + obj.add(entry.getKey(), jsonElement.getAsJsonObject()); + } + } + } + } + elementAdapter.write(out, obj); + } + + @Override + public PolicyProcessOptions read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // store additional fields in the deserialized instance + PolicyProcessOptions instance = thisAdapter.fromJsonTree(jsonObj); + for (Map.Entry entry : jsonObj.entrySet()) { + if (!openapiFields.contains(entry.getKey())) { + if (entry.getValue().isJsonPrimitive()) { // primitive type + if (entry.getValue().getAsJsonPrimitive().isString()) + instance.putAdditionalProperty( + entry.getKey(), entry.getValue().getAsString()); + else if (entry.getValue().getAsJsonPrimitive().isNumber()) + instance.putAdditionalProperty( + entry.getKey(), entry.getValue().getAsNumber()); + else if (entry.getValue().getAsJsonPrimitive().isBoolean()) + instance.putAdditionalProperty( + entry.getKey(), + entry.getValue().getAsBoolean()); + else + throw new IllegalArgumentException( + String.format( + "The field `%s` has unknown primitive" + + " type. Value: %s", + entry.getKey(), + entry.getValue().toString())); + } else if (entry.getValue().isJsonArray()) { + instance.putAdditionalProperty( + entry.getKey(), + gson.fromJson(entry.getValue(), List.class)); + } else { // JSON object + instance.putAdditionalProperty( + entry.getKey(), + gson.fromJson(entry.getValue(), HashMap.class)); + } + } + } + return instance; + } + }.nullSafe(); + } + } + + /** + * Create an instance of PolicyProcessOptions given an JSON string + * + * @param jsonString JSON string + * @return An instance of PolicyProcessOptions + * @throws IOException if the JSON string is invalid with respect to PolicyProcessOptions + */ + public static PolicyProcessOptions fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, PolicyProcessOptions.class); + } + + /** + * Convert an instance of PolicyProcessOptions to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} diff --git a/sdks/java/src/main/java/com/thoughtspot/client/model/PolicyProcessOptionsInput.java b/sdks/java/src/main/java/com/thoughtspot/client/model/PolicyProcessOptionsInput.java new file mode 100644 index 000000000..fda7616a4 --- /dev/null +++ b/sdks/java/src/main/java/com/thoughtspot/client/model/PolicyProcessOptionsInput.java @@ -0,0 +1,313 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client.model; + +import com.google.gson.Gson; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.TypeAdapter; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.annotations.SerializedName; +import com.google.gson.reflect.TypeToken; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import com.thoughtspot.client.JSON; +import java.io.IOException; +import java.io.Serializable; +import java.util.Arrays; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Objects; +import org.openapitools.jackson.nullable.JsonNullable; + +/** PolicyProcessOptionsInput */ +@javax.annotation.Generated( + value = "org.openapitools.codegen.languages.JavaClientCodegen", + comments = "Generator version: 7.12.0") +public class PolicyProcessOptionsInput implements Serializable { + private static final long serialVersionUID = 1L; + + public static final String SERIALIZED_NAME_IMPERSONATE_USER = "impersonate_user"; + + @SerializedName(SERIALIZED_NAME_IMPERSONATE_USER) + @javax.annotation.Nullable + private String impersonateUser; + + public PolicyProcessOptionsInput() {} + + public PolicyProcessOptionsInput impersonateUser( + @javax.annotation.Nullable String impersonateUser) { + this.impersonateUser = impersonateUser; + return this; + } + + /** + * Get impersonateUser + * + * @return impersonateUser + */ + @javax.annotation.Nullable + public String getImpersonateUser() { + return impersonateUser; + } + + public void setImpersonateUser(@javax.annotation.Nullable String impersonateUser) { + this.impersonateUser = impersonateUser; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key name of the property + * @param value value of the property + * @return the PolicyProcessOptionsInput instance itself + */ + public PolicyProcessOptionsInput putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return a map of objects + */ + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key name of the property + * @return an object + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + PolicyProcessOptionsInput policyProcessOptionsInput = (PolicyProcessOptionsInput) o; + return Objects.equals(this.impersonateUser, policyProcessOptionsInput.impersonateUser) + && Objects.equals( + this.additionalProperties, policyProcessOptionsInput.additionalProperties); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b + || (a != null + && b != null + && a.isPresent() + && b.isPresent() + && Objects.deepEquals(a.get(), b.get())); + } + + @Override + public int hashCode() { + return Objects.hash(impersonateUser, additionalProperties); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; + } + return a.isPresent() ? Arrays.deepHashCode(new Object[] {a.get()}) : 31; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class PolicyProcessOptionsInput {\n"); + sb.append(" impersonateUser: ").append(toIndentedString(impersonateUser)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first + * line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("impersonate_user"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to PolicyProcessOptionsInput + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!PolicyProcessOptionsInput.openapiRequiredFields + .isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException( + String.format( + "The required field(s) %s in PolicyProcessOptionsInput is not" + + " found in the empty JSON string", + PolicyProcessOptionsInput.openapiRequiredFields.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if ((jsonObj.get("impersonate_user") != null + && !jsonObj.get("impersonate_user").isJsonNull()) + && !jsonObj.get("impersonate_user").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `impersonate_user` to be a primitive type in the" + + " JSON string but got `%s`", + jsonObj.get("impersonate_user").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!PolicyProcessOptionsInput.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'PolicyProcessOptionsInput' and its + // subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter = + gson.getDelegateAdapter(this, TypeToken.get(PolicyProcessOptionsInput.class)); + + return (TypeAdapter) + new TypeAdapter() { + @Override + public void write(JsonWriter out, PolicyProcessOptionsInput value) + throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + obj.remove("additionalProperties"); + // serialize additional properties + if (value.getAdditionalProperties() != null) { + for (Map.Entry entry : + value.getAdditionalProperties().entrySet()) { + if (entry.getValue() instanceof String) + obj.addProperty(entry.getKey(), (String) entry.getValue()); + else if (entry.getValue() instanceof Number) + obj.addProperty(entry.getKey(), (Number) entry.getValue()); + else if (entry.getValue() instanceof Boolean) + obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); + else if (entry.getValue() instanceof Character) + obj.addProperty( + entry.getKey(), (Character) entry.getValue()); + else { + JsonElement jsonElement = gson.toJsonTree(entry.getValue()); + if (jsonElement.isJsonArray()) { + obj.add(entry.getKey(), jsonElement.getAsJsonArray()); + } else { + obj.add(entry.getKey(), jsonElement.getAsJsonObject()); + } + } + } + } + elementAdapter.write(out, obj); + } + + @Override + public PolicyProcessOptionsInput read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // store additional fields in the deserialized instance + PolicyProcessOptionsInput instance = thisAdapter.fromJsonTree(jsonObj); + for (Map.Entry entry : jsonObj.entrySet()) { + if (!openapiFields.contains(entry.getKey())) { + if (entry.getValue().isJsonPrimitive()) { // primitive type + if (entry.getValue().getAsJsonPrimitive().isString()) + instance.putAdditionalProperty( + entry.getKey(), entry.getValue().getAsString()); + else if (entry.getValue().getAsJsonPrimitive().isNumber()) + instance.putAdditionalProperty( + entry.getKey(), entry.getValue().getAsNumber()); + else if (entry.getValue().getAsJsonPrimitive().isBoolean()) + instance.putAdditionalProperty( + entry.getKey(), + entry.getValue().getAsBoolean()); + else + throw new IllegalArgumentException( + String.format( + "The field `%s` has unknown primitive" + + " type. Value: %s", + entry.getKey(), + entry.getValue().toString())); + } else if (entry.getValue().isJsonArray()) { + instance.putAdditionalProperty( + entry.getKey(), + gson.fromJson(entry.getValue(), List.class)); + } else { // JSON object + instance.putAdditionalProperty( + entry.getKey(), + gson.fromJson(entry.getValue(), HashMap.class)); + } + } + } + return instance; + } + }.nullSafe(); + } + } + + /** + * Create an instance of PolicyProcessOptionsInput given an JSON string + * + * @param jsonString JSON string + * @return An instance of PolicyProcessOptionsInput + * @throws IOException if the JSON string is invalid with respect to PolicyProcessOptionsInput + */ + public static PolicyProcessOptionsInput fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, PolicyProcessOptionsInput.class); + } + + /** + * Convert an instance of PolicyProcessOptionsInput to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} diff --git a/sdks/java/src/main/java/com/thoughtspot/client/model/PrincipalsInput.java b/sdks/java/src/main/java/com/thoughtspot/client/model/PrincipalsInput.java new file mode 100644 index 000000000..e841fb053 --- /dev/null +++ b/sdks/java/src/main/java/com/thoughtspot/client/model/PrincipalsInput.java @@ -0,0 +1,411 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client.model; + +import com.google.gson.Gson; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.TypeAdapter; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.reflect.TypeToken; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import com.thoughtspot.client.JSON; +import java.io.IOException; +import java.io.Serializable; +import java.util.Arrays; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Objects; +import org.openapitools.jackson.nullable.JsonNullable; + +/** PrincipalsInput */ +@javax.annotation.Generated( + value = "org.openapitools.codegen.languages.JavaClientCodegen", + comments = "Generator version: 7.12.0") +public class PrincipalsInput implements Serializable { + private static final long serialVersionUID = 1L; + + public static final String SERIALIZED_NAME_IDENTIFIER = "identifier"; + + @SerializedName(SERIALIZED_NAME_IDENTIFIER) + @javax.annotation.Nonnull + private String identifier; + + /** Principal type. */ + @JsonAdapter(TypeEnum.Adapter.class) + public enum TypeEnum { + USER("USER"), + + USER_GROUP("USER_GROUP"); + + private String value; + + TypeEnum(String value) { + this.value = value; + } + + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + public static TypeEnum fromValue(String value) { + for (TypeEnum b : TypeEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + return null; + } + + public static class Adapter extends TypeAdapter { + @Override + public void write(final JsonWriter jsonWriter, final TypeEnum enumeration) + throws IOException { + jsonWriter.value(enumeration.getValue()); + } + + @Override + public TypeEnum read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + return TypeEnum.fromValue(value); + } + } + + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + String value = jsonElement.getAsString(); + TypeEnum.fromValue(value); + } + } + + public static final String SERIALIZED_NAME_TYPE = "type"; + + @SerializedName(SERIALIZED_NAME_TYPE) + @javax.annotation.Nullable + private TypeEnum type; + + public PrincipalsInput() {} + + public PrincipalsInput identifier(@javax.annotation.Nonnull String identifier) { + this.identifier = identifier; + return this; + } + + /** + * Unique ID or name of the principal object such as a user or group. + * + * @return identifier + */ + @javax.annotation.Nonnull + public String getIdentifier() { + return identifier; + } + + public void setIdentifier(@javax.annotation.Nonnull String identifier) { + this.identifier = identifier; + } + + public PrincipalsInput type(@javax.annotation.Nullable TypeEnum type) { + this.type = type; + return this; + } + + /** + * Principal type. + * + * @return type + */ + @javax.annotation.Nullable + public TypeEnum getType() { + return type; + } + + public void setType(@javax.annotation.Nullable TypeEnum type) { + this.type = type; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key name of the property + * @param value value of the property + * @return the PrincipalsInput instance itself + */ + public PrincipalsInput putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return a map of objects + */ + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key name of the property + * @return an object + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + PrincipalsInput principalsInput = (PrincipalsInput) o; + return Objects.equals(this.identifier, principalsInput.identifier) + && Objects.equals(this.type, principalsInput.type) + && Objects.equals(this.additionalProperties, principalsInput.additionalProperties); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b + || (a != null + && b != null + && a.isPresent() + && b.isPresent() + && Objects.deepEquals(a.get(), b.get())); + } + + @Override + public int hashCode() { + return Objects.hash(identifier, type, additionalProperties); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; + } + return a.isPresent() ? Arrays.deepHashCode(new Object[] {a.get()}) : 31; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class PrincipalsInput {\n"); + sb.append(" identifier: ").append(toIndentedString(identifier)).append("\n"); + sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first + * line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("identifier"); + openapiFields.add("type"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + openapiRequiredFields.add("identifier"); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to PrincipalsInput + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!PrincipalsInput.openapiRequiredFields + .isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException( + String.format( + "The required field(s) %s in PrincipalsInput is not found in the" + + " empty JSON string", + PrincipalsInput.openapiRequiredFields.toString())); + } + } + + // check to make sure all required properties/fields are present in the JSON string + for (String requiredField : PrincipalsInput.openapiRequiredFields) { + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException( + String.format( + "The required field `%s` is not found in the JSON string: %s", + requiredField, jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if (!jsonObj.get("identifier").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `identifier` to be a primitive type in the JSON" + + " string but got `%s`", + jsonObj.get("identifier").toString())); + } + if ((jsonObj.get("type") != null && !jsonObj.get("type").isJsonNull()) + && !jsonObj.get("type").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `type` to be a primitive type in the JSON string" + + " but got `%s`", + jsonObj.get("type").toString())); + } + // validate the optional field `type` + if (jsonObj.get("type") != null && !jsonObj.get("type").isJsonNull()) { + TypeEnum.validateJsonElement(jsonObj.get("type")); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!PrincipalsInput.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'PrincipalsInput' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter = + gson.getDelegateAdapter(this, TypeToken.get(PrincipalsInput.class)); + + return (TypeAdapter) + new TypeAdapter() { + @Override + public void write(JsonWriter out, PrincipalsInput value) + throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + obj.remove("additionalProperties"); + // serialize additional properties + if (value.getAdditionalProperties() != null) { + for (Map.Entry entry : + value.getAdditionalProperties().entrySet()) { + if (entry.getValue() instanceof String) + obj.addProperty(entry.getKey(), (String) entry.getValue()); + else if (entry.getValue() instanceof Number) + obj.addProperty(entry.getKey(), (Number) entry.getValue()); + else if (entry.getValue() instanceof Boolean) + obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); + else if (entry.getValue() instanceof Character) + obj.addProperty( + entry.getKey(), (Character) entry.getValue()); + else { + JsonElement jsonElement = gson.toJsonTree(entry.getValue()); + if (jsonElement.isJsonArray()) { + obj.add(entry.getKey(), jsonElement.getAsJsonArray()); + } else { + obj.add(entry.getKey(), jsonElement.getAsJsonObject()); + } + } + } + } + elementAdapter.write(out, obj); + } + + @Override + public PrincipalsInput read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // store additional fields in the deserialized instance + PrincipalsInput instance = thisAdapter.fromJsonTree(jsonObj); + for (Map.Entry entry : jsonObj.entrySet()) { + if (!openapiFields.contains(entry.getKey())) { + if (entry.getValue().isJsonPrimitive()) { // primitive type + if (entry.getValue().getAsJsonPrimitive().isString()) + instance.putAdditionalProperty( + entry.getKey(), entry.getValue().getAsString()); + else if (entry.getValue().getAsJsonPrimitive().isNumber()) + instance.putAdditionalProperty( + entry.getKey(), entry.getValue().getAsNumber()); + else if (entry.getValue().getAsJsonPrimitive().isBoolean()) + instance.putAdditionalProperty( + entry.getKey(), + entry.getValue().getAsBoolean()); + else + throw new IllegalArgumentException( + String.format( + "The field `%s` has unknown primitive" + + " type. Value: %s", + entry.getKey(), + entry.getValue().toString())); + } else if (entry.getValue().isJsonArray()) { + instance.putAdditionalProperty( + entry.getKey(), + gson.fromJson(entry.getValue(), List.class)); + } else { // JSON object + instance.putAdditionalProperty( + entry.getKey(), + gson.fromJson(entry.getValue(), HashMap.class)); + } + } + } + return instance; + } + }.nullSafe(); + } + } + + /** + * Create an instance of PrincipalsInput given an JSON string + * + * @param jsonString JSON string + * @return An instance of PrincipalsInput + * @throws IOException if the JSON string is invalid with respect to PrincipalsInput + */ + public static PrincipalsInput fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, PrincipalsInput.class); + } + + /** + * Convert an instance of PrincipalsInput to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} diff --git a/sdks/java/src/main/java/com/thoughtspot/client/model/PrincipalsListItem.java b/sdks/java/src/main/java/com/thoughtspot/client/model/PrincipalsListItem.java new file mode 100644 index 000000000..6be136e61 --- /dev/null +++ b/sdks/java/src/main/java/com/thoughtspot/client/model/PrincipalsListItem.java @@ -0,0 +1,338 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client.model; + +import com.google.gson.Gson; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.TypeAdapter; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.annotations.SerializedName; +import com.google.gson.reflect.TypeToken; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import com.thoughtspot.client.JSON; +import java.io.IOException; +import java.io.Serializable; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Objects; + +/** PrincipalsListItem */ +@javax.annotation.Generated( + value = "org.openapitools.codegen.languages.JavaClientCodegen", + comments = "Generator version: 7.12.0") +public class PrincipalsListItem implements Serializable { + private static final long serialVersionUID = 1L; + + public static final String SERIALIZED_NAME_IDENTIFIER = "identifier"; + + @SerializedName(SERIALIZED_NAME_IDENTIFIER) + @javax.annotation.Nonnull + private String identifier; + + public static final String SERIALIZED_NAME_TYPE = "type"; + + @SerializedName(SERIALIZED_NAME_TYPE) + @javax.annotation.Nonnull + private String type; + + public PrincipalsListItem() {} + + public PrincipalsListItem identifier(@javax.annotation.Nonnull String identifier) { + this.identifier = identifier; + return this; + } + + /** + * Unique ID or name of the user or group. + * + * @return identifier + */ + @javax.annotation.Nonnull + public String getIdentifier() { + return identifier; + } + + public void setIdentifier(@javax.annotation.Nonnull String identifier) { + this.identifier = identifier; + } + + public PrincipalsListItem type(@javax.annotation.Nonnull String type) { + this.type = type; + return this; + } + + /** + * Principal type. Valid values are + * + * @return type + */ + @javax.annotation.Nonnull + public String getType() { + return type; + } + + public void setType(@javax.annotation.Nonnull String type) { + this.type = type; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key name of the property + * @param value value of the property + * @return the PrincipalsListItem instance itself + */ + public PrincipalsListItem putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return a map of objects + */ + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key name of the property + * @return an object + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + PrincipalsListItem principalsListItem = (PrincipalsListItem) o; + return Objects.equals(this.identifier, principalsListItem.identifier) + && Objects.equals(this.type, principalsListItem.type) + && Objects.equals( + this.additionalProperties, principalsListItem.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(identifier, type, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class PrincipalsListItem {\n"); + sb.append(" identifier: ").append(toIndentedString(identifier)).append("\n"); + sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first + * line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("identifier"); + openapiFields.add("type"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + openapiRequiredFields.add("identifier"); + openapiRequiredFields.add("type"); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to PrincipalsListItem + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!PrincipalsListItem.openapiRequiredFields + .isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException( + String.format( + "The required field(s) %s in PrincipalsListItem is not found in" + + " the empty JSON string", + PrincipalsListItem.openapiRequiredFields.toString())); + } + } + + // check to make sure all required properties/fields are present in the JSON string + for (String requiredField : PrincipalsListItem.openapiRequiredFields) { + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException( + String.format( + "The required field `%s` is not found in the JSON string: %s", + requiredField, jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if (!jsonObj.get("identifier").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `identifier` to be a primitive type in the JSON" + + " string but got `%s`", + jsonObj.get("identifier").toString())); + } + if (!jsonObj.get("type").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `type` to be a primitive type in the JSON string" + + " but got `%s`", + jsonObj.get("type").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!PrincipalsListItem.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'PrincipalsListItem' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter = + gson.getDelegateAdapter(this, TypeToken.get(PrincipalsListItem.class)); + + return (TypeAdapter) + new TypeAdapter() { + @Override + public void write(JsonWriter out, PrincipalsListItem value) + throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + obj.remove("additionalProperties"); + // serialize additional properties + if (value.getAdditionalProperties() != null) { + for (Map.Entry entry : + value.getAdditionalProperties().entrySet()) { + if (entry.getValue() instanceof String) + obj.addProperty(entry.getKey(), (String) entry.getValue()); + else if (entry.getValue() instanceof Number) + obj.addProperty(entry.getKey(), (Number) entry.getValue()); + else if (entry.getValue() instanceof Boolean) + obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); + else if (entry.getValue() instanceof Character) + obj.addProperty( + entry.getKey(), (Character) entry.getValue()); + else { + JsonElement jsonElement = gson.toJsonTree(entry.getValue()); + if (jsonElement.isJsonArray()) { + obj.add(entry.getKey(), jsonElement.getAsJsonArray()); + } else { + obj.add(entry.getKey(), jsonElement.getAsJsonObject()); + } + } + } + } + elementAdapter.write(out, obj); + } + + @Override + public PrincipalsListItem read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // store additional fields in the deserialized instance + PrincipalsListItem instance = thisAdapter.fromJsonTree(jsonObj); + for (Map.Entry entry : jsonObj.entrySet()) { + if (!openapiFields.contains(entry.getKey())) { + if (entry.getValue().isJsonPrimitive()) { // primitive type + if (entry.getValue().getAsJsonPrimitive().isString()) + instance.putAdditionalProperty( + entry.getKey(), entry.getValue().getAsString()); + else if (entry.getValue().getAsJsonPrimitive().isNumber()) + instance.putAdditionalProperty( + entry.getKey(), entry.getValue().getAsNumber()); + else if (entry.getValue().getAsJsonPrimitive().isBoolean()) + instance.putAdditionalProperty( + entry.getKey(), + entry.getValue().getAsBoolean()); + else + throw new IllegalArgumentException( + String.format( + "The field `%s` has unknown primitive" + + " type. Value: %s", + entry.getKey(), + entry.getValue().toString())); + } else if (entry.getValue().isJsonArray()) { + instance.putAdditionalProperty( + entry.getKey(), + gson.fromJson(entry.getValue(), List.class)); + } else { // JSON object + instance.putAdditionalProperty( + entry.getKey(), + gson.fromJson(entry.getValue(), HashMap.class)); + } + } + } + return instance; + } + }.nullSafe(); + } + } + + /** + * Create an instance of PrincipalsListItem given an JSON string + * + * @param jsonString JSON string + * @return An instance of PrincipalsListItem + * @throws IOException if the JSON string is invalid with respect to PrincipalsListItem + */ + public static PrincipalsListItem fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, PrincipalsListItem.class); + } + + /** + * Convert an instance of PrincipalsListItem to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} diff --git a/sdks/java/src/main/java/com/thoughtspot/client/model/PrincipalsListItemInput.java b/sdks/java/src/main/java/com/thoughtspot/client/model/PrincipalsListItemInput.java new file mode 100644 index 000000000..800b72ac9 --- /dev/null +++ b/sdks/java/src/main/java/com/thoughtspot/client/model/PrincipalsListItemInput.java @@ -0,0 +1,339 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client.model; + +import com.google.gson.Gson; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.TypeAdapter; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.annotations.SerializedName; +import com.google.gson.reflect.TypeToken; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import com.thoughtspot.client.JSON; +import java.io.IOException; +import java.io.Serializable; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Objects; + +/** PrincipalsListItemInput */ +@javax.annotation.Generated( + value = "org.openapitools.codegen.languages.JavaClientCodegen", + comments = "Generator version: 7.12.0") +public class PrincipalsListItemInput implements Serializable { + private static final long serialVersionUID = 1L; + + public static final String SERIALIZED_NAME_IDENTIFIER = "identifier"; + + @SerializedName(SERIALIZED_NAME_IDENTIFIER) + @javax.annotation.Nonnull + private String identifier; + + public static final String SERIALIZED_NAME_TYPE = "type"; + + @SerializedName(SERIALIZED_NAME_TYPE) + @javax.annotation.Nonnull + private String type; + + public PrincipalsListItemInput() {} + + public PrincipalsListItemInput identifier(@javax.annotation.Nonnull String identifier) { + this.identifier = identifier; + return this; + } + + /** + * Unique ID or name of the user or group. + * + * @return identifier + */ + @javax.annotation.Nonnull + public String getIdentifier() { + return identifier; + } + + public void setIdentifier(@javax.annotation.Nonnull String identifier) { + this.identifier = identifier; + } + + public PrincipalsListItemInput type(@javax.annotation.Nonnull String type) { + this.type = type; + return this; + } + + /** + * Principal type. + * + * @return type + */ + @javax.annotation.Nonnull + public String getType() { + return type; + } + + public void setType(@javax.annotation.Nonnull String type) { + this.type = type; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key name of the property + * @param value value of the property + * @return the PrincipalsListItemInput instance itself + */ + public PrincipalsListItemInput putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return a map of objects + */ + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key name of the property + * @return an object + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + PrincipalsListItemInput principalsListItemInput = (PrincipalsListItemInput) o; + return Objects.equals(this.identifier, principalsListItemInput.identifier) + && Objects.equals(this.type, principalsListItemInput.type) + && Objects.equals( + this.additionalProperties, principalsListItemInput.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(identifier, type, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class PrincipalsListItemInput {\n"); + sb.append(" identifier: ").append(toIndentedString(identifier)).append("\n"); + sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first + * line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("identifier"); + openapiFields.add("type"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + openapiRequiredFields.add("identifier"); + openapiRequiredFields.add("type"); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to PrincipalsListItemInput + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!PrincipalsListItemInput.openapiRequiredFields + .isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException( + String.format( + "The required field(s) %s in PrincipalsListItemInput is not found" + + " in the empty JSON string", + PrincipalsListItemInput.openapiRequiredFields.toString())); + } + } + + // check to make sure all required properties/fields are present in the JSON string + for (String requiredField : PrincipalsListItemInput.openapiRequiredFields) { + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException( + String.format( + "The required field `%s` is not found in the JSON string: %s", + requiredField, jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if (!jsonObj.get("identifier").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `identifier` to be a primitive type in the JSON" + + " string but got `%s`", + jsonObj.get("identifier").toString())); + } + if (!jsonObj.get("type").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `type` to be a primitive type in the JSON string" + + " but got `%s`", + jsonObj.get("type").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!PrincipalsListItemInput.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'PrincipalsListItemInput' and its + // subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter = + gson.getDelegateAdapter(this, TypeToken.get(PrincipalsListItemInput.class)); + + return (TypeAdapter) + new TypeAdapter() { + @Override + public void write(JsonWriter out, PrincipalsListItemInput value) + throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + obj.remove("additionalProperties"); + // serialize additional properties + if (value.getAdditionalProperties() != null) { + for (Map.Entry entry : + value.getAdditionalProperties().entrySet()) { + if (entry.getValue() instanceof String) + obj.addProperty(entry.getKey(), (String) entry.getValue()); + else if (entry.getValue() instanceof Number) + obj.addProperty(entry.getKey(), (Number) entry.getValue()); + else if (entry.getValue() instanceof Boolean) + obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); + else if (entry.getValue() instanceof Character) + obj.addProperty( + entry.getKey(), (Character) entry.getValue()); + else { + JsonElement jsonElement = gson.toJsonTree(entry.getValue()); + if (jsonElement.isJsonArray()) { + obj.add(entry.getKey(), jsonElement.getAsJsonArray()); + } else { + obj.add(entry.getKey(), jsonElement.getAsJsonObject()); + } + } + } + } + elementAdapter.write(out, obj); + } + + @Override + public PrincipalsListItemInput read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // store additional fields in the deserialized instance + PrincipalsListItemInput instance = thisAdapter.fromJsonTree(jsonObj); + for (Map.Entry entry : jsonObj.entrySet()) { + if (!openapiFields.contains(entry.getKey())) { + if (entry.getValue().isJsonPrimitive()) { // primitive type + if (entry.getValue().getAsJsonPrimitive().isString()) + instance.putAdditionalProperty( + entry.getKey(), entry.getValue().getAsString()); + else if (entry.getValue().getAsJsonPrimitive().isNumber()) + instance.putAdditionalProperty( + entry.getKey(), entry.getValue().getAsNumber()); + else if (entry.getValue().getAsJsonPrimitive().isBoolean()) + instance.putAdditionalProperty( + entry.getKey(), + entry.getValue().getAsBoolean()); + else + throw new IllegalArgumentException( + String.format( + "The field `%s` has unknown primitive" + + " type. Value: %s", + entry.getKey(), + entry.getValue().toString())); + } else if (entry.getValue().isJsonArray()) { + instance.putAdditionalProperty( + entry.getKey(), + gson.fromJson(entry.getValue(), List.class)); + } else { // JSON object + instance.putAdditionalProperty( + entry.getKey(), + gson.fromJson(entry.getValue(), HashMap.class)); + } + } + } + return instance; + } + }.nullSafe(); + } + } + + /** + * Create an instance of PrincipalsListItemInput given an JSON string + * + * @param jsonString JSON string + * @return An instance of PrincipalsListItemInput + * @throws IOException if the JSON string is invalid with respect to PrincipalsListItemInput + */ + public static PrincipalsListItemInput fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, PrincipalsListItemInput.class); + } + + /** + * Convert an instance of PrincipalsListItemInput to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} diff --git a/sdks/java/src/main/java/com/thoughtspot/client/model/PublishMetadataListItem.java b/sdks/java/src/main/java/com/thoughtspot/client/model/PublishMetadataListItem.java new file mode 100644 index 000000000..9647b0f7a --- /dev/null +++ b/sdks/java/src/main/java/com/thoughtspot/client/model/PublishMetadataListItem.java @@ -0,0 +1,415 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client.model; + +import com.google.gson.Gson; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.TypeAdapter; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.reflect.TypeToken; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import com.thoughtspot.client.JSON; +import java.io.IOException; +import java.io.Serializable; +import java.util.Arrays; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Objects; +import org.openapitools.jackson.nullable.JsonNullable; + +/** PublishMetadataListItem */ +@javax.annotation.Generated( + value = "org.openapitools.codegen.languages.JavaClientCodegen", + comments = "Generator version: 7.12.0") +public class PublishMetadataListItem implements Serializable { + private static final long serialVersionUID = 1L; + + public static final String SERIALIZED_NAME_IDENTIFIER = "identifier"; + + @SerializedName(SERIALIZED_NAME_IDENTIFIER) + @javax.annotation.Nonnull + private String identifier; + + /** Type of metadata. Required if identifier is name. */ + @JsonAdapter(TypeEnum.Adapter.class) + public enum TypeEnum { + LIVEBOARD("LIVEBOARD"), + + ANSWER("ANSWER"), + + LOGICAL_TABLE("LOGICAL_TABLE"); + + private String value; + + TypeEnum(String value) { + this.value = value; + } + + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + public static TypeEnum fromValue(String value) { + for (TypeEnum b : TypeEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + return null; + } + + public static class Adapter extends TypeAdapter { + @Override + public void write(final JsonWriter jsonWriter, final TypeEnum enumeration) + throws IOException { + jsonWriter.value(enumeration.getValue()); + } + + @Override + public TypeEnum read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + return TypeEnum.fromValue(value); + } + } + + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + String value = jsonElement.getAsString(); + TypeEnum.fromValue(value); + } + } + + public static final String SERIALIZED_NAME_TYPE = "type"; + + @SerializedName(SERIALIZED_NAME_TYPE) + @javax.annotation.Nullable + private TypeEnum type; + + public PublishMetadataListItem() {} + + public PublishMetadataListItem identifier(@javax.annotation.Nonnull String identifier) { + this.identifier = identifier; + return this; + } + + /** + * Unique ID or name of the metadata. + * + * @return identifier + */ + @javax.annotation.Nonnull + public String getIdentifier() { + return identifier; + } + + public void setIdentifier(@javax.annotation.Nonnull String identifier) { + this.identifier = identifier; + } + + public PublishMetadataListItem type(@javax.annotation.Nullable TypeEnum type) { + this.type = type; + return this; + } + + /** + * Type of metadata. Required if identifier is name. + * + * @return type + */ + @javax.annotation.Nullable + public TypeEnum getType() { + return type; + } + + public void setType(@javax.annotation.Nullable TypeEnum type) { + this.type = type; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key name of the property + * @param value value of the property + * @return the PublishMetadataListItem instance itself + */ + public PublishMetadataListItem putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return a map of objects + */ + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key name of the property + * @return an object + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + PublishMetadataListItem publishMetadataListItem = (PublishMetadataListItem) o; + return Objects.equals(this.identifier, publishMetadataListItem.identifier) + && Objects.equals(this.type, publishMetadataListItem.type) + && Objects.equals( + this.additionalProperties, publishMetadataListItem.additionalProperties); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b + || (a != null + && b != null + && a.isPresent() + && b.isPresent() + && Objects.deepEquals(a.get(), b.get())); + } + + @Override + public int hashCode() { + return Objects.hash(identifier, type, additionalProperties); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; + } + return a.isPresent() ? Arrays.deepHashCode(new Object[] {a.get()}) : 31; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class PublishMetadataListItem {\n"); + sb.append(" identifier: ").append(toIndentedString(identifier)).append("\n"); + sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first + * line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("identifier"); + openapiFields.add("type"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + openapiRequiredFields.add("identifier"); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to PublishMetadataListItem + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!PublishMetadataListItem.openapiRequiredFields + .isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException( + String.format( + "The required field(s) %s in PublishMetadataListItem is not found" + + " in the empty JSON string", + PublishMetadataListItem.openapiRequiredFields.toString())); + } + } + + // check to make sure all required properties/fields are present in the JSON string + for (String requiredField : PublishMetadataListItem.openapiRequiredFields) { + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException( + String.format( + "The required field `%s` is not found in the JSON string: %s", + requiredField, jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if (!jsonObj.get("identifier").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `identifier` to be a primitive type in the JSON" + + " string but got `%s`", + jsonObj.get("identifier").toString())); + } + if ((jsonObj.get("type") != null && !jsonObj.get("type").isJsonNull()) + && !jsonObj.get("type").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `type` to be a primitive type in the JSON string" + + " but got `%s`", + jsonObj.get("type").toString())); + } + // validate the optional field `type` + if (jsonObj.get("type") != null && !jsonObj.get("type").isJsonNull()) { + TypeEnum.validateJsonElement(jsonObj.get("type")); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!PublishMetadataListItem.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'PublishMetadataListItem' and its + // subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter = + gson.getDelegateAdapter(this, TypeToken.get(PublishMetadataListItem.class)); + + return (TypeAdapter) + new TypeAdapter() { + @Override + public void write(JsonWriter out, PublishMetadataListItem value) + throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + obj.remove("additionalProperties"); + // serialize additional properties + if (value.getAdditionalProperties() != null) { + for (Map.Entry entry : + value.getAdditionalProperties().entrySet()) { + if (entry.getValue() instanceof String) + obj.addProperty(entry.getKey(), (String) entry.getValue()); + else if (entry.getValue() instanceof Number) + obj.addProperty(entry.getKey(), (Number) entry.getValue()); + else if (entry.getValue() instanceof Boolean) + obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); + else if (entry.getValue() instanceof Character) + obj.addProperty( + entry.getKey(), (Character) entry.getValue()); + else { + JsonElement jsonElement = gson.toJsonTree(entry.getValue()); + if (jsonElement.isJsonArray()) { + obj.add(entry.getKey(), jsonElement.getAsJsonArray()); + } else { + obj.add(entry.getKey(), jsonElement.getAsJsonObject()); + } + } + } + } + elementAdapter.write(out, obj); + } + + @Override + public PublishMetadataListItem read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // store additional fields in the deserialized instance + PublishMetadataListItem instance = thisAdapter.fromJsonTree(jsonObj); + for (Map.Entry entry : jsonObj.entrySet()) { + if (!openapiFields.contains(entry.getKey())) { + if (entry.getValue().isJsonPrimitive()) { // primitive type + if (entry.getValue().getAsJsonPrimitive().isString()) + instance.putAdditionalProperty( + entry.getKey(), entry.getValue().getAsString()); + else if (entry.getValue().getAsJsonPrimitive().isNumber()) + instance.putAdditionalProperty( + entry.getKey(), entry.getValue().getAsNumber()); + else if (entry.getValue().getAsJsonPrimitive().isBoolean()) + instance.putAdditionalProperty( + entry.getKey(), + entry.getValue().getAsBoolean()); + else + throw new IllegalArgumentException( + String.format( + "The field `%s` has unknown primitive" + + " type. Value: %s", + entry.getKey(), + entry.getValue().toString())); + } else if (entry.getValue().isJsonArray()) { + instance.putAdditionalProperty( + entry.getKey(), + gson.fromJson(entry.getValue(), List.class)); + } else { // JSON object + instance.putAdditionalProperty( + entry.getKey(), + gson.fromJson(entry.getValue(), HashMap.class)); + } + } + } + return instance; + } + }.nullSafe(); + } + } + + /** + * Create an instance of PublishMetadataListItem given an JSON string + * + * @param jsonString JSON string + * @return An instance of PublishMetadataListItem + * @throws IOException if the JSON string is invalid with respect to PublishMetadataListItem + */ + public static PublishMetadataListItem fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, PublishMetadataListItem.class); + } + + /** + * Convert an instance of PublishMetadataListItem to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} diff --git a/sdks/java/src/main/java/com/thoughtspot/client/model/PublishMetadataRequest.java b/sdks/java/src/main/java/com/thoughtspot/client/model/PublishMetadataRequest.java new file mode 100644 index 000000000..15636a5c4 --- /dev/null +++ b/sdks/java/src/main/java/com/thoughtspot/client/model/PublishMetadataRequest.java @@ -0,0 +1,418 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client.model; + +import com.google.gson.Gson; +import com.google.gson.JsonArray; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.TypeAdapter; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.annotations.SerializedName; +import com.google.gson.reflect.TypeToken; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import com.thoughtspot.client.JSON; +import java.io.IOException; +import java.io.Serializable; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Objects; +import org.openapitools.jackson.nullable.JsonNullable; + +/** PublishMetadataRequest */ +@javax.annotation.Generated( + value = "org.openapitools.codegen.languages.JavaClientCodegen", + comments = "Generator version: 7.12.0") +public class PublishMetadataRequest implements Serializable { + private static final long serialVersionUID = 1L; + + public static final String SERIALIZED_NAME_METADATA = "metadata"; + + @SerializedName(SERIALIZED_NAME_METADATA) + @javax.annotation.Nonnull + private List metadata; + + public static final String SERIALIZED_NAME_ORG_IDENTIFIERS = "org_identifiers"; + + @SerializedName(SERIALIZED_NAME_ORG_IDENTIFIERS) + @javax.annotation.Nonnull + private List orgIdentifiers; + + public static final String SERIALIZED_NAME_SKIP_VALIDATION = "skip_validation"; + + @SerializedName(SERIALIZED_NAME_SKIP_VALIDATION) + @javax.annotation.Nullable + private Boolean skipValidation; + + public PublishMetadataRequest() {} + + public PublishMetadataRequest metadata( + @javax.annotation.Nonnull List metadata) { + this.metadata = metadata; + return this; + } + + public PublishMetadataRequest addMetadataItem(PublishMetadataListItem metadataItem) { + if (this.metadata == null) { + this.metadata = new ArrayList<>(); + } + this.metadata.add(metadataItem); + return this; + } + + /** + * Metadata objects to be published. + * + * @return metadata + */ + @javax.annotation.Nonnull + public List getMetadata() { + return metadata; + } + + public void setMetadata(@javax.annotation.Nonnull List metadata) { + this.metadata = metadata; + } + + public PublishMetadataRequest orgIdentifiers( + @javax.annotation.Nonnull List orgIdentifiers) { + this.orgIdentifiers = orgIdentifiers; + return this; + } + + public PublishMetadataRequest addOrgIdentifiersItem(String orgIdentifiersItem) { + if (this.orgIdentifiers == null) { + this.orgIdentifiers = new ArrayList<>(); + } + this.orgIdentifiers.add(orgIdentifiersItem); + return this; + } + + /** + * Unique ID or name of orgs to which metadata objects should be published. + * + * @return orgIdentifiers + */ + @javax.annotation.Nonnull + public List getOrgIdentifiers() { + return orgIdentifiers; + } + + public void setOrgIdentifiers(@javax.annotation.Nonnull List orgIdentifiers) { + this.orgIdentifiers = orgIdentifiers; + } + + public PublishMetadataRequest skipValidation( + @javax.annotation.Nullable Boolean skipValidation) { + this.skipValidation = skipValidation; + return this; + } + + /** + * Skip validations of objects to be published. + * + * @return skipValidation + */ + @javax.annotation.Nullable + public Boolean getSkipValidation() { + return skipValidation; + } + + public void setSkipValidation(@javax.annotation.Nullable Boolean skipValidation) { + this.skipValidation = skipValidation; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key name of the property + * @param value value of the property + * @return the PublishMetadataRequest instance itself + */ + public PublishMetadataRequest putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return a map of objects + */ + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key name of the property + * @return an object + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + PublishMetadataRequest publishMetadataRequest = (PublishMetadataRequest) o; + return Objects.equals(this.metadata, publishMetadataRequest.metadata) + && Objects.equals(this.orgIdentifiers, publishMetadataRequest.orgIdentifiers) + && Objects.equals(this.skipValidation, publishMetadataRequest.skipValidation) + && Objects.equals( + this.additionalProperties, publishMetadataRequest.additionalProperties); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b + || (a != null + && b != null + && a.isPresent() + && b.isPresent() + && Objects.deepEquals(a.get(), b.get())); + } + + @Override + public int hashCode() { + return Objects.hash(metadata, orgIdentifiers, skipValidation, additionalProperties); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; + } + return a.isPresent() ? Arrays.deepHashCode(new Object[] {a.get()}) : 31; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class PublishMetadataRequest {\n"); + sb.append(" metadata: ").append(toIndentedString(metadata)).append("\n"); + sb.append(" orgIdentifiers: ").append(toIndentedString(orgIdentifiers)).append("\n"); + sb.append(" skipValidation: ").append(toIndentedString(skipValidation)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first + * line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("metadata"); + openapiFields.add("org_identifiers"); + openapiFields.add("skip_validation"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + openapiRequiredFields.add("metadata"); + openapiRequiredFields.add("org_identifiers"); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to PublishMetadataRequest + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!PublishMetadataRequest.openapiRequiredFields + .isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException( + String.format( + "The required field(s) %s in PublishMetadataRequest is not found" + + " in the empty JSON string", + PublishMetadataRequest.openapiRequiredFields.toString())); + } + } + + // check to make sure all required properties/fields are present in the JSON string + for (String requiredField : PublishMetadataRequest.openapiRequiredFields) { + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException( + String.format( + "The required field `%s` is not found in the JSON string: %s", + requiredField, jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // ensure the json data is an array + if (!jsonObj.get("metadata").isJsonArray()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `metadata` to be an array in the JSON string but" + + " got `%s`", + jsonObj.get("metadata").toString())); + } + + JsonArray jsonArraymetadata = jsonObj.getAsJsonArray("metadata"); + // validate the required field `metadata` (array) + for (int i = 0; i < jsonArraymetadata.size(); i++) { + PublishMetadataListItem.validateJsonElement(jsonArraymetadata.get(i)); + } + ; + // ensure the required json array is present + if (jsonObj.get("org_identifiers") == null) { + throw new IllegalArgumentException( + "Expected the field `linkedContent` to be an array in the JSON string but got" + + " `null`"); + } else if (!jsonObj.get("org_identifiers").isJsonArray()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `org_identifiers` to be an array in the JSON" + + " string but got `%s`", + jsonObj.get("org_identifiers").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!PublishMetadataRequest.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'PublishMetadataRequest' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter = + gson.getDelegateAdapter(this, TypeToken.get(PublishMetadataRequest.class)); + + return (TypeAdapter) + new TypeAdapter() { + @Override + public void write(JsonWriter out, PublishMetadataRequest value) + throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + obj.remove("additionalProperties"); + // serialize additional properties + if (value.getAdditionalProperties() != null) { + for (Map.Entry entry : + value.getAdditionalProperties().entrySet()) { + if (entry.getValue() instanceof String) + obj.addProperty(entry.getKey(), (String) entry.getValue()); + else if (entry.getValue() instanceof Number) + obj.addProperty(entry.getKey(), (Number) entry.getValue()); + else if (entry.getValue() instanceof Boolean) + obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); + else if (entry.getValue() instanceof Character) + obj.addProperty( + entry.getKey(), (Character) entry.getValue()); + else { + JsonElement jsonElement = gson.toJsonTree(entry.getValue()); + if (jsonElement.isJsonArray()) { + obj.add(entry.getKey(), jsonElement.getAsJsonArray()); + } else { + obj.add(entry.getKey(), jsonElement.getAsJsonObject()); + } + } + } + } + elementAdapter.write(out, obj); + } + + @Override + public PublishMetadataRequest read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // store additional fields in the deserialized instance + PublishMetadataRequest instance = thisAdapter.fromJsonTree(jsonObj); + for (Map.Entry entry : jsonObj.entrySet()) { + if (!openapiFields.contains(entry.getKey())) { + if (entry.getValue().isJsonPrimitive()) { // primitive type + if (entry.getValue().getAsJsonPrimitive().isString()) + instance.putAdditionalProperty( + entry.getKey(), entry.getValue().getAsString()); + else if (entry.getValue().getAsJsonPrimitive().isNumber()) + instance.putAdditionalProperty( + entry.getKey(), entry.getValue().getAsNumber()); + else if (entry.getValue().getAsJsonPrimitive().isBoolean()) + instance.putAdditionalProperty( + entry.getKey(), + entry.getValue().getAsBoolean()); + else + throw new IllegalArgumentException( + String.format( + "The field `%s` has unknown primitive" + + " type. Value: %s", + entry.getKey(), + entry.getValue().toString())); + } else if (entry.getValue().isJsonArray()) { + instance.putAdditionalProperty( + entry.getKey(), + gson.fromJson(entry.getValue(), List.class)); + } else { // JSON object + instance.putAdditionalProperty( + entry.getKey(), + gson.fromJson(entry.getValue(), HashMap.class)); + } + } + } + return instance; + } + }.nullSafe(); + } + } + + /** + * Create an instance of PublishMetadataRequest given an JSON string + * + * @param jsonString JSON string + * @return An instance of PublishMetadataRequest + * @throws IOException if the JSON string is invalid with respect to PublishMetadataRequest + */ + public static PublishMetadataRequest fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, PublishMetadataRequest.class); + } + + /** + * Convert an instance of PublishMetadataRequest to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} diff --git a/sdks/java/src/main/java/com/thoughtspot/client/model/PutVariableValuesRequest.java b/sdks/java/src/main/java/com/thoughtspot/client/model/PutVariableValuesRequest.java new file mode 100644 index 000000000..33af3d3ed --- /dev/null +++ b/sdks/java/src/main/java/com/thoughtspot/client/model/PutVariableValuesRequest.java @@ -0,0 +1,423 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client.model; + +import com.google.gson.Gson; +import com.google.gson.JsonArray; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.TypeAdapter; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.reflect.TypeToken; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import com.thoughtspot.client.JSON; +import java.io.IOException; +import java.io.Serializable; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Objects; + +/** PutVariableValuesRequest */ +@javax.annotation.Generated( + value = "org.openapitools.codegen.languages.JavaClientCodegen", + comments = "Generator version: 7.12.0") +public class PutVariableValuesRequest implements Serializable { + private static final long serialVersionUID = 1L; + + /** Operation to perform */ + @JsonAdapter(OperationEnum.Adapter.class) + public enum OperationEnum { + ADD("ADD"), + + REMOVE("REMOVE"), + + REPLACE("REPLACE"), + + RESET("RESET"); + + private String value; + + OperationEnum(String value) { + this.value = value; + } + + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + public static OperationEnum fromValue(String value) { + for (OperationEnum b : OperationEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + + public static class Adapter extends TypeAdapter { + @Override + public void write(final JsonWriter jsonWriter, final OperationEnum enumeration) + throws IOException { + jsonWriter.value(enumeration.getValue()); + } + + @Override + public OperationEnum read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + return OperationEnum.fromValue(value); + } + } + + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + String value = jsonElement.getAsString(); + OperationEnum.fromValue(value); + } + } + + public static final String SERIALIZED_NAME_OPERATION = "operation"; + + @SerializedName(SERIALIZED_NAME_OPERATION) + @javax.annotation.Nullable + private OperationEnum operation; + + public static final String SERIALIZED_NAME_VARIABLE_ASSIGNMENT = "variable_assignment"; + + @SerializedName(SERIALIZED_NAME_VARIABLE_ASSIGNMENT) + @javax.annotation.Nonnull + private List variableAssignment; + + public PutVariableValuesRequest() {} + + public PutVariableValuesRequest operation(@javax.annotation.Nullable OperationEnum operation) { + this.operation = operation; + return this; + } + + /** + * Operation to perform + * + * @return operation + */ + @javax.annotation.Nullable + public OperationEnum getOperation() { + return operation; + } + + public void setOperation(@javax.annotation.Nullable OperationEnum operation) { + this.operation = operation; + } + + public PutVariableValuesRequest variableAssignment( + @javax.annotation.Nonnull List variableAssignment) { + this.variableAssignment = variableAssignment; + return this; + } + + public PutVariableValuesRequest addVariableAssignmentItem( + VariablePutAssignmentInput variableAssignmentItem) { + if (this.variableAssignment == null) { + this.variableAssignment = new ArrayList<>(); + } + this.variableAssignment.add(variableAssignmentItem); + return this; + } + + /** + * Variable assignments + * + * @return variableAssignment + */ + @javax.annotation.Nonnull + public List getVariableAssignment() { + return variableAssignment; + } + + public void setVariableAssignment( + @javax.annotation.Nonnull List variableAssignment) { + this.variableAssignment = variableAssignment; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key name of the property + * @param value value of the property + * @return the PutVariableValuesRequest instance itself + */ + public PutVariableValuesRequest putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return a map of objects + */ + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key name of the property + * @return an object + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + PutVariableValuesRequest putVariableValuesRequest = (PutVariableValuesRequest) o; + return Objects.equals(this.operation, putVariableValuesRequest.operation) + && Objects.equals( + this.variableAssignment, putVariableValuesRequest.variableAssignment) + && Objects.equals( + this.additionalProperties, putVariableValuesRequest.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(operation, variableAssignment, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class PutVariableValuesRequest {\n"); + sb.append(" operation: ").append(toIndentedString(operation)).append("\n"); + sb.append(" variableAssignment: ") + .append(toIndentedString(variableAssignment)) + .append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first + * line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("operation"); + openapiFields.add("variable_assignment"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + openapiRequiredFields.add("variable_assignment"); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to PutVariableValuesRequest + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!PutVariableValuesRequest.openapiRequiredFields + .isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException( + String.format( + "The required field(s) %s in PutVariableValuesRequest is not found" + + " in the empty JSON string", + PutVariableValuesRequest.openapiRequiredFields.toString())); + } + } + + // check to make sure all required properties/fields are present in the JSON string + for (String requiredField : PutVariableValuesRequest.openapiRequiredFields) { + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException( + String.format( + "The required field `%s` is not found in the JSON string: %s", + requiredField, jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if ((jsonObj.get("operation") != null && !jsonObj.get("operation").isJsonNull()) + && !jsonObj.get("operation").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `operation` to be a primitive type in the JSON" + + " string but got `%s`", + jsonObj.get("operation").toString())); + } + // validate the optional field `operation` + if (jsonObj.get("operation") != null && !jsonObj.get("operation").isJsonNull()) { + OperationEnum.validateJsonElement(jsonObj.get("operation")); + } + // ensure the json data is an array + if (!jsonObj.get("variable_assignment").isJsonArray()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `variable_assignment` to be an array in the JSON" + + " string but got `%s`", + jsonObj.get("variable_assignment").toString())); + } + + JsonArray jsonArrayvariableAssignment = jsonObj.getAsJsonArray("variable_assignment"); + // validate the required field `variable_assignment` (array) + for (int i = 0; i < jsonArrayvariableAssignment.size(); i++) { + VariablePutAssignmentInput.validateJsonElement(jsonArrayvariableAssignment.get(i)); + } + ; + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!PutVariableValuesRequest.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'PutVariableValuesRequest' and its + // subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter = + gson.getDelegateAdapter(this, TypeToken.get(PutVariableValuesRequest.class)); + + return (TypeAdapter) + new TypeAdapter() { + @Override + public void write(JsonWriter out, PutVariableValuesRequest value) + throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + obj.remove("additionalProperties"); + // serialize additional properties + if (value.getAdditionalProperties() != null) { + for (Map.Entry entry : + value.getAdditionalProperties().entrySet()) { + if (entry.getValue() instanceof String) + obj.addProperty(entry.getKey(), (String) entry.getValue()); + else if (entry.getValue() instanceof Number) + obj.addProperty(entry.getKey(), (Number) entry.getValue()); + else if (entry.getValue() instanceof Boolean) + obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); + else if (entry.getValue() instanceof Character) + obj.addProperty( + entry.getKey(), (Character) entry.getValue()); + else { + JsonElement jsonElement = gson.toJsonTree(entry.getValue()); + if (jsonElement.isJsonArray()) { + obj.add(entry.getKey(), jsonElement.getAsJsonArray()); + } else { + obj.add(entry.getKey(), jsonElement.getAsJsonObject()); + } + } + } + } + elementAdapter.write(out, obj); + } + + @Override + public PutVariableValuesRequest read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // store additional fields in the deserialized instance + PutVariableValuesRequest instance = thisAdapter.fromJsonTree(jsonObj); + for (Map.Entry entry : jsonObj.entrySet()) { + if (!openapiFields.contains(entry.getKey())) { + if (entry.getValue().isJsonPrimitive()) { // primitive type + if (entry.getValue().getAsJsonPrimitive().isString()) + instance.putAdditionalProperty( + entry.getKey(), entry.getValue().getAsString()); + else if (entry.getValue().getAsJsonPrimitive().isNumber()) + instance.putAdditionalProperty( + entry.getKey(), entry.getValue().getAsNumber()); + else if (entry.getValue().getAsJsonPrimitive().isBoolean()) + instance.putAdditionalProperty( + entry.getKey(), + entry.getValue().getAsBoolean()); + else + throw new IllegalArgumentException( + String.format( + "The field `%s` has unknown primitive" + + " type. Value: %s", + entry.getKey(), + entry.getValue().toString())); + } else if (entry.getValue().isJsonArray()) { + instance.putAdditionalProperty( + entry.getKey(), + gson.fromJson(entry.getValue(), List.class)); + } else { // JSON object + instance.putAdditionalProperty( + entry.getKey(), + gson.fromJson(entry.getValue(), HashMap.class)); + } + } + } + return instance; + } + }.nullSafe(); + } + } + + /** + * Create an instance of PutVariableValuesRequest given an JSON string + * + * @param jsonString JSON string + * @return An instance of PutVariableValuesRequest + * @throws IOException if the JSON string is invalid with respect to PutVariableValuesRequest + */ + public static PutVariableValuesRequest fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, PutVariableValuesRequest.class); + } + + /** + * Convert an instance of PutVariableValuesRequest to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} diff --git a/sdks/java/src/main/java/com/thoughtspot/client/model/QueryGetDecomposedQueryRequest.java b/sdks/java/src/main/java/com/thoughtspot/client/model/QueryGetDecomposedQueryRequest.java new file mode 100644 index 000000000..b6b6e39bf --- /dev/null +++ b/sdks/java/src/main/java/com/thoughtspot/client/model/QueryGetDecomposedQueryRequest.java @@ -0,0 +1,566 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client.model; + +import com.google.gson.Gson; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.TypeAdapter; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.annotations.SerializedName; +import com.google.gson.reflect.TypeToken; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import com.thoughtspot.client.JSON; +import java.io.IOException; +import java.io.Serializable; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Objects; + +/** QueryGetDecomposedQueryRequest */ +@javax.annotation.Generated( + value = "org.openapitools.codegen.languages.JavaClientCodegen", + comments = "Generator version: 7.12.0") +public class QueryGetDecomposedQueryRequest implements Serializable { + private static final long serialVersionUID = 1L; + + public static final String SERIALIZED_NAME_ANSWER_IDS = "answerIds"; + + @SerializedName(SERIALIZED_NAME_ANSWER_IDS) + @javax.annotation.Nullable + private List answerIds; + + public static final String SERIALIZED_NAME_CONTENT = "content"; + + @SerializedName(SERIALIZED_NAME_CONTENT) + @javax.annotation.Nullable + private List content; + + public static final String SERIALIZED_NAME_CONVERSATION_ID = "conversationId"; + + @SerializedName(SERIALIZED_NAME_CONVERSATION_ID) + @javax.annotation.Nullable + private String conversationId; + + public static final String SERIALIZED_NAME_LIVEBOARD_IDS = "liveboardIds"; + + @SerializedName(SERIALIZED_NAME_LIVEBOARD_IDS) + @javax.annotation.Nullable + private List liveboardIds; + + public static final String SERIALIZED_NAME_MAX_DECOMPOSED_QUERIES = "maxDecomposedQueries"; + + @SerializedName(SERIALIZED_NAME_MAX_DECOMPOSED_QUERIES) + @javax.annotation.Nullable + private Integer maxDecomposedQueries; + + public static final String SERIALIZED_NAME_NLS_REQUEST = "nlsRequest"; + + @SerializedName(SERIALIZED_NAME_NLS_REQUEST) + @javax.annotation.Nullable + private InputEurekaNLSRequest nlsRequest; + + public static final String SERIALIZED_NAME_WORKSHEET_IDS = "worksheetIds"; + + @SerializedName(SERIALIZED_NAME_WORKSHEET_IDS) + @javax.annotation.Nullable + private List worksheetIds; + + public QueryGetDecomposedQueryRequest() {} + + public QueryGetDecomposedQueryRequest answerIds( + @javax.annotation.Nullable List answerIds) { + this.answerIds = answerIds; + return this; + } + + public QueryGetDecomposedQueryRequest addAnswerIdsItem(String answerIdsItem) { + if (this.answerIds == null) { + this.answerIds = new ArrayList<>(); + } + this.answerIds.add(answerIdsItem); + return this; + } + + /** + * List of answer unique identifiers (GUIDs) whose data will be used to guide the response. + * + * @return answerIds + */ + @javax.annotation.Nullable + public List getAnswerIds() { + return answerIds; + } + + public void setAnswerIds(@javax.annotation.Nullable List answerIds) { + this.answerIds = answerIds; + } + + public QueryGetDecomposedQueryRequest content(@javax.annotation.Nullable List content) { + this.content = content; + return this; + } + + public QueryGetDecomposedQueryRequest addContentItem(String contentItem) { + if (this.content == null) { + this.content = new ArrayList<>(); + } + this.content.add(contentItem); + return this; + } + + /** + * User provided content like text data, csv data as a string message to provide context & + * potentially improve the quality of the response. + * + * @return content + */ + @javax.annotation.Nullable + public List getContent() { + return content; + } + + public void setContent(@javax.annotation.Nullable List content) { + this.content = content; + } + + public QueryGetDecomposedQueryRequest conversationId( + @javax.annotation.Nullable String conversationId) { + this.conversationId = conversationId; + return this; + } + + /** + * Unique identifier to denote current conversation. + * + * @return conversationId + */ + @javax.annotation.Nullable + public String getConversationId() { + return conversationId; + } + + public void setConversationId(@javax.annotation.Nullable String conversationId) { + this.conversationId = conversationId; + } + + public QueryGetDecomposedQueryRequest liveboardIds( + @javax.annotation.Nullable List liveboardIds) { + this.liveboardIds = liveboardIds; + return this; + } + + public QueryGetDecomposedQueryRequest addLiveboardIdsItem(String liveboardIdsItem) { + if (this.liveboardIds == null) { + this.liveboardIds = new ArrayList<>(); + } + this.liveboardIds.add(liveboardIdsItem); + return this; + } + + /** + * List of liveboard unique identifiers (GUIDs) whose data will be used to guide the response. + * + * @return liveboardIds + */ + @javax.annotation.Nullable + public List getLiveboardIds() { + return liveboardIds; + } + + public void setLiveboardIds(@javax.annotation.Nullable List liveboardIds) { + this.liveboardIds = liveboardIds; + } + + public QueryGetDecomposedQueryRequest maxDecomposedQueries( + @javax.annotation.Nullable Integer maxDecomposedQueries) { + this.maxDecomposedQueries = maxDecomposedQueries; + return this; + } + + /** + * Maximum number of decomposed queries that is allowed in the response, default = 5. + * + * @return maxDecomposedQueries + */ + @javax.annotation.Nullable + public Integer getMaxDecomposedQueries() { + return maxDecomposedQueries; + } + + public void setMaxDecomposedQueries(@javax.annotation.Nullable Integer maxDecomposedQueries) { + this.maxDecomposedQueries = maxDecomposedQueries; + } + + public QueryGetDecomposedQueryRequest nlsRequest( + @javax.annotation.Nullable InputEurekaNLSRequest nlsRequest) { + this.nlsRequest = nlsRequest; + return this; + } + + /** + * NLSRequest object containing user query & instructions. + * + * @return nlsRequest + */ + @javax.annotation.Nullable + public InputEurekaNLSRequest getNlsRequest() { + return nlsRequest; + } + + public void setNlsRequest(@javax.annotation.Nullable InputEurekaNLSRequest nlsRequest) { + this.nlsRequest = nlsRequest; + } + + public QueryGetDecomposedQueryRequest worksheetIds( + @javax.annotation.Nullable List worksheetIds) { + this.worksheetIds = worksheetIds; + return this; + } + + public QueryGetDecomposedQueryRequest addWorksheetIdsItem(String worksheetIdsItem) { + if (this.worksheetIds == null) { + this.worksheetIds = new ArrayList<>(); + } + this.worksheetIds.add(worksheetIdsItem); + return this; + } + + /** + * List of worksheetIds to provide context for decomposing user query into analytical queries + * that can be run on them. + * + * @return worksheetIds + */ + @javax.annotation.Nullable + public List getWorksheetIds() { + return worksheetIds; + } + + public void setWorksheetIds(@javax.annotation.Nullable List worksheetIds) { + this.worksheetIds = worksheetIds; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key name of the property + * @param value value of the property + * @return the QueryGetDecomposedQueryRequest instance itself + */ + public QueryGetDecomposedQueryRequest putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return a map of objects + */ + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key name of the property + * @return an object + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + QueryGetDecomposedQueryRequest queryGetDecomposedQueryRequest = + (QueryGetDecomposedQueryRequest) o; + return Objects.equals(this.answerIds, queryGetDecomposedQueryRequest.answerIds) + && Objects.equals(this.content, queryGetDecomposedQueryRequest.content) + && Objects.equals( + this.conversationId, queryGetDecomposedQueryRequest.conversationId) + && Objects.equals(this.liveboardIds, queryGetDecomposedQueryRequest.liveboardIds) + && Objects.equals( + this.maxDecomposedQueries, + queryGetDecomposedQueryRequest.maxDecomposedQueries) + && Objects.equals(this.nlsRequest, queryGetDecomposedQueryRequest.nlsRequest) + && Objects.equals(this.worksheetIds, queryGetDecomposedQueryRequest.worksheetIds) + && Objects.equals( + this.additionalProperties, + queryGetDecomposedQueryRequest.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash( + answerIds, + content, + conversationId, + liveboardIds, + maxDecomposedQueries, + nlsRequest, + worksheetIds, + additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class QueryGetDecomposedQueryRequest {\n"); + sb.append(" answerIds: ").append(toIndentedString(answerIds)).append("\n"); + sb.append(" content: ").append(toIndentedString(content)).append("\n"); + sb.append(" conversationId: ").append(toIndentedString(conversationId)).append("\n"); + sb.append(" liveboardIds: ").append(toIndentedString(liveboardIds)).append("\n"); + sb.append(" maxDecomposedQueries: ") + .append(toIndentedString(maxDecomposedQueries)) + .append("\n"); + sb.append(" nlsRequest: ").append(toIndentedString(nlsRequest)).append("\n"); + sb.append(" worksheetIds: ").append(toIndentedString(worksheetIds)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first + * line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("answerIds"); + openapiFields.add("content"); + openapiFields.add("conversationId"); + openapiFields.add("liveboardIds"); + openapiFields.add("maxDecomposedQueries"); + openapiFields.add("nlsRequest"); + openapiFields.add("worksheetIds"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to + * QueryGetDecomposedQueryRequest + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!QueryGetDecomposedQueryRequest.openapiRequiredFields + .isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException( + String.format( + "The required field(s) %s in QueryGetDecomposedQueryRequest is not" + + " found in the empty JSON string", + QueryGetDecomposedQueryRequest.openapiRequiredFields.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // ensure the optional json data is an array if present + if (jsonObj.get("answerIds") != null + && !jsonObj.get("answerIds").isJsonNull() + && !jsonObj.get("answerIds").isJsonArray()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `answerIds` to be an array in the JSON string but" + + " got `%s`", + jsonObj.get("answerIds").toString())); + } + // ensure the optional json data is an array if present + if (jsonObj.get("content") != null + && !jsonObj.get("content").isJsonNull() + && !jsonObj.get("content").isJsonArray()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `content` to be an array in the JSON string but" + + " got `%s`", + jsonObj.get("content").toString())); + } + if ((jsonObj.get("conversationId") != null && !jsonObj.get("conversationId").isJsonNull()) + && !jsonObj.get("conversationId").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `conversationId` to be a primitive type in the" + + " JSON string but got `%s`", + jsonObj.get("conversationId").toString())); + } + // ensure the optional json data is an array if present + if (jsonObj.get("liveboardIds") != null + && !jsonObj.get("liveboardIds").isJsonNull() + && !jsonObj.get("liveboardIds").isJsonArray()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `liveboardIds` to be an array in the JSON string" + + " but got `%s`", + jsonObj.get("liveboardIds").toString())); + } + // validate the optional field `nlsRequest` + if (jsonObj.get("nlsRequest") != null && !jsonObj.get("nlsRequest").isJsonNull()) { + InputEurekaNLSRequest.validateJsonElement(jsonObj.get("nlsRequest")); + } + // ensure the optional json data is an array if present + if (jsonObj.get("worksheetIds") != null + && !jsonObj.get("worksheetIds").isJsonNull() + && !jsonObj.get("worksheetIds").isJsonArray()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `worksheetIds` to be an array in the JSON string" + + " but got `%s`", + jsonObj.get("worksheetIds").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!QueryGetDecomposedQueryRequest.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'QueryGetDecomposedQueryRequest' and its + // subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter = + gson.getDelegateAdapter( + this, TypeToken.get(QueryGetDecomposedQueryRequest.class)); + + return (TypeAdapter) + new TypeAdapter() { + @Override + public void write(JsonWriter out, QueryGetDecomposedQueryRequest value) + throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + obj.remove("additionalProperties"); + // serialize additional properties + if (value.getAdditionalProperties() != null) { + for (Map.Entry entry : + value.getAdditionalProperties().entrySet()) { + if (entry.getValue() instanceof String) + obj.addProperty(entry.getKey(), (String) entry.getValue()); + else if (entry.getValue() instanceof Number) + obj.addProperty(entry.getKey(), (Number) entry.getValue()); + else if (entry.getValue() instanceof Boolean) + obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); + else if (entry.getValue() instanceof Character) + obj.addProperty( + entry.getKey(), (Character) entry.getValue()); + else { + JsonElement jsonElement = gson.toJsonTree(entry.getValue()); + if (jsonElement.isJsonArray()) { + obj.add(entry.getKey(), jsonElement.getAsJsonArray()); + } else { + obj.add(entry.getKey(), jsonElement.getAsJsonObject()); + } + } + } + } + elementAdapter.write(out, obj); + } + + @Override + public QueryGetDecomposedQueryRequest read(JsonReader in) + throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // store additional fields in the deserialized instance + QueryGetDecomposedQueryRequest instance = + thisAdapter.fromJsonTree(jsonObj); + for (Map.Entry entry : jsonObj.entrySet()) { + if (!openapiFields.contains(entry.getKey())) { + if (entry.getValue().isJsonPrimitive()) { // primitive type + if (entry.getValue().getAsJsonPrimitive().isString()) + instance.putAdditionalProperty( + entry.getKey(), entry.getValue().getAsString()); + else if (entry.getValue().getAsJsonPrimitive().isNumber()) + instance.putAdditionalProperty( + entry.getKey(), entry.getValue().getAsNumber()); + else if (entry.getValue().getAsJsonPrimitive().isBoolean()) + instance.putAdditionalProperty( + entry.getKey(), + entry.getValue().getAsBoolean()); + else + throw new IllegalArgumentException( + String.format( + "The field `%s` has unknown primitive" + + " type. Value: %s", + entry.getKey(), + entry.getValue().toString())); + } else if (entry.getValue().isJsonArray()) { + instance.putAdditionalProperty( + entry.getKey(), + gson.fromJson(entry.getValue(), List.class)); + } else { // JSON object + instance.putAdditionalProperty( + entry.getKey(), + gson.fromJson(entry.getValue(), HashMap.class)); + } + } + } + return instance; + } + }.nullSafe(); + } + } + + /** + * Create an instance of QueryGetDecomposedQueryRequest given an JSON string + * + * @param jsonString JSON string + * @return An instance of QueryGetDecomposedQueryRequest + * @throws IOException if the JSON string is invalid with respect to + * QueryGetDecomposedQueryRequest + */ + public static QueryGetDecomposedQueryRequest fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, QueryGetDecomposedQueryRequest.class); + } + + /** + * Convert an instance of QueryGetDecomposedQueryRequest to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} diff --git a/sdks/java/src/main/java/com/thoughtspot/client/model/RecipientDetails.java b/sdks/java/src/main/java/com/thoughtspot/client/model/RecipientDetails.java new file mode 100644 index 000000000..86c93df22 --- /dev/null +++ b/sdks/java/src/main/java/com/thoughtspot/client/model/RecipientDetails.java @@ -0,0 +1,377 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client.model; + +import com.google.gson.Gson; +import com.google.gson.JsonArray; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.TypeAdapter; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.annotations.SerializedName; +import com.google.gson.reflect.TypeToken; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import com.thoughtspot.client.JSON; +import java.io.IOException; +import java.io.Serializable; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Objects; +import org.openapitools.jackson.nullable.JsonNullable; + +/** Recipient configuration which includes email address, ID or name of the users and groups. */ +@javax.annotation.Generated( + value = "org.openapitools.codegen.languages.JavaClientCodegen", + comments = "Generator version: 7.12.0") +public class RecipientDetails implements Serializable { + private static final long serialVersionUID = 1L; + + public static final String SERIALIZED_NAME_EMAILS = "emails"; + + @SerializedName(SERIALIZED_NAME_EMAILS) + @javax.annotation.Nullable + private List emails; + + public static final String SERIALIZED_NAME_PRINCIPALS = "principals"; + + @SerializedName(SERIALIZED_NAME_PRINCIPALS) + @javax.annotation.Nullable + private List principals; + + public RecipientDetails() {} + + public RecipientDetails emails(@javax.annotation.Nullable List emails) { + this.emails = emails; + return this; + } + + public RecipientDetails addEmailsItem(String emailsItem) { + if (this.emails == null) { + this.emails = new ArrayList<>(); + } + this.emails.add(emailsItem); + return this; + } + + /** + * Emails of the recipients. Specify email address if the recipient is not a ThoughtSpot user. + * + * @return emails + */ + @javax.annotation.Nullable + public List getEmails() { + return emails; + } + + public void setEmails(@javax.annotation.Nullable List emails) { + this.emails = emails; + } + + public RecipientDetails principals( + @javax.annotation.Nullable List principals) { + this.principals = principals; + return this; + } + + public RecipientDetails addPrincipalsItem(PrincipalsListItem principalsItem) { + if (this.principals == null) { + this.principals = new ArrayList<>(); + } + this.principals.add(principalsItem); + return this; + } + + /** + * List of user or groups to subscribe for the scheduled job notifications. + * + * @return principals + */ + @javax.annotation.Nullable + public List getPrincipals() { + return principals; + } + + public void setPrincipals(@javax.annotation.Nullable List principals) { + this.principals = principals; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key name of the property + * @param value value of the property + * @return the RecipientDetails instance itself + */ + public RecipientDetails putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return a map of objects + */ + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key name of the property + * @return an object + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + RecipientDetails recipientDetails = (RecipientDetails) o; + return Objects.equals(this.emails, recipientDetails.emails) + && Objects.equals(this.principals, recipientDetails.principals) + && Objects.equals(this.additionalProperties, recipientDetails.additionalProperties); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b + || (a != null + && b != null + && a.isPresent() + && b.isPresent() + && Objects.deepEquals(a.get(), b.get())); + } + + @Override + public int hashCode() { + return Objects.hash(emails, principals, additionalProperties); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; + } + return a.isPresent() ? Arrays.deepHashCode(new Object[] {a.get()}) : 31; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class RecipientDetails {\n"); + sb.append(" emails: ").append(toIndentedString(emails)).append("\n"); + sb.append(" principals: ").append(toIndentedString(principals)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first + * line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("emails"); + openapiFields.add("principals"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to RecipientDetails + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!RecipientDetails.openapiRequiredFields + .isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException( + String.format( + "The required field(s) %s in RecipientDetails is not found in the" + + " empty JSON string", + RecipientDetails.openapiRequiredFields.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // ensure the optional json data is an array if present + if (jsonObj.get("emails") != null + && !jsonObj.get("emails").isJsonNull() + && !jsonObj.get("emails").isJsonArray()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `emails` to be an array in the JSON string but got" + + " `%s`", + jsonObj.get("emails").toString())); + } + if (jsonObj.get("principals") != null && !jsonObj.get("principals").isJsonNull()) { + JsonArray jsonArrayprincipals = jsonObj.getAsJsonArray("principals"); + if (jsonArrayprincipals != null) { + // ensure the json data is an array + if (!jsonObj.get("principals").isJsonArray()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `principals` to be an array in the JSON" + + " string but got `%s`", + jsonObj.get("principals").toString())); + } + + // validate the optional field `principals` (array) + for (int i = 0; i < jsonArrayprincipals.size(); i++) { + PrincipalsListItem.validateJsonElement(jsonArrayprincipals.get(i)); + } + ; + } + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!RecipientDetails.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'RecipientDetails' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter = + gson.getDelegateAdapter(this, TypeToken.get(RecipientDetails.class)); + + return (TypeAdapter) + new TypeAdapter() { + @Override + public void write(JsonWriter out, RecipientDetails value) + throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + obj.remove("additionalProperties"); + // serialize additional properties + if (value.getAdditionalProperties() != null) { + for (Map.Entry entry : + value.getAdditionalProperties().entrySet()) { + if (entry.getValue() instanceof String) + obj.addProperty(entry.getKey(), (String) entry.getValue()); + else if (entry.getValue() instanceof Number) + obj.addProperty(entry.getKey(), (Number) entry.getValue()); + else if (entry.getValue() instanceof Boolean) + obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); + else if (entry.getValue() instanceof Character) + obj.addProperty( + entry.getKey(), (Character) entry.getValue()); + else { + JsonElement jsonElement = gson.toJsonTree(entry.getValue()); + if (jsonElement.isJsonArray()) { + obj.add(entry.getKey(), jsonElement.getAsJsonArray()); + } else { + obj.add(entry.getKey(), jsonElement.getAsJsonObject()); + } + } + } + } + elementAdapter.write(out, obj); + } + + @Override + public RecipientDetails read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // store additional fields in the deserialized instance + RecipientDetails instance = thisAdapter.fromJsonTree(jsonObj); + for (Map.Entry entry : jsonObj.entrySet()) { + if (!openapiFields.contains(entry.getKey())) { + if (entry.getValue().isJsonPrimitive()) { // primitive type + if (entry.getValue().getAsJsonPrimitive().isString()) + instance.putAdditionalProperty( + entry.getKey(), entry.getValue().getAsString()); + else if (entry.getValue().getAsJsonPrimitive().isNumber()) + instance.putAdditionalProperty( + entry.getKey(), entry.getValue().getAsNumber()); + else if (entry.getValue().getAsJsonPrimitive().isBoolean()) + instance.putAdditionalProperty( + entry.getKey(), + entry.getValue().getAsBoolean()); + else + throw new IllegalArgumentException( + String.format( + "The field `%s` has unknown primitive" + + " type. Value: %s", + entry.getKey(), + entry.getValue().toString())); + } else if (entry.getValue().isJsonArray()) { + instance.putAdditionalProperty( + entry.getKey(), + gson.fromJson(entry.getValue(), List.class)); + } else { // JSON object + instance.putAdditionalProperty( + entry.getKey(), + gson.fromJson(entry.getValue(), HashMap.class)); + } + } + } + return instance; + } + }.nullSafe(); + } + } + + /** + * Create an instance of RecipientDetails given an JSON string + * + * @param jsonString JSON string + * @return An instance of RecipientDetails + * @throws IOException if the JSON string is invalid with respect to RecipientDetails + */ + public static RecipientDetails fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, RecipientDetails.class); + } + + /** + * Convert an instance of RecipientDetails to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} diff --git a/sdks/java/src/main/java/com/thoughtspot/client/model/RecipientDetailsInput.java b/sdks/java/src/main/java/com/thoughtspot/client/model/RecipientDetailsInput.java new file mode 100644 index 000000000..590b27939 --- /dev/null +++ b/sdks/java/src/main/java/com/thoughtspot/client/model/RecipientDetailsInput.java @@ -0,0 +1,378 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client.model; + +import com.google.gson.Gson; +import com.google.gson.JsonArray; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.TypeAdapter; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.annotations.SerializedName; +import com.google.gson.reflect.TypeToken; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import com.thoughtspot.client.JSON; +import java.io.IOException; +import java.io.Serializable; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Objects; +import org.openapitools.jackson.nullable.JsonNullable; + +/** Recipients of the scheduled job notification. */ +@javax.annotation.Generated( + value = "org.openapitools.codegen.languages.JavaClientCodegen", + comments = "Generator version: 7.12.0") +public class RecipientDetailsInput implements Serializable { + private static final long serialVersionUID = 1L; + + public static final String SERIALIZED_NAME_EMAILS = "emails"; + + @SerializedName(SERIALIZED_NAME_EMAILS) + @javax.annotation.Nullable + private List emails; + + public static final String SERIALIZED_NAME_PRINCIPALS = "principals"; + + @SerializedName(SERIALIZED_NAME_PRINCIPALS) + @javax.annotation.Nullable + private List principals; + + public RecipientDetailsInput() {} + + public RecipientDetailsInput emails(@javax.annotation.Nullable List emails) { + this.emails = emails; + return this; + } + + public RecipientDetailsInput addEmailsItem(String emailsItem) { + if (this.emails == null) { + this.emails = new ArrayList<>(); + } + this.emails.add(emailsItem); + return this; + } + + /** + * Emails of the recipients. + * + * @return emails + */ + @javax.annotation.Nullable + public List getEmails() { + return emails; + } + + public void setEmails(@javax.annotation.Nullable List emails) { + this.emails = emails; + } + + public RecipientDetailsInput principals( + @javax.annotation.Nullable List principals) { + this.principals = principals; + return this; + } + + public RecipientDetailsInput addPrincipalsItem(PrincipalsListItemInput principalsItem) { + if (this.principals == null) { + this.principals = new ArrayList<>(); + } + this.principals.add(principalsItem); + return this; + } + + /** + * User or groups to be set as recipients of the schedule notifications. + * + * @return principals + */ + @javax.annotation.Nullable + public List getPrincipals() { + return principals; + } + + public void setPrincipals(@javax.annotation.Nullable List principals) { + this.principals = principals; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key name of the property + * @param value value of the property + * @return the RecipientDetailsInput instance itself + */ + public RecipientDetailsInput putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return a map of objects + */ + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key name of the property + * @return an object + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + RecipientDetailsInput recipientDetailsInput = (RecipientDetailsInput) o; + return Objects.equals(this.emails, recipientDetailsInput.emails) + && Objects.equals(this.principals, recipientDetailsInput.principals) + && Objects.equals( + this.additionalProperties, recipientDetailsInput.additionalProperties); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b + || (a != null + && b != null + && a.isPresent() + && b.isPresent() + && Objects.deepEquals(a.get(), b.get())); + } + + @Override + public int hashCode() { + return Objects.hash(emails, principals, additionalProperties); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; + } + return a.isPresent() ? Arrays.deepHashCode(new Object[] {a.get()}) : 31; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class RecipientDetailsInput {\n"); + sb.append(" emails: ").append(toIndentedString(emails)).append("\n"); + sb.append(" principals: ").append(toIndentedString(principals)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first + * line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("emails"); + openapiFields.add("principals"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to RecipientDetailsInput + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!RecipientDetailsInput.openapiRequiredFields + .isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException( + String.format( + "The required field(s) %s in RecipientDetailsInput is not found in" + + " the empty JSON string", + RecipientDetailsInput.openapiRequiredFields.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // ensure the optional json data is an array if present + if (jsonObj.get("emails") != null + && !jsonObj.get("emails").isJsonNull() + && !jsonObj.get("emails").isJsonArray()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `emails` to be an array in the JSON string but got" + + " `%s`", + jsonObj.get("emails").toString())); + } + if (jsonObj.get("principals") != null && !jsonObj.get("principals").isJsonNull()) { + JsonArray jsonArrayprincipals = jsonObj.getAsJsonArray("principals"); + if (jsonArrayprincipals != null) { + // ensure the json data is an array + if (!jsonObj.get("principals").isJsonArray()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `principals` to be an array in the JSON" + + " string but got `%s`", + jsonObj.get("principals").toString())); + } + + // validate the optional field `principals` (array) + for (int i = 0; i < jsonArrayprincipals.size(); i++) { + PrincipalsListItemInput.validateJsonElement(jsonArrayprincipals.get(i)); + } + ; + } + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!RecipientDetailsInput.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'RecipientDetailsInput' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter = + gson.getDelegateAdapter(this, TypeToken.get(RecipientDetailsInput.class)); + + return (TypeAdapter) + new TypeAdapter() { + @Override + public void write(JsonWriter out, RecipientDetailsInput value) + throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + obj.remove("additionalProperties"); + // serialize additional properties + if (value.getAdditionalProperties() != null) { + for (Map.Entry entry : + value.getAdditionalProperties().entrySet()) { + if (entry.getValue() instanceof String) + obj.addProperty(entry.getKey(), (String) entry.getValue()); + else if (entry.getValue() instanceof Number) + obj.addProperty(entry.getKey(), (Number) entry.getValue()); + else if (entry.getValue() instanceof Boolean) + obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); + else if (entry.getValue() instanceof Character) + obj.addProperty( + entry.getKey(), (Character) entry.getValue()); + else { + JsonElement jsonElement = gson.toJsonTree(entry.getValue()); + if (jsonElement.isJsonArray()) { + obj.add(entry.getKey(), jsonElement.getAsJsonArray()); + } else { + obj.add(entry.getKey(), jsonElement.getAsJsonObject()); + } + } + } + } + elementAdapter.write(out, obj); + } + + @Override + public RecipientDetailsInput read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // store additional fields in the deserialized instance + RecipientDetailsInput instance = thisAdapter.fromJsonTree(jsonObj); + for (Map.Entry entry : jsonObj.entrySet()) { + if (!openapiFields.contains(entry.getKey())) { + if (entry.getValue().isJsonPrimitive()) { // primitive type + if (entry.getValue().getAsJsonPrimitive().isString()) + instance.putAdditionalProperty( + entry.getKey(), entry.getValue().getAsString()); + else if (entry.getValue().getAsJsonPrimitive().isNumber()) + instance.putAdditionalProperty( + entry.getKey(), entry.getValue().getAsNumber()); + else if (entry.getValue().getAsJsonPrimitive().isBoolean()) + instance.putAdditionalProperty( + entry.getKey(), + entry.getValue().getAsBoolean()); + else + throw new IllegalArgumentException( + String.format( + "The field `%s` has unknown primitive" + + " type. Value: %s", + entry.getKey(), + entry.getValue().toString())); + } else if (entry.getValue().isJsonArray()) { + instance.putAdditionalProperty( + entry.getKey(), + gson.fromJson(entry.getValue(), List.class)); + } else { // JSON object + instance.putAdditionalProperty( + entry.getKey(), + gson.fromJson(entry.getValue(), HashMap.class)); + } + } + } + return instance; + } + }.nullSafe(); + } + } + + /** + * Create an instance of RecipientDetailsInput given an JSON string + * + * @param jsonString JSON string + * @return An instance of RecipientDetailsInput + * @throws IOException if the JSON string is invalid with respect to RecipientDetailsInput + */ + public static RecipientDetailsInput fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, RecipientDetailsInput.class); + } + + /** + * Convert an instance of RecipientDetailsInput to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} diff --git a/sdks/java/src/main/java/com/thoughtspot/client/model/RegionalSettingsInput.java b/sdks/java/src/main/java/com/thoughtspot/client/model/RegionalSettingsInput.java new file mode 100644 index 000000000..5a29e5592 --- /dev/null +++ b/sdks/java/src/main/java/com/thoughtspot/client/model/RegionalSettingsInput.java @@ -0,0 +1,1270 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client.model; + +import com.google.gson.Gson; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.TypeAdapter; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.reflect.TypeToken; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import com.thoughtspot.client.JSON; +import java.io.IOException; +import java.io.Serializable; +import java.util.Arrays; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Objects; +import org.openapitools.jackson.nullable.JsonNullable; + +/** RegionalSettingsInput */ +@javax.annotation.Generated( + value = "org.openapitools.codegen.languages.JavaClientCodegen", + comments = "Generator version: 7.12.0") +public class RegionalSettingsInput implements Serializable { + private static final long serialVersionUID = 1L; + + /** ISO code to be appended with currency values. */ + @JsonAdapter(CurrencyFormatEnum.Adapter.class) + public enum CurrencyFormatEnum { + ADP("ADP"), + + AED("AED"), + + AFN("AFN"), + + ALL("ALL"), + + AMD("AMD"), + + ANG("ANG"), + + AOA("AOA"), + + ARA("ARA"), + + ARS("ARS"), + + ATS("ATS"), + + AUD("AUD"), + + AWG("AWG"), + + AZN("AZN"), + + BAM("BAM"), + + BBD("BBD"), + + BDT("BDT"), + + BEF("BEF"), + + BGL("BGL"), + + BGM("BGM"), + + BGN("BGN"), + + BHD("BHD"), + + BIF("BIF"), + + BMD("BMD"), + + BND("BND"), + + BOB("BOB"), + + BOP("BOP"), + + BOV("BOV"), + + BRL("BRL"), + + BSD("BSD"), + + BTN("BTN"), + + BUK("BUK"), + + BWP("BWP"), + + BYN("BYN"), + + BZD("BZD"), + + CAD("CAD"), + + CDF("CDF"), + + CHE("CHE"), + + CHF("CHF"), + + CHW("CHW"), + + CLE("CLE"), + + CLP("CLP"), + + CNX("CNX"), + + CNY("CNY"), + + COP("COP"), + + COU("COU"), + + CRC("CRC"), + + CSK("CSK"), + + CUC("CUC"), + + CUP("CUP"), + + CVE("CVE"), + + CYP("CYP"), + + CZK("CZK"), + + DDM("DDM"), + + DEM("DEM"), + + DJF("DJF"), + + DKK("DKK"), + + DOP("DOP"), + + DZD("DZD"), + + ECS("ECS"), + + ECV("ECV"), + + EEK("EEK"), + + EGP("EGP"), + + ERN("ERN"), + + ESP("ESP"), + + ETB("ETB"), + + EUR("EUR"), + + FIM("FIM"), + + FJD("FJD"), + + FKP("FKP"), + + FRF("FRF"), + + GBP("GBP"), + + GEK("GEK"), + + GEL("GEL"), + + GHS("GHS"), + + GIP("GIP"), + + GMD("GMD"), + + GNF("GNF"), + + GNS("GNS"), + + GQE("GQE"), + + GRD("GRD"), + + GTQ("GTQ"), + + GWE("GWE"), + + GWP("GWP"), + + GYD("GYD"), + + HKD("HKD"), + + HNL("HNL"), + + HRD("HRD"), + + HRK("HRK"), + + HTG("HTG"), + + HUF("HUF"), + + IDR("IDR"), + + IEP("IEP"), + + ILP("ILP"), + + ILS("ILS"), + + INR("INR"), + + IQD("IQD"), + + IRR("IRR"), + + ISK("ISK"), + + ITL("ITL"), + + JMD("JMD"), + + JOD("JOD"), + + JPY("JPY"), + + KES("KES"), + + KGS("KGS"), + + KHR("KHR"), + + KMF("KMF"), + + KPW("KPW"), + + KRW("KRW"), + + KWD("KWD"), + + KYD("KYD"), + + KZT("KZT"), + + LAK("LAK"), + + LBP("LBP"), + + LKR("LKR"), + + LRD("LRD"), + + LSL("LSL"), + + LTL("LTL"), + + LTT("LTT"), + + LUC("LUC"), + + LUF("LUF"), + + LUL("LUL"), + + LVL("LVL"), + + LVR("LVR"), + + LYD("LYD"), + + MAD("MAD"), + + MAF("MAF"), + + MCF("MCF"), + + MDC("MDC"), + + MDL("MDL"), + + MGA("MGA"), + + MGF("MGF"), + + MKD("MKD"), + + MLF("MLF"), + + MMK("MMK"), + + MNT("MNT"), + + MOP("MOP"), + + MRU("MRU"), + + MTL("MTL"), + + MTP("MTP"), + + MUR("MUR"), + + MVR("MVR"), + + MWK("MWK"), + + MXN("MXN"), + + MXV("MXV"), + + MYR("MYR"), + + MZE("MZE"), + + MZN("MZN"), + + NAD("NAD"), + + NGN("NGN"), + + NIO("NIO"), + + NLG("NLG"), + + NOK("NOK"), + + NPR("NPR"), + + NZD("NZD"), + + OMR("OMR"), + + PAB("PAB"), + + PEI("PEI"), + + PEN("PEN"), + + PGK("PGK"), + + PHP("PHP"), + + PKR("PKR"), + + PLN("PLN"), + + PTE("PTE"), + + PYG("PYG"), + + QAR("QAR"), + + RHD("RHD"), + + RON("RON"), + + RSD("RSD"), + + RUB("RUB"), + + RWF("RWF"), + + SAR("SAR"), + + SBD("SBD"), + + SCR("SCR"), + + SDG("SDG"), + + SEK("SEK"), + + SGD("SGD"), + + SHP("SHP"), + + SIT("SIT"), + + SKK("SKK"), + + SLL("SLL"), + + SOS("SOS"), + + SRD("SRD"), + + SRG("SRG"), + + SSP("SSP"), + + STN("STN"), + + SUR("SUR"), + + SVC("SVC"), + + SYP("SYP"), + + SZL("SZL"), + + THB("THB"), + + TJR("TJR"), + + TJS("TJS"), + + TMT("TMT"), + + TND("TND"), + + TOP("TOP"), + + TPE("TPE"), + + TRY("TRY"), + + TTD("TTD"), + + TWD("TWD"), + + TZS("TZS"), + + UAH("UAH"), + + UAK("UAK"), + + UGX("UGX"), + + USD("USD"), + + UYU("UYU"), + + UYW("UYW"), + + UZS("UZS"), + + VES("VES"), + + VND("VND"), + + VUV("VUV"), + + WST("WST"), + + XAF("XAF"), + + XAG("XAG"), + + XAU("XAU"), + + XBA("XBA"), + + XBB("XBB"), + + XCD("XCD"), + + XDR("XDR"), + + XEU("XEU"), + + XFO("XFO"), + + XFU("XFU"), + + XOF("XOF"), + + XPD("XPD"), + + XPF("XPF"), + + XPT("XPT"), + + XRE("XRE"), + + XSU("XSU"), + + XTS("XTS"), + + XUA("XUA"), + + XXX("XXX"), + + YDD("YDD"), + + YER("YER"), + + ZAR("ZAR"), + + ZMW("ZMW"); + + private String value; + + CurrencyFormatEnum(String value) { + this.value = value; + } + + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + public static CurrencyFormatEnum fromValue(String value) { + for (CurrencyFormatEnum b : CurrencyFormatEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + return null; + } + + public static class Adapter extends TypeAdapter { + @Override + public void write(final JsonWriter jsonWriter, final CurrencyFormatEnum enumeration) + throws IOException { + jsonWriter.value(enumeration.getValue()); + } + + @Override + public CurrencyFormatEnum read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + return CurrencyFormatEnum.fromValue(value); + } + } + + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + String value = jsonElement.getAsString(); + CurrencyFormatEnum.fromValue(value); + } + } + + public static final String SERIALIZED_NAME_CURRENCY_FORMAT = "currency_format"; + + @SerializedName(SERIALIZED_NAME_CURRENCY_FORMAT) + @javax.annotation.Nullable + private CurrencyFormatEnum currencyFormat; + + /** Indicates the locale to be used for all formattings. */ + @JsonAdapter(UserLocaleEnum.Adapter.class) + public enum UserLocaleEnum { + EN_CA("en-CA"), + + EN_GB("en-GB"), + + EN_US("en-US"), + + DE_DE("de-DE"), + + JA_JP("ja-JP"), + + ZH_CN("zh-CN"), + + PT_BR("pt-BR"), + + FR_FR("fr-FR"), + + FR_CA("fr-CA"), + + ES_US("es-US"), + + DA_DK("da-DK"), + + ES_ES("es-ES"), + + FI_FI("fi-FI"), + + SV_SE("sv-SE"), + + NB_NO("nb-NO"), + + PT_PT("pt-PT"), + + NL_NL("nl-NL"), + + IT_IT("it-IT"), + + RU_RU("ru-RU"), + + EN_IN("en-IN"), + + DE_CH("de-CH"), + + EN_NZ("en-NZ"), + + ES_MX("es-MX"), + + EN_AU("en-AU"), + + ZH_HANT("zh-Hant"), + + KO_KR("ko-KR"), + + EN_DE("en-DE"); + + private String value; + + UserLocaleEnum(String value) { + this.value = value; + } + + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + public static UserLocaleEnum fromValue(String value) { + for (UserLocaleEnum b : UserLocaleEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + return null; + } + + public static class Adapter extends TypeAdapter { + @Override + public void write(final JsonWriter jsonWriter, final UserLocaleEnum enumeration) + throws IOException { + jsonWriter.value(enumeration.getValue()); + } + + @Override + public UserLocaleEnum read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + return UserLocaleEnum.fromValue(value); + } + } + + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + String value = jsonElement.getAsString(); + UserLocaleEnum.fromValue(value); + } + } + + public static final String SERIALIZED_NAME_USER_LOCALE = "user_locale"; + + @SerializedName(SERIALIZED_NAME_USER_LOCALE) + @javax.annotation.Nullable + private UserLocaleEnum userLocale; + + /** Indicates the locale to be used for number formatting. */ + @JsonAdapter(NumberFormatLocaleEnum.Adapter.class) + public enum NumberFormatLocaleEnum { + EN_CA("en-CA"), + + EN_GB("en-GB"), + + EN_US("en-US"), + + DE_DE("de-DE"), + + JA_JP("ja-JP"), + + ZH_CN("zh-CN"), + + PT_BR("pt-BR"), + + FR_FR("fr-FR"), + + FR_CA("fr-CA"), + + ES_US("es-US"), + + DA_DK("da-DK"), + + ES_ES("es-ES"), + + FI_FI("fi-FI"), + + SV_SE("sv-SE"), + + NB_NO("nb-NO"), + + PT_PT("pt-PT"), + + NL_NL("nl-NL"), + + IT_IT("it-IT"), + + RU_RU("ru-RU"), + + EN_IN("en-IN"), + + DE_CH("de-CH"), + + EN_NZ("en-NZ"), + + ES_MX("es-MX"), + + EN_AU("en-AU"), + + ZH_HANT("zh-Hant"), + + KO_KR("ko-KR"), + + EN_DE("en-DE"); + + private String value; + + NumberFormatLocaleEnum(String value) { + this.value = value; + } + + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + public static NumberFormatLocaleEnum fromValue(String value) { + for (NumberFormatLocaleEnum b : NumberFormatLocaleEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + return null; + } + + public static class Adapter extends TypeAdapter { + @Override + public void write(final JsonWriter jsonWriter, final NumberFormatLocaleEnum enumeration) + throws IOException { + jsonWriter.value(enumeration.getValue()); + } + + @Override + public NumberFormatLocaleEnum read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + return NumberFormatLocaleEnum.fromValue(value); + } + } + + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + String value = jsonElement.getAsString(); + NumberFormatLocaleEnum.fromValue(value); + } + } + + public static final String SERIALIZED_NAME_NUMBER_FORMAT_LOCALE = "number_format_locale"; + + @SerializedName(SERIALIZED_NAME_NUMBER_FORMAT_LOCALE) + @javax.annotation.Nullable + private NumberFormatLocaleEnum numberFormatLocale; + + /** Indicates the locale to be used for date formatting. */ + @JsonAdapter(DateFormatLocaleEnum.Adapter.class) + public enum DateFormatLocaleEnum { + EN_CA("en-CA"), + + EN_GB("en-GB"), + + EN_US("en-US"), + + DE_DE("de-DE"), + + JA_JP("ja-JP"), + + ZH_CN("zh-CN"), + + PT_BR("pt-BR"), + + FR_FR("fr-FR"), + + FR_CA("fr-CA"), + + ES_US("es-US"), + + DA_DK("da-DK"), + + ES_ES("es-ES"), + + FI_FI("fi-FI"), + + SV_SE("sv-SE"), + + NB_NO("nb-NO"), + + PT_PT("pt-PT"), + + NL_NL("nl-NL"), + + IT_IT("it-IT"), + + RU_RU("ru-RU"), + + EN_IN("en-IN"), + + DE_CH("de-CH"), + + EN_NZ("en-NZ"), + + ES_MX("es-MX"), + + EN_AU("en-AU"), + + ZH_HANT("zh-Hant"), + + KO_KR("ko-KR"), + + EN_DE("en-DE"); + + private String value; + + DateFormatLocaleEnum(String value) { + this.value = value; + } + + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + public static DateFormatLocaleEnum fromValue(String value) { + for (DateFormatLocaleEnum b : DateFormatLocaleEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + return null; + } + + public static class Adapter extends TypeAdapter { + @Override + public void write(final JsonWriter jsonWriter, final DateFormatLocaleEnum enumeration) + throws IOException { + jsonWriter.value(enumeration.getValue()); + } + + @Override + public DateFormatLocaleEnum read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + return DateFormatLocaleEnum.fromValue(value); + } + } + + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + String value = jsonElement.getAsString(); + DateFormatLocaleEnum.fromValue(value); + } + } + + public static final String SERIALIZED_NAME_DATE_FORMAT_LOCALE = "date_format_locale"; + + @SerializedName(SERIALIZED_NAME_DATE_FORMAT_LOCALE) + @javax.annotation.Nullable + private DateFormatLocaleEnum dateFormatLocale; + + public RegionalSettingsInput() {} + + public RegionalSettingsInput currencyFormat( + @javax.annotation.Nullable CurrencyFormatEnum currencyFormat) { + this.currencyFormat = currencyFormat; + return this; + } + + /** + * ISO code to be appended with currency values. + * + * @return currencyFormat + */ + @javax.annotation.Nullable + public CurrencyFormatEnum getCurrencyFormat() { + return currencyFormat; + } + + public void setCurrencyFormat(@javax.annotation.Nullable CurrencyFormatEnum currencyFormat) { + this.currencyFormat = currencyFormat; + } + + public RegionalSettingsInput userLocale(@javax.annotation.Nullable UserLocaleEnum userLocale) { + this.userLocale = userLocale; + return this; + } + + /** + * Indicates the locale to be used for all formattings. + * + * @return userLocale + */ + @javax.annotation.Nullable + public UserLocaleEnum getUserLocale() { + return userLocale; + } + + public void setUserLocale(@javax.annotation.Nullable UserLocaleEnum userLocale) { + this.userLocale = userLocale; + } + + public RegionalSettingsInput numberFormatLocale( + @javax.annotation.Nullable NumberFormatLocaleEnum numberFormatLocale) { + this.numberFormatLocale = numberFormatLocale; + return this; + } + + /** + * Indicates the locale to be used for number formatting. + * + * @return numberFormatLocale + */ + @javax.annotation.Nullable + public NumberFormatLocaleEnum getNumberFormatLocale() { + return numberFormatLocale; + } + + public void setNumberFormatLocale( + @javax.annotation.Nullable NumberFormatLocaleEnum numberFormatLocale) { + this.numberFormatLocale = numberFormatLocale; + } + + public RegionalSettingsInput dateFormatLocale( + @javax.annotation.Nullable DateFormatLocaleEnum dateFormatLocale) { + this.dateFormatLocale = dateFormatLocale; + return this; + } + + /** + * Indicates the locale to be used for date formatting. + * + * @return dateFormatLocale + */ + @javax.annotation.Nullable + public DateFormatLocaleEnum getDateFormatLocale() { + return dateFormatLocale; + } + + public void setDateFormatLocale( + @javax.annotation.Nullable DateFormatLocaleEnum dateFormatLocale) { + this.dateFormatLocale = dateFormatLocale; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key name of the property + * @param value value of the property + * @return the RegionalSettingsInput instance itself + */ + public RegionalSettingsInput putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return a map of objects + */ + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key name of the property + * @return an object + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + RegionalSettingsInput regionalSettingsInput = (RegionalSettingsInput) o; + return Objects.equals(this.currencyFormat, regionalSettingsInput.currencyFormat) + && Objects.equals(this.userLocale, regionalSettingsInput.userLocale) + && Objects.equals(this.numberFormatLocale, regionalSettingsInput.numberFormatLocale) + && Objects.equals(this.dateFormatLocale, regionalSettingsInput.dateFormatLocale) + && Objects.equals( + this.additionalProperties, regionalSettingsInput.additionalProperties); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b + || (a != null + && b != null + && a.isPresent() + && b.isPresent() + && Objects.deepEquals(a.get(), b.get())); + } + + @Override + public int hashCode() { + return Objects.hash( + currencyFormat, + userLocale, + numberFormatLocale, + dateFormatLocale, + additionalProperties); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; + } + return a.isPresent() ? Arrays.deepHashCode(new Object[] {a.get()}) : 31; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class RegionalSettingsInput {\n"); + sb.append(" currencyFormat: ").append(toIndentedString(currencyFormat)).append("\n"); + sb.append(" userLocale: ").append(toIndentedString(userLocale)).append("\n"); + sb.append(" numberFormatLocale: ") + .append(toIndentedString(numberFormatLocale)) + .append("\n"); + sb.append(" dateFormatLocale: ").append(toIndentedString(dateFormatLocale)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first + * line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("currency_format"); + openapiFields.add("user_locale"); + openapiFields.add("number_format_locale"); + openapiFields.add("date_format_locale"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to RegionalSettingsInput + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!RegionalSettingsInput.openapiRequiredFields + .isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException( + String.format( + "The required field(s) %s in RegionalSettingsInput is not found in" + + " the empty JSON string", + RegionalSettingsInput.openapiRequiredFields.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if ((jsonObj.get("currency_format") != null && !jsonObj.get("currency_format").isJsonNull()) + && !jsonObj.get("currency_format").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `currency_format` to be a primitive type in the" + + " JSON string but got `%s`", + jsonObj.get("currency_format").toString())); + } + // validate the optional field `currency_format` + if (jsonObj.get("currency_format") != null + && !jsonObj.get("currency_format").isJsonNull()) { + CurrencyFormatEnum.validateJsonElement(jsonObj.get("currency_format")); + } + if ((jsonObj.get("user_locale") != null && !jsonObj.get("user_locale").isJsonNull()) + && !jsonObj.get("user_locale").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `user_locale` to be a primitive type in the JSON" + + " string but got `%s`", + jsonObj.get("user_locale").toString())); + } + // validate the optional field `user_locale` + if (jsonObj.get("user_locale") != null && !jsonObj.get("user_locale").isJsonNull()) { + UserLocaleEnum.validateJsonElement(jsonObj.get("user_locale")); + } + if ((jsonObj.get("number_format_locale") != null + && !jsonObj.get("number_format_locale").isJsonNull()) + && !jsonObj.get("number_format_locale").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `number_format_locale` to be a primitive type in" + + " the JSON string but got `%s`", + jsonObj.get("number_format_locale").toString())); + } + // validate the optional field `number_format_locale` + if (jsonObj.get("number_format_locale") != null + && !jsonObj.get("number_format_locale").isJsonNull()) { + NumberFormatLocaleEnum.validateJsonElement(jsonObj.get("number_format_locale")); + } + if ((jsonObj.get("date_format_locale") != null + && !jsonObj.get("date_format_locale").isJsonNull()) + && !jsonObj.get("date_format_locale").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `date_format_locale` to be a primitive type in the" + + " JSON string but got `%s`", + jsonObj.get("date_format_locale").toString())); + } + // validate the optional field `date_format_locale` + if (jsonObj.get("date_format_locale") != null + && !jsonObj.get("date_format_locale").isJsonNull()) { + DateFormatLocaleEnum.validateJsonElement(jsonObj.get("date_format_locale")); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!RegionalSettingsInput.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'RegionalSettingsInput' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter = + gson.getDelegateAdapter(this, TypeToken.get(RegionalSettingsInput.class)); + + return (TypeAdapter) + new TypeAdapter() { + @Override + public void write(JsonWriter out, RegionalSettingsInput value) + throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + obj.remove("additionalProperties"); + // serialize additional properties + if (value.getAdditionalProperties() != null) { + for (Map.Entry entry : + value.getAdditionalProperties().entrySet()) { + if (entry.getValue() instanceof String) + obj.addProperty(entry.getKey(), (String) entry.getValue()); + else if (entry.getValue() instanceof Number) + obj.addProperty(entry.getKey(), (Number) entry.getValue()); + else if (entry.getValue() instanceof Boolean) + obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); + else if (entry.getValue() instanceof Character) + obj.addProperty( + entry.getKey(), (Character) entry.getValue()); + else { + JsonElement jsonElement = gson.toJsonTree(entry.getValue()); + if (jsonElement.isJsonArray()) { + obj.add(entry.getKey(), jsonElement.getAsJsonArray()); + } else { + obj.add(entry.getKey(), jsonElement.getAsJsonObject()); + } + } + } + } + elementAdapter.write(out, obj); + } + + @Override + public RegionalSettingsInput read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // store additional fields in the deserialized instance + RegionalSettingsInput instance = thisAdapter.fromJsonTree(jsonObj); + for (Map.Entry entry : jsonObj.entrySet()) { + if (!openapiFields.contains(entry.getKey())) { + if (entry.getValue().isJsonPrimitive()) { // primitive type + if (entry.getValue().getAsJsonPrimitive().isString()) + instance.putAdditionalProperty( + entry.getKey(), entry.getValue().getAsString()); + else if (entry.getValue().getAsJsonPrimitive().isNumber()) + instance.putAdditionalProperty( + entry.getKey(), entry.getValue().getAsNumber()); + else if (entry.getValue().getAsJsonPrimitive().isBoolean()) + instance.putAdditionalProperty( + entry.getKey(), + entry.getValue().getAsBoolean()); + else + throw new IllegalArgumentException( + String.format( + "The field `%s` has unknown primitive" + + " type. Value: %s", + entry.getKey(), + entry.getValue().toString())); + } else if (entry.getValue().isJsonArray()) { + instance.putAdditionalProperty( + entry.getKey(), + gson.fromJson(entry.getValue(), List.class)); + } else { // JSON object + instance.putAdditionalProperty( + entry.getKey(), + gson.fromJson(entry.getValue(), HashMap.class)); + } + } + } + return instance; + } + }.nullSafe(); + } + } + + /** + * Create an instance of RegionalSettingsInput given an JSON string + * + * @param jsonString JSON string + * @return An instance of RegionalSettingsInput + * @throws IOException if the JSON string is invalid with respect to RegionalSettingsInput + */ + public static RegionalSettingsInput fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, RegionalSettingsInput.class); + } + + /** + * Convert an instance of RegionalSettingsInput to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} diff --git a/sdks/java/src/main/java/com/thoughtspot/client/model/RepoConfigObject.java b/sdks/java/src/main/java/com/thoughtspot/client/model/RepoConfigObject.java new file mode 100644 index 000000000..fdeb88505 --- /dev/null +++ b/sdks/java/src/main/java/com/thoughtspot/client/model/RepoConfigObject.java @@ -0,0 +1,544 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client.model; + +import com.google.gson.Gson; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.TypeAdapter; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.annotations.SerializedName; +import com.google.gson.reflect.TypeToken; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import com.thoughtspot.client.JSON; +import java.io.IOException; +import java.io.Serializable; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Objects; +import org.openapitools.jackson.nullable.JsonNullable; + +/** RepoConfigObject */ +@javax.annotation.Generated( + value = "org.openapitools.codegen.languages.JavaClientCodegen", + comments = "Generator version: 7.12.0") +public class RepoConfigObject implements Serializable { + private static final long serialVersionUID = 1L; + + public static final String SERIALIZED_NAME_REPOSITORY_URL = "repository_url"; + + @SerializedName(SERIALIZED_NAME_REPOSITORY_URL) + @javax.annotation.Nullable + private String repositoryUrl; + + public static final String SERIALIZED_NAME_USERNAME = "username"; + + @SerializedName(SERIALIZED_NAME_USERNAME) + @javax.annotation.Nullable + private String username; + + public static final String SERIALIZED_NAME_COMMIT_BRANCH_NAME = "commit_branch_name"; + + @SerializedName(SERIALIZED_NAME_COMMIT_BRANCH_NAME) + @javax.annotation.Nullable + private String commitBranchName; + + public static final String SERIALIZED_NAME_BRANCHES = "branches"; + + @SerializedName(SERIALIZED_NAME_BRANCHES) + @javax.annotation.Nullable + private List branches; + + public static final String SERIALIZED_NAME_ENABLE_GUID_MAPPING = "enable_guid_mapping"; + + @SerializedName(SERIALIZED_NAME_ENABLE_GUID_MAPPING) + @javax.annotation.Nullable + private Boolean enableGuidMapping; + + public static final String SERIALIZED_NAME_CONFIGURATION_BRANCH_NAME = + "configuration_branch_name"; + + @SerializedName(SERIALIZED_NAME_CONFIGURATION_BRANCH_NAME) + @javax.annotation.Nullable + private String configurationBranchName; + + public static final String SERIALIZED_NAME_ORG = "org"; + + @SerializedName(SERIALIZED_NAME_ORG) + @javax.annotation.Nullable + private Org org; + + public RepoConfigObject() {} + + public RepoConfigObject repositoryUrl(@javax.annotation.Nullable String repositoryUrl) { + this.repositoryUrl = repositoryUrl; + return this; + } + + /** + * Remote repository URL configured + * + * @return repositoryUrl + */ + @javax.annotation.Nullable + public String getRepositoryUrl() { + return repositoryUrl; + } + + public void setRepositoryUrl(@javax.annotation.Nullable String repositoryUrl) { + this.repositoryUrl = repositoryUrl; + } + + public RepoConfigObject username(@javax.annotation.Nullable String username) { + this.username = username; + return this; + } + + /** + * Username to authenticate connection to the version control system + * + * @return username + */ + @javax.annotation.Nullable + public String getUsername() { + return username; + } + + public void setUsername(@javax.annotation.Nullable String username) { + this.username = username; + } + + public RepoConfigObject commitBranchName(@javax.annotation.Nullable String commitBranchName) { + this.commitBranchName = commitBranchName; + return this; + } + + /** + * Name of the remote branch where objects from this Thoughtspot instance will be versioned. + * + * @return commitBranchName + */ + @javax.annotation.Nullable + public String getCommitBranchName() { + return commitBranchName; + } + + public void setCommitBranchName(@javax.annotation.Nullable String commitBranchName) { + this.commitBranchName = commitBranchName; + } + + public RepoConfigObject branches(@javax.annotation.Nullable List branches) { + this.branches = branches; + return this; + } + + public RepoConfigObject addBranchesItem(String branchesItem) { + if (this.branches == null) { + this.branches = new ArrayList<>(); + } + this.branches.add(branchesItem); + return this; + } + + /** + * Branches that have been pulled in local repository + * + * @return branches + */ + @javax.annotation.Nullable + public List getBranches() { + return branches; + } + + public void setBranches(@javax.annotation.Nullable List branches) { + this.branches = branches; + } + + public RepoConfigObject enableGuidMapping( + @javax.annotation.Nullable Boolean enableGuidMapping) { + this.enableGuidMapping = enableGuidMapping; + return this; + } + + /** + * Maintain mapping of guid for the deployment to an instance + * + * @return enableGuidMapping + */ + @javax.annotation.Nullable + public Boolean getEnableGuidMapping() { + return enableGuidMapping; + } + + public void setEnableGuidMapping(@javax.annotation.Nullable Boolean enableGuidMapping) { + this.enableGuidMapping = enableGuidMapping; + } + + public RepoConfigObject configurationBranchName( + @javax.annotation.Nullable String configurationBranchName) { + this.configurationBranchName = configurationBranchName; + return this; + } + + /** + * Name of the branch where the configuration files related to operations between Thoughtspot + * and version control repo should be maintained. + * + * @return configurationBranchName + */ + @javax.annotation.Nullable + public String getConfigurationBranchName() { + return configurationBranchName; + } + + public void setConfigurationBranchName( + @javax.annotation.Nullable String configurationBranchName) { + this.configurationBranchName = configurationBranchName; + } + + public RepoConfigObject org(@javax.annotation.Nullable Org org) { + this.org = org; + return this; + } + + /** + * Get org + * + * @return org + */ + @javax.annotation.Nullable + public Org getOrg() { + return org; + } + + public void setOrg(@javax.annotation.Nullable Org org) { + this.org = org; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key name of the property + * @param value value of the property + * @return the RepoConfigObject instance itself + */ + public RepoConfigObject putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return a map of objects + */ + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key name of the property + * @return an object + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + RepoConfigObject repoConfigObject = (RepoConfigObject) o; + return Objects.equals(this.repositoryUrl, repoConfigObject.repositoryUrl) + && Objects.equals(this.username, repoConfigObject.username) + && Objects.equals(this.commitBranchName, repoConfigObject.commitBranchName) + && Objects.equals(this.branches, repoConfigObject.branches) + && Objects.equals(this.enableGuidMapping, repoConfigObject.enableGuidMapping) + && Objects.equals( + this.configurationBranchName, repoConfigObject.configurationBranchName) + && Objects.equals(this.org, repoConfigObject.org) + && Objects.equals(this.additionalProperties, repoConfigObject.additionalProperties); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b + || (a != null + && b != null + && a.isPresent() + && b.isPresent() + && Objects.deepEquals(a.get(), b.get())); + } + + @Override + public int hashCode() { + return Objects.hash( + repositoryUrl, + username, + commitBranchName, + branches, + enableGuidMapping, + configurationBranchName, + org, + additionalProperties); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; + } + return a.isPresent() ? Arrays.deepHashCode(new Object[] {a.get()}) : 31; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class RepoConfigObject {\n"); + sb.append(" repositoryUrl: ").append(toIndentedString(repositoryUrl)).append("\n"); + sb.append(" username: ").append(toIndentedString(username)).append("\n"); + sb.append(" commitBranchName: ").append(toIndentedString(commitBranchName)).append("\n"); + sb.append(" branches: ").append(toIndentedString(branches)).append("\n"); + sb.append(" enableGuidMapping: ") + .append(toIndentedString(enableGuidMapping)) + .append("\n"); + sb.append(" configurationBranchName: ") + .append(toIndentedString(configurationBranchName)) + .append("\n"); + sb.append(" org: ").append(toIndentedString(org)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first + * line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("repository_url"); + openapiFields.add("username"); + openapiFields.add("commit_branch_name"); + openapiFields.add("branches"); + openapiFields.add("enable_guid_mapping"); + openapiFields.add("configuration_branch_name"); + openapiFields.add("org"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to RepoConfigObject + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!RepoConfigObject.openapiRequiredFields + .isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException( + String.format( + "The required field(s) %s in RepoConfigObject is not found in the" + + " empty JSON string", + RepoConfigObject.openapiRequiredFields.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if ((jsonObj.get("repository_url") != null && !jsonObj.get("repository_url").isJsonNull()) + && !jsonObj.get("repository_url").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `repository_url` to be a primitive type in the" + + " JSON string but got `%s`", + jsonObj.get("repository_url").toString())); + } + if ((jsonObj.get("username") != null && !jsonObj.get("username").isJsonNull()) + && !jsonObj.get("username").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `username` to be a primitive type in the JSON" + + " string but got `%s`", + jsonObj.get("username").toString())); + } + if ((jsonObj.get("commit_branch_name") != null + && !jsonObj.get("commit_branch_name").isJsonNull()) + && !jsonObj.get("commit_branch_name").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `commit_branch_name` to be a primitive type in the" + + " JSON string but got `%s`", + jsonObj.get("commit_branch_name").toString())); + } + // ensure the optional json data is an array if present + if (jsonObj.get("branches") != null + && !jsonObj.get("branches").isJsonNull() + && !jsonObj.get("branches").isJsonArray()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `branches` to be an array in the JSON string but" + + " got `%s`", + jsonObj.get("branches").toString())); + } + if ((jsonObj.get("configuration_branch_name") != null + && !jsonObj.get("configuration_branch_name").isJsonNull()) + && !jsonObj.get("configuration_branch_name").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `configuration_branch_name` to be a primitive type" + + " in the JSON string but got `%s`", + jsonObj.get("configuration_branch_name").toString())); + } + // validate the optional field `org` + if (jsonObj.get("org") != null && !jsonObj.get("org").isJsonNull()) { + Org.validateJsonElement(jsonObj.get("org")); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!RepoConfigObject.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'RepoConfigObject' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter = + gson.getDelegateAdapter(this, TypeToken.get(RepoConfigObject.class)); + + return (TypeAdapter) + new TypeAdapter() { + @Override + public void write(JsonWriter out, RepoConfigObject value) + throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + obj.remove("additionalProperties"); + // serialize additional properties + if (value.getAdditionalProperties() != null) { + for (Map.Entry entry : + value.getAdditionalProperties().entrySet()) { + if (entry.getValue() instanceof String) + obj.addProperty(entry.getKey(), (String) entry.getValue()); + else if (entry.getValue() instanceof Number) + obj.addProperty(entry.getKey(), (Number) entry.getValue()); + else if (entry.getValue() instanceof Boolean) + obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); + else if (entry.getValue() instanceof Character) + obj.addProperty( + entry.getKey(), (Character) entry.getValue()); + else { + JsonElement jsonElement = gson.toJsonTree(entry.getValue()); + if (jsonElement.isJsonArray()) { + obj.add(entry.getKey(), jsonElement.getAsJsonArray()); + } else { + obj.add(entry.getKey(), jsonElement.getAsJsonObject()); + } + } + } + } + elementAdapter.write(out, obj); + } + + @Override + public RepoConfigObject read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // store additional fields in the deserialized instance + RepoConfigObject instance = thisAdapter.fromJsonTree(jsonObj); + for (Map.Entry entry : jsonObj.entrySet()) { + if (!openapiFields.contains(entry.getKey())) { + if (entry.getValue().isJsonPrimitive()) { // primitive type + if (entry.getValue().getAsJsonPrimitive().isString()) + instance.putAdditionalProperty( + entry.getKey(), entry.getValue().getAsString()); + else if (entry.getValue().getAsJsonPrimitive().isNumber()) + instance.putAdditionalProperty( + entry.getKey(), entry.getValue().getAsNumber()); + else if (entry.getValue().getAsJsonPrimitive().isBoolean()) + instance.putAdditionalProperty( + entry.getKey(), + entry.getValue().getAsBoolean()); + else + throw new IllegalArgumentException( + String.format( + "The field `%s` has unknown primitive" + + " type. Value: %s", + entry.getKey(), + entry.getValue().toString())); + } else if (entry.getValue().isJsonArray()) { + instance.putAdditionalProperty( + entry.getKey(), + gson.fromJson(entry.getValue(), List.class)); + } else { // JSON object + instance.putAdditionalProperty( + entry.getKey(), + gson.fromJson(entry.getValue(), HashMap.class)); + } + } + } + return instance; + } + }.nullSafe(); + } + } + + /** + * Create an instance of RepoConfigObject given an JSON string + * + * @param jsonString JSON string + * @return An instance of RepoConfigObject + * @throws IOException if the JSON string is invalid with respect to RepoConfigObject + */ + public static RepoConfigObject fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, RepoConfigObject.class); + } + + /** + * Convert an instance of RepoConfigObject to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} diff --git a/sdks/java/src/main/java/com/thoughtspot/client/model/ResetUserPasswordRequest.java b/sdks/java/src/main/java/com/thoughtspot/client/model/ResetUserPasswordRequest.java new file mode 100644 index 000000000..73969b593 --- /dev/null +++ b/sdks/java/src/main/java/com/thoughtspot/client/model/ResetUserPasswordRequest.java @@ -0,0 +1,340 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client.model; + +import com.google.gson.Gson; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.TypeAdapter; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.annotations.SerializedName; +import com.google.gson.reflect.TypeToken; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import com.thoughtspot.client.JSON; +import java.io.IOException; +import java.io.Serializable; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Objects; + +/** ResetUserPasswordRequest */ +@javax.annotation.Generated( + value = "org.openapitools.codegen.languages.JavaClientCodegen", + comments = "Generator version: 7.12.0") +public class ResetUserPasswordRequest implements Serializable { + private static final long serialVersionUID = 1L; + + public static final String SERIALIZED_NAME_NEW_PASSWORD = "new_password"; + + @SerializedName(SERIALIZED_NAME_NEW_PASSWORD) + @javax.annotation.Nonnull + private String newPassword; + + public static final String SERIALIZED_NAME_USER_IDENTIFIER = "user_identifier"; + + @SerializedName(SERIALIZED_NAME_USER_IDENTIFIER) + @javax.annotation.Nonnull + private String userIdentifier; + + public ResetUserPasswordRequest() {} + + public ResetUserPasswordRequest newPassword(@javax.annotation.Nonnull String newPassword) { + this.newPassword = newPassword; + return this; + } + + /** + * New password for the user. + * + * @return newPassword + */ + @javax.annotation.Nonnull + public String getNewPassword() { + return newPassword; + } + + public void setNewPassword(@javax.annotation.Nonnull String newPassword) { + this.newPassword = newPassword; + } + + public ResetUserPasswordRequest userIdentifier( + @javax.annotation.Nonnull String userIdentifier) { + this.userIdentifier = userIdentifier; + return this; + } + + /** + * GUID or name of the user. + * + * @return userIdentifier + */ + @javax.annotation.Nonnull + public String getUserIdentifier() { + return userIdentifier; + } + + public void setUserIdentifier(@javax.annotation.Nonnull String userIdentifier) { + this.userIdentifier = userIdentifier; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key name of the property + * @param value value of the property + * @return the ResetUserPasswordRequest instance itself + */ + public ResetUserPasswordRequest putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return a map of objects + */ + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key name of the property + * @return an object + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ResetUserPasswordRequest resetUserPasswordRequest = (ResetUserPasswordRequest) o; + return Objects.equals(this.newPassword, resetUserPasswordRequest.newPassword) + && Objects.equals(this.userIdentifier, resetUserPasswordRequest.userIdentifier) + && Objects.equals( + this.additionalProperties, resetUserPasswordRequest.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(newPassword, userIdentifier, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ResetUserPasswordRequest {\n"); + sb.append(" newPassword: ").append(toIndentedString(newPassword)).append("\n"); + sb.append(" userIdentifier: ").append(toIndentedString(userIdentifier)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first + * line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("new_password"); + openapiFields.add("user_identifier"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + openapiRequiredFields.add("new_password"); + openapiRequiredFields.add("user_identifier"); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to ResetUserPasswordRequest + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!ResetUserPasswordRequest.openapiRequiredFields + .isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException( + String.format( + "The required field(s) %s in ResetUserPasswordRequest is not found" + + " in the empty JSON string", + ResetUserPasswordRequest.openapiRequiredFields.toString())); + } + } + + // check to make sure all required properties/fields are present in the JSON string + for (String requiredField : ResetUserPasswordRequest.openapiRequiredFields) { + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException( + String.format( + "The required field `%s` is not found in the JSON string: %s", + requiredField, jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if (!jsonObj.get("new_password").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `new_password` to be a primitive type in the JSON" + + " string but got `%s`", + jsonObj.get("new_password").toString())); + } + if (!jsonObj.get("user_identifier").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `user_identifier` to be a primitive type in the" + + " JSON string but got `%s`", + jsonObj.get("user_identifier").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!ResetUserPasswordRequest.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'ResetUserPasswordRequest' and its + // subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter = + gson.getDelegateAdapter(this, TypeToken.get(ResetUserPasswordRequest.class)); + + return (TypeAdapter) + new TypeAdapter() { + @Override + public void write(JsonWriter out, ResetUserPasswordRequest value) + throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + obj.remove("additionalProperties"); + // serialize additional properties + if (value.getAdditionalProperties() != null) { + for (Map.Entry entry : + value.getAdditionalProperties().entrySet()) { + if (entry.getValue() instanceof String) + obj.addProperty(entry.getKey(), (String) entry.getValue()); + else if (entry.getValue() instanceof Number) + obj.addProperty(entry.getKey(), (Number) entry.getValue()); + else if (entry.getValue() instanceof Boolean) + obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); + else if (entry.getValue() instanceof Character) + obj.addProperty( + entry.getKey(), (Character) entry.getValue()); + else { + JsonElement jsonElement = gson.toJsonTree(entry.getValue()); + if (jsonElement.isJsonArray()) { + obj.add(entry.getKey(), jsonElement.getAsJsonArray()); + } else { + obj.add(entry.getKey(), jsonElement.getAsJsonObject()); + } + } + } + } + elementAdapter.write(out, obj); + } + + @Override + public ResetUserPasswordRequest read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // store additional fields in the deserialized instance + ResetUserPasswordRequest instance = thisAdapter.fromJsonTree(jsonObj); + for (Map.Entry entry : jsonObj.entrySet()) { + if (!openapiFields.contains(entry.getKey())) { + if (entry.getValue().isJsonPrimitive()) { // primitive type + if (entry.getValue().getAsJsonPrimitive().isString()) + instance.putAdditionalProperty( + entry.getKey(), entry.getValue().getAsString()); + else if (entry.getValue().getAsJsonPrimitive().isNumber()) + instance.putAdditionalProperty( + entry.getKey(), entry.getValue().getAsNumber()); + else if (entry.getValue().getAsJsonPrimitive().isBoolean()) + instance.putAdditionalProperty( + entry.getKey(), + entry.getValue().getAsBoolean()); + else + throw new IllegalArgumentException( + String.format( + "The field `%s` has unknown primitive" + + " type. Value: %s", + entry.getKey(), + entry.getValue().toString())); + } else if (entry.getValue().isJsonArray()) { + instance.putAdditionalProperty( + entry.getKey(), + gson.fromJson(entry.getValue(), List.class)); + } else { // JSON object + instance.putAdditionalProperty( + entry.getKey(), + gson.fromJson(entry.getValue(), HashMap.class)); + } + } + } + return instance; + } + }.nullSafe(); + } + } + + /** + * Create an instance of ResetUserPasswordRequest given an JSON string + * + * @param jsonString JSON string + * @return An instance of ResetUserPasswordRequest + * @throws IOException if the JSON string is invalid with respect to ResetUserPasswordRequest + */ + public static ResetUserPasswordRequest fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, ResetUserPasswordRequest.class); + } + + /** + * Convert an instance of ResetUserPasswordRequest to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} diff --git a/sdks/java/src/main/java/com/thoughtspot/client/model/ResponseActivationURL.java b/sdks/java/src/main/java/com/thoughtspot/client/model/ResponseActivationURL.java new file mode 100644 index 000000000..5588b52e9 --- /dev/null +++ b/sdks/java/src/main/java/com/thoughtspot/client/model/ResponseActivationURL.java @@ -0,0 +1,310 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client.model; + +import com.google.gson.Gson; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.TypeAdapter; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.annotations.SerializedName; +import com.google.gson.reflect.TypeToken; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import com.thoughtspot.client.JSON; +import java.io.IOException; +import java.io.Serializable; +import java.util.Arrays; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Objects; +import org.openapitools.jackson.nullable.JsonNullable; + +/** The object representation with activation link. */ +@javax.annotation.Generated( + value = "org.openapitools.codegen.languages.JavaClientCodegen", + comments = "Generator version: 7.12.0") +public class ResponseActivationURL implements Serializable { + private static final long serialVersionUID = 1L; + + public static final String SERIALIZED_NAME_ACTIVATION_LINK = "activation_link"; + + @SerializedName(SERIALIZED_NAME_ACTIVATION_LINK) + @javax.annotation.Nullable + private String activationLink; + + public ResponseActivationURL() {} + + public ResponseActivationURL activationLink(@javax.annotation.Nullable String activationLink) { + this.activationLink = activationLink; + return this; + } + + /** + * Activation link to activate the user. + * + * @return activationLink + */ + @javax.annotation.Nullable + public String getActivationLink() { + return activationLink; + } + + public void setActivationLink(@javax.annotation.Nullable String activationLink) { + this.activationLink = activationLink; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key name of the property + * @param value value of the property + * @return the ResponseActivationURL instance itself + */ + public ResponseActivationURL putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return a map of objects + */ + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key name of the property + * @return an object + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ResponseActivationURL responseActivationURL = (ResponseActivationURL) o; + return Objects.equals(this.activationLink, responseActivationURL.activationLink) + && Objects.equals( + this.additionalProperties, responseActivationURL.additionalProperties); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b + || (a != null + && b != null + && a.isPresent() + && b.isPresent() + && Objects.deepEquals(a.get(), b.get())); + } + + @Override + public int hashCode() { + return Objects.hash(activationLink, additionalProperties); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; + } + return a.isPresent() ? Arrays.deepHashCode(new Object[] {a.get()}) : 31; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ResponseActivationURL {\n"); + sb.append(" activationLink: ").append(toIndentedString(activationLink)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first + * line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("activation_link"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to ResponseActivationURL + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!ResponseActivationURL.openapiRequiredFields + .isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException( + String.format( + "The required field(s) %s in ResponseActivationURL is not found in" + + " the empty JSON string", + ResponseActivationURL.openapiRequiredFields.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if ((jsonObj.get("activation_link") != null && !jsonObj.get("activation_link").isJsonNull()) + && !jsonObj.get("activation_link").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `activation_link` to be a primitive type in the" + + " JSON string but got `%s`", + jsonObj.get("activation_link").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!ResponseActivationURL.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'ResponseActivationURL' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter = + gson.getDelegateAdapter(this, TypeToken.get(ResponseActivationURL.class)); + + return (TypeAdapter) + new TypeAdapter() { + @Override + public void write(JsonWriter out, ResponseActivationURL value) + throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + obj.remove("additionalProperties"); + // serialize additional properties + if (value.getAdditionalProperties() != null) { + for (Map.Entry entry : + value.getAdditionalProperties().entrySet()) { + if (entry.getValue() instanceof String) + obj.addProperty(entry.getKey(), (String) entry.getValue()); + else if (entry.getValue() instanceof Number) + obj.addProperty(entry.getKey(), (Number) entry.getValue()); + else if (entry.getValue() instanceof Boolean) + obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); + else if (entry.getValue() instanceof Character) + obj.addProperty( + entry.getKey(), (Character) entry.getValue()); + else { + JsonElement jsonElement = gson.toJsonTree(entry.getValue()); + if (jsonElement.isJsonArray()) { + obj.add(entry.getKey(), jsonElement.getAsJsonArray()); + } else { + obj.add(entry.getKey(), jsonElement.getAsJsonObject()); + } + } + } + } + elementAdapter.write(out, obj); + } + + @Override + public ResponseActivationURL read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // store additional fields in the deserialized instance + ResponseActivationURL instance = thisAdapter.fromJsonTree(jsonObj); + for (Map.Entry entry : jsonObj.entrySet()) { + if (!openapiFields.contains(entry.getKey())) { + if (entry.getValue().isJsonPrimitive()) { // primitive type + if (entry.getValue().getAsJsonPrimitive().isString()) + instance.putAdditionalProperty( + entry.getKey(), entry.getValue().getAsString()); + else if (entry.getValue().getAsJsonPrimitive().isNumber()) + instance.putAdditionalProperty( + entry.getKey(), entry.getValue().getAsNumber()); + else if (entry.getValue().getAsJsonPrimitive().isBoolean()) + instance.putAdditionalProperty( + entry.getKey(), + entry.getValue().getAsBoolean()); + else + throw new IllegalArgumentException( + String.format( + "The field `%s` has unknown primitive" + + " type. Value: %s", + entry.getKey(), + entry.getValue().toString())); + } else if (entry.getValue().isJsonArray()) { + instance.putAdditionalProperty( + entry.getKey(), + gson.fromJson(entry.getValue(), List.class)); + } else { // JSON object + instance.putAdditionalProperty( + entry.getKey(), + gson.fromJson(entry.getValue(), HashMap.class)); + } + } + } + return instance; + } + }.nullSafe(); + } + } + + /** + * Create an instance of ResponseActivationURL given an JSON string + * + * @param jsonString JSON string + * @return An instance of ResponseActivationURL + * @throws IOException if the JSON string is invalid with respect to ResponseActivationURL + */ + public static ResponseActivationURL fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, ResponseActivationURL.class); + } + + /** + * Convert an instance of ResponseActivationURL to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} diff --git a/sdks/java/src/main/java/com/thoughtspot/client/model/ResponseCopyObject.java b/sdks/java/src/main/java/com/thoughtspot/client/model/ResponseCopyObject.java new file mode 100644 index 000000000..130d6809e --- /dev/null +++ b/sdks/java/src/main/java/com/thoughtspot/client/model/ResponseCopyObject.java @@ -0,0 +1,310 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client.model; + +import com.google.gson.Gson; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.TypeAdapter; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.annotations.SerializedName; +import com.google.gson.reflect.TypeToken; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import com.thoughtspot.client.JSON; +import java.io.IOException; +import java.io.Serializable; +import java.util.Arrays; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Objects; +import org.openapitools.jackson.nullable.JsonNullable; + +/** ResponseCopyObject */ +@javax.annotation.Generated( + value = "org.openapitools.codegen.languages.JavaClientCodegen", + comments = "Generator version: 7.12.0") +public class ResponseCopyObject implements Serializable { + private static final long serialVersionUID = 1L; + + public static final String SERIALIZED_NAME_METADATA_ID = "metadata_id"; + + @SerializedName(SERIALIZED_NAME_METADATA_ID) + @javax.annotation.Nullable + private String metadataId; + + public ResponseCopyObject() {} + + public ResponseCopyObject metadataId(@javax.annotation.Nullable String metadataId) { + this.metadataId = metadataId; + return this; + } + + /** + * The unique identifier of the object. + * + * @return metadataId + */ + @javax.annotation.Nullable + public String getMetadataId() { + return metadataId; + } + + public void setMetadataId(@javax.annotation.Nullable String metadataId) { + this.metadataId = metadataId; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key name of the property + * @param value value of the property + * @return the ResponseCopyObject instance itself + */ + public ResponseCopyObject putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return a map of objects + */ + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key name of the property + * @return an object + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ResponseCopyObject responseCopyObject = (ResponseCopyObject) o; + return Objects.equals(this.metadataId, responseCopyObject.metadataId) + && Objects.equals( + this.additionalProperties, responseCopyObject.additionalProperties); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b + || (a != null + && b != null + && a.isPresent() + && b.isPresent() + && Objects.deepEquals(a.get(), b.get())); + } + + @Override + public int hashCode() { + return Objects.hash(metadataId, additionalProperties); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; + } + return a.isPresent() ? Arrays.deepHashCode(new Object[] {a.get()}) : 31; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ResponseCopyObject {\n"); + sb.append(" metadataId: ").append(toIndentedString(metadataId)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first + * line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("metadata_id"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to ResponseCopyObject + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!ResponseCopyObject.openapiRequiredFields + .isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException( + String.format( + "The required field(s) %s in ResponseCopyObject is not found in" + + " the empty JSON string", + ResponseCopyObject.openapiRequiredFields.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if ((jsonObj.get("metadata_id") != null && !jsonObj.get("metadata_id").isJsonNull()) + && !jsonObj.get("metadata_id").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `metadata_id` to be a primitive type in the JSON" + + " string but got `%s`", + jsonObj.get("metadata_id").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!ResponseCopyObject.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'ResponseCopyObject' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter = + gson.getDelegateAdapter(this, TypeToken.get(ResponseCopyObject.class)); + + return (TypeAdapter) + new TypeAdapter() { + @Override + public void write(JsonWriter out, ResponseCopyObject value) + throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + obj.remove("additionalProperties"); + // serialize additional properties + if (value.getAdditionalProperties() != null) { + for (Map.Entry entry : + value.getAdditionalProperties().entrySet()) { + if (entry.getValue() instanceof String) + obj.addProperty(entry.getKey(), (String) entry.getValue()); + else if (entry.getValue() instanceof Number) + obj.addProperty(entry.getKey(), (Number) entry.getValue()); + else if (entry.getValue() instanceof Boolean) + obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); + else if (entry.getValue() instanceof Character) + obj.addProperty( + entry.getKey(), (Character) entry.getValue()); + else { + JsonElement jsonElement = gson.toJsonTree(entry.getValue()); + if (jsonElement.isJsonArray()) { + obj.add(entry.getKey(), jsonElement.getAsJsonArray()); + } else { + obj.add(entry.getKey(), jsonElement.getAsJsonObject()); + } + } + } + } + elementAdapter.write(out, obj); + } + + @Override + public ResponseCopyObject read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // store additional fields in the deserialized instance + ResponseCopyObject instance = thisAdapter.fromJsonTree(jsonObj); + for (Map.Entry entry : jsonObj.entrySet()) { + if (!openapiFields.contains(entry.getKey())) { + if (entry.getValue().isJsonPrimitive()) { // primitive type + if (entry.getValue().getAsJsonPrimitive().isString()) + instance.putAdditionalProperty( + entry.getKey(), entry.getValue().getAsString()); + else if (entry.getValue().getAsJsonPrimitive().isNumber()) + instance.putAdditionalProperty( + entry.getKey(), entry.getValue().getAsNumber()); + else if (entry.getValue().getAsJsonPrimitive().isBoolean()) + instance.putAdditionalProperty( + entry.getKey(), + entry.getValue().getAsBoolean()); + else + throw new IllegalArgumentException( + String.format( + "The field `%s` has unknown primitive" + + " type. Value: %s", + entry.getKey(), + entry.getValue().toString())); + } else if (entry.getValue().isJsonArray()) { + instance.putAdditionalProperty( + entry.getKey(), + gson.fromJson(entry.getValue(), List.class)); + } else { // JSON object + instance.putAdditionalProperty( + entry.getKey(), + gson.fromJson(entry.getValue(), HashMap.class)); + } + } + } + return instance; + } + }.nullSafe(); + } + } + + /** + * Create an instance of ResponseCopyObject given an JSON string + * + * @param jsonString JSON string + * @return An instance of ResponseCopyObject + * @throws IOException if the JSON string is invalid with respect to ResponseCopyObject + */ + public static ResponseCopyObject fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, ResponseCopyObject.class); + } + + /** + * Convert an instance of ResponseCopyObject to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} diff --git a/sdks/java/src/main/java/com/thoughtspot/client/model/ResponseCustomAction.java b/sdks/java/src/main/java/com/thoughtspot/client/model/ResponseCustomAction.java new file mode 100644 index 000000000..19caae4c9 --- /dev/null +++ b/sdks/java/src/main/java/com/thoughtspot/client/model/ResponseCustomAction.java @@ -0,0 +1,552 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client.model; + +import com.google.gson.Gson; +import com.google.gson.JsonArray; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.TypeAdapter; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.annotations.SerializedName; +import com.google.gson.reflect.TypeToken; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import com.thoughtspot.client.JSON; +import java.io.IOException; +import java.io.Serializable; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Objects; +import org.openapitools.jackson.nullable.JsonNullable; + +/** Custom action details */ +@javax.annotation.Generated( + value = "org.openapitools.codegen.languages.JavaClientCodegen", + comments = "Generator version: 7.12.0") +public class ResponseCustomAction implements Serializable { + private static final long serialVersionUID = 1L; + + public static final String SERIALIZED_NAME_ACTION_DETAILS = "action_details"; + + @SerializedName(SERIALIZED_NAME_ACTION_DETAILS) + @javax.annotation.Nonnull + private ActionDetails actionDetails; + + public static final String SERIALIZED_NAME_DEFAULT_ACTION_CONFIG = "default_action_config"; + + @SerializedName(SERIALIZED_NAME_DEFAULT_ACTION_CONFIG) + @javax.annotation.Nonnull + private DefaultActionConfig defaultActionConfig; + + public static final String SERIALIZED_NAME_ID = "id"; + + @SerializedName(SERIALIZED_NAME_ID) + @javax.annotation.Nonnull + private String id; + + public static final String SERIALIZED_NAME_METADATA_ASSOCIATION = "metadata_association"; + + @SerializedName(SERIALIZED_NAME_METADATA_ASSOCIATION) + @javax.annotation.Nullable + private List metadataAssociation; + + public static final String SERIALIZED_NAME_NAME = "name"; + + @SerializedName(SERIALIZED_NAME_NAME) + @javax.annotation.Nonnull + private String name; + + public static final String SERIALIZED_NAME_USER_GROUPS = "user_groups"; + + @SerializedName(SERIALIZED_NAME_USER_GROUPS) + @javax.annotation.Nullable + private List userGroups; + + public ResponseCustomAction() {} + + public ResponseCustomAction actionDetails( + @javax.annotation.Nonnull ActionDetails actionDetails) { + this.actionDetails = actionDetails; + return this; + } + + /** + * Get actionDetails + * + * @return actionDetails + */ + @javax.annotation.Nonnull + public ActionDetails getActionDetails() { + return actionDetails; + } + + public void setActionDetails(@javax.annotation.Nonnull ActionDetails actionDetails) { + this.actionDetails = actionDetails; + } + + public ResponseCustomAction defaultActionConfig( + @javax.annotation.Nonnull DefaultActionConfig defaultActionConfig) { + this.defaultActionConfig = defaultActionConfig; + return this; + } + + /** + * Get defaultActionConfig + * + * @return defaultActionConfig + */ + @javax.annotation.Nonnull + public DefaultActionConfig getDefaultActionConfig() { + return defaultActionConfig; + } + + public void setDefaultActionConfig( + @javax.annotation.Nonnull DefaultActionConfig defaultActionConfig) { + this.defaultActionConfig = defaultActionConfig; + } + + public ResponseCustomAction id(@javax.annotation.Nonnull String id) { + this.id = id; + return this; + } + + /** + * Unique Id of the custom action. + * + * @return id + */ + @javax.annotation.Nonnull + public String getId() { + return id; + } + + public void setId(@javax.annotation.Nonnull String id) { + this.id = id; + } + + public ResponseCustomAction metadataAssociation( + @javax.annotation.Nullable List metadataAssociation) { + this.metadataAssociation = metadataAssociation; + return this; + } + + public ResponseCustomAction addMetadataAssociationItem( + MetadataAssociationItem metadataAssociationItem) { + if (this.metadataAssociation == null) { + this.metadataAssociation = new ArrayList<>(); + } + this.metadataAssociation.add(metadataAssociationItem); + return this; + } + + /** + * Metadata objects to assign the the custom action to. + * + * @return metadataAssociation + */ + @javax.annotation.Nullable + public List getMetadataAssociation() { + return metadataAssociation; + } + + public void setMetadataAssociation( + @javax.annotation.Nullable List metadataAssociation) { + this.metadataAssociation = metadataAssociation; + } + + public ResponseCustomAction name(@javax.annotation.Nonnull String name) { + this.name = name; + return this; + } + + /** + * Unique name of the custom action. + * + * @return name + */ + @javax.annotation.Nonnull + public String getName() { + return name; + } + + public void setName(@javax.annotation.Nonnull String name) { + this.name = name; + } + + public ResponseCustomAction userGroups( + @javax.annotation.Nullable List userGroups) { + this.userGroups = userGroups; + return this; + } + + public ResponseCustomAction addUserGroupsItem(ObjectIDAndName userGroupsItem) { + if (this.userGroups == null) { + this.userGroups = new ArrayList<>(); + } + this.userGroups.add(userGroupsItem); + return this; + } + + /** + * Unique ID or name of the User groups which are associated with the custom action. + * + * @return userGroups + */ + @javax.annotation.Nullable + public List getUserGroups() { + return userGroups; + } + + public void setUserGroups(@javax.annotation.Nullable List userGroups) { + this.userGroups = userGroups; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key name of the property + * @param value value of the property + * @return the ResponseCustomAction instance itself + */ + public ResponseCustomAction putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return a map of objects + */ + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key name of the property + * @return an object + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ResponseCustomAction responseCustomAction = (ResponseCustomAction) o; + return Objects.equals(this.actionDetails, responseCustomAction.actionDetails) + && Objects.equals( + this.defaultActionConfig, responseCustomAction.defaultActionConfig) + && Objects.equals(this.id, responseCustomAction.id) + && Objects.equals( + this.metadataAssociation, responseCustomAction.metadataAssociation) + && Objects.equals(this.name, responseCustomAction.name) + && Objects.equals(this.userGroups, responseCustomAction.userGroups) + && Objects.equals( + this.additionalProperties, responseCustomAction.additionalProperties); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b + || (a != null + && b != null + && a.isPresent() + && b.isPresent() + && Objects.deepEquals(a.get(), b.get())); + } + + @Override + public int hashCode() { + return Objects.hash( + actionDetails, + defaultActionConfig, + id, + metadataAssociation, + name, + userGroups, + additionalProperties); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; + } + return a.isPresent() ? Arrays.deepHashCode(new Object[] {a.get()}) : 31; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ResponseCustomAction {\n"); + sb.append(" actionDetails: ").append(toIndentedString(actionDetails)).append("\n"); + sb.append(" defaultActionConfig: ") + .append(toIndentedString(defaultActionConfig)) + .append("\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" metadataAssociation: ") + .append(toIndentedString(metadataAssociation)) + .append("\n"); + sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append(" userGroups: ").append(toIndentedString(userGroups)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first + * line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("action_details"); + openapiFields.add("default_action_config"); + openapiFields.add("id"); + openapiFields.add("metadata_association"); + openapiFields.add("name"); + openapiFields.add("user_groups"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + openapiRequiredFields.add("action_details"); + openapiRequiredFields.add("default_action_config"); + openapiRequiredFields.add("id"); + openapiRequiredFields.add("name"); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to ResponseCustomAction + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!ResponseCustomAction.openapiRequiredFields + .isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException( + String.format( + "The required field(s) %s in ResponseCustomAction is not found in" + + " the empty JSON string", + ResponseCustomAction.openapiRequiredFields.toString())); + } + } + + // check to make sure all required properties/fields are present in the JSON string + for (String requiredField : ResponseCustomAction.openapiRequiredFields) { + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException( + String.format( + "The required field `%s` is not found in the JSON string: %s", + requiredField, jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // validate the required field `action_details` + ActionDetails.validateJsonElement(jsonObj.get("action_details")); + // validate the required field `default_action_config` + DefaultActionConfig.validateJsonElement(jsonObj.get("default_action_config")); + if (!jsonObj.get("id").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `id` to be a primitive type in the JSON string but" + + " got `%s`", + jsonObj.get("id").toString())); + } + if (jsonObj.get("metadata_association") != null + && !jsonObj.get("metadata_association").isJsonNull()) { + JsonArray jsonArraymetadataAssociation = jsonObj.getAsJsonArray("metadata_association"); + if (jsonArraymetadataAssociation != null) { + // ensure the json data is an array + if (!jsonObj.get("metadata_association").isJsonArray()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `metadata_association` to be an array in" + + " the JSON string but got `%s`", + jsonObj.get("metadata_association").toString())); + } + + // validate the optional field `metadata_association` (array) + for (int i = 0; i < jsonArraymetadataAssociation.size(); i++) { + MetadataAssociationItem.validateJsonElement( + jsonArraymetadataAssociation.get(i)); + } + ; + } + } + if (!jsonObj.get("name").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `name` to be a primitive type in the JSON string" + + " but got `%s`", + jsonObj.get("name").toString())); + } + if (jsonObj.get("user_groups") != null && !jsonObj.get("user_groups").isJsonNull()) { + JsonArray jsonArrayuserGroups = jsonObj.getAsJsonArray("user_groups"); + if (jsonArrayuserGroups != null) { + // ensure the json data is an array + if (!jsonObj.get("user_groups").isJsonArray()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `user_groups` to be an array in the JSON" + + " string but got `%s`", + jsonObj.get("user_groups").toString())); + } + + // validate the optional field `user_groups` (array) + for (int i = 0; i < jsonArrayuserGroups.size(); i++) { + ObjectIDAndName.validateJsonElement(jsonArrayuserGroups.get(i)); + } + ; + } + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!ResponseCustomAction.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'ResponseCustomAction' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter = + gson.getDelegateAdapter(this, TypeToken.get(ResponseCustomAction.class)); + + return (TypeAdapter) + new TypeAdapter() { + @Override + public void write(JsonWriter out, ResponseCustomAction value) + throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + obj.remove("additionalProperties"); + // serialize additional properties + if (value.getAdditionalProperties() != null) { + for (Map.Entry entry : + value.getAdditionalProperties().entrySet()) { + if (entry.getValue() instanceof String) + obj.addProperty(entry.getKey(), (String) entry.getValue()); + else if (entry.getValue() instanceof Number) + obj.addProperty(entry.getKey(), (Number) entry.getValue()); + else if (entry.getValue() instanceof Boolean) + obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); + else if (entry.getValue() instanceof Character) + obj.addProperty( + entry.getKey(), (Character) entry.getValue()); + else { + JsonElement jsonElement = gson.toJsonTree(entry.getValue()); + if (jsonElement.isJsonArray()) { + obj.add(entry.getKey(), jsonElement.getAsJsonArray()); + } else { + obj.add(entry.getKey(), jsonElement.getAsJsonObject()); + } + } + } + } + elementAdapter.write(out, obj); + } + + @Override + public ResponseCustomAction read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // store additional fields in the deserialized instance + ResponseCustomAction instance = thisAdapter.fromJsonTree(jsonObj); + for (Map.Entry entry : jsonObj.entrySet()) { + if (!openapiFields.contains(entry.getKey())) { + if (entry.getValue().isJsonPrimitive()) { // primitive type + if (entry.getValue().getAsJsonPrimitive().isString()) + instance.putAdditionalProperty( + entry.getKey(), entry.getValue().getAsString()); + else if (entry.getValue().getAsJsonPrimitive().isNumber()) + instance.putAdditionalProperty( + entry.getKey(), entry.getValue().getAsNumber()); + else if (entry.getValue().getAsJsonPrimitive().isBoolean()) + instance.putAdditionalProperty( + entry.getKey(), + entry.getValue().getAsBoolean()); + else + throw new IllegalArgumentException( + String.format( + "The field `%s` has unknown primitive" + + " type. Value: %s", + entry.getKey(), + entry.getValue().toString())); + } else if (entry.getValue().isJsonArray()) { + instance.putAdditionalProperty( + entry.getKey(), + gson.fromJson(entry.getValue(), List.class)); + } else { // JSON object + instance.putAdditionalProperty( + entry.getKey(), + gson.fromJson(entry.getValue(), HashMap.class)); + } + } + } + return instance; + } + }.nullSafe(); + } + } + + /** + * Create an instance of ResponseCustomAction given an JSON string + * + * @param jsonString JSON string + * @return An instance of ResponseCustomAction + * @throws IOException if the JSON string is invalid with respect to ResponseCustomAction + */ + public static ResponseCustomAction fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, ResponseCustomAction.class); + } + + /** + * Convert an instance of ResponseCustomAction to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} diff --git a/sdks/java/src/main/java/com/thoughtspot/client/model/ResponseFailedEntities.java b/sdks/java/src/main/java/com/thoughtspot/client/model/ResponseFailedEntities.java new file mode 100644 index 000000000..c51cdf6ee --- /dev/null +++ b/sdks/java/src/main/java/com/thoughtspot/client/model/ResponseFailedEntities.java @@ -0,0 +1,320 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client.model; + +import com.google.gson.Gson; +import com.google.gson.JsonArray; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.TypeAdapter; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.annotations.SerializedName; +import com.google.gson.reflect.TypeToken; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import com.thoughtspot.client.JSON; +import java.io.IOException; +import java.io.Serializable; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Objects; + +/** Wrapper for the failed entities, as they are inside a 'data' field in the response. */ +@javax.annotation.Generated( + value = "org.openapitools.codegen.languages.JavaClientCodegen", + comments = "Generator version: 7.12.0") +public class ResponseFailedEntities implements Serializable { + private static final long serialVersionUID = 1L; + + public static final String SERIALIZED_NAME_DATA = "data"; + + @SerializedName(SERIALIZED_NAME_DATA) + @javax.annotation.Nonnull + private List data; + + public ResponseFailedEntities() {} + + public ResponseFailedEntities data(@javax.annotation.Nonnull List data) { + this.data = data; + return this; + } + + public ResponseFailedEntities addDataItem(ResponseFailedEntity dataItem) { + if (this.data == null) { + this.data = new ArrayList<>(); + } + this.data.add(dataItem); + return this; + } + + /** + * Get data + * + * @return data + */ + @javax.annotation.Nonnull + public List getData() { + return data; + } + + public void setData(@javax.annotation.Nonnull List data) { + this.data = data; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key name of the property + * @param value value of the property + * @return the ResponseFailedEntities instance itself + */ + public ResponseFailedEntities putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return a map of objects + */ + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key name of the property + * @return an object + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ResponseFailedEntities responseFailedEntities = (ResponseFailedEntities) o; + return Objects.equals(this.data, responseFailedEntities.data) + && Objects.equals( + this.additionalProperties, responseFailedEntities.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(data, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ResponseFailedEntities {\n"); + sb.append(" data: ").append(toIndentedString(data)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first + * line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("data"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + openapiRequiredFields.add("data"); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to ResponseFailedEntities + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!ResponseFailedEntities.openapiRequiredFields + .isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException( + String.format( + "The required field(s) %s in ResponseFailedEntities is not found" + + " in the empty JSON string", + ResponseFailedEntities.openapiRequiredFields.toString())); + } + } + + // check to make sure all required properties/fields are present in the JSON string + for (String requiredField : ResponseFailedEntities.openapiRequiredFields) { + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException( + String.format( + "The required field `%s` is not found in the JSON string: %s", + requiredField, jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // ensure the json data is an array + if (!jsonObj.get("data").isJsonArray()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `data` to be an array in the JSON string but got" + + " `%s`", + jsonObj.get("data").toString())); + } + + JsonArray jsonArraydata = jsonObj.getAsJsonArray("data"); + // validate the required field `data` (array) + for (int i = 0; i < jsonArraydata.size(); i++) { + ResponseFailedEntity.validateJsonElement(jsonArraydata.get(i)); + } + ; + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!ResponseFailedEntities.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'ResponseFailedEntities' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter = + gson.getDelegateAdapter(this, TypeToken.get(ResponseFailedEntities.class)); + + return (TypeAdapter) + new TypeAdapter() { + @Override + public void write(JsonWriter out, ResponseFailedEntities value) + throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + obj.remove("additionalProperties"); + // serialize additional properties + if (value.getAdditionalProperties() != null) { + for (Map.Entry entry : + value.getAdditionalProperties().entrySet()) { + if (entry.getValue() instanceof String) + obj.addProperty(entry.getKey(), (String) entry.getValue()); + else if (entry.getValue() instanceof Number) + obj.addProperty(entry.getKey(), (Number) entry.getValue()); + else if (entry.getValue() instanceof Boolean) + obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); + else if (entry.getValue() instanceof Character) + obj.addProperty( + entry.getKey(), (Character) entry.getValue()); + else { + JsonElement jsonElement = gson.toJsonTree(entry.getValue()); + if (jsonElement.isJsonArray()) { + obj.add(entry.getKey(), jsonElement.getAsJsonArray()); + } else { + obj.add(entry.getKey(), jsonElement.getAsJsonObject()); + } + } + } + } + elementAdapter.write(out, obj); + } + + @Override + public ResponseFailedEntities read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // store additional fields in the deserialized instance + ResponseFailedEntities instance = thisAdapter.fromJsonTree(jsonObj); + for (Map.Entry entry : jsonObj.entrySet()) { + if (!openapiFields.contains(entry.getKey())) { + if (entry.getValue().isJsonPrimitive()) { // primitive type + if (entry.getValue().getAsJsonPrimitive().isString()) + instance.putAdditionalProperty( + entry.getKey(), entry.getValue().getAsString()); + else if (entry.getValue().getAsJsonPrimitive().isNumber()) + instance.putAdditionalProperty( + entry.getKey(), entry.getValue().getAsNumber()); + else if (entry.getValue().getAsJsonPrimitive().isBoolean()) + instance.putAdditionalProperty( + entry.getKey(), + entry.getValue().getAsBoolean()); + else + throw new IllegalArgumentException( + String.format( + "The field `%s` has unknown primitive" + + " type. Value: %s", + entry.getKey(), + entry.getValue().toString())); + } else if (entry.getValue().isJsonArray()) { + instance.putAdditionalProperty( + entry.getKey(), + gson.fromJson(entry.getValue(), List.class)); + } else { // JSON object + instance.putAdditionalProperty( + entry.getKey(), + gson.fromJson(entry.getValue(), HashMap.class)); + } + } + } + return instance; + } + }.nullSafe(); + } + } + + /** + * Create an instance of ResponseFailedEntities given an JSON string + * + * @param jsonString JSON string + * @return An instance of ResponseFailedEntities + * @throws IOException if the JSON string is invalid with respect to ResponseFailedEntities + */ + public static ResponseFailedEntities fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, ResponseFailedEntities.class); + } + + /** + * Convert an instance of ResponseFailedEntities to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} diff --git a/sdks/java/src/main/java/com/thoughtspot/client/model/ResponseFailedEntity.java b/sdks/java/src/main/java/com/thoughtspot/client/model/ResponseFailedEntity.java new file mode 100644 index 000000000..df0924008 --- /dev/null +++ b/sdks/java/src/main/java/com/thoughtspot/client/model/ResponseFailedEntity.java @@ -0,0 +1,374 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client.model; + +import com.google.gson.Gson; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.TypeAdapter; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.annotations.SerializedName; +import com.google.gson.reflect.TypeToken; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import com.thoughtspot.client.JSON; +import java.io.IOException; +import java.io.Serializable; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Objects; + +/** Unique ID of the failed worksheet. */ +@javax.annotation.Generated( + value = "org.openapitools.codegen.languages.JavaClientCodegen", + comments = "Generator version: 7.12.0") +public class ResponseFailedEntity implements Serializable { + private static final long serialVersionUID = 1L; + + public static final String SERIALIZED_NAME_ID = "id"; + + @SerializedName(SERIALIZED_NAME_ID) + @javax.annotation.Nonnull + private String id; + + public static final String SERIALIZED_NAME_NAME = "name"; + + @SerializedName(SERIALIZED_NAME_NAME) + @javax.annotation.Nonnull + private String name; + + public static final String SERIALIZED_NAME_ERROR = "error"; + + @SerializedName(SERIALIZED_NAME_ERROR) + @javax.annotation.Nonnull + private String error; + + public ResponseFailedEntity() {} + + public ResponseFailedEntity id(@javax.annotation.Nonnull String id) { + this.id = id; + return this; + } + + /** + * Get id + * + * @return id + */ + @javax.annotation.Nonnull + public String getId() { + return id; + } + + public void setId(@javax.annotation.Nonnull String id) { + this.id = id; + } + + public ResponseFailedEntity name(@javax.annotation.Nonnull String name) { + this.name = name; + return this; + } + + /** + * Name of the worksheet that failed to convert. + * + * @return name + */ + @javax.annotation.Nonnull + public String getName() { + return name; + } + + public void setName(@javax.annotation.Nonnull String name) { + this.name = name; + } + + public ResponseFailedEntity error(@javax.annotation.Nonnull String error) { + this.error = error; + return this; + } + + /** + * Error details related to the failed conversion. + * + * @return error + */ + @javax.annotation.Nonnull + public String getError() { + return error; + } + + public void setError(@javax.annotation.Nonnull String error) { + this.error = error; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key name of the property + * @param value value of the property + * @return the ResponseFailedEntity instance itself + */ + public ResponseFailedEntity putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return a map of objects + */ + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key name of the property + * @return an object + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ResponseFailedEntity responseFailedEntity = (ResponseFailedEntity) o; + return Objects.equals(this.id, responseFailedEntity.id) + && Objects.equals(this.name, responseFailedEntity.name) + && Objects.equals(this.error, responseFailedEntity.error) + && Objects.equals( + this.additionalProperties, responseFailedEntity.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(id, name, error, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ResponseFailedEntity {\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append(" error: ").append(toIndentedString(error)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first + * line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("id"); + openapiFields.add("name"); + openapiFields.add("error"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + openapiRequiredFields.add("id"); + openapiRequiredFields.add("name"); + openapiRequiredFields.add("error"); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to ResponseFailedEntity + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!ResponseFailedEntity.openapiRequiredFields + .isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException( + String.format( + "The required field(s) %s in ResponseFailedEntity is not found in" + + " the empty JSON string", + ResponseFailedEntity.openapiRequiredFields.toString())); + } + } + + // check to make sure all required properties/fields are present in the JSON string + for (String requiredField : ResponseFailedEntity.openapiRequiredFields) { + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException( + String.format( + "The required field `%s` is not found in the JSON string: %s", + requiredField, jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if (!jsonObj.get("id").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `id` to be a primitive type in the JSON string but" + + " got `%s`", + jsonObj.get("id").toString())); + } + if (!jsonObj.get("name").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `name` to be a primitive type in the JSON string" + + " but got `%s`", + jsonObj.get("name").toString())); + } + if (!jsonObj.get("error").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `error` to be a primitive type in the JSON string" + + " but got `%s`", + jsonObj.get("error").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!ResponseFailedEntity.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'ResponseFailedEntity' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter = + gson.getDelegateAdapter(this, TypeToken.get(ResponseFailedEntity.class)); + + return (TypeAdapter) + new TypeAdapter() { + @Override + public void write(JsonWriter out, ResponseFailedEntity value) + throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + obj.remove("additionalProperties"); + // serialize additional properties + if (value.getAdditionalProperties() != null) { + for (Map.Entry entry : + value.getAdditionalProperties().entrySet()) { + if (entry.getValue() instanceof String) + obj.addProperty(entry.getKey(), (String) entry.getValue()); + else if (entry.getValue() instanceof Number) + obj.addProperty(entry.getKey(), (Number) entry.getValue()); + else if (entry.getValue() instanceof Boolean) + obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); + else if (entry.getValue() instanceof Character) + obj.addProperty( + entry.getKey(), (Character) entry.getValue()); + else { + JsonElement jsonElement = gson.toJsonTree(entry.getValue()); + if (jsonElement.isJsonArray()) { + obj.add(entry.getKey(), jsonElement.getAsJsonArray()); + } else { + obj.add(entry.getKey(), jsonElement.getAsJsonObject()); + } + } + } + } + elementAdapter.write(out, obj); + } + + @Override + public ResponseFailedEntity read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // store additional fields in the deserialized instance + ResponseFailedEntity instance = thisAdapter.fromJsonTree(jsonObj); + for (Map.Entry entry : jsonObj.entrySet()) { + if (!openapiFields.contains(entry.getKey())) { + if (entry.getValue().isJsonPrimitive()) { // primitive type + if (entry.getValue().getAsJsonPrimitive().isString()) + instance.putAdditionalProperty( + entry.getKey(), entry.getValue().getAsString()); + else if (entry.getValue().getAsJsonPrimitive().isNumber()) + instance.putAdditionalProperty( + entry.getKey(), entry.getValue().getAsNumber()); + else if (entry.getValue().getAsJsonPrimitive().isBoolean()) + instance.putAdditionalProperty( + entry.getKey(), + entry.getValue().getAsBoolean()); + else + throw new IllegalArgumentException( + String.format( + "The field `%s` has unknown primitive" + + " type. Value: %s", + entry.getKey(), + entry.getValue().toString())); + } else if (entry.getValue().isJsonArray()) { + instance.putAdditionalProperty( + entry.getKey(), + gson.fromJson(entry.getValue(), List.class)); + } else { // JSON object + instance.putAdditionalProperty( + entry.getKey(), + gson.fromJson(entry.getValue(), HashMap.class)); + } + } + } + return instance; + } + }.nullSafe(); + } + } + + /** + * Create an instance of ResponseFailedEntity given an JSON string + * + * @param jsonString JSON string + * @return An instance of ResponseFailedEntity + * @throws IOException if the JSON string is invalid with respect to ResponseFailedEntity + */ + public static ResponseFailedEntity fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, ResponseFailedEntity.class); + } + + /** + * Convert an instance of ResponseFailedEntity to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} diff --git a/sdks/java/src/main/java/com/thoughtspot/client/model/ResponseIncompleteEntities.java b/sdks/java/src/main/java/com/thoughtspot/client/model/ResponseIncompleteEntities.java new file mode 100644 index 000000000..1703fff29 --- /dev/null +++ b/sdks/java/src/main/java/com/thoughtspot/client/model/ResponseIncompleteEntities.java @@ -0,0 +1,324 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client.model; + +import com.google.gson.Gson; +import com.google.gson.JsonArray; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.TypeAdapter; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.annotations.SerializedName; +import com.google.gson.reflect.TypeToken; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import com.thoughtspot.client.JSON; +import java.io.IOException; +import java.io.Serializable; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Objects; + +/** + * Wrapper for the incomplete entities, as they are inside a 'data' field in the response. + */ +@javax.annotation.Generated( + value = "org.openapitools.codegen.languages.JavaClientCodegen", + comments = "Generator version: 7.12.0") +public class ResponseIncompleteEntities implements Serializable { + private static final long serialVersionUID = 1L; + + public static final String SERIALIZED_NAME_DATA = "data"; + + @SerializedName(SERIALIZED_NAME_DATA) + @javax.annotation.Nonnull + private List data; + + public ResponseIncompleteEntities() {} + + public ResponseIncompleteEntities data( + @javax.annotation.Nonnull List data) { + this.data = data; + return this; + } + + public ResponseIncompleteEntities addDataItem(ResponseIncompleteEntity dataItem) { + if (this.data == null) { + this.data = new ArrayList<>(); + } + this.data.add(dataItem); + return this; + } + + /** + * Get data + * + * @return data + */ + @javax.annotation.Nonnull + public List getData() { + return data; + } + + public void setData(@javax.annotation.Nonnull List data) { + this.data = data; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key name of the property + * @param value value of the property + * @return the ResponseIncompleteEntities instance itself + */ + public ResponseIncompleteEntities putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return a map of objects + */ + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key name of the property + * @return an object + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ResponseIncompleteEntities responseIncompleteEntities = (ResponseIncompleteEntities) o; + return Objects.equals(this.data, responseIncompleteEntities.data) + && Objects.equals( + this.additionalProperties, responseIncompleteEntities.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(data, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ResponseIncompleteEntities {\n"); + sb.append(" data: ").append(toIndentedString(data)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first + * line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("data"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + openapiRequiredFields.add("data"); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to ResponseIncompleteEntities + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!ResponseIncompleteEntities.openapiRequiredFields + .isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException( + String.format( + "The required field(s) %s in ResponseIncompleteEntities is not" + + " found in the empty JSON string", + ResponseIncompleteEntities.openapiRequiredFields.toString())); + } + } + + // check to make sure all required properties/fields are present in the JSON string + for (String requiredField : ResponseIncompleteEntities.openapiRequiredFields) { + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException( + String.format( + "The required field `%s` is not found in the JSON string: %s", + requiredField, jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // ensure the json data is an array + if (!jsonObj.get("data").isJsonArray()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `data` to be an array in the JSON string but got" + + " `%s`", + jsonObj.get("data").toString())); + } + + JsonArray jsonArraydata = jsonObj.getAsJsonArray("data"); + // validate the required field `data` (array) + for (int i = 0; i < jsonArraydata.size(); i++) { + ResponseIncompleteEntity.validateJsonElement(jsonArraydata.get(i)); + } + ; + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!ResponseIncompleteEntities.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'ResponseIncompleteEntities' and its + // subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter = + gson.getDelegateAdapter(this, TypeToken.get(ResponseIncompleteEntities.class)); + + return (TypeAdapter) + new TypeAdapter() { + @Override + public void write(JsonWriter out, ResponseIncompleteEntities value) + throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + obj.remove("additionalProperties"); + // serialize additional properties + if (value.getAdditionalProperties() != null) { + for (Map.Entry entry : + value.getAdditionalProperties().entrySet()) { + if (entry.getValue() instanceof String) + obj.addProperty(entry.getKey(), (String) entry.getValue()); + else if (entry.getValue() instanceof Number) + obj.addProperty(entry.getKey(), (Number) entry.getValue()); + else if (entry.getValue() instanceof Boolean) + obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); + else if (entry.getValue() instanceof Character) + obj.addProperty( + entry.getKey(), (Character) entry.getValue()); + else { + JsonElement jsonElement = gson.toJsonTree(entry.getValue()); + if (jsonElement.isJsonArray()) { + obj.add(entry.getKey(), jsonElement.getAsJsonArray()); + } else { + obj.add(entry.getKey(), jsonElement.getAsJsonObject()); + } + } + } + } + elementAdapter.write(out, obj); + } + + @Override + public ResponseIncompleteEntities read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // store additional fields in the deserialized instance + ResponseIncompleteEntities instance = thisAdapter.fromJsonTree(jsonObj); + for (Map.Entry entry : jsonObj.entrySet()) { + if (!openapiFields.contains(entry.getKey())) { + if (entry.getValue().isJsonPrimitive()) { // primitive type + if (entry.getValue().getAsJsonPrimitive().isString()) + instance.putAdditionalProperty( + entry.getKey(), entry.getValue().getAsString()); + else if (entry.getValue().getAsJsonPrimitive().isNumber()) + instance.putAdditionalProperty( + entry.getKey(), entry.getValue().getAsNumber()); + else if (entry.getValue().getAsJsonPrimitive().isBoolean()) + instance.putAdditionalProperty( + entry.getKey(), + entry.getValue().getAsBoolean()); + else + throw new IllegalArgumentException( + String.format( + "The field `%s` has unknown primitive" + + " type. Value: %s", + entry.getKey(), + entry.getValue().toString())); + } else if (entry.getValue().isJsonArray()) { + instance.putAdditionalProperty( + entry.getKey(), + gson.fromJson(entry.getValue(), List.class)); + } else { // JSON object + instance.putAdditionalProperty( + entry.getKey(), + gson.fromJson(entry.getValue(), HashMap.class)); + } + } + } + return instance; + } + }.nullSafe(); + } + } + + /** + * Create an instance of ResponseIncompleteEntities given an JSON string + * + * @param jsonString JSON string + * @return An instance of ResponseIncompleteEntities + * @throws IOException if the JSON string is invalid with respect to ResponseIncompleteEntities + */ + public static ResponseIncompleteEntities fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, ResponseIncompleteEntities.class); + } + + /** + * Convert an instance of ResponseIncompleteEntities to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} diff --git a/sdks/java/src/main/java/com/thoughtspot/client/model/ResponseIncompleteEntity.java b/sdks/java/src/main/java/com/thoughtspot/client/model/ResponseIncompleteEntity.java new file mode 100644 index 000000000..d2326ffe4 --- /dev/null +++ b/sdks/java/src/main/java/com/thoughtspot/client/model/ResponseIncompleteEntity.java @@ -0,0 +1,375 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client.model; + +import com.google.gson.Gson; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.TypeAdapter; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.annotations.SerializedName; +import com.google.gson.reflect.TypeToken; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import com.thoughtspot.client.JSON; +import java.io.IOException; +import java.io.Serializable; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Objects; + +/** Unique ID of the incomplete worksheet. */ +@javax.annotation.Generated( + value = "org.openapitools.codegen.languages.JavaClientCodegen", + comments = "Generator version: 7.12.0") +public class ResponseIncompleteEntity implements Serializable { + private static final long serialVersionUID = 1L; + + public static final String SERIALIZED_NAME_ID = "id"; + + @SerializedName(SERIALIZED_NAME_ID) + @javax.annotation.Nonnull + private String id; + + public static final String SERIALIZED_NAME_NAME = "name"; + + @SerializedName(SERIALIZED_NAME_NAME) + @javax.annotation.Nonnull + private String name; + + public static final String SERIALIZED_NAME_ERROR = "error"; + + @SerializedName(SERIALIZED_NAME_ERROR) + @javax.annotation.Nonnull + private String error; + + public ResponseIncompleteEntity() {} + + public ResponseIncompleteEntity id(@javax.annotation.Nonnull String id) { + this.id = id; + return this; + } + + /** + * Get id + * + * @return id + */ + @javax.annotation.Nonnull + public String getId() { + return id; + } + + public void setId(@javax.annotation.Nonnull String id) { + this.id = id; + } + + public ResponseIncompleteEntity name(@javax.annotation.Nonnull String name) { + this.name = name; + return this; + } + + /** + * Name of the incomplete worksheet. + * + * @return name + */ + @javax.annotation.Nonnull + public String getName() { + return name; + } + + public void setName(@javax.annotation.Nonnull String name) { + this.name = name; + } + + public ResponseIncompleteEntity error(@javax.annotation.Nonnull String error) { + this.error = error; + return this; + } + + /** + * Error details related to the incomplete conversion. + * + * @return error + */ + @javax.annotation.Nonnull + public String getError() { + return error; + } + + public void setError(@javax.annotation.Nonnull String error) { + this.error = error; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key name of the property + * @param value value of the property + * @return the ResponseIncompleteEntity instance itself + */ + public ResponseIncompleteEntity putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return a map of objects + */ + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key name of the property + * @return an object + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ResponseIncompleteEntity responseIncompleteEntity = (ResponseIncompleteEntity) o; + return Objects.equals(this.id, responseIncompleteEntity.id) + && Objects.equals(this.name, responseIncompleteEntity.name) + && Objects.equals(this.error, responseIncompleteEntity.error) + && Objects.equals( + this.additionalProperties, responseIncompleteEntity.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(id, name, error, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ResponseIncompleteEntity {\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append(" error: ").append(toIndentedString(error)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first + * line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("id"); + openapiFields.add("name"); + openapiFields.add("error"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + openapiRequiredFields.add("id"); + openapiRequiredFields.add("name"); + openapiRequiredFields.add("error"); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to ResponseIncompleteEntity + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!ResponseIncompleteEntity.openapiRequiredFields + .isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException( + String.format( + "The required field(s) %s in ResponseIncompleteEntity is not found" + + " in the empty JSON string", + ResponseIncompleteEntity.openapiRequiredFields.toString())); + } + } + + // check to make sure all required properties/fields are present in the JSON string + for (String requiredField : ResponseIncompleteEntity.openapiRequiredFields) { + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException( + String.format( + "The required field `%s` is not found in the JSON string: %s", + requiredField, jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if (!jsonObj.get("id").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `id` to be a primitive type in the JSON string but" + + " got `%s`", + jsonObj.get("id").toString())); + } + if (!jsonObj.get("name").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `name` to be a primitive type in the JSON string" + + " but got `%s`", + jsonObj.get("name").toString())); + } + if (!jsonObj.get("error").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `error` to be a primitive type in the JSON string" + + " but got `%s`", + jsonObj.get("error").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!ResponseIncompleteEntity.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'ResponseIncompleteEntity' and its + // subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter = + gson.getDelegateAdapter(this, TypeToken.get(ResponseIncompleteEntity.class)); + + return (TypeAdapter) + new TypeAdapter() { + @Override + public void write(JsonWriter out, ResponseIncompleteEntity value) + throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + obj.remove("additionalProperties"); + // serialize additional properties + if (value.getAdditionalProperties() != null) { + for (Map.Entry entry : + value.getAdditionalProperties().entrySet()) { + if (entry.getValue() instanceof String) + obj.addProperty(entry.getKey(), (String) entry.getValue()); + else if (entry.getValue() instanceof Number) + obj.addProperty(entry.getKey(), (Number) entry.getValue()); + else if (entry.getValue() instanceof Boolean) + obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); + else if (entry.getValue() instanceof Character) + obj.addProperty( + entry.getKey(), (Character) entry.getValue()); + else { + JsonElement jsonElement = gson.toJsonTree(entry.getValue()); + if (jsonElement.isJsonArray()) { + obj.add(entry.getKey(), jsonElement.getAsJsonArray()); + } else { + obj.add(entry.getKey(), jsonElement.getAsJsonObject()); + } + } + } + } + elementAdapter.write(out, obj); + } + + @Override + public ResponseIncompleteEntity read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // store additional fields in the deserialized instance + ResponseIncompleteEntity instance = thisAdapter.fromJsonTree(jsonObj); + for (Map.Entry entry : jsonObj.entrySet()) { + if (!openapiFields.contains(entry.getKey())) { + if (entry.getValue().isJsonPrimitive()) { // primitive type + if (entry.getValue().getAsJsonPrimitive().isString()) + instance.putAdditionalProperty( + entry.getKey(), entry.getValue().getAsString()); + else if (entry.getValue().getAsJsonPrimitive().isNumber()) + instance.putAdditionalProperty( + entry.getKey(), entry.getValue().getAsNumber()); + else if (entry.getValue().getAsJsonPrimitive().isBoolean()) + instance.putAdditionalProperty( + entry.getKey(), + entry.getValue().getAsBoolean()); + else + throw new IllegalArgumentException( + String.format( + "The field `%s` has unknown primitive" + + " type. Value: %s", + entry.getKey(), + entry.getValue().toString())); + } else if (entry.getValue().isJsonArray()) { + instance.putAdditionalProperty( + entry.getKey(), + gson.fromJson(entry.getValue(), List.class)); + } else { // JSON object + instance.putAdditionalProperty( + entry.getKey(), + gson.fromJson(entry.getValue(), HashMap.class)); + } + } + } + return instance; + } + }.nullSafe(); + } + } + + /** + * Create an instance of ResponseIncompleteEntity given an JSON string + * + * @param jsonString JSON string + * @return An instance of ResponseIncompleteEntity + * @throws IOException if the JSON string is invalid with respect to ResponseIncompleteEntity + */ + public static ResponseIncompleteEntity fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, ResponseIncompleteEntity.class); + } + + /** + * Convert an instance of ResponseIncompleteEntity to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} diff --git a/sdks/java/src/main/java/com/thoughtspot/client/model/ResponseMessage.java b/sdks/java/src/main/java/com/thoughtspot/client/model/ResponseMessage.java new file mode 100644 index 000000000..302cebf5b --- /dev/null +++ b/sdks/java/src/main/java/com/thoughtspot/client/model/ResponseMessage.java @@ -0,0 +1,616 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client.model; + +import com.google.gson.Gson; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.TypeAdapter; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.reflect.TypeToken; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import com.thoughtspot.client.JSON; +import java.io.IOException; +import java.io.Serializable; +import java.util.Arrays; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Objects; +import org.openapitools.jackson.nullable.JsonNullable; + +/** ResponseMessage */ +@javax.annotation.Generated( + value = "org.openapitools.codegen.languages.JavaClientCodegen", + comments = "Generator version: 7.12.0") +public class ResponseMessage implements Serializable { + private static final long serialVersionUID = 1L; + + public static final String SERIALIZED_NAME_SESSION_IDENTIFIER = "session_identifier"; + + @SerializedName(SERIALIZED_NAME_SESSION_IDENTIFIER) + @javax.annotation.Nullable + private String sessionIdentifier; + + public static final String SERIALIZED_NAME_GENERATION_NUMBER = "generation_number"; + + @SerializedName(SERIALIZED_NAME_GENERATION_NUMBER) + @javax.annotation.Nullable + private Integer generationNumber; + + /** Type of the generated response. */ + @JsonAdapter(MessageTypeEnum.Adapter.class) + public enum MessageTypeEnum { + TS_ANSWER("TSAnswer"); + + private String value; + + MessageTypeEnum(String value) { + this.value = value; + } + + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + public static MessageTypeEnum fromValue(String value) { + for (MessageTypeEnum b : MessageTypeEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + + public static class Adapter extends TypeAdapter { + @Override + public void write(final JsonWriter jsonWriter, final MessageTypeEnum enumeration) + throws IOException { + jsonWriter.value(enumeration.getValue()); + } + + @Override + public MessageTypeEnum read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + return MessageTypeEnum.fromValue(value); + } + } + + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + String value = jsonElement.getAsString(); + MessageTypeEnum.fromValue(value); + } + } + + public static final String SERIALIZED_NAME_MESSAGE_TYPE = "message_type"; + + @SerializedName(SERIALIZED_NAME_MESSAGE_TYPE) + @javax.annotation.Nonnull + private MessageTypeEnum messageType; + + /** Generated visualization type. */ + @JsonAdapter(VisualizationTypeEnum.Adapter.class) + public enum VisualizationTypeEnum { + CHART("Chart"), + + TABLE("Table"), + + UNDEFINED("Undefined"); + + private String value; + + VisualizationTypeEnum(String value) { + this.value = value; + } + + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + public static VisualizationTypeEnum fromValue(String value) { + for (VisualizationTypeEnum b : VisualizationTypeEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + return null; + } + + public static class Adapter extends TypeAdapter { + @Override + public void write(final JsonWriter jsonWriter, final VisualizationTypeEnum enumeration) + throws IOException { + jsonWriter.value(enumeration.getValue()); + } + + @Override + public VisualizationTypeEnum read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + return VisualizationTypeEnum.fromValue(value); + } + } + + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + String value = jsonElement.getAsString(); + VisualizationTypeEnum.fromValue(value); + } + } + + public static final String SERIALIZED_NAME_VISUALIZATION_TYPE = "visualization_type"; + + @SerializedName(SERIALIZED_NAME_VISUALIZATION_TYPE) + @javax.annotation.Nullable + private VisualizationTypeEnum visualizationType; + + public static final String SERIALIZED_NAME_TOKENS = "tokens"; + + @SerializedName(SERIALIZED_NAME_TOKENS) + @javax.annotation.Nullable + private String tokens; + + public static final String SERIALIZED_NAME_DISPLAY_TOKENS = "display_tokens"; + + @SerializedName(SERIALIZED_NAME_DISPLAY_TOKENS) + @javax.annotation.Nullable + private String displayTokens; + + public ResponseMessage() {} + + public ResponseMessage sessionIdentifier(@javax.annotation.Nullable String sessionIdentifier) { + this.sessionIdentifier = sessionIdentifier; + return this; + } + + /** + * Unique identifier of the generated response. + * + * @return sessionIdentifier + */ + @javax.annotation.Nullable + public String getSessionIdentifier() { + return sessionIdentifier; + } + + public void setSessionIdentifier(@javax.annotation.Nullable String sessionIdentifier) { + this.sessionIdentifier = sessionIdentifier; + } + + public ResponseMessage generationNumber(@javax.annotation.Nullable Integer generationNumber) { + this.generationNumber = generationNumber; + return this; + } + + /** + * Generate number of the response. + * + * @return generationNumber + */ + @javax.annotation.Nullable + public Integer getGenerationNumber() { + return generationNumber; + } + + public void setGenerationNumber(@javax.annotation.Nullable Integer generationNumber) { + this.generationNumber = generationNumber; + } + + public ResponseMessage messageType(@javax.annotation.Nonnull MessageTypeEnum messageType) { + this.messageType = messageType; + return this; + } + + /** + * Type of the generated response. + * + * @return messageType + */ + @javax.annotation.Nonnull + public MessageTypeEnum getMessageType() { + return messageType; + } + + public void setMessageType(@javax.annotation.Nonnull MessageTypeEnum messageType) { + this.messageType = messageType; + } + + public ResponseMessage visualizationType( + @javax.annotation.Nullable VisualizationTypeEnum visualizationType) { + this.visualizationType = visualizationType; + return this; + } + + /** + * Generated visualization type. + * + * @return visualizationType + */ + @javax.annotation.Nullable + public VisualizationTypeEnum getVisualizationType() { + return visualizationType; + } + + public void setVisualizationType( + @javax.annotation.Nullable VisualizationTypeEnum visualizationType) { + this.visualizationType = visualizationType; + } + + public ResponseMessage tokens(@javax.annotation.Nullable String tokens) { + this.tokens = tokens; + return this; + } + + /** + * Tokens for the response. + * + * @return tokens + */ + @javax.annotation.Nullable + public String getTokens() { + return tokens; + } + + public void setTokens(@javax.annotation.Nullable String tokens) { + this.tokens = tokens; + } + + public ResponseMessage displayTokens(@javax.annotation.Nullable String displayTokens) { + this.displayTokens = displayTokens; + return this; + } + + /** + * User friendly tokens for the response. + * + * @return displayTokens + */ + @javax.annotation.Nullable + public String getDisplayTokens() { + return displayTokens; + } + + public void setDisplayTokens(@javax.annotation.Nullable String displayTokens) { + this.displayTokens = displayTokens; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key name of the property + * @param value value of the property + * @return the ResponseMessage instance itself + */ + public ResponseMessage putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return a map of objects + */ + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key name of the property + * @return an object + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ResponseMessage responseMessage = (ResponseMessage) o; + return Objects.equals(this.sessionIdentifier, responseMessage.sessionIdentifier) + && Objects.equals(this.generationNumber, responseMessage.generationNumber) + && Objects.equals(this.messageType, responseMessage.messageType) + && Objects.equals(this.visualizationType, responseMessage.visualizationType) + && Objects.equals(this.tokens, responseMessage.tokens) + && Objects.equals(this.displayTokens, responseMessage.displayTokens) + && Objects.equals(this.additionalProperties, responseMessage.additionalProperties); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b + || (a != null + && b != null + && a.isPresent() + && b.isPresent() + && Objects.deepEquals(a.get(), b.get())); + } + + @Override + public int hashCode() { + return Objects.hash( + sessionIdentifier, + generationNumber, + messageType, + visualizationType, + tokens, + displayTokens, + additionalProperties); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; + } + return a.isPresent() ? Arrays.deepHashCode(new Object[] {a.get()}) : 31; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ResponseMessage {\n"); + sb.append(" sessionIdentifier: ") + .append(toIndentedString(sessionIdentifier)) + .append("\n"); + sb.append(" generationNumber: ").append(toIndentedString(generationNumber)).append("\n"); + sb.append(" messageType: ").append(toIndentedString(messageType)).append("\n"); + sb.append(" visualizationType: ") + .append(toIndentedString(visualizationType)) + .append("\n"); + sb.append(" tokens: ").append(toIndentedString(tokens)).append("\n"); + sb.append(" displayTokens: ").append(toIndentedString(displayTokens)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first + * line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("session_identifier"); + openapiFields.add("generation_number"); + openapiFields.add("message_type"); + openapiFields.add("visualization_type"); + openapiFields.add("tokens"); + openapiFields.add("display_tokens"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + openapiRequiredFields.add("message_type"); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to ResponseMessage + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!ResponseMessage.openapiRequiredFields + .isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException( + String.format( + "The required field(s) %s in ResponseMessage is not found in the" + + " empty JSON string", + ResponseMessage.openapiRequiredFields.toString())); + } + } + + // check to make sure all required properties/fields are present in the JSON string + for (String requiredField : ResponseMessage.openapiRequiredFields) { + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException( + String.format( + "The required field `%s` is not found in the JSON string: %s", + requiredField, jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if ((jsonObj.get("session_identifier") != null + && !jsonObj.get("session_identifier").isJsonNull()) + && !jsonObj.get("session_identifier").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `session_identifier` to be a primitive type in the" + + " JSON string but got `%s`", + jsonObj.get("session_identifier").toString())); + } + if (!jsonObj.get("message_type").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `message_type` to be a primitive type in the JSON" + + " string but got `%s`", + jsonObj.get("message_type").toString())); + } + // validate the required field `message_type` + MessageTypeEnum.validateJsonElement(jsonObj.get("message_type")); + if ((jsonObj.get("visualization_type") != null + && !jsonObj.get("visualization_type").isJsonNull()) + && !jsonObj.get("visualization_type").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `visualization_type` to be a primitive type in the" + + " JSON string but got `%s`", + jsonObj.get("visualization_type").toString())); + } + // validate the optional field `visualization_type` + if (jsonObj.get("visualization_type") != null + && !jsonObj.get("visualization_type").isJsonNull()) { + VisualizationTypeEnum.validateJsonElement(jsonObj.get("visualization_type")); + } + if ((jsonObj.get("tokens") != null && !jsonObj.get("tokens").isJsonNull()) + && !jsonObj.get("tokens").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `tokens` to be a primitive type in the JSON string" + + " but got `%s`", + jsonObj.get("tokens").toString())); + } + if ((jsonObj.get("display_tokens") != null && !jsonObj.get("display_tokens").isJsonNull()) + && !jsonObj.get("display_tokens").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `display_tokens` to be a primitive type in the" + + " JSON string but got `%s`", + jsonObj.get("display_tokens").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!ResponseMessage.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'ResponseMessage' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter = + gson.getDelegateAdapter(this, TypeToken.get(ResponseMessage.class)); + + return (TypeAdapter) + new TypeAdapter() { + @Override + public void write(JsonWriter out, ResponseMessage value) + throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + obj.remove("additionalProperties"); + // serialize additional properties + if (value.getAdditionalProperties() != null) { + for (Map.Entry entry : + value.getAdditionalProperties().entrySet()) { + if (entry.getValue() instanceof String) + obj.addProperty(entry.getKey(), (String) entry.getValue()); + else if (entry.getValue() instanceof Number) + obj.addProperty(entry.getKey(), (Number) entry.getValue()); + else if (entry.getValue() instanceof Boolean) + obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); + else if (entry.getValue() instanceof Character) + obj.addProperty( + entry.getKey(), (Character) entry.getValue()); + else { + JsonElement jsonElement = gson.toJsonTree(entry.getValue()); + if (jsonElement.isJsonArray()) { + obj.add(entry.getKey(), jsonElement.getAsJsonArray()); + } else { + obj.add(entry.getKey(), jsonElement.getAsJsonObject()); + } + } + } + } + elementAdapter.write(out, obj); + } + + @Override + public ResponseMessage read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // store additional fields in the deserialized instance + ResponseMessage instance = thisAdapter.fromJsonTree(jsonObj); + for (Map.Entry entry : jsonObj.entrySet()) { + if (!openapiFields.contains(entry.getKey())) { + if (entry.getValue().isJsonPrimitive()) { // primitive type + if (entry.getValue().getAsJsonPrimitive().isString()) + instance.putAdditionalProperty( + entry.getKey(), entry.getValue().getAsString()); + else if (entry.getValue().getAsJsonPrimitive().isNumber()) + instance.putAdditionalProperty( + entry.getKey(), entry.getValue().getAsNumber()); + else if (entry.getValue().getAsJsonPrimitive().isBoolean()) + instance.putAdditionalProperty( + entry.getKey(), + entry.getValue().getAsBoolean()); + else + throw new IllegalArgumentException( + String.format( + "The field `%s` has unknown primitive" + + " type. Value: %s", + entry.getKey(), + entry.getValue().toString())); + } else if (entry.getValue().isJsonArray()) { + instance.putAdditionalProperty( + entry.getKey(), + gson.fromJson(entry.getValue(), List.class)); + } else { // JSON object + instance.putAdditionalProperty( + entry.getKey(), + gson.fromJson(entry.getValue(), HashMap.class)); + } + } + } + return instance; + } + }.nullSafe(); + } + } + + /** + * Create an instance of ResponseMessage given an JSON string + * + * @param jsonString JSON string + * @return An instance of ResponseMessage + * @throws IOException if the JSON string is invalid with respect to ResponseMessage + */ + public static ResponseMessage fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, ResponseMessage.class); + } + + /** + * Convert an instance of ResponseMessage to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} diff --git a/sdks/java/src/main/java/com/thoughtspot/client/model/ResponsePostUpgradeFailedEntities.java b/sdks/java/src/main/java/com/thoughtspot/client/model/ResponsePostUpgradeFailedEntities.java new file mode 100644 index 000000000..aa3189b4c --- /dev/null +++ b/sdks/java/src/main/java/com/thoughtspot/client/model/ResponsePostUpgradeFailedEntities.java @@ -0,0 +1,333 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client.model; + +import com.google.gson.Gson; +import com.google.gson.JsonArray; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.TypeAdapter; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.annotations.SerializedName; +import com.google.gson.reflect.TypeToken; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import com.thoughtspot.client.JSON; +import java.io.IOException; +import java.io.Serializable; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Objects; + +/** + * Wrapper for the post-upgrade failed entities, as they are inside a 'data' field in the + * response. + */ +@javax.annotation.Generated( + value = "org.openapitools.codegen.languages.JavaClientCodegen", + comments = "Generator version: 7.12.0") +public class ResponsePostUpgradeFailedEntities implements Serializable { + private static final long serialVersionUID = 1L; + + public static final String SERIALIZED_NAME_DATA = "data"; + + @SerializedName(SERIALIZED_NAME_DATA) + @javax.annotation.Nonnull + private List data; + + public ResponsePostUpgradeFailedEntities() {} + + public ResponsePostUpgradeFailedEntities data( + @javax.annotation.Nonnull List data) { + this.data = data; + return this; + } + + public ResponsePostUpgradeFailedEntities addDataItem(ResponsePostUpgradeFailedEntity dataItem) { + if (this.data == null) { + this.data = new ArrayList<>(); + } + this.data.add(dataItem); + return this; + } + + /** + * Get data + * + * @return data + */ + @javax.annotation.Nonnull + public List getData() { + return data; + } + + public void setData(@javax.annotation.Nonnull List data) { + this.data = data; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key name of the property + * @param value value of the property + * @return the ResponsePostUpgradeFailedEntities instance itself + */ + public ResponsePostUpgradeFailedEntities putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return a map of objects + */ + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key name of the property + * @return an object + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ResponsePostUpgradeFailedEntities responsePostUpgradeFailedEntities = + (ResponsePostUpgradeFailedEntities) o; + return Objects.equals(this.data, responsePostUpgradeFailedEntities.data) + && Objects.equals( + this.additionalProperties, + responsePostUpgradeFailedEntities.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(data, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ResponsePostUpgradeFailedEntities {\n"); + sb.append(" data: ").append(toIndentedString(data)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first + * line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("data"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + openapiRequiredFields.add("data"); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to + * ResponsePostUpgradeFailedEntities + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!ResponsePostUpgradeFailedEntities.openapiRequiredFields + .isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException( + String.format( + "The required field(s) %s in ResponsePostUpgradeFailedEntities is" + + " not found in the empty JSON string", + ResponsePostUpgradeFailedEntities.openapiRequiredFields + .toString())); + } + } + + // check to make sure all required properties/fields are present in the JSON string + for (String requiredField : ResponsePostUpgradeFailedEntities.openapiRequiredFields) { + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException( + String.format( + "The required field `%s` is not found in the JSON string: %s", + requiredField, jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // ensure the json data is an array + if (!jsonObj.get("data").isJsonArray()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `data` to be an array in the JSON string but got" + + " `%s`", + jsonObj.get("data").toString())); + } + + JsonArray jsonArraydata = jsonObj.getAsJsonArray("data"); + // validate the required field `data` (array) + for (int i = 0; i < jsonArraydata.size(); i++) { + ResponsePostUpgradeFailedEntity.validateJsonElement(jsonArraydata.get(i)); + } + ; + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!ResponsePostUpgradeFailedEntities.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'ResponsePostUpgradeFailedEntities' and + // its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter = + gson.getDelegateAdapter( + this, TypeToken.get(ResponsePostUpgradeFailedEntities.class)); + + return (TypeAdapter) + new TypeAdapter() { + @Override + public void write(JsonWriter out, ResponsePostUpgradeFailedEntities value) + throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + obj.remove("additionalProperties"); + // serialize additional properties + if (value.getAdditionalProperties() != null) { + for (Map.Entry entry : + value.getAdditionalProperties().entrySet()) { + if (entry.getValue() instanceof String) + obj.addProperty(entry.getKey(), (String) entry.getValue()); + else if (entry.getValue() instanceof Number) + obj.addProperty(entry.getKey(), (Number) entry.getValue()); + else if (entry.getValue() instanceof Boolean) + obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); + else if (entry.getValue() instanceof Character) + obj.addProperty( + entry.getKey(), (Character) entry.getValue()); + else { + JsonElement jsonElement = gson.toJsonTree(entry.getValue()); + if (jsonElement.isJsonArray()) { + obj.add(entry.getKey(), jsonElement.getAsJsonArray()); + } else { + obj.add(entry.getKey(), jsonElement.getAsJsonObject()); + } + } + } + } + elementAdapter.write(out, obj); + } + + @Override + public ResponsePostUpgradeFailedEntities read(JsonReader in) + throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // store additional fields in the deserialized instance + ResponsePostUpgradeFailedEntities instance = + thisAdapter.fromJsonTree(jsonObj); + for (Map.Entry entry : jsonObj.entrySet()) { + if (!openapiFields.contains(entry.getKey())) { + if (entry.getValue().isJsonPrimitive()) { // primitive type + if (entry.getValue().getAsJsonPrimitive().isString()) + instance.putAdditionalProperty( + entry.getKey(), entry.getValue().getAsString()); + else if (entry.getValue().getAsJsonPrimitive().isNumber()) + instance.putAdditionalProperty( + entry.getKey(), entry.getValue().getAsNumber()); + else if (entry.getValue().getAsJsonPrimitive().isBoolean()) + instance.putAdditionalProperty( + entry.getKey(), + entry.getValue().getAsBoolean()); + else + throw new IllegalArgumentException( + String.format( + "The field `%s` has unknown primitive" + + " type. Value: %s", + entry.getKey(), + entry.getValue().toString())); + } else if (entry.getValue().isJsonArray()) { + instance.putAdditionalProperty( + entry.getKey(), + gson.fromJson(entry.getValue(), List.class)); + } else { // JSON object + instance.putAdditionalProperty( + entry.getKey(), + gson.fromJson(entry.getValue(), HashMap.class)); + } + } + } + return instance; + } + }.nullSafe(); + } + } + + /** + * Create an instance of ResponsePostUpgradeFailedEntities given an JSON string + * + * @param jsonString JSON string + * @return An instance of ResponsePostUpgradeFailedEntities + * @throws IOException if the JSON string is invalid with respect to + * ResponsePostUpgradeFailedEntities + */ + public static ResponsePostUpgradeFailedEntities fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, ResponsePostUpgradeFailedEntities.class); + } + + /** + * Convert an instance of ResponsePostUpgradeFailedEntities to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} diff --git a/sdks/java/src/main/java/com/thoughtspot/client/model/ResponsePostUpgradeFailedEntity.java b/sdks/java/src/main/java/com/thoughtspot/client/model/ResponsePostUpgradeFailedEntity.java new file mode 100644 index 000000000..d2bbf9d62 --- /dev/null +++ b/sdks/java/src/main/java/com/thoughtspot/client/model/ResponsePostUpgradeFailedEntity.java @@ -0,0 +1,382 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client.model; + +import com.google.gson.Gson; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.TypeAdapter; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.annotations.SerializedName; +import com.google.gson.reflect.TypeToken; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import com.thoughtspot.client.JSON; +import java.io.IOException; +import java.io.Serializable; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Objects; + +/** Unique ID of the worksheet that failed post-upgrade. */ +@javax.annotation.Generated( + value = "org.openapitools.codegen.languages.JavaClientCodegen", + comments = "Generator version: 7.12.0") +public class ResponsePostUpgradeFailedEntity implements Serializable { + private static final long serialVersionUID = 1L; + + public static final String SERIALIZED_NAME_ID = "id"; + + @SerializedName(SERIALIZED_NAME_ID) + @javax.annotation.Nonnull + private String id; + + public static final String SERIALIZED_NAME_NAME = "name"; + + @SerializedName(SERIALIZED_NAME_NAME) + @javax.annotation.Nonnull + private String name; + + public static final String SERIALIZED_NAME_ERROR = "error"; + + @SerializedName(SERIALIZED_NAME_ERROR) + @javax.annotation.Nonnull + private String error; + + public ResponsePostUpgradeFailedEntity() {} + + public ResponsePostUpgradeFailedEntity id(@javax.annotation.Nonnull String id) { + this.id = id; + return this; + } + + /** + * Get id + * + * @return id + */ + @javax.annotation.Nonnull + public String getId() { + return id; + } + + public void setId(@javax.annotation.Nonnull String id) { + this.id = id; + } + + public ResponsePostUpgradeFailedEntity name(@javax.annotation.Nonnull String name) { + this.name = name; + return this; + } + + /** + * Name of the worksheet that failed post-upgrade. + * + * @return name + */ + @javax.annotation.Nonnull + public String getName() { + return name; + } + + public void setName(@javax.annotation.Nonnull String name) { + this.name = name; + } + + public ResponsePostUpgradeFailedEntity error(@javax.annotation.Nonnull String error) { + this.error = error; + return this; + } + + /** + * Error details related to the post-upgrade failure. + * + * @return error + */ + @javax.annotation.Nonnull + public String getError() { + return error; + } + + public void setError(@javax.annotation.Nonnull String error) { + this.error = error; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key name of the property + * @param value value of the property + * @return the ResponsePostUpgradeFailedEntity instance itself + */ + public ResponsePostUpgradeFailedEntity putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return a map of objects + */ + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key name of the property + * @return an object + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ResponsePostUpgradeFailedEntity responsePostUpgradeFailedEntity = + (ResponsePostUpgradeFailedEntity) o; + return Objects.equals(this.id, responsePostUpgradeFailedEntity.id) + && Objects.equals(this.name, responsePostUpgradeFailedEntity.name) + && Objects.equals(this.error, responsePostUpgradeFailedEntity.error) + && Objects.equals( + this.additionalProperties, + responsePostUpgradeFailedEntity.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(id, name, error, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ResponsePostUpgradeFailedEntity {\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append(" error: ").append(toIndentedString(error)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first + * line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("id"); + openapiFields.add("name"); + openapiFields.add("error"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + openapiRequiredFields.add("id"); + openapiRequiredFields.add("name"); + openapiRequiredFields.add("error"); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to + * ResponsePostUpgradeFailedEntity + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!ResponsePostUpgradeFailedEntity.openapiRequiredFields + .isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException( + String.format( + "The required field(s) %s in ResponsePostUpgradeFailedEntity is" + + " not found in the empty JSON string", + ResponsePostUpgradeFailedEntity.openapiRequiredFields.toString())); + } + } + + // check to make sure all required properties/fields are present in the JSON string + for (String requiredField : ResponsePostUpgradeFailedEntity.openapiRequiredFields) { + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException( + String.format( + "The required field `%s` is not found in the JSON string: %s", + requiredField, jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if (!jsonObj.get("id").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `id` to be a primitive type in the JSON string but" + + " got `%s`", + jsonObj.get("id").toString())); + } + if (!jsonObj.get("name").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `name` to be a primitive type in the JSON string" + + " but got `%s`", + jsonObj.get("name").toString())); + } + if (!jsonObj.get("error").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `error` to be a primitive type in the JSON string" + + " but got `%s`", + jsonObj.get("error").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!ResponsePostUpgradeFailedEntity.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'ResponsePostUpgradeFailedEntity' and its + // subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter = + gson.getDelegateAdapter( + this, TypeToken.get(ResponsePostUpgradeFailedEntity.class)); + + return (TypeAdapter) + new TypeAdapter() { + @Override + public void write(JsonWriter out, ResponsePostUpgradeFailedEntity value) + throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + obj.remove("additionalProperties"); + // serialize additional properties + if (value.getAdditionalProperties() != null) { + for (Map.Entry entry : + value.getAdditionalProperties().entrySet()) { + if (entry.getValue() instanceof String) + obj.addProperty(entry.getKey(), (String) entry.getValue()); + else if (entry.getValue() instanceof Number) + obj.addProperty(entry.getKey(), (Number) entry.getValue()); + else if (entry.getValue() instanceof Boolean) + obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); + else if (entry.getValue() instanceof Character) + obj.addProperty( + entry.getKey(), (Character) entry.getValue()); + else { + JsonElement jsonElement = gson.toJsonTree(entry.getValue()); + if (jsonElement.isJsonArray()) { + obj.add(entry.getKey(), jsonElement.getAsJsonArray()); + } else { + obj.add(entry.getKey(), jsonElement.getAsJsonObject()); + } + } + } + } + elementAdapter.write(out, obj); + } + + @Override + public ResponsePostUpgradeFailedEntity read(JsonReader in) + throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // store additional fields in the deserialized instance + ResponsePostUpgradeFailedEntity instance = + thisAdapter.fromJsonTree(jsonObj); + for (Map.Entry entry : jsonObj.entrySet()) { + if (!openapiFields.contains(entry.getKey())) { + if (entry.getValue().isJsonPrimitive()) { // primitive type + if (entry.getValue().getAsJsonPrimitive().isString()) + instance.putAdditionalProperty( + entry.getKey(), entry.getValue().getAsString()); + else if (entry.getValue().getAsJsonPrimitive().isNumber()) + instance.putAdditionalProperty( + entry.getKey(), entry.getValue().getAsNumber()); + else if (entry.getValue().getAsJsonPrimitive().isBoolean()) + instance.putAdditionalProperty( + entry.getKey(), + entry.getValue().getAsBoolean()); + else + throw new IllegalArgumentException( + String.format( + "The field `%s` has unknown primitive" + + " type. Value: %s", + entry.getKey(), + entry.getValue().toString())); + } else if (entry.getValue().isJsonArray()) { + instance.putAdditionalProperty( + entry.getKey(), + gson.fromJson(entry.getValue(), List.class)); + } else { // JSON object + instance.putAdditionalProperty( + entry.getKey(), + gson.fromJson(entry.getValue(), HashMap.class)); + } + } + } + return instance; + } + }.nullSafe(); + } + } + + /** + * Create an instance of ResponsePostUpgradeFailedEntity given an JSON string + * + * @param jsonString JSON string + * @return An instance of ResponsePostUpgradeFailedEntity + * @throws IOException if the JSON string is invalid with respect to + * ResponsePostUpgradeFailedEntity + */ + public static ResponsePostUpgradeFailedEntity fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, ResponsePostUpgradeFailedEntity.class); + } + + /** + * Convert an instance of ResponsePostUpgradeFailedEntity to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} diff --git a/sdks/java/src/main/java/com/thoughtspot/client/model/ResponseSchedule.java b/sdks/java/src/main/java/com/thoughtspot/client/model/ResponseSchedule.java new file mode 100644 index 000000000..b389611d5 --- /dev/null +++ b/sdks/java/src/main/java/com/thoughtspot/client/model/ResponseSchedule.java @@ -0,0 +1,836 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client.model; + +import com.google.gson.Gson; +import com.google.gson.JsonArray; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.TypeAdapter; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.annotations.SerializedName; +import com.google.gson.reflect.TypeToken; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import com.thoughtspot.client.JSON; +import java.io.IOException; +import java.io.Serializable; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Objects; +import org.openapitools.jackson.nullable.JsonNullable; + +/** ResponseSchedule */ +@javax.annotation.Generated( + value = "org.openapitools.codegen.languages.JavaClientCodegen", + comments = "Generator version: 7.12.0") +public class ResponseSchedule implements Serializable { + private static final long serialVersionUID = 1L; + + public static final String SERIALIZED_NAME_AUTHOR = "author"; + + @SerializedName(SERIALIZED_NAME_AUTHOR) + @javax.annotation.Nonnull + private Author author; + + public static final String SERIALIZED_NAME_CREATION_TIME_IN_MILLIS = "creation_time_in_millis"; + + @SerializedName(SERIALIZED_NAME_CREATION_TIME_IN_MILLIS) + @javax.annotation.Nonnull + private Object creationTimeInMillis; + + public static final String SERIALIZED_NAME_DESCRIPTION = "description"; + + @SerializedName(SERIALIZED_NAME_DESCRIPTION) + @javax.annotation.Nullable + private String description; + + public static final String SERIALIZED_NAME_FILE_FORMAT = "file_format"; + + @SerializedName(SERIALIZED_NAME_FILE_FORMAT) + @javax.annotation.Nonnull + private String fileFormat; + + public static final String SERIALIZED_NAME_FREQUENCY = "frequency"; + + @SerializedName(SERIALIZED_NAME_FREQUENCY) + @javax.annotation.Nonnull + private Frequency frequency; + + public static final String SERIALIZED_NAME_ID = "id"; + + @SerializedName(SERIALIZED_NAME_ID) + @javax.annotation.Nonnull + private String id; + + public static final String SERIALIZED_NAME_LIVEBOARD_OPTIONS = "liveboard_options"; + + @SerializedName(SERIALIZED_NAME_LIVEBOARD_OPTIONS) + @javax.annotation.Nullable + private LiveboardOptions liveboardOptions; + + public static final String SERIALIZED_NAME_METADATA = "metadata"; + + @SerializedName(SERIALIZED_NAME_METADATA) + @javax.annotation.Nonnull + private MetadataResponse metadata; + + public static final String SERIALIZED_NAME_NAME = "name"; + + @SerializedName(SERIALIZED_NAME_NAME) + @javax.annotation.Nonnull + private String name; + + public static final String SERIALIZED_NAME_PDF_OPTIONS = "pdf_options"; + + @SerializedName(SERIALIZED_NAME_PDF_OPTIONS) + @javax.annotation.Nullable + private PdfOptions pdfOptions; + + public static final String SERIALIZED_NAME_RECIPIENT_DETAILS = "recipient_details"; + + @SerializedName(SERIALIZED_NAME_RECIPIENT_DETAILS) + @javax.annotation.Nonnull + private RecipientDetails recipientDetails; + + public static final String SERIALIZED_NAME_STATUS = "status"; + + @SerializedName(SERIALIZED_NAME_STATUS) + @javax.annotation.Nullable + private String status; + + public static final String SERIALIZED_NAME_TIME_ZONE = "time_zone"; + + @SerializedName(SERIALIZED_NAME_TIME_ZONE) + @javax.annotation.Nonnull + private String timeZone; + + public static final String SERIALIZED_NAME_HISTORY_RUNS = "history_runs"; + + @SerializedName(SERIALIZED_NAME_HISTORY_RUNS) + @javax.annotation.Nullable + private List historyRuns; + + public static final String SERIALIZED_NAME_PERSONALISED_VIEW_ID = "personalised_view_id"; + + @SerializedName(SERIALIZED_NAME_PERSONALISED_VIEW_ID) + @javax.annotation.Nullable + private String personalisedViewId; + + public ResponseSchedule() {} + + public ResponseSchedule author(@javax.annotation.Nonnull Author author) { + this.author = author; + return this; + } + + /** + * Get author + * + * @return author + */ + @javax.annotation.Nonnull + public Author getAuthor() { + return author; + } + + public void setAuthor(@javax.annotation.Nonnull Author author) { + this.author = author; + } + + public ResponseSchedule creationTimeInMillis( + @javax.annotation.Nonnull Object creationTimeInMillis) { + this.creationTimeInMillis = creationTimeInMillis; + return this; + } + + /** + * Schedule creation time in milliseconds. + * + * @return creationTimeInMillis + */ + @javax.annotation.Nonnull + public Object getCreationTimeInMillis() { + return creationTimeInMillis; + } + + public void setCreationTimeInMillis(@javax.annotation.Nonnull Object creationTimeInMillis) { + this.creationTimeInMillis = creationTimeInMillis; + } + + public ResponseSchedule description(@javax.annotation.Nullable String description) { + this.description = description; + return this; + } + + /** + * Description of the job. + * + * @return description + */ + @javax.annotation.Nullable + public String getDescription() { + return description; + } + + public void setDescription(@javax.annotation.Nullable String description) { + this.description = description; + } + + public ResponseSchedule fileFormat(@javax.annotation.Nonnull String fileFormat) { + this.fileFormat = fileFormat; + return this; + } + + /** + * Export file format. + * + * @return fileFormat + */ + @javax.annotation.Nonnull + public String getFileFormat() { + return fileFormat; + } + + public void setFileFormat(@javax.annotation.Nonnull String fileFormat) { + this.fileFormat = fileFormat; + } + + public ResponseSchedule frequency(@javax.annotation.Nonnull Frequency frequency) { + this.frequency = frequency; + return this; + } + + /** + * Get frequency + * + * @return frequency + */ + @javax.annotation.Nonnull + public Frequency getFrequency() { + return frequency; + } + + public void setFrequency(@javax.annotation.Nonnull Frequency frequency) { + this.frequency = frequency; + } + + public ResponseSchedule id(@javax.annotation.Nonnull String id) { + this.id = id; + return this; + } + + /** + * GUID of the scheduled job. + * + * @return id + */ + @javax.annotation.Nonnull + public String getId() { + return id; + } + + public void setId(@javax.annotation.Nonnull String id) { + this.id = id; + } + + public ResponseSchedule liveboardOptions( + @javax.annotation.Nullable LiveboardOptions liveboardOptions) { + this.liveboardOptions = liveboardOptions; + return this; + } + + /** + * Get liveboardOptions + * + * @return liveboardOptions + */ + @javax.annotation.Nullable + public LiveboardOptions getLiveboardOptions() { + return liveboardOptions; + } + + public void setLiveboardOptions(@javax.annotation.Nullable LiveboardOptions liveboardOptions) { + this.liveboardOptions = liveboardOptions; + } + + public ResponseSchedule metadata(@javax.annotation.Nonnull MetadataResponse metadata) { + this.metadata = metadata; + return this; + } + + /** + * Get metadata + * + * @return metadata + */ + @javax.annotation.Nonnull + public MetadataResponse getMetadata() { + return metadata; + } + + public void setMetadata(@javax.annotation.Nonnull MetadataResponse metadata) { + this.metadata = metadata; + } + + public ResponseSchedule name(@javax.annotation.Nonnull String name) { + this.name = name; + return this; + } + + /** + * Name of the scheduled job. + * + * @return name + */ + @javax.annotation.Nonnull + public String getName() { + return name; + } + + public void setName(@javax.annotation.Nonnull String name) { + this.name = name; + } + + public ResponseSchedule pdfOptions(@javax.annotation.Nullable PdfOptions pdfOptions) { + this.pdfOptions = pdfOptions; + return this; + } + + /** + * Get pdfOptions + * + * @return pdfOptions + */ + @javax.annotation.Nullable + public PdfOptions getPdfOptions() { + return pdfOptions; + } + + public void setPdfOptions(@javax.annotation.Nullable PdfOptions pdfOptions) { + this.pdfOptions = pdfOptions; + } + + public ResponseSchedule recipientDetails( + @javax.annotation.Nonnull RecipientDetails recipientDetails) { + this.recipientDetails = recipientDetails; + return this; + } + + /** + * Get recipientDetails + * + * @return recipientDetails + */ + @javax.annotation.Nonnull + public RecipientDetails getRecipientDetails() { + return recipientDetails; + } + + public void setRecipientDetails(@javax.annotation.Nonnull RecipientDetails recipientDetails) { + this.recipientDetails = recipientDetails; + } + + public ResponseSchedule status(@javax.annotation.Nullable String status) { + this.status = status; + return this; + } + + /** + * Status of the job + * + * @return status + */ + @javax.annotation.Nullable + public String getStatus() { + return status; + } + + public void setStatus(@javax.annotation.Nullable String status) { + this.status = status; + } + + public ResponseSchedule timeZone(@javax.annotation.Nonnull String timeZone) { + this.timeZone = timeZone; + return this; + } + + /** + * Time zone + * + * @return timeZone + */ + @javax.annotation.Nonnull + public String getTimeZone() { + return timeZone; + } + + public void setTimeZone(@javax.annotation.Nonnull String timeZone) { + this.timeZone = timeZone; + } + + public ResponseSchedule historyRuns( + @javax.annotation.Nullable List historyRuns) { + this.historyRuns = historyRuns; + return this; + } + + public ResponseSchedule addHistoryRunsItem(ResponseScheduleRun historyRunsItem) { + if (this.historyRuns == null) { + this.historyRuns = new ArrayList<>(); + } + this.historyRuns.add(historyRunsItem); + return this; + } + + /** + * Schedule runs history records. + * + * @return historyRuns + */ + @javax.annotation.Nullable + public List getHistoryRuns() { + return historyRuns; + } + + public void setHistoryRuns(@javax.annotation.Nullable List historyRuns) { + this.historyRuns = historyRuns; + } + + public ResponseSchedule personalisedViewId( + @javax.annotation.Nullable String personalisedViewId) { + this.personalisedViewId = personalisedViewId; + return this; + } + + /** + * Personalised view id of the liveboard to be scheduled. + * + * @return personalisedViewId + */ + @javax.annotation.Nullable + public String getPersonalisedViewId() { + return personalisedViewId; + } + + public void setPersonalisedViewId(@javax.annotation.Nullable String personalisedViewId) { + this.personalisedViewId = personalisedViewId; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key name of the property + * @param value value of the property + * @return the ResponseSchedule instance itself + */ + public ResponseSchedule putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return a map of objects + */ + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key name of the property + * @return an object + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ResponseSchedule responseSchedule = (ResponseSchedule) o; + return Objects.equals(this.author, responseSchedule.author) + && Objects.equals(this.creationTimeInMillis, responseSchedule.creationTimeInMillis) + && Objects.equals(this.description, responseSchedule.description) + && Objects.equals(this.fileFormat, responseSchedule.fileFormat) + && Objects.equals(this.frequency, responseSchedule.frequency) + && Objects.equals(this.id, responseSchedule.id) + && Objects.equals(this.liveboardOptions, responseSchedule.liveboardOptions) + && Objects.equals(this.metadata, responseSchedule.metadata) + && Objects.equals(this.name, responseSchedule.name) + && Objects.equals(this.pdfOptions, responseSchedule.pdfOptions) + && Objects.equals(this.recipientDetails, responseSchedule.recipientDetails) + && Objects.equals(this.status, responseSchedule.status) + && Objects.equals(this.timeZone, responseSchedule.timeZone) + && Objects.equals(this.historyRuns, responseSchedule.historyRuns) + && Objects.equals(this.personalisedViewId, responseSchedule.personalisedViewId) + && Objects.equals(this.additionalProperties, responseSchedule.additionalProperties); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b + || (a != null + && b != null + && a.isPresent() + && b.isPresent() + && Objects.deepEquals(a.get(), b.get())); + } + + @Override + public int hashCode() { + return Objects.hash( + author, + creationTimeInMillis, + description, + fileFormat, + frequency, + id, + liveboardOptions, + metadata, + name, + pdfOptions, + recipientDetails, + status, + timeZone, + historyRuns, + personalisedViewId, + additionalProperties); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; + } + return a.isPresent() ? Arrays.deepHashCode(new Object[] {a.get()}) : 31; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ResponseSchedule {\n"); + sb.append(" author: ").append(toIndentedString(author)).append("\n"); + sb.append(" creationTimeInMillis: ") + .append(toIndentedString(creationTimeInMillis)) + .append("\n"); + sb.append(" description: ").append(toIndentedString(description)).append("\n"); + sb.append(" fileFormat: ").append(toIndentedString(fileFormat)).append("\n"); + sb.append(" frequency: ").append(toIndentedString(frequency)).append("\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" liveboardOptions: ").append(toIndentedString(liveboardOptions)).append("\n"); + sb.append(" metadata: ").append(toIndentedString(metadata)).append("\n"); + sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append(" pdfOptions: ").append(toIndentedString(pdfOptions)).append("\n"); + sb.append(" recipientDetails: ").append(toIndentedString(recipientDetails)).append("\n"); + sb.append(" status: ").append(toIndentedString(status)).append("\n"); + sb.append(" timeZone: ").append(toIndentedString(timeZone)).append("\n"); + sb.append(" historyRuns: ").append(toIndentedString(historyRuns)).append("\n"); + sb.append(" personalisedViewId: ") + .append(toIndentedString(personalisedViewId)) + .append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first + * line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("author"); + openapiFields.add("creation_time_in_millis"); + openapiFields.add("description"); + openapiFields.add("file_format"); + openapiFields.add("frequency"); + openapiFields.add("id"); + openapiFields.add("liveboard_options"); + openapiFields.add("metadata"); + openapiFields.add("name"); + openapiFields.add("pdf_options"); + openapiFields.add("recipient_details"); + openapiFields.add("status"); + openapiFields.add("time_zone"); + openapiFields.add("history_runs"); + openapiFields.add("personalised_view_id"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + openapiRequiredFields.add("author"); + openapiRequiredFields.add("creation_time_in_millis"); + openapiRequiredFields.add("file_format"); + openapiRequiredFields.add("frequency"); + openapiRequiredFields.add("id"); + openapiRequiredFields.add("metadata"); + openapiRequiredFields.add("name"); + openapiRequiredFields.add("recipient_details"); + openapiRequiredFields.add("time_zone"); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to ResponseSchedule + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!ResponseSchedule.openapiRequiredFields + .isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException( + String.format( + "The required field(s) %s in ResponseSchedule is not found in the" + + " empty JSON string", + ResponseSchedule.openapiRequiredFields.toString())); + } + } + + // check to make sure all required properties/fields are present in the JSON string + for (String requiredField : ResponseSchedule.openapiRequiredFields) { + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException( + String.format( + "The required field `%s` is not found in the JSON string: %s", + requiredField, jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // validate the required field `author` + Author.validateJsonElement(jsonObj.get("author")); + if ((jsonObj.get("description") != null && !jsonObj.get("description").isJsonNull()) + && !jsonObj.get("description").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `description` to be a primitive type in the JSON" + + " string but got `%s`", + jsonObj.get("description").toString())); + } + if (!jsonObj.get("file_format").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `file_format` to be a primitive type in the JSON" + + " string but got `%s`", + jsonObj.get("file_format").toString())); + } + // validate the required field `frequency` + Frequency.validateJsonElement(jsonObj.get("frequency")); + if (!jsonObj.get("id").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `id` to be a primitive type in the JSON string but" + + " got `%s`", + jsonObj.get("id").toString())); + } + // validate the optional field `liveboard_options` + if (jsonObj.get("liveboard_options") != null + && !jsonObj.get("liveboard_options").isJsonNull()) { + LiveboardOptions.validateJsonElement(jsonObj.get("liveboard_options")); + } + // validate the required field `metadata` + MetadataResponse.validateJsonElement(jsonObj.get("metadata")); + if (!jsonObj.get("name").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `name` to be a primitive type in the JSON string" + + " but got `%s`", + jsonObj.get("name").toString())); + } + // validate the optional field `pdf_options` + if (jsonObj.get("pdf_options") != null && !jsonObj.get("pdf_options").isJsonNull()) { + PdfOptions.validateJsonElement(jsonObj.get("pdf_options")); + } + // validate the required field `recipient_details` + RecipientDetails.validateJsonElement(jsonObj.get("recipient_details")); + if ((jsonObj.get("status") != null && !jsonObj.get("status").isJsonNull()) + && !jsonObj.get("status").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `status` to be a primitive type in the JSON string" + + " but got `%s`", + jsonObj.get("status").toString())); + } + if (!jsonObj.get("time_zone").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `time_zone` to be a primitive type in the JSON" + + " string but got `%s`", + jsonObj.get("time_zone").toString())); + } + if (jsonObj.get("history_runs") != null && !jsonObj.get("history_runs").isJsonNull()) { + JsonArray jsonArrayhistoryRuns = jsonObj.getAsJsonArray("history_runs"); + if (jsonArrayhistoryRuns != null) { + // ensure the json data is an array + if (!jsonObj.get("history_runs").isJsonArray()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `history_runs` to be an array in the JSON" + + " string but got `%s`", + jsonObj.get("history_runs").toString())); + } + + // validate the optional field `history_runs` (array) + for (int i = 0; i < jsonArrayhistoryRuns.size(); i++) { + ResponseScheduleRun.validateJsonElement(jsonArrayhistoryRuns.get(i)); + } + ; + } + } + if ((jsonObj.get("personalised_view_id") != null + && !jsonObj.get("personalised_view_id").isJsonNull()) + && !jsonObj.get("personalised_view_id").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `personalised_view_id` to be a primitive type in" + + " the JSON string but got `%s`", + jsonObj.get("personalised_view_id").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!ResponseSchedule.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'ResponseSchedule' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter = + gson.getDelegateAdapter(this, TypeToken.get(ResponseSchedule.class)); + + return (TypeAdapter) + new TypeAdapter() { + @Override + public void write(JsonWriter out, ResponseSchedule value) + throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + obj.remove("additionalProperties"); + // serialize additional properties + if (value.getAdditionalProperties() != null) { + for (Map.Entry entry : + value.getAdditionalProperties().entrySet()) { + if (entry.getValue() instanceof String) + obj.addProperty(entry.getKey(), (String) entry.getValue()); + else if (entry.getValue() instanceof Number) + obj.addProperty(entry.getKey(), (Number) entry.getValue()); + else if (entry.getValue() instanceof Boolean) + obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); + else if (entry.getValue() instanceof Character) + obj.addProperty( + entry.getKey(), (Character) entry.getValue()); + else { + JsonElement jsonElement = gson.toJsonTree(entry.getValue()); + if (jsonElement.isJsonArray()) { + obj.add(entry.getKey(), jsonElement.getAsJsonArray()); + } else { + obj.add(entry.getKey(), jsonElement.getAsJsonObject()); + } + } + } + } + elementAdapter.write(out, obj); + } + + @Override + public ResponseSchedule read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // store additional fields in the deserialized instance + ResponseSchedule instance = thisAdapter.fromJsonTree(jsonObj); + for (Map.Entry entry : jsonObj.entrySet()) { + if (!openapiFields.contains(entry.getKey())) { + if (entry.getValue().isJsonPrimitive()) { // primitive type + if (entry.getValue().getAsJsonPrimitive().isString()) + instance.putAdditionalProperty( + entry.getKey(), entry.getValue().getAsString()); + else if (entry.getValue().getAsJsonPrimitive().isNumber()) + instance.putAdditionalProperty( + entry.getKey(), entry.getValue().getAsNumber()); + else if (entry.getValue().getAsJsonPrimitive().isBoolean()) + instance.putAdditionalProperty( + entry.getKey(), + entry.getValue().getAsBoolean()); + else + throw new IllegalArgumentException( + String.format( + "The field `%s` has unknown primitive" + + " type. Value: %s", + entry.getKey(), + entry.getValue().toString())); + } else if (entry.getValue().isJsonArray()) { + instance.putAdditionalProperty( + entry.getKey(), + gson.fromJson(entry.getValue(), List.class)); + } else { // JSON object + instance.putAdditionalProperty( + entry.getKey(), + gson.fromJson(entry.getValue(), HashMap.class)); + } + } + } + return instance; + } + }.nullSafe(); + } + } + + /** + * Create an instance of ResponseSchedule given an JSON string + * + * @param jsonString JSON string + * @return An instance of ResponseSchedule + * @throws IOException if the JSON string is invalid with respect to ResponseSchedule + */ + public static ResponseSchedule fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, ResponseSchedule.class); + } + + /** + * Convert an instance of ResponseSchedule to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} diff --git a/sdks/java/src/main/java/com/thoughtspot/client/model/ResponseScheduleRun.java b/sdks/java/src/main/java/com/thoughtspot/client/model/ResponseScheduleRun.java new file mode 100644 index 000000000..007e23ea5 --- /dev/null +++ b/sdks/java/src/main/java/com/thoughtspot/client/model/ResponseScheduleRun.java @@ -0,0 +1,454 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client.model; + +import com.google.gson.Gson; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.TypeAdapter; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.annotations.SerializedName; +import com.google.gson.reflect.TypeToken; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import com.thoughtspot.client.JSON; +import java.io.IOException; +import java.io.Serializable; +import java.util.Arrays; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Objects; +import org.openapitools.jackson.nullable.JsonNullable; + +/** Schedule run response object */ +@javax.annotation.Generated( + value = "org.openapitools.codegen.languages.JavaClientCodegen", + comments = "Generator version: 7.12.0") +public class ResponseScheduleRun implements Serializable { + private static final long serialVersionUID = 1L; + + public static final String SERIALIZED_NAME_ID = "id"; + + @SerializedName(SERIALIZED_NAME_ID) + @javax.annotation.Nonnull + private String id; + + public static final String SERIALIZED_NAME_START_TIME_IN_MILLIS = "start_time_in_millis"; + + @SerializedName(SERIALIZED_NAME_START_TIME_IN_MILLIS) + @javax.annotation.Nonnull + private Integer startTimeInMillis; + + public static final String SERIALIZED_NAME_END_TIME_IN_MILLIS = "end_time_in_millis"; + + @SerializedName(SERIALIZED_NAME_END_TIME_IN_MILLIS) + @javax.annotation.Nonnull + private Integer endTimeInMillis; + + public static final String SERIALIZED_NAME_STATUS = "status"; + + @SerializedName(SERIALIZED_NAME_STATUS) + @javax.annotation.Nonnull + private String status; + + public static final String SERIALIZED_NAME_DETAIL = "detail"; + + @SerializedName(SERIALIZED_NAME_DETAIL) + @javax.annotation.Nullable + private String detail; + + public ResponseScheduleRun() {} + + public ResponseScheduleRun id(@javax.annotation.Nonnull String id) { + this.id = id; + return this; + } + + /** + * GUID of the scheduled job. + * + * @return id + */ + @javax.annotation.Nonnull + public String getId() { + return id; + } + + public void setId(@javax.annotation.Nonnull String id) { + this.id = id; + } + + public ResponseScheduleRun startTimeInMillis( + @javax.annotation.Nonnull Integer startTimeInMillis) { + this.startTimeInMillis = startTimeInMillis; + return this; + } + + /** + * Schedule run start time in milliseconds. + * + * @return startTimeInMillis + */ + @javax.annotation.Nonnull + public Integer getStartTimeInMillis() { + return startTimeInMillis; + } + + public void setStartTimeInMillis(@javax.annotation.Nonnull Integer startTimeInMillis) { + this.startTimeInMillis = startTimeInMillis; + } + + public ResponseScheduleRun endTimeInMillis(@javax.annotation.Nonnull Integer endTimeInMillis) { + this.endTimeInMillis = endTimeInMillis; + return this; + } + + /** + * Schedule run end time in milliseconds. + * + * @return endTimeInMillis + */ + @javax.annotation.Nonnull + public Integer getEndTimeInMillis() { + return endTimeInMillis; + } + + public void setEndTimeInMillis(@javax.annotation.Nonnull Integer endTimeInMillis) { + this.endTimeInMillis = endTimeInMillis; + } + + public ResponseScheduleRun status(@javax.annotation.Nonnull String status) { + this.status = status; + return this; + } + + /** + * Status of the schedule run. + * + * @return status + */ + @javax.annotation.Nonnull + public String getStatus() { + return status; + } + + public void setStatus(@javax.annotation.Nonnull String status) { + this.status = status; + } + + public ResponseScheduleRun detail(@javax.annotation.Nullable String detail) { + this.detail = detail; + return this; + } + + /** + * Message details related to the schedule run. + * + * @return detail + */ + @javax.annotation.Nullable + public String getDetail() { + return detail; + } + + public void setDetail(@javax.annotation.Nullable String detail) { + this.detail = detail; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key name of the property + * @param value value of the property + * @return the ResponseScheduleRun instance itself + */ + public ResponseScheduleRun putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return a map of objects + */ + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key name of the property + * @return an object + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ResponseScheduleRun responseScheduleRun = (ResponseScheduleRun) o; + return Objects.equals(this.id, responseScheduleRun.id) + && Objects.equals(this.startTimeInMillis, responseScheduleRun.startTimeInMillis) + && Objects.equals(this.endTimeInMillis, responseScheduleRun.endTimeInMillis) + && Objects.equals(this.status, responseScheduleRun.status) + && Objects.equals(this.detail, responseScheduleRun.detail) + && Objects.equals( + this.additionalProperties, responseScheduleRun.additionalProperties); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b + || (a != null + && b != null + && a.isPresent() + && b.isPresent() + && Objects.deepEquals(a.get(), b.get())); + } + + @Override + public int hashCode() { + return Objects.hash( + id, startTimeInMillis, endTimeInMillis, status, detail, additionalProperties); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; + } + return a.isPresent() ? Arrays.deepHashCode(new Object[] {a.get()}) : 31; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ResponseScheduleRun {\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" startTimeInMillis: ") + .append(toIndentedString(startTimeInMillis)) + .append("\n"); + sb.append(" endTimeInMillis: ").append(toIndentedString(endTimeInMillis)).append("\n"); + sb.append(" status: ").append(toIndentedString(status)).append("\n"); + sb.append(" detail: ").append(toIndentedString(detail)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first + * line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("id"); + openapiFields.add("start_time_in_millis"); + openapiFields.add("end_time_in_millis"); + openapiFields.add("status"); + openapiFields.add("detail"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + openapiRequiredFields.add("id"); + openapiRequiredFields.add("start_time_in_millis"); + openapiRequiredFields.add("end_time_in_millis"); + openapiRequiredFields.add("status"); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to ResponseScheduleRun + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!ResponseScheduleRun.openapiRequiredFields + .isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException( + String.format( + "The required field(s) %s in ResponseScheduleRun is not found in" + + " the empty JSON string", + ResponseScheduleRun.openapiRequiredFields.toString())); + } + } + + // check to make sure all required properties/fields are present in the JSON string + for (String requiredField : ResponseScheduleRun.openapiRequiredFields) { + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException( + String.format( + "The required field `%s` is not found in the JSON string: %s", + requiredField, jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if (!jsonObj.get("id").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `id` to be a primitive type in the JSON string but" + + " got `%s`", + jsonObj.get("id").toString())); + } + if (!jsonObj.get("status").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `status` to be a primitive type in the JSON string" + + " but got `%s`", + jsonObj.get("status").toString())); + } + if ((jsonObj.get("detail") != null && !jsonObj.get("detail").isJsonNull()) + && !jsonObj.get("detail").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `detail` to be a primitive type in the JSON string" + + " but got `%s`", + jsonObj.get("detail").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!ResponseScheduleRun.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'ResponseScheduleRun' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter = + gson.getDelegateAdapter(this, TypeToken.get(ResponseScheduleRun.class)); + + return (TypeAdapter) + new TypeAdapter() { + @Override + public void write(JsonWriter out, ResponseScheduleRun value) + throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + obj.remove("additionalProperties"); + // serialize additional properties + if (value.getAdditionalProperties() != null) { + for (Map.Entry entry : + value.getAdditionalProperties().entrySet()) { + if (entry.getValue() instanceof String) + obj.addProperty(entry.getKey(), (String) entry.getValue()); + else if (entry.getValue() instanceof Number) + obj.addProperty(entry.getKey(), (Number) entry.getValue()); + else if (entry.getValue() instanceof Boolean) + obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); + else if (entry.getValue() instanceof Character) + obj.addProperty( + entry.getKey(), (Character) entry.getValue()); + else { + JsonElement jsonElement = gson.toJsonTree(entry.getValue()); + if (jsonElement.isJsonArray()) { + obj.add(entry.getKey(), jsonElement.getAsJsonArray()); + } else { + obj.add(entry.getKey(), jsonElement.getAsJsonObject()); + } + } + } + } + elementAdapter.write(out, obj); + } + + @Override + public ResponseScheduleRun read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // store additional fields in the deserialized instance + ResponseScheduleRun instance = thisAdapter.fromJsonTree(jsonObj); + for (Map.Entry entry : jsonObj.entrySet()) { + if (!openapiFields.contains(entry.getKey())) { + if (entry.getValue().isJsonPrimitive()) { // primitive type + if (entry.getValue().getAsJsonPrimitive().isString()) + instance.putAdditionalProperty( + entry.getKey(), entry.getValue().getAsString()); + else if (entry.getValue().getAsJsonPrimitive().isNumber()) + instance.putAdditionalProperty( + entry.getKey(), entry.getValue().getAsNumber()); + else if (entry.getValue().getAsJsonPrimitive().isBoolean()) + instance.putAdditionalProperty( + entry.getKey(), + entry.getValue().getAsBoolean()); + else + throw new IllegalArgumentException( + String.format( + "The field `%s` has unknown primitive" + + " type. Value: %s", + entry.getKey(), + entry.getValue().toString())); + } else if (entry.getValue().isJsonArray()) { + instance.putAdditionalProperty( + entry.getKey(), + gson.fromJson(entry.getValue(), List.class)); + } else { // JSON object + instance.putAdditionalProperty( + entry.getKey(), + gson.fromJson(entry.getValue(), HashMap.class)); + } + } + } + return instance; + } + }.nullSafe(); + } + } + + /** + * Create an instance of ResponseScheduleRun given an JSON string + * + * @param jsonString JSON string + * @return An instance of ResponseScheduleRun + * @throws IOException if the JSON string is invalid with respect to ResponseScheduleRun + */ + public static ResponseScheduleRun fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, ResponseScheduleRun.class); + } + + /** + * Convert an instance of ResponseScheduleRun to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} diff --git a/sdks/java/src/main/java/com/thoughtspot/client/model/ResponseSuccessfulEntities.java b/sdks/java/src/main/java/com/thoughtspot/client/model/ResponseSuccessfulEntities.java new file mode 100644 index 000000000..33a0a606f --- /dev/null +++ b/sdks/java/src/main/java/com/thoughtspot/client/model/ResponseSuccessfulEntities.java @@ -0,0 +1,324 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client.model; + +import com.google.gson.Gson; +import com.google.gson.JsonArray; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.TypeAdapter; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.annotations.SerializedName; +import com.google.gson.reflect.TypeToken; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import com.thoughtspot.client.JSON; +import java.io.IOException; +import java.io.Serializable; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Objects; + +/** + * Wrapper for the successful entities, as they are inside a 'data' field in the response. + */ +@javax.annotation.Generated( + value = "org.openapitools.codegen.languages.JavaClientCodegen", + comments = "Generator version: 7.12.0") +public class ResponseSuccessfulEntities implements Serializable { + private static final long serialVersionUID = 1L; + + public static final String SERIALIZED_NAME_DATA = "data"; + + @SerializedName(SERIALIZED_NAME_DATA) + @javax.annotation.Nonnull + private List data; + + public ResponseSuccessfulEntities() {} + + public ResponseSuccessfulEntities data( + @javax.annotation.Nonnull List data) { + this.data = data; + return this; + } + + public ResponseSuccessfulEntities addDataItem(ResponseSuccessfulEntity dataItem) { + if (this.data == null) { + this.data = new ArrayList<>(); + } + this.data.add(dataItem); + return this; + } + + /** + * Get data + * + * @return data + */ + @javax.annotation.Nonnull + public List getData() { + return data; + } + + public void setData(@javax.annotation.Nonnull List data) { + this.data = data; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key name of the property + * @param value value of the property + * @return the ResponseSuccessfulEntities instance itself + */ + public ResponseSuccessfulEntities putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return a map of objects + */ + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key name of the property + * @return an object + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ResponseSuccessfulEntities responseSuccessfulEntities = (ResponseSuccessfulEntities) o; + return Objects.equals(this.data, responseSuccessfulEntities.data) + && Objects.equals( + this.additionalProperties, responseSuccessfulEntities.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(data, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ResponseSuccessfulEntities {\n"); + sb.append(" data: ").append(toIndentedString(data)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first + * line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("data"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + openapiRequiredFields.add("data"); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to ResponseSuccessfulEntities + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!ResponseSuccessfulEntities.openapiRequiredFields + .isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException( + String.format( + "The required field(s) %s in ResponseSuccessfulEntities is not" + + " found in the empty JSON string", + ResponseSuccessfulEntities.openapiRequiredFields.toString())); + } + } + + // check to make sure all required properties/fields are present in the JSON string + for (String requiredField : ResponseSuccessfulEntities.openapiRequiredFields) { + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException( + String.format( + "The required field `%s` is not found in the JSON string: %s", + requiredField, jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // ensure the json data is an array + if (!jsonObj.get("data").isJsonArray()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `data` to be an array in the JSON string but got" + + " `%s`", + jsonObj.get("data").toString())); + } + + JsonArray jsonArraydata = jsonObj.getAsJsonArray("data"); + // validate the required field `data` (array) + for (int i = 0; i < jsonArraydata.size(); i++) { + ResponseSuccessfulEntity.validateJsonElement(jsonArraydata.get(i)); + } + ; + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!ResponseSuccessfulEntities.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'ResponseSuccessfulEntities' and its + // subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter = + gson.getDelegateAdapter(this, TypeToken.get(ResponseSuccessfulEntities.class)); + + return (TypeAdapter) + new TypeAdapter() { + @Override + public void write(JsonWriter out, ResponseSuccessfulEntities value) + throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + obj.remove("additionalProperties"); + // serialize additional properties + if (value.getAdditionalProperties() != null) { + for (Map.Entry entry : + value.getAdditionalProperties().entrySet()) { + if (entry.getValue() instanceof String) + obj.addProperty(entry.getKey(), (String) entry.getValue()); + else if (entry.getValue() instanceof Number) + obj.addProperty(entry.getKey(), (Number) entry.getValue()); + else if (entry.getValue() instanceof Boolean) + obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); + else if (entry.getValue() instanceof Character) + obj.addProperty( + entry.getKey(), (Character) entry.getValue()); + else { + JsonElement jsonElement = gson.toJsonTree(entry.getValue()); + if (jsonElement.isJsonArray()) { + obj.add(entry.getKey(), jsonElement.getAsJsonArray()); + } else { + obj.add(entry.getKey(), jsonElement.getAsJsonObject()); + } + } + } + } + elementAdapter.write(out, obj); + } + + @Override + public ResponseSuccessfulEntities read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // store additional fields in the deserialized instance + ResponseSuccessfulEntities instance = thisAdapter.fromJsonTree(jsonObj); + for (Map.Entry entry : jsonObj.entrySet()) { + if (!openapiFields.contains(entry.getKey())) { + if (entry.getValue().isJsonPrimitive()) { // primitive type + if (entry.getValue().getAsJsonPrimitive().isString()) + instance.putAdditionalProperty( + entry.getKey(), entry.getValue().getAsString()); + else if (entry.getValue().getAsJsonPrimitive().isNumber()) + instance.putAdditionalProperty( + entry.getKey(), entry.getValue().getAsNumber()); + else if (entry.getValue().getAsJsonPrimitive().isBoolean()) + instance.putAdditionalProperty( + entry.getKey(), + entry.getValue().getAsBoolean()); + else + throw new IllegalArgumentException( + String.format( + "The field `%s` has unknown primitive" + + " type. Value: %s", + entry.getKey(), + entry.getValue().toString())); + } else if (entry.getValue().isJsonArray()) { + instance.putAdditionalProperty( + entry.getKey(), + gson.fromJson(entry.getValue(), List.class)); + } else { // JSON object + instance.putAdditionalProperty( + entry.getKey(), + gson.fromJson(entry.getValue(), HashMap.class)); + } + } + } + return instance; + } + }.nullSafe(); + } + } + + /** + * Create an instance of ResponseSuccessfulEntities given an JSON string + * + * @param jsonString JSON string + * @return An instance of ResponseSuccessfulEntities + * @throws IOException if the JSON string is invalid with respect to ResponseSuccessfulEntities + */ + public static ResponseSuccessfulEntities fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, ResponseSuccessfulEntities.class); + } + + /** + * Convert an instance of ResponseSuccessfulEntities to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} diff --git a/sdks/java/src/main/java/com/thoughtspot/client/model/ResponseSuccessfulEntity.java b/sdks/java/src/main/java/com/thoughtspot/client/model/ResponseSuccessfulEntity.java new file mode 100644 index 000000000..37e773529 --- /dev/null +++ b/sdks/java/src/main/java/com/thoughtspot/client/model/ResponseSuccessfulEntity.java @@ -0,0 +1,339 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client.model; + +import com.google.gson.Gson; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.TypeAdapter; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.annotations.SerializedName; +import com.google.gson.reflect.TypeToken; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import com.thoughtspot.client.JSON; +import java.io.IOException; +import java.io.Serializable; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Objects; + +/** Unique ID of the worksheet. */ +@javax.annotation.Generated( + value = "org.openapitools.codegen.languages.JavaClientCodegen", + comments = "Generator version: 7.12.0") +public class ResponseSuccessfulEntity implements Serializable { + private static final long serialVersionUID = 1L; + + public static final String SERIALIZED_NAME_ID = "id"; + + @SerializedName(SERIALIZED_NAME_ID) + @javax.annotation.Nonnull + private String id; + + public static final String SERIALIZED_NAME_NAME = "name"; + + @SerializedName(SERIALIZED_NAME_NAME) + @javax.annotation.Nonnull + private String name; + + public ResponseSuccessfulEntity() {} + + public ResponseSuccessfulEntity id(@javax.annotation.Nonnull String id) { + this.id = id; + return this; + } + + /** + * Get id + * + * @return id + */ + @javax.annotation.Nonnull + public String getId() { + return id; + } + + public void setId(@javax.annotation.Nonnull String id) { + this.id = id; + } + + public ResponseSuccessfulEntity name(@javax.annotation.Nonnull String name) { + this.name = name; + return this; + } + + /** + * Name of the worksheet. + * + * @return name + */ + @javax.annotation.Nonnull + public String getName() { + return name; + } + + public void setName(@javax.annotation.Nonnull String name) { + this.name = name; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key name of the property + * @param value value of the property + * @return the ResponseSuccessfulEntity instance itself + */ + public ResponseSuccessfulEntity putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return a map of objects + */ + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key name of the property + * @return an object + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ResponseSuccessfulEntity responseSuccessfulEntity = (ResponseSuccessfulEntity) o; + return Objects.equals(this.id, responseSuccessfulEntity.id) + && Objects.equals(this.name, responseSuccessfulEntity.name) + && Objects.equals( + this.additionalProperties, responseSuccessfulEntity.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(id, name, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ResponseSuccessfulEntity {\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first + * line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("id"); + openapiFields.add("name"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + openapiRequiredFields.add("id"); + openapiRequiredFields.add("name"); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to ResponseSuccessfulEntity + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!ResponseSuccessfulEntity.openapiRequiredFields + .isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException( + String.format( + "The required field(s) %s in ResponseSuccessfulEntity is not found" + + " in the empty JSON string", + ResponseSuccessfulEntity.openapiRequiredFields.toString())); + } + } + + // check to make sure all required properties/fields are present in the JSON string + for (String requiredField : ResponseSuccessfulEntity.openapiRequiredFields) { + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException( + String.format( + "The required field `%s` is not found in the JSON string: %s", + requiredField, jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if (!jsonObj.get("id").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `id` to be a primitive type in the JSON string but" + + " got `%s`", + jsonObj.get("id").toString())); + } + if (!jsonObj.get("name").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `name` to be a primitive type in the JSON string" + + " but got `%s`", + jsonObj.get("name").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!ResponseSuccessfulEntity.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'ResponseSuccessfulEntity' and its + // subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter = + gson.getDelegateAdapter(this, TypeToken.get(ResponseSuccessfulEntity.class)); + + return (TypeAdapter) + new TypeAdapter() { + @Override + public void write(JsonWriter out, ResponseSuccessfulEntity value) + throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + obj.remove("additionalProperties"); + // serialize additional properties + if (value.getAdditionalProperties() != null) { + for (Map.Entry entry : + value.getAdditionalProperties().entrySet()) { + if (entry.getValue() instanceof String) + obj.addProperty(entry.getKey(), (String) entry.getValue()); + else if (entry.getValue() instanceof Number) + obj.addProperty(entry.getKey(), (Number) entry.getValue()); + else if (entry.getValue() instanceof Boolean) + obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); + else if (entry.getValue() instanceof Character) + obj.addProperty( + entry.getKey(), (Character) entry.getValue()); + else { + JsonElement jsonElement = gson.toJsonTree(entry.getValue()); + if (jsonElement.isJsonArray()) { + obj.add(entry.getKey(), jsonElement.getAsJsonArray()); + } else { + obj.add(entry.getKey(), jsonElement.getAsJsonObject()); + } + } + } + } + elementAdapter.write(out, obj); + } + + @Override + public ResponseSuccessfulEntity read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // store additional fields in the deserialized instance + ResponseSuccessfulEntity instance = thisAdapter.fromJsonTree(jsonObj); + for (Map.Entry entry : jsonObj.entrySet()) { + if (!openapiFields.contains(entry.getKey())) { + if (entry.getValue().isJsonPrimitive()) { // primitive type + if (entry.getValue().getAsJsonPrimitive().isString()) + instance.putAdditionalProperty( + entry.getKey(), entry.getValue().getAsString()); + else if (entry.getValue().getAsJsonPrimitive().isNumber()) + instance.putAdditionalProperty( + entry.getKey(), entry.getValue().getAsNumber()); + else if (entry.getValue().getAsJsonPrimitive().isBoolean()) + instance.putAdditionalProperty( + entry.getKey(), + entry.getValue().getAsBoolean()); + else + throw new IllegalArgumentException( + String.format( + "The field `%s` has unknown primitive" + + " type. Value: %s", + entry.getKey(), + entry.getValue().toString())); + } else if (entry.getValue().isJsonArray()) { + instance.putAdditionalProperty( + entry.getKey(), + gson.fromJson(entry.getValue(), List.class)); + } else { // JSON object + instance.putAdditionalProperty( + entry.getKey(), + gson.fromJson(entry.getValue(), HashMap.class)); + } + } + } + return instance; + } + }.nullSafe(); + } + } + + /** + * Create an instance of ResponseSuccessfulEntity given an JSON string + * + * @param jsonString JSON string + * @return An instance of ResponseSuccessfulEntity + * @throws IOException if the JSON string is invalid with respect to ResponseSuccessfulEntity + */ + public static ResponseSuccessfulEntity fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, ResponseSuccessfulEntity.class); + } + + /** + * Convert an instance of ResponseSuccessfulEntity to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} diff --git a/sdks/java/src/main/java/com/thoughtspot/client/model/ResponseWorksheetToModelConversion.java b/sdks/java/src/main/java/com/thoughtspot/client/model/ResponseWorksheetToModelConversion.java new file mode 100644 index 000000000..0b27b21e6 --- /dev/null +++ b/sdks/java/src/main/java/com/thoughtspot/client/model/ResponseWorksheetToModelConversion.java @@ -0,0 +1,632 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client.model; + +import com.google.gson.Gson; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.TypeAdapter; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.annotations.SerializedName; +import com.google.gson.reflect.TypeToken; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import com.thoughtspot.client.JSON; +import java.io.IOException; +import java.io.Serializable; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Objects; + +/** Name of the conversion process, which involves converting worksheets to models. */ +@javax.annotation.Generated( + value = "org.openapitools.codegen.languages.JavaClientCodegen", + comments = "Generator version: 7.12.0") +public class ResponseWorksheetToModelConversion implements Serializable { + private static final long serialVersionUID = 1L; + + public static final String SERIALIZED_NAME_NAME = "name"; + + @SerializedName(SERIALIZED_NAME_NAME) + @javax.annotation.Nonnull + private String name; + + public static final String SERIALIZED_NAME_SUCCESS_COUNT = "success_count"; + + @SerializedName(SERIALIZED_NAME_SUCCESS_COUNT) + @javax.annotation.Nonnull + private Integer successCount; + + public static final String SERIALIZED_NAME_FAILURE_COUNT = "failure_count"; + + @SerializedName(SERIALIZED_NAME_FAILURE_COUNT) + @javax.annotation.Nonnull + private Integer failureCount; + + public static final String SERIALIZED_NAME_INCOMPLETE_COUNT = "incomplete_count"; + + @SerializedName(SERIALIZED_NAME_INCOMPLETE_COUNT) + @javax.annotation.Nonnull + private Integer incompleteCount; + + public static final String SERIALIZED_NAME_POST_UPGRADE_FAILED_COUNT = + "post_upgrade_failed_count"; + + @SerializedName(SERIALIZED_NAME_POST_UPGRADE_FAILED_COUNT) + @javax.annotation.Nonnull + private Integer postUpgradeFailedCount; + + public static final String SERIALIZED_NAME_TOTAL_TIME_IN_MILLIS = "total_time_in_millis"; + + @SerializedName(SERIALIZED_NAME_TOTAL_TIME_IN_MILLIS) + @javax.annotation.Nonnull + private Integer totalTimeInMillis; + + public static final String SERIALIZED_NAME_SUCCESSFUL_ENTITIES = "successful_entities"; + + @SerializedName(SERIALIZED_NAME_SUCCESSFUL_ENTITIES) + @javax.annotation.Nonnull + private ResponseSuccessfulEntities successfulEntities; + + public static final String SERIALIZED_NAME_FAILED_ENTITIES = "failed_entities"; + + @SerializedName(SERIALIZED_NAME_FAILED_ENTITIES) + @javax.annotation.Nonnull + private ResponseFailedEntities failedEntities; + + public static final String SERIALIZED_NAME_INCOMPLETE_ENTITIES = "incomplete_entities"; + + @SerializedName(SERIALIZED_NAME_INCOMPLETE_ENTITIES) + @javax.annotation.Nonnull + private ResponseIncompleteEntities incompleteEntities; + + public static final String SERIALIZED_NAME_POST_UPGRADE_FAILED_ENTITIES = + "post_upgrade_failed_entities"; + + @SerializedName(SERIALIZED_NAME_POST_UPGRADE_FAILED_ENTITIES) + @javax.annotation.Nonnull + private ResponsePostUpgradeFailedEntities postUpgradeFailedEntities; + + public ResponseWorksheetToModelConversion() {} + + public ResponseWorksheetToModelConversion name(@javax.annotation.Nonnull String name) { + this.name = name; + return this; + } + + /** + * Get name + * + * @return name + */ + @javax.annotation.Nonnull + public String getName() { + return name; + } + + public void setName(@javax.annotation.Nonnull String name) { + this.name = name; + } + + public ResponseWorksheetToModelConversion successCount( + @javax.annotation.Nonnull Integer successCount) { + this.successCount = successCount; + return this; + } + + /** + * The number of worksheets successfully converted to models. + * + * @return successCount + */ + @javax.annotation.Nonnull + public Integer getSuccessCount() { + return successCount; + } + + public void setSuccessCount(@javax.annotation.Nonnull Integer successCount) { + this.successCount = successCount; + } + + public ResponseWorksheetToModelConversion failureCount( + @javax.annotation.Nonnull Integer failureCount) { + this.failureCount = failureCount; + return this; + } + + /** + * The number of worksheets that failed to convert. + * + * @return failureCount + */ + @javax.annotation.Nonnull + public Integer getFailureCount() { + return failureCount; + } + + public void setFailureCount(@javax.annotation.Nonnull Integer failureCount) { + this.failureCount = failureCount; + } + + public ResponseWorksheetToModelConversion incompleteCount( + @javax.annotation.Nonnull Integer incompleteCount) { + this.incompleteCount = incompleteCount; + return this; + } + + /** + * The number of worksheets that were incomplete during the conversion process. + * + * @return incompleteCount + */ + @javax.annotation.Nonnull + public Integer getIncompleteCount() { + return incompleteCount; + } + + public void setIncompleteCount(@javax.annotation.Nonnull Integer incompleteCount) { + this.incompleteCount = incompleteCount; + } + + public ResponseWorksheetToModelConversion postUpgradeFailedCount( + @javax.annotation.Nonnull Integer postUpgradeFailedCount) { + this.postUpgradeFailedCount = postUpgradeFailedCount; + return this; + } + + /** + * The number of worksheets that failed after an upgrade during the conversion process. + * + * @return postUpgradeFailedCount + */ + @javax.annotation.Nonnull + public Integer getPostUpgradeFailedCount() { + return postUpgradeFailedCount; + } + + public void setPostUpgradeFailedCount( + @javax.annotation.Nonnull Integer postUpgradeFailedCount) { + this.postUpgradeFailedCount = postUpgradeFailedCount; + } + + public ResponseWorksheetToModelConversion totalTimeInMillis( + @javax.annotation.Nonnull Integer totalTimeInMillis) { + this.totalTimeInMillis = totalTimeInMillis; + return this; + } + + /** + * The total time taken to complete the conversion process in milliseconds. + * + * @return totalTimeInMillis + */ + @javax.annotation.Nonnull + public Integer getTotalTimeInMillis() { + return totalTimeInMillis; + } + + public void setTotalTimeInMillis(@javax.annotation.Nonnull Integer totalTimeInMillis) { + this.totalTimeInMillis = totalTimeInMillis; + } + + public ResponseWorksheetToModelConversion successfulEntities( + @javax.annotation.Nonnull ResponseSuccessfulEntities successfulEntities) { + this.successfulEntities = successfulEntities; + return this; + } + + /** + * Get successfulEntities + * + * @return successfulEntities + */ + @javax.annotation.Nonnull + public ResponseSuccessfulEntities getSuccessfulEntities() { + return successfulEntities; + } + + public void setSuccessfulEntities( + @javax.annotation.Nonnull ResponseSuccessfulEntities successfulEntities) { + this.successfulEntities = successfulEntities; + } + + public ResponseWorksheetToModelConversion failedEntities( + @javax.annotation.Nonnull ResponseFailedEntities failedEntities) { + this.failedEntities = failedEntities; + return this; + } + + /** + * Get failedEntities + * + * @return failedEntities + */ + @javax.annotation.Nonnull + public ResponseFailedEntities getFailedEntities() { + return failedEntities; + } + + public void setFailedEntities(@javax.annotation.Nonnull ResponseFailedEntities failedEntities) { + this.failedEntities = failedEntities; + } + + public ResponseWorksheetToModelConversion incompleteEntities( + @javax.annotation.Nonnull ResponseIncompleteEntities incompleteEntities) { + this.incompleteEntities = incompleteEntities; + return this; + } + + /** + * Get incompleteEntities + * + * @return incompleteEntities + */ + @javax.annotation.Nonnull + public ResponseIncompleteEntities getIncompleteEntities() { + return incompleteEntities; + } + + public void setIncompleteEntities( + @javax.annotation.Nonnull ResponseIncompleteEntities incompleteEntities) { + this.incompleteEntities = incompleteEntities; + } + + public ResponseWorksheetToModelConversion postUpgradeFailedEntities( + @javax.annotation.Nonnull ResponsePostUpgradeFailedEntities postUpgradeFailedEntities) { + this.postUpgradeFailedEntities = postUpgradeFailedEntities; + return this; + } + + /** + * Get postUpgradeFailedEntities + * + * @return postUpgradeFailedEntities + */ + @javax.annotation.Nonnull + public ResponsePostUpgradeFailedEntities getPostUpgradeFailedEntities() { + return postUpgradeFailedEntities; + } + + public void setPostUpgradeFailedEntities( + @javax.annotation.Nonnull ResponsePostUpgradeFailedEntities postUpgradeFailedEntities) { + this.postUpgradeFailedEntities = postUpgradeFailedEntities; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key name of the property + * @param value value of the property + * @return the ResponseWorksheetToModelConversion instance itself + */ + public ResponseWorksheetToModelConversion putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return a map of objects + */ + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key name of the property + * @return an object + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ResponseWorksheetToModelConversion responseWorksheetToModelConversion = + (ResponseWorksheetToModelConversion) o; + return Objects.equals(this.name, responseWorksheetToModelConversion.name) + && Objects.equals( + this.successCount, responseWorksheetToModelConversion.successCount) + && Objects.equals( + this.failureCount, responseWorksheetToModelConversion.failureCount) + && Objects.equals( + this.incompleteCount, responseWorksheetToModelConversion.incompleteCount) + && Objects.equals( + this.postUpgradeFailedCount, + responseWorksheetToModelConversion.postUpgradeFailedCount) + && Objects.equals( + this.totalTimeInMillis, + responseWorksheetToModelConversion.totalTimeInMillis) + && Objects.equals( + this.successfulEntities, + responseWorksheetToModelConversion.successfulEntities) + && Objects.equals( + this.failedEntities, responseWorksheetToModelConversion.failedEntities) + && Objects.equals( + this.incompleteEntities, + responseWorksheetToModelConversion.incompleteEntities) + && Objects.equals( + this.postUpgradeFailedEntities, + responseWorksheetToModelConversion.postUpgradeFailedEntities) + && Objects.equals( + this.additionalProperties, + responseWorksheetToModelConversion.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash( + name, + successCount, + failureCount, + incompleteCount, + postUpgradeFailedCount, + totalTimeInMillis, + successfulEntities, + failedEntities, + incompleteEntities, + postUpgradeFailedEntities, + additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ResponseWorksheetToModelConversion {\n"); + sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append(" successCount: ").append(toIndentedString(successCount)).append("\n"); + sb.append(" failureCount: ").append(toIndentedString(failureCount)).append("\n"); + sb.append(" incompleteCount: ").append(toIndentedString(incompleteCount)).append("\n"); + sb.append(" postUpgradeFailedCount: ") + .append(toIndentedString(postUpgradeFailedCount)) + .append("\n"); + sb.append(" totalTimeInMillis: ") + .append(toIndentedString(totalTimeInMillis)) + .append("\n"); + sb.append(" successfulEntities: ") + .append(toIndentedString(successfulEntities)) + .append("\n"); + sb.append(" failedEntities: ").append(toIndentedString(failedEntities)).append("\n"); + sb.append(" incompleteEntities: ") + .append(toIndentedString(incompleteEntities)) + .append("\n"); + sb.append(" postUpgradeFailedEntities: ") + .append(toIndentedString(postUpgradeFailedEntities)) + .append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first + * line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("name"); + openapiFields.add("success_count"); + openapiFields.add("failure_count"); + openapiFields.add("incomplete_count"); + openapiFields.add("post_upgrade_failed_count"); + openapiFields.add("total_time_in_millis"); + openapiFields.add("successful_entities"); + openapiFields.add("failed_entities"); + openapiFields.add("incomplete_entities"); + openapiFields.add("post_upgrade_failed_entities"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + openapiRequiredFields.add("name"); + openapiRequiredFields.add("success_count"); + openapiRequiredFields.add("failure_count"); + openapiRequiredFields.add("incomplete_count"); + openapiRequiredFields.add("post_upgrade_failed_count"); + openapiRequiredFields.add("total_time_in_millis"); + openapiRequiredFields.add("successful_entities"); + openapiRequiredFields.add("failed_entities"); + openapiRequiredFields.add("incomplete_entities"); + openapiRequiredFields.add("post_upgrade_failed_entities"); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to + * ResponseWorksheetToModelConversion + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!ResponseWorksheetToModelConversion.openapiRequiredFields + .isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException( + String.format( + "The required field(s) %s in ResponseWorksheetToModelConversion is" + + " not found in the empty JSON string", + ResponseWorksheetToModelConversion.openapiRequiredFields + .toString())); + } + } + + // check to make sure all required properties/fields are present in the JSON string + for (String requiredField : ResponseWorksheetToModelConversion.openapiRequiredFields) { + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException( + String.format( + "The required field `%s` is not found in the JSON string: %s", + requiredField, jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if (!jsonObj.get("name").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `name` to be a primitive type in the JSON string" + + " but got `%s`", + jsonObj.get("name").toString())); + } + // validate the required field `successful_entities` + ResponseSuccessfulEntities.validateJsonElement(jsonObj.get("successful_entities")); + // validate the required field `failed_entities` + ResponseFailedEntities.validateJsonElement(jsonObj.get("failed_entities")); + // validate the required field `incomplete_entities` + ResponseIncompleteEntities.validateJsonElement(jsonObj.get("incomplete_entities")); + // validate the required field `post_upgrade_failed_entities` + ResponsePostUpgradeFailedEntities.validateJsonElement( + jsonObj.get("post_upgrade_failed_entities")); + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!ResponseWorksheetToModelConversion.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'ResponseWorksheetToModelConversion' and + // its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter = + gson.getDelegateAdapter( + this, TypeToken.get(ResponseWorksheetToModelConversion.class)); + + return (TypeAdapter) + new TypeAdapter() { + @Override + public void write(JsonWriter out, ResponseWorksheetToModelConversion value) + throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + obj.remove("additionalProperties"); + // serialize additional properties + if (value.getAdditionalProperties() != null) { + for (Map.Entry entry : + value.getAdditionalProperties().entrySet()) { + if (entry.getValue() instanceof String) + obj.addProperty(entry.getKey(), (String) entry.getValue()); + else if (entry.getValue() instanceof Number) + obj.addProperty(entry.getKey(), (Number) entry.getValue()); + else if (entry.getValue() instanceof Boolean) + obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); + else if (entry.getValue() instanceof Character) + obj.addProperty( + entry.getKey(), (Character) entry.getValue()); + else { + JsonElement jsonElement = gson.toJsonTree(entry.getValue()); + if (jsonElement.isJsonArray()) { + obj.add(entry.getKey(), jsonElement.getAsJsonArray()); + } else { + obj.add(entry.getKey(), jsonElement.getAsJsonObject()); + } + } + } + } + elementAdapter.write(out, obj); + } + + @Override + public ResponseWorksheetToModelConversion read(JsonReader in) + throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // store additional fields in the deserialized instance + ResponseWorksheetToModelConversion instance = + thisAdapter.fromJsonTree(jsonObj); + for (Map.Entry entry : jsonObj.entrySet()) { + if (!openapiFields.contains(entry.getKey())) { + if (entry.getValue().isJsonPrimitive()) { // primitive type + if (entry.getValue().getAsJsonPrimitive().isString()) + instance.putAdditionalProperty( + entry.getKey(), entry.getValue().getAsString()); + else if (entry.getValue().getAsJsonPrimitive().isNumber()) + instance.putAdditionalProperty( + entry.getKey(), entry.getValue().getAsNumber()); + else if (entry.getValue().getAsJsonPrimitive().isBoolean()) + instance.putAdditionalProperty( + entry.getKey(), + entry.getValue().getAsBoolean()); + else + throw new IllegalArgumentException( + String.format( + "The field `%s` has unknown primitive" + + " type. Value: %s", + entry.getKey(), + entry.getValue().toString())); + } else if (entry.getValue().isJsonArray()) { + instance.putAdditionalProperty( + entry.getKey(), + gson.fromJson(entry.getValue(), List.class)); + } else { // JSON object + instance.putAdditionalProperty( + entry.getKey(), + gson.fromJson(entry.getValue(), HashMap.class)); + } + } + } + return instance; + } + }.nullSafe(); + } + } + + /** + * Create an instance of ResponseWorksheetToModelConversion given an JSON string + * + * @param jsonString JSON string + * @return An instance of ResponseWorksheetToModelConversion + * @throws IOException if the JSON string is invalid with respect to + * ResponseWorksheetToModelConversion + */ + public static ResponseWorksheetToModelConversion fromJson(String jsonString) + throws IOException { + return JSON.getGson().fromJson(jsonString, ResponseWorksheetToModelConversion.class); + } + + /** + * Convert an instance of ResponseWorksheetToModelConversion to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} diff --git a/sdks/java/src/main/java/com/thoughtspot/client/model/RevertCommitRequest.java b/sdks/java/src/main/java/com/thoughtspot/client/model/RevertCommitRequest.java new file mode 100644 index 000000000..73114814a --- /dev/null +++ b/sdks/java/src/main/java/com/thoughtspot/client/model/RevertCommitRequest.java @@ -0,0 +1,443 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client.model; + +import com.google.gson.Gson; +import com.google.gson.JsonArray; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.TypeAdapter; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.reflect.TypeToken; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import com.thoughtspot.client.JSON; +import java.io.IOException; +import java.io.Serializable; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Objects; + +/** RevertCommitRequest */ +@javax.annotation.Generated( + value = "org.openapitools.codegen.languages.JavaClientCodegen", + comments = "Generator version: 7.12.0") +public class RevertCommitRequest implements Serializable { + private static final long serialVersionUID = 1L; + + public static final String SERIALIZED_NAME_METADATA = "metadata"; + + @SerializedName(SERIALIZED_NAME_METADATA) + @javax.annotation.Nullable + private List metadata; + + public static final String SERIALIZED_NAME_BRANCH_NAME = "branch_name"; + + @SerializedName(SERIALIZED_NAME_BRANCH_NAME) + @javax.annotation.Nullable + private String branchName; + + /** Policy to apply when reverting a commit. Valid values: [ALL_OR_NONE, PARTIAL] */ + @JsonAdapter(RevertPolicyEnum.Adapter.class) + public enum RevertPolicyEnum { + ALL_OR_NONE("ALL_OR_NONE"), + + PARTIAL("PARTIAL"); + + private String value; + + RevertPolicyEnum(String value) { + this.value = value; + } + + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + public static RevertPolicyEnum fromValue(String value) { + for (RevertPolicyEnum b : RevertPolicyEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + + public static class Adapter extends TypeAdapter { + @Override + public void write(final JsonWriter jsonWriter, final RevertPolicyEnum enumeration) + throws IOException { + jsonWriter.value(enumeration.getValue()); + } + + @Override + public RevertPolicyEnum read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + return RevertPolicyEnum.fromValue(value); + } + } + + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + String value = jsonElement.getAsString(); + RevertPolicyEnum.fromValue(value); + } + } + + public static final String SERIALIZED_NAME_REVERT_POLICY = "revert_policy"; + + @SerializedName(SERIALIZED_NAME_REVERT_POLICY) + @javax.annotation.Nullable + private RevertPolicyEnum revertPolicy = RevertPolicyEnum.ALL_OR_NONE; + + public RevertCommitRequest() {} + + public RevertCommitRequest metadata(@javax.annotation.Nullable List metadata) { + this.metadata = metadata; + return this; + } + + public RevertCommitRequest addMetadataItem(MetadataObject metadataItem) { + if (this.metadata == null) { + this.metadata = new ArrayList<>(); + } + this.metadata.add(metadataItem); + return this; + } + + /** + * Metadata objects. + * + * @return metadata + */ + @javax.annotation.Nullable + public List getMetadata() { + return metadata; + } + + public void setMetadata(@javax.annotation.Nullable List metadata) { + this.metadata = metadata; + } + + public RevertCommitRequest branchName(@javax.annotation.Nullable String branchName) { + this.branchName = branchName; + return this; + } + + /** + * Name of the branch where the reverted version should be committed Note: If no branch_name is + * specified, then the commit_branch_name will be considered. + * + * @return branchName + */ + @javax.annotation.Nullable + public String getBranchName() { + return branchName; + } + + public void setBranchName(@javax.annotation.Nullable String branchName) { + this.branchName = branchName; + } + + public RevertCommitRequest revertPolicy( + @javax.annotation.Nullable RevertPolicyEnum revertPolicy) { + this.revertPolicy = revertPolicy; + return this; + } + + /** + * Policy to apply when reverting a commit. Valid values: [ALL_OR_NONE, PARTIAL] + * + * @return revertPolicy + */ + @javax.annotation.Nullable + public RevertPolicyEnum getRevertPolicy() { + return revertPolicy; + } + + public void setRevertPolicy(@javax.annotation.Nullable RevertPolicyEnum revertPolicy) { + this.revertPolicy = revertPolicy; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key name of the property + * @param value value of the property + * @return the RevertCommitRequest instance itself + */ + public RevertCommitRequest putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return a map of objects + */ + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key name of the property + * @return an object + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + RevertCommitRequest revertCommitRequest = (RevertCommitRequest) o; + return Objects.equals(this.metadata, revertCommitRequest.metadata) + && Objects.equals(this.branchName, revertCommitRequest.branchName) + && Objects.equals(this.revertPolicy, revertCommitRequest.revertPolicy) + && Objects.equals( + this.additionalProperties, revertCommitRequest.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(metadata, branchName, revertPolicy, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class RevertCommitRequest {\n"); + sb.append(" metadata: ").append(toIndentedString(metadata)).append("\n"); + sb.append(" branchName: ").append(toIndentedString(branchName)).append("\n"); + sb.append(" revertPolicy: ").append(toIndentedString(revertPolicy)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first + * line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("metadata"); + openapiFields.add("branch_name"); + openapiFields.add("revert_policy"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to RevertCommitRequest + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!RevertCommitRequest.openapiRequiredFields + .isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException( + String.format( + "The required field(s) %s in RevertCommitRequest is not found in" + + " the empty JSON string", + RevertCommitRequest.openapiRequiredFields.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if (jsonObj.get("metadata") != null && !jsonObj.get("metadata").isJsonNull()) { + JsonArray jsonArraymetadata = jsonObj.getAsJsonArray("metadata"); + if (jsonArraymetadata != null) { + // ensure the json data is an array + if (!jsonObj.get("metadata").isJsonArray()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `metadata` to be an array in the JSON" + + " string but got `%s`", + jsonObj.get("metadata").toString())); + } + + // validate the optional field `metadata` (array) + for (int i = 0; i < jsonArraymetadata.size(); i++) { + MetadataObject.validateJsonElement(jsonArraymetadata.get(i)); + } + ; + } + } + if ((jsonObj.get("branch_name") != null && !jsonObj.get("branch_name").isJsonNull()) + && !jsonObj.get("branch_name").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `branch_name` to be a primitive type in the JSON" + + " string but got `%s`", + jsonObj.get("branch_name").toString())); + } + if ((jsonObj.get("revert_policy") != null && !jsonObj.get("revert_policy").isJsonNull()) + && !jsonObj.get("revert_policy").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `revert_policy` to be a primitive type in the JSON" + + " string but got `%s`", + jsonObj.get("revert_policy").toString())); + } + // validate the optional field `revert_policy` + if (jsonObj.get("revert_policy") != null && !jsonObj.get("revert_policy").isJsonNull()) { + RevertPolicyEnum.validateJsonElement(jsonObj.get("revert_policy")); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!RevertCommitRequest.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'RevertCommitRequest' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter = + gson.getDelegateAdapter(this, TypeToken.get(RevertCommitRequest.class)); + + return (TypeAdapter) + new TypeAdapter() { + @Override + public void write(JsonWriter out, RevertCommitRequest value) + throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + obj.remove("additionalProperties"); + // serialize additional properties + if (value.getAdditionalProperties() != null) { + for (Map.Entry entry : + value.getAdditionalProperties().entrySet()) { + if (entry.getValue() instanceof String) + obj.addProperty(entry.getKey(), (String) entry.getValue()); + else if (entry.getValue() instanceof Number) + obj.addProperty(entry.getKey(), (Number) entry.getValue()); + else if (entry.getValue() instanceof Boolean) + obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); + else if (entry.getValue() instanceof Character) + obj.addProperty( + entry.getKey(), (Character) entry.getValue()); + else { + JsonElement jsonElement = gson.toJsonTree(entry.getValue()); + if (jsonElement.isJsonArray()) { + obj.add(entry.getKey(), jsonElement.getAsJsonArray()); + } else { + obj.add(entry.getKey(), jsonElement.getAsJsonObject()); + } + } + } + } + elementAdapter.write(out, obj); + } + + @Override + public RevertCommitRequest read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // store additional fields in the deserialized instance + RevertCommitRequest instance = thisAdapter.fromJsonTree(jsonObj); + for (Map.Entry entry : jsonObj.entrySet()) { + if (!openapiFields.contains(entry.getKey())) { + if (entry.getValue().isJsonPrimitive()) { // primitive type + if (entry.getValue().getAsJsonPrimitive().isString()) + instance.putAdditionalProperty( + entry.getKey(), entry.getValue().getAsString()); + else if (entry.getValue().getAsJsonPrimitive().isNumber()) + instance.putAdditionalProperty( + entry.getKey(), entry.getValue().getAsNumber()); + else if (entry.getValue().getAsJsonPrimitive().isBoolean()) + instance.putAdditionalProperty( + entry.getKey(), + entry.getValue().getAsBoolean()); + else + throw new IllegalArgumentException( + String.format( + "The field `%s` has unknown primitive" + + " type. Value: %s", + entry.getKey(), + entry.getValue().toString())); + } else if (entry.getValue().isJsonArray()) { + instance.putAdditionalProperty( + entry.getKey(), + gson.fromJson(entry.getValue(), List.class)); + } else { // JSON object + instance.putAdditionalProperty( + entry.getKey(), + gson.fromJson(entry.getValue(), HashMap.class)); + } + } + } + return instance; + } + }.nullSafe(); + } + } + + /** + * Create an instance of RevertCommitRequest given an JSON string + * + * @param jsonString JSON string + * @return An instance of RevertCommitRequest + * @throws IOException if the JSON string is invalid with respect to RevertCommitRequest + */ + public static RevertCommitRequest fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, RevertCommitRequest.class); + } + + /** + * Convert an instance of RevertCommitRequest to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} diff --git a/sdks/java/src/main/java/com/thoughtspot/client/model/RevertResponse.java b/sdks/java/src/main/java/com/thoughtspot/client/model/RevertResponse.java new file mode 100644 index 000000000..e82cdcb41 --- /dev/null +++ b/sdks/java/src/main/java/com/thoughtspot/client/model/RevertResponse.java @@ -0,0 +1,606 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client.model; + +import com.google.gson.Gson; +import com.google.gson.JsonArray; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.TypeAdapter; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.annotations.SerializedName; +import com.google.gson.reflect.TypeToken; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import com.thoughtspot.client.JSON; +import java.io.IOException; +import java.io.Serializable; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Objects; +import org.openapitools.jackson.nullable.JsonNullable; + +/** RevertResponse */ +@javax.annotation.Generated( + value = "org.openapitools.codegen.languages.JavaClientCodegen", + comments = "Generator version: 7.12.0") +public class RevertResponse implements Serializable { + private static final long serialVersionUID = 1L; + + public static final String SERIALIZED_NAME_COMMITTER = "committer"; + + @SerializedName(SERIALIZED_NAME_COMMITTER) + @javax.annotation.Nullable + private CommiterType committer; + + public static final String SERIALIZED_NAME_AUTHOR = "author"; + + @SerializedName(SERIALIZED_NAME_AUTHOR) + @javax.annotation.Nullable + private AuthorType author; + + public static final String SERIALIZED_NAME_COMMENT = "comment"; + + @SerializedName(SERIALIZED_NAME_COMMENT) + @javax.annotation.Nullable + private String comment; + + public static final String SERIALIZED_NAME_COMMIT_TIME = "commit_time"; + + @SerializedName(SERIALIZED_NAME_COMMIT_TIME) + @javax.annotation.Nullable + private String commitTime; + + public static final String SERIALIZED_NAME_COMMIT_ID = "commit_id"; + + @SerializedName(SERIALIZED_NAME_COMMIT_ID) + @javax.annotation.Nullable + private String commitId; + + public static final String SERIALIZED_NAME_BRANCH = "branch"; + + @SerializedName(SERIALIZED_NAME_BRANCH) + @javax.annotation.Nullable + private String branch; + + public static final String SERIALIZED_NAME_COMMITTED_FILES = "committed_files"; + + @SerializedName(SERIALIZED_NAME_COMMITTED_FILES) + @javax.annotation.Nullable + private List committedFiles; + + public static final String SERIALIZED_NAME_REVERTED_METADATA = "reverted_metadata"; + + @SerializedName(SERIALIZED_NAME_REVERTED_METADATA) + @javax.annotation.Nullable + private List revertedMetadata; + + public RevertResponse() {} + + public RevertResponse committer(@javax.annotation.Nullable CommiterType committer) { + this.committer = committer; + return this; + } + + /** + * Get committer + * + * @return committer + */ + @javax.annotation.Nullable + public CommiterType getCommitter() { + return committer; + } + + public void setCommitter(@javax.annotation.Nullable CommiterType committer) { + this.committer = committer; + } + + public RevertResponse author(@javax.annotation.Nullable AuthorType author) { + this.author = author; + return this; + } + + /** + * Get author + * + * @return author + */ + @javax.annotation.Nullable + public AuthorType getAuthor() { + return author; + } + + public void setAuthor(@javax.annotation.Nullable AuthorType author) { + this.author = author; + } + + public RevertResponse comment(@javax.annotation.Nullable String comment) { + this.comment = comment; + return this; + } + + /** + * Comments associated with the commit + * + * @return comment + */ + @javax.annotation.Nullable + public String getComment() { + return comment; + } + + public void setComment(@javax.annotation.Nullable String comment) { + this.comment = comment; + } + + public RevertResponse commitTime(@javax.annotation.Nullable String commitTime) { + this.commitTime = commitTime; + return this; + } + + /** + * Time at which the changes were committed. + * + * @return commitTime + */ + @javax.annotation.Nullable + public String getCommitTime() { + return commitTime; + } + + public void setCommitTime(@javax.annotation.Nullable String commitTime) { + this.commitTime = commitTime; + } + + public RevertResponse commitId(@javax.annotation.Nullable String commitId) { + this.commitId = commitId; + return this; + } + + /** + * SHA id associated with the commit + * + * @return commitId + */ + @javax.annotation.Nullable + public String getCommitId() { + return commitId; + } + + public void setCommitId(@javax.annotation.Nullable String commitId) { + this.commitId = commitId; + } + + public RevertResponse branch(@javax.annotation.Nullable String branch) { + this.branch = branch; + return this; + } + + /** + * Branch where changes were committed + * + * @return branch + */ + @javax.annotation.Nullable + public String getBranch() { + return branch; + } + + public void setBranch(@javax.annotation.Nullable String branch) { + this.branch = branch; + } + + public RevertResponse committedFiles( + @javax.annotation.Nullable List committedFiles) { + this.committedFiles = committedFiles; + return this; + } + + public RevertResponse addCommittedFilesItem(CommitFileType committedFilesItem) { + if (this.committedFiles == null) { + this.committedFiles = new ArrayList<>(); + } + this.committedFiles.add(committedFilesItem); + return this; + } + + /** + * Files that were pushed as part of this commit + * + * @return committedFiles + */ + @javax.annotation.Nullable + public List getCommittedFiles() { + return committedFiles; + } + + public void setCommittedFiles(@javax.annotation.Nullable List committedFiles) { + this.committedFiles = committedFiles; + } + + public RevertResponse revertedMetadata( + @javax.annotation.Nullable List revertedMetadata) { + this.revertedMetadata = revertedMetadata; + return this; + } + + public RevertResponse addRevertedMetadataItem(RevertedMetadata revertedMetadataItem) { + if (this.revertedMetadata == null) { + this.revertedMetadata = new ArrayList<>(); + } + this.revertedMetadata.add(revertedMetadataItem); + return this; + } + + /** + * Metadata of reverted file of this commit + * + * @return revertedMetadata + */ + @javax.annotation.Nullable + public List getRevertedMetadata() { + return revertedMetadata; + } + + public void setRevertedMetadata( + @javax.annotation.Nullable List revertedMetadata) { + this.revertedMetadata = revertedMetadata; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key name of the property + * @param value value of the property + * @return the RevertResponse instance itself + */ + public RevertResponse putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return a map of objects + */ + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key name of the property + * @return an object + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + RevertResponse revertResponse = (RevertResponse) o; + return Objects.equals(this.committer, revertResponse.committer) + && Objects.equals(this.author, revertResponse.author) + && Objects.equals(this.comment, revertResponse.comment) + && Objects.equals(this.commitTime, revertResponse.commitTime) + && Objects.equals(this.commitId, revertResponse.commitId) + && Objects.equals(this.branch, revertResponse.branch) + && Objects.equals(this.committedFiles, revertResponse.committedFiles) + && Objects.equals(this.revertedMetadata, revertResponse.revertedMetadata) + && Objects.equals(this.additionalProperties, revertResponse.additionalProperties); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b + || (a != null + && b != null + && a.isPresent() + && b.isPresent() + && Objects.deepEquals(a.get(), b.get())); + } + + @Override + public int hashCode() { + return Objects.hash( + committer, + author, + comment, + commitTime, + commitId, + branch, + committedFiles, + revertedMetadata, + additionalProperties); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; + } + return a.isPresent() ? Arrays.deepHashCode(new Object[] {a.get()}) : 31; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class RevertResponse {\n"); + sb.append(" committer: ").append(toIndentedString(committer)).append("\n"); + sb.append(" author: ").append(toIndentedString(author)).append("\n"); + sb.append(" comment: ").append(toIndentedString(comment)).append("\n"); + sb.append(" commitTime: ").append(toIndentedString(commitTime)).append("\n"); + sb.append(" commitId: ").append(toIndentedString(commitId)).append("\n"); + sb.append(" branch: ").append(toIndentedString(branch)).append("\n"); + sb.append(" committedFiles: ").append(toIndentedString(committedFiles)).append("\n"); + sb.append(" revertedMetadata: ").append(toIndentedString(revertedMetadata)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first + * line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("committer"); + openapiFields.add("author"); + openapiFields.add("comment"); + openapiFields.add("commit_time"); + openapiFields.add("commit_id"); + openapiFields.add("branch"); + openapiFields.add("committed_files"); + openapiFields.add("reverted_metadata"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to RevertResponse + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!RevertResponse.openapiRequiredFields + .isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException( + String.format( + "The required field(s) %s in RevertResponse is not found in the" + + " empty JSON string", + RevertResponse.openapiRequiredFields.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // validate the optional field `committer` + if (jsonObj.get("committer") != null && !jsonObj.get("committer").isJsonNull()) { + CommiterType.validateJsonElement(jsonObj.get("committer")); + } + // validate the optional field `author` + if (jsonObj.get("author") != null && !jsonObj.get("author").isJsonNull()) { + AuthorType.validateJsonElement(jsonObj.get("author")); + } + if ((jsonObj.get("comment") != null && !jsonObj.get("comment").isJsonNull()) + && !jsonObj.get("comment").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `comment` to be a primitive type in the JSON" + + " string but got `%s`", + jsonObj.get("comment").toString())); + } + if ((jsonObj.get("commit_time") != null && !jsonObj.get("commit_time").isJsonNull()) + && !jsonObj.get("commit_time").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `commit_time` to be a primitive type in the JSON" + + " string but got `%s`", + jsonObj.get("commit_time").toString())); + } + if ((jsonObj.get("commit_id") != null && !jsonObj.get("commit_id").isJsonNull()) + && !jsonObj.get("commit_id").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `commit_id` to be a primitive type in the JSON" + + " string but got `%s`", + jsonObj.get("commit_id").toString())); + } + if ((jsonObj.get("branch") != null && !jsonObj.get("branch").isJsonNull()) + && !jsonObj.get("branch").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `branch` to be a primitive type in the JSON string" + + " but got `%s`", + jsonObj.get("branch").toString())); + } + if (jsonObj.get("committed_files") != null + && !jsonObj.get("committed_files").isJsonNull()) { + JsonArray jsonArraycommittedFiles = jsonObj.getAsJsonArray("committed_files"); + if (jsonArraycommittedFiles != null) { + // ensure the json data is an array + if (!jsonObj.get("committed_files").isJsonArray()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `committed_files` to be an array in the" + + " JSON string but got `%s`", + jsonObj.get("committed_files").toString())); + } + + // validate the optional field `committed_files` (array) + for (int i = 0; i < jsonArraycommittedFiles.size(); i++) { + CommitFileType.validateJsonElement(jsonArraycommittedFiles.get(i)); + } + ; + } + } + if (jsonObj.get("reverted_metadata") != null + && !jsonObj.get("reverted_metadata").isJsonNull()) { + JsonArray jsonArrayrevertedMetadata = jsonObj.getAsJsonArray("reverted_metadata"); + if (jsonArrayrevertedMetadata != null) { + // ensure the json data is an array + if (!jsonObj.get("reverted_metadata").isJsonArray()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `reverted_metadata` to be an array in the" + + " JSON string but got `%s`", + jsonObj.get("reverted_metadata").toString())); + } + + // validate the optional field `reverted_metadata` (array) + for (int i = 0; i < jsonArrayrevertedMetadata.size(); i++) { + RevertedMetadata.validateJsonElement(jsonArrayrevertedMetadata.get(i)); + } + ; + } + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!RevertResponse.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'RevertResponse' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter = + gson.getDelegateAdapter(this, TypeToken.get(RevertResponse.class)); + + return (TypeAdapter) + new TypeAdapter() { + @Override + public void write(JsonWriter out, RevertResponse value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + obj.remove("additionalProperties"); + // serialize additional properties + if (value.getAdditionalProperties() != null) { + for (Map.Entry entry : + value.getAdditionalProperties().entrySet()) { + if (entry.getValue() instanceof String) + obj.addProperty(entry.getKey(), (String) entry.getValue()); + else if (entry.getValue() instanceof Number) + obj.addProperty(entry.getKey(), (Number) entry.getValue()); + else if (entry.getValue() instanceof Boolean) + obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); + else if (entry.getValue() instanceof Character) + obj.addProperty( + entry.getKey(), (Character) entry.getValue()); + else { + JsonElement jsonElement = gson.toJsonTree(entry.getValue()); + if (jsonElement.isJsonArray()) { + obj.add(entry.getKey(), jsonElement.getAsJsonArray()); + } else { + obj.add(entry.getKey(), jsonElement.getAsJsonObject()); + } + } + } + } + elementAdapter.write(out, obj); + } + + @Override + public RevertResponse read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // store additional fields in the deserialized instance + RevertResponse instance = thisAdapter.fromJsonTree(jsonObj); + for (Map.Entry entry : jsonObj.entrySet()) { + if (!openapiFields.contains(entry.getKey())) { + if (entry.getValue().isJsonPrimitive()) { // primitive type + if (entry.getValue().getAsJsonPrimitive().isString()) + instance.putAdditionalProperty( + entry.getKey(), entry.getValue().getAsString()); + else if (entry.getValue().getAsJsonPrimitive().isNumber()) + instance.putAdditionalProperty( + entry.getKey(), entry.getValue().getAsNumber()); + else if (entry.getValue().getAsJsonPrimitive().isBoolean()) + instance.putAdditionalProperty( + entry.getKey(), + entry.getValue().getAsBoolean()); + else + throw new IllegalArgumentException( + String.format( + "The field `%s` has unknown primitive" + + " type. Value: %s", + entry.getKey(), + entry.getValue().toString())); + } else if (entry.getValue().isJsonArray()) { + instance.putAdditionalProperty( + entry.getKey(), + gson.fromJson(entry.getValue(), List.class)); + } else { // JSON object + instance.putAdditionalProperty( + entry.getKey(), + gson.fromJson(entry.getValue(), HashMap.class)); + } + } + } + return instance; + } + }.nullSafe(); + } + } + + /** + * Create an instance of RevertResponse given an JSON string + * + * @param jsonString JSON string + * @return An instance of RevertResponse + * @throws IOException if the JSON string is invalid with respect to RevertResponse + */ + public static RevertResponse fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, RevertResponse.class); + } + + /** + * Convert an instance of RevertResponse to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} diff --git a/sdks/java/src/main/java/com/thoughtspot/client/model/RevertedMetadata.java b/sdks/java/src/main/java/com/thoughtspot/client/model/RevertedMetadata.java new file mode 100644 index 000000000..be9a73a47 --- /dev/null +++ b/sdks/java/src/main/java/com/thoughtspot/client/model/RevertedMetadata.java @@ -0,0 +1,451 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client.model; + +import com.google.gson.Gson; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.TypeAdapter; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.annotations.SerializedName; +import com.google.gson.reflect.TypeToken; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import com.thoughtspot.client.JSON; +import java.io.IOException; +import java.io.Serializable; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Objects; + +/** RevertedMetadata */ +@javax.annotation.Generated( + value = "org.openapitools.codegen.languages.JavaClientCodegen", + comments = "Generator version: 7.12.0") +public class RevertedMetadata implements Serializable { + private static final long serialVersionUID = 1L; + + public static final String SERIALIZED_NAME_FILE_NAME = "file_name"; + + @SerializedName(SERIALIZED_NAME_FILE_NAME) + @javax.annotation.Nonnull + private String fileName; + + public static final String SERIALIZED_NAME_METADATA_NAME = "metadata_name"; + + @SerializedName(SERIALIZED_NAME_METADATA_NAME) + @javax.annotation.Nonnull + private String metadataName; + + public static final String SERIALIZED_NAME_METADATA_TYPE = "metadata_type"; + + @SerializedName(SERIALIZED_NAME_METADATA_TYPE) + @javax.annotation.Nonnull + private String metadataType; + + public static final String SERIALIZED_NAME_STATUS_CODE = "status_code"; + + @SerializedName(SERIALIZED_NAME_STATUS_CODE) + @javax.annotation.Nonnull + private String statusCode; + + public static final String SERIALIZED_NAME_STATUS_MESSAGE = "status_message"; + + @SerializedName(SERIALIZED_NAME_STATUS_MESSAGE) + @javax.annotation.Nonnull + private String statusMessage; + + public RevertedMetadata() {} + + public RevertedMetadata fileName(@javax.annotation.Nonnull String fileName) { + this.fileName = fileName; + return this; + } + + /** + * Name of the file deployed + * + * @return fileName + */ + @javax.annotation.Nonnull + public String getFileName() { + return fileName; + } + + public void setFileName(@javax.annotation.Nonnull String fileName) { + this.fileName = fileName; + } + + public RevertedMetadata metadataName(@javax.annotation.Nonnull String metadataName) { + this.metadataName = metadataName; + return this; + } + + /** + * Name of the metadata object + * + * @return metadataName + */ + @javax.annotation.Nonnull + public String getMetadataName() { + return metadataName; + } + + public void setMetadataName(@javax.annotation.Nonnull String metadataName) { + this.metadataName = metadataName; + } + + public RevertedMetadata metadataType(@javax.annotation.Nonnull String metadataType) { + this.metadataType = metadataType; + return this; + } + + /** + * Type of the metadata object + * + * @return metadataType + */ + @javax.annotation.Nonnull + public String getMetadataType() { + return metadataType; + } + + public void setMetadataType(@javax.annotation.Nonnull String metadataType) { + this.metadataType = metadataType; + } + + public RevertedMetadata statusCode(@javax.annotation.Nonnull String statusCode) { + this.statusCode = statusCode; + return this; + } + + /** + * Indicates the status of deployment for the file + * + * @return statusCode + */ + @javax.annotation.Nonnull + public String getStatusCode() { + return statusCode; + } + + public void setStatusCode(@javax.annotation.Nonnull String statusCode) { + this.statusCode = statusCode; + } + + public RevertedMetadata statusMessage(@javax.annotation.Nonnull String statusMessage) { + this.statusMessage = statusMessage; + return this; + } + + /** + * Any error or warning with the deployment + * + * @return statusMessage + */ + @javax.annotation.Nonnull + public String getStatusMessage() { + return statusMessage; + } + + public void setStatusMessage(@javax.annotation.Nonnull String statusMessage) { + this.statusMessage = statusMessage; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key name of the property + * @param value value of the property + * @return the RevertedMetadata instance itself + */ + public RevertedMetadata putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return a map of objects + */ + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key name of the property + * @return an object + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + RevertedMetadata revertedMetadata = (RevertedMetadata) o; + return Objects.equals(this.fileName, revertedMetadata.fileName) + && Objects.equals(this.metadataName, revertedMetadata.metadataName) + && Objects.equals(this.metadataType, revertedMetadata.metadataType) + && Objects.equals(this.statusCode, revertedMetadata.statusCode) + && Objects.equals(this.statusMessage, revertedMetadata.statusMessage) + && Objects.equals(this.additionalProperties, revertedMetadata.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash( + fileName, + metadataName, + metadataType, + statusCode, + statusMessage, + additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class RevertedMetadata {\n"); + sb.append(" fileName: ").append(toIndentedString(fileName)).append("\n"); + sb.append(" metadataName: ").append(toIndentedString(metadataName)).append("\n"); + sb.append(" metadataType: ").append(toIndentedString(metadataType)).append("\n"); + sb.append(" statusCode: ").append(toIndentedString(statusCode)).append("\n"); + sb.append(" statusMessage: ").append(toIndentedString(statusMessage)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first + * line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("file_name"); + openapiFields.add("metadata_name"); + openapiFields.add("metadata_type"); + openapiFields.add("status_code"); + openapiFields.add("status_message"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + openapiRequiredFields.add("file_name"); + openapiRequiredFields.add("metadata_name"); + openapiRequiredFields.add("metadata_type"); + openapiRequiredFields.add("status_code"); + openapiRequiredFields.add("status_message"); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to RevertedMetadata + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!RevertedMetadata.openapiRequiredFields + .isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException( + String.format( + "The required field(s) %s in RevertedMetadata is not found in the" + + " empty JSON string", + RevertedMetadata.openapiRequiredFields.toString())); + } + } + + // check to make sure all required properties/fields are present in the JSON string + for (String requiredField : RevertedMetadata.openapiRequiredFields) { + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException( + String.format( + "The required field `%s` is not found in the JSON string: %s", + requiredField, jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if (!jsonObj.get("file_name").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `file_name` to be a primitive type in the JSON" + + " string but got `%s`", + jsonObj.get("file_name").toString())); + } + if (!jsonObj.get("metadata_name").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `metadata_name` to be a primitive type in the JSON" + + " string but got `%s`", + jsonObj.get("metadata_name").toString())); + } + if (!jsonObj.get("metadata_type").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `metadata_type` to be a primitive type in the JSON" + + " string but got `%s`", + jsonObj.get("metadata_type").toString())); + } + if (!jsonObj.get("status_code").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `status_code` to be a primitive type in the JSON" + + " string but got `%s`", + jsonObj.get("status_code").toString())); + } + if (!jsonObj.get("status_message").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `status_message` to be a primitive type in the" + + " JSON string but got `%s`", + jsonObj.get("status_message").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!RevertedMetadata.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'RevertedMetadata' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter = + gson.getDelegateAdapter(this, TypeToken.get(RevertedMetadata.class)); + + return (TypeAdapter) + new TypeAdapter() { + @Override + public void write(JsonWriter out, RevertedMetadata value) + throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + obj.remove("additionalProperties"); + // serialize additional properties + if (value.getAdditionalProperties() != null) { + for (Map.Entry entry : + value.getAdditionalProperties().entrySet()) { + if (entry.getValue() instanceof String) + obj.addProperty(entry.getKey(), (String) entry.getValue()); + else if (entry.getValue() instanceof Number) + obj.addProperty(entry.getKey(), (Number) entry.getValue()); + else if (entry.getValue() instanceof Boolean) + obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); + else if (entry.getValue() instanceof Character) + obj.addProperty( + entry.getKey(), (Character) entry.getValue()); + else { + JsonElement jsonElement = gson.toJsonTree(entry.getValue()); + if (jsonElement.isJsonArray()) { + obj.add(entry.getKey(), jsonElement.getAsJsonArray()); + } else { + obj.add(entry.getKey(), jsonElement.getAsJsonObject()); + } + } + } + } + elementAdapter.write(out, obj); + } + + @Override + public RevertedMetadata read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // store additional fields in the deserialized instance + RevertedMetadata instance = thisAdapter.fromJsonTree(jsonObj); + for (Map.Entry entry : jsonObj.entrySet()) { + if (!openapiFields.contains(entry.getKey())) { + if (entry.getValue().isJsonPrimitive()) { // primitive type + if (entry.getValue().getAsJsonPrimitive().isString()) + instance.putAdditionalProperty( + entry.getKey(), entry.getValue().getAsString()); + else if (entry.getValue().getAsJsonPrimitive().isNumber()) + instance.putAdditionalProperty( + entry.getKey(), entry.getValue().getAsNumber()); + else if (entry.getValue().getAsJsonPrimitive().isBoolean()) + instance.putAdditionalProperty( + entry.getKey(), + entry.getValue().getAsBoolean()); + else + throw new IllegalArgumentException( + String.format( + "The field `%s` has unknown primitive" + + " type. Value: %s", + entry.getKey(), + entry.getValue().toString())); + } else if (entry.getValue().isJsonArray()) { + instance.putAdditionalProperty( + entry.getKey(), + gson.fromJson(entry.getValue(), List.class)); + } else { // JSON object + instance.putAdditionalProperty( + entry.getKey(), + gson.fromJson(entry.getValue(), HashMap.class)); + } + } + } + return instance; + } + }.nullSafe(); + } + } + + /** + * Create an instance of RevertedMetadata given an JSON string + * + * @param jsonString JSON string + * @return An instance of RevertedMetadata + * @throws IOException if the JSON string is invalid with respect to RevertedMetadata + */ + public static RevertedMetadata fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, RevertedMetadata.class); + } + + /** + * Convert an instance of RevertedMetadata to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} diff --git a/sdks/java/src/main/java/com/thoughtspot/client/model/RevokeRefreshTokensRequest.java b/sdks/java/src/main/java/com/thoughtspot/client/model/RevokeRefreshTokensRequest.java new file mode 100644 index 000000000..b59f64d7f --- /dev/null +++ b/sdks/java/src/main/java/com/thoughtspot/client/model/RevokeRefreshTokensRequest.java @@ -0,0 +1,412 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client.model; + +import com.google.gson.Gson; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.TypeAdapter; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.annotations.SerializedName; +import com.google.gson.reflect.TypeToken; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import com.thoughtspot.client.JSON; +import java.io.IOException; +import java.io.Serializable; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Objects; + +/** RevokeRefreshTokensRequest */ +@javax.annotation.Generated( + value = "org.openapitools.codegen.languages.JavaClientCodegen", + comments = "Generator version: 7.12.0") +public class RevokeRefreshTokensRequest implements Serializable { + private static final long serialVersionUID = 1L; + + public static final String SERIALIZED_NAME_CONFIGURATION_IDENTIFIERS = + "configuration_identifiers"; + + @SerializedName(SERIALIZED_NAME_CONFIGURATION_IDENTIFIERS) + @javax.annotation.Nullable + private List configurationIdentifiers; + + public static final String SERIALIZED_NAME_USER_IDENTIFIERS = "user_identifiers"; + + @SerializedName(SERIALIZED_NAME_USER_IDENTIFIERS) + @javax.annotation.Nullable + private List userIdentifiers; + + public static final String SERIALIZED_NAME_ORG_IDENTIFIERS = "org_identifiers"; + + @SerializedName(SERIALIZED_NAME_ORG_IDENTIFIERS) + @javax.annotation.Nullable + private List orgIdentifiers; + + public RevokeRefreshTokensRequest() {} + + public RevokeRefreshTokensRequest configurationIdentifiers( + @javax.annotation.Nullable List configurationIdentifiers) { + this.configurationIdentifiers = configurationIdentifiers; + return this; + } + + public RevokeRefreshTokensRequest addConfigurationIdentifiersItem( + String configurationIdentifiersItem) { + if (this.configurationIdentifiers == null) { + this.configurationIdentifiers = new ArrayList<>(); + } + this.configurationIdentifiers.add(configurationIdentifiersItem); + return this; + } + + /** + * Unique ID or name of the configuration. When provided, the refresh tokens of the users + * associated with the connection configuration will be revoked. + * + * @return configurationIdentifiers + */ + @javax.annotation.Nullable + public List getConfigurationIdentifiers() { + return configurationIdentifiers; + } + + public void setConfigurationIdentifiers( + @javax.annotation.Nullable List configurationIdentifiers) { + this.configurationIdentifiers = configurationIdentifiers; + } + + public RevokeRefreshTokensRequest userIdentifiers( + @javax.annotation.Nullable List userIdentifiers) { + this.userIdentifiers = userIdentifiers; + return this; + } + + public RevokeRefreshTokensRequest addUserIdentifiersItem(String userIdentifiersItem) { + if (this.userIdentifiers == null) { + this.userIdentifiers = new ArrayList<>(); + } + this.userIdentifiers.add(userIdentifiersItem); + return this; + } + + /** + * Unique ID or name of the users. When provided, the refresh tokens of the specified users will + * be revoked. If the request includes the user ID or name of the connection author, their token + * will also be revoked. + * + * @return userIdentifiers + */ + @javax.annotation.Nullable + public List getUserIdentifiers() { + return userIdentifiers; + } + + public void setUserIdentifiers(@javax.annotation.Nullable List userIdentifiers) { + this.userIdentifiers = userIdentifiers; + } + + public RevokeRefreshTokensRequest orgIdentifiers( + @javax.annotation.Nullable List orgIdentifiers) { + this.orgIdentifiers = orgIdentifiers; + return this; + } + + public RevokeRefreshTokensRequest addOrgIdentifiersItem(String orgIdentifiersItem) { + if (this.orgIdentifiers == null) { + this.orgIdentifiers = new ArrayList<>(); + } + this.orgIdentifiers.add(orgIdentifiersItem); + return this; + } + + /** + * Unique ID or name of the Org. When provided, the refresh tokens of all users associated with + * the published connection in the Org will be revoked. This parameter is valid only for + * published connections. Using it with unpublished connections will result in an error. + * + * @return orgIdentifiers + */ + @javax.annotation.Nullable + public List getOrgIdentifiers() { + return orgIdentifiers; + } + + public void setOrgIdentifiers(@javax.annotation.Nullable List orgIdentifiers) { + this.orgIdentifiers = orgIdentifiers; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key name of the property + * @param value value of the property + * @return the RevokeRefreshTokensRequest instance itself + */ + public RevokeRefreshTokensRequest putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return a map of objects + */ + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key name of the property + * @return an object + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + RevokeRefreshTokensRequest revokeRefreshTokensRequest = (RevokeRefreshTokensRequest) o; + return Objects.equals( + this.configurationIdentifiers, + revokeRefreshTokensRequest.configurationIdentifiers) + && Objects.equals(this.userIdentifiers, revokeRefreshTokensRequest.userIdentifiers) + && Objects.equals(this.orgIdentifiers, revokeRefreshTokensRequest.orgIdentifiers) + && Objects.equals( + this.additionalProperties, revokeRefreshTokensRequest.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash( + configurationIdentifiers, userIdentifiers, orgIdentifiers, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class RevokeRefreshTokensRequest {\n"); + sb.append(" configurationIdentifiers: ") + .append(toIndentedString(configurationIdentifiers)) + .append("\n"); + sb.append(" userIdentifiers: ").append(toIndentedString(userIdentifiers)).append("\n"); + sb.append(" orgIdentifiers: ").append(toIndentedString(orgIdentifiers)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first + * line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("configuration_identifiers"); + openapiFields.add("user_identifiers"); + openapiFields.add("org_identifiers"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to RevokeRefreshTokensRequest + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!RevokeRefreshTokensRequest.openapiRequiredFields + .isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException( + String.format( + "The required field(s) %s in RevokeRefreshTokensRequest is not" + + " found in the empty JSON string", + RevokeRefreshTokensRequest.openapiRequiredFields.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // ensure the optional json data is an array if present + if (jsonObj.get("configuration_identifiers") != null + && !jsonObj.get("configuration_identifiers").isJsonNull() + && !jsonObj.get("configuration_identifiers").isJsonArray()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `configuration_identifiers` to be an array in the" + + " JSON string but got `%s`", + jsonObj.get("configuration_identifiers").toString())); + } + // ensure the optional json data is an array if present + if (jsonObj.get("user_identifiers") != null + && !jsonObj.get("user_identifiers").isJsonNull() + && !jsonObj.get("user_identifiers").isJsonArray()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `user_identifiers` to be an array in the JSON" + + " string but got `%s`", + jsonObj.get("user_identifiers").toString())); + } + // ensure the optional json data is an array if present + if (jsonObj.get("org_identifiers") != null + && !jsonObj.get("org_identifiers").isJsonNull() + && !jsonObj.get("org_identifiers").isJsonArray()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `org_identifiers` to be an array in the JSON" + + " string but got `%s`", + jsonObj.get("org_identifiers").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!RevokeRefreshTokensRequest.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'RevokeRefreshTokensRequest' and its + // subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter = + gson.getDelegateAdapter(this, TypeToken.get(RevokeRefreshTokensRequest.class)); + + return (TypeAdapter) + new TypeAdapter() { + @Override + public void write(JsonWriter out, RevokeRefreshTokensRequest value) + throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + obj.remove("additionalProperties"); + // serialize additional properties + if (value.getAdditionalProperties() != null) { + for (Map.Entry entry : + value.getAdditionalProperties().entrySet()) { + if (entry.getValue() instanceof String) + obj.addProperty(entry.getKey(), (String) entry.getValue()); + else if (entry.getValue() instanceof Number) + obj.addProperty(entry.getKey(), (Number) entry.getValue()); + else if (entry.getValue() instanceof Boolean) + obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); + else if (entry.getValue() instanceof Character) + obj.addProperty( + entry.getKey(), (Character) entry.getValue()); + else { + JsonElement jsonElement = gson.toJsonTree(entry.getValue()); + if (jsonElement.isJsonArray()) { + obj.add(entry.getKey(), jsonElement.getAsJsonArray()); + } else { + obj.add(entry.getKey(), jsonElement.getAsJsonObject()); + } + } + } + } + elementAdapter.write(out, obj); + } + + @Override + public RevokeRefreshTokensRequest read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // store additional fields in the deserialized instance + RevokeRefreshTokensRequest instance = thisAdapter.fromJsonTree(jsonObj); + for (Map.Entry entry : jsonObj.entrySet()) { + if (!openapiFields.contains(entry.getKey())) { + if (entry.getValue().isJsonPrimitive()) { // primitive type + if (entry.getValue().getAsJsonPrimitive().isString()) + instance.putAdditionalProperty( + entry.getKey(), entry.getValue().getAsString()); + else if (entry.getValue().getAsJsonPrimitive().isNumber()) + instance.putAdditionalProperty( + entry.getKey(), entry.getValue().getAsNumber()); + else if (entry.getValue().getAsJsonPrimitive().isBoolean()) + instance.putAdditionalProperty( + entry.getKey(), + entry.getValue().getAsBoolean()); + else + throw new IllegalArgumentException( + String.format( + "The field `%s` has unknown primitive" + + " type. Value: %s", + entry.getKey(), + entry.getValue().toString())); + } else if (entry.getValue().isJsonArray()) { + instance.putAdditionalProperty( + entry.getKey(), + gson.fromJson(entry.getValue(), List.class)); + } else { // JSON object + instance.putAdditionalProperty( + entry.getKey(), + gson.fromJson(entry.getValue(), HashMap.class)); + } + } + } + return instance; + } + }.nullSafe(); + } + } + + /** + * Create an instance of RevokeRefreshTokensRequest given an JSON string + * + * @param jsonString JSON string + * @return An instance of RevokeRefreshTokensRequest + * @throws IOException if the JSON string is invalid with respect to RevokeRefreshTokensRequest + */ + public static RevokeRefreshTokensRequest fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, RevokeRefreshTokensRequest.class); + } + + /** + * Convert an instance of RevokeRefreshTokensRequest to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} diff --git a/sdks/java/src/main/java/com/thoughtspot/client/model/RevokeRefreshTokensResponse.java b/sdks/java/src/main/java/com/thoughtspot/client/model/RevokeRefreshTokensResponse.java new file mode 100644 index 000000000..6519c5e51 --- /dev/null +++ b/sdks/java/src/main/java/com/thoughtspot/client/model/RevokeRefreshTokensResponse.java @@ -0,0 +1,306 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client.model; + +import com.google.gson.Gson; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.TypeAdapter; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.annotations.SerializedName; +import com.google.gson.reflect.TypeToken; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import com.thoughtspot.client.JSON; +import java.io.IOException; +import java.io.Serializable; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Objects; + +/** RevokeRefreshTokensResponse */ +@javax.annotation.Generated( + value = "org.openapitools.codegen.languages.JavaClientCodegen", + comments = "Generator version: 7.12.0") +public class RevokeRefreshTokensResponse implements Serializable { + private static final long serialVersionUID = 1L; + + public static final String SERIALIZED_NAME_DATA = "data"; + + @SerializedName(SERIALIZED_NAME_DATA) + @javax.annotation.Nonnull + private String data; + + public RevokeRefreshTokensResponse() {} + + public RevokeRefreshTokensResponse data(@javax.annotation.Nonnull String data) { + this.data = data; + return this; + } + + /** + * Result message describing the outcome of the refresh token revocation operation. + * + * @return data + */ + @javax.annotation.Nonnull + public String getData() { + return data; + } + + public void setData(@javax.annotation.Nonnull String data) { + this.data = data; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key name of the property + * @param value value of the property + * @return the RevokeRefreshTokensResponse instance itself + */ + public RevokeRefreshTokensResponse putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return a map of objects + */ + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key name of the property + * @return an object + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + RevokeRefreshTokensResponse revokeRefreshTokensResponse = (RevokeRefreshTokensResponse) o; + return Objects.equals(this.data, revokeRefreshTokensResponse.data) + && Objects.equals( + this.additionalProperties, + revokeRefreshTokensResponse.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(data, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class RevokeRefreshTokensResponse {\n"); + sb.append(" data: ").append(toIndentedString(data)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first + * line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("data"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + openapiRequiredFields.add("data"); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to + * RevokeRefreshTokensResponse + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!RevokeRefreshTokensResponse.openapiRequiredFields + .isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException( + String.format( + "The required field(s) %s in RevokeRefreshTokensResponse is not" + + " found in the empty JSON string", + RevokeRefreshTokensResponse.openapiRequiredFields.toString())); + } + } + + // check to make sure all required properties/fields are present in the JSON string + for (String requiredField : RevokeRefreshTokensResponse.openapiRequiredFields) { + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException( + String.format( + "The required field `%s` is not found in the JSON string: %s", + requiredField, jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if (!jsonObj.get("data").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `data` to be a primitive type in the JSON string" + + " but got `%s`", + jsonObj.get("data").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!RevokeRefreshTokensResponse.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'RevokeRefreshTokensResponse' and its + // subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter = + gson.getDelegateAdapter(this, TypeToken.get(RevokeRefreshTokensResponse.class)); + + return (TypeAdapter) + new TypeAdapter() { + @Override + public void write(JsonWriter out, RevokeRefreshTokensResponse value) + throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + obj.remove("additionalProperties"); + // serialize additional properties + if (value.getAdditionalProperties() != null) { + for (Map.Entry entry : + value.getAdditionalProperties().entrySet()) { + if (entry.getValue() instanceof String) + obj.addProperty(entry.getKey(), (String) entry.getValue()); + else if (entry.getValue() instanceof Number) + obj.addProperty(entry.getKey(), (Number) entry.getValue()); + else if (entry.getValue() instanceof Boolean) + obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); + else if (entry.getValue() instanceof Character) + obj.addProperty( + entry.getKey(), (Character) entry.getValue()); + else { + JsonElement jsonElement = gson.toJsonTree(entry.getValue()); + if (jsonElement.isJsonArray()) { + obj.add(entry.getKey(), jsonElement.getAsJsonArray()); + } else { + obj.add(entry.getKey(), jsonElement.getAsJsonObject()); + } + } + } + } + elementAdapter.write(out, obj); + } + + @Override + public RevokeRefreshTokensResponse read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // store additional fields in the deserialized instance + RevokeRefreshTokensResponse instance = + thisAdapter.fromJsonTree(jsonObj); + for (Map.Entry entry : jsonObj.entrySet()) { + if (!openapiFields.contains(entry.getKey())) { + if (entry.getValue().isJsonPrimitive()) { // primitive type + if (entry.getValue().getAsJsonPrimitive().isString()) + instance.putAdditionalProperty( + entry.getKey(), entry.getValue().getAsString()); + else if (entry.getValue().getAsJsonPrimitive().isNumber()) + instance.putAdditionalProperty( + entry.getKey(), entry.getValue().getAsNumber()); + else if (entry.getValue().getAsJsonPrimitive().isBoolean()) + instance.putAdditionalProperty( + entry.getKey(), + entry.getValue().getAsBoolean()); + else + throw new IllegalArgumentException( + String.format( + "The field `%s` has unknown primitive" + + " type. Value: %s", + entry.getKey(), + entry.getValue().toString())); + } else if (entry.getValue().isJsonArray()) { + instance.putAdditionalProperty( + entry.getKey(), + gson.fromJson(entry.getValue(), List.class)); + } else { // JSON object + instance.putAdditionalProperty( + entry.getKey(), + gson.fromJson(entry.getValue(), HashMap.class)); + } + } + } + return instance; + } + }.nullSafe(); + } + } + + /** + * Create an instance of RevokeRefreshTokensResponse given an JSON string + * + * @param jsonString JSON string + * @return An instance of RevokeRefreshTokensResponse + * @throws IOException if the JSON string is invalid with respect to RevokeRefreshTokensResponse + */ + public static RevokeRefreshTokensResponse fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, RevokeRefreshTokensResponse.class); + } + + /** + * Convert an instance of RevokeRefreshTokensResponse to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} diff --git a/sdks/java/src/main/java/com/thoughtspot/client/model/RevokeTokenRequest.java b/sdks/java/src/main/java/com/thoughtspot/client/model/RevokeTokenRequest.java new file mode 100644 index 000000000..c3125a8b3 --- /dev/null +++ b/sdks/java/src/main/java/com/thoughtspot/client/model/RevokeTokenRequest.java @@ -0,0 +1,328 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client.model; + +import com.google.gson.Gson; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.TypeAdapter; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.annotations.SerializedName; +import com.google.gson.reflect.TypeToken; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import com.thoughtspot.client.JSON; +import java.io.IOException; +import java.io.Serializable; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Objects; + +/** RevokeTokenRequest */ +@javax.annotation.Generated( + value = "org.openapitools.codegen.languages.JavaClientCodegen", + comments = "Generator version: 7.12.0") +public class RevokeTokenRequest implements Serializable { + private static final long serialVersionUID = 1L; + + public static final String SERIALIZED_NAME_USER_IDENTIFIER = "user_identifier"; + + @SerializedName(SERIALIZED_NAME_USER_IDENTIFIER) + @javax.annotation.Nullable + private String userIdentifier; + + public static final String SERIALIZED_NAME_TOKEN = "token"; + + @SerializedName(SERIALIZED_NAME_TOKEN) + @javax.annotation.Nullable + private String token; + + public RevokeTokenRequest() {} + + public RevokeTokenRequest userIdentifier(@javax.annotation.Nullable String userIdentifier) { + this.userIdentifier = userIdentifier; + return this; + } + + /** + * Get userIdentifier + * + * @return userIdentifier + */ + @javax.annotation.Nullable + public String getUserIdentifier() { + return userIdentifier; + } + + public void setUserIdentifier(@javax.annotation.Nullable String userIdentifier) { + this.userIdentifier = userIdentifier; + } + + public RevokeTokenRequest token(@javax.annotation.Nullable String token) { + this.token = token; + return this; + } + + /** + * Get token + * + * @return token + */ + @javax.annotation.Nullable + public String getToken() { + return token; + } + + public void setToken(@javax.annotation.Nullable String token) { + this.token = token; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key name of the property + * @param value value of the property + * @return the RevokeTokenRequest instance itself + */ + public RevokeTokenRequest putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return a map of objects + */ + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key name of the property + * @return an object + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + RevokeTokenRequest revokeTokenRequest = (RevokeTokenRequest) o; + return Objects.equals(this.userIdentifier, revokeTokenRequest.userIdentifier) + && Objects.equals(this.token, revokeTokenRequest.token) + && Objects.equals( + this.additionalProperties, revokeTokenRequest.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(userIdentifier, token, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class RevokeTokenRequest {\n"); + sb.append(" userIdentifier: ").append(toIndentedString(userIdentifier)).append("\n"); + sb.append(" token: ").append(toIndentedString(token)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first + * line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("user_identifier"); + openapiFields.add("token"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to RevokeTokenRequest + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!RevokeTokenRequest.openapiRequiredFields + .isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException( + String.format( + "The required field(s) %s in RevokeTokenRequest is not found in" + + " the empty JSON string", + RevokeTokenRequest.openapiRequiredFields.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if ((jsonObj.get("user_identifier") != null && !jsonObj.get("user_identifier").isJsonNull()) + && !jsonObj.get("user_identifier").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `user_identifier` to be a primitive type in the" + + " JSON string but got `%s`", + jsonObj.get("user_identifier").toString())); + } + if ((jsonObj.get("token") != null && !jsonObj.get("token").isJsonNull()) + && !jsonObj.get("token").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `token` to be a primitive type in the JSON string" + + " but got `%s`", + jsonObj.get("token").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!RevokeTokenRequest.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'RevokeTokenRequest' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter = + gson.getDelegateAdapter(this, TypeToken.get(RevokeTokenRequest.class)); + + return (TypeAdapter) + new TypeAdapter() { + @Override + public void write(JsonWriter out, RevokeTokenRequest value) + throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + obj.remove("additionalProperties"); + // serialize additional properties + if (value.getAdditionalProperties() != null) { + for (Map.Entry entry : + value.getAdditionalProperties().entrySet()) { + if (entry.getValue() instanceof String) + obj.addProperty(entry.getKey(), (String) entry.getValue()); + else if (entry.getValue() instanceof Number) + obj.addProperty(entry.getKey(), (Number) entry.getValue()); + else if (entry.getValue() instanceof Boolean) + obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); + else if (entry.getValue() instanceof Character) + obj.addProperty( + entry.getKey(), (Character) entry.getValue()); + else { + JsonElement jsonElement = gson.toJsonTree(entry.getValue()); + if (jsonElement.isJsonArray()) { + obj.add(entry.getKey(), jsonElement.getAsJsonArray()); + } else { + obj.add(entry.getKey(), jsonElement.getAsJsonObject()); + } + } + } + } + elementAdapter.write(out, obj); + } + + @Override + public RevokeTokenRequest read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // store additional fields in the deserialized instance + RevokeTokenRequest instance = thisAdapter.fromJsonTree(jsonObj); + for (Map.Entry entry : jsonObj.entrySet()) { + if (!openapiFields.contains(entry.getKey())) { + if (entry.getValue().isJsonPrimitive()) { // primitive type + if (entry.getValue().getAsJsonPrimitive().isString()) + instance.putAdditionalProperty( + entry.getKey(), entry.getValue().getAsString()); + else if (entry.getValue().getAsJsonPrimitive().isNumber()) + instance.putAdditionalProperty( + entry.getKey(), entry.getValue().getAsNumber()); + else if (entry.getValue().getAsJsonPrimitive().isBoolean()) + instance.putAdditionalProperty( + entry.getKey(), + entry.getValue().getAsBoolean()); + else + throw new IllegalArgumentException( + String.format( + "The field `%s` has unknown primitive" + + " type. Value: %s", + entry.getKey(), + entry.getValue().toString())); + } else if (entry.getValue().isJsonArray()) { + instance.putAdditionalProperty( + entry.getKey(), + gson.fromJson(entry.getValue(), List.class)); + } else { // JSON object + instance.putAdditionalProperty( + entry.getKey(), + gson.fromJson(entry.getValue(), HashMap.class)); + } + } + } + return instance; + } + }.nullSafe(); + } + } + + /** + * Create an instance of RevokeTokenRequest given an JSON string + * + * @param jsonString JSON string + * @return An instance of RevokeTokenRequest + * @throws IOException if the JSON string is invalid with respect to RevokeTokenRequest + */ + public static RevokeTokenRequest fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, RevokeTokenRequest.class); + } + + /** + * Convert an instance of RevokeTokenRequest to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} diff --git a/sdks/java/src/main/java/com/thoughtspot/client/model/RiseGQLArgWrapper.java b/sdks/java/src/main/java/com/thoughtspot/client/model/RiseGQLArgWrapper.java new file mode 100644 index 000000000..8f3a3a5b7 --- /dev/null +++ b/sdks/java/src/main/java/com/thoughtspot/client/model/RiseGQLArgWrapper.java @@ -0,0 +1,338 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client.model; + +import com.google.gson.Gson; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.TypeAdapter; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.annotations.SerializedName; +import com.google.gson.reflect.TypeToken; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import com.thoughtspot.client.JSON; +import java.io.IOException; +import java.io.Serializable; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Objects; + +/** RiseGQLArgWrapper */ +@javax.annotation.Generated( + value = "org.openapitools.codegen.languages.JavaClientCodegen", + comments = "Generator version: 7.12.0") +public class RiseGQLArgWrapper implements Serializable { + private static final long serialVersionUID = 1L; + + public static final String SERIALIZED_NAME_NAME = "name"; + + @SerializedName(SERIALIZED_NAME_NAME) + @javax.annotation.Nonnull + private String name; + + public static final String SERIALIZED_NAME_TYPE = "type"; + + @SerializedName(SERIALIZED_NAME_TYPE) + @javax.annotation.Nonnull + private String type; + + public RiseGQLArgWrapper() {} + + public RiseGQLArgWrapper name(@javax.annotation.Nonnull String name) { + this.name = name; + return this; + } + + /** + * Get name + * + * @return name + */ + @javax.annotation.Nonnull + public String getName() { + return name; + } + + public void setName(@javax.annotation.Nonnull String name) { + this.name = name; + } + + public RiseGQLArgWrapper type(@javax.annotation.Nonnull String type) { + this.type = type; + return this; + } + + /** + * Get type + * + * @return type + */ + @javax.annotation.Nonnull + public String getType() { + return type; + } + + public void setType(@javax.annotation.Nonnull String type) { + this.type = type; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key name of the property + * @param value value of the property + * @return the RiseGQLArgWrapper instance itself + */ + public RiseGQLArgWrapper putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return a map of objects + */ + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key name of the property + * @return an object + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + RiseGQLArgWrapper riseGQLArgWrapper = (RiseGQLArgWrapper) o; + return Objects.equals(this.name, riseGQLArgWrapper.name) + && Objects.equals(this.type, riseGQLArgWrapper.type) + && Objects.equals( + this.additionalProperties, riseGQLArgWrapper.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(name, type, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class RiseGQLArgWrapper {\n"); + sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first + * line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("name"); + openapiFields.add("type"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + openapiRequiredFields.add("name"); + openapiRequiredFields.add("type"); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to RiseGQLArgWrapper + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!RiseGQLArgWrapper.openapiRequiredFields + .isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException( + String.format( + "The required field(s) %s in RiseGQLArgWrapper is not found in the" + + " empty JSON string", + RiseGQLArgWrapper.openapiRequiredFields.toString())); + } + } + + // check to make sure all required properties/fields are present in the JSON string + for (String requiredField : RiseGQLArgWrapper.openapiRequiredFields) { + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException( + String.format( + "The required field `%s` is not found in the JSON string: %s", + requiredField, jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if (!jsonObj.get("name").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `name` to be a primitive type in the JSON string" + + " but got `%s`", + jsonObj.get("name").toString())); + } + if (!jsonObj.get("type").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `type` to be a primitive type in the JSON string" + + " but got `%s`", + jsonObj.get("type").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!RiseGQLArgWrapper.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'RiseGQLArgWrapper' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter = + gson.getDelegateAdapter(this, TypeToken.get(RiseGQLArgWrapper.class)); + + return (TypeAdapter) + new TypeAdapter() { + @Override + public void write(JsonWriter out, RiseGQLArgWrapper value) + throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + obj.remove("additionalProperties"); + // serialize additional properties + if (value.getAdditionalProperties() != null) { + for (Map.Entry entry : + value.getAdditionalProperties().entrySet()) { + if (entry.getValue() instanceof String) + obj.addProperty(entry.getKey(), (String) entry.getValue()); + else if (entry.getValue() instanceof Number) + obj.addProperty(entry.getKey(), (Number) entry.getValue()); + else if (entry.getValue() instanceof Boolean) + obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); + else if (entry.getValue() instanceof Character) + obj.addProperty( + entry.getKey(), (Character) entry.getValue()); + else { + JsonElement jsonElement = gson.toJsonTree(entry.getValue()); + if (jsonElement.isJsonArray()) { + obj.add(entry.getKey(), jsonElement.getAsJsonArray()); + } else { + obj.add(entry.getKey(), jsonElement.getAsJsonObject()); + } + } + } + } + elementAdapter.write(out, obj); + } + + @Override + public RiseGQLArgWrapper read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // store additional fields in the deserialized instance + RiseGQLArgWrapper instance = thisAdapter.fromJsonTree(jsonObj); + for (Map.Entry entry : jsonObj.entrySet()) { + if (!openapiFields.contains(entry.getKey())) { + if (entry.getValue().isJsonPrimitive()) { // primitive type + if (entry.getValue().getAsJsonPrimitive().isString()) + instance.putAdditionalProperty( + entry.getKey(), entry.getValue().getAsString()); + else if (entry.getValue().getAsJsonPrimitive().isNumber()) + instance.putAdditionalProperty( + entry.getKey(), entry.getValue().getAsNumber()); + else if (entry.getValue().getAsJsonPrimitive().isBoolean()) + instance.putAdditionalProperty( + entry.getKey(), + entry.getValue().getAsBoolean()); + else + throw new IllegalArgumentException( + String.format( + "The field `%s` has unknown primitive" + + " type. Value: %s", + entry.getKey(), + entry.getValue().toString())); + } else if (entry.getValue().isJsonArray()) { + instance.putAdditionalProperty( + entry.getKey(), + gson.fromJson(entry.getValue(), List.class)); + } else { // JSON object + instance.putAdditionalProperty( + entry.getKey(), + gson.fromJson(entry.getValue(), HashMap.class)); + } + } + } + return instance; + } + }.nullSafe(); + } + } + + /** + * Create an instance of RiseGQLArgWrapper given an JSON string + * + * @param jsonString JSON string + * @return An instance of RiseGQLArgWrapper + * @throws IOException if the JSON string is invalid with respect to RiseGQLArgWrapper + */ + public static RiseGQLArgWrapper fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, RiseGQLArgWrapper.class); + } + + /** + * Convert an instance of RiseGQLArgWrapper to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} diff --git a/sdks/java/src/main/java/com/thoughtspot/client/model/RiseSetter.java b/sdks/java/src/main/java/com/thoughtspot/client/model/RiseSetter.java new file mode 100644 index 000000000..5683f8982 --- /dev/null +++ b/sdks/java/src/main/java/com/thoughtspot/client/model/RiseSetter.java @@ -0,0 +1,336 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client.model; + +import com.google.gson.Gson; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.TypeAdapter; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.annotations.SerializedName; +import com.google.gson.reflect.TypeToken; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import com.thoughtspot.client.JSON; +import java.io.IOException; +import java.io.Serializable; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Objects; + +/** RiseSetter */ +@javax.annotation.Generated( + value = "org.openapitools.codegen.languages.JavaClientCodegen", + comments = "Generator version: 7.12.0") +public class RiseSetter implements Serializable { + private static final long serialVersionUID = 1L; + + public static final String SERIALIZED_NAME_FIELD = "field"; + + @SerializedName(SERIALIZED_NAME_FIELD) + @javax.annotation.Nonnull + private String field; + + public static final String SERIALIZED_NAME_PATH = "path"; + + @SerializedName(SERIALIZED_NAME_PATH) + @javax.annotation.Nonnull + private String path; + + public RiseSetter() {} + + public RiseSetter field(@javax.annotation.Nonnull String field) { + this.field = field; + return this; + } + + /** + * Get field + * + * @return field + */ + @javax.annotation.Nonnull + public String getField() { + return field; + } + + public void setField(@javax.annotation.Nonnull String field) { + this.field = field; + } + + public RiseSetter path(@javax.annotation.Nonnull String path) { + this.path = path; + return this; + } + + /** + * Get path + * + * @return path + */ + @javax.annotation.Nonnull + public String getPath() { + return path; + } + + public void setPath(@javax.annotation.Nonnull String path) { + this.path = path; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key name of the property + * @param value value of the property + * @return the RiseSetter instance itself + */ + public RiseSetter putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return a map of objects + */ + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key name of the property + * @return an object + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + RiseSetter riseSetter = (RiseSetter) o; + return Objects.equals(this.field, riseSetter.field) + && Objects.equals(this.path, riseSetter.path) + && Objects.equals(this.additionalProperties, riseSetter.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(field, path, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class RiseSetter {\n"); + sb.append(" field: ").append(toIndentedString(field)).append("\n"); + sb.append(" path: ").append(toIndentedString(path)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first + * line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("field"); + openapiFields.add("path"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + openapiRequiredFields.add("field"); + openapiRequiredFields.add("path"); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to RiseSetter + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!RiseSetter.openapiRequiredFields + .isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException( + String.format( + "The required field(s) %s in RiseSetter is not found in the empty" + + " JSON string", + RiseSetter.openapiRequiredFields.toString())); + } + } + + // check to make sure all required properties/fields are present in the JSON string + for (String requiredField : RiseSetter.openapiRequiredFields) { + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException( + String.format( + "The required field `%s` is not found in the JSON string: %s", + requiredField, jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if (!jsonObj.get("field").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `field` to be a primitive type in the JSON string" + + " but got `%s`", + jsonObj.get("field").toString())); + } + if (!jsonObj.get("path").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `path` to be a primitive type in the JSON string" + + " but got `%s`", + jsonObj.get("path").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!RiseSetter.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'RiseSetter' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter = + gson.getDelegateAdapter(this, TypeToken.get(RiseSetter.class)); + + return (TypeAdapter) + new TypeAdapter() { + @Override + public void write(JsonWriter out, RiseSetter value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + obj.remove("additionalProperties"); + // serialize additional properties + if (value.getAdditionalProperties() != null) { + for (Map.Entry entry : + value.getAdditionalProperties().entrySet()) { + if (entry.getValue() instanceof String) + obj.addProperty(entry.getKey(), (String) entry.getValue()); + else if (entry.getValue() instanceof Number) + obj.addProperty(entry.getKey(), (Number) entry.getValue()); + else if (entry.getValue() instanceof Boolean) + obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); + else if (entry.getValue() instanceof Character) + obj.addProperty( + entry.getKey(), (Character) entry.getValue()); + else { + JsonElement jsonElement = gson.toJsonTree(entry.getValue()); + if (jsonElement.isJsonArray()) { + obj.add(entry.getKey(), jsonElement.getAsJsonArray()); + } else { + obj.add(entry.getKey(), jsonElement.getAsJsonObject()); + } + } + } + } + elementAdapter.write(out, obj); + } + + @Override + public RiseSetter read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // store additional fields in the deserialized instance + RiseSetter instance = thisAdapter.fromJsonTree(jsonObj); + for (Map.Entry entry : jsonObj.entrySet()) { + if (!openapiFields.contains(entry.getKey())) { + if (entry.getValue().isJsonPrimitive()) { // primitive type + if (entry.getValue().getAsJsonPrimitive().isString()) + instance.putAdditionalProperty( + entry.getKey(), entry.getValue().getAsString()); + else if (entry.getValue().getAsJsonPrimitive().isNumber()) + instance.putAdditionalProperty( + entry.getKey(), entry.getValue().getAsNumber()); + else if (entry.getValue().getAsJsonPrimitive().isBoolean()) + instance.putAdditionalProperty( + entry.getKey(), + entry.getValue().getAsBoolean()); + else + throw new IllegalArgumentException( + String.format( + "The field `%s` has unknown primitive" + + " type. Value: %s", + entry.getKey(), + entry.getValue().toString())); + } else if (entry.getValue().isJsonArray()) { + instance.putAdditionalProperty( + entry.getKey(), + gson.fromJson(entry.getValue(), List.class)); + } else { // JSON object + instance.putAdditionalProperty( + entry.getKey(), + gson.fromJson(entry.getValue(), HashMap.class)); + } + } + } + return instance; + } + }.nullSafe(); + } + } + + /** + * Create an instance of RiseSetter given an JSON string + * + * @param jsonString JSON string + * @return An instance of RiseSetter + * @throws IOException if the JSON string is invalid with respect to RiseSetter + */ + public static RiseSetter fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, RiseSetter.class); + } + + /** + * Convert an instance of RiseSetter to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} diff --git a/sdks/java/src/main/java/com/thoughtspot/client/model/Role.java b/sdks/java/src/main/java/com/thoughtspot/client/model/Role.java new file mode 100644 index 000000000..9c1d89ae5 --- /dev/null +++ b/sdks/java/src/main/java/com/thoughtspot/client/model/Role.java @@ -0,0 +1,344 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client.model; + +import com.google.gson.Gson; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.TypeAdapter; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.annotations.SerializedName; +import com.google.gson.reflect.TypeToken; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import com.thoughtspot.client.JSON; +import java.io.IOException; +import java.io.Serializable; +import java.util.Arrays; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Objects; +import org.openapitools.jackson.nullable.JsonNullable; + +/** Role */ +@javax.annotation.Generated( + value = "org.openapitools.codegen.languages.JavaClientCodegen", + comments = "Generator version: 7.12.0") +public class Role implements Serializable { + private static final long serialVersionUID = 1L; + + public static final String SERIALIZED_NAME_ID = "id"; + + @SerializedName(SERIALIZED_NAME_ID) + @javax.annotation.Nullable + private String id; + + public static final String SERIALIZED_NAME_NAME = "name"; + + @SerializedName(SERIALIZED_NAME_NAME) + @javax.annotation.Nullable + private String name; + + public Role() {} + + public Role id(@javax.annotation.Nullable String id) { + this.id = id; + return this; + } + + /** + * id of the role + * + * @return id + */ + @javax.annotation.Nullable + public String getId() { + return id; + } + + public void setId(@javax.annotation.Nullable String id) { + this.id = id; + } + + public Role name(@javax.annotation.Nullable String name) { + this.name = name; + return this; + } + + /** + * name of the role + * + * @return name + */ + @javax.annotation.Nullable + public String getName() { + return name; + } + + public void setName(@javax.annotation.Nullable String name) { + this.name = name; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key name of the property + * @param value value of the property + * @return the Role instance itself + */ + public Role putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return a map of objects + */ + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key name of the property + * @return an object + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + Role role = (Role) o; + return Objects.equals(this.id, role.id) + && Objects.equals(this.name, role.name) + && Objects.equals(this.additionalProperties, role.additionalProperties); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b + || (a != null + && b != null + && a.isPresent() + && b.isPresent() + && Objects.deepEquals(a.get(), b.get())); + } + + @Override + public int hashCode() { + return Objects.hash(id, name, additionalProperties); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; + } + return a.isPresent() ? Arrays.deepHashCode(new Object[] {a.get()}) : 31; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class Role {\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first + * line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("id"); + openapiFields.add("name"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to Role + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!Role.openapiRequiredFields + .isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException( + String.format( + "The required field(s) %s in Role is not found in the empty JSON" + + " string", + Role.openapiRequiredFields.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if ((jsonObj.get("id") != null && !jsonObj.get("id").isJsonNull()) + && !jsonObj.get("id").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `id` to be a primitive type in the JSON string but" + + " got `%s`", + jsonObj.get("id").toString())); + } + if ((jsonObj.get("name") != null && !jsonObj.get("name").isJsonNull()) + && !jsonObj.get("name").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `name` to be a primitive type in the JSON string" + + " but got `%s`", + jsonObj.get("name").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!Role.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'Role' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter = + gson.getDelegateAdapter(this, TypeToken.get(Role.class)); + + return (TypeAdapter) + new TypeAdapter() { + @Override + public void write(JsonWriter out, Role value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + obj.remove("additionalProperties"); + // serialize additional properties + if (value.getAdditionalProperties() != null) { + for (Map.Entry entry : + value.getAdditionalProperties().entrySet()) { + if (entry.getValue() instanceof String) + obj.addProperty(entry.getKey(), (String) entry.getValue()); + else if (entry.getValue() instanceof Number) + obj.addProperty(entry.getKey(), (Number) entry.getValue()); + else if (entry.getValue() instanceof Boolean) + obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); + else if (entry.getValue() instanceof Character) + obj.addProperty( + entry.getKey(), (Character) entry.getValue()); + else { + JsonElement jsonElement = gson.toJsonTree(entry.getValue()); + if (jsonElement.isJsonArray()) { + obj.add(entry.getKey(), jsonElement.getAsJsonArray()); + } else { + obj.add(entry.getKey(), jsonElement.getAsJsonObject()); + } + } + } + } + elementAdapter.write(out, obj); + } + + @Override + public Role read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // store additional fields in the deserialized instance + Role instance = thisAdapter.fromJsonTree(jsonObj); + for (Map.Entry entry : jsonObj.entrySet()) { + if (!openapiFields.contains(entry.getKey())) { + if (entry.getValue().isJsonPrimitive()) { // primitive type + if (entry.getValue().getAsJsonPrimitive().isString()) + instance.putAdditionalProperty( + entry.getKey(), entry.getValue().getAsString()); + else if (entry.getValue().getAsJsonPrimitive().isNumber()) + instance.putAdditionalProperty( + entry.getKey(), entry.getValue().getAsNumber()); + else if (entry.getValue().getAsJsonPrimitive().isBoolean()) + instance.putAdditionalProperty( + entry.getKey(), + entry.getValue().getAsBoolean()); + else + throw new IllegalArgumentException( + String.format( + "The field `%s` has unknown primitive" + + " type. Value: %s", + entry.getKey(), + entry.getValue().toString())); + } else if (entry.getValue().isJsonArray()) { + instance.putAdditionalProperty( + entry.getKey(), + gson.fromJson(entry.getValue(), List.class)); + } else { // JSON object + instance.putAdditionalProperty( + entry.getKey(), + gson.fromJson(entry.getValue(), HashMap.class)); + } + } + } + return instance; + } + }.nullSafe(); + } + } + + /** + * Create an instance of Role given an JSON string + * + * @param jsonString JSON string + * @return An instance of Role + * @throws IOException if the JSON string is invalid with respect to Role + */ + public static Role fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, Role.class); + } + + /** + * Convert an instance of Role to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} diff --git a/sdks/java/src/main/java/com/thoughtspot/client/model/RoleResponse.java b/sdks/java/src/main/java/com/thoughtspot/client/model/RoleResponse.java new file mode 100644 index 000000000..5f4027712 --- /dev/null +++ b/sdks/java/src/main/java/com/thoughtspot/client/model/RoleResponse.java @@ -0,0 +1,1105 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client.model; + +import com.google.gson.Gson; +import com.google.gson.JsonArray; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.TypeAdapter; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.reflect.TypeToken; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import com.thoughtspot.client.JSON; +import java.io.IOException; +import java.io.Serializable; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Objects; +import org.openapitools.jackson.nullable.JsonNullable; + +/** RoleResponse */ +@javax.annotation.Generated( + value = "org.openapitools.codegen.languages.JavaClientCodegen", + comments = "Generator version: 7.12.0") +public class RoleResponse implements Serializable { + private static final long serialVersionUID = 1L; + + public static final String SERIALIZED_NAME_ID = "id"; + + @SerializedName(SERIALIZED_NAME_ID) + @javax.annotation.Nonnull + private String id; + + public static final String SERIALIZED_NAME_NAME = "name"; + + @SerializedName(SERIALIZED_NAME_NAME) + @javax.annotation.Nonnull + private String name; + + public static final String SERIALIZED_NAME_DESCRIPTION = "description"; + + @SerializedName(SERIALIZED_NAME_DESCRIPTION) + @javax.annotation.Nonnull + private String description; + + public static final String SERIALIZED_NAME_GROUPS_ASSIGNED_COUNT = "groups_assigned_count"; + + @SerializedName(SERIALIZED_NAME_GROUPS_ASSIGNED_COUNT) + @javax.annotation.Nullable + private Integer groupsAssignedCount; + + public static final String SERIALIZED_NAME_ORGS = "orgs"; + + @SerializedName(SERIALIZED_NAME_ORGS) + @javax.annotation.Nullable + private List orgs; + + public static final String SERIALIZED_NAME_GROUPS = "groups"; + + @SerializedName(SERIALIZED_NAME_GROUPS) + @javax.annotation.Nullable + private List groups; + + /** Gets or Sets privileges */ + @JsonAdapter(PrivilegesEnum.Adapter.class) + public enum PrivilegesEnum { + USERDATAUPLOADING("USERDATAUPLOADING"), + + DATADOWNLOADING("DATADOWNLOADING"), + + DATAMANAGEMENT("DATAMANAGEMENT"), + + SHAREWITHALL("SHAREWITHALL"), + + JOBSCHEDULING("JOBSCHEDULING"), + + A3_ANALYSIS("A3ANALYSIS"), + + BYPASSRLS("BYPASSRLS"), + + DISABLE_PINBOARD_CREATION("DISABLE_PINBOARD_CREATION"), + + DEVELOPER("DEVELOPER"), + + APPLICATION_ADMINISTRATION("APPLICATION_ADMINISTRATION"), + + USER_ADMINISTRATION("USER_ADMINISTRATION"), + + GROUP_ADMINISTRATION("GROUP_ADMINISTRATION"), + + SYSTEM_INFO_ADMINISTRATION("SYSTEM_INFO_ADMINISTRATION"), + + SYNCMANAGEMENT("SYNCMANAGEMENT"), + + ORG_ADMINISTRATION("ORG_ADMINISTRATION"), + + ROLE_ADMINISTRATION("ROLE_ADMINISTRATION"), + + AUTHENTICATION_ADMINISTRATION("AUTHENTICATION_ADMINISTRATION"), + + BILLING_INFO_ADMINISTRATION("BILLING_INFO_ADMINISTRATION"), + + CONTROL_TRUSTED_AUTH("CONTROL_TRUSTED_AUTH"), + + TAGMANAGEMENT("TAGMANAGEMENT"), + + LIVEBOARD_VERIFIER("LIVEBOARD_VERIFIER"), + + CAN_MANAGE_CUSTOM_CALENDAR("CAN_MANAGE_CUSTOM_CALENDAR"), + + CAN_CREATE_OR_EDIT_CONNECTIONS("CAN_CREATE_OR_EDIT_CONNECTIONS"), + + CAN_MANAGE_WORKSHEET_VIEWS_TABLES("CAN_MANAGE_WORKSHEET_VIEWS_TABLES"), + + CAN_MANAGE_VERSION_CONTROL("CAN_MANAGE_VERSION_CONTROL"), + + THIRDPARTY_ANALYSIS("THIRDPARTY_ANALYSIS"), + + CAN_CREATE_CATALOG("CAN_CREATE_CATALOG"), + + ALLOW_NON_EMBED_FULL_APP_ACCESS("ALLOW_NON_EMBED_FULL_APP_ACCESS"), + + CAN_ACCESS_ANALYST_STUDIO("CAN_ACCESS_ANALYST_STUDIO"), + + CAN_MANAGE_ANALYST_STUDIO("CAN_MANAGE_ANALYST_STUDIO"), + + PREVIEW_DOCUMENT_SEARCH("PREVIEW_DOCUMENT_SEARCH"), + + CAN_MANAGE_VARIABLES("CAN_MANAGE_VARIABLES"), + + CAN_MODIFY_FOLDERS("CAN_MODIFY_FOLDERS"), + + CAN_VIEW_FOLDERS("CAN_VIEW_FOLDERS"), + + CAN_MANAGE_AGENTSPOT("CAN_MANAGE_AGENTSPOT"), + + CAN_ACCESS_AGENTSPOT("CAN_ACCESS_AGENTSPOT"), + + CAN_SETUP_VERSION_CONTROL("CAN_SETUP_VERSION_CONTROL"), + + PREVIEW_THOUGHTSPOT_SAGE("PREVIEW_THOUGHTSPOT_SAGE"), + + CAN_MANAGE_WEBHOOKS("CAN_MANAGE_WEBHOOKS"), + + CAN_DOWNLOAD_VISUALS("CAN_DOWNLOAD_VISUALS"), + + CAN_DOWNLOAD_DETAILED_DATA("CAN_DOWNLOAD_DETAILED_DATA"), + + CAN_USE_SPOTTER("CAN_USE_SPOTTER"); + + private String value; + + PrivilegesEnum(String value) { + this.value = value; + } + + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + public static PrivilegesEnum fromValue(String value) { + for (PrivilegesEnum b : PrivilegesEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + + public static class Adapter extends TypeAdapter { + @Override + public void write(final JsonWriter jsonWriter, final PrivilegesEnum enumeration) + throws IOException { + jsonWriter.value(enumeration.getValue()); + } + + @Override + public PrivilegesEnum read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + return PrivilegesEnum.fromValue(value); + } + } + + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + String value = jsonElement.getAsString(); + PrivilegesEnum.fromValue(value); + } + } + + public static final String SERIALIZED_NAME_PRIVILEGES = "privileges"; + + @SerializedName(SERIALIZED_NAME_PRIVILEGES) + @javax.annotation.Nonnull + private List privileges; + + /** Permission details of the Role */ + @JsonAdapter(PermissionEnum.Adapter.class) + public enum PermissionEnum { + READ_ONLY("READ_ONLY"), + + MODIFY("MODIFY"), + + NO_ACCESS("NO_ACCESS"); + + private String value; + + PermissionEnum(String value) { + this.value = value; + } + + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + public static PermissionEnum fromValue(String value) { + for (PermissionEnum b : PermissionEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + return null; + } + + public static class Adapter extends TypeAdapter { + @Override + public void write(final JsonWriter jsonWriter, final PermissionEnum enumeration) + throws IOException { + jsonWriter.value(enumeration.getValue()); + } + + @Override + public PermissionEnum read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + return PermissionEnum.fromValue(value); + } + } + + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + String value = jsonElement.getAsString(); + PermissionEnum.fromValue(value); + } + } + + public static final String SERIALIZED_NAME_PERMISSION = "permission"; + + @SerializedName(SERIALIZED_NAME_PERMISSION) + @javax.annotation.Nullable + private PermissionEnum permission; + + public static final String SERIALIZED_NAME_AUTHOR_ID = "author_id"; + + @SerializedName(SERIALIZED_NAME_AUTHOR_ID) + @javax.annotation.Nullable + private String authorId; + + public static final String SERIALIZED_NAME_MODIFIER_ID = "modifier_id"; + + @SerializedName(SERIALIZED_NAME_MODIFIER_ID) + @javax.annotation.Nullable + private String modifierId; + + public static final String SERIALIZED_NAME_CREATION_TIME_IN_MILLIS = "creation_time_in_millis"; + + @SerializedName(SERIALIZED_NAME_CREATION_TIME_IN_MILLIS) + @javax.annotation.Nullable + private Object creationTimeInMillis; + + public static final String SERIALIZED_NAME_MODIFICATION_TIME_IN_MILLIS = + "modification_time_in_millis"; + + @SerializedName(SERIALIZED_NAME_MODIFICATION_TIME_IN_MILLIS) + @javax.annotation.Nullable + private Object modificationTimeInMillis; + + public static final String SERIALIZED_NAME_DELETED = "deleted"; + + @SerializedName(SERIALIZED_NAME_DELETED) + @javax.annotation.Nullable + private Boolean deleted; + + public static final String SERIALIZED_NAME_DEPRECATED = "deprecated"; + + @SerializedName(SERIALIZED_NAME_DEPRECATED) + @javax.annotation.Nullable + private Boolean deprecated; + + public static final String SERIALIZED_NAME_EXTERNAL = "external"; + + @SerializedName(SERIALIZED_NAME_EXTERNAL) + @javax.annotation.Nullable + private Boolean external; + + public static final String SERIALIZED_NAME_HIDDEN = "hidden"; + + @SerializedName(SERIALIZED_NAME_HIDDEN) + @javax.annotation.Nullable + private Boolean hidden; + + public static final String SERIALIZED_NAME_SHARED_VIA_CONNECTION = "shared_via_connection"; + + @SerializedName(SERIALIZED_NAME_SHARED_VIA_CONNECTION) + @javax.annotation.Nullable + private Boolean sharedViaConnection; + + public RoleResponse() {} + + public RoleResponse id(@javax.annotation.Nonnull String id) { + this.id = id; + return this; + } + + /** + * Unique Id of the role. + * + * @return id + */ + @javax.annotation.Nonnull + public String getId() { + return id; + } + + public void setId(@javax.annotation.Nonnull String id) { + this.id = id; + } + + public RoleResponse name(@javax.annotation.Nonnull String name) { + this.name = name; + return this; + } + + /** + * Name of the role + * + * @return name + */ + @javax.annotation.Nonnull + public String getName() { + return name; + } + + public void setName(@javax.annotation.Nonnull String name) { + this.name = name; + } + + public RoleResponse description(@javax.annotation.Nonnull String description) { + this.description = description; + return this; + } + + /** + * Description of the role + * + * @return description + */ + @javax.annotation.Nonnull + public String getDescription() { + return description; + } + + public void setDescription(@javax.annotation.Nonnull String description) { + this.description = description; + } + + public RoleResponse groupsAssignedCount( + @javax.annotation.Nullable Integer groupsAssignedCount) { + this.groupsAssignedCount = groupsAssignedCount; + return this; + } + + /** + * number of groups assigned with this role + * + * @return groupsAssignedCount + */ + @javax.annotation.Nullable + public Integer getGroupsAssignedCount() { + return groupsAssignedCount; + } + + public void setGroupsAssignedCount(@javax.annotation.Nullable Integer groupsAssignedCount) { + this.groupsAssignedCount = groupsAssignedCount; + } + + public RoleResponse orgs(@javax.annotation.Nullable List orgs) { + this.orgs = orgs; + return this; + } + + public RoleResponse addOrgsItem(GenericInfo orgsItem) { + if (this.orgs == null) { + this.orgs = new ArrayList<>(); + } + this.orgs.add(orgsItem); + return this; + } + + /** + * Orgs in which role exists. + * + * @return orgs + */ + @javax.annotation.Nullable + public List getOrgs() { + return orgs; + } + + public void setOrgs(@javax.annotation.Nullable List orgs) { + this.orgs = orgs; + } + + public RoleResponse groups(@javax.annotation.Nullable List groups) { + this.groups = groups; + return this; + } + + public RoleResponse addGroupsItem(GenericInfo groupsItem) { + if (this.groups == null) { + this.groups = new ArrayList<>(); + } + this.groups.add(groupsItem); + return this; + } + + /** + * Details of groups assigned with this role + * + * @return groups + */ + @javax.annotation.Nullable + public List getGroups() { + return groups; + } + + public void setGroups(@javax.annotation.Nullable List groups) { + this.groups = groups; + } + + public RoleResponse privileges(@javax.annotation.Nonnull List privileges) { + this.privileges = privileges; + return this; + } + + public RoleResponse addPrivilegesItem(PrivilegesEnum privilegesItem) { + if (this.privileges == null) { + this.privileges = new ArrayList<>(); + } + this.privileges.add(privilegesItem); + return this; + } + + /** + * Privileges granted to the role. + * + * @return privileges + */ + @javax.annotation.Nonnull + public List getPrivileges() { + return privileges; + } + + public void setPrivileges(@javax.annotation.Nonnull List privileges) { + this.privileges = privileges; + } + + public RoleResponse permission(@javax.annotation.Nullable PermissionEnum permission) { + this.permission = permission; + return this; + } + + /** + * Permission details of the Role + * + * @return permission + */ + @javax.annotation.Nullable + public PermissionEnum getPermission() { + return permission; + } + + public void setPermission(@javax.annotation.Nullable PermissionEnum permission) { + this.permission = permission; + } + + public RoleResponse authorId(@javax.annotation.Nullable String authorId) { + this.authorId = authorId; + return this; + } + + /** + * Unique identifier of author of the role. + * + * @return authorId + */ + @javax.annotation.Nullable + public String getAuthorId() { + return authorId; + } + + public void setAuthorId(@javax.annotation.Nullable String authorId) { + this.authorId = authorId; + } + + public RoleResponse modifierId(@javax.annotation.Nullable String modifierId) { + this.modifierId = modifierId; + return this; + } + + /** + * Unique identifier of modifier of the role. + * + * @return modifierId + */ + @javax.annotation.Nullable + public String getModifierId() { + return modifierId; + } + + public void setModifierId(@javax.annotation.Nullable String modifierId) { + this.modifierId = modifierId; + } + + public RoleResponse creationTimeInMillis( + @javax.annotation.Nullable Object creationTimeInMillis) { + this.creationTimeInMillis = creationTimeInMillis; + return this; + } + + /** + * Creation time of the role in milliseconds. + * + * @return creationTimeInMillis + */ + @javax.annotation.Nullable + public Object getCreationTimeInMillis() { + return creationTimeInMillis; + } + + public void setCreationTimeInMillis(@javax.annotation.Nullable Object creationTimeInMillis) { + this.creationTimeInMillis = creationTimeInMillis; + } + + public RoleResponse modificationTimeInMillis( + @javax.annotation.Nullable Object modificationTimeInMillis) { + this.modificationTimeInMillis = modificationTimeInMillis; + return this; + } + + /** + * Last modified time of the role in milliseconds. + * + * @return modificationTimeInMillis + */ + @javax.annotation.Nullable + public Object getModificationTimeInMillis() { + return modificationTimeInMillis; + } + + public void setModificationTimeInMillis( + @javax.annotation.Nullable Object modificationTimeInMillis) { + this.modificationTimeInMillis = modificationTimeInMillis; + } + + public RoleResponse deleted(@javax.annotation.Nullable Boolean deleted) { + this.deleted = deleted; + return this; + } + + /** + * Indicates whether the role is deleted. + * + * @return deleted + */ + @javax.annotation.Nullable + public Boolean getDeleted() { + return deleted; + } + + public void setDeleted(@javax.annotation.Nullable Boolean deleted) { + this.deleted = deleted; + } + + public RoleResponse deprecated(@javax.annotation.Nullable Boolean deprecated) { + this.deprecated = deprecated; + return this; + } + + /** + * Indicates whether the role is deprecated. + * + * @return deprecated + */ + @javax.annotation.Nullable + public Boolean getDeprecated() { + return deprecated; + } + + public void setDeprecated(@javax.annotation.Nullable Boolean deprecated) { + this.deprecated = deprecated; + } + + public RoleResponse external(@javax.annotation.Nullable Boolean external) { + this.external = external; + return this; + } + + /** + * Indicates whether the role is external. + * + * @return external + */ + @javax.annotation.Nullable + public Boolean getExternal() { + return external; + } + + public void setExternal(@javax.annotation.Nullable Boolean external) { + this.external = external; + } + + public RoleResponse hidden(@javax.annotation.Nullable Boolean hidden) { + this.hidden = hidden; + return this; + } + + /** + * Indicates whether the role is hidden. + * + * @return hidden + */ + @javax.annotation.Nullable + public Boolean getHidden() { + return hidden; + } + + public void setHidden(@javax.annotation.Nullable Boolean hidden) { + this.hidden = hidden; + } + + public RoleResponse sharedViaConnection( + @javax.annotation.Nullable Boolean sharedViaConnection) { + this.sharedViaConnection = sharedViaConnection; + return this; + } + + /** + * Indicates whether the role is shared via connection + * + * @return sharedViaConnection + */ + @javax.annotation.Nullable + public Boolean getSharedViaConnection() { + return sharedViaConnection; + } + + public void setSharedViaConnection(@javax.annotation.Nullable Boolean sharedViaConnection) { + this.sharedViaConnection = sharedViaConnection; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key name of the property + * @param value value of the property + * @return the RoleResponse instance itself + */ + public RoleResponse putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return a map of objects + */ + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key name of the property + * @return an object + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + RoleResponse roleResponse = (RoleResponse) o; + return Objects.equals(this.id, roleResponse.id) + && Objects.equals(this.name, roleResponse.name) + && Objects.equals(this.description, roleResponse.description) + && Objects.equals(this.groupsAssignedCount, roleResponse.groupsAssignedCount) + && Objects.equals(this.orgs, roleResponse.orgs) + && Objects.equals(this.groups, roleResponse.groups) + && Objects.equals(this.privileges, roleResponse.privileges) + && Objects.equals(this.permission, roleResponse.permission) + && Objects.equals(this.authorId, roleResponse.authorId) + && Objects.equals(this.modifierId, roleResponse.modifierId) + && Objects.equals(this.creationTimeInMillis, roleResponse.creationTimeInMillis) + && Objects.equals( + this.modificationTimeInMillis, roleResponse.modificationTimeInMillis) + && Objects.equals(this.deleted, roleResponse.deleted) + && Objects.equals(this.deprecated, roleResponse.deprecated) + && Objects.equals(this.external, roleResponse.external) + && Objects.equals(this.hidden, roleResponse.hidden) + && Objects.equals(this.sharedViaConnection, roleResponse.sharedViaConnection) + && Objects.equals(this.additionalProperties, roleResponse.additionalProperties); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b + || (a != null + && b != null + && a.isPresent() + && b.isPresent() + && Objects.deepEquals(a.get(), b.get())); + } + + @Override + public int hashCode() { + return Objects.hash( + id, + name, + description, + groupsAssignedCount, + orgs, + groups, + privileges, + permission, + authorId, + modifierId, + creationTimeInMillis, + modificationTimeInMillis, + deleted, + deprecated, + external, + hidden, + sharedViaConnection, + additionalProperties); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; + } + return a.isPresent() ? Arrays.deepHashCode(new Object[] {a.get()}) : 31; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class RoleResponse {\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append(" description: ").append(toIndentedString(description)).append("\n"); + sb.append(" groupsAssignedCount: ") + .append(toIndentedString(groupsAssignedCount)) + .append("\n"); + sb.append(" orgs: ").append(toIndentedString(orgs)).append("\n"); + sb.append(" groups: ").append(toIndentedString(groups)).append("\n"); + sb.append(" privileges: ").append(toIndentedString(privileges)).append("\n"); + sb.append(" permission: ").append(toIndentedString(permission)).append("\n"); + sb.append(" authorId: ").append(toIndentedString(authorId)).append("\n"); + sb.append(" modifierId: ").append(toIndentedString(modifierId)).append("\n"); + sb.append(" creationTimeInMillis: ") + .append(toIndentedString(creationTimeInMillis)) + .append("\n"); + sb.append(" modificationTimeInMillis: ") + .append(toIndentedString(modificationTimeInMillis)) + .append("\n"); + sb.append(" deleted: ").append(toIndentedString(deleted)).append("\n"); + sb.append(" deprecated: ").append(toIndentedString(deprecated)).append("\n"); + sb.append(" external: ").append(toIndentedString(external)).append("\n"); + sb.append(" hidden: ").append(toIndentedString(hidden)).append("\n"); + sb.append(" sharedViaConnection: ") + .append(toIndentedString(sharedViaConnection)) + .append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first + * line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("id"); + openapiFields.add("name"); + openapiFields.add("description"); + openapiFields.add("groups_assigned_count"); + openapiFields.add("orgs"); + openapiFields.add("groups"); + openapiFields.add("privileges"); + openapiFields.add("permission"); + openapiFields.add("author_id"); + openapiFields.add("modifier_id"); + openapiFields.add("creation_time_in_millis"); + openapiFields.add("modification_time_in_millis"); + openapiFields.add("deleted"); + openapiFields.add("deprecated"); + openapiFields.add("external"); + openapiFields.add("hidden"); + openapiFields.add("shared_via_connection"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + openapiRequiredFields.add("id"); + openapiRequiredFields.add("name"); + openapiRequiredFields.add("description"); + openapiRequiredFields.add("privileges"); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to RoleResponse + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!RoleResponse.openapiRequiredFields + .isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException( + String.format( + "The required field(s) %s in RoleResponse is not found in the" + + " empty JSON string", + RoleResponse.openapiRequiredFields.toString())); + } + } + + // check to make sure all required properties/fields are present in the JSON string + for (String requiredField : RoleResponse.openapiRequiredFields) { + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException( + String.format( + "The required field `%s` is not found in the JSON string: %s", + requiredField, jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if (!jsonObj.get("id").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `id` to be a primitive type in the JSON string but" + + " got `%s`", + jsonObj.get("id").toString())); + } + if (!jsonObj.get("name").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `name` to be a primitive type in the JSON string" + + " but got `%s`", + jsonObj.get("name").toString())); + } + if (!jsonObj.get("description").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `description` to be a primitive type in the JSON" + + " string but got `%s`", + jsonObj.get("description").toString())); + } + if (jsonObj.get("orgs") != null && !jsonObj.get("orgs").isJsonNull()) { + JsonArray jsonArrayorgs = jsonObj.getAsJsonArray("orgs"); + if (jsonArrayorgs != null) { + // ensure the json data is an array + if (!jsonObj.get("orgs").isJsonArray()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `orgs` to be an array in the JSON string" + + " but got `%s`", + jsonObj.get("orgs").toString())); + } + + // validate the optional field `orgs` (array) + for (int i = 0; i < jsonArrayorgs.size(); i++) { + GenericInfo.validateJsonElement(jsonArrayorgs.get(i)); + } + ; + } + } + if (jsonObj.get("groups") != null && !jsonObj.get("groups").isJsonNull()) { + JsonArray jsonArraygroups = jsonObj.getAsJsonArray("groups"); + if (jsonArraygroups != null) { + // ensure the json data is an array + if (!jsonObj.get("groups").isJsonArray()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `groups` to be an array in the JSON string" + + " but got `%s`", + jsonObj.get("groups").toString())); + } + + // validate the optional field `groups` (array) + for (int i = 0; i < jsonArraygroups.size(); i++) { + GenericInfo.validateJsonElement(jsonArraygroups.get(i)); + } + ; + } + } + // ensure the required json array is present + if (jsonObj.get("privileges") == null) { + throw new IllegalArgumentException( + "Expected the field `linkedContent` to be an array in the JSON string but got" + + " `null`"); + } else if (!jsonObj.get("privileges").isJsonArray()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `privileges` to be an array in the JSON string but" + + " got `%s`", + jsonObj.get("privileges").toString())); + } + if ((jsonObj.get("permission") != null && !jsonObj.get("permission").isJsonNull()) + && !jsonObj.get("permission").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `permission` to be a primitive type in the JSON" + + " string but got `%s`", + jsonObj.get("permission").toString())); + } + // validate the optional field `permission` + if (jsonObj.get("permission") != null && !jsonObj.get("permission").isJsonNull()) { + PermissionEnum.validateJsonElement(jsonObj.get("permission")); + } + if ((jsonObj.get("author_id") != null && !jsonObj.get("author_id").isJsonNull()) + && !jsonObj.get("author_id").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `author_id` to be a primitive type in the JSON" + + " string but got `%s`", + jsonObj.get("author_id").toString())); + } + if ((jsonObj.get("modifier_id") != null && !jsonObj.get("modifier_id").isJsonNull()) + && !jsonObj.get("modifier_id").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `modifier_id` to be a primitive type in the JSON" + + " string but got `%s`", + jsonObj.get("modifier_id").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!RoleResponse.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'RoleResponse' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter = + gson.getDelegateAdapter(this, TypeToken.get(RoleResponse.class)); + + return (TypeAdapter) + new TypeAdapter() { + @Override + public void write(JsonWriter out, RoleResponse value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + obj.remove("additionalProperties"); + // serialize additional properties + if (value.getAdditionalProperties() != null) { + for (Map.Entry entry : + value.getAdditionalProperties().entrySet()) { + if (entry.getValue() instanceof String) + obj.addProperty(entry.getKey(), (String) entry.getValue()); + else if (entry.getValue() instanceof Number) + obj.addProperty(entry.getKey(), (Number) entry.getValue()); + else if (entry.getValue() instanceof Boolean) + obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); + else if (entry.getValue() instanceof Character) + obj.addProperty( + entry.getKey(), (Character) entry.getValue()); + else { + JsonElement jsonElement = gson.toJsonTree(entry.getValue()); + if (jsonElement.isJsonArray()) { + obj.add(entry.getKey(), jsonElement.getAsJsonArray()); + } else { + obj.add(entry.getKey(), jsonElement.getAsJsonObject()); + } + } + } + } + elementAdapter.write(out, obj); + } + + @Override + public RoleResponse read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // store additional fields in the deserialized instance + RoleResponse instance = thisAdapter.fromJsonTree(jsonObj); + for (Map.Entry entry : jsonObj.entrySet()) { + if (!openapiFields.contains(entry.getKey())) { + if (entry.getValue().isJsonPrimitive()) { // primitive type + if (entry.getValue().getAsJsonPrimitive().isString()) + instance.putAdditionalProperty( + entry.getKey(), entry.getValue().getAsString()); + else if (entry.getValue().getAsJsonPrimitive().isNumber()) + instance.putAdditionalProperty( + entry.getKey(), entry.getValue().getAsNumber()); + else if (entry.getValue().getAsJsonPrimitive().isBoolean()) + instance.putAdditionalProperty( + entry.getKey(), + entry.getValue().getAsBoolean()); + else + throw new IllegalArgumentException( + String.format( + "The field `%s` has unknown primitive" + + " type. Value: %s", + entry.getKey(), + entry.getValue().toString())); + } else if (entry.getValue().isJsonArray()) { + instance.putAdditionalProperty( + entry.getKey(), + gson.fromJson(entry.getValue(), List.class)); + } else { // JSON object + instance.putAdditionalProperty( + entry.getKey(), + gson.fromJson(entry.getValue(), HashMap.class)); + } + } + } + return instance; + } + }.nullSafe(); + } + } + + /** + * Create an instance of RoleResponse given an JSON string + * + * @param jsonString JSON string + * @return An instance of RoleResponse + * @throws IOException if the JSON string is invalid with respect to RoleResponse + */ + public static RoleResponse fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, RoleResponse.class); + } + + /** + * Convert an instance of RoleResponse to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} diff --git a/sdks/java/src/main/java/com/thoughtspot/client/model/RuntimeFilter.java b/sdks/java/src/main/java/com/thoughtspot/client/model/RuntimeFilter.java new file mode 100644 index 000000000..4b5a985a7 --- /dev/null +++ b/sdks/java/src/main/java/com/thoughtspot/client/model/RuntimeFilter.java @@ -0,0 +1,282 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client.model; + +import com.google.gson.Gson; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.TypeAdapter; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.annotations.SerializedName; +import com.google.gson.reflect.TypeToken; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import com.thoughtspot.client.JSON; +import java.io.IOException; +import java.io.Serializable; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Objects; + +/** List of runtime parameters need to set during the session. */ +@javax.annotation.Generated( + value = "org.openapitools.codegen.languages.JavaClientCodegen", + comments = "Generator version: 7.12.0") +public class RuntimeFilter implements Serializable { + private static final long serialVersionUID = 1L; + + public static final String SERIALIZED_NAME_RUNTIME_FILTER = "runtime_filter"; + + @SerializedName(SERIALIZED_NAME_RUNTIME_FILTER) + @javax.annotation.Nullable + private Object runtimeFilter; + + public RuntimeFilter() {} + + public RuntimeFilter runtimeFilter(@javax.annotation.Nullable Object runtimeFilter) { + this.runtimeFilter = runtimeFilter; + return this; + } + + /** + * Runtime filter parameter type in JWT. + * + * @return runtimeFilter + */ + @javax.annotation.Nullable + public Object getRuntimeFilter() { + return runtimeFilter; + } + + public void setRuntimeFilter(@javax.annotation.Nullable Object runtimeFilter) { + this.runtimeFilter = runtimeFilter; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key name of the property + * @param value value of the property + * @return the RuntimeFilter instance itself + */ + public RuntimeFilter putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return a map of objects + */ + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key name of the property + * @return an object + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + RuntimeFilter runtimeFilter = (RuntimeFilter) o; + return Objects.equals(this.runtimeFilter, runtimeFilter.runtimeFilter) + && Objects.equals(this.additionalProperties, runtimeFilter.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(runtimeFilter, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class RuntimeFilter {\n"); + sb.append(" runtimeFilter: ").append(toIndentedString(runtimeFilter)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first + * line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("runtime_filter"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to RuntimeFilter + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!RuntimeFilter.openapiRequiredFields + .isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException( + String.format( + "The required field(s) %s in RuntimeFilter is not found in the" + + " empty JSON string", + RuntimeFilter.openapiRequiredFields.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!RuntimeFilter.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'RuntimeFilter' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter = + gson.getDelegateAdapter(this, TypeToken.get(RuntimeFilter.class)); + + return (TypeAdapter) + new TypeAdapter() { + @Override + public void write(JsonWriter out, RuntimeFilter value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + obj.remove("additionalProperties"); + // serialize additional properties + if (value.getAdditionalProperties() != null) { + for (Map.Entry entry : + value.getAdditionalProperties().entrySet()) { + if (entry.getValue() instanceof String) + obj.addProperty(entry.getKey(), (String) entry.getValue()); + else if (entry.getValue() instanceof Number) + obj.addProperty(entry.getKey(), (Number) entry.getValue()); + else if (entry.getValue() instanceof Boolean) + obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); + else if (entry.getValue() instanceof Character) + obj.addProperty( + entry.getKey(), (Character) entry.getValue()); + else { + JsonElement jsonElement = gson.toJsonTree(entry.getValue()); + if (jsonElement.isJsonArray()) { + obj.add(entry.getKey(), jsonElement.getAsJsonArray()); + } else { + obj.add(entry.getKey(), jsonElement.getAsJsonObject()); + } + } + } + } + elementAdapter.write(out, obj); + } + + @Override + public RuntimeFilter read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // store additional fields in the deserialized instance + RuntimeFilter instance = thisAdapter.fromJsonTree(jsonObj); + for (Map.Entry entry : jsonObj.entrySet()) { + if (!openapiFields.contains(entry.getKey())) { + if (entry.getValue().isJsonPrimitive()) { // primitive type + if (entry.getValue().getAsJsonPrimitive().isString()) + instance.putAdditionalProperty( + entry.getKey(), entry.getValue().getAsString()); + else if (entry.getValue().getAsJsonPrimitive().isNumber()) + instance.putAdditionalProperty( + entry.getKey(), entry.getValue().getAsNumber()); + else if (entry.getValue().getAsJsonPrimitive().isBoolean()) + instance.putAdditionalProperty( + entry.getKey(), + entry.getValue().getAsBoolean()); + else + throw new IllegalArgumentException( + String.format( + "The field `%s` has unknown primitive" + + " type. Value: %s", + entry.getKey(), + entry.getValue().toString())); + } else if (entry.getValue().isJsonArray()) { + instance.putAdditionalProperty( + entry.getKey(), + gson.fromJson(entry.getValue(), List.class)); + } else { // JSON object + instance.putAdditionalProperty( + entry.getKey(), + gson.fromJson(entry.getValue(), HashMap.class)); + } + } + } + return instance; + } + }.nullSafe(); + } + } + + /** + * Create an instance of RuntimeFilter given an JSON string + * + * @param jsonString JSON string + * @return An instance of RuntimeFilter + * @throws IOException if the JSON string is invalid with respect to RuntimeFilter + */ + public static RuntimeFilter fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, RuntimeFilter.class); + } + + /** + * Convert an instance of RuntimeFilter to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} diff --git a/sdks/java/src/main/java/com/thoughtspot/client/model/RuntimeFilters.java b/sdks/java/src/main/java/com/thoughtspot/client/model/RuntimeFilters.java new file mode 100644 index 000000000..5a1c11c25 --- /dev/null +++ b/sdks/java/src/main/java/com/thoughtspot/client/model/RuntimeFilters.java @@ -0,0 +1,570 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client.model; + +import com.google.gson.Gson; +import com.google.gson.JsonArray; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.TypeAdapter; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.reflect.TypeToken; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import com.thoughtspot.client.JSON; +import java.io.IOException; +import java.io.Serializable; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Objects; +import org.openapitools.jackson.nullable.JsonNullable; + +/** Objects to apply the Runtime_Filters. */ +@javax.annotation.Generated( + value = "org.openapitools.codegen.languages.JavaClientCodegen", + comments = "Generator version: 7.12.0") +public class RuntimeFilters implements Serializable { + private static final long serialVersionUID = 1L; + + public static final String SERIALIZED_NAME_COLUMN_NAME = "column_name"; + + @SerializedName(SERIALIZED_NAME_COLUMN_NAME) + @javax.annotation.Nonnull + private String columnName; + + public static final String SERIALIZED_NAME_VALUES = "values"; + + @SerializedName(SERIALIZED_NAME_VALUES) + @javax.annotation.Nonnull + private List values; + + /** Operator value. Example: EQ */ + @JsonAdapter(OperatorEnum.Adapter.class) + public enum OperatorEnum { + EQ("EQ"), + + NE("NE"), + + LT("LT"), + + LE("LE"), + + GT("GT"), + + GE("GE"), + + IN("IN"), + + BW("BW"), + + CONTAINS("CONTAINS"), + + BEGINS_WITH("BEGINS_WITH"), + + ENDS_WITH("ENDS_WITH"), + + BW_INC("BW_INC"), + + BW_INC_MIN("BW_INC_MIN"), + + BW_INC_MAX("BW_INC_MAX"), + + LIKE("LIKE"), + + NOT_IN("NOT_IN"); + + private String value; + + OperatorEnum(String value) { + this.value = value; + } + + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + public static OperatorEnum fromValue(String value) { + for (OperatorEnum b : OperatorEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + + public static class Adapter extends TypeAdapter { + @Override + public void write(final JsonWriter jsonWriter, final OperatorEnum enumeration) + throws IOException { + jsonWriter.value(enumeration.getValue()); + } + + @Override + public OperatorEnum read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + return OperatorEnum.fromValue(value); + } + } + + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + String value = jsonElement.getAsString(); + OperatorEnum.fromValue(value); + } + } + + public static final String SERIALIZED_NAME_OPERATOR = "operator"; + + @SerializedName(SERIALIZED_NAME_OPERATOR) + @javax.annotation.Nonnull + private OperatorEnum operator; + + public static final String SERIALIZED_NAME_PERSIST = "persist"; + + @SerializedName(SERIALIZED_NAME_PERSIST) + @javax.annotation.Nullable + private Boolean persist = false; + + public static final String SERIALIZED_NAME_OBJECTS = "objects"; + + @SerializedName(SERIALIZED_NAME_OBJECTS) + @javax.annotation.Nullable + private List objects; + + public RuntimeFilters() {} + + public RuntimeFilters columnName(@javax.annotation.Nonnull String columnName) { + this.columnName = columnName; + return this; + } + + /** + * The column name to apply filter. + * + * @return columnName + */ + @javax.annotation.Nonnull + public String getColumnName() { + return columnName; + } + + public void setColumnName(@javax.annotation.Nonnull String columnName) { + this.columnName = columnName; + } + + public RuntimeFilters values(@javax.annotation.Nonnull List values) { + this.values = values; + return this; + } + + public RuntimeFilters addValuesItem(String valuesItem) { + if (this.values == null) { + this.values = new ArrayList<>(); + } + this.values.add(valuesItem); + return this; + } + + /** + * Value of the filters. + * + * @return values + */ + @javax.annotation.Nonnull + public List getValues() { + return values; + } + + public void setValues(@javax.annotation.Nonnull List values) { + this.values = values; + } + + public RuntimeFilters operator(@javax.annotation.Nonnull OperatorEnum operator) { + this.operator = operator; + return this; + } + + /** + * Operator value. Example: EQ + * + * @return operator + */ + @javax.annotation.Nonnull + public OperatorEnum getOperator() { + return operator; + } + + public void setOperator(@javax.annotation.Nonnull OperatorEnum operator) { + this.operator = operator; + } + + public RuntimeFilters persist(@javax.annotation.Nullable Boolean persist) { + this.persist = persist; + return this; + } + + /** + * Flag to persist the runtime filters. Version: 9.12.0.cl or later + * + * @return persist + */ + @javax.annotation.Nullable + public Boolean getPersist() { + return persist; + } + + public void setPersist(@javax.annotation.Nullable Boolean persist) { + this.persist = persist; + } + + public RuntimeFilters objects(@javax.annotation.Nullable List objects) { + this.objects = objects; + return this; + } + + public RuntimeFilters addObjectsItem(UserObject objectsItem) { + if (this.objects == null) { + this.objects = new ArrayList<>(); + } + this.objects.add(objectsItem); + return this; + } + + /** + * Object to apply the runtime filter. + * + * @return objects + */ + @javax.annotation.Nullable + public List getObjects() { + return objects; + } + + public void setObjects(@javax.annotation.Nullable List objects) { + this.objects = objects; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key name of the property + * @param value value of the property + * @return the RuntimeFilters instance itself + */ + public RuntimeFilters putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return a map of objects + */ + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key name of the property + * @return an object + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + RuntimeFilters runtimeFilters = (RuntimeFilters) o; + return Objects.equals(this.columnName, runtimeFilters.columnName) + && Objects.equals(this.values, runtimeFilters.values) + && Objects.equals(this.operator, runtimeFilters.operator) + && Objects.equals(this.persist, runtimeFilters.persist) + && Objects.equals(this.objects, runtimeFilters.objects) + && Objects.equals(this.additionalProperties, runtimeFilters.additionalProperties); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b + || (a != null + && b != null + && a.isPresent() + && b.isPresent() + && Objects.deepEquals(a.get(), b.get())); + } + + @Override + public int hashCode() { + return Objects.hash(columnName, values, operator, persist, objects, additionalProperties); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; + } + return a.isPresent() ? Arrays.deepHashCode(new Object[] {a.get()}) : 31; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class RuntimeFilters {\n"); + sb.append(" columnName: ").append(toIndentedString(columnName)).append("\n"); + sb.append(" values: ").append(toIndentedString(values)).append("\n"); + sb.append(" operator: ").append(toIndentedString(operator)).append("\n"); + sb.append(" persist: ").append(toIndentedString(persist)).append("\n"); + sb.append(" objects: ").append(toIndentedString(objects)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first + * line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("column_name"); + openapiFields.add("values"); + openapiFields.add("operator"); + openapiFields.add("persist"); + openapiFields.add("objects"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + openapiRequiredFields.add("column_name"); + openapiRequiredFields.add("values"); + openapiRequiredFields.add("operator"); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to RuntimeFilters + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!RuntimeFilters.openapiRequiredFields + .isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException( + String.format( + "The required field(s) %s in RuntimeFilters is not found in the" + + " empty JSON string", + RuntimeFilters.openapiRequiredFields.toString())); + } + } + + // check to make sure all required properties/fields are present in the JSON string + for (String requiredField : RuntimeFilters.openapiRequiredFields) { + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException( + String.format( + "The required field `%s` is not found in the JSON string: %s", + requiredField, jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if (!jsonObj.get("column_name").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `column_name` to be a primitive type in the JSON" + + " string but got `%s`", + jsonObj.get("column_name").toString())); + } + // ensure the required json array is present + if (jsonObj.get("values") == null) { + throw new IllegalArgumentException( + "Expected the field `linkedContent` to be an array in the JSON string but got" + + " `null`"); + } else if (!jsonObj.get("values").isJsonArray()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `values` to be an array in the JSON string but got" + + " `%s`", + jsonObj.get("values").toString())); + } + if (!jsonObj.get("operator").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `operator` to be a primitive type in the JSON" + + " string but got `%s`", + jsonObj.get("operator").toString())); + } + // validate the required field `operator` + OperatorEnum.validateJsonElement(jsonObj.get("operator")); + if (jsonObj.get("objects") != null && !jsonObj.get("objects").isJsonNull()) { + JsonArray jsonArrayobjects = jsonObj.getAsJsonArray("objects"); + if (jsonArrayobjects != null) { + // ensure the json data is an array + if (!jsonObj.get("objects").isJsonArray()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `objects` to be an array in the JSON" + + " string but got `%s`", + jsonObj.get("objects").toString())); + } + + // validate the optional field `objects` (array) + for (int i = 0; i < jsonArrayobjects.size(); i++) { + UserObject.validateJsonElement(jsonArrayobjects.get(i)); + } + ; + } + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!RuntimeFilters.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'RuntimeFilters' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter = + gson.getDelegateAdapter(this, TypeToken.get(RuntimeFilters.class)); + + return (TypeAdapter) + new TypeAdapter() { + @Override + public void write(JsonWriter out, RuntimeFilters value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + obj.remove("additionalProperties"); + // serialize additional properties + if (value.getAdditionalProperties() != null) { + for (Map.Entry entry : + value.getAdditionalProperties().entrySet()) { + if (entry.getValue() instanceof String) + obj.addProperty(entry.getKey(), (String) entry.getValue()); + else if (entry.getValue() instanceof Number) + obj.addProperty(entry.getKey(), (Number) entry.getValue()); + else if (entry.getValue() instanceof Boolean) + obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); + else if (entry.getValue() instanceof Character) + obj.addProperty( + entry.getKey(), (Character) entry.getValue()); + else { + JsonElement jsonElement = gson.toJsonTree(entry.getValue()); + if (jsonElement.isJsonArray()) { + obj.add(entry.getKey(), jsonElement.getAsJsonArray()); + } else { + obj.add(entry.getKey(), jsonElement.getAsJsonObject()); + } + } + } + } + elementAdapter.write(out, obj); + } + + @Override + public RuntimeFilters read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // store additional fields in the deserialized instance + RuntimeFilters instance = thisAdapter.fromJsonTree(jsonObj); + for (Map.Entry entry : jsonObj.entrySet()) { + if (!openapiFields.contains(entry.getKey())) { + if (entry.getValue().isJsonPrimitive()) { // primitive type + if (entry.getValue().getAsJsonPrimitive().isString()) + instance.putAdditionalProperty( + entry.getKey(), entry.getValue().getAsString()); + else if (entry.getValue().getAsJsonPrimitive().isNumber()) + instance.putAdditionalProperty( + entry.getKey(), entry.getValue().getAsNumber()); + else if (entry.getValue().getAsJsonPrimitive().isBoolean()) + instance.putAdditionalProperty( + entry.getKey(), + entry.getValue().getAsBoolean()); + else + throw new IllegalArgumentException( + String.format( + "The field `%s` has unknown primitive" + + " type. Value: %s", + entry.getKey(), + entry.getValue().toString())); + } else if (entry.getValue().isJsonArray()) { + instance.putAdditionalProperty( + entry.getKey(), + gson.fromJson(entry.getValue(), List.class)); + } else { // JSON object + instance.putAdditionalProperty( + entry.getKey(), + gson.fromJson(entry.getValue(), HashMap.class)); + } + } + } + return instance; + } + }.nullSafe(); + } + } + + /** + * Create an instance of RuntimeFilters given an JSON string + * + * @param jsonString JSON string + * @return An instance of RuntimeFilters + * @throws IOException if the JSON string is invalid with respect to RuntimeFilters + */ + public static RuntimeFilters fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, RuntimeFilters.class); + } + + /** + * Convert an instance of RuntimeFilters to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} diff --git a/sdks/java/src/main/java/com/thoughtspot/client/model/RuntimeParamOverride.java b/sdks/java/src/main/java/com/thoughtspot/client/model/RuntimeParamOverride.java new file mode 100644 index 000000000..96647db16 --- /dev/null +++ b/sdks/java/src/main/java/com/thoughtspot/client/model/RuntimeParamOverride.java @@ -0,0 +1,287 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client.model; + +import com.google.gson.Gson; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.TypeAdapter; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.annotations.SerializedName; +import com.google.gson.reflect.TypeToken; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import com.thoughtspot.client.JSON; +import java.io.IOException; +import java.io.Serializable; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Objects; + +/** List of runtime parameters need to set during the session. */ +@javax.annotation.Generated( + value = "org.openapitools.codegen.languages.JavaClientCodegen", + comments = "Generator version: 7.12.0") +public class RuntimeParamOverride implements Serializable { + private static final long serialVersionUID = 1L; + + public static final String SERIALIZED_NAME_RUNTIME_PARAM_OVERRIDE = "runtime_param_override"; + + @SerializedName(SERIALIZED_NAME_RUNTIME_PARAM_OVERRIDE) + @javax.annotation.Nullable + private Object runtimeParamOverride; + + public RuntimeParamOverride() {} + + public RuntimeParamOverride runtimeParamOverride( + @javax.annotation.Nullable Object runtimeParamOverride) { + this.runtimeParamOverride = runtimeParamOverride; + return this; + } + + /** + * Runtime param override type in JWT. + * + * @return runtimeParamOverride + */ + @javax.annotation.Nullable + public Object getRuntimeParamOverride() { + return runtimeParamOverride; + } + + public void setRuntimeParamOverride(@javax.annotation.Nullable Object runtimeParamOverride) { + this.runtimeParamOverride = runtimeParamOverride; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key name of the property + * @param value value of the property + * @return the RuntimeParamOverride instance itself + */ + public RuntimeParamOverride putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return a map of objects + */ + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key name of the property + * @return an object + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + RuntimeParamOverride runtimeParamOverride = (RuntimeParamOverride) o; + return Objects.equals(this.runtimeParamOverride, runtimeParamOverride.runtimeParamOverride) + && Objects.equals( + this.additionalProperties, runtimeParamOverride.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(runtimeParamOverride, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class RuntimeParamOverride {\n"); + sb.append(" runtimeParamOverride: ") + .append(toIndentedString(runtimeParamOverride)) + .append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first + * line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("runtime_param_override"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to RuntimeParamOverride + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!RuntimeParamOverride.openapiRequiredFields + .isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException( + String.format( + "The required field(s) %s in RuntimeParamOverride is not found in" + + " the empty JSON string", + RuntimeParamOverride.openapiRequiredFields.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!RuntimeParamOverride.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'RuntimeParamOverride' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter = + gson.getDelegateAdapter(this, TypeToken.get(RuntimeParamOverride.class)); + + return (TypeAdapter) + new TypeAdapter() { + @Override + public void write(JsonWriter out, RuntimeParamOverride value) + throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + obj.remove("additionalProperties"); + // serialize additional properties + if (value.getAdditionalProperties() != null) { + for (Map.Entry entry : + value.getAdditionalProperties().entrySet()) { + if (entry.getValue() instanceof String) + obj.addProperty(entry.getKey(), (String) entry.getValue()); + else if (entry.getValue() instanceof Number) + obj.addProperty(entry.getKey(), (Number) entry.getValue()); + else if (entry.getValue() instanceof Boolean) + obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); + else if (entry.getValue() instanceof Character) + obj.addProperty( + entry.getKey(), (Character) entry.getValue()); + else { + JsonElement jsonElement = gson.toJsonTree(entry.getValue()); + if (jsonElement.isJsonArray()) { + obj.add(entry.getKey(), jsonElement.getAsJsonArray()); + } else { + obj.add(entry.getKey(), jsonElement.getAsJsonObject()); + } + } + } + } + elementAdapter.write(out, obj); + } + + @Override + public RuntimeParamOverride read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // store additional fields in the deserialized instance + RuntimeParamOverride instance = thisAdapter.fromJsonTree(jsonObj); + for (Map.Entry entry : jsonObj.entrySet()) { + if (!openapiFields.contains(entry.getKey())) { + if (entry.getValue().isJsonPrimitive()) { // primitive type + if (entry.getValue().getAsJsonPrimitive().isString()) + instance.putAdditionalProperty( + entry.getKey(), entry.getValue().getAsString()); + else if (entry.getValue().getAsJsonPrimitive().isNumber()) + instance.putAdditionalProperty( + entry.getKey(), entry.getValue().getAsNumber()); + else if (entry.getValue().getAsJsonPrimitive().isBoolean()) + instance.putAdditionalProperty( + entry.getKey(), + entry.getValue().getAsBoolean()); + else + throw new IllegalArgumentException( + String.format( + "The field `%s` has unknown primitive" + + " type. Value: %s", + entry.getKey(), + entry.getValue().toString())); + } else if (entry.getValue().isJsonArray()) { + instance.putAdditionalProperty( + entry.getKey(), + gson.fromJson(entry.getValue(), List.class)); + } else { // JSON object + instance.putAdditionalProperty( + entry.getKey(), + gson.fromJson(entry.getValue(), HashMap.class)); + } + } + } + return instance; + } + }.nullSafe(); + } + } + + /** + * Create an instance of RuntimeParamOverride given an JSON string + * + * @param jsonString JSON string + * @return An instance of RuntimeParamOverride + * @throws IOException if the JSON string is invalid with respect to RuntimeParamOverride + */ + public static RuntimeParamOverride fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, RuntimeParamOverride.class); + } + + /** + * Convert an instance of RuntimeParamOverride to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} diff --git a/sdks/java/src/main/java/com/thoughtspot/client/model/RuntimeParameters.java b/sdks/java/src/main/java/com/thoughtspot/client/model/RuntimeParameters.java new file mode 100644 index 000000000..bc07c5c20 --- /dev/null +++ b/sdks/java/src/main/java/com/thoughtspot/client/model/RuntimeParameters.java @@ -0,0 +1,454 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client.model; + +import com.google.gson.Gson; +import com.google.gson.JsonArray; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.TypeAdapter; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.annotations.SerializedName; +import com.google.gson.reflect.TypeToken; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import com.thoughtspot.client.JSON; +import java.io.IOException; +import java.io.Serializable; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Objects; +import org.openapitools.jackson.nullable.JsonNullable; + +/** Objects to apply the Runtime_Parameters. */ +@javax.annotation.Generated( + value = "org.openapitools.codegen.languages.JavaClientCodegen", + comments = "Generator version: 7.12.0") +public class RuntimeParameters implements Serializable { + private static final long serialVersionUID = 1L; + + public static final String SERIALIZED_NAME_NAME = "name"; + + @SerializedName(SERIALIZED_NAME_NAME) + @javax.annotation.Nonnull + private String name; + + public static final String SERIALIZED_NAME_VALUES = "values"; + + @SerializedName(SERIALIZED_NAME_VALUES) + @javax.annotation.Nonnull + private List values; + + public static final String SERIALIZED_NAME_PERSIST = "persist"; + + @SerializedName(SERIALIZED_NAME_PERSIST) + @javax.annotation.Nullable + private Boolean persist = false; + + public static final String SERIALIZED_NAME_OBJECTS = "objects"; + + @SerializedName(SERIALIZED_NAME_OBJECTS) + @javax.annotation.Nullable + private List objects; + + public RuntimeParameters() {} + + public RuntimeParameters name(@javax.annotation.Nonnull String name) { + this.name = name; + return this; + } + + /** + * The name of the parameter. + * + * @return name + */ + @javax.annotation.Nonnull + public String getName() { + return name; + } + + public void setName(@javax.annotation.Nonnull String name) { + this.name = name; + } + + public RuntimeParameters values(@javax.annotation.Nonnull List values) { + this.values = values; + return this; + } + + public RuntimeParameters addValuesItem(String valuesItem) { + if (this.values == null) { + this.values = new ArrayList<>(); + } + this.values.add(valuesItem); + return this; + } + + /** + * The array of values. + * + * @return values + */ + @javax.annotation.Nonnull + public List getValues() { + return values; + } + + public void setValues(@javax.annotation.Nonnull List values) { + this.values = values; + } + + public RuntimeParameters persist(@javax.annotation.Nullable Boolean persist) { + this.persist = persist; + return this; + } + + /** + * Flag to persist the parameters. Version: 9.12.0.cl or later + * + * @return persist + */ + @javax.annotation.Nullable + public Boolean getPersist() { + return persist; + } + + public void setPersist(@javax.annotation.Nullable Boolean persist) { + this.persist = persist; + } + + public RuntimeParameters objects(@javax.annotation.Nullable List objects) { + this.objects = objects; + return this; + } + + public RuntimeParameters addObjectsItem(UserObject objectsItem) { + if (this.objects == null) { + this.objects = new ArrayList<>(); + } + this.objects.add(objectsItem); + return this; + } + + /** + * Object to apply the runtime parameter. + * + * @return objects + */ + @javax.annotation.Nullable + public List getObjects() { + return objects; + } + + public void setObjects(@javax.annotation.Nullable List objects) { + this.objects = objects; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key name of the property + * @param value value of the property + * @return the RuntimeParameters instance itself + */ + public RuntimeParameters putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return a map of objects + */ + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key name of the property + * @return an object + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + RuntimeParameters runtimeParameters = (RuntimeParameters) o; + return Objects.equals(this.name, runtimeParameters.name) + && Objects.equals(this.values, runtimeParameters.values) + && Objects.equals(this.persist, runtimeParameters.persist) + && Objects.equals(this.objects, runtimeParameters.objects) + && Objects.equals( + this.additionalProperties, runtimeParameters.additionalProperties); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b + || (a != null + && b != null + && a.isPresent() + && b.isPresent() + && Objects.deepEquals(a.get(), b.get())); + } + + @Override + public int hashCode() { + return Objects.hash(name, values, persist, objects, additionalProperties); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; + } + return a.isPresent() ? Arrays.deepHashCode(new Object[] {a.get()}) : 31; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class RuntimeParameters {\n"); + sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append(" values: ").append(toIndentedString(values)).append("\n"); + sb.append(" persist: ").append(toIndentedString(persist)).append("\n"); + sb.append(" objects: ").append(toIndentedString(objects)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first + * line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("name"); + openapiFields.add("values"); + openapiFields.add("persist"); + openapiFields.add("objects"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + openapiRequiredFields.add("name"); + openapiRequiredFields.add("values"); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to RuntimeParameters + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!RuntimeParameters.openapiRequiredFields + .isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException( + String.format( + "The required field(s) %s in RuntimeParameters is not found in the" + + " empty JSON string", + RuntimeParameters.openapiRequiredFields.toString())); + } + } + + // check to make sure all required properties/fields are present in the JSON string + for (String requiredField : RuntimeParameters.openapiRequiredFields) { + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException( + String.format( + "The required field `%s` is not found in the JSON string: %s", + requiredField, jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if (!jsonObj.get("name").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `name` to be a primitive type in the JSON string" + + " but got `%s`", + jsonObj.get("name").toString())); + } + // ensure the required json array is present + if (jsonObj.get("values") == null) { + throw new IllegalArgumentException( + "Expected the field `linkedContent` to be an array in the JSON string but got" + + " `null`"); + } else if (!jsonObj.get("values").isJsonArray()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `values` to be an array in the JSON string but got" + + " `%s`", + jsonObj.get("values").toString())); + } + if (jsonObj.get("objects") != null && !jsonObj.get("objects").isJsonNull()) { + JsonArray jsonArrayobjects = jsonObj.getAsJsonArray("objects"); + if (jsonArrayobjects != null) { + // ensure the json data is an array + if (!jsonObj.get("objects").isJsonArray()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `objects` to be an array in the JSON" + + " string but got `%s`", + jsonObj.get("objects").toString())); + } + + // validate the optional field `objects` (array) + for (int i = 0; i < jsonArrayobjects.size(); i++) { + UserObject.validateJsonElement(jsonArrayobjects.get(i)); + } + ; + } + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!RuntimeParameters.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'RuntimeParameters' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter = + gson.getDelegateAdapter(this, TypeToken.get(RuntimeParameters.class)); + + return (TypeAdapter) + new TypeAdapter() { + @Override + public void write(JsonWriter out, RuntimeParameters value) + throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + obj.remove("additionalProperties"); + // serialize additional properties + if (value.getAdditionalProperties() != null) { + for (Map.Entry entry : + value.getAdditionalProperties().entrySet()) { + if (entry.getValue() instanceof String) + obj.addProperty(entry.getKey(), (String) entry.getValue()); + else if (entry.getValue() instanceof Number) + obj.addProperty(entry.getKey(), (Number) entry.getValue()); + else if (entry.getValue() instanceof Boolean) + obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); + else if (entry.getValue() instanceof Character) + obj.addProperty( + entry.getKey(), (Character) entry.getValue()); + else { + JsonElement jsonElement = gson.toJsonTree(entry.getValue()); + if (jsonElement.isJsonArray()) { + obj.add(entry.getKey(), jsonElement.getAsJsonArray()); + } else { + obj.add(entry.getKey(), jsonElement.getAsJsonObject()); + } + } + } + } + elementAdapter.write(out, obj); + } + + @Override + public RuntimeParameters read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // store additional fields in the deserialized instance + RuntimeParameters instance = thisAdapter.fromJsonTree(jsonObj); + for (Map.Entry entry : jsonObj.entrySet()) { + if (!openapiFields.contains(entry.getKey())) { + if (entry.getValue().isJsonPrimitive()) { // primitive type + if (entry.getValue().getAsJsonPrimitive().isString()) + instance.putAdditionalProperty( + entry.getKey(), entry.getValue().getAsString()); + else if (entry.getValue().getAsJsonPrimitive().isNumber()) + instance.putAdditionalProperty( + entry.getKey(), entry.getValue().getAsNumber()); + else if (entry.getValue().getAsJsonPrimitive().isBoolean()) + instance.putAdditionalProperty( + entry.getKey(), + entry.getValue().getAsBoolean()); + else + throw new IllegalArgumentException( + String.format( + "The field `%s` has unknown primitive" + + " type. Value: %s", + entry.getKey(), + entry.getValue().toString())); + } else if (entry.getValue().isJsonArray()) { + instance.putAdditionalProperty( + entry.getKey(), + gson.fromJson(entry.getValue(), List.class)); + } else { // JSON object + instance.putAdditionalProperty( + entry.getKey(), + gson.fromJson(entry.getValue(), HashMap.class)); + } + } + } + return instance; + } + }.nullSafe(); + } + } + + /** + * Create an instance of RuntimeParameters given an JSON string + * + * @param jsonString JSON string + * @return An instance of RuntimeParameters + * @throws IOException if the JSON string is invalid with respect to RuntimeParameters + */ + public static RuntimeParameters fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, RuntimeParameters.class); + } + + /** + * Convert an instance of RuntimeParameters to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} diff --git a/sdks/java/src/main/java/com/thoughtspot/client/model/RuntimeSort.java b/sdks/java/src/main/java/com/thoughtspot/client/model/RuntimeSort.java new file mode 100644 index 000000000..09c21e9d5 --- /dev/null +++ b/sdks/java/src/main/java/com/thoughtspot/client/model/RuntimeSort.java @@ -0,0 +1,282 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client.model; + +import com.google.gson.Gson; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.TypeAdapter; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.annotations.SerializedName; +import com.google.gson.reflect.TypeToken; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import com.thoughtspot.client.JSON; +import java.io.IOException; +import java.io.Serializable; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Objects; + +/** List of runtime parameters need to set during the session. */ +@javax.annotation.Generated( + value = "org.openapitools.codegen.languages.JavaClientCodegen", + comments = "Generator version: 7.12.0") +public class RuntimeSort implements Serializable { + private static final long serialVersionUID = 1L; + + public static final String SERIALIZED_NAME_RUNTIME_SORT = "runtime_sort"; + + @SerializedName(SERIALIZED_NAME_RUNTIME_SORT) + @javax.annotation.Nullable + private Object runtimeSort; + + public RuntimeSort() {} + + public RuntimeSort runtimeSort(@javax.annotation.Nullable Object runtimeSort) { + this.runtimeSort = runtimeSort; + return this; + } + + /** + * Runtime sort parameter type in JWT. + * + * @return runtimeSort + */ + @javax.annotation.Nullable + public Object getRuntimeSort() { + return runtimeSort; + } + + public void setRuntimeSort(@javax.annotation.Nullable Object runtimeSort) { + this.runtimeSort = runtimeSort; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key name of the property + * @param value value of the property + * @return the RuntimeSort instance itself + */ + public RuntimeSort putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return a map of objects + */ + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key name of the property + * @return an object + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + RuntimeSort runtimeSort = (RuntimeSort) o; + return Objects.equals(this.runtimeSort, runtimeSort.runtimeSort) + && Objects.equals(this.additionalProperties, runtimeSort.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(runtimeSort, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class RuntimeSort {\n"); + sb.append(" runtimeSort: ").append(toIndentedString(runtimeSort)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first + * line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("runtime_sort"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to RuntimeSort + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!RuntimeSort.openapiRequiredFields + .isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException( + String.format( + "The required field(s) %s in RuntimeSort is not found in the empty" + + " JSON string", + RuntimeSort.openapiRequiredFields.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!RuntimeSort.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'RuntimeSort' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter = + gson.getDelegateAdapter(this, TypeToken.get(RuntimeSort.class)); + + return (TypeAdapter) + new TypeAdapter() { + @Override + public void write(JsonWriter out, RuntimeSort value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + obj.remove("additionalProperties"); + // serialize additional properties + if (value.getAdditionalProperties() != null) { + for (Map.Entry entry : + value.getAdditionalProperties().entrySet()) { + if (entry.getValue() instanceof String) + obj.addProperty(entry.getKey(), (String) entry.getValue()); + else if (entry.getValue() instanceof Number) + obj.addProperty(entry.getKey(), (Number) entry.getValue()); + else if (entry.getValue() instanceof Boolean) + obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); + else if (entry.getValue() instanceof Character) + obj.addProperty( + entry.getKey(), (Character) entry.getValue()); + else { + JsonElement jsonElement = gson.toJsonTree(entry.getValue()); + if (jsonElement.isJsonArray()) { + obj.add(entry.getKey(), jsonElement.getAsJsonArray()); + } else { + obj.add(entry.getKey(), jsonElement.getAsJsonObject()); + } + } + } + } + elementAdapter.write(out, obj); + } + + @Override + public RuntimeSort read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // store additional fields in the deserialized instance + RuntimeSort instance = thisAdapter.fromJsonTree(jsonObj); + for (Map.Entry entry : jsonObj.entrySet()) { + if (!openapiFields.contains(entry.getKey())) { + if (entry.getValue().isJsonPrimitive()) { // primitive type + if (entry.getValue().getAsJsonPrimitive().isString()) + instance.putAdditionalProperty( + entry.getKey(), entry.getValue().getAsString()); + else if (entry.getValue().getAsJsonPrimitive().isNumber()) + instance.putAdditionalProperty( + entry.getKey(), entry.getValue().getAsNumber()); + else if (entry.getValue().getAsJsonPrimitive().isBoolean()) + instance.putAdditionalProperty( + entry.getKey(), + entry.getValue().getAsBoolean()); + else + throw new IllegalArgumentException( + String.format( + "The field `%s` has unknown primitive" + + " type. Value: %s", + entry.getKey(), + entry.getValue().toString())); + } else if (entry.getValue().isJsonArray()) { + instance.putAdditionalProperty( + entry.getKey(), + gson.fromJson(entry.getValue(), List.class)); + } else { // JSON object + instance.putAdditionalProperty( + entry.getKey(), + gson.fromJson(entry.getValue(), HashMap.class)); + } + } + } + return instance; + } + }.nullSafe(); + } + } + + /** + * Create an instance of RuntimeSort given an JSON string + * + * @param jsonString JSON string + * @return An instance of RuntimeSort + * @throws IOException if the JSON string is invalid with respect to RuntimeSort + */ + public static RuntimeSort fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, RuntimeSort.class); + } + + /** + * Convert an instance of RuntimeSort to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} diff --git a/sdks/java/src/main/java/com/thoughtspot/client/model/RuntimeSorts.java b/sdks/java/src/main/java/com/thoughtspot/client/model/RuntimeSorts.java new file mode 100644 index 000000000..3de73cc8d --- /dev/null +++ b/sdks/java/src/main/java/com/thoughtspot/client/model/RuntimeSorts.java @@ -0,0 +1,485 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client.model; + +import com.google.gson.Gson; +import com.google.gson.JsonArray; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.TypeAdapter; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.reflect.TypeToken; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import com.thoughtspot.client.JSON; +import java.io.IOException; +import java.io.Serializable; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Objects; +import org.openapitools.jackson.nullable.JsonNullable; + +/** Objects to apply the Runtime_Sorts. */ +@javax.annotation.Generated( + value = "org.openapitools.codegen.languages.JavaClientCodegen", + comments = "Generator version: 7.12.0") +public class RuntimeSorts implements Serializable { + private static final long serialVersionUID = 1L; + + public static final String SERIALIZED_NAME_COLUMN_NAME = "column_name"; + + @SerializedName(SERIALIZED_NAME_COLUMN_NAME) + @javax.annotation.Nullable + private String columnName; + + /** Order for the sort. */ + @JsonAdapter(OrderEnum.Adapter.class) + public enum OrderEnum { + ASC("ASC"), + + DESC("DESC"); + + private String value; + + OrderEnum(String value) { + this.value = value; + } + + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + public static OrderEnum fromValue(String value) { + for (OrderEnum b : OrderEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + return null; + } + + public static class Adapter extends TypeAdapter { + @Override + public void write(final JsonWriter jsonWriter, final OrderEnum enumeration) + throws IOException { + jsonWriter.value(enumeration.getValue()); + } + + @Override + public OrderEnum read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + return OrderEnum.fromValue(value); + } + } + + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + String value = jsonElement.getAsString(); + OrderEnum.fromValue(value); + } + } + + public static final String SERIALIZED_NAME_ORDER = "order"; + + @SerializedName(SERIALIZED_NAME_ORDER) + @javax.annotation.Nullable + private OrderEnum order; + + public static final String SERIALIZED_NAME_PERSIST = "persist"; + + @SerializedName(SERIALIZED_NAME_PERSIST) + @javax.annotation.Nullable + private Boolean persist = false; + + public static final String SERIALIZED_NAME_OBJECTS = "objects"; + + @SerializedName(SERIALIZED_NAME_OBJECTS) + @javax.annotation.Nullable + private List objects; + + public RuntimeSorts() {} + + public RuntimeSorts columnName(@javax.annotation.Nullable String columnName) { + this.columnName = columnName; + return this; + } + + /** + * The column name to apply filter. + * + * @return columnName + */ + @javax.annotation.Nullable + public String getColumnName() { + return columnName; + } + + public void setColumnName(@javax.annotation.Nullable String columnName) { + this.columnName = columnName; + } + + public RuntimeSorts order(@javax.annotation.Nullable OrderEnum order) { + this.order = order; + return this; + } + + /** + * Order for the sort. + * + * @return order + */ + @javax.annotation.Nullable + public OrderEnum getOrder() { + return order; + } + + public void setOrder(@javax.annotation.Nullable OrderEnum order) { + this.order = order; + } + + public RuntimeSorts persist(@javax.annotation.Nullable Boolean persist) { + this.persist = persist; + return this; + } + + /** + * Flag to persist the runtime sorts. Version: 9.12.0.cl or later + * + * @return persist + */ + @javax.annotation.Nullable + public Boolean getPersist() { + return persist; + } + + public void setPersist(@javax.annotation.Nullable Boolean persist) { + this.persist = persist; + } + + public RuntimeSorts objects(@javax.annotation.Nullable List objects) { + this.objects = objects; + return this; + } + + public RuntimeSorts addObjectsItem(UserObject objectsItem) { + if (this.objects == null) { + this.objects = new ArrayList<>(); + } + this.objects.add(objectsItem); + return this; + } + + /** + * Object to apply the runtime sort. + * + * @return objects + */ + @javax.annotation.Nullable + public List getObjects() { + return objects; + } + + public void setObjects(@javax.annotation.Nullable List objects) { + this.objects = objects; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key name of the property + * @param value value of the property + * @return the RuntimeSorts instance itself + */ + public RuntimeSorts putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return a map of objects + */ + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key name of the property + * @return an object + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + RuntimeSorts runtimeSorts = (RuntimeSorts) o; + return Objects.equals(this.columnName, runtimeSorts.columnName) + && Objects.equals(this.order, runtimeSorts.order) + && Objects.equals(this.persist, runtimeSorts.persist) + && Objects.equals(this.objects, runtimeSorts.objects) + && Objects.equals(this.additionalProperties, runtimeSorts.additionalProperties); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b + || (a != null + && b != null + && a.isPresent() + && b.isPresent() + && Objects.deepEquals(a.get(), b.get())); + } + + @Override + public int hashCode() { + return Objects.hash(columnName, order, persist, objects, additionalProperties); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; + } + return a.isPresent() ? Arrays.deepHashCode(new Object[] {a.get()}) : 31; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class RuntimeSorts {\n"); + sb.append(" columnName: ").append(toIndentedString(columnName)).append("\n"); + sb.append(" order: ").append(toIndentedString(order)).append("\n"); + sb.append(" persist: ").append(toIndentedString(persist)).append("\n"); + sb.append(" objects: ").append(toIndentedString(objects)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first + * line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("column_name"); + openapiFields.add("order"); + openapiFields.add("persist"); + openapiFields.add("objects"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to RuntimeSorts + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!RuntimeSorts.openapiRequiredFields + .isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException( + String.format( + "The required field(s) %s in RuntimeSorts is not found in the" + + " empty JSON string", + RuntimeSorts.openapiRequiredFields.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if ((jsonObj.get("column_name") != null && !jsonObj.get("column_name").isJsonNull()) + && !jsonObj.get("column_name").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `column_name` to be a primitive type in the JSON" + + " string but got `%s`", + jsonObj.get("column_name").toString())); + } + if ((jsonObj.get("order") != null && !jsonObj.get("order").isJsonNull()) + && !jsonObj.get("order").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `order` to be a primitive type in the JSON string" + + " but got `%s`", + jsonObj.get("order").toString())); + } + // validate the optional field `order` + if (jsonObj.get("order") != null && !jsonObj.get("order").isJsonNull()) { + OrderEnum.validateJsonElement(jsonObj.get("order")); + } + if (jsonObj.get("objects") != null && !jsonObj.get("objects").isJsonNull()) { + JsonArray jsonArrayobjects = jsonObj.getAsJsonArray("objects"); + if (jsonArrayobjects != null) { + // ensure the json data is an array + if (!jsonObj.get("objects").isJsonArray()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `objects` to be an array in the JSON" + + " string but got `%s`", + jsonObj.get("objects").toString())); + } + + // validate the optional field `objects` (array) + for (int i = 0; i < jsonArrayobjects.size(); i++) { + UserObject.validateJsonElement(jsonArrayobjects.get(i)); + } + ; + } + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!RuntimeSorts.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'RuntimeSorts' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter = + gson.getDelegateAdapter(this, TypeToken.get(RuntimeSorts.class)); + + return (TypeAdapter) + new TypeAdapter() { + @Override + public void write(JsonWriter out, RuntimeSorts value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + obj.remove("additionalProperties"); + // serialize additional properties + if (value.getAdditionalProperties() != null) { + for (Map.Entry entry : + value.getAdditionalProperties().entrySet()) { + if (entry.getValue() instanceof String) + obj.addProperty(entry.getKey(), (String) entry.getValue()); + else if (entry.getValue() instanceof Number) + obj.addProperty(entry.getKey(), (Number) entry.getValue()); + else if (entry.getValue() instanceof Boolean) + obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); + else if (entry.getValue() instanceof Character) + obj.addProperty( + entry.getKey(), (Character) entry.getValue()); + else { + JsonElement jsonElement = gson.toJsonTree(entry.getValue()); + if (jsonElement.isJsonArray()) { + obj.add(entry.getKey(), jsonElement.getAsJsonArray()); + } else { + obj.add(entry.getKey(), jsonElement.getAsJsonObject()); + } + } + } + } + elementAdapter.write(out, obj); + } + + @Override + public RuntimeSorts read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // store additional fields in the deserialized instance + RuntimeSorts instance = thisAdapter.fromJsonTree(jsonObj); + for (Map.Entry entry : jsonObj.entrySet()) { + if (!openapiFields.contains(entry.getKey())) { + if (entry.getValue().isJsonPrimitive()) { // primitive type + if (entry.getValue().getAsJsonPrimitive().isString()) + instance.putAdditionalProperty( + entry.getKey(), entry.getValue().getAsString()); + else if (entry.getValue().getAsJsonPrimitive().isNumber()) + instance.putAdditionalProperty( + entry.getKey(), entry.getValue().getAsNumber()); + else if (entry.getValue().getAsJsonPrimitive().isBoolean()) + instance.putAdditionalProperty( + entry.getKey(), + entry.getValue().getAsBoolean()); + else + throw new IllegalArgumentException( + String.format( + "The field `%s` has unknown primitive" + + " type. Value: %s", + entry.getKey(), + entry.getValue().toString())); + } else if (entry.getValue().isJsonArray()) { + instance.putAdditionalProperty( + entry.getKey(), + gson.fromJson(entry.getValue(), List.class)); + } else { // JSON object + instance.putAdditionalProperty( + entry.getKey(), + gson.fromJson(entry.getValue(), HashMap.class)); + } + } + } + return instance; + } + }.nullSafe(); + } + } + + /** + * Create an instance of RuntimeSorts given an JSON string + * + * @param jsonString JSON string + * @return An instance of RuntimeSorts + * @throws IOException if the JSON string is invalid with respect to RuntimeSorts + */ + public static RuntimeSorts fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, RuntimeSorts.class); + } + + /** + * Convert an instance of RuntimeSorts to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} diff --git a/sdks/java/src/main/java/com/thoughtspot/client/model/ScheduleHistoryRunsOptionsInput.java b/sdks/java/src/main/java/com/thoughtspot/client/model/ScheduleHistoryRunsOptionsInput.java new file mode 100644 index 000000000..322ee9cea --- /dev/null +++ b/sdks/java/src/main/java/com/thoughtspot/client/model/ScheduleHistoryRunsOptionsInput.java @@ -0,0 +1,372 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client.model; + +import com.google.gson.Gson; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.TypeAdapter; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.annotations.SerializedName; +import com.google.gson.reflect.TypeToken; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import com.thoughtspot.client.JSON; +import java.io.IOException; +import java.io.Serializable; +import java.util.Arrays; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Objects; +import org.openapitools.jackson.nullable.JsonNullable; + +/** ScheduleHistoryRunsOptionsInput */ +@javax.annotation.Generated( + value = "org.openapitools.codegen.languages.JavaClientCodegen", + comments = "Generator version: 7.12.0") +public class ScheduleHistoryRunsOptionsInput implements Serializable { + private static final long serialVersionUID = 1L; + + public static final String SERIALIZED_NAME_INCLUDE_HISTORY_RUNS = "include_history_runs"; + + @SerializedName(SERIALIZED_NAME_INCLUDE_HISTORY_RUNS) + @javax.annotation.Nullable + private Boolean includeHistoryRuns = false; + + public static final String SERIALIZED_NAME_RECORD_SIZE = "record_size"; + + @SerializedName(SERIALIZED_NAME_RECORD_SIZE) + @javax.annotation.Nullable + private Integer recordSize = 10; + + public static final String SERIALIZED_NAME_RECORD_OFFSET = "record_offset"; + + @SerializedName(SERIALIZED_NAME_RECORD_OFFSET) + @javax.annotation.Nullable + private Integer recordOffset = 0; + + public ScheduleHistoryRunsOptionsInput() {} + + public ScheduleHistoryRunsOptionsInput includeHistoryRuns( + @javax.annotation.Nullable Boolean includeHistoryRuns) { + this.includeHistoryRuns = includeHistoryRuns; + return this; + } + + /** + * Indicates whether to fetch history runs for the scheduled notification. + * + * @return includeHistoryRuns + */ + @javax.annotation.Nullable + public Boolean getIncludeHistoryRuns() { + return includeHistoryRuns; + } + + public void setIncludeHistoryRuns(@javax.annotation.Nullable Boolean includeHistoryRuns) { + this.includeHistoryRuns = includeHistoryRuns; + } + + public ScheduleHistoryRunsOptionsInput recordSize( + @javax.annotation.Nullable Integer recordSize) { + this.recordSize = recordSize; + return this; + } + + /** + * Indicates the max number of records that can be fetched as past runs of any scheduled job. + * + * @return recordSize + */ + @javax.annotation.Nullable + public Integer getRecordSize() { + return recordSize; + } + + public void setRecordSize(@javax.annotation.Nullable Integer recordSize) { + this.recordSize = recordSize; + } + + public ScheduleHistoryRunsOptionsInput recordOffset( + @javax.annotation.Nullable Integer recordOffset) { + this.recordOffset = recordOffset; + return this; + } + + /** + * Indicates the starting record number from where history runs records should be fetched. + * + * @return recordOffset + */ + @javax.annotation.Nullable + public Integer getRecordOffset() { + return recordOffset; + } + + public void setRecordOffset(@javax.annotation.Nullable Integer recordOffset) { + this.recordOffset = recordOffset; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key name of the property + * @param value value of the property + * @return the ScheduleHistoryRunsOptionsInput instance itself + */ + public ScheduleHistoryRunsOptionsInput putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return a map of objects + */ + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key name of the property + * @return an object + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ScheduleHistoryRunsOptionsInput scheduleHistoryRunsOptionsInput = + (ScheduleHistoryRunsOptionsInput) o; + return Objects.equals( + this.includeHistoryRuns, scheduleHistoryRunsOptionsInput.includeHistoryRuns) + && Objects.equals(this.recordSize, scheduleHistoryRunsOptionsInput.recordSize) + && Objects.equals(this.recordOffset, scheduleHistoryRunsOptionsInput.recordOffset) + && Objects.equals( + this.additionalProperties, + scheduleHistoryRunsOptionsInput.additionalProperties); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b + || (a != null + && b != null + && a.isPresent() + && b.isPresent() + && Objects.deepEquals(a.get(), b.get())); + } + + @Override + public int hashCode() { + return Objects.hash(includeHistoryRuns, recordSize, recordOffset, additionalProperties); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; + } + return a.isPresent() ? Arrays.deepHashCode(new Object[] {a.get()}) : 31; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ScheduleHistoryRunsOptionsInput {\n"); + sb.append(" includeHistoryRuns: ") + .append(toIndentedString(includeHistoryRuns)) + .append("\n"); + sb.append(" recordSize: ").append(toIndentedString(recordSize)).append("\n"); + sb.append(" recordOffset: ").append(toIndentedString(recordOffset)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first + * line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("include_history_runs"); + openapiFields.add("record_size"); + openapiFields.add("record_offset"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to + * ScheduleHistoryRunsOptionsInput + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!ScheduleHistoryRunsOptionsInput.openapiRequiredFields + .isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException( + String.format( + "The required field(s) %s in ScheduleHistoryRunsOptionsInput is" + + " not found in the empty JSON string", + ScheduleHistoryRunsOptionsInput.openapiRequiredFields.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!ScheduleHistoryRunsOptionsInput.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'ScheduleHistoryRunsOptionsInput' and its + // subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter = + gson.getDelegateAdapter( + this, TypeToken.get(ScheduleHistoryRunsOptionsInput.class)); + + return (TypeAdapter) + new TypeAdapter() { + @Override + public void write(JsonWriter out, ScheduleHistoryRunsOptionsInput value) + throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + obj.remove("additionalProperties"); + // serialize additional properties + if (value.getAdditionalProperties() != null) { + for (Map.Entry entry : + value.getAdditionalProperties().entrySet()) { + if (entry.getValue() instanceof String) + obj.addProperty(entry.getKey(), (String) entry.getValue()); + else if (entry.getValue() instanceof Number) + obj.addProperty(entry.getKey(), (Number) entry.getValue()); + else if (entry.getValue() instanceof Boolean) + obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); + else if (entry.getValue() instanceof Character) + obj.addProperty( + entry.getKey(), (Character) entry.getValue()); + else { + JsonElement jsonElement = gson.toJsonTree(entry.getValue()); + if (jsonElement.isJsonArray()) { + obj.add(entry.getKey(), jsonElement.getAsJsonArray()); + } else { + obj.add(entry.getKey(), jsonElement.getAsJsonObject()); + } + } + } + } + elementAdapter.write(out, obj); + } + + @Override + public ScheduleHistoryRunsOptionsInput read(JsonReader in) + throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // store additional fields in the deserialized instance + ScheduleHistoryRunsOptionsInput instance = + thisAdapter.fromJsonTree(jsonObj); + for (Map.Entry entry : jsonObj.entrySet()) { + if (!openapiFields.contains(entry.getKey())) { + if (entry.getValue().isJsonPrimitive()) { // primitive type + if (entry.getValue().getAsJsonPrimitive().isString()) + instance.putAdditionalProperty( + entry.getKey(), entry.getValue().getAsString()); + else if (entry.getValue().getAsJsonPrimitive().isNumber()) + instance.putAdditionalProperty( + entry.getKey(), entry.getValue().getAsNumber()); + else if (entry.getValue().getAsJsonPrimitive().isBoolean()) + instance.putAdditionalProperty( + entry.getKey(), + entry.getValue().getAsBoolean()); + else + throw new IllegalArgumentException( + String.format( + "The field `%s` has unknown primitive" + + " type. Value: %s", + entry.getKey(), + entry.getValue().toString())); + } else if (entry.getValue().isJsonArray()) { + instance.putAdditionalProperty( + entry.getKey(), + gson.fromJson(entry.getValue(), List.class)); + } else { // JSON object + instance.putAdditionalProperty( + entry.getKey(), + gson.fromJson(entry.getValue(), HashMap.class)); + } + } + } + return instance; + } + }.nullSafe(); + } + } + + /** + * Create an instance of ScheduleHistoryRunsOptionsInput given an JSON string + * + * @param jsonString JSON string + * @return An instance of ScheduleHistoryRunsOptionsInput + * @throws IOException if the JSON string is invalid with respect to + * ScheduleHistoryRunsOptionsInput + */ + public static ScheduleHistoryRunsOptionsInput fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, ScheduleHistoryRunsOptionsInput.class); + } + + /** + * Convert an instance of ScheduleHistoryRunsOptionsInput to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} diff --git a/sdks/java/src/main/java/com/thoughtspot/client/model/SchedulesPdfOptionsInput.java b/sdks/java/src/main/java/com/thoughtspot/client/model/SchedulesPdfOptionsInput.java new file mode 100644 index 000000000..9e6c8ee54 --- /dev/null +++ b/sdks/java/src/main/java/com/thoughtspot/client/model/SchedulesPdfOptionsInput.java @@ -0,0 +1,638 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client.model; + +import com.google.gson.Gson; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.TypeAdapter; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.reflect.TypeToken; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import com.thoughtspot.client.JSON; +import java.io.IOException; +import java.io.Serializable; +import java.util.Arrays; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Objects; +import org.openapitools.jackson.nullable.JsonNullable; + +/** Options for PDF export. */ +@javax.annotation.Generated( + value = "org.openapitools.codegen.languages.JavaClientCodegen", + comments = "Generator version: 7.12.0") +public class SchedulesPdfOptionsInput implements Serializable { + private static final long serialVersionUID = 1L; + + public static final String SERIALIZED_NAME_COMPLETE_LIVEBOARD = "complete_liveboard"; + + @SerializedName(SERIALIZED_NAME_COMPLETE_LIVEBOARD) + @javax.annotation.Nullable + private Boolean completeLiveboard; + + public static final String SERIALIZED_NAME_INCLUDE_COVER_PAGE = "include_cover_page"; + + @SerializedName(SERIALIZED_NAME_INCLUDE_COVER_PAGE) + @javax.annotation.Nullable + private Boolean includeCoverPage; + + public static final String SERIALIZED_NAME_INCLUDE_CUSTOM_LOGO = "include_custom_logo"; + + @SerializedName(SERIALIZED_NAME_INCLUDE_CUSTOM_LOGO) + @javax.annotation.Nullable + private Boolean includeCustomLogo; + + public static final String SERIALIZED_NAME_INCLUDE_FILTER_PAGE = "include_filter_page"; + + @SerializedName(SERIALIZED_NAME_INCLUDE_FILTER_PAGE) + @javax.annotation.Nullable + private Boolean includeFilterPage; + + public static final String SERIALIZED_NAME_INCLUDE_PAGE_NUMBER = "include_page_number"; + + @SerializedName(SERIALIZED_NAME_INCLUDE_PAGE_NUMBER) + @javax.annotation.Nullable + private Boolean includePageNumber; + + public static final String SERIALIZED_NAME_PAGE_FOOTER_TEXT = "page_footer_text"; + + @SerializedName(SERIALIZED_NAME_PAGE_FOOTER_TEXT) + @javax.annotation.Nullable + private String pageFooterText; + + public static final String SERIALIZED_NAME_PAGE_ORIENTATION = "page_orientation"; + + @SerializedName(SERIALIZED_NAME_PAGE_ORIENTATION) + @javax.annotation.Nullable + private String pageOrientation; + + /** Page size. */ + @JsonAdapter(PageSizeEnum.Adapter.class) + public enum PageSizeEnum { + A4("A4"), + + TAB_BASED("TAB_BASED"); + + private String value; + + PageSizeEnum(String value) { + this.value = value; + } + + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + public static PageSizeEnum fromValue(String value) { + for (PageSizeEnum b : PageSizeEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + return null; + } + + public static class Adapter extends TypeAdapter { + @Override + public void write(final JsonWriter jsonWriter, final PageSizeEnum enumeration) + throws IOException { + jsonWriter.value(enumeration.getValue()); + } + + @Override + public PageSizeEnum read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + return PageSizeEnum.fromValue(value); + } + } + + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + String value = jsonElement.getAsString(); + PageSizeEnum.fromValue(value); + } + } + + public static final String SERIALIZED_NAME_PAGE_SIZE = "page_size"; + + @SerializedName(SERIALIZED_NAME_PAGE_SIZE) + @javax.annotation.Nullable + private PageSizeEnum pageSize; + + public static final String SERIALIZED_NAME_TRUNCATE_TABLE = "truncate_table"; + + @SerializedName(SERIALIZED_NAME_TRUNCATE_TABLE) + @javax.annotation.Nullable + private Boolean truncateTable; + + public SchedulesPdfOptionsInput() {} + + public SchedulesPdfOptionsInput completeLiveboard( + @javax.annotation.Nullable Boolean completeLiveboard) { + this.completeLiveboard = completeLiveboard; + return this; + } + + /** + * Indicates whether to include complete Liveboard. + * + * @return completeLiveboard + */ + @javax.annotation.Nullable + public Boolean getCompleteLiveboard() { + return completeLiveboard; + } + + public void setCompleteLiveboard(@javax.annotation.Nullable Boolean completeLiveboard) { + this.completeLiveboard = completeLiveboard; + } + + public SchedulesPdfOptionsInput includeCoverPage( + @javax.annotation.Nullable Boolean includeCoverPage) { + this.includeCoverPage = includeCoverPage; + return this; + } + + /** + * Indicates whether to include cover page with the Liveboard title. + * + * @return includeCoverPage + */ + @javax.annotation.Nullable + public Boolean getIncludeCoverPage() { + return includeCoverPage; + } + + public void setIncludeCoverPage(@javax.annotation.Nullable Boolean includeCoverPage) { + this.includeCoverPage = includeCoverPage; + } + + public SchedulesPdfOptionsInput includeCustomLogo( + @javax.annotation.Nullable Boolean includeCustomLogo) { + this.includeCustomLogo = includeCustomLogo; + return this; + } + + /** + * Indicates whether to include customized wide logo in the footer if available. + * + * @return includeCustomLogo + */ + @javax.annotation.Nullable + public Boolean getIncludeCustomLogo() { + return includeCustomLogo; + } + + public void setIncludeCustomLogo(@javax.annotation.Nullable Boolean includeCustomLogo) { + this.includeCustomLogo = includeCustomLogo; + } + + public SchedulesPdfOptionsInput includeFilterPage( + @javax.annotation.Nullable Boolean includeFilterPage) { + this.includeFilterPage = includeFilterPage; + return this; + } + + /** + * Indicates whether to include a page with all applied filters. + * + * @return includeFilterPage + */ + @javax.annotation.Nullable + public Boolean getIncludeFilterPage() { + return includeFilterPage; + } + + public void setIncludeFilterPage(@javax.annotation.Nullable Boolean includeFilterPage) { + this.includeFilterPage = includeFilterPage; + } + + public SchedulesPdfOptionsInput includePageNumber( + @javax.annotation.Nullable Boolean includePageNumber) { + this.includePageNumber = includePageNumber; + return this; + } + + /** + * Indicates whether to include page number in the footer of each page + * + * @return includePageNumber + */ + @javax.annotation.Nullable + public Boolean getIncludePageNumber() { + return includePageNumber; + } + + public void setIncludePageNumber(@javax.annotation.Nullable Boolean includePageNumber) { + this.includePageNumber = includePageNumber; + } + + public SchedulesPdfOptionsInput pageFooterText( + @javax.annotation.Nullable String pageFooterText) { + this.pageFooterText = pageFooterText; + return this; + } + + /** + * Text to include in the footer of each page. + * + * @return pageFooterText + */ + @javax.annotation.Nullable + public String getPageFooterText() { + return pageFooterText; + } + + public void setPageFooterText(@javax.annotation.Nullable String pageFooterText) { + this.pageFooterText = pageFooterText; + } + + public SchedulesPdfOptionsInput pageOrientation( + @javax.annotation.Nullable String pageOrientation) { + this.pageOrientation = pageOrientation; + return this; + } + + /** + * Page orientation of the PDF. + * + * @return pageOrientation + */ + @javax.annotation.Nullable + public String getPageOrientation() { + return pageOrientation; + } + + public void setPageOrientation(@javax.annotation.Nullable String pageOrientation) { + this.pageOrientation = pageOrientation; + } + + public SchedulesPdfOptionsInput pageSize(@javax.annotation.Nullable PageSizeEnum pageSize) { + this.pageSize = pageSize; + return this; + } + + /** + * Page size. + * + * @return pageSize + */ + @javax.annotation.Nullable + public PageSizeEnum getPageSize() { + return pageSize; + } + + public void setPageSize(@javax.annotation.Nullable PageSizeEnum pageSize) { + this.pageSize = pageSize; + } + + public SchedulesPdfOptionsInput truncateTable( + @javax.annotation.Nullable Boolean truncateTable) { + this.truncateTable = truncateTable; + return this; + } + + /** + * Indicates whether to include only first page of the tables. + * + * @return truncateTable + */ + @javax.annotation.Nullable + public Boolean getTruncateTable() { + return truncateTable; + } + + public void setTruncateTable(@javax.annotation.Nullable Boolean truncateTable) { + this.truncateTable = truncateTable; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key name of the property + * @param value value of the property + * @return the SchedulesPdfOptionsInput instance itself + */ + public SchedulesPdfOptionsInput putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return a map of objects + */ + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key name of the property + * @return an object + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + SchedulesPdfOptionsInput schedulesPdfOptionsInput = (SchedulesPdfOptionsInput) o; + return Objects.equals(this.completeLiveboard, schedulesPdfOptionsInput.completeLiveboard) + && Objects.equals(this.includeCoverPage, schedulesPdfOptionsInput.includeCoverPage) + && Objects.equals( + this.includeCustomLogo, schedulesPdfOptionsInput.includeCustomLogo) + && Objects.equals( + this.includeFilterPage, schedulesPdfOptionsInput.includeFilterPage) + && Objects.equals( + this.includePageNumber, schedulesPdfOptionsInput.includePageNumber) + && Objects.equals(this.pageFooterText, schedulesPdfOptionsInput.pageFooterText) + && Objects.equals(this.pageOrientation, schedulesPdfOptionsInput.pageOrientation) + && Objects.equals(this.pageSize, schedulesPdfOptionsInput.pageSize) + && Objects.equals(this.truncateTable, schedulesPdfOptionsInput.truncateTable) + && Objects.equals( + this.additionalProperties, schedulesPdfOptionsInput.additionalProperties); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b + || (a != null + && b != null + && a.isPresent() + && b.isPresent() + && Objects.deepEquals(a.get(), b.get())); + } + + @Override + public int hashCode() { + return Objects.hash( + completeLiveboard, + includeCoverPage, + includeCustomLogo, + includeFilterPage, + includePageNumber, + pageFooterText, + pageOrientation, + pageSize, + truncateTable, + additionalProperties); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; + } + return a.isPresent() ? Arrays.deepHashCode(new Object[] {a.get()}) : 31; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class SchedulesPdfOptionsInput {\n"); + sb.append(" completeLiveboard: ") + .append(toIndentedString(completeLiveboard)) + .append("\n"); + sb.append(" includeCoverPage: ").append(toIndentedString(includeCoverPage)).append("\n"); + sb.append(" includeCustomLogo: ") + .append(toIndentedString(includeCustomLogo)) + .append("\n"); + sb.append(" includeFilterPage: ") + .append(toIndentedString(includeFilterPage)) + .append("\n"); + sb.append(" includePageNumber: ") + .append(toIndentedString(includePageNumber)) + .append("\n"); + sb.append(" pageFooterText: ").append(toIndentedString(pageFooterText)).append("\n"); + sb.append(" pageOrientation: ").append(toIndentedString(pageOrientation)).append("\n"); + sb.append(" pageSize: ").append(toIndentedString(pageSize)).append("\n"); + sb.append(" truncateTable: ").append(toIndentedString(truncateTable)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first + * line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("complete_liveboard"); + openapiFields.add("include_cover_page"); + openapiFields.add("include_custom_logo"); + openapiFields.add("include_filter_page"); + openapiFields.add("include_page_number"); + openapiFields.add("page_footer_text"); + openapiFields.add("page_orientation"); + openapiFields.add("page_size"); + openapiFields.add("truncate_table"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to SchedulesPdfOptionsInput + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!SchedulesPdfOptionsInput.openapiRequiredFields + .isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException( + String.format( + "The required field(s) %s in SchedulesPdfOptionsInput is not found" + + " in the empty JSON string", + SchedulesPdfOptionsInput.openapiRequiredFields.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if ((jsonObj.get("page_footer_text") != null + && !jsonObj.get("page_footer_text").isJsonNull()) + && !jsonObj.get("page_footer_text").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `page_footer_text` to be a primitive type in the" + + " JSON string but got `%s`", + jsonObj.get("page_footer_text").toString())); + } + if ((jsonObj.get("page_orientation") != null + && !jsonObj.get("page_orientation").isJsonNull()) + && !jsonObj.get("page_orientation").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `page_orientation` to be a primitive type in the" + + " JSON string but got `%s`", + jsonObj.get("page_orientation").toString())); + } + if ((jsonObj.get("page_size") != null && !jsonObj.get("page_size").isJsonNull()) + && !jsonObj.get("page_size").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `page_size` to be a primitive type in the JSON" + + " string but got `%s`", + jsonObj.get("page_size").toString())); + } + // validate the optional field `page_size` + if (jsonObj.get("page_size") != null && !jsonObj.get("page_size").isJsonNull()) { + PageSizeEnum.validateJsonElement(jsonObj.get("page_size")); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!SchedulesPdfOptionsInput.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'SchedulesPdfOptionsInput' and its + // subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter = + gson.getDelegateAdapter(this, TypeToken.get(SchedulesPdfOptionsInput.class)); + + return (TypeAdapter) + new TypeAdapter() { + @Override + public void write(JsonWriter out, SchedulesPdfOptionsInput value) + throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + obj.remove("additionalProperties"); + // serialize additional properties + if (value.getAdditionalProperties() != null) { + for (Map.Entry entry : + value.getAdditionalProperties().entrySet()) { + if (entry.getValue() instanceof String) + obj.addProperty(entry.getKey(), (String) entry.getValue()); + else if (entry.getValue() instanceof Number) + obj.addProperty(entry.getKey(), (Number) entry.getValue()); + else if (entry.getValue() instanceof Boolean) + obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); + else if (entry.getValue() instanceof Character) + obj.addProperty( + entry.getKey(), (Character) entry.getValue()); + else { + JsonElement jsonElement = gson.toJsonTree(entry.getValue()); + if (jsonElement.isJsonArray()) { + obj.add(entry.getKey(), jsonElement.getAsJsonArray()); + } else { + obj.add(entry.getKey(), jsonElement.getAsJsonObject()); + } + } + } + } + elementAdapter.write(out, obj); + } + + @Override + public SchedulesPdfOptionsInput read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // store additional fields in the deserialized instance + SchedulesPdfOptionsInput instance = thisAdapter.fromJsonTree(jsonObj); + for (Map.Entry entry : jsonObj.entrySet()) { + if (!openapiFields.contains(entry.getKey())) { + if (entry.getValue().isJsonPrimitive()) { // primitive type + if (entry.getValue().getAsJsonPrimitive().isString()) + instance.putAdditionalProperty( + entry.getKey(), entry.getValue().getAsString()); + else if (entry.getValue().getAsJsonPrimitive().isNumber()) + instance.putAdditionalProperty( + entry.getKey(), entry.getValue().getAsNumber()); + else if (entry.getValue().getAsJsonPrimitive().isBoolean()) + instance.putAdditionalProperty( + entry.getKey(), + entry.getValue().getAsBoolean()); + else + throw new IllegalArgumentException( + String.format( + "The field `%s` has unknown primitive" + + " type. Value: %s", + entry.getKey(), + entry.getValue().toString())); + } else if (entry.getValue().isJsonArray()) { + instance.putAdditionalProperty( + entry.getKey(), + gson.fromJson(entry.getValue(), List.class)); + } else { // JSON object + instance.putAdditionalProperty( + entry.getKey(), + gson.fromJson(entry.getValue(), HashMap.class)); + } + } + } + return instance; + } + }.nullSafe(); + } + } + + /** + * Create an instance of SchedulesPdfOptionsInput given an JSON string + * + * @param jsonString JSON string + * @return An instance of SchedulesPdfOptionsInput + * @throws IOException if the JSON string is invalid with respect to SchedulesPdfOptionsInput + */ + public static SchedulesPdfOptionsInput fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, SchedulesPdfOptionsInput.class); + } + + /** + * Convert an instance of SchedulesPdfOptionsInput to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} diff --git a/sdks/java/src/main/java/com/thoughtspot/client/model/SchemaObject.java b/sdks/java/src/main/java/com/thoughtspot/client/model/SchemaObject.java new file mode 100644 index 000000000..29ccea1ce --- /dev/null +++ b/sdks/java/src/main/java/com/thoughtspot/client/model/SchemaObject.java @@ -0,0 +1,375 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client.model; + +import com.google.gson.Gson; +import com.google.gson.JsonArray; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.TypeAdapter; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.annotations.SerializedName; +import com.google.gson.reflect.TypeToken; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import com.thoughtspot.client.JSON; +import java.io.IOException; +import java.io.Serializable; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Objects; +import org.openapitools.jackson.nullable.JsonNullable; + +/** SchemaObject */ +@javax.annotation.Generated( + value = "org.openapitools.codegen.languages.JavaClientCodegen", + comments = "Generator version: 7.12.0") +public class SchemaObject implements Serializable { + private static final long serialVersionUID = 1L; + + public static final String SERIALIZED_NAME_NAME = "name"; + + @SerializedName(SERIALIZED_NAME_NAME) + @javax.annotation.Nonnull + private String name; + + public static final String SERIALIZED_NAME_TABLES = "tables"; + + @SerializedName(SERIALIZED_NAME_TABLES) + @javax.annotation.Nullable + private List tables; + + public SchemaObject() {} + + public SchemaObject name(@javax.annotation.Nonnull String name) { + this.name = name; + return this; + } + + /** + * Name of the schema. + * + * @return name + */ + @javax.annotation.Nonnull + public String getName() { + return name; + } + + public void setName(@javax.annotation.Nonnull String name) { + this.name = name; + } + + public SchemaObject tables(@javax.annotation.Nullable List
tables) { + this.tables = tables; + return this; + } + + public SchemaObject addTablesItem(Table tablesItem) { + if (this.tables == null) { + this.tables = new ArrayList<>(); + } + this.tables.add(tablesItem); + return this; + } + + /** + * Tables in the schema. + * + * @return tables + */ + @javax.annotation.Nullable + public List
getTables() { + return tables; + } + + public void setTables(@javax.annotation.Nullable List
tables) { + this.tables = tables; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key name of the property + * @param value value of the property + * @return the SchemaObject instance itself + */ + public SchemaObject putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return a map of objects + */ + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key name of the property + * @return an object + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + SchemaObject schemaObject = (SchemaObject) o; + return Objects.equals(this.name, schemaObject.name) + && Objects.equals(this.tables, schemaObject.tables) + && Objects.equals(this.additionalProperties, schemaObject.additionalProperties); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b + || (a != null + && b != null + && a.isPresent() + && b.isPresent() + && Objects.deepEquals(a.get(), b.get())); + } + + @Override + public int hashCode() { + return Objects.hash(name, tables, additionalProperties); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; + } + return a.isPresent() ? Arrays.deepHashCode(new Object[] {a.get()}) : 31; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class SchemaObject {\n"); + sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append(" tables: ").append(toIndentedString(tables)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first + * line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("name"); + openapiFields.add("tables"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + openapiRequiredFields.add("name"); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to SchemaObject + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!SchemaObject.openapiRequiredFields + .isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException( + String.format( + "The required field(s) %s in SchemaObject is not found in the" + + " empty JSON string", + SchemaObject.openapiRequiredFields.toString())); + } + } + + // check to make sure all required properties/fields are present in the JSON string + for (String requiredField : SchemaObject.openapiRequiredFields) { + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException( + String.format( + "The required field `%s` is not found in the JSON string: %s", + requiredField, jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if (!jsonObj.get("name").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `name` to be a primitive type in the JSON string" + + " but got `%s`", + jsonObj.get("name").toString())); + } + if (jsonObj.get("tables") != null && !jsonObj.get("tables").isJsonNull()) { + JsonArray jsonArraytables = jsonObj.getAsJsonArray("tables"); + if (jsonArraytables != null) { + // ensure the json data is an array + if (!jsonObj.get("tables").isJsonArray()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `tables` to be an array in the JSON string" + + " but got `%s`", + jsonObj.get("tables").toString())); + } + + // validate the optional field `tables` (array) + for (int i = 0; i < jsonArraytables.size(); i++) { + Table.validateJsonElement(jsonArraytables.get(i)); + } + ; + } + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!SchemaObject.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'SchemaObject' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter = + gson.getDelegateAdapter(this, TypeToken.get(SchemaObject.class)); + + return (TypeAdapter) + new TypeAdapter() { + @Override + public void write(JsonWriter out, SchemaObject value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + obj.remove("additionalProperties"); + // serialize additional properties + if (value.getAdditionalProperties() != null) { + for (Map.Entry entry : + value.getAdditionalProperties().entrySet()) { + if (entry.getValue() instanceof String) + obj.addProperty(entry.getKey(), (String) entry.getValue()); + else if (entry.getValue() instanceof Number) + obj.addProperty(entry.getKey(), (Number) entry.getValue()); + else if (entry.getValue() instanceof Boolean) + obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); + else if (entry.getValue() instanceof Character) + obj.addProperty( + entry.getKey(), (Character) entry.getValue()); + else { + JsonElement jsonElement = gson.toJsonTree(entry.getValue()); + if (jsonElement.isJsonArray()) { + obj.add(entry.getKey(), jsonElement.getAsJsonArray()); + } else { + obj.add(entry.getKey(), jsonElement.getAsJsonObject()); + } + } + } + } + elementAdapter.write(out, obj); + } + + @Override + public SchemaObject read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // store additional fields in the deserialized instance + SchemaObject instance = thisAdapter.fromJsonTree(jsonObj); + for (Map.Entry entry : jsonObj.entrySet()) { + if (!openapiFields.contains(entry.getKey())) { + if (entry.getValue().isJsonPrimitive()) { // primitive type + if (entry.getValue().getAsJsonPrimitive().isString()) + instance.putAdditionalProperty( + entry.getKey(), entry.getValue().getAsString()); + else if (entry.getValue().getAsJsonPrimitive().isNumber()) + instance.putAdditionalProperty( + entry.getKey(), entry.getValue().getAsNumber()); + else if (entry.getValue().getAsJsonPrimitive().isBoolean()) + instance.putAdditionalProperty( + entry.getKey(), + entry.getValue().getAsBoolean()); + else + throw new IllegalArgumentException( + String.format( + "The field `%s` has unknown primitive" + + " type. Value: %s", + entry.getKey(), + entry.getValue().toString())); + } else if (entry.getValue().isJsonArray()) { + instance.putAdditionalProperty( + entry.getKey(), + gson.fromJson(entry.getValue(), List.class)); + } else { // JSON object + instance.putAdditionalProperty( + entry.getKey(), + gson.fromJson(entry.getValue(), HashMap.class)); + } + } + } + return instance; + } + }.nullSafe(); + } + } + + /** + * Create an instance of SchemaObject given an JSON string + * + * @param jsonString JSON string + * @return An instance of SchemaObject + * @throws IOException if the JSON string is invalid with respect to SchemaObject + */ + public static SchemaObject fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, SchemaObject.class); + } + + /** + * Convert an instance of SchemaObject to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} diff --git a/sdks/java/src/main/java/com/thoughtspot/client/model/Scope.java b/sdks/java/src/main/java/com/thoughtspot/client/model/Scope.java new file mode 100644 index 000000000..1552c79cc --- /dev/null +++ b/sdks/java/src/main/java/com/thoughtspot/client/model/Scope.java @@ -0,0 +1,382 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client.model; + +import com.google.gson.Gson; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.TypeAdapter; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.annotations.SerializedName; +import com.google.gson.reflect.TypeToken; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import com.thoughtspot.client.JSON; +import java.io.IOException; +import java.io.Serializable; +import java.util.Arrays; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Objects; +import org.openapitools.jackson.nullable.JsonNullable; + +/** Scope */ +@javax.annotation.Generated( + value = "org.openapitools.codegen.languages.JavaClientCodegen", + comments = "Generator version: 7.12.0") +public class Scope implements Serializable { + private static final long serialVersionUID = 1L; + + public static final String SERIALIZED_NAME_ACCESS_TYPE = "access_type"; + + @SerializedName(SERIALIZED_NAME_ACCESS_TYPE) + @javax.annotation.Nonnull + private String accessType; + + public static final String SERIALIZED_NAME_ORG_ID = "org_id"; + + @SerializedName(SERIALIZED_NAME_ORG_ID) + @javax.annotation.Nullable + private Integer orgId; + + public static final String SERIALIZED_NAME_METADATA_ID = "metadata_id"; + + @SerializedName(SERIALIZED_NAME_METADATA_ID) + @javax.annotation.Nullable + private String metadataId; + + public Scope() {} + + public Scope accessType(@javax.annotation.Nonnull String accessType) { + this.accessType = accessType; + return this; + } + + /** + * Object access scope type. + * + * @return accessType + */ + @javax.annotation.Nonnull + public String getAccessType() { + return accessType; + } + + public void setAccessType(@javax.annotation.Nonnull String accessType) { + this.accessType = accessType; + } + + public Scope orgId(@javax.annotation.Nullable Integer orgId) { + this.orgId = orgId; + return this; + } + + /** + * Unique identifier of the metadata. + * + * @return orgId + */ + @javax.annotation.Nullable + public Integer getOrgId() { + return orgId; + } + + public void setOrgId(@javax.annotation.Nullable Integer orgId) { + this.orgId = orgId; + } + + public Scope metadataId(@javax.annotation.Nullable String metadataId) { + this.metadataId = metadataId; + return this; + } + + /** + * Unique identifier of the Org. + * + * @return metadataId + */ + @javax.annotation.Nullable + public String getMetadataId() { + return metadataId; + } + + public void setMetadataId(@javax.annotation.Nullable String metadataId) { + this.metadataId = metadataId; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key name of the property + * @param value value of the property + * @return the Scope instance itself + */ + public Scope putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return a map of objects + */ + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key name of the property + * @return an object + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + Scope scope = (Scope) o; + return Objects.equals(this.accessType, scope.accessType) + && Objects.equals(this.orgId, scope.orgId) + && Objects.equals(this.metadataId, scope.metadataId) + && Objects.equals(this.additionalProperties, scope.additionalProperties); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b + || (a != null + && b != null + && a.isPresent() + && b.isPresent() + && Objects.deepEquals(a.get(), b.get())); + } + + @Override + public int hashCode() { + return Objects.hash(accessType, orgId, metadataId, additionalProperties); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; + } + return a.isPresent() ? Arrays.deepHashCode(new Object[] {a.get()}) : 31; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class Scope {\n"); + sb.append(" accessType: ").append(toIndentedString(accessType)).append("\n"); + sb.append(" orgId: ").append(toIndentedString(orgId)).append("\n"); + sb.append(" metadataId: ").append(toIndentedString(metadataId)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first + * line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("access_type"); + openapiFields.add("org_id"); + openapiFields.add("metadata_id"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + openapiRequiredFields.add("access_type"); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to Scope + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!Scope.openapiRequiredFields + .isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException( + String.format( + "The required field(s) %s in Scope is not found in the empty JSON" + + " string", + Scope.openapiRequiredFields.toString())); + } + } + + // check to make sure all required properties/fields are present in the JSON string + for (String requiredField : Scope.openapiRequiredFields) { + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException( + String.format( + "The required field `%s` is not found in the JSON string: %s", + requiredField, jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if (!jsonObj.get("access_type").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `access_type` to be a primitive type in the JSON" + + " string but got `%s`", + jsonObj.get("access_type").toString())); + } + if ((jsonObj.get("metadata_id") != null && !jsonObj.get("metadata_id").isJsonNull()) + && !jsonObj.get("metadata_id").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `metadata_id` to be a primitive type in the JSON" + + " string but got `%s`", + jsonObj.get("metadata_id").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!Scope.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'Scope' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter = + gson.getDelegateAdapter(this, TypeToken.get(Scope.class)); + + return (TypeAdapter) + new TypeAdapter() { + @Override + public void write(JsonWriter out, Scope value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + obj.remove("additionalProperties"); + // serialize additional properties + if (value.getAdditionalProperties() != null) { + for (Map.Entry entry : + value.getAdditionalProperties().entrySet()) { + if (entry.getValue() instanceof String) + obj.addProperty(entry.getKey(), (String) entry.getValue()); + else if (entry.getValue() instanceof Number) + obj.addProperty(entry.getKey(), (Number) entry.getValue()); + else if (entry.getValue() instanceof Boolean) + obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); + else if (entry.getValue() instanceof Character) + obj.addProperty( + entry.getKey(), (Character) entry.getValue()); + else { + JsonElement jsonElement = gson.toJsonTree(entry.getValue()); + if (jsonElement.isJsonArray()) { + obj.add(entry.getKey(), jsonElement.getAsJsonArray()); + } else { + obj.add(entry.getKey(), jsonElement.getAsJsonObject()); + } + } + } + } + elementAdapter.write(out, obj); + } + + @Override + public Scope read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // store additional fields in the deserialized instance + Scope instance = thisAdapter.fromJsonTree(jsonObj); + for (Map.Entry entry : jsonObj.entrySet()) { + if (!openapiFields.contains(entry.getKey())) { + if (entry.getValue().isJsonPrimitive()) { // primitive type + if (entry.getValue().getAsJsonPrimitive().isString()) + instance.putAdditionalProperty( + entry.getKey(), entry.getValue().getAsString()); + else if (entry.getValue().getAsJsonPrimitive().isNumber()) + instance.putAdditionalProperty( + entry.getKey(), entry.getValue().getAsNumber()); + else if (entry.getValue().getAsJsonPrimitive().isBoolean()) + instance.putAdditionalProperty( + entry.getKey(), + entry.getValue().getAsBoolean()); + else + throw new IllegalArgumentException( + String.format( + "The field `%s` has unknown primitive" + + " type. Value: %s", + entry.getKey(), + entry.getValue().toString())); + } else if (entry.getValue().isJsonArray()) { + instance.putAdditionalProperty( + entry.getKey(), + gson.fromJson(entry.getValue(), List.class)); + } else { // JSON object + instance.putAdditionalProperty( + entry.getKey(), + gson.fromJson(entry.getValue(), HashMap.class)); + } + } + } + return instance; + } + }.nullSafe(); + } + } + + /** + * Create an instance of Scope given an JSON string + * + * @param jsonString JSON string + * @return An instance of Scope + * @throws IOException if the JSON string is invalid with respect to Scope + */ + public static Scope fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, Scope.class); + } + + /** + * Convert an instance of Scope to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} diff --git a/sdks/java/src/main/java/com/thoughtspot/client/model/ScriptSrcUrls.java b/sdks/java/src/main/java/com/thoughtspot/client/model/ScriptSrcUrls.java new file mode 100644 index 000000000..58f257d15 --- /dev/null +++ b/sdks/java/src/main/java/com/thoughtspot/client/model/ScriptSrcUrls.java @@ -0,0 +1,347 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client.model; + +import com.google.gson.Gson; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.TypeAdapter; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.annotations.SerializedName; +import com.google.gson.reflect.TypeToken; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import com.thoughtspot.client.JSON; +import java.io.IOException; +import java.io.Serializable; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Objects; +import org.openapitools.jackson.nullable.JsonNullable; + +/** Script-src CSP settings. */ +@javax.annotation.Generated( + value = "org.openapitools.codegen.languages.JavaClientCodegen", + comments = "Generator version: 7.12.0") +public class ScriptSrcUrls implements Serializable { + private static final long serialVersionUID = 1L; + + public static final String SERIALIZED_NAME_ENABLED = "enabled"; + + @SerializedName(SERIALIZED_NAME_ENABLED) + @javax.annotation.Nullable + private Boolean enabled; + + public static final String SERIALIZED_NAME_URLS = "urls"; + + @SerializedName(SERIALIZED_NAME_URLS) + @javax.annotation.Nullable + private List urls; + + public ScriptSrcUrls() {} + + public ScriptSrcUrls enabled(@javax.annotation.Nullable Boolean enabled) { + this.enabled = enabled; + return this; + } + + /** + * Whether script-src customization is enabled. + * + * @return enabled + */ + @javax.annotation.Nullable + public Boolean getEnabled() { + return enabled; + } + + public void setEnabled(@javax.annotation.Nullable Boolean enabled) { + this.enabled = enabled; + } + + public ScriptSrcUrls urls(@javax.annotation.Nullable List urls) { + this.urls = urls; + return this; + } + + public ScriptSrcUrls addUrlsItem(String urlsItem) { + if (this.urls == null) { + this.urls = new ArrayList<>(); + } + this.urls.add(urlsItem); + return this; + } + + /** + * Allowed URLs for script-src directive. Can only be set if enabled is true. + * + * @return urls + */ + @javax.annotation.Nullable + public List getUrls() { + return urls; + } + + public void setUrls(@javax.annotation.Nullable List urls) { + this.urls = urls; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key name of the property + * @param value value of the property + * @return the ScriptSrcUrls instance itself + */ + public ScriptSrcUrls putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return a map of objects + */ + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key name of the property + * @return an object + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ScriptSrcUrls scriptSrcUrls = (ScriptSrcUrls) o; + return Objects.equals(this.enabled, scriptSrcUrls.enabled) + && Objects.equals(this.urls, scriptSrcUrls.urls) + && Objects.equals(this.additionalProperties, scriptSrcUrls.additionalProperties); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b + || (a != null + && b != null + && a.isPresent() + && b.isPresent() + && Objects.deepEquals(a.get(), b.get())); + } + + @Override + public int hashCode() { + return Objects.hash(enabled, urls, additionalProperties); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; + } + return a.isPresent() ? Arrays.deepHashCode(new Object[] {a.get()}) : 31; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ScriptSrcUrls {\n"); + sb.append(" enabled: ").append(toIndentedString(enabled)).append("\n"); + sb.append(" urls: ").append(toIndentedString(urls)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first + * line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("enabled"); + openapiFields.add("urls"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to ScriptSrcUrls + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!ScriptSrcUrls.openapiRequiredFields + .isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException( + String.format( + "The required field(s) %s in ScriptSrcUrls is not found in the" + + " empty JSON string", + ScriptSrcUrls.openapiRequiredFields.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // ensure the optional json data is an array if present + if (jsonObj.get("urls") != null + && !jsonObj.get("urls").isJsonNull() + && !jsonObj.get("urls").isJsonArray()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `urls` to be an array in the JSON string but got" + + " `%s`", + jsonObj.get("urls").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!ScriptSrcUrls.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'ScriptSrcUrls' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter = + gson.getDelegateAdapter(this, TypeToken.get(ScriptSrcUrls.class)); + + return (TypeAdapter) + new TypeAdapter() { + @Override + public void write(JsonWriter out, ScriptSrcUrls value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + obj.remove("additionalProperties"); + // serialize additional properties + if (value.getAdditionalProperties() != null) { + for (Map.Entry entry : + value.getAdditionalProperties().entrySet()) { + if (entry.getValue() instanceof String) + obj.addProperty(entry.getKey(), (String) entry.getValue()); + else if (entry.getValue() instanceof Number) + obj.addProperty(entry.getKey(), (Number) entry.getValue()); + else if (entry.getValue() instanceof Boolean) + obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); + else if (entry.getValue() instanceof Character) + obj.addProperty( + entry.getKey(), (Character) entry.getValue()); + else { + JsonElement jsonElement = gson.toJsonTree(entry.getValue()); + if (jsonElement.isJsonArray()) { + obj.add(entry.getKey(), jsonElement.getAsJsonArray()); + } else { + obj.add(entry.getKey(), jsonElement.getAsJsonObject()); + } + } + } + } + elementAdapter.write(out, obj); + } + + @Override + public ScriptSrcUrls read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // store additional fields in the deserialized instance + ScriptSrcUrls instance = thisAdapter.fromJsonTree(jsonObj); + for (Map.Entry entry : jsonObj.entrySet()) { + if (!openapiFields.contains(entry.getKey())) { + if (entry.getValue().isJsonPrimitive()) { // primitive type + if (entry.getValue().getAsJsonPrimitive().isString()) + instance.putAdditionalProperty( + entry.getKey(), entry.getValue().getAsString()); + else if (entry.getValue().getAsJsonPrimitive().isNumber()) + instance.putAdditionalProperty( + entry.getKey(), entry.getValue().getAsNumber()); + else if (entry.getValue().getAsJsonPrimitive().isBoolean()) + instance.putAdditionalProperty( + entry.getKey(), + entry.getValue().getAsBoolean()); + else + throw new IllegalArgumentException( + String.format( + "The field `%s` has unknown primitive" + + " type. Value: %s", + entry.getKey(), + entry.getValue().toString())); + } else if (entry.getValue().isJsonArray()) { + instance.putAdditionalProperty( + entry.getKey(), + gson.fromJson(entry.getValue(), List.class)); + } else { // JSON object + instance.putAdditionalProperty( + entry.getKey(), + gson.fromJson(entry.getValue(), HashMap.class)); + } + } + } + return instance; + } + }.nullSafe(); + } + } + + /** + * Create an instance of ScriptSrcUrls given an JSON string + * + * @param jsonString JSON string + * @return An instance of ScriptSrcUrls + * @throws IOException if the JSON string is invalid with respect to ScriptSrcUrls + */ + public static ScriptSrcUrls fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, ScriptSrcUrls.class); + } + + /** + * Convert an instance of ScriptSrcUrls to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} diff --git a/sdks/java/src/main/java/com/thoughtspot/client/model/ScriptSrcUrlsInput.java b/sdks/java/src/main/java/com/thoughtspot/client/model/ScriptSrcUrlsInput.java new file mode 100644 index 000000000..2cd399764 --- /dev/null +++ b/sdks/java/src/main/java/com/thoughtspot/client/model/ScriptSrcUrlsInput.java @@ -0,0 +1,349 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client.model; + +import com.google.gson.Gson; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.TypeAdapter; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.annotations.SerializedName; +import com.google.gson.reflect.TypeToken; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import com.thoughtspot.client.JSON; +import java.io.IOException; +import java.io.Serializable; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Objects; +import org.openapitools.jackson.nullable.JsonNullable; + +/** Input for script-src CSP settings. */ +@javax.annotation.Generated( + value = "org.openapitools.codegen.languages.JavaClientCodegen", + comments = "Generator version: 7.12.0") +public class ScriptSrcUrlsInput implements Serializable { + private static final long serialVersionUID = 1L; + + public static final String SERIALIZED_NAME_ENABLED = "enabled"; + + @SerializedName(SERIALIZED_NAME_ENABLED) + @javax.annotation.Nullable + private Boolean enabled; + + public static final String SERIALIZED_NAME_URLS = "urls"; + + @SerializedName(SERIALIZED_NAME_URLS) + @javax.annotation.Nullable + private List urls; + + public ScriptSrcUrlsInput() {} + + public ScriptSrcUrlsInput enabled(@javax.annotation.Nullable Boolean enabled) { + this.enabled = enabled; + return this; + } + + /** + * Whether script-src customization is enabled. + * + * @return enabled + */ + @javax.annotation.Nullable + public Boolean getEnabled() { + return enabled; + } + + public void setEnabled(@javax.annotation.Nullable Boolean enabled) { + this.enabled = enabled; + } + + public ScriptSrcUrlsInput urls(@javax.annotation.Nullable List urls) { + this.urls = urls; + return this; + } + + public ScriptSrcUrlsInput addUrlsItem(String urlsItem) { + if (this.urls == null) { + this.urls = new ArrayList<>(); + } + this.urls.add(urlsItem); + return this; + } + + /** + * Allowed URLs for script-src directive. Can only be set if enabled is true. + * + * @return urls + */ + @javax.annotation.Nullable + public List getUrls() { + return urls; + } + + public void setUrls(@javax.annotation.Nullable List urls) { + this.urls = urls; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key name of the property + * @param value value of the property + * @return the ScriptSrcUrlsInput instance itself + */ + public ScriptSrcUrlsInput putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return a map of objects + */ + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key name of the property + * @return an object + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ScriptSrcUrlsInput scriptSrcUrlsInput = (ScriptSrcUrlsInput) o; + return Objects.equals(this.enabled, scriptSrcUrlsInput.enabled) + && Objects.equals(this.urls, scriptSrcUrlsInput.urls) + && Objects.equals( + this.additionalProperties, scriptSrcUrlsInput.additionalProperties); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b + || (a != null + && b != null + && a.isPresent() + && b.isPresent() + && Objects.deepEquals(a.get(), b.get())); + } + + @Override + public int hashCode() { + return Objects.hash(enabled, urls, additionalProperties); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; + } + return a.isPresent() ? Arrays.deepHashCode(new Object[] {a.get()}) : 31; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ScriptSrcUrlsInput {\n"); + sb.append(" enabled: ").append(toIndentedString(enabled)).append("\n"); + sb.append(" urls: ").append(toIndentedString(urls)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first + * line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("enabled"); + openapiFields.add("urls"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to ScriptSrcUrlsInput + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!ScriptSrcUrlsInput.openapiRequiredFields + .isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException( + String.format( + "The required field(s) %s in ScriptSrcUrlsInput is not found in" + + " the empty JSON string", + ScriptSrcUrlsInput.openapiRequiredFields.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // ensure the optional json data is an array if present + if (jsonObj.get("urls") != null + && !jsonObj.get("urls").isJsonNull() + && !jsonObj.get("urls").isJsonArray()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `urls` to be an array in the JSON string but got" + + " `%s`", + jsonObj.get("urls").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!ScriptSrcUrlsInput.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'ScriptSrcUrlsInput' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter = + gson.getDelegateAdapter(this, TypeToken.get(ScriptSrcUrlsInput.class)); + + return (TypeAdapter) + new TypeAdapter() { + @Override + public void write(JsonWriter out, ScriptSrcUrlsInput value) + throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + obj.remove("additionalProperties"); + // serialize additional properties + if (value.getAdditionalProperties() != null) { + for (Map.Entry entry : + value.getAdditionalProperties().entrySet()) { + if (entry.getValue() instanceof String) + obj.addProperty(entry.getKey(), (String) entry.getValue()); + else if (entry.getValue() instanceof Number) + obj.addProperty(entry.getKey(), (Number) entry.getValue()); + else if (entry.getValue() instanceof Boolean) + obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); + else if (entry.getValue() instanceof Character) + obj.addProperty( + entry.getKey(), (Character) entry.getValue()); + else { + JsonElement jsonElement = gson.toJsonTree(entry.getValue()); + if (jsonElement.isJsonArray()) { + obj.add(entry.getKey(), jsonElement.getAsJsonArray()); + } else { + obj.add(entry.getKey(), jsonElement.getAsJsonObject()); + } + } + } + } + elementAdapter.write(out, obj); + } + + @Override + public ScriptSrcUrlsInput read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // store additional fields in the deserialized instance + ScriptSrcUrlsInput instance = thisAdapter.fromJsonTree(jsonObj); + for (Map.Entry entry : jsonObj.entrySet()) { + if (!openapiFields.contains(entry.getKey())) { + if (entry.getValue().isJsonPrimitive()) { // primitive type + if (entry.getValue().getAsJsonPrimitive().isString()) + instance.putAdditionalProperty( + entry.getKey(), entry.getValue().getAsString()); + else if (entry.getValue().getAsJsonPrimitive().isNumber()) + instance.putAdditionalProperty( + entry.getKey(), entry.getValue().getAsNumber()); + else if (entry.getValue().getAsJsonPrimitive().isBoolean()) + instance.putAdditionalProperty( + entry.getKey(), + entry.getValue().getAsBoolean()); + else + throw new IllegalArgumentException( + String.format( + "The field `%s` has unknown primitive" + + " type. Value: %s", + entry.getKey(), + entry.getValue().toString())); + } else if (entry.getValue().isJsonArray()) { + instance.putAdditionalProperty( + entry.getKey(), + gson.fromJson(entry.getValue(), List.class)); + } else { // JSON object + instance.putAdditionalProperty( + entry.getKey(), + gson.fromJson(entry.getValue(), HashMap.class)); + } + } + } + return instance; + } + }.nullSafe(); + } + } + + /** + * Create an instance of ScriptSrcUrlsInput given an JSON string + * + * @param jsonString JSON string + * @return An instance of ScriptSrcUrlsInput + * @throws IOException if the JSON string is invalid with respect to ScriptSrcUrlsInput + */ + public static ScriptSrcUrlsInput fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, ScriptSrcUrlsInput.class); + } + + /** + * Convert an instance of ScriptSrcUrlsInput to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} diff --git a/sdks/java/src/main/java/com/thoughtspot/client/model/SearchAuthSettingsRequest.java b/sdks/java/src/main/java/com/thoughtspot/client/model/SearchAuthSettingsRequest.java new file mode 100644 index 000000000..3e5b627c6 --- /dev/null +++ b/sdks/java/src/main/java/com/thoughtspot/client/model/SearchAuthSettingsRequest.java @@ -0,0 +1,454 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client.model; + +import com.google.gson.Gson; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.TypeAdapter; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.reflect.TypeToken; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import com.thoughtspot.client.JSON; +import java.io.IOException; +import java.io.Serializable; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Objects; + +/** SearchAuthSettingsRequest */ +@javax.annotation.Generated( + value = "org.openapitools.codegen.languages.JavaClientCodegen", + comments = "Generator version: 7.12.0") +public class SearchAuthSettingsRequest implements Serializable { + private static final long serialVersionUID = 1L; + + /** + * Type of authentication mechanism to retrieve settings for. Currently supports TRUSTED_AUTH. + */ + @JsonAdapter(AuthTypeEnum.Adapter.class) + public enum AuthTypeEnum { + TRUSTED_AUTH("TRUSTED_AUTH"); + + private String value; + + AuthTypeEnum(String value) { + this.value = value; + } + + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + public static AuthTypeEnum fromValue(String value) { + for (AuthTypeEnum b : AuthTypeEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + + public static class Adapter extends TypeAdapter { + @Override + public void write(final JsonWriter jsonWriter, final AuthTypeEnum enumeration) + throws IOException { + jsonWriter.value(enumeration.getValue()); + } + + @Override + public AuthTypeEnum read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + return AuthTypeEnum.fromValue(value); + } + } + + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + String value = jsonElement.getAsString(); + AuthTypeEnum.fromValue(value); + } + } + + public static final String SERIALIZED_NAME_AUTH_TYPE = "auth_type"; + + @SerializedName(SERIALIZED_NAME_AUTH_TYPE) + @javax.annotation.Nonnull + private AuthTypeEnum authType; + + /** + * Scope of auth settings to retrieve. When absent, both cluster and org settings are returned + * (subject to caller privileges). Set to CLUSTER to retrieve only cluster-level settings, or + * ORG to retrieve only org-level settings. + */ + @JsonAdapter(ScopeEnum.Adapter.class) + public enum ScopeEnum { + CLUSTER("CLUSTER"), + + ORG("ORG"); + + private String value; + + ScopeEnum(String value) { + this.value = value; + } + + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + public static ScopeEnum fromValue(String value) { + for (ScopeEnum b : ScopeEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + + public static class Adapter extends TypeAdapter { + @Override + public void write(final JsonWriter jsonWriter, final ScopeEnum enumeration) + throws IOException { + jsonWriter.value(enumeration.getValue()); + } + + @Override + public ScopeEnum read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + return ScopeEnum.fromValue(value); + } + } + + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + String value = jsonElement.getAsString(); + ScopeEnum.fromValue(value); + } + } + + public static final String SERIALIZED_NAME_SCOPE = "scope"; + + @SerializedName(SERIALIZED_NAME_SCOPE) + @javax.annotation.Nullable + private ScopeEnum scope; + + public SearchAuthSettingsRequest() {} + + public SearchAuthSettingsRequest authType(@javax.annotation.Nonnull AuthTypeEnum authType) { + this.authType = authType; + return this; + } + + /** + * Type of authentication mechanism to retrieve settings for. Currently supports TRUSTED_AUTH. + * + * @return authType + */ + @javax.annotation.Nonnull + public AuthTypeEnum getAuthType() { + return authType; + } + + public void setAuthType(@javax.annotation.Nonnull AuthTypeEnum authType) { + this.authType = authType; + } + + public SearchAuthSettingsRequest scope(@javax.annotation.Nullable ScopeEnum scope) { + this.scope = scope; + return this; + } + + /** + * Scope of auth settings to retrieve. When absent, both cluster and org settings are returned + * (subject to caller privileges). Set to CLUSTER to retrieve only cluster-level settings, or + * ORG to retrieve only org-level settings. + * + * @return scope + */ + @javax.annotation.Nullable + public ScopeEnum getScope() { + return scope; + } + + public void setScope(@javax.annotation.Nullable ScopeEnum scope) { + this.scope = scope; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key name of the property + * @param value value of the property + * @return the SearchAuthSettingsRequest instance itself + */ + public SearchAuthSettingsRequest putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return a map of objects + */ + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key name of the property + * @return an object + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + SearchAuthSettingsRequest searchAuthSettingsRequest = (SearchAuthSettingsRequest) o; + return Objects.equals(this.authType, searchAuthSettingsRequest.authType) + && Objects.equals(this.scope, searchAuthSettingsRequest.scope) + && Objects.equals( + this.additionalProperties, searchAuthSettingsRequest.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(authType, scope, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class SearchAuthSettingsRequest {\n"); + sb.append(" authType: ").append(toIndentedString(authType)).append("\n"); + sb.append(" scope: ").append(toIndentedString(scope)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first + * line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("auth_type"); + openapiFields.add("scope"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + openapiRequiredFields.add("auth_type"); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to SearchAuthSettingsRequest + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!SearchAuthSettingsRequest.openapiRequiredFields + .isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException( + String.format( + "The required field(s) %s in SearchAuthSettingsRequest is not" + + " found in the empty JSON string", + SearchAuthSettingsRequest.openapiRequiredFields.toString())); + } + } + + // check to make sure all required properties/fields are present in the JSON string + for (String requiredField : SearchAuthSettingsRequest.openapiRequiredFields) { + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException( + String.format( + "The required field `%s` is not found in the JSON string: %s", + requiredField, jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if (!jsonObj.get("auth_type").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `auth_type` to be a primitive type in the JSON" + + " string but got `%s`", + jsonObj.get("auth_type").toString())); + } + // validate the required field `auth_type` + AuthTypeEnum.validateJsonElement(jsonObj.get("auth_type")); + if ((jsonObj.get("scope") != null && !jsonObj.get("scope").isJsonNull()) + && !jsonObj.get("scope").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `scope` to be a primitive type in the JSON string" + + " but got `%s`", + jsonObj.get("scope").toString())); + } + // validate the optional field `scope` + if (jsonObj.get("scope") != null && !jsonObj.get("scope").isJsonNull()) { + ScopeEnum.validateJsonElement(jsonObj.get("scope")); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!SearchAuthSettingsRequest.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'SearchAuthSettingsRequest' and its + // subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter = + gson.getDelegateAdapter(this, TypeToken.get(SearchAuthSettingsRequest.class)); + + return (TypeAdapter) + new TypeAdapter() { + @Override + public void write(JsonWriter out, SearchAuthSettingsRequest value) + throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + obj.remove("additionalProperties"); + // serialize additional properties + if (value.getAdditionalProperties() != null) { + for (Map.Entry entry : + value.getAdditionalProperties().entrySet()) { + if (entry.getValue() instanceof String) + obj.addProperty(entry.getKey(), (String) entry.getValue()); + else if (entry.getValue() instanceof Number) + obj.addProperty(entry.getKey(), (Number) entry.getValue()); + else if (entry.getValue() instanceof Boolean) + obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); + else if (entry.getValue() instanceof Character) + obj.addProperty( + entry.getKey(), (Character) entry.getValue()); + else { + JsonElement jsonElement = gson.toJsonTree(entry.getValue()); + if (jsonElement.isJsonArray()) { + obj.add(entry.getKey(), jsonElement.getAsJsonArray()); + } else { + obj.add(entry.getKey(), jsonElement.getAsJsonObject()); + } + } + } + } + elementAdapter.write(out, obj); + } + + @Override + public SearchAuthSettingsRequest read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // store additional fields in the deserialized instance + SearchAuthSettingsRequest instance = thisAdapter.fromJsonTree(jsonObj); + for (Map.Entry entry : jsonObj.entrySet()) { + if (!openapiFields.contains(entry.getKey())) { + if (entry.getValue().isJsonPrimitive()) { // primitive type + if (entry.getValue().getAsJsonPrimitive().isString()) + instance.putAdditionalProperty( + entry.getKey(), entry.getValue().getAsString()); + else if (entry.getValue().getAsJsonPrimitive().isNumber()) + instance.putAdditionalProperty( + entry.getKey(), entry.getValue().getAsNumber()); + else if (entry.getValue().getAsJsonPrimitive().isBoolean()) + instance.putAdditionalProperty( + entry.getKey(), + entry.getValue().getAsBoolean()); + else + throw new IllegalArgumentException( + String.format( + "The field `%s` has unknown primitive" + + " type. Value: %s", + entry.getKey(), + entry.getValue().toString())); + } else if (entry.getValue().isJsonArray()) { + instance.putAdditionalProperty( + entry.getKey(), + gson.fromJson(entry.getValue(), List.class)); + } else { // JSON object + instance.putAdditionalProperty( + entry.getKey(), + gson.fromJson(entry.getValue(), HashMap.class)); + } + } + } + return instance; + } + }.nullSafe(); + } + } + + /** + * Create an instance of SearchAuthSettingsRequest given an JSON string + * + * @param jsonString JSON string + * @return An instance of SearchAuthSettingsRequest + * @throws IOException if the JSON string is invalid with respect to SearchAuthSettingsRequest + */ + public static SearchAuthSettingsRequest fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, SearchAuthSettingsRequest.class); + } + + /** + * Convert an instance of SearchAuthSettingsRequest to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} diff --git a/sdks/java/src/main/java/com/thoughtspot/client/model/SearchAuthSettingsResponse.java b/sdks/java/src/main/java/com/thoughtspot/client/model/SearchAuthSettingsResponse.java new file mode 100644 index 000000000..bc510bb79 --- /dev/null +++ b/sdks/java/src/main/java/com/thoughtspot/client/model/SearchAuthSettingsResponse.java @@ -0,0 +1,464 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client.model; + +import com.google.gson.Gson; +import com.google.gson.JsonArray; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.TypeAdapter; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.reflect.TypeToken; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import com.thoughtspot.client.JSON; +import java.io.IOException; +import java.io.Serializable; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Objects; +import org.openapitools.jackson.nullable.JsonNullable; + +/** Response for searchAuthSettings. Contains auth type and cluster/org-level preferences. */ +@javax.annotation.Generated( + value = "org.openapitools.codegen.languages.JavaClientCodegen", + comments = "Generator version: 7.12.0") +public class SearchAuthSettingsResponse implements Serializable { + private static final long serialVersionUID = 1L; + + /** Type of authentication mechanism returned. */ + @JsonAdapter(AuthTypeEnum.Adapter.class) + public enum AuthTypeEnum { + TRUSTED_AUTH("TRUSTED_AUTH"); + + private String value; + + AuthTypeEnum(String value) { + this.value = value; + } + + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + public static AuthTypeEnum fromValue(String value) { + for (AuthTypeEnum b : AuthTypeEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + return null; + } + + public static class Adapter extends TypeAdapter { + @Override + public void write(final JsonWriter jsonWriter, final AuthTypeEnum enumeration) + throws IOException { + jsonWriter.value(enumeration.getValue()); + } + + @Override + public AuthTypeEnum read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + return AuthTypeEnum.fromValue(value); + } + } + + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + String value = jsonElement.getAsString(); + AuthTypeEnum.fromValue(value); + } + } + + public static final String SERIALIZED_NAME_AUTH_TYPE = "auth_type"; + + @SerializedName(SERIALIZED_NAME_AUTH_TYPE) + @javax.annotation.Nullable + private AuthTypeEnum authType; + + public static final String SERIALIZED_NAME_CLUSTER_PREFERENCES = "cluster_preferences"; + + @SerializedName(SERIALIZED_NAME_CLUSTER_PREFERENCES) + @javax.annotation.Nullable + private AuthClusterPreferences clusterPreferences; + + public static final String SERIALIZED_NAME_ORG_PREFERENCES = "org_preferences"; + + @SerializedName(SERIALIZED_NAME_ORG_PREFERENCES) + @javax.annotation.Nullable + private List orgPreferences; + + public SearchAuthSettingsResponse() {} + + public SearchAuthSettingsResponse authType(@javax.annotation.Nullable AuthTypeEnum authType) { + this.authType = authType; + return this; + } + + /** + * Type of authentication mechanism returned. + * + * @return authType + */ + @javax.annotation.Nullable + public AuthTypeEnum getAuthType() { + return authType; + } + + public void setAuthType(@javax.annotation.Nullable AuthTypeEnum authType) { + this.authType = authType; + } + + public SearchAuthSettingsResponse clusterPreferences( + @javax.annotation.Nullable AuthClusterPreferences clusterPreferences) { + this.clusterPreferences = clusterPreferences; + return this; + } + + /** + * Get clusterPreferences + * + * @return clusterPreferences + */ + @javax.annotation.Nullable + public AuthClusterPreferences getClusterPreferences() { + return clusterPreferences; + } + + public void setClusterPreferences( + @javax.annotation.Nullable AuthClusterPreferences clusterPreferences) { + this.clusterPreferences = clusterPreferences; + } + + public SearchAuthSettingsResponse orgPreferences( + @javax.annotation.Nullable List orgPreferences) { + this.orgPreferences = orgPreferences; + return this; + } + + public SearchAuthSettingsResponse addOrgPreferencesItem(AuthOrgPreference orgPreferencesItem) { + if (this.orgPreferences == null) { + this.orgPreferences = new ArrayList<>(); + } + this.orgPreferences.add(orgPreferencesItem); + return this; + } + + /** + * Org-level authentication configurations. Present when org scope was requested and per-org + * auth feature is enabled. + * + * @return orgPreferences + */ + @javax.annotation.Nullable + public List getOrgPreferences() { + return orgPreferences; + } + + public void setOrgPreferences( + @javax.annotation.Nullable List orgPreferences) { + this.orgPreferences = orgPreferences; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key name of the property + * @param value value of the property + * @return the SearchAuthSettingsResponse instance itself + */ + public SearchAuthSettingsResponse putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return a map of objects + */ + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key name of the property + * @return an object + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + SearchAuthSettingsResponse searchAuthSettingsResponse = (SearchAuthSettingsResponse) o; + return Objects.equals(this.authType, searchAuthSettingsResponse.authType) + && Objects.equals( + this.clusterPreferences, searchAuthSettingsResponse.clusterPreferences) + && Objects.equals(this.orgPreferences, searchAuthSettingsResponse.orgPreferences) + && Objects.equals( + this.additionalProperties, searchAuthSettingsResponse.additionalProperties); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b + || (a != null + && b != null + && a.isPresent() + && b.isPresent() + && Objects.deepEquals(a.get(), b.get())); + } + + @Override + public int hashCode() { + return Objects.hash(authType, clusterPreferences, orgPreferences, additionalProperties); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; + } + return a.isPresent() ? Arrays.deepHashCode(new Object[] {a.get()}) : 31; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class SearchAuthSettingsResponse {\n"); + sb.append(" authType: ").append(toIndentedString(authType)).append("\n"); + sb.append(" clusterPreferences: ") + .append(toIndentedString(clusterPreferences)) + .append("\n"); + sb.append(" orgPreferences: ").append(toIndentedString(orgPreferences)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first + * line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("auth_type"); + openapiFields.add("cluster_preferences"); + openapiFields.add("org_preferences"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to SearchAuthSettingsResponse + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!SearchAuthSettingsResponse.openapiRequiredFields + .isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException( + String.format( + "The required field(s) %s in SearchAuthSettingsResponse is not" + + " found in the empty JSON string", + SearchAuthSettingsResponse.openapiRequiredFields.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if ((jsonObj.get("auth_type") != null && !jsonObj.get("auth_type").isJsonNull()) + && !jsonObj.get("auth_type").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `auth_type` to be a primitive type in the JSON" + + " string but got `%s`", + jsonObj.get("auth_type").toString())); + } + // validate the optional field `auth_type` + if (jsonObj.get("auth_type") != null && !jsonObj.get("auth_type").isJsonNull()) { + AuthTypeEnum.validateJsonElement(jsonObj.get("auth_type")); + } + // validate the optional field `cluster_preferences` + if (jsonObj.get("cluster_preferences") != null + && !jsonObj.get("cluster_preferences").isJsonNull()) { + AuthClusterPreferences.validateJsonElement(jsonObj.get("cluster_preferences")); + } + if (jsonObj.get("org_preferences") != null + && !jsonObj.get("org_preferences").isJsonNull()) { + JsonArray jsonArrayorgPreferences = jsonObj.getAsJsonArray("org_preferences"); + if (jsonArrayorgPreferences != null) { + // ensure the json data is an array + if (!jsonObj.get("org_preferences").isJsonArray()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `org_preferences` to be an array in the" + + " JSON string but got `%s`", + jsonObj.get("org_preferences").toString())); + } + + // validate the optional field `org_preferences` (array) + for (int i = 0; i < jsonArrayorgPreferences.size(); i++) { + AuthOrgPreference.validateJsonElement(jsonArrayorgPreferences.get(i)); + } + ; + } + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!SearchAuthSettingsResponse.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'SearchAuthSettingsResponse' and its + // subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter = + gson.getDelegateAdapter(this, TypeToken.get(SearchAuthSettingsResponse.class)); + + return (TypeAdapter) + new TypeAdapter() { + @Override + public void write(JsonWriter out, SearchAuthSettingsResponse value) + throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + obj.remove("additionalProperties"); + // serialize additional properties + if (value.getAdditionalProperties() != null) { + for (Map.Entry entry : + value.getAdditionalProperties().entrySet()) { + if (entry.getValue() instanceof String) + obj.addProperty(entry.getKey(), (String) entry.getValue()); + else if (entry.getValue() instanceof Number) + obj.addProperty(entry.getKey(), (Number) entry.getValue()); + else if (entry.getValue() instanceof Boolean) + obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); + else if (entry.getValue() instanceof Character) + obj.addProperty( + entry.getKey(), (Character) entry.getValue()); + else { + JsonElement jsonElement = gson.toJsonTree(entry.getValue()); + if (jsonElement.isJsonArray()) { + obj.add(entry.getKey(), jsonElement.getAsJsonArray()); + } else { + obj.add(entry.getKey(), jsonElement.getAsJsonObject()); + } + } + } + } + elementAdapter.write(out, obj); + } + + @Override + public SearchAuthSettingsResponse read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // store additional fields in the deserialized instance + SearchAuthSettingsResponse instance = thisAdapter.fromJsonTree(jsonObj); + for (Map.Entry entry : jsonObj.entrySet()) { + if (!openapiFields.contains(entry.getKey())) { + if (entry.getValue().isJsonPrimitive()) { // primitive type + if (entry.getValue().getAsJsonPrimitive().isString()) + instance.putAdditionalProperty( + entry.getKey(), entry.getValue().getAsString()); + else if (entry.getValue().getAsJsonPrimitive().isNumber()) + instance.putAdditionalProperty( + entry.getKey(), entry.getValue().getAsNumber()); + else if (entry.getValue().getAsJsonPrimitive().isBoolean()) + instance.putAdditionalProperty( + entry.getKey(), + entry.getValue().getAsBoolean()); + else + throw new IllegalArgumentException( + String.format( + "The field `%s` has unknown primitive" + + " type. Value: %s", + entry.getKey(), + entry.getValue().toString())); + } else if (entry.getValue().isJsonArray()) { + instance.putAdditionalProperty( + entry.getKey(), + gson.fromJson(entry.getValue(), List.class)); + } else { // JSON object + instance.putAdditionalProperty( + entry.getKey(), + gson.fromJson(entry.getValue(), HashMap.class)); + } + } + } + return instance; + } + }.nullSafe(); + } + } + + /** + * Create an instance of SearchAuthSettingsResponse given an JSON string + * + * @param jsonString JSON string + * @return An instance of SearchAuthSettingsResponse + * @throws IOException if the JSON string is invalid with respect to SearchAuthSettingsResponse + */ + public static SearchAuthSettingsResponse fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, SearchAuthSettingsResponse.class); + } + + /** + * Convert an instance of SearchAuthSettingsResponse to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} diff --git a/sdks/java/src/main/java/com/thoughtspot/client/model/SearchCalendarsRequest.java b/sdks/java/src/main/java/com/thoughtspot/client/model/SearchCalendarsRequest.java new file mode 100644 index 000000000..dbc7019ce --- /dev/null +++ b/sdks/java/src/main/java/com/thoughtspot/client/model/SearchCalendarsRequest.java @@ -0,0 +1,427 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client.model; + +import com.google.gson.Gson; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.TypeAdapter; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.annotations.SerializedName; +import com.google.gson.reflect.TypeToken; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import com.thoughtspot.client.JSON; +import java.io.IOException; +import java.io.Serializable; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Objects; + +/** SearchCalendarsRequest */ +@javax.annotation.Generated( + value = "org.openapitools.codegen.languages.JavaClientCodegen", + comments = "Generator version: 7.12.0") +public class SearchCalendarsRequest implements Serializable { + private static final long serialVersionUID = 1L; + + public static final String SERIALIZED_NAME_CONNECTION_IDENTIFIER = "connection_identifier"; + + @SerializedName(SERIALIZED_NAME_CONNECTION_IDENTIFIER) + @javax.annotation.Nullable + private String connectionIdentifier; + + public static final String SERIALIZED_NAME_NAME_PATTERN = "name_pattern"; + + @SerializedName(SERIALIZED_NAME_NAME_PATTERN) + @javax.annotation.Nullable + private String namePattern; + + public static final String SERIALIZED_NAME_RECORD_OFFSET = "record_offset"; + + @SerializedName(SERIALIZED_NAME_RECORD_OFFSET) + @javax.annotation.Nullable + private Integer recordOffset = 0; + + public static final String SERIALIZED_NAME_RECORD_SIZE = "record_size"; + + @SerializedName(SERIALIZED_NAME_RECORD_SIZE) + @javax.annotation.Nullable + private Integer recordSize = 10; + + public static final String SERIALIZED_NAME_SORT_OPTIONS = "sort_options"; + + @SerializedName(SERIALIZED_NAME_SORT_OPTIONS) + @javax.annotation.Nullable + private SortOption sortOptions; + + public SearchCalendarsRequest() {} + + public SearchCalendarsRequest connectionIdentifier( + @javax.annotation.Nullable String connectionIdentifier) { + this.connectionIdentifier = connectionIdentifier; + return this; + } + + /** + * Unique ID or name of the connection. + * + * @return connectionIdentifier + */ + @javax.annotation.Nullable + public String getConnectionIdentifier() { + return connectionIdentifier; + } + + public void setConnectionIdentifier(@javax.annotation.Nullable String connectionIdentifier) { + this.connectionIdentifier = connectionIdentifier; + } + + public SearchCalendarsRequest namePattern(@javax.annotation.Nullable String namePattern) { + this.namePattern = namePattern; + return this; + } + + /** + * Pattern to match for calendar names (use '%' for wildcard match). + * + * @return namePattern + */ + @javax.annotation.Nullable + public String getNamePattern() { + return namePattern; + } + + public void setNamePattern(@javax.annotation.Nullable String namePattern) { + this.namePattern = namePattern; + } + + public SearchCalendarsRequest recordOffset(@javax.annotation.Nullable Integer recordOffset) { + this.recordOffset = recordOffset; + return this; + } + + /** + * The starting record number from where the records should be included. + * + * @return recordOffset + */ + @javax.annotation.Nullable + public Integer getRecordOffset() { + return recordOffset; + } + + public void setRecordOffset(@javax.annotation.Nullable Integer recordOffset) { + this.recordOffset = recordOffset; + } + + public SearchCalendarsRequest recordSize(@javax.annotation.Nullable Integer recordSize) { + this.recordSize = recordSize; + return this; + } + + /** + * The number of records that should be included. + * + * @return recordSize + */ + @javax.annotation.Nullable + public Integer getRecordSize() { + return recordSize; + } + + public void setRecordSize(@javax.annotation.Nullable Integer recordSize) { + this.recordSize = recordSize; + } + + public SearchCalendarsRequest sortOptions(@javax.annotation.Nullable SortOption sortOptions) { + this.sortOptions = sortOptions; + return this; + } + + /** + * Sort options. + * + * @return sortOptions + */ + @javax.annotation.Nullable + public SortOption getSortOptions() { + return sortOptions; + } + + public void setSortOptions(@javax.annotation.Nullable SortOption sortOptions) { + this.sortOptions = sortOptions; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key name of the property + * @param value value of the property + * @return the SearchCalendarsRequest instance itself + */ + public SearchCalendarsRequest putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return a map of objects + */ + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key name of the property + * @return an object + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + SearchCalendarsRequest searchCalendarsRequest = (SearchCalendarsRequest) o; + return Objects.equals( + this.connectionIdentifier, searchCalendarsRequest.connectionIdentifier) + && Objects.equals(this.namePattern, searchCalendarsRequest.namePattern) + && Objects.equals(this.recordOffset, searchCalendarsRequest.recordOffset) + && Objects.equals(this.recordSize, searchCalendarsRequest.recordSize) + && Objects.equals(this.sortOptions, searchCalendarsRequest.sortOptions) + && Objects.equals( + this.additionalProperties, searchCalendarsRequest.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash( + connectionIdentifier, + namePattern, + recordOffset, + recordSize, + sortOptions, + additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class SearchCalendarsRequest {\n"); + sb.append(" connectionIdentifier: ") + .append(toIndentedString(connectionIdentifier)) + .append("\n"); + sb.append(" namePattern: ").append(toIndentedString(namePattern)).append("\n"); + sb.append(" recordOffset: ").append(toIndentedString(recordOffset)).append("\n"); + sb.append(" recordSize: ").append(toIndentedString(recordSize)).append("\n"); + sb.append(" sortOptions: ").append(toIndentedString(sortOptions)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first + * line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("connection_identifier"); + openapiFields.add("name_pattern"); + openapiFields.add("record_offset"); + openapiFields.add("record_size"); + openapiFields.add("sort_options"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to SearchCalendarsRequest + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!SearchCalendarsRequest.openapiRequiredFields + .isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException( + String.format( + "The required field(s) %s in SearchCalendarsRequest is not found" + + " in the empty JSON string", + SearchCalendarsRequest.openapiRequiredFields.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if ((jsonObj.get("connection_identifier") != null + && !jsonObj.get("connection_identifier").isJsonNull()) + && !jsonObj.get("connection_identifier").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `connection_identifier` to be a primitive type in" + + " the JSON string but got `%s`", + jsonObj.get("connection_identifier").toString())); + } + if ((jsonObj.get("name_pattern") != null && !jsonObj.get("name_pattern").isJsonNull()) + && !jsonObj.get("name_pattern").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `name_pattern` to be a primitive type in the JSON" + + " string but got `%s`", + jsonObj.get("name_pattern").toString())); + } + // validate the optional field `sort_options` + if (jsonObj.get("sort_options") != null && !jsonObj.get("sort_options").isJsonNull()) { + SortOption.validateJsonElement(jsonObj.get("sort_options")); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!SearchCalendarsRequest.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'SearchCalendarsRequest' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter = + gson.getDelegateAdapter(this, TypeToken.get(SearchCalendarsRequest.class)); + + return (TypeAdapter) + new TypeAdapter() { + @Override + public void write(JsonWriter out, SearchCalendarsRequest value) + throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + obj.remove("additionalProperties"); + // serialize additional properties + if (value.getAdditionalProperties() != null) { + for (Map.Entry entry : + value.getAdditionalProperties().entrySet()) { + if (entry.getValue() instanceof String) + obj.addProperty(entry.getKey(), (String) entry.getValue()); + else if (entry.getValue() instanceof Number) + obj.addProperty(entry.getKey(), (Number) entry.getValue()); + else if (entry.getValue() instanceof Boolean) + obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); + else if (entry.getValue() instanceof Character) + obj.addProperty( + entry.getKey(), (Character) entry.getValue()); + else { + JsonElement jsonElement = gson.toJsonTree(entry.getValue()); + if (jsonElement.isJsonArray()) { + obj.add(entry.getKey(), jsonElement.getAsJsonArray()); + } else { + obj.add(entry.getKey(), jsonElement.getAsJsonObject()); + } + } + } + } + elementAdapter.write(out, obj); + } + + @Override + public SearchCalendarsRequest read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // store additional fields in the deserialized instance + SearchCalendarsRequest instance = thisAdapter.fromJsonTree(jsonObj); + for (Map.Entry entry : jsonObj.entrySet()) { + if (!openapiFields.contains(entry.getKey())) { + if (entry.getValue().isJsonPrimitive()) { // primitive type + if (entry.getValue().getAsJsonPrimitive().isString()) + instance.putAdditionalProperty( + entry.getKey(), entry.getValue().getAsString()); + else if (entry.getValue().getAsJsonPrimitive().isNumber()) + instance.putAdditionalProperty( + entry.getKey(), entry.getValue().getAsNumber()); + else if (entry.getValue().getAsJsonPrimitive().isBoolean()) + instance.putAdditionalProperty( + entry.getKey(), + entry.getValue().getAsBoolean()); + else + throw new IllegalArgumentException( + String.format( + "The field `%s` has unknown primitive" + + " type. Value: %s", + entry.getKey(), + entry.getValue().toString())); + } else if (entry.getValue().isJsonArray()) { + instance.putAdditionalProperty( + entry.getKey(), + gson.fromJson(entry.getValue(), List.class)); + } else { // JSON object + instance.putAdditionalProperty( + entry.getKey(), + gson.fromJson(entry.getValue(), HashMap.class)); + } + } + } + return instance; + } + }.nullSafe(); + } + } + + /** + * Create an instance of SearchCalendarsRequest given an JSON string + * + * @param jsonString JSON string + * @return An instance of SearchCalendarsRequest + * @throws IOException if the JSON string is invalid with respect to SearchCalendarsRequest + */ + public static SearchCalendarsRequest fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, SearchCalendarsRequest.class); + } + + /** + * Convert an instance of SearchCalendarsRequest to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} diff --git a/sdks/java/src/main/java/com/thoughtspot/client/model/SearchChannelHistoryRequest.java b/sdks/java/src/main/java/com/thoughtspot/client/model/SearchChannelHistoryRequest.java new file mode 100644 index 000000000..e4c9bd3e3 --- /dev/null +++ b/sdks/java/src/main/java/com/thoughtspot/client/model/SearchChannelHistoryRequest.java @@ -0,0 +1,650 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client.model; + +import com.google.gson.Gson; +import com.google.gson.JsonArray; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.TypeAdapter; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.reflect.TypeToken; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import com.thoughtspot.client.JSON; +import java.io.IOException; +import java.io.Serializable; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Objects; + +/** SearchChannelHistoryRequest */ +@javax.annotation.Generated( + value = "org.openapitools.codegen.languages.JavaClientCodegen", + comments = "Generator version: 7.12.0") +public class SearchChannelHistoryRequest implements Serializable { + private static final long serialVersionUID = 1L; + + /** Type of communication channel to search history for. */ + @JsonAdapter(ChannelTypeEnum.Adapter.class) + public enum ChannelTypeEnum { + WEBHOOK("WEBHOOK"); + + private String value; + + ChannelTypeEnum(String value) { + this.value = value; + } + + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + public static ChannelTypeEnum fromValue(String value) { + for (ChannelTypeEnum b : ChannelTypeEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + + public static class Adapter extends TypeAdapter { + @Override + public void write(final JsonWriter jsonWriter, final ChannelTypeEnum enumeration) + throws IOException { + jsonWriter.value(enumeration.getValue()); + } + + @Override + public ChannelTypeEnum read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + return ChannelTypeEnum.fromValue(value); + } + } + + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + String value = jsonElement.getAsString(); + ChannelTypeEnum.fromValue(value); + } + } + + public static final String SERIALIZED_NAME_CHANNEL_TYPE = "channel_type"; + + @SerializedName(SERIALIZED_NAME_CHANNEL_TYPE) + @javax.annotation.Nonnull + private ChannelTypeEnum channelType; + + public static final String SERIALIZED_NAME_JOB_IDS = "job_ids"; + + @SerializedName(SERIALIZED_NAME_JOB_IDS) + @javax.annotation.Nullable + private List jobIds; + + public static final String SERIALIZED_NAME_CHANNEL_IDENTIFIERS = "channel_identifiers"; + + @SerializedName(SERIALIZED_NAME_CHANNEL_IDENTIFIERS) + @javax.annotation.Nullable + private List channelIdentifiers; + + /** Filter by channel delivery status. */ + @JsonAdapter(ChannelStatusEnum.Adapter.class) + public enum ChannelStatusEnum { + PENDING("PENDING"), + + RETRY("RETRY"), + + SUCCESS("SUCCESS"), + + FAILED("FAILED"); + + private String value; + + ChannelStatusEnum(String value) { + this.value = value; + } + + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + public static ChannelStatusEnum fromValue(String value) { + for (ChannelStatusEnum b : ChannelStatusEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + + public static class Adapter extends TypeAdapter { + @Override + public void write(final JsonWriter jsonWriter, final ChannelStatusEnum enumeration) + throws IOException { + jsonWriter.value(enumeration.getValue()); + } + + @Override + public ChannelStatusEnum read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + return ChannelStatusEnum.fromValue(value); + } + } + + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + String value = jsonElement.getAsString(); + ChannelStatusEnum.fromValue(value); + } + } + + public static final String SERIALIZED_NAME_CHANNEL_STATUS = "channel_status"; + + @SerializedName(SERIALIZED_NAME_CHANNEL_STATUS) + @javax.annotation.Nullable + private ChannelStatusEnum channelStatus; + + public static final String SERIALIZED_NAME_EVENTS = "events"; + + @SerializedName(SERIALIZED_NAME_EVENTS) + @javax.annotation.Nullable + private List events; + + public static final String SERIALIZED_NAME_START_EPOCH_TIME_IN_MILLIS = + "start_epoch_time_in_millis"; + + @SerializedName(SERIALIZED_NAME_START_EPOCH_TIME_IN_MILLIS) + @javax.annotation.Nullable + private Float startEpochTimeInMillis; + + public SearchChannelHistoryRequest() {} + + public SearchChannelHistoryRequest channelType( + @javax.annotation.Nonnull ChannelTypeEnum channelType) { + this.channelType = channelType; + return this; + } + + /** + * Type of communication channel to search history for. + * + * @return channelType + */ + @javax.annotation.Nonnull + public ChannelTypeEnum getChannelType() { + return channelType; + } + + public void setChannelType(@javax.annotation.Nonnull ChannelTypeEnum channelType) { + this.channelType = channelType; + } + + public SearchChannelHistoryRequest jobIds(@javax.annotation.Nullable List jobIds) { + this.jobIds = jobIds; + return this; + } + + public SearchChannelHistoryRequest addJobIdsItem(String jobIdsItem) { + if (this.jobIds == null) { + this.jobIds = new ArrayList<>(); + } + this.jobIds.add(jobIdsItem); + return this; + } + + /** + * List of job execution record IDs to retrieve. + * + * @return jobIds + */ + @javax.annotation.Nullable + public List getJobIds() { + return jobIds; + } + + public void setJobIds(@javax.annotation.Nullable List jobIds) { + this.jobIds = jobIds; + } + + public SearchChannelHistoryRequest channelIdentifiers( + @javax.annotation.Nullable List channelIdentifiers) { + this.channelIdentifiers = channelIdentifiers; + return this; + } + + public SearchChannelHistoryRequest addChannelIdentifiersItem(String channelIdentifiersItem) { + if (this.channelIdentifiers == null) { + this.channelIdentifiers = new ArrayList<>(); + } + this.channelIdentifiers.add(channelIdentifiersItem); + return this; + } + + /** + * List of channel IDs or names to filter by. + * + * @return channelIdentifiers + */ + @javax.annotation.Nullable + public List getChannelIdentifiers() { + return channelIdentifiers; + } + + public void setChannelIdentifiers(@javax.annotation.Nullable List channelIdentifiers) { + this.channelIdentifiers = channelIdentifiers; + } + + public SearchChannelHistoryRequest channelStatus( + @javax.annotation.Nullable ChannelStatusEnum channelStatus) { + this.channelStatus = channelStatus; + return this; + } + + /** + * Filter by channel delivery status. + * + * @return channelStatus + */ + @javax.annotation.Nullable + public ChannelStatusEnum getChannelStatus() { + return channelStatus; + } + + public void setChannelStatus(@javax.annotation.Nullable ChannelStatusEnum channelStatus) { + this.channelStatus = channelStatus; + } + + public SearchChannelHistoryRequest events( + @javax.annotation.Nullable List events) { + this.events = events; + return this; + } + + public SearchChannelHistoryRequest addEventsItem(ChannelHistoryEventInput eventsItem) { + if (this.events == null) { + this.events = new ArrayList<>(); + } + this.events.add(eventsItem); + return this; + } + + /** + * Filter by events that triggered the channel. + * + * @return events + */ + @javax.annotation.Nullable + public List getEvents() { + return events; + } + + public void setEvents(@javax.annotation.Nullable List events) { + this.events = events; + } + + public SearchChannelHistoryRequest startEpochTimeInMillis( + @javax.annotation.Nullable Float startEpochTimeInMillis) { + this.startEpochTimeInMillis = startEpochTimeInMillis; + return this; + } + + /** + * Filter records created on or after this time (epoch milliseconds). + * + * @return startEpochTimeInMillis + */ + @javax.annotation.Nullable + public Float getStartEpochTimeInMillis() { + return startEpochTimeInMillis; + } + + public void setStartEpochTimeInMillis(@javax.annotation.Nullable Float startEpochTimeInMillis) { + this.startEpochTimeInMillis = startEpochTimeInMillis; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key name of the property + * @param value value of the property + * @return the SearchChannelHistoryRequest instance itself + */ + public SearchChannelHistoryRequest putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return a map of objects + */ + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key name of the property + * @return an object + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + SearchChannelHistoryRequest searchChannelHistoryRequest = (SearchChannelHistoryRequest) o; + return Objects.equals(this.channelType, searchChannelHistoryRequest.channelType) + && Objects.equals(this.jobIds, searchChannelHistoryRequest.jobIds) + && Objects.equals( + this.channelIdentifiers, searchChannelHistoryRequest.channelIdentifiers) + && Objects.equals(this.channelStatus, searchChannelHistoryRequest.channelStatus) + && Objects.equals(this.events, searchChannelHistoryRequest.events) + && Objects.equals( + this.startEpochTimeInMillis, + searchChannelHistoryRequest.startEpochTimeInMillis) + && Objects.equals( + this.additionalProperties, + searchChannelHistoryRequest.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash( + channelType, + jobIds, + channelIdentifiers, + channelStatus, + events, + startEpochTimeInMillis, + additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class SearchChannelHistoryRequest {\n"); + sb.append(" channelType: ").append(toIndentedString(channelType)).append("\n"); + sb.append(" jobIds: ").append(toIndentedString(jobIds)).append("\n"); + sb.append(" channelIdentifiers: ") + .append(toIndentedString(channelIdentifiers)) + .append("\n"); + sb.append(" channelStatus: ").append(toIndentedString(channelStatus)).append("\n"); + sb.append(" events: ").append(toIndentedString(events)).append("\n"); + sb.append(" startEpochTimeInMillis: ") + .append(toIndentedString(startEpochTimeInMillis)) + .append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first + * line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("channel_type"); + openapiFields.add("job_ids"); + openapiFields.add("channel_identifiers"); + openapiFields.add("channel_status"); + openapiFields.add("events"); + openapiFields.add("start_epoch_time_in_millis"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + openapiRequiredFields.add("channel_type"); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to + * SearchChannelHistoryRequest + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!SearchChannelHistoryRequest.openapiRequiredFields + .isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException( + String.format( + "The required field(s) %s in SearchChannelHistoryRequest is not" + + " found in the empty JSON string", + SearchChannelHistoryRequest.openapiRequiredFields.toString())); + } + } + + // check to make sure all required properties/fields are present in the JSON string + for (String requiredField : SearchChannelHistoryRequest.openapiRequiredFields) { + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException( + String.format( + "The required field `%s` is not found in the JSON string: %s", + requiredField, jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if (!jsonObj.get("channel_type").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `channel_type` to be a primitive type in the JSON" + + " string but got `%s`", + jsonObj.get("channel_type").toString())); + } + // validate the required field `channel_type` + ChannelTypeEnum.validateJsonElement(jsonObj.get("channel_type")); + // ensure the optional json data is an array if present + if (jsonObj.get("job_ids") != null + && !jsonObj.get("job_ids").isJsonNull() + && !jsonObj.get("job_ids").isJsonArray()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `job_ids` to be an array in the JSON string but" + + " got `%s`", + jsonObj.get("job_ids").toString())); + } + // ensure the optional json data is an array if present + if (jsonObj.get("channel_identifiers") != null + && !jsonObj.get("channel_identifiers").isJsonNull() + && !jsonObj.get("channel_identifiers").isJsonArray()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `channel_identifiers` to be an array in the JSON" + + " string but got `%s`", + jsonObj.get("channel_identifiers").toString())); + } + if ((jsonObj.get("channel_status") != null && !jsonObj.get("channel_status").isJsonNull()) + && !jsonObj.get("channel_status").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `channel_status` to be a primitive type in the" + + " JSON string but got `%s`", + jsonObj.get("channel_status").toString())); + } + // validate the optional field `channel_status` + if (jsonObj.get("channel_status") != null && !jsonObj.get("channel_status").isJsonNull()) { + ChannelStatusEnum.validateJsonElement(jsonObj.get("channel_status")); + } + if (jsonObj.get("events") != null && !jsonObj.get("events").isJsonNull()) { + JsonArray jsonArrayevents = jsonObj.getAsJsonArray("events"); + if (jsonArrayevents != null) { + // ensure the json data is an array + if (!jsonObj.get("events").isJsonArray()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `events` to be an array in the JSON string" + + " but got `%s`", + jsonObj.get("events").toString())); + } + + // validate the optional field `events` (array) + for (int i = 0; i < jsonArrayevents.size(); i++) { + ChannelHistoryEventInput.validateJsonElement(jsonArrayevents.get(i)); + } + ; + } + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!SearchChannelHistoryRequest.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'SearchChannelHistoryRequest' and its + // subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter = + gson.getDelegateAdapter(this, TypeToken.get(SearchChannelHistoryRequest.class)); + + return (TypeAdapter) + new TypeAdapter() { + @Override + public void write(JsonWriter out, SearchChannelHistoryRequest value) + throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + obj.remove("additionalProperties"); + // serialize additional properties + if (value.getAdditionalProperties() != null) { + for (Map.Entry entry : + value.getAdditionalProperties().entrySet()) { + if (entry.getValue() instanceof String) + obj.addProperty(entry.getKey(), (String) entry.getValue()); + else if (entry.getValue() instanceof Number) + obj.addProperty(entry.getKey(), (Number) entry.getValue()); + else if (entry.getValue() instanceof Boolean) + obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); + else if (entry.getValue() instanceof Character) + obj.addProperty( + entry.getKey(), (Character) entry.getValue()); + else { + JsonElement jsonElement = gson.toJsonTree(entry.getValue()); + if (jsonElement.isJsonArray()) { + obj.add(entry.getKey(), jsonElement.getAsJsonArray()); + } else { + obj.add(entry.getKey(), jsonElement.getAsJsonObject()); + } + } + } + } + elementAdapter.write(out, obj); + } + + @Override + public SearchChannelHistoryRequest read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // store additional fields in the deserialized instance + SearchChannelHistoryRequest instance = + thisAdapter.fromJsonTree(jsonObj); + for (Map.Entry entry : jsonObj.entrySet()) { + if (!openapiFields.contains(entry.getKey())) { + if (entry.getValue().isJsonPrimitive()) { // primitive type + if (entry.getValue().getAsJsonPrimitive().isString()) + instance.putAdditionalProperty( + entry.getKey(), entry.getValue().getAsString()); + else if (entry.getValue().getAsJsonPrimitive().isNumber()) + instance.putAdditionalProperty( + entry.getKey(), entry.getValue().getAsNumber()); + else if (entry.getValue().getAsJsonPrimitive().isBoolean()) + instance.putAdditionalProperty( + entry.getKey(), + entry.getValue().getAsBoolean()); + else + throw new IllegalArgumentException( + String.format( + "The field `%s` has unknown primitive" + + " type. Value: %s", + entry.getKey(), + entry.getValue().toString())); + } else if (entry.getValue().isJsonArray()) { + instance.putAdditionalProperty( + entry.getKey(), + gson.fromJson(entry.getValue(), List.class)); + } else { // JSON object + instance.putAdditionalProperty( + entry.getKey(), + gson.fromJson(entry.getValue(), HashMap.class)); + } + } + } + return instance; + } + }.nullSafe(); + } + } + + /** + * Create an instance of SearchChannelHistoryRequest given an JSON string + * + * @param jsonString JSON string + * @return An instance of SearchChannelHistoryRequest + * @throws IOException if the JSON string is invalid with respect to SearchChannelHistoryRequest + */ + public static SearchChannelHistoryRequest fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, SearchChannelHistoryRequest.class); + } + + /** + * Convert an instance of SearchChannelHistoryRequest to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} diff --git a/sdks/java/src/main/java/com/thoughtspot/client/model/SearchChannelHistoryResponse.java b/sdks/java/src/main/java/com/thoughtspot/client/model/SearchChannelHistoryResponse.java new file mode 100644 index 000000000..d53fba8cf --- /dev/null +++ b/sdks/java/src/main/java/com/thoughtspot/client/model/SearchChannelHistoryResponse.java @@ -0,0 +1,328 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client.model; + +import com.google.gson.Gson; +import com.google.gson.JsonArray; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.TypeAdapter; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.annotations.SerializedName; +import com.google.gson.reflect.TypeToken; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import com.thoughtspot.client.JSON; +import java.io.IOException; +import java.io.Serializable; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Objects; + +/** Response wrapper for channel delivery history. */ +@javax.annotation.Generated( + value = "org.openapitools.codegen.languages.JavaClientCodegen", + comments = "Generator version: 7.12.0") +public class SearchChannelHistoryResponse implements Serializable { + private static final long serialVersionUID = 1L; + + public static final String SERIALIZED_NAME_JOBS = "jobs"; + + @SerializedName(SERIALIZED_NAME_JOBS) + @javax.annotation.Nonnull + private List jobs; + + public SearchChannelHistoryResponse() {} + + public SearchChannelHistoryResponse jobs( + @javax.annotation.Nonnull List jobs) { + this.jobs = jobs; + return this; + } + + public SearchChannelHistoryResponse addJobsItem(ChannelHistoryJob jobsItem) { + if (this.jobs == null) { + this.jobs = new ArrayList<>(); + } + this.jobs.add(jobsItem); + return this; + } + + /** + * List of job execution records. + * + * @return jobs + */ + @javax.annotation.Nonnull + public List getJobs() { + return jobs; + } + + public void setJobs(@javax.annotation.Nonnull List jobs) { + this.jobs = jobs; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key name of the property + * @param value value of the property + * @return the SearchChannelHistoryResponse instance itself + */ + public SearchChannelHistoryResponse putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return a map of objects + */ + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key name of the property + * @return an object + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + SearchChannelHistoryResponse searchChannelHistoryResponse = + (SearchChannelHistoryResponse) o; + return Objects.equals(this.jobs, searchChannelHistoryResponse.jobs) + && Objects.equals( + this.additionalProperties, + searchChannelHistoryResponse.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(jobs, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class SearchChannelHistoryResponse {\n"); + sb.append(" jobs: ").append(toIndentedString(jobs)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first + * line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("jobs"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + openapiRequiredFields.add("jobs"); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to + * SearchChannelHistoryResponse + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!SearchChannelHistoryResponse.openapiRequiredFields + .isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException( + String.format( + "The required field(s) %s in SearchChannelHistoryResponse is not" + + " found in the empty JSON string", + SearchChannelHistoryResponse.openapiRequiredFields.toString())); + } + } + + // check to make sure all required properties/fields are present in the JSON string + for (String requiredField : SearchChannelHistoryResponse.openapiRequiredFields) { + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException( + String.format( + "The required field `%s` is not found in the JSON string: %s", + requiredField, jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // ensure the json data is an array + if (!jsonObj.get("jobs").isJsonArray()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `jobs` to be an array in the JSON string but got" + + " `%s`", + jsonObj.get("jobs").toString())); + } + + JsonArray jsonArrayjobs = jsonObj.getAsJsonArray("jobs"); + // validate the required field `jobs` (array) + for (int i = 0; i < jsonArrayjobs.size(); i++) { + ChannelHistoryJob.validateJsonElement(jsonArrayjobs.get(i)); + } + ; + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!SearchChannelHistoryResponse.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'SearchChannelHistoryResponse' and its + // subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter = + gson.getDelegateAdapter( + this, TypeToken.get(SearchChannelHistoryResponse.class)); + + return (TypeAdapter) + new TypeAdapter() { + @Override + public void write(JsonWriter out, SearchChannelHistoryResponse value) + throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + obj.remove("additionalProperties"); + // serialize additional properties + if (value.getAdditionalProperties() != null) { + for (Map.Entry entry : + value.getAdditionalProperties().entrySet()) { + if (entry.getValue() instanceof String) + obj.addProperty(entry.getKey(), (String) entry.getValue()); + else if (entry.getValue() instanceof Number) + obj.addProperty(entry.getKey(), (Number) entry.getValue()); + else if (entry.getValue() instanceof Boolean) + obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); + else if (entry.getValue() instanceof Character) + obj.addProperty( + entry.getKey(), (Character) entry.getValue()); + else { + JsonElement jsonElement = gson.toJsonTree(entry.getValue()); + if (jsonElement.isJsonArray()) { + obj.add(entry.getKey(), jsonElement.getAsJsonArray()); + } else { + obj.add(entry.getKey(), jsonElement.getAsJsonObject()); + } + } + } + } + elementAdapter.write(out, obj); + } + + @Override + public SearchChannelHistoryResponse read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // store additional fields in the deserialized instance + SearchChannelHistoryResponse instance = + thisAdapter.fromJsonTree(jsonObj); + for (Map.Entry entry : jsonObj.entrySet()) { + if (!openapiFields.contains(entry.getKey())) { + if (entry.getValue().isJsonPrimitive()) { // primitive type + if (entry.getValue().getAsJsonPrimitive().isString()) + instance.putAdditionalProperty( + entry.getKey(), entry.getValue().getAsString()); + else if (entry.getValue().getAsJsonPrimitive().isNumber()) + instance.putAdditionalProperty( + entry.getKey(), entry.getValue().getAsNumber()); + else if (entry.getValue().getAsJsonPrimitive().isBoolean()) + instance.putAdditionalProperty( + entry.getKey(), + entry.getValue().getAsBoolean()); + else + throw new IllegalArgumentException( + String.format( + "The field `%s` has unknown primitive" + + " type. Value: %s", + entry.getKey(), + entry.getValue().toString())); + } else if (entry.getValue().isJsonArray()) { + instance.putAdditionalProperty( + entry.getKey(), + gson.fromJson(entry.getValue(), List.class)); + } else { // JSON object + instance.putAdditionalProperty( + entry.getKey(), + gson.fromJson(entry.getValue(), HashMap.class)); + } + } + } + return instance; + } + }.nullSafe(); + } + } + + /** + * Create an instance of SearchChannelHistoryResponse given an JSON string + * + * @param jsonString JSON string + * @return An instance of SearchChannelHistoryResponse + * @throws IOException if the JSON string is invalid with respect to + * SearchChannelHistoryResponse + */ + public static SearchChannelHistoryResponse fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, SearchChannelHistoryResponse.class); + } + + /** + * Convert an instance of SearchChannelHistoryResponse to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} diff --git a/sdks/java/src/main/java/com/thoughtspot/client/model/SearchCollectionsRequest.java b/sdks/java/src/main/java/com/thoughtspot/client/model/SearchCollectionsRequest.java new file mode 100644 index 000000000..806d4ab4e --- /dev/null +++ b/sdks/java/src/main/java/com/thoughtspot/client/model/SearchCollectionsRequest.java @@ -0,0 +1,546 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client.model; + +import com.google.gson.Gson; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.TypeAdapter; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.annotations.SerializedName; +import com.google.gson.reflect.TypeToken; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import com.thoughtspot.client.JSON; +import java.io.IOException; +import java.io.Serializable; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Objects; +import org.openapitools.jackson.nullable.JsonNullable; + +/** SearchCollectionsRequest */ +@javax.annotation.Generated( + value = "org.openapitools.codegen.languages.JavaClientCodegen", + comments = "Generator version: 7.12.0") +public class SearchCollectionsRequest implements Serializable { + private static final long serialVersionUID = 1L; + + public static final String SERIALIZED_NAME_NAME_PATTERN = "name_pattern"; + + @SerializedName(SERIALIZED_NAME_NAME_PATTERN) + @javax.annotation.Nullable + private String namePattern; + + public static final String SERIALIZED_NAME_RECORD_OFFSET = "record_offset"; + + @SerializedName(SERIALIZED_NAME_RECORD_OFFSET) + @javax.annotation.Nullable + private Integer recordOffset = 0; + + public static final String SERIALIZED_NAME_RECORD_SIZE = "record_size"; + + @SerializedName(SERIALIZED_NAME_RECORD_SIZE) + @javax.annotation.Nullable + private Integer recordSize = 10; + + public static final String SERIALIZED_NAME_COLLECTION_IDENTIFIERS = "collection_identifiers"; + + @SerializedName(SERIALIZED_NAME_COLLECTION_IDENTIFIERS) + @javax.annotation.Nullable + private List collectionIdentifiers; + + public static final String SERIALIZED_NAME_CREATED_BY_USER_IDENTIFIERS = + "created_by_user_identifiers"; + + @SerializedName(SERIALIZED_NAME_CREATED_BY_USER_IDENTIFIERS) + @javax.annotation.Nullable + private List createdByUserIdentifiers; + + public static final String SERIALIZED_NAME_INCLUDE_METADATA = "include_metadata"; + + @SerializedName(SERIALIZED_NAME_INCLUDE_METADATA) + @javax.annotation.Nullable + private Boolean includeMetadata = false; + + public static final String SERIALIZED_NAME_SORT_OPTIONS = "sort_options"; + + @SerializedName(SERIALIZED_NAME_SORT_OPTIONS) + @javax.annotation.Nullable + private SortOptions sortOptions; + + public SearchCollectionsRequest() {} + + public SearchCollectionsRequest namePattern(@javax.annotation.Nullable String namePattern) { + this.namePattern = namePattern; + return this; + } + + /** + * A pattern to match case-insensitive name of the Collection object. Use '%' for + * wildcard match. + * + * @return namePattern + */ + @javax.annotation.Nullable + public String getNamePattern() { + return namePattern; + } + + public void setNamePattern(@javax.annotation.Nullable String namePattern) { + this.namePattern = namePattern; + } + + public SearchCollectionsRequest recordOffset(@javax.annotation.Nullable Integer recordOffset) { + this.recordOffset = recordOffset; + return this; + } + + /** + * The starting record number from where the records should be included. + * + * @return recordOffset + */ + @javax.annotation.Nullable + public Integer getRecordOffset() { + return recordOffset; + } + + public void setRecordOffset(@javax.annotation.Nullable Integer recordOffset) { + this.recordOffset = recordOffset; + } + + public SearchCollectionsRequest recordSize(@javax.annotation.Nullable Integer recordSize) { + this.recordSize = recordSize; + return this; + } + + /** + * The number of records that should be included. -1 implies no pagination. + * + * @return recordSize + */ + @javax.annotation.Nullable + public Integer getRecordSize() { + return recordSize; + } + + public void setRecordSize(@javax.annotation.Nullable Integer recordSize) { + this.recordSize = recordSize; + } + + public SearchCollectionsRequest collectionIdentifiers( + @javax.annotation.Nullable List collectionIdentifiers) { + this.collectionIdentifiers = collectionIdentifiers; + return this; + } + + public SearchCollectionsRequest addCollectionIdentifiersItem(String collectionIdentifiersItem) { + if (this.collectionIdentifiers == null) { + this.collectionIdentifiers = new ArrayList<>(); + } + this.collectionIdentifiers.add(collectionIdentifiersItem); + return this; + } + + /** + * Unique GUIDs of collections to search. Note: Collection names cannot be used as identifiers + * since duplicate names are allowed. + * + * @return collectionIdentifiers + */ + @javax.annotation.Nullable + public List getCollectionIdentifiers() { + return collectionIdentifiers; + } + + public void setCollectionIdentifiers( + @javax.annotation.Nullable List collectionIdentifiers) { + this.collectionIdentifiers = collectionIdentifiers; + } + + public SearchCollectionsRequest createdByUserIdentifiers( + @javax.annotation.Nullable List createdByUserIdentifiers) { + this.createdByUserIdentifiers = createdByUserIdentifiers; + return this; + } + + public SearchCollectionsRequest addCreatedByUserIdentifiersItem( + String createdByUserIdentifiersItem) { + if (this.createdByUserIdentifiers == null) { + this.createdByUserIdentifiers = new ArrayList<>(); + } + this.createdByUserIdentifiers.add(createdByUserIdentifiersItem); + return this; + } + + /** + * Filter collections by author. Provide unique IDs or names of users who created the + * collections. + * + * @return createdByUserIdentifiers + */ + @javax.annotation.Nullable + public List getCreatedByUserIdentifiers() { + return createdByUserIdentifiers; + } + + public void setCreatedByUserIdentifiers( + @javax.annotation.Nullable List createdByUserIdentifiers) { + this.createdByUserIdentifiers = createdByUserIdentifiers; + } + + public SearchCollectionsRequest includeMetadata( + @javax.annotation.Nullable Boolean includeMetadata) { + this.includeMetadata = includeMetadata; + return this; + } + + /** + * Include collection metadata items in the response. + * + * @return includeMetadata + */ + @javax.annotation.Nullable + public Boolean getIncludeMetadata() { + return includeMetadata; + } + + public void setIncludeMetadata(@javax.annotation.Nullable Boolean includeMetadata) { + this.includeMetadata = includeMetadata; + } + + public SearchCollectionsRequest sortOptions( + @javax.annotation.Nullable SortOptions sortOptions) { + this.sortOptions = sortOptions; + return this; + } + + /** + * Sort options. + * + * @return sortOptions + */ + @javax.annotation.Nullable + public SortOptions getSortOptions() { + return sortOptions; + } + + public void setSortOptions(@javax.annotation.Nullable SortOptions sortOptions) { + this.sortOptions = sortOptions; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key name of the property + * @param value value of the property + * @return the SearchCollectionsRequest instance itself + */ + public SearchCollectionsRequest putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return a map of objects + */ + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key name of the property + * @return an object + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + SearchCollectionsRequest searchCollectionsRequest = (SearchCollectionsRequest) o; + return Objects.equals(this.namePattern, searchCollectionsRequest.namePattern) + && Objects.equals(this.recordOffset, searchCollectionsRequest.recordOffset) + && Objects.equals(this.recordSize, searchCollectionsRequest.recordSize) + && Objects.equals( + this.collectionIdentifiers, searchCollectionsRequest.collectionIdentifiers) + && Objects.equals( + this.createdByUserIdentifiers, + searchCollectionsRequest.createdByUserIdentifiers) + && Objects.equals(this.includeMetadata, searchCollectionsRequest.includeMetadata) + && Objects.equals(this.sortOptions, searchCollectionsRequest.sortOptions) + && Objects.equals( + this.additionalProperties, searchCollectionsRequest.additionalProperties); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b + || (a != null + && b != null + && a.isPresent() + && b.isPresent() + && Objects.deepEquals(a.get(), b.get())); + } + + @Override + public int hashCode() { + return Objects.hash( + namePattern, + recordOffset, + recordSize, + collectionIdentifiers, + createdByUserIdentifiers, + includeMetadata, + sortOptions, + additionalProperties); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; + } + return a.isPresent() ? Arrays.deepHashCode(new Object[] {a.get()}) : 31; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class SearchCollectionsRequest {\n"); + sb.append(" namePattern: ").append(toIndentedString(namePattern)).append("\n"); + sb.append(" recordOffset: ").append(toIndentedString(recordOffset)).append("\n"); + sb.append(" recordSize: ").append(toIndentedString(recordSize)).append("\n"); + sb.append(" collectionIdentifiers: ") + .append(toIndentedString(collectionIdentifiers)) + .append("\n"); + sb.append(" createdByUserIdentifiers: ") + .append(toIndentedString(createdByUserIdentifiers)) + .append("\n"); + sb.append(" includeMetadata: ").append(toIndentedString(includeMetadata)).append("\n"); + sb.append(" sortOptions: ").append(toIndentedString(sortOptions)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first + * line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("name_pattern"); + openapiFields.add("record_offset"); + openapiFields.add("record_size"); + openapiFields.add("collection_identifiers"); + openapiFields.add("created_by_user_identifiers"); + openapiFields.add("include_metadata"); + openapiFields.add("sort_options"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to SearchCollectionsRequest + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!SearchCollectionsRequest.openapiRequiredFields + .isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException( + String.format( + "The required field(s) %s in SearchCollectionsRequest is not found" + + " in the empty JSON string", + SearchCollectionsRequest.openapiRequiredFields.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if ((jsonObj.get("name_pattern") != null && !jsonObj.get("name_pattern").isJsonNull()) + && !jsonObj.get("name_pattern").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `name_pattern` to be a primitive type in the JSON" + + " string but got `%s`", + jsonObj.get("name_pattern").toString())); + } + // ensure the optional json data is an array if present + if (jsonObj.get("collection_identifiers") != null + && !jsonObj.get("collection_identifiers").isJsonNull() + && !jsonObj.get("collection_identifiers").isJsonArray()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `collection_identifiers` to be an array in the" + + " JSON string but got `%s`", + jsonObj.get("collection_identifiers").toString())); + } + // ensure the optional json data is an array if present + if (jsonObj.get("created_by_user_identifiers") != null + && !jsonObj.get("created_by_user_identifiers").isJsonNull() + && !jsonObj.get("created_by_user_identifiers").isJsonArray()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `created_by_user_identifiers` to be an array in" + + " the JSON string but got `%s`", + jsonObj.get("created_by_user_identifiers").toString())); + } + // validate the optional field `sort_options` + if (jsonObj.get("sort_options") != null && !jsonObj.get("sort_options").isJsonNull()) { + SortOptions.validateJsonElement(jsonObj.get("sort_options")); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!SearchCollectionsRequest.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'SearchCollectionsRequest' and its + // subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter = + gson.getDelegateAdapter(this, TypeToken.get(SearchCollectionsRequest.class)); + + return (TypeAdapter) + new TypeAdapter() { + @Override + public void write(JsonWriter out, SearchCollectionsRequest value) + throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + obj.remove("additionalProperties"); + // serialize additional properties + if (value.getAdditionalProperties() != null) { + for (Map.Entry entry : + value.getAdditionalProperties().entrySet()) { + if (entry.getValue() instanceof String) + obj.addProperty(entry.getKey(), (String) entry.getValue()); + else if (entry.getValue() instanceof Number) + obj.addProperty(entry.getKey(), (Number) entry.getValue()); + else if (entry.getValue() instanceof Boolean) + obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); + else if (entry.getValue() instanceof Character) + obj.addProperty( + entry.getKey(), (Character) entry.getValue()); + else { + JsonElement jsonElement = gson.toJsonTree(entry.getValue()); + if (jsonElement.isJsonArray()) { + obj.add(entry.getKey(), jsonElement.getAsJsonArray()); + } else { + obj.add(entry.getKey(), jsonElement.getAsJsonObject()); + } + } + } + } + elementAdapter.write(out, obj); + } + + @Override + public SearchCollectionsRequest read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // store additional fields in the deserialized instance + SearchCollectionsRequest instance = thisAdapter.fromJsonTree(jsonObj); + for (Map.Entry entry : jsonObj.entrySet()) { + if (!openapiFields.contains(entry.getKey())) { + if (entry.getValue().isJsonPrimitive()) { // primitive type + if (entry.getValue().getAsJsonPrimitive().isString()) + instance.putAdditionalProperty( + entry.getKey(), entry.getValue().getAsString()); + else if (entry.getValue().getAsJsonPrimitive().isNumber()) + instance.putAdditionalProperty( + entry.getKey(), entry.getValue().getAsNumber()); + else if (entry.getValue().getAsJsonPrimitive().isBoolean()) + instance.putAdditionalProperty( + entry.getKey(), + entry.getValue().getAsBoolean()); + else + throw new IllegalArgumentException( + String.format( + "The field `%s` has unknown primitive" + + " type. Value: %s", + entry.getKey(), + entry.getValue().toString())); + } else if (entry.getValue().isJsonArray()) { + instance.putAdditionalProperty( + entry.getKey(), + gson.fromJson(entry.getValue(), List.class)); + } else { // JSON object + instance.putAdditionalProperty( + entry.getKey(), + gson.fromJson(entry.getValue(), HashMap.class)); + } + } + } + return instance; + } + }.nullSafe(); + } + } + + /** + * Create an instance of SearchCollectionsRequest given an JSON string + * + * @param jsonString JSON string + * @return An instance of SearchCollectionsRequest + * @throws IOException if the JSON string is invalid with respect to SearchCollectionsRequest + */ + public static SearchCollectionsRequest fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, SearchCollectionsRequest.class); + } + + /** + * Convert an instance of SearchCollectionsRequest to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} diff --git a/sdks/java/src/main/java/com/thoughtspot/client/model/SearchCommitsRequest.java b/sdks/java/src/main/java/com/thoughtspot/client/model/SearchCommitsRequest.java new file mode 100644 index 000000000..ffbeb065b --- /dev/null +++ b/sdks/java/src/main/java/com/thoughtspot/client/model/SearchCommitsRequest.java @@ -0,0 +1,503 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client.model; + +import com.google.gson.Gson; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.TypeAdapter; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.reflect.TypeToken; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import com.thoughtspot.client.JSON; +import java.io.IOException; +import java.io.Serializable; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Objects; + +/** SearchCommitsRequest */ +@javax.annotation.Generated( + value = "org.openapitools.codegen.languages.JavaClientCodegen", + comments = "Generator version: 7.12.0") +public class SearchCommitsRequest implements Serializable { + private static final long serialVersionUID = 1L; + + public static final String SERIALIZED_NAME_METADATA_IDENTIFIER = "metadata_identifier"; + + @SerializedName(SERIALIZED_NAME_METADATA_IDENTIFIER) + @javax.annotation.Nonnull + private String metadataIdentifier; + + /** Type of metadata. */ + @JsonAdapter(MetadataTypeEnum.Adapter.class) + public enum MetadataTypeEnum { + LIVEBOARD("LIVEBOARD"), + + ANSWER("ANSWER"), + + LOGICAL_TABLE("LOGICAL_TABLE"), + + CUSTOM_ACTION("CUSTOM_ACTION"); + + private String value; + + MetadataTypeEnum(String value) { + this.value = value; + } + + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + public static MetadataTypeEnum fromValue(String value) { + for (MetadataTypeEnum b : MetadataTypeEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + + public static class Adapter extends TypeAdapter { + @Override + public void write(final JsonWriter jsonWriter, final MetadataTypeEnum enumeration) + throws IOException { + jsonWriter.value(enumeration.getValue()); + } + + @Override + public MetadataTypeEnum read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + return MetadataTypeEnum.fromValue(value); + } + } + + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + String value = jsonElement.getAsString(); + MetadataTypeEnum.fromValue(value); + } + } + + public static final String SERIALIZED_NAME_METADATA_TYPE = "metadata_type"; + + @SerializedName(SERIALIZED_NAME_METADATA_TYPE) + @javax.annotation.Nullable + private MetadataTypeEnum metadataType; + + public static final String SERIALIZED_NAME_BRANCH_NAME = "branch_name"; + + @SerializedName(SERIALIZED_NAME_BRANCH_NAME) + @javax.annotation.Nullable + private String branchName; + + public static final String SERIALIZED_NAME_RECORD_OFFSET = "record_offset"; + + @SerializedName(SERIALIZED_NAME_RECORD_OFFSET) + @javax.annotation.Nullable + private Integer recordOffset; + + public static final String SERIALIZED_NAME_RECORD_SIZE = "record_size"; + + @SerializedName(SERIALIZED_NAME_RECORD_SIZE) + @javax.annotation.Nullable + private Integer recordSize; + + public SearchCommitsRequest() {} + + public SearchCommitsRequest metadataIdentifier( + @javax.annotation.Nonnull String metadataIdentifier) { + this.metadataIdentifier = metadataIdentifier; + return this; + } + + /** + * Unique ID or name of the metadata. + * + * @return metadataIdentifier + */ + @javax.annotation.Nonnull + public String getMetadataIdentifier() { + return metadataIdentifier; + } + + public void setMetadataIdentifier(@javax.annotation.Nonnull String metadataIdentifier) { + this.metadataIdentifier = metadataIdentifier; + } + + public SearchCommitsRequest metadataType( + @javax.annotation.Nullable MetadataTypeEnum metadataType) { + this.metadataType = metadataType; + return this; + } + + /** + * Type of metadata. + * + * @return metadataType + */ + @javax.annotation.Nullable + public MetadataTypeEnum getMetadataType() { + return metadataType; + } + + public void setMetadataType(@javax.annotation.Nullable MetadataTypeEnum metadataType) { + this.metadataType = metadataType; + } + + public SearchCommitsRequest branchName(@javax.annotation.Nullable String branchName) { + this.branchName = branchName; + return this; + } + + /** + * Name of the branch from which commit history needs to be displayed. Note: If no branch_name + * is specified, then commits will be returned for the default branch for this configuration. + * + * @return branchName + */ + @javax.annotation.Nullable + public String getBranchName() { + return branchName; + } + + public void setBranchName(@javax.annotation.Nullable String branchName) { + this.branchName = branchName; + } + + public SearchCommitsRequest recordOffset(@javax.annotation.Nullable Integer recordOffset) { + this.recordOffset = recordOffset; + return this; + } + + /** + * Record offset point in the commit history to display the response. Note: If no record offset + * is specified, the beginning of the record will be considered. + * + * @return recordOffset + */ + @javax.annotation.Nullable + public Integer getRecordOffset() { + return recordOffset; + } + + public void setRecordOffset(@javax.annotation.Nullable Integer recordOffset) { + this.recordOffset = recordOffset; + } + + public SearchCommitsRequest recordSize(@javax.annotation.Nullable Integer recordSize) { + this.recordSize = recordSize; + return this; + } + + /** + * Number of history records from record offset point to be displayed in the response. Note: If + * no record size is specified, then all the records will be considered. + * + * @return recordSize + */ + @javax.annotation.Nullable + public Integer getRecordSize() { + return recordSize; + } + + public void setRecordSize(@javax.annotation.Nullable Integer recordSize) { + this.recordSize = recordSize; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key name of the property + * @param value value of the property + * @return the SearchCommitsRequest instance itself + */ + public SearchCommitsRequest putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return a map of objects + */ + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key name of the property + * @return an object + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + SearchCommitsRequest searchCommitsRequest = (SearchCommitsRequest) o; + return Objects.equals(this.metadataIdentifier, searchCommitsRequest.metadataIdentifier) + && Objects.equals(this.metadataType, searchCommitsRequest.metadataType) + && Objects.equals(this.branchName, searchCommitsRequest.branchName) + && Objects.equals(this.recordOffset, searchCommitsRequest.recordOffset) + && Objects.equals(this.recordSize, searchCommitsRequest.recordSize) + && Objects.equals( + this.additionalProperties, searchCommitsRequest.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash( + metadataIdentifier, + metadataType, + branchName, + recordOffset, + recordSize, + additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class SearchCommitsRequest {\n"); + sb.append(" metadataIdentifier: ") + .append(toIndentedString(metadataIdentifier)) + .append("\n"); + sb.append(" metadataType: ").append(toIndentedString(metadataType)).append("\n"); + sb.append(" branchName: ").append(toIndentedString(branchName)).append("\n"); + sb.append(" recordOffset: ").append(toIndentedString(recordOffset)).append("\n"); + sb.append(" recordSize: ").append(toIndentedString(recordSize)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first + * line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("metadata_identifier"); + openapiFields.add("metadata_type"); + openapiFields.add("branch_name"); + openapiFields.add("record_offset"); + openapiFields.add("record_size"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + openapiRequiredFields.add("metadata_identifier"); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to SearchCommitsRequest + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!SearchCommitsRequest.openapiRequiredFields + .isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException( + String.format( + "The required field(s) %s in SearchCommitsRequest is not found in" + + " the empty JSON string", + SearchCommitsRequest.openapiRequiredFields.toString())); + } + } + + // check to make sure all required properties/fields are present in the JSON string + for (String requiredField : SearchCommitsRequest.openapiRequiredFields) { + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException( + String.format( + "The required field `%s` is not found in the JSON string: %s", + requiredField, jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if (!jsonObj.get("metadata_identifier").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `metadata_identifier` to be a primitive type in" + + " the JSON string but got `%s`", + jsonObj.get("metadata_identifier").toString())); + } + if ((jsonObj.get("metadata_type") != null && !jsonObj.get("metadata_type").isJsonNull()) + && !jsonObj.get("metadata_type").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `metadata_type` to be a primitive type in the JSON" + + " string but got `%s`", + jsonObj.get("metadata_type").toString())); + } + // validate the optional field `metadata_type` + if (jsonObj.get("metadata_type") != null && !jsonObj.get("metadata_type").isJsonNull()) { + MetadataTypeEnum.validateJsonElement(jsonObj.get("metadata_type")); + } + if ((jsonObj.get("branch_name") != null && !jsonObj.get("branch_name").isJsonNull()) + && !jsonObj.get("branch_name").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `branch_name` to be a primitive type in the JSON" + + " string but got `%s`", + jsonObj.get("branch_name").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!SearchCommitsRequest.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'SearchCommitsRequest' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter = + gson.getDelegateAdapter(this, TypeToken.get(SearchCommitsRequest.class)); + + return (TypeAdapter) + new TypeAdapter() { + @Override + public void write(JsonWriter out, SearchCommitsRequest value) + throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + obj.remove("additionalProperties"); + // serialize additional properties + if (value.getAdditionalProperties() != null) { + for (Map.Entry entry : + value.getAdditionalProperties().entrySet()) { + if (entry.getValue() instanceof String) + obj.addProperty(entry.getKey(), (String) entry.getValue()); + else if (entry.getValue() instanceof Number) + obj.addProperty(entry.getKey(), (Number) entry.getValue()); + else if (entry.getValue() instanceof Boolean) + obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); + else if (entry.getValue() instanceof Character) + obj.addProperty( + entry.getKey(), (Character) entry.getValue()); + else { + JsonElement jsonElement = gson.toJsonTree(entry.getValue()); + if (jsonElement.isJsonArray()) { + obj.add(entry.getKey(), jsonElement.getAsJsonArray()); + } else { + obj.add(entry.getKey(), jsonElement.getAsJsonObject()); + } + } + } + } + elementAdapter.write(out, obj); + } + + @Override + public SearchCommitsRequest read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // store additional fields in the deserialized instance + SearchCommitsRequest instance = thisAdapter.fromJsonTree(jsonObj); + for (Map.Entry entry : jsonObj.entrySet()) { + if (!openapiFields.contains(entry.getKey())) { + if (entry.getValue().isJsonPrimitive()) { // primitive type + if (entry.getValue().getAsJsonPrimitive().isString()) + instance.putAdditionalProperty( + entry.getKey(), entry.getValue().getAsString()); + else if (entry.getValue().getAsJsonPrimitive().isNumber()) + instance.putAdditionalProperty( + entry.getKey(), entry.getValue().getAsNumber()); + else if (entry.getValue().getAsJsonPrimitive().isBoolean()) + instance.putAdditionalProperty( + entry.getKey(), + entry.getValue().getAsBoolean()); + else + throw new IllegalArgumentException( + String.format( + "The field `%s` has unknown primitive" + + " type. Value: %s", + entry.getKey(), + entry.getValue().toString())); + } else if (entry.getValue().isJsonArray()) { + instance.putAdditionalProperty( + entry.getKey(), + gson.fromJson(entry.getValue(), List.class)); + } else { // JSON object + instance.putAdditionalProperty( + entry.getKey(), + gson.fromJson(entry.getValue(), HashMap.class)); + } + } + } + return instance; + } + }.nullSafe(); + } + } + + /** + * Create an instance of SearchCommitsRequest given an JSON string + * + * @param jsonString JSON string + * @return An instance of SearchCommitsRequest + * @throws IOException if the JSON string is invalid with respect to SearchCommitsRequest + */ + public static SearchCommitsRequest fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, SearchCommitsRequest.class); + } + + /** + * Convert an instance of SearchCommitsRequest to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} diff --git a/sdks/java/src/main/java/com/thoughtspot/client/model/SearchCommunicationChannelPreferencesRequest.java b/sdks/java/src/main/java/com/thoughtspot/client/model/SearchCommunicationChannelPreferencesRequest.java new file mode 100644 index 000000000..d89b34634 --- /dev/null +++ b/sdks/java/src/main/java/com/thoughtspot/client/model/SearchCommunicationChannelPreferencesRequest.java @@ -0,0 +1,439 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client.model; + +import com.google.gson.Gson; +import com.google.gson.JsonArray; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.TypeAdapter; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.reflect.TypeToken; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import com.thoughtspot.client.JSON; +import java.io.IOException; +import java.io.Serializable; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Objects; + +/** SearchCommunicationChannelPreferencesRequest */ +@javax.annotation.Generated( + value = "org.openapitools.codegen.languages.JavaClientCodegen", + comments = "Generator version: 7.12.0") +public class SearchCommunicationChannelPreferencesRequest implements Serializable { + private static final long serialVersionUID = 1L; + + /** Gets or Sets clusterPreferences */ + @JsonAdapter(ClusterPreferencesEnum.Adapter.class) + public enum ClusterPreferencesEnum { + LIVEBOARD_SCHEDULE("LIVEBOARD_SCHEDULE"); + + private String value; + + ClusterPreferencesEnum(String value) { + this.value = value; + } + + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + public static ClusterPreferencesEnum fromValue(String value) { + for (ClusterPreferencesEnum b : ClusterPreferencesEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + + public static class Adapter extends TypeAdapter { + @Override + public void write(final JsonWriter jsonWriter, final ClusterPreferencesEnum enumeration) + throws IOException { + jsonWriter.value(enumeration.getValue()); + } + + @Override + public ClusterPreferencesEnum read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + return ClusterPreferencesEnum.fromValue(value); + } + } + + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + String value = jsonElement.getAsString(); + ClusterPreferencesEnum.fromValue(value); + } + } + + public static final String SERIALIZED_NAME_CLUSTER_PREFERENCES = "cluster_preferences"; + + @SerializedName(SERIALIZED_NAME_CLUSTER_PREFERENCES) + @javax.annotation.Nullable + private List clusterPreferences; + + public static final String SERIALIZED_NAME_ORG_PREFERENCES = "org_preferences"; + + @SerializedName(SERIALIZED_NAME_ORG_PREFERENCES) + @javax.annotation.Nullable + private List orgPreferences; + + public SearchCommunicationChannelPreferencesRequest() {} + + public SearchCommunicationChannelPreferencesRequest clusterPreferences( + @javax.annotation.Nullable List clusterPreferences) { + this.clusterPreferences = clusterPreferences; + return this; + } + + public SearchCommunicationChannelPreferencesRequest addClusterPreferencesItem( + ClusterPreferencesEnum clusterPreferencesItem) { + if (this.clusterPreferences == null) { + this.clusterPreferences = new ArrayList<>(); + } + this.clusterPreferences.add(clusterPreferencesItem); + return this; + } + + /** + * Event types to search for in cluster-level preferences. + * + * @return clusterPreferences + */ + @javax.annotation.Nullable + public List getClusterPreferences() { + return clusterPreferences; + } + + public void setClusterPreferences( + @javax.annotation.Nullable List clusterPreferences) { + this.clusterPreferences = clusterPreferences; + } + + public SearchCommunicationChannelPreferencesRequest orgPreferences( + @javax.annotation.Nullable List orgPreferences) { + this.orgPreferences = orgPreferences; + return this; + } + + public SearchCommunicationChannelPreferencesRequest addOrgPreferencesItem( + OrgPreferenceSearchCriteriaInput orgPreferencesItem) { + if (this.orgPreferences == null) { + this.orgPreferences = new ArrayList<>(); + } + this.orgPreferences.add(orgPreferencesItem); + return this; + } + + /** + * Org-specific search criteria. + * + * @return orgPreferences + */ + @javax.annotation.Nullable + public List getOrgPreferences() { + return orgPreferences; + } + + public void setOrgPreferences( + @javax.annotation.Nullable List orgPreferences) { + this.orgPreferences = orgPreferences; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key name of the property + * @param value value of the property + * @return the SearchCommunicationChannelPreferencesRequest instance itself + */ + public SearchCommunicationChannelPreferencesRequest putAdditionalProperty( + String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return a map of objects + */ + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key name of the property + * @return an object + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + SearchCommunicationChannelPreferencesRequest searchCommunicationChannelPreferencesRequest = + (SearchCommunicationChannelPreferencesRequest) o; + return Objects.equals( + this.clusterPreferences, + searchCommunicationChannelPreferencesRequest.clusterPreferences) + && Objects.equals( + this.orgPreferences, + searchCommunicationChannelPreferencesRequest.orgPreferences) + && Objects.equals( + this.additionalProperties, + searchCommunicationChannelPreferencesRequest.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(clusterPreferences, orgPreferences, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class SearchCommunicationChannelPreferencesRequest {\n"); + sb.append(" clusterPreferences: ") + .append(toIndentedString(clusterPreferences)) + .append("\n"); + sb.append(" orgPreferences: ").append(toIndentedString(orgPreferences)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first + * line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("cluster_preferences"); + openapiFields.add("org_preferences"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to + * SearchCommunicationChannelPreferencesRequest + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!SearchCommunicationChannelPreferencesRequest.openapiRequiredFields + .isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException( + String.format( + "The required field(s) %s in" + + " SearchCommunicationChannelPreferencesRequest is not found" + + " in the empty JSON string", + SearchCommunicationChannelPreferencesRequest.openapiRequiredFields + .toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // ensure the optional json data is an array if present + if (jsonObj.get("cluster_preferences") != null + && !jsonObj.get("cluster_preferences").isJsonNull() + && !jsonObj.get("cluster_preferences").isJsonArray()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `cluster_preferences` to be an array in the JSON" + + " string but got `%s`", + jsonObj.get("cluster_preferences").toString())); + } + if (jsonObj.get("org_preferences") != null + && !jsonObj.get("org_preferences").isJsonNull()) { + JsonArray jsonArrayorgPreferences = jsonObj.getAsJsonArray("org_preferences"); + if (jsonArrayorgPreferences != null) { + // ensure the json data is an array + if (!jsonObj.get("org_preferences").isJsonArray()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `org_preferences` to be an array in the" + + " JSON string but got `%s`", + jsonObj.get("org_preferences").toString())); + } + + // validate the optional field `org_preferences` (array) + for (int i = 0; i < jsonArrayorgPreferences.size(); i++) { + OrgPreferenceSearchCriteriaInput.validateJsonElement( + jsonArrayorgPreferences.get(i)); + } + ; + } + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!SearchCommunicationChannelPreferencesRequest.class.isAssignableFrom( + type.getRawType())) { + return null; // this class only serializes + // 'SearchCommunicationChannelPreferencesRequest' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter = + gson.getDelegateAdapter( + this, + TypeToken.get(SearchCommunicationChannelPreferencesRequest.class)); + + return (TypeAdapter) + new TypeAdapter() { + @Override + public void write( + JsonWriter out, SearchCommunicationChannelPreferencesRequest value) + throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + obj.remove("additionalProperties"); + // serialize additional properties + if (value.getAdditionalProperties() != null) { + for (Map.Entry entry : + value.getAdditionalProperties().entrySet()) { + if (entry.getValue() instanceof String) + obj.addProperty(entry.getKey(), (String) entry.getValue()); + else if (entry.getValue() instanceof Number) + obj.addProperty(entry.getKey(), (Number) entry.getValue()); + else if (entry.getValue() instanceof Boolean) + obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); + else if (entry.getValue() instanceof Character) + obj.addProperty( + entry.getKey(), (Character) entry.getValue()); + else { + JsonElement jsonElement = gson.toJsonTree(entry.getValue()); + if (jsonElement.isJsonArray()) { + obj.add(entry.getKey(), jsonElement.getAsJsonArray()); + } else { + obj.add(entry.getKey(), jsonElement.getAsJsonObject()); + } + } + } + } + elementAdapter.write(out, obj); + } + + @Override + public SearchCommunicationChannelPreferencesRequest read(JsonReader in) + throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // store additional fields in the deserialized instance + SearchCommunicationChannelPreferencesRequest instance = + thisAdapter.fromJsonTree(jsonObj); + for (Map.Entry entry : jsonObj.entrySet()) { + if (!openapiFields.contains(entry.getKey())) { + if (entry.getValue().isJsonPrimitive()) { // primitive type + if (entry.getValue().getAsJsonPrimitive().isString()) + instance.putAdditionalProperty( + entry.getKey(), entry.getValue().getAsString()); + else if (entry.getValue().getAsJsonPrimitive().isNumber()) + instance.putAdditionalProperty( + entry.getKey(), entry.getValue().getAsNumber()); + else if (entry.getValue().getAsJsonPrimitive().isBoolean()) + instance.putAdditionalProperty( + entry.getKey(), + entry.getValue().getAsBoolean()); + else + throw new IllegalArgumentException( + String.format( + "The field `%s` has unknown primitive" + + " type. Value: %s", + entry.getKey(), + entry.getValue().toString())); + } else if (entry.getValue().isJsonArray()) { + instance.putAdditionalProperty( + entry.getKey(), + gson.fromJson(entry.getValue(), List.class)); + } else { // JSON object + instance.putAdditionalProperty( + entry.getKey(), + gson.fromJson(entry.getValue(), HashMap.class)); + } + } + } + return instance; + } + }.nullSafe(); + } + } + + /** + * Create an instance of SearchCommunicationChannelPreferencesRequest given an JSON string + * + * @param jsonString JSON string + * @return An instance of SearchCommunicationChannelPreferencesRequest + * @throws IOException if the JSON string is invalid with respect to + * SearchCommunicationChannelPreferencesRequest + */ + public static SearchCommunicationChannelPreferencesRequest fromJson(String jsonString) + throws IOException { + return JSON.getGson() + .fromJson(jsonString, SearchCommunicationChannelPreferencesRequest.class); + } + + /** + * Convert an instance of SearchCommunicationChannelPreferencesRequest to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} diff --git a/sdks/java/src/main/java/com/thoughtspot/client/model/SearchConfigRequest.java b/sdks/java/src/main/java/com/thoughtspot/client/model/SearchConfigRequest.java new file mode 100644 index 000000000..b04f45331 --- /dev/null +++ b/sdks/java/src/main/java/com/thoughtspot/client/model/SearchConfigRequest.java @@ -0,0 +1,307 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client.model; + +import com.google.gson.Gson; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.TypeAdapter; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.annotations.SerializedName; +import com.google.gson.reflect.TypeToken; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import com.thoughtspot.client.JSON; +import java.io.IOException; +import java.io.Serializable; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Objects; + +/** SearchConfigRequest */ +@javax.annotation.Generated( + value = "org.openapitools.codegen.languages.JavaClientCodegen", + comments = "Generator version: 7.12.0") +public class SearchConfigRequest implements Serializable { + private static final long serialVersionUID = 1L; + + public static final String SERIALIZED_NAME_ORG_IDENTIFIERS = "org_identifiers"; + + @SerializedName(SERIALIZED_NAME_ORG_IDENTIFIERS) + @javax.annotation.Nullable + private List orgIdentifiers; + + public SearchConfigRequest() {} + + public SearchConfigRequest orgIdentifiers( + @javax.annotation.Nullable List orgIdentifiers) { + this.orgIdentifiers = orgIdentifiers; + return this; + } + + public SearchConfigRequest addOrgIdentifiersItem(String orgIdentifiersItem) { + if (this.orgIdentifiers == null) { + this.orgIdentifiers = new ArrayList<>(); + } + this.orgIdentifiers.add(orgIdentifiersItem); + return this; + } + + /** + * Applicable when Orgs is enabled in the cluster List of Org ids or name. Provide value -1 for + * cluster level. Example : [\"OrgID1-or-Name1\", \"OrgID2-or-Name2\"] Note: + * If no value is specified, then the configurations will be returned for all orgs the user has + * access to Version: 9.5.0.cl or later + * + * @return orgIdentifiers + */ + @javax.annotation.Nullable + public List getOrgIdentifiers() { + return orgIdentifiers; + } + + public void setOrgIdentifiers(@javax.annotation.Nullable List orgIdentifiers) { + this.orgIdentifiers = orgIdentifiers; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key name of the property + * @param value value of the property + * @return the SearchConfigRequest instance itself + */ + public SearchConfigRequest putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return a map of objects + */ + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key name of the property + * @return an object + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + SearchConfigRequest searchConfigRequest = (SearchConfigRequest) o; + return Objects.equals(this.orgIdentifiers, searchConfigRequest.orgIdentifiers) + && Objects.equals( + this.additionalProperties, searchConfigRequest.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(orgIdentifiers, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class SearchConfigRequest {\n"); + sb.append(" orgIdentifiers: ").append(toIndentedString(orgIdentifiers)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first + * line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("org_identifiers"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to SearchConfigRequest + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!SearchConfigRequest.openapiRequiredFields + .isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException( + String.format( + "The required field(s) %s in SearchConfigRequest is not found in" + + " the empty JSON string", + SearchConfigRequest.openapiRequiredFields.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // ensure the optional json data is an array if present + if (jsonObj.get("org_identifiers") != null + && !jsonObj.get("org_identifiers").isJsonNull() + && !jsonObj.get("org_identifiers").isJsonArray()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `org_identifiers` to be an array in the JSON" + + " string but got `%s`", + jsonObj.get("org_identifiers").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!SearchConfigRequest.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'SearchConfigRequest' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter = + gson.getDelegateAdapter(this, TypeToken.get(SearchConfigRequest.class)); + + return (TypeAdapter) + new TypeAdapter() { + @Override + public void write(JsonWriter out, SearchConfigRequest value) + throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + obj.remove("additionalProperties"); + // serialize additional properties + if (value.getAdditionalProperties() != null) { + for (Map.Entry entry : + value.getAdditionalProperties().entrySet()) { + if (entry.getValue() instanceof String) + obj.addProperty(entry.getKey(), (String) entry.getValue()); + else if (entry.getValue() instanceof Number) + obj.addProperty(entry.getKey(), (Number) entry.getValue()); + else if (entry.getValue() instanceof Boolean) + obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); + else if (entry.getValue() instanceof Character) + obj.addProperty( + entry.getKey(), (Character) entry.getValue()); + else { + JsonElement jsonElement = gson.toJsonTree(entry.getValue()); + if (jsonElement.isJsonArray()) { + obj.add(entry.getKey(), jsonElement.getAsJsonArray()); + } else { + obj.add(entry.getKey(), jsonElement.getAsJsonObject()); + } + } + } + } + elementAdapter.write(out, obj); + } + + @Override + public SearchConfigRequest read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // store additional fields in the deserialized instance + SearchConfigRequest instance = thisAdapter.fromJsonTree(jsonObj); + for (Map.Entry entry : jsonObj.entrySet()) { + if (!openapiFields.contains(entry.getKey())) { + if (entry.getValue().isJsonPrimitive()) { // primitive type + if (entry.getValue().getAsJsonPrimitive().isString()) + instance.putAdditionalProperty( + entry.getKey(), entry.getValue().getAsString()); + else if (entry.getValue().getAsJsonPrimitive().isNumber()) + instance.putAdditionalProperty( + entry.getKey(), entry.getValue().getAsNumber()); + else if (entry.getValue().getAsJsonPrimitive().isBoolean()) + instance.putAdditionalProperty( + entry.getKey(), + entry.getValue().getAsBoolean()); + else + throw new IllegalArgumentException( + String.format( + "The field `%s` has unknown primitive" + + " type. Value: %s", + entry.getKey(), + entry.getValue().toString())); + } else if (entry.getValue().isJsonArray()) { + instance.putAdditionalProperty( + entry.getKey(), + gson.fromJson(entry.getValue(), List.class)); + } else { // JSON object + instance.putAdditionalProperty( + entry.getKey(), + gson.fromJson(entry.getValue(), HashMap.class)); + } + } + } + return instance; + } + }.nullSafe(); + } + } + + /** + * Create an instance of SearchConfigRequest given an JSON string + * + * @param jsonString JSON string + * @return An instance of SearchConfigRequest + * @throws IOException if the JSON string is invalid with respect to SearchConfigRequest + */ + public static SearchConfigRequest fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, SearchConfigRequest.class); + } + + /** + * Convert an instance of SearchConfigRequest to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} diff --git a/sdks/java/src/main/java/com/thoughtspot/client/model/SearchConnectionRequest.java b/sdks/java/src/main/java/com/thoughtspot/client/model/SearchConnectionRequest.java new file mode 100644 index 000000000..fbf9b97a8 --- /dev/null +++ b/sdks/java/src/main/java/com/thoughtspot/client/model/SearchConnectionRequest.java @@ -0,0 +1,973 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client.model; + +import com.google.gson.Gson; +import com.google.gson.JsonArray; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.TypeAdapter; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.reflect.TypeToken; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import com.thoughtspot.client.JSON; +import java.io.IOException; +import java.io.Serializable; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Objects; +import org.openapitools.jackson.nullable.JsonNullable; + +/** SearchConnectionRequest */ +@javax.annotation.Generated( + value = "org.openapitools.codegen.languages.JavaClientCodegen", + comments = "Generator version: 7.12.0") +public class SearchConnectionRequest implements Serializable { + private static final long serialVersionUID = 1L; + + public static final String SERIALIZED_NAME_CONNECTIONS = "connections"; + + @SerializedName(SERIALIZED_NAME_CONNECTIONS) + @javax.annotation.Nullable + private List connections; + + /** Gets or Sets dataWarehouseTypes */ + @JsonAdapter(DataWarehouseTypesEnum.Adapter.class) + public enum DataWarehouseTypesEnum { + SNOWFLAKE("SNOWFLAKE"), + + AMAZON_REDSHIFT("AMAZON_REDSHIFT"), + + GOOGLE_BIGQUERY("GOOGLE_BIGQUERY"), + + AZURE_SYNAPSE("AZURE_SYNAPSE"), + + TERADATA("TERADATA"), + + SAP_HANA("SAP_HANA"), + + STARBURST("STARBURST"), + + ORACLE_ADW("ORACLE_ADW"), + + DATABRICKS("DATABRICKS"), + + DENODO("DENODO"), + + DREMIO("DREMIO"), + + TRINO("TRINO"), + + PRESTO("PRESTO"), + + POSTGRES("POSTGRES"), + + SQLSERVER("SQLSERVER"), + + MYSQL("MYSQL"), + + GENERIC_JDBC("GENERIC_JDBC"), + + AMAZON_RDS_POSTGRESQL("AMAZON_RDS_POSTGRESQL"), + + AMAZON_AURORA_POSTGRESQL("AMAZON_AURORA_POSTGRESQL"), + + AMAZON_RDS_MYSQL("AMAZON_RDS_MYSQL"), + + AMAZON_AURORA_MYSQL("AMAZON_AURORA_MYSQL"), + + LOOKER("LOOKER"), + + AMAZON_ATHENA("AMAZON_ATHENA"), + + SINGLESTORE("SINGLESTORE"), + + GCP_SQLSERVER("GCP_SQLSERVER"), + + GCP_ALLOYDB_POSTGRESQL("GCP_ALLOYDB_POSTGRESQL"), + + GCP_POSTGRESQL("GCP_POSTGRESQL"), + + GCP_MYSQL("GCP_MYSQL"), + + MODE("MODE"), + + GOOGLE_SHEETS("GOOGLE_SHEETS"), + + FALCON("FALCON"), + + FALCON_ONPREM("FALCON_ONPREM"), + + CLICKHOUSE("CLICKHOUSE"), + + IOMETE("IOMETE"); + + private String value; + + DataWarehouseTypesEnum(String value) { + this.value = value; + } + + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + public static DataWarehouseTypesEnum fromValue(String value) { + for (DataWarehouseTypesEnum b : DataWarehouseTypesEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + + public static class Adapter extends TypeAdapter { + @Override + public void write(final JsonWriter jsonWriter, final DataWarehouseTypesEnum enumeration) + throws IOException { + jsonWriter.value(enumeration.getValue()); + } + + @Override + public DataWarehouseTypesEnum read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + return DataWarehouseTypesEnum.fromValue(value); + } + } + + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + String value = jsonElement.getAsString(); + DataWarehouseTypesEnum.fromValue(value); + } + } + + public static final String SERIALIZED_NAME_DATA_WAREHOUSE_TYPES = "data_warehouse_types"; + + @SerializedName(SERIALIZED_NAME_DATA_WAREHOUSE_TYPES) + @javax.annotation.Nullable + private List dataWarehouseTypes; + + public static final String SERIALIZED_NAME_RECORD_OFFSET = "record_offset"; + + @SerializedName(SERIALIZED_NAME_RECORD_OFFSET) + @javax.annotation.Nullable + private Integer recordOffset = 0; + + public static final String SERIALIZED_NAME_RECORD_SIZE = "record_size"; + + @SerializedName(SERIALIZED_NAME_RECORD_SIZE) + @javax.annotation.Nullable + private Integer recordSize = 10; + + public static final String SERIALIZED_NAME_TAG_IDENTIFIERS = "tag_identifiers"; + + @SerializedName(SERIALIZED_NAME_TAG_IDENTIFIERS) + @javax.annotation.Nullable + private List tagIdentifiers; + + /** Data warehouse object type. */ + @JsonAdapter(DataWarehouseObjectTypeEnum.Adapter.class) + public enum DataWarehouseObjectTypeEnum { + DATABASE("DATABASE"), + + SCHEMA("SCHEMA"), + + TABLE("TABLE"), + + COLUMN("COLUMN"); + + private String value; + + DataWarehouseObjectTypeEnum(String value) { + this.value = value; + } + + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + public static DataWarehouseObjectTypeEnum fromValue(String value) { + for (DataWarehouseObjectTypeEnum b : DataWarehouseObjectTypeEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + + public static class Adapter extends TypeAdapter { + @Override + public void write( + final JsonWriter jsonWriter, final DataWarehouseObjectTypeEnum enumeration) + throws IOException { + jsonWriter.value(enumeration.getValue()); + } + + @Override + public DataWarehouseObjectTypeEnum read(final JsonReader jsonReader) + throws IOException { + String value = jsonReader.nextString(); + return DataWarehouseObjectTypeEnum.fromValue(value); + } + } + + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + String value = jsonElement.getAsString(); + DataWarehouseObjectTypeEnum.fromValue(value); + } + } + + public static final String SERIALIZED_NAME_DATA_WAREHOUSE_OBJECT_TYPE = + "data_warehouse_object_type"; + + @SerializedName(SERIALIZED_NAME_DATA_WAREHOUSE_OBJECT_TYPE) + @javax.annotation.Nullable + private DataWarehouseObjectTypeEnum dataWarehouseObjectType; + + public static final String SERIALIZED_NAME_SORT_OPTIONS = "sort_options"; + + @SerializedName(SERIALIZED_NAME_SORT_OPTIONS) + @javax.annotation.Nullable + private SortOptionInput sortOptions; + + public static final String SERIALIZED_NAME_INCLUDE_DETAILS = "include_details"; + + @SerializedName(SERIALIZED_NAME_INCLUDE_DETAILS) + @javax.annotation.Nullable + private Boolean includeDetails; + + public static final String SERIALIZED_NAME_CONFIGURATION = "configuration"; + + @SerializedName(SERIALIZED_NAME_CONFIGURATION) + @javax.annotation.Nullable + private Object _configuration; + + /** + * List of authentication types to fetch data_ware_house_objects from external Data warehouse. + * This is only applicable when data_warehouse_object_type is selected. + */ + @JsonAdapter(AuthenticationTypeEnum.Adapter.class) + public enum AuthenticationTypeEnum { + SERVICE_ACCOUNT("SERVICE_ACCOUNT"), + + OAUTH("OAUTH"), + + IAM("IAM"), + + EXTOAUTH("EXTOAUTH"), + + OAUTH_WITH_SERVICE_PRINCIPAL("OAUTH_WITH_SERVICE_PRINCIPAL"), + + PERSONAL_ACCESS_TOKEN("PERSONAL_ACCESS_TOKEN"), + + KEY_PAIR("KEY_PAIR"), + + OAUTH_WITH_PKCE("OAUTH_WITH_PKCE"), + + EXTOAUTH_WITH_PKCE("EXTOAUTH_WITH_PKCE"), + + OAUTH_WITH_PEZ("OAUTH_WITH_PEZ"), + + OAUTH_CLIENT_CREDENTIALS("OAUTH_CLIENT_CREDENTIALS"); + + private String value; + + AuthenticationTypeEnum(String value) { + this.value = value; + } + + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + public static AuthenticationTypeEnum fromValue(String value) { + for (AuthenticationTypeEnum b : AuthenticationTypeEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + + public static class Adapter extends TypeAdapter { + @Override + public void write(final JsonWriter jsonWriter, final AuthenticationTypeEnum enumeration) + throws IOException { + jsonWriter.value(enumeration.getValue()); + } + + @Override + public AuthenticationTypeEnum read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + return AuthenticationTypeEnum.fromValue(value); + } + } + + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + String value = jsonElement.getAsString(); + AuthenticationTypeEnum.fromValue(value); + } + } + + public static final String SERIALIZED_NAME_AUTHENTICATION_TYPE = "authentication_type"; + + @SerializedName(SERIALIZED_NAME_AUTHENTICATION_TYPE) + @javax.annotation.Nullable + private AuthenticationTypeEnum authenticationType = AuthenticationTypeEnum.SERVICE_ACCOUNT; + + public static final String SERIALIZED_NAME_SHOW_RESOLVED_PARAMETERS = + "show_resolved_parameters"; + + @SerializedName(SERIALIZED_NAME_SHOW_RESOLVED_PARAMETERS) + @javax.annotation.Nullable + private Boolean showResolvedParameters = false; + + public SearchConnectionRequest() {} + + public SearchConnectionRequest connections( + @javax.annotation.Nullable List connections) { + this.connections = connections; + return this; + } + + public SearchConnectionRequest addConnectionsItem(ConnectionInput connectionsItem) { + if (this.connections == null) { + this.connections = new ArrayList<>(); + } + this.connections.add(connectionsItem); + return this; + } + + /** + * List of connections and name pattern + * + * @return connections + */ + @javax.annotation.Nullable + public List getConnections() { + return connections; + } + + public void setConnections(@javax.annotation.Nullable List connections) { + this.connections = connections; + } + + public SearchConnectionRequest dataWarehouseTypes( + @javax.annotation.Nullable List dataWarehouseTypes) { + this.dataWarehouseTypes = dataWarehouseTypes; + return this; + } + + public SearchConnectionRequest addDataWarehouseTypesItem( + DataWarehouseTypesEnum dataWarehouseTypesItem) { + if (this.dataWarehouseTypes == null) { + this.dataWarehouseTypes = new ArrayList<>(); + } + this.dataWarehouseTypes.add(dataWarehouseTypesItem); + return this; + } + + /** + * Array of types of data warehouse defined for the connection. + * + * @return dataWarehouseTypes + */ + @javax.annotation.Nullable + public List getDataWarehouseTypes() { + return dataWarehouseTypes; + } + + public void setDataWarehouseTypes( + @javax.annotation.Nullable List dataWarehouseTypes) { + this.dataWarehouseTypes = dataWarehouseTypes; + } + + public SearchConnectionRequest recordOffset(@javax.annotation.Nullable Integer recordOffset) { + this.recordOffset = recordOffset; + return this; + } + + /** + * The starting record number from where the records should be included. + * + * @return recordOffset + */ + @javax.annotation.Nullable + public Integer getRecordOffset() { + return recordOffset; + } + + public void setRecordOffset(@javax.annotation.Nullable Integer recordOffset) { + this.recordOffset = recordOffset; + } + + public SearchConnectionRequest recordSize(@javax.annotation.Nullable Integer recordSize) { + this.recordSize = recordSize; + return this; + } + + /** + * The number of records that should be included. + * + * @return recordSize + */ + @javax.annotation.Nullable + public Integer getRecordSize() { + return recordSize; + } + + public void setRecordSize(@javax.annotation.Nullable Integer recordSize) { + this.recordSize = recordSize; + } + + public SearchConnectionRequest tagIdentifiers( + @javax.annotation.Nullable List tagIdentifiers) { + this.tagIdentifiers = tagIdentifiers; + return this; + } + + public SearchConnectionRequest addTagIdentifiersItem(String tagIdentifiersItem) { + if (this.tagIdentifiers == null) { + this.tagIdentifiers = new ArrayList<>(); + } + this.tagIdentifiers.add(tagIdentifiersItem); + return this; + } + + /** + * Unique ID or name of tags. + * + * @return tagIdentifiers + */ + @javax.annotation.Nullable + public List getTagIdentifiers() { + return tagIdentifiers; + } + + public void setTagIdentifiers(@javax.annotation.Nullable List tagIdentifiers) { + this.tagIdentifiers = tagIdentifiers; + } + + public SearchConnectionRequest dataWarehouseObjectType( + @javax.annotation.Nullable DataWarehouseObjectTypeEnum dataWarehouseObjectType) { + this.dataWarehouseObjectType = dataWarehouseObjectType; + return this; + } + + /** + * Data warehouse object type. + * + * @return dataWarehouseObjectType + */ + @javax.annotation.Nullable + public DataWarehouseObjectTypeEnum getDataWarehouseObjectType() { + return dataWarehouseObjectType; + } + + public void setDataWarehouseObjectType( + @javax.annotation.Nullable DataWarehouseObjectTypeEnum dataWarehouseObjectType) { + this.dataWarehouseObjectType = dataWarehouseObjectType; + } + + public SearchConnectionRequest sortOptions( + @javax.annotation.Nullable SortOptionInput sortOptions) { + this.sortOptions = sortOptions; + return this; + } + + /** + * Sort options. + * + * @return sortOptions + */ + @javax.annotation.Nullable + public SortOptionInput getSortOptions() { + return sortOptions; + } + + public void setSortOptions(@javax.annotation.Nullable SortOptionInput sortOptions) { + this.sortOptions = sortOptions; + } + + public SearchConnectionRequest includeDetails( + @javax.annotation.Nullable Boolean includeDetails) { + this.includeDetails = includeDetails; + return this; + } + + /** + * Indicates whether to include complete details of the connection objects. + * + * @return includeDetails + */ + @javax.annotation.Nullable + public Boolean getIncludeDetails() { + return includeDetails; + } + + public void setIncludeDetails(@javax.annotation.Nullable Boolean includeDetails) { + this.includeDetails = includeDetails; + } + + public SearchConnectionRequest _configuration( + @javax.annotation.Nullable Object _configuration) { + this._configuration = _configuration; + return this; + } + + /** + * Configuration values. If empty we are fetching configuration from datasource based on given + * connection id. If required you can provide config details to fetch specific details. Example + * input: {}, + * {\"warehouse\":\"SMALL_WH\",\"database\":\"DEVELOPMENT\"}. + * This is only applicable when data_warehouse_object_type is selected. + * + * @return _configuration + */ + @javax.annotation.Nullable + public Object getConfiguration() { + return _configuration; + } + + public void setConfiguration(@javax.annotation.Nullable Object _configuration) { + this._configuration = _configuration; + } + + public SearchConnectionRequest authenticationType( + @javax.annotation.Nullable AuthenticationTypeEnum authenticationType) { + this.authenticationType = authenticationType; + return this; + } + + /** + * List of authentication types to fetch data_ware_house_objects from external Data warehouse. + * This is only applicable when data_warehouse_object_type is selected. + * + * @return authenticationType + */ + @javax.annotation.Nullable + public AuthenticationTypeEnum getAuthenticationType() { + return authenticationType; + } + + public void setAuthenticationType( + @javax.annotation.Nullable AuthenticationTypeEnum authenticationType) { + this.authenticationType = authenticationType; + } + + public SearchConnectionRequest showResolvedParameters( + @javax.annotation.Nullable Boolean showResolvedParameters) { + this.showResolvedParameters = showResolvedParameters; + return this; + } + + /** + * <div>Version: 10.9.0.cl or later </div> Indicates whether to show resolved + * parameterised values. + * + * @return showResolvedParameters + */ + @javax.annotation.Nullable + public Boolean getShowResolvedParameters() { + return showResolvedParameters; + } + + public void setShowResolvedParameters( + @javax.annotation.Nullable Boolean showResolvedParameters) { + this.showResolvedParameters = showResolvedParameters; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key name of the property + * @param value value of the property + * @return the SearchConnectionRequest instance itself + */ + public SearchConnectionRequest putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return a map of objects + */ + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key name of the property + * @return an object + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + SearchConnectionRequest searchConnectionRequest = (SearchConnectionRequest) o; + return Objects.equals(this.connections, searchConnectionRequest.connections) + && Objects.equals( + this.dataWarehouseTypes, searchConnectionRequest.dataWarehouseTypes) + && Objects.equals(this.recordOffset, searchConnectionRequest.recordOffset) + && Objects.equals(this.recordSize, searchConnectionRequest.recordSize) + && Objects.equals(this.tagIdentifiers, searchConnectionRequest.tagIdentifiers) + && Objects.equals( + this.dataWarehouseObjectType, + searchConnectionRequest.dataWarehouseObjectType) + && Objects.equals(this.sortOptions, searchConnectionRequest.sortOptions) + && Objects.equals(this.includeDetails, searchConnectionRequest.includeDetails) + && Objects.equals(this._configuration, searchConnectionRequest._configuration) + && Objects.equals( + this.authenticationType, searchConnectionRequest.authenticationType) + && Objects.equals( + this.showResolvedParameters, searchConnectionRequest.showResolvedParameters) + && Objects.equals( + this.additionalProperties, searchConnectionRequest.additionalProperties); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b + || (a != null + && b != null + && a.isPresent() + && b.isPresent() + && Objects.deepEquals(a.get(), b.get())); + } + + @Override + public int hashCode() { + return Objects.hash( + connections, + dataWarehouseTypes, + recordOffset, + recordSize, + tagIdentifiers, + dataWarehouseObjectType, + sortOptions, + includeDetails, + _configuration, + authenticationType, + showResolvedParameters, + additionalProperties); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; + } + return a.isPresent() ? Arrays.deepHashCode(new Object[] {a.get()}) : 31; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class SearchConnectionRequest {\n"); + sb.append(" connections: ").append(toIndentedString(connections)).append("\n"); + sb.append(" dataWarehouseTypes: ") + .append(toIndentedString(dataWarehouseTypes)) + .append("\n"); + sb.append(" recordOffset: ").append(toIndentedString(recordOffset)).append("\n"); + sb.append(" recordSize: ").append(toIndentedString(recordSize)).append("\n"); + sb.append(" tagIdentifiers: ").append(toIndentedString(tagIdentifiers)).append("\n"); + sb.append(" dataWarehouseObjectType: ") + .append(toIndentedString(dataWarehouseObjectType)) + .append("\n"); + sb.append(" sortOptions: ").append(toIndentedString(sortOptions)).append("\n"); + sb.append(" includeDetails: ").append(toIndentedString(includeDetails)).append("\n"); + sb.append(" _configuration: ").append(toIndentedString(_configuration)).append("\n"); + sb.append(" authenticationType: ") + .append(toIndentedString(authenticationType)) + .append("\n"); + sb.append(" showResolvedParameters: ") + .append(toIndentedString(showResolvedParameters)) + .append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first + * line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("connections"); + openapiFields.add("data_warehouse_types"); + openapiFields.add("record_offset"); + openapiFields.add("record_size"); + openapiFields.add("tag_identifiers"); + openapiFields.add("data_warehouse_object_type"); + openapiFields.add("sort_options"); + openapiFields.add("include_details"); + openapiFields.add("configuration"); + openapiFields.add("authentication_type"); + openapiFields.add("show_resolved_parameters"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to SearchConnectionRequest + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!SearchConnectionRequest.openapiRequiredFields + .isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException( + String.format( + "The required field(s) %s in SearchConnectionRequest is not found" + + " in the empty JSON string", + SearchConnectionRequest.openapiRequiredFields.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if (jsonObj.get("connections") != null && !jsonObj.get("connections").isJsonNull()) { + JsonArray jsonArrayconnections = jsonObj.getAsJsonArray("connections"); + if (jsonArrayconnections != null) { + // ensure the json data is an array + if (!jsonObj.get("connections").isJsonArray()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `connections` to be an array in the JSON" + + " string but got `%s`", + jsonObj.get("connections").toString())); + } + + // validate the optional field `connections` (array) + for (int i = 0; i < jsonArrayconnections.size(); i++) { + ConnectionInput.validateJsonElement(jsonArrayconnections.get(i)); + } + ; + } + } + // ensure the optional json data is an array if present + if (jsonObj.get("data_warehouse_types") != null + && !jsonObj.get("data_warehouse_types").isJsonNull() + && !jsonObj.get("data_warehouse_types").isJsonArray()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `data_warehouse_types` to be an array in the JSON" + + " string but got `%s`", + jsonObj.get("data_warehouse_types").toString())); + } + // ensure the optional json data is an array if present + if (jsonObj.get("tag_identifiers") != null + && !jsonObj.get("tag_identifiers").isJsonNull() + && !jsonObj.get("tag_identifiers").isJsonArray()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `tag_identifiers` to be an array in the JSON" + + " string but got `%s`", + jsonObj.get("tag_identifiers").toString())); + } + if ((jsonObj.get("data_warehouse_object_type") != null + && !jsonObj.get("data_warehouse_object_type").isJsonNull()) + && !jsonObj.get("data_warehouse_object_type").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `data_warehouse_object_type` to be a primitive" + + " type in the JSON string but got `%s`", + jsonObj.get("data_warehouse_object_type").toString())); + } + // validate the optional field `data_warehouse_object_type` + if (jsonObj.get("data_warehouse_object_type") != null + && !jsonObj.get("data_warehouse_object_type").isJsonNull()) { + DataWarehouseObjectTypeEnum.validateJsonElement( + jsonObj.get("data_warehouse_object_type")); + } + // validate the optional field `sort_options` + if (jsonObj.get("sort_options") != null && !jsonObj.get("sort_options").isJsonNull()) { + SortOptionInput.validateJsonElement(jsonObj.get("sort_options")); + } + if ((jsonObj.get("authentication_type") != null + && !jsonObj.get("authentication_type").isJsonNull()) + && !jsonObj.get("authentication_type").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `authentication_type` to be a primitive type in" + + " the JSON string but got `%s`", + jsonObj.get("authentication_type").toString())); + } + // validate the optional field `authentication_type` + if (jsonObj.get("authentication_type") != null + && !jsonObj.get("authentication_type").isJsonNull()) { + AuthenticationTypeEnum.validateJsonElement(jsonObj.get("authentication_type")); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!SearchConnectionRequest.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'SearchConnectionRequest' and its + // subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter = + gson.getDelegateAdapter(this, TypeToken.get(SearchConnectionRequest.class)); + + return (TypeAdapter) + new TypeAdapter() { + @Override + public void write(JsonWriter out, SearchConnectionRequest value) + throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + obj.remove("additionalProperties"); + // serialize additional properties + if (value.getAdditionalProperties() != null) { + for (Map.Entry entry : + value.getAdditionalProperties().entrySet()) { + if (entry.getValue() instanceof String) + obj.addProperty(entry.getKey(), (String) entry.getValue()); + else if (entry.getValue() instanceof Number) + obj.addProperty(entry.getKey(), (Number) entry.getValue()); + else if (entry.getValue() instanceof Boolean) + obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); + else if (entry.getValue() instanceof Character) + obj.addProperty( + entry.getKey(), (Character) entry.getValue()); + else { + JsonElement jsonElement = gson.toJsonTree(entry.getValue()); + if (jsonElement.isJsonArray()) { + obj.add(entry.getKey(), jsonElement.getAsJsonArray()); + } else { + obj.add(entry.getKey(), jsonElement.getAsJsonObject()); + } + } + } + } + elementAdapter.write(out, obj); + } + + @Override + public SearchConnectionRequest read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // store additional fields in the deserialized instance + SearchConnectionRequest instance = thisAdapter.fromJsonTree(jsonObj); + for (Map.Entry entry : jsonObj.entrySet()) { + if (!openapiFields.contains(entry.getKey())) { + if (entry.getValue().isJsonPrimitive()) { // primitive type + if (entry.getValue().getAsJsonPrimitive().isString()) + instance.putAdditionalProperty( + entry.getKey(), entry.getValue().getAsString()); + else if (entry.getValue().getAsJsonPrimitive().isNumber()) + instance.putAdditionalProperty( + entry.getKey(), entry.getValue().getAsNumber()); + else if (entry.getValue().getAsJsonPrimitive().isBoolean()) + instance.putAdditionalProperty( + entry.getKey(), + entry.getValue().getAsBoolean()); + else + throw new IllegalArgumentException( + String.format( + "The field `%s` has unknown primitive" + + " type. Value: %s", + entry.getKey(), + entry.getValue().toString())); + } else if (entry.getValue().isJsonArray()) { + instance.putAdditionalProperty( + entry.getKey(), + gson.fromJson(entry.getValue(), List.class)); + } else { // JSON object + instance.putAdditionalProperty( + entry.getKey(), + gson.fromJson(entry.getValue(), HashMap.class)); + } + } + } + return instance; + } + }.nullSafe(); + } + } + + /** + * Create an instance of SearchConnectionRequest given an JSON string + * + * @param jsonString JSON string + * @return An instance of SearchConnectionRequest + * @throws IOException if the JSON string is invalid with respect to SearchConnectionRequest + */ + public static SearchConnectionRequest fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, SearchConnectionRequest.class); + } + + /** + * Convert an instance of SearchConnectionRequest to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} diff --git a/sdks/java/src/main/java/com/thoughtspot/client/model/SearchConnectionResponse.java b/sdks/java/src/main/java/com/thoughtspot/client/model/SearchConnectionResponse.java new file mode 100644 index 000000000..b10f5fe3f --- /dev/null +++ b/sdks/java/src/main/java/com/thoughtspot/client/model/SearchConnectionResponse.java @@ -0,0 +1,625 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client.model; + +import com.google.gson.Gson; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.TypeAdapter; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.reflect.TypeToken; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import com.thoughtspot.client.JSON; +import java.io.IOException; +import java.io.Serializable; +import java.util.Arrays; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Objects; +import org.openapitools.jackson.nullable.JsonNullable; + +/** SearchConnectionResponse */ +@javax.annotation.Generated( + value = "org.openapitools.codegen.languages.JavaClientCodegen", + comments = "Generator version: 7.12.0") +public class SearchConnectionResponse implements Serializable { + private static final long serialVersionUID = 1L; + + public static final String SERIALIZED_NAME_ID = "id"; + + @SerializedName(SERIALIZED_NAME_ID) + @javax.annotation.Nonnull + private String id; + + public static final String SERIALIZED_NAME_NAME = "name"; + + @SerializedName(SERIALIZED_NAME_NAME) + @javax.annotation.Nonnull + private String name; + + public static final String SERIALIZED_NAME_DESCRIPTION = "description"; + + @SerializedName(SERIALIZED_NAME_DESCRIPTION) + @javax.annotation.Nullable + private String description; + + /** Type of data warehouse. */ + @JsonAdapter(DataWarehouseTypeEnum.Adapter.class) + public enum DataWarehouseTypeEnum { + SNOWFLAKE("SNOWFLAKE"), + + AMAZON_REDSHIFT("AMAZON_REDSHIFT"), + + GOOGLE_BIGQUERY("GOOGLE_BIGQUERY"), + + AZURE_SYNAPSE("AZURE_SYNAPSE"), + + TERADATA("TERADATA"), + + SAP_HANA("SAP_HANA"), + + STARBURST("STARBURST"), + + ORACLE_ADW("ORACLE_ADW"), + + DATABRICKS("DATABRICKS"), + + DENODO("DENODO"), + + DREMIO("DREMIO"), + + TRINO("TRINO"), + + PRESTO("PRESTO"), + + POSTGRES("POSTGRES"), + + SQLSERVER("SQLSERVER"), + + MYSQL("MYSQL"), + + GENERIC_JDBC("GENERIC_JDBC"), + + AMAZON_RDS_POSTGRESQL("AMAZON_RDS_POSTGRESQL"), + + AMAZON_AURORA_POSTGRESQL("AMAZON_AURORA_POSTGRESQL"), + + AMAZON_RDS_MYSQL("AMAZON_RDS_MYSQL"), + + AMAZON_AURORA_MYSQL("AMAZON_AURORA_MYSQL"), + + LOOKER("LOOKER"), + + AMAZON_ATHENA("AMAZON_ATHENA"), + + SINGLESTORE("SINGLESTORE"), + + GCP_SQLSERVER("GCP_SQLSERVER"), + + GCP_ALLOYDB_POSTGRESQL("GCP_ALLOYDB_POSTGRESQL"), + + GCP_POSTGRESQL("GCP_POSTGRESQL"), + + GCP_MYSQL("GCP_MYSQL"), + + MODE("MODE"), + + GOOGLE_SHEETS("GOOGLE_SHEETS"), + + FALCON("FALCON"), + + FALCON_ONPREM("FALCON_ONPREM"), + + CLICKHOUSE("CLICKHOUSE"), + + IOMETE("IOMETE"); + + private String value; + + DataWarehouseTypeEnum(String value) { + this.value = value; + } + + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + public static DataWarehouseTypeEnum fromValue(String value) { + for (DataWarehouseTypeEnum b : DataWarehouseTypeEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + + public static class Adapter extends TypeAdapter { + @Override + public void write(final JsonWriter jsonWriter, final DataWarehouseTypeEnum enumeration) + throws IOException { + jsonWriter.value(enumeration.getValue()); + } + + @Override + public DataWarehouseTypeEnum read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + return DataWarehouseTypeEnum.fromValue(value); + } + } + + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + String value = jsonElement.getAsString(); + DataWarehouseTypeEnum.fromValue(value); + } + } + + public static final String SERIALIZED_NAME_DATA_WAREHOUSE_TYPE = "data_warehouse_type"; + + @SerializedName(SERIALIZED_NAME_DATA_WAREHOUSE_TYPE) + @javax.annotation.Nonnull + private DataWarehouseTypeEnum dataWarehouseType; + + public static final String SERIALIZED_NAME_DATA_WAREHOUSE_OBJECTS = "data_warehouse_objects"; + + @SerializedName(SERIALIZED_NAME_DATA_WAREHOUSE_OBJECTS) + @javax.annotation.Nullable + private DataWarehouseObjects dataWarehouseObjects; + + public static final String SERIALIZED_NAME_DETAILS = "details"; + + @SerializedName(SERIALIZED_NAME_DETAILS) + @javax.annotation.Nullable + private Object details; + + public SearchConnectionResponse() {} + + public SearchConnectionResponse id(@javax.annotation.Nonnull String id) { + this.id = id; + return this; + } + + /** + * Unique ID of the connection. + * + * @return id + */ + @javax.annotation.Nonnull + public String getId() { + return id; + } + + public void setId(@javax.annotation.Nonnull String id) { + this.id = id; + } + + public SearchConnectionResponse name(@javax.annotation.Nonnull String name) { + this.name = name; + return this; + } + + /** + * Name of the connection. + * + * @return name + */ + @javax.annotation.Nonnull + public String getName() { + return name; + } + + public void setName(@javax.annotation.Nonnull String name) { + this.name = name; + } + + public SearchConnectionResponse description(@javax.annotation.Nullable String description) { + this.description = description; + return this; + } + + /** + * Description of the connection. + * + * @return description + */ + @javax.annotation.Nullable + public String getDescription() { + return description; + } + + public void setDescription(@javax.annotation.Nullable String description) { + this.description = description; + } + + public SearchConnectionResponse dataWarehouseType( + @javax.annotation.Nonnull DataWarehouseTypeEnum dataWarehouseType) { + this.dataWarehouseType = dataWarehouseType; + return this; + } + + /** + * Type of data warehouse. + * + * @return dataWarehouseType + */ + @javax.annotation.Nonnull + public DataWarehouseTypeEnum getDataWarehouseType() { + return dataWarehouseType; + } + + public void setDataWarehouseType( + @javax.annotation.Nonnull DataWarehouseTypeEnum dataWarehouseType) { + this.dataWarehouseType = dataWarehouseType; + } + + public SearchConnectionResponse dataWarehouseObjects( + @javax.annotation.Nullable DataWarehouseObjects dataWarehouseObjects) { + this.dataWarehouseObjects = dataWarehouseObjects; + return this; + } + + /** + * Get dataWarehouseObjects + * + * @return dataWarehouseObjects + */ + @javax.annotation.Nullable + public DataWarehouseObjects getDataWarehouseObjects() { + return dataWarehouseObjects; + } + + public void setDataWarehouseObjects( + @javax.annotation.Nullable DataWarehouseObjects dataWarehouseObjects) { + this.dataWarehouseObjects = dataWarehouseObjects; + } + + public SearchConnectionResponse details(@javax.annotation.Nullable Object details) { + this.details = details; + return this; + } + + /** + * Details of the connection. + * + * @return details + */ + @javax.annotation.Nullable + public Object getDetails() { + return details; + } + + public void setDetails(@javax.annotation.Nullable Object details) { + this.details = details; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key name of the property + * @param value value of the property + * @return the SearchConnectionResponse instance itself + */ + public SearchConnectionResponse putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return a map of objects + */ + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key name of the property + * @return an object + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + SearchConnectionResponse searchConnectionResponse = (SearchConnectionResponse) o; + return Objects.equals(this.id, searchConnectionResponse.id) + && Objects.equals(this.name, searchConnectionResponse.name) + && Objects.equals(this.description, searchConnectionResponse.description) + && Objects.equals( + this.dataWarehouseType, searchConnectionResponse.dataWarehouseType) + && Objects.equals( + this.dataWarehouseObjects, searchConnectionResponse.dataWarehouseObjects) + && Objects.equals(this.details, searchConnectionResponse.details) + && Objects.equals( + this.additionalProperties, searchConnectionResponse.additionalProperties); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b + || (a != null + && b != null + && a.isPresent() + && b.isPresent() + && Objects.deepEquals(a.get(), b.get())); + } + + @Override + public int hashCode() { + return Objects.hash( + id, + name, + description, + dataWarehouseType, + dataWarehouseObjects, + details, + additionalProperties); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; + } + return a.isPresent() ? Arrays.deepHashCode(new Object[] {a.get()}) : 31; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class SearchConnectionResponse {\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append(" description: ").append(toIndentedString(description)).append("\n"); + sb.append(" dataWarehouseType: ") + .append(toIndentedString(dataWarehouseType)) + .append("\n"); + sb.append(" dataWarehouseObjects: ") + .append(toIndentedString(dataWarehouseObjects)) + .append("\n"); + sb.append(" details: ").append(toIndentedString(details)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first + * line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("id"); + openapiFields.add("name"); + openapiFields.add("description"); + openapiFields.add("data_warehouse_type"); + openapiFields.add("data_warehouse_objects"); + openapiFields.add("details"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + openapiRequiredFields.add("id"); + openapiRequiredFields.add("name"); + openapiRequiredFields.add("data_warehouse_type"); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to SearchConnectionResponse + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!SearchConnectionResponse.openapiRequiredFields + .isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException( + String.format( + "The required field(s) %s in SearchConnectionResponse is not found" + + " in the empty JSON string", + SearchConnectionResponse.openapiRequiredFields.toString())); + } + } + + // check to make sure all required properties/fields are present in the JSON string + for (String requiredField : SearchConnectionResponse.openapiRequiredFields) { + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException( + String.format( + "The required field `%s` is not found in the JSON string: %s", + requiredField, jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if (!jsonObj.get("id").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `id` to be a primitive type in the JSON string but" + + " got `%s`", + jsonObj.get("id").toString())); + } + if (!jsonObj.get("name").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `name` to be a primitive type in the JSON string" + + " but got `%s`", + jsonObj.get("name").toString())); + } + if ((jsonObj.get("description") != null && !jsonObj.get("description").isJsonNull()) + && !jsonObj.get("description").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `description` to be a primitive type in the JSON" + + " string but got `%s`", + jsonObj.get("description").toString())); + } + if (!jsonObj.get("data_warehouse_type").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `data_warehouse_type` to be a primitive type in" + + " the JSON string but got `%s`", + jsonObj.get("data_warehouse_type").toString())); + } + // validate the required field `data_warehouse_type` + DataWarehouseTypeEnum.validateJsonElement(jsonObj.get("data_warehouse_type")); + // validate the optional field `data_warehouse_objects` + if (jsonObj.get("data_warehouse_objects") != null + && !jsonObj.get("data_warehouse_objects").isJsonNull()) { + DataWarehouseObjects.validateJsonElement(jsonObj.get("data_warehouse_objects")); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!SearchConnectionResponse.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'SearchConnectionResponse' and its + // subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter = + gson.getDelegateAdapter(this, TypeToken.get(SearchConnectionResponse.class)); + + return (TypeAdapter) + new TypeAdapter() { + @Override + public void write(JsonWriter out, SearchConnectionResponse value) + throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + obj.remove("additionalProperties"); + // serialize additional properties + if (value.getAdditionalProperties() != null) { + for (Map.Entry entry : + value.getAdditionalProperties().entrySet()) { + if (entry.getValue() instanceof String) + obj.addProperty(entry.getKey(), (String) entry.getValue()); + else if (entry.getValue() instanceof Number) + obj.addProperty(entry.getKey(), (Number) entry.getValue()); + else if (entry.getValue() instanceof Boolean) + obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); + else if (entry.getValue() instanceof Character) + obj.addProperty( + entry.getKey(), (Character) entry.getValue()); + else { + JsonElement jsonElement = gson.toJsonTree(entry.getValue()); + if (jsonElement.isJsonArray()) { + obj.add(entry.getKey(), jsonElement.getAsJsonArray()); + } else { + obj.add(entry.getKey(), jsonElement.getAsJsonObject()); + } + } + } + } + elementAdapter.write(out, obj); + } + + @Override + public SearchConnectionResponse read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // store additional fields in the deserialized instance + SearchConnectionResponse instance = thisAdapter.fromJsonTree(jsonObj); + for (Map.Entry entry : jsonObj.entrySet()) { + if (!openapiFields.contains(entry.getKey())) { + if (entry.getValue().isJsonPrimitive()) { // primitive type + if (entry.getValue().getAsJsonPrimitive().isString()) + instance.putAdditionalProperty( + entry.getKey(), entry.getValue().getAsString()); + else if (entry.getValue().getAsJsonPrimitive().isNumber()) + instance.putAdditionalProperty( + entry.getKey(), entry.getValue().getAsNumber()); + else if (entry.getValue().getAsJsonPrimitive().isBoolean()) + instance.putAdditionalProperty( + entry.getKey(), + entry.getValue().getAsBoolean()); + else + throw new IllegalArgumentException( + String.format( + "The field `%s` has unknown primitive" + + " type. Value: %s", + entry.getKey(), + entry.getValue().toString())); + } else if (entry.getValue().isJsonArray()) { + instance.putAdditionalProperty( + entry.getKey(), + gson.fromJson(entry.getValue(), List.class)); + } else { // JSON object + instance.putAdditionalProperty( + entry.getKey(), + gson.fromJson(entry.getValue(), HashMap.class)); + } + } + } + return instance; + } + }.nullSafe(); + } + } + + /** + * Create an instance of SearchConnectionResponse given an JSON string + * + * @param jsonString JSON string + * @return An instance of SearchConnectionResponse + * @throws IOException if the JSON string is invalid with respect to SearchConnectionResponse + */ + public static SearchConnectionResponse fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, SearchConnectionResponse.class); + } + + /** + * Convert an instance of SearchConnectionResponse to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} diff --git a/sdks/java/src/main/java/com/thoughtspot/client/model/SearchCustomActionsRequest.java b/sdks/java/src/main/java/com/thoughtspot/client/model/SearchCustomActionsRequest.java new file mode 100644 index 000000000..4b0b01b76 --- /dev/null +++ b/sdks/java/src/main/java/com/thoughtspot/client/model/SearchCustomActionsRequest.java @@ -0,0 +1,624 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client.model; + +import com.google.gson.Gson; +import com.google.gson.JsonArray; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.TypeAdapter; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.reflect.TypeToken; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import com.thoughtspot.client.JSON; +import java.io.IOException; +import java.io.Serializable; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Objects; +import org.openapitools.jackson.nullable.JsonNullable; + +/** SearchCustomActionsRequest */ +@javax.annotation.Generated( + value = "org.openapitools.codegen.languages.JavaClientCodegen", + comments = "Generator version: 7.12.0") +public class SearchCustomActionsRequest implements Serializable { + private static final long serialVersionUID = 1L; + + public static final String SERIALIZED_NAME_CUSTOM_ACTION_IDENTIFIER = + "custom_action_identifier"; + + @SerializedName(SERIALIZED_NAME_CUSTOM_ACTION_IDENTIFIER) + @javax.annotation.Nullable + private String customActionIdentifier; + + public static final String SERIALIZED_NAME_NAME_PATTERN = "name_pattern"; + + @SerializedName(SERIALIZED_NAME_NAME_PATTERN) + @javax.annotation.Nullable + private String namePattern; + + public static final String SERIALIZED_NAME_DEFAULT_ACTION_CONFIG = "default_action_config"; + + @SerializedName(SERIALIZED_NAME_DEFAULT_ACTION_CONFIG) + @javax.annotation.Nullable + private DefaultActionConfigSearchInput defaultActionConfig; + + public static final String SERIALIZED_NAME_INCLUDE_GROUP_ASSOCIATIONS = + "include_group_associations"; + + @SerializedName(SERIALIZED_NAME_INCLUDE_GROUP_ASSOCIATIONS) + @javax.annotation.Nullable + private Boolean includeGroupAssociations = false; + + public static final String SERIALIZED_NAME_INCLUDE_METADATA_ASSOCIATIONS = + "include_metadata_associations"; + + @SerializedName(SERIALIZED_NAME_INCLUDE_METADATA_ASSOCIATIONS) + @javax.annotation.Nullable + private Boolean includeMetadataAssociations = false; + + public static final String SERIALIZED_NAME_METADATA = "metadata"; + + @SerializedName(SERIALIZED_NAME_METADATA) + @javax.annotation.Nullable + private List metadata; + + /** Filter the action objects based on type */ + @JsonAdapter(TypeEnum.Adapter.class) + public enum TypeEnum { + CALLBACK("CALLBACK"), + + URL("URL"); + + private String value; + + TypeEnum(String value) { + this.value = value; + } + + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + public static TypeEnum fromValue(String value) { + for (TypeEnum b : TypeEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + + public static class Adapter extends TypeAdapter { + @Override + public void write(final JsonWriter jsonWriter, final TypeEnum enumeration) + throws IOException { + jsonWriter.value(enumeration.getValue()); + } + + @Override + public TypeEnum read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + return TypeEnum.fromValue(value); + } + } + + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + String value = jsonElement.getAsString(); + TypeEnum.fromValue(value); + } + } + + public static final String SERIALIZED_NAME_TYPE = "type"; + + @SerializedName(SERIALIZED_NAME_TYPE) + @javax.annotation.Nullable + private TypeEnum type; + + public SearchCustomActionsRequest() {} + + public SearchCustomActionsRequest customActionIdentifier( + @javax.annotation.Nullable String customActionIdentifier) { + this.customActionIdentifier = customActionIdentifier; + return this; + } + + /** + * Name or ID of the custom action. + * + * @return customActionIdentifier + */ + @javax.annotation.Nullable + public String getCustomActionIdentifier() { + return customActionIdentifier; + } + + public void setCustomActionIdentifier( + @javax.annotation.Nullable String customActionIdentifier) { + this.customActionIdentifier = customActionIdentifier; + } + + public SearchCustomActionsRequest namePattern(@javax.annotation.Nullable String namePattern) { + this.namePattern = namePattern; + return this; + } + + /** + * A pattern to match case-insensitive name of the custom-action object. + * + * @return namePattern + */ + @javax.annotation.Nullable + public String getNamePattern() { + return namePattern; + } + + public void setNamePattern(@javax.annotation.Nullable String namePattern) { + this.namePattern = namePattern; + } + + public SearchCustomActionsRequest defaultActionConfig( + @javax.annotation.Nullable DefaultActionConfigSearchInput defaultActionConfig) { + this.defaultActionConfig = defaultActionConfig; + return this; + } + + /** + * Default Custom action configuration. This includes if the custom action is available on all + * visualizations. By default, a custom action is added to all visualizations and Answers. + * + * @return defaultActionConfig + */ + @javax.annotation.Nullable + public DefaultActionConfigSearchInput getDefaultActionConfig() { + return defaultActionConfig; + } + + public void setDefaultActionConfig( + @javax.annotation.Nullable DefaultActionConfigSearchInput defaultActionConfig) { + this.defaultActionConfig = defaultActionConfig; + } + + public SearchCustomActionsRequest includeGroupAssociations( + @javax.annotation.Nullable Boolean includeGroupAssociations) { + this.includeGroupAssociations = includeGroupAssociations; + return this; + } + + /** + * When set to true, returns the associated groups for a custom action. + * + * @return includeGroupAssociations + */ + @javax.annotation.Nullable + public Boolean getIncludeGroupAssociations() { + return includeGroupAssociations; + } + + public void setIncludeGroupAssociations( + @javax.annotation.Nullable Boolean includeGroupAssociations) { + this.includeGroupAssociations = includeGroupAssociations; + } + + public SearchCustomActionsRequest includeMetadataAssociations( + @javax.annotation.Nullable Boolean includeMetadataAssociations) { + this.includeMetadataAssociations = includeMetadataAssociations; + return this; + } + + /** + * When set to true, returns the associated metadata for a custom action. + * + * @return includeMetadataAssociations + */ + @javax.annotation.Nullable + public Boolean getIncludeMetadataAssociations() { + return includeMetadataAssociations; + } + + public void setIncludeMetadataAssociations( + @javax.annotation.Nullable Boolean includeMetadataAssociations) { + this.includeMetadataAssociations = includeMetadataAssociations; + } + + public SearchCustomActionsRequest metadata( + @javax.annotation.Nullable List metadata) { + this.metadata = metadata; + return this; + } + + public SearchCustomActionsRequest addMetadataItem(CustomActionMetadataTypeInput metadataItem) { + if (this.metadata == null) { + this.metadata = new ArrayList<>(); + } + this.metadata.add(metadataItem); + return this; + } + + /** + * Search with a given metadata identifier. + * + * @return metadata + */ + @javax.annotation.Nullable + public List getMetadata() { + return metadata; + } + + public void setMetadata( + @javax.annotation.Nullable List metadata) { + this.metadata = metadata; + } + + public SearchCustomActionsRequest type(@javax.annotation.Nullable TypeEnum type) { + this.type = type; + return this; + } + + /** + * Filter the action objects based on type + * + * @return type + */ + @javax.annotation.Nullable + public TypeEnum getType() { + return type; + } + + public void setType(@javax.annotation.Nullable TypeEnum type) { + this.type = type; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key name of the property + * @param value value of the property + * @return the SearchCustomActionsRequest instance itself + */ + public SearchCustomActionsRequest putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return a map of objects + */ + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key name of the property + * @return an object + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + SearchCustomActionsRequest searchCustomActionsRequest = (SearchCustomActionsRequest) o; + return Objects.equals( + this.customActionIdentifier, + searchCustomActionsRequest.customActionIdentifier) + && Objects.equals(this.namePattern, searchCustomActionsRequest.namePattern) + && Objects.equals( + this.defaultActionConfig, searchCustomActionsRequest.defaultActionConfig) + && Objects.equals( + this.includeGroupAssociations, + searchCustomActionsRequest.includeGroupAssociations) + && Objects.equals( + this.includeMetadataAssociations, + searchCustomActionsRequest.includeMetadataAssociations) + && Objects.equals(this.metadata, searchCustomActionsRequest.metadata) + && Objects.equals(this.type, searchCustomActionsRequest.type) + && Objects.equals( + this.additionalProperties, searchCustomActionsRequest.additionalProperties); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b + || (a != null + && b != null + && a.isPresent() + && b.isPresent() + && Objects.deepEquals(a.get(), b.get())); + } + + @Override + public int hashCode() { + return Objects.hash( + customActionIdentifier, + namePattern, + defaultActionConfig, + includeGroupAssociations, + includeMetadataAssociations, + metadata, + type, + additionalProperties); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; + } + return a.isPresent() ? Arrays.deepHashCode(new Object[] {a.get()}) : 31; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class SearchCustomActionsRequest {\n"); + sb.append(" customActionIdentifier: ") + .append(toIndentedString(customActionIdentifier)) + .append("\n"); + sb.append(" namePattern: ").append(toIndentedString(namePattern)).append("\n"); + sb.append(" defaultActionConfig: ") + .append(toIndentedString(defaultActionConfig)) + .append("\n"); + sb.append(" includeGroupAssociations: ") + .append(toIndentedString(includeGroupAssociations)) + .append("\n"); + sb.append(" includeMetadataAssociations: ") + .append(toIndentedString(includeMetadataAssociations)) + .append("\n"); + sb.append(" metadata: ").append(toIndentedString(metadata)).append("\n"); + sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first + * line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("custom_action_identifier"); + openapiFields.add("name_pattern"); + openapiFields.add("default_action_config"); + openapiFields.add("include_group_associations"); + openapiFields.add("include_metadata_associations"); + openapiFields.add("metadata"); + openapiFields.add("type"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to SearchCustomActionsRequest + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!SearchCustomActionsRequest.openapiRequiredFields + .isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException( + String.format( + "The required field(s) %s in SearchCustomActionsRequest is not" + + " found in the empty JSON string", + SearchCustomActionsRequest.openapiRequiredFields.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if ((jsonObj.get("custom_action_identifier") != null + && !jsonObj.get("custom_action_identifier").isJsonNull()) + && !jsonObj.get("custom_action_identifier").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `custom_action_identifier` to be a primitive type" + + " in the JSON string but got `%s`", + jsonObj.get("custom_action_identifier").toString())); + } + if ((jsonObj.get("name_pattern") != null && !jsonObj.get("name_pattern").isJsonNull()) + && !jsonObj.get("name_pattern").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `name_pattern` to be a primitive type in the JSON" + + " string but got `%s`", + jsonObj.get("name_pattern").toString())); + } + // validate the optional field `default_action_config` + if (jsonObj.get("default_action_config") != null + && !jsonObj.get("default_action_config").isJsonNull()) { + DefaultActionConfigSearchInput.validateJsonElement( + jsonObj.get("default_action_config")); + } + if (jsonObj.get("metadata") != null && !jsonObj.get("metadata").isJsonNull()) { + JsonArray jsonArraymetadata = jsonObj.getAsJsonArray("metadata"); + if (jsonArraymetadata != null) { + // ensure the json data is an array + if (!jsonObj.get("metadata").isJsonArray()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `metadata` to be an array in the JSON" + + " string but got `%s`", + jsonObj.get("metadata").toString())); + } + + // validate the optional field `metadata` (array) + for (int i = 0; i < jsonArraymetadata.size(); i++) { + CustomActionMetadataTypeInput.validateJsonElement(jsonArraymetadata.get(i)); + } + ; + } + } + if ((jsonObj.get("type") != null && !jsonObj.get("type").isJsonNull()) + && !jsonObj.get("type").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `type` to be a primitive type in the JSON string" + + " but got `%s`", + jsonObj.get("type").toString())); + } + // validate the optional field `type` + if (jsonObj.get("type") != null && !jsonObj.get("type").isJsonNull()) { + TypeEnum.validateJsonElement(jsonObj.get("type")); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!SearchCustomActionsRequest.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'SearchCustomActionsRequest' and its + // subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter = + gson.getDelegateAdapter(this, TypeToken.get(SearchCustomActionsRequest.class)); + + return (TypeAdapter) + new TypeAdapter() { + @Override + public void write(JsonWriter out, SearchCustomActionsRequest value) + throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + obj.remove("additionalProperties"); + // serialize additional properties + if (value.getAdditionalProperties() != null) { + for (Map.Entry entry : + value.getAdditionalProperties().entrySet()) { + if (entry.getValue() instanceof String) + obj.addProperty(entry.getKey(), (String) entry.getValue()); + else if (entry.getValue() instanceof Number) + obj.addProperty(entry.getKey(), (Number) entry.getValue()); + else if (entry.getValue() instanceof Boolean) + obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); + else if (entry.getValue() instanceof Character) + obj.addProperty( + entry.getKey(), (Character) entry.getValue()); + else { + JsonElement jsonElement = gson.toJsonTree(entry.getValue()); + if (jsonElement.isJsonArray()) { + obj.add(entry.getKey(), jsonElement.getAsJsonArray()); + } else { + obj.add(entry.getKey(), jsonElement.getAsJsonObject()); + } + } + } + } + elementAdapter.write(out, obj); + } + + @Override + public SearchCustomActionsRequest read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // store additional fields in the deserialized instance + SearchCustomActionsRequest instance = thisAdapter.fromJsonTree(jsonObj); + for (Map.Entry entry : jsonObj.entrySet()) { + if (!openapiFields.contains(entry.getKey())) { + if (entry.getValue().isJsonPrimitive()) { // primitive type + if (entry.getValue().getAsJsonPrimitive().isString()) + instance.putAdditionalProperty( + entry.getKey(), entry.getValue().getAsString()); + else if (entry.getValue().getAsJsonPrimitive().isNumber()) + instance.putAdditionalProperty( + entry.getKey(), entry.getValue().getAsNumber()); + else if (entry.getValue().getAsJsonPrimitive().isBoolean()) + instance.putAdditionalProperty( + entry.getKey(), + entry.getValue().getAsBoolean()); + else + throw new IllegalArgumentException( + String.format( + "The field `%s` has unknown primitive" + + " type. Value: %s", + entry.getKey(), + entry.getValue().toString())); + } else if (entry.getValue().isJsonArray()) { + instance.putAdditionalProperty( + entry.getKey(), + gson.fromJson(entry.getValue(), List.class)); + } else { // JSON object + instance.putAdditionalProperty( + entry.getKey(), + gson.fromJson(entry.getValue(), HashMap.class)); + } + } + } + return instance; + } + }.nullSafe(); + } + } + + /** + * Create an instance of SearchCustomActionsRequest given an JSON string + * + * @param jsonString JSON string + * @return An instance of SearchCustomActionsRequest + * @throws IOException if the JSON string is invalid with respect to SearchCustomActionsRequest + */ + public static SearchCustomActionsRequest fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, SearchCustomActionsRequest.class); + } + + /** + * Convert an instance of SearchCustomActionsRequest to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} diff --git a/sdks/java/src/main/java/com/thoughtspot/client/model/SearchDataRequest.java b/sdks/java/src/main/java/com/thoughtspot/client/model/SearchDataRequest.java new file mode 100644 index 000000000..4c701bb90 --- /dev/null +++ b/sdks/java/src/main/java/com/thoughtspot/client/model/SearchDataRequest.java @@ -0,0 +1,607 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client.model; + +import com.google.gson.Gson; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.TypeAdapter; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.reflect.TypeToken; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import com.thoughtspot.client.JSON; +import java.io.IOException; +import java.io.Serializable; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Objects; + +/** SearchDataRequest */ +@javax.annotation.Generated( + value = "org.openapitools.codegen.languages.JavaClientCodegen", + comments = "Generator version: 7.12.0") +public class SearchDataRequest implements Serializable { + private static final long serialVersionUID = 1L; + + public static final String SERIALIZED_NAME_QUERY_STRING = "query_string"; + + @SerializedName(SERIALIZED_NAME_QUERY_STRING) + @javax.annotation.Nonnull + private String queryString; + + public static final String SERIALIZED_NAME_LOGICAL_TABLE_IDENTIFIER = + "logical_table_identifier"; + + @SerializedName(SERIALIZED_NAME_LOGICAL_TABLE_IDENTIFIER) + @javax.annotation.Nonnull + private String logicalTableIdentifier; + + /** + * JSON output in compact or full format. The FULL option is available in 9.12.5.cl or later. + */ + @JsonAdapter(DataFormatEnum.Adapter.class) + public enum DataFormatEnum { + FULL("FULL"), + + COMPACT("COMPACT"); + + private String value; + + DataFormatEnum(String value) { + this.value = value; + } + + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + public static DataFormatEnum fromValue(String value) { + for (DataFormatEnum b : DataFormatEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + + public static class Adapter extends TypeAdapter { + @Override + public void write(final JsonWriter jsonWriter, final DataFormatEnum enumeration) + throws IOException { + jsonWriter.value(enumeration.getValue()); + } + + @Override + public DataFormatEnum read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + return DataFormatEnum.fromValue(value); + } + } + + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + String value = jsonElement.getAsString(); + DataFormatEnum.fromValue(value); + } + } + + public static final String SERIALIZED_NAME_DATA_FORMAT = "data_format"; + + @SerializedName(SERIALIZED_NAME_DATA_FORMAT) + @javax.annotation.Nullable + private DataFormatEnum dataFormat = DataFormatEnum.COMPACT; + + public static final String SERIALIZED_NAME_RECORD_OFFSET = "record_offset"; + + @SerializedName(SERIALIZED_NAME_RECORD_OFFSET) + @javax.annotation.Nullable + private Integer recordOffset = 0; + + public static final String SERIALIZED_NAME_RECORD_SIZE = "record_size"; + + @SerializedName(SERIALIZED_NAME_RECORD_SIZE) + @javax.annotation.Nullable + private Integer recordSize = 10; + + public static final String SERIALIZED_NAME_RUNTIME_FILTER = "runtime_filter"; + + @SerializedName(SERIALIZED_NAME_RUNTIME_FILTER) + @javax.annotation.Nullable + private Object runtimeFilter; + + public static final String SERIALIZED_NAME_RUNTIME_SORT = "runtime_sort"; + + @SerializedName(SERIALIZED_NAME_RUNTIME_SORT) + @javax.annotation.Nullable + private Object runtimeSort; + + public static final String SERIALIZED_NAME_RUNTIME_PARAM_OVERRIDE = "runtime_param_override"; + + @SerializedName(SERIALIZED_NAME_RUNTIME_PARAM_OVERRIDE) + @javax.annotation.Nullable + private Object runtimeParamOverride; + + public SearchDataRequest() {} + + public SearchDataRequest queryString(@javax.annotation.Nonnull String queryString) { + this.queryString = queryString; + return this; + } + + /** + * Query string with search tokens. For example, <code>[Sales][Region]</code>. See + * [API + * Documentation](https://developers.thoughtspot.com/docs/fetch-data-and-report-apis#_search_data_api) + * + * @return queryString + */ + @javax.annotation.Nonnull + public String getQueryString() { + return queryString; + } + + public void setQueryString(@javax.annotation.Nonnull String queryString) { + this.queryString = queryString; + } + + public SearchDataRequest logicalTableIdentifier( + @javax.annotation.Nonnull String logicalTableIdentifier) { + this.logicalTableIdentifier = logicalTableIdentifier; + return this; + } + + /** + * GUID of the data source object, such as a Worksheet, View, or Table. You can find the GUID of + * a data object from the UI or via API. See [API + * Documentation](https://developers.thoughtspot.com/docs/fetch-data-and-report-apis#_search_query) + * for more details. + * + * @return logicalTableIdentifier + */ + @javax.annotation.Nonnull + public String getLogicalTableIdentifier() { + return logicalTableIdentifier; + } + + public void setLogicalTableIdentifier(@javax.annotation.Nonnull String logicalTableIdentifier) { + this.logicalTableIdentifier = logicalTableIdentifier; + } + + public SearchDataRequest dataFormat(@javax.annotation.Nullable DataFormatEnum dataFormat) { + this.dataFormat = dataFormat; + return this; + } + + /** + * JSON output in compact or full format. The FULL option is available in 9.12.5.cl or later. + * + * @return dataFormat + */ + @javax.annotation.Nullable + public DataFormatEnum getDataFormat() { + return dataFormat; + } + + public void setDataFormat(@javax.annotation.Nullable DataFormatEnum dataFormat) { + this.dataFormat = dataFormat; + } + + public SearchDataRequest recordOffset(@javax.annotation.Nullable Integer recordOffset) { + this.recordOffset = recordOffset; + return this; + } + + /** + * The starting record number from where the records should be included. + * + * @return recordOffset + */ + @javax.annotation.Nullable + public Integer getRecordOffset() { + return recordOffset; + } + + public void setRecordOffset(@javax.annotation.Nullable Integer recordOffset) { + this.recordOffset = recordOffset; + } + + public SearchDataRequest recordSize(@javax.annotation.Nullable Integer recordSize) { + this.recordSize = recordSize; + return this; + } + + /** + * The number of records to include in a batch. + * + * @return recordSize + */ + @javax.annotation.Nullable + public Integer getRecordSize() { + return recordSize; + } + + public void setRecordSize(@javax.annotation.Nullable Integer recordSize) { + this.recordSize = recordSize; + } + + public SearchDataRequest runtimeFilter(@javax.annotation.Nullable Object runtimeFilter) { + this.runtimeFilter = runtimeFilter; + return this; + } + + /** + * JSON object with representing filter condition to apply filters at runtime. For example, + * <code> {\"col1\": \"item type\", \"op1\": + * \"EQ\", \"val1\": \"Bags\"} </code>. You can add multiple + * keys by incrementing the number at the end, for example, col2, op2, val2, and col3, op3, + * val3. For more information, see [API + * Documentation](https://developers.thoughtspot.com/docs/fetch-data-and-report-apis#_runtime_filters). + * + * @return runtimeFilter + */ + @javax.annotation.Nullable + public Object getRuntimeFilter() { + return runtimeFilter; + } + + public void setRuntimeFilter(@javax.annotation.Nullable Object runtimeFilter) { + this.runtimeFilter = runtimeFilter; + } + + public SearchDataRequest runtimeSort(@javax.annotation.Nullable Object runtimeSort) { + this.runtimeSort = runtimeSort; + return this; + } + + /** + * JSON object representing columns to sort data at runtime. For example, <code> + * {\"sortCol1\": \"sales\", \"asc1\": true} </code>. You + * can add multiple keys by incrementing the number at the end, for example, sortCol1, asc2. For + * more information, see [API + * Documentation](https://developers.thoughtspot.com/docs/fetch-data-and-report-apis#_runtime_sort). + * + * @return runtimeSort + */ + @javax.annotation.Nullable + public Object getRuntimeSort() { + return runtimeSort; + } + + public void setRuntimeSort(@javax.annotation.Nullable Object runtimeSort) { + this.runtimeSort = runtimeSort; + } + + public SearchDataRequest runtimeParamOverride( + @javax.annotation.Nullable Object runtimeParamOverride) { + this.runtimeParamOverride = runtimeParamOverride; + return this; + } + + /** + * JSON object for setting values of parameters at runtime. For example, <code> + * {\"param1\": \"Double List Param\", \"paramVal1\": + * 0.5}</code>. You can add multiple keys by incrementing the number at the end, for + * example, param2, paramVal2. For more information, see [API + * Documentation](https://developers.thoughtspot.com/docs/fetch-data-and-report-apis#_runtime_parameters). + * + * @return runtimeParamOverride + */ + @javax.annotation.Nullable + public Object getRuntimeParamOverride() { + return runtimeParamOverride; + } + + public void setRuntimeParamOverride(@javax.annotation.Nullable Object runtimeParamOverride) { + this.runtimeParamOverride = runtimeParamOverride; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key name of the property + * @param value value of the property + * @return the SearchDataRequest instance itself + */ + public SearchDataRequest putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return a map of objects + */ + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key name of the property + * @return an object + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + SearchDataRequest searchDataRequest = (SearchDataRequest) o; + return Objects.equals(this.queryString, searchDataRequest.queryString) + && Objects.equals( + this.logicalTableIdentifier, searchDataRequest.logicalTableIdentifier) + && Objects.equals(this.dataFormat, searchDataRequest.dataFormat) + && Objects.equals(this.recordOffset, searchDataRequest.recordOffset) + && Objects.equals(this.recordSize, searchDataRequest.recordSize) + && Objects.equals(this.runtimeFilter, searchDataRequest.runtimeFilter) + && Objects.equals(this.runtimeSort, searchDataRequest.runtimeSort) + && Objects.equals(this.runtimeParamOverride, searchDataRequest.runtimeParamOverride) + && Objects.equals( + this.additionalProperties, searchDataRequest.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash( + queryString, + logicalTableIdentifier, + dataFormat, + recordOffset, + recordSize, + runtimeFilter, + runtimeSort, + runtimeParamOverride, + additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class SearchDataRequest {\n"); + sb.append(" queryString: ").append(toIndentedString(queryString)).append("\n"); + sb.append(" logicalTableIdentifier: ") + .append(toIndentedString(logicalTableIdentifier)) + .append("\n"); + sb.append(" dataFormat: ").append(toIndentedString(dataFormat)).append("\n"); + sb.append(" recordOffset: ").append(toIndentedString(recordOffset)).append("\n"); + sb.append(" recordSize: ").append(toIndentedString(recordSize)).append("\n"); + sb.append(" runtimeFilter: ").append(toIndentedString(runtimeFilter)).append("\n"); + sb.append(" runtimeSort: ").append(toIndentedString(runtimeSort)).append("\n"); + sb.append(" runtimeParamOverride: ") + .append(toIndentedString(runtimeParamOverride)) + .append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first + * line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("query_string"); + openapiFields.add("logical_table_identifier"); + openapiFields.add("data_format"); + openapiFields.add("record_offset"); + openapiFields.add("record_size"); + openapiFields.add("runtime_filter"); + openapiFields.add("runtime_sort"); + openapiFields.add("runtime_param_override"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + openapiRequiredFields.add("query_string"); + openapiRequiredFields.add("logical_table_identifier"); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to SearchDataRequest + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!SearchDataRequest.openapiRequiredFields + .isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException( + String.format( + "The required field(s) %s in SearchDataRequest is not found in the" + + " empty JSON string", + SearchDataRequest.openapiRequiredFields.toString())); + } + } + + // check to make sure all required properties/fields are present in the JSON string + for (String requiredField : SearchDataRequest.openapiRequiredFields) { + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException( + String.format( + "The required field `%s` is not found in the JSON string: %s", + requiredField, jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if (!jsonObj.get("query_string").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `query_string` to be a primitive type in the JSON" + + " string but got `%s`", + jsonObj.get("query_string").toString())); + } + if (!jsonObj.get("logical_table_identifier").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `logical_table_identifier` to be a primitive type" + + " in the JSON string but got `%s`", + jsonObj.get("logical_table_identifier").toString())); + } + if ((jsonObj.get("data_format") != null && !jsonObj.get("data_format").isJsonNull()) + && !jsonObj.get("data_format").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `data_format` to be a primitive type in the JSON" + + " string but got `%s`", + jsonObj.get("data_format").toString())); + } + // validate the optional field `data_format` + if (jsonObj.get("data_format") != null && !jsonObj.get("data_format").isJsonNull()) { + DataFormatEnum.validateJsonElement(jsonObj.get("data_format")); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!SearchDataRequest.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'SearchDataRequest' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter = + gson.getDelegateAdapter(this, TypeToken.get(SearchDataRequest.class)); + + return (TypeAdapter) + new TypeAdapter() { + @Override + public void write(JsonWriter out, SearchDataRequest value) + throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + obj.remove("additionalProperties"); + // serialize additional properties + if (value.getAdditionalProperties() != null) { + for (Map.Entry entry : + value.getAdditionalProperties().entrySet()) { + if (entry.getValue() instanceof String) + obj.addProperty(entry.getKey(), (String) entry.getValue()); + else if (entry.getValue() instanceof Number) + obj.addProperty(entry.getKey(), (Number) entry.getValue()); + else if (entry.getValue() instanceof Boolean) + obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); + else if (entry.getValue() instanceof Character) + obj.addProperty( + entry.getKey(), (Character) entry.getValue()); + else { + JsonElement jsonElement = gson.toJsonTree(entry.getValue()); + if (jsonElement.isJsonArray()) { + obj.add(entry.getKey(), jsonElement.getAsJsonArray()); + } else { + obj.add(entry.getKey(), jsonElement.getAsJsonObject()); + } + } + } + } + elementAdapter.write(out, obj); + } + + @Override + public SearchDataRequest read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // store additional fields in the deserialized instance + SearchDataRequest instance = thisAdapter.fromJsonTree(jsonObj); + for (Map.Entry entry : jsonObj.entrySet()) { + if (!openapiFields.contains(entry.getKey())) { + if (entry.getValue().isJsonPrimitive()) { // primitive type + if (entry.getValue().getAsJsonPrimitive().isString()) + instance.putAdditionalProperty( + entry.getKey(), entry.getValue().getAsString()); + else if (entry.getValue().getAsJsonPrimitive().isNumber()) + instance.putAdditionalProperty( + entry.getKey(), entry.getValue().getAsNumber()); + else if (entry.getValue().getAsJsonPrimitive().isBoolean()) + instance.putAdditionalProperty( + entry.getKey(), + entry.getValue().getAsBoolean()); + else + throw new IllegalArgumentException( + String.format( + "The field `%s` has unknown primitive" + + " type. Value: %s", + entry.getKey(), + entry.getValue().toString())); + } else if (entry.getValue().isJsonArray()) { + instance.putAdditionalProperty( + entry.getKey(), + gson.fromJson(entry.getValue(), List.class)); + } else { // JSON object + instance.putAdditionalProperty( + entry.getKey(), + gson.fromJson(entry.getValue(), HashMap.class)); + } + } + } + return instance; + } + }.nullSafe(); + } + } + + /** + * Create an instance of SearchDataRequest given an JSON string + * + * @param jsonString JSON string + * @return An instance of SearchDataRequest + * @throws IOException if the JSON string is invalid with respect to SearchDataRequest + */ + public static SearchDataRequest fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, SearchDataRequest.class); + } + + /** + * Convert an instance of SearchDataRequest to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} diff --git a/sdks/java/src/main/java/com/thoughtspot/client/model/SearchDataResponse.java b/sdks/java/src/main/java/com/thoughtspot/client/model/SearchDataResponse.java new file mode 100644 index 000000000..98d3d3fe0 --- /dev/null +++ b/sdks/java/src/main/java/com/thoughtspot/client/model/SearchDataResponse.java @@ -0,0 +1,320 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client.model; + +import com.google.gson.Gson; +import com.google.gson.JsonArray; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.TypeAdapter; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.annotations.SerializedName; +import com.google.gson.reflect.TypeToken; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import com.thoughtspot.client.JSON; +import java.io.IOException; +import java.io.Serializable; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Objects; + +/** Response format associated with the search data API. */ +@javax.annotation.Generated( + value = "org.openapitools.codegen.languages.JavaClientCodegen", + comments = "Generator version: 7.12.0") +public class SearchDataResponse implements Serializable { + private static final long serialVersionUID = 1L; + + public static final String SERIALIZED_NAME_CONTENTS = "contents"; + + @SerializedName(SERIALIZED_NAME_CONTENTS) + @javax.annotation.Nonnull + private List contents; + + public SearchDataResponse() {} + + public SearchDataResponse contents(@javax.annotation.Nonnull List contents) { + this.contents = contents; + return this; + } + + public SearchDataResponse addContentsItem(AnswerContent contentsItem) { + if (this.contents == null) { + this.contents = new ArrayList<>(); + } + this.contents.add(contentsItem); + return this; + } + + /** + * Data content of metadata objects + * + * @return contents + */ + @javax.annotation.Nonnull + public List getContents() { + return contents; + } + + public void setContents(@javax.annotation.Nonnull List contents) { + this.contents = contents; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key name of the property + * @param value value of the property + * @return the SearchDataResponse instance itself + */ + public SearchDataResponse putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return a map of objects + */ + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key name of the property + * @return an object + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + SearchDataResponse searchDataResponse = (SearchDataResponse) o; + return Objects.equals(this.contents, searchDataResponse.contents) + && Objects.equals( + this.additionalProperties, searchDataResponse.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(contents, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class SearchDataResponse {\n"); + sb.append(" contents: ").append(toIndentedString(contents)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first + * line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("contents"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + openapiRequiredFields.add("contents"); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to SearchDataResponse + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!SearchDataResponse.openapiRequiredFields + .isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException( + String.format( + "The required field(s) %s in SearchDataResponse is not found in" + + " the empty JSON string", + SearchDataResponse.openapiRequiredFields.toString())); + } + } + + // check to make sure all required properties/fields are present in the JSON string + for (String requiredField : SearchDataResponse.openapiRequiredFields) { + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException( + String.format( + "The required field `%s` is not found in the JSON string: %s", + requiredField, jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // ensure the json data is an array + if (!jsonObj.get("contents").isJsonArray()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `contents` to be an array in the JSON string but" + + " got `%s`", + jsonObj.get("contents").toString())); + } + + JsonArray jsonArraycontents = jsonObj.getAsJsonArray("contents"); + // validate the required field `contents` (array) + for (int i = 0; i < jsonArraycontents.size(); i++) { + AnswerContent.validateJsonElement(jsonArraycontents.get(i)); + } + ; + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!SearchDataResponse.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'SearchDataResponse' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter = + gson.getDelegateAdapter(this, TypeToken.get(SearchDataResponse.class)); + + return (TypeAdapter) + new TypeAdapter() { + @Override + public void write(JsonWriter out, SearchDataResponse value) + throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + obj.remove("additionalProperties"); + // serialize additional properties + if (value.getAdditionalProperties() != null) { + for (Map.Entry entry : + value.getAdditionalProperties().entrySet()) { + if (entry.getValue() instanceof String) + obj.addProperty(entry.getKey(), (String) entry.getValue()); + else if (entry.getValue() instanceof Number) + obj.addProperty(entry.getKey(), (Number) entry.getValue()); + else if (entry.getValue() instanceof Boolean) + obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); + else if (entry.getValue() instanceof Character) + obj.addProperty( + entry.getKey(), (Character) entry.getValue()); + else { + JsonElement jsonElement = gson.toJsonTree(entry.getValue()); + if (jsonElement.isJsonArray()) { + obj.add(entry.getKey(), jsonElement.getAsJsonArray()); + } else { + obj.add(entry.getKey(), jsonElement.getAsJsonObject()); + } + } + } + } + elementAdapter.write(out, obj); + } + + @Override + public SearchDataResponse read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // store additional fields in the deserialized instance + SearchDataResponse instance = thisAdapter.fromJsonTree(jsonObj); + for (Map.Entry entry : jsonObj.entrySet()) { + if (!openapiFields.contains(entry.getKey())) { + if (entry.getValue().isJsonPrimitive()) { // primitive type + if (entry.getValue().getAsJsonPrimitive().isString()) + instance.putAdditionalProperty( + entry.getKey(), entry.getValue().getAsString()); + else if (entry.getValue().getAsJsonPrimitive().isNumber()) + instance.putAdditionalProperty( + entry.getKey(), entry.getValue().getAsNumber()); + else if (entry.getValue().getAsJsonPrimitive().isBoolean()) + instance.putAdditionalProperty( + entry.getKey(), + entry.getValue().getAsBoolean()); + else + throw new IllegalArgumentException( + String.format( + "The field `%s` has unknown primitive" + + " type. Value: %s", + entry.getKey(), + entry.getValue().toString())); + } else if (entry.getValue().isJsonArray()) { + instance.putAdditionalProperty( + entry.getKey(), + gson.fromJson(entry.getValue(), List.class)); + } else { // JSON object + instance.putAdditionalProperty( + entry.getKey(), + gson.fromJson(entry.getValue(), HashMap.class)); + } + } + } + return instance; + } + }.nullSafe(); + } + } + + /** + * Create an instance of SearchDataResponse given an JSON string + * + * @param jsonString JSON string + * @return An instance of SearchDataResponse + * @throws IOException if the JSON string is invalid with respect to SearchDataResponse + */ + public static SearchDataResponse fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, SearchDataResponse.class); + } + + /** + * Convert an instance of SearchDataResponse to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} diff --git a/sdks/java/src/main/java/com/thoughtspot/client/model/SearchEmailCustomizationRequest.java b/sdks/java/src/main/java/com/thoughtspot/client/model/SearchEmailCustomizationRequest.java new file mode 100644 index 000000000..c071e746e --- /dev/null +++ b/sdks/java/src/main/java/com/thoughtspot/client/model/SearchEmailCustomizationRequest.java @@ -0,0 +1,312 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client.model; + +import com.google.gson.Gson; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.TypeAdapter; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.annotations.SerializedName; +import com.google.gson.reflect.TypeToken; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import com.thoughtspot.client.JSON; +import java.io.IOException; +import java.io.Serializable; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Objects; + +/** SearchEmailCustomizationRequest */ +@javax.annotation.Generated( + value = "org.openapitools.codegen.languages.JavaClientCodegen", + comments = "Generator version: 7.12.0") +public class SearchEmailCustomizationRequest implements Serializable { + private static final long serialVersionUID = 1L; + + public static final String SERIALIZED_NAME_ORG_IDENTIFIERS = "org_identifiers"; + + @SerializedName(SERIALIZED_NAME_ORG_IDENTIFIERS) + @javax.annotation.Nullable + private List orgIdentifiers; + + public SearchEmailCustomizationRequest() {} + + public SearchEmailCustomizationRequest orgIdentifiers( + @javax.annotation.Nullable List orgIdentifiers) { + this.orgIdentifiers = orgIdentifiers; + return this; + } + + public SearchEmailCustomizationRequest addOrgIdentifiersItem(String orgIdentifiersItem) { + if (this.orgIdentifiers == null) { + this.orgIdentifiers = new ArrayList<>(); + } + this.orgIdentifiers.add(orgIdentifiersItem); + return this; + } + + /** + * Unique ID or name of org Version: 10.12.0.cl or later + * + * @return orgIdentifiers + */ + @javax.annotation.Nullable + public List getOrgIdentifiers() { + return orgIdentifiers; + } + + public void setOrgIdentifiers(@javax.annotation.Nullable List orgIdentifiers) { + this.orgIdentifiers = orgIdentifiers; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key name of the property + * @param value value of the property + * @return the SearchEmailCustomizationRequest instance itself + */ + public SearchEmailCustomizationRequest putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return a map of objects + */ + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key name of the property + * @return an object + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + SearchEmailCustomizationRequest searchEmailCustomizationRequest = + (SearchEmailCustomizationRequest) o; + return Objects.equals(this.orgIdentifiers, searchEmailCustomizationRequest.orgIdentifiers) + && Objects.equals( + this.additionalProperties, + searchEmailCustomizationRequest.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(orgIdentifiers, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class SearchEmailCustomizationRequest {\n"); + sb.append(" orgIdentifiers: ").append(toIndentedString(orgIdentifiers)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first + * line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("org_identifiers"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to + * SearchEmailCustomizationRequest + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!SearchEmailCustomizationRequest.openapiRequiredFields + .isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException( + String.format( + "The required field(s) %s in SearchEmailCustomizationRequest is" + + " not found in the empty JSON string", + SearchEmailCustomizationRequest.openapiRequiredFields.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // ensure the optional json data is an array if present + if (jsonObj.get("org_identifiers") != null + && !jsonObj.get("org_identifiers").isJsonNull() + && !jsonObj.get("org_identifiers").isJsonArray()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `org_identifiers` to be an array in the JSON" + + " string but got `%s`", + jsonObj.get("org_identifiers").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!SearchEmailCustomizationRequest.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'SearchEmailCustomizationRequest' and its + // subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter = + gson.getDelegateAdapter( + this, TypeToken.get(SearchEmailCustomizationRequest.class)); + + return (TypeAdapter) + new TypeAdapter() { + @Override + public void write(JsonWriter out, SearchEmailCustomizationRequest value) + throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + obj.remove("additionalProperties"); + // serialize additional properties + if (value.getAdditionalProperties() != null) { + for (Map.Entry entry : + value.getAdditionalProperties().entrySet()) { + if (entry.getValue() instanceof String) + obj.addProperty(entry.getKey(), (String) entry.getValue()); + else if (entry.getValue() instanceof Number) + obj.addProperty(entry.getKey(), (Number) entry.getValue()); + else if (entry.getValue() instanceof Boolean) + obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); + else if (entry.getValue() instanceof Character) + obj.addProperty( + entry.getKey(), (Character) entry.getValue()); + else { + JsonElement jsonElement = gson.toJsonTree(entry.getValue()); + if (jsonElement.isJsonArray()) { + obj.add(entry.getKey(), jsonElement.getAsJsonArray()); + } else { + obj.add(entry.getKey(), jsonElement.getAsJsonObject()); + } + } + } + } + elementAdapter.write(out, obj); + } + + @Override + public SearchEmailCustomizationRequest read(JsonReader in) + throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // store additional fields in the deserialized instance + SearchEmailCustomizationRequest instance = + thisAdapter.fromJsonTree(jsonObj); + for (Map.Entry entry : jsonObj.entrySet()) { + if (!openapiFields.contains(entry.getKey())) { + if (entry.getValue().isJsonPrimitive()) { // primitive type + if (entry.getValue().getAsJsonPrimitive().isString()) + instance.putAdditionalProperty( + entry.getKey(), entry.getValue().getAsString()); + else if (entry.getValue().getAsJsonPrimitive().isNumber()) + instance.putAdditionalProperty( + entry.getKey(), entry.getValue().getAsNumber()); + else if (entry.getValue().getAsJsonPrimitive().isBoolean()) + instance.putAdditionalProperty( + entry.getKey(), + entry.getValue().getAsBoolean()); + else + throw new IllegalArgumentException( + String.format( + "The field `%s` has unknown primitive" + + " type. Value: %s", + entry.getKey(), + entry.getValue().toString())); + } else if (entry.getValue().isJsonArray()) { + instance.putAdditionalProperty( + entry.getKey(), + gson.fromJson(entry.getValue(), List.class)); + } else { // JSON object + instance.putAdditionalProperty( + entry.getKey(), + gson.fromJson(entry.getValue(), HashMap.class)); + } + } + } + return instance; + } + }.nullSafe(); + } + } + + /** + * Create an instance of SearchEmailCustomizationRequest given an JSON string + * + * @param jsonString JSON string + * @return An instance of SearchEmailCustomizationRequest + * @throws IOException if the JSON string is invalid with respect to + * SearchEmailCustomizationRequest + */ + public static SearchEmailCustomizationRequest fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, SearchEmailCustomizationRequest.class); + } + + /** + * Convert an instance of SearchEmailCustomizationRequest to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} diff --git a/sdks/java/src/main/java/com/thoughtspot/client/model/SearchMetadataRequest.java b/sdks/java/src/main/java/com/thoughtspot/client/model/SearchMetadataRequest.java new file mode 100644 index 000000000..8e2960f62 --- /dev/null +++ b/sdks/java/src/main/java/com/thoughtspot/client/model/SearchMetadataRequest.java @@ -0,0 +1,1434 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client.model; + +import com.google.gson.Gson; +import com.google.gson.JsonArray; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.TypeAdapter; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.reflect.TypeToken; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import com.thoughtspot.client.JSON; +import java.io.IOException; +import java.io.Serializable; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Objects; +import org.openapitools.jackson.nullable.JsonNullable; + +/** SearchMetadataRequest */ +@javax.annotation.Generated( + value = "org.openapitools.codegen.languages.JavaClientCodegen", + comments = "Generator version: 7.12.0") +public class SearchMetadataRequest implements Serializable { + private static final long serialVersionUID = 1L; + + public static final String SERIALIZED_NAME_METADATA = "metadata"; + + @SerializedName(SERIALIZED_NAME_METADATA) + @javax.annotation.Nullable + private List metadata; + + public static final String SERIALIZED_NAME_PERMISSIONS = "permissions"; + + @SerializedName(SERIALIZED_NAME_PERMISSIONS) + @javax.annotation.Nullable + private List permissions; + + public static final String SERIALIZED_NAME_CREATED_BY_USER_IDENTIFIERS = + "created_by_user_identifiers"; + + @SerializedName(SERIALIZED_NAME_CREATED_BY_USER_IDENTIFIERS) + @javax.annotation.Nullable + private List createdByUserIdentifiers; + + /** Version of the dependent table of the metadata objects like Worksheets. */ + @JsonAdapter(DependentObjectVersionEnum.Adapter.class) + public enum DependentObjectVersionEnum { + V1("V1"), + + V2("V2"); + + private String value; + + DependentObjectVersionEnum(String value) { + this.value = value; + } + + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + public static DependentObjectVersionEnum fromValue(String value) { + for (DependentObjectVersionEnum b : DependentObjectVersionEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + + public static class Adapter extends TypeAdapter { + @Override + public void write( + final JsonWriter jsonWriter, final DependentObjectVersionEnum enumeration) + throws IOException { + jsonWriter.value(enumeration.getValue()); + } + + @Override + public DependentObjectVersionEnum read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + return DependentObjectVersionEnum.fromValue(value); + } + } + + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + String value = jsonElement.getAsString(); + DependentObjectVersionEnum.fromValue(value); + } + } + + public static final String SERIALIZED_NAME_DEPENDENT_OBJECT_VERSION = + "dependent_object_version"; + + @SerializedName(SERIALIZED_NAME_DEPENDENT_OBJECT_VERSION) + @javax.annotation.Nullable + private DependentObjectVersionEnum dependentObjectVersion = DependentObjectVersionEnum.V1; + + public static final String SERIALIZED_NAME_EXCLUDE_OBJECTS = "exclude_objects"; + + @SerializedName(SERIALIZED_NAME_EXCLUDE_OBJECTS) + @javax.annotation.Nullable + private List excludeObjects; + + public static final String SERIALIZED_NAME_FAVORITE_OBJECT_OPTIONS = "favorite_object_options"; + + @SerializedName(SERIALIZED_NAME_FAVORITE_OBJECT_OPTIONS) + @javax.annotation.Nullable + private FavoriteObjectOptionsInput favoriteObjectOptions; + + public static final String SERIALIZED_NAME_INCLUDE_AUTO_CREATED_OBJECTS = + "include_auto_created_objects"; + + @SerializedName(SERIALIZED_NAME_INCLUDE_AUTO_CREATED_OBJECTS) + @javax.annotation.Nullable + private Boolean includeAutoCreatedObjects = false; + + public static final String SERIALIZED_NAME_INCLUDE_DEPENDENT_OBJECTS = + "include_dependent_objects"; + + @SerializedName(SERIALIZED_NAME_INCLUDE_DEPENDENT_OBJECTS) + @javax.annotation.Nullable + private Boolean includeDependentObjects = false; + + public static final String SERIALIZED_NAME_DEPENDENT_OBJECTS_RECORD_SIZE = + "dependent_objects_record_size"; + + @SerializedName(SERIALIZED_NAME_DEPENDENT_OBJECTS_RECORD_SIZE) + @javax.annotation.Nullable + private Integer dependentObjectsRecordSize = 50; + + public static final String SERIALIZED_NAME_INCLUDE_DETAILS = "include_details"; + + @SerializedName(SERIALIZED_NAME_INCLUDE_DETAILS) + @javax.annotation.Nullable + private Boolean includeDetails = false; + + public static final String SERIALIZED_NAME_INCLUDE_PERSONALISED_VIEWS = + "include_personalised_views"; + + @SerializedName(SERIALIZED_NAME_INCLUDE_PERSONALISED_VIEWS) + @javax.annotation.Nullable + private Boolean includePersonalisedViews = false; + + public static final String SERIALIZED_NAME_INCLUDE_HEADERS = "include_headers"; + + @SerializedName(SERIALIZED_NAME_INCLUDE_HEADERS) + @javax.annotation.Nullable + private Boolean includeHeaders = true; + + public static final String SERIALIZED_NAME_INCLUDE_HIDDEN_OBJECTS = "include_hidden_objects"; + + @SerializedName(SERIALIZED_NAME_INCLUDE_HIDDEN_OBJECTS) + @javax.annotation.Nullable + private Boolean includeHiddenObjects = false; + + public static final String SERIALIZED_NAME_INCLUDE_INCOMPLETE_OBJECTS = + "include_incomplete_objects"; + + @SerializedName(SERIALIZED_NAME_INCLUDE_INCOMPLETE_OBJECTS) + @javax.annotation.Nullable + private Boolean includeIncompleteObjects = false; + + public static final String SERIALIZED_NAME_INCLUDE_VISUALIZATION_HEADERS = + "include_visualization_headers"; + + @SerializedName(SERIALIZED_NAME_INCLUDE_VISUALIZATION_HEADERS) + @javax.annotation.Nullable + private Boolean includeVisualizationHeaders = false; + + public static final String SERIALIZED_NAME_INCLUDE_WORKSHEET_SEARCH_ASSIST_DATA = + "include_worksheet_search_assist_data"; + + @SerializedName(SERIALIZED_NAME_INCLUDE_WORKSHEET_SEARCH_ASSIST_DATA) + @javax.annotation.Nullable + private Boolean includeWorksheetSearchAssistData; + + public static final String SERIALIZED_NAME_MODIFIED_BY_USER_IDENTIFIERS = + "modified_by_user_identifiers"; + + @SerializedName(SERIALIZED_NAME_MODIFIED_BY_USER_IDENTIFIERS) + @javax.annotation.Nullable + private List modifiedByUserIdentifiers; + + public static final String SERIALIZED_NAME_RECORD_OFFSET = "record_offset"; + + @SerializedName(SERIALIZED_NAME_RECORD_OFFSET) + @javax.annotation.Nullable + private Integer recordOffset = 0; + + public static final String SERIALIZED_NAME_RECORD_SIZE = "record_size"; + + @SerializedName(SERIALIZED_NAME_RECORD_SIZE) + @javax.annotation.Nullable + private Integer recordSize = 10; + + public static final String SERIALIZED_NAME_SORT_OPTIONS = "sort_options"; + + @SerializedName(SERIALIZED_NAME_SORT_OPTIONS) + @javax.annotation.Nullable + private MetadataSearchSortOptions sortOptions; + + public static final String SERIALIZED_NAME_TAG_IDENTIFIERS = "tag_identifiers"; + + @SerializedName(SERIALIZED_NAME_TAG_IDENTIFIERS) + @javax.annotation.Nullable + private List tagIdentifiers; + + public static final String SERIALIZED_NAME_INCLUDE_STATS = "include_stats"; + + @SerializedName(SERIALIZED_NAME_INCLUDE_STATS) + @javax.annotation.Nullable + private Boolean includeStats = false; + + public static final String SERIALIZED_NAME_INCLUDE_DISCOVERABLE_OBJECTS = + "include_discoverable_objects"; + + @SerializedName(SERIALIZED_NAME_INCLUDE_DISCOVERABLE_OBJECTS) + @javax.annotation.Nullable + private Boolean includeDiscoverableObjects = true; + + public static final String SERIALIZED_NAME_SHOW_RESOLVED_PARAMETERS = + "show_resolved_parameters"; + + @SerializedName(SERIALIZED_NAME_SHOW_RESOLVED_PARAMETERS) + @javax.annotation.Nullable + private Boolean showResolvedParameters = false; + + /** Indicates the model version of Liveboard to be attached in metadata detail. */ + @JsonAdapter(LiveboardResponseVersionEnum.Adapter.class) + public enum LiveboardResponseVersionEnum { + V1("V1"), + + V2("V2"); + + private String value; + + LiveboardResponseVersionEnum(String value) { + this.value = value; + } + + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + public static LiveboardResponseVersionEnum fromValue(String value) { + for (LiveboardResponseVersionEnum b : LiveboardResponseVersionEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + + public static class Adapter extends TypeAdapter { + @Override + public void write( + final JsonWriter jsonWriter, final LiveboardResponseVersionEnum enumeration) + throws IOException { + jsonWriter.value(enumeration.getValue()); + } + + @Override + public LiveboardResponseVersionEnum read(final JsonReader jsonReader) + throws IOException { + String value = jsonReader.nextString(); + return LiveboardResponseVersionEnum.fromValue(value); + } + } + + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + String value = jsonElement.getAsString(); + LiveboardResponseVersionEnum.fromValue(value); + } + } + + public static final String SERIALIZED_NAME_LIVEBOARD_RESPONSE_VERSION = + "liveboard_response_version"; + + @SerializedName(SERIALIZED_NAME_LIVEBOARD_RESPONSE_VERSION) + @javax.annotation.Nullable + private LiveboardResponseVersionEnum liveboardResponseVersion = LiveboardResponseVersionEnum.V1; + + public static final String SERIALIZED_NAME_INCLUDE_ONLY_PUBLISHED_OBJECTS = + "include_only_published_objects"; + + @SerializedName(SERIALIZED_NAME_INCLUDE_ONLY_PUBLISHED_OBJECTS) + @javax.annotation.Nullable + private Boolean includeOnlyPublishedObjects = false; + + public SearchMetadataRequest() {} + + public SearchMetadataRequest metadata( + @javax.annotation.Nullable List metadata) { + this.metadata = metadata; + return this; + } + + public SearchMetadataRequest addMetadataItem(MetadataListItemInput metadataItem) { + if (this.metadata == null) { + this.metadata = new ArrayList<>(); + } + this.metadata.add(metadataItem); + return this; + } + + /** + * Metadata objects such as Liveboards, Answers, and Worksheets. + * + * @return metadata + */ + @javax.annotation.Nullable + public List getMetadata() { + return metadata; + } + + public void setMetadata(@javax.annotation.Nullable List metadata) { + this.metadata = metadata; + } + + public SearchMetadataRequest permissions( + @javax.annotation.Nullable List permissions) { + this.permissions = permissions; + return this; + } + + public SearchMetadataRequest addPermissionsItem(PermissionInput permissionsItem) { + if (this.permissions == null) { + this.permissions = new ArrayList<>(); + } + this.permissions.add(permissionsItem); + return this; + } + + /** + * Object permission details to search by. + * + * @return permissions + */ + @javax.annotation.Nullable + public List getPermissions() { + return permissions; + } + + public void setPermissions(@javax.annotation.Nullable List permissions) { + this.permissions = permissions; + } + + public SearchMetadataRequest createdByUserIdentifiers( + @javax.annotation.Nullable List createdByUserIdentifiers) { + this.createdByUserIdentifiers = createdByUserIdentifiers; + return this; + } + + public SearchMetadataRequest addCreatedByUserIdentifiersItem( + String createdByUserIdentifiersItem) { + if (this.createdByUserIdentifiers == null) { + this.createdByUserIdentifiers = new ArrayList<>(); + } + this.createdByUserIdentifiers.add(createdByUserIdentifiersItem); + return this; + } + + /** + * GUID or name of user who created the metadata object. + * + * @return createdByUserIdentifiers + */ + @javax.annotation.Nullable + public List getCreatedByUserIdentifiers() { + return createdByUserIdentifiers; + } + + public void setCreatedByUserIdentifiers( + @javax.annotation.Nullable List createdByUserIdentifiers) { + this.createdByUserIdentifiers = createdByUserIdentifiers; + } + + public SearchMetadataRequest dependentObjectVersion( + @javax.annotation.Nullable DependentObjectVersionEnum dependentObjectVersion) { + this.dependentObjectVersion = dependentObjectVersion; + return this; + } + + /** + * Version of the dependent table of the metadata objects like Worksheets. + * + * @return dependentObjectVersion + */ + @javax.annotation.Nullable + public DependentObjectVersionEnum getDependentObjectVersion() { + return dependentObjectVersion; + } + + public void setDependentObjectVersion( + @javax.annotation.Nullable DependentObjectVersionEnum dependentObjectVersion) { + this.dependentObjectVersion = dependentObjectVersion; + } + + public SearchMetadataRequest excludeObjects( + @javax.annotation.Nullable List excludeObjects) { + this.excludeObjects = excludeObjects; + return this; + } + + public SearchMetadataRequest addExcludeObjectsItem( + ExcludeMetadataListItemInput excludeObjectsItem) { + if (this.excludeObjects == null) { + this.excludeObjects = new ArrayList<>(); + } + this.excludeObjects.add(excludeObjectsItem); + return this; + } + + /** + * List of metadata objects to exclude from search. + * + * @return excludeObjects + */ + @javax.annotation.Nullable + public List getExcludeObjects() { + return excludeObjects; + } + + public void setExcludeObjects( + @javax.annotation.Nullable List excludeObjects) { + this.excludeObjects = excludeObjects; + } + + public SearchMetadataRequest favoriteObjectOptions( + @javax.annotation.Nullable FavoriteObjectOptionsInput favoriteObjectOptions) { + this.favoriteObjectOptions = favoriteObjectOptions; + return this; + } + + /** + * Options to sort the API response by objects set as favorites for the logged-in user or the + * users specified in the API request. + * + * @return favoriteObjectOptions + */ + @javax.annotation.Nullable + public FavoriteObjectOptionsInput getFavoriteObjectOptions() { + return favoriteObjectOptions; + } + + public void setFavoriteObjectOptions( + @javax.annotation.Nullable FavoriteObjectOptionsInput favoriteObjectOptions) { + this.favoriteObjectOptions = favoriteObjectOptions; + } + + public SearchMetadataRequest includeAutoCreatedObjects( + @javax.annotation.Nullable Boolean includeAutoCreatedObjects) { + this.includeAutoCreatedObjects = includeAutoCreatedObjects; + return this; + } + + /** + * Includes system-generated metadata objects. + * + * @return includeAutoCreatedObjects + */ + @javax.annotation.Nullable + public Boolean getIncludeAutoCreatedObjects() { + return includeAutoCreatedObjects; + } + + public void setIncludeAutoCreatedObjects( + @javax.annotation.Nullable Boolean includeAutoCreatedObjects) { + this.includeAutoCreatedObjects = includeAutoCreatedObjects; + } + + public SearchMetadataRequest includeDependentObjects( + @javax.annotation.Nullable Boolean includeDependentObjects) { + this.includeDependentObjects = includeDependentObjects; + return this; + } + + /** + * Includes dependents of the metadata object specified in the API request. For example, a + * worksheet can consist of dependent objects such as Liveboards or Answers. + * + * @return includeDependentObjects + */ + @javax.annotation.Nullable + public Boolean getIncludeDependentObjects() { + return includeDependentObjects; + } + + public void setIncludeDependentObjects( + @javax.annotation.Nullable Boolean includeDependentObjects) { + this.includeDependentObjects = includeDependentObjects; + } + + public SearchMetadataRequest dependentObjectsRecordSize( + @javax.annotation.Nullable Integer dependentObjectsRecordSize) { + this.dependentObjectsRecordSize = dependentObjectsRecordSize; + return this; + } + + /** + * The maximum number of dependents to include per metadata object. + * + * @return dependentObjectsRecordSize + */ + @javax.annotation.Nullable + public Integer getDependentObjectsRecordSize() { + return dependentObjectsRecordSize; + } + + public void setDependentObjectsRecordSize( + @javax.annotation.Nullable Integer dependentObjectsRecordSize) { + this.dependentObjectsRecordSize = dependentObjectsRecordSize; + } + + public SearchMetadataRequest includeDetails(@javax.annotation.Nullable Boolean includeDetails) { + this.includeDetails = includeDetails; + return this; + } + + /** + * Includes complete details of the metadata objects. + * + * @return includeDetails + */ + @javax.annotation.Nullable + public Boolean getIncludeDetails() { + return includeDetails; + } + + public void setIncludeDetails(@javax.annotation.Nullable Boolean includeDetails) { + this.includeDetails = includeDetails; + } + + public SearchMetadataRequest includePersonalisedViews( + @javax.annotation.Nullable Boolean includePersonalisedViews) { + this.includePersonalisedViews = includePersonalisedViews; + return this; + } + + /** + * When set to true and include_details is also true, includes personalised views in the + * metadata_detail for LIVEBOARD objects. + * + * @return includePersonalisedViews + */ + @javax.annotation.Nullable + public Boolean getIncludePersonalisedViews() { + return includePersonalisedViews; + } + + public void setIncludePersonalisedViews( + @javax.annotation.Nullable Boolean includePersonalisedViews) { + this.includePersonalisedViews = includePersonalisedViews; + } + + public SearchMetadataRequest includeHeaders(@javax.annotation.Nullable Boolean includeHeaders) { + this.includeHeaders = includeHeaders; + return this; + } + + /** + * Includes headers of the metadata objects. + * + * @return includeHeaders + */ + @javax.annotation.Nullable + public Boolean getIncludeHeaders() { + return includeHeaders; + } + + public void setIncludeHeaders(@javax.annotation.Nullable Boolean includeHeaders) { + this.includeHeaders = includeHeaders; + } + + public SearchMetadataRequest includeHiddenObjects( + @javax.annotation.Nullable Boolean includeHiddenObjects) { + this.includeHiddenObjects = includeHiddenObjects; + return this; + } + + /** + * Includes details of the hidden objects, such as a column in a worksheet or a table. + * + * @return includeHiddenObjects + */ + @javax.annotation.Nullable + public Boolean getIncludeHiddenObjects() { + return includeHiddenObjects; + } + + public void setIncludeHiddenObjects(@javax.annotation.Nullable Boolean includeHiddenObjects) { + this.includeHiddenObjects = includeHiddenObjects; + } + + public SearchMetadataRequest includeIncompleteObjects( + @javax.annotation.Nullable Boolean includeIncompleteObjects) { + this.includeIncompleteObjects = includeIncompleteObjects; + return this; + } + + /** + * Includes objects with incomplete metadata. + * + * @return includeIncompleteObjects + */ + @javax.annotation.Nullable + public Boolean getIncludeIncompleteObjects() { + return includeIncompleteObjects; + } + + public void setIncludeIncompleteObjects( + @javax.annotation.Nullable Boolean includeIncompleteObjects) { + this.includeIncompleteObjects = includeIncompleteObjects; + } + + public SearchMetadataRequest includeVisualizationHeaders( + @javax.annotation.Nullable Boolean includeVisualizationHeaders) { + this.includeVisualizationHeaders = includeVisualizationHeaders; + return this; + } + + /** + * Includes visualization headers of the specified Liveboard object. + * + * @return includeVisualizationHeaders + */ + @javax.annotation.Nullable + public Boolean getIncludeVisualizationHeaders() { + return includeVisualizationHeaders; + } + + public void setIncludeVisualizationHeaders( + @javax.annotation.Nullable Boolean includeVisualizationHeaders) { + this.includeVisualizationHeaders = includeVisualizationHeaders; + } + + public SearchMetadataRequest includeWorksheetSearchAssistData( + @javax.annotation.Nullable Boolean includeWorksheetSearchAssistData) { + this.includeWorksheetSearchAssistData = includeWorksheetSearchAssistData; + return this; + } + + /** + * If search assistance lessons are configured on a worksheet, the API returns the search assist + * data for Worksheet objects. + * + * @return includeWorksheetSearchAssistData + */ + @javax.annotation.Nullable + public Boolean getIncludeWorksheetSearchAssistData() { + return includeWorksheetSearchAssistData; + } + + public void setIncludeWorksheetSearchAssistData( + @javax.annotation.Nullable Boolean includeWorksheetSearchAssistData) { + this.includeWorksheetSearchAssistData = includeWorksheetSearchAssistData; + } + + public SearchMetadataRequest modifiedByUserIdentifiers( + @javax.annotation.Nullable List modifiedByUserIdentifiers) { + this.modifiedByUserIdentifiers = modifiedByUserIdentifiers; + return this; + } + + public SearchMetadataRequest addModifiedByUserIdentifiersItem( + String modifiedByUserIdentifiersItem) { + if (this.modifiedByUserIdentifiers == null) { + this.modifiedByUserIdentifiers = new ArrayList<>(); + } + this.modifiedByUserIdentifiers.add(modifiedByUserIdentifiersItem); + return this; + } + + /** + * Includes ID or names of the users who modified the metadata object. + * + * @return modifiedByUserIdentifiers + */ + @javax.annotation.Nullable + public List getModifiedByUserIdentifiers() { + return modifiedByUserIdentifiers; + } + + public void setModifiedByUserIdentifiers( + @javax.annotation.Nullable List modifiedByUserIdentifiers) { + this.modifiedByUserIdentifiers = modifiedByUserIdentifiers; + } + + public SearchMetadataRequest recordOffset(@javax.annotation.Nullable Integer recordOffset) { + this.recordOffset = recordOffset; + return this; + } + + /** + * The starting record number from where the records should be included. + * + * @return recordOffset + */ + @javax.annotation.Nullable + public Integer getRecordOffset() { + return recordOffset; + } + + public void setRecordOffset(@javax.annotation.Nullable Integer recordOffset) { + this.recordOffset = recordOffset; + } + + public SearchMetadataRequest recordSize(@javax.annotation.Nullable Integer recordSize) { + this.recordSize = recordSize; + return this; + } + + /** + * The number of records that should be included. It is recommended to use a smaller + * `record_size` when fetching dependent objects or any of the additional metadata + * detail options. + * + * @return recordSize + */ + @javax.annotation.Nullable + public Integer getRecordSize() { + return recordSize; + } + + public void setRecordSize(@javax.annotation.Nullable Integer recordSize) { + this.recordSize = recordSize; + } + + public SearchMetadataRequest sortOptions( + @javax.annotation.Nullable MetadataSearchSortOptions sortOptions) { + this.sortOptions = sortOptions; + return this; + } + + /** + * Sort options to filter metadata details. + * + * @return sortOptions + */ + @javax.annotation.Nullable + public MetadataSearchSortOptions getSortOptions() { + return sortOptions; + } + + public void setSortOptions(@javax.annotation.Nullable MetadataSearchSortOptions sortOptions) { + this.sortOptions = sortOptions; + } + + public SearchMetadataRequest tagIdentifiers( + @javax.annotation.Nullable List tagIdentifiers) { + this.tagIdentifiers = tagIdentifiers; + return this; + } + + public SearchMetadataRequest addTagIdentifiersItem(String tagIdentifiersItem) { + if (this.tagIdentifiers == null) { + this.tagIdentifiers = new ArrayList<>(); + } + this.tagIdentifiers.add(tagIdentifiersItem); + return this; + } + + /** + * Tags to filter metadata objects by + * + * @return tagIdentifiers + */ + @javax.annotation.Nullable + public List getTagIdentifiers() { + return tagIdentifiers; + } + + public void setTagIdentifiers(@javax.annotation.Nullable List tagIdentifiers) { + this.tagIdentifiers = tagIdentifiers; + } + + public SearchMetadataRequest includeStats(@javax.annotation.Nullable Boolean includeStats) { + this.includeStats = includeStats; + return this; + } + + /** + * Indicates whether to include stats of the metadata objects. + * + * @return includeStats + */ + @javax.annotation.Nullable + public Boolean getIncludeStats() { + return includeStats; + } + + public void setIncludeStats(@javax.annotation.Nullable Boolean includeStats) { + this.includeStats = includeStats; + } + + public SearchMetadataRequest includeDiscoverableObjects( + @javax.annotation.Nullable Boolean includeDiscoverableObjects) { + this.includeDiscoverableObjects = includeDiscoverableObjects; + return this; + } + + /** + * <div>Version: 10.7.0.cl or later </div> Boolean to indicate whether to include + * discoverable metadata objects. + * + * @return includeDiscoverableObjects + */ + @javax.annotation.Nullable + public Boolean getIncludeDiscoverableObjects() { + return includeDiscoverableObjects; + } + + public void setIncludeDiscoverableObjects( + @javax.annotation.Nullable Boolean includeDiscoverableObjects) { + this.includeDiscoverableObjects = includeDiscoverableObjects; + } + + public SearchMetadataRequest showResolvedParameters( + @javax.annotation.Nullable Boolean showResolvedParameters) { + this.showResolvedParameters = showResolvedParameters; + return this; + } + + /** + * <div>Version: 10.9.0.cl or later </div> Indicates whether to show resolved + * parameterised values. + * + * @return showResolvedParameters + */ + @javax.annotation.Nullable + public Boolean getShowResolvedParameters() { + return showResolvedParameters; + } + + public void setShowResolvedParameters( + @javax.annotation.Nullable Boolean showResolvedParameters) { + this.showResolvedParameters = showResolvedParameters; + } + + public SearchMetadataRequest liveboardResponseVersion( + @javax.annotation.Nullable LiveboardResponseVersionEnum liveboardResponseVersion) { + this.liveboardResponseVersion = liveboardResponseVersion; + return this; + } + + /** + * Indicates the model version of Liveboard to be attached in metadata detail. + * + * @return liveboardResponseVersion + */ + @javax.annotation.Nullable + public LiveboardResponseVersionEnum getLiveboardResponseVersion() { + return liveboardResponseVersion; + } + + public void setLiveboardResponseVersion( + @javax.annotation.Nullable LiveboardResponseVersionEnum liveboardResponseVersion) { + this.liveboardResponseVersion = liveboardResponseVersion; + } + + public SearchMetadataRequest includeOnlyPublishedObjects( + @javax.annotation.Nullable Boolean includeOnlyPublishedObjects) { + this.includeOnlyPublishedObjects = includeOnlyPublishedObjects; + return this; + } + + /** + * <div>Version: 10.11.0.cl or later </div> If only published objects should be + * returned + * + * @return includeOnlyPublishedObjects + */ + @javax.annotation.Nullable + public Boolean getIncludeOnlyPublishedObjects() { + return includeOnlyPublishedObjects; + } + + public void setIncludeOnlyPublishedObjects( + @javax.annotation.Nullable Boolean includeOnlyPublishedObjects) { + this.includeOnlyPublishedObjects = includeOnlyPublishedObjects; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key name of the property + * @param value value of the property + * @return the SearchMetadataRequest instance itself + */ + public SearchMetadataRequest putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return a map of objects + */ + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key name of the property + * @return an object + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + SearchMetadataRequest searchMetadataRequest = (SearchMetadataRequest) o; + return Objects.equals(this.metadata, searchMetadataRequest.metadata) + && Objects.equals(this.permissions, searchMetadataRequest.permissions) + && Objects.equals( + this.createdByUserIdentifiers, + searchMetadataRequest.createdByUserIdentifiers) + && Objects.equals( + this.dependentObjectVersion, searchMetadataRequest.dependentObjectVersion) + && Objects.equals(this.excludeObjects, searchMetadataRequest.excludeObjects) + && Objects.equals( + this.favoriteObjectOptions, searchMetadataRequest.favoriteObjectOptions) + && Objects.equals( + this.includeAutoCreatedObjects, + searchMetadataRequest.includeAutoCreatedObjects) + && Objects.equals( + this.includeDependentObjects, searchMetadataRequest.includeDependentObjects) + && Objects.equals( + this.dependentObjectsRecordSize, + searchMetadataRequest.dependentObjectsRecordSize) + && Objects.equals(this.includeDetails, searchMetadataRequest.includeDetails) + && Objects.equals( + this.includePersonalisedViews, + searchMetadataRequest.includePersonalisedViews) + && Objects.equals(this.includeHeaders, searchMetadataRequest.includeHeaders) + && Objects.equals( + this.includeHiddenObjects, searchMetadataRequest.includeHiddenObjects) + && Objects.equals( + this.includeIncompleteObjects, + searchMetadataRequest.includeIncompleteObjects) + && Objects.equals( + this.includeVisualizationHeaders, + searchMetadataRequest.includeVisualizationHeaders) + && Objects.equals( + this.includeWorksheetSearchAssistData, + searchMetadataRequest.includeWorksheetSearchAssistData) + && Objects.equals( + this.modifiedByUserIdentifiers, + searchMetadataRequest.modifiedByUserIdentifiers) + && Objects.equals(this.recordOffset, searchMetadataRequest.recordOffset) + && Objects.equals(this.recordSize, searchMetadataRequest.recordSize) + && Objects.equals(this.sortOptions, searchMetadataRequest.sortOptions) + && Objects.equals(this.tagIdentifiers, searchMetadataRequest.tagIdentifiers) + && Objects.equals(this.includeStats, searchMetadataRequest.includeStats) + && Objects.equals( + this.includeDiscoverableObjects, + searchMetadataRequest.includeDiscoverableObjects) + && Objects.equals( + this.showResolvedParameters, searchMetadataRequest.showResolvedParameters) + && Objects.equals( + this.liveboardResponseVersion, + searchMetadataRequest.liveboardResponseVersion) + && Objects.equals( + this.includeOnlyPublishedObjects, + searchMetadataRequest.includeOnlyPublishedObjects) + && Objects.equals( + this.additionalProperties, searchMetadataRequest.additionalProperties); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b + || (a != null + && b != null + && a.isPresent() + && b.isPresent() + && Objects.deepEquals(a.get(), b.get())); + } + + @Override + public int hashCode() { + return Objects.hash( + metadata, + permissions, + createdByUserIdentifiers, + dependentObjectVersion, + excludeObjects, + favoriteObjectOptions, + includeAutoCreatedObjects, + includeDependentObjects, + dependentObjectsRecordSize, + includeDetails, + includePersonalisedViews, + includeHeaders, + includeHiddenObjects, + includeIncompleteObjects, + includeVisualizationHeaders, + includeWorksheetSearchAssistData, + modifiedByUserIdentifiers, + recordOffset, + recordSize, + sortOptions, + tagIdentifiers, + includeStats, + includeDiscoverableObjects, + showResolvedParameters, + liveboardResponseVersion, + includeOnlyPublishedObjects, + additionalProperties); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; + } + return a.isPresent() ? Arrays.deepHashCode(new Object[] {a.get()}) : 31; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class SearchMetadataRequest {\n"); + sb.append(" metadata: ").append(toIndentedString(metadata)).append("\n"); + sb.append(" permissions: ").append(toIndentedString(permissions)).append("\n"); + sb.append(" createdByUserIdentifiers: ") + .append(toIndentedString(createdByUserIdentifiers)) + .append("\n"); + sb.append(" dependentObjectVersion: ") + .append(toIndentedString(dependentObjectVersion)) + .append("\n"); + sb.append(" excludeObjects: ").append(toIndentedString(excludeObjects)).append("\n"); + sb.append(" favoriteObjectOptions: ") + .append(toIndentedString(favoriteObjectOptions)) + .append("\n"); + sb.append(" includeAutoCreatedObjects: ") + .append(toIndentedString(includeAutoCreatedObjects)) + .append("\n"); + sb.append(" includeDependentObjects: ") + .append(toIndentedString(includeDependentObjects)) + .append("\n"); + sb.append(" dependentObjectsRecordSize: ") + .append(toIndentedString(dependentObjectsRecordSize)) + .append("\n"); + sb.append(" includeDetails: ").append(toIndentedString(includeDetails)).append("\n"); + sb.append(" includePersonalisedViews: ") + .append(toIndentedString(includePersonalisedViews)) + .append("\n"); + sb.append(" includeHeaders: ").append(toIndentedString(includeHeaders)).append("\n"); + sb.append(" includeHiddenObjects: ") + .append(toIndentedString(includeHiddenObjects)) + .append("\n"); + sb.append(" includeIncompleteObjects: ") + .append(toIndentedString(includeIncompleteObjects)) + .append("\n"); + sb.append(" includeVisualizationHeaders: ") + .append(toIndentedString(includeVisualizationHeaders)) + .append("\n"); + sb.append(" includeWorksheetSearchAssistData: ") + .append(toIndentedString(includeWorksheetSearchAssistData)) + .append("\n"); + sb.append(" modifiedByUserIdentifiers: ") + .append(toIndentedString(modifiedByUserIdentifiers)) + .append("\n"); + sb.append(" recordOffset: ").append(toIndentedString(recordOffset)).append("\n"); + sb.append(" recordSize: ").append(toIndentedString(recordSize)).append("\n"); + sb.append(" sortOptions: ").append(toIndentedString(sortOptions)).append("\n"); + sb.append(" tagIdentifiers: ").append(toIndentedString(tagIdentifiers)).append("\n"); + sb.append(" includeStats: ").append(toIndentedString(includeStats)).append("\n"); + sb.append(" includeDiscoverableObjects: ") + .append(toIndentedString(includeDiscoverableObjects)) + .append("\n"); + sb.append(" showResolvedParameters: ") + .append(toIndentedString(showResolvedParameters)) + .append("\n"); + sb.append(" liveboardResponseVersion: ") + .append(toIndentedString(liveboardResponseVersion)) + .append("\n"); + sb.append(" includeOnlyPublishedObjects: ") + .append(toIndentedString(includeOnlyPublishedObjects)) + .append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first + * line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("metadata"); + openapiFields.add("permissions"); + openapiFields.add("created_by_user_identifiers"); + openapiFields.add("dependent_object_version"); + openapiFields.add("exclude_objects"); + openapiFields.add("favorite_object_options"); + openapiFields.add("include_auto_created_objects"); + openapiFields.add("include_dependent_objects"); + openapiFields.add("dependent_objects_record_size"); + openapiFields.add("include_details"); + openapiFields.add("include_personalised_views"); + openapiFields.add("include_headers"); + openapiFields.add("include_hidden_objects"); + openapiFields.add("include_incomplete_objects"); + openapiFields.add("include_visualization_headers"); + openapiFields.add("include_worksheet_search_assist_data"); + openapiFields.add("modified_by_user_identifiers"); + openapiFields.add("record_offset"); + openapiFields.add("record_size"); + openapiFields.add("sort_options"); + openapiFields.add("tag_identifiers"); + openapiFields.add("include_stats"); + openapiFields.add("include_discoverable_objects"); + openapiFields.add("show_resolved_parameters"); + openapiFields.add("liveboard_response_version"); + openapiFields.add("include_only_published_objects"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to SearchMetadataRequest + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!SearchMetadataRequest.openapiRequiredFields + .isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException( + String.format( + "The required field(s) %s in SearchMetadataRequest is not found in" + + " the empty JSON string", + SearchMetadataRequest.openapiRequiredFields.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if (jsonObj.get("metadata") != null && !jsonObj.get("metadata").isJsonNull()) { + JsonArray jsonArraymetadata = jsonObj.getAsJsonArray("metadata"); + if (jsonArraymetadata != null) { + // ensure the json data is an array + if (!jsonObj.get("metadata").isJsonArray()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `metadata` to be an array in the JSON" + + " string but got `%s`", + jsonObj.get("metadata").toString())); + } + + // validate the optional field `metadata` (array) + for (int i = 0; i < jsonArraymetadata.size(); i++) { + MetadataListItemInput.validateJsonElement(jsonArraymetadata.get(i)); + } + ; + } + } + if (jsonObj.get("permissions") != null && !jsonObj.get("permissions").isJsonNull()) { + JsonArray jsonArraypermissions = jsonObj.getAsJsonArray("permissions"); + if (jsonArraypermissions != null) { + // ensure the json data is an array + if (!jsonObj.get("permissions").isJsonArray()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `permissions` to be an array in the JSON" + + " string but got `%s`", + jsonObj.get("permissions").toString())); + } + + // validate the optional field `permissions` (array) + for (int i = 0; i < jsonArraypermissions.size(); i++) { + PermissionInput.validateJsonElement(jsonArraypermissions.get(i)); + } + ; + } + } + // ensure the optional json data is an array if present + if (jsonObj.get("created_by_user_identifiers") != null + && !jsonObj.get("created_by_user_identifiers").isJsonNull() + && !jsonObj.get("created_by_user_identifiers").isJsonArray()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `created_by_user_identifiers` to be an array in" + + " the JSON string but got `%s`", + jsonObj.get("created_by_user_identifiers").toString())); + } + if ((jsonObj.get("dependent_object_version") != null + && !jsonObj.get("dependent_object_version").isJsonNull()) + && !jsonObj.get("dependent_object_version").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `dependent_object_version` to be a primitive type" + + " in the JSON string but got `%s`", + jsonObj.get("dependent_object_version").toString())); + } + // validate the optional field `dependent_object_version` + if (jsonObj.get("dependent_object_version") != null + && !jsonObj.get("dependent_object_version").isJsonNull()) { + DependentObjectVersionEnum.validateJsonElement(jsonObj.get("dependent_object_version")); + } + if (jsonObj.get("exclude_objects") != null + && !jsonObj.get("exclude_objects").isJsonNull()) { + JsonArray jsonArrayexcludeObjects = jsonObj.getAsJsonArray("exclude_objects"); + if (jsonArrayexcludeObjects != null) { + // ensure the json data is an array + if (!jsonObj.get("exclude_objects").isJsonArray()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `exclude_objects` to be an array in the" + + " JSON string but got `%s`", + jsonObj.get("exclude_objects").toString())); + } + + // validate the optional field `exclude_objects` (array) + for (int i = 0; i < jsonArrayexcludeObjects.size(); i++) { + ExcludeMetadataListItemInput.validateJsonElement( + jsonArrayexcludeObjects.get(i)); + } + ; + } + } + // validate the optional field `favorite_object_options` + if (jsonObj.get("favorite_object_options") != null + && !jsonObj.get("favorite_object_options").isJsonNull()) { + FavoriteObjectOptionsInput.validateJsonElement(jsonObj.get("favorite_object_options")); + } + // ensure the optional json data is an array if present + if (jsonObj.get("modified_by_user_identifiers") != null + && !jsonObj.get("modified_by_user_identifiers").isJsonNull() + && !jsonObj.get("modified_by_user_identifiers").isJsonArray()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `modified_by_user_identifiers` to be an array in" + + " the JSON string but got `%s`", + jsonObj.get("modified_by_user_identifiers").toString())); + } + // validate the optional field `sort_options` + if (jsonObj.get("sort_options") != null && !jsonObj.get("sort_options").isJsonNull()) { + MetadataSearchSortOptions.validateJsonElement(jsonObj.get("sort_options")); + } + // ensure the optional json data is an array if present + if (jsonObj.get("tag_identifiers") != null + && !jsonObj.get("tag_identifiers").isJsonNull() + && !jsonObj.get("tag_identifiers").isJsonArray()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `tag_identifiers` to be an array in the JSON" + + " string but got `%s`", + jsonObj.get("tag_identifiers").toString())); + } + if ((jsonObj.get("liveboard_response_version") != null + && !jsonObj.get("liveboard_response_version").isJsonNull()) + && !jsonObj.get("liveboard_response_version").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `liveboard_response_version` to be a primitive" + + " type in the JSON string but got `%s`", + jsonObj.get("liveboard_response_version").toString())); + } + // validate the optional field `liveboard_response_version` + if (jsonObj.get("liveboard_response_version") != null + && !jsonObj.get("liveboard_response_version").isJsonNull()) { + LiveboardResponseVersionEnum.validateJsonElement( + jsonObj.get("liveboard_response_version")); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!SearchMetadataRequest.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'SearchMetadataRequest' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter = + gson.getDelegateAdapter(this, TypeToken.get(SearchMetadataRequest.class)); + + return (TypeAdapter) + new TypeAdapter() { + @Override + public void write(JsonWriter out, SearchMetadataRequest value) + throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + obj.remove("additionalProperties"); + // serialize additional properties + if (value.getAdditionalProperties() != null) { + for (Map.Entry entry : + value.getAdditionalProperties().entrySet()) { + if (entry.getValue() instanceof String) + obj.addProperty(entry.getKey(), (String) entry.getValue()); + else if (entry.getValue() instanceof Number) + obj.addProperty(entry.getKey(), (Number) entry.getValue()); + else if (entry.getValue() instanceof Boolean) + obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); + else if (entry.getValue() instanceof Character) + obj.addProperty( + entry.getKey(), (Character) entry.getValue()); + else { + JsonElement jsonElement = gson.toJsonTree(entry.getValue()); + if (jsonElement.isJsonArray()) { + obj.add(entry.getKey(), jsonElement.getAsJsonArray()); + } else { + obj.add(entry.getKey(), jsonElement.getAsJsonObject()); + } + } + } + } + elementAdapter.write(out, obj); + } + + @Override + public SearchMetadataRequest read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // store additional fields in the deserialized instance + SearchMetadataRequest instance = thisAdapter.fromJsonTree(jsonObj); + for (Map.Entry entry : jsonObj.entrySet()) { + if (!openapiFields.contains(entry.getKey())) { + if (entry.getValue().isJsonPrimitive()) { // primitive type + if (entry.getValue().getAsJsonPrimitive().isString()) + instance.putAdditionalProperty( + entry.getKey(), entry.getValue().getAsString()); + else if (entry.getValue().getAsJsonPrimitive().isNumber()) + instance.putAdditionalProperty( + entry.getKey(), entry.getValue().getAsNumber()); + else if (entry.getValue().getAsJsonPrimitive().isBoolean()) + instance.putAdditionalProperty( + entry.getKey(), + entry.getValue().getAsBoolean()); + else + throw new IllegalArgumentException( + String.format( + "The field `%s` has unknown primitive" + + " type. Value: %s", + entry.getKey(), + entry.getValue().toString())); + } else if (entry.getValue().isJsonArray()) { + instance.putAdditionalProperty( + entry.getKey(), + gson.fromJson(entry.getValue(), List.class)); + } else { // JSON object + instance.putAdditionalProperty( + entry.getKey(), + gson.fromJson(entry.getValue(), HashMap.class)); + } + } + } + return instance; + } + }.nullSafe(); + } + } + + /** + * Create an instance of SearchMetadataRequest given an JSON string + * + * @param jsonString JSON string + * @return An instance of SearchMetadataRequest + * @throws IOException if the JSON string is invalid with respect to SearchMetadataRequest + */ + public static SearchMetadataRequest fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, SearchMetadataRequest.class); + } + + /** + * Convert an instance of SearchMetadataRequest to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} diff --git a/sdks/java/src/main/java/com/thoughtspot/client/model/SearchOrgsRequest.java b/sdks/java/src/main/java/com/thoughtspot/client/model/SearchOrgsRequest.java new file mode 100644 index 000000000..e904567eb --- /dev/null +++ b/sdks/java/src/main/java/com/thoughtspot/client/model/SearchOrgsRequest.java @@ -0,0 +1,565 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client.model; + +import com.google.gson.Gson; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.TypeAdapter; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.reflect.TypeToken; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import com.thoughtspot.client.JSON; +import java.io.IOException; +import java.io.Serializable; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Objects; + +/** SearchOrgsRequest */ +@javax.annotation.Generated( + value = "org.openapitools.codegen.languages.JavaClientCodegen", + comments = "Generator version: 7.12.0") +public class SearchOrgsRequest implements Serializable { + private static final long serialVersionUID = 1L; + + public static final String SERIALIZED_NAME_ORG_IDENTIFIER = "org_identifier"; + + @SerializedName(SERIALIZED_NAME_ORG_IDENTIFIER) + @javax.annotation.Nullable + private String orgIdentifier; + + public static final String SERIALIZED_NAME_DESCRIPTION = "description"; + + @SerializedName(SERIALIZED_NAME_DESCRIPTION) + @javax.annotation.Nullable + private String description; + + /** Visibility of the Org */ + @JsonAdapter(VisibilityEnum.Adapter.class) + public enum VisibilityEnum { + SHOW("SHOW"), + + HIDDEN("HIDDEN"); + + private String value; + + VisibilityEnum(String value) { + this.value = value; + } + + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + public static VisibilityEnum fromValue(String value) { + for (VisibilityEnum b : VisibilityEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + + public static class Adapter extends TypeAdapter { + @Override + public void write(final JsonWriter jsonWriter, final VisibilityEnum enumeration) + throws IOException { + jsonWriter.value(enumeration.getValue()); + } + + @Override + public VisibilityEnum read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + return VisibilityEnum.fromValue(value); + } + } + + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + String value = jsonElement.getAsString(); + VisibilityEnum.fromValue(value); + } + } + + public static final String SERIALIZED_NAME_VISIBILITY = "visibility"; + + @SerializedName(SERIALIZED_NAME_VISIBILITY) + @javax.annotation.Nullable + private VisibilityEnum visibility; + + /** Status of the Org */ + @JsonAdapter(StatusEnum.Adapter.class) + public enum StatusEnum { + ACTIVE("ACTIVE"), + + IN_ACTIVE("IN_ACTIVE"); + + private String value; + + StatusEnum(String value) { + this.value = value; + } + + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + public static StatusEnum fromValue(String value) { + for (StatusEnum b : StatusEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + + public static class Adapter extends TypeAdapter { + @Override + public void write(final JsonWriter jsonWriter, final StatusEnum enumeration) + throws IOException { + jsonWriter.value(enumeration.getValue()); + } + + @Override + public StatusEnum read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + return StatusEnum.fromValue(value); + } + } + + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + String value = jsonElement.getAsString(); + StatusEnum.fromValue(value); + } + } + + public static final String SERIALIZED_NAME_STATUS = "status"; + + @SerializedName(SERIALIZED_NAME_STATUS) + @javax.annotation.Nullable + private StatusEnum status; + + public static final String SERIALIZED_NAME_USER_IDENTIFIERS = "user_identifiers"; + + @SerializedName(SERIALIZED_NAME_USER_IDENTIFIERS) + @javax.annotation.Nullable + private List userIdentifiers; + + public SearchOrgsRequest() {} + + public SearchOrgsRequest orgIdentifier(@javax.annotation.Nullable String orgIdentifier) { + this.orgIdentifier = orgIdentifier; + return this; + } + + /** + * ID or name of the Org + * + * @return orgIdentifier + */ + @javax.annotation.Nullable + public String getOrgIdentifier() { + return orgIdentifier; + } + + public void setOrgIdentifier(@javax.annotation.Nullable String orgIdentifier) { + this.orgIdentifier = orgIdentifier; + } + + public SearchOrgsRequest description(@javax.annotation.Nullable String description) { + this.description = description; + return this; + } + + /** + * Description of the Org + * + * @return description + */ + @javax.annotation.Nullable + public String getDescription() { + return description; + } + + public void setDescription(@javax.annotation.Nullable String description) { + this.description = description; + } + + public SearchOrgsRequest visibility(@javax.annotation.Nullable VisibilityEnum visibility) { + this.visibility = visibility; + return this; + } + + /** + * Visibility of the Org + * + * @return visibility + */ + @javax.annotation.Nullable + public VisibilityEnum getVisibility() { + return visibility; + } + + public void setVisibility(@javax.annotation.Nullable VisibilityEnum visibility) { + this.visibility = visibility; + } + + public SearchOrgsRequest status(@javax.annotation.Nullable StatusEnum status) { + this.status = status; + return this; + } + + /** + * Status of the Org + * + * @return status + */ + @javax.annotation.Nullable + public StatusEnum getStatus() { + return status; + } + + public void setStatus(@javax.annotation.Nullable StatusEnum status) { + this.status = status; + } + + public SearchOrgsRequest userIdentifiers( + @javax.annotation.Nullable List userIdentifiers) { + this.userIdentifiers = userIdentifiers; + return this; + } + + public SearchOrgsRequest addUserIdentifiersItem(String userIdentifiersItem) { + if (this.userIdentifiers == null) { + this.userIdentifiers = new ArrayList<>(); + } + this.userIdentifiers.add(userIdentifiersItem); + return this; + } + + /** + * GUIDs or names of the users for which you want to retrieve the Orgs data + * + * @return userIdentifiers + */ + @javax.annotation.Nullable + public List getUserIdentifiers() { + return userIdentifiers; + } + + public void setUserIdentifiers(@javax.annotation.Nullable List userIdentifiers) { + this.userIdentifiers = userIdentifiers; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key name of the property + * @param value value of the property + * @return the SearchOrgsRequest instance itself + */ + public SearchOrgsRequest putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return a map of objects + */ + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key name of the property + * @return an object + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + SearchOrgsRequest searchOrgsRequest = (SearchOrgsRequest) o; + return Objects.equals(this.orgIdentifier, searchOrgsRequest.orgIdentifier) + && Objects.equals(this.description, searchOrgsRequest.description) + && Objects.equals(this.visibility, searchOrgsRequest.visibility) + && Objects.equals(this.status, searchOrgsRequest.status) + && Objects.equals(this.userIdentifiers, searchOrgsRequest.userIdentifiers) + && Objects.equals( + this.additionalProperties, searchOrgsRequest.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash( + orgIdentifier, + description, + visibility, + status, + userIdentifiers, + additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class SearchOrgsRequest {\n"); + sb.append(" orgIdentifier: ").append(toIndentedString(orgIdentifier)).append("\n"); + sb.append(" description: ").append(toIndentedString(description)).append("\n"); + sb.append(" visibility: ").append(toIndentedString(visibility)).append("\n"); + sb.append(" status: ").append(toIndentedString(status)).append("\n"); + sb.append(" userIdentifiers: ").append(toIndentedString(userIdentifiers)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first + * line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("org_identifier"); + openapiFields.add("description"); + openapiFields.add("visibility"); + openapiFields.add("status"); + openapiFields.add("user_identifiers"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to SearchOrgsRequest + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!SearchOrgsRequest.openapiRequiredFields + .isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException( + String.format( + "The required field(s) %s in SearchOrgsRequest is not found in the" + + " empty JSON string", + SearchOrgsRequest.openapiRequiredFields.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if ((jsonObj.get("org_identifier") != null && !jsonObj.get("org_identifier").isJsonNull()) + && !jsonObj.get("org_identifier").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `org_identifier` to be a primitive type in the" + + " JSON string but got `%s`", + jsonObj.get("org_identifier").toString())); + } + if ((jsonObj.get("description") != null && !jsonObj.get("description").isJsonNull()) + && !jsonObj.get("description").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `description` to be a primitive type in the JSON" + + " string but got `%s`", + jsonObj.get("description").toString())); + } + if ((jsonObj.get("visibility") != null && !jsonObj.get("visibility").isJsonNull()) + && !jsonObj.get("visibility").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `visibility` to be a primitive type in the JSON" + + " string but got `%s`", + jsonObj.get("visibility").toString())); + } + // validate the optional field `visibility` + if (jsonObj.get("visibility") != null && !jsonObj.get("visibility").isJsonNull()) { + VisibilityEnum.validateJsonElement(jsonObj.get("visibility")); + } + if ((jsonObj.get("status") != null && !jsonObj.get("status").isJsonNull()) + && !jsonObj.get("status").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `status` to be a primitive type in the JSON string" + + " but got `%s`", + jsonObj.get("status").toString())); + } + // validate the optional field `status` + if (jsonObj.get("status") != null && !jsonObj.get("status").isJsonNull()) { + StatusEnum.validateJsonElement(jsonObj.get("status")); + } + // ensure the optional json data is an array if present + if (jsonObj.get("user_identifiers") != null + && !jsonObj.get("user_identifiers").isJsonNull() + && !jsonObj.get("user_identifiers").isJsonArray()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `user_identifiers` to be an array in the JSON" + + " string but got `%s`", + jsonObj.get("user_identifiers").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!SearchOrgsRequest.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'SearchOrgsRequest' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter = + gson.getDelegateAdapter(this, TypeToken.get(SearchOrgsRequest.class)); + + return (TypeAdapter) + new TypeAdapter() { + @Override + public void write(JsonWriter out, SearchOrgsRequest value) + throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + obj.remove("additionalProperties"); + // serialize additional properties + if (value.getAdditionalProperties() != null) { + for (Map.Entry entry : + value.getAdditionalProperties().entrySet()) { + if (entry.getValue() instanceof String) + obj.addProperty(entry.getKey(), (String) entry.getValue()); + else if (entry.getValue() instanceof Number) + obj.addProperty(entry.getKey(), (Number) entry.getValue()); + else if (entry.getValue() instanceof Boolean) + obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); + else if (entry.getValue() instanceof Character) + obj.addProperty( + entry.getKey(), (Character) entry.getValue()); + else { + JsonElement jsonElement = gson.toJsonTree(entry.getValue()); + if (jsonElement.isJsonArray()) { + obj.add(entry.getKey(), jsonElement.getAsJsonArray()); + } else { + obj.add(entry.getKey(), jsonElement.getAsJsonObject()); + } + } + } + } + elementAdapter.write(out, obj); + } + + @Override + public SearchOrgsRequest read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // store additional fields in the deserialized instance + SearchOrgsRequest instance = thisAdapter.fromJsonTree(jsonObj); + for (Map.Entry entry : jsonObj.entrySet()) { + if (!openapiFields.contains(entry.getKey())) { + if (entry.getValue().isJsonPrimitive()) { // primitive type + if (entry.getValue().getAsJsonPrimitive().isString()) + instance.putAdditionalProperty( + entry.getKey(), entry.getValue().getAsString()); + else if (entry.getValue().getAsJsonPrimitive().isNumber()) + instance.putAdditionalProperty( + entry.getKey(), entry.getValue().getAsNumber()); + else if (entry.getValue().getAsJsonPrimitive().isBoolean()) + instance.putAdditionalProperty( + entry.getKey(), + entry.getValue().getAsBoolean()); + else + throw new IllegalArgumentException( + String.format( + "The field `%s` has unknown primitive" + + " type. Value: %s", + entry.getKey(), + entry.getValue().toString())); + } else if (entry.getValue().isJsonArray()) { + instance.putAdditionalProperty( + entry.getKey(), + gson.fromJson(entry.getValue(), List.class)); + } else { // JSON object + instance.putAdditionalProperty( + entry.getKey(), + gson.fromJson(entry.getValue(), HashMap.class)); + } + } + } + return instance; + } + }.nullSafe(); + } + } + + /** + * Create an instance of SearchOrgsRequest given an JSON string + * + * @param jsonString JSON string + * @return An instance of SearchOrgsRequest + * @throws IOException if the JSON string is invalid with respect to SearchOrgsRequest + */ + public static SearchOrgsRequest fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, SearchOrgsRequest.class); + } + + /** + * Convert an instance of SearchOrgsRequest to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} diff --git a/sdks/java/src/main/java/com/thoughtspot/client/model/SearchRoleResponse.java b/sdks/java/src/main/java/com/thoughtspot/client/model/SearchRoleResponse.java new file mode 100644 index 000000000..880540f04 --- /dev/null +++ b/sdks/java/src/main/java/com/thoughtspot/client/model/SearchRoleResponse.java @@ -0,0 +1,1133 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client.model; + +import com.google.gson.Gson; +import com.google.gson.JsonArray; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.TypeAdapter; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.reflect.TypeToken; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import com.thoughtspot.client.JSON; +import java.io.IOException; +import java.io.Serializable; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Objects; +import org.openapitools.jackson.nullable.JsonNullable; + +/** Response for search role api should handle hidden privileges as well. */ +@javax.annotation.Generated( + value = "org.openapitools.codegen.languages.JavaClientCodegen", + comments = "Generator version: 7.12.0") +public class SearchRoleResponse implements Serializable { + private static final long serialVersionUID = 1L; + + public static final String SERIALIZED_NAME_ID = "id"; + + @SerializedName(SERIALIZED_NAME_ID) + @javax.annotation.Nonnull + private String id; + + public static final String SERIALIZED_NAME_NAME = "name"; + + @SerializedName(SERIALIZED_NAME_NAME) + @javax.annotation.Nonnull + private String name; + + public static final String SERIALIZED_NAME_DESCRIPTION = "description"; + + @SerializedName(SERIALIZED_NAME_DESCRIPTION) + @javax.annotation.Nonnull + private String description; + + public static final String SERIALIZED_NAME_GROUPS_ASSIGNED_COUNT = "groups_assigned_count"; + + @SerializedName(SERIALIZED_NAME_GROUPS_ASSIGNED_COUNT) + @javax.annotation.Nullable + private Integer groupsAssignedCount; + + public static final String SERIALIZED_NAME_ORGS = "orgs"; + + @SerializedName(SERIALIZED_NAME_ORGS) + @javax.annotation.Nullable + private List orgs; + + public static final String SERIALIZED_NAME_GROUPS = "groups"; + + @SerializedName(SERIALIZED_NAME_GROUPS) + @javax.annotation.Nullable + private List groups; + + /** Gets or Sets privileges */ + @JsonAdapter(PrivilegesEnum.Adapter.class) + public enum PrivilegesEnum { + UNKNOWN("UNKNOWN"), + + ADMINISTRATION("ADMINISTRATION"), + + AUTHORING("AUTHORING"), + + USERDATAUPLOADING("USERDATAUPLOADING"), + + DATADOWNLOADING("DATADOWNLOADING"), + + USERMANAGEMENT("USERMANAGEMENT"), + + SECURITYMANAGEMENT("SECURITYMANAGEMENT"), + + LOGICALMODELING("LOGICALMODELING"), + + DATAMANAGEMENT("DATAMANAGEMENT"), + + TAGMANAGEMENT("TAGMANAGEMENT"), + + SHAREWITHALL("SHAREWITHALL"), + + SYSTEMMANAGEMENT("SYSTEMMANAGEMENT"), + + JOBSCHEDULING("JOBSCHEDULING"), + + A3_ANALYSIS("A3ANALYSIS"), + + EXPERIMENTALFEATUREPRIVILEGE("EXPERIMENTALFEATUREPRIVILEGE"), + + BYPASSRLS("BYPASSRLS"), + + RANALYSIS("RANALYSIS"), + + DISABLE_PINBOARD_CREATION("DISABLE_PINBOARD_CREATION"), + + DEVELOPER("DEVELOPER"), + + APPLICATION_ADMINISTRATION("APPLICATION_ADMINISTRATION"), + + USER_ADMINISTRATION("USER_ADMINISTRATION"), + + GROUP_ADMINISTRATION("GROUP_ADMINISTRATION"), + + BACKUP_ADMINISTRATION("BACKUP_ADMINISTRATION"), + + SYSTEM_INFO_ADMINISTRATION("SYSTEM_INFO_ADMINISTRATION"), + + ENABLESPOTAPPCREATION("ENABLESPOTAPPCREATION"), + + SYNCMANAGEMENT("SYNCMANAGEMENT"), + + ORG_ADMINISTRATION("ORG_ADMINISTRATION"), + + ROLE_ADMINISTRATION("ROLE_ADMINISTRATION"), + + AUTHENTICATION_ADMINISTRATION("AUTHENTICATION_ADMINISTRATION"), + + BILLING_INFO_ADMINISTRATION("BILLING_INFO_ADMINISTRATION"), + + PREVIEW_THOUGHTSPOT_SAGE("PREVIEW_THOUGHTSPOT_SAGE"), + + LIVEBOARD_VERIFIER("LIVEBOARD_VERIFIER"), + + CAN_MANAGE_CUSTOM_CALENDAR("CAN_MANAGE_CUSTOM_CALENDAR"), + + CAN_CREATE_OR_EDIT_CONNECTIONS("CAN_CREATE_OR_EDIT_CONNECTIONS"), + + CAN_CONFIGURE_CONNECTIONS("CAN_CONFIGURE_CONNECTIONS"), + + CAN_MANAGE_WORKSHEET_VIEWS_TABLES("CAN_MANAGE_WORKSHEET_VIEWS_TABLES"), + + CAN_MANAGE_VERSION_CONTROL("CAN_MANAGE_VERSION_CONTROL"), + + THIRDPARTY_ANALYSIS("THIRDPARTY_ANALYSIS"), + + CONTROL_TRUSTED_AUTH("CONTROL_TRUSTED_AUTH"), + + CAN_CREATE_CATALOG("CAN_CREATE_CATALOG"), + + ALLOW_NON_EMBED_FULL_APP_ACCESS("ALLOW_NON_EMBED_FULL_APP_ACCESS"), + + CAN_ACCESS_ANALYST_STUDIO("CAN_ACCESS_ANALYST_STUDIO"), + + CAN_MANAGE_ANALYST_STUDIO("CAN_MANAGE_ANALYST_STUDIO"), + + CAN_VIEW_FOLDERS("CAN_VIEW_FOLDERS"), + + CAN_MODIDY_FOLDERS("CAN_MODIDY_FOLDERS"), + + CAN_MANAGE_VARIABLES("CAN_MANAGE_VARIABLES"), + + CAN_MANAGE_AGENTSPOT("CAN_MANAGE_AGENTSPOT"), + + CAN_ACCESS_AGENTSPOT("CAN_ACCESS_AGENTSPOT"), + + PREVIEW_DOCUMENT_SEARCH("PREVIEW_DOCUMENT_SEARCH"), + + CAN_SETUP_VERSION_CONTROL("CAN_SETUP_VERSION_CONTROL"), + + CAN_MANAGE_WEBHOOKS("CAN_MANAGE_WEBHOOKS"), + + CAN_DOWNLOAD_VISUALS("CAN_DOWNLOAD_VISUALS"), + + CAN_DOWNLOAD_DETAILED_DATA("CAN_DOWNLOAD_DETAILED_DATA"), + + CAN_USE_SPOTTER("CAN_USE_SPOTTER"); + + private String value; + + PrivilegesEnum(String value) { + this.value = value; + } + + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + public static PrivilegesEnum fromValue(String value) { + for (PrivilegesEnum b : PrivilegesEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + + public static class Adapter extends TypeAdapter { + @Override + public void write(final JsonWriter jsonWriter, final PrivilegesEnum enumeration) + throws IOException { + jsonWriter.value(enumeration.getValue()); + } + + @Override + public PrivilegesEnum read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + return PrivilegesEnum.fromValue(value); + } + } + + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + String value = jsonElement.getAsString(); + PrivilegesEnum.fromValue(value); + } + } + + public static final String SERIALIZED_NAME_PRIVILEGES = "privileges"; + + @SerializedName(SERIALIZED_NAME_PRIVILEGES) + @javax.annotation.Nonnull + private List privileges; + + /** Permission details of the Role */ + @JsonAdapter(PermissionEnum.Adapter.class) + public enum PermissionEnum { + READ_ONLY("READ_ONLY"), + + MODIFY("MODIFY"), + + NO_ACCESS("NO_ACCESS"); + + private String value; + + PermissionEnum(String value) { + this.value = value; + } + + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + public static PermissionEnum fromValue(String value) { + for (PermissionEnum b : PermissionEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + return null; + } + + public static class Adapter extends TypeAdapter { + @Override + public void write(final JsonWriter jsonWriter, final PermissionEnum enumeration) + throws IOException { + jsonWriter.value(enumeration.getValue()); + } + + @Override + public PermissionEnum read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + return PermissionEnum.fromValue(value); + } + } + + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + String value = jsonElement.getAsString(); + PermissionEnum.fromValue(value); + } + } + + public static final String SERIALIZED_NAME_PERMISSION = "permission"; + + @SerializedName(SERIALIZED_NAME_PERMISSION) + @javax.annotation.Nullable + private PermissionEnum permission; + + public static final String SERIALIZED_NAME_AUTHOR_ID = "author_id"; + + @SerializedName(SERIALIZED_NAME_AUTHOR_ID) + @javax.annotation.Nullable + private String authorId; + + public static final String SERIALIZED_NAME_MODIFIER_ID = "modifier_id"; + + @SerializedName(SERIALIZED_NAME_MODIFIER_ID) + @javax.annotation.Nullable + private String modifierId; + + public static final String SERIALIZED_NAME_CREATION_TIME_IN_MILLIS = "creation_time_in_millis"; + + @SerializedName(SERIALIZED_NAME_CREATION_TIME_IN_MILLIS) + @javax.annotation.Nullable + private Object creationTimeInMillis; + + public static final String SERIALIZED_NAME_MODIFICATION_TIME_IN_MILLIS = + "modification_time_in_millis"; + + @SerializedName(SERIALIZED_NAME_MODIFICATION_TIME_IN_MILLIS) + @javax.annotation.Nullable + private Object modificationTimeInMillis; + + public static final String SERIALIZED_NAME_DELETED = "deleted"; + + @SerializedName(SERIALIZED_NAME_DELETED) + @javax.annotation.Nullable + private Boolean deleted; + + public static final String SERIALIZED_NAME_DEPRECATED = "deprecated"; + + @SerializedName(SERIALIZED_NAME_DEPRECATED) + @javax.annotation.Nullable + private Boolean deprecated; + + public static final String SERIALIZED_NAME_EXTERNAL = "external"; + + @SerializedName(SERIALIZED_NAME_EXTERNAL) + @javax.annotation.Nullable + private Boolean external; + + public static final String SERIALIZED_NAME_HIDDEN = "hidden"; + + @SerializedName(SERIALIZED_NAME_HIDDEN) + @javax.annotation.Nullable + private Boolean hidden; + + public static final String SERIALIZED_NAME_SHARED_VIA_CONNECTION = "shared_via_connection"; + + @SerializedName(SERIALIZED_NAME_SHARED_VIA_CONNECTION) + @javax.annotation.Nullable + private Boolean sharedViaConnection; + + public SearchRoleResponse() {} + + public SearchRoleResponse id(@javax.annotation.Nonnull String id) { + this.id = id; + return this; + } + + /** + * Unique Id of the role. + * + * @return id + */ + @javax.annotation.Nonnull + public String getId() { + return id; + } + + public void setId(@javax.annotation.Nonnull String id) { + this.id = id; + } + + public SearchRoleResponse name(@javax.annotation.Nonnull String name) { + this.name = name; + return this; + } + + /** + * Name of the role + * + * @return name + */ + @javax.annotation.Nonnull + public String getName() { + return name; + } + + public void setName(@javax.annotation.Nonnull String name) { + this.name = name; + } + + public SearchRoleResponse description(@javax.annotation.Nonnull String description) { + this.description = description; + return this; + } + + /** + * Description of the role + * + * @return description + */ + @javax.annotation.Nonnull + public String getDescription() { + return description; + } + + public void setDescription(@javax.annotation.Nonnull String description) { + this.description = description; + } + + public SearchRoleResponse groupsAssignedCount( + @javax.annotation.Nullable Integer groupsAssignedCount) { + this.groupsAssignedCount = groupsAssignedCount; + return this; + } + + /** + * number of groups assigned with this role + * + * @return groupsAssignedCount + */ + @javax.annotation.Nullable + public Integer getGroupsAssignedCount() { + return groupsAssignedCount; + } + + public void setGroupsAssignedCount(@javax.annotation.Nullable Integer groupsAssignedCount) { + this.groupsAssignedCount = groupsAssignedCount; + } + + public SearchRoleResponse orgs(@javax.annotation.Nullable List orgs) { + this.orgs = orgs; + return this; + } + + public SearchRoleResponse addOrgsItem(GenericInfo orgsItem) { + if (this.orgs == null) { + this.orgs = new ArrayList<>(); + } + this.orgs.add(orgsItem); + return this; + } + + /** + * Orgs in which role exists. + * + * @return orgs + */ + @javax.annotation.Nullable + public List getOrgs() { + return orgs; + } + + public void setOrgs(@javax.annotation.Nullable List orgs) { + this.orgs = orgs; + } + + public SearchRoleResponse groups(@javax.annotation.Nullable List groups) { + this.groups = groups; + return this; + } + + public SearchRoleResponse addGroupsItem(GenericInfo groupsItem) { + if (this.groups == null) { + this.groups = new ArrayList<>(); + } + this.groups.add(groupsItem); + return this; + } + + /** + * Details of groups assigned with this role + * + * @return groups + */ + @javax.annotation.Nullable + public List getGroups() { + return groups; + } + + public void setGroups(@javax.annotation.Nullable List groups) { + this.groups = groups; + } + + public SearchRoleResponse privileges( + @javax.annotation.Nonnull List privileges) { + this.privileges = privileges; + return this; + } + + public SearchRoleResponse addPrivilegesItem(PrivilegesEnum privilegesItem) { + if (this.privileges == null) { + this.privileges = new ArrayList<>(); + } + this.privileges.add(privilegesItem); + return this; + } + + /** + * Privileges granted to the role. + * + * @return privileges + */ + @javax.annotation.Nonnull + public List getPrivileges() { + return privileges; + } + + public void setPrivileges(@javax.annotation.Nonnull List privileges) { + this.privileges = privileges; + } + + public SearchRoleResponse permission(@javax.annotation.Nullable PermissionEnum permission) { + this.permission = permission; + return this; + } + + /** + * Permission details of the Role + * + * @return permission + */ + @javax.annotation.Nullable + public PermissionEnum getPermission() { + return permission; + } + + public void setPermission(@javax.annotation.Nullable PermissionEnum permission) { + this.permission = permission; + } + + public SearchRoleResponse authorId(@javax.annotation.Nullable String authorId) { + this.authorId = authorId; + return this; + } + + /** + * Unique identifier of author of the role. + * + * @return authorId + */ + @javax.annotation.Nullable + public String getAuthorId() { + return authorId; + } + + public void setAuthorId(@javax.annotation.Nullable String authorId) { + this.authorId = authorId; + } + + public SearchRoleResponse modifierId(@javax.annotation.Nullable String modifierId) { + this.modifierId = modifierId; + return this; + } + + /** + * Unique identifier of modifier of the role. + * + * @return modifierId + */ + @javax.annotation.Nullable + public String getModifierId() { + return modifierId; + } + + public void setModifierId(@javax.annotation.Nullable String modifierId) { + this.modifierId = modifierId; + } + + public SearchRoleResponse creationTimeInMillis( + @javax.annotation.Nullable Object creationTimeInMillis) { + this.creationTimeInMillis = creationTimeInMillis; + return this; + } + + /** + * Creation time of the role in milliseconds. + * + * @return creationTimeInMillis + */ + @javax.annotation.Nullable + public Object getCreationTimeInMillis() { + return creationTimeInMillis; + } + + public void setCreationTimeInMillis(@javax.annotation.Nullable Object creationTimeInMillis) { + this.creationTimeInMillis = creationTimeInMillis; + } + + public SearchRoleResponse modificationTimeInMillis( + @javax.annotation.Nullable Object modificationTimeInMillis) { + this.modificationTimeInMillis = modificationTimeInMillis; + return this; + } + + /** + * Last modified time of the role in milliseconds. + * + * @return modificationTimeInMillis + */ + @javax.annotation.Nullable + public Object getModificationTimeInMillis() { + return modificationTimeInMillis; + } + + public void setModificationTimeInMillis( + @javax.annotation.Nullable Object modificationTimeInMillis) { + this.modificationTimeInMillis = modificationTimeInMillis; + } + + public SearchRoleResponse deleted(@javax.annotation.Nullable Boolean deleted) { + this.deleted = deleted; + return this; + } + + /** + * Indicates whether the role is deleted. + * + * @return deleted + */ + @javax.annotation.Nullable + public Boolean getDeleted() { + return deleted; + } + + public void setDeleted(@javax.annotation.Nullable Boolean deleted) { + this.deleted = deleted; + } + + public SearchRoleResponse deprecated(@javax.annotation.Nullable Boolean deprecated) { + this.deprecated = deprecated; + return this; + } + + /** + * Indicates whether the role is deprecated. + * + * @return deprecated + */ + @javax.annotation.Nullable + public Boolean getDeprecated() { + return deprecated; + } + + public void setDeprecated(@javax.annotation.Nullable Boolean deprecated) { + this.deprecated = deprecated; + } + + public SearchRoleResponse external(@javax.annotation.Nullable Boolean external) { + this.external = external; + return this; + } + + /** + * Indicates whether the role is external. + * + * @return external + */ + @javax.annotation.Nullable + public Boolean getExternal() { + return external; + } + + public void setExternal(@javax.annotation.Nullable Boolean external) { + this.external = external; + } + + public SearchRoleResponse hidden(@javax.annotation.Nullable Boolean hidden) { + this.hidden = hidden; + return this; + } + + /** + * Indicates whether the role is hidden. + * + * @return hidden + */ + @javax.annotation.Nullable + public Boolean getHidden() { + return hidden; + } + + public void setHidden(@javax.annotation.Nullable Boolean hidden) { + this.hidden = hidden; + } + + public SearchRoleResponse sharedViaConnection( + @javax.annotation.Nullable Boolean sharedViaConnection) { + this.sharedViaConnection = sharedViaConnection; + return this; + } + + /** + * Indicates whether the role is shared via connection + * + * @return sharedViaConnection + */ + @javax.annotation.Nullable + public Boolean getSharedViaConnection() { + return sharedViaConnection; + } + + public void setSharedViaConnection(@javax.annotation.Nullable Boolean sharedViaConnection) { + this.sharedViaConnection = sharedViaConnection; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key name of the property + * @param value value of the property + * @return the SearchRoleResponse instance itself + */ + public SearchRoleResponse putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return a map of objects + */ + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key name of the property + * @return an object + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + SearchRoleResponse searchRoleResponse = (SearchRoleResponse) o; + return Objects.equals(this.id, searchRoleResponse.id) + && Objects.equals(this.name, searchRoleResponse.name) + && Objects.equals(this.description, searchRoleResponse.description) + && Objects.equals(this.groupsAssignedCount, searchRoleResponse.groupsAssignedCount) + && Objects.equals(this.orgs, searchRoleResponse.orgs) + && Objects.equals(this.groups, searchRoleResponse.groups) + && Objects.equals(this.privileges, searchRoleResponse.privileges) + && Objects.equals(this.permission, searchRoleResponse.permission) + && Objects.equals(this.authorId, searchRoleResponse.authorId) + && Objects.equals(this.modifierId, searchRoleResponse.modifierId) + && Objects.equals( + this.creationTimeInMillis, searchRoleResponse.creationTimeInMillis) + && Objects.equals( + this.modificationTimeInMillis, searchRoleResponse.modificationTimeInMillis) + && Objects.equals(this.deleted, searchRoleResponse.deleted) + && Objects.equals(this.deprecated, searchRoleResponse.deprecated) + && Objects.equals(this.external, searchRoleResponse.external) + && Objects.equals(this.hidden, searchRoleResponse.hidden) + && Objects.equals(this.sharedViaConnection, searchRoleResponse.sharedViaConnection) + && Objects.equals( + this.additionalProperties, searchRoleResponse.additionalProperties); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b + || (a != null + && b != null + && a.isPresent() + && b.isPresent() + && Objects.deepEquals(a.get(), b.get())); + } + + @Override + public int hashCode() { + return Objects.hash( + id, + name, + description, + groupsAssignedCount, + orgs, + groups, + privileges, + permission, + authorId, + modifierId, + creationTimeInMillis, + modificationTimeInMillis, + deleted, + deprecated, + external, + hidden, + sharedViaConnection, + additionalProperties); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; + } + return a.isPresent() ? Arrays.deepHashCode(new Object[] {a.get()}) : 31; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class SearchRoleResponse {\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append(" description: ").append(toIndentedString(description)).append("\n"); + sb.append(" groupsAssignedCount: ") + .append(toIndentedString(groupsAssignedCount)) + .append("\n"); + sb.append(" orgs: ").append(toIndentedString(orgs)).append("\n"); + sb.append(" groups: ").append(toIndentedString(groups)).append("\n"); + sb.append(" privileges: ").append(toIndentedString(privileges)).append("\n"); + sb.append(" permission: ").append(toIndentedString(permission)).append("\n"); + sb.append(" authorId: ").append(toIndentedString(authorId)).append("\n"); + sb.append(" modifierId: ").append(toIndentedString(modifierId)).append("\n"); + sb.append(" creationTimeInMillis: ") + .append(toIndentedString(creationTimeInMillis)) + .append("\n"); + sb.append(" modificationTimeInMillis: ") + .append(toIndentedString(modificationTimeInMillis)) + .append("\n"); + sb.append(" deleted: ").append(toIndentedString(deleted)).append("\n"); + sb.append(" deprecated: ").append(toIndentedString(deprecated)).append("\n"); + sb.append(" external: ").append(toIndentedString(external)).append("\n"); + sb.append(" hidden: ").append(toIndentedString(hidden)).append("\n"); + sb.append(" sharedViaConnection: ") + .append(toIndentedString(sharedViaConnection)) + .append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first + * line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("id"); + openapiFields.add("name"); + openapiFields.add("description"); + openapiFields.add("groups_assigned_count"); + openapiFields.add("orgs"); + openapiFields.add("groups"); + openapiFields.add("privileges"); + openapiFields.add("permission"); + openapiFields.add("author_id"); + openapiFields.add("modifier_id"); + openapiFields.add("creation_time_in_millis"); + openapiFields.add("modification_time_in_millis"); + openapiFields.add("deleted"); + openapiFields.add("deprecated"); + openapiFields.add("external"); + openapiFields.add("hidden"); + openapiFields.add("shared_via_connection"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + openapiRequiredFields.add("id"); + openapiRequiredFields.add("name"); + openapiRequiredFields.add("description"); + openapiRequiredFields.add("privileges"); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to SearchRoleResponse + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!SearchRoleResponse.openapiRequiredFields + .isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException( + String.format( + "The required field(s) %s in SearchRoleResponse is not found in" + + " the empty JSON string", + SearchRoleResponse.openapiRequiredFields.toString())); + } + } + + // check to make sure all required properties/fields are present in the JSON string + for (String requiredField : SearchRoleResponse.openapiRequiredFields) { + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException( + String.format( + "The required field `%s` is not found in the JSON string: %s", + requiredField, jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if (!jsonObj.get("id").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `id` to be a primitive type in the JSON string but" + + " got `%s`", + jsonObj.get("id").toString())); + } + if (!jsonObj.get("name").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `name` to be a primitive type in the JSON string" + + " but got `%s`", + jsonObj.get("name").toString())); + } + if (!jsonObj.get("description").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `description` to be a primitive type in the JSON" + + " string but got `%s`", + jsonObj.get("description").toString())); + } + if (jsonObj.get("orgs") != null && !jsonObj.get("orgs").isJsonNull()) { + JsonArray jsonArrayorgs = jsonObj.getAsJsonArray("orgs"); + if (jsonArrayorgs != null) { + // ensure the json data is an array + if (!jsonObj.get("orgs").isJsonArray()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `orgs` to be an array in the JSON string" + + " but got `%s`", + jsonObj.get("orgs").toString())); + } + + // validate the optional field `orgs` (array) + for (int i = 0; i < jsonArrayorgs.size(); i++) { + GenericInfo.validateJsonElement(jsonArrayorgs.get(i)); + } + ; + } + } + if (jsonObj.get("groups") != null && !jsonObj.get("groups").isJsonNull()) { + JsonArray jsonArraygroups = jsonObj.getAsJsonArray("groups"); + if (jsonArraygroups != null) { + // ensure the json data is an array + if (!jsonObj.get("groups").isJsonArray()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `groups` to be an array in the JSON string" + + " but got `%s`", + jsonObj.get("groups").toString())); + } + + // validate the optional field `groups` (array) + for (int i = 0; i < jsonArraygroups.size(); i++) { + GenericInfo.validateJsonElement(jsonArraygroups.get(i)); + } + ; + } + } + // ensure the required json array is present + if (jsonObj.get("privileges") == null) { + throw new IllegalArgumentException( + "Expected the field `linkedContent` to be an array in the JSON string but got" + + " `null`"); + } else if (!jsonObj.get("privileges").isJsonArray()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `privileges` to be an array in the JSON string but" + + " got `%s`", + jsonObj.get("privileges").toString())); + } + if ((jsonObj.get("permission") != null && !jsonObj.get("permission").isJsonNull()) + && !jsonObj.get("permission").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `permission` to be a primitive type in the JSON" + + " string but got `%s`", + jsonObj.get("permission").toString())); + } + // validate the optional field `permission` + if (jsonObj.get("permission") != null && !jsonObj.get("permission").isJsonNull()) { + PermissionEnum.validateJsonElement(jsonObj.get("permission")); + } + if ((jsonObj.get("author_id") != null && !jsonObj.get("author_id").isJsonNull()) + && !jsonObj.get("author_id").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `author_id` to be a primitive type in the JSON" + + " string but got `%s`", + jsonObj.get("author_id").toString())); + } + if ((jsonObj.get("modifier_id") != null && !jsonObj.get("modifier_id").isJsonNull()) + && !jsonObj.get("modifier_id").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `modifier_id` to be a primitive type in the JSON" + + " string but got `%s`", + jsonObj.get("modifier_id").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!SearchRoleResponse.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'SearchRoleResponse' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter = + gson.getDelegateAdapter(this, TypeToken.get(SearchRoleResponse.class)); + + return (TypeAdapter) + new TypeAdapter() { + @Override + public void write(JsonWriter out, SearchRoleResponse value) + throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + obj.remove("additionalProperties"); + // serialize additional properties + if (value.getAdditionalProperties() != null) { + for (Map.Entry entry : + value.getAdditionalProperties().entrySet()) { + if (entry.getValue() instanceof String) + obj.addProperty(entry.getKey(), (String) entry.getValue()); + else if (entry.getValue() instanceof Number) + obj.addProperty(entry.getKey(), (Number) entry.getValue()); + else if (entry.getValue() instanceof Boolean) + obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); + else if (entry.getValue() instanceof Character) + obj.addProperty( + entry.getKey(), (Character) entry.getValue()); + else { + JsonElement jsonElement = gson.toJsonTree(entry.getValue()); + if (jsonElement.isJsonArray()) { + obj.add(entry.getKey(), jsonElement.getAsJsonArray()); + } else { + obj.add(entry.getKey(), jsonElement.getAsJsonObject()); + } + } + } + } + elementAdapter.write(out, obj); + } + + @Override + public SearchRoleResponse read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // store additional fields in the deserialized instance + SearchRoleResponse instance = thisAdapter.fromJsonTree(jsonObj); + for (Map.Entry entry : jsonObj.entrySet()) { + if (!openapiFields.contains(entry.getKey())) { + if (entry.getValue().isJsonPrimitive()) { // primitive type + if (entry.getValue().getAsJsonPrimitive().isString()) + instance.putAdditionalProperty( + entry.getKey(), entry.getValue().getAsString()); + else if (entry.getValue().getAsJsonPrimitive().isNumber()) + instance.putAdditionalProperty( + entry.getKey(), entry.getValue().getAsNumber()); + else if (entry.getValue().getAsJsonPrimitive().isBoolean()) + instance.putAdditionalProperty( + entry.getKey(), + entry.getValue().getAsBoolean()); + else + throw new IllegalArgumentException( + String.format( + "The field `%s` has unknown primitive" + + " type. Value: %s", + entry.getKey(), + entry.getValue().toString())); + } else if (entry.getValue().isJsonArray()) { + instance.putAdditionalProperty( + entry.getKey(), + gson.fromJson(entry.getValue(), List.class)); + } else { // JSON object + instance.putAdditionalProperty( + entry.getKey(), + gson.fromJson(entry.getValue(), HashMap.class)); + } + } + } + return instance; + } + }.nullSafe(); + } + } + + /** + * Create an instance of SearchRoleResponse given an JSON string + * + * @param jsonString JSON string + * @return An instance of SearchRoleResponse + * @throws IOException if the JSON string is invalid with respect to SearchRoleResponse + */ + public static SearchRoleResponse fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, SearchRoleResponse.class); + } + + /** + * Convert an instance of SearchRoleResponse to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} diff --git a/sdks/java/src/main/java/com/thoughtspot/client/model/SearchRolesRequest.java b/sdks/java/src/main/java/com/thoughtspot/client/model/SearchRolesRequest.java new file mode 100644 index 000000000..5a6be5edb --- /dev/null +++ b/sdks/java/src/main/java/com/thoughtspot/client/model/SearchRolesRequest.java @@ -0,0 +1,837 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client.model; + +import com.google.gson.Gson; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.TypeAdapter; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.reflect.TypeToken; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import com.thoughtspot.client.JSON; +import java.io.IOException; +import java.io.Serializable; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Objects; +import org.openapitools.jackson.nullable.JsonNullable; + +/** SearchRolesRequest */ +@javax.annotation.Generated( + value = "org.openapitools.codegen.languages.JavaClientCodegen", + comments = "Generator version: 7.12.0") +public class SearchRolesRequest implements Serializable { + private static final long serialVersionUID = 1L; + + public static final String SERIALIZED_NAME_ROLE_IDENTIFIERS = "role_identifiers"; + + @SerializedName(SERIALIZED_NAME_ROLE_IDENTIFIERS) + @javax.annotation.Nullable + private List roleIdentifiers; + + public static final String SERIALIZED_NAME_ORG_IDENTIFIERS = "org_identifiers"; + + @SerializedName(SERIALIZED_NAME_ORG_IDENTIFIERS) + @javax.annotation.Nullable + private List orgIdentifiers; + + public static final String SERIALIZED_NAME_GROUP_IDENTIFIERS = "group_identifiers"; + + @SerializedName(SERIALIZED_NAME_GROUP_IDENTIFIERS) + @javax.annotation.Nullable + private List groupIdentifiers; + + /** Gets or Sets privileges */ + @JsonAdapter(PrivilegesEnum.Adapter.class) + public enum PrivilegesEnum { + UNKNOWN("UNKNOWN"), + + ADMINISTRATION("ADMINISTRATION"), + + AUTHORING("AUTHORING"), + + USERDATAUPLOADING("USERDATAUPLOADING"), + + DATADOWNLOADING("DATADOWNLOADING"), + + USERMANAGEMENT("USERMANAGEMENT"), + + SECURITYMANAGEMENT("SECURITYMANAGEMENT"), + + LOGICALMODELING("LOGICALMODELING"), + + DATAMANAGEMENT("DATAMANAGEMENT"), + + TAGMANAGEMENT("TAGMANAGEMENT"), + + SHAREWITHALL("SHAREWITHALL"), + + SYSTEMMANAGEMENT("SYSTEMMANAGEMENT"), + + JOBSCHEDULING("JOBSCHEDULING"), + + A3_ANALYSIS("A3ANALYSIS"), + + EXPERIMENTALFEATUREPRIVILEGE("EXPERIMENTALFEATUREPRIVILEGE"), + + BYPASSRLS("BYPASSRLS"), + + RANALYSIS("RANALYSIS"), + + DISABLE_PINBOARD_CREATION("DISABLE_PINBOARD_CREATION"), + + DEVELOPER("DEVELOPER"), + + APPLICATION_ADMINISTRATION("APPLICATION_ADMINISTRATION"), + + USER_ADMINISTRATION("USER_ADMINISTRATION"), + + GROUP_ADMINISTRATION("GROUP_ADMINISTRATION"), + + BACKUP_ADMINISTRATION("BACKUP_ADMINISTRATION"), + + SYSTEM_INFO_ADMINISTRATION("SYSTEM_INFO_ADMINISTRATION"), + + ENABLESPOTAPPCREATION("ENABLESPOTAPPCREATION"), + + SYNCMANAGEMENT("SYNCMANAGEMENT"), + + ORG_ADMINISTRATION("ORG_ADMINISTRATION"), + + ROLE_ADMINISTRATION("ROLE_ADMINISTRATION"), + + AUTHENTICATION_ADMINISTRATION("AUTHENTICATION_ADMINISTRATION"), + + BILLING_INFO_ADMINISTRATION("BILLING_INFO_ADMINISTRATION"), + + PREVIEW_THOUGHTSPOT_SAGE("PREVIEW_THOUGHTSPOT_SAGE"), + + LIVEBOARD_VERIFIER("LIVEBOARD_VERIFIER"), + + CAN_MANAGE_CUSTOM_CALENDAR("CAN_MANAGE_CUSTOM_CALENDAR"), + + CAN_CREATE_OR_EDIT_CONNECTIONS("CAN_CREATE_OR_EDIT_CONNECTIONS"), + + CAN_CONFIGURE_CONNECTIONS("CAN_CONFIGURE_CONNECTIONS"), + + CAN_MANAGE_WORKSHEET_VIEWS_TABLES("CAN_MANAGE_WORKSHEET_VIEWS_TABLES"), + + CAN_MANAGE_VERSION_CONTROL("CAN_MANAGE_VERSION_CONTROL"), + + THIRDPARTY_ANALYSIS("THIRDPARTY_ANALYSIS"), + + CONTROL_TRUSTED_AUTH("CONTROL_TRUSTED_AUTH"), + + CAN_CREATE_CATALOG("CAN_CREATE_CATALOG"), + + ALLOW_NON_EMBED_FULL_APP_ACCESS("ALLOW_NON_EMBED_FULL_APP_ACCESS"), + + CAN_ACCESS_ANALYST_STUDIO("CAN_ACCESS_ANALYST_STUDIO"), + + CAN_MANAGE_ANALYST_STUDIO("CAN_MANAGE_ANALYST_STUDIO"), + + CAN_VIEW_FOLDERS("CAN_VIEW_FOLDERS"), + + CAN_MODIDY_FOLDERS("CAN_MODIDY_FOLDERS"), + + CAN_MANAGE_VARIABLES("CAN_MANAGE_VARIABLES"), + + CAN_MANAGE_AGENTSPOT("CAN_MANAGE_AGENTSPOT"), + + CAN_ACCESS_AGENTSPOT("CAN_ACCESS_AGENTSPOT"), + + PREVIEW_DOCUMENT_SEARCH("PREVIEW_DOCUMENT_SEARCH"), + + CAN_SETUP_VERSION_CONTROL("CAN_SETUP_VERSION_CONTROL"), + + CAN_MANAGE_WEBHOOKS("CAN_MANAGE_WEBHOOKS"), + + CAN_DOWNLOAD_VISUALS("CAN_DOWNLOAD_VISUALS"), + + CAN_DOWNLOAD_DETAILED_DATA("CAN_DOWNLOAD_DETAILED_DATA"), + + CAN_USE_SPOTTER("CAN_USE_SPOTTER"); + + private String value; + + PrivilegesEnum(String value) { + this.value = value; + } + + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + public static PrivilegesEnum fromValue(String value) { + for (PrivilegesEnum b : PrivilegesEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + + public static class Adapter extends TypeAdapter { + @Override + public void write(final JsonWriter jsonWriter, final PrivilegesEnum enumeration) + throws IOException { + jsonWriter.value(enumeration.getValue()); + } + + @Override + public PrivilegesEnum read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + return PrivilegesEnum.fromValue(value); + } + } + + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + String value = jsonElement.getAsString(); + PrivilegesEnum.fromValue(value); + } + } + + public static final String SERIALIZED_NAME_PRIVILEGES = "privileges"; + + @SerializedName(SERIALIZED_NAME_PRIVILEGES) + @javax.annotation.Nullable + private List privileges; + + public static final String SERIALIZED_NAME_DEPRECATED = "deprecated"; + + @Deprecated + @SerializedName(SERIALIZED_NAME_DEPRECATED) + @javax.annotation.Nullable + private Boolean deprecated; + + public static final String SERIALIZED_NAME_EXTERNAL = "external"; + + @Deprecated + @SerializedName(SERIALIZED_NAME_EXTERNAL) + @javax.annotation.Nullable + private Boolean external; + + public static final String SERIALIZED_NAME_SHARED_VIA_CONNECTION = "shared_via_connection"; + + @Deprecated + @SerializedName(SERIALIZED_NAME_SHARED_VIA_CONNECTION) + @javax.annotation.Nullable + private Boolean sharedViaConnection; + + /** Gets or Sets permissions */ + @JsonAdapter(PermissionsEnum.Adapter.class) + public enum PermissionsEnum { + READ_ONLY("READ_ONLY"), + + MODIFY("MODIFY"), + + NO_ACCESS("NO_ACCESS"); + + private String value; + + PermissionsEnum(String value) { + this.value = value; + } + + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + public static PermissionsEnum fromValue(String value) { + for (PermissionsEnum b : PermissionsEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + + public static class Adapter extends TypeAdapter { + @Override + public void write(final JsonWriter jsonWriter, final PermissionsEnum enumeration) + throws IOException { + jsonWriter.value(enumeration.getValue()); + } + + @Override + public PermissionsEnum read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + return PermissionsEnum.fromValue(value); + } + } + + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + String value = jsonElement.getAsString(); + PermissionsEnum.fromValue(value); + } + } + + public static final String SERIALIZED_NAME_PERMISSIONS = "permissions"; + + @Deprecated + @SerializedName(SERIALIZED_NAME_PERMISSIONS) + @javax.annotation.Nullable + private List permissions; + + public SearchRolesRequest() {} + + public SearchRolesRequest roleIdentifiers( + @javax.annotation.Nullable List roleIdentifiers) { + this.roleIdentifiers = roleIdentifiers; + return this; + } + + public SearchRolesRequest addRoleIdentifiersItem(String roleIdentifiersItem) { + if (this.roleIdentifiers == null) { + this.roleIdentifiers = new ArrayList<>(); + } + this.roleIdentifiers.add(roleIdentifiersItem); + return this; + } + + /** + * unique ID or name of the Roles + * + * @return roleIdentifiers + */ + @javax.annotation.Nullable + public List getRoleIdentifiers() { + return roleIdentifiers; + } + + public void setRoleIdentifiers(@javax.annotation.Nullable List roleIdentifiers) { + this.roleIdentifiers = roleIdentifiers; + } + + public SearchRolesRequest orgIdentifiers( + @javax.annotation.Nullable List orgIdentifiers) { + this.orgIdentifiers = orgIdentifiers; + return this; + } + + public SearchRolesRequest addOrgIdentifiersItem(String orgIdentifiersItem) { + if (this.orgIdentifiers == null) { + this.orgIdentifiers = new ArrayList<>(); + } + this.orgIdentifiers.add(orgIdentifiersItem); + return this; + } + + /** + * Unique Id or name of the Organisation + * + * @return orgIdentifiers + */ + @javax.annotation.Nullable + public List getOrgIdentifiers() { + return orgIdentifiers; + } + + public void setOrgIdentifiers(@javax.annotation.Nullable List orgIdentifiers) { + this.orgIdentifiers = orgIdentifiers; + } + + public SearchRolesRequest groupIdentifiers( + @javax.annotation.Nullable List groupIdentifiers) { + this.groupIdentifiers = groupIdentifiers; + return this; + } + + public SearchRolesRequest addGroupIdentifiersItem(String groupIdentifiersItem) { + if (this.groupIdentifiers == null) { + this.groupIdentifiers = new ArrayList<>(); + } + this.groupIdentifiers.add(groupIdentifiersItem); + return this; + } + + /** + * Unique Id or name of the User Group + * + * @return groupIdentifiers + */ + @javax.annotation.Nullable + public List getGroupIdentifiers() { + return groupIdentifiers; + } + + public void setGroupIdentifiers(@javax.annotation.Nullable List groupIdentifiers) { + this.groupIdentifiers = groupIdentifiers; + } + + public SearchRolesRequest privileges( + @javax.annotation.Nullable List privileges) { + this.privileges = privileges; + return this; + } + + public SearchRolesRequest addPrivilegesItem(PrivilegesEnum privilegesItem) { + if (this.privileges == null) { + this.privileges = new ArrayList<>(); + } + this.privileges.add(privilegesItem); + return this; + } + + /** + * Privileges assigned to the Role. See + * [Documentation](https://developers.thoughtspot.com/docs/rbac#_role_categories_and_privileges)for + * supported roles privileges. + * + * @return privileges + */ + @javax.annotation.Nullable + public List getPrivileges() { + return privileges; + } + + public void setPrivileges(@javax.annotation.Nullable List privileges) { + this.privileges = privileges; + } + + @Deprecated + public SearchRolesRequest deprecated(@javax.annotation.Nullable Boolean deprecated) { + this.deprecated = deprecated; + return this; + } + + /** + * Indicates whether the Role is deprecated. + * + * @return deprecated + * @deprecated + */ + @Deprecated + @javax.annotation.Nullable + public Boolean getDeprecated() { + return deprecated; + } + + @Deprecated + public void setDeprecated(@javax.annotation.Nullable Boolean deprecated) { + this.deprecated = deprecated; + } + + @Deprecated + public SearchRolesRequest external(@javax.annotation.Nullable Boolean external) { + this.external = external; + return this; + } + + /** + * Indicates whether the Role is external + * + * @return external + * @deprecated + */ + @Deprecated + @javax.annotation.Nullable + public Boolean getExternal() { + return external; + } + + @Deprecated + public void setExternal(@javax.annotation.Nullable Boolean external) { + this.external = external; + } + + @Deprecated + public SearchRolesRequest sharedViaConnection( + @javax.annotation.Nullable Boolean sharedViaConnection) { + this.sharedViaConnection = sharedViaConnection; + return this; + } + + /** + * Indicates whether the Role is shared via connection + * + * @return sharedViaConnection + * @deprecated + */ + @Deprecated + @javax.annotation.Nullable + public Boolean getSharedViaConnection() { + return sharedViaConnection; + } + + @Deprecated + public void setSharedViaConnection(@javax.annotation.Nullable Boolean sharedViaConnection) { + this.sharedViaConnection = sharedViaConnection; + } + + @Deprecated + public SearchRolesRequest permissions( + @javax.annotation.Nullable List permissions) { + this.permissions = permissions; + return this; + } + + public SearchRolesRequest addPermissionsItem(PermissionsEnum permissionsItem) { + if (this.permissions == null) { + this.permissions = new ArrayList<>(); + } + this.permissions.add(permissionsItem); + return this; + } + + /** + * Permission details of the Role + * + * @return permissions + * @deprecated + */ + @Deprecated + @javax.annotation.Nullable + public List getPermissions() { + return permissions; + } + + @Deprecated + public void setPermissions(@javax.annotation.Nullable List permissions) { + this.permissions = permissions; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key name of the property + * @param value value of the property + * @return the SearchRolesRequest instance itself + */ + public SearchRolesRequest putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return a map of objects + */ + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key name of the property + * @return an object + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + SearchRolesRequest searchRolesRequest = (SearchRolesRequest) o; + return Objects.equals(this.roleIdentifiers, searchRolesRequest.roleIdentifiers) + && Objects.equals(this.orgIdentifiers, searchRolesRequest.orgIdentifiers) + && Objects.equals(this.groupIdentifiers, searchRolesRequest.groupIdentifiers) + && Objects.equals(this.privileges, searchRolesRequest.privileges) + && Objects.equals(this.deprecated, searchRolesRequest.deprecated) + && Objects.equals(this.external, searchRolesRequest.external) + && Objects.equals(this.sharedViaConnection, searchRolesRequest.sharedViaConnection) + && Objects.equals(this.permissions, searchRolesRequest.permissions) + && Objects.equals( + this.additionalProperties, searchRolesRequest.additionalProperties); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b + || (a != null + && b != null + && a.isPresent() + && b.isPresent() + && Objects.deepEquals(a.get(), b.get())); + } + + @Override + public int hashCode() { + return Objects.hash( + roleIdentifiers, + orgIdentifiers, + groupIdentifiers, + privileges, + deprecated, + external, + sharedViaConnection, + permissions, + additionalProperties); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; + } + return a.isPresent() ? Arrays.deepHashCode(new Object[] {a.get()}) : 31; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class SearchRolesRequest {\n"); + sb.append(" roleIdentifiers: ").append(toIndentedString(roleIdentifiers)).append("\n"); + sb.append(" orgIdentifiers: ").append(toIndentedString(orgIdentifiers)).append("\n"); + sb.append(" groupIdentifiers: ").append(toIndentedString(groupIdentifiers)).append("\n"); + sb.append(" privileges: ").append(toIndentedString(privileges)).append("\n"); + sb.append(" deprecated: ").append(toIndentedString(deprecated)).append("\n"); + sb.append(" external: ").append(toIndentedString(external)).append("\n"); + sb.append(" sharedViaConnection: ") + .append(toIndentedString(sharedViaConnection)) + .append("\n"); + sb.append(" permissions: ").append(toIndentedString(permissions)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first + * line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("role_identifiers"); + openapiFields.add("org_identifiers"); + openapiFields.add("group_identifiers"); + openapiFields.add("privileges"); + openapiFields.add("deprecated"); + openapiFields.add("external"); + openapiFields.add("shared_via_connection"); + openapiFields.add("permissions"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to SearchRolesRequest + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!SearchRolesRequest.openapiRequiredFields + .isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException( + String.format( + "The required field(s) %s in SearchRolesRequest is not found in" + + " the empty JSON string", + SearchRolesRequest.openapiRequiredFields.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // ensure the optional json data is an array if present + if (jsonObj.get("role_identifiers") != null + && !jsonObj.get("role_identifiers").isJsonNull() + && !jsonObj.get("role_identifiers").isJsonArray()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `role_identifiers` to be an array in the JSON" + + " string but got `%s`", + jsonObj.get("role_identifiers").toString())); + } + // ensure the optional json data is an array if present + if (jsonObj.get("org_identifiers") != null + && !jsonObj.get("org_identifiers").isJsonNull() + && !jsonObj.get("org_identifiers").isJsonArray()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `org_identifiers` to be an array in the JSON" + + " string but got `%s`", + jsonObj.get("org_identifiers").toString())); + } + // ensure the optional json data is an array if present + if (jsonObj.get("group_identifiers") != null + && !jsonObj.get("group_identifiers").isJsonNull() + && !jsonObj.get("group_identifiers").isJsonArray()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `group_identifiers` to be an array in the JSON" + + " string but got `%s`", + jsonObj.get("group_identifiers").toString())); + } + // ensure the optional json data is an array if present + if (jsonObj.get("privileges") != null + && !jsonObj.get("privileges").isJsonNull() + && !jsonObj.get("privileges").isJsonArray()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `privileges` to be an array in the JSON string but" + + " got `%s`", + jsonObj.get("privileges").toString())); + } + // ensure the optional json data is an array if present + if (jsonObj.get("permissions") != null + && !jsonObj.get("permissions").isJsonNull() + && !jsonObj.get("permissions").isJsonArray()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `permissions` to be an array in the JSON string" + + " but got `%s`", + jsonObj.get("permissions").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!SearchRolesRequest.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'SearchRolesRequest' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter = + gson.getDelegateAdapter(this, TypeToken.get(SearchRolesRequest.class)); + + return (TypeAdapter) + new TypeAdapter() { + @Override + public void write(JsonWriter out, SearchRolesRequest value) + throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + obj.remove("additionalProperties"); + // serialize additional properties + if (value.getAdditionalProperties() != null) { + for (Map.Entry entry : + value.getAdditionalProperties().entrySet()) { + if (entry.getValue() instanceof String) + obj.addProperty(entry.getKey(), (String) entry.getValue()); + else if (entry.getValue() instanceof Number) + obj.addProperty(entry.getKey(), (Number) entry.getValue()); + else if (entry.getValue() instanceof Boolean) + obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); + else if (entry.getValue() instanceof Character) + obj.addProperty( + entry.getKey(), (Character) entry.getValue()); + else { + JsonElement jsonElement = gson.toJsonTree(entry.getValue()); + if (jsonElement.isJsonArray()) { + obj.add(entry.getKey(), jsonElement.getAsJsonArray()); + } else { + obj.add(entry.getKey(), jsonElement.getAsJsonObject()); + } + } + } + } + elementAdapter.write(out, obj); + } + + @Override + public SearchRolesRequest read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // store additional fields in the deserialized instance + SearchRolesRequest instance = thisAdapter.fromJsonTree(jsonObj); + for (Map.Entry entry : jsonObj.entrySet()) { + if (!openapiFields.contains(entry.getKey())) { + if (entry.getValue().isJsonPrimitive()) { // primitive type + if (entry.getValue().getAsJsonPrimitive().isString()) + instance.putAdditionalProperty( + entry.getKey(), entry.getValue().getAsString()); + else if (entry.getValue().getAsJsonPrimitive().isNumber()) + instance.putAdditionalProperty( + entry.getKey(), entry.getValue().getAsNumber()); + else if (entry.getValue().getAsJsonPrimitive().isBoolean()) + instance.putAdditionalProperty( + entry.getKey(), + entry.getValue().getAsBoolean()); + else + throw new IllegalArgumentException( + String.format( + "The field `%s` has unknown primitive" + + " type. Value: %s", + entry.getKey(), + entry.getValue().toString())); + } else if (entry.getValue().isJsonArray()) { + instance.putAdditionalProperty( + entry.getKey(), + gson.fromJson(entry.getValue(), List.class)); + } else { // JSON object + instance.putAdditionalProperty( + entry.getKey(), + gson.fromJson(entry.getValue(), HashMap.class)); + } + } + } + return instance; + } + }.nullSafe(); + } + } + + /** + * Create an instance of SearchRolesRequest given an JSON string + * + * @param jsonString JSON string + * @return An instance of SearchRolesRequest + * @throws IOException if the JSON string is invalid with respect to SearchRolesRequest + */ + public static SearchRolesRequest fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, SearchRolesRequest.class); + } + + /** + * Convert an instance of SearchRolesRequest to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} diff --git a/sdks/java/src/main/java/com/thoughtspot/client/model/SearchSchedulesRequest.java b/sdks/java/src/main/java/com/thoughtspot/client/model/SearchSchedulesRequest.java new file mode 100644 index 000000000..4e445ba8c --- /dev/null +++ b/sdks/java/src/main/java/com/thoughtspot/client/model/SearchSchedulesRequest.java @@ -0,0 +1,500 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client.model; + +import com.google.gson.Gson; +import com.google.gson.JsonArray; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.TypeAdapter; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.annotations.SerializedName; +import com.google.gson.reflect.TypeToken; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import com.thoughtspot.client.JSON; +import java.io.IOException; +import java.io.Serializable; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Objects; + +/** SearchSchedulesRequest */ +@javax.annotation.Generated( + value = "org.openapitools.codegen.languages.JavaClientCodegen", + comments = "Generator version: 7.12.0") +public class SearchSchedulesRequest implements Serializable { + private static final long serialVersionUID = 1L; + + public static final String SERIALIZED_NAME_METADATA = "metadata"; + + @SerializedName(SERIALIZED_NAME_METADATA) + @javax.annotation.Nullable + private List metadata; + + public static final String SERIALIZED_NAME_RECORD_OFFSET = "record_offset"; + + @SerializedName(SERIALIZED_NAME_RECORD_OFFSET) + @javax.annotation.Nullable + private Integer recordOffset; + + public static final String SERIALIZED_NAME_RECORD_SIZE = "record_size"; + + @SerializedName(SERIALIZED_NAME_RECORD_SIZE) + @javax.annotation.Nullable + private Integer recordSize; + + public static final String SERIALIZED_NAME_SORT_OPTIONS = "sort_options"; + + @SerializedName(SERIALIZED_NAME_SORT_OPTIONS) + @javax.annotation.Nullable + private SortingOptions sortOptions; + + public static final String SERIALIZED_NAME_HISTORY_RUNS_OPTIONS = "history_runs_options"; + + @SerializedName(SERIALIZED_NAME_HISTORY_RUNS_OPTIONS) + @javax.annotation.Nullable + private ScheduleHistoryRunsOptionsInput historyRunsOptions; + + public static final String SERIALIZED_NAME_SCHEDULE_IDENTIFIERS = "schedule_identifiers"; + + @SerializedName(SERIALIZED_NAME_SCHEDULE_IDENTIFIERS) + @javax.annotation.Nullable + private List scheduleIdentifiers; + + public SearchSchedulesRequest() {} + + public SearchSchedulesRequest metadata( + @javax.annotation.Nullable List metadata) { + this.metadata = metadata; + return this; + } + + public SearchSchedulesRequest addMetadataItem(MetadataInput metadataItem) { + if (this.metadata == null) { + this.metadata = new ArrayList<>(); + } + this.metadata.add(metadataItem); + return this; + } + + /** + * Metadata objects associated with the scheduled jobs. + * + * @return metadata + */ + @javax.annotation.Nullable + public List getMetadata() { + return metadata; + } + + public void setMetadata(@javax.annotation.Nullable List metadata) { + this.metadata = metadata; + } + + public SearchSchedulesRequest recordOffset(@javax.annotation.Nullable Integer recordOffset) { + this.recordOffset = recordOffset; + return this; + } + + /** + * The starting record number from where the records should be included. + * + * @return recordOffset + */ + @javax.annotation.Nullable + public Integer getRecordOffset() { + return recordOffset; + } + + public void setRecordOffset(@javax.annotation.Nullable Integer recordOffset) { + this.recordOffset = recordOffset; + } + + public SearchSchedulesRequest recordSize(@javax.annotation.Nullable Integer recordSize) { + this.recordSize = recordSize; + return this; + } + + /** + * The number of records that should be included. + * + * @return recordSize + */ + @javax.annotation.Nullable + public Integer getRecordSize() { + return recordSize; + } + + public void setRecordSize(@javax.annotation.Nullable Integer recordSize) { + this.recordSize = recordSize; + } + + public SearchSchedulesRequest sortOptions( + @javax.annotation.Nullable SortingOptions sortOptions) { + this.sortOptions = sortOptions; + return this; + } + + /** + * Sort options. + * + * @return sortOptions + */ + @javax.annotation.Nullable + public SortingOptions getSortOptions() { + return sortOptions; + } + + public void setSortOptions(@javax.annotation.Nullable SortingOptions sortOptions) { + this.sortOptions = sortOptions; + } + + public SearchSchedulesRequest historyRunsOptions( + @javax.annotation.Nullable ScheduleHistoryRunsOptionsInput historyRunsOptions) { + this.historyRunsOptions = historyRunsOptions; + return this; + } + + /** + * Options while fetching history runs for the schedule. + * + * @return historyRunsOptions + */ + @javax.annotation.Nullable + public ScheduleHistoryRunsOptionsInput getHistoryRunsOptions() { + return historyRunsOptions; + } + + public void setHistoryRunsOptions( + @javax.annotation.Nullable ScheduleHistoryRunsOptionsInput historyRunsOptions) { + this.historyRunsOptions = historyRunsOptions; + } + + public SearchSchedulesRequest scheduleIdentifiers( + @javax.annotation.Nullable List scheduleIdentifiers) { + this.scheduleIdentifiers = scheduleIdentifiers; + return this; + } + + public SearchSchedulesRequest addScheduleIdentifiersItem(String scheduleIdentifiersItem) { + if (this.scheduleIdentifiers == null) { + this.scheduleIdentifiers = new ArrayList<>(); + } + this.scheduleIdentifiers.add(scheduleIdentifiersItem); + return this; + } + + /** + * unique ID or name of the Schedule + * + * @return scheduleIdentifiers + */ + @javax.annotation.Nullable + public List getScheduleIdentifiers() { + return scheduleIdentifiers; + } + + public void setScheduleIdentifiers( + @javax.annotation.Nullable List scheduleIdentifiers) { + this.scheduleIdentifiers = scheduleIdentifiers; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key name of the property + * @param value value of the property + * @return the SearchSchedulesRequest instance itself + */ + public SearchSchedulesRequest putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return a map of objects + */ + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key name of the property + * @return an object + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + SearchSchedulesRequest searchSchedulesRequest = (SearchSchedulesRequest) o; + return Objects.equals(this.metadata, searchSchedulesRequest.metadata) + && Objects.equals(this.recordOffset, searchSchedulesRequest.recordOffset) + && Objects.equals(this.recordSize, searchSchedulesRequest.recordSize) + && Objects.equals(this.sortOptions, searchSchedulesRequest.sortOptions) + && Objects.equals( + this.historyRunsOptions, searchSchedulesRequest.historyRunsOptions) + && Objects.equals( + this.scheduleIdentifiers, searchSchedulesRequest.scheduleIdentifiers) + && Objects.equals( + this.additionalProperties, searchSchedulesRequest.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash( + metadata, + recordOffset, + recordSize, + sortOptions, + historyRunsOptions, + scheduleIdentifiers, + additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class SearchSchedulesRequest {\n"); + sb.append(" metadata: ").append(toIndentedString(metadata)).append("\n"); + sb.append(" recordOffset: ").append(toIndentedString(recordOffset)).append("\n"); + sb.append(" recordSize: ").append(toIndentedString(recordSize)).append("\n"); + sb.append(" sortOptions: ").append(toIndentedString(sortOptions)).append("\n"); + sb.append(" historyRunsOptions: ") + .append(toIndentedString(historyRunsOptions)) + .append("\n"); + sb.append(" scheduleIdentifiers: ") + .append(toIndentedString(scheduleIdentifiers)) + .append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first + * line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("metadata"); + openapiFields.add("record_offset"); + openapiFields.add("record_size"); + openapiFields.add("sort_options"); + openapiFields.add("history_runs_options"); + openapiFields.add("schedule_identifiers"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to SearchSchedulesRequest + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!SearchSchedulesRequest.openapiRequiredFields + .isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException( + String.format( + "The required field(s) %s in SearchSchedulesRequest is not found" + + " in the empty JSON string", + SearchSchedulesRequest.openapiRequiredFields.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if (jsonObj.get("metadata") != null && !jsonObj.get("metadata").isJsonNull()) { + JsonArray jsonArraymetadata = jsonObj.getAsJsonArray("metadata"); + if (jsonArraymetadata != null) { + // ensure the json data is an array + if (!jsonObj.get("metadata").isJsonArray()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `metadata` to be an array in the JSON" + + " string but got `%s`", + jsonObj.get("metadata").toString())); + } + + // validate the optional field `metadata` (array) + for (int i = 0; i < jsonArraymetadata.size(); i++) { + MetadataInput.validateJsonElement(jsonArraymetadata.get(i)); + } + ; + } + } + // validate the optional field `sort_options` + if (jsonObj.get("sort_options") != null && !jsonObj.get("sort_options").isJsonNull()) { + SortingOptions.validateJsonElement(jsonObj.get("sort_options")); + } + // validate the optional field `history_runs_options` + if (jsonObj.get("history_runs_options") != null + && !jsonObj.get("history_runs_options").isJsonNull()) { + ScheduleHistoryRunsOptionsInput.validateJsonElement( + jsonObj.get("history_runs_options")); + } + // ensure the optional json data is an array if present + if (jsonObj.get("schedule_identifiers") != null + && !jsonObj.get("schedule_identifiers").isJsonNull() + && !jsonObj.get("schedule_identifiers").isJsonArray()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `schedule_identifiers` to be an array in the JSON" + + " string but got `%s`", + jsonObj.get("schedule_identifiers").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!SearchSchedulesRequest.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'SearchSchedulesRequest' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter = + gson.getDelegateAdapter(this, TypeToken.get(SearchSchedulesRequest.class)); + + return (TypeAdapter) + new TypeAdapter() { + @Override + public void write(JsonWriter out, SearchSchedulesRequest value) + throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + obj.remove("additionalProperties"); + // serialize additional properties + if (value.getAdditionalProperties() != null) { + for (Map.Entry entry : + value.getAdditionalProperties().entrySet()) { + if (entry.getValue() instanceof String) + obj.addProperty(entry.getKey(), (String) entry.getValue()); + else if (entry.getValue() instanceof Number) + obj.addProperty(entry.getKey(), (Number) entry.getValue()); + else if (entry.getValue() instanceof Boolean) + obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); + else if (entry.getValue() instanceof Character) + obj.addProperty( + entry.getKey(), (Character) entry.getValue()); + else { + JsonElement jsonElement = gson.toJsonTree(entry.getValue()); + if (jsonElement.isJsonArray()) { + obj.add(entry.getKey(), jsonElement.getAsJsonArray()); + } else { + obj.add(entry.getKey(), jsonElement.getAsJsonObject()); + } + } + } + } + elementAdapter.write(out, obj); + } + + @Override + public SearchSchedulesRequest read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // store additional fields in the deserialized instance + SearchSchedulesRequest instance = thisAdapter.fromJsonTree(jsonObj); + for (Map.Entry entry : jsonObj.entrySet()) { + if (!openapiFields.contains(entry.getKey())) { + if (entry.getValue().isJsonPrimitive()) { // primitive type + if (entry.getValue().getAsJsonPrimitive().isString()) + instance.putAdditionalProperty( + entry.getKey(), entry.getValue().getAsString()); + else if (entry.getValue().getAsJsonPrimitive().isNumber()) + instance.putAdditionalProperty( + entry.getKey(), entry.getValue().getAsNumber()); + else if (entry.getValue().getAsJsonPrimitive().isBoolean()) + instance.putAdditionalProperty( + entry.getKey(), + entry.getValue().getAsBoolean()); + else + throw new IllegalArgumentException( + String.format( + "The field `%s` has unknown primitive" + + " type. Value: %s", + entry.getKey(), + entry.getValue().toString())); + } else if (entry.getValue().isJsonArray()) { + instance.putAdditionalProperty( + entry.getKey(), + gson.fromJson(entry.getValue(), List.class)); + } else { // JSON object + instance.putAdditionalProperty( + entry.getKey(), + gson.fromJson(entry.getValue(), HashMap.class)); + } + } + } + return instance; + } + }.nullSafe(); + } + } + + /** + * Create an instance of SearchSchedulesRequest given an JSON string + * + * @param jsonString JSON string + * @return An instance of SearchSchedulesRequest + * @throws IOException if the JSON string is invalid with respect to SearchSchedulesRequest + */ + public static SearchSchedulesRequest fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, SearchSchedulesRequest.class); + } + + /** + * Convert an instance of SearchSchedulesRequest to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} diff --git a/sdks/java/src/main/java/com/thoughtspot/client/model/SearchSecuritySettingsRequest.java b/sdks/java/src/main/java/com/thoughtspot/client/model/SearchSecuritySettingsRequest.java new file mode 100644 index 000000000..e654d18ea --- /dev/null +++ b/sdks/java/src/main/java/com/thoughtspot/client/model/SearchSecuritySettingsRequest.java @@ -0,0 +1,362 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client.model; + +import com.google.gson.Gson; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.TypeAdapter; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.reflect.TypeToken; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import com.thoughtspot.client.JSON; +import java.io.IOException; +import java.io.Serializable; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Objects; + +/** SearchSecuritySettingsRequest */ +@javax.annotation.Generated( + value = "org.openapitools.codegen.languages.JavaClientCodegen", + comments = "Generator version: 7.12.0") +public class SearchSecuritySettingsRequest implements Serializable { + private static final long serialVersionUID = 1L; + + /** + * Scope of security settings to retrieve. CLUSTER returns cluster-level settings, ORG returns + * org-level settings for the current org. If not specified, returns both cluster and org + * settings based on user privileges. + */ + @JsonAdapter(ScopeEnum.Adapter.class) + public enum ScopeEnum { + CLUSTER("CLUSTER"), + + ORG("ORG"); + + private String value; + + ScopeEnum(String value) { + this.value = value; + } + + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + public static ScopeEnum fromValue(String value) { + for (ScopeEnum b : ScopeEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + + public static class Adapter extends TypeAdapter { + @Override + public void write(final JsonWriter jsonWriter, final ScopeEnum enumeration) + throws IOException { + jsonWriter.value(enumeration.getValue()); + } + + @Override + public ScopeEnum read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + return ScopeEnum.fromValue(value); + } + } + + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + String value = jsonElement.getAsString(); + ScopeEnum.fromValue(value); + } + } + + public static final String SERIALIZED_NAME_SCOPE = "scope"; + + @SerializedName(SERIALIZED_NAME_SCOPE) + @javax.annotation.Nullable + private ScopeEnum scope; + + public SearchSecuritySettingsRequest() {} + + public SearchSecuritySettingsRequest scope(@javax.annotation.Nullable ScopeEnum scope) { + this.scope = scope; + return this; + } + + /** + * Scope of security settings to retrieve. CLUSTER returns cluster-level settings, ORG returns + * org-level settings for the current org. If not specified, returns both cluster and org + * settings based on user privileges. + * + * @return scope + */ + @javax.annotation.Nullable + public ScopeEnum getScope() { + return scope; + } + + public void setScope(@javax.annotation.Nullable ScopeEnum scope) { + this.scope = scope; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key name of the property + * @param value value of the property + * @return the SearchSecuritySettingsRequest instance itself + */ + public SearchSecuritySettingsRequest putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return a map of objects + */ + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key name of the property + * @return an object + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + SearchSecuritySettingsRequest searchSecuritySettingsRequest = + (SearchSecuritySettingsRequest) o; + return Objects.equals(this.scope, searchSecuritySettingsRequest.scope) + && Objects.equals( + this.additionalProperties, + searchSecuritySettingsRequest.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(scope, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class SearchSecuritySettingsRequest {\n"); + sb.append(" scope: ").append(toIndentedString(scope)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first + * line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("scope"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to + * SearchSecuritySettingsRequest + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!SearchSecuritySettingsRequest.openapiRequiredFields + .isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException( + String.format( + "The required field(s) %s in SearchSecuritySettingsRequest is not" + + " found in the empty JSON string", + SearchSecuritySettingsRequest.openapiRequiredFields.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if ((jsonObj.get("scope") != null && !jsonObj.get("scope").isJsonNull()) + && !jsonObj.get("scope").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `scope` to be a primitive type in the JSON string" + + " but got `%s`", + jsonObj.get("scope").toString())); + } + // validate the optional field `scope` + if (jsonObj.get("scope") != null && !jsonObj.get("scope").isJsonNull()) { + ScopeEnum.validateJsonElement(jsonObj.get("scope")); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!SearchSecuritySettingsRequest.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'SearchSecuritySettingsRequest' and its + // subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter = + gson.getDelegateAdapter( + this, TypeToken.get(SearchSecuritySettingsRequest.class)); + + return (TypeAdapter) + new TypeAdapter() { + @Override + public void write(JsonWriter out, SearchSecuritySettingsRequest value) + throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + obj.remove("additionalProperties"); + // serialize additional properties + if (value.getAdditionalProperties() != null) { + for (Map.Entry entry : + value.getAdditionalProperties().entrySet()) { + if (entry.getValue() instanceof String) + obj.addProperty(entry.getKey(), (String) entry.getValue()); + else if (entry.getValue() instanceof Number) + obj.addProperty(entry.getKey(), (Number) entry.getValue()); + else if (entry.getValue() instanceof Boolean) + obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); + else if (entry.getValue() instanceof Character) + obj.addProperty( + entry.getKey(), (Character) entry.getValue()); + else { + JsonElement jsonElement = gson.toJsonTree(entry.getValue()); + if (jsonElement.isJsonArray()) { + obj.add(entry.getKey(), jsonElement.getAsJsonArray()); + } else { + obj.add(entry.getKey(), jsonElement.getAsJsonObject()); + } + } + } + } + elementAdapter.write(out, obj); + } + + @Override + public SearchSecuritySettingsRequest read(JsonReader in) + throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // store additional fields in the deserialized instance + SearchSecuritySettingsRequest instance = + thisAdapter.fromJsonTree(jsonObj); + for (Map.Entry entry : jsonObj.entrySet()) { + if (!openapiFields.contains(entry.getKey())) { + if (entry.getValue().isJsonPrimitive()) { // primitive type + if (entry.getValue().getAsJsonPrimitive().isString()) + instance.putAdditionalProperty( + entry.getKey(), entry.getValue().getAsString()); + else if (entry.getValue().getAsJsonPrimitive().isNumber()) + instance.putAdditionalProperty( + entry.getKey(), entry.getValue().getAsNumber()); + else if (entry.getValue().getAsJsonPrimitive().isBoolean()) + instance.putAdditionalProperty( + entry.getKey(), + entry.getValue().getAsBoolean()); + else + throw new IllegalArgumentException( + String.format( + "The field `%s` has unknown primitive" + + " type. Value: %s", + entry.getKey(), + entry.getValue().toString())); + } else if (entry.getValue().isJsonArray()) { + instance.putAdditionalProperty( + entry.getKey(), + gson.fromJson(entry.getValue(), List.class)); + } else { // JSON object + instance.putAdditionalProperty( + entry.getKey(), + gson.fromJson(entry.getValue(), HashMap.class)); + } + } + } + return instance; + } + }.nullSafe(); + } + } + + /** + * Create an instance of SearchSecuritySettingsRequest given an JSON string + * + * @param jsonString JSON string + * @return An instance of SearchSecuritySettingsRequest + * @throws IOException if the JSON string is invalid with respect to + * SearchSecuritySettingsRequest + */ + public static SearchSecuritySettingsRequest fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, SearchSecuritySettingsRequest.class); + } + + /** + * Convert an instance of SearchSecuritySettingsRequest to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} diff --git a/sdks/java/src/main/java/com/thoughtspot/client/model/SearchTagsRequest.java b/sdks/java/src/main/java/com/thoughtspot/client/model/SearchTagsRequest.java new file mode 100644 index 000000000..abd839b1e --- /dev/null +++ b/sdks/java/src/main/java/com/thoughtspot/client/model/SearchTagsRequest.java @@ -0,0 +1,364 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client.model; + +import com.google.gson.Gson; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.TypeAdapter; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.annotations.SerializedName; +import com.google.gson.reflect.TypeToken; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import com.thoughtspot.client.JSON; +import java.io.IOException; +import java.io.Serializable; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Objects; + +/** SearchTagsRequest */ +@javax.annotation.Generated( + value = "org.openapitools.codegen.languages.JavaClientCodegen", + comments = "Generator version: 7.12.0") +public class SearchTagsRequest implements Serializable { + private static final long serialVersionUID = 1L; + + public static final String SERIALIZED_NAME_TAG_IDENTIFIER = "tag_identifier"; + + @SerializedName(SERIALIZED_NAME_TAG_IDENTIFIER) + @javax.annotation.Nullable + private String tagIdentifier; + + public static final String SERIALIZED_NAME_NAME_PATTERN = "name_pattern"; + + @SerializedName(SERIALIZED_NAME_NAME_PATTERN) + @javax.annotation.Nullable + private String namePattern; + + public static final String SERIALIZED_NAME_COLOR = "color"; + + @SerializedName(SERIALIZED_NAME_COLOR) + @javax.annotation.Nullable + private String color; + + public SearchTagsRequest() {} + + public SearchTagsRequest tagIdentifier(@javax.annotation.Nullable String tagIdentifier) { + this.tagIdentifier = tagIdentifier; + return this; + } + + /** + * Name or Id of the tag. + * + * @return tagIdentifier + */ + @javax.annotation.Nullable + public String getTagIdentifier() { + return tagIdentifier; + } + + public void setTagIdentifier(@javax.annotation.Nullable String tagIdentifier) { + this.tagIdentifier = tagIdentifier; + } + + public SearchTagsRequest namePattern(@javax.annotation.Nullable String namePattern) { + this.namePattern = namePattern; + return this; + } + + /** + * A pattern to match case-insensitive name of the Tag object. + * + * @return namePattern + */ + @javax.annotation.Nullable + public String getNamePattern() { + return namePattern; + } + + public void setNamePattern(@javax.annotation.Nullable String namePattern) { + this.namePattern = namePattern; + } + + public SearchTagsRequest color(@javax.annotation.Nullable String color) { + this.color = color; + return this; + } + + /** + * Color of the tag. + * + * @return color + */ + @javax.annotation.Nullable + public String getColor() { + return color; + } + + public void setColor(@javax.annotation.Nullable String color) { + this.color = color; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key name of the property + * @param value value of the property + * @return the SearchTagsRequest instance itself + */ + public SearchTagsRequest putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return a map of objects + */ + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key name of the property + * @return an object + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + SearchTagsRequest searchTagsRequest = (SearchTagsRequest) o; + return Objects.equals(this.tagIdentifier, searchTagsRequest.tagIdentifier) + && Objects.equals(this.namePattern, searchTagsRequest.namePattern) + && Objects.equals(this.color, searchTagsRequest.color) + && Objects.equals( + this.additionalProperties, searchTagsRequest.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(tagIdentifier, namePattern, color, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class SearchTagsRequest {\n"); + sb.append(" tagIdentifier: ").append(toIndentedString(tagIdentifier)).append("\n"); + sb.append(" namePattern: ").append(toIndentedString(namePattern)).append("\n"); + sb.append(" color: ").append(toIndentedString(color)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first + * line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("tag_identifier"); + openapiFields.add("name_pattern"); + openapiFields.add("color"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to SearchTagsRequest + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!SearchTagsRequest.openapiRequiredFields + .isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException( + String.format( + "The required field(s) %s in SearchTagsRequest is not found in the" + + " empty JSON string", + SearchTagsRequest.openapiRequiredFields.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if ((jsonObj.get("tag_identifier") != null && !jsonObj.get("tag_identifier").isJsonNull()) + && !jsonObj.get("tag_identifier").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `tag_identifier` to be a primitive type in the" + + " JSON string but got `%s`", + jsonObj.get("tag_identifier").toString())); + } + if ((jsonObj.get("name_pattern") != null && !jsonObj.get("name_pattern").isJsonNull()) + && !jsonObj.get("name_pattern").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `name_pattern` to be a primitive type in the JSON" + + " string but got `%s`", + jsonObj.get("name_pattern").toString())); + } + if ((jsonObj.get("color") != null && !jsonObj.get("color").isJsonNull()) + && !jsonObj.get("color").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `color` to be a primitive type in the JSON string" + + " but got `%s`", + jsonObj.get("color").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!SearchTagsRequest.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'SearchTagsRequest' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter = + gson.getDelegateAdapter(this, TypeToken.get(SearchTagsRequest.class)); + + return (TypeAdapter) + new TypeAdapter() { + @Override + public void write(JsonWriter out, SearchTagsRequest value) + throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + obj.remove("additionalProperties"); + // serialize additional properties + if (value.getAdditionalProperties() != null) { + for (Map.Entry entry : + value.getAdditionalProperties().entrySet()) { + if (entry.getValue() instanceof String) + obj.addProperty(entry.getKey(), (String) entry.getValue()); + else if (entry.getValue() instanceof Number) + obj.addProperty(entry.getKey(), (Number) entry.getValue()); + else if (entry.getValue() instanceof Boolean) + obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); + else if (entry.getValue() instanceof Character) + obj.addProperty( + entry.getKey(), (Character) entry.getValue()); + else { + JsonElement jsonElement = gson.toJsonTree(entry.getValue()); + if (jsonElement.isJsonArray()) { + obj.add(entry.getKey(), jsonElement.getAsJsonArray()); + } else { + obj.add(entry.getKey(), jsonElement.getAsJsonObject()); + } + } + } + } + elementAdapter.write(out, obj); + } + + @Override + public SearchTagsRequest read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // store additional fields in the deserialized instance + SearchTagsRequest instance = thisAdapter.fromJsonTree(jsonObj); + for (Map.Entry entry : jsonObj.entrySet()) { + if (!openapiFields.contains(entry.getKey())) { + if (entry.getValue().isJsonPrimitive()) { // primitive type + if (entry.getValue().getAsJsonPrimitive().isString()) + instance.putAdditionalProperty( + entry.getKey(), entry.getValue().getAsString()); + else if (entry.getValue().getAsJsonPrimitive().isNumber()) + instance.putAdditionalProperty( + entry.getKey(), entry.getValue().getAsNumber()); + else if (entry.getValue().getAsJsonPrimitive().isBoolean()) + instance.putAdditionalProperty( + entry.getKey(), + entry.getValue().getAsBoolean()); + else + throw new IllegalArgumentException( + String.format( + "The field `%s` has unknown primitive" + + " type. Value: %s", + entry.getKey(), + entry.getValue().toString())); + } else if (entry.getValue().isJsonArray()) { + instance.putAdditionalProperty( + entry.getKey(), + gson.fromJson(entry.getValue(), List.class)); + } else { // JSON object + instance.putAdditionalProperty( + entry.getKey(), + gson.fromJson(entry.getValue(), HashMap.class)); + } + } + } + return instance; + } + }.nullSafe(); + } + } + + /** + * Create an instance of SearchTagsRequest given an JSON string + * + * @param jsonString JSON string + * @return An instance of SearchTagsRequest + * @throws IOException if the JSON string is invalid with respect to SearchTagsRequest + */ + public static SearchTagsRequest fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, SearchTagsRequest.class); + } + + /** + * Convert an instance of SearchTagsRequest to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} diff --git a/sdks/java/src/main/java/com/thoughtspot/client/model/SearchUserGroupsRequest.java b/sdks/java/src/main/java/com/thoughtspot/client/model/SearchUserGroupsRequest.java new file mode 100644 index 000000000..afefea99d --- /dev/null +++ b/sdks/java/src/main/java/com/thoughtspot/client/model/SearchUserGroupsRequest.java @@ -0,0 +1,1209 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client.model; + +import com.google.gson.Gson; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.TypeAdapter; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.reflect.TypeToken; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import com.thoughtspot.client.JSON; +import java.io.IOException; +import java.io.Serializable; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Objects; +import org.openapitools.jackson.nullable.JsonNullable; + +/** SearchUserGroupsRequest */ +@javax.annotation.Generated( + value = "org.openapitools.codegen.languages.JavaClientCodegen", + comments = "Generator version: 7.12.0") +public class SearchUserGroupsRequest implements Serializable { + private static final long serialVersionUID = 1L; + + public static final String SERIALIZED_NAME_DEFAULT_LIVEBOARD_IDENTIFIERS = + "default_liveboard_identifiers"; + + @SerializedName(SERIALIZED_NAME_DEFAULT_LIVEBOARD_IDENTIFIERS) + @javax.annotation.Nullable + private List defaultLiveboardIdentifiers; + + public static final String SERIALIZED_NAME_DESCRIPTION = "description"; + + @SerializedName(SERIALIZED_NAME_DESCRIPTION) + @javax.annotation.Nullable + private String description; + + public static final String SERIALIZED_NAME_DISPLAY_NAME = "display_name"; + + @SerializedName(SERIALIZED_NAME_DISPLAY_NAME) + @javax.annotation.Nullable + private String displayName; + + public static final String SERIALIZED_NAME_NAME_PATTERN = "name_pattern"; + + @SerializedName(SERIALIZED_NAME_NAME_PATTERN) + @javax.annotation.Nullable + private String namePattern; + + public static final String SERIALIZED_NAME_GROUP_IDENTIFIER = "group_identifier"; + + @SerializedName(SERIALIZED_NAME_GROUP_IDENTIFIER) + @javax.annotation.Nullable + private String groupIdentifier; + + public static final String SERIALIZED_NAME_ORG_IDENTIFIERS = "org_identifiers"; + + @SerializedName(SERIALIZED_NAME_ORG_IDENTIFIERS) + @javax.annotation.Nullable + private List orgIdentifiers; + + /** Gets or Sets privileges */ + @JsonAdapter(PrivilegesEnum.Adapter.class) + public enum PrivilegesEnum { + ADMINISTRATION("ADMINISTRATION"), + + AUTHORING("AUTHORING"), + + USERDATAUPLOADING("USERDATAUPLOADING"), + + DATADOWNLOADING("DATADOWNLOADING"), + + USERMANAGEMENT("USERMANAGEMENT"), + + DATAMANAGEMENT("DATAMANAGEMENT"), + + SHAREWITHALL("SHAREWITHALL"), + + JOBSCHEDULING("JOBSCHEDULING"), + + A3_ANALYSIS("A3ANALYSIS"), + + EXPERIMENTALFEATUREPRIVILEGE("EXPERIMENTALFEATUREPRIVILEGE"), + + BYPASSRLS("BYPASSRLS"), + + RANALYSIS("RANALYSIS"), + + DEVELOPER("DEVELOPER"), + + USER_ADMINISTRATION("USER_ADMINISTRATION"), + + GROUP_ADMINISTRATION("GROUP_ADMINISTRATION"), + + SYNCMANAGEMENT("SYNCMANAGEMENT"), + + CAN_CREATE_CATALOG("CAN_CREATE_CATALOG"), + + DISABLE_PINBOARD_CREATION("DISABLE_PINBOARD_CREATION"), + + LIVEBOARD_VERIFIER("LIVEBOARD_VERIFIER"), + + PREVIEW_THOUGHTSPOT_SAGE("PREVIEW_THOUGHTSPOT_SAGE"), + + APPLICATION_ADMINISTRATION("APPLICATION_ADMINISTRATION"), + + SYSTEM_INFO_ADMINISTRATION("SYSTEM_INFO_ADMINISTRATION"), + + ORG_ADMINISTRATION("ORG_ADMINISTRATION"), + + ROLE_ADMINISTRATION("ROLE_ADMINISTRATION"), + + AUTHENTICATION_ADMINISTRATION("AUTHENTICATION_ADMINISTRATION"), + + BILLING_INFO_ADMINISTRATION("BILLING_INFO_ADMINISTRATION"), + + CAN_MANAGE_CUSTOM_CALENDAR("CAN_MANAGE_CUSTOM_CALENDAR"), + + CAN_CREATE_OR_EDIT_CONNECTIONS("CAN_CREATE_OR_EDIT_CONNECTIONS"), + + CAN_MANAGE_WORKSHEET_VIEWS_TABLES("CAN_MANAGE_WORKSHEET_VIEWS_TABLES"), + + CAN_MANAGE_VERSION_CONTROL("CAN_MANAGE_VERSION_CONTROL"), + + THIRDPARTY_ANALYSIS("THIRDPARTY_ANALYSIS"), + + ALLOW_NON_EMBED_FULL_APP_ACCESS("ALLOW_NON_EMBED_FULL_APP_ACCESS"), + + CAN_ACCESS_ANALYST_STUDIO("CAN_ACCESS_ANALYST_STUDIO"), + + CAN_MANAGE_ANALYST_STUDIO("CAN_MANAGE_ANALYST_STUDIO"), + + PREVIEW_DOCUMENT_SEARCH("PREVIEW_DOCUMENT_SEARCH"), + + CAN_MODIFY_FOLDERS("CAN_MODIFY_FOLDERS"), + + CAN_MANAGE_VARIABLES("CAN_MANAGE_VARIABLES"), + + CAN_VIEW_FOLDERS("CAN_VIEW_FOLDERS"), + + CAN_MANAGE_AGENTSPOT("CAN_MANAGE_AGENTSPOT"), + + CAN_ACCESS_AGENTSPOT("CAN_ACCESS_AGENTSPOT"), + + CAN_SETUP_VERSION_CONTROL("CAN_SETUP_VERSION_CONTROL"), + + CAN_MANAGE_WEBHOOKS("CAN_MANAGE_WEBHOOKS"), + + CAN_DOWNLOAD_VISUALS("CAN_DOWNLOAD_VISUALS"), + + CAN_DOWNLOAD_DETAILED_DATA("CAN_DOWNLOAD_DETAILED_DATA"), + + CAN_USE_SPOTTER("CAN_USE_SPOTTER"); + + private String value; + + PrivilegesEnum(String value) { + this.value = value; + } + + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + public static PrivilegesEnum fromValue(String value) { + for (PrivilegesEnum b : PrivilegesEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + + public static class Adapter extends TypeAdapter { + @Override + public void write(final JsonWriter jsonWriter, final PrivilegesEnum enumeration) + throws IOException { + jsonWriter.value(enumeration.getValue()); + } + + @Override + public PrivilegesEnum read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + return PrivilegesEnum.fromValue(value); + } + } + + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + String value = jsonElement.getAsString(); + PrivilegesEnum.fromValue(value); + } + } + + public static final String SERIALIZED_NAME_PRIVILEGES = "privileges"; + + @SerializedName(SERIALIZED_NAME_PRIVILEGES) + @javax.annotation.Nullable + private List privileges; + + public static final String SERIALIZED_NAME_SUB_GROUP_IDENTIFIERS = "sub_group_identifiers"; + + @SerializedName(SERIALIZED_NAME_SUB_GROUP_IDENTIFIERS) + @javax.annotation.Nullable + private List subGroupIdentifiers; + + /** Group type. */ + @JsonAdapter(TypeEnum.Adapter.class) + public enum TypeEnum { + LOCAL_GROUP("LOCAL_GROUP"), + + LDAP_GROUP("LDAP_GROUP"), + + TEAM_GROUP("TEAM_GROUP"), + + TENANT_GROUP("TENANT_GROUP"); + + private String value; + + TypeEnum(String value) { + this.value = value; + } + + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + public static TypeEnum fromValue(String value) { + for (TypeEnum b : TypeEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + + public static class Adapter extends TypeAdapter { + @Override + public void write(final JsonWriter jsonWriter, final TypeEnum enumeration) + throws IOException { + jsonWriter.value(enumeration.getValue()); + } + + @Override + public TypeEnum read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + return TypeEnum.fromValue(value); + } + } + + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + String value = jsonElement.getAsString(); + TypeEnum.fromValue(value); + } + } + + public static final String SERIALIZED_NAME_TYPE = "type"; + + @SerializedName(SERIALIZED_NAME_TYPE) + @javax.annotation.Nullable + private TypeEnum type; + + public static final String SERIALIZED_NAME_USER_IDENTIFIERS = "user_identifiers"; + + @SerializedName(SERIALIZED_NAME_USER_IDENTIFIERS) + @javax.annotation.Nullable + private List userIdentifiers; + + /** + * Visibility of the group. To make a group visible to other users and groups, set the + * visibility to SHAREABLE. + */ + @JsonAdapter(VisibilityEnum.Adapter.class) + public enum VisibilityEnum { + SHARABLE("SHARABLE"), + + NON_SHARABLE("NON_SHARABLE"); + + private String value; + + VisibilityEnum(String value) { + this.value = value; + } + + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + public static VisibilityEnum fromValue(String value) { + for (VisibilityEnum b : VisibilityEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + + public static class Adapter extends TypeAdapter { + @Override + public void write(final JsonWriter jsonWriter, final VisibilityEnum enumeration) + throws IOException { + jsonWriter.value(enumeration.getValue()); + } + + @Override + public VisibilityEnum read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + return VisibilityEnum.fromValue(value); + } + } + + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + String value = jsonElement.getAsString(); + VisibilityEnum.fromValue(value); + } + } + + public static final String SERIALIZED_NAME_VISIBILITY = "visibility"; + + @SerializedName(SERIALIZED_NAME_VISIBILITY) + @javax.annotation.Nullable + private VisibilityEnum visibility; + + public static final String SERIALIZED_NAME_ROLE_IDENTIFIERS = "role_identifiers"; + + @SerializedName(SERIALIZED_NAME_ROLE_IDENTIFIERS) + @javax.annotation.Nullable + private List roleIdentifiers; + + public static final String SERIALIZED_NAME_RECORD_OFFSET = "record_offset"; + + @SerializedName(SERIALIZED_NAME_RECORD_OFFSET) + @javax.annotation.Nullable + private Integer recordOffset = 0; + + public static final String SERIALIZED_NAME_RECORD_SIZE = "record_size"; + + @SerializedName(SERIALIZED_NAME_RECORD_SIZE) + @javax.annotation.Nullable + private Integer recordSize = 10; + + public static final String SERIALIZED_NAME_SORT_OPTIONS = "sort_options"; + + @SerializedName(SERIALIZED_NAME_SORT_OPTIONS) + @javax.annotation.Nullable + private SortOptions sortOptions; + + public static final String SERIALIZED_NAME_INCLUDE_USERS = "include_users"; + + @SerializedName(SERIALIZED_NAME_INCLUDE_USERS) + @javax.annotation.Nullable + private Boolean includeUsers = true; + + public static final String SERIALIZED_NAME_INCLUDE_SUB_GROUPS = "include_sub_groups"; + + @SerializedName(SERIALIZED_NAME_INCLUDE_SUB_GROUPS) + @javax.annotation.Nullable + private Boolean includeSubGroups = true; + + public SearchUserGroupsRequest() {} + + public SearchUserGroupsRequest defaultLiveboardIdentifiers( + @javax.annotation.Nullable List defaultLiveboardIdentifiers) { + this.defaultLiveboardIdentifiers = defaultLiveboardIdentifiers; + return this; + } + + public SearchUserGroupsRequest addDefaultLiveboardIdentifiersItem( + String defaultLiveboardIdentifiersItem) { + if (this.defaultLiveboardIdentifiers == null) { + this.defaultLiveboardIdentifiers = new ArrayList<>(); + } + this.defaultLiveboardIdentifiers.add(defaultLiveboardIdentifiersItem); + return this; + } + + /** + * GUID of Liveboards that are assigned as default Liveboards to the users in the group. + * + * @return defaultLiveboardIdentifiers + */ + @javax.annotation.Nullable + public List getDefaultLiveboardIdentifiers() { + return defaultLiveboardIdentifiers; + } + + public void setDefaultLiveboardIdentifiers( + @javax.annotation.Nullable List defaultLiveboardIdentifiers) { + this.defaultLiveboardIdentifiers = defaultLiveboardIdentifiers; + } + + public SearchUserGroupsRequest description(@javax.annotation.Nullable String description) { + this.description = description; + return this; + } + + /** + * Description of the group + * + * @return description + */ + @javax.annotation.Nullable + public String getDescription() { + return description; + } + + public void setDescription(@javax.annotation.Nullable String description) { + this.description = description; + } + + public SearchUserGroupsRequest displayName(@javax.annotation.Nullable String displayName) { + this.displayName = displayName; + return this; + } + + /** + * Display name of the group + * + * @return displayName + */ + @javax.annotation.Nullable + public String getDisplayName() { + return displayName; + } + + public void setDisplayName(@javax.annotation.Nullable String displayName) { + this.displayName = displayName; + } + + public SearchUserGroupsRequest namePattern(@javax.annotation.Nullable String namePattern) { + this.namePattern = namePattern; + return this; + } + + /** + * A pattern to match case-insensitive name of the Group object. + * + * @return namePattern + */ + @javax.annotation.Nullable + public String getNamePattern() { + return namePattern; + } + + public void setNamePattern(@javax.annotation.Nullable String namePattern) { + this.namePattern = namePattern; + } + + public SearchUserGroupsRequest groupIdentifier( + @javax.annotation.Nullable String groupIdentifier) { + this.groupIdentifier = groupIdentifier; + return this; + } + + /** + * GUID or name of the group + * + * @return groupIdentifier + */ + @javax.annotation.Nullable + public String getGroupIdentifier() { + return groupIdentifier; + } + + public void setGroupIdentifier(@javax.annotation.Nullable String groupIdentifier) { + this.groupIdentifier = groupIdentifier; + } + + public SearchUserGroupsRequest orgIdentifiers( + @javax.annotation.Nullable List orgIdentifiers) { + this.orgIdentifiers = orgIdentifiers; + return this; + } + + public SearchUserGroupsRequest addOrgIdentifiersItem(String orgIdentifiersItem) { + if (this.orgIdentifiers == null) { + this.orgIdentifiers = new ArrayList<>(); + } + this.orgIdentifiers.add(orgIdentifiersItem); + return this; + } + + /** + * ID or name of the Org to which the group belongs + * + * @return orgIdentifiers + */ + @javax.annotation.Nullable + public List getOrgIdentifiers() { + return orgIdentifiers; + } + + public void setOrgIdentifiers(@javax.annotation.Nullable List orgIdentifiers) { + this.orgIdentifiers = orgIdentifiers; + } + + public SearchUserGroupsRequest privileges( + @javax.annotation.Nullable List privileges) { + this.privileges = privileges; + return this; + } + + public SearchUserGroupsRequest addPrivilegesItem(PrivilegesEnum privilegesItem) { + if (this.privileges == null) { + this.privileges = new ArrayList<>(); + } + this.privileges.add(privilegesItem); + return this; + } + + /** + * Privileges assigned to the group. + * + * @return privileges + */ + @javax.annotation.Nullable + public List getPrivileges() { + return privileges; + } + + public void setPrivileges(@javax.annotation.Nullable List privileges) { + this.privileges = privileges; + } + + public SearchUserGroupsRequest subGroupIdentifiers( + @javax.annotation.Nullable List subGroupIdentifiers) { + this.subGroupIdentifiers = subGroupIdentifiers; + return this; + } + + public SearchUserGroupsRequest addSubGroupIdentifiersItem(String subGroupIdentifiersItem) { + if (this.subGroupIdentifiers == null) { + this.subGroupIdentifiers = new ArrayList<>(); + } + this.subGroupIdentifiers.add(subGroupIdentifiersItem); + return this; + } + + /** + * GUID or name of the sub groups. A subgroup is a group assigned to a parent group. + * + * @return subGroupIdentifiers + */ + @javax.annotation.Nullable + public List getSubGroupIdentifiers() { + return subGroupIdentifiers; + } + + public void setSubGroupIdentifiers( + @javax.annotation.Nullable List subGroupIdentifiers) { + this.subGroupIdentifiers = subGroupIdentifiers; + } + + public SearchUserGroupsRequest type(@javax.annotation.Nullable TypeEnum type) { + this.type = type; + return this; + } + + /** + * Group type. + * + * @return type + */ + @javax.annotation.Nullable + public TypeEnum getType() { + return type; + } + + public void setType(@javax.annotation.Nullable TypeEnum type) { + this.type = type; + } + + public SearchUserGroupsRequest userIdentifiers( + @javax.annotation.Nullable List userIdentifiers) { + this.userIdentifiers = userIdentifiers; + return this; + } + + public SearchUserGroupsRequest addUserIdentifiersItem(String userIdentifiersItem) { + if (this.userIdentifiers == null) { + this.userIdentifiers = new ArrayList<>(); + } + this.userIdentifiers.add(userIdentifiersItem); + return this; + } + + /** + * GUID or name of the users assigned to the group. + * + * @return userIdentifiers + */ + @javax.annotation.Nullable + public List getUserIdentifiers() { + return userIdentifiers; + } + + public void setUserIdentifiers(@javax.annotation.Nullable List userIdentifiers) { + this.userIdentifiers = userIdentifiers; + } + + public SearchUserGroupsRequest visibility( + @javax.annotation.Nullable VisibilityEnum visibility) { + this.visibility = visibility; + return this; + } + + /** + * Visibility of the group. To make a group visible to other users and groups, set the + * visibility to SHAREABLE. + * + * @return visibility + */ + @javax.annotation.Nullable + public VisibilityEnum getVisibility() { + return visibility; + } + + public void setVisibility(@javax.annotation.Nullable VisibilityEnum visibility) { + this.visibility = visibility; + } + + public SearchUserGroupsRequest roleIdentifiers( + @javax.annotation.Nullable List roleIdentifiers) { + this.roleIdentifiers = roleIdentifiers; + return this; + } + + public SearchUserGroupsRequest addRoleIdentifiersItem(String roleIdentifiersItem) { + if (this.roleIdentifiers == null) { + this.roleIdentifiers = new ArrayList<>(); + } + this.roleIdentifiers.add(roleIdentifiersItem); + return this; + } + + /** + * Filter groups with a list of Roles assigned to a group + * + * @return roleIdentifiers + */ + @javax.annotation.Nullable + public List getRoleIdentifiers() { + return roleIdentifiers; + } + + public void setRoleIdentifiers(@javax.annotation.Nullable List roleIdentifiers) { + this.roleIdentifiers = roleIdentifiers; + } + + public SearchUserGroupsRequest recordOffset(@javax.annotation.Nullable Integer recordOffset) { + this.recordOffset = recordOffset; + return this; + } + + /** + * The starting record number from where the records should be included. + * + * @return recordOffset + */ + @javax.annotation.Nullable + public Integer getRecordOffset() { + return recordOffset; + } + + public void setRecordOffset(@javax.annotation.Nullable Integer recordOffset) { + this.recordOffset = recordOffset; + } + + public SearchUserGroupsRequest recordSize(@javax.annotation.Nullable Integer recordSize) { + this.recordSize = recordSize; + return this; + } + + /** + * The number of records that should be included. + * + * @return recordSize + */ + @javax.annotation.Nullable + public Integer getRecordSize() { + return recordSize; + } + + public void setRecordSize(@javax.annotation.Nullable Integer recordSize) { + this.recordSize = recordSize; + } + + public SearchUserGroupsRequest sortOptions(@javax.annotation.Nullable SortOptions sortOptions) { + this.sortOptions = sortOptions; + return this; + } + + /** + * Sort options to filter group details. + * + * @return sortOptions + */ + @javax.annotation.Nullable + public SortOptions getSortOptions() { + return sortOptions; + } + + public void setSortOptions(@javax.annotation.Nullable SortOptions sortOptions) { + this.sortOptions = sortOptions; + } + + public SearchUserGroupsRequest includeUsers(@javax.annotation.Nullable Boolean includeUsers) { + this.includeUsers = includeUsers; + return this; + } + + /** + * <div>Version: 10.10.0.cl or later </div> Define Parameter to consider if the + * users should be included in group search response. + * + * @return includeUsers + */ + @javax.annotation.Nullable + public Boolean getIncludeUsers() { + return includeUsers; + } + + public void setIncludeUsers(@javax.annotation.Nullable Boolean includeUsers) { + this.includeUsers = includeUsers; + } + + public SearchUserGroupsRequest includeSubGroups( + @javax.annotation.Nullable Boolean includeSubGroups) { + this.includeSubGroups = includeSubGroups; + return this; + } + + /** + * <div>Version: 10.10.0.cl or later </div> Define Parameter to consider if the sub + * groups should be included in group search response. + * + * @return includeSubGroups + */ + @javax.annotation.Nullable + public Boolean getIncludeSubGroups() { + return includeSubGroups; + } + + public void setIncludeSubGroups(@javax.annotation.Nullable Boolean includeSubGroups) { + this.includeSubGroups = includeSubGroups; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key name of the property + * @param value value of the property + * @return the SearchUserGroupsRequest instance itself + */ + public SearchUserGroupsRequest putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return a map of objects + */ + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key name of the property + * @return an object + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + SearchUserGroupsRequest searchUserGroupsRequest = (SearchUserGroupsRequest) o; + return Objects.equals( + this.defaultLiveboardIdentifiers, + searchUserGroupsRequest.defaultLiveboardIdentifiers) + && Objects.equals(this.description, searchUserGroupsRequest.description) + && Objects.equals(this.displayName, searchUserGroupsRequest.displayName) + && Objects.equals(this.namePattern, searchUserGroupsRequest.namePattern) + && Objects.equals(this.groupIdentifier, searchUserGroupsRequest.groupIdentifier) + && Objects.equals(this.orgIdentifiers, searchUserGroupsRequest.orgIdentifiers) + && Objects.equals(this.privileges, searchUserGroupsRequest.privileges) + && Objects.equals( + this.subGroupIdentifiers, searchUserGroupsRequest.subGroupIdentifiers) + && Objects.equals(this.type, searchUserGroupsRequest.type) + && Objects.equals(this.userIdentifiers, searchUserGroupsRequest.userIdentifiers) + && Objects.equals(this.visibility, searchUserGroupsRequest.visibility) + && Objects.equals(this.roleIdentifiers, searchUserGroupsRequest.roleIdentifiers) + && Objects.equals(this.recordOffset, searchUserGroupsRequest.recordOffset) + && Objects.equals(this.recordSize, searchUserGroupsRequest.recordSize) + && Objects.equals(this.sortOptions, searchUserGroupsRequest.sortOptions) + && Objects.equals(this.includeUsers, searchUserGroupsRequest.includeUsers) + && Objects.equals(this.includeSubGroups, searchUserGroupsRequest.includeSubGroups) + && Objects.equals( + this.additionalProperties, searchUserGroupsRequest.additionalProperties); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b + || (a != null + && b != null + && a.isPresent() + && b.isPresent() + && Objects.deepEquals(a.get(), b.get())); + } + + @Override + public int hashCode() { + return Objects.hash( + defaultLiveboardIdentifiers, + description, + displayName, + namePattern, + groupIdentifier, + orgIdentifiers, + privileges, + subGroupIdentifiers, + type, + userIdentifiers, + visibility, + roleIdentifiers, + recordOffset, + recordSize, + sortOptions, + includeUsers, + includeSubGroups, + additionalProperties); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; + } + return a.isPresent() ? Arrays.deepHashCode(new Object[] {a.get()}) : 31; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class SearchUserGroupsRequest {\n"); + sb.append(" defaultLiveboardIdentifiers: ") + .append(toIndentedString(defaultLiveboardIdentifiers)) + .append("\n"); + sb.append(" description: ").append(toIndentedString(description)).append("\n"); + sb.append(" displayName: ").append(toIndentedString(displayName)).append("\n"); + sb.append(" namePattern: ").append(toIndentedString(namePattern)).append("\n"); + sb.append(" groupIdentifier: ").append(toIndentedString(groupIdentifier)).append("\n"); + sb.append(" orgIdentifiers: ").append(toIndentedString(orgIdentifiers)).append("\n"); + sb.append(" privileges: ").append(toIndentedString(privileges)).append("\n"); + sb.append(" subGroupIdentifiers: ") + .append(toIndentedString(subGroupIdentifiers)) + .append("\n"); + sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append(" userIdentifiers: ").append(toIndentedString(userIdentifiers)).append("\n"); + sb.append(" visibility: ").append(toIndentedString(visibility)).append("\n"); + sb.append(" roleIdentifiers: ").append(toIndentedString(roleIdentifiers)).append("\n"); + sb.append(" recordOffset: ").append(toIndentedString(recordOffset)).append("\n"); + sb.append(" recordSize: ").append(toIndentedString(recordSize)).append("\n"); + sb.append(" sortOptions: ").append(toIndentedString(sortOptions)).append("\n"); + sb.append(" includeUsers: ").append(toIndentedString(includeUsers)).append("\n"); + sb.append(" includeSubGroups: ").append(toIndentedString(includeSubGroups)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first + * line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("default_liveboard_identifiers"); + openapiFields.add("description"); + openapiFields.add("display_name"); + openapiFields.add("name_pattern"); + openapiFields.add("group_identifier"); + openapiFields.add("org_identifiers"); + openapiFields.add("privileges"); + openapiFields.add("sub_group_identifiers"); + openapiFields.add("type"); + openapiFields.add("user_identifiers"); + openapiFields.add("visibility"); + openapiFields.add("role_identifiers"); + openapiFields.add("record_offset"); + openapiFields.add("record_size"); + openapiFields.add("sort_options"); + openapiFields.add("include_users"); + openapiFields.add("include_sub_groups"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to SearchUserGroupsRequest + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!SearchUserGroupsRequest.openapiRequiredFields + .isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException( + String.format( + "The required field(s) %s in SearchUserGroupsRequest is not found" + + " in the empty JSON string", + SearchUserGroupsRequest.openapiRequiredFields.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // ensure the optional json data is an array if present + if (jsonObj.get("default_liveboard_identifiers") != null + && !jsonObj.get("default_liveboard_identifiers").isJsonNull() + && !jsonObj.get("default_liveboard_identifiers").isJsonArray()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `default_liveboard_identifiers` to be an array in" + + " the JSON string but got `%s`", + jsonObj.get("default_liveboard_identifiers").toString())); + } + if ((jsonObj.get("description") != null && !jsonObj.get("description").isJsonNull()) + && !jsonObj.get("description").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `description` to be a primitive type in the JSON" + + " string but got `%s`", + jsonObj.get("description").toString())); + } + if ((jsonObj.get("display_name") != null && !jsonObj.get("display_name").isJsonNull()) + && !jsonObj.get("display_name").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `display_name` to be a primitive type in the JSON" + + " string but got `%s`", + jsonObj.get("display_name").toString())); + } + if ((jsonObj.get("name_pattern") != null && !jsonObj.get("name_pattern").isJsonNull()) + && !jsonObj.get("name_pattern").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `name_pattern` to be a primitive type in the JSON" + + " string but got `%s`", + jsonObj.get("name_pattern").toString())); + } + if ((jsonObj.get("group_identifier") != null + && !jsonObj.get("group_identifier").isJsonNull()) + && !jsonObj.get("group_identifier").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `group_identifier` to be a primitive type in the" + + " JSON string but got `%s`", + jsonObj.get("group_identifier").toString())); + } + // ensure the optional json data is an array if present + if (jsonObj.get("org_identifiers") != null + && !jsonObj.get("org_identifiers").isJsonNull() + && !jsonObj.get("org_identifiers").isJsonArray()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `org_identifiers` to be an array in the JSON" + + " string but got `%s`", + jsonObj.get("org_identifiers").toString())); + } + // ensure the optional json data is an array if present + if (jsonObj.get("privileges") != null + && !jsonObj.get("privileges").isJsonNull() + && !jsonObj.get("privileges").isJsonArray()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `privileges` to be an array in the JSON string but" + + " got `%s`", + jsonObj.get("privileges").toString())); + } + // ensure the optional json data is an array if present + if (jsonObj.get("sub_group_identifiers") != null + && !jsonObj.get("sub_group_identifiers").isJsonNull() + && !jsonObj.get("sub_group_identifiers").isJsonArray()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `sub_group_identifiers` to be an array in the JSON" + + " string but got `%s`", + jsonObj.get("sub_group_identifiers").toString())); + } + if ((jsonObj.get("type") != null && !jsonObj.get("type").isJsonNull()) + && !jsonObj.get("type").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `type` to be a primitive type in the JSON string" + + " but got `%s`", + jsonObj.get("type").toString())); + } + // validate the optional field `type` + if (jsonObj.get("type") != null && !jsonObj.get("type").isJsonNull()) { + TypeEnum.validateJsonElement(jsonObj.get("type")); + } + // ensure the optional json data is an array if present + if (jsonObj.get("user_identifiers") != null + && !jsonObj.get("user_identifiers").isJsonNull() + && !jsonObj.get("user_identifiers").isJsonArray()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `user_identifiers` to be an array in the JSON" + + " string but got `%s`", + jsonObj.get("user_identifiers").toString())); + } + if ((jsonObj.get("visibility") != null && !jsonObj.get("visibility").isJsonNull()) + && !jsonObj.get("visibility").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `visibility` to be a primitive type in the JSON" + + " string but got `%s`", + jsonObj.get("visibility").toString())); + } + // validate the optional field `visibility` + if (jsonObj.get("visibility") != null && !jsonObj.get("visibility").isJsonNull()) { + VisibilityEnum.validateJsonElement(jsonObj.get("visibility")); + } + // ensure the optional json data is an array if present + if (jsonObj.get("role_identifiers") != null + && !jsonObj.get("role_identifiers").isJsonNull() + && !jsonObj.get("role_identifiers").isJsonArray()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `role_identifiers` to be an array in the JSON" + + " string but got `%s`", + jsonObj.get("role_identifiers").toString())); + } + // validate the optional field `sort_options` + if (jsonObj.get("sort_options") != null && !jsonObj.get("sort_options").isJsonNull()) { + SortOptions.validateJsonElement(jsonObj.get("sort_options")); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!SearchUserGroupsRequest.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'SearchUserGroupsRequest' and its + // subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter = + gson.getDelegateAdapter(this, TypeToken.get(SearchUserGroupsRequest.class)); + + return (TypeAdapter) + new TypeAdapter() { + @Override + public void write(JsonWriter out, SearchUserGroupsRequest value) + throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + obj.remove("additionalProperties"); + // serialize additional properties + if (value.getAdditionalProperties() != null) { + for (Map.Entry entry : + value.getAdditionalProperties().entrySet()) { + if (entry.getValue() instanceof String) + obj.addProperty(entry.getKey(), (String) entry.getValue()); + else if (entry.getValue() instanceof Number) + obj.addProperty(entry.getKey(), (Number) entry.getValue()); + else if (entry.getValue() instanceof Boolean) + obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); + else if (entry.getValue() instanceof Character) + obj.addProperty( + entry.getKey(), (Character) entry.getValue()); + else { + JsonElement jsonElement = gson.toJsonTree(entry.getValue()); + if (jsonElement.isJsonArray()) { + obj.add(entry.getKey(), jsonElement.getAsJsonArray()); + } else { + obj.add(entry.getKey(), jsonElement.getAsJsonObject()); + } + } + } + } + elementAdapter.write(out, obj); + } + + @Override + public SearchUserGroupsRequest read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // store additional fields in the deserialized instance + SearchUserGroupsRequest instance = thisAdapter.fromJsonTree(jsonObj); + for (Map.Entry entry : jsonObj.entrySet()) { + if (!openapiFields.contains(entry.getKey())) { + if (entry.getValue().isJsonPrimitive()) { // primitive type + if (entry.getValue().getAsJsonPrimitive().isString()) + instance.putAdditionalProperty( + entry.getKey(), entry.getValue().getAsString()); + else if (entry.getValue().getAsJsonPrimitive().isNumber()) + instance.putAdditionalProperty( + entry.getKey(), entry.getValue().getAsNumber()); + else if (entry.getValue().getAsJsonPrimitive().isBoolean()) + instance.putAdditionalProperty( + entry.getKey(), + entry.getValue().getAsBoolean()); + else + throw new IllegalArgumentException( + String.format( + "The field `%s` has unknown primitive" + + " type. Value: %s", + entry.getKey(), + entry.getValue().toString())); + } else if (entry.getValue().isJsonArray()) { + instance.putAdditionalProperty( + entry.getKey(), + gson.fromJson(entry.getValue(), List.class)); + } else { // JSON object + instance.putAdditionalProperty( + entry.getKey(), + gson.fromJson(entry.getValue(), HashMap.class)); + } + } + } + return instance; + } + }.nullSafe(); + } + } + + /** + * Create an instance of SearchUserGroupsRequest given an JSON string + * + * @param jsonString JSON string + * @return An instance of SearchUserGroupsRequest + * @throws IOException if the JSON string is invalid with respect to SearchUserGroupsRequest + */ + public static SearchUserGroupsRequest fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, SearchUserGroupsRequest.class); + } + + /** + * Convert an instance of SearchUserGroupsRequest to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} diff --git a/sdks/java/src/main/java/com/thoughtspot/client/model/SearchUsersRequest.java b/sdks/java/src/main/java/com/thoughtspot/client/model/SearchUsersRequest.java new file mode 100644 index 000000000..30a7f3bc9 --- /dev/null +++ b/sdks/java/src/main/java/com/thoughtspot/client/model/SearchUsersRequest.java @@ -0,0 +1,1409 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client.model; + +import com.google.gson.Gson; +import com.google.gson.JsonArray; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.TypeAdapter; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.reflect.TypeToken; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import com.thoughtspot.client.JSON; +import java.io.IOException; +import java.io.Serializable; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Objects; +import org.openapitools.jackson.nullable.JsonNullable; + +/** SearchUsersRequest */ +@javax.annotation.Generated( + value = "org.openapitools.codegen.languages.JavaClientCodegen", + comments = "Generator version: 7.12.0") +public class SearchUsersRequest implements Serializable { + private static final long serialVersionUID = 1L; + + public static final String SERIALIZED_NAME_USER_IDENTIFIER = "user_identifier"; + + @SerializedName(SERIALIZED_NAME_USER_IDENTIFIER) + @javax.annotation.Nullable + private String userIdentifier; + + public static final String SERIALIZED_NAME_DISPLAY_NAME = "display_name"; + + @SerializedName(SERIALIZED_NAME_DISPLAY_NAME) + @javax.annotation.Nullable + private String displayName; + + public static final String SERIALIZED_NAME_NAME_PATTERN = "name_pattern"; + + @SerializedName(SERIALIZED_NAME_NAME_PATTERN) + @javax.annotation.Nullable + private String namePattern; + + /** Visibility of the user */ + @JsonAdapter(VisibilityEnum.Adapter.class) + public enum VisibilityEnum { + SHARABLE("SHARABLE"), + + NON_SHARABLE("NON_SHARABLE"); + + private String value; + + VisibilityEnum(String value) { + this.value = value; + } + + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + public static VisibilityEnum fromValue(String value) { + for (VisibilityEnum b : VisibilityEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + + public static class Adapter extends TypeAdapter { + @Override + public void write(final JsonWriter jsonWriter, final VisibilityEnum enumeration) + throws IOException { + jsonWriter.value(enumeration.getValue()); + } + + @Override + public VisibilityEnum read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + return VisibilityEnum.fromValue(value); + } + } + + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + String value = jsonElement.getAsString(); + VisibilityEnum.fromValue(value); + } + } + + public static final String SERIALIZED_NAME_VISIBILITY = "visibility"; + + @SerializedName(SERIALIZED_NAME_VISIBILITY) + @javax.annotation.Nullable + private VisibilityEnum visibility; + + public static final String SERIALIZED_NAME_EMAIL = "email"; + + @SerializedName(SERIALIZED_NAME_EMAIL) + @javax.annotation.Nullable + private String email; + + public static final String SERIALIZED_NAME_GROUP_IDENTIFIERS = "group_identifiers"; + + @SerializedName(SERIALIZED_NAME_GROUP_IDENTIFIERS) + @javax.annotation.Nullable + private List groupIdentifiers; + + /** Gets or Sets privileges */ + @JsonAdapter(PrivilegesEnum.Adapter.class) + public enum PrivilegesEnum { + ADMINISTRATION("ADMINISTRATION"), + + AUTHORING("AUTHORING"), + + USERDATAUPLOADING("USERDATAUPLOADING"), + + DATADOWNLOADING("DATADOWNLOADING"), + + USERMANAGEMENT("USERMANAGEMENT"), + + DATAMANAGEMENT("DATAMANAGEMENT"), + + SHAREWITHALL("SHAREWITHALL"), + + JOBSCHEDULING("JOBSCHEDULING"), + + A3_ANALYSIS("A3ANALYSIS"), + + EXPERIMENTALFEATUREPRIVILEGE("EXPERIMENTALFEATUREPRIVILEGE"), + + BYPASSRLS("BYPASSRLS"), + + RANALYSIS("RANALYSIS"), + + DEVELOPER("DEVELOPER"), + + USER_ADMINISTRATION("USER_ADMINISTRATION"), + + GROUP_ADMINISTRATION("GROUP_ADMINISTRATION"), + + SYNCMANAGEMENT("SYNCMANAGEMENT"), + + CAN_CREATE_CATALOG("CAN_CREATE_CATALOG"), + + DISABLE_PINBOARD_CREATION("DISABLE_PINBOARD_CREATION"), + + LIVEBOARD_VERIFIER("LIVEBOARD_VERIFIER"), + + PREVIEW_THOUGHTSPOT_SAGE("PREVIEW_THOUGHTSPOT_SAGE"), + + APPLICATION_ADMINISTRATION("APPLICATION_ADMINISTRATION"), + + SYSTEM_INFO_ADMINISTRATION("SYSTEM_INFO_ADMINISTRATION"), + + ORG_ADMINISTRATION("ORG_ADMINISTRATION"), + + ROLE_ADMINISTRATION("ROLE_ADMINISTRATION"), + + AUTHENTICATION_ADMINISTRATION("AUTHENTICATION_ADMINISTRATION"), + + BILLING_INFO_ADMINISTRATION("BILLING_INFO_ADMINISTRATION"), + + CAN_MANAGE_CUSTOM_CALENDAR("CAN_MANAGE_CUSTOM_CALENDAR"), + + CAN_CREATE_OR_EDIT_CONNECTIONS("CAN_CREATE_OR_EDIT_CONNECTIONS"), + + CAN_MANAGE_WORKSHEET_VIEWS_TABLES("CAN_MANAGE_WORKSHEET_VIEWS_TABLES"), + + CAN_MANAGE_VERSION_CONTROL("CAN_MANAGE_VERSION_CONTROL"), + + THIRDPARTY_ANALYSIS("THIRDPARTY_ANALYSIS"), + + ALLOW_NON_EMBED_FULL_APP_ACCESS("ALLOW_NON_EMBED_FULL_APP_ACCESS"), + + CAN_ACCESS_ANALYST_STUDIO("CAN_ACCESS_ANALYST_STUDIO"), + + CAN_MANAGE_ANALYST_STUDIO("CAN_MANAGE_ANALYST_STUDIO"), + + PREVIEW_DOCUMENT_SEARCH("PREVIEW_DOCUMENT_SEARCH"), + + CAN_MODIFY_FOLDERS("CAN_MODIFY_FOLDERS"), + + CAN_MANAGE_VARIABLES("CAN_MANAGE_VARIABLES"), + + CAN_VIEW_FOLDERS("CAN_VIEW_FOLDERS"), + + CAN_MANAGE_AGENTSPOT("CAN_MANAGE_AGENTSPOT"), + + CAN_ACCESS_AGENTSPOT("CAN_ACCESS_AGENTSPOT"), + + CAN_SETUP_VERSION_CONTROL("CAN_SETUP_VERSION_CONTROL"), + + CAN_MANAGE_WEBHOOKS("CAN_MANAGE_WEBHOOKS"), + + CAN_DOWNLOAD_VISUALS("CAN_DOWNLOAD_VISUALS"), + + CAN_DOWNLOAD_DETAILED_DATA("CAN_DOWNLOAD_DETAILED_DATA"), + + CAN_USE_SPOTTER("CAN_USE_SPOTTER"); + + private String value; + + PrivilegesEnum(String value) { + this.value = value; + } + + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + public static PrivilegesEnum fromValue(String value) { + for (PrivilegesEnum b : PrivilegesEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + + public static class Adapter extends TypeAdapter { + @Override + public void write(final JsonWriter jsonWriter, final PrivilegesEnum enumeration) + throws IOException { + jsonWriter.value(enumeration.getValue()); + } + + @Override + public PrivilegesEnum read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + return PrivilegesEnum.fromValue(value); + } + } + + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + String value = jsonElement.getAsString(); + PrivilegesEnum.fromValue(value); + } + } + + public static final String SERIALIZED_NAME_PRIVILEGES = "privileges"; + + @SerializedName(SERIALIZED_NAME_PRIVILEGES) + @javax.annotation.Nullable + private List privileges; + + /** Type of the account */ + @JsonAdapter(AccountTypeEnum.Adapter.class) + public enum AccountTypeEnum { + LOCAL_USER("LOCAL_USER"), + + LDAP_USER("LDAP_USER"), + + SAML_USER("SAML_USER"), + + OIDC_USER("OIDC_USER"), + + REMOTE_USER("REMOTE_USER"); + + private String value; + + AccountTypeEnum(String value) { + this.value = value; + } + + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + public static AccountTypeEnum fromValue(String value) { + for (AccountTypeEnum b : AccountTypeEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + + public static class Adapter extends TypeAdapter { + @Override + public void write(final JsonWriter jsonWriter, final AccountTypeEnum enumeration) + throws IOException { + jsonWriter.value(enumeration.getValue()); + } + + @Override + public AccountTypeEnum read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + return AccountTypeEnum.fromValue(value); + } + } + + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + String value = jsonElement.getAsString(); + AccountTypeEnum.fromValue(value); + } + } + + public static final String SERIALIZED_NAME_ACCOUNT_TYPE = "account_type"; + + @SerializedName(SERIALIZED_NAME_ACCOUNT_TYPE) + @javax.annotation.Nullable + private AccountTypeEnum accountType; + + /** Current status of the user account. */ + @JsonAdapter(AccountStatusEnum.Adapter.class) + public enum AccountStatusEnum { + ACTIVE("ACTIVE"), + + INACTIVE("INACTIVE"), + + EXPIRED("EXPIRED"), + + LOCKED("LOCKED"), + + PENDING("PENDING"), + + SUSPENDED("SUSPENDED"); + + private String value; + + AccountStatusEnum(String value) { + this.value = value; + } + + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + public static AccountStatusEnum fromValue(String value) { + for (AccountStatusEnum b : AccountStatusEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + + public static class Adapter extends TypeAdapter { + @Override + public void write(final JsonWriter jsonWriter, final AccountStatusEnum enumeration) + throws IOException { + jsonWriter.value(enumeration.getValue()); + } + + @Override + public AccountStatusEnum read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + return AccountStatusEnum.fromValue(value); + } + } + + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + String value = jsonElement.getAsString(); + AccountStatusEnum.fromValue(value); + } + } + + public static final String SERIALIZED_NAME_ACCOUNT_STATUS = "account_status"; + + @SerializedName(SERIALIZED_NAME_ACCOUNT_STATUS) + @javax.annotation.Nullable + private AccountStatusEnum accountStatus; + + public static final String SERIALIZED_NAME_NOTIFY_ON_SHARE = "notify_on_share"; + + @SerializedName(SERIALIZED_NAME_NOTIFY_ON_SHARE) + @javax.annotation.Nullable + private Boolean notifyOnShare; + + public static final String SERIALIZED_NAME_SHOW_ONBOARDING_EXPERIENCE = + "show_onboarding_experience"; + + @SerializedName(SERIALIZED_NAME_SHOW_ONBOARDING_EXPERIENCE) + @javax.annotation.Nullable + private Boolean showOnboardingExperience; + + public static final String SERIALIZED_NAME_ONBOARDING_EXPERIENCE_COMPLETED = + "onboarding_experience_completed"; + + @SerializedName(SERIALIZED_NAME_ONBOARDING_EXPERIENCE_COMPLETED) + @javax.annotation.Nullable + private Boolean onboardingExperienceCompleted; + + public static final String SERIALIZED_NAME_ORG_IDENTIFIERS = "org_identifiers"; + + @SerializedName(SERIALIZED_NAME_ORG_IDENTIFIERS) + @javax.annotation.Nullable + private List orgIdentifiers; + + public static final String SERIALIZED_NAME_HOME_LIVEBOARD_IDENTIFIER = + "home_liveboard_identifier"; + + @SerializedName(SERIALIZED_NAME_HOME_LIVEBOARD_IDENTIFIER) + @javax.annotation.Nullable + private String homeLiveboardIdentifier; + + public static final String SERIALIZED_NAME_FAVORITE_METADATA = "favorite_metadata"; + + @SerializedName(SERIALIZED_NAME_FAVORITE_METADATA) + @javax.annotation.Nullable + private List favoriteMetadata; + + public static final String SERIALIZED_NAME_RECORD_OFFSET = "record_offset"; + + @SerializedName(SERIALIZED_NAME_RECORD_OFFSET) + @javax.annotation.Nullable + private Integer recordOffset = 0; + + public static final String SERIALIZED_NAME_RECORD_SIZE = "record_size"; + + @SerializedName(SERIALIZED_NAME_RECORD_SIZE) + @javax.annotation.Nullable + private Integer recordSize = 10; + + public static final String SERIALIZED_NAME_SORT_OPTIONS = "sort_options"; + + @SerializedName(SERIALIZED_NAME_SORT_OPTIONS) + @javax.annotation.Nullable + private SortOptions sortOptions; + + public static final String SERIALIZED_NAME_ROLE_IDENTIFIERS = "role_identifiers"; + + @SerializedName(SERIALIZED_NAME_ROLE_IDENTIFIERS) + @javax.annotation.Nullable + private List roleIdentifiers; + + public static final String SERIALIZED_NAME_INCLUDE_FAVORITE_METADATA = + "include_favorite_metadata"; + + @SerializedName(SERIALIZED_NAME_INCLUDE_FAVORITE_METADATA) + @javax.annotation.Nullable + private Boolean includeFavoriteMetadata = false; + + public static final String SERIALIZED_NAME_INCLUDE_VARIABLE_VALUES = "include_variable_values"; + + @SerializedName(SERIALIZED_NAME_INCLUDE_VARIABLE_VALUES) + @javax.annotation.Nullable + private Boolean includeVariableValues = false; + + public SearchUsersRequest() {} + + public SearchUsersRequest userIdentifier(@javax.annotation.Nullable String userIdentifier) { + this.userIdentifier = userIdentifier; + return this; + } + + /** + * GUID / name of the user to search + * + * @return userIdentifier + */ + @javax.annotation.Nullable + public String getUserIdentifier() { + return userIdentifier; + } + + public void setUserIdentifier(@javax.annotation.Nullable String userIdentifier) { + this.userIdentifier = userIdentifier; + } + + public SearchUsersRequest displayName(@javax.annotation.Nullable String displayName) { + this.displayName = displayName; + return this; + } + + /** + * A unique display name string for the user account, usually their first and last name + * + * @return displayName + */ + @javax.annotation.Nullable + public String getDisplayName() { + return displayName; + } + + public void setDisplayName(@javax.annotation.Nullable String displayName) { + this.displayName = displayName; + } + + public SearchUsersRequest namePattern(@javax.annotation.Nullable String namePattern) { + this.namePattern = namePattern; + return this; + } + + /** + * A pattern to match case-insensitive name of the User object. + * + * @return namePattern + */ + @javax.annotation.Nullable + public String getNamePattern() { + return namePattern; + } + + public void setNamePattern(@javax.annotation.Nullable String namePattern) { + this.namePattern = namePattern; + } + + public SearchUsersRequest visibility(@javax.annotation.Nullable VisibilityEnum visibility) { + this.visibility = visibility; + return this; + } + + /** + * Visibility of the user + * + * @return visibility + */ + @javax.annotation.Nullable + public VisibilityEnum getVisibility() { + return visibility; + } + + public void setVisibility(@javax.annotation.Nullable VisibilityEnum visibility) { + this.visibility = visibility; + } + + public SearchUsersRequest email(@javax.annotation.Nullable String email) { + this.email = email; + return this; + } + + /** + * Email of the user account + * + * @return email + */ + @javax.annotation.Nullable + public String getEmail() { + return email; + } + + public void setEmail(@javax.annotation.Nullable String email) { + this.email = email; + } + + public SearchUsersRequest groupIdentifiers( + @javax.annotation.Nullable List groupIdentifiers) { + this.groupIdentifiers = groupIdentifiers; + return this; + } + + public SearchUsersRequest addGroupIdentifiersItem(String groupIdentifiersItem) { + if (this.groupIdentifiers == null) { + this.groupIdentifiers = new ArrayList<>(); + } + this.groupIdentifiers.add(groupIdentifiersItem); + return this; + } + + /** + * GUID or name of the group to which the user belongs + * + * @return groupIdentifiers + */ + @javax.annotation.Nullable + public List getGroupIdentifiers() { + return groupIdentifiers; + } + + public void setGroupIdentifiers(@javax.annotation.Nullable List groupIdentifiers) { + this.groupIdentifiers = groupIdentifiers; + } + + public SearchUsersRequest privileges( + @javax.annotation.Nullable List privileges) { + this.privileges = privileges; + return this; + } + + public SearchUsersRequest addPrivilegesItem(PrivilegesEnum privilegesItem) { + if (this.privileges == null) { + this.privileges = new ArrayList<>(); + } + this.privileges.add(privilegesItem); + return this; + } + + /** + * Privileges assigned to the user + * + * @return privileges + */ + @javax.annotation.Nullable + public List getPrivileges() { + return privileges; + } + + public void setPrivileges(@javax.annotation.Nullable List privileges) { + this.privileges = privileges; + } + + public SearchUsersRequest accountType(@javax.annotation.Nullable AccountTypeEnum accountType) { + this.accountType = accountType; + return this; + } + + /** + * Type of the account + * + * @return accountType + */ + @javax.annotation.Nullable + public AccountTypeEnum getAccountType() { + return accountType; + } + + public void setAccountType(@javax.annotation.Nullable AccountTypeEnum accountType) { + this.accountType = accountType; + } + + public SearchUsersRequest accountStatus( + @javax.annotation.Nullable AccountStatusEnum accountStatus) { + this.accountStatus = accountStatus; + return this; + } + + /** + * Current status of the user account. + * + * @return accountStatus + */ + @javax.annotation.Nullable + public AccountStatusEnum getAccountStatus() { + return accountStatus; + } + + public void setAccountStatus(@javax.annotation.Nullable AccountStatusEnum accountStatus) { + this.accountStatus = accountStatus; + } + + public SearchUsersRequest notifyOnShare(@javax.annotation.Nullable Boolean notifyOnShare) { + this.notifyOnShare = notifyOnShare; + return this; + } + + /** + * User preference for receiving email notifications when another ThoughtSpot user shares a + * metadata object such as Answer, Liveboard, or Worksheet. + * + * @return notifyOnShare + */ + @javax.annotation.Nullable + public Boolean getNotifyOnShare() { + return notifyOnShare; + } + + public void setNotifyOnShare(@javax.annotation.Nullable Boolean notifyOnShare) { + this.notifyOnShare = notifyOnShare; + } + + public SearchUsersRequest showOnboardingExperience( + @javax.annotation.Nullable Boolean showOnboardingExperience) { + this.showOnboardingExperience = showOnboardingExperience; + return this; + } + + /** + * The user preference for revisiting the onboarding experience + * + * @return showOnboardingExperience + */ + @javax.annotation.Nullable + public Boolean getShowOnboardingExperience() { + return showOnboardingExperience; + } + + public void setShowOnboardingExperience( + @javax.annotation.Nullable Boolean showOnboardingExperience) { + this.showOnboardingExperience = showOnboardingExperience; + } + + public SearchUsersRequest onboardingExperienceCompleted( + @javax.annotation.Nullable Boolean onboardingExperienceCompleted) { + this.onboardingExperienceCompleted = onboardingExperienceCompleted; + return this; + } + + /** + * Indicates if the user has completed the onboarding walkthrough + * + * @return onboardingExperienceCompleted + */ + @javax.annotation.Nullable + public Boolean getOnboardingExperienceCompleted() { + return onboardingExperienceCompleted; + } + + public void setOnboardingExperienceCompleted( + @javax.annotation.Nullable Boolean onboardingExperienceCompleted) { + this.onboardingExperienceCompleted = onboardingExperienceCompleted; + } + + public SearchUsersRequest orgIdentifiers( + @javax.annotation.Nullable List orgIdentifiers) { + this.orgIdentifiers = orgIdentifiers; + return this; + } + + public SearchUsersRequest addOrgIdentifiersItem(String orgIdentifiersItem) { + if (this.orgIdentifiers == null) { + this.orgIdentifiers = new ArrayList<>(); + } + this.orgIdentifiers.add(orgIdentifiersItem); + return this; + } + + /** + * IDs or names of the Orgs to which the user belongs + * + * @return orgIdentifiers + */ + @javax.annotation.Nullable + public List getOrgIdentifiers() { + return orgIdentifiers; + } + + public void setOrgIdentifiers(@javax.annotation.Nullable List orgIdentifiers) { + this.orgIdentifiers = orgIdentifiers; + } + + public SearchUsersRequest homeLiveboardIdentifier( + @javax.annotation.Nullable String homeLiveboardIdentifier) { + this.homeLiveboardIdentifier = homeLiveboardIdentifier; + return this; + } + + /** + * Unique ID or name of the user's home Liveboard. + * + * @return homeLiveboardIdentifier + */ + @javax.annotation.Nullable + public String getHomeLiveboardIdentifier() { + return homeLiveboardIdentifier; + } + + public void setHomeLiveboardIdentifier( + @javax.annotation.Nullable String homeLiveboardIdentifier) { + this.homeLiveboardIdentifier = homeLiveboardIdentifier; + } + + public SearchUsersRequest favoriteMetadata( + @javax.annotation.Nullable List favoriteMetadata) { + this.favoriteMetadata = favoriteMetadata; + return this; + } + + public SearchUsersRequest addFavoriteMetadataItem(FavoriteMetadataInput favoriteMetadataItem) { + if (this.favoriteMetadata == null) { + this.favoriteMetadata = new ArrayList<>(); + } + this.favoriteMetadata.add(favoriteMetadataItem); + return this; + } + + /** + * Metadata objects which are assigned as favorites of the user. + * + * @return favoriteMetadata + */ + @javax.annotation.Nullable + public List getFavoriteMetadata() { + return favoriteMetadata; + } + + public void setFavoriteMetadata( + @javax.annotation.Nullable List favoriteMetadata) { + this.favoriteMetadata = favoriteMetadata; + } + + public SearchUsersRequest recordOffset(@javax.annotation.Nullable Integer recordOffset) { + this.recordOffset = recordOffset; + return this; + } + + /** + * The starting record number from where the records should be included. + * + * @return recordOffset + */ + @javax.annotation.Nullable + public Integer getRecordOffset() { + return recordOffset; + } + + public void setRecordOffset(@javax.annotation.Nullable Integer recordOffset) { + this.recordOffset = recordOffset; + } + + public SearchUsersRequest recordSize(@javax.annotation.Nullable Integer recordSize) { + this.recordSize = recordSize; + return this; + } + + /** + * The number of records that should be included. + * + * @return recordSize + */ + @javax.annotation.Nullable + public Integer getRecordSize() { + return recordSize; + } + + public void setRecordSize(@javax.annotation.Nullable Integer recordSize) { + this.recordSize = recordSize; + } + + public SearchUsersRequest sortOptions(@javax.annotation.Nullable SortOptions sortOptions) { + this.sortOptions = sortOptions; + return this; + } + + /** + * Sort options. + * + * @return sortOptions + */ + @javax.annotation.Nullable + public SortOptions getSortOptions() { + return sortOptions; + } + + public void setSortOptions(@javax.annotation.Nullable SortOptions sortOptions) { + this.sortOptions = sortOptions; + } + + public SearchUsersRequest roleIdentifiers( + @javax.annotation.Nullable List roleIdentifiers) { + this.roleIdentifiers = roleIdentifiers; + return this; + } + + public SearchUsersRequest addRoleIdentifiersItem(String roleIdentifiersItem) { + if (this.roleIdentifiers == null) { + this.roleIdentifiers = new ArrayList<>(); + } + this.roleIdentifiers.add(roleIdentifiersItem); + return this; + } + + /** + * Filters by the role assigned to the user. + * + * @return roleIdentifiers + */ + @javax.annotation.Nullable + public List getRoleIdentifiers() { + return roleIdentifiers; + } + + public void setRoleIdentifiers(@javax.annotation.Nullable List roleIdentifiers) { + this.roleIdentifiers = roleIdentifiers; + } + + public SearchUsersRequest includeFavoriteMetadata( + @javax.annotation.Nullable Boolean includeFavoriteMetadata) { + this.includeFavoriteMetadata = includeFavoriteMetadata; + return this; + } + + /** + * Indicates if the user's favorite objects should be displayed. + * + * @return includeFavoriteMetadata + */ + @javax.annotation.Nullable + public Boolean getIncludeFavoriteMetadata() { + return includeFavoriteMetadata; + } + + public void setIncludeFavoriteMetadata( + @javax.annotation.Nullable Boolean includeFavoriteMetadata) { + this.includeFavoriteMetadata = includeFavoriteMetadata; + } + + public SearchUsersRequest includeVariableValues( + @javax.annotation.Nullable Boolean includeVariableValues) { + this.includeVariableValues = includeVariableValues; + return this; + } + + /** + * Indicates if the user's formula variable values should be included in the response. + * + * @return includeVariableValues + */ + @javax.annotation.Nullable + public Boolean getIncludeVariableValues() { + return includeVariableValues; + } + + public void setIncludeVariableValues(@javax.annotation.Nullable Boolean includeVariableValues) { + this.includeVariableValues = includeVariableValues; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key name of the property + * @param value value of the property + * @return the SearchUsersRequest instance itself + */ + public SearchUsersRequest putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return a map of objects + */ + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key name of the property + * @return an object + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + SearchUsersRequest searchUsersRequest = (SearchUsersRequest) o; + return Objects.equals(this.userIdentifier, searchUsersRequest.userIdentifier) + && Objects.equals(this.displayName, searchUsersRequest.displayName) + && Objects.equals(this.namePattern, searchUsersRequest.namePattern) + && Objects.equals(this.visibility, searchUsersRequest.visibility) + && Objects.equals(this.email, searchUsersRequest.email) + && Objects.equals(this.groupIdentifiers, searchUsersRequest.groupIdentifiers) + && Objects.equals(this.privileges, searchUsersRequest.privileges) + && Objects.equals(this.accountType, searchUsersRequest.accountType) + && Objects.equals(this.accountStatus, searchUsersRequest.accountStatus) + && Objects.equals(this.notifyOnShare, searchUsersRequest.notifyOnShare) + && Objects.equals( + this.showOnboardingExperience, searchUsersRequest.showOnboardingExperience) + && Objects.equals( + this.onboardingExperienceCompleted, + searchUsersRequest.onboardingExperienceCompleted) + && Objects.equals(this.orgIdentifiers, searchUsersRequest.orgIdentifiers) + && Objects.equals( + this.homeLiveboardIdentifier, searchUsersRequest.homeLiveboardIdentifier) + && Objects.equals(this.favoriteMetadata, searchUsersRequest.favoriteMetadata) + && Objects.equals(this.recordOffset, searchUsersRequest.recordOffset) + && Objects.equals(this.recordSize, searchUsersRequest.recordSize) + && Objects.equals(this.sortOptions, searchUsersRequest.sortOptions) + && Objects.equals(this.roleIdentifiers, searchUsersRequest.roleIdentifiers) + && Objects.equals( + this.includeFavoriteMetadata, searchUsersRequest.includeFavoriteMetadata) + && Objects.equals( + this.includeVariableValues, searchUsersRequest.includeVariableValues) + && Objects.equals( + this.additionalProperties, searchUsersRequest.additionalProperties); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b + || (a != null + && b != null + && a.isPresent() + && b.isPresent() + && Objects.deepEquals(a.get(), b.get())); + } + + @Override + public int hashCode() { + return Objects.hash( + userIdentifier, + displayName, + namePattern, + visibility, + email, + groupIdentifiers, + privileges, + accountType, + accountStatus, + notifyOnShare, + showOnboardingExperience, + onboardingExperienceCompleted, + orgIdentifiers, + homeLiveboardIdentifier, + favoriteMetadata, + recordOffset, + recordSize, + sortOptions, + roleIdentifiers, + includeFavoriteMetadata, + includeVariableValues, + additionalProperties); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; + } + return a.isPresent() ? Arrays.deepHashCode(new Object[] {a.get()}) : 31; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class SearchUsersRequest {\n"); + sb.append(" userIdentifier: ").append(toIndentedString(userIdentifier)).append("\n"); + sb.append(" displayName: ").append(toIndentedString(displayName)).append("\n"); + sb.append(" namePattern: ").append(toIndentedString(namePattern)).append("\n"); + sb.append(" visibility: ").append(toIndentedString(visibility)).append("\n"); + sb.append(" email: ").append(toIndentedString(email)).append("\n"); + sb.append(" groupIdentifiers: ").append(toIndentedString(groupIdentifiers)).append("\n"); + sb.append(" privileges: ").append(toIndentedString(privileges)).append("\n"); + sb.append(" accountType: ").append(toIndentedString(accountType)).append("\n"); + sb.append(" accountStatus: ").append(toIndentedString(accountStatus)).append("\n"); + sb.append(" notifyOnShare: ").append(toIndentedString(notifyOnShare)).append("\n"); + sb.append(" showOnboardingExperience: ") + .append(toIndentedString(showOnboardingExperience)) + .append("\n"); + sb.append(" onboardingExperienceCompleted: ") + .append(toIndentedString(onboardingExperienceCompleted)) + .append("\n"); + sb.append(" orgIdentifiers: ").append(toIndentedString(orgIdentifiers)).append("\n"); + sb.append(" homeLiveboardIdentifier: ") + .append(toIndentedString(homeLiveboardIdentifier)) + .append("\n"); + sb.append(" favoriteMetadata: ").append(toIndentedString(favoriteMetadata)).append("\n"); + sb.append(" recordOffset: ").append(toIndentedString(recordOffset)).append("\n"); + sb.append(" recordSize: ").append(toIndentedString(recordSize)).append("\n"); + sb.append(" sortOptions: ").append(toIndentedString(sortOptions)).append("\n"); + sb.append(" roleIdentifiers: ").append(toIndentedString(roleIdentifiers)).append("\n"); + sb.append(" includeFavoriteMetadata: ") + .append(toIndentedString(includeFavoriteMetadata)) + .append("\n"); + sb.append(" includeVariableValues: ") + .append(toIndentedString(includeVariableValues)) + .append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first + * line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("user_identifier"); + openapiFields.add("display_name"); + openapiFields.add("name_pattern"); + openapiFields.add("visibility"); + openapiFields.add("email"); + openapiFields.add("group_identifiers"); + openapiFields.add("privileges"); + openapiFields.add("account_type"); + openapiFields.add("account_status"); + openapiFields.add("notify_on_share"); + openapiFields.add("show_onboarding_experience"); + openapiFields.add("onboarding_experience_completed"); + openapiFields.add("org_identifiers"); + openapiFields.add("home_liveboard_identifier"); + openapiFields.add("favorite_metadata"); + openapiFields.add("record_offset"); + openapiFields.add("record_size"); + openapiFields.add("sort_options"); + openapiFields.add("role_identifiers"); + openapiFields.add("include_favorite_metadata"); + openapiFields.add("include_variable_values"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to SearchUsersRequest + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!SearchUsersRequest.openapiRequiredFields + .isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException( + String.format( + "The required field(s) %s in SearchUsersRequest is not found in" + + " the empty JSON string", + SearchUsersRequest.openapiRequiredFields.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if ((jsonObj.get("user_identifier") != null && !jsonObj.get("user_identifier").isJsonNull()) + && !jsonObj.get("user_identifier").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `user_identifier` to be a primitive type in the" + + " JSON string but got `%s`", + jsonObj.get("user_identifier").toString())); + } + if ((jsonObj.get("display_name") != null && !jsonObj.get("display_name").isJsonNull()) + && !jsonObj.get("display_name").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `display_name` to be a primitive type in the JSON" + + " string but got `%s`", + jsonObj.get("display_name").toString())); + } + if ((jsonObj.get("name_pattern") != null && !jsonObj.get("name_pattern").isJsonNull()) + && !jsonObj.get("name_pattern").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `name_pattern` to be a primitive type in the JSON" + + " string but got `%s`", + jsonObj.get("name_pattern").toString())); + } + if ((jsonObj.get("visibility") != null && !jsonObj.get("visibility").isJsonNull()) + && !jsonObj.get("visibility").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `visibility` to be a primitive type in the JSON" + + " string but got `%s`", + jsonObj.get("visibility").toString())); + } + // validate the optional field `visibility` + if (jsonObj.get("visibility") != null && !jsonObj.get("visibility").isJsonNull()) { + VisibilityEnum.validateJsonElement(jsonObj.get("visibility")); + } + if ((jsonObj.get("email") != null && !jsonObj.get("email").isJsonNull()) + && !jsonObj.get("email").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `email` to be a primitive type in the JSON string" + + " but got `%s`", + jsonObj.get("email").toString())); + } + // ensure the optional json data is an array if present + if (jsonObj.get("group_identifiers") != null + && !jsonObj.get("group_identifiers").isJsonNull() + && !jsonObj.get("group_identifiers").isJsonArray()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `group_identifiers` to be an array in the JSON" + + " string but got `%s`", + jsonObj.get("group_identifiers").toString())); + } + // ensure the optional json data is an array if present + if (jsonObj.get("privileges") != null + && !jsonObj.get("privileges").isJsonNull() + && !jsonObj.get("privileges").isJsonArray()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `privileges` to be an array in the JSON string but" + + " got `%s`", + jsonObj.get("privileges").toString())); + } + if ((jsonObj.get("account_type") != null && !jsonObj.get("account_type").isJsonNull()) + && !jsonObj.get("account_type").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `account_type` to be a primitive type in the JSON" + + " string but got `%s`", + jsonObj.get("account_type").toString())); + } + // validate the optional field `account_type` + if (jsonObj.get("account_type") != null && !jsonObj.get("account_type").isJsonNull()) { + AccountTypeEnum.validateJsonElement(jsonObj.get("account_type")); + } + if ((jsonObj.get("account_status") != null && !jsonObj.get("account_status").isJsonNull()) + && !jsonObj.get("account_status").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `account_status` to be a primitive type in the" + + " JSON string but got `%s`", + jsonObj.get("account_status").toString())); + } + // validate the optional field `account_status` + if (jsonObj.get("account_status") != null && !jsonObj.get("account_status").isJsonNull()) { + AccountStatusEnum.validateJsonElement(jsonObj.get("account_status")); + } + // ensure the optional json data is an array if present + if (jsonObj.get("org_identifiers") != null + && !jsonObj.get("org_identifiers").isJsonNull() + && !jsonObj.get("org_identifiers").isJsonArray()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `org_identifiers` to be an array in the JSON" + + " string but got `%s`", + jsonObj.get("org_identifiers").toString())); + } + if ((jsonObj.get("home_liveboard_identifier") != null + && !jsonObj.get("home_liveboard_identifier").isJsonNull()) + && !jsonObj.get("home_liveboard_identifier").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `home_liveboard_identifier` to be a primitive type" + + " in the JSON string but got `%s`", + jsonObj.get("home_liveboard_identifier").toString())); + } + if (jsonObj.get("favorite_metadata") != null + && !jsonObj.get("favorite_metadata").isJsonNull()) { + JsonArray jsonArrayfavoriteMetadata = jsonObj.getAsJsonArray("favorite_metadata"); + if (jsonArrayfavoriteMetadata != null) { + // ensure the json data is an array + if (!jsonObj.get("favorite_metadata").isJsonArray()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `favorite_metadata` to be an array in the" + + " JSON string but got `%s`", + jsonObj.get("favorite_metadata").toString())); + } + + // validate the optional field `favorite_metadata` (array) + for (int i = 0; i < jsonArrayfavoriteMetadata.size(); i++) { + FavoriteMetadataInput.validateJsonElement(jsonArrayfavoriteMetadata.get(i)); + } + ; + } + } + // validate the optional field `sort_options` + if (jsonObj.get("sort_options") != null && !jsonObj.get("sort_options").isJsonNull()) { + SortOptions.validateJsonElement(jsonObj.get("sort_options")); + } + // ensure the optional json data is an array if present + if (jsonObj.get("role_identifiers") != null + && !jsonObj.get("role_identifiers").isJsonNull() + && !jsonObj.get("role_identifiers").isJsonArray()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `role_identifiers` to be an array in the JSON" + + " string but got `%s`", + jsonObj.get("role_identifiers").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!SearchUsersRequest.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'SearchUsersRequest' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter = + gson.getDelegateAdapter(this, TypeToken.get(SearchUsersRequest.class)); + + return (TypeAdapter) + new TypeAdapter() { + @Override + public void write(JsonWriter out, SearchUsersRequest value) + throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + obj.remove("additionalProperties"); + // serialize additional properties + if (value.getAdditionalProperties() != null) { + for (Map.Entry entry : + value.getAdditionalProperties().entrySet()) { + if (entry.getValue() instanceof String) + obj.addProperty(entry.getKey(), (String) entry.getValue()); + else if (entry.getValue() instanceof Number) + obj.addProperty(entry.getKey(), (Number) entry.getValue()); + else if (entry.getValue() instanceof Boolean) + obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); + else if (entry.getValue() instanceof Character) + obj.addProperty( + entry.getKey(), (Character) entry.getValue()); + else { + JsonElement jsonElement = gson.toJsonTree(entry.getValue()); + if (jsonElement.isJsonArray()) { + obj.add(entry.getKey(), jsonElement.getAsJsonArray()); + } else { + obj.add(entry.getKey(), jsonElement.getAsJsonObject()); + } + } + } + } + elementAdapter.write(out, obj); + } + + @Override + public SearchUsersRequest read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // store additional fields in the deserialized instance + SearchUsersRequest instance = thisAdapter.fromJsonTree(jsonObj); + for (Map.Entry entry : jsonObj.entrySet()) { + if (!openapiFields.contains(entry.getKey())) { + if (entry.getValue().isJsonPrimitive()) { // primitive type + if (entry.getValue().getAsJsonPrimitive().isString()) + instance.putAdditionalProperty( + entry.getKey(), entry.getValue().getAsString()); + else if (entry.getValue().getAsJsonPrimitive().isNumber()) + instance.putAdditionalProperty( + entry.getKey(), entry.getValue().getAsNumber()); + else if (entry.getValue().getAsJsonPrimitive().isBoolean()) + instance.putAdditionalProperty( + entry.getKey(), + entry.getValue().getAsBoolean()); + else + throw new IllegalArgumentException( + String.format( + "The field `%s` has unknown primitive" + + " type. Value: %s", + entry.getKey(), + entry.getValue().toString())); + } else if (entry.getValue().isJsonArray()) { + instance.putAdditionalProperty( + entry.getKey(), + gson.fromJson(entry.getValue(), List.class)); + } else { // JSON object + instance.putAdditionalProperty( + entry.getKey(), + gson.fromJson(entry.getValue(), HashMap.class)); + } + } + } + return instance; + } + }.nullSafe(); + } + } + + /** + * Create an instance of SearchUsersRequest given an JSON string + * + * @param jsonString JSON string + * @return An instance of SearchUsersRequest + * @throws IOException if the JSON string is invalid with respect to SearchUsersRequest + */ + public static SearchUsersRequest fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, SearchUsersRequest.class); + } + + /** + * Convert an instance of SearchUsersRequest to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} diff --git a/sdks/java/src/main/java/com/thoughtspot/client/model/SearchVariablesRequest.java b/sdks/java/src/main/java/com/thoughtspot/client/model/SearchVariablesRequest.java new file mode 100644 index 000000000..ceedd4880 --- /dev/null +++ b/sdks/java/src/main/java/com/thoughtspot/client/model/SearchVariablesRequest.java @@ -0,0 +1,529 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client.model; + +import com.google.gson.Gson; +import com.google.gson.JsonArray; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.TypeAdapter; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.reflect.TypeToken; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import com.thoughtspot.client.JSON; +import java.io.IOException; +import java.io.Serializable; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Objects; + +/** SearchVariablesRequest */ +@javax.annotation.Generated( + value = "org.openapitools.codegen.languages.JavaClientCodegen", + comments = "Generator version: 7.12.0") +public class SearchVariablesRequest implements Serializable { + private static final long serialVersionUID = 1L; + + public static final String SERIALIZED_NAME_VARIABLE_DETAILS = "variable_details"; + + @SerializedName(SERIALIZED_NAME_VARIABLE_DETAILS) + @javax.annotation.Nullable + private List variableDetails; + + public static final String SERIALIZED_NAME_VALUE_SCOPE = "value_scope"; + + @SerializedName(SERIALIZED_NAME_VALUE_SCOPE) + @javax.annotation.Nullable + private List valueScope; + + public static final String SERIALIZED_NAME_RECORD_OFFSET = "record_offset"; + + @SerializedName(SERIALIZED_NAME_RECORD_OFFSET) + @javax.annotation.Nullable + private Integer recordOffset = 0; + + public static final String SERIALIZED_NAME_RECORD_SIZE = "record_size"; + + @SerializedName(SERIALIZED_NAME_RECORD_SIZE) + @javax.annotation.Nullable + private Integer recordSize = 10; + + /** Format in which we want the output */ + @JsonAdapter(ResponseContentEnum.Adapter.class) + public enum ResponseContentEnum { + METADATA("METADATA"), + + METADATA_AND_VALUES("METADATA_AND_VALUES"); + + private String value; + + ResponseContentEnum(String value) { + this.value = value; + } + + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + public static ResponseContentEnum fromValue(String value) { + for (ResponseContentEnum b : ResponseContentEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + + public static class Adapter extends TypeAdapter { + @Override + public void write(final JsonWriter jsonWriter, final ResponseContentEnum enumeration) + throws IOException { + jsonWriter.value(enumeration.getValue()); + } + + @Override + public ResponseContentEnum read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + return ResponseContentEnum.fromValue(value); + } + } + + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + String value = jsonElement.getAsString(); + ResponseContentEnum.fromValue(value); + } + } + + public static final String SERIALIZED_NAME_RESPONSE_CONTENT = "response_content"; + + @SerializedName(SERIALIZED_NAME_RESPONSE_CONTENT) + @javax.annotation.Nullable + private ResponseContentEnum responseContent = ResponseContentEnum.METADATA; + + public SearchVariablesRequest() {} + + public SearchVariablesRequest variableDetails( + @javax.annotation.Nullable List variableDetails) { + this.variableDetails = variableDetails; + return this; + } + + public SearchVariablesRequest addVariableDetailsItem(VariableDetailInput variableDetailsItem) { + if (this.variableDetails == null) { + this.variableDetails = new ArrayList<>(); + } + this.variableDetails.add(variableDetailsItem); + return this; + } + + /** + * Variable details + * + * @return variableDetails + */ + @javax.annotation.Nullable + public List getVariableDetails() { + return variableDetails; + } + + public void setVariableDetails( + @javax.annotation.Nullable List variableDetails) { + this.variableDetails = variableDetails; + } + + public SearchVariablesRequest valueScope( + @javax.annotation.Nullable List valueScope) { + this.valueScope = valueScope; + return this; + } + + public SearchVariablesRequest addValueScopeItem(ValueScopeInput valueScopeItem) { + if (this.valueScope == null) { + this.valueScope = new ArrayList<>(); + } + this.valueScope.add(valueScopeItem); + return this; + } + + /** + * Array of scope filters + * + * @return valueScope + */ + @javax.annotation.Nullable + public List getValueScope() { + return valueScope; + } + + public void setValueScope(@javax.annotation.Nullable List valueScope) { + this.valueScope = valueScope; + } + + public SearchVariablesRequest recordOffset(@javax.annotation.Nullable Integer recordOffset) { + this.recordOffset = recordOffset; + return this; + } + + /** + * The starting record number from where the records should be included + * + * @return recordOffset + */ + @javax.annotation.Nullable + public Integer getRecordOffset() { + return recordOffset; + } + + public void setRecordOffset(@javax.annotation.Nullable Integer recordOffset) { + this.recordOffset = recordOffset; + } + + public SearchVariablesRequest recordSize(@javax.annotation.Nullable Integer recordSize) { + this.recordSize = recordSize; + return this; + } + + /** + * The number of records that should be included + * + * @return recordSize + */ + @javax.annotation.Nullable + public Integer getRecordSize() { + return recordSize; + } + + public void setRecordSize(@javax.annotation.Nullable Integer recordSize) { + this.recordSize = recordSize; + } + + public SearchVariablesRequest responseContent( + @javax.annotation.Nullable ResponseContentEnum responseContent) { + this.responseContent = responseContent; + return this; + } + + /** + * Format in which we want the output + * + * @return responseContent + */ + @javax.annotation.Nullable + public ResponseContentEnum getResponseContent() { + return responseContent; + } + + public void setResponseContent(@javax.annotation.Nullable ResponseContentEnum responseContent) { + this.responseContent = responseContent; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key name of the property + * @param value value of the property + * @return the SearchVariablesRequest instance itself + */ + public SearchVariablesRequest putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return a map of objects + */ + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key name of the property + * @return an object + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + SearchVariablesRequest searchVariablesRequest = (SearchVariablesRequest) o; + return Objects.equals(this.variableDetails, searchVariablesRequest.variableDetails) + && Objects.equals(this.valueScope, searchVariablesRequest.valueScope) + && Objects.equals(this.recordOffset, searchVariablesRequest.recordOffset) + && Objects.equals(this.recordSize, searchVariablesRequest.recordSize) + && Objects.equals(this.responseContent, searchVariablesRequest.responseContent) + && Objects.equals( + this.additionalProperties, searchVariablesRequest.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash( + variableDetails, + valueScope, + recordOffset, + recordSize, + responseContent, + additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class SearchVariablesRequest {\n"); + sb.append(" variableDetails: ").append(toIndentedString(variableDetails)).append("\n"); + sb.append(" valueScope: ").append(toIndentedString(valueScope)).append("\n"); + sb.append(" recordOffset: ").append(toIndentedString(recordOffset)).append("\n"); + sb.append(" recordSize: ").append(toIndentedString(recordSize)).append("\n"); + sb.append(" responseContent: ").append(toIndentedString(responseContent)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first + * line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("variable_details"); + openapiFields.add("value_scope"); + openapiFields.add("record_offset"); + openapiFields.add("record_size"); + openapiFields.add("response_content"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to SearchVariablesRequest + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!SearchVariablesRequest.openapiRequiredFields + .isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException( + String.format( + "The required field(s) %s in SearchVariablesRequest is not found" + + " in the empty JSON string", + SearchVariablesRequest.openapiRequiredFields.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if (jsonObj.get("variable_details") != null + && !jsonObj.get("variable_details").isJsonNull()) { + JsonArray jsonArrayvariableDetails = jsonObj.getAsJsonArray("variable_details"); + if (jsonArrayvariableDetails != null) { + // ensure the json data is an array + if (!jsonObj.get("variable_details").isJsonArray()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `variable_details` to be an array in the" + + " JSON string but got `%s`", + jsonObj.get("variable_details").toString())); + } + + // validate the optional field `variable_details` (array) + for (int i = 0; i < jsonArrayvariableDetails.size(); i++) { + VariableDetailInput.validateJsonElement(jsonArrayvariableDetails.get(i)); + } + ; + } + } + if (jsonObj.get("value_scope") != null && !jsonObj.get("value_scope").isJsonNull()) { + JsonArray jsonArrayvalueScope = jsonObj.getAsJsonArray("value_scope"); + if (jsonArrayvalueScope != null) { + // ensure the json data is an array + if (!jsonObj.get("value_scope").isJsonArray()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `value_scope` to be an array in the JSON" + + " string but got `%s`", + jsonObj.get("value_scope").toString())); + } + + // validate the optional field `value_scope` (array) + for (int i = 0; i < jsonArrayvalueScope.size(); i++) { + ValueScopeInput.validateJsonElement(jsonArrayvalueScope.get(i)); + } + ; + } + } + if ((jsonObj.get("response_content") != null + && !jsonObj.get("response_content").isJsonNull()) + && !jsonObj.get("response_content").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `response_content` to be a primitive type in the" + + " JSON string but got `%s`", + jsonObj.get("response_content").toString())); + } + // validate the optional field `response_content` + if (jsonObj.get("response_content") != null + && !jsonObj.get("response_content").isJsonNull()) { + ResponseContentEnum.validateJsonElement(jsonObj.get("response_content")); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!SearchVariablesRequest.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'SearchVariablesRequest' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter = + gson.getDelegateAdapter(this, TypeToken.get(SearchVariablesRequest.class)); + + return (TypeAdapter) + new TypeAdapter() { + @Override + public void write(JsonWriter out, SearchVariablesRequest value) + throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + obj.remove("additionalProperties"); + // serialize additional properties + if (value.getAdditionalProperties() != null) { + for (Map.Entry entry : + value.getAdditionalProperties().entrySet()) { + if (entry.getValue() instanceof String) + obj.addProperty(entry.getKey(), (String) entry.getValue()); + else if (entry.getValue() instanceof Number) + obj.addProperty(entry.getKey(), (Number) entry.getValue()); + else if (entry.getValue() instanceof Boolean) + obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); + else if (entry.getValue() instanceof Character) + obj.addProperty( + entry.getKey(), (Character) entry.getValue()); + else { + JsonElement jsonElement = gson.toJsonTree(entry.getValue()); + if (jsonElement.isJsonArray()) { + obj.add(entry.getKey(), jsonElement.getAsJsonArray()); + } else { + obj.add(entry.getKey(), jsonElement.getAsJsonObject()); + } + } + } + } + elementAdapter.write(out, obj); + } + + @Override + public SearchVariablesRequest read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // store additional fields in the deserialized instance + SearchVariablesRequest instance = thisAdapter.fromJsonTree(jsonObj); + for (Map.Entry entry : jsonObj.entrySet()) { + if (!openapiFields.contains(entry.getKey())) { + if (entry.getValue().isJsonPrimitive()) { // primitive type + if (entry.getValue().getAsJsonPrimitive().isString()) + instance.putAdditionalProperty( + entry.getKey(), entry.getValue().getAsString()); + else if (entry.getValue().getAsJsonPrimitive().isNumber()) + instance.putAdditionalProperty( + entry.getKey(), entry.getValue().getAsNumber()); + else if (entry.getValue().getAsJsonPrimitive().isBoolean()) + instance.putAdditionalProperty( + entry.getKey(), + entry.getValue().getAsBoolean()); + else + throw new IllegalArgumentException( + String.format( + "The field `%s` has unknown primitive" + + " type. Value: %s", + entry.getKey(), + entry.getValue().toString())); + } else if (entry.getValue().isJsonArray()) { + instance.putAdditionalProperty( + entry.getKey(), + gson.fromJson(entry.getValue(), List.class)); + } else { // JSON object + instance.putAdditionalProperty( + entry.getKey(), + gson.fromJson(entry.getValue(), HashMap.class)); + } + } + } + return instance; + } + }.nullSafe(); + } + } + + /** + * Create an instance of SearchVariablesRequest given an JSON string + * + * @param jsonString JSON string + * @return An instance of SearchVariablesRequest + * @throws IOException if the JSON string is invalid with respect to SearchVariablesRequest + */ + public static SearchVariablesRequest fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, SearchVariablesRequest.class); + } + + /** + * Convert an instance of SearchVariablesRequest to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} diff --git a/sdks/java/src/main/java/com/thoughtspot/client/model/SearchWebhookConfigurationsRequest.java b/sdks/java/src/main/java/com/thoughtspot/client/model/SearchWebhookConfigurationsRequest.java new file mode 100644 index 000000000..aec21e75a --- /dev/null +++ b/sdks/java/src/main/java/com/thoughtspot/client/model/SearchWebhookConfigurationsRequest.java @@ -0,0 +1,535 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client.model; + +import com.google.gson.Gson; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.TypeAdapter; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.reflect.TypeToken; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import com.thoughtspot.client.JSON; +import java.io.IOException; +import java.io.Serializable; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Objects; + +/** SearchWebhookConfigurationsRequest */ +@javax.annotation.Generated( + value = "org.openapitools.codegen.languages.JavaClientCodegen", + comments = "Generator version: 7.12.0") +public class SearchWebhookConfigurationsRequest implements Serializable { + private static final long serialVersionUID = 1L; + + public static final String SERIALIZED_NAME_ORG_IDENTIFIER = "org_identifier"; + + @SerializedName(SERIALIZED_NAME_ORG_IDENTIFIER) + @javax.annotation.Nullable + private String orgIdentifier; + + public static final String SERIALIZED_NAME_WEBHOOK_IDENTIFIER = "webhook_identifier"; + + @SerializedName(SERIALIZED_NAME_WEBHOOK_IDENTIFIER) + @javax.annotation.Nullable + private String webhookIdentifier; + + /** Type of webhook event to filter by. */ + @JsonAdapter(EventTypeEnum.Adapter.class) + public enum EventTypeEnum { + LIVEBOARD_SCHEDULE("LIVEBOARD_SCHEDULE"); + + private String value; + + EventTypeEnum(String value) { + this.value = value; + } + + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + public static EventTypeEnum fromValue(String value) { + for (EventTypeEnum b : EventTypeEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + + public static class Adapter extends TypeAdapter { + @Override + public void write(final JsonWriter jsonWriter, final EventTypeEnum enumeration) + throws IOException { + jsonWriter.value(enumeration.getValue()); + } + + @Override + public EventTypeEnum read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + return EventTypeEnum.fromValue(value); + } + } + + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + String value = jsonElement.getAsString(); + EventTypeEnum.fromValue(value); + } + } + + public static final String SERIALIZED_NAME_EVENT_TYPE = "event_type"; + + @SerializedName(SERIALIZED_NAME_EVENT_TYPE) + @javax.annotation.Nullable + private EventTypeEnum eventType; + + public static final String SERIALIZED_NAME_RECORD_OFFSET = "record_offset"; + + @SerializedName(SERIALIZED_NAME_RECORD_OFFSET) + @javax.annotation.Nullable + private Integer recordOffset = 0; + + public static final String SERIALIZED_NAME_RECORD_SIZE = "record_size"; + + @SerializedName(SERIALIZED_NAME_RECORD_SIZE) + @javax.annotation.Nullable + private Integer recordSize = 50; + + public static final String SERIALIZED_NAME_SORT_OPTIONS = "sort_options"; + + @SerializedName(SERIALIZED_NAME_SORT_OPTIONS) + @javax.annotation.Nullable + private WebhookSortOptionsInput sortOptions; + + public SearchWebhookConfigurationsRequest() {} + + public SearchWebhookConfigurationsRequest orgIdentifier( + @javax.annotation.Nullable String orgIdentifier) { + this.orgIdentifier = orgIdentifier; + return this; + } + + /** + * Unique ID or name of the org. + * + * @return orgIdentifier + */ + @javax.annotation.Nullable + public String getOrgIdentifier() { + return orgIdentifier; + } + + public void setOrgIdentifier(@javax.annotation.Nullable String orgIdentifier) { + this.orgIdentifier = orgIdentifier; + } + + public SearchWebhookConfigurationsRequest webhookIdentifier( + @javax.annotation.Nullable String webhookIdentifier) { + this.webhookIdentifier = webhookIdentifier; + return this; + } + + /** + * Unique ID or name of the webhook. + * + * @return webhookIdentifier + */ + @javax.annotation.Nullable + public String getWebhookIdentifier() { + return webhookIdentifier; + } + + public void setWebhookIdentifier(@javax.annotation.Nullable String webhookIdentifier) { + this.webhookIdentifier = webhookIdentifier; + } + + public SearchWebhookConfigurationsRequest eventType( + @javax.annotation.Nullable EventTypeEnum eventType) { + this.eventType = eventType; + return this; + } + + /** + * Type of webhook event to filter by. + * + * @return eventType + */ + @javax.annotation.Nullable + public EventTypeEnum getEventType() { + return eventType; + } + + public void setEventType(@javax.annotation.Nullable EventTypeEnum eventType) { + this.eventType = eventType; + } + + public SearchWebhookConfigurationsRequest recordOffset( + @javax.annotation.Nullable Integer recordOffset) { + this.recordOffset = recordOffset; + return this; + } + + /** + * The offset point, starting from where the webhooks should be included in the response. + * + * @return recordOffset + */ + @javax.annotation.Nullable + public Integer getRecordOffset() { + return recordOffset; + } + + public void setRecordOffset(@javax.annotation.Nullable Integer recordOffset) { + this.recordOffset = recordOffset; + } + + public SearchWebhookConfigurationsRequest recordSize( + @javax.annotation.Nullable Integer recordSize) { + this.recordSize = recordSize; + return this; + } + + /** + * The number of webhooks that should be included in the response starting from offset position. + * + * @return recordSize + */ + @javax.annotation.Nullable + public Integer getRecordSize() { + return recordSize; + } + + public void setRecordSize(@javax.annotation.Nullable Integer recordSize) { + this.recordSize = recordSize; + } + + public SearchWebhookConfigurationsRequest sortOptions( + @javax.annotation.Nullable WebhookSortOptionsInput sortOptions) { + this.sortOptions = sortOptions; + return this; + } + + /** + * Sort option includes sort field and sort order. + * + * @return sortOptions + */ + @javax.annotation.Nullable + public WebhookSortOptionsInput getSortOptions() { + return sortOptions; + } + + public void setSortOptions(@javax.annotation.Nullable WebhookSortOptionsInput sortOptions) { + this.sortOptions = sortOptions; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key name of the property + * @param value value of the property + * @return the SearchWebhookConfigurationsRequest instance itself + */ + public SearchWebhookConfigurationsRequest putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return a map of objects + */ + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key name of the property + * @return an object + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + SearchWebhookConfigurationsRequest searchWebhookConfigurationsRequest = + (SearchWebhookConfigurationsRequest) o; + return Objects.equals(this.orgIdentifier, searchWebhookConfigurationsRequest.orgIdentifier) + && Objects.equals( + this.webhookIdentifier, + searchWebhookConfigurationsRequest.webhookIdentifier) + && Objects.equals(this.eventType, searchWebhookConfigurationsRequest.eventType) + && Objects.equals( + this.recordOffset, searchWebhookConfigurationsRequest.recordOffset) + && Objects.equals(this.recordSize, searchWebhookConfigurationsRequest.recordSize) + && Objects.equals(this.sortOptions, searchWebhookConfigurationsRequest.sortOptions) + && Objects.equals( + this.additionalProperties, + searchWebhookConfigurationsRequest.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash( + orgIdentifier, + webhookIdentifier, + eventType, + recordOffset, + recordSize, + sortOptions, + additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class SearchWebhookConfigurationsRequest {\n"); + sb.append(" orgIdentifier: ").append(toIndentedString(orgIdentifier)).append("\n"); + sb.append(" webhookIdentifier: ") + .append(toIndentedString(webhookIdentifier)) + .append("\n"); + sb.append(" eventType: ").append(toIndentedString(eventType)).append("\n"); + sb.append(" recordOffset: ").append(toIndentedString(recordOffset)).append("\n"); + sb.append(" recordSize: ").append(toIndentedString(recordSize)).append("\n"); + sb.append(" sortOptions: ").append(toIndentedString(sortOptions)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first + * line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("org_identifier"); + openapiFields.add("webhook_identifier"); + openapiFields.add("event_type"); + openapiFields.add("record_offset"); + openapiFields.add("record_size"); + openapiFields.add("sort_options"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to + * SearchWebhookConfigurationsRequest + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!SearchWebhookConfigurationsRequest.openapiRequiredFields + .isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException( + String.format( + "The required field(s) %s in SearchWebhookConfigurationsRequest is" + + " not found in the empty JSON string", + SearchWebhookConfigurationsRequest.openapiRequiredFields + .toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if ((jsonObj.get("org_identifier") != null && !jsonObj.get("org_identifier").isJsonNull()) + && !jsonObj.get("org_identifier").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `org_identifier` to be a primitive type in the" + + " JSON string but got `%s`", + jsonObj.get("org_identifier").toString())); + } + if ((jsonObj.get("webhook_identifier") != null + && !jsonObj.get("webhook_identifier").isJsonNull()) + && !jsonObj.get("webhook_identifier").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `webhook_identifier` to be a primitive type in the" + + " JSON string but got `%s`", + jsonObj.get("webhook_identifier").toString())); + } + if ((jsonObj.get("event_type") != null && !jsonObj.get("event_type").isJsonNull()) + && !jsonObj.get("event_type").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `event_type` to be a primitive type in the JSON" + + " string but got `%s`", + jsonObj.get("event_type").toString())); + } + // validate the optional field `event_type` + if (jsonObj.get("event_type") != null && !jsonObj.get("event_type").isJsonNull()) { + EventTypeEnum.validateJsonElement(jsonObj.get("event_type")); + } + // validate the optional field `sort_options` + if (jsonObj.get("sort_options") != null && !jsonObj.get("sort_options").isJsonNull()) { + WebhookSortOptionsInput.validateJsonElement(jsonObj.get("sort_options")); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!SearchWebhookConfigurationsRequest.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'SearchWebhookConfigurationsRequest' and + // its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter = + gson.getDelegateAdapter( + this, TypeToken.get(SearchWebhookConfigurationsRequest.class)); + + return (TypeAdapter) + new TypeAdapter() { + @Override + public void write(JsonWriter out, SearchWebhookConfigurationsRequest value) + throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + obj.remove("additionalProperties"); + // serialize additional properties + if (value.getAdditionalProperties() != null) { + for (Map.Entry entry : + value.getAdditionalProperties().entrySet()) { + if (entry.getValue() instanceof String) + obj.addProperty(entry.getKey(), (String) entry.getValue()); + else if (entry.getValue() instanceof Number) + obj.addProperty(entry.getKey(), (Number) entry.getValue()); + else if (entry.getValue() instanceof Boolean) + obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); + else if (entry.getValue() instanceof Character) + obj.addProperty( + entry.getKey(), (Character) entry.getValue()); + else { + JsonElement jsonElement = gson.toJsonTree(entry.getValue()); + if (jsonElement.isJsonArray()) { + obj.add(entry.getKey(), jsonElement.getAsJsonArray()); + } else { + obj.add(entry.getKey(), jsonElement.getAsJsonObject()); + } + } + } + } + elementAdapter.write(out, obj); + } + + @Override + public SearchWebhookConfigurationsRequest read(JsonReader in) + throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // store additional fields in the deserialized instance + SearchWebhookConfigurationsRequest instance = + thisAdapter.fromJsonTree(jsonObj); + for (Map.Entry entry : jsonObj.entrySet()) { + if (!openapiFields.contains(entry.getKey())) { + if (entry.getValue().isJsonPrimitive()) { // primitive type + if (entry.getValue().getAsJsonPrimitive().isString()) + instance.putAdditionalProperty( + entry.getKey(), entry.getValue().getAsString()); + else if (entry.getValue().getAsJsonPrimitive().isNumber()) + instance.putAdditionalProperty( + entry.getKey(), entry.getValue().getAsNumber()); + else if (entry.getValue().getAsJsonPrimitive().isBoolean()) + instance.putAdditionalProperty( + entry.getKey(), + entry.getValue().getAsBoolean()); + else + throw new IllegalArgumentException( + String.format( + "The field `%s` has unknown primitive" + + " type. Value: %s", + entry.getKey(), + entry.getValue().toString())); + } else if (entry.getValue().isJsonArray()) { + instance.putAdditionalProperty( + entry.getKey(), + gson.fromJson(entry.getValue(), List.class)); + } else { // JSON object + instance.putAdditionalProperty( + entry.getKey(), + gson.fromJson(entry.getValue(), HashMap.class)); + } + } + } + return instance; + } + }.nullSafe(); + } + } + + /** + * Create an instance of SearchWebhookConfigurationsRequest given an JSON string + * + * @param jsonString JSON string + * @return An instance of SearchWebhookConfigurationsRequest + * @throws IOException if the JSON string is invalid with respect to + * SearchWebhookConfigurationsRequest + */ + public static SearchWebhookConfigurationsRequest fromJson(String jsonString) + throws IOException { + return JSON.getGson().fromJson(jsonString, SearchWebhookConfigurationsRequest.class); + } + + /** + * Convert an instance of SearchWebhookConfigurationsRequest to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} diff --git a/sdks/java/src/main/java/com/thoughtspot/client/model/SecuritySettingsClusterPreferences.java b/sdks/java/src/main/java/com/thoughtspot/client/model/SecuritySettingsClusterPreferences.java new file mode 100644 index 000000000..a225a5129 --- /dev/null +++ b/sdks/java/src/main/java/com/thoughtspot/client/model/SecuritySettingsClusterPreferences.java @@ -0,0 +1,596 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client.model; + +import com.google.gson.Gson; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.TypeAdapter; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.reflect.TypeToken; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import com.thoughtspot.client.JSON; +import java.io.IOException; +import java.io.Serializable; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Objects; +import org.openapitools.jackson.nullable.JsonNullable; + +/** Cluster-level security preferences. */ +@javax.annotation.Generated( + value = "org.openapitools.codegen.languages.JavaClientCodegen", + comments = "Generator version: 7.12.0") +public class SecuritySettingsClusterPreferences implements Serializable { + private static final long serialVersionUID = 1L; + + public static final String SERIALIZED_NAME_ENABLE_PARTITIONED_COOKIES = + "enable_partitioned_cookies"; + + @SerializedName(SERIALIZED_NAME_ENABLE_PARTITIONED_COOKIES) + @javax.annotation.Nullable + private Boolean enablePartitionedCookies; + + public static final String SERIALIZED_NAME_CORS_WHITELISTED_URLS = "cors_whitelisted_urls"; + + @SerializedName(SERIALIZED_NAME_CORS_WHITELISTED_URLS) + @javax.annotation.Nullable + private List corsWhitelistedUrls; + + public static final String SERIALIZED_NAME_CSP_SETTINGS = "csp_settings"; + + @SerializedName(SERIALIZED_NAME_CSP_SETTINGS) + @javax.annotation.Nullable + private CspSettings cspSettings; + + public static final String SERIALIZED_NAME_SAML_REDIRECT_URLS = "saml_redirect_urls"; + + @SerializedName(SERIALIZED_NAME_SAML_REDIRECT_URLS) + @javax.annotation.Nullable + private List samlRedirectUrls; + + public static final String SERIALIZED_NAME_NON_EMBED_ACCESS = "non_embed_access"; + + @SerializedName(SERIALIZED_NAME_NON_EMBED_ACCESS) + @javax.annotation.Nullable + private ClusterNonEmbedAccess nonEmbedAccess; + + /** Trusted authentication status at the cluster level. Version: 26.6.0.cl or later */ + @JsonAdapter(TrustedAuthStatusEnum.Adapter.class) + public enum TrustedAuthStatusEnum { + ENABLED("ENABLED"), + + DISABLED("DISABLED"); + + private String value; + + TrustedAuthStatusEnum(String value) { + this.value = value; + } + + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + public static TrustedAuthStatusEnum fromValue(String value) { + for (TrustedAuthStatusEnum b : TrustedAuthStatusEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + return null; + } + + public static class Adapter extends TypeAdapter { + @Override + public void write(final JsonWriter jsonWriter, final TrustedAuthStatusEnum enumeration) + throws IOException { + jsonWriter.value(enumeration.getValue()); + } + + @Override + public TrustedAuthStatusEnum read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + return TrustedAuthStatusEnum.fromValue(value); + } + } + + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + String value = jsonElement.getAsString(); + TrustedAuthStatusEnum.fromValue(value); + } + } + + public static final String SERIALIZED_NAME_TRUSTED_AUTH_STATUS = "trusted_auth_status"; + + @SerializedName(SERIALIZED_NAME_TRUSTED_AUTH_STATUS) + @javax.annotation.Nullable + private TrustedAuthStatusEnum trustedAuthStatus; + + public SecuritySettingsClusterPreferences() {} + + public SecuritySettingsClusterPreferences enablePartitionedCookies( + @javax.annotation.Nullable Boolean enablePartitionedCookies) { + this.enablePartitionedCookies = enablePartitionedCookies; + return this; + } + + /** + * Support embedded access when third-party cookies are blocked. + * + * @return enablePartitionedCookies + */ + @javax.annotation.Nullable + public Boolean getEnablePartitionedCookies() { + return enablePartitionedCookies; + } + + public void setEnablePartitionedCookies( + @javax.annotation.Nullable Boolean enablePartitionedCookies) { + this.enablePartitionedCookies = enablePartitionedCookies; + } + + public SecuritySettingsClusterPreferences corsWhitelistedUrls( + @javax.annotation.Nullable List corsWhitelistedUrls) { + this.corsWhitelistedUrls = corsWhitelistedUrls; + return this; + } + + public SecuritySettingsClusterPreferences addCorsWhitelistedUrlsItem( + String corsWhitelistedUrlsItem) { + if (this.corsWhitelistedUrls == null) { + this.corsWhitelistedUrls = new ArrayList<>(); + } + this.corsWhitelistedUrls.add(corsWhitelistedUrlsItem); + return this; + } + + /** + * Allowed origins for CORS. + * + * @return corsWhitelistedUrls + */ + @javax.annotation.Nullable + public List getCorsWhitelistedUrls() { + return corsWhitelistedUrls; + } + + public void setCorsWhitelistedUrls( + @javax.annotation.Nullable List corsWhitelistedUrls) { + this.corsWhitelistedUrls = corsWhitelistedUrls; + } + + public SecuritySettingsClusterPreferences cspSettings( + @javax.annotation.Nullable CspSettings cspSettings) { + this.cspSettings = cspSettings; + return this; + } + + /** + * Get cspSettings + * + * @return cspSettings + */ + @javax.annotation.Nullable + public CspSettings getCspSettings() { + return cspSettings; + } + + public void setCspSettings(@javax.annotation.Nullable CspSettings cspSettings) { + this.cspSettings = cspSettings; + } + + public SecuritySettingsClusterPreferences samlRedirectUrls( + @javax.annotation.Nullable List samlRedirectUrls) { + this.samlRedirectUrls = samlRedirectUrls; + return this; + } + + public SecuritySettingsClusterPreferences addSamlRedirectUrlsItem(String samlRedirectUrlsItem) { + if (this.samlRedirectUrls == null) { + this.samlRedirectUrls = new ArrayList<>(); + } + this.samlRedirectUrls.add(samlRedirectUrlsItem); + return this; + } + + /** + * Allowed redirect hosts for SAML login. + * + * @return samlRedirectUrls + */ + @javax.annotation.Nullable + public List getSamlRedirectUrls() { + return samlRedirectUrls; + } + + public void setSamlRedirectUrls(@javax.annotation.Nullable List samlRedirectUrls) { + this.samlRedirectUrls = samlRedirectUrls; + } + + public SecuritySettingsClusterPreferences nonEmbedAccess( + @javax.annotation.Nullable ClusterNonEmbedAccess nonEmbedAccess) { + this.nonEmbedAccess = nonEmbedAccess; + return this; + } + + /** + * Get nonEmbedAccess + * + * @return nonEmbedAccess + */ + @javax.annotation.Nullable + public ClusterNonEmbedAccess getNonEmbedAccess() { + return nonEmbedAccess; + } + + public void setNonEmbedAccess(@javax.annotation.Nullable ClusterNonEmbedAccess nonEmbedAccess) { + this.nonEmbedAccess = nonEmbedAccess; + } + + public SecuritySettingsClusterPreferences trustedAuthStatus( + @javax.annotation.Nullable TrustedAuthStatusEnum trustedAuthStatus) { + this.trustedAuthStatus = trustedAuthStatus; + return this; + } + + /** + * Trusted authentication status at the cluster level. Version: 26.6.0.cl or later + * + * @return trustedAuthStatus + */ + @javax.annotation.Nullable + public TrustedAuthStatusEnum getTrustedAuthStatus() { + return trustedAuthStatus; + } + + public void setTrustedAuthStatus( + @javax.annotation.Nullable TrustedAuthStatusEnum trustedAuthStatus) { + this.trustedAuthStatus = trustedAuthStatus; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key name of the property + * @param value value of the property + * @return the SecuritySettingsClusterPreferences instance itself + */ + public SecuritySettingsClusterPreferences putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return a map of objects + */ + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key name of the property + * @return an object + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + SecuritySettingsClusterPreferences securitySettingsClusterPreferences = + (SecuritySettingsClusterPreferences) o; + return Objects.equals( + this.enablePartitionedCookies, + securitySettingsClusterPreferences.enablePartitionedCookies) + && Objects.equals( + this.corsWhitelistedUrls, + securitySettingsClusterPreferences.corsWhitelistedUrls) + && Objects.equals(this.cspSettings, securitySettingsClusterPreferences.cspSettings) + && Objects.equals( + this.samlRedirectUrls, securitySettingsClusterPreferences.samlRedirectUrls) + && Objects.equals( + this.nonEmbedAccess, securitySettingsClusterPreferences.nonEmbedAccess) + && Objects.equals( + this.trustedAuthStatus, + securitySettingsClusterPreferences.trustedAuthStatus) + && Objects.equals( + this.additionalProperties, + securitySettingsClusterPreferences.additionalProperties); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b + || (a != null + && b != null + && a.isPresent() + && b.isPresent() + && Objects.deepEquals(a.get(), b.get())); + } + + @Override + public int hashCode() { + return Objects.hash( + enablePartitionedCookies, + corsWhitelistedUrls, + cspSettings, + samlRedirectUrls, + nonEmbedAccess, + trustedAuthStatus, + additionalProperties); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; + } + return a.isPresent() ? Arrays.deepHashCode(new Object[] {a.get()}) : 31; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class SecuritySettingsClusterPreferences {\n"); + sb.append(" enablePartitionedCookies: ") + .append(toIndentedString(enablePartitionedCookies)) + .append("\n"); + sb.append(" corsWhitelistedUrls: ") + .append(toIndentedString(corsWhitelistedUrls)) + .append("\n"); + sb.append(" cspSettings: ").append(toIndentedString(cspSettings)).append("\n"); + sb.append(" samlRedirectUrls: ").append(toIndentedString(samlRedirectUrls)).append("\n"); + sb.append(" nonEmbedAccess: ").append(toIndentedString(nonEmbedAccess)).append("\n"); + sb.append(" trustedAuthStatus: ") + .append(toIndentedString(trustedAuthStatus)) + .append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first + * line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("enable_partitioned_cookies"); + openapiFields.add("cors_whitelisted_urls"); + openapiFields.add("csp_settings"); + openapiFields.add("saml_redirect_urls"); + openapiFields.add("non_embed_access"); + openapiFields.add("trusted_auth_status"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to + * SecuritySettingsClusterPreferences + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!SecuritySettingsClusterPreferences.openapiRequiredFields + .isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException( + String.format( + "The required field(s) %s in SecuritySettingsClusterPreferences is" + + " not found in the empty JSON string", + SecuritySettingsClusterPreferences.openapiRequiredFields + .toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // ensure the optional json data is an array if present + if (jsonObj.get("cors_whitelisted_urls") != null + && !jsonObj.get("cors_whitelisted_urls").isJsonNull() + && !jsonObj.get("cors_whitelisted_urls").isJsonArray()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `cors_whitelisted_urls` to be an array in the JSON" + + " string but got `%s`", + jsonObj.get("cors_whitelisted_urls").toString())); + } + // validate the optional field `csp_settings` + if (jsonObj.get("csp_settings") != null && !jsonObj.get("csp_settings").isJsonNull()) { + CspSettings.validateJsonElement(jsonObj.get("csp_settings")); + } + // ensure the optional json data is an array if present + if (jsonObj.get("saml_redirect_urls") != null + && !jsonObj.get("saml_redirect_urls").isJsonNull() + && !jsonObj.get("saml_redirect_urls").isJsonArray()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `saml_redirect_urls` to be an array in the JSON" + + " string but got `%s`", + jsonObj.get("saml_redirect_urls").toString())); + } + // validate the optional field `non_embed_access` + if (jsonObj.get("non_embed_access") != null + && !jsonObj.get("non_embed_access").isJsonNull()) { + ClusterNonEmbedAccess.validateJsonElement(jsonObj.get("non_embed_access")); + } + if ((jsonObj.get("trusted_auth_status") != null + && !jsonObj.get("trusted_auth_status").isJsonNull()) + && !jsonObj.get("trusted_auth_status").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `trusted_auth_status` to be a primitive type in" + + " the JSON string but got `%s`", + jsonObj.get("trusted_auth_status").toString())); + } + // validate the optional field `trusted_auth_status` + if (jsonObj.get("trusted_auth_status") != null + && !jsonObj.get("trusted_auth_status").isJsonNull()) { + TrustedAuthStatusEnum.validateJsonElement(jsonObj.get("trusted_auth_status")); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!SecuritySettingsClusterPreferences.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'SecuritySettingsClusterPreferences' and + // its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter = + gson.getDelegateAdapter( + this, TypeToken.get(SecuritySettingsClusterPreferences.class)); + + return (TypeAdapter) + new TypeAdapter() { + @Override + public void write(JsonWriter out, SecuritySettingsClusterPreferences value) + throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + obj.remove("additionalProperties"); + // serialize additional properties + if (value.getAdditionalProperties() != null) { + for (Map.Entry entry : + value.getAdditionalProperties().entrySet()) { + if (entry.getValue() instanceof String) + obj.addProperty(entry.getKey(), (String) entry.getValue()); + else if (entry.getValue() instanceof Number) + obj.addProperty(entry.getKey(), (Number) entry.getValue()); + else if (entry.getValue() instanceof Boolean) + obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); + else if (entry.getValue() instanceof Character) + obj.addProperty( + entry.getKey(), (Character) entry.getValue()); + else { + JsonElement jsonElement = gson.toJsonTree(entry.getValue()); + if (jsonElement.isJsonArray()) { + obj.add(entry.getKey(), jsonElement.getAsJsonArray()); + } else { + obj.add(entry.getKey(), jsonElement.getAsJsonObject()); + } + } + } + } + elementAdapter.write(out, obj); + } + + @Override + public SecuritySettingsClusterPreferences read(JsonReader in) + throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // store additional fields in the deserialized instance + SecuritySettingsClusterPreferences instance = + thisAdapter.fromJsonTree(jsonObj); + for (Map.Entry entry : jsonObj.entrySet()) { + if (!openapiFields.contains(entry.getKey())) { + if (entry.getValue().isJsonPrimitive()) { // primitive type + if (entry.getValue().getAsJsonPrimitive().isString()) + instance.putAdditionalProperty( + entry.getKey(), entry.getValue().getAsString()); + else if (entry.getValue().getAsJsonPrimitive().isNumber()) + instance.putAdditionalProperty( + entry.getKey(), entry.getValue().getAsNumber()); + else if (entry.getValue().getAsJsonPrimitive().isBoolean()) + instance.putAdditionalProperty( + entry.getKey(), + entry.getValue().getAsBoolean()); + else + throw new IllegalArgumentException( + String.format( + "The field `%s` has unknown primitive" + + " type. Value: %s", + entry.getKey(), + entry.getValue().toString())); + } else if (entry.getValue().isJsonArray()) { + instance.putAdditionalProperty( + entry.getKey(), + gson.fromJson(entry.getValue(), List.class)); + } else { // JSON object + instance.putAdditionalProperty( + entry.getKey(), + gson.fromJson(entry.getValue(), HashMap.class)); + } + } + } + return instance; + } + }.nullSafe(); + } + } + + /** + * Create an instance of SecuritySettingsClusterPreferences given an JSON string + * + * @param jsonString JSON string + * @return An instance of SecuritySettingsClusterPreferences + * @throws IOException if the JSON string is invalid with respect to + * SecuritySettingsClusterPreferences + */ + public static SecuritySettingsClusterPreferences fromJson(String jsonString) + throws IOException { + return JSON.getGson().fromJson(jsonString, SecuritySettingsClusterPreferences.class); + } + + /** + * Convert an instance of SecuritySettingsClusterPreferences to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} diff --git a/sdks/java/src/main/java/com/thoughtspot/client/model/SecuritySettingsClusterPreferencesInput.java b/sdks/java/src/main/java/com/thoughtspot/client/model/SecuritySettingsClusterPreferencesInput.java new file mode 100644 index 000000000..e1bb8daa7 --- /dev/null +++ b/sdks/java/src/main/java/com/thoughtspot/client/model/SecuritySettingsClusterPreferencesInput.java @@ -0,0 +1,502 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client.model; + +import com.google.gson.Gson; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.TypeAdapter; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.annotations.SerializedName; +import com.google.gson.reflect.TypeToken; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import com.thoughtspot.client.JSON; +import java.io.IOException; +import java.io.Serializable; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Objects; +import org.openapitools.jackson.nullable.JsonNullable; + +/** Input for cluster-level security preferences configuration. */ +@javax.annotation.Generated( + value = "org.openapitools.codegen.languages.JavaClientCodegen", + comments = "Generator version: 7.12.0") +public class SecuritySettingsClusterPreferencesInput implements Serializable { + private static final long serialVersionUID = 1L; + + public static final String SERIALIZED_NAME_ENABLE_PARTITIONED_COOKIES = + "enable_partitioned_cookies"; + + @SerializedName(SERIALIZED_NAME_ENABLE_PARTITIONED_COOKIES) + @javax.annotation.Nullable + private Boolean enablePartitionedCookies; + + public static final String SERIALIZED_NAME_CORS_WHITELISTED_URLS = "cors_whitelisted_urls"; + + @SerializedName(SERIALIZED_NAME_CORS_WHITELISTED_URLS) + @javax.annotation.Nullable + private List corsWhitelistedUrls; + + public static final String SERIALIZED_NAME_CSP_SETTINGS = "csp_settings"; + + @SerializedName(SERIALIZED_NAME_CSP_SETTINGS) + @javax.annotation.Nullable + private CspSettingsInput cspSettings; + + public static final String SERIALIZED_NAME_SAML_REDIRECT_URLS = "saml_redirect_urls"; + + @SerializedName(SERIALIZED_NAME_SAML_REDIRECT_URLS) + @javax.annotation.Nullable + private List samlRedirectUrls; + + public static final String SERIALIZED_NAME_NON_EMBED_ACCESS = "non_embed_access"; + + @SerializedName(SERIALIZED_NAME_NON_EMBED_ACCESS) + @javax.annotation.Nullable + private ClusterNonEmbedAccessInput nonEmbedAccess; + + public SecuritySettingsClusterPreferencesInput() {} + + public SecuritySettingsClusterPreferencesInput enablePartitionedCookies( + @javax.annotation.Nullable Boolean enablePartitionedCookies) { + this.enablePartitionedCookies = enablePartitionedCookies; + return this; + } + + /** + * Support embedded access when third-party cookies are blocked. + * + * @return enablePartitionedCookies + */ + @javax.annotation.Nullable + public Boolean getEnablePartitionedCookies() { + return enablePartitionedCookies; + } + + public void setEnablePartitionedCookies( + @javax.annotation.Nullable Boolean enablePartitionedCookies) { + this.enablePartitionedCookies = enablePartitionedCookies; + } + + public SecuritySettingsClusterPreferencesInput corsWhitelistedUrls( + @javax.annotation.Nullable List corsWhitelistedUrls) { + this.corsWhitelistedUrls = corsWhitelistedUrls; + return this; + } + + public SecuritySettingsClusterPreferencesInput addCorsWhitelistedUrlsItem( + String corsWhitelistedUrlsItem) { + if (this.corsWhitelistedUrls == null) { + this.corsWhitelistedUrls = new ArrayList<>(); + } + this.corsWhitelistedUrls.add(corsWhitelistedUrlsItem); + return this; + } + + /** + * Allowed origins for CORS. + * + * @return corsWhitelistedUrls + */ + @javax.annotation.Nullable + public List getCorsWhitelistedUrls() { + return corsWhitelistedUrls; + } + + public void setCorsWhitelistedUrls( + @javax.annotation.Nullable List corsWhitelistedUrls) { + this.corsWhitelistedUrls = corsWhitelistedUrls; + } + + public SecuritySettingsClusterPreferencesInput cspSettings( + @javax.annotation.Nullable CspSettingsInput cspSettings) { + this.cspSettings = cspSettings; + return this; + } + + /** + * Get cspSettings + * + * @return cspSettings + */ + @javax.annotation.Nullable + public CspSettingsInput getCspSettings() { + return cspSettings; + } + + public void setCspSettings(@javax.annotation.Nullable CspSettingsInput cspSettings) { + this.cspSettings = cspSettings; + } + + public SecuritySettingsClusterPreferencesInput samlRedirectUrls( + @javax.annotation.Nullable List samlRedirectUrls) { + this.samlRedirectUrls = samlRedirectUrls; + return this; + } + + public SecuritySettingsClusterPreferencesInput addSamlRedirectUrlsItem( + String samlRedirectUrlsItem) { + if (this.samlRedirectUrls == null) { + this.samlRedirectUrls = new ArrayList<>(); + } + this.samlRedirectUrls.add(samlRedirectUrlsItem); + return this; + } + + /** + * Allowed redirect hosts for SAML login. + * + * @return samlRedirectUrls + */ + @javax.annotation.Nullable + public List getSamlRedirectUrls() { + return samlRedirectUrls; + } + + public void setSamlRedirectUrls(@javax.annotation.Nullable List samlRedirectUrls) { + this.samlRedirectUrls = samlRedirectUrls; + } + + public SecuritySettingsClusterPreferencesInput nonEmbedAccess( + @javax.annotation.Nullable ClusterNonEmbedAccessInput nonEmbedAccess) { + this.nonEmbedAccess = nonEmbedAccess; + return this; + } + + /** + * Get nonEmbedAccess + * + * @return nonEmbedAccess + */ + @javax.annotation.Nullable + public ClusterNonEmbedAccessInput getNonEmbedAccess() { + return nonEmbedAccess; + } + + public void setNonEmbedAccess( + @javax.annotation.Nullable ClusterNonEmbedAccessInput nonEmbedAccess) { + this.nonEmbedAccess = nonEmbedAccess; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key name of the property + * @param value value of the property + * @return the SecuritySettingsClusterPreferencesInput instance itself + */ + public SecuritySettingsClusterPreferencesInput putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return a map of objects + */ + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key name of the property + * @return an object + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + SecuritySettingsClusterPreferencesInput securitySettingsClusterPreferencesInput = + (SecuritySettingsClusterPreferencesInput) o; + return Objects.equals( + this.enablePartitionedCookies, + securitySettingsClusterPreferencesInput.enablePartitionedCookies) + && Objects.equals( + this.corsWhitelistedUrls, + securitySettingsClusterPreferencesInput.corsWhitelistedUrls) + && Objects.equals( + this.cspSettings, securitySettingsClusterPreferencesInput.cspSettings) + && Objects.equals( + this.samlRedirectUrls, + securitySettingsClusterPreferencesInput.samlRedirectUrls) + && Objects.equals( + this.nonEmbedAccess, securitySettingsClusterPreferencesInput.nonEmbedAccess) + && Objects.equals( + this.additionalProperties, + securitySettingsClusterPreferencesInput.additionalProperties); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b + || (a != null + && b != null + && a.isPresent() + && b.isPresent() + && Objects.deepEquals(a.get(), b.get())); + } + + @Override + public int hashCode() { + return Objects.hash( + enablePartitionedCookies, + corsWhitelistedUrls, + cspSettings, + samlRedirectUrls, + nonEmbedAccess, + additionalProperties); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; + } + return a.isPresent() ? Arrays.deepHashCode(new Object[] {a.get()}) : 31; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class SecuritySettingsClusterPreferencesInput {\n"); + sb.append(" enablePartitionedCookies: ") + .append(toIndentedString(enablePartitionedCookies)) + .append("\n"); + sb.append(" corsWhitelistedUrls: ") + .append(toIndentedString(corsWhitelistedUrls)) + .append("\n"); + sb.append(" cspSettings: ").append(toIndentedString(cspSettings)).append("\n"); + sb.append(" samlRedirectUrls: ").append(toIndentedString(samlRedirectUrls)).append("\n"); + sb.append(" nonEmbedAccess: ").append(toIndentedString(nonEmbedAccess)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first + * line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("enable_partitioned_cookies"); + openapiFields.add("cors_whitelisted_urls"); + openapiFields.add("csp_settings"); + openapiFields.add("saml_redirect_urls"); + openapiFields.add("non_embed_access"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to + * SecuritySettingsClusterPreferencesInput + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!SecuritySettingsClusterPreferencesInput.openapiRequiredFields + .isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException( + String.format( + "The required field(s) %s in" + + " SecuritySettingsClusterPreferencesInput is not found in" + + " the empty JSON string", + SecuritySettingsClusterPreferencesInput.openapiRequiredFields + .toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // ensure the optional json data is an array if present + if (jsonObj.get("cors_whitelisted_urls") != null + && !jsonObj.get("cors_whitelisted_urls").isJsonNull() + && !jsonObj.get("cors_whitelisted_urls").isJsonArray()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `cors_whitelisted_urls` to be an array in the JSON" + + " string but got `%s`", + jsonObj.get("cors_whitelisted_urls").toString())); + } + // validate the optional field `csp_settings` + if (jsonObj.get("csp_settings") != null && !jsonObj.get("csp_settings").isJsonNull()) { + CspSettingsInput.validateJsonElement(jsonObj.get("csp_settings")); + } + // ensure the optional json data is an array if present + if (jsonObj.get("saml_redirect_urls") != null + && !jsonObj.get("saml_redirect_urls").isJsonNull() + && !jsonObj.get("saml_redirect_urls").isJsonArray()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `saml_redirect_urls` to be an array in the JSON" + + " string but got `%s`", + jsonObj.get("saml_redirect_urls").toString())); + } + // validate the optional field `non_embed_access` + if (jsonObj.get("non_embed_access") != null + && !jsonObj.get("non_embed_access").isJsonNull()) { + ClusterNonEmbedAccessInput.validateJsonElement(jsonObj.get("non_embed_access")); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!SecuritySettingsClusterPreferencesInput.class.isAssignableFrom( + type.getRawType())) { + return null; // this class only serializes 'SecuritySettingsClusterPreferencesInput' + // and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter = + gson.getDelegateAdapter( + this, TypeToken.get(SecuritySettingsClusterPreferencesInput.class)); + + return (TypeAdapter) + new TypeAdapter() { + @Override + public void write( + JsonWriter out, SecuritySettingsClusterPreferencesInput value) + throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + obj.remove("additionalProperties"); + // serialize additional properties + if (value.getAdditionalProperties() != null) { + for (Map.Entry entry : + value.getAdditionalProperties().entrySet()) { + if (entry.getValue() instanceof String) + obj.addProperty(entry.getKey(), (String) entry.getValue()); + else if (entry.getValue() instanceof Number) + obj.addProperty(entry.getKey(), (Number) entry.getValue()); + else if (entry.getValue() instanceof Boolean) + obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); + else if (entry.getValue() instanceof Character) + obj.addProperty( + entry.getKey(), (Character) entry.getValue()); + else { + JsonElement jsonElement = gson.toJsonTree(entry.getValue()); + if (jsonElement.isJsonArray()) { + obj.add(entry.getKey(), jsonElement.getAsJsonArray()); + } else { + obj.add(entry.getKey(), jsonElement.getAsJsonObject()); + } + } + } + } + elementAdapter.write(out, obj); + } + + @Override + public SecuritySettingsClusterPreferencesInput read(JsonReader in) + throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // store additional fields in the deserialized instance + SecuritySettingsClusterPreferencesInput instance = + thisAdapter.fromJsonTree(jsonObj); + for (Map.Entry entry : jsonObj.entrySet()) { + if (!openapiFields.contains(entry.getKey())) { + if (entry.getValue().isJsonPrimitive()) { // primitive type + if (entry.getValue().getAsJsonPrimitive().isString()) + instance.putAdditionalProperty( + entry.getKey(), entry.getValue().getAsString()); + else if (entry.getValue().getAsJsonPrimitive().isNumber()) + instance.putAdditionalProperty( + entry.getKey(), entry.getValue().getAsNumber()); + else if (entry.getValue().getAsJsonPrimitive().isBoolean()) + instance.putAdditionalProperty( + entry.getKey(), + entry.getValue().getAsBoolean()); + else + throw new IllegalArgumentException( + String.format( + "The field `%s` has unknown primitive" + + " type. Value: %s", + entry.getKey(), + entry.getValue().toString())); + } else if (entry.getValue().isJsonArray()) { + instance.putAdditionalProperty( + entry.getKey(), + gson.fromJson(entry.getValue(), List.class)); + } else { // JSON object + instance.putAdditionalProperty( + entry.getKey(), + gson.fromJson(entry.getValue(), HashMap.class)); + } + } + } + return instance; + } + }.nullSafe(); + } + } + + /** + * Create an instance of SecuritySettingsClusterPreferencesInput given an JSON string + * + * @param jsonString JSON string + * @return An instance of SecuritySettingsClusterPreferencesInput + * @throws IOException if the JSON string is invalid with respect to + * SecuritySettingsClusterPreferencesInput + */ + public static SecuritySettingsClusterPreferencesInput fromJson(String jsonString) + throws IOException { + return JSON.getGson().fromJson(jsonString, SecuritySettingsClusterPreferencesInput.class); + } + + /** + * Convert an instance of SecuritySettingsClusterPreferencesInput to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} diff --git a/sdks/java/src/main/java/com/thoughtspot/client/model/SecuritySettingsOrgDetails.java b/sdks/java/src/main/java/com/thoughtspot/client/model/SecuritySettingsOrgDetails.java new file mode 100644 index 000000000..dcb5a3d02 --- /dev/null +++ b/sdks/java/src/main/java/com/thoughtspot/client/model/SecuritySettingsOrgDetails.java @@ -0,0 +1,339 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client.model; + +import com.google.gson.Gson; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.TypeAdapter; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.annotations.SerializedName; +import com.google.gson.reflect.TypeToken; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import com.thoughtspot.client.JSON; +import java.io.IOException; +import java.io.Serializable; +import java.util.Arrays; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Objects; +import org.openapitools.jackson.nullable.JsonNullable; + +/** Org details for security settings. */ +@javax.annotation.Generated( + value = "org.openapitools.codegen.languages.JavaClientCodegen", + comments = "Generator version: 7.12.0") +public class SecuritySettingsOrgDetails implements Serializable { + private static final long serialVersionUID = 1L; + + public static final String SERIALIZED_NAME_ID = "id"; + + @SerializedName(SERIALIZED_NAME_ID) + @javax.annotation.Nullable + private Integer id; + + public static final String SERIALIZED_NAME_NAME = "name"; + + @SerializedName(SERIALIZED_NAME_NAME) + @javax.annotation.Nullable + private String name; + + public SecuritySettingsOrgDetails() {} + + public SecuritySettingsOrgDetails id(@javax.annotation.Nullable Integer id) { + this.id = id; + return this; + } + + /** + * Unique identifier of the org. + * + * @return id + */ + @javax.annotation.Nullable + public Integer getId() { + return id; + } + + public void setId(@javax.annotation.Nullable Integer id) { + this.id = id; + } + + public SecuritySettingsOrgDetails name(@javax.annotation.Nullable String name) { + this.name = name; + return this; + } + + /** + * Name of the org. + * + * @return name + */ + @javax.annotation.Nullable + public String getName() { + return name; + } + + public void setName(@javax.annotation.Nullable String name) { + this.name = name; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key name of the property + * @param value value of the property + * @return the SecuritySettingsOrgDetails instance itself + */ + public SecuritySettingsOrgDetails putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return a map of objects + */ + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key name of the property + * @return an object + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + SecuritySettingsOrgDetails securitySettingsOrgDetails = (SecuritySettingsOrgDetails) o; + return Objects.equals(this.id, securitySettingsOrgDetails.id) + && Objects.equals(this.name, securitySettingsOrgDetails.name) + && Objects.equals( + this.additionalProperties, securitySettingsOrgDetails.additionalProperties); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b + || (a != null + && b != null + && a.isPresent() + && b.isPresent() + && Objects.deepEquals(a.get(), b.get())); + } + + @Override + public int hashCode() { + return Objects.hash(id, name, additionalProperties); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; + } + return a.isPresent() ? Arrays.deepHashCode(new Object[] {a.get()}) : 31; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class SecuritySettingsOrgDetails {\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first + * line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("id"); + openapiFields.add("name"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to SecuritySettingsOrgDetails + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!SecuritySettingsOrgDetails.openapiRequiredFields + .isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException( + String.format( + "The required field(s) %s in SecuritySettingsOrgDetails is not" + + " found in the empty JSON string", + SecuritySettingsOrgDetails.openapiRequiredFields.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if ((jsonObj.get("name") != null && !jsonObj.get("name").isJsonNull()) + && !jsonObj.get("name").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `name` to be a primitive type in the JSON string" + + " but got `%s`", + jsonObj.get("name").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!SecuritySettingsOrgDetails.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'SecuritySettingsOrgDetails' and its + // subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter = + gson.getDelegateAdapter(this, TypeToken.get(SecuritySettingsOrgDetails.class)); + + return (TypeAdapter) + new TypeAdapter() { + @Override + public void write(JsonWriter out, SecuritySettingsOrgDetails value) + throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + obj.remove("additionalProperties"); + // serialize additional properties + if (value.getAdditionalProperties() != null) { + for (Map.Entry entry : + value.getAdditionalProperties().entrySet()) { + if (entry.getValue() instanceof String) + obj.addProperty(entry.getKey(), (String) entry.getValue()); + else if (entry.getValue() instanceof Number) + obj.addProperty(entry.getKey(), (Number) entry.getValue()); + else if (entry.getValue() instanceof Boolean) + obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); + else if (entry.getValue() instanceof Character) + obj.addProperty( + entry.getKey(), (Character) entry.getValue()); + else { + JsonElement jsonElement = gson.toJsonTree(entry.getValue()); + if (jsonElement.isJsonArray()) { + obj.add(entry.getKey(), jsonElement.getAsJsonArray()); + } else { + obj.add(entry.getKey(), jsonElement.getAsJsonObject()); + } + } + } + } + elementAdapter.write(out, obj); + } + + @Override + public SecuritySettingsOrgDetails read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // store additional fields in the deserialized instance + SecuritySettingsOrgDetails instance = thisAdapter.fromJsonTree(jsonObj); + for (Map.Entry entry : jsonObj.entrySet()) { + if (!openapiFields.contains(entry.getKey())) { + if (entry.getValue().isJsonPrimitive()) { // primitive type + if (entry.getValue().getAsJsonPrimitive().isString()) + instance.putAdditionalProperty( + entry.getKey(), entry.getValue().getAsString()); + else if (entry.getValue().getAsJsonPrimitive().isNumber()) + instance.putAdditionalProperty( + entry.getKey(), entry.getValue().getAsNumber()); + else if (entry.getValue().getAsJsonPrimitive().isBoolean()) + instance.putAdditionalProperty( + entry.getKey(), + entry.getValue().getAsBoolean()); + else + throw new IllegalArgumentException( + String.format( + "The field `%s` has unknown primitive" + + " type. Value: %s", + entry.getKey(), + entry.getValue().toString())); + } else if (entry.getValue().isJsonArray()) { + instance.putAdditionalProperty( + entry.getKey(), + gson.fromJson(entry.getValue(), List.class)); + } else { // JSON object + instance.putAdditionalProperty( + entry.getKey(), + gson.fromJson(entry.getValue(), HashMap.class)); + } + } + } + return instance; + } + }.nullSafe(); + } + } + + /** + * Create an instance of SecuritySettingsOrgDetails given an JSON string + * + * @param jsonString JSON string + * @return An instance of SecuritySettingsOrgDetails + * @throws IOException if the JSON string is invalid with respect to SecuritySettingsOrgDetails + */ + public static SecuritySettingsOrgDetails fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, SecuritySettingsOrgDetails.class); + } + + /** + * Convert an instance of SecuritySettingsOrgDetails to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} diff --git a/sdks/java/src/main/java/com/thoughtspot/client/model/SecuritySettingsOrgPreferences.java b/sdks/java/src/main/java/com/thoughtspot/client/model/SecuritySettingsOrgPreferences.java new file mode 100644 index 000000000..d2d4923a2 --- /dev/null +++ b/sdks/java/src/main/java/com/thoughtspot/client/model/SecuritySettingsOrgPreferences.java @@ -0,0 +1,504 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client.model; + +import com.google.gson.Gson; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.TypeAdapter; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.reflect.TypeToken; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import com.thoughtspot.client.JSON; +import java.io.IOException; +import java.io.Serializable; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Objects; +import org.openapitools.jackson.nullable.JsonNullable; + +/** Org-level security preferences. */ +@javax.annotation.Generated( + value = "org.openapitools.codegen.languages.JavaClientCodegen", + comments = "Generator version: 7.12.0") +public class SecuritySettingsOrgPreferences implements Serializable { + private static final long serialVersionUID = 1L; + + public static final String SERIALIZED_NAME_ORG = "org"; + + @SerializedName(SERIALIZED_NAME_ORG) + @javax.annotation.Nullable + private SecuritySettingsOrgDetails org; + + public static final String SERIALIZED_NAME_CORS_WHITELISTED_URLS = "cors_whitelisted_urls"; + + @SerializedName(SERIALIZED_NAME_CORS_WHITELISTED_URLS) + @javax.annotation.Nullable + private List corsWhitelistedUrls; + + public static final String SERIALIZED_NAME_NON_EMBED_ACCESS = "non_embed_access"; + + @SerializedName(SERIALIZED_NAME_NON_EMBED_ACCESS) + @javax.annotation.Nullable + private OrgNonEmbedAccess nonEmbedAccess; + + /** Trusted authentication status for this org. Version: 26.6.0.cl or later */ + @JsonAdapter(TrustedAuthStatusEnum.Adapter.class) + public enum TrustedAuthStatusEnum { + ENABLED("ENABLED"), + + DISABLED("DISABLED"); + + private String value; + + TrustedAuthStatusEnum(String value) { + this.value = value; + } + + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + public static TrustedAuthStatusEnum fromValue(String value) { + for (TrustedAuthStatusEnum b : TrustedAuthStatusEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + return null; + } + + public static class Adapter extends TypeAdapter { + @Override + public void write(final JsonWriter jsonWriter, final TrustedAuthStatusEnum enumeration) + throws IOException { + jsonWriter.value(enumeration.getValue()); + } + + @Override + public TrustedAuthStatusEnum read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + return TrustedAuthStatusEnum.fromValue(value); + } + } + + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + String value = jsonElement.getAsString(); + TrustedAuthStatusEnum.fromValue(value); + } + } + + public static final String SERIALIZED_NAME_TRUSTED_AUTH_STATUS = "trusted_auth_status"; + + @SerializedName(SERIALIZED_NAME_TRUSTED_AUTH_STATUS) + @javax.annotation.Nullable + private TrustedAuthStatusEnum trustedAuthStatus; + + public SecuritySettingsOrgPreferences() {} + + public SecuritySettingsOrgPreferences org( + @javax.annotation.Nullable SecuritySettingsOrgDetails org) { + this.org = org; + return this; + } + + /** + * Get org + * + * @return org + */ + @javax.annotation.Nullable + public SecuritySettingsOrgDetails getOrg() { + return org; + } + + public void setOrg(@javax.annotation.Nullable SecuritySettingsOrgDetails org) { + this.org = org; + } + + public SecuritySettingsOrgPreferences corsWhitelistedUrls( + @javax.annotation.Nullable List corsWhitelistedUrls) { + this.corsWhitelistedUrls = corsWhitelistedUrls; + return this; + } + + public SecuritySettingsOrgPreferences addCorsWhitelistedUrlsItem( + String corsWhitelistedUrlsItem) { + if (this.corsWhitelistedUrls == null) { + this.corsWhitelistedUrls = new ArrayList<>(); + } + this.corsWhitelistedUrls.add(corsWhitelistedUrlsItem); + return this; + } + + /** + * Allowed origins for CORS for this org. + * + * @return corsWhitelistedUrls + */ + @javax.annotation.Nullable + public List getCorsWhitelistedUrls() { + return corsWhitelistedUrls; + } + + public void setCorsWhitelistedUrls( + @javax.annotation.Nullable List corsWhitelistedUrls) { + this.corsWhitelistedUrls = corsWhitelistedUrls; + } + + public SecuritySettingsOrgPreferences nonEmbedAccess( + @javax.annotation.Nullable OrgNonEmbedAccess nonEmbedAccess) { + this.nonEmbedAccess = nonEmbedAccess; + return this; + } + + /** + * Get nonEmbedAccess + * + * @return nonEmbedAccess + */ + @javax.annotation.Nullable + public OrgNonEmbedAccess getNonEmbedAccess() { + return nonEmbedAccess; + } + + public void setNonEmbedAccess(@javax.annotation.Nullable OrgNonEmbedAccess nonEmbedAccess) { + this.nonEmbedAccess = nonEmbedAccess; + } + + public SecuritySettingsOrgPreferences trustedAuthStatus( + @javax.annotation.Nullable TrustedAuthStatusEnum trustedAuthStatus) { + this.trustedAuthStatus = trustedAuthStatus; + return this; + } + + /** + * Trusted authentication status for this org. Version: 26.6.0.cl or later + * + * @return trustedAuthStatus + */ + @javax.annotation.Nullable + public TrustedAuthStatusEnum getTrustedAuthStatus() { + return trustedAuthStatus; + } + + public void setTrustedAuthStatus( + @javax.annotation.Nullable TrustedAuthStatusEnum trustedAuthStatus) { + this.trustedAuthStatus = trustedAuthStatus; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key name of the property + * @param value value of the property + * @return the SecuritySettingsOrgPreferences instance itself + */ + public SecuritySettingsOrgPreferences putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return a map of objects + */ + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key name of the property + * @return an object + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + SecuritySettingsOrgPreferences securitySettingsOrgPreferences = + (SecuritySettingsOrgPreferences) o; + return Objects.equals(this.org, securitySettingsOrgPreferences.org) + && Objects.equals( + this.corsWhitelistedUrls, + securitySettingsOrgPreferences.corsWhitelistedUrls) + && Objects.equals( + this.nonEmbedAccess, securitySettingsOrgPreferences.nonEmbedAccess) + && Objects.equals( + this.trustedAuthStatus, securitySettingsOrgPreferences.trustedAuthStatus) + && Objects.equals( + this.additionalProperties, + securitySettingsOrgPreferences.additionalProperties); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b + || (a != null + && b != null + && a.isPresent() + && b.isPresent() + && Objects.deepEquals(a.get(), b.get())); + } + + @Override + public int hashCode() { + return Objects.hash( + org, corsWhitelistedUrls, nonEmbedAccess, trustedAuthStatus, additionalProperties); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; + } + return a.isPresent() ? Arrays.deepHashCode(new Object[] {a.get()}) : 31; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class SecuritySettingsOrgPreferences {\n"); + sb.append(" org: ").append(toIndentedString(org)).append("\n"); + sb.append(" corsWhitelistedUrls: ") + .append(toIndentedString(corsWhitelistedUrls)) + .append("\n"); + sb.append(" nonEmbedAccess: ").append(toIndentedString(nonEmbedAccess)).append("\n"); + sb.append(" trustedAuthStatus: ") + .append(toIndentedString(trustedAuthStatus)) + .append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first + * line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("org"); + openapiFields.add("cors_whitelisted_urls"); + openapiFields.add("non_embed_access"); + openapiFields.add("trusted_auth_status"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to + * SecuritySettingsOrgPreferences + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!SecuritySettingsOrgPreferences.openapiRequiredFields + .isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException( + String.format( + "The required field(s) %s in SecuritySettingsOrgPreferences is not" + + " found in the empty JSON string", + SecuritySettingsOrgPreferences.openapiRequiredFields.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // validate the optional field `org` + if (jsonObj.get("org") != null && !jsonObj.get("org").isJsonNull()) { + SecuritySettingsOrgDetails.validateJsonElement(jsonObj.get("org")); + } + // ensure the optional json data is an array if present + if (jsonObj.get("cors_whitelisted_urls") != null + && !jsonObj.get("cors_whitelisted_urls").isJsonNull() + && !jsonObj.get("cors_whitelisted_urls").isJsonArray()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `cors_whitelisted_urls` to be an array in the JSON" + + " string but got `%s`", + jsonObj.get("cors_whitelisted_urls").toString())); + } + // validate the optional field `non_embed_access` + if (jsonObj.get("non_embed_access") != null + && !jsonObj.get("non_embed_access").isJsonNull()) { + OrgNonEmbedAccess.validateJsonElement(jsonObj.get("non_embed_access")); + } + if ((jsonObj.get("trusted_auth_status") != null + && !jsonObj.get("trusted_auth_status").isJsonNull()) + && !jsonObj.get("trusted_auth_status").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `trusted_auth_status` to be a primitive type in" + + " the JSON string but got `%s`", + jsonObj.get("trusted_auth_status").toString())); + } + // validate the optional field `trusted_auth_status` + if (jsonObj.get("trusted_auth_status") != null + && !jsonObj.get("trusted_auth_status").isJsonNull()) { + TrustedAuthStatusEnum.validateJsonElement(jsonObj.get("trusted_auth_status")); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!SecuritySettingsOrgPreferences.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'SecuritySettingsOrgPreferences' and its + // subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter = + gson.getDelegateAdapter( + this, TypeToken.get(SecuritySettingsOrgPreferences.class)); + + return (TypeAdapter) + new TypeAdapter() { + @Override + public void write(JsonWriter out, SecuritySettingsOrgPreferences value) + throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + obj.remove("additionalProperties"); + // serialize additional properties + if (value.getAdditionalProperties() != null) { + for (Map.Entry entry : + value.getAdditionalProperties().entrySet()) { + if (entry.getValue() instanceof String) + obj.addProperty(entry.getKey(), (String) entry.getValue()); + else if (entry.getValue() instanceof Number) + obj.addProperty(entry.getKey(), (Number) entry.getValue()); + else if (entry.getValue() instanceof Boolean) + obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); + else if (entry.getValue() instanceof Character) + obj.addProperty( + entry.getKey(), (Character) entry.getValue()); + else { + JsonElement jsonElement = gson.toJsonTree(entry.getValue()); + if (jsonElement.isJsonArray()) { + obj.add(entry.getKey(), jsonElement.getAsJsonArray()); + } else { + obj.add(entry.getKey(), jsonElement.getAsJsonObject()); + } + } + } + } + elementAdapter.write(out, obj); + } + + @Override + public SecuritySettingsOrgPreferences read(JsonReader in) + throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // store additional fields in the deserialized instance + SecuritySettingsOrgPreferences instance = + thisAdapter.fromJsonTree(jsonObj); + for (Map.Entry entry : jsonObj.entrySet()) { + if (!openapiFields.contains(entry.getKey())) { + if (entry.getValue().isJsonPrimitive()) { // primitive type + if (entry.getValue().getAsJsonPrimitive().isString()) + instance.putAdditionalProperty( + entry.getKey(), entry.getValue().getAsString()); + else if (entry.getValue().getAsJsonPrimitive().isNumber()) + instance.putAdditionalProperty( + entry.getKey(), entry.getValue().getAsNumber()); + else if (entry.getValue().getAsJsonPrimitive().isBoolean()) + instance.putAdditionalProperty( + entry.getKey(), + entry.getValue().getAsBoolean()); + else + throw new IllegalArgumentException( + String.format( + "The field `%s` has unknown primitive" + + " type. Value: %s", + entry.getKey(), + entry.getValue().toString())); + } else if (entry.getValue().isJsonArray()) { + instance.putAdditionalProperty( + entry.getKey(), + gson.fromJson(entry.getValue(), List.class)); + } else { // JSON object + instance.putAdditionalProperty( + entry.getKey(), + gson.fromJson(entry.getValue(), HashMap.class)); + } + } + } + return instance; + } + }.nullSafe(); + } + } + + /** + * Create an instance of SecuritySettingsOrgPreferences given an JSON string + * + * @param jsonString JSON string + * @return An instance of SecuritySettingsOrgPreferences + * @throws IOException if the JSON string is invalid with respect to + * SecuritySettingsOrgPreferences + */ + public static SecuritySettingsOrgPreferences fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, SecuritySettingsOrgPreferences.class); + } + + /** + * Convert an instance of SecuritySettingsOrgPreferences to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} diff --git a/sdks/java/src/main/java/com/thoughtspot/client/model/SecuritySettingsOrgPreferencesInput.java b/sdks/java/src/main/java/com/thoughtspot/client/model/SecuritySettingsOrgPreferencesInput.java new file mode 100644 index 000000000..7b6a1376c --- /dev/null +++ b/sdks/java/src/main/java/com/thoughtspot/client/model/SecuritySettingsOrgPreferencesInput.java @@ -0,0 +1,425 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client.model; + +import com.google.gson.Gson; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.TypeAdapter; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.annotations.SerializedName; +import com.google.gson.reflect.TypeToken; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import com.thoughtspot.client.JSON; +import java.io.IOException; +import java.io.Serializable; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Objects; +import org.openapitools.jackson.nullable.JsonNullable; + +/** + * Input for org-level security preferences configuration. Note: cross-org operations are not + * supported currently. + */ +@javax.annotation.Generated( + value = "org.openapitools.codegen.languages.JavaClientCodegen", + comments = "Generator version: 7.12.0") +public class SecuritySettingsOrgPreferencesInput implements Serializable { + private static final long serialVersionUID = 1L; + + public static final String SERIALIZED_NAME_ORG_IDENTIFIER = "org_identifier"; + + @SerializedName(SERIALIZED_NAME_ORG_IDENTIFIER) + @javax.annotation.Nonnull + private String orgIdentifier; + + public static final String SERIALIZED_NAME_CORS_WHITELISTED_URLS = "cors_whitelisted_urls"; + + @SerializedName(SERIALIZED_NAME_CORS_WHITELISTED_URLS) + @javax.annotation.Nullable + private List corsWhitelistedUrls; + + public static final String SERIALIZED_NAME_NON_EMBED_ACCESS = "non_embed_access"; + + @SerializedName(SERIALIZED_NAME_NON_EMBED_ACCESS) + @javax.annotation.Nullable + private OrgNonEmbedAccessInput nonEmbedAccess; + + public SecuritySettingsOrgPreferencesInput() {} + + public SecuritySettingsOrgPreferencesInput orgIdentifier( + @javax.annotation.Nonnull String orgIdentifier) { + this.orgIdentifier = orgIdentifier; + return this; + } + + /** + * Unique identifier or name of the org + * + * @return orgIdentifier + */ + @javax.annotation.Nonnull + public String getOrgIdentifier() { + return orgIdentifier; + } + + public void setOrgIdentifier(@javax.annotation.Nonnull String orgIdentifier) { + this.orgIdentifier = orgIdentifier; + } + + public SecuritySettingsOrgPreferencesInput corsWhitelistedUrls( + @javax.annotation.Nullable List corsWhitelistedUrls) { + this.corsWhitelistedUrls = corsWhitelistedUrls; + return this; + } + + public SecuritySettingsOrgPreferencesInput addCorsWhitelistedUrlsItem( + String corsWhitelistedUrlsItem) { + if (this.corsWhitelistedUrls == null) { + this.corsWhitelistedUrls = new ArrayList<>(); + } + this.corsWhitelistedUrls.add(corsWhitelistedUrlsItem); + return this; + } + + /** + * Allowed origins for CORS for this org. + * + * @return corsWhitelistedUrls + */ + @javax.annotation.Nullable + public List getCorsWhitelistedUrls() { + return corsWhitelistedUrls; + } + + public void setCorsWhitelistedUrls( + @javax.annotation.Nullable List corsWhitelistedUrls) { + this.corsWhitelistedUrls = corsWhitelistedUrls; + } + + public SecuritySettingsOrgPreferencesInput nonEmbedAccess( + @javax.annotation.Nullable OrgNonEmbedAccessInput nonEmbedAccess) { + this.nonEmbedAccess = nonEmbedAccess; + return this; + } + + /** + * Get nonEmbedAccess + * + * @return nonEmbedAccess + */ + @javax.annotation.Nullable + public OrgNonEmbedAccessInput getNonEmbedAccess() { + return nonEmbedAccess; + } + + public void setNonEmbedAccess( + @javax.annotation.Nullable OrgNonEmbedAccessInput nonEmbedAccess) { + this.nonEmbedAccess = nonEmbedAccess; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key name of the property + * @param value value of the property + * @return the SecuritySettingsOrgPreferencesInput instance itself + */ + public SecuritySettingsOrgPreferencesInput putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return a map of objects + */ + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key name of the property + * @return an object + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + SecuritySettingsOrgPreferencesInput securitySettingsOrgPreferencesInput = + (SecuritySettingsOrgPreferencesInput) o; + return Objects.equals(this.orgIdentifier, securitySettingsOrgPreferencesInput.orgIdentifier) + && Objects.equals( + this.corsWhitelistedUrls, + securitySettingsOrgPreferencesInput.corsWhitelistedUrls) + && Objects.equals( + this.nonEmbedAccess, securitySettingsOrgPreferencesInput.nonEmbedAccess) + && Objects.equals( + this.additionalProperties, + securitySettingsOrgPreferencesInput.additionalProperties); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b + || (a != null + && b != null + && a.isPresent() + && b.isPresent() + && Objects.deepEquals(a.get(), b.get())); + } + + @Override + public int hashCode() { + return Objects.hash( + orgIdentifier, corsWhitelistedUrls, nonEmbedAccess, additionalProperties); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; + } + return a.isPresent() ? Arrays.deepHashCode(new Object[] {a.get()}) : 31; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class SecuritySettingsOrgPreferencesInput {\n"); + sb.append(" orgIdentifier: ").append(toIndentedString(orgIdentifier)).append("\n"); + sb.append(" corsWhitelistedUrls: ") + .append(toIndentedString(corsWhitelistedUrls)) + .append("\n"); + sb.append(" nonEmbedAccess: ").append(toIndentedString(nonEmbedAccess)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first + * line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("org_identifier"); + openapiFields.add("cors_whitelisted_urls"); + openapiFields.add("non_embed_access"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + openapiRequiredFields.add("org_identifier"); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to + * SecuritySettingsOrgPreferencesInput + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!SecuritySettingsOrgPreferencesInput.openapiRequiredFields + .isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException( + String.format( + "The required field(s) %s in SecuritySettingsOrgPreferencesInput" + + " is not found in the empty JSON string", + SecuritySettingsOrgPreferencesInput.openapiRequiredFields + .toString())); + } + } + + // check to make sure all required properties/fields are present in the JSON string + for (String requiredField : SecuritySettingsOrgPreferencesInput.openapiRequiredFields) { + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException( + String.format( + "The required field `%s` is not found in the JSON string: %s", + requiredField, jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if (!jsonObj.get("org_identifier").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `org_identifier` to be a primitive type in the" + + " JSON string but got `%s`", + jsonObj.get("org_identifier").toString())); + } + // ensure the optional json data is an array if present + if (jsonObj.get("cors_whitelisted_urls") != null + && !jsonObj.get("cors_whitelisted_urls").isJsonNull() + && !jsonObj.get("cors_whitelisted_urls").isJsonArray()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `cors_whitelisted_urls` to be an array in the JSON" + + " string but got `%s`", + jsonObj.get("cors_whitelisted_urls").toString())); + } + // validate the optional field `non_embed_access` + if (jsonObj.get("non_embed_access") != null + && !jsonObj.get("non_embed_access").isJsonNull()) { + OrgNonEmbedAccessInput.validateJsonElement(jsonObj.get("non_embed_access")); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!SecuritySettingsOrgPreferencesInput.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'SecuritySettingsOrgPreferencesInput' and + // its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter = + gson.getDelegateAdapter( + this, TypeToken.get(SecuritySettingsOrgPreferencesInput.class)); + + return (TypeAdapter) + new TypeAdapter() { + @Override + public void write(JsonWriter out, SecuritySettingsOrgPreferencesInput value) + throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + obj.remove("additionalProperties"); + // serialize additional properties + if (value.getAdditionalProperties() != null) { + for (Map.Entry entry : + value.getAdditionalProperties().entrySet()) { + if (entry.getValue() instanceof String) + obj.addProperty(entry.getKey(), (String) entry.getValue()); + else if (entry.getValue() instanceof Number) + obj.addProperty(entry.getKey(), (Number) entry.getValue()); + else if (entry.getValue() instanceof Boolean) + obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); + else if (entry.getValue() instanceof Character) + obj.addProperty( + entry.getKey(), (Character) entry.getValue()); + else { + JsonElement jsonElement = gson.toJsonTree(entry.getValue()); + if (jsonElement.isJsonArray()) { + obj.add(entry.getKey(), jsonElement.getAsJsonArray()); + } else { + obj.add(entry.getKey(), jsonElement.getAsJsonObject()); + } + } + } + } + elementAdapter.write(out, obj); + } + + @Override + public SecuritySettingsOrgPreferencesInput read(JsonReader in) + throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // store additional fields in the deserialized instance + SecuritySettingsOrgPreferencesInput instance = + thisAdapter.fromJsonTree(jsonObj); + for (Map.Entry entry : jsonObj.entrySet()) { + if (!openapiFields.contains(entry.getKey())) { + if (entry.getValue().isJsonPrimitive()) { // primitive type + if (entry.getValue().getAsJsonPrimitive().isString()) + instance.putAdditionalProperty( + entry.getKey(), entry.getValue().getAsString()); + else if (entry.getValue().getAsJsonPrimitive().isNumber()) + instance.putAdditionalProperty( + entry.getKey(), entry.getValue().getAsNumber()); + else if (entry.getValue().getAsJsonPrimitive().isBoolean()) + instance.putAdditionalProperty( + entry.getKey(), + entry.getValue().getAsBoolean()); + else + throw new IllegalArgumentException( + String.format( + "The field `%s` has unknown primitive" + + " type. Value: %s", + entry.getKey(), + entry.getValue().toString())); + } else if (entry.getValue().isJsonArray()) { + instance.putAdditionalProperty( + entry.getKey(), + gson.fromJson(entry.getValue(), List.class)); + } else { // JSON object + instance.putAdditionalProperty( + entry.getKey(), + gson.fromJson(entry.getValue(), HashMap.class)); + } + } + } + return instance; + } + }.nullSafe(); + } + } + + /** + * Create an instance of SecuritySettingsOrgPreferencesInput given an JSON string + * + * @param jsonString JSON string + * @return An instance of SecuritySettingsOrgPreferencesInput + * @throws IOException if the JSON string is invalid with respect to + * SecuritySettingsOrgPreferencesInput + */ + public static SecuritySettingsOrgPreferencesInput fromJson(String jsonString) + throws IOException { + return JSON.getGson().fromJson(jsonString, SecuritySettingsOrgPreferencesInput.class); + } + + /** + * Convert an instance of SecuritySettingsOrgPreferencesInput to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} diff --git a/sdks/java/src/main/java/com/thoughtspot/client/model/SecuritySettingsResponse.java b/sdks/java/src/main/java/com/thoughtspot/client/model/SecuritySettingsResponse.java new file mode 100644 index 000000000..0901901ff --- /dev/null +++ b/sdks/java/src/main/java/com/thoughtspot/client/model/SecuritySettingsResponse.java @@ -0,0 +1,375 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client.model; + +import com.google.gson.Gson; +import com.google.gson.JsonArray; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.TypeAdapter; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.annotations.SerializedName; +import com.google.gson.reflect.TypeToken; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import com.thoughtspot.client.JSON; +import java.io.IOException; +import java.io.Serializable; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Objects; +import org.openapitools.jackson.nullable.JsonNullable; + +/** Response type for security settings search. */ +@javax.annotation.Generated( + value = "org.openapitools.codegen.languages.JavaClientCodegen", + comments = "Generator version: 7.12.0") +public class SecuritySettingsResponse implements Serializable { + private static final long serialVersionUID = 1L; + + public static final String SERIALIZED_NAME_CLUSTER_PREFERENCES = "cluster_preferences"; + + @SerializedName(SERIALIZED_NAME_CLUSTER_PREFERENCES) + @javax.annotation.Nullable + private SecuritySettingsClusterPreferences clusterPreferences; + + public static final String SERIALIZED_NAME_ORG_PREFERENCES = "org_preferences"; + + @SerializedName(SERIALIZED_NAME_ORG_PREFERENCES) + @javax.annotation.Nullable + private List orgPreferences; + + public SecuritySettingsResponse() {} + + public SecuritySettingsResponse clusterPreferences( + @javax.annotation.Nullable SecuritySettingsClusterPreferences clusterPreferences) { + this.clusterPreferences = clusterPreferences; + return this; + } + + /** + * Get clusterPreferences + * + * @return clusterPreferences + */ + @javax.annotation.Nullable + public SecuritySettingsClusterPreferences getClusterPreferences() { + return clusterPreferences; + } + + public void setClusterPreferences( + @javax.annotation.Nullable SecuritySettingsClusterPreferences clusterPreferences) { + this.clusterPreferences = clusterPreferences; + } + + public SecuritySettingsResponse orgPreferences( + @javax.annotation.Nullable List orgPreferences) { + this.orgPreferences = orgPreferences; + return this; + } + + public SecuritySettingsResponse addOrgPreferencesItem( + SecuritySettingsOrgPreferences orgPreferencesItem) { + if (this.orgPreferences == null) { + this.orgPreferences = new ArrayList<>(); + } + this.orgPreferences.add(orgPreferencesItem); + return this; + } + + /** + * Org-level security preferences. + * + * @return orgPreferences + */ + @javax.annotation.Nullable + public List getOrgPreferences() { + return orgPreferences; + } + + public void setOrgPreferences( + @javax.annotation.Nullable List orgPreferences) { + this.orgPreferences = orgPreferences; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key name of the property + * @param value value of the property + * @return the SecuritySettingsResponse instance itself + */ + public SecuritySettingsResponse putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return a map of objects + */ + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key name of the property + * @return an object + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + SecuritySettingsResponse securitySettingsResponse = (SecuritySettingsResponse) o; + return Objects.equals(this.clusterPreferences, securitySettingsResponse.clusterPreferences) + && Objects.equals(this.orgPreferences, securitySettingsResponse.orgPreferences) + && Objects.equals( + this.additionalProperties, securitySettingsResponse.additionalProperties); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b + || (a != null + && b != null + && a.isPresent() + && b.isPresent() + && Objects.deepEquals(a.get(), b.get())); + } + + @Override + public int hashCode() { + return Objects.hash(clusterPreferences, orgPreferences, additionalProperties); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; + } + return a.isPresent() ? Arrays.deepHashCode(new Object[] {a.get()}) : 31; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class SecuritySettingsResponse {\n"); + sb.append(" clusterPreferences: ") + .append(toIndentedString(clusterPreferences)) + .append("\n"); + sb.append(" orgPreferences: ").append(toIndentedString(orgPreferences)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first + * line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("cluster_preferences"); + openapiFields.add("org_preferences"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to SecuritySettingsResponse + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!SecuritySettingsResponse.openapiRequiredFields + .isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException( + String.format( + "The required field(s) %s in SecuritySettingsResponse is not found" + + " in the empty JSON string", + SecuritySettingsResponse.openapiRequiredFields.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // validate the optional field `cluster_preferences` + if (jsonObj.get("cluster_preferences") != null + && !jsonObj.get("cluster_preferences").isJsonNull()) { + SecuritySettingsClusterPreferences.validateJsonElement( + jsonObj.get("cluster_preferences")); + } + if (jsonObj.get("org_preferences") != null + && !jsonObj.get("org_preferences").isJsonNull()) { + JsonArray jsonArrayorgPreferences = jsonObj.getAsJsonArray("org_preferences"); + if (jsonArrayorgPreferences != null) { + // ensure the json data is an array + if (!jsonObj.get("org_preferences").isJsonArray()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `org_preferences` to be an array in the" + + " JSON string but got `%s`", + jsonObj.get("org_preferences").toString())); + } + + // validate the optional field `org_preferences` (array) + for (int i = 0; i < jsonArrayorgPreferences.size(); i++) { + SecuritySettingsOrgPreferences.validateJsonElement( + jsonArrayorgPreferences.get(i)); + } + ; + } + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!SecuritySettingsResponse.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'SecuritySettingsResponse' and its + // subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter = + gson.getDelegateAdapter(this, TypeToken.get(SecuritySettingsResponse.class)); + + return (TypeAdapter) + new TypeAdapter() { + @Override + public void write(JsonWriter out, SecuritySettingsResponse value) + throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + obj.remove("additionalProperties"); + // serialize additional properties + if (value.getAdditionalProperties() != null) { + for (Map.Entry entry : + value.getAdditionalProperties().entrySet()) { + if (entry.getValue() instanceof String) + obj.addProperty(entry.getKey(), (String) entry.getValue()); + else if (entry.getValue() instanceof Number) + obj.addProperty(entry.getKey(), (Number) entry.getValue()); + else if (entry.getValue() instanceof Boolean) + obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); + else if (entry.getValue() instanceof Character) + obj.addProperty( + entry.getKey(), (Character) entry.getValue()); + else { + JsonElement jsonElement = gson.toJsonTree(entry.getValue()); + if (jsonElement.isJsonArray()) { + obj.add(entry.getKey(), jsonElement.getAsJsonArray()); + } else { + obj.add(entry.getKey(), jsonElement.getAsJsonObject()); + } + } + } + } + elementAdapter.write(out, obj); + } + + @Override + public SecuritySettingsResponse read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // store additional fields in the deserialized instance + SecuritySettingsResponse instance = thisAdapter.fromJsonTree(jsonObj); + for (Map.Entry entry : jsonObj.entrySet()) { + if (!openapiFields.contains(entry.getKey())) { + if (entry.getValue().isJsonPrimitive()) { // primitive type + if (entry.getValue().getAsJsonPrimitive().isString()) + instance.putAdditionalProperty( + entry.getKey(), entry.getValue().getAsString()); + else if (entry.getValue().getAsJsonPrimitive().isNumber()) + instance.putAdditionalProperty( + entry.getKey(), entry.getValue().getAsNumber()); + else if (entry.getValue().getAsJsonPrimitive().isBoolean()) + instance.putAdditionalProperty( + entry.getKey(), + entry.getValue().getAsBoolean()); + else + throw new IllegalArgumentException( + String.format( + "The field `%s` has unknown primitive" + + " type. Value: %s", + entry.getKey(), + entry.getValue().toString())); + } else if (entry.getValue().isJsonArray()) { + instance.putAdditionalProperty( + entry.getKey(), + gson.fromJson(entry.getValue(), List.class)); + } else { // JSON object + instance.putAdditionalProperty( + entry.getKey(), + gson.fromJson(entry.getValue(), HashMap.class)); + } + } + } + return instance; + } + }.nullSafe(); + } + } + + /** + * Create an instance of SecuritySettingsResponse given an JSON string + * + * @param jsonString JSON string + * @return An instance of SecuritySettingsResponse + * @throws IOException if the JSON string is invalid with respect to SecuritySettingsResponse + */ + public static SecuritySettingsResponse fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, SecuritySettingsResponse.class); + } + + /** + * Convert an instance of SecuritySettingsResponse to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} diff --git a/sdks/java/src/main/java/com/thoughtspot/client/model/SendAgentConversationMessageRequest.java b/sdks/java/src/main/java/com/thoughtspot/client/model/SendAgentConversationMessageRequest.java new file mode 100644 index 000000000..6fcd1e08d --- /dev/null +++ b/sdks/java/src/main/java/com/thoughtspot/client/model/SendAgentConversationMessageRequest.java @@ -0,0 +1,327 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client.model; + +import com.google.gson.Gson; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.TypeAdapter; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.annotations.SerializedName; +import com.google.gson.reflect.TypeToken; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import com.thoughtspot.client.JSON; +import java.io.IOException; +import java.io.Serializable; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Objects; + +/** SendAgentConversationMessageRequest */ +@javax.annotation.Generated( + value = "org.openapitools.codegen.languages.JavaClientCodegen", + comments = "Generator version: 7.12.0") +public class SendAgentConversationMessageRequest implements Serializable { + private static final long serialVersionUID = 1L; + + public static final String SERIALIZED_NAME_MESSAGES = "messages"; + + @SerializedName(SERIALIZED_NAME_MESSAGES) + @javax.annotation.Nonnull + private List messages; + + public SendAgentConversationMessageRequest() {} + + public SendAgentConversationMessageRequest messages( + @javax.annotation.Nonnull List messages) { + this.messages = messages; + return this; + } + + public SendAgentConversationMessageRequest addMessagesItem(String messagesItem) { + if (this.messages == null) { + this.messages = new ArrayList<>(); + } + this.messages.add(messagesItem); + return this; + } + + /** + * messages to be sent to the agent + * + * @return messages + */ + @javax.annotation.Nonnull + public List getMessages() { + return messages; + } + + public void setMessages(@javax.annotation.Nonnull List messages) { + this.messages = messages; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key name of the property + * @param value value of the property + * @return the SendAgentConversationMessageRequest instance itself + */ + public SendAgentConversationMessageRequest putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return a map of objects + */ + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key name of the property + * @return an object + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + SendAgentConversationMessageRequest sendAgentConversationMessageRequest = + (SendAgentConversationMessageRequest) o; + return Objects.equals(this.messages, sendAgentConversationMessageRequest.messages) + && Objects.equals( + this.additionalProperties, + sendAgentConversationMessageRequest.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(messages, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class SendAgentConversationMessageRequest {\n"); + sb.append(" messages: ").append(toIndentedString(messages)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first + * line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("messages"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + openapiRequiredFields.add("messages"); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to + * SendAgentConversationMessageRequest + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!SendAgentConversationMessageRequest.openapiRequiredFields + .isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException( + String.format( + "The required field(s) %s in SendAgentConversationMessageRequest" + + " is not found in the empty JSON string", + SendAgentConversationMessageRequest.openapiRequiredFields + .toString())); + } + } + + // check to make sure all required properties/fields are present in the JSON string + for (String requiredField : SendAgentConversationMessageRequest.openapiRequiredFields) { + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException( + String.format( + "The required field `%s` is not found in the JSON string: %s", + requiredField, jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // ensure the required json array is present + if (jsonObj.get("messages") == null) { + throw new IllegalArgumentException( + "Expected the field `linkedContent` to be an array in the JSON string but got" + + " `null`"); + } else if (!jsonObj.get("messages").isJsonArray()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `messages` to be an array in the JSON string but" + + " got `%s`", + jsonObj.get("messages").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!SendAgentConversationMessageRequest.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'SendAgentConversationMessageRequest' and + // its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter = + gson.getDelegateAdapter( + this, TypeToken.get(SendAgentConversationMessageRequest.class)); + + return (TypeAdapter) + new TypeAdapter() { + @Override + public void write(JsonWriter out, SendAgentConversationMessageRequest value) + throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + obj.remove("additionalProperties"); + // serialize additional properties + if (value.getAdditionalProperties() != null) { + for (Map.Entry entry : + value.getAdditionalProperties().entrySet()) { + if (entry.getValue() instanceof String) + obj.addProperty(entry.getKey(), (String) entry.getValue()); + else if (entry.getValue() instanceof Number) + obj.addProperty(entry.getKey(), (Number) entry.getValue()); + else if (entry.getValue() instanceof Boolean) + obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); + else if (entry.getValue() instanceof Character) + obj.addProperty( + entry.getKey(), (Character) entry.getValue()); + else { + JsonElement jsonElement = gson.toJsonTree(entry.getValue()); + if (jsonElement.isJsonArray()) { + obj.add(entry.getKey(), jsonElement.getAsJsonArray()); + } else { + obj.add(entry.getKey(), jsonElement.getAsJsonObject()); + } + } + } + } + elementAdapter.write(out, obj); + } + + @Override + public SendAgentConversationMessageRequest read(JsonReader in) + throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // store additional fields in the deserialized instance + SendAgentConversationMessageRequest instance = + thisAdapter.fromJsonTree(jsonObj); + for (Map.Entry entry : jsonObj.entrySet()) { + if (!openapiFields.contains(entry.getKey())) { + if (entry.getValue().isJsonPrimitive()) { // primitive type + if (entry.getValue().getAsJsonPrimitive().isString()) + instance.putAdditionalProperty( + entry.getKey(), entry.getValue().getAsString()); + else if (entry.getValue().getAsJsonPrimitive().isNumber()) + instance.putAdditionalProperty( + entry.getKey(), entry.getValue().getAsNumber()); + else if (entry.getValue().getAsJsonPrimitive().isBoolean()) + instance.putAdditionalProperty( + entry.getKey(), + entry.getValue().getAsBoolean()); + else + throw new IllegalArgumentException( + String.format( + "The field `%s` has unknown primitive" + + " type. Value: %s", + entry.getKey(), + entry.getValue().toString())); + } else if (entry.getValue().isJsonArray()) { + instance.putAdditionalProperty( + entry.getKey(), + gson.fromJson(entry.getValue(), List.class)); + } else { // JSON object + instance.putAdditionalProperty( + entry.getKey(), + gson.fromJson(entry.getValue(), HashMap.class)); + } + } + } + return instance; + } + }.nullSafe(); + } + } + + /** + * Create an instance of SendAgentConversationMessageRequest given an JSON string + * + * @param jsonString JSON string + * @return An instance of SendAgentConversationMessageRequest + * @throws IOException if the JSON string is invalid with respect to + * SendAgentConversationMessageRequest + */ + public static SendAgentConversationMessageRequest fromJson(String jsonString) + throws IOException { + return JSON.getGson().fromJson(jsonString, SendAgentConversationMessageRequest.class); + } + + /** + * Convert an instance of SendAgentConversationMessageRequest to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} diff --git a/sdks/java/src/main/java/com/thoughtspot/client/model/SendAgentConversationMessageStreamingRequest.java b/sdks/java/src/main/java/com/thoughtspot/client/model/SendAgentConversationMessageStreamingRequest.java new file mode 100644 index 000000000..c90b84f4a --- /dev/null +++ b/sdks/java/src/main/java/com/thoughtspot/client/model/SendAgentConversationMessageStreamingRequest.java @@ -0,0 +1,334 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client.model; + +import com.google.gson.Gson; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.TypeAdapter; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.annotations.SerializedName; +import com.google.gson.reflect.TypeToken; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import com.thoughtspot.client.JSON; +import java.io.IOException; +import java.io.Serializable; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Objects; + +/** SendAgentConversationMessageStreamingRequest */ +@javax.annotation.Generated( + value = "org.openapitools.codegen.languages.JavaClientCodegen", + comments = "Generator version: 7.12.0") +public class SendAgentConversationMessageStreamingRequest implements Serializable { + private static final long serialVersionUID = 1L; + + public static final String SERIALIZED_NAME_MESSAGES = "messages"; + + @SerializedName(SERIALIZED_NAME_MESSAGES) + @javax.annotation.Nonnull + private List messages; + + public SendAgentConversationMessageStreamingRequest() {} + + public SendAgentConversationMessageStreamingRequest messages( + @javax.annotation.Nonnull List messages) { + this.messages = messages; + return this; + } + + public SendAgentConversationMessageStreamingRequest addMessagesItem(String messagesItem) { + if (this.messages == null) { + this.messages = new ArrayList<>(); + } + this.messages.add(messagesItem); + return this; + } + + /** + * messages to be sent to the agent + * + * @return messages + */ + @javax.annotation.Nonnull + public List getMessages() { + return messages; + } + + public void setMessages(@javax.annotation.Nonnull List messages) { + this.messages = messages; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key name of the property + * @param value value of the property + * @return the SendAgentConversationMessageStreamingRequest instance itself + */ + public SendAgentConversationMessageStreamingRequest putAdditionalProperty( + String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return a map of objects + */ + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key name of the property + * @return an object + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + SendAgentConversationMessageStreamingRequest sendAgentConversationMessageStreamingRequest = + (SendAgentConversationMessageStreamingRequest) o; + return Objects.equals(this.messages, sendAgentConversationMessageStreamingRequest.messages) + && Objects.equals( + this.additionalProperties, + sendAgentConversationMessageStreamingRequest.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(messages, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class SendAgentConversationMessageStreamingRequest {\n"); + sb.append(" messages: ").append(toIndentedString(messages)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first + * line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("messages"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + openapiRequiredFields.add("messages"); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to + * SendAgentConversationMessageStreamingRequest + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!SendAgentConversationMessageStreamingRequest.openapiRequiredFields + .isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException( + String.format( + "The required field(s) %s in" + + " SendAgentConversationMessageStreamingRequest is not found" + + " in the empty JSON string", + SendAgentConversationMessageStreamingRequest.openapiRequiredFields + .toString())); + } + } + + // check to make sure all required properties/fields are present in the JSON string + for (String requiredField : + SendAgentConversationMessageStreamingRequest.openapiRequiredFields) { + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException( + String.format( + "The required field `%s` is not found in the JSON string: %s", + requiredField, jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // ensure the required json array is present + if (jsonObj.get("messages") == null) { + throw new IllegalArgumentException( + "Expected the field `linkedContent` to be an array in the JSON string but got" + + " `null`"); + } else if (!jsonObj.get("messages").isJsonArray()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `messages` to be an array in the JSON string but" + + " got `%s`", + jsonObj.get("messages").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!SendAgentConversationMessageStreamingRequest.class.isAssignableFrom( + type.getRawType())) { + return null; // this class only serializes + // 'SendAgentConversationMessageStreamingRequest' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter = + gson.getDelegateAdapter( + this, + TypeToken.get(SendAgentConversationMessageStreamingRequest.class)); + + return (TypeAdapter) + new TypeAdapter() { + @Override + public void write( + JsonWriter out, SendAgentConversationMessageStreamingRequest value) + throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + obj.remove("additionalProperties"); + // serialize additional properties + if (value.getAdditionalProperties() != null) { + for (Map.Entry entry : + value.getAdditionalProperties().entrySet()) { + if (entry.getValue() instanceof String) + obj.addProperty(entry.getKey(), (String) entry.getValue()); + else if (entry.getValue() instanceof Number) + obj.addProperty(entry.getKey(), (Number) entry.getValue()); + else if (entry.getValue() instanceof Boolean) + obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); + else if (entry.getValue() instanceof Character) + obj.addProperty( + entry.getKey(), (Character) entry.getValue()); + else { + JsonElement jsonElement = gson.toJsonTree(entry.getValue()); + if (jsonElement.isJsonArray()) { + obj.add(entry.getKey(), jsonElement.getAsJsonArray()); + } else { + obj.add(entry.getKey(), jsonElement.getAsJsonObject()); + } + } + } + } + elementAdapter.write(out, obj); + } + + @Override + public SendAgentConversationMessageStreamingRequest read(JsonReader in) + throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // store additional fields in the deserialized instance + SendAgentConversationMessageStreamingRequest instance = + thisAdapter.fromJsonTree(jsonObj); + for (Map.Entry entry : jsonObj.entrySet()) { + if (!openapiFields.contains(entry.getKey())) { + if (entry.getValue().isJsonPrimitive()) { // primitive type + if (entry.getValue().getAsJsonPrimitive().isString()) + instance.putAdditionalProperty( + entry.getKey(), entry.getValue().getAsString()); + else if (entry.getValue().getAsJsonPrimitive().isNumber()) + instance.putAdditionalProperty( + entry.getKey(), entry.getValue().getAsNumber()); + else if (entry.getValue().getAsJsonPrimitive().isBoolean()) + instance.putAdditionalProperty( + entry.getKey(), + entry.getValue().getAsBoolean()); + else + throw new IllegalArgumentException( + String.format( + "The field `%s` has unknown primitive" + + " type. Value: %s", + entry.getKey(), + entry.getValue().toString())); + } else if (entry.getValue().isJsonArray()) { + instance.putAdditionalProperty( + entry.getKey(), + gson.fromJson(entry.getValue(), List.class)); + } else { // JSON object + instance.putAdditionalProperty( + entry.getKey(), + gson.fromJson(entry.getValue(), HashMap.class)); + } + } + } + return instance; + } + }.nullSafe(); + } + } + + /** + * Create an instance of SendAgentConversationMessageStreamingRequest given an JSON string + * + * @param jsonString JSON string + * @return An instance of SendAgentConversationMessageStreamingRequest + * @throws IOException if the JSON string is invalid with respect to + * SendAgentConversationMessageStreamingRequest + */ + public static SendAgentConversationMessageStreamingRequest fromJson(String jsonString) + throws IOException { + return JSON.getGson() + .fromJson(jsonString, SendAgentConversationMessageStreamingRequest.class); + } + + /** + * Convert an instance of SendAgentConversationMessageStreamingRequest to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} diff --git a/sdks/java/src/main/java/com/thoughtspot/client/model/SendAgentMessageRequest.java b/sdks/java/src/main/java/com/thoughtspot/client/model/SendAgentMessageRequest.java new file mode 100644 index 000000000..848c8be9b --- /dev/null +++ b/sdks/java/src/main/java/com/thoughtspot/client/model/SendAgentMessageRequest.java @@ -0,0 +1,317 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client.model; + +import com.google.gson.Gson; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.TypeAdapter; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.annotations.SerializedName; +import com.google.gson.reflect.TypeToken; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import com.thoughtspot.client.JSON; +import java.io.IOException; +import java.io.Serializable; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Objects; + +/** SendAgentMessageRequest */ +@javax.annotation.Generated( + value = "org.openapitools.codegen.languages.JavaClientCodegen", + comments = "Generator version: 7.12.0") +public class SendAgentMessageRequest implements Serializable { + private static final long serialVersionUID = 1L; + + public static final String SERIALIZED_NAME_MESSAGES = "messages"; + + @SerializedName(SERIALIZED_NAME_MESSAGES) + @javax.annotation.Nonnull + private List messages; + + public SendAgentMessageRequest() {} + + public SendAgentMessageRequest messages(@javax.annotation.Nonnull List messages) { + this.messages = messages; + return this; + } + + public SendAgentMessageRequest addMessagesItem(String messagesItem) { + if (this.messages == null) { + this.messages = new ArrayList<>(); + } + this.messages.add(messagesItem); + return this; + } + + /** + * messages to be sent to the agent + * + * @return messages + */ + @javax.annotation.Nonnull + public List getMessages() { + return messages; + } + + public void setMessages(@javax.annotation.Nonnull List messages) { + this.messages = messages; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key name of the property + * @param value value of the property + * @return the SendAgentMessageRequest instance itself + */ + public SendAgentMessageRequest putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return a map of objects + */ + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key name of the property + * @return an object + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + SendAgentMessageRequest sendAgentMessageRequest = (SendAgentMessageRequest) o; + return Objects.equals(this.messages, sendAgentMessageRequest.messages) + && Objects.equals( + this.additionalProperties, sendAgentMessageRequest.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(messages, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class SendAgentMessageRequest {\n"); + sb.append(" messages: ").append(toIndentedString(messages)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first + * line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("messages"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + openapiRequiredFields.add("messages"); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to SendAgentMessageRequest + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!SendAgentMessageRequest.openapiRequiredFields + .isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException( + String.format( + "The required field(s) %s in SendAgentMessageRequest is not found" + + " in the empty JSON string", + SendAgentMessageRequest.openapiRequiredFields.toString())); + } + } + + // check to make sure all required properties/fields are present in the JSON string + for (String requiredField : SendAgentMessageRequest.openapiRequiredFields) { + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException( + String.format( + "The required field `%s` is not found in the JSON string: %s", + requiredField, jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // ensure the required json array is present + if (jsonObj.get("messages") == null) { + throw new IllegalArgumentException( + "Expected the field `linkedContent` to be an array in the JSON string but got" + + " `null`"); + } else if (!jsonObj.get("messages").isJsonArray()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `messages` to be an array in the JSON string but" + + " got `%s`", + jsonObj.get("messages").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!SendAgentMessageRequest.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'SendAgentMessageRequest' and its + // subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter = + gson.getDelegateAdapter(this, TypeToken.get(SendAgentMessageRequest.class)); + + return (TypeAdapter) + new TypeAdapter() { + @Override + public void write(JsonWriter out, SendAgentMessageRequest value) + throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + obj.remove("additionalProperties"); + // serialize additional properties + if (value.getAdditionalProperties() != null) { + for (Map.Entry entry : + value.getAdditionalProperties().entrySet()) { + if (entry.getValue() instanceof String) + obj.addProperty(entry.getKey(), (String) entry.getValue()); + else if (entry.getValue() instanceof Number) + obj.addProperty(entry.getKey(), (Number) entry.getValue()); + else if (entry.getValue() instanceof Boolean) + obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); + else if (entry.getValue() instanceof Character) + obj.addProperty( + entry.getKey(), (Character) entry.getValue()); + else { + JsonElement jsonElement = gson.toJsonTree(entry.getValue()); + if (jsonElement.isJsonArray()) { + obj.add(entry.getKey(), jsonElement.getAsJsonArray()); + } else { + obj.add(entry.getKey(), jsonElement.getAsJsonObject()); + } + } + } + } + elementAdapter.write(out, obj); + } + + @Override + public SendAgentMessageRequest read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // store additional fields in the deserialized instance + SendAgentMessageRequest instance = thisAdapter.fromJsonTree(jsonObj); + for (Map.Entry entry : jsonObj.entrySet()) { + if (!openapiFields.contains(entry.getKey())) { + if (entry.getValue().isJsonPrimitive()) { // primitive type + if (entry.getValue().getAsJsonPrimitive().isString()) + instance.putAdditionalProperty( + entry.getKey(), entry.getValue().getAsString()); + else if (entry.getValue().getAsJsonPrimitive().isNumber()) + instance.putAdditionalProperty( + entry.getKey(), entry.getValue().getAsNumber()); + else if (entry.getValue().getAsJsonPrimitive().isBoolean()) + instance.putAdditionalProperty( + entry.getKey(), + entry.getValue().getAsBoolean()); + else + throw new IllegalArgumentException( + String.format( + "The field `%s` has unknown primitive" + + " type. Value: %s", + entry.getKey(), + entry.getValue().toString())); + } else if (entry.getValue().isJsonArray()) { + instance.putAdditionalProperty( + entry.getKey(), + gson.fromJson(entry.getValue(), List.class)); + } else { // JSON object + instance.putAdditionalProperty( + entry.getKey(), + gson.fromJson(entry.getValue(), HashMap.class)); + } + } + } + return instance; + } + }.nullSafe(); + } + } + + /** + * Create an instance of SendAgentMessageRequest given an JSON string + * + * @param jsonString JSON string + * @return An instance of SendAgentMessageRequest + * @throws IOException if the JSON string is invalid with respect to SendAgentMessageRequest + */ + public static SendAgentMessageRequest fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, SendAgentMessageRequest.class); + } + + /** + * Convert an instance of SendAgentMessageRequest to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} diff --git a/sdks/java/src/main/java/com/thoughtspot/client/model/SendAgentMessageResponse.java b/sdks/java/src/main/java/com/thoughtspot/client/model/SendAgentMessageResponse.java new file mode 100644 index 000000000..75b677780 --- /dev/null +++ b/sdks/java/src/main/java/com/thoughtspot/client/model/SendAgentMessageResponse.java @@ -0,0 +1,350 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client.model; + +import com.google.gson.Gson; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.TypeAdapter; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.annotations.SerializedName; +import com.google.gson.reflect.TypeToken; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import com.thoughtspot.client.JSON; +import java.io.IOException; +import java.io.Serializable; +import java.util.Arrays; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Objects; +import org.openapitools.jackson.nullable.JsonNullable; + +/** SendAgentMessageResponse */ +@javax.annotation.Generated( + value = "org.openapitools.codegen.languages.JavaClientCodegen", + comments = "Generator version: 7.12.0") +public class SendAgentMessageResponse implements Serializable { + private static final long serialVersionUID = 1L; + + public static final String SERIALIZED_NAME_SUCCESS = "success"; + + @SerializedName(SERIALIZED_NAME_SUCCESS) + @javax.annotation.Nonnull + private Boolean success; + + public static final String SERIALIZED_NAME_MESSAGE = "message"; + + @SerializedName(SERIALIZED_NAME_MESSAGE) + @javax.annotation.Nullable + private String message; + + public SendAgentMessageResponse() {} + + public SendAgentMessageResponse success(@javax.annotation.Nonnull Boolean success) { + this.success = success; + return this; + } + + /** + * Indicates whether the agent response was received and processed successfully. + * + * @return success + */ + @javax.annotation.Nonnull + public Boolean getSuccess() { + return success; + } + + public void setSuccess(@javax.annotation.Nonnull Boolean success) { + this.success = success; + } + + public SendAgentMessageResponse message(@javax.annotation.Nullable String message) { + this.message = message; + return this; + } + + /** + * Optional message providing additional context about the operation outcome. + * + * @return message + */ + @javax.annotation.Nullable + public String getMessage() { + return message; + } + + public void setMessage(@javax.annotation.Nullable String message) { + this.message = message; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key name of the property + * @param value value of the property + * @return the SendAgentMessageResponse instance itself + */ + public SendAgentMessageResponse putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return a map of objects + */ + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key name of the property + * @return an object + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + SendAgentMessageResponse sendAgentMessageResponse = (SendAgentMessageResponse) o; + return Objects.equals(this.success, sendAgentMessageResponse.success) + && Objects.equals(this.message, sendAgentMessageResponse.message) + && Objects.equals( + this.additionalProperties, sendAgentMessageResponse.additionalProperties); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b + || (a != null + && b != null + && a.isPresent() + && b.isPresent() + && Objects.deepEquals(a.get(), b.get())); + } + + @Override + public int hashCode() { + return Objects.hash(success, message, additionalProperties); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; + } + return a.isPresent() ? Arrays.deepHashCode(new Object[] {a.get()}) : 31; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class SendAgentMessageResponse {\n"); + sb.append(" success: ").append(toIndentedString(success)).append("\n"); + sb.append(" message: ").append(toIndentedString(message)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first + * line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("success"); + openapiFields.add("message"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + openapiRequiredFields.add("success"); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to SendAgentMessageResponse + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!SendAgentMessageResponse.openapiRequiredFields + .isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException( + String.format( + "The required field(s) %s in SendAgentMessageResponse is not found" + + " in the empty JSON string", + SendAgentMessageResponse.openapiRequiredFields.toString())); + } + } + + // check to make sure all required properties/fields are present in the JSON string + for (String requiredField : SendAgentMessageResponse.openapiRequiredFields) { + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException( + String.format( + "The required field `%s` is not found in the JSON string: %s", + requiredField, jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if ((jsonObj.get("message") != null && !jsonObj.get("message").isJsonNull()) + && !jsonObj.get("message").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `message` to be a primitive type in the JSON" + + " string but got `%s`", + jsonObj.get("message").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!SendAgentMessageResponse.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'SendAgentMessageResponse' and its + // subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter = + gson.getDelegateAdapter(this, TypeToken.get(SendAgentMessageResponse.class)); + + return (TypeAdapter) + new TypeAdapter() { + @Override + public void write(JsonWriter out, SendAgentMessageResponse value) + throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + obj.remove("additionalProperties"); + // serialize additional properties + if (value.getAdditionalProperties() != null) { + for (Map.Entry entry : + value.getAdditionalProperties().entrySet()) { + if (entry.getValue() instanceof String) + obj.addProperty(entry.getKey(), (String) entry.getValue()); + else if (entry.getValue() instanceof Number) + obj.addProperty(entry.getKey(), (Number) entry.getValue()); + else if (entry.getValue() instanceof Boolean) + obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); + else if (entry.getValue() instanceof Character) + obj.addProperty( + entry.getKey(), (Character) entry.getValue()); + else { + JsonElement jsonElement = gson.toJsonTree(entry.getValue()); + if (jsonElement.isJsonArray()) { + obj.add(entry.getKey(), jsonElement.getAsJsonArray()); + } else { + obj.add(entry.getKey(), jsonElement.getAsJsonObject()); + } + } + } + } + elementAdapter.write(out, obj); + } + + @Override + public SendAgentMessageResponse read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // store additional fields in the deserialized instance + SendAgentMessageResponse instance = thisAdapter.fromJsonTree(jsonObj); + for (Map.Entry entry : jsonObj.entrySet()) { + if (!openapiFields.contains(entry.getKey())) { + if (entry.getValue().isJsonPrimitive()) { // primitive type + if (entry.getValue().getAsJsonPrimitive().isString()) + instance.putAdditionalProperty( + entry.getKey(), entry.getValue().getAsString()); + else if (entry.getValue().getAsJsonPrimitive().isNumber()) + instance.putAdditionalProperty( + entry.getKey(), entry.getValue().getAsNumber()); + else if (entry.getValue().getAsJsonPrimitive().isBoolean()) + instance.putAdditionalProperty( + entry.getKey(), + entry.getValue().getAsBoolean()); + else + throw new IllegalArgumentException( + String.format( + "The field `%s` has unknown primitive" + + " type. Value: %s", + entry.getKey(), + entry.getValue().toString())); + } else if (entry.getValue().isJsonArray()) { + instance.putAdditionalProperty( + entry.getKey(), + gson.fromJson(entry.getValue(), List.class)); + } else { // JSON object + instance.putAdditionalProperty( + entry.getKey(), + gson.fromJson(entry.getValue(), HashMap.class)); + } + } + } + return instance; + } + }.nullSafe(); + } + } + + /** + * Create an instance of SendAgentMessageResponse given an JSON string + * + * @param jsonString JSON string + * @return An instance of SendAgentMessageResponse + * @throws IOException if the JSON string is invalid with respect to SendAgentMessageResponse + */ + public static SendAgentMessageResponse fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, SendAgentMessageResponse.class); + } + + /** + * Convert an instance of SendAgentMessageResponse to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} diff --git a/sdks/java/src/main/java/com/thoughtspot/client/model/SendAgentMessageStreamingRequest.java b/sdks/java/src/main/java/com/thoughtspot/client/model/SendAgentMessageStreamingRequest.java new file mode 100644 index 000000000..f4ab7d43f --- /dev/null +++ b/sdks/java/src/main/java/com/thoughtspot/client/model/SendAgentMessageStreamingRequest.java @@ -0,0 +1,366 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client.model; + +import com.google.gson.Gson; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.TypeAdapter; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.annotations.SerializedName; +import com.google.gson.reflect.TypeToken; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import com.thoughtspot.client.JSON; +import java.io.IOException; +import java.io.Serializable; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Objects; + +/** SendAgentMessageStreamingRequest */ +@javax.annotation.Generated( + value = "org.openapitools.codegen.languages.JavaClientCodegen", + comments = "Generator version: 7.12.0") +public class SendAgentMessageStreamingRequest implements Serializable { + private static final long serialVersionUID = 1L; + + public static final String SERIALIZED_NAME_CONVERSATION_IDENTIFIER = "conversation_identifier"; + + @SerializedName(SERIALIZED_NAME_CONVERSATION_IDENTIFIER) + @javax.annotation.Nonnull + private String conversationIdentifier; + + public static final String SERIALIZED_NAME_MESSAGES = "messages"; + + @SerializedName(SERIALIZED_NAME_MESSAGES) + @javax.annotation.Nonnull + private List messages; + + public SendAgentMessageStreamingRequest() {} + + public SendAgentMessageStreamingRequest conversationIdentifier( + @javax.annotation.Nonnull String conversationIdentifier) { + this.conversationIdentifier = conversationIdentifier; + return this; + } + + /** + * Unique identifier for the conversation (used to track context) + * + * @return conversationIdentifier + */ + @javax.annotation.Nonnull + public String getConversationIdentifier() { + return conversationIdentifier; + } + + public void setConversationIdentifier(@javax.annotation.Nonnull String conversationIdentifier) { + this.conversationIdentifier = conversationIdentifier; + } + + public SendAgentMessageStreamingRequest messages( + @javax.annotation.Nonnull List messages) { + this.messages = messages; + return this; + } + + public SendAgentMessageStreamingRequest addMessagesItem(String messagesItem) { + if (this.messages == null) { + this.messages = new ArrayList<>(); + } + this.messages.add(messagesItem); + return this; + } + + /** + * messages to be sent to the agent + * + * @return messages + */ + @javax.annotation.Nonnull + public List getMessages() { + return messages; + } + + public void setMessages(@javax.annotation.Nonnull List messages) { + this.messages = messages; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key name of the property + * @param value value of the property + * @return the SendAgentMessageStreamingRequest instance itself + */ + public SendAgentMessageStreamingRequest putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return a map of objects + */ + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key name of the property + * @return an object + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + SendAgentMessageStreamingRequest sendAgentMessageStreamingRequest = + (SendAgentMessageStreamingRequest) o; + return Objects.equals( + this.conversationIdentifier, + sendAgentMessageStreamingRequest.conversationIdentifier) + && Objects.equals(this.messages, sendAgentMessageStreamingRequest.messages) + && Objects.equals( + this.additionalProperties, + sendAgentMessageStreamingRequest.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(conversationIdentifier, messages, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class SendAgentMessageStreamingRequest {\n"); + sb.append(" conversationIdentifier: ") + .append(toIndentedString(conversationIdentifier)) + .append("\n"); + sb.append(" messages: ").append(toIndentedString(messages)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first + * line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("conversation_identifier"); + openapiFields.add("messages"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + openapiRequiredFields.add("conversation_identifier"); + openapiRequiredFields.add("messages"); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to + * SendAgentMessageStreamingRequest + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!SendAgentMessageStreamingRequest.openapiRequiredFields + .isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException( + String.format( + "The required field(s) %s in SendAgentMessageStreamingRequest is" + + " not found in the empty JSON string", + SendAgentMessageStreamingRequest.openapiRequiredFields.toString())); + } + } + + // check to make sure all required properties/fields are present in the JSON string + for (String requiredField : SendAgentMessageStreamingRequest.openapiRequiredFields) { + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException( + String.format( + "The required field `%s` is not found in the JSON string: %s", + requiredField, jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if (!jsonObj.get("conversation_identifier").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `conversation_identifier` to be a primitive type" + + " in the JSON string but got `%s`", + jsonObj.get("conversation_identifier").toString())); + } + // ensure the required json array is present + if (jsonObj.get("messages") == null) { + throw new IllegalArgumentException( + "Expected the field `linkedContent` to be an array in the JSON string but got" + + " `null`"); + } else if (!jsonObj.get("messages").isJsonArray()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `messages` to be an array in the JSON string but" + + " got `%s`", + jsonObj.get("messages").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!SendAgentMessageStreamingRequest.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'SendAgentMessageStreamingRequest' and + // its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter = + gson.getDelegateAdapter( + this, TypeToken.get(SendAgentMessageStreamingRequest.class)); + + return (TypeAdapter) + new TypeAdapter() { + @Override + public void write(JsonWriter out, SendAgentMessageStreamingRequest value) + throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + obj.remove("additionalProperties"); + // serialize additional properties + if (value.getAdditionalProperties() != null) { + for (Map.Entry entry : + value.getAdditionalProperties().entrySet()) { + if (entry.getValue() instanceof String) + obj.addProperty(entry.getKey(), (String) entry.getValue()); + else if (entry.getValue() instanceof Number) + obj.addProperty(entry.getKey(), (Number) entry.getValue()); + else if (entry.getValue() instanceof Boolean) + obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); + else if (entry.getValue() instanceof Character) + obj.addProperty( + entry.getKey(), (Character) entry.getValue()); + else { + JsonElement jsonElement = gson.toJsonTree(entry.getValue()); + if (jsonElement.isJsonArray()) { + obj.add(entry.getKey(), jsonElement.getAsJsonArray()); + } else { + obj.add(entry.getKey(), jsonElement.getAsJsonObject()); + } + } + } + } + elementAdapter.write(out, obj); + } + + @Override + public SendAgentMessageStreamingRequest read(JsonReader in) + throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // store additional fields in the deserialized instance + SendAgentMessageStreamingRequest instance = + thisAdapter.fromJsonTree(jsonObj); + for (Map.Entry entry : jsonObj.entrySet()) { + if (!openapiFields.contains(entry.getKey())) { + if (entry.getValue().isJsonPrimitive()) { // primitive type + if (entry.getValue().getAsJsonPrimitive().isString()) + instance.putAdditionalProperty( + entry.getKey(), entry.getValue().getAsString()); + else if (entry.getValue().getAsJsonPrimitive().isNumber()) + instance.putAdditionalProperty( + entry.getKey(), entry.getValue().getAsNumber()); + else if (entry.getValue().getAsJsonPrimitive().isBoolean()) + instance.putAdditionalProperty( + entry.getKey(), + entry.getValue().getAsBoolean()); + else + throw new IllegalArgumentException( + String.format( + "The field `%s` has unknown primitive" + + " type. Value: %s", + entry.getKey(), + entry.getValue().toString())); + } else if (entry.getValue().isJsonArray()) { + instance.putAdditionalProperty( + entry.getKey(), + gson.fromJson(entry.getValue(), List.class)); + } else { // JSON object + instance.putAdditionalProperty( + entry.getKey(), + gson.fromJson(entry.getValue(), HashMap.class)); + } + } + } + return instance; + } + }.nullSafe(); + } + } + + /** + * Create an instance of SendAgentMessageStreamingRequest given an JSON string + * + * @param jsonString JSON string + * @return An instance of SendAgentMessageStreamingRequest + * @throws IOException if the JSON string is invalid with respect to + * SendAgentMessageStreamingRequest + */ + public static SendAgentMessageStreamingRequest fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, SendAgentMessageStreamingRequest.class); + } + + /** + * Convert an instance of SendAgentMessageStreamingRequest to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} diff --git a/sdks/java/src/main/java/com/thoughtspot/client/model/SendMessageRequest.java b/sdks/java/src/main/java/com/thoughtspot/client/model/SendMessageRequest.java new file mode 100644 index 000000000..6175908f4 --- /dev/null +++ b/sdks/java/src/main/java/com/thoughtspot/client/model/SendMessageRequest.java @@ -0,0 +1,342 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client.model; + +import com.google.gson.Gson; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.TypeAdapter; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.annotations.SerializedName; +import com.google.gson.reflect.TypeToken; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import com.thoughtspot.client.JSON; +import java.io.IOException; +import java.io.Serializable; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Objects; + +/** SendMessageRequest */ +@javax.annotation.Generated( + value = "org.openapitools.codegen.languages.JavaClientCodegen", + comments = "Generator version: 7.12.0") +public class SendMessageRequest implements Serializable { + private static final long serialVersionUID = 1L; + + public static final String SERIALIZED_NAME_METADATA_IDENTIFIER = "metadata_identifier"; + + @SerializedName(SERIALIZED_NAME_METADATA_IDENTIFIER) + @javax.annotation.Nonnull + private String metadataIdentifier; + + public static final String SERIALIZED_NAME_MESSAGE = "message"; + + @SerializedName(SERIALIZED_NAME_MESSAGE) + @javax.annotation.Nonnull + private String message; + + public SendMessageRequest() {} + + public SendMessageRequest metadataIdentifier( + @javax.annotation.Nonnull String metadataIdentifier) { + this.metadataIdentifier = metadataIdentifier; + return this; + } + + /** + * ID of the metadata object, such as a Worksheet or Model, to use as a data source for the + * conversation. + * + * @return metadataIdentifier + */ + @javax.annotation.Nonnull + public String getMetadataIdentifier() { + return metadataIdentifier; + } + + public void setMetadataIdentifier(@javax.annotation.Nonnull String metadataIdentifier) { + this.metadataIdentifier = metadataIdentifier; + } + + public SendMessageRequest message(@javax.annotation.Nonnull String message) { + this.message = message; + return this; + } + + /** + * A message string with the follow-up question to continue the conversation. + * + * @return message + */ + @javax.annotation.Nonnull + public String getMessage() { + return message; + } + + public void setMessage(@javax.annotation.Nonnull String message) { + this.message = message; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key name of the property + * @param value value of the property + * @return the SendMessageRequest instance itself + */ + public SendMessageRequest putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return a map of objects + */ + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key name of the property + * @return an object + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + SendMessageRequest sendMessageRequest = (SendMessageRequest) o; + return Objects.equals(this.metadataIdentifier, sendMessageRequest.metadataIdentifier) + && Objects.equals(this.message, sendMessageRequest.message) + && Objects.equals( + this.additionalProperties, sendMessageRequest.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(metadataIdentifier, message, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class SendMessageRequest {\n"); + sb.append(" metadataIdentifier: ") + .append(toIndentedString(metadataIdentifier)) + .append("\n"); + sb.append(" message: ").append(toIndentedString(message)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first + * line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("metadata_identifier"); + openapiFields.add("message"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + openapiRequiredFields.add("metadata_identifier"); + openapiRequiredFields.add("message"); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to SendMessageRequest + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!SendMessageRequest.openapiRequiredFields + .isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException( + String.format( + "The required field(s) %s in SendMessageRequest is not found in" + + " the empty JSON string", + SendMessageRequest.openapiRequiredFields.toString())); + } + } + + // check to make sure all required properties/fields are present in the JSON string + for (String requiredField : SendMessageRequest.openapiRequiredFields) { + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException( + String.format( + "The required field `%s` is not found in the JSON string: %s", + requiredField, jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if (!jsonObj.get("metadata_identifier").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `metadata_identifier` to be a primitive type in" + + " the JSON string but got `%s`", + jsonObj.get("metadata_identifier").toString())); + } + if (!jsonObj.get("message").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `message` to be a primitive type in the JSON" + + " string but got `%s`", + jsonObj.get("message").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!SendMessageRequest.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'SendMessageRequest' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter = + gson.getDelegateAdapter(this, TypeToken.get(SendMessageRequest.class)); + + return (TypeAdapter) + new TypeAdapter() { + @Override + public void write(JsonWriter out, SendMessageRequest value) + throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + obj.remove("additionalProperties"); + // serialize additional properties + if (value.getAdditionalProperties() != null) { + for (Map.Entry entry : + value.getAdditionalProperties().entrySet()) { + if (entry.getValue() instanceof String) + obj.addProperty(entry.getKey(), (String) entry.getValue()); + else if (entry.getValue() instanceof Number) + obj.addProperty(entry.getKey(), (Number) entry.getValue()); + else if (entry.getValue() instanceof Boolean) + obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); + else if (entry.getValue() instanceof Character) + obj.addProperty( + entry.getKey(), (Character) entry.getValue()); + else { + JsonElement jsonElement = gson.toJsonTree(entry.getValue()); + if (jsonElement.isJsonArray()) { + obj.add(entry.getKey(), jsonElement.getAsJsonArray()); + } else { + obj.add(entry.getKey(), jsonElement.getAsJsonObject()); + } + } + } + } + elementAdapter.write(out, obj); + } + + @Override + public SendMessageRequest read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // store additional fields in the deserialized instance + SendMessageRequest instance = thisAdapter.fromJsonTree(jsonObj); + for (Map.Entry entry : jsonObj.entrySet()) { + if (!openapiFields.contains(entry.getKey())) { + if (entry.getValue().isJsonPrimitive()) { // primitive type + if (entry.getValue().getAsJsonPrimitive().isString()) + instance.putAdditionalProperty( + entry.getKey(), entry.getValue().getAsString()); + else if (entry.getValue().getAsJsonPrimitive().isNumber()) + instance.putAdditionalProperty( + entry.getKey(), entry.getValue().getAsNumber()); + else if (entry.getValue().getAsJsonPrimitive().isBoolean()) + instance.putAdditionalProperty( + entry.getKey(), + entry.getValue().getAsBoolean()); + else + throw new IllegalArgumentException( + String.format( + "The field `%s` has unknown primitive" + + " type. Value: %s", + entry.getKey(), + entry.getValue().toString())); + } else if (entry.getValue().isJsonArray()) { + instance.putAdditionalProperty( + entry.getKey(), + gson.fromJson(entry.getValue(), List.class)); + } else { // JSON object + instance.putAdditionalProperty( + entry.getKey(), + gson.fromJson(entry.getValue(), HashMap.class)); + } + } + } + return instance; + } + }.nullSafe(); + } + } + + /** + * Create an instance of SendMessageRequest given an JSON string + * + * @param jsonString JSON string + * @return An instance of SendMessageRequest + * @throws IOException if the JSON string is invalid with respect to SendMessageRequest + */ + public static SendMessageRequest fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, SendMessageRequest.class); + } + + /** + * Convert an instance of SendMessageRequest to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} diff --git a/sdks/java/src/main/java/com/thoughtspot/client/model/SetNLInstructionsRequest.java b/sdks/java/src/main/java/com/thoughtspot/client/model/SetNLInstructionsRequest.java new file mode 100644 index 000000000..eec1b7651 --- /dev/null +++ b/sdks/java/src/main/java/com/thoughtspot/client/model/SetNLInstructionsRequest.java @@ -0,0 +1,367 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client.model; + +import com.google.gson.Gson; +import com.google.gson.JsonArray; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.TypeAdapter; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.annotations.SerializedName; +import com.google.gson.reflect.TypeToken; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import com.thoughtspot.client.JSON; +import java.io.IOException; +import java.io.Serializable; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Objects; + +/** SetNLInstructionsRequest */ +@javax.annotation.Generated( + value = "org.openapitools.codegen.languages.JavaClientCodegen", + comments = "Generator version: 7.12.0") +public class SetNLInstructionsRequest implements Serializable { + private static final long serialVersionUID = 1L; + + public static final String SERIALIZED_NAME_DATA_SOURCE_IDENTIFIER = "data_source_identifier"; + + @SerializedName(SERIALIZED_NAME_DATA_SOURCE_IDENTIFIER) + @javax.annotation.Nonnull + private String dataSourceIdentifier; + + public static final String SERIALIZED_NAME_NL_INSTRUCTIONS_INFO = "nl_instructions_info"; + + @SerializedName(SERIALIZED_NAME_NL_INSTRUCTIONS_INFO) + @javax.annotation.Nonnull + private List nlInstructionsInfo; + + public SetNLInstructionsRequest() {} + + public SetNLInstructionsRequest dataSourceIdentifier( + @javax.annotation.Nonnull String dataSourceIdentifier) { + this.dataSourceIdentifier = dataSourceIdentifier; + return this; + } + + /** + * Unique ID or name of the data-model for which to set NL instructions. + * + * @return dataSourceIdentifier + */ + @javax.annotation.Nonnull + public String getDataSourceIdentifier() { + return dataSourceIdentifier; + } + + public void setDataSourceIdentifier(@javax.annotation.Nonnull String dataSourceIdentifier) { + this.dataSourceIdentifier = dataSourceIdentifier; + } + + public SetNLInstructionsRequest nlInstructionsInfo( + @javax.annotation.Nonnull List nlInstructionsInfo) { + this.nlInstructionsInfo = nlInstructionsInfo; + return this; + } + + public SetNLInstructionsRequest addNlInstructionsInfoItem( + NLInstructionsInfoInput nlInstructionsInfoItem) { + if (this.nlInstructionsInfo == null) { + this.nlInstructionsInfo = new ArrayList<>(); + } + this.nlInstructionsInfo.add(nlInstructionsInfoItem); + return this; + } + + /** + * List of NL instructions to set for the data-model. + * + * @return nlInstructionsInfo + */ + @javax.annotation.Nonnull + public List getNlInstructionsInfo() { + return nlInstructionsInfo; + } + + public void setNlInstructionsInfo( + @javax.annotation.Nonnull List nlInstructionsInfo) { + this.nlInstructionsInfo = nlInstructionsInfo; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key name of the property + * @param value value of the property + * @return the SetNLInstructionsRequest instance itself + */ + public SetNLInstructionsRequest putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return a map of objects + */ + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key name of the property + * @return an object + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + SetNLInstructionsRequest setNLInstructionsRequest = (SetNLInstructionsRequest) o; + return Objects.equals( + this.dataSourceIdentifier, setNLInstructionsRequest.dataSourceIdentifier) + && Objects.equals( + this.nlInstructionsInfo, setNLInstructionsRequest.nlInstructionsInfo) + && Objects.equals( + this.additionalProperties, setNLInstructionsRequest.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(dataSourceIdentifier, nlInstructionsInfo, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class SetNLInstructionsRequest {\n"); + sb.append(" dataSourceIdentifier: ") + .append(toIndentedString(dataSourceIdentifier)) + .append("\n"); + sb.append(" nlInstructionsInfo: ") + .append(toIndentedString(nlInstructionsInfo)) + .append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first + * line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("data_source_identifier"); + openapiFields.add("nl_instructions_info"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + openapiRequiredFields.add("data_source_identifier"); + openapiRequiredFields.add("nl_instructions_info"); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to SetNLInstructionsRequest + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!SetNLInstructionsRequest.openapiRequiredFields + .isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException( + String.format( + "The required field(s) %s in SetNLInstructionsRequest is not found" + + " in the empty JSON string", + SetNLInstructionsRequest.openapiRequiredFields.toString())); + } + } + + // check to make sure all required properties/fields are present in the JSON string + for (String requiredField : SetNLInstructionsRequest.openapiRequiredFields) { + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException( + String.format( + "The required field `%s` is not found in the JSON string: %s", + requiredField, jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if (!jsonObj.get("data_source_identifier").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `data_source_identifier` to be a primitive type in" + + " the JSON string but got `%s`", + jsonObj.get("data_source_identifier").toString())); + } + // ensure the json data is an array + if (!jsonObj.get("nl_instructions_info").isJsonArray()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `nl_instructions_info` to be an array in the JSON" + + " string but got `%s`", + jsonObj.get("nl_instructions_info").toString())); + } + + JsonArray jsonArraynlInstructionsInfo = jsonObj.getAsJsonArray("nl_instructions_info"); + // validate the required field `nl_instructions_info` (array) + for (int i = 0; i < jsonArraynlInstructionsInfo.size(); i++) { + NLInstructionsInfoInput.validateJsonElement(jsonArraynlInstructionsInfo.get(i)); + } + ; + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!SetNLInstructionsRequest.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'SetNLInstructionsRequest' and its + // subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter = + gson.getDelegateAdapter(this, TypeToken.get(SetNLInstructionsRequest.class)); + + return (TypeAdapter) + new TypeAdapter() { + @Override + public void write(JsonWriter out, SetNLInstructionsRequest value) + throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + obj.remove("additionalProperties"); + // serialize additional properties + if (value.getAdditionalProperties() != null) { + for (Map.Entry entry : + value.getAdditionalProperties().entrySet()) { + if (entry.getValue() instanceof String) + obj.addProperty(entry.getKey(), (String) entry.getValue()); + else if (entry.getValue() instanceof Number) + obj.addProperty(entry.getKey(), (Number) entry.getValue()); + else if (entry.getValue() instanceof Boolean) + obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); + else if (entry.getValue() instanceof Character) + obj.addProperty( + entry.getKey(), (Character) entry.getValue()); + else { + JsonElement jsonElement = gson.toJsonTree(entry.getValue()); + if (jsonElement.isJsonArray()) { + obj.add(entry.getKey(), jsonElement.getAsJsonArray()); + } else { + obj.add(entry.getKey(), jsonElement.getAsJsonObject()); + } + } + } + } + elementAdapter.write(out, obj); + } + + @Override + public SetNLInstructionsRequest read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // store additional fields in the deserialized instance + SetNLInstructionsRequest instance = thisAdapter.fromJsonTree(jsonObj); + for (Map.Entry entry : jsonObj.entrySet()) { + if (!openapiFields.contains(entry.getKey())) { + if (entry.getValue().isJsonPrimitive()) { // primitive type + if (entry.getValue().getAsJsonPrimitive().isString()) + instance.putAdditionalProperty( + entry.getKey(), entry.getValue().getAsString()); + else if (entry.getValue().getAsJsonPrimitive().isNumber()) + instance.putAdditionalProperty( + entry.getKey(), entry.getValue().getAsNumber()); + else if (entry.getValue().getAsJsonPrimitive().isBoolean()) + instance.putAdditionalProperty( + entry.getKey(), + entry.getValue().getAsBoolean()); + else + throw new IllegalArgumentException( + String.format( + "The field `%s` has unknown primitive" + + " type. Value: %s", + entry.getKey(), + entry.getValue().toString())); + } else if (entry.getValue().isJsonArray()) { + instance.putAdditionalProperty( + entry.getKey(), + gson.fromJson(entry.getValue(), List.class)); + } else { // JSON object + instance.putAdditionalProperty( + entry.getKey(), + gson.fromJson(entry.getValue(), HashMap.class)); + } + } + } + return instance; + } + }.nullSafe(); + } + } + + /** + * Create an instance of SetNLInstructionsRequest given an JSON string + * + * @param jsonString JSON string + * @return An instance of SetNLInstructionsRequest + * @throws IOException if the JSON string is invalid with respect to SetNLInstructionsRequest + */ + public static SetNLInstructionsRequest fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, SetNLInstructionsRequest.class); + } + + /** + * Convert an instance of SetNLInstructionsRequest to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} diff --git a/sdks/java/src/main/java/com/thoughtspot/client/model/ShareMetadataRequest.java b/sdks/java/src/main/java/com/thoughtspot/client/model/ShareMetadataRequest.java new file mode 100644 index 000000000..8bf7ca53a --- /dev/null +++ b/sdks/java/src/main/java/com/thoughtspot/client/model/ShareMetadataRequest.java @@ -0,0 +1,794 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client.model; + +import com.google.gson.Gson; +import com.google.gson.JsonArray; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.TypeAdapter; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.reflect.TypeToken; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import com.thoughtspot.client.JSON; +import java.io.IOException; +import java.io.Serializable; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Objects; +import org.openapitools.jackson.nullable.JsonNullable; + +/** ShareMetadataRequest */ +@javax.annotation.Generated( + value = "org.openapitools.codegen.languages.JavaClientCodegen", + comments = "Generator version: 7.12.0") +public class ShareMetadataRequest implements Serializable { + private static final long serialVersionUID = 1L; + + /** + * Type of metadata. Required if identifier in metadata_identifies is a name. 1. Liveboard 2. + * Answers 3. LOGICAL_TABLE for any data object such as table, worksheet or view. 4. + * LOGICAL_COLUMN 5. Connection 6. Collection + */ + @JsonAdapter(MetadataTypeEnum.Adapter.class) + public enum MetadataTypeEnum { + LIVEBOARD("LIVEBOARD"), + + ANSWER("ANSWER"), + + LOGICAL_TABLE("LOGICAL_TABLE"), + + LOGICAL_COLUMN("LOGICAL_COLUMN"), + + CONNECTION("CONNECTION"), + + COLLECTION("COLLECTION"); + + private String value; + + MetadataTypeEnum(String value) { + this.value = value; + } + + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + public static MetadataTypeEnum fromValue(String value) { + for (MetadataTypeEnum b : MetadataTypeEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + + public static class Adapter extends TypeAdapter { + @Override + public void write(final JsonWriter jsonWriter, final MetadataTypeEnum enumeration) + throws IOException { + jsonWriter.value(enumeration.getValue()); + } + + @Override + public MetadataTypeEnum read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + return MetadataTypeEnum.fromValue(value); + } + } + + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + String value = jsonElement.getAsString(); + MetadataTypeEnum.fromValue(value); + } + } + + public static final String SERIALIZED_NAME_METADATA_TYPE = "metadata_type"; + + @SerializedName(SERIALIZED_NAME_METADATA_TYPE) + @javax.annotation.Nullable + private MetadataTypeEnum metadataType; + + public static final String SERIALIZED_NAME_METADATA_IDENTIFIERS = "metadata_identifiers"; + + @SerializedName(SERIALIZED_NAME_METADATA_IDENTIFIERS) + @javax.annotation.Nullable + private List metadataIdentifiers; + + public static final String SERIALIZED_NAME_METADATA = "metadata"; + + @SerializedName(SERIALIZED_NAME_METADATA) + @javax.annotation.Nullable + private List metadata; + + public static final String SERIALIZED_NAME_PERMISSIONS = "permissions"; + + @SerializedName(SERIALIZED_NAME_PERMISSIONS) + @javax.annotation.Nonnull + private List permissions; + + public static final String SERIALIZED_NAME_VISUALIZATION_IDENTIFIERS = + "visualization_identifiers"; + + @SerializedName(SERIALIZED_NAME_VISUALIZATION_IDENTIFIERS) + @javax.annotation.Nullable + private List visualizationIdentifiers; + + public static final String SERIALIZED_NAME_EMAILS = "emails"; + + @SerializedName(SERIALIZED_NAME_EMAILS) + @javax.annotation.Nullable + private List emails = new ArrayList<>(); + + public static final String SERIALIZED_NAME_MESSAGE = "message"; + + @SerializedName(SERIALIZED_NAME_MESSAGE) + @javax.annotation.Nonnull + private String message; + + public static final String SERIALIZED_NAME_ENABLE_CUSTOM_URL = "enable_custom_url"; + + @SerializedName(SERIALIZED_NAME_ENABLE_CUSTOM_URL) + @javax.annotation.Nullable + private Boolean enableCustomUrl = false; + + public static final String SERIALIZED_NAME_NOTIFY_ON_SHARE = "notify_on_share"; + + @SerializedName(SERIALIZED_NAME_NOTIFY_ON_SHARE) + @javax.annotation.Nullable + private Boolean notifyOnShare = true; + + public static final String SERIALIZED_NAME_HAS_LENIENT_DISCOVERABILITY = + "has_lenient_discoverability"; + + @SerializedName(SERIALIZED_NAME_HAS_LENIENT_DISCOVERABILITY) + @javax.annotation.Nullable + private Boolean hasLenientDiscoverability = false; + + public ShareMetadataRequest() {} + + public ShareMetadataRequest metadataType( + @javax.annotation.Nullable MetadataTypeEnum metadataType) { + this.metadataType = metadataType; + return this; + } + + /** + * Type of metadata. Required if identifier in metadata_identifies is a name. 1. Liveboard 2. + * Answers 3. LOGICAL_TABLE for any data object such as table, worksheet or view. 4. + * LOGICAL_COLUMN 5. Connection 6. Collection + * + * @return metadataType + */ + @javax.annotation.Nullable + public MetadataTypeEnum getMetadataType() { + return metadataType; + } + + public void setMetadataType(@javax.annotation.Nullable MetadataTypeEnum metadataType) { + this.metadataType = metadataType; + } + + public ShareMetadataRequest metadataIdentifiers( + @javax.annotation.Nullable List metadataIdentifiers) { + this.metadataIdentifiers = metadataIdentifiers; + return this; + } + + public ShareMetadataRequest addMetadataIdentifiersItem(String metadataIdentifiersItem) { + if (this.metadataIdentifiers == null) { + this.metadataIdentifiers = new ArrayList<>(); + } + this.metadataIdentifiers.add(metadataIdentifiersItem); + return this; + } + + /** + * Unique ID or name of metadata objects. Note: All the names should belong to same + * metadata_type + * + * @return metadataIdentifiers + */ + @javax.annotation.Nullable + public List getMetadataIdentifiers() { + return metadataIdentifiers; + } + + public void setMetadataIdentifiers( + @javax.annotation.Nullable List metadataIdentifiers) { + this.metadataIdentifiers = metadataIdentifiers; + } + + public ShareMetadataRequest metadata( + @javax.annotation.Nullable List metadata) { + this.metadata = metadata; + return this; + } + + public ShareMetadataRequest addMetadataItem(ShareMetadataTypeInput metadataItem) { + if (this.metadata == null) { + this.metadata = new ArrayList<>(); + } + this.metadata.add(metadataItem); + return this; + } + + /** + * Metadata details for sharing objects. + * + * @return metadata + */ + @javax.annotation.Nullable + public List getMetadata() { + return metadata; + } + + public void setMetadata(@javax.annotation.Nullable List metadata) { + this.metadata = metadata; + } + + public ShareMetadataRequest permissions( + @javax.annotation.Nonnull List permissions) { + this.permissions = permissions; + return this; + } + + public ShareMetadataRequest addPermissionsItem(SharePermissionsInput permissionsItem) { + if (this.permissions == null) { + this.permissions = new ArrayList<>(); + } + this.permissions.add(permissionsItem); + return this; + } + + /** + * Permission details for sharing the objects. + * + * @return permissions + */ + @javax.annotation.Nonnull + public List getPermissions() { + return permissions; + } + + public void setPermissions(@javax.annotation.Nonnull List permissions) { + this.permissions = permissions; + } + + public ShareMetadataRequest visualizationIdentifiers( + @javax.annotation.Nullable List visualizationIdentifiers) { + this.visualizationIdentifiers = visualizationIdentifiers; + return this; + } + + public ShareMetadataRequest addVisualizationIdentifiersItem( + String visualizationIdentifiersItem) { + if (this.visualizationIdentifiers == null) { + this.visualizationIdentifiers = new ArrayList<>(); + } + this.visualizationIdentifiers.add(visualizationIdentifiersItem); + return this; + } + + /** + * Options to specify details of Liveboard. First Liveboard encountered in payload is considered + * to be the corresponding Liveboard. + * + * @return visualizationIdentifiers + */ + @javax.annotation.Nullable + public List getVisualizationIdentifiers() { + return visualizationIdentifiers; + } + + public void setVisualizationIdentifiers( + @javax.annotation.Nullable List visualizationIdentifiers) { + this.visualizationIdentifiers = visualizationIdentifiers; + } + + public ShareMetadataRequest emails(@javax.annotation.Nullable List emails) { + this.emails = emails; + return this; + } + + public ShareMetadataRequest addEmailsItem(String emailsItem) { + if (this.emails == null) { + this.emails = new ArrayList<>(); + } + this.emails.add(emailsItem); + return this; + } + + /** + * Email IDs to which notifications will be sent. + * + * @return emails + */ + @javax.annotation.Nullable + public List getEmails() { + return emails; + } + + public void setEmails(@javax.annotation.Nullable List emails) { + this.emails = emails; + } + + public ShareMetadataRequest message(@javax.annotation.Nonnull String message) { + this.message = message; + return this; + } + + /** + * Message to be included in notification. + * + * @return message + */ + @javax.annotation.Nonnull + public String getMessage() { + return message; + } + + public void setMessage(@javax.annotation.Nonnull String message) { + this.message = message; + } + + public ShareMetadataRequest enableCustomUrl( + @javax.annotation.Nullable Boolean enableCustomUrl) { + this.enableCustomUrl = enableCustomUrl; + return this; + } + + /** + * Sends object URLs in the customized format in email notifications. + * + * @return enableCustomUrl + */ + @javax.annotation.Nullable + public Boolean getEnableCustomUrl() { + return enableCustomUrl; + } + + public void setEnableCustomUrl(@javax.annotation.Nullable Boolean enableCustomUrl) { + this.enableCustomUrl = enableCustomUrl; + } + + public ShareMetadataRequest notifyOnShare(@javax.annotation.Nullable Boolean notifyOnShare) { + this.notifyOnShare = notifyOnShare; + return this; + } + + /** + * Flag to notify user when any object is shared. + * + * @return notifyOnShare + */ + @javax.annotation.Nullable + public Boolean getNotifyOnShare() { + return notifyOnShare; + } + + public void setNotifyOnShare(@javax.annotation.Nullable Boolean notifyOnShare) { + this.notifyOnShare = notifyOnShare; + } + + public ShareMetadataRequest hasLenientDiscoverability( + @javax.annotation.Nullable Boolean hasLenientDiscoverability) { + this.hasLenientDiscoverability = hasLenientDiscoverability; + return this; + } + + /** + * Flag to make the object discoverable. + * + * @return hasLenientDiscoverability + */ + @javax.annotation.Nullable + public Boolean getHasLenientDiscoverability() { + return hasLenientDiscoverability; + } + + public void setHasLenientDiscoverability( + @javax.annotation.Nullable Boolean hasLenientDiscoverability) { + this.hasLenientDiscoverability = hasLenientDiscoverability; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key name of the property + * @param value value of the property + * @return the ShareMetadataRequest instance itself + */ + public ShareMetadataRequest putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return a map of objects + */ + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key name of the property + * @return an object + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ShareMetadataRequest shareMetadataRequest = (ShareMetadataRequest) o; + return Objects.equals(this.metadataType, shareMetadataRequest.metadataType) + && Objects.equals( + this.metadataIdentifiers, shareMetadataRequest.metadataIdentifiers) + && Objects.equals(this.metadata, shareMetadataRequest.metadata) + && Objects.equals(this.permissions, shareMetadataRequest.permissions) + && Objects.equals( + this.visualizationIdentifiers, + shareMetadataRequest.visualizationIdentifiers) + && Objects.equals(this.emails, shareMetadataRequest.emails) + && Objects.equals(this.message, shareMetadataRequest.message) + && Objects.equals(this.enableCustomUrl, shareMetadataRequest.enableCustomUrl) + && Objects.equals(this.notifyOnShare, shareMetadataRequest.notifyOnShare) + && Objects.equals( + this.hasLenientDiscoverability, + shareMetadataRequest.hasLenientDiscoverability) + && Objects.equals( + this.additionalProperties, shareMetadataRequest.additionalProperties); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b + || (a != null + && b != null + && a.isPresent() + && b.isPresent() + && Objects.deepEquals(a.get(), b.get())); + } + + @Override + public int hashCode() { + return Objects.hash( + metadataType, + metadataIdentifiers, + metadata, + permissions, + visualizationIdentifiers, + emails, + message, + enableCustomUrl, + notifyOnShare, + hasLenientDiscoverability, + additionalProperties); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; + } + return a.isPresent() ? Arrays.deepHashCode(new Object[] {a.get()}) : 31; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ShareMetadataRequest {\n"); + sb.append(" metadataType: ").append(toIndentedString(metadataType)).append("\n"); + sb.append(" metadataIdentifiers: ") + .append(toIndentedString(metadataIdentifiers)) + .append("\n"); + sb.append(" metadata: ").append(toIndentedString(metadata)).append("\n"); + sb.append(" permissions: ").append(toIndentedString(permissions)).append("\n"); + sb.append(" visualizationIdentifiers: ") + .append(toIndentedString(visualizationIdentifiers)) + .append("\n"); + sb.append(" emails: ").append(toIndentedString(emails)).append("\n"); + sb.append(" message: ").append(toIndentedString(message)).append("\n"); + sb.append(" enableCustomUrl: ").append(toIndentedString(enableCustomUrl)).append("\n"); + sb.append(" notifyOnShare: ").append(toIndentedString(notifyOnShare)).append("\n"); + sb.append(" hasLenientDiscoverability: ") + .append(toIndentedString(hasLenientDiscoverability)) + .append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first + * line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("metadata_type"); + openapiFields.add("metadata_identifiers"); + openapiFields.add("metadata"); + openapiFields.add("permissions"); + openapiFields.add("visualization_identifiers"); + openapiFields.add("emails"); + openapiFields.add("message"); + openapiFields.add("enable_custom_url"); + openapiFields.add("notify_on_share"); + openapiFields.add("has_lenient_discoverability"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + openapiRequiredFields.add("permissions"); + openapiRequiredFields.add("message"); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to ShareMetadataRequest + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!ShareMetadataRequest.openapiRequiredFields + .isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException( + String.format( + "The required field(s) %s in ShareMetadataRequest is not found in" + + " the empty JSON string", + ShareMetadataRequest.openapiRequiredFields.toString())); + } + } + + // check to make sure all required properties/fields are present in the JSON string + for (String requiredField : ShareMetadataRequest.openapiRequiredFields) { + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException( + String.format( + "The required field `%s` is not found in the JSON string: %s", + requiredField, jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if ((jsonObj.get("metadata_type") != null && !jsonObj.get("metadata_type").isJsonNull()) + && !jsonObj.get("metadata_type").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `metadata_type` to be a primitive type in the JSON" + + " string but got `%s`", + jsonObj.get("metadata_type").toString())); + } + // validate the optional field `metadata_type` + if (jsonObj.get("metadata_type") != null && !jsonObj.get("metadata_type").isJsonNull()) { + MetadataTypeEnum.validateJsonElement(jsonObj.get("metadata_type")); + } + // ensure the optional json data is an array if present + if (jsonObj.get("metadata_identifiers") != null + && !jsonObj.get("metadata_identifiers").isJsonNull() + && !jsonObj.get("metadata_identifiers").isJsonArray()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `metadata_identifiers` to be an array in the JSON" + + " string but got `%s`", + jsonObj.get("metadata_identifiers").toString())); + } + if (jsonObj.get("metadata") != null && !jsonObj.get("metadata").isJsonNull()) { + JsonArray jsonArraymetadata = jsonObj.getAsJsonArray("metadata"); + if (jsonArraymetadata != null) { + // ensure the json data is an array + if (!jsonObj.get("metadata").isJsonArray()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `metadata` to be an array in the JSON" + + " string but got `%s`", + jsonObj.get("metadata").toString())); + } + + // validate the optional field `metadata` (array) + for (int i = 0; i < jsonArraymetadata.size(); i++) { + ShareMetadataTypeInput.validateJsonElement(jsonArraymetadata.get(i)); + } + ; + } + } + // ensure the json data is an array + if (!jsonObj.get("permissions").isJsonArray()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `permissions` to be an array in the JSON string" + + " but got `%s`", + jsonObj.get("permissions").toString())); + } + + JsonArray jsonArraypermissions = jsonObj.getAsJsonArray("permissions"); + // validate the required field `permissions` (array) + for (int i = 0; i < jsonArraypermissions.size(); i++) { + SharePermissionsInput.validateJsonElement(jsonArraypermissions.get(i)); + } + ; + // ensure the optional json data is an array if present + if (jsonObj.get("visualization_identifiers") != null + && !jsonObj.get("visualization_identifiers").isJsonNull() + && !jsonObj.get("visualization_identifiers").isJsonArray()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `visualization_identifiers` to be an array in the" + + " JSON string but got `%s`", + jsonObj.get("visualization_identifiers").toString())); + } + // ensure the optional json data is an array if present + if (jsonObj.get("emails") != null + && !jsonObj.get("emails").isJsonNull() + && !jsonObj.get("emails").isJsonArray()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `emails` to be an array in the JSON string but got" + + " `%s`", + jsonObj.get("emails").toString())); + } + if (!jsonObj.get("message").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `message` to be a primitive type in the JSON" + + " string but got `%s`", + jsonObj.get("message").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!ShareMetadataRequest.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'ShareMetadataRequest' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter = + gson.getDelegateAdapter(this, TypeToken.get(ShareMetadataRequest.class)); + + return (TypeAdapter) + new TypeAdapter() { + @Override + public void write(JsonWriter out, ShareMetadataRequest value) + throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + obj.remove("additionalProperties"); + // serialize additional properties + if (value.getAdditionalProperties() != null) { + for (Map.Entry entry : + value.getAdditionalProperties().entrySet()) { + if (entry.getValue() instanceof String) + obj.addProperty(entry.getKey(), (String) entry.getValue()); + else if (entry.getValue() instanceof Number) + obj.addProperty(entry.getKey(), (Number) entry.getValue()); + else if (entry.getValue() instanceof Boolean) + obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); + else if (entry.getValue() instanceof Character) + obj.addProperty( + entry.getKey(), (Character) entry.getValue()); + else { + JsonElement jsonElement = gson.toJsonTree(entry.getValue()); + if (jsonElement.isJsonArray()) { + obj.add(entry.getKey(), jsonElement.getAsJsonArray()); + } else { + obj.add(entry.getKey(), jsonElement.getAsJsonObject()); + } + } + } + } + elementAdapter.write(out, obj); + } + + @Override + public ShareMetadataRequest read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // store additional fields in the deserialized instance + ShareMetadataRequest instance = thisAdapter.fromJsonTree(jsonObj); + for (Map.Entry entry : jsonObj.entrySet()) { + if (!openapiFields.contains(entry.getKey())) { + if (entry.getValue().isJsonPrimitive()) { // primitive type + if (entry.getValue().getAsJsonPrimitive().isString()) + instance.putAdditionalProperty( + entry.getKey(), entry.getValue().getAsString()); + else if (entry.getValue().getAsJsonPrimitive().isNumber()) + instance.putAdditionalProperty( + entry.getKey(), entry.getValue().getAsNumber()); + else if (entry.getValue().getAsJsonPrimitive().isBoolean()) + instance.putAdditionalProperty( + entry.getKey(), + entry.getValue().getAsBoolean()); + else + throw new IllegalArgumentException( + String.format( + "The field `%s` has unknown primitive" + + " type. Value: %s", + entry.getKey(), + entry.getValue().toString())); + } else if (entry.getValue().isJsonArray()) { + instance.putAdditionalProperty( + entry.getKey(), + gson.fromJson(entry.getValue(), List.class)); + } else { // JSON object + instance.putAdditionalProperty( + entry.getKey(), + gson.fromJson(entry.getValue(), HashMap.class)); + } + } + } + return instance; + } + }.nullSafe(); + } + } + + /** + * Create an instance of ShareMetadataRequest given an JSON string + * + * @param jsonString JSON string + * @return An instance of ShareMetadataRequest + * @throws IOException if the JSON string is invalid with respect to ShareMetadataRequest + */ + public static ShareMetadataRequest fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, ShareMetadataRequest.class); + } + + /** + * Convert an instance of ShareMetadataRequest to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} diff --git a/sdks/java/src/main/java/com/thoughtspot/client/model/ShareMetadataTypeInput.java b/sdks/java/src/main/java/com/thoughtspot/client/model/ShareMetadataTypeInput.java new file mode 100644 index 000000000..a8f04645e --- /dev/null +++ b/sdks/java/src/main/java/com/thoughtspot/client/model/ShareMetadataTypeInput.java @@ -0,0 +1,424 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client.model; + +import com.google.gson.Gson; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.TypeAdapter; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.reflect.TypeToken; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import com.thoughtspot.client.JSON; +import java.io.IOException; +import java.io.Serializable; +import java.util.Arrays; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Objects; +import org.openapitools.jackson.nullable.JsonNullable; + +/** ShareMetadataTypeInput */ +@javax.annotation.Generated( + value = "org.openapitools.codegen.languages.JavaClientCodegen", + comments = "Generator version: 7.12.0") +public class ShareMetadataTypeInput implements Serializable { + private static final long serialVersionUID = 1L; + + /** + * Type of metadata. Type of metadata. Required if the name of the object is set as the + * identifier. This attribute is optional when the object GUID is specified as the identifier. + */ + @JsonAdapter(TypeEnum.Adapter.class) + public enum TypeEnum { + LIVEBOARD("LIVEBOARD"), + + ANSWER("ANSWER"), + + LOGICAL_TABLE("LOGICAL_TABLE"), + + LOGICAL_COLUMN("LOGICAL_COLUMN"), + + CONNECTION("CONNECTION"), + + COLLECTION("COLLECTION"); + + private String value; + + TypeEnum(String value) { + this.value = value; + } + + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + public static TypeEnum fromValue(String value) { + for (TypeEnum b : TypeEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + return null; + } + + public static class Adapter extends TypeAdapter { + @Override + public void write(final JsonWriter jsonWriter, final TypeEnum enumeration) + throws IOException { + jsonWriter.value(enumeration.getValue()); + } + + @Override + public TypeEnum read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + return TypeEnum.fromValue(value); + } + } + + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + String value = jsonElement.getAsString(); + TypeEnum.fromValue(value); + } + } + + public static final String SERIALIZED_NAME_TYPE = "type"; + + @SerializedName(SERIALIZED_NAME_TYPE) + @javax.annotation.Nullable + private TypeEnum type; + + public static final String SERIALIZED_NAME_IDENTIFIER = "identifier"; + + @SerializedName(SERIALIZED_NAME_IDENTIFIER) + @javax.annotation.Nonnull + private String identifier; + + public ShareMetadataTypeInput() {} + + public ShareMetadataTypeInput type(@javax.annotation.Nullable TypeEnum type) { + this.type = type; + return this; + } + + /** + * Type of metadata. Type of metadata. Required if the name of the object is set as the + * identifier. This attribute is optional when the object GUID is specified as the identifier. + * + * @return type + */ + @javax.annotation.Nullable + public TypeEnum getType() { + return type; + } + + public void setType(@javax.annotation.Nullable TypeEnum type) { + this.type = type; + } + + public ShareMetadataTypeInput identifier(@javax.annotation.Nonnull String identifier) { + this.identifier = identifier; + return this; + } + + /** + * Unique ID or name of the metadata object. + * + * @return identifier + */ + @javax.annotation.Nonnull + public String getIdentifier() { + return identifier; + } + + public void setIdentifier(@javax.annotation.Nonnull String identifier) { + this.identifier = identifier; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key name of the property + * @param value value of the property + * @return the ShareMetadataTypeInput instance itself + */ + public ShareMetadataTypeInput putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return a map of objects + */ + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key name of the property + * @return an object + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ShareMetadataTypeInput shareMetadataTypeInput = (ShareMetadataTypeInput) o; + return Objects.equals(this.type, shareMetadataTypeInput.type) + && Objects.equals(this.identifier, shareMetadataTypeInput.identifier) + && Objects.equals( + this.additionalProperties, shareMetadataTypeInput.additionalProperties); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b + || (a != null + && b != null + && a.isPresent() + && b.isPresent() + && Objects.deepEquals(a.get(), b.get())); + } + + @Override + public int hashCode() { + return Objects.hash(type, identifier, additionalProperties); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; + } + return a.isPresent() ? Arrays.deepHashCode(new Object[] {a.get()}) : 31; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ShareMetadataTypeInput {\n"); + sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append(" identifier: ").append(toIndentedString(identifier)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first + * line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("type"); + openapiFields.add("identifier"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + openapiRequiredFields.add("identifier"); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to ShareMetadataTypeInput + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!ShareMetadataTypeInput.openapiRequiredFields + .isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException( + String.format( + "The required field(s) %s in ShareMetadataTypeInput is not found" + + " in the empty JSON string", + ShareMetadataTypeInput.openapiRequiredFields.toString())); + } + } + + // check to make sure all required properties/fields are present in the JSON string + for (String requiredField : ShareMetadataTypeInput.openapiRequiredFields) { + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException( + String.format( + "The required field `%s` is not found in the JSON string: %s", + requiredField, jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if ((jsonObj.get("type") != null && !jsonObj.get("type").isJsonNull()) + && !jsonObj.get("type").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `type` to be a primitive type in the JSON string" + + " but got `%s`", + jsonObj.get("type").toString())); + } + // validate the optional field `type` + if (jsonObj.get("type") != null && !jsonObj.get("type").isJsonNull()) { + TypeEnum.validateJsonElement(jsonObj.get("type")); + } + if (!jsonObj.get("identifier").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `identifier` to be a primitive type in the JSON" + + " string but got `%s`", + jsonObj.get("identifier").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!ShareMetadataTypeInput.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'ShareMetadataTypeInput' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter = + gson.getDelegateAdapter(this, TypeToken.get(ShareMetadataTypeInput.class)); + + return (TypeAdapter) + new TypeAdapter() { + @Override + public void write(JsonWriter out, ShareMetadataTypeInput value) + throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + obj.remove("additionalProperties"); + // serialize additional properties + if (value.getAdditionalProperties() != null) { + for (Map.Entry entry : + value.getAdditionalProperties().entrySet()) { + if (entry.getValue() instanceof String) + obj.addProperty(entry.getKey(), (String) entry.getValue()); + else if (entry.getValue() instanceof Number) + obj.addProperty(entry.getKey(), (Number) entry.getValue()); + else if (entry.getValue() instanceof Boolean) + obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); + else if (entry.getValue() instanceof Character) + obj.addProperty( + entry.getKey(), (Character) entry.getValue()); + else { + JsonElement jsonElement = gson.toJsonTree(entry.getValue()); + if (jsonElement.isJsonArray()) { + obj.add(entry.getKey(), jsonElement.getAsJsonArray()); + } else { + obj.add(entry.getKey(), jsonElement.getAsJsonObject()); + } + } + } + } + elementAdapter.write(out, obj); + } + + @Override + public ShareMetadataTypeInput read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // store additional fields in the deserialized instance + ShareMetadataTypeInput instance = thisAdapter.fromJsonTree(jsonObj); + for (Map.Entry entry : jsonObj.entrySet()) { + if (!openapiFields.contains(entry.getKey())) { + if (entry.getValue().isJsonPrimitive()) { // primitive type + if (entry.getValue().getAsJsonPrimitive().isString()) + instance.putAdditionalProperty( + entry.getKey(), entry.getValue().getAsString()); + else if (entry.getValue().getAsJsonPrimitive().isNumber()) + instance.putAdditionalProperty( + entry.getKey(), entry.getValue().getAsNumber()); + else if (entry.getValue().getAsJsonPrimitive().isBoolean()) + instance.putAdditionalProperty( + entry.getKey(), + entry.getValue().getAsBoolean()); + else + throw new IllegalArgumentException( + String.format( + "The field `%s` has unknown primitive" + + " type. Value: %s", + entry.getKey(), + entry.getValue().toString())); + } else if (entry.getValue().isJsonArray()) { + instance.putAdditionalProperty( + entry.getKey(), + gson.fromJson(entry.getValue(), List.class)); + } else { // JSON object + instance.putAdditionalProperty( + entry.getKey(), + gson.fromJson(entry.getValue(), HashMap.class)); + } + } + } + return instance; + } + }.nullSafe(); + } + } + + /** + * Create an instance of ShareMetadataTypeInput given an JSON string + * + * @param jsonString JSON string + * @return An instance of ShareMetadataTypeInput + * @throws IOException if the JSON string is invalid with respect to ShareMetadataTypeInput + */ + public static ShareMetadataTypeInput fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, ShareMetadataTypeInput.class); + } + + /** + * Convert an instance of ShareMetadataTypeInput to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} diff --git a/sdks/java/src/main/java/com/thoughtspot/client/model/SharePermissionsInput.java b/sdks/java/src/main/java/com/thoughtspot/client/model/SharePermissionsInput.java new file mode 100644 index 000000000..32647e797 --- /dev/null +++ b/sdks/java/src/main/java/com/thoughtspot/client/model/SharePermissionsInput.java @@ -0,0 +1,506 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client.model; + +import com.google.gson.Gson; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.TypeAdapter; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.reflect.TypeToken; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import com.thoughtspot.client.JSON; +import java.io.IOException; +import java.io.Serializable; +import java.util.Arrays; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Objects; +import org.openapitools.jackson.nullable.JsonNullable; + +/** SharePermissionsInput */ +@javax.annotation.Generated( + value = "org.openapitools.codegen.languages.JavaClientCodegen", + comments = "Generator version: 7.12.0") +public class SharePermissionsInput implements Serializable { + private static final long serialVersionUID = 1L; + + public static final String SERIALIZED_NAME_PRINCIPAL = "principal"; + + @SerializedName(SERIALIZED_NAME_PRINCIPAL) + @javax.annotation.Nonnull + private PrincipalsInput principal; + + /** Type of access to the shared object */ + @JsonAdapter(ShareModeEnum.Adapter.class) + public enum ShareModeEnum { + READ_ONLY("READ_ONLY"), + + MODIFY("MODIFY"), + + NO_ACCESS("NO_ACCESS"); + + private String value; + + ShareModeEnum(String value) { + this.value = value; + } + + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + public static ShareModeEnum fromValue(String value) { + for (ShareModeEnum b : ShareModeEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + + public static class Adapter extends TypeAdapter { + @Override + public void write(final JsonWriter jsonWriter, final ShareModeEnum enumeration) + throws IOException { + jsonWriter.value(enumeration.getValue()); + } + + @Override + public ShareModeEnum read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + return ShareModeEnum.fromValue(value); + } + } + + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + String value = jsonElement.getAsString(); + ShareModeEnum.fromValue(value); + } + } + + public static final String SERIALIZED_NAME_SHARE_MODE = "share_mode"; + + @SerializedName(SERIALIZED_NAME_SHARE_MODE) + @javax.annotation.Nonnull + private ShareModeEnum shareMode; + + /** + * Content share mode for collections. Controls access to objects within the collection. Only + * applicable when sharing COLLECTION metadata type. + */ + @JsonAdapter(ContentShareModeEnum.Adapter.class) + public enum ContentShareModeEnum { + READ_ONLY("READ_ONLY"), + + MODIFY("MODIFY"); + + private String value; + + ContentShareModeEnum(String value) { + this.value = value; + } + + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + public static ContentShareModeEnum fromValue(String value) { + for (ContentShareModeEnum b : ContentShareModeEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + return null; + } + + public static class Adapter extends TypeAdapter { + @Override + public void write(final JsonWriter jsonWriter, final ContentShareModeEnum enumeration) + throws IOException { + jsonWriter.value(enumeration.getValue()); + } + + @Override + public ContentShareModeEnum read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + return ContentShareModeEnum.fromValue(value); + } + } + + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + String value = jsonElement.getAsString(); + ContentShareModeEnum.fromValue(value); + } + } + + public static final String SERIALIZED_NAME_CONTENT_SHARE_MODE = "content_share_mode"; + + @SerializedName(SERIALIZED_NAME_CONTENT_SHARE_MODE) + @javax.annotation.Nullable + private ContentShareModeEnum contentShareMode; + + public SharePermissionsInput() {} + + public SharePermissionsInput principal(@javax.annotation.Nonnull PrincipalsInput principal) { + this.principal = principal; + return this; + } + + /** + * Get principal + * + * @return principal + */ + @javax.annotation.Nonnull + public PrincipalsInput getPrincipal() { + return principal; + } + + public void setPrincipal(@javax.annotation.Nonnull PrincipalsInput principal) { + this.principal = principal; + } + + public SharePermissionsInput shareMode(@javax.annotation.Nonnull ShareModeEnum shareMode) { + this.shareMode = shareMode; + return this; + } + + /** + * Type of access to the shared object + * + * @return shareMode + */ + @javax.annotation.Nonnull + public ShareModeEnum getShareMode() { + return shareMode; + } + + public void setShareMode(@javax.annotation.Nonnull ShareModeEnum shareMode) { + this.shareMode = shareMode; + } + + public SharePermissionsInput contentShareMode( + @javax.annotation.Nullable ContentShareModeEnum contentShareMode) { + this.contentShareMode = contentShareMode; + return this; + } + + /** + * Content share mode for collections. Controls access to objects within the collection. Only + * applicable when sharing COLLECTION metadata type. + * + * @return contentShareMode + */ + @javax.annotation.Nullable + public ContentShareModeEnum getContentShareMode() { + return contentShareMode; + } + + public void setContentShareMode( + @javax.annotation.Nullable ContentShareModeEnum contentShareMode) { + this.contentShareMode = contentShareMode; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key name of the property + * @param value value of the property + * @return the SharePermissionsInput instance itself + */ + public SharePermissionsInput putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return a map of objects + */ + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key name of the property + * @return an object + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + SharePermissionsInput sharePermissionsInput = (SharePermissionsInput) o; + return Objects.equals(this.principal, sharePermissionsInput.principal) + && Objects.equals(this.shareMode, sharePermissionsInput.shareMode) + && Objects.equals(this.contentShareMode, sharePermissionsInput.contentShareMode) + && Objects.equals( + this.additionalProperties, sharePermissionsInput.additionalProperties); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b + || (a != null + && b != null + && a.isPresent() + && b.isPresent() + && Objects.deepEquals(a.get(), b.get())); + } + + @Override + public int hashCode() { + return Objects.hash(principal, shareMode, contentShareMode, additionalProperties); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; + } + return a.isPresent() ? Arrays.deepHashCode(new Object[] {a.get()}) : 31; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class SharePermissionsInput {\n"); + sb.append(" principal: ").append(toIndentedString(principal)).append("\n"); + sb.append(" shareMode: ").append(toIndentedString(shareMode)).append("\n"); + sb.append(" contentShareMode: ").append(toIndentedString(contentShareMode)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first + * line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("principal"); + openapiFields.add("share_mode"); + openapiFields.add("content_share_mode"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + openapiRequiredFields.add("principal"); + openapiRequiredFields.add("share_mode"); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to SharePermissionsInput + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!SharePermissionsInput.openapiRequiredFields + .isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException( + String.format( + "The required field(s) %s in SharePermissionsInput is not found in" + + " the empty JSON string", + SharePermissionsInput.openapiRequiredFields.toString())); + } + } + + // check to make sure all required properties/fields are present in the JSON string + for (String requiredField : SharePermissionsInput.openapiRequiredFields) { + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException( + String.format( + "The required field `%s` is not found in the JSON string: %s", + requiredField, jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // validate the required field `principal` + PrincipalsInput.validateJsonElement(jsonObj.get("principal")); + if (!jsonObj.get("share_mode").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `share_mode` to be a primitive type in the JSON" + + " string but got `%s`", + jsonObj.get("share_mode").toString())); + } + // validate the required field `share_mode` + ShareModeEnum.validateJsonElement(jsonObj.get("share_mode")); + if ((jsonObj.get("content_share_mode") != null + && !jsonObj.get("content_share_mode").isJsonNull()) + && !jsonObj.get("content_share_mode").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `content_share_mode` to be a primitive type in the" + + " JSON string but got `%s`", + jsonObj.get("content_share_mode").toString())); + } + // validate the optional field `content_share_mode` + if (jsonObj.get("content_share_mode") != null + && !jsonObj.get("content_share_mode").isJsonNull()) { + ContentShareModeEnum.validateJsonElement(jsonObj.get("content_share_mode")); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!SharePermissionsInput.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'SharePermissionsInput' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter = + gson.getDelegateAdapter(this, TypeToken.get(SharePermissionsInput.class)); + + return (TypeAdapter) + new TypeAdapter() { + @Override + public void write(JsonWriter out, SharePermissionsInput value) + throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + obj.remove("additionalProperties"); + // serialize additional properties + if (value.getAdditionalProperties() != null) { + for (Map.Entry entry : + value.getAdditionalProperties().entrySet()) { + if (entry.getValue() instanceof String) + obj.addProperty(entry.getKey(), (String) entry.getValue()); + else if (entry.getValue() instanceof Number) + obj.addProperty(entry.getKey(), (Number) entry.getValue()); + else if (entry.getValue() instanceof Boolean) + obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); + else if (entry.getValue() instanceof Character) + obj.addProperty( + entry.getKey(), (Character) entry.getValue()); + else { + JsonElement jsonElement = gson.toJsonTree(entry.getValue()); + if (jsonElement.isJsonArray()) { + obj.add(entry.getKey(), jsonElement.getAsJsonArray()); + } else { + obj.add(entry.getKey(), jsonElement.getAsJsonObject()); + } + } + } + } + elementAdapter.write(out, obj); + } + + @Override + public SharePermissionsInput read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // store additional fields in the deserialized instance + SharePermissionsInput instance = thisAdapter.fromJsonTree(jsonObj); + for (Map.Entry entry : jsonObj.entrySet()) { + if (!openapiFields.contains(entry.getKey())) { + if (entry.getValue().isJsonPrimitive()) { // primitive type + if (entry.getValue().getAsJsonPrimitive().isString()) + instance.putAdditionalProperty( + entry.getKey(), entry.getValue().getAsString()); + else if (entry.getValue().getAsJsonPrimitive().isNumber()) + instance.putAdditionalProperty( + entry.getKey(), entry.getValue().getAsNumber()); + else if (entry.getValue().getAsJsonPrimitive().isBoolean()) + instance.putAdditionalProperty( + entry.getKey(), + entry.getValue().getAsBoolean()); + else + throw new IllegalArgumentException( + String.format( + "The field `%s` has unknown primitive" + + " type. Value: %s", + entry.getKey(), + entry.getValue().toString())); + } else if (entry.getValue().isJsonArray()) { + instance.putAdditionalProperty( + entry.getKey(), + gson.fromJson(entry.getValue(), List.class)); + } else { // JSON object + instance.putAdditionalProperty( + entry.getKey(), + gson.fromJson(entry.getValue(), HashMap.class)); + } + } + } + return instance; + } + }.nullSafe(); + } + } + + /** + * Create an instance of SharePermissionsInput given an JSON string + * + * @param jsonString JSON string + * @return An instance of SharePermissionsInput + * @throws IOException if the JSON string is invalid with respect to SharePermissionsInput + */ + public static SharePermissionsInput fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, SharePermissionsInput.class); + } + + /** + * Convert an instance of SharePermissionsInput to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} diff --git a/sdks/java/src/main/java/com/thoughtspot/client/model/SingleAnswerRequest.java b/sdks/java/src/main/java/com/thoughtspot/client/model/SingleAnswerRequest.java new file mode 100644 index 000000000..46212e6d3 --- /dev/null +++ b/sdks/java/src/main/java/com/thoughtspot/client/model/SingleAnswerRequest.java @@ -0,0 +1,342 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client.model; + +import com.google.gson.Gson; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.TypeAdapter; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.annotations.SerializedName; +import com.google.gson.reflect.TypeToken; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import com.thoughtspot.client.JSON; +import java.io.IOException; +import java.io.Serializable; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Objects; + +/** SingleAnswerRequest */ +@javax.annotation.Generated( + value = "org.openapitools.codegen.languages.JavaClientCodegen", + comments = "Generator version: 7.12.0") +public class SingleAnswerRequest implements Serializable { + private static final long serialVersionUID = 1L; + + public static final String SERIALIZED_NAME_QUERY = "query"; + + @SerializedName(SERIALIZED_NAME_QUERY) + @javax.annotation.Nonnull + private String query; + + public static final String SERIALIZED_NAME_METADATA_IDENTIFIER = "metadata_identifier"; + + @SerializedName(SERIALIZED_NAME_METADATA_IDENTIFIER) + @javax.annotation.Nonnull + private String metadataIdentifier; + + public SingleAnswerRequest() {} + + public SingleAnswerRequest query(@javax.annotation.Nonnull String query) { + this.query = query; + return this; + } + + /** + * A natural language query string to generate the Answer. + * + * @return query + */ + @javax.annotation.Nonnull + public String getQuery() { + return query; + } + + public void setQuery(@javax.annotation.Nonnull String query) { + this.query = query; + } + + public SingleAnswerRequest metadataIdentifier( + @javax.annotation.Nonnull String metadataIdentifier) { + this.metadataIdentifier = metadataIdentifier; + return this; + } + + /** + * ID of the metadata object, such as a Worksheet or Model, to use as a data source for the + * query. + * + * @return metadataIdentifier + */ + @javax.annotation.Nonnull + public String getMetadataIdentifier() { + return metadataIdentifier; + } + + public void setMetadataIdentifier(@javax.annotation.Nonnull String metadataIdentifier) { + this.metadataIdentifier = metadataIdentifier; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key name of the property + * @param value value of the property + * @return the SingleAnswerRequest instance itself + */ + public SingleAnswerRequest putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return a map of objects + */ + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key name of the property + * @return an object + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + SingleAnswerRequest singleAnswerRequest = (SingleAnswerRequest) o; + return Objects.equals(this.query, singleAnswerRequest.query) + && Objects.equals(this.metadataIdentifier, singleAnswerRequest.metadataIdentifier) + && Objects.equals( + this.additionalProperties, singleAnswerRequest.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(query, metadataIdentifier, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class SingleAnswerRequest {\n"); + sb.append(" query: ").append(toIndentedString(query)).append("\n"); + sb.append(" metadataIdentifier: ") + .append(toIndentedString(metadataIdentifier)) + .append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first + * line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("query"); + openapiFields.add("metadata_identifier"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + openapiRequiredFields.add("query"); + openapiRequiredFields.add("metadata_identifier"); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to SingleAnswerRequest + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!SingleAnswerRequest.openapiRequiredFields + .isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException( + String.format( + "The required field(s) %s in SingleAnswerRequest is not found in" + + " the empty JSON string", + SingleAnswerRequest.openapiRequiredFields.toString())); + } + } + + // check to make sure all required properties/fields are present in the JSON string + for (String requiredField : SingleAnswerRequest.openapiRequiredFields) { + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException( + String.format( + "The required field `%s` is not found in the JSON string: %s", + requiredField, jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if (!jsonObj.get("query").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `query` to be a primitive type in the JSON string" + + " but got `%s`", + jsonObj.get("query").toString())); + } + if (!jsonObj.get("metadata_identifier").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `metadata_identifier` to be a primitive type in" + + " the JSON string but got `%s`", + jsonObj.get("metadata_identifier").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!SingleAnswerRequest.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'SingleAnswerRequest' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter = + gson.getDelegateAdapter(this, TypeToken.get(SingleAnswerRequest.class)); + + return (TypeAdapter) + new TypeAdapter() { + @Override + public void write(JsonWriter out, SingleAnswerRequest value) + throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + obj.remove("additionalProperties"); + // serialize additional properties + if (value.getAdditionalProperties() != null) { + for (Map.Entry entry : + value.getAdditionalProperties().entrySet()) { + if (entry.getValue() instanceof String) + obj.addProperty(entry.getKey(), (String) entry.getValue()); + else if (entry.getValue() instanceof Number) + obj.addProperty(entry.getKey(), (Number) entry.getValue()); + else if (entry.getValue() instanceof Boolean) + obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); + else if (entry.getValue() instanceof Character) + obj.addProperty( + entry.getKey(), (Character) entry.getValue()); + else { + JsonElement jsonElement = gson.toJsonTree(entry.getValue()); + if (jsonElement.isJsonArray()) { + obj.add(entry.getKey(), jsonElement.getAsJsonArray()); + } else { + obj.add(entry.getKey(), jsonElement.getAsJsonObject()); + } + } + } + } + elementAdapter.write(out, obj); + } + + @Override + public SingleAnswerRequest read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // store additional fields in the deserialized instance + SingleAnswerRequest instance = thisAdapter.fromJsonTree(jsonObj); + for (Map.Entry entry : jsonObj.entrySet()) { + if (!openapiFields.contains(entry.getKey())) { + if (entry.getValue().isJsonPrimitive()) { // primitive type + if (entry.getValue().getAsJsonPrimitive().isString()) + instance.putAdditionalProperty( + entry.getKey(), entry.getValue().getAsString()); + else if (entry.getValue().getAsJsonPrimitive().isNumber()) + instance.putAdditionalProperty( + entry.getKey(), entry.getValue().getAsNumber()); + else if (entry.getValue().getAsJsonPrimitive().isBoolean()) + instance.putAdditionalProperty( + entry.getKey(), + entry.getValue().getAsBoolean()); + else + throw new IllegalArgumentException( + String.format( + "The field `%s` has unknown primitive" + + " type. Value: %s", + entry.getKey(), + entry.getValue().toString())); + } else if (entry.getValue().isJsonArray()) { + instance.putAdditionalProperty( + entry.getKey(), + gson.fromJson(entry.getValue(), List.class)); + } else { // JSON object + instance.putAdditionalProperty( + entry.getKey(), + gson.fromJson(entry.getValue(), HashMap.class)); + } + } + } + return instance; + } + }.nullSafe(); + } + } + + /** + * Create an instance of SingleAnswerRequest given an JSON string + * + * @param jsonString JSON string + * @return An instance of SingleAnswerRequest + * @throws IOException if the JSON string is invalid with respect to SingleAnswerRequest + */ + public static SingleAnswerRequest fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, SingleAnswerRequest.class); + } + + /** + * Convert an instance of SingleAnswerRequest to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} diff --git a/sdks/java/src/main/java/com/thoughtspot/client/model/SortOption.java b/sdks/java/src/main/java/com/thoughtspot/client/model/SortOption.java new file mode 100644 index 000000000..7b6d619e6 --- /dev/null +++ b/sdks/java/src/main/java/com/thoughtspot/client/model/SortOption.java @@ -0,0 +1,463 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client.model; + +import com.google.gson.Gson; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.TypeAdapter; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.reflect.TypeToken; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import com.thoughtspot.client.JSON; +import java.io.IOException; +import java.io.Serializable; +import java.util.Arrays; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Objects; +import org.openapitools.jackson.nullable.JsonNullable; + +/** SortOption */ +@javax.annotation.Generated( + value = "org.openapitools.codegen.languages.JavaClientCodegen", + comments = "Generator version: 7.12.0") +public class SortOption implements Serializable { + private static final long serialVersionUID = 1L; + + /** Name of the field to apply the sort on. */ + @JsonAdapter(FieldNameEnum.Adapter.class) + public enum FieldNameEnum { + DEFAULT("DEFAULT"), + + NAME("NAME"), + + DISPLAY_NAME("DISPLAY_NAME"), + + AUTHOR("AUTHOR"), + + CREATED("CREATED"), + + MODIFIED("MODIFIED"); + + private String value; + + FieldNameEnum(String value) { + this.value = value; + } + + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + public static FieldNameEnum fromValue(String value) { + for (FieldNameEnum b : FieldNameEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + return null; + } + + public static class Adapter extends TypeAdapter { + @Override + public void write(final JsonWriter jsonWriter, final FieldNameEnum enumeration) + throws IOException { + jsonWriter.value(enumeration.getValue()); + } + + @Override + public FieldNameEnum read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + return FieldNameEnum.fromValue(value); + } + } + + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + String value = jsonElement.getAsString(); + FieldNameEnum.fromValue(value); + } + } + + public static final String SERIALIZED_NAME_FIELD_NAME = "field_name"; + + @SerializedName(SERIALIZED_NAME_FIELD_NAME) + @javax.annotation.Nullable + private FieldNameEnum fieldName = FieldNameEnum.DEFAULT; + + /** Sort order : ASC(Ascending) or DESC(Descending). */ + @JsonAdapter(OrderEnum.Adapter.class) + public enum OrderEnum { + ASC("ASC"), + + DESC("DESC"); + + private String value; + + OrderEnum(String value) { + this.value = value; + } + + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + public static OrderEnum fromValue(String value) { + for (OrderEnum b : OrderEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + return null; + } + + public static class Adapter extends TypeAdapter { + @Override + public void write(final JsonWriter jsonWriter, final OrderEnum enumeration) + throws IOException { + jsonWriter.value(enumeration.getValue()); + } + + @Override + public OrderEnum read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + return OrderEnum.fromValue(value); + } + } + + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + String value = jsonElement.getAsString(); + OrderEnum.fromValue(value); + } + } + + public static final String SERIALIZED_NAME_ORDER = "order"; + + @SerializedName(SERIALIZED_NAME_ORDER) + @javax.annotation.Nullable + private OrderEnum order = OrderEnum.ASC; + + public SortOption() {} + + public SortOption fieldName(@javax.annotation.Nullable FieldNameEnum fieldName) { + this.fieldName = fieldName; + return this; + } + + /** + * Name of the field to apply the sort on. + * + * @return fieldName + */ + @javax.annotation.Nullable + public FieldNameEnum getFieldName() { + return fieldName; + } + + public void setFieldName(@javax.annotation.Nullable FieldNameEnum fieldName) { + this.fieldName = fieldName; + } + + public SortOption order(@javax.annotation.Nullable OrderEnum order) { + this.order = order; + return this; + } + + /** + * Sort order : ASC(Ascending) or DESC(Descending). + * + * @return order + */ + @javax.annotation.Nullable + public OrderEnum getOrder() { + return order; + } + + public void setOrder(@javax.annotation.Nullable OrderEnum order) { + this.order = order; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key name of the property + * @param value value of the property + * @return the SortOption instance itself + */ + public SortOption putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return a map of objects + */ + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key name of the property + * @return an object + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + SortOption sortOption = (SortOption) o; + return Objects.equals(this.fieldName, sortOption.fieldName) + && Objects.equals(this.order, sortOption.order) + && Objects.equals(this.additionalProperties, sortOption.additionalProperties); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b + || (a != null + && b != null + && a.isPresent() + && b.isPresent() + && Objects.deepEquals(a.get(), b.get())); + } + + @Override + public int hashCode() { + return Objects.hash(fieldName, order, additionalProperties); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; + } + return a.isPresent() ? Arrays.deepHashCode(new Object[] {a.get()}) : 31; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class SortOption {\n"); + sb.append(" fieldName: ").append(toIndentedString(fieldName)).append("\n"); + sb.append(" order: ").append(toIndentedString(order)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first + * line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("field_name"); + openapiFields.add("order"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to SortOption + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!SortOption.openapiRequiredFields + .isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException( + String.format( + "The required field(s) %s in SortOption is not found in the empty" + + " JSON string", + SortOption.openapiRequiredFields.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if ((jsonObj.get("field_name") != null && !jsonObj.get("field_name").isJsonNull()) + && !jsonObj.get("field_name").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `field_name` to be a primitive type in the JSON" + + " string but got `%s`", + jsonObj.get("field_name").toString())); + } + // validate the optional field `field_name` + if (jsonObj.get("field_name") != null && !jsonObj.get("field_name").isJsonNull()) { + FieldNameEnum.validateJsonElement(jsonObj.get("field_name")); + } + if ((jsonObj.get("order") != null && !jsonObj.get("order").isJsonNull()) + && !jsonObj.get("order").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `order` to be a primitive type in the JSON string" + + " but got `%s`", + jsonObj.get("order").toString())); + } + // validate the optional field `order` + if (jsonObj.get("order") != null && !jsonObj.get("order").isJsonNull()) { + OrderEnum.validateJsonElement(jsonObj.get("order")); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!SortOption.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'SortOption' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter = + gson.getDelegateAdapter(this, TypeToken.get(SortOption.class)); + + return (TypeAdapter) + new TypeAdapter() { + @Override + public void write(JsonWriter out, SortOption value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + obj.remove("additionalProperties"); + // serialize additional properties + if (value.getAdditionalProperties() != null) { + for (Map.Entry entry : + value.getAdditionalProperties().entrySet()) { + if (entry.getValue() instanceof String) + obj.addProperty(entry.getKey(), (String) entry.getValue()); + else if (entry.getValue() instanceof Number) + obj.addProperty(entry.getKey(), (Number) entry.getValue()); + else if (entry.getValue() instanceof Boolean) + obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); + else if (entry.getValue() instanceof Character) + obj.addProperty( + entry.getKey(), (Character) entry.getValue()); + else { + JsonElement jsonElement = gson.toJsonTree(entry.getValue()); + if (jsonElement.isJsonArray()) { + obj.add(entry.getKey(), jsonElement.getAsJsonArray()); + } else { + obj.add(entry.getKey(), jsonElement.getAsJsonObject()); + } + } + } + } + elementAdapter.write(out, obj); + } + + @Override + public SortOption read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // store additional fields in the deserialized instance + SortOption instance = thisAdapter.fromJsonTree(jsonObj); + for (Map.Entry entry : jsonObj.entrySet()) { + if (!openapiFields.contains(entry.getKey())) { + if (entry.getValue().isJsonPrimitive()) { // primitive type + if (entry.getValue().getAsJsonPrimitive().isString()) + instance.putAdditionalProperty( + entry.getKey(), entry.getValue().getAsString()); + else if (entry.getValue().getAsJsonPrimitive().isNumber()) + instance.putAdditionalProperty( + entry.getKey(), entry.getValue().getAsNumber()); + else if (entry.getValue().getAsJsonPrimitive().isBoolean()) + instance.putAdditionalProperty( + entry.getKey(), + entry.getValue().getAsBoolean()); + else + throw new IllegalArgumentException( + String.format( + "The field `%s` has unknown primitive" + + " type. Value: %s", + entry.getKey(), + entry.getValue().toString())); + } else if (entry.getValue().isJsonArray()) { + instance.putAdditionalProperty( + entry.getKey(), + gson.fromJson(entry.getValue(), List.class)); + } else { // JSON object + instance.putAdditionalProperty( + entry.getKey(), + gson.fromJson(entry.getValue(), HashMap.class)); + } + } + } + return instance; + } + }.nullSafe(); + } + } + + /** + * Create an instance of SortOption given an JSON string + * + * @param jsonString JSON string + * @return An instance of SortOption + * @throws IOException if the JSON string is invalid with respect to SortOption + */ + public static SortOption fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, SortOption.class); + } + + /** + * Convert an instance of SortOption to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} diff --git a/sdks/java/src/main/java/com/thoughtspot/client/model/SortOptionInput.java b/sdks/java/src/main/java/com/thoughtspot/client/model/SortOptionInput.java new file mode 100644 index 000000000..38fa0ab21 --- /dev/null +++ b/sdks/java/src/main/java/com/thoughtspot/client/model/SortOptionInput.java @@ -0,0 +1,472 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client.model; + +import com.google.gson.Gson; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.TypeAdapter; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.reflect.TypeToken; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import com.thoughtspot.client.JSON; +import java.io.IOException; +import java.io.Serializable; +import java.util.Arrays; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Objects; +import org.openapitools.jackson.nullable.JsonNullable; + +/** SortOptionInput */ +@javax.annotation.Generated( + value = "org.openapitools.codegen.languages.JavaClientCodegen", + comments = "Generator version: 7.12.0") +public class SortOptionInput implements Serializable { + private static final long serialVersionUID = 1L; + + /** Name of the field to apply the sort on. */ + @JsonAdapter(FieldNameEnum.Adapter.class) + public enum FieldNameEnum { + NAME("NAME"), + + DISPLAY_NAME("DISPLAY_NAME"), + + AUTHOR("AUTHOR"), + + CREATED("CREATED"), + + MODIFIED("MODIFIED"), + + LAST_ACCESSED("LAST_ACCESSED"), + + SYNCED("SYNCED"), + + VIEWS("VIEWS"), + + USER_STATE("USER_STATE"), + + ROW_COUNT("ROW_COUNT"); + + private String value; + + FieldNameEnum(String value) { + this.value = value; + } + + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + public static FieldNameEnum fromValue(String value) { + for (FieldNameEnum b : FieldNameEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + return null; + } + + public static class Adapter extends TypeAdapter { + @Override + public void write(final JsonWriter jsonWriter, final FieldNameEnum enumeration) + throws IOException { + jsonWriter.value(enumeration.getValue()); + } + + @Override + public FieldNameEnum read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + return FieldNameEnum.fromValue(value); + } + } + + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + String value = jsonElement.getAsString(); + FieldNameEnum.fromValue(value); + } + } + + public static final String SERIALIZED_NAME_FIELD_NAME = "field_name"; + + @SerializedName(SERIALIZED_NAME_FIELD_NAME) + @javax.annotation.Nullable + private FieldNameEnum fieldName; + + /** Sort order : ASC(Ascending) or DESC(Descending). */ + @JsonAdapter(OrderEnum.Adapter.class) + public enum OrderEnum { + ASC("ASC"), + + DESC("DESC"); + + private String value; + + OrderEnum(String value) { + this.value = value; + } + + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + public static OrderEnum fromValue(String value) { + for (OrderEnum b : OrderEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + return null; + } + + public static class Adapter extends TypeAdapter { + @Override + public void write(final JsonWriter jsonWriter, final OrderEnum enumeration) + throws IOException { + jsonWriter.value(enumeration.getValue()); + } + + @Override + public OrderEnum read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + return OrderEnum.fromValue(value); + } + } + + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + String value = jsonElement.getAsString(); + OrderEnum.fromValue(value); + } + } + + public static final String SERIALIZED_NAME_ORDER = "order"; + + @SerializedName(SERIALIZED_NAME_ORDER) + @javax.annotation.Nullable + private OrderEnum order; + + public SortOptionInput() {} + + public SortOptionInput fieldName(@javax.annotation.Nullable FieldNameEnum fieldName) { + this.fieldName = fieldName; + return this; + } + + /** + * Name of the field to apply the sort on. + * + * @return fieldName + */ + @javax.annotation.Nullable + public FieldNameEnum getFieldName() { + return fieldName; + } + + public void setFieldName(@javax.annotation.Nullable FieldNameEnum fieldName) { + this.fieldName = fieldName; + } + + public SortOptionInput order(@javax.annotation.Nullable OrderEnum order) { + this.order = order; + return this; + } + + /** + * Sort order : ASC(Ascending) or DESC(Descending). + * + * @return order + */ + @javax.annotation.Nullable + public OrderEnum getOrder() { + return order; + } + + public void setOrder(@javax.annotation.Nullable OrderEnum order) { + this.order = order; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key name of the property + * @param value value of the property + * @return the SortOptionInput instance itself + */ + public SortOptionInput putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return a map of objects + */ + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key name of the property + * @return an object + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + SortOptionInput sortOptionInput = (SortOptionInput) o; + return Objects.equals(this.fieldName, sortOptionInput.fieldName) + && Objects.equals(this.order, sortOptionInput.order) + && Objects.equals(this.additionalProperties, sortOptionInput.additionalProperties); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b + || (a != null + && b != null + && a.isPresent() + && b.isPresent() + && Objects.deepEquals(a.get(), b.get())); + } + + @Override + public int hashCode() { + return Objects.hash(fieldName, order, additionalProperties); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; + } + return a.isPresent() ? Arrays.deepHashCode(new Object[] {a.get()}) : 31; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class SortOptionInput {\n"); + sb.append(" fieldName: ").append(toIndentedString(fieldName)).append("\n"); + sb.append(" order: ").append(toIndentedString(order)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first + * line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("field_name"); + openapiFields.add("order"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to SortOptionInput + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!SortOptionInput.openapiRequiredFields + .isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException( + String.format( + "The required field(s) %s in SortOptionInput is not found in the" + + " empty JSON string", + SortOptionInput.openapiRequiredFields.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if ((jsonObj.get("field_name") != null && !jsonObj.get("field_name").isJsonNull()) + && !jsonObj.get("field_name").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `field_name` to be a primitive type in the JSON" + + " string but got `%s`", + jsonObj.get("field_name").toString())); + } + // validate the optional field `field_name` + if (jsonObj.get("field_name") != null && !jsonObj.get("field_name").isJsonNull()) { + FieldNameEnum.validateJsonElement(jsonObj.get("field_name")); + } + if ((jsonObj.get("order") != null && !jsonObj.get("order").isJsonNull()) + && !jsonObj.get("order").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `order` to be a primitive type in the JSON string" + + " but got `%s`", + jsonObj.get("order").toString())); + } + // validate the optional field `order` + if (jsonObj.get("order") != null && !jsonObj.get("order").isJsonNull()) { + OrderEnum.validateJsonElement(jsonObj.get("order")); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!SortOptionInput.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'SortOptionInput' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter = + gson.getDelegateAdapter(this, TypeToken.get(SortOptionInput.class)); + + return (TypeAdapter) + new TypeAdapter() { + @Override + public void write(JsonWriter out, SortOptionInput value) + throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + obj.remove("additionalProperties"); + // serialize additional properties + if (value.getAdditionalProperties() != null) { + for (Map.Entry entry : + value.getAdditionalProperties().entrySet()) { + if (entry.getValue() instanceof String) + obj.addProperty(entry.getKey(), (String) entry.getValue()); + else if (entry.getValue() instanceof Number) + obj.addProperty(entry.getKey(), (Number) entry.getValue()); + else if (entry.getValue() instanceof Boolean) + obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); + else if (entry.getValue() instanceof Character) + obj.addProperty( + entry.getKey(), (Character) entry.getValue()); + else { + JsonElement jsonElement = gson.toJsonTree(entry.getValue()); + if (jsonElement.isJsonArray()) { + obj.add(entry.getKey(), jsonElement.getAsJsonArray()); + } else { + obj.add(entry.getKey(), jsonElement.getAsJsonObject()); + } + } + } + } + elementAdapter.write(out, obj); + } + + @Override + public SortOptionInput read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // store additional fields in the deserialized instance + SortOptionInput instance = thisAdapter.fromJsonTree(jsonObj); + for (Map.Entry entry : jsonObj.entrySet()) { + if (!openapiFields.contains(entry.getKey())) { + if (entry.getValue().isJsonPrimitive()) { // primitive type + if (entry.getValue().getAsJsonPrimitive().isString()) + instance.putAdditionalProperty( + entry.getKey(), entry.getValue().getAsString()); + else if (entry.getValue().getAsJsonPrimitive().isNumber()) + instance.putAdditionalProperty( + entry.getKey(), entry.getValue().getAsNumber()); + else if (entry.getValue().getAsJsonPrimitive().isBoolean()) + instance.putAdditionalProperty( + entry.getKey(), + entry.getValue().getAsBoolean()); + else + throw new IllegalArgumentException( + String.format( + "The field `%s` has unknown primitive" + + " type. Value: %s", + entry.getKey(), + entry.getValue().toString())); + } else if (entry.getValue().isJsonArray()) { + instance.putAdditionalProperty( + entry.getKey(), + gson.fromJson(entry.getValue(), List.class)); + } else { // JSON object + instance.putAdditionalProperty( + entry.getKey(), + gson.fromJson(entry.getValue(), HashMap.class)); + } + } + } + return instance; + } + }.nullSafe(); + } + } + + /** + * Create an instance of SortOptionInput given an JSON string + * + * @param jsonString JSON string + * @return An instance of SortOptionInput + * @throws IOException if the JSON string is invalid with respect to SortOptionInput + */ + public static SortOptionInput fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, SortOptionInput.class); + } + + /** + * Convert an instance of SortOptionInput to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} diff --git a/sdks/java/src/main/java/com/thoughtspot/client/model/SortOptions.java b/sdks/java/src/main/java/com/thoughtspot/client/model/SortOptions.java new file mode 100644 index 000000000..cdac830ac --- /dev/null +++ b/sdks/java/src/main/java/com/thoughtspot/client/model/SortOptions.java @@ -0,0 +1,461 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client.model; + +import com.google.gson.Gson; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.TypeAdapter; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.reflect.TypeToken; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import com.thoughtspot.client.JSON; +import java.io.IOException; +import java.io.Serializable; +import java.util.Arrays; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Objects; +import org.openapitools.jackson.nullable.JsonNullable; + +/** Sort options. */ +@javax.annotation.Generated( + value = "org.openapitools.codegen.languages.JavaClientCodegen", + comments = "Generator version: 7.12.0") +public class SortOptions implements Serializable { + private static final long serialVersionUID = 1L; + + /** Name of the field to apply the sort on. */ + @JsonAdapter(FieldNameEnum.Adapter.class) + public enum FieldNameEnum { + NAME("NAME"), + + DISPLAY_NAME("DISPLAY_NAME"), + + AUTHOR("AUTHOR"), + + CREATED("CREATED"), + + MODIFIED("MODIFIED"); + + private String value; + + FieldNameEnum(String value) { + this.value = value; + } + + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + public static FieldNameEnum fromValue(String value) { + for (FieldNameEnum b : FieldNameEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + return null; + } + + public static class Adapter extends TypeAdapter { + @Override + public void write(final JsonWriter jsonWriter, final FieldNameEnum enumeration) + throws IOException { + jsonWriter.value(enumeration.getValue()); + } + + @Override + public FieldNameEnum read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + return FieldNameEnum.fromValue(value); + } + } + + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + String value = jsonElement.getAsString(); + FieldNameEnum.fromValue(value); + } + } + + public static final String SERIALIZED_NAME_FIELD_NAME = "field_name"; + + @SerializedName(SERIALIZED_NAME_FIELD_NAME) + @javax.annotation.Nullable + private FieldNameEnum fieldName; + + /** Sort order : ASC(Ascending) or DESC(Descending). */ + @JsonAdapter(OrderEnum.Adapter.class) + public enum OrderEnum { + ASC("ASC"), + + DESC("DESC"); + + private String value; + + OrderEnum(String value) { + this.value = value; + } + + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + public static OrderEnum fromValue(String value) { + for (OrderEnum b : OrderEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + return null; + } + + public static class Adapter extends TypeAdapter { + @Override + public void write(final JsonWriter jsonWriter, final OrderEnum enumeration) + throws IOException { + jsonWriter.value(enumeration.getValue()); + } + + @Override + public OrderEnum read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + return OrderEnum.fromValue(value); + } + } + + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + String value = jsonElement.getAsString(); + OrderEnum.fromValue(value); + } + } + + public static final String SERIALIZED_NAME_ORDER = "order"; + + @SerializedName(SERIALIZED_NAME_ORDER) + @javax.annotation.Nullable + private OrderEnum order; + + public SortOptions() {} + + public SortOptions fieldName(@javax.annotation.Nullable FieldNameEnum fieldName) { + this.fieldName = fieldName; + return this; + } + + /** + * Name of the field to apply the sort on. + * + * @return fieldName + */ + @javax.annotation.Nullable + public FieldNameEnum getFieldName() { + return fieldName; + } + + public void setFieldName(@javax.annotation.Nullable FieldNameEnum fieldName) { + this.fieldName = fieldName; + } + + public SortOptions order(@javax.annotation.Nullable OrderEnum order) { + this.order = order; + return this; + } + + /** + * Sort order : ASC(Ascending) or DESC(Descending). + * + * @return order + */ + @javax.annotation.Nullable + public OrderEnum getOrder() { + return order; + } + + public void setOrder(@javax.annotation.Nullable OrderEnum order) { + this.order = order; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key name of the property + * @param value value of the property + * @return the SortOptions instance itself + */ + public SortOptions putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return a map of objects + */ + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key name of the property + * @return an object + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + SortOptions sortOptions = (SortOptions) o; + return Objects.equals(this.fieldName, sortOptions.fieldName) + && Objects.equals(this.order, sortOptions.order) + && Objects.equals(this.additionalProperties, sortOptions.additionalProperties); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b + || (a != null + && b != null + && a.isPresent() + && b.isPresent() + && Objects.deepEquals(a.get(), b.get())); + } + + @Override + public int hashCode() { + return Objects.hash(fieldName, order, additionalProperties); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; + } + return a.isPresent() ? Arrays.deepHashCode(new Object[] {a.get()}) : 31; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class SortOptions {\n"); + sb.append(" fieldName: ").append(toIndentedString(fieldName)).append("\n"); + sb.append(" order: ").append(toIndentedString(order)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first + * line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("field_name"); + openapiFields.add("order"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to SortOptions + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!SortOptions.openapiRequiredFields + .isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException( + String.format( + "The required field(s) %s in SortOptions is not found in the empty" + + " JSON string", + SortOptions.openapiRequiredFields.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if ((jsonObj.get("field_name") != null && !jsonObj.get("field_name").isJsonNull()) + && !jsonObj.get("field_name").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `field_name` to be a primitive type in the JSON" + + " string but got `%s`", + jsonObj.get("field_name").toString())); + } + // validate the optional field `field_name` + if (jsonObj.get("field_name") != null && !jsonObj.get("field_name").isJsonNull()) { + FieldNameEnum.validateJsonElement(jsonObj.get("field_name")); + } + if ((jsonObj.get("order") != null && !jsonObj.get("order").isJsonNull()) + && !jsonObj.get("order").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `order` to be a primitive type in the JSON string" + + " but got `%s`", + jsonObj.get("order").toString())); + } + // validate the optional field `order` + if (jsonObj.get("order") != null && !jsonObj.get("order").isJsonNull()) { + OrderEnum.validateJsonElement(jsonObj.get("order")); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!SortOptions.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'SortOptions' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter = + gson.getDelegateAdapter(this, TypeToken.get(SortOptions.class)); + + return (TypeAdapter) + new TypeAdapter() { + @Override + public void write(JsonWriter out, SortOptions value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + obj.remove("additionalProperties"); + // serialize additional properties + if (value.getAdditionalProperties() != null) { + for (Map.Entry entry : + value.getAdditionalProperties().entrySet()) { + if (entry.getValue() instanceof String) + obj.addProperty(entry.getKey(), (String) entry.getValue()); + else if (entry.getValue() instanceof Number) + obj.addProperty(entry.getKey(), (Number) entry.getValue()); + else if (entry.getValue() instanceof Boolean) + obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); + else if (entry.getValue() instanceof Character) + obj.addProperty( + entry.getKey(), (Character) entry.getValue()); + else { + JsonElement jsonElement = gson.toJsonTree(entry.getValue()); + if (jsonElement.isJsonArray()) { + obj.add(entry.getKey(), jsonElement.getAsJsonArray()); + } else { + obj.add(entry.getKey(), jsonElement.getAsJsonObject()); + } + } + } + } + elementAdapter.write(out, obj); + } + + @Override + public SortOptions read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // store additional fields in the deserialized instance + SortOptions instance = thisAdapter.fromJsonTree(jsonObj); + for (Map.Entry entry : jsonObj.entrySet()) { + if (!openapiFields.contains(entry.getKey())) { + if (entry.getValue().isJsonPrimitive()) { // primitive type + if (entry.getValue().getAsJsonPrimitive().isString()) + instance.putAdditionalProperty( + entry.getKey(), entry.getValue().getAsString()); + else if (entry.getValue().getAsJsonPrimitive().isNumber()) + instance.putAdditionalProperty( + entry.getKey(), entry.getValue().getAsNumber()); + else if (entry.getValue().getAsJsonPrimitive().isBoolean()) + instance.putAdditionalProperty( + entry.getKey(), + entry.getValue().getAsBoolean()); + else + throw new IllegalArgumentException( + String.format( + "The field `%s` has unknown primitive" + + " type. Value: %s", + entry.getKey(), + entry.getValue().toString())); + } else if (entry.getValue().isJsonArray()) { + instance.putAdditionalProperty( + entry.getKey(), + gson.fromJson(entry.getValue(), List.class)); + } else { // JSON object + instance.putAdditionalProperty( + entry.getKey(), + gson.fromJson(entry.getValue(), HashMap.class)); + } + } + } + return instance; + } + }.nullSafe(); + } + } + + /** + * Create an instance of SortOptions given an JSON string + * + * @param jsonString JSON string + * @return An instance of SortOptions + * @throws IOException if the JSON string is invalid with respect to SortOptions + */ + public static SortOptions fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, SortOptions.class); + } + + /** + * Convert an instance of SortOptions to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} diff --git a/sdks/java/src/main/java/com/thoughtspot/client/model/SortingOptions.java b/sdks/java/src/main/java/com/thoughtspot/client/model/SortingOptions.java new file mode 100644 index 000000000..872873891 --- /dev/null +++ b/sdks/java/src/main/java/com/thoughtspot/client/model/SortingOptions.java @@ -0,0 +1,344 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client.model; + +import com.google.gson.Gson; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.TypeAdapter; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.annotations.SerializedName; +import com.google.gson.reflect.TypeToken; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import com.thoughtspot.client.JSON; +import java.io.IOException; +import java.io.Serializable; +import java.util.Arrays; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Objects; +import org.openapitools.jackson.nullable.JsonNullable; + +/** Sort options. */ +@javax.annotation.Generated( + value = "org.openapitools.codegen.languages.JavaClientCodegen", + comments = "Generator version: 7.12.0") +public class SortingOptions implements Serializable { + private static final long serialVersionUID = 1L; + + public static final String SERIALIZED_NAME_FIELD_NAME = "field_name"; + + @SerializedName(SERIALIZED_NAME_FIELD_NAME) + @javax.annotation.Nullable + private String fieldName; + + public static final String SERIALIZED_NAME_ORDER = "order"; + + @SerializedName(SERIALIZED_NAME_ORDER) + @javax.annotation.Nullable + private String order; + + public SortingOptions() {} + + public SortingOptions fieldName(@javax.annotation.Nullable String fieldName) { + this.fieldName = fieldName; + return this; + } + + /** + * Name of the field to apply the sort on. + * + * @return fieldName + */ + @javax.annotation.Nullable + public String getFieldName() { + return fieldName; + } + + public void setFieldName(@javax.annotation.Nullable String fieldName) { + this.fieldName = fieldName; + } + + public SortingOptions order(@javax.annotation.Nullable String order) { + this.order = order; + return this; + } + + /** + * Sort order : ASC(Ascending) or DESC(Descending). + * + * @return order + */ + @javax.annotation.Nullable + public String getOrder() { + return order; + } + + public void setOrder(@javax.annotation.Nullable String order) { + this.order = order; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key name of the property + * @param value value of the property + * @return the SortingOptions instance itself + */ + public SortingOptions putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return a map of objects + */ + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key name of the property + * @return an object + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + SortingOptions sortingOptions = (SortingOptions) o; + return Objects.equals(this.fieldName, sortingOptions.fieldName) + && Objects.equals(this.order, sortingOptions.order) + && Objects.equals(this.additionalProperties, sortingOptions.additionalProperties); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b + || (a != null + && b != null + && a.isPresent() + && b.isPresent() + && Objects.deepEquals(a.get(), b.get())); + } + + @Override + public int hashCode() { + return Objects.hash(fieldName, order, additionalProperties); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; + } + return a.isPresent() ? Arrays.deepHashCode(new Object[] {a.get()}) : 31; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class SortingOptions {\n"); + sb.append(" fieldName: ").append(toIndentedString(fieldName)).append("\n"); + sb.append(" order: ").append(toIndentedString(order)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first + * line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("field_name"); + openapiFields.add("order"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to SortingOptions + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!SortingOptions.openapiRequiredFields + .isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException( + String.format( + "The required field(s) %s in SortingOptions is not found in the" + + " empty JSON string", + SortingOptions.openapiRequiredFields.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if ((jsonObj.get("field_name") != null && !jsonObj.get("field_name").isJsonNull()) + && !jsonObj.get("field_name").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `field_name` to be a primitive type in the JSON" + + " string but got `%s`", + jsonObj.get("field_name").toString())); + } + if ((jsonObj.get("order") != null && !jsonObj.get("order").isJsonNull()) + && !jsonObj.get("order").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `order` to be a primitive type in the JSON string" + + " but got `%s`", + jsonObj.get("order").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!SortingOptions.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'SortingOptions' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter = + gson.getDelegateAdapter(this, TypeToken.get(SortingOptions.class)); + + return (TypeAdapter) + new TypeAdapter() { + @Override + public void write(JsonWriter out, SortingOptions value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + obj.remove("additionalProperties"); + // serialize additional properties + if (value.getAdditionalProperties() != null) { + for (Map.Entry entry : + value.getAdditionalProperties().entrySet()) { + if (entry.getValue() instanceof String) + obj.addProperty(entry.getKey(), (String) entry.getValue()); + else if (entry.getValue() instanceof Number) + obj.addProperty(entry.getKey(), (Number) entry.getValue()); + else if (entry.getValue() instanceof Boolean) + obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); + else if (entry.getValue() instanceof Character) + obj.addProperty( + entry.getKey(), (Character) entry.getValue()); + else { + JsonElement jsonElement = gson.toJsonTree(entry.getValue()); + if (jsonElement.isJsonArray()) { + obj.add(entry.getKey(), jsonElement.getAsJsonArray()); + } else { + obj.add(entry.getKey(), jsonElement.getAsJsonObject()); + } + } + } + } + elementAdapter.write(out, obj); + } + + @Override + public SortingOptions read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // store additional fields in the deserialized instance + SortingOptions instance = thisAdapter.fromJsonTree(jsonObj); + for (Map.Entry entry : jsonObj.entrySet()) { + if (!openapiFields.contains(entry.getKey())) { + if (entry.getValue().isJsonPrimitive()) { // primitive type + if (entry.getValue().getAsJsonPrimitive().isString()) + instance.putAdditionalProperty( + entry.getKey(), entry.getValue().getAsString()); + else if (entry.getValue().getAsJsonPrimitive().isNumber()) + instance.putAdditionalProperty( + entry.getKey(), entry.getValue().getAsNumber()); + else if (entry.getValue().getAsJsonPrimitive().isBoolean()) + instance.putAdditionalProperty( + entry.getKey(), + entry.getValue().getAsBoolean()); + else + throw new IllegalArgumentException( + String.format( + "The field `%s` has unknown primitive" + + " type. Value: %s", + entry.getKey(), + entry.getValue().toString())); + } else if (entry.getValue().isJsonArray()) { + instance.putAdditionalProperty( + entry.getKey(), + gson.fromJson(entry.getValue(), List.class)); + } else { // JSON object + instance.putAdditionalProperty( + entry.getKey(), + gson.fromJson(entry.getValue(), HashMap.class)); + } + } + } + return instance; + } + }.nullSafe(); + } + } + + /** + * Create an instance of SortingOptions given an JSON string + * + * @param jsonString JSON string + * @return An instance of SortingOptions + * @throws IOException if the JSON string is invalid with respect to SortingOptions + */ + public static SortingOptions fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, SortingOptions.class); + } + + /** + * Convert an instance of SortingOptions to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} diff --git a/sdks/java/src/main/java/com/thoughtspot/client/model/SqlQuery.java b/sdks/java/src/main/java/com/thoughtspot/client/model/SqlQuery.java new file mode 100644 index 000000000..ea0b27d26 --- /dev/null +++ b/sdks/java/src/main/java/com/thoughtspot/client/model/SqlQuery.java @@ -0,0 +1,372 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client.model; + +import com.google.gson.Gson; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.TypeAdapter; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.annotations.SerializedName; +import com.google.gson.reflect.TypeToken; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import com.thoughtspot.client.JSON; +import java.io.IOException; +import java.io.Serializable; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Objects; + +/** Response format associated with fetch SQL query api */ +@javax.annotation.Generated( + value = "org.openapitools.codegen.languages.JavaClientCodegen", + comments = "Generator version: 7.12.0") +public class SqlQuery implements Serializable { + private static final long serialVersionUID = 1L; + + public static final String SERIALIZED_NAME_METADATA_ID = "metadata_id"; + + @SerializedName(SERIALIZED_NAME_METADATA_ID) + @javax.annotation.Nonnull + private String metadataId; + + public static final String SERIALIZED_NAME_METADATA_NAME = "metadata_name"; + + @SerializedName(SERIALIZED_NAME_METADATA_NAME) + @javax.annotation.Nonnull + private String metadataName; + + public static final String SERIALIZED_NAME_SQL_QUERY = "sql_query"; + + @SerializedName(SERIALIZED_NAME_SQL_QUERY) + @javax.annotation.Nonnull + private String sqlQuery; + + public SqlQuery() {} + + public SqlQuery metadataId(@javax.annotation.Nonnull String metadataId) { + this.metadataId = metadataId; + return this; + } + + /** + * Unique identifier of the metadata. + * + * @return metadataId + */ + @javax.annotation.Nonnull + public String getMetadataId() { + return metadataId; + } + + public void setMetadataId(@javax.annotation.Nonnull String metadataId) { + this.metadataId = metadataId; + } + + public SqlQuery metadataName(@javax.annotation.Nonnull String metadataName) { + this.metadataName = metadataName; + return this; + } + + /** + * Name of the metadata. + * + * @return metadataName + */ + @javax.annotation.Nonnull + public String getMetadataName() { + return metadataName; + } + + public void setMetadataName(@javax.annotation.Nonnull String metadataName) { + this.metadataName = metadataName; + } + + public SqlQuery sqlQuery(@javax.annotation.Nonnull String sqlQuery) { + this.sqlQuery = sqlQuery; + return this; + } + + /** + * SQL query of a metadata object. + * + * @return sqlQuery + */ + @javax.annotation.Nonnull + public String getSqlQuery() { + return sqlQuery; + } + + public void setSqlQuery(@javax.annotation.Nonnull String sqlQuery) { + this.sqlQuery = sqlQuery; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key name of the property + * @param value value of the property + * @return the SqlQuery instance itself + */ + public SqlQuery putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return a map of objects + */ + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key name of the property + * @return an object + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + SqlQuery sqlQuery = (SqlQuery) o; + return Objects.equals(this.metadataId, sqlQuery.metadataId) + && Objects.equals(this.metadataName, sqlQuery.metadataName) + && Objects.equals(this.sqlQuery, sqlQuery.sqlQuery) + && Objects.equals(this.additionalProperties, sqlQuery.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(metadataId, metadataName, sqlQuery, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class SqlQuery {\n"); + sb.append(" metadataId: ").append(toIndentedString(metadataId)).append("\n"); + sb.append(" metadataName: ").append(toIndentedString(metadataName)).append("\n"); + sb.append(" sqlQuery: ").append(toIndentedString(sqlQuery)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first + * line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("metadata_id"); + openapiFields.add("metadata_name"); + openapiFields.add("sql_query"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + openapiRequiredFields.add("metadata_id"); + openapiRequiredFields.add("metadata_name"); + openapiRequiredFields.add("sql_query"); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to SqlQuery + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!SqlQuery.openapiRequiredFields + .isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException( + String.format( + "The required field(s) %s in SqlQuery is not found in the empty" + + " JSON string", + SqlQuery.openapiRequiredFields.toString())); + } + } + + // check to make sure all required properties/fields are present in the JSON string + for (String requiredField : SqlQuery.openapiRequiredFields) { + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException( + String.format( + "The required field `%s` is not found in the JSON string: %s", + requiredField, jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if (!jsonObj.get("metadata_id").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `metadata_id` to be a primitive type in the JSON" + + " string but got `%s`", + jsonObj.get("metadata_id").toString())); + } + if (!jsonObj.get("metadata_name").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `metadata_name` to be a primitive type in the JSON" + + " string but got `%s`", + jsonObj.get("metadata_name").toString())); + } + if (!jsonObj.get("sql_query").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `sql_query` to be a primitive type in the JSON" + + " string but got `%s`", + jsonObj.get("sql_query").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!SqlQuery.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'SqlQuery' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter = + gson.getDelegateAdapter(this, TypeToken.get(SqlQuery.class)); + + return (TypeAdapter) + new TypeAdapter() { + @Override + public void write(JsonWriter out, SqlQuery value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + obj.remove("additionalProperties"); + // serialize additional properties + if (value.getAdditionalProperties() != null) { + for (Map.Entry entry : + value.getAdditionalProperties().entrySet()) { + if (entry.getValue() instanceof String) + obj.addProperty(entry.getKey(), (String) entry.getValue()); + else if (entry.getValue() instanceof Number) + obj.addProperty(entry.getKey(), (Number) entry.getValue()); + else if (entry.getValue() instanceof Boolean) + obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); + else if (entry.getValue() instanceof Character) + obj.addProperty( + entry.getKey(), (Character) entry.getValue()); + else { + JsonElement jsonElement = gson.toJsonTree(entry.getValue()); + if (jsonElement.isJsonArray()) { + obj.add(entry.getKey(), jsonElement.getAsJsonArray()); + } else { + obj.add(entry.getKey(), jsonElement.getAsJsonObject()); + } + } + } + } + elementAdapter.write(out, obj); + } + + @Override + public SqlQuery read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // store additional fields in the deserialized instance + SqlQuery instance = thisAdapter.fromJsonTree(jsonObj); + for (Map.Entry entry : jsonObj.entrySet()) { + if (!openapiFields.contains(entry.getKey())) { + if (entry.getValue().isJsonPrimitive()) { // primitive type + if (entry.getValue().getAsJsonPrimitive().isString()) + instance.putAdditionalProperty( + entry.getKey(), entry.getValue().getAsString()); + else if (entry.getValue().getAsJsonPrimitive().isNumber()) + instance.putAdditionalProperty( + entry.getKey(), entry.getValue().getAsNumber()); + else if (entry.getValue().getAsJsonPrimitive().isBoolean()) + instance.putAdditionalProperty( + entry.getKey(), + entry.getValue().getAsBoolean()); + else + throw new IllegalArgumentException( + String.format( + "The field `%s` has unknown primitive" + + " type. Value: %s", + entry.getKey(), + entry.getValue().toString())); + } else if (entry.getValue().isJsonArray()) { + instance.putAdditionalProperty( + entry.getKey(), + gson.fromJson(entry.getValue(), List.class)); + } else { // JSON object + instance.putAdditionalProperty( + entry.getKey(), + gson.fromJson(entry.getValue(), HashMap.class)); + } + } + } + return instance; + } + }.nullSafe(); + } + } + + /** + * Create an instance of SqlQuery given an JSON string + * + * @param jsonString JSON string + * @return An instance of SqlQuery + * @throws IOException if the JSON string is invalid with respect to SqlQuery + */ + public static SqlQuery fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, SqlQuery.class); + } + + /** + * Convert an instance of SqlQuery to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} diff --git a/sdks/java/src/main/java/com/thoughtspot/client/model/SqlQueryResponse.java b/sdks/java/src/main/java/com/thoughtspot/client/model/SqlQueryResponse.java new file mode 100644 index 000000000..1433aeebe --- /dev/null +++ b/sdks/java/src/main/java/com/thoughtspot/client/model/SqlQueryResponse.java @@ -0,0 +1,496 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client.model; + +import com.google.gson.Gson; +import com.google.gson.JsonArray; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.TypeAdapter; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.reflect.TypeToken; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import com.thoughtspot.client.JSON; +import java.io.IOException; +import java.io.Serializable; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Objects; + +/** SqlQueryResponse */ +@javax.annotation.Generated( + value = "org.openapitools.codegen.languages.JavaClientCodegen", + comments = "Generator version: 7.12.0") +public class SqlQueryResponse implements Serializable { + private static final long serialVersionUID = 1L; + + public static final String SERIALIZED_NAME_METADATA_ID = "metadata_id"; + + @SerializedName(SERIALIZED_NAME_METADATA_ID) + @javax.annotation.Nonnull + private String metadataId; + + public static final String SERIALIZED_NAME_METADATA_NAME = "metadata_name"; + + @SerializedName(SERIALIZED_NAME_METADATA_NAME) + @javax.annotation.Nonnull + private String metadataName; + + /** Type of the metadata. */ + @JsonAdapter(MetadataTypeEnum.Adapter.class) + public enum MetadataTypeEnum { + LIVEBOARD("LIVEBOARD"), + + ANSWER("ANSWER"), + + LOGICAL_TABLE("LOGICAL_TABLE"), + + LOGICAL_COLUMN("LOGICAL_COLUMN"), + + CONNECTION("CONNECTION"), + + TAG("TAG"), + + USER("USER"), + + USER_GROUP("USER_GROUP"), + + LOGICAL_RELATIONSHIP("LOGICAL_RELATIONSHIP"); + + private String value; + + MetadataTypeEnum(String value) { + this.value = value; + } + + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + public static MetadataTypeEnum fromValue(String value) { + for (MetadataTypeEnum b : MetadataTypeEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + + public static class Adapter extends TypeAdapter { + @Override + public void write(final JsonWriter jsonWriter, final MetadataTypeEnum enumeration) + throws IOException { + jsonWriter.value(enumeration.getValue()); + } + + @Override + public MetadataTypeEnum read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + return MetadataTypeEnum.fromValue(value); + } + } + + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + String value = jsonElement.getAsString(); + MetadataTypeEnum.fromValue(value); + } + } + + public static final String SERIALIZED_NAME_METADATA_TYPE = "metadata_type"; + + @SerializedName(SERIALIZED_NAME_METADATA_TYPE) + @javax.annotation.Nonnull + private MetadataTypeEnum metadataType; + + public static final String SERIALIZED_NAME_SQL_QUERIES = "sql_queries"; + + @SerializedName(SERIALIZED_NAME_SQL_QUERIES) + @javax.annotation.Nonnull + private List sqlQueries; + + public SqlQueryResponse() {} + + public SqlQueryResponse metadataId(@javax.annotation.Nonnull String metadataId) { + this.metadataId = metadataId; + return this; + } + + /** + * Unique identifier of the metadata. + * + * @return metadataId + */ + @javax.annotation.Nonnull + public String getMetadataId() { + return metadataId; + } + + public void setMetadataId(@javax.annotation.Nonnull String metadataId) { + this.metadataId = metadataId; + } + + public SqlQueryResponse metadataName(@javax.annotation.Nonnull String metadataName) { + this.metadataName = metadataName; + return this; + } + + /** + * Name of the metadata. + * + * @return metadataName + */ + @javax.annotation.Nonnull + public String getMetadataName() { + return metadataName; + } + + public void setMetadataName(@javax.annotation.Nonnull String metadataName) { + this.metadataName = metadataName; + } + + public SqlQueryResponse metadataType(@javax.annotation.Nonnull MetadataTypeEnum metadataType) { + this.metadataType = metadataType; + return this; + } + + /** + * Type of the metadata. + * + * @return metadataType + */ + @javax.annotation.Nonnull + public MetadataTypeEnum getMetadataType() { + return metadataType; + } + + public void setMetadataType(@javax.annotation.Nonnull MetadataTypeEnum metadataType) { + this.metadataType = metadataType; + } + + public SqlQueryResponse sqlQueries(@javax.annotation.Nonnull List sqlQueries) { + this.sqlQueries = sqlQueries; + return this; + } + + public SqlQueryResponse addSqlQueriesItem(SqlQuery sqlQueriesItem) { + if (this.sqlQueries == null) { + this.sqlQueries = new ArrayList<>(); + } + this.sqlQueries.add(sqlQueriesItem); + return this; + } + + /** + * SQL query details of metadata objects. + * + * @return sqlQueries + */ + @javax.annotation.Nonnull + public List getSqlQueries() { + return sqlQueries; + } + + public void setSqlQueries(@javax.annotation.Nonnull List sqlQueries) { + this.sqlQueries = sqlQueries; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key name of the property + * @param value value of the property + * @return the SqlQueryResponse instance itself + */ + public SqlQueryResponse putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return a map of objects + */ + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key name of the property + * @return an object + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + SqlQueryResponse sqlQueryResponse = (SqlQueryResponse) o; + return Objects.equals(this.metadataId, sqlQueryResponse.metadataId) + && Objects.equals(this.metadataName, sqlQueryResponse.metadataName) + && Objects.equals(this.metadataType, sqlQueryResponse.metadataType) + && Objects.equals(this.sqlQueries, sqlQueryResponse.sqlQueries) + && Objects.equals(this.additionalProperties, sqlQueryResponse.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash( + metadataId, metadataName, metadataType, sqlQueries, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class SqlQueryResponse {\n"); + sb.append(" metadataId: ").append(toIndentedString(metadataId)).append("\n"); + sb.append(" metadataName: ").append(toIndentedString(metadataName)).append("\n"); + sb.append(" metadataType: ").append(toIndentedString(metadataType)).append("\n"); + sb.append(" sqlQueries: ").append(toIndentedString(sqlQueries)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first + * line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("metadata_id"); + openapiFields.add("metadata_name"); + openapiFields.add("metadata_type"); + openapiFields.add("sql_queries"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + openapiRequiredFields.add("metadata_id"); + openapiRequiredFields.add("metadata_name"); + openapiRequiredFields.add("metadata_type"); + openapiRequiredFields.add("sql_queries"); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to SqlQueryResponse + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!SqlQueryResponse.openapiRequiredFields + .isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException( + String.format( + "The required field(s) %s in SqlQueryResponse is not found in the" + + " empty JSON string", + SqlQueryResponse.openapiRequiredFields.toString())); + } + } + + // check to make sure all required properties/fields are present in the JSON string + for (String requiredField : SqlQueryResponse.openapiRequiredFields) { + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException( + String.format( + "The required field `%s` is not found in the JSON string: %s", + requiredField, jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if (!jsonObj.get("metadata_id").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `metadata_id` to be a primitive type in the JSON" + + " string but got `%s`", + jsonObj.get("metadata_id").toString())); + } + if (!jsonObj.get("metadata_name").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `metadata_name` to be a primitive type in the JSON" + + " string but got `%s`", + jsonObj.get("metadata_name").toString())); + } + if (!jsonObj.get("metadata_type").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `metadata_type` to be a primitive type in the JSON" + + " string but got `%s`", + jsonObj.get("metadata_type").toString())); + } + // validate the required field `metadata_type` + MetadataTypeEnum.validateJsonElement(jsonObj.get("metadata_type")); + // ensure the json data is an array + if (!jsonObj.get("sql_queries").isJsonArray()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `sql_queries` to be an array in the JSON string" + + " but got `%s`", + jsonObj.get("sql_queries").toString())); + } + + JsonArray jsonArraysqlQueries = jsonObj.getAsJsonArray("sql_queries"); + // validate the required field `sql_queries` (array) + for (int i = 0; i < jsonArraysqlQueries.size(); i++) { + SqlQuery.validateJsonElement(jsonArraysqlQueries.get(i)); + } + ; + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!SqlQueryResponse.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'SqlQueryResponse' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter = + gson.getDelegateAdapter(this, TypeToken.get(SqlQueryResponse.class)); + + return (TypeAdapter) + new TypeAdapter() { + @Override + public void write(JsonWriter out, SqlQueryResponse value) + throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + obj.remove("additionalProperties"); + // serialize additional properties + if (value.getAdditionalProperties() != null) { + for (Map.Entry entry : + value.getAdditionalProperties().entrySet()) { + if (entry.getValue() instanceof String) + obj.addProperty(entry.getKey(), (String) entry.getValue()); + else if (entry.getValue() instanceof Number) + obj.addProperty(entry.getKey(), (Number) entry.getValue()); + else if (entry.getValue() instanceof Boolean) + obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); + else if (entry.getValue() instanceof Character) + obj.addProperty( + entry.getKey(), (Character) entry.getValue()); + else { + JsonElement jsonElement = gson.toJsonTree(entry.getValue()); + if (jsonElement.isJsonArray()) { + obj.add(entry.getKey(), jsonElement.getAsJsonArray()); + } else { + obj.add(entry.getKey(), jsonElement.getAsJsonObject()); + } + } + } + } + elementAdapter.write(out, obj); + } + + @Override + public SqlQueryResponse read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // store additional fields in the deserialized instance + SqlQueryResponse instance = thisAdapter.fromJsonTree(jsonObj); + for (Map.Entry entry : jsonObj.entrySet()) { + if (!openapiFields.contains(entry.getKey())) { + if (entry.getValue().isJsonPrimitive()) { // primitive type + if (entry.getValue().getAsJsonPrimitive().isString()) + instance.putAdditionalProperty( + entry.getKey(), entry.getValue().getAsString()); + else if (entry.getValue().getAsJsonPrimitive().isNumber()) + instance.putAdditionalProperty( + entry.getKey(), entry.getValue().getAsNumber()); + else if (entry.getValue().getAsJsonPrimitive().isBoolean()) + instance.putAdditionalProperty( + entry.getKey(), + entry.getValue().getAsBoolean()); + else + throw new IllegalArgumentException( + String.format( + "The field `%s` has unknown primitive" + + " type. Value: %s", + entry.getKey(), + entry.getValue().toString())); + } else if (entry.getValue().isJsonArray()) { + instance.putAdditionalProperty( + entry.getKey(), + gson.fromJson(entry.getValue(), List.class)); + } else { // JSON object + instance.putAdditionalProperty( + entry.getKey(), + gson.fromJson(entry.getValue(), HashMap.class)); + } + } + } + return instance; + } + }.nullSafe(); + } + } + + /** + * Create an instance of SqlQueryResponse given an JSON string + * + * @param jsonString JSON string + * @return An instance of SqlQueryResponse + * @throws IOException if the JSON string is invalid with respect to SqlQueryResponse + */ + public static SqlQueryResponse fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, SqlQueryResponse.class); + } + + /** + * Convert an instance of SqlQueryResponse to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} diff --git a/sdks/java/src/main/java/com/thoughtspot/client/model/StorageConfig.java b/sdks/java/src/main/java/com/thoughtspot/client/model/StorageConfig.java new file mode 100644 index 000000000..47ce3f640 --- /dev/null +++ b/sdks/java/src/main/java/com/thoughtspot/client/model/StorageConfig.java @@ -0,0 +1,286 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client.model; + +import com.google.gson.Gson; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.TypeAdapter; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.annotations.SerializedName; +import com.google.gson.reflect.TypeToken; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import com.thoughtspot.client.JSON; +import java.io.IOException; +import java.io.Serializable; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Objects; + +/** Storage configuration containing provider-specific settings. */ +@javax.annotation.Generated( + value = "org.openapitools.codegen.languages.JavaClientCodegen", + comments = "Generator version: 7.12.0") +public class StorageConfig implements Serializable { + private static final long serialVersionUID = 1L; + + public static final String SERIALIZED_NAME_AWS_S3_CONFIG = "aws_s3_config"; + + @SerializedName(SERIALIZED_NAME_AWS_S3_CONFIG) + @javax.annotation.Nullable + private AwsS3Config awsS3Config; + + public StorageConfig() {} + + public StorageConfig awsS3Config(@javax.annotation.Nullable AwsS3Config awsS3Config) { + this.awsS3Config = awsS3Config; + return this; + } + + /** + * Get awsS3Config + * + * @return awsS3Config + */ + @javax.annotation.Nullable + public AwsS3Config getAwsS3Config() { + return awsS3Config; + } + + public void setAwsS3Config(@javax.annotation.Nullable AwsS3Config awsS3Config) { + this.awsS3Config = awsS3Config; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key name of the property + * @param value value of the property + * @return the StorageConfig instance itself + */ + public StorageConfig putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return a map of objects + */ + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key name of the property + * @return an object + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + StorageConfig storageConfig = (StorageConfig) o; + return Objects.equals(this.awsS3Config, storageConfig.awsS3Config) + && Objects.equals(this.additionalProperties, storageConfig.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(awsS3Config, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class StorageConfig {\n"); + sb.append(" awsS3Config: ").append(toIndentedString(awsS3Config)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first + * line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("aws_s3_config"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to StorageConfig + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!StorageConfig.openapiRequiredFields + .isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException( + String.format( + "The required field(s) %s in StorageConfig is not found in the" + + " empty JSON string", + StorageConfig.openapiRequiredFields.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // validate the optional field `aws_s3_config` + if (jsonObj.get("aws_s3_config") != null && !jsonObj.get("aws_s3_config").isJsonNull()) { + AwsS3Config.validateJsonElement(jsonObj.get("aws_s3_config")); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!StorageConfig.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'StorageConfig' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter = + gson.getDelegateAdapter(this, TypeToken.get(StorageConfig.class)); + + return (TypeAdapter) + new TypeAdapter() { + @Override + public void write(JsonWriter out, StorageConfig value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + obj.remove("additionalProperties"); + // serialize additional properties + if (value.getAdditionalProperties() != null) { + for (Map.Entry entry : + value.getAdditionalProperties().entrySet()) { + if (entry.getValue() instanceof String) + obj.addProperty(entry.getKey(), (String) entry.getValue()); + else if (entry.getValue() instanceof Number) + obj.addProperty(entry.getKey(), (Number) entry.getValue()); + else if (entry.getValue() instanceof Boolean) + obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); + else if (entry.getValue() instanceof Character) + obj.addProperty( + entry.getKey(), (Character) entry.getValue()); + else { + JsonElement jsonElement = gson.toJsonTree(entry.getValue()); + if (jsonElement.isJsonArray()) { + obj.add(entry.getKey(), jsonElement.getAsJsonArray()); + } else { + obj.add(entry.getKey(), jsonElement.getAsJsonObject()); + } + } + } + } + elementAdapter.write(out, obj); + } + + @Override + public StorageConfig read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // store additional fields in the deserialized instance + StorageConfig instance = thisAdapter.fromJsonTree(jsonObj); + for (Map.Entry entry : jsonObj.entrySet()) { + if (!openapiFields.contains(entry.getKey())) { + if (entry.getValue().isJsonPrimitive()) { // primitive type + if (entry.getValue().getAsJsonPrimitive().isString()) + instance.putAdditionalProperty( + entry.getKey(), entry.getValue().getAsString()); + else if (entry.getValue().getAsJsonPrimitive().isNumber()) + instance.putAdditionalProperty( + entry.getKey(), entry.getValue().getAsNumber()); + else if (entry.getValue().getAsJsonPrimitive().isBoolean()) + instance.putAdditionalProperty( + entry.getKey(), + entry.getValue().getAsBoolean()); + else + throw new IllegalArgumentException( + String.format( + "The field `%s` has unknown primitive" + + " type. Value: %s", + entry.getKey(), + entry.getValue().toString())); + } else if (entry.getValue().isJsonArray()) { + instance.putAdditionalProperty( + entry.getKey(), + gson.fromJson(entry.getValue(), List.class)); + } else { // JSON object + instance.putAdditionalProperty( + entry.getKey(), + gson.fromJson(entry.getValue(), HashMap.class)); + } + } + } + return instance; + } + }.nullSafe(); + } + } + + /** + * Create an instance of StorageConfig given an JSON string + * + * @param jsonString JSON string + * @return An instance of StorageConfig + * @throws IOException if the JSON string is invalid with respect to StorageConfig + */ + public static StorageConfig fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, StorageConfig.class); + } + + /** + * Convert an instance of StorageConfig to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} diff --git a/sdks/java/src/main/java/com/thoughtspot/client/model/StorageConfigInput.java b/sdks/java/src/main/java/com/thoughtspot/client/model/StorageConfigInput.java new file mode 100644 index 000000000..cb1c9ea40 --- /dev/null +++ b/sdks/java/src/main/java/com/thoughtspot/client/model/StorageConfigInput.java @@ -0,0 +1,288 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client.model; + +import com.google.gson.Gson; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.TypeAdapter; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.annotations.SerializedName; +import com.google.gson.reflect.TypeToken; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import com.thoughtspot.client.JSON; +import java.io.IOException; +import java.io.Serializable; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Objects; + +/** Input type for storage configuration. */ +@javax.annotation.Generated( + value = "org.openapitools.codegen.languages.JavaClientCodegen", + comments = "Generator version: 7.12.0") +public class StorageConfigInput implements Serializable { + private static final long serialVersionUID = 1L; + + public static final String SERIALIZED_NAME_AWS_S3_CONFIG = "aws_s3_config"; + + @SerializedName(SERIALIZED_NAME_AWS_S3_CONFIG) + @javax.annotation.Nullable + private AwsS3ConfigInput awsS3Config; + + public StorageConfigInput() {} + + public StorageConfigInput awsS3Config(@javax.annotation.Nullable AwsS3ConfigInput awsS3Config) { + this.awsS3Config = awsS3Config; + return this; + } + + /** + * Get awsS3Config + * + * @return awsS3Config + */ + @javax.annotation.Nullable + public AwsS3ConfigInput getAwsS3Config() { + return awsS3Config; + } + + public void setAwsS3Config(@javax.annotation.Nullable AwsS3ConfigInput awsS3Config) { + this.awsS3Config = awsS3Config; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key name of the property + * @param value value of the property + * @return the StorageConfigInput instance itself + */ + public StorageConfigInput putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return a map of objects + */ + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key name of the property + * @return an object + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + StorageConfigInput storageConfigInput = (StorageConfigInput) o; + return Objects.equals(this.awsS3Config, storageConfigInput.awsS3Config) + && Objects.equals( + this.additionalProperties, storageConfigInput.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(awsS3Config, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class StorageConfigInput {\n"); + sb.append(" awsS3Config: ").append(toIndentedString(awsS3Config)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first + * line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("aws_s3_config"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to StorageConfigInput + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!StorageConfigInput.openapiRequiredFields + .isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException( + String.format( + "The required field(s) %s in StorageConfigInput is not found in" + + " the empty JSON string", + StorageConfigInput.openapiRequiredFields.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // validate the optional field `aws_s3_config` + if (jsonObj.get("aws_s3_config") != null && !jsonObj.get("aws_s3_config").isJsonNull()) { + AwsS3ConfigInput.validateJsonElement(jsonObj.get("aws_s3_config")); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!StorageConfigInput.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'StorageConfigInput' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter = + gson.getDelegateAdapter(this, TypeToken.get(StorageConfigInput.class)); + + return (TypeAdapter) + new TypeAdapter() { + @Override + public void write(JsonWriter out, StorageConfigInput value) + throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + obj.remove("additionalProperties"); + // serialize additional properties + if (value.getAdditionalProperties() != null) { + for (Map.Entry entry : + value.getAdditionalProperties().entrySet()) { + if (entry.getValue() instanceof String) + obj.addProperty(entry.getKey(), (String) entry.getValue()); + else if (entry.getValue() instanceof Number) + obj.addProperty(entry.getKey(), (Number) entry.getValue()); + else if (entry.getValue() instanceof Boolean) + obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); + else if (entry.getValue() instanceof Character) + obj.addProperty( + entry.getKey(), (Character) entry.getValue()); + else { + JsonElement jsonElement = gson.toJsonTree(entry.getValue()); + if (jsonElement.isJsonArray()) { + obj.add(entry.getKey(), jsonElement.getAsJsonArray()); + } else { + obj.add(entry.getKey(), jsonElement.getAsJsonObject()); + } + } + } + } + elementAdapter.write(out, obj); + } + + @Override + public StorageConfigInput read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // store additional fields in the deserialized instance + StorageConfigInput instance = thisAdapter.fromJsonTree(jsonObj); + for (Map.Entry entry : jsonObj.entrySet()) { + if (!openapiFields.contains(entry.getKey())) { + if (entry.getValue().isJsonPrimitive()) { // primitive type + if (entry.getValue().getAsJsonPrimitive().isString()) + instance.putAdditionalProperty( + entry.getKey(), entry.getValue().getAsString()); + else if (entry.getValue().getAsJsonPrimitive().isNumber()) + instance.putAdditionalProperty( + entry.getKey(), entry.getValue().getAsNumber()); + else if (entry.getValue().getAsJsonPrimitive().isBoolean()) + instance.putAdditionalProperty( + entry.getKey(), + entry.getValue().getAsBoolean()); + else + throw new IllegalArgumentException( + String.format( + "The field `%s` has unknown primitive" + + " type. Value: %s", + entry.getKey(), + entry.getValue().toString())); + } else if (entry.getValue().isJsonArray()) { + instance.putAdditionalProperty( + entry.getKey(), + gson.fromJson(entry.getValue(), List.class)); + } else { // JSON object + instance.putAdditionalProperty( + entry.getKey(), + gson.fromJson(entry.getValue(), HashMap.class)); + } + } + } + return instance; + } + }.nullSafe(); + } + } + + /** + * Create an instance of StorageConfigInput given an JSON string + * + * @param jsonString JSON string + * @return An instance of StorageConfigInput + * @throws IOException if the JSON string is invalid with respect to StorageConfigInput + */ + public static StorageConfigInput fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, StorageConfigInput.class); + } + + /** + * Convert an instance of StorageConfigInput to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} diff --git a/sdks/java/src/main/java/com/thoughtspot/client/model/StorageDestination.java b/sdks/java/src/main/java/com/thoughtspot/client/model/StorageDestination.java new file mode 100644 index 000000000..15a8922f6 --- /dev/null +++ b/sdks/java/src/main/java/com/thoughtspot/client/model/StorageDestination.java @@ -0,0 +1,385 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client.model; + +import com.google.gson.Gson; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.TypeAdapter; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.reflect.TypeToken; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import com.thoughtspot.client.JSON; +import java.io.IOException; +import java.io.Serializable; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Objects; + +/** Storage destination configuration for webhook payload delivery. */ +@javax.annotation.Generated( + value = "org.openapitools.codegen.languages.JavaClientCodegen", + comments = "Generator version: 7.12.0") +public class StorageDestination implements Serializable { + private static final long serialVersionUID = 1L; + + /** Type of storage destination (e.g., AWS_S3). */ + @JsonAdapter(StorageTypeEnum.Adapter.class) + public enum StorageTypeEnum { + AWS_S3("AWS_S3"); + + private String value; + + StorageTypeEnum(String value) { + this.value = value; + } + + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + public static StorageTypeEnum fromValue(String value) { + for (StorageTypeEnum b : StorageTypeEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + + public static class Adapter extends TypeAdapter { + @Override + public void write(final JsonWriter jsonWriter, final StorageTypeEnum enumeration) + throws IOException { + jsonWriter.value(enumeration.getValue()); + } + + @Override + public StorageTypeEnum read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + return StorageTypeEnum.fromValue(value); + } + } + + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + String value = jsonElement.getAsString(); + StorageTypeEnum.fromValue(value); + } + } + + public static final String SERIALIZED_NAME_STORAGE_TYPE = "storage_type"; + + @SerializedName(SERIALIZED_NAME_STORAGE_TYPE) + @javax.annotation.Nonnull + private StorageTypeEnum storageType; + + public static final String SERIALIZED_NAME_STORAGE_CONFIG = "storage_config"; + + @SerializedName(SERIALIZED_NAME_STORAGE_CONFIG) + @javax.annotation.Nonnull + private StorageConfig storageConfig; + + public StorageDestination() {} + + public StorageDestination storageType(@javax.annotation.Nonnull StorageTypeEnum storageType) { + this.storageType = storageType; + return this; + } + + /** + * Type of storage destination (e.g., AWS_S3). + * + * @return storageType + */ + @javax.annotation.Nonnull + public StorageTypeEnum getStorageType() { + return storageType; + } + + public void setStorageType(@javax.annotation.Nonnull StorageTypeEnum storageType) { + this.storageType = storageType; + } + + public StorageDestination storageConfig(@javax.annotation.Nonnull StorageConfig storageConfig) { + this.storageConfig = storageConfig; + return this; + } + + /** + * Get storageConfig + * + * @return storageConfig + */ + @javax.annotation.Nonnull + public StorageConfig getStorageConfig() { + return storageConfig; + } + + public void setStorageConfig(@javax.annotation.Nonnull StorageConfig storageConfig) { + this.storageConfig = storageConfig; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key name of the property + * @param value value of the property + * @return the StorageDestination instance itself + */ + public StorageDestination putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return a map of objects + */ + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key name of the property + * @return an object + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + StorageDestination storageDestination = (StorageDestination) o; + return Objects.equals(this.storageType, storageDestination.storageType) + && Objects.equals(this.storageConfig, storageDestination.storageConfig) + && Objects.equals( + this.additionalProperties, storageDestination.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(storageType, storageConfig, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class StorageDestination {\n"); + sb.append(" storageType: ").append(toIndentedString(storageType)).append("\n"); + sb.append(" storageConfig: ").append(toIndentedString(storageConfig)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first + * line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("storage_type"); + openapiFields.add("storage_config"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + openapiRequiredFields.add("storage_type"); + openapiRequiredFields.add("storage_config"); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to StorageDestination + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!StorageDestination.openapiRequiredFields + .isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException( + String.format( + "The required field(s) %s in StorageDestination is not found in" + + " the empty JSON string", + StorageDestination.openapiRequiredFields.toString())); + } + } + + // check to make sure all required properties/fields are present in the JSON string + for (String requiredField : StorageDestination.openapiRequiredFields) { + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException( + String.format( + "The required field `%s` is not found in the JSON string: %s", + requiredField, jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if (!jsonObj.get("storage_type").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `storage_type` to be a primitive type in the JSON" + + " string but got `%s`", + jsonObj.get("storage_type").toString())); + } + // validate the required field `storage_type` + StorageTypeEnum.validateJsonElement(jsonObj.get("storage_type")); + // validate the required field `storage_config` + StorageConfig.validateJsonElement(jsonObj.get("storage_config")); + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!StorageDestination.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'StorageDestination' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter = + gson.getDelegateAdapter(this, TypeToken.get(StorageDestination.class)); + + return (TypeAdapter) + new TypeAdapter() { + @Override + public void write(JsonWriter out, StorageDestination value) + throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + obj.remove("additionalProperties"); + // serialize additional properties + if (value.getAdditionalProperties() != null) { + for (Map.Entry entry : + value.getAdditionalProperties().entrySet()) { + if (entry.getValue() instanceof String) + obj.addProperty(entry.getKey(), (String) entry.getValue()); + else if (entry.getValue() instanceof Number) + obj.addProperty(entry.getKey(), (Number) entry.getValue()); + else if (entry.getValue() instanceof Boolean) + obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); + else if (entry.getValue() instanceof Character) + obj.addProperty( + entry.getKey(), (Character) entry.getValue()); + else { + JsonElement jsonElement = gson.toJsonTree(entry.getValue()); + if (jsonElement.isJsonArray()) { + obj.add(entry.getKey(), jsonElement.getAsJsonArray()); + } else { + obj.add(entry.getKey(), jsonElement.getAsJsonObject()); + } + } + } + } + elementAdapter.write(out, obj); + } + + @Override + public StorageDestination read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // store additional fields in the deserialized instance + StorageDestination instance = thisAdapter.fromJsonTree(jsonObj); + for (Map.Entry entry : jsonObj.entrySet()) { + if (!openapiFields.contains(entry.getKey())) { + if (entry.getValue().isJsonPrimitive()) { // primitive type + if (entry.getValue().getAsJsonPrimitive().isString()) + instance.putAdditionalProperty( + entry.getKey(), entry.getValue().getAsString()); + else if (entry.getValue().getAsJsonPrimitive().isNumber()) + instance.putAdditionalProperty( + entry.getKey(), entry.getValue().getAsNumber()); + else if (entry.getValue().getAsJsonPrimitive().isBoolean()) + instance.putAdditionalProperty( + entry.getKey(), + entry.getValue().getAsBoolean()); + else + throw new IllegalArgumentException( + String.format( + "The field `%s` has unknown primitive" + + " type. Value: %s", + entry.getKey(), + entry.getValue().toString())); + } else if (entry.getValue().isJsonArray()) { + instance.putAdditionalProperty( + entry.getKey(), + gson.fromJson(entry.getValue(), List.class)); + } else { // JSON object + instance.putAdditionalProperty( + entry.getKey(), + gson.fromJson(entry.getValue(), HashMap.class)); + } + } + } + return instance; + } + }.nullSafe(); + } + } + + /** + * Create an instance of StorageDestination given an JSON string + * + * @param jsonString JSON string + * @return An instance of StorageDestination + * @throws IOException if the JSON string is invalid with respect to StorageDestination + */ + public static StorageDestination fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, StorageDestination.class); + } + + /** + * Convert an instance of StorageDestination to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} diff --git a/sdks/java/src/main/java/com/thoughtspot/client/model/StorageDestinationInput.java b/sdks/java/src/main/java/com/thoughtspot/client/model/StorageDestinationInput.java new file mode 100644 index 000000000..95f7be78b --- /dev/null +++ b/sdks/java/src/main/java/com/thoughtspot/client/model/StorageDestinationInput.java @@ -0,0 +1,388 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client.model; + +import com.google.gson.Gson; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.TypeAdapter; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.reflect.TypeToken; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import com.thoughtspot.client.JSON; +import java.io.IOException; +import java.io.Serializable; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Objects; + +/** Input type for storage destination configuration. */ +@javax.annotation.Generated( + value = "org.openapitools.codegen.languages.JavaClientCodegen", + comments = "Generator version: 7.12.0") +public class StorageDestinationInput implements Serializable { + private static final long serialVersionUID = 1L; + + /** Type of storage destination. Example: \"AWS_S3\" */ + @JsonAdapter(StorageTypeEnum.Adapter.class) + public enum StorageTypeEnum { + AWS_S3("AWS_S3"); + + private String value; + + StorageTypeEnum(String value) { + this.value = value; + } + + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + public static StorageTypeEnum fromValue(String value) { + for (StorageTypeEnum b : StorageTypeEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + + public static class Adapter extends TypeAdapter { + @Override + public void write(final JsonWriter jsonWriter, final StorageTypeEnum enumeration) + throws IOException { + jsonWriter.value(enumeration.getValue()); + } + + @Override + public StorageTypeEnum read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + return StorageTypeEnum.fromValue(value); + } + } + + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + String value = jsonElement.getAsString(); + StorageTypeEnum.fromValue(value); + } + } + + public static final String SERIALIZED_NAME_STORAGE_TYPE = "storage_type"; + + @SerializedName(SERIALIZED_NAME_STORAGE_TYPE) + @javax.annotation.Nonnull + private StorageTypeEnum storageType; + + public static final String SERIALIZED_NAME_STORAGE_CONFIG = "storage_config"; + + @SerializedName(SERIALIZED_NAME_STORAGE_CONFIG) + @javax.annotation.Nonnull + private StorageConfigInput storageConfig; + + public StorageDestinationInput() {} + + public StorageDestinationInput storageType( + @javax.annotation.Nonnull StorageTypeEnum storageType) { + this.storageType = storageType; + return this; + } + + /** + * Type of storage destination. Example: \"AWS_S3\" + * + * @return storageType + */ + @javax.annotation.Nonnull + public StorageTypeEnum getStorageType() { + return storageType; + } + + public void setStorageType(@javax.annotation.Nonnull StorageTypeEnum storageType) { + this.storageType = storageType; + } + + public StorageDestinationInput storageConfig( + @javax.annotation.Nonnull StorageConfigInput storageConfig) { + this.storageConfig = storageConfig; + return this; + } + + /** + * Get storageConfig + * + * @return storageConfig + */ + @javax.annotation.Nonnull + public StorageConfigInput getStorageConfig() { + return storageConfig; + } + + public void setStorageConfig(@javax.annotation.Nonnull StorageConfigInput storageConfig) { + this.storageConfig = storageConfig; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key name of the property + * @param value value of the property + * @return the StorageDestinationInput instance itself + */ + public StorageDestinationInput putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return a map of objects + */ + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key name of the property + * @return an object + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + StorageDestinationInput storageDestinationInput = (StorageDestinationInput) o; + return Objects.equals(this.storageType, storageDestinationInput.storageType) + && Objects.equals(this.storageConfig, storageDestinationInput.storageConfig) + && Objects.equals( + this.additionalProperties, storageDestinationInput.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(storageType, storageConfig, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class StorageDestinationInput {\n"); + sb.append(" storageType: ").append(toIndentedString(storageType)).append("\n"); + sb.append(" storageConfig: ").append(toIndentedString(storageConfig)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first + * line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("storage_type"); + openapiFields.add("storage_config"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + openapiRequiredFields.add("storage_type"); + openapiRequiredFields.add("storage_config"); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to StorageDestinationInput + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!StorageDestinationInput.openapiRequiredFields + .isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException( + String.format( + "The required field(s) %s in StorageDestinationInput is not found" + + " in the empty JSON string", + StorageDestinationInput.openapiRequiredFields.toString())); + } + } + + // check to make sure all required properties/fields are present in the JSON string + for (String requiredField : StorageDestinationInput.openapiRequiredFields) { + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException( + String.format( + "The required field `%s` is not found in the JSON string: %s", + requiredField, jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if (!jsonObj.get("storage_type").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `storage_type` to be a primitive type in the JSON" + + " string but got `%s`", + jsonObj.get("storage_type").toString())); + } + // validate the required field `storage_type` + StorageTypeEnum.validateJsonElement(jsonObj.get("storage_type")); + // validate the required field `storage_config` + StorageConfigInput.validateJsonElement(jsonObj.get("storage_config")); + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!StorageDestinationInput.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'StorageDestinationInput' and its + // subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter = + gson.getDelegateAdapter(this, TypeToken.get(StorageDestinationInput.class)); + + return (TypeAdapter) + new TypeAdapter() { + @Override + public void write(JsonWriter out, StorageDestinationInput value) + throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + obj.remove("additionalProperties"); + // serialize additional properties + if (value.getAdditionalProperties() != null) { + for (Map.Entry entry : + value.getAdditionalProperties().entrySet()) { + if (entry.getValue() instanceof String) + obj.addProperty(entry.getKey(), (String) entry.getValue()); + else if (entry.getValue() instanceof Number) + obj.addProperty(entry.getKey(), (Number) entry.getValue()); + else if (entry.getValue() instanceof Boolean) + obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); + else if (entry.getValue() instanceof Character) + obj.addProperty( + entry.getKey(), (Character) entry.getValue()); + else { + JsonElement jsonElement = gson.toJsonTree(entry.getValue()); + if (jsonElement.isJsonArray()) { + obj.add(entry.getKey(), jsonElement.getAsJsonArray()); + } else { + obj.add(entry.getKey(), jsonElement.getAsJsonObject()); + } + } + } + } + elementAdapter.write(out, obj); + } + + @Override + public StorageDestinationInput read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // store additional fields in the deserialized instance + StorageDestinationInput instance = thisAdapter.fromJsonTree(jsonObj); + for (Map.Entry entry : jsonObj.entrySet()) { + if (!openapiFields.contains(entry.getKey())) { + if (entry.getValue().isJsonPrimitive()) { // primitive type + if (entry.getValue().getAsJsonPrimitive().isString()) + instance.putAdditionalProperty( + entry.getKey(), entry.getValue().getAsString()); + else if (entry.getValue().getAsJsonPrimitive().isNumber()) + instance.putAdditionalProperty( + entry.getKey(), entry.getValue().getAsNumber()); + else if (entry.getValue().getAsJsonPrimitive().isBoolean()) + instance.putAdditionalProperty( + entry.getKey(), + entry.getValue().getAsBoolean()); + else + throw new IllegalArgumentException( + String.format( + "The field `%s` has unknown primitive" + + " type. Value: %s", + entry.getKey(), + entry.getValue().toString())); + } else if (entry.getValue().isJsonArray()) { + instance.putAdditionalProperty( + entry.getKey(), + gson.fromJson(entry.getValue(), List.class)); + } else { // JSON object + instance.putAdditionalProperty( + entry.getKey(), + gson.fromJson(entry.getValue(), HashMap.class)); + } + } + } + return instance; + } + }.nullSafe(); + } + } + + /** + * Create an instance of StorageDestinationInput given an JSON string + * + * @param jsonString JSON string + * @return An instance of StorageDestinationInput + * @throws IOException if the JSON string is invalid with respect to StorageDestinationInput + */ + public static StorageDestinationInput fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, StorageDestinationInput.class); + } + + /** + * Convert an instance of StorageDestinationInput to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} diff --git a/sdks/java/src/main/java/com/thoughtspot/client/model/SyncMetadataRequest.java b/sdks/java/src/main/java/com/thoughtspot/client/model/SyncMetadataRequest.java new file mode 100644 index 000000000..407c16a19 --- /dev/null +++ b/sdks/java/src/main/java/com/thoughtspot/client/model/SyncMetadataRequest.java @@ -0,0 +1,387 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client.model; + +import com.google.gson.Gson; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.TypeAdapter; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.reflect.TypeToken; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import com.thoughtspot.client.JSON; +import java.io.IOException; +import java.io.Serializable; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Objects; + +/** SyncMetadataRequest */ +@javax.annotation.Generated( + value = "org.openapitools.codegen.languages.JavaClientCodegen", + comments = "Generator version: 7.12.0") +public class SyncMetadataRequest implements Serializable { + private static final long serialVersionUID = 1L; + + public static final String SERIALIZED_NAME_TABLES = "tables"; + + @SerializedName(SERIALIZED_NAME_TABLES) + @javax.annotation.Nullable + private Object tables; + + /** Gets or Sets syncAttributes */ + @JsonAdapter(SyncAttributesEnum.Adapter.class) + public enum SyncAttributesEnum { + DESCRIPTION("DESCRIPTION"); + + private String value; + + SyncAttributesEnum(String value) { + this.value = value; + } + + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + public static SyncAttributesEnum fromValue(String value) { + for (SyncAttributesEnum b : SyncAttributesEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + + public static class Adapter extends TypeAdapter { + @Override + public void write(final JsonWriter jsonWriter, final SyncAttributesEnum enumeration) + throws IOException { + jsonWriter.value(enumeration.getValue()); + } + + @Override + public SyncAttributesEnum read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + return SyncAttributesEnum.fromValue(value); + } + } + + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + String value = jsonElement.getAsString(); + SyncAttributesEnum.fromValue(value); + } + } + + public static final String SERIALIZED_NAME_SYNC_ATTRIBUTES = "sync_attributes"; + + @SerializedName(SERIALIZED_NAME_SYNC_ATTRIBUTES) + @javax.annotation.Nullable + private List syncAttributes = + new ArrayList<>(Arrays.asList(SyncAttributesEnum.DESCRIPTION)); + + public SyncMetadataRequest() {} + + public SyncMetadataRequest tables(@javax.annotation.Nullable Object tables) { + this.tables = tables; + return this; + } + + /** + * Array of tables to sync. Each element can be: - String: Table identifier (GUID or name) to + * sync all columns for that table. - Object: {tableId: [columnIds]} to sync specific columns. + * If not provided, syncs all tables in the connection. + * + * @return tables + */ + @javax.annotation.Nullable + public Object getTables() { + return tables; + } + + public void setTables(@javax.annotation.Nullable Object tables) { + this.tables = tables; + } + + public SyncMetadataRequest syncAttributes( + @javax.annotation.Nullable List syncAttributes) { + this.syncAttributes = syncAttributes; + return this; + } + + public SyncMetadataRequest addSyncAttributesItem(SyncAttributesEnum syncAttributesItem) { + if (this.syncAttributes == null) { + this.syncAttributes = new ArrayList<>(Arrays.asList(SyncAttributesEnum.DESCRIPTION)); + } + this.syncAttributes.add(syncAttributesItem); + return this; + } + + /** + * List of sync_attributes to sync from CDW. The default value is DESCRIPTION. + * + * @return syncAttributes + */ + @javax.annotation.Nullable + public List getSyncAttributes() { + return syncAttributes; + } + + public void setSyncAttributes( + @javax.annotation.Nullable List syncAttributes) { + this.syncAttributes = syncAttributes; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key name of the property + * @param value value of the property + * @return the SyncMetadataRequest instance itself + */ + public SyncMetadataRequest putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return a map of objects + */ + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key name of the property + * @return an object + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + SyncMetadataRequest syncMetadataRequest = (SyncMetadataRequest) o; + return Objects.equals(this.tables, syncMetadataRequest.tables) + && Objects.equals(this.syncAttributes, syncMetadataRequest.syncAttributes) + && Objects.equals( + this.additionalProperties, syncMetadataRequest.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(tables, syncAttributes, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class SyncMetadataRequest {\n"); + sb.append(" tables: ").append(toIndentedString(tables)).append("\n"); + sb.append(" syncAttributes: ").append(toIndentedString(syncAttributes)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first + * line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("tables"); + openapiFields.add("sync_attributes"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to SyncMetadataRequest + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!SyncMetadataRequest.openapiRequiredFields + .isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException( + String.format( + "The required field(s) %s in SyncMetadataRequest is not found in" + + " the empty JSON string", + SyncMetadataRequest.openapiRequiredFields.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // ensure the optional json data is an array if present + if (jsonObj.get("sync_attributes") != null + && !jsonObj.get("sync_attributes").isJsonNull() + && !jsonObj.get("sync_attributes").isJsonArray()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `sync_attributes` to be an array in the JSON" + + " string but got `%s`", + jsonObj.get("sync_attributes").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!SyncMetadataRequest.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'SyncMetadataRequest' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter = + gson.getDelegateAdapter(this, TypeToken.get(SyncMetadataRequest.class)); + + return (TypeAdapter) + new TypeAdapter() { + @Override + public void write(JsonWriter out, SyncMetadataRequest value) + throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + obj.remove("additionalProperties"); + // serialize additional properties + if (value.getAdditionalProperties() != null) { + for (Map.Entry entry : + value.getAdditionalProperties().entrySet()) { + if (entry.getValue() instanceof String) + obj.addProperty(entry.getKey(), (String) entry.getValue()); + else if (entry.getValue() instanceof Number) + obj.addProperty(entry.getKey(), (Number) entry.getValue()); + else if (entry.getValue() instanceof Boolean) + obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); + else if (entry.getValue() instanceof Character) + obj.addProperty( + entry.getKey(), (Character) entry.getValue()); + else { + JsonElement jsonElement = gson.toJsonTree(entry.getValue()); + if (jsonElement.isJsonArray()) { + obj.add(entry.getKey(), jsonElement.getAsJsonArray()); + } else { + obj.add(entry.getKey(), jsonElement.getAsJsonObject()); + } + } + } + } + elementAdapter.write(out, obj); + } + + @Override + public SyncMetadataRequest read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // store additional fields in the deserialized instance + SyncMetadataRequest instance = thisAdapter.fromJsonTree(jsonObj); + for (Map.Entry entry : jsonObj.entrySet()) { + if (!openapiFields.contains(entry.getKey())) { + if (entry.getValue().isJsonPrimitive()) { // primitive type + if (entry.getValue().getAsJsonPrimitive().isString()) + instance.putAdditionalProperty( + entry.getKey(), entry.getValue().getAsString()); + else if (entry.getValue().getAsJsonPrimitive().isNumber()) + instance.putAdditionalProperty( + entry.getKey(), entry.getValue().getAsNumber()); + else if (entry.getValue().getAsJsonPrimitive().isBoolean()) + instance.putAdditionalProperty( + entry.getKey(), + entry.getValue().getAsBoolean()); + else + throw new IllegalArgumentException( + String.format( + "The field `%s` has unknown primitive" + + " type. Value: %s", + entry.getKey(), + entry.getValue().toString())); + } else if (entry.getValue().isJsonArray()) { + instance.putAdditionalProperty( + entry.getKey(), + gson.fromJson(entry.getValue(), List.class)); + } else { // JSON object + instance.putAdditionalProperty( + entry.getKey(), + gson.fromJson(entry.getValue(), HashMap.class)); + } + } + } + return instance; + } + }.nullSafe(); + } + } + + /** + * Create an instance of SyncMetadataRequest given an JSON string + * + * @param jsonString JSON string + * @return An instance of SyncMetadataRequest + * @throws IOException if the JSON string is invalid with respect to SyncMetadataRequest + */ + public static SyncMetadataRequest fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, SyncMetadataRequest.class); + } + + /** + * Convert an instance of SyncMetadataRequest to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} diff --git a/sdks/java/src/main/java/com/thoughtspot/client/model/SyncMetadataResponse.java b/sdks/java/src/main/java/com/thoughtspot/client/model/SyncMetadataResponse.java new file mode 100644 index 000000000..f6353a697 --- /dev/null +++ b/sdks/java/src/main/java/com/thoughtspot/client/model/SyncMetadataResponse.java @@ -0,0 +1,523 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client.model; + +import com.google.gson.Gson; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.TypeAdapter; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.reflect.TypeToken; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import com.thoughtspot.client.JSON; +import java.io.IOException; +import java.io.Serializable; +import java.util.Arrays; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Objects; +import org.openapitools.jackson.nullable.JsonNullable; + +/** Response from sync metadata operation. */ +@javax.annotation.Generated( + value = "org.openapitools.codegen.languages.JavaClientCodegen", + comments = "Generator version: 7.12.0") +public class SyncMetadataResponse implements Serializable { + private static final long serialVersionUID = 1L; + + /** Overall status of the sync operation. */ + @JsonAdapter(StatusEnum.Adapter.class) + public enum StatusEnum { + SUCCESS("SUCCESS"), + + PARTIAL_SUCCESS("PARTIAL_SUCCESS"), + + NO_UPDATE("NO_UPDATE"); + + private String value; + + StatusEnum(String value) { + this.value = value; + } + + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + public static StatusEnum fromValue(String value) { + for (StatusEnum b : StatusEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + return null; + } + + public static class Adapter extends TypeAdapter { + @Override + public void write(final JsonWriter jsonWriter, final StatusEnum enumeration) + throws IOException { + jsonWriter.value(enumeration.getValue()); + } + + @Override + public StatusEnum read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + return StatusEnum.fromValue(value); + } + } + + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + String value = jsonElement.getAsString(); + StatusEnum.fromValue(value); + } + } + + public static final String SERIALIZED_NAME_STATUS = "status"; + + @SerializedName(SERIALIZED_NAME_STATUS) + @javax.annotation.Nullable + private StatusEnum status; + + public static final String SERIALIZED_NAME_TABLES_UPDATED = "tables_updated"; + + @SerializedName(SERIALIZED_NAME_TABLES_UPDATED) + @javax.annotation.Nullable + private Integer tablesUpdated; + + public static final String SERIALIZED_NAME_COLUMNS_UPDATED = "columns_updated"; + + @SerializedName(SERIALIZED_NAME_COLUMNS_UPDATED) + @javax.annotation.Nullable + private Integer columnsUpdated; + + public static final String SERIALIZED_NAME_TABLES_FAILED = "tables_failed"; + + @SerializedName(SERIALIZED_NAME_TABLES_FAILED) + @javax.annotation.Nullable + private Integer tablesFailed; + + public static final String SERIALIZED_NAME_COLUMNS_FAILED = "columns_failed"; + + @SerializedName(SERIALIZED_NAME_COLUMNS_FAILED) + @javax.annotation.Nullable + private Integer columnsFailed; + + public static final String SERIALIZED_NAME_MESSAGE = "message"; + + @SerializedName(SERIALIZED_NAME_MESSAGE) + @javax.annotation.Nullable + private String message; + + public SyncMetadataResponse() {} + + public SyncMetadataResponse status(@javax.annotation.Nullable StatusEnum status) { + this.status = status; + return this; + } + + /** + * Overall status of the sync operation. + * + * @return status + */ + @javax.annotation.Nullable + public StatusEnum getStatus() { + return status; + } + + public void setStatus(@javax.annotation.Nullable StatusEnum status) { + this.status = status; + } + + public SyncMetadataResponse tablesUpdated(@javax.annotation.Nullable Integer tablesUpdated) { + this.tablesUpdated = tablesUpdated; + return this; + } + + /** + * Number of tables with metadata updates. + * + * @return tablesUpdated + */ + @javax.annotation.Nullable + public Integer getTablesUpdated() { + return tablesUpdated; + } + + public void setTablesUpdated(@javax.annotation.Nullable Integer tablesUpdated) { + this.tablesUpdated = tablesUpdated; + } + + public SyncMetadataResponse columnsUpdated(@javax.annotation.Nullable Integer columnsUpdated) { + this.columnsUpdated = columnsUpdated; + return this; + } + + /** + * Number of columns with metadata updates. + * + * @return columnsUpdated + */ + @javax.annotation.Nullable + public Integer getColumnsUpdated() { + return columnsUpdated; + } + + public void setColumnsUpdated(@javax.annotation.Nullable Integer columnsUpdated) { + this.columnsUpdated = columnsUpdated; + } + + public SyncMetadataResponse tablesFailed(@javax.annotation.Nullable Integer tablesFailed) { + this.tablesFailed = tablesFailed; + return this; + } + + /** + * Number of tables that failed to sync (for PARTIAL_SUCCESS). + * + * @return tablesFailed + */ + @javax.annotation.Nullable + public Integer getTablesFailed() { + return tablesFailed; + } + + public void setTablesFailed(@javax.annotation.Nullable Integer tablesFailed) { + this.tablesFailed = tablesFailed; + } + + public SyncMetadataResponse columnsFailed(@javax.annotation.Nullable Integer columnsFailed) { + this.columnsFailed = columnsFailed; + return this; + } + + /** + * Number of columns that failed to sync (for PARTIAL_SUCCESS). + * + * @return columnsFailed + */ + @javax.annotation.Nullable + public Integer getColumnsFailed() { + return columnsFailed; + } + + public void setColumnsFailed(@javax.annotation.Nullable Integer columnsFailed) { + this.columnsFailed = columnsFailed; + } + + public SyncMetadataResponse message(@javax.annotation.Nullable String message) { + this.message = message; + return this; + } + + /** + * Message describing the result. + * + * @return message + */ + @javax.annotation.Nullable + public String getMessage() { + return message; + } + + public void setMessage(@javax.annotation.Nullable String message) { + this.message = message; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key name of the property + * @param value value of the property + * @return the SyncMetadataResponse instance itself + */ + public SyncMetadataResponse putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return a map of objects + */ + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key name of the property + * @return an object + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + SyncMetadataResponse syncMetadataResponse = (SyncMetadataResponse) o; + return Objects.equals(this.status, syncMetadataResponse.status) + && Objects.equals(this.tablesUpdated, syncMetadataResponse.tablesUpdated) + && Objects.equals(this.columnsUpdated, syncMetadataResponse.columnsUpdated) + && Objects.equals(this.tablesFailed, syncMetadataResponse.tablesFailed) + && Objects.equals(this.columnsFailed, syncMetadataResponse.columnsFailed) + && Objects.equals(this.message, syncMetadataResponse.message) + && Objects.equals( + this.additionalProperties, syncMetadataResponse.additionalProperties); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b + || (a != null + && b != null + && a.isPresent() + && b.isPresent() + && Objects.deepEquals(a.get(), b.get())); + } + + @Override + public int hashCode() { + return Objects.hash( + status, + tablesUpdated, + columnsUpdated, + tablesFailed, + columnsFailed, + message, + additionalProperties); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; + } + return a.isPresent() ? Arrays.deepHashCode(new Object[] {a.get()}) : 31; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class SyncMetadataResponse {\n"); + sb.append(" status: ").append(toIndentedString(status)).append("\n"); + sb.append(" tablesUpdated: ").append(toIndentedString(tablesUpdated)).append("\n"); + sb.append(" columnsUpdated: ").append(toIndentedString(columnsUpdated)).append("\n"); + sb.append(" tablesFailed: ").append(toIndentedString(tablesFailed)).append("\n"); + sb.append(" columnsFailed: ").append(toIndentedString(columnsFailed)).append("\n"); + sb.append(" message: ").append(toIndentedString(message)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first + * line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("status"); + openapiFields.add("tables_updated"); + openapiFields.add("columns_updated"); + openapiFields.add("tables_failed"); + openapiFields.add("columns_failed"); + openapiFields.add("message"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to SyncMetadataResponse + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!SyncMetadataResponse.openapiRequiredFields + .isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException( + String.format( + "The required field(s) %s in SyncMetadataResponse is not found in" + + " the empty JSON string", + SyncMetadataResponse.openapiRequiredFields.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if ((jsonObj.get("status") != null && !jsonObj.get("status").isJsonNull()) + && !jsonObj.get("status").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `status` to be a primitive type in the JSON string" + + " but got `%s`", + jsonObj.get("status").toString())); + } + // validate the optional field `status` + if (jsonObj.get("status") != null && !jsonObj.get("status").isJsonNull()) { + StatusEnum.validateJsonElement(jsonObj.get("status")); + } + if ((jsonObj.get("message") != null && !jsonObj.get("message").isJsonNull()) + && !jsonObj.get("message").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `message` to be a primitive type in the JSON" + + " string but got `%s`", + jsonObj.get("message").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!SyncMetadataResponse.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'SyncMetadataResponse' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter = + gson.getDelegateAdapter(this, TypeToken.get(SyncMetadataResponse.class)); + + return (TypeAdapter) + new TypeAdapter() { + @Override + public void write(JsonWriter out, SyncMetadataResponse value) + throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + obj.remove("additionalProperties"); + // serialize additional properties + if (value.getAdditionalProperties() != null) { + for (Map.Entry entry : + value.getAdditionalProperties().entrySet()) { + if (entry.getValue() instanceof String) + obj.addProperty(entry.getKey(), (String) entry.getValue()); + else if (entry.getValue() instanceof Number) + obj.addProperty(entry.getKey(), (Number) entry.getValue()); + else if (entry.getValue() instanceof Boolean) + obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); + else if (entry.getValue() instanceof Character) + obj.addProperty( + entry.getKey(), (Character) entry.getValue()); + else { + JsonElement jsonElement = gson.toJsonTree(entry.getValue()); + if (jsonElement.isJsonArray()) { + obj.add(entry.getKey(), jsonElement.getAsJsonArray()); + } else { + obj.add(entry.getKey(), jsonElement.getAsJsonObject()); + } + } + } + } + elementAdapter.write(out, obj); + } + + @Override + public SyncMetadataResponse read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // store additional fields in the deserialized instance + SyncMetadataResponse instance = thisAdapter.fromJsonTree(jsonObj); + for (Map.Entry entry : jsonObj.entrySet()) { + if (!openapiFields.contains(entry.getKey())) { + if (entry.getValue().isJsonPrimitive()) { // primitive type + if (entry.getValue().getAsJsonPrimitive().isString()) + instance.putAdditionalProperty( + entry.getKey(), entry.getValue().getAsString()); + else if (entry.getValue().getAsJsonPrimitive().isNumber()) + instance.putAdditionalProperty( + entry.getKey(), entry.getValue().getAsNumber()); + else if (entry.getValue().getAsJsonPrimitive().isBoolean()) + instance.putAdditionalProperty( + entry.getKey(), + entry.getValue().getAsBoolean()); + else + throw new IllegalArgumentException( + String.format( + "The field `%s` has unknown primitive" + + " type. Value: %s", + entry.getKey(), + entry.getValue().toString())); + } else if (entry.getValue().isJsonArray()) { + instance.putAdditionalProperty( + entry.getKey(), + gson.fromJson(entry.getValue(), List.class)); + } else { // JSON object + instance.putAdditionalProperty( + entry.getKey(), + gson.fromJson(entry.getValue(), HashMap.class)); + } + } + } + return instance; + } + }.nullSafe(); + } + } + + /** + * Create an instance of SyncMetadataResponse given an JSON string + * + * @param jsonString JSON string + * @return An instance of SyncMetadataResponse + * @throws IOException if the JSON string is invalid with respect to SyncMetadataResponse + */ + public static SyncMetadataResponse fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, SyncMetadataResponse.class); + } + + /** + * Convert an instance of SyncMetadataResponse to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} diff --git a/sdks/java/src/main/java/com/thoughtspot/client/model/SystemConfig.java b/sdks/java/src/main/java/com/thoughtspot/client/model/SystemConfig.java new file mode 100644 index 000000000..710bd347a --- /dev/null +++ b/sdks/java/src/main/java/com/thoughtspot/client/model/SystemConfig.java @@ -0,0 +1,368 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client.model; + +import com.google.gson.Gson; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.TypeAdapter; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.annotations.SerializedName; +import com.google.gson.reflect.TypeToken; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import com.thoughtspot.client.JSON; +import java.io.IOException; +import java.io.Serializable; +import java.util.Arrays; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Objects; +import org.openapitools.jackson.nullable.JsonNullable; + +/** SystemConfig */ +@javax.annotation.Generated( + value = "org.openapitools.codegen.languages.JavaClientCodegen", + comments = "Generator version: 7.12.0") +public class SystemConfig implements Serializable { + private static final long serialVersionUID = 1L; + + public static final String SERIALIZED_NAME_ONBOARDING_CONTENT_URL = "onboarding_content_url"; + + @SerializedName(SERIALIZED_NAME_ONBOARDING_CONTENT_URL) + @javax.annotation.Nullable + private String onboardingContentUrl; + + public static final String SERIALIZED_NAME_SAML_ENABLED = "saml_enabled"; + + @SerializedName(SERIALIZED_NAME_SAML_ENABLED) + @javax.annotation.Nullable + private Boolean samlEnabled; + + public static final String SERIALIZED_NAME_OKTA_ENABLED = "okta_enabled"; + + @SerializedName(SERIALIZED_NAME_OKTA_ENABLED) + @javax.annotation.Nullable + private Boolean oktaEnabled; + + public SystemConfig() {} + + public SystemConfig onboardingContentUrl( + @javax.annotation.Nullable String onboardingContentUrl) { + this.onboardingContentUrl = onboardingContentUrl; + return this; + } + + /** + * Get onboardingContentUrl + * + * @return onboardingContentUrl + */ + @javax.annotation.Nullable + public String getOnboardingContentUrl() { + return onboardingContentUrl; + } + + public void setOnboardingContentUrl(@javax.annotation.Nullable String onboardingContentUrl) { + this.onboardingContentUrl = onboardingContentUrl; + } + + public SystemConfig samlEnabled(@javax.annotation.Nullable Boolean samlEnabled) { + this.samlEnabled = samlEnabled; + return this; + } + + /** + * Get samlEnabled + * + * @return samlEnabled + */ + @javax.annotation.Nullable + public Boolean getSamlEnabled() { + return samlEnabled; + } + + public void setSamlEnabled(@javax.annotation.Nullable Boolean samlEnabled) { + this.samlEnabled = samlEnabled; + } + + public SystemConfig oktaEnabled(@javax.annotation.Nullable Boolean oktaEnabled) { + this.oktaEnabled = oktaEnabled; + return this; + } + + /** + * Get oktaEnabled + * + * @return oktaEnabled + */ + @javax.annotation.Nullable + public Boolean getOktaEnabled() { + return oktaEnabled; + } + + public void setOktaEnabled(@javax.annotation.Nullable Boolean oktaEnabled) { + this.oktaEnabled = oktaEnabled; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key name of the property + * @param value value of the property + * @return the SystemConfig instance itself + */ + public SystemConfig putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return a map of objects + */ + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key name of the property + * @return an object + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + SystemConfig systemConfig = (SystemConfig) o; + return Objects.equals(this.onboardingContentUrl, systemConfig.onboardingContentUrl) + && Objects.equals(this.samlEnabled, systemConfig.samlEnabled) + && Objects.equals(this.oktaEnabled, systemConfig.oktaEnabled) + && Objects.equals(this.additionalProperties, systemConfig.additionalProperties); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b + || (a != null + && b != null + && a.isPresent() + && b.isPresent() + && Objects.deepEquals(a.get(), b.get())); + } + + @Override + public int hashCode() { + return Objects.hash(onboardingContentUrl, samlEnabled, oktaEnabled, additionalProperties); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; + } + return a.isPresent() ? Arrays.deepHashCode(new Object[] {a.get()}) : 31; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class SystemConfig {\n"); + sb.append(" onboardingContentUrl: ") + .append(toIndentedString(onboardingContentUrl)) + .append("\n"); + sb.append(" samlEnabled: ").append(toIndentedString(samlEnabled)).append("\n"); + sb.append(" oktaEnabled: ").append(toIndentedString(oktaEnabled)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first + * line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("onboarding_content_url"); + openapiFields.add("saml_enabled"); + openapiFields.add("okta_enabled"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to SystemConfig + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!SystemConfig.openapiRequiredFields + .isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException( + String.format( + "The required field(s) %s in SystemConfig is not found in the" + + " empty JSON string", + SystemConfig.openapiRequiredFields.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if ((jsonObj.get("onboarding_content_url") != null + && !jsonObj.get("onboarding_content_url").isJsonNull()) + && !jsonObj.get("onboarding_content_url").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `onboarding_content_url` to be a primitive type in" + + " the JSON string but got `%s`", + jsonObj.get("onboarding_content_url").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!SystemConfig.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'SystemConfig' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter = + gson.getDelegateAdapter(this, TypeToken.get(SystemConfig.class)); + + return (TypeAdapter) + new TypeAdapter() { + @Override + public void write(JsonWriter out, SystemConfig value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + obj.remove("additionalProperties"); + // serialize additional properties + if (value.getAdditionalProperties() != null) { + for (Map.Entry entry : + value.getAdditionalProperties().entrySet()) { + if (entry.getValue() instanceof String) + obj.addProperty(entry.getKey(), (String) entry.getValue()); + else if (entry.getValue() instanceof Number) + obj.addProperty(entry.getKey(), (Number) entry.getValue()); + else if (entry.getValue() instanceof Boolean) + obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); + else if (entry.getValue() instanceof Character) + obj.addProperty( + entry.getKey(), (Character) entry.getValue()); + else { + JsonElement jsonElement = gson.toJsonTree(entry.getValue()); + if (jsonElement.isJsonArray()) { + obj.add(entry.getKey(), jsonElement.getAsJsonArray()); + } else { + obj.add(entry.getKey(), jsonElement.getAsJsonObject()); + } + } + } + } + elementAdapter.write(out, obj); + } + + @Override + public SystemConfig read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // store additional fields in the deserialized instance + SystemConfig instance = thisAdapter.fromJsonTree(jsonObj); + for (Map.Entry entry : jsonObj.entrySet()) { + if (!openapiFields.contains(entry.getKey())) { + if (entry.getValue().isJsonPrimitive()) { // primitive type + if (entry.getValue().getAsJsonPrimitive().isString()) + instance.putAdditionalProperty( + entry.getKey(), entry.getValue().getAsString()); + else if (entry.getValue().getAsJsonPrimitive().isNumber()) + instance.putAdditionalProperty( + entry.getKey(), entry.getValue().getAsNumber()); + else if (entry.getValue().getAsJsonPrimitive().isBoolean()) + instance.putAdditionalProperty( + entry.getKey(), + entry.getValue().getAsBoolean()); + else + throw new IllegalArgumentException( + String.format( + "The field `%s` has unknown primitive" + + " type. Value: %s", + entry.getKey(), + entry.getValue().toString())); + } else if (entry.getValue().isJsonArray()) { + instance.putAdditionalProperty( + entry.getKey(), + gson.fromJson(entry.getValue(), List.class)); + } else { // JSON object + instance.putAdditionalProperty( + entry.getKey(), + gson.fromJson(entry.getValue(), HashMap.class)); + } + } + } + return instance; + } + }.nullSafe(); + } + } + + /** + * Create an instance of SystemConfig given an JSON string + * + * @param jsonString JSON string + * @return An instance of SystemConfig + * @throws IOException if the JSON string is invalid with respect to SystemConfig + */ + public static SystemConfig fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, SystemConfig.class); + } + + /** + * Convert an instance of SystemConfig to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} diff --git a/sdks/java/src/main/java/com/thoughtspot/client/model/SystemInfo.java b/sdks/java/src/main/java/com/thoughtspot/client/model/SystemInfo.java new file mode 100644 index 000000000..bc924462d --- /dev/null +++ b/sdks/java/src/main/java/com/thoughtspot/client/model/SystemInfo.java @@ -0,0 +1,1124 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client.model; + +import com.google.gson.Gson; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.TypeAdapter; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.annotations.SerializedName; +import com.google.gson.reflect.TypeToken; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import com.thoughtspot.client.JSON; +import java.io.IOException; +import java.io.Serializable; +import java.util.Arrays; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Objects; +import org.openapitools.jackson.nullable.JsonNullable; + +/** SystemInfo */ +@javax.annotation.Generated( + value = "org.openapitools.codegen.languages.JavaClientCodegen", + comments = "Generator version: 7.12.0") +public class SystemInfo implements Serializable { + private static final long serialVersionUID = 1L; + + public static final String SERIALIZED_NAME_ID = "id"; + + @SerializedName(SERIALIZED_NAME_ID) + @javax.annotation.Nullable + private String id; + + public static final String SERIALIZED_NAME_NAME = "name"; + + @SerializedName(SERIALIZED_NAME_NAME) + @javax.annotation.Nullable + private String name; + + public static final String SERIALIZED_NAME_RELEASE_VERSION = "release_version"; + + @SerializedName(SERIALIZED_NAME_RELEASE_VERSION) + @javax.annotation.Nullable + private String releaseVersion; + + public static final String SERIALIZED_NAME_TIME_ZONE = "time_zone"; + + @SerializedName(SERIALIZED_NAME_TIME_ZONE) + @javax.annotation.Nullable + private String timeZone; + + public static final String SERIALIZED_NAME_LOCALE = "locale"; + + @SerializedName(SERIALIZED_NAME_LOCALE) + @javax.annotation.Nullable + private String locale; + + public static final String SERIALIZED_NAME_DATE_FORMAT = "date_format"; + + @SerializedName(SERIALIZED_NAME_DATE_FORMAT) + @javax.annotation.Nullable + private String dateFormat; + + public static final String SERIALIZED_NAME_API_VERSION = "api_version"; + + @SerializedName(SERIALIZED_NAME_API_VERSION) + @javax.annotation.Nullable + private String apiVersion; + + public static final String SERIALIZED_NAME_TYPE = "type"; + + @SerializedName(SERIALIZED_NAME_TYPE) + @javax.annotation.Nullable + private String type; + + public static final String SERIALIZED_NAME_ENVIRONMENT = "environment"; + + @SerializedName(SERIALIZED_NAME_ENVIRONMENT) + @javax.annotation.Nullable + private String environment; + + public static final String SERIALIZED_NAME_LICENSE = "license"; + + @SerializedName(SERIALIZED_NAME_LICENSE) + @javax.annotation.Nullable + private String license; + + public static final String SERIALIZED_NAME_DATE_TIME_FORMAT = "date_time_format"; + + @SerializedName(SERIALIZED_NAME_DATE_TIME_FORMAT) + @javax.annotation.Nullable + private String dateTimeFormat; + + public static final String SERIALIZED_NAME_TIME_FORMAT = "time_format"; + + @SerializedName(SERIALIZED_NAME_TIME_FORMAT) + @javax.annotation.Nullable + private String timeFormat; + + public static final String SERIALIZED_NAME_SYSTEM_USER_ID = "system_user_id"; + + @SerializedName(SERIALIZED_NAME_SYSTEM_USER_ID) + @javax.annotation.Nullable + private String systemUserId; + + public static final String SERIALIZED_NAME_SUPER_USER_ID = "super_user_id"; + + @SerializedName(SERIALIZED_NAME_SUPER_USER_ID) + @javax.annotation.Nullable + private String superUserId; + + public static final String SERIALIZED_NAME_HIDDEN_OBJECT_ID = "hidden_object_id"; + + @SerializedName(SERIALIZED_NAME_HIDDEN_OBJECT_ID) + @javax.annotation.Nullable + private String hiddenObjectId; + + public static final String SERIALIZED_NAME_SYSTEM_GROUP_ID = "system_group_id"; + + @SerializedName(SERIALIZED_NAME_SYSTEM_GROUP_ID) + @javax.annotation.Nullable + private String systemGroupId; + + public static final String SERIALIZED_NAME_TSADMIN_USER_ID = "tsadmin_user_id"; + + @SerializedName(SERIALIZED_NAME_TSADMIN_USER_ID) + @javax.annotation.Nullable + private String tsadminUserId; + + public static final String SERIALIZED_NAME_ADMIN_GROUP_ID = "admin_group_id"; + + @SerializedName(SERIALIZED_NAME_ADMIN_GROUP_ID) + @javax.annotation.Nullable + private String adminGroupId; + + public static final String SERIALIZED_NAME_ALL_TABLES_CONNECTION_ID = + "all_tables_connection_id"; + + @SerializedName(SERIALIZED_NAME_ALL_TABLES_CONNECTION_ID) + @javax.annotation.Nullable + private String allTablesConnectionId; + + public static final String SERIALIZED_NAME_ALL_USER_GROUP_ID = "all_user_group_id"; + + @SerializedName(SERIALIZED_NAME_ALL_USER_GROUP_ID) + @javax.annotation.Nullable + private String allUserGroupId; + + public static final String SERIALIZED_NAME_ACCEPT_LANGUAGE = "accept_language"; + + @SerializedName(SERIALIZED_NAME_ACCEPT_LANGUAGE) + @javax.annotation.Nullable + private String acceptLanguage; + + public static final String SERIALIZED_NAME_ALL_USER_GROUP_MEMBER_USER_COUNT = + "all_user_group_member_user_count"; + + @SerializedName(SERIALIZED_NAME_ALL_USER_GROUP_MEMBER_USER_COUNT) + @javax.annotation.Nullable + private Integer allUserGroupMemberUserCount; + + public static final String SERIALIZED_NAME_LOGICAL_MODEL_VERSION = "logical_model_version"; + + @SerializedName(SERIALIZED_NAME_LOGICAL_MODEL_VERSION) + @javax.annotation.Nullable + private Integer logicalModelVersion; + + public SystemInfo() {} + + public SystemInfo id(@javax.annotation.Nullable String id) { + this.id = id; + return this; + } + + /** + * The unique identifier of the object + * + * @return id + */ + @javax.annotation.Nullable + public String getId() { + return id; + } + + public void setId(@javax.annotation.Nullable String id) { + this.id = id; + } + + public SystemInfo name(@javax.annotation.Nullable String name) { + this.name = name; + return this; + } + + /** + * Name of the cluster. + * + * @return name + */ + @javax.annotation.Nullable + public String getName() { + return name; + } + + public void setName(@javax.annotation.Nullable String name) { + this.name = name; + } + + public SystemInfo releaseVersion(@javax.annotation.Nullable String releaseVersion) { + this.releaseVersion = releaseVersion; + return this; + } + + /** + * The release version of the cluster. + * + * @return releaseVersion + */ + @javax.annotation.Nullable + public String getReleaseVersion() { + return releaseVersion; + } + + public void setReleaseVersion(@javax.annotation.Nullable String releaseVersion) { + this.releaseVersion = releaseVersion; + } + + public SystemInfo timeZone(@javax.annotation.Nullable String timeZone) { + this.timeZone = timeZone; + return this; + } + + /** + * The timezone of the cluster. + * + * @return timeZone + */ + @javax.annotation.Nullable + public String getTimeZone() { + return timeZone; + } + + public void setTimeZone(@javax.annotation.Nullable String timeZone) { + this.timeZone = timeZone; + } + + public SystemInfo locale(@javax.annotation.Nullable String locale) { + this.locale = locale; + return this; + } + + /** + * The default locale of the cluster. + * + * @return locale + */ + @javax.annotation.Nullable + public String getLocale() { + return locale; + } + + public void setLocale(@javax.annotation.Nullable String locale) { + this.locale = locale; + } + + public SystemInfo dateFormat(@javax.annotation.Nullable String dateFormat) { + this.dateFormat = dateFormat; + return this; + } + + /** + * The default date format representation of the cluster. + * + * @return dateFormat + */ + @javax.annotation.Nullable + public String getDateFormat() { + return dateFormat; + } + + public void setDateFormat(@javax.annotation.Nullable String dateFormat) { + this.dateFormat = dateFormat; + } + + public SystemInfo apiVersion(@javax.annotation.Nullable String apiVersion) { + this.apiVersion = apiVersion; + return this; + } + + /** + * The API version of the cluster. + * + * @return apiVersion + */ + @javax.annotation.Nullable + public String getApiVersion() { + return apiVersion; + } + + public void setApiVersion(@javax.annotation.Nullable String apiVersion) { + this.apiVersion = apiVersion; + } + + public SystemInfo type(@javax.annotation.Nullable String type) { + this.type = type; + return this; + } + + /** + * The deployment type of the cluster. + * + * @return type + */ + @javax.annotation.Nullable + public String getType() { + return type; + } + + public void setType(@javax.annotation.Nullable String type) { + this.type = type; + } + + public SystemInfo environment(@javax.annotation.Nullable String environment) { + this.environment = environment; + return this; + } + + /** + * The deployed environment of the cluster. + * + * @return environment + */ + @javax.annotation.Nullable + public String getEnvironment() { + return environment; + } + + public void setEnvironment(@javax.annotation.Nullable String environment) { + this.environment = environment; + } + + public SystemInfo license(@javax.annotation.Nullable String license) { + this.license = license; + return this; + } + + /** + * The license applied to the cluster. + * + * @return license + */ + @javax.annotation.Nullable + public String getLicense() { + return license; + } + + public void setLicense(@javax.annotation.Nullable String license) { + this.license = license; + } + + public SystemInfo dateTimeFormat(@javax.annotation.Nullable String dateTimeFormat) { + this.dateTimeFormat = dateTimeFormat; + return this; + } + + /** + * The default date time format representation of the cluster. + * + * @return dateTimeFormat + */ + @javax.annotation.Nullable + public String getDateTimeFormat() { + return dateTimeFormat; + } + + public void setDateTimeFormat(@javax.annotation.Nullable String dateTimeFormat) { + this.dateTimeFormat = dateTimeFormat; + } + + public SystemInfo timeFormat(@javax.annotation.Nullable String timeFormat) { + this.timeFormat = timeFormat; + return this; + } + + /** + * The default time format representation of the cluster. + * + * @return timeFormat + */ + @javax.annotation.Nullable + public String getTimeFormat() { + return timeFormat; + } + + public void setTimeFormat(@javax.annotation.Nullable String timeFormat) { + this.timeFormat = timeFormat; + } + + public SystemInfo systemUserId(@javax.annotation.Nullable String systemUserId) { + this.systemUserId = systemUserId; + return this; + } + + /** + * The unique identifier of system user. + * + * @return systemUserId + */ + @javax.annotation.Nullable + public String getSystemUserId() { + return systemUserId; + } + + public void setSystemUserId(@javax.annotation.Nullable String systemUserId) { + this.systemUserId = systemUserId; + } + + public SystemInfo superUserId(@javax.annotation.Nullable String superUserId) { + this.superUserId = superUserId; + return this; + } + + /** + * The unique identifier of super user. + * + * @return superUserId + */ + @javax.annotation.Nullable + public String getSuperUserId() { + return superUserId; + } + + public void setSuperUserId(@javax.annotation.Nullable String superUserId) { + this.superUserId = superUserId; + } + + public SystemInfo hiddenObjectId(@javax.annotation.Nullable String hiddenObjectId) { + this.hiddenObjectId = hiddenObjectId; + return this; + } + + /** + * The unique identifier of hidden object. + * + * @return hiddenObjectId + */ + @javax.annotation.Nullable + public String getHiddenObjectId() { + return hiddenObjectId; + } + + public void setHiddenObjectId(@javax.annotation.Nullable String hiddenObjectId) { + this.hiddenObjectId = hiddenObjectId; + } + + public SystemInfo systemGroupId(@javax.annotation.Nullable String systemGroupId) { + this.systemGroupId = systemGroupId; + return this; + } + + /** + * The unique identifier of system group. + * + * @return systemGroupId + */ + @javax.annotation.Nullable + public String getSystemGroupId() { + return systemGroupId; + } + + public void setSystemGroupId(@javax.annotation.Nullable String systemGroupId) { + this.systemGroupId = systemGroupId; + } + + public SystemInfo tsadminUserId(@javax.annotation.Nullable String tsadminUserId) { + this.tsadminUserId = tsadminUserId; + return this; + } + + /** + * The unique identifier of tsadmin user. + * + * @return tsadminUserId + */ + @javax.annotation.Nullable + public String getTsadminUserId() { + return tsadminUserId; + } + + public void setTsadminUserId(@javax.annotation.Nullable String tsadminUserId) { + this.tsadminUserId = tsadminUserId; + } + + public SystemInfo adminGroupId(@javax.annotation.Nullable String adminGroupId) { + this.adminGroupId = adminGroupId; + return this; + } + + /** + * The unique identifier of admin group. + * + * @return adminGroupId + */ + @javax.annotation.Nullable + public String getAdminGroupId() { + return adminGroupId; + } + + public void setAdminGroupId(@javax.annotation.Nullable String adminGroupId) { + this.adminGroupId = adminGroupId; + } + + public SystemInfo allTablesConnectionId( + @javax.annotation.Nullable String allTablesConnectionId) { + this.allTablesConnectionId = allTablesConnectionId; + return this; + } + + /** + * The unique identifier of all tables connection. + * + * @return allTablesConnectionId + */ + @javax.annotation.Nullable + public String getAllTablesConnectionId() { + return allTablesConnectionId; + } + + public void setAllTablesConnectionId(@javax.annotation.Nullable String allTablesConnectionId) { + this.allTablesConnectionId = allTablesConnectionId; + } + + public SystemInfo allUserGroupId(@javax.annotation.Nullable String allUserGroupId) { + this.allUserGroupId = allUserGroupId; + return this; + } + + /** + * The unique identifier of ALL group. + * + * @return allUserGroupId + */ + @javax.annotation.Nullable + public String getAllUserGroupId() { + return allUserGroupId; + } + + public void setAllUserGroupId(@javax.annotation.Nullable String allUserGroupId) { + this.allUserGroupId = allUserGroupId; + } + + public SystemInfo acceptLanguage(@javax.annotation.Nullable String acceptLanguage) { + this.acceptLanguage = acceptLanguage; + return this; + } + + /** + * The supported accept language by the cluster. + * + * @return acceptLanguage + */ + @javax.annotation.Nullable + public String getAcceptLanguage() { + return acceptLanguage; + } + + public void setAcceptLanguage(@javax.annotation.Nullable String acceptLanguage) { + this.acceptLanguage = acceptLanguage; + } + + public SystemInfo allUserGroupMemberUserCount( + @javax.annotation.Nullable Integer allUserGroupMemberUserCount) { + this.allUserGroupMemberUserCount = allUserGroupMemberUserCount; + return this; + } + + /** + * The count of users of ALL group. + * + * @return allUserGroupMemberUserCount + */ + @javax.annotation.Nullable + public Integer getAllUserGroupMemberUserCount() { + return allUserGroupMemberUserCount; + } + + public void setAllUserGroupMemberUserCount( + @javax.annotation.Nullable Integer allUserGroupMemberUserCount) { + this.allUserGroupMemberUserCount = allUserGroupMemberUserCount; + } + + public SystemInfo logicalModelVersion(@javax.annotation.Nullable Integer logicalModelVersion) { + this.logicalModelVersion = logicalModelVersion; + return this; + } + + /** + * The version number of logical model of the cluster. + * + * @return logicalModelVersion + */ + @javax.annotation.Nullable + public Integer getLogicalModelVersion() { + return logicalModelVersion; + } + + public void setLogicalModelVersion(@javax.annotation.Nullable Integer logicalModelVersion) { + this.logicalModelVersion = logicalModelVersion; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key name of the property + * @param value value of the property + * @return the SystemInfo instance itself + */ + public SystemInfo putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return a map of objects + */ + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key name of the property + * @return an object + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + SystemInfo systemInfo = (SystemInfo) o; + return Objects.equals(this.id, systemInfo.id) + && Objects.equals(this.name, systemInfo.name) + && Objects.equals(this.releaseVersion, systemInfo.releaseVersion) + && Objects.equals(this.timeZone, systemInfo.timeZone) + && Objects.equals(this.locale, systemInfo.locale) + && Objects.equals(this.dateFormat, systemInfo.dateFormat) + && Objects.equals(this.apiVersion, systemInfo.apiVersion) + && Objects.equals(this.type, systemInfo.type) + && Objects.equals(this.environment, systemInfo.environment) + && Objects.equals(this.license, systemInfo.license) + && Objects.equals(this.dateTimeFormat, systemInfo.dateTimeFormat) + && Objects.equals(this.timeFormat, systemInfo.timeFormat) + && Objects.equals(this.systemUserId, systemInfo.systemUserId) + && Objects.equals(this.superUserId, systemInfo.superUserId) + && Objects.equals(this.hiddenObjectId, systemInfo.hiddenObjectId) + && Objects.equals(this.systemGroupId, systemInfo.systemGroupId) + && Objects.equals(this.tsadminUserId, systemInfo.tsadminUserId) + && Objects.equals(this.adminGroupId, systemInfo.adminGroupId) + && Objects.equals(this.allTablesConnectionId, systemInfo.allTablesConnectionId) + && Objects.equals(this.allUserGroupId, systemInfo.allUserGroupId) + && Objects.equals(this.acceptLanguage, systemInfo.acceptLanguage) + && Objects.equals( + this.allUserGroupMemberUserCount, systemInfo.allUserGroupMemberUserCount) + && Objects.equals(this.logicalModelVersion, systemInfo.logicalModelVersion) + && Objects.equals(this.additionalProperties, systemInfo.additionalProperties); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b + || (a != null + && b != null + && a.isPresent() + && b.isPresent() + && Objects.deepEquals(a.get(), b.get())); + } + + @Override + public int hashCode() { + return Objects.hash( + id, + name, + releaseVersion, + timeZone, + locale, + dateFormat, + apiVersion, + type, + environment, + license, + dateTimeFormat, + timeFormat, + systemUserId, + superUserId, + hiddenObjectId, + systemGroupId, + tsadminUserId, + adminGroupId, + allTablesConnectionId, + allUserGroupId, + acceptLanguage, + allUserGroupMemberUserCount, + logicalModelVersion, + additionalProperties); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; + } + return a.isPresent() ? Arrays.deepHashCode(new Object[] {a.get()}) : 31; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class SystemInfo {\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append(" releaseVersion: ").append(toIndentedString(releaseVersion)).append("\n"); + sb.append(" timeZone: ").append(toIndentedString(timeZone)).append("\n"); + sb.append(" locale: ").append(toIndentedString(locale)).append("\n"); + sb.append(" dateFormat: ").append(toIndentedString(dateFormat)).append("\n"); + sb.append(" apiVersion: ").append(toIndentedString(apiVersion)).append("\n"); + sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append(" environment: ").append(toIndentedString(environment)).append("\n"); + sb.append(" license: ").append(toIndentedString(license)).append("\n"); + sb.append(" dateTimeFormat: ").append(toIndentedString(dateTimeFormat)).append("\n"); + sb.append(" timeFormat: ").append(toIndentedString(timeFormat)).append("\n"); + sb.append(" systemUserId: ").append(toIndentedString(systemUserId)).append("\n"); + sb.append(" superUserId: ").append(toIndentedString(superUserId)).append("\n"); + sb.append(" hiddenObjectId: ").append(toIndentedString(hiddenObjectId)).append("\n"); + sb.append(" systemGroupId: ").append(toIndentedString(systemGroupId)).append("\n"); + sb.append(" tsadminUserId: ").append(toIndentedString(tsadminUserId)).append("\n"); + sb.append(" adminGroupId: ").append(toIndentedString(adminGroupId)).append("\n"); + sb.append(" allTablesConnectionId: ") + .append(toIndentedString(allTablesConnectionId)) + .append("\n"); + sb.append(" allUserGroupId: ").append(toIndentedString(allUserGroupId)).append("\n"); + sb.append(" acceptLanguage: ").append(toIndentedString(acceptLanguage)).append("\n"); + sb.append(" allUserGroupMemberUserCount: ") + .append(toIndentedString(allUserGroupMemberUserCount)) + .append("\n"); + sb.append(" logicalModelVersion: ") + .append(toIndentedString(logicalModelVersion)) + .append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first + * line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("id"); + openapiFields.add("name"); + openapiFields.add("release_version"); + openapiFields.add("time_zone"); + openapiFields.add("locale"); + openapiFields.add("date_format"); + openapiFields.add("api_version"); + openapiFields.add("type"); + openapiFields.add("environment"); + openapiFields.add("license"); + openapiFields.add("date_time_format"); + openapiFields.add("time_format"); + openapiFields.add("system_user_id"); + openapiFields.add("super_user_id"); + openapiFields.add("hidden_object_id"); + openapiFields.add("system_group_id"); + openapiFields.add("tsadmin_user_id"); + openapiFields.add("admin_group_id"); + openapiFields.add("all_tables_connection_id"); + openapiFields.add("all_user_group_id"); + openapiFields.add("accept_language"); + openapiFields.add("all_user_group_member_user_count"); + openapiFields.add("logical_model_version"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to SystemInfo + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!SystemInfo.openapiRequiredFields + .isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException( + String.format( + "The required field(s) %s in SystemInfo is not found in the empty" + + " JSON string", + SystemInfo.openapiRequiredFields.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if ((jsonObj.get("id") != null && !jsonObj.get("id").isJsonNull()) + && !jsonObj.get("id").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `id` to be a primitive type in the JSON string but" + + " got `%s`", + jsonObj.get("id").toString())); + } + if ((jsonObj.get("name") != null && !jsonObj.get("name").isJsonNull()) + && !jsonObj.get("name").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `name` to be a primitive type in the JSON string" + + " but got `%s`", + jsonObj.get("name").toString())); + } + if ((jsonObj.get("release_version") != null && !jsonObj.get("release_version").isJsonNull()) + && !jsonObj.get("release_version").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `release_version` to be a primitive type in the" + + " JSON string but got `%s`", + jsonObj.get("release_version").toString())); + } + if ((jsonObj.get("time_zone") != null && !jsonObj.get("time_zone").isJsonNull()) + && !jsonObj.get("time_zone").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `time_zone` to be a primitive type in the JSON" + + " string but got `%s`", + jsonObj.get("time_zone").toString())); + } + if ((jsonObj.get("locale") != null && !jsonObj.get("locale").isJsonNull()) + && !jsonObj.get("locale").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `locale` to be a primitive type in the JSON string" + + " but got `%s`", + jsonObj.get("locale").toString())); + } + if ((jsonObj.get("date_format") != null && !jsonObj.get("date_format").isJsonNull()) + && !jsonObj.get("date_format").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `date_format` to be a primitive type in the JSON" + + " string but got `%s`", + jsonObj.get("date_format").toString())); + } + if ((jsonObj.get("api_version") != null && !jsonObj.get("api_version").isJsonNull()) + && !jsonObj.get("api_version").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `api_version` to be a primitive type in the JSON" + + " string but got `%s`", + jsonObj.get("api_version").toString())); + } + if ((jsonObj.get("type") != null && !jsonObj.get("type").isJsonNull()) + && !jsonObj.get("type").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `type` to be a primitive type in the JSON string" + + " but got `%s`", + jsonObj.get("type").toString())); + } + if ((jsonObj.get("environment") != null && !jsonObj.get("environment").isJsonNull()) + && !jsonObj.get("environment").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `environment` to be a primitive type in the JSON" + + " string but got `%s`", + jsonObj.get("environment").toString())); + } + if ((jsonObj.get("license") != null && !jsonObj.get("license").isJsonNull()) + && !jsonObj.get("license").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `license` to be a primitive type in the JSON" + + " string but got `%s`", + jsonObj.get("license").toString())); + } + if ((jsonObj.get("date_time_format") != null + && !jsonObj.get("date_time_format").isJsonNull()) + && !jsonObj.get("date_time_format").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `date_time_format` to be a primitive type in the" + + " JSON string but got `%s`", + jsonObj.get("date_time_format").toString())); + } + if ((jsonObj.get("time_format") != null && !jsonObj.get("time_format").isJsonNull()) + && !jsonObj.get("time_format").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `time_format` to be a primitive type in the JSON" + + " string but got `%s`", + jsonObj.get("time_format").toString())); + } + if ((jsonObj.get("system_user_id") != null && !jsonObj.get("system_user_id").isJsonNull()) + && !jsonObj.get("system_user_id").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `system_user_id` to be a primitive type in the" + + " JSON string but got `%s`", + jsonObj.get("system_user_id").toString())); + } + if ((jsonObj.get("super_user_id") != null && !jsonObj.get("super_user_id").isJsonNull()) + && !jsonObj.get("super_user_id").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `super_user_id` to be a primitive type in the JSON" + + " string but got `%s`", + jsonObj.get("super_user_id").toString())); + } + if ((jsonObj.get("hidden_object_id") != null + && !jsonObj.get("hidden_object_id").isJsonNull()) + && !jsonObj.get("hidden_object_id").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `hidden_object_id` to be a primitive type in the" + + " JSON string but got `%s`", + jsonObj.get("hidden_object_id").toString())); + } + if ((jsonObj.get("system_group_id") != null && !jsonObj.get("system_group_id").isJsonNull()) + && !jsonObj.get("system_group_id").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `system_group_id` to be a primitive type in the" + + " JSON string but got `%s`", + jsonObj.get("system_group_id").toString())); + } + if ((jsonObj.get("tsadmin_user_id") != null && !jsonObj.get("tsadmin_user_id").isJsonNull()) + && !jsonObj.get("tsadmin_user_id").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `tsadmin_user_id` to be a primitive type in the" + + " JSON string but got `%s`", + jsonObj.get("tsadmin_user_id").toString())); + } + if ((jsonObj.get("admin_group_id") != null && !jsonObj.get("admin_group_id").isJsonNull()) + && !jsonObj.get("admin_group_id").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `admin_group_id` to be a primitive type in the" + + " JSON string but got `%s`", + jsonObj.get("admin_group_id").toString())); + } + if ((jsonObj.get("all_tables_connection_id") != null + && !jsonObj.get("all_tables_connection_id").isJsonNull()) + && !jsonObj.get("all_tables_connection_id").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `all_tables_connection_id` to be a primitive type" + + " in the JSON string but got `%s`", + jsonObj.get("all_tables_connection_id").toString())); + } + if ((jsonObj.get("all_user_group_id") != null + && !jsonObj.get("all_user_group_id").isJsonNull()) + && !jsonObj.get("all_user_group_id").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `all_user_group_id` to be a primitive type in the" + + " JSON string but got `%s`", + jsonObj.get("all_user_group_id").toString())); + } + if ((jsonObj.get("accept_language") != null && !jsonObj.get("accept_language").isJsonNull()) + && !jsonObj.get("accept_language").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `accept_language` to be a primitive type in the" + + " JSON string but got `%s`", + jsonObj.get("accept_language").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!SystemInfo.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'SystemInfo' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter = + gson.getDelegateAdapter(this, TypeToken.get(SystemInfo.class)); + + return (TypeAdapter) + new TypeAdapter() { + @Override + public void write(JsonWriter out, SystemInfo value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + obj.remove("additionalProperties"); + // serialize additional properties + if (value.getAdditionalProperties() != null) { + for (Map.Entry entry : + value.getAdditionalProperties().entrySet()) { + if (entry.getValue() instanceof String) + obj.addProperty(entry.getKey(), (String) entry.getValue()); + else if (entry.getValue() instanceof Number) + obj.addProperty(entry.getKey(), (Number) entry.getValue()); + else if (entry.getValue() instanceof Boolean) + obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); + else if (entry.getValue() instanceof Character) + obj.addProperty( + entry.getKey(), (Character) entry.getValue()); + else { + JsonElement jsonElement = gson.toJsonTree(entry.getValue()); + if (jsonElement.isJsonArray()) { + obj.add(entry.getKey(), jsonElement.getAsJsonArray()); + } else { + obj.add(entry.getKey(), jsonElement.getAsJsonObject()); + } + } + } + } + elementAdapter.write(out, obj); + } + + @Override + public SystemInfo read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // store additional fields in the deserialized instance + SystemInfo instance = thisAdapter.fromJsonTree(jsonObj); + for (Map.Entry entry : jsonObj.entrySet()) { + if (!openapiFields.contains(entry.getKey())) { + if (entry.getValue().isJsonPrimitive()) { // primitive type + if (entry.getValue().getAsJsonPrimitive().isString()) + instance.putAdditionalProperty( + entry.getKey(), entry.getValue().getAsString()); + else if (entry.getValue().getAsJsonPrimitive().isNumber()) + instance.putAdditionalProperty( + entry.getKey(), entry.getValue().getAsNumber()); + else if (entry.getValue().getAsJsonPrimitive().isBoolean()) + instance.putAdditionalProperty( + entry.getKey(), + entry.getValue().getAsBoolean()); + else + throw new IllegalArgumentException( + String.format( + "The field `%s` has unknown primitive" + + " type. Value: %s", + entry.getKey(), + entry.getValue().toString())); + } else if (entry.getValue().isJsonArray()) { + instance.putAdditionalProperty( + entry.getKey(), + gson.fromJson(entry.getValue(), List.class)); + } else { // JSON object + instance.putAdditionalProperty( + entry.getKey(), + gson.fromJson(entry.getValue(), HashMap.class)); + } + } + } + return instance; + } + }.nullSafe(); + } + } + + /** + * Create an instance of SystemInfo given an JSON string + * + * @param jsonString JSON string + * @return An instance of SystemInfo + * @throws IOException if the JSON string is invalid with respect to SystemInfo + */ + public static SystemInfo fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, SystemInfo.class); + } + + /** + * Convert an instance of SystemInfo to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} diff --git a/sdks/java/src/main/java/com/thoughtspot/client/model/SystemOverrideInfo.java b/sdks/java/src/main/java/com/thoughtspot/client/model/SystemOverrideInfo.java new file mode 100644 index 000000000..a8038d1e8 --- /dev/null +++ b/sdks/java/src/main/java/com/thoughtspot/client/model/SystemOverrideInfo.java @@ -0,0 +1,305 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client.model; + +import com.google.gson.Gson; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.TypeAdapter; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.annotations.SerializedName; +import com.google.gson.reflect.TypeToken; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import com.thoughtspot.client.JSON; +import java.io.IOException; +import java.io.Serializable; +import java.util.Arrays; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Objects; +import org.openapitools.jackson.nullable.JsonNullable; + +/** SystemOverrideInfo */ +@javax.annotation.Generated( + value = "org.openapitools.codegen.languages.JavaClientCodegen", + comments = "Generator version: 7.12.0") +public class SystemOverrideInfo implements Serializable { + private static final long serialVersionUID = 1L; + + public static final String SERIALIZED_NAME_CONFIG_OVERRIDE_INFO = "config_override_info"; + + @SerializedName(SERIALIZED_NAME_CONFIG_OVERRIDE_INFO) + @javax.annotation.Nullable + private Object configOverrideInfo; + + public SystemOverrideInfo() {} + + public SystemOverrideInfo configOverrideInfo( + @javax.annotation.Nullable Object configOverrideInfo) { + this.configOverrideInfo = configOverrideInfo; + return this; + } + + /** + * Get configOverrideInfo + * + * @return configOverrideInfo + */ + @javax.annotation.Nullable + public Object getConfigOverrideInfo() { + return configOverrideInfo; + } + + public void setConfigOverrideInfo(@javax.annotation.Nullable Object configOverrideInfo) { + this.configOverrideInfo = configOverrideInfo; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key name of the property + * @param value value of the property + * @return the SystemOverrideInfo instance itself + */ + public SystemOverrideInfo putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return a map of objects + */ + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key name of the property + * @return an object + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + SystemOverrideInfo systemOverrideInfo = (SystemOverrideInfo) o; + return Objects.equals(this.configOverrideInfo, systemOverrideInfo.configOverrideInfo) + && Objects.equals( + this.additionalProperties, systemOverrideInfo.additionalProperties); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b + || (a != null + && b != null + && a.isPresent() + && b.isPresent() + && Objects.deepEquals(a.get(), b.get())); + } + + @Override + public int hashCode() { + return Objects.hash(configOverrideInfo, additionalProperties); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; + } + return a.isPresent() ? Arrays.deepHashCode(new Object[] {a.get()}) : 31; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class SystemOverrideInfo {\n"); + sb.append(" configOverrideInfo: ") + .append(toIndentedString(configOverrideInfo)) + .append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first + * line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("config_override_info"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to SystemOverrideInfo + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!SystemOverrideInfo.openapiRequiredFields + .isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException( + String.format( + "The required field(s) %s in SystemOverrideInfo is not found in" + + " the empty JSON string", + SystemOverrideInfo.openapiRequiredFields.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!SystemOverrideInfo.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'SystemOverrideInfo' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter = + gson.getDelegateAdapter(this, TypeToken.get(SystemOverrideInfo.class)); + + return (TypeAdapter) + new TypeAdapter() { + @Override + public void write(JsonWriter out, SystemOverrideInfo value) + throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + obj.remove("additionalProperties"); + // serialize additional properties + if (value.getAdditionalProperties() != null) { + for (Map.Entry entry : + value.getAdditionalProperties().entrySet()) { + if (entry.getValue() instanceof String) + obj.addProperty(entry.getKey(), (String) entry.getValue()); + else if (entry.getValue() instanceof Number) + obj.addProperty(entry.getKey(), (Number) entry.getValue()); + else if (entry.getValue() instanceof Boolean) + obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); + else if (entry.getValue() instanceof Character) + obj.addProperty( + entry.getKey(), (Character) entry.getValue()); + else { + JsonElement jsonElement = gson.toJsonTree(entry.getValue()); + if (jsonElement.isJsonArray()) { + obj.add(entry.getKey(), jsonElement.getAsJsonArray()); + } else { + obj.add(entry.getKey(), jsonElement.getAsJsonObject()); + } + } + } + } + elementAdapter.write(out, obj); + } + + @Override + public SystemOverrideInfo read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // store additional fields in the deserialized instance + SystemOverrideInfo instance = thisAdapter.fromJsonTree(jsonObj); + for (Map.Entry entry : jsonObj.entrySet()) { + if (!openapiFields.contains(entry.getKey())) { + if (entry.getValue().isJsonPrimitive()) { // primitive type + if (entry.getValue().getAsJsonPrimitive().isString()) + instance.putAdditionalProperty( + entry.getKey(), entry.getValue().getAsString()); + else if (entry.getValue().getAsJsonPrimitive().isNumber()) + instance.putAdditionalProperty( + entry.getKey(), entry.getValue().getAsNumber()); + else if (entry.getValue().getAsJsonPrimitive().isBoolean()) + instance.putAdditionalProperty( + entry.getKey(), + entry.getValue().getAsBoolean()); + else + throw new IllegalArgumentException( + String.format( + "The field `%s` has unknown primitive" + + " type. Value: %s", + entry.getKey(), + entry.getValue().toString())); + } else if (entry.getValue().isJsonArray()) { + instance.putAdditionalProperty( + entry.getKey(), + gson.fromJson(entry.getValue(), List.class)); + } else { // JSON object + instance.putAdditionalProperty( + entry.getKey(), + gson.fromJson(entry.getValue(), HashMap.class)); + } + } + } + return instance; + } + }.nullSafe(); + } + } + + /** + * Create an instance of SystemOverrideInfo given an JSON string + * + * @param jsonString JSON string + * @return An instance of SystemOverrideInfo + * @throws IOException if the JSON string is invalid with respect to SystemOverrideInfo + */ + public static SystemOverrideInfo fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, SystemOverrideInfo.class); + } + + /** + * Convert an instance of SystemOverrideInfo to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} diff --git a/sdks/java/src/main/java/com/thoughtspot/client/model/Table.java b/sdks/java/src/main/java/com/thoughtspot/client/model/Table.java new file mode 100644 index 000000000..7e95671e2 --- /dev/null +++ b/sdks/java/src/main/java/com/thoughtspot/client/model/Table.java @@ -0,0 +1,557 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client.model; + +import com.google.gson.Gson; +import com.google.gson.JsonArray; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.TypeAdapter; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.annotations.SerializedName; +import com.google.gson.reflect.TypeToken; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import com.thoughtspot.client.JSON; +import java.io.IOException; +import java.io.Serializable; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Objects; +import org.openapitools.jackson.nullable.JsonNullable; + +/** Table */ +@javax.annotation.Generated( + value = "org.openapitools.codegen.languages.JavaClientCodegen", + comments = "Generator version: 7.12.0") +public class Table implements Serializable { + private static final long serialVersionUID = 1L; + + public static final String SERIALIZED_NAME_NAME = "name"; + + @SerializedName(SERIALIZED_NAME_NAME) + @javax.annotation.Nonnull + private String name; + + public static final String SERIALIZED_NAME_COLUMNS = "columns"; + + @SerializedName(SERIALIZED_NAME_COLUMNS) + @javax.annotation.Nullable + private List columns; + + public static final String SERIALIZED_NAME_TYPE = "type"; + + @SerializedName(SERIALIZED_NAME_TYPE) + @javax.annotation.Nullable + private String type; + + public static final String SERIALIZED_NAME_DESCRIPTION = "description"; + + @SerializedName(SERIALIZED_NAME_DESCRIPTION) + @javax.annotation.Nullable + private String description; + + public static final String SERIALIZED_NAME_SELECTED = "selected"; + + @SerializedName(SERIALIZED_NAME_SELECTED) + @javax.annotation.Nullable + private Boolean selected; + + public static final String SERIALIZED_NAME_LINKED = "linked"; + + @SerializedName(SERIALIZED_NAME_LINKED) + @javax.annotation.Nullable + private Boolean linked; + + public static final String SERIALIZED_NAME_RELATIONSHIPS = "relationships"; + + @SerializedName(SERIALIZED_NAME_RELATIONSHIPS) + @javax.annotation.Nullable + private List relationships; + + public Table() {} + + public Table name(@javax.annotation.Nonnull String name) { + this.name = name; + return this; + } + + /** + * Name of the table. + * + * @return name + */ + @javax.annotation.Nonnull + public String getName() { + return name; + } + + public void setName(@javax.annotation.Nonnull String name) { + this.name = name; + } + + public Table columns(@javax.annotation.Nullable List columns) { + this.columns = columns; + return this; + } + + public Table addColumnsItem(Column columnsItem) { + if (this.columns == null) { + this.columns = new ArrayList<>(); + } + this.columns.add(columnsItem); + return this; + } + + /** + * Columns of the table. + * + * @return columns + */ + @javax.annotation.Nullable + public List getColumns() { + return columns; + } + + public void setColumns(@javax.annotation.Nullable List columns) { + this.columns = columns; + } + + public Table type(@javax.annotation.Nullable String type) { + this.type = type; + return this; + } + + /** + * Type of table. Either view or table + * + * @return type + */ + @javax.annotation.Nullable + public String getType() { + return type; + } + + public void setType(@javax.annotation.Nullable String type) { + this.type = type; + } + + public Table description(@javax.annotation.Nullable String description) { + this.description = description; + return this; + } + + /** + * Description of the table + * + * @return description + */ + @javax.annotation.Nullable + public String getDescription() { + return description; + } + + public void setDescription(@javax.annotation.Nullable String description) { + this.description = description; + } + + public Table selected(@javax.annotation.Nullable Boolean selected) { + this.selected = selected; + return this; + } + + /** + * Determines if the table is selected + * + * @return selected + */ + @javax.annotation.Nullable + public Boolean getSelected() { + return selected; + } + + public void setSelected(@javax.annotation.Nullable Boolean selected) { + this.selected = selected; + } + + public Table linked(@javax.annotation.Nullable Boolean linked) { + this.linked = linked; + return this; + } + + /** + * Determines if the table is linked + * + * @return linked + */ + @javax.annotation.Nullable + public Boolean getLinked() { + return linked; + } + + public void setLinked(@javax.annotation.Nullable Boolean linked) { + this.linked = linked; + } + + public Table relationships(@javax.annotation.Nullable List relationships) { + this.relationships = relationships; + return this; + } + + public Table addRelationshipsItem(Object relationshipsItem) { + if (this.relationships == null) { + this.relationships = new ArrayList<>(); + } + this.relationships.add(relationshipsItem); + return this; + } + + /** + * List of relationships for the table + * + * @return relationships + */ + @javax.annotation.Nullable + public List getRelationships() { + return relationships; + } + + public void setRelationships(@javax.annotation.Nullable List relationships) { + this.relationships = relationships; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key name of the property + * @param value value of the property + * @return the Table instance itself + */ + public Table putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return a map of objects + */ + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key name of the property + * @return an object + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + Table table = (Table) o; + return Objects.equals(this.name, table.name) + && Objects.equals(this.columns, table.columns) + && Objects.equals(this.type, table.type) + && Objects.equals(this.description, table.description) + && Objects.equals(this.selected, table.selected) + && Objects.equals(this.linked, table.linked) + && Objects.equals(this.relationships, table.relationships) + && Objects.equals(this.additionalProperties, table.additionalProperties); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b + || (a != null + && b != null + && a.isPresent() + && b.isPresent() + && Objects.deepEquals(a.get(), b.get())); + } + + @Override + public int hashCode() { + return Objects.hash( + name, + columns, + type, + description, + selected, + linked, + relationships, + additionalProperties); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; + } + return a.isPresent() ? Arrays.deepHashCode(new Object[] {a.get()}) : 31; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class Table {\n"); + sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append(" columns: ").append(toIndentedString(columns)).append("\n"); + sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append(" description: ").append(toIndentedString(description)).append("\n"); + sb.append(" selected: ").append(toIndentedString(selected)).append("\n"); + sb.append(" linked: ").append(toIndentedString(linked)).append("\n"); + sb.append(" relationships: ").append(toIndentedString(relationships)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first + * line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("name"); + openapiFields.add("columns"); + openapiFields.add("type"); + openapiFields.add("description"); + openapiFields.add("selected"); + openapiFields.add("linked"); + openapiFields.add("relationships"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + openapiRequiredFields.add("name"); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to Table + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!Table.openapiRequiredFields + .isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException( + String.format( + "The required field(s) %s in Table is not found in the empty JSON" + + " string", + Table.openapiRequiredFields.toString())); + } + } + + // check to make sure all required properties/fields are present in the JSON string + for (String requiredField : Table.openapiRequiredFields) { + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException( + String.format( + "The required field `%s` is not found in the JSON string: %s", + requiredField, jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if (!jsonObj.get("name").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `name` to be a primitive type in the JSON string" + + " but got `%s`", + jsonObj.get("name").toString())); + } + if (jsonObj.get("columns") != null && !jsonObj.get("columns").isJsonNull()) { + JsonArray jsonArraycolumns = jsonObj.getAsJsonArray("columns"); + if (jsonArraycolumns != null) { + // ensure the json data is an array + if (!jsonObj.get("columns").isJsonArray()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `columns` to be an array in the JSON" + + " string but got `%s`", + jsonObj.get("columns").toString())); + } + + // validate the optional field `columns` (array) + for (int i = 0; i < jsonArraycolumns.size(); i++) { + Column.validateJsonElement(jsonArraycolumns.get(i)); + } + ; + } + } + if ((jsonObj.get("type") != null && !jsonObj.get("type").isJsonNull()) + && !jsonObj.get("type").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `type` to be a primitive type in the JSON string" + + " but got `%s`", + jsonObj.get("type").toString())); + } + if ((jsonObj.get("description") != null && !jsonObj.get("description").isJsonNull()) + && !jsonObj.get("description").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `description` to be a primitive type in the JSON" + + " string but got `%s`", + jsonObj.get("description").toString())); + } + // ensure the optional json data is an array if present + if (jsonObj.get("relationships") != null + && !jsonObj.get("relationships").isJsonNull() + && !jsonObj.get("relationships").isJsonArray()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `relationships` to be an array in the JSON string" + + " but got `%s`", + jsonObj.get("relationships").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!Table.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'Table' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter
thisAdapter = + gson.getDelegateAdapter(this, TypeToken.get(Table.class)); + + return (TypeAdapter) + new TypeAdapter
() { + @Override + public void write(JsonWriter out, Table value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + obj.remove("additionalProperties"); + // serialize additional properties + if (value.getAdditionalProperties() != null) { + for (Map.Entry entry : + value.getAdditionalProperties().entrySet()) { + if (entry.getValue() instanceof String) + obj.addProperty(entry.getKey(), (String) entry.getValue()); + else if (entry.getValue() instanceof Number) + obj.addProperty(entry.getKey(), (Number) entry.getValue()); + else if (entry.getValue() instanceof Boolean) + obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); + else if (entry.getValue() instanceof Character) + obj.addProperty( + entry.getKey(), (Character) entry.getValue()); + else { + JsonElement jsonElement = gson.toJsonTree(entry.getValue()); + if (jsonElement.isJsonArray()) { + obj.add(entry.getKey(), jsonElement.getAsJsonArray()); + } else { + obj.add(entry.getKey(), jsonElement.getAsJsonObject()); + } + } + } + } + elementAdapter.write(out, obj); + } + + @Override + public Table read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // store additional fields in the deserialized instance + Table instance = thisAdapter.fromJsonTree(jsonObj); + for (Map.Entry entry : jsonObj.entrySet()) { + if (!openapiFields.contains(entry.getKey())) { + if (entry.getValue().isJsonPrimitive()) { // primitive type + if (entry.getValue().getAsJsonPrimitive().isString()) + instance.putAdditionalProperty( + entry.getKey(), entry.getValue().getAsString()); + else if (entry.getValue().getAsJsonPrimitive().isNumber()) + instance.putAdditionalProperty( + entry.getKey(), entry.getValue().getAsNumber()); + else if (entry.getValue().getAsJsonPrimitive().isBoolean()) + instance.putAdditionalProperty( + entry.getKey(), + entry.getValue().getAsBoolean()); + else + throw new IllegalArgumentException( + String.format( + "The field `%s` has unknown primitive" + + " type. Value: %s", + entry.getKey(), + entry.getValue().toString())); + } else if (entry.getValue().isJsonArray()) { + instance.putAdditionalProperty( + entry.getKey(), + gson.fromJson(entry.getValue(), List.class)); + } else { // JSON object + instance.putAdditionalProperty( + entry.getKey(), + gson.fromJson(entry.getValue(), HashMap.class)); + } + } + } + return instance; + } + }.nullSafe(); + } + } + + /** + * Create an instance of Table given an JSON string + * + * @param jsonString JSON string + * @return An instance of Table + * @throws IOException if the JSON string is invalid with respect to Table + */ + public static Table fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, Table.class); + } + + /** + * Convert an instance of Table to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} diff --git a/sdks/java/src/main/java/com/thoughtspot/client/model/Tag.java b/sdks/java/src/main/java/com/thoughtspot/client/model/Tag.java new file mode 100644 index 000000000..94ac61ccd --- /dev/null +++ b/sdks/java/src/main/java/com/thoughtspot/client/model/Tag.java @@ -0,0 +1,685 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client.model; + +import com.google.gson.Gson; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.TypeAdapter; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.annotations.SerializedName; +import com.google.gson.reflect.TypeToken; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import com.thoughtspot.client.JSON; +import java.io.IOException; +import java.io.Serializable; +import java.util.Arrays; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Objects; +import org.openapitools.jackson.nullable.JsonNullable; + +/** Tag */ +@javax.annotation.Generated( + value = "org.openapitools.codegen.languages.JavaClientCodegen", + comments = "Generator version: 7.12.0") +public class Tag implements Serializable { + private static final long serialVersionUID = 1L; + + public static final String SERIALIZED_NAME_NAME = "name"; + + @SerializedName(SERIALIZED_NAME_NAME) + @javax.annotation.Nonnull + private String name; + + public static final String SERIALIZED_NAME_ID = "id"; + + @SerializedName(SERIALIZED_NAME_ID) + @javax.annotation.Nonnull + private String id; + + public static final String SERIALIZED_NAME_COLOR = "color"; + + @SerializedName(SERIALIZED_NAME_COLOR) + @javax.annotation.Nullable + private String color; + + public static final String SERIALIZED_NAME_DELETED = "deleted"; + + @SerializedName(SERIALIZED_NAME_DELETED) + @javax.annotation.Nullable + private Boolean deleted; + + public static final String SERIALIZED_NAME_HIDDEN = "hidden"; + + @SerializedName(SERIALIZED_NAME_HIDDEN) + @javax.annotation.Nullable + private Boolean hidden; + + public static final String SERIALIZED_NAME_EXTERNAL = "external"; + + @SerializedName(SERIALIZED_NAME_EXTERNAL) + @javax.annotation.Nullable + private Boolean external; + + public static final String SERIALIZED_NAME_DEPRECATED = "deprecated"; + + @SerializedName(SERIALIZED_NAME_DEPRECATED) + @javax.annotation.Nullable + private Boolean deprecated; + + public static final String SERIALIZED_NAME_CREATION_TIME_IN_MILLIS = "creation_time_in_millis"; + + @SerializedName(SERIALIZED_NAME_CREATION_TIME_IN_MILLIS) + @javax.annotation.Nullable + private Float creationTimeInMillis; + + public static final String SERIALIZED_NAME_MODIFICATION_TIME_IN_MILLIS = + "modification_time_in_millis"; + + @SerializedName(SERIALIZED_NAME_MODIFICATION_TIME_IN_MILLIS) + @javax.annotation.Nullable + private Float modificationTimeInMillis; + + public static final String SERIALIZED_NAME_AUTHOR_ID = "author_id"; + + @SerializedName(SERIALIZED_NAME_AUTHOR_ID) + @javax.annotation.Nullable + private String authorId; + + public static final String SERIALIZED_NAME_MODIFIER_ID = "modifier_id"; + + @SerializedName(SERIALIZED_NAME_MODIFIER_ID) + @javax.annotation.Nullable + private String modifierId; + + public static final String SERIALIZED_NAME_OWNER_ID = "owner_id"; + + @SerializedName(SERIALIZED_NAME_OWNER_ID) + @javax.annotation.Nullable + private String ownerId; + + public Tag() {} + + public Tag name(@javax.annotation.Nonnull String name) { + this.name = name; + return this; + } + + /** + * Get name + * + * @return name + */ + @javax.annotation.Nonnull + public String getName() { + return name; + } + + public void setName(@javax.annotation.Nonnull String name) { + this.name = name; + } + + public Tag id(@javax.annotation.Nonnull String id) { + this.id = id; + return this; + } + + /** + * Get id + * + * @return id + */ + @javax.annotation.Nonnull + public String getId() { + return id; + } + + public void setId(@javax.annotation.Nonnull String id) { + this.id = id; + } + + public Tag color(@javax.annotation.Nullable String color) { + this.color = color; + return this; + } + + /** + * Get color + * + * @return color + */ + @javax.annotation.Nullable + public String getColor() { + return color; + } + + public void setColor(@javax.annotation.Nullable String color) { + this.color = color; + } + + public Tag deleted(@javax.annotation.Nullable Boolean deleted) { + this.deleted = deleted; + return this; + } + + /** + * Get deleted + * + * @return deleted + */ + @javax.annotation.Nullable + public Boolean getDeleted() { + return deleted; + } + + public void setDeleted(@javax.annotation.Nullable Boolean deleted) { + this.deleted = deleted; + } + + public Tag hidden(@javax.annotation.Nullable Boolean hidden) { + this.hidden = hidden; + return this; + } + + /** + * Get hidden + * + * @return hidden + */ + @javax.annotation.Nullable + public Boolean getHidden() { + return hidden; + } + + public void setHidden(@javax.annotation.Nullable Boolean hidden) { + this.hidden = hidden; + } + + public Tag external(@javax.annotation.Nullable Boolean external) { + this.external = external; + return this; + } + + /** + * Get external + * + * @return external + */ + @javax.annotation.Nullable + public Boolean getExternal() { + return external; + } + + public void setExternal(@javax.annotation.Nullable Boolean external) { + this.external = external; + } + + public Tag deprecated(@javax.annotation.Nullable Boolean deprecated) { + this.deprecated = deprecated; + return this; + } + + /** + * Get deprecated + * + * @return deprecated + */ + @javax.annotation.Nullable + public Boolean getDeprecated() { + return deprecated; + } + + public void setDeprecated(@javax.annotation.Nullable Boolean deprecated) { + this.deprecated = deprecated; + } + + public Tag creationTimeInMillis(@javax.annotation.Nullable Float creationTimeInMillis) { + this.creationTimeInMillis = creationTimeInMillis; + return this; + } + + /** + * Get creationTimeInMillis + * + * @return creationTimeInMillis + */ + @javax.annotation.Nullable + public Float getCreationTimeInMillis() { + return creationTimeInMillis; + } + + public void setCreationTimeInMillis(@javax.annotation.Nullable Float creationTimeInMillis) { + this.creationTimeInMillis = creationTimeInMillis; + } + + public Tag modificationTimeInMillis(@javax.annotation.Nullable Float modificationTimeInMillis) { + this.modificationTimeInMillis = modificationTimeInMillis; + return this; + } + + /** + * Get modificationTimeInMillis + * + * @return modificationTimeInMillis + */ + @javax.annotation.Nullable + public Float getModificationTimeInMillis() { + return modificationTimeInMillis; + } + + public void setModificationTimeInMillis( + @javax.annotation.Nullable Float modificationTimeInMillis) { + this.modificationTimeInMillis = modificationTimeInMillis; + } + + public Tag authorId(@javax.annotation.Nullable String authorId) { + this.authorId = authorId; + return this; + } + + /** + * Get authorId + * + * @return authorId + */ + @javax.annotation.Nullable + public String getAuthorId() { + return authorId; + } + + public void setAuthorId(@javax.annotation.Nullable String authorId) { + this.authorId = authorId; + } + + public Tag modifierId(@javax.annotation.Nullable String modifierId) { + this.modifierId = modifierId; + return this; + } + + /** + * Get modifierId + * + * @return modifierId + */ + @javax.annotation.Nullable + public String getModifierId() { + return modifierId; + } + + public void setModifierId(@javax.annotation.Nullable String modifierId) { + this.modifierId = modifierId; + } + + public Tag ownerId(@javax.annotation.Nullable String ownerId) { + this.ownerId = ownerId; + return this; + } + + /** + * Get ownerId + * + * @return ownerId + */ + @javax.annotation.Nullable + public String getOwnerId() { + return ownerId; + } + + public void setOwnerId(@javax.annotation.Nullable String ownerId) { + this.ownerId = ownerId; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key name of the property + * @param value value of the property + * @return the Tag instance itself + */ + public Tag putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return a map of objects + */ + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key name of the property + * @return an object + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + Tag tag = (Tag) o; + return Objects.equals(this.name, tag.name) + && Objects.equals(this.id, tag.id) + && Objects.equals(this.color, tag.color) + && Objects.equals(this.deleted, tag.deleted) + && Objects.equals(this.hidden, tag.hidden) + && Objects.equals(this.external, tag.external) + && Objects.equals(this.deprecated, tag.deprecated) + && Objects.equals(this.creationTimeInMillis, tag.creationTimeInMillis) + && Objects.equals(this.modificationTimeInMillis, tag.modificationTimeInMillis) + && Objects.equals(this.authorId, tag.authorId) + && Objects.equals(this.modifierId, tag.modifierId) + && Objects.equals(this.ownerId, tag.ownerId) + && Objects.equals(this.additionalProperties, tag.additionalProperties); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b + || (a != null + && b != null + && a.isPresent() + && b.isPresent() + && Objects.deepEquals(a.get(), b.get())); + } + + @Override + public int hashCode() { + return Objects.hash( + name, + id, + color, + deleted, + hidden, + external, + deprecated, + creationTimeInMillis, + modificationTimeInMillis, + authorId, + modifierId, + ownerId, + additionalProperties); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; + } + return a.isPresent() ? Arrays.deepHashCode(new Object[] {a.get()}) : 31; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class Tag {\n"); + sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" color: ").append(toIndentedString(color)).append("\n"); + sb.append(" deleted: ").append(toIndentedString(deleted)).append("\n"); + sb.append(" hidden: ").append(toIndentedString(hidden)).append("\n"); + sb.append(" external: ").append(toIndentedString(external)).append("\n"); + sb.append(" deprecated: ").append(toIndentedString(deprecated)).append("\n"); + sb.append(" creationTimeInMillis: ") + .append(toIndentedString(creationTimeInMillis)) + .append("\n"); + sb.append(" modificationTimeInMillis: ") + .append(toIndentedString(modificationTimeInMillis)) + .append("\n"); + sb.append(" authorId: ").append(toIndentedString(authorId)).append("\n"); + sb.append(" modifierId: ").append(toIndentedString(modifierId)).append("\n"); + sb.append(" ownerId: ").append(toIndentedString(ownerId)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first + * line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("name"); + openapiFields.add("id"); + openapiFields.add("color"); + openapiFields.add("deleted"); + openapiFields.add("hidden"); + openapiFields.add("external"); + openapiFields.add("deprecated"); + openapiFields.add("creation_time_in_millis"); + openapiFields.add("modification_time_in_millis"); + openapiFields.add("author_id"); + openapiFields.add("modifier_id"); + openapiFields.add("owner_id"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + openapiRequiredFields.add("name"); + openapiRequiredFields.add("id"); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to Tag + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!Tag.openapiRequiredFields + .isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException( + String.format( + "The required field(s) %s in Tag is not found in the empty JSON" + + " string", + Tag.openapiRequiredFields.toString())); + } + } + + // check to make sure all required properties/fields are present in the JSON string + for (String requiredField : Tag.openapiRequiredFields) { + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException( + String.format( + "The required field `%s` is not found in the JSON string: %s", + requiredField, jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if (!jsonObj.get("name").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `name` to be a primitive type in the JSON string" + + " but got `%s`", + jsonObj.get("name").toString())); + } + if (!jsonObj.get("id").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `id` to be a primitive type in the JSON string but" + + " got `%s`", + jsonObj.get("id").toString())); + } + if ((jsonObj.get("color") != null && !jsonObj.get("color").isJsonNull()) + && !jsonObj.get("color").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `color` to be a primitive type in the JSON string" + + " but got `%s`", + jsonObj.get("color").toString())); + } + if ((jsonObj.get("author_id") != null && !jsonObj.get("author_id").isJsonNull()) + && !jsonObj.get("author_id").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `author_id` to be a primitive type in the JSON" + + " string but got `%s`", + jsonObj.get("author_id").toString())); + } + if ((jsonObj.get("modifier_id") != null && !jsonObj.get("modifier_id").isJsonNull()) + && !jsonObj.get("modifier_id").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `modifier_id` to be a primitive type in the JSON" + + " string but got `%s`", + jsonObj.get("modifier_id").toString())); + } + if ((jsonObj.get("owner_id") != null && !jsonObj.get("owner_id").isJsonNull()) + && !jsonObj.get("owner_id").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `owner_id` to be a primitive type in the JSON" + + " string but got `%s`", + jsonObj.get("owner_id").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!Tag.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'Tag' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter = + gson.getDelegateAdapter(this, TypeToken.get(Tag.class)); + + return (TypeAdapter) + new TypeAdapter() { + @Override + public void write(JsonWriter out, Tag value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + obj.remove("additionalProperties"); + // serialize additional properties + if (value.getAdditionalProperties() != null) { + for (Map.Entry entry : + value.getAdditionalProperties().entrySet()) { + if (entry.getValue() instanceof String) + obj.addProperty(entry.getKey(), (String) entry.getValue()); + else if (entry.getValue() instanceof Number) + obj.addProperty(entry.getKey(), (Number) entry.getValue()); + else if (entry.getValue() instanceof Boolean) + obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); + else if (entry.getValue() instanceof Character) + obj.addProperty( + entry.getKey(), (Character) entry.getValue()); + else { + JsonElement jsonElement = gson.toJsonTree(entry.getValue()); + if (jsonElement.isJsonArray()) { + obj.add(entry.getKey(), jsonElement.getAsJsonArray()); + } else { + obj.add(entry.getKey(), jsonElement.getAsJsonObject()); + } + } + } + } + elementAdapter.write(out, obj); + } + + @Override + public Tag read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // store additional fields in the deserialized instance + Tag instance = thisAdapter.fromJsonTree(jsonObj); + for (Map.Entry entry : jsonObj.entrySet()) { + if (!openapiFields.contains(entry.getKey())) { + if (entry.getValue().isJsonPrimitive()) { // primitive type + if (entry.getValue().getAsJsonPrimitive().isString()) + instance.putAdditionalProperty( + entry.getKey(), entry.getValue().getAsString()); + else if (entry.getValue().getAsJsonPrimitive().isNumber()) + instance.putAdditionalProperty( + entry.getKey(), entry.getValue().getAsNumber()); + else if (entry.getValue().getAsJsonPrimitive().isBoolean()) + instance.putAdditionalProperty( + entry.getKey(), + entry.getValue().getAsBoolean()); + else + throw new IllegalArgumentException( + String.format( + "The field `%s` has unknown primitive" + + " type. Value: %s", + entry.getKey(), + entry.getValue().toString())); + } else if (entry.getValue().isJsonArray()) { + instance.putAdditionalProperty( + entry.getKey(), + gson.fromJson(entry.getValue(), List.class)); + } else { // JSON object + instance.putAdditionalProperty( + entry.getKey(), + gson.fromJson(entry.getValue(), HashMap.class)); + } + } + } + return instance; + } + }.nullSafe(); + } + } + + /** + * Create an instance of Tag given an JSON string + * + * @param jsonString JSON string + * @return An instance of Tag + * @throws IOException if the JSON string is invalid with respect to Tag + */ + public static Tag fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, Tag.class); + } + + /** + * Convert an instance of Tag to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} diff --git a/sdks/java/src/main/java/com/thoughtspot/client/model/TagMetadataTypeInput.java b/sdks/java/src/main/java/com/thoughtspot/client/model/TagMetadataTypeInput.java new file mode 100644 index 000000000..8c746c0ff --- /dev/null +++ b/sdks/java/src/main/java/com/thoughtspot/client/model/TagMetadataTypeInput.java @@ -0,0 +1,428 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client.model; + +import com.google.gson.Gson; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.TypeAdapter; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.reflect.TypeToken; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import com.thoughtspot.client.JSON; +import java.io.IOException; +import java.io.Serializable; +import java.util.Arrays; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Objects; +import org.openapitools.jackson.nullable.JsonNullable; + +/** TagMetadataTypeInput */ +@javax.annotation.Generated( + value = "org.openapitools.codegen.languages.JavaClientCodegen", + comments = "Generator version: 7.12.0") +public class TagMetadataTypeInput implements Serializable { + private static final long serialVersionUID = 1L; + + /** + * Type of metadata. Required if the name of the object is set as the identifier. This attribute + * is optional when the object GUID is specified as the identifier. 1. LIVEBOARD 2. ANSWERS 3. + * LOGICAL_TABLE for any data object such as table, worksheet or view. 4. LOGICAL_COLUMN for a + * column of any data object such as tables, worksheets or views. + */ + @JsonAdapter(TypeEnum.Adapter.class) + public enum TypeEnum { + LIVEBOARD("LIVEBOARD"), + + ANSWER("ANSWER"), + + LOGICAL_TABLE("LOGICAL_TABLE"), + + LOGICAL_COLUMN("LOGICAL_COLUMN"), + + CONNECTION("CONNECTION"), + + COLLECTION("COLLECTION"); + + private String value; + + TypeEnum(String value) { + this.value = value; + } + + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + public static TypeEnum fromValue(String value) { + for (TypeEnum b : TypeEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + return null; + } + + public static class Adapter extends TypeAdapter { + @Override + public void write(final JsonWriter jsonWriter, final TypeEnum enumeration) + throws IOException { + jsonWriter.value(enumeration.getValue()); + } + + @Override + public TypeEnum read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + return TypeEnum.fromValue(value); + } + } + + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + String value = jsonElement.getAsString(); + TypeEnum.fromValue(value); + } + } + + public static final String SERIALIZED_NAME_TYPE = "type"; + + @SerializedName(SERIALIZED_NAME_TYPE) + @javax.annotation.Nullable + private TypeEnum type; + + public static final String SERIALIZED_NAME_IDENTIFIER = "identifier"; + + @SerializedName(SERIALIZED_NAME_IDENTIFIER) + @javax.annotation.Nonnull + private String identifier; + + public TagMetadataTypeInput() {} + + public TagMetadataTypeInput type(@javax.annotation.Nullable TypeEnum type) { + this.type = type; + return this; + } + + /** + * Type of metadata. Required if the name of the object is set as the identifier. This attribute + * is optional when the object GUID is specified as the identifier. 1. LIVEBOARD 2. ANSWERS 3. + * LOGICAL_TABLE for any data object such as table, worksheet or view. 4. LOGICAL_COLUMN for a + * column of any data object such as tables, worksheets or views. + * + * @return type + */ + @javax.annotation.Nullable + public TypeEnum getType() { + return type; + } + + public void setType(@javax.annotation.Nullable TypeEnum type) { + this.type = type; + } + + public TagMetadataTypeInput identifier(@javax.annotation.Nonnull String identifier) { + this.identifier = identifier; + return this; + } + + /** + * Unique ID or name of the metadata. + * + * @return identifier + */ + @javax.annotation.Nonnull + public String getIdentifier() { + return identifier; + } + + public void setIdentifier(@javax.annotation.Nonnull String identifier) { + this.identifier = identifier; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key name of the property + * @param value value of the property + * @return the TagMetadataTypeInput instance itself + */ + public TagMetadataTypeInput putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return a map of objects + */ + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key name of the property + * @return an object + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + TagMetadataTypeInput tagMetadataTypeInput = (TagMetadataTypeInput) o; + return Objects.equals(this.type, tagMetadataTypeInput.type) + && Objects.equals(this.identifier, tagMetadataTypeInput.identifier) + && Objects.equals( + this.additionalProperties, tagMetadataTypeInput.additionalProperties); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b + || (a != null + && b != null + && a.isPresent() + && b.isPresent() + && Objects.deepEquals(a.get(), b.get())); + } + + @Override + public int hashCode() { + return Objects.hash(type, identifier, additionalProperties); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; + } + return a.isPresent() ? Arrays.deepHashCode(new Object[] {a.get()}) : 31; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class TagMetadataTypeInput {\n"); + sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append(" identifier: ").append(toIndentedString(identifier)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first + * line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("type"); + openapiFields.add("identifier"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + openapiRequiredFields.add("identifier"); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to TagMetadataTypeInput + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!TagMetadataTypeInput.openapiRequiredFields + .isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException( + String.format( + "The required field(s) %s in TagMetadataTypeInput is not found in" + + " the empty JSON string", + TagMetadataTypeInput.openapiRequiredFields.toString())); + } + } + + // check to make sure all required properties/fields are present in the JSON string + for (String requiredField : TagMetadataTypeInput.openapiRequiredFields) { + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException( + String.format( + "The required field `%s` is not found in the JSON string: %s", + requiredField, jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if ((jsonObj.get("type") != null && !jsonObj.get("type").isJsonNull()) + && !jsonObj.get("type").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `type` to be a primitive type in the JSON string" + + " but got `%s`", + jsonObj.get("type").toString())); + } + // validate the optional field `type` + if (jsonObj.get("type") != null && !jsonObj.get("type").isJsonNull()) { + TypeEnum.validateJsonElement(jsonObj.get("type")); + } + if (!jsonObj.get("identifier").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `identifier` to be a primitive type in the JSON" + + " string but got `%s`", + jsonObj.get("identifier").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!TagMetadataTypeInput.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'TagMetadataTypeInput' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter = + gson.getDelegateAdapter(this, TypeToken.get(TagMetadataTypeInput.class)); + + return (TypeAdapter) + new TypeAdapter() { + @Override + public void write(JsonWriter out, TagMetadataTypeInput value) + throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + obj.remove("additionalProperties"); + // serialize additional properties + if (value.getAdditionalProperties() != null) { + for (Map.Entry entry : + value.getAdditionalProperties().entrySet()) { + if (entry.getValue() instanceof String) + obj.addProperty(entry.getKey(), (String) entry.getValue()); + else if (entry.getValue() instanceof Number) + obj.addProperty(entry.getKey(), (Number) entry.getValue()); + else if (entry.getValue() instanceof Boolean) + obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); + else if (entry.getValue() instanceof Character) + obj.addProperty( + entry.getKey(), (Character) entry.getValue()); + else { + JsonElement jsonElement = gson.toJsonTree(entry.getValue()); + if (jsonElement.isJsonArray()) { + obj.add(entry.getKey(), jsonElement.getAsJsonArray()); + } else { + obj.add(entry.getKey(), jsonElement.getAsJsonObject()); + } + } + } + } + elementAdapter.write(out, obj); + } + + @Override + public TagMetadataTypeInput read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // store additional fields in the deserialized instance + TagMetadataTypeInput instance = thisAdapter.fromJsonTree(jsonObj); + for (Map.Entry entry : jsonObj.entrySet()) { + if (!openapiFields.contains(entry.getKey())) { + if (entry.getValue().isJsonPrimitive()) { // primitive type + if (entry.getValue().getAsJsonPrimitive().isString()) + instance.putAdditionalProperty( + entry.getKey(), entry.getValue().getAsString()); + else if (entry.getValue().getAsJsonPrimitive().isNumber()) + instance.putAdditionalProperty( + entry.getKey(), entry.getValue().getAsNumber()); + else if (entry.getValue().getAsJsonPrimitive().isBoolean()) + instance.putAdditionalProperty( + entry.getKey(), + entry.getValue().getAsBoolean()); + else + throw new IllegalArgumentException( + String.format( + "The field `%s` has unknown primitive" + + " type. Value: %s", + entry.getKey(), + entry.getValue().toString())); + } else if (entry.getValue().isJsonArray()) { + instance.putAdditionalProperty( + entry.getKey(), + gson.fromJson(entry.getValue(), List.class)); + } else { // JSON object + instance.putAdditionalProperty( + entry.getKey(), + gson.fromJson(entry.getValue(), HashMap.class)); + } + } + } + return instance; + } + }.nullSafe(); + } + } + + /** + * Create an instance of TagMetadataTypeInput given an JSON string + * + * @param jsonString JSON string + * @return An instance of TagMetadataTypeInput + * @throws IOException if the JSON string is invalid with respect to TagMetadataTypeInput + */ + public static TagMetadataTypeInput fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, TagMetadataTypeInput.class); + } + + /** + * Convert an instance of TagMetadataTypeInput to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} diff --git a/sdks/java/src/main/java/com/thoughtspot/client/model/TemplatePropertiesInputCreate.java b/sdks/java/src/main/java/com/thoughtspot/client/model/TemplatePropertiesInputCreate.java new file mode 100644 index 000000000..3cf0e18cc --- /dev/null +++ b/sdks/java/src/main/java/com/thoughtspot/client/model/TemplatePropertiesInputCreate.java @@ -0,0 +1,1319 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client.model; + +import com.google.gson.Gson; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.TypeAdapter; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.annotations.SerializedName; +import com.google.gson.reflect.TypeToken; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import com.thoughtspot.client.JSON; +import java.io.IOException; +import java.io.Serializable; +import java.util.Arrays; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Objects; +import org.openapitools.jackson.nullable.JsonNullable; + +/** Email customization configuration properties */ +@javax.annotation.Generated( + value = "org.openapitools.codegen.languages.JavaClientCodegen", + comments = "Generator version: 7.12.0") +public class TemplatePropertiesInputCreate implements Serializable { + private static final long serialVersionUID = 1L; + + public static final String SERIALIZED_NAME_CTA_BUTTON_BG_COLOR = "cta_button_bg_color"; + + @SerializedName(SERIALIZED_NAME_CTA_BUTTON_BG_COLOR) + @javax.annotation.Nullable + private String ctaButtonBgColor; + + public static final String SERIALIZED_NAME_CTA_TEXT_FONT_COLOR = "cta_text_font_color"; + + @SerializedName(SERIALIZED_NAME_CTA_TEXT_FONT_COLOR) + @javax.annotation.Nullable + private String ctaTextFontColor; + + public static final String SERIALIZED_NAME_PRIMARY_BG_COLOR = "primary_bg_color"; + + @SerializedName(SERIALIZED_NAME_PRIMARY_BG_COLOR) + @javax.annotation.Nullable + private String primaryBgColor; + + public static final String SERIALIZED_NAME_HOME_URL = "home_url"; + + @SerializedName(SERIALIZED_NAME_HOME_URL) + @javax.annotation.Nullable + private String homeUrl; + + public static final String SERIALIZED_NAME_LOGO_URL = "logo_url"; + + @SerializedName(SERIALIZED_NAME_LOGO_URL) + @javax.annotation.Nullable + private String logoUrl; + + public static final String SERIALIZED_NAME_FONT_FAMILY = "font_family"; + + @SerializedName(SERIALIZED_NAME_FONT_FAMILY) + @javax.annotation.Nullable + private String fontFamily; + + public static final String SERIALIZED_NAME_PRODUCT_NAME = "product_name"; + + @SerializedName(SERIALIZED_NAME_PRODUCT_NAME) + @javax.annotation.Nullable + private String productName; + + public static final String SERIALIZED_NAME_FOOTER_ADDRESS = "footer_address"; + + @SerializedName(SERIALIZED_NAME_FOOTER_ADDRESS) + @javax.annotation.Nullable + private String footerAddress; + + public static final String SERIALIZED_NAME_FOOTER_PHONE = "footer_phone"; + + @SerializedName(SERIALIZED_NAME_FOOTER_PHONE) + @javax.annotation.Nullable + private String footerPhone; + + public static final String SERIALIZED_NAME_REPLACEMENT_VALUE_FOR_LIVEBOARD = + "replacement_value_for_liveboard"; + + @SerializedName(SERIALIZED_NAME_REPLACEMENT_VALUE_FOR_LIVEBOARD) + @javax.annotation.Nullable + private String replacementValueForLiveboard; + + public static final String SERIALIZED_NAME_REPLACEMENT_VALUE_FOR_ANSWER = + "replacement_value_for_answer"; + + @SerializedName(SERIALIZED_NAME_REPLACEMENT_VALUE_FOR_ANSWER) + @javax.annotation.Nullable + private String replacementValueForAnswer; + + public static final String SERIALIZED_NAME_REPLACEMENT_VALUE_FOR_SPOT_IQ = + "replacement_value_for_spot_iq"; + + @SerializedName(SERIALIZED_NAME_REPLACEMENT_VALUE_FOR_SPOT_IQ) + @javax.annotation.Nullable + private String replacementValueForSpotIq; + + public static final String SERIALIZED_NAME_HIDE_FOOTER_ADDRESS = "hide_footer_address"; + + @SerializedName(SERIALIZED_NAME_HIDE_FOOTER_ADDRESS) + @javax.annotation.Nullable + private Boolean hideFooterAddress; + + public static final String SERIALIZED_NAME_HIDE_FOOTER_PHONE = "hide_footer_phone"; + + @SerializedName(SERIALIZED_NAME_HIDE_FOOTER_PHONE) + @javax.annotation.Nullable + private Boolean hideFooterPhone; + + public static final String SERIALIZED_NAME_HIDE_MANAGE_NOTIFICATION = + "hide_manage_notification"; + + @SerializedName(SERIALIZED_NAME_HIDE_MANAGE_NOTIFICATION) + @javax.annotation.Nullable + private Boolean hideManageNotification; + + public static final String SERIALIZED_NAME_HIDE_MOBILE_APP_NUDGE = "hide_mobile_app_nudge"; + + @SerializedName(SERIALIZED_NAME_HIDE_MOBILE_APP_NUDGE) + @javax.annotation.Nullable + private Boolean hideMobileAppNudge; + + public static final String SERIALIZED_NAME_HIDE_PRIVACY_POLICY = "hide_privacy_policy"; + + @SerializedName(SERIALIZED_NAME_HIDE_PRIVACY_POLICY) + @javax.annotation.Nullable + private Boolean hidePrivacyPolicy; + + public static final String SERIALIZED_NAME_HIDE_PRODUCT_NAME = "hide_product_name"; + + @SerializedName(SERIALIZED_NAME_HIDE_PRODUCT_NAME) + @javax.annotation.Nullable + private Boolean hideProductName; + + public static final String SERIALIZED_NAME_HIDE_TS_VOCABULARY_DEFINITIONS = + "hide_ts_vocabulary_definitions"; + + @SerializedName(SERIALIZED_NAME_HIDE_TS_VOCABULARY_DEFINITIONS) + @javax.annotation.Nullable + private Boolean hideTsVocabularyDefinitions; + + public static final String SERIALIZED_NAME_HIDE_NOTIFICATION_STATUS = + "hide_notification_status"; + + @SerializedName(SERIALIZED_NAME_HIDE_NOTIFICATION_STATUS) + @javax.annotation.Nullable + private Boolean hideNotificationStatus; + + public static final String SERIALIZED_NAME_HIDE_ERROR_MESSAGE = "hide_error_message"; + + @SerializedName(SERIALIZED_NAME_HIDE_ERROR_MESSAGE) + @javax.annotation.Nullable + private Boolean hideErrorMessage; + + public static final String SERIALIZED_NAME_HIDE_UNSUBSCRIBE_LINK = "hide_unsubscribe_link"; + + @SerializedName(SERIALIZED_NAME_HIDE_UNSUBSCRIBE_LINK) + @javax.annotation.Nullable + private Boolean hideUnsubscribeLink; + + public static final String SERIALIZED_NAME_HIDE_MODIFY_ALERT = "hide_modify_alert"; + + @SerializedName(SERIALIZED_NAME_HIDE_MODIFY_ALERT) + @javax.annotation.Nullable + private Boolean hideModifyAlert; + + public static final String SERIALIZED_NAME_COMPANY_PRIVACY_POLICY_URL = + "company_privacy_policy_url"; + + @SerializedName(SERIALIZED_NAME_COMPANY_PRIVACY_POLICY_URL) + @javax.annotation.Nullable + private String companyPrivacyPolicyUrl; + + public static final String SERIALIZED_NAME_COMPANY_WEBSITE_URL = "company_website_url"; + + @SerializedName(SERIALIZED_NAME_COMPANY_WEBSITE_URL) + @javax.annotation.Nullable + private String companyWebsiteUrl; + + public static final String SERIALIZED_NAME_CONTACT_SUPPORT_URL = "contact_support_url"; + + @SerializedName(SERIALIZED_NAME_CONTACT_SUPPORT_URL) + @javax.annotation.Nullable + private String contactSupportUrl; + + public static final String SERIALIZED_NAME_HIDE_CONTACT_SUPPORT_URL = + "hide_contact_support_url"; + + @SerializedName(SERIALIZED_NAME_HIDE_CONTACT_SUPPORT_URL) + @javax.annotation.Nullable + private Boolean hideContactSupportUrl; + + public static final String SERIALIZED_NAME_HIDE_LOGO_URL = "hide_logo_url"; + + @SerializedName(SERIALIZED_NAME_HIDE_LOGO_URL) + @javax.annotation.Nullable + private Boolean hideLogoUrl; + + public TemplatePropertiesInputCreate() {} + + public TemplatePropertiesInputCreate ctaButtonBgColor( + @javax.annotation.Nullable String ctaButtonBgColor) { + this.ctaButtonBgColor = ctaButtonBgColor; + return this; + } + + /** + * Background color for call-to-action button in hex format + * + * @return ctaButtonBgColor + */ + @javax.annotation.Nullable + public String getCtaButtonBgColor() { + return ctaButtonBgColor; + } + + public void setCtaButtonBgColor(@javax.annotation.Nullable String ctaButtonBgColor) { + this.ctaButtonBgColor = ctaButtonBgColor; + } + + public TemplatePropertiesInputCreate ctaTextFontColor( + @javax.annotation.Nullable String ctaTextFontColor) { + this.ctaTextFontColor = ctaTextFontColor; + return this; + } + + /** + * Text color for call-to-action button in hex format + * + * @return ctaTextFontColor + */ + @javax.annotation.Nullable + public String getCtaTextFontColor() { + return ctaTextFontColor; + } + + public void setCtaTextFontColor(@javax.annotation.Nullable String ctaTextFontColor) { + this.ctaTextFontColor = ctaTextFontColor; + } + + public TemplatePropertiesInputCreate primaryBgColor( + @javax.annotation.Nullable String primaryBgColor) { + this.primaryBgColor = primaryBgColor; + return this; + } + + /** + * Primary background color in hex format + * + * @return primaryBgColor + */ + @javax.annotation.Nullable + public String getPrimaryBgColor() { + return primaryBgColor; + } + + public void setPrimaryBgColor(@javax.annotation.Nullable String primaryBgColor) { + this.primaryBgColor = primaryBgColor; + } + + public TemplatePropertiesInputCreate homeUrl(@javax.annotation.Nullable String homeUrl) { + this.homeUrl = homeUrl; + return this; + } + + /** + * Home page URL (HTTP/HTTPS only) + * + * @return homeUrl + */ + @javax.annotation.Nullable + public String getHomeUrl() { + return homeUrl; + } + + public void setHomeUrl(@javax.annotation.Nullable String homeUrl) { + this.homeUrl = homeUrl; + } + + public TemplatePropertiesInputCreate logoUrl(@javax.annotation.Nullable String logoUrl) { + this.logoUrl = logoUrl; + return this; + } + + /** + * Logo image URL (HTTP/HTTPS only) + * + * @return logoUrl + */ + @javax.annotation.Nullable + public String getLogoUrl() { + return logoUrl; + } + + public void setLogoUrl(@javax.annotation.Nullable String logoUrl) { + this.logoUrl = logoUrl; + } + + public TemplatePropertiesInputCreate fontFamily(@javax.annotation.Nullable String fontFamily) { + this.fontFamily = fontFamily; + return this; + } + + /** + * Font family for email content (e.g., Arial, sans-serif) + * + * @return fontFamily + */ + @javax.annotation.Nullable + public String getFontFamily() { + return fontFamily; + } + + public void setFontFamily(@javax.annotation.Nullable String fontFamily) { + this.fontFamily = fontFamily; + } + + public TemplatePropertiesInputCreate productName( + @javax.annotation.Nullable String productName) { + this.productName = productName; + return this; + } + + /** + * Product name to display + * + * @return productName + */ + @javax.annotation.Nullable + public String getProductName() { + return productName; + } + + public void setProductName(@javax.annotation.Nullable String productName) { + this.productName = productName; + } + + public TemplatePropertiesInputCreate footerAddress( + @javax.annotation.Nullable String footerAddress) { + this.footerAddress = footerAddress; + return this; + } + + /** + * Footer address text + * + * @return footerAddress + */ + @javax.annotation.Nullable + public String getFooterAddress() { + return footerAddress; + } + + public void setFooterAddress(@javax.annotation.Nullable String footerAddress) { + this.footerAddress = footerAddress; + } + + public TemplatePropertiesInputCreate footerPhone( + @javax.annotation.Nullable String footerPhone) { + this.footerPhone = footerPhone; + return this; + } + + /** + * Footer phone number + * + * @return footerPhone + */ + @javax.annotation.Nullable + public String getFooterPhone() { + return footerPhone; + } + + public void setFooterPhone(@javax.annotation.Nullable String footerPhone) { + this.footerPhone = footerPhone; + } + + public TemplatePropertiesInputCreate replacementValueForLiveboard( + @javax.annotation.Nullable String replacementValueForLiveboard) { + this.replacementValueForLiveboard = replacementValueForLiveboard; + return this; + } + + /** + * Replacement value for Liveboard + * + * @return replacementValueForLiveboard + */ + @javax.annotation.Nullable + public String getReplacementValueForLiveboard() { + return replacementValueForLiveboard; + } + + public void setReplacementValueForLiveboard( + @javax.annotation.Nullable String replacementValueForLiveboard) { + this.replacementValueForLiveboard = replacementValueForLiveboard; + } + + public TemplatePropertiesInputCreate replacementValueForAnswer( + @javax.annotation.Nullable String replacementValueForAnswer) { + this.replacementValueForAnswer = replacementValueForAnswer; + return this; + } + + /** + * Replacement value for Answer + * + * @return replacementValueForAnswer + */ + @javax.annotation.Nullable + public String getReplacementValueForAnswer() { + return replacementValueForAnswer; + } + + public void setReplacementValueForAnswer( + @javax.annotation.Nullable String replacementValueForAnswer) { + this.replacementValueForAnswer = replacementValueForAnswer; + } + + public TemplatePropertiesInputCreate replacementValueForSpotIq( + @javax.annotation.Nullable String replacementValueForSpotIq) { + this.replacementValueForSpotIq = replacementValueForSpotIq; + return this; + } + + /** + * Replacement value for SpotIQ + * + * @return replacementValueForSpotIq + */ + @javax.annotation.Nullable + public String getReplacementValueForSpotIq() { + return replacementValueForSpotIq; + } + + public void setReplacementValueForSpotIq( + @javax.annotation.Nullable String replacementValueForSpotIq) { + this.replacementValueForSpotIq = replacementValueForSpotIq; + } + + public TemplatePropertiesInputCreate hideFooterAddress( + @javax.annotation.Nullable Boolean hideFooterAddress) { + this.hideFooterAddress = hideFooterAddress; + return this; + } + + /** + * Whether to hide footer address + * + * @return hideFooterAddress + */ + @javax.annotation.Nullable + public Boolean getHideFooterAddress() { + return hideFooterAddress; + } + + public void setHideFooterAddress(@javax.annotation.Nullable Boolean hideFooterAddress) { + this.hideFooterAddress = hideFooterAddress; + } + + public TemplatePropertiesInputCreate hideFooterPhone( + @javax.annotation.Nullable Boolean hideFooterPhone) { + this.hideFooterPhone = hideFooterPhone; + return this; + } + + /** + * Whether to hide footer phone number + * + * @return hideFooterPhone + */ + @javax.annotation.Nullable + public Boolean getHideFooterPhone() { + return hideFooterPhone; + } + + public void setHideFooterPhone(@javax.annotation.Nullable Boolean hideFooterPhone) { + this.hideFooterPhone = hideFooterPhone; + } + + public TemplatePropertiesInputCreate hideManageNotification( + @javax.annotation.Nullable Boolean hideManageNotification) { + this.hideManageNotification = hideManageNotification; + return this; + } + + /** + * Whether to hide manage notification link + * + * @return hideManageNotification + */ + @javax.annotation.Nullable + public Boolean getHideManageNotification() { + return hideManageNotification; + } + + public void setHideManageNotification( + @javax.annotation.Nullable Boolean hideManageNotification) { + this.hideManageNotification = hideManageNotification; + } + + public TemplatePropertiesInputCreate hideMobileAppNudge( + @javax.annotation.Nullable Boolean hideMobileAppNudge) { + this.hideMobileAppNudge = hideMobileAppNudge; + return this; + } + + /** + * Whether to hide mobile app nudge + * + * @return hideMobileAppNudge + */ + @javax.annotation.Nullable + public Boolean getHideMobileAppNudge() { + return hideMobileAppNudge; + } + + public void setHideMobileAppNudge(@javax.annotation.Nullable Boolean hideMobileAppNudge) { + this.hideMobileAppNudge = hideMobileAppNudge; + } + + public TemplatePropertiesInputCreate hidePrivacyPolicy( + @javax.annotation.Nullable Boolean hidePrivacyPolicy) { + this.hidePrivacyPolicy = hidePrivacyPolicy; + return this; + } + + /** + * Whether to hide privacy policy link + * + * @return hidePrivacyPolicy + */ + @javax.annotation.Nullable + public Boolean getHidePrivacyPolicy() { + return hidePrivacyPolicy; + } + + public void setHidePrivacyPolicy(@javax.annotation.Nullable Boolean hidePrivacyPolicy) { + this.hidePrivacyPolicy = hidePrivacyPolicy; + } + + public TemplatePropertiesInputCreate hideProductName( + @javax.annotation.Nullable Boolean hideProductName) { + this.hideProductName = hideProductName; + return this; + } + + /** + * Whether to hide product name + * + * @return hideProductName + */ + @javax.annotation.Nullable + public Boolean getHideProductName() { + return hideProductName; + } + + public void setHideProductName(@javax.annotation.Nullable Boolean hideProductName) { + this.hideProductName = hideProductName; + } + + public TemplatePropertiesInputCreate hideTsVocabularyDefinitions( + @javax.annotation.Nullable Boolean hideTsVocabularyDefinitions) { + this.hideTsVocabularyDefinitions = hideTsVocabularyDefinitions; + return this; + } + + /** + * Whether to hide ThoughtSpot vocabulary definitions + * + * @return hideTsVocabularyDefinitions + */ + @javax.annotation.Nullable + public Boolean getHideTsVocabularyDefinitions() { + return hideTsVocabularyDefinitions; + } + + public void setHideTsVocabularyDefinitions( + @javax.annotation.Nullable Boolean hideTsVocabularyDefinitions) { + this.hideTsVocabularyDefinitions = hideTsVocabularyDefinitions; + } + + public TemplatePropertiesInputCreate hideNotificationStatus( + @javax.annotation.Nullable Boolean hideNotificationStatus) { + this.hideNotificationStatus = hideNotificationStatus; + return this; + } + + /** + * Whether to hide notification status + * + * @return hideNotificationStatus + */ + @javax.annotation.Nullable + public Boolean getHideNotificationStatus() { + return hideNotificationStatus; + } + + public void setHideNotificationStatus( + @javax.annotation.Nullable Boolean hideNotificationStatus) { + this.hideNotificationStatus = hideNotificationStatus; + } + + public TemplatePropertiesInputCreate hideErrorMessage( + @javax.annotation.Nullable Boolean hideErrorMessage) { + this.hideErrorMessage = hideErrorMessage; + return this; + } + + /** + * Whether to hide error message + * + * @return hideErrorMessage + */ + @javax.annotation.Nullable + public Boolean getHideErrorMessage() { + return hideErrorMessage; + } + + public void setHideErrorMessage(@javax.annotation.Nullable Boolean hideErrorMessage) { + this.hideErrorMessage = hideErrorMessage; + } + + public TemplatePropertiesInputCreate hideUnsubscribeLink( + @javax.annotation.Nullable Boolean hideUnsubscribeLink) { + this.hideUnsubscribeLink = hideUnsubscribeLink; + return this; + } + + /** + * Whether to hide unsubscribe link + * + * @return hideUnsubscribeLink + */ + @javax.annotation.Nullable + public Boolean getHideUnsubscribeLink() { + return hideUnsubscribeLink; + } + + public void setHideUnsubscribeLink(@javax.annotation.Nullable Boolean hideUnsubscribeLink) { + this.hideUnsubscribeLink = hideUnsubscribeLink; + } + + public TemplatePropertiesInputCreate hideModifyAlert( + @javax.annotation.Nullable Boolean hideModifyAlert) { + this.hideModifyAlert = hideModifyAlert; + return this; + } + + /** + * Whether to hide modify alert + * + * @return hideModifyAlert + */ + @javax.annotation.Nullable + public Boolean getHideModifyAlert() { + return hideModifyAlert; + } + + public void setHideModifyAlert(@javax.annotation.Nullable Boolean hideModifyAlert) { + this.hideModifyAlert = hideModifyAlert; + } + + public TemplatePropertiesInputCreate companyPrivacyPolicyUrl( + @javax.annotation.Nullable String companyPrivacyPolicyUrl) { + this.companyPrivacyPolicyUrl = companyPrivacyPolicyUrl; + return this; + } + + /** + * Company privacy policy URL (HTTP/HTTPS only) + * + * @return companyPrivacyPolicyUrl + */ + @javax.annotation.Nullable + public String getCompanyPrivacyPolicyUrl() { + return companyPrivacyPolicyUrl; + } + + public void setCompanyPrivacyPolicyUrl( + @javax.annotation.Nullable String companyPrivacyPolicyUrl) { + this.companyPrivacyPolicyUrl = companyPrivacyPolicyUrl; + } + + public TemplatePropertiesInputCreate companyWebsiteUrl( + @javax.annotation.Nullable String companyWebsiteUrl) { + this.companyWebsiteUrl = companyWebsiteUrl; + return this; + } + + /** + * Company website URL (HTTP/HTTPS only) + * + * @return companyWebsiteUrl + */ + @javax.annotation.Nullable + public String getCompanyWebsiteUrl() { + return companyWebsiteUrl; + } + + public void setCompanyWebsiteUrl(@javax.annotation.Nullable String companyWebsiteUrl) { + this.companyWebsiteUrl = companyWebsiteUrl; + } + + public TemplatePropertiesInputCreate contactSupportUrl( + @javax.annotation.Nullable String contactSupportUrl) { + this.contactSupportUrl = contactSupportUrl; + return this; + } + + /** + * Contact support url (HTTP/HTTPS only). Version: 26.2.0.cl or later + * + * @return contactSupportUrl + */ + @javax.annotation.Nullable + public String getContactSupportUrl() { + return contactSupportUrl; + } + + public void setContactSupportUrl(@javax.annotation.Nullable String contactSupportUrl) { + this.contactSupportUrl = contactSupportUrl; + } + + public TemplatePropertiesInputCreate hideContactSupportUrl( + @javax.annotation.Nullable Boolean hideContactSupportUrl) { + this.hideContactSupportUrl = hideContactSupportUrl; + return this; + } + + /** + * Whether to hide contact support url. Version: 26.2.0.cl or later + * + * @return hideContactSupportUrl + */ + @javax.annotation.Nullable + public Boolean getHideContactSupportUrl() { + return hideContactSupportUrl; + } + + public void setHideContactSupportUrl(@javax.annotation.Nullable Boolean hideContactSupportUrl) { + this.hideContactSupportUrl = hideContactSupportUrl; + } + + public TemplatePropertiesInputCreate hideLogoUrl( + @javax.annotation.Nullable Boolean hideLogoUrl) { + this.hideLogoUrl = hideLogoUrl; + return this; + } + + /** + * Whether to hide logo Version: 26.4.0.cl or later + * + * @return hideLogoUrl + */ + @javax.annotation.Nullable + public Boolean getHideLogoUrl() { + return hideLogoUrl; + } + + public void setHideLogoUrl(@javax.annotation.Nullable Boolean hideLogoUrl) { + this.hideLogoUrl = hideLogoUrl; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key name of the property + * @param value value of the property + * @return the TemplatePropertiesInputCreate instance itself + */ + public TemplatePropertiesInputCreate putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return a map of objects + */ + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key name of the property + * @return an object + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + TemplatePropertiesInputCreate templatePropertiesInputCreate = + (TemplatePropertiesInputCreate) o; + return Objects.equals(this.ctaButtonBgColor, templatePropertiesInputCreate.ctaButtonBgColor) + && Objects.equals( + this.ctaTextFontColor, templatePropertiesInputCreate.ctaTextFontColor) + && Objects.equals(this.primaryBgColor, templatePropertiesInputCreate.primaryBgColor) + && Objects.equals(this.homeUrl, templatePropertiesInputCreate.homeUrl) + && Objects.equals(this.logoUrl, templatePropertiesInputCreate.logoUrl) + && Objects.equals(this.fontFamily, templatePropertiesInputCreate.fontFamily) + && Objects.equals(this.productName, templatePropertiesInputCreate.productName) + && Objects.equals(this.footerAddress, templatePropertiesInputCreate.footerAddress) + && Objects.equals(this.footerPhone, templatePropertiesInputCreate.footerPhone) + && Objects.equals( + this.replacementValueForLiveboard, + templatePropertiesInputCreate.replacementValueForLiveboard) + && Objects.equals( + this.replacementValueForAnswer, + templatePropertiesInputCreate.replacementValueForAnswer) + && Objects.equals( + this.replacementValueForSpotIq, + templatePropertiesInputCreate.replacementValueForSpotIq) + && Objects.equals( + this.hideFooterAddress, templatePropertiesInputCreate.hideFooterAddress) + && Objects.equals( + this.hideFooterPhone, templatePropertiesInputCreate.hideFooterPhone) + && Objects.equals( + this.hideManageNotification, + templatePropertiesInputCreate.hideManageNotification) + && Objects.equals( + this.hideMobileAppNudge, templatePropertiesInputCreate.hideMobileAppNudge) + && Objects.equals( + this.hidePrivacyPolicy, templatePropertiesInputCreate.hidePrivacyPolicy) + && Objects.equals( + this.hideProductName, templatePropertiesInputCreate.hideProductName) + && Objects.equals( + this.hideTsVocabularyDefinitions, + templatePropertiesInputCreate.hideTsVocabularyDefinitions) + && Objects.equals( + this.hideNotificationStatus, + templatePropertiesInputCreate.hideNotificationStatus) + && Objects.equals( + this.hideErrorMessage, templatePropertiesInputCreate.hideErrorMessage) + && Objects.equals( + this.hideUnsubscribeLink, templatePropertiesInputCreate.hideUnsubscribeLink) + && Objects.equals( + this.hideModifyAlert, templatePropertiesInputCreate.hideModifyAlert) + && Objects.equals( + this.companyPrivacyPolicyUrl, + templatePropertiesInputCreate.companyPrivacyPolicyUrl) + && Objects.equals( + this.companyWebsiteUrl, templatePropertiesInputCreate.companyWebsiteUrl) + && Objects.equals( + this.contactSupportUrl, templatePropertiesInputCreate.contactSupportUrl) + && Objects.equals( + this.hideContactSupportUrl, + templatePropertiesInputCreate.hideContactSupportUrl) + && Objects.equals(this.hideLogoUrl, templatePropertiesInputCreate.hideLogoUrl) + && Objects.equals( + this.additionalProperties, + templatePropertiesInputCreate.additionalProperties); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b + || (a != null + && b != null + && a.isPresent() + && b.isPresent() + && Objects.deepEquals(a.get(), b.get())); + } + + @Override + public int hashCode() { + return Objects.hash( + ctaButtonBgColor, + ctaTextFontColor, + primaryBgColor, + homeUrl, + logoUrl, + fontFamily, + productName, + footerAddress, + footerPhone, + replacementValueForLiveboard, + replacementValueForAnswer, + replacementValueForSpotIq, + hideFooterAddress, + hideFooterPhone, + hideManageNotification, + hideMobileAppNudge, + hidePrivacyPolicy, + hideProductName, + hideTsVocabularyDefinitions, + hideNotificationStatus, + hideErrorMessage, + hideUnsubscribeLink, + hideModifyAlert, + companyPrivacyPolicyUrl, + companyWebsiteUrl, + contactSupportUrl, + hideContactSupportUrl, + hideLogoUrl, + additionalProperties); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; + } + return a.isPresent() ? Arrays.deepHashCode(new Object[] {a.get()}) : 31; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class TemplatePropertiesInputCreate {\n"); + sb.append(" ctaButtonBgColor: ").append(toIndentedString(ctaButtonBgColor)).append("\n"); + sb.append(" ctaTextFontColor: ").append(toIndentedString(ctaTextFontColor)).append("\n"); + sb.append(" primaryBgColor: ").append(toIndentedString(primaryBgColor)).append("\n"); + sb.append(" homeUrl: ").append(toIndentedString(homeUrl)).append("\n"); + sb.append(" logoUrl: ").append(toIndentedString(logoUrl)).append("\n"); + sb.append(" fontFamily: ").append(toIndentedString(fontFamily)).append("\n"); + sb.append(" productName: ").append(toIndentedString(productName)).append("\n"); + sb.append(" footerAddress: ").append(toIndentedString(footerAddress)).append("\n"); + sb.append(" footerPhone: ").append(toIndentedString(footerPhone)).append("\n"); + sb.append(" replacementValueForLiveboard: ") + .append(toIndentedString(replacementValueForLiveboard)) + .append("\n"); + sb.append(" replacementValueForAnswer: ") + .append(toIndentedString(replacementValueForAnswer)) + .append("\n"); + sb.append(" replacementValueForSpotIq: ") + .append(toIndentedString(replacementValueForSpotIq)) + .append("\n"); + sb.append(" hideFooterAddress: ") + .append(toIndentedString(hideFooterAddress)) + .append("\n"); + sb.append(" hideFooterPhone: ").append(toIndentedString(hideFooterPhone)).append("\n"); + sb.append(" hideManageNotification: ") + .append(toIndentedString(hideManageNotification)) + .append("\n"); + sb.append(" hideMobileAppNudge: ") + .append(toIndentedString(hideMobileAppNudge)) + .append("\n"); + sb.append(" hidePrivacyPolicy: ") + .append(toIndentedString(hidePrivacyPolicy)) + .append("\n"); + sb.append(" hideProductName: ").append(toIndentedString(hideProductName)).append("\n"); + sb.append(" hideTsVocabularyDefinitions: ") + .append(toIndentedString(hideTsVocabularyDefinitions)) + .append("\n"); + sb.append(" hideNotificationStatus: ") + .append(toIndentedString(hideNotificationStatus)) + .append("\n"); + sb.append(" hideErrorMessage: ").append(toIndentedString(hideErrorMessage)).append("\n"); + sb.append(" hideUnsubscribeLink: ") + .append(toIndentedString(hideUnsubscribeLink)) + .append("\n"); + sb.append(" hideModifyAlert: ").append(toIndentedString(hideModifyAlert)).append("\n"); + sb.append(" companyPrivacyPolicyUrl: ") + .append(toIndentedString(companyPrivacyPolicyUrl)) + .append("\n"); + sb.append(" companyWebsiteUrl: ") + .append(toIndentedString(companyWebsiteUrl)) + .append("\n"); + sb.append(" contactSupportUrl: ") + .append(toIndentedString(contactSupportUrl)) + .append("\n"); + sb.append(" hideContactSupportUrl: ") + .append(toIndentedString(hideContactSupportUrl)) + .append("\n"); + sb.append(" hideLogoUrl: ").append(toIndentedString(hideLogoUrl)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first + * line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("cta_button_bg_color"); + openapiFields.add("cta_text_font_color"); + openapiFields.add("primary_bg_color"); + openapiFields.add("home_url"); + openapiFields.add("logo_url"); + openapiFields.add("font_family"); + openapiFields.add("product_name"); + openapiFields.add("footer_address"); + openapiFields.add("footer_phone"); + openapiFields.add("replacement_value_for_liveboard"); + openapiFields.add("replacement_value_for_answer"); + openapiFields.add("replacement_value_for_spot_iq"); + openapiFields.add("hide_footer_address"); + openapiFields.add("hide_footer_phone"); + openapiFields.add("hide_manage_notification"); + openapiFields.add("hide_mobile_app_nudge"); + openapiFields.add("hide_privacy_policy"); + openapiFields.add("hide_product_name"); + openapiFields.add("hide_ts_vocabulary_definitions"); + openapiFields.add("hide_notification_status"); + openapiFields.add("hide_error_message"); + openapiFields.add("hide_unsubscribe_link"); + openapiFields.add("hide_modify_alert"); + openapiFields.add("company_privacy_policy_url"); + openapiFields.add("company_website_url"); + openapiFields.add("contact_support_url"); + openapiFields.add("hide_contact_support_url"); + openapiFields.add("hide_logo_url"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to + * TemplatePropertiesInputCreate + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!TemplatePropertiesInputCreate.openapiRequiredFields + .isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException( + String.format( + "The required field(s) %s in TemplatePropertiesInputCreate is not" + + " found in the empty JSON string", + TemplatePropertiesInputCreate.openapiRequiredFields.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if ((jsonObj.get("cta_button_bg_color") != null + && !jsonObj.get("cta_button_bg_color").isJsonNull()) + && !jsonObj.get("cta_button_bg_color").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `cta_button_bg_color` to be a primitive type in" + + " the JSON string but got `%s`", + jsonObj.get("cta_button_bg_color").toString())); + } + if ((jsonObj.get("cta_text_font_color") != null + && !jsonObj.get("cta_text_font_color").isJsonNull()) + && !jsonObj.get("cta_text_font_color").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `cta_text_font_color` to be a primitive type in" + + " the JSON string but got `%s`", + jsonObj.get("cta_text_font_color").toString())); + } + if ((jsonObj.get("primary_bg_color") != null + && !jsonObj.get("primary_bg_color").isJsonNull()) + && !jsonObj.get("primary_bg_color").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `primary_bg_color` to be a primitive type in the" + + " JSON string but got `%s`", + jsonObj.get("primary_bg_color").toString())); + } + if ((jsonObj.get("home_url") != null && !jsonObj.get("home_url").isJsonNull()) + && !jsonObj.get("home_url").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `home_url` to be a primitive type in the JSON" + + " string but got `%s`", + jsonObj.get("home_url").toString())); + } + if ((jsonObj.get("logo_url") != null && !jsonObj.get("logo_url").isJsonNull()) + && !jsonObj.get("logo_url").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `logo_url` to be a primitive type in the JSON" + + " string but got `%s`", + jsonObj.get("logo_url").toString())); + } + if ((jsonObj.get("font_family") != null && !jsonObj.get("font_family").isJsonNull()) + && !jsonObj.get("font_family").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `font_family` to be a primitive type in the JSON" + + " string but got `%s`", + jsonObj.get("font_family").toString())); + } + if ((jsonObj.get("product_name") != null && !jsonObj.get("product_name").isJsonNull()) + && !jsonObj.get("product_name").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `product_name` to be a primitive type in the JSON" + + " string but got `%s`", + jsonObj.get("product_name").toString())); + } + if ((jsonObj.get("footer_address") != null && !jsonObj.get("footer_address").isJsonNull()) + && !jsonObj.get("footer_address").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `footer_address` to be a primitive type in the" + + " JSON string but got `%s`", + jsonObj.get("footer_address").toString())); + } + if ((jsonObj.get("footer_phone") != null && !jsonObj.get("footer_phone").isJsonNull()) + && !jsonObj.get("footer_phone").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `footer_phone` to be a primitive type in the JSON" + + " string but got `%s`", + jsonObj.get("footer_phone").toString())); + } + if ((jsonObj.get("replacement_value_for_liveboard") != null + && !jsonObj.get("replacement_value_for_liveboard").isJsonNull()) + && !jsonObj.get("replacement_value_for_liveboard").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `replacement_value_for_liveboard` to be a" + + " primitive type in the JSON string but got `%s`", + jsonObj.get("replacement_value_for_liveboard").toString())); + } + if ((jsonObj.get("replacement_value_for_answer") != null + && !jsonObj.get("replacement_value_for_answer").isJsonNull()) + && !jsonObj.get("replacement_value_for_answer").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `replacement_value_for_answer` to be a primitive" + + " type in the JSON string but got `%s`", + jsonObj.get("replacement_value_for_answer").toString())); + } + if ((jsonObj.get("replacement_value_for_spot_iq") != null + && !jsonObj.get("replacement_value_for_spot_iq").isJsonNull()) + && !jsonObj.get("replacement_value_for_spot_iq").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `replacement_value_for_spot_iq` to be a primitive" + + " type in the JSON string but got `%s`", + jsonObj.get("replacement_value_for_spot_iq").toString())); + } + if ((jsonObj.get("company_privacy_policy_url") != null + && !jsonObj.get("company_privacy_policy_url").isJsonNull()) + && !jsonObj.get("company_privacy_policy_url").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `company_privacy_policy_url` to be a primitive" + + " type in the JSON string but got `%s`", + jsonObj.get("company_privacy_policy_url").toString())); + } + if ((jsonObj.get("company_website_url") != null + && !jsonObj.get("company_website_url").isJsonNull()) + && !jsonObj.get("company_website_url").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `company_website_url` to be a primitive type in" + + " the JSON string but got `%s`", + jsonObj.get("company_website_url").toString())); + } + if ((jsonObj.get("contact_support_url") != null + && !jsonObj.get("contact_support_url").isJsonNull()) + && !jsonObj.get("contact_support_url").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `contact_support_url` to be a primitive type in" + + " the JSON string but got `%s`", + jsonObj.get("contact_support_url").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!TemplatePropertiesInputCreate.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'TemplatePropertiesInputCreate' and its + // subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter = + gson.getDelegateAdapter( + this, TypeToken.get(TemplatePropertiesInputCreate.class)); + + return (TypeAdapter) + new TypeAdapter() { + @Override + public void write(JsonWriter out, TemplatePropertiesInputCreate value) + throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + obj.remove("additionalProperties"); + // serialize additional properties + if (value.getAdditionalProperties() != null) { + for (Map.Entry entry : + value.getAdditionalProperties().entrySet()) { + if (entry.getValue() instanceof String) + obj.addProperty(entry.getKey(), (String) entry.getValue()); + else if (entry.getValue() instanceof Number) + obj.addProperty(entry.getKey(), (Number) entry.getValue()); + else if (entry.getValue() instanceof Boolean) + obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); + else if (entry.getValue() instanceof Character) + obj.addProperty( + entry.getKey(), (Character) entry.getValue()); + else { + JsonElement jsonElement = gson.toJsonTree(entry.getValue()); + if (jsonElement.isJsonArray()) { + obj.add(entry.getKey(), jsonElement.getAsJsonArray()); + } else { + obj.add(entry.getKey(), jsonElement.getAsJsonObject()); + } + } + } + } + elementAdapter.write(out, obj); + } + + @Override + public TemplatePropertiesInputCreate read(JsonReader in) + throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // store additional fields in the deserialized instance + TemplatePropertiesInputCreate instance = + thisAdapter.fromJsonTree(jsonObj); + for (Map.Entry entry : jsonObj.entrySet()) { + if (!openapiFields.contains(entry.getKey())) { + if (entry.getValue().isJsonPrimitive()) { // primitive type + if (entry.getValue().getAsJsonPrimitive().isString()) + instance.putAdditionalProperty( + entry.getKey(), entry.getValue().getAsString()); + else if (entry.getValue().getAsJsonPrimitive().isNumber()) + instance.putAdditionalProperty( + entry.getKey(), entry.getValue().getAsNumber()); + else if (entry.getValue().getAsJsonPrimitive().isBoolean()) + instance.putAdditionalProperty( + entry.getKey(), + entry.getValue().getAsBoolean()); + else + throw new IllegalArgumentException( + String.format( + "The field `%s` has unknown primitive" + + " type. Value: %s", + entry.getKey(), + entry.getValue().toString())); + } else if (entry.getValue().isJsonArray()) { + instance.putAdditionalProperty( + entry.getKey(), + gson.fromJson(entry.getValue(), List.class)); + } else { // JSON object + instance.putAdditionalProperty( + entry.getKey(), + gson.fromJson(entry.getValue(), HashMap.class)); + } + } + } + return instance; + } + }.nullSafe(); + } + } + + /** + * Create an instance of TemplatePropertiesInputCreate given an JSON string + * + * @param jsonString JSON string + * @return An instance of TemplatePropertiesInputCreate + * @throws IOException if the JSON string is invalid with respect to + * TemplatePropertiesInputCreate + */ + public static TemplatePropertiesInputCreate fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, TemplatePropertiesInputCreate.class); + } + + /** + * Convert an instance of TemplatePropertiesInputCreate to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} diff --git a/sdks/java/src/main/java/com/thoughtspot/client/model/Token.java b/sdks/java/src/main/java/com/thoughtspot/client/model/Token.java new file mode 100644 index 000000000..f1dbc7f77 --- /dev/null +++ b/sdks/java/src/main/java/com/thoughtspot/client/model/Token.java @@ -0,0 +1,473 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client.model; + +import com.google.gson.Gson; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.TypeAdapter; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.annotations.SerializedName; +import com.google.gson.reflect.TypeToken; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import com.thoughtspot.client.JSON; +import java.io.IOException; +import java.io.Serializable; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Objects; + +/** Token */ +@javax.annotation.Generated( + value = "org.openapitools.codegen.languages.JavaClientCodegen", + comments = "Generator version: 7.12.0") +public class Token implements Serializable { + private static final long serialVersionUID = 1L; + + public static final String SERIALIZED_NAME_TOKEN = "token"; + + @SerializedName(SERIALIZED_NAME_TOKEN) + @javax.annotation.Nonnull + private String token; + + public static final String SERIALIZED_NAME_CREATION_TIME_IN_MILLIS = "creation_time_in_millis"; + + @SerializedName(SERIALIZED_NAME_CREATION_TIME_IN_MILLIS) + @javax.annotation.Nonnull + private Float creationTimeInMillis; + + public static final String SERIALIZED_NAME_EXPIRATION_TIME_IN_MILLIS = + "expiration_time_in_millis"; + + @SerializedName(SERIALIZED_NAME_EXPIRATION_TIME_IN_MILLIS) + @javax.annotation.Nonnull + private Float expirationTimeInMillis; + + public static final String SERIALIZED_NAME_SCOPE = "scope"; + + @SerializedName(SERIALIZED_NAME_SCOPE) + @javax.annotation.Nonnull + private Scope scope; + + public static final String SERIALIZED_NAME_VALID_FOR_USER_ID = "valid_for_user_id"; + + @SerializedName(SERIALIZED_NAME_VALID_FOR_USER_ID) + @javax.annotation.Nonnull + private String validForUserId; + + public static final String SERIALIZED_NAME_VALID_FOR_USERNAME = "valid_for_username"; + + @SerializedName(SERIALIZED_NAME_VALID_FOR_USERNAME) + @javax.annotation.Nonnull + private String validForUsername; + + public Token() {} + + public Token token(@javax.annotation.Nonnull String token) { + this.token = token; + return this; + } + + /** + * Bearer auth token. + * + * @return token + */ + @javax.annotation.Nonnull + public String getToken() { + return token; + } + + public void setToken(@javax.annotation.Nonnull String token) { + this.token = token; + } + + public Token creationTimeInMillis(@javax.annotation.Nonnull Float creationTimeInMillis) { + this.creationTimeInMillis = creationTimeInMillis; + return this; + } + + /** + * Token creation time in milliseconds. + * + * @return creationTimeInMillis + */ + @javax.annotation.Nonnull + public Float getCreationTimeInMillis() { + return creationTimeInMillis; + } + + public void setCreationTimeInMillis(@javax.annotation.Nonnull Float creationTimeInMillis) { + this.creationTimeInMillis = creationTimeInMillis; + } + + public Token expirationTimeInMillis(@javax.annotation.Nonnull Float expirationTimeInMillis) { + this.expirationTimeInMillis = expirationTimeInMillis; + return this; + } + + /** + * Token expiration time in milliseconds. + * + * @return expirationTimeInMillis + */ + @javax.annotation.Nonnull + public Float getExpirationTimeInMillis() { + return expirationTimeInMillis; + } + + public void setExpirationTimeInMillis(@javax.annotation.Nonnull Float expirationTimeInMillis) { + this.expirationTimeInMillis = expirationTimeInMillis; + } + + public Token scope(@javax.annotation.Nonnull Scope scope) { + this.scope = scope; + return this; + } + + /** + * Get scope + * + * @return scope + */ + @javax.annotation.Nonnull + public Scope getScope() { + return scope; + } + + public void setScope(@javax.annotation.Nonnull Scope scope) { + this.scope = scope; + } + + public Token validForUserId(@javax.annotation.Nonnull String validForUserId) { + this.validForUserId = validForUserId; + return this; + } + + /** + * Username to whom the token is issued. + * + * @return validForUserId + */ + @javax.annotation.Nonnull + public String getValidForUserId() { + return validForUserId; + } + + public void setValidForUserId(@javax.annotation.Nonnull String validForUserId) { + this.validForUserId = validForUserId; + } + + public Token validForUsername(@javax.annotation.Nonnull String validForUsername) { + this.validForUsername = validForUsername; + return this; + } + + /** + * Unique identifier of the user to whom the token is issued. + * + * @return validForUsername + */ + @javax.annotation.Nonnull + public String getValidForUsername() { + return validForUsername; + } + + public void setValidForUsername(@javax.annotation.Nonnull String validForUsername) { + this.validForUsername = validForUsername; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key name of the property + * @param value value of the property + * @return the Token instance itself + */ + public Token putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return a map of objects + */ + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key name of the property + * @return an object + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + Token token = (Token) o; + return Objects.equals(this.token, token.token) + && Objects.equals(this.creationTimeInMillis, token.creationTimeInMillis) + && Objects.equals(this.expirationTimeInMillis, token.expirationTimeInMillis) + && Objects.equals(this.scope, token.scope) + && Objects.equals(this.validForUserId, token.validForUserId) + && Objects.equals(this.validForUsername, token.validForUsername) + && Objects.equals(this.additionalProperties, token.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash( + token, + creationTimeInMillis, + expirationTimeInMillis, + scope, + validForUserId, + validForUsername, + additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class Token {\n"); + sb.append(" token: ").append(toIndentedString(token)).append("\n"); + sb.append(" creationTimeInMillis: ") + .append(toIndentedString(creationTimeInMillis)) + .append("\n"); + sb.append(" expirationTimeInMillis: ") + .append(toIndentedString(expirationTimeInMillis)) + .append("\n"); + sb.append(" scope: ").append(toIndentedString(scope)).append("\n"); + sb.append(" validForUserId: ").append(toIndentedString(validForUserId)).append("\n"); + sb.append(" validForUsername: ").append(toIndentedString(validForUsername)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first + * line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("token"); + openapiFields.add("creation_time_in_millis"); + openapiFields.add("expiration_time_in_millis"); + openapiFields.add("scope"); + openapiFields.add("valid_for_user_id"); + openapiFields.add("valid_for_username"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + openapiRequiredFields.add("token"); + openapiRequiredFields.add("creation_time_in_millis"); + openapiRequiredFields.add("expiration_time_in_millis"); + openapiRequiredFields.add("scope"); + openapiRequiredFields.add("valid_for_user_id"); + openapiRequiredFields.add("valid_for_username"); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to Token + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!Token.openapiRequiredFields + .isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException( + String.format( + "The required field(s) %s in Token is not found in the empty JSON" + + " string", + Token.openapiRequiredFields.toString())); + } + } + + // check to make sure all required properties/fields are present in the JSON string + for (String requiredField : Token.openapiRequiredFields) { + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException( + String.format( + "The required field `%s` is not found in the JSON string: %s", + requiredField, jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if (!jsonObj.get("token").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `token` to be a primitive type in the JSON string" + + " but got `%s`", + jsonObj.get("token").toString())); + } + // validate the required field `scope` + Scope.validateJsonElement(jsonObj.get("scope")); + if (!jsonObj.get("valid_for_user_id").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `valid_for_user_id` to be a primitive type in the" + + " JSON string but got `%s`", + jsonObj.get("valid_for_user_id").toString())); + } + if (!jsonObj.get("valid_for_username").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `valid_for_username` to be a primitive type in the" + + " JSON string but got `%s`", + jsonObj.get("valid_for_username").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!Token.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'Token' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter = + gson.getDelegateAdapter(this, TypeToken.get(Token.class)); + + return (TypeAdapter) + new TypeAdapter() { + @Override + public void write(JsonWriter out, Token value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + obj.remove("additionalProperties"); + // serialize additional properties + if (value.getAdditionalProperties() != null) { + for (Map.Entry entry : + value.getAdditionalProperties().entrySet()) { + if (entry.getValue() instanceof String) + obj.addProperty(entry.getKey(), (String) entry.getValue()); + else if (entry.getValue() instanceof Number) + obj.addProperty(entry.getKey(), (Number) entry.getValue()); + else if (entry.getValue() instanceof Boolean) + obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); + else if (entry.getValue() instanceof Character) + obj.addProperty( + entry.getKey(), (Character) entry.getValue()); + else { + JsonElement jsonElement = gson.toJsonTree(entry.getValue()); + if (jsonElement.isJsonArray()) { + obj.add(entry.getKey(), jsonElement.getAsJsonArray()); + } else { + obj.add(entry.getKey(), jsonElement.getAsJsonObject()); + } + } + } + } + elementAdapter.write(out, obj); + } + + @Override + public Token read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // store additional fields in the deserialized instance + Token instance = thisAdapter.fromJsonTree(jsonObj); + for (Map.Entry entry : jsonObj.entrySet()) { + if (!openapiFields.contains(entry.getKey())) { + if (entry.getValue().isJsonPrimitive()) { // primitive type + if (entry.getValue().getAsJsonPrimitive().isString()) + instance.putAdditionalProperty( + entry.getKey(), entry.getValue().getAsString()); + else if (entry.getValue().getAsJsonPrimitive().isNumber()) + instance.putAdditionalProperty( + entry.getKey(), entry.getValue().getAsNumber()); + else if (entry.getValue().getAsJsonPrimitive().isBoolean()) + instance.putAdditionalProperty( + entry.getKey(), + entry.getValue().getAsBoolean()); + else + throw new IllegalArgumentException( + String.format( + "The field `%s` has unknown primitive" + + " type. Value: %s", + entry.getKey(), + entry.getValue().toString())); + } else if (entry.getValue().isJsonArray()) { + instance.putAdditionalProperty( + entry.getKey(), + gson.fromJson(entry.getValue(), List.class)); + } else { // JSON object + instance.putAdditionalProperty( + entry.getKey(), + gson.fromJson(entry.getValue(), HashMap.class)); + } + } + } + return instance; + } + }.nullSafe(); + } + } + + /** + * Create an instance of Token given an JSON string + * + * @param jsonString JSON string + * @return An instance of Token + * @throws IOException if the JSON string is invalid with respect to Token + */ + public static Token fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, Token.class); + } + + /** + * Convert an instance of Token to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} diff --git a/sdks/java/src/main/java/com/thoughtspot/client/model/TokenAccessScopeObject.java b/sdks/java/src/main/java/com/thoughtspot/client/model/TokenAccessScopeObject.java new file mode 100644 index 000000000..e8cfa2eb6 --- /dev/null +++ b/sdks/java/src/main/java/com/thoughtspot/client/model/TokenAccessScopeObject.java @@ -0,0 +1,416 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client.model; + +import com.google.gson.Gson; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.TypeAdapter; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.reflect.TypeToken; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import com.thoughtspot.client.JSON; +import java.io.IOException; +import java.io.Serializable; +import java.util.Arrays; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Objects; +import org.openapitools.jackson.nullable.JsonNullable; + +/** Objects on which the filter rules and parameters values should be applied to */ +@javax.annotation.Generated( + value = "org.openapitools.codegen.languages.JavaClientCodegen", + comments = "Generator version: 7.12.0") +public class TokenAccessScopeObject implements Serializable { + private static final long serialVersionUID = 1L; + + /** + * Type of object. Required if the name of the object is set as the identifier. This attribute + * is optional when the object GUID is specified as the identifier. Specify the object type as + * `LOGICAL_TABLE`. + */ + @JsonAdapter(TypeEnum.Adapter.class) + public enum TypeEnum { + LOGICAL_TABLE("LOGICAL_TABLE"); + + private String value; + + TypeEnum(String value) { + this.value = value; + } + + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + public static TypeEnum fromValue(String value) { + for (TypeEnum b : TypeEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + return null; + } + + public static class Adapter extends TypeAdapter { + @Override + public void write(final JsonWriter jsonWriter, final TypeEnum enumeration) + throws IOException { + jsonWriter.value(enumeration.getValue()); + } + + @Override + public TypeEnum read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + return TypeEnum.fromValue(value); + } + } + + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + String value = jsonElement.getAsString(); + TypeEnum.fromValue(value); + } + } + + public static final String SERIALIZED_NAME_TYPE = "type"; + + @SerializedName(SERIALIZED_NAME_TYPE) + @javax.annotation.Nullable + private TypeEnum type; + + public static final String SERIALIZED_NAME_IDENTIFIER = "identifier"; + + @SerializedName(SERIALIZED_NAME_IDENTIFIER) + @javax.annotation.Nonnull + private String identifier; + + public TokenAccessScopeObject() {} + + public TokenAccessScopeObject type(@javax.annotation.Nullable TypeEnum type) { + this.type = type; + return this; + } + + /** + * Type of object. Required if the name of the object is set as the identifier. This attribute + * is optional when the object GUID is specified as the identifier. Specify the object type as + * `LOGICAL_TABLE`. + * + * @return type + */ + @javax.annotation.Nullable + public TypeEnum getType() { + return type; + } + + public void setType(@javax.annotation.Nullable TypeEnum type) { + this.type = type; + } + + public TokenAccessScopeObject identifier(@javax.annotation.Nonnull String identifier) { + this.identifier = identifier; + return this; + } + + /** + * Unique name/id of the object. + * + * @return identifier + */ + @javax.annotation.Nonnull + public String getIdentifier() { + return identifier; + } + + public void setIdentifier(@javax.annotation.Nonnull String identifier) { + this.identifier = identifier; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key name of the property + * @param value value of the property + * @return the TokenAccessScopeObject instance itself + */ + public TokenAccessScopeObject putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return a map of objects + */ + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key name of the property + * @return an object + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + TokenAccessScopeObject tokenAccessScopeObject = (TokenAccessScopeObject) o; + return Objects.equals(this.type, tokenAccessScopeObject.type) + && Objects.equals(this.identifier, tokenAccessScopeObject.identifier) + && Objects.equals( + this.additionalProperties, tokenAccessScopeObject.additionalProperties); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b + || (a != null + && b != null + && a.isPresent() + && b.isPresent() + && Objects.deepEquals(a.get(), b.get())); + } + + @Override + public int hashCode() { + return Objects.hash(type, identifier, additionalProperties); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; + } + return a.isPresent() ? Arrays.deepHashCode(new Object[] {a.get()}) : 31; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class TokenAccessScopeObject {\n"); + sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append(" identifier: ").append(toIndentedString(identifier)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first + * line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("type"); + openapiFields.add("identifier"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + openapiRequiredFields.add("identifier"); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to TokenAccessScopeObject + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!TokenAccessScopeObject.openapiRequiredFields + .isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException( + String.format( + "The required field(s) %s in TokenAccessScopeObject is not found" + + " in the empty JSON string", + TokenAccessScopeObject.openapiRequiredFields.toString())); + } + } + + // check to make sure all required properties/fields are present in the JSON string + for (String requiredField : TokenAccessScopeObject.openapiRequiredFields) { + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException( + String.format( + "The required field `%s` is not found in the JSON string: %s", + requiredField, jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if ((jsonObj.get("type") != null && !jsonObj.get("type").isJsonNull()) + && !jsonObj.get("type").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `type` to be a primitive type in the JSON string" + + " but got `%s`", + jsonObj.get("type").toString())); + } + // validate the optional field `type` + if (jsonObj.get("type") != null && !jsonObj.get("type").isJsonNull()) { + TypeEnum.validateJsonElement(jsonObj.get("type")); + } + if (!jsonObj.get("identifier").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `identifier` to be a primitive type in the JSON" + + " string but got `%s`", + jsonObj.get("identifier").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!TokenAccessScopeObject.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'TokenAccessScopeObject' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter = + gson.getDelegateAdapter(this, TypeToken.get(TokenAccessScopeObject.class)); + + return (TypeAdapter) + new TypeAdapter() { + @Override + public void write(JsonWriter out, TokenAccessScopeObject value) + throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + obj.remove("additionalProperties"); + // serialize additional properties + if (value.getAdditionalProperties() != null) { + for (Map.Entry entry : + value.getAdditionalProperties().entrySet()) { + if (entry.getValue() instanceof String) + obj.addProperty(entry.getKey(), (String) entry.getValue()); + else if (entry.getValue() instanceof Number) + obj.addProperty(entry.getKey(), (Number) entry.getValue()); + else if (entry.getValue() instanceof Boolean) + obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); + else if (entry.getValue() instanceof Character) + obj.addProperty( + entry.getKey(), (Character) entry.getValue()); + else { + JsonElement jsonElement = gson.toJsonTree(entry.getValue()); + if (jsonElement.isJsonArray()) { + obj.add(entry.getKey(), jsonElement.getAsJsonArray()); + } else { + obj.add(entry.getKey(), jsonElement.getAsJsonObject()); + } + } + } + } + elementAdapter.write(out, obj); + } + + @Override + public TokenAccessScopeObject read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // store additional fields in the deserialized instance + TokenAccessScopeObject instance = thisAdapter.fromJsonTree(jsonObj); + for (Map.Entry entry : jsonObj.entrySet()) { + if (!openapiFields.contains(entry.getKey())) { + if (entry.getValue().isJsonPrimitive()) { // primitive type + if (entry.getValue().getAsJsonPrimitive().isString()) + instance.putAdditionalProperty( + entry.getKey(), entry.getValue().getAsString()); + else if (entry.getValue().getAsJsonPrimitive().isNumber()) + instance.putAdditionalProperty( + entry.getKey(), entry.getValue().getAsNumber()); + else if (entry.getValue().getAsJsonPrimitive().isBoolean()) + instance.putAdditionalProperty( + entry.getKey(), + entry.getValue().getAsBoolean()); + else + throw new IllegalArgumentException( + String.format( + "The field `%s` has unknown primitive" + + " type. Value: %s", + entry.getKey(), + entry.getValue().toString())); + } else if (entry.getValue().isJsonArray()) { + instance.putAdditionalProperty( + entry.getKey(), + gson.fromJson(entry.getValue(), List.class)); + } else { // JSON object + instance.putAdditionalProperty( + entry.getKey(), + gson.fromJson(entry.getValue(), HashMap.class)); + } + } + } + return instance; + } + }.nullSafe(); + } + } + + /** + * Create an instance of TokenAccessScopeObject given an JSON string + * + * @param jsonString JSON string + * @return An instance of TokenAccessScopeObject + * @throws IOException if the JSON string is invalid with respect to TokenAccessScopeObject + */ + public static TokenAccessScopeObject fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, TokenAccessScopeObject.class); + } + + /** + * Convert an instance of TokenAccessScopeObject to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} diff --git a/sdks/java/src/main/java/com/thoughtspot/client/model/TokenValidationResponse.java b/sdks/java/src/main/java/com/thoughtspot/client/model/TokenValidationResponse.java new file mode 100644 index 000000000..dc5647558 --- /dev/null +++ b/sdks/java/src/main/java/com/thoughtspot/client/model/TokenValidationResponse.java @@ -0,0 +1,443 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client.model; + +import com.google.gson.Gson; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.TypeAdapter; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.annotations.SerializedName; +import com.google.gson.reflect.TypeToken; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import com.thoughtspot.client.JSON; +import java.io.IOException; +import java.io.Serializable; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Objects; + +/** TokenValidationResponse */ +@javax.annotation.Generated( + value = "org.openapitools.codegen.languages.JavaClientCodegen", + comments = "Generator version: 7.12.0") +public class TokenValidationResponse implements Serializable { + private static final long serialVersionUID = 1L; + + public static final String SERIALIZED_NAME_CREATION_TIME_IN_MILLIS = "creation_time_in_millis"; + + @SerializedName(SERIALIZED_NAME_CREATION_TIME_IN_MILLIS) + @javax.annotation.Nonnull + private Float creationTimeInMillis; + + public static final String SERIALIZED_NAME_EXPIRATION_TIME_IN_MILLIS = + "expiration_time_in_millis"; + + @SerializedName(SERIALIZED_NAME_EXPIRATION_TIME_IN_MILLIS) + @javax.annotation.Nonnull + private Float expirationTimeInMillis; + + public static final String SERIALIZED_NAME_SCOPE = "scope"; + + @SerializedName(SERIALIZED_NAME_SCOPE) + @javax.annotation.Nonnull + private Scope scope; + + public static final String SERIALIZED_NAME_VALID_FOR_USER_ID = "valid_for_user_id"; + + @SerializedName(SERIALIZED_NAME_VALID_FOR_USER_ID) + @javax.annotation.Nonnull + private String validForUserId; + + public static final String SERIALIZED_NAME_TOKEN_TYPE = "token_type"; + + @SerializedName(SERIALIZED_NAME_TOKEN_TYPE) + @javax.annotation.Nonnull + private String tokenType; + + public TokenValidationResponse() {} + + public TokenValidationResponse creationTimeInMillis( + @javax.annotation.Nonnull Float creationTimeInMillis) { + this.creationTimeInMillis = creationTimeInMillis; + return this; + } + + /** + * Token creation time in milliseconds. + * + * @return creationTimeInMillis + */ + @javax.annotation.Nonnull + public Float getCreationTimeInMillis() { + return creationTimeInMillis; + } + + public void setCreationTimeInMillis(@javax.annotation.Nonnull Float creationTimeInMillis) { + this.creationTimeInMillis = creationTimeInMillis; + } + + public TokenValidationResponse expirationTimeInMillis( + @javax.annotation.Nonnull Float expirationTimeInMillis) { + this.expirationTimeInMillis = expirationTimeInMillis; + return this; + } + + /** + * Token expiration time in milliseconds. + * + * @return expirationTimeInMillis + */ + @javax.annotation.Nonnull + public Float getExpirationTimeInMillis() { + return expirationTimeInMillis; + } + + public void setExpirationTimeInMillis(@javax.annotation.Nonnull Float expirationTimeInMillis) { + this.expirationTimeInMillis = expirationTimeInMillis; + } + + public TokenValidationResponse scope(@javax.annotation.Nonnull Scope scope) { + this.scope = scope; + return this; + } + + /** + * Get scope + * + * @return scope + */ + @javax.annotation.Nonnull + public Scope getScope() { + return scope; + } + + public void setScope(@javax.annotation.Nonnull Scope scope) { + this.scope = scope; + } + + public TokenValidationResponse validForUserId(@javax.annotation.Nonnull String validForUserId) { + this.validForUserId = validForUserId; + return this; + } + + /** + * Username to whom the token is issued. + * + * @return validForUserId + */ + @javax.annotation.Nonnull + public String getValidForUserId() { + return validForUserId; + } + + public void setValidForUserId(@javax.annotation.Nonnull String validForUserId) { + this.validForUserId = validForUserId; + } + + public TokenValidationResponse tokenType(@javax.annotation.Nonnull String tokenType) { + this.tokenType = tokenType; + return this; + } + + /** + * Type of token. + * + * @return tokenType + */ + @javax.annotation.Nonnull + public String getTokenType() { + return tokenType; + } + + public void setTokenType(@javax.annotation.Nonnull String tokenType) { + this.tokenType = tokenType; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key name of the property + * @param value value of the property + * @return the TokenValidationResponse instance itself + */ + public TokenValidationResponse putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return a map of objects + */ + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key name of the property + * @return an object + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + TokenValidationResponse tokenValidationResponse = (TokenValidationResponse) o; + return Objects.equals( + this.creationTimeInMillis, tokenValidationResponse.creationTimeInMillis) + && Objects.equals( + this.expirationTimeInMillis, tokenValidationResponse.expirationTimeInMillis) + && Objects.equals(this.scope, tokenValidationResponse.scope) + && Objects.equals(this.validForUserId, tokenValidationResponse.validForUserId) + && Objects.equals(this.tokenType, tokenValidationResponse.tokenType) + && Objects.equals( + this.additionalProperties, tokenValidationResponse.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash( + creationTimeInMillis, + expirationTimeInMillis, + scope, + validForUserId, + tokenType, + additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class TokenValidationResponse {\n"); + sb.append(" creationTimeInMillis: ") + .append(toIndentedString(creationTimeInMillis)) + .append("\n"); + sb.append(" expirationTimeInMillis: ") + .append(toIndentedString(expirationTimeInMillis)) + .append("\n"); + sb.append(" scope: ").append(toIndentedString(scope)).append("\n"); + sb.append(" validForUserId: ").append(toIndentedString(validForUserId)).append("\n"); + sb.append(" tokenType: ").append(toIndentedString(tokenType)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first + * line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("creation_time_in_millis"); + openapiFields.add("expiration_time_in_millis"); + openapiFields.add("scope"); + openapiFields.add("valid_for_user_id"); + openapiFields.add("token_type"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + openapiRequiredFields.add("creation_time_in_millis"); + openapiRequiredFields.add("expiration_time_in_millis"); + openapiRequiredFields.add("scope"); + openapiRequiredFields.add("valid_for_user_id"); + openapiRequiredFields.add("token_type"); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to TokenValidationResponse + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!TokenValidationResponse.openapiRequiredFields + .isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException( + String.format( + "The required field(s) %s in TokenValidationResponse is not found" + + " in the empty JSON string", + TokenValidationResponse.openapiRequiredFields.toString())); + } + } + + // check to make sure all required properties/fields are present in the JSON string + for (String requiredField : TokenValidationResponse.openapiRequiredFields) { + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException( + String.format( + "The required field `%s` is not found in the JSON string: %s", + requiredField, jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // validate the required field `scope` + Scope.validateJsonElement(jsonObj.get("scope")); + if (!jsonObj.get("valid_for_user_id").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `valid_for_user_id` to be a primitive type in the" + + " JSON string but got `%s`", + jsonObj.get("valid_for_user_id").toString())); + } + if (!jsonObj.get("token_type").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `token_type` to be a primitive type in the JSON" + + " string but got `%s`", + jsonObj.get("token_type").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!TokenValidationResponse.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'TokenValidationResponse' and its + // subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter = + gson.getDelegateAdapter(this, TypeToken.get(TokenValidationResponse.class)); + + return (TypeAdapter) + new TypeAdapter() { + @Override + public void write(JsonWriter out, TokenValidationResponse value) + throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + obj.remove("additionalProperties"); + // serialize additional properties + if (value.getAdditionalProperties() != null) { + for (Map.Entry entry : + value.getAdditionalProperties().entrySet()) { + if (entry.getValue() instanceof String) + obj.addProperty(entry.getKey(), (String) entry.getValue()); + else if (entry.getValue() instanceof Number) + obj.addProperty(entry.getKey(), (Number) entry.getValue()); + else if (entry.getValue() instanceof Boolean) + obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); + else if (entry.getValue() instanceof Character) + obj.addProperty( + entry.getKey(), (Character) entry.getValue()); + else { + JsonElement jsonElement = gson.toJsonTree(entry.getValue()); + if (jsonElement.isJsonArray()) { + obj.add(entry.getKey(), jsonElement.getAsJsonArray()); + } else { + obj.add(entry.getKey(), jsonElement.getAsJsonObject()); + } + } + } + } + elementAdapter.write(out, obj); + } + + @Override + public TokenValidationResponse read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // store additional fields in the deserialized instance + TokenValidationResponse instance = thisAdapter.fromJsonTree(jsonObj); + for (Map.Entry entry : jsonObj.entrySet()) { + if (!openapiFields.contains(entry.getKey())) { + if (entry.getValue().isJsonPrimitive()) { // primitive type + if (entry.getValue().getAsJsonPrimitive().isString()) + instance.putAdditionalProperty( + entry.getKey(), entry.getValue().getAsString()); + else if (entry.getValue().getAsJsonPrimitive().isNumber()) + instance.putAdditionalProperty( + entry.getKey(), entry.getValue().getAsNumber()); + else if (entry.getValue().getAsJsonPrimitive().isBoolean()) + instance.putAdditionalProperty( + entry.getKey(), + entry.getValue().getAsBoolean()); + else + throw new IllegalArgumentException( + String.format( + "The field `%s` has unknown primitive" + + " type. Value: %s", + entry.getKey(), + entry.getValue().toString())); + } else if (entry.getValue().isJsonArray()) { + instance.putAdditionalProperty( + entry.getKey(), + gson.fromJson(entry.getValue(), List.class)); + } else { // JSON object + instance.putAdditionalProperty( + entry.getKey(), + gson.fromJson(entry.getValue(), HashMap.class)); + } + } + } + return instance; + } + }.nullSafe(); + } + } + + /** + * Create an instance of TokenValidationResponse given an JSON string + * + * @param jsonString JSON string + * @return An instance of TokenValidationResponse + * @throws IOException if the JSON string is invalid with respect to TokenValidationResponse + */ + public static TokenValidationResponse fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, TokenValidationResponse.class); + } + + /** + * Convert an instance of TokenValidationResponse to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} diff --git a/sdks/java/src/main/java/com/thoughtspot/client/model/URL.java b/sdks/java/src/main/java/com/thoughtspot/client/model/URL.java new file mode 100644 index 000000000..1512d9093 --- /dev/null +++ b/sdks/java/src/main/java/com/thoughtspot/client/model/URL.java @@ -0,0 +1,443 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client.model; + +import com.google.gson.Gson; +import com.google.gson.JsonArray; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.TypeAdapter; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.annotations.SerializedName; +import com.google.gson.reflect.TypeToken; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import com.thoughtspot.client.JSON; +import java.io.IOException; +import java.io.Serializable; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Objects; +import org.openapitools.jackson.nullable.JsonNullable; + +/** URL Custom Action Type */ +@javax.annotation.Generated( + value = "org.openapitools.codegen.languages.JavaClientCodegen", + comments = "Generator version: 7.12.0") +public class URL implements Serializable { + private static final long serialVersionUID = 1L; + + public static final String SERIALIZED_NAME_AUTHENTICATION = "authentication"; + + @SerializedName(SERIALIZED_NAME_AUTHENTICATION) + @javax.annotation.Nullable + private Authentication authentication; + + public static final String SERIALIZED_NAME_PARAMETERS = "parameters"; + + @SerializedName(SERIALIZED_NAME_PARAMETERS) + @javax.annotation.Nullable + private List parameters; + + public static final String SERIALIZED_NAME_URL = "url"; + + @SerializedName(SERIALIZED_NAME_URL) + @javax.annotation.Nonnull + private String url; + + public static final String SERIALIZED_NAME_REFERENCE = "reference"; + + @SerializedName(SERIALIZED_NAME_REFERENCE) + @javax.annotation.Nullable + private String reference; + + public URL() {} + + public URL authentication(@javax.annotation.Nullable Authentication authentication) { + this.authentication = authentication; + return this; + } + + /** + * Get authentication + * + * @return authentication + */ + @javax.annotation.Nullable + public Authentication getAuthentication() { + return authentication; + } + + public void setAuthentication(@javax.annotation.Nullable Authentication authentication) { + this.authentication = authentication; + } + + public URL parameters(@javax.annotation.Nullable List parameters) { + this.parameters = parameters; + return this; + } + + public URL addParametersItem(ParametersListItem parametersItem) { + if (this.parameters == null) { + this.parameters = new ArrayList<>(); + } + this.parameters.add(parametersItem); + return this; + } + + /** + * Query parameters for url. + * + * @return parameters + */ + @javax.annotation.Nullable + public List getParameters() { + return parameters; + } + + public void setParameters(@javax.annotation.Nullable List parameters) { + this.parameters = parameters; + } + + public URL url(@javax.annotation.Nonnull String url) { + this.url = url; + return this; + } + + /** + * Request Url for the Custom action. + * + * @return url + */ + @javax.annotation.Nonnull + public String getUrl() { + return url; + } + + public void setUrl(@javax.annotation.Nonnull String url) { + this.url = url; + } + + public URL reference(@javax.annotation.Nullable String reference) { + this.reference = reference; + return this; + } + + /** + * Reference name of the SDK. By default, the value will be set to action name. + * + * @return reference + */ + @javax.annotation.Nullable + public String getReference() { + return reference; + } + + public void setReference(@javax.annotation.Nullable String reference) { + this.reference = reference; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key name of the property + * @param value value of the property + * @return the URL instance itself + */ + public URL putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return a map of objects + */ + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key name of the property + * @return an object + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + URL URL = (URL) o; + return Objects.equals(this.authentication, URL.authentication) + && Objects.equals(this.parameters, URL.parameters) + && Objects.equals(this.url, URL.url) + && Objects.equals(this.reference, URL.reference) + && Objects.equals(this.additionalProperties, URL.additionalProperties); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b + || (a != null + && b != null + && a.isPresent() + && b.isPresent() + && Objects.deepEquals(a.get(), b.get())); + } + + @Override + public int hashCode() { + return Objects.hash(authentication, parameters, url, reference, additionalProperties); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; + } + return a.isPresent() ? Arrays.deepHashCode(new Object[] {a.get()}) : 31; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class URL {\n"); + sb.append(" authentication: ").append(toIndentedString(authentication)).append("\n"); + sb.append(" parameters: ").append(toIndentedString(parameters)).append("\n"); + sb.append(" url: ").append(toIndentedString(url)).append("\n"); + sb.append(" reference: ").append(toIndentedString(reference)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first + * line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("authentication"); + openapiFields.add("parameters"); + openapiFields.add("url"); + openapiFields.add("reference"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + openapiRequiredFields.add("url"); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to URL + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!URL.openapiRequiredFields + .isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException( + String.format( + "The required field(s) %s in URL is not found in the empty JSON" + + " string", + URL.openapiRequiredFields.toString())); + } + } + + // check to make sure all required properties/fields are present in the JSON string + for (String requiredField : URL.openapiRequiredFields) { + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException( + String.format( + "The required field `%s` is not found in the JSON string: %s", + requiredField, jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // validate the optional field `authentication` + if (jsonObj.get("authentication") != null && !jsonObj.get("authentication").isJsonNull()) { + Authentication.validateJsonElement(jsonObj.get("authentication")); + } + if (jsonObj.get("parameters") != null && !jsonObj.get("parameters").isJsonNull()) { + JsonArray jsonArrayparameters = jsonObj.getAsJsonArray("parameters"); + if (jsonArrayparameters != null) { + // ensure the json data is an array + if (!jsonObj.get("parameters").isJsonArray()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `parameters` to be an array in the JSON" + + " string but got `%s`", + jsonObj.get("parameters").toString())); + } + + // validate the optional field `parameters` (array) + for (int i = 0; i < jsonArrayparameters.size(); i++) { + ParametersListItem.validateJsonElement(jsonArrayparameters.get(i)); + } + ; + } + } + if (!jsonObj.get("url").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `url` to be a primitive type in the JSON string" + + " but got `%s`", + jsonObj.get("url").toString())); + } + if ((jsonObj.get("reference") != null && !jsonObj.get("reference").isJsonNull()) + && !jsonObj.get("reference").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `reference` to be a primitive type in the JSON" + + " string but got `%s`", + jsonObj.get("reference").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!URL.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'URL' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter = + gson.getDelegateAdapter(this, TypeToken.get(URL.class)); + + return (TypeAdapter) + new TypeAdapter() { + @Override + public void write(JsonWriter out, URL value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + obj.remove("additionalProperties"); + // serialize additional properties + if (value.getAdditionalProperties() != null) { + for (Map.Entry entry : + value.getAdditionalProperties().entrySet()) { + if (entry.getValue() instanceof String) + obj.addProperty(entry.getKey(), (String) entry.getValue()); + else if (entry.getValue() instanceof Number) + obj.addProperty(entry.getKey(), (Number) entry.getValue()); + else if (entry.getValue() instanceof Boolean) + obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); + else if (entry.getValue() instanceof Character) + obj.addProperty( + entry.getKey(), (Character) entry.getValue()); + else { + JsonElement jsonElement = gson.toJsonTree(entry.getValue()); + if (jsonElement.isJsonArray()) { + obj.add(entry.getKey(), jsonElement.getAsJsonArray()); + } else { + obj.add(entry.getKey(), jsonElement.getAsJsonObject()); + } + } + } + } + elementAdapter.write(out, obj); + } + + @Override + public URL read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // store additional fields in the deserialized instance + URL instance = thisAdapter.fromJsonTree(jsonObj); + for (Map.Entry entry : jsonObj.entrySet()) { + if (!openapiFields.contains(entry.getKey())) { + if (entry.getValue().isJsonPrimitive()) { // primitive type + if (entry.getValue().getAsJsonPrimitive().isString()) + instance.putAdditionalProperty( + entry.getKey(), entry.getValue().getAsString()); + else if (entry.getValue().getAsJsonPrimitive().isNumber()) + instance.putAdditionalProperty( + entry.getKey(), entry.getValue().getAsNumber()); + else if (entry.getValue().getAsJsonPrimitive().isBoolean()) + instance.putAdditionalProperty( + entry.getKey(), + entry.getValue().getAsBoolean()); + else + throw new IllegalArgumentException( + String.format( + "The field `%s` has unknown primitive" + + " type. Value: %s", + entry.getKey(), + entry.getValue().toString())); + } else if (entry.getValue().isJsonArray()) { + instance.putAdditionalProperty( + entry.getKey(), + gson.fromJson(entry.getValue(), List.class)); + } else { // JSON object + instance.putAdditionalProperty( + entry.getKey(), + gson.fromJson(entry.getValue(), HashMap.class)); + } + } + } + return instance; + } + }.nullSafe(); + } + } + + /** + * Create an instance of URL given an JSON string + * + * @param jsonString JSON string + * @return An instance of URL + * @throws IOException if the JSON string is invalid with respect to URL + */ + public static URL fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, URL.class); + } + + /** + * Convert an instance of URL to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} diff --git a/sdks/java/src/main/java/com/thoughtspot/client/model/URLInput.java b/sdks/java/src/main/java/com/thoughtspot/client/model/URLInput.java new file mode 100644 index 000000000..a71f5fb42 --- /dev/null +++ b/sdks/java/src/main/java/com/thoughtspot/client/model/URLInput.java @@ -0,0 +1,434 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client.model; + +import com.google.gson.Gson; +import com.google.gson.JsonArray; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.TypeAdapter; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.annotations.SerializedName; +import com.google.gson.reflect.TypeToken; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import com.thoughtspot.client.JSON; +import java.io.IOException; +import java.io.Serializable; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Objects; +import org.openapitools.jackson.nullable.JsonNullable; + +/** URL Custom Action Type */ +@javax.annotation.Generated( + value = "org.openapitools.codegen.languages.JavaClientCodegen", + comments = "Generator version: 7.12.0") +public class URLInput implements Serializable { + private static final long serialVersionUID = 1L; + + public static final String SERIALIZED_NAME_AUTHENTICATION = "authentication"; + + @SerializedName(SERIALIZED_NAME_AUTHENTICATION) + @javax.annotation.Nullable + private AuthenticationInput authentication; + + public static final String SERIALIZED_NAME_PARAMETERS = "parameters"; + + @SerializedName(SERIALIZED_NAME_PARAMETERS) + @javax.annotation.Nullable + private List parameters; + + public static final String SERIALIZED_NAME_URL = "url"; + + @SerializedName(SERIALIZED_NAME_URL) + @javax.annotation.Nullable + private String url; + + public static final String SERIALIZED_NAME_REFERENCE = "reference"; + + @SerializedName(SERIALIZED_NAME_REFERENCE) + @javax.annotation.Nullable + private String reference; + + public URLInput() {} + + public URLInput authentication(@javax.annotation.Nullable AuthenticationInput authentication) { + this.authentication = authentication; + return this; + } + + /** + * Get authentication + * + * @return authentication + */ + @javax.annotation.Nullable + public AuthenticationInput getAuthentication() { + return authentication; + } + + public void setAuthentication(@javax.annotation.Nullable AuthenticationInput authentication) { + this.authentication = authentication; + } + + public URLInput parameters( + @javax.annotation.Nullable List parameters) { + this.parameters = parameters; + return this; + } + + public URLInput addParametersItem(ParametersListItemInput parametersItem) { + if (this.parameters == null) { + this.parameters = new ArrayList<>(); + } + this.parameters.add(parametersItem); + return this; + } + + /** + * Query parameters for url. + * + * @return parameters + */ + @javax.annotation.Nullable + public List getParameters() { + return parameters; + } + + public void setParameters(@javax.annotation.Nullable List parameters) { + this.parameters = parameters; + } + + public URLInput url(@javax.annotation.Nullable String url) { + this.url = url; + return this; + } + + /** + * Request Url for the Custom action. + * + * @return url + */ + @javax.annotation.Nullable + public String getUrl() { + return url; + } + + public void setUrl(@javax.annotation.Nullable String url) { + this.url = url; + } + + public URLInput reference(@javax.annotation.Nullable String reference) { + this.reference = reference; + return this; + } + + /** + * Reference name. By default the value will be set to action name + * + * @return reference + */ + @javax.annotation.Nullable + public String getReference() { + return reference; + } + + public void setReference(@javax.annotation.Nullable String reference) { + this.reference = reference; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key name of the property + * @param value value of the property + * @return the URLInput instance itself + */ + public URLInput putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return a map of objects + */ + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key name of the property + * @return an object + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + URLInput urLInput = (URLInput) o; + return Objects.equals(this.authentication, urLInput.authentication) + && Objects.equals(this.parameters, urLInput.parameters) + && Objects.equals(this.url, urLInput.url) + && Objects.equals(this.reference, urLInput.reference) + && Objects.equals(this.additionalProperties, urLInput.additionalProperties); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b + || (a != null + && b != null + && a.isPresent() + && b.isPresent() + && Objects.deepEquals(a.get(), b.get())); + } + + @Override + public int hashCode() { + return Objects.hash(authentication, parameters, url, reference, additionalProperties); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; + } + return a.isPresent() ? Arrays.deepHashCode(new Object[] {a.get()}) : 31; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class URLInput {\n"); + sb.append(" authentication: ").append(toIndentedString(authentication)).append("\n"); + sb.append(" parameters: ").append(toIndentedString(parameters)).append("\n"); + sb.append(" url: ").append(toIndentedString(url)).append("\n"); + sb.append(" reference: ").append(toIndentedString(reference)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first + * line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("authentication"); + openapiFields.add("parameters"); + openapiFields.add("url"); + openapiFields.add("reference"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to URLInput + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!URLInput.openapiRequiredFields + .isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException( + String.format( + "The required field(s) %s in URLInput is not found in the empty" + + " JSON string", + URLInput.openapiRequiredFields.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // validate the optional field `authentication` + if (jsonObj.get("authentication") != null && !jsonObj.get("authentication").isJsonNull()) { + AuthenticationInput.validateJsonElement(jsonObj.get("authentication")); + } + if (jsonObj.get("parameters") != null && !jsonObj.get("parameters").isJsonNull()) { + JsonArray jsonArrayparameters = jsonObj.getAsJsonArray("parameters"); + if (jsonArrayparameters != null) { + // ensure the json data is an array + if (!jsonObj.get("parameters").isJsonArray()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `parameters` to be an array in the JSON" + + " string but got `%s`", + jsonObj.get("parameters").toString())); + } + + // validate the optional field `parameters` (array) + for (int i = 0; i < jsonArrayparameters.size(); i++) { + ParametersListItemInput.validateJsonElement(jsonArrayparameters.get(i)); + } + ; + } + } + if ((jsonObj.get("url") != null && !jsonObj.get("url").isJsonNull()) + && !jsonObj.get("url").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `url` to be a primitive type in the JSON string" + + " but got `%s`", + jsonObj.get("url").toString())); + } + if ((jsonObj.get("reference") != null && !jsonObj.get("reference").isJsonNull()) + && !jsonObj.get("reference").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `reference` to be a primitive type in the JSON" + + " string but got `%s`", + jsonObj.get("reference").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!URLInput.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'URLInput' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter = + gson.getDelegateAdapter(this, TypeToken.get(URLInput.class)); + + return (TypeAdapter) + new TypeAdapter() { + @Override + public void write(JsonWriter out, URLInput value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + obj.remove("additionalProperties"); + // serialize additional properties + if (value.getAdditionalProperties() != null) { + for (Map.Entry entry : + value.getAdditionalProperties().entrySet()) { + if (entry.getValue() instanceof String) + obj.addProperty(entry.getKey(), (String) entry.getValue()); + else if (entry.getValue() instanceof Number) + obj.addProperty(entry.getKey(), (Number) entry.getValue()); + else if (entry.getValue() instanceof Boolean) + obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); + else if (entry.getValue() instanceof Character) + obj.addProperty( + entry.getKey(), (Character) entry.getValue()); + else { + JsonElement jsonElement = gson.toJsonTree(entry.getValue()); + if (jsonElement.isJsonArray()) { + obj.add(entry.getKey(), jsonElement.getAsJsonArray()); + } else { + obj.add(entry.getKey(), jsonElement.getAsJsonObject()); + } + } + } + } + elementAdapter.write(out, obj); + } + + @Override + public URLInput read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // store additional fields in the deserialized instance + URLInput instance = thisAdapter.fromJsonTree(jsonObj); + for (Map.Entry entry : jsonObj.entrySet()) { + if (!openapiFields.contains(entry.getKey())) { + if (entry.getValue().isJsonPrimitive()) { // primitive type + if (entry.getValue().getAsJsonPrimitive().isString()) + instance.putAdditionalProperty( + entry.getKey(), entry.getValue().getAsString()); + else if (entry.getValue().getAsJsonPrimitive().isNumber()) + instance.putAdditionalProperty( + entry.getKey(), entry.getValue().getAsNumber()); + else if (entry.getValue().getAsJsonPrimitive().isBoolean()) + instance.putAdditionalProperty( + entry.getKey(), + entry.getValue().getAsBoolean()); + else + throw new IllegalArgumentException( + String.format( + "The field `%s` has unknown primitive" + + " type. Value: %s", + entry.getKey(), + entry.getValue().toString())); + } else if (entry.getValue().isJsonArray()) { + instance.putAdditionalProperty( + entry.getKey(), + gson.fromJson(entry.getValue(), List.class)); + } else { // JSON object + instance.putAdditionalProperty( + entry.getKey(), + gson.fromJson(entry.getValue(), HashMap.class)); + } + } + } + return instance; + } + }.nullSafe(); + } + } + + /** + * Create an instance of URLInput given an JSON string + * + * @param jsonString JSON string + * @return An instance of URLInput + * @throws IOException if the JSON string is invalid with respect to URLInput + */ + public static URLInput fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, URLInput.class); + } + + /** + * Convert an instance of URLInput to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} diff --git a/sdks/java/src/main/java/com/thoughtspot/client/model/URLInputMandatory.java b/sdks/java/src/main/java/com/thoughtspot/client/model/URLInputMandatory.java new file mode 100644 index 000000000..eb91da763 --- /dev/null +++ b/sdks/java/src/main/java/com/thoughtspot/client/model/URLInputMandatory.java @@ -0,0 +1,447 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client.model; + +import com.google.gson.Gson; +import com.google.gson.JsonArray; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.TypeAdapter; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.annotations.SerializedName; +import com.google.gson.reflect.TypeToken; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import com.thoughtspot.client.JSON; +import java.io.IOException; +import java.io.Serializable; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Objects; +import org.openapitools.jackson.nullable.JsonNullable; + +/** URL Custom Action Type */ +@javax.annotation.Generated( + value = "org.openapitools.codegen.languages.JavaClientCodegen", + comments = "Generator version: 7.12.0") +public class URLInputMandatory implements Serializable { + private static final long serialVersionUID = 1L; + + public static final String SERIALIZED_NAME_AUTHENTICATION = "authentication"; + + @SerializedName(SERIALIZED_NAME_AUTHENTICATION) + @javax.annotation.Nullable + private AuthenticationInput authentication; + + public static final String SERIALIZED_NAME_PARAMETERS = "parameters"; + + @SerializedName(SERIALIZED_NAME_PARAMETERS) + @javax.annotation.Nullable + private List parameters; + + public static final String SERIALIZED_NAME_URL = "url"; + + @SerializedName(SERIALIZED_NAME_URL) + @javax.annotation.Nonnull + private String url; + + public static final String SERIALIZED_NAME_REFERENCE = "reference"; + + @SerializedName(SERIALIZED_NAME_REFERENCE) + @javax.annotation.Nullable + private String reference; + + public URLInputMandatory() {} + + public URLInputMandatory authentication( + @javax.annotation.Nullable AuthenticationInput authentication) { + this.authentication = authentication; + return this; + } + + /** + * Get authentication + * + * @return authentication + */ + @javax.annotation.Nullable + public AuthenticationInput getAuthentication() { + return authentication; + } + + public void setAuthentication(@javax.annotation.Nullable AuthenticationInput authentication) { + this.authentication = authentication; + } + + public URLInputMandatory parameters( + @javax.annotation.Nullable List parameters) { + this.parameters = parameters; + return this; + } + + public URLInputMandatory addParametersItem(ParametersListItemInput parametersItem) { + if (this.parameters == null) { + this.parameters = new ArrayList<>(); + } + this.parameters.add(parametersItem); + return this; + } + + /** + * Query parameters for url. + * + * @return parameters + */ + @javax.annotation.Nullable + public List getParameters() { + return parameters; + } + + public void setParameters(@javax.annotation.Nullable List parameters) { + this.parameters = parameters; + } + + public URLInputMandatory url(@javax.annotation.Nonnull String url) { + this.url = url; + return this; + } + + /** + * Request Url for the Custom action. + * + * @return url + */ + @javax.annotation.Nonnull + public String getUrl() { + return url; + } + + public void setUrl(@javax.annotation.Nonnull String url) { + this.url = url; + } + + public URLInputMandatory reference(@javax.annotation.Nullable String reference) { + this.reference = reference; + return this; + } + + /** + * Reference name. By default the value will be set to action name + * + * @return reference + */ + @javax.annotation.Nullable + public String getReference() { + return reference; + } + + public void setReference(@javax.annotation.Nullable String reference) { + this.reference = reference; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key name of the property + * @param value value of the property + * @return the URLInputMandatory instance itself + */ + public URLInputMandatory putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return a map of objects + */ + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key name of the property + * @return an object + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + URLInputMandatory urLInputMandatory = (URLInputMandatory) o; + return Objects.equals(this.authentication, urLInputMandatory.authentication) + && Objects.equals(this.parameters, urLInputMandatory.parameters) + && Objects.equals(this.url, urLInputMandatory.url) + && Objects.equals(this.reference, urLInputMandatory.reference) + && Objects.equals( + this.additionalProperties, urLInputMandatory.additionalProperties); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b + || (a != null + && b != null + && a.isPresent() + && b.isPresent() + && Objects.deepEquals(a.get(), b.get())); + } + + @Override + public int hashCode() { + return Objects.hash(authentication, parameters, url, reference, additionalProperties); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; + } + return a.isPresent() ? Arrays.deepHashCode(new Object[] {a.get()}) : 31; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class URLInputMandatory {\n"); + sb.append(" authentication: ").append(toIndentedString(authentication)).append("\n"); + sb.append(" parameters: ").append(toIndentedString(parameters)).append("\n"); + sb.append(" url: ").append(toIndentedString(url)).append("\n"); + sb.append(" reference: ").append(toIndentedString(reference)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first + * line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("authentication"); + openapiFields.add("parameters"); + openapiFields.add("url"); + openapiFields.add("reference"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + openapiRequiredFields.add("url"); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to URLInputMandatory + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!URLInputMandatory.openapiRequiredFields + .isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException( + String.format( + "The required field(s) %s in URLInputMandatory is not found in the" + + " empty JSON string", + URLInputMandatory.openapiRequiredFields.toString())); + } + } + + // check to make sure all required properties/fields are present in the JSON string + for (String requiredField : URLInputMandatory.openapiRequiredFields) { + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException( + String.format( + "The required field `%s` is not found in the JSON string: %s", + requiredField, jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // validate the optional field `authentication` + if (jsonObj.get("authentication") != null && !jsonObj.get("authentication").isJsonNull()) { + AuthenticationInput.validateJsonElement(jsonObj.get("authentication")); + } + if (jsonObj.get("parameters") != null && !jsonObj.get("parameters").isJsonNull()) { + JsonArray jsonArrayparameters = jsonObj.getAsJsonArray("parameters"); + if (jsonArrayparameters != null) { + // ensure the json data is an array + if (!jsonObj.get("parameters").isJsonArray()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `parameters` to be an array in the JSON" + + " string but got `%s`", + jsonObj.get("parameters").toString())); + } + + // validate the optional field `parameters` (array) + for (int i = 0; i < jsonArrayparameters.size(); i++) { + ParametersListItemInput.validateJsonElement(jsonArrayparameters.get(i)); + } + ; + } + } + if (!jsonObj.get("url").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `url` to be a primitive type in the JSON string" + + " but got `%s`", + jsonObj.get("url").toString())); + } + if ((jsonObj.get("reference") != null && !jsonObj.get("reference").isJsonNull()) + && !jsonObj.get("reference").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `reference` to be a primitive type in the JSON" + + " string but got `%s`", + jsonObj.get("reference").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!URLInputMandatory.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'URLInputMandatory' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter = + gson.getDelegateAdapter(this, TypeToken.get(URLInputMandatory.class)); + + return (TypeAdapter) + new TypeAdapter() { + @Override + public void write(JsonWriter out, URLInputMandatory value) + throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + obj.remove("additionalProperties"); + // serialize additional properties + if (value.getAdditionalProperties() != null) { + for (Map.Entry entry : + value.getAdditionalProperties().entrySet()) { + if (entry.getValue() instanceof String) + obj.addProperty(entry.getKey(), (String) entry.getValue()); + else if (entry.getValue() instanceof Number) + obj.addProperty(entry.getKey(), (Number) entry.getValue()); + else if (entry.getValue() instanceof Boolean) + obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); + else if (entry.getValue() instanceof Character) + obj.addProperty( + entry.getKey(), (Character) entry.getValue()); + else { + JsonElement jsonElement = gson.toJsonTree(entry.getValue()); + if (jsonElement.isJsonArray()) { + obj.add(entry.getKey(), jsonElement.getAsJsonArray()); + } else { + obj.add(entry.getKey(), jsonElement.getAsJsonObject()); + } + } + } + } + elementAdapter.write(out, obj); + } + + @Override + public URLInputMandatory read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // store additional fields in the deserialized instance + URLInputMandatory instance = thisAdapter.fromJsonTree(jsonObj); + for (Map.Entry entry : jsonObj.entrySet()) { + if (!openapiFields.contains(entry.getKey())) { + if (entry.getValue().isJsonPrimitive()) { // primitive type + if (entry.getValue().getAsJsonPrimitive().isString()) + instance.putAdditionalProperty( + entry.getKey(), entry.getValue().getAsString()); + else if (entry.getValue().getAsJsonPrimitive().isNumber()) + instance.putAdditionalProperty( + entry.getKey(), entry.getValue().getAsNumber()); + else if (entry.getValue().getAsJsonPrimitive().isBoolean()) + instance.putAdditionalProperty( + entry.getKey(), + entry.getValue().getAsBoolean()); + else + throw new IllegalArgumentException( + String.format( + "The field `%s` has unknown primitive" + + " type. Value: %s", + entry.getKey(), + entry.getValue().toString())); + } else if (entry.getValue().isJsonArray()) { + instance.putAdditionalProperty( + entry.getKey(), + gson.fromJson(entry.getValue(), List.class)); + } else { // JSON object + instance.putAdditionalProperty( + entry.getKey(), + gson.fromJson(entry.getValue(), HashMap.class)); + } + } + } + return instance; + } + }.nullSafe(); + } + } + + /** + * Create an instance of URLInputMandatory given an JSON string + * + * @param jsonString JSON string + * @return An instance of URLInputMandatory + * @throws IOException if the JSON string is invalid with respect to URLInputMandatory + */ + public static URLInputMandatory fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, URLInputMandatory.class); + } + + /** + * Convert an instance of URLInputMandatory to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} diff --git a/sdks/java/src/main/java/com/thoughtspot/client/model/UnassignTagRequest.java b/sdks/java/src/main/java/com/thoughtspot/client/model/UnassignTagRequest.java new file mode 100644 index 000000000..6ebf8c79d --- /dev/null +++ b/sdks/java/src/main/java/com/thoughtspot/client/model/UnassignTagRequest.java @@ -0,0 +1,371 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client.model; + +import com.google.gson.Gson; +import com.google.gson.JsonArray; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.TypeAdapter; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.annotations.SerializedName; +import com.google.gson.reflect.TypeToken; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import com.thoughtspot.client.JSON; +import java.io.IOException; +import java.io.Serializable; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Objects; + +/** UnassignTagRequest */ +@javax.annotation.Generated( + value = "org.openapitools.codegen.languages.JavaClientCodegen", + comments = "Generator version: 7.12.0") +public class UnassignTagRequest implements Serializable { + private static final long serialVersionUID = 1L; + + public static final String SERIALIZED_NAME_METADATA = "metadata"; + + @SerializedName(SERIALIZED_NAME_METADATA) + @javax.annotation.Nonnull + private List metadata; + + public static final String SERIALIZED_NAME_TAG_IDENTIFIERS = "tag_identifiers"; + + @SerializedName(SERIALIZED_NAME_TAG_IDENTIFIERS) + @javax.annotation.Nonnull + private List tagIdentifiers; + + public UnassignTagRequest() {} + + public UnassignTagRequest metadata( + @javax.annotation.Nonnull List metadata) { + this.metadata = metadata; + return this; + } + + public UnassignTagRequest addMetadataItem(TagMetadataTypeInput metadataItem) { + if (this.metadata == null) { + this.metadata = new ArrayList<>(); + } + this.metadata.add(metadataItem); + return this; + } + + /** + * Metadata objects. + * + * @return metadata + */ + @javax.annotation.Nonnull + public List getMetadata() { + return metadata; + } + + public void setMetadata(@javax.annotation.Nonnull List metadata) { + this.metadata = metadata; + } + + public UnassignTagRequest tagIdentifiers( + @javax.annotation.Nonnull List tagIdentifiers) { + this.tagIdentifiers = tagIdentifiers; + return this; + } + + public UnassignTagRequest addTagIdentifiersItem(String tagIdentifiersItem) { + if (this.tagIdentifiers == null) { + this.tagIdentifiers = new ArrayList<>(); + } + this.tagIdentifiers.add(tagIdentifiersItem); + return this; + } + + /** + * GUID or name of the tag. + * + * @return tagIdentifiers + */ + @javax.annotation.Nonnull + public List getTagIdentifiers() { + return tagIdentifiers; + } + + public void setTagIdentifiers(@javax.annotation.Nonnull List tagIdentifiers) { + this.tagIdentifiers = tagIdentifiers; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key name of the property + * @param value value of the property + * @return the UnassignTagRequest instance itself + */ + public UnassignTagRequest putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return a map of objects + */ + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key name of the property + * @return an object + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + UnassignTagRequest unassignTagRequest = (UnassignTagRequest) o; + return Objects.equals(this.metadata, unassignTagRequest.metadata) + && Objects.equals(this.tagIdentifiers, unassignTagRequest.tagIdentifiers) + && Objects.equals( + this.additionalProperties, unassignTagRequest.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(metadata, tagIdentifiers, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class UnassignTagRequest {\n"); + sb.append(" metadata: ").append(toIndentedString(metadata)).append("\n"); + sb.append(" tagIdentifiers: ").append(toIndentedString(tagIdentifiers)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first + * line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("metadata"); + openapiFields.add("tag_identifiers"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + openapiRequiredFields.add("metadata"); + openapiRequiredFields.add("tag_identifiers"); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to UnassignTagRequest + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!UnassignTagRequest.openapiRequiredFields + .isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException( + String.format( + "The required field(s) %s in UnassignTagRequest is not found in" + + " the empty JSON string", + UnassignTagRequest.openapiRequiredFields.toString())); + } + } + + // check to make sure all required properties/fields are present in the JSON string + for (String requiredField : UnassignTagRequest.openapiRequiredFields) { + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException( + String.format( + "The required field `%s` is not found in the JSON string: %s", + requiredField, jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // ensure the json data is an array + if (!jsonObj.get("metadata").isJsonArray()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `metadata` to be an array in the JSON string but" + + " got `%s`", + jsonObj.get("metadata").toString())); + } + + JsonArray jsonArraymetadata = jsonObj.getAsJsonArray("metadata"); + // validate the required field `metadata` (array) + for (int i = 0; i < jsonArraymetadata.size(); i++) { + TagMetadataTypeInput.validateJsonElement(jsonArraymetadata.get(i)); + } + ; + // ensure the required json array is present + if (jsonObj.get("tag_identifiers") == null) { + throw new IllegalArgumentException( + "Expected the field `linkedContent` to be an array in the JSON string but got" + + " `null`"); + } else if (!jsonObj.get("tag_identifiers").isJsonArray()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `tag_identifiers` to be an array in the JSON" + + " string but got `%s`", + jsonObj.get("tag_identifiers").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!UnassignTagRequest.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'UnassignTagRequest' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter = + gson.getDelegateAdapter(this, TypeToken.get(UnassignTagRequest.class)); + + return (TypeAdapter) + new TypeAdapter() { + @Override + public void write(JsonWriter out, UnassignTagRequest value) + throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + obj.remove("additionalProperties"); + // serialize additional properties + if (value.getAdditionalProperties() != null) { + for (Map.Entry entry : + value.getAdditionalProperties().entrySet()) { + if (entry.getValue() instanceof String) + obj.addProperty(entry.getKey(), (String) entry.getValue()); + else if (entry.getValue() instanceof Number) + obj.addProperty(entry.getKey(), (Number) entry.getValue()); + else if (entry.getValue() instanceof Boolean) + obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); + else if (entry.getValue() instanceof Character) + obj.addProperty( + entry.getKey(), (Character) entry.getValue()); + else { + JsonElement jsonElement = gson.toJsonTree(entry.getValue()); + if (jsonElement.isJsonArray()) { + obj.add(entry.getKey(), jsonElement.getAsJsonArray()); + } else { + obj.add(entry.getKey(), jsonElement.getAsJsonObject()); + } + } + } + } + elementAdapter.write(out, obj); + } + + @Override + public UnassignTagRequest read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // store additional fields in the deserialized instance + UnassignTagRequest instance = thisAdapter.fromJsonTree(jsonObj); + for (Map.Entry entry : jsonObj.entrySet()) { + if (!openapiFields.contains(entry.getKey())) { + if (entry.getValue().isJsonPrimitive()) { // primitive type + if (entry.getValue().getAsJsonPrimitive().isString()) + instance.putAdditionalProperty( + entry.getKey(), entry.getValue().getAsString()); + else if (entry.getValue().getAsJsonPrimitive().isNumber()) + instance.putAdditionalProperty( + entry.getKey(), entry.getValue().getAsNumber()); + else if (entry.getValue().getAsJsonPrimitive().isBoolean()) + instance.putAdditionalProperty( + entry.getKey(), + entry.getValue().getAsBoolean()); + else + throw new IllegalArgumentException( + String.format( + "The field `%s` has unknown primitive" + + " type. Value: %s", + entry.getKey(), + entry.getValue().toString())); + } else if (entry.getValue().isJsonArray()) { + instance.putAdditionalProperty( + entry.getKey(), + gson.fromJson(entry.getValue(), List.class)); + } else { // JSON object + instance.putAdditionalProperty( + entry.getKey(), + gson.fromJson(entry.getValue(), HashMap.class)); + } + } + } + return instance; + } + }.nullSafe(); + } + } + + /** + * Create an instance of UnassignTagRequest given an JSON string + * + * @param jsonString JSON string + * @return An instance of UnassignTagRequest + * @throws IOException if the JSON string is invalid with respect to UnassignTagRequest + */ + public static UnassignTagRequest fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, UnassignTagRequest.class); + } + + /** + * Convert an instance of UnassignTagRequest to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} diff --git a/sdks/java/src/main/java/com/thoughtspot/client/model/UnparameterizeMetadataRequest.java b/sdks/java/src/main/java/com/thoughtspot/client/model/UnparameterizeMetadataRequest.java new file mode 100644 index 000000000..23d4903b7 --- /dev/null +++ b/sdks/java/src/main/java/com/thoughtspot/client/model/UnparameterizeMetadataRequest.java @@ -0,0 +1,577 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client.model; + +import com.google.gson.Gson; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.TypeAdapter; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.reflect.TypeToken; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import com.thoughtspot.client.JSON; +import java.io.IOException; +import java.io.Serializable; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Objects; + +/** UnparameterizeMetadataRequest */ +@javax.annotation.Generated( + value = "org.openapitools.codegen.languages.JavaClientCodegen", + comments = "Generator version: 7.12.0") +public class UnparameterizeMetadataRequest implements Serializable { + private static final long serialVersionUID = 1L; + + /** Type of metadata object to unparameterize. */ + @JsonAdapter(MetadataTypeEnum.Adapter.class) + public enum MetadataTypeEnum { + LOGICAL_TABLE("LOGICAL_TABLE"), + + CONNECTION("CONNECTION"), + + CONNECTION_CONFIG("CONNECTION_CONFIG"); + + private String value; + + MetadataTypeEnum(String value) { + this.value = value; + } + + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + public static MetadataTypeEnum fromValue(String value) { + for (MetadataTypeEnum b : MetadataTypeEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + + public static class Adapter extends TypeAdapter { + @Override + public void write(final JsonWriter jsonWriter, final MetadataTypeEnum enumeration) + throws IOException { + jsonWriter.value(enumeration.getValue()); + } + + @Override + public MetadataTypeEnum read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + return MetadataTypeEnum.fromValue(value); + } + } + + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + String value = jsonElement.getAsString(); + MetadataTypeEnum.fromValue(value); + } + } + + public static final String SERIALIZED_NAME_METADATA_TYPE = "metadata_type"; + + @SerializedName(SERIALIZED_NAME_METADATA_TYPE) + @javax.annotation.Nullable + private MetadataTypeEnum metadataType; + + public static final String SERIALIZED_NAME_METADATA_IDENTIFIER = "metadata_identifier"; + + @SerializedName(SERIALIZED_NAME_METADATA_IDENTIFIER) + @javax.annotation.Nonnull + private String metadataIdentifier; + + /** Type of field in the metadata to unparameterize. */ + @JsonAdapter(FieldTypeEnum.Adapter.class) + public enum FieldTypeEnum { + ATTRIBUTE("ATTRIBUTE"), + + CONNECTION_PROPERTY("CONNECTION_PROPERTY"); + + private String value; + + FieldTypeEnum(String value) { + this.value = value; + } + + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + public static FieldTypeEnum fromValue(String value) { + for (FieldTypeEnum b : FieldTypeEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + + public static class Adapter extends TypeAdapter { + @Override + public void write(final JsonWriter jsonWriter, final FieldTypeEnum enumeration) + throws IOException { + jsonWriter.value(enumeration.getValue()); + } + + @Override + public FieldTypeEnum read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + return FieldTypeEnum.fromValue(value); + } + } + + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + String value = jsonElement.getAsString(); + FieldTypeEnum.fromValue(value); + } + } + + public static final String SERIALIZED_NAME_FIELD_TYPE = "field_type"; + + @SerializedName(SERIALIZED_NAME_FIELD_TYPE) + @javax.annotation.Nonnull + private FieldTypeEnum fieldType; + + public static final String SERIALIZED_NAME_FIELD_NAME = "field_name"; + + @SerializedName(SERIALIZED_NAME_FIELD_NAME) + @javax.annotation.Nonnull + private String fieldName; + + public static final String SERIALIZED_NAME_VALUE = "value"; + + @SerializedName(SERIALIZED_NAME_VALUE) + @javax.annotation.Nonnull + private String value; + + public UnparameterizeMetadataRequest() {} + + public UnparameterizeMetadataRequest metadataType( + @javax.annotation.Nullable MetadataTypeEnum metadataType) { + this.metadataType = metadataType; + return this; + } + + /** + * Type of metadata object to unparameterize. + * + * @return metadataType + */ + @javax.annotation.Nullable + public MetadataTypeEnum getMetadataType() { + return metadataType; + } + + public void setMetadataType(@javax.annotation.Nullable MetadataTypeEnum metadataType) { + this.metadataType = metadataType; + } + + public UnparameterizeMetadataRequest metadataIdentifier( + @javax.annotation.Nonnull String metadataIdentifier) { + this.metadataIdentifier = metadataIdentifier; + return this; + } + + /** + * Unique ID or name of the metadata object to unparameterize. + * + * @return metadataIdentifier + */ + @javax.annotation.Nonnull + public String getMetadataIdentifier() { + return metadataIdentifier; + } + + public void setMetadataIdentifier(@javax.annotation.Nonnull String metadataIdentifier) { + this.metadataIdentifier = metadataIdentifier; + } + + public UnparameterizeMetadataRequest fieldType( + @javax.annotation.Nonnull FieldTypeEnum fieldType) { + this.fieldType = fieldType; + return this; + } + + /** + * Type of field in the metadata to unparameterize. + * + * @return fieldType + */ + @javax.annotation.Nonnull + public FieldTypeEnum getFieldType() { + return fieldType; + } + + public void setFieldType(@javax.annotation.Nonnull FieldTypeEnum fieldType) { + this.fieldType = fieldType; + } + + public UnparameterizeMetadataRequest fieldName(@javax.annotation.Nonnull String fieldName) { + this.fieldName = fieldName; + return this; + } + + /** + * Name of the field which needs to be unparameterized. + * + * @return fieldName + */ + @javax.annotation.Nonnull + public String getFieldName() { + return fieldName; + } + + public void setFieldName(@javax.annotation.Nonnull String fieldName) { + this.fieldName = fieldName; + } + + public UnparameterizeMetadataRequest value(@javax.annotation.Nonnull String value) { + this.value = value; + return this; + } + + /** + * The value to use in place of the variable for the field + * + * @return value + */ + @javax.annotation.Nonnull + public String getValue() { + return value; + } + + public void setValue(@javax.annotation.Nonnull String value) { + this.value = value; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key name of the property + * @param value value of the property + * @return the UnparameterizeMetadataRequest instance itself + */ + public UnparameterizeMetadataRequest putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return a map of objects + */ + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key name of the property + * @return an object + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + UnparameterizeMetadataRequest unparameterizeMetadataRequest = + (UnparameterizeMetadataRequest) o; + return Objects.equals(this.metadataType, unparameterizeMetadataRequest.metadataType) + && Objects.equals( + this.metadataIdentifier, unparameterizeMetadataRequest.metadataIdentifier) + && Objects.equals(this.fieldType, unparameterizeMetadataRequest.fieldType) + && Objects.equals(this.fieldName, unparameterizeMetadataRequest.fieldName) + && Objects.equals(this.value, unparameterizeMetadataRequest.value) + && Objects.equals( + this.additionalProperties, + unparameterizeMetadataRequest.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash( + metadataType, + metadataIdentifier, + fieldType, + fieldName, + value, + additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class UnparameterizeMetadataRequest {\n"); + sb.append(" metadataType: ").append(toIndentedString(metadataType)).append("\n"); + sb.append(" metadataIdentifier: ") + .append(toIndentedString(metadataIdentifier)) + .append("\n"); + sb.append(" fieldType: ").append(toIndentedString(fieldType)).append("\n"); + sb.append(" fieldName: ").append(toIndentedString(fieldName)).append("\n"); + sb.append(" value: ").append(toIndentedString(value)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first + * line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("metadata_type"); + openapiFields.add("metadata_identifier"); + openapiFields.add("field_type"); + openapiFields.add("field_name"); + openapiFields.add("value"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + openapiRequiredFields.add("metadata_identifier"); + openapiRequiredFields.add("field_type"); + openapiRequiredFields.add("field_name"); + openapiRequiredFields.add("value"); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to + * UnparameterizeMetadataRequest + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!UnparameterizeMetadataRequest.openapiRequiredFields + .isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException( + String.format( + "The required field(s) %s in UnparameterizeMetadataRequest is not" + + " found in the empty JSON string", + UnparameterizeMetadataRequest.openapiRequiredFields.toString())); + } + } + + // check to make sure all required properties/fields are present in the JSON string + for (String requiredField : UnparameterizeMetadataRequest.openapiRequiredFields) { + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException( + String.format( + "The required field `%s` is not found in the JSON string: %s", + requiredField, jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if ((jsonObj.get("metadata_type") != null && !jsonObj.get("metadata_type").isJsonNull()) + && !jsonObj.get("metadata_type").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `metadata_type` to be a primitive type in the JSON" + + " string but got `%s`", + jsonObj.get("metadata_type").toString())); + } + // validate the optional field `metadata_type` + if (jsonObj.get("metadata_type") != null && !jsonObj.get("metadata_type").isJsonNull()) { + MetadataTypeEnum.validateJsonElement(jsonObj.get("metadata_type")); + } + if (!jsonObj.get("metadata_identifier").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `metadata_identifier` to be a primitive type in" + + " the JSON string but got `%s`", + jsonObj.get("metadata_identifier").toString())); + } + if (!jsonObj.get("field_type").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `field_type` to be a primitive type in the JSON" + + " string but got `%s`", + jsonObj.get("field_type").toString())); + } + // validate the required field `field_type` + FieldTypeEnum.validateJsonElement(jsonObj.get("field_type")); + if (!jsonObj.get("field_name").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `field_name` to be a primitive type in the JSON" + + " string but got `%s`", + jsonObj.get("field_name").toString())); + } + if (!jsonObj.get("value").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `value` to be a primitive type in the JSON string" + + " but got `%s`", + jsonObj.get("value").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!UnparameterizeMetadataRequest.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'UnparameterizeMetadataRequest' and its + // subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter = + gson.getDelegateAdapter( + this, TypeToken.get(UnparameterizeMetadataRequest.class)); + + return (TypeAdapter) + new TypeAdapter() { + @Override + public void write(JsonWriter out, UnparameterizeMetadataRequest value) + throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + obj.remove("additionalProperties"); + // serialize additional properties + if (value.getAdditionalProperties() != null) { + for (Map.Entry entry : + value.getAdditionalProperties().entrySet()) { + if (entry.getValue() instanceof String) + obj.addProperty(entry.getKey(), (String) entry.getValue()); + else if (entry.getValue() instanceof Number) + obj.addProperty(entry.getKey(), (Number) entry.getValue()); + else if (entry.getValue() instanceof Boolean) + obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); + else if (entry.getValue() instanceof Character) + obj.addProperty( + entry.getKey(), (Character) entry.getValue()); + else { + JsonElement jsonElement = gson.toJsonTree(entry.getValue()); + if (jsonElement.isJsonArray()) { + obj.add(entry.getKey(), jsonElement.getAsJsonArray()); + } else { + obj.add(entry.getKey(), jsonElement.getAsJsonObject()); + } + } + } + } + elementAdapter.write(out, obj); + } + + @Override + public UnparameterizeMetadataRequest read(JsonReader in) + throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // store additional fields in the deserialized instance + UnparameterizeMetadataRequest instance = + thisAdapter.fromJsonTree(jsonObj); + for (Map.Entry entry : jsonObj.entrySet()) { + if (!openapiFields.contains(entry.getKey())) { + if (entry.getValue().isJsonPrimitive()) { // primitive type + if (entry.getValue().getAsJsonPrimitive().isString()) + instance.putAdditionalProperty( + entry.getKey(), entry.getValue().getAsString()); + else if (entry.getValue().getAsJsonPrimitive().isNumber()) + instance.putAdditionalProperty( + entry.getKey(), entry.getValue().getAsNumber()); + else if (entry.getValue().getAsJsonPrimitive().isBoolean()) + instance.putAdditionalProperty( + entry.getKey(), + entry.getValue().getAsBoolean()); + else + throw new IllegalArgumentException( + String.format( + "The field `%s` has unknown primitive" + + " type. Value: %s", + entry.getKey(), + entry.getValue().toString())); + } else if (entry.getValue().isJsonArray()) { + instance.putAdditionalProperty( + entry.getKey(), + gson.fromJson(entry.getValue(), List.class)); + } else { // JSON object + instance.putAdditionalProperty( + entry.getKey(), + gson.fromJson(entry.getValue(), HashMap.class)); + } + } + } + return instance; + } + }.nullSafe(); + } + } + + /** + * Create an instance of UnparameterizeMetadataRequest given an JSON string + * + * @param jsonString JSON string + * @return An instance of UnparameterizeMetadataRequest + * @throws IOException if the JSON string is invalid with respect to + * UnparameterizeMetadataRequest + */ + public static UnparameterizeMetadataRequest fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, UnparameterizeMetadataRequest.class); + } + + /** + * Convert an instance of UnparameterizeMetadataRequest to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} diff --git a/sdks/java/src/main/java/com/thoughtspot/client/model/UnpublishMetadataRequest.java b/sdks/java/src/main/java/com/thoughtspot/client/model/UnpublishMetadataRequest.java new file mode 100644 index 000000000..ee1418504 --- /dev/null +++ b/sdks/java/src/main/java/com/thoughtspot/client/model/UnpublishMetadataRequest.java @@ -0,0 +1,454 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client.model; + +import com.google.gson.Gson; +import com.google.gson.JsonArray; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.TypeAdapter; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.annotations.SerializedName; +import com.google.gson.reflect.TypeToken; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import com.thoughtspot.client.JSON; +import java.io.IOException; +import java.io.Serializable; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Objects; +import org.openapitools.jackson.nullable.JsonNullable; + +/** UnpublishMetadataRequest */ +@javax.annotation.Generated( + value = "org.openapitools.codegen.languages.JavaClientCodegen", + comments = "Generator version: 7.12.0") +public class UnpublishMetadataRequest implements Serializable { + private static final long serialVersionUID = 1L; + + public static final String SERIALIZED_NAME_FORCE = "force"; + + @SerializedName(SERIALIZED_NAME_FORCE) + @javax.annotation.Nullable + private Boolean force; + + public static final String SERIALIZED_NAME_INCLUDE_DEPENDENCIES = "include_dependencies"; + + @SerializedName(SERIALIZED_NAME_INCLUDE_DEPENDENCIES) + @javax.annotation.Nonnull + private Boolean includeDependencies; + + public static final String SERIALIZED_NAME_METADATA = "metadata"; + + @SerializedName(SERIALIZED_NAME_METADATA) + @javax.annotation.Nonnull + private List metadata; + + public static final String SERIALIZED_NAME_ORG_IDENTIFIERS = "org_identifiers"; + + @SerializedName(SERIALIZED_NAME_ORG_IDENTIFIERS) + @javax.annotation.Nonnull + private List orgIdentifiers; + + public UnpublishMetadataRequest() {} + + public UnpublishMetadataRequest force(@javax.annotation.Nullable Boolean force) { + this.force = force; + return this; + } + + /** + * Force unpublishes the object. This will break all the dependent objects in the unpublished + * orgs. + * + * @return force + */ + @javax.annotation.Nullable + public Boolean getForce() { + return force; + } + + public void setForce(@javax.annotation.Nullable Boolean force) { + this.force = force; + } + + public UnpublishMetadataRequest includeDependencies( + @javax.annotation.Nonnull Boolean includeDependencies) { + this.includeDependencies = includeDependencies; + return this; + } + + /** + * Should we unpublish all the dependencies for the objects specified. The dependencies will be + * unpublished if no other published object is using it. + * + * @return includeDependencies + */ + @javax.annotation.Nonnull + public Boolean getIncludeDependencies() { + return includeDependencies; + } + + public void setIncludeDependencies(@javax.annotation.Nonnull Boolean includeDependencies) { + this.includeDependencies = includeDependencies; + } + + public UnpublishMetadataRequest metadata( + @javax.annotation.Nonnull List metadata) { + this.metadata = metadata; + return this; + } + + public UnpublishMetadataRequest addMetadataItem(PublishMetadataListItem metadataItem) { + if (this.metadata == null) { + this.metadata = new ArrayList<>(); + } + this.metadata.add(metadataItem); + return this; + } + + /** + * Metadata objects. + * + * @return metadata + */ + @javax.annotation.Nonnull + public List getMetadata() { + return metadata; + } + + public void setMetadata(@javax.annotation.Nonnull List metadata) { + this.metadata = metadata; + } + + public UnpublishMetadataRequest orgIdentifiers( + @javax.annotation.Nonnull List orgIdentifiers) { + this.orgIdentifiers = orgIdentifiers; + return this; + } + + public UnpublishMetadataRequest addOrgIdentifiersItem(String orgIdentifiersItem) { + if (this.orgIdentifiers == null) { + this.orgIdentifiers = new ArrayList<>(); + } + this.orgIdentifiers.add(orgIdentifiersItem); + return this; + } + + /** + * Unique ID or name of orgs. + * + * @return orgIdentifiers + */ + @javax.annotation.Nonnull + public List getOrgIdentifiers() { + return orgIdentifiers; + } + + public void setOrgIdentifiers(@javax.annotation.Nonnull List orgIdentifiers) { + this.orgIdentifiers = orgIdentifiers; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key name of the property + * @param value value of the property + * @return the UnpublishMetadataRequest instance itself + */ + public UnpublishMetadataRequest putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return a map of objects + */ + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key name of the property + * @return an object + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + UnpublishMetadataRequest unpublishMetadataRequest = (UnpublishMetadataRequest) o; + return Objects.equals(this.force, unpublishMetadataRequest.force) + && Objects.equals( + this.includeDependencies, unpublishMetadataRequest.includeDependencies) + && Objects.equals(this.metadata, unpublishMetadataRequest.metadata) + && Objects.equals(this.orgIdentifiers, unpublishMetadataRequest.orgIdentifiers) + && Objects.equals( + this.additionalProperties, unpublishMetadataRequest.additionalProperties); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b + || (a != null + && b != null + && a.isPresent() + && b.isPresent() + && Objects.deepEquals(a.get(), b.get())); + } + + @Override + public int hashCode() { + return Objects.hash( + force, includeDependencies, metadata, orgIdentifiers, additionalProperties); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; + } + return a.isPresent() ? Arrays.deepHashCode(new Object[] {a.get()}) : 31; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class UnpublishMetadataRequest {\n"); + sb.append(" force: ").append(toIndentedString(force)).append("\n"); + sb.append(" includeDependencies: ") + .append(toIndentedString(includeDependencies)) + .append("\n"); + sb.append(" metadata: ").append(toIndentedString(metadata)).append("\n"); + sb.append(" orgIdentifiers: ").append(toIndentedString(orgIdentifiers)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first + * line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("force"); + openapiFields.add("include_dependencies"); + openapiFields.add("metadata"); + openapiFields.add("org_identifiers"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + openapiRequiredFields.add("include_dependencies"); + openapiRequiredFields.add("metadata"); + openapiRequiredFields.add("org_identifiers"); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to UnpublishMetadataRequest + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!UnpublishMetadataRequest.openapiRequiredFields + .isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException( + String.format( + "The required field(s) %s in UnpublishMetadataRequest is not found" + + " in the empty JSON string", + UnpublishMetadataRequest.openapiRequiredFields.toString())); + } + } + + // check to make sure all required properties/fields are present in the JSON string + for (String requiredField : UnpublishMetadataRequest.openapiRequiredFields) { + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException( + String.format( + "The required field `%s` is not found in the JSON string: %s", + requiredField, jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // ensure the json data is an array + if (!jsonObj.get("metadata").isJsonArray()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `metadata` to be an array in the JSON string but" + + " got `%s`", + jsonObj.get("metadata").toString())); + } + + JsonArray jsonArraymetadata = jsonObj.getAsJsonArray("metadata"); + // validate the required field `metadata` (array) + for (int i = 0; i < jsonArraymetadata.size(); i++) { + PublishMetadataListItem.validateJsonElement(jsonArraymetadata.get(i)); + } + ; + // ensure the required json array is present + if (jsonObj.get("org_identifiers") == null) { + throw new IllegalArgumentException( + "Expected the field `linkedContent` to be an array in the JSON string but got" + + " `null`"); + } else if (!jsonObj.get("org_identifiers").isJsonArray()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `org_identifiers` to be an array in the JSON" + + " string but got `%s`", + jsonObj.get("org_identifiers").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!UnpublishMetadataRequest.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'UnpublishMetadataRequest' and its + // subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter = + gson.getDelegateAdapter(this, TypeToken.get(UnpublishMetadataRequest.class)); + + return (TypeAdapter) + new TypeAdapter() { + @Override + public void write(JsonWriter out, UnpublishMetadataRequest value) + throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + obj.remove("additionalProperties"); + // serialize additional properties + if (value.getAdditionalProperties() != null) { + for (Map.Entry entry : + value.getAdditionalProperties().entrySet()) { + if (entry.getValue() instanceof String) + obj.addProperty(entry.getKey(), (String) entry.getValue()); + else if (entry.getValue() instanceof Number) + obj.addProperty(entry.getKey(), (Number) entry.getValue()); + else if (entry.getValue() instanceof Boolean) + obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); + else if (entry.getValue() instanceof Character) + obj.addProperty( + entry.getKey(), (Character) entry.getValue()); + else { + JsonElement jsonElement = gson.toJsonTree(entry.getValue()); + if (jsonElement.isJsonArray()) { + obj.add(entry.getKey(), jsonElement.getAsJsonArray()); + } else { + obj.add(entry.getKey(), jsonElement.getAsJsonObject()); + } + } + } + } + elementAdapter.write(out, obj); + } + + @Override + public UnpublishMetadataRequest read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // store additional fields in the deserialized instance + UnpublishMetadataRequest instance = thisAdapter.fromJsonTree(jsonObj); + for (Map.Entry entry : jsonObj.entrySet()) { + if (!openapiFields.contains(entry.getKey())) { + if (entry.getValue().isJsonPrimitive()) { // primitive type + if (entry.getValue().getAsJsonPrimitive().isString()) + instance.putAdditionalProperty( + entry.getKey(), entry.getValue().getAsString()); + else if (entry.getValue().getAsJsonPrimitive().isNumber()) + instance.putAdditionalProperty( + entry.getKey(), entry.getValue().getAsNumber()); + else if (entry.getValue().getAsJsonPrimitive().isBoolean()) + instance.putAdditionalProperty( + entry.getKey(), + entry.getValue().getAsBoolean()); + else + throw new IllegalArgumentException( + String.format( + "The field `%s` has unknown primitive" + + " type. Value: %s", + entry.getKey(), + entry.getValue().toString())); + } else if (entry.getValue().isJsonArray()) { + instance.putAdditionalProperty( + entry.getKey(), + gson.fromJson(entry.getValue(), List.class)); + } else { // JSON object + instance.putAdditionalProperty( + entry.getKey(), + gson.fromJson(entry.getValue(), HashMap.class)); + } + } + } + return instance; + } + }.nullSafe(); + } + } + + /** + * Create an instance of UnpublishMetadataRequest given an JSON string + * + * @param jsonString JSON string + * @return An instance of UnpublishMetadataRequest + * @throws IOException if the JSON string is invalid with respect to UnpublishMetadataRequest + */ + public static UnpublishMetadataRequest fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, UnpublishMetadataRequest.class); + } + + /** + * Convert an instance of UnpublishMetadataRequest to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} diff --git a/sdks/java/src/main/java/com/thoughtspot/client/model/UpdateCalendarRequest.java b/sdks/java/src/main/java/com/thoughtspot/client/model/UpdateCalendarRequest.java new file mode 100644 index 000000000..9c1939af9 --- /dev/null +++ b/sdks/java/src/main/java/com/thoughtspot/client/model/UpdateCalendarRequest.java @@ -0,0 +1,877 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client.model; + +import com.google.gson.Gson; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.TypeAdapter; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.reflect.TypeToken; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import com.thoughtspot.client.JSON; +import java.io.IOException; +import java.io.Serializable; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Objects; + +/** UpdateCalendarRequest */ +@javax.annotation.Generated( + value = "org.openapitools.codegen.languages.JavaClientCodegen", + comments = "Generator version: 7.12.0") +public class UpdateCalendarRequest implements Serializable { + private static final long serialVersionUID = 1L; + + /** Type of update operation. */ + @JsonAdapter(UpdateMethodEnum.Adapter.class) + public enum UpdateMethodEnum { + FROM_INPUT_PARAMS("FROM_INPUT_PARAMS"), + + FROM_EXISTING_TABLE("FROM_EXISTING_TABLE"); + + private String value; + + UpdateMethodEnum(String value) { + this.value = value; + } + + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + public static UpdateMethodEnum fromValue(String value) { + for (UpdateMethodEnum b : UpdateMethodEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + + public static class Adapter extends TypeAdapter { + @Override + public void write(final JsonWriter jsonWriter, final UpdateMethodEnum enumeration) + throws IOException { + jsonWriter.value(enumeration.getValue()); + } + + @Override + public UpdateMethodEnum read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + return UpdateMethodEnum.fromValue(value); + } + } + + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + String value = jsonElement.getAsString(); + UpdateMethodEnum.fromValue(value); + } + } + + public static final String SERIALIZED_NAME_UPDATE_METHOD = "update_method"; + + @SerializedName(SERIALIZED_NAME_UPDATE_METHOD) + @javax.annotation.Nullable + private UpdateMethodEnum updateMethod = UpdateMethodEnum.FROM_INPUT_PARAMS; + + public static final String SERIALIZED_NAME_TABLE_REFERENCE = "table_reference"; + + @SerializedName(SERIALIZED_NAME_TABLE_REFERENCE) + @javax.annotation.Nonnull + private ExternalTableInput tableReference; + + public static final String SERIALIZED_NAME_START_DATE = "start_date"; + + @SerializedName(SERIALIZED_NAME_START_DATE) + @javax.annotation.Nullable + private String startDate; + + public static final String SERIALIZED_NAME_END_DATE = "end_date"; + + @SerializedName(SERIALIZED_NAME_END_DATE) + @javax.annotation.Nullable + private String endDate; + + /** Type of the calendar. */ + @JsonAdapter(CalendarTypeEnum.Adapter.class) + public enum CalendarTypeEnum { + MONTH_OFFSET("MONTH_OFFSET"), + + FOUR_FOUR_FIVE("FOUR_FOUR_FIVE"), + + FOUR_FIVE_FOUR("FOUR_FIVE_FOUR"), + + FIVE_FOUR_FOUR("FIVE_FOUR_FOUR"); + + private String value; + + CalendarTypeEnum(String value) { + this.value = value; + } + + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + public static CalendarTypeEnum fromValue(String value) { + for (CalendarTypeEnum b : CalendarTypeEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + + public static class Adapter extends TypeAdapter { + @Override + public void write(final JsonWriter jsonWriter, final CalendarTypeEnum enumeration) + throws IOException { + jsonWriter.value(enumeration.getValue()); + } + + @Override + public CalendarTypeEnum read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + return CalendarTypeEnum.fromValue(value); + } + } + + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + String value = jsonElement.getAsString(); + CalendarTypeEnum.fromValue(value); + } + } + + public static final String SERIALIZED_NAME_CALENDAR_TYPE = "calendar_type"; + + @SerializedName(SERIALIZED_NAME_CALENDAR_TYPE) + @javax.annotation.Nullable + private CalendarTypeEnum calendarType = CalendarTypeEnum.MONTH_OFFSET; + + /** + * Specify the month in which the fiscal or custom calendar year should start. For example, if + * you set `month_offset` to \"April\", the custom calendar will treat + * \"April\" as the first month of the year, and the related attributes such as + * quarters and start date will be based on this offset. The default value is + * `January`, which represents the standard calendar year (January to December). + */ + @JsonAdapter(MonthOffsetEnum.Adapter.class) + public enum MonthOffsetEnum { + JANUARY("January"), + + FEBRUARY("February"), + + MARCH("March"), + + APRIL("April"), + + MAY("May"), + + JUNE("June"), + + JULY("July"), + + AUGUST("August"), + + SEPTEMBER("September"), + + OCTOBER("October"), + + NOVEMBER("November"), + + DECEMBER("December"); + + private String value; + + MonthOffsetEnum(String value) { + this.value = value; + } + + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + public static MonthOffsetEnum fromValue(String value) { + for (MonthOffsetEnum b : MonthOffsetEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + + public static class Adapter extends TypeAdapter { + @Override + public void write(final JsonWriter jsonWriter, final MonthOffsetEnum enumeration) + throws IOException { + jsonWriter.value(enumeration.getValue()); + } + + @Override + public MonthOffsetEnum read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + return MonthOffsetEnum.fromValue(value); + } + } + + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + String value = jsonElement.getAsString(); + MonthOffsetEnum.fromValue(value); + } + } + + public static final String SERIALIZED_NAME_MONTH_OFFSET = "month_offset"; + + @SerializedName(SERIALIZED_NAME_MONTH_OFFSET) + @javax.annotation.Nullable + private MonthOffsetEnum monthOffset = MonthOffsetEnum.JANUARY; + + /** Specify the starting day of the week */ + @JsonAdapter(StartDayOfWeekEnum.Adapter.class) + public enum StartDayOfWeekEnum { + SUNDAY("Sunday"), + + MONDAY("Monday"), + + TUESDAY("Tuesday"), + + WEDNESDAY("Wednesday"), + + THURSDAY("Thursday"), + + FRIDAY("Friday"), + + SATURDAY("Saturday"); + + private String value; + + StartDayOfWeekEnum(String value) { + this.value = value; + } + + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + public static StartDayOfWeekEnum fromValue(String value) { + for (StartDayOfWeekEnum b : StartDayOfWeekEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + + public static class Adapter extends TypeAdapter { + @Override + public void write(final JsonWriter jsonWriter, final StartDayOfWeekEnum enumeration) + throws IOException { + jsonWriter.value(enumeration.getValue()); + } + + @Override + public StartDayOfWeekEnum read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + return StartDayOfWeekEnum.fromValue(value); + } + } + + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + String value = jsonElement.getAsString(); + StartDayOfWeekEnum.fromValue(value); + } + } + + public static final String SERIALIZED_NAME_START_DAY_OF_WEEK = "start_day_of_week"; + + @SerializedName(SERIALIZED_NAME_START_DAY_OF_WEEK) + @javax.annotation.Nullable + private StartDayOfWeekEnum startDayOfWeek = StartDayOfWeekEnum.SUNDAY; + + public static final String SERIALIZED_NAME_QUARTER_NAME_PREFIX = "quarter_name_prefix"; + + @SerializedName(SERIALIZED_NAME_QUARTER_NAME_PREFIX) + @javax.annotation.Nullable + private String quarterNamePrefix = ""; + + public static final String SERIALIZED_NAME_YEAR_NAME_PREFIX = "year_name_prefix"; + + @SerializedName(SERIALIZED_NAME_YEAR_NAME_PREFIX) + @javax.annotation.Nullable + private String yearNamePrefix = ""; + + public UpdateCalendarRequest() {} + + public UpdateCalendarRequest updateMethod( + @javax.annotation.Nullable UpdateMethodEnum updateMethod) { + this.updateMethod = updateMethod; + return this; + } + + /** + * Type of update operation. + * + * @return updateMethod + */ + @javax.annotation.Nullable + public UpdateMethodEnum getUpdateMethod() { + return updateMethod; + } + + public void setUpdateMethod(@javax.annotation.Nullable UpdateMethodEnum updateMethod) { + this.updateMethod = updateMethod; + } + + public UpdateCalendarRequest tableReference( + @javax.annotation.Nonnull ExternalTableInput tableReference) { + this.tableReference = tableReference; + return this; + } + + /** + * Table reference containing connection identifier and table details in this format: + * `{\"connection_identifier\":\"conn1\", + * \"database_name\":\"db1\", \"schema_name\":\"sc1\", + * \"table_name\":\"tb1\"}`. + * + * @return tableReference + */ + @javax.annotation.Nonnull + public ExternalTableInput getTableReference() { + return tableReference; + } + + public void setTableReference(@javax.annotation.Nonnull ExternalTableInput tableReference) { + this.tableReference = tableReference; + } + + public UpdateCalendarRequest startDate(@javax.annotation.Nullable String startDate) { + this.startDate = startDate; + return this; + } + + /** + * Start date for the calendar in `MM/dd/yyyy` format. This parameter is mandatory if + * `update_method` is set as `FROM_INPUT_PARAMS`. + * + * @return startDate + */ + @javax.annotation.Nullable + public String getStartDate() { + return startDate; + } + + public void setStartDate(@javax.annotation.Nullable String startDate) { + this.startDate = startDate; + } + + public UpdateCalendarRequest endDate(@javax.annotation.Nullable String endDate) { + this.endDate = endDate; + return this; + } + + /** + * End date for the calendar in `MM/dd/yyyy` format. This parameter is mandatory if + * `update_method` is set as `FROM_INPUT_PARAMS`. + * + * @return endDate + */ + @javax.annotation.Nullable + public String getEndDate() { + return endDate; + } + + public void setEndDate(@javax.annotation.Nullable String endDate) { + this.endDate = endDate; + } + + public UpdateCalendarRequest calendarType( + @javax.annotation.Nullable CalendarTypeEnum calendarType) { + this.calendarType = calendarType; + return this; + } + + /** + * Type of the calendar. + * + * @return calendarType + */ + @javax.annotation.Nullable + public CalendarTypeEnum getCalendarType() { + return calendarType; + } + + public void setCalendarType(@javax.annotation.Nullable CalendarTypeEnum calendarType) { + this.calendarType = calendarType; + } + + public UpdateCalendarRequest monthOffset( + @javax.annotation.Nullable MonthOffsetEnum monthOffset) { + this.monthOffset = monthOffset; + return this; + } + + /** + * Specify the month in which the fiscal or custom calendar year should start. For example, if + * you set `month_offset` to \"April\", the custom calendar will treat + * \"April\" as the first month of the year, and the related attributes such as + * quarters and start date will be based on this offset. The default value is + * `January`, which represents the standard calendar year (January to December). + * + * @return monthOffset + */ + @javax.annotation.Nullable + public MonthOffsetEnum getMonthOffset() { + return monthOffset; + } + + public void setMonthOffset(@javax.annotation.Nullable MonthOffsetEnum monthOffset) { + this.monthOffset = monthOffset; + } + + public UpdateCalendarRequest startDayOfWeek( + @javax.annotation.Nullable StartDayOfWeekEnum startDayOfWeek) { + this.startDayOfWeek = startDayOfWeek; + return this; + } + + /** + * Specify the starting day of the week + * + * @return startDayOfWeek + */ + @javax.annotation.Nullable + public StartDayOfWeekEnum getStartDayOfWeek() { + return startDayOfWeek; + } + + public void setStartDayOfWeek(@javax.annotation.Nullable StartDayOfWeekEnum startDayOfWeek) { + this.startDayOfWeek = startDayOfWeek; + } + + public UpdateCalendarRequest quarterNamePrefix( + @javax.annotation.Nullable String quarterNamePrefix) { + this.quarterNamePrefix = quarterNamePrefix; + return this; + } + + /** + * Prefix to add before the quarter. + * + * @return quarterNamePrefix + */ + @javax.annotation.Nullable + public String getQuarterNamePrefix() { + return quarterNamePrefix; + } + + public void setQuarterNamePrefix(@javax.annotation.Nullable String quarterNamePrefix) { + this.quarterNamePrefix = quarterNamePrefix; + } + + public UpdateCalendarRequest yearNamePrefix(@javax.annotation.Nullable String yearNamePrefix) { + this.yearNamePrefix = yearNamePrefix; + return this; + } + + /** + * Prefix to add before the year. + * + * @return yearNamePrefix + */ + @javax.annotation.Nullable + public String getYearNamePrefix() { + return yearNamePrefix; + } + + public void setYearNamePrefix(@javax.annotation.Nullable String yearNamePrefix) { + this.yearNamePrefix = yearNamePrefix; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key name of the property + * @param value value of the property + * @return the UpdateCalendarRequest instance itself + */ + public UpdateCalendarRequest putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return a map of objects + */ + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key name of the property + * @return an object + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + UpdateCalendarRequest updateCalendarRequest = (UpdateCalendarRequest) o; + return Objects.equals(this.updateMethod, updateCalendarRequest.updateMethod) + && Objects.equals(this.tableReference, updateCalendarRequest.tableReference) + && Objects.equals(this.startDate, updateCalendarRequest.startDate) + && Objects.equals(this.endDate, updateCalendarRequest.endDate) + && Objects.equals(this.calendarType, updateCalendarRequest.calendarType) + && Objects.equals(this.monthOffset, updateCalendarRequest.monthOffset) + && Objects.equals(this.startDayOfWeek, updateCalendarRequest.startDayOfWeek) + && Objects.equals(this.quarterNamePrefix, updateCalendarRequest.quarterNamePrefix) + && Objects.equals(this.yearNamePrefix, updateCalendarRequest.yearNamePrefix) + && Objects.equals( + this.additionalProperties, updateCalendarRequest.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash( + updateMethod, + tableReference, + startDate, + endDate, + calendarType, + monthOffset, + startDayOfWeek, + quarterNamePrefix, + yearNamePrefix, + additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class UpdateCalendarRequest {\n"); + sb.append(" updateMethod: ").append(toIndentedString(updateMethod)).append("\n"); + sb.append(" tableReference: ").append(toIndentedString(tableReference)).append("\n"); + sb.append(" startDate: ").append(toIndentedString(startDate)).append("\n"); + sb.append(" endDate: ").append(toIndentedString(endDate)).append("\n"); + sb.append(" calendarType: ").append(toIndentedString(calendarType)).append("\n"); + sb.append(" monthOffset: ").append(toIndentedString(monthOffset)).append("\n"); + sb.append(" startDayOfWeek: ").append(toIndentedString(startDayOfWeek)).append("\n"); + sb.append(" quarterNamePrefix: ") + .append(toIndentedString(quarterNamePrefix)) + .append("\n"); + sb.append(" yearNamePrefix: ").append(toIndentedString(yearNamePrefix)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first + * line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("update_method"); + openapiFields.add("table_reference"); + openapiFields.add("start_date"); + openapiFields.add("end_date"); + openapiFields.add("calendar_type"); + openapiFields.add("month_offset"); + openapiFields.add("start_day_of_week"); + openapiFields.add("quarter_name_prefix"); + openapiFields.add("year_name_prefix"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + openapiRequiredFields.add("table_reference"); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to UpdateCalendarRequest + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!UpdateCalendarRequest.openapiRequiredFields + .isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException( + String.format( + "The required field(s) %s in UpdateCalendarRequest is not found in" + + " the empty JSON string", + UpdateCalendarRequest.openapiRequiredFields.toString())); + } + } + + // check to make sure all required properties/fields are present in the JSON string + for (String requiredField : UpdateCalendarRequest.openapiRequiredFields) { + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException( + String.format( + "The required field `%s` is not found in the JSON string: %s", + requiredField, jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if ((jsonObj.get("update_method") != null && !jsonObj.get("update_method").isJsonNull()) + && !jsonObj.get("update_method").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `update_method` to be a primitive type in the JSON" + + " string but got `%s`", + jsonObj.get("update_method").toString())); + } + // validate the optional field `update_method` + if (jsonObj.get("update_method") != null && !jsonObj.get("update_method").isJsonNull()) { + UpdateMethodEnum.validateJsonElement(jsonObj.get("update_method")); + } + // validate the required field `table_reference` + ExternalTableInput.validateJsonElement(jsonObj.get("table_reference")); + if ((jsonObj.get("start_date") != null && !jsonObj.get("start_date").isJsonNull()) + && !jsonObj.get("start_date").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `start_date` to be a primitive type in the JSON" + + " string but got `%s`", + jsonObj.get("start_date").toString())); + } + if ((jsonObj.get("end_date") != null && !jsonObj.get("end_date").isJsonNull()) + && !jsonObj.get("end_date").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `end_date` to be a primitive type in the JSON" + + " string but got `%s`", + jsonObj.get("end_date").toString())); + } + if ((jsonObj.get("calendar_type") != null && !jsonObj.get("calendar_type").isJsonNull()) + && !jsonObj.get("calendar_type").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `calendar_type` to be a primitive type in the JSON" + + " string but got `%s`", + jsonObj.get("calendar_type").toString())); + } + // validate the optional field `calendar_type` + if (jsonObj.get("calendar_type") != null && !jsonObj.get("calendar_type").isJsonNull()) { + CalendarTypeEnum.validateJsonElement(jsonObj.get("calendar_type")); + } + if ((jsonObj.get("month_offset") != null && !jsonObj.get("month_offset").isJsonNull()) + && !jsonObj.get("month_offset").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `month_offset` to be a primitive type in the JSON" + + " string but got `%s`", + jsonObj.get("month_offset").toString())); + } + // validate the optional field `month_offset` + if (jsonObj.get("month_offset") != null && !jsonObj.get("month_offset").isJsonNull()) { + MonthOffsetEnum.validateJsonElement(jsonObj.get("month_offset")); + } + if ((jsonObj.get("start_day_of_week") != null + && !jsonObj.get("start_day_of_week").isJsonNull()) + && !jsonObj.get("start_day_of_week").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `start_day_of_week` to be a primitive type in the" + + " JSON string but got `%s`", + jsonObj.get("start_day_of_week").toString())); + } + // validate the optional field `start_day_of_week` + if (jsonObj.get("start_day_of_week") != null + && !jsonObj.get("start_day_of_week").isJsonNull()) { + StartDayOfWeekEnum.validateJsonElement(jsonObj.get("start_day_of_week")); + } + if ((jsonObj.get("quarter_name_prefix") != null + && !jsonObj.get("quarter_name_prefix").isJsonNull()) + && !jsonObj.get("quarter_name_prefix").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `quarter_name_prefix` to be a primitive type in" + + " the JSON string but got `%s`", + jsonObj.get("quarter_name_prefix").toString())); + } + if ((jsonObj.get("year_name_prefix") != null + && !jsonObj.get("year_name_prefix").isJsonNull()) + && !jsonObj.get("year_name_prefix").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `year_name_prefix` to be a primitive type in the" + + " JSON string but got `%s`", + jsonObj.get("year_name_prefix").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!UpdateCalendarRequest.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'UpdateCalendarRequest' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter = + gson.getDelegateAdapter(this, TypeToken.get(UpdateCalendarRequest.class)); + + return (TypeAdapter) + new TypeAdapter() { + @Override + public void write(JsonWriter out, UpdateCalendarRequest value) + throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + obj.remove("additionalProperties"); + // serialize additional properties + if (value.getAdditionalProperties() != null) { + for (Map.Entry entry : + value.getAdditionalProperties().entrySet()) { + if (entry.getValue() instanceof String) + obj.addProperty(entry.getKey(), (String) entry.getValue()); + else if (entry.getValue() instanceof Number) + obj.addProperty(entry.getKey(), (Number) entry.getValue()); + else if (entry.getValue() instanceof Boolean) + obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); + else if (entry.getValue() instanceof Character) + obj.addProperty( + entry.getKey(), (Character) entry.getValue()); + else { + JsonElement jsonElement = gson.toJsonTree(entry.getValue()); + if (jsonElement.isJsonArray()) { + obj.add(entry.getKey(), jsonElement.getAsJsonArray()); + } else { + obj.add(entry.getKey(), jsonElement.getAsJsonObject()); + } + } + } + } + elementAdapter.write(out, obj); + } + + @Override + public UpdateCalendarRequest read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // store additional fields in the deserialized instance + UpdateCalendarRequest instance = thisAdapter.fromJsonTree(jsonObj); + for (Map.Entry entry : jsonObj.entrySet()) { + if (!openapiFields.contains(entry.getKey())) { + if (entry.getValue().isJsonPrimitive()) { // primitive type + if (entry.getValue().getAsJsonPrimitive().isString()) + instance.putAdditionalProperty( + entry.getKey(), entry.getValue().getAsString()); + else if (entry.getValue().getAsJsonPrimitive().isNumber()) + instance.putAdditionalProperty( + entry.getKey(), entry.getValue().getAsNumber()); + else if (entry.getValue().getAsJsonPrimitive().isBoolean()) + instance.putAdditionalProperty( + entry.getKey(), + entry.getValue().getAsBoolean()); + else + throw new IllegalArgumentException( + String.format( + "The field `%s` has unknown primitive" + + " type. Value: %s", + entry.getKey(), + entry.getValue().toString())); + } else if (entry.getValue().isJsonArray()) { + instance.putAdditionalProperty( + entry.getKey(), + gson.fromJson(entry.getValue(), List.class)); + } else { // JSON object + instance.putAdditionalProperty( + entry.getKey(), + gson.fromJson(entry.getValue(), HashMap.class)); + } + } + } + return instance; + } + }.nullSafe(); + } + } + + /** + * Create an instance of UpdateCalendarRequest given an JSON string + * + * @param jsonString JSON string + * @return An instance of UpdateCalendarRequest + * @throws IOException if the JSON string is invalid with respect to UpdateCalendarRequest + */ + public static UpdateCalendarRequest fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, UpdateCalendarRequest.class); + } + + /** + * Convert an instance of UpdateCalendarRequest to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} diff --git a/sdks/java/src/main/java/com/thoughtspot/client/model/UpdateCollectionRequest.java b/sdks/java/src/main/java/com/thoughtspot/client/model/UpdateCollectionRequest.java new file mode 100644 index 000000000..5d45d1230 --- /dev/null +++ b/sdks/java/src/main/java/com/thoughtspot/client/model/UpdateCollectionRequest.java @@ -0,0 +1,481 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client.model; + +import com.google.gson.Gson; +import com.google.gson.JsonArray; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.TypeAdapter; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.reflect.TypeToken; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import com.thoughtspot.client.JSON; +import java.io.IOException; +import java.io.Serializable; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Objects; + +/** UpdateCollectionRequest */ +@javax.annotation.Generated( + value = "org.openapitools.codegen.languages.JavaClientCodegen", + comments = "Generator version: 7.12.0") +public class UpdateCollectionRequest implements Serializable { + private static final long serialVersionUID = 1L; + + public static final String SERIALIZED_NAME_NAME = "name"; + + @SerializedName(SERIALIZED_NAME_NAME) + @javax.annotation.Nullable + private String name; + + public static final String SERIALIZED_NAME_DESCRIPTION = "description"; + + @SerializedName(SERIALIZED_NAME_DESCRIPTION) + @javax.annotation.Nullable + private String description; + + public static final String SERIALIZED_NAME_METADATA = "metadata"; + + @SerializedName(SERIALIZED_NAME_METADATA) + @javax.annotation.Nullable + private List metadata; + + /** Type of update operation. Default operation type is REPLACE. */ + @JsonAdapter(OperationEnum.Adapter.class) + public enum OperationEnum { + ADD("ADD"), + + REMOVE("REMOVE"), + + REPLACE("REPLACE"); + + private String value; + + OperationEnum(String value) { + this.value = value; + } + + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + public static OperationEnum fromValue(String value) { + for (OperationEnum b : OperationEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + + public static class Adapter extends TypeAdapter { + @Override + public void write(final JsonWriter jsonWriter, final OperationEnum enumeration) + throws IOException { + jsonWriter.value(enumeration.getValue()); + } + + @Override + public OperationEnum read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + return OperationEnum.fromValue(value); + } + } + + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + String value = jsonElement.getAsString(); + OperationEnum.fromValue(value); + } + } + + public static final String SERIALIZED_NAME_OPERATION = "operation"; + + @SerializedName(SERIALIZED_NAME_OPERATION) + @javax.annotation.Nullable + private OperationEnum operation = OperationEnum.REPLACE; + + public UpdateCollectionRequest() {} + + public UpdateCollectionRequest name(@javax.annotation.Nullable String name) { + this.name = name; + return this; + } + + /** + * Name of the collection. + * + * @return name + */ + @javax.annotation.Nullable + public String getName() { + return name; + } + + public void setName(@javax.annotation.Nullable String name) { + this.name = name; + } + + public UpdateCollectionRequest description(@javax.annotation.Nullable String description) { + this.description = description; + return this; + } + + /** + * Description of the collection. + * + * @return description + */ + @javax.annotation.Nullable + public String getDescription() { + return description; + } + + public void setDescription(@javax.annotation.Nullable String description) { + this.description = description; + } + + public UpdateCollectionRequest metadata( + @javax.annotation.Nullable List metadata) { + this.metadata = metadata; + return this; + } + + public UpdateCollectionRequest addMetadataItem(CollectionMetadataInput metadataItem) { + if (this.metadata == null) { + this.metadata = new ArrayList<>(); + } + this.metadata.add(metadataItem); + return this; + } + + /** + * Metadata objects to add, remove, or replace in the collection. + * + * @return metadata + */ + @javax.annotation.Nullable + public List getMetadata() { + return metadata; + } + + public void setMetadata(@javax.annotation.Nullable List metadata) { + this.metadata = metadata; + } + + public UpdateCollectionRequest operation(@javax.annotation.Nullable OperationEnum operation) { + this.operation = operation; + return this; + } + + /** + * Type of update operation. Default operation type is REPLACE. + * + * @return operation + */ + @javax.annotation.Nullable + public OperationEnum getOperation() { + return operation; + } + + public void setOperation(@javax.annotation.Nullable OperationEnum operation) { + this.operation = operation; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key name of the property + * @param value value of the property + * @return the UpdateCollectionRequest instance itself + */ + public UpdateCollectionRequest putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return a map of objects + */ + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key name of the property + * @return an object + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + UpdateCollectionRequest updateCollectionRequest = (UpdateCollectionRequest) o; + return Objects.equals(this.name, updateCollectionRequest.name) + && Objects.equals(this.description, updateCollectionRequest.description) + && Objects.equals(this.metadata, updateCollectionRequest.metadata) + && Objects.equals(this.operation, updateCollectionRequest.operation) + && Objects.equals( + this.additionalProperties, updateCollectionRequest.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(name, description, metadata, operation, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class UpdateCollectionRequest {\n"); + sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append(" description: ").append(toIndentedString(description)).append("\n"); + sb.append(" metadata: ").append(toIndentedString(metadata)).append("\n"); + sb.append(" operation: ").append(toIndentedString(operation)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first + * line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("name"); + openapiFields.add("description"); + openapiFields.add("metadata"); + openapiFields.add("operation"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to UpdateCollectionRequest + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!UpdateCollectionRequest.openapiRequiredFields + .isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException( + String.format( + "The required field(s) %s in UpdateCollectionRequest is not found" + + " in the empty JSON string", + UpdateCollectionRequest.openapiRequiredFields.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if ((jsonObj.get("name") != null && !jsonObj.get("name").isJsonNull()) + && !jsonObj.get("name").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `name` to be a primitive type in the JSON string" + + " but got `%s`", + jsonObj.get("name").toString())); + } + if ((jsonObj.get("description") != null && !jsonObj.get("description").isJsonNull()) + && !jsonObj.get("description").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `description` to be a primitive type in the JSON" + + " string but got `%s`", + jsonObj.get("description").toString())); + } + if (jsonObj.get("metadata") != null && !jsonObj.get("metadata").isJsonNull()) { + JsonArray jsonArraymetadata = jsonObj.getAsJsonArray("metadata"); + if (jsonArraymetadata != null) { + // ensure the json data is an array + if (!jsonObj.get("metadata").isJsonArray()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `metadata` to be an array in the JSON" + + " string but got `%s`", + jsonObj.get("metadata").toString())); + } + + // validate the optional field `metadata` (array) + for (int i = 0; i < jsonArraymetadata.size(); i++) { + CollectionMetadataInput.validateJsonElement(jsonArraymetadata.get(i)); + } + ; + } + } + if ((jsonObj.get("operation") != null && !jsonObj.get("operation").isJsonNull()) + && !jsonObj.get("operation").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `operation` to be a primitive type in the JSON" + + " string but got `%s`", + jsonObj.get("operation").toString())); + } + // validate the optional field `operation` + if (jsonObj.get("operation") != null && !jsonObj.get("operation").isJsonNull()) { + OperationEnum.validateJsonElement(jsonObj.get("operation")); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!UpdateCollectionRequest.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'UpdateCollectionRequest' and its + // subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter = + gson.getDelegateAdapter(this, TypeToken.get(UpdateCollectionRequest.class)); + + return (TypeAdapter) + new TypeAdapter() { + @Override + public void write(JsonWriter out, UpdateCollectionRequest value) + throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + obj.remove("additionalProperties"); + // serialize additional properties + if (value.getAdditionalProperties() != null) { + for (Map.Entry entry : + value.getAdditionalProperties().entrySet()) { + if (entry.getValue() instanceof String) + obj.addProperty(entry.getKey(), (String) entry.getValue()); + else if (entry.getValue() instanceof Number) + obj.addProperty(entry.getKey(), (Number) entry.getValue()); + else if (entry.getValue() instanceof Boolean) + obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); + else if (entry.getValue() instanceof Character) + obj.addProperty( + entry.getKey(), (Character) entry.getValue()); + else { + JsonElement jsonElement = gson.toJsonTree(entry.getValue()); + if (jsonElement.isJsonArray()) { + obj.add(entry.getKey(), jsonElement.getAsJsonArray()); + } else { + obj.add(entry.getKey(), jsonElement.getAsJsonObject()); + } + } + } + } + elementAdapter.write(out, obj); + } + + @Override + public UpdateCollectionRequest read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // store additional fields in the deserialized instance + UpdateCollectionRequest instance = thisAdapter.fromJsonTree(jsonObj); + for (Map.Entry entry : jsonObj.entrySet()) { + if (!openapiFields.contains(entry.getKey())) { + if (entry.getValue().isJsonPrimitive()) { // primitive type + if (entry.getValue().getAsJsonPrimitive().isString()) + instance.putAdditionalProperty( + entry.getKey(), entry.getValue().getAsString()); + else if (entry.getValue().getAsJsonPrimitive().isNumber()) + instance.putAdditionalProperty( + entry.getKey(), entry.getValue().getAsNumber()); + else if (entry.getValue().getAsJsonPrimitive().isBoolean()) + instance.putAdditionalProperty( + entry.getKey(), + entry.getValue().getAsBoolean()); + else + throw new IllegalArgumentException( + String.format( + "The field `%s` has unknown primitive" + + " type. Value: %s", + entry.getKey(), + entry.getValue().toString())); + } else if (entry.getValue().isJsonArray()) { + instance.putAdditionalProperty( + entry.getKey(), + gson.fromJson(entry.getValue(), List.class)); + } else { // JSON object + instance.putAdditionalProperty( + entry.getKey(), + gson.fromJson(entry.getValue(), HashMap.class)); + } + } + } + return instance; + } + }.nullSafe(); + } + } + + /** + * Create an instance of UpdateCollectionRequest given an JSON string + * + * @param jsonString JSON string + * @return An instance of UpdateCollectionRequest + * @throws IOException if the JSON string is invalid with respect to UpdateCollectionRequest + */ + public static UpdateCollectionRequest fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, UpdateCollectionRequest.class); + } + + /** + * Convert an instance of UpdateCollectionRequest to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} diff --git a/sdks/java/src/main/java/com/thoughtspot/client/model/UpdateColumnSecurityRulesRequest.java b/sdks/java/src/main/java/com/thoughtspot/client/model/UpdateColumnSecurityRulesRequest.java new file mode 100644 index 000000000..fbba698e2 --- /dev/null +++ b/sdks/java/src/main/java/com/thoughtspot/client/model/UpdateColumnSecurityRulesRequest.java @@ -0,0 +1,458 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client.model; + +import com.google.gson.Gson; +import com.google.gson.JsonArray; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.TypeAdapter; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.annotations.SerializedName; +import com.google.gson.reflect.TypeToken; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import com.thoughtspot.client.JSON; +import java.io.IOException; +import java.io.Serializable; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Objects; +import org.openapitools.jackson.nullable.JsonNullable; + +/** UpdateColumnSecurityRulesRequest */ +@javax.annotation.Generated( + value = "org.openapitools.codegen.languages.JavaClientCodegen", + comments = "Generator version: 7.12.0") +public class UpdateColumnSecurityRulesRequest implements Serializable { + private static final long serialVersionUID = 1L; + + public static final String SERIALIZED_NAME_IDENTIFIER = "identifier"; + + @SerializedName(SERIALIZED_NAME_IDENTIFIER) + @javax.annotation.Nullable + private String identifier; + + public static final String SERIALIZED_NAME_OBJ_IDENTIFIER = "obj_identifier"; + + @SerializedName(SERIALIZED_NAME_OBJ_IDENTIFIER) + @javax.annotation.Nullable + private String objIdentifier; + + public static final String SERIALIZED_NAME_CLEAR_CSR = "clear_csr"; + + @SerializedName(SERIALIZED_NAME_CLEAR_CSR) + @javax.annotation.Nullable + private Boolean clearCsr; + + public static final String SERIALIZED_NAME_COLUMN_SECURITY_RULES = "column_security_rules"; + + @SerializedName(SERIALIZED_NAME_COLUMN_SECURITY_RULES) + @javax.annotation.Nonnull + private List columnSecurityRules; + + public UpdateColumnSecurityRulesRequest() {} + + public UpdateColumnSecurityRulesRequest identifier( + @javax.annotation.Nullable String identifier) { + this.identifier = identifier; + return this; + } + + /** + * GUID or name of the table for which we want to create column security rules + * + * @return identifier + */ + @javax.annotation.Nullable + public String getIdentifier() { + return identifier; + } + + public void setIdentifier(@javax.annotation.Nullable String identifier) { + this.identifier = identifier; + } + + public UpdateColumnSecurityRulesRequest objIdentifier( + @javax.annotation.Nullable String objIdentifier) { + this.objIdentifier = objIdentifier; + return this; + } + + /** + * The object ID of the table + * + * @return objIdentifier + */ + @javax.annotation.Nullable + public String getObjIdentifier() { + return objIdentifier; + } + + public void setObjIdentifier(@javax.annotation.Nullable String objIdentifier) { + this.objIdentifier = objIdentifier; + } + + public UpdateColumnSecurityRulesRequest clearCsr(@javax.annotation.Nullable Boolean clearCsr) { + this.clearCsr = clearCsr; + return this; + } + + /** + * If true, then all the secured columns will be marked as unprotected, and all the group + * associations will be removed + * + * @return clearCsr + */ + @javax.annotation.Nullable + public Boolean getClearCsr() { + return clearCsr; + } + + public void setClearCsr(@javax.annotation.Nullable Boolean clearCsr) { + this.clearCsr = clearCsr; + } + + public UpdateColumnSecurityRulesRequest columnSecurityRules( + @javax.annotation.Nonnull List columnSecurityRules) { + this.columnSecurityRules = columnSecurityRules; + return this; + } + + public UpdateColumnSecurityRulesRequest addColumnSecurityRulesItem( + ColumnSecurityRuleUpdate columnSecurityRulesItem) { + if (this.columnSecurityRules == null) { + this.columnSecurityRules = new ArrayList<>(); + } + this.columnSecurityRules.add(columnSecurityRulesItem); + return this; + } + + /** + * Array where each object defines the security rule for a specific column + * + * @return columnSecurityRules + */ + @javax.annotation.Nonnull + public List getColumnSecurityRules() { + return columnSecurityRules; + } + + public void setColumnSecurityRules( + @javax.annotation.Nonnull List columnSecurityRules) { + this.columnSecurityRules = columnSecurityRules; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key name of the property + * @param value value of the property + * @return the UpdateColumnSecurityRulesRequest instance itself + */ + public UpdateColumnSecurityRulesRequest putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return a map of objects + */ + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key name of the property + * @return an object + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + UpdateColumnSecurityRulesRequest updateColumnSecurityRulesRequest = + (UpdateColumnSecurityRulesRequest) o; + return Objects.equals(this.identifier, updateColumnSecurityRulesRequest.identifier) + && Objects.equals( + this.objIdentifier, updateColumnSecurityRulesRequest.objIdentifier) + && Objects.equals(this.clearCsr, updateColumnSecurityRulesRequest.clearCsr) + && Objects.equals( + this.columnSecurityRules, + updateColumnSecurityRulesRequest.columnSecurityRules) + && Objects.equals( + this.additionalProperties, + updateColumnSecurityRulesRequest.additionalProperties); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b + || (a != null + && b != null + && a.isPresent() + && b.isPresent() + && Objects.deepEquals(a.get(), b.get())); + } + + @Override + public int hashCode() { + return Objects.hash( + identifier, objIdentifier, clearCsr, columnSecurityRules, additionalProperties); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; + } + return a.isPresent() ? Arrays.deepHashCode(new Object[] {a.get()}) : 31; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class UpdateColumnSecurityRulesRequest {\n"); + sb.append(" identifier: ").append(toIndentedString(identifier)).append("\n"); + sb.append(" objIdentifier: ").append(toIndentedString(objIdentifier)).append("\n"); + sb.append(" clearCsr: ").append(toIndentedString(clearCsr)).append("\n"); + sb.append(" columnSecurityRules: ") + .append(toIndentedString(columnSecurityRules)) + .append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first + * line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("identifier"); + openapiFields.add("obj_identifier"); + openapiFields.add("clear_csr"); + openapiFields.add("column_security_rules"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + openapiRequiredFields.add("column_security_rules"); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to + * UpdateColumnSecurityRulesRequest + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!UpdateColumnSecurityRulesRequest.openapiRequiredFields + .isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException( + String.format( + "The required field(s) %s in UpdateColumnSecurityRulesRequest is" + + " not found in the empty JSON string", + UpdateColumnSecurityRulesRequest.openapiRequiredFields.toString())); + } + } + + // check to make sure all required properties/fields are present in the JSON string + for (String requiredField : UpdateColumnSecurityRulesRequest.openapiRequiredFields) { + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException( + String.format( + "The required field `%s` is not found in the JSON string: %s", + requiredField, jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if ((jsonObj.get("identifier") != null && !jsonObj.get("identifier").isJsonNull()) + && !jsonObj.get("identifier").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `identifier` to be a primitive type in the JSON" + + " string but got `%s`", + jsonObj.get("identifier").toString())); + } + if ((jsonObj.get("obj_identifier") != null && !jsonObj.get("obj_identifier").isJsonNull()) + && !jsonObj.get("obj_identifier").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `obj_identifier` to be a primitive type in the" + + " JSON string but got `%s`", + jsonObj.get("obj_identifier").toString())); + } + // ensure the json data is an array + if (!jsonObj.get("column_security_rules").isJsonArray()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `column_security_rules` to be an array in the JSON" + + " string but got `%s`", + jsonObj.get("column_security_rules").toString())); + } + + JsonArray jsonArraycolumnSecurityRules = jsonObj.getAsJsonArray("column_security_rules"); + // validate the required field `column_security_rules` (array) + for (int i = 0; i < jsonArraycolumnSecurityRules.size(); i++) { + ColumnSecurityRuleUpdate.validateJsonElement(jsonArraycolumnSecurityRules.get(i)); + } + ; + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!UpdateColumnSecurityRulesRequest.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'UpdateColumnSecurityRulesRequest' and + // its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter = + gson.getDelegateAdapter( + this, TypeToken.get(UpdateColumnSecurityRulesRequest.class)); + + return (TypeAdapter) + new TypeAdapter() { + @Override + public void write(JsonWriter out, UpdateColumnSecurityRulesRequest value) + throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + obj.remove("additionalProperties"); + // serialize additional properties + if (value.getAdditionalProperties() != null) { + for (Map.Entry entry : + value.getAdditionalProperties().entrySet()) { + if (entry.getValue() instanceof String) + obj.addProperty(entry.getKey(), (String) entry.getValue()); + else if (entry.getValue() instanceof Number) + obj.addProperty(entry.getKey(), (Number) entry.getValue()); + else if (entry.getValue() instanceof Boolean) + obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); + else if (entry.getValue() instanceof Character) + obj.addProperty( + entry.getKey(), (Character) entry.getValue()); + else { + JsonElement jsonElement = gson.toJsonTree(entry.getValue()); + if (jsonElement.isJsonArray()) { + obj.add(entry.getKey(), jsonElement.getAsJsonArray()); + } else { + obj.add(entry.getKey(), jsonElement.getAsJsonObject()); + } + } + } + } + elementAdapter.write(out, obj); + } + + @Override + public UpdateColumnSecurityRulesRequest read(JsonReader in) + throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // store additional fields in the deserialized instance + UpdateColumnSecurityRulesRequest instance = + thisAdapter.fromJsonTree(jsonObj); + for (Map.Entry entry : jsonObj.entrySet()) { + if (!openapiFields.contains(entry.getKey())) { + if (entry.getValue().isJsonPrimitive()) { // primitive type + if (entry.getValue().getAsJsonPrimitive().isString()) + instance.putAdditionalProperty( + entry.getKey(), entry.getValue().getAsString()); + else if (entry.getValue().getAsJsonPrimitive().isNumber()) + instance.putAdditionalProperty( + entry.getKey(), entry.getValue().getAsNumber()); + else if (entry.getValue().getAsJsonPrimitive().isBoolean()) + instance.putAdditionalProperty( + entry.getKey(), + entry.getValue().getAsBoolean()); + else + throw new IllegalArgumentException( + String.format( + "The field `%s` has unknown primitive" + + " type. Value: %s", + entry.getKey(), + entry.getValue().toString())); + } else if (entry.getValue().isJsonArray()) { + instance.putAdditionalProperty( + entry.getKey(), + gson.fromJson(entry.getValue(), List.class)); + } else { // JSON object + instance.putAdditionalProperty( + entry.getKey(), + gson.fromJson(entry.getValue(), HashMap.class)); + } + } + } + return instance; + } + }.nullSafe(); + } + } + + /** + * Create an instance of UpdateColumnSecurityRulesRequest given an JSON string + * + * @param jsonString JSON string + * @return An instance of UpdateColumnSecurityRulesRequest + * @throws IOException if the JSON string is invalid with respect to + * UpdateColumnSecurityRulesRequest + */ + public static UpdateColumnSecurityRulesRequest fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, UpdateColumnSecurityRulesRequest.class); + } + + /** + * Convert an instance of UpdateColumnSecurityRulesRequest to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} diff --git a/sdks/java/src/main/java/com/thoughtspot/client/model/UpdateConfigRequest.java b/sdks/java/src/main/java/com/thoughtspot/client/model/UpdateConfigRequest.java new file mode 100644 index 000000000..4280bbd06 --- /dev/null +++ b/sdks/java/src/main/java/com/thoughtspot/client/model/UpdateConfigRequest.java @@ -0,0 +1,554 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client.model; + +import com.google.gson.Gson; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.TypeAdapter; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.annotations.SerializedName; +import com.google.gson.reflect.TypeToken; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import com.thoughtspot.client.JSON; +import java.io.IOException; +import java.io.Serializable; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Objects; +import org.openapitools.jackson.nullable.JsonNullable; + +/** UpdateConfigRequest */ +@javax.annotation.Generated( + value = "org.openapitools.codegen.languages.JavaClientCodegen", + comments = "Generator version: 7.12.0") +public class UpdateConfigRequest implements Serializable { + private static final long serialVersionUID = 1L; + + public static final String SERIALIZED_NAME_USERNAME = "username"; + + @SerializedName(SERIALIZED_NAME_USERNAME) + @javax.annotation.Nullable + private String username; + + public static final String SERIALIZED_NAME_ACCESS_TOKEN = "access_token"; + + @SerializedName(SERIALIZED_NAME_ACCESS_TOKEN) + @javax.annotation.Nullable + private String accessToken; + + public static final String SERIALIZED_NAME_ORG_IDENTIFIER = "org_identifier"; + + @SerializedName(SERIALIZED_NAME_ORG_IDENTIFIER) + @javax.annotation.Nullable + private String orgIdentifier; + + public static final String SERIALIZED_NAME_BRANCH_NAMES = "branch_names"; + + @SerializedName(SERIALIZED_NAME_BRANCH_NAMES) + @javax.annotation.Nullable + private List branchNames; + + public static final String SERIALIZED_NAME_COMMIT_BRANCH_NAME = "commit_branch_name"; + + @SerializedName(SERIALIZED_NAME_COMMIT_BRANCH_NAME) + @javax.annotation.Nullable + private String commitBranchName; + + public static final String SERIALIZED_NAME_ENABLE_GUID_MAPPING = "enable_guid_mapping"; + + @SerializedName(SERIALIZED_NAME_ENABLE_GUID_MAPPING) + @javax.annotation.Nullable + private Boolean enableGuidMapping; + + public static final String SERIALIZED_NAME_CONFIGURATION_BRANCH_NAME = + "configuration_branch_name"; + + @SerializedName(SERIALIZED_NAME_CONFIGURATION_BRANCH_NAME) + @javax.annotation.Nullable + private String configurationBranchName; + + public UpdateConfigRequest() {} + + public UpdateConfigRequest username(@javax.annotation.Nullable String username) { + this.username = username; + return this; + } + + /** + * Username to authenticate connection to version control system + * + * @return username + */ + @javax.annotation.Nullable + public String getUsername() { + return username; + } + + public void setUsername(@javax.annotation.Nullable String username) { + this.username = username; + } + + public UpdateConfigRequest accessToken(@javax.annotation.Nullable String accessToken) { + this.accessToken = accessToken; + return this; + } + + /** + * Access token corresponding to the user to authenticate connection to version control system + * + * @return accessToken + */ + @javax.annotation.Nullable + public String getAccessToken() { + return accessToken; + } + + public void setAccessToken(@javax.annotation.Nullable String accessToken) { + this.accessToken = accessToken; + } + + public UpdateConfigRequest orgIdentifier(@javax.annotation.Nullable String orgIdentifier) { + this.orgIdentifier = orgIdentifier; + return this; + } + + /** + * Applicable when Orgs is enabled in the cluster List of Org ids or name. Provide value -1 for + * cluster level. Example : [\"OrgID1-or-Name1\", \"OrgID2-or-Name2\"] Note: + * If no value is specified, then the configurations will be returned for all orgs the user has + * access to Version: 9.5.0.cl or later + * + * @return orgIdentifier + */ + @javax.annotation.Nullable + public String getOrgIdentifier() { + return orgIdentifier; + } + + public void setOrgIdentifier(@javax.annotation.Nullable String orgIdentifier) { + this.orgIdentifier = orgIdentifier; + } + + public UpdateConfigRequest branchNames(@javax.annotation.Nullable List branchNames) { + this.branchNames = branchNames; + return this; + } + + public UpdateConfigRequest addBranchNamesItem(String branchNamesItem) { + if (this.branchNames == null) { + this.branchNames = new ArrayList<>(); + } + this.branchNames.add(branchNamesItem); + return this; + } + + /** + * List the remote branches to configure. Example:[development, production] + * + * @return branchNames + */ + @javax.annotation.Nullable + public List getBranchNames() { + return branchNames; + } + + public void setBranchNames(@javax.annotation.Nullable List branchNames) { + this.branchNames = branchNames; + } + + public UpdateConfigRequest commitBranchName( + @javax.annotation.Nullable String commitBranchName) { + this.commitBranchName = commitBranchName; + return this; + } + + /** + * Name of the remote branch where objects from this Thoughtspot instance will be versioned. + * Version: 9.7.0.cl or later + * + * @return commitBranchName + */ + @javax.annotation.Nullable + public String getCommitBranchName() { + return commitBranchName; + } + + public void setCommitBranchName(@javax.annotation.Nullable String commitBranchName) { + this.commitBranchName = commitBranchName; + } + + public UpdateConfigRequest enableGuidMapping( + @javax.annotation.Nullable Boolean enableGuidMapping) { + this.enableGuidMapping = enableGuidMapping; + return this; + } + + /** + * Maintain mapping of guid for the deployment to an instance Version: 9.4.0.cl or later + * + * @return enableGuidMapping + */ + @javax.annotation.Nullable + public Boolean getEnableGuidMapping() { + return enableGuidMapping; + } + + public void setEnableGuidMapping(@javax.annotation.Nullable Boolean enableGuidMapping) { + this.enableGuidMapping = enableGuidMapping; + } + + public UpdateConfigRequest configurationBranchName( + @javax.annotation.Nullable String configurationBranchName) { + this.configurationBranchName = configurationBranchName; + return this; + } + + /** + * Name of the branch where the configuration files related to operations between Thoughtspot + * and version control repo should be maintained. Version: 9.7.0.cl or later + * + * @return configurationBranchName + */ + @javax.annotation.Nullable + public String getConfigurationBranchName() { + return configurationBranchName; + } + + public void setConfigurationBranchName( + @javax.annotation.Nullable String configurationBranchName) { + this.configurationBranchName = configurationBranchName; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key name of the property + * @param value value of the property + * @return the UpdateConfigRequest instance itself + */ + public UpdateConfigRequest putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return a map of objects + */ + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key name of the property + * @return an object + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + UpdateConfigRequest updateConfigRequest = (UpdateConfigRequest) o; + return Objects.equals(this.username, updateConfigRequest.username) + && Objects.equals(this.accessToken, updateConfigRequest.accessToken) + && Objects.equals(this.orgIdentifier, updateConfigRequest.orgIdentifier) + && Objects.equals(this.branchNames, updateConfigRequest.branchNames) + && Objects.equals(this.commitBranchName, updateConfigRequest.commitBranchName) + && Objects.equals(this.enableGuidMapping, updateConfigRequest.enableGuidMapping) + && Objects.equals( + this.configurationBranchName, updateConfigRequest.configurationBranchName) + && Objects.equals( + this.additionalProperties, updateConfigRequest.additionalProperties); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b + || (a != null + && b != null + && a.isPresent() + && b.isPresent() + && Objects.deepEquals(a.get(), b.get())); + } + + @Override + public int hashCode() { + return Objects.hash( + username, + accessToken, + orgIdentifier, + branchNames, + commitBranchName, + enableGuidMapping, + configurationBranchName, + additionalProperties); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; + } + return a.isPresent() ? Arrays.deepHashCode(new Object[] {a.get()}) : 31; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class UpdateConfigRequest {\n"); + sb.append(" username: ").append(toIndentedString(username)).append("\n"); + sb.append(" accessToken: ").append(toIndentedString(accessToken)).append("\n"); + sb.append(" orgIdentifier: ").append(toIndentedString(orgIdentifier)).append("\n"); + sb.append(" branchNames: ").append(toIndentedString(branchNames)).append("\n"); + sb.append(" commitBranchName: ").append(toIndentedString(commitBranchName)).append("\n"); + sb.append(" enableGuidMapping: ") + .append(toIndentedString(enableGuidMapping)) + .append("\n"); + sb.append(" configurationBranchName: ") + .append(toIndentedString(configurationBranchName)) + .append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first + * line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("username"); + openapiFields.add("access_token"); + openapiFields.add("org_identifier"); + openapiFields.add("branch_names"); + openapiFields.add("commit_branch_name"); + openapiFields.add("enable_guid_mapping"); + openapiFields.add("configuration_branch_name"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to UpdateConfigRequest + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!UpdateConfigRequest.openapiRequiredFields + .isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException( + String.format( + "The required field(s) %s in UpdateConfigRequest is not found in" + + " the empty JSON string", + UpdateConfigRequest.openapiRequiredFields.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if ((jsonObj.get("username") != null && !jsonObj.get("username").isJsonNull()) + && !jsonObj.get("username").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `username` to be a primitive type in the JSON" + + " string but got `%s`", + jsonObj.get("username").toString())); + } + if ((jsonObj.get("access_token") != null && !jsonObj.get("access_token").isJsonNull()) + && !jsonObj.get("access_token").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `access_token` to be a primitive type in the JSON" + + " string but got `%s`", + jsonObj.get("access_token").toString())); + } + if ((jsonObj.get("org_identifier") != null && !jsonObj.get("org_identifier").isJsonNull()) + && !jsonObj.get("org_identifier").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `org_identifier` to be a primitive type in the" + + " JSON string but got `%s`", + jsonObj.get("org_identifier").toString())); + } + // ensure the optional json data is an array if present + if (jsonObj.get("branch_names") != null + && !jsonObj.get("branch_names").isJsonNull() + && !jsonObj.get("branch_names").isJsonArray()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `branch_names` to be an array in the JSON string" + + " but got `%s`", + jsonObj.get("branch_names").toString())); + } + if ((jsonObj.get("commit_branch_name") != null + && !jsonObj.get("commit_branch_name").isJsonNull()) + && !jsonObj.get("commit_branch_name").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `commit_branch_name` to be a primitive type in the" + + " JSON string but got `%s`", + jsonObj.get("commit_branch_name").toString())); + } + if ((jsonObj.get("configuration_branch_name") != null + && !jsonObj.get("configuration_branch_name").isJsonNull()) + && !jsonObj.get("configuration_branch_name").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `configuration_branch_name` to be a primitive type" + + " in the JSON string but got `%s`", + jsonObj.get("configuration_branch_name").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!UpdateConfigRequest.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'UpdateConfigRequest' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter = + gson.getDelegateAdapter(this, TypeToken.get(UpdateConfigRequest.class)); + + return (TypeAdapter) + new TypeAdapter() { + @Override + public void write(JsonWriter out, UpdateConfigRequest value) + throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + obj.remove("additionalProperties"); + // serialize additional properties + if (value.getAdditionalProperties() != null) { + for (Map.Entry entry : + value.getAdditionalProperties().entrySet()) { + if (entry.getValue() instanceof String) + obj.addProperty(entry.getKey(), (String) entry.getValue()); + else if (entry.getValue() instanceof Number) + obj.addProperty(entry.getKey(), (Number) entry.getValue()); + else if (entry.getValue() instanceof Boolean) + obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); + else if (entry.getValue() instanceof Character) + obj.addProperty( + entry.getKey(), (Character) entry.getValue()); + else { + JsonElement jsonElement = gson.toJsonTree(entry.getValue()); + if (jsonElement.isJsonArray()) { + obj.add(entry.getKey(), jsonElement.getAsJsonArray()); + } else { + obj.add(entry.getKey(), jsonElement.getAsJsonObject()); + } + } + } + } + elementAdapter.write(out, obj); + } + + @Override + public UpdateConfigRequest read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // store additional fields in the deserialized instance + UpdateConfigRequest instance = thisAdapter.fromJsonTree(jsonObj); + for (Map.Entry entry : jsonObj.entrySet()) { + if (!openapiFields.contains(entry.getKey())) { + if (entry.getValue().isJsonPrimitive()) { // primitive type + if (entry.getValue().getAsJsonPrimitive().isString()) + instance.putAdditionalProperty( + entry.getKey(), entry.getValue().getAsString()); + else if (entry.getValue().getAsJsonPrimitive().isNumber()) + instance.putAdditionalProperty( + entry.getKey(), entry.getValue().getAsNumber()); + else if (entry.getValue().getAsJsonPrimitive().isBoolean()) + instance.putAdditionalProperty( + entry.getKey(), + entry.getValue().getAsBoolean()); + else + throw new IllegalArgumentException( + String.format( + "The field `%s` has unknown primitive" + + " type. Value: %s", + entry.getKey(), + entry.getValue().toString())); + } else if (entry.getValue().isJsonArray()) { + instance.putAdditionalProperty( + entry.getKey(), + gson.fromJson(entry.getValue(), List.class)); + } else { // JSON object + instance.putAdditionalProperty( + entry.getKey(), + gson.fromJson(entry.getValue(), HashMap.class)); + } + } + } + return instance; + } + }.nullSafe(); + } + } + + /** + * Create an instance of UpdateConfigRequest given an JSON string + * + * @param jsonString JSON string + * @return An instance of UpdateConfigRequest + * @throws IOException if the JSON string is invalid with respect to UpdateConfigRequest + */ + public static UpdateConfigRequest fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, UpdateConfigRequest.class); + } + + /** + * Convert an instance of UpdateConfigRequest to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} diff --git a/sdks/java/src/main/java/com/thoughtspot/client/model/UpdateConnectionConfigurationRequest.java b/sdks/java/src/main/java/com/thoughtspot/client/model/UpdateConnectionConfigurationRequest.java new file mode 100644 index 000000000..a839ab65a --- /dev/null +++ b/sdks/java/src/main/java/com/thoughtspot/client/model/UpdateConnectionConfigurationRequest.java @@ -0,0 +1,916 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client.model; + +import com.google.gson.Gson; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.TypeAdapter; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.reflect.TypeToken; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import com.thoughtspot.client.JSON; +import java.io.IOException; +import java.io.Serializable; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Objects; +import org.openapitools.jackson.nullable.JsonNullable; + +/** UpdateConnectionConfigurationRequest */ +@javax.annotation.Generated( + value = "org.openapitools.codegen.languages.JavaClientCodegen", + comments = "Generator version: 7.12.0") +public class UpdateConnectionConfigurationRequest implements Serializable { + private static final long serialVersionUID = 1L; + + public static final String SERIALIZED_NAME_CONNECTION_IDENTIFIER = "connection_identifier"; + + @SerializedName(SERIALIZED_NAME_CONNECTION_IDENTIFIER) + @javax.annotation.Nonnull + private String connectionIdentifier; + + public static final String SERIALIZED_NAME_NAME = "name"; + + @SerializedName(SERIALIZED_NAME_NAME) + @javax.annotation.Nullable + private String name; + + public static final String SERIALIZED_NAME_DESCRIPTION = "description"; + + @SerializedName(SERIALIZED_NAME_DESCRIPTION) + @javax.annotation.Nullable + private String description; + + public static final String SERIALIZED_NAME_SAME_AS_PARENT = "same_as_parent"; + + @SerializedName(SERIALIZED_NAME_SAME_AS_PARENT) + @javax.annotation.Nullable + private Boolean sameAsParent = false; + + public static final String SERIALIZED_NAME_POLICY_PROCESS_OPTIONS = "policy_process_options"; + + @SerializedName(SERIALIZED_NAME_POLICY_PROCESS_OPTIONS) + @javax.annotation.Nullable + private PolicyProcessOptionsInput policyProcessOptions; + + /** Type of authentication. */ + @JsonAdapter(AuthenticationTypeEnum.Adapter.class) + public enum AuthenticationTypeEnum { + SERVICE_ACCOUNT("SERVICE_ACCOUNT"), + + OAUTH("OAUTH"), + + OAUTH_WITH_SERVICE_PRINCIPAL("OAUTH_WITH_SERVICE_PRINCIPAL"), + + EXTOAUTH("EXTOAUTH"), + + KEY_PAIR("KEY_PAIR"), + + EXTOAUTH_WITH_PKCE("EXTOAUTH_WITH_PKCE"), + + OAUTH_WITH_PKCE("OAUTH_WITH_PKCE"), + + PERSONAL_ACCESS_TOKEN("PERSONAL_ACCESS_TOKEN"), + + OAUTH_CLIENT_CREDENTIALS("OAUTH_CLIENT_CREDENTIALS"); + + private String value; + + AuthenticationTypeEnum(String value) { + this.value = value; + } + + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + public static AuthenticationTypeEnum fromValue(String value) { + for (AuthenticationTypeEnum b : AuthenticationTypeEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + + public static class Adapter extends TypeAdapter { + @Override + public void write(final JsonWriter jsonWriter, final AuthenticationTypeEnum enumeration) + throws IOException { + jsonWriter.value(enumeration.getValue()); + } + + @Override + public AuthenticationTypeEnum read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + return AuthenticationTypeEnum.fromValue(value); + } + } + + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + String value = jsonElement.getAsString(); + AuthenticationTypeEnum.fromValue(value); + } + } + + public static final String SERIALIZED_NAME_AUTHENTICATION_TYPE = "authentication_type"; + + @SerializedName(SERIALIZED_NAME_AUTHENTICATION_TYPE) + @javax.annotation.Nullable + private AuthenticationTypeEnum authenticationType; + + public static final String SERIALIZED_NAME_CONFIGURATION = "configuration"; + + @SerializedName(SERIALIZED_NAME_CONFIGURATION) + @javax.annotation.Nullable + private Object _configuration; + + /** Type of policy. */ + @JsonAdapter(PolicyTypeEnum.Adapter.class) + public enum PolicyTypeEnum { + NO_POLICY("NO_POLICY"), + + PRINCIPALS("PRINCIPALS"), + + PROCESSES("PROCESSES"); + + private String value; + + PolicyTypeEnum(String value) { + this.value = value; + } + + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + public static PolicyTypeEnum fromValue(String value) { + for (PolicyTypeEnum b : PolicyTypeEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + + public static class Adapter extends TypeAdapter { + @Override + public void write(final JsonWriter jsonWriter, final PolicyTypeEnum enumeration) + throws IOException { + jsonWriter.value(enumeration.getValue()); + } + + @Override + public PolicyTypeEnum read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + return PolicyTypeEnum.fromValue(value); + } + } + + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + String value = jsonElement.getAsString(); + PolicyTypeEnum.fromValue(value); + } + } + + public static final String SERIALIZED_NAME_POLICY_TYPE = "policy_type"; + + @SerializedName(SERIALIZED_NAME_POLICY_TYPE) + @javax.annotation.Nullable + private PolicyTypeEnum policyType; + + public static final String SERIALIZED_NAME_POLICY_PRINCIPALS = "policy_principals"; + + @SerializedName(SERIALIZED_NAME_POLICY_PRINCIPALS) + @javax.annotation.Nullable + private List policyPrincipals; + + /** Gets or Sets policyProcesses */ + @JsonAdapter(PolicyProcessesEnum.Adapter.class) + public enum PolicyProcessesEnum { + SAGE_INDEXING("SAGE_INDEXING"), + + ROW_COUNT_STATS("ROW_COUNT_STATS"); + + private String value; + + PolicyProcessesEnum(String value) { + this.value = value; + } + + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + public static PolicyProcessesEnum fromValue(String value) { + for (PolicyProcessesEnum b : PolicyProcessesEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + + public static class Adapter extends TypeAdapter { + @Override + public void write(final JsonWriter jsonWriter, final PolicyProcessesEnum enumeration) + throws IOException { + jsonWriter.value(enumeration.getValue()); + } + + @Override + public PolicyProcessesEnum read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + return PolicyProcessesEnum.fromValue(value); + } + } + + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + String value = jsonElement.getAsString(); + PolicyProcessesEnum.fromValue(value); + } + } + + public static final String SERIALIZED_NAME_POLICY_PROCESSES = "policy_processes"; + + @SerializedName(SERIALIZED_NAME_POLICY_PROCESSES) + @javax.annotation.Nullable + private List policyProcesses; + + public static final String SERIALIZED_NAME_DISABLE = "disable"; + + @SerializedName(SERIALIZED_NAME_DISABLE) + @javax.annotation.Nullable + private Boolean disable = false; + + public UpdateConnectionConfigurationRequest() {} + + public UpdateConnectionConfigurationRequest connectionIdentifier( + @javax.annotation.Nonnull String connectionIdentifier) { + this.connectionIdentifier = connectionIdentifier; + return this; + } + + /** + * Unique ID or name of the connection. + * + * @return connectionIdentifier + */ + @javax.annotation.Nonnull + public String getConnectionIdentifier() { + return connectionIdentifier; + } + + public void setConnectionIdentifier(@javax.annotation.Nonnull String connectionIdentifier) { + this.connectionIdentifier = connectionIdentifier; + } + + public UpdateConnectionConfigurationRequest name(@javax.annotation.Nullable String name) { + this.name = name; + return this; + } + + /** + * Name of the configuration to update. + * + * @return name + */ + @javax.annotation.Nullable + public String getName() { + return name; + } + + public void setName(@javax.annotation.Nullable String name) { + this.name = name; + } + + public UpdateConnectionConfigurationRequest description( + @javax.annotation.Nullable String description) { + this.description = description; + return this; + } + + /** + * Description of the configuration. + * + * @return description + */ + @javax.annotation.Nullable + public String getDescription() { + return description; + } + + public void setDescription(@javax.annotation.Nullable String description) { + this.description = description; + } + + public UpdateConnectionConfigurationRequest sameAsParent( + @javax.annotation.Nullable Boolean sameAsParent) { + this.sameAsParent = sameAsParent; + return this; + } + + /** + * Specifies whether the connection configuration should inherit all properties and + * authentication type from its parent connection. This attribute is only applicable to + * parameterized connections. When set to true, the configuration uses only the connection + * properties and authentication type inherited from the parent. Version: 26.2.0.cl or later + * + * @return sameAsParent + */ + @javax.annotation.Nullable + public Boolean getSameAsParent() { + return sameAsParent; + } + + public void setSameAsParent(@javax.annotation.Nullable Boolean sameAsParent) { + this.sameAsParent = sameAsParent; + } + + public UpdateConnectionConfigurationRequest policyProcessOptions( + @javax.annotation.Nullable PolicyProcessOptionsInput policyProcessOptions) { + this.policyProcessOptions = policyProcessOptions; + return this; + } + + /** + * This attribute is only applicable to parameterized connections. Ensure that the policy is set + * to Processes to allow the configuration to be used exclusively for system processes. Version: + * 26.2.0.cl or later + * + * @return policyProcessOptions + */ + @javax.annotation.Nullable + public PolicyProcessOptionsInput getPolicyProcessOptions() { + return policyProcessOptions; + } + + public void setPolicyProcessOptions( + @javax.annotation.Nullable PolicyProcessOptionsInput policyProcessOptions) { + this.policyProcessOptions = policyProcessOptions; + } + + public UpdateConnectionConfigurationRequest authenticationType( + @javax.annotation.Nullable AuthenticationTypeEnum authenticationType) { + this.authenticationType = authenticationType; + return this; + } + + /** + * Type of authentication. + * + * @return authenticationType + */ + @javax.annotation.Nullable + public AuthenticationTypeEnum getAuthenticationType() { + return authenticationType; + } + + public void setAuthenticationType( + @javax.annotation.Nullable AuthenticationTypeEnum authenticationType) { + this.authenticationType = authenticationType; + } + + public UpdateConnectionConfigurationRequest _configuration( + @javax.annotation.Nullable Object _configuration) { + this._configuration = _configuration; + return this; + } + + /** + * Configuration properties in JSON. + * + * @return _configuration + */ + @javax.annotation.Nullable + public Object getConfiguration() { + return _configuration; + } + + public void setConfiguration(@javax.annotation.Nullable Object _configuration) { + this._configuration = _configuration; + } + + public UpdateConnectionConfigurationRequest policyType( + @javax.annotation.Nullable PolicyTypeEnum policyType) { + this.policyType = policyType; + return this; + } + + /** + * Type of policy. + * + * @return policyType + */ + @javax.annotation.Nullable + public PolicyTypeEnum getPolicyType() { + return policyType; + } + + public void setPolicyType(@javax.annotation.Nullable PolicyTypeEnum policyType) { + this.policyType = policyType; + } + + public UpdateConnectionConfigurationRequest policyPrincipals( + @javax.annotation.Nullable List policyPrincipals) { + this.policyPrincipals = policyPrincipals; + return this; + } + + public UpdateConnectionConfigurationRequest addPolicyPrincipalsItem( + String policyPrincipalsItem) { + if (this.policyPrincipals == null) { + this.policyPrincipals = new ArrayList<>(); + } + this.policyPrincipals.add(policyPrincipalsItem); + return this; + } + + /** + * Unique ID or name of the User and User Groups. + * + * @return policyPrincipals + */ + @javax.annotation.Nullable + public List getPolicyPrincipals() { + return policyPrincipals; + } + + public void setPolicyPrincipals(@javax.annotation.Nullable List policyPrincipals) { + this.policyPrincipals = policyPrincipals; + } + + public UpdateConnectionConfigurationRequest policyProcesses( + @javax.annotation.Nullable List policyProcesses) { + this.policyProcesses = policyProcesses; + return this; + } + + public UpdateConnectionConfigurationRequest addPolicyProcessesItem( + PolicyProcessesEnum policyProcessesItem) { + if (this.policyProcesses == null) { + this.policyProcesses = new ArrayList<>(); + } + this.policyProcesses.add(policyProcessesItem); + return this; + } + + /** + * Action that the query performed on the data warehouse, such as SAGE_INDEXING and + * ROW_COUNT_STATS. + * + * @return policyProcesses + */ + @javax.annotation.Nullable + public List getPolicyProcesses() { + return policyProcesses; + } + + public void setPolicyProcesses( + @javax.annotation.Nullable List policyProcesses) { + this.policyProcesses = policyProcesses; + } + + public UpdateConnectionConfigurationRequest disable( + @javax.annotation.Nullable Boolean disable) { + this.disable = disable; + return this; + } + + /** + * Indicates whether the configuration enable/disable. + * + * @return disable + */ + @javax.annotation.Nullable + public Boolean getDisable() { + return disable; + } + + public void setDisable(@javax.annotation.Nullable Boolean disable) { + this.disable = disable; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key name of the property + * @param value value of the property + * @return the UpdateConnectionConfigurationRequest instance itself + */ + public UpdateConnectionConfigurationRequest putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return a map of objects + */ + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key name of the property + * @return an object + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + UpdateConnectionConfigurationRequest updateConnectionConfigurationRequest = + (UpdateConnectionConfigurationRequest) o; + return Objects.equals( + this.connectionIdentifier, + updateConnectionConfigurationRequest.connectionIdentifier) + && Objects.equals(this.name, updateConnectionConfigurationRequest.name) + && Objects.equals( + this.description, updateConnectionConfigurationRequest.description) + && Objects.equals( + this.sameAsParent, updateConnectionConfigurationRequest.sameAsParent) + && Objects.equals( + this.policyProcessOptions, + updateConnectionConfigurationRequest.policyProcessOptions) + && Objects.equals( + this.authenticationType, + updateConnectionConfigurationRequest.authenticationType) + && Objects.equals( + this._configuration, updateConnectionConfigurationRequest._configuration) + && Objects.equals(this.policyType, updateConnectionConfigurationRequest.policyType) + && Objects.equals( + this.policyPrincipals, + updateConnectionConfigurationRequest.policyPrincipals) + && Objects.equals( + this.policyProcesses, updateConnectionConfigurationRequest.policyProcesses) + && Objects.equals(this.disable, updateConnectionConfigurationRequest.disable) + && Objects.equals( + this.additionalProperties, + updateConnectionConfigurationRequest.additionalProperties); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b + || (a != null + && b != null + && a.isPresent() + && b.isPresent() + && Objects.deepEquals(a.get(), b.get())); + } + + @Override + public int hashCode() { + return Objects.hash( + connectionIdentifier, + name, + description, + sameAsParent, + policyProcessOptions, + authenticationType, + _configuration, + policyType, + policyPrincipals, + policyProcesses, + disable, + additionalProperties); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; + } + return a.isPresent() ? Arrays.deepHashCode(new Object[] {a.get()}) : 31; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class UpdateConnectionConfigurationRequest {\n"); + sb.append(" connectionIdentifier: ") + .append(toIndentedString(connectionIdentifier)) + .append("\n"); + sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append(" description: ").append(toIndentedString(description)).append("\n"); + sb.append(" sameAsParent: ").append(toIndentedString(sameAsParent)).append("\n"); + sb.append(" policyProcessOptions: ") + .append(toIndentedString(policyProcessOptions)) + .append("\n"); + sb.append(" authenticationType: ") + .append(toIndentedString(authenticationType)) + .append("\n"); + sb.append(" _configuration: ").append(toIndentedString(_configuration)).append("\n"); + sb.append(" policyType: ").append(toIndentedString(policyType)).append("\n"); + sb.append(" policyPrincipals: ").append(toIndentedString(policyPrincipals)).append("\n"); + sb.append(" policyProcesses: ").append(toIndentedString(policyProcesses)).append("\n"); + sb.append(" disable: ").append(toIndentedString(disable)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first + * line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("connection_identifier"); + openapiFields.add("name"); + openapiFields.add("description"); + openapiFields.add("same_as_parent"); + openapiFields.add("policy_process_options"); + openapiFields.add("authentication_type"); + openapiFields.add("configuration"); + openapiFields.add("policy_type"); + openapiFields.add("policy_principals"); + openapiFields.add("policy_processes"); + openapiFields.add("disable"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + openapiRequiredFields.add("connection_identifier"); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to + * UpdateConnectionConfigurationRequest + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!UpdateConnectionConfigurationRequest.openapiRequiredFields + .isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException( + String.format( + "The required field(s) %s in UpdateConnectionConfigurationRequest" + + " is not found in the empty JSON string", + UpdateConnectionConfigurationRequest.openapiRequiredFields + .toString())); + } + } + + // check to make sure all required properties/fields are present in the JSON string + for (String requiredField : UpdateConnectionConfigurationRequest.openapiRequiredFields) { + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException( + String.format( + "The required field `%s` is not found in the JSON string: %s", + requiredField, jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if (!jsonObj.get("connection_identifier").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `connection_identifier` to be a primitive type in" + + " the JSON string but got `%s`", + jsonObj.get("connection_identifier").toString())); + } + if ((jsonObj.get("name") != null && !jsonObj.get("name").isJsonNull()) + && !jsonObj.get("name").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `name` to be a primitive type in the JSON string" + + " but got `%s`", + jsonObj.get("name").toString())); + } + if ((jsonObj.get("description") != null && !jsonObj.get("description").isJsonNull()) + && !jsonObj.get("description").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `description` to be a primitive type in the JSON" + + " string but got `%s`", + jsonObj.get("description").toString())); + } + // validate the optional field `policy_process_options` + if (jsonObj.get("policy_process_options") != null + && !jsonObj.get("policy_process_options").isJsonNull()) { + PolicyProcessOptionsInput.validateJsonElement(jsonObj.get("policy_process_options")); + } + if ((jsonObj.get("authentication_type") != null + && !jsonObj.get("authentication_type").isJsonNull()) + && !jsonObj.get("authentication_type").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `authentication_type` to be a primitive type in" + + " the JSON string but got `%s`", + jsonObj.get("authentication_type").toString())); + } + // validate the optional field `authentication_type` + if (jsonObj.get("authentication_type") != null + && !jsonObj.get("authentication_type").isJsonNull()) { + AuthenticationTypeEnum.validateJsonElement(jsonObj.get("authentication_type")); + } + if ((jsonObj.get("policy_type") != null && !jsonObj.get("policy_type").isJsonNull()) + && !jsonObj.get("policy_type").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `policy_type` to be a primitive type in the JSON" + + " string but got `%s`", + jsonObj.get("policy_type").toString())); + } + // validate the optional field `policy_type` + if (jsonObj.get("policy_type") != null && !jsonObj.get("policy_type").isJsonNull()) { + PolicyTypeEnum.validateJsonElement(jsonObj.get("policy_type")); + } + // ensure the optional json data is an array if present + if (jsonObj.get("policy_principals") != null + && !jsonObj.get("policy_principals").isJsonNull() + && !jsonObj.get("policy_principals").isJsonArray()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `policy_principals` to be an array in the JSON" + + " string but got `%s`", + jsonObj.get("policy_principals").toString())); + } + // ensure the optional json data is an array if present + if (jsonObj.get("policy_processes") != null + && !jsonObj.get("policy_processes").isJsonNull() + && !jsonObj.get("policy_processes").isJsonArray()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `policy_processes` to be an array in the JSON" + + " string but got `%s`", + jsonObj.get("policy_processes").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!UpdateConnectionConfigurationRequest.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'UpdateConnectionConfigurationRequest' + // and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter = + gson.getDelegateAdapter( + this, TypeToken.get(UpdateConnectionConfigurationRequest.class)); + + return (TypeAdapter) + new TypeAdapter() { + @Override + public void write( + JsonWriter out, UpdateConnectionConfigurationRequest value) + throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + obj.remove("additionalProperties"); + // serialize additional properties + if (value.getAdditionalProperties() != null) { + for (Map.Entry entry : + value.getAdditionalProperties().entrySet()) { + if (entry.getValue() instanceof String) + obj.addProperty(entry.getKey(), (String) entry.getValue()); + else if (entry.getValue() instanceof Number) + obj.addProperty(entry.getKey(), (Number) entry.getValue()); + else if (entry.getValue() instanceof Boolean) + obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); + else if (entry.getValue() instanceof Character) + obj.addProperty( + entry.getKey(), (Character) entry.getValue()); + else { + JsonElement jsonElement = gson.toJsonTree(entry.getValue()); + if (jsonElement.isJsonArray()) { + obj.add(entry.getKey(), jsonElement.getAsJsonArray()); + } else { + obj.add(entry.getKey(), jsonElement.getAsJsonObject()); + } + } + } + } + elementAdapter.write(out, obj); + } + + @Override + public UpdateConnectionConfigurationRequest read(JsonReader in) + throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // store additional fields in the deserialized instance + UpdateConnectionConfigurationRequest instance = + thisAdapter.fromJsonTree(jsonObj); + for (Map.Entry entry : jsonObj.entrySet()) { + if (!openapiFields.contains(entry.getKey())) { + if (entry.getValue().isJsonPrimitive()) { // primitive type + if (entry.getValue().getAsJsonPrimitive().isString()) + instance.putAdditionalProperty( + entry.getKey(), entry.getValue().getAsString()); + else if (entry.getValue().getAsJsonPrimitive().isNumber()) + instance.putAdditionalProperty( + entry.getKey(), entry.getValue().getAsNumber()); + else if (entry.getValue().getAsJsonPrimitive().isBoolean()) + instance.putAdditionalProperty( + entry.getKey(), + entry.getValue().getAsBoolean()); + else + throw new IllegalArgumentException( + String.format( + "The field `%s` has unknown primitive" + + " type. Value: %s", + entry.getKey(), + entry.getValue().toString())); + } else if (entry.getValue().isJsonArray()) { + instance.putAdditionalProperty( + entry.getKey(), + gson.fromJson(entry.getValue(), List.class)); + } else { // JSON object + instance.putAdditionalProperty( + entry.getKey(), + gson.fromJson(entry.getValue(), HashMap.class)); + } + } + } + return instance; + } + }.nullSafe(); + } + } + + /** + * Create an instance of UpdateConnectionConfigurationRequest given an JSON string + * + * @param jsonString JSON string + * @return An instance of UpdateConnectionConfigurationRequest + * @throws IOException if the JSON string is invalid with respect to + * UpdateConnectionConfigurationRequest + */ + public static UpdateConnectionConfigurationRequest fromJson(String jsonString) + throws IOException { + return JSON.getGson().fromJson(jsonString, UpdateConnectionConfigurationRequest.class); + } + + /** + * Convert an instance of UpdateConnectionConfigurationRequest to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} diff --git a/sdks/java/src/main/java/com/thoughtspot/client/model/UpdateConnectionRequest.java b/sdks/java/src/main/java/com/thoughtspot/client/model/UpdateConnectionRequest.java new file mode 100644 index 000000000..ec434c8a5 --- /dev/null +++ b/sdks/java/src/main/java/com/thoughtspot/client/model/UpdateConnectionRequest.java @@ -0,0 +1,463 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client.model; + +import com.google.gson.Gson; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.TypeAdapter; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.annotations.SerializedName; +import com.google.gson.reflect.TypeToken; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import com.thoughtspot.client.JSON; +import java.io.IOException; +import java.io.Serializable; +import java.util.Arrays; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Objects; +import org.openapitools.jackson.nullable.JsonNullable; + +/** UpdateConnectionRequest */ +@javax.annotation.Generated( + value = "org.openapitools.codegen.languages.JavaClientCodegen", + comments = "Generator version: 7.12.0") +public class UpdateConnectionRequest implements Serializable { + private static final long serialVersionUID = 1L; + + public static final String SERIALIZED_NAME_CONNECTION_IDENTIFIER = "connection_identifier"; + + @SerializedName(SERIALIZED_NAME_CONNECTION_IDENTIFIER) + @javax.annotation.Nonnull + private String connectionIdentifier; + + public static final String SERIALIZED_NAME_NAME = "name"; + + @SerializedName(SERIALIZED_NAME_NAME) + @javax.annotation.Nullable + private String name; + + public static final String SERIALIZED_NAME_DESCRIPTION = "description"; + + @SerializedName(SERIALIZED_NAME_DESCRIPTION) + @javax.annotation.Nullable + private String description; + + public static final String SERIALIZED_NAME_DATA_WAREHOUSE_CONFIG = "data_warehouse_config"; + + @SerializedName(SERIALIZED_NAME_DATA_WAREHOUSE_CONFIG) + @javax.annotation.Nullable + private Object dataWarehouseConfig; + + public static final String SERIALIZED_NAME_VALIDATE = "validate"; + + @SerializedName(SERIALIZED_NAME_VALIDATE) + @javax.annotation.Nullable + private Boolean validate = true; + + public UpdateConnectionRequest() {} + + public UpdateConnectionRequest connectionIdentifier( + @javax.annotation.Nonnull String connectionIdentifier) { + this.connectionIdentifier = connectionIdentifier; + return this; + } + + /** + * Unique ID or name of the connection. + * + * @return connectionIdentifier + */ + @javax.annotation.Nonnull + public String getConnectionIdentifier() { + return connectionIdentifier; + } + + public void setConnectionIdentifier(@javax.annotation.Nonnull String connectionIdentifier) { + this.connectionIdentifier = connectionIdentifier; + } + + public UpdateConnectionRequest name(@javax.annotation.Nullable String name) { + this.name = name; + return this; + } + + /** + * Updated name of the connection. + * + * @return name + */ + @javax.annotation.Nullable + public String getName() { + return name; + } + + public void setName(@javax.annotation.Nullable String name) { + this.name = name; + } + + public UpdateConnectionRequest description(@javax.annotation.Nullable String description) { + this.description = description; + return this; + } + + /** + * Updated description of the connection. + * + * @return description + */ + @javax.annotation.Nullable + public String getDescription() { + return description; + } + + public void setDescription(@javax.annotation.Nullable String description) { + this.description = description; + } + + public UpdateConnectionRequest dataWarehouseConfig( + @javax.annotation.Nullable Object dataWarehouseConfig) { + this.dataWarehouseConfig = dataWarehouseConfig; + return this; + } + + /** + * Configuration of the data warehouse in JSON. + * + * @return dataWarehouseConfig + */ + @javax.annotation.Nullable + public Object getDataWarehouseConfig() { + return dataWarehouseConfig; + } + + public void setDataWarehouseConfig(@javax.annotation.Nullable Object dataWarehouseConfig) { + this.dataWarehouseConfig = dataWarehouseConfig; + } + + public UpdateConnectionRequest validate(@javax.annotation.Nullable Boolean validate) { + this.validate = validate; + return this; + } + + /** + * Indicates whether to validate the connection details. + * + * @return validate + */ + @javax.annotation.Nullable + public Boolean getValidate() { + return validate; + } + + public void setValidate(@javax.annotation.Nullable Boolean validate) { + this.validate = validate; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key name of the property + * @param value value of the property + * @return the UpdateConnectionRequest instance itself + */ + public UpdateConnectionRequest putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return a map of objects + */ + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key name of the property + * @return an object + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + UpdateConnectionRequest updateConnectionRequest = (UpdateConnectionRequest) o; + return Objects.equals( + this.connectionIdentifier, updateConnectionRequest.connectionIdentifier) + && Objects.equals(this.name, updateConnectionRequest.name) + && Objects.equals(this.description, updateConnectionRequest.description) + && Objects.equals( + this.dataWarehouseConfig, updateConnectionRequest.dataWarehouseConfig) + && Objects.equals(this.validate, updateConnectionRequest.validate) + && Objects.equals( + this.additionalProperties, updateConnectionRequest.additionalProperties); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b + || (a != null + && b != null + && a.isPresent() + && b.isPresent() + && Objects.deepEquals(a.get(), b.get())); + } + + @Override + public int hashCode() { + return Objects.hash( + connectionIdentifier, + name, + description, + dataWarehouseConfig, + validate, + additionalProperties); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; + } + return a.isPresent() ? Arrays.deepHashCode(new Object[] {a.get()}) : 31; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class UpdateConnectionRequest {\n"); + sb.append(" connectionIdentifier: ") + .append(toIndentedString(connectionIdentifier)) + .append("\n"); + sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append(" description: ").append(toIndentedString(description)).append("\n"); + sb.append(" dataWarehouseConfig: ") + .append(toIndentedString(dataWarehouseConfig)) + .append("\n"); + sb.append(" validate: ").append(toIndentedString(validate)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first + * line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("connection_identifier"); + openapiFields.add("name"); + openapiFields.add("description"); + openapiFields.add("data_warehouse_config"); + openapiFields.add("validate"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + openapiRequiredFields.add("connection_identifier"); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to UpdateConnectionRequest + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!UpdateConnectionRequest.openapiRequiredFields + .isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException( + String.format( + "The required field(s) %s in UpdateConnectionRequest is not found" + + " in the empty JSON string", + UpdateConnectionRequest.openapiRequiredFields.toString())); + } + } + + // check to make sure all required properties/fields are present in the JSON string + for (String requiredField : UpdateConnectionRequest.openapiRequiredFields) { + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException( + String.format( + "The required field `%s` is not found in the JSON string: %s", + requiredField, jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if (!jsonObj.get("connection_identifier").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `connection_identifier` to be a primitive type in" + + " the JSON string but got `%s`", + jsonObj.get("connection_identifier").toString())); + } + if ((jsonObj.get("name") != null && !jsonObj.get("name").isJsonNull()) + && !jsonObj.get("name").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `name` to be a primitive type in the JSON string" + + " but got `%s`", + jsonObj.get("name").toString())); + } + if ((jsonObj.get("description") != null && !jsonObj.get("description").isJsonNull()) + && !jsonObj.get("description").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `description` to be a primitive type in the JSON" + + " string but got `%s`", + jsonObj.get("description").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!UpdateConnectionRequest.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'UpdateConnectionRequest' and its + // subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter = + gson.getDelegateAdapter(this, TypeToken.get(UpdateConnectionRequest.class)); + + return (TypeAdapter) + new TypeAdapter() { + @Override + public void write(JsonWriter out, UpdateConnectionRequest value) + throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + obj.remove("additionalProperties"); + // serialize additional properties + if (value.getAdditionalProperties() != null) { + for (Map.Entry entry : + value.getAdditionalProperties().entrySet()) { + if (entry.getValue() instanceof String) + obj.addProperty(entry.getKey(), (String) entry.getValue()); + else if (entry.getValue() instanceof Number) + obj.addProperty(entry.getKey(), (Number) entry.getValue()); + else if (entry.getValue() instanceof Boolean) + obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); + else if (entry.getValue() instanceof Character) + obj.addProperty( + entry.getKey(), (Character) entry.getValue()); + else { + JsonElement jsonElement = gson.toJsonTree(entry.getValue()); + if (jsonElement.isJsonArray()) { + obj.add(entry.getKey(), jsonElement.getAsJsonArray()); + } else { + obj.add(entry.getKey(), jsonElement.getAsJsonObject()); + } + } + } + } + elementAdapter.write(out, obj); + } + + @Override + public UpdateConnectionRequest read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // store additional fields in the deserialized instance + UpdateConnectionRequest instance = thisAdapter.fromJsonTree(jsonObj); + for (Map.Entry entry : jsonObj.entrySet()) { + if (!openapiFields.contains(entry.getKey())) { + if (entry.getValue().isJsonPrimitive()) { // primitive type + if (entry.getValue().getAsJsonPrimitive().isString()) + instance.putAdditionalProperty( + entry.getKey(), entry.getValue().getAsString()); + else if (entry.getValue().getAsJsonPrimitive().isNumber()) + instance.putAdditionalProperty( + entry.getKey(), entry.getValue().getAsNumber()); + else if (entry.getValue().getAsJsonPrimitive().isBoolean()) + instance.putAdditionalProperty( + entry.getKey(), + entry.getValue().getAsBoolean()); + else + throw new IllegalArgumentException( + String.format( + "The field `%s` has unknown primitive" + + " type. Value: %s", + entry.getKey(), + entry.getValue().toString())); + } else if (entry.getValue().isJsonArray()) { + instance.putAdditionalProperty( + entry.getKey(), + gson.fromJson(entry.getValue(), List.class)); + } else { // JSON object + instance.putAdditionalProperty( + entry.getKey(), + gson.fromJson(entry.getValue(), HashMap.class)); + } + } + } + return instance; + } + }.nullSafe(); + } + } + + /** + * Create an instance of UpdateConnectionRequest given an JSON string + * + * @param jsonString JSON string + * @return An instance of UpdateConnectionRequest + * @throws IOException if the JSON string is invalid with respect to UpdateConnectionRequest + */ + public static UpdateConnectionRequest fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, UpdateConnectionRequest.class); + } + + /** + * Convert an instance of UpdateConnectionRequest to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} diff --git a/sdks/java/src/main/java/com/thoughtspot/client/model/UpdateConnectionStatusRequest.java b/sdks/java/src/main/java/com/thoughtspot/client/model/UpdateConnectionStatusRequest.java new file mode 100644 index 000000000..caaffa61a --- /dev/null +++ b/sdks/java/src/main/java/com/thoughtspot/client/model/UpdateConnectionStatusRequest.java @@ -0,0 +1,360 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client.model; + +import com.google.gson.Gson; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.TypeAdapter; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.reflect.TypeToken; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import com.thoughtspot.client.JSON; +import java.io.IOException; +import java.io.Serializable; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Objects; + +/** UpdateConnectionStatusRequest */ +@javax.annotation.Generated( + value = "org.openapitools.codegen.languages.JavaClientCodegen", + comments = "Generator version: 7.12.0") +public class UpdateConnectionStatusRequest implements Serializable { + private static final long serialVersionUID = 1L; + + /** + * Status to set for the connection. Use ACTIVATED to enable the connection or DEACTIVATED to + * disable it. + */ + @JsonAdapter(StatusEnum.Adapter.class) + public enum StatusEnum { + ACTIVATED("ACTIVATED"), + + DEACTIVATED("DEACTIVATED"); + + private String value; + + StatusEnum(String value) { + this.value = value; + } + + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + public static StatusEnum fromValue(String value) { + for (StatusEnum b : StatusEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + + public static class Adapter extends TypeAdapter { + @Override + public void write(final JsonWriter jsonWriter, final StatusEnum enumeration) + throws IOException { + jsonWriter.value(enumeration.getValue()); + } + + @Override + public StatusEnum read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + return StatusEnum.fromValue(value); + } + } + + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + String value = jsonElement.getAsString(); + StatusEnum.fromValue(value); + } + } + + public static final String SERIALIZED_NAME_STATUS = "status"; + + @SerializedName(SERIALIZED_NAME_STATUS) + @javax.annotation.Nullable + private StatusEnum status = StatusEnum.ACTIVATED; + + public UpdateConnectionStatusRequest() {} + + public UpdateConnectionStatusRequest status(@javax.annotation.Nullable StatusEnum status) { + this.status = status; + return this; + } + + /** + * Status to set for the connection. Use ACTIVATED to enable the connection or DEACTIVATED to + * disable it. + * + * @return status + */ + @javax.annotation.Nullable + public StatusEnum getStatus() { + return status; + } + + public void setStatus(@javax.annotation.Nullable StatusEnum status) { + this.status = status; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key name of the property + * @param value value of the property + * @return the UpdateConnectionStatusRequest instance itself + */ + public UpdateConnectionStatusRequest putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return a map of objects + */ + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key name of the property + * @return an object + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + UpdateConnectionStatusRequest updateConnectionStatusRequest = + (UpdateConnectionStatusRequest) o; + return Objects.equals(this.status, updateConnectionStatusRequest.status) + && Objects.equals( + this.additionalProperties, + updateConnectionStatusRequest.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(status, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class UpdateConnectionStatusRequest {\n"); + sb.append(" status: ").append(toIndentedString(status)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first + * line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("status"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to + * UpdateConnectionStatusRequest + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!UpdateConnectionStatusRequest.openapiRequiredFields + .isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException( + String.format( + "The required field(s) %s in UpdateConnectionStatusRequest is not" + + " found in the empty JSON string", + UpdateConnectionStatusRequest.openapiRequiredFields.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if ((jsonObj.get("status") != null && !jsonObj.get("status").isJsonNull()) + && !jsonObj.get("status").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `status` to be a primitive type in the JSON string" + + " but got `%s`", + jsonObj.get("status").toString())); + } + // validate the optional field `status` + if (jsonObj.get("status") != null && !jsonObj.get("status").isJsonNull()) { + StatusEnum.validateJsonElement(jsonObj.get("status")); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!UpdateConnectionStatusRequest.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'UpdateConnectionStatusRequest' and its + // subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter = + gson.getDelegateAdapter( + this, TypeToken.get(UpdateConnectionStatusRequest.class)); + + return (TypeAdapter) + new TypeAdapter() { + @Override + public void write(JsonWriter out, UpdateConnectionStatusRequest value) + throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + obj.remove("additionalProperties"); + // serialize additional properties + if (value.getAdditionalProperties() != null) { + for (Map.Entry entry : + value.getAdditionalProperties().entrySet()) { + if (entry.getValue() instanceof String) + obj.addProperty(entry.getKey(), (String) entry.getValue()); + else if (entry.getValue() instanceof Number) + obj.addProperty(entry.getKey(), (Number) entry.getValue()); + else if (entry.getValue() instanceof Boolean) + obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); + else if (entry.getValue() instanceof Character) + obj.addProperty( + entry.getKey(), (Character) entry.getValue()); + else { + JsonElement jsonElement = gson.toJsonTree(entry.getValue()); + if (jsonElement.isJsonArray()) { + obj.add(entry.getKey(), jsonElement.getAsJsonArray()); + } else { + obj.add(entry.getKey(), jsonElement.getAsJsonObject()); + } + } + } + } + elementAdapter.write(out, obj); + } + + @Override + public UpdateConnectionStatusRequest read(JsonReader in) + throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // store additional fields in the deserialized instance + UpdateConnectionStatusRequest instance = + thisAdapter.fromJsonTree(jsonObj); + for (Map.Entry entry : jsonObj.entrySet()) { + if (!openapiFields.contains(entry.getKey())) { + if (entry.getValue().isJsonPrimitive()) { // primitive type + if (entry.getValue().getAsJsonPrimitive().isString()) + instance.putAdditionalProperty( + entry.getKey(), entry.getValue().getAsString()); + else if (entry.getValue().getAsJsonPrimitive().isNumber()) + instance.putAdditionalProperty( + entry.getKey(), entry.getValue().getAsNumber()); + else if (entry.getValue().getAsJsonPrimitive().isBoolean()) + instance.putAdditionalProperty( + entry.getKey(), + entry.getValue().getAsBoolean()); + else + throw new IllegalArgumentException( + String.format( + "The field `%s` has unknown primitive" + + " type. Value: %s", + entry.getKey(), + entry.getValue().toString())); + } else if (entry.getValue().isJsonArray()) { + instance.putAdditionalProperty( + entry.getKey(), + gson.fromJson(entry.getValue(), List.class)); + } else { // JSON object + instance.putAdditionalProperty( + entry.getKey(), + gson.fromJson(entry.getValue(), HashMap.class)); + } + } + } + return instance; + } + }.nullSafe(); + } + } + + /** + * Create an instance of UpdateConnectionStatusRequest given an JSON string + * + * @param jsonString JSON string + * @return An instance of UpdateConnectionStatusRequest + * @throws IOException if the JSON string is invalid with respect to + * UpdateConnectionStatusRequest + */ + public static UpdateConnectionStatusRequest fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, UpdateConnectionStatusRequest.class); + } + + /** + * Convert an instance of UpdateConnectionStatusRequest to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} diff --git a/sdks/java/src/main/java/com/thoughtspot/client/model/UpdateConnectionV2Request.java b/sdks/java/src/main/java/com/thoughtspot/client/model/UpdateConnectionV2Request.java new file mode 100644 index 000000000..3396d05c9 --- /dev/null +++ b/sdks/java/src/main/java/com/thoughtspot/client/model/UpdateConnectionV2Request.java @@ -0,0 +1,407 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client.model; + +import com.google.gson.Gson; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.TypeAdapter; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.annotations.SerializedName; +import com.google.gson.reflect.TypeToken; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import com.thoughtspot.client.JSON; +import java.io.IOException; +import java.io.Serializable; +import java.util.Arrays; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Objects; +import org.openapitools.jackson.nullable.JsonNullable; + +/** UpdateConnectionV2Request */ +@javax.annotation.Generated( + value = "org.openapitools.codegen.languages.JavaClientCodegen", + comments = "Generator version: 7.12.0") +public class UpdateConnectionV2Request implements Serializable { + private static final long serialVersionUID = 1L; + + public static final String SERIALIZED_NAME_NAME = "name"; + + @SerializedName(SERIALIZED_NAME_NAME) + @javax.annotation.Nullable + private String name; + + public static final String SERIALIZED_NAME_DESCRIPTION = "description"; + + @SerializedName(SERIALIZED_NAME_DESCRIPTION) + @javax.annotation.Nullable + private String description; + + public static final String SERIALIZED_NAME_DATA_WAREHOUSE_CONFIG = "data_warehouse_config"; + + @SerializedName(SERIALIZED_NAME_DATA_WAREHOUSE_CONFIG) + @javax.annotation.Nullable + private Object dataWarehouseConfig; + + public static final String SERIALIZED_NAME_VALIDATE = "validate"; + + @SerializedName(SERIALIZED_NAME_VALIDATE) + @javax.annotation.Nullable + private Boolean validate = true; + + public UpdateConnectionV2Request() {} + + public UpdateConnectionV2Request name(@javax.annotation.Nullable String name) { + this.name = name; + return this; + } + + /** + * Updated name of the connection. + * + * @return name + */ + @javax.annotation.Nullable + public String getName() { + return name; + } + + public void setName(@javax.annotation.Nullable String name) { + this.name = name; + } + + public UpdateConnectionV2Request description(@javax.annotation.Nullable String description) { + this.description = description; + return this; + } + + /** + * Updated description of the connection. + * + * @return description + */ + @javax.annotation.Nullable + public String getDescription() { + return description; + } + + public void setDescription(@javax.annotation.Nullable String description) { + this.description = description; + } + + public UpdateConnectionV2Request dataWarehouseConfig( + @javax.annotation.Nullable Object dataWarehouseConfig) { + this.dataWarehouseConfig = dataWarehouseConfig; + return this; + } + + /** + * Configuration of the data warehouse in JSON. + * + * @return dataWarehouseConfig + */ + @javax.annotation.Nullable + public Object getDataWarehouseConfig() { + return dataWarehouseConfig; + } + + public void setDataWarehouseConfig(@javax.annotation.Nullable Object dataWarehouseConfig) { + this.dataWarehouseConfig = dataWarehouseConfig; + } + + public UpdateConnectionV2Request validate(@javax.annotation.Nullable Boolean validate) { + this.validate = validate; + return this; + } + + /** + * Indicates whether to validate the connection details. + * + * @return validate + */ + @javax.annotation.Nullable + public Boolean getValidate() { + return validate; + } + + public void setValidate(@javax.annotation.Nullable Boolean validate) { + this.validate = validate; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key name of the property + * @param value value of the property + * @return the UpdateConnectionV2Request instance itself + */ + public UpdateConnectionV2Request putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return a map of objects + */ + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key name of the property + * @return an object + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + UpdateConnectionV2Request updateConnectionV2Request = (UpdateConnectionV2Request) o; + return Objects.equals(this.name, updateConnectionV2Request.name) + && Objects.equals(this.description, updateConnectionV2Request.description) + && Objects.equals( + this.dataWarehouseConfig, updateConnectionV2Request.dataWarehouseConfig) + && Objects.equals(this.validate, updateConnectionV2Request.validate) + && Objects.equals( + this.additionalProperties, updateConnectionV2Request.additionalProperties); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b + || (a != null + && b != null + && a.isPresent() + && b.isPresent() + && Objects.deepEquals(a.get(), b.get())); + } + + @Override + public int hashCode() { + return Objects.hash(name, description, dataWarehouseConfig, validate, additionalProperties); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; + } + return a.isPresent() ? Arrays.deepHashCode(new Object[] {a.get()}) : 31; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class UpdateConnectionV2Request {\n"); + sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append(" description: ").append(toIndentedString(description)).append("\n"); + sb.append(" dataWarehouseConfig: ") + .append(toIndentedString(dataWarehouseConfig)) + .append("\n"); + sb.append(" validate: ").append(toIndentedString(validate)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first + * line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("name"); + openapiFields.add("description"); + openapiFields.add("data_warehouse_config"); + openapiFields.add("validate"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to UpdateConnectionV2Request + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!UpdateConnectionV2Request.openapiRequiredFields + .isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException( + String.format( + "The required field(s) %s in UpdateConnectionV2Request is not" + + " found in the empty JSON string", + UpdateConnectionV2Request.openapiRequiredFields.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if ((jsonObj.get("name") != null && !jsonObj.get("name").isJsonNull()) + && !jsonObj.get("name").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `name` to be a primitive type in the JSON string" + + " but got `%s`", + jsonObj.get("name").toString())); + } + if ((jsonObj.get("description") != null && !jsonObj.get("description").isJsonNull()) + && !jsonObj.get("description").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `description` to be a primitive type in the JSON" + + " string but got `%s`", + jsonObj.get("description").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!UpdateConnectionV2Request.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'UpdateConnectionV2Request' and its + // subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter = + gson.getDelegateAdapter(this, TypeToken.get(UpdateConnectionV2Request.class)); + + return (TypeAdapter) + new TypeAdapter() { + @Override + public void write(JsonWriter out, UpdateConnectionV2Request value) + throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + obj.remove("additionalProperties"); + // serialize additional properties + if (value.getAdditionalProperties() != null) { + for (Map.Entry entry : + value.getAdditionalProperties().entrySet()) { + if (entry.getValue() instanceof String) + obj.addProperty(entry.getKey(), (String) entry.getValue()); + else if (entry.getValue() instanceof Number) + obj.addProperty(entry.getKey(), (Number) entry.getValue()); + else if (entry.getValue() instanceof Boolean) + obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); + else if (entry.getValue() instanceof Character) + obj.addProperty( + entry.getKey(), (Character) entry.getValue()); + else { + JsonElement jsonElement = gson.toJsonTree(entry.getValue()); + if (jsonElement.isJsonArray()) { + obj.add(entry.getKey(), jsonElement.getAsJsonArray()); + } else { + obj.add(entry.getKey(), jsonElement.getAsJsonObject()); + } + } + } + } + elementAdapter.write(out, obj); + } + + @Override + public UpdateConnectionV2Request read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // store additional fields in the deserialized instance + UpdateConnectionV2Request instance = thisAdapter.fromJsonTree(jsonObj); + for (Map.Entry entry : jsonObj.entrySet()) { + if (!openapiFields.contains(entry.getKey())) { + if (entry.getValue().isJsonPrimitive()) { // primitive type + if (entry.getValue().getAsJsonPrimitive().isString()) + instance.putAdditionalProperty( + entry.getKey(), entry.getValue().getAsString()); + else if (entry.getValue().getAsJsonPrimitive().isNumber()) + instance.putAdditionalProperty( + entry.getKey(), entry.getValue().getAsNumber()); + else if (entry.getValue().getAsJsonPrimitive().isBoolean()) + instance.putAdditionalProperty( + entry.getKey(), + entry.getValue().getAsBoolean()); + else + throw new IllegalArgumentException( + String.format( + "The field `%s` has unknown primitive" + + " type. Value: %s", + entry.getKey(), + entry.getValue().toString())); + } else if (entry.getValue().isJsonArray()) { + instance.putAdditionalProperty( + entry.getKey(), + gson.fromJson(entry.getValue(), List.class)); + } else { // JSON object + instance.putAdditionalProperty( + entry.getKey(), + gson.fromJson(entry.getValue(), HashMap.class)); + } + } + } + return instance; + } + }.nullSafe(); + } + } + + /** + * Create an instance of UpdateConnectionV2Request given an JSON string + * + * @param jsonString JSON string + * @return An instance of UpdateConnectionV2Request + * @throws IOException if the JSON string is invalid with respect to UpdateConnectionV2Request + */ + public static UpdateConnectionV2Request fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, UpdateConnectionV2Request.class); + } + + /** + * Convert an instance of UpdateConnectionV2Request to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} diff --git a/sdks/java/src/main/java/com/thoughtspot/client/model/UpdateCustomActionRequest.java b/sdks/java/src/main/java/com/thoughtspot/client/model/UpdateCustomActionRequest.java new file mode 100644 index 000000000..465c13fa4 --- /dev/null +++ b/sdks/java/src/main/java/com/thoughtspot/client/model/UpdateCustomActionRequest.java @@ -0,0 +1,577 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client.model; + +import com.google.gson.Gson; +import com.google.gson.JsonArray; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.TypeAdapter; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.reflect.TypeToken; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import com.thoughtspot.client.JSON; +import java.io.IOException; +import java.io.Serializable; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Objects; + +/** UpdateCustomActionRequest */ +@javax.annotation.Generated( + value = "org.openapitools.codegen.languages.JavaClientCodegen", + comments = "Generator version: 7.12.0") +public class UpdateCustomActionRequest implements Serializable { + private static final long serialVersionUID = 1L; + + public static final String SERIALIZED_NAME_ACTION_DETAILS = "action_details"; + + @SerializedName(SERIALIZED_NAME_ACTION_DETAILS) + @javax.annotation.Nullable + private ActionDetailsInput actionDetails; + + public static final String SERIALIZED_NAME_ASSOCIATE_METADATA = "associate_metadata"; + + @SerializedName(SERIALIZED_NAME_ASSOCIATE_METADATA) + @javax.annotation.Nullable + private List associateMetadata; + + public static final String SERIALIZED_NAME_DEFAULT_ACTION_CONFIG = "default_action_config"; + + @SerializedName(SERIALIZED_NAME_DEFAULT_ACTION_CONFIG) + @javax.annotation.Nullable + private DefaultActionConfigInput defaultActionConfig; + + public static final String SERIALIZED_NAME_GROUP_IDENTIFIERS = "group_identifiers"; + + @SerializedName(SERIALIZED_NAME_GROUP_IDENTIFIERS) + @javax.annotation.Nullable + private List groupIdentifiers; + + public static final String SERIALIZED_NAME_NAME = "name"; + + @SerializedName(SERIALIZED_NAME_NAME) + @javax.annotation.Nullable + private String name; + + /** Type of update operation. Default operation type is ADD */ + @JsonAdapter(OperationEnum.Adapter.class) + public enum OperationEnum { + ADD("ADD"), + + REMOVE("REMOVE"); + + private String value; + + OperationEnum(String value) { + this.value = value; + } + + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + public static OperationEnum fromValue(String value) { + for (OperationEnum b : OperationEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + + public static class Adapter extends TypeAdapter { + @Override + public void write(final JsonWriter jsonWriter, final OperationEnum enumeration) + throws IOException { + jsonWriter.value(enumeration.getValue()); + } + + @Override + public OperationEnum read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + return OperationEnum.fromValue(value); + } + } + + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + String value = jsonElement.getAsString(); + OperationEnum.fromValue(value); + } + } + + public static final String SERIALIZED_NAME_OPERATION = "operation"; + + @SerializedName(SERIALIZED_NAME_OPERATION) + @javax.annotation.Nullable + private OperationEnum operation = OperationEnum.ADD; + + public UpdateCustomActionRequest() {} + + public UpdateCustomActionRequest actionDetails( + @javax.annotation.Nullable ActionDetailsInput actionDetails) { + this.actionDetails = actionDetails; + return this; + } + + /** + * Action details includes `Type` and Configuration for Custom Actions, either + * Callback or URL is required. + * + * @return actionDetails + */ + @javax.annotation.Nullable + public ActionDetailsInput getActionDetails() { + return actionDetails; + } + + public void setActionDetails(@javax.annotation.Nullable ActionDetailsInput actionDetails) { + this.actionDetails = actionDetails; + } + + public UpdateCustomActionRequest associateMetadata( + @javax.annotation.Nullable List associateMetadata) { + this.associateMetadata = associateMetadata; + return this; + } + + public UpdateCustomActionRequest addAssociateMetadataItem( + AssociateMetadataInput associateMetadataItem) { + if (this.associateMetadata == null) { + this.associateMetadata = new ArrayList<>(); + } + this.associateMetadata.add(associateMetadataItem); + return this; + } + + /** + * Metadata objects to which the custom action needs to be associated. + * + * @return associateMetadata + */ + @javax.annotation.Nullable + public List getAssociateMetadata() { + return associateMetadata; + } + + public void setAssociateMetadata( + @javax.annotation.Nullable List associateMetadata) { + this.associateMetadata = associateMetadata; + } + + public UpdateCustomActionRequest defaultActionConfig( + @javax.annotation.Nullable DefaultActionConfigInput defaultActionConfig) { + this.defaultActionConfig = defaultActionConfig; + return this; + } + + /** + * Default Custom action configuration. This includes if the custom action available on + * visualizations and Answers. By default, a custom action is added to all visualizations and + * Answers. + * + * @return defaultActionConfig + */ + @javax.annotation.Nullable + public DefaultActionConfigInput getDefaultActionConfig() { + return defaultActionConfig; + } + + public void setDefaultActionConfig( + @javax.annotation.Nullable DefaultActionConfigInput defaultActionConfig) { + this.defaultActionConfig = defaultActionConfig; + } + + public UpdateCustomActionRequest groupIdentifiers( + @javax.annotation.Nullable List groupIdentifiers) { + this.groupIdentifiers = groupIdentifiers; + return this; + } + + public UpdateCustomActionRequest addGroupIdentifiersItem(String groupIdentifiersItem) { + if (this.groupIdentifiers == null) { + this.groupIdentifiers = new ArrayList<>(); + } + this.groupIdentifiers.add(groupIdentifiersItem); + return this; + } + + /** + * Unique ID or name of the groups that can view and access the custom action. + * + * @return groupIdentifiers + */ + @javax.annotation.Nullable + public List getGroupIdentifiers() { + return groupIdentifiers; + } + + public void setGroupIdentifiers(@javax.annotation.Nullable List groupIdentifiers) { + this.groupIdentifiers = groupIdentifiers; + } + + public UpdateCustomActionRequest name(@javax.annotation.Nullable String name) { + this.name = name; + return this; + } + + /** + * Name of the custom action. The custom action name must be unique. + * + * @return name + */ + @javax.annotation.Nullable + public String getName() { + return name; + } + + public void setName(@javax.annotation.Nullable String name) { + this.name = name; + } + + public UpdateCustomActionRequest operation(@javax.annotation.Nullable OperationEnum operation) { + this.operation = operation; + return this; + } + + /** + * Type of update operation. Default operation type is ADD + * + * @return operation + */ + @javax.annotation.Nullable + public OperationEnum getOperation() { + return operation; + } + + public void setOperation(@javax.annotation.Nullable OperationEnum operation) { + this.operation = operation; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key name of the property + * @param value value of the property + * @return the UpdateCustomActionRequest instance itself + */ + public UpdateCustomActionRequest putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return a map of objects + */ + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key name of the property + * @return an object + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + UpdateCustomActionRequest updateCustomActionRequest = (UpdateCustomActionRequest) o; + return Objects.equals(this.actionDetails, updateCustomActionRequest.actionDetails) + && Objects.equals( + this.associateMetadata, updateCustomActionRequest.associateMetadata) + && Objects.equals( + this.defaultActionConfig, updateCustomActionRequest.defaultActionConfig) + && Objects.equals(this.groupIdentifiers, updateCustomActionRequest.groupIdentifiers) + && Objects.equals(this.name, updateCustomActionRequest.name) + && Objects.equals(this.operation, updateCustomActionRequest.operation) + && Objects.equals( + this.additionalProperties, updateCustomActionRequest.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash( + actionDetails, + associateMetadata, + defaultActionConfig, + groupIdentifiers, + name, + operation, + additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class UpdateCustomActionRequest {\n"); + sb.append(" actionDetails: ").append(toIndentedString(actionDetails)).append("\n"); + sb.append(" associateMetadata: ") + .append(toIndentedString(associateMetadata)) + .append("\n"); + sb.append(" defaultActionConfig: ") + .append(toIndentedString(defaultActionConfig)) + .append("\n"); + sb.append(" groupIdentifiers: ").append(toIndentedString(groupIdentifiers)).append("\n"); + sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append(" operation: ").append(toIndentedString(operation)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first + * line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("action_details"); + openapiFields.add("associate_metadata"); + openapiFields.add("default_action_config"); + openapiFields.add("group_identifiers"); + openapiFields.add("name"); + openapiFields.add("operation"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to UpdateCustomActionRequest + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!UpdateCustomActionRequest.openapiRequiredFields + .isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException( + String.format( + "The required field(s) %s in UpdateCustomActionRequest is not" + + " found in the empty JSON string", + UpdateCustomActionRequest.openapiRequiredFields.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // validate the optional field `action_details` + if (jsonObj.get("action_details") != null && !jsonObj.get("action_details").isJsonNull()) { + ActionDetailsInput.validateJsonElement(jsonObj.get("action_details")); + } + if (jsonObj.get("associate_metadata") != null + && !jsonObj.get("associate_metadata").isJsonNull()) { + JsonArray jsonArrayassociateMetadata = jsonObj.getAsJsonArray("associate_metadata"); + if (jsonArrayassociateMetadata != null) { + // ensure the json data is an array + if (!jsonObj.get("associate_metadata").isJsonArray()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `associate_metadata` to be an array in the" + + " JSON string but got `%s`", + jsonObj.get("associate_metadata").toString())); + } + + // validate the optional field `associate_metadata` (array) + for (int i = 0; i < jsonArrayassociateMetadata.size(); i++) { + AssociateMetadataInput.validateJsonElement(jsonArrayassociateMetadata.get(i)); + } + ; + } + } + // validate the optional field `default_action_config` + if (jsonObj.get("default_action_config") != null + && !jsonObj.get("default_action_config").isJsonNull()) { + DefaultActionConfigInput.validateJsonElement(jsonObj.get("default_action_config")); + } + // ensure the optional json data is an array if present + if (jsonObj.get("group_identifiers") != null + && !jsonObj.get("group_identifiers").isJsonNull() + && !jsonObj.get("group_identifiers").isJsonArray()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `group_identifiers` to be an array in the JSON" + + " string but got `%s`", + jsonObj.get("group_identifiers").toString())); + } + if ((jsonObj.get("name") != null && !jsonObj.get("name").isJsonNull()) + && !jsonObj.get("name").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `name` to be a primitive type in the JSON string" + + " but got `%s`", + jsonObj.get("name").toString())); + } + if ((jsonObj.get("operation") != null && !jsonObj.get("operation").isJsonNull()) + && !jsonObj.get("operation").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `operation` to be a primitive type in the JSON" + + " string but got `%s`", + jsonObj.get("operation").toString())); + } + // validate the optional field `operation` + if (jsonObj.get("operation") != null && !jsonObj.get("operation").isJsonNull()) { + OperationEnum.validateJsonElement(jsonObj.get("operation")); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!UpdateCustomActionRequest.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'UpdateCustomActionRequest' and its + // subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter = + gson.getDelegateAdapter(this, TypeToken.get(UpdateCustomActionRequest.class)); + + return (TypeAdapter) + new TypeAdapter() { + @Override + public void write(JsonWriter out, UpdateCustomActionRequest value) + throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + obj.remove("additionalProperties"); + // serialize additional properties + if (value.getAdditionalProperties() != null) { + for (Map.Entry entry : + value.getAdditionalProperties().entrySet()) { + if (entry.getValue() instanceof String) + obj.addProperty(entry.getKey(), (String) entry.getValue()); + else if (entry.getValue() instanceof Number) + obj.addProperty(entry.getKey(), (Number) entry.getValue()); + else if (entry.getValue() instanceof Boolean) + obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); + else if (entry.getValue() instanceof Character) + obj.addProperty( + entry.getKey(), (Character) entry.getValue()); + else { + JsonElement jsonElement = gson.toJsonTree(entry.getValue()); + if (jsonElement.isJsonArray()) { + obj.add(entry.getKey(), jsonElement.getAsJsonArray()); + } else { + obj.add(entry.getKey(), jsonElement.getAsJsonObject()); + } + } + } + } + elementAdapter.write(out, obj); + } + + @Override + public UpdateCustomActionRequest read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // store additional fields in the deserialized instance + UpdateCustomActionRequest instance = thisAdapter.fromJsonTree(jsonObj); + for (Map.Entry entry : jsonObj.entrySet()) { + if (!openapiFields.contains(entry.getKey())) { + if (entry.getValue().isJsonPrimitive()) { // primitive type + if (entry.getValue().getAsJsonPrimitive().isString()) + instance.putAdditionalProperty( + entry.getKey(), entry.getValue().getAsString()); + else if (entry.getValue().getAsJsonPrimitive().isNumber()) + instance.putAdditionalProperty( + entry.getKey(), entry.getValue().getAsNumber()); + else if (entry.getValue().getAsJsonPrimitive().isBoolean()) + instance.putAdditionalProperty( + entry.getKey(), + entry.getValue().getAsBoolean()); + else + throw new IllegalArgumentException( + String.format( + "The field `%s` has unknown primitive" + + " type. Value: %s", + entry.getKey(), + entry.getValue().toString())); + } else if (entry.getValue().isJsonArray()) { + instance.putAdditionalProperty( + entry.getKey(), + gson.fromJson(entry.getValue(), List.class)); + } else { // JSON object + instance.putAdditionalProperty( + entry.getKey(), + gson.fromJson(entry.getValue(), HashMap.class)); + } + } + } + return instance; + } + }.nullSafe(); + } + } + + /** + * Create an instance of UpdateCustomActionRequest given an JSON string + * + * @param jsonString JSON string + * @return An instance of UpdateCustomActionRequest + * @throws IOException if the JSON string is invalid with respect to UpdateCustomActionRequest + */ + public static UpdateCustomActionRequest fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, UpdateCustomActionRequest.class); + } + + /** + * Convert an instance of UpdateCustomActionRequest to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} diff --git a/sdks/java/src/main/java/com/thoughtspot/client/model/UpdateEmailCustomizationRequest.java b/sdks/java/src/main/java/com/thoughtspot/client/model/UpdateEmailCustomizationRequest.java new file mode 100644 index 000000000..b88045355 --- /dev/null +++ b/sdks/java/src/main/java/com/thoughtspot/client/model/UpdateEmailCustomizationRequest.java @@ -0,0 +1,347 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client.model; + +import com.google.gson.Gson; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.TypeAdapter; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.annotations.SerializedName; +import com.google.gson.reflect.TypeToken; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import com.thoughtspot.client.JSON; +import java.io.IOException; +import java.io.Serializable; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Objects; + +/** UpdateEmailCustomizationRequest */ +@javax.annotation.Generated( + value = "org.openapitools.codegen.languages.JavaClientCodegen", + comments = "Generator version: 7.12.0") +public class UpdateEmailCustomizationRequest implements Serializable { + private static final long serialVersionUID = 1L; + + public static final String SERIALIZED_NAME_TEMPLATE_PROPERTIES = "template_properties"; + + @SerializedName(SERIALIZED_NAME_TEMPLATE_PROPERTIES) + @javax.annotation.Nonnull + private TemplatePropertiesInputCreate templateProperties; + + public static final String SERIALIZED_NAME_ORG_IDENTIFIER = "org_identifier"; + + @SerializedName(SERIALIZED_NAME_ORG_IDENTIFIER) + @javax.annotation.Nullable + private String orgIdentifier; + + public UpdateEmailCustomizationRequest() {} + + public UpdateEmailCustomizationRequest templateProperties( + @javax.annotation.Nonnull TemplatePropertiesInputCreate templateProperties) { + this.templateProperties = templateProperties; + return this; + } + + /** + * Email customization configuration as key value pair + * + * @return templateProperties + */ + @javax.annotation.Nonnull + public TemplatePropertiesInputCreate getTemplateProperties() { + return templateProperties; + } + + public void setTemplateProperties( + @javax.annotation.Nonnull TemplatePropertiesInputCreate templateProperties) { + this.templateProperties = templateProperties; + } + + public UpdateEmailCustomizationRequest orgIdentifier( + @javax.annotation.Nullable String orgIdentifier) { + this.orgIdentifier = orgIdentifier; + return this; + } + + /** + * Unique ID or name of org + * + * @return orgIdentifier + */ + @javax.annotation.Nullable + public String getOrgIdentifier() { + return orgIdentifier; + } + + public void setOrgIdentifier(@javax.annotation.Nullable String orgIdentifier) { + this.orgIdentifier = orgIdentifier; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key name of the property + * @param value value of the property + * @return the UpdateEmailCustomizationRequest instance itself + */ + public UpdateEmailCustomizationRequest putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return a map of objects + */ + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key name of the property + * @return an object + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + UpdateEmailCustomizationRequest updateEmailCustomizationRequest = + (UpdateEmailCustomizationRequest) o; + return Objects.equals( + this.templateProperties, updateEmailCustomizationRequest.templateProperties) + && Objects.equals(this.orgIdentifier, updateEmailCustomizationRequest.orgIdentifier) + && Objects.equals( + this.additionalProperties, + updateEmailCustomizationRequest.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(templateProperties, orgIdentifier, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class UpdateEmailCustomizationRequest {\n"); + sb.append(" templateProperties: ") + .append(toIndentedString(templateProperties)) + .append("\n"); + sb.append(" orgIdentifier: ").append(toIndentedString(orgIdentifier)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first + * line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("template_properties"); + openapiFields.add("org_identifier"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + openapiRequiredFields.add("template_properties"); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to + * UpdateEmailCustomizationRequest + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!UpdateEmailCustomizationRequest.openapiRequiredFields + .isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException( + String.format( + "The required field(s) %s in UpdateEmailCustomizationRequest is" + + " not found in the empty JSON string", + UpdateEmailCustomizationRequest.openapiRequiredFields.toString())); + } + } + + // check to make sure all required properties/fields are present in the JSON string + for (String requiredField : UpdateEmailCustomizationRequest.openapiRequiredFields) { + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException( + String.format( + "The required field `%s` is not found in the JSON string: %s", + requiredField, jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // validate the required field `template_properties` + TemplatePropertiesInputCreate.validateJsonElement(jsonObj.get("template_properties")); + if ((jsonObj.get("org_identifier") != null && !jsonObj.get("org_identifier").isJsonNull()) + && !jsonObj.get("org_identifier").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `org_identifier` to be a primitive type in the" + + " JSON string but got `%s`", + jsonObj.get("org_identifier").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!UpdateEmailCustomizationRequest.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'UpdateEmailCustomizationRequest' and its + // subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter = + gson.getDelegateAdapter( + this, TypeToken.get(UpdateEmailCustomizationRequest.class)); + + return (TypeAdapter) + new TypeAdapter() { + @Override + public void write(JsonWriter out, UpdateEmailCustomizationRequest value) + throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + obj.remove("additionalProperties"); + // serialize additional properties + if (value.getAdditionalProperties() != null) { + for (Map.Entry entry : + value.getAdditionalProperties().entrySet()) { + if (entry.getValue() instanceof String) + obj.addProperty(entry.getKey(), (String) entry.getValue()); + else if (entry.getValue() instanceof Number) + obj.addProperty(entry.getKey(), (Number) entry.getValue()); + else if (entry.getValue() instanceof Boolean) + obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); + else if (entry.getValue() instanceof Character) + obj.addProperty( + entry.getKey(), (Character) entry.getValue()); + else { + JsonElement jsonElement = gson.toJsonTree(entry.getValue()); + if (jsonElement.isJsonArray()) { + obj.add(entry.getKey(), jsonElement.getAsJsonArray()); + } else { + obj.add(entry.getKey(), jsonElement.getAsJsonObject()); + } + } + } + } + elementAdapter.write(out, obj); + } + + @Override + public UpdateEmailCustomizationRequest read(JsonReader in) + throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // store additional fields in the deserialized instance + UpdateEmailCustomizationRequest instance = + thisAdapter.fromJsonTree(jsonObj); + for (Map.Entry entry : jsonObj.entrySet()) { + if (!openapiFields.contains(entry.getKey())) { + if (entry.getValue().isJsonPrimitive()) { // primitive type + if (entry.getValue().getAsJsonPrimitive().isString()) + instance.putAdditionalProperty( + entry.getKey(), entry.getValue().getAsString()); + else if (entry.getValue().getAsJsonPrimitive().isNumber()) + instance.putAdditionalProperty( + entry.getKey(), entry.getValue().getAsNumber()); + else if (entry.getValue().getAsJsonPrimitive().isBoolean()) + instance.putAdditionalProperty( + entry.getKey(), + entry.getValue().getAsBoolean()); + else + throw new IllegalArgumentException( + String.format( + "The field `%s` has unknown primitive" + + " type. Value: %s", + entry.getKey(), + entry.getValue().toString())); + } else if (entry.getValue().isJsonArray()) { + instance.putAdditionalProperty( + entry.getKey(), + gson.fromJson(entry.getValue(), List.class)); + } else { // JSON object + instance.putAdditionalProperty( + entry.getKey(), + gson.fromJson(entry.getValue(), HashMap.class)); + } + } + } + return instance; + } + }.nullSafe(); + } + } + + /** + * Create an instance of UpdateEmailCustomizationRequest given an JSON string + * + * @param jsonString JSON string + * @return An instance of UpdateEmailCustomizationRequest + * @throws IOException if the JSON string is invalid with respect to + * UpdateEmailCustomizationRequest + */ + public static UpdateEmailCustomizationRequest fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, UpdateEmailCustomizationRequest.class); + } + + /** + * Convert an instance of UpdateEmailCustomizationRequest to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} diff --git a/sdks/java/src/main/java/com/thoughtspot/client/model/UpdateMetadataHeaderRequest.java b/sdks/java/src/main/java/com/thoughtspot/client/model/UpdateMetadataHeaderRequest.java new file mode 100644 index 000000000..5ebdfd827 --- /dev/null +++ b/sdks/java/src/main/java/com/thoughtspot/client/model/UpdateMetadataHeaderRequest.java @@ -0,0 +1,362 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client.model; + +import com.google.gson.Gson; +import com.google.gson.JsonArray; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.TypeAdapter; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.annotations.SerializedName; +import com.google.gson.reflect.TypeToken; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import com.thoughtspot.client.JSON; +import java.io.IOException; +import java.io.Serializable; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Objects; + +/** UpdateMetadataHeaderRequest */ +@javax.annotation.Generated( + value = "org.openapitools.codegen.languages.JavaClientCodegen", + comments = "Generator version: 7.12.0") +public class UpdateMetadataHeaderRequest implements Serializable { + private static final long serialVersionUID = 1L; + + public static final String SERIALIZED_NAME_HEADERS_UPDATE = "headers_update"; + + @SerializedName(SERIALIZED_NAME_HEADERS_UPDATE) + @javax.annotation.Nonnull + private List headersUpdate; + + public static final String SERIALIZED_NAME_ORG_IDENTIFIER = "org_identifier"; + + @SerializedName(SERIALIZED_NAME_ORG_IDENTIFIER) + @javax.annotation.Nullable + private String orgIdentifier; + + public UpdateMetadataHeaderRequest() {} + + public UpdateMetadataHeaderRequest headersUpdate( + @javax.annotation.Nonnull List headersUpdate) { + this.headersUpdate = headersUpdate; + return this; + } + + public UpdateMetadataHeaderRequest addHeadersUpdateItem(HeaderUpdateInput headersUpdateItem) { + if (this.headersUpdate == null) { + this.headersUpdate = new ArrayList<>(); + } + this.headersUpdate.add(headersUpdateItem); + return this; + } + + /** + * List of header objects to update. + * + * @return headersUpdate + */ + @javax.annotation.Nonnull + public List getHeadersUpdate() { + return headersUpdate; + } + + public void setHeadersUpdate(@javax.annotation.Nonnull List headersUpdate) { + this.headersUpdate = headersUpdate; + } + + public UpdateMetadataHeaderRequest orgIdentifier( + @javax.annotation.Nullable String orgIdentifier) { + this.orgIdentifier = orgIdentifier; + return this; + } + + /** + * Unique ID or name of the organization. + * + * @return orgIdentifier + */ + @javax.annotation.Nullable + public String getOrgIdentifier() { + return orgIdentifier; + } + + public void setOrgIdentifier(@javax.annotation.Nullable String orgIdentifier) { + this.orgIdentifier = orgIdentifier; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key name of the property + * @param value value of the property + * @return the UpdateMetadataHeaderRequest instance itself + */ + public UpdateMetadataHeaderRequest putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return a map of objects + */ + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key name of the property + * @return an object + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + UpdateMetadataHeaderRequest updateMetadataHeaderRequest = (UpdateMetadataHeaderRequest) o; + return Objects.equals(this.headersUpdate, updateMetadataHeaderRequest.headersUpdate) + && Objects.equals(this.orgIdentifier, updateMetadataHeaderRequest.orgIdentifier) + && Objects.equals( + this.additionalProperties, + updateMetadataHeaderRequest.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(headersUpdate, orgIdentifier, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class UpdateMetadataHeaderRequest {\n"); + sb.append(" headersUpdate: ").append(toIndentedString(headersUpdate)).append("\n"); + sb.append(" orgIdentifier: ").append(toIndentedString(orgIdentifier)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first + * line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("headers_update"); + openapiFields.add("org_identifier"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + openapiRequiredFields.add("headers_update"); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to + * UpdateMetadataHeaderRequest + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!UpdateMetadataHeaderRequest.openapiRequiredFields + .isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException( + String.format( + "The required field(s) %s in UpdateMetadataHeaderRequest is not" + + " found in the empty JSON string", + UpdateMetadataHeaderRequest.openapiRequiredFields.toString())); + } + } + + // check to make sure all required properties/fields are present in the JSON string + for (String requiredField : UpdateMetadataHeaderRequest.openapiRequiredFields) { + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException( + String.format( + "The required field `%s` is not found in the JSON string: %s", + requiredField, jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // ensure the json data is an array + if (!jsonObj.get("headers_update").isJsonArray()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `headers_update` to be an array in the JSON string" + + " but got `%s`", + jsonObj.get("headers_update").toString())); + } + + JsonArray jsonArrayheadersUpdate = jsonObj.getAsJsonArray("headers_update"); + // validate the required field `headers_update` (array) + for (int i = 0; i < jsonArrayheadersUpdate.size(); i++) { + HeaderUpdateInput.validateJsonElement(jsonArrayheadersUpdate.get(i)); + } + ; + if ((jsonObj.get("org_identifier") != null && !jsonObj.get("org_identifier").isJsonNull()) + && !jsonObj.get("org_identifier").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `org_identifier` to be a primitive type in the" + + " JSON string but got `%s`", + jsonObj.get("org_identifier").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!UpdateMetadataHeaderRequest.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'UpdateMetadataHeaderRequest' and its + // subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter = + gson.getDelegateAdapter(this, TypeToken.get(UpdateMetadataHeaderRequest.class)); + + return (TypeAdapter) + new TypeAdapter() { + @Override + public void write(JsonWriter out, UpdateMetadataHeaderRequest value) + throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + obj.remove("additionalProperties"); + // serialize additional properties + if (value.getAdditionalProperties() != null) { + for (Map.Entry entry : + value.getAdditionalProperties().entrySet()) { + if (entry.getValue() instanceof String) + obj.addProperty(entry.getKey(), (String) entry.getValue()); + else if (entry.getValue() instanceof Number) + obj.addProperty(entry.getKey(), (Number) entry.getValue()); + else if (entry.getValue() instanceof Boolean) + obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); + else if (entry.getValue() instanceof Character) + obj.addProperty( + entry.getKey(), (Character) entry.getValue()); + else { + JsonElement jsonElement = gson.toJsonTree(entry.getValue()); + if (jsonElement.isJsonArray()) { + obj.add(entry.getKey(), jsonElement.getAsJsonArray()); + } else { + obj.add(entry.getKey(), jsonElement.getAsJsonObject()); + } + } + } + } + elementAdapter.write(out, obj); + } + + @Override + public UpdateMetadataHeaderRequest read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // store additional fields in the deserialized instance + UpdateMetadataHeaderRequest instance = + thisAdapter.fromJsonTree(jsonObj); + for (Map.Entry entry : jsonObj.entrySet()) { + if (!openapiFields.contains(entry.getKey())) { + if (entry.getValue().isJsonPrimitive()) { // primitive type + if (entry.getValue().getAsJsonPrimitive().isString()) + instance.putAdditionalProperty( + entry.getKey(), entry.getValue().getAsString()); + else if (entry.getValue().getAsJsonPrimitive().isNumber()) + instance.putAdditionalProperty( + entry.getKey(), entry.getValue().getAsNumber()); + else if (entry.getValue().getAsJsonPrimitive().isBoolean()) + instance.putAdditionalProperty( + entry.getKey(), + entry.getValue().getAsBoolean()); + else + throw new IllegalArgumentException( + String.format( + "The field `%s` has unknown primitive" + + " type. Value: %s", + entry.getKey(), + entry.getValue().toString())); + } else if (entry.getValue().isJsonArray()) { + instance.putAdditionalProperty( + entry.getKey(), + gson.fromJson(entry.getValue(), List.class)); + } else { // JSON object + instance.putAdditionalProperty( + entry.getKey(), + gson.fromJson(entry.getValue(), HashMap.class)); + } + } + } + return instance; + } + }.nullSafe(); + } + } + + /** + * Create an instance of UpdateMetadataHeaderRequest given an JSON string + * + * @param jsonString JSON string + * @return An instance of UpdateMetadataHeaderRequest + * @throws IOException if the JSON string is invalid with respect to UpdateMetadataHeaderRequest + */ + public static UpdateMetadataHeaderRequest fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, UpdateMetadataHeaderRequest.class); + } + + /** + * Convert an instance of UpdateMetadataHeaderRequest to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} diff --git a/sdks/java/src/main/java/com/thoughtspot/client/model/UpdateMetadataObjIdRequest.java b/sdks/java/src/main/java/com/thoughtspot/client/model/UpdateMetadataObjIdRequest.java new file mode 100644 index 000000000..5209f68ef --- /dev/null +++ b/sdks/java/src/main/java/com/thoughtspot/client/model/UpdateMetadataObjIdRequest.java @@ -0,0 +1,322 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client.model; + +import com.google.gson.Gson; +import com.google.gson.JsonArray; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.TypeAdapter; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.annotations.SerializedName; +import com.google.gson.reflect.TypeToken; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import com.thoughtspot.client.JSON; +import java.io.IOException; +import java.io.Serializable; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Objects; + +/** UpdateMetadataObjIdRequest */ +@javax.annotation.Generated( + value = "org.openapitools.codegen.languages.JavaClientCodegen", + comments = "Generator version: 7.12.0") +public class UpdateMetadataObjIdRequest implements Serializable { + private static final long serialVersionUID = 1L; + + public static final String SERIALIZED_NAME_METADATA = "metadata"; + + @SerializedName(SERIALIZED_NAME_METADATA) + @javax.annotation.Nonnull + private List metadata; + + public UpdateMetadataObjIdRequest() {} + + public UpdateMetadataObjIdRequest metadata( + @javax.annotation.Nonnull List metadata) { + this.metadata = metadata; + return this; + } + + public UpdateMetadataObjIdRequest addMetadataItem(UpdateObjIdInput metadataItem) { + if (this.metadata == null) { + this.metadata = new ArrayList<>(); + } + this.metadata.add(metadataItem); + return this; + } + + /** + * List of metadata objects to update their object IDs. + * + * @return metadata + */ + @javax.annotation.Nonnull + public List getMetadata() { + return metadata; + } + + public void setMetadata(@javax.annotation.Nonnull List metadata) { + this.metadata = metadata; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key name of the property + * @param value value of the property + * @return the UpdateMetadataObjIdRequest instance itself + */ + public UpdateMetadataObjIdRequest putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return a map of objects + */ + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key name of the property + * @return an object + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + UpdateMetadataObjIdRequest updateMetadataObjIdRequest = (UpdateMetadataObjIdRequest) o; + return Objects.equals(this.metadata, updateMetadataObjIdRequest.metadata) + && Objects.equals( + this.additionalProperties, updateMetadataObjIdRequest.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(metadata, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class UpdateMetadataObjIdRequest {\n"); + sb.append(" metadata: ").append(toIndentedString(metadata)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first + * line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("metadata"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + openapiRequiredFields.add("metadata"); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to UpdateMetadataObjIdRequest + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!UpdateMetadataObjIdRequest.openapiRequiredFields + .isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException( + String.format( + "The required field(s) %s in UpdateMetadataObjIdRequest is not" + + " found in the empty JSON string", + UpdateMetadataObjIdRequest.openapiRequiredFields.toString())); + } + } + + // check to make sure all required properties/fields are present in the JSON string + for (String requiredField : UpdateMetadataObjIdRequest.openapiRequiredFields) { + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException( + String.format( + "The required field `%s` is not found in the JSON string: %s", + requiredField, jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // ensure the json data is an array + if (!jsonObj.get("metadata").isJsonArray()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `metadata` to be an array in the JSON string but" + + " got `%s`", + jsonObj.get("metadata").toString())); + } + + JsonArray jsonArraymetadata = jsonObj.getAsJsonArray("metadata"); + // validate the required field `metadata` (array) + for (int i = 0; i < jsonArraymetadata.size(); i++) { + UpdateObjIdInput.validateJsonElement(jsonArraymetadata.get(i)); + } + ; + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!UpdateMetadataObjIdRequest.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'UpdateMetadataObjIdRequest' and its + // subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter = + gson.getDelegateAdapter(this, TypeToken.get(UpdateMetadataObjIdRequest.class)); + + return (TypeAdapter) + new TypeAdapter() { + @Override + public void write(JsonWriter out, UpdateMetadataObjIdRequest value) + throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + obj.remove("additionalProperties"); + // serialize additional properties + if (value.getAdditionalProperties() != null) { + for (Map.Entry entry : + value.getAdditionalProperties().entrySet()) { + if (entry.getValue() instanceof String) + obj.addProperty(entry.getKey(), (String) entry.getValue()); + else if (entry.getValue() instanceof Number) + obj.addProperty(entry.getKey(), (Number) entry.getValue()); + else if (entry.getValue() instanceof Boolean) + obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); + else if (entry.getValue() instanceof Character) + obj.addProperty( + entry.getKey(), (Character) entry.getValue()); + else { + JsonElement jsonElement = gson.toJsonTree(entry.getValue()); + if (jsonElement.isJsonArray()) { + obj.add(entry.getKey(), jsonElement.getAsJsonArray()); + } else { + obj.add(entry.getKey(), jsonElement.getAsJsonObject()); + } + } + } + } + elementAdapter.write(out, obj); + } + + @Override + public UpdateMetadataObjIdRequest read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // store additional fields in the deserialized instance + UpdateMetadataObjIdRequest instance = thisAdapter.fromJsonTree(jsonObj); + for (Map.Entry entry : jsonObj.entrySet()) { + if (!openapiFields.contains(entry.getKey())) { + if (entry.getValue().isJsonPrimitive()) { // primitive type + if (entry.getValue().getAsJsonPrimitive().isString()) + instance.putAdditionalProperty( + entry.getKey(), entry.getValue().getAsString()); + else if (entry.getValue().getAsJsonPrimitive().isNumber()) + instance.putAdditionalProperty( + entry.getKey(), entry.getValue().getAsNumber()); + else if (entry.getValue().getAsJsonPrimitive().isBoolean()) + instance.putAdditionalProperty( + entry.getKey(), + entry.getValue().getAsBoolean()); + else + throw new IllegalArgumentException( + String.format( + "The field `%s` has unknown primitive" + + " type. Value: %s", + entry.getKey(), + entry.getValue().toString())); + } else if (entry.getValue().isJsonArray()) { + instance.putAdditionalProperty( + entry.getKey(), + gson.fromJson(entry.getValue(), List.class)); + } else { // JSON object + instance.putAdditionalProperty( + entry.getKey(), + gson.fromJson(entry.getValue(), HashMap.class)); + } + } + } + return instance; + } + }.nullSafe(); + } + } + + /** + * Create an instance of UpdateMetadataObjIdRequest given an JSON string + * + * @param jsonString JSON string + * @return An instance of UpdateMetadataObjIdRequest + * @throws IOException if the JSON string is invalid with respect to UpdateMetadataObjIdRequest + */ + public static UpdateMetadataObjIdRequest fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, UpdateMetadataObjIdRequest.class); + } + + /** + * Convert an instance of UpdateMetadataObjIdRequest to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} diff --git a/sdks/java/src/main/java/com/thoughtspot/client/model/UpdateObjIdInput.java b/sdks/java/src/main/java/com/thoughtspot/client/model/UpdateObjIdInput.java new file mode 100644 index 000000000..e47291f8b --- /dev/null +++ b/sdks/java/src/main/java/com/thoughtspot/client/model/UpdateObjIdInput.java @@ -0,0 +1,499 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client.model; + +import com.google.gson.Gson; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.TypeAdapter; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.reflect.TypeToken; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import com.thoughtspot.client.JSON; +import java.io.IOException; +import java.io.Serializable; +import java.util.Arrays; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Objects; +import org.openapitools.jackson.nullable.JsonNullable; + +/** Input for updating object ID of a metadata object. */ +@javax.annotation.Generated( + value = "org.openapitools.codegen.languages.JavaClientCodegen", + comments = "Generator version: 7.12.0") +public class UpdateObjIdInput implements Serializable { + private static final long serialVersionUID = 1L; + + public static final String SERIALIZED_NAME_METADATA_IDENTIFIER = "metadata_identifier"; + + @SerializedName(SERIALIZED_NAME_METADATA_IDENTIFIER) + @javax.annotation.Nullable + private String metadataIdentifier; + + /** Type of metadata. Required if metadata_identifier is name of the object. */ + @JsonAdapter(TypeEnum.Adapter.class) + public enum TypeEnum { + ANSWER("ANSWER"), + + LOGICAL_TABLE("LOGICAL_TABLE"), + + LOGICAL_COLUMN("LOGICAL_COLUMN"), + + LIVEBOARD("LIVEBOARD"), + + ACTION_OBJECT("ACTION_OBJECT"), + + DATA_SOURCE("DATA_SOURCE"), + + USER("USER"), + + USER_GROUP("USER_GROUP"); + + private String value; + + TypeEnum(String value) { + this.value = value; + } + + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + public static TypeEnum fromValue(String value) { + for (TypeEnum b : TypeEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + return null; + } + + public static class Adapter extends TypeAdapter { + @Override + public void write(final JsonWriter jsonWriter, final TypeEnum enumeration) + throws IOException { + jsonWriter.value(enumeration.getValue()); + } + + @Override + public TypeEnum read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + return TypeEnum.fromValue(value); + } + } + + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + String value = jsonElement.getAsString(); + TypeEnum.fromValue(value); + } + } + + public static final String SERIALIZED_NAME_TYPE = "type"; + + @SerializedName(SERIALIZED_NAME_TYPE) + @javax.annotation.Nullable + private TypeEnum type; + + public static final String SERIALIZED_NAME_CURRENT_OBJ_ID = "current_obj_id"; + + @SerializedName(SERIALIZED_NAME_CURRENT_OBJ_ID) + @javax.annotation.Nullable + private String currentObjId; + + public static final String SERIALIZED_NAME_NEW_OBJ_ID = "new_obj_id"; + + @SerializedName(SERIALIZED_NAME_NEW_OBJ_ID) + @javax.annotation.Nonnull + private String newObjId; + + public UpdateObjIdInput() {} + + public UpdateObjIdInput metadataIdentifier( + @javax.annotation.Nullable String metadataIdentifier) { + this.metadataIdentifier = metadataIdentifier; + return this; + } + + /** + * GUID or name of the metadata object. + * + * @return metadataIdentifier + */ + @javax.annotation.Nullable + public String getMetadataIdentifier() { + return metadataIdentifier; + } + + public void setMetadataIdentifier(@javax.annotation.Nullable String metadataIdentifier) { + this.metadataIdentifier = metadataIdentifier; + } + + public UpdateObjIdInput type(@javax.annotation.Nullable TypeEnum type) { + this.type = type; + return this; + } + + /** + * Type of metadata. Required if metadata_identifier is name of the object. + * + * @return type + */ + @javax.annotation.Nullable + public TypeEnum getType() { + return type; + } + + public void setType(@javax.annotation.Nullable TypeEnum type) { + this.type = type; + } + + public UpdateObjIdInput currentObjId(@javax.annotation.Nullable String currentObjId) { + this.currentObjId = currentObjId; + return this; + } + + /** + * Current object ID value. + * + * @return currentObjId + */ + @javax.annotation.Nullable + public String getCurrentObjId() { + return currentObjId; + } + + public void setCurrentObjId(@javax.annotation.Nullable String currentObjId) { + this.currentObjId = currentObjId; + } + + public UpdateObjIdInput newObjId(@javax.annotation.Nonnull String newObjId) { + this.newObjId = newObjId; + return this; + } + + /** + * New object ID value to set. + * + * @return newObjId + */ + @javax.annotation.Nonnull + public String getNewObjId() { + return newObjId; + } + + public void setNewObjId(@javax.annotation.Nonnull String newObjId) { + this.newObjId = newObjId; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key name of the property + * @param value value of the property + * @return the UpdateObjIdInput instance itself + */ + public UpdateObjIdInput putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return a map of objects + */ + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key name of the property + * @return an object + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + UpdateObjIdInput updateObjIdInput = (UpdateObjIdInput) o; + return Objects.equals(this.metadataIdentifier, updateObjIdInput.metadataIdentifier) + && Objects.equals(this.type, updateObjIdInput.type) + && Objects.equals(this.currentObjId, updateObjIdInput.currentObjId) + && Objects.equals(this.newObjId, updateObjIdInput.newObjId) + && Objects.equals(this.additionalProperties, updateObjIdInput.additionalProperties); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b + || (a != null + && b != null + && a.isPresent() + && b.isPresent() + && Objects.deepEquals(a.get(), b.get())); + } + + @Override + public int hashCode() { + return Objects.hash(metadataIdentifier, type, currentObjId, newObjId, additionalProperties); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; + } + return a.isPresent() ? Arrays.deepHashCode(new Object[] {a.get()}) : 31; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class UpdateObjIdInput {\n"); + sb.append(" metadataIdentifier: ") + .append(toIndentedString(metadataIdentifier)) + .append("\n"); + sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append(" currentObjId: ").append(toIndentedString(currentObjId)).append("\n"); + sb.append(" newObjId: ").append(toIndentedString(newObjId)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first + * line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("metadata_identifier"); + openapiFields.add("type"); + openapiFields.add("current_obj_id"); + openapiFields.add("new_obj_id"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + openapiRequiredFields.add("new_obj_id"); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to UpdateObjIdInput + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!UpdateObjIdInput.openapiRequiredFields + .isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException( + String.format( + "The required field(s) %s in UpdateObjIdInput is not found in the" + + " empty JSON string", + UpdateObjIdInput.openapiRequiredFields.toString())); + } + } + + // check to make sure all required properties/fields are present in the JSON string + for (String requiredField : UpdateObjIdInput.openapiRequiredFields) { + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException( + String.format( + "The required field `%s` is not found in the JSON string: %s", + requiredField, jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if ((jsonObj.get("metadata_identifier") != null + && !jsonObj.get("metadata_identifier").isJsonNull()) + && !jsonObj.get("metadata_identifier").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `metadata_identifier` to be a primitive type in" + + " the JSON string but got `%s`", + jsonObj.get("metadata_identifier").toString())); + } + if ((jsonObj.get("type") != null && !jsonObj.get("type").isJsonNull()) + && !jsonObj.get("type").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `type` to be a primitive type in the JSON string" + + " but got `%s`", + jsonObj.get("type").toString())); + } + // validate the optional field `type` + if (jsonObj.get("type") != null && !jsonObj.get("type").isJsonNull()) { + TypeEnum.validateJsonElement(jsonObj.get("type")); + } + if ((jsonObj.get("current_obj_id") != null && !jsonObj.get("current_obj_id").isJsonNull()) + && !jsonObj.get("current_obj_id").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `current_obj_id` to be a primitive type in the" + + " JSON string but got `%s`", + jsonObj.get("current_obj_id").toString())); + } + if (!jsonObj.get("new_obj_id").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `new_obj_id` to be a primitive type in the JSON" + + " string but got `%s`", + jsonObj.get("new_obj_id").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!UpdateObjIdInput.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'UpdateObjIdInput' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter = + gson.getDelegateAdapter(this, TypeToken.get(UpdateObjIdInput.class)); + + return (TypeAdapter) + new TypeAdapter() { + @Override + public void write(JsonWriter out, UpdateObjIdInput value) + throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + obj.remove("additionalProperties"); + // serialize additional properties + if (value.getAdditionalProperties() != null) { + for (Map.Entry entry : + value.getAdditionalProperties().entrySet()) { + if (entry.getValue() instanceof String) + obj.addProperty(entry.getKey(), (String) entry.getValue()); + else if (entry.getValue() instanceof Number) + obj.addProperty(entry.getKey(), (Number) entry.getValue()); + else if (entry.getValue() instanceof Boolean) + obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); + else if (entry.getValue() instanceof Character) + obj.addProperty( + entry.getKey(), (Character) entry.getValue()); + else { + JsonElement jsonElement = gson.toJsonTree(entry.getValue()); + if (jsonElement.isJsonArray()) { + obj.add(entry.getKey(), jsonElement.getAsJsonArray()); + } else { + obj.add(entry.getKey(), jsonElement.getAsJsonObject()); + } + } + } + } + elementAdapter.write(out, obj); + } + + @Override + public UpdateObjIdInput read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // store additional fields in the deserialized instance + UpdateObjIdInput instance = thisAdapter.fromJsonTree(jsonObj); + for (Map.Entry entry : jsonObj.entrySet()) { + if (!openapiFields.contains(entry.getKey())) { + if (entry.getValue().isJsonPrimitive()) { // primitive type + if (entry.getValue().getAsJsonPrimitive().isString()) + instance.putAdditionalProperty( + entry.getKey(), entry.getValue().getAsString()); + else if (entry.getValue().getAsJsonPrimitive().isNumber()) + instance.putAdditionalProperty( + entry.getKey(), entry.getValue().getAsNumber()); + else if (entry.getValue().getAsJsonPrimitive().isBoolean()) + instance.putAdditionalProperty( + entry.getKey(), + entry.getValue().getAsBoolean()); + else + throw new IllegalArgumentException( + String.format( + "The field `%s` has unknown primitive" + + " type. Value: %s", + entry.getKey(), + entry.getValue().toString())); + } else if (entry.getValue().isJsonArray()) { + instance.putAdditionalProperty( + entry.getKey(), + gson.fromJson(entry.getValue(), List.class)); + } else { // JSON object + instance.putAdditionalProperty( + entry.getKey(), + gson.fromJson(entry.getValue(), HashMap.class)); + } + } + } + return instance; + } + }.nullSafe(); + } + } + + /** + * Create an instance of UpdateObjIdInput given an JSON string + * + * @param jsonString JSON string + * @return An instance of UpdateObjIdInput + * @throws IOException if the JSON string is invalid with respect to UpdateObjIdInput + */ + public static UpdateObjIdInput fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, UpdateObjIdInput.class); + } + + /** + * Convert an instance of UpdateObjIdInput to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} diff --git a/sdks/java/src/main/java/com/thoughtspot/client/model/UpdateOrgRequest.java b/sdks/java/src/main/java/com/thoughtspot/client/model/UpdateOrgRequest.java new file mode 100644 index 000000000..cfcca0375 --- /dev/null +++ b/sdks/java/src/main/java/com/thoughtspot/client/model/UpdateOrgRequest.java @@ -0,0 +1,522 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client.model; + +import com.google.gson.Gson; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.TypeAdapter; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.reflect.TypeToken; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import com.thoughtspot.client.JSON; +import java.io.IOException; +import java.io.Serializable; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Objects; + +/** UpdateOrgRequest */ +@javax.annotation.Generated( + value = "org.openapitools.codegen.languages.JavaClientCodegen", + comments = "Generator version: 7.12.0") +public class UpdateOrgRequest implements Serializable { + private static final long serialVersionUID = 1L; + + public static final String SERIALIZED_NAME_NAME = "name"; + + @SerializedName(SERIALIZED_NAME_NAME) + @javax.annotation.Nullable + private String name; + + public static final String SERIALIZED_NAME_DESCRIPTION = "description"; + + @SerializedName(SERIALIZED_NAME_DESCRIPTION) + @javax.annotation.Nullable + private String description; + + public static final String SERIALIZED_NAME_USER_IDENTIFIERS = "user_identifiers"; + + @SerializedName(SERIALIZED_NAME_USER_IDENTIFIERS) + @javax.annotation.Nullable + private List userIdentifiers; + + public static final String SERIALIZED_NAME_GROUP_IDENTIFIERS = "group_identifiers"; + + @SerializedName(SERIALIZED_NAME_GROUP_IDENTIFIERS) + @javax.annotation.Nullable + private List groupIdentifiers; + + /** Type of update operation. Default operation type is ADD */ + @JsonAdapter(OperationEnum.Adapter.class) + public enum OperationEnum { + ADD("ADD"), + + REMOVE("REMOVE"), + + REPLACE("REPLACE"); + + private String value; + + OperationEnum(String value) { + this.value = value; + } + + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + public static OperationEnum fromValue(String value) { + for (OperationEnum b : OperationEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + + public static class Adapter extends TypeAdapter { + @Override + public void write(final JsonWriter jsonWriter, final OperationEnum enumeration) + throws IOException { + jsonWriter.value(enumeration.getValue()); + } + + @Override + public OperationEnum read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + return OperationEnum.fromValue(value); + } + } + + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + String value = jsonElement.getAsString(); + OperationEnum.fromValue(value); + } + } + + public static final String SERIALIZED_NAME_OPERATION = "operation"; + + @SerializedName(SERIALIZED_NAME_OPERATION) + @javax.annotation.Nullable + private OperationEnum operation = OperationEnum.ADD; + + public UpdateOrgRequest() {} + + public UpdateOrgRequest name(@javax.annotation.Nullable String name) { + this.name = name; + return this; + } + + /** + * Name of the Org + * + * @return name + */ + @javax.annotation.Nullable + public String getName() { + return name; + } + + public void setName(@javax.annotation.Nullable String name) { + this.name = name; + } + + public UpdateOrgRequest description(@javax.annotation.Nullable String description) { + this.description = description; + return this; + } + + /** + * Description of the Org + * + * @return description + */ + @javax.annotation.Nullable + public String getDescription() { + return description; + } + + public void setDescription(@javax.annotation.Nullable String description) { + this.description = description; + } + + public UpdateOrgRequest userIdentifiers( + @javax.annotation.Nullable List userIdentifiers) { + this.userIdentifiers = userIdentifiers; + return this; + } + + public UpdateOrgRequest addUserIdentifiersItem(String userIdentifiersItem) { + if (this.userIdentifiers == null) { + this.userIdentifiers = new ArrayList<>(); + } + this.userIdentifiers.add(userIdentifiersItem); + return this; + } + + /** + * Add Users to an Org + * + * @return userIdentifiers + */ + @javax.annotation.Nullable + public List getUserIdentifiers() { + return userIdentifiers; + } + + public void setUserIdentifiers(@javax.annotation.Nullable List userIdentifiers) { + this.userIdentifiers = userIdentifiers; + } + + public UpdateOrgRequest groupIdentifiers( + @javax.annotation.Nullable List groupIdentifiers) { + this.groupIdentifiers = groupIdentifiers; + return this; + } + + public UpdateOrgRequest addGroupIdentifiersItem(String groupIdentifiersItem) { + if (this.groupIdentifiers == null) { + this.groupIdentifiers = new ArrayList<>(); + } + this.groupIdentifiers.add(groupIdentifiersItem); + return this; + } + + /** + * Add Default Groups to an Org + * + * @return groupIdentifiers + */ + @javax.annotation.Nullable + public List getGroupIdentifiers() { + return groupIdentifiers; + } + + public void setGroupIdentifiers(@javax.annotation.Nullable List groupIdentifiers) { + this.groupIdentifiers = groupIdentifiers; + } + + public UpdateOrgRequest operation(@javax.annotation.Nullable OperationEnum operation) { + this.operation = operation; + return this; + } + + /** + * Type of update operation. Default operation type is ADD + * + * @return operation + */ + @javax.annotation.Nullable + public OperationEnum getOperation() { + return operation; + } + + public void setOperation(@javax.annotation.Nullable OperationEnum operation) { + this.operation = operation; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key name of the property + * @param value value of the property + * @return the UpdateOrgRequest instance itself + */ + public UpdateOrgRequest putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return a map of objects + */ + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key name of the property + * @return an object + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + UpdateOrgRequest updateOrgRequest = (UpdateOrgRequest) o; + return Objects.equals(this.name, updateOrgRequest.name) + && Objects.equals(this.description, updateOrgRequest.description) + && Objects.equals(this.userIdentifiers, updateOrgRequest.userIdentifiers) + && Objects.equals(this.groupIdentifiers, updateOrgRequest.groupIdentifiers) + && Objects.equals(this.operation, updateOrgRequest.operation) + && Objects.equals(this.additionalProperties, updateOrgRequest.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash( + name, + description, + userIdentifiers, + groupIdentifiers, + operation, + additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class UpdateOrgRequest {\n"); + sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append(" description: ").append(toIndentedString(description)).append("\n"); + sb.append(" userIdentifiers: ").append(toIndentedString(userIdentifiers)).append("\n"); + sb.append(" groupIdentifiers: ").append(toIndentedString(groupIdentifiers)).append("\n"); + sb.append(" operation: ").append(toIndentedString(operation)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first + * line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("name"); + openapiFields.add("description"); + openapiFields.add("user_identifiers"); + openapiFields.add("group_identifiers"); + openapiFields.add("operation"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to UpdateOrgRequest + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!UpdateOrgRequest.openapiRequiredFields + .isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException( + String.format( + "The required field(s) %s in UpdateOrgRequest is not found in the" + + " empty JSON string", + UpdateOrgRequest.openapiRequiredFields.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if ((jsonObj.get("name") != null && !jsonObj.get("name").isJsonNull()) + && !jsonObj.get("name").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `name` to be a primitive type in the JSON string" + + " but got `%s`", + jsonObj.get("name").toString())); + } + if ((jsonObj.get("description") != null && !jsonObj.get("description").isJsonNull()) + && !jsonObj.get("description").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `description` to be a primitive type in the JSON" + + " string but got `%s`", + jsonObj.get("description").toString())); + } + // ensure the optional json data is an array if present + if (jsonObj.get("user_identifiers") != null + && !jsonObj.get("user_identifiers").isJsonNull() + && !jsonObj.get("user_identifiers").isJsonArray()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `user_identifiers` to be an array in the JSON" + + " string but got `%s`", + jsonObj.get("user_identifiers").toString())); + } + // ensure the optional json data is an array if present + if (jsonObj.get("group_identifiers") != null + && !jsonObj.get("group_identifiers").isJsonNull() + && !jsonObj.get("group_identifiers").isJsonArray()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `group_identifiers` to be an array in the JSON" + + " string but got `%s`", + jsonObj.get("group_identifiers").toString())); + } + if ((jsonObj.get("operation") != null && !jsonObj.get("operation").isJsonNull()) + && !jsonObj.get("operation").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `operation` to be a primitive type in the JSON" + + " string but got `%s`", + jsonObj.get("operation").toString())); + } + // validate the optional field `operation` + if (jsonObj.get("operation") != null && !jsonObj.get("operation").isJsonNull()) { + OperationEnum.validateJsonElement(jsonObj.get("operation")); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!UpdateOrgRequest.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'UpdateOrgRequest' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter = + gson.getDelegateAdapter(this, TypeToken.get(UpdateOrgRequest.class)); + + return (TypeAdapter) + new TypeAdapter() { + @Override + public void write(JsonWriter out, UpdateOrgRequest value) + throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + obj.remove("additionalProperties"); + // serialize additional properties + if (value.getAdditionalProperties() != null) { + for (Map.Entry entry : + value.getAdditionalProperties().entrySet()) { + if (entry.getValue() instanceof String) + obj.addProperty(entry.getKey(), (String) entry.getValue()); + else if (entry.getValue() instanceof Number) + obj.addProperty(entry.getKey(), (Number) entry.getValue()); + else if (entry.getValue() instanceof Boolean) + obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); + else if (entry.getValue() instanceof Character) + obj.addProperty( + entry.getKey(), (Character) entry.getValue()); + else { + JsonElement jsonElement = gson.toJsonTree(entry.getValue()); + if (jsonElement.isJsonArray()) { + obj.add(entry.getKey(), jsonElement.getAsJsonArray()); + } else { + obj.add(entry.getKey(), jsonElement.getAsJsonObject()); + } + } + } + } + elementAdapter.write(out, obj); + } + + @Override + public UpdateOrgRequest read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // store additional fields in the deserialized instance + UpdateOrgRequest instance = thisAdapter.fromJsonTree(jsonObj); + for (Map.Entry entry : jsonObj.entrySet()) { + if (!openapiFields.contains(entry.getKey())) { + if (entry.getValue().isJsonPrimitive()) { // primitive type + if (entry.getValue().getAsJsonPrimitive().isString()) + instance.putAdditionalProperty( + entry.getKey(), entry.getValue().getAsString()); + else if (entry.getValue().getAsJsonPrimitive().isNumber()) + instance.putAdditionalProperty( + entry.getKey(), entry.getValue().getAsNumber()); + else if (entry.getValue().getAsJsonPrimitive().isBoolean()) + instance.putAdditionalProperty( + entry.getKey(), + entry.getValue().getAsBoolean()); + else + throw new IllegalArgumentException( + String.format( + "The field `%s` has unknown primitive" + + " type. Value: %s", + entry.getKey(), + entry.getValue().toString())); + } else if (entry.getValue().isJsonArray()) { + instance.putAdditionalProperty( + entry.getKey(), + gson.fromJson(entry.getValue(), List.class)); + } else { // JSON object + instance.putAdditionalProperty( + entry.getKey(), + gson.fromJson(entry.getValue(), HashMap.class)); + } + } + } + return instance; + } + }.nullSafe(); + } + } + + /** + * Create an instance of UpdateOrgRequest given an JSON string + * + * @param jsonString JSON string + * @return An instance of UpdateOrgRequest + * @throws IOException if the JSON string is invalid with respect to UpdateOrgRequest + */ + public static UpdateOrgRequest fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, UpdateOrgRequest.class); + } + + /** + * Convert an instance of UpdateOrgRequest to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} diff --git a/sdks/java/src/main/java/com/thoughtspot/client/model/UpdateRoleRequest.java b/sdks/java/src/main/java/com/thoughtspot/client/model/UpdateRoleRequest.java new file mode 100644 index 000000000..5d9e9f9c1 --- /dev/null +++ b/sdks/java/src/main/java/com/thoughtspot/client/model/UpdateRoleRequest.java @@ -0,0 +1,516 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client.model; + +import com.google.gson.Gson; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.TypeAdapter; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.reflect.TypeToken; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import com.thoughtspot.client.JSON; +import java.io.IOException; +import java.io.Serializable; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Objects; + +/** UpdateRoleRequest */ +@javax.annotation.Generated( + value = "org.openapitools.codegen.languages.JavaClientCodegen", + comments = "Generator version: 7.12.0") +public class UpdateRoleRequest implements Serializable { + private static final long serialVersionUID = 1L; + + public static final String SERIALIZED_NAME_NAME = "name"; + + @SerializedName(SERIALIZED_NAME_NAME) + @javax.annotation.Nonnull + private String name; + + public static final String SERIALIZED_NAME_DESCRIPTION = "description"; + + @SerializedName(SERIALIZED_NAME_DESCRIPTION) + @javax.annotation.Nullable + private String description; + + /** Gets or Sets privileges */ + @JsonAdapter(PrivilegesEnum.Adapter.class) + public enum PrivilegesEnum { + USERDATAUPLOADING("USERDATAUPLOADING"), + + DATADOWNLOADING("DATADOWNLOADING"), + + DATAMANAGEMENT("DATAMANAGEMENT"), + + SHAREWITHALL("SHAREWITHALL"), + + JOBSCHEDULING("JOBSCHEDULING"), + + A3_ANALYSIS("A3ANALYSIS"), + + BYPASSRLS("BYPASSRLS"), + + DISABLE_PINBOARD_CREATION("DISABLE_PINBOARD_CREATION"), + + DEVELOPER("DEVELOPER"), + + APPLICATION_ADMINISTRATION("APPLICATION_ADMINISTRATION"), + + USER_ADMINISTRATION("USER_ADMINISTRATION"), + + GROUP_ADMINISTRATION("GROUP_ADMINISTRATION"), + + SYSTEM_INFO_ADMINISTRATION("SYSTEM_INFO_ADMINISTRATION"), + + SYNCMANAGEMENT("SYNCMANAGEMENT"), + + ORG_ADMINISTRATION("ORG_ADMINISTRATION"), + + ROLE_ADMINISTRATION("ROLE_ADMINISTRATION"), + + AUTHENTICATION_ADMINISTRATION("AUTHENTICATION_ADMINISTRATION"), + + BILLING_INFO_ADMINISTRATION("BILLING_INFO_ADMINISTRATION"), + + CONTROL_TRUSTED_AUTH("CONTROL_TRUSTED_AUTH"), + + TAGMANAGEMENT("TAGMANAGEMENT"), + + LIVEBOARD_VERIFIER("LIVEBOARD_VERIFIER"), + + CAN_MANAGE_CUSTOM_CALENDAR("CAN_MANAGE_CUSTOM_CALENDAR"), + + CAN_CREATE_OR_EDIT_CONNECTIONS("CAN_CREATE_OR_EDIT_CONNECTIONS"), + + CAN_MANAGE_WORKSHEET_VIEWS_TABLES("CAN_MANAGE_WORKSHEET_VIEWS_TABLES"), + + CAN_MANAGE_VERSION_CONTROL("CAN_MANAGE_VERSION_CONTROL"), + + THIRDPARTY_ANALYSIS("THIRDPARTY_ANALYSIS"), + + CAN_CREATE_CATALOG("CAN_CREATE_CATALOG"), + + CAN_ACCESS_ANALYST_STUDIO("CAN_ACCESS_ANALYST_STUDIO"), + + CAN_MANAGE_ANALYST_STUDIO("CAN_MANAGE_ANALYST_STUDIO"), + + CAN_MODIFY_FOLDERS("CAN_MODIFY_FOLDERS"), + + CAN_MANAGE_VARIABLES("CAN_MANAGE_VARIABLES"), + + CAN_VIEW_FOLDERS("CAN_VIEW_FOLDERS"), + + CAN_MANAGE_AGENTSPOT("CAN_MANAGE_AGENTSPOT"), + + CAN_ACCESS_AGENTSPOT("CAN_ACCESS_AGENTSPOT"), + + PREVIEW_DOCUMENT_SEARCH("PREVIEW_DOCUMENT_SEARCH"), + + PREVIEW_THOUGHTSPOT_SAGE("PREVIEW_THOUGHTSPOT_SAGE"), + + CAN_MANAGE_WEBHOOKS("CAN_MANAGE_WEBHOOKS"), + + CAN_DOWNLOAD_VISUALS("CAN_DOWNLOAD_VISUALS"), + + CAN_DOWNLOAD_DETAILED_DATA("CAN_DOWNLOAD_DETAILED_DATA"), + + CAN_USE_SPOTTER("CAN_USE_SPOTTER"); + + private String value; + + PrivilegesEnum(String value) { + this.value = value; + } + + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + public static PrivilegesEnum fromValue(String value) { + for (PrivilegesEnum b : PrivilegesEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + + public static class Adapter extends TypeAdapter { + @Override + public void write(final JsonWriter jsonWriter, final PrivilegesEnum enumeration) + throws IOException { + jsonWriter.value(enumeration.getValue()); + } + + @Override + public PrivilegesEnum read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + return PrivilegesEnum.fromValue(value); + } + } + + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + String value = jsonElement.getAsString(); + PrivilegesEnum.fromValue(value); + } + } + + public static final String SERIALIZED_NAME_PRIVILEGES = "privileges"; + + @SerializedName(SERIALIZED_NAME_PRIVILEGES) + @javax.annotation.Nullable + private List privileges; + + public UpdateRoleRequest() {} + + public UpdateRoleRequest name(@javax.annotation.Nonnull String name) { + this.name = name; + return this; + } + + /** + * Name of the Role. + * + * @return name + */ + @javax.annotation.Nonnull + public String getName() { + return name; + } + + public void setName(@javax.annotation.Nonnull String name) { + this.name = name; + } + + public UpdateRoleRequest description(@javax.annotation.Nullable String description) { + this.description = description; + return this; + } + + /** + * Description of the Role. + * + * @return description + */ + @javax.annotation.Nullable + public String getDescription() { + return description; + } + + public void setDescription(@javax.annotation.Nullable String description) { + this.description = description; + } + + public UpdateRoleRequest privileges( + @javax.annotation.Nullable List privileges) { + this.privileges = privileges; + return this; + } + + public UpdateRoleRequest addPrivilegesItem(PrivilegesEnum privilegesItem) { + if (this.privileges == null) { + this.privileges = new ArrayList<>(); + } + this.privileges.add(privilegesItem); + return this; + } + + /** + * Privileges granted to the role. See + * [Documentation](https://developers.thoughtspot.com/docs/rbac#_role_categories_and_privileges)for + * supported roles privileges. + * + * @return privileges + */ + @javax.annotation.Nullable + public List getPrivileges() { + return privileges; + } + + public void setPrivileges(@javax.annotation.Nullable List privileges) { + this.privileges = privileges; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key name of the property + * @param value value of the property + * @return the UpdateRoleRequest instance itself + */ + public UpdateRoleRequest putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return a map of objects + */ + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key name of the property + * @return an object + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + UpdateRoleRequest updateRoleRequest = (UpdateRoleRequest) o; + return Objects.equals(this.name, updateRoleRequest.name) + && Objects.equals(this.description, updateRoleRequest.description) + && Objects.equals(this.privileges, updateRoleRequest.privileges) + && Objects.equals( + this.additionalProperties, updateRoleRequest.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(name, description, privileges, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class UpdateRoleRequest {\n"); + sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append(" description: ").append(toIndentedString(description)).append("\n"); + sb.append(" privileges: ").append(toIndentedString(privileges)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first + * line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("name"); + openapiFields.add("description"); + openapiFields.add("privileges"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + openapiRequiredFields.add("name"); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to UpdateRoleRequest + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!UpdateRoleRequest.openapiRequiredFields + .isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException( + String.format( + "The required field(s) %s in UpdateRoleRequest is not found in the" + + " empty JSON string", + UpdateRoleRequest.openapiRequiredFields.toString())); + } + } + + // check to make sure all required properties/fields are present in the JSON string + for (String requiredField : UpdateRoleRequest.openapiRequiredFields) { + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException( + String.format( + "The required field `%s` is not found in the JSON string: %s", + requiredField, jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if (!jsonObj.get("name").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `name` to be a primitive type in the JSON string" + + " but got `%s`", + jsonObj.get("name").toString())); + } + if ((jsonObj.get("description") != null && !jsonObj.get("description").isJsonNull()) + && !jsonObj.get("description").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `description` to be a primitive type in the JSON" + + " string but got `%s`", + jsonObj.get("description").toString())); + } + // ensure the optional json data is an array if present + if (jsonObj.get("privileges") != null + && !jsonObj.get("privileges").isJsonNull() + && !jsonObj.get("privileges").isJsonArray()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `privileges` to be an array in the JSON string but" + + " got `%s`", + jsonObj.get("privileges").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!UpdateRoleRequest.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'UpdateRoleRequest' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter = + gson.getDelegateAdapter(this, TypeToken.get(UpdateRoleRequest.class)); + + return (TypeAdapter) + new TypeAdapter() { + @Override + public void write(JsonWriter out, UpdateRoleRequest value) + throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + obj.remove("additionalProperties"); + // serialize additional properties + if (value.getAdditionalProperties() != null) { + for (Map.Entry entry : + value.getAdditionalProperties().entrySet()) { + if (entry.getValue() instanceof String) + obj.addProperty(entry.getKey(), (String) entry.getValue()); + else if (entry.getValue() instanceof Number) + obj.addProperty(entry.getKey(), (Number) entry.getValue()); + else if (entry.getValue() instanceof Boolean) + obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); + else if (entry.getValue() instanceof Character) + obj.addProperty( + entry.getKey(), (Character) entry.getValue()); + else { + JsonElement jsonElement = gson.toJsonTree(entry.getValue()); + if (jsonElement.isJsonArray()) { + obj.add(entry.getKey(), jsonElement.getAsJsonArray()); + } else { + obj.add(entry.getKey(), jsonElement.getAsJsonObject()); + } + } + } + } + elementAdapter.write(out, obj); + } + + @Override + public UpdateRoleRequest read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // store additional fields in the deserialized instance + UpdateRoleRequest instance = thisAdapter.fromJsonTree(jsonObj); + for (Map.Entry entry : jsonObj.entrySet()) { + if (!openapiFields.contains(entry.getKey())) { + if (entry.getValue().isJsonPrimitive()) { // primitive type + if (entry.getValue().getAsJsonPrimitive().isString()) + instance.putAdditionalProperty( + entry.getKey(), entry.getValue().getAsString()); + else if (entry.getValue().getAsJsonPrimitive().isNumber()) + instance.putAdditionalProperty( + entry.getKey(), entry.getValue().getAsNumber()); + else if (entry.getValue().getAsJsonPrimitive().isBoolean()) + instance.putAdditionalProperty( + entry.getKey(), + entry.getValue().getAsBoolean()); + else + throw new IllegalArgumentException( + String.format( + "The field `%s` has unknown primitive" + + " type. Value: %s", + entry.getKey(), + entry.getValue().toString())); + } else if (entry.getValue().isJsonArray()) { + instance.putAdditionalProperty( + entry.getKey(), + gson.fromJson(entry.getValue(), List.class)); + } else { // JSON object + instance.putAdditionalProperty( + entry.getKey(), + gson.fromJson(entry.getValue(), HashMap.class)); + } + } + } + return instance; + } + }.nullSafe(); + } + } + + /** + * Create an instance of UpdateRoleRequest given an JSON string + * + * @param jsonString JSON string + * @return An instance of UpdateRoleRequest + * @throws IOException if the JSON string is invalid with respect to UpdateRoleRequest + */ + public static UpdateRoleRequest fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, UpdateRoleRequest.class); + } + + /** + * Convert an instance of UpdateRoleRequest to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} diff --git a/sdks/java/src/main/java/com/thoughtspot/client/model/UpdateScheduleRequest.java b/sdks/java/src/main/java/com/thoughtspot/client/model/UpdateScheduleRequest.java new file mode 100644 index 000000000..7729bfc71 --- /dev/null +++ b/sdks/java/src/main/java/com/thoughtspot/client/model/UpdateScheduleRequest.java @@ -0,0 +1,2180 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client.model; + +import com.google.gson.Gson; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.TypeAdapter; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.reflect.TypeToken; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import com.thoughtspot.client.JSON; +import java.io.IOException; +import java.io.Serializable; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Objects; + +/** UpdateScheduleRequest */ +@javax.annotation.Generated( + value = "org.openapitools.codegen.languages.JavaClientCodegen", + comments = "Generator version: 7.12.0") +public class UpdateScheduleRequest implements Serializable { + private static final long serialVersionUID = 1L; + + public static final String SERIALIZED_NAME_NAME = "name"; + + @SerializedName(SERIALIZED_NAME_NAME) + @javax.annotation.Nullable + private String name; + + public static final String SERIALIZED_NAME_DESCRIPTION = "description"; + + @SerializedName(SERIALIZED_NAME_DESCRIPTION) + @javax.annotation.Nullable + private String description; + + /** Type of metadata object. */ + @JsonAdapter(MetadataTypeEnum.Adapter.class) + public enum MetadataTypeEnum { + LIVEBOARD("LIVEBOARD"); + + private String value; + + MetadataTypeEnum(String value) { + this.value = value; + } + + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + public static MetadataTypeEnum fromValue(String value) { + for (MetadataTypeEnum b : MetadataTypeEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + + public static class Adapter extends TypeAdapter { + @Override + public void write(final JsonWriter jsonWriter, final MetadataTypeEnum enumeration) + throws IOException { + jsonWriter.value(enumeration.getValue()); + } + + @Override + public MetadataTypeEnum read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + return MetadataTypeEnum.fromValue(value); + } + } + + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + String value = jsonElement.getAsString(); + MetadataTypeEnum.fromValue(value); + } + } + + public static final String SERIALIZED_NAME_METADATA_TYPE = "metadata_type"; + + @SerializedName(SERIALIZED_NAME_METADATA_TYPE) + @javax.annotation.Nullable + private MetadataTypeEnum metadataType; + + public static final String SERIALIZED_NAME_METADATA_IDENTIFIER = "metadata_identifier"; + + @SerializedName(SERIALIZED_NAME_METADATA_IDENTIFIER) + @javax.annotation.Nullable + private String metadataIdentifier; + + /** Export file format. */ + @JsonAdapter(FileFormatEnum.Adapter.class) + public enum FileFormatEnum { + CSV("CSV"), + + PDF("PDF"), + + XLSX("XLSX"); + + private String value; + + FileFormatEnum(String value) { + this.value = value; + } + + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + public static FileFormatEnum fromValue(String value) { + for (FileFormatEnum b : FileFormatEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + + public static class Adapter extends TypeAdapter { + @Override + public void write(final JsonWriter jsonWriter, final FileFormatEnum enumeration) + throws IOException { + jsonWriter.value(enumeration.getValue()); + } + + @Override + public FileFormatEnum read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + return FileFormatEnum.fromValue(value); + } + } + + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + String value = jsonElement.getAsString(); + FileFormatEnum.fromValue(value); + } + } + + public static final String SERIALIZED_NAME_FILE_FORMAT = "file_format"; + + @SerializedName(SERIALIZED_NAME_FILE_FORMAT) + @javax.annotation.Nullable + private FileFormatEnum fileFormat; + + public static final String SERIALIZED_NAME_LIVEBOARD_OPTIONS = "liveboard_options"; + + @SerializedName(SERIALIZED_NAME_LIVEBOARD_OPTIONS) + @javax.annotation.Nullable + private LiveboardOptionsInput liveboardOptions; + + public static final String SERIALIZED_NAME_PDF_OPTIONS = "pdf_options"; + + @SerializedName(SERIALIZED_NAME_PDF_OPTIONS) + @javax.annotation.Nullable + private SchedulesPdfOptionsInput pdfOptions; + + /** Time zone */ + @JsonAdapter(TimeZoneEnum.Adapter.class) + public enum TimeZoneEnum { + AFRICA_ABIDJAN("Africa/Abidjan"), + + AFRICA_ACCRA("Africa/Accra"), + + AFRICA_ADDIS_ABABA("Africa/Addis_Ababa"), + + AFRICA_ALGIERS("Africa/Algiers"), + + AFRICA_ASMARA("Africa/Asmara"), + + AFRICA_ASMERA("Africa/Asmera"), + + AFRICA_BAMAKO("Africa/Bamako"), + + AFRICA_BANGUI("Africa/Bangui"), + + AFRICA_BANJUL("Africa/Banjul"), + + AFRICA_BISSAU("Africa/Bissau"), + + AFRICA_BLANTYRE("Africa/Blantyre"), + + AFRICA_BRAZZAVILLE("Africa/Brazzaville"), + + AFRICA_BUJUMBURA("Africa/Bujumbura"), + + AFRICA_CAIRO("Africa/Cairo"), + + AFRICA_CASABLANCA("Africa/Casablanca"), + + AFRICA_CEUTA("Africa/Ceuta"), + + AFRICA_CONAKRY("Africa/Conakry"), + + AFRICA_DAKAR("Africa/Dakar"), + + AFRICA_DAR_ES_SALAAM("Africa/Dar_es_Salaam"), + + AFRICA_DJIBOUTI("Africa/Djibouti"), + + AFRICA_DOUALA("Africa/Douala"), + + AFRICA_EL_AAIUN("Africa/El_Aaiun"), + + AFRICA_FREETOWN("Africa/Freetown"), + + AFRICA_GABORONE("Africa/Gaborone"), + + AFRICA_HARARE("Africa/Harare"), + + AFRICA_JOHANNESBURG("Africa/Johannesburg"), + + AFRICA_JUBA("Africa/Juba"), + + AFRICA_KAMPALA("Africa/Kampala"), + + AFRICA_KHARTOUM("Africa/Khartoum"), + + AFRICA_KIGALI("Africa/Kigali"), + + AFRICA_KINSHASA("Africa/Kinshasa"), + + AFRICA_LAGOS("Africa/Lagos"), + + AFRICA_LIBREVILLE("Africa/Libreville"), + + AFRICA_LOME("Africa/Lome"), + + AFRICA_LUANDA("Africa/Luanda"), + + AFRICA_LUBUMBASHI("Africa/Lubumbashi"), + + AFRICA_LUSAKA("Africa/Lusaka"), + + AFRICA_MALABO("Africa/Malabo"), + + AFRICA_MAPUTO("Africa/Maputo"), + + AFRICA_MASERU("Africa/Maseru"), + + AFRICA_MBABANE("Africa/Mbabane"), + + AFRICA_MOGADISHU("Africa/Mogadishu"), + + AFRICA_MONROVIA("Africa/Monrovia"), + + AFRICA_NAIROBI("Africa/Nairobi"), + + AFRICA_NDJAMENA("Africa/Ndjamena"), + + AFRICA_NIAMEY("Africa/Niamey"), + + AFRICA_NOUAKCHOTT("Africa/Nouakchott"), + + AFRICA_OUAGADOUGOU("Africa/Ouagadougou"), + + AFRICA_PORTO_NOVO("Africa/Porto-Novo"), + + AFRICA_SAO_TOME("Africa/Sao_Tome"), + + AFRICA_TIMBUKTU("Africa/Timbuktu"), + + AFRICA_TRIPOLI("Africa/Tripoli"), + + AFRICA_TUNIS("Africa/Tunis"), + + AFRICA_WINDHOEK("Africa/Windhoek"), + + AMERICA_ADAK("America/Adak"), + + AMERICA_ANCHORAGE("America/Anchorage"), + + AMERICA_ANGUILLA("America/Anguilla"), + + AMERICA_ANTIGUA("America/Antigua"), + + AMERICA_ARAGUAINA("America/Araguaina"), + + AMERICA_ARGENTINA_BUENOS_AIRES("America/Argentina/Buenos_Aires"), + + AMERICA_ARGENTINA_CATAMARCA("America/Argentina/Catamarca"), + + AMERICA_ARGENTINA_COMOD_RIVADAVIA("America/Argentina/ComodRivadavia"), + + AMERICA_ARGENTINA_CORDOBA("America/Argentina/Cordoba"), + + AMERICA_ARGENTINA_JUJUY("America/Argentina/Jujuy"), + + AMERICA_ARGENTINA_LA_RIOJA("America/Argentina/La_Rioja"), + + AMERICA_ARGENTINA_MENDOZA("America/Argentina/Mendoza"), + + AMERICA_ARGENTINA_RIO_GALLEGOS("America/Argentina/Rio_Gallegos"), + + AMERICA_ARGENTINA_SALTA("America/Argentina/Salta"), + + AMERICA_ARGENTINA_SAN_JUAN("America/Argentina/San_Juan"), + + AMERICA_ARGENTINA_SAN_LUIS("America/Argentina/San_Luis"), + + AMERICA_ARGENTINA_TUCUMAN("America/Argentina/Tucuman"), + + AMERICA_ARGENTINA_USHUAIA("America/Argentina/Ushuaia"), + + AMERICA_ARUBA("America/Aruba"), + + AMERICA_ASUNCION("America/Asuncion"), + + AMERICA_ATIKOKAN("America/Atikokan"), + + AMERICA_ATKA("America/Atka"), + + AMERICA_BAHIA("America/Bahia"), + + AMERICA_BAHIA_BANDERAS("America/Bahia_Banderas"), + + AMERICA_BARBADOS("America/Barbados"), + + AMERICA_BELEM("America/Belem"), + + AMERICA_BELIZE("America/Belize"), + + AMERICA_BLANC_SABLON("America/Blanc-Sablon"), + + AMERICA_BOA_VISTA("America/Boa_Vista"), + + AMERICA_BOGOTA("America/Bogota"), + + AMERICA_BOISE("America/Boise"), + + AMERICA_BUENOS_AIRES("America/Buenos_Aires"), + + AMERICA_CAMBRIDGE_BAY("America/Cambridge_Bay"), + + AMERICA_CAMPO_GRANDE("America/Campo_Grande"), + + AMERICA_CANCUN("America/Cancun"), + + AMERICA_CARACAS("America/Caracas"), + + AMERICA_CATAMARCA("America/Catamarca"), + + AMERICA_CAYENNE("America/Cayenne"), + + AMERICA_CAYMAN("America/Cayman"), + + AMERICA_CHICAGO("America/Chicago"), + + AMERICA_CHIHUAHUA("America/Chihuahua"), + + AMERICA_CORAL_HARBOUR("America/Coral_Harbour"), + + AMERICA_CORDOBA("America/Cordoba"), + + AMERICA_COSTA_RICA("America/Costa_Rica"), + + AMERICA_CRESTON("America/Creston"), + + AMERICA_CUIABA("America/Cuiaba"), + + AMERICA_CURACAO("America/Curacao"), + + AMERICA_DANMARKSHAVN("America/Danmarkshavn"), + + AMERICA_DAWSON("America/Dawson"), + + AMERICA_DAWSON_CREEK("America/Dawson_Creek"), + + AMERICA_DENVER("America/Denver"), + + AMERICA_DETROIT("America/Detroit"), + + AMERICA_DOMINICA("America/Dominica"), + + AMERICA_EDMONTON("America/Edmonton"), + + AMERICA_EIRUNEPE("America/Eirunepe"), + + AMERICA_EL_SALVADOR("America/El_Salvador"), + + AMERICA_ENSENADA("America/Ensenada"), + + AMERICA_FORT_NELSON("America/Fort_Nelson"), + + AMERICA_FORT_WAYNE("America/Fort_Wayne"), + + AMERICA_FORTALEZA("America/Fortaleza"), + + AMERICA_GLACE_BAY("America/Glace_Bay"), + + AMERICA_GODTHAB("America/Godthab"), + + AMERICA_GOOSE_BAY("America/Goose_Bay"), + + AMERICA_GRAND_TURK("America/Grand_Turk"), + + AMERICA_GRENADA("America/Grenada"), + + AMERICA_GUADELOUPE("America/Guadeloupe"), + + AMERICA_GUATEMALA("America/Guatemala"), + + AMERICA_GUAYAQUIL("America/Guayaquil"), + + AMERICA_GUYANA("America/Guyana"), + + AMERICA_HALIFAX("America/Halifax"), + + AMERICA_HAVANA("America/Havana"), + + AMERICA_HERMOSILLO("America/Hermosillo"), + + AMERICA_INDIANA_INDIANAPOLIS("America/Indiana/Indianapolis"), + + AMERICA_INDIANA_KNOX("America/Indiana/Knox"), + + AMERICA_INDIANA_MARENGO("America/Indiana/Marengo"), + + AMERICA_INDIANA_PETERSBURG("America/Indiana/Petersburg"), + + AMERICA_INDIANA_TELL_CITY("America/Indiana/Tell_City"), + + AMERICA_INDIANA_VEVAY("America/Indiana/Vevay"), + + AMERICA_INDIANA_VINCENNES("America/Indiana/Vincennes"), + + AMERICA_INDIANA_WINAMAC("America/Indiana/Winamac"), + + AMERICA_INDIANAPOLIS("America/Indianapolis"), + + AMERICA_INUVIK("America/Inuvik"), + + AMERICA_IQALUIT("America/Iqaluit"), + + AMERICA_JAMAICA("America/Jamaica"), + + AMERICA_JUJUY("America/Jujuy"), + + AMERICA_JUNEAU("America/Juneau"), + + AMERICA_KENTUCKY_LOUISVILLE("America/Kentucky/Louisville"), + + AMERICA_KENTUCKY_MONTICELLO("America/Kentucky/Monticello"), + + AMERICA_KNOX_IN("America/Knox_IN"), + + AMERICA_KRALENDIJK("America/Kralendijk"), + + AMERICA_LA_PAZ("America/La_Paz"), + + AMERICA_LIMA("America/Lima"), + + AMERICA_LOS_ANGELES("America/Los_Angeles"), + + AMERICA_LOUISVILLE("America/Louisville"), + + AMERICA_LOWER_PRINCES("America/Lower_Princes"), + + AMERICA_MACEIO("America/Maceio"), + + AMERICA_MANAGUA("America/Managua"), + + AMERICA_MANAUS("America/Manaus"), + + AMERICA_MARIGOT("America/Marigot"), + + AMERICA_MARTINIQUE("America/Martinique"), + + AMERICA_MATAMOROS("America/Matamoros"), + + AMERICA_MAZATLAN("America/Mazatlan"), + + AMERICA_MENDOZA("America/Mendoza"), + + AMERICA_MENOMINEE("America/Menominee"), + + AMERICA_MERIDA("America/Merida"), + + AMERICA_METLAKATLA("America/Metlakatla"), + + AMERICA_MEXICO_CITY("America/Mexico_City"), + + AMERICA_MIQUELON("America/Miquelon"), + + AMERICA_MONCTON("America/Moncton"), + + AMERICA_MONTERREY("America/Monterrey"), + + AMERICA_MONTEVIDEO("America/Montevideo"), + + AMERICA_MONTREAL("America/Montreal"), + + AMERICA_MONTSERRAT("America/Montserrat"), + + AMERICA_NASSAU("America/Nassau"), + + AMERICA_NEW_YORK("America/New_York"), + + AMERICA_NIPIGON("America/Nipigon"), + + AMERICA_NOME("America/Nome"), + + AMERICA_NORONHA("America/Noronha"), + + AMERICA_NORTH_DAKOTA_BEULAH("America/North_Dakota/Beulah"), + + AMERICA_NORTH_DAKOTA_CENTER("America/North_Dakota/Center"), + + AMERICA_NORTH_DAKOTA_NEW_SALEM("America/North_Dakota/New_Salem"), + + AMERICA_NUUK("America/Nuuk"), + + AMERICA_OJINAGA("America/Ojinaga"), + + AMERICA_PANAMA("America/Panama"), + + AMERICA_PANGNIRTUNG("America/Pangnirtung"), + + AMERICA_PARAMARIBO("America/Paramaribo"), + + AMERICA_PHOENIX("America/Phoenix"), + + AMERICA_PORT_AU_PRINCE("America/Port-au-Prince"), + + AMERICA_PORT_OF_SPAIN("America/Port_of_Spain"), + + AMERICA_PORTO_ACRE("America/Porto_Acre"), + + AMERICA_PORTO_VELHO("America/Porto_Velho"), + + AMERICA_PUERTO_RICO("America/Puerto_Rico"), + + AMERICA_PUNTA_ARENAS("America/Punta_Arenas"), + + AMERICA_RAINY_RIVER("America/Rainy_River"), + + AMERICA_RANKIN_INLET("America/Rankin_Inlet"), + + AMERICA_RECIFE("America/Recife"), + + AMERICA_REGINA("America/Regina"), + + AMERICA_RESOLUTE("America/Resolute"), + + AMERICA_RIO_BRANCO("America/Rio_Branco"), + + AMERICA_ROSARIO("America/Rosario"), + + AMERICA_SANTA_ISABEL("America/Santa_Isabel"), + + AMERICA_SANTAREM("America/Santarem"), + + AMERICA_SANTIAGO("America/Santiago"), + + AMERICA_SANTO_DOMINGO("America/Santo_Domingo"), + + AMERICA_SAO_PAULO("America/Sao_Paulo"), + + AMERICA_SCORESBYSUND("America/Scoresbysund"), + + AMERICA_SHIPROCK("America/Shiprock"), + + AMERICA_SITKA("America/Sitka"), + + AMERICA_ST_BARTHELEMY("America/St_Barthelemy"), + + AMERICA_ST_JOHNS("America/St_Johns"), + + AMERICA_ST_KITTS("America/St_Kitts"), + + AMERICA_ST_LUCIA("America/St_Lucia"), + + AMERICA_ST_THOMAS("America/St_Thomas"), + + AMERICA_ST_VINCENT("America/St_Vincent"), + + AMERICA_SWIFT_CURRENT("America/Swift_Current"), + + AMERICA_TEGUCIGALPA("America/Tegucigalpa"), + + AMERICA_THULE("America/Thule"), + + AMERICA_THUNDER_BAY("America/Thunder_Bay"), + + AMERICA_TIJUANA("America/Tijuana"), + + AMERICA_TORONTO("America/Toronto"), + + AMERICA_TORTOLA("America/Tortola"), + + AMERICA_VANCOUVER("America/Vancouver"), + + AMERICA_VIRGIN("America/Virgin"), + + AMERICA_WHITEHORSE("America/Whitehorse"), + + AMERICA_WINNIPEG("America/Winnipeg"), + + AMERICA_YAKUTAT("America/Yakutat"), + + AMERICA_YELLOWKNIFE("America/Yellowknife"), + + ANTARCTICA_CASEY("Antarctica/Casey"), + + ANTARCTICA_DAVIS("Antarctica/Davis"), + + ANTARCTICA_DUMONT_D_URVILLE("Antarctica/DumontDUrville"), + + ANTARCTICA_MACQUARIE("Antarctica/Macquarie"), + + ANTARCTICA_MAWSON("Antarctica/Mawson"), + + ANTARCTICA_MC_MURDO("Antarctica/McMurdo"), + + ANTARCTICA_PALMER("Antarctica/Palmer"), + + ANTARCTICA_ROTHERA("Antarctica/Rothera"), + + ANTARCTICA_SOUTH_POLE("Antarctica/South_Pole"), + + ANTARCTICA_SYOWA("Antarctica/Syowa"), + + ANTARCTICA_TROLL("Antarctica/Troll"), + + ANTARCTICA_VOSTOK("Antarctica/Vostok"), + + ARCTIC_LONGYEARBYEN("Arctic/Longyearbyen"), + + ASIA_ADEN("Asia/Aden"), + + ASIA_ALMATY("Asia/Almaty"), + + ASIA_AMMAN("Asia/Amman"), + + ASIA_ANADYR("Asia/Anadyr"), + + ASIA_AQTAU("Asia/Aqtau"), + + ASIA_AQTOBE("Asia/Aqtobe"), + + ASIA_ASHGABAT("Asia/Ashgabat"), + + ASIA_ASHKHABAD("Asia/Ashkhabad"), + + ASIA_ATYRAU("Asia/Atyrau"), + + ASIA_BAGHDAD("Asia/Baghdad"), + + ASIA_BAHRAIN("Asia/Bahrain"), + + ASIA_BAKU("Asia/Baku"), + + ASIA_BANGKOK("Asia/Bangkok"), + + ASIA_BARNAUL("Asia/Barnaul"), + + ASIA_BEIRUT("Asia/Beirut"), + + ASIA_BISHKEK("Asia/Bishkek"), + + ASIA_BRUNEI("Asia/Brunei"), + + ASIA_CALCUTTA("Asia/Calcutta"), + + ASIA_CHITA("Asia/Chita"), + + ASIA_CHOIBALSAN("Asia/Choibalsan"), + + ASIA_CHONGQING("Asia/Chongqing"), + + ASIA_CHUNGKING("Asia/Chungking"), + + ASIA_COLOMBO("Asia/Colombo"), + + ASIA_DACCA("Asia/Dacca"), + + ASIA_DAMASCUS("Asia/Damascus"), + + ASIA_DHAKA("Asia/Dhaka"), + + ASIA_DILI("Asia/Dili"), + + ASIA_DUBAI("Asia/Dubai"), + + ASIA_DUSHANBE("Asia/Dushanbe"), + + ASIA_FAMAGUSTA("Asia/Famagusta"), + + ASIA_GAZA("Asia/Gaza"), + + ASIA_HARBIN("Asia/Harbin"), + + ASIA_HEBRON("Asia/Hebron"), + + ASIA_HO_CHI_MINH("Asia/Ho_Chi_Minh"), + + ASIA_HONG_KONG("Asia/Hong_Kong"), + + ASIA_HOVD("Asia/Hovd"), + + ASIA_IRKUTSK("Asia/Irkutsk"), + + ASIA_ISTANBUL("Asia/Istanbul"), + + ASIA_JAKARTA("Asia/Jakarta"), + + ASIA_JAYAPURA("Asia/Jayapura"), + + ASIA_JERUSALEM("Asia/Jerusalem"), + + ASIA_KABUL("Asia/Kabul"), + + ASIA_KAMCHATKA("Asia/Kamchatka"), + + ASIA_KARACHI("Asia/Karachi"), + + ASIA_KASHGAR("Asia/Kashgar"), + + ASIA_KATHMANDU("Asia/Kathmandu"), + + ASIA_KATMANDU("Asia/Katmandu"), + + ASIA_KHANDYGA("Asia/Khandyga"), + + ASIA_KOLKATA("Asia/Kolkata"), + + ASIA_KRASNOYARSK("Asia/Krasnoyarsk"), + + ASIA_KUALA_LUMPUR("Asia/Kuala_Lumpur"), + + ASIA_KUCHING("Asia/Kuching"), + + ASIA_KUWAIT("Asia/Kuwait"), + + ASIA_MACAO("Asia/Macao"), + + ASIA_MACAU("Asia/Macau"), + + ASIA_MAGADAN("Asia/Magadan"), + + ASIA_MAKASSAR("Asia/Makassar"), + + ASIA_MANILA("Asia/Manila"), + + ASIA_MUSCAT("Asia/Muscat"), + + ASIA_NICOSIA("Asia/Nicosia"), + + ASIA_NOVOKUZNETSK("Asia/Novokuznetsk"), + + ASIA_NOVOSIBIRSK("Asia/Novosibirsk"), + + ASIA_OMSK("Asia/Omsk"), + + ASIA_ORAL("Asia/Oral"), + + ASIA_PHNOM_PENH("Asia/Phnom_Penh"), + + ASIA_PONTIANAK("Asia/Pontianak"), + + ASIA_PYONGYANG("Asia/Pyongyang"), + + ASIA_QATAR("Asia/Qatar"), + + ASIA_QOSTANAY("Asia/Qostanay"), + + ASIA_QYZYLORDA("Asia/Qyzylorda"), + + ASIA_RANGOON("Asia/Rangoon"), + + ASIA_RIYADH("Asia/Riyadh"), + + ASIA_SAIGON("Asia/Saigon"), + + ASIA_SAKHALIN("Asia/Sakhalin"), + + ASIA_SAMARKAND("Asia/Samarkand"), + + ASIA_SEOUL("Asia/Seoul"), + + ASIA_SHANGHAI("Asia/Shanghai"), + + ASIA_SINGAPORE("Asia/Singapore"), + + ASIA_SREDNEKOLYMSK("Asia/Srednekolymsk"), + + ASIA_TAIPEI("Asia/Taipei"), + + ASIA_TASHKENT("Asia/Tashkent"), + + ASIA_TBILISI("Asia/Tbilisi"), + + ASIA_TEHRAN("Asia/Tehran"), + + ASIA_TEL_AVIV("Asia/Tel_Aviv"), + + ASIA_THIMBU("Asia/Thimbu"), + + ASIA_THIMPHU("Asia/Thimphu"), + + ASIA_TOKYO("Asia/Tokyo"), + + ASIA_TOMSK("Asia/Tomsk"), + + ASIA_UJUNG_PANDANG("Asia/Ujung_Pandang"), + + ASIA_ULAANBAATAR("Asia/Ulaanbaatar"), + + ASIA_ULAN_BATOR("Asia/Ulan_Bator"), + + ASIA_URUMQI("Asia/Urumqi"), + + ASIA_UST_NERA("Asia/Ust-Nera"), + + ASIA_VIENTIANE("Asia/Vientiane"), + + ASIA_VLADIVOSTOK("Asia/Vladivostok"), + + ASIA_YAKUTSK("Asia/Yakutsk"), + + ASIA_YANGON("Asia/Yangon"), + + ASIA_YEKATERINBURG("Asia/Yekaterinburg"), + + ASIA_YEREVAN("Asia/Yerevan"), + + ATLANTIC_AZORES("Atlantic/Azores"), + + ATLANTIC_BERMUDA("Atlantic/Bermuda"), + + ATLANTIC_CANARY("Atlantic/Canary"), + + ATLANTIC_CAPE_VERDE("Atlantic/Cape_Verde"), + + ATLANTIC_FAEROE("Atlantic/Faeroe"), + + ATLANTIC_FAROE("Atlantic/Faroe"), + + ATLANTIC_JAN_MAYEN("Atlantic/Jan_Mayen"), + + ATLANTIC_MADEIRA("Atlantic/Madeira"), + + ATLANTIC_REYKJAVIK("Atlantic/Reykjavik"), + + ATLANTIC_SOUTH_GEORGIA("Atlantic/South_Georgia"), + + ATLANTIC_ST_HELENA("Atlantic/St_Helena"), + + ATLANTIC_STANLEY("Atlantic/Stanley"), + + AUSTRALIA_ACT("Australia/ACT"), + + AUSTRALIA_ADELAIDE("Australia/Adelaide"), + + AUSTRALIA_BRISBANE("Australia/Brisbane"), + + AUSTRALIA_BROKEN_HILL("Australia/Broken_Hill"), + + AUSTRALIA_CANBERRA("Australia/Canberra"), + + AUSTRALIA_CURRIE("Australia/Currie"), + + AUSTRALIA_DARWIN("Australia/Darwin"), + + AUSTRALIA_EUCLA("Australia/Eucla"), + + AUSTRALIA_HOBART("Australia/Hobart"), + + AUSTRALIA_LHI("Australia/LHI"), + + AUSTRALIA_LINDEMAN("Australia/Lindeman"), + + AUSTRALIA_LORD_HOWE("Australia/Lord_Howe"), + + AUSTRALIA_MELBOURNE("Australia/Melbourne"), + + AUSTRALIA_NSW("Australia/NSW"), + + AUSTRALIA_NORTH("Australia/North"), + + AUSTRALIA_PERTH("Australia/Perth"), + + AUSTRALIA_QUEENSLAND("Australia/Queensland"), + + AUSTRALIA_SOUTH("Australia/South"), + + AUSTRALIA_SYDNEY("Australia/Sydney"), + + AUSTRALIA_TASMANIA("Australia/Tasmania"), + + AUSTRALIA_VICTORIA("Australia/Victoria"), + + AUSTRALIA_WEST("Australia/West"), + + AUSTRALIA_YANCOWINNA("Australia/Yancowinna"), + + BRAZIL_ACRE("Brazil/Acre"), + + BRAZIL_DE_NORONHA("Brazil/DeNoronha"), + + BRAZIL_EAST("Brazil/East"), + + BRAZIL_WEST("Brazil/West"), + + CET("CET"), + + CST6_CDT("CST6CDT"), + + CANADA_ATLANTIC("Canada/Atlantic"), + + CANADA_CENTRAL("Canada/Central"), + + CANADA_EASTERN("Canada/Eastern"), + + CANADA_MOUNTAIN("Canada/Mountain"), + + CANADA_NEWFOUNDLAND("Canada/Newfoundland"), + + CANADA_PACIFIC("Canada/Pacific"), + + CANADA_SASKATCHEWAN("Canada/Saskatchewan"), + + CANADA_YUKON("Canada/Yukon"), + + CHILE_CONTINENTAL("Chile/Continental"), + + CHILE_EASTER_ISLAND("Chile/EasterIsland"), + + CUBA("Cuba"), + + EET("EET"), + + EST5_EDT("EST5EDT"), + + EGYPT("Egypt"), + + EIRE("Eire"), + + ETC_GMT("Etc/GMT"), + + ETC_GMT_0("Etc/GMT+0"), + + ETC_GMT_1("Etc/GMT+1"), + + ETC_GMT_10("Etc/GMT+10"), + + ETC_GMT_11("Etc/GMT+11"), + + ETC_GMT_121("Etc/GMT+12"), + + ETC_GMT_2("Etc/GMT+2"), + + ETC_GMT_3("Etc/GMT+3"), + + ETC_GMT_4("Etc/GMT+4"), + + ETC_GMT_5("Etc/GMT+5"), + + ETC_GMT_6("Etc/GMT+6"), + + ETC_GMT_7("Etc/GMT+7"), + + ETC_GMT_8("Etc/GMT+8"), + + ETC_GMT_9("Etc/GMT+9"), + + ETC_GMT_02("Etc/GMT-0"), + + ETC_GMT_12("Etc/GMT-1"), + + ETC_GMT_102("Etc/GMT-10"), + + ETC_GMT_112("Etc/GMT-11"), + + ETC_GMT_122("Etc/GMT-12"), + + ETC_GMT_13("Etc/GMT-13"), + + ETC_GMT_14("Etc/GMT-14"), + + ETC_GMT_22("Etc/GMT-2"), + + ETC_GMT_32("Etc/GMT-3"), + + ETC_GMT_42("Etc/GMT-4"), + + ETC_GMT_52("Etc/GMT-5"), + + ETC_GMT_62("Etc/GMT-6"), + + ETC_GMT_72("Etc/GMT-7"), + + ETC_GMT_82("Etc/GMT-8"), + + ETC_GMT_92("Etc/GMT-9"), + + ETC_GMT0("Etc/GMT0"), + + ETC_GREENWICH("Etc/Greenwich"), + + ETC_UCT("Etc/UCT"), + + ETC_UTC("Etc/UTC"), + + ETC_UNIVERSAL("Etc/Universal"), + + ETC_ZULU("Etc/Zulu"), + + EUROPE_AMSTERDAM("Europe/Amsterdam"), + + EUROPE_ANDORRA("Europe/Andorra"), + + EUROPE_ASTRAKHAN("Europe/Astrakhan"), + + EUROPE_ATHENS("Europe/Athens"), + + EUROPE_BELFAST("Europe/Belfast"), + + EUROPE_BELGRADE("Europe/Belgrade"), + + EUROPE_BERLIN("Europe/Berlin"), + + EUROPE_BRATISLAVA("Europe/Bratislava"), + + EUROPE_BRUSSELS("Europe/Brussels"), + + EUROPE_BUCHAREST("Europe/Bucharest"), + + EUROPE_BUDAPEST("Europe/Budapest"), + + EUROPE_BUSINGEN("Europe/Busingen"), + + EUROPE_CHISINAU("Europe/Chisinau"), + + EUROPE_COPENHAGEN("Europe/Copenhagen"), + + EUROPE_DUBLIN("Europe/Dublin"), + + EUROPE_GIBRALTAR("Europe/Gibraltar"), + + EUROPE_GUERNSEY("Europe/Guernsey"), + + EUROPE_HELSINKI("Europe/Helsinki"), + + EUROPE_ISLE_OF_MAN("Europe/Isle_of_Man"), + + EUROPE_ISTANBUL("Europe/Istanbul"), + + EUROPE_JERSEY("Europe/Jersey"), + + EUROPE_KALININGRAD("Europe/Kaliningrad"), + + EUROPE_KIEV("Europe/Kiev"), + + EUROPE_KIROV("Europe/Kirov"), + + EUROPE_KYIV("Europe/Kyiv"), + + EUROPE_LISBON("Europe/Lisbon"), + + EUROPE_LJUBLJANA("Europe/Ljubljana"), + + EUROPE_LONDON("Europe/London"), + + EUROPE_LUXEMBOURG("Europe/Luxembourg"), + + EUROPE_MADRID("Europe/Madrid"), + + EUROPE_MALTA("Europe/Malta"), + + EUROPE_MARIEHAMN("Europe/Mariehamn"), + + EUROPE_MINSK("Europe/Minsk"), + + EUROPE_MONACO("Europe/Monaco"), + + EUROPE_MOSCOW("Europe/Moscow"), + + EUROPE_NICOSIA("Europe/Nicosia"), + + EUROPE_OSLO("Europe/Oslo"), + + EUROPE_PARIS("Europe/Paris"), + + EUROPE_PODGORICA("Europe/Podgorica"), + + EUROPE_PRAGUE("Europe/Prague"), + + EUROPE_RIGA("Europe/Riga"), + + EUROPE_ROME("Europe/Rome"), + + EUROPE_SAMARA("Europe/Samara"), + + EUROPE_SAN_MARINO("Europe/San_Marino"), + + EUROPE_SARAJEVO("Europe/Sarajevo"), + + EUROPE_SARATOV("Europe/Saratov"), + + EUROPE_SIMFEROPOL("Europe/Simferopol"), + + EUROPE_SKOPJE("Europe/Skopje"), + + EUROPE_SOFIA("Europe/Sofia"), + + EUROPE_STOCKHOLM("Europe/Stockholm"), + + EUROPE_TALLINN("Europe/Tallinn"), + + EUROPE_TIRANE("Europe/Tirane"), + + EUROPE_TIRASPOL("Europe/Tiraspol"), + + EUROPE_ULYANOVSK("Europe/Ulyanovsk"), + + EUROPE_UZHGOROD("Europe/Uzhgorod"), + + EUROPE_VADUZ("Europe/Vaduz"), + + EUROPE_VATICAN("Europe/Vatican"), + + EUROPE_VIENNA("Europe/Vienna"), + + EUROPE_VILNIUS("Europe/Vilnius"), + + EUROPE_VOLGOGRAD("Europe/Volgograd"), + + EUROPE_WARSAW("Europe/Warsaw"), + + EUROPE_ZAGREB("Europe/Zagreb"), + + EUROPE_ZAPOROZHYE("Europe/Zaporozhye"), + + EUROPE_ZURICH("Europe/Zurich"), + + GB("GB"), + + GB_EIRE("GB-Eire"), + + GMT("GMT"), + + GMT0("GMT0"), + + GREENWICH("Greenwich"), + + HONGKONG("Hongkong"), + + ICELAND("Iceland"), + + INDIAN_ANTANANARIVO("Indian/Antananarivo"), + + INDIAN_CHAGOS("Indian/Chagos"), + + INDIAN_CHRISTMAS("Indian/Christmas"), + + INDIAN_COCOS("Indian/Cocos"), + + INDIAN_COMORO("Indian/Comoro"), + + INDIAN_KERGUELEN("Indian/Kerguelen"), + + INDIAN_MAHE("Indian/Mahe"), + + INDIAN_MALDIVES("Indian/Maldives"), + + INDIAN_MAURITIUS("Indian/Mauritius"), + + INDIAN_MAYOTTE("Indian/Mayotte"), + + INDIAN_REUNION("Indian/Reunion"), + + IRAN("Iran"), + + ISRAEL("Israel"), + + JAMAICA("Jamaica"), + + JAPAN("Japan"), + + KWAJALEIN("Kwajalein"), + + LIBYA("Libya"), + + MET("MET"), + + MST7_MDT("MST7MDT"), + + MEXICO_BAJA_NORTE("Mexico/BajaNorte"), + + MEXICO_BAJA_SUR("Mexico/BajaSur"), + + MEXICO_GENERAL("Mexico/General"), + + NZ("NZ"), + + NZ_CHAT("NZ-CHAT"), + + NAVAJO("Navajo"), + + PRC("PRC"), + + PST8_PDT("PST8PDT"), + + PACIFIC_APIA("Pacific/Apia"), + + PACIFIC_AUCKLAND("Pacific/Auckland"), + + PACIFIC_BOUGAINVILLE("Pacific/Bougainville"), + + PACIFIC_CHATHAM("Pacific/Chatham"), + + PACIFIC_CHUUK("Pacific/Chuuk"), + + PACIFIC_EASTER("Pacific/Easter"), + + PACIFIC_EFATE("Pacific/Efate"), + + PACIFIC_ENDERBURY("Pacific/Enderbury"), + + PACIFIC_FAKAOFO("Pacific/Fakaofo"), + + PACIFIC_FIJI("Pacific/Fiji"), + + PACIFIC_FUNAFUTI("Pacific/Funafuti"), + + PACIFIC_GALAPAGOS("Pacific/Galapagos"), + + PACIFIC_GAMBIER("Pacific/Gambier"), + + PACIFIC_GUADALCANAL("Pacific/Guadalcanal"), + + PACIFIC_GUAM("Pacific/Guam"), + + PACIFIC_HONOLULU("Pacific/Honolulu"), + + PACIFIC_JOHNSTON("Pacific/Johnston"), + + PACIFIC_KANTON("Pacific/Kanton"), + + PACIFIC_KIRITIMATI("Pacific/Kiritimati"), + + PACIFIC_KOSRAE("Pacific/Kosrae"), + + PACIFIC_KWAJALEIN("Pacific/Kwajalein"), + + PACIFIC_MAJURO("Pacific/Majuro"), + + PACIFIC_MARQUESAS("Pacific/Marquesas"), + + PACIFIC_MIDWAY("Pacific/Midway"), + + PACIFIC_NAURU("Pacific/Nauru"), + + PACIFIC_NIUE("Pacific/Niue"), + + PACIFIC_NORFOLK("Pacific/Norfolk"), + + PACIFIC_NOUMEA("Pacific/Noumea"), + + PACIFIC_PAGO_PAGO("Pacific/Pago_Pago"), + + PACIFIC_PALAU("Pacific/Palau"), + + PACIFIC_PITCAIRN("Pacific/Pitcairn"), + + PACIFIC_POHNPEI("Pacific/Pohnpei"), + + PACIFIC_PONAPE("Pacific/Ponape"), + + PACIFIC_PORT_MORESBY("Pacific/Port_Moresby"), + + PACIFIC_RAROTONGA("Pacific/Rarotonga"), + + PACIFIC_SAIPAN("Pacific/Saipan"), + + PACIFIC_SAMOA("Pacific/Samoa"), + + PACIFIC_TAHITI("Pacific/Tahiti"), + + PACIFIC_TARAWA("Pacific/Tarawa"), + + PACIFIC_TONGATAPU("Pacific/Tongatapu"), + + PACIFIC_TRUK("Pacific/Truk"), + + PACIFIC_WAKE("Pacific/Wake"), + + PACIFIC_WALLIS("Pacific/Wallis"), + + PACIFIC_YAP("Pacific/Yap"), + + POLAND("Poland"), + + PORTUGAL("Portugal"), + + ROK("ROK"), + + SINGAPORE("Singapore"), + + SYSTEM_V_AST4("SystemV/AST4"), + + SYSTEM_V_AST4_ADT("SystemV/AST4ADT"), + + SYSTEM_V_CST6("SystemV/CST6"), + + SYSTEM_V_CST6_CDT("SystemV/CST6CDT"), + + SYSTEM_V_EST5("SystemV/EST5"), + + SYSTEM_V_EST5_EDT("SystemV/EST5EDT"), + + SYSTEM_V_HST10("SystemV/HST10"), + + SYSTEM_V_MST7("SystemV/MST7"), + + SYSTEM_V_MST7_MDT("SystemV/MST7MDT"), + + SYSTEM_V_PST8("SystemV/PST8"), + + SYSTEM_V_PST8_PDT("SystemV/PST8PDT"), + + SYSTEM_V_YST9("SystemV/YST9"), + + SYSTEM_V_YST9_YDT("SystemV/YST9YDT"), + + TURKEY("Turkey"), + + UCT("UCT"), + + US_ALASKA("US/Alaska"), + + US_ALEUTIAN("US/Aleutian"), + + US_ARIZONA("US/Arizona"), + + US_CENTRAL("US/Central"), + + US_EAST_INDIANA("US/East-Indiana"), + + US_EASTERN("US/Eastern"), + + US_HAWAII("US/Hawaii"), + + US_INDIANA_STARKE("US/Indiana-Starke"), + + US_MICHIGAN("US/Michigan"), + + US_MOUNTAIN("US/Mountain"), + + US_PACIFIC("US/Pacific"), + + US_SAMOA("US/Samoa"), + + UTC("UTC"), + + UNIVERSAL("Universal"), + + W_SU("W-SU"), + + WET("WET"), + + ZULU("Zulu"), + + EST("EST"), + + HST("HST"), + + MST("MST"), + + ACT("ACT"), + + AET("AET"), + + AGT("AGT"), + + ART("ART"), + + AST("AST"), + + BET("BET"), + + BST("BST"), + + CAT("CAT"), + + CNT("CNT"), + + CST("CST"), + + CTT("CTT"), + + EAT("EAT"), + + ECT("ECT"), + + IET("IET"), + + IST("IST"), + + JST("JST"), + + MIT("MIT"), + + NET("NET"), + + NST("NST"), + + PLT("PLT"), + + PNT("PNT"), + + PRT("PRT"), + + PST("PST"), + + SST("SST"), + + VST("VST"); + + private String value; + + TimeZoneEnum(String value) { + this.value = value; + } + + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + public static TimeZoneEnum fromValue(String value) { + for (TimeZoneEnum b : TimeZoneEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + + public static class Adapter extends TypeAdapter { + @Override + public void write(final JsonWriter jsonWriter, final TimeZoneEnum enumeration) + throws IOException { + jsonWriter.value(enumeration.getValue()); + } + + @Override + public TimeZoneEnum read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + return TimeZoneEnum.fromValue(value); + } + } + + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + String value = jsonElement.getAsString(); + TimeZoneEnum.fromValue(value); + } + } + + public static final String SERIALIZED_NAME_TIME_ZONE = "time_zone"; + + @SerializedName(SERIALIZED_NAME_TIME_ZONE) + @javax.annotation.Nullable + private TimeZoneEnum timeZone; + + public static final String SERIALIZED_NAME_FREQUENCY = "frequency"; + + @SerializedName(SERIALIZED_NAME_FREQUENCY) + @javax.annotation.Nullable + private FrequencyInput frequency; + + public static final String SERIALIZED_NAME_RECIPIENT_DETAILS = "recipient_details"; + + @SerializedName(SERIALIZED_NAME_RECIPIENT_DETAILS) + @javax.annotation.Nullable + private RecipientDetailsInput recipientDetails; + + /** Status of the schedule */ + @JsonAdapter(StatusEnum.Adapter.class) + public enum StatusEnum { + ACTIVE("ACTIVE"), + + PAUSE("PAUSE"); + + private String value; + + StatusEnum(String value) { + this.value = value; + } + + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + public static StatusEnum fromValue(String value) { + for (StatusEnum b : StatusEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + + public static class Adapter extends TypeAdapter { + @Override + public void write(final JsonWriter jsonWriter, final StatusEnum enumeration) + throws IOException { + jsonWriter.value(enumeration.getValue()); + } + + @Override + public StatusEnum read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + return StatusEnum.fromValue(value); + } + } + + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + String value = jsonElement.getAsString(); + StatusEnum.fromValue(value); + } + } + + public static final String SERIALIZED_NAME_STATUS = "status"; + + @SerializedName(SERIALIZED_NAME_STATUS) + @javax.annotation.Nullable + private StatusEnum status; + + public static final String SERIALIZED_NAME_PERSONALISED_VIEW_ID = "personalised_view_id"; + + @SerializedName(SERIALIZED_NAME_PERSONALISED_VIEW_ID) + @javax.annotation.Nullable + private String personalisedViewId; + + public UpdateScheduleRequest() {} + + public UpdateScheduleRequest name(@javax.annotation.Nullable String name) { + this.name = name; + return this; + } + + /** + * Name of the scheduled job. + * + * @return name + */ + @javax.annotation.Nullable + public String getName() { + return name; + } + + public void setName(@javax.annotation.Nullable String name) { + this.name = name; + } + + public UpdateScheduleRequest description(@javax.annotation.Nullable String description) { + this.description = description; + return this; + } + + /** + * Description of the scheduled job. + * + * @return description + */ + @javax.annotation.Nullable + public String getDescription() { + return description; + } + + public void setDescription(@javax.annotation.Nullable String description) { + this.description = description; + } + + public UpdateScheduleRequest metadataType( + @javax.annotation.Nullable MetadataTypeEnum metadataType) { + this.metadataType = metadataType; + return this; + } + + /** + * Type of metadata object. + * + * @return metadataType + */ + @javax.annotation.Nullable + public MetadataTypeEnum getMetadataType() { + return metadataType; + } + + public void setMetadataType(@javax.annotation.Nullable MetadataTypeEnum metadataType) { + this.metadataType = metadataType; + } + + public UpdateScheduleRequest metadataIdentifier( + @javax.annotation.Nullable String metadataIdentifier) { + this.metadataIdentifier = metadataIdentifier; + return this; + } + + /** + * Unique ID or name of the metadata object. + * + * @return metadataIdentifier + */ + @javax.annotation.Nullable + public String getMetadataIdentifier() { + return metadataIdentifier; + } + + public void setMetadataIdentifier(@javax.annotation.Nullable String metadataIdentifier) { + this.metadataIdentifier = metadataIdentifier; + } + + public UpdateScheduleRequest fileFormat(@javax.annotation.Nullable FileFormatEnum fileFormat) { + this.fileFormat = fileFormat; + return this; + } + + /** + * Export file format. + * + * @return fileFormat + */ + @javax.annotation.Nullable + public FileFormatEnum getFileFormat() { + return fileFormat; + } + + public void setFileFormat(@javax.annotation.Nullable FileFormatEnum fileFormat) { + this.fileFormat = fileFormat; + } + + public UpdateScheduleRequest liveboardOptions( + @javax.annotation.Nullable LiveboardOptionsInput liveboardOptions) { + this.liveboardOptions = liveboardOptions; + return this; + } + + /** + * Options to specify the details of a Liveboard. + * + * @return liveboardOptions + */ + @javax.annotation.Nullable + public LiveboardOptionsInput getLiveboardOptions() { + return liveboardOptions; + } + + public void setLiveboardOptions( + @javax.annotation.Nullable LiveboardOptionsInput liveboardOptions) { + this.liveboardOptions = liveboardOptions; + } + + public UpdateScheduleRequest pdfOptions( + @javax.annotation.Nullable SchedulesPdfOptionsInput pdfOptions) { + this.pdfOptions = pdfOptions; + return this; + } + + /** + * Options for PDF export. + * + * @return pdfOptions + */ + @javax.annotation.Nullable + public SchedulesPdfOptionsInput getPdfOptions() { + return pdfOptions; + } + + public void setPdfOptions(@javax.annotation.Nullable SchedulesPdfOptionsInput pdfOptions) { + this.pdfOptions = pdfOptions; + } + + public UpdateScheduleRequest timeZone(@javax.annotation.Nullable TimeZoneEnum timeZone) { + this.timeZone = timeZone; + return this; + } + + /** + * Time zone + * + * @return timeZone + */ + @javax.annotation.Nullable + public TimeZoneEnum getTimeZone() { + return timeZone; + } + + public void setTimeZone(@javax.annotation.Nullable TimeZoneEnum timeZone) { + this.timeZone = timeZone; + } + + public UpdateScheduleRequest frequency(@javax.annotation.Nullable FrequencyInput frequency) { + this.frequency = frequency; + return this; + } + + /** + * Frequency of the scheduled job run. + * + * @return frequency + */ + @javax.annotation.Nullable + public FrequencyInput getFrequency() { + return frequency; + } + + public void setFrequency(@javax.annotation.Nullable FrequencyInput frequency) { + this.frequency = frequency; + } + + public UpdateScheduleRequest recipientDetails( + @javax.annotation.Nullable RecipientDetailsInput recipientDetails) { + this.recipientDetails = recipientDetails; + return this; + } + + /** + * Recipients of the scheduled job notifications. You can add the ID or name of the ThoughtSpot + * users or groups as recipients in the `principals` array. If a recipient is not a + * ThoughtSpot user, specify email address. + * + * @return recipientDetails + */ + @javax.annotation.Nullable + public RecipientDetailsInput getRecipientDetails() { + return recipientDetails; + } + + public void setRecipientDetails( + @javax.annotation.Nullable RecipientDetailsInput recipientDetails) { + this.recipientDetails = recipientDetails; + } + + public UpdateScheduleRequest status(@javax.annotation.Nullable StatusEnum status) { + this.status = status; + return this; + } + + /** + * Status of the schedule + * + * @return status + */ + @javax.annotation.Nullable + public StatusEnum getStatus() { + return status; + } + + public void setStatus(@javax.annotation.Nullable StatusEnum status) { + this.status = status; + } + + public UpdateScheduleRequest personalisedViewId( + @javax.annotation.Nullable String personalisedViewId) { + this.personalisedViewId = personalisedViewId; + return this; + } + + /** + * Personalised view id of the liveboard to be scheduled. + * + * @return personalisedViewId + */ + @javax.annotation.Nullable + public String getPersonalisedViewId() { + return personalisedViewId; + } + + public void setPersonalisedViewId(@javax.annotation.Nullable String personalisedViewId) { + this.personalisedViewId = personalisedViewId; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key name of the property + * @param value value of the property + * @return the UpdateScheduleRequest instance itself + */ + public UpdateScheduleRequest putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return a map of objects + */ + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key name of the property + * @return an object + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + UpdateScheduleRequest updateScheduleRequest = (UpdateScheduleRequest) o; + return Objects.equals(this.name, updateScheduleRequest.name) + && Objects.equals(this.description, updateScheduleRequest.description) + && Objects.equals(this.metadataType, updateScheduleRequest.metadataType) + && Objects.equals(this.metadataIdentifier, updateScheduleRequest.metadataIdentifier) + && Objects.equals(this.fileFormat, updateScheduleRequest.fileFormat) + && Objects.equals(this.liveboardOptions, updateScheduleRequest.liveboardOptions) + && Objects.equals(this.pdfOptions, updateScheduleRequest.pdfOptions) + && Objects.equals(this.timeZone, updateScheduleRequest.timeZone) + && Objects.equals(this.frequency, updateScheduleRequest.frequency) + && Objects.equals(this.recipientDetails, updateScheduleRequest.recipientDetails) + && Objects.equals(this.status, updateScheduleRequest.status) + && Objects.equals(this.personalisedViewId, updateScheduleRequest.personalisedViewId) + && Objects.equals( + this.additionalProperties, updateScheduleRequest.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash( + name, + description, + metadataType, + metadataIdentifier, + fileFormat, + liveboardOptions, + pdfOptions, + timeZone, + frequency, + recipientDetails, + status, + personalisedViewId, + additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class UpdateScheduleRequest {\n"); + sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append(" description: ").append(toIndentedString(description)).append("\n"); + sb.append(" metadataType: ").append(toIndentedString(metadataType)).append("\n"); + sb.append(" metadataIdentifier: ") + .append(toIndentedString(metadataIdentifier)) + .append("\n"); + sb.append(" fileFormat: ").append(toIndentedString(fileFormat)).append("\n"); + sb.append(" liveboardOptions: ").append(toIndentedString(liveboardOptions)).append("\n"); + sb.append(" pdfOptions: ").append(toIndentedString(pdfOptions)).append("\n"); + sb.append(" timeZone: ").append(toIndentedString(timeZone)).append("\n"); + sb.append(" frequency: ").append(toIndentedString(frequency)).append("\n"); + sb.append(" recipientDetails: ").append(toIndentedString(recipientDetails)).append("\n"); + sb.append(" status: ").append(toIndentedString(status)).append("\n"); + sb.append(" personalisedViewId: ") + .append(toIndentedString(personalisedViewId)) + .append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first + * line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("name"); + openapiFields.add("description"); + openapiFields.add("metadata_type"); + openapiFields.add("metadata_identifier"); + openapiFields.add("file_format"); + openapiFields.add("liveboard_options"); + openapiFields.add("pdf_options"); + openapiFields.add("time_zone"); + openapiFields.add("frequency"); + openapiFields.add("recipient_details"); + openapiFields.add("status"); + openapiFields.add("personalised_view_id"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to UpdateScheduleRequest + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!UpdateScheduleRequest.openapiRequiredFields + .isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException( + String.format( + "The required field(s) %s in UpdateScheduleRequest is not found in" + + " the empty JSON string", + UpdateScheduleRequest.openapiRequiredFields.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if ((jsonObj.get("name") != null && !jsonObj.get("name").isJsonNull()) + && !jsonObj.get("name").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `name` to be a primitive type in the JSON string" + + " but got `%s`", + jsonObj.get("name").toString())); + } + if ((jsonObj.get("description") != null && !jsonObj.get("description").isJsonNull()) + && !jsonObj.get("description").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `description` to be a primitive type in the JSON" + + " string but got `%s`", + jsonObj.get("description").toString())); + } + if ((jsonObj.get("metadata_type") != null && !jsonObj.get("metadata_type").isJsonNull()) + && !jsonObj.get("metadata_type").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `metadata_type` to be a primitive type in the JSON" + + " string but got `%s`", + jsonObj.get("metadata_type").toString())); + } + // validate the optional field `metadata_type` + if (jsonObj.get("metadata_type") != null && !jsonObj.get("metadata_type").isJsonNull()) { + MetadataTypeEnum.validateJsonElement(jsonObj.get("metadata_type")); + } + if ((jsonObj.get("metadata_identifier") != null + && !jsonObj.get("metadata_identifier").isJsonNull()) + && !jsonObj.get("metadata_identifier").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `metadata_identifier` to be a primitive type in" + + " the JSON string but got `%s`", + jsonObj.get("metadata_identifier").toString())); + } + if ((jsonObj.get("file_format") != null && !jsonObj.get("file_format").isJsonNull()) + && !jsonObj.get("file_format").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `file_format` to be a primitive type in the JSON" + + " string but got `%s`", + jsonObj.get("file_format").toString())); + } + // validate the optional field `file_format` + if (jsonObj.get("file_format") != null && !jsonObj.get("file_format").isJsonNull()) { + FileFormatEnum.validateJsonElement(jsonObj.get("file_format")); + } + // validate the optional field `liveboard_options` + if (jsonObj.get("liveboard_options") != null + && !jsonObj.get("liveboard_options").isJsonNull()) { + LiveboardOptionsInput.validateJsonElement(jsonObj.get("liveboard_options")); + } + // validate the optional field `pdf_options` + if (jsonObj.get("pdf_options") != null && !jsonObj.get("pdf_options").isJsonNull()) { + SchedulesPdfOptionsInput.validateJsonElement(jsonObj.get("pdf_options")); + } + if ((jsonObj.get("time_zone") != null && !jsonObj.get("time_zone").isJsonNull()) + && !jsonObj.get("time_zone").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `time_zone` to be a primitive type in the JSON" + + " string but got `%s`", + jsonObj.get("time_zone").toString())); + } + // validate the optional field `time_zone` + if (jsonObj.get("time_zone") != null && !jsonObj.get("time_zone").isJsonNull()) { + TimeZoneEnum.validateJsonElement(jsonObj.get("time_zone")); + } + // validate the optional field `frequency` + if (jsonObj.get("frequency") != null && !jsonObj.get("frequency").isJsonNull()) { + FrequencyInput.validateJsonElement(jsonObj.get("frequency")); + } + // validate the optional field `recipient_details` + if (jsonObj.get("recipient_details") != null + && !jsonObj.get("recipient_details").isJsonNull()) { + RecipientDetailsInput.validateJsonElement(jsonObj.get("recipient_details")); + } + if ((jsonObj.get("status") != null && !jsonObj.get("status").isJsonNull()) + && !jsonObj.get("status").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `status` to be a primitive type in the JSON string" + + " but got `%s`", + jsonObj.get("status").toString())); + } + // validate the optional field `status` + if (jsonObj.get("status") != null && !jsonObj.get("status").isJsonNull()) { + StatusEnum.validateJsonElement(jsonObj.get("status")); + } + if ((jsonObj.get("personalised_view_id") != null + && !jsonObj.get("personalised_view_id").isJsonNull()) + && !jsonObj.get("personalised_view_id").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `personalised_view_id` to be a primitive type in" + + " the JSON string but got `%s`", + jsonObj.get("personalised_view_id").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!UpdateScheduleRequest.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'UpdateScheduleRequest' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter = + gson.getDelegateAdapter(this, TypeToken.get(UpdateScheduleRequest.class)); + + return (TypeAdapter) + new TypeAdapter() { + @Override + public void write(JsonWriter out, UpdateScheduleRequest value) + throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + obj.remove("additionalProperties"); + // serialize additional properties + if (value.getAdditionalProperties() != null) { + for (Map.Entry entry : + value.getAdditionalProperties().entrySet()) { + if (entry.getValue() instanceof String) + obj.addProperty(entry.getKey(), (String) entry.getValue()); + else if (entry.getValue() instanceof Number) + obj.addProperty(entry.getKey(), (Number) entry.getValue()); + else if (entry.getValue() instanceof Boolean) + obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); + else if (entry.getValue() instanceof Character) + obj.addProperty( + entry.getKey(), (Character) entry.getValue()); + else { + JsonElement jsonElement = gson.toJsonTree(entry.getValue()); + if (jsonElement.isJsonArray()) { + obj.add(entry.getKey(), jsonElement.getAsJsonArray()); + } else { + obj.add(entry.getKey(), jsonElement.getAsJsonObject()); + } + } + } + } + elementAdapter.write(out, obj); + } + + @Override + public UpdateScheduleRequest read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // store additional fields in the deserialized instance + UpdateScheduleRequest instance = thisAdapter.fromJsonTree(jsonObj); + for (Map.Entry entry : jsonObj.entrySet()) { + if (!openapiFields.contains(entry.getKey())) { + if (entry.getValue().isJsonPrimitive()) { // primitive type + if (entry.getValue().getAsJsonPrimitive().isString()) + instance.putAdditionalProperty( + entry.getKey(), entry.getValue().getAsString()); + else if (entry.getValue().getAsJsonPrimitive().isNumber()) + instance.putAdditionalProperty( + entry.getKey(), entry.getValue().getAsNumber()); + else if (entry.getValue().getAsJsonPrimitive().isBoolean()) + instance.putAdditionalProperty( + entry.getKey(), + entry.getValue().getAsBoolean()); + else + throw new IllegalArgumentException( + String.format( + "The field `%s` has unknown primitive" + + " type. Value: %s", + entry.getKey(), + entry.getValue().toString())); + } else if (entry.getValue().isJsonArray()) { + instance.putAdditionalProperty( + entry.getKey(), + gson.fromJson(entry.getValue(), List.class)); + } else { // JSON object + instance.putAdditionalProperty( + entry.getKey(), + gson.fromJson(entry.getValue(), HashMap.class)); + } + } + } + return instance; + } + }.nullSafe(); + } + } + + /** + * Create an instance of UpdateScheduleRequest given an JSON string + * + * @param jsonString JSON string + * @return An instance of UpdateScheduleRequest + * @throws IOException if the JSON string is invalid with respect to UpdateScheduleRequest + */ + public static UpdateScheduleRequest fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, UpdateScheduleRequest.class); + } + + /** + * Convert an instance of UpdateScheduleRequest to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} diff --git a/sdks/java/src/main/java/com/thoughtspot/client/model/UpdateSystemConfigRequest.java b/sdks/java/src/main/java/com/thoughtspot/client/model/UpdateSystemConfigRequest.java new file mode 100644 index 000000000..fa985b9ec --- /dev/null +++ b/sdks/java/src/main/java/com/thoughtspot/client/model/UpdateSystemConfigRequest.java @@ -0,0 +1,297 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client.model; + +import com.google.gson.Gson; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.TypeAdapter; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.annotations.SerializedName; +import com.google.gson.reflect.TypeToken; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import com.thoughtspot.client.JSON; +import java.io.IOException; +import java.io.Serializable; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Objects; + +/** UpdateSystemConfigRequest */ +@javax.annotation.Generated( + value = "org.openapitools.codegen.languages.JavaClientCodegen", + comments = "Generator version: 7.12.0") +public class UpdateSystemConfigRequest implements Serializable { + private static final long serialVersionUID = 1L; + + public static final String SERIALIZED_NAME_CONFIGURATION = "configuration"; + + @SerializedName(SERIALIZED_NAME_CONFIGURATION) + @javax.annotation.Nonnull + private Object _configuration; + + public UpdateSystemConfigRequest() {} + + public UpdateSystemConfigRequest _configuration( + @javax.annotation.Nonnull Object _configuration) { + this._configuration = _configuration; + return this; + } + + /** + * Configuration JSON with the key-value pair of configuration attributes to be updated. + * + * @return _configuration + */ + @javax.annotation.Nonnull + public Object getConfiguration() { + return _configuration; + } + + public void setConfiguration(@javax.annotation.Nonnull Object _configuration) { + this._configuration = _configuration; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key name of the property + * @param value value of the property + * @return the UpdateSystemConfigRequest instance itself + */ + public UpdateSystemConfigRequest putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return a map of objects + */ + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key name of the property + * @return an object + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + UpdateSystemConfigRequest updateSystemConfigRequest = (UpdateSystemConfigRequest) o; + return Objects.equals(this._configuration, updateSystemConfigRequest._configuration) + && Objects.equals( + this.additionalProperties, updateSystemConfigRequest.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(_configuration, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class UpdateSystemConfigRequest {\n"); + sb.append(" _configuration: ").append(toIndentedString(_configuration)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first + * line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("configuration"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + openapiRequiredFields.add("configuration"); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to UpdateSystemConfigRequest + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!UpdateSystemConfigRequest.openapiRequiredFields + .isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException( + String.format( + "The required field(s) %s in UpdateSystemConfigRequest is not" + + " found in the empty JSON string", + UpdateSystemConfigRequest.openapiRequiredFields.toString())); + } + } + + // check to make sure all required properties/fields are present in the JSON string + for (String requiredField : UpdateSystemConfigRequest.openapiRequiredFields) { + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException( + String.format( + "The required field `%s` is not found in the JSON string: %s", + requiredField, jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!UpdateSystemConfigRequest.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'UpdateSystemConfigRequest' and its + // subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter = + gson.getDelegateAdapter(this, TypeToken.get(UpdateSystemConfigRequest.class)); + + return (TypeAdapter) + new TypeAdapter() { + @Override + public void write(JsonWriter out, UpdateSystemConfigRequest value) + throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + obj.remove("additionalProperties"); + // serialize additional properties + if (value.getAdditionalProperties() != null) { + for (Map.Entry entry : + value.getAdditionalProperties().entrySet()) { + if (entry.getValue() instanceof String) + obj.addProperty(entry.getKey(), (String) entry.getValue()); + else if (entry.getValue() instanceof Number) + obj.addProperty(entry.getKey(), (Number) entry.getValue()); + else if (entry.getValue() instanceof Boolean) + obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); + else if (entry.getValue() instanceof Character) + obj.addProperty( + entry.getKey(), (Character) entry.getValue()); + else { + JsonElement jsonElement = gson.toJsonTree(entry.getValue()); + if (jsonElement.isJsonArray()) { + obj.add(entry.getKey(), jsonElement.getAsJsonArray()); + } else { + obj.add(entry.getKey(), jsonElement.getAsJsonObject()); + } + } + } + } + elementAdapter.write(out, obj); + } + + @Override + public UpdateSystemConfigRequest read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // store additional fields in the deserialized instance + UpdateSystemConfigRequest instance = thisAdapter.fromJsonTree(jsonObj); + for (Map.Entry entry : jsonObj.entrySet()) { + if (!openapiFields.contains(entry.getKey())) { + if (entry.getValue().isJsonPrimitive()) { // primitive type + if (entry.getValue().getAsJsonPrimitive().isString()) + instance.putAdditionalProperty( + entry.getKey(), entry.getValue().getAsString()); + else if (entry.getValue().getAsJsonPrimitive().isNumber()) + instance.putAdditionalProperty( + entry.getKey(), entry.getValue().getAsNumber()); + else if (entry.getValue().getAsJsonPrimitive().isBoolean()) + instance.putAdditionalProperty( + entry.getKey(), + entry.getValue().getAsBoolean()); + else + throw new IllegalArgumentException( + String.format( + "The field `%s` has unknown primitive" + + " type. Value: %s", + entry.getKey(), + entry.getValue().toString())); + } else if (entry.getValue().isJsonArray()) { + instance.putAdditionalProperty( + entry.getKey(), + gson.fromJson(entry.getValue(), List.class)); + } else { // JSON object + instance.putAdditionalProperty( + entry.getKey(), + gson.fromJson(entry.getValue(), HashMap.class)); + } + } + } + return instance; + } + }.nullSafe(); + } + } + + /** + * Create an instance of UpdateSystemConfigRequest given an JSON string + * + * @param jsonString JSON string + * @return An instance of UpdateSystemConfigRequest + * @throws IOException if the JSON string is invalid with respect to UpdateSystemConfigRequest + */ + public static UpdateSystemConfigRequest fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, UpdateSystemConfigRequest.class); + } + + /** + * Convert an instance of UpdateSystemConfigRequest to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} diff --git a/sdks/java/src/main/java/com/thoughtspot/client/model/UpdateTagRequest.java b/sdks/java/src/main/java/com/thoughtspot/client/model/UpdateTagRequest.java new file mode 100644 index 000000000..4e908b4db --- /dev/null +++ b/sdks/java/src/main/java/com/thoughtspot/client/model/UpdateTagRequest.java @@ -0,0 +1,327 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client.model; + +import com.google.gson.Gson; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.TypeAdapter; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.annotations.SerializedName; +import com.google.gson.reflect.TypeToken; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import com.thoughtspot.client.JSON; +import java.io.IOException; +import java.io.Serializable; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Objects; + +/** UpdateTagRequest */ +@javax.annotation.Generated( + value = "org.openapitools.codegen.languages.JavaClientCodegen", + comments = "Generator version: 7.12.0") +public class UpdateTagRequest implements Serializable { + private static final long serialVersionUID = 1L; + + public static final String SERIALIZED_NAME_NAME = "name"; + + @SerializedName(SERIALIZED_NAME_NAME) + @javax.annotation.Nullable + private String name; + + public static final String SERIALIZED_NAME_COLOR = "color"; + + @SerializedName(SERIALIZED_NAME_COLOR) + @javax.annotation.Nullable + private String color; + + public UpdateTagRequest() {} + + public UpdateTagRequest name(@javax.annotation.Nullable String name) { + this.name = name; + return this; + } + + /** + * Name of the tag. + * + * @return name + */ + @javax.annotation.Nullable + public String getName() { + return name; + } + + public void setName(@javax.annotation.Nullable String name) { + this.name = name; + } + + public UpdateTagRequest color(@javax.annotation.Nullable String color) { + this.color = color; + return this; + } + + /** + * Hex color code to be assigned to the tag. For example, #ff78a9. + * + * @return color + */ + @javax.annotation.Nullable + public String getColor() { + return color; + } + + public void setColor(@javax.annotation.Nullable String color) { + this.color = color; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key name of the property + * @param value value of the property + * @return the UpdateTagRequest instance itself + */ + public UpdateTagRequest putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return a map of objects + */ + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key name of the property + * @return an object + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + UpdateTagRequest updateTagRequest = (UpdateTagRequest) o; + return Objects.equals(this.name, updateTagRequest.name) + && Objects.equals(this.color, updateTagRequest.color) + && Objects.equals(this.additionalProperties, updateTagRequest.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(name, color, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class UpdateTagRequest {\n"); + sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append(" color: ").append(toIndentedString(color)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first + * line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("name"); + openapiFields.add("color"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to UpdateTagRequest + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!UpdateTagRequest.openapiRequiredFields + .isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException( + String.format( + "The required field(s) %s in UpdateTagRequest is not found in the" + + " empty JSON string", + UpdateTagRequest.openapiRequiredFields.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if ((jsonObj.get("name") != null && !jsonObj.get("name").isJsonNull()) + && !jsonObj.get("name").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `name` to be a primitive type in the JSON string" + + " but got `%s`", + jsonObj.get("name").toString())); + } + if ((jsonObj.get("color") != null && !jsonObj.get("color").isJsonNull()) + && !jsonObj.get("color").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `color` to be a primitive type in the JSON string" + + " but got `%s`", + jsonObj.get("color").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!UpdateTagRequest.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'UpdateTagRequest' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter = + gson.getDelegateAdapter(this, TypeToken.get(UpdateTagRequest.class)); + + return (TypeAdapter) + new TypeAdapter() { + @Override + public void write(JsonWriter out, UpdateTagRequest value) + throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + obj.remove("additionalProperties"); + // serialize additional properties + if (value.getAdditionalProperties() != null) { + for (Map.Entry entry : + value.getAdditionalProperties().entrySet()) { + if (entry.getValue() instanceof String) + obj.addProperty(entry.getKey(), (String) entry.getValue()); + else if (entry.getValue() instanceof Number) + obj.addProperty(entry.getKey(), (Number) entry.getValue()); + else if (entry.getValue() instanceof Boolean) + obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); + else if (entry.getValue() instanceof Character) + obj.addProperty( + entry.getKey(), (Character) entry.getValue()); + else { + JsonElement jsonElement = gson.toJsonTree(entry.getValue()); + if (jsonElement.isJsonArray()) { + obj.add(entry.getKey(), jsonElement.getAsJsonArray()); + } else { + obj.add(entry.getKey(), jsonElement.getAsJsonObject()); + } + } + } + } + elementAdapter.write(out, obj); + } + + @Override + public UpdateTagRequest read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // store additional fields in the deserialized instance + UpdateTagRequest instance = thisAdapter.fromJsonTree(jsonObj); + for (Map.Entry entry : jsonObj.entrySet()) { + if (!openapiFields.contains(entry.getKey())) { + if (entry.getValue().isJsonPrimitive()) { // primitive type + if (entry.getValue().getAsJsonPrimitive().isString()) + instance.putAdditionalProperty( + entry.getKey(), entry.getValue().getAsString()); + else if (entry.getValue().getAsJsonPrimitive().isNumber()) + instance.putAdditionalProperty( + entry.getKey(), entry.getValue().getAsNumber()); + else if (entry.getValue().getAsJsonPrimitive().isBoolean()) + instance.putAdditionalProperty( + entry.getKey(), + entry.getValue().getAsBoolean()); + else + throw new IllegalArgumentException( + String.format( + "The field `%s` has unknown primitive" + + " type. Value: %s", + entry.getKey(), + entry.getValue().toString())); + } else if (entry.getValue().isJsonArray()) { + instance.putAdditionalProperty( + entry.getKey(), + gson.fromJson(entry.getValue(), List.class)); + } else { // JSON object + instance.putAdditionalProperty( + entry.getKey(), + gson.fromJson(entry.getValue(), HashMap.class)); + } + } + } + return instance; + } + }.nullSafe(); + } + } + + /** + * Create an instance of UpdateTagRequest given an JSON string + * + * @param jsonString JSON string + * @return An instance of UpdateTagRequest + * @throws IOException if the JSON string is invalid with respect to UpdateTagRequest + */ + public static UpdateTagRequest fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, UpdateTagRequest.class); + } + + /** + * Convert an instance of UpdateTagRequest to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} diff --git a/sdks/java/src/main/java/com/thoughtspot/client/model/UpdateUserGroupRequest.java b/sdks/java/src/main/java/com/thoughtspot/client/model/UpdateUserGroupRequest.java new file mode 100644 index 000000000..3f2dc76b2 --- /dev/null +++ b/sdks/java/src/main/java/com/thoughtspot/client/model/UpdateUserGroupRequest.java @@ -0,0 +1,1024 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client.model; + +import com.google.gson.Gson; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.TypeAdapter; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.reflect.TypeToken; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import com.thoughtspot.client.JSON; +import java.io.IOException; +import java.io.Serializable; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Objects; + +/** UpdateUserGroupRequest */ +@javax.annotation.Generated( + value = "org.openapitools.codegen.languages.JavaClientCodegen", + comments = "Generator version: 7.12.0") +public class UpdateUserGroupRequest implements Serializable { + private static final long serialVersionUID = 1L; + + public static final String SERIALIZED_NAME_NAME = "name"; + + @SerializedName(SERIALIZED_NAME_NAME) + @javax.annotation.Nullable + private String name; + + public static final String SERIALIZED_NAME_DEFAULT_LIVEBOARD_IDENTIFIERS = + "default_liveboard_identifiers"; + + @SerializedName(SERIALIZED_NAME_DEFAULT_LIVEBOARD_IDENTIFIERS) + @javax.annotation.Nullable + private List defaultLiveboardIdentifiers; + + public static final String SERIALIZED_NAME_DESCRIPTION = "description"; + + @SerializedName(SERIALIZED_NAME_DESCRIPTION) + @javax.annotation.Nullable + private String description; + + public static final String SERIALIZED_NAME_DISPLAY_NAME = "display_name"; + + @SerializedName(SERIALIZED_NAME_DISPLAY_NAME) + @javax.annotation.Nullable + private String displayName; + + /** Gets or Sets privileges */ + @JsonAdapter(PrivilegesEnum.Adapter.class) + public enum PrivilegesEnum { + ADMINISTRATION("ADMINISTRATION"), + + AUTHORING("AUTHORING"), + + USERDATAUPLOADING("USERDATAUPLOADING"), + + DATADOWNLOADING("DATADOWNLOADING"), + + USERMANAGEMENT("USERMANAGEMENT"), + + DATAMANAGEMENT("DATAMANAGEMENT"), + + SHAREWITHALL("SHAREWITHALL"), + + JOBSCHEDULING("JOBSCHEDULING"), + + A3_ANALYSIS("A3ANALYSIS"), + + EXPERIMENTALFEATUREPRIVILEGE("EXPERIMENTALFEATUREPRIVILEGE"), + + BYPASSRLS("BYPASSRLS"), + + RANALYSIS("RANALYSIS"), + + DEVELOPER("DEVELOPER"), + + USER_ADMINISTRATION("USER_ADMINISTRATION"), + + GROUP_ADMINISTRATION("GROUP_ADMINISTRATION"), + + SYNCMANAGEMENT("SYNCMANAGEMENT"), + + CAN_CREATE_CATALOG("CAN_CREATE_CATALOG"), + + DISABLE_PINBOARD_CREATION("DISABLE_PINBOARD_CREATION"), + + LIVEBOARD_VERIFIER("LIVEBOARD_VERIFIER"), + + PREVIEW_THOUGHTSPOT_SAGE("PREVIEW_THOUGHTSPOT_SAGE"), + + CAN_MANAGE_VERSION_CONTROL("CAN_MANAGE_VERSION_CONTROL"), + + THIRDPARTY_ANALYSIS("THIRDPARTY_ANALYSIS"), + + ALLOW_NON_EMBED_FULL_APP_ACCESS("ALLOW_NON_EMBED_FULL_APP_ACCESS"), + + CAN_ACCESS_ANALYST_STUDIO("CAN_ACCESS_ANALYST_STUDIO"), + + CAN_MANAGE_ANALYST_STUDIO("CAN_MANAGE_ANALYST_STUDIO"), + + CAN_MODIFY_FOLDERS("CAN_MODIFY_FOLDERS"), + + CAN_MANAGE_VARIABLES("CAN_MANAGE_VARIABLES"), + + CAN_VIEW_FOLDERS("CAN_VIEW_FOLDERS"), + + CAN_MANAGE_AGENTSPOT("CAN_MANAGE_AGENTSPOT"), + + CAN_ACCESS_AGENTSPOT("CAN_ACCESS_AGENTSPOT"), + + PREVIEW_DOCUMENT_SEARCH("PREVIEW_DOCUMENT_SEARCH"), + + CAN_SETUP_VERSION_CONTROL("CAN_SETUP_VERSION_CONTROL"), + + CAN_DOWNLOAD_VISUALS("CAN_DOWNLOAD_VISUALS"), + + CAN_DOWNLOAD_DETAILED_DATA("CAN_DOWNLOAD_DETAILED_DATA"), + + CAN_USE_SPOTTER("CAN_USE_SPOTTER"); + + private String value; + + PrivilegesEnum(String value) { + this.value = value; + } + + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + public static PrivilegesEnum fromValue(String value) { + for (PrivilegesEnum b : PrivilegesEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + + public static class Adapter extends TypeAdapter { + @Override + public void write(final JsonWriter jsonWriter, final PrivilegesEnum enumeration) + throws IOException { + jsonWriter.value(enumeration.getValue()); + } + + @Override + public PrivilegesEnum read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + return PrivilegesEnum.fromValue(value); + } + } + + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + String value = jsonElement.getAsString(); + PrivilegesEnum.fromValue(value); + } + } + + public static final String SERIALIZED_NAME_PRIVILEGES = "privileges"; + + @SerializedName(SERIALIZED_NAME_PRIVILEGES) + @javax.annotation.Nullable + private List privileges; + + public static final String SERIALIZED_NAME_SUB_GROUP_IDENTIFIERS = "sub_group_identifiers"; + + @SerializedName(SERIALIZED_NAME_SUB_GROUP_IDENTIFIERS) + @javax.annotation.Nullable + private List subGroupIdentifiers; + + /** Type of the group */ + @JsonAdapter(TypeEnum.Adapter.class) + public enum TypeEnum { + LOCAL_GROUP("LOCAL_GROUP"), + + LDAP_GROUP("LDAP_GROUP"), + + TEAM_GROUP("TEAM_GROUP"), + + TENANT_GROUP("TENANT_GROUP"); + + private String value; + + TypeEnum(String value) { + this.value = value; + } + + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + public static TypeEnum fromValue(String value) { + for (TypeEnum b : TypeEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + + public static class Adapter extends TypeAdapter { + @Override + public void write(final JsonWriter jsonWriter, final TypeEnum enumeration) + throws IOException { + jsonWriter.value(enumeration.getValue()); + } + + @Override + public TypeEnum read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + return TypeEnum.fromValue(value); + } + } + + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + String value = jsonElement.getAsString(); + TypeEnum.fromValue(value); + } + } + + public static final String SERIALIZED_NAME_TYPE = "type"; + + @SerializedName(SERIALIZED_NAME_TYPE) + @javax.annotation.Nullable + private TypeEnum type; + + public static final String SERIALIZED_NAME_USER_IDENTIFIERS = "user_identifiers"; + + @SerializedName(SERIALIZED_NAME_USER_IDENTIFIERS) + @javax.annotation.Nullable + private List userIdentifiers; + + /** + * Visibility of the group. To make a group visible to other users and groups, set the + * visibility to SHAREABLE. + */ + @JsonAdapter(VisibilityEnum.Adapter.class) + public enum VisibilityEnum { + SHARABLE("SHARABLE"), + + NON_SHARABLE("NON_SHARABLE"); + + private String value; + + VisibilityEnum(String value) { + this.value = value; + } + + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + public static VisibilityEnum fromValue(String value) { + for (VisibilityEnum b : VisibilityEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + + public static class Adapter extends TypeAdapter { + @Override + public void write(final JsonWriter jsonWriter, final VisibilityEnum enumeration) + throws IOException { + jsonWriter.value(enumeration.getValue()); + } + + @Override + public VisibilityEnum read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + return VisibilityEnum.fromValue(value); + } + } + + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + String value = jsonElement.getAsString(); + VisibilityEnum.fromValue(value); + } + } + + public static final String SERIALIZED_NAME_VISIBILITY = "visibility"; + + @SerializedName(SERIALIZED_NAME_VISIBILITY) + @javax.annotation.Nullable + private VisibilityEnum visibility; + + public static final String SERIALIZED_NAME_ROLE_IDENTIFIERS = "role_identifiers"; + + @SerializedName(SERIALIZED_NAME_ROLE_IDENTIFIERS) + @javax.annotation.Nullable + private List roleIdentifiers; + + /** Type of update operation. Default operation type is REPLACE */ + @JsonAdapter(OperationEnum.Adapter.class) + public enum OperationEnum { + ADD("ADD"), + + REMOVE("REMOVE"), + + REPLACE("REPLACE"); + + private String value; + + OperationEnum(String value) { + this.value = value; + } + + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + public static OperationEnum fromValue(String value) { + for (OperationEnum b : OperationEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + + public static class Adapter extends TypeAdapter { + @Override + public void write(final JsonWriter jsonWriter, final OperationEnum enumeration) + throws IOException { + jsonWriter.value(enumeration.getValue()); + } + + @Override + public OperationEnum read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + return OperationEnum.fromValue(value); + } + } + + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + String value = jsonElement.getAsString(); + OperationEnum.fromValue(value); + } + } + + public static final String SERIALIZED_NAME_OPERATION = "operation"; + + @SerializedName(SERIALIZED_NAME_OPERATION) + @javax.annotation.Nullable + private OperationEnum operation = OperationEnum.REPLACE; + + public UpdateUserGroupRequest() {} + + public UpdateUserGroupRequest name(@javax.annotation.Nullable String name) { + this.name = name; + return this; + } + + /** + * Name of the group to modify. + * + * @return name + */ + @javax.annotation.Nullable + public String getName() { + return name; + } + + public void setName(@javax.annotation.Nullable String name) { + this.name = name; + } + + public UpdateUserGroupRequest defaultLiveboardIdentifiers( + @javax.annotation.Nullable List defaultLiveboardIdentifiers) { + this.defaultLiveboardIdentifiers = defaultLiveboardIdentifiers; + return this; + } + + public UpdateUserGroupRequest addDefaultLiveboardIdentifiersItem( + String defaultLiveboardIdentifiersItem) { + if (this.defaultLiveboardIdentifiers == null) { + this.defaultLiveboardIdentifiers = new ArrayList<>(); + } + this.defaultLiveboardIdentifiers.add(defaultLiveboardIdentifiersItem); + return this; + } + + /** + * ID of the Liveboards to be assigned as default Liveboards to the users in the group. + * + * @return defaultLiveboardIdentifiers + */ + @javax.annotation.Nullable + public List getDefaultLiveboardIdentifiers() { + return defaultLiveboardIdentifiers; + } + + public void setDefaultLiveboardIdentifiers( + @javax.annotation.Nullable List defaultLiveboardIdentifiers) { + this.defaultLiveboardIdentifiers = defaultLiveboardIdentifiers; + } + + public UpdateUserGroupRequest description(@javax.annotation.Nullable String description) { + this.description = description; + return this; + } + + /** + * Description for the group. + * + * @return description + */ + @javax.annotation.Nullable + public String getDescription() { + return description; + } + + public void setDescription(@javax.annotation.Nullable String description) { + this.description = description; + } + + public UpdateUserGroupRequest displayName(@javax.annotation.Nullable String displayName) { + this.displayName = displayName; + return this; + } + + /** + * Display name of the group. + * + * @return displayName + */ + @javax.annotation.Nullable + public String getDisplayName() { + return displayName; + } + + public void setDisplayName(@javax.annotation.Nullable String displayName) { + this.displayName = displayName; + } + + public UpdateUserGroupRequest privileges( + @javax.annotation.Nullable List privileges) { + this.privileges = privileges; + return this; + } + + public UpdateUserGroupRequest addPrivilegesItem(PrivilegesEnum privilegesItem) { + if (this.privileges == null) { + this.privileges = new ArrayList<>(); + } + this.privileges.add(privilegesItem); + return this; + } + + /** + * Privileges to assign to the group. + * + * @return privileges + */ + @javax.annotation.Nullable + public List getPrivileges() { + return privileges; + } + + public void setPrivileges(@javax.annotation.Nullable List privileges) { + this.privileges = privileges; + } + + public UpdateUserGroupRequest subGroupIdentifiers( + @javax.annotation.Nullable List subGroupIdentifiers) { + this.subGroupIdentifiers = subGroupIdentifiers; + return this; + } + + public UpdateUserGroupRequest addSubGroupIdentifiersItem(String subGroupIdentifiersItem) { + if (this.subGroupIdentifiers == null) { + this.subGroupIdentifiers = new ArrayList<>(); + } + this.subGroupIdentifiers.add(subGroupIdentifiersItem); + return this; + } + + /** + * GUID or name of the sub groups. A subgroup is a group assigned to a parent group. + * + * @return subGroupIdentifiers + */ + @javax.annotation.Nullable + public List getSubGroupIdentifiers() { + return subGroupIdentifiers; + } + + public void setSubGroupIdentifiers( + @javax.annotation.Nullable List subGroupIdentifiers) { + this.subGroupIdentifiers = subGroupIdentifiers; + } + + public UpdateUserGroupRequest type(@javax.annotation.Nullable TypeEnum type) { + this.type = type; + return this; + } + + /** + * Type of the group + * + * @return type + */ + @javax.annotation.Nullable + public TypeEnum getType() { + return type; + } + + public void setType(@javax.annotation.Nullable TypeEnum type) { + this.type = type; + } + + public UpdateUserGroupRequest userIdentifiers( + @javax.annotation.Nullable List userIdentifiers) { + this.userIdentifiers = userIdentifiers; + return this; + } + + public UpdateUserGroupRequest addUserIdentifiersItem(String userIdentifiersItem) { + if (this.userIdentifiers == null) { + this.userIdentifiers = new ArrayList<>(); + } + this.userIdentifiers.add(userIdentifiersItem); + return this; + } + + /** + * GUID or name of the users to assign to the group. + * + * @return userIdentifiers + */ + @javax.annotation.Nullable + public List getUserIdentifiers() { + return userIdentifiers; + } + + public void setUserIdentifiers(@javax.annotation.Nullable List userIdentifiers) { + this.userIdentifiers = userIdentifiers; + } + + public UpdateUserGroupRequest visibility(@javax.annotation.Nullable VisibilityEnum visibility) { + this.visibility = visibility; + return this; + } + + /** + * Visibility of the group. To make a group visible to other users and groups, set the + * visibility to SHAREABLE. + * + * @return visibility + */ + @javax.annotation.Nullable + public VisibilityEnum getVisibility() { + return visibility; + } + + public void setVisibility(@javax.annotation.Nullable VisibilityEnum visibility) { + this.visibility = visibility; + } + + public UpdateUserGroupRequest roleIdentifiers( + @javax.annotation.Nullable List roleIdentifiers) { + this.roleIdentifiers = roleIdentifiers; + return this; + } + + public UpdateUserGroupRequest addRoleIdentifiersItem(String roleIdentifiersItem) { + if (this.roleIdentifiers == null) { + this.roleIdentifiers = new ArrayList<>(); + } + this.roleIdentifiers.add(roleIdentifiersItem); + return this; + } + + /** + * Role identifiers of the Roles that should be assigned to the group. + * + * @return roleIdentifiers + */ + @javax.annotation.Nullable + public List getRoleIdentifiers() { + return roleIdentifiers; + } + + public void setRoleIdentifiers(@javax.annotation.Nullable List roleIdentifiers) { + this.roleIdentifiers = roleIdentifiers; + } + + public UpdateUserGroupRequest operation(@javax.annotation.Nullable OperationEnum operation) { + this.operation = operation; + return this; + } + + /** + * Type of update operation. Default operation type is REPLACE + * + * @return operation + */ + @javax.annotation.Nullable + public OperationEnum getOperation() { + return operation; + } + + public void setOperation(@javax.annotation.Nullable OperationEnum operation) { + this.operation = operation; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key name of the property + * @param value value of the property + * @return the UpdateUserGroupRequest instance itself + */ + public UpdateUserGroupRequest putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return a map of objects + */ + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key name of the property + * @return an object + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + UpdateUserGroupRequest updateUserGroupRequest = (UpdateUserGroupRequest) o; + return Objects.equals(this.name, updateUserGroupRequest.name) + && Objects.equals( + this.defaultLiveboardIdentifiers, + updateUserGroupRequest.defaultLiveboardIdentifiers) + && Objects.equals(this.description, updateUserGroupRequest.description) + && Objects.equals(this.displayName, updateUserGroupRequest.displayName) + && Objects.equals(this.privileges, updateUserGroupRequest.privileges) + && Objects.equals( + this.subGroupIdentifiers, updateUserGroupRequest.subGroupIdentifiers) + && Objects.equals(this.type, updateUserGroupRequest.type) + && Objects.equals(this.userIdentifiers, updateUserGroupRequest.userIdentifiers) + && Objects.equals(this.visibility, updateUserGroupRequest.visibility) + && Objects.equals(this.roleIdentifiers, updateUserGroupRequest.roleIdentifiers) + && Objects.equals(this.operation, updateUserGroupRequest.operation) + && Objects.equals( + this.additionalProperties, updateUserGroupRequest.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash( + name, + defaultLiveboardIdentifiers, + description, + displayName, + privileges, + subGroupIdentifiers, + type, + userIdentifiers, + visibility, + roleIdentifiers, + operation, + additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class UpdateUserGroupRequest {\n"); + sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append(" defaultLiveboardIdentifiers: ") + .append(toIndentedString(defaultLiveboardIdentifiers)) + .append("\n"); + sb.append(" description: ").append(toIndentedString(description)).append("\n"); + sb.append(" displayName: ").append(toIndentedString(displayName)).append("\n"); + sb.append(" privileges: ").append(toIndentedString(privileges)).append("\n"); + sb.append(" subGroupIdentifiers: ") + .append(toIndentedString(subGroupIdentifiers)) + .append("\n"); + sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append(" userIdentifiers: ").append(toIndentedString(userIdentifiers)).append("\n"); + sb.append(" visibility: ").append(toIndentedString(visibility)).append("\n"); + sb.append(" roleIdentifiers: ").append(toIndentedString(roleIdentifiers)).append("\n"); + sb.append(" operation: ").append(toIndentedString(operation)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first + * line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("name"); + openapiFields.add("default_liveboard_identifiers"); + openapiFields.add("description"); + openapiFields.add("display_name"); + openapiFields.add("privileges"); + openapiFields.add("sub_group_identifiers"); + openapiFields.add("type"); + openapiFields.add("user_identifiers"); + openapiFields.add("visibility"); + openapiFields.add("role_identifiers"); + openapiFields.add("operation"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to UpdateUserGroupRequest + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!UpdateUserGroupRequest.openapiRequiredFields + .isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException( + String.format( + "The required field(s) %s in UpdateUserGroupRequest is not found" + + " in the empty JSON string", + UpdateUserGroupRequest.openapiRequiredFields.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if ((jsonObj.get("name") != null && !jsonObj.get("name").isJsonNull()) + && !jsonObj.get("name").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `name` to be a primitive type in the JSON string" + + " but got `%s`", + jsonObj.get("name").toString())); + } + // ensure the optional json data is an array if present + if (jsonObj.get("default_liveboard_identifiers") != null + && !jsonObj.get("default_liveboard_identifiers").isJsonNull() + && !jsonObj.get("default_liveboard_identifiers").isJsonArray()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `default_liveboard_identifiers` to be an array in" + + " the JSON string but got `%s`", + jsonObj.get("default_liveboard_identifiers").toString())); + } + if ((jsonObj.get("description") != null && !jsonObj.get("description").isJsonNull()) + && !jsonObj.get("description").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `description` to be a primitive type in the JSON" + + " string but got `%s`", + jsonObj.get("description").toString())); + } + if ((jsonObj.get("display_name") != null && !jsonObj.get("display_name").isJsonNull()) + && !jsonObj.get("display_name").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `display_name` to be a primitive type in the JSON" + + " string but got `%s`", + jsonObj.get("display_name").toString())); + } + // ensure the optional json data is an array if present + if (jsonObj.get("privileges") != null + && !jsonObj.get("privileges").isJsonNull() + && !jsonObj.get("privileges").isJsonArray()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `privileges` to be an array in the JSON string but" + + " got `%s`", + jsonObj.get("privileges").toString())); + } + // ensure the optional json data is an array if present + if (jsonObj.get("sub_group_identifiers") != null + && !jsonObj.get("sub_group_identifiers").isJsonNull() + && !jsonObj.get("sub_group_identifiers").isJsonArray()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `sub_group_identifiers` to be an array in the JSON" + + " string but got `%s`", + jsonObj.get("sub_group_identifiers").toString())); + } + if ((jsonObj.get("type") != null && !jsonObj.get("type").isJsonNull()) + && !jsonObj.get("type").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `type` to be a primitive type in the JSON string" + + " but got `%s`", + jsonObj.get("type").toString())); + } + // validate the optional field `type` + if (jsonObj.get("type") != null && !jsonObj.get("type").isJsonNull()) { + TypeEnum.validateJsonElement(jsonObj.get("type")); + } + // ensure the optional json data is an array if present + if (jsonObj.get("user_identifiers") != null + && !jsonObj.get("user_identifiers").isJsonNull() + && !jsonObj.get("user_identifiers").isJsonArray()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `user_identifiers` to be an array in the JSON" + + " string but got `%s`", + jsonObj.get("user_identifiers").toString())); + } + if ((jsonObj.get("visibility") != null && !jsonObj.get("visibility").isJsonNull()) + && !jsonObj.get("visibility").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `visibility` to be a primitive type in the JSON" + + " string but got `%s`", + jsonObj.get("visibility").toString())); + } + // validate the optional field `visibility` + if (jsonObj.get("visibility") != null && !jsonObj.get("visibility").isJsonNull()) { + VisibilityEnum.validateJsonElement(jsonObj.get("visibility")); + } + // ensure the optional json data is an array if present + if (jsonObj.get("role_identifiers") != null + && !jsonObj.get("role_identifiers").isJsonNull() + && !jsonObj.get("role_identifiers").isJsonArray()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `role_identifiers` to be an array in the JSON" + + " string but got `%s`", + jsonObj.get("role_identifiers").toString())); + } + if ((jsonObj.get("operation") != null && !jsonObj.get("operation").isJsonNull()) + && !jsonObj.get("operation").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `operation` to be a primitive type in the JSON" + + " string but got `%s`", + jsonObj.get("operation").toString())); + } + // validate the optional field `operation` + if (jsonObj.get("operation") != null && !jsonObj.get("operation").isJsonNull()) { + OperationEnum.validateJsonElement(jsonObj.get("operation")); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!UpdateUserGroupRequest.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'UpdateUserGroupRequest' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter = + gson.getDelegateAdapter(this, TypeToken.get(UpdateUserGroupRequest.class)); + + return (TypeAdapter) + new TypeAdapter() { + @Override + public void write(JsonWriter out, UpdateUserGroupRequest value) + throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + obj.remove("additionalProperties"); + // serialize additional properties + if (value.getAdditionalProperties() != null) { + for (Map.Entry entry : + value.getAdditionalProperties().entrySet()) { + if (entry.getValue() instanceof String) + obj.addProperty(entry.getKey(), (String) entry.getValue()); + else if (entry.getValue() instanceof Number) + obj.addProperty(entry.getKey(), (Number) entry.getValue()); + else if (entry.getValue() instanceof Boolean) + obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); + else if (entry.getValue() instanceof Character) + obj.addProperty( + entry.getKey(), (Character) entry.getValue()); + else { + JsonElement jsonElement = gson.toJsonTree(entry.getValue()); + if (jsonElement.isJsonArray()) { + obj.add(entry.getKey(), jsonElement.getAsJsonArray()); + } else { + obj.add(entry.getKey(), jsonElement.getAsJsonObject()); + } + } + } + } + elementAdapter.write(out, obj); + } + + @Override + public UpdateUserGroupRequest read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // store additional fields in the deserialized instance + UpdateUserGroupRequest instance = thisAdapter.fromJsonTree(jsonObj); + for (Map.Entry entry : jsonObj.entrySet()) { + if (!openapiFields.contains(entry.getKey())) { + if (entry.getValue().isJsonPrimitive()) { // primitive type + if (entry.getValue().getAsJsonPrimitive().isString()) + instance.putAdditionalProperty( + entry.getKey(), entry.getValue().getAsString()); + else if (entry.getValue().getAsJsonPrimitive().isNumber()) + instance.putAdditionalProperty( + entry.getKey(), entry.getValue().getAsNumber()); + else if (entry.getValue().getAsJsonPrimitive().isBoolean()) + instance.putAdditionalProperty( + entry.getKey(), + entry.getValue().getAsBoolean()); + else + throw new IllegalArgumentException( + String.format( + "The field `%s` has unknown primitive" + + " type. Value: %s", + entry.getKey(), + entry.getValue().toString())); + } else if (entry.getValue().isJsonArray()) { + instance.putAdditionalProperty( + entry.getKey(), + gson.fromJson(entry.getValue(), List.class)); + } else { // JSON object + instance.putAdditionalProperty( + entry.getKey(), + gson.fromJson(entry.getValue(), HashMap.class)); + } + } + } + return instance; + } + }.nullSafe(); + } + } + + /** + * Create an instance of UpdateUserGroupRequest given an JSON string + * + * @param jsonString JSON string + * @return An instance of UpdateUserGroupRequest + * @throws IOException if the JSON string is invalid with respect to UpdateUserGroupRequest + */ + public static UpdateUserGroupRequest fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, UpdateUserGroupRequest.class); + } + + /** + * Convert an instance of UpdateUserGroupRequest to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} diff --git a/sdks/java/src/main/java/com/thoughtspot/client/model/UpdateUserRequest.java b/sdks/java/src/main/java/com/thoughtspot/client/model/UpdateUserRequest.java new file mode 100644 index 000000000..3cbae4ed0 --- /dev/null +++ b/sdks/java/src/main/java/com/thoughtspot/client/model/UpdateUserRequest.java @@ -0,0 +1,1333 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client.model; + +import com.google.gson.Gson; +import com.google.gson.JsonArray; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.TypeAdapter; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.reflect.TypeToken; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import com.thoughtspot.client.JSON; +import java.io.IOException; +import java.io.Serializable; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Objects; +import org.openapitools.jackson.nullable.JsonNullable; + +/** UpdateUserRequest */ +@javax.annotation.Generated( + value = "org.openapitools.codegen.languages.JavaClientCodegen", + comments = "Generator version: 7.12.0") +public class UpdateUserRequest implements Serializable { + private static final long serialVersionUID = 1L; + + public static final String SERIALIZED_NAME_NAME = "name"; + + @SerializedName(SERIALIZED_NAME_NAME) + @javax.annotation.Nullable + private String name; + + public static final String SERIALIZED_NAME_DISPLAY_NAME = "display_name"; + + @SerializedName(SERIALIZED_NAME_DISPLAY_NAME) + @javax.annotation.Nullable + private String displayName; + + /** + * Visibility of the users. When set to SHARABLE, the user is visible to other users and groups + * when they try to share an object. + */ + @JsonAdapter(VisibilityEnum.Adapter.class) + public enum VisibilityEnum { + SHARABLE("SHARABLE"), + + NON_SHARABLE("NON_SHARABLE"); + + private String value; + + VisibilityEnum(String value) { + this.value = value; + } + + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + public static VisibilityEnum fromValue(String value) { + for (VisibilityEnum b : VisibilityEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + + public static class Adapter extends TypeAdapter { + @Override + public void write(final JsonWriter jsonWriter, final VisibilityEnum enumeration) + throws IOException { + jsonWriter.value(enumeration.getValue()); + } + + @Override + public VisibilityEnum read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + return VisibilityEnum.fromValue(value); + } + } + + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + String value = jsonElement.getAsString(); + VisibilityEnum.fromValue(value); + } + } + + public static final String SERIALIZED_NAME_VISIBILITY = "visibility"; + + @SerializedName(SERIALIZED_NAME_VISIBILITY) + @javax.annotation.Nullable + private VisibilityEnum visibility; + + public static final String SERIALIZED_NAME_EMAIL = "email"; + + @SerializedName(SERIALIZED_NAME_EMAIL) + @javax.annotation.Nullable + private String email; + + /** + * Current status of the user account. The `SUSPENDED` user state indicates a + * transitional state applicable to IAMv2 users only. + */ + @JsonAdapter(AccountStatusEnum.Adapter.class) + public enum AccountStatusEnum { + ACTIVE("ACTIVE"), + + INACTIVE("INACTIVE"), + + EXPIRED("EXPIRED"), + + LOCKED("LOCKED"), + + PENDING("PENDING"), + + SUSPENDED("SUSPENDED"); + + private String value; + + AccountStatusEnum(String value) { + this.value = value; + } + + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + public static AccountStatusEnum fromValue(String value) { + for (AccountStatusEnum b : AccountStatusEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + + public static class Adapter extends TypeAdapter { + @Override + public void write(final JsonWriter jsonWriter, final AccountStatusEnum enumeration) + throws IOException { + jsonWriter.value(enumeration.getValue()); + } + + @Override + public AccountStatusEnum read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + return AccountStatusEnum.fromValue(value); + } + } + + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + String value = jsonElement.getAsString(); + AccountStatusEnum.fromValue(value); + } + } + + public static final String SERIALIZED_NAME_ACCOUNT_STATUS = "account_status"; + + @SerializedName(SERIALIZED_NAME_ACCOUNT_STATUS) + @javax.annotation.Nullable + private AccountStatusEnum accountStatus; + + public static final String SERIALIZED_NAME_NOTIFY_ON_SHARE = "notify_on_share"; + + @SerializedName(SERIALIZED_NAME_NOTIFY_ON_SHARE) + @javax.annotation.Nullable + private Boolean notifyOnShare; + + public static final String SERIALIZED_NAME_SHOW_ONBOARDING_EXPERIENCE = + "show_onboarding_experience"; + + @SerializedName(SERIALIZED_NAME_SHOW_ONBOARDING_EXPERIENCE) + @javax.annotation.Nullable + private Boolean showOnboardingExperience; + + public static final String SERIALIZED_NAME_ONBOARDING_EXPERIENCE_COMPLETED = + "onboarding_experience_completed"; + + @SerializedName(SERIALIZED_NAME_ONBOARDING_EXPERIENCE_COMPLETED) + @javax.annotation.Nullable + private Boolean onboardingExperienceCompleted; + + /** Type of the account. */ + @JsonAdapter(AccountTypeEnum.Adapter.class) + public enum AccountTypeEnum { + LOCAL_USER("LOCAL_USER"), + + LDAP_USER("LDAP_USER"), + + SAML_USER("SAML_USER"), + + OIDC_USER("OIDC_USER"), + + REMOTE_USER("REMOTE_USER"); + + private String value; + + AccountTypeEnum(String value) { + this.value = value; + } + + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + public static AccountTypeEnum fromValue(String value) { + for (AccountTypeEnum b : AccountTypeEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + + public static class Adapter extends TypeAdapter { + @Override + public void write(final JsonWriter jsonWriter, final AccountTypeEnum enumeration) + throws IOException { + jsonWriter.value(enumeration.getValue()); + } + + @Override + public AccountTypeEnum read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + return AccountTypeEnum.fromValue(value); + } + } + + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + String value = jsonElement.getAsString(); + AccountTypeEnum.fromValue(value); + } + } + + public static final String SERIALIZED_NAME_ACCOUNT_TYPE = "account_type"; + + @SerializedName(SERIALIZED_NAME_ACCOUNT_TYPE) + @javax.annotation.Nullable + private AccountTypeEnum accountType; + + public static final String SERIALIZED_NAME_GROUP_IDENTIFIERS = "group_identifiers"; + + @SerializedName(SERIALIZED_NAME_GROUP_IDENTIFIERS) + @javax.annotation.Nullable + private List groupIdentifiers; + + public static final String SERIALIZED_NAME_HOME_LIVEBOARD_IDENTIFIER = + "home_liveboard_identifier"; + + @SerializedName(SERIALIZED_NAME_HOME_LIVEBOARD_IDENTIFIER) + @javax.annotation.Nullable + private String homeLiveboardIdentifier; + + public static final String SERIALIZED_NAME_FAVORITE_METADATA = "favorite_metadata"; + + @SerializedName(SERIALIZED_NAME_FAVORITE_METADATA) + @javax.annotation.Nullable + private List favoriteMetadata; + + public static final String SERIALIZED_NAME_ORG_IDENTIFIERS = "org_identifiers"; + + @SerializedName(SERIALIZED_NAME_ORG_IDENTIFIERS) + @javax.annotation.Nullable + private List orgIdentifiers; + + /** Type of update operation. Default operation type is REPLACE */ + @JsonAdapter(OperationEnum.Adapter.class) + public enum OperationEnum { + ADD("ADD"), + + REMOVE("REMOVE"), + + REPLACE("REPLACE"); + + private String value; + + OperationEnum(String value) { + this.value = value; + } + + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + public static OperationEnum fromValue(String value) { + for (OperationEnum b : OperationEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + + public static class Adapter extends TypeAdapter { + @Override + public void write(final JsonWriter jsonWriter, final OperationEnum enumeration) + throws IOException { + jsonWriter.value(enumeration.getValue()); + } + + @Override + public OperationEnum read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + return OperationEnum.fromValue(value); + } + } + + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + String value = jsonElement.getAsString(); + OperationEnum.fromValue(value); + } + } + + public static final String SERIALIZED_NAME_OPERATION = "operation"; + + @SerializedName(SERIALIZED_NAME_OPERATION) + @javax.annotation.Nullable + private OperationEnum operation = OperationEnum.REPLACE; + + /** + * Locale for the user. When setting this value, do not set use_browser_language to true, + * otherwise the browser's language setting will take precedence and the preferred_locale + * value will be ignored. + */ + @JsonAdapter(PreferredLocaleEnum.Adapter.class) + public enum PreferredLocaleEnum { + EN_CA("en-CA"), + + EN_GB("en-GB"), + + EN_US("en-US"), + + DE_DE("de-DE"), + + JA_JP("ja-JP"), + + ZH_CN("zh-CN"), + + PT_BR("pt-BR"), + + FR_FR("fr-FR"), + + FR_CA("fr-CA"), + + ES_US("es-US"), + + DA_DK("da-DK"), + + ES_ES("es-ES"), + + FI_FI("fi-FI"), + + SV_SE("sv-SE"), + + NB_NO("nb-NO"), + + PT_PT("pt-PT"), + + NL_NL("nl-NL"), + + IT_IT("it-IT"), + + RU_RU("ru-RU"), + + EN_IN("en-IN"), + + DE_CH("de-CH"), + + EN_NZ("en-NZ"), + + ES_MX("es-MX"), + + EN_AU("en-AU"), + + ZH_HANT("zh-Hant"), + + KO_KR("ko-KR"), + + EN_DE("en-DE"); + + private String value; + + PreferredLocaleEnum(String value) { + this.value = value; + } + + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + public static PreferredLocaleEnum fromValue(String value) { + for (PreferredLocaleEnum b : PreferredLocaleEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + + public static class Adapter extends TypeAdapter { + @Override + public void write(final JsonWriter jsonWriter, final PreferredLocaleEnum enumeration) + throws IOException { + jsonWriter.value(enumeration.getValue()); + } + + @Override + public PreferredLocaleEnum read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + return PreferredLocaleEnum.fromValue(value); + } + } + + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + String value = jsonElement.getAsString(); + PreferredLocaleEnum.fromValue(value); + } + } + + public static final String SERIALIZED_NAME_PREFERRED_LOCALE = "preferred_locale"; + + @SerializedName(SERIALIZED_NAME_PREFERRED_LOCALE) + @javax.annotation.Nullable + private PreferredLocaleEnum preferredLocale; + + public static final String SERIALIZED_NAME_USE_BROWSER_LANGUAGE = "use_browser_language"; + + @SerializedName(SERIALIZED_NAME_USE_BROWSER_LANGUAGE) + @javax.annotation.Nullable + private Boolean useBrowserLanguage; + + public static final String SERIALIZED_NAME_EXTENDED_PROPERTIES = "extended_properties"; + + @SerializedName(SERIALIZED_NAME_EXTENDED_PROPERTIES) + @javax.annotation.Nullable + private Object extendedProperties; + + public static final String SERIALIZED_NAME_EXTENDED_PREFERENCES = "extended_preferences"; + + @SerializedName(SERIALIZED_NAME_EXTENDED_PREFERENCES) + @javax.annotation.Nullable + private Object extendedPreferences; + + public UpdateUserRequest() {} + + public UpdateUserRequest name(@javax.annotation.Nullable String name) { + this.name = name; + return this; + } + + /** + * Name of the user. The username string must be unique. + * + * @return name + */ + @javax.annotation.Nullable + public String getName() { + return name; + } + + public void setName(@javax.annotation.Nullable String name) { + this.name = name; + } + + public UpdateUserRequest displayName(@javax.annotation.Nullable String displayName) { + this.displayName = displayName; + return this; + } + + /** + * A unique display name string for the user account, usually their first and last name + * + * @return displayName + */ + @javax.annotation.Nullable + public String getDisplayName() { + return displayName; + } + + public void setDisplayName(@javax.annotation.Nullable String displayName) { + this.displayName = displayName; + } + + public UpdateUserRequest visibility(@javax.annotation.Nullable VisibilityEnum visibility) { + this.visibility = visibility; + return this; + } + + /** + * Visibility of the users. When set to SHARABLE, the user is visible to other users and groups + * when they try to share an object. + * + * @return visibility + */ + @javax.annotation.Nullable + public VisibilityEnum getVisibility() { + return visibility; + } + + public void setVisibility(@javax.annotation.Nullable VisibilityEnum visibility) { + this.visibility = visibility; + } + + public UpdateUserRequest email(@javax.annotation.Nullable String email) { + this.email = email; + return this; + } + + /** + * Email of the user account + * + * @return email + */ + @javax.annotation.Nullable + public String getEmail() { + return email; + } + + public void setEmail(@javax.annotation.Nullable String email) { + this.email = email; + } + + public UpdateUserRequest accountStatus( + @javax.annotation.Nullable AccountStatusEnum accountStatus) { + this.accountStatus = accountStatus; + return this; + } + + /** + * Current status of the user account. The `SUSPENDED` user state indicates a + * transitional state applicable to IAMv2 users only. + * + * @return accountStatus + */ + @javax.annotation.Nullable + public AccountStatusEnum getAccountStatus() { + return accountStatus; + } + + public void setAccountStatus(@javax.annotation.Nullable AccountStatusEnum accountStatus) { + this.accountStatus = accountStatus; + } + + public UpdateUserRequest notifyOnShare(@javax.annotation.Nullable Boolean notifyOnShare) { + this.notifyOnShare = notifyOnShare; + return this; + } + + /** + * User preference for receiving email notifications when another ThoughtSpot user shares a + * metadata object such as Answer, Liveboard, or Worksheet. + * + * @return notifyOnShare + */ + @javax.annotation.Nullable + public Boolean getNotifyOnShare() { + return notifyOnShare; + } + + public void setNotifyOnShare(@javax.annotation.Nullable Boolean notifyOnShare) { + this.notifyOnShare = notifyOnShare; + } + + public UpdateUserRequest showOnboardingExperience( + @javax.annotation.Nullable Boolean showOnboardingExperience) { + this.showOnboardingExperience = showOnboardingExperience; + return this; + } + + /** + * The user preference for revisiting the onboarding experience. + * + * @return showOnboardingExperience + */ + @javax.annotation.Nullable + public Boolean getShowOnboardingExperience() { + return showOnboardingExperience; + } + + public void setShowOnboardingExperience( + @javax.annotation.Nullable Boolean showOnboardingExperience) { + this.showOnboardingExperience = showOnboardingExperience; + } + + public UpdateUserRequest onboardingExperienceCompleted( + @javax.annotation.Nullable Boolean onboardingExperienceCompleted) { + this.onboardingExperienceCompleted = onboardingExperienceCompleted; + return this; + } + + /** + * Indicates if the user has completed the onboarding and allows turning off the onboarding + * walkthrough. + * + * @return onboardingExperienceCompleted + */ + @javax.annotation.Nullable + public Boolean getOnboardingExperienceCompleted() { + return onboardingExperienceCompleted; + } + + public void setOnboardingExperienceCompleted( + @javax.annotation.Nullable Boolean onboardingExperienceCompleted) { + this.onboardingExperienceCompleted = onboardingExperienceCompleted; + } + + public UpdateUserRequest accountType(@javax.annotation.Nullable AccountTypeEnum accountType) { + this.accountType = accountType; + return this; + } + + /** + * Type of the account. + * + * @return accountType + */ + @javax.annotation.Nullable + public AccountTypeEnum getAccountType() { + return accountType; + } + + public void setAccountType(@javax.annotation.Nullable AccountTypeEnum accountType) { + this.accountType = accountType; + } + + public UpdateUserRequest groupIdentifiers( + @javax.annotation.Nullable List groupIdentifiers) { + this.groupIdentifiers = groupIdentifiers; + return this; + } + + public UpdateUserRequest addGroupIdentifiersItem(String groupIdentifiersItem) { + if (this.groupIdentifiers == null) { + this.groupIdentifiers = new ArrayList<>(); + } + this.groupIdentifiers.add(groupIdentifiersItem); + return this; + } + + /** + * GUIDs or names of the groups. + * + * @return groupIdentifiers + */ + @javax.annotation.Nullable + public List getGroupIdentifiers() { + return groupIdentifiers; + } + + public void setGroupIdentifiers(@javax.annotation.Nullable List groupIdentifiers) { + this.groupIdentifiers = groupIdentifiers; + } + + public UpdateUserRequest homeLiveboardIdentifier( + @javax.annotation.Nullable String homeLiveboardIdentifier) { + this.homeLiveboardIdentifier = homeLiveboardIdentifier; + return this; + } + + /** + * GUID of the Liveboard to set a default Liveboard for the user. ThoughtSpot displays this + * Liveboard on the Home page when the user logs in. + * + * @return homeLiveboardIdentifier + */ + @javax.annotation.Nullable + public String getHomeLiveboardIdentifier() { + return homeLiveboardIdentifier; + } + + public void setHomeLiveboardIdentifier( + @javax.annotation.Nullable String homeLiveboardIdentifier) { + this.homeLiveboardIdentifier = homeLiveboardIdentifier; + } + + public UpdateUserRequest favoriteMetadata( + @javax.annotation.Nullable List favoriteMetadata) { + this.favoriteMetadata = favoriteMetadata; + return this; + } + + public UpdateUserRequest addFavoriteMetadataItem(FavoriteMetadataInput favoriteMetadataItem) { + if (this.favoriteMetadata == null) { + this.favoriteMetadata = new ArrayList<>(); + } + this.favoriteMetadata.add(favoriteMetadataItem); + return this; + } + + /** + * Metadata objects to add to the user's favorites list. + * + * @return favoriteMetadata + */ + @javax.annotation.Nullable + public List getFavoriteMetadata() { + return favoriteMetadata; + } + + public void setFavoriteMetadata( + @javax.annotation.Nullable List favoriteMetadata) { + this.favoriteMetadata = favoriteMetadata; + } + + public UpdateUserRequest orgIdentifiers( + @javax.annotation.Nullable List orgIdentifiers) { + this.orgIdentifiers = orgIdentifiers; + return this; + } + + public UpdateUserRequest addOrgIdentifiersItem(String orgIdentifiersItem) { + if (this.orgIdentifiers == null) { + this.orgIdentifiers = new ArrayList<>(); + } + this.orgIdentifiers.add(orgIdentifiersItem); + return this; + } + + /** + * IDs of the Orgs. + * + * @return orgIdentifiers + */ + @javax.annotation.Nullable + public List getOrgIdentifiers() { + return orgIdentifiers; + } + + public void setOrgIdentifiers(@javax.annotation.Nullable List orgIdentifiers) { + this.orgIdentifiers = orgIdentifiers; + } + + public UpdateUserRequest operation(@javax.annotation.Nullable OperationEnum operation) { + this.operation = operation; + return this; + } + + /** + * Type of update operation. Default operation type is REPLACE + * + * @return operation + */ + @javax.annotation.Nullable + public OperationEnum getOperation() { + return operation; + } + + public void setOperation(@javax.annotation.Nullable OperationEnum operation) { + this.operation = operation; + } + + public UpdateUserRequest preferredLocale( + @javax.annotation.Nullable PreferredLocaleEnum preferredLocale) { + this.preferredLocale = preferredLocale; + return this; + } + + /** + * Locale for the user. When setting this value, do not set use_browser_language to true, + * otherwise the browser's language setting will take precedence and the preferred_locale + * value will be ignored. + * + * @return preferredLocale + */ + @javax.annotation.Nullable + public PreferredLocaleEnum getPreferredLocale() { + return preferredLocale; + } + + public void setPreferredLocale(@javax.annotation.Nullable PreferredLocaleEnum preferredLocale) { + this.preferredLocale = preferredLocale; + } + + public UpdateUserRequest useBrowserLanguage( + @javax.annotation.Nullable Boolean useBrowserLanguage) { + this.useBrowserLanguage = useBrowserLanguage; + return this; + } + + /** + * Flag to indicate whether to use the browser locale for the user in the UI. When set to true, + * the preferred_locale value is unset and the browser's language setting takes precedence. + * Version: 26.3.0.cl or later + * + * @return useBrowserLanguage + */ + @javax.annotation.Nullable + public Boolean getUseBrowserLanguage() { + return useBrowserLanguage; + } + + public void setUseBrowserLanguage(@javax.annotation.Nullable Boolean useBrowserLanguage) { + this.useBrowserLanguage = useBrowserLanguage; + } + + public UpdateUserRequest extendedProperties( + @javax.annotation.Nullable Object extendedProperties) { + this.extendedProperties = extendedProperties; + return this; + } + + /** + * Properties for the user + * + * @return extendedProperties + */ + @javax.annotation.Nullable + public Object getExtendedProperties() { + return extendedProperties; + } + + public void setExtendedProperties(@javax.annotation.Nullable Object extendedProperties) { + this.extendedProperties = extendedProperties; + } + + public UpdateUserRequest extendedPreferences( + @javax.annotation.Nullable Object extendedPreferences) { + this.extendedPreferences = extendedPreferences; + return this; + } + + /** + * Preferences for the user + * + * @return extendedPreferences + */ + @javax.annotation.Nullable + public Object getExtendedPreferences() { + return extendedPreferences; + } + + public void setExtendedPreferences(@javax.annotation.Nullable Object extendedPreferences) { + this.extendedPreferences = extendedPreferences; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key name of the property + * @param value value of the property + * @return the UpdateUserRequest instance itself + */ + public UpdateUserRequest putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return a map of objects + */ + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key name of the property + * @return an object + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + UpdateUserRequest updateUserRequest = (UpdateUserRequest) o; + return Objects.equals(this.name, updateUserRequest.name) + && Objects.equals(this.displayName, updateUserRequest.displayName) + && Objects.equals(this.visibility, updateUserRequest.visibility) + && Objects.equals(this.email, updateUserRequest.email) + && Objects.equals(this.accountStatus, updateUserRequest.accountStatus) + && Objects.equals(this.notifyOnShare, updateUserRequest.notifyOnShare) + && Objects.equals( + this.showOnboardingExperience, updateUserRequest.showOnboardingExperience) + && Objects.equals( + this.onboardingExperienceCompleted, + updateUserRequest.onboardingExperienceCompleted) + && Objects.equals(this.accountType, updateUserRequest.accountType) + && Objects.equals(this.groupIdentifiers, updateUserRequest.groupIdentifiers) + && Objects.equals( + this.homeLiveboardIdentifier, updateUserRequest.homeLiveboardIdentifier) + && Objects.equals(this.favoriteMetadata, updateUserRequest.favoriteMetadata) + && Objects.equals(this.orgIdentifiers, updateUserRequest.orgIdentifiers) + && Objects.equals(this.operation, updateUserRequest.operation) + && Objects.equals(this.preferredLocale, updateUserRequest.preferredLocale) + && Objects.equals(this.useBrowserLanguage, updateUserRequest.useBrowserLanguage) + && Objects.equals(this.extendedProperties, updateUserRequest.extendedProperties) + && Objects.equals(this.extendedPreferences, updateUserRequest.extendedPreferences) + && Objects.equals( + this.additionalProperties, updateUserRequest.additionalProperties); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b + || (a != null + && b != null + && a.isPresent() + && b.isPresent() + && Objects.deepEquals(a.get(), b.get())); + } + + @Override + public int hashCode() { + return Objects.hash( + name, + displayName, + visibility, + email, + accountStatus, + notifyOnShare, + showOnboardingExperience, + onboardingExperienceCompleted, + accountType, + groupIdentifiers, + homeLiveboardIdentifier, + favoriteMetadata, + orgIdentifiers, + operation, + preferredLocale, + useBrowserLanguage, + extendedProperties, + extendedPreferences, + additionalProperties); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; + } + return a.isPresent() ? Arrays.deepHashCode(new Object[] {a.get()}) : 31; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class UpdateUserRequest {\n"); + sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append(" displayName: ").append(toIndentedString(displayName)).append("\n"); + sb.append(" visibility: ").append(toIndentedString(visibility)).append("\n"); + sb.append(" email: ").append(toIndentedString(email)).append("\n"); + sb.append(" accountStatus: ").append(toIndentedString(accountStatus)).append("\n"); + sb.append(" notifyOnShare: ").append(toIndentedString(notifyOnShare)).append("\n"); + sb.append(" showOnboardingExperience: ") + .append(toIndentedString(showOnboardingExperience)) + .append("\n"); + sb.append(" onboardingExperienceCompleted: ") + .append(toIndentedString(onboardingExperienceCompleted)) + .append("\n"); + sb.append(" accountType: ").append(toIndentedString(accountType)).append("\n"); + sb.append(" groupIdentifiers: ").append(toIndentedString(groupIdentifiers)).append("\n"); + sb.append(" homeLiveboardIdentifier: ") + .append(toIndentedString(homeLiveboardIdentifier)) + .append("\n"); + sb.append(" favoriteMetadata: ").append(toIndentedString(favoriteMetadata)).append("\n"); + sb.append(" orgIdentifiers: ").append(toIndentedString(orgIdentifiers)).append("\n"); + sb.append(" operation: ").append(toIndentedString(operation)).append("\n"); + sb.append(" preferredLocale: ").append(toIndentedString(preferredLocale)).append("\n"); + sb.append(" useBrowserLanguage: ") + .append(toIndentedString(useBrowserLanguage)) + .append("\n"); + sb.append(" extendedProperties: ") + .append(toIndentedString(extendedProperties)) + .append("\n"); + sb.append(" extendedPreferences: ") + .append(toIndentedString(extendedPreferences)) + .append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first + * line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("name"); + openapiFields.add("display_name"); + openapiFields.add("visibility"); + openapiFields.add("email"); + openapiFields.add("account_status"); + openapiFields.add("notify_on_share"); + openapiFields.add("show_onboarding_experience"); + openapiFields.add("onboarding_experience_completed"); + openapiFields.add("account_type"); + openapiFields.add("group_identifiers"); + openapiFields.add("home_liveboard_identifier"); + openapiFields.add("favorite_metadata"); + openapiFields.add("org_identifiers"); + openapiFields.add("operation"); + openapiFields.add("preferred_locale"); + openapiFields.add("use_browser_language"); + openapiFields.add("extended_properties"); + openapiFields.add("extended_preferences"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to UpdateUserRequest + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!UpdateUserRequest.openapiRequiredFields + .isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException( + String.format( + "The required field(s) %s in UpdateUserRequest is not found in the" + + " empty JSON string", + UpdateUserRequest.openapiRequiredFields.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if ((jsonObj.get("name") != null && !jsonObj.get("name").isJsonNull()) + && !jsonObj.get("name").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `name` to be a primitive type in the JSON string" + + " but got `%s`", + jsonObj.get("name").toString())); + } + if ((jsonObj.get("display_name") != null && !jsonObj.get("display_name").isJsonNull()) + && !jsonObj.get("display_name").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `display_name` to be a primitive type in the JSON" + + " string but got `%s`", + jsonObj.get("display_name").toString())); + } + if ((jsonObj.get("visibility") != null && !jsonObj.get("visibility").isJsonNull()) + && !jsonObj.get("visibility").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `visibility` to be a primitive type in the JSON" + + " string but got `%s`", + jsonObj.get("visibility").toString())); + } + // validate the optional field `visibility` + if (jsonObj.get("visibility") != null && !jsonObj.get("visibility").isJsonNull()) { + VisibilityEnum.validateJsonElement(jsonObj.get("visibility")); + } + if ((jsonObj.get("email") != null && !jsonObj.get("email").isJsonNull()) + && !jsonObj.get("email").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `email` to be a primitive type in the JSON string" + + " but got `%s`", + jsonObj.get("email").toString())); + } + if ((jsonObj.get("account_status") != null && !jsonObj.get("account_status").isJsonNull()) + && !jsonObj.get("account_status").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `account_status` to be a primitive type in the" + + " JSON string but got `%s`", + jsonObj.get("account_status").toString())); + } + // validate the optional field `account_status` + if (jsonObj.get("account_status") != null && !jsonObj.get("account_status").isJsonNull()) { + AccountStatusEnum.validateJsonElement(jsonObj.get("account_status")); + } + if ((jsonObj.get("account_type") != null && !jsonObj.get("account_type").isJsonNull()) + && !jsonObj.get("account_type").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `account_type` to be a primitive type in the JSON" + + " string but got `%s`", + jsonObj.get("account_type").toString())); + } + // validate the optional field `account_type` + if (jsonObj.get("account_type") != null && !jsonObj.get("account_type").isJsonNull()) { + AccountTypeEnum.validateJsonElement(jsonObj.get("account_type")); + } + // ensure the optional json data is an array if present + if (jsonObj.get("group_identifiers") != null + && !jsonObj.get("group_identifiers").isJsonNull() + && !jsonObj.get("group_identifiers").isJsonArray()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `group_identifiers` to be an array in the JSON" + + " string but got `%s`", + jsonObj.get("group_identifiers").toString())); + } + if ((jsonObj.get("home_liveboard_identifier") != null + && !jsonObj.get("home_liveboard_identifier").isJsonNull()) + && !jsonObj.get("home_liveboard_identifier").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `home_liveboard_identifier` to be a primitive type" + + " in the JSON string but got `%s`", + jsonObj.get("home_liveboard_identifier").toString())); + } + if (jsonObj.get("favorite_metadata") != null + && !jsonObj.get("favorite_metadata").isJsonNull()) { + JsonArray jsonArrayfavoriteMetadata = jsonObj.getAsJsonArray("favorite_metadata"); + if (jsonArrayfavoriteMetadata != null) { + // ensure the json data is an array + if (!jsonObj.get("favorite_metadata").isJsonArray()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `favorite_metadata` to be an array in the" + + " JSON string but got `%s`", + jsonObj.get("favorite_metadata").toString())); + } + + // validate the optional field `favorite_metadata` (array) + for (int i = 0; i < jsonArrayfavoriteMetadata.size(); i++) { + FavoriteMetadataInput.validateJsonElement(jsonArrayfavoriteMetadata.get(i)); + } + ; + } + } + // ensure the optional json data is an array if present + if (jsonObj.get("org_identifiers") != null + && !jsonObj.get("org_identifiers").isJsonNull() + && !jsonObj.get("org_identifiers").isJsonArray()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `org_identifiers` to be an array in the JSON" + + " string but got `%s`", + jsonObj.get("org_identifiers").toString())); + } + if ((jsonObj.get("operation") != null && !jsonObj.get("operation").isJsonNull()) + && !jsonObj.get("operation").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `operation` to be a primitive type in the JSON" + + " string but got `%s`", + jsonObj.get("operation").toString())); + } + // validate the optional field `operation` + if (jsonObj.get("operation") != null && !jsonObj.get("operation").isJsonNull()) { + OperationEnum.validateJsonElement(jsonObj.get("operation")); + } + if ((jsonObj.get("preferred_locale") != null + && !jsonObj.get("preferred_locale").isJsonNull()) + && !jsonObj.get("preferred_locale").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `preferred_locale` to be a primitive type in the" + + " JSON string but got `%s`", + jsonObj.get("preferred_locale").toString())); + } + // validate the optional field `preferred_locale` + if (jsonObj.get("preferred_locale") != null + && !jsonObj.get("preferred_locale").isJsonNull()) { + PreferredLocaleEnum.validateJsonElement(jsonObj.get("preferred_locale")); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!UpdateUserRequest.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'UpdateUserRequest' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter = + gson.getDelegateAdapter(this, TypeToken.get(UpdateUserRequest.class)); + + return (TypeAdapter) + new TypeAdapter() { + @Override + public void write(JsonWriter out, UpdateUserRequest value) + throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + obj.remove("additionalProperties"); + // serialize additional properties + if (value.getAdditionalProperties() != null) { + for (Map.Entry entry : + value.getAdditionalProperties().entrySet()) { + if (entry.getValue() instanceof String) + obj.addProperty(entry.getKey(), (String) entry.getValue()); + else if (entry.getValue() instanceof Number) + obj.addProperty(entry.getKey(), (Number) entry.getValue()); + else if (entry.getValue() instanceof Boolean) + obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); + else if (entry.getValue() instanceof Character) + obj.addProperty( + entry.getKey(), (Character) entry.getValue()); + else { + JsonElement jsonElement = gson.toJsonTree(entry.getValue()); + if (jsonElement.isJsonArray()) { + obj.add(entry.getKey(), jsonElement.getAsJsonArray()); + } else { + obj.add(entry.getKey(), jsonElement.getAsJsonObject()); + } + } + } + } + elementAdapter.write(out, obj); + } + + @Override + public UpdateUserRequest read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // store additional fields in the deserialized instance + UpdateUserRequest instance = thisAdapter.fromJsonTree(jsonObj); + for (Map.Entry entry : jsonObj.entrySet()) { + if (!openapiFields.contains(entry.getKey())) { + if (entry.getValue().isJsonPrimitive()) { // primitive type + if (entry.getValue().getAsJsonPrimitive().isString()) + instance.putAdditionalProperty( + entry.getKey(), entry.getValue().getAsString()); + else if (entry.getValue().getAsJsonPrimitive().isNumber()) + instance.putAdditionalProperty( + entry.getKey(), entry.getValue().getAsNumber()); + else if (entry.getValue().getAsJsonPrimitive().isBoolean()) + instance.putAdditionalProperty( + entry.getKey(), + entry.getValue().getAsBoolean()); + else + throw new IllegalArgumentException( + String.format( + "The field `%s` has unknown primitive" + + " type. Value: %s", + entry.getKey(), + entry.getValue().toString())); + } else if (entry.getValue().isJsonArray()) { + instance.putAdditionalProperty( + entry.getKey(), + gson.fromJson(entry.getValue(), List.class)); + } else { // JSON object + instance.putAdditionalProperty( + entry.getKey(), + gson.fromJson(entry.getValue(), HashMap.class)); + } + } + } + return instance; + } + }.nullSafe(); + } + } + + /** + * Create an instance of UpdateUserRequest given an JSON string + * + * @param jsonString JSON string + * @return An instance of UpdateUserRequest + * @throws IOException if the JSON string is invalid with respect to UpdateUserRequest + */ + public static UpdateUserRequest fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, UpdateUserRequest.class); + } + + /** + * Convert an instance of UpdateUserRequest to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} diff --git a/sdks/java/src/main/java/com/thoughtspot/client/model/UpdateVariableRequest.java b/sdks/java/src/main/java/com/thoughtspot/client/model/UpdateVariableRequest.java new file mode 100644 index 000000000..10e2617c5 --- /dev/null +++ b/sdks/java/src/main/java/com/thoughtspot/client/model/UpdateVariableRequest.java @@ -0,0 +1,302 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client.model; + +import com.google.gson.Gson; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.TypeAdapter; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.annotations.SerializedName; +import com.google.gson.reflect.TypeToken; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import com.thoughtspot.client.JSON; +import java.io.IOException; +import java.io.Serializable; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Objects; + +/** UpdateVariableRequest */ +@javax.annotation.Generated( + value = "org.openapitools.codegen.languages.JavaClientCodegen", + comments = "Generator version: 7.12.0") +public class UpdateVariableRequest implements Serializable { + private static final long serialVersionUID = 1L; + + public static final String SERIALIZED_NAME_NAME = "name"; + + @SerializedName(SERIALIZED_NAME_NAME) + @javax.annotation.Nonnull + private String name; + + public UpdateVariableRequest() {} + + public UpdateVariableRequest name(@javax.annotation.Nonnull String name) { + this.name = name; + return this; + } + + /** + * New name of the variable. + * + * @return name + */ + @javax.annotation.Nonnull + public String getName() { + return name; + } + + public void setName(@javax.annotation.Nonnull String name) { + this.name = name; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key name of the property + * @param value value of the property + * @return the UpdateVariableRequest instance itself + */ + public UpdateVariableRequest putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return a map of objects + */ + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key name of the property + * @return an object + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + UpdateVariableRequest updateVariableRequest = (UpdateVariableRequest) o; + return Objects.equals(this.name, updateVariableRequest.name) + && Objects.equals( + this.additionalProperties, updateVariableRequest.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(name, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class UpdateVariableRequest {\n"); + sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first + * line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("name"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + openapiRequiredFields.add("name"); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to UpdateVariableRequest + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!UpdateVariableRequest.openapiRequiredFields + .isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException( + String.format( + "The required field(s) %s in UpdateVariableRequest is not found in" + + " the empty JSON string", + UpdateVariableRequest.openapiRequiredFields.toString())); + } + } + + // check to make sure all required properties/fields are present in the JSON string + for (String requiredField : UpdateVariableRequest.openapiRequiredFields) { + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException( + String.format( + "The required field `%s` is not found in the JSON string: %s", + requiredField, jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if (!jsonObj.get("name").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `name` to be a primitive type in the JSON string" + + " but got `%s`", + jsonObj.get("name").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!UpdateVariableRequest.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'UpdateVariableRequest' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter = + gson.getDelegateAdapter(this, TypeToken.get(UpdateVariableRequest.class)); + + return (TypeAdapter) + new TypeAdapter() { + @Override + public void write(JsonWriter out, UpdateVariableRequest value) + throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + obj.remove("additionalProperties"); + // serialize additional properties + if (value.getAdditionalProperties() != null) { + for (Map.Entry entry : + value.getAdditionalProperties().entrySet()) { + if (entry.getValue() instanceof String) + obj.addProperty(entry.getKey(), (String) entry.getValue()); + else if (entry.getValue() instanceof Number) + obj.addProperty(entry.getKey(), (Number) entry.getValue()); + else if (entry.getValue() instanceof Boolean) + obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); + else if (entry.getValue() instanceof Character) + obj.addProperty( + entry.getKey(), (Character) entry.getValue()); + else { + JsonElement jsonElement = gson.toJsonTree(entry.getValue()); + if (jsonElement.isJsonArray()) { + obj.add(entry.getKey(), jsonElement.getAsJsonArray()); + } else { + obj.add(entry.getKey(), jsonElement.getAsJsonObject()); + } + } + } + } + elementAdapter.write(out, obj); + } + + @Override + public UpdateVariableRequest read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // store additional fields in the deserialized instance + UpdateVariableRequest instance = thisAdapter.fromJsonTree(jsonObj); + for (Map.Entry entry : jsonObj.entrySet()) { + if (!openapiFields.contains(entry.getKey())) { + if (entry.getValue().isJsonPrimitive()) { // primitive type + if (entry.getValue().getAsJsonPrimitive().isString()) + instance.putAdditionalProperty( + entry.getKey(), entry.getValue().getAsString()); + else if (entry.getValue().getAsJsonPrimitive().isNumber()) + instance.putAdditionalProperty( + entry.getKey(), entry.getValue().getAsNumber()); + else if (entry.getValue().getAsJsonPrimitive().isBoolean()) + instance.putAdditionalProperty( + entry.getKey(), + entry.getValue().getAsBoolean()); + else + throw new IllegalArgumentException( + String.format( + "The field `%s` has unknown primitive" + + " type. Value: %s", + entry.getKey(), + entry.getValue().toString())); + } else if (entry.getValue().isJsonArray()) { + instance.putAdditionalProperty( + entry.getKey(), + gson.fromJson(entry.getValue(), List.class)); + } else { // JSON object + instance.putAdditionalProperty( + entry.getKey(), + gson.fromJson(entry.getValue(), HashMap.class)); + } + } + } + return instance; + } + }.nullSafe(); + } + } + + /** + * Create an instance of UpdateVariableRequest given an JSON string + * + * @param jsonString JSON string + * @return An instance of UpdateVariableRequest + * @throws IOException if the JSON string is invalid with respect to UpdateVariableRequest + */ + public static UpdateVariableRequest fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, UpdateVariableRequest.class); + } + + /** + * Convert an instance of UpdateVariableRequest to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} diff --git a/sdks/java/src/main/java/com/thoughtspot/client/model/UpdateVariableValuesRequest.java b/sdks/java/src/main/java/com/thoughtspot/client/model/UpdateVariableValuesRequest.java new file mode 100644 index 000000000..6590a0917 --- /dev/null +++ b/sdks/java/src/main/java/com/thoughtspot/client/model/UpdateVariableValuesRequest.java @@ -0,0 +1,391 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client.model; + +import com.google.gson.Gson; +import com.google.gson.JsonArray; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.TypeAdapter; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.annotations.SerializedName; +import com.google.gson.reflect.TypeToken; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import com.thoughtspot.client.JSON; +import java.io.IOException; +import java.io.Serializable; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Objects; + +/** UpdateVariableValuesRequest */ +@javax.annotation.Generated( + value = "org.openapitools.codegen.languages.JavaClientCodegen", + comments = "Generator version: 7.12.0") +public class UpdateVariableValuesRequest implements Serializable { + private static final long serialVersionUID = 1L; + + public static final String SERIALIZED_NAME_VARIABLE_ASSIGNMENT = "variable_assignment"; + + @SerializedName(SERIALIZED_NAME_VARIABLE_ASSIGNMENT) + @javax.annotation.Nonnull + private List variableAssignment; + + public static final String SERIALIZED_NAME_VARIABLE_VALUE_SCOPE = "variable_value_scope"; + + @SerializedName(SERIALIZED_NAME_VARIABLE_VALUE_SCOPE) + @javax.annotation.Nonnull + private List variableValueScope; + + public UpdateVariableValuesRequest() {} + + public UpdateVariableValuesRequest variableAssignment( + @javax.annotation.Nonnull List variableAssignment) { + this.variableAssignment = variableAssignment; + return this; + } + + public UpdateVariableValuesRequest addVariableAssignmentItem( + VariableUpdateAssignmentInput variableAssignmentItem) { + if (this.variableAssignment == null) { + this.variableAssignment = new ArrayList<>(); + } + this.variableAssignment.add(variableAssignmentItem); + return this; + } + + /** + * Array of variable assignment objects specifying the variable identifier, values to assign, + * and the operation type (ADD, REMOVE, REPLACE, or RESET) to perform on each variable. + * + * @return variableAssignment + */ + @javax.annotation.Nonnull + public List getVariableAssignment() { + return variableAssignment; + } + + public void setVariableAssignment( + @javax.annotation.Nonnull List variableAssignment) { + this.variableAssignment = variableAssignment; + } + + public UpdateVariableValuesRequest variableValueScope( + @javax.annotation.Nonnull List variableValueScope) { + this.variableValueScope = variableValueScope; + return this; + } + + public UpdateVariableValuesRequest addVariableValueScopeItem( + VariableUpdateScopeInput variableValueScopeItem) { + if (this.variableValueScope == null) { + this.variableValueScope = new ArrayList<>(); + } + this.variableValueScope.add(variableValueScopeItem); + return this; + } + + /** + * Array of scope objects defining where the variable values apply, including organization + * context, optional principal constraints (user or group), model reference for formula + * variables, and priority for conflict resolution. + * + * @return variableValueScope + */ + @javax.annotation.Nonnull + public List getVariableValueScope() { + return variableValueScope; + } + + public void setVariableValueScope( + @javax.annotation.Nonnull List variableValueScope) { + this.variableValueScope = variableValueScope; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key name of the property + * @param value value of the property + * @return the UpdateVariableValuesRequest instance itself + */ + public UpdateVariableValuesRequest putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return a map of objects + */ + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key name of the property + * @return an object + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + UpdateVariableValuesRequest updateVariableValuesRequest = (UpdateVariableValuesRequest) o; + return Objects.equals( + this.variableAssignment, updateVariableValuesRequest.variableAssignment) + && Objects.equals( + this.variableValueScope, updateVariableValuesRequest.variableValueScope) + && Objects.equals( + this.additionalProperties, + updateVariableValuesRequest.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(variableAssignment, variableValueScope, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class UpdateVariableValuesRequest {\n"); + sb.append(" variableAssignment: ") + .append(toIndentedString(variableAssignment)) + .append("\n"); + sb.append(" variableValueScope: ") + .append(toIndentedString(variableValueScope)) + .append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first + * line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("variable_assignment"); + openapiFields.add("variable_value_scope"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + openapiRequiredFields.add("variable_assignment"); + openapiRequiredFields.add("variable_value_scope"); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to + * UpdateVariableValuesRequest + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!UpdateVariableValuesRequest.openapiRequiredFields + .isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException( + String.format( + "The required field(s) %s in UpdateVariableValuesRequest is not" + + " found in the empty JSON string", + UpdateVariableValuesRequest.openapiRequiredFields.toString())); + } + } + + // check to make sure all required properties/fields are present in the JSON string + for (String requiredField : UpdateVariableValuesRequest.openapiRequiredFields) { + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException( + String.format( + "The required field `%s` is not found in the JSON string: %s", + requiredField, jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // ensure the json data is an array + if (!jsonObj.get("variable_assignment").isJsonArray()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `variable_assignment` to be an array in the JSON" + + " string but got `%s`", + jsonObj.get("variable_assignment").toString())); + } + + JsonArray jsonArrayvariableAssignment = jsonObj.getAsJsonArray("variable_assignment"); + // validate the required field `variable_assignment` (array) + for (int i = 0; i < jsonArrayvariableAssignment.size(); i++) { + VariableUpdateAssignmentInput.validateJsonElement(jsonArrayvariableAssignment.get(i)); + } + ; + // ensure the json data is an array + if (!jsonObj.get("variable_value_scope").isJsonArray()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `variable_value_scope` to be an array in the JSON" + + " string but got `%s`", + jsonObj.get("variable_value_scope").toString())); + } + + JsonArray jsonArrayvariableValueScope = jsonObj.getAsJsonArray("variable_value_scope"); + // validate the required field `variable_value_scope` (array) + for (int i = 0; i < jsonArrayvariableValueScope.size(); i++) { + VariableUpdateScopeInput.validateJsonElement(jsonArrayvariableValueScope.get(i)); + } + ; + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!UpdateVariableValuesRequest.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'UpdateVariableValuesRequest' and its + // subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter = + gson.getDelegateAdapter(this, TypeToken.get(UpdateVariableValuesRequest.class)); + + return (TypeAdapter) + new TypeAdapter() { + @Override + public void write(JsonWriter out, UpdateVariableValuesRequest value) + throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + obj.remove("additionalProperties"); + // serialize additional properties + if (value.getAdditionalProperties() != null) { + for (Map.Entry entry : + value.getAdditionalProperties().entrySet()) { + if (entry.getValue() instanceof String) + obj.addProperty(entry.getKey(), (String) entry.getValue()); + else if (entry.getValue() instanceof Number) + obj.addProperty(entry.getKey(), (Number) entry.getValue()); + else if (entry.getValue() instanceof Boolean) + obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); + else if (entry.getValue() instanceof Character) + obj.addProperty( + entry.getKey(), (Character) entry.getValue()); + else { + JsonElement jsonElement = gson.toJsonTree(entry.getValue()); + if (jsonElement.isJsonArray()) { + obj.add(entry.getKey(), jsonElement.getAsJsonArray()); + } else { + obj.add(entry.getKey(), jsonElement.getAsJsonObject()); + } + } + } + } + elementAdapter.write(out, obj); + } + + @Override + public UpdateVariableValuesRequest read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // store additional fields in the deserialized instance + UpdateVariableValuesRequest instance = + thisAdapter.fromJsonTree(jsonObj); + for (Map.Entry entry : jsonObj.entrySet()) { + if (!openapiFields.contains(entry.getKey())) { + if (entry.getValue().isJsonPrimitive()) { // primitive type + if (entry.getValue().getAsJsonPrimitive().isString()) + instance.putAdditionalProperty( + entry.getKey(), entry.getValue().getAsString()); + else if (entry.getValue().getAsJsonPrimitive().isNumber()) + instance.putAdditionalProperty( + entry.getKey(), entry.getValue().getAsNumber()); + else if (entry.getValue().getAsJsonPrimitive().isBoolean()) + instance.putAdditionalProperty( + entry.getKey(), + entry.getValue().getAsBoolean()); + else + throw new IllegalArgumentException( + String.format( + "The field `%s` has unknown primitive" + + " type. Value: %s", + entry.getKey(), + entry.getValue().toString())); + } else if (entry.getValue().isJsonArray()) { + instance.putAdditionalProperty( + entry.getKey(), + gson.fromJson(entry.getValue(), List.class)); + } else { // JSON object + instance.putAdditionalProperty( + entry.getKey(), + gson.fromJson(entry.getValue(), HashMap.class)); + } + } + } + return instance; + } + }.nullSafe(); + } + } + + /** + * Create an instance of UpdateVariableValuesRequest given an JSON string + * + * @param jsonString JSON string + * @return An instance of UpdateVariableValuesRequest + * @throws IOException if the JSON string is invalid with respect to UpdateVariableValuesRequest + */ + public static UpdateVariableValuesRequest fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, UpdateVariableValuesRequest.class); + } + + /** + * Convert an instance of UpdateVariableValuesRequest to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} diff --git a/sdks/java/src/main/java/com/thoughtspot/client/model/UpdateWebhookConfigurationRequest.java b/sdks/java/src/main/java/com/thoughtspot/client/model/UpdateWebhookConfigurationRequest.java new file mode 100644 index 000000000..3d73ee9e1 --- /dev/null +++ b/sdks/java/src/main/java/com/thoughtspot/client/model/UpdateWebhookConfigurationRequest.java @@ -0,0 +1,696 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client.model; + +import com.google.gson.Gson; +import com.google.gson.JsonArray; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.TypeAdapter; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.reflect.TypeToken; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import com.thoughtspot.client.JSON; +import java.io.IOException; +import java.io.Serializable; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Objects; + +/** UpdateWebhookConfigurationRequest */ +@javax.annotation.Generated( + value = "org.openapitools.codegen.languages.JavaClientCodegen", + comments = "Generator version: 7.12.0") +public class UpdateWebhookConfigurationRequest implements Serializable { + private static final long serialVersionUID = 1L; + + public static final String SERIALIZED_NAME_NAME = "name"; + + @SerializedName(SERIALIZED_NAME_NAME) + @javax.annotation.Nullable + private String name; + + public static final String SERIALIZED_NAME_DESCRIPTION = "description"; + + @SerializedName(SERIALIZED_NAME_DESCRIPTION) + @javax.annotation.Nullable + private String description; + + public static final String SERIALIZED_NAME_URL = "url"; + + @SerializedName(SERIALIZED_NAME_URL) + @javax.annotation.Nullable + private String url; + + public static final String SERIALIZED_NAME_URL_PARAMS = "url_params"; + + @SerializedName(SERIALIZED_NAME_URL_PARAMS) + @javax.annotation.Nullable + private Object urlParams; + + /** Gets or Sets events */ + @JsonAdapter(EventsEnum.Adapter.class) + public enum EventsEnum { + LIVEBOARD_SCHEDULE("LIVEBOARD_SCHEDULE"); + + private String value; + + EventsEnum(String value) { + this.value = value; + } + + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + public static EventsEnum fromValue(String value) { + for (EventsEnum b : EventsEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + + public static class Adapter extends TypeAdapter { + @Override + public void write(final JsonWriter jsonWriter, final EventsEnum enumeration) + throws IOException { + jsonWriter.value(enumeration.getValue()); + } + + @Override + public EventsEnum read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + return EventsEnum.fromValue(value); + } + } + + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + String value = jsonElement.getAsString(); + EventsEnum.fromValue(value); + } + } + + public static final String SERIALIZED_NAME_EVENTS = "events"; + + @SerializedName(SERIALIZED_NAME_EVENTS) + @javax.annotation.Nullable + private List events; + + public static final String SERIALIZED_NAME_AUTHENTICATION = "authentication"; + + @SerializedName(SERIALIZED_NAME_AUTHENTICATION) + @javax.annotation.Nullable + private WebhookAuthenticationInput authentication; + + public static final String SERIALIZED_NAME_SIGNATURE_VERIFICATION = "signature_verification"; + + @SerializedName(SERIALIZED_NAME_SIGNATURE_VERIFICATION) + @javax.annotation.Nullable + private WebhookSignatureVerificationInput signatureVerification; + + public static final String SERIALIZED_NAME_STORAGE_DESTINATION = "storage_destination"; + + @SerializedName(SERIALIZED_NAME_STORAGE_DESTINATION) + @javax.annotation.Nullable + private StorageDestinationInput storageDestination; + + public static final String SERIALIZED_NAME_ADDITIONAL_HEADERS = "additional_headers"; + + @SerializedName(SERIALIZED_NAME_ADDITIONAL_HEADERS) + @javax.annotation.Nullable + private List additionalHeaders; + + public UpdateWebhookConfigurationRequest() {} + + public UpdateWebhookConfigurationRequest name(@javax.annotation.Nullable String name) { + this.name = name; + return this; + } + + /** + * Name of the webhook configuration. + * + * @return name + */ + @javax.annotation.Nullable + public String getName() { + return name; + } + + public void setName(@javax.annotation.Nullable String name) { + this.name = name; + } + + public UpdateWebhookConfigurationRequest description( + @javax.annotation.Nullable String description) { + this.description = description; + return this; + } + + /** + * Description of the webhook configuration. + * + * @return description + */ + @javax.annotation.Nullable + public String getDescription() { + return description; + } + + public void setDescription(@javax.annotation.Nullable String description) { + this.description = description; + } + + public UpdateWebhookConfigurationRequest url(@javax.annotation.Nullable String url) { + this.url = url; + return this; + } + + /** + * The webhook endpoint URL. + * + * @return url + */ + @javax.annotation.Nullable + public String getUrl() { + return url; + } + + public void setUrl(@javax.annotation.Nullable String url) { + this.url = url; + } + + public UpdateWebhookConfigurationRequest urlParams( + @javax.annotation.Nullable Object urlParams) { + this.urlParams = urlParams; + return this; + } + + /** + * Additional URL parameters as key-value pairs. + * + * @return urlParams + */ + @javax.annotation.Nullable + public Object getUrlParams() { + return urlParams; + } + + public void setUrlParams(@javax.annotation.Nullable Object urlParams) { + this.urlParams = urlParams; + } + + public UpdateWebhookConfigurationRequest events( + @javax.annotation.Nullable List events) { + this.events = events; + return this; + } + + public UpdateWebhookConfigurationRequest addEventsItem(EventsEnum eventsItem) { + if (this.events == null) { + this.events = new ArrayList<>(); + } + this.events.add(eventsItem); + return this; + } + + /** + * List of events to subscribe to. + * + * @return events + */ + @javax.annotation.Nullable + public List getEvents() { + return events; + } + + public void setEvents(@javax.annotation.Nullable List events) { + this.events = events; + } + + public UpdateWebhookConfigurationRequest authentication( + @javax.annotation.Nullable WebhookAuthenticationInput authentication) { + this.authentication = authentication; + return this; + } + + /** + * Authorization configuration for the webhook. + * + * @return authentication + */ + @javax.annotation.Nullable + public WebhookAuthenticationInput getAuthentication() { + return authentication; + } + + public void setAuthentication( + @javax.annotation.Nullable WebhookAuthenticationInput authentication) { + this.authentication = authentication; + } + + public UpdateWebhookConfigurationRequest signatureVerification( + @javax.annotation.Nullable WebhookSignatureVerificationInput signatureVerification) { + this.signatureVerification = signatureVerification; + return this; + } + + /** + * Configuration for webhook signature verification. + * + * @return signatureVerification + */ + @javax.annotation.Nullable + public WebhookSignatureVerificationInput getSignatureVerification() { + return signatureVerification; + } + + public void setSignatureVerification( + @javax.annotation.Nullable WebhookSignatureVerificationInput signatureVerification) { + this.signatureVerification = signatureVerification; + } + + public UpdateWebhookConfigurationRequest storageDestination( + @javax.annotation.Nullable StorageDestinationInput storageDestination) { + this.storageDestination = storageDestination; + return this; + } + + /** + * Configuration for storage destination. Example: {\"storage_type\": + * \"AWS_S3\", \"storage_config\": {\"aws_s3_config\": + * {\"bucket_name\": \"my-webhook-files\", \"region\": + * \"us-west-2\", \"role_arn\": + * \"arn:aws:iam::123456789012:role/ThoughtSpotDeliveryRole\", + * \"external_id\": \"ts-webhook-a1b2c3d4-7890\", \"path_prefix\": + * \"thoughtspot-webhooks/\"}}} Version: 26.3.0.cl or later + * + * @return storageDestination + */ + @javax.annotation.Nullable + public StorageDestinationInput getStorageDestination() { + return storageDestination; + } + + public void setStorageDestination( + @javax.annotation.Nullable StorageDestinationInput storageDestination) { + this.storageDestination = storageDestination; + } + + public UpdateWebhookConfigurationRequest additionalHeaders( + @javax.annotation.Nullable List additionalHeaders) { + this.additionalHeaders = additionalHeaders; + return this; + } + + public UpdateWebhookConfigurationRequest addAdditionalHeadersItem( + WebhookKeyValuePairInput additionalHeadersItem) { + if (this.additionalHeaders == null) { + this.additionalHeaders = new ArrayList<>(); + } + this.additionalHeaders.add(additionalHeadersItem); + return this; + } + + /** + * Additional headers as an array of key-value pairs. Example: [{\"key\": + * \"X-Custom-Header\", \"value\": \"custom_value\"}] Version: + * 26.4.0.cl or later + * + * @return additionalHeaders + */ + @javax.annotation.Nullable + public List getAdditionalHeaders() { + return additionalHeaders; + } + + public void setAdditionalHeaders( + @javax.annotation.Nullable List additionalHeaders) { + this.additionalHeaders = additionalHeaders; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key name of the property + * @param value value of the property + * @return the UpdateWebhookConfigurationRequest instance itself + */ + public UpdateWebhookConfigurationRequest putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return a map of objects + */ + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key name of the property + * @return an object + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + UpdateWebhookConfigurationRequest updateWebhookConfigurationRequest = + (UpdateWebhookConfigurationRequest) o; + return Objects.equals(this.name, updateWebhookConfigurationRequest.name) + && Objects.equals(this.description, updateWebhookConfigurationRequest.description) + && Objects.equals(this.url, updateWebhookConfigurationRequest.url) + && Objects.equals(this.urlParams, updateWebhookConfigurationRequest.urlParams) + && Objects.equals(this.events, updateWebhookConfigurationRequest.events) + && Objects.equals( + this.authentication, updateWebhookConfigurationRequest.authentication) + && Objects.equals( + this.signatureVerification, + updateWebhookConfigurationRequest.signatureVerification) + && Objects.equals( + this.storageDestination, + updateWebhookConfigurationRequest.storageDestination) + && Objects.equals( + this.additionalHeaders, updateWebhookConfigurationRequest.additionalHeaders) + && Objects.equals( + this.additionalProperties, + updateWebhookConfigurationRequest.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash( + name, + description, + url, + urlParams, + events, + authentication, + signatureVerification, + storageDestination, + additionalHeaders, + additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class UpdateWebhookConfigurationRequest {\n"); + sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append(" description: ").append(toIndentedString(description)).append("\n"); + sb.append(" url: ").append(toIndentedString(url)).append("\n"); + sb.append(" urlParams: ").append(toIndentedString(urlParams)).append("\n"); + sb.append(" events: ").append(toIndentedString(events)).append("\n"); + sb.append(" authentication: ").append(toIndentedString(authentication)).append("\n"); + sb.append(" signatureVerification: ") + .append(toIndentedString(signatureVerification)) + .append("\n"); + sb.append(" storageDestination: ") + .append(toIndentedString(storageDestination)) + .append("\n"); + sb.append(" additionalHeaders: ") + .append(toIndentedString(additionalHeaders)) + .append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first + * line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("name"); + openapiFields.add("description"); + openapiFields.add("url"); + openapiFields.add("url_params"); + openapiFields.add("events"); + openapiFields.add("authentication"); + openapiFields.add("signature_verification"); + openapiFields.add("storage_destination"); + openapiFields.add("additional_headers"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to + * UpdateWebhookConfigurationRequest + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!UpdateWebhookConfigurationRequest.openapiRequiredFields + .isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException( + String.format( + "The required field(s) %s in UpdateWebhookConfigurationRequest is" + + " not found in the empty JSON string", + UpdateWebhookConfigurationRequest.openapiRequiredFields + .toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if ((jsonObj.get("name") != null && !jsonObj.get("name").isJsonNull()) + && !jsonObj.get("name").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `name` to be a primitive type in the JSON string" + + " but got `%s`", + jsonObj.get("name").toString())); + } + if ((jsonObj.get("description") != null && !jsonObj.get("description").isJsonNull()) + && !jsonObj.get("description").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `description` to be a primitive type in the JSON" + + " string but got `%s`", + jsonObj.get("description").toString())); + } + if ((jsonObj.get("url") != null && !jsonObj.get("url").isJsonNull()) + && !jsonObj.get("url").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `url` to be a primitive type in the JSON string" + + " but got `%s`", + jsonObj.get("url").toString())); + } + // ensure the optional json data is an array if present + if (jsonObj.get("events") != null + && !jsonObj.get("events").isJsonNull() + && !jsonObj.get("events").isJsonArray()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `events` to be an array in the JSON string but got" + + " `%s`", + jsonObj.get("events").toString())); + } + // validate the optional field `authentication` + if (jsonObj.get("authentication") != null && !jsonObj.get("authentication").isJsonNull()) { + WebhookAuthenticationInput.validateJsonElement(jsonObj.get("authentication")); + } + // validate the optional field `signature_verification` + if (jsonObj.get("signature_verification") != null + && !jsonObj.get("signature_verification").isJsonNull()) { + WebhookSignatureVerificationInput.validateJsonElement( + jsonObj.get("signature_verification")); + } + // validate the optional field `storage_destination` + if (jsonObj.get("storage_destination") != null + && !jsonObj.get("storage_destination").isJsonNull()) { + StorageDestinationInput.validateJsonElement(jsonObj.get("storage_destination")); + } + if (jsonObj.get("additional_headers") != null + && !jsonObj.get("additional_headers").isJsonNull()) { + JsonArray jsonArrayadditionalHeaders = jsonObj.getAsJsonArray("additional_headers"); + if (jsonArrayadditionalHeaders != null) { + // ensure the json data is an array + if (!jsonObj.get("additional_headers").isJsonArray()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `additional_headers` to be an array in the" + + " JSON string but got `%s`", + jsonObj.get("additional_headers").toString())); + } + + // validate the optional field `additional_headers` (array) + for (int i = 0; i < jsonArrayadditionalHeaders.size(); i++) { + WebhookKeyValuePairInput.validateJsonElement(jsonArrayadditionalHeaders.get(i)); + } + ; + } + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!UpdateWebhookConfigurationRequest.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'UpdateWebhookConfigurationRequest' and + // its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter = + gson.getDelegateAdapter( + this, TypeToken.get(UpdateWebhookConfigurationRequest.class)); + + return (TypeAdapter) + new TypeAdapter() { + @Override + public void write(JsonWriter out, UpdateWebhookConfigurationRequest value) + throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + obj.remove("additionalProperties"); + // serialize additional properties + if (value.getAdditionalProperties() != null) { + for (Map.Entry entry : + value.getAdditionalProperties().entrySet()) { + if (entry.getValue() instanceof String) + obj.addProperty(entry.getKey(), (String) entry.getValue()); + else if (entry.getValue() instanceof Number) + obj.addProperty(entry.getKey(), (Number) entry.getValue()); + else if (entry.getValue() instanceof Boolean) + obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); + else if (entry.getValue() instanceof Character) + obj.addProperty( + entry.getKey(), (Character) entry.getValue()); + else { + JsonElement jsonElement = gson.toJsonTree(entry.getValue()); + if (jsonElement.isJsonArray()) { + obj.add(entry.getKey(), jsonElement.getAsJsonArray()); + } else { + obj.add(entry.getKey(), jsonElement.getAsJsonObject()); + } + } + } + } + elementAdapter.write(out, obj); + } + + @Override + public UpdateWebhookConfigurationRequest read(JsonReader in) + throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // store additional fields in the deserialized instance + UpdateWebhookConfigurationRequest instance = + thisAdapter.fromJsonTree(jsonObj); + for (Map.Entry entry : jsonObj.entrySet()) { + if (!openapiFields.contains(entry.getKey())) { + if (entry.getValue().isJsonPrimitive()) { // primitive type + if (entry.getValue().getAsJsonPrimitive().isString()) + instance.putAdditionalProperty( + entry.getKey(), entry.getValue().getAsString()); + else if (entry.getValue().getAsJsonPrimitive().isNumber()) + instance.putAdditionalProperty( + entry.getKey(), entry.getValue().getAsNumber()); + else if (entry.getValue().getAsJsonPrimitive().isBoolean()) + instance.putAdditionalProperty( + entry.getKey(), + entry.getValue().getAsBoolean()); + else + throw new IllegalArgumentException( + String.format( + "The field `%s` has unknown primitive" + + " type. Value: %s", + entry.getKey(), + entry.getValue().toString())); + } else if (entry.getValue().isJsonArray()) { + instance.putAdditionalProperty( + entry.getKey(), + gson.fromJson(entry.getValue(), List.class)); + } else { // JSON object + instance.putAdditionalProperty( + entry.getKey(), + gson.fromJson(entry.getValue(), HashMap.class)); + } + } + } + return instance; + } + }.nullSafe(); + } + } + + /** + * Create an instance of UpdateWebhookConfigurationRequest given an JSON string + * + * @param jsonString JSON string + * @return An instance of UpdateWebhookConfigurationRequest + * @throws IOException if the JSON string is invalid with respect to + * UpdateWebhookConfigurationRequest + */ + public static UpdateWebhookConfigurationRequest fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, UpdateWebhookConfigurationRequest.class); + } + + /** + * Convert an instance of UpdateWebhookConfigurationRequest to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} diff --git a/sdks/java/src/main/java/com/thoughtspot/client/model/User.java b/sdks/java/src/main/java/com/thoughtspot/client/model/User.java new file mode 100644 index 000000000..9235e66ca --- /dev/null +++ b/sdks/java/src/main/java/com/thoughtspot/client/model/User.java @@ -0,0 +1,2200 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client.model; + +import com.google.gson.Gson; +import com.google.gson.JsonArray; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.TypeAdapter; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.reflect.TypeToken; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import com.thoughtspot.client.JSON; +import java.io.IOException; +import java.io.Serializable; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Objects; +import org.openapitools.jackson.nullable.JsonNullable; + +/** User */ +@javax.annotation.Generated( + value = "org.openapitools.codegen.languages.JavaClientCodegen", + comments = "Generator version: 7.12.0") +public class User implements Serializable { + private static final long serialVersionUID = 1L; + + public static final String SERIALIZED_NAME_ID = "id"; + + @SerializedName(SERIALIZED_NAME_ID) + @javax.annotation.Nonnull + private String id; + + public static final String SERIALIZED_NAME_NAME = "name"; + + @SerializedName(SERIALIZED_NAME_NAME) + @javax.annotation.Nonnull + private String name; + + public static final String SERIALIZED_NAME_DISPLAY_NAME = "display_name"; + + @SerializedName(SERIALIZED_NAME_DISPLAY_NAME) + @javax.annotation.Nonnull + private String displayName; + + /** + * Visibility of the users. The `SHARABLE` property makes a user visible to other + * users and group, who can share objects with the user. + */ + @JsonAdapter(VisibilityEnum.Adapter.class) + public enum VisibilityEnum { + SHARABLE("SHARABLE"), + + NON_SHARABLE("NON_SHARABLE"); + + private String value; + + VisibilityEnum(String value) { + this.value = value; + } + + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + public static VisibilityEnum fromValue(String value) { + for (VisibilityEnum b : VisibilityEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + + public static class Adapter extends TypeAdapter { + @Override + public void write(final JsonWriter jsonWriter, final VisibilityEnum enumeration) + throws IOException { + jsonWriter.value(enumeration.getValue()); + } + + @Override + public VisibilityEnum read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + return VisibilityEnum.fromValue(value); + } + } + + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + String value = jsonElement.getAsString(); + VisibilityEnum.fromValue(value); + } + } + + public static final String SERIALIZED_NAME_VISIBILITY = "visibility"; + + @SerializedName(SERIALIZED_NAME_VISIBILITY) + @javax.annotation.Nonnull + private VisibilityEnum visibility; + + public static final String SERIALIZED_NAME_AUTHOR_ID = "author_id"; + + @SerializedName(SERIALIZED_NAME_AUTHOR_ID) + @javax.annotation.Nullable + private String authorId; + + public static final String SERIALIZED_NAME_CAN_CHANGE_PASSWORD = "can_change_password"; + + @SerializedName(SERIALIZED_NAME_CAN_CHANGE_PASSWORD) + @javax.annotation.Nullable + private Boolean canChangePassword; + + public static final String SERIALIZED_NAME_COMPLETE_DETAIL = "complete_detail"; + + @SerializedName(SERIALIZED_NAME_COMPLETE_DETAIL) + @javax.annotation.Nullable + private Boolean completeDetail; + + public static final String SERIALIZED_NAME_CREATION_TIME_IN_MILLIS = "creation_time_in_millis"; + + @SerializedName(SERIALIZED_NAME_CREATION_TIME_IN_MILLIS) + @javax.annotation.Nullable + private Float creationTimeInMillis; + + public static final String SERIALIZED_NAME_CURRENT_ORG = "current_org"; + + @SerializedName(SERIALIZED_NAME_CURRENT_ORG) + @javax.annotation.Nullable + private Org currentOrg; + + public static final String SERIALIZED_NAME_DELETED = "deleted"; + + @SerializedName(SERIALIZED_NAME_DELETED) + @javax.annotation.Nullable + private Boolean deleted; + + public static final String SERIALIZED_NAME_DEPRECATED = "deprecated"; + + @SerializedName(SERIALIZED_NAME_DEPRECATED) + @javax.annotation.Nullable + private Boolean deprecated; + + /** Type of the user account. */ + @JsonAdapter(AccountTypeEnum.Adapter.class) + public enum AccountTypeEnum { + LOCAL_USER("LOCAL_USER"), + + LDAP_USER("LDAP_USER"), + + SAML_USER("SAML_USER"), + + OIDC_USER("OIDC_USER"), + + REMOTE_USER("REMOTE_USER"); + + private String value; + + AccountTypeEnum(String value) { + this.value = value; + } + + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + public static AccountTypeEnum fromValue(String value) { + for (AccountTypeEnum b : AccountTypeEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + return null; + } + + public static class Adapter extends TypeAdapter { + @Override + public void write(final JsonWriter jsonWriter, final AccountTypeEnum enumeration) + throws IOException { + jsonWriter.value(enumeration.getValue()); + } + + @Override + public AccountTypeEnum read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + return AccountTypeEnum.fromValue(value); + } + } + + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + String value = jsonElement.getAsString(); + AccountTypeEnum.fromValue(value); + } + } + + public static final String SERIALIZED_NAME_ACCOUNT_TYPE = "account_type"; + + @SerializedName(SERIALIZED_NAME_ACCOUNT_TYPE) + @javax.annotation.Nullable + private AccountTypeEnum accountType; + + /** Status of the user account. */ + @JsonAdapter(AccountStatusEnum.Adapter.class) + public enum AccountStatusEnum { + ACTIVE("ACTIVE"), + + INACTIVE("INACTIVE"), + + EXPIRED("EXPIRED"), + + LOCKED("LOCKED"), + + PENDING("PENDING"), + + SUSPENDED("SUSPENDED"); + + private String value; + + AccountStatusEnum(String value) { + this.value = value; + } + + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + public static AccountStatusEnum fromValue(String value) { + for (AccountStatusEnum b : AccountStatusEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + return null; + } + + public static class Adapter extends TypeAdapter { + @Override + public void write(final JsonWriter jsonWriter, final AccountStatusEnum enumeration) + throws IOException { + jsonWriter.value(enumeration.getValue()); + } + + @Override + public AccountStatusEnum read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + return AccountStatusEnum.fromValue(value); + } + } + + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + String value = jsonElement.getAsString(); + AccountStatusEnum.fromValue(value); + } + } + + public static final String SERIALIZED_NAME_ACCOUNT_STATUS = "account_status"; + + @SerializedName(SERIALIZED_NAME_ACCOUNT_STATUS) + @javax.annotation.Nullable + private AccountStatusEnum accountStatus; + + public static final String SERIALIZED_NAME_EMAIL = "email"; + + @SerializedName(SERIALIZED_NAME_EMAIL) + @javax.annotation.Nullable + private String email; + + public static final String SERIALIZED_NAME_EXPIRATION_TIME_IN_MILLIS = + "expiration_time_in_millis"; + + @SerializedName(SERIALIZED_NAME_EXPIRATION_TIME_IN_MILLIS) + @javax.annotation.Nullable + private Float expirationTimeInMillis; + + public static final String SERIALIZED_NAME_EXTERNAL = "external"; + + @SerializedName(SERIALIZED_NAME_EXTERNAL) + @javax.annotation.Nullable + private Boolean external; + + public static final String SERIALIZED_NAME_FAVORITE_METADATA = "favorite_metadata"; + + @SerializedName(SERIALIZED_NAME_FAVORITE_METADATA) + @javax.annotation.Nullable + private List favoriteMetadata; + + public static final String SERIALIZED_NAME_FIRST_LOGIN_TIME_IN_MILLIS = + "first_login_time_in_millis"; + + @SerializedName(SERIALIZED_NAME_FIRST_LOGIN_TIME_IN_MILLIS) + @javax.annotation.Nullable + private Float firstLoginTimeInMillis; + + public static final String SERIALIZED_NAME_GROUP_MASK = "group_mask"; + + @SerializedName(SERIALIZED_NAME_GROUP_MASK) + @javax.annotation.Nullable + private Integer groupMask; + + public static final String SERIALIZED_NAME_HIDDEN = "hidden"; + + @SerializedName(SERIALIZED_NAME_HIDDEN) + @javax.annotation.Nullable + private Boolean hidden; + + public static final String SERIALIZED_NAME_HOME_LIVEBOARD = "home_liveboard"; + + @SerializedName(SERIALIZED_NAME_HOME_LIVEBOARD) + @javax.annotation.Nullable + private ObjectIDAndName homeLiveboard; + + public static final String SERIALIZED_NAME_INCOMPLETE_DETAILS = "incomplete_details"; + + @SerializedName(SERIALIZED_NAME_INCOMPLETE_DETAILS) + @javax.annotation.Nullable + private Object incompleteDetails; + + public static final String SERIALIZED_NAME_IS_FIRST_LOGIN = "is_first_login"; + + @SerializedName(SERIALIZED_NAME_IS_FIRST_LOGIN) + @javax.annotation.Nullable + private Boolean isFirstLogin; + + public static final String SERIALIZED_NAME_MODIFICATION_TIME_IN_MILLIS = + "modification_time_in_millis"; + + @SerializedName(SERIALIZED_NAME_MODIFICATION_TIME_IN_MILLIS) + @javax.annotation.Nullable + private Float modificationTimeInMillis; + + public static final String SERIALIZED_NAME_MODIFIER_ID = "modifier_id"; + + @SerializedName(SERIALIZED_NAME_MODIFIER_ID) + @javax.annotation.Nullable + private String modifierId; + + public static final String SERIALIZED_NAME_NOTIFY_ON_SHARE = "notify_on_share"; + + @SerializedName(SERIALIZED_NAME_NOTIFY_ON_SHARE) + @javax.annotation.Nullable + private Boolean notifyOnShare; + + public static final String SERIALIZED_NAME_ONBOARDING_EXPERIENCE_COMPLETED = + "onboarding_experience_completed"; + + @SerializedName(SERIALIZED_NAME_ONBOARDING_EXPERIENCE_COMPLETED) + @javax.annotation.Nullable + private Boolean onboardingExperienceCompleted; + + public static final String SERIALIZED_NAME_ORGS = "orgs"; + + @SerializedName(SERIALIZED_NAME_ORGS) + @javax.annotation.Nullable + private List orgs; + + public static final String SERIALIZED_NAME_OWNER_ID = "owner_id"; + + @SerializedName(SERIALIZED_NAME_OWNER_ID) + @javax.annotation.Nullable + private String ownerId; + + /** Parent type of the user. */ + @JsonAdapter(ParentTypeEnum.Adapter.class) + public enum ParentTypeEnum { + USER("USER"), + + GROUP("GROUP"); + + private String value; + + ParentTypeEnum(String value) { + this.value = value; + } + + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + public static ParentTypeEnum fromValue(String value) { + for (ParentTypeEnum b : ParentTypeEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + return null; + } + + public static class Adapter extends TypeAdapter { + @Override + public void write(final JsonWriter jsonWriter, final ParentTypeEnum enumeration) + throws IOException { + jsonWriter.value(enumeration.getValue()); + } + + @Override + public ParentTypeEnum read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + return ParentTypeEnum.fromValue(value); + } + } + + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + String value = jsonElement.getAsString(); + ParentTypeEnum.fromValue(value); + } + } + + public static final String SERIALIZED_NAME_PARENT_TYPE = "parent_type"; + + @SerializedName(SERIALIZED_NAME_PARENT_TYPE) + @javax.annotation.Nullable + private ParentTypeEnum parentType; + + public static final String SERIALIZED_NAME_PRIVILEGES = "privileges"; + + @SerializedName(SERIALIZED_NAME_PRIVILEGES) + @javax.annotation.Nullable + private List privileges; + + public static final String SERIALIZED_NAME_SHOW_ONBOARDING_EXPERIENCE = + "show_onboarding_experience"; + + @SerializedName(SERIALIZED_NAME_SHOW_ONBOARDING_EXPERIENCE) + @javax.annotation.Nullable + private Boolean showOnboardingExperience; + + public static final String SERIALIZED_NAME_SUPER_USER = "super_user"; + + @SerializedName(SERIALIZED_NAME_SUPER_USER) + @javax.annotation.Nullable + private Boolean superUser; + + public static final String SERIALIZED_NAME_SYSTEM_USER = "system_user"; + + @SerializedName(SERIALIZED_NAME_SYSTEM_USER) + @javax.annotation.Nullable + private Boolean systemUser; + + public static final String SERIALIZED_NAME_TAGS = "tags"; + + @SerializedName(SERIALIZED_NAME_TAGS) + @javax.annotation.Nullable + private List tags; + + public static final String SERIALIZED_NAME_TENANT_ID = "tenant_id"; + + @SerializedName(SERIALIZED_NAME_TENANT_ID) + @javax.annotation.Nullable + private String tenantId; + + public static final String SERIALIZED_NAME_USER_GROUPS = "user_groups"; + + @SerializedName(SERIALIZED_NAME_USER_GROUPS) + @javax.annotation.Nullable + private List userGroups; + + public static final String SERIALIZED_NAME_USER_INHERITED_GROUPS = "user_inherited_groups"; + + @SerializedName(SERIALIZED_NAME_USER_INHERITED_GROUPS) + @javax.annotation.Nullable + private List userInheritedGroups; + + public static final String SERIALIZED_NAME_WELCOME_EMAIL_SENT = "welcome_email_sent"; + + @SerializedName(SERIALIZED_NAME_WELCOME_EMAIL_SENT) + @javax.annotation.Nullable + private Boolean welcomeEmailSent; + + public static final String SERIALIZED_NAME_ORG_PRIVILEGES = "org_privileges"; + + @SerializedName(SERIALIZED_NAME_ORG_PRIVILEGES) + @javax.annotation.Nullable + private Object orgPrivileges; + + public static final String SERIALIZED_NAME_PREFERRED_LOCALE = "preferred_locale"; + + @SerializedName(SERIALIZED_NAME_PREFERRED_LOCALE) + @javax.annotation.Nullable + private String preferredLocale; + + public static final String SERIALIZED_NAME_USE_BROWSER_LANGUAGE = "use_browser_language"; + + @SerializedName(SERIALIZED_NAME_USE_BROWSER_LANGUAGE) + @javax.annotation.Nullable + private Boolean useBrowserLanguage; + + public static final String SERIALIZED_NAME_EXTENDED_PROPERTIES = "extended_properties"; + + @SerializedName(SERIALIZED_NAME_EXTENDED_PROPERTIES) + @javax.annotation.Nullable + private Object extendedProperties; + + public static final String SERIALIZED_NAME_EXTENDED_PREFERENCES = "extended_preferences"; + + @SerializedName(SERIALIZED_NAME_EXTENDED_PREFERENCES) + @javax.annotation.Nullable + private Object extendedPreferences; + + public static final String SERIALIZED_NAME_USER_PARAMETERS = "user_parameters"; + + @SerializedName(SERIALIZED_NAME_USER_PARAMETERS) + @javax.annotation.Nullable + private Object userParameters; + + public static final String SERIALIZED_NAME_ACCESS_CONTROL_PROPERTIES = + "access_control_properties"; + + @SerializedName(SERIALIZED_NAME_ACCESS_CONTROL_PROPERTIES) + @javax.annotation.Nullable + private Object accessControlProperties; + + public static final String SERIALIZED_NAME_VARIABLE_VALUES = "variable_values"; + + @SerializedName(SERIALIZED_NAME_VARIABLE_VALUES) + @javax.annotation.Nullable + private Object variableValues; + + public User() {} + + public User id(@javax.annotation.Nonnull String id) { + this.id = id; + return this; + } + + /** + * Unique identifier of the user. + * + * @return id + */ + @javax.annotation.Nonnull + public String getId() { + return id; + } + + public void setId(@javax.annotation.Nonnull String id) { + this.id = id; + } + + public User name(@javax.annotation.Nonnull String name) { + this.name = name; + return this; + } + + /** + * Name of the user. + * + * @return name + */ + @javax.annotation.Nonnull + public String getName() { + return name; + } + + public void setName(@javax.annotation.Nonnull String name) { + this.name = name; + } + + public User displayName(@javax.annotation.Nonnull String displayName) { + this.displayName = displayName; + return this; + } + + /** + * Display name of the user. + * + * @return displayName + */ + @javax.annotation.Nonnull + public String getDisplayName() { + return displayName; + } + + public void setDisplayName(@javax.annotation.Nonnull String displayName) { + this.displayName = displayName; + } + + public User visibility(@javax.annotation.Nonnull VisibilityEnum visibility) { + this.visibility = visibility; + return this; + } + + /** + * Visibility of the users. The `SHARABLE` property makes a user visible to other + * users and group, who can share objects with the user. + * + * @return visibility + */ + @javax.annotation.Nonnull + public VisibilityEnum getVisibility() { + return visibility; + } + + public void setVisibility(@javax.annotation.Nonnull VisibilityEnum visibility) { + this.visibility = visibility; + } + + public User authorId(@javax.annotation.Nullable String authorId) { + this.authorId = authorId; + return this; + } + + /** + * Unique identifier of author of the user. + * + * @return authorId + */ + @javax.annotation.Nullable + public String getAuthorId() { + return authorId; + } + + public void setAuthorId(@javax.annotation.Nullable String authorId) { + this.authorId = authorId; + } + + public User canChangePassword(@javax.annotation.Nullable Boolean canChangePassword) { + this.canChangePassword = canChangePassword; + return this; + } + + /** + * Defines whether the user can change their password. + * + * @return canChangePassword + */ + @javax.annotation.Nullable + public Boolean getCanChangePassword() { + return canChangePassword; + } + + public void setCanChangePassword(@javax.annotation.Nullable Boolean canChangePassword) { + this.canChangePassword = canChangePassword; + } + + public User completeDetail(@javax.annotation.Nullable Boolean completeDetail) { + this.completeDetail = completeDetail; + return this; + } + + /** + * Defines whether the response has complete detail of the user. + * + * @return completeDetail + */ + @javax.annotation.Nullable + public Boolean getCompleteDetail() { + return completeDetail; + } + + public void setCompleteDetail(@javax.annotation.Nullable Boolean completeDetail) { + this.completeDetail = completeDetail; + } + + public User creationTimeInMillis(@javax.annotation.Nullable Float creationTimeInMillis) { + this.creationTimeInMillis = creationTimeInMillis; + return this; + } + + /** + * Creation time of the user in milliseconds. + * + * @return creationTimeInMillis + */ + @javax.annotation.Nullable + public Float getCreationTimeInMillis() { + return creationTimeInMillis; + } + + public void setCreationTimeInMillis(@javax.annotation.Nullable Float creationTimeInMillis) { + this.creationTimeInMillis = creationTimeInMillis; + } + + public User currentOrg(@javax.annotation.Nullable Org currentOrg) { + this.currentOrg = currentOrg; + return this; + } + + /** + * Get currentOrg + * + * @return currentOrg + */ + @javax.annotation.Nullable + public Org getCurrentOrg() { + return currentOrg; + } + + public void setCurrentOrg(@javax.annotation.Nullable Org currentOrg) { + this.currentOrg = currentOrg; + } + + public User deleted(@javax.annotation.Nullable Boolean deleted) { + this.deleted = deleted; + return this; + } + + /** + * Indicates whether the user is deleted. + * + * @return deleted + */ + @javax.annotation.Nullable + public Boolean getDeleted() { + return deleted; + } + + public void setDeleted(@javax.annotation.Nullable Boolean deleted) { + this.deleted = deleted; + } + + public User deprecated(@javax.annotation.Nullable Boolean deprecated) { + this.deprecated = deprecated; + return this; + } + + /** + * Indicates whether the user is deprecated. + * + * @return deprecated + */ + @javax.annotation.Nullable + public Boolean getDeprecated() { + return deprecated; + } + + public void setDeprecated(@javax.annotation.Nullable Boolean deprecated) { + this.deprecated = deprecated; + } + + public User accountType(@javax.annotation.Nullable AccountTypeEnum accountType) { + this.accountType = accountType; + return this; + } + + /** + * Type of the user account. + * + * @return accountType + */ + @javax.annotation.Nullable + public AccountTypeEnum getAccountType() { + return accountType; + } + + public void setAccountType(@javax.annotation.Nullable AccountTypeEnum accountType) { + this.accountType = accountType; + } + + public User accountStatus(@javax.annotation.Nullable AccountStatusEnum accountStatus) { + this.accountStatus = accountStatus; + return this; + } + + /** + * Status of the user account. + * + * @return accountStatus + */ + @javax.annotation.Nullable + public AccountStatusEnum getAccountStatus() { + return accountStatus; + } + + public void setAccountStatus(@javax.annotation.Nullable AccountStatusEnum accountStatus) { + this.accountStatus = accountStatus; + } + + public User email(@javax.annotation.Nullable String email) { + this.email = email; + return this; + } + + /** + * Email of the user. + * + * @return email + */ + @javax.annotation.Nullable + public String getEmail() { + return email; + } + + public void setEmail(@javax.annotation.Nullable String email) { + this.email = email; + } + + public User expirationTimeInMillis(@javax.annotation.Nullable Float expirationTimeInMillis) { + this.expirationTimeInMillis = expirationTimeInMillis; + return this; + } + + /** + * Expiration time of the user in milliseconds. + * + * @return expirationTimeInMillis + */ + @javax.annotation.Nullable + public Float getExpirationTimeInMillis() { + return expirationTimeInMillis; + } + + public void setExpirationTimeInMillis(@javax.annotation.Nullable Float expirationTimeInMillis) { + this.expirationTimeInMillis = expirationTimeInMillis; + } + + public User external(@javax.annotation.Nullable Boolean external) { + this.external = external; + return this; + } + + /** + * Indicates whether the user is external. + * + * @return external + */ + @javax.annotation.Nullable + public Boolean getExternal() { + return external; + } + + public void setExternal(@javax.annotation.Nullable Boolean external) { + this.external = external; + } + + public User favoriteMetadata( + @javax.annotation.Nullable List favoriteMetadata) { + this.favoriteMetadata = favoriteMetadata; + return this; + } + + public User addFavoriteMetadataItem(FavoriteMetadataItem favoriteMetadataItem) { + if (this.favoriteMetadata == null) { + this.favoriteMetadata = new ArrayList<>(); + } + this.favoriteMetadata.add(favoriteMetadataItem); + return this; + } + + /** + * Metadata objects to add to the users' favorites list. + * + * @return favoriteMetadata + */ + @javax.annotation.Nullable + public List getFavoriteMetadata() { + return favoriteMetadata; + } + + public void setFavoriteMetadata( + @javax.annotation.Nullable List favoriteMetadata) { + this.favoriteMetadata = favoriteMetadata; + } + + public User firstLoginTimeInMillis(@javax.annotation.Nullable Float firstLoginTimeInMillis) { + this.firstLoginTimeInMillis = firstLoginTimeInMillis; + return this; + } + + /** + * Timestamp of the first login session of the user in milliseconds. + * + * @return firstLoginTimeInMillis + */ + @javax.annotation.Nullable + public Float getFirstLoginTimeInMillis() { + return firstLoginTimeInMillis; + } + + public void setFirstLoginTimeInMillis(@javax.annotation.Nullable Float firstLoginTimeInMillis) { + this.firstLoginTimeInMillis = firstLoginTimeInMillis; + } + + public User groupMask(@javax.annotation.Nullable Integer groupMask) { + this.groupMask = groupMask; + return this; + } + + /** + * Group mask of the user. + * + * @return groupMask + */ + @javax.annotation.Nullable + public Integer getGroupMask() { + return groupMask; + } + + public void setGroupMask(@javax.annotation.Nullable Integer groupMask) { + this.groupMask = groupMask; + } + + public User hidden(@javax.annotation.Nullable Boolean hidden) { + this.hidden = hidden; + return this; + } + + /** + * Indicates whether the user is hidden. + * + * @return hidden + */ + @javax.annotation.Nullable + public Boolean getHidden() { + return hidden; + } + + public void setHidden(@javax.annotation.Nullable Boolean hidden) { + this.hidden = hidden; + } + + public User homeLiveboard(@javax.annotation.Nullable ObjectIDAndName homeLiveboard) { + this.homeLiveboard = homeLiveboard; + return this; + } + + /** + * Get homeLiveboard + * + * @return homeLiveboard + */ + @javax.annotation.Nullable + public ObjectIDAndName getHomeLiveboard() { + return homeLiveboard; + } + + public void setHomeLiveboard(@javax.annotation.Nullable ObjectIDAndName homeLiveboard) { + this.homeLiveboard = homeLiveboard; + } + + public User incompleteDetails(@javax.annotation.Nullable Object incompleteDetails) { + this.incompleteDetails = incompleteDetails; + return this; + } + + /** + * Incomplete details of user if any present. + * + * @return incompleteDetails + */ + @javax.annotation.Nullable + public Object getIncompleteDetails() { + return incompleteDetails; + } + + public void setIncompleteDetails(@javax.annotation.Nullable Object incompleteDetails) { + this.incompleteDetails = incompleteDetails; + } + + public User isFirstLogin(@javax.annotation.Nullable Boolean isFirstLogin) { + this.isFirstLogin = isFirstLogin; + return this; + } + + /** + * Indicates whether it is first login of the user. + * + * @return isFirstLogin + */ + @javax.annotation.Nullable + public Boolean getIsFirstLogin() { + return isFirstLogin; + } + + public void setIsFirstLogin(@javax.annotation.Nullable Boolean isFirstLogin) { + this.isFirstLogin = isFirstLogin; + } + + public User modificationTimeInMillis( + @javax.annotation.Nullable Float modificationTimeInMillis) { + this.modificationTimeInMillis = modificationTimeInMillis; + return this; + } + + /** + * Last modified time of the user in milliseconds. + * + * @return modificationTimeInMillis + */ + @javax.annotation.Nullable + public Float getModificationTimeInMillis() { + return modificationTimeInMillis; + } + + public void setModificationTimeInMillis( + @javax.annotation.Nullable Float modificationTimeInMillis) { + this.modificationTimeInMillis = modificationTimeInMillis; + } + + public User modifierId(@javax.annotation.Nullable String modifierId) { + this.modifierId = modifierId; + return this; + } + + /** + * Unique identifier of modifier of the user. + * + * @return modifierId + */ + @javax.annotation.Nullable + public String getModifierId() { + return modifierId; + } + + public void setModifierId(@javax.annotation.Nullable String modifierId) { + this.modifierId = modifierId; + } + + public User notifyOnShare(@javax.annotation.Nullable Boolean notifyOnShare) { + this.notifyOnShare = notifyOnShare; + return this; + } + + /** + * User preference for receiving email notifications on shared Answers or Liveboard. + * + * @return notifyOnShare + */ + @javax.annotation.Nullable + public Boolean getNotifyOnShare() { + return notifyOnShare; + } + + public void setNotifyOnShare(@javax.annotation.Nullable Boolean notifyOnShare) { + this.notifyOnShare = notifyOnShare; + } + + public User onboardingExperienceCompleted( + @javax.annotation.Nullable Boolean onboardingExperienceCompleted) { + this.onboardingExperienceCompleted = onboardingExperienceCompleted; + return this; + } + + /** + * The user preference for turning off the onboarding experience. + * + * @return onboardingExperienceCompleted + */ + @javax.annotation.Nullable + public Boolean getOnboardingExperienceCompleted() { + return onboardingExperienceCompleted; + } + + public void setOnboardingExperienceCompleted( + @javax.annotation.Nullable Boolean onboardingExperienceCompleted) { + this.onboardingExperienceCompleted = onboardingExperienceCompleted; + } + + public User orgs(@javax.annotation.Nullable List orgs) { + this.orgs = orgs; + return this; + } + + public User addOrgsItem(Org orgsItem) { + if (this.orgs == null) { + this.orgs = new ArrayList<>(); + } + this.orgs.add(orgsItem); + return this; + } + + /** + * Orgs to which the user belongs. + * + * @return orgs + */ + @javax.annotation.Nullable + public List getOrgs() { + return orgs; + } + + public void setOrgs(@javax.annotation.Nullable List orgs) { + this.orgs = orgs; + } + + public User ownerId(@javax.annotation.Nullable String ownerId) { + this.ownerId = ownerId; + return this; + } + + /** + * Unique identifier of owner of the user. + * + * @return ownerId + */ + @javax.annotation.Nullable + public String getOwnerId() { + return ownerId; + } + + public void setOwnerId(@javax.annotation.Nullable String ownerId) { + this.ownerId = ownerId; + } + + public User parentType(@javax.annotation.Nullable ParentTypeEnum parentType) { + this.parentType = parentType; + return this; + } + + /** + * Parent type of the user. + * + * @return parentType + */ + @javax.annotation.Nullable + public ParentTypeEnum getParentType() { + return parentType; + } + + public void setParentType(@javax.annotation.Nullable ParentTypeEnum parentType) { + this.parentType = parentType; + } + + public User privileges(@javax.annotation.Nullable List privileges) { + this.privileges = privileges; + return this; + } + + public User addPrivilegesItem(String privilegesItem) { + if (this.privileges == null) { + this.privileges = new ArrayList<>(); + } + this.privileges.add(privilegesItem); + return this; + } + + /** + * Privileges which are assigned to the user. + * + * @return privileges + */ + @javax.annotation.Nullable + public List getPrivileges() { + return privileges; + } + + public void setPrivileges(@javax.annotation.Nullable List privileges) { + this.privileges = privileges; + } + + public User showOnboardingExperience( + @javax.annotation.Nullable Boolean showOnboardingExperience) { + this.showOnboardingExperience = showOnboardingExperience; + return this; + } + + /** + * User's preference to revisit the new user onboarding experience. + * + * @return showOnboardingExperience + */ + @javax.annotation.Nullable + public Boolean getShowOnboardingExperience() { + return showOnboardingExperience; + } + + public void setShowOnboardingExperience( + @javax.annotation.Nullable Boolean showOnboardingExperience) { + this.showOnboardingExperience = showOnboardingExperience; + } + + public User superUser(@javax.annotation.Nullable Boolean superUser) { + this.superUser = superUser; + return this; + } + + /** + * Indicates whether the user is a super user. + * + * @return superUser + */ + @javax.annotation.Nullable + public Boolean getSuperUser() { + return superUser; + } + + public void setSuperUser(@javax.annotation.Nullable Boolean superUser) { + this.superUser = superUser; + } + + public User systemUser(@javax.annotation.Nullable Boolean systemUser) { + this.systemUser = systemUser; + return this; + } + + /** + * Indicates whether the user is a system user. + * + * @return systemUser + */ + @javax.annotation.Nullable + public Boolean getSystemUser() { + return systemUser; + } + + public void setSystemUser(@javax.annotation.Nullable Boolean systemUser) { + this.systemUser = systemUser; + } + + public User tags(@javax.annotation.Nullable List tags) { + this.tags = tags; + return this; + } + + public User addTagsItem(ObjectIDAndName tagsItem) { + if (this.tags == null) { + this.tags = new ArrayList<>(); + } + this.tags.add(tagsItem); + return this; + } + + /** + * Tags associated with the user. + * + * @return tags + */ + @javax.annotation.Nullable + public List getTags() { + return tags; + } + + public void setTags(@javax.annotation.Nullable List tags) { + this.tags = tags; + } + + public User tenantId(@javax.annotation.Nullable String tenantId) { + this.tenantId = tenantId; + return this; + } + + /** + * Unique identifier of tenant of the user. + * + * @return tenantId + */ + @javax.annotation.Nullable + public String getTenantId() { + return tenantId; + } + + public void setTenantId(@javax.annotation.Nullable String tenantId) { + this.tenantId = tenantId; + } + + public User userGroups(@javax.annotation.Nullable List userGroups) { + this.userGroups = userGroups; + return this; + } + + public User addUserGroupsItem(ObjectIDAndName userGroupsItem) { + if (this.userGroups == null) { + this.userGroups = new ArrayList<>(); + } + this.userGroups.add(userGroupsItem); + return this; + } + + /** + * Groups to which the user is assigned. + * + * @return userGroups + */ + @javax.annotation.Nullable + public List getUserGroups() { + return userGroups; + } + + public void setUserGroups(@javax.annotation.Nullable List userGroups) { + this.userGroups = userGroups; + } + + public User userInheritedGroups( + @javax.annotation.Nullable List userInheritedGroups) { + this.userInheritedGroups = userInheritedGroups; + return this; + } + + public User addUserInheritedGroupsItem(ObjectIDAndName userInheritedGroupsItem) { + if (this.userInheritedGroups == null) { + this.userInheritedGroups = new ArrayList<>(); + } + this.userInheritedGroups.add(userInheritedGroupsItem); + return this; + } + + /** + * Inherited User Groups which the user is part of. + * + * @return userInheritedGroups + */ + @javax.annotation.Nullable + public List getUserInheritedGroups() { + return userInheritedGroups; + } + + public void setUserInheritedGroups( + @javax.annotation.Nullable List userInheritedGroups) { + this.userInheritedGroups = userInheritedGroups; + } + + public User welcomeEmailSent(@javax.annotation.Nullable Boolean welcomeEmailSent) { + this.welcomeEmailSent = welcomeEmailSent; + return this; + } + + /** + * Indicates whether welcome email is sent for the user. + * + * @return welcomeEmailSent + */ + @javax.annotation.Nullable + public Boolean getWelcomeEmailSent() { + return welcomeEmailSent; + } + + public void setWelcomeEmailSent(@javax.annotation.Nullable Boolean welcomeEmailSent) { + this.welcomeEmailSent = welcomeEmailSent; + } + + public User orgPrivileges(@javax.annotation.Nullable Object orgPrivileges) { + this.orgPrivileges = orgPrivileges; + return this; + } + + /** + * Privileges which are assigned to the user with org. + * + * @return orgPrivileges + */ + @javax.annotation.Nullable + public Object getOrgPrivileges() { + return orgPrivileges; + } + + public void setOrgPrivileges(@javax.annotation.Nullable Object orgPrivileges) { + this.orgPrivileges = orgPrivileges; + } + + public User preferredLocale(@javax.annotation.Nullable String preferredLocale) { + this.preferredLocale = preferredLocale; + return this; + } + + /** + * Locale for the user. + * + * @return preferredLocale + */ + @javax.annotation.Nullable + public String getPreferredLocale() { + return preferredLocale; + } + + public void setPreferredLocale(@javax.annotation.Nullable String preferredLocale) { + this.preferredLocale = preferredLocale; + } + + public User useBrowserLanguage(@javax.annotation.Nullable Boolean useBrowserLanguage) { + this.useBrowserLanguage = useBrowserLanguage; + return this; + } + + /** + * Flag to indicate whether to use the browser locale for the user in the UI. When set to true, + * the preferred_locale value is unset and the browser's language setting takes precedence. + * Version: 26.3.0.cl or later + * + * @return useBrowserLanguage + */ + @javax.annotation.Nullable + public Boolean getUseBrowserLanguage() { + return useBrowserLanguage; + } + + public void setUseBrowserLanguage(@javax.annotation.Nullable Boolean useBrowserLanguage) { + this.useBrowserLanguage = useBrowserLanguage; + } + + public User extendedProperties(@javax.annotation.Nullable Object extendedProperties) { + this.extendedProperties = extendedProperties; + return this; + } + + /** + * Properties for the user + * + * @return extendedProperties + */ + @javax.annotation.Nullable + public Object getExtendedProperties() { + return extendedProperties; + } + + public void setExtendedProperties(@javax.annotation.Nullable Object extendedProperties) { + this.extendedProperties = extendedProperties; + } + + public User extendedPreferences(@javax.annotation.Nullable Object extendedPreferences) { + this.extendedPreferences = extendedPreferences; + return this; + } + + /** + * Preferences for the user + * + * @return extendedPreferences + */ + @javax.annotation.Nullable + public Object getExtendedPreferences() { + return extendedPreferences; + } + + public void setExtendedPreferences(@javax.annotation.Nullable Object extendedPreferences) { + this.extendedPreferences = extendedPreferences; + } + + public User userParameters(@javax.annotation.Nullable Object userParameters) { + this.userParameters = userParameters; + return this; + } + + /** + * User Parameters which are specified for the user via JWToken + * + * @return userParameters + */ + @javax.annotation.Nullable + public Object getUserParameters() { + return userParameters; + } + + public void setUserParameters(@javax.annotation.Nullable Object userParameters) { + this.userParameters = userParameters; + } + + public User accessControlProperties(@javax.annotation.Nullable Object accessControlProperties) { + this.accessControlProperties = accessControlProperties; + return this; + } + + /** + * Access Control Properties which are specified for the user via JWToken + * + * @return accessControlProperties + */ + @javax.annotation.Nullable + public Object getAccessControlProperties() { + return accessControlProperties; + } + + public void setAccessControlProperties( + @javax.annotation.Nullable Object accessControlProperties) { + this.accessControlProperties = accessControlProperties; + } + + public User variableValues(@javax.annotation.Nullable Object variableValues) { + this.variableValues = variableValues; + return this; + } + + /** + * Formula Variables which are specified for the user via JWToken + * + * @return variableValues + */ + @javax.annotation.Nullable + public Object getVariableValues() { + return variableValues; + } + + public void setVariableValues(@javax.annotation.Nullable Object variableValues) { + this.variableValues = variableValues; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key name of the property + * @param value value of the property + * @return the User instance itself + */ + public User putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return a map of objects + */ + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key name of the property + * @return an object + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + User user = (User) o; + return Objects.equals(this.id, user.id) + && Objects.equals(this.name, user.name) + && Objects.equals(this.displayName, user.displayName) + && Objects.equals(this.visibility, user.visibility) + && Objects.equals(this.authorId, user.authorId) + && Objects.equals(this.canChangePassword, user.canChangePassword) + && Objects.equals(this.completeDetail, user.completeDetail) + && Objects.equals(this.creationTimeInMillis, user.creationTimeInMillis) + && Objects.equals(this.currentOrg, user.currentOrg) + && Objects.equals(this.deleted, user.deleted) + && Objects.equals(this.deprecated, user.deprecated) + && Objects.equals(this.accountType, user.accountType) + && Objects.equals(this.accountStatus, user.accountStatus) + && Objects.equals(this.email, user.email) + && Objects.equals(this.expirationTimeInMillis, user.expirationTimeInMillis) + && Objects.equals(this.external, user.external) + && Objects.equals(this.favoriteMetadata, user.favoriteMetadata) + && Objects.equals(this.firstLoginTimeInMillis, user.firstLoginTimeInMillis) + && Objects.equals(this.groupMask, user.groupMask) + && Objects.equals(this.hidden, user.hidden) + && Objects.equals(this.homeLiveboard, user.homeLiveboard) + && Objects.equals(this.incompleteDetails, user.incompleteDetails) + && Objects.equals(this.isFirstLogin, user.isFirstLogin) + && Objects.equals(this.modificationTimeInMillis, user.modificationTimeInMillis) + && Objects.equals(this.modifierId, user.modifierId) + && Objects.equals(this.notifyOnShare, user.notifyOnShare) + && Objects.equals( + this.onboardingExperienceCompleted, user.onboardingExperienceCompleted) + && Objects.equals(this.orgs, user.orgs) + && Objects.equals(this.ownerId, user.ownerId) + && Objects.equals(this.parentType, user.parentType) + && Objects.equals(this.privileges, user.privileges) + && Objects.equals(this.showOnboardingExperience, user.showOnboardingExperience) + && Objects.equals(this.superUser, user.superUser) + && Objects.equals(this.systemUser, user.systemUser) + && Objects.equals(this.tags, user.tags) + && Objects.equals(this.tenantId, user.tenantId) + && Objects.equals(this.userGroups, user.userGroups) + && Objects.equals(this.userInheritedGroups, user.userInheritedGroups) + && Objects.equals(this.welcomeEmailSent, user.welcomeEmailSent) + && Objects.equals(this.orgPrivileges, user.orgPrivileges) + && Objects.equals(this.preferredLocale, user.preferredLocale) + && Objects.equals(this.useBrowserLanguage, user.useBrowserLanguage) + && Objects.equals(this.extendedProperties, user.extendedProperties) + && Objects.equals(this.extendedPreferences, user.extendedPreferences) + && Objects.equals(this.userParameters, user.userParameters) + && Objects.equals(this.accessControlProperties, user.accessControlProperties) + && Objects.equals(this.variableValues, user.variableValues) + && Objects.equals(this.additionalProperties, user.additionalProperties); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b + || (a != null + && b != null + && a.isPresent() + && b.isPresent() + && Objects.deepEquals(a.get(), b.get())); + } + + @Override + public int hashCode() { + return Objects.hash( + id, + name, + displayName, + visibility, + authorId, + canChangePassword, + completeDetail, + creationTimeInMillis, + currentOrg, + deleted, + deprecated, + accountType, + accountStatus, + email, + expirationTimeInMillis, + external, + favoriteMetadata, + firstLoginTimeInMillis, + groupMask, + hidden, + homeLiveboard, + incompleteDetails, + isFirstLogin, + modificationTimeInMillis, + modifierId, + notifyOnShare, + onboardingExperienceCompleted, + orgs, + ownerId, + parentType, + privileges, + showOnboardingExperience, + superUser, + systemUser, + tags, + tenantId, + userGroups, + userInheritedGroups, + welcomeEmailSent, + orgPrivileges, + preferredLocale, + useBrowserLanguage, + extendedProperties, + extendedPreferences, + userParameters, + accessControlProperties, + variableValues, + additionalProperties); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; + } + return a.isPresent() ? Arrays.deepHashCode(new Object[] {a.get()}) : 31; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class User {\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append(" displayName: ").append(toIndentedString(displayName)).append("\n"); + sb.append(" visibility: ").append(toIndentedString(visibility)).append("\n"); + sb.append(" authorId: ").append(toIndentedString(authorId)).append("\n"); + sb.append(" canChangePassword: ") + .append(toIndentedString(canChangePassword)) + .append("\n"); + sb.append(" completeDetail: ").append(toIndentedString(completeDetail)).append("\n"); + sb.append(" creationTimeInMillis: ") + .append(toIndentedString(creationTimeInMillis)) + .append("\n"); + sb.append(" currentOrg: ").append(toIndentedString(currentOrg)).append("\n"); + sb.append(" deleted: ").append(toIndentedString(deleted)).append("\n"); + sb.append(" deprecated: ").append(toIndentedString(deprecated)).append("\n"); + sb.append(" accountType: ").append(toIndentedString(accountType)).append("\n"); + sb.append(" accountStatus: ").append(toIndentedString(accountStatus)).append("\n"); + sb.append(" email: ").append(toIndentedString(email)).append("\n"); + sb.append(" expirationTimeInMillis: ") + .append(toIndentedString(expirationTimeInMillis)) + .append("\n"); + sb.append(" external: ").append(toIndentedString(external)).append("\n"); + sb.append(" favoriteMetadata: ").append(toIndentedString(favoriteMetadata)).append("\n"); + sb.append(" firstLoginTimeInMillis: ") + .append(toIndentedString(firstLoginTimeInMillis)) + .append("\n"); + sb.append(" groupMask: ").append(toIndentedString(groupMask)).append("\n"); + sb.append(" hidden: ").append(toIndentedString(hidden)).append("\n"); + sb.append(" homeLiveboard: ").append(toIndentedString(homeLiveboard)).append("\n"); + sb.append(" incompleteDetails: ") + .append(toIndentedString(incompleteDetails)) + .append("\n"); + sb.append(" isFirstLogin: ").append(toIndentedString(isFirstLogin)).append("\n"); + sb.append(" modificationTimeInMillis: ") + .append(toIndentedString(modificationTimeInMillis)) + .append("\n"); + sb.append(" modifierId: ").append(toIndentedString(modifierId)).append("\n"); + sb.append(" notifyOnShare: ").append(toIndentedString(notifyOnShare)).append("\n"); + sb.append(" onboardingExperienceCompleted: ") + .append(toIndentedString(onboardingExperienceCompleted)) + .append("\n"); + sb.append(" orgs: ").append(toIndentedString(orgs)).append("\n"); + sb.append(" ownerId: ").append(toIndentedString(ownerId)).append("\n"); + sb.append(" parentType: ").append(toIndentedString(parentType)).append("\n"); + sb.append(" privileges: ").append(toIndentedString(privileges)).append("\n"); + sb.append(" showOnboardingExperience: ") + .append(toIndentedString(showOnboardingExperience)) + .append("\n"); + sb.append(" superUser: ").append(toIndentedString(superUser)).append("\n"); + sb.append(" systemUser: ").append(toIndentedString(systemUser)).append("\n"); + sb.append(" tags: ").append(toIndentedString(tags)).append("\n"); + sb.append(" tenantId: ").append(toIndentedString(tenantId)).append("\n"); + sb.append(" userGroups: ").append(toIndentedString(userGroups)).append("\n"); + sb.append(" userInheritedGroups: ") + .append(toIndentedString(userInheritedGroups)) + .append("\n"); + sb.append(" welcomeEmailSent: ").append(toIndentedString(welcomeEmailSent)).append("\n"); + sb.append(" orgPrivileges: ").append(toIndentedString(orgPrivileges)).append("\n"); + sb.append(" preferredLocale: ").append(toIndentedString(preferredLocale)).append("\n"); + sb.append(" useBrowserLanguage: ") + .append(toIndentedString(useBrowserLanguage)) + .append("\n"); + sb.append(" extendedProperties: ") + .append(toIndentedString(extendedProperties)) + .append("\n"); + sb.append(" extendedPreferences: ") + .append(toIndentedString(extendedPreferences)) + .append("\n"); + sb.append(" userParameters: ").append(toIndentedString(userParameters)).append("\n"); + sb.append(" accessControlProperties: ") + .append(toIndentedString(accessControlProperties)) + .append("\n"); + sb.append(" variableValues: ").append(toIndentedString(variableValues)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first + * line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("id"); + openapiFields.add("name"); + openapiFields.add("display_name"); + openapiFields.add("visibility"); + openapiFields.add("author_id"); + openapiFields.add("can_change_password"); + openapiFields.add("complete_detail"); + openapiFields.add("creation_time_in_millis"); + openapiFields.add("current_org"); + openapiFields.add("deleted"); + openapiFields.add("deprecated"); + openapiFields.add("account_type"); + openapiFields.add("account_status"); + openapiFields.add("email"); + openapiFields.add("expiration_time_in_millis"); + openapiFields.add("external"); + openapiFields.add("favorite_metadata"); + openapiFields.add("first_login_time_in_millis"); + openapiFields.add("group_mask"); + openapiFields.add("hidden"); + openapiFields.add("home_liveboard"); + openapiFields.add("incomplete_details"); + openapiFields.add("is_first_login"); + openapiFields.add("modification_time_in_millis"); + openapiFields.add("modifier_id"); + openapiFields.add("notify_on_share"); + openapiFields.add("onboarding_experience_completed"); + openapiFields.add("orgs"); + openapiFields.add("owner_id"); + openapiFields.add("parent_type"); + openapiFields.add("privileges"); + openapiFields.add("show_onboarding_experience"); + openapiFields.add("super_user"); + openapiFields.add("system_user"); + openapiFields.add("tags"); + openapiFields.add("tenant_id"); + openapiFields.add("user_groups"); + openapiFields.add("user_inherited_groups"); + openapiFields.add("welcome_email_sent"); + openapiFields.add("org_privileges"); + openapiFields.add("preferred_locale"); + openapiFields.add("use_browser_language"); + openapiFields.add("extended_properties"); + openapiFields.add("extended_preferences"); + openapiFields.add("user_parameters"); + openapiFields.add("access_control_properties"); + openapiFields.add("variable_values"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + openapiRequiredFields.add("id"); + openapiRequiredFields.add("name"); + openapiRequiredFields.add("display_name"); + openapiRequiredFields.add("visibility"); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to User + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!User.openapiRequiredFields + .isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException( + String.format( + "The required field(s) %s in User is not found in the empty JSON" + + " string", + User.openapiRequiredFields.toString())); + } + } + + // check to make sure all required properties/fields are present in the JSON string + for (String requiredField : User.openapiRequiredFields) { + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException( + String.format( + "The required field `%s` is not found in the JSON string: %s", + requiredField, jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if (!jsonObj.get("id").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `id` to be a primitive type in the JSON string but" + + " got `%s`", + jsonObj.get("id").toString())); + } + if (!jsonObj.get("name").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `name` to be a primitive type in the JSON string" + + " but got `%s`", + jsonObj.get("name").toString())); + } + if (!jsonObj.get("display_name").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `display_name` to be a primitive type in the JSON" + + " string but got `%s`", + jsonObj.get("display_name").toString())); + } + if (!jsonObj.get("visibility").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `visibility` to be a primitive type in the JSON" + + " string but got `%s`", + jsonObj.get("visibility").toString())); + } + // validate the required field `visibility` + VisibilityEnum.validateJsonElement(jsonObj.get("visibility")); + if ((jsonObj.get("author_id") != null && !jsonObj.get("author_id").isJsonNull()) + && !jsonObj.get("author_id").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `author_id` to be a primitive type in the JSON" + + " string but got `%s`", + jsonObj.get("author_id").toString())); + } + // validate the optional field `current_org` + if (jsonObj.get("current_org") != null && !jsonObj.get("current_org").isJsonNull()) { + Org.validateJsonElement(jsonObj.get("current_org")); + } + if ((jsonObj.get("account_type") != null && !jsonObj.get("account_type").isJsonNull()) + && !jsonObj.get("account_type").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `account_type` to be a primitive type in the JSON" + + " string but got `%s`", + jsonObj.get("account_type").toString())); + } + // validate the optional field `account_type` + if (jsonObj.get("account_type") != null && !jsonObj.get("account_type").isJsonNull()) { + AccountTypeEnum.validateJsonElement(jsonObj.get("account_type")); + } + if ((jsonObj.get("account_status") != null && !jsonObj.get("account_status").isJsonNull()) + && !jsonObj.get("account_status").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `account_status` to be a primitive type in the" + + " JSON string but got `%s`", + jsonObj.get("account_status").toString())); + } + // validate the optional field `account_status` + if (jsonObj.get("account_status") != null && !jsonObj.get("account_status").isJsonNull()) { + AccountStatusEnum.validateJsonElement(jsonObj.get("account_status")); + } + if ((jsonObj.get("email") != null && !jsonObj.get("email").isJsonNull()) + && !jsonObj.get("email").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `email` to be a primitive type in the JSON string" + + " but got `%s`", + jsonObj.get("email").toString())); + } + if (jsonObj.get("favorite_metadata") != null + && !jsonObj.get("favorite_metadata").isJsonNull()) { + JsonArray jsonArrayfavoriteMetadata = jsonObj.getAsJsonArray("favorite_metadata"); + if (jsonArrayfavoriteMetadata != null) { + // ensure the json data is an array + if (!jsonObj.get("favorite_metadata").isJsonArray()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `favorite_metadata` to be an array in the" + + " JSON string but got `%s`", + jsonObj.get("favorite_metadata").toString())); + } + + // validate the optional field `favorite_metadata` (array) + for (int i = 0; i < jsonArrayfavoriteMetadata.size(); i++) { + FavoriteMetadataItem.validateJsonElement(jsonArrayfavoriteMetadata.get(i)); + } + ; + } + } + // validate the optional field `home_liveboard` + if (jsonObj.get("home_liveboard") != null && !jsonObj.get("home_liveboard").isJsonNull()) { + ObjectIDAndName.validateJsonElement(jsonObj.get("home_liveboard")); + } + if ((jsonObj.get("modifier_id") != null && !jsonObj.get("modifier_id").isJsonNull()) + && !jsonObj.get("modifier_id").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `modifier_id` to be a primitive type in the JSON" + + " string but got `%s`", + jsonObj.get("modifier_id").toString())); + } + if (jsonObj.get("orgs") != null && !jsonObj.get("orgs").isJsonNull()) { + JsonArray jsonArrayorgs = jsonObj.getAsJsonArray("orgs"); + if (jsonArrayorgs != null) { + // ensure the json data is an array + if (!jsonObj.get("orgs").isJsonArray()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `orgs` to be an array in the JSON string" + + " but got `%s`", + jsonObj.get("orgs").toString())); + } + + // validate the optional field `orgs` (array) + for (int i = 0; i < jsonArrayorgs.size(); i++) { + Org.validateJsonElement(jsonArrayorgs.get(i)); + } + ; + } + } + if ((jsonObj.get("owner_id") != null && !jsonObj.get("owner_id").isJsonNull()) + && !jsonObj.get("owner_id").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `owner_id` to be a primitive type in the JSON" + + " string but got `%s`", + jsonObj.get("owner_id").toString())); + } + if ((jsonObj.get("parent_type") != null && !jsonObj.get("parent_type").isJsonNull()) + && !jsonObj.get("parent_type").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `parent_type` to be a primitive type in the JSON" + + " string but got `%s`", + jsonObj.get("parent_type").toString())); + } + // validate the optional field `parent_type` + if (jsonObj.get("parent_type") != null && !jsonObj.get("parent_type").isJsonNull()) { + ParentTypeEnum.validateJsonElement(jsonObj.get("parent_type")); + } + // ensure the optional json data is an array if present + if (jsonObj.get("privileges") != null + && !jsonObj.get("privileges").isJsonNull() + && !jsonObj.get("privileges").isJsonArray()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `privileges` to be an array in the JSON string but" + + " got `%s`", + jsonObj.get("privileges").toString())); + } + if (jsonObj.get("tags") != null && !jsonObj.get("tags").isJsonNull()) { + JsonArray jsonArraytags = jsonObj.getAsJsonArray("tags"); + if (jsonArraytags != null) { + // ensure the json data is an array + if (!jsonObj.get("tags").isJsonArray()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `tags` to be an array in the JSON string" + + " but got `%s`", + jsonObj.get("tags").toString())); + } + + // validate the optional field `tags` (array) + for (int i = 0; i < jsonArraytags.size(); i++) { + ObjectIDAndName.validateJsonElement(jsonArraytags.get(i)); + } + ; + } + } + if ((jsonObj.get("tenant_id") != null && !jsonObj.get("tenant_id").isJsonNull()) + && !jsonObj.get("tenant_id").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `tenant_id` to be a primitive type in the JSON" + + " string but got `%s`", + jsonObj.get("tenant_id").toString())); + } + if (jsonObj.get("user_groups") != null && !jsonObj.get("user_groups").isJsonNull()) { + JsonArray jsonArrayuserGroups = jsonObj.getAsJsonArray("user_groups"); + if (jsonArrayuserGroups != null) { + // ensure the json data is an array + if (!jsonObj.get("user_groups").isJsonArray()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `user_groups` to be an array in the JSON" + + " string but got `%s`", + jsonObj.get("user_groups").toString())); + } + + // validate the optional field `user_groups` (array) + for (int i = 0; i < jsonArrayuserGroups.size(); i++) { + ObjectIDAndName.validateJsonElement(jsonArrayuserGroups.get(i)); + } + ; + } + } + if (jsonObj.get("user_inherited_groups") != null + && !jsonObj.get("user_inherited_groups").isJsonNull()) { + JsonArray jsonArrayuserInheritedGroups = + jsonObj.getAsJsonArray("user_inherited_groups"); + if (jsonArrayuserInheritedGroups != null) { + // ensure the json data is an array + if (!jsonObj.get("user_inherited_groups").isJsonArray()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `user_inherited_groups` to be an array in" + + " the JSON string but got `%s`", + jsonObj.get("user_inherited_groups").toString())); + } + + // validate the optional field `user_inherited_groups` (array) + for (int i = 0; i < jsonArrayuserInheritedGroups.size(); i++) { + ObjectIDAndName.validateJsonElement(jsonArrayuserInheritedGroups.get(i)); + } + ; + } + } + if ((jsonObj.get("preferred_locale") != null + && !jsonObj.get("preferred_locale").isJsonNull()) + && !jsonObj.get("preferred_locale").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `preferred_locale` to be a primitive type in the" + + " JSON string but got `%s`", + jsonObj.get("preferred_locale").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!User.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'User' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter = + gson.getDelegateAdapter(this, TypeToken.get(User.class)); + + return (TypeAdapter) + new TypeAdapter() { + @Override + public void write(JsonWriter out, User value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + obj.remove("additionalProperties"); + // serialize additional properties + if (value.getAdditionalProperties() != null) { + for (Map.Entry entry : + value.getAdditionalProperties().entrySet()) { + if (entry.getValue() instanceof String) + obj.addProperty(entry.getKey(), (String) entry.getValue()); + else if (entry.getValue() instanceof Number) + obj.addProperty(entry.getKey(), (Number) entry.getValue()); + else if (entry.getValue() instanceof Boolean) + obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); + else if (entry.getValue() instanceof Character) + obj.addProperty( + entry.getKey(), (Character) entry.getValue()); + else { + JsonElement jsonElement = gson.toJsonTree(entry.getValue()); + if (jsonElement.isJsonArray()) { + obj.add(entry.getKey(), jsonElement.getAsJsonArray()); + } else { + obj.add(entry.getKey(), jsonElement.getAsJsonObject()); + } + } + } + } + elementAdapter.write(out, obj); + } + + @Override + public User read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // store additional fields in the deserialized instance + User instance = thisAdapter.fromJsonTree(jsonObj); + for (Map.Entry entry : jsonObj.entrySet()) { + if (!openapiFields.contains(entry.getKey())) { + if (entry.getValue().isJsonPrimitive()) { // primitive type + if (entry.getValue().getAsJsonPrimitive().isString()) + instance.putAdditionalProperty( + entry.getKey(), entry.getValue().getAsString()); + else if (entry.getValue().getAsJsonPrimitive().isNumber()) + instance.putAdditionalProperty( + entry.getKey(), entry.getValue().getAsNumber()); + else if (entry.getValue().getAsJsonPrimitive().isBoolean()) + instance.putAdditionalProperty( + entry.getKey(), + entry.getValue().getAsBoolean()); + else + throw new IllegalArgumentException( + String.format( + "The field `%s` has unknown primitive" + + " type. Value: %s", + entry.getKey(), + entry.getValue().toString())); + } else if (entry.getValue().isJsonArray()) { + instance.putAdditionalProperty( + entry.getKey(), + gson.fromJson(entry.getValue(), List.class)); + } else { // JSON object + instance.putAdditionalProperty( + entry.getKey(), + gson.fromJson(entry.getValue(), HashMap.class)); + } + } + } + return instance; + } + }.nullSafe(); + } + } + + /** + * Create an instance of User given an JSON string + * + * @param jsonString JSON string + * @return An instance of User + * @throws IOException if the JSON string is invalid with respect to User + */ + public static User fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, User.class); + } + + /** + * Convert an instance of User to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} diff --git a/sdks/java/src/main/java/com/thoughtspot/client/model/UserGroup.java b/sdks/java/src/main/java/com/thoughtspot/client/model/UserGroup.java new file mode 100644 index 000000000..558fbefe7 --- /dev/null +++ b/sdks/java/src/main/java/com/thoughtspot/client/model/UserGroup.java @@ -0,0 +1,344 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client.model; + +import com.google.gson.Gson; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.TypeAdapter; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.annotations.SerializedName; +import com.google.gson.reflect.TypeToken; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import com.thoughtspot.client.JSON; +import java.io.IOException; +import java.io.Serializable; +import java.util.Arrays; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Objects; +import org.openapitools.jackson.nullable.JsonNullable; + +/** UserGroup */ +@javax.annotation.Generated( + value = "org.openapitools.codegen.languages.JavaClientCodegen", + comments = "Generator version: 7.12.0") +public class UserGroup implements Serializable { + private static final long serialVersionUID = 1L; + + public static final String SERIALIZED_NAME_ID = "id"; + + @SerializedName(SERIALIZED_NAME_ID) + @javax.annotation.Nullable + private String id; + + public static final String SERIALIZED_NAME_NAME = "name"; + + @SerializedName(SERIALIZED_NAME_NAME) + @javax.annotation.Nullable + private String name; + + public UserGroup() {} + + public UserGroup id(@javax.annotation.Nullable String id) { + this.id = id; + return this; + } + + /** + * Get id + * + * @return id + */ + @javax.annotation.Nullable + public String getId() { + return id; + } + + public void setId(@javax.annotation.Nullable String id) { + this.id = id; + } + + public UserGroup name(@javax.annotation.Nullable String name) { + this.name = name; + return this; + } + + /** + * Get name + * + * @return name + */ + @javax.annotation.Nullable + public String getName() { + return name; + } + + public void setName(@javax.annotation.Nullable String name) { + this.name = name; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key name of the property + * @param value value of the property + * @return the UserGroup instance itself + */ + public UserGroup putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return a map of objects + */ + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key name of the property + * @return an object + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + UserGroup userGroup = (UserGroup) o; + return Objects.equals(this.id, userGroup.id) + && Objects.equals(this.name, userGroup.name) + && Objects.equals(this.additionalProperties, userGroup.additionalProperties); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b + || (a != null + && b != null + && a.isPresent() + && b.isPresent() + && Objects.deepEquals(a.get(), b.get())); + } + + @Override + public int hashCode() { + return Objects.hash(id, name, additionalProperties); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; + } + return a.isPresent() ? Arrays.deepHashCode(new Object[] {a.get()}) : 31; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class UserGroup {\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first + * line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("id"); + openapiFields.add("name"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to UserGroup + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!UserGroup.openapiRequiredFields + .isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException( + String.format( + "The required field(s) %s in UserGroup is not found in the empty" + + " JSON string", + UserGroup.openapiRequiredFields.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if ((jsonObj.get("id") != null && !jsonObj.get("id").isJsonNull()) + && !jsonObj.get("id").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `id` to be a primitive type in the JSON string but" + + " got `%s`", + jsonObj.get("id").toString())); + } + if ((jsonObj.get("name") != null && !jsonObj.get("name").isJsonNull()) + && !jsonObj.get("name").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `name` to be a primitive type in the JSON string" + + " but got `%s`", + jsonObj.get("name").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!UserGroup.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'UserGroup' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter = + gson.getDelegateAdapter(this, TypeToken.get(UserGroup.class)); + + return (TypeAdapter) + new TypeAdapter() { + @Override + public void write(JsonWriter out, UserGroup value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + obj.remove("additionalProperties"); + // serialize additional properties + if (value.getAdditionalProperties() != null) { + for (Map.Entry entry : + value.getAdditionalProperties().entrySet()) { + if (entry.getValue() instanceof String) + obj.addProperty(entry.getKey(), (String) entry.getValue()); + else if (entry.getValue() instanceof Number) + obj.addProperty(entry.getKey(), (Number) entry.getValue()); + else if (entry.getValue() instanceof Boolean) + obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); + else if (entry.getValue() instanceof Character) + obj.addProperty( + entry.getKey(), (Character) entry.getValue()); + else { + JsonElement jsonElement = gson.toJsonTree(entry.getValue()); + if (jsonElement.isJsonArray()) { + obj.add(entry.getKey(), jsonElement.getAsJsonArray()); + } else { + obj.add(entry.getKey(), jsonElement.getAsJsonObject()); + } + } + } + } + elementAdapter.write(out, obj); + } + + @Override + public UserGroup read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // store additional fields in the deserialized instance + UserGroup instance = thisAdapter.fromJsonTree(jsonObj); + for (Map.Entry entry : jsonObj.entrySet()) { + if (!openapiFields.contains(entry.getKey())) { + if (entry.getValue().isJsonPrimitive()) { // primitive type + if (entry.getValue().getAsJsonPrimitive().isString()) + instance.putAdditionalProperty( + entry.getKey(), entry.getValue().getAsString()); + else if (entry.getValue().getAsJsonPrimitive().isNumber()) + instance.putAdditionalProperty( + entry.getKey(), entry.getValue().getAsNumber()); + else if (entry.getValue().getAsJsonPrimitive().isBoolean()) + instance.putAdditionalProperty( + entry.getKey(), + entry.getValue().getAsBoolean()); + else + throw new IllegalArgumentException( + String.format( + "The field `%s` has unknown primitive" + + " type. Value: %s", + entry.getKey(), + entry.getValue().toString())); + } else if (entry.getValue().isJsonArray()) { + instance.putAdditionalProperty( + entry.getKey(), + gson.fromJson(entry.getValue(), List.class)); + } else { // JSON object + instance.putAdditionalProperty( + entry.getKey(), + gson.fromJson(entry.getValue(), HashMap.class)); + } + } + } + return instance; + } + }.nullSafe(); + } + } + + /** + * Create an instance of UserGroup given an JSON string + * + * @param jsonString JSON string + * @return An instance of UserGroup + * @throws IOException if the JSON string is invalid with respect to UserGroup + */ + public static UserGroup fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, UserGroup.class); + } + + /** + * Convert an instance of UserGroup to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} diff --git a/sdks/java/src/main/java/com/thoughtspot/client/model/UserGroupResponse.java b/sdks/java/src/main/java/com/thoughtspot/client/model/UserGroupResponse.java new file mode 100644 index 000000000..1c1ad2e38 --- /dev/null +++ b/sdks/java/src/main/java/com/thoughtspot/client/model/UserGroupResponse.java @@ -0,0 +1,1602 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client.model; + +import com.google.gson.Gson; +import com.google.gson.JsonArray; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.TypeAdapter; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.reflect.TypeToken; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import com.thoughtspot.client.JSON; +import java.io.IOException; +import java.io.Serializable; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Objects; +import org.openapitools.jackson.nullable.JsonNullable; + +/** UserGroupResponse */ +@javax.annotation.Generated( + value = "org.openapitools.codegen.languages.JavaClientCodegen", + comments = "Generator version: 7.12.0") +public class UserGroupResponse implements Serializable { + private static final long serialVersionUID = 1L; + + public static final String SERIALIZED_NAME_AUTHOR_ID = "author_id"; + + @SerializedName(SERIALIZED_NAME_AUTHOR_ID) + @javax.annotation.Nullable + private String authorId; + + public static final String SERIALIZED_NAME_COMPLETE_DETAIL = "complete_detail"; + + @SerializedName(SERIALIZED_NAME_COMPLETE_DETAIL) + @javax.annotation.Nullable + private Boolean completeDetail; + + public static final String SERIALIZED_NAME_CONTENT = "content"; + + @SerializedName(SERIALIZED_NAME_CONTENT) + @javax.annotation.Nullable + private Object content; + + public static final String SERIALIZED_NAME_CREATION_TIME_IN_MILLIS = "creation_time_in_millis"; + + @SerializedName(SERIALIZED_NAME_CREATION_TIME_IN_MILLIS) + @javax.annotation.Nullable + private Float creationTimeInMillis; + + public static final String SERIALIZED_NAME_DEFAULT_LIVEBOARDS = "default_liveboards"; + + @SerializedName(SERIALIZED_NAME_DEFAULT_LIVEBOARDS) + @javax.annotation.Nullable + private List defaultLiveboards; + + public static final String SERIALIZED_NAME_DELETED = "deleted"; + + @SerializedName(SERIALIZED_NAME_DELETED) + @javax.annotation.Nullable + private Boolean deleted; + + public static final String SERIALIZED_NAME_DEPRECATED = "deprecated"; + + @SerializedName(SERIALIZED_NAME_DEPRECATED) + @javax.annotation.Nullable + private Boolean deprecated; + + public static final String SERIALIZED_NAME_DESCRIPTION = "description"; + + @SerializedName(SERIALIZED_NAME_DESCRIPTION) + @javax.annotation.Nullable + private String description; + + public static final String SERIALIZED_NAME_DISPLAY_NAME = "display_name"; + + @SerializedName(SERIALIZED_NAME_DISPLAY_NAME) + @javax.annotation.Nonnull + private String displayName; + + public static final String SERIALIZED_NAME_EXTERNAL = "external"; + + @SerializedName(SERIALIZED_NAME_EXTERNAL) + @javax.annotation.Nullable + private Boolean external; + + public static final String SERIALIZED_NAME_GENERATION_NUMBER = "generation_number"; + + @SerializedName(SERIALIZED_NAME_GENERATION_NUMBER) + @javax.annotation.Nullable + private Integer generationNumber; + + public static final String SERIALIZED_NAME_HIDDEN = "hidden"; + + @SerializedName(SERIALIZED_NAME_HIDDEN) + @javax.annotation.Nullable + private Boolean hidden; + + public static final String SERIALIZED_NAME_ID = "id"; + + @SerializedName(SERIALIZED_NAME_ID) + @javax.annotation.Nonnull + private String id; + + public static final String SERIALIZED_NAME_INDEX = "index"; + + @SerializedName(SERIALIZED_NAME_INDEX) + @javax.annotation.Nullable + private Integer index; + + public static final String SERIALIZED_NAME_INDEX_VERSION = "index_version"; + + @SerializedName(SERIALIZED_NAME_INDEX_VERSION) + @javax.annotation.Nullable + private Integer indexVersion; + + public static final String SERIALIZED_NAME_METADATA_VERSION = "metadata_version"; + + @SerializedName(SERIALIZED_NAME_METADATA_VERSION) + @javax.annotation.Nullable + private Integer metadataVersion; + + public static final String SERIALIZED_NAME_MODIFICATION_TIME_IN_MILLIS = + "modification_time_in_millis"; + + @SerializedName(SERIALIZED_NAME_MODIFICATION_TIME_IN_MILLIS) + @javax.annotation.Nullable + private Float modificationTimeInMillis; + + public static final String SERIALIZED_NAME_MODIFIER_ID = "modifier_id"; + + @SerializedName(SERIALIZED_NAME_MODIFIER_ID) + @javax.annotation.Nullable + private String modifierId; + + public static final String SERIALIZED_NAME_NAME = "name"; + + @SerializedName(SERIALIZED_NAME_NAME) + @javax.annotation.Nonnull + private String name; + + public static final String SERIALIZED_NAME_ORGS = "orgs"; + + @SerializedName(SERIALIZED_NAME_ORGS) + @javax.annotation.Nullable + private List orgs; + + public static final String SERIALIZED_NAME_OWNER_ID = "owner_id"; + + @SerializedName(SERIALIZED_NAME_OWNER_ID) + @javax.annotation.Nullable + private String ownerId; + + /** Parent type of the group. */ + @JsonAdapter(ParentTypeEnum.Adapter.class) + public enum ParentTypeEnum { + USER("USER"), + + GROUP("GROUP"); + + private String value; + + ParentTypeEnum(String value) { + this.value = value; + } + + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + public static ParentTypeEnum fromValue(String value) { + for (ParentTypeEnum b : ParentTypeEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + return null; + } + + public static class Adapter extends TypeAdapter { + @Override + public void write(final JsonWriter jsonWriter, final ParentTypeEnum enumeration) + throws IOException { + jsonWriter.value(enumeration.getValue()); + } + + @Override + public ParentTypeEnum read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + return ParentTypeEnum.fromValue(value); + } + } + + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + String value = jsonElement.getAsString(); + ParentTypeEnum.fromValue(value); + } + } + + public static final String SERIALIZED_NAME_PARENT_TYPE = "parent_type"; + + @SerializedName(SERIALIZED_NAME_PARENT_TYPE) + @javax.annotation.Nullable + private ParentTypeEnum parentType; + + public static final String SERIALIZED_NAME_PRIVILEGES = "privileges"; + + @SerializedName(SERIALIZED_NAME_PRIVILEGES) + @javax.annotation.Nullable + private List privileges; + + public static final String SERIALIZED_NAME_SUB_GROUPS = "sub_groups"; + + @SerializedName(SERIALIZED_NAME_SUB_GROUPS) + @javax.annotation.Nullable + private List subGroups; + + public static final String SERIALIZED_NAME_SYSTEM_GROUP = "system_group"; + + @SerializedName(SERIALIZED_NAME_SYSTEM_GROUP) + @javax.annotation.Nullable + private Boolean systemGroup; + + public static final String SERIALIZED_NAME_TAGS = "tags"; + + @SerializedName(SERIALIZED_NAME_TAGS) + @javax.annotation.Nullable + private List tags; + + /** Type of the group. */ + @JsonAdapter(TypeEnum.Adapter.class) + public enum TypeEnum { + LOCAL_GROUP("LOCAL_GROUP"), + + LDAP_GROUP("LDAP_GROUP"), + + TEAM_GROUP("TEAM_GROUP"), + + TENANT_GROUP("TENANT_GROUP"); + + private String value; + + TypeEnum(String value) { + this.value = value; + } + + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + public static TypeEnum fromValue(String value) { + for (TypeEnum b : TypeEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + return null; + } + + public static class Adapter extends TypeAdapter { + @Override + public void write(final JsonWriter jsonWriter, final TypeEnum enumeration) + throws IOException { + jsonWriter.value(enumeration.getValue()); + } + + @Override + public TypeEnum read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + return TypeEnum.fromValue(value); + } + } + + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + String value = jsonElement.getAsString(); + TypeEnum.fromValue(value); + } + } + + public static final String SERIALIZED_NAME_TYPE = "type"; + + @SerializedName(SERIALIZED_NAME_TYPE) + @javax.annotation.Nullable + private TypeEnum type; + + public static final String SERIALIZED_NAME_USERS = "users"; + + @SerializedName(SERIALIZED_NAME_USERS) + @javax.annotation.Nullable + private List users; + + /** + * Visibility of the group. The SHARABLE makes a group visible to other users and groups, and + * thus allows them to share objects. + */ + @JsonAdapter(VisibilityEnum.Adapter.class) + public enum VisibilityEnum { + SHARABLE("SHARABLE"), + + NON_SHARABLE("NON_SHARABLE"); + + private String value; + + VisibilityEnum(String value) { + this.value = value; + } + + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + public static VisibilityEnum fromValue(String value) { + for (VisibilityEnum b : VisibilityEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + + public static class Adapter extends TypeAdapter { + @Override + public void write(final JsonWriter jsonWriter, final VisibilityEnum enumeration) + throws IOException { + jsonWriter.value(enumeration.getValue()); + } + + @Override + public VisibilityEnum read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + return VisibilityEnum.fromValue(value); + } + } + + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + String value = jsonElement.getAsString(); + VisibilityEnum.fromValue(value); + } + } + + public static final String SERIALIZED_NAME_VISIBILITY = "visibility"; + + @SerializedName(SERIALIZED_NAME_VISIBILITY) + @javax.annotation.Nonnull + private VisibilityEnum visibility; + + public static final String SERIALIZED_NAME_ROLES = "roles"; + + @SerializedName(SERIALIZED_NAME_ROLES) + @javax.annotation.Nullable + private List roles; + + public UserGroupResponse() {} + + public UserGroupResponse authorId(@javax.annotation.Nullable String authorId) { + this.authorId = authorId; + return this; + } + + /** + * The unique identifier of the object + * + * @return authorId + */ + @javax.annotation.Nullable + public String getAuthorId() { + return authorId; + } + + public void setAuthorId(@javax.annotation.Nullable String authorId) { + this.authorId = authorId; + } + + public UserGroupResponse completeDetail(@javax.annotation.Nullable Boolean completeDetail) { + this.completeDetail = completeDetail; + return this; + } + + /** + * Indicates whether the response has complete detail of the group. + * + * @return completeDetail + */ + @javax.annotation.Nullable + public Boolean getCompleteDetail() { + return completeDetail; + } + + public void setCompleteDetail(@javax.annotation.Nullable Boolean completeDetail) { + this.completeDetail = completeDetail; + } + + public UserGroupResponse content(@javax.annotation.Nullable Object content) { + this.content = content; + return this; + } + + /** + * Content details of the group + * + * @return content + */ + @javax.annotation.Nullable + public Object getContent() { + return content; + } + + public void setContent(@javax.annotation.Nullable Object content) { + this.content = content; + } + + public UserGroupResponse creationTimeInMillis( + @javax.annotation.Nullable Float creationTimeInMillis) { + this.creationTimeInMillis = creationTimeInMillis; + return this; + } + + /** + * Creation time of the group in milliseconds + * + * @return creationTimeInMillis + */ + @javax.annotation.Nullable + public Float getCreationTimeInMillis() { + return creationTimeInMillis; + } + + public void setCreationTimeInMillis(@javax.annotation.Nullable Float creationTimeInMillis) { + this.creationTimeInMillis = creationTimeInMillis; + } + + public UserGroupResponse defaultLiveboards( + @javax.annotation.Nullable List defaultLiveboards) { + this.defaultLiveboards = defaultLiveboards; + return this; + } + + public UserGroupResponse addDefaultLiveboardsItem(UserGroup defaultLiveboardsItem) { + if (this.defaultLiveboards == null) { + this.defaultLiveboards = new ArrayList<>(); + } + this.defaultLiveboards.add(defaultLiveboardsItem); + return this; + } + + /** + * Liveboards that are assigned as default Liveboards to the group. + * + * @return defaultLiveboards + */ + @javax.annotation.Nullable + public List getDefaultLiveboards() { + return defaultLiveboards; + } + + public void setDefaultLiveboards(@javax.annotation.Nullable List defaultLiveboards) { + this.defaultLiveboards = defaultLiveboards; + } + + public UserGroupResponse deleted(@javax.annotation.Nullable Boolean deleted) { + this.deleted = deleted; + return this; + } + + /** + * Indicates whether the group is deleted + * + * @return deleted + */ + @javax.annotation.Nullable + public Boolean getDeleted() { + return deleted; + } + + public void setDeleted(@javax.annotation.Nullable Boolean deleted) { + this.deleted = deleted; + } + + public UserGroupResponse deprecated(@javax.annotation.Nullable Boolean deprecated) { + this.deprecated = deprecated; + return this; + } + + /** + * Indicates whether the group is deprecated + * + * @return deprecated + */ + @javax.annotation.Nullable + public Boolean getDeprecated() { + return deprecated; + } + + public void setDeprecated(@javax.annotation.Nullable Boolean deprecated) { + this.deprecated = deprecated; + } + + public UserGroupResponse description(@javax.annotation.Nullable String description) { + this.description = description; + return this; + } + + /** + * Description of the group + * + * @return description + */ + @javax.annotation.Nullable + public String getDescription() { + return description; + } + + public void setDescription(@javax.annotation.Nullable String description) { + this.description = description; + } + + public UserGroupResponse displayName(@javax.annotation.Nonnull String displayName) { + this.displayName = displayName; + return this; + } + + /** + * Display name of the group. + * + * @return displayName + */ + @javax.annotation.Nonnull + public String getDisplayName() { + return displayName; + } + + public void setDisplayName(@javax.annotation.Nonnull String displayName) { + this.displayName = displayName; + } + + public UserGroupResponse external(@javax.annotation.Nullable Boolean external) { + this.external = external; + return this; + } + + /** + * Indicates whether the group is external + * + * @return external + */ + @javax.annotation.Nullable + public Boolean getExternal() { + return external; + } + + public void setExternal(@javax.annotation.Nullable Boolean external) { + this.external = external; + } + + public UserGroupResponse generationNumber(@javax.annotation.Nullable Integer generationNumber) { + this.generationNumber = generationNumber; + return this; + } + + /** + * Generation number of the group + * + * @return generationNumber + */ + @javax.annotation.Nullable + public Integer getGenerationNumber() { + return generationNumber; + } + + public void setGenerationNumber(@javax.annotation.Nullable Integer generationNumber) { + this.generationNumber = generationNumber; + } + + public UserGroupResponse hidden(@javax.annotation.Nullable Boolean hidden) { + this.hidden = hidden; + return this; + } + + /** + * Indicates whether the group is hidden + * + * @return hidden + */ + @javax.annotation.Nullable + public Boolean getHidden() { + return hidden; + } + + public void setHidden(@javax.annotation.Nullable Boolean hidden) { + this.hidden = hidden; + } + + public UserGroupResponse id(@javax.annotation.Nonnull String id) { + this.id = id; + return this; + } + + /** + * The unique identifier of the object + * + * @return id + */ + @javax.annotation.Nonnull + public String getId() { + return id; + } + + public void setId(@javax.annotation.Nonnull String id) { + this.id = id; + } + + public UserGroupResponse index(@javax.annotation.Nullable Integer index) { + this.index = index; + return this; + } + + /** + * Index number of the group + * + * @return index + */ + @javax.annotation.Nullable + public Integer getIndex() { + return index; + } + + public void setIndex(@javax.annotation.Nullable Integer index) { + this.index = index; + } + + public UserGroupResponse indexVersion(@javax.annotation.Nullable Integer indexVersion) { + this.indexVersion = indexVersion; + return this; + } + + /** + * Index version number of the group + * + * @return indexVersion + */ + @javax.annotation.Nullable + public Integer getIndexVersion() { + return indexVersion; + } + + public void setIndexVersion(@javax.annotation.Nullable Integer indexVersion) { + this.indexVersion = indexVersion; + } + + public UserGroupResponse metadataVersion(@javax.annotation.Nullable Integer metadataVersion) { + this.metadataVersion = metadataVersion; + return this; + } + + /** + * Metadata version number of the group + * + * @return metadataVersion + */ + @javax.annotation.Nullable + public Integer getMetadataVersion() { + return metadataVersion; + } + + public void setMetadataVersion(@javax.annotation.Nullable Integer metadataVersion) { + this.metadataVersion = metadataVersion; + } + + public UserGroupResponse modificationTimeInMillis( + @javax.annotation.Nullable Float modificationTimeInMillis) { + this.modificationTimeInMillis = modificationTimeInMillis; + return this; + } + + /** + * Last modified time of the group in milliseconds. + * + * @return modificationTimeInMillis + */ + @javax.annotation.Nullable + public Float getModificationTimeInMillis() { + return modificationTimeInMillis; + } + + public void setModificationTimeInMillis( + @javax.annotation.Nullable Float modificationTimeInMillis) { + this.modificationTimeInMillis = modificationTimeInMillis; + } + + public UserGroupResponse modifierId(@javax.annotation.Nullable String modifierId) { + this.modifierId = modifierId; + return this; + } + + /** + * The unique identifier of the object + * + * @return modifierId + */ + @javax.annotation.Nullable + public String getModifierId() { + return modifierId; + } + + public void setModifierId(@javax.annotation.Nullable String modifierId) { + this.modifierId = modifierId; + } + + public UserGroupResponse name(@javax.annotation.Nonnull String name) { + this.name = name; + return this; + } + + /** + * Name of the group. + * + * @return name + */ + @javax.annotation.Nonnull + public String getName() { + return name; + } + + public void setName(@javax.annotation.Nonnull String name) { + this.name = name; + } + + public UserGroupResponse orgs(@javax.annotation.Nullable List orgs) { + this.orgs = orgs; + return this; + } + + public UserGroupResponse addOrgsItem(UserGroup orgsItem) { + if (this.orgs == null) { + this.orgs = new ArrayList<>(); + } + this.orgs.add(orgsItem); + return this; + } + + /** + * Orgs in which group exists. + * + * @return orgs + */ + @javax.annotation.Nullable + public List getOrgs() { + return orgs; + } + + public void setOrgs(@javax.annotation.Nullable List orgs) { + this.orgs = orgs; + } + + public UserGroupResponse ownerId(@javax.annotation.Nullable String ownerId) { + this.ownerId = ownerId; + return this; + } + + /** + * The unique identifier of the object + * + * @return ownerId + */ + @javax.annotation.Nullable + public String getOwnerId() { + return ownerId; + } + + public void setOwnerId(@javax.annotation.Nullable String ownerId) { + this.ownerId = ownerId; + } + + public UserGroupResponse parentType(@javax.annotation.Nullable ParentTypeEnum parentType) { + this.parentType = parentType; + return this; + } + + /** + * Parent type of the group. + * + * @return parentType + */ + @javax.annotation.Nullable + public ParentTypeEnum getParentType() { + return parentType; + } + + public void setParentType(@javax.annotation.Nullable ParentTypeEnum parentType) { + this.parentType = parentType; + } + + public UserGroupResponse privileges(@javax.annotation.Nullable List privileges) { + this.privileges = privileges; + return this; + } + + public UserGroupResponse addPrivilegesItem(String privilegesItem) { + if (this.privileges == null) { + this.privileges = new ArrayList<>(); + } + this.privileges.add(privilegesItem); + return this; + } + + /** + * Privileges which are assigned to the group + * + * @return privileges + */ + @javax.annotation.Nullable + public List getPrivileges() { + return privileges; + } + + public void setPrivileges(@javax.annotation.Nullable List privileges) { + this.privileges = privileges; + } + + public UserGroupResponse subGroups(@javax.annotation.Nullable List subGroups) { + this.subGroups = subGroups; + return this; + } + + public UserGroupResponse addSubGroupsItem(UserGroup subGroupsItem) { + if (this.subGroups == null) { + this.subGroups = new ArrayList<>(); + } + this.subGroups.add(subGroupsItem); + return this; + } + + /** + * Groups who are part of the group + * + * @return subGroups + */ + @javax.annotation.Nullable + public List getSubGroups() { + return subGroups; + } + + public void setSubGroups(@javax.annotation.Nullable List subGroups) { + this.subGroups = subGroups; + } + + public UserGroupResponse systemGroup(@javax.annotation.Nullable Boolean systemGroup) { + this.systemGroup = systemGroup; + return this; + } + + /** + * Indicates whether the group is a system group. + * + * @return systemGroup + */ + @javax.annotation.Nullable + public Boolean getSystemGroup() { + return systemGroup; + } + + public void setSystemGroup(@javax.annotation.Nullable Boolean systemGroup) { + this.systemGroup = systemGroup; + } + + public UserGroupResponse tags(@javax.annotation.Nullable List tags) { + this.tags = tags; + return this; + } + + public UserGroupResponse addTagsItem(UserGroup tagsItem) { + if (this.tags == null) { + this.tags = new ArrayList<>(); + } + this.tags.add(tagsItem); + return this; + } + + /** + * Tags associated with the group. + * + * @return tags + */ + @javax.annotation.Nullable + public List getTags() { + return tags; + } + + public void setTags(@javax.annotation.Nullable List tags) { + this.tags = tags; + } + + public UserGroupResponse type(@javax.annotation.Nullable TypeEnum type) { + this.type = type; + return this; + } + + /** + * Type of the group. + * + * @return type + */ + @javax.annotation.Nullable + public TypeEnum getType() { + return type; + } + + public void setType(@javax.annotation.Nullable TypeEnum type) { + this.type = type; + } + + public UserGroupResponse users(@javax.annotation.Nullable List users) { + this.users = users; + return this; + } + + public UserGroupResponse addUsersItem(UserGroup usersItem) { + if (this.users == null) { + this.users = new ArrayList<>(); + } + this.users.add(usersItem); + return this; + } + + /** + * Users who are part of the group. + * + * @return users + */ + @javax.annotation.Nullable + public List getUsers() { + return users; + } + + public void setUsers(@javax.annotation.Nullable List users) { + this.users = users; + } + + public UserGroupResponse visibility(@javax.annotation.Nonnull VisibilityEnum visibility) { + this.visibility = visibility; + return this; + } + + /** + * Visibility of the group. The SHARABLE makes a group visible to other users and groups, and + * thus allows them to share objects. + * + * @return visibility + */ + @javax.annotation.Nonnull + public VisibilityEnum getVisibility() { + return visibility; + } + + public void setVisibility(@javax.annotation.Nonnull VisibilityEnum visibility) { + this.visibility = visibility; + } + + public UserGroupResponse roles(@javax.annotation.Nullable List roles) { + this.roles = roles; + return this; + } + + public UserGroupResponse addRolesItem(Role rolesItem) { + if (this.roles == null) { + this.roles = new ArrayList<>(); + } + this.roles.add(rolesItem); + return this; + } + + /** + * List of roles assgined to the user + * + * @return roles + */ + @javax.annotation.Nullable + public List getRoles() { + return roles; + } + + public void setRoles(@javax.annotation.Nullable List roles) { + this.roles = roles; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key name of the property + * @param value value of the property + * @return the UserGroupResponse instance itself + */ + public UserGroupResponse putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return a map of objects + */ + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key name of the property + * @return an object + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + UserGroupResponse userGroupResponse = (UserGroupResponse) o; + return Objects.equals(this.authorId, userGroupResponse.authorId) + && Objects.equals(this.completeDetail, userGroupResponse.completeDetail) + && Objects.equals(this.content, userGroupResponse.content) + && Objects.equals(this.creationTimeInMillis, userGroupResponse.creationTimeInMillis) + && Objects.equals(this.defaultLiveboards, userGroupResponse.defaultLiveboards) + && Objects.equals(this.deleted, userGroupResponse.deleted) + && Objects.equals(this.deprecated, userGroupResponse.deprecated) + && Objects.equals(this.description, userGroupResponse.description) + && Objects.equals(this.displayName, userGroupResponse.displayName) + && Objects.equals(this.external, userGroupResponse.external) + && Objects.equals(this.generationNumber, userGroupResponse.generationNumber) + && Objects.equals(this.hidden, userGroupResponse.hidden) + && Objects.equals(this.id, userGroupResponse.id) + && Objects.equals(this.index, userGroupResponse.index) + && Objects.equals(this.indexVersion, userGroupResponse.indexVersion) + && Objects.equals(this.metadataVersion, userGroupResponse.metadataVersion) + && Objects.equals( + this.modificationTimeInMillis, userGroupResponse.modificationTimeInMillis) + && Objects.equals(this.modifierId, userGroupResponse.modifierId) + && Objects.equals(this.name, userGroupResponse.name) + && Objects.equals(this.orgs, userGroupResponse.orgs) + && Objects.equals(this.ownerId, userGroupResponse.ownerId) + && Objects.equals(this.parentType, userGroupResponse.parentType) + && Objects.equals(this.privileges, userGroupResponse.privileges) + && Objects.equals(this.subGroups, userGroupResponse.subGroups) + && Objects.equals(this.systemGroup, userGroupResponse.systemGroup) + && Objects.equals(this.tags, userGroupResponse.tags) + && Objects.equals(this.type, userGroupResponse.type) + && Objects.equals(this.users, userGroupResponse.users) + && Objects.equals(this.visibility, userGroupResponse.visibility) + && Objects.equals(this.roles, userGroupResponse.roles) + && Objects.equals( + this.additionalProperties, userGroupResponse.additionalProperties); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b + || (a != null + && b != null + && a.isPresent() + && b.isPresent() + && Objects.deepEquals(a.get(), b.get())); + } + + @Override + public int hashCode() { + return Objects.hash( + authorId, + completeDetail, + content, + creationTimeInMillis, + defaultLiveboards, + deleted, + deprecated, + description, + displayName, + external, + generationNumber, + hidden, + id, + index, + indexVersion, + metadataVersion, + modificationTimeInMillis, + modifierId, + name, + orgs, + ownerId, + parentType, + privileges, + subGroups, + systemGroup, + tags, + type, + users, + visibility, + roles, + additionalProperties); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; + } + return a.isPresent() ? Arrays.deepHashCode(new Object[] {a.get()}) : 31; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class UserGroupResponse {\n"); + sb.append(" authorId: ").append(toIndentedString(authorId)).append("\n"); + sb.append(" completeDetail: ").append(toIndentedString(completeDetail)).append("\n"); + sb.append(" content: ").append(toIndentedString(content)).append("\n"); + sb.append(" creationTimeInMillis: ") + .append(toIndentedString(creationTimeInMillis)) + .append("\n"); + sb.append(" defaultLiveboards: ") + .append(toIndentedString(defaultLiveboards)) + .append("\n"); + sb.append(" deleted: ").append(toIndentedString(deleted)).append("\n"); + sb.append(" deprecated: ").append(toIndentedString(deprecated)).append("\n"); + sb.append(" description: ").append(toIndentedString(description)).append("\n"); + sb.append(" displayName: ").append(toIndentedString(displayName)).append("\n"); + sb.append(" external: ").append(toIndentedString(external)).append("\n"); + sb.append(" generationNumber: ").append(toIndentedString(generationNumber)).append("\n"); + sb.append(" hidden: ").append(toIndentedString(hidden)).append("\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" index: ").append(toIndentedString(index)).append("\n"); + sb.append(" indexVersion: ").append(toIndentedString(indexVersion)).append("\n"); + sb.append(" metadataVersion: ").append(toIndentedString(metadataVersion)).append("\n"); + sb.append(" modificationTimeInMillis: ") + .append(toIndentedString(modificationTimeInMillis)) + .append("\n"); + sb.append(" modifierId: ").append(toIndentedString(modifierId)).append("\n"); + sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append(" orgs: ").append(toIndentedString(orgs)).append("\n"); + sb.append(" ownerId: ").append(toIndentedString(ownerId)).append("\n"); + sb.append(" parentType: ").append(toIndentedString(parentType)).append("\n"); + sb.append(" privileges: ").append(toIndentedString(privileges)).append("\n"); + sb.append(" subGroups: ").append(toIndentedString(subGroups)).append("\n"); + sb.append(" systemGroup: ").append(toIndentedString(systemGroup)).append("\n"); + sb.append(" tags: ").append(toIndentedString(tags)).append("\n"); + sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append(" users: ").append(toIndentedString(users)).append("\n"); + sb.append(" visibility: ").append(toIndentedString(visibility)).append("\n"); + sb.append(" roles: ").append(toIndentedString(roles)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first + * line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("author_id"); + openapiFields.add("complete_detail"); + openapiFields.add("content"); + openapiFields.add("creation_time_in_millis"); + openapiFields.add("default_liveboards"); + openapiFields.add("deleted"); + openapiFields.add("deprecated"); + openapiFields.add("description"); + openapiFields.add("display_name"); + openapiFields.add("external"); + openapiFields.add("generation_number"); + openapiFields.add("hidden"); + openapiFields.add("id"); + openapiFields.add("index"); + openapiFields.add("index_version"); + openapiFields.add("metadata_version"); + openapiFields.add("modification_time_in_millis"); + openapiFields.add("modifier_id"); + openapiFields.add("name"); + openapiFields.add("orgs"); + openapiFields.add("owner_id"); + openapiFields.add("parent_type"); + openapiFields.add("privileges"); + openapiFields.add("sub_groups"); + openapiFields.add("system_group"); + openapiFields.add("tags"); + openapiFields.add("type"); + openapiFields.add("users"); + openapiFields.add("visibility"); + openapiFields.add("roles"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + openapiRequiredFields.add("display_name"); + openapiRequiredFields.add("id"); + openapiRequiredFields.add("name"); + openapiRequiredFields.add("visibility"); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to UserGroupResponse + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!UserGroupResponse.openapiRequiredFields + .isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException( + String.format( + "The required field(s) %s in UserGroupResponse is not found in the" + + " empty JSON string", + UserGroupResponse.openapiRequiredFields.toString())); + } + } + + // check to make sure all required properties/fields are present in the JSON string + for (String requiredField : UserGroupResponse.openapiRequiredFields) { + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException( + String.format( + "The required field `%s` is not found in the JSON string: %s", + requiredField, jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if ((jsonObj.get("author_id") != null && !jsonObj.get("author_id").isJsonNull()) + && !jsonObj.get("author_id").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `author_id` to be a primitive type in the JSON" + + " string but got `%s`", + jsonObj.get("author_id").toString())); + } + if (jsonObj.get("default_liveboards") != null + && !jsonObj.get("default_liveboards").isJsonNull()) { + JsonArray jsonArraydefaultLiveboards = jsonObj.getAsJsonArray("default_liveboards"); + if (jsonArraydefaultLiveboards != null) { + // ensure the json data is an array + if (!jsonObj.get("default_liveboards").isJsonArray()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `default_liveboards` to be an array in the" + + " JSON string but got `%s`", + jsonObj.get("default_liveboards").toString())); + } + + // validate the optional field `default_liveboards` (array) + for (int i = 0; i < jsonArraydefaultLiveboards.size(); i++) { + UserGroup.validateJsonElement(jsonArraydefaultLiveboards.get(i)); + } + ; + } + } + if ((jsonObj.get("description") != null && !jsonObj.get("description").isJsonNull()) + && !jsonObj.get("description").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `description` to be a primitive type in the JSON" + + " string but got `%s`", + jsonObj.get("description").toString())); + } + if (!jsonObj.get("display_name").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `display_name` to be a primitive type in the JSON" + + " string but got `%s`", + jsonObj.get("display_name").toString())); + } + if (!jsonObj.get("id").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `id` to be a primitive type in the JSON string but" + + " got `%s`", + jsonObj.get("id").toString())); + } + if ((jsonObj.get("modifier_id") != null && !jsonObj.get("modifier_id").isJsonNull()) + && !jsonObj.get("modifier_id").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `modifier_id` to be a primitive type in the JSON" + + " string but got `%s`", + jsonObj.get("modifier_id").toString())); + } + if (!jsonObj.get("name").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `name` to be a primitive type in the JSON string" + + " but got `%s`", + jsonObj.get("name").toString())); + } + if (jsonObj.get("orgs") != null && !jsonObj.get("orgs").isJsonNull()) { + JsonArray jsonArrayorgs = jsonObj.getAsJsonArray("orgs"); + if (jsonArrayorgs != null) { + // ensure the json data is an array + if (!jsonObj.get("orgs").isJsonArray()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `orgs` to be an array in the JSON string" + + " but got `%s`", + jsonObj.get("orgs").toString())); + } + + // validate the optional field `orgs` (array) + for (int i = 0; i < jsonArrayorgs.size(); i++) { + UserGroup.validateJsonElement(jsonArrayorgs.get(i)); + } + ; + } + } + if ((jsonObj.get("owner_id") != null && !jsonObj.get("owner_id").isJsonNull()) + && !jsonObj.get("owner_id").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `owner_id` to be a primitive type in the JSON" + + " string but got `%s`", + jsonObj.get("owner_id").toString())); + } + if ((jsonObj.get("parent_type") != null && !jsonObj.get("parent_type").isJsonNull()) + && !jsonObj.get("parent_type").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `parent_type` to be a primitive type in the JSON" + + " string but got `%s`", + jsonObj.get("parent_type").toString())); + } + // validate the optional field `parent_type` + if (jsonObj.get("parent_type") != null && !jsonObj.get("parent_type").isJsonNull()) { + ParentTypeEnum.validateJsonElement(jsonObj.get("parent_type")); + } + // ensure the optional json data is an array if present + if (jsonObj.get("privileges") != null + && !jsonObj.get("privileges").isJsonNull() + && !jsonObj.get("privileges").isJsonArray()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `privileges` to be an array in the JSON string but" + + " got `%s`", + jsonObj.get("privileges").toString())); + } + if (jsonObj.get("sub_groups") != null && !jsonObj.get("sub_groups").isJsonNull()) { + JsonArray jsonArraysubGroups = jsonObj.getAsJsonArray("sub_groups"); + if (jsonArraysubGroups != null) { + // ensure the json data is an array + if (!jsonObj.get("sub_groups").isJsonArray()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `sub_groups` to be an array in the JSON" + + " string but got `%s`", + jsonObj.get("sub_groups").toString())); + } + + // validate the optional field `sub_groups` (array) + for (int i = 0; i < jsonArraysubGroups.size(); i++) { + UserGroup.validateJsonElement(jsonArraysubGroups.get(i)); + } + ; + } + } + if (jsonObj.get("tags") != null && !jsonObj.get("tags").isJsonNull()) { + JsonArray jsonArraytags = jsonObj.getAsJsonArray("tags"); + if (jsonArraytags != null) { + // ensure the json data is an array + if (!jsonObj.get("tags").isJsonArray()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `tags` to be an array in the JSON string" + + " but got `%s`", + jsonObj.get("tags").toString())); + } + + // validate the optional field `tags` (array) + for (int i = 0; i < jsonArraytags.size(); i++) { + UserGroup.validateJsonElement(jsonArraytags.get(i)); + } + ; + } + } + if ((jsonObj.get("type") != null && !jsonObj.get("type").isJsonNull()) + && !jsonObj.get("type").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `type` to be a primitive type in the JSON string" + + " but got `%s`", + jsonObj.get("type").toString())); + } + // validate the optional field `type` + if (jsonObj.get("type") != null && !jsonObj.get("type").isJsonNull()) { + TypeEnum.validateJsonElement(jsonObj.get("type")); + } + if (jsonObj.get("users") != null && !jsonObj.get("users").isJsonNull()) { + JsonArray jsonArrayusers = jsonObj.getAsJsonArray("users"); + if (jsonArrayusers != null) { + // ensure the json data is an array + if (!jsonObj.get("users").isJsonArray()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `users` to be an array in the JSON string" + + " but got `%s`", + jsonObj.get("users").toString())); + } + + // validate the optional field `users` (array) + for (int i = 0; i < jsonArrayusers.size(); i++) { + UserGroup.validateJsonElement(jsonArrayusers.get(i)); + } + ; + } + } + if (!jsonObj.get("visibility").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `visibility` to be a primitive type in the JSON" + + " string but got `%s`", + jsonObj.get("visibility").toString())); + } + // validate the required field `visibility` + VisibilityEnum.validateJsonElement(jsonObj.get("visibility")); + if (jsonObj.get("roles") != null && !jsonObj.get("roles").isJsonNull()) { + JsonArray jsonArrayroles = jsonObj.getAsJsonArray("roles"); + if (jsonArrayroles != null) { + // ensure the json data is an array + if (!jsonObj.get("roles").isJsonArray()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `roles` to be an array in the JSON string" + + " but got `%s`", + jsonObj.get("roles").toString())); + } + + // validate the optional field `roles` (array) + for (int i = 0; i < jsonArrayroles.size(); i++) { + Role.validateJsonElement(jsonArrayroles.get(i)); + } + ; + } + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!UserGroupResponse.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'UserGroupResponse' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter = + gson.getDelegateAdapter(this, TypeToken.get(UserGroupResponse.class)); + + return (TypeAdapter) + new TypeAdapter() { + @Override + public void write(JsonWriter out, UserGroupResponse value) + throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + obj.remove("additionalProperties"); + // serialize additional properties + if (value.getAdditionalProperties() != null) { + for (Map.Entry entry : + value.getAdditionalProperties().entrySet()) { + if (entry.getValue() instanceof String) + obj.addProperty(entry.getKey(), (String) entry.getValue()); + else if (entry.getValue() instanceof Number) + obj.addProperty(entry.getKey(), (Number) entry.getValue()); + else if (entry.getValue() instanceof Boolean) + obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); + else if (entry.getValue() instanceof Character) + obj.addProperty( + entry.getKey(), (Character) entry.getValue()); + else { + JsonElement jsonElement = gson.toJsonTree(entry.getValue()); + if (jsonElement.isJsonArray()) { + obj.add(entry.getKey(), jsonElement.getAsJsonArray()); + } else { + obj.add(entry.getKey(), jsonElement.getAsJsonObject()); + } + } + } + } + elementAdapter.write(out, obj); + } + + @Override + public UserGroupResponse read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // store additional fields in the deserialized instance + UserGroupResponse instance = thisAdapter.fromJsonTree(jsonObj); + for (Map.Entry entry : jsonObj.entrySet()) { + if (!openapiFields.contains(entry.getKey())) { + if (entry.getValue().isJsonPrimitive()) { // primitive type + if (entry.getValue().getAsJsonPrimitive().isString()) + instance.putAdditionalProperty( + entry.getKey(), entry.getValue().getAsString()); + else if (entry.getValue().getAsJsonPrimitive().isNumber()) + instance.putAdditionalProperty( + entry.getKey(), entry.getValue().getAsNumber()); + else if (entry.getValue().getAsJsonPrimitive().isBoolean()) + instance.putAdditionalProperty( + entry.getKey(), + entry.getValue().getAsBoolean()); + else + throw new IllegalArgumentException( + String.format( + "The field `%s` has unknown primitive" + + " type. Value: %s", + entry.getKey(), + entry.getValue().toString())); + } else if (entry.getValue().isJsonArray()) { + instance.putAdditionalProperty( + entry.getKey(), + gson.fromJson(entry.getValue(), List.class)); + } else { // JSON object + instance.putAdditionalProperty( + entry.getKey(), + gson.fromJson(entry.getValue(), HashMap.class)); + } + } + } + return instance; + } + }.nullSafe(); + } + } + + /** + * Create an instance of UserGroupResponse given an JSON string + * + * @param jsonString JSON string + * @return An instance of UserGroupResponse + * @throws IOException if the JSON string is invalid with respect to UserGroupResponse + */ + public static UserGroupResponse fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, UserGroupResponse.class); + } + + /** + * Convert an instance of UserGroupResponse to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} diff --git a/sdks/java/src/main/java/com/thoughtspot/client/model/UserInfo.java b/sdks/java/src/main/java/com/thoughtspot/client/model/UserInfo.java new file mode 100644 index 000000000..5c7fcc880 --- /dev/null +++ b/sdks/java/src/main/java/com/thoughtspot/client/model/UserInfo.java @@ -0,0 +1,354 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client.model; + +import com.google.gson.Gson; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.TypeAdapter; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.annotations.SerializedName; +import com.google.gson.reflect.TypeToken; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import com.thoughtspot.client.JSON; +import java.io.IOException; +import java.io.Serializable; +import java.util.Arrays; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Objects; +import org.openapitools.jackson.nullable.JsonNullable; + +/** UserInfo */ +@javax.annotation.Generated( + value = "org.openapitools.codegen.languages.JavaClientCodegen", + comments = "Generator version: 7.12.0") +public class UserInfo implements Serializable { + private static final long serialVersionUID = 1L; + + public static final String SERIALIZED_NAME_ID = "id"; + + @SerializedName(SERIALIZED_NAME_ID) + @javax.annotation.Nonnull + private String id; + + public static final String SERIALIZED_NAME_NAME = "name"; + + @SerializedName(SERIALIZED_NAME_NAME) + @javax.annotation.Nullable + private String name; + + public UserInfo() {} + + public UserInfo id(@javax.annotation.Nonnull String id) { + this.id = id; + return this; + } + + /** + * Id. + * + * @return id + */ + @javax.annotation.Nonnull + public String getId() { + return id; + } + + public void setId(@javax.annotation.Nonnull String id) { + this.id = id; + } + + public UserInfo name(@javax.annotation.Nullable String name) { + this.name = name; + return this; + } + + /** + * Name. + * + * @return name + */ + @javax.annotation.Nullable + public String getName() { + return name; + } + + public void setName(@javax.annotation.Nullable String name) { + this.name = name; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key name of the property + * @param value value of the property + * @return the UserInfo instance itself + */ + public UserInfo putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return a map of objects + */ + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key name of the property + * @return an object + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + UserInfo userInfo = (UserInfo) o; + return Objects.equals(this.id, userInfo.id) + && Objects.equals(this.name, userInfo.name) + && Objects.equals(this.additionalProperties, userInfo.additionalProperties); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b + || (a != null + && b != null + && a.isPresent() + && b.isPresent() + && Objects.deepEquals(a.get(), b.get())); + } + + @Override + public int hashCode() { + return Objects.hash(id, name, additionalProperties); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; + } + return a.isPresent() ? Arrays.deepHashCode(new Object[] {a.get()}) : 31; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class UserInfo {\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first + * line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("id"); + openapiFields.add("name"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + openapiRequiredFields.add("id"); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to UserInfo + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!UserInfo.openapiRequiredFields + .isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException( + String.format( + "The required field(s) %s in UserInfo is not found in the empty" + + " JSON string", + UserInfo.openapiRequiredFields.toString())); + } + } + + // check to make sure all required properties/fields are present in the JSON string + for (String requiredField : UserInfo.openapiRequiredFields) { + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException( + String.format( + "The required field `%s` is not found in the JSON string: %s", + requiredField, jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if (!jsonObj.get("id").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `id` to be a primitive type in the JSON string but" + + " got `%s`", + jsonObj.get("id").toString())); + } + if ((jsonObj.get("name") != null && !jsonObj.get("name").isJsonNull()) + && !jsonObj.get("name").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `name` to be a primitive type in the JSON string" + + " but got `%s`", + jsonObj.get("name").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!UserInfo.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'UserInfo' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter = + gson.getDelegateAdapter(this, TypeToken.get(UserInfo.class)); + + return (TypeAdapter) + new TypeAdapter() { + @Override + public void write(JsonWriter out, UserInfo value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + obj.remove("additionalProperties"); + // serialize additional properties + if (value.getAdditionalProperties() != null) { + for (Map.Entry entry : + value.getAdditionalProperties().entrySet()) { + if (entry.getValue() instanceof String) + obj.addProperty(entry.getKey(), (String) entry.getValue()); + else if (entry.getValue() instanceof Number) + obj.addProperty(entry.getKey(), (Number) entry.getValue()); + else if (entry.getValue() instanceof Boolean) + obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); + else if (entry.getValue() instanceof Character) + obj.addProperty( + entry.getKey(), (Character) entry.getValue()); + else { + JsonElement jsonElement = gson.toJsonTree(entry.getValue()); + if (jsonElement.isJsonArray()) { + obj.add(entry.getKey(), jsonElement.getAsJsonArray()); + } else { + obj.add(entry.getKey(), jsonElement.getAsJsonObject()); + } + } + } + } + elementAdapter.write(out, obj); + } + + @Override + public UserInfo read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // store additional fields in the deserialized instance + UserInfo instance = thisAdapter.fromJsonTree(jsonObj); + for (Map.Entry entry : jsonObj.entrySet()) { + if (!openapiFields.contains(entry.getKey())) { + if (entry.getValue().isJsonPrimitive()) { // primitive type + if (entry.getValue().getAsJsonPrimitive().isString()) + instance.putAdditionalProperty( + entry.getKey(), entry.getValue().getAsString()); + else if (entry.getValue().getAsJsonPrimitive().isNumber()) + instance.putAdditionalProperty( + entry.getKey(), entry.getValue().getAsNumber()); + else if (entry.getValue().getAsJsonPrimitive().isBoolean()) + instance.putAdditionalProperty( + entry.getKey(), + entry.getValue().getAsBoolean()); + else + throw new IllegalArgumentException( + String.format( + "The field `%s` has unknown primitive" + + " type. Value: %s", + entry.getKey(), + entry.getValue().toString())); + } else if (entry.getValue().isJsonArray()) { + instance.putAdditionalProperty( + entry.getKey(), + gson.fromJson(entry.getValue(), List.class)); + } else { // JSON object + instance.putAdditionalProperty( + entry.getKey(), + gson.fromJson(entry.getValue(), HashMap.class)); + } + } + } + return instance; + } + }.nullSafe(); + } + } + + /** + * Create an instance of UserInfo given an JSON string + * + * @param jsonString JSON string + * @return An instance of UserInfo + * @throws IOException if the JSON string is invalid with respect to UserInfo + */ + public static UserInfo fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, UserInfo.class); + } + + /** + * Convert an instance of UserInfo to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} diff --git a/sdks/java/src/main/java/com/thoughtspot/client/model/UserObject.java b/sdks/java/src/main/java/com/thoughtspot/client/model/UserObject.java new file mode 100644 index 000000000..465fdc5ab --- /dev/null +++ b/sdks/java/src/main/java/com/thoughtspot/client/model/UserObject.java @@ -0,0 +1,414 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client.model; + +import com.google.gson.Gson; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.TypeAdapter; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.reflect.TypeToken; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import com.thoughtspot.client.JSON; +import java.io.IOException; +import java.io.Serializable; +import java.util.Arrays; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Objects; +import org.openapitools.jackson.nullable.JsonNullable; + +/** Objects to apply the User_Object. */ +@javax.annotation.Generated( + value = "org.openapitools.codegen.languages.JavaClientCodegen", + comments = "Generator version: 7.12.0") +public class UserObject implements Serializable { + private static final long serialVersionUID = 1L; + + /** + * Type of object. Required if the name of the object is set as the identifier. This attribute + * is optional when the object GUID is specified as the identifier. Specify the object type as + * `LOGICAL_TABLE`. + */ + @JsonAdapter(TypeEnum.Adapter.class) + public enum TypeEnum { + LOGICAL_TABLE("LOGICAL_TABLE"); + + private String value; + + TypeEnum(String value) { + this.value = value; + } + + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + public static TypeEnum fromValue(String value) { + for (TypeEnum b : TypeEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + return null; + } + + public static class Adapter extends TypeAdapter { + @Override + public void write(final JsonWriter jsonWriter, final TypeEnum enumeration) + throws IOException { + jsonWriter.value(enumeration.getValue()); + } + + @Override + public TypeEnum read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + return TypeEnum.fromValue(value); + } + } + + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + String value = jsonElement.getAsString(); + TypeEnum.fromValue(value); + } + } + + public static final String SERIALIZED_NAME_TYPE = "type"; + + @SerializedName(SERIALIZED_NAME_TYPE) + @javax.annotation.Nullable + private TypeEnum type; + + public static final String SERIALIZED_NAME_IDENTIFIER = "identifier"; + + @SerializedName(SERIALIZED_NAME_IDENTIFIER) + @javax.annotation.Nonnull + private String identifier; + + public UserObject() {} + + public UserObject type(@javax.annotation.Nullable TypeEnum type) { + this.type = type; + return this; + } + + /** + * Type of object. Required if the name of the object is set as the identifier. This attribute + * is optional when the object GUID is specified as the identifier. Specify the object type as + * `LOGICAL_TABLE`. + * + * @return type + */ + @javax.annotation.Nullable + public TypeEnum getType() { + return type; + } + + public void setType(@javax.annotation.Nullable TypeEnum type) { + this.type = type; + } + + public UserObject identifier(@javax.annotation.Nonnull String identifier) { + this.identifier = identifier; + return this; + } + + /** + * Unique name/id of the object. + * + * @return identifier + */ + @javax.annotation.Nonnull + public String getIdentifier() { + return identifier; + } + + public void setIdentifier(@javax.annotation.Nonnull String identifier) { + this.identifier = identifier; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key name of the property + * @param value value of the property + * @return the UserObject instance itself + */ + public UserObject putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return a map of objects + */ + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key name of the property + * @return an object + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + UserObject userObject = (UserObject) o; + return Objects.equals(this.type, userObject.type) + && Objects.equals(this.identifier, userObject.identifier) + && Objects.equals(this.additionalProperties, userObject.additionalProperties); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b + || (a != null + && b != null + && a.isPresent() + && b.isPresent() + && Objects.deepEquals(a.get(), b.get())); + } + + @Override + public int hashCode() { + return Objects.hash(type, identifier, additionalProperties); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; + } + return a.isPresent() ? Arrays.deepHashCode(new Object[] {a.get()}) : 31; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class UserObject {\n"); + sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append(" identifier: ").append(toIndentedString(identifier)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first + * line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("type"); + openapiFields.add("identifier"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + openapiRequiredFields.add("identifier"); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to UserObject + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!UserObject.openapiRequiredFields + .isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException( + String.format( + "The required field(s) %s in UserObject is not found in the empty" + + " JSON string", + UserObject.openapiRequiredFields.toString())); + } + } + + // check to make sure all required properties/fields are present in the JSON string + for (String requiredField : UserObject.openapiRequiredFields) { + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException( + String.format( + "The required field `%s` is not found in the JSON string: %s", + requiredField, jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if ((jsonObj.get("type") != null && !jsonObj.get("type").isJsonNull()) + && !jsonObj.get("type").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `type` to be a primitive type in the JSON string" + + " but got `%s`", + jsonObj.get("type").toString())); + } + // validate the optional field `type` + if (jsonObj.get("type") != null && !jsonObj.get("type").isJsonNull()) { + TypeEnum.validateJsonElement(jsonObj.get("type")); + } + if (!jsonObj.get("identifier").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `identifier` to be a primitive type in the JSON" + + " string but got `%s`", + jsonObj.get("identifier").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!UserObject.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'UserObject' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter = + gson.getDelegateAdapter(this, TypeToken.get(UserObject.class)); + + return (TypeAdapter) + new TypeAdapter() { + @Override + public void write(JsonWriter out, UserObject value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + obj.remove("additionalProperties"); + // serialize additional properties + if (value.getAdditionalProperties() != null) { + for (Map.Entry entry : + value.getAdditionalProperties().entrySet()) { + if (entry.getValue() instanceof String) + obj.addProperty(entry.getKey(), (String) entry.getValue()); + else if (entry.getValue() instanceof Number) + obj.addProperty(entry.getKey(), (Number) entry.getValue()); + else if (entry.getValue() instanceof Boolean) + obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); + else if (entry.getValue() instanceof Character) + obj.addProperty( + entry.getKey(), (Character) entry.getValue()); + else { + JsonElement jsonElement = gson.toJsonTree(entry.getValue()); + if (jsonElement.isJsonArray()) { + obj.add(entry.getKey(), jsonElement.getAsJsonArray()); + } else { + obj.add(entry.getKey(), jsonElement.getAsJsonObject()); + } + } + } + } + elementAdapter.write(out, obj); + } + + @Override + public UserObject read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // store additional fields in the deserialized instance + UserObject instance = thisAdapter.fromJsonTree(jsonObj); + for (Map.Entry entry : jsonObj.entrySet()) { + if (!openapiFields.contains(entry.getKey())) { + if (entry.getValue().isJsonPrimitive()) { // primitive type + if (entry.getValue().getAsJsonPrimitive().isString()) + instance.putAdditionalProperty( + entry.getKey(), entry.getValue().getAsString()); + else if (entry.getValue().getAsJsonPrimitive().isNumber()) + instance.putAdditionalProperty( + entry.getKey(), entry.getValue().getAsNumber()); + else if (entry.getValue().getAsJsonPrimitive().isBoolean()) + instance.putAdditionalProperty( + entry.getKey(), + entry.getValue().getAsBoolean()); + else + throw new IllegalArgumentException( + String.format( + "The field `%s` has unknown primitive" + + " type. Value: %s", + entry.getKey(), + entry.getValue().toString())); + } else if (entry.getValue().isJsonArray()) { + instance.putAdditionalProperty( + entry.getKey(), + gson.fromJson(entry.getValue(), List.class)); + } else { // JSON object + instance.putAdditionalProperty( + entry.getKey(), + gson.fromJson(entry.getValue(), HashMap.class)); + } + } + } + return instance; + } + }.nullSafe(); + } + } + + /** + * Create an instance of UserObject given an JSON string + * + * @param jsonString JSON string + * @return An instance of UserObject + * @throws IOException if the JSON string is invalid with respect to UserObject + */ + public static UserObject fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, UserObject.class); + } + + /** + * Convert an instance of UserObject to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} diff --git a/sdks/java/src/main/java/com/thoughtspot/client/model/UserParameterOptions.java b/sdks/java/src/main/java/com/thoughtspot/client/model/UserParameterOptions.java new file mode 100644 index 000000000..72013c3ea --- /dev/null +++ b/sdks/java/src/main/java/com/thoughtspot/client/model/UserParameterOptions.java @@ -0,0 +1,512 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client.model; + +import com.google.gson.Gson; +import com.google.gson.JsonArray; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.TypeAdapter; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.annotations.SerializedName; +import com.google.gson.reflect.TypeToken; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import com.thoughtspot.client.JSON; +import java.io.IOException; +import java.io.Serializable; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Objects; +import org.openapitools.jackson.nullable.JsonNullable; + +/** + * Define attributes such as Runtime filters and Runtime parameters to send security entitlements to + * a user session. For more information, see + * [Documentation](https://developers.thoughtspot.com/docs/abac-user-parameters). + */ +@javax.annotation.Generated( + value = "org.openapitools.codegen.languages.JavaClientCodegen", + comments = "Generator version: 7.12.0") +public class UserParameterOptions implements Serializable { + private static final long serialVersionUID = 1L; + + public static final String SERIALIZED_NAME_OBJECTS = "objects"; + + @SerializedName(SERIALIZED_NAME_OBJECTS) + @javax.annotation.Nullable + private List objects; + + public static final String SERIALIZED_NAME_RUNTIME_FILTERS = "runtime_filters"; + + @SerializedName(SERIALIZED_NAME_RUNTIME_FILTERS) + @javax.annotation.Nullable + private List runtimeFilters; + + public static final String SERIALIZED_NAME_RUNTIME_SORTS = "runtime_sorts"; + + @SerializedName(SERIALIZED_NAME_RUNTIME_SORTS) + @javax.annotation.Nullable + private List runtimeSorts; + + public static final String SERIALIZED_NAME_PARAMETERS = "parameters"; + + @SerializedName(SERIALIZED_NAME_PARAMETERS) + @javax.annotation.Nullable + private List parameters; + + public UserParameterOptions() {} + + public UserParameterOptions objects(@javax.annotation.Nullable List objects) { + this.objects = objects; + return this; + } + + public UserParameterOptions addObjectsItem(UserObject objectsItem) { + if (this.objects == null) { + this.objects = new ArrayList<>(); + } + this.objects.add(objectsItem); + return this; + } + + /** + * Get objects + * + * @return objects + */ + @javax.annotation.Nullable + public List getObjects() { + return objects; + } + + public void setObjects(@javax.annotation.Nullable List objects) { + this.objects = objects; + } + + public UserParameterOptions runtimeFilters( + @javax.annotation.Nullable List runtimeFilters) { + this.runtimeFilters = runtimeFilters; + return this; + } + + public UserParameterOptions addRuntimeFiltersItem(RuntimeFilters runtimeFiltersItem) { + if (this.runtimeFilters == null) { + this.runtimeFilters = new ArrayList<>(); + } + this.runtimeFilters.add(runtimeFiltersItem); + return this; + } + + /** + * Objects to apply the User_Runtime_Filters. Examples to set the `runtime_filters` : + * ```json { \"column_name\": \"Color\", + * \"operator\": \"EQ\", \"values\": [\"red\"], + * \"persist\": false } ``` + * + * @return runtimeFilters + */ + @javax.annotation.Nullable + public List getRuntimeFilters() { + return runtimeFilters; + } + + public void setRuntimeFilters(@javax.annotation.Nullable List runtimeFilters) { + this.runtimeFilters = runtimeFilters; + } + + public UserParameterOptions runtimeSorts( + @javax.annotation.Nullable List runtimeSorts) { + this.runtimeSorts = runtimeSorts; + return this; + } + + public UserParameterOptions addRuntimeSortsItem(RuntimeSorts runtimeSortsItem) { + if (this.runtimeSorts == null) { + this.runtimeSorts = new ArrayList<>(); + } + this.runtimeSorts.add(runtimeSortsItem); + return this; + } + + /** + * Objects to apply the User_Runtime_Sorts. Examples to set the `runtime_sorts` : + * ```json { \"column_name\": \"Color\", \"order\": + * \"ASC\", \"persist\": false } ``` + * + * @return runtimeSorts + */ + @javax.annotation.Nullable + public List getRuntimeSorts() { + return runtimeSorts; + } + + public void setRuntimeSorts(@javax.annotation.Nullable List runtimeSorts) { + this.runtimeSorts = runtimeSorts; + } + + public UserParameterOptions parameters( + @javax.annotation.Nullable List parameters) { + this.parameters = parameters; + return this; + } + + public UserParameterOptions addParametersItem(RuntimeParameters parametersItem) { + if (this.parameters == null) { + this.parameters = new ArrayList<>(); + } + this.parameters.add(parametersItem); + return this; + } + + /** + * Objects to apply the Runtime_Parameters. Examples to set the `parameters` : + * ```json { \"name\": \"Color\", \"values\": + * [\"Blue\"], \"persist\": false } ``` + * + * @return parameters + */ + @javax.annotation.Nullable + public List getParameters() { + return parameters; + } + + public void setParameters(@javax.annotation.Nullable List parameters) { + this.parameters = parameters; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key name of the property + * @param value value of the property + * @return the UserParameterOptions instance itself + */ + public UserParameterOptions putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return a map of objects + */ + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key name of the property + * @return an object + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + UserParameterOptions userParameterOptions = (UserParameterOptions) o; + return Objects.equals(this.objects, userParameterOptions.objects) + && Objects.equals(this.runtimeFilters, userParameterOptions.runtimeFilters) + && Objects.equals(this.runtimeSorts, userParameterOptions.runtimeSorts) + && Objects.equals(this.parameters, userParameterOptions.parameters) + && Objects.equals( + this.additionalProperties, userParameterOptions.additionalProperties); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b + || (a != null + && b != null + && a.isPresent() + && b.isPresent() + && Objects.deepEquals(a.get(), b.get())); + } + + @Override + public int hashCode() { + return Objects.hash( + objects, runtimeFilters, runtimeSorts, parameters, additionalProperties); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; + } + return a.isPresent() ? Arrays.deepHashCode(new Object[] {a.get()}) : 31; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class UserParameterOptions {\n"); + sb.append(" objects: ").append(toIndentedString(objects)).append("\n"); + sb.append(" runtimeFilters: ").append(toIndentedString(runtimeFilters)).append("\n"); + sb.append(" runtimeSorts: ").append(toIndentedString(runtimeSorts)).append("\n"); + sb.append(" parameters: ").append(toIndentedString(parameters)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first + * line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("objects"); + openapiFields.add("runtime_filters"); + openapiFields.add("runtime_sorts"); + openapiFields.add("parameters"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to UserParameterOptions + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!UserParameterOptions.openapiRequiredFields + .isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException( + String.format( + "The required field(s) %s in UserParameterOptions is not found in" + + " the empty JSON string", + UserParameterOptions.openapiRequiredFields.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if (jsonObj.get("objects") != null && !jsonObj.get("objects").isJsonNull()) { + JsonArray jsonArrayobjects = jsonObj.getAsJsonArray("objects"); + if (jsonArrayobjects != null) { + // ensure the json data is an array + if (!jsonObj.get("objects").isJsonArray()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `objects` to be an array in the JSON" + + " string but got `%s`", + jsonObj.get("objects").toString())); + } + + // validate the optional field `objects` (array) + for (int i = 0; i < jsonArrayobjects.size(); i++) { + UserObject.validateJsonElement(jsonArrayobjects.get(i)); + } + ; + } + } + if (jsonObj.get("runtime_filters") != null + && !jsonObj.get("runtime_filters").isJsonNull()) { + JsonArray jsonArrayruntimeFilters = jsonObj.getAsJsonArray("runtime_filters"); + if (jsonArrayruntimeFilters != null) { + // ensure the json data is an array + if (!jsonObj.get("runtime_filters").isJsonArray()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `runtime_filters` to be an array in the" + + " JSON string but got `%s`", + jsonObj.get("runtime_filters").toString())); + } + + // validate the optional field `runtime_filters` (array) + for (int i = 0; i < jsonArrayruntimeFilters.size(); i++) { + RuntimeFilters.validateJsonElement(jsonArrayruntimeFilters.get(i)); + } + ; + } + } + if (jsonObj.get("runtime_sorts") != null && !jsonObj.get("runtime_sorts").isJsonNull()) { + JsonArray jsonArrayruntimeSorts = jsonObj.getAsJsonArray("runtime_sorts"); + if (jsonArrayruntimeSorts != null) { + // ensure the json data is an array + if (!jsonObj.get("runtime_sorts").isJsonArray()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `runtime_sorts` to be an array in the JSON" + + " string but got `%s`", + jsonObj.get("runtime_sorts").toString())); + } + + // validate the optional field `runtime_sorts` (array) + for (int i = 0; i < jsonArrayruntimeSorts.size(); i++) { + RuntimeSorts.validateJsonElement(jsonArrayruntimeSorts.get(i)); + } + ; + } + } + if (jsonObj.get("parameters") != null && !jsonObj.get("parameters").isJsonNull()) { + JsonArray jsonArrayparameters = jsonObj.getAsJsonArray("parameters"); + if (jsonArrayparameters != null) { + // ensure the json data is an array + if (!jsonObj.get("parameters").isJsonArray()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `parameters` to be an array in the JSON" + + " string but got `%s`", + jsonObj.get("parameters").toString())); + } + + // validate the optional field `parameters` (array) + for (int i = 0; i < jsonArrayparameters.size(); i++) { + RuntimeParameters.validateJsonElement(jsonArrayparameters.get(i)); + } + ; + } + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!UserParameterOptions.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'UserParameterOptions' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter = + gson.getDelegateAdapter(this, TypeToken.get(UserParameterOptions.class)); + + return (TypeAdapter) + new TypeAdapter() { + @Override + public void write(JsonWriter out, UserParameterOptions value) + throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + obj.remove("additionalProperties"); + // serialize additional properties + if (value.getAdditionalProperties() != null) { + for (Map.Entry entry : + value.getAdditionalProperties().entrySet()) { + if (entry.getValue() instanceof String) + obj.addProperty(entry.getKey(), (String) entry.getValue()); + else if (entry.getValue() instanceof Number) + obj.addProperty(entry.getKey(), (Number) entry.getValue()); + else if (entry.getValue() instanceof Boolean) + obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); + else if (entry.getValue() instanceof Character) + obj.addProperty( + entry.getKey(), (Character) entry.getValue()); + else { + JsonElement jsonElement = gson.toJsonTree(entry.getValue()); + if (jsonElement.isJsonArray()) { + obj.add(entry.getKey(), jsonElement.getAsJsonArray()); + } else { + obj.add(entry.getKey(), jsonElement.getAsJsonObject()); + } + } + } + } + elementAdapter.write(out, obj); + } + + @Override + public UserParameterOptions read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // store additional fields in the deserialized instance + UserParameterOptions instance = thisAdapter.fromJsonTree(jsonObj); + for (Map.Entry entry : jsonObj.entrySet()) { + if (!openapiFields.contains(entry.getKey())) { + if (entry.getValue().isJsonPrimitive()) { // primitive type + if (entry.getValue().getAsJsonPrimitive().isString()) + instance.putAdditionalProperty( + entry.getKey(), entry.getValue().getAsString()); + else if (entry.getValue().getAsJsonPrimitive().isNumber()) + instance.putAdditionalProperty( + entry.getKey(), entry.getValue().getAsNumber()); + else if (entry.getValue().getAsJsonPrimitive().isBoolean()) + instance.putAdditionalProperty( + entry.getKey(), + entry.getValue().getAsBoolean()); + else + throw new IllegalArgumentException( + String.format( + "The field `%s` has unknown primitive" + + " type. Value: %s", + entry.getKey(), + entry.getValue().toString())); + } else if (entry.getValue().isJsonArray()) { + instance.putAdditionalProperty( + entry.getKey(), + gson.fromJson(entry.getValue(), List.class)); + } else { // JSON object + instance.putAdditionalProperty( + entry.getKey(), + gson.fromJson(entry.getValue(), HashMap.class)); + } + } + } + return instance; + } + }.nullSafe(); + } + } + + /** + * Create an instance of UserParameterOptions given an JSON string + * + * @param jsonString JSON string + * @return An instance of UserParameterOptions + * @throws IOException if the JSON string is invalid with respect to UserParameterOptions + */ + public static UserParameterOptions fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, UserParameterOptions.class); + } + + /** + * Convert an instance of UserParameterOptions to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} diff --git a/sdks/java/src/main/java/com/thoughtspot/client/model/UserPrincipal.java b/sdks/java/src/main/java/com/thoughtspot/client/model/UserPrincipal.java new file mode 100644 index 000000000..0b3a9e7bb --- /dev/null +++ b/sdks/java/src/main/java/com/thoughtspot/client/model/UserPrincipal.java @@ -0,0 +1,380 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client.model; + +import com.google.gson.Gson; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.TypeAdapter; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.annotations.SerializedName; +import com.google.gson.reflect.TypeToken; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import com.thoughtspot.client.JSON; +import java.io.IOException; +import java.io.Serializable; +import java.util.Arrays; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Objects; +import org.openapitools.jackson.nullable.JsonNullable; + +/** UserPrincipal */ +@javax.annotation.Generated( + value = "org.openapitools.codegen.languages.JavaClientCodegen", + comments = "Generator version: 7.12.0") +public class UserPrincipal implements Serializable { + private static final long serialVersionUID = 1L; + + public static final String SERIALIZED_NAME_ID = "id"; + + @SerializedName(SERIALIZED_NAME_ID) + @javax.annotation.Nullable + private String id; + + public static final String SERIALIZED_NAME_NAME = "name"; + + @SerializedName(SERIALIZED_NAME_NAME) + @javax.annotation.Nullable + private String name; + + public static final String SERIALIZED_NAME_TYPE = "type"; + + @SerializedName(SERIALIZED_NAME_TYPE) + @javax.annotation.Nullable + private String type; + + public UserPrincipal() {} + + public UserPrincipal id(@javax.annotation.Nullable String id) { + this.id = id; + return this; + } + + /** + * Get id + * + * @return id + */ + @javax.annotation.Nullable + public String getId() { + return id; + } + + public void setId(@javax.annotation.Nullable String id) { + this.id = id; + } + + public UserPrincipal name(@javax.annotation.Nullable String name) { + this.name = name; + return this; + } + + /** + * Get name + * + * @return name + */ + @javax.annotation.Nullable + public String getName() { + return name; + } + + public void setName(@javax.annotation.Nullable String name) { + this.name = name; + } + + public UserPrincipal type(@javax.annotation.Nullable String type) { + this.type = type; + return this; + } + + /** + * Get type + * + * @return type + */ + @javax.annotation.Nullable + public String getType() { + return type; + } + + public void setType(@javax.annotation.Nullable String type) { + this.type = type; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key name of the property + * @param value value of the property + * @return the UserPrincipal instance itself + */ + public UserPrincipal putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return a map of objects + */ + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key name of the property + * @return an object + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + UserPrincipal userPrincipal = (UserPrincipal) o; + return Objects.equals(this.id, userPrincipal.id) + && Objects.equals(this.name, userPrincipal.name) + && Objects.equals(this.type, userPrincipal.type) + && Objects.equals(this.additionalProperties, userPrincipal.additionalProperties); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b + || (a != null + && b != null + && a.isPresent() + && b.isPresent() + && Objects.deepEquals(a.get(), b.get())); + } + + @Override + public int hashCode() { + return Objects.hash(id, name, type, additionalProperties); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; + } + return a.isPresent() ? Arrays.deepHashCode(new Object[] {a.get()}) : 31; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class UserPrincipal {\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first + * line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("id"); + openapiFields.add("name"); + openapiFields.add("type"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to UserPrincipal + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!UserPrincipal.openapiRequiredFields + .isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException( + String.format( + "The required field(s) %s in UserPrincipal is not found in the" + + " empty JSON string", + UserPrincipal.openapiRequiredFields.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if ((jsonObj.get("id") != null && !jsonObj.get("id").isJsonNull()) + && !jsonObj.get("id").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `id` to be a primitive type in the JSON string but" + + " got `%s`", + jsonObj.get("id").toString())); + } + if ((jsonObj.get("name") != null && !jsonObj.get("name").isJsonNull()) + && !jsonObj.get("name").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `name` to be a primitive type in the JSON string" + + " but got `%s`", + jsonObj.get("name").toString())); + } + if ((jsonObj.get("type") != null && !jsonObj.get("type").isJsonNull()) + && !jsonObj.get("type").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `type` to be a primitive type in the JSON string" + + " but got `%s`", + jsonObj.get("type").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!UserPrincipal.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'UserPrincipal' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter = + gson.getDelegateAdapter(this, TypeToken.get(UserPrincipal.class)); + + return (TypeAdapter) + new TypeAdapter() { + @Override + public void write(JsonWriter out, UserPrincipal value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + obj.remove("additionalProperties"); + // serialize additional properties + if (value.getAdditionalProperties() != null) { + for (Map.Entry entry : + value.getAdditionalProperties().entrySet()) { + if (entry.getValue() instanceof String) + obj.addProperty(entry.getKey(), (String) entry.getValue()); + else if (entry.getValue() instanceof Number) + obj.addProperty(entry.getKey(), (Number) entry.getValue()); + else if (entry.getValue() instanceof Boolean) + obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); + else if (entry.getValue() instanceof Character) + obj.addProperty( + entry.getKey(), (Character) entry.getValue()); + else { + JsonElement jsonElement = gson.toJsonTree(entry.getValue()); + if (jsonElement.isJsonArray()) { + obj.add(entry.getKey(), jsonElement.getAsJsonArray()); + } else { + obj.add(entry.getKey(), jsonElement.getAsJsonObject()); + } + } + } + } + elementAdapter.write(out, obj); + } + + @Override + public UserPrincipal read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // store additional fields in the deserialized instance + UserPrincipal instance = thisAdapter.fromJsonTree(jsonObj); + for (Map.Entry entry : jsonObj.entrySet()) { + if (!openapiFields.contains(entry.getKey())) { + if (entry.getValue().isJsonPrimitive()) { // primitive type + if (entry.getValue().getAsJsonPrimitive().isString()) + instance.putAdditionalProperty( + entry.getKey(), entry.getValue().getAsString()); + else if (entry.getValue().getAsJsonPrimitive().isNumber()) + instance.putAdditionalProperty( + entry.getKey(), entry.getValue().getAsNumber()); + else if (entry.getValue().getAsJsonPrimitive().isBoolean()) + instance.putAdditionalProperty( + entry.getKey(), + entry.getValue().getAsBoolean()); + else + throw new IllegalArgumentException( + String.format( + "The field `%s` has unknown primitive" + + " type. Value: %s", + entry.getKey(), + entry.getValue().toString())); + } else if (entry.getValue().isJsonArray()) { + instance.putAdditionalProperty( + entry.getKey(), + gson.fromJson(entry.getValue(), List.class)); + } else { // JSON object + instance.putAdditionalProperty( + entry.getKey(), + gson.fromJson(entry.getValue(), HashMap.class)); + } + } + } + return instance; + } + }.nullSafe(); + } + } + + /** + * Create an instance of UserPrincipal given an JSON string + * + * @param jsonString JSON string + * @return An instance of UserPrincipal + * @throws IOException if the JSON string is invalid with respect to UserPrincipal + */ + public static UserPrincipal fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, UserPrincipal.class); + } + + /** + * Convert an instance of UserPrincipal to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} diff --git a/sdks/java/src/main/java/com/thoughtspot/client/model/ValidateCommunicationChannelRequest.java b/sdks/java/src/main/java/com/thoughtspot/client/model/ValidateCommunicationChannelRequest.java new file mode 100644 index 000000000..3e15171af --- /dev/null +++ b/sdks/java/src/main/java/com/thoughtspot/client/model/ValidateCommunicationChannelRequest.java @@ -0,0 +1,494 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client.model; + +import com.google.gson.Gson; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.TypeAdapter; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.reflect.TypeToken; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import com.thoughtspot.client.JSON; +import java.io.IOException; +import java.io.Serializable; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Objects; + +/** ValidateCommunicationChannelRequest */ +@javax.annotation.Generated( + value = "org.openapitools.codegen.languages.JavaClientCodegen", + comments = "Generator version: 7.12.0") +public class ValidateCommunicationChannelRequest implements Serializable { + private static final long serialVersionUID = 1L; + + /** Type of communication channel to validate (e.g., WEBHOOK). */ + @JsonAdapter(ChannelTypeEnum.Adapter.class) + public enum ChannelTypeEnum { + WEBHOOK("WEBHOOK"); + + private String value; + + ChannelTypeEnum(String value) { + this.value = value; + } + + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + public static ChannelTypeEnum fromValue(String value) { + for (ChannelTypeEnum b : ChannelTypeEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + + public static class Adapter extends TypeAdapter { + @Override + public void write(final JsonWriter jsonWriter, final ChannelTypeEnum enumeration) + throws IOException { + jsonWriter.value(enumeration.getValue()); + } + + @Override + public ChannelTypeEnum read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + return ChannelTypeEnum.fromValue(value); + } + } + + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + String value = jsonElement.getAsString(); + ChannelTypeEnum.fromValue(value); + } + } + + public static final String SERIALIZED_NAME_CHANNEL_TYPE = "channel_type"; + + @SerializedName(SERIALIZED_NAME_CHANNEL_TYPE) + @javax.annotation.Nonnull + private ChannelTypeEnum channelType; + + public static final String SERIALIZED_NAME_CHANNEL_IDENTIFIER = "channel_identifier"; + + @SerializedName(SERIALIZED_NAME_CHANNEL_IDENTIFIER) + @javax.annotation.Nonnull + private String channelIdentifier; + + /** Event type to validate for this channel. */ + @JsonAdapter(EventTypeEnum.Adapter.class) + public enum EventTypeEnum { + LIVEBOARD_SCHEDULE("LIVEBOARD_SCHEDULE"); + + private String value; + + EventTypeEnum(String value) { + this.value = value; + } + + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + public static EventTypeEnum fromValue(String value) { + for (EventTypeEnum b : EventTypeEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + + public static class Adapter extends TypeAdapter { + @Override + public void write(final JsonWriter jsonWriter, final EventTypeEnum enumeration) + throws IOException { + jsonWriter.value(enumeration.getValue()); + } + + @Override + public EventTypeEnum read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + return EventTypeEnum.fromValue(value); + } + } + + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + String value = jsonElement.getAsString(); + EventTypeEnum.fromValue(value); + } + } + + public static final String SERIALIZED_NAME_EVENT_TYPE = "event_type"; + + @SerializedName(SERIALIZED_NAME_EVENT_TYPE) + @javax.annotation.Nonnull + private EventTypeEnum eventType; + + public ValidateCommunicationChannelRequest() {} + + public ValidateCommunicationChannelRequest channelType( + @javax.annotation.Nonnull ChannelTypeEnum channelType) { + this.channelType = channelType; + return this; + } + + /** + * Type of communication channel to validate (e.g., WEBHOOK). + * + * @return channelType + */ + @javax.annotation.Nonnull + public ChannelTypeEnum getChannelType() { + return channelType; + } + + public void setChannelType(@javax.annotation.Nonnull ChannelTypeEnum channelType) { + this.channelType = channelType; + } + + public ValidateCommunicationChannelRequest channelIdentifier( + @javax.annotation.Nonnull String channelIdentifier) { + this.channelIdentifier = channelIdentifier; + return this; + } + + /** + * Unique identifier or name for the communication channel. + * + * @return channelIdentifier + */ + @javax.annotation.Nonnull + public String getChannelIdentifier() { + return channelIdentifier; + } + + public void setChannelIdentifier(@javax.annotation.Nonnull String channelIdentifier) { + this.channelIdentifier = channelIdentifier; + } + + public ValidateCommunicationChannelRequest eventType( + @javax.annotation.Nonnull EventTypeEnum eventType) { + this.eventType = eventType; + return this; + } + + /** + * Event type to validate for this channel. + * + * @return eventType + */ + @javax.annotation.Nonnull + public EventTypeEnum getEventType() { + return eventType; + } + + public void setEventType(@javax.annotation.Nonnull EventTypeEnum eventType) { + this.eventType = eventType; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key name of the property + * @param value value of the property + * @return the ValidateCommunicationChannelRequest instance itself + */ + public ValidateCommunicationChannelRequest putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return a map of objects + */ + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key name of the property + * @return an object + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ValidateCommunicationChannelRequest validateCommunicationChannelRequest = + (ValidateCommunicationChannelRequest) o; + return Objects.equals(this.channelType, validateCommunicationChannelRequest.channelType) + && Objects.equals( + this.channelIdentifier, + validateCommunicationChannelRequest.channelIdentifier) + && Objects.equals(this.eventType, validateCommunicationChannelRequest.eventType) + && Objects.equals( + this.additionalProperties, + validateCommunicationChannelRequest.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(channelType, channelIdentifier, eventType, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ValidateCommunicationChannelRequest {\n"); + sb.append(" channelType: ").append(toIndentedString(channelType)).append("\n"); + sb.append(" channelIdentifier: ") + .append(toIndentedString(channelIdentifier)) + .append("\n"); + sb.append(" eventType: ").append(toIndentedString(eventType)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first + * line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("channel_type"); + openapiFields.add("channel_identifier"); + openapiFields.add("event_type"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + openapiRequiredFields.add("channel_type"); + openapiRequiredFields.add("channel_identifier"); + openapiRequiredFields.add("event_type"); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to + * ValidateCommunicationChannelRequest + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!ValidateCommunicationChannelRequest.openapiRequiredFields + .isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException( + String.format( + "The required field(s) %s in ValidateCommunicationChannelRequest" + + " is not found in the empty JSON string", + ValidateCommunicationChannelRequest.openapiRequiredFields + .toString())); + } + } + + // check to make sure all required properties/fields are present in the JSON string + for (String requiredField : ValidateCommunicationChannelRequest.openapiRequiredFields) { + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException( + String.format( + "The required field `%s` is not found in the JSON string: %s", + requiredField, jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if (!jsonObj.get("channel_type").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `channel_type` to be a primitive type in the JSON" + + " string but got `%s`", + jsonObj.get("channel_type").toString())); + } + // validate the required field `channel_type` + ChannelTypeEnum.validateJsonElement(jsonObj.get("channel_type")); + if (!jsonObj.get("channel_identifier").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `channel_identifier` to be a primitive type in the" + + " JSON string but got `%s`", + jsonObj.get("channel_identifier").toString())); + } + if (!jsonObj.get("event_type").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `event_type` to be a primitive type in the JSON" + + " string but got `%s`", + jsonObj.get("event_type").toString())); + } + // validate the required field `event_type` + EventTypeEnum.validateJsonElement(jsonObj.get("event_type")); + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!ValidateCommunicationChannelRequest.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'ValidateCommunicationChannelRequest' and + // its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter = + gson.getDelegateAdapter( + this, TypeToken.get(ValidateCommunicationChannelRequest.class)); + + return (TypeAdapter) + new TypeAdapter() { + @Override + public void write(JsonWriter out, ValidateCommunicationChannelRequest value) + throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + obj.remove("additionalProperties"); + // serialize additional properties + if (value.getAdditionalProperties() != null) { + for (Map.Entry entry : + value.getAdditionalProperties().entrySet()) { + if (entry.getValue() instanceof String) + obj.addProperty(entry.getKey(), (String) entry.getValue()); + else if (entry.getValue() instanceof Number) + obj.addProperty(entry.getKey(), (Number) entry.getValue()); + else if (entry.getValue() instanceof Boolean) + obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); + else if (entry.getValue() instanceof Character) + obj.addProperty( + entry.getKey(), (Character) entry.getValue()); + else { + JsonElement jsonElement = gson.toJsonTree(entry.getValue()); + if (jsonElement.isJsonArray()) { + obj.add(entry.getKey(), jsonElement.getAsJsonArray()); + } else { + obj.add(entry.getKey(), jsonElement.getAsJsonObject()); + } + } + } + } + elementAdapter.write(out, obj); + } + + @Override + public ValidateCommunicationChannelRequest read(JsonReader in) + throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // store additional fields in the deserialized instance + ValidateCommunicationChannelRequest instance = + thisAdapter.fromJsonTree(jsonObj); + for (Map.Entry entry : jsonObj.entrySet()) { + if (!openapiFields.contains(entry.getKey())) { + if (entry.getValue().isJsonPrimitive()) { // primitive type + if (entry.getValue().getAsJsonPrimitive().isString()) + instance.putAdditionalProperty( + entry.getKey(), entry.getValue().getAsString()); + else if (entry.getValue().getAsJsonPrimitive().isNumber()) + instance.putAdditionalProperty( + entry.getKey(), entry.getValue().getAsNumber()); + else if (entry.getValue().getAsJsonPrimitive().isBoolean()) + instance.putAdditionalProperty( + entry.getKey(), + entry.getValue().getAsBoolean()); + else + throw new IllegalArgumentException( + String.format( + "The field `%s` has unknown primitive" + + " type. Value: %s", + entry.getKey(), + entry.getValue().toString())); + } else if (entry.getValue().isJsonArray()) { + instance.putAdditionalProperty( + entry.getKey(), + gson.fromJson(entry.getValue(), List.class)); + } else { // JSON object + instance.putAdditionalProperty( + entry.getKey(), + gson.fromJson(entry.getValue(), HashMap.class)); + } + } + } + return instance; + } + }.nullSafe(); + } + } + + /** + * Create an instance of ValidateCommunicationChannelRequest given an JSON string + * + * @param jsonString JSON string + * @return An instance of ValidateCommunicationChannelRequest + * @throws IOException if the JSON string is invalid with respect to + * ValidateCommunicationChannelRequest + */ + public static ValidateCommunicationChannelRequest fromJson(String jsonString) + throws IOException { + return JSON.getGson().fromJson(jsonString, ValidateCommunicationChannelRequest.class); + } + + /** + * Convert an instance of ValidateCommunicationChannelRequest to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} diff --git a/sdks/java/src/main/java/com/thoughtspot/client/model/ValidateMergeRequest.java b/sdks/java/src/main/java/com/thoughtspot/client/model/ValidateMergeRequest.java new file mode 100644 index 000000000..039c89758 --- /dev/null +++ b/sdks/java/src/main/java/com/thoughtspot/client/model/ValidateMergeRequest.java @@ -0,0 +1,340 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client.model; + +import com.google.gson.Gson; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.TypeAdapter; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.annotations.SerializedName; +import com.google.gson.reflect.TypeToken; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import com.thoughtspot.client.JSON; +import java.io.IOException; +import java.io.Serializable; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Objects; + +/** ValidateMergeRequest */ +@javax.annotation.Generated( + value = "org.openapitools.codegen.languages.JavaClientCodegen", + comments = "Generator version: 7.12.0") +public class ValidateMergeRequest implements Serializable { + private static final long serialVersionUID = 1L; + + public static final String SERIALIZED_NAME_SOURCE_BRANCH_NAME = "source_branch_name"; + + @SerializedName(SERIALIZED_NAME_SOURCE_BRANCH_NAME) + @javax.annotation.Nonnull + private String sourceBranchName; + + public static final String SERIALIZED_NAME_TARGET_BRANCH_NAME = "target_branch_name"; + + @SerializedName(SERIALIZED_NAME_TARGET_BRANCH_NAME) + @javax.annotation.Nonnull + private String targetBranchName; + + public ValidateMergeRequest() {} + + public ValidateMergeRequest sourceBranchName( + @javax.annotation.Nonnull String sourceBranchName) { + this.sourceBranchName = sourceBranchName; + return this; + } + + /** + * Name of the branch from which changes need to be picked for validation + * + * @return sourceBranchName + */ + @javax.annotation.Nonnull + public String getSourceBranchName() { + return sourceBranchName; + } + + public void setSourceBranchName(@javax.annotation.Nonnull String sourceBranchName) { + this.sourceBranchName = sourceBranchName; + } + + public ValidateMergeRequest targetBranchName( + @javax.annotation.Nonnull String targetBranchName) { + this.targetBranchName = targetBranchName; + return this; + } + + /** + * Name of the branch where files will be merged + * + * @return targetBranchName + */ + @javax.annotation.Nonnull + public String getTargetBranchName() { + return targetBranchName; + } + + public void setTargetBranchName(@javax.annotation.Nonnull String targetBranchName) { + this.targetBranchName = targetBranchName; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key name of the property + * @param value value of the property + * @return the ValidateMergeRequest instance itself + */ + public ValidateMergeRequest putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return a map of objects + */ + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key name of the property + * @return an object + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ValidateMergeRequest validateMergeRequest = (ValidateMergeRequest) o; + return Objects.equals(this.sourceBranchName, validateMergeRequest.sourceBranchName) + && Objects.equals(this.targetBranchName, validateMergeRequest.targetBranchName) + && Objects.equals( + this.additionalProperties, validateMergeRequest.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(sourceBranchName, targetBranchName, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ValidateMergeRequest {\n"); + sb.append(" sourceBranchName: ").append(toIndentedString(sourceBranchName)).append("\n"); + sb.append(" targetBranchName: ").append(toIndentedString(targetBranchName)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first + * line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("source_branch_name"); + openapiFields.add("target_branch_name"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + openapiRequiredFields.add("source_branch_name"); + openapiRequiredFields.add("target_branch_name"); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to ValidateMergeRequest + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!ValidateMergeRequest.openapiRequiredFields + .isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException( + String.format( + "The required field(s) %s in ValidateMergeRequest is not found in" + + " the empty JSON string", + ValidateMergeRequest.openapiRequiredFields.toString())); + } + } + + // check to make sure all required properties/fields are present in the JSON string + for (String requiredField : ValidateMergeRequest.openapiRequiredFields) { + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException( + String.format( + "The required field `%s` is not found in the JSON string: %s", + requiredField, jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if (!jsonObj.get("source_branch_name").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `source_branch_name` to be a primitive type in the" + + " JSON string but got `%s`", + jsonObj.get("source_branch_name").toString())); + } + if (!jsonObj.get("target_branch_name").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `target_branch_name` to be a primitive type in the" + + " JSON string but got `%s`", + jsonObj.get("target_branch_name").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!ValidateMergeRequest.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'ValidateMergeRequest' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter = + gson.getDelegateAdapter(this, TypeToken.get(ValidateMergeRequest.class)); + + return (TypeAdapter) + new TypeAdapter() { + @Override + public void write(JsonWriter out, ValidateMergeRequest value) + throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + obj.remove("additionalProperties"); + // serialize additional properties + if (value.getAdditionalProperties() != null) { + for (Map.Entry entry : + value.getAdditionalProperties().entrySet()) { + if (entry.getValue() instanceof String) + obj.addProperty(entry.getKey(), (String) entry.getValue()); + else if (entry.getValue() instanceof Number) + obj.addProperty(entry.getKey(), (Number) entry.getValue()); + else if (entry.getValue() instanceof Boolean) + obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); + else if (entry.getValue() instanceof Character) + obj.addProperty( + entry.getKey(), (Character) entry.getValue()); + else { + JsonElement jsonElement = gson.toJsonTree(entry.getValue()); + if (jsonElement.isJsonArray()) { + obj.add(entry.getKey(), jsonElement.getAsJsonArray()); + } else { + obj.add(entry.getKey(), jsonElement.getAsJsonObject()); + } + } + } + } + elementAdapter.write(out, obj); + } + + @Override + public ValidateMergeRequest read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // store additional fields in the deserialized instance + ValidateMergeRequest instance = thisAdapter.fromJsonTree(jsonObj); + for (Map.Entry entry : jsonObj.entrySet()) { + if (!openapiFields.contains(entry.getKey())) { + if (entry.getValue().isJsonPrimitive()) { // primitive type + if (entry.getValue().getAsJsonPrimitive().isString()) + instance.putAdditionalProperty( + entry.getKey(), entry.getValue().getAsString()); + else if (entry.getValue().getAsJsonPrimitive().isNumber()) + instance.putAdditionalProperty( + entry.getKey(), entry.getValue().getAsNumber()); + else if (entry.getValue().getAsJsonPrimitive().isBoolean()) + instance.putAdditionalProperty( + entry.getKey(), + entry.getValue().getAsBoolean()); + else + throw new IllegalArgumentException( + String.format( + "The field `%s` has unknown primitive" + + " type. Value: %s", + entry.getKey(), + entry.getValue().toString())); + } else if (entry.getValue().isJsonArray()) { + instance.putAdditionalProperty( + entry.getKey(), + gson.fromJson(entry.getValue(), List.class)); + } else { // JSON object + instance.putAdditionalProperty( + entry.getKey(), + gson.fromJson(entry.getValue(), HashMap.class)); + } + } + } + return instance; + } + }.nullSafe(); + } + } + + /** + * Create an instance of ValidateMergeRequest given an JSON string + * + * @param jsonString JSON string + * @return An instance of ValidateMergeRequest + * @throws IOException if the JSON string is invalid with respect to ValidateMergeRequest + */ + public static ValidateMergeRequest fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, ValidateMergeRequest.class); + } + + /** + * Convert an instance of ValidateMergeRequest to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} diff --git a/sdks/java/src/main/java/com/thoughtspot/client/model/ValidateTokenRequest.java b/sdks/java/src/main/java/com/thoughtspot/client/model/ValidateTokenRequest.java new file mode 100644 index 000000000..980ca87aa --- /dev/null +++ b/sdks/java/src/main/java/com/thoughtspot/client/model/ValidateTokenRequest.java @@ -0,0 +1,302 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client.model; + +import com.google.gson.Gson; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.TypeAdapter; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.annotations.SerializedName; +import com.google.gson.reflect.TypeToken; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import com.thoughtspot.client.JSON; +import java.io.IOException; +import java.io.Serializable; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Objects; + +/** ValidateTokenRequest */ +@javax.annotation.Generated( + value = "org.openapitools.codegen.languages.JavaClientCodegen", + comments = "Generator version: 7.12.0") +public class ValidateTokenRequest implements Serializable { + private static final long serialVersionUID = 1L; + + public static final String SERIALIZED_NAME_TOKEN = "token"; + + @SerializedName(SERIALIZED_NAME_TOKEN) + @javax.annotation.Nonnull + private String token; + + public ValidateTokenRequest() {} + + public ValidateTokenRequest token(@javax.annotation.Nonnull String token) { + this.token = token; + return this; + } + + /** + * Get token + * + * @return token + */ + @javax.annotation.Nonnull + public String getToken() { + return token; + } + + public void setToken(@javax.annotation.Nonnull String token) { + this.token = token; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key name of the property + * @param value value of the property + * @return the ValidateTokenRequest instance itself + */ + public ValidateTokenRequest putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return a map of objects + */ + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key name of the property + * @return an object + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ValidateTokenRequest validateTokenRequest = (ValidateTokenRequest) o; + return Objects.equals(this.token, validateTokenRequest.token) + && Objects.equals( + this.additionalProperties, validateTokenRequest.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(token, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ValidateTokenRequest {\n"); + sb.append(" token: ").append(toIndentedString(token)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first + * line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("token"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + openapiRequiredFields.add("token"); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to ValidateTokenRequest + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!ValidateTokenRequest.openapiRequiredFields + .isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException( + String.format( + "The required field(s) %s in ValidateTokenRequest is not found in" + + " the empty JSON string", + ValidateTokenRequest.openapiRequiredFields.toString())); + } + } + + // check to make sure all required properties/fields are present in the JSON string + for (String requiredField : ValidateTokenRequest.openapiRequiredFields) { + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException( + String.format( + "The required field `%s` is not found in the JSON string: %s", + requiredField, jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if (!jsonObj.get("token").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `token` to be a primitive type in the JSON string" + + " but got `%s`", + jsonObj.get("token").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!ValidateTokenRequest.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'ValidateTokenRequest' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter = + gson.getDelegateAdapter(this, TypeToken.get(ValidateTokenRequest.class)); + + return (TypeAdapter) + new TypeAdapter() { + @Override + public void write(JsonWriter out, ValidateTokenRequest value) + throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + obj.remove("additionalProperties"); + // serialize additional properties + if (value.getAdditionalProperties() != null) { + for (Map.Entry entry : + value.getAdditionalProperties().entrySet()) { + if (entry.getValue() instanceof String) + obj.addProperty(entry.getKey(), (String) entry.getValue()); + else if (entry.getValue() instanceof Number) + obj.addProperty(entry.getKey(), (Number) entry.getValue()); + else if (entry.getValue() instanceof Boolean) + obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); + else if (entry.getValue() instanceof Character) + obj.addProperty( + entry.getKey(), (Character) entry.getValue()); + else { + JsonElement jsonElement = gson.toJsonTree(entry.getValue()); + if (jsonElement.isJsonArray()) { + obj.add(entry.getKey(), jsonElement.getAsJsonArray()); + } else { + obj.add(entry.getKey(), jsonElement.getAsJsonObject()); + } + } + } + } + elementAdapter.write(out, obj); + } + + @Override + public ValidateTokenRequest read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // store additional fields in the deserialized instance + ValidateTokenRequest instance = thisAdapter.fromJsonTree(jsonObj); + for (Map.Entry entry : jsonObj.entrySet()) { + if (!openapiFields.contains(entry.getKey())) { + if (entry.getValue().isJsonPrimitive()) { // primitive type + if (entry.getValue().getAsJsonPrimitive().isString()) + instance.putAdditionalProperty( + entry.getKey(), entry.getValue().getAsString()); + else if (entry.getValue().getAsJsonPrimitive().isNumber()) + instance.putAdditionalProperty( + entry.getKey(), entry.getValue().getAsNumber()); + else if (entry.getValue().getAsJsonPrimitive().isBoolean()) + instance.putAdditionalProperty( + entry.getKey(), + entry.getValue().getAsBoolean()); + else + throw new IllegalArgumentException( + String.format( + "The field `%s` has unknown primitive" + + " type. Value: %s", + entry.getKey(), + entry.getValue().toString())); + } else if (entry.getValue().isJsonArray()) { + instance.putAdditionalProperty( + entry.getKey(), + gson.fromJson(entry.getValue(), List.class)); + } else { // JSON object + instance.putAdditionalProperty( + entry.getKey(), + gson.fromJson(entry.getValue(), HashMap.class)); + } + } + } + return instance; + } + }.nullSafe(); + } + } + + /** + * Create an instance of ValidateTokenRequest given an JSON string + * + * @param jsonString JSON string + * @return An instance of ValidateTokenRequest + * @throws IOException if the JSON string is invalid with respect to ValidateTokenRequest + */ + public static ValidateTokenRequest fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, ValidateTokenRequest.class); + } + + /** + * Convert an instance of ValidateTokenRequest to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} diff --git a/sdks/java/src/main/java/com/thoughtspot/client/model/ValueScopeInput.java b/sdks/java/src/main/java/com/thoughtspot/client/model/ValueScopeInput.java new file mode 100644 index 000000000..5c64684d1 --- /dev/null +++ b/sdks/java/src/main/java/com/thoughtspot/client/model/ValueScopeInput.java @@ -0,0 +1,488 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client.model; + +import com.google.gson.Gson; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.TypeAdapter; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.reflect.TypeToken; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import com.thoughtspot.client.JSON; +import java.io.IOException; +import java.io.Serializable; +import java.util.Arrays; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Objects; +import org.openapitools.jackson.nullable.JsonNullable; + +/** Input for filtering variable values by scope in search operations */ +@javax.annotation.Generated( + value = "org.openapitools.codegen.languages.JavaClientCodegen", + comments = "Generator version: 7.12.0") +public class ValueScopeInput implements Serializable { + private static final long serialVersionUID = 1L; + + public static final String SERIALIZED_NAME_ORG_IDENTIFIER = "org_identifier"; + + @SerializedName(SERIALIZED_NAME_ORG_IDENTIFIER) + @javax.annotation.Nullable + private String orgIdentifier; + + /** + * Type of principal to filter by. Use USER to filter values assigned to specific users, or + * USER_GROUP to filter values assigned to groups. + */ + @JsonAdapter(PrincipalTypeEnum.Adapter.class) + public enum PrincipalTypeEnum { + USER("USER"), + + USER_GROUP("USER_GROUP"); + + private String value; + + PrincipalTypeEnum(String value) { + this.value = value; + } + + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + public static PrincipalTypeEnum fromValue(String value) { + for (PrincipalTypeEnum b : PrincipalTypeEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + return null; + } + + public static class Adapter extends TypeAdapter { + @Override + public void write(final JsonWriter jsonWriter, final PrincipalTypeEnum enumeration) + throws IOException { + jsonWriter.value(enumeration.getValue()); + } + + @Override + public PrincipalTypeEnum read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + return PrincipalTypeEnum.fromValue(value); + } + } + + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + String value = jsonElement.getAsString(); + PrincipalTypeEnum.fromValue(value); + } + } + + public static final String SERIALIZED_NAME_PRINCIPAL_TYPE = "principal_type"; + + @SerializedName(SERIALIZED_NAME_PRINCIPAL_TYPE) + @javax.annotation.Nullable + private PrincipalTypeEnum principalType; + + public static final String SERIALIZED_NAME_PRINCIPAL_IDENTIFIER = "principal_identifier"; + + @SerializedName(SERIALIZED_NAME_PRINCIPAL_IDENTIFIER) + @javax.annotation.Nullable + private String principalIdentifier; + + public static final String SERIALIZED_NAME_MODEL_IDENTIFIER = "model_identifier"; + + @SerializedName(SERIALIZED_NAME_MODEL_IDENTIFIER) + @javax.annotation.Nullable + private String modelIdentifier; + + public ValueScopeInput() {} + + public ValueScopeInput orgIdentifier(@javax.annotation.Nullable String orgIdentifier) { + this.orgIdentifier = orgIdentifier; + return this; + } + + /** + * The unique name of the org + * + * @return orgIdentifier + */ + @javax.annotation.Nullable + public String getOrgIdentifier() { + return orgIdentifier; + } + + public void setOrgIdentifier(@javax.annotation.Nullable String orgIdentifier) { + this.orgIdentifier = orgIdentifier; + } + + public ValueScopeInput principalType( + @javax.annotation.Nullable PrincipalTypeEnum principalType) { + this.principalType = principalType; + return this; + } + + /** + * Type of principal to filter by. Use USER to filter values assigned to specific users, or + * USER_GROUP to filter values assigned to groups. + * + * @return principalType + */ + @javax.annotation.Nullable + public PrincipalTypeEnum getPrincipalType() { + return principalType; + } + + public void setPrincipalType(@javax.annotation.Nullable PrincipalTypeEnum principalType) { + this.principalType = principalType; + } + + public ValueScopeInput principalIdentifier( + @javax.annotation.Nullable String principalIdentifier) { + this.principalIdentifier = principalIdentifier; + return this; + } + + /** + * Unique ID or name of the principal + * + * @return principalIdentifier + */ + @javax.annotation.Nullable + public String getPrincipalIdentifier() { + return principalIdentifier; + } + + public void setPrincipalIdentifier(@javax.annotation.Nullable String principalIdentifier) { + this.principalIdentifier = principalIdentifier; + } + + public ValueScopeInput modelIdentifier(@javax.annotation.Nullable String modelIdentifier) { + this.modelIdentifier = modelIdentifier; + return this; + } + + /** + * Unique ID or name of the model to filter by. Applicable only for FORMULA_VARIABLE type. + * + * @return modelIdentifier + */ + @javax.annotation.Nullable + public String getModelIdentifier() { + return modelIdentifier; + } + + public void setModelIdentifier(@javax.annotation.Nullable String modelIdentifier) { + this.modelIdentifier = modelIdentifier; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key name of the property + * @param value value of the property + * @return the ValueScopeInput instance itself + */ + public ValueScopeInput putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return a map of objects + */ + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key name of the property + * @return an object + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ValueScopeInput valueScopeInput = (ValueScopeInput) o; + return Objects.equals(this.orgIdentifier, valueScopeInput.orgIdentifier) + && Objects.equals(this.principalType, valueScopeInput.principalType) + && Objects.equals(this.principalIdentifier, valueScopeInput.principalIdentifier) + && Objects.equals(this.modelIdentifier, valueScopeInput.modelIdentifier) + && Objects.equals(this.additionalProperties, valueScopeInput.additionalProperties); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b + || (a != null + && b != null + && a.isPresent() + && b.isPresent() + && Objects.deepEquals(a.get(), b.get())); + } + + @Override + public int hashCode() { + return Objects.hash( + orgIdentifier, + principalType, + principalIdentifier, + modelIdentifier, + additionalProperties); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; + } + return a.isPresent() ? Arrays.deepHashCode(new Object[] {a.get()}) : 31; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ValueScopeInput {\n"); + sb.append(" orgIdentifier: ").append(toIndentedString(orgIdentifier)).append("\n"); + sb.append(" principalType: ").append(toIndentedString(principalType)).append("\n"); + sb.append(" principalIdentifier: ") + .append(toIndentedString(principalIdentifier)) + .append("\n"); + sb.append(" modelIdentifier: ").append(toIndentedString(modelIdentifier)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first + * line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("org_identifier"); + openapiFields.add("principal_type"); + openapiFields.add("principal_identifier"); + openapiFields.add("model_identifier"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to ValueScopeInput + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!ValueScopeInput.openapiRequiredFields + .isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException( + String.format( + "The required field(s) %s in ValueScopeInput is not found in the" + + " empty JSON string", + ValueScopeInput.openapiRequiredFields.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if ((jsonObj.get("org_identifier") != null && !jsonObj.get("org_identifier").isJsonNull()) + && !jsonObj.get("org_identifier").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `org_identifier` to be a primitive type in the" + + " JSON string but got `%s`", + jsonObj.get("org_identifier").toString())); + } + if ((jsonObj.get("principal_type") != null && !jsonObj.get("principal_type").isJsonNull()) + && !jsonObj.get("principal_type").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `principal_type` to be a primitive type in the" + + " JSON string but got `%s`", + jsonObj.get("principal_type").toString())); + } + // validate the optional field `principal_type` + if (jsonObj.get("principal_type") != null && !jsonObj.get("principal_type").isJsonNull()) { + PrincipalTypeEnum.validateJsonElement(jsonObj.get("principal_type")); + } + if ((jsonObj.get("principal_identifier") != null + && !jsonObj.get("principal_identifier").isJsonNull()) + && !jsonObj.get("principal_identifier").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `principal_identifier` to be a primitive type in" + + " the JSON string but got `%s`", + jsonObj.get("principal_identifier").toString())); + } + if ((jsonObj.get("model_identifier") != null + && !jsonObj.get("model_identifier").isJsonNull()) + && !jsonObj.get("model_identifier").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `model_identifier` to be a primitive type in the" + + " JSON string but got `%s`", + jsonObj.get("model_identifier").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!ValueScopeInput.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'ValueScopeInput' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter = + gson.getDelegateAdapter(this, TypeToken.get(ValueScopeInput.class)); + + return (TypeAdapter) + new TypeAdapter() { + @Override + public void write(JsonWriter out, ValueScopeInput value) + throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + obj.remove("additionalProperties"); + // serialize additional properties + if (value.getAdditionalProperties() != null) { + for (Map.Entry entry : + value.getAdditionalProperties().entrySet()) { + if (entry.getValue() instanceof String) + obj.addProperty(entry.getKey(), (String) entry.getValue()); + else if (entry.getValue() instanceof Number) + obj.addProperty(entry.getKey(), (Number) entry.getValue()); + else if (entry.getValue() instanceof Boolean) + obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); + else if (entry.getValue() instanceof Character) + obj.addProperty( + entry.getKey(), (Character) entry.getValue()); + else { + JsonElement jsonElement = gson.toJsonTree(entry.getValue()); + if (jsonElement.isJsonArray()) { + obj.add(entry.getKey(), jsonElement.getAsJsonArray()); + } else { + obj.add(entry.getKey(), jsonElement.getAsJsonObject()); + } + } + } + } + elementAdapter.write(out, obj); + } + + @Override + public ValueScopeInput read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // store additional fields in the deserialized instance + ValueScopeInput instance = thisAdapter.fromJsonTree(jsonObj); + for (Map.Entry entry : jsonObj.entrySet()) { + if (!openapiFields.contains(entry.getKey())) { + if (entry.getValue().isJsonPrimitive()) { // primitive type + if (entry.getValue().getAsJsonPrimitive().isString()) + instance.putAdditionalProperty( + entry.getKey(), entry.getValue().getAsString()); + else if (entry.getValue().getAsJsonPrimitive().isNumber()) + instance.putAdditionalProperty( + entry.getKey(), entry.getValue().getAsNumber()); + else if (entry.getValue().getAsJsonPrimitive().isBoolean()) + instance.putAdditionalProperty( + entry.getKey(), + entry.getValue().getAsBoolean()); + else + throw new IllegalArgumentException( + String.format( + "The field `%s` has unknown primitive" + + " type. Value: %s", + entry.getKey(), + entry.getValue().toString())); + } else if (entry.getValue().isJsonArray()) { + instance.putAdditionalProperty( + entry.getKey(), + gson.fromJson(entry.getValue(), List.class)); + } else { // JSON object + instance.putAdditionalProperty( + entry.getKey(), + gson.fromJson(entry.getValue(), HashMap.class)); + } + } + } + return instance; + } + }.nullSafe(); + } + } + + /** + * Create an instance of ValueScopeInput given an JSON string + * + * @param jsonString JSON string + * @return An instance of ValueScopeInput + * @throws IOException if the JSON string is invalid with respect to ValueScopeInput + */ + public static ValueScopeInput fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, ValueScopeInput.class); + } + + /** + * Convert an instance of ValueScopeInput to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} diff --git a/sdks/java/src/main/java/com/thoughtspot/client/model/Variable.java b/sdks/java/src/main/java/com/thoughtspot/client/model/Variable.java new file mode 100644 index 000000000..2ac3524a3 --- /dev/null +++ b/sdks/java/src/main/java/com/thoughtspot/client/model/Variable.java @@ -0,0 +1,569 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client.model; + +import com.google.gson.Gson; +import com.google.gson.JsonArray; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.TypeAdapter; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.reflect.TypeToken; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import com.thoughtspot.client.JSON; +import java.io.IOException; +import java.io.Serializable; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Objects; +import org.openapitools.jackson.nullable.JsonNullable; + +/** Variable object */ +@javax.annotation.Generated( + value = "org.openapitools.codegen.languages.JavaClientCodegen", + comments = "Generator version: 7.12.0") +public class Variable implements Serializable { + private static final long serialVersionUID = 1L; + + public static final String SERIALIZED_NAME_ID = "id"; + + @SerializedName(SERIALIZED_NAME_ID) + @javax.annotation.Nonnull + private String id; + + public static final String SERIALIZED_NAME_NAME = "name"; + + @SerializedName(SERIALIZED_NAME_NAME) + @javax.annotation.Nonnull + private String name; + + /** Type of the variable */ + @JsonAdapter(VariableTypeEnum.Adapter.class) + public enum VariableTypeEnum { + CONNECTION_PROPERTY("CONNECTION_PROPERTY"), + + TABLE_MAPPING("TABLE_MAPPING"), + + CONNECTION_PROPERTY_PER_PRINCIPAL("CONNECTION_PROPERTY_PER_PRINCIPAL"), + + FORMULA_VARIABLE("FORMULA_VARIABLE"), + + USER_PROPERTY("USER_PROPERTY"); + + private String value; + + VariableTypeEnum(String value) { + this.value = value; + } + + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + public static VariableTypeEnum fromValue(String value) { + for (VariableTypeEnum b : VariableTypeEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + return null; + } + + public static class Adapter extends TypeAdapter { + @Override + public void write(final JsonWriter jsonWriter, final VariableTypeEnum enumeration) + throws IOException { + jsonWriter.value(enumeration.getValue()); + } + + @Override + public VariableTypeEnum read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + return VariableTypeEnum.fromValue(value); + } + } + + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + String value = jsonElement.getAsString(); + VariableTypeEnum.fromValue(value); + } + } + + public static final String SERIALIZED_NAME_VARIABLE_TYPE = "variable_type"; + + @SerializedName(SERIALIZED_NAME_VARIABLE_TYPE) + @javax.annotation.Nullable + private VariableTypeEnum variableType; + + public static final String SERIALIZED_NAME_SENSITIVE = "sensitive"; + + @SerializedName(SERIALIZED_NAME_SENSITIVE) + @javax.annotation.Nullable + private Boolean sensitive; + + public static final String SERIALIZED_NAME_VALUES = "values"; + + @SerializedName(SERIALIZED_NAME_VALUES) + @javax.annotation.Nullable + private List values; + + public static final String SERIALIZED_NAME_ORG = "org"; + + @SerializedName(SERIALIZED_NAME_ORG) + @javax.annotation.Nullable + private VariableOrgInfo org; + + public Variable() {} + + public Variable id(@javax.annotation.Nonnull String id) { + this.id = id; + return this; + } + + /** + * Unique identifier of the variable + * + * @return id + */ + @javax.annotation.Nonnull + public String getId() { + return id; + } + + public void setId(@javax.annotation.Nonnull String id) { + this.id = id; + } + + public Variable name(@javax.annotation.Nonnull String name) { + this.name = name; + return this; + } + + /** + * Name of the variable + * + * @return name + */ + @javax.annotation.Nonnull + public String getName() { + return name; + } + + public void setName(@javax.annotation.Nonnull String name) { + this.name = name; + } + + public Variable variableType(@javax.annotation.Nullable VariableTypeEnum variableType) { + this.variableType = variableType; + return this; + } + + /** + * Type of the variable + * + * @return variableType + */ + @javax.annotation.Nullable + public VariableTypeEnum getVariableType() { + return variableType; + } + + public void setVariableType(@javax.annotation.Nullable VariableTypeEnum variableType) { + this.variableType = variableType; + } + + public Variable sensitive(@javax.annotation.Nullable Boolean sensitive) { + this.sensitive = sensitive; + return this; + } + + /** + * If the variable is sensitive + * + * @return sensitive + */ + @javax.annotation.Nullable + public Boolean getSensitive() { + return sensitive; + } + + public void setSensitive(@javax.annotation.Nullable Boolean sensitive) { + this.sensitive = sensitive; + } + + public Variable values(@javax.annotation.Nullable List values) { + this.values = values; + return this; + } + + public Variable addValuesItem(VariableValue valuesItem) { + if (this.values == null) { + this.values = new ArrayList<>(); + } + this.values.add(valuesItem); + return this; + } + + /** + * Values of the variable + * + * @return values + */ + @javax.annotation.Nullable + public List getValues() { + return values; + } + + public void setValues(@javax.annotation.Nullable List values) { + this.values = values; + } + + public Variable org(@javax.annotation.Nullable VariableOrgInfo org) { + this.org = org; + return this; + } + + /** + * Get org + * + * @return org + */ + @javax.annotation.Nullable + public VariableOrgInfo getOrg() { + return org; + } + + public void setOrg(@javax.annotation.Nullable VariableOrgInfo org) { + this.org = org; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key name of the property + * @param value value of the property + * @return the Variable instance itself + */ + public Variable putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return a map of objects + */ + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key name of the property + * @return an object + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + Variable variable = (Variable) o; + return Objects.equals(this.id, variable.id) + && Objects.equals(this.name, variable.name) + && Objects.equals(this.variableType, variable.variableType) + && Objects.equals(this.sensitive, variable.sensitive) + && Objects.equals(this.values, variable.values) + && Objects.equals(this.org, variable.org) + && Objects.equals(this.additionalProperties, variable.additionalProperties); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b + || (a != null + && b != null + && a.isPresent() + && b.isPresent() + && Objects.deepEquals(a.get(), b.get())); + } + + @Override + public int hashCode() { + return Objects.hash(id, name, variableType, sensitive, values, org, additionalProperties); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; + } + return a.isPresent() ? Arrays.deepHashCode(new Object[] {a.get()}) : 31; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class Variable {\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append(" variableType: ").append(toIndentedString(variableType)).append("\n"); + sb.append(" sensitive: ").append(toIndentedString(sensitive)).append("\n"); + sb.append(" values: ").append(toIndentedString(values)).append("\n"); + sb.append(" org: ").append(toIndentedString(org)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first + * line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("id"); + openapiFields.add("name"); + openapiFields.add("variable_type"); + openapiFields.add("sensitive"); + openapiFields.add("values"); + openapiFields.add("org"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + openapiRequiredFields.add("id"); + openapiRequiredFields.add("name"); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to Variable + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!Variable.openapiRequiredFields + .isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException( + String.format( + "The required field(s) %s in Variable is not found in the empty" + + " JSON string", + Variable.openapiRequiredFields.toString())); + } + } + + // check to make sure all required properties/fields are present in the JSON string + for (String requiredField : Variable.openapiRequiredFields) { + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException( + String.format( + "The required field `%s` is not found in the JSON string: %s", + requiredField, jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if (!jsonObj.get("id").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `id` to be a primitive type in the JSON string but" + + " got `%s`", + jsonObj.get("id").toString())); + } + if (!jsonObj.get("name").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `name` to be a primitive type in the JSON string" + + " but got `%s`", + jsonObj.get("name").toString())); + } + if ((jsonObj.get("variable_type") != null && !jsonObj.get("variable_type").isJsonNull()) + && !jsonObj.get("variable_type").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `variable_type` to be a primitive type in the JSON" + + " string but got `%s`", + jsonObj.get("variable_type").toString())); + } + // validate the optional field `variable_type` + if (jsonObj.get("variable_type") != null && !jsonObj.get("variable_type").isJsonNull()) { + VariableTypeEnum.validateJsonElement(jsonObj.get("variable_type")); + } + if (jsonObj.get("values") != null && !jsonObj.get("values").isJsonNull()) { + JsonArray jsonArrayvalues = jsonObj.getAsJsonArray("values"); + if (jsonArrayvalues != null) { + // ensure the json data is an array + if (!jsonObj.get("values").isJsonArray()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `values` to be an array in the JSON string" + + " but got `%s`", + jsonObj.get("values").toString())); + } + + // validate the optional field `values` (array) + for (int i = 0; i < jsonArrayvalues.size(); i++) { + VariableValue.validateJsonElement(jsonArrayvalues.get(i)); + } + ; + } + } + // validate the optional field `org` + if (jsonObj.get("org") != null && !jsonObj.get("org").isJsonNull()) { + VariableOrgInfo.validateJsonElement(jsonObj.get("org")); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!Variable.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'Variable' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter = + gson.getDelegateAdapter(this, TypeToken.get(Variable.class)); + + return (TypeAdapter) + new TypeAdapter() { + @Override + public void write(JsonWriter out, Variable value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + obj.remove("additionalProperties"); + // serialize additional properties + if (value.getAdditionalProperties() != null) { + for (Map.Entry entry : + value.getAdditionalProperties().entrySet()) { + if (entry.getValue() instanceof String) + obj.addProperty(entry.getKey(), (String) entry.getValue()); + else if (entry.getValue() instanceof Number) + obj.addProperty(entry.getKey(), (Number) entry.getValue()); + else if (entry.getValue() instanceof Boolean) + obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); + else if (entry.getValue() instanceof Character) + obj.addProperty( + entry.getKey(), (Character) entry.getValue()); + else { + JsonElement jsonElement = gson.toJsonTree(entry.getValue()); + if (jsonElement.isJsonArray()) { + obj.add(entry.getKey(), jsonElement.getAsJsonArray()); + } else { + obj.add(entry.getKey(), jsonElement.getAsJsonObject()); + } + } + } + } + elementAdapter.write(out, obj); + } + + @Override + public Variable read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // store additional fields in the deserialized instance + Variable instance = thisAdapter.fromJsonTree(jsonObj); + for (Map.Entry entry : jsonObj.entrySet()) { + if (!openapiFields.contains(entry.getKey())) { + if (entry.getValue().isJsonPrimitive()) { // primitive type + if (entry.getValue().getAsJsonPrimitive().isString()) + instance.putAdditionalProperty( + entry.getKey(), entry.getValue().getAsString()); + else if (entry.getValue().getAsJsonPrimitive().isNumber()) + instance.putAdditionalProperty( + entry.getKey(), entry.getValue().getAsNumber()); + else if (entry.getValue().getAsJsonPrimitive().isBoolean()) + instance.putAdditionalProperty( + entry.getKey(), + entry.getValue().getAsBoolean()); + else + throw new IllegalArgumentException( + String.format( + "The field `%s` has unknown primitive" + + " type. Value: %s", + entry.getKey(), + entry.getValue().toString())); + } else if (entry.getValue().isJsonArray()) { + instance.putAdditionalProperty( + entry.getKey(), + gson.fromJson(entry.getValue(), List.class)); + } else { // JSON object + instance.putAdditionalProperty( + entry.getKey(), + gson.fromJson(entry.getValue(), HashMap.class)); + } + } + } + return instance; + } + }.nullSafe(); + } + } + + /** + * Create an instance of Variable given an JSON string + * + * @param jsonString JSON string + * @return An instance of Variable + * @throws IOException if the JSON string is invalid with respect to Variable + */ + public static Variable fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, Variable.class); + } + + /** + * Convert an instance of Variable to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} diff --git a/sdks/java/src/main/java/com/thoughtspot/client/model/VariableDetailInput.java b/sdks/java/src/main/java/com/thoughtspot/client/model/VariableDetailInput.java new file mode 100644 index 000000000..5d0600a37 --- /dev/null +++ b/sdks/java/src/main/java/com/thoughtspot/client/model/VariableDetailInput.java @@ -0,0 +1,444 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client.model; + +import com.google.gson.Gson; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.TypeAdapter; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.reflect.TypeToken; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import com.thoughtspot.client.JSON; +import java.io.IOException; +import java.io.Serializable; +import java.util.Arrays; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Objects; +import org.openapitools.jackson.nullable.JsonNullable; + +/** Input for variable details in search */ +@javax.annotation.Generated( + value = "org.openapitools.codegen.languages.JavaClientCodegen", + comments = "Generator version: 7.12.0") +public class VariableDetailInput implements Serializable { + private static final long serialVersionUID = 1L; + + public static final String SERIALIZED_NAME_IDENTIFIER = "identifier"; + + @SerializedName(SERIALIZED_NAME_IDENTIFIER) + @javax.annotation.Nullable + private String identifier; + + /** Type of variable */ + @JsonAdapter(TypeEnum.Adapter.class) + public enum TypeEnum { + CONNECTION_PROPERTY("CONNECTION_PROPERTY"), + + TABLE_MAPPING("TABLE_MAPPING"), + + CONNECTION_PROPERTY_PER_PRINCIPAL("CONNECTION_PROPERTY_PER_PRINCIPAL"), + + FORMULA_VARIABLE("FORMULA_VARIABLE"), + + USER_PROPERTY("USER_PROPERTY"); + + private String value; + + TypeEnum(String value) { + this.value = value; + } + + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + public static TypeEnum fromValue(String value) { + for (TypeEnum b : TypeEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + return null; + } + + public static class Adapter extends TypeAdapter { + @Override + public void write(final JsonWriter jsonWriter, final TypeEnum enumeration) + throws IOException { + jsonWriter.value(enumeration.getValue()); + } + + @Override + public TypeEnum read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + return TypeEnum.fromValue(value); + } + } + + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + String value = jsonElement.getAsString(); + TypeEnum.fromValue(value); + } + } + + public static final String SERIALIZED_NAME_TYPE = "type"; + + @SerializedName(SERIALIZED_NAME_TYPE) + @javax.annotation.Nullable + private TypeEnum type; + + public static final String SERIALIZED_NAME_NAME_PATTERN = "name_pattern"; + + @SerializedName(SERIALIZED_NAME_NAME_PATTERN) + @javax.annotation.Nullable + private String namePattern; + + public VariableDetailInput() {} + + public VariableDetailInput identifier(@javax.annotation.Nullable String identifier) { + this.identifier = identifier; + return this; + } + + /** + * Unique ID or name of the variable + * + * @return identifier + */ + @javax.annotation.Nullable + public String getIdentifier() { + return identifier; + } + + public void setIdentifier(@javax.annotation.Nullable String identifier) { + this.identifier = identifier; + } + + public VariableDetailInput type(@javax.annotation.Nullable TypeEnum type) { + this.type = type; + return this; + } + + /** + * Type of variable + * + * @return type + */ + @javax.annotation.Nullable + public TypeEnum getType() { + return type; + } + + public void setType(@javax.annotation.Nullable TypeEnum type) { + this.type = type; + } + + public VariableDetailInput namePattern(@javax.annotation.Nullable String namePattern) { + this.namePattern = namePattern; + return this; + } + + /** + * A pattern to match case-insensitive name of the variable. User % for a wildcard match + * + * @return namePattern + */ + @javax.annotation.Nullable + public String getNamePattern() { + return namePattern; + } + + public void setNamePattern(@javax.annotation.Nullable String namePattern) { + this.namePattern = namePattern; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key name of the property + * @param value value of the property + * @return the VariableDetailInput instance itself + */ + public VariableDetailInput putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return a map of objects + */ + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key name of the property + * @return an object + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + VariableDetailInput variableDetailInput = (VariableDetailInput) o; + return Objects.equals(this.identifier, variableDetailInput.identifier) + && Objects.equals(this.type, variableDetailInput.type) + && Objects.equals(this.namePattern, variableDetailInput.namePattern) + && Objects.equals( + this.additionalProperties, variableDetailInput.additionalProperties); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b + || (a != null + && b != null + && a.isPresent() + && b.isPresent() + && Objects.deepEquals(a.get(), b.get())); + } + + @Override + public int hashCode() { + return Objects.hash(identifier, type, namePattern, additionalProperties); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; + } + return a.isPresent() ? Arrays.deepHashCode(new Object[] {a.get()}) : 31; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class VariableDetailInput {\n"); + sb.append(" identifier: ").append(toIndentedString(identifier)).append("\n"); + sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append(" namePattern: ").append(toIndentedString(namePattern)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first + * line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("identifier"); + openapiFields.add("type"); + openapiFields.add("name_pattern"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to VariableDetailInput + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!VariableDetailInput.openapiRequiredFields + .isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException( + String.format( + "The required field(s) %s in VariableDetailInput is not found in" + + " the empty JSON string", + VariableDetailInput.openapiRequiredFields.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if ((jsonObj.get("identifier") != null && !jsonObj.get("identifier").isJsonNull()) + && !jsonObj.get("identifier").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `identifier` to be a primitive type in the JSON" + + " string but got `%s`", + jsonObj.get("identifier").toString())); + } + if ((jsonObj.get("type") != null && !jsonObj.get("type").isJsonNull()) + && !jsonObj.get("type").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `type` to be a primitive type in the JSON string" + + " but got `%s`", + jsonObj.get("type").toString())); + } + // validate the optional field `type` + if (jsonObj.get("type") != null && !jsonObj.get("type").isJsonNull()) { + TypeEnum.validateJsonElement(jsonObj.get("type")); + } + if ((jsonObj.get("name_pattern") != null && !jsonObj.get("name_pattern").isJsonNull()) + && !jsonObj.get("name_pattern").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `name_pattern` to be a primitive type in the JSON" + + " string but got `%s`", + jsonObj.get("name_pattern").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!VariableDetailInput.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'VariableDetailInput' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter = + gson.getDelegateAdapter(this, TypeToken.get(VariableDetailInput.class)); + + return (TypeAdapter) + new TypeAdapter() { + @Override + public void write(JsonWriter out, VariableDetailInput value) + throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + obj.remove("additionalProperties"); + // serialize additional properties + if (value.getAdditionalProperties() != null) { + for (Map.Entry entry : + value.getAdditionalProperties().entrySet()) { + if (entry.getValue() instanceof String) + obj.addProperty(entry.getKey(), (String) entry.getValue()); + else if (entry.getValue() instanceof Number) + obj.addProperty(entry.getKey(), (Number) entry.getValue()); + else if (entry.getValue() instanceof Boolean) + obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); + else if (entry.getValue() instanceof Character) + obj.addProperty( + entry.getKey(), (Character) entry.getValue()); + else { + JsonElement jsonElement = gson.toJsonTree(entry.getValue()); + if (jsonElement.isJsonArray()) { + obj.add(entry.getKey(), jsonElement.getAsJsonArray()); + } else { + obj.add(entry.getKey(), jsonElement.getAsJsonObject()); + } + } + } + } + elementAdapter.write(out, obj); + } + + @Override + public VariableDetailInput read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // store additional fields in the deserialized instance + VariableDetailInput instance = thisAdapter.fromJsonTree(jsonObj); + for (Map.Entry entry : jsonObj.entrySet()) { + if (!openapiFields.contains(entry.getKey())) { + if (entry.getValue().isJsonPrimitive()) { // primitive type + if (entry.getValue().getAsJsonPrimitive().isString()) + instance.putAdditionalProperty( + entry.getKey(), entry.getValue().getAsString()); + else if (entry.getValue().getAsJsonPrimitive().isNumber()) + instance.putAdditionalProperty( + entry.getKey(), entry.getValue().getAsNumber()); + else if (entry.getValue().getAsJsonPrimitive().isBoolean()) + instance.putAdditionalProperty( + entry.getKey(), + entry.getValue().getAsBoolean()); + else + throw new IllegalArgumentException( + String.format( + "The field `%s` has unknown primitive" + + " type. Value: %s", + entry.getKey(), + entry.getValue().toString())); + } else if (entry.getValue().isJsonArray()) { + instance.putAdditionalProperty( + entry.getKey(), + gson.fromJson(entry.getValue(), List.class)); + } else { // JSON object + instance.putAdditionalProperty( + entry.getKey(), + gson.fromJson(entry.getValue(), HashMap.class)); + } + } + } + return instance; + } + }.nullSafe(); + } + } + + /** + * Create an instance of VariableDetailInput given an JSON string + * + * @param jsonString JSON string + * @return An instance of VariableDetailInput + * @throws IOException if the JSON string is invalid with respect to VariableDetailInput + */ + public static VariableDetailInput fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, VariableDetailInput.class); + } + + /** + * Convert an instance of VariableDetailInput to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} diff --git a/sdks/java/src/main/java/com/thoughtspot/client/model/VariableOrgInfo.java b/sdks/java/src/main/java/com/thoughtspot/client/model/VariableOrgInfo.java new file mode 100644 index 000000000..c1f827d94 --- /dev/null +++ b/sdks/java/src/main/java/com/thoughtspot/client/model/VariableOrgInfo.java @@ -0,0 +1,330 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client.model; + +import com.google.gson.Gson; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.TypeAdapter; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.annotations.SerializedName; +import com.google.gson.reflect.TypeToken; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import com.thoughtspot.client.JSON; +import java.io.IOException; +import java.io.Serializable; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Objects; + +/** VariableOrgInfo */ +@javax.annotation.Generated( + value = "org.openapitools.codegen.languages.JavaClientCodegen", + comments = "Generator version: 7.12.0") +public class VariableOrgInfo implements Serializable { + private static final long serialVersionUID = 1L; + + public static final String SERIALIZED_NAME_ID = "id"; + + @SerializedName(SERIALIZED_NAME_ID) + @javax.annotation.Nonnull + private Integer id; + + public static final String SERIALIZED_NAME_NAME = "name"; + + @SerializedName(SERIALIZED_NAME_NAME) + @javax.annotation.Nonnull + private String name; + + public VariableOrgInfo() {} + + public VariableOrgInfo id(@javax.annotation.Nonnull Integer id) { + this.id = id; + return this; + } + + /** + * ID of the Org. + * + * @return id + */ + @javax.annotation.Nonnull + public Integer getId() { + return id; + } + + public void setId(@javax.annotation.Nonnull Integer id) { + this.id = id; + } + + public VariableOrgInfo name(@javax.annotation.Nonnull String name) { + this.name = name; + return this; + } + + /** + * Name of the Org. + * + * @return name + */ + @javax.annotation.Nonnull + public String getName() { + return name; + } + + public void setName(@javax.annotation.Nonnull String name) { + this.name = name; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key name of the property + * @param value value of the property + * @return the VariableOrgInfo instance itself + */ + public VariableOrgInfo putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return a map of objects + */ + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key name of the property + * @return an object + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + VariableOrgInfo variableOrgInfo = (VariableOrgInfo) o; + return Objects.equals(this.id, variableOrgInfo.id) + && Objects.equals(this.name, variableOrgInfo.name) + && Objects.equals(this.additionalProperties, variableOrgInfo.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(id, name, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class VariableOrgInfo {\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first + * line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("id"); + openapiFields.add("name"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + openapiRequiredFields.add("id"); + openapiRequiredFields.add("name"); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to VariableOrgInfo + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!VariableOrgInfo.openapiRequiredFields + .isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException( + String.format( + "The required field(s) %s in VariableOrgInfo is not found in the" + + " empty JSON string", + VariableOrgInfo.openapiRequiredFields.toString())); + } + } + + // check to make sure all required properties/fields are present in the JSON string + for (String requiredField : VariableOrgInfo.openapiRequiredFields) { + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException( + String.format( + "The required field `%s` is not found in the JSON string: %s", + requiredField, jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if (!jsonObj.get("name").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `name` to be a primitive type in the JSON string" + + " but got `%s`", + jsonObj.get("name").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!VariableOrgInfo.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'VariableOrgInfo' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter = + gson.getDelegateAdapter(this, TypeToken.get(VariableOrgInfo.class)); + + return (TypeAdapter) + new TypeAdapter() { + @Override + public void write(JsonWriter out, VariableOrgInfo value) + throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + obj.remove("additionalProperties"); + // serialize additional properties + if (value.getAdditionalProperties() != null) { + for (Map.Entry entry : + value.getAdditionalProperties().entrySet()) { + if (entry.getValue() instanceof String) + obj.addProperty(entry.getKey(), (String) entry.getValue()); + else if (entry.getValue() instanceof Number) + obj.addProperty(entry.getKey(), (Number) entry.getValue()); + else if (entry.getValue() instanceof Boolean) + obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); + else if (entry.getValue() instanceof Character) + obj.addProperty( + entry.getKey(), (Character) entry.getValue()); + else { + JsonElement jsonElement = gson.toJsonTree(entry.getValue()); + if (jsonElement.isJsonArray()) { + obj.add(entry.getKey(), jsonElement.getAsJsonArray()); + } else { + obj.add(entry.getKey(), jsonElement.getAsJsonObject()); + } + } + } + } + elementAdapter.write(out, obj); + } + + @Override + public VariableOrgInfo read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // store additional fields in the deserialized instance + VariableOrgInfo instance = thisAdapter.fromJsonTree(jsonObj); + for (Map.Entry entry : jsonObj.entrySet()) { + if (!openapiFields.contains(entry.getKey())) { + if (entry.getValue().isJsonPrimitive()) { // primitive type + if (entry.getValue().getAsJsonPrimitive().isString()) + instance.putAdditionalProperty( + entry.getKey(), entry.getValue().getAsString()); + else if (entry.getValue().getAsJsonPrimitive().isNumber()) + instance.putAdditionalProperty( + entry.getKey(), entry.getValue().getAsNumber()); + else if (entry.getValue().getAsJsonPrimitive().isBoolean()) + instance.putAdditionalProperty( + entry.getKey(), + entry.getValue().getAsBoolean()); + else + throw new IllegalArgumentException( + String.format( + "The field `%s` has unknown primitive" + + " type. Value: %s", + entry.getKey(), + entry.getValue().toString())); + } else if (entry.getValue().isJsonArray()) { + instance.putAdditionalProperty( + entry.getKey(), + gson.fromJson(entry.getValue(), List.class)); + } else { // JSON object + instance.putAdditionalProperty( + entry.getKey(), + gson.fromJson(entry.getValue(), HashMap.class)); + } + } + } + return instance; + } + }.nullSafe(); + } + } + + /** + * Create an instance of VariableOrgInfo given an JSON string + * + * @param jsonString JSON string + * @return An instance of VariableOrgInfo + * @throws IOException if the JSON string is invalid with respect to VariableOrgInfo + */ + public static VariableOrgInfo fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, VariableOrgInfo.class); + } + + /** + * Convert an instance of VariableOrgInfo to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} diff --git a/sdks/java/src/main/java/com/thoughtspot/client/model/VariablePutAssignmentInput.java b/sdks/java/src/main/java/com/thoughtspot/client/model/VariablePutAssignmentInput.java new file mode 100644 index 000000000..6eeb018de --- /dev/null +++ b/sdks/java/src/main/java/com/thoughtspot/client/model/VariablePutAssignmentInput.java @@ -0,0 +1,580 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client.model; + +import com.google.gson.Gson; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.TypeAdapter; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.reflect.TypeToken; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import com.thoughtspot.client.JSON; +import java.io.IOException; +import java.io.Serializable; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Objects; +import org.openapitools.jackson.nullable.JsonNullable; + +/** Input for variable value put operations */ +@javax.annotation.Generated( + value = "org.openapitools.codegen.languages.JavaClientCodegen", + comments = "Generator version: 7.12.0") +public class VariablePutAssignmentInput implements Serializable { + private static final long serialVersionUID = 1L; + + public static final String SERIALIZED_NAME_ASSIGNED_VALUES = "assigned_values"; + + @SerializedName(SERIALIZED_NAME_ASSIGNED_VALUES) + @javax.annotation.Nonnull + private List assignedValues; + + public static final String SERIALIZED_NAME_ORG_IDENTIFIER = "org_identifier"; + + @SerializedName(SERIALIZED_NAME_ORG_IDENTIFIER) + @javax.annotation.Nullable + private String orgIdentifier; + + /** Principal type */ + @JsonAdapter(PrincipalTypeEnum.Adapter.class) + public enum PrincipalTypeEnum { + USER("USER"), + + USER_GROUP("USER_GROUP"); + + private String value; + + PrincipalTypeEnum(String value) { + this.value = value; + } + + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + public static PrincipalTypeEnum fromValue(String value) { + for (PrincipalTypeEnum b : PrincipalTypeEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + return null; + } + + public static class Adapter extends TypeAdapter { + @Override + public void write(final JsonWriter jsonWriter, final PrincipalTypeEnum enumeration) + throws IOException { + jsonWriter.value(enumeration.getValue()); + } + + @Override + public PrincipalTypeEnum read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + return PrincipalTypeEnum.fromValue(value); + } + } + + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + String value = jsonElement.getAsString(); + PrincipalTypeEnum.fromValue(value); + } + } + + public static final String SERIALIZED_NAME_PRINCIPAL_TYPE = "principal_type"; + + @SerializedName(SERIALIZED_NAME_PRINCIPAL_TYPE) + @javax.annotation.Nullable + private PrincipalTypeEnum principalType; + + public static final String SERIALIZED_NAME_PRINCIPAL_IDENTIFIER = "principal_identifier"; + + @SerializedName(SERIALIZED_NAME_PRINCIPAL_IDENTIFIER) + @javax.annotation.Nullable + private String principalIdentifier; + + public static final String SERIALIZED_NAME_MODEL_IDENTIFIER = "model_identifier"; + + @SerializedName(SERIALIZED_NAME_MODEL_IDENTIFIER) + @javax.annotation.Nullable + private String modelIdentifier; + + public static final String SERIALIZED_NAME_PRIORITY = "priority"; + + @SerializedName(SERIALIZED_NAME_PRIORITY) + @javax.annotation.Nullable + private Integer priority; + + public VariablePutAssignmentInput() {} + + public VariablePutAssignmentInput assignedValues( + @javax.annotation.Nonnull List assignedValues) { + this.assignedValues = assignedValues; + return this; + } + + public VariablePutAssignmentInput addAssignedValuesItem(String assignedValuesItem) { + if (this.assignedValues == null) { + this.assignedValues = new ArrayList<>(); + } + this.assignedValues.add(assignedValuesItem); + return this; + } + + /** + * Values of the variable + * + * @return assignedValues + */ + @javax.annotation.Nonnull + public List getAssignedValues() { + return assignedValues; + } + + public void setAssignedValues(@javax.annotation.Nonnull List assignedValues) { + this.assignedValues = assignedValues; + } + + public VariablePutAssignmentInput orgIdentifier( + @javax.annotation.Nullable String orgIdentifier) { + this.orgIdentifier = orgIdentifier; + return this; + } + + /** + * The unique name of the org + * + * @return orgIdentifier + */ + @javax.annotation.Nullable + public String getOrgIdentifier() { + return orgIdentifier; + } + + public void setOrgIdentifier(@javax.annotation.Nullable String orgIdentifier) { + this.orgIdentifier = orgIdentifier; + } + + public VariablePutAssignmentInput principalType( + @javax.annotation.Nullable PrincipalTypeEnum principalType) { + this.principalType = principalType; + return this; + } + + /** + * Principal type + * + * @return principalType + */ + @javax.annotation.Nullable + public PrincipalTypeEnum getPrincipalType() { + return principalType; + } + + public void setPrincipalType(@javax.annotation.Nullable PrincipalTypeEnum principalType) { + this.principalType = principalType; + } + + public VariablePutAssignmentInput principalIdentifier( + @javax.annotation.Nullable String principalIdentifier) { + this.principalIdentifier = principalIdentifier; + return this; + } + + /** + * Unique ID or name of the principal + * + * @return principalIdentifier + */ + @javax.annotation.Nullable + public String getPrincipalIdentifier() { + return principalIdentifier; + } + + public void setPrincipalIdentifier(@javax.annotation.Nullable String principalIdentifier) { + this.principalIdentifier = principalIdentifier; + } + + public VariablePutAssignmentInput modelIdentifier( + @javax.annotation.Nullable String modelIdentifier) { + this.modelIdentifier = modelIdentifier; + return this; + } + + /** + * Unique ID of the model + * + * @return modelIdentifier + */ + @javax.annotation.Nullable + public String getModelIdentifier() { + return modelIdentifier; + } + + public void setModelIdentifier(@javax.annotation.Nullable String modelIdentifier) { + this.modelIdentifier = modelIdentifier; + } + + public VariablePutAssignmentInput priority(@javax.annotation.Nullable Integer priority) { + this.priority = priority; + return this; + } + + /** + * Priority level + * + * @return priority + */ + @javax.annotation.Nullable + public Integer getPriority() { + return priority; + } + + public void setPriority(@javax.annotation.Nullable Integer priority) { + this.priority = priority; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key name of the property + * @param value value of the property + * @return the VariablePutAssignmentInput instance itself + */ + public VariablePutAssignmentInput putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return a map of objects + */ + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key name of the property + * @return an object + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + VariablePutAssignmentInput variablePutAssignmentInput = (VariablePutAssignmentInput) o; + return Objects.equals(this.assignedValues, variablePutAssignmentInput.assignedValues) + && Objects.equals(this.orgIdentifier, variablePutAssignmentInput.orgIdentifier) + && Objects.equals(this.principalType, variablePutAssignmentInput.principalType) + && Objects.equals( + this.principalIdentifier, variablePutAssignmentInput.principalIdentifier) + && Objects.equals(this.modelIdentifier, variablePutAssignmentInput.modelIdentifier) + && Objects.equals(this.priority, variablePutAssignmentInput.priority) + && Objects.equals( + this.additionalProperties, variablePutAssignmentInput.additionalProperties); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b + || (a != null + && b != null + && a.isPresent() + && b.isPresent() + && Objects.deepEquals(a.get(), b.get())); + } + + @Override + public int hashCode() { + return Objects.hash( + assignedValues, + orgIdentifier, + principalType, + principalIdentifier, + modelIdentifier, + priority, + additionalProperties); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; + } + return a.isPresent() ? Arrays.deepHashCode(new Object[] {a.get()}) : 31; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class VariablePutAssignmentInput {\n"); + sb.append(" assignedValues: ").append(toIndentedString(assignedValues)).append("\n"); + sb.append(" orgIdentifier: ").append(toIndentedString(orgIdentifier)).append("\n"); + sb.append(" principalType: ").append(toIndentedString(principalType)).append("\n"); + sb.append(" principalIdentifier: ") + .append(toIndentedString(principalIdentifier)) + .append("\n"); + sb.append(" modelIdentifier: ").append(toIndentedString(modelIdentifier)).append("\n"); + sb.append(" priority: ").append(toIndentedString(priority)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first + * line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("assigned_values"); + openapiFields.add("org_identifier"); + openapiFields.add("principal_type"); + openapiFields.add("principal_identifier"); + openapiFields.add("model_identifier"); + openapiFields.add("priority"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + openapiRequiredFields.add("assigned_values"); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to VariablePutAssignmentInput + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!VariablePutAssignmentInput.openapiRequiredFields + .isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException( + String.format( + "The required field(s) %s in VariablePutAssignmentInput is not" + + " found in the empty JSON string", + VariablePutAssignmentInput.openapiRequiredFields.toString())); + } + } + + // check to make sure all required properties/fields are present in the JSON string + for (String requiredField : VariablePutAssignmentInput.openapiRequiredFields) { + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException( + String.format( + "The required field `%s` is not found in the JSON string: %s", + requiredField, jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // ensure the required json array is present + if (jsonObj.get("assigned_values") == null) { + throw new IllegalArgumentException( + "Expected the field `linkedContent` to be an array in the JSON string but got" + + " `null`"); + } else if (!jsonObj.get("assigned_values").isJsonArray()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `assigned_values` to be an array in the JSON" + + " string but got `%s`", + jsonObj.get("assigned_values").toString())); + } + if ((jsonObj.get("org_identifier") != null && !jsonObj.get("org_identifier").isJsonNull()) + && !jsonObj.get("org_identifier").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `org_identifier` to be a primitive type in the" + + " JSON string but got `%s`", + jsonObj.get("org_identifier").toString())); + } + if ((jsonObj.get("principal_type") != null && !jsonObj.get("principal_type").isJsonNull()) + && !jsonObj.get("principal_type").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `principal_type` to be a primitive type in the" + + " JSON string but got `%s`", + jsonObj.get("principal_type").toString())); + } + // validate the optional field `principal_type` + if (jsonObj.get("principal_type") != null && !jsonObj.get("principal_type").isJsonNull()) { + PrincipalTypeEnum.validateJsonElement(jsonObj.get("principal_type")); + } + if ((jsonObj.get("principal_identifier") != null + && !jsonObj.get("principal_identifier").isJsonNull()) + && !jsonObj.get("principal_identifier").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `principal_identifier` to be a primitive type in" + + " the JSON string but got `%s`", + jsonObj.get("principal_identifier").toString())); + } + if ((jsonObj.get("model_identifier") != null + && !jsonObj.get("model_identifier").isJsonNull()) + && !jsonObj.get("model_identifier").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `model_identifier` to be a primitive type in the" + + " JSON string but got `%s`", + jsonObj.get("model_identifier").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!VariablePutAssignmentInput.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'VariablePutAssignmentInput' and its + // subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter = + gson.getDelegateAdapter(this, TypeToken.get(VariablePutAssignmentInput.class)); + + return (TypeAdapter) + new TypeAdapter() { + @Override + public void write(JsonWriter out, VariablePutAssignmentInput value) + throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + obj.remove("additionalProperties"); + // serialize additional properties + if (value.getAdditionalProperties() != null) { + for (Map.Entry entry : + value.getAdditionalProperties().entrySet()) { + if (entry.getValue() instanceof String) + obj.addProperty(entry.getKey(), (String) entry.getValue()); + else if (entry.getValue() instanceof Number) + obj.addProperty(entry.getKey(), (Number) entry.getValue()); + else if (entry.getValue() instanceof Boolean) + obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); + else if (entry.getValue() instanceof Character) + obj.addProperty( + entry.getKey(), (Character) entry.getValue()); + else { + JsonElement jsonElement = gson.toJsonTree(entry.getValue()); + if (jsonElement.isJsonArray()) { + obj.add(entry.getKey(), jsonElement.getAsJsonArray()); + } else { + obj.add(entry.getKey(), jsonElement.getAsJsonObject()); + } + } + } + } + elementAdapter.write(out, obj); + } + + @Override + public VariablePutAssignmentInput read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // store additional fields in the deserialized instance + VariablePutAssignmentInput instance = thisAdapter.fromJsonTree(jsonObj); + for (Map.Entry entry : jsonObj.entrySet()) { + if (!openapiFields.contains(entry.getKey())) { + if (entry.getValue().isJsonPrimitive()) { // primitive type + if (entry.getValue().getAsJsonPrimitive().isString()) + instance.putAdditionalProperty( + entry.getKey(), entry.getValue().getAsString()); + else if (entry.getValue().getAsJsonPrimitive().isNumber()) + instance.putAdditionalProperty( + entry.getKey(), entry.getValue().getAsNumber()); + else if (entry.getValue().getAsJsonPrimitive().isBoolean()) + instance.putAdditionalProperty( + entry.getKey(), + entry.getValue().getAsBoolean()); + else + throw new IllegalArgumentException( + String.format( + "The field `%s` has unknown primitive" + + " type. Value: %s", + entry.getKey(), + entry.getValue().toString())); + } else if (entry.getValue().isJsonArray()) { + instance.putAdditionalProperty( + entry.getKey(), + gson.fromJson(entry.getValue(), List.class)); + } else { // JSON object + instance.putAdditionalProperty( + entry.getKey(), + gson.fromJson(entry.getValue(), HashMap.class)); + } + } + } + return instance; + } + }.nullSafe(); + } + } + + /** + * Create an instance of VariablePutAssignmentInput given an JSON string + * + * @param jsonString JSON string + * @return An instance of VariablePutAssignmentInput + * @throws IOException if the JSON string is invalid with respect to VariablePutAssignmentInput + */ + public static VariablePutAssignmentInput fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, VariablePutAssignmentInput.class); + } + + /** + * Convert an instance of VariablePutAssignmentInput to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} diff --git a/sdks/java/src/main/java/com/thoughtspot/client/model/VariableUpdateAssignmentInput.java b/sdks/java/src/main/java/com/thoughtspot/client/model/VariableUpdateAssignmentInput.java new file mode 100644 index 000000000..c23814155 --- /dev/null +++ b/sdks/java/src/main/java/com/thoughtspot/client/model/VariableUpdateAssignmentInput.java @@ -0,0 +1,460 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client.model; + +import com.google.gson.Gson; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.TypeAdapter; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.reflect.TypeToken; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import com.thoughtspot.client.JSON; +import java.io.IOException; +import java.io.Serializable; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Objects; + +/** Input for variable value update in batch operations */ +@javax.annotation.Generated( + value = "org.openapitools.codegen.languages.JavaClientCodegen", + comments = "Generator version: 7.12.0") +public class VariableUpdateAssignmentInput implements Serializable { + private static final long serialVersionUID = 1L; + + public static final String SERIALIZED_NAME_VARIABLE_IDENTIFIER = "variable_identifier"; + + @SerializedName(SERIALIZED_NAME_VARIABLE_IDENTIFIER) + @javax.annotation.Nonnull + private String variableIdentifier; + + public static final String SERIALIZED_NAME_VARIABLE_VALUES = "variable_values"; + + @SerializedName(SERIALIZED_NAME_VARIABLE_VALUES) + @javax.annotation.Nonnull + private List variableValues; + + /** Operation to perform */ + @JsonAdapter(OperationEnum.Adapter.class) + public enum OperationEnum { + ADD("ADD"), + + REMOVE("REMOVE"), + + REPLACE("REPLACE"), + + RESET("RESET"); + + private String value; + + OperationEnum(String value) { + this.value = value; + } + + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + public static OperationEnum fromValue(String value) { + for (OperationEnum b : OperationEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + + public static class Adapter extends TypeAdapter { + @Override + public void write(final JsonWriter jsonWriter, final OperationEnum enumeration) + throws IOException { + jsonWriter.value(enumeration.getValue()); + } + + @Override + public OperationEnum read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + return OperationEnum.fromValue(value); + } + } + + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + String value = jsonElement.getAsString(); + OperationEnum.fromValue(value); + } + } + + public static final String SERIALIZED_NAME_OPERATION = "operation"; + + @SerializedName(SERIALIZED_NAME_OPERATION) + @javax.annotation.Nonnull + private OperationEnum operation; + + public VariableUpdateAssignmentInput() {} + + public VariableUpdateAssignmentInput variableIdentifier( + @javax.annotation.Nonnull String variableIdentifier) { + this.variableIdentifier = variableIdentifier; + return this; + } + + /** + * ID or Name of the variable + * + * @return variableIdentifier + */ + @javax.annotation.Nonnull + public String getVariableIdentifier() { + return variableIdentifier; + } + + public void setVariableIdentifier(@javax.annotation.Nonnull String variableIdentifier) { + this.variableIdentifier = variableIdentifier; + } + + public VariableUpdateAssignmentInput variableValues( + @javax.annotation.Nonnull List variableValues) { + this.variableValues = variableValues; + return this; + } + + public VariableUpdateAssignmentInput addVariableValuesItem(String variableValuesItem) { + if (this.variableValues == null) { + this.variableValues = new ArrayList<>(); + } + this.variableValues.add(variableValuesItem); + return this; + } + + /** + * Values of the variable + * + * @return variableValues + */ + @javax.annotation.Nonnull + public List getVariableValues() { + return variableValues; + } + + public void setVariableValues(@javax.annotation.Nonnull List variableValues) { + this.variableValues = variableValues; + } + + public VariableUpdateAssignmentInput operation( + @javax.annotation.Nonnull OperationEnum operation) { + this.operation = operation; + return this; + } + + /** + * Operation to perform + * + * @return operation + */ + @javax.annotation.Nonnull + public OperationEnum getOperation() { + return operation; + } + + public void setOperation(@javax.annotation.Nonnull OperationEnum operation) { + this.operation = operation; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key name of the property + * @param value value of the property + * @return the VariableUpdateAssignmentInput instance itself + */ + public VariableUpdateAssignmentInput putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return a map of objects + */ + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key name of the property + * @return an object + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + VariableUpdateAssignmentInput variableUpdateAssignmentInput = + (VariableUpdateAssignmentInput) o; + return Objects.equals( + this.variableIdentifier, variableUpdateAssignmentInput.variableIdentifier) + && Objects.equals(this.variableValues, variableUpdateAssignmentInput.variableValues) + && Objects.equals(this.operation, variableUpdateAssignmentInput.operation) + && Objects.equals( + this.additionalProperties, + variableUpdateAssignmentInput.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(variableIdentifier, variableValues, operation, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class VariableUpdateAssignmentInput {\n"); + sb.append(" variableIdentifier: ") + .append(toIndentedString(variableIdentifier)) + .append("\n"); + sb.append(" variableValues: ").append(toIndentedString(variableValues)).append("\n"); + sb.append(" operation: ").append(toIndentedString(operation)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first + * line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("variable_identifier"); + openapiFields.add("variable_values"); + openapiFields.add("operation"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + openapiRequiredFields.add("variable_identifier"); + openapiRequiredFields.add("variable_values"); + openapiRequiredFields.add("operation"); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to + * VariableUpdateAssignmentInput + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!VariableUpdateAssignmentInput.openapiRequiredFields + .isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException( + String.format( + "The required field(s) %s in VariableUpdateAssignmentInput is not" + + " found in the empty JSON string", + VariableUpdateAssignmentInput.openapiRequiredFields.toString())); + } + } + + // check to make sure all required properties/fields are present in the JSON string + for (String requiredField : VariableUpdateAssignmentInput.openapiRequiredFields) { + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException( + String.format( + "The required field `%s` is not found in the JSON string: %s", + requiredField, jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if (!jsonObj.get("variable_identifier").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `variable_identifier` to be a primitive type in" + + " the JSON string but got `%s`", + jsonObj.get("variable_identifier").toString())); + } + // ensure the required json array is present + if (jsonObj.get("variable_values") == null) { + throw new IllegalArgumentException( + "Expected the field `linkedContent` to be an array in the JSON string but got" + + " `null`"); + } else if (!jsonObj.get("variable_values").isJsonArray()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `variable_values` to be an array in the JSON" + + " string but got `%s`", + jsonObj.get("variable_values").toString())); + } + if (!jsonObj.get("operation").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `operation` to be a primitive type in the JSON" + + " string but got `%s`", + jsonObj.get("operation").toString())); + } + // validate the required field `operation` + OperationEnum.validateJsonElement(jsonObj.get("operation")); + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!VariableUpdateAssignmentInput.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'VariableUpdateAssignmentInput' and its + // subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter = + gson.getDelegateAdapter( + this, TypeToken.get(VariableUpdateAssignmentInput.class)); + + return (TypeAdapter) + new TypeAdapter() { + @Override + public void write(JsonWriter out, VariableUpdateAssignmentInput value) + throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + obj.remove("additionalProperties"); + // serialize additional properties + if (value.getAdditionalProperties() != null) { + for (Map.Entry entry : + value.getAdditionalProperties().entrySet()) { + if (entry.getValue() instanceof String) + obj.addProperty(entry.getKey(), (String) entry.getValue()); + else if (entry.getValue() instanceof Number) + obj.addProperty(entry.getKey(), (Number) entry.getValue()); + else if (entry.getValue() instanceof Boolean) + obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); + else if (entry.getValue() instanceof Character) + obj.addProperty( + entry.getKey(), (Character) entry.getValue()); + else { + JsonElement jsonElement = gson.toJsonTree(entry.getValue()); + if (jsonElement.isJsonArray()) { + obj.add(entry.getKey(), jsonElement.getAsJsonArray()); + } else { + obj.add(entry.getKey(), jsonElement.getAsJsonObject()); + } + } + } + } + elementAdapter.write(out, obj); + } + + @Override + public VariableUpdateAssignmentInput read(JsonReader in) + throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // store additional fields in the deserialized instance + VariableUpdateAssignmentInput instance = + thisAdapter.fromJsonTree(jsonObj); + for (Map.Entry entry : jsonObj.entrySet()) { + if (!openapiFields.contains(entry.getKey())) { + if (entry.getValue().isJsonPrimitive()) { // primitive type + if (entry.getValue().getAsJsonPrimitive().isString()) + instance.putAdditionalProperty( + entry.getKey(), entry.getValue().getAsString()); + else if (entry.getValue().getAsJsonPrimitive().isNumber()) + instance.putAdditionalProperty( + entry.getKey(), entry.getValue().getAsNumber()); + else if (entry.getValue().getAsJsonPrimitive().isBoolean()) + instance.putAdditionalProperty( + entry.getKey(), + entry.getValue().getAsBoolean()); + else + throw new IllegalArgumentException( + String.format( + "The field `%s` has unknown primitive" + + " type. Value: %s", + entry.getKey(), + entry.getValue().toString())); + } else if (entry.getValue().isJsonArray()) { + instance.putAdditionalProperty( + entry.getKey(), + gson.fromJson(entry.getValue(), List.class)); + } else { // JSON object + instance.putAdditionalProperty( + entry.getKey(), + gson.fromJson(entry.getValue(), HashMap.class)); + } + } + } + return instance; + } + }.nullSafe(); + } + } + + /** + * Create an instance of VariableUpdateAssignmentInput given an JSON string + * + * @param jsonString JSON string + * @return An instance of VariableUpdateAssignmentInput + * @throws IOException if the JSON string is invalid with respect to + * VariableUpdateAssignmentInput + */ + public static VariableUpdateAssignmentInput fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, VariableUpdateAssignmentInput.class); + } + + /** + * Convert an instance of VariableUpdateAssignmentInput to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} diff --git a/sdks/java/src/main/java/com/thoughtspot/client/model/VariableUpdateScopeInput.java b/sdks/java/src/main/java/com/thoughtspot/client/model/VariableUpdateScopeInput.java new file mode 100644 index 000000000..7b05cd17e --- /dev/null +++ b/sdks/java/src/main/java/com/thoughtspot/client/model/VariableUpdateScopeInput.java @@ -0,0 +1,533 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client.model; + +import com.google.gson.Gson; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.TypeAdapter; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.reflect.TypeToken; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import com.thoughtspot.client.JSON; +import java.io.IOException; +import java.io.Serializable; +import java.util.Arrays; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Objects; +import org.openapitools.jackson.nullable.JsonNullable; + +/** Input for defining the scope of variable value assignments in batch update operations */ +@javax.annotation.Generated( + value = "org.openapitools.codegen.languages.JavaClientCodegen", + comments = "Generator version: 7.12.0") +public class VariableUpdateScopeInput implements Serializable { + private static final long serialVersionUID = 1L; + + public static final String SERIALIZED_NAME_ORG_IDENTIFIER = "org_identifier"; + + @SerializedName(SERIALIZED_NAME_ORG_IDENTIFIER) + @javax.annotation.Nonnull + private String orgIdentifier; + + /** + * Type of principal to which the variable value applies. Use USER to assign values to a + * specific user, or USER_GROUP to assign values to a group. + */ + @JsonAdapter(PrincipalTypeEnum.Adapter.class) + public enum PrincipalTypeEnum { + USER("USER"), + + USER_GROUP("USER_GROUP"); + + private String value; + + PrincipalTypeEnum(String value) { + this.value = value; + } + + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + public static PrincipalTypeEnum fromValue(String value) { + for (PrincipalTypeEnum b : PrincipalTypeEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + return null; + } + + public static class Adapter extends TypeAdapter { + @Override + public void write(final JsonWriter jsonWriter, final PrincipalTypeEnum enumeration) + throws IOException { + jsonWriter.value(enumeration.getValue()); + } + + @Override + public PrincipalTypeEnum read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + return PrincipalTypeEnum.fromValue(value); + } + } + + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + String value = jsonElement.getAsString(); + PrincipalTypeEnum.fromValue(value); + } + } + + public static final String SERIALIZED_NAME_PRINCIPAL_TYPE = "principal_type"; + + @SerializedName(SERIALIZED_NAME_PRINCIPAL_TYPE) + @javax.annotation.Nullable + private PrincipalTypeEnum principalType; + + public static final String SERIALIZED_NAME_PRINCIPAL_IDENTIFIER = "principal_identifier"; + + @SerializedName(SERIALIZED_NAME_PRINCIPAL_IDENTIFIER) + @javax.annotation.Nullable + private String principalIdentifier; + + public static final String SERIALIZED_NAME_MODEL_IDENTIFIER = "model_identifier"; + + @SerializedName(SERIALIZED_NAME_MODEL_IDENTIFIER) + @javax.annotation.Nullable + private String modelIdentifier; + + public static final String SERIALIZED_NAME_PRIORITY = "priority"; + + @SerializedName(SERIALIZED_NAME_PRIORITY) + @javax.annotation.Nullable + private Integer priority; + + public VariableUpdateScopeInput() {} + + public VariableUpdateScopeInput orgIdentifier(@javax.annotation.Nonnull String orgIdentifier) { + this.orgIdentifier = orgIdentifier; + return this; + } + + /** + * The unique name of the org + * + * @return orgIdentifier + */ + @javax.annotation.Nonnull + public String getOrgIdentifier() { + return orgIdentifier; + } + + public void setOrgIdentifier(@javax.annotation.Nonnull String orgIdentifier) { + this.orgIdentifier = orgIdentifier; + } + + public VariableUpdateScopeInput principalType( + @javax.annotation.Nullable PrincipalTypeEnum principalType) { + this.principalType = principalType; + return this; + } + + /** + * Type of principal to which the variable value applies. Use USER to assign values to a + * specific user, or USER_GROUP to assign values to a group. + * + * @return principalType + */ + @javax.annotation.Nullable + public PrincipalTypeEnum getPrincipalType() { + return principalType; + } + + public void setPrincipalType(@javax.annotation.Nullable PrincipalTypeEnum principalType) { + this.principalType = principalType; + } + + public VariableUpdateScopeInput principalIdentifier( + @javax.annotation.Nullable String principalIdentifier) { + this.principalIdentifier = principalIdentifier; + return this; + } + + /** + * Unique ID or name of the principal + * + * @return principalIdentifier + */ + @javax.annotation.Nullable + public String getPrincipalIdentifier() { + return principalIdentifier; + } + + public void setPrincipalIdentifier(@javax.annotation.Nullable String principalIdentifier) { + this.principalIdentifier = principalIdentifier; + } + + public VariableUpdateScopeInput modelIdentifier( + @javax.annotation.Nullable String modelIdentifier) { + this.modelIdentifier = modelIdentifier; + return this; + } + + /** + * Unique ID or name of the model. Required for FORMULA_VARIABLE type to scope the variable + * value to a specific worksheet. + * + * @return modelIdentifier + */ + @javax.annotation.Nullable + public String getModelIdentifier() { + return modelIdentifier; + } + + public void setModelIdentifier(@javax.annotation.Nullable String modelIdentifier) { + this.modelIdentifier = modelIdentifier; + } + + public VariableUpdateScopeInput priority(@javax.annotation.Nullable Integer priority) { + this.priority = priority; + return this; + } + + /** + * The priority level for this scope assignment, used for conflict resolution when multiple + * values match. Higher priority values (larger numbers) take precedence. + * + * @return priority + */ + @javax.annotation.Nullable + public Integer getPriority() { + return priority; + } + + public void setPriority(@javax.annotation.Nullable Integer priority) { + this.priority = priority; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key name of the property + * @param value value of the property + * @return the VariableUpdateScopeInput instance itself + */ + public VariableUpdateScopeInput putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return a map of objects + */ + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key name of the property + * @return an object + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + VariableUpdateScopeInput variableUpdateScopeInput = (VariableUpdateScopeInput) o; + return Objects.equals(this.orgIdentifier, variableUpdateScopeInput.orgIdentifier) + && Objects.equals(this.principalType, variableUpdateScopeInput.principalType) + && Objects.equals( + this.principalIdentifier, variableUpdateScopeInput.principalIdentifier) + && Objects.equals(this.modelIdentifier, variableUpdateScopeInput.modelIdentifier) + && Objects.equals(this.priority, variableUpdateScopeInput.priority) + && Objects.equals( + this.additionalProperties, variableUpdateScopeInput.additionalProperties); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b + || (a != null + && b != null + && a.isPresent() + && b.isPresent() + && Objects.deepEquals(a.get(), b.get())); + } + + @Override + public int hashCode() { + return Objects.hash( + orgIdentifier, + principalType, + principalIdentifier, + modelIdentifier, + priority, + additionalProperties); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; + } + return a.isPresent() ? Arrays.deepHashCode(new Object[] {a.get()}) : 31; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class VariableUpdateScopeInput {\n"); + sb.append(" orgIdentifier: ").append(toIndentedString(orgIdentifier)).append("\n"); + sb.append(" principalType: ").append(toIndentedString(principalType)).append("\n"); + sb.append(" principalIdentifier: ") + .append(toIndentedString(principalIdentifier)) + .append("\n"); + sb.append(" modelIdentifier: ").append(toIndentedString(modelIdentifier)).append("\n"); + sb.append(" priority: ").append(toIndentedString(priority)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first + * line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("org_identifier"); + openapiFields.add("principal_type"); + openapiFields.add("principal_identifier"); + openapiFields.add("model_identifier"); + openapiFields.add("priority"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + openapiRequiredFields.add("org_identifier"); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to VariableUpdateScopeInput + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!VariableUpdateScopeInput.openapiRequiredFields + .isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException( + String.format( + "The required field(s) %s in VariableUpdateScopeInput is not found" + + " in the empty JSON string", + VariableUpdateScopeInput.openapiRequiredFields.toString())); + } + } + + // check to make sure all required properties/fields are present in the JSON string + for (String requiredField : VariableUpdateScopeInput.openapiRequiredFields) { + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException( + String.format( + "The required field `%s` is not found in the JSON string: %s", + requiredField, jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if (!jsonObj.get("org_identifier").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `org_identifier` to be a primitive type in the" + + " JSON string but got `%s`", + jsonObj.get("org_identifier").toString())); + } + if ((jsonObj.get("principal_type") != null && !jsonObj.get("principal_type").isJsonNull()) + && !jsonObj.get("principal_type").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `principal_type` to be a primitive type in the" + + " JSON string but got `%s`", + jsonObj.get("principal_type").toString())); + } + // validate the optional field `principal_type` + if (jsonObj.get("principal_type") != null && !jsonObj.get("principal_type").isJsonNull()) { + PrincipalTypeEnum.validateJsonElement(jsonObj.get("principal_type")); + } + if ((jsonObj.get("principal_identifier") != null + && !jsonObj.get("principal_identifier").isJsonNull()) + && !jsonObj.get("principal_identifier").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `principal_identifier` to be a primitive type in" + + " the JSON string but got `%s`", + jsonObj.get("principal_identifier").toString())); + } + if ((jsonObj.get("model_identifier") != null + && !jsonObj.get("model_identifier").isJsonNull()) + && !jsonObj.get("model_identifier").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `model_identifier` to be a primitive type in the" + + " JSON string but got `%s`", + jsonObj.get("model_identifier").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!VariableUpdateScopeInput.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'VariableUpdateScopeInput' and its + // subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter = + gson.getDelegateAdapter(this, TypeToken.get(VariableUpdateScopeInput.class)); + + return (TypeAdapter) + new TypeAdapter() { + @Override + public void write(JsonWriter out, VariableUpdateScopeInput value) + throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + obj.remove("additionalProperties"); + // serialize additional properties + if (value.getAdditionalProperties() != null) { + for (Map.Entry entry : + value.getAdditionalProperties().entrySet()) { + if (entry.getValue() instanceof String) + obj.addProperty(entry.getKey(), (String) entry.getValue()); + else if (entry.getValue() instanceof Number) + obj.addProperty(entry.getKey(), (Number) entry.getValue()); + else if (entry.getValue() instanceof Boolean) + obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); + else if (entry.getValue() instanceof Character) + obj.addProperty( + entry.getKey(), (Character) entry.getValue()); + else { + JsonElement jsonElement = gson.toJsonTree(entry.getValue()); + if (jsonElement.isJsonArray()) { + obj.add(entry.getKey(), jsonElement.getAsJsonArray()); + } else { + obj.add(entry.getKey(), jsonElement.getAsJsonObject()); + } + } + } + } + elementAdapter.write(out, obj); + } + + @Override + public VariableUpdateScopeInput read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // store additional fields in the deserialized instance + VariableUpdateScopeInput instance = thisAdapter.fromJsonTree(jsonObj); + for (Map.Entry entry : jsonObj.entrySet()) { + if (!openapiFields.contains(entry.getKey())) { + if (entry.getValue().isJsonPrimitive()) { // primitive type + if (entry.getValue().getAsJsonPrimitive().isString()) + instance.putAdditionalProperty( + entry.getKey(), entry.getValue().getAsString()); + else if (entry.getValue().getAsJsonPrimitive().isNumber()) + instance.putAdditionalProperty( + entry.getKey(), entry.getValue().getAsNumber()); + else if (entry.getValue().getAsJsonPrimitive().isBoolean()) + instance.putAdditionalProperty( + entry.getKey(), + entry.getValue().getAsBoolean()); + else + throw new IllegalArgumentException( + String.format( + "The field `%s` has unknown primitive" + + " type. Value: %s", + entry.getKey(), + entry.getValue().toString())); + } else if (entry.getValue().isJsonArray()) { + instance.putAdditionalProperty( + entry.getKey(), + gson.fromJson(entry.getValue(), List.class)); + } else { // JSON object + instance.putAdditionalProperty( + entry.getKey(), + gson.fromJson(entry.getValue(), HashMap.class)); + } + } + } + return instance; + } + }.nullSafe(); + } + } + + /** + * Create an instance of VariableUpdateScopeInput given an JSON string + * + * @param jsonString JSON string + * @return An instance of VariableUpdateScopeInput + * @throws IOException if the JSON string is invalid with respect to VariableUpdateScopeInput + */ + public static VariableUpdateScopeInput fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, VariableUpdateScopeInput.class); + } + + /** + * Convert an instance of VariableUpdateScopeInput to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} diff --git a/sdks/java/src/main/java/com/thoughtspot/client/model/VariableValue.java b/sdks/java/src/main/java/com/thoughtspot/client/model/VariableValue.java new file mode 100644 index 000000000..2d6835438 --- /dev/null +++ b/sdks/java/src/main/java/com/thoughtspot/client/model/VariableValue.java @@ -0,0 +1,611 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client.model; + +import com.google.gson.Gson; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.TypeAdapter; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.reflect.TypeToken; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import com.thoughtspot.client.JSON; +import java.io.IOException; +import java.io.Serializable; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Objects; +import org.openapitools.jackson.nullable.JsonNullable; + +/** VariableValue */ +@javax.annotation.Generated( + value = "org.openapitools.codegen.languages.JavaClientCodegen", + comments = "Generator version: 7.12.0") +public class VariableValue implements Serializable { + private static final long serialVersionUID = 1L; + + public static final String SERIALIZED_NAME_VALUE = "value"; + + @SerializedName(SERIALIZED_NAME_VALUE) + @javax.annotation.Nullable + private String value; + + public static final String SERIALIZED_NAME_VALUE_LIST = "value_list"; + + @SerializedName(SERIALIZED_NAME_VALUE_LIST) + @javax.annotation.Nullable + private List valueList; + + public static final String SERIALIZED_NAME_ORG_IDENTIFIER = "org_identifier"; + + @SerializedName(SERIALIZED_NAME_ORG_IDENTIFIER) + @javax.annotation.Nonnull + private String orgIdentifier; + + /** + * Type of principal to which this value applies. Use USER to assign the value to a specific + * user, or USER_GROUP to assign it to a group. + */ + @JsonAdapter(PrincipalTypeEnum.Adapter.class) + public enum PrincipalTypeEnum { + USER("USER"), + + USER_GROUP("USER_GROUP"); + + private String value; + + PrincipalTypeEnum(String value) { + this.value = value; + } + + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + public static PrincipalTypeEnum fromValue(String value) { + for (PrincipalTypeEnum b : PrincipalTypeEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + return null; + } + + public static class Adapter extends TypeAdapter { + @Override + public void write(final JsonWriter jsonWriter, final PrincipalTypeEnum enumeration) + throws IOException { + jsonWriter.value(enumeration.getValue()); + } + + @Override + public PrincipalTypeEnum read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + return PrincipalTypeEnum.fromValue(value); + } + } + + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + String value = jsonElement.getAsString(); + PrincipalTypeEnum.fromValue(value); + } + } + + public static final String SERIALIZED_NAME_PRINCIPAL_TYPE = "principal_type"; + + @SerializedName(SERIALIZED_NAME_PRINCIPAL_TYPE) + @javax.annotation.Nullable + private PrincipalTypeEnum principalType; + + public static final String SERIALIZED_NAME_PRINCIPAL_IDENTIFIER = "principal_identifier"; + + @SerializedName(SERIALIZED_NAME_PRINCIPAL_IDENTIFIER) + @javax.annotation.Nullable + private String principalIdentifier; + + public static final String SERIALIZED_NAME_MODEL_IDENTIFIER = "model_identifier"; + + @SerializedName(SERIALIZED_NAME_MODEL_IDENTIFIER) + @javax.annotation.Nullable + private String modelIdentifier; + + public static final String SERIALIZED_NAME_PRIORITY = "priority"; + + @SerializedName(SERIALIZED_NAME_PRIORITY) + @javax.annotation.Nullable + private Integer priority; + + public VariableValue() {} + + public VariableValue value(@javax.annotation.Nullable String value) { + this.value = value; + return this; + } + + /** + * The value of the variable + * + * @return value + */ + @javax.annotation.Nullable + public String getValue() { + return value; + } + + public void setValue(@javax.annotation.Nullable String value) { + this.value = value; + } + + public VariableValue valueList(@javax.annotation.Nullable List valueList) { + this.valueList = valueList; + return this; + } + + public VariableValue addValueListItem(String valueListItem) { + if (this.valueList == null) { + this.valueList = new ArrayList<>(); + } + this.valueList.add(valueListItem); + return this; + } + + /** + * The value of the variable if it is a list type + * + * @return valueList + */ + @javax.annotation.Nullable + public List getValueList() { + return valueList; + } + + public void setValueList(@javax.annotation.Nullable List valueList) { + this.valueList = valueList; + } + + public VariableValue orgIdentifier(@javax.annotation.Nonnull String orgIdentifier) { + this.orgIdentifier = orgIdentifier; + return this; + } + + /** + * The unique name of the org + * + * @return orgIdentifier + */ + @javax.annotation.Nonnull + public String getOrgIdentifier() { + return orgIdentifier; + } + + public void setOrgIdentifier(@javax.annotation.Nonnull String orgIdentifier) { + this.orgIdentifier = orgIdentifier; + } + + public VariableValue principalType(@javax.annotation.Nullable PrincipalTypeEnum principalType) { + this.principalType = principalType; + return this; + } + + /** + * Type of principal to which this value applies. Use USER to assign the value to a specific + * user, or USER_GROUP to assign it to a group. + * + * @return principalType + */ + @javax.annotation.Nullable + public PrincipalTypeEnum getPrincipalType() { + return principalType; + } + + public void setPrincipalType(@javax.annotation.Nullable PrincipalTypeEnum principalType) { + this.principalType = principalType; + } + + public VariableValue principalIdentifier( + @javax.annotation.Nullable String principalIdentifier) { + this.principalIdentifier = principalIdentifier; + return this; + } + + /** + * Unique ID or name of the principal + * + * @return principalIdentifier + */ + @javax.annotation.Nullable + public String getPrincipalIdentifier() { + return principalIdentifier; + } + + public void setPrincipalIdentifier(@javax.annotation.Nullable String principalIdentifier) { + this.principalIdentifier = principalIdentifier; + } + + public VariableValue modelIdentifier(@javax.annotation.Nullable String modelIdentifier) { + this.modelIdentifier = modelIdentifier; + return this; + } + + /** + * Unique ID of the model Version: 26.3.0.cl or later + * + * @return modelIdentifier + */ + @javax.annotation.Nullable + public String getModelIdentifier() { + return modelIdentifier; + } + + public void setModelIdentifier(@javax.annotation.Nullable String modelIdentifier) { + this.modelIdentifier = modelIdentifier; + } + + public VariableValue priority(@javax.annotation.Nullable Integer priority) { + this.priority = priority; + return this; + } + + /** + * The priority assigned to this value. If there are 2 matching values, the one with the higher + * priority will be picked. + * + * @return priority + */ + @javax.annotation.Nullable + public Integer getPriority() { + return priority; + } + + public void setPriority(@javax.annotation.Nullable Integer priority) { + this.priority = priority; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key name of the property + * @param value value of the property + * @return the VariableValue instance itself + */ + public VariableValue putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return a map of objects + */ + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key name of the property + * @return an object + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + VariableValue variableValue = (VariableValue) o; + return Objects.equals(this.value, variableValue.value) + && Objects.equals(this.valueList, variableValue.valueList) + && Objects.equals(this.orgIdentifier, variableValue.orgIdentifier) + && Objects.equals(this.principalType, variableValue.principalType) + && Objects.equals(this.principalIdentifier, variableValue.principalIdentifier) + && Objects.equals(this.modelIdentifier, variableValue.modelIdentifier) + && Objects.equals(this.priority, variableValue.priority) + && Objects.equals(this.additionalProperties, variableValue.additionalProperties); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b + || (a != null + && b != null + && a.isPresent() + && b.isPresent() + && Objects.deepEquals(a.get(), b.get())); + } + + @Override + public int hashCode() { + return Objects.hash( + value, + valueList, + orgIdentifier, + principalType, + principalIdentifier, + modelIdentifier, + priority, + additionalProperties); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; + } + return a.isPresent() ? Arrays.deepHashCode(new Object[] {a.get()}) : 31; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class VariableValue {\n"); + sb.append(" value: ").append(toIndentedString(value)).append("\n"); + sb.append(" valueList: ").append(toIndentedString(valueList)).append("\n"); + sb.append(" orgIdentifier: ").append(toIndentedString(orgIdentifier)).append("\n"); + sb.append(" principalType: ").append(toIndentedString(principalType)).append("\n"); + sb.append(" principalIdentifier: ") + .append(toIndentedString(principalIdentifier)) + .append("\n"); + sb.append(" modelIdentifier: ").append(toIndentedString(modelIdentifier)).append("\n"); + sb.append(" priority: ").append(toIndentedString(priority)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first + * line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("value"); + openapiFields.add("value_list"); + openapiFields.add("org_identifier"); + openapiFields.add("principal_type"); + openapiFields.add("principal_identifier"); + openapiFields.add("model_identifier"); + openapiFields.add("priority"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + openapiRequiredFields.add("org_identifier"); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to VariableValue + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!VariableValue.openapiRequiredFields + .isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException( + String.format( + "The required field(s) %s in VariableValue is not found in the" + + " empty JSON string", + VariableValue.openapiRequiredFields.toString())); + } + } + + // check to make sure all required properties/fields are present in the JSON string + for (String requiredField : VariableValue.openapiRequiredFields) { + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException( + String.format( + "The required field `%s` is not found in the JSON string: %s", + requiredField, jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if ((jsonObj.get("value") != null && !jsonObj.get("value").isJsonNull()) + && !jsonObj.get("value").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `value` to be a primitive type in the JSON string" + + " but got `%s`", + jsonObj.get("value").toString())); + } + // ensure the optional json data is an array if present + if (jsonObj.get("value_list") != null + && !jsonObj.get("value_list").isJsonNull() + && !jsonObj.get("value_list").isJsonArray()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `value_list` to be an array in the JSON string but" + + " got `%s`", + jsonObj.get("value_list").toString())); + } + if (!jsonObj.get("org_identifier").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `org_identifier` to be a primitive type in the" + + " JSON string but got `%s`", + jsonObj.get("org_identifier").toString())); + } + if ((jsonObj.get("principal_type") != null && !jsonObj.get("principal_type").isJsonNull()) + && !jsonObj.get("principal_type").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `principal_type` to be a primitive type in the" + + " JSON string but got `%s`", + jsonObj.get("principal_type").toString())); + } + // validate the optional field `principal_type` + if (jsonObj.get("principal_type") != null && !jsonObj.get("principal_type").isJsonNull()) { + PrincipalTypeEnum.validateJsonElement(jsonObj.get("principal_type")); + } + if ((jsonObj.get("principal_identifier") != null + && !jsonObj.get("principal_identifier").isJsonNull()) + && !jsonObj.get("principal_identifier").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `principal_identifier` to be a primitive type in" + + " the JSON string but got `%s`", + jsonObj.get("principal_identifier").toString())); + } + if ((jsonObj.get("model_identifier") != null + && !jsonObj.get("model_identifier").isJsonNull()) + && !jsonObj.get("model_identifier").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `model_identifier` to be a primitive type in the" + + " JSON string but got `%s`", + jsonObj.get("model_identifier").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!VariableValue.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'VariableValue' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter = + gson.getDelegateAdapter(this, TypeToken.get(VariableValue.class)); + + return (TypeAdapter) + new TypeAdapter() { + @Override + public void write(JsonWriter out, VariableValue value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + obj.remove("additionalProperties"); + // serialize additional properties + if (value.getAdditionalProperties() != null) { + for (Map.Entry entry : + value.getAdditionalProperties().entrySet()) { + if (entry.getValue() instanceof String) + obj.addProperty(entry.getKey(), (String) entry.getValue()); + else if (entry.getValue() instanceof Number) + obj.addProperty(entry.getKey(), (Number) entry.getValue()); + else if (entry.getValue() instanceof Boolean) + obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); + else if (entry.getValue() instanceof Character) + obj.addProperty( + entry.getKey(), (Character) entry.getValue()); + else { + JsonElement jsonElement = gson.toJsonTree(entry.getValue()); + if (jsonElement.isJsonArray()) { + obj.add(entry.getKey(), jsonElement.getAsJsonArray()); + } else { + obj.add(entry.getKey(), jsonElement.getAsJsonObject()); + } + } + } + } + elementAdapter.write(out, obj); + } + + @Override + public VariableValue read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // store additional fields in the deserialized instance + VariableValue instance = thisAdapter.fromJsonTree(jsonObj); + for (Map.Entry entry : jsonObj.entrySet()) { + if (!openapiFields.contains(entry.getKey())) { + if (entry.getValue().isJsonPrimitive()) { // primitive type + if (entry.getValue().getAsJsonPrimitive().isString()) + instance.putAdditionalProperty( + entry.getKey(), entry.getValue().getAsString()); + else if (entry.getValue().getAsJsonPrimitive().isNumber()) + instance.putAdditionalProperty( + entry.getKey(), entry.getValue().getAsNumber()); + else if (entry.getValue().getAsJsonPrimitive().isBoolean()) + instance.putAdditionalProperty( + entry.getKey(), + entry.getValue().getAsBoolean()); + else + throw new IllegalArgumentException( + String.format( + "The field `%s` has unknown primitive" + + " type. Value: %s", + entry.getKey(), + entry.getValue().toString())); + } else if (entry.getValue().isJsonArray()) { + instance.putAdditionalProperty( + entry.getKey(), + gson.fromJson(entry.getValue(), List.class)); + } else { // JSON object + instance.putAdditionalProperty( + entry.getKey(), + gson.fromJson(entry.getValue(), HashMap.class)); + } + } + } + return instance; + } + }.nullSafe(); + } + } + + /** + * Create an instance of VariableValue given an JSON string + * + * @param jsonString JSON string + * @return An instance of VariableValue + * @throws IOException if the JSON string is invalid with respect to VariableValue + */ + public static VariableValue fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, VariableValue.class); + } + + /** + * Convert an instance of VariableValue to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} diff --git a/sdks/java/src/main/java/com/thoughtspot/client/model/VariableValues.java b/sdks/java/src/main/java/com/thoughtspot/client/model/VariableValues.java new file mode 100644 index 000000000..8dc819642 --- /dev/null +++ b/sdks/java/src/main/java/com/thoughtspot/client/model/VariableValues.java @@ -0,0 +1,350 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client.model; + +import com.google.gson.Gson; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.TypeAdapter; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.annotations.SerializedName; +import com.google.gson.reflect.TypeToken; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import com.thoughtspot.client.JSON; +import java.io.IOException; +import java.io.Serializable; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Objects; + +/** Variable values. */ +@javax.annotation.Generated( + value = "org.openapitools.codegen.languages.JavaClientCodegen", + comments = "Generator version: 7.12.0") +public class VariableValues implements Serializable { + private static final long serialVersionUID = 1L; + + public static final String SERIALIZED_NAME_NAME = "name"; + + @SerializedName(SERIALIZED_NAME_NAME) + @javax.annotation.Nonnull + private String name; + + public static final String SERIALIZED_NAME_VALUES = "values"; + + @SerializedName(SERIALIZED_NAME_VALUES) + @javax.annotation.Nonnull + private List values; + + public VariableValues() {} + + public VariableValues name(@javax.annotation.Nonnull String name) { + this.name = name; + return this; + } + + /** + * The name of the existing formula variable. + * + * @return name + */ + @javax.annotation.Nonnull + public String getName() { + return name; + } + + public void setName(@javax.annotation.Nonnull String name) { + this.name = name; + } + + public VariableValues values(@javax.annotation.Nonnull List values) { + this.values = values; + return this; + } + + public VariableValues addValuesItem(Object valuesItem) { + if (this.values == null) { + this.values = new ArrayList<>(); + } + this.values.add(valuesItem); + return this; + } + + /** + * The values to filter on. + * + * @return values + */ + @javax.annotation.Nonnull + public List getValues() { + return values; + } + + public void setValues(@javax.annotation.Nonnull List values) { + this.values = values; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key name of the property + * @param value value of the property + * @return the VariableValues instance itself + */ + public VariableValues putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return a map of objects + */ + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key name of the property + * @return an object + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + VariableValues variableValues = (VariableValues) o; + return Objects.equals(this.name, variableValues.name) + && Objects.equals(this.values, variableValues.values) + && Objects.equals(this.additionalProperties, variableValues.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(name, values, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class VariableValues {\n"); + sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append(" values: ").append(toIndentedString(values)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first + * line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("name"); + openapiFields.add("values"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + openapiRequiredFields.add("name"); + openapiRequiredFields.add("values"); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to VariableValues + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!VariableValues.openapiRequiredFields + .isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException( + String.format( + "The required field(s) %s in VariableValues is not found in the" + + " empty JSON string", + VariableValues.openapiRequiredFields.toString())); + } + } + + // check to make sure all required properties/fields are present in the JSON string + for (String requiredField : VariableValues.openapiRequiredFields) { + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException( + String.format( + "The required field `%s` is not found in the JSON string: %s", + requiredField, jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if (!jsonObj.get("name").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `name` to be a primitive type in the JSON string" + + " but got `%s`", + jsonObj.get("name").toString())); + } + // ensure the required json array is present + if (jsonObj.get("values") == null) { + throw new IllegalArgumentException( + "Expected the field `linkedContent` to be an array in the JSON string but got" + + " `null`"); + } else if (!jsonObj.get("values").isJsonArray()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `values` to be an array in the JSON string but got" + + " `%s`", + jsonObj.get("values").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!VariableValues.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'VariableValues' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter = + gson.getDelegateAdapter(this, TypeToken.get(VariableValues.class)); + + return (TypeAdapter) + new TypeAdapter() { + @Override + public void write(JsonWriter out, VariableValues value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + obj.remove("additionalProperties"); + // serialize additional properties + if (value.getAdditionalProperties() != null) { + for (Map.Entry entry : + value.getAdditionalProperties().entrySet()) { + if (entry.getValue() instanceof String) + obj.addProperty(entry.getKey(), (String) entry.getValue()); + else if (entry.getValue() instanceof Number) + obj.addProperty(entry.getKey(), (Number) entry.getValue()); + else if (entry.getValue() instanceof Boolean) + obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); + else if (entry.getValue() instanceof Character) + obj.addProperty( + entry.getKey(), (Character) entry.getValue()); + else { + JsonElement jsonElement = gson.toJsonTree(entry.getValue()); + if (jsonElement.isJsonArray()) { + obj.add(entry.getKey(), jsonElement.getAsJsonArray()); + } else { + obj.add(entry.getKey(), jsonElement.getAsJsonObject()); + } + } + } + } + elementAdapter.write(out, obj); + } + + @Override + public VariableValues read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // store additional fields in the deserialized instance + VariableValues instance = thisAdapter.fromJsonTree(jsonObj); + for (Map.Entry entry : jsonObj.entrySet()) { + if (!openapiFields.contains(entry.getKey())) { + if (entry.getValue().isJsonPrimitive()) { // primitive type + if (entry.getValue().getAsJsonPrimitive().isString()) + instance.putAdditionalProperty( + entry.getKey(), entry.getValue().getAsString()); + else if (entry.getValue().getAsJsonPrimitive().isNumber()) + instance.putAdditionalProperty( + entry.getKey(), entry.getValue().getAsNumber()); + else if (entry.getValue().getAsJsonPrimitive().isBoolean()) + instance.putAdditionalProperty( + entry.getKey(), + entry.getValue().getAsBoolean()); + else + throw new IllegalArgumentException( + String.format( + "The field `%s` has unknown primitive" + + " type. Value: %s", + entry.getKey(), + entry.getValue().toString())); + } else if (entry.getValue().isJsonArray()) { + instance.putAdditionalProperty( + entry.getKey(), + gson.fromJson(entry.getValue(), List.class)); + } else { // JSON object + instance.putAdditionalProperty( + entry.getKey(), + gson.fromJson(entry.getValue(), HashMap.class)); + } + } + } + return instance; + } + }.nullSafe(); + } + } + + /** + * Create an instance of VariableValues given an JSON string + * + * @param jsonString JSON string + * @return An instance of VariableValues + * @throws IOException if the JSON string is invalid with respect to VariableValues + */ + public static VariableValues fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, VariableValues.class); + } + + /** + * Convert an instance of VariableValues to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} diff --git a/sdks/java/src/main/java/com/thoughtspot/client/model/WebhookAuthApiKey.java b/sdks/java/src/main/java/com/thoughtspot/client/model/WebhookAuthApiKey.java new file mode 100644 index 000000000..b64d25d96 --- /dev/null +++ b/sdks/java/src/main/java/com/thoughtspot/client/model/WebhookAuthApiKey.java @@ -0,0 +1,338 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client.model; + +import com.google.gson.Gson; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.TypeAdapter; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.annotations.SerializedName; +import com.google.gson.reflect.TypeToken; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import com.thoughtspot.client.JSON; +import java.io.IOException; +import java.io.Serializable; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Objects; + +/** WebhookAuthApiKey */ +@javax.annotation.Generated( + value = "org.openapitools.codegen.languages.JavaClientCodegen", + comments = "Generator version: 7.12.0") +public class WebhookAuthApiKey implements Serializable { + private static final long serialVersionUID = 1L; + + public static final String SERIALIZED_NAME_KEY = "key"; + + @SerializedName(SERIALIZED_NAME_KEY) + @javax.annotation.Nonnull + private String key; + + public static final String SERIALIZED_NAME_VALUE = "value"; + + @SerializedName(SERIALIZED_NAME_VALUE) + @javax.annotation.Nonnull + private String value; + + public WebhookAuthApiKey() {} + + public WebhookAuthApiKey key(@javax.annotation.Nonnull String key) { + this.key = key; + return this; + } + + /** + * The header or query parameter name for the API key. + * + * @return key + */ + @javax.annotation.Nonnull + public String getKey() { + return key; + } + + public void setKey(@javax.annotation.Nonnull String key) { + this.key = key; + } + + public WebhookAuthApiKey value(@javax.annotation.Nonnull String value) { + this.value = value; + return this; + } + + /** + * The API key value. + * + * @return value + */ + @javax.annotation.Nonnull + public String getValue() { + return value; + } + + public void setValue(@javax.annotation.Nonnull String value) { + this.value = value; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key name of the property + * @param value value of the property + * @return the WebhookAuthApiKey instance itself + */ + public WebhookAuthApiKey putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return a map of objects + */ + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key name of the property + * @return an object + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + WebhookAuthApiKey webhookAuthApiKey = (WebhookAuthApiKey) o; + return Objects.equals(this.key, webhookAuthApiKey.key) + && Objects.equals(this.value, webhookAuthApiKey.value) + && Objects.equals( + this.additionalProperties, webhookAuthApiKey.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(key, value, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class WebhookAuthApiKey {\n"); + sb.append(" key: ").append(toIndentedString(key)).append("\n"); + sb.append(" value: ").append(toIndentedString(value)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first + * line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("key"); + openapiFields.add("value"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + openapiRequiredFields.add("key"); + openapiRequiredFields.add("value"); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to WebhookAuthApiKey + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!WebhookAuthApiKey.openapiRequiredFields + .isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException( + String.format( + "The required field(s) %s in WebhookAuthApiKey is not found in the" + + " empty JSON string", + WebhookAuthApiKey.openapiRequiredFields.toString())); + } + } + + // check to make sure all required properties/fields are present in the JSON string + for (String requiredField : WebhookAuthApiKey.openapiRequiredFields) { + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException( + String.format( + "The required field `%s` is not found in the JSON string: %s", + requiredField, jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if (!jsonObj.get("key").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `key` to be a primitive type in the JSON string" + + " but got `%s`", + jsonObj.get("key").toString())); + } + if (!jsonObj.get("value").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `value` to be a primitive type in the JSON string" + + " but got `%s`", + jsonObj.get("value").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!WebhookAuthApiKey.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'WebhookAuthApiKey' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter = + gson.getDelegateAdapter(this, TypeToken.get(WebhookAuthApiKey.class)); + + return (TypeAdapter) + new TypeAdapter() { + @Override + public void write(JsonWriter out, WebhookAuthApiKey value) + throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + obj.remove("additionalProperties"); + // serialize additional properties + if (value.getAdditionalProperties() != null) { + for (Map.Entry entry : + value.getAdditionalProperties().entrySet()) { + if (entry.getValue() instanceof String) + obj.addProperty(entry.getKey(), (String) entry.getValue()); + else if (entry.getValue() instanceof Number) + obj.addProperty(entry.getKey(), (Number) entry.getValue()); + else if (entry.getValue() instanceof Boolean) + obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); + else if (entry.getValue() instanceof Character) + obj.addProperty( + entry.getKey(), (Character) entry.getValue()); + else { + JsonElement jsonElement = gson.toJsonTree(entry.getValue()); + if (jsonElement.isJsonArray()) { + obj.add(entry.getKey(), jsonElement.getAsJsonArray()); + } else { + obj.add(entry.getKey(), jsonElement.getAsJsonObject()); + } + } + } + } + elementAdapter.write(out, obj); + } + + @Override + public WebhookAuthApiKey read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // store additional fields in the deserialized instance + WebhookAuthApiKey instance = thisAdapter.fromJsonTree(jsonObj); + for (Map.Entry entry : jsonObj.entrySet()) { + if (!openapiFields.contains(entry.getKey())) { + if (entry.getValue().isJsonPrimitive()) { // primitive type + if (entry.getValue().getAsJsonPrimitive().isString()) + instance.putAdditionalProperty( + entry.getKey(), entry.getValue().getAsString()); + else if (entry.getValue().getAsJsonPrimitive().isNumber()) + instance.putAdditionalProperty( + entry.getKey(), entry.getValue().getAsNumber()); + else if (entry.getValue().getAsJsonPrimitive().isBoolean()) + instance.putAdditionalProperty( + entry.getKey(), + entry.getValue().getAsBoolean()); + else + throw new IllegalArgumentException( + String.format( + "The field `%s` has unknown primitive" + + " type. Value: %s", + entry.getKey(), + entry.getValue().toString())); + } else if (entry.getValue().isJsonArray()) { + instance.putAdditionalProperty( + entry.getKey(), + gson.fromJson(entry.getValue(), List.class)); + } else { // JSON object + instance.putAdditionalProperty( + entry.getKey(), + gson.fromJson(entry.getValue(), HashMap.class)); + } + } + } + return instance; + } + }.nullSafe(); + } + } + + /** + * Create an instance of WebhookAuthApiKey given an JSON string + * + * @param jsonString JSON string + * @return An instance of WebhookAuthApiKey + * @throws IOException if the JSON string is invalid with respect to WebhookAuthApiKey + */ + public static WebhookAuthApiKey fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, WebhookAuthApiKey.class); + } + + /** + * Convert an instance of WebhookAuthApiKey to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} diff --git a/sdks/java/src/main/java/com/thoughtspot/client/model/WebhookAuthApiKeyInput.java b/sdks/java/src/main/java/com/thoughtspot/client/model/WebhookAuthApiKeyInput.java new file mode 100644 index 000000000..2512ee032 --- /dev/null +++ b/sdks/java/src/main/java/com/thoughtspot/client/model/WebhookAuthApiKeyInput.java @@ -0,0 +1,338 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client.model; + +import com.google.gson.Gson; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.TypeAdapter; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.annotations.SerializedName; +import com.google.gson.reflect.TypeToken; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import com.thoughtspot.client.JSON; +import java.io.IOException; +import java.io.Serializable; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Objects; + +/** WebhookAuthApiKeyInput */ +@javax.annotation.Generated( + value = "org.openapitools.codegen.languages.JavaClientCodegen", + comments = "Generator version: 7.12.0") +public class WebhookAuthApiKeyInput implements Serializable { + private static final long serialVersionUID = 1L; + + public static final String SERIALIZED_NAME_KEY = "key"; + + @SerializedName(SERIALIZED_NAME_KEY) + @javax.annotation.Nonnull + private String key; + + public static final String SERIALIZED_NAME_VALUE = "value"; + + @SerializedName(SERIALIZED_NAME_VALUE) + @javax.annotation.Nonnull + private String value; + + public WebhookAuthApiKeyInput() {} + + public WebhookAuthApiKeyInput key(@javax.annotation.Nonnull String key) { + this.key = key; + return this; + } + + /** + * The header or query parameter name for the API key. + * + * @return key + */ + @javax.annotation.Nonnull + public String getKey() { + return key; + } + + public void setKey(@javax.annotation.Nonnull String key) { + this.key = key; + } + + public WebhookAuthApiKeyInput value(@javax.annotation.Nonnull String value) { + this.value = value; + return this; + } + + /** + * The API key value. + * + * @return value + */ + @javax.annotation.Nonnull + public String getValue() { + return value; + } + + public void setValue(@javax.annotation.Nonnull String value) { + this.value = value; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key name of the property + * @param value value of the property + * @return the WebhookAuthApiKeyInput instance itself + */ + public WebhookAuthApiKeyInput putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return a map of objects + */ + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key name of the property + * @return an object + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + WebhookAuthApiKeyInput webhookAuthApiKeyInput = (WebhookAuthApiKeyInput) o; + return Objects.equals(this.key, webhookAuthApiKeyInput.key) + && Objects.equals(this.value, webhookAuthApiKeyInput.value) + && Objects.equals( + this.additionalProperties, webhookAuthApiKeyInput.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(key, value, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class WebhookAuthApiKeyInput {\n"); + sb.append(" key: ").append(toIndentedString(key)).append("\n"); + sb.append(" value: ").append(toIndentedString(value)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first + * line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("key"); + openapiFields.add("value"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + openapiRequiredFields.add("key"); + openapiRequiredFields.add("value"); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to WebhookAuthApiKeyInput + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!WebhookAuthApiKeyInput.openapiRequiredFields + .isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException( + String.format( + "The required field(s) %s in WebhookAuthApiKeyInput is not found" + + " in the empty JSON string", + WebhookAuthApiKeyInput.openapiRequiredFields.toString())); + } + } + + // check to make sure all required properties/fields are present in the JSON string + for (String requiredField : WebhookAuthApiKeyInput.openapiRequiredFields) { + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException( + String.format( + "The required field `%s` is not found in the JSON string: %s", + requiredField, jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if (!jsonObj.get("key").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `key` to be a primitive type in the JSON string" + + " but got `%s`", + jsonObj.get("key").toString())); + } + if (!jsonObj.get("value").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `value` to be a primitive type in the JSON string" + + " but got `%s`", + jsonObj.get("value").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!WebhookAuthApiKeyInput.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'WebhookAuthApiKeyInput' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter = + gson.getDelegateAdapter(this, TypeToken.get(WebhookAuthApiKeyInput.class)); + + return (TypeAdapter) + new TypeAdapter() { + @Override + public void write(JsonWriter out, WebhookAuthApiKeyInput value) + throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + obj.remove("additionalProperties"); + // serialize additional properties + if (value.getAdditionalProperties() != null) { + for (Map.Entry entry : + value.getAdditionalProperties().entrySet()) { + if (entry.getValue() instanceof String) + obj.addProperty(entry.getKey(), (String) entry.getValue()); + else if (entry.getValue() instanceof Number) + obj.addProperty(entry.getKey(), (Number) entry.getValue()); + else if (entry.getValue() instanceof Boolean) + obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); + else if (entry.getValue() instanceof Character) + obj.addProperty( + entry.getKey(), (Character) entry.getValue()); + else { + JsonElement jsonElement = gson.toJsonTree(entry.getValue()); + if (jsonElement.isJsonArray()) { + obj.add(entry.getKey(), jsonElement.getAsJsonArray()); + } else { + obj.add(entry.getKey(), jsonElement.getAsJsonObject()); + } + } + } + } + elementAdapter.write(out, obj); + } + + @Override + public WebhookAuthApiKeyInput read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // store additional fields in the deserialized instance + WebhookAuthApiKeyInput instance = thisAdapter.fromJsonTree(jsonObj); + for (Map.Entry entry : jsonObj.entrySet()) { + if (!openapiFields.contains(entry.getKey())) { + if (entry.getValue().isJsonPrimitive()) { // primitive type + if (entry.getValue().getAsJsonPrimitive().isString()) + instance.putAdditionalProperty( + entry.getKey(), entry.getValue().getAsString()); + else if (entry.getValue().getAsJsonPrimitive().isNumber()) + instance.putAdditionalProperty( + entry.getKey(), entry.getValue().getAsNumber()); + else if (entry.getValue().getAsJsonPrimitive().isBoolean()) + instance.putAdditionalProperty( + entry.getKey(), + entry.getValue().getAsBoolean()); + else + throw new IllegalArgumentException( + String.format( + "The field `%s` has unknown primitive" + + " type. Value: %s", + entry.getKey(), + entry.getValue().toString())); + } else if (entry.getValue().isJsonArray()) { + instance.putAdditionalProperty( + entry.getKey(), + gson.fromJson(entry.getValue(), List.class)); + } else { // JSON object + instance.putAdditionalProperty( + entry.getKey(), + gson.fromJson(entry.getValue(), HashMap.class)); + } + } + } + return instance; + } + }.nullSafe(); + } + } + + /** + * Create an instance of WebhookAuthApiKeyInput given an JSON string + * + * @param jsonString JSON string + * @return An instance of WebhookAuthApiKeyInput + * @throws IOException if the JSON string is invalid with respect to WebhookAuthApiKeyInput + */ + public static WebhookAuthApiKeyInput fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, WebhookAuthApiKeyInput.class); + } + + /** + * Convert an instance of WebhookAuthApiKeyInput to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} diff --git a/sdks/java/src/main/java/com/thoughtspot/client/model/WebhookAuthBasicAuth.java b/sdks/java/src/main/java/com/thoughtspot/client/model/WebhookAuthBasicAuth.java new file mode 100644 index 000000000..07443acdf --- /dev/null +++ b/sdks/java/src/main/java/com/thoughtspot/client/model/WebhookAuthBasicAuth.java @@ -0,0 +1,338 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client.model; + +import com.google.gson.Gson; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.TypeAdapter; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.annotations.SerializedName; +import com.google.gson.reflect.TypeToken; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import com.thoughtspot.client.JSON; +import java.io.IOException; +import java.io.Serializable; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Objects; + +/** WebhookAuthBasicAuth */ +@javax.annotation.Generated( + value = "org.openapitools.codegen.languages.JavaClientCodegen", + comments = "Generator version: 7.12.0") +public class WebhookAuthBasicAuth implements Serializable { + private static final long serialVersionUID = 1L; + + public static final String SERIALIZED_NAME_USERNAME = "username"; + + @SerializedName(SERIALIZED_NAME_USERNAME) + @javax.annotation.Nonnull + private String username; + + public static final String SERIALIZED_NAME_PASSWORD = "password"; + + @SerializedName(SERIALIZED_NAME_PASSWORD) + @javax.annotation.Nonnull + private String password; + + public WebhookAuthBasicAuth() {} + + public WebhookAuthBasicAuth username(@javax.annotation.Nonnull String username) { + this.username = username; + return this; + } + + /** + * Username for basic authentication. + * + * @return username + */ + @javax.annotation.Nonnull + public String getUsername() { + return username; + } + + public void setUsername(@javax.annotation.Nonnull String username) { + this.username = username; + } + + public WebhookAuthBasicAuth password(@javax.annotation.Nonnull String password) { + this.password = password; + return this; + } + + /** + * Password for basic authentication. + * + * @return password + */ + @javax.annotation.Nonnull + public String getPassword() { + return password; + } + + public void setPassword(@javax.annotation.Nonnull String password) { + this.password = password; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key name of the property + * @param value value of the property + * @return the WebhookAuthBasicAuth instance itself + */ + public WebhookAuthBasicAuth putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return a map of objects + */ + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key name of the property + * @return an object + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + WebhookAuthBasicAuth webhookAuthBasicAuth = (WebhookAuthBasicAuth) o; + return Objects.equals(this.username, webhookAuthBasicAuth.username) + && Objects.equals(this.password, webhookAuthBasicAuth.password) + && Objects.equals( + this.additionalProperties, webhookAuthBasicAuth.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(username, password, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class WebhookAuthBasicAuth {\n"); + sb.append(" username: ").append(toIndentedString(username)).append("\n"); + sb.append(" password: ").append(toIndentedString(password)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first + * line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("username"); + openapiFields.add("password"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + openapiRequiredFields.add("username"); + openapiRequiredFields.add("password"); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to WebhookAuthBasicAuth + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!WebhookAuthBasicAuth.openapiRequiredFields + .isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException( + String.format( + "The required field(s) %s in WebhookAuthBasicAuth is not found in" + + " the empty JSON string", + WebhookAuthBasicAuth.openapiRequiredFields.toString())); + } + } + + // check to make sure all required properties/fields are present in the JSON string + for (String requiredField : WebhookAuthBasicAuth.openapiRequiredFields) { + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException( + String.format( + "The required field `%s` is not found in the JSON string: %s", + requiredField, jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if (!jsonObj.get("username").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `username` to be a primitive type in the JSON" + + " string but got `%s`", + jsonObj.get("username").toString())); + } + if (!jsonObj.get("password").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `password` to be a primitive type in the JSON" + + " string but got `%s`", + jsonObj.get("password").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!WebhookAuthBasicAuth.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'WebhookAuthBasicAuth' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter = + gson.getDelegateAdapter(this, TypeToken.get(WebhookAuthBasicAuth.class)); + + return (TypeAdapter) + new TypeAdapter() { + @Override + public void write(JsonWriter out, WebhookAuthBasicAuth value) + throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + obj.remove("additionalProperties"); + // serialize additional properties + if (value.getAdditionalProperties() != null) { + for (Map.Entry entry : + value.getAdditionalProperties().entrySet()) { + if (entry.getValue() instanceof String) + obj.addProperty(entry.getKey(), (String) entry.getValue()); + else if (entry.getValue() instanceof Number) + obj.addProperty(entry.getKey(), (Number) entry.getValue()); + else if (entry.getValue() instanceof Boolean) + obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); + else if (entry.getValue() instanceof Character) + obj.addProperty( + entry.getKey(), (Character) entry.getValue()); + else { + JsonElement jsonElement = gson.toJsonTree(entry.getValue()); + if (jsonElement.isJsonArray()) { + obj.add(entry.getKey(), jsonElement.getAsJsonArray()); + } else { + obj.add(entry.getKey(), jsonElement.getAsJsonObject()); + } + } + } + } + elementAdapter.write(out, obj); + } + + @Override + public WebhookAuthBasicAuth read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // store additional fields in the deserialized instance + WebhookAuthBasicAuth instance = thisAdapter.fromJsonTree(jsonObj); + for (Map.Entry entry : jsonObj.entrySet()) { + if (!openapiFields.contains(entry.getKey())) { + if (entry.getValue().isJsonPrimitive()) { // primitive type + if (entry.getValue().getAsJsonPrimitive().isString()) + instance.putAdditionalProperty( + entry.getKey(), entry.getValue().getAsString()); + else if (entry.getValue().getAsJsonPrimitive().isNumber()) + instance.putAdditionalProperty( + entry.getKey(), entry.getValue().getAsNumber()); + else if (entry.getValue().getAsJsonPrimitive().isBoolean()) + instance.putAdditionalProperty( + entry.getKey(), + entry.getValue().getAsBoolean()); + else + throw new IllegalArgumentException( + String.format( + "The field `%s` has unknown primitive" + + " type. Value: %s", + entry.getKey(), + entry.getValue().toString())); + } else if (entry.getValue().isJsonArray()) { + instance.putAdditionalProperty( + entry.getKey(), + gson.fromJson(entry.getValue(), List.class)); + } else { // JSON object + instance.putAdditionalProperty( + entry.getKey(), + gson.fromJson(entry.getValue(), HashMap.class)); + } + } + } + return instance; + } + }.nullSafe(); + } + } + + /** + * Create an instance of WebhookAuthBasicAuth given an JSON string + * + * @param jsonString JSON string + * @return An instance of WebhookAuthBasicAuth + * @throws IOException if the JSON string is invalid with respect to WebhookAuthBasicAuth + */ + public static WebhookAuthBasicAuth fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, WebhookAuthBasicAuth.class); + } + + /** + * Convert an instance of WebhookAuthBasicAuth to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} diff --git a/sdks/java/src/main/java/com/thoughtspot/client/model/WebhookAuthBasicAuthInput.java b/sdks/java/src/main/java/com/thoughtspot/client/model/WebhookAuthBasicAuthInput.java new file mode 100644 index 000000000..c330da37a --- /dev/null +++ b/sdks/java/src/main/java/com/thoughtspot/client/model/WebhookAuthBasicAuthInput.java @@ -0,0 +1,339 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client.model; + +import com.google.gson.Gson; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.TypeAdapter; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.annotations.SerializedName; +import com.google.gson.reflect.TypeToken; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import com.thoughtspot.client.JSON; +import java.io.IOException; +import java.io.Serializable; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Objects; + +/** WebhookAuthBasicAuthInput */ +@javax.annotation.Generated( + value = "org.openapitools.codegen.languages.JavaClientCodegen", + comments = "Generator version: 7.12.0") +public class WebhookAuthBasicAuthInput implements Serializable { + private static final long serialVersionUID = 1L; + + public static final String SERIALIZED_NAME_USERNAME = "username"; + + @SerializedName(SERIALIZED_NAME_USERNAME) + @javax.annotation.Nonnull + private String username; + + public static final String SERIALIZED_NAME_PASSWORD = "password"; + + @SerializedName(SERIALIZED_NAME_PASSWORD) + @javax.annotation.Nonnull + private String password; + + public WebhookAuthBasicAuthInput() {} + + public WebhookAuthBasicAuthInput username(@javax.annotation.Nonnull String username) { + this.username = username; + return this; + } + + /** + * Username for basic authentication. + * + * @return username + */ + @javax.annotation.Nonnull + public String getUsername() { + return username; + } + + public void setUsername(@javax.annotation.Nonnull String username) { + this.username = username; + } + + public WebhookAuthBasicAuthInput password(@javax.annotation.Nonnull String password) { + this.password = password; + return this; + } + + /** + * Password for basic authentication. + * + * @return password + */ + @javax.annotation.Nonnull + public String getPassword() { + return password; + } + + public void setPassword(@javax.annotation.Nonnull String password) { + this.password = password; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key name of the property + * @param value value of the property + * @return the WebhookAuthBasicAuthInput instance itself + */ + public WebhookAuthBasicAuthInput putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return a map of objects + */ + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key name of the property + * @return an object + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + WebhookAuthBasicAuthInput webhookAuthBasicAuthInput = (WebhookAuthBasicAuthInput) o; + return Objects.equals(this.username, webhookAuthBasicAuthInput.username) + && Objects.equals(this.password, webhookAuthBasicAuthInput.password) + && Objects.equals( + this.additionalProperties, webhookAuthBasicAuthInput.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(username, password, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class WebhookAuthBasicAuthInput {\n"); + sb.append(" username: ").append(toIndentedString(username)).append("\n"); + sb.append(" password: ").append(toIndentedString(password)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first + * line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("username"); + openapiFields.add("password"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + openapiRequiredFields.add("username"); + openapiRequiredFields.add("password"); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to WebhookAuthBasicAuthInput + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!WebhookAuthBasicAuthInput.openapiRequiredFields + .isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException( + String.format( + "The required field(s) %s in WebhookAuthBasicAuthInput is not" + + " found in the empty JSON string", + WebhookAuthBasicAuthInput.openapiRequiredFields.toString())); + } + } + + // check to make sure all required properties/fields are present in the JSON string + for (String requiredField : WebhookAuthBasicAuthInput.openapiRequiredFields) { + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException( + String.format( + "The required field `%s` is not found in the JSON string: %s", + requiredField, jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if (!jsonObj.get("username").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `username` to be a primitive type in the JSON" + + " string but got `%s`", + jsonObj.get("username").toString())); + } + if (!jsonObj.get("password").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `password` to be a primitive type in the JSON" + + " string but got `%s`", + jsonObj.get("password").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!WebhookAuthBasicAuthInput.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'WebhookAuthBasicAuthInput' and its + // subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter = + gson.getDelegateAdapter(this, TypeToken.get(WebhookAuthBasicAuthInput.class)); + + return (TypeAdapter) + new TypeAdapter() { + @Override + public void write(JsonWriter out, WebhookAuthBasicAuthInput value) + throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + obj.remove("additionalProperties"); + // serialize additional properties + if (value.getAdditionalProperties() != null) { + for (Map.Entry entry : + value.getAdditionalProperties().entrySet()) { + if (entry.getValue() instanceof String) + obj.addProperty(entry.getKey(), (String) entry.getValue()); + else if (entry.getValue() instanceof Number) + obj.addProperty(entry.getKey(), (Number) entry.getValue()); + else if (entry.getValue() instanceof Boolean) + obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); + else if (entry.getValue() instanceof Character) + obj.addProperty( + entry.getKey(), (Character) entry.getValue()); + else { + JsonElement jsonElement = gson.toJsonTree(entry.getValue()); + if (jsonElement.isJsonArray()) { + obj.add(entry.getKey(), jsonElement.getAsJsonArray()); + } else { + obj.add(entry.getKey(), jsonElement.getAsJsonObject()); + } + } + } + } + elementAdapter.write(out, obj); + } + + @Override + public WebhookAuthBasicAuthInput read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // store additional fields in the deserialized instance + WebhookAuthBasicAuthInput instance = thisAdapter.fromJsonTree(jsonObj); + for (Map.Entry entry : jsonObj.entrySet()) { + if (!openapiFields.contains(entry.getKey())) { + if (entry.getValue().isJsonPrimitive()) { // primitive type + if (entry.getValue().getAsJsonPrimitive().isString()) + instance.putAdditionalProperty( + entry.getKey(), entry.getValue().getAsString()); + else if (entry.getValue().getAsJsonPrimitive().isNumber()) + instance.putAdditionalProperty( + entry.getKey(), entry.getValue().getAsNumber()); + else if (entry.getValue().getAsJsonPrimitive().isBoolean()) + instance.putAdditionalProperty( + entry.getKey(), + entry.getValue().getAsBoolean()); + else + throw new IllegalArgumentException( + String.format( + "The field `%s` has unknown primitive" + + " type. Value: %s", + entry.getKey(), + entry.getValue().toString())); + } else if (entry.getValue().isJsonArray()) { + instance.putAdditionalProperty( + entry.getKey(), + gson.fromJson(entry.getValue(), List.class)); + } else { // JSON object + instance.putAdditionalProperty( + entry.getKey(), + gson.fromJson(entry.getValue(), HashMap.class)); + } + } + } + return instance; + } + }.nullSafe(); + } + } + + /** + * Create an instance of WebhookAuthBasicAuthInput given an JSON string + * + * @param jsonString JSON string + * @return An instance of WebhookAuthBasicAuthInput + * @throws IOException if the JSON string is invalid with respect to WebhookAuthBasicAuthInput + */ + public static WebhookAuthBasicAuthInput fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, WebhookAuthBasicAuthInput.class); + } + + /** + * Convert an instance of WebhookAuthBasicAuthInput to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} diff --git a/sdks/java/src/main/java/com/thoughtspot/client/model/WebhookAuthOAuth2.java b/sdks/java/src/main/java/com/thoughtspot/client/model/WebhookAuthOAuth2.java new file mode 100644 index 000000000..11ade18c1 --- /dev/null +++ b/sdks/java/src/main/java/com/thoughtspot/client/model/WebhookAuthOAuth2.java @@ -0,0 +1,374 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client.model; + +import com.google.gson.Gson; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.TypeAdapter; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.annotations.SerializedName; +import com.google.gson.reflect.TypeToken; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import com.thoughtspot.client.JSON; +import java.io.IOException; +import java.io.Serializable; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Objects; + +/** WebhookAuthOAuth2 */ +@javax.annotation.Generated( + value = "org.openapitools.codegen.languages.JavaClientCodegen", + comments = "Generator version: 7.12.0") +public class WebhookAuthOAuth2 implements Serializable { + private static final long serialVersionUID = 1L; + + public static final String SERIALIZED_NAME_AUTHORIZATION_URL = "authorization_url"; + + @SerializedName(SERIALIZED_NAME_AUTHORIZATION_URL) + @javax.annotation.Nonnull + private String authorizationUrl; + + public static final String SERIALIZED_NAME_CLIENT_ID = "client_id"; + + @SerializedName(SERIALIZED_NAME_CLIENT_ID) + @javax.annotation.Nonnull + private String clientId; + + public static final String SERIALIZED_NAME_CLIENT_SECRET = "client_secret"; + + @SerializedName(SERIALIZED_NAME_CLIENT_SECRET) + @javax.annotation.Nonnull + private String clientSecret; + + public WebhookAuthOAuth2() {} + + public WebhookAuthOAuth2 authorizationUrl(@javax.annotation.Nonnull String authorizationUrl) { + this.authorizationUrl = authorizationUrl; + return this; + } + + /** + * OAuth2 authorization server URL. + * + * @return authorizationUrl + */ + @javax.annotation.Nonnull + public String getAuthorizationUrl() { + return authorizationUrl; + } + + public void setAuthorizationUrl(@javax.annotation.Nonnull String authorizationUrl) { + this.authorizationUrl = authorizationUrl; + } + + public WebhookAuthOAuth2 clientId(@javax.annotation.Nonnull String clientId) { + this.clientId = clientId; + return this; + } + + /** + * OAuth2 client identifier. + * + * @return clientId + */ + @javax.annotation.Nonnull + public String getClientId() { + return clientId; + } + + public void setClientId(@javax.annotation.Nonnull String clientId) { + this.clientId = clientId; + } + + public WebhookAuthOAuth2 clientSecret(@javax.annotation.Nonnull String clientSecret) { + this.clientSecret = clientSecret; + return this; + } + + /** + * OAuth2 client secret key. + * + * @return clientSecret + */ + @javax.annotation.Nonnull + public String getClientSecret() { + return clientSecret; + } + + public void setClientSecret(@javax.annotation.Nonnull String clientSecret) { + this.clientSecret = clientSecret; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key name of the property + * @param value value of the property + * @return the WebhookAuthOAuth2 instance itself + */ + public WebhookAuthOAuth2 putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return a map of objects + */ + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key name of the property + * @return an object + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + WebhookAuthOAuth2 webhookAuthOAuth2 = (WebhookAuthOAuth2) o; + return Objects.equals(this.authorizationUrl, webhookAuthOAuth2.authorizationUrl) + && Objects.equals(this.clientId, webhookAuthOAuth2.clientId) + && Objects.equals(this.clientSecret, webhookAuthOAuth2.clientSecret) + && Objects.equals( + this.additionalProperties, webhookAuthOAuth2.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(authorizationUrl, clientId, clientSecret, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class WebhookAuthOAuth2 {\n"); + sb.append(" authorizationUrl: ").append(toIndentedString(authorizationUrl)).append("\n"); + sb.append(" clientId: ").append(toIndentedString(clientId)).append("\n"); + sb.append(" clientSecret: ").append(toIndentedString(clientSecret)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first + * line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("authorization_url"); + openapiFields.add("client_id"); + openapiFields.add("client_secret"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + openapiRequiredFields.add("authorization_url"); + openapiRequiredFields.add("client_id"); + openapiRequiredFields.add("client_secret"); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to WebhookAuthOAuth2 + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!WebhookAuthOAuth2.openapiRequiredFields + .isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException( + String.format( + "The required field(s) %s in WebhookAuthOAuth2 is not found in the" + + " empty JSON string", + WebhookAuthOAuth2.openapiRequiredFields.toString())); + } + } + + // check to make sure all required properties/fields are present in the JSON string + for (String requiredField : WebhookAuthOAuth2.openapiRequiredFields) { + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException( + String.format( + "The required field `%s` is not found in the JSON string: %s", + requiredField, jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if (!jsonObj.get("authorization_url").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `authorization_url` to be a primitive type in the" + + " JSON string but got `%s`", + jsonObj.get("authorization_url").toString())); + } + if (!jsonObj.get("client_id").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `client_id` to be a primitive type in the JSON" + + " string but got `%s`", + jsonObj.get("client_id").toString())); + } + if (!jsonObj.get("client_secret").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `client_secret` to be a primitive type in the JSON" + + " string but got `%s`", + jsonObj.get("client_secret").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!WebhookAuthOAuth2.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'WebhookAuthOAuth2' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter = + gson.getDelegateAdapter(this, TypeToken.get(WebhookAuthOAuth2.class)); + + return (TypeAdapter) + new TypeAdapter() { + @Override + public void write(JsonWriter out, WebhookAuthOAuth2 value) + throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + obj.remove("additionalProperties"); + // serialize additional properties + if (value.getAdditionalProperties() != null) { + for (Map.Entry entry : + value.getAdditionalProperties().entrySet()) { + if (entry.getValue() instanceof String) + obj.addProperty(entry.getKey(), (String) entry.getValue()); + else if (entry.getValue() instanceof Number) + obj.addProperty(entry.getKey(), (Number) entry.getValue()); + else if (entry.getValue() instanceof Boolean) + obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); + else if (entry.getValue() instanceof Character) + obj.addProperty( + entry.getKey(), (Character) entry.getValue()); + else { + JsonElement jsonElement = gson.toJsonTree(entry.getValue()); + if (jsonElement.isJsonArray()) { + obj.add(entry.getKey(), jsonElement.getAsJsonArray()); + } else { + obj.add(entry.getKey(), jsonElement.getAsJsonObject()); + } + } + } + } + elementAdapter.write(out, obj); + } + + @Override + public WebhookAuthOAuth2 read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // store additional fields in the deserialized instance + WebhookAuthOAuth2 instance = thisAdapter.fromJsonTree(jsonObj); + for (Map.Entry entry : jsonObj.entrySet()) { + if (!openapiFields.contains(entry.getKey())) { + if (entry.getValue().isJsonPrimitive()) { // primitive type + if (entry.getValue().getAsJsonPrimitive().isString()) + instance.putAdditionalProperty( + entry.getKey(), entry.getValue().getAsString()); + else if (entry.getValue().getAsJsonPrimitive().isNumber()) + instance.putAdditionalProperty( + entry.getKey(), entry.getValue().getAsNumber()); + else if (entry.getValue().getAsJsonPrimitive().isBoolean()) + instance.putAdditionalProperty( + entry.getKey(), + entry.getValue().getAsBoolean()); + else + throw new IllegalArgumentException( + String.format( + "The field `%s` has unknown primitive" + + " type. Value: %s", + entry.getKey(), + entry.getValue().toString())); + } else if (entry.getValue().isJsonArray()) { + instance.putAdditionalProperty( + entry.getKey(), + gson.fromJson(entry.getValue(), List.class)); + } else { // JSON object + instance.putAdditionalProperty( + entry.getKey(), + gson.fromJson(entry.getValue(), HashMap.class)); + } + } + } + return instance; + } + }.nullSafe(); + } + } + + /** + * Create an instance of WebhookAuthOAuth2 given an JSON string + * + * @param jsonString JSON string + * @return An instance of WebhookAuthOAuth2 + * @throws IOException if the JSON string is invalid with respect to WebhookAuthOAuth2 + */ + public static WebhookAuthOAuth2 fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, WebhookAuthOAuth2.class); + } + + /** + * Convert an instance of WebhookAuthOAuth2 to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} diff --git a/sdks/java/src/main/java/com/thoughtspot/client/model/WebhookAuthOAuth2Input.java b/sdks/java/src/main/java/com/thoughtspot/client/model/WebhookAuthOAuth2Input.java new file mode 100644 index 000000000..c49c7f9d4 --- /dev/null +++ b/sdks/java/src/main/java/com/thoughtspot/client/model/WebhookAuthOAuth2Input.java @@ -0,0 +1,375 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client.model; + +import com.google.gson.Gson; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.TypeAdapter; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.annotations.SerializedName; +import com.google.gson.reflect.TypeToken; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import com.thoughtspot.client.JSON; +import java.io.IOException; +import java.io.Serializable; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Objects; + +/** WebhookAuthOAuth2Input */ +@javax.annotation.Generated( + value = "org.openapitools.codegen.languages.JavaClientCodegen", + comments = "Generator version: 7.12.0") +public class WebhookAuthOAuth2Input implements Serializable { + private static final long serialVersionUID = 1L; + + public static final String SERIALIZED_NAME_AUTHORIZATION_URL = "authorization_url"; + + @SerializedName(SERIALIZED_NAME_AUTHORIZATION_URL) + @javax.annotation.Nonnull + private String authorizationUrl; + + public static final String SERIALIZED_NAME_CLIENT_ID = "client_id"; + + @SerializedName(SERIALIZED_NAME_CLIENT_ID) + @javax.annotation.Nonnull + private String clientId; + + public static final String SERIALIZED_NAME_CLIENT_SECRET = "client_secret"; + + @SerializedName(SERIALIZED_NAME_CLIENT_SECRET) + @javax.annotation.Nonnull + private String clientSecret; + + public WebhookAuthOAuth2Input() {} + + public WebhookAuthOAuth2Input authorizationUrl( + @javax.annotation.Nonnull String authorizationUrl) { + this.authorizationUrl = authorizationUrl; + return this; + } + + /** + * OAuth2 authorization server URL. + * + * @return authorizationUrl + */ + @javax.annotation.Nonnull + public String getAuthorizationUrl() { + return authorizationUrl; + } + + public void setAuthorizationUrl(@javax.annotation.Nonnull String authorizationUrl) { + this.authorizationUrl = authorizationUrl; + } + + public WebhookAuthOAuth2Input clientId(@javax.annotation.Nonnull String clientId) { + this.clientId = clientId; + return this; + } + + /** + * OAuth2 client identifier. + * + * @return clientId + */ + @javax.annotation.Nonnull + public String getClientId() { + return clientId; + } + + public void setClientId(@javax.annotation.Nonnull String clientId) { + this.clientId = clientId; + } + + public WebhookAuthOAuth2Input clientSecret(@javax.annotation.Nonnull String clientSecret) { + this.clientSecret = clientSecret; + return this; + } + + /** + * OAuth2 client secret key. + * + * @return clientSecret + */ + @javax.annotation.Nonnull + public String getClientSecret() { + return clientSecret; + } + + public void setClientSecret(@javax.annotation.Nonnull String clientSecret) { + this.clientSecret = clientSecret; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key name of the property + * @param value value of the property + * @return the WebhookAuthOAuth2Input instance itself + */ + public WebhookAuthOAuth2Input putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return a map of objects + */ + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key name of the property + * @return an object + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + WebhookAuthOAuth2Input webhookAuthOAuth2Input = (WebhookAuthOAuth2Input) o; + return Objects.equals(this.authorizationUrl, webhookAuthOAuth2Input.authorizationUrl) + && Objects.equals(this.clientId, webhookAuthOAuth2Input.clientId) + && Objects.equals(this.clientSecret, webhookAuthOAuth2Input.clientSecret) + && Objects.equals( + this.additionalProperties, webhookAuthOAuth2Input.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(authorizationUrl, clientId, clientSecret, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class WebhookAuthOAuth2Input {\n"); + sb.append(" authorizationUrl: ").append(toIndentedString(authorizationUrl)).append("\n"); + sb.append(" clientId: ").append(toIndentedString(clientId)).append("\n"); + sb.append(" clientSecret: ").append(toIndentedString(clientSecret)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first + * line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("authorization_url"); + openapiFields.add("client_id"); + openapiFields.add("client_secret"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + openapiRequiredFields.add("authorization_url"); + openapiRequiredFields.add("client_id"); + openapiRequiredFields.add("client_secret"); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to WebhookAuthOAuth2Input + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!WebhookAuthOAuth2Input.openapiRequiredFields + .isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException( + String.format( + "The required field(s) %s in WebhookAuthOAuth2Input is not found" + + " in the empty JSON string", + WebhookAuthOAuth2Input.openapiRequiredFields.toString())); + } + } + + // check to make sure all required properties/fields are present in the JSON string + for (String requiredField : WebhookAuthOAuth2Input.openapiRequiredFields) { + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException( + String.format( + "The required field `%s` is not found in the JSON string: %s", + requiredField, jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if (!jsonObj.get("authorization_url").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `authorization_url` to be a primitive type in the" + + " JSON string but got `%s`", + jsonObj.get("authorization_url").toString())); + } + if (!jsonObj.get("client_id").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `client_id` to be a primitive type in the JSON" + + " string but got `%s`", + jsonObj.get("client_id").toString())); + } + if (!jsonObj.get("client_secret").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `client_secret` to be a primitive type in the JSON" + + " string but got `%s`", + jsonObj.get("client_secret").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!WebhookAuthOAuth2Input.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'WebhookAuthOAuth2Input' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter = + gson.getDelegateAdapter(this, TypeToken.get(WebhookAuthOAuth2Input.class)); + + return (TypeAdapter) + new TypeAdapter() { + @Override + public void write(JsonWriter out, WebhookAuthOAuth2Input value) + throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + obj.remove("additionalProperties"); + // serialize additional properties + if (value.getAdditionalProperties() != null) { + for (Map.Entry entry : + value.getAdditionalProperties().entrySet()) { + if (entry.getValue() instanceof String) + obj.addProperty(entry.getKey(), (String) entry.getValue()); + else if (entry.getValue() instanceof Number) + obj.addProperty(entry.getKey(), (Number) entry.getValue()); + else if (entry.getValue() instanceof Boolean) + obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); + else if (entry.getValue() instanceof Character) + obj.addProperty( + entry.getKey(), (Character) entry.getValue()); + else { + JsonElement jsonElement = gson.toJsonTree(entry.getValue()); + if (jsonElement.isJsonArray()) { + obj.add(entry.getKey(), jsonElement.getAsJsonArray()); + } else { + obj.add(entry.getKey(), jsonElement.getAsJsonObject()); + } + } + } + } + elementAdapter.write(out, obj); + } + + @Override + public WebhookAuthOAuth2Input read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // store additional fields in the deserialized instance + WebhookAuthOAuth2Input instance = thisAdapter.fromJsonTree(jsonObj); + for (Map.Entry entry : jsonObj.entrySet()) { + if (!openapiFields.contains(entry.getKey())) { + if (entry.getValue().isJsonPrimitive()) { // primitive type + if (entry.getValue().getAsJsonPrimitive().isString()) + instance.putAdditionalProperty( + entry.getKey(), entry.getValue().getAsString()); + else if (entry.getValue().getAsJsonPrimitive().isNumber()) + instance.putAdditionalProperty( + entry.getKey(), entry.getValue().getAsNumber()); + else if (entry.getValue().getAsJsonPrimitive().isBoolean()) + instance.putAdditionalProperty( + entry.getKey(), + entry.getValue().getAsBoolean()); + else + throw new IllegalArgumentException( + String.format( + "The field `%s` has unknown primitive" + + " type. Value: %s", + entry.getKey(), + entry.getValue().toString())); + } else if (entry.getValue().isJsonArray()) { + instance.putAdditionalProperty( + entry.getKey(), + gson.fromJson(entry.getValue(), List.class)); + } else { // JSON object + instance.putAdditionalProperty( + entry.getKey(), + gson.fromJson(entry.getValue(), HashMap.class)); + } + } + } + return instance; + } + }.nullSafe(); + } + } + + /** + * Create an instance of WebhookAuthOAuth2Input given an JSON string + * + * @param jsonString JSON string + * @return An instance of WebhookAuthOAuth2Input + * @throws IOException if the JSON string is invalid with respect to WebhookAuthOAuth2Input + */ + public static WebhookAuthOAuth2Input fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, WebhookAuthOAuth2Input.class); + } + + /** + * Convert an instance of WebhookAuthOAuth2Input to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} diff --git a/sdks/java/src/main/java/com/thoughtspot/client/model/WebhookAuthentication.java b/sdks/java/src/main/java/com/thoughtspot/client/model/WebhookAuthentication.java new file mode 100644 index 000000000..0ac8927dc --- /dev/null +++ b/sdks/java/src/main/java/com/thoughtspot/client/model/WebhookAuthentication.java @@ -0,0 +1,407 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client.model; + +import com.google.gson.Gson; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.TypeAdapter; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.annotations.SerializedName; +import com.google.gson.reflect.TypeToken; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import com.thoughtspot.client.JSON; +import java.io.IOException; +import java.io.Serializable; +import java.util.Arrays; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Objects; +import org.openapitools.jackson.nullable.JsonNullable; + +/** WebhookAuthentication */ +@javax.annotation.Generated( + value = "org.openapitools.codegen.languages.JavaClientCodegen", + comments = "Generator version: 7.12.0") +public class WebhookAuthentication implements Serializable { + private static final long serialVersionUID = 1L; + + public static final String SERIALIZED_NAME_A_P_I_K_E_Y = "API_KEY"; + + @SerializedName(SERIALIZED_NAME_A_P_I_K_E_Y) + @javax.annotation.Nullable + private WebhookAuthApiKey API_KEY; + + public static final String SERIALIZED_NAME_B_A_S_I_C_A_U_T_H = "BASIC_AUTH"; + + @SerializedName(SERIALIZED_NAME_B_A_S_I_C_A_U_T_H) + @javax.annotation.Nullable + private WebhookAuthBasicAuth BASIC_AUTH; + + public static final String SERIALIZED_NAME_B_E_A_R_E_R_T_O_K_E_N = "BEARER_TOKEN"; + + @SerializedName(SERIALIZED_NAME_B_E_A_R_E_R_T_O_K_E_N) + @javax.annotation.Nullable + private String BEARER_TOKEN; + + public static final String SERIALIZED_NAME_O_A_U_T_H2 = "OAUTH2"; + + @SerializedName(SERIALIZED_NAME_O_A_U_T_H2) + @javax.annotation.Nullable + private WebhookAuthOAuth2 OAUTH2; + + public WebhookAuthentication() {} + + public WebhookAuthentication API_KEY(@javax.annotation.Nullable WebhookAuthApiKey API_KEY) { + this.API_KEY = API_KEY; + return this; + } + + /** + * Get API_KEY + * + * @return API_KEY + */ + @javax.annotation.Nullable + public WebhookAuthApiKey getAPIKEY() { + return API_KEY; + } + + public void setAPIKEY(@javax.annotation.Nullable WebhookAuthApiKey API_KEY) { + this.API_KEY = API_KEY; + } + + public WebhookAuthentication BASIC_AUTH( + @javax.annotation.Nullable WebhookAuthBasicAuth BASIC_AUTH) { + this.BASIC_AUTH = BASIC_AUTH; + return this; + } + + /** + * Get BASIC_AUTH + * + * @return BASIC_AUTH + */ + @javax.annotation.Nullable + public WebhookAuthBasicAuth getBASICAUTH() { + return BASIC_AUTH; + } + + public void setBASICAUTH(@javax.annotation.Nullable WebhookAuthBasicAuth BASIC_AUTH) { + this.BASIC_AUTH = BASIC_AUTH; + } + + public WebhookAuthentication BEARER_TOKEN(@javax.annotation.Nullable String BEARER_TOKEN) { + this.BEARER_TOKEN = BEARER_TOKEN; + return this; + } + + /** + * Redacted Bearer token authentication configuration. + * + * @return BEARER_TOKEN + */ + @javax.annotation.Nullable + public String getBEARERTOKEN() { + return BEARER_TOKEN; + } + + public void setBEARERTOKEN(@javax.annotation.Nullable String BEARER_TOKEN) { + this.BEARER_TOKEN = BEARER_TOKEN; + } + + public WebhookAuthentication OAUTH2(@javax.annotation.Nullable WebhookAuthOAuth2 OAUTH2) { + this.OAUTH2 = OAUTH2; + return this; + } + + /** + * Get OAUTH2 + * + * @return OAUTH2 + */ + @javax.annotation.Nullable + public WebhookAuthOAuth2 getOAUTH2() { + return OAUTH2; + } + + public void setOAUTH2(@javax.annotation.Nullable WebhookAuthOAuth2 OAUTH2) { + this.OAUTH2 = OAUTH2; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key name of the property + * @param value value of the property + * @return the WebhookAuthentication instance itself + */ + public WebhookAuthentication putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return a map of objects + */ + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key name of the property + * @return an object + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + WebhookAuthentication webhookAuthentication = (WebhookAuthentication) o; + return Objects.equals(this.API_KEY, webhookAuthentication.API_KEY) + && Objects.equals(this.BASIC_AUTH, webhookAuthentication.BASIC_AUTH) + && Objects.equals(this.BEARER_TOKEN, webhookAuthentication.BEARER_TOKEN) + && Objects.equals(this.OAUTH2, webhookAuthentication.OAUTH2) + && Objects.equals( + this.additionalProperties, webhookAuthentication.additionalProperties); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b + || (a != null + && b != null + && a.isPresent() + && b.isPresent() + && Objects.deepEquals(a.get(), b.get())); + } + + @Override + public int hashCode() { + return Objects.hash(API_KEY, BASIC_AUTH, BEARER_TOKEN, OAUTH2, additionalProperties); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; + } + return a.isPresent() ? Arrays.deepHashCode(new Object[] {a.get()}) : 31; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class WebhookAuthentication {\n"); + sb.append(" API_KEY: ").append(toIndentedString(API_KEY)).append("\n"); + sb.append(" BASIC_AUTH: ").append(toIndentedString(BASIC_AUTH)).append("\n"); + sb.append(" BEARER_TOKEN: ").append(toIndentedString(BEARER_TOKEN)).append("\n"); + sb.append(" OAUTH2: ").append(toIndentedString(OAUTH2)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first + * line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("API_KEY"); + openapiFields.add("BASIC_AUTH"); + openapiFields.add("BEARER_TOKEN"); + openapiFields.add("OAUTH2"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to WebhookAuthentication + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!WebhookAuthentication.openapiRequiredFields + .isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException( + String.format( + "The required field(s) %s in WebhookAuthentication is not found in" + + " the empty JSON string", + WebhookAuthentication.openapiRequiredFields.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // validate the optional field `API_KEY` + if (jsonObj.get("API_KEY") != null && !jsonObj.get("API_KEY").isJsonNull()) { + WebhookAuthApiKey.validateJsonElement(jsonObj.get("API_KEY")); + } + // validate the optional field `BASIC_AUTH` + if (jsonObj.get("BASIC_AUTH") != null && !jsonObj.get("BASIC_AUTH").isJsonNull()) { + WebhookAuthBasicAuth.validateJsonElement(jsonObj.get("BASIC_AUTH")); + } + if ((jsonObj.get("BEARER_TOKEN") != null && !jsonObj.get("BEARER_TOKEN").isJsonNull()) + && !jsonObj.get("BEARER_TOKEN").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `BEARER_TOKEN` to be a primitive type in the JSON" + + " string but got `%s`", + jsonObj.get("BEARER_TOKEN").toString())); + } + // validate the optional field `OAUTH2` + if (jsonObj.get("OAUTH2") != null && !jsonObj.get("OAUTH2").isJsonNull()) { + WebhookAuthOAuth2.validateJsonElement(jsonObj.get("OAUTH2")); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!WebhookAuthentication.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'WebhookAuthentication' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter = + gson.getDelegateAdapter(this, TypeToken.get(WebhookAuthentication.class)); + + return (TypeAdapter) + new TypeAdapter() { + @Override + public void write(JsonWriter out, WebhookAuthentication value) + throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + obj.remove("additionalProperties"); + // serialize additional properties + if (value.getAdditionalProperties() != null) { + for (Map.Entry entry : + value.getAdditionalProperties().entrySet()) { + if (entry.getValue() instanceof String) + obj.addProperty(entry.getKey(), (String) entry.getValue()); + else if (entry.getValue() instanceof Number) + obj.addProperty(entry.getKey(), (Number) entry.getValue()); + else if (entry.getValue() instanceof Boolean) + obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); + else if (entry.getValue() instanceof Character) + obj.addProperty( + entry.getKey(), (Character) entry.getValue()); + else { + JsonElement jsonElement = gson.toJsonTree(entry.getValue()); + if (jsonElement.isJsonArray()) { + obj.add(entry.getKey(), jsonElement.getAsJsonArray()); + } else { + obj.add(entry.getKey(), jsonElement.getAsJsonObject()); + } + } + } + } + elementAdapter.write(out, obj); + } + + @Override + public WebhookAuthentication read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // store additional fields in the deserialized instance + WebhookAuthentication instance = thisAdapter.fromJsonTree(jsonObj); + for (Map.Entry entry : jsonObj.entrySet()) { + if (!openapiFields.contains(entry.getKey())) { + if (entry.getValue().isJsonPrimitive()) { // primitive type + if (entry.getValue().getAsJsonPrimitive().isString()) + instance.putAdditionalProperty( + entry.getKey(), entry.getValue().getAsString()); + else if (entry.getValue().getAsJsonPrimitive().isNumber()) + instance.putAdditionalProperty( + entry.getKey(), entry.getValue().getAsNumber()); + else if (entry.getValue().getAsJsonPrimitive().isBoolean()) + instance.putAdditionalProperty( + entry.getKey(), + entry.getValue().getAsBoolean()); + else + throw new IllegalArgumentException( + String.format( + "The field `%s` has unknown primitive" + + " type. Value: %s", + entry.getKey(), + entry.getValue().toString())); + } else if (entry.getValue().isJsonArray()) { + instance.putAdditionalProperty( + entry.getKey(), + gson.fromJson(entry.getValue(), List.class)); + } else { // JSON object + instance.putAdditionalProperty( + entry.getKey(), + gson.fromJson(entry.getValue(), HashMap.class)); + } + } + } + return instance; + } + }.nullSafe(); + } + } + + /** + * Create an instance of WebhookAuthentication given an JSON string + * + * @param jsonString JSON string + * @return An instance of WebhookAuthentication + * @throws IOException if the JSON string is invalid with respect to WebhookAuthentication + */ + public static WebhookAuthentication fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, WebhookAuthentication.class); + } + + /** + * Convert an instance of WebhookAuthentication to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} diff --git a/sdks/java/src/main/java/com/thoughtspot/client/model/WebhookAuthenticationInput.java b/sdks/java/src/main/java/com/thoughtspot/client/model/WebhookAuthenticationInput.java new file mode 100644 index 000000000..3d395d5da --- /dev/null +++ b/sdks/java/src/main/java/com/thoughtspot/client/model/WebhookAuthenticationInput.java @@ -0,0 +1,410 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client.model; + +import com.google.gson.Gson; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.TypeAdapter; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.annotations.SerializedName; +import com.google.gson.reflect.TypeToken; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import com.thoughtspot.client.JSON; +import java.io.IOException; +import java.io.Serializable; +import java.util.Arrays; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Objects; +import org.openapitools.jackson.nullable.JsonNullable; + +/** WebhookAuthenticationInput */ +@javax.annotation.Generated( + value = "org.openapitools.codegen.languages.JavaClientCodegen", + comments = "Generator version: 7.12.0") +public class WebhookAuthenticationInput implements Serializable { + private static final long serialVersionUID = 1L; + + public static final String SERIALIZED_NAME_A_P_I_K_E_Y = "API_KEY"; + + @SerializedName(SERIALIZED_NAME_A_P_I_K_E_Y) + @javax.annotation.Nullable + private WebhookAuthApiKeyInput API_KEY; + + public static final String SERIALIZED_NAME_B_A_S_I_C_A_U_T_H = "BASIC_AUTH"; + + @SerializedName(SERIALIZED_NAME_B_A_S_I_C_A_U_T_H) + @javax.annotation.Nullable + private WebhookAuthBasicAuthInput BASIC_AUTH; + + public static final String SERIALIZED_NAME_B_E_A_R_E_R_T_O_K_E_N = "BEARER_TOKEN"; + + @SerializedName(SERIALIZED_NAME_B_E_A_R_E_R_T_O_K_E_N) + @javax.annotation.Nullable + private String BEARER_TOKEN; + + public static final String SERIALIZED_NAME_O_A_U_T_H2 = "OAUTH2"; + + @SerializedName(SERIALIZED_NAME_O_A_U_T_H2) + @javax.annotation.Nullable + private WebhookAuthOAuth2Input OAUTH2; + + public WebhookAuthenticationInput() {} + + public WebhookAuthenticationInput API_KEY( + @javax.annotation.Nullable WebhookAuthApiKeyInput API_KEY) { + this.API_KEY = API_KEY; + return this; + } + + /** + * Get API_KEY + * + * @return API_KEY + */ + @javax.annotation.Nullable + public WebhookAuthApiKeyInput getAPIKEY() { + return API_KEY; + } + + public void setAPIKEY(@javax.annotation.Nullable WebhookAuthApiKeyInput API_KEY) { + this.API_KEY = API_KEY; + } + + public WebhookAuthenticationInput BASIC_AUTH( + @javax.annotation.Nullable WebhookAuthBasicAuthInput BASIC_AUTH) { + this.BASIC_AUTH = BASIC_AUTH; + return this; + } + + /** + * Get BASIC_AUTH + * + * @return BASIC_AUTH + */ + @javax.annotation.Nullable + public WebhookAuthBasicAuthInput getBASICAUTH() { + return BASIC_AUTH; + } + + public void setBASICAUTH(@javax.annotation.Nullable WebhookAuthBasicAuthInput BASIC_AUTH) { + this.BASIC_AUTH = BASIC_AUTH; + } + + public WebhookAuthenticationInput BEARER_TOKEN(@javax.annotation.Nullable String BEARER_TOKEN) { + this.BEARER_TOKEN = BEARER_TOKEN; + return this; + } + + /** + * Bearer token authentication configuration. + * + * @return BEARER_TOKEN + */ + @javax.annotation.Nullable + public String getBEARERTOKEN() { + return BEARER_TOKEN; + } + + public void setBEARERTOKEN(@javax.annotation.Nullable String BEARER_TOKEN) { + this.BEARER_TOKEN = BEARER_TOKEN; + } + + public WebhookAuthenticationInput OAUTH2( + @javax.annotation.Nullable WebhookAuthOAuth2Input OAUTH2) { + this.OAUTH2 = OAUTH2; + return this; + } + + /** + * Get OAUTH2 + * + * @return OAUTH2 + */ + @javax.annotation.Nullable + public WebhookAuthOAuth2Input getOAUTH2() { + return OAUTH2; + } + + public void setOAUTH2(@javax.annotation.Nullable WebhookAuthOAuth2Input OAUTH2) { + this.OAUTH2 = OAUTH2; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key name of the property + * @param value value of the property + * @return the WebhookAuthenticationInput instance itself + */ + public WebhookAuthenticationInput putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return a map of objects + */ + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key name of the property + * @return an object + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + WebhookAuthenticationInput webhookAuthenticationInput = (WebhookAuthenticationInput) o; + return Objects.equals(this.API_KEY, webhookAuthenticationInput.API_KEY) + && Objects.equals(this.BASIC_AUTH, webhookAuthenticationInput.BASIC_AUTH) + && Objects.equals(this.BEARER_TOKEN, webhookAuthenticationInput.BEARER_TOKEN) + && Objects.equals(this.OAUTH2, webhookAuthenticationInput.OAUTH2) + && Objects.equals( + this.additionalProperties, webhookAuthenticationInput.additionalProperties); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b + || (a != null + && b != null + && a.isPresent() + && b.isPresent() + && Objects.deepEquals(a.get(), b.get())); + } + + @Override + public int hashCode() { + return Objects.hash(API_KEY, BASIC_AUTH, BEARER_TOKEN, OAUTH2, additionalProperties); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; + } + return a.isPresent() ? Arrays.deepHashCode(new Object[] {a.get()}) : 31; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class WebhookAuthenticationInput {\n"); + sb.append(" API_KEY: ").append(toIndentedString(API_KEY)).append("\n"); + sb.append(" BASIC_AUTH: ").append(toIndentedString(BASIC_AUTH)).append("\n"); + sb.append(" BEARER_TOKEN: ").append(toIndentedString(BEARER_TOKEN)).append("\n"); + sb.append(" OAUTH2: ").append(toIndentedString(OAUTH2)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first + * line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("API_KEY"); + openapiFields.add("BASIC_AUTH"); + openapiFields.add("BEARER_TOKEN"); + openapiFields.add("OAUTH2"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to WebhookAuthenticationInput + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!WebhookAuthenticationInput.openapiRequiredFields + .isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException( + String.format( + "The required field(s) %s in WebhookAuthenticationInput is not" + + " found in the empty JSON string", + WebhookAuthenticationInput.openapiRequiredFields.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // validate the optional field `API_KEY` + if (jsonObj.get("API_KEY") != null && !jsonObj.get("API_KEY").isJsonNull()) { + WebhookAuthApiKeyInput.validateJsonElement(jsonObj.get("API_KEY")); + } + // validate the optional field `BASIC_AUTH` + if (jsonObj.get("BASIC_AUTH") != null && !jsonObj.get("BASIC_AUTH").isJsonNull()) { + WebhookAuthBasicAuthInput.validateJsonElement(jsonObj.get("BASIC_AUTH")); + } + if ((jsonObj.get("BEARER_TOKEN") != null && !jsonObj.get("BEARER_TOKEN").isJsonNull()) + && !jsonObj.get("BEARER_TOKEN").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `BEARER_TOKEN` to be a primitive type in the JSON" + + " string but got `%s`", + jsonObj.get("BEARER_TOKEN").toString())); + } + // validate the optional field `OAUTH2` + if (jsonObj.get("OAUTH2") != null && !jsonObj.get("OAUTH2").isJsonNull()) { + WebhookAuthOAuth2Input.validateJsonElement(jsonObj.get("OAUTH2")); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!WebhookAuthenticationInput.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'WebhookAuthenticationInput' and its + // subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter = + gson.getDelegateAdapter(this, TypeToken.get(WebhookAuthenticationInput.class)); + + return (TypeAdapter) + new TypeAdapter() { + @Override + public void write(JsonWriter out, WebhookAuthenticationInput value) + throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + obj.remove("additionalProperties"); + // serialize additional properties + if (value.getAdditionalProperties() != null) { + for (Map.Entry entry : + value.getAdditionalProperties().entrySet()) { + if (entry.getValue() instanceof String) + obj.addProperty(entry.getKey(), (String) entry.getValue()); + else if (entry.getValue() instanceof Number) + obj.addProperty(entry.getKey(), (Number) entry.getValue()); + else if (entry.getValue() instanceof Boolean) + obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); + else if (entry.getValue() instanceof Character) + obj.addProperty( + entry.getKey(), (Character) entry.getValue()); + else { + JsonElement jsonElement = gson.toJsonTree(entry.getValue()); + if (jsonElement.isJsonArray()) { + obj.add(entry.getKey(), jsonElement.getAsJsonArray()); + } else { + obj.add(entry.getKey(), jsonElement.getAsJsonObject()); + } + } + } + } + elementAdapter.write(out, obj); + } + + @Override + public WebhookAuthenticationInput read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // store additional fields in the deserialized instance + WebhookAuthenticationInput instance = thisAdapter.fromJsonTree(jsonObj); + for (Map.Entry entry : jsonObj.entrySet()) { + if (!openapiFields.contains(entry.getKey())) { + if (entry.getValue().isJsonPrimitive()) { // primitive type + if (entry.getValue().getAsJsonPrimitive().isString()) + instance.putAdditionalProperty( + entry.getKey(), entry.getValue().getAsString()); + else if (entry.getValue().getAsJsonPrimitive().isNumber()) + instance.putAdditionalProperty( + entry.getKey(), entry.getValue().getAsNumber()); + else if (entry.getValue().getAsJsonPrimitive().isBoolean()) + instance.putAdditionalProperty( + entry.getKey(), + entry.getValue().getAsBoolean()); + else + throw new IllegalArgumentException( + String.format( + "The field `%s` has unknown primitive" + + " type. Value: %s", + entry.getKey(), + entry.getValue().toString())); + } else if (entry.getValue().isJsonArray()) { + instance.putAdditionalProperty( + entry.getKey(), + gson.fromJson(entry.getValue(), List.class)); + } else { // JSON object + instance.putAdditionalProperty( + entry.getKey(), + gson.fromJson(entry.getValue(), HashMap.class)); + } + } + } + return instance; + } + }.nullSafe(); + } + } + + /** + * Create an instance of WebhookAuthenticationInput given an JSON string + * + * @param jsonString JSON string + * @return An instance of WebhookAuthenticationInput + * @throws IOException if the JSON string is invalid with respect to WebhookAuthenticationInput + */ + public static WebhookAuthenticationInput fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, WebhookAuthenticationInput.class); + } + + /** + * Convert an instance of WebhookAuthenticationInput to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} diff --git a/sdks/java/src/main/java/com/thoughtspot/client/model/WebhookDeleteFailure.java b/sdks/java/src/main/java/com/thoughtspot/client/model/WebhookDeleteFailure.java new file mode 100644 index 000000000..c47e4514e --- /dev/null +++ b/sdks/java/src/main/java/com/thoughtspot/client/model/WebhookDeleteFailure.java @@ -0,0 +1,374 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client.model; + +import com.google.gson.Gson; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.TypeAdapter; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.annotations.SerializedName; +import com.google.gson.reflect.TypeToken; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import com.thoughtspot.client.JSON; +import java.io.IOException; +import java.io.Serializable; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Objects; + +/** WebhookDeleteFailure */ +@javax.annotation.Generated( + value = "org.openapitools.codegen.languages.JavaClientCodegen", + comments = "Generator version: 7.12.0") +public class WebhookDeleteFailure implements Serializable { + private static final long serialVersionUID = 1L; + + public static final String SERIALIZED_NAME_ID = "id"; + + @SerializedName(SERIALIZED_NAME_ID) + @javax.annotation.Nonnull + private String id; + + public static final String SERIALIZED_NAME_NAME = "name"; + + @SerializedName(SERIALIZED_NAME_NAME) + @javax.annotation.Nonnull + private String name; + + public static final String SERIALIZED_NAME_ERROR = "error"; + + @SerializedName(SERIALIZED_NAME_ERROR) + @javax.annotation.Nonnull + private String error; + + public WebhookDeleteFailure() {} + + public WebhookDeleteFailure id(@javax.annotation.Nonnull String id) { + this.id = id; + return this; + } + + /** + * Unique identifier of the webhook that failed to delete. + * + * @return id + */ + @javax.annotation.Nonnull + public String getId() { + return id; + } + + public void setId(@javax.annotation.Nonnull String id) { + this.id = id; + } + + public WebhookDeleteFailure name(@javax.annotation.Nonnull String name) { + this.name = name; + return this; + } + + /** + * Name of the webhook that failed to delete. + * + * @return name + */ + @javax.annotation.Nonnull + public String getName() { + return name; + } + + public void setName(@javax.annotation.Nonnull String name) { + this.name = name; + } + + public WebhookDeleteFailure error(@javax.annotation.Nonnull String error) { + this.error = error; + return this; + } + + /** + * Error message describing why the deletion failed. + * + * @return error + */ + @javax.annotation.Nonnull + public String getError() { + return error; + } + + public void setError(@javax.annotation.Nonnull String error) { + this.error = error; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key name of the property + * @param value value of the property + * @return the WebhookDeleteFailure instance itself + */ + public WebhookDeleteFailure putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return a map of objects + */ + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key name of the property + * @return an object + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + WebhookDeleteFailure webhookDeleteFailure = (WebhookDeleteFailure) o; + return Objects.equals(this.id, webhookDeleteFailure.id) + && Objects.equals(this.name, webhookDeleteFailure.name) + && Objects.equals(this.error, webhookDeleteFailure.error) + && Objects.equals( + this.additionalProperties, webhookDeleteFailure.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(id, name, error, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class WebhookDeleteFailure {\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append(" error: ").append(toIndentedString(error)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first + * line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("id"); + openapiFields.add("name"); + openapiFields.add("error"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + openapiRequiredFields.add("id"); + openapiRequiredFields.add("name"); + openapiRequiredFields.add("error"); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to WebhookDeleteFailure + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!WebhookDeleteFailure.openapiRequiredFields + .isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException( + String.format( + "The required field(s) %s in WebhookDeleteFailure is not found in" + + " the empty JSON string", + WebhookDeleteFailure.openapiRequiredFields.toString())); + } + } + + // check to make sure all required properties/fields are present in the JSON string + for (String requiredField : WebhookDeleteFailure.openapiRequiredFields) { + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException( + String.format( + "The required field `%s` is not found in the JSON string: %s", + requiredField, jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if (!jsonObj.get("id").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `id` to be a primitive type in the JSON string but" + + " got `%s`", + jsonObj.get("id").toString())); + } + if (!jsonObj.get("name").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `name` to be a primitive type in the JSON string" + + " but got `%s`", + jsonObj.get("name").toString())); + } + if (!jsonObj.get("error").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `error` to be a primitive type in the JSON string" + + " but got `%s`", + jsonObj.get("error").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!WebhookDeleteFailure.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'WebhookDeleteFailure' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter = + gson.getDelegateAdapter(this, TypeToken.get(WebhookDeleteFailure.class)); + + return (TypeAdapter) + new TypeAdapter() { + @Override + public void write(JsonWriter out, WebhookDeleteFailure value) + throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + obj.remove("additionalProperties"); + // serialize additional properties + if (value.getAdditionalProperties() != null) { + for (Map.Entry entry : + value.getAdditionalProperties().entrySet()) { + if (entry.getValue() instanceof String) + obj.addProperty(entry.getKey(), (String) entry.getValue()); + else if (entry.getValue() instanceof Number) + obj.addProperty(entry.getKey(), (Number) entry.getValue()); + else if (entry.getValue() instanceof Boolean) + obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); + else if (entry.getValue() instanceof Character) + obj.addProperty( + entry.getKey(), (Character) entry.getValue()); + else { + JsonElement jsonElement = gson.toJsonTree(entry.getValue()); + if (jsonElement.isJsonArray()) { + obj.add(entry.getKey(), jsonElement.getAsJsonArray()); + } else { + obj.add(entry.getKey(), jsonElement.getAsJsonObject()); + } + } + } + } + elementAdapter.write(out, obj); + } + + @Override + public WebhookDeleteFailure read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // store additional fields in the deserialized instance + WebhookDeleteFailure instance = thisAdapter.fromJsonTree(jsonObj); + for (Map.Entry entry : jsonObj.entrySet()) { + if (!openapiFields.contains(entry.getKey())) { + if (entry.getValue().isJsonPrimitive()) { // primitive type + if (entry.getValue().getAsJsonPrimitive().isString()) + instance.putAdditionalProperty( + entry.getKey(), entry.getValue().getAsString()); + else if (entry.getValue().getAsJsonPrimitive().isNumber()) + instance.putAdditionalProperty( + entry.getKey(), entry.getValue().getAsNumber()); + else if (entry.getValue().getAsJsonPrimitive().isBoolean()) + instance.putAdditionalProperty( + entry.getKey(), + entry.getValue().getAsBoolean()); + else + throw new IllegalArgumentException( + String.format( + "The field `%s` has unknown primitive" + + " type. Value: %s", + entry.getKey(), + entry.getValue().toString())); + } else if (entry.getValue().isJsonArray()) { + instance.putAdditionalProperty( + entry.getKey(), + gson.fromJson(entry.getValue(), List.class)); + } else { // JSON object + instance.putAdditionalProperty( + entry.getKey(), + gson.fromJson(entry.getValue(), HashMap.class)); + } + } + } + return instance; + } + }.nullSafe(); + } + } + + /** + * Create an instance of WebhookDeleteFailure given an JSON string + * + * @param jsonString JSON string + * @return An instance of WebhookDeleteFailure + * @throws IOException if the JSON string is invalid with respect to WebhookDeleteFailure + */ + public static WebhookDeleteFailure fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, WebhookDeleteFailure.class); + } + + /** + * Convert an instance of WebhookDeleteFailure to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} diff --git a/sdks/java/src/main/java/com/thoughtspot/client/model/WebhookDeleteResponse.java b/sdks/java/src/main/java/com/thoughtspot/client/model/WebhookDeleteResponse.java new file mode 100644 index 000000000..7dc338f45 --- /dev/null +++ b/sdks/java/src/main/java/com/thoughtspot/client/model/WebhookDeleteResponse.java @@ -0,0 +1,435 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client.model; + +import com.google.gson.Gson; +import com.google.gson.JsonArray; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.TypeAdapter; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.annotations.SerializedName; +import com.google.gson.reflect.TypeToken; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import com.thoughtspot.client.JSON; +import java.io.IOException; +import java.io.Serializable; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Objects; + +/** WebhookDeleteResponse */ +@javax.annotation.Generated( + value = "org.openapitools.codegen.languages.JavaClientCodegen", + comments = "Generator version: 7.12.0") +public class WebhookDeleteResponse implements Serializable { + private static final long serialVersionUID = 1L; + + public static final String SERIALIZED_NAME_DELETED_COUNT = "deleted_count"; + + @SerializedName(SERIALIZED_NAME_DELETED_COUNT) + @javax.annotation.Nonnull + private Integer deletedCount; + + public static final String SERIALIZED_NAME_FAILED_COUNT = "failed_count"; + + @SerializedName(SERIALIZED_NAME_FAILED_COUNT) + @javax.annotation.Nonnull + private Integer failedCount; + + public static final String SERIALIZED_NAME_DELETED_WEBHOOKS = "deleted_webhooks"; + + @SerializedName(SERIALIZED_NAME_DELETED_WEBHOOKS) + @javax.annotation.Nonnull + private List deletedWebhooks; + + public static final String SERIALIZED_NAME_FAILED_WEBHOOKS = "failed_webhooks"; + + @SerializedName(SERIALIZED_NAME_FAILED_WEBHOOKS) + @javax.annotation.Nonnull + private List failedWebhooks; + + public WebhookDeleteResponse() {} + + public WebhookDeleteResponse deletedCount(@javax.annotation.Nonnull Integer deletedCount) { + this.deletedCount = deletedCount; + return this; + } + + /** + * Number of webhooks successfully deleted. + * + * @return deletedCount + */ + @javax.annotation.Nonnull + public Integer getDeletedCount() { + return deletedCount; + } + + public void setDeletedCount(@javax.annotation.Nonnull Integer deletedCount) { + this.deletedCount = deletedCount; + } + + public WebhookDeleteResponse failedCount(@javax.annotation.Nonnull Integer failedCount) { + this.failedCount = failedCount; + return this; + } + + /** + * Number of webhooks that failed to delete. + * + * @return failedCount + */ + @javax.annotation.Nonnull + public Integer getFailedCount() { + return failedCount; + } + + public void setFailedCount(@javax.annotation.Nonnull Integer failedCount) { + this.failedCount = failedCount; + } + + public WebhookDeleteResponse deletedWebhooks( + @javax.annotation.Nonnull List deletedWebhooks) { + this.deletedWebhooks = deletedWebhooks; + return this; + } + + public WebhookDeleteResponse addDeletedWebhooksItem(WebhookResponse deletedWebhooksItem) { + if (this.deletedWebhooks == null) { + this.deletedWebhooks = new ArrayList<>(); + } + this.deletedWebhooks.add(deletedWebhooksItem); + return this; + } + + /** + * List of successfully deleted webhooks. + * + * @return deletedWebhooks + */ + @javax.annotation.Nonnull + public List getDeletedWebhooks() { + return deletedWebhooks; + } + + public void setDeletedWebhooks( + @javax.annotation.Nonnull List deletedWebhooks) { + this.deletedWebhooks = deletedWebhooks; + } + + public WebhookDeleteResponse failedWebhooks( + @javax.annotation.Nonnull List failedWebhooks) { + this.failedWebhooks = failedWebhooks; + return this; + } + + public WebhookDeleteResponse addFailedWebhooksItem(WebhookDeleteFailure failedWebhooksItem) { + if (this.failedWebhooks == null) { + this.failedWebhooks = new ArrayList<>(); + } + this.failedWebhooks.add(failedWebhooksItem); + return this; + } + + /** + * List of webhooks that failed to delete with error details. + * + * @return failedWebhooks + */ + @javax.annotation.Nonnull + public List getFailedWebhooks() { + return failedWebhooks; + } + + public void setFailedWebhooks( + @javax.annotation.Nonnull List failedWebhooks) { + this.failedWebhooks = failedWebhooks; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key name of the property + * @param value value of the property + * @return the WebhookDeleteResponse instance itself + */ + public WebhookDeleteResponse putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return a map of objects + */ + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key name of the property + * @return an object + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + WebhookDeleteResponse webhookDeleteResponse = (WebhookDeleteResponse) o; + return Objects.equals(this.deletedCount, webhookDeleteResponse.deletedCount) + && Objects.equals(this.failedCount, webhookDeleteResponse.failedCount) + && Objects.equals(this.deletedWebhooks, webhookDeleteResponse.deletedWebhooks) + && Objects.equals(this.failedWebhooks, webhookDeleteResponse.failedWebhooks) + && Objects.equals( + this.additionalProperties, webhookDeleteResponse.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash( + deletedCount, failedCount, deletedWebhooks, failedWebhooks, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class WebhookDeleteResponse {\n"); + sb.append(" deletedCount: ").append(toIndentedString(deletedCount)).append("\n"); + sb.append(" failedCount: ").append(toIndentedString(failedCount)).append("\n"); + sb.append(" deletedWebhooks: ").append(toIndentedString(deletedWebhooks)).append("\n"); + sb.append(" failedWebhooks: ").append(toIndentedString(failedWebhooks)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first + * line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("deleted_count"); + openapiFields.add("failed_count"); + openapiFields.add("deleted_webhooks"); + openapiFields.add("failed_webhooks"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + openapiRequiredFields.add("deleted_count"); + openapiRequiredFields.add("failed_count"); + openapiRequiredFields.add("deleted_webhooks"); + openapiRequiredFields.add("failed_webhooks"); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to WebhookDeleteResponse + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!WebhookDeleteResponse.openapiRequiredFields + .isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException( + String.format( + "The required field(s) %s in WebhookDeleteResponse is not found in" + + " the empty JSON string", + WebhookDeleteResponse.openapiRequiredFields.toString())); + } + } + + // check to make sure all required properties/fields are present in the JSON string + for (String requiredField : WebhookDeleteResponse.openapiRequiredFields) { + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException( + String.format( + "The required field `%s` is not found in the JSON string: %s", + requiredField, jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // ensure the json data is an array + if (!jsonObj.get("deleted_webhooks").isJsonArray()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `deleted_webhooks` to be an array in the JSON" + + " string but got `%s`", + jsonObj.get("deleted_webhooks").toString())); + } + + JsonArray jsonArraydeletedWebhooks = jsonObj.getAsJsonArray("deleted_webhooks"); + // validate the required field `deleted_webhooks` (array) + for (int i = 0; i < jsonArraydeletedWebhooks.size(); i++) { + WebhookResponse.validateJsonElement(jsonArraydeletedWebhooks.get(i)); + } + ; + // ensure the json data is an array + if (!jsonObj.get("failed_webhooks").isJsonArray()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `failed_webhooks` to be an array in the JSON" + + " string but got `%s`", + jsonObj.get("failed_webhooks").toString())); + } + + JsonArray jsonArrayfailedWebhooks = jsonObj.getAsJsonArray("failed_webhooks"); + // validate the required field `failed_webhooks` (array) + for (int i = 0; i < jsonArrayfailedWebhooks.size(); i++) { + WebhookDeleteFailure.validateJsonElement(jsonArrayfailedWebhooks.get(i)); + } + ; + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!WebhookDeleteResponse.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'WebhookDeleteResponse' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter = + gson.getDelegateAdapter(this, TypeToken.get(WebhookDeleteResponse.class)); + + return (TypeAdapter) + new TypeAdapter() { + @Override + public void write(JsonWriter out, WebhookDeleteResponse value) + throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + obj.remove("additionalProperties"); + // serialize additional properties + if (value.getAdditionalProperties() != null) { + for (Map.Entry entry : + value.getAdditionalProperties().entrySet()) { + if (entry.getValue() instanceof String) + obj.addProperty(entry.getKey(), (String) entry.getValue()); + else if (entry.getValue() instanceof Number) + obj.addProperty(entry.getKey(), (Number) entry.getValue()); + else if (entry.getValue() instanceof Boolean) + obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); + else if (entry.getValue() instanceof Character) + obj.addProperty( + entry.getKey(), (Character) entry.getValue()); + else { + JsonElement jsonElement = gson.toJsonTree(entry.getValue()); + if (jsonElement.isJsonArray()) { + obj.add(entry.getKey(), jsonElement.getAsJsonArray()); + } else { + obj.add(entry.getKey(), jsonElement.getAsJsonObject()); + } + } + } + } + elementAdapter.write(out, obj); + } + + @Override + public WebhookDeleteResponse read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // store additional fields in the deserialized instance + WebhookDeleteResponse instance = thisAdapter.fromJsonTree(jsonObj); + for (Map.Entry entry : jsonObj.entrySet()) { + if (!openapiFields.contains(entry.getKey())) { + if (entry.getValue().isJsonPrimitive()) { // primitive type + if (entry.getValue().getAsJsonPrimitive().isString()) + instance.putAdditionalProperty( + entry.getKey(), entry.getValue().getAsString()); + else if (entry.getValue().getAsJsonPrimitive().isNumber()) + instance.putAdditionalProperty( + entry.getKey(), entry.getValue().getAsNumber()); + else if (entry.getValue().getAsJsonPrimitive().isBoolean()) + instance.putAdditionalProperty( + entry.getKey(), + entry.getValue().getAsBoolean()); + else + throw new IllegalArgumentException( + String.format( + "The field `%s` has unknown primitive" + + " type. Value: %s", + entry.getKey(), + entry.getValue().toString())); + } else if (entry.getValue().isJsonArray()) { + instance.putAdditionalProperty( + entry.getKey(), + gson.fromJson(entry.getValue(), List.class)); + } else { // JSON object + instance.putAdditionalProperty( + entry.getKey(), + gson.fromJson(entry.getValue(), HashMap.class)); + } + } + } + return instance; + } + }.nullSafe(); + } + } + + /** + * Create an instance of WebhookDeleteResponse given an JSON string + * + * @param jsonString JSON string + * @return An instance of WebhookDeleteResponse + * @throws IOException if the JSON string is invalid with respect to WebhookDeleteResponse + */ + public static WebhookDeleteResponse fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, WebhookDeleteResponse.class); + } + + /** + * Convert an instance of WebhookDeleteResponse to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} diff --git a/sdks/java/src/main/java/com/thoughtspot/client/model/WebhookKeyValuePair.java b/sdks/java/src/main/java/com/thoughtspot/client/model/WebhookKeyValuePair.java new file mode 100644 index 000000000..6dd99546e --- /dev/null +++ b/sdks/java/src/main/java/com/thoughtspot/client/model/WebhookKeyValuePair.java @@ -0,0 +1,338 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client.model; + +import com.google.gson.Gson; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.TypeAdapter; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.annotations.SerializedName; +import com.google.gson.reflect.TypeToken; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import com.thoughtspot.client.JSON; +import java.io.IOException; +import java.io.Serializable; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Objects; + +/** Key-value pair for additional webhook headers. */ +@javax.annotation.Generated( + value = "org.openapitools.codegen.languages.JavaClientCodegen", + comments = "Generator version: 7.12.0") +public class WebhookKeyValuePair implements Serializable { + private static final long serialVersionUID = 1L; + + public static final String SERIALIZED_NAME_KEY = "key"; + + @SerializedName(SERIALIZED_NAME_KEY) + @javax.annotation.Nonnull + private String key; + + public static final String SERIALIZED_NAME_VALUE = "value"; + + @SerializedName(SERIALIZED_NAME_VALUE) + @javax.annotation.Nonnull + private String value; + + public WebhookKeyValuePair() {} + + public WebhookKeyValuePair key(@javax.annotation.Nonnull String key) { + this.key = key; + return this; + } + + /** + * Header name. + * + * @return key + */ + @javax.annotation.Nonnull + public String getKey() { + return key; + } + + public void setKey(@javax.annotation.Nonnull String key) { + this.key = key; + } + + public WebhookKeyValuePair value(@javax.annotation.Nonnull String value) { + this.value = value; + return this; + } + + /** + * Header value. + * + * @return value + */ + @javax.annotation.Nonnull + public String getValue() { + return value; + } + + public void setValue(@javax.annotation.Nonnull String value) { + this.value = value; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key name of the property + * @param value value of the property + * @return the WebhookKeyValuePair instance itself + */ + public WebhookKeyValuePair putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return a map of objects + */ + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key name of the property + * @return an object + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + WebhookKeyValuePair webhookKeyValuePair = (WebhookKeyValuePair) o; + return Objects.equals(this.key, webhookKeyValuePair.key) + && Objects.equals(this.value, webhookKeyValuePair.value) + && Objects.equals( + this.additionalProperties, webhookKeyValuePair.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(key, value, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class WebhookKeyValuePair {\n"); + sb.append(" key: ").append(toIndentedString(key)).append("\n"); + sb.append(" value: ").append(toIndentedString(value)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first + * line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("key"); + openapiFields.add("value"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + openapiRequiredFields.add("key"); + openapiRequiredFields.add("value"); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to WebhookKeyValuePair + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!WebhookKeyValuePair.openapiRequiredFields + .isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException( + String.format( + "The required field(s) %s in WebhookKeyValuePair is not found in" + + " the empty JSON string", + WebhookKeyValuePair.openapiRequiredFields.toString())); + } + } + + // check to make sure all required properties/fields are present in the JSON string + for (String requiredField : WebhookKeyValuePair.openapiRequiredFields) { + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException( + String.format( + "The required field `%s` is not found in the JSON string: %s", + requiredField, jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if (!jsonObj.get("key").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `key` to be a primitive type in the JSON string" + + " but got `%s`", + jsonObj.get("key").toString())); + } + if (!jsonObj.get("value").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `value` to be a primitive type in the JSON string" + + " but got `%s`", + jsonObj.get("value").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!WebhookKeyValuePair.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'WebhookKeyValuePair' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter = + gson.getDelegateAdapter(this, TypeToken.get(WebhookKeyValuePair.class)); + + return (TypeAdapter) + new TypeAdapter() { + @Override + public void write(JsonWriter out, WebhookKeyValuePair value) + throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + obj.remove("additionalProperties"); + // serialize additional properties + if (value.getAdditionalProperties() != null) { + for (Map.Entry entry : + value.getAdditionalProperties().entrySet()) { + if (entry.getValue() instanceof String) + obj.addProperty(entry.getKey(), (String) entry.getValue()); + else if (entry.getValue() instanceof Number) + obj.addProperty(entry.getKey(), (Number) entry.getValue()); + else if (entry.getValue() instanceof Boolean) + obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); + else if (entry.getValue() instanceof Character) + obj.addProperty( + entry.getKey(), (Character) entry.getValue()); + else { + JsonElement jsonElement = gson.toJsonTree(entry.getValue()); + if (jsonElement.isJsonArray()) { + obj.add(entry.getKey(), jsonElement.getAsJsonArray()); + } else { + obj.add(entry.getKey(), jsonElement.getAsJsonObject()); + } + } + } + } + elementAdapter.write(out, obj); + } + + @Override + public WebhookKeyValuePair read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // store additional fields in the deserialized instance + WebhookKeyValuePair instance = thisAdapter.fromJsonTree(jsonObj); + for (Map.Entry entry : jsonObj.entrySet()) { + if (!openapiFields.contains(entry.getKey())) { + if (entry.getValue().isJsonPrimitive()) { // primitive type + if (entry.getValue().getAsJsonPrimitive().isString()) + instance.putAdditionalProperty( + entry.getKey(), entry.getValue().getAsString()); + else if (entry.getValue().getAsJsonPrimitive().isNumber()) + instance.putAdditionalProperty( + entry.getKey(), entry.getValue().getAsNumber()); + else if (entry.getValue().getAsJsonPrimitive().isBoolean()) + instance.putAdditionalProperty( + entry.getKey(), + entry.getValue().getAsBoolean()); + else + throw new IllegalArgumentException( + String.format( + "The field `%s` has unknown primitive" + + " type. Value: %s", + entry.getKey(), + entry.getValue().toString())); + } else if (entry.getValue().isJsonArray()) { + instance.putAdditionalProperty( + entry.getKey(), + gson.fromJson(entry.getValue(), List.class)); + } else { // JSON object + instance.putAdditionalProperty( + entry.getKey(), + gson.fromJson(entry.getValue(), HashMap.class)); + } + } + } + return instance; + } + }.nullSafe(); + } + } + + /** + * Create an instance of WebhookKeyValuePair given an JSON string + * + * @param jsonString JSON string + * @return An instance of WebhookKeyValuePair + * @throws IOException if the JSON string is invalid with respect to WebhookKeyValuePair + */ + public static WebhookKeyValuePair fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, WebhookKeyValuePair.class); + } + + /** + * Convert an instance of WebhookKeyValuePair to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} diff --git a/sdks/java/src/main/java/com/thoughtspot/client/model/WebhookKeyValuePairInput.java b/sdks/java/src/main/java/com/thoughtspot/client/model/WebhookKeyValuePairInput.java new file mode 100644 index 000000000..e52adc596 --- /dev/null +++ b/sdks/java/src/main/java/com/thoughtspot/client/model/WebhookKeyValuePairInput.java @@ -0,0 +1,339 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client.model; + +import com.google.gson.Gson; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.TypeAdapter; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.annotations.SerializedName; +import com.google.gson.reflect.TypeToken; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import com.thoughtspot.client.JSON; +import java.io.IOException; +import java.io.Serializable; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Objects; + +/** Key-value pair input for additional webhook headers. */ +@javax.annotation.Generated( + value = "org.openapitools.codegen.languages.JavaClientCodegen", + comments = "Generator version: 7.12.0") +public class WebhookKeyValuePairInput implements Serializable { + private static final long serialVersionUID = 1L; + + public static final String SERIALIZED_NAME_KEY = "key"; + + @SerializedName(SERIALIZED_NAME_KEY) + @javax.annotation.Nonnull + private String key; + + public static final String SERIALIZED_NAME_VALUE = "value"; + + @SerializedName(SERIALIZED_NAME_VALUE) + @javax.annotation.Nonnull + private String value; + + public WebhookKeyValuePairInput() {} + + public WebhookKeyValuePairInput key(@javax.annotation.Nonnull String key) { + this.key = key; + return this; + } + + /** + * Header name. + * + * @return key + */ + @javax.annotation.Nonnull + public String getKey() { + return key; + } + + public void setKey(@javax.annotation.Nonnull String key) { + this.key = key; + } + + public WebhookKeyValuePairInput value(@javax.annotation.Nonnull String value) { + this.value = value; + return this; + } + + /** + * Header value. + * + * @return value + */ + @javax.annotation.Nonnull + public String getValue() { + return value; + } + + public void setValue(@javax.annotation.Nonnull String value) { + this.value = value; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key name of the property + * @param value value of the property + * @return the WebhookKeyValuePairInput instance itself + */ + public WebhookKeyValuePairInput putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return a map of objects + */ + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key name of the property + * @return an object + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + WebhookKeyValuePairInput webhookKeyValuePairInput = (WebhookKeyValuePairInput) o; + return Objects.equals(this.key, webhookKeyValuePairInput.key) + && Objects.equals(this.value, webhookKeyValuePairInput.value) + && Objects.equals( + this.additionalProperties, webhookKeyValuePairInput.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(key, value, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class WebhookKeyValuePairInput {\n"); + sb.append(" key: ").append(toIndentedString(key)).append("\n"); + sb.append(" value: ").append(toIndentedString(value)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first + * line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("key"); + openapiFields.add("value"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + openapiRequiredFields.add("key"); + openapiRequiredFields.add("value"); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to WebhookKeyValuePairInput + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!WebhookKeyValuePairInput.openapiRequiredFields + .isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException( + String.format( + "The required field(s) %s in WebhookKeyValuePairInput is not found" + + " in the empty JSON string", + WebhookKeyValuePairInput.openapiRequiredFields.toString())); + } + } + + // check to make sure all required properties/fields are present in the JSON string + for (String requiredField : WebhookKeyValuePairInput.openapiRequiredFields) { + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException( + String.format( + "The required field `%s` is not found in the JSON string: %s", + requiredField, jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if (!jsonObj.get("key").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `key` to be a primitive type in the JSON string" + + " but got `%s`", + jsonObj.get("key").toString())); + } + if (!jsonObj.get("value").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `value` to be a primitive type in the JSON string" + + " but got `%s`", + jsonObj.get("value").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!WebhookKeyValuePairInput.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'WebhookKeyValuePairInput' and its + // subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter = + gson.getDelegateAdapter(this, TypeToken.get(WebhookKeyValuePairInput.class)); + + return (TypeAdapter) + new TypeAdapter() { + @Override + public void write(JsonWriter out, WebhookKeyValuePairInput value) + throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + obj.remove("additionalProperties"); + // serialize additional properties + if (value.getAdditionalProperties() != null) { + for (Map.Entry entry : + value.getAdditionalProperties().entrySet()) { + if (entry.getValue() instanceof String) + obj.addProperty(entry.getKey(), (String) entry.getValue()); + else if (entry.getValue() instanceof Number) + obj.addProperty(entry.getKey(), (Number) entry.getValue()); + else if (entry.getValue() instanceof Boolean) + obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); + else if (entry.getValue() instanceof Character) + obj.addProperty( + entry.getKey(), (Character) entry.getValue()); + else { + JsonElement jsonElement = gson.toJsonTree(entry.getValue()); + if (jsonElement.isJsonArray()) { + obj.add(entry.getKey(), jsonElement.getAsJsonArray()); + } else { + obj.add(entry.getKey(), jsonElement.getAsJsonObject()); + } + } + } + } + elementAdapter.write(out, obj); + } + + @Override + public WebhookKeyValuePairInput read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // store additional fields in the deserialized instance + WebhookKeyValuePairInput instance = thisAdapter.fromJsonTree(jsonObj); + for (Map.Entry entry : jsonObj.entrySet()) { + if (!openapiFields.contains(entry.getKey())) { + if (entry.getValue().isJsonPrimitive()) { // primitive type + if (entry.getValue().getAsJsonPrimitive().isString()) + instance.putAdditionalProperty( + entry.getKey(), entry.getValue().getAsString()); + else if (entry.getValue().getAsJsonPrimitive().isNumber()) + instance.putAdditionalProperty( + entry.getKey(), entry.getValue().getAsNumber()); + else if (entry.getValue().getAsJsonPrimitive().isBoolean()) + instance.putAdditionalProperty( + entry.getKey(), + entry.getValue().getAsBoolean()); + else + throw new IllegalArgumentException( + String.format( + "The field `%s` has unknown primitive" + + " type. Value: %s", + entry.getKey(), + entry.getValue().toString())); + } else if (entry.getValue().isJsonArray()) { + instance.putAdditionalProperty( + entry.getKey(), + gson.fromJson(entry.getValue(), List.class)); + } else { // JSON object + instance.putAdditionalProperty( + entry.getKey(), + gson.fromJson(entry.getValue(), HashMap.class)); + } + } + } + return instance; + } + }.nullSafe(); + } + } + + /** + * Create an instance of WebhookKeyValuePairInput given an JSON string + * + * @param jsonString JSON string + * @return An instance of WebhookKeyValuePairInput + * @throws IOException if the JSON string is invalid with respect to WebhookKeyValuePairInput + */ + public static WebhookKeyValuePairInput fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, WebhookKeyValuePairInput.class); + } + + /** + * Convert an instance of WebhookKeyValuePairInput to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} diff --git a/sdks/java/src/main/java/com/thoughtspot/client/model/WebhookOrg.java b/sdks/java/src/main/java/com/thoughtspot/client/model/WebhookOrg.java new file mode 100644 index 000000000..9f7838145 --- /dev/null +++ b/sdks/java/src/main/java/com/thoughtspot/client/model/WebhookOrg.java @@ -0,0 +1,336 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client.model; + +import com.google.gson.Gson; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.TypeAdapter; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.annotations.SerializedName; +import com.google.gson.reflect.TypeToken; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import com.thoughtspot.client.JSON; +import java.io.IOException; +import java.io.Serializable; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Objects; + +/** WebhookOrg */ +@javax.annotation.Generated( + value = "org.openapitools.codegen.languages.JavaClientCodegen", + comments = "Generator version: 7.12.0") +public class WebhookOrg implements Serializable { + private static final long serialVersionUID = 1L; + + public static final String SERIALIZED_NAME_ID = "id"; + + @SerializedName(SERIALIZED_NAME_ID) + @javax.annotation.Nonnull + private String id; + + public static final String SERIALIZED_NAME_NAME = "name"; + + @SerializedName(SERIALIZED_NAME_NAME) + @javax.annotation.Nonnull + private String name; + + public WebhookOrg() {} + + public WebhookOrg id(@javax.annotation.Nonnull String id) { + this.id = id; + return this; + } + + /** + * Unique identifier of the org. + * + * @return id + */ + @javax.annotation.Nonnull + public String getId() { + return id; + } + + public void setId(@javax.annotation.Nonnull String id) { + this.id = id; + } + + public WebhookOrg name(@javax.annotation.Nonnull String name) { + this.name = name; + return this; + } + + /** + * Name of the org. + * + * @return name + */ + @javax.annotation.Nonnull + public String getName() { + return name; + } + + public void setName(@javax.annotation.Nonnull String name) { + this.name = name; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key name of the property + * @param value value of the property + * @return the WebhookOrg instance itself + */ + public WebhookOrg putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return a map of objects + */ + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key name of the property + * @return an object + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + WebhookOrg webhookOrg = (WebhookOrg) o; + return Objects.equals(this.id, webhookOrg.id) + && Objects.equals(this.name, webhookOrg.name) + && Objects.equals(this.additionalProperties, webhookOrg.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(id, name, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class WebhookOrg {\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first + * line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("id"); + openapiFields.add("name"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + openapiRequiredFields.add("id"); + openapiRequiredFields.add("name"); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to WebhookOrg + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!WebhookOrg.openapiRequiredFields + .isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException( + String.format( + "The required field(s) %s in WebhookOrg is not found in the empty" + + " JSON string", + WebhookOrg.openapiRequiredFields.toString())); + } + } + + // check to make sure all required properties/fields are present in the JSON string + for (String requiredField : WebhookOrg.openapiRequiredFields) { + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException( + String.format( + "The required field `%s` is not found in the JSON string: %s", + requiredField, jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if (!jsonObj.get("id").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `id` to be a primitive type in the JSON string but" + + " got `%s`", + jsonObj.get("id").toString())); + } + if (!jsonObj.get("name").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `name` to be a primitive type in the JSON string" + + " but got `%s`", + jsonObj.get("name").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!WebhookOrg.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'WebhookOrg' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter = + gson.getDelegateAdapter(this, TypeToken.get(WebhookOrg.class)); + + return (TypeAdapter) + new TypeAdapter() { + @Override + public void write(JsonWriter out, WebhookOrg value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + obj.remove("additionalProperties"); + // serialize additional properties + if (value.getAdditionalProperties() != null) { + for (Map.Entry entry : + value.getAdditionalProperties().entrySet()) { + if (entry.getValue() instanceof String) + obj.addProperty(entry.getKey(), (String) entry.getValue()); + else if (entry.getValue() instanceof Number) + obj.addProperty(entry.getKey(), (Number) entry.getValue()); + else if (entry.getValue() instanceof Boolean) + obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); + else if (entry.getValue() instanceof Character) + obj.addProperty( + entry.getKey(), (Character) entry.getValue()); + else { + JsonElement jsonElement = gson.toJsonTree(entry.getValue()); + if (jsonElement.isJsonArray()) { + obj.add(entry.getKey(), jsonElement.getAsJsonArray()); + } else { + obj.add(entry.getKey(), jsonElement.getAsJsonObject()); + } + } + } + } + elementAdapter.write(out, obj); + } + + @Override + public WebhookOrg read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // store additional fields in the deserialized instance + WebhookOrg instance = thisAdapter.fromJsonTree(jsonObj); + for (Map.Entry entry : jsonObj.entrySet()) { + if (!openapiFields.contains(entry.getKey())) { + if (entry.getValue().isJsonPrimitive()) { // primitive type + if (entry.getValue().getAsJsonPrimitive().isString()) + instance.putAdditionalProperty( + entry.getKey(), entry.getValue().getAsString()); + else if (entry.getValue().getAsJsonPrimitive().isNumber()) + instance.putAdditionalProperty( + entry.getKey(), entry.getValue().getAsNumber()); + else if (entry.getValue().getAsJsonPrimitive().isBoolean()) + instance.putAdditionalProperty( + entry.getKey(), + entry.getValue().getAsBoolean()); + else + throw new IllegalArgumentException( + String.format( + "The field `%s` has unknown primitive" + + " type. Value: %s", + entry.getKey(), + entry.getValue().toString())); + } else if (entry.getValue().isJsonArray()) { + instance.putAdditionalProperty( + entry.getKey(), + gson.fromJson(entry.getValue(), List.class)); + } else { // JSON object + instance.putAdditionalProperty( + entry.getKey(), + gson.fromJson(entry.getValue(), HashMap.class)); + } + } + } + return instance; + } + }.nullSafe(); + } + } + + /** + * Create an instance of WebhookOrg given an JSON string + * + * @param jsonString JSON string + * @return An instance of WebhookOrg + * @throws IOException if the JSON string is invalid with respect to WebhookOrg + */ + public static WebhookOrg fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, WebhookOrg.class); + } + + /** + * Convert an instance of WebhookOrg to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} diff --git a/sdks/java/src/main/java/com/thoughtspot/client/model/WebhookPagination.java b/sdks/java/src/main/java/com/thoughtspot/client/model/WebhookPagination.java new file mode 100644 index 000000000..38c97ac0f --- /dev/null +++ b/sdks/java/src/main/java/com/thoughtspot/client/model/WebhookPagination.java @@ -0,0 +1,382 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client.model; + +import com.google.gson.Gson; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.TypeAdapter; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.annotations.SerializedName; +import com.google.gson.reflect.TypeToken; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import com.thoughtspot.client.JSON; +import java.io.IOException; +import java.io.Serializable; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Objects; + +/** WebhookPagination */ +@javax.annotation.Generated( + value = "org.openapitools.codegen.languages.JavaClientCodegen", + comments = "Generator version: 7.12.0") +public class WebhookPagination implements Serializable { + private static final long serialVersionUID = 1L; + + public static final String SERIALIZED_NAME_RECORD_OFFSET = "record_offset"; + + @SerializedName(SERIALIZED_NAME_RECORD_OFFSET) + @javax.annotation.Nonnull + private Integer recordOffset; + + public static final String SERIALIZED_NAME_RECORD_SIZE = "record_size"; + + @SerializedName(SERIALIZED_NAME_RECORD_SIZE) + @javax.annotation.Nonnull + private Integer recordSize; + + public static final String SERIALIZED_NAME_TOTAL_COUNT = "total_count"; + + @SerializedName(SERIALIZED_NAME_TOTAL_COUNT) + @javax.annotation.Nonnull + private Integer totalCount; + + public static final String SERIALIZED_NAME_HAS_MORE = "has_more"; + + @SerializedName(SERIALIZED_NAME_HAS_MORE) + @javax.annotation.Nonnull + private Boolean hasMore; + + public WebhookPagination() {} + + public WebhookPagination recordOffset(@javax.annotation.Nonnull Integer recordOffset) { + this.recordOffset = recordOffset; + return this; + } + + /** + * The starting record number from where the records are included. + * + * @return recordOffset + */ + @javax.annotation.Nonnull + public Integer getRecordOffset() { + return recordOffset; + } + + public void setRecordOffset(@javax.annotation.Nonnull Integer recordOffset) { + this.recordOffset = recordOffset; + } + + public WebhookPagination recordSize(@javax.annotation.Nonnull Integer recordSize) { + this.recordSize = recordSize; + return this; + } + + /** + * The number of records included in the response. + * + * @return recordSize + */ + @javax.annotation.Nonnull + public Integer getRecordSize() { + return recordSize; + } + + public void setRecordSize(@javax.annotation.Nonnull Integer recordSize) { + this.recordSize = recordSize; + } + + public WebhookPagination totalCount(@javax.annotation.Nonnull Integer totalCount) { + this.totalCount = totalCount; + return this; + } + + /** + * Total number of webhook configurations available. + * + * @return totalCount + */ + @javax.annotation.Nonnull + public Integer getTotalCount() { + return totalCount; + } + + public void setTotalCount(@javax.annotation.Nonnull Integer totalCount) { + this.totalCount = totalCount; + } + + public WebhookPagination hasMore(@javax.annotation.Nonnull Boolean hasMore) { + this.hasMore = hasMore; + return this; + } + + /** + * Indicates whether more records are available beyond the current response. + * + * @return hasMore + */ + @javax.annotation.Nonnull + public Boolean getHasMore() { + return hasMore; + } + + public void setHasMore(@javax.annotation.Nonnull Boolean hasMore) { + this.hasMore = hasMore; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key name of the property + * @param value value of the property + * @return the WebhookPagination instance itself + */ + public WebhookPagination putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return a map of objects + */ + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key name of the property + * @return an object + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + WebhookPagination webhookPagination = (WebhookPagination) o; + return Objects.equals(this.recordOffset, webhookPagination.recordOffset) + && Objects.equals(this.recordSize, webhookPagination.recordSize) + && Objects.equals(this.totalCount, webhookPagination.totalCount) + && Objects.equals(this.hasMore, webhookPagination.hasMore) + && Objects.equals( + this.additionalProperties, webhookPagination.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(recordOffset, recordSize, totalCount, hasMore, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class WebhookPagination {\n"); + sb.append(" recordOffset: ").append(toIndentedString(recordOffset)).append("\n"); + sb.append(" recordSize: ").append(toIndentedString(recordSize)).append("\n"); + sb.append(" totalCount: ").append(toIndentedString(totalCount)).append("\n"); + sb.append(" hasMore: ").append(toIndentedString(hasMore)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first + * line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("record_offset"); + openapiFields.add("record_size"); + openapiFields.add("total_count"); + openapiFields.add("has_more"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + openapiRequiredFields.add("record_offset"); + openapiRequiredFields.add("record_size"); + openapiRequiredFields.add("total_count"); + openapiRequiredFields.add("has_more"); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to WebhookPagination + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!WebhookPagination.openapiRequiredFields + .isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException( + String.format( + "The required field(s) %s in WebhookPagination is not found in the" + + " empty JSON string", + WebhookPagination.openapiRequiredFields.toString())); + } + } + + // check to make sure all required properties/fields are present in the JSON string + for (String requiredField : WebhookPagination.openapiRequiredFields) { + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException( + String.format( + "The required field `%s` is not found in the JSON string: %s", + requiredField, jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!WebhookPagination.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'WebhookPagination' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter = + gson.getDelegateAdapter(this, TypeToken.get(WebhookPagination.class)); + + return (TypeAdapter) + new TypeAdapter() { + @Override + public void write(JsonWriter out, WebhookPagination value) + throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + obj.remove("additionalProperties"); + // serialize additional properties + if (value.getAdditionalProperties() != null) { + for (Map.Entry entry : + value.getAdditionalProperties().entrySet()) { + if (entry.getValue() instanceof String) + obj.addProperty(entry.getKey(), (String) entry.getValue()); + else if (entry.getValue() instanceof Number) + obj.addProperty(entry.getKey(), (Number) entry.getValue()); + else if (entry.getValue() instanceof Boolean) + obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); + else if (entry.getValue() instanceof Character) + obj.addProperty( + entry.getKey(), (Character) entry.getValue()); + else { + JsonElement jsonElement = gson.toJsonTree(entry.getValue()); + if (jsonElement.isJsonArray()) { + obj.add(entry.getKey(), jsonElement.getAsJsonArray()); + } else { + obj.add(entry.getKey(), jsonElement.getAsJsonObject()); + } + } + } + } + elementAdapter.write(out, obj); + } + + @Override + public WebhookPagination read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // store additional fields in the deserialized instance + WebhookPagination instance = thisAdapter.fromJsonTree(jsonObj); + for (Map.Entry entry : jsonObj.entrySet()) { + if (!openapiFields.contains(entry.getKey())) { + if (entry.getValue().isJsonPrimitive()) { // primitive type + if (entry.getValue().getAsJsonPrimitive().isString()) + instance.putAdditionalProperty( + entry.getKey(), entry.getValue().getAsString()); + else if (entry.getValue().getAsJsonPrimitive().isNumber()) + instance.putAdditionalProperty( + entry.getKey(), entry.getValue().getAsNumber()); + else if (entry.getValue().getAsJsonPrimitive().isBoolean()) + instance.putAdditionalProperty( + entry.getKey(), + entry.getValue().getAsBoolean()); + else + throw new IllegalArgumentException( + String.format( + "The field `%s` has unknown primitive" + + " type. Value: %s", + entry.getKey(), + entry.getValue().toString())); + } else if (entry.getValue().isJsonArray()) { + instance.putAdditionalProperty( + entry.getKey(), + gson.fromJson(entry.getValue(), List.class)); + } else { // JSON object + instance.putAdditionalProperty( + entry.getKey(), + gson.fromJson(entry.getValue(), HashMap.class)); + } + } + } + return instance; + } + }.nullSafe(); + } + } + + /** + * Create an instance of WebhookPagination given an JSON string + * + * @param jsonString JSON string + * @return An instance of WebhookPagination + * @throws IOException if the JSON string is invalid with respect to WebhookPagination + */ + public static WebhookPagination fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, WebhookPagination.class); + } + + /** + * Convert an instance of WebhookPagination to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} diff --git a/sdks/java/src/main/java/com/thoughtspot/client/model/WebhookResponse.java b/sdks/java/src/main/java/com/thoughtspot/client/model/WebhookResponse.java new file mode 100644 index 000000000..4f9410ff5 --- /dev/null +++ b/sdks/java/src/main/java/com/thoughtspot/client/model/WebhookResponse.java @@ -0,0 +1,903 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client.model; + +import com.google.gson.Gson; +import com.google.gson.JsonArray; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.TypeAdapter; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.reflect.TypeToken; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import com.thoughtspot.client.JSON; +import java.io.IOException; +import java.io.Serializable; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Objects; +import org.openapitools.jackson.nullable.JsonNullable; + +/** WebhookResponse */ +@javax.annotation.Generated( + value = "org.openapitools.codegen.languages.JavaClientCodegen", + comments = "Generator version: 7.12.0") +public class WebhookResponse implements Serializable { + private static final long serialVersionUID = 1L; + + public static final String SERIALIZED_NAME_ID = "id"; + + @SerializedName(SERIALIZED_NAME_ID) + @javax.annotation.Nonnull + private String id; + + public static final String SERIALIZED_NAME_NAME = "name"; + + @SerializedName(SERIALIZED_NAME_NAME) + @javax.annotation.Nonnull + private String name; + + public static final String SERIALIZED_NAME_DESCRIPTION = "description"; + + @SerializedName(SERIALIZED_NAME_DESCRIPTION) + @javax.annotation.Nullable + private String description; + + public static final String SERIALIZED_NAME_ORG = "org"; + + @SerializedName(SERIALIZED_NAME_ORG) + @javax.annotation.Nullable + private WebhookOrg org; + + public static final String SERIALIZED_NAME_URL = "url"; + + @SerializedName(SERIALIZED_NAME_URL) + @javax.annotation.Nonnull + private String url; + + public static final String SERIALIZED_NAME_URL_PARAMS = "url_params"; + + @SerializedName(SERIALIZED_NAME_URL_PARAMS) + @javax.annotation.Nullable + private Object urlParams; + + /** Gets or Sets events */ + @JsonAdapter(EventsEnum.Adapter.class) + public enum EventsEnum { + LIVEBOARD_SCHEDULE("LIVEBOARD_SCHEDULE"); + + private String value; + + EventsEnum(String value) { + this.value = value; + } + + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + public static EventsEnum fromValue(String value) { + for (EventsEnum b : EventsEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + + public static class Adapter extends TypeAdapter { + @Override + public void write(final JsonWriter jsonWriter, final EventsEnum enumeration) + throws IOException { + jsonWriter.value(enumeration.getValue()); + } + + @Override + public EventsEnum read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + return EventsEnum.fromValue(value); + } + } + + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + String value = jsonElement.getAsString(); + EventsEnum.fromValue(value); + } + } + + public static final String SERIALIZED_NAME_EVENTS = "events"; + + @SerializedName(SERIALIZED_NAME_EVENTS) + @javax.annotation.Nonnull + private List events; + + public static final String SERIALIZED_NAME_AUTHENTICATION = "authentication"; + + @SerializedName(SERIALIZED_NAME_AUTHENTICATION) + @javax.annotation.Nullable + private WebhookAuthentication authentication; + + public static final String SERIALIZED_NAME_SIGNATURE_VERIFICATION = "signature_verification"; + + @SerializedName(SERIALIZED_NAME_SIGNATURE_VERIFICATION) + @javax.annotation.Nullable + private WebhookSignatureVerification signatureVerification; + + public static final String SERIALIZED_NAME_ADDITIONAL_HEADERS = "additional_headers"; + + @SerializedName(SERIALIZED_NAME_ADDITIONAL_HEADERS) + @javax.annotation.Nullable + private List additionalHeaders; + + public static final String SERIALIZED_NAME_CREATION_TIME_IN_MILLIS = "creation_time_in_millis"; + + @SerializedName(SERIALIZED_NAME_CREATION_TIME_IN_MILLIS) + @javax.annotation.Nonnull + private Float creationTimeInMillis; + + public static final String SERIALIZED_NAME_MODIFICATION_TIME_IN_MILLIS = + "modification_time_in_millis"; + + @SerializedName(SERIALIZED_NAME_MODIFICATION_TIME_IN_MILLIS) + @javax.annotation.Nonnull + private Float modificationTimeInMillis; + + public static final String SERIALIZED_NAME_CREATED_BY = "created_by"; + + @SerializedName(SERIALIZED_NAME_CREATED_BY) + @javax.annotation.Nullable + private WebhookUser createdBy; + + public static final String SERIALIZED_NAME_LAST_MODIFIED_BY = "last_modified_by"; + + @SerializedName(SERIALIZED_NAME_LAST_MODIFIED_BY) + @javax.annotation.Nullable + private WebhookUser lastModifiedBy; + + public static final String SERIALIZED_NAME_STORAGE_DESTINATION = "storage_destination"; + + @SerializedName(SERIALIZED_NAME_STORAGE_DESTINATION) + @javax.annotation.Nullable + private StorageDestination storageDestination; + + public WebhookResponse() {} + + public WebhookResponse id(@javax.annotation.Nonnull String id) { + this.id = id; + return this; + } + + /** + * Unique identifier of the webhook configuration. + * + * @return id + */ + @javax.annotation.Nonnull + public String getId() { + return id; + } + + public void setId(@javax.annotation.Nonnull String id) { + this.id = id; + } + + public WebhookResponse name(@javax.annotation.Nonnull String name) { + this.name = name; + return this; + } + + /** + * Name of the webhook configuration. + * + * @return name + */ + @javax.annotation.Nonnull + public String getName() { + return name; + } + + public void setName(@javax.annotation.Nonnull String name) { + this.name = name; + } + + public WebhookResponse description(@javax.annotation.Nullable String description) { + this.description = description; + return this; + } + + /** + * Description of the webhook configuration. + * + * @return description + */ + @javax.annotation.Nullable + public String getDescription() { + return description; + } + + public void setDescription(@javax.annotation.Nullable String description) { + this.description = description; + } + + public WebhookResponse org(@javax.annotation.Nullable WebhookOrg org) { + this.org = org; + return this; + } + + /** + * Get org + * + * @return org + */ + @javax.annotation.Nullable + public WebhookOrg getOrg() { + return org; + } + + public void setOrg(@javax.annotation.Nullable WebhookOrg org) { + this.org = org; + } + + public WebhookResponse url(@javax.annotation.Nonnull String url) { + this.url = url; + return this; + } + + /** + * The webhook endpoint URL. + * + * @return url + */ + @javax.annotation.Nonnull + public String getUrl() { + return url; + } + + public void setUrl(@javax.annotation.Nonnull String url) { + this.url = url; + } + + public WebhookResponse urlParams(@javax.annotation.Nullable Object urlParams) { + this.urlParams = urlParams; + return this; + } + + /** + * Additional URL parameters as key-value pairs. + * + * @return urlParams + */ + @javax.annotation.Nullable + public Object getUrlParams() { + return urlParams; + } + + public void setUrlParams(@javax.annotation.Nullable Object urlParams) { + this.urlParams = urlParams; + } + + public WebhookResponse events(@javax.annotation.Nonnull List events) { + this.events = events; + return this; + } + + public WebhookResponse addEventsItem(EventsEnum eventsItem) { + if (this.events == null) { + this.events = new ArrayList<>(); + } + this.events.add(eventsItem); + return this; + } + + /** + * List of events this webhook subscribes to. + * + * @return events + */ + @javax.annotation.Nonnull + public List getEvents() { + return events; + } + + public void setEvents(@javax.annotation.Nonnull List events) { + this.events = events; + } + + public WebhookResponse authentication( + @javax.annotation.Nullable WebhookAuthentication authentication) { + this.authentication = authentication; + return this; + } + + /** + * Get authentication + * + * @return authentication + */ + @javax.annotation.Nullable + public WebhookAuthentication getAuthentication() { + return authentication; + } + + public void setAuthentication(@javax.annotation.Nullable WebhookAuthentication authentication) { + this.authentication = authentication; + } + + public WebhookResponse signatureVerification( + @javax.annotation.Nullable WebhookSignatureVerification signatureVerification) { + this.signatureVerification = signatureVerification; + return this; + } + + /** + * Get signatureVerification + * + * @return signatureVerification + */ + @javax.annotation.Nullable + public WebhookSignatureVerification getSignatureVerification() { + return signatureVerification; + } + + public void setSignatureVerification( + @javax.annotation.Nullable WebhookSignatureVerification signatureVerification) { + this.signatureVerification = signatureVerification; + } + + public WebhookResponse additionalHeaders( + @javax.annotation.Nullable List additionalHeaders) { + this.additionalHeaders = additionalHeaders; + return this; + } + + public WebhookResponse addAdditionalHeadersItem(WebhookKeyValuePair additionalHeadersItem) { + if (this.additionalHeaders == null) { + this.additionalHeaders = new ArrayList<>(); + } + this.additionalHeaders.add(additionalHeadersItem); + return this; + } + + /** + * Additional headers as an array of key-value pairs. Version: 26.4.0.cl or later + * + * @return additionalHeaders + */ + @javax.annotation.Nullable + public List getAdditionalHeaders() { + return additionalHeaders; + } + + public void setAdditionalHeaders( + @javax.annotation.Nullable List additionalHeaders) { + this.additionalHeaders = additionalHeaders; + } + + public WebhookResponse creationTimeInMillis( + @javax.annotation.Nonnull Float creationTimeInMillis) { + this.creationTimeInMillis = creationTimeInMillis; + return this; + } + + /** + * Creation time of the webhook configuration in milliseconds. + * + * @return creationTimeInMillis + */ + @javax.annotation.Nonnull + public Float getCreationTimeInMillis() { + return creationTimeInMillis; + } + + public void setCreationTimeInMillis(@javax.annotation.Nonnull Float creationTimeInMillis) { + this.creationTimeInMillis = creationTimeInMillis; + } + + public WebhookResponse modificationTimeInMillis( + @javax.annotation.Nonnull Float modificationTimeInMillis) { + this.modificationTimeInMillis = modificationTimeInMillis; + return this; + } + + /** + * Last modified time of the webhook configuration in milliseconds. + * + * @return modificationTimeInMillis + */ + @javax.annotation.Nonnull + public Float getModificationTimeInMillis() { + return modificationTimeInMillis; + } + + public void setModificationTimeInMillis( + @javax.annotation.Nonnull Float modificationTimeInMillis) { + this.modificationTimeInMillis = modificationTimeInMillis; + } + + public WebhookResponse createdBy(@javax.annotation.Nullable WebhookUser createdBy) { + this.createdBy = createdBy; + return this; + } + + /** + * Get createdBy + * + * @return createdBy + */ + @javax.annotation.Nullable + public WebhookUser getCreatedBy() { + return createdBy; + } + + public void setCreatedBy(@javax.annotation.Nullable WebhookUser createdBy) { + this.createdBy = createdBy; + } + + public WebhookResponse lastModifiedBy(@javax.annotation.Nullable WebhookUser lastModifiedBy) { + this.lastModifiedBy = lastModifiedBy; + return this; + } + + /** + * Get lastModifiedBy + * + * @return lastModifiedBy + */ + @javax.annotation.Nullable + public WebhookUser getLastModifiedBy() { + return lastModifiedBy; + } + + public void setLastModifiedBy(@javax.annotation.Nullable WebhookUser lastModifiedBy) { + this.lastModifiedBy = lastModifiedBy; + } + + public WebhookResponse storageDestination( + @javax.annotation.Nullable StorageDestination storageDestination) { + this.storageDestination = storageDestination; + return this; + } + + /** + * Get storageDestination + * + * @return storageDestination + */ + @javax.annotation.Nullable + public StorageDestination getStorageDestination() { + return storageDestination; + } + + public void setStorageDestination( + @javax.annotation.Nullable StorageDestination storageDestination) { + this.storageDestination = storageDestination; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key name of the property + * @param value value of the property + * @return the WebhookResponse instance itself + */ + public WebhookResponse putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return a map of objects + */ + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key name of the property + * @return an object + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + WebhookResponse webhookResponse = (WebhookResponse) o; + return Objects.equals(this.id, webhookResponse.id) + && Objects.equals(this.name, webhookResponse.name) + && Objects.equals(this.description, webhookResponse.description) + && Objects.equals(this.org, webhookResponse.org) + && Objects.equals(this.url, webhookResponse.url) + && Objects.equals(this.urlParams, webhookResponse.urlParams) + && Objects.equals(this.events, webhookResponse.events) + && Objects.equals(this.authentication, webhookResponse.authentication) + && Objects.equals(this.signatureVerification, webhookResponse.signatureVerification) + && Objects.equals(this.additionalHeaders, webhookResponse.additionalHeaders) + && Objects.equals(this.creationTimeInMillis, webhookResponse.creationTimeInMillis) + && Objects.equals( + this.modificationTimeInMillis, webhookResponse.modificationTimeInMillis) + && Objects.equals(this.createdBy, webhookResponse.createdBy) + && Objects.equals(this.lastModifiedBy, webhookResponse.lastModifiedBy) + && Objects.equals(this.storageDestination, webhookResponse.storageDestination) + && Objects.equals(this.additionalProperties, webhookResponse.additionalProperties); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b + || (a != null + && b != null + && a.isPresent() + && b.isPresent() + && Objects.deepEquals(a.get(), b.get())); + } + + @Override + public int hashCode() { + return Objects.hash( + id, + name, + description, + org, + url, + urlParams, + events, + authentication, + signatureVerification, + additionalHeaders, + creationTimeInMillis, + modificationTimeInMillis, + createdBy, + lastModifiedBy, + storageDestination, + additionalProperties); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; + } + return a.isPresent() ? Arrays.deepHashCode(new Object[] {a.get()}) : 31; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class WebhookResponse {\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append(" description: ").append(toIndentedString(description)).append("\n"); + sb.append(" org: ").append(toIndentedString(org)).append("\n"); + sb.append(" url: ").append(toIndentedString(url)).append("\n"); + sb.append(" urlParams: ").append(toIndentedString(urlParams)).append("\n"); + sb.append(" events: ").append(toIndentedString(events)).append("\n"); + sb.append(" authentication: ").append(toIndentedString(authentication)).append("\n"); + sb.append(" signatureVerification: ") + .append(toIndentedString(signatureVerification)) + .append("\n"); + sb.append(" additionalHeaders: ") + .append(toIndentedString(additionalHeaders)) + .append("\n"); + sb.append(" creationTimeInMillis: ") + .append(toIndentedString(creationTimeInMillis)) + .append("\n"); + sb.append(" modificationTimeInMillis: ") + .append(toIndentedString(modificationTimeInMillis)) + .append("\n"); + sb.append(" createdBy: ").append(toIndentedString(createdBy)).append("\n"); + sb.append(" lastModifiedBy: ").append(toIndentedString(lastModifiedBy)).append("\n"); + sb.append(" storageDestination: ") + .append(toIndentedString(storageDestination)) + .append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first + * line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("id"); + openapiFields.add("name"); + openapiFields.add("description"); + openapiFields.add("org"); + openapiFields.add("url"); + openapiFields.add("url_params"); + openapiFields.add("events"); + openapiFields.add("authentication"); + openapiFields.add("signature_verification"); + openapiFields.add("additional_headers"); + openapiFields.add("creation_time_in_millis"); + openapiFields.add("modification_time_in_millis"); + openapiFields.add("created_by"); + openapiFields.add("last_modified_by"); + openapiFields.add("storage_destination"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + openapiRequiredFields.add("id"); + openapiRequiredFields.add("name"); + openapiRequiredFields.add("url"); + openapiRequiredFields.add("events"); + openapiRequiredFields.add("creation_time_in_millis"); + openapiRequiredFields.add("modification_time_in_millis"); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to WebhookResponse + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!WebhookResponse.openapiRequiredFields + .isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException( + String.format( + "The required field(s) %s in WebhookResponse is not found in the" + + " empty JSON string", + WebhookResponse.openapiRequiredFields.toString())); + } + } + + // check to make sure all required properties/fields are present in the JSON string + for (String requiredField : WebhookResponse.openapiRequiredFields) { + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException( + String.format( + "The required field `%s` is not found in the JSON string: %s", + requiredField, jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if (!jsonObj.get("id").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `id` to be a primitive type in the JSON string but" + + " got `%s`", + jsonObj.get("id").toString())); + } + if (!jsonObj.get("name").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `name` to be a primitive type in the JSON string" + + " but got `%s`", + jsonObj.get("name").toString())); + } + if ((jsonObj.get("description") != null && !jsonObj.get("description").isJsonNull()) + && !jsonObj.get("description").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `description` to be a primitive type in the JSON" + + " string but got `%s`", + jsonObj.get("description").toString())); + } + // validate the optional field `org` + if (jsonObj.get("org") != null && !jsonObj.get("org").isJsonNull()) { + WebhookOrg.validateJsonElement(jsonObj.get("org")); + } + if (!jsonObj.get("url").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `url` to be a primitive type in the JSON string" + + " but got `%s`", + jsonObj.get("url").toString())); + } + // ensure the required json array is present + if (jsonObj.get("events") == null) { + throw new IllegalArgumentException( + "Expected the field `linkedContent` to be an array in the JSON string but got" + + " `null`"); + } else if (!jsonObj.get("events").isJsonArray()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `events` to be an array in the JSON string but got" + + " `%s`", + jsonObj.get("events").toString())); + } + // validate the optional field `authentication` + if (jsonObj.get("authentication") != null && !jsonObj.get("authentication").isJsonNull()) { + WebhookAuthentication.validateJsonElement(jsonObj.get("authentication")); + } + // validate the optional field `signature_verification` + if (jsonObj.get("signature_verification") != null + && !jsonObj.get("signature_verification").isJsonNull()) { + WebhookSignatureVerification.validateJsonElement(jsonObj.get("signature_verification")); + } + if (jsonObj.get("additional_headers") != null + && !jsonObj.get("additional_headers").isJsonNull()) { + JsonArray jsonArrayadditionalHeaders = jsonObj.getAsJsonArray("additional_headers"); + if (jsonArrayadditionalHeaders != null) { + // ensure the json data is an array + if (!jsonObj.get("additional_headers").isJsonArray()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `additional_headers` to be an array in the" + + " JSON string but got `%s`", + jsonObj.get("additional_headers").toString())); + } + + // validate the optional field `additional_headers` (array) + for (int i = 0; i < jsonArrayadditionalHeaders.size(); i++) { + WebhookKeyValuePair.validateJsonElement(jsonArrayadditionalHeaders.get(i)); + } + ; + } + } + // validate the optional field `created_by` + if (jsonObj.get("created_by") != null && !jsonObj.get("created_by").isJsonNull()) { + WebhookUser.validateJsonElement(jsonObj.get("created_by")); + } + // validate the optional field `last_modified_by` + if (jsonObj.get("last_modified_by") != null + && !jsonObj.get("last_modified_by").isJsonNull()) { + WebhookUser.validateJsonElement(jsonObj.get("last_modified_by")); + } + // validate the optional field `storage_destination` + if (jsonObj.get("storage_destination") != null + && !jsonObj.get("storage_destination").isJsonNull()) { + StorageDestination.validateJsonElement(jsonObj.get("storage_destination")); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!WebhookResponse.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'WebhookResponse' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter = + gson.getDelegateAdapter(this, TypeToken.get(WebhookResponse.class)); + + return (TypeAdapter) + new TypeAdapter() { + @Override + public void write(JsonWriter out, WebhookResponse value) + throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + obj.remove("additionalProperties"); + // serialize additional properties + if (value.getAdditionalProperties() != null) { + for (Map.Entry entry : + value.getAdditionalProperties().entrySet()) { + if (entry.getValue() instanceof String) + obj.addProperty(entry.getKey(), (String) entry.getValue()); + else if (entry.getValue() instanceof Number) + obj.addProperty(entry.getKey(), (Number) entry.getValue()); + else if (entry.getValue() instanceof Boolean) + obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); + else if (entry.getValue() instanceof Character) + obj.addProperty( + entry.getKey(), (Character) entry.getValue()); + else { + JsonElement jsonElement = gson.toJsonTree(entry.getValue()); + if (jsonElement.isJsonArray()) { + obj.add(entry.getKey(), jsonElement.getAsJsonArray()); + } else { + obj.add(entry.getKey(), jsonElement.getAsJsonObject()); + } + } + } + } + elementAdapter.write(out, obj); + } + + @Override + public WebhookResponse read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // store additional fields in the deserialized instance + WebhookResponse instance = thisAdapter.fromJsonTree(jsonObj); + for (Map.Entry entry : jsonObj.entrySet()) { + if (!openapiFields.contains(entry.getKey())) { + if (entry.getValue().isJsonPrimitive()) { // primitive type + if (entry.getValue().getAsJsonPrimitive().isString()) + instance.putAdditionalProperty( + entry.getKey(), entry.getValue().getAsString()); + else if (entry.getValue().getAsJsonPrimitive().isNumber()) + instance.putAdditionalProperty( + entry.getKey(), entry.getValue().getAsNumber()); + else if (entry.getValue().getAsJsonPrimitive().isBoolean()) + instance.putAdditionalProperty( + entry.getKey(), + entry.getValue().getAsBoolean()); + else + throw new IllegalArgumentException( + String.format( + "The field `%s` has unknown primitive" + + " type. Value: %s", + entry.getKey(), + entry.getValue().toString())); + } else if (entry.getValue().isJsonArray()) { + instance.putAdditionalProperty( + entry.getKey(), + gson.fromJson(entry.getValue(), List.class)); + } else { // JSON object + instance.putAdditionalProperty( + entry.getKey(), + gson.fromJson(entry.getValue(), HashMap.class)); + } + } + } + return instance; + } + }.nullSafe(); + } + } + + /** + * Create an instance of WebhookResponse given an JSON string + * + * @param jsonString JSON string + * @return An instance of WebhookResponse + * @throws IOException if the JSON string is invalid with respect to WebhookResponse + */ + public static WebhookResponse fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, WebhookResponse.class); + } + + /** + * Convert an instance of WebhookResponse to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} diff --git a/sdks/java/src/main/java/com/thoughtspot/client/model/WebhookSearchResponse.java b/sdks/java/src/main/java/com/thoughtspot/client/model/WebhookSearchResponse.java new file mode 100644 index 000000000..1806bf4ff --- /dev/null +++ b/sdks/java/src/main/java/com/thoughtspot/client/model/WebhookSearchResponse.java @@ -0,0 +1,353 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client.model; + +import com.google.gson.Gson; +import com.google.gson.JsonArray; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.TypeAdapter; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.annotations.SerializedName; +import com.google.gson.reflect.TypeToken; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import com.thoughtspot.client.JSON; +import java.io.IOException; +import java.io.Serializable; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Objects; + +/** WebhookSearchResponse */ +@javax.annotation.Generated( + value = "org.openapitools.codegen.languages.JavaClientCodegen", + comments = "Generator version: 7.12.0") +public class WebhookSearchResponse implements Serializable { + private static final long serialVersionUID = 1L; + + public static final String SERIALIZED_NAME_WEBHOOKS = "webhooks"; + + @SerializedName(SERIALIZED_NAME_WEBHOOKS) + @javax.annotation.Nonnull + private List webhooks; + + public static final String SERIALIZED_NAME_PAGINATION = "pagination"; + + @SerializedName(SERIALIZED_NAME_PAGINATION) + @javax.annotation.Nonnull + private WebhookPagination pagination; + + public WebhookSearchResponse() {} + + public WebhookSearchResponse webhooks( + @javax.annotation.Nonnull List webhooks) { + this.webhooks = webhooks; + return this; + } + + public WebhookSearchResponse addWebhooksItem(WebhookResponse webhooksItem) { + if (this.webhooks == null) { + this.webhooks = new ArrayList<>(); + } + this.webhooks.add(webhooksItem); + return this; + } + + /** + * List of webhook configurations matching the search criteria. + * + * @return webhooks + */ + @javax.annotation.Nonnull + public List getWebhooks() { + return webhooks; + } + + public void setWebhooks(@javax.annotation.Nonnull List webhooks) { + this.webhooks = webhooks; + } + + public WebhookSearchResponse pagination( + @javax.annotation.Nonnull WebhookPagination pagination) { + this.pagination = pagination; + return this; + } + + /** + * Get pagination + * + * @return pagination + */ + @javax.annotation.Nonnull + public WebhookPagination getPagination() { + return pagination; + } + + public void setPagination(@javax.annotation.Nonnull WebhookPagination pagination) { + this.pagination = pagination; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key name of the property + * @param value value of the property + * @return the WebhookSearchResponse instance itself + */ + public WebhookSearchResponse putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return a map of objects + */ + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key name of the property + * @return an object + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + WebhookSearchResponse webhookSearchResponse = (WebhookSearchResponse) o; + return Objects.equals(this.webhooks, webhookSearchResponse.webhooks) + && Objects.equals(this.pagination, webhookSearchResponse.pagination) + && Objects.equals( + this.additionalProperties, webhookSearchResponse.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(webhooks, pagination, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class WebhookSearchResponse {\n"); + sb.append(" webhooks: ").append(toIndentedString(webhooks)).append("\n"); + sb.append(" pagination: ").append(toIndentedString(pagination)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first + * line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("webhooks"); + openapiFields.add("pagination"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + openapiRequiredFields.add("webhooks"); + openapiRequiredFields.add("pagination"); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to WebhookSearchResponse + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!WebhookSearchResponse.openapiRequiredFields + .isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException( + String.format( + "The required field(s) %s in WebhookSearchResponse is not found in" + + " the empty JSON string", + WebhookSearchResponse.openapiRequiredFields.toString())); + } + } + + // check to make sure all required properties/fields are present in the JSON string + for (String requiredField : WebhookSearchResponse.openapiRequiredFields) { + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException( + String.format( + "The required field `%s` is not found in the JSON string: %s", + requiredField, jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // ensure the json data is an array + if (!jsonObj.get("webhooks").isJsonArray()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `webhooks` to be an array in the JSON string but" + + " got `%s`", + jsonObj.get("webhooks").toString())); + } + + JsonArray jsonArraywebhooks = jsonObj.getAsJsonArray("webhooks"); + // validate the required field `webhooks` (array) + for (int i = 0; i < jsonArraywebhooks.size(); i++) { + WebhookResponse.validateJsonElement(jsonArraywebhooks.get(i)); + } + ; + // validate the required field `pagination` + WebhookPagination.validateJsonElement(jsonObj.get("pagination")); + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!WebhookSearchResponse.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'WebhookSearchResponse' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter = + gson.getDelegateAdapter(this, TypeToken.get(WebhookSearchResponse.class)); + + return (TypeAdapter) + new TypeAdapter() { + @Override + public void write(JsonWriter out, WebhookSearchResponse value) + throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + obj.remove("additionalProperties"); + // serialize additional properties + if (value.getAdditionalProperties() != null) { + for (Map.Entry entry : + value.getAdditionalProperties().entrySet()) { + if (entry.getValue() instanceof String) + obj.addProperty(entry.getKey(), (String) entry.getValue()); + else if (entry.getValue() instanceof Number) + obj.addProperty(entry.getKey(), (Number) entry.getValue()); + else if (entry.getValue() instanceof Boolean) + obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); + else if (entry.getValue() instanceof Character) + obj.addProperty( + entry.getKey(), (Character) entry.getValue()); + else { + JsonElement jsonElement = gson.toJsonTree(entry.getValue()); + if (jsonElement.isJsonArray()) { + obj.add(entry.getKey(), jsonElement.getAsJsonArray()); + } else { + obj.add(entry.getKey(), jsonElement.getAsJsonObject()); + } + } + } + } + elementAdapter.write(out, obj); + } + + @Override + public WebhookSearchResponse read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // store additional fields in the deserialized instance + WebhookSearchResponse instance = thisAdapter.fromJsonTree(jsonObj); + for (Map.Entry entry : jsonObj.entrySet()) { + if (!openapiFields.contains(entry.getKey())) { + if (entry.getValue().isJsonPrimitive()) { // primitive type + if (entry.getValue().getAsJsonPrimitive().isString()) + instance.putAdditionalProperty( + entry.getKey(), entry.getValue().getAsString()); + else if (entry.getValue().getAsJsonPrimitive().isNumber()) + instance.putAdditionalProperty( + entry.getKey(), entry.getValue().getAsNumber()); + else if (entry.getValue().getAsJsonPrimitive().isBoolean()) + instance.putAdditionalProperty( + entry.getKey(), + entry.getValue().getAsBoolean()); + else + throw new IllegalArgumentException( + String.format( + "The field `%s` has unknown primitive" + + " type. Value: %s", + entry.getKey(), + entry.getValue().toString())); + } else if (entry.getValue().isJsonArray()) { + instance.putAdditionalProperty( + entry.getKey(), + gson.fromJson(entry.getValue(), List.class)); + } else { // JSON object + instance.putAdditionalProperty( + entry.getKey(), + gson.fromJson(entry.getValue(), HashMap.class)); + } + } + } + return instance; + } + }.nullSafe(); + } + } + + /** + * Create an instance of WebhookSearchResponse given an JSON string + * + * @param jsonString JSON string + * @return An instance of WebhookSearchResponse + * @throws IOException if the JSON string is invalid with respect to WebhookSearchResponse + */ + public static WebhookSearchResponse fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, WebhookSearchResponse.class); + } + + /** + * Convert an instance of WebhookSearchResponse to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} diff --git a/sdks/java/src/main/java/com/thoughtspot/client/model/WebhookSignatureVerification.java b/sdks/java/src/main/java/com/thoughtspot/client/model/WebhookSignatureVerification.java new file mode 100644 index 000000000..3f8813eea --- /dev/null +++ b/sdks/java/src/main/java/com/thoughtspot/client/model/WebhookSignatureVerification.java @@ -0,0 +1,521 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client.model; + +import com.google.gson.Gson; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.TypeAdapter; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.reflect.TypeToken; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import com.thoughtspot.client.JSON; +import java.io.IOException; +import java.io.Serializable; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Objects; + +/** WebhookSignatureVerification */ +@javax.annotation.Generated( + value = "org.openapitools.codegen.languages.JavaClientCodegen", + comments = "Generator version: 7.12.0") +public class WebhookSignatureVerification implements Serializable { + private static final long serialVersionUID = 1L; + + /** Signature verification method type. */ + @JsonAdapter(TypeEnum.Adapter.class) + public enum TypeEnum { + HMAC_SHA256("HMAC_SHA256"); + + private String value; + + TypeEnum(String value) { + this.value = value; + } + + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + public static TypeEnum fromValue(String value) { + for (TypeEnum b : TypeEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + + public static class Adapter extends TypeAdapter { + @Override + public void write(final JsonWriter jsonWriter, final TypeEnum enumeration) + throws IOException { + jsonWriter.value(enumeration.getValue()); + } + + @Override + public TypeEnum read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + return TypeEnum.fromValue(value); + } + } + + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + String value = jsonElement.getAsString(); + TypeEnum.fromValue(value); + } + } + + public static final String SERIALIZED_NAME_TYPE = "type"; + + @SerializedName(SERIALIZED_NAME_TYPE) + @javax.annotation.Nonnull + private TypeEnum type; + + public static final String SERIALIZED_NAME_HEADER = "header"; + + @SerializedName(SERIALIZED_NAME_HEADER) + @javax.annotation.Nonnull + private String header; + + /** Hash algorithm used for signature verification. */ + @JsonAdapter(AlgorithmEnum.Adapter.class) + public enum AlgorithmEnum { + SHA256("SHA256"); + + private String value; + + AlgorithmEnum(String value) { + this.value = value; + } + + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + public static AlgorithmEnum fromValue(String value) { + for (AlgorithmEnum b : AlgorithmEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + + public static class Adapter extends TypeAdapter { + @Override + public void write(final JsonWriter jsonWriter, final AlgorithmEnum enumeration) + throws IOException { + jsonWriter.value(enumeration.getValue()); + } + + @Override + public AlgorithmEnum read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + return AlgorithmEnum.fromValue(value); + } + } + + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + String value = jsonElement.getAsString(); + AlgorithmEnum.fromValue(value); + } + } + + public static final String SERIALIZED_NAME_ALGORITHM = "algorithm"; + + @SerializedName(SERIALIZED_NAME_ALGORITHM) + @javax.annotation.Nonnull + private AlgorithmEnum algorithm; + + public static final String SERIALIZED_NAME_SECRET = "secret"; + + @SerializedName(SERIALIZED_NAME_SECRET) + @javax.annotation.Nonnull + private String secret; + + public WebhookSignatureVerification() {} + + public WebhookSignatureVerification type(@javax.annotation.Nonnull TypeEnum type) { + this.type = type; + return this; + } + + /** + * Signature verification method type. + * + * @return type + */ + @javax.annotation.Nonnull + public TypeEnum getType() { + return type; + } + + public void setType(@javax.annotation.Nonnull TypeEnum type) { + this.type = type; + } + + public WebhookSignatureVerification header(@javax.annotation.Nonnull String header) { + this.header = header; + return this; + } + + /** + * HTTP header where the signature is sent. + * + * @return header + */ + @javax.annotation.Nonnull + public String getHeader() { + return header; + } + + public void setHeader(@javax.annotation.Nonnull String header) { + this.header = header; + } + + public WebhookSignatureVerification algorithm( + @javax.annotation.Nonnull AlgorithmEnum algorithm) { + this.algorithm = algorithm; + return this; + } + + /** + * Hash algorithm used for signature verification. + * + * @return algorithm + */ + @javax.annotation.Nonnull + public AlgorithmEnum getAlgorithm() { + return algorithm; + } + + public void setAlgorithm(@javax.annotation.Nonnull AlgorithmEnum algorithm) { + this.algorithm = algorithm; + } + + public WebhookSignatureVerification secret(@javax.annotation.Nonnull String secret) { + this.secret = secret; + return this; + } + + /** + * Shared secret used for HMAC signature generation. + * + * @return secret + */ + @javax.annotation.Nonnull + public String getSecret() { + return secret; + } + + public void setSecret(@javax.annotation.Nonnull String secret) { + this.secret = secret; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key name of the property + * @param value value of the property + * @return the WebhookSignatureVerification instance itself + */ + public WebhookSignatureVerification putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return a map of objects + */ + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key name of the property + * @return an object + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + WebhookSignatureVerification webhookSignatureVerification = + (WebhookSignatureVerification) o; + return Objects.equals(this.type, webhookSignatureVerification.type) + && Objects.equals(this.header, webhookSignatureVerification.header) + && Objects.equals(this.algorithm, webhookSignatureVerification.algorithm) + && Objects.equals(this.secret, webhookSignatureVerification.secret) + && Objects.equals( + this.additionalProperties, + webhookSignatureVerification.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(type, header, algorithm, secret, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class WebhookSignatureVerification {\n"); + sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append(" header: ").append(toIndentedString(header)).append("\n"); + sb.append(" algorithm: ").append(toIndentedString(algorithm)).append("\n"); + sb.append(" secret: ").append(toIndentedString(secret)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first + * line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("type"); + openapiFields.add("header"); + openapiFields.add("algorithm"); + openapiFields.add("secret"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + openapiRequiredFields.add("type"); + openapiRequiredFields.add("header"); + openapiRequiredFields.add("algorithm"); + openapiRequiredFields.add("secret"); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to + * WebhookSignatureVerification + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!WebhookSignatureVerification.openapiRequiredFields + .isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException( + String.format( + "The required field(s) %s in WebhookSignatureVerification is not" + + " found in the empty JSON string", + WebhookSignatureVerification.openapiRequiredFields.toString())); + } + } + + // check to make sure all required properties/fields are present in the JSON string + for (String requiredField : WebhookSignatureVerification.openapiRequiredFields) { + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException( + String.format( + "The required field `%s` is not found in the JSON string: %s", + requiredField, jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if (!jsonObj.get("type").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `type` to be a primitive type in the JSON string" + + " but got `%s`", + jsonObj.get("type").toString())); + } + // validate the required field `type` + TypeEnum.validateJsonElement(jsonObj.get("type")); + if (!jsonObj.get("header").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `header` to be a primitive type in the JSON string" + + " but got `%s`", + jsonObj.get("header").toString())); + } + if (!jsonObj.get("algorithm").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `algorithm` to be a primitive type in the JSON" + + " string but got `%s`", + jsonObj.get("algorithm").toString())); + } + // validate the required field `algorithm` + AlgorithmEnum.validateJsonElement(jsonObj.get("algorithm")); + if (!jsonObj.get("secret").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `secret` to be a primitive type in the JSON string" + + " but got `%s`", + jsonObj.get("secret").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!WebhookSignatureVerification.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'WebhookSignatureVerification' and its + // subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter = + gson.getDelegateAdapter( + this, TypeToken.get(WebhookSignatureVerification.class)); + + return (TypeAdapter) + new TypeAdapter() { + @Override + public void write(JsonWriter out, WebhookSignatureVerification value) + throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + obj.remove("additionalProperties"); + // serialize additional properties + if (value.getAdditionalProperties() != null) { + for (Map.Entry entry : + value.getAdditionalProperties().entrySet()) { + if (entry.getValue() instanceof String) + obj.addProperty(entry.getKey(), (String) entry.getValue()); + else if (entry.getValue() instanceof Number) + obj.addProperty(entry.getKey(), (Number) entry.getValue()); + else if (entry.getValue() instanceof Boolean) + obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); + else if (entry.getValue() instanceof Character) + obj.addProperty( + entry.getKey(), (Character) entry.getValue()); + else { + JsonElement jsonElement = gson.toJsonTree(entry.getValue()); + if (jsonElement.isJsonArray()) { + obj.add(entry.getKey(), jsonElement.getAsJsonArray()); + } else { + obj.add(entry.getKey(), jsonElement.getAsJsonObject()); + } + } + } + } + elementAdapter.write(out, obj); + } + + @Override + public WebhookSignatureVerification read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // store additional fields in the deserialized instance + WebhookSignatureVerification instance = + thisAdapter.fromJsonTree(jsonObj); + for (Map.Entry entry : jsonObj.entrySet()) { + if (!openapiFields.contains(entry.getKey())) { + if (entry.getValue().isJsonPrimitive()) { // primitive type + if (entry.getValue().getAsJsonPrimitive().isString()) + instance.putAdditionalProperty( + entry.getKey(), entry.getValue().getAsString()); + else if (entry.getValue().getAsJsonPrimitive().isNumber()) + instance.putAdditionalProperty( + entry.getKey(), entry.getValue().getAsNumber()); + else if (entry.getValue().getAsJsonPrimitive().isBoolean()) + instance.putAdditionalProperty( + entry.getKey(), + entry.getValue().getAsBoolean()); + else + throw new IllegalArgumentException( + String.format( + "The field `%s` has unknown primitive" + + " type. Value: %s", + entry.getKey(), + entry.getValue().toString())); + } else if (entry.getValue().isJsonArray()) { + instance.putAdditionalProperty( + entry.getKey(), + gson.fromJson(entry.getValue(), List.class)); + } else { // JSON object + instance.putAdditionalProperty( + entry.getKey(), + gson.fromJson(entry.getValue(), HashMap.class)); + } + } + } + return instance; + } + }.nullSafe(); + } + } + + /** + * Create an instance of WebhookSignatureVerification given an JSON string + * + * @param jsonString JSON string + * @return An instance of WebhookSignatureVerification + * @throws IOException if the JSON string is invalid with respect to + * WebhookSignatureVerification + */ + public static WebhookSignatureVerification fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, WebhookSignatureVerification.class); + } + + /** + * Convert an instance of WebhookSignatureVerification to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} diff --git a/sdks/java/src/main/java/com/thoughtspot/client/model/WebhookSignatureVerificationInput.java b/sdks/java/src/main/java/com/thoughtspot/client/model/WebhookSignatureVerificationInput.java new file mode 100644 index 000000000..8aac6fb2d --- /dev/null +++ b/sdks/java/src/main/java/com/thoughtspot/client/model/WebhookSignatureVerificationInput.java @@ -0,0 +1,523 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client.model; + +import com.google.gson.Gson; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.TypeAdapter; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.reflect.TypeToken; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import com.thoughtspot.client.JSON; +import java.io.IOException; +import java.io.Serializable; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Objects; + +/** WebhookSignatureVerificationInput */ +@javax.annotation.Generated( + value = "org.openapitools.codegen.languages.JavaClientCodegen", + comments = "Generator version: 7.12.0") +public class WebhookSignatureVerificationInput implements Serializable { + private static final long serialVersionUID = 1L; + + /** Signature verification method type. */ + @JsonAdapter(TypeEnum.Adapter.class) + public enum TypeEnum { + HMAC_SHA256("HMAC_SHA256"); + + private String value; + + TypeEnum(String value) { + this.value = value; + } + + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + public static TypeEnum fromValue(String value) { + for (TypeEnum b : TypeEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + + public static class Adapter extends TypeAdapter { + @Override + public void write(final JsonWriter jsonWriter, final TypeEnum enumeration) + throws IOException { + jsonWriter.value(enumeration.getValue()); + } + + @Override + public TypeEnum read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + return TypeEnum.fromValue(value); + } + } + + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + String value = jsonElement.getAsString(); + TypeEnum.fromValue(value); + } + } + + public static final String SERIALIZED_NAME_TYPE = "type"; + + @SerializedName(SERIALIZED_NAME_TYPE) + @javax.annotation.Nonnull + private TypeEnum type; + + public static final String SERIALIZED_NAME_HEADER = "header"; + + @SerializedName(SERIALIZED_NAME_HEADER) + @javax.annotation.Nonnull + private String header; + + /** Hash algorithm used for signature verification. */ + @JsonAdapter(AlgorithmEnum.Adapter.class) + public enum AlgorithmEnum { + SHA256("SHA256"); + + private String value; + + AlgorithmEnum(String value) { + this.value = value; + } + + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + public static AlgorithmEnum fromValue(String value) { + for (AlgorithmEnum b : AlgorithmEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + + public static class Adapter extends TypeAdapter { + @Override + public void write(final JsonWriter jsonWriter, final AlgorithmEnum enumeration) + throws IOException { + jsonWriter.value(enumeration.getValue()); + } + + @Override + public AlgorithmEnum read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + return AlgorithmEnum.fromValue(value); + } + } + + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + String value = jsonElement.getAsString(); + AlgorithmEnum.fromValue(value); + } + } + + public static final String SERIALIZED_NAME_ALGORITHM = "algorithm"; + + @SerializedName(SERIALIZED_NAME_ALGORITHM) + @javax.annotation.Nonnull + private AlgorithmEnum algorithm; + + public static final String SERIALIZED_NAME_SECRET = "secret"; + + @SerializedName(SERIALIZED_NAME_SECRET) + @javax.annotation.Nonnull + private String secret; + + public WebhookSignatureVerificationInput() {} + + public WebhookSignatureVerificationInput type(@javax.annotation.Nonnull TypeEnum type) { + this.type = type; + return this; + } + + /** + * Signature verification method type. + * + * @return type + */ + @javax.annotation.Nonnull + public TypeEnum getType() { + return type; + } + + public void setType(@javax.annotation.Nonnull TypeEnum type) { + this.type = type; + } + + public WebhookSignatureVerificationInput header(@javax.annotation.Nonnull String header) { + this.header = header; + return this; + } + + /** + * HTTP header where the signature is sent. + * + * @return header + */ + @javax.annotation.Nonnull + public String getHeader() { + return header; + } + + public void setHeader(@javax.annotation.Nonnull String header) { + this.header = header; + } + + public WebhookSignatureVerificationInput algorithm( + @javax.annotation.Nonnull AlgorithmEnum algorithm) { + this.algorithm = algorithm; + return this; + } + + /** + * Hash algorithm used for signature verification. + * + * @return algorithm + */ + @javax.annotation.Nonnull + public AlgorithmEnum getAlgorithm() { + return algorithm; + } + + public void setAlgorithm(@javax.annotation.Nonnull AlgorithmEnum algorithm) { + this.algorithm = algorithm; + } + + public WebhookSignatureVerificationInput secret(@javax.annotation.Nonnull String secret) { + this.secret = secret; + return this; + } + + /** + * Shared secret used for HMAC signature generation. + * + * @return secret + */ + @javax.annotation.Nonnull + public String getSecret() { + return secret; + } + + public void setSecret(@javax.annotation.Nonnull String secret) { + this.secret = secret; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key name of the property + * @param value value of the property + * @return the WebhookSignatureVerificationInput instance itself + */ + public WebhookSignatureVerificationInput putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return a map of objects + */ + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key name of the property + * @return an object + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + WebhookSignatureVerificationInput webhookSignatureVerificationInput = + (WebhookSignatureVerificationInput) o; + return Objects.equals(this.type, webhookSignatureVerificationInput.type) + && Objects.equals(this.header, webhookSignatureVerificationInput.header) + && Objects.equals(this.algorithm, webhookSignatureVerificationInput.algorithm) + && Objects.equals(this.secret, webhookSignatureVerificationInput.secret) + && Objects.equals( + this.additionalProperties, + webhookSignatureVerificationInput.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(type, header, algorithm, secret, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class WebhookSignatureVerificationInput {\n"); + sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append(" header: ").append(toIndentedString(header)).append("\n"); + sb.append(" algorithm: ").append(toIndentedString(algorithm)).append("\n"); + sb.append(" secret: ").append(toIndentedString(secret)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first + * line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("type"); + openapiFields.add("header"); + openapiFields.add("algorithm"); + openapiFields.add("secret"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + openapiRequiredFields.add("type"); + openapiRequiredFields.add("header"); + openapiRequiredFields.add("algorithm"); + openapiRequiredFields.add("secret"); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to + * WebhookSignatureVerificationInput + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!WebhookSignatureVerificationInput.openapiRequiredFields + .isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException( + String.format( + "The required field(s) %s in WebhookSignatureVerificationInput is" + + " not found in the empty JSON string", + WebhookSignatureVerificationInput.openapiRequiredFields + .toString())); + } + } + + // check to make sure all required properties/fields are present in the JSON string + for (String requiredField : WebhookSignatureVerificationInput.openapiRequiredFields) { + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException( + String.format( + "The required field `%s` is not found in the JSON string: %s", + requiredField, jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if (!jsonObj.get("type").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `type` to be a primitive type in the JSON string" + + " but got `%s`", + jsonObj.get("type").toString())); + } + // validate the required field `type` + TypeEnum.validateJsonElement(jsonObj.get("type")); + if (!jsonObj.get("header").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `header` to be a primitive type in the JSON string" + + " but got `%s`", + jsonObj.get("header").toString())); + } + if (!jsonObj.get("algorithm").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `algorithm` to be a primitive type in the JSON" + + " string but got `%s`", + jsonObj.get("algorithm").toString())); + } + // validate the required field `algorithm` + AlgorithmEnum.validateJsonElement(jsonObj.get("algorithm")); + if (!jsonObj.get("secret").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `secret` to be a primitive type in the JSON string" + + " but got `%s`", + jsonObj.get("secret").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!WebhookSignatureVerificationInput.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'WebhookSignatureVerificationInput' and + // its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter = + gson.getDelegateAdapter( + this, TypeToken.get(WebhookSignatureVerificationInput.class)); + + return (TypeAdapter) + new TypeAdapter() { + @Override + public void write(JsonWriter out, WebhookSignatureVerificationInput value) + throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + obj.remove("additionalProperties"); + // serialize additional properties + if (value.getAdditionalProperties() != null) { + for (Map.Entry entry : + value.getAdditionalProperties().entrySet()) { + if (entry.getValue() instanceof String) + obj.addProperty(entry.getKey(), (String) entry.getValue()); + else if (entry.getValue() instanceof Number) + obj.addProperty(entry.getKey(), (Number) entry.getValue()); + else if (entry.getValue() instanceof Boolean) + obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); + else if (entry.getValue() instanceof Character) + obj.addProperty( + entry.getKey(), (Character) entry.getValue()); + else { + JsonElement jsonElement = gson.toJsonTree(entry.getValue()); + if (jsonElement.isJsonArray()) { + obj.add(entry.getKey(), jsonElement.getAsJsonArray()); + } else { + obj.add(entry.getKey(), jsonElement.getAsJsonObject()); + } + } + } + } + elementAdapter.write(out, obj); + } + + @Override + public WebhookSignatureVerificationInput read(JsonReader in) + throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // store additional fields in the deserialized instance + WebhookSignatureVerificationInput instance = + thisAdapter.fromJsonTree(jsonObj); + for (Map.Entry entry : jsonObj.entrySet()) { + if (!openapiFields.contains(entry.getKey())) { + if (entry.getValue().isJsonPrimitive()) { // primitive type + if (entry.getValue().getAsJsonPrimitive().isString()) + instance.putAdditionalProperty( + entry.getKey(), entry.getValue().getAsString()); + else if (entry.getValue().getAsJsonPrimitive().isNumber()) + instance.putAdditionalProperty( + entry.getKey(), entry.getValue().getAsNumber()); + else if (entry.getValue().getAsJsonPrimitive().isBoolean()) + instance.putAdditionalProperty( + entry.getKey(), + entry.getValue().getAsBoolean()); + else + throw new IllegalArgumentException( + String.format( + "The field `%s` has unknown primitive" + + " type. Value: %s", + entry.getKey(), + entry.getValue().toString())); + } else if (entry.getValue().isJsonArray()) { + instance.putAdditionalProperty( + entry.getKey(), + gson.fromJson(entry.getValue(), List.class)); + } else { // JSON object + instance.putAdditionalProperty( + entry.getKey(), + gson.fromJson(entry.getValue(), HashMap.class)); + } + } + } + return instance; + } + }.nullSafe(); + } + } + + /** + * Create an instance of WebhookSignatureVerificationInput given an JSON string + * + * @param jsonString JSON string + * @return An instance of WebhookSignatureVerificationInput + * @throws IOException if the JSON string is invalid with respect to + * WebhookSignatureVerificationInput + */ + public static WebhookSignatureVerificationInput fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, WebhookSignatureVerificationInput.class); + } + + /** + * Convert an instance of WebhookSignatureVerificationInput to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} diff --git a/sdks/java/src/main/java/com/thoughtspot/client/model/WebhookSortOptionsInput.java b/sdks/java/src/main/java/com/thoughtspot/client/model/WebhookSortOptionsInput.java new file mode 100644 index 000000000..c9ddcf2af --- /dev/null +++ b/sdks/java/src/main/java/com/thoughtspot/client/model/WebhookSortOptionsInput.java @@ -0,0 +1,460 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client.model; + +import com.google.gson.Gson; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.TypeAdapter; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.reflect.TypeToken; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import com.thoughtspot.client.JSON; +import java.io.IOException; +import java.io.Serializable; +import java.util.Arrays; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Objects; +import org.openapitools.jackson.nullable.JsonNullable; + +/** WebhookSortOptionsInput */ +@javax.annotation.Generated( + value = "org.openapitools.codegen.languages.JavaClientCodegen", + comments = "Generator version: 7.12.0") +public class WebhookSortOptionsInput implements Serializable { + private static final long serialVersionUID = 1L; + + /** Name of the field to apply the sort on. */ + @JsonAdapter(FieldNameEnum.Adapter.class) + public enum FieldNameEnum { + CREATED("CREATED"), + + MODIFIED("MODIFIED"), + + NAME("NAME"); + + private String value; + + FieldNameEnum(String value) { + this.value = value; + } + + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + public static FieldNameEnum fromValue(String value) { + for (FieldNameEnum b : FieldNameEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + return null; + } + + public static class Adapter extends TypeAdapter { + @Override + public void write(final JsonWriter jsonWriter, final FieldNameEnum enumeration) + throws IOException { + jsonWriter.value(enumeration.getValue()); + } + + @Override + public FieldNameEnum read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + return FieldNameEnum.fromValue(value); + } + } + + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + String value = jsonElement.getAsString(); + FieldNameEnum.fromValue(value); + } + } + + public static final String SERIALIZED_NAME_FIELD_NAME = "field_name"; + + @SerializedName(SERIALIZED_NAME_FIELD_NAME) + @javax.annotation.Nullable + private FieldNameEnum fieldName = FieldNameEnum.CREATED; + + /** Sort order: ASC (Ascending) or DESC (Descending). */ + @JsonAdapter(OrderEnum.Adapter.class) + public enum OrderEnum { + ASC("ASC"), + + DESC("DESC"); + + private String value; + + OrderEnum(String value) { + this.value = value; + } + + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + public static OrderEnum fromValue(String value) { + for (OrderEnum b : OrderEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + return null; + } + + public static class Adapter extends TypeAdapter { + @Override + public void write(final JsonWriter jsonWriter, final OrderEnum enumeration) + throws IOException { + jsonWriter.value(enumeration.getValue()); + } + + @Override + public OrderEnum read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + return OrderEnum.fromValue(value); + } + } + + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + String value = jsonElement.getAsString(); + OrderEnum.fromValue(value); + } + } + + public static final String SERIALIZED_NAME_ORDER = "order"; + + @SerializedName(SERIALIZED_NAME_ORDER) + @javax.annotation.Nullable + private OrderEnum order = OrderEnum.DESC; + + public WebhookSortOptionsInput() {} + + public WebhookSortOptionsInput fieldName(@javax.annotation.Nullable FieldNameEnum fieldName) { + this.fieldName = fieldName; + return this; + } + + /** + * Name of the field to apply the sort on. + * + * @return fieldName + */ + @javax.annotation.Nullable + public FieldNameEnum getFieldName() { + return fieldName; + } + + public void setFieldName(@javax.annotation.Nullable FieldNameEnum fieldName) { + this.fieldName = fieldName; + } + + public WebhookSortOptionsInput order(@javax.annotation.Nullable OrderEnum order) { + this.order = order; + return this; + } + + /** + * Sort order: ASC (Ascending) or DESC (Descending). + * + * @return order + */ + @javax.annotation.Nullable + public OrderEnum getOrder() { + return order; + } + + public void setOrder(@javax.annotation.Nullable OrderEnum order) { + this.order = order; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key name of the property + * @param value value of the property + * @return the WebhookSortOptionsInput instance itself + */ + public WebhookSortOptionsInput putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return a map of objects + */ + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key name of the property + * @return an object + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + WebhookSortOptionsInput webhookSortOptionsInput = (WebhookSortOptionsInput) o; + return Objects.equals(this.fieldName, webhookSortOptionsInput.fieldName) + && Objects.equals(this.order, webhookSortOptionsInput.order) + && Objects.equals( + this.additionalProperties, webhookSortOptionsInput.additionalProperties); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b + || (a != null + && b != null + && a.isPresent() + && b.isPresent() + && Objects.deepEquals(a.get(), b.get())); + } + + @Override + public int hashCode() { + return Objects.hash(fieldName, order, additionalProperties); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; + } + return a.isPresent() ? Arrays.deepHashCode(new Object[] {a.get()}) : 31; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class WebhookSortOptionsInput {\n"); + sb.append(" fieldName: ").append(toIndentedString(fieldName)).append("\n"); + sb.append(" order: ").append(toIndentedString(order)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first + * line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("field_name"); + openapiFields.add("order"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to WebhookSortOptionsInput + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!WebhookSortOptionsInput.openapiRequiredFields + .isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException( + String.format( + "The required field(s) %s in WebhookSortOptionsInput is not found" + + " in the empty JSON string", + WebhookSortOptionsInput.openapiRequiredFields.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if ((jsonObj.get("field_name") != null && !jsonObj.get("field_name").isJsonNull()) + && !jsonObj.get("field_name").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `field_name` to be a primitive type in the JSON" + + " string but got `%s`", + jsonObj.get("field_name").toString())); + } + // validate the optional field `field_name` + if (jsonObj.get("field_name") != null && !jsonObj.get("field_name").isJsonNull()) { + FieldNameEnum.validateJsonElement(jsonObj.get("field_name")); + } + if ((jsonObj.get("order") != null && !jsonObj.get("order").isJsonNull()) + && !jsonObj.get("order").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `order` to be a primitive type in the JSON string" + + " but got `%s`", + jsonObj.get("order").toString())); + } + // validate the optional field `order` + if (jsonObj.get("order") != null && !jsonObj.get("order").isJsonNull()) { + OrderEnum.validateJsonElement(jsonObj.get("order")); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!WebhookSortOptionsInput.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'WebhookSortOptionsInput' and its + // subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter = + gson.getDelegateAdapter(this, TypeToken.get(WebhookSortOptionsInput.class)); + + return (TypeAdapter) + new TypeAdapter() { + @Override + public void write(JsonWriter out, WebhookSortOptionsInput value) + throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + obj.remove("additionalProperties"); + // serialize additional properties + if (value.getAdditionalProperties() != null) { + for (Map.Entry entry : + value.getAdditionalProperties().entrySet()) { + if (entry.getValue() instanceof String) + obj.addProperty(entry.getKey(), (String) entry.getValue()); + else if (entry.getValue() instanceof Number) + obj.addProperty(entry.getKey(), (Number) entry.getValue()); + else if (entry.getValue() instanceof Boolean) + obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); + else if (entry.getValue() instanceof Character) + obj.addProperty( + entry.getKey(), (Character) entry.getValue()); + else { + JsonElement jsonElement = gson.toJsonTree(entry.getValue()); + if (jsonElement.isJsonArray()) { + obj.add(entry.getKey(), jsonElement.getAsJsonArray()); + } else { + obj.add(entry.getKey(), jsonElement.getAsJsonObject()); + } + } + } + } + elementAdapter.write(out, obj); + } + + @Override + public WebhookSortOptionsInput read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // store additional fields in the deserialized instance + WebhookSortOptionsInput instance = thisAdapter.fromJsonTree(jsonObj); + for (Map.Entry entry : jsonObj.entrySet()) { + if (!openapiFields.contains(entry.getKey())) { + if (entry.getValue().isJsonPrimitive()) { // primitive type + if (entry.getValue().getAsJsonPrimitive().isString()) + instance.putAdditionalProperty( + entry.getKey(), entry.getValue().getAsString()); + else if (entry.getValue().getAsJsonPrimitive().isNumber()) + instance.putAdditionalProperty( + entry.getKey(), entry.getValue().getAsNumber()); + else if (entry.getValue().getAsJsonPrimitive().isBoolean()) + instance.putAdditionalProperty( + entry.getKey(), + entry.getValue().getAsBoolean()); + else + throw new IllegalArgumentException( + String.format( + "The field `%s` has unknown primitive" + + " type. Value: %s", + entry.getKey(), + entry.getValue().toString())); + } else if (entry.getValue().isJsonArray()) { + instance.putAdditionalProperty( + entry.getKey(), + gson.fromJson(entry.getValue(), List.class)); + } else { // JSON object + instance.putAdditionalProperty( + entry.getKey(), + gson.fromJson(entry.getValue(), HashMap.class)); + } + } + } + return instance; + } + }.nullSafe(); + } + } + + /** + * Create an instance of WebhookSortOptionsInput given an JSON string + * + * @param jsonString JSON string + * @return An instance of WebhookSortOptionsInput + * @throws IOException if the JSON string is invalid with respect to WebhookSortOptionsInput + */ + public static WebhookSortOptionsInput fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, WebhookSortOptionsInput.class); + } + + /** + * Convert an instance of WebhookSortOptionsInput to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} diff --git a/sdks/java/src/main/java/com/thoughtspot/client/model/WebhookUser.java b/sdks/java/src/main/java/com/thoughtspot/client/model/WebhookUser.java new file mode 100644 index 000000000..a761e7e6a --- /dev/null +++ b/sdks/java/src/main/java/com/thoughtspot/client/model/WebhookUser.java @@ -0,0 +1,336 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client.model; + +import com.google.gson.Gson; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.TypeAdapter; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.annotations.SerializedName; +import com.google.gson.reflect.TypeToken; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import com.thoughtspot.client.JSON; +import java.io.IOException; +import java.io.Serializable; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Objects; + +/** WebhookUser */ +@javax.annotation.Generated( + value = "org.openapitools.codegen.languages.JavaClientCodegen", + comments = "Generator version: 7.12.0") +public class WebhookUser implements Serializable { + private static final long serialVersionUID = 1L; + + public static final String SERIALIZED_NAME_ID = "id"; + + @SerializedName(SERIALIZED_NAME_ID) + @javax.annotation.Nonnull + private String id; + + public static final String SERIALIZED_NAME_NAME = "name"; + + @SerializedName(SERIALIZED_NAME_NAME) + @javax.annotation.Nonnull + private String name; + + public WebhookUser() {} + + public WebhookUser id(@javax.annotation.Nonnull String id) { + this.id = id; + return this; + } + + /** + * Unique identifier of the user. + * + * @return id + */ + @javax.annotation.Nonnull + public String getId() { + return id; + } + + public void setId(@javax.annotation.Nonnull String id) { + this.id = id; + } + + public WebhookUser name(@javax.annotation.Nonnull String name) { + this.name = name; + return this; + } + + /** + * Name of the user. + * + * @return name + */ + @javax.annotation.Nonnull + public String getName() { + return name; + } + + public void setName(@javax.annotation.Nonnull String name) { + this.name = name; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key name of the property + * @param value value of the property + * @return the WebhookUser instance itself + */ + public WebhookUser putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return a map of objects + */ + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key name of the property + * @return an object + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + WebhookUser webhookUser = (WebhookUser) o; + return Objects.equals(this.id, webhookUser.id) + && Objects.equals(this.name, webhookUser.name) + && Objects.equals(this.additionalProperties, webhookUser.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(id, name, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class WebhookUser {\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first + * line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("id"); + openapiFields.add("name"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + openapiRequiredFields.add("id"); + openapiRequiredFields.add("name"); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to WebhookUser + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!WebhookUser.openapiRequiredFields + .isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException( + String.format( + "The required field(s) %s in WebhookUser is not found in the empty" + + " JSON string", + WebhookUser.openapiRequiredFields.toString())); + } + } + + // check to make sure all required properties/fields are present in the JSON string + for (String requiredField : WebhookUser.openapiRequiredFields) { + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException( + String.format( + "The required field `%s` is not found in the JSON string: %s", + requiredField, jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if (!jsonObj.get("id").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `id` to be a primitive type in the JSON string but" + + " got `%s`", + jsonObj.get("id").toString())); + } + if (!jsonObj.get("name").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `name` to be a primitive type in the JSON string" + + " but got `%s`", + jsonObj.get("name").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!WebhookUser.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'WebhookUser' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter = + gson.getDelegateAdapter(this, TypeToken.get(WebhookUser.class)); + + return (TypeAdapter) + new TypeAdapter() { + @Override + public void write(JsonWriter out, WebhookUser value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + obj.remove("additionalProperties"); + // serialize additional properties + if (value.getAdditionalProperties() != null) { + for (Map.Entry entry : + value.getAdditionalProperties().entrySet()) { + if (entry.getValue() instanceof String) + obj.addProperty(entry.getKey(), (String) entry.getValue()); + else if (entry.getValue() instanceof Number) + obj.addProperty(entry.getKey(), (Number) entry.getValue()); + else if (entry.getValue() instanceof Boolean) + obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); + else if (entry.getValue() instanceof Character) + obj.addProperty( + entry.getKey(), (Character) entry.getValue()); + else { + JsonElement jsonElement = gson.toJsonTree(entry.getValue()); + if (jsonElement.isJsonArray()) { + obj.add(entry.getKey(), jsonElement.getAsJsonArray()); + } else { + obj.add(entry.getKey(), jsonElement.getAsJsonObject()); + } + } + } + } + elementAdapter.write(out, obj); + } + + @Override + public WebhookUser read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // store additional fields in the deserialized instance + WebhookUser instance = thisAdapter.fromJsonTree(jsonObj); + for (Map.Entry entry : jsonObj.entrySet()) { + if (!openapiFields.contains(entry.getKey())) { + if (entry.getValue().isJsonPrimitive()) { // primitive type + if (entry.getValue().getAsJsonPrimitive().isString()) + instance.putAdditionalProperty( + entry.getKey(), entry.getValue().getAsString()); + else if (entry.getValue().getAsJsonPrimitive().isNumber()) + instance.putAdditionalProperty( + entry.getKey(), entry.getValue().getAsNumber()); + else if (entry.getValue().getAsJsonPrimitive().isBoolean()) + instance.putAdditionalProperty( + entry.getKey(), + entry.getValue().getAsBoolean()); + else + throw new IllegalArgumentException( + String.format( + "The field `%s` has unknown primitive" + + " type. Value: %s", + entry.getKey(), + entry.getValue().toString())); + } else if (entry.getValue().isJsonArray()) { + instance.putAdditionalProperty( + entry.getKey(), + gson.fromJson(entry.getValue(), List.class)); + } else { // JSON object + instance.putAdditionalProperty( + entry.getKey(), + gson.fromJson(entry.getValue(), HashMap.class)); + } + } + } + return instance; + } + }.nullSafe(); + } + } + + /** + * Create an instance of WebhookUser given an JSON string + * + * @param jsonString JSON string + * @return An instance of WebhookUser + * @throws IOException if the JSON string is invalid with respect to WebhookUser + */ + public static WebhookUser fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, WebhookUser.class); + } + + /** + * Convert an instance of WebhookUser to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} diff --git a/sdks/java/src/test/java/com/thoughtspot/client/api/AiApiTest.java b/sdks/java/src/test/java/com/thoughtspot/client/api/AiApiTest.java new file mode 100644 index 000000000..a62f2a9fe --- /dev/null +++ b/sdks/java/src/test/java/com/thoughtspot/client/api/AiApiTest.java @@ -0,0 +1,569 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client.api; + +import com.thoughtspot.client.ApiException; +import com.thoughtspot.client.model.AgentConversation; +import com.thoughtspot.client.model.Conversation; +import com.thoughtspot.client.model.CreateAgentConversationRequest; +import com.thoughtspot.client.model.CreateConversationRequest; +import com.thoughtspot.client.model.EurekaDataSourceSuggestionResponse; +import com.thoughtspot.client.model.EurekaDecomposeQueryResponse; +import com.thoughtspot.client.model.EurekaGetNLInstructionsResponse; +import com.thoughtspot.client.model.EurekaGetRelevantQuestionsResponse; +import com.thoughtspot.client.model.EurekaSetNLInstructionsResponse; +import com.thoughtspot.client.model.GetDataSourceSuggestionsRequest; +import com.thoughtspot.client.model.GetNLInstructionsRequest; +import com.thoughtspot.client.model.GetRelevantQuestionsRequest; +import com.thoughtspot.client.model.QueryGetDecomposedQueryRequest; +import com.thoughtspot.client.model.ResponseMessage; +import com.thoughtspot.client.model.SendAgentConversationMessageRequest; +import com.thoughtspot.client.model.SendAgentConversationMessageStreamingRequest; +import com.thoughtspot.client.model.SendAgentMessageRequest; +import com.thoughtspot.client.model.SendAgentMessageResponse; +import com.thoughtspot.client.model.SendAgentMessageStreamingRequest; +import com.thoughtspot.client.model.SendMessageRequest; +import com.thoughtspot.client.model.SetNLInstructionsRequest; +import com.thoughtspot.client.model.SingleAnswerRequest; +import java.util.List; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; + +/** API tests for AiApi */ +@Disabled +public class AiApiTest { + + private final AiApi api = new AiApi(); + + /** + * Version: 26.2.0.cl or later Creates a new Spotter agent conversation based on the provided + * context and settings. The endpoint was in Beta from 26.2.0.cl through 26.4.0.cl. Requires + * `CAN_USE_SPOTTER` privilege and at least view access to the metadata object + * specified in the request. #### Usage guidelines The request must include the + * `metadata_context` parameter to define the conversation context. The context type + * can be one of: - `DATA_SOURCE` *(available from 26.5.0.cl)*: targets a specific + * data source. Provide `data_source_identifier` in `data_source_context` + * for a single data source, or `data_source_identifiers` for multi-data-source + * context. The deprecated `guid` field is accepted for backwards compatibility. - + * `AUTO_MODE` *(available from 26.5.0.cl)*: automatically discovers and selects the + * most relevant datasets for the user's queries. > **Note for callers on versions + * 26.2.0.cl – 26.4.0.cl (Beta):** use the lowercase `data_source` enum value with the + * `guid` field instead of the above. Example: `{ \"type\": + * \"data_source\", \"data_source_context\": { \"guid\": + * \"<worksheet-id>\" } }`. The `conversation_settings` parameter + * controls which Spotter capabilities are enabled for the conversation: - + * `enable_contextual_change_analysis` (default: `true`, **deprecated from + * 26.2.0.cl**) — always enabled in Spotter 3; setting this to `false` has no effect + * on versions >= 26.2.0.cl - `enable_natural_language_answer_generation` + * (default: `true`, **deprecated from 26.2.0.cl**) — always enabled in Spotter 3; + * setting this to `false` has no effect on versions >= 26.2.0.cl - + * `enable_reasoning` (default: `true`, **deprecated from 26.2.0.cl**) — + * always enabled in Spotter 3; setting this to `false` has no effect on versions + * >= 26.2.0.cl - `enable_save_chat` (default: `false`, *available + * from 26.5.0.cl*) — enables saving the conversation for later retrieval via conversation + * history If the request is successful, the response includes a unique + * `conversation_identifier` that must be passed to + * `sendAgentConversationMessage` or `sendAgentConversationMessageStreaming` + * to send messages within this conversation. The response also includes + * `conversation_id` with the same value for backwards compatibility; use + * `conversation_identifier` for new integrations. #### Example request + * ```json { \"metadata_context\": { \"type\": + * \"DATA_SOURCE\", \"data_source_context\": { + * \"data_source_identifier\": \"a1b2c3d4-e5f6-7890-abcd-ef1234567890\" } }, + * \"conversation_settings\": {} } ``` #### Error responses | Code | + * Description | | ---- | + * --------------------------------------------------------------------------------------------------------------------------------------- + * | | 401 | Unauthorized — authentication token is missing, expired, or invalid. | | 403 | + * Forbidden — the authenticated user does not have `CAN_USE_SPOTTER` privilege or + * lacks view permission on the specified metadata object. | > ###### Note: > > - This + * endpoint was in Beta from 26.2.0.cl through 26.4.0.cl and is Generally Available from version + * 26.5.0.cl. > - This endpoint requires Spotter - please contact ThoughtSpot support to + * enable Spotter on your cluster. + * + * @throws ApiException if the Api call fails + */ + @Test + public void createAgentConversationTest() throws ApiException { + CreateAgentConversationRequest createAgentConversationRequest = null; + AgentConversation response = api.createAgentConversation(createAgentConversationRequest); + // TODO: test validations + } + + /** + * Version: 10.4.0.cl or later Creates a new conversation session tied to a specific data model + * for AI-driven natural language querying. Requires `CAN_USE_SPOTTER` privilege and + * at least view access to the metadata object specified in the request. #### Usage guidelines + * The request must include: - `metadata_identifier`: the unique ID of the data source + * that provides context for the conversation Optionally, you can provide: - `tokens`: + * a token string to set initial context for the conversation (e.g., `\"[sales],[item + * type],[state]\"`) If the request is successful, ThoughtSpot returns a unique + * `conversation_identifier` that must be passed to `sendMessage` to + * continue the conversation. #### Error responses | Code | Description | |------|-------------| + * | 401 | Unauthorized — authentication token is missing, expired, or invalid. | | 403 | + * Forbidden — the authenticated user does not have `CAN_USE_SPOTTER` privilege or + * lacks view permission on the specified metadata object. | > ###### Note: > * This + * endpoint is currently in Beta. Breaking changes may be introduced before the endpoint is made + * Generally Available. > * This endpoint requires Spotter - please contact ThoughtSpot + * support to enable Spotter on your cluster. + * + * @throws ApiException if the Api call fails + */ + @Test + public void createConversationTest() throws ApiException { + CreateConversationRequest createConversationRequest = null; + Conversation response = api.createConversation(createConversationRequest); + // TODO: test validations + } + + /** + * Version: 10.15.0.cl or later Suggests the most relevant data sources for a given natural + * language query, ranked by confidence with LLM-generated reasoning. Requires + * `CAN_USE_SPOTTER` privilege and at least view-level access to the underlying + * metadata entities referenced in the response. #### Usage guidelines The request must include: + * - `query`: the natural language question to find relevant data sources for If the + * request is successful, the API returns a ranked list of suggested data sources, each + * containing: - `confidence`: a float score indicating the model's confidence in + * the relevance of the suggestion - `details`: metadata about the data source - + * `data_source_identifier`: the unique ID of the data source - + * `data_source_name`: the display name of the data source - `description`: + * a description of the data source - `reasoning`: LLM-generated rationale explaining + * why the data source was recommended #### Error responses | Code | Description | + * |------|--------------------------------------------------------------------------------------------------------------------------------------------| + * | 401 | Unauthorized — authentication token is missing, expired, or invalid. | | 403 | + * Forbidden — the authenticated user does not have `CAN_USE_SPOTTER` privilege or + * lacks view permission on the underlying metadata entities. | > ###### Note: > * This + * endpoint is currently in Beta. Breaking changes may be introduced before it is made Generally + * Available. > * This endpoint requires Spotter — please contact ThoughtSpot Support to + * enable Spotter on your cluster. + * + * @throws ApiException if the Api call fails + */ + @Test + public void getDataSourceSuggestionsTest() throws ApiException { + GetDataSourceSuggestionsRequest getDataSourceSuggestionsRequest = null; + EurekaDataSourceSuggestionResponse response = + api.getDataSourceSuggestions(getDataSourceSuggestionsRequest); + // TODO: test validations + } + + /** + * Version: 10.15.0.cl or later Retrieves existing natural language (NL) instructions configured + * for a specific data model. These instructions guide the AI system in understanding data + * context and generating more accurate responses. Requires `CAN_USE_SPOTTER` + * privilege, at least view access on the data model, and a bearer token corresponding to the + * org where the data model exists. #### Usage guidelines The request must include: - + * `data_source_identifier`: the unique ID of the data model to retrieve instructions + * for If the request is successful, the API returns: - `nl_instructions_info`: an + * array of instruction objects, each containing: - `instructions`: the configured + * text instructions for AI processing - `scope`: the scope of the instruction — + * currently only `GLOBAL` is supported #### Instructions scope - **GLOBAL**: + * Instructions that apply globally across the system on the given data-model (currently only + * global instructions are supported) #### Error responses | Code | Description | + * |------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| + * | 401 | Unauthorized — authentication token is missing, expired, or invalid. | | 403 | + * Forbidden — the authenticated user does not have `CAN_USE_SPOTTER` privilege, lacks + * view access on the data model, or the bearer token does not correspond to the org where the + * data model exists. | > ###### Note: > > - To use this API, the user needs at least + * view access on the data model, and must use the bearer token corresponding to the org where + * the data model exists. > - This endpoint is currently in Beta. Breaking changes may be + * introduced before the endpoint is made Generally Available. > - Available from version + * 10.15.0.cl and later. > - This endpoint requires Spotter — please contact ThoughtSpot + * Support to enable Spotter on your cluster. > - Use this API to review currently configured + * instructions before modifying them with `setNLInstructions`. + * + * @throws ApiException if the Api call fails + */ + @Test + public void getNLInstructionsTest() throws ApiException { + GetNLInstructionsRequest getNLInstructionsRequest = null; + EurekaGetNLInstructionsResponse response = api.getNLInstructions(getNLInstructionsRequest); + // TODO: test validations + } + + /** + * Version: 10.13.0.cl or later Breaks down a natural language query into a series of smaller + * analytical sub-questions, each mapped to a relevant data source. Requires + * `CAN_USE_SPOTTER` privilege and at least view-level access to the referenced + * metadata objects. #### Usage guidelines The request must include: - `query`: the + * natural language question to decompose into analytical sub-questions - + * `metadata_context`: at least one of the following context identifiers to guide + * question generation: - `conversation_identifier` — an existing conversation session + * ID - `answer_identifiers` — a list of Answer GUIDs - + * `liveboard_identifiers` — a list of Liveboard GUIDs - + * `data_source_identifiers` — a list of data source GUIDs Optional parameters for + * refining the output: - `ai_context`: additional context to improve response quality + * - `content` — supplementary text or CSV data as string input - + * `instructions` — custom text instructions for the AI system - + * `limit_relevant_questions`: maximum number of questions to return (default: + * `5`) - `bypass_cache`: if `true`, forces fresh computation + * instead of returning cached results If the request is successful, the API returns a list of + * relevant analytical questions, each containing: - `query`: the generated + * sub-question - `data_source_identifier`: the unique ID of the data source the + * question targets - `data_source_name`: the display name of the corresponding data + * source #### Error responses | Code | Description | + * |------|---------------------------------------------------------------------------------------------------------------------------------------| + * | 401 | Unauthorized — authentication token is missing, expired, or invalid. | | 403 | + * Forbidden — the authenticated user does not have `CAN_USE_SPOTTER` privilege or + * lacks view access to the referenced metadata objects. | > ###### Note: > * This + * endpoint is currently in Beta. Breaking changes may be introduced before the endpoint is made + * Generally Available. > * This endpoint requires Spotter - please contact ThoughtSpot + * support to enable Spotter on your cluster. + * + * @throws ApiException if the Api call fails + */ + @Test + public void getRelevantQuestionsTest() throws ApiException { + GetRelevantQuestionsRequest getRelevantQuestionsRequest = null; + EurekaGetRelevantQuestionsResponse response = + api.getRelevantQuestions(getRelevantQuestionsRequest); + // TODO: test validations + } + + /** + * Version: 10.7.0.cl or later **Deprecated** — Use `getRelevantQuestions` instead + * (available from 10.13.0.cl). Breaks down a topical or goal-oriented natural language question + * into smaller, actionable analytical sub-questions, each mapped to a relevant data source for + * independent execution. Requires `CAN_USE_SPOTTER` privilege and at least view-level + * access to the referenced metadata objects. #### Usage guidelines The request accepts the + * following parameters: - `nlsRequest`: contains the user `query` to + * decompose, along with optional `instructions` and `bypassCache` flag - + * `worksheetIds`: list of data source identifiers to scope the decomposition - + * `answerIds`: list of Answer GUIDs whose data guides the response - + * `liveboardIds`: list of Liveboard GUIDs whose data guides the response - + * `conversationId`: an existing conversation session ID for context continuity - + * `content`: supplementary text or CSV data to improve response quality - + * `maxDecomposedQueries`: maximum number of sub-questions to return (default: + * `5`) If the request is successful, the API returns a + * `decomposedQueryResponse` containing a list of `decomposedQueries`, each + * with: - `query`: the generated analytical sub-question - `worksheetId`: + * the unique ID of the data source the question targets - `worksheetName`: the + * display name of the corresponding data source #### Error responses | Code | Description | + * |------|---------------------------------------------------------------------------------------------------------------------------------------| + * | 401 | Unauthorized — authentication token is missing, expired, or invalid. | | 403 | + * Forbidden — the authenticated user does not have `CAN_USE_SPOTTER` privilege or + * lacks view access to the referenced metadata objects. | > ###### Note: > * This + * endpoint is deprecated since 10.13.0.cl. Use `getRelevantQuestions` for new + * integrations. > * This endpoint is currently in Beta. Breaking changes may be introduced + * before the endpoint is made Generally Available. > * This endpoint requires Spotter — + * please contact ThoughtSpot support to enable Spotter on your cluster. + * + * @throws ApiException if the Api call fails + */ + @Test + public void queryGetDecomposedQueryTest() throws ApiException { + QueryGetDecomposedQueryRequest queryGetDecomposedQueryRequest = null; + EurekaDecomposeQueryResponse response = + api.queryGetDecomposedQuery(queryGetDecomposedQueryRequest); + // TODO: test validations + } + + /** + * Version: 26.5.0.cl or later Sends natural language messages to an existing Spotter agent + * conversation and returns the complete response synchronously. Requires + * `CAN_USE_SPOTTER` privilege and access to the metadata object associated with the + * conversation. The user must have access to the conversation session referenced by + * `conversation_identifier`. A conversation must first be created using the + * `createAgentConversation` API. #### Usage guidelines The request must include: - + * `conversation_identifier`: the unique session ID returned by + * `createAgentConversation`, used for context continuity and message tracking - + * `messages`: an array of one or more text messages to send to the agent The API + * returns an array of response objects, each containing: - `type`: the kind of + * response — `text`, `answer`, or `error` - `message`: + * the main content of the response - `metadata`: additional information depending on + * the message type (e.g., answer metadata includes analytics and visualization details) #### + * Error responses | Code | Description | + * |------|----------------------------------------------------------------------------------------------------------------------------------| + * | 401 | Unauthorized — authentication token is missing, expired, or invalid. | | 403 | + * Forbidden — the authenticated user does not have `CAN_USE_SPOTTER` privilege or + * lacks permission on the referenced conversation. | > ###### Note: > > - This + * endpoint is Generally Available from version 26.5.0.cl. > - This endpoint requires Spotter + * - please contact ThoughtSpot support to enable Spotter on your cluster. > - For real-time + * streamed responses, use `sendAgentConversationMessageStreaming` instead. + * + * @throws ApiException if the Api call fails + */ + @Test + public void sendAgentConversationMessageTest() throws ApiException { + String conversationIdentifier = null; + SendAgentConversationMessageRequest sendAgentConversationMessageRequest = null; + Object response = + api.sendAgentConversationMessage( + conversationIdentifier, sendAgentConversationMessageRequest); + // TODO: test validations + } + + /** + * Version: 26.5.0.cl or later Sends one or more natural language messages to an existing + * Spotter agent conversation and returns the response as a real-time Server-Sent Events stream. + * Requires `CAN_USE_SPOTTER` privilege and access to the metadata object associated + * with the conversation. The user must have access to the conversation session referenced by + * `conversation_identifier`. A conversation must first be created using the + * `createAgentConversation` API. #### Usage guidelines The request must include: - + * `conversation_identifier`: the unique session ID returned by + * `createAgentConversation`, used for context continuity and message tracking - + * `messages`: an array of one or more text messages to send to the agent If the + * request is valid, the API returns a Server-Sent Events (SSE) stream. Each line has the form + * `data: [{\"type\": \"...\", ...}]` — a JSON array of event + * objects. Event types include: - `ack`: confirms receipt of the request + * (`node_id`) - `conv_title`: conversation title (`title`, + * `conv_id`) - `notification`: status updates on operations + * (`group_id`, `metadata`, `code` — e.g. + * `TOOL_CALL_NOTIFICATION`, `nls_start`, + * `FINAL_RESPONSE_NOTIFICATION`) - `text-chunk`: incremental content chunks + * (`id`, `group_id`, `metadata` with `format` and + * `type` such as `thinking` or `text`, `content`) - + * `text`: full text block with same structure as `text-chunk` - + * `answer`: structured answer with metadata (`id`, `group_id`, + * `metadata` with `sage_query`, `session_id`, `title`, + * etc., `title`) - `error`: if a failure occurs #### Error responses | Code + * | Description | | ---- | + * -------------------------------------------------------------------------------------------------------------------------------- + * | | 401 | Unauthorized — authentication token is missing, expired, or invalid. | | 403 | + * Forbidden — the authenticated user does not have `CAN_USE_SPOTTER` privilege or + * lacks permission on the referenced conversation. | > ###### Note: > > - This + * endpoint is Generally Available from version 26.5.0.cl. > - This endpoint requires Spotter + * - please contact ThoughtSpot support to enable Spotter on your cluster. > - The streaming + * protocol uses Server-Sent Events (SSE). > - For the complete response in a single payload, + * use `sendAgentConversationMessage` instead. + * + * @throws ApiException if the Api call fails + */ + @Test + public void sendAgentConversationMessageStreamingTest() throws ApiException { + String conversationIdentifier = null; + SendAgentConversationMessageStreamingRequest sendAgentConversationMessageStreamingRequest = + null; + SendAgentMessageResponse response = + api.sendAgentConversationMessageStreaming( + conversationIdentifier, sendAgentConversationMessageStreamingRequest); + // TODO: test validations + } + + /** + * Version: 26.2.0.cl or later **Deprecated** — Use `sendAgentConversationMessage` + * instead. Send natural language messages to an existing Spotter agent conversation and returns + * the complete response synchronously. Requires `CAN_USE_SPOTTER` privilege and + * access to the metadata object associated with the conversation. The user must have access to + * the conversation session referenced by `conversation_identifier`. A conversation + * must first be created using the `createAgentConversation` API. #### Usage + * guidelines The request must include: - `conversation_identifier`: the unique + * session ID returned by `createAgentConversation`, used for context continuity and + * message tracking - `messages`: an array of one or more text messages to send to the + * agent The API returns an array of response objects, each containing: - `type`: the + * kind of response — `text`, `answer`, or `error` - + * `message`: the main content of the response - `metadata`: additional + * information depending on the message type (e.g., answer metadata includes analytics and + * visualization details) #### Error responses | Code | Description | + * |------|----------------------------------------------------------------------------------------------------------------------------------| + * | 401 | Unauthorized — authentication token is missing, expired, or invalid. | | 403 | + * Forbidden — the authenticated user does not have `CAN_USE_SPOTTER` privilege or + * lacks permission on the referenced conversation. | > ###### Note: > > - This + * endpoint is deprecated. Use `sendAgentConversationMessage` for new integrations. + * > - This endpoint is currently in Beta. Breaking changes may be introduced before the + * endpoint is made Generally Available. > - This endpoint requires Spotter - please contact + * ThoughtSpot support to enable Spotter on your cluster. + * + * @throws ApiException if the Api call fails + */ + @Test + public void sendAgentMessageTest() throws ApiException { + String conversationIdentifier = null; + SendAgentMessageRequest sendAgentMessageRequest = null; + Object response = api.sendAgentMessage(conversationIdentifier, sendAgentMessageRequest); + // TODO: test validations + } + + /** + * Version: 26.2.0.cl or later **Deprecated** — Use + * `sendAgentConversationMessageStreaming` instead. Sends one or more natural language + * messages to an existing Spotter agent conversation and returns the response as a real-time + * Server-Sent Events stream. Requires `CAN_USE_SPOTTER` privilege and access to the + * metadata object associated with the conversation. The user must have access to the + * conversation session referenced by `conversation_identifier`. A conversation must + * first be created using the `createAgentConversation` API. #### Usage guidelines The + * request must include: - `conversation_identifier`: the unique session ID returned + * by `createAgentConversation`, used for context continuity and message tracking - + * `messages`: an array of one or more text messages to send to the agent If the + * request is valid, the API returns a Server-Sent Events (SSE) stream. Each line has the form + * `data: [{\"type\": \"...\", ...}]` — a JSON array of event + * objects. Event types include: - `ack`: confirms receipt of the request + * (`node_id`) - `conv_title`: conversation title (`title`, + * `conv_id`) - `notification`: status updates on operations + * (`group_id`, `metadata`, `code` — e.g. + * `TOOL_CALL_NOTIFICATION`, `nls_start`, + * `FINAL_RESPONSE_NOTIFICATION`) - `text-chunk`: incremental content chunks + * (`id`, `group_id`, `metadata` with `format` and + * `type` such as `thinking` or `text`, `content`) - + * `text`: full text block with same structure as `text-chunk` - + * `answer`: structured answer with metadata (`id`, `group_id`, + * `metadata` with `sage_query`, `session_id`, `title`, + * etc., `title`) - `error`: if a failure occurs #### Error responses | Code + * | Description | + * |------|----------------------------------------------------------------------------------------------------------------------------------| + * | 401 | Unauthorized — authentication token is missing, expired, or invalid. | | 403 | + * Forbidden — the authenticated user does not have `CAN_USE_SPOTTER` privilege or + * lacks permission on the referenced conversation. | > ###### Note: > > - This + * endpoint is deprecated. Use `sendAgentConversationMessageStreaming` for new + * integrations. > - This endpoint is currently in Beta. Breaking changes may be introduced + * before the endpoint is made Generally Available. > - This endpoint requires Spotter - + * please contact ThoughtSpot support to enable Spotter on your cluster. > - The streaming + * protocol uses Server-Sent Events (SSE). + * + * @throws ApiException if the Api call fails + */ + @Test + public void sendAgentMessageStreamingTest() throws ApiException { + SendAgentMessageStreamingRequest sendAgentMessageStreamingRequest = null; + SendAgentMessageResponse response = + api.sendAgentMessageStreaming(sendAgentMessageStreamingRequest); + // TODO: test validations + } + + /** + * Version: 10.4.0.cl or later Sends a follow-up message to an existing conversation within the + * context of a data model. Requires `CAN_USE_SPOTTER` privilege and at least view + * access to the metadata object specified in the request. A conversation must first be created + * using the `createConversation` API. #### Usage guidelines The request must include: + * - `conversation_identifier`: the unique session ID returned by + * `createConversation` - `metadata_identifier`: the unique ID of the data + * source used for the conversation - `message`: a natural language string with the + * follow-up question If the request is successful, the API returns an array of response + * messages, each containing: - `session_identifier`: the unique ID of the generated + * response - `generation_number`: the generation number of the response - + * `message_type`: the type of the response (e.g., `TSAnswer`) - + * `visualization_type`: the generated visualization type (`Chart`, + * `Table`, or `Undefined`) - `tokens` / + * `display_tokens`: the search tokens and user-friendly display tokens for the + * response #### Error responses | Code | Description | + * |------|-----------------------------------------------------------------------------------------------------------------------------------------| + * | 401 | Unauthorized — authentication token is missing, expired, or invalid. | | 403 | + * Forbidden — the authenticated user does not have `CAN_USE_SPOTTER` privilege or + * lacks view permission on the specified metadata object. | > ###### Note: > * This + * endpoint is currently in Beta. Breaking changes may be introduced before the endpoint is made + * Generally Available. > * This endpoint requires Spotter - please contact ThoughtSpot + * support to enable Spotter on your cluster. + * + * @throws ApiException if the Api call fails + */ + @Test + public void sendMessageTest() throws ApiException { + String conversationIdentifier = null; + SendMessageRequest sendMessageRequest = null; + List response = + api.sendMessage(conversationIdentifier, sendMessageRequest); + // TODO: test validations + } + + /** + * Version: 10.15.0.cl or later This API allows users to set natural language (NL) instructions + * for a specific data-model to improve AI-generated answers and query processing. These + * instructions help guide the AI system to better understand the data context and provide more + * accurate responses. Requires `CAN_USE_SPOTTER` privilege, either edit access or + * `SPOTTER_COACHING_PRIVILEGE` on the data model, and a bearer token corresponding to + * the org where the data model exists. #### Usage guidelines To set NL instructions for a + * data-model, the request must include: - `data_source_identifier`: The unique ID of + * the data-model for which to set NL instructions - `nl_instructions_info`: An array + * of instruction objects, each containing: - `instructions`: Array of text + * instructions for the LLM - `scope`: The scope of the instruction + * (`GLOBAL`). Currently only `GLOBAL` is supported. It can be extended to + * data-model-user scope in future. #### Instructions scope - **GLOBAL**: instructions that + * apply to all users querying this data model If the request is successful, the API returns: - + * `success`: a boolean indicating whether the operation completed successfully #### + * Error responses | Code | Description | + * |------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| + * | 401 | Unauthorized — authentication token is missing, expired, or invalid. | | 403 | + * Forbidden — the authenticated user does not have `CAN_USE_SPOTTER` privilege, lacks + * edit access or `SPOTTER_COACHING_PRIVILEGE` on the data model, or the bearer token + * does not correspond to the org where the data model exists. | > ###### Note: > > - + * To use this API, the user needs either edit access or `SPOTTER_COACHING_PRIVILEGE` + * on the data model, and must use the bearer token corresponding to the org where the data + * model exists. > - This endpoint is currently in Beta. Breaking changes may be introduced + * before the endpoint is made Generally Available. > - Available from version 10.15.0.cl and + * later. > - This endpoint requires Spotter — please contact ThoughtSpot Support to enable + * Spotter on your cluster. > - Instructions help improve the accuracy and relevance of + * AI-generated responses for the specified data-model. + * + * @throws ApiException if the Api call fails + */ + @Test + public void setNLInstructionsTest() throws ApiException { + SetNLInstructionsRequest setNLInstructionsRequest = null; + EurekaSetNLInstructionsResponse response = api.setNLInstructions(setNLInstructionsRequest); + // TODO: test validations + } + + /** + * Version: 10.4.0.cl or later Processes a natural language query against a specified data model + * and returns a single AI-generated answer without requiring a conversation session. Requires + * `CAN_USE_SPOTTER` privilege and at least view access to the metadata object + * specified in the request. #### Usage guidelines The request must include: - + * `query`: a natural language question (e.g., \"What were total sales last + * quarter?\") - `metadata_identifier`: the unique ID of the data source to query + * against If the request is successful, the API returns a response message containing: - + * `session_identifier`: the unique ID of the generated response - + * `generation_number`: the generation number of the response - + * `message_type`: the type of the response (e.g., `TSAnswer`) - + * `visualization_type`: the generated visualization type (`Chart`, + * `Table`, or `Undefined`) - `tokens` / + * `display_tokens`: the search tokens and user-friendly display tokens for the + * response #### Error responses | Code | Description | + * |------|-----------------------------------------------------------------------------------------------------------------------------------------| + * | 401 | Unauthorized — authentication token is missing, expired, or invalid. | | 403 | + * Forbidden — the authenticated user does not have `CAN_USE_SPOTTER` privilege or + * lacks view permission on the specified metadata object. | > ###### Note: > * This + * endpoint is currently in Beta. Breaking changes may be introduced before the endpoint is made + * Generally Available. > * This endpoint requires Spotter - please contact ThoughtSpot + * support to enable Spotter on your cluster. + * + * @throws ApiException if the Api call fails + */ + @Test + public void singleAnswerTest() throws ApiException { + SingleAnswerRequest singleAnswerRequest = null; + ResponseMessage response = api.singleAnswer(singleAnswerRequest); + // TODO: test validations + } + + /** + * Stops an in-progress agent conversation response. Version: 26.6.0.cl or later + * <span>Version: 26.6.0.cl or later Stops an in-progress agent response for the specified + * conversation. Use this endpoint to cancel a response that is actively being generated — for + * example, when the user navigates away, reformulates their question, or no longer needs the + * current result. Requires `CAN_USE_SPOTTER` privilege and access to the specified + * conversation. #### Usage guidelines The request must include: - + * `conversation_identifier` *(path parameter)*: the unique ID of the conversation + * whose active response should be stopped, as returned by `createAgentConversation` A + * successful request returns an empty `204 No Content` response. If there is no + * active response in progress at the time of the call, the request is still treated as + * successful. After stopping a response, the conversation session remains active. You can + * continue sending messages using `sendAgentConversationMessage` or + * `sendAgentConversationMessageStreaming`. #### Example request + * ```bash POST + * /api/rest/2.0/ai/agent/conversation/{conversation_identifier}/stop-response + * ``` #### Typical usage scenario This endpoint is useful when integrating + * Spotter into a chat UI where users can cancel a long-running query. For example: 1. User + * sends a message via `sendAgentConversationMessageStreaming`. 2. User clicks a + * \"Stop generating\" button while the response is streaming. 3. Your client calls + * `stopConversation` with the active `conversation_identifier`. 4. The + * stream is terminated and the user can ask a new question. #### Error responses | Code | + * Description | |------|-------------| | 401 | Unauthorized — authentication token is missing, + * expired, or invalid. | | 403 | Forbidden — the authenticated user does not have + * `CAN_USE_SPOTTER` privilege or lacks access to the specified conversation. | > + * ###### Note: > > - Calling this endpoint when no response is in progress does not + * return an error. > - The conversation context is preserved after stopping — previous + * messages and answers remain accessible. > - Available from version 26.6.0.cl and later. + * > - This endpoint requires Spotter — please contact ThoughtSpot Support to enable Spotter + * on your cluster. > - This feature is available only for **Spotter 3** + * (`SPOTTER3`) version. + * + * @throws ApiException if the Api call fails + */ + @Test + public void stopConversationTest() throws ApiException { + String conversationIdentifier = null; + api.stopConversation(conversationIdentifier); + // TODO: test validations + } +} diff --git a/sdks/java/src/test/java/com/thoughtspot/client/api/AuthenticationApiTest.java b/sdks/java/src/test/java/com/thoughtspot/client/api/AuthenticationApiTest.java new file mode 100644 index 000000000..376e1a021 --- /dev/null +++ b/sdks/java/src/test/java/com/thoughtspot/client/api/AuthenticationApiTest.java @@ -0,0 +1,337 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client.api; + +import com.thoughtspot.client.ApiException; +import com.thoughtspot.client.model.AccessToken; +import com.thoughtspot.client.model.ConfigureAuthSettingsRequest; +import com.thoughtspot.client.model.GetCustomAccessTokenRequest; +import com.thoughtspot.client.model.GetFullAccessTokenRequest; +import com.thoughtspot.client.model.GetObjectAccessTokenRequest; +import com.thoughtspot.client.model.GetTokenResponse; +import com.thoughtspot.client.model.LoginRequest; +import com.thoughtspot.client.model.RevokeTokenRequest; +import com.thoughtspot.client.model.SearchAuthSettingsRequest; +import com.thoughtspot.client.model.SearchAuthSettingsResponse; +import com.thoughtspot.client.model.Token; +import com.thoughtspot.client.model.TokenValidationResponse; +import com.thoughtspot.client.model.User; +import com.thoughtspot.client.model.ValidateTokenRequest; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; + +/** API tests for AuthenticationApi */ +@Disabled +public class AuthenticationApiTest { + + private final AuthenticationApi api = new AuthenticationApi(); + + /** + * Version: 26.6.0.cl or later Enables or disables authentication at cluster or org level for + * the specified auth type. Currently supports `TRUSTED_AUTH`. #### Required + * privileges Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) or + * `CONTROL_TRUSTED_AUTH` (**Can Enable or Disable Trusted Authentication**) + * privilege. If [Role-Based Access Control + * (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled, the + * `CONTROL_TRUSTED_AUTH` privilege is required. #### Usage guidelines Use + * `cluster_preferences` to enable or disable authentication at the cluster level. + * Cluster-level settings can only be configured from the Primary Org. - `ENABLED` — + * Generates a new access token if one does not exist. An existing token is preserved. - + * `DISABLED` — Revokes the existing cluster-level access token. Use + * `org_preferences` to enable or disable authentication for one or more Orgs. Each + * entry must include an `org_identifier` (unique ID or name) and an + * `auth_status`. Org-level configuration requires the per-Org authentication feature + * to be enabled on your instance. - `ENABLED` — Generates a new org-level access + * token if one does not exist. - `DISABLED` — Revokes the existing org-level access + * token for that Org. Both `cluster_preferences` and `org_preferences` are + * optional. Omitting a field leaves the corresponding settings unchanged. If both are omitted, + * the API returns `204 No Content` without making any changes. **Note**: + * Cluster-level and org-level settings are independent of each other. Enabling or disabling one + * does not affect the other. + * + * @throws ApiException if the Api call fails + */ + @Test + public void configureAuthSettingsTest() throws ApiException { + ConfigureAuthSettingsRequest configureAuthSettingsRequest = null; + api.configureAuthSettings(configureAuthSettingsRequest); + // TODO: test validations + } + + /** + * Version: 9.0.0.cl or later Retrieves details of the current user session for the token + * provided in the request header. Any ThoughtSpot user can access this endpoint and send an API + * request. The data returned in the API response varies according to user's privilege and + * object access permissions. **NOTE**: In ThoughtSpot, users with cluster administration + * privileges can access all Orgs by default. However, unless the administrator is explicitly + * added to an Org, the Orgs list in the session information returned by the API will include + * only the Primary Org. To include other Orgs in the API response, you must explicitly add the + * administrator to each Org in the Admin settings page in the UI or via user REST API. + * + * @throws ApiException if the Api call fails + */ + @Test + public void getCurrentUserInfoTest() throws ApiException { + User response = api.getCurrentUserInfo(); + // TODO: test validations + } + + /** + * Version: 9.4.0.cl or later Retrieves details of the current session token for the bearer + * token provided in the request header. This API endpoint does not create a new token. Instead, + * it returns details about the token, including the token string, creation time, expiration + * time, and the associated user. Use this endpoint to introspect your current session token, + * debug authentication issues, or when a frontend application needs session token details. Any + * ThoughtSpot user with a valid bearer token can access this endpoint and send an API request + * + * @throws ApiException if the Api call fails + */ + @Test + public void getCurrentUserTokenTest() throws ApiException { + GetTokenResponse response = api.getCurrentUserToken(); + // TODO: test validations + } + + /** + * Version: 10.4.0.cl or later Creates an authentication token that provides values for the + * formula variables in the Row Level Security (RLS) rules for a given user. Recommended for use + * cases that require Attribute-based access control (ABAC) via RLS. #### Required privileges To + * add a new user and assign privileges during auto-creation, the `ADMINISTRATION` + * (**Can administer ThoughtSpot**) privilege is required. If [Role-Based Access Control + * (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled, the + * `CONTROL_TRUSTED_AUTH` (**Can Enable or Disable Trusted Authentication**) privilege + * and edit access to the data source are required. To configure formula variables for all Orgs + * on your instance or the Primary Org, cluster administration privileges are required. Org + * administrators can configure formula variables for their respective Orgs. If Role-Based + * Access Control (RBAC) is enabled, users with the `CAN_MANAGE_VARIABLES` (**Can + * manage variables**) role privilege can also create and manage variables for their Org + * context. #### Usage guidelines You can generate a token by providing a `username` + * and `password`, or by using a `secret_key`. To generate a + * `secret_key`, the administrator must enable [Trusted + * authentication](https://developers.thoughtspot.com/docs/trusted-auth-secret-key) in the + * **Develop** > **Customizations** > **Security Settings** page. **Note**: * When both + * `password` and `secret_key` are included in the API request, + * `password` takes precedence. * If [Multi-Factor Authentication + * (MFA)](https://docs.thoughtspot.com/cloud/latest/authentication-local-mfa) is enabled on your + * instance, the API login request with `username` and `password` returns an + * error. You can switch to token-based authentication with `secret_key` or contact + * ThoughtSpot Support for assistance. The token obtained from ThoughtSpot is valid for 5 + * minutes by default. You can configure the token expiration time as required. #### ABAC via + * RLS To implement ABAC via RLS and assign security entitlements to users during session + * creation, generate a token with custom variable values. The values set in the authentication + * token are applied to the formula variables referenced in RLS rules at the table level, which + * determines the data each user can access based on their entitlements. The variable values can + * be configured to persist for a specific set of Models in user sessions initiated with the + * token, allowing different RLS rules to be set for different data models. Once defined, the + * rules are added to the user's `variable_values` object, after which all + * sessions will use the persisted values. For more information, see [ABAC via tokens + * Documentation](https://developers.thoughtspot.com/docs/abac-via-rls-variables). ##### Formula + * variables Before defining variable values, ensure the variables are created and available on + * your instance. To create a formula variable, you can use the **Create variable** + * (`/api/rest/2.0/template/variables/create`) REST API endpoint, with the variable + * `type` set as `Formula_Variable` in the API request. The API doesn't + * support `\"persist_option\": \"RESET\"` and + * `\"persist_option\": \"NONE\"` when `variable_values` + * are defined in the request. If you are using `variable_values` for token + * generation, you must use other supported persist options such as `APPEND` or + * `REPLACE`. If you want to use `RESET` or `NONE`, do not pass + * any `variable_values`. In such cases, `variable_values` will remain + * unaffected. #### Supported objects The supported object type is `LOGICAL_TABLE`. + * When using `object_id` with `variable_values`, models are supported. #### + * Just-in-time provisioning For [just-in-time user creation and + * provisioning](https://developers.thoughtspot.com/docs/just-in-time-provisioning), specify the + * following attributes in the API request: * `auto_create` * `username` * + * `display_name` * `email` * `groups` Set `auto_create` + * to `true` if the username does not exist in ThoughtSpot. If the username already + * exists in ThoughtSpot and `auto_create` is set to `true`, user properties + * such as display name, email, Org and group entitlements will not be updated with new values. + * Setting `auto_create` to `true` does not create formula variables. Hence, + * this setting will not be applicable to `variable_values`. #### Important point to + * note All options in the token creation APIs that define user access to data in ThoughtSpot + * will take effect during token creation, not when the token is used for authentication. For + * example, `auto_create:true` will create the user when the authentication token is + * created. Persist options such as `APPEND` and `REPLACE` will persist + * `variable_values` on the user profile when the token is created. + * + * @throws ApiException if the Api call fails + */ + @Test + public void getCustomAccessTokenTest() throws ApiException { + GetCustomAccessTokenRequest getCustomAccessTokenRequest = null; + AccessToken response = api.getCustomAccessToken(getCustomAccessTokenRequest); + // TODO: test validations + } + + /** + * Version: 9.0.0.cl or later Generates an authentication token for creating a full session in + * ThoughtSpot for a given user. Recommended for use cases that do not require Attribute-based + * access control (ABAC) via Row Level Security (RLS). #### Usage guidelines You can generate a + * token for a user by providing a `username` and `password`, or by using + * the `secret_key` generated for your instance. To generate a `secret_key`, + * the administrator must enable [Trusted + * authentication](https://developers.thoughtspot.com/docs/trusted-auth-secret-key) in the + * **Develop** > **Customizations** > **Security Settings** page. **Note**: * When both + * `password` and `secret_key` are included in the API request, + * `password` takes precedence. * If [Multi-Factor Authentication + * (MFA)](https://docs.thoughtspot.com/cloud/latest/authentication-local-mfa) is enabled on your + * instance, the API login request with `username` and `password` returns an + * error. You can switch to token-based authentication with `secret_key` or contact + * ThoughtSpot Support for assistance. The token obtained from ThoughtSpot is valid for 5 + * minutes by default. You can configure the token expiration time as required. #### + * Just-in-time provisioning For [just-in-time user creation and + * provisioning](https://developers.thoughtspot.com/docs/just-in-time-provisioning), specify the + * following attributes in the API request: * `auto_create` * `username` * + * `display_name` * `email` * `group_identifiers` Set + * `auto_create` to `true` if the username does not exist in ThoughtSpot. If + * the user already exists in ThoughtSpot and `auto_create` is set to + * `true`, user properties such as display name, email and group assignment will be + * updated. To add a new user and assign privileges during auto-creation, the + * `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege is required. If + * [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled, + * the `CONTROL_TRUSTED_AUTH` (**Can Enable or Disable Trusted Authentication**) + * privilege is required. #### Important point to note All options in the token creation APIs + * that define user access to data in ThoughtSpot will take effect during token creation, not + * when the token is used for authentication. For example, `auto_create:true` will + * create the user when the authentication token is created. + * + * @throws ApiException if the Api call fails + */ + @Test + public void getFullAccessTokenTest() throws ApiException { + GetFullAccessTokenRequest getFullAccessTokenRequest = null; + Token response = api.getFullAccessToken(getFullAccessTokenRequest); + // TODO: test validations + } + + /** + * Version: 9.0.0.cl or later Generates an authentication token that provides access to a + * specific metadata object. This object list is intersected with the list of objects the user + * is allowed to access via group membership. For more information, see [Object + * security](https://docs.thoughtspot.com/cloud/latest/security-data-object#object_security). + * #### Usage guidelines You can generate a token for a user by providing a `username` + * and `password`, or by using the `secret_key` generated for your instance. + * To generate a `secret_key`, the administrator must enable [Trusted + * authentication](https://developers.thoughtspot.com/docs/trusted-auth-secret-key) in the + * **Develop** > **Customizations** > **Security Settings** page. **Note**: * When both + * `password` and `secret_key` are included in the API request, + * `password` takes precedence. * If [Multi-Factor Authentication + * (MFA)](https://docs.thoughtspot.com/cloud/latest/authentication-local-mfa) is enabled on your + * instance, the API login request with `username` and `password` returns an + * error. You can switch to token-based authentication with `secret_key` or contact + * ThoughtSpot Support for assistance. The token obtained from ThoughtSpot is valid for 5 + * minutes by default. You can configure the token expiration time as required. #### + * Just-in-time provisioning For [just-in-time user creation and + * provisioning](https://developers.thoughtspot.com/docs/just-in-time-provisioning), specify the + * following attributes in the API request: * `auto_create` * `username` * + * `display_name` * `email` * `group_identifiers` Set + * `auto_create` to `true` if the user is not available in ThoughtSpot. If + * the user already exists in ThoughtSpot and the `auto_create` parameter is set to + * `true`, user properties such as display name, email, and group assignment will be + * updated. To add a new user and assign privileges, the `ADMINISTRATION` (**Can + * administer ThoughtSpot**) privilege is required. If [Role-Based Access Control + * (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled, the + * `CONTROL_TRUSTED_AUTH`(**Can Enable or Disable Trusted Authentication**) privilege + * is required. #### Important point to note All options in the token creation APIs that define + * user access to data in ThoughtSpot will take effect during token creation, not when the token + * is used for authentication. For example, `auto_create:true` will create the user + * when the authentication token is created. + * + * @throws ApiException if the Api call fails + */ + @Test + public void getObjectAccessTokenTest() throws ApiException { + GetObjectAccessTokenRequest getObjectAccessTokenRequest = null; + Token response = api.getObjectAccessToken(getObjectAccessTokenRequest); + // TODO: test validations + } + + /** + * Version: 9.0.0.cl or later Creates a login session for a ThoughtSpot user with Basic + * authentication. In Basic authentication method, REST clients log in to ThoughtSpot using + * `username` and `password` attributes. On a multi-tenant cluster with + * Orgs, users can pass the ID of the Org in the API request to log in to a specific Org + * context. **Note**: If Multi-Factor Authentication (MFA) is enabled on your instance, the API + * login request with basic authentication (`username` and `password` ) + * returns an error. Contact ThoughtSpot Support for assistance. A successful login returns a + * session cookie that can be used in your subsequent API requests. + * + * @throws ApiException if the Api call fails + */ + @Test + public void loginTest() throws ApiException { + LoginRequest loginRequest = null; + api.login(loginRequest); + // TODO: test validations + } + + /** + * Version: 9.0.0.cl or later Logs out a user from their current session. + * + * @throws ApiException if the Api call fails + */ + @Test + public void logoutTest() throws ApiException { + api.logout(); + // TODO: test validations + } + + /** + * Version: 9.0.0.cl or later Revokes the authentication token issued for current user session. + * The token of your current session expires when you make a call to the + * `/api/rest/2.0/auth/token/revoke` endpoint. the users will not be able to access + * ThoughtSpot objects until a new token is obtained. To restart your session, request for a new + * token from ThoughtSpot. See [Get Full Access + * Token](#/http/api-endpoints/authentication/get-full-access-token). + * + * @throws ApiException if the Api call fails + */ + @Test + public void revokeTokenTest() throws ApiException { + RevokeTokenRequest revokeTokenRequest = null; + api.revokeToken(revokeTokenRequest); + // TODO: test validations + } + + /** + * Version: 26.6.0.cl or later Returns the authentication configuration for the specified auth + * type at cluster and org level. Currently supports `TRUSTED_AUTH`. #### Required + * privileges Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) or + * `CONTROL_TRUSTED_AUTH` (**Can Enable or Disable Trusted Authentication**) + * privilege. If [Role-Based Access Control + * (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled, the + * `CONTROL_TRUSTED_AUTH` privilege is required. #### Usage guidelines Use + * `scope` to control which level of settings are returned: - `CLUSTER` — + * Returns cluster-level authentication status and access tokens. Accessible only from the + * Primary Org. - `ORG` — Returns org-level authentication status and access tokens + * for the current Org. Requires the per-Org authentication feature to be enabled on your + * instance. - If `scope` is omitted, both cluster and org-level settings are returned + * based on the caller's org context and feature availability. The `access_tokens` + * array in `cluster_preferences` or `org_preferences` is omitted when no + * token is configured at that level. **Note**: Access tokens returned in the response are + * sensitive credentials. Treat them with the same care as passwords. + * + * @throws ApiException if the Api call fails + */ + @Test + public void searchAuthSettingsTest() throws ApiException { + SearchAuthSettingsRequest searchAuthSettingsRequest = null; + SearchAuthSettingsResponse response = api.searchAuthSettings(searchAuthSettingsRequest); + // TODO: test validations + } + + /** + * Version: 9.12.0.cl or later Validates the authentication token specified in the API request. + * If your token is not valid, [Get a new + * token](#/http/api-endpoints/authentication/get-full-access-token). + * + * @throws ApiException if the Api call fails + */ + @Test + public void validateTokenTest() throws ApiException { + ValidateTokenRequest validateTokenRequest = null; + TokenValidationResponse response = api.validateToken(validateTokenRequest); + // TODO: test validations + } +} diff --git a/sdks/java/src/test/java/com/thoughtspot/client/api/CollectionsApiTest.java b/sdks/java/src/test/java/com/thoughtspot/client/api/CollectionsApiTest.java new file mode 100644 index 000000000..eb0262a57 --- /dev/null +++ b/sdks/java/src/test/java/com/thoughtspot/client/api/CollectionsApiTest.java @@ -0,0 +1,100 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client.api; + +import com.thoughtspot.client.ApiException; +import com.thoughtspot.client.model.Collection; +import com.thoughtspot.client.model.CollectionDeleteResponse; +import com.thoughtspot.client.model.CollectionSearchResponse; +import com.thoughtspot.client.model.CreateCollectionRequest; +import com.thoughtspot.client.model.DeleteCollectionRequest; +import com.thoughtspot.client.model.SearchCollectionsRequest; +import com.thoughtspot.client.model.UpdateCollectionRequest; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; + +/** API tests for CollectionsApi */ +@Disabled +public class CollectionsApiTest { + + private final CollectionsApi api = new CollectionsApi(); + + /** + * Version: 26.4.0.cl or later Creates a new collection in ThoughtSpot. Collections allow you to + * organize and group related metadata objects such as Liveboards, Answers, worksheets, and + * other data objects. You can also create nested collections (sub-collections) to build a + * hierarchical structure. #### Supported operations The API endpoint lets you perform the + * following operations: * Create a new collection * Add metadata objects (Liveboards, Answers, + * Logical Tables) to the collection * Create nested collections by adding sub-collections + * + * @throws ApiException if the Api call fails + */ + @Test + public void createCollectionTest() throws ApiException { + CreateCollectionRequest createCollectionRequest = null; + Collection response = api.createCollection(createCollectionRequest); + // TODO: test validations + } + + /** + * Version: 26.4.0.cl or later Deletes one or more collections from ThoughtSpot. #### Delete + * options * **delete_children**: When set to `true`, deletes the child objects + * (metadata items) within the collection that the user has access to. Objects that the user + * does not have permission to delete will be skipped. * **dry_run**: When set to + * `true`, performs a preview of the deletion operation without actually deleting + * anything. The response shows what would be deleted, allowing you to review before committing + * the deletion. #### Response The response includes: * **metadata_deleted**: List of metadata + * objects that were successfully deleted * **metadata_skipped**: List of metadata objects that + * were skipped due to lack of permissions or other constraints + * + * @throws ApiException if the Api call fails + */ + @Test + public void deleteCollectionTest() throws ApiException { + DeleteCollectionRequest deleteCollectionRequest = null; + CollectionDeleteResponse response = api.deleteCollection(deleteCollectionRequest); + // TODO: test validations + } + + /** + * Version: 26.4.0.cl or later Gets a list of collections available in ThoughtSpot. To get + * details of a specific collection, specify the collection GUID or name. You can also filter + * the API response based on the collection name pattern, author, and other criteria. #### + * Search options * **name_pattern**: Use '%' as a wildcard character to match + * collection names * **collection_identifiers**: Search for specific collections by their GUIDs + * or names * **include_metadata**: When set to `true`, includes the metadata objects + * within each collection in the response **NOTE**: If the API returns an empty list, consider + * increasing the value of the `record_size` parameter. To search across all available + * collections, set `record_size` to `-1`. + * + * @throws ApiException if the Api call fails + */ + @Test + public void searchCollectionsTest() throws ApiException { + SearchCollectionsRequest searchCollectionsRequest = null; + CollectionSearchResponse response = api.searchCollections(searchCollectionsRequest); + // TODO: test validations + } + + /** + * Version: 26.4.0.cl or later Updates an existing collection in ThoughtSpot. #### Supported + * operations This API endpoint lets you perform the following operations: * Update collection + * name and description * Change visibility settings * Add metadata objects to the collection + * (operation: ADD) * Remove metadata objects from the collection (operation: REMOVE) * Replace + * all metadata objects in the collection (operation: REPLACE) #### Operation types * **ADD**: + * Adds the specified metadata objects to the existing collection without removing current items + * * **REMOVE**: Removes only the specified metadata objects from the collection * **REPLACE**: + * Replaces all existing metadata objects with the specified items (default behavior) + * + * @throws ApiException if the Api call fails + */ + @Test + public void updateCollectionTest() throws ApiException { + String collectionIdentifier = null; + UpdateCollectionRequest updateCollectionRequest = null; + api.updateCollection(collectionIdentifier, updateCollectionRequest); + // TODO: test validations + } +} diff --git a/sdks/java/src/test/java/com/thoughtspot/client/api/ConnectionConfigurationsApiTest.java b/sdks/java/src/test/java/com/thoughtspot/client/api/ConnectionConfigurationsApiTest.java new file mode 100644 index 000000000..c04e5b99a --- /dev/null +++ b/sdks/java/src/test/java/com/thoughtspot/client/api/ConnectionConfigurationsApiTest.java @@ -0,0 +1,118 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client.api; + +import com.thoughtspot.client.ApiException; +import com.thoughtspot.client.model.ConnectionConfigurationResponse; +import com.thoughtspot.client.model.ConnectionConfigurationSearchRequest; +import com.thoughtspot.client.model.CreateConnectionConfigurationRequest; +import com.thoughtspot.client.model.DeleteConnectionConfigurationRequest; +import com.thoughtspot.client.model.UpdateConnectionConfigurationRequest; +import java.util.List; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; + +/** API tests for ConnectionConfigurationsApi */ +@Disabled +public class ConnectionConfigurationsApiTest { + + private final ConnectionConfigurationsApi api = new ConnectionConfigurationsApi(); + + /** + * Version: 10.12.0.cl or later Gets connection configuration objects. Requires + * `DATAMANAGEMENT` (**Can manage data**) and edit permissions to the connection + * object, or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If + * [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled + * on your instance, the `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit + * Connections**) privilege is required. #### Usage guidelines * To get a list of all + * configurations available in the ThoughtSpot system, send the API request with only the + * connection name or GUID in the request body. * To fetch details of a configuration object, + * specify the configuration object name or GUID. + * + * @throws ApiException if the Api call fails + */ + @Test + public void connectionConfigurationSearchTest() throws ApiException { + ConnectionConfigurationSearchRequest connectionConfigurationSearchRequest = null; + List response = + api.connectionConfigurationSearch(connectionConfigurationSearchRequest); + // TODO: test validations + } + + /** + * Version: 10.12.0.cl or later Creates an additional configuration to an existing connection to + * a data warehouse. Requires `DATAMANAGEMENT` (**Can manage data**) or + * `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access + * Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, + * the `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) privilege is + * required. #### Usage guidelines * A JSON map of configuration attributes in + * `configuration`. The following example shows the configuration attributes: + * ``` { \"user\":\"DEV_USER\", + * \"password\":\"TestConn123\", \"role\":\"DEV\", + * \"warehouse\":\"DEV_WH\" } ``` * If the + * `policy_type` is `PRINCIPALS`, then `policy_principals` is a + * required field. * If the `policy_type` is `PROCESSES`, then + * `policy_processes` is a required field. * If the `policy_type` is + * `NO_POLICY`, then `policy_principals` and `policy_processes` + * are not required fields. #### Parameterized Connection Support For parameterized connections + * that use OAuth authentication, only the same_as_parent and policy_process_options attributes + * are allowed in the API request. These attributes are not applicable to connections that are + * not parameterized. + * + * @throws ApiException if the Api call fails + */ + @Test + public void createConnectionConfigurationTest() throws ApiException { + CreateConnectionConfigurationRequest createConnectionConfigurationRequest = null; + ConnectionConfigurationResponse response = + api.createConnectionConfiguration(createConnectionConfigurationRequest); + // TODO: test validations + } + + /** + * Version: 10.12.0.cl or later Deletes connection configuration objects. Requires + * `DATAMANAGEMENT` (**Can manage data**) and edit permissions to the connection + * object, or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If + * [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled + * on your instance, the `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit + * Connections**) privilege is required. + * + * @throws ApiException if the Api call fails + */ + @Test + public void deleteConnectionConfigurationTest() throws ApiException { + DeleteConnectionConfigurationRequest deleteConnectionConfigurationRequest = null; + api.deleteConnectionConfiguration(deleteConnectionConfigurationRequest); + // TODO: test validations + } + + /** + * Version: 10.12.0.cl or later Updates a connection configuration object. Requires + * `DATAMANAGEMENT` (**Can manage data**) and edit permissions to the connection + * object, or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If + * [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled + * on your instance, the `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit + * Connections**) privilege is required. #### Supported operations This API endpoint lets you + * perform the following operations in a single API request: * Edit the name or description of + * the configuration * Edit the configuration properties * Edit the `policy_type` * + * Edit the type of authentication * Enable or disable a configuration #### Parameterized + * Connection Support For parameterized oauth based connections, only the + * `same_as_parent` and `policy_process_options` attributes are allowed. + * These attributes are not applicable to connections that are not parameterized. **NOTE**: When + * updating a configuration where `disabled` is `true`, you must reset + * `disabled` to `true` in your update request payload. If not explicitly + * set again, the API will default `disabled` to `false`. + * + * @throws ApiException if the Api call fails + */ + @Test + public void updateConnectionConfigurationTest() throws ApiException { + String configurationIdentifier = null; + UpdateConnectionConfigurationRequest updateConnectionConfigurationRequest = null; + api.updateConnectionConfiguration( + configurationIdentifier, updateConnectionConfigurationRequest); + // TODO: test validations + } +} diff --git a/sdks/java/src/test/java/com/thoughtspot/client/api/ConnectionsApiTest.java b/sdks/java/src/test/java/com/thoughtspot/client/api/ConnectionsApiTest.java new file mode 100644 index 000000000..7a19567ce --- /dev/null +++ b/sdks/java/src/test/java/com/thoughtspot/client/api/ConnectionsApiTest.java @@ -0,0 +1,472 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client.api; + +import com.thoughtspot.client.ApiException; +import com.thoughtspot.client.model.CreateConnectionRequest; +import com.thoughtspot.client.model.CreateConnectionResponse; +import com.thoughtspot.client.model.DeleteConnectionRequest; +import com.thoughtspot.client.model.FetchConnectionDiffStatusResponse; +import com.thoughtspot.client.model.RevokeRefreshTokensRequest; +import com.thoughtspot.client.model.RevokeRefreshTokensResponse; +import com.thoughtspot.client.model.SearchConnectionRequest; +import com.thoughtspot.client.model.SearchConnectionResponse; +import com.thoughtspot.client.model.SyncMetadataRequest; +import com.thoughtspot.client.model.SyncMetadataResponse; +import com.thoughtspot.client.model.UpdateConnectionRequest; +import com.thoughtspot.client.model.UpdateConnectionStatusRequest; +import com.thoughtspot.client.model.UpdateConnectionV2Request; +import java.io.File; +import java.util.List; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; + +/** API tests for ConnectionsApi */ +@Disabled +public class ConnectionsApiTest { + + private final ConnectionsApi api = new ConnectionsApi(); + + /** + * Version: 9.2.0.cl or later Creates a connection to a data warehouse for live query services. + * Requires `DATAMANAGEMENT` (**Can manage data**) or `ADMINISTRATION` + * (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control + * (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the + * `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) privilege is + * required. #### Create a connection without tables To create a connection without tables: 1. + * Pass these parameters in your API request. * Name of the connection. * Type of the data + * warehouse to connect to. * A JSON map of configuration attributes in + * `data_warehouse_config`. The following example shows the configuration attributes + * for a SnowFlake connection: ``` { \"configuration\":{ + * \"accountName\":\"thoughtspot_partner\", + * \"user\":\"tsadmin\", \"password\":\"TestConn123\", + * \"role\":\"sysadmin\", \"warehouse\":\"MEDIUM_WH\" }, + * \"authenticationType\": \"SERVICE_ACCOUNT\", + * \"externalDatabases\":[ ] } ``` 2. Set `validate` to + * `false`. **NOTE:** If the `authentication_type` is anything other than + * SERVICE_ACCOUNT, you must explicitly provide the authenticationType property in the payload. + * If you do not specify authenticationType, the API will default to SERVICE_ACCOUNT as the + * authentication type. #### Create a connection with tables If [Role-Based Access Control + * (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the + * `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) and + * `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` (**Can manage data models**) privilege is + * required. To create a connection with tables: 1. Pass these parameters in your API request. * + * Name of the connection. * Type of the data warehouse to connect to. * A JSON map of + * configuration attributes, database details, and table properties in + * `data_warehouse_config` as shown in the following example: ``` { + * \"configuration\":{ \"accountName\":\"thoughtspot_partner\", + * \"user\":\"tsadmin\", \"password\":\"TestConn123\", + * \"role\":\"sysadmin\", \"warehouse\":\"MEDIUM_WH\" }, + * \"authenticationType\": \"SERVICE_ACCOUNT\", + * \"externalDatabases\":[ { \"name\":\"AllDatatypes\", + * \"isAutoCreated\":false, \"schemas\":[ { + * \"name\":\"alldatatypes\", \"tables\":[ { + * \"name\":\"allDatatypes\", \"type\":\"TABLE\", + * \"description\":\"\", \"selected\":true, + * \"linked\":true, \"columns\":[ { + * \"name\":\"CNUMBER\", \"type\":\"INT64\", + * \"canImport\":true, \"selected\":true, \"isLinkedActive\":true, + * \"isImported\":false, \"tableName\":\"allDatatypes\", + * \"schemaName\":\"alldatatypes\", + * \"dbName\":\"AllDatatypes\" }, { + * \"name\":\"CDECIMAL\", \"type\":\"INT64\", + * \"canImport\":true, \"selected\":true, \"isLinkedActive\":true, + * \"isImported\":false, \"tableName\":\"allDatatypes\", + * \"schemaName\":\"alldatatypes\", + * \"dbName\":\"AllDatatypes\" } ] } ] } ] } ] } ``` 2. Set + * `validate` to `true`. **NOTE:** If the `authentication_type` is + * anything other than SERVICE_ACCOUNT, you must explicitly provide the authenticationType + * property in the payload. If you do not specify authenticationType, the API will default to + * SERVICE_ACCOUNT as the authentication type. + * + * @throws ApiException if the Api call fails + */ + @Test + public void createConnectionTest() throws ApiException { + CreateConnectionRequest createConnectionRequest = null; + CreateConnectionResponse response = api.createConnection(createConnectionRequest); + // TODO: test validations + } + + /** + * Version: 9.2.0.cl or later **Important**: This endpoint is deprecated and will be removed + * from ThoughtSpot in September 2025. ThoughtSpot strongly recommends using the [Delete + * Connection V2](#/http/api-endpoints/connections/delete-connection-v2) endpoint to delete your + * connection objects. #### Usage guidelines Deletes a connection object. Requires + * `DATAMANAGEMENT` (**Can manage data**) and edit permissions to the connection + * object, or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If + * [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled + * on your instance, the `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit + * Connections**) privilege is required. **Note**: If a connection has dependent objects, make + * sure you remove its associations before the delete operation. + * + * @throws ApiException if the Api call fails + */ + @Test + public void deleteConnectionTest() throws ApiException { + DeleteConnectionRequest deleteConnectionRequest = null; + api.deleteConnection(deleteConnectionRequest); + // TODO: test validations + } + + /** + * Version: 10.4.0.cl or later Deletes a connection object. **Note**: If a connection has + * dependent objects, make sure you remove its associations before the delete operation. + * Requires `DATAMANAGEMENT` (**Can manage data**) and edit permissions to the + * connection object, or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. + * If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is + * enabled on your instance, the `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit + * Connections**) privilege is required. + * + * @throws ApiException if the Api call fails + */ + @Test + public void deleteConnectionV2Test() throws ApiException { + String connectionIdentifier = null; + api.deleteConnectionV2(connectionIdentifier); + // TODO: test validations + } + + /** + * Version: 9.9.0.cl or later Exports the difference in connection metadata between CDW and + * ThoughtSpot Requires `DATAMANAGEMENT` (**Can manage data**) privilege. If + * [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled + * on your instance, the following Data control privileges may be required: - + * `CAN_MANAGE_CUSTOM_CALENDAR`(**Can manage custom calendars**) - + * `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) - + * `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` (**Can manage data models**) To download the + * connection metadata difference between ThoughtSpot and CDW, pass the connection GUID as + * `connection_identifier` in the API request. + * + * @throws ApiException if the Api call fails + */ + @Test + public void downloadConnectionMetadataChangesTest() throws ApiException { + String connectionIdentifier = null; + File response = api.downloadConnectionMetadataChanges(connectionIdentifier); + // TODO: test validations + } + + /** + * Version: 9.9.0.cl or later Validates the difference in connection metadata between CDW and + * ThoughtSpot. Requires `DATAMANAGEMENT` (**Can manage data**) privilege. If + * [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled + * on your instance, the following Data control privileges may be required: - + * `CAN_MANAGE_CUSTOM_CALENDAR`(**Can manage custom calendars**) - + * `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) - + * `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` (**Can manage data models**) Returns a boolean + * indicating whether there is any difference between the connection metadata at ThoughtSpot and + * CDW. To get the connection metadata difference status, pass the connection GUID as + * `connection_identifier` in the API request. + * + * @throws ApiException if the Api call fails + */ + @Test + public void fetchConnectionDiffStatusTest() throws ApiException { + String connectionIdentifier = null; + FetchConnectionDiffStatusResponse response = + api.fetchConnectionDiffStatus(connectionIdentifier); + // TODO: test validations + } + + /** + * Version: 26.2.0.cl or later Revokes OAuth refresh tokens for users who no longer require + * access to a data warehouse connection. When a token is revoked, the affected user's + * session for that connection is terminated, and they must re-authenticate to regain access. + * Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) or + * `DATAMANAGEMENT` (**Can manage data**) privileges. If [Role-Based Access Control + * (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on the ThoughtSpot instance, + * users with `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) + * privilege can also make API requests to revoke tokens for connection users. #### Usage + * guidelines You can specify different combinations of identifiers to control which refresh + * tokens are revoked. - **connection_identifier**: Revokes refresh tokens for all users of the + * connection, except the connection author. - **connection_identifier** and + * **user_identifiers**: Revokes refresh tokens only for the users specified in the request. If + * the name or ID of the connection author is included in the request, their token will also be + * revoked. - **connection_identifier** and **configuration_identifiers**: Revokes refresh + * tokens for all users on the specified configurations, except the configuration author. - + * **connection_identifier**, **configuration_identifiers**, and **user_identifiers**: Revokes + * refresh tokens for the specified users on the specified configurations. - + * **connection_identifier** and **org_identifiers**: Revokes refresh tokens for the specified + * Orgs. Applicable only for published connections. - **connection_identifier**, + * **org_identifiers**, and **user_identifiers**: Revokes refresh tokens for the specified users + * in the specified Orgs. Applicable only for published connections. **NOTE**: The + * `org_identifiers` parameter is only applicable for published connections. Using + * this parameter for unpublished connections will result in an error. Ensure that the + * connections are published before making the API request. + * + * @throws ApiException if the Api call fails + */ + @Test + public void revokeRefreshTokensTest() throws ApiException { + String connectionIdentifier = null; + RevokeRefreshTokensRequest revokeRefreshTokensRequest = null; + RevokeRefreshTokensResponse response = + api.revokeRefreshTokens(connectionIdentifier, revokeRefreshTokensRequest); + // TODO: test validations + } + + /** + * Version: 9.2.0.cl or later Gets connection objects. Requires `DATAMANAGEMENT` + * (**Can manage data**) or `ADMINISTRATION` (**Can administer ThoughtSpot**) + * privilege. If [Role-Based Access Control + * (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the + * `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) privilege is + * required. - To get a list of all connections available in the ThoughtSpot system, send the + * API request without any attributes in the request body. - To get the connection objects for a + * specific type of data warehouse, specify the type in `data_warehouse_types`. - To + * fetch details of a connection object, specify the connection object GUID or name. The + * `name_pattern` attribute allows passing partial text with `%` for a + * wildcard match. - To get details of the database, schemas, tables, or columns from a data + * connection object, specify `data_warehouse_object_type`. - To get a specific + * database, schema, table, or column from a connection object, define the object type in + * `data_warehouse_object_type` and object properties in the + * `data_warehouse_objects` array. For example, to search for a column, you must pass + * the database, schema, and table names in the API request. Note that in the following example, + * object properties are set in a hierarchical order (`database` > + * `schema` > `table` > `column`). ``` { + * \"connections\": [ { \"identifier\": + * \"b9d1f2ef-fa65-4a4b-994e-30fa2d57b0c2\", \"data_warehouse_objects\": [ { + * \"database\": \"NEBULADEV\", \"schema\": + * \"INFORMATION_SCHEMA\", \"table\": \"APPLICABLE_ROLES\", + * \"column\": \"ROLE_NAME\" } ] } ], + * \"data_warehouse_object_type\": \"COLUMN\" } ``` - To + * fetch data by `configuration`, specify `data_warehouse_object_type`. For + * example, to fetch columns from the `DEVELOPMENT` database, specify the + * `data_warehouse_object_type` as `DATABASE` and define the + * `configuration` string as + * `{\"database\":\"DEVELOPMENT\"}`. To get column data for a + * specific table, specify the table, for + * example,`{\"database\":\"RETAILAPPAREL\",\"table\":\"PIPES\"}`. + * - To query connections by `authentication_type`, specify + * `data_warehouse_object_type`. Supported values for `authentication_type` + * are: - `SERVICE_ACCOUNT`: For connections that require service account credentials + * to authenticate to the Cloud Data Warehouse and fetch data. - `OAUTH`: For + * connections that require OAuth credentials to authenticate to the Cloud Data Warehouse and + * fetch data. Teradata, Oracle, and Presto Cloud Data Warehouses do not support the OAuth + * authentication type. - `IAM`: For connections that have the IAM OAuth set up. This + * authentication type is supported on Amazon Redshift connections only. - `EXTOAUTH`: + * For connections that have External OAuth set up. ThoughtSpot supports external [OAuth with + * Microsoft Azure Active Directory (AD)](https://docs.thoughtspot.com/cloud/latest/ + * connections-snowflake-azure-ad-oauth) and [Okta for Snowflake data + * connections](https://docs.thoughtspot.com/cloud/latest/connections-snowflake-okta-oauth). - + * `KEY_PAIR`: For connections that require Key Pair account credentials to + * authenticate to the Cloud Data Warehouse and fetch data. This authentication type is + * supported on Snowflake connections only. - `OAUTH_WITH_PKCE`: For connections that + * require OAuth with PKCE account credentials to authenticate to the Cloud Data Warehouse and + * fetch data. This authentication type is supported on Snowflake, Starburst, Databricks, Denodo + * connections only. - `EXTOAUTH_WITH_PKCE`: For connections that require External + * OAuth With PKCE account credentials to authenticate to the Cloud Data Warehouse and fetch + * data. This authentication type is supported on Snowflake connections only. - + * `OAUTH_WITH_PEZ`: For connections that require OAuth With PEZ account credentials + * to authenticate to the Cloud Data Warehouse and fetch data. This authentication type is + * supported on Amazon Redshift connections only. - `OAUTH_WITH_SERVICE_PRINCIPAL`: + * For connections that require OAuth With Service Principal account credentials to authenticate + * to the Cloud Data Warehouse and fetch data. This authentication type is supported on + * Databricks connections only. - `PERSONAL_ACCESS_TOKEN`: For connections that + * require Personal Access Token account credentials to authenticate to the Cloud Data Warehouse + * and fetch data. This authentication type is supported on Databricks connections only. - + * `OAUTH_CLIENT_CREDENTIALS`: For connections that require OAuth Client Credentials + * to authenticate to the Cloud Data Warehouse and fetch data. This authentication type is + * supported on Snowflake connections only. - To include more details about connection objects + * in the API response, set `include_details` to `true`. - You can also sort + * the output by field names and filter connections by tags. **NOTE**: When filtering connection + * records by parameters other than `data_warehouse_types` or + * `tag_identifiers`, ensure that you set `record_size` to `-1` + * and `record_offset` to `0` for precise results. + * + * @throws ApiException if the Api call fails + */ + @Test + public void searchConnectionTest() throws ApiException { + SearchConnectionRequest searchConnectionRequest = null; + List response = api.searchConnection(searchConnectionRequest); + // TODO: test validations + } + + /** + * Version: 26.5.0.cl or later Synchronizes connection metadata attributes from your Cloud Data + * Warehouse (CDW) with ThoughtSpot. Requires the `DATAMANAGEMENT` (**Can manage + * data**) privilege. If [Role-Based Access Control + * (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the + * `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` (**Can manage data models**) privilege is + * required. #### Usage guidelines To synchronize attributes from a CDW, specify the connection + * GUID or name in the `connection_identifier` path parameter and + * `sync_attributes` in the request body. Default attribute is + * `[\"DESCRIPTION\"]`. ##### Hierarchical schema * Connection: The + * connection object for the sync operation. * Tables: Tables for the sync operation. When no + * table is specified, all tables are synchronized. * Columns: If the table is specified, you + * can add the columns for the sync operation. If no columns are specified, all columns in the + * specified table are considered for the sync operation. To set the scope for the sync + * operation: * Connection-level: To sync all tables and columns, pass an empty request body, or + * only the attributes in the request body. * Table-level: To synchronize specific tables and + * their columns, specify the table identifiers in the `tables` array. * Column-level: + * To synchronize specific columns, specify the table identifier as the key and column + * identifiers as the value in the `tables` array. ``` { + * \"tables\": [ {\"table-guid-1\": [\"column-guid-1\", + * \"column-guid-2\"]}, \"table-guid-2\" ], \"sync_attributes\": + * [\"DESCRIPTION\"] } ``` ##### API response If the sync operation is + * successful, the API returns the following information: * Status of the sync operation. For + * example, `SUCCESS`, `PARTIAL_SUCCESS`, or `NO_UPDATE`. * Number + * of tables and columns that were updated. * Number of tables and columns with the sync failed + * status when the overall sync status is `PARTIAL_SUCCESS`. * Message text indicating + * the sync results. + * + * @throws ApiException if the Api call fails + */ + @Test + public void syncMetadataTest() throws ApiException { + String connectionIdentifier = null; + SyncMetadataRequest syncMetadataRequest = null; + SyncMetadataResponse response = api.syncMetadata(connectionIdentifier, syncMetadataRequest); + // TODO: test validations + } + + /** + * Version: 9.2.0.cl or later **Important**: This endpoint is deprecated and will be removed + * from ThoughtSpot in September 2025. ThoughtSpot strongly recommends using the [Update + * connection V2](#/http/api-endpoints/connections/update-connection-v2) endpoint to update your + * connection objects. #### Usage guidelines Updates a connection object. Requires + * `DATAMANAGEMENT` (**Can manage data**) and edit permissions to the connection + * object, or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If + * [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled + * on your instance, the `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit + * Connections**) privilege is required. To update a connection object, pass these parameters in + * your API request: 1. GUID of the connection object. 2. If you are updating tables or database + * schema of a connection object: a. Add the updated JSON map of metadata with database, schema, + * and tables in `data_warehouse_config`. b. Set `validate` to + * `true`. 3. If you are updating a configuration attribute, connection name, or + * description, you can set `validate` to `false`. + * + * @throws ApiException if the Api call fails + */ + @Test + public void updateConnectionTest() throws ApiException { + UpdateConnectionRequest updateConnectionRequest = null; + api.updateConnection(updateConnectionRequest); + // TODO: test validations + } + + /** + * Version: 26.6.0.cl or later Activates or deactivates a connection. A deactivated connection + * cannot be used for queries or operations until it is activated again. Requires + * `DATAMANAGEMENT` (**Can manage data**) privilege. If [Role-Based Access Control + * (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the + * `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) privilege is + * required. Only the connection owner or an administrator can perform this operation. #### + * Usage guidelines To update the status of a connection, specify the connection GUID or name in + * the `connection_identifier` path parameter and the desired `status` in + * the request body. - **ACTIVATED**: Enables the connection. Queries and operations can resume + * on an activated connection. - **DEACTIVATED**: Disables the connection. It does not remove + * the connection metadata, but only makes the connection unavailable for queries and + * operations. You can reactivate a deactivated connection by setting \"status\": + * \"ACTIVATED\". + * + * @throws ApiException if the Api call fails + */ + @Test + public void updateConnectionStatusTest() throws ApiException { + String connectionIdentifier = null; + UpdateConnectionStatusRequest updateConnectionStatusRequest = null; + api.updateConnectionStatus(connectionIdentifier, updateConnectionStatusRequest); + // TODO: test validations + } + + /** + * Version: 10.4.0.cl or later Updates a connection object. Requires `DATAMANAGEMENT` + * (**Can manage data**) and edit permissions to the connection object, or + * `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access + * Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, + * the `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) privilege is + * required. To update a connection object, pass these parameters in your API request: 1. GUID + * of the connection object. 2. If you are updating tables or database schema of a connection + * object: a. Add the updated JSON map of metadata with database, schema, and tables in + * `data_warehouse_config`. b. Set `validate` to `true`. **NOTE:** + * If the `authentication_type` is anything other than SERVICE_ACCOUNT, you must + * explicitly provide the authenticationType property in the payload. If you do not specify + * authenticationType, the API will default to SERVICE_ACCOUNT as the authentication type. * A + * JSON map of configuration attributes, database details, and table properties in + * `data_warehouse_config` as shown in the following example: * This is an example of + * updating a single table in a empty connection: ``` { + * \"authenticationType\": \"SERVICE_ACCOUNT\", + * \"externalDatabases\": [ { \"name\": \"DEVELOPMENT\", + * \"isAutoCreated\": false, \"schemas\": [ { \"name\": + * \"TS_dataset\", \"tables\": [ { \"name\": + * \"DEMORENAME\", \"type\": \"TABLE\", \"description\": + * \"\", \"selected\": true, \"linked\": true, \"gid\": + * 0, \"datasetId\": \"-1\", \"subType\": \"\", + * \"reportId\": \"\", \"viewId\": \"\", + * \"columns\": [ { \"name\": \"Col1\", \"type\": + * \"VARCHAR\", \"canImport\": true, \"selected\": true, + * \"description\": \"\", \"isLinkedActive\": true, + * \"isAggregate\": false }, { \"name\": \"Col2\", + * \"type\": \"VARCHAR\", \"canImport\": true, + * \"selected\": true, \"description\": \"\", + * \"isLinkedActive\": true, \"isAggregate\": false }, { \"name\": + * \"Col3\", \"type\": \"VARCHAR\", \"canImport\": true, + * \"selected\": true, \"description\": \"\", + * \"isLinkedActive\": true, \"isAggregate\": false }, { \"name\": + * \"Col312\", \"type\": \"VARCHAR\", \"canImport\": + * true, \"selected\": true, \"description\": \"\", + * \"isLinkedActive\": true, \"isAggregate\": false }, { \"name\": + * \"Col4\", \"type\": \"VARCHAR\", \"canImport\": true, + * \"selected\": true, \"description\": \"\", + * \"isLinkedActive\": true, \"isAggregate\": false } ], + * \"relationships\": [] } ] } ] } ], \"configuration\": { + * \"password\": \"\", \"database\": \"DEVELOPMENT\", + * \"role\": \"DEV\", \"accountName\": + * \"thoughtspot_partner\", \"warehouse\": \"DEMO_WH\", + * \"user\": \"DEV_USER\" } } ``` * This is an example of + * updating a single table in an existing connection with tables: ``` { + * \"authenticationType\": \"SERVICE_ACCOUNT\", + * \"externalDatabases\": [ { \"name\": \"DEVELOPMENT\", + * \"isAutoCreated\": false, \"schemas\": [ { \"name\": + * \"TS_dataset\", \"tables\": [ { \"name\": + * \"CUSTOMER\", \"type\": \"TABLE\", \"description\": + * \"\", \"selected\": true, \"linked\": true, \"gid\": + * 0, \"datasetId\": \"-1\", \"subType\": \"\", + * \"reportId\": \"\", \"viewId\": \"\", + * \"columns\": [], \"relationships\": [] }, { \"name\": + * \"tpch5k_falcon_default_schema_users\", \"type\": \"TABLE\", + * \"description\": \"\", \"selected\": true, + * \"linked\": true, \"gid\": 0, \"datasetId\": \"-1\", + * \"subType\": \"\", \"reportId\": \"\", + * \"viewId\": \"\", \"columns\": [ { \"name\": + * \"user_id\", \"type\": \"INT64\", \"canImport\": + * true, \"selected\": true, \"description\": \"\", + * \"isLinkedActive\": true, \"isAggregate\": false }, { \"name\": + * \"product_id\", \"type\": \"INT64\", \"canImport\": + * true, \"selected\": true, \"description\": \"\", + * \"isLinkedActive\": true, \"isAggregate\": false }, { \"name\": + * \"user_cost\", \"type\": \"INT64\", \"canImport\": + * true, \"selected\": true, \"description\": \"\", + * \"isLinkedActive\": true, \"isAggregate\": false } ], + * \"relationships\": [] } ] } ] } ], \"configuration\": { + * \"password\": \"\", \"database\": \"DEVELOPMENT\", + * \"role\": \"DEV\", \"accountName\": + * \"thoughtspot_partner\", \"warehouse\": \"DEMO_WH\", + * \"user\": \"DEV_USER\" } } ``` 3. If you are updating a + * configuration attribute, connection name, or description, you can set `validate` to + * `false`. **NOTE:** If the `authentication_type` is anything other than + * SERVICE_ACCOUNT, you must explicitly provide the authenticationType property in the payload. + * If you do not specify authenticationType, the API will default to SERVICE_ACCOUNT as the + * authentication type. * A JSON map of configuration attributes in + * `data_warehouse_config`. The following example shows the configuration attributes + * for a Snowflake connection: ``` { \"configuration\":{ + * \"accountName\":\"thoughtspot_partner\", + * \"user\":\"tsadmin\", \"password\":\"TestConn123\", + * \"role\":\"sysadmin\", \"warehouse\":\"MEDIUM_WH\" }, + * \"externalDatabases\":[ ] } ``` + * + * @throws ApiException if the Api call fails + */ + @Test + public void updateConnectionV2Test() throws ApiException { + String connectionIdentifier = null; + UpdateConnectionV2Request updateConnectionV2Request = null; + api.updateConnectionV2(connectionIdentifier, updateConnectionV2Request); + // TODO: test validations + } +} diff --git a/sdks/java/src/test/java/com/thoughtspot/client/api/CustomActionApiTest.java b/sdks/java/src/test/java/com/thoughtspot/client/api/CustomActionApiTest.java new file mode 100644 index 000000000..63a0ece58 --- /dev/null +++ b/sdks/java/src/test/java/com/thoughtspot/client/api/CustomActionApiTest.java @@ -0,0 +1,101 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client.api; + +import com.thoughtspot.client.ApiException; +import com.thoughtspot.client.model.CreateCustomActionRequest; +import com.thoughtspot.client.model.ResponseCustomAction; +import com.thoughtspot.client.model.SearchCustomActionsRequest; +import com.thoughtspot.client.model.UpdateCustomActionRequest; +import java.util.List; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; + +/** API tests for CustomActionApi */ +@Disabled +public class CustomActionApiTest { + + private final CustomActionApi api = new CustomActionApi(); + + /** + * Version: 9.6.0.cl or later Creates a custom action that appears as a menu action on a saved + * Answer or Liveboard visualization. Requires `DEVELOPER` (**Has Developer + * privilege**) or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If + * [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled + * on your instance, the `DEVELOPER` (**Has developer privilege**) privilege is + * required. #### Usage Guidelines The API lets you create the following types of custom + * actions: * URL-based action Allows pushing data to an external URL. * Callback action + * Triggers a callback to the host application and initiates a response payload on an embedded + * ThoughtSpot instance. By default, custom actions are visible to only administrator or + * developer users. To make a custom action available to other users, and specify the groups in + * `group_identifiers`. By default, the custom action is set as a _global_ action on + * all visualizations and saved Answers. To assign a custom action to specific Liveboard + * visualization, saved Answer, or Worksheet, set `visibility` to `false` in + * `default_action_config` property and specify the GUID or name of the object in + * `associate_metadata`. For more information, see [Custom + * actions](https://developers.thoughtspot.com/docs/custom-action-intro). + * + * @throws ApiException if the Api call fails + */ + @Test + public void createCustomActionTest() throws ApiException { + CreateCustomActionRequest createCustomActionRequest = null; + ResponseCustomAction response = api.createCustomAction(createCustomActionRequest); + // TODO: test validations + } + + /** + * Version: 9.6.0.cl or later Removes the custom action specified in the API request. Requires + * `DEVELOPER` (**Has Developer privilege**) or `ADMINISTRATION` (**Can + * administer ThoughtSpot**) privilege. If [Role-Based Access Control + * (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the + * `DEVELOPER` (**Has developer privilege**) privilege is required. + * + * @throws ApiException if the Api call fails + */ + @Test + public void deleteCustomActionTest() throws ApiException { + String customActionIdentifier = null; + api.deleteCustomAction(customActionIdentifier); + // TODO: test validations + } + + /** + * Version: 9.6.0.cl or later Gets custom actions configured on the cluster. Requires + * `DEVELOPER` (**Has Developer privilege**) or `ADMINISTRATION` (**Can + * administer ThoughtSpot**) privilege. If [Role-Based Access Control + * (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the + * `DEVELOPER` (**Has developer privilege**) privilege is required. + * + * @throws ApiException if the Api call fails + */ + @Test + public void searchCustomActionsTest() throws ApiException { + SearchCustomActionsRequest searchCustomActionsRequest = null; + List response = api.searchCustomActions(searchCustomActionsRequest); + // TODO: test validations + } + + /** + * Version: 9.6.0.cl or later Updates a custom action. Requires `DEVELOPER` (**Has + * Developer privilege**) or `ADMINISTRATION` (**Can administer ThoughtSpot**) + * privilege. If [Role-Based Access Control + * (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the + * `DEVELOPER` (**Has developer privilege**) privilege is required. #### Usage + * Guidelines The API allows you to modify the following properties: * Name of the custom action + * * Action availability to groups * Association to metadata objects * Authentication settings + * for a URL-based action For more information, see [Custom + * actions](https://developers.thoughtspot.com/docs/custom-action-intro). + * + * @throws ApiException if the Api call fails + */ + @Test + public void updateCustomActionTest() throws ApiException { + String customActionIdentifier = null; + UpdateCustomActionRequest updateCustomActionRequest = null; + api.updateCustomAction(customActionIdentifier, updateCustomActionRequest); + // TODO: test validations + } +} diff --git a/sdks/java/src/test/java/com/thoughtspot/client/api/CustomCalendarsApiTest.java b/sdks/java/src/test/java/com/thoughtspot/client/api/CustomCalendarsApiTest.java new file mode 100644 index 000000000..515e792a6 --- /dev/null +++ b/sdks/java/src/test/java/com/thoughtspot/client/api/CustomCalendarsApiTest.java @@ -0,0 +1,195 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client.api; + +import com.thoughtspot.client.ApiException; +import com.thoughtspot.client.model.CalendarResponse; +import com.thoughtspot.client.model.CreateCalendarRequest; +import com.thoughtspot.client.model.GenerateCSVRequest; +import com.thoughtspot.client.model.SearchCalendarsRequest; +import com.thoughtspot.client.model.UpdateCalendarRequest; +import java.util.List; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; + +/** API tests for CustomCalendarsApi */ +@Disabled +public class CustomCalendarsApiTest { + + private final CustomCalendarsApi api = new CustomCalendarsApi(); + + /** + * Version: 10.12.0.cl or later Creates a new [custom + * calendar](https://docs.thoughtspot.com/cloud/latest/connections-cust-cal). Requires + * `DATAMANAGEMENT` (**Can manage data**) or `ADMINISTRATION` (**Can + * administer ThoughtSpot**) privilege. If [Role-Based Access Control + * (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your ThoughtSpot + * instance, the `CAN_MANAGE_CUSTOM_CALENDAR` (**Can manage custom calendars**) + * privilege is required. #### Usage guidelines You can create a custom calendar from scratch or + * an existing Table in ThoughtSpot. For both methods of calendar creation, the following + * parameters are required: * Name of the custom calendar. * Calendar creation method. To create + * a calendar from an existing table, specify the method: - `FROM_EXISTING_TABLE` - + * Creates calendar from the table reference provided in the API request. - + * `FROM_INPUT_PARAMS` - Creates a calendar from the parameters defined in the API + * request. * Connection ID and Table name * Database and schema name attributes: For most Cloud + * Data Warehouse (CDW) connectors, both `database_name` and `schema_name` + * attributes are required. However, the attribute requirements are conditional and vary based + * on the connector type and its metadata structure. For example, for connectors such as + * Teradata, MySQL, SingleSore, Amazon Aurora MySQL, Amazon RDS MySQL, Oracle, and GCP_MYSQL, + * the `schema_name` is required, whereas the `database_name` attribute is + * not. Similarly, connectors such as ClickHouse require you to specify the + * `database_name` and the schema specification in such cases is optional. **NOTE**: + * If you are creating a calendar from an existing table, ensure that the referenced table + * matches the required DDL for custom calendars. If the schema does not match, the API returns + * an error. ##### Calendar type The API allows you to create the following types of calendars: + * * `MONTH_OFFSET`. The default calendar type. A `MONTH_OFFSET` calendar is + * offset by a few months from the standard calendar months (January to December) and the year + * begins with the month defined in the request. For example, if the `month_offset` + * value is set as `April`, the calendar year begins in April. * `4-4-5`. + * Each quarter in the calendar will include two 4-week months followed by one 5-week month. * + * `4-5-4`. Each quarter in the calendar will include two 4-week months with a 5-week + * month between. * `5-4-4`. Each quarter begins with a 5-week month, followed by two + * 4-week months. To start and end the calendar on a specific date, specify the dates in the + * `MM/DD/YYYY` format. For `MONTH_OFFSET` calendars, ensure that the + * `start_date` matches the month specified in the `month_offset` attribute. + * You can also set the starting day of the week and customize the prefixes for year and quarter + * labels. #### Examples To create a calendar from an existing table: ``` { + * \"name\": \"MyCustomCalendar1\", \"table_reference\": { + * \"connection_identifier\": \"4db8ea22-2ff4-4224-b05a-26674717e468\", + * \"table_name\": \"MyCalendarTable\", \"database_name\": + * \"RETAILAPPAREL\", \"schema_name\": \"PUBLIC\" }, + * \"creation_method\": \"FROM_EXISTING_TABLE\", } ``` To + * create a calendar from scratch: ``` { \"name\": + * \"MyCustomCalendar1\", \"table_reference\": { + * \"connection_identifier\": \"4db8ea22-2ff4-4224-b05a-26674717e468\", + * \"table_name\": \"MyCalendarTable\", \"database_name\": + * \"RETAILAPPAREL\", \"schema_name\": \"PUBLIC\" }, + * \"creation_method\": \"FROM_INPUT_PARAMS\", \"calendar_type\": + * \"MONTH_OFFSET\", \"month_offset\": \"April\", + * \"start_day_of_week\": \"Monday\", \"quarter_name_prefix\": + * \"Q\", \"year_name_prefix\": \"FY\", \"start_date\": + * \"04/01/2025\", \"end_date\": \"04/31/2025\" } + * ``` + * + * @throws ApiException if the Api call fails + */ + @Test + public void createCalendarTest() throws ApiException { + CreateCalendarRequest createCalendarRequest = null; + CalendarResponse response = api.createCalendar(createCalendarRequest); + // TODO: test validations + } + + /** + * Version: 10.12.0.cl or later Deletes a [custom + * calendar](https://docs.thoughtspot.com/cloud/latest/connections-cust-cal). Requires + * `DATAMANAGEMENT` (**Can manage data**) or `ADMINISTRATION` (**Can + * administer ThoughtSpot**) privilege. If [Role-Based Access Control + * (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your ThoughtSpot + * instance, the `CAN_MANAGE_CUSTOM_CALENDAR` (**Can manage custom calendars**) + * privilege is required. #### Usage guidelines To delete a custom calendar, specify the + * calendar ID as a path parameter in the request URL. + * + * @throws ApiException if the Api call fails + */ + @Test + public void deleteCalendarTest() throws ApiException { + String calendarIdentifier = null; + api.deleteCalendar(calendarIdentifier); + // TODO: test validations + } + + /** + * Version: 10.12.0.cl or later Exports a [custom + * calendar](https://docs.thoughtspot.com/cloud/latest/connections-cust-cal) in the CSV format. + * Requires `DATAMANAGEMENT` (**Can manage data**) or `ADMINISTRATION` + * (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control + * (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your ThoughtSpot + * instance, the `CAN_MANAGE_CUSTOM_CALENDAR` (**Can manage custom calendars**) + * privilege is required. #### Usage guidelines Use this API to download a custom calendar in + * the CSV file format. In your API request, specify the following parameters. * Start and end + * date of the calendar. For \"month offset\" calendars, the start date must match the + * month defined in the `month_offset` attribute. You can also specify optional + * parameters such as the starting day of the week and prefixes for the quarter and year labels. + * + * @throws ApiException if the Api call fails + */ + @Test + public void generateCSVTest() throws ApiException { + GenerateCSVRequest generateCSVRequest = null; + Object response = api.generateCSV(generateCSVRequest); + // TODO: test validations + } + + /** + * Version: 10.12.0.cl or later Gets a list of [custom + * calendars](https://docs.thoughtspot.com/cloud/latest/connections-cust-cal). Requires + * `DATAMANAGEMENT` (**Can manage data**) or `ADMINISTRATION` (**Can + * administer ThoughtSpot**) privilege. If [Role-Based Access Control + * (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your ThoughtSpot + * instance, the `CAN_MANAGE_CUSTOM_CALENDAR` (**Can manage custom calendars**) + * privilege is required. #### Usage guidelines By default, the API returns a list of custom + * calendars for all connection objects. To retrieve custom calendar details for a particular + * connection, specify the connection ID. You can also use other search parameters such as + * `name_pattern` and `sort_options` as search filters. The + * `name_pattern` parameter filters and returns only those objects that match the + * specified pattern. Use `%` as a wildcard for pattern matching. + * + * @throws ApiException if the Api call fails + */ + @Test + public void searchCalendarsTest() throws ApiException { + SearchCalendarsRequest searchCalendarsRequest = null; + List response = api.searchCalendars(searchCalendarsRequest); + // TODO: test validations + } + + /** + * Version: 10.12.0.cl or later Updates the properties of a [custom + * calendar](https://docs.thoughtspot.com/cloud/latest/connections-cust-cal). Requires + * `DATAMANAGEMENT` (**Can manage data**) or `ADMINISTRATION` (**Can + * administer ThoughtSpot**) privilege. If [Role-Based Access Control + * (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your ThoughtSpot + * instance, the `CAN_MANAGE_CUSTOM_CALENDAR` (**Can manage custom calendars**) + * privilege is required. #### Usage guidelines You can update the properties of a calendar + * using one of the following methods: * `FROM_INPUT_PARAMS` to update the calendar + * properties with the values defined in the API request. * `FROM_EXISTING_TABLE` + * Creates a calendar from the parameters defined in the API request. To update a custom + * calendar, specify the calendar ID as a path parameter in the request URL and the following + * parameters in the request body: * Connection ID and Table name * Database and schema name + * attributes: For most Cloud Data Warehouse (CDW) connectors, both `database_name` + * and `schema_name` attributes are required. However, the attribute requirements are + * conditional and vary based on the connector type and its metadata structure. For example, for + * connectors such as Teradata, MySQL, SingleSore, Amazon Aurora MySQL, Amazon RDS MySQL, + * Oracle, and GCP_MYSQL, the `schema_name` is required, whereas the + * `database_name` attribute is not. Similarly, connectors such as ClickHouse require + * you to specify the `database_name` and the schema specification in such cases is + * optional. The API allows you to modify the calendar type, month offset value, start and end + * date, starting day of the week, and prefixes assigned to the year and quarter labels. #### + * Examples Update a custom calendar using an existing Table in ThoughtSpot: ``` + * { \"update_method\": \"FROM_EXISTING_TABLE\", + * \"table_reference\": { \"connection_identifier\": + * \"Connection1\", \"database_name\": \"db1\", + * \"table_name\": \"custom_calendar_2025\", \"schame_name\": + * \"schemaVar\" } } ``` Update a custom calendar with the attributes + * defined in the API request: ``` { \"update_method\": + * \"FROM_INPUT_PARAMS\", \"table_reference\": { + * \"connection_identifier\": \"Connection1\", \"database_name\": + * \"db1\", \"table_name\": \"custom_calendar_2025\", + * \"schame_name\": \"schemaVar\" }, \"month_offset\": + * \"August\", \"start_day_of_week\": \"Monday\", + * \"start_date\": \"08/01/2025\", \"end_date\": + * \"07/31/2026\" } ``` + * + * @throws ApiException if the Api call fails + */ + @Test + public void updateCalendarTest() throws ApiException { + String calendarIdentifier = null; + UpdateCalendarRequest updateCalendarRequest = null; + api.updateCalendar(calendarIdentifier, updateCalendarRequest); + // TODO: test validations + } +} diff --git a/sdks/java/src/test/java/com/thoughtspot/client/api/DataApiTest.java b/sdks/java/src/test/java/com/thoughtspot/client/api/DataApiTest.java new file mode 100644 index 000000000..79ff0e7ee --- /dev/null +++ b/sdks/java/src/test/java/com/thoughtspot/client/api/DataApiTest.java @@ -0,0 +1,85 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client.api; + +import com.thoughtspot.client.ApiException; +import com.thoughtspot.client.model.AnswerDataResponse; +import com.thoughtspot.client.model.FetchAnswerDataRequest; +import com.thoughtspot.client.model.FetchLiveboardDataRequest; +import com.thoughtspot.client.model.LiveboardDataResponse; +import com.thoughtspot.client.model.SearchDataRequest; +import com.thoughtspot.client.model.SearchDataResponse; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; + +/** API tests for DataApi */ +@Disabled +public class DataApiTest { + + private final DataApi api = new DataApi(); + + /** + * Version: 9.0.0.cl or later Fetches data from a saved Answer. Requires at least view access to + * the saved Answer. The `record_size` attribute determines the number of records to + * retrieve in an API call. For more information about pagination, record size, and maximum row + * limit, see [Pagination and record size + * settings](https://developers.thoughtspot.com/docs/fetch-data-and-report-apis#_pagination_settings_for_data_and_report_apis). + * + * @throws ApiException if the Api call fails + */ + @Test + public void fetchAnswerDataTest() throws ApiException { + FetchAnswerDataRequest fetchAnswerDataRequest = null; + AnswerDataResponse response = api.fetchAnswerData(fetchAnswerDataRequest); + // TODO: test validations + } + + /** + * Version: 9.0.0.cl or later Gets data from a Liveboard object and its visualization. Requires + * at least view access to the Liveboard. #### Usage guidelines In the request body, specify the + * GUID or name of the Liveboard. To get data for specific visualizations, add the GUIDs or + * names of the visualizations in the API request. To include unsaved changes in the report, + * pass the `transient_pinboard_content` script generated from the + * `getExportRequestForCurrentPinboard` method in the Visual Embed SDK. Upon + * successful execution, the API returns the report with unsaved changes. If the new Liveboard + * experience mode, the transient content includes ad hoc changes to visualizations such as + * sorting, toggling of legends, and data drill down. For more information, and see [Liveboard + * data + * API](https://developers.thoughtspot.com/docs/fetch-data-and-report-apis#_fetch_liveboard_data_api). + * + * @throws ApiException if the Api call fails + */ + @Test + public void fetchLiveboardDataTest() throws ApiException { + FetchLiveboardDataRequest fetchLiveboardDataRequest = null; + LiveboardDataResponse response = api.fetchLiveboardData(fetchLiveboardDataRequest); + // TODO: test validations + } + + /** + * Version: 9.0.0.cl or later Generates an Answer from a given data source. Requires at least + * view access to the data source object (Worksheet or View). #### Usage guidelines To search + * data, specify the data source GUID in `logical_table_identifier`. The data source + * can be a Worksheet, View, Table, or SQL view. Pass search tokens in the + * `query_string` attribute in the API request as shown in the following example: + * ``` { \"query_string\": \"[sales] by [store]\", + * \"logical_table_identifier\": \"cd252e5c-b552-49a8-821d-3eadaa049cca\", } + * ``` For more information about the `query_string` format and data + * source attribute, see [Search data + * API](https://developers.thoughtspot.com/docs/fetch-data-and-report-apis#_search_data_api). + * The `record_size` attribute determines the number of records to retrieve in an API + * call. For more information about pagination, record size, and maximum row limit, see + * [Pagination and record size + * settings](https://developers.thoughtspot.com/docs/fetch-data-and-report-apis#_pagination_settings_for_data_and_report_api). + * + * @throws ApiException if the Api call fails + */ + @Test + public void searchDataTest() throws ApiException { + SearchDataRequest searchDataRequest = null; + SearchDataResponse response = api.searchData(searchDataRequest); + // TODO: test validations + } +} diff --git a/sdks/java/src/test/java/com/thoughtspot/client/api/DbtApiTest.java b/sdks/java/src/test/java/com/thoughtspot/client/api/DbtApiTest.java new file mode 100644 index 000000000..becca5066 --- /dev/null +++ b/sdks/java/src/test/java/com/thoughtspot/client/api/DbtApiTest.java @@ -0,0 +1,203 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client.api; + +import com.thoughtspot.client.ApiException; +import com.thoughtspot.client.model.DbtSearchResponse; +import java.io.File; +import java.util.List; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; + +/** API tests for DbtApi */ +@Disabled +public class DbtApiTest { + + private final DbtApi api = new DbtApi(); + + /** + * Version: 9.9.0.cl or later Creates a DBT connection object in ThoughtSpot. Requires + * `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege or + * `DATAMANAGEMENT` (**Can manage data**) privilege. If [Role-Based Access Control + * (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the + * following Data control privileges may be required: - + * `CAN_MANAGE_CUSTOM_CALENDAR`(**Can manage custom calendars**) - + * `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) - + * `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` (**Can manage data models**) #### About create + * DBT connection DBT connection in ThoughtSpot is used by the user to define DBT credentials + * for cloud . The API needs embrace connection, embrace database name, DBT url, import type, + * DBT account identifier, DBT project identifier, DBT access token and environment details (or) + * embrace connection, embrace database name, import type, file_content to create a connection + * object. To know more about DBT, see ThoughtSpot Product Documentation. + * + * @throws ApiException if the Api call fails + */ + @Test + public void dbtConnectionTest() throws ApiException { + String connectionName = null; + String databaseName = null; + String importType = null; + String accessToken = null; + String dbtUrl = null; + String accountId = null; + String projectId = null; + String dbtEnvId = null; + String projectName = null; + File fileContent = null; + Object response = + api.dbtConnection( + connectionName, + databaseName, + importType, + accessToken, + dbtUrl, + accountId, + projectId, + dbtEnvId, + projectName, + fileContent); + // TODO: test validations + } + + /** + * Version: 9.9.0.cl or later Resynchronize the existing list of models, tables, worksheet tml’s + * and import them to Thoughtspot based on the DBT connection object. Requires + * `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege or + * `DATAMANAGEMENT` (**Can manage data**) privilege, along with an existing DBT + * connection. If [Role-Based Access Control + * (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the + * following data control privileges may be required: - + * `CAN_MANAGE_CUSTOM_CALENDAR`(**Can manage custom calendars**) - + * `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) - + * `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` (**Can manage data models**) + * + * @throws ApiException if the Api call fails + */ + @Test + public void dbtGenerateSyncTmlTest() throws ApiException { + String dbtConnectionIdentifier = null; + File fileContent = null; + Object response = api.dbtGenerateSyncTml(dbtConnectionIdentifier, fileContent); + // TODO: test validations + } + + /** + * Version: 9.9.0.cl or later Generate required table and worksheet and import them. Requires + * `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege or + * `DATAMANAGEMENT` (**Can manage data**) privilege, along with an existing DBT + * connection. If [Role-Based Access Control + * (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the + * following data control privileges may be required: - + * `CAN_MANAGE_CUSTOM_CALENDAR`(**Can manage custom calendars**) - + * `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) - + * `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` (**Can manage data models**) #### About + * generate TML Models and Worksheets to be imported can be selected by the user as part of the + * API. + * + * @throws ApiException if the Api call fails + */ + @Test + public void dbtGenerateTmlTest() throws ApiException { + String dbtConnectionIdentifier = null; + String modelTables = null; + String importWorksheets = null; + String worksheets = null; + File fileContent = null; + Object response = + api.dbtGenerateTml( + dbtConnectionIdentifier, + modelTables, + importWorksheets, + worksheets, + fileContent); + // TODO: test validations + } + + /** + * Version: 9.9.0.cl or later Gets a list of DBT connection objects by user and organization, + * available on the ThoughtSpot system. Requires `ADMINISTRATION` (**Can administer + * ThoughtSpot**) privilege or `DATAMANAGEMENT` (**Can manage data**) privilege. If + * [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled + * on your instance, the following Data control privileges may be required: - + * `CAN_MANAGE_CUSTOM_CALENDAR`(**Can manage custom calendars**) - + * `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) - + * `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` (**Can manage data models**) #### About search + * DBT connection To get details of a specific DBT connection identifier, database connection + * identifier, database connection name, database name, project name, project identifier, + * environment identifier , import type and author. + * + * @throws ApiException if the Api call fails + */ + @Test + public void dbtSearchTest() throws ApiException { + List response = api.dbtSearch(); + // TODO: test validations + } + + /** + * Version: 9.9.0.cl or later Removes the specified DBT connection object from the ThoughtSpot + * system. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) or + * `DATAMANAGEMENT` (**Can manage data ThoughtSpot**) privilege. If [Role-Based Access + * Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, + * the following Data control privileges may be required: - + * `CAN_MANAGE_CUSTOM_CALENDAR`(**Can manage custom calendars**) - + * `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) - + * `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` (**Can manage data models**) + * + * @throws ApiException if the Api call fails + */ + @Test + public void deleteDbtConnectionTest() throws ApiException { + String dbtConnectionIdentifier = null; + api.deleteDbtConnection(dbtConnectionIdentifier); + // TODO: test validations + } + + /** + * Version: 9.9.0.cl or later Updates a DBT connection object. Requires + * `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege or + * `DATAMANAGEMENT` (**Can manage data ThoughtSpot**) privilege, along with an + * existing DBT connection. If [Role-Based Access Control + * (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the + * following data control privileges may be required: - + * `CAN_MANAGE_CUSTOM_CALENDAR`(**Can manage custom calendars**) - + * `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) - + * `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` (**Can manage data models**) #### About update + * DBT connection You can modify DBT connection object properties such as embrace connection + * name, embrace database name, import type, account identifier, access token, project + * identifier and environment (or) embrace connection, embrace database name, import type, + * file_content settings. + * + * @throws ApiException if the Api call fails + */ + @Test + public void updateDbtConnectionTest() throws ApiException { + String dbtConnectionIdentifier = null; + String connectionName = null; + String databaseName = null; + String importType = null; + String accessToken = null; + String dbtUrl = null; + String accountId = null; + String projectId = null; + String dbtEnvId = null; + String projectName = null; + File fileContent = null; + Object response = + api.updateDbtConnection( + dbtConnectionIdentifier, + connectionName, + databaseName, + importType, + accessToken, + dbtUrl, + accountId, + projectId, + dbtEnvId, + projectName, + fileContent); + // TODO: test validations + } +} diff --git a/sdks/java/src/test/java/com/thoughtspot/client/api/EmailCustomizationApiTest.java b/sdks/java/src/test/java/com/thoughtspot/client/api/EmailCustomizationApiTest.java new file mode 100644 index 000000000..8c2ff3bc3 --- /dev/null +++ b/sdks/java/src/test/java/com/thoughtspot/client/api/EmailCustomizationApiTest.java @@ -0,0 +1,178 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client.api; + +import com.thoughtspot.client.ApiException; +import com.thoughtspot.client.model.CreateEmailCustomizationRequest; +import com.thoughtspot.client.model.CreateEmailCustomizationResponse; +import com.thoughtspot.client.model.DeleteOrgEmailCustomizationRequest; +import com.thoughtspot.client.model.SearchEmailCustomizationRequest; +import com.thoughtspot.client.model.UpdateEmailCustomizationRequest; +import java.util.List; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; + +/** API tests for EmailCustomizationApi */ +@Disabled +public class EmailCustomizationApiTest { + + private final EmailCustomizationApi api = new EmailCustomizationApi(); + + /** + * Version: 10.10.0.cl or later Creates a customization configuration for the notification + * email. #### Pre-requisites Requires `DEVELOPER` (**has developer privilege**) or + * `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access + * Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, + * the `DEVELOPER` (**Has developer privilege**) privilege is required. **NOTE**:This + * endpoint in currently in beta. Contact ThoughtSpot support to enable this on your instance. + * #### Usage guidelines To create a custom configuration pass these parameters in your API + * request: - A JSON map of configuration attributes `template_properties`. The + * following example shows a sample set of customization configuration: ``` { { + * \"cta_button_bg_color\": \"#444DEA\", \"cta_text_font_color\": + * \"#FFFFFF\", \"primary_bg_color\": \"#D3DEF0\", + * \"logo_url\": + * \"https://storage.pardot.com/710713/1642089901EbkRibJq/TS_fullworkmark_darkmode.png\", + * \"font_family\": \"\", \"product_name\": + * \"ThoughtSpot\", \"footer_address\": \"444 Castro St, Suite 1000 + * Mountain View, CA 94041\", \"footer_phone\": \"(800) 508-7008\", + * \"replacement_value_for_liveboard\": \"Dashboard\", + * \"replacement_value_for_answer\": \"Chart\", + * \"replacement_value_for_spot_iq\": \"AI Insights\", + * \"hide_footer_phone\": false, \"hide_footer_address\": false, + * \"hide_product_name\": false, \"hide_manage_notification\": false, + * \"hide_mobile_app_nudge\": false, \"hide_privacy_policy\": false, + * \"hide_ts_vocabulary_definitions\": false, \"hide_error_message\": false, + * \"hide_unsubscribe_link\": false, \"hide_notification_status\": false, + * \"hide_modify_alert\": false, \"company_website_url\": + * \"https://your-website.com/\", \"company_privacy_policy_url\" : + * \"https://link-to-privacy-policy.com/\", \"contact_support_url\": + * \"https://link-to-contact-support.com/\", \"hide_contact_support_url\": + * false, \"hide_logo_url\" : false } } ``` + * + * @throws ApiException if the Api call fails + */ + @Test + public void createEmailCustomizationTest() throws ApiException { + CreateEmailCustomizationRequest createEmailCustomizationRequest = null; + CreateEmailCustomizationResponse response = + api.createEmailCustomization(createEmailCustomizationRequest); + // TODO: test validations + } + + /** + * Version: 10.10.0.cl or later Deletes the configuration for the email customization. #### + * Pre-requisites Requires `DEVELOPER` (**has developer privilege**) or + * `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access + * Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, + * the `DEVELOPER` (**Has developer privilege**) privilege is required. **NOTE**:This + * endpoint in currently in beta. Contact ThoughtSpot support to enable this on your instance. + * #### Usage guidelines - Call the search API endpoint to get the + * `template_identifier` from the response. - Use that `template_identifier` + * as a parameter in this API request. + * + * @throws ApiException if the Api call fails + */ + @Test + public void deleteEmailCustomizationTest() throws ApiException { + String templateIdentifier = null; + api.deleteEmailCustomization(templateIdentifier); + // TODO: test validations + } + + /** + * Version: 10.12.0.cl or later Deletes the configuration for the email customization. #### + * Pre-requisites Requires `DEVELOPER` (**has developer privilege**) or + * `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access + * Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, + * the `DEVELOPER` (**Has developer privilege**) privilege is required. **NOTE**:This + * endpoint in currently in beta. Contact ThoughtSpot support to enable this on your instance. + * #### Usage guidelines - Call the search API endpoint to get the `org_identifier` + * from the response. - Use that `org_identifier` as a parameter in this API request. + * + * @throws ApiException if the Api call fails + */ + @Test + public void deleteOrgEmailCustomizationTest() throws ApiException { + DeleteOrgEmailCustomizationRequest deleteOrgEmailCustomizationRequest = null; + api.deleteOrgEmailCustomization(deleteOrgEmailCustomizationRequest); + // TODO: test validations + } + + /** + * Version: 10.10.0.cl or later Search the email customization configuration if any set for the + * ThoughtSpot system. #### Pre-requisites Requires `DEVELOPER` (**has developer + * privilege**) or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If + * [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled + * on your instance, the `DEVELOPER` (**Has developer privilege**) privilege is + * required. **NOTE**:This endpoint in currently in beta. Contact ThoughtSpot support to enable + * this on your instance. + * + * @throws ApiException if the Api call fails + */ + @Test + public void searchEmailCustomizationTest() throws ApiException { + SearchEmailCustomizationRequest searchEmailCustomizationRequest = null; + List response = + api.searchEmailCustomization(searchEmailCustomizationRequest); + // TODO: test validations + } + + /** + * Version: 10.12.0.cl or later Updates a customization configuration for the notification + * email. #### Pre-requisites Requires `DEVELOPER` (**has developer privilege**) or + * `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access + * Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, + * the `DEVELOPER` (**Has developer privilege**) privilege is required. **NOTE**:This + * endpoint in currently in beta. Contact ThoughtSpot support to enable this on your instance. + * #### Usage guidelines To update a custom configuration pass these parameters in your API + * request: - A JSON map of configuration attributes `template_properties`. The + * following example shows a sample set of customization configuration: ``` { { + * \"cta_button_bg_color\": \"#444DEA\", \"cta_text_font_color\": + * \"#FFFFFF\", \"primary_bg_color\": \"#D3DEF0\", + * \"logo_url\": + * \"https://storage.pardot.com/710713/1642089901EbkRibJq/TS_fullworkmark_darkmode.png\", + * \"font_family\": \"\", \"product_name\": + * \"ThoughtSpot\", \"footer_address\": \"444 Castro St, Suite 1000 + * Mountain View, CA 94041\", \"footer_phone\": \"(800) 508-7008\", + * \"replacement_value_for_liveboard\": \"Dashboard\", + * \"replacement_value_for_answer\": \"Chart\", + * \"replacement_value_for_spot_iq\": \"AI Insights\", + * \"hide_footer_phone\": false, \"hide_footer_address\": false, + * \"hide_product_name\": false, \"hide_manage_notification\": false, + * \"hide_mobile_app_nudge\": false, \"hide_privacy_policy\": false, + * \"hide_ts_vocabulary_definitions\": false, \"hide_error_message\": false, + * \"hide_unsubscribe_link\": false, \"hide_notification_status\": false, + * \"hide_modify_alert\": false, \"company_website_url\": + * \"https://your-website.com/\", \"company_privacy_policy_url\" : + * \"https://link-to-privacy-policy.com/\", \"contact_support_url\": + * \"https://link-to-contact-support.com/\", \"hide_contact_support_url\": + * false, \"hide_logo_url\" : false } } ``` + * + * @throws ApiException if the Api call fails + */ + @Test + public void updateEmailCustomizationTest() throws ApiException { + UpdateEmailCustomizationRequest updateEmailCustomizationRequest = null; + api.updateEmailCustomization(updateEmailCustomizationRequest); + // TODO: test validations + } + + /** + * Version: 10.10.0.cl or later Validates the email customization configuration if any set for + * the ThoughtSpot system. #### Pre-requisites Requires `DEVELOPER` (**has developer + * privilege**) or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If + * [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled + * on your instance, the `DEVELOPER` (**Has developer privilege**) privilege is + * required. **NOTE**:This endpoint in currently in beta. Contact ThoughtSpot support to enable + * this on your instance. + * + * @throws ApiException if the Api call fails + */ + @Test + public void validateEmailCustomizationTest() throws ApiException { + api.validateEmailCustomization(); + // TODO: test validations + } +} diff --git a/sdks/java/src/test/java/com/thoughtspot/client/api/GroupsApiTest.java b/sdks/java/src/test/java/com/thoughtspot/client/api/GroupsApiTest.java new file mode 100644 index 000000000..6a0fad065 --- /dev/null +++ b/sdks/java/src/test/java/com/thoughtspot/client/api/GroupsApiTest.java @@ -0,0 +1,124 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client.api; + +import com.thoughtspot.client.ApiException; +import com.thoughtspot.client.model.CreateUserGroupRequest; +import com.thoughtspot.client.model.ImportUserGroupsRequest; +import com.thoughtspot.client.model.ImportUserGroupsResponse; +import com.thoughtspot.client.model.SearchUserGroupsRequest; +import com.thoughtspot.client.model.UpdateUserGroupRequest; +import com.thoughtspot.client.model.UserGroupResponse; +import java.util.List; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; + +/** API tests for GroupsApi */ +@Disabled +public class GroupsApiTest { + + private final GroupsApi api = new GroupsApi(); + + /** + * Version: 9.0.0.cl or later Creates a group object in ThoughtSpot. Requires + * `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access + * Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, + * the `GROUP_ADMINISTRATION` (**Can manage groups**) privilege is required. #### + * About groups Groups in ThoughtSpot are used by the administrators to define privileges and + * organize users based on their roles and access requirements. To know more about groups and + * privileges, see [ThoughtSpot Product + * Documentation](https://docs.thoughtspot.com/cloud/latest/groups-privileges). #### Supported + * operations The API endpoint lets you perform the following operations: * Assign privileges * + * Add users * Define sharing visibility * Add sub-groups * Assign a default Liveboard + * + * @throws ApiException if the Api call fails + */ + @Test + public void createUserGroupTest() throws ApiException { + CreateUserGroupRequest createUserGroupRequest = null; + UserGroupResponse response = api.createUserGroup(createUserGroupRequest); + // TODO: test validations + } + + /** + * Version: 9.0.0.cl or later Removes the specified group object from the ThoughtSpot system. + * Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If + * [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled + * on your instance, the `GROUP_ADMINISTRATION` (**Can manage groups**) privilege is + * required. + * + * @throws ApiException if the Api call fails + */ + @Test + public void deleteUserGroupTest() throws ApiException { + String groupIdentifier = null; + api.deleteUserGroup(groupIdentifier); + // TODO: test validations + } + + /** + * Version: 9.0.0.cl or later Imports group objects from external databases into ThoughtSpot. + * Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If + * [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled + * on your instance, the `GROUP_ADMINISTRATION` (**Can manage groups**) privilege is + * required. During the import operation: * If the specified group is not available in + * ThoughtSpot, it will be added to ThoughtSpot. * If `delete_unspecified_groups` is + * set to `true`, the groups not specified in the API request, excluding administrator + * and system user groups, are deleted. * If the specified groups are already available in + * ThoughtSpot, the object properties of these groups are modified and synchronized as per the + * input data in the API request. A successful API call returns the object that represents the + * changes made in the ThoughtSpot system. + * + * @throws ApiException if the Api call fails + */ + @Test + public void importUserGroupsTest() throws ApiException { + ImportUserGroupsRequest importUserGroupsRequest = null; + ImportUserGroupsResponse response = api.importUserGroups(importUserGroupsRequest); + // TODO: test validations + } + + /** + * Version: 9.0.0.cl or later Gets a list of user group objects from the ThoughtSpot system. To + * get details of a specific user group, specify the user group GUID or name. You can also + * filter the API response based on User ID, Org ID, Role ID, type of group, sharing visibility, + * privileges assigned to the group, and the Liveboard IDs assigned to the users in the group. + * Available to all users. Users with `ADMINISTRATION` (**Can administer + * ThoughtSpot**) privileges can view all users properties. If [Role-Based Access Control + * (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the + * `GROUP_ADMINISTRATION` (**Can manage groups**) privilege is required. **NOTE**: If + * you do not get precise results, try setting `record_size` to `-1` and + * `record_offset` to `0`. + * + * @throws ApiException if the Api call fails + */ + @Test + public void searchUserGroupsTest() throws ApiException { + SearchUserGroupsRequest searchUserGroupsRequest = null; + List response = api.searchUserGroups(searchUserGroupsRequest); + // TODO: test validations + } + + /** + * Version: 9.0.0.cl or later Updates the properties of a group object in ThoughtSpot. Requires + * `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access + * Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, + * the `GROUP_ADMINISTRATION` (**Can manage groups**) privilege is required. #### + * Supported operations This API endpoint lets you perform the following operations in a single + * API request: * Edit + * [privileges](https://developers.thoughtspot.com/docs/?pageid=api-user-management#group-privileges) + * * Add or remove users * Change sharing visibility settings * Add or remove sub-groups * + * Assign a default Liveboard or update the existing settings + * + * @throws ApiException if the Api call fails + */ + @Test + public void updateUserGroupTest() throws ApiException { + String groupIdentifier = null; + UpdateUserGroupRequest updateUserGroupRequest = null; + api.updateUserGroup(groupIdentifier, updateUserGroupRequest); + // TODO: test validations + } +} diff --git a/sdks/java/src/test/java/com/thoughtspot/client/api/JobsApiTest.java b/sdks/java/src/test/java/com/thoughtspot/client/api/JobsApiTest.java new file mode 100644 index 000000000..9ccd94c3c --- /dev/null +++ b/sdks/java/src/test/java/com/thoughtspot/client/api/JobsApiTest.java @@ -0,0 +1,45 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client.api; + +import com.thoughtspot.client.ApiException; +import com.thoughtspot.client.model.SearchChannelHistoryRequest; +import com.thoughtspot.client.model.SearchChannelHistoryResponse; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; + +/** API tests for JobsApi */ +@Disabled +public class JobsApiTest { + + private final JobsApi api = new JobsApi(); + + /** + * Version: 26.4.0.cl or later Searches delivery history for communication channels such as + * webhooks. Returns channel-level delivery status for each job execution record. Use this to + * monitor channel health and delivery success rates across events. Requires + * `ADMINISTRATION` (**Can administer ThoughtSpot**) or `DEVELOPER` (**Has + * developer privilege**) privilege. If [Role-Based Access Control + * (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, users with + * `CAN_MANAGE_WEBHOOKS` (**Can manage webhooks**) privilege are also authorized to + * perform this action. **NOTE**: When `channel_type` is `WEBHOOK`, the + * following constraints apply: - `job_ids`, `channel_identifiers`, and + * `events` each accept at most one element. - When `job_ids` is provided, + * it is used as the sole lookup key and other filter fields are ignored. - When + * `job_ids` is not provided, `channel_identifiers` and `events` + * are both required, each containing exactly one element. - Records older than the configured + * retention period are not returned. - Use `start_epoch_time_in_millis` and/or + * `end_epoch_time_in_millis` to narrow results to a specific time window. + * + * @throws ApiException if the Api call fails + */ + @Test + public void searchChannelHistoryTest() throws ApiException { + SearchChannelHistoryRequest searchChannelHistoryRequest = null; + SearchChannelHistoryResponse response = + api.searchChannelHistory(searchChannelHistoryRequest); + // TODO: test validations + } +} diff --git a/sdks/java/src/test/java/com/thoughtspot/client/api/LogApiTest.java b/sdks/java/src/test/java/com/thoughtspot/client/api/LogApiTest.java new file mode 100644 index 000000000..206348ad8 --- /dev/null +++ b/sdks/java/src/test/java/com/thoughtspot/client/api/LogApiTest.java @@ -0,0 +1,41 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client.api; + +import com.thoughtspot.client.ApiException; +import com.thoughtspot.client.model.FetchLogsRequest; +import com.thoughtspot.client.model.LogResponse; +import java.util.List; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; + +/** API tests for LogApi */ +@Disabled +public class LogApiTest { + + private final LogApi api = new LogApi(); + + /** + * Version: 9.0.0.cl or later Fetches security audit logs. Requires `ADMINISTRATION` + * (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control + * (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the [Admin + * Control](https://developers.thoughtspot.com/docs/rbac#_admin_control) privileges are + * required. #### Usage guidelines By default, the API retrieves logs for the last 24 hours. You + * can set a custom duration in EPOCH time. Make sure the log duration specified in your API + * request doesn’t exceed 24 hours. If you must fetch logs for a longer time range, modify the + * duration and make multiple sequential API requests. Upon successful execution, the API + * returns logs with the following information: * timestamp of the event * event ID * event type + * * name and GUID of the user * IP address of ThoughtSpot instance For more information see + * [Audit logs Documentation](https://developers.thoughtspot.com/docs/audit-logs). + * + * @throws ApiException if the Api call fails + */ + @Test + public void fetchLogsTest() throws ApiException { + FetchLogsRequest fetchLogsRequest = null; + List response = api.fetchLogs(fetchLogsRequest); + // TODO: test validations + } +} diff --git a/sdks/java/src/test/java/com/thoughtspot/client/api/MetadataApiTest.java b/sdks/java/src/test/java/com/thoughtspot/client/api/MetadataApiTest.java new file mode 100644 index 000000000..80194078a --- /dev/null +++ b/sdks/java/src/test/java/com/thoughtspot/client/api/MetadataApiTest.java @@ -0,0 +1,519 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client.api; + +import com.thoughtspot.client.ApiException; +import com.thoughtspot.client.model.ConvertWorksheetToModelRequest; +import com.thoughtspot.client.model.CopyObjectRequest; +import com.thoughtspot.client.model.DeleteMetadataRequest; +import com.thoughtspot.client.model.ExportMetadataTMLBatchedRequest; +import com.thoughtspot.client.model.ExportMetadataTMLRequest; +import com.thoughtspot.client.model.FetchAnswerSqlQueryRequest; +import com.thoughtspot.client.model.FetchAsyncImportTaskStatusRequest; +import com.thoughtspot.client.model.FetchLiveboardSqlQueryRequest; +import com.thoughtspot.client.model.GetAsyncImportStatusResponse; +import com.thoughtspot.client.model.ImportEPackAsyncTaskStatus; +import com.thoughtspot.client.model.ImportMetadataTMLAsyncRequest; +import com.thoughtspot.client.model.ImportMetadataTMLRequest; +import com.thoughtspot.client.model.MetadataSearchResponse; +import com.thoughtspot.client.model.ParameterizeMetadataFieldsRequest; +import com.thoughtspot.client.model.ParameterizeMetadataRequest; +import com.thoughtspot.client.model.ResponseCopyObject; +import com.thoughtspot.client.model.ResponseWorksheetToModelConversion; +import com.thoughtspot.client.model.SearchMetadataRequest; +import com.thoughtspot.client.model.SqlQueryResponse; +import com.thoughtspot.client.model.UnparameterizeMetadataRequest; +import com.thoughtspot.client.model.UpdateMetadataHeaderRequest; +import com.thoughtspot.client.model.UpdateMetadataObjIdRequest; +import java.util.List; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; + +/** API tests for MetadataApi */ +@Disabled +public class MetadataApiTest { + + private final MetadataApi api = new MetadataApi(); + + /** + * Convert worksheets to models Version: 10.6.0.cl or later ## Prerequisites - **Privileges + * Required:** - `DATAMANAGEMENT` (Can manage data) or `ADMINISTRATION` (Can + * administer ThoughtSpot). - **Additional Privileges (if RBAC is enabled):** - + * `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` (Can manage data models). --- ## Usage + * Guidelines ### Parameters 1. **worksheet_ids** - **Description:** A comma-separated list of + * GUIDs (Globally Unique Identifiers) specifying the Worksheets to be converted. - **Usage:** - + * Used only when `convert_all` is set to `false`. - Leave empty or omit + * when `convert_all` is set to `true`. 2. **exclude_worksheet_ids** - + * **Description:** A comma-separated list of GUIDs specifying Worksheets to be excluded from + * conversion. - **Usage:** - Useful when `convert_all` is set to `true` and + * specific Worksheets should not be converted. 3. **convert_all** - **Description:** Sets the + * scope of conversion. - **Options:** - `true`: Converts all Worksheets in the + * system, except those specified in `exclude_worksheet_ids`. - `false`: + * Converts only the Worksheets listed in `worksheet_ids`. 4. **apply_changes** - + * **Description:** Specifies whether to apply changes directly to ThoughtSpot or to generate a + * preview before applying any changes.Used for validation of conversion. - **Options:** - + * `true`: Applies conversion changes directly to ThoughtSpot. - `false`: + * Generates only a preview of the changes and does not apply any changes to ThoughtSpot --- ## + * Best Practices 1. **Backup Before Conversion:** Always export metadata as a backup before + * initiating the conversion process 2. **Partial Conversion for Testing:** Test the conversion + * process by setting `convert_all` to `false` and specifying a small number + * of `worksheet_ids`. 3. **Verify Dependencies:** Check for dependent objects, such + * as Tables and Connections, to avoid invalid references. 4. **Review Changes:** Use + * `apply_changes: false` to preview the impact of the conversion before applying + * changes. --- ## Examples ### Convert Specific Worksheets ```json { + * \"worksheet_ids\": [\"guid1\", \"guid2\", \"guid3\"], + * \"exclude_worksheet_ids\": [], \"convert_all\": false, + * \"apply_changes\": true } ``` ### Convert All Accessible Worksheets + * ```json { \"worksheet_ids\": [], + * \"exclude_worksheet_ids\": [], \"convert_all\": true, + * \"apply_changes\": true } ``` ### Exclude Specific Worksheets While + * Converting All Accessible Worksheets ```json { \"worksheet_ids\": + * [], \"exclude_worksheet_ids\": [\"abc\"], \"convert_all\": + * true, \"apply_changes\": true } ``` + * + * @throws ApiException if the Api call fails + */ + @Test + public void convertWorksheetToModelTest() throws ApiException { + ConvertWorksheetToModelRequest convertWorksheetToModelRequest = null; + ResponseWorksheetToModelConversion response = + api.convertWorksheetToModel(convertWorksheetToModelRequest); + // TODO: test validations + } + + /** + * Makes a copy of an Answer or Liveboard Version: 10.3.0.cl or later Creates a copy of a + * metadata object. Requires at least view access to the metadata object being copied. Upon + * successful execution, the API creates a copy of the metadata object specified in the API + * request and returns the ID of the new object. + * + * @throws ApiException if the Api call fails + */ + @Test + public void copyObjectTest() throws ApiException { + CopyObjectRequest copyObjectRequest = null; + ResponseCopyObject response = api.copyObject(copyObjectRequest); + // TODO: test validations + } + + /** + * Version: 9.0.0.cl or later Removes the specified metadata object from the ThoughtSpot system. + * Requires edit access to the metadata object. + * + * @throws ApiException if the Api call fails + */ + @Test + public void deleteMetadataTest() throws ApiException { + DeleteMetadataRequest deleteMetadataRequest = null; + api.deleteMetadata(deleteMetadataRequest); + // TODO: test validations + } + + /** + * Version: 9.0.0.cl or later Exports the [TML](https://docs.thoughtspot.com/cloud/latest/tml) + * representation of metadata objects in JSON or YAML format. Requires + * `DATADOWNLOADING` (**Can download Data**) and at least view access to the metadata + * object. #### Usage guidelines * You can export one or several objects by passing metadata + * object GUIDs in the `metadata` array. * When exporting TML content for a Liveboard + * or Answer object, you can set `export_associated` to `true` to retrieve + * TML content for underlying Worksheets, Tables, or Views, including the GUID of each object + * within the headers. When `export_associated` is set to `true`, consider + * retrieving one metadata object at a time. * Set `export_fqns` to `true` + * to add FQNs of the referenced objects in the TML content. For example, if you send an API + * request to retrieve TML for a Liveboard and its associated objects, the API returns the TML + * content with FQNs of the referenced Worksheet. Exporting TML with FQNs is useful if + * ThoughtSpot has multiple objects with the same name and you want to eliminate ambiguity when + * importing TML files into ThoughtSpot. It eliminates the need for adding FQNs of the + * referenced objects manually during the import operation. * To export only the TML of + * feedbacks associated with an object, set the GUID of the object as `identifier`, + * and set the `type` as `FEEDBACK` in the `metadata` array. * To + * export the TML of an object along with the feedbacks associated with it, set the GUID of the + * object as `identifier`, set the `type` as `LOGIAL_TABLE` in the + * `metadata` array, and set `export_with_associated_feedbacks` in + * `export_options` to true. For more information, see [TML + * Documentation](https://developers.thoughtspot.com/docs/tml#_export_a_tml). For more + * information on feedbacks, see [Feedback + * Documentation](https://docs.thoughtspot.com/cloud/latest/sage-feedback). + * + * @throws ApiException if the Api call fails + */ + @Test + public void exportMetadataTMLTest() throws ApiException { + ExportMetadataTMLRequest exportMetadataTMLRequest = null; + List response = api.exportMetadataTML(exportMetadataTMLRequest); + // TODO: test validations + } + + /** + * Version: 10.1.0.cl or later Exports the [TML](https://docs.thoughtspot.com/cloud/latest/tml) + * representation of metadata objects in JSON or YAML format. ### **Permissions Required** + * Requires `DATAMANAGEMENT` (**Can manage data**) and `USERMANAGEMENT` + * (**Can manage users**) privileges. #### **Usage Guidelines** This API is only applicable for + * `USER`, `GROUP`, and `ROLES` metadata types. - + * `batch_offset` Indicates the starting position within the complete dataset from + * which the API should begin returning objects. Useful for paginating results efficiently. - + * `batch_size` Specifies the number of objects or items to retrieve in a single + * request. Helps control response size for better performance. - `edoc_format` + * Defines the format of the TML content. The exported metadata can be in JSON or YAML format. - + * `export_dependent` Specifies whether to include dependent metadata objects in the + * export. Ensures related objects are also retrieved if needed. - `all_orgs_override` + * Indicates whether the export operation applies across all organizations. Useful for + * multi-tenant environments where cross-org exports are required. + * + * @throws ApiException if the Api call fails + */ + @Test + public void exportMetadataTMLBatchedTest() throws ApiException { + ExportMetadataTMLBatchedRequest exportMetadataTMLBatchedRequest = null; + Object response = api.exportMetadataTMLBatched(exportMetadataTMLBatchedRequest); + // TODO: test validations + } + + /** + * Version: 9.0.0.cl or later Fetches the underlying SQL query data for an Answer object. + * Requires at least view access to the Answer object. Upon successful execution, the API + * returns the SQL queries for the specified object as shown in this example: ``` + * { \"metadata_id\":\"8fbe44a8-46ad-4b16-8d39-184b2fada490\", + * \"metadata_name\":\"Total sales\", + * \"metadata_type\":\"ANSWER\", \"sql_queries\":[ { + * \"metadata_id\":\"8fbe44a8-46ad-4b16-8d39-184b2fada490\", + * \"metadata_name\":\"Total sales -test\", + * \"sql_query\":\"SELECT \\n \\\"ta_1\\\".\\\"REGION\\\" + * \\\"ca_1\\\", \\n \\\"ta_2\\\".\\\"PRODUCTNAME\\\" + * \\\"ca_2\\\", \\n \\\"ta_1\\\".\\\"STORENAME\\\" + * \\\"ca_3\\\", \\n CASE\\n WHEN sum(\\\"ta_3\\\".\\\"SALES\\\") + * IS NOT NULL THEN sum(\\\"ta_3\\\".\\\"SALES\\\")\\n ELSE 0\\n END + * \\\"ca_4\\\", \\n CASE\\n WHEN + * sum(\\\"ta_3\\\".\\\"QUANTITYPURCHASED\\\") IS NOT NULL THEN + * sum(\\\"ta_3\\\".\\\"QUANTITYPURCHASED\\\")\\n ELSE 0\\n END + * \\\"ca_5\\\"\\nFROM + * \\\"RETAILAPPAREL\\\".\\\"PUBLIC\\\".\\\"FACT_RETAPP_SALES\\\" + * \\\"ta_3\\\"\\n JOIN + * \\\"RETAILAPPAREL\\\".\\\"PUBLIC\\\".\\\"DIM_RETAPP_STORES\\\" + * \\\"ta_1\\\"\\n ON \\\"ta_3\\\".\\\"STOREID\\\" = + * \\\"ta_1\\\".\\\"STOREID\\\"\\n JOIN + * \\\"RETAILAPPAREL\\\".\\\"PUBLIC\\\".\\\"DIM_RETAPP_PRODUCTS\\\" + * \\\"ta_2\\\"\\n ON \\\"ta_3\\\".\\\"PRODUCTID\\\" = + * \\\"ta_2\\\".\\\"PRODUCTID\\\"\\nGROUP BY \\n \\\"ca_1\\\", \\n + * \\\"ca_2\\\", \\n \\\"ca_3\\\"\\n\" } ] } ``` + * + * @throws ApiException if the Api call fails + */ + @Test + public void fetchAnswerSqlQueryTest() throws ApiException { + FetchAnswerSqlQueryRequest fetchAnswerSqlQueryRequest = null; + SqlQueryResponse response = api.fetchAnswerSqlQuery(fetchAnswerSqlQueryRequest); + // TODO: test validations + } + + /** + * Version: 10.4.0.cl or later Gets information about the status of the TML async import task + * scheduled using the `/api/rest/2.0/metadata/tml/async/import` API call. To fetch + * the task details, specify the ID of the TML async import task. Requires access to the task + * ID. The API allows users who initiated the asynchronous TML import via + * `/api/rest/2.0/metadata/tml/async/import` to view the status of their tasks. Users + * with administration privilege can view the status of all import tasks initiated by the users + * in their Org. #### Usage guidelines See [TML API + * Documentation](https://developers.thoughtspot.com/docs/tml#_fetch_status_of_the_tml_import_task) + * for usage guidelines. + * + * @throws ApiException if the Api call fails + */ + @Test + public void fetchAsyncImportTaskStatusTest() throws ApiException { + FetchAsyncImportTaskStatusRequest fetchAsyncImportTaskStatusRequest = null; + GetAsyncImportStatusResponse response = + api.fetchAsyncImportTaskStatus(fetchAsyncImportTaskStatusRequest); + // TODO: test validations + } + + /** + * Version: 9.0.0.cl or later Fetches the underlying SQL query data for a Liveboard object and + * its visualizations. Requires at least view access to the Liveboard object. To get SQL query + * data for a Liveboard, specify the GUID of the Liveboard. Optionally, you can add an array of + * visualization GUIDs to retrieve the SQL query data for visualizations in the Liveboard. Upon + * successful execution, the API returns the SQL queries for the specified object as shown in + * this example: ``` { \"metadata_id\": + * \"fa68ae91-7588-4136-bacd-d71fb12dda69\", \"metadata_name\": \"Total + * Sales\", \"metadata_type\": \"LIVEBOARD\", + * \"sql_queries\": [ { \"metadata_id\": + * \"b3b6d2b9-089a-490c-8e16-b144650b7843\", \"metadata_name\": \"Total + * quantity purchased, Total sales by region\", \"sql_query\": \"SELECT \\n + * \\\"ta_1\\\".\\\"REGION\\\" \\\"ca_1\\\", \\n CASE\\n WHEN + * sum(\\\"ta_2\\\".\\\"QUANTITYPURCHASED\\\") IS NOT NULL THEN + * sum(\\\"ta_2\\\".\\\"QUANTITYPURCHASED\\\")\\n ELSE 0\\n END + * \\\"ca_2\\\", \\n CASE\\n WHEN sum(\\\"ta_2\\\".\\\"SALES\\\") + * IS NOT NULL THEN sum(\\\"ta_2\\\".\\\"SALES\\\")\\n ELSE 0\\n END + * \\\"ca_3\\\"\\nFROM + * \\\"RETAILAPPAREL\\\".\\\"PUBLIC\\\".\\\"FACT_RETAPP_SALES\\\" + * \\\"ta_2\\\"\\n JOIN + * \\\"RETAILAPPAREL\\\".\\\"PUBLIC\\\".\\\"DIM_RETAPP_STORES\\\" + * \\\"ta_1\\\"\\n ON \\\"ta_2\\\".\\\"STOREID\\\" = + * \\\"ta_1\\\".\\\"STOREID\\\"\\nGROUP BY \\\"ca_1\\\"\" } ] + * } ``` + * + * @throws ApiException if the Api call fails + */ + @Test + public void fetchLiveboardSqlQueryTest() throws ApiException { + FetchLiveboardSqlQueryRequest fetchLiveboardSqlQueryRequest = null; + SqlQueryResponse response = api.fetchLiveboardSqlQuery(fetchLiveboardSqlQueryRequest); + // TODO: test validations + } + + /** + * Version: 9.0.0.cl or later Imports [TML](https://docs.thoughtspot.com/cloud/latest/tml) files + * into ThoughtSpot. Requires `DATAMANAGEMENT` (**Can manage data**) or + * `ADMINISTRATION` (**Can administer ThoughtsSpot**) privilege. If [Role-Based Access + * Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, + * the following Data control privileges may be required: - + * `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) - + * `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` (**Can manage data models**) #### Usage + * guidelines * Import all related objects in a single TML Import API call. For example, Tables + * that use the same Connection object and Worksheets connected to these Tables. * Include the + * `fqn` property to distinguish objects that have the same name. For example, if you + * have multiple Connections or Worksheets with the same name on ThoughtSpot and the Connection + * or Worksheet referenced in your TML file does not have a unique name to distinguish, it may + * result in invalid object references. Adding `fqn` helps ThoughtSpot differentiate a + * Table from another with the same name. We recommend [exporting TML with + * FQNs](#/http/api-endpoints/metadata/export-metadata-tml) and using these during the import + * operation. * You can upload multiple TML files at a time. If you import a Worksheet along + * with Liveboards, Answers, and other dependent objects in a single API call, the imported + * objects will be immediately available for use. When you import only a Worksheet object, it + * may take some time for the Worksheet to become available in the ThoughtSpot system. Please + * wait for a few minutes, and then proceed to create an Answer and Liveboard from the newly + * imported Worksheet. For more information, see [TML + * Documentation](https://developers.thoughtspot.com/docs/tml#_import_a_tml). + * + * @throws ApiException if the Api call fails + */ + @Test + public void importMetadataTMLTest() throws ApiException { + ImportMetadataTMLRequest importMetadataTMLRequest = null; + List response = api.importMetadataTML(importMetadataTMLRequest); + // TODO: test validations + } + + /** + * Version: 10.4.0.cl or later Schedules a task to import + * [TML](https://docs.thoughtspot.com/cloud/latest/tml) files into ThoughtSpot. You can use this + * API endpoint to process TML objects asynchronously when importing TMLs of large and complex + * metadata objects into ThoughtSpot. Unlike the synchronous import TML operation, the API + * processes TML data in the background and returns a task ID, which can be used to check the + * status of the import task via `/api/rest/2.0/metadata/tml/async/status` API + * endpoint. Requires `DATAMANAGEMENT` (**Can manage data**) or + * `ADMINISTRATION` (**Can administer ThoughtsSpot**) privilege, and edit access to + * the TML objects. If [Role-Based Access Control + * (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the + * following Data control privileges may be required: - + * `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) - + * `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` (**Can manage data models**) #### Usage + * guidelines See [Async TML API + * Documentation](https://developers.thoughtspot.com/docs/tml#_import_tml_objects_asynchronously) + * for usage guidelines. + * + * @throws ApiException if the Api call fails + */ + @Test + public void importMetadataTMLAsyncTest() throws ApiException { + ImportMetadataTMLAsyncRequest importMetadataTMLAsyncRequest = null; + ImportEPackAsyncTaskStatus response = + api.importMetadataTMLAsync(importMetadataTMLAsyncRequest); + // TODO: test validations + } + + /** + * Parameterize fields in metadata objects. Version: 10.9.0.cl or later **Note:** This API + * endpoint is deprecated and will be removed from ThoughtSpot in a future release. Use [POST + * /api/rest/2.0/metadata/parameterize-fields](/api/rest/2.0/metadata/parameterize-fields) + * instead. Allows parameterizing fields in metadata objects in ThoughtSpot. Requires + * appropriate permissions to modify the metadata object. The API endpoint allows parameterizing + * the following types of metadata objects: * Logical Tables * Connections * Connection Configs + * For a Logical Table the field type must be `ATTRIBUTE` and field name can be one + * of: * databaseName * schemaName * tableName For a Connection or Connection Config, the field + * type is always `CONNECTION_PROPERTY`. In this case, field_name specifies the exact + * property of the Connection or Connection Config that needs to be parameterized. For + * Connection Config, the only supported field name is: * impersonate_user + * + * @throws ApiException if the Api call fails + */ + @Test + public void parameterizeMetadataTest() throws ApiException { + ParameterizeMetadataRequest parameterizeMetadataRequest = null; + api.parameterizeMetadata(parameterizeMetadataRequest); + // TODO: test validations + } + + /** + * Parameterize multiple fields of metadata objects. For example [schemaName, databaseName] for + * LOGICAL_TABLE. Version: 26.5.0.cl or later Allows parameterizing multiple fields of metadata + * objects in ThoughtSpot. For example, you can parameterize [schemaName, databaseName] for + * LOGICAL_TABLE. Requires appropriate permissions to modify the metadata object. The API + * endpoint allows parameterizing the following types of metadata objects: * Logical Tables * + * Connections * Connection Configs For a Logical Table, the field type must be + * `ATTRIBUTE` and field names can include: * databaseName * schemaName * tableName + * For a Connection or Connection Config, the field type is always + * `CONNECTION_PROPERTY`. In this case, field_names specifies the exact properties of + * the Connection or Connection Config that need to be parameterized. For Connection Config, + * supported field names include: * impersonate_user You can parameterize multiple fields at + * once by providing an array of field names. + * + * @throws ApiException if the Api call fails + */ + @Test + public void parameterizeMetadataFieldsTest() throws ApiException { + ParameterizeMetadataFieldsRequest parameterizeMetadataFieldsRequest = null; + api.parameterizeMetadataFields(parameterizeMetadataFieldsRequest); + // TODO: test validations + } + + /** + * Version: 9.0.0.cl or later Gets a list of metadata objects available on the ThoughtSpot + * system. This API endpoint is available to all users who have view access to the object. Users + * with `ADMINISTRATION` (**Can administer ThoughtSpot**) privileges can view data for + * all metadata objects, including users and groups. #### Usage guidelines - To get all metadata + * objects, send the API request without any attributes. - To get metadata objects of a specific + * type, set the `type` attribute. For example, to fetch a Worksheet, set the type as + * `LOGICAL_TABLE`. - To filter metadata objects within type + * `LOGICAL_TABLE`, set the `subtypes` attribute. For example, to fetch a + * Worksheet, set the type as `LOGICAL_TABLE` & subtypes as + * `[WORKSHEET]`. - To get a specific metadata object, specify the GUID. - To + * customize your search and filter the API response, you can use several parameters. You can + * search for objects created or modified by specific users, by tags applied to the objects, or + * by using the include parameters like `include_auto_created_objects`, + * `include_dependent_objects`, `include_headers`, + * `include_incomplete_objects`, and so on. You can also define sorting options to + * sort the data retrieved in the API response. - To get discoverable objects when linientmodel + * is enabled you can use `include_discoverable_objects` as true else false. Default + * value is true. - For liveboard metadata type, to get the newer format, set the + * `liveboard_response_format` as V2. Default value is V1. - To retrieve only objects + * that are published, set the `include_only_published_objects` as true. Default value + * is false. **NOTE**: The following parameters support pagination of metadata records: - + * `tag_identifiers` - `type` - `subtypes` - + * `created_by_user_identifiers` - `modified_by_user_identifiers` - + * `owned_by_user_identifiers` - `exclude_objects` - + * `include_auto_created_objects` - `favorite_object_options` - + * `include_only_published_objects` If you are using other parameters to search + * metadata, set `record_size` to `-1` and `record_offset` to + * `0`. + * + * @throws ApiException if the Api call fails + */ + @Test + public void searchMetadataTest() throws ApiException { + SearchMetadataRequest searchMetadataRequest = null; + List response = api.searchMetadata(searchMetadataRequest); + // TODO: test validations + } + + /** + * Remove parameterization from fields in metadata objects. Version: 26.5.0.cl or later Allows + * removing parameterization from fields in metadata objects in ThoughtSpot. Requires + * appropriate permissions to modify the metadata object. The API endpoint allows + * unparameterizing the following types of metadata objects: * Logical Tables * Connections * + * Connection Configs For a Logical Table the field type must be `ATTRIBUTE` and field + * name can be one of: * databaseName * schemaName * tableName For a Connection or Connection + * Config, the field type is always `CONNECTION_PROPERTY`. In this case, field_name + * specifies the exact property of the Connection or Connection Config that needs to be + * unparameterized. For Connection Config, the only supported field name is: * impersonate_user + * + * @throws ApiException if the Api call fails + */ + @Test + public void unparameterizeMetadataTest() throws ApiException { + UnparameterizeMetadataRequest unparameterizeMetadataRequest = null; + api.unparameterizeMetadata(unparameterizeMetadataRequest); + // TODO: test validations + } + + /** + * Update header attributes for a given list of header objects. Version: 10.6.0.cl or later ## + * Prerequisites - **Privileges Required:** - `DATAMANAGEMENT` (Can manage data) or + * `ADMINISTRATION` (Can administer ThoughtSpot). - **Additional Privileges (if RBAC + * is enabled):** - `ORG_ADMINISTRATION` (Can manage orgs). --- ## Usage Guidelines + * ### Parameters 1. **headers_update** - **Description:** List of header objects with their + * attributes to be updated. Each object contains a list of attributes to be updated in the + * header. - **Usage:** - You must provide either `identifier` or + * `obj_identifier`, but not both. Both fields cannot be empty. - When + * `org_identifier` is set to `-1`, only the `identifier` value is + * accepted; `obj_identifier` is not allowed. 2. **org_identifier** - **Description:** + * GUID (Globally Unique Identifier) or name of the organization. - **Usage:** - Leaving this + * field empty assumes that the changes should be applied to the current organization - Provide + * `org_guid` or `org_name` to uniquely identify the organization where + * changes need to be applied. . - Provide `-1` if changes have to be applied across + * all the org. --- ## Note Currently, this API is enabled only for updating the + * `obj_identifier` attribute. Only `text` will be allowed in + * attribute's value. ## Best Practices 1. **Backup Before Conversion:** Always export + * metadata as a backup before initiating the update process --- ## Examples ### Only + * `identifier` is given ```json { \"headers_update\": [ { + * \"identifier\": \"guid_1\", \"obj_identifier\": \"\", + * \"type\": \"LOGICAL_COLUMN\", \"attributes\": [ { + * \"name\": \"obj_id\", \"value\": \"custom_object_id\" + * } ] } ], \"org_identifier\": \"orgGuid\" } ``` ### Only + * `obj_identifier` is given ```json { \"headers_update\": [ + * { \"obj_identifier\": \"custom_object_id\", \"type\": + * \"ANSWER\", \"attributes\": [ { \"name\": \"obj_id\", + * \"value\": \"custom_object_id\" } ] } ], \"org_identifier\": + * \"orgName\" } ``` ### Executing update for all org `-1` + * ```json { \"headers_update\": [ { \"identifier\": + * \"guid_1\", \"type\": \"ANSWER\", \"attributes\": [ { + * \"name\": \"obj_id\", \"value\": \"custom_object_id\" + * } ] } ], \"org_identifier\": -1 } ``` ### Optional `type` + * is not provided ```json { \"headers_update\": [ { + * \"identifier\": \"guid_1\", \"attributes\": [ { + * \"name\": \"obj_id\", \"value\": \"custom_object_id\" + * } ] } ], \"org_identifier\": -1 } ``` + * + * @throws ApiException if the Api call fails + */ + @Test + public void updateMetadataHeaderTest() throws ApiException { + UpdateMetadataHeaderRequest updateMetadataHeaderRequest = null; + api.updateMetadataHeader(updateMetadataHeaderRequest); + // TODO: test validations + } + + /** + * Update object IDs for given metadata objects. Version: 10.8.0.cl or later ## Prerequisites - + * **Privileges Required:** - `DATAMANAGEMENT` (Can manage data) or + * `ADMINISTRATION` (Can administer ThoughtSpot). - **Additional Privileges (if RBAC + * is enabled):** - `ORG_ADMINISTRATION` (Can manage orgs). --- ## Usage Guidelines + * ### Parameters 1. **metadata** - **Description:** List of metadata objects to update their + * object IDs. - **Usage:** - Use either `current_obj_id` alone OR use + * `metadata_identifier` with `type` (when needed). - When using + * `metadata_identifier`, the `type` field is required if using a name + * instead of a GUID. - The `new_obj_id` field is always required. --- ## Note This + * API is specifically designed for updating object IDs of metadata objects. It internally uses + * the header update mechanism to perform the changes. ## Best Practices 1. **Backup Before + * Update:** Always export metadata as a backup before initiating the update process. 2. + * **Validation:** - When using `current_obj_id`, ensure it matches the existing + * object ID exactly. - When using `metadata_identifier` with a name, ensure the + * `type` is specified correctly. - Verify that the `new_obj_id` follows + * your naming conventions and is unique within your system. --- ## Examples ### Using + * current_obj_id ```json { \"metadata\": [ { + * \"current_obj_id\": \"existing_object_id\", \"new_obj_id\": + * \"new_object_id\" } ] } ``` ### Using metadata_identifier with GUID + * ```json { \"metadata\": [ { \"metadata_identifier\": + * \"01234567-89ab-cdef-0123-456789abcdef\", \"new_obj_id\": + * \"new_object_id\" } ] } ``` ### Using metadata_identifier with name + * and type ```json { \"metadata\": [ { + * \"metadata_identifier\": \"My Answer\", \"type\": + * \"ANSWER\", \"new_obj_id\": \"new_object_id\" } ] } + * ``` ### Multiple objects update ```json { + * \"metadata\": [ { \"current_obj_id\": \"existing_object_id_1\", + * \"new_obj_id\": \"new_object_id_1\" }, { + * \"metadata_identifier\": \"My Worksheet\", \"type\": + * \"LOGICAL_TABLE\", \"new_obj_id\": \"new_object_id_2\" } ] } + * ``` + * + * @throws ApiException if the Api call fails + */ + @Test + public void updateMetadataObjIdTest() throws ApiException { + UpdateMetadataObjIdRequest updateMetadataObjIdRequest = null; + api.updateMetadataObjId(updateMetadataObjIdRequest); + // TODO: test validations + } +} diff --git a/sdks/java/src/test/java/com/thoughtspot/client/api/OrgsApiTest.java b/sdks/java/src/test/java/com/thoughtspot/client/api/OrgsApiTest.java new file mode 100644 index 000000000..18817fb3f --- /dev/null +++ b/sdks/java/src/test/java/com/thoughtspot/client/api/OrgsApiTest.java @@ -0,0 +1,90 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client.api; + +import com.thoughtspot.client.ApiException; +import com.thoughtspot.client.model.CreateOrgRequest; +import com.thoughtspot.client.model.OrgResponse; +import com.thoughtspot.client.model.SearchOrgsRequest; +import com.thoughtspot.client.model.UpdateOrgRequest; +import java.util.List; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; + +/** API tests for OrgsApi */ +@Disabled +public class OrgsApiTest { + + private final OrgsApi api = new OrgsApi(); + + /** + * Version: 9.0.0.cl or later Creates an Org object. To use this API, the + * [Orgs](https://docs.thoughtspot.com/cloud/latest/orgs-overview) feature must be enabled in + * your cluster. Requires cluster administration (**Can administer Org**) privileges. If + * [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled + * on your instance, the `ORG_ADMINISTRATION` (**Can manage Orgs**) privilege is + * required. + * + * @throws ApiException if the Api call fails + */ + @Test + public void createOrgTest() throws ApiException { + CreateOrgRequest createOrgRequest = null; + OrgResponse response = api.createOrg(createOrgRequest); + // TODO: test validations + } + + /** + * Version: 9.0.0.cl or later Deletes an Org object from the ThoughtSpot system. Requires + * cluster administration (**Can administer Org**) privilege. If [Role-Based Access Control + * (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the + * `ORG_ADMINISTRATION` (**Can manage Orgs**) privilege is required. When you delete + * an Org, all its users and objects created in that Org context are removed. However, if the + * users in the deleted Org also exists in other Orgs, they are removed only from the deleted + * Org. + * + * @throws ApiException if the Api call fails + */ + @Test + public void deleteOrgTest() throws ApiException { + String orgIdentifier = null; + api.deleteOrg(orgIdentifier); + // TODO: test validations + } + + /** + * Version: 9.0.0.cl or later Gets a list of Orgs configured on the ThoughtSpot system. To get + * details of a specific Org, specify the Org ID or name. You can also pass parameters such as + * status, visibility, and user identifiers to get a specific list of Orgs. Requires cluster + * administration (**Can administer Org**) privileges. If [Role-Based Access Control + * (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the + * `ORG_ADMINISTRATION` (**Can manage Orgs**) privilege is required. + * + * @throws ApiException if the Api call fails + */ + @Test + public void searchOrgsTest() throws ApiException { + SearchOrgsRequest searchOrgsRequest = null; + List response = api.searchOrgs(searchOrgsRequest); + // TODO: test validations + } + + /** + * Version: 9.0.0.cl or later Updates an Org object. You can modify Org properties such as name, + * description, and user associations. Requires cluster administration (**Can administer Org**) + * privileges. If [Role-Based Access Control + * (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the + * `ORG_ADMINISTRATION` (**Can manage Orgs**) privilege is required. + * + * @throws ApiException if the Api call fails + */ + @Test + public void updateOrgTest() throws ApiException { + String orgIdentifier = null; + UpdateOrgRequest updateOrgRequest = null; + api.updateOrg(orgIdentifier, updateOrgRequest); + // TODO: test validations + } +} diff --git a/sdks/java/src/test/java/com/thoughtspot/client/api/ReportsApiTest.java b/sdks/java/src/test/java/com/thoughtspot/client/api/ReportsApiTest.java new file mode 100644 index 000000000..d920b3ca9 --- /dev/null +++ b/sdks/java/src/test/java/com/thoughtspot/client/api/ReportsApiTest.java @@ -0,0 +1,79 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client.api; + +import com.thoughtspot.client.ApiException; +import com.thoughtspot.client.model.ExportAnswerReportRequest; +import com.thoughtspot.client.model.ExportLiveboardReportRequest; +import java.io.File; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; + +/** API tests for ReportsApi */ +@Disabled +public class ReportsApiTest { + + private final ReportsApi api = new ReportsApi(); + + /** + * Version: 9.0.0.cl or later Exports an Answer in the given file format. You can download the + * Answer data as a PDF, PNG, CSV, or XLSX file. Requires at least view access to the Answer. + * #### Usage guidelines In the request body, specify the GUID or name of the Answer and set + * `file_format`. The default file format is CSV. Use the `type` parameter + * to specify whether the Answer being exported is a saved Answer (`SAVED`) or a + * pinned Answer on a Liveboard (`PINNED`). Defaults to `SAVED`. When using + * `PINNED`, the `metadata_identifier` must be the container id. **NOTE**: * + * The downloadable file returned in API response file is extensionless. Please rename the + * downloaded file by typing in the relevant extension. * HTML rendering is not supported for + * PDF exports of Answers with tables. Optionally, you can define [runtime + * overrides](https://developers.thoughtspot.com/docs/fetch-data-and-report-apis#_runtime_overrides) + * to apply to the Answer data. + * + * @throws ApiException if the Api call fails + */ + @Test + public void exportAnswerReportTest() throws ApiException { + ExportAnswerReportRequest exportAnswerReportRequest = null; + File response = api.exportAnswerReport(exportAnswerReportRequest); + // TODO: test validations + } + + /** + * Version: 9.0.0.cl or later Exports a Liveboard and its visualizations in PDF, PNG, CSV, or + * XLSX file format. The default `file_format` is CSV. Requires at least view access + * to the Liveboard. #### Usage guidelines In the request body, specify the GUID or name of the + * Liveboard. To generate a Liveboard report with specific visualizations, add GUIDs or names of + * the visualizations. **NOTE**: * The downloadable file returned in API response file is + * extensionless. Please rename the downloaded file by typing in the relevant extension. * + * Optionally, you can define [runtime + * overrides](https://developers.thoughtspot.com/docs/fetch-data-and-report-apis#_runtime_overrides) + * to apply to the Answer data. * To include unsaved changes in the report, pass the + * `transient_pinboard_content` script generated from the + * `getExportRequestForCurrentPinboard` method in the Visual Embed SDK. Upon + * successful execution, the API returns the report with unsaved changes, including ad hoc + * changes to visualizations. For more information, see [Liveboard Report + * API](https://developers.thoughtspot.com/docs/fetch-data-and-report-apis#_liveboard_report_api). + * * Starting with ThoughtSpot Cloud 10.9.0.cl release, the Liveboard can be exported in the PNG + * format in the resolution of your choice. To enable this on your instance, contact ThoughtSpot + * support. When this feature is enabled, the options + * `include_cover_page`,`include_filter_page` within the + * `png_options` will not be available for PNG exports. * Starting with the + * ThoughtSpot Cloud 26.2.0.cl release, * Liveboards can be exported in CSV format. * All + * visualizations within a Liveboard can be exported as individual CSV files. * When exporting + * multiple visualizations or the entire Liveboard, the system returns the report as a + * compressed ZIP file containing the separate CSV files for each visualization. * Liveboards + * can also be exported in XLSX format. * All selected visualizations are consolidated into a + * single Excel workbook (.xlsx), with each visualization placed in its own worksheet (tab). * + * XLSX exports are limited to a maximum of 255 worksheets (tabs) per workbook. + * + * @throws ApiException if the Api call fails + */ + @Test + public void exportLiveboardReportTest() throws ApiException { + ExportLiveboardReportRequest exportLiveboardReportRequest = null; + File response = api.exportLiveboardReport(exportLiveboardReportRequest); + // TODO: test validations + } +} diff --git a/sdks/java/src/test/java/com/thoughtspot/client/api/RolesApiTest.java b/sdks/java/src/test/java/com/thoughtspot/client/api/RolesApiTest.java new file mode 100644 index 000000000..6708ddf0f --- /dev/null +++ b/sdks/java/src/test/java/com/thoughtspot/client/api/RolesApiTest.java @@ -0,0 +1,85 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client.api; + +import com.thoughtspot.client.ApiException; +import com.thoughtspot.client.model.CreateRoleRequest; +import com.thoughtspot.client.model.RoleResponse; +import com.thoughtspot.client.model.SearchRoleResponse; +import com.thoughtspot.client.model.SearchRolesRequest; +import com.thoughtspot.client.model.UpdateRoleRequest; +import java.util.List; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; + +/** API tests for RolesApi */ +@Disabled +public class RolesApiTest { + + private final RolesApi api = new RolesApi(); + + /** + * Version: 9.5.0.cl or later Creates a Role object in ThoughtSpot. Available only if + * [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled + * on your instance. To create a Role, the `ROLE_ADMINISTRATION` (**Can manage + * roles**) privilege is required. + * + * @throws ApiException if the Api call fails + */ + @Test + public void createRoleTest() throws ApiException { + CreateRoleRequest createRoleRequest = null; + RoleResponse response = api.createRole(createRoleRequest); + // TODO: test validations + } + + /** + * Version: 9.5.0.cl or later Deletes a Role object from the ThoughtSpot system. Available only + * if [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is + * enabled on your instance. To delete a Role, the `ROLE_ADMINISTRATION` (**Can manage + * roles**) privilege is required. + * + * @throws ApiException if the Api call fails + */ + @Test + public void deleteRoleTest() throws ApiException { + String roleIdentifier = null; + api.deleteRole(roleIdentifier); + // TODO: test validations + } + + /** + * Version: 9.5.0.cl or later Gets a list of Role objects from the ThoughtSpot system. Available + * if [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is + * enabled on your instance. To search for Roles, the `ROLE_ADMINISTRATION` (**Can + * manage roles**) privilege is required. To get details of a specific Role object, specify the + * GUID or name. You can also filter the API response based on user group and Org identifiers, + * privileges assigned to the Role, and deprecation status. + * + * @throws ApiException if the Api call fails + */ + @Test + public void searchRolesTest() throws ApiException { + SearchRolesRequest searchRolesRequest = null; + List response = api.searchRoles(searchRolesRequest); + // TODO: test validations + } + + /** + * Version: 9.5.0.cl or later Updates the properties of a Role object. Available only if + * [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled + * on your instance. To update a Role, the `ROLE_ADMINISTRATION` (**Can manage + * roles**) privilege is required. + * + * @throws ApiException if the Api call fails + */ + @Test + public void updateRoleTest() throws ApiException { + String roleIdentifier = null; + UpdateRoleRequest updateRoleRequest = null; + RoleResponse response = api.updateRole(roleIdentifier, updateRoleRequest); + // TODO: test validations + } +} diff --git a/sdks/java/src/test/java/com/thoughtspot/client/api/SchedulesApiTest.java b/sdks/java/src/test/java/com/thoughtspot/client/api/SchedulesApiTest.java new file mode 100644 index 000000000..ff20b6d65 --- /dev/null +++ b/sdks/java/src/test/java/com/thoughtspot/client/api/SchedulesApiTest.java @@ -0,0 +1,108 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client.api; + +import com.thoughtspot.client.ApiException; +import com.thoughtspot.client.model.CreateScheduleRequest; +import com.thoughtspot.client.model.ResponseSchedule; +import com.thoughtspot.client.model.SearchSchedulesRequest; +import com.thoughtspot.client.model.UpdateScheduleRequest; +import java.util.List; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; + +/** API tests for SchedulesApi */ +@Disabled +public class SchedulesApiTest { + + private final SchedulesApi api = new SchedulesApi(); + + /** + * Create schedule. Version: 9.4.0.cl or later Creates a Liveboard schedule job. Requires at + * least edit access to Liveboards. To create a schedule on behalf of another user, you need + * `ADMINISTRATION` (**Can administer Org**) or `JOBSCHEDULING` (**Can + * schedule for others**) privilege and edit access to the Liveboard. If [Role-Based Access + * Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, + * the `JOBSCHEDULING` (**Can schedule for others**) privilege is required. #### Usage + * guidelines * The description text is mandatory. The description text appears as + * **Description: <your content>** in the Liveboard schedule email notifications. * For + * Liveboards with both charts and tables, schedule creation is only supported in PDF and XLS + * formats. Schedules created in CSV formats for such Liveboards will fail to run. If + * `PDF` is set as the `file_format`, enable `pdf_options` to get + * the correct attachment. Not doing so may cause the attachment to be rendered empty. * To + * include only specific visualizations, specify the visualization GUIDs in the + * `visualization_identifiers` array. * You can schedule a Liveboard job to run + * periodically by setting frequency parameters. You can set the schedule to run daily, weekly, + * monthly or every n minutes or hours. The scheduled job can also be configured to run at a + * specific time of the day or on specific days of the week or month. Please ensure that when + * setting the schedule frequency for _minute of the object_, only values that are multiples of + * 5 are included. * If the `frequency` parameters are defined, you can set the time + * zone to a value that matches your server's time zone. For example, + * `US/Central`, `Etc/UTC`, `CET`. The default time zone is + * `America/Los_Angeles`. For more information about Liveboard jobs, see [ThoughtSpot + * Product Documentation](https://docs.thoughtspot.com/cloud/latest/liveboard-schedule). + * + * @throws ApiException if the Api call fails + */ + @Test + public void createScheduleTest() throws ApiException { + CreateScheduleRequest createScheduleRequest = null; + ResponseSchedule response = api.createSchedule(createScheduleRequest); + // TODO: test validations + } + + /** + * Deletes a scheduled job. Version: 9.4.0.cl or later Deletes a scheduled Liveboard job. + * Requires at least edit access to Liveboard or `ADMINISTRATION` (**Can administer + * Org**) privilege. If [Role-Based Access Control + * (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the + * `JOBSCHEDULING` (**Can schedule for others**) privilege is required. + * + * @throws ApiException if the Api call fails + */ + @Test + public void deleteScheduleTest() throws ApiException { + String scheduleIdentifier = null; + api.deleteSchedule(scheduleIdentifier); + // TODO: test validations + } + + /** + * Search Schedules Version: 9.4.0.cl or later Gets a list of scheduled jobs configured for a + * Liveboard. To get details of a specific scheduled job, specify the name or GUID of the + * scheduled job. Requires at least view access to Liveboards. **NOTE**: When filtering + * schedules by parameters other than `metadata`, set `record_size` to + * `-1` and `record_offset` to `0` for accurate results. + * + * @throws ApiException if the Api call fails + */ + @Test + public void searchSchedulesTest() throws ApiException { + SearchSchedulesRequest searchSchedulesRequest = null; + List response = api.searchSchedules(searchSchedulesRequest); + // TODO: test validations + } + + /** + * Update schedule. Version: 9.4.0.cl or later Updates a scheduled Liveboard job. Requires at + * least edit access to Liveboards. To update a schedule on behalf of another user, you need + * `ADMINISTRATION` (**Can administer Org**) or `JOBSCHEDULING` (**Can + * schedule for others**) privilege and edit access to the Liveboard. If [Role-Based Access + * Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, + * the `JOBSCHEDULING` (**Can schedule for others**) privilege is required. The API + * endpoint allows you to pause a scheduled job, change the status of a paused job. You can also + * edit the recipients list, frequency of the job, format of the file to send to the recipients + * in email notifications, PDF options, and time zone setting. + * + * @throws ApiException if the Api call fails + */ + @Test + public void updateScheduleTest() throws ApiException { + String scheduleIdentifier = null; + UpdateScheduleRequest updateScheduleRequest = null; + api.updateSchedule(scheduleIdentifier, updateScheduleRequest); + // TODO: test validations + } +} diff --git a/sdks/java/src/test/java/com/thoughtspot/client/api/SecurityApiTest.java b/sdks/java/src/test/java/com/thoughtspot/client/api/SecurityApiTest.java new file mode 100644 index 000000000..9a5c19234 --- /dev/null +++ b/sdks/java/src/test/java/com/thoughtspot/client/api/SecurityApiTest.java @@ -0,0 +1,404 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client.api; + +import com.thoughtspot.client.ApiException; +import com.thoughtspot.client.model.AssignChangeAuthorRequest; +import com.thoughtspot.client.model.ColumnSecurityRuleResponse; +import com.thoughtspot.client.model.FetchColumnSecurityRulesRequest; +import com.thoughtspot.client.model.FetchObjectPrivilegesRequest; +import com.thoughtspot.client.model.FetchPermissionsOfPrincipalsRequest; +import com.thoughtspot.client.model.FetchPermissionsOnMetadataRequest; +import com.thoughtspot.client.model.ManageObjectPrivilegeRequest; +import com.thoughtspot.client.model.ObjectPrivilegesOfMetadataResponse; +import com.thoughtspot.client.model.PermissionOfMetadataResponse; +import com.thoughtspot.client.model.PermissionOfPrincipalsResponse; +import com.thoughtspot.client.model.PublishMetadataRequest; +import com.thoughtspot.client.model.ShareMetadataRequest; +import com.thoughtspot.client.model.UnpublishMetadataRequest; +import com.thoughtspot.client.model.UpdateColumnSecurityRulesRequest; +import java.util.List; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; + +/** API tests for SecurityApi */ +@Disabled +public class SecurityApiTest { + + private final SecurityApi api = new SecurityApi(); + + /** + * Version: 9.0.0.cl or later Transfers the ownership of one or several objects from one user to + * another. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If + * [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled + * on your instance, the `USER_ADMINISTRATION` (**Can manage users**) privilege and + * edit access to the objects are required. + * + * @throws ApiException if the Api call fails + */ + @Test + public void assignChangeAuthorTest() throws ApiException { + AssignChangeAuthorRequest assignChangeAuthorRequest = null; + api.assignChangeAuthor(assignChangeAuthorRequest); + // TODO: test validations + } + + /** + * Version: 10.12.0.cl or later Fetches column security rules for specified tables. This API + * endpoint retrieves column-level security rules configured for tables. It returns information + * about which columns are secured and which groups have access to those columns. #### Usage + * guidelines - Provide an array of table identifiers using either `identifier` (GUID + * or name) or `obj_identifier` (object ID) - At least one of `identifier` + * or `obj_identifier` must be provided for each table - The API returns column + * security rules for all specified tables - Users must have appropriate permissions to access + * security rules for the specified tables #### Required permissions - + * `ADMINISTRATION` - Can administer ThoughtSpot - `DATAMANAGEMENT` - Can + * manage data - `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` - Can manage worksheet views and + * tables #### Example request ```json { \"tables\": [ { + * \"identifier\": \"table-guid\", \"obj_identifier\": + * \"table-object-id\" } ] } ``` #### Response format The API returns + * an array of `ColumnSecurityRuleResponse` objects wrapped in a `data` + * field. Each `ColumnSecurityRuleResponse` object contains: - Table information (GUID + * and object ID) - Array of column security rules with column details, group access, and source + * table information #### Example response ```json { \"data\": [ { + * \"guid\": \"table-guid\", \"objId\": + * \"table-object-id\", \"columnSecurityRules\": [ { \"column\": { + * \"id\": \"col_123\", \"name\": \"Salary\" }, + * \"groups\": [ { \"id\": \"group_1\", \"name\": + * \"HR Department\" } ], \"sourceTableDetails\": { \"id\": + * \"source-table-guid\", \"name\": \"Employee_Data\" } } ] } ] } + * ``` + * + * @throws ApiException if the Api call fails + */ + @Test + public void fetchColumnSecurityRulesTest() throws ApiException { + FetchColumnSecurityRulesRequest fetchColumnSecurityRulesRequest = null; + List response = + api.fetchColumnSecurityRules(fetchColumnSecurityRulesRequest); + // TODO: test validations + } + + /** + * Version: 26.3.0.cl or later This API fetches the object privileges present for the given list + * of principals (user or group), on the given set of objects. It supports pagination, which can + * be enabled and configured using the request parameters. It provides users access to certain + * features based on privilege based access control. #### Usage guidelines - Specify the + * `type` (`USER` or `USER_GROUP`) and `identifier` + * (either GUID or name) of the principals for which you want to retrieve object privilege + * information in the `principals` array. - Specify the `type` + * (`LOGICAL_TABLE`) and `identifier` (either GUID or name) of the metadata + * objects for which you want to retrieve object privilege information in the + * `metadata` array. Only `LOGICAL_TABLE` metadata type is supported for + * now. It may be extended for other metadata types in future. - To control the offset from + * where principals have to be fetched, use `record_offset`. When + * `record_offset` is 0, information is fetched from the beginning. - To control the + * number of principals to be fetched, use `record_size`. Default + * `record_size` is 20. - Ensure `record_offset` for a subsequent request is + * one more than the value of `record_size` of the previous request. - Ensure using + * correct Authorization Bearer Token corresponding to specific user & org. #### Example + * request ```json { \"principals\": [ { \"type\": + * \"type-1\", \"identifier\": \"principal-guid-or-name-1\" }, { + * \"type\": \"type-2\", \"identifier\": + * \"principal-guid-or-name-2\" } ], \"metadata\": [ { \"type\": + * \"metadata-type-1\", \"identifier\": + * \"metadata-guid-or-name-1\" }, { \"type\": \"metadata-type-2\", + * \"identifier\": \"metadata-guid-or-name-2\" } ], + * \"record_offset\": 0, \"record_size\": 20 } ``` #### + * Response format The API returns an array of `metadata_object_privileges` objects + * wrapped in JSON. Each `metadata_object_privileges` object contains: - Metadata + * information (GUID, name and type) - Array of `principal_object_privilege_info`. - + * Each `principal_object_privilege_info` contains: - Principal type. All principals + * of this type are listed as described below. - Array of + * `principal_object_privileges`. - Each `principal_object_privileges` + * contains: - Principal information (GUID, name, subtype) - List of applied object level + * privileges. #### Example response ```json { + * \"metadata_object_privileges\": [ { \"metadata_id\": + * \"metadata-guid-1\", \"metadata_name\": \"metadata-name-1\", + * \"metadata_type\": \"metadata-type-1\", + * \"principal_object_privilege_info\": [ { \"principal_type\": + * \"principal-type-1\", \"principal_object_privileges\": [ { + * \"principal_id\": \"principal-guid-1\", \"principal_name\": + * \"principal-name-1\", \"principal_sub_type\": + * \"principal-sub-type-1\", \"object_privileges\": + * \"[object-privilege-1, object-privilege-2]\" }, { \"principal_id\": + * \"principal-guid-2\", \"principal_name\": \"principal-name-2\", + * \"principal_sub_type\": \"principal-sub-type-2\", + * \"object_privileges\": \"[object-privilege-1, object-privilege-2]\" } ] + * }, { \"principal_type\": \"principal-type-2\", + * \"principal_object_privileges\": [ { \"principal_id\": + * \"principal-guid-3\", \"principal_name\": \"principal-guid-4\", + * \"principal_sub_type\": \"principal-sub-type-4\", + * \"object_privileges\": \"[object-privilege-1]\" } ] } ] }, { + * \"metadata_id\": \"metadata-guid-2\", \"metadata_name\": + * \"metadata-name-2\", \"metadata_type\": \"metadata-type-2\", + * \"principal_object_privilege_info\": [ { \"principal_type\": + * \"principal-type-1\", \"principal_object_privileges\": [ { + * \"principal_id\": \"principal-guid-1\", \"principal_name\": + * \"principal-name-1\", \"principal_sub_type\": + * \"principal-sub-type-1\", \"object_privileges\": + * \"[object-privilege-3, object-privilege-4]\" }, { \"principal_id\": + * \"principal-guid-2\", \"principal_name\": \"principal-name-2\", + * \"principal_sub_type\": \"principal-sub-type-2\", + * \"object_privileges\": \"[object-privilege-4]\" } ] } ] } ] } + * ``` + * + * @throws ApiException if the Api call fails + */ + @Test + public void fetchObjectPrivilegesTest() throws ApiException { + FetchObjectPrivilegesRequest fetchObjectPrivilegesRequest = null; + ObjectPrivilegesOfMetadataResponse response = + api.fetchObjectPrivileges(fetchObjectPrivilegesRequest); + // TODO: test validations + } + + /** + * Version: 9.0.0.cl or later Fetches object permission details for a given principal object + * such as a user and group. Requires view access to the metadata object. #### Usage guidelines + * * To get a list of all metadata objects that a user or group can access, specify the + * `type` and GUID or name of the principal. * To get permission details for a + * specific object, add the `type` and GUID or name of the metadata object to your API + * request. Upon successful execution, the API returns a list of metadata objects and permission + * details for each object. + * + * @throws ApiException if the Api call fails + */ + @Test + public void fetchPermissionsOfPrincipalsTest() throws ApiException { + FetchPermissionsOfPrincipalsRequest fetchPermissionsOfPrincipalsRequest = null; + PermissionOfPrincipalsResponse response = + api.fetchPermissionsOfPrincipals(fetchPermissionsOfPrincipalsRequest); + // TODO: test validations + } + + /** + * Version: 9.0.0.cl or later Fetches permission details for a given metadata object. Requires + * view access to the metadata object. #### Usage guidelines * To fetch a list of users and + * groups for a metadata object, specify `type` and GUID or name of the metadata + * object. * To get permission details for a specific user or group, add `type` and + * GUID or name of the principal object to your API request. Upon successful execution, the API + * returns permission details and principal information for the object specified in the API + * request. + * + * @throws ApiException if the Api call fails + */ + @Test + public void fetchPermissionsOnMetadataTest() throws ApiException { + FetchPermissionsOnMetadataRequest fetchPermissionsOnMetadataRequest = null; + PermissionOfMetadataResponse response = + api.fetchPermissionsOnMetadata(fetchPermissionsOnMetadataRequest); + // TODO: test validations + } + + /** + * Version: 26.3.0.cl or later This API allows the addition or deletion of object level + * privileges for a set of users and groups, on a set of metadata objects. It provides users to + * access certain features based on privilege based access control. #### Usage guidelines - + * Specify the `operation`. The supported operations are: `ADD`, + * `REMOVE`. - Specify the type of the objects on which the object privileges are + * being provided in `metadata_type`. Only `LOGICAL_TABLE` metadata type is + * supported for now. It may be extended for other metadata types in future. - Specify the list + * of object privilege types in the `object_privilege_types` array. The supported + * object privilege types are: `SPOTTER_COACHING_PRIVILEGE`. - Specify the identifiers + * (either GUID or name) for the metadata objects in the `metadata_identifiers` array. + * - Specify the `type` (`USER` or `USER_GROUP`) and + * `identifier` (either GUID or name) of the principals to which you want to apply the + * given operation and given object privileges in the `principals` array. - Ensure + * using correct Authorization Bearer Token corresponding to specific user & org. #### + * Example request ```json { \"operation\": + * \"operation-type\", \"metadata_type\": \"metadata-type\", + * \"object_privilege_types\": [\"privilege-type-1\", + * \"privilege-type-2\"], \"metadata_identifiers\": + * [\"metadata-guid-or-name-1\", \"metadata-guid-or-name-1\"], + * \"principals\": [ { \"type\": \"type-1\", + * \"identifier\": \"principal-guid-or-name-1\" }, { \"type\": + * \"type-2\", \"identifier\": \"principal-guid-or-name-2\" } ] } + * ``` > ###### Note: > * Only admin users, users with edit access and + * users with coaching privilege on a given data-model can add or remove principals related to + * SPOTTER_COACHING_PRIVILEGE + * + * @throws ApiException if the Api call fails + */ + @Test + public void manageObjectPrivilegeTest() throws ApiException { + ManageObjectPrivilegeRequest manageObjectPrivilegeRequest = null; + api.manageObjectPrivilege(manageObjectPrivilegeRequest); + // TODO: test validations + } + + /** + * Version: 26.5.0.cl or later Allows publishing metadata objects across organizations in + * ThoughtSpot. Requires ADMINISTRATION role and TENANT scope. The API endpoint allows + * publishing the following types of metadata objects: * Liveboards * Answers * Logical Tables + * This API will essentially share the objects along with it's dependencies to the org + * admins of the orgs to which it is being published. + * + * @throws ApiException if the Api call fails + */ + @Test + public void publishMetadataTest() throws ApiException { + PublishMetadataRequest publishMetadataRequest = null; + api.publishMetadata(publishMetadataRequest); + // TODO: test validations + } + + /** + * Version: 9.0.0.cl or later Allows sharing one or several metadata objects with users and + * groups in ThoughtSpot. Requires edit access to the metadata object. #### Supported metadata + * objects: * Liveboards * Visualizations * Answers * Models * Views * Connections * Collections + * #### Object permissions You can provide `READ_ONLY` or `MODIFY` access + * when sharing an object with another user or group. The `READ_ONLY` permission + * grants view access to the shared object, whereas `MODIFY` provides edit access. To + * prevent a user or group from accessing the shared object, specify the GUID or name of the + * principal and set `shareMode` to `NO_ACCESS`. #### Sharing a + * visualization * Sharing a visualization implicitly shares the entire Liveboard with the + * recipient. * Object permissions set for a shared visualization also apply to the Liveboard + * unless overridden by another API request or via UI. * If email notifications for object + * sharing are enabled, a notification with a link to the shared visualization will be sent to + * the recipient’s email address. Although this link opens the shared visualization, recipients + * can also access other visualizations in the Liveboard. #### Sharing a collection Collections + * support **dual permissions** that provide fine-grained control: * **Collection permissions** + * (`share_mode`) - controls access to the collection itself (view, edit, delete the + * collection) * **Content permissions** (`content_share_mode`) - controls access to + * objects within the collection (view, edit objects inside) **Default Behavior:** - If only + * `share_mode` is specified, the content permissions default to `READ_ONLY` + * (except when `share_mode` is `NO_ACCESS`, then content also gets + * `NO_ACCESS`) - To give users edit access to collection contents, explicitly set + * `content_share_mode: \"MODIFY\"` ## Examples The following JSON examples + * can be copy-pasted as request bodies for the REST v2 API endpoint: ```bash + * POST /callosum/v1/v2/security/metadata/share Content-Type: application/x-www-form-urlencoded + * ``` ### Basic collection sharing Share a collection with read-only access: + * ```json { \"metadata_type\": \"COLLECTION\", + * \"metadata_identifiers\": [\"Sales Reports Collection\"], + * \"permissions\": [{ \"principal\": { \"type\": + * \"USER\", \"identifier\": \"alice@company.com\" }, + * \"share_mode\": \"READ_ONLY\" }], \"notification\": { + * \"message\": \"I've shared the Sales Reports collection with you\", + * \"notify_on_share\": true } } ``` ### Collection sharing with dual + * permissions Share a collection with different permissions for the collection vs. its + * contents: ```json { \"metadata_type\": \"COLLECTION\", + * \"metadata_identifiers\": [\"Marketing Analytics\"], + * \"permissions\": [{ \"principal\": { \"type\": + * \"USER\", \"identifier\": \"bob@company.com\" }, + * \"share_mode\": \"MODIFY\", \"content_share_mode\": + * \"READ_ONLY\" }, { \"principal\": { \"type\": + * \"USER_GROUP\", \"identifier\": \"Marketing Team\" }, + * \"share_mode\": \"READ_ONLY\", \"content_share_mode\": + * \"READ_ONLY\" }], \"notification\": { \"emails\": + * [\"bob@company.com\"], \"message\": \"You can edit the collection + * but content is read-only\", \"enable_custom_url\": false, + * \"notify_on_share\": true }, \"has_lenient_discoverability\": false } + * ``` ### Multiple collections sharing Share multiple collections with different + * users: ```json { \"metadata\": [ { \"type\": + * \"COLLECTION\", \"identifier\": \"Q4 Reports\" }, { + * \"type\": \"COLLECTION\", \"identifier\": \"Executive + * Dashboard Collection\" } ], \"permissions\": [{ \"principal\": { + * \"type\": \"USER_GROUP\", \"identifier\": + * \"Executives\" }, \"share_mode\": \"MODIFY\" }, { + * \"principal\": { \"type\": \"USER\", \"identifier\": + * \"manager@company.com\" }, \"share_mode\": \"READ_ONLY\", + * \"content_share_mode\": \"MODIFY\" }], \"notification\": { + * \"message\": \"Sharing quarterly collections with leadership team\", + * \"notify_on_share\": true } } ``` ### Remove collection access + * Remove access to a collection by setting share_mode to NO_ACCESS: ```json { + * \"metadata_type\": \"COLLECTION\", \"metadata_identifiers\": + * [\"Confidential Reports\"], \"permissions\": [{ \"principal\": + * { \"type\": \"USER\", \"identifier\": + * \"former-employee@company.com\" }, \"share_mode\": + * \"NO_ACCESS\" }], \"notification\": { \"notify_on_share\": + * false } } ``` ### Collection Permission Scenarios **Scenario 1: Collection + * Admin** - `share_mode: MODIFY` + `content_share_mode: MODIFY` = Full + * control over collection and its contents **Scenario 2: Collection Curator** - + * `share_mode: MODIFY` + `content_share_mode: READ_ONLY` = Can manage + * collection structure but not edit contents **Scenario 3: Content Editor** - `share_mode: + * READ_ONLY` + `content_share_mode: MODIFY` = Can edit objects within + * collection but can't change collection itself **Scenario 4: Viewer** - `share_mode: + * READ_ONLY` + `content_share_mode: READ_ONLY` = View-only access to + * collection and contents + * + * @throws ApiException if the Api call fails + */ + @Test + public void shareMetadataTest() throws ApiException { + ShareMetadataRequest shareMetadataRequest = null; + api.shareMetadata(shareMetadataRequest); + // TODO: test validations + } + + /** + * Version: 26.5.0.cl or later Allows unpublishing metadata objects from organizations in + * ThoughtSpot. Requires ADMINISTRATION role and TENANT scope. The API endpoint allows + * unpublishing the following types of metadata objects: * Liveboards * Answers * Logical Tables + * When unpublishing objects, you can: * Include dependencies by setting + * `include_dependencies` to true - this will unpublish all dependent objects if no + * other published object is using them * Force unpublish by setting `force` to true - + * this will break all dependent objects in the unpublished organizations + * + * @throws ApiException if the Api call fails + */ + @Test + public void unpublishMetadataTest() throws ApiException { + UnpublishMetadataRequest unpublishMetadataRequest = null; + api.unpublishMetadata(unpublishMetadataRequest); + // TODO: test validations + } + + /** + * Version: 10.12.0.cl or later Creates, updates, or deletes column security rules for specified + * tables. This API endpoint allows you to create, update, or delete column-level security rules + * on columns of a table. The operation follows an \"all or none\" policy: if defining + * security rules for any of the provided columns fails, the entire operation will be rolled + * back, and no rules will be created. #### Usage guidelines - Provide table identifier using + * either `identifier` (GUID or name) or `obj_identifier` (object ID) - Use + * `clear_csr: true` to remove all column security rules from the table - For each + * column, specify the security rule using `column_security_rules` array - Use + * `is_unsecured: true` to mark a specific column as unprotected - Use + * `group_access` operations to manage group associations: - `ADD`: Add + * groups to the column's access list - `REMOVE`: Remove groups from the + * column's access list - `REPLACE`: Replace all existing groups with the + * specified groups #### Required permissions - `ADMINISTRATION` - Can administer + * ThoughtSpot - `DATAMANAGEMENT` - Can manage data (if RBAC is disabled) - + * `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` - Can manage worksheet views and tables (if + * RBAC is enabled) #### Example request ```json { \"identifier\": + * \"table-guid\", \"obj_identifier\": \"table-object-id\", + * \"clear_csr\": false, \"column_security_rules\": [ { + * \"column_identifier\": \"col id or col name\", + * \"is_unsecured\": false, \"group_access\": [ { \"operation\": + * \"ADD\", \"group_identifiers\": [\"hr_group_id\", + * \"hr_group_name\", \"finance_group_id\"] } ] }, { + * \"column_identifier\": \"col id or col name\", + * \"is_unsecured\": true }, { \"column_identifier\": \"col id or col + * name\", \"is_unsecured\": false, \"group_access\": [ { + * \"operation\": \"REPLACE\", \"group_identifiers\": + * [\"management_group_id\", \"management_group_name\"] } ] } ] } + * ``` #### Request Body Schema - `identifier` (string, optional): GUID + * or name of the table for which we want to create column security rules - + * `obj_identifier` (string, optional): The object ID of the table - + * `clear_csr` (boolean, optional): If true, then all the secured columns will be + * marked as unprotected, and all the group associations will be removed - + * `column_security_rules` (array of objects, required): An array where each object + * defines the security rule for a specific column Each column security rule object contains: - + * `column_identifier` (string, required): Column identifier (col_id or name) - + * `is_unsecured` (boolean, optional): If true, the column will be marked as + * unprotected and all groups associated with it will be removed - `group_access` + * (array of objects, optional): Array of group operation objects Each group operation object + * contains: - `operation` (string, required): Operation type - ADD, REMOVE, or + * REPLACE - `group_identifiers` (array of strings, required): Array of group + * identifiers (name or GUID) on which the operation will be performed #### Response This API + * does not return any response body. A successful operation returns HTTP 200 status code. #### + * Operation Types - **ADD**: Adds the specified groups to the column's access list - + * **REMOVE**: Removes the specified groups from the column's access list - **REPLACE**: + * Replaces all existing groups with the specified groups + * + * @throws ApiException if the Api call fails + */ + @Test + public void updateColumnSecurityRulesTest() throws ApiException { + UpdateColumnSecurityRulesRequest updateColumnSecurityRulesRequest = null; + api.updateColumnSecurityRules(updateColumnSecurityRulesRequest); + // TODO: test validations + } +} diff --git a/sdks/java/src/test/java/com/thoughtspot/client/api/SystemApiTest.java b/sdks/java/src/test/java/com/thoughtspot/client/api/SystemApiTest.java new file mode 100644 index 000000000..cad43326a --- /dev/null +++ b/sdks/java/src/test/java/com/thoughtspot/client/api/SystemApiTest.java @@ -0,0 +1,206 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client.api; + +import com.thoughtspot.client.ApiException; +import com.thoughtspot.client.model.CommunicationChannelPreferencesResponse; +import com.thoughtspot.client.model.CommunicationChannelValidateResponse; +import com.thoughtspot.client.model.ConfigureCommunicationChannelPreferencesRequest; +import com.thoughtspot.client.model.ConfigureSecuritySettingsRequest; +import com.thoughtspot.client.model.SearchCommunicationChannelPreferencesRequest; +import com.thoughtspot.client.model.SearchSecuritySettingsRequest; +import com.thoughtspot.client.model.SecuritySettingsResponse; +import com.thoughtspot.client.model.SystemConfig; +import com.thoughtspot.client.model.SystemInfo; +import com.thoughtspot.client.model.SystemOverrideInfo; +import com.thoughtspot.client.model.UpdateSystemConfigRequest; +import com.thoughtspot.client.model.ValidateCommunicationChannelRequest; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; + +/** API tests for SystemApi */ +@Disabled +public class SystemApiTest { + + private final SystemApi api = new SystemApi(); + + /** + * Version: 10.14.0.cl or later Configure communication channel preferences. - Use + * `cluster_preferences` to update the default preferences for your ThoughtSpot + * application instance. - If your instance has + * [Orgs](https://docs.thoughtspot.com/cloud/latest/orgs-overview), use + * `org_preferences` to specify Org-specific preferences that override the defaults. + * Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) or `DEVELOPER` + * (**Has developer privilege**) privilege. If [Role-Based Access Control + * (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, users with + * `APPLICATION_ADMINISTRATION` (**Can manage application settings**) privilege are + * also authorized to perform this action. + * + * @throws ApiException if the Api call fails + */ + @Test + public void configureCommunicationChannelPreferencesTest() throws ApiException { + ConfigureCommunicationChannelPreferencesRequest + configureCommunicationChannelPreferencesRequest = null; + api.configureCommunicationChannelPreferences( + configureCommunicationChannelPreferencesRequest); + // TODO: test validations + } + + /** + * Version: 26.2.0.cl or later Configure security settings for your ThoughtSpot application + * instance. - Use `cluster_preferences` to update cluster-level security settings + * including CORS whitelisted URLs, CSP settings, SAML redirect URLs, partitioned cookies, and + * non-embed access configuration. - Use `org_preferences` to configure Org-specific + * security settings. If your instance has + * [Orgs](https://docs.thoughtspot.com/cloud/latest/orgs-overview), this allows configuring CORS + * and non-embed access settings specific to the Org. Requires `ADMINISTRATION` (**Can + * administer ThoughtSpot**) or `DEVELOPER` (**Has developer privilege**) privilege. + * Cluster-level SAML and script-src settings require `ADMINISTRATION` privilege. See + * [Security Settings](https://developers.thoughtspot.com/docs/security-settings) for more + * details. + * + * @throws ApiException if the Api call fails + */ + @Test + public void configureSecuritySettingsTest() throws ApiException { + ConfigureSecuritySettingsRequest configureSecuritySettingsRequest = null; + api.configureSecuritySettings(configureSecuritySettingsRequest); + // TODO: test validations + } + + /** + * Version: 9.0.0.cl or later Retrieves the current configuration details of the cluster. If the + * request is successful, the API returns a list configuration settings applied on the cluster. + * Requires `ADMINISTRATION`(**Can administer ThoughtSpot**) privilege to view these + * complete configuration settings of the cluster. If [Role-Based Access Control + * (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the + * `SYSTEM_INFO_ADMINISTRATION` (**Can view system activities**) privilege is + * required. This API does not require any parameters to be passed in the request. + * + * @throws ApiException if the Api call fails + */ + @Test + public void getSystemConfigTest() throws ApiException { + SystemConfig response = api.getSystemConfig(); + // TODO: test validations + } + + /** + * Version: 9.0.0.cl or later Gets system information such as the release version, locale, time + * zone, deployment environment, date format, and date time format of the cluster. Requires + * `ADMINISTRATION` (**Can administer ThoughtSpot**) privileges. If [Role-Based Access + * Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, + * the `SYSTEM_INFO_ADMINISTRATION` (**Can view system activities**) privilege is + * required. This API does not require any parameters to be passed in the request. + * + * @throws ApiException if the Api call fails + */ + @Test + public void getSystemInformationTest() throws ApiException { + SystemInfo response = api.getSystemInformation(); + // TODO: test validations + } + + /** + * Version: 9.2.0.cl or later Gets a list of configuration overrides applied on the cluster. + * Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If + * [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled + * on your instance, the `APPLICATION_ADMINISTRATION` (**Can manage application + * settings**) privilege is required. This API does not require any parameters to be passed in + * the request. + * + * @throws ApiException if the Api call fails + */ + @Test + public void getSystemOverrideInfoTest() throws ApiException { + SystemOverrideInfo response = api.getSystemOverrideInfo(); + // TODO: test validations + } + + /** + * Version: 10.14.0.cl or later Fetch communication channel preferences. - Use + * `cluster_preferences` to fetch the default preferences for your ThoughtSpot + * application instance. - If your instance has + * [Orgs](https://docs.thoughtspot.com/cloud/latest/orgs-overview), use + * `org_preferences` to fetch any Org-specific preferences that override the defaults. + * Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) or `DEVELOPER` + * (**Has developer privilege**) privilege. If [Role-Based Access Control + * (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, users with + * `APPLICATION_ADMINISTRATION` (**Can manage application settings**) privilege are + * also authorized to perform this action. + * + * @throws ApiException if the Api call fails + */ + @Test + public void searchCommunicationChannelPreferencesTest() throws ApiException { + SearchCommunicationChannelPreferencesRequest searchCommunicationChannelPreferencesRequest = + null; + CommunicationChannelPreferencesResponse response = + api.searchCommunicationChannelPreferences( + searchCommunicationChannelPreferencesRequest); + // TODO: test validations + } + + /** + * Version: 26.2.0.cl or later Fetch security settings for your ThoughtSpot application + * instance. - Use `scope: CLUSTER` to retrieve cluster-level security settings, + * including CORS and CSP allowlists, SAML redirect URLs, and settings that control access to + * non-embedded pages. - Use `scope: ORG` to retrieve Org-level security settings. If + * your instance has [Orgs](https://docs.thoughtspot.com/cloud/latest/orgs-overview), this + * returns CORS and non-embed access settings specific to the Org. - If `scope` is not + * specified, returns both cluster and Org-specific settings based on user privileges. Requires + * `ADMINISTRATION` (**Can administer ThoughtSpot**) or `DEVELOPER` (**Has + * developer privilege**) privilege. See [Security + * Settings](https://developers.thoughtspot.com/docs/security-settings) for more details. + * + * @throws ApiException if the Api call fails + */ + @Test + public void searchSecuritySettingsTest() throws ApiException { + SearchSecuritySettingsRequest searchSecuritySettingsRequest = null; + SecuritySettingsResponse response = + api.searchSecuritySettings(searchSecuritySettingsRequest); + // TODO: test validations + } + + /** + * Version: 9.2.0.cl or later Updates the current configuration of the cluster. You must send + * the configuration data in JSON format. Requires `ADMINISTRATION` (**Can administer + * ThoughtSpot**) privileges. If [Role-Based Access Control + * (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the + * `APPLICATION_ADMINISTRATION` (**Can manage application settings**) privilege is + * required. + * + * @throws ApiException if the Api call fails + */ + @Test + public void updateSystemConfigTest() throws ApiException { + UpdateSystemConfigRequest updateSystemConfigRequest = null; + api.updateSystemConfig(updateSystemConfigRequest); + // TODO: test validations + } + + /** + * Version: 26.4.0.cl or later Validates a communication channel configuration to ensure it is + * properly set up and can receive events. - Use `channel_type` to specify the type of + * communication channel to validate (e.g., WEBHOOK). - Use `channel_identifier` to + * provide the unique identifier or name for the communication channel. - Use + * `event_type` to specify the event type to validate for this channel. Requires + * `ADMINISTRATION` (**Can administer ThoughtSpot**) or `DEVELOPER` (**Has + * developer privilege**) privilege. For webhook channels, users with + * `CAN_MANAGE_WEBHOOKS` (**Can manage webhooks**) privilege are also authorized to + * perform this action. + * + * @throws ApiException if the Api call fails + */ + @Test + public void validateCommunicationChannelTest() throws ApiException { + ValidateCommunicationChannelRequest validateCommunicationChannelRequest = null; + CommunicationChannelValidateResponse response = + api.validateCommunicationChannel(validateCommunicationChannelRequest); + // TODO: test validations + } +} diff --git a/sdks/java/src/test/java/com/thoughtspot/client/api/TagsApiTest.java b/sdks/java/src/test/java/com/thoughtspot/client/api/TagsApiTest.java new file mode 100644 index 000000000..4436b33d1 --- /dev/null +++ b/sdks/java/src/test/java/com/thoughtspot/client/api/TagsApiTest.java @@ -0,0 +1,115 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client.api; + +import com.thoughtspot.client.ApiException; +import com.thoughtspot.client.model.AssignTagRequest; +import com.thoughtspot.client.model.CreateTagRequest; +import com.thoughtspot.client.model.SearchTagsRequest; +import com.thoughtspot.client.model.Tag; +import com.thoughtspot.client.model.UnassignTagRequest; +import com.thoughtspot.client.model.UpdateTagRequest; +import java.util.List; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; + +/** API tests for TagsApi */ +@Disabled +public class TagsApiTest { + + private final TagsApi api = new TagsApi(); + + /** + * Version: 9.0.0.cl or later Assigns tags to Liveboards, Answers, Tables, and Worksheets. + * Requires edit access to the metadata object. + * + * @throws ApiException if the Api call fails + */ + @Test + public void assignTagTest() throws ApiException { + AssignTagRequest assignTagRequest = null; + api.assignTag(assignTagRequest); + // TODO: test validations + } + + /** + * Version: 9.0.0.cl or later Creates a tag object. Tags are labels that identify a metadata + * object. For example, you can create a tag to designate subject areas, such as sales, HR, + * marketing, and finance. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) + * privilege. If [Role-Based Access Control + * (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the + * `TAGMANAGEMENT` (**Can manage tags**) privilege is required to create, edit, and + * delete tags. + * + * @throws ApiException if the Api call fails + */ + @Test + public void createTagTest() throws ApiException { + CreateTagRequest createTagRequest = null; + Tag response = api.createTag(createTagRequest); + // TODO: test validations + } + + /** + * Version: 9.0.0.cl or later Deletes a tag object from the ThoughtSpot system Requires + * `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access + * Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, + * the `TAGMANAGEMENT` (**Can manage tags**) privilege is required to create, edit, + * and delete tags. + * + * @throws ApiException if the Api call fails + */ + @Test + public void deleteTagTest() throws ApiException { + String tagIdentifier = null; + api.deleteTag(tagIdentifier); + // TODO: test validations + } + + /** + * Version: 9.0.0.cl or later Gets a list of tag objects available on the ThoughtSpot system. To + * get details of a specific tag object, specify the GUID or name. Any authenticated user can + * search for tag objects. + * + * @throws ApiException if the Api call fails + */ + @Test + public void searchTagsTest() throws ApiException { + SearchTagsRequest searchTagsRequest = null; + List response = api.searchTags(searchTagsRequest); + // TODO: test validations + } + + /** + * Version: 9.0.0.cl or later Removes the tags applied to a Liveboard, Answer, Table, or + * Worksheet. Requires edit access to the metadata object. + * + * @throws ApiException if the Api call fails + */ + @Test + public void unassignTagTest() throws ApiException { + UnassignTagRequest unassignTagRequest = null; + api.unassignTag(unassignTagRequest); + // TODO: test validations + } + + /** + * Version: 9.0.0.cl or later Updates a tag object. You can modify the `name` and + * `color` properties of a tag object. Requires `ADMINISTRATION` (**Can + * administer ThoughtSpot**) privilege. If [Role-Based Access Control + * (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the + * `TAGMANAGEMENT` (**Can manage tags**) privilege is required to create, edit, and + * delete tags. + * + * @throws ApiException if the Api call fails + */ + @Test + public void updateTagTest() throws ApiException { + String tagIdentifier = null; + UpdateTagRequest updateTagRequest = null; + api.updateTag(tagIdentifier, updateTagRequest); + // TODO: test validations + } +} diff --git a/sdks/java/src/test/java/com/thoughtspot/client/api/ThoughtSpotRestApiTest.java b/sdks/java/src/test/java/com/thoughtspot/client/api/ThoughtSpotRestApiTest.java new file mode 100644 index 000000000..b376146a0 --- /dev/null +++ b/sdks/java/src/test/java/com/thoughtspot/client/api/ThoughtSpotRestApiTest.java @@ -0,0 +1,4452 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client.api; + +import com.thoughtspot.client.ApiException; +import com.thoughtspot.client.model.AccessToken; +import com.thoughtspot.client.model.ActivateUserRequest; +import com.thoughtspot.client.model.AgentConversation; +import com.thoughtspot.client.model.AnswerDataResponse; +import com.thoughtspot.client.model.AssignChangeAuthorRequest; +import com.thoughtspot.client.model.AssignTagRequest; +import com.thoughtspot.client.model.CalendarResponse; +import com.thoughtspot.client.model.ChangeUserPasswordRequest; +import com.thoughtspot.client.model.Collection; +import com.thoughtspot.client.model.CollectionDeleteResponse; +import com.thoughtspot.client.model.CollectionSearchResponse; +import com.thoughtspot.client.model.ColumnSecurityRuleResponse; +import com.thoughtspot.client.model.CommitBranchRequest; +import com.thoughtspot.client.model.CommitHistoryResponse; +import com.thoughtspot.client.model.CommitResponse; +import com.thoughtspot.client.model.CommunicationChannelPreferencesResponse; +import com.thoughtspot.client.model.CommunicationChannelValidateResponse; +import com.thoughtspot.client.model.ConfigureAuthSettingsRequest; +import com.thoughtspot.client.model.ConfigureCommunicationChannelPreferencesRequest; +import com.thoughtspot.client.model.ConfigureSecuritySettingsRequest; +import com.thoughtspot.client.model.ConnectionConfigurationResponse; +import com.thoughtspot.client.model.ConnectionConfigurationSearchRequest; +import com.thoughtspot.client.model.Conversation; +import com.thoughtspot.client.model.ConvertWorksheetToModelRequest; +import com.thoughtspot.client.model.CopyObjectRequest; +import com.thoughtspot.client.model.CreateAgentConversationRequest; +import com.thoughtspot.client.model.CreateCalendarRequest; +import com.thoughtspot.client.model.CreateCollectionRequest; +import com.thoughtspot.client.model.CreateConfigRequest; +import com.thoughtspot.client.model.CreateConnectionConfigurationRequest; +import com.thoughtspot.client.model.CreateConnectionRequest; +import com.thoughtspot.client.model.CreateConnectionResponse; +import com.thoughtspot.client.model.CreateConversationRequest; +import com.thoughtspot.client.model.CreateCustomActionRequest; +import com.thoughtspot.client.model.CreateEmailCustomizationRequest; +import com.thoughtspot.client.model.CreateEmailCustomizationResponse; +import com.thoughtspot.client.model.CreateOrgRequest; +import com.thoughtspot.client.model.CreateRoleRequest; +import com.thoughtspot.client.model.CreateScheduleRequest; +import com.thoughtspot.client.model.CreateTagRequest; +import com.thoughtspot.client.model.CreateUserGroupRequest; +import com.thoughtspot.client.model.CreateUserRequest; +import com.thoughtspot.client.model.CreateVariableRequest; +import com.thoughtspot.client.model.CreateWebhookConfigurationRequest; +import com.thoughtspot.client.model.DbtSearchResponse; +import com.thoughtspot.client.model.DeactivateUserRequest; +import com.thoughtspot.client.model.DeleteCollectionRequest; +import com.thoughtspot.client.model.DeleteConfigRequest; +import com.thoughtspot.client.model.DeleteConnectionConfigurationRequest; +import com.thoughtspot.client.model.DeleteConnectionRequest; +import com.thoughtspot.client.model.DeleteMetadataRequest; +import com.thoughtspot.client.model.DeleteOrgEmailCustomizationRequest; +import com.thoughtspot.client.model.DeleteVariablesRequest; +import com.thoughtspot.client.model.DeleteWebhookConfigurationsRequest; +import com.thoughtspot.client.model.DeployCommitRequest; +import com.thoughtspot.client.model.DeployResponse; +import com.thoughtspot.client.model.EurekaDataSourceSuggestionResponse; +import com.thoughtspot.client.model.EurekaDecomposeQueryResponse; +import com.thoughtspot.client.model.EurekaGetNLInstructionsResponse; +import com.thoughtspot.client.model.EurekaGetRelevantQuestionsResponse; +import com.thoughtspot.client.model.EurekaSetNLInstructionsResponse; +import com.thoughtspot.client.model.ExportAnswerReportRequest; +import com.thoughtspot.client.model.ExportLiveboardReportRequest; +import com.thoughtspot.client.model.ExportMetadataTMLBatchedRequest; +import com.thoughtspot.client.model.ExportMetadataTMLRequest; +import com.thoughtspot.client.model.FetchAnswerDataRequest; +import com.thoughtspot.client.model.FetchAnswerSqlQueryRequest; +import com.thoughtspot.client.model.FetchAsyncImportTaskStatusRequest; +import com.thoughtspot.client.model.FetchColumnSecurityRulesRequest; +import com.thoughtspot.client.model.FetchConnectionDiffStatusResponse; +import com.thoughtspot.client.model.FetchLiveboardDataRequest; +import com.thoughtspot.client.model.FetchLiveboardSqlQueryRequest; +import com.thoughtspot.client.model.FetchLogsRequest; +import com.thoughtspot.client.model.FetchObjectPrivilegesRequest; +import com.thoughtspot.client.model.FetchPermissionsOfPrincipalsRequest; +import com.thoughtspot.client.model.FetchPermissionsOnMetadataRequest; +import com.thoughtspot.client.model.ForceLogoutUsersRequest; +import com.thoughtspot.client.model.GenerateCSVRequest; +import com.thoughtspot.client.model.GetAsyncImportStatusResponse; +import com.thoughtspot.client.model.GetCustomAccessTokenRequest; +import com.thoughtspot.client.model.GetDataSourceSuggestionsRequest; +import com.thoughtspot.client.model.GetFullAccessTokenRequest; +import com.thoughtspot.client.model.GetNLInstructionsRequest; +import com.thoughtspot.client.model.GetObjectAccessTokenRequest; +import com.thoughtspot.client.model.GetRelevantQuestionsRequest; +import com.thoughtspot.client.model.GetTokenResponse; +import com.thoughtspot.client.model.ImportEPackAsyncTaskStatus; +import com.thoughtspot.client.model.ImportMetadataTMLAsyncRequest; +import com.thoughtspot.client.model.ImportMetadataTMLRequest; +import com.thoughtspot.client.model.ImportUserGroupsRequest; +import com.thoughtspot.client.model.ImportUserGroupsResponse; +import com.thoughtspot.client.model.ImportUsersRequest; +import com.thoughtspot.client.model.ImportUsersResponse; +import com.thoughtspot.client.model.LiveboardDataResponse; +import com.thoughtspot.client.model.LogResponse; +import com.thoughtspot.client.model.LoginRequest; +import com.thoughtspot.client.model.ManageObjectPrivilegeRequest; +import com.thoughtspot.client.model.MetadataSearchResponse; +import com.thoughtspot.client.model.ObjectPrivilegesOfMetadataResponse; +import com.thoughtspot.client.model.OrgResponse; +import com.thoughtspot.client.model.ParameterizeMetadataFieldsRequest; +import com.thoughtspot.client.model.ParameterizeMetadataRequest; +import com.thoughtspot.client.model.PermissionOfMetadataResponse; +import com.thoughtspot.client.model.PermissionOfPrincipalsResponse; +import com.thoughtspot.client.model.PublishMetadataRequest; +import com.thoughtspot.client.model.PutVariableValuesRequest; +import com.thoughtspot.client.model.QueryGetDecomposedQueryRequest; +import com.thoughtspot.client.model.RepoConfigObject; +import com.thoughtspot.client.model.ResetUserPasswordRequest; +import com.thoughtspot.client.model.ResponseActivationURL; +import com.thoughtspot.client.model.ResponseCopyObject; +import com.thoughtspot.client.model.ResponseCustomAction; +import com.thoughtspot.client.model.ResponseMessage; +import com.thoughtspot.client.model.ResponseSchedule; +import com.thoughtspot.client.model.ResponseWorksheetToModelConversion; +import com.thoughtspot.client.model.RevertCommitRequest; +import com.thoughtspot.client.model.RevertResponse; +import com.thoughtspot.client.model.RevokeRefreshTokensRequest; +import com.thoughtspot.client.model.RevokeRefreshTokensResponse; +import com.thoughtspot.client.model.RevokeTokenRequest; +import com.thoughtspot.client.model.RoleResponse; +import com.thoughtspot.client.model.SearchAuthSettingsRequest; +import com.thoughtspot.client.model.SearchAuthSettingsResponse; +import com.thoughtspot.client.model.SearchCalendarsRequest; +import com.thoughtspot.client.model.SearchChannelHistoryRequest; +import com.thoughtspot.client.model.SearchChannelHistoryResponse; +import com.thoughtspot.client.model.SearchCollectionsRequest; +import com.thoughtspot.client.model.SearchCommitsRequest; +import com.thoughtspot.client.model.SearchCommunicationChannelPreferencesRequest; +import com.thoughtspot.client.model.SearchConfigRequest; +import com.thoughtspot.client.model.SearchConnectionRequest; +import com.thoughtspot.client.model.SearchConnectionResponse; +import com.thoughtspot.client.model.SearchCustomActionsRequest; +import com.thoughtspot.client.model.SearchDataRequest; +import com.thoughtspot.client.model.SearchDataResponse; +import com.thoughtspot.client.model.SearchEmailCustomizationRequest; +import com.thoughtspot.client.model.SearchMetadataRequest; +import com.thoughtspot.client.model.SearchOrgsRequest; +import com.thoughtspot.client.model.SearchRoleResponse; +import com.thoughtspot.client.model.SearchRolesRequest; +import com.thoughtspot.client.model.SearchSchedulesRequest; +import com.thoughtspot.client.model.SearchSecuritySettingsRequest; +import com.thoughtspot.client.model.SearchTagsRequest; +import com.thoughtspot.client.model.SearchUserGroupsRequest; +import com.thoughtspot.client.model.SearchUsersRequest; +import com.thoughtspot.client.model.SearchVariablesRequest; +import com.thoughtspot.client.model.SearchWebhookConfigurationsRequest; +import com.thoughtspot.client.model.SecuritySettingsResponse; +import com.thoughtspot.client.model.SendAgentConversationMessageRequest; +import com.thoughtspot.client.model.SendAgentConversationMessageStreamingRequest; +import com.thoughtspot.client.model.SendAgentMessageRequest; +import com.thoughtspot.client.model.SendAgentMessageResponse; +import com.thoughtspot.client.model.SendAgentMessageStreamingRequest; +import com.thoughtspot.client.model.SendMessageRequest; +import com.thoughtspot.client.model.SetNLInstructionsRequest; +import com.thoughtspot.client.model.ShareMetadataRequest; +import com.thoughtspot.client.model.SingleAnswerRequest; +import com.thoughtspot.client.model.SqlQueryResponse; +import com.thoughtspot.client.model.SyncMetadataRequest; +import com.thoughtspot.client.model.SyncMetadataResponse; +import com.thoughtspot.client.model.SystemConfig; +import com.thoughtspot.client.model.SystemInfo; +import com.thoughtspot.client.model.SystemOverrideInfo; +import com.thoughtspot.client.model.Tag; +import com.thoughtspot.client.model.Token; +import com.thoughtspot.client.model.TokenValidationResponse; +import com.thoughtspot.client.model.UnassignTagRequest; +import com.thoughtspot.client.model.UnparameterizeMetadataRequest; +import com.thoughtspot.client.model.UnpublishMetadataRequest; +import com.thoughtspot.client.model.UpdateCalendarRequest; +import com.thoughtspot.client.model.UpdateCollectionRequest; +import com.thoughtspot.client.model.UpdateColumnSecurityRulesRequest; +import com.thoughtspot.client.model.UpdateConfigRequest; +import com.thoughtspot.client.model.UpdateConnectionConfigurationRequest; +import com.thoughtspot.client.model.UpdateConnectionRequest; +import com.thoughtspot.client.model.UpdateConnectionStatusRequest; +import com.thoughtspot.client.model.UpdateConnectionV2Request; +import com.thoughtspot.client.model.UpdateCustomActionRequest; +import com.thoughtspot.client.model.UpdateEmailCustomizationRequest; +import com.thoughtspot.client.model.UpdateMetadataHeaderRequest; +import com.thoughtspot.client.model.UpdateMetadataObjIdRequest; +import com.thoughtspot.client.model.UpdateOrgRequest; +import com.thoughtspot.client.model.UpdateRoleRequest; +import com.thoughtspot.client.model.UpdateScheduleRequest; +import com.thoughtspot.client.model.UpdateSystemConfigRequest; +import com.thoughtspot.client.model.UpdateTagRequest; +import com.thoughtspot.client.model.UpdateUserGroupRequest; +import com.thoughtspot.client.model.UpdateUserRequest; +import com.thoughtspot.client.model.UpdateVariableRequest; +import com.thoughtspot.client.model.UpdateVariableValuesRequest; +import com.thoughtspot.client.model.UpdateWebhookConfigurationRequest; +import com.thoughtspot.client.model.User; +import com.thoughtspot.client.model.UserGroupResponse; +import com.thoughtspot.client.model.ValidateCommunicationChannelRequest; +import com.thoughtspot.client.model.ValidateMergeRequest; +import com.thoughtspot.client.model.ValidateTokenRequest; +import com.thoughtspot.client.model.Variable; +import com.thoughtspot.client.model.WebhookDeleteResponse; +import com.thoughtspot.client.model.WebhookResponse; +import com.thoughtspot.client.model.WebhookSearchResponse; +import java.io.File; +import java.util.List; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; + +/** API tests for ThoughtSpotRestApi */ +@Disabled +public class ThoughtSpotRestApiTest { + + private final ThoughtSpotRestApi api = new ThoughtSpotRestApi(); + + /** + * Version: 9.7.0.cl or later Activates a deactivated user account. Requires + * `ADMINISTRATION` (**Can administer Thoughtspot**) privilege. If [Role-Based Access + * Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, + * the `USER_ADMINISTRATION` (**Can manage users**) privilege is required. To activate + * an inactive user account, the API request body must include the following information: - + * Username or the GUID of the user account. - Auth token generated for the deactivated user. + * The auth token is sent in the API response when a user is deactivated. - Password for the + * user account. + * + * @throws ApiException if the Api call fails + */ + @Test + public void activateUserTest() throws ApiException { + ActivateUserRequest activateUserRequest = null; + User response = api.activateUser(activateUserRequest); + // TODO: test validations + } + + /** + * Version: 9.0.0.cl or later Transfers the ownership of one or several objects from one user to + * another. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If + * [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled + * on your instance, the `USER_ADMINISTRATION` (**Can manage users**) privilege and + * edit access to the objects are required. + * + * @throws ApiException if the Api call fails + */ + @Test + public void assignChangeAuthorTest() throws ApiException { + AssignChangeAuthorRequest assignChangeAuthorRequest = null; + api.assignChangeAuthor(assignChangeAuthorRequest); + // TODO: test validations + } + + /** + * Version: 9.0.0.cl or later Assigns tags to Liveboards, Answers, Tables, and Worksheets. + * Requires edit access to the metadata object. + * + * @throws ApiException if the Api call fails + */ + @Test + public void assignTagTest() throws ApiException { + AssignTagRequest assignTagRequest = null; + api.assignTag(assignTagRequest); + // TODO: test validations + } + + /** + * Version: 9.0.0.cl or later Updates the current password of the user. Requires + * `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access + * Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, + * the `USER_ADMINISTRATION` (**Can manage users**) privilege is required. + * + * @throws ApiException if the Api call fails + */ + @Test + public void changeUserPasswordTest() throws ApiException { + ChangeUserPasswordRequest changeUserPasswordRequest = null; + api.changeUserPassword(changeUserPasswordRequest); + // TODO: test validations + } + + /** + * Version: 9.2.0.cl or later Commits TML files of metadata objects to the Git branch configured + * on your instance. Requires at least edit access to objects used in the commit operation. + * Before using this endpoint to push your commits: * Enable Git integration on your instance. * + * Make sure the Git repository and branch details are configured on your instance. For more + * information, see [Git integration + * documentation](https://developers.thoughtspot.com/docs/git-integration). + * + * @throws ApiException if the Api call fails + */ + @Test + public void commitBranchTest() throws ApiException { + CommitBranchRequest commitBranchRequest = null; + CommitResponse response = api.commitBranch(commitBranchRequest); + // TODO: test validations + } + + /** + * Version: 26.6.0.cl or later Enables or disables authentication at cluster or org level for + * the specified auth type. Currently supports `TRUSTED_AUTH`. #### Required + * privileges Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) or + * `CONTROL_TRUSTED_AUTH` (**Can Enable or Disable Trusted Authentication**) + * privilege. If [Role-Based Access Control + * (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled, the + * `CONTROL_TRUSTED_AUTH` privilege is required. #### Usage guidelines Use + * `cluster_preferences` to enable or disable authentication at the cluster level. + * Cluster-level settings can only be configured from the Primary Org. - `ENABLED` — + * Generates a new access token if one does not exist. An existing token is preserved. - + * `DISABLED` — Revokes the existing cluster-level access token. Use + * `org_preferences` to enable or disable authentication for one or more Orgs. Each + * entry must include an `org_identifier` (unique ID or name) and an + * `auth_status`. Org-level configuration requires the per-Org authentication feature + * to be enabled on your instance. - `ENABLED` — Generates a new org-level access + * token if one does not exist. - `DISABLED` — Revokes the existing org-level access + * token for that Org. Both `cluster_preferences` and `org_preferences` are + * optional. Omitting a field leaves the corresponding settings unchanged. If both are omitted, + * the API returns `204 No Content` without making any changes. **Note**: + * Cluster-level and org-level settings are independent of each other. Enabling or disabling one + * does not affect the other. + * + * @throws ApiException if the Api call fails + */ + @Test + public void configureAuthSettingsTest() throws ApiException { + ConfigureAuthSettingsRequest configureAuthSettingsRequest = null; + api.configureAuthSettings(configureAuthSettingsRequest); + // TODO: test validations + } + + /** + * Version: 10.14.0.cl or later Configure communication channel preferences. - Use + * `cluster_preferences` to update the default preferences for your ThoughtSpot + * application instance. - If your instance has + * [Orgs](https://docs.thoughtspot.com/cloud/latest/orgs-overview), use + * `org_preferences` to specify Org-specific preferences that override the defaults. + * Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) or `DEVELOPER` + * (**Has developer privilege**) privilege. If [Role-Based Access Control + * (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, users with + * `APPLICATION_ADMINISTRATION` (**Can manage application settings**) privilege are + * also authorized to perform this action. + * + * @throws ApiException if the Api call fails + */ + @Test + public void configureCommunicationChannelPreferencesTest() throws ApiException { + ConfigureCommunicationChannelPreferencesRequest + configureCommunicationChannelPreferencesRequest = null; + api.configureCommunicationChannelPreferences( + configureCommunicationChannelPreferencesRequest); + // TODO: test validations + } + + /** + * Version: 26.2.0.cl or later Configure security settings for your ThoughtSpot application + * instance. - Use `cluster_preferences` to update cluster-level security settings + * including CORS whitelisted URLs, CSP settings, SAML redirect URLs, partitioned cookies, and + * non-embed access configuration. - Use `org_preferences` to configure Org-specific + * security settings. If your instance has + * [Orgs](https://docs.thoughtspot.com/cloud/latest/orgs-overview), this allows configuring CORS + * and non-embed access settings specific to the Org. Requires `ADMINISTRATION` (**Can + * administer ThoughtSpot**) or `DEVELOPER` (**Has developer privilege**) privilege. + * Cluster-level SAML and script-src settings require `ADMINISTRATION` privilege. See + * [Security Settings](https://developers.thoughtspot.com/docs/security-settings) for more + * details. + * + * @throws ApiException if the Api call fails + */ + @Test + public void configureSecuritySettingsTest() throws ApiException { + ConfigureSecuritySettingsRequest configureSecuritySettingsRequest = null; + api.configureSecuritySettings(configureSecuritySettingsRequest); + // TODO: test validations + } + + /** + * Version: 10.12.0.cl or later Gets connection configuration objects. Requires + * `DATAMANAGEMENT` (**Can manage data**) and edit permissions to the connection + * object, or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If + * [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled + * on your instance, the `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit + * Connections**) privilege is required. #### Usage guidelines * To get a list of all + * configurations available in the ThoughtSpot system, send the API request with only the + * connection name or GUID in the request body. * To fetch details of a configuration object, + * specify the configuration object name or GUID. + * + * @throws ApiException if the Api call fails + */ + @Test + public void connectionConfigurationSearchTest() throws ApiException { + ConnectionConfigurationSearchRequest connectionConfigurationSearchRequest = null; + List response = + api.connectionConfigurationSearch(connectionConfigurationSearchRequest); + // TODO: test validations + } + + /** + * Convert worksheets to models Version: 10.6.0.cl or later ## Prerequisites - **Privileges + * Required:** - `DATAMANAGEMENT` (Can manage data) or `ADMINISTRATION` (Can + * administer ThoughtSpot). - **Additional Privileges (if RBAC is enabled):** - + * `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` (Can manage data models). --- ## Usage + * Guidelines ### Parameters 1. **worksheet_ids** - **Description:** A comma-separated list of + * GUIDs (Globally Unique Identifiers) specifying the Worksheets to be converted. - **Usage:** - + * Used only when `convert_all` is set to `false`. - Leave empty or omit + * when `convert_all` is set to `true`. 2. **exclude_worksheet_ids** - + * **Description:** A comma-separated list of GUIDs specifying Worksheets to be excluded from + * conversion. - **Usage:** - Useful when `convert_all` is set to `true` and + * specific Worksheets should not be converted. 3. **convert_all** - **Description:** Sets the + * scope of conversion. - **Options:** - `true`: Converts all Worksheets in the + * system, except those specified in `exclude_worksheet_ids`. - `false`: + * Converts only the Worksheets listed in `worksheet_ids`. 4. **apply_changes** - + * **Description:** Specifies whether to apply changes directly to ThoughtSpot or to generate a + * preview before applying any changes.Used for validation of conversion. - **Options:** - + * `true`: Applies conversion changes directly to ThoughtSpot. - `false`: + * Generates only a preview of the changes and does not apply any changes to ThoughtSpot --- ## + * Best Practices 1. **Backup Before Conversion:** Always export metadata as a backup before + * initiating the conversion process 2. **Partial Conversion for Testing:** Test the conversion + * process by setting `convert_all` to `false` and specifying a small number + * of `worksheet_ids`. 3. **Verify Dependencies:** Check for dependent objects, such + * as Tables and Connections, to avoid invalid references. 4. **Review Changes:** Use + * `apply_changes: false` to preview the impact of the conversion before applying + * changes. --- ## Examples ### Convert Specific Worksheets ```json { + * \"worksheet_ids\": [\"guid1\", \"guid2\", \"guid3\"], + * \"exclude_worksheet_ids\": [], \"convert_all\": false, + * \"apply_changes\": true } ``` ### Convert All Accessible Worksheets + * ```json { \"worksheet_ids\": [], + * \"exclude_worksheet_ids\": [], \"convert_all\": true, + * \"apply_changes\": true } ``` ### Exclude Specific Worksheets While + * Converting All Accessible Worksheets ```json { \"worksheet_ids\": + * [], \"exclude_worksheet_ids\": [\"abc\"], \"convert_all\": + * true, \"apply_changes\": true } ``` + * + * @throws ApiException if the Api call fails + */ + @Test + public void convertWorksheetToModelTest() throws ApiException { + ConvertWorksheetToModelRequest convertWorksheetToModelRequest = null; + ResponseWorksheetToModelConversion response = + api.convertWorksheetToModel(convertWorksheetToModelRequest); + // TODO: test validations + } + + /** + * Makes a copy of an Answer or Liveboard Version: 10.3.0.cl or later Creates a copy of a + * metadata object. Requires at least view access to the metadata object being copied. Upon + * successful execution, the API creates a copy of the metadata object specified in the API + * request and returns the ID of the new object. + * + * @throws ApiException if the Api call fails + */ + @Test + public void copyObjectTest() throws ApiException { + CopyObjectRequest copyObjectRequest = null; + ResponseCopyObject response = api.copyObject(copyObjectRequest); + // TODO: test validations + } + + /** + * Version: 26.2.0.cl or later Creates a new Spotter agent conversation based on the provided + * context and settings. The endpoint was in Beta from 26.2.0.cl through 26.4.0.cl. Requires + * `CAN_USE_SPOTTER` privilege and at least view access to the metadata object + * specified in the request. #### Usage guidelines The request must include the + * `metadata_context` parameter to define the conversation context. The context type + * can be one of: - `DATA_SOURCE` *(available from 26.5.0.cl)*: targets a specific + * data source. Provide `data_source_identifier` in `data_source_context` + * for a single data source, or `data_source_identifiers` for multi-data-source + * context. The deprecated `guid` field is accepted for backwards compatibility. - + * `AUTO_MODE` *(available from 26.5.0.cl)*: automatically discovers and selects the + * most relevant datasets for the user's queries. > **Note for callers on versions + * 26.2.0.cl – 26.4.0.cl (Beta):** use the lowercase `data_source` enum value with the + * `guid` field instead of the above. Example: `{ \"type\": + * \"data_source\", \"data_source_context\": { \"guid\": + * \"<worksheet-id>\" } }`. The `conversation_settings` parameter + * controls which Spotter capabilities are enabled for the conversation: - + * `enable_contextual_change_analysis` (default: `true`, **deprecated from + * 26.2.0.cl**) — always enabled in Spotter 3; setting this to `false` has no effect + * on versions >= 26.2.0.cl - `enable_natural_language_answer_generation` + * (default: `true`, **deprecated from 26.2.0.cl**) — always enabled in Spotter 3; + * setting this to `false` has no effect on versions >= 26.2.0.cl - + * `enable_reasoning` (default: `true`, **deprecated from 26.2.0.cl**) — + * always enabled in Spotter 3; setting this to `false` has no effect on versions + * >= 26.2.0.cl - `enable_save_chat` (default: `false`, *available + * from 26.5.0.cl*) — enables saving the conversation for later retrieval via conversation + * history If the request is successful, the response includes a unique + * `conversation_identifier` that must be passed to + * `sendAgentConversationMessage` or `sendAgentConversationMessageStreaming` + * to send messages within this conversation. The response also includes + * `conversation_id` with the same value for backwards compatibility; use + * `conversation_identifier` for new integrations. #### Example request + * ```json { \"metadata_context\": { \"type\": + * \"DATA_SOURCE\", \"data_source_context\": { + * \"data_source_identifier\": \"a1b2c3d4-e5f6-7890-abcd-ef1234567890\" } }, + * \"conversation_settings\": {} } ``` #### Error responses | Code | + * Description | | ---- | + * --------------------------------------------------------------------------------------------------------------------------------------- + * | | 401 | Unauthorized — authentication token is missing, expired, or invalid. | | 403 | + * Forbidden — the authenticated user does not have `CAN_USE_SPOTTER` privilege or + * lacks view permission on the specified metadata object. | > ###### Note: > > - This + * endpoint was in Beta from 26.2.0.cl through 26.4.0.cl and is Generally Available from version + * 26.5.0.cl. > - This endpoint requires Spotter - please contact ThoughtSpot support to + * enable Spotter on your cluster. + * + * @throws ApiException if the Api call fails + */ + @Test + public void createAgentConversationTest() throws ApiException { + CreateAgentConversationRequest createAgentConversationRequest = null; + AgentConversation response = api.createAgentConversation(createAgentConversationRequest); + // TODO: test validations + } + + /** + * Version: 10.12.0.cl or later Creates a new [custom + * calendar](https://docs.thoughtspot.com/cloud/latest/connections-cust-cal). Requires + * `DATAMANAGEMENT` (**Can manage data**) or `ADMINISTRATION` (**Can + * administer ThoughtSpot**) privilege. If [Role-Based Access Control + * (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your ThoughtSpot + * instance, the `CAN_MANAGE_CUSTOM_CALENDAR` (**Can manage custom calendars**) + * privilege is required. #### Usage guidelines You can create a custom calendar from scratch or + * an existing Table in ThoughtSpot. For both methods of calendar creation, the following + * parameters are required: * Name of the custom calendar. * Calendar creation method. To create + * a calendar from an existing table, specify the method: - `FROM_EXISTING_TABLE` - + * Creates calendar from the table reference provided in the API request. - + * `FROM_INPUT_PARAMS` - Creates a calendar from the parameters defined in the API + * request. * Connection ID and Table name * Database and schema name attributes: For most Cloud + * Data Warehouse (CDW) connectors, both `database_name` and `schema_name` + * attributes are required. However, the attribute requirements are conditional and vary based + * on the connector type and its metadata structure. For example, for connectors such as + * Teradata, MySQL, SingleSore, Amazon Aurora MySQL, Amazon RDS MySQL, Oracle, and GCP_MYSQL, + * the `schema_name` is required, whereas the `database_name` attribute is + * not. Similarly, connectors such as ClickHouse require you to specify the + * `database_name` and the schema specification in such cases is optional. **NOTE**: + * If you are creating a calendar from an existing table, ensure that the referenced table + * matches the required DDL for custom calendars. If the schema does not match, the API returns + * an error. ##### Calendar type The API allows you to create the following types of calendars: + * * `MONTH_OFFSET`. The default calendar type. A `MONTH_OFFSET` calendar is + * offset by a few months from the standard calendar months (January to December) and the year + * begins with the month defined in the request. For example, if the `month_offset` + * value is set as `April`, the calendar year begins in April. * `4-4-5`. + * Each quarter in the calendar will include two 4-week months followed by one 5-week month. * + * `4-5-4`. Each quarter in the calendar will include two 4-week months with a 5-week + * month between. * `5-4-4`. Each quarter begins with a 5-week month, followed by two + * 4-week months. To start and end the calendar on a specific date, specify the dates in the + * `MM/DD/YYYY` format. For `MONTH_OFFSET` calendars, ensure that the + * `start_date` matches the month specified in the `month_offset` attribute. + * You can also set the starting day of the week and customize the prefixes for year and quarter + * labels. #### Examples To create a calendar from an existing table: ``` { + * \"name\": \"MyCustomCalendar1\", \"table_reference\": { + * \"connection_identifier\": \"4db8ea22-2ff4-4224-b05a-26674717e468\", + * \"table_name\": \"MyCalendarTable\", \"database_name\": + * \"RETAILAPPAREL\", \"schema_name\": \"PUBLIC\" }, + * \"creation_method\": \"FROM_EXISTING_TABLE\", } ``` To + * create a calendar from scratch: ``` { \"name\": + * \"MyCustomCalendar1\", \"table_reference\": { + * \"connection_identifier\": \"4db8ea22-2ff4-4224-b05a-26674717e468\", + * \"table_name\": \"MyCalendarTable\", \"database_name\": + * \"RETAILAPPAREL\", \"schema_name\": \"PUBLIC\" }, + * \"creation_method\": \"FROM_INPUT_PARAMS\", \"calendar_type\": + * \"MONTH_OFFSET\", \"month_offset\": \"April\", + * \"start_day_of_week\": \"Monday\", \"quarter_name_prefix\": + * \"Q\", \"year_name_prefix\": \"FY\", \"start_date\": + * \"04/01/2025\", \"end_date\": \"04/31/2025\" } + * ``` + * + * @throws ApiException if the Api call fails + */ + @Test + public void createCalendarTest() throws ApiException { + CreateCalendarRequest createCalendarRequest = null; + CalendarResponse response = api.createCalendar(createCalendarRequest); + // TODO: test validations + } + + /** + * Version: 26.4.0.cl or later Creates a new collection in ThoughtSpot. Collections allow you to + * organize and group related metadata objects such as Liveboards, Answers, worksheets, and + * other data objects. You can also create nested collections (sub-collections) to build a + * hierarchical structure. #### Supported operations The API endpoint lets you perform the + * following operations: * Create a new collection * Add metadata objects (Liveboards, Answers, + * Logical Tables) to the collection * Create nested collections by adding sub-collections + * + * @throws ApiException if the Api call fails + */ + @Test + public void createCollectionTest() throws ApiException { + CreateCollectionRequest createCollectionRequest = null; + Collection response = api.createCollection(createCollectionRequest); + // TODO: test validations + } + + /** + * Version: 9.2.0.cl or later Allows you to connect a ThoughtSpot instance to a Git repository. + * Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If + * [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled + * on your instance on your instance, the `CAN_SETUP_VERSION_CONTROL` (**Can set up + * version control**) privilege. You can use this API endpoint to connect your ThoughtSpot + * development and production environments to the development and production branches of a Git + * repository. Before using this endpoint to connect your ThoughtSpot instance to a Git + * repository, check the following prerequisites: * You have a Git repository. If you are using + * GitHub, make sure you have a valid account and an access token to connect ThoughtSpot to + * GitHub. For information about generating a token, see [GitHub + * Documentation](https://docs.github.com/en/authentication/keeping-your-account-and-data-secure/managing-your-personal-access-tokens). + * * Your access token has `repo` scope that grants full access to public and private + * repositories. * Your Git repository has a branch that can be configured as a default branch + * in ThoughtSpot. For more information, see [Git integration + * documentation](https://developers.thoughtspot.com/docs/?pageid=git-integration). + * **Note**: ThoughtSpot supports only GitHub / itHub Enterprise for CI/CD. + * + * @throws ApiException if the Api call fails + */ + @Test + public void createConfigTest() throws ApiException { + CreateConfigRequest createConfigRequest = null; + RepoConfigObject response = api.createConfig(createConfigRequest); + // TODO: test validations + } + + /** + * Version: 9.2.0.cl or later Creates a connection to a data warehouse for live query services. + * Requires `DATAMANAGEMENT` (**Can manage data**) or `ADMINISTRATION` + * (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control + * (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the + * `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) privilege is + * required. #### Create a connection without tables To create a connection without tables: 1. + * Pass these parameters in your API request. * Name of the connection. * Type of the data + * warehouse to connect to. * A JSON map of configuration attributes in + * `data_warehouse_config`. The following example shows the configuration attributes + * for a SnowFlake connection: ``` { \"configuration\":{ + * \"accountName\":\"thoughtspot_partner\", + * \"user\":\"tsadmin\", \"password\":\"TestConn123\", + * \"role\":\"sysadmin\", \"warehouse\":\"MEDIUM_WH\" }, + * \"authenticationType\": \"SERVICE_ACCOUNT\", + * \"externalDatabases\":[ ] } ``` 2. Set `validate` to + * `false`. **NOTE:** If the `authentication_type` is anything other than + * SERVICE_ACCOUNT, you must explicitly provide the authenticationType property in the payload. + * If you do not specify authenticationType, the API will default to SERVICE_ACCOUNT as the + * authentication type. #### Create a connection with tables If [Role-Based Access Control + * (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the + * `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) and + * `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` (**Can manage data models**) privilege is + * required. To create a connection with tables: 1. Pass these parameters in your API request. * + * Name of the connection. * Type of the data warehouse to connect to. * A JSON map of + * configuration attributes, database details, and table properties in + * `data_warehouse_config` as shown in the following example: ``` { + * \"configuration\":{ \"accountName\":\"thoughtspot_partner\", + * \"user\":\"tsadmin\", \"password\":\"TestConn123\", + * \"role\":\"sysadmin\", \"warehouse\":\"MEDIUM_WH\" }, + * \"authenticationType\": \"SERVICE_ACCOUNT\", + * \"externalDatabases\":[ { \"name\":\"AllDatatypes\", + * \"isAutoCreated\":false, \"schemas\":[ { + * \"name\":\"alldatatypes\", \"tables\":[ { + * \"name\":\"allDatatypes\", \"type\":\"TABLE\", + * \"description\":\"\", \"selected\":true, + * \"linked\":true, \"columns\":[ { + * \"name\":\"CNUMBER\", \"type\":\"INT64\", + * \"canImport\":true, \"selected\":true, \"isLinkedActive\":true, + * \"isImported\":false, \"tableName\":\"allDatatypes\", + * \"schemaName\":\"alldatatypes\", + * \"dbName\":\"AllDatatypes\" }, { + * \"name\":\"CDECIMAL\", \"type\":\"INT64\", + * \"canImport\":true, \"selected\":true, \"isLinkedActive\":true, + * \"isImported\":false, \"tableName\":\"allDatatypes\", + * \"schemaName\":\"alldatatypes\", + * \"dbName\":\"AllDatatypes\" } ] } ] } ] } ] } ``` 2. Set + * `validate` to `true`. **NOTE:** If the `authentication_type` is + * anything other than SERVICE_ACCOUNT, you must explicitly provide the authenticationType + * property in the payload. If you do not specify authenticationType, the API will default to + * SERVICE_ACCOUNT as the authentication type. + * + * @throws ApiException if the Api call fails + */ + @Test + public void createConnectionTest() throws ApiException { + CreateConnectionRequest createConnectionRequest = null; + CreateConnectionResponse response = api.createConnection(createConnectionRequest); + // TODO: test validations + } + + /** + * Version: 10.12.0.cl or later Creates an additional configuration to an existing connection to + * a data warehouse. Requires `DATAMANAGEMENT` (**Can manage data**) or + * `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access + * Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, + * the `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) privilege is + * required. #### Usage guidelines * A JSON map of configuration attributes in + * `configuration`. The following example shows the configuration attributes: + * ``` { \"user\":\"DEV_USER\", + * \"password\":\"TestConn123\", \"role\":\"DEV\", + * \"warehouse\":\"DEV_WH\" } ``` * If the + * `policy_type` is `PRINCIPALS`, then `policy_principals` is a + * required field. * If the `policy_type` is `PROCESSES`, then + * `policy_processes` is a required field. * If the `policy_type` is + * `NO_POLICY`, then `policy_principals` and `policy_processes` + * are not required fields. #### Parameterized Connection Support For parameterized connections + * that use OAuth authentication, only the same_as_parent and policy_process_options attributes + * are allowed in the API request. These attributes are not applicable to connections that are + * not parameterized. + * + * @throws ApiException if the Api call fails + */ + @Test + public void createConnectionConfigurationTest() throws ApiException { + CreateConnectionConfigurationRequest createConnectionConfigurationRequest = null; + ConnectionConfigurationResponse response = + api.createConnectionConfiguration(createConnectionConfigurationRequest); + // TODO: test validations + } + + /** + * Version: 10.4.0.cl or later Creates a new conversation session tied to a specific data model + * for AI-driven natural language querying. Requires `CAN_USE_SPOTTER` privilege and + * at least view access to the metadata object specified in the request. #### Usage guidelines + * The request must include: - `metadata_identifier`: the unique ID of the data source + * that provides context for the conversation Optionally, you can provide: - `tokens`: + * a token string to set initial context for the conversation (e.g., `\"[sales],[item + * type],[state]\"`) If the request is successful, ThoughtSpot returns a unique + * `conversation_identifier` that must be passed to `sendMessage` to + * continue the conversation. #### Error responses | Code | Description | |------|-------------| + * | 401 | Unauthorized — authentication token is missing, expired, or invalid. | | 403 | + * Forbidden — the authenticated user does not have `CAN_USE_SPOTTER` privilege or + * lacks view permission on the specified metadata object. | > ###### Note: > * This + * endpoint is currently in Beta. Breaking changes may be introduced before the endpoint is made + * Generally Available. > * This endpoint requires Spotter - please contact ThoughtSpot + * support to enable Spotter on your cluster. + * + * @throws ApiException if the Api call fails + */ + @Test + public void createConversationTest() throws ApiException { + CreateConversationRequest createConversationRequest = null; + Conversation response = api.createConversation(createConversationRequest); + // TODO: test validations + } + + /** + * Version: 9.6.0.cl or later Creates a custom action that appears as a menu action on a saved + * Answer or Liveboard visualization. Requires `DEVELOPER` (**Has Developer + * privilege**) or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If + * [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled + * on your instance, the `DEVELOPER` (**Has developer privilege**) privilege is + * required. #### Usage Guidelines The API lets you create the following types of custom + * actions: * URL-based action Allows pushing data to an external URL. * Callback action + * Triggers a callback to the host application and initiates a response payload on an embedded + * ThoughtSpot instance. By default, custom actions are visible to only administrator or + * developer users. To make a custom action available to other users, and specify the groups in + * `group_identifiers`. By default, the custom action is set as a _global_ action on + * all visualizations and saved Answers. To assign a custom action to specific Liveboard + * visualization, saved Answer, or Worksheet, set `visibility` to `false` in + * `default_action_config` property and specify the GUID or name of the object in + * `associate_metadata`. For more information, see [Custom + * actions](https://developers.thoughtspot.com/docs/custom-action-intro). + * + * @throws ApiException if the Api call fails + */ + @Test + public void createCustomActionTest() throws ApiException { + CreateCustomActionRequest createCustomActionRequest = null; + ResponseCustomAction response = api.createCustomAction(createCustomActionRequest); + // TODO: test validations + } + + /** + * Version: 10.10.0.cl or later Creates a customization configuration for the notification + * email. #### Pre-requisites Requires `DEVELOPER` (**has developer privilege**) or + * `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access + * Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, + * the `DEVELOPER` (**Has developer privilege**) privilege is required. **NOTE**:This + * endpoint in currently in beta. Contact ThoughtSpot support to enable this on your instance. + * #### Usage guidelines To create a custom configuration pass these parameters in your API + * request: - A JSON map of configuration attributes `template_properties`. The + * following example shows a sample set of customization configuration: ``` { { + * \"cta_button_bg_color\": \"#444DEA\", \"cta_text_font_color\": + * \"#FFFFFF\", \"primary_bg_color\": \"#D3DEF0\", + * \"logo_url\": + * \"https://storage.pardot.com/710713/1642089901EbkRibJq/TS_fullworkmark_darkmode.png\", + * \"font_family\": \"\", \"product_name\": + * \"ThoughtSpot\", \"footer_address\": \"444 Castro St, Suite 1000 + * Mountain View, CA 94041\", \"footer_phone\": \"(800) 508-7008\", + * \"replacement_value_for_liveboard\": \"Dashboard\", + * \"replacement_value_for_answer\": \"Chart\", + * \"replacement_value_for_spot_iq\": \"AI Insights\", + * \"hide_footer_phone\": false, \"hide_footer_address\": false, + * \"hide_product_name\": false, \"hide_manage_notification\": false, + * \"hide_mobile_app_nudge\": false, \"hide_privacy_policy\": false, + * \"hide_ts_vocabulary_definitions\": false, \"hide_error_message\": false, + * \"hide_unsubscribe_link\": false, \"hide_notification_status\": false, + * \"hide_modify_alert\": false, \"company_website_url\": + * \"https://your-website.com/\", \"company_privacy_policy_url\" : + * \"https://link-to-privacy-policy.com/\", \"contact_support_url\": + * \"https://link-to-contact-support.com/\", \"hide_contact_support_url\": + * false, \"hide_logo_url\" : false } } ``` + * + * @throws ApiException if the Api call fails + */ + @Test + public void createEmailCustomizationTest() throws ApiException { + CreateEmailCustomizationRequest createEmailCustomizationRequest = null; + CreateEmailCustomizationResponse response = + api.createEmailCustomization(createEmailCustomizationRequest); + // TODO: test validations + } + + /** + * Version: 9.0.0.cl or later Creates an Org object. To use this API, the + * [Orgs](https://docs.thoughtspot.com/cloud/latest/orgs-overview) feature must be enabled in + * your cluster. Requires cluster administration (**Can administer Org**) privileges. If + * [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled + * on your instance, the `ORG_ADMINISTRATION` (**Can manage Orgs**) privilege is + * required. + * + * @throws ApiException if the Api call fails + */ + @Test + public void createOrgTest() throws ApiException { + CreateOrgRequest createOrgRequest = null; + OrgResponse response = api.createOrg(createOrgRequest); + // TODO: test validations + } + + /** + * Version: 9.5.0.cl or later Creates a Role object in ThoughtSpot. Available only if + * [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled + * on your instance. To create a Role, the `ROLE_ADMINISTRATION` (**Can manage + * roles**) privilege is required. + * + * @throws ApiException if the Api call fails + */ + @Test + public void createRoleTest() throws ApiException { + CreateRoleRequest createRoleRequest = null; + RoleResponse response = api.createRole(createRoleRequest); + // TODO: test validations + } + + /** + * Create schedule. Version: 9.4.0.cl or later Creates a Liveboard schedule job. Requires at + * least edit access to Liveboards. To create a schedule on behalf of another user, you need + * `ADMINISTRATION` (**Can administer Org**) or `JOBSCHEDULING` (**Can + * schedule for others**) privilege and edit access to the Liveboard. If [Role-Based Access + * Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, + * the `JOBSCHEDULING` (**Can schedule for others**) privilege is required. #### Usage + * guidelines * The description text is mandatory. The description text appears as + * **Description: <your content>** in the Liveboard schedule email notifications. * For + * Liveboards with both charts and tables, schedule creation is only supported in PDF and XLS + * formats. Schedules created in CSV formats for such Liveboards will fail to run. If + * `PDF` is set as the `file_format`, enable `pdf_options` to get + * the correct attachment. Not doing so may cause the attachment to be rendered empty. * To + * include only specific visualizations, specify the visualization GUIDs in the + * `visualization_identifiers` array. * You can schedule a Liveboard job to run + * periodically by setting frequency parameters. You can set the schedule to run daily, weekly, + * monthly or every n minutes or hours. The scheduled job can also be configured to run at a + * specific time of the day or on specific days of the week or month. Please ensure that when + * setting the schedule frequency for _minute of the object_, only values that are multiples of + * 5 are included. * If the `frequency` parameters are defined, you can set the time + * zone to a value that matches your server's time zone. For example, + * `US/Central`, `Etc/UTC`, `CET`. The default time zone is + * `America/Los_Angeles`. For more information about Liveboard jobs, see [ThoughtSpot + * Product Documentation](https://docs.thoughtspot.com/cloud/latest/liveboard-schedule). + * + * @throws ApiException if the Api call fails + */ + @Test + public void createScheduleTest() throws ApiException { + CreateScheduleRequest createScheduleRequest = null; + ResponseSchedule response = api.createSchedule(createScheduleRequest); + // TODO: test validations + } + + /** + * Version: 9.0.0.cl or later Creates a tag object. Tags are labels that identify a metadata + * object. For example, you can create a tag to designate subject areas, such as sales, HR, + * marketing, and finance. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) + * privilege. If [Role-Based Access Control + * (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the + * `TAGMANAGEMENT` (**Can manage tags**) privilege is required to create, edit, and + * delete tags. + * + * @throws ApiException if the Api call fails + */ + @Test + public void createTagTest() throws ApiException { + CreateTagRequest createTagRequest = null; + Tag response = api.createTag(createTagRequest); + // TODO: test validations + } + + /** + * Version: 9.0.0.cl or later Creates a user in ThoughtSpot. The API endpoint allows you to + * configure several user properties such as email address, account status, share notification + * preferences, and sharing visibility. You can provision the user to + * [groups](https://docs.thoughtspot.com/cloud/latest/groups-privileges) and + * [Orgs](https://docs.thoughtspot.com/cloud/latest/orgs-overview). You can also add Liveboard, + * Answer, and Worksheet objects to the user’s favorites list, assign a default Liveboard for + * the user, and set user preferences. Requires `ADMINISTRATION` (**Can administer + * ThoughtSpot**) privilege. If [Role-Based Access Control + * (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the + * `USER_ADMINISTRATION` (**Can manage users**) privilege is required. + * + * @throws ApiException if the Api call fails + */ + @Test + public void createUserTest() throws ApiException { + CreateUserRequest createUserRequest = null; + User response = api.createUser(createUserRequest); + // TODO: test validations + } + + /** + * Version: 9.0.0.cl or later Creates a group object in ThoughtSpot. Requires + * `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access + * Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, + * the `GROUP_ADMINISTRATION` (**Can manage groups**) privilege is required. #### + * About groups Groups in ThoughtSpot are used by the administrators to define privileges and + * organize users based on their roles and access requirements. To know more about groups and + * privileges, see [ThoughtSpot Product + * Documentation](https://docs.thoughtspot.com/cloud/latest/groups-privileges). #### Supported + * operations The API endpoint lets you perform the following operations: * Assign privileges * + * Add users * Define sharing visibility * Add sub-groups * Assign a default Liveboard + * + * @throws ApiException if the Api call fails + */ + @Test + public void createUserGroupTest() throws ApiException { + CreateUserGroupRequest createUserGroupRequest = null; + UserGroupResponse response = api.createUserGroup(createUserGroupRequest); + // TODO: test validations + } + + /** + * Create a variable which can be used for parameterizing metadata objects Version: 26.4.0.cl or + * later Allows creating a variable which can be used for parameterizing metadata objects in + * ThoughtSpot. Requires ADMINISTRATION role and TENANT scope. The CAN_MANAGE_VARIABLES + * permission allows you to manage Formula Variables in the current organization scope. The API + * endpoint supports the following types of variables: * CONNECTION_PROPERTY - For connection + * properties * TABLE_MAPPING - For table mappings * CONNECTION_PROPERTY_PER_PRINCIPAL - For + * connection properties per principal. In order to use this please contact support to enable + * this. * FORMULA_VARIABLE - For Formula variables, introduced in 10.15.0.cl When creating a + * variable, you need to specify: * The variable type * A unique name for the variable * Whether + * the variable contains sensitive values (defaults to false) * The data type of the variable, + * only specify for formula variables (defaults to null) The operation will fail if: * The user + * lacks required permissions * The variable name already exists * The variable type is invalid + * + * @throws ApiException if the Api call fails + */ + @Test + public void createVariableTest() throws ApiException { + CreateVariableRequest createVariableRequest = null; + Variable response = api.createVariable(createVariableRequest); + // TODO: test validations + } + + /** + * Version: 10.14.0.cl or later Creates a new webhook configuration to receive notifications for + * specified events. The webhook will be triggered when the configured events occur in the + * system. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) or + * `DEVELOPER` (**Has developer privilege**) privilege. If [Role-Based Access Control + * (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, users with + * `CAN_MANAGE_WEBHOOKS` (**Can manage webhooks**) privilege are also authorized to + * perform this action. + * + * @throws ApiException if the Api call fails + */ + @Test + public void createWebhookConfigurationTest() throws ApiException { + CreateWebhookConfigurationRequest createWebhookConfigurationRequest = null; + WebhookResponse response = + api.createWebhookConfiguration(createWebhookConfigurationRequest); + // TODO: test validations + } + + /** + * Version: 9.9.0.cl or later Creates a DBT connection object in ThoughtSpot. Requires + * `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege or + * `DATAMANAGEMENT` (**Can manage data**) privilege. If [Role-Based Access Control + * (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the + * following Data control privileges may be required: - + * `CAN_MANAGE_CUSTOM_CALENDAR`(**Can manage custom calendars**) - + * `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) - + * `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` (**Can manage data models**) #### About create + * DBT connection DBT connection in ThoughtSpot is used by the user to define DBT credentials + * for cloud . The API needs embrace connection, embrace database name, DBT url, import type, + * DBT account identifier, DBT project identifier, DBT access token and environment details (or) + * embrace connection, embrace database name, import type, file_content to create a connection + * object. To know more about DBT, see ThoughtSpot Product Documentation. + * + * @throws ApiException if the Api call fails + */ + @Test + public void dbtConnectionTest() throws ApiException { + String connectionName = null; + String databaseName = null; + String importType = null; + String accessToken = null; + String dbtUrl = null; + String accountId = null; + String projectId = null; + String dbtEnvId = null; + String projectName = null; + File fileContent = null; + Object response = + api.dbtConnection( + connectionName, + databaseName, + importType, + accessToken, + dbtUrl, + accountId, + projectId, + dbtEnvId, + projectName, + fileContent); + // TODO: test validations + } + + /** + * Version: 9.9.0.cl or later Resynchronize the existing list of models, tables, worksheet tml’s + * and import them to Thoughtspot based on the DBT connection object. Requires + * `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege or + * `DATAMANAGEMENT` (**Can manage data**) privilege, along with an existing DBT + * connection. If [Role-Based Access Control + * (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the + * following data control privileges may be required: - + * `CAN_MANAGE_CUSTOM_CALENDAR`(**Can manage custom calendars**) - + * `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) - + * `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` (**Can manage data models**) + * + * @throws ApiException if the Api call fails + */ + @Test + public void dbtGenerateSyncTmlTest() throws ApiException { + String dbtConnectionIdentifier = null; + File fileContent = null; + Object response = api.dbtGenerateSyncTml(dbtConnectionIdentifier, fileContent); + // TODO: test validations + } + + /** + * Version: 9.9.0.cl or later Generate required table and worksheet and import them. Requires + * `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege or + * `DATAMANAGEMENT` (**Can manage data**) privilege, along with an existing DBT + * connection. If [Role-Based Access Control + * (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the + * following data control privileges may be required: - + * `CAN_MANAGE_CUSTOM_CALENDAR`(**Can manage custom calendars**) - + * `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) - + * `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` (**Can manage data models**) #### About + * generate TML Models and Worksheets to be imported can be selected by the user as part of the + * API. + * + * @throws ApiException if the Api call fails + */ + @Test + public void dbtGenerateTmlTest() throws ApiException { + String dbtConnectionIdentifier = null; + String modelTables = null; + String importWorksheets = null; + String worksheets = null; + File fileContent = null; + Object response = + api.dbtGenerateTml( + dbtConnectionIdentifier, + modelTables, + importWorksheets, + worksheets, + fileContent); + // TODO: test validations + } + + /** + * Version: 9.9.0.cl or later Gets a list of DBT connection objects by user and organization, + * available on the ThoughtSpot system. Requires `ADMINISTRATION` (**Can administer + * ThoughtSpot**) privilege or `DATAMANAGEMENT` (**Can manage data**) privilege. If + * [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled + * on your instance, the following Data control privileges may be required: - + * `CAN_MANAGE_CUSTOM_CALENDAR`(**Can manage custom calendars**) - + * `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) - + * `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` (**Can manage data models**) #### About search + * DBT connection To get details of a specific DBT connection identifier, database connection + * identifier, database connection name, database name, project name, project identifier, + * environment identifier , import type and author. + * + * @throws ApiException if the Api call fails + */ + @Test + public void dbtSearchTest() throws ApiException { + List response = api.dbtSearch(); + // TODO: test validations + } + + /** + * Version: 9.7.0.cl or later Deactivates a user account. Requires `ADMINISTRATION` + * (**Can administer Thoughtspot**) privilege. If [Role-Based Access Control + * (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the + * `USER_ADMINISTRATION` (**Can manage users**) privilege is required. To deactivate a + * user account, the API request body must include the following information: - Username or the + * GUID of the user account - Base URL of the ThoughtSpot instance If the API request is + * successful, ThoughtSpot returns the activation URL in the response. The activation URL is + * valid for 14 days and can be used to re-activate the account and reset the password of the + * deactivated account. + * + * @throws ApiException if the Api call fails + */ + @Test + public void deactivateUserTest() throws ApiException { + DeactivateUserRequest deactivateUserRequest = null; + ResponseActivationURL response = api.deactivateUser(deactivateUserRequest); + // TODO: test validations + } + + /** + * Version: 10.12.0.cl or later Deletes a [custom + * calendar](https://docs.thoughtspot.com/cloud/latest/connections-cust-cal). Requires + * `DATAMANAGEMENT` (**Can manage data**) or `ADMINISTRATION` (**Can + * administer ThoughtSpot**) privilege. If [Role-Based Access Control + * (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your ThoughtSpot + * instance, the `CAN_MANAGE_CUSTOM_CALENDAR` (**Can manage custom calendars**) + * privilege is required. #### Usage guidelines To delete a custom calendar, specify the + * calendar ID as a path parameter in the request URL. + * + * @throws ApiException if the Api call fails + */ + @Test + public void deleteCalendarTest() throws ApiException { + String calendarIdentifier = null; + api.deleteCalendar(calendarIdentifier); + // TODO: test validations + } + + /** + * Version: 26.4.0.cl or later Deletes one or more collections from ThoughtSpot. #### Delete + * options * **delete_children**: When set to `true`, deletes the child objects + * (metadata items) within the collection that the user has access to. Objects that the user + * does not have permission to delete will be skipped. * **dry_run**: When set to + * `true`, performs a preview of the deletion operation without actually deleting + * anything. The response shows what would be deleted, allowing you to review before committing + * the deletion. #### Response The response includes: * **metadata_deleted**: List of metadata + * objects that were successfully deleted * **metadata_skipped**: List of metadata objects that + * were skipped due to lack of permissions or other constraints + * + * @throws ApiException if the Api call fails + */ + @Test + public void deleteCollectionTest() throws ApiException { + DeleteCollectionRequest deleteCollectionRequest = null; + CollectionDeleteResponse response = api.deleteCollection(deleteCollectionRequest); + // TODO: test validations + } + + /** + * Version: 9.2.0.cl or later Deletes Git repository configuration from your ThoughtSpot + * instance. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If + * [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled + * on your instance on your instance, the `CAN_SETUP_VERSION_CONTROL` (**Can set up + * version control**) privilege. + * + * @throws ApiException if the Api call fails + */ + @Test + public void deleteConfigTest() throws ApiException { + DeleteConfigRequest deleteConfigRequest = null; + api.deleteConfig(deleteConfigRequest); + // TODO: test validations + } + + /** + * Version: 9.2.0.cl or later **Important**: This endpoint is deprecated and will be removed + * from ThoughtSpot in September 2025. ThoughtSpot strongly recommends using the [Delete + * Connection V2](#/http/api-endpoints/connections/delete-connection-v2) endpoint to delete your + * connection objects. #### Usage guidelines Deletes a connection object. Requires + * `DATAMANAGEMENT` (**Can manage data**) and edit permissions to the connection + * object, or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If + * [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled + * on your instance, the `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit + * Connections**) privilege is required. **Note**: If a connection has dependent objects, make + * sure you remove its associations before the delete operation. + * + * @throws ApiException if the Api call fails + */ + @Test + public void deleteConnectionTest() throws ApiException { + DeleteConnectionRequest deleteConnectionRequest = null; + api.deleteConnection(deleteConnectionRequest); + // TODO: test validations + } + + /** + * Version: 10.12.0.cl or later Deletes connection configuration objects. Requires + * `DATAMANAGEMENT` (**Can manage data**) and edit permissions to the connection + * object, or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If + * [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled + * on your instance, the `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit + * Connections**) privilege is required. + * + * @throws ApiException if the Api call fails + */ + @Test + public void deleteConnectionConfigurationTest() throws ApiException { + DeleteConnectionConfigurationRequest deleteConnectionConfigurationRequest = null; + api.deleteConnectionConfiguration(deleteConnectionConfigurationRequest); + // TODO: test validations + } + + /** + * Version: 10.4.0.cl or later Deletes a connection object. **Note**: If a connection has + * dependent objects, make sure you remove its associations before the delete operation. + * Requires `DATAMANAGEMENT` (**Can manage data**) and edit permissions to the + * connection object, or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. + * If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is + * enabled on your instance, the `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit + * Connections**) privilege is required. + * + * @throws ApiException if the Api call fails + */ + @Test + public void deleteConnectionV2Test() throws ApiException { + String connectionIdentifier = null; + api.deleteConnectionV2(connectionIdentifier); + // TODO: test validations + } + + /** + * Version: 9.6.0.cl or later Removes the custom action specified in the API request. Requires + * `DEVELOPER` (**Has Developer privilege**) or `ADMINISTRATION` (**Can + * administer ThoughtSpot**) privilege. If [Role-Based Access Control + * (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the + * `DEVELOPER` (**Has developer privilege**) privilege is required. + * + * @throws ApiException if the Api call fails + */ + @Test + public void deleteCustomActionTest() throws ApiException { + String customActionIdentifier = null; + api.deleteCustomAction(customActionIdentifier); + // TODO: test validations + } + + /** + * Version: 9.9.0.cl or later Removes the specified DBT connection object from the ThoughtSpot + * system. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) or + * `DATAMANAGEMENT` (**Can manage data ThoughtSpot**) privilege. If [Role-Based Access + * Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, + * the following Data control privileges may be required: - + * `CAN_MANAGE_CUSTOM_CALENDAR`(**Can manage custom calendars**) - + * `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) - + * `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` (**Can manage data models**) + * + * @throws ApiException if the Api call fails + */ + @Test + public void deleteDbtConnectionTest() throws ApiException { + String dbtConnectionIdentifier = null; + api.deleteDbtConnection(dbtConnectionIdentifier); + // TODO: test validations + } + + /** + * Version: 10.10.0.cl or later Deletes the configuration for the email customization. #### + * Pre-requisites Requires `DEVELOPER` (**has developer privilege**) or + * `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access + * Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, + * the `DEVELOPER` (**Has developer privilege**) privilege is required. **NOTE**:This + * endpoint in currently in beta. Contact ThoughtSpot support to enable this on your instance. + * #### Usage guidelines - Call the search API endpoint to get the + * `template_identifier` from the response. - Use that `template_identifier` + * as a parameter in this API request. + * + * @throws ApiException if the Api call fails + */ + @Test + public void deleteEmailCustomizationTest() throws ApiException { + String templateIdentifier = null; + api.deleteEmailCustomization(templateIdentifier); + // TODO: test validations + } + + /** + * Version: 9.0.0.cl or later Removes the specified metadata object from the ThoughtSpot system. + * Requires edit access to the metadata object. + * + * @throws ApiException if the Api call fails + */ + @Test + public void deleteMetadataTest() throws ApiException { + DeleteMetadataRequest deleteMetadataRequest = null; + api.deleteMetadata(deleteMetadataRequest); + // TODO: test validations + } + + /** + * Version: 9.0.0.cl or later Deletes an Org object from the ThoughtSpot system. Requires + * cluster administration (**Can administer Org**) privilege. If [Role-Based Access Control + * (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the + * `ORG_ADMINISTRATION` (**Can manage Orgs**) privilege is required. When you delete + * an Org, all its users and objects created in that Org context are removed. However, if the + * users in the deleted Org also exists in other Orgs, they are removed only from the deleted + * Org. + * + * @throws ApiException if the Api call fails + */ + @Test + public void deleteOrgTest() throws ApiException { + String orgIdentifier = null; + api.deleteOrg(orgIdentifier); + // TODO: test validations + } + + /** + * Version: 10.12.0.cl or later Deletes the configuration for the email customization. #### + * Pre-requisites Requires `DEVELOPER` (**has developer privilege**) or + * `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access + * Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, + * the `DEVELOPER` (**Has developer privilege**) privilege is required. **NOTE**:This + * endpoint in currently in beta. Contact ThoughtSpot support to enable this on your instance. + * #### Usage guidelines - Call the search API endpoint to get the `org_identifier` + * from the response. - Use that `org_identifier` as a parameter in this API request. + * + * @throws ApiException if the Api call fails + */ + @Test + public void deleteOrgEmailCustomizationTest() throws ApiException { + DeleteOrgEmailCustomizationRequest deleteOrgEmailCustomizationRequest = null; + api.deleteOrgEmailCustomization(deleteOrgEmailCustomizationRequest); + // TODO: test validations + } + + /** + * Version: 9.5.0.cl or later Deletes a Role object from the ThoughtSpot system. Available only + * if [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is + * enabled on your instance. To delete a Role, the `ROLE_ADMINISTRATION` (**Can manage + * roles**) privilege is required. + * + * @throws ApiException if the Api call fails + */ + @Test + public void deleteRoleTest() throws ApiException { + String roleIdentifier = null; + api.deleteRole(roleIdentifier); + // TODO: test validations + } + + /** + * Deletes a scheduled job. Version: 9.4.0.cl or later Deletes a scheduled Liveboard job. + * Requires at least edit access to Liveboard or `ADMINISTRATION` (**Can administer + * Org**) privilege. If [Role-Based Access Control + * (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the + * `JOBSCHEDULING` (**Can schedule for others**) privilege is required. + * + * @throws ApiException if the Api call fails + */ + @Test + public void deleteScheduleTest() throws ApiException { + String scheduleIdentifier = null; + api.deleteSchedule(scheduleIdentifier); + // TODO: test validations + } + + /** + * Version: 9.0.0.cl or later Deletes a tag object from the ThoughtSpot system Requires + * `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access + * Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, + * the `TAGMANAGEMENT` (**Can manage tags**) privilege is required to create, edit, + * and delete tags. + * + * @throws ApiException if the Api call fails + */ + @Test + public void deleteTagTest() throws ApiException { + String tagIdentifier = null; + api.deleteTag(tagIdentifier); + // TODO: test validations + } + + /** + * Version: 9.0.0.cl or later Deletes a user from the ThoughtSpot system. If you want to remove + * a user from a specific Org but not from ThoughtSpot, update the group and Org mapping + * properties of the user object via a POST API call to the + * [/api/rest/2.0/users/{user_identifier}/update](#/http/api-endpoints/users/update-user) + * endpoint. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If + * [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled + * on your instance, the `USER_ADMINISTRATION` (**Can manage users**) privilege is + * required. + * + * @throws ApiException if the Api call fails + */ + @Test + public void deleteUserTest() throws ApiException { + String userIdentifier = null; + api.deleteUser(userIdentifier); + // TODO: test validations + } + + /** + * Version: 9.0.0.cl or later Removes the specified group object from the ThoughtSpot system. + * Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If + * [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled + * on your instance, the `GROUP_ADMINISTRATION` (**Can manage groups**) privilege is + * required. + * + * @throws ApiException if the Api call fails + */ + @Test + public void deleteUserGroupTest() throws ApiException { + String groupIdentifier = null; + api.deleteUserGroup(groupIdentifier); + // TODO: test validations + } + + /** + * Delete a variable Version: 10.14.0.cl or later **Note:** This API endpoint is deprecated and + * will be removed from ThoughtSpot in a future release. Use [POST + * /api/rest/2.0/template/variables/delete](/api/rest/2.0/template/variables/delete) instead. + * Allows deleting a variable from ThoughtSpot. Requires ADMINISTRATION role and TENANT scope. + * The CAN_MANAGE_VARIABLES permission allows you to manage Formula Variables in the current + * organization scope. The API endpoint requires: * The variable identifier (ID or name) The + * operation will fail if: * The user lacks required permissions * The variable doesn't + * exist * The variable is being used by other objects + * + * @throws ApiException if the Api call fails + */ + @Test + public void deleteVariableTest() throws ApiException { + String identifier = null; + api.deleteVariable(identifier); + // TODO: test validations + } + + /** + * Delete variable(s) Version: 26.4.0.cl or later Allows deleting multiple variables from + * ThoughtSpot. Requires ADMINISTRATION role and TENANT scope. The CAN_MANAGE_VARIABLES + * permission allows you to manage Formula Variables in the current organization scope. The API + * endpoint requires: * The variable identifiers (IDs or names) The operation will fail if: * + * The user lacks required permissions * Any of the variables don't exist * Any of the + * variables are being used by other objects + * + * @throws ApiException if the Api call fails + */ + @Test + public void deleteVariablesTest() throws ApiException { + DeleteVariablesRequest deleteVariablesRequest = null; + api.deleteVariables(deleteVariablesRequest); + // TODO: test validations + } + + /** + * Version: 10.14.0.cl or later Deletes one or more webhook configurations by their unique id or + * name. Returns status of each deletion operation, including successfully deleted webhooks and + * any failures with error details. Requires `ADMINISTRATION` (**Can administer + * ThoughtSpot**) or `DEVELOPER` (**Has developer privilege**) privilege. If + * [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled + * on your instance, users with `CAN_MANAGE_WEBHOOKS` (**Can manage webhooks**) + * privilege are also authorized to perform this action. + * + * @throws ApiException if the Api call fails + */ + @Test + public void deleteWebhookConfigurationsTest() throws ApiException { + DeleteWebhookConfigurationsRequest deleteWebhookConfigurationsRequest = null; + WebhookDeleteResponse response = + api.deleteWebhookConfigurations(deleteWebhookConfigurationsRequest); + // TODO: test validations + } + + /** + * Version: 9.2.0.cl or later Allows you to deploy a commit and publish TML content to your + * ThoughtSpot instance. Requires at least edit access to the objects used in the deploy + * operation. The API deploys the head of the branch unless a `commit_id` is specified + * in the API request. If the branch name is not defined in the request, the default branch is + * considered for deploying commits. For more information, see [Git integration + * documentation](https://developers.thoughtspot.com/docs/git-integration). + * + * @throws ApiException if the Api call fails + */ + @Test + public void deployCommitTest() throws ApiException { + DeployCommitRequest deployCommitRequest = null; + List response = api.deployCommit(deployCommitRequest); + // TODO: test validations + } + + /** + * Version: 9.9.0.cl or later Exports the difference in connection metadata between CDW and + * ThoughtSpot Requires `DATAMANAGEMENT` (**Can manage data**) privilege. If + * [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled + * on your instance, the following Data control privileges may be required: - + * `CAN_MANAGE_CUSTOM_CALENDAR`(**Can manage custom calendars**) - + * `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) - + * `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` (**Can manage data models**) To download the + * connection metadata difference between ThoughtSpot and CDW, pass the connection GUID as + * `connection_identifier` in the API request. + * + * @throws ApiException if the Api call fails + */ + @Test + public void downloadConnectionMetadataChangesTest() throws ApiException { + String connectionIdentifier = null; + File response = api.downloadConnectionMetadataChanges(connectionIdentifier); + // TODO: test validations + } + + /** + * Version: 9.0.0.cl or later Exports an Answer in the given file format. You can download the + * Answer data as a PDF, PNG, CSV, or XLSX file. Requires at least view access to the Answer. + * #### Usage guidelines In the request body, specify the GUID or name of the Answer and set + * `file_format`. The default file format is CSV. Use the `type` parameter + * to specify whether the Answer being exported is a saved Answer (`SAVED`) or a + * pinned Answer on a Liveboard (`PINNED`). Defaults to `SAVED`. When using + * `PINNED`, the `metadata_identifier` must be the container id. **NOTE**: * + * The downloadable file returned in API response file is extensionless. Please rename the + * downloaded file by typing in the relevant extension. * HTML rendering is not supported for + * PDF exports of Answers with tables. Optionally, you can define [runtime + * overrides](https://developers.thoughtspot.com/docs/fetch-data-and-report-apis#_runtime_overrides) + * to apply to the Answer data. + * + * @throws ApiException if the Api call fails + */ + @Test + public void exportAnswerReportTest() throws ApiException { + ExportAnswerReportRequest exportAnswerReportRequest = null; + File response = api.exportAnswerReport(exportAnswerReportRequest); + // TODO: test validations + } + + /** + * Version: 9.0.0.cl or later Exports a Liveboard and its visualizations in PDF, PNG, CSV, or + * XLSX file format. The default `file_format` is CSV. Requires at least view access + * to the Liveboard. #### Usage guidelines In the request body, specify the GUID or name of the + * Liveboard. To generate a Liveboard report with specific visualizations, add GUIDs or names of + * the visualizations. **NOTE**: * The downloadable file returned in API response file is + * extensionless. Please rename the downloaded file by typing in the relevant extension. * + * Optionally, you can define [runtime + * overrides](https://developers.thoughtspot.com/docs/fetch-data-and-report-apis#_runtime_overrides) + * to apply to the Answer data. * To include unsaved changes in the report, pass the + * `transient_pinboard_content` script generated from the + * `getExportRequestForCurrentPinboard` method in the Visual Embed SDK. Upon + * successful execution, the API returns the report with unsaved changes, including ad hoc + * changes to visualizations. For more information, see [Liveboard Report + * API](https://developers.thoughtspot.com/docs/fetch-data-and-report-apis#_liveboard_report_api). + * * Starting with ThoughtSpot Cloud 10.9.0.cl release, the Liveboard can be exported in the PNG + * format in the resolution of your choice. To enable this on your instance, contact ThoughtSpot + * support. When this feature is enabled, the options + * `include_cover_page`,`include_filter_page` within the + * `png_options` will not be available for PNG exports. * Starting with the + * ThoughtSpot Cloud 26.2.0.cl release, * Liveboards can be exported in CSV format. * All + * visualizations within a Liveboard can be exported as individual CSV files. * When exporting + * multiple visualizations or the entire Liveboard, the system returns the report as a + * compressed ZIP file containing the separate CSV files for each visualization. * Liveboards + * can also be exported in XLSX format. * All selected visualizations are consolidated into a + * single Excel workbook (.xlsx), with each visualization placed in its own worksheet (tab). * + * XLSX exports are limited to a maximum of 255 worksheets (tabs) per workbook. + * + * @throws ApiException if the Api call fails + */ + @Test + public void exportLiveboardReportTest() throws ApiException { + ExportLiveboardReportRequest exportLiveboardReportRequest = null; + File response = api.exportLiveboardReport(exportLiveboardReportRequest); + // TODO: test validations + } + + /** + * Version: 9.0.0.cl or later Exports the [TML](https://docs.thoughtspot.com/cloud/latest/tml) + * representation of metadata objects in JSON or YAML format. Requires + * `DATADOWNLOADING` (**Can download Data**) and at least view access to the metadata + * object. #### Usage guidelines * You can export one or several objects by passing metadata + * object GUIDs in the `metadata` array. * When exporting TML content for a Liveboard + * or Answer object, you can set `export_associated` to `true` to retrieve + * TML content for underlying Worksheets, Tables, or Views, including the GUID of each object + * within the headers. When `export_associated` is set to `true`, consider + * retrieving one metadata object at a time. * Set `export_fqns` to `true` + * to add FQNs of the referenced objects in the TML content. For example, if you send an API + * request to retrieve TML for a Liveboard and its associated objects, the API returns the TML + * content with FQNs of the referenced Worksheet. Exporting TML with FQNs is useful if + * ThoughtSpot has multiple objects with the same name and you want to eliminate ambiguity when + * importing TML files into ThoughtSpot. It eliminates the need for adding FQNs of the + * referenced objects manually during the import operation. * To export only the TML of + * feedbacks associated with an object, set the GUID of the object as `identifier`, + * and set the `type` as `FEEDBACK` in the `metadata` array. * To + * export the TML of an object along with the feedbacks associated with it, set the GUID of the + * object as `identifier`, set the `type` as `LOGIAL_TABLE` in the + * `metadata` array, and set `export_with_associated_feedbacks` in + * `export_options` to true. For more information, see [TML + * Documentation](https://developers.thoughtspot.com/docs/tml#_export_a_tml). For more + * information on feedbacks, see [Feedback + * Documentation](https://docs.thoughtspot.com/cloud/latest/sage-feedback). + * + * @throws ApiException if the Api call fails + */ + @Test + public void exportMetadataTMLTest() throws ApiException { + ExportMetadataTMLRequest exportMetadataTMLRequest = null; + List response = api.exportMetadataTML(exportMetadataTMLRequest); + // TODO: test validations + } + + /** + * Version: 10.1.0.cl or later Exports the [TML](https://docs.thoughtspot.com/cloud/latest/tml) + * representation of metadata objects in JSON or YAML format. ### **Permissions Required** + * Requires `DATAMANAGEMENT` (**Can manage data**) and `USERMANAGEMENT` + * (**Can manage users**) privileges. #### **Usage Guidelines** This API is only applicable for + * `USER`, `GROUP`, and `ROLES` metadata types. - + * `batch_offset` Indicates the starting position within the complete dataset from + * which the API should begin returning objects. Useful for paginating results efficiently. - + * `batch_size` Specifies the number of objects or items to retrieve in a single + * request. Helps control response size for better performance. - `edoc_format` + * Defines the format of the TML content. The exported metadata can be in JSON or YAML format. - + * `export_dependent` Specifies whether to include dependent metadata objects in the + * export. Ensures related objects are also retrieved if needed. - `all_orgs_override` + * Indicates whether the export operation applies across all organizations. Useful for + * multi-tenant environments where cross-org exports are required. + * + * @throws ApiException if the Api call fails + */ + @Test + public void exportMetadataTMLBatchedTest() throws ApiException { + ExportMetadataTMLBatchedRequest exportMetadataTMLBatchedRequest = null; + Object response = api.exportMetadataTMLBatched(exportMetadataTMLBatchedRequest); + // TODO: test validations + } + + /** + * Version: 9.0.0.cl or later Fetches data from a saved Answer. Requires at least view access to + * the saved Answer. The `record_size` attribute determines the number of records to + * retrieve in an API call. For more information about pagination, record size, and maximum row + * limit, see [Pagination and record size + * settings](https://developers.thoughtspot.com/docs/fetch-data-and-report-apis#_pagination_settings_for_data_and_report_apis). + * + * @throws ApiException if the Api call fails + */ + @Test + public void fetchAnswerDataTest() throws ApiException { + FetchAnswerDataRequest fetchAnswerDataRequest = null; + AnswerDataResponse response = api.fetchAnswerData(fetchAnswerDataRequest); + // TODO: test validations + } + + /** + * Version: 9.0.0.cl or later Fetches the underlying SQL query data for an Answer object. + * Requires at least view access to the Answer object. Upon successful execution, the API + * returns the SQL queries for the specified object as shown in this example: ``` + * { \"metadata_id\":\"8fbe44a8-46ad-4b16-8d39-184b2fada490\", + * \"metadata_name\":\"Total sales\", + * \"metadata_type\":\"ANSWER\", \"sql_queries\":[ { + * \"metadata_id\":\"8fbe44a8-46ad-4b16-8d39-184b2fada490\", + * \"metadata_name\":\"Total sales -test\", + * \"sql_query\":\"SELECT \\n \\\"ta_1\\\".\\\"REGION\\\" + * \\\"ca_1\\\", \\n \\\"ta_2\\\".\\\"PRODUCTNAME\\\" + * \\\"ca_2\\\", \\n \\\"ta_1\\\".\\\"STORENAME\\\" + * \\\"ca_3\\\", \\n CASE\\n WHEN sum(\\\"ta_3\\\".\\\"SALES\\\") + * IS NOT NULL THEN sum(\\\"ta_3\\\".\\\"SALES\\\")\\n ELSE 0\\n END + * \\\"ca_4\\\", \\n CASE\\n WHEN + * sum(\\\"ta_3\\\".\\\"QUANTITYPURCHASED\\\") IS NOT NULL THEN + * sum(\\\"ta_3\\\".\\\"QUANTITYPURCHASED\\\")\\n ELSE 0\\n END + * \\\"ca_5\\\"\\nFROM + * \\\"RETAILAPPAREL\\\".\\\"PUBLIC\\\".\\\"FACT_RETAPP_SALES\\\" + * \\\"ta_3\\\"\\n JOIN + * \\\"RETAILAPPAREL\\\".\\\"PUBLIC\\\".\\\"DIM_RETAPP_STORES\\\" + * \\\"ta_1\\\"\\n ON \\\"ta_3\\\".\\\"STOREID\\\" = + * \\\"ta_1\\\".\\\"STOREID\\\"\\n JOIN + * \\\"RETAILAPPAREL\\\".\\\"PUBLIC\\\".\\\"DIM_RETAPP_PRODUCTS\\\" + * \\\"ta_2\\\"\\n ON \\\"ta_3\\\".\\\"PRODUCTID\\\" = + * \\\"ta_2\\\".\\\"PRODUCTID\\\"\\nGROUP BY \\n \\\"ca_1\\\", \\n + * \\\"ca_2\\\", \\n \\\"ca_3\\\"\\n\" } ] } ``` + * + * @throws ApiException if the Api call fails + */ + @Test + public void fetchAnswerSqlQueryTest() throws ApiException { + FetchAnswerSqlQueryRequest fetchAnswerSqlQueryRequest = null; + SqlQueryResponse response = api.fetchAnswerSqlQuery(fetchAnswerSqlQueryRequest); + // TODO: test validations + } + + /** + * Version: 10.4.0.cl or later Gets information about the status of the TML async import task + * scheduled using the `/api/rest/2.0/metadata/tml/async/import` API call. To fetch + * the task details, specify the ID of the TML async import task. Requires access to the task + * ID. The API allows users who initiated the asynchronous TML import via + * `/api/rest/2.0/metadata/tml/async/import` to view the status of their tasks. Users + * with administration privilege can view the status of all import tasks initiated by the users + * in their Org. #### Usage guidelines See [TML API + * Documentation](https://developers.thoughtspot.com/docs/tml#_fetch_status_of_the_tml_import_task) + * for usage guidelines. + * + * @throws ApiException if the Api call fails + */ + @Test + public void fetchAsyncImportTaskStatusTest() throws ApiException { + FetchAsyncImportTaskStatusRequest fetchAsyncImportTaskStatusRequest = null; + GetAsyncImportStatusResponse response = + api.fetchAsyncImportTaskStatus(fetchAsyncImportTaskStatusRequest); + // TODO: test validations + } + + /** + * Version: 10.12.0.cl or later Fetches column security rules for specified tables. This API + * endpoint retrieves column-level security rules configured for tables. It returns information + * about which columns are secured and which groups have access to those columns. #### Usage + * guidelines - Provide an array of table identifiers using either `identifier` (GUID + * or name) or `obj_identifier` (object ID) - At least one of `identifier` + * or `obj_identifier` must be provided for each table - The API returns column + * security rules for all specified tables - Users must have appropriate permissions to access + * security rules for the specified tables #### Required permissions - + * `ADMINISTRATION` - Can administer ThoughtSpot - `DATAMANAGEMENT` - Can + * manage data - `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` - Can manage worksheet views and + * tables #### Example request ```json { \"tables\": [ { + * \"identifier\": \"table-guid\", \"obj_identifier\": + * \"table-object-id\" } ] } ``` #### Response format The API returns + * an array of `ColumnSecurityRuleResponse` objects wrapped in a `data` + * field. Each `ColumnSecurityRuleResponse` object contains: - Table information (GUID + * and object ID) - Array of column security rules with column details, group access, and source + * table information #### Example response ```json { \"data\": [ { + * \"guid\": \"table-guid\", \"objId\": + * \"table-object-id\", \"columnSecurityRules\": [ { \"column\": { + * \"id\": \"col_123\", \"name\": \"Salary\" }, + * \"groups\": [ { \"id\": \"group_1\", \"name\": + * \"HR Department\" } ], \"sourceTableDetails\": { \"id\": + * \"source-table-guid\", \"name\": \"Employee_Data\" } } ] } ] } + * ``` + * + * @throws ApiException if the Api call fails + */ + @Test + public void fetchColumnSecurityRulesTest() throws ApiException { + FetchColumnSecurityRulesRequest fetchColumnSecurityRulesRequest = null; + List response = + api.fetchColumnSecurityRules(fetchColumnSecurityRulesRequest); + // TODO: test validations + } + + /** + * Version: 9.9.0.cl or later Validates the difference in connection metadata between CDW and + * ThoughtSpot. Requires `DATAMANAGEMENT` (**Can manage data**) privilege. If + * [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled + * on your instance, the following Data control privileges may be required: - + * `CAN_MANAGE_CUSTOM_CALENDAR`(**Can manage custom calendars**) - + * `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) - + * `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` (**Can manage data models**) Returns a boolean + * indicating whether there is any difference between the connection metadata at ThoughtSpot and + * CDW. To get the connection metadata difference status, pass the connection GUID as + * `connection_identifier` in the API request. + * + * @throws ApiException if the Api call fails + */ + @Test + public void fetchConnectionDiffStatusTest() throws ApiException { + String connectionIdentifier = null; + FetchConnectionDiffStatusResponse response = + api.fetchConnectionDiffStatus(connectionIdentifier); + // TODO: test validations + } + + /** + * Version: 9.0.0.cl or later Gets data from a Liveboard object and its visualization. Requires + * at least view access to the Liveboard. #### Usage guidelines In the request body, specify the + * GUID or name of the Liveboard. To get data for specific visualizations, add the GUIDs or + * names of the visualizations in the API request. To include unsaved changes in the report, + * pass the `transient_pinboard_content` script generated from the + * `getExportRequestForCurrentPinboard` method in the Visual Embed SDK. Upon + * successful execution, the API returns the report with unsaved changes. If the new Liveboard + * experience mode, the transient content includes ad hoc changes to visualizations such as + * sorting, toggling of legends, and data drill down. For more information, and see [Liveboard + * data + * API](https://developers.thoughtspot.com/docs/fetch-data-and-report-apis#_fetch_liveboard_data_api). + * + * @throws ApiException if the Api call fails + */ + @Test + public void fetchLiveboardDataTest() throws ApiException { + FetchLiveboardDataRequest fetchLiveboardDataRequest = null; + LiveboardDataResponse response = api.fetchLiveboardData(fetchLiveboardDataRequest); + // TODO: test validations + } + + /** + * Version: 9.0.0.cl or later Fetches the underlying SQL query data for a Liveboard object and + * its visualizations. Requires at least view access to the Liveboard object. To get SQL query + * data for a Liveboard, specify the GUID of the Liveboard. Optionally, you can add an array of + * visualization GUIDs to retrieve the SQL query data for visualizations in the Liveboard. Upon + * successful execution, the API returns the SQL queries for the specified object as shown in + * this example: ``` { \"metadata_id\": + * \"fa68ae91-7588-4136-bacd-d71fb12dda69\", \"metadata_name\": \"Total + * Sales\", \"metadata_type\": \"LIVEBOARD\", + * \"sql_queries\": [ { \"metadata_id\": + * \"b3b6d2b9-089a-490c-8e16-b144650b7843\", \"metadata_name\": \"Total + * quantity purchased, Total sales by region\", \"sql_query\": \"SELECT \\n + * \\\"ta_1\\\".\\\"REGION\\\" \\\"ca_1\\\", \\n CASE\\n WHEN + * sum(\\\"ta_2\\\".\\\"QUANTITYPURCHASED\\\") IS NOT NULL THEN + * sum(\\\"ta_2\\\".\\\"QUANTITYPURCHASED\\\")\\n ELSE 0\\n END + * \\\"ca_2\\\", \\n CASE\\n WHEN sum(\\\"ta_2\\\".\\\"SALES\\\") + * IS NOT NULL THEN sum(\\\"ta_2\\\".\\\"SALES\\\")\\n ELSE 0\\n END + * \\\"ca_3\\\"\\nFROM + * \\\"RETAILAPPAREL\\\".\\\"PUBLIC\\\".\\\"FACT_RETAPP_SALES\\\" + * \\\"ta_2\\\"\\n JOIN + * \\\"RETAILAPPAREL\\\".\\\"PUBLIC\\\".\\\"DIM_RETAPP_STORES\\\" + * \\\"ta_1\\\"\\n ON \\\"ta_2\\\".\\\"STOREID\\\" = + * \\\"ta_1\\\".\\\"STOREID\\\"\\nGROUP BY \\\"ca_1\\\"\" } ] + * } ``` + * + * @throws ApiException if the Api call fails + */ + @Test + public void fetchLiveboardSqlQueryTest() throws ApiException { + FetchLiveboardSqlQueryRequest fetchLiveboardSqlQueryRequest = null; + SqlQueryResponse response = api.fetchLiveboardSqlQuery(fetchLiveboardSqlQueryRequest); + // TODO: test validations + } + + /** + * Version: 9.0.0.cl or later Fetches security audit logs. Requires `ADMINISTRATION` + * (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control + * (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the [Admin + * Control](https://developers.thoughtspot.com/docs/rbac#_admin_control) privileges are + * required. #### Usage guidelines By default, the API retrieves logs for the last 24 hours. You + * can set a custom duration in EPOCH time. Make sure the log duration specified in your API + * request doesn’t exceed 24 hours. If you must fetch logs for a longer time range, modify the + * duration and make multiple sequential API requests. Upon successful execution, the API + * returns logs with the following information: * timestamp of the event * event ID * event type + * * name and GUID of the user * IP address of ThoughtSpot instance For more information see + * [Audit logs Documentation](https://developers.thoughtspot.com/docs/audit-logs). + * + * @throws ApiException if the Api call fails + */ + @Test + public void fetchLogsTest() throws ApiException { + FetchLogsRequest fetchLogsRequest = null; + List response = api.fetchLogs(fetchLogsRequest); + // TODO: test validations + } + + /** + * Version: 26.3.0.cl or later This API fetches the object privileges present for the given list + * of principals (user or group), on the given set of objects. It supports pagination, which can + * be enabled and configured using the request parameters. It provides users access to certain + * features based on privilege based access control. #### Usage guidelines - Specify the + * `type` (`USER` or `USER_GROUP`) and `identifier` + * (either GUID or name) of the principals for which you want to retrieve object privilege + * information in the `principals` array. - Specify the `type` + * (`LOGICAL_TABLE`) and `identifier` (either GUID or name) of the metadata + * objects for which you want to retrieve object privilege information in the + * `metadata` array. Only `LOGICAL_TABLE` metadata type is supported for + * now. It may be extended for other metadata types in future. - To control the offset from + * where principals have to be fetched, use `record_offset`. When + * `record_offset` is 0, information is fetched from the beginning. - To control the + * number of principals to be fetched, use `record_size`. Default + * `record_size` is 20. - Ensure `record_offset` for a subsequent request is + * one more than the value of `record_size` of the previous request. - Ensure using + * correct Authorization Bearer Token corresponding to specific user & org. #### Example + * request ```json { \"principals\": [ { \"type\": + * \"type-1\", \"identifier\": \"principal-guid-or-name-1\" }, { + * \"type\": \"type-2\", \"identifier\": + * \"principal-guid-or-name-2\" } ], \"metadata\": [ { \"type\": + * \"metadata-type-1\", \"identifier\": + * \"metadata-guid-or-name-1\" }, { \"type\": \"metadata-type-2\", + * \"identifier\": \"metadata-guid-or-name-2\" } ], + * \"record_offset\": 0, \"record_size\": 20 } ``` #### + * Response format The API returns an array of `metadata_object_privileges` objects + * wrapped in JSON. Each `metadata_object_privileges` object contains: - Metadata + * information (GUID, name and type) - Array of `principal_object_privilege_info`. - + * Each `principal_object_privilege_info` contains: - Principal type. All principals + * of this type are listed as described below. - Array of + * `principal_object_privileges`. - Each `principal_object_privileges` + * contains: - Principal information (GUID, name, subtype) - List of applied object level + * privileges. #### Example response ```json { + * \"metadata_object_privileges\": [ { \"metadata_id\": + * \"metadata-guid-1\", \"metadata_name\": \"metadata-name-1\", + * \"metadata_type\": \"metadata-type-1\", + * \"principal_object_privilege_info\": [ { \"principal_type\": + * \"principal-type-1\", \"principal_object_privileges\": [ { + * \"principal_id\": \"principal-guid-1\", \"principal_name\": + * \"principal-name-1\", \"principal_sub_type\": + * \"principal-sub-type-1\", \"object_privileges\": + * \"[object-privilege-1, object-privilege-2]\" }, { \"principal_id\": + * \"principal-guid-2\", \"principal_name\": \"principal-name-2\", + * \"principal_sub_type\": \"principal-sub-type-2\", + * \"object_privileges\": \"[object-privilege-1, object-privilege-2]\" } ] + * }, { \"principal_type\": \"principal-type-2\", + * \"principal_object_privileges\": [ { \"principal_id\": + * \"principal-guid-3\", \"principal_name\": \"principal-guid-4\", + * \"principal_sub_type\": \"principal-sub-type-4\", + * \"object_privileges\": \"[object-privilege-1]\" } ] } ] }, { + * \"metadata_id\": \"metadata-guid-2\", \"metadata_name\": + * \"metadata-name-2\", \"metadata_type\": \"metadata-type-2\", + * \"principal_object_privilege_info\": [ { \"principal_type\": + * \"principal-type-1\", \"principal_object_privileges\": [ { + * \"principal_id\": \"principal-guid-1\", \"principal_name\": + * \"principal-name-1\", \"principal_sub_type\": + * \"principal-sub-type-1\", \"object_privileges\": + * \"[object-privilege-3, object-privilege-4]\" }, { \"principal_id\": + * \"principal-guid-2\", \"principal_name\": \"principal-name-2\", + * \"principal_sub_type\": \"principal-sub-type-2\", + * \"object_privileges\": \"[object-privilege-4]\" } ] } ] } ] } + * ``` + * + * @throws ApiException if the Api call fails + */ + @Test + public void fetchObjectPrivilegesTest() throws ApiException { + FetchObjectPrivilegesRequest fetchObjectPrivilegesRequest = null; + ObjectPrivilegesOfMetadataResponse response = + api.fetchObjectPrivileges(fetchObjectPrivilegesRequest); + // TODO: test validations + } + + /** + * Version: 9.0.0.cl or later Fetches object permission details for a given principal object + * such as a user and group. Requires view access to the metadata object. #### Usage guidelines + * * To get a list of all metadata objects that a user or group can access, specify the + * `type` and GUID or name of the principal. * To get permission details for a + * specific object, add the `type` and GUID or name of the metadata object to your API + * request. Upon successful execution, the API returns a list of metadata objects and permission + * details for each object. + * + * @throws ApiException if the Api call fails + */ + @Test + public void fetchPermissionsOfPrincipalsTest() throws ApiException { + FetchPermissionsOfPrincipalsRequest fetchPermissionsOfPrincipalsRequest = null; + PermissionOfPrincipalsResponse response = + api.fetchPermissionsOfPrincipals(fetchPermissionsOfPrincipalsRequest); + // TODO: test validations + } + + /** + * Version: 9.0.0.cl or later Fetches permission details for a given metadata object. Requires + * view access to the metadata object. #### Usage guidelines * To fetch a list of users and + * groups for a metadata object, specify `type` and GUID or name of the metadata + * object. * To get permission details for a specific user or group, add `type` and + * GUID or name of the principal object to your API request. Upon successful execution, the API + * returns permission details and principal information for the object specified in the API + * request. + * + * @throws ApiException if the Api call fails + */ + @Test + public void fetchPermissionsOnMetadataTest() throws ApiException { + FetchPermissionsOnMetadataRequest fetchPermissionsOnMetadataRequest = null; + PermissionOfMetadataResponse response = + api.fetchPermissionsOnMetadata(fetchPermissionsOnMetadataRequest); + // TODO: test validations + } + + /** + * Version: 9.0.0.cl or later Enforces logout on current user sessions. Use this API with + * caution as it may invalidate active user sessions and force users to re-login. Make sure you + * specify the usernames or GUIDs. If you pass null values in the API call, all user sessions on + * your cluster become invalid, and the users are forced to re-login. Requires + * `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access + * Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, + * the `USER_ADMINISTRATION` (**Can manage users**) privilege is required. + * + * @throws ApiException if the Api call fails + */ + @Test + public void forceLogoutUsersTest() throws ApiException { + ForceLogoutUsersRequest forceLogoutUsersRequest = null; + api.forceLogoutUsers(forceLogoutUsersRequest); + // TODO: test validations + } + + /** + * Version: 10.12.0.cl or later Exports a [custom + * calendar](https://docs.thoughtspot.com/cloud/latest/connections-cust-cal) in the CSV format. + * Requires `DATAMANAGEMENT` (**Can manage data**) or `ADMINISTRATION` + * (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control + * (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your ThoughtSpot + * instance, the `CAN_MANAGE_CUSTOM_CALENDAR` (**Can manage custom calendars**) + * privilege is required. #### Usage guidelines Use this API to download a custom calendar in + * the CSV file format. In your API request, specify the following parameters. * Start and end + * date of the calendar. For \"month offset\" calendars, the start date must match the + * month defined in the `month_offset` attribute. You can also specify optional + * parameters such as the starting day of the week and prefixes for the quarter and year labels. + * + * @throws ApiException if the Api call fails + */ + @Test + public void generateCSVTest() throws ApiException { + GenerateCSVRequest generateCSVRequest = null; + Object response = api.generateCSV(generateCSVRequest); + // TODO: test validations + } + + /** + * Version: 9.0.0.cl or later Retrieves details of the current user session for the token + * provided in the request header. Any ThoughtSpot user can access this endpoint and send an API + * request. The data returned in the API response varies according to user's privilege and + * object access permissions. **NOTE**: In ThoughtSpot, users with cluster administration + * privileges can access all Orgs by default. However, unless the administrator is explicitly + * added to an Org, the Orgs list in the session information returned by the API will include + * only the Primary Org. To include other Orgs in the API response, you must explicitly add the + * administrator to each Org in the Admin settings page in the UI or via user REST API. + * + * @throws ApiException if the Api call fails + */ + @Test + public void getCurrentUserInfoTest() throws ApiException { + User response = api.getCurrentUserInfo(); + // TODO: test validations + } + + /** + * Version: 9.4.0.cl or later Retrieves details of the current session token for the bearer + * token provided in the request header. This API endpoint does not create a new token. Instead, + * it returns details about the token, including the token string, creation time, expiration + * time, and the associated user. Use this endpoint to introspect your current session token, + * debug authentication issues, or when a frontend application needs session token details. Any + * ThoughtSpot user with a valid bearer token can access this endpoint and send an API request + * + * @throws ApiException if the Api call fails + */ + @Test + public void getCurrentUserTokenTest() throws ApiException { + GetTokenResponse response = api.getCurrentUserToken(); + // TODO: test validations + } + + /** + * Version: 10.4.0.cl or later Creates an authentication token that provides values for the + * formula variables in the Row Level Security (RLS) rules for a given user. Recommended for use + * cases that require Attribute-based access control (ABAC) via RLS. #### Required privileges To + * add a new user and assign privileges during auto-creation, the `ADMINISTRATION` + * (**Can administer ThoughtSpot**) privilege is required. If [Role-Based Access Control + * (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled, the + * `CONTROL_TRUSTED_AUTH` (**Can Enable or Disable Trusted Authentication**) privilege + * and edit access to the data source are required. To configure formula variables for all Orgs + * on your instance or the Primary Org, cluster administration privileges are required. Org + * administrators can configure formula variables for their respective Orgs. If Role-Based + * Access Control (RBAC) is enabled, users with the `CAN_MANAGE_VARIABLES` (**Can + * manage variables**) role privilege can also create and manage variables for their Org + * context. #### Usage guidelines You can generate a token by providing a `username` + * and `password`, or by using a `secret_key`. To generate a + * `secret_key`, the administrator must enable [Trusted + * authentication](https://developers.thoughtspot.com/docs/trusted-auth-secret-key) in the + * **Develop** > **Customizations** > **Security Settings** page. **Note**: * When both + * `password` and `secret_key` are included in the API request, + * `password` takes precedence. * If [Multi-Factor Authentication + * (MFA)](https://docs.thoughtspot.com/cloud/latest/authentication-local-mfa) is enabled on your + * instance, the API login request with `username` and `password` returns an + * error. You can switch to token-based authentication with `secret_key` or contact + * ThoughtSpot Support for assistance. The token obtained from ThoughtSpot is valid for 5 + * minutes by default. You can configure the token expiration time as required. #### ABAC via + * RLS To implement ABAC via RLS and assign security entitlements to users during session + * creation, generate a token with custom variable values. The values set in the authentication + * token are applied to the formula variables referenced in RLS rules at the table level, which + * determines the data each user can access based on their entitlements. The variable values can + * be configured to persist for a specific set of Models in user sessions initiated with the + * token, allowing different RLS rules to be set for different data models. Once defined, the + * rules are added to the user's `variable_values` object, after which all + * sessions will use the persisted values. For more information, see [ABAC via tokens + * Documentation](https://developers.thoughtspot.com/docs/abac-via-rls-variables). ##### Formula + * variables Before defining variable values, ensure the variables are created and available on + * your instance. To create a formula variable, you can use the **Create variable** + * (`/api/rest/2.0/template/variables/create`) REST API endpoint, with the variable + * `type` set as `Formula_Variable` in the API request. The API doesn't + * support `\"persist_option\": \"RESET\"` and + * `\"persist_option\": \"NONE\"` when `variable_values` + * are defined in the request. If you are using `variable_values` for token + * generation, you must use other supported persist options such as `APPEND` or + * `REPLACE`. If you want to use `RESET` or `NONE`, do not pass + * any `variable_values`. In such cases, `variable_values` will remain + * unaffected. #### Supported objects The supported object type is `LOGICAL_TABLE`. + * When using `object_id` with `variable_values`, models are supported. #### + * Just-in-time provisioning For [just-in-time user creation and + * provisioning](https://developers.thoughtspot.com/docs/just-in-time-provisioning), specify the + * following attributes in the API request: * `auto_create` * `username` * + * `display_name` * `email` * `groups` Set `auto_create` + * to `true` if the username does not exist in ThoughtSpot. If the username already + * exists in ThoughtSpot and `auto_create` is set to `true`, user properties + * such as display name, email, Org and group entitlements will not be updated with new values. + * Setting `auto_create` to `true` does not create formula variables. Hence, + * this setting will not be applicable to `variable_values`. #### Important point to + * note All options in the token creation APIs that define user access to data in ThoughtSpot + * will take effect during token creation, not when the token is used for authentication. For + * example, `auto_create:true` will create the user when the authentication token is + * created. Persist options such as `APPEND` and `REPLACE` will persist + * `variable_values` on the user profile when the token is created. + * + * @throws ApiException if the Api call fails + */ + @Test + public void getCustomAccessTokenTest() throws ApiException { + GetCustomAccessTokenRequest getCustomAccessTokenRequest = null; + AccessToken response = api.getCustomAccessToken(getCustomAccessTokenRequest); + // TODO: test validations + } + + /** + * Version: 10.15.0.cl or later Suggests the most relevant data sources for a given natural + * language query, ranked by confidence with LLM-generated reasoning. Requires + * `CAN_USE_SPOTTER` privilege and at least view-level access to the underlying + * metadata entities referenced in the response. #### Usage guidelines The request must include: + * - `query`: the natural language question to find relevant data sources for If the + * request is successful, the API returns a ranked list of suggested data sources, each + * containing: - `confidence`: a float score indicating the model's confidence in + * the relevance of the suggestion - `details`: metadata about the data source - + * `data_source_identifier`: the unique ID of the data source - + * `data_source_name`: the display name of the data source - `description`: + * a description of the data source - `reasoning`: LLM-generated rationale explaining + * why the data source was recommended #### Error responses | Code | Description | + * |------|--------------------------------------------------------------------------------------------------------------------------------------------| + * | 401 | Unauthorized — authentication token is missing, expired, or invalid. | | 403 | + * Forbidden — the authenticated user does not have `CAN_USE_SPOTTER` privilege or + * lacks view permission on the underlying metadata entities. | > ###### Note: > * This + * endpoint is currently in Beta. Breaking changes may be introduced before it is made Generally + * Available. > * This endpoint requires Spotter — please contact ThoughtSpot Support to + * enable Spotter on your cluster. + * + * @throws ApiException if the Api call fails + */ + @Test + public void getDataSourceSuggestionsTest() throws ApiException { + GetDataSourceSuggestionsRequest getDataSourceSuggestionsRequest = null; + EurekaDataSourceSuggestionResponse response = + api.getDataSourceSuggestions(getDataSourceSuggestionsRequest); + // TODO: test validations + } + + /** + * Version: 9.0.0.cl or later Generates an authentication token for creating a full session in + * ThoughtSpot for a given user. Recommended for use cases that do not require Attribute-based + * access control (ABAC) via Row Level Security (RLS). #### Usage guidelines You can generate a + * token for a user by providing a `username` and `password`, or by using + * the `secret_key` generated for your instance. To generate a `secret_key`, + * the administrator must enable [Trusted + * authentication](https://developers.thoughtspot.com/docs/trusted-auth-secret-key) in the + * **Develop** > **Customizations** > **Security Settings** page. **Note**: * When both + * `password` and `secret_key` are included in the API request, + * `password` takes precedence. * If [Multi-Factor Authentication + * (MFA)](https://docs.thoughtspot.com/cloud/latest/authentication-local-mfa) is enabled on your + * instance, the API login request with `username` and `password` returns an + * error. You can switch to token-based authentication with `secret_key` or contact + * ThoughtSpot Support for assistance. The token obtained from ThoughtSpot is valid for 5 + * minutes by default. You can configure the token expiration time as required. #### + * Just-in-time provisioning For [just-in-time user creation and + * provisioning](https://developers.thoughtspot.com/docs/just-in-time-provisioning), specify the + * following attributes in the API request: * `auto_create` * `username` * + * `display_name` * `email` * `group_identifiers` Set + * `auto_create` to `true` if the username does not exist in ThoughtSpot. If + * the user already exists in ThoughtSpot and `auto_create` is set to + * `true`, user properties such as display name, email and group assignment will be + * updated. To add a new user and assign privileges during auto-creation, the + * `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege is required. If + * [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled, + * the `CONTROL_TRUSTED_AUTH` (**Can Enable or Disable Trusted Authentication**) + * privilege is required. #### Important point to note All options in the token creation APIs + * that define user access to data in ThoughtSpot will take effect during token creation, not + * when the token is used for authentication. For example, `auto_create:true` will + * create the user when the authentication token is created. + * + * @throws ApiException if the Api call fails + */ + @Test + public void getFullAccessTokenTest() throws ApiException { + GetFullAccessTokenRequest getFullAccessTokenRequest = null; + Token response = api.getFullAccessToken(getFullAccessTokenRequest); + // TODO: test validations + } + + /** + * Version: 10.15.0.cl or later Retrieves existing natural language (NL) instructions configured + * for a specific data model. These instructions guide the AI system in understanding data + * context and generating more accurate responses. Requires `CAN_USE_SPOTTER` + * privilege, at least view access on the data model, and a bearer token corresponding to the + * org where the data model exists. #### Usage guidelines The request must include: - + * `data_source_identifier`: the unique ID of the data model to retrieve instructions + * for If the request is successful, the API returns: - `nl_instructions_info`: an + * array of instruction objects, each containing: - `instructions`: the configured + * text instructions for AI processing - `scope`: the scope of the instruction — + * currently only `GLOBAL` is supported #### Instructions scope - **GLOBAL**: + * Instructions that apply globally across the system on the given data-model (currently only + * global instructions are supported) #### Error responses | Code | Description | + * |------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| + * | 401 | Unauthorized — authentication token is missing, expired, or invalid. | | 403 | + * Forbidden — the authenticated user does not have `CAN_USE_SPOTTER` privilege, lacks + * view access on the data model, or the bearer token does not correspond to the org where the + * data model exists. | > ###### Note: > > - To use this API, the user needs at least + * view access on the data model, and must use the bearer token corresponding to the org where + * the data model exists. > - This endpoint is currently in Beta. Breaking changes may be + * introduced before the endpoint is made Generally Available. > - Available from version + * 10.15.0.cl and later. > - This endpoint requires Spotter — please contact ThoughtSpot + * Support to enable Spotter on your cluster. > - Use this API to review currently configured + * instructions before modifying them with `setNLInstructions`. + * + * @throws ApiException if the Api call fails + */ + @Test + public void getNLInstructionsTest() throws ApiException { + GetNLInstructionsRequest getNLInstructionsRequest = null; + EurekaGetNLInstructionsResponse response = api.getNLInstructions(getNLInstructionsRequest); + // TODO: test validations + } + + /** + * Version: 9.0.0.cl or later Generates an authentication token that provides access to a + * specific metadata object. This object list is intersected with the list of objects the user + * is allowed to access via group membership. For more information, see [Object + * security](https://docs.thoughtspot.com/cloud/latest/security-data-object#object_security). + * #### Usage guidelines You can generate a token for a user by providing a `username` + * and `password`, or by using the `secret_key` generated for your instance. + * To generate a `secret_key`, the administrator must enable [Trusted + * authentication](https://developers.thoughtspot.com/docs/trusted-auth-secret-key) in the + * **Develop** > **Customizations** > **Security Settings** page. **Note**: * When both + * `password` and `secret_key` are included in the API request, + * `password` takes precedence. * If [Multi-Factor Authentication + * (MFA)](https://docs.thoughtspot.com/cloud/latest/authentication-local-mfa) is enabled on your + * instance, the API login request with `username` and `password` returns an + * error. You can switch to token-based authentication with `secret_key` or contact + * ThoughtSpot Support for assistance. The token obtained from ThoughtSpot is valid for 5 + * minutes by default. You can configure the token expiration time as required. #### + * Just-in-time provisioning For [just-in-time user creation and + * provisioning](https://developers.thoughtspot.com/docs/just-in-time-provisioning), specify the + * following attributes in the API request: * `auto_create` * `username` * + * `display_name` * `email` * `group_identifiers` Set + * `auto_create` to `true` if the user is not available in ThoughtSpot. If + * the user already exists in ThoughtSpot and the `auto_create` parameter is set to + * `true`, user properties such as display name, email, and group assignment will be + * updated. To add a new user and assign privileges, the `ADMINISTRATION` (**Can + * administer ThoughtSpot**) privilege is required. If [Role-Based Access Control + * (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled, the + * `CONTROL_TRUSTED_AUTH`(**Can Enable or Disable Trusted Authentication**) privilege + * is required. #### Important point to note All options in the token creation APIs that define + * user access to data in ThoughtSpot will take effect during token creation, not when the token + * is used for authentication. For example, `auto_create:true` will create the user + * when the authentication token is created. + * + * @throws ApiException if the Api call fails + */ + @Test + public void getObjectAccessTokenTest() throws ApiException { + GetObjectAccessTokenRequest getObjectAccessTokenRequest = null; + Token response = api.getObjectAccessToken(getObjectAccessTokenRequest); + // TODO: test validations + } + + /** + * Version: 10.13.0.cl or later Breaks down a natural language query into a series of smaller + * analytical sub-questions, each mapped to a relevant data source. Requires + * `CAN_USE_SPOTTER` privilege and at least view-level access to the referenced + * metadata objects. #### Usage guidelines The request must include: - `query`: the + * natural language question to decompose into analytical sub-questions - + * `metadata_context`: at least one of the following context identifiers to guide + * question generation: - `conversation_identifier` — an existing conversation session + * ID - `answer_identifiers` — a list of Answer GUIDs - + * `liveboard_identifiers` — a list of Liveboard GUIDs - + * `data_source_identifiers` — a list of data source GUIDs Optional parameters for + * refining the output: - `ai_context`: additional context to improve response quality + * - `content` — supplementary text or CSV data as string input - + * `instructions` — custom text instructions for the AI system - + * `limit_relevant_questions`: maximum number of questions to return (default: + * `5`) - `bypass_cache`: if `true`, forces fresh computation + * instead of returning cached results If the request is successful, the API returns a list of + * relevant analytical questions, each containing: - `query`: the generated + * sub-question - `data_source_identifier`: the unique ID of the data source the + * question targets - `data_source_name`: the display name of the corresponding data + * source #### Error responses | Code | Description | + * |------|---------------------------------------------------------------------------------------------------------------------------------------| + * | 401 | Unauthorized — authentication token is missing, expired, or invalid. | | 403 | + * Forbidden — the authenticated user does not have `CAN_USE_SPOTTER` privilege or + * lacks view access to the referenced metadata objects. | > ###### Note: > * This + * endpoint is currently in Beta. Breaking changes may be introduced before the endpoint is made + * Generally Available. > * This endpoint requires Spotter - please contact ThoughtSpot + * support to enable Spotter on your cluster. + * + * @throws ApiException if the Api call fails + */ + @Test + public void getRelevantQuestionsTest() throws ApiException { + GetRelevantQuestionsRequest getRelevantQuestionsRequest = null; + EurekaGetRelevantQuestionsResponse response = + api.getRelevantQuestions(getRelevantQuestionsRequest); + // TODO: test validations + } + + /** + * Version: 9.0.0.cl or later Retrieves the current configuration details of the cluster. If the + * request is successful, the API returns a list configuration settings applied on the cluster. + * Requires `ADMINISTRATION`(**Can administer ThoughtSpot**) privilege to view these + * complete configuration settings of the cluster. If [Role-Based Access Control + * (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the + * `SYSTEM_INFO_ADMINISTRATION` (**Can view system activities**) privilege is + * required. This API does not require any parameters to be passed in the request. + * + * @throws ApiException if the Api call fails + */ + @Test + public void getSystemConfigTest() throws ApiException { + SystemConfig response = api.getSystemConfig(); + // TODO: test validations + } + + /** + * Version: 9.0.0.cl or later Gets system information such as the release version, locale, time + * zone, deployment environment, date format, and date time format of the cluster. Requires + * `ADMINISTRATION` (**Can administer ThoughtSpot**) privileges. If [Role-Based Access + * Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, + * the `SYSTEM_INFO_ADMINISTRATION` (**Can view system activities**) privilege is + * required. This API does not require any parameters to be passed in the request. + * + * @throws ApiException if the Api call fails + */ + @Test + public void getSystemInformationTest() throws ApiException { + SystemInfo response = api.getSystemInformation(); + // TODO: test validations + } + + /** + * Version: 9.2.0.cl or later Gets a list of configuration overrides applied on the cluster. + * Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If + * [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled + * on your instance, the `APPLICATION_ADMINISTRATION` (**Can manage application + * settings**) privilege is required. This API does not require any parameters to be passed in + * the request. + * + * @throws ApiException if the Api call fails + */ + @Test + public void getSystemOverrideInfoTest() throws ApiException { + SystemOverrideInfo response = api.getSystemOverrideInfo(); + // TODO: test validations + } + + /** + * Version: 9.0.0.cl or later Imports [TML](https://docs.thoughtspot.com/cloud/latest/tml) files + * into ThoughtSpot. Requires `DATAMANAGEMENT` (**Can manage data**) or + * `ADMINISTRATION` (**Can administer ThoughtsSpot**) privilege. If [Role-Based Access + * Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, + * the following Data control privileges may be required: - + * `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) - + * `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` (**Can manage data models**) #### Usage + * guidelines * Import all related objects in a single TML Import API call. For example, Tables + * that use the same Connection object and Worksheets connected to these Tables. * Include the + * `fqn` property to distinguish objects that have the same name. For example, if you + * have multiple Connections or Worksheets with the same name on ThoughtSpot and the Connection + * or Worksheet referenced in your TML file does not have a unique name to distinguish, it may + * result in invalid object references. Adding `fqn` helps ThoughtSpot differentiate a + * Table from another with the same name. We recommend [exporting TML with + * FQNs](#/http/api-endpoints/metadata/export-metadata-tml) and using these during the import + * operation. * You can upload multiple TML files at a time. If you import a Worksheet along + * with Liveboards, Answers, and other dependent objects in a single API call, the imported + * objects will be immediately available for use. When you import only a Worksheet object, it + * may take some time for the Worksheet to become available in the ThoughtSpot system. Please + * wait for a few minutes, and then proceed to create an Answer and Liveboard from the newly + * imported Worksheet. For more information, see [TML + * Documentation](https://developers.thoughtspot.com/docs/tml#_import_a_tml). + * + * @throws ApiException if the Api call fails + */ + @Test + public void importMetadataTMLTest() throws ApiException { + ImportMetadataTMLRequest importMetadataTMLRequest = null; + List response = api.importMetadataTML(importMetadataTMLRequest); + // TODO: test validations + } + + /** + * Version: 10.4.0.cl or later Schedules a task to import + * [TML](https://docs.thoughtspot.com/cloud/latest/tml) files into ThoughtSpot. You can use this + * API endpoint to process TML objects asynchronously when importing TMLs of large and complex + * metadata objects into ThoughtSpot. Unlike the synchronous import TML operation, the API + * processes TML data in the background and returns a task ID, which can be used to check the + * status of the import task via `/api/rest/2.0/metadata/tml/async/status` API + * endpoint. Requires `DATAMANAGEMENT` (**Can manage data**) or + * `ADMINISTRATION` (**Can administer ThoughtsSpot**) privilege, and edit access to + * the TML objects. If [Role-Based Access Control + * (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the + * following Data control privileges may be required: - + * `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) - + * `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` (**Can manage data models**) #### Usage + * guidelines See [Async TML API + * Documentation](https://developers.thoughtspot.com/docs/tml#_import_tml_objects_asynchronously) + * for usage guidelines. + * + * @throws ApiException if the Api call fails + */ + @Test + public void importMetadataTMLAsyncTest() throws ApiException { + ImportMetadataTMLAsyncRequest importMetadataTMLAsyncRequest = null; + ImportEPackAsyncTaskStatus response = + api.importMetadataTMLAsync(importMetadataTMLAsyncRequest); + // TODO: test validations + } + + /** + * Version: 9.0.0.cl or later Imports group objects from external databases into ThoughtSpot. + * Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If + * [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled + * on your instance, the `GROUP_ADMINISTRATION` (**Can manage groups**) privilege is + * required. During the import operation: * If the specified group is not available in + * ThoughtSpot, it will be added to ThoughtSpot. * If `delete_unspecified_groups` is + * set to `true`, the groups not specified in the API request, excluding administrator + * and system user groups, are deleted. * If the specified groups are already available in + * ThoughtSpot, the object properties of these groups are modified and synchronized as per the + * input data in the API request. A successful API call returns the object that represents the + * changes made in the ThoughtSpot system. + * + * @throws ApiException if the Api call fails + */ + @Test + public void importUserGroupsTest() throws ApiException { + ImportUserGroupsRequest importUserGroupsRequest = null; + ImportUserGroupsResponse response = api.importUserGroups(importUserGroupsRequest); + // TODO: test validations + } + + /** + * Version: 9.0.0.cl or later Imports user data from external databases into ThoughtSpot. During + * the user import operation: * If the specified users are not available in ThoughtSpot, the + * users are created and assigned a default password. Defining a `default_password` in + * the API request is optional. * If `delete_unspecified_users` is set to + * `true`, the users not specified in the API request, excluding the + * `tsadmin`, `guest`, `system` and `su` users, are + * deleted. * If the specified user objects are already available in ThoughtSpot, the object + * properties are updated and synchronized as per the input data in the API request. A + * successful API call returns the object that represents the changes made in the ThoughtSpot + * system. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If + * [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled + * on your instance, the `USER_ADMINISTRATION` (**Can manage users**) privilege is + * required. + * + * @throws ApiException if the Api call fails + */ + @Test + public void importUsersTest() throws ApiException { + ImportUsersRequest importUsersRequest = null; + ImportUsersResponse response = api.importUsers(importUsersRequest); + // TODO: test validations + } + + /** + * Version: 9.0.0.cl or later Creates a login session for a ThoughtSpot user with Basic + * authentication. In Basic authentication method, REST clients log in to ThoughtSpot using + * `username` and `password` attributes. On a multi-tenant cluster with + * Orgs, users can pass the ID of the Org in the API request to log in to a specific Org + * context. **Note**: If Multi-Factor Authentication (MFA) is enabled on your instance, the API + * login request with basic authentication (`username` and `password` ) + * returns an error. Contact ThoughtSpot Support for assistance. A successful login returns a + * session cookie that can be used in your subsequent API requests. + * + * @throws ApiException if the Api call fails + */ + @Test + public void loginTest() throws ApiException { + LoginRequest loginRequest = null; + api.login(loginRequest); + // TODO: test validations + } + + /** + * Version: 9.0.0.cl or later Logs out a user from their current session. + * + * @throws ApiException if the Api call fails + */ + @Test + public void logoutTest() throws ApiException { + api.logout(); + // TODO: test validations + } + + /** + * Version: 26.3.0.cl or later This API allows the addition or deletion of object level + * privileges for a set of users and groups, on a set of metadata objects. It provides users to + * access certain features based on privilege based access control. #### Usage guidelines - + * Specify the `operation`. The supported operations are: `ADD`, + * `REMOVE`. - Specify the type of the objects on which the object privileges are + * being provided in `metadata_type`. Only `LOGICAL_TABLE` metadata type is + * supported for now. It may be extended for other metadata types in future. - Specify the list + * of object privilege types in the `object_privilege_types` array. The supported + * object privilege types are: `SPOTTER_COACHING_PRIVILEGE`. - Specify the identifiers + * (either GUID or name) for the metadata objects in the `metadata_identifiers` array. + * - Specify the `type` (`USER` or `USER_GROUP`) and + * `identifier` (either GUID or name) of the principals to which you want to apply the + * given operation and given object privileges in the `principals` array. - Ensure + * using correct Authorization Bearer Token corresponding to specific user & org. #### + * Example request ```json { \"operation\": + * \"operation-type\", \"metadata_type\": \"metadata-type\", + * \"object_privilege_types\": [\"privilege-type-1\", + * \"privilege-type-2\"], \"metadata_identifiers\": + * [\"metadata-guid-or-name-1\", \"metadata-guid-or-name-1\"], + * \"principals\": [ { \"type\": \"type-1\", + * \"identifier\": \"principal-guid-or-name-1\" }, { \"type\": + * \"type-2\", \"identifier\": \"principal-guid-or-name-2\" } ] } + * ``` > ###### Note: > * Only admin users, users with edit access and + * users with coaching privilege on a given data-model can add or remove principals related to + * SPOTTER_COACHING_PRIVILEGE + * + * @throws ApiException if the Api call fails + */ + @Test + public void manageObjectPrivilegeTest() throws ApiException { + ManageObjectPrivilegeRequest manageObjectPrivilegeRequest = null; + api.manageObjectPrivilege(manageObjectPrivilegeRequest); + // TODO: test validations + } + + /** + * Parameterize fields in metadata objects. Version: 10.9.0.cl or later **Note:** This API + * endpoint is deprecated and will be removed from ThoughtSpot in a future release. Use [POST + * /api/rest/2.0/metadata/parameterize-fields](/api/rest/2.0/metadata/parameterize-fields) + * instead. Allows parameterizing fields in metadata objects in ThoughtSpot. Requires + * appropriate permissions to modify the metadata object. The API endpoint allows parameterizing + * the following types of metadata objects: * Logical Tables * Connections * Connection Configs + * For a Logical Table the field type must be `ATTRIBUTE` and field name can be one + * of: * databaseName * schemaName * tableName For a Connection or Connection Config, the field + * type is always `CONNECTION_PROPERTY`. In this case, field_name specifies the exact + * property of the Connection or Connection Config that needs to be parameterized. For + * Connection Config, the only supported field name is: * impersonate_user + * + * @throws ApiException if the Api call fails + */ + @Test + public void parameterizeMetadataTest() throws ApiException { + ParameterizeMetadataRequest parameterizeMetadataRequest = null; + api.parameterizeMetadata(parameterizeMetadataRequest); + // TODO: test validations + } + + /** + * Parameterize multiple fields of metadata objects. For example [schemaName, databaseName] for + * LOGICAL_TABLE. Version: 26.5.0.cl or later Allows parameterizing multiple fields of metadata + * objects in ThoughtSpot. For example, you can parameterize [schemaName, databaseName] for + * LOGICAL_TABLE. Requires appropriate permissions to modify the metadata object. The API + * endpoint allows parameterizing the following types of metadata objects: * Logical Tables * + * Connections * Connection Configs For a Logical Table, the field type must be + * `ATTRIBUTE` and field names can include: * databaseName * schemaName * tableName + * For a Connection or Connection Config, the field type is always + * `CONNECTION_PROPERTY`. In this case, field_names specifies the exact properties of + * the Connection or Connection Config that need to be parameterized. For Connection Config, + * supported field names include: * impersonate_user You can parameterize multiple fields at + * once by providing an array of field names. + * + * @throws ApiException if the Api call fails + */ + @Test + public void parameterizeMetadataFieldsTest() throws ApiException { + ParameterizeMetadataFieldsRequest parameterizeMetadataFieldsRequest = null; + api.parameterizeMetadataFields(parameterizeMetadataFieldsRequest); + // TODO: test validations + } + + /** + * Version: 26.5.0.cl or later Allows publishing metadata objects across organizations in + * ThoughtSpot. Requires ADMINISTRATION role and TENANT scope. The API endpoint allows + * publishing the following types of metadata objects: * Liveboards * Answers * Logical Tables + * This API will essentially share the objects along with it's dependencies to the org + * admins of the orgs to which it is being published. + * + * @throws ApiException if the Api call fails + */ + @Test + public void publishMetadataTest() throws ApiException { + PublishMetadataRequest publishMetadataRequest = null; + api.publishMetadata(publishMetadataRequest); + // TODO: test validations + } + + /** + * Update values for a variable Version: 26.4.0.cl or later Allows updating values for a + * specific variable in ThoughtSpot. Requires ADMINISTRATION role. The CAN_MANAGE_VARIABLES + * permission allows you to manage Formula Variables in the current organization scope. The API + * endpoint allows: * Adding new values to the variable * Replacing existing values * Deleting + * values from the variable * Resetting all values When updating variable values, you need to + * specify: * The variable identifier (ID or name) * The values to add/replace/remove * The + * operation to perform (ADD, REPLACE, REMOVE, RESET) Behaviour based on operation type: * ADD - + * Adds values to the variable if this is a list type variable, else same as replace. * REPLACE + * - Replaces all values of a given set of constraints with the current set of values. * REMOVE + * - Removes any values which match the set of conditions of the variables if this is a list + * type variable, else clears value. * RESET - Removes all constraints for the given variable, + * scope is ignored + * + * @throws ApiException if the Api call fails + */ + @Test + public void putVariableValuesTest() throws ApiException { + String identifier = null; + PutVariableValuesRequest putVariableValuesRequest = null; + api.putVariableValues(identifier, putVariableValuesRequest); + // TODO: test validations + } + + /** + * Version: 10.7.0.cl or later **Deprecated** — Use `getRelevantQuestions` instead + * (available from 10.13.0.cl). Breaks down a topical or goal-oriented natural language question + * into smaller, actionable analytical sub-questions, each mapped to a relevant data source for + * independent execution. Requires `CAN_USE_SPOTTER` privilege and at least view-level + * access to the referenced metadata objects. #### Usage guidelines The request accepts the + * following parameters: - `nlsRequest`: contains the user `query` to + * decompose, along with optional `instructions` and `bypassCache` flag - + * `worksheetIds`: list of data source identifiers to scope the decomposition - + * `answerIds`: list of Answer GUIDs whose data guides the response - + * `liveboardIds`: list of Liveboard GUIDs whose data guides the response - + * `conversationId`: an existing conversation session ID for context continuity - + * `content`: supplementary text or CSV data to improve response quality - + * `maxDecomposedQueries`: maximum number of sub-questions to return (default: + * `5`) If the request is successful, the API returns a + * `decomposedQueryResponse` containing a list of `decomposedQueries`, each + * with: - `query`: the generated analytical sub-question - `worksheetId`: + * the unique ID of the data source the question targets - `worksheetName`: the + * display name of the corresponding data source #### Error responses | Code | Description | + * |------|---------------------------------------------------------------------------------------------------------------------------------------| + * | 401 | Unauthorized — authentication token is missing, expired, or invalid. | | 403 | + * Forbidden — the authenticated user does not have `CAN_USE_SPOTTER` privilege or + * lacks view access to the referenced metadata objects. | > ###### Note: > * This + * endpoint is deprecated since 10.13.0.cl. Use `getRelevantQuestions` for new + * integrations. > * This endpoint is currently in Beta. Breaking changes may be introduced + * before the endpoint is made Generally Available. > * This endpoint requires Spotter — + * please contact ThoughtSpot support to enable Spotter on your cluster. + * + * @throws ApiException if the Api call fails + */ + @Test + public void queryGetDecomposedQueryTest() throws ApiException { + QueryGetDecomposedQueryRequest queryGetDecomposedQueryRequest = null; + EurekaDecomposeQueryResponse response = + api.queryGetDecomposedQuery(queryGetDecomposedQueryRequest); + // TODO: test validations + } + + /** + * Version: 9.0.0.cl or later Resets the password of a user account. Administrators can reset + * password on behalf of a user. Requires `ADMINISTRATION` (**Can administer + * ThoughtSpot**) privilege. If [Role-Based Access Control + * (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the + * `USER_ADMINISTRATION` (**Can manage users**) privilege is required. + * + * @throws ApiException if the Api call fails + */ + @Test + public void resetUserPasswordTest() throws ApiException { + ResetUserPasswordRequest resetUserPasswordRequest = null; + api.resetUserPassword(resetUserPasswordRequest); + // TODO: test validations + } + + /** + * Version: 9.2.0.cl or later Reverts TML objects to a previous commit specified in the API + * request. Requires at least edit access to objects. In the API request, specify the + * `commit_id`. If the branch name is not specified in the request, the API will + * consider the default branch configured on your instance. By default, the API reverts all + * objects. If the revert operation fails for one of the objects provided in the commit, the API + * returns an error and does not revert any object. For more information, see [Git integration + * documentation](https://developers.thoughtspot.com/docs/git-integration). + * + * @throws ApiException if the Api call fails + */ + @Test + public void revertCommitTest() throws ApiException { + String commitId = null; + RevertCommitRequest revertCommitRequest = null; + RevertResponse response = api.revertCommit(commitId, revertCommitRequest); + // TODO: test validations + } + + /** + * Version: 26.2.0.cl or later Revokes OAuth refresh tokens for users who no longer require + * access to a data warehouse connection. When a token is revoked, the affected user's + * session for that connection is terminated, and they must re-authenticate to regain access. + * Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) or + * `DATAMANAGEMENT` (**Can manage data**) privileges. If [Role-Based Access Control + * (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on the ThoughtSpot instance, + * users with `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) + * privilege can also make API requests to revoke tokens for connection users. #### Usage + * guidelines You can specify different combinations of identifiers to control which refresh + * tokens are revoked. - **connection_identifier**: Revokes refresh tokens for all users of the + * connection, except the connection author. - **connection_identifier** and + * **user_identifiers**: Revokes refresh tokens only for the users specified in the request. If + * the name or ID of the connection author is included in the request, their token will also be + * revoked. - **connection_identifier** and **configuration_identifiers**: Revokes refresh + * tokens for all users on the specified configurations, except the configuration author. - + * **connection_identifier**, **configuration_identifiers**, and **user_identifiers**: Revokes + * refresh tokens for the specified users on the specified configurations. - + * **connection_identifier** and **org_identifiers**: Revokes refresh tokens for the specified + * Orgs. Applicable only for published connections. - **connection_identifier**, + * **org_identifiers**, and **user_identifiers**: Revokes refresh tokens for the specified users + * in the specified Orgs. Applicable only for published connections. **NOTE**: The + * `org_identifiers` parameter is only applicable for published connections. Using + * this parameter for unpublished connections will result in an error. Ensure that the + * connections are published before making the API request. + * + * @throws ApiException if the Api call fails + */ + @Test + public void revokeRefreshTokensTest() throws ApiException { + String connectionIdentifier = null; + RevokeRefreshTokensRequest revokeRefreshTokensRequest = null; + RevokeRefreshTokensResponse response = + api.revokeRefreshTokens(connectionIdentifier, revokeRefreshTokensRequest); + // TODO: test validations + } + + /** + * Version: 9.0.0.cl or later Revokes the authentication token issued for current user session. + * The token of your current session expires when you make a call to the + * `/api/rest/2.0/auth/token/revoke` endpoint. the users will not be able to access + * ThoughtSpot objects until a new token is obtained. To restart your session, request for a new + * token from ThoughtSpot. See [Get Full Access + * Token](#/http/api-endpoints/authentication/get-full-access-token). + * + * @throws ApiException if the Api call fails + */ + @Test + public void revokeTokenTest() throws ApiException { + RevokeTokenRequest revokeTokenRequest = null; + api.revokeToken(revokeTokenRequest); + // TODO: test validations + } + + /** + * Version: 26.6.0.cl or later Returns the authentication configuration for the specified auth + * type at cluster and org level. Currently supports `TRUSTED_AUTH`. #### Required + * privileges Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) or + * `CONTROL_TRUSTED_AUTH` (**Can Enable or Disable Trusted Authentication**) + * privilege. If [Role-Based Access Control + * (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled, the + * `CONTROL_TRUSTED_AUTH` privilege is required. #### Usage guidelines Use + * `scope` to control which level of settings are returned: - `CLUSTER` — + * Returns cluster-level authentication status and access tokens. Accessible only from the + * Primary Org. - `ORG` — Returns org-level authentication status and access tokens + * for the current Org. Requires the per-Org authentication feature to be enabled on your + * instance. - If `scope` is omitted, both cluster and org-level settings are returned + * based on the caller's org context and feature availability. The `access_tokens` + * array in `cluster_preferences` or `org_preferences` is omitted when no + * token is configured at that level. **Note**: Access tokens returned in the response are + * sensitive credentials. Treat them with the same care as passwords. + * + * @throws ApiException if the Api call fails + */ + @Test + public void searchAuthSettingsTest() throws ApiException { + SearchAuthSettingsRequest searchAuthSettingsRequest = null; + SearchAuthSettingsResponse response = api.searchAuthSettings(searchAuthSettingsRequest); + // TODO: test validations + } + + /** + * Version: 10.12.0.cl or later Gets a list of [custom + * calendars](https://docs.thoughtspot.com/cloud/latest/connections-cust-cal). Requires + * `DATAMANAGEMENT` (**Can manage data**) or `ADMINISTRATION` (**Can + * administer ThoughtSpot**) privilege. If [Role-Based Access Control + * (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your ThoughtSpot + * instance, the `CAN_MANAGE_CUSTOM_CALENDAR` (**Can manage custom calendars**) + * privilege is required. #### Usage guidelines By default, the API returns a list of custom + * calendars for all connection objects. To retrieve custom calendar details for a particular + * connection, specify the connection ID. You can also use other search parameters such as + * `name_pattern` and `sort_options` as search filters. The + * `name_pattern` parameter filters and returns only those objects that match the + * specified pattern. Use `%` as a wildcard for pattern matching. + * + * @throws ApiException if the Api call fails + */ + @Test + public void searchCalendarsTest() throws ApiException { + SearchCalendarsRequest searchCalendarsRequest = null; + List response = api.searchCalendars(searchCalendarsRequest); + // TODO: test validations + } + + /** + * Version: 26.4.0.cl or later Searches delivery history for communication channels such as + * webhooks. Returns channel-level delivery status for each job execution record. Use this to + * monitor channel health and delivery success rates across events. Requires + * `ADMINISTRATION` (**Can administer ThoughtSpot**) or `DEVELOPER` (**Has + * developer privilege**) privilege. If [Role-Based Access Control + * (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, users with + * `CAN_MANAGE_WEBHOOKS` (**Can manage webhooks**) privilege are also authorized to + * perform this action. **NOTE**: When `channel_type` is `WEBHOOK`, the + * following constraints apply: - `job_ids`, `channel_identifiers`, and + * `events` each accept at most one element. - When `job_ids` is provided, + * it is used as the sole lookup key and other filter fields are ignored. - When + * `job_ids` is not provided, `channel_identifiers` and `events` + * are both required, each containing exactly one element. - Records older than the configured + * retention period are not returned. - Use `start_epoch_time_in_millis` and/or + * `end_epoch_time_in_millis` to narrow results to a specific time window. + * + * @throws ApiException if the Api call fails + */ + @Test + public void searchChannelHistoryTest() throws ApiException { + SearchChannelHistoryRequest searchChannelHistoryRequest = null; + SearchChannelHistoryResponse response = + api.searchChannelHistory(searchChannelHistoryRequest); + // TODO: test validations + } + + /** + * Version: 26.4.0.cl or later Gets a list of collections available in ThoughtSpot. To get + * details of a specific collection, specify the collection GUID or name. You can also filter + * the API response based on the collection name pattern, author, and other criteria. #### + * Search options * **name_pattern**: Use '%' as a wildcard character to match + * collection names * **collection_identifiers**: Search for specific collections by their GUIDs + * or names * **include_metadata**: When set to `true`, includes the metadata objects + * within each collection in the response **NOTE**: If the API returns an empty list, consider + * increasing the value of the `record_size` parameter. To search across all available + * collections, set `record_size` to `-1`. + * + * @throws ApiException if the Api call fails + */ + @Test + public void searchCollectionsTest() throws ApiException { + SearchCollectionsRequest searchCollectionsRequest = null; + CollectionSearchResponse response = api.searchCollections(searchCollectionsRequest); + // TODO: test validations + } + + /** + * Version: 9.2.0.cl or later Gets a list of commits for a given metadata object. Requires + * `DATAMANAGEMENT` (**Can manage data**) privilege. If [Role-Based Access Control + * (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance on your + * instance, the `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` (**Can manage data models**) + * privilege and edit access to the metadata objects. + * + * @throws ApiException if the Api call fails + */ + @Test + public void searchCommitsTest() throws ApiException { + SearchCommitsRequest searchCommitsRequest = null; + List response = api.searchCommits(searchCommitsRequest); + // TODO: test validations + } + + /** + * Version: 10.14.0.cl or later Fetch communication channel preferences. - Use + * `cluster_preferences` to fetch the default preferences for your ThoughtSpot + * application instance. - If your instance has + * [Orgs](https://docs.thoughtspot.com/cloud/latest/orgs-overview), use + * `org_preferences` to fetch any Org-specific preferences that override the defaults. + * Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) or `DEVELOPER` + * (**Has developer privilege**) privilege. If [Role-Based Access Control + * (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, users with + * `APPLICATION_ADMINISTRATION` (**Can manage application settings**) privilege are + * also authorized to perform this action. + * + * @throws ApiException if the Api call fails + */ + @Test + public void searchCommunicationChannelPreferencesTest() throws ApiException { + SearchCommunicationChannelPreferencesRequest searchCommunicationChannelPreferencesRequest = + null; + CommunicationChannelPreferencesResponse response = + api.searchCommunicationChannelPreferences( + searchCommunicationChannelPreferencesRequest); + // TODO: test validations + } + + /** + * Version: 9.2.0.cl or later Gets Git repository connections configured on the ThoughtSpot + * instance. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If + * [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled + * on your instance on your instance, the `CAN_SETUP_VERSION_CONTROL` (**Can set up + * version control**) privilege. + * + * @throws ApiException if the Api call fails + */ + @Test + public void searchConfigTest() throws ApiException { + SearchConfigRequest searchConfigRequest = null; + List response = api.searchConfig(searchConfigRequest); + // TODO: test validations + } + + /** + * Version: 9.2.0.cl or later Gets connection objects. Requires `DATAMANAGEMENT` + * (**Can manage data**) or `ADMINISTRATION` (**Can administer ThoughtSpot**) + * privilege. If [Role-Based Access Control + * (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the + * `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) privilege is + * required. - To get a list of all connections available in the ThoughtSpot system, send the + * API request without any attributes in the request body. - To get the connection objects for a + * specific type of data warehouse, specify the type in `data_warehouse_types`. - To + * fetch details of a connection object, specify the connection object GUID or name. The + * `name_pattern` attribute allows passing partial text with `%` for a + * wildcard match. - To get details of the database, schemas, tables, or columns from a data + * connection object, specify `data_warehouse_object_type`. - To get a specific + * database, schema, table, or column from a connection object, define the object type in + * `data_warehouse_object_type` and object properties in the + * `data_warehouse_objects` array. For example, to search for a column, you must pass + * the database, schema, and table names in the API request. Note that in the following example, + * object properties are set in a hierarchical order (`database` > + * `schema` > `table` > `column`). ``` { + * \"connections\": [ { \"identifier\": + * \"b9d1f2ef-fa65-4a4b-994e-30fa2d57b0c2\", \"data_warehouse_objects\": [ { + * \"database\": \"NEBULADEV\", \"schema\": + * \"INFORMATION_SCHEMA\", \"table\": \"APPLICABLE_ROLES\", + * \"column\": \"ROLE_NAME\" } ] } ], + * \"data_warehouse_object_type\": \"COLUMN\" } ``` - To + * fetch data by `configuration`, specify `data_warehouse_object_type`. For + * example, to fetch columns from the `DEVELOPMENT` database, specify the + * `data_warehouse_object_type` as `DATABASE` and define the + * `configuration` string as + * `{\"database\":\"DEVELOPMENT\"}`. To get column data for a + * specific table, specify the table, for + * example,`{\"database\":\"RETAILAPPAREL\",\"table\":\"PIPES\"}`. + * - To query connections by `authentication_type`, specify + * `data_warehouse_object_type`. Supported values for `authentication_type` + * are: - `SERVICE_ACCOUNT`: For connections that require service account credentials + * to authenticate to the Cloud Data Warehouse and fetch data. - `OAUTH`: For + * connections that require OAuth credentials to authenticate to the Cloud Data Warehouse and + * fetch data. Teradata, Oracle, and Presto Cloud Data Warehouses do not support the OAuth + * authentication type. - `IAM`: For connections that have the IAM OAuth set up. This + * authentication type is supported on Amazon Redshift connections only. - `EXTOAUTH`: + * For connections that have External OAuth set up. ThoughtSpot supports external [OAuth with + * Microsoft Azure Active Directory (AD)](https://docs.thoughtspot.com/cloud/latest/ + * connections-snowflake-azure-ad-oauth) and [Okta for Snowflake data + * connections](https://docs.thoughtspot.com/cloud/latest/connections-snowflake-okta-oauth). - + * `KEY_PAIR`: For connections that require Key Pair account credentials to + * authenticate to the Cloud Data Warehouse and fetch data. This authentication type is + * supported on Snowflake connections only. - `OAUTH_WITH_PKCE`: For connections that + * require OAuth with PKCE account credentials to authenticate to the Cloud Data Warehouse and + * fetch data. This authentication type is supported on Snowflake, Starburst, Databricks, Denodo + * connections only. - `EXTOAUTH_WITH_PKCE`: For connections that require External + * OAuth With PKCE account credentials to authenticate to the Cloud Data Warehouse and fetch + * data. This authentication type is supported on Snowflake connections only. - + * `OAUTH_WITH_PEZ`: For connections that require OAuth With PEZ account credentials + * to authenticate to the Cloud Data Warehouse and fetch data. This authentication type is + * supported on Amazon Redshift connections only. - `OAUTH_WITH_SERVICE_PRINCIPAL`: + * For connections that require OAuth With Service Principal account credentials to authenticate + * to the Cloud Data Warehouse and fetch data. This authentication type is supported on + * Databricks connections only. - `PERSONAL_ACCESS_TOKEN`: For connections that + * require Personal Access Token account credentials to authenticate to the Cloud Data Warehouse + * and fetch data. This authentication type is supported on Databricks connections only. - + * `OAUTH_CLIENT_CREDENTIALS`: For connections that require OAuth Client Credentials + * to authenticate to the Cloud Data Warehouse and fetch data. This authentication type is + * supported on Snowflake connections only. - To include more details about connection objects + * in the API response, set `include_details` to `true`. - You can also sort + * the output by field names and filter connections by tags. **NOTE**: When filtering connection + * records by parameters other than `data_warehouse_types` or + * `tag_identifiers`, ensure that you set `record_size` to `-1` + * and `record_offset` to `0` for precise results. + * + * @throws ApiException if the Api call fails + */ + @Test + public void searchConnectionTest() throws ApiException { + SearchConnectionRequest searchConnectionRequest = null; + List response = api.searchConnection(searchConnectionRequest); + // TODO: test validations + } + + /** + * Version: 9.6.0.cl or later Gets custom actions configured on the cluster. Requires + * `DEVELOPER` (**Has Developer privilege**) or `ADMINISTRATION` (**Can + * administer ThoughtSpot**) privilege. If [Role-Based Access Control + * (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the + * `DEVELOPER` (**Has developer privilege**) privilege is required. + * + * @throws ApiException if the Api call fails + */ + @Test + public void searchCustomActionsTest() throws ApiException { + SearchCustomActionsRequest searchCustomActionsRequest = null; + List response = api.searchCustomActions(searchCustomActionsRequest); + // TODO: test validations + } + + /** + * Version: 9.0.0.cl or later Generates an Answer from a given data source. Requires at least + * view access to the data source object (Worksheet or View). #### Usage guidelines To search + * data, specify the data source GUID in `logical_table_identifier`. The data source + * can be a Worksheet, View, Table, or SQL view. Pass search tokens in the + * `query_string` attribute in the API request as shown in the following example: + * ``` { \"query_string\": \"[sales] by [store]\", + * \"logical_table_identifier\": \"cd252e5c-b552-49a8-821d-3eadaa049cca\", } + * ``` For more information about the `query_string` format and data + * source attribute, see [Search data + * API](https://developers.thoughtspot.com/docs/fetch-data-and-report-apis#_search_data_api). + * The `record_size` attribute determines the number of records to retrieve in an API + * call. For more information about pagination, record size, and maximum row limit, see + * [Pagination and record size + * settings](https://developers.thoughtspot.com/docs/fetch-data-and-report-apis#_pagination_settings_for_data_and_report_api). + * + * @throws ApiException if the Api call fails + */ + @Test + public void searchDataTest() throws ApiException { + SearchDataRequest searchDataRequest = null; + SearchDataResponse response = api.searchData(searchDataRequest); + // TODO: test validations + } + + /** + * Version: 10.10.0.cl or later Search the email customization configuration if any set for the + * ThoughtSpot system. #### Pre-requisites Requires `DEVELOPER` (**has developer + * privilege**) or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If + * [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled + * on your instance, the `DEVELOPER` (**Has developer privilege**) privilege is + * required. **NOTE**:This endpoint in currently in beta. Contact ThoughtSpot support to enable + * this on your instance. + * + * @throws ApiException if the Api call fails + */ + @Test + public void searchEmailCustomizationTest() throws ApiException { + SearchEmailCustomizationRequest searchEmailCustomizationRequest = null; + List response = + api.searchEmailCustomization(searchEmailCustomizationRequest); + // TODO: test validations + } + + /** + * Version: 9.0.0.cl or later Gets a list of metadata objects available on the ThoughtSpot + * system. This API endpoint is available to all users who have view access to the object. Users + * with `ADMINISTRATION` (**Can administer ThoughtSpot**) privileges can view data for + * all metadata objects, including users and groups. #### Usage guidelines - To get all metadata + * objects, send the API request without any attributes. - To get metadata objects of a specific + * type, set the `type` attribute. For example, to fetch a Worksheet, set the type as + * `LOGICAL_TABLE`. - To filter metadata objects within type + * `LOGICAL_TABLE`, set the `subtypes` attribute. For example, to fetch a + * Worksheet, set the type as `LOGICAL_TABLE` & subtypes as + * `[WORKSHEET]`. - To get a specific metadata object, specify the GUID. - To + * customize your search and filter the API response, you can use several parameters. You can + * search for objects created or modified by specific users, by tags applied to the objects, or + * by using the include parameters like `include_auto_created_objects`, + * `include_dependent_objects`, `include_headers`, + * `include_incomplete_objects`, and so on. You can also define sorting options to + * sort the data retrieved in the API response. - To get discoverable objects when linientmodel + * is enabled you can use `include_discoverable_objects` as true else false. Default + * value is true. - For liveboard metadata type, to get the newer format, set the + * `liveboard_response_format` as V2. Default value is V1. - To retrieve only objects + * that are published, set the `include_only_published_objects` as true. Default value + * is false. **NOTE**: The following parameters support pagination of metadata records: - + * `tag_identifiers` - `type` - `subtypes` - + * `created_by_user_identifiers` - `modified_by_user_identifiers` - + * `owned_by_user_identifiers` - `exclude_objects` - + * `include_auto_created_objects` - `favorite_object_options` - + * `include_only_published_objects` If you are using other parameters to search + * metadata, set `record_size` to `-1` and `record_offset` to + * `0`. + * + * @throws ApiException if the Api call fails + */ + @Test + public void searchMetadataTest() throws ApiException { + SearchMetadataRequest searchMetadataRequest = null; + List response = api.searchMetadata(searchMetadataRequest); + // TODO: test validations + } + + /** + * Version: 9.0.0.cl or later Gets a list of Orgs configured on the ThoughtSpot system. To get + * details of a specific Org, specify the Org ID or name. You can also pass parameters such as + * status, visibility, and user identifiers to get a specific list of Orgs. Requires cluster + * administration (**Can administer Org**) privileges. If [Role-Based Access Control + * (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the + * `ORG_ADMINISTRATION` (**Can manage Orgs**) privilege is required. + * + * @throws ApiException if the Api call fails + */ + @Test + public void searchOrgsTest() throws ApiException { + SearchOrgsRequest searchOrgsRequest = null; + List response = api.searchOrgs(searchOrgsRequest); + // TODO: test validations + } + + /** + * Version: 9.5.0.cl or later Gets a list of Role objects from the ThoughtSpot system. Available + * if [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is + * enabled on your instance. To search for Roles, the `ROLE_ADMINISTRATION` (**Can + * manage roles**) privilege is required. To get details of a specific Role object, specify the + * GUID or name. You can also filter the API response based on user group and Org identifiers, + * privileges assigned to the Role, and deprecation status. + * + * @throws ApiException if the Api call fails + */ + @Test + public void searchRolesTest() throws ApiException { + SearchRolesRequest searchRolesRequest = null; + List response = api.searchRoles(searchRolesRequest); + // TODO: test validations + } + + /** + * Search Schedules Version: 9.4.0.cl or later Gets a list of scheduled jobs configured for a + * Liveboard. To get details of a specific scheduled job, specify the name or GUID of the + * scheduled job. Requires at least view access to Liveboards. **NOTE**: When filtering + * schedules by parameters other than `metadata`, set `record_size` to + * `-1` and `record_offset` to `0` for accurate results. + * + * @throws ApiException if the Api call fails + */ + @Test + public void searchSchedulesTest() throws ApiException { + SearchSchedulesRequest searchSchedulesRequest = null; + List response = api.searchSchedules(searchSchedulesRequest); + // TODO: test validations + } + + /** + * Version: 26.2.0.cl or later Fetch security settings for your ThoughtSpot application + * instance. - Use `scope: CLUSTER` to retrieve cluster-level security settings, + * including CORS and CSP allowlists, SAML redirect URLs, and settings that control access to + * non-embedded pages. - Use `scope: ORG` to retrieve Org-level security settings. If + * your instance has [Orgs](https://docs.thoughtspot.com/cloud/latest/orgs-overview), this + * returns CORS and non-embed access settings specific to the Org. - If `scope` is not + * specified, returns both cluster and Org-specific settings based on user privileges. Requires + * `ADMINISTRATION` (**Can administer ThoughtSpot**) or `DEVELOPER` (**Has + * developer privilege**) privilege. See [Security + * Settings](https://developers.thoughtspot.com/docs/security-settings) for more details. + * + * @throws ApiException if the Api call fails + */ + @Test + public void searchSecuritySettingsTest() throws ApiException { + SearchSecuritySettingsRequest searchSecuritySettingsRequest = null; + SecuritySettingsResponse response = + api.searchSecuritySettings(searchSecuritySettingsRequest); + // TODO: test validations + } + + /** + * Version: 9.0.0.cl or later Gets a list of tag objects available on the ThoughtSpot system. To + * get details of a specific tag object, specify the GUID or name. Any authenticated user can + * search for tag objects. + * + * @throws ApiException if the Api call fails + */ + @Test + public void searchTagsTest() throws ApiException { + SearchTagsRequest searchTagsRequest = null; + List response = api.searchTags(searchTagsRequest); + // TODO: test validations + } + + /** + * Version: 9.0.0.cl or later Gets a list of user group objects from the ThoughtSpot system. To + * get details of a specific user group, specify the user group GUID or name. You can also + * filter the API response based on User ID, Org ID, Role ID, type of group, sharing visibility, + * privileges assigned to the group, and the Liveboard IDs assigned to the users in the group. + * Available to all users. Users with `ADMINISTRATION` (**Can administer + * ThoughtSpot**) privileges can view all users properties. If [Role-Based Access Control + * (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the + * `GROUP_ADMINISTRATION` (**Can manage groups**) privilege is required. **NOTE**: If + * you do not get precise results, try setting `record_size` to `-1` and + * `record_offset` to `0`. + * + * @throws ApiException if the Api call fails + */ + @Test + public void searchUserGroupsTest() throws ApiException { + SearchUserGroupsRequest searchUserGroupsRequest = null; + List response = api.searchUserGroups(searchUserGroupsRequest); + // TODO: test validations + } + + /** + * Version: 9.0.0.cl or later Gets a list of users available on the ThoughtSpot system. To get + * details of a specific user, specify the user GUID or name. You can also filter the API + * response based on groups, Org ID, user visibility, account status, user type, and user + * preference settings and favorites. Available to all users. Users with + * `ADMINISTRATION` (**Can administer ThoughtSpot**) privileges can view all users + * properties. If [Role-Based Access Control + * (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the + * `USER_ADMINISTRATION` (**Can manage users**) privilege is required. **NOTE**: If + * the API returns an empty list, consider increasing the value of the `record_size` + * parameter. To search across all available users, set `record_size` to + * `-1`. + * + * @throws ApiException if the Api call fails + */ + @Test + public void searchUsersTest() throws ApiException { + SearchUsersRequest searchUsersRequest = null; + List response = api.searchUsers(searchUsersRequest); + // TODO: test validations + } + + /** + * Search variables Version: 26.4.0.cl or later Allows searching for variables in ThoughtSpot. + * Requires ADMINISTRATION role. The CAN_MANAGE_VARIABLES permission allows you to manage + * Formula Variables in the current organization scope. The API endpoint supports searching + * variables by: * Variable identifier (ID or name) * Variable type * Name pattern + * (case-insensitive, supports % for wildcard) The search results can be formatted in three + * ways: * METADATA - Returns only variable metadata (default) * METADATA_AND_VALUES - Returns + * variable metadata and values The values can be filtered by scope: * org_identifier * + * principal_identifier * model_identifier + * + * @throws ApiException if the Api call fails + */ + @Test + public void searchVariablesTest() throws ApiException { + SearchVariablesRequest searchVariablesRequest = null; + List response = api.searchVariables(searchVariablesRequest); + // TODO: test validations + } + + /** + * Version: 10.14.0.cl or later Searches for webhook configurations based on various criteria + * such as Org, webhook identifier, event type, with support for pagination and sorting. Returns + * matching webhook configurations with their complete details. Requires + * `ADMINISTRATION` (**Can administer ThoughtSpot**) or `DEVELOPER` (**Has + * developer privilege**) privilege. If [Role-Based Access Control + * (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, users with + * `CAN_MANAGE_WEBHOOKS` (**Can manage webhooks**) privilege are also authorized to + * perform this action. + * + * @throws ApiException if the Api call fails + */ + @Test + public void searchWebhookConfigurationsTest() throws ApiException { + SearchWebhookConfigurationsRequest searchWebhookConfigurationsRequest = null; + WebhookSearchResponse response = + api.searchWebhookConfigurations(searchWebhookConfigurationsRequest); + // TODO: test validations + } + + /** + * Version: 26.5.0.cl or later Sends natural language messages to an existing Spotter agent + * conversation and returns the complete response synchronously. Requires + * `CAN_USE_SPOTTER` privilege and access to the metadata object associated with the + * conversation. The user must have access to the conversation session referenced by + * `conversation_identifier`. A conversation must first be created using the + * `createAgentConversation` API. #### Usage guidelines The request must include: - + * `conversation_identifier`: the unique session ID returned by + * `createAgentConversation`, used for context continuity and message tracking - + * `messages`: an array of one or more text messages to send to the agent The API + * returns an array of response objects, each containing: - `type`: the kind of + * response — `text`, `answer`, or `error` - `message`: + * the main content of the response - `metadata`: additional information depending on + * the message type (e.g., answer metadata includes analytics and visualization details) #### + * Error responses | Code | Description | + * |------|----------------------------------------------------------------------------------------------------------------------------------| + * | 401 | Unauthorized — authentication token is missing, expired, or invalid. | | 403 | + * Forbidden — the authenticated user does not have `CAN_USE_SPOTTER` privilege or + * lacks permission on the referenced conversation. | > ###### Note: > > - This + * endpoint is Generally Available from version 26.5.0.cl. > - This endpoint requires Spotter + * - please contact ThoughtSpot support to enable Spotter on your cluster. > - For real-time + * streamed responses, use `sendAgentConversationMessageStreaming` instead. + * + * @throws ApiException if the Api call fails + */ + @Test + public void sendAgentConversationMessageTest() throws ApiException { + String conversationIdentifier = null; + SendAgentConversationMessageRequest sendAgentConversationMessageRequest = null; + Object response = + api.sendAgentConversationMessage( + conversationIdentifier, sendAgentConversationMessageRequest); + // TODO: test validations + } + + /** + * Version: 26.5.0.cl or later Sends one or more natural language messages to an existing + * Spotter agent conversation and returns the response as a real-time Server-Sent Events stream. + * Requires `CAN_USE_SPOTTER` privilege and access to the metadata object associated + * with the conversation. The user must have access to the conversation session referenced by + * `conversation_identifier`. A conversation must first be created using the + * `createAgentConversation` API. #### Usage guidelines The request must include: - + * `conversation_identifier`: the unique session ID returned by + * `createAgentConversation`, used for context continuity and message tracking - + * `messages`: an array of one or more text messages to send to the agent If the + * request is valid, the API returns a Server-Sent Events (SSE) stream. Each line has the form + * `data: [{\"type\": \"...\", ...}]` — a JSON array of event + * objects. Event types include: - `ack`: confirms receipt of the request + * (`node_id`) - `conv_title`: conversation title (`title`, + * `conv_id`) - `notification`: status updates on operations + * (`group_id`, `metadata`, `code` — e.g. + * `TOOL_CALL_NOTIFICATION`, `nls_start`, + * `FINAL_RESPONSE_NOTIFICATION`) - `text-chunk`: incremental content chunks + * (`id`, `group_id`, `metadata` with `format` and + * `type` such as `thinking` or `text`, `content`) - + * `text`: full text block with same structure as `text-chunk` - + * `answer`: structured answer with metadata (`id`, `group_id`, + * `metadata` with `sage_query`, `session_id`, `title`, + * etc., `title`) - `error`: if a failure occurs #### Error responses | Code + * | Description | | ---- | + * -------------------------------------------------------------------------------------------------------------------------------- + * | | 401 | Unauthorized — authentication token is missing, expired, or invalid. | | 403 | + * Forbidden — the authenticated user does not have `CAN_USE_SPOTTER` privilege or + * lacks permission on the referenced conversation. | > ###### Note: > > - This + * endpoint is Generally Available from version 26.5.0.cl. > - This endpoint requires Spotter + * - please contact ThoughtSpot support to enable Spotter on your cluster. > - The streaming + * protocol uses Server-Sent Events (SSE). > - For the complete response in a single payload, + * use `sendAgentConversationMessage` instead. + * + * @throws ApiException if the Api call fails + */ + @Test + public void sendAgentConversationMessageStreamingTest() throws ApiException { + String conversationIdentifier = null; + SendAgentConversationMessageStreamingRequest sendAgentConversationMessageStreamingRequest = + null; + SendAgentMessageResponse response = + api.sendAgentConversationMessageStreaming( + conversationIdentifier, sendAgentConversationMessageStreamingRequest); + // TODO: test validations + } + + /** + * Version: 26.2.0.cl or later **Deprecated** — Use `sendAgentConversationMessage` + * instead. Send natural language messages to an existing Spotter agent conversation and returns + * the complete response synchronously. Requires `CAN_USE_SPOTTER` privilege and + * access to the metadata object associated with the conversation. The user must have access to + * the conversation session referenced by `conversation_identifier`. A conversation + * must first be created using the `createAgentConversation` API. #### Usage + * guidelines The request must include: - `conversation_identifier`: the unique + * session ID returned by `createAgentConversation`, used for context continuity and + * message tracking - `messages`: an array of one or more text messages to send to the + * agent The API returns an array of response objects, each containing: - `type`: the + * kind of response — `text`, `answer`, or `error` - + * `message`: the main content of the response - `metadata`: additional + * information depending on the message type (e.g., answer metadata includes analytics and + * visualization details) #### Error responses | Code | Description | + * |------|----------------------------------------------------------------------------------------------------------------------------------| + * | 401 | Unauthorized — authentication token is missing, expired, or invalid. | | 403 | + * Forbidden — the authenticated user does not have `CAN_USE_SPOTTER` privilege or + * lacks permission on the referenced conversation. | > ###### Note: > > - This + * endpoint is deprecated. Use `sendAgentConversationMessage` for new integrations. + * > - This endpoint is currently in Beta. Breaking changes may be introduced before the + * endpoint is made Generally Available. > - This endpoint requires Spotter - please contact + * ThoughtSpot support to enable Spotter on your cluster. + * + * @throws ApiException if the Api call fails + */ + @Test + public void sendAgentMessageTest() throws ApiException { + String conversationIdentifier = null; + SendAgentMessageRequest sendAgentMessageRequest = null; + Object response = api.sendAgentMessage(conversationIdentifier, sendAgentMessageRequest); + // TODO: test validations + } + + /** + * Version: 26.2.0.cl or later **Deprecated** — Use + * `sendAgentConversationMessageStreaming` instead. Sends one or more natural language + * messages to an existing Spotter agent conversation and returns the response as a real-time + * Server-Sent Events stream. Requires `CAN_USE_SPOTTER` privilege and access to the + * metadata object associated with the conversation. The user must have access to the + * conversation session referenced by `conversation_identifier`. A conversation must + * first be created using the `createAgentConversation` API. #### Usage guidelines The + * request must include: - `conversation_identifier`: the unique session ID returned + * by `createAgentConversation`, used for context continuity and message tracking - + * `messages`: an array of one or more text messages to send to the agent If the + * request is valid, the API returns a Server-Sent Events (SSE) stream. Each line has the form + * `data: [{\"type\": \"...\", ...}]` — a JSON array of event + * objects. Event types include: - `ack`: confirms receipt of the request + * (`node_id`) - `conv_title`: conversation title (`title`, + * `conv_id`) - `notification`: status updates on operations + * (`group_id`, `metadata`, `code` — e.g. + * `TOOL_CALL_NOTIFICATION`, `nls_start`, + * `FINAL_RESPONSE_NOTIFICATION`) - `text-chunk`: incremental content chunks + * (`id`, `group_id`, `metadata` with `format` and + * `type` such as `thinking` or `text`, `content`) - + * `text`: full text block with same structure as `text-chunk` - + * `answer`: structured answer with metadata (`id`, `group_id`, + * `metadata` with `sage_query`, `session_id`, `title`, + * etc., `title`) - `error`: if a failure occurs #### Error responses | Code + * | Description | + * |------|----------------------------------------------------------------------------------------------------------------------------------| + * | 401 | Unauthorized — authentication token is missing, expired, or invalid. | | 403 | + * Forbidden — the authenticated user does not have `CAN_USE_SPOTTER` privilege or + * lacks permission on the referenced conversation. | > ###### Note: > > - This + * endpoint is deprecated. Use `sendAgentConversationMessageStreaming` for new + * integrations. > - This endpoint is currently in Beta. Breaking changes may be introduced + * before the endpoint is made Generally Available. > - This endpoint requires Spotter - + * please contact ThoughtSpot support to enable Spotter on your cluster. > - The streaming + * protocol uses Server-Sent Events (SSE). + * + * @throws ApiException if the Api call fails + */ + @Test + public void sendAgentMessageStreamingTest() throws ApiException { + SendAgentMessageStreamingRequest sendAgentMessageStreamingRequest = null; + SendAgentMessageResponse response = + api.sendAgentMessageStreaming(sendAgentMessageStreamingRequest); + // TODO: test validations + } + + /** + * Version: 10.4.0.cl or later Sends a follow-up message to an existing conversation within the + * context of a data model. Requires `CAN_USE_SPOTTER` privilege and at least view + * access to the metadata object specified in the request. A conversation must first be created + * using the `createConversation` API. #### Usage guidelines The request must include: + * - `conversation_identifier`: the unique session ID returned by + * `createConversation` - `metadata_identifier`: the unique ID of the data + * source used for the conversation - `message`: a natural language string with the + * follow-up question If the request is successful, the API returns an array of response + * messages, each containing: - `session_identifier`: the unique ID of the generated + * response - `generation_number`: the generation number of the response - + * `message_type`: the type of the response (e.g., `TSAnswer`) - + * `visualization_type`: the generated visualization type (`Chart`, + * `Table`, or `Undefined`) - `tokens` / + * `display_tokens`: the search tokens and user-friendly display tokens for the + * response #### Error responses | Code | Description | + * |------|-----------------------------------------------------------------------------------------------------------------------------------------| + * | 401 | Unauthorized — authentication token is missing, expired, or invalid. | | 403 | + * Forbidden — the authenticated user does not have `CAN_USE_SPOTTER` privilege or + * lacks view permission on the specified metadata object. | > ###### Note: > * This + * endpoint is currently in Beta. Breaking changes may be introduced before the endpoint is made + * Generally Available. > * This endpoint requires Spotter - please contact ThoughtSpot + * support to enable Spotter on your cluster. + * + * @throws ApiException if the Api call fails + */ + @Test + public void sendMessageTest() throws ApiException { + String conversationIdentifier = null; + SendMessageRequest sendMessageRequest = null; + List response = + api.sendMessage(conversationIdentifier, sendMessageRequest); + // TODO: test validations + } + + /** + * Version: 10.15.0.cl or later This API allows users to set natural language (NL) instructions + * for a specific data-model to improve AI-generated answers and query processing. These + * instructions help guide the AI system to better understand the data context and provide more + * accurate responses. Requires `CAN_USE_SPOTTER` privilege, either edit access or + * `SPOTTER_COACHING_PRIVILEGE` on the data model, and a bearer token corresponding to + * the org where the data model exists. #### Usage guidelines To set NL instructions for a + * data-model, the request must include: - `data_source_identifier`: The unique ID of + * the data-model for which to set NL instructions - `nl_instructions_info`: An array + * of instruction objects, each containing: - `instructions`: Array of text + * instructions for the LLM - `scope`: The scope of the instruction + * (`GLOBAL`). Currently only `GLOBAL` is supported. It can be extended to + * data-model-user scope in future. #### Instructions scope - **GLOBAL**: instructions that + * apply to all users querying this data model If the request is successful, the API returns: - + * `success`: a boolean indicating whether the operation completed successfully #### + * Error responses | Code | Description | + * |------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| + * | 401 | Unauthorized — authentication token is missing, expired, or invalid. | | 403 | + * Forbidden — the authenticated user does not have `CAN_USE_SPOTTER` privilege, lacks + * edit access or `SPOTTER_COACHING_PRIVILEGE` on the data model, or the bearer token + * does not correspond to the org where the data model exists. | > ###### Note: > > - + * To use this API, the user needs either edit access or `SPOTTER_COACHING_PRIVILEGE` + * on the data model, and must use the bearer token corresponding to the org where the data + * model exists. > - This endpoint is currently in Beta. Breaking changes may be introduced + * before the endpoint is made Generally Available. > - Available from version 10.15.0.cl and + * later. > - This endpoint requires Spotter — please contact ThoughtSpot Support to enable + * Spotter on your cluster. > - Instructions help improve the accuracy and relevance of + * AI-generated responses for the specified data-model. + * + * @throws ApiException if the Api call fails + */ + @Test + public void setNLInstructionsTest() throws ApiException { + SetNLInstructionsRequest setNLInstructionsRequest = null; + EurekaSetNLInstructionsResponse response = api.setNLInstructions(setNLInstructionsRequest); + // TODO: test validations + } + + /** + * Version: 9.0.0.cl or later Allows sharing one or several metadata objects with users and + * groups in ThoughtSpot. Requires edit access to the metadata object. #### Supported metadata + * objects: * Liveboards * Visualizations * Answers * Models * Views * Connections * Collections + * #### Object permissions You can provide `READ_ONLY` or `MODIFY` access + * when sharing an object with another user or group. The `READ_ONLY` permission + * grants view access to the shared object, whereas `MODIFY` provides edit access. To + * prevent a user or group from accessing the shared object, specify the GUID or name of the + * principal and set `shareMode` to `NO_ACCESS`. #### Sharing a + * visualization * Sharing a visualization implicitly shares the entire Liveboard with the + * recipient. * Object permissions set for a shared visualization also apply to the Liveboard + * unless overridden by another API request or via UI. * If email notifications for object + * sharing are enabled, a notification with a link to the shared visualization will be sent to + * the recipient’s email address. Although this link opens the shared visualization, recipients + * can also access other visualizations in the Liveboard. #### Sharing a collection Collections + * support **dual permissions** that provide fine-grained control: * **Collection permissions** + * (`share_mode`) - controls access to the collection itself (view, edit, delete the + * collection) * **Content permissions** (`content_share_mode`) - controls access to + * objects within the collection (view, edit objects inside) **Default Behavior:** - If only + * `share_mode` is specified, the content permissions default to `READ_ONLY` + * (except when `share_mode` is `NO_ACCESS`, then content also gets + * `NO_ACCESS`) - To give users edit access to collection contents, explicitly set + * `content_share_mode: \"MODIFY\"` ## Examples The following JSON examples + * can be copy-pasted as request bodies for the REST v2 API endpoint: ```bash + * POST /callosum/v1/v2/security/metadata/share Content-Type: application/x-www-form-urlencoded + * ``` ### Basic collection sharing Share a collection with read-only access: + * ```json { \"metadata_type\": \"COLLECTION\", + * \"metadata_identifiers\": [\"Sales Reports Collection\"], + * \"permissions\": [{ \"principal\": { \"type\": + * \"USER\", \"identifier\": \"alice@company.com\" }, + * \"share_mode\": \"READ_ONLY\" }], \"notification\": { + * \"message\": \"I've shared the Sales Reports collection with you\", + * \"notify_on_share\": true } } ``` ### Collection sharing with dual + * permissions Share a collection with different permissions for the collection vs. its + * contents: ```json { \"metadata_type\": \"COLLECTION\", + * \"metadata_identifiers\": [\"Marketing Analytics\"], + * \"permissions\": [{ \"principal\": { \"type\": + * \"USER\", \"identifier\": \"bob@company.com\" }, + * \"share_mode\": \"MODIFY\", \"content_share_mode\": + * \"READ_ONLY\" }, { \"principal\": { \"type\": + * \"USER_GROUP\", \"identifier\": \"Marketing Team\" }, + * \"share_mode\": \"READ_ONLY\", \"content_share_mode\": + * \"READ_ONLY\" }], \"notification\": { \"emails\": + * [\"bob@company.com\"], \"message\": \"You can edit the collection + * but content is read-only\", \"enable_custom_url\": false, + * \"notify_on_share\": true }, \"has_lenient_discoverability\": false } + * ``` ### Multiple collections sharing Share multiple collections with different + * users: ```json { \"metadata\": [ { \"type\": + * \"COLLECTION\", \"identifier\": \"Q4 Reports\" }, { + * \"type\": \"COLLECTION\", \"identifier\": \"Executive + * Dashboard Collection\" } ], \"permissions\": [{ \"principal\": { + * \"type\": \"USER_GROUP\", \"identifier\": + * \"Executives\" }, \"share_mode\": \"MODIFY\" }, { + * \"principal\": { \"type\": \"USER\", \"identifier\": + * \"manager@company.com\" }, \"share_mode\": \"READ_ONLY\", + * \"content_share_mode\": \"MODIFY\" }], \"notification\": { + * \"message\": \"Sharing quarterly collections with leadership team\", + * \"notify_on_share\": true } } ``` ### Remove collection access + * Remove access to a collection by setting share_mode to NO_ACCESS: ```json { + * \"metadata_type\": \"COLLECTION\", \"metadata_identifiers\": + * [\"Confidential Reports\"], \"permissions\": [{ \"principal\": + * { \"type\": \"USER\", \"identifier\": + * \"former-employee@company.com\" }, \"share_mode\": + * \"NO_ACCESS\" }], \"notification\": { \"notify_on_share\": + * false } } ``` ### Collection Permission Scenarios **Scenario 1: Collection + * Admin** - `share_mode: MODIFY` + `content_share_mode: MODIFY` = Full + * control over collection and its contents **Scenario 2: Collection Curator** - + * `share_mode: MODIFY` + `content_share_mode: READ_ONLY` = Can manage + * collection structure but not edit contents **Scenario 3: Content Editor** - `share_mode: + * READ_ONLY` + `content_share_mode: MODIFY` = Can edit objects within + * collection but can't change collection itself **Scenario 4: Viewer** - `share_mode: + * READ_ONLY` + `content_share_mode: READ_ONLY` = View-only access to + * collection and contents + * + * @throws ApiException if the Api call fails + */ + @Test + public void shareMetadataTest() throws ApiException { + ShareMetadataRequest shareMetadataRequest = null; + api.shareMetadata(shareMetadataRequest); + // TODO: test validations + } + + /** + * Version: 10.4.0.cl or later Processes a natural language query against a specified data model + * and returns a single AI-generated answer without requiring a conversation session. Requires + * `CAN_USE_SPOTTER` privilege and at least view access to the metadata object + * specified in the request. #### Usage guidelines The request must include: - + * `query`: a natural language question (e.g., \"What were total sales last + * quarter?\") - `metadata_identifier`: the unique ID of the data source to query + * against If the request is successful, the API returns a response message containing: - + * `session_identifier`: the unique ID of the generated response - + * `generation_number`: the generation number of the response - + * `message_type`: the type of the response (e.g., `TSAnswer`) - + * `visualization_type`: the generated visualization type (`Chart`, + * `Table`, or `Undefined`) - `tokens` / + * `display_tokens`: the search tokens and user-friendly display tokens for the + * response #### Error responses | Code | Description | + * |------|-----------------------------------------------------------------------------------------------------------------------------------------| + * | 401 | Unauthorized — authentication token is missing, expired, or invalid. | | 403 | + * Forbidden — the authenticated user does not have `CAN_USE_SPOTTER` privilege or + * lacks view permission on the specified metadata object. | > ###### Note: > * This + * endpoint is currently in Beta. Breaking changes may be introduced before the endpoint is made + * Generally Available. > * This endpoint requires Spotter - please contact ThoughtSpot + * support to enable Spotter on your cluster. + * + * @throws ApiException if the Api call fails + */ + @Test + public void singleAnswerTest() throws ApiException { + SingleAnswerRequest singleAnswerRequest = null; + ResponseMessage response = api.singleAnswer(singleAnswerRequest); + // TODO: test validations + } + + /** + * Stops an in-progress agent conversation response. Version: 26.6.0.cl or later + * <span>Version: 26.6.0.cl or later Stops an in-progress agent response for the specified + * conversation. Use this endpoint to cancel a response that is actively being generated — for + * example, when the user navigates away, reformulates their question, or no longer needs the + * current result. Requires `CAN_USE_SPOTTER` privilege and access to the specified + * conversation. #### Usage guidelines The request must include: - + * `conversation_identifier` *(path parameter)*: the unique ID of the conversation + * whose active response should be stopped, as returned by `createAgentConversation` A + * successful request returns an empty `204 No Content` response. If there is no + * active response in progress at the time of the call, the request is still treated as + * successful. After stopping a response, the conversation session remains active. You can + * continue sending messages using `sendAgentConversationMessage` or + * `sendAgentConversationMessageStreaming`. #### Example request + * ```bash POST + * /api/rest/2.0/ai/agent/conversation/{conversation_identifier}/stop-response + * ``` #### Typical usage scenario This endpoint is useful when integrating + * Spotter into a chat UI where users can cancel a long-running query. For example: 1. User + * sends a message via `sendAgentConversationMessageStreaming`. 2. User clicks a + * \"Stop generating\" button while the response is streaming. 3. Your client calls + * `stopConversation` with the active `conversation_identifier`. 4. The + * stream is terminated and the user can ask a new question. #### Error responses | Code | + * Description | |------|-------------| | 401 | Unauthorized — authentication token is missing, + * expired, or invalid. | | 403 | Forbidden — the authenticated user does not have + * `CAN_USE_SPOTTER` privilege or lacks access to the specified conversation. | > + * ###### Note: > > - Calling this endpoint when no response is in progress does not + * return an error. > - The conversation context is preserved after stopping — previous + * messages and answers remain accessible. > - Available from version 26.6.0.cl and later. + * > - This endpoint requires Spotter — please contact ThoughtSpot Support to enable Spotter + * on your cluster. > - This feature is available only for **Spotter 3** + * (`SPOTTER3`) version. + * + * @throws ApiException if the Api call fails + */ + @Test + public void stopConversationTest() throws ApiException { + String conversationIdentifier = null; + api.stopConversation(conversationIdentifier); + // TODO: test validations + } + + /** + * Version: 26.5.0.cl or later Synchronizes connection metadata attributes from your Cloud Data + * Warehouse (CDW) with ThoughtSpot. Requires the `DATAMANAGEMENT` (**Can manage + * data**) privilege. If [Role-Based Access Control + * (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the + * `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` (**Can manage data models**) privilege is + * required. #### Usage guidelines To synchronize attributes from a CDW, specify the connection + * GUID or name in the `connection_identifier` path parameter and + * `sync_attributes` in the request body. Default attribute is + * `[\"DESCRIPTION\"]`. ##### Hierarchical schema * Connection: The + * connection object for the sync operation. * Tables: Tables for the sync operation. When no + * table is specified, all tables are synchronized. * Columns: If the table is specified, you + * can add the columns for the sync operation. If no columns are specified, all columns in the + * specified table are considered for the sync operation. To set the scope for the sync + * operation: * Connection-level: To sync all tables and columns, pass an empty request body, or + * only the attributes in the request body. * Table-level: To synchronize specific tables and + * their columns, specify the table identifiers in the `tables` array. * Column-level: + * To synchronize specific columns, specify the table identifier as the key and column + * identifiers as the value in the `tables` array. ``` { + * \"tables\": [ {\"table-guid-1\": [\"column-guid-1\", + * \"column-guid-2\"]}, \"table-guid-2\" ], \"sync_attributes\": + * [\"DESCRIPTION\"] } ``` ##### API response If the sync operation is + * successful, the API returns the following information: * Status of the sync operation. For + * example, `SUCCESS`, `PARTIAL_SUCCESS`, or `NO_UPDATE`. * Number + * of tables and columns that were updated. * Number of tables and columns with the sync failed + * status when the overall sync status is `PARTIAL_SUCCESS`. * Message text indicating + * the sync results. + * + * @throws ApiException if the Api call fails + */ + @Test + public void syncMetadataTest() throws ApiException { + String connectionIdentifier = null; + SyncMetadataRequest syncMetadataRequest = null; + SyncMetadataResponse response = api.syncMetadata(connectionIdentifier, syncMetadataRequest); + // TODO: test validations + } + + /** + * Version: 9.0.0.cl or later Removes the tags applied to a Liveboard, Answer, Table, or + * Worksheet. Requires edit access to the metadata object. + * + * @throws ApiException if the Api call fails + */ + @Test + public void unassignTagTest() throws ApiException { + UnassignTagRequest unassignTagRequest = null; + api.unassignTag(unassignTagRequest); + // TODO: test validations + } + + /** + * Remove parameterization from fields in metadata objects. Version: 26.5.0.cl or later Allows + * removing parameterization from fields in metadata objects in ThoughtSpot. Requires + * appropriate permissions to modify the metadata object. The API endpoint allows + * unparameterizing the following types of metadata objects: * Logical Tables * Connections * + * Connection Configs For a Logical Table the field type must be `ATTRIBUTE` and field + * name can be one of: * databaseName * schemaName * tableName For a Connection or Connection + * Config, the field type is always `CONNECTION_PROPERTY`. In this case, field_name + * specifies the exact property of the Connection or Connection Config that needs to be + * unparameterized. For Connection Config, the only supported field name is: * impersonate_user + * + * @throws ApiException if the Api call fails + */ + @Test + public void unparameterizeMetadataTest() throws ApiException { + UnparameterizeMetadataRequest unparameterizeMetadataRequest = null; + api.unparameterizeMetadata(unparameterizeMetadataRequest); + // TODO: test validations + } + + /** + * Version: 26.5.0.cl or later Allows unpublishing metadata objects from organizations in + * ThoughtSpot. Requires ADMINISTRATION role and TENANT scope. The API endpoint allows + * unpublishing the following types of metadata objects: * Liveboards * Answers * Logical Tables + * When unpublishing objects, you can: * Include dependencies by setting + * `include_dependencies` to true - this will unpublish all dependent objects if no + * other published object is using them * Force unpublish by setting `force` to true - + * this will break all dependent objects in the unpublished organizations + * + * @throws ApiException if the Api call fails + */ + @Test + public void unpublishMetadataTest() throws ApiException { + UnpublishMetadataRequest unpublishMetadataRequest = null; + api.unpublishMetadata(unpublishMetadataRequest); + // TODO: test validations + } + + /** + * Version: 10.12.0.cl or later Updates the properties of a [custom + * calendar](https://docs.thoughtspot.com/cloud/latest/connections-cust-cal). Requires + * `DATAMANAGEMENT` (**Can manage data**) or `ADMINISTRATION` (**Can + * administer ThoughtSpot**) privilege. If [Role-Based Access Control + * (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your ThoughtSpot + * instance, the `CAN_MANAGE_CUSTOM_CALENDAR` (**Can manage custom calendars**) + * privilege is required. #### Usage guidelines You can update the properties of a calendar + * using one of the following methods: * `FROM_INPUT_PARAMS` to update the calendar + * properties with the values defined in the API request. * `FROM_EXISTING_TABLE` + * Creates a calendar from the parameters defined in the API request. To update a custom + * calendar, specify the calendar ID as a path parameter in the request URL and the following + * parameters in the request body: * Connection ID and Table name * Database and schema name + * attributes: For most Cloud Data Warehouse (CDW) connectors, both `database_name` + * and `schema_name` attributes are required. However, the attribute requirements are + * conditional and vary based on the connector type and its metadata structure. For example, for + * connectors such as Teradata, MySQL, SingleSore, Amazon Aurora MySQL, Amazon RDS MySQL, + * Oracle, and GCP_MYSQL, the `schema_name` is required, whereas the + * `database_name` attribute is not. Similarly, connectors such as ClickHouse require + * you to specify the `database_name` and the schema specification in such cases is + * optional. The API allows you to modify the calendar type, month offset value, start and end + * date, starting day of the week, and prefixes assigned to the year and quarter labels. #### + * Examples Update a custom calendar using an existing Table in ThoughtSpot: ``` + * { \"update_method\": \"FROM_EXISTING_TABLE\", + * \"table_reference\": { \"connection_identifier\": + * \"Connection1\", \"database_name\": \"db1\", + * \"table_name\": \"custom_calendar_2025\", \"schame_name\": + * \"schemaVar\" } } ``` Update a custom calendar with the attributes + * defined in the API request: ``` { \"update_method\": + * \"FROM_INPUT_PARAMS\", \"table_reference\": { + * \"connection_identifier\": \"Connection1\", \"database_name\": + * \"db1\", \"table_name\": \"custom_calendar_2025\", + * \"schame_name\": \"schemaVar\" }, \"month_offset\": + * \"August\", \"start_day_of_week\": \"Monday\", + * \"start_date\": \"08/01/2025\", \"end_date\": + * \"07/31/2026\" } ``` + * + * @throws ApiException if the Api call fails + */ + @Test + public void updateCalendarTest() throws ApiException { + String calendarIdentifier = null; + UpdateCalendarRequest updateCalendarRequest = null; + api.updateCalendar(calendarIdentifier, updateCalendarRequest); + // TODO: test validations + } + + /** + * Version: 26.4.0.cl or later Updates an existing collection in ThoughtSpot. #### Supported + * operations This API endpoint lets you perform the following operations: * Update collection + * name and description * Change visibility settings * Add metadata objects to the collection + * (operation: ADD) * Remove metadata objects from the collection (operation: REMOVE) * Replace + * all metadata objects in the collection (operation: REPLACE) #### Operation types * **ADD**: + * Adds the specified metadata objects to the existing collection without removing current items + * * **REMOVE**: Removes only the specified metadata objects from the collection * **REPLACE**: + * Replaces all existing metadata objects with the specified items (default behavior) + * + * @throws ApiException if the Api call fails + */ + @Test + public void updateCollectionTest() throws ApiException { + String collectionIdentifier = null; + UpdateCollectionRequest updateCollectionRequest = null; + api.updateCollection(collectionIdentifier, updateCollectionRequest); + // TODO: test validations + } + + /** + * Version: 10.12.0.cl or later Creates, updates, or deletes column security rules for specified + * tables. This API endpoint allows you to create, update, or delete column-level security rules + * on columns of a table. The operation follows an \"all or none\" policy: if defining + * security rules for any of the provided columns fails, the entire operation will be rolled + * back, and no rules will be created. #### Usage guidelines - Provide table identifier using + * either `identifier` (GUID or name) or `obj_identifier` (object ID) - Use + * `clear_csr: true` to remove all column security rules from the table - For each + * column, specify the security rule using `column_security_rules` array - Use + * `is_unsecured: true` to mark a specific column as unprotected - Use + * `group_access` operations to manage group associations: - `ADD`: Add + * groups to the column's access list - `REMOVE`: Remove groups from the + * column's access list - `REPLACE`: Replace all existing groups with the + * specified groups #### Required permissions - `ADMINISTRATION` - Can administer + * ThoughtSpot - `DATAMANAGEMENT` - Can manage data (if RBAC is disabled) - + * `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` - Can manage worksheet views and tables (if + * RBAC is enabled) #### Example request ```json { \"identifier\": + * \"table-guid\", \"obj_identifier\": \"table-object-id\", + * \"clear_csr\": false, \"column_security_rules\": [ { + * \"column_identifier\": \"col id or col name\", + * \"is_unsecured\": false, \"group_access\": [ { \"operation\": + * \"ADD\", \"group_identifiers\": [\"hr_group_id\", + * \"hr_group_name\", \"finance_group_id\"] } ] }, { + * \"column_identifier\": \"col id or col name\", + * \"is_unsecured\": true }, { \"column_identifier\": \"col id or col + * name\", \"is_unsecured\": false, \"group_access\": [ { + * \"operation\": \"REPLACE\", \"group_identifiers\": + * [\"management_group_id\", \"management_group_name\"] } ] } ] } + * ``` #### Request Body Schema - `identifier` (string, optional): GUID + * or name of the table for which we want to create column security rules - + * `obj_identifier` (string, optional): The object ID of the table - + * `clear_csr` (boolean, optional): If true, then all the secured columns will be + * marked as unprotected, and all the group associations will be removed - + * `column_security_rules` (array of objects, required): An array where each object + * defines the security rule for a specific column Each column security rule object contains: - + * `column_identifier` (string, required): Column identifier (col_id or name) - + * `is_unsecured` (boolean, optional): If true, the column will be marked as + * unprotected and all groups associated with it will be removed - `group_access` + * (array of objects, optional): Array of group operation objects Each group operation object + * contains: - `operation` (string, required): Operation type - ADD, REMOVE, or + * REPLACE - `group_identifiers` (array of strings, required): Array of group + * identifiers (name or GUID) on which the operation will be performed #### Response This API + * does not return any response body. A successful operation returns HTTP 200 status code. #### + * Operation Types - **ADD**: Adds the specified groups to the column's access list - + * **REMOVE**: Removes the specified groups from the column's access list - **REPLACE**: + * Replaces all existing groups with the specified groups + * + * @throws ApiException if the Api call fails + */ + @Test + public void updateColumnSecurityRulesTest() throws ApiException { + UpdateColumnSecurityRulesRequest updateColumnSecurityRulesRequest = null; + api.updateColumnSecurityRules(updateColumnSecurityRulesRequest); + // TODO: test validations + } + + /** + * Version: 9.2.0.cl or later Updates Git repository configuration settings. Requires + * `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access + * Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance on + * your instance, the `CAN_SETUP_VERSION_CONTROL` (**Can set up version control**) + * privilege. + * + * @throws ApiException if the Api call fails + */ + @Test + public void updateConfigTest() throws ApiException { + UpdateConfigRequest updateConfigRequest = null; + RepoConfigObject response = api.updateConfig(updateConfigRequest); + // TODO: test validations + } + + /** + * Version: 9.2.0.cl or later **Important**: This endpoint is deprecated and will be removed + * from ThoughtSpot in September 2025. ThoughtSpot strongly recommends using the [Update + * connection V2](#/http/api-endpoints/connections/update-connection-v2) endpoint to update your + * connection objects. #### Usage guidelines Updates a connection object. Requires + * `DATAMANAGEMENT` (**Can manage data**) and edit permissions to the connection + * object, or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If + * [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled + * on your instance, the `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit + * Connections**) privilege is required. To update a connection object, pass these parameters in + * your API request: 1. GUID of the connection object. 2. If you are updating tables or database + * schema of a connection object: a. Add the updated JSON map of metadata with database, schema, + * and tables in `data_warehouse_config`. b. Set `validate` to + * `true`. 3. If you are updating a configuration attribute, connection name, or + * description, you can set `validate` to `false`. + * + * @throws ApiException if the Api call fails + */ + @Test + public void updateConnectionTest() throws ApiException { + UpdateConnectionRequest updateConnectionRequest = null; + api.updateConnection(updateConnectionRequest); + // TODO: test validations + } + + /** + * Version: 10.12.0.cl or later Updates a connection configuration object. Requires + * `DATAMANAGEMENT` (**Can manage data**) and edit permissions to the connection + * object, or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If + * [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled + * on your instance, the `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit + * Connections**) privilege is required. #### Supported operations This API endpoint lets you + * perform the following operations in a single API request: * Edit the name or description of + * the configuration * Edit the configuration properties * Edit the `policy_type` * + * Edit the type of authentication * Enable or disable a configuration #### Parameterized + * Connection Support For parameterized oauth based connections, only the + * `same_as_parent` and `policy_process_options` attributes are allowed. + * These attributes are not applicable to connections that are not parameterized. **NOTE**: When + * updating a configuration where `disabled` is `true`, you must reset + * `disabled` to `true` in your update request payload. If not explicitly + * set again, the API will default `disabled` to `false`. + * + * @throws ApiException if the Api call fails + */ + @Test + public void updateConnectionConfigurationTest() throws ApiException { + String configurationIdentifier = null; + UpdateConnectionConfigurationRequest updateConnectionConfigurationRequest = null; + api.updateConnectionConfiguration( + configurationIdentifier, updateConnectionConfigurationRequest); + // TODO: test validations + } + + /** + * Version: 26.6.0.cl or later Activates or deactivates a connection. A deactivated connection + * cannot be used for queries or operations until it is activated again. Requires + * `DATAMANAGEMENT` (**Can manage data**) privilege. If [Role-Based Access Control + * (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the + * `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) privilege is + * required. Only the connection owner or an administrator can perform this operation. #### + * Usage guidelines To update the status of a connection, specify the connection GUID or name in + * the `connection_identifier` path parameter and the desired `status` in + * the request body. - **ACTIVATED**: Enables the connection. Queries and operations can resume + * on an activated connection. - **DEACTIVATED**: Disables the connection. It does not remove + * the connection metadata, but only makes the connection unavailable for queries and + * operations. You can reactivate a deactivated connection by setting \"status\": + * \"ACTIVATED\". + * + * @throws ApiException if the Api call fails + */ + @Test + public void updateConnectionStatusTest() throws ApiException { + String connectionIdentifier = null; + UpdateConnectionStatusRequest updateConnectionStatusRequest = null; + api.updateConnectionStatus(connectionIdentifier, updateConnectionStatusRequest); + // TODO: test validations + } + + /** + * Version: 10.4.0.cl or later Updates a connection object. Requires `DATAMANAGEMENT` + * (**Can manage data**) and edit permissions to the connection object, or + * `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access + * Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, + * the `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) privilege is + * required. To update a connection object, pass these parameters in your API request: 1. GUID + * of the connection object. 2. If you are updating tables or database schema of a connection + * object: a. Add the updated JSON map of metadata with database, schema, and tables in + * `data_warehouse_config`. b. Set `validate` to `true`. **NOTE:** + * If the `authentication_type` is anything other than SERVICE_ACCOUNT, you must + * explicitly provide the authenticationType property in the payload. If you do not specify + * authenticationType, the API will default to SERVICE_ACCOUNT as the authentication type. * A + * JSON map of configuration attributes, database details, and table properties in + * `data_warehouse_config` as shown in the following example: * This is an example of + * updating a single table in a empty connection: ``` { + * \"authenticationType\": \"SERVICE_ACCOUNT\", + * \"externalDatabases\": [ { \"name\": \"DEVELOPMENT\", + * \"isAutoCreated\": false, \"schemas\": [ { \"name\": + * \"TS_dataset\", \"tables\": [ { \"name\": + * \"DEMORENAME\", \"type\": \"TABLE\", \"description\": + * \"\", \"selected\": true, \"linked\": true, \"gid\": + * 0, \"datasetId\": \"-1\", \"subType\": \"\", + * \"reportId\": \"\", \"viewId\": \"\", + * \"columns\": [ { \"name\": \"Col1\", \"type\": + * \"VARCHAR\", \"canImport\": true, \"selected\": true, + * \"description\": \"\", \"isLinkedActive\": true, + * \"isAggregate\": false }, { \"name\": \"Col2\", + * \"type\": \"VARCHAR\", \"canImport\": true, + * \"selected\": true, \"description\": \"\", + * \"isLinkedActive\": true, \"isAggregate\": false }, { \"name\": + * \"Col3\", \"type\": \"VARCHAR\", \"canImport\": true, + * \"selected\": true, \"description\": \"\", + * \"isLinkedActive\": true, \"isAggregate\": false }, { \"name\": + * \"Col312\", \"type\": \"VARCHAR\", \"canImport\": + * true, \"selected\": true, \"description\": \"\", + * \"isLinkedActive\": true, \"isAggregate\": false }, { \"name\": + * \"Col4\", \"type\": \"VARCHAR\", \"canImport\": true, + * \"selected\": true, \"description\": \"\", + * \"isLinkedActive\": true, \"isAggregate\": false } ], + * \"relationships\": [] } ] } ] } ], \"configuration\": { + * \"password\": \"\", \"database\": \"DEVELOPMENT\", + * \"role\": \"DEV\", \"accountName\": + * \"thoughtspot_partner\", \"warehouse\": \"DEMO_WH\", + * \"user\": \"DEV_USER\" } } ``` * This is an example of + * updating a single table in an existing connection with tables: ``` { + * \"authenticationType\": \"SERVICE_ACCOUNT\", + * \"externalDatabases\": [ { \"name\": \"DEVELOPMENT\", + * \"isAutoCreated\": false, \"schemas\": [ { \"name\": + * \"TS_dataset\", \"tables\": [ { \"name\": + * \"CUSTOMER\", \"type\": \"TABLE\", \"description\": + * \"\", \"selected\": true, \"linked\": true, \"gid\": + * 0, \"datasetId\": \"-1\", \"subType\": \"\", + * \"reportId\": \"\", \"viewId\": \"\", + * \"columns\": [], \"relationships\": [] }, { \"name\": + * \"tpch5k_falcon_default_schema_users\", \"type\": \"TABLE\", + * \"description\": \"\", \"selected\": true, + * \"linked\": true, \"gid\": 0, \"datasetId\": \"-1\", + * \"subType\": \"\", \"reportId\": \"\", + * \"viewId\": \"\", \"columns\": [ { \"name\": + * \"user_id\", \"type\": \"INT64\", \"canImport\": + * true, \"selected\": true, \"description\": \"\", + * \"isLinkedActive\": true, \"isAggregate\": false }, { \"name\": + * \"product_id\", \"type\": \"INT64\", \"canImport\": + * true, \"selected\": true, \"description\": \"\", + * \"isLinkedActive\": true, \"isAggregate\": false }, { \"name\": + * \"user_cost\", \"type\": \"INT64\", \"canImport\": + * true, \"selected\": true, \"description\": \"\", + * \"isLinkedActive\": true, \"isAggregate\": false } ], + * \"relationships\": [] } ] } ] } ], \"configuration\": { + * \"password\": \"\", \"database\": \"DEVELOPMENT\", + * \"role\": \"DEV\", \"accountName\": + * \"thoughtspot_partner\", \"warehouse\": \"DEMO_WH\", + * \"user\": \"DEV_USER\" } } ``` 3. If you are updating a + * configuration attribute, connection name, or description, you can set `validate` to + * `false`. **NOTE:** If the `authentication_type` is anything other than + * SERVICE_ACCOUNT, you must explicitly provide the authenticationType property in the payload. + * If you do not specify authenticationType, the API will default to SERVICE_ACCOUNT as the + * authentication type. * A JSON map of configuration attributes in + * `data_warehouse_config`. The following example shows the configuration attributes + * for a Snowflake connection: ``` { \"configuration\":{ + * \"accountName\":\"thoughtspot_partner\", + * \"user\":\"tsadmin\", \"password\":\"TestConn123\", + * \"role\":\"sysadmin\", \"warehouse\":\"MEDIUM_WH\" }, + * \"externalDatabases\":[ ] } ``` + * + * @throws ApiException if the Api call fails + */ + @Test + public void updateConnectionV2Test() throws ApiException { + String connectionIdentifier = null; + UpdateConnectionV2Request updateConnectionV2Request = null; + api.updateConnectionV2(connectionIdentifier, updateConnectionV2Request); + // TODO: test validations + } + + /** + * Version: 9.6.0.cl or later Updates a custom action. Requires `DEVELOPER` (**Has + * Developer privilege**) or `ADMINISTRATION` (**Can administer ThoughtSpot**) + * privilege. If [Role-Based Access Control + * (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the + * `DEVELOPER` (**Has developer privilege**) privilege is required. #### Usage + * Guidelines The API allows you to modify the following properties: * Name of the custom action + * * Action availability to groups * Association to metadata objects * Authentication settings + * for a URL-based action For more information, see [Custom + * actions](https://developers.thoughtspot.com/docs/custom-action-intro). + * + * @throws ApiException if the Api call fails + */ + @Test + public void updateCustomActionTest() throws ApiException { + String customActionIdentifier = null; + UpdateCustomActionRequest updateCustomActionRequest = null; + api.updateCustomAction(customActionIdentifier, updateCustomActionRequest); + // TODO: test validations + } + + /** + * Version: 9.9.0.cl or later Updates a DBT connection object. Requires + * `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege or + * `DATAMANAGEMENT` (**Can manage data ThoughtSpot**) privilege, along with an + * existing DBT connection. If [Role-Based Access Control + * (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the + * following data control privileges may be required: - + * `CAN_MANAGE_CUSTOM_CALENDAR`(**Can manage custom calendars**) - + * `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) - + * `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` (**Can manage data models**) #### About update + * DBT connection You can modify DBT connection object properties such as embrace connection + * name, embrace database name, import type, account identifier, access token, project + * identifier and environment (or) embrace connection, embrace database name, import type, + * file_content settings. + * + * @throws ApiException if the Api call fails + */ + @Test + public void updateDbtConnectionTest() throws ApiException { + String dbtConnectionIdentifier = null; + String connectionName = null; + String databaseName = null; + String importType = null; + String accessToken = null; + String dbtUrl = null; + String accountId = null; + String projectId = null; + String dbtEnvId = null; + String projectName = null; + File fileContent = null; + Object response = + api.updateDbtConnection( + dbtConnectionIdentifier, + connectionName, + databaseName, + importType, + accessToken, + dbtUrl, + accountId, + projectId, + dbtEnvId, + projectName, + fileContent); + // TODO: test validations + } + + /** + * Version: 10.12.0.cl or later Updates a customization configuration for the notification + * email. #### Pre-requisites Requires `DEVELOPER` (**has developer privilege**) or + * `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access + * Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, + * the `DEVELOPER` (**Has developer privilege**) privilege is required. **NOTE**:This + * endpoint in currently in beta. Contact ThoughtSpot support to enable this on your instance. + * #### Usage guidelines To update a custom configuration pass these parameters in your API + * request: - A JSON map of configuration attributes `template_properties`. The + * following example shows a sample set of customization configuration: ``` { { + * \"cta_button_bg_color\": \"#444DEA\", \"cta_text_font_color\": + * \"#FFFFFF\", \"primary_bg_color\": \"#D3DEF0\", + * \"logo_url\": + * \"https://storage.pardot.com/710713/1642089901EbkRibJq/TS_fullworkmark_darkmode.png\", + * \"font_family\": \"\", \"product_name\": + * \"ThoughtSpot\", \"footer_address\": \"444 Castro St, Suite 1000 + * Mountain View, CA 94041\", \"footer_phone\": \"(800) 508-7008\", + * \"replacement_value_for_liveboard\": \"Dashboard\", + * \"replacement_value_for_answer\": \"Chart\", + * \"replacement_value_for_spot_iq\": \"AI Insights\", + * \"hide_footer_phone\": false, \"hide_footer_address\": false, + * \"hide_product_name\": false, \"hide_manage_notification\": false, + * \"hide_mobile_app_nudge\": false, \"hide_privacy_policy\": false, + * \"hide_ts_vocabulary_definitions\": false, \"hide_error_message\": false, + * \"hide_unsubscribe_link\": false, \"hide_notification_status\": false, + * \"hide_modify_alert\": false, \"company_website_url\": + * \"https://your-website.com/\", \"company_privacy_policy_url\" : + * \"https://link-to-privacy-policy.com/\", \"contact_support_url\": + * \"https://link-to-contact-support.com/\", \"hide_contact_support_url\": + * false, \"hide_logo_url\" : false } } ``` + * + * @throws ApiException if the Api call fails + */ + @Test + public void updateEmailCustomizationTest() throws ApiException { + UpdateEmailCustomizationRequest updateEmailCustomizationRequest = null; + api.updateEmailCustomization(updateEmailCustomizationRequest); + // TODO: test validations + } + + /** + * Update header attributes for a given list of header objects. Version: 10.6.0.cl or later ## + * Prerequisites - **Privileges Required:** - `DATAMANAGEMENT` (Can manage data) or + * `ADMINISTRATION` (Can administer ThoughtSpot). - **Additional Privileges (if RBAC + * is enabled):** - `ORG_ADMINISTRATION` (Can manage orgs). --- ## Usage Guidelines + * ### Parameters 1. **headers_update** - **Description:** List of header objects with their + * attributes to be updated. Each object contains a list of attributes to be updated in the + * header. - **Usage:** - You must provide either `identifier` or + * `obj_identifier`, but not both. Both fields cannot be empty. - When + * `org_identifier` is set to `-1`, only the `identifier` value is + * accepted; `obj_identifier` is not allowed. 2. **org_identifier** - **Description:** + * GUID (Globally Unique Identifier) or name of the organization. - **Usage:** - Leaving this + * field empty assumes that the changes should be applied to the current organization - Provide + * `org_guid` or `org_name` to uniquely identify the organization where + * changes need to be applied. . - Provide `-1` if changes have to be applied across + * all the org. --- ## Note Currently, this API is enabled only for updating the + * `obj_identifier` attribute. Only `text` will be allowed in + * attribute's value. ## Best Practices 1. **Backup Before Conversion:** Always export + * metadata as a backup before initiating the update process --- ## Examples ### Only + * `identifier` is given ```json { \"headers_update\": [ { + * \"identifier\": \"guid_1\", \"obj_identifier\": \"\", + * \"type\": \"LOGICAL_COLUMN\", \"attributes\": [ { + * \"name\": \"obj_id\", \"value\": \"custom_object_id\" + * } ] } ], \"org_identifier\": \"orgGuid\" } ``` ### Only + * `obj_identifier` is given ```json { \"headers_update\": [ + * { \"obj_identifier\": \"custom_object_id\", \"type\": + * \"ANSWER\", \"attributes\": [ { \"name\": \"obj_id\", + * \"value\": \"custom_object_id\" } ] } ], \"org_identifier\": + * \"orgName\" } ``` ### Executing update for all org `-1` + * ```json { \"headers_update\": [ { \"identifier\": + * \"guid_1\", \"type\": \"ANSWER\", \"attributes\": [ { + * \"name\": \"obj_id\", \"value\": \"custom_object_id\" + * } ] } ], \"org_identifier\": -1 } ``` ### Optional `type` + * is not provided ```json { \"headers_update\": [ { + * \"identifier\": \"guid_1\", \"attributes\": [ { + * \"name\": \"obj_id\", \"value\": \"custom_object_id\" + * } ] } ], \"org_identifier\": -1 } ``` + * + * @throws ApiException if the Api call fails + */ + @Test + public void updateMetadataHeaderTest() throws ApiException { + UpdateMetadataHeaderRequest updateMetadataHeaderRequest = null; + api.updateMetadataHeader(updateMetadataHeaderRequest); + // TODO: test validations + } + + /** + * Update object IDs for given metadata objects. Version: 10.8.0.cl or later ## Prerequisites - + * **Privileges Required:** - `DATAMANAGEMENT` (Can manage data) or + * `ADMINISTRATION` (Can administer ThoughtSpot). - **Additional Privileges (if RBAC + * is enabled):** - `ORG_ADMINISTRATION` (Can manage orgs). --- ## Usage Guidelines + * ### Parameters 1. **metadata** - **Description:** List of metadata objects to update their + * object IDs. - **Usage:** - Use either `current_obj_id` alone OR use + * `metadata_identifier` with `type` (when needed). - When using + * `metadata_identifier`, the `type` field is required if using a name + * instead of a GUID. - The `new_obj_id` field is always required. --- ## Note This + * API is specifically designed for updating object IDs of metadata objects. It internally uses + * the header update mechanism to perform the changes. ## Best Practices 1. **Backup Before + * Update:** Always export metadata as a backup before initiating the update process. 2. + * **Validation:** - When using `current_obj_id`, ensure it matches the existing + * object ID exactly. - When using `metadata_identifier` with a name, ensure the + * `type` is specified correctly. - Verify that the `new_obj_id` follows + * your naming conventions and is unique within your system. --- ## Examples ### Using + * current_obj_id ```json { \"metadata\": [ { + * \"current_obj_id\": \"existing_object_id\", \"new_obj_id\": + * \"new_object_id\" } ] } ``` ### Using metadata_identifier with GUID + * ```json { \"metadata\": [ { \"metadata_identifier\": + * \"01234567-89ab-cdef-0123-456789abcdef\", \"new_obj_id\": + * \"new_object_id\" } ] } ``` ### Using metadata_identifier with name + * and type ```json { \"metadata\": [ { + * \"metadata_identifier\": \"My Answer\", \"type\": + * \"ANSWER\", \"new_obj_id\": \"new_object_id\" } ] } + * ``` ### Multiple objects update ```json { + * \"metadata\": [ { \"current_obj_id\": \"existing_object_id_1\", + * \"new_obj_id\": \"new_object_id_1\" }, { + * \"metadata_identifier\": \"My Worksheet\", \"type\": + * \"LOGICAL_TABLE\", \"new_obj_id\": \"new_object_id_2\" } ] } + * ``` + * + * @throws ApiException if the Api call fails + */ + @Test + public void updateMetadataObjIdTest() throws ApiException { + UpdateMetadataObjIdRequest updateMetadataObjIdRequest = null; + api.updateMetadataObjId(updateMetadataObjIdRequest); + // TODO: test validations + } + + /** + * Version: 9.0.0.cl or later Updates an Org object. You can modify Org properties such as name, + * description, and user associations. Requires cluster administration (**Can administer Org**) + * privileges. If [Role-Based Access Control + * (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the + * `ORG_ADMINISTRATION` (**Can manage Orgs**) privilege is required. + * + * @throws ApiException if the Api call fails + */ + @Test + public void updateOrgTest() throws ApiException { + String orgIdentifier = null; + UpdateOrgRequest updateOrgRequest = null; + api.updateOrg(orgIdentifier, updateOrgRequest); + // TODO: test validations + } + + /** + * Version: 9.5.0.cl or later Updates the properties of a Role object. Available only if + * [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled + * on your instance. To update a Role, the `ROLE_ADMINISTRATION` (**Can manage + * roles**) privilege is required. + * + * @throws ApiException if the Api call fails + */ + @Test + public void updateRoleTest() throws ApiException { + String roleIdentifier = null; + UpdateRoleRequest updateRoleRequest = null; + RoleResponse response = api.updateRole(roleIdentifier, updateRoleRequest); + // TODO: test validations + } + + /** + * Update schedule. Version: 9.4.0.cl or later Updates a scheduled Liveboard job. Requires at + * least edit access to Liveboards. To update a schedule on behalf of another user, you need + * `ADMINISTRATION` (**Can administer Org**) or `JOBSCHEDULING` (**Can + * schedule for others**) privilege and edit access to the Liveboard. If [Role-Based Access + * Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, + * the `JOBSCHEDULING` (**Can schedule for others**) privilege is required. The API + * endpoint allows you to pause a scheduled job, change the status of a paused job. You can also + * edit the recipients list, frequency of the job, format of the file to send to the recipients + * in email notifications, PDF options, and time zone setting. + * + * @throws ApiException if the Api call fails + */ + @Test + public void updateScheduleTest() throws ApiException { + String scheduleIdentifier = null; + UpdateScheduleRequest updateScheduleRequest = null; + api.updateSchedule(scheduleIdentifier, updateScheduleRequest); + // TODO: test validations + } + + /** + * Version: 9.2.0.cl or later Updates the current configuration of the cluster. You must send + * the configuration data in JSON format. Requires `ADMINISTRATION` (**Can administer + * ThoughtSpot**) privileges. If [Role-Based Access Control + * (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the + * `APPLICATION_ADMINISTRATION` (**Can manage application settings**) privilege is + * required. + * + * @throws ApiException if the Api call fails + */ + @Test + public void updateSystemConfigTest() throws ApiException { + UpdateSystemConfigRequest updateSystemConfigRequest = null; + api.updateSystemConfig(updateSystemConfigRequest); + // TODO: test validations + } + + /** + * Version: 9.0.0.cl or later Updates a tag object. You can modify the `name` and + * `color` properties of a tag object. Requires `ADMINISTRATION` (**Can + * administer ThoughtSpot**) privilege. If [Role-Based Access Control + * (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the + * `TAGMANAGEMENT` (**Can manage tags**) privilege is required to create, edit, and + * delete tags. + * + * @throws ApiException if the Api call fails + */ + @Test + public void updateTagTest() throws ApiException { + String tagIdentifier = null; + UpdateTagRequest updateTagRequest = null; + api.updateTag(tagIdentifier, updateTagRequest); + // TODO: test validations + } + + /** + * Version: 9.0.0.cl or later Updates the properties of a user object. You can modify user + * properties such as username, email, and share notification settings. You can also assign new + * groups and Orgs, remove the user from a group or Org, reset password, and modify user + * preferences. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. + * If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is + * enabled on your instance, the `USER_ADMINISTRATION` (**Can manage users**) + * privilege is required. + * + * @throws ApiException if the Api call fails + */ + @Test + public void updateUserTest() throws ApiException { + String userIdentifier = null; + UpdateUserRequest updateUserRequest = null; + api.updateUser(userIdentifier, updateUserRequest); + // TODO: test validations + } + + /** + * Version: 9.0.0.cl or later Updates the properties of a group object in ThoughtSpot. Requires + * `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access + * Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, + * the `GROUP_ADMINISTRATION` (**Can manage groups**) privilege is required. #### + * Supported operations This API endpoint lets you perform the following operations in a single + * API request: * Edit + * [privileges](https://developers.thoughtspot.com/docs/?pageid=api-user-management#group-privileges) + * * Add or remove users * Change sharing visibility settings * Add or remove sub-groups * + * Assign a default Liveboard or update the existing settings + * + * @throws ApiException if the Api call fails + */ + @Test + public void updateUserGroupTest() throws ApiException { + String groupIdentifier = null; + UpdateUserGroupRequest updateUserGroupRequest = null; + api.updateUserGroup(groupIdentifier, updateUserGroupRequest); + // TODO: test validations + } + + /** + * Update a variable's name Version: 26.4.0.cl or later Allows updating a variable's + * name in ThoughtSpot. Requires ADMINISTRATION role and TENANT scope. The CAN_MANAGE_VARIABLES + * permission allows you to manage Formula Variables in the current organization scope. The API + * endpoint allows updating: * The variable name + * + * @throws ApiException if the Api call fails + */ + @Test + public void updateVariableTest() throws ApiException { + String identifier = null; + UpdateVariableRequest updateVariableRequest = null; + api.updateVariable(identifier, updateVariableRequest); + // TODO: test validations + } + + /** + * Update values for multiple variables Version: 10.14.0.cl or later **Note:** This API endpoint + * is deprecated and will be removed from ThoughtSpot in a future release. Use [POST + * /api/rest/2.0/template/variables/{identifier}/update-values](/api/rest/2.0/template/variables/%7Bidentifier%7D/update-values) + * instead. Allows updating values for multiple variables in ThoughtSpot. Requires + * ADMINISTRATION role. The CAN_MANAGE_VARIABLES permission allows you to manage Formula + * Variables in the current organization scope. The API endpoint allows: * Adding new values to + * variables * Replacing existing values * Deleting values from variables When updating variable + * values, you need to specify: * The variable identifiers * The values to add/replace/remove + * for each variable * The operation to perform (ADD, REPLACE, REMOVE, RESET) Behaviour based on + * operation type: * ADD - Adds values to the variable if this is a list type variable, else + * same as replace. * REPLACE - Replaces all values of a given set of constraints with the + * current set of values. * REMOVE - Removes any values which match the set of conditions of the + * variables if this is a list type variable, else clears value. * RESET - Removes all + * constrains for a given variable, scope is ignored + * + * @throws ApiException if the Api call fails + */ + @Test + public void updateVariableValuesTest() throws ApiException { + UpdateVariableValuesRequest updateVariableValuesRequest = null; + api.updateVariableValues(updateVariableValuesRequest); + // TODO: test validations + } + + /** + * Version: 10.14.0.cl or later Updates an existing webhook configuration by its unique id or + * name. Only the provided fields will be updated. Requires `ADMINISTRATION` (**Can + * administer ThoughtSpot**) or `DEVELOPER` (**Has developer privilege**) privilege. + * If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is + * enabled on your instance, users with `CAN_MANAGE_WEBHOOKS` (**Can manage + * webhooks**) privilege are also authorized to perform this action. + * + * @throws ApiException if the Api call fails + */ + @Test + public void updateWebhookConfigurationTest() throws ApiException { + String webhookIdentifier = null; + UpdateWebhookConfigurationRequest updateWebhookConfigurationRequest = null; + api.updateWebhookConfiguration(webhookIdentifier, updateWebhookConfigurationRequest); + // TODO: test validations + } + + /** + * Version: 26.4.0.cl or later Validates a communication channel configuration to ensure it is + * properly set up and can receive events. - Use `channel_type` to specify the type of + * communication channel to validate (e.g., WEBHOOK). - Use `channel_identifier` to + * provide the unique identifier or name for the communication channel. - Use + * `event_type` to specify the event type to validate for this channel. Requires + * `ADMINISTRATION` (**Can administer ThoughtSpot**) or `DEVELOPER` (**Has + * developer privilege**) privilege. For webhook channels, users with + * `CAN_MANAGE_WEBHOOKS` (**Can manage webhooks**) privilege are also authorized to + * perform this action. + * + * @throws ApiException if the Api call fails + */ + @Test + public void validateCommunicationChannelTest() throws ApiException { + ValidateCommunicationChannelRequest validateCommunicationChannelRequest = null; + CommunicationChannelValidateResponse response = + api.validateCommunicationChannel(validateCommunicationChannelRequest); + // TODO: test validations + } + + /** + * Version: 10.10.0.cl or later Validates the email customization configuration if any set for + * the ThoughtSpot system. #### Pre-requisites Requires `DEVELOPER` (**has developer + * privilege**) or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If + * [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled + * on your instance, the `DEVELOPER` (**Has developer privilege**) privilege is + * required. **NOTE**:This endpoint in currently in beta. Contact ThoughtSpot support to enable + * this on your instance. + * + * @throws ApiException if the Api call fails + */ + @Test + public void validateEmailCustomizationTest() throws ApiException { + api.validateEmailCustomization(); + // TODO: test validations + } + + /** + * Version: 9.2.0.cl or later Validates the content of your source branch against the objects in + * your destination environment. Before merging content from your source branch to the + * destination branch, run this API operation from your destination environment and ensure that + * the changes from the source branch function in the destination environment. Requires + * `DATAMANAGEMENT` (**Can manage data**) privilege. If [Role-Based Access Control + * (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance on your + * instance, the `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` (**Can manage data models**) + * privilege and edit access to the metadata objects. + * + * @throws ApiException if the Api call fails + */ + @Test + public void validateMergeTest() throws ApiException { + ValidateMergeRequest validateMergeRequest = null; + List response = api.validateMerge(validateMergeRequest); + // TODO: test validations + } + + /** + * Version: 9.12.0.cl or later Validates the authentication token specified in the API request. + * If your token is not valid, [Get a new + * token](#/http/api-endpoints/authentication/get-full-access-token). + * + * @throws ApiException if the Api call fails + */ + @Test + public void validateTokenTest() throws ApiException { + ValidateTokenRequest validateTokenRequest = null; + TokenValidationResponse response = api.validateToken(validateTokenRequest); + // TODO: test validations + } +} diff --git a/sdks/java/src/test/java/com/thoughtspot/client/api/UsersApiTest.java b/sdks/java/src/test/java/com/thoughtspot/client/api/UsersApiTest.java new file mode 100644 index 000000000..4c4fd804c --- /dev/null +++ b/sdks/java/src/test/java/com/thoughtspot/client/api/UsersApiTest.java @@ -0,0 +1,222 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client.api; + +import com.thoughtspot.client.ApiException; +import com.thoughtspot.client.model.ActivateUserRequest; +import com.thoughtspot.client.model.ChangeUserPasswordRequest; +import com.thoughtspot.client.model.CreateUserRequest; +import com.thoughtspot.client.model.DeactivateUserRequest; +import com.thoughtspot.client.model.ForceLogoutUsersRequest; +import com.thoughtspot.client.model.ImportUsersRequest; +import com.thoughtspot.client.model.ImportUsersResponse; +import com.thoughtspot.client.model.ResetUserPasswordRequest; +import com.thoughtspot.client.model.ResponseActivationURL; +import com.thoughtspot.client.model.SearchUsersRequest; +import com.thoughtspot.client.model.UpdateUserRequest; +import com.thoughtspot.client.model.User; +import java.util.List; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; + +/** API tests for UsersApi */ +@Disabled +public class UsersApiTest { + + private final UsersApi api = new UsersApi(); + + /** + * Version: 9.7.0.cl or later Activates a deactivated user account. Requires + * `ADMINISTRATION` (**Can administer Thoughtspot**) privilege. If [Role-Based Access + * Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, + * the `USER_ADMINISTRATION` (**Can manage users**) privilege is required. To activate + * an inactive user account, the API request body must include the following information: - + * Username or the GUID of the user account. - Auth token generated for the deactivated user. + * The auth token is sent in the API response when a user is deactivated. - Password for the + * user account. + * + * @throws ApiException if the Api call fails + */ + @Test + public void activateUserTest() throws ApiException { + ActivateUserRequest activateUserRequest = null; + User response = api.activateUser(activateUserRequest); + // TODO: test validations + } + + /** + * Version: 9.0.0.cl or later Updates the current password of the user. Requires + * `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access + * Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, + * the `USER_ADMINISTRATION` (**Can manage users**) privilege is required. + * + * @throws ApiException if the Api call fails + */ + @Test + public void changeUserPasswordTest() throws ApiException { + ChangeUserPasswordRequest changeUserPasswordRequest = null; + api.changeUserPassword(changeUserPasswordRequest); + // TODO: test validations + } + + /** + * Version: 9.0.0.cl or later Creates a user in ThoughtSpot. The API endpoint allows you to + * configure several user properties such as email address, account status, share notification + * preferences, and sharing visibility. You can provision the user to + * [groups](https://docs.thoughtspot.com/cloud/latest/groups-privileges) and + * [Orgs](https://docs.thoughtspot.com/cloud/latest/orgs-overview). You can also add Liveboard, + * Answer, and Worksheet objects to the user’s favorites list, assign a default Liveboard for + * the user, and set user preferences. Requires `ADMINISTRATION` (**Can administer + * ThoughtSpot**) privilege. If [Role-Based Access Control + * (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the + * `USER_ADMINISTRATION` (**Can manage users**) privilege is required. + * + * @throws ApiException if the Api call fails + */ + @Test + public void createUserTest() throws ApiException { + CreateUserRequest createUserRequest = null; + User response = api.createUser(createUserRequest); + // TODO: test validations + } + + /** + * Version: 9.7.0.cl or later Deactivates a user account. Requires `ADMINISTRATION` + * (**Can administer Thoughtspot**) privilege. If [Role-Based Access Control + * (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the + * `USER_ADMINISTRATION` (**Can manage users**) privilege is required. To deactivate a + * user account, the API request body must include the following information: - Username or the + * GUID of the user account - Base URL of the ThoughtSpot instance If the API request is + * successful, ThoughtSpot returns the activation URL in the response. The activation URL is + * valid for 14 days and can be used to re-activate the account and reset the password of the + * deactivated account. + * + * @throws ApiException if the Api call fails + */ + @Test + public void deactivateUserTest() throws ApiException { + DeactivateUserRequest deactivateUserRequest = null; + ResponseActivationURL response = api.deactivateUser(deactivateUserRequest); + // TODO: test validations + } + + /** + * Version: 9.0.0.cl or later Deletes a user from the ThoughtSpot system. If you want to remove + * a user from a specific Org but not from ThoughtSpot, update the group and Org mapping + * properties of the user object via a POST API call to the + * [/api/rest/2.0/users/{user_identifier}/update](#/http/api-endpoints/users/update-user) + * endpoint. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If + * [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled + * on your instance, the `USER_ADMINISTRATION` (**Can manage users**) privilege is + * required. + * + * @throws ApiException if the Api call fails + */ + @Test + public void deleteUserTest() throws ApiException { + String userIdentifier = null; + api.deleteUser(userIdentifier); + // TODO: test validations + } + + /** + * Version: 9.0.0.cl or later Enforces logout on current user sessions. Use this API with + * caution as it may invalidate active user sessions and force users to re-login. Make sure you + * specify the usernames or GUIDs. If you pass null values in the API call, all user sessions on + * your cluster become invalid, and the users are forced to re-login. Requires + * `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access + * Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, + * the `USER_ADMINISTRATION` (**Can manage users**) privilege is required. + * + * @throws ApiException if the Api call fails + */ + @Test + public void forceLogoutUsersTest() throws ApiException { + ForceLogoutUsersRequest forceLogoutUsersRequest = null; + api.forceLogoutUsers(forceLogoutUsersRequest); + // TODO: test validations + } + + /** + * Version: 9.0.0.cl or later Imports user data from external databases into ThoughtSpot. During + * the user import operation: * If the specified users are not available in ThoughtSpot, the + * users are created and assigned a default password. Defining a `default_password` in + * the API request is optional. * If `delete_unspecified_users` is set to + * `true`, the users not specified in the API request, excluding the + * `tsadmin`, `guest`, `system` and `su` users, are + * deleted. * If the specified user objects are already available in ThoughtSpot, the object + * properties are updated and synchronized as per the input data in the API request. A + * successful API call returns the object that represents the changes made in the ThoughtSpot + * system. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If + * [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled + * on your instance, the `USER_ADMINISTRATION` (**Can manage users**) privilege is + * required. + * + * @throws ApiException if the Api call fails + */ + @Test + public void importUsersTest() throws ApiException { + ImportUsersRequest importUsersRequest = null; + ImportUsersResponse response = api.importUsers(importUsersRequest); + // TODO: test validations + } + + /** + * Version: 9.0.0.cl or later Resets the password of a user account. Administrators can reset + * password on behalf of a user. Requires `ADMINISTRATION` (**Can administer + * ThoughtSpot**) privilege. If [Role-Based Access Control + * (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the + * `USER_ADMINISTRATION` (**Can manage users**) privilege is required. + * + * @throws ApiException if the Api call fails + */ + @Test + public void resetUserPasswordTest() throws ApiException { + ResetUserPasswordRequest resetUserPasswordRequest = null; + api.resetUserPassword(resetUserPasswordRequest); + // TODO: test validations + } + + /** + * Version: 9.0.0.cl or later Gets a list of users available on the ThoughtSpot system. To get + * details of a specific user, specify the user GUID or name. You can also filter the API + * response based on groups, Org ID, user visibility, account status, user type, and user + * preference settings and favorites. Available to all users. Users with + * `ADMINISTRATION` (**Can administer ThoughtSpot**) privileges can view all users + * properties. If [Role-Based Access Control + * (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the + * `USER_ADMINISTRATION` (**Can manage users**) privilege is required. **NOTE**: If + * the API returns an empty list, consider increasing the value of the `record_size` + * parameter. To search across all available users, set `record_size` to + * `-1`. + * + * @throws ApiException if the Api call fails + */ + @Test + public void searchUsersTest() throws ApiException { + SearchUsersRequest searchUsersRequest = null; + List response = api.searchUsers(searchUsersRequest); + // TODO: test validations + } + + /** + * Version: 9.0.0.cl or later Updates the properties of a user object. You can modify user + * properties such as username, email, and share notification settings. You can also assign new + * groups and Orgs, remove the user from a group or Org, reset password, and modify user + * preferences. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. + * If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is + * enabled on your instance, the `USER_ADMINISTRATION` (**Can manage users**) + * privilege is required. + * + * @throws ApiException if the Api call fails + */ + @Test + public void updateUserTest() throws ApiException { + String userIdentifier = null; + UpdateUserRequest updateUserRequest = null; + api.updateUser(userIdentifier, updateUserRequest); + // TODO: test validations + } +} diff --git a/sdks/java/src/test/java/com/thoughtspot/client/api/VariableApiTest.java b/sdks/java/src/test/java/com/thoughtspot/client/api/VariableApiTest.java new file mode 100644 index 000000000..d1fbbdf86 --- /dev/null +++ b/sdks/java/src/test/java/com/thoughtspot/client/api/VariableApiTest.java @@ -0,0 +1,167 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client.api; + +import com.thoughtspot.client.ApiException; +import com.thoughtspot.client.model.CreateVariableRequest; +import com.thoughtspot.client.model.DeleteVariablesRequest; +import com.thoughtspot.client.model.PutVariableValuesRequest; +import com.thoughtspot.client.model.SearchVariablesRequest; +import com.thoughtspot.client.model.UpdateVariableRequest; +import com.thoughtspot.client.model.UpdateVariableValuesRequest; +import com.thoughtspot.client.model.Variable; +import java.util.List; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; + +/** API tests for VariableApi */ +@Disabled +public class VariableApiTest { + + private final VariableApi api = new VariableApi(); + + /** + * Create a variable which can be used for parameterizing metadata objects Version: 26.4.0.cl or + * later Allows creating a variable which can be used for parameterizing metadata objects in + * ThoughtSpot. Requires ADMINISTRATION role and TENANT scope. The CAN_MANAGE_VARIABLES + * permission allows you to manage Formula Variables in the current organization scope. The API + * endpoint supports the following types of variables: * CONNECTION_PROPERTY - For connection + * properties * TABLE_MAPPING - For table mappings * CONNECTION_PROPERTY_PER_PRINCIPAL - For + * connection properties per principal. In order to use this please contact support to enable + * this. * FORMULA_VARIABLE - For Formula variables, introduced in 10.15.0.cl When creating a + * variable, you need to specify: * The variable type * A unique name for the variable * Whether + * the variable contains sensitive values (defaults to false) * The data type of the variable, + * only specify for formula variables (defaults to null) The operation will fail if: * The user + * lacks required permissions * The variable name already exists * The variable type is invalid + * + * @throws ApiException if the Api call fails + */ + @Test + public void createVariableTest() throws ApiException { + CreateVariableRequest createVariableRequest = null; + Variable response = api.createVariable(createVariableRequest); + // TODO: test validations + } + + /** + * Delete a variable Version: 10.14.0.cl or later **Note:** This API endpoint is deprecated and + * will be removed from ThoughtSpot in a future release. Use [POST + * /api/rest/2.0/template/variables/delete](/api/rest/2.0/template/variables/delete) instead. + * Allows deleting a variable from ThoughtSpot. Requires ADMINISTRATION role and TENANT scope. + * The CAN_MANAGE_VARIABLES permission allows you to manage Formula Variables in the current + * organization scope. The API endpoint requires: * The variable identifier (ID or name) The + * operation will fail if: * The user lacks required permissions * The variable doesn't + * exist * The variable is being used by other objects + * + * @throws ApiException if the Api call fails + */ + @Test + public void deleteVariableTest() throws ApiException { + String identifier = null; + api.deleteVariable(identifier); + // TODO: test validations + } + + /** + * Delete variable(s) Version: 26.4.0.cl or later Allows deleting multiple variables from + * ThoughtSpot. Requires ADMINISTRATION role and TENANT scope. The CAN_MANAGE_VARIABLES + * permission allows you to manage Formula Variables in the current organization scope. The API + * endpoint requires: * The variable identifiers (IDs or names) The operation will fail if: * + * The user lacks required permissions * Any of the variables don't exist * Any of the + * variables are being used by other objects + * + * @throws ApiException if the Api call fails + */ + @Test + public void deleteVariablesTest() throws ApiException { + DeleteVariablesRequest deleteVariablesRequest = null; + api.deleteVariables(deleteVariablesRequest); + // TODO: test validations + } + + /** + * Update values for a variable Version: 26.4.0.cl or later Allows updating values for a + * specific variable in ThoughtSpot. Requires ADMINISTRATION role. The CAN_MANAGE_VARIABLES + * permission allows you to manage Formula Variables in the current organization scope. The API + * endpoint allows: * Adding new values to the variable * Replacing existing values * Deleting + * values from the variable * Resetting all values When updating variable values, you need to + * specify: * The variable identifier (ID or name) * The values to add/replace/remove * The + * operation to perform (ADD, REPLACE, REMOVE, RESET) Behaviour based on operation type: * ADD - + * Adds values to the variable if this is a list type variable, else same as replace. * REPLACE + * - Replaces all values of a given set of constraints with the current set of values. * REMOVE + * - Removes any values which match the set of conditions of the variables if this is a list + * type variable, else clears value. * RESET - Removes all constraints for the given variable, + * scope is ignored + * + * @throws ApiException if the Api call fails + */ + @Test + public void putVariableValuesTest() throws ApiException { + String identifier = null; + PutVariableValuesRequest putVariableValuesRequest = null; + api.putVariableValues(identifier, putVariableValuesRequest); + // TODO: test validations + } + + /** + * Search variables Version: 26.4.0.cl or later Allows searching for variables in ThoughtSpot. + * Requires ADMINISTRATION role. The CAN_MANAGE_VARIABLES permission allows you to manage + * Formula Variables in the current organization scope. The API endpoint supports searching + * variables by: * Variable identifier (ID or name) * Variable type * Name pattern + * (case-insensitive, supports % for wildcard) The search results can be formatted in three + * ways: * METADATA - Returns only variable metadata (default) * METADATA_AND_VALUES - Returns + * variable metadata and values The values can be filtered by scope: * org_identifier * + * principal_identifier * model_identifier + * + * @throws ApiException if the Api call fails + */ + @Test + public void searchVariablesTest() throws ApiException { + SearchVariablesRequest searchVariablesRequest = null; + List response = api.searchVariables(searchVariablesRequest); + // TODO: test validations + } + + /** + * Update a variable's name Version: 26.4.0.cl or later Allows updating a variable's + * name in ThoughtSpot. Requires ADMINISTRATION role and TENANT scope. The CAN_MANAGE_VARIABLES + * permission allows you to manage Formula Variables in the current organization scope. The API + * endpoint allows updating: * The variable name + * + * @throws ApiException if the Api call fails + */ + @Test + public void updateVariableTest() throws ApiException { + String identifier = null; + UpdateVariableRequest updateVariableRequest = null; + api.updateVariable(identifier, updateVariableRequest); + // TODO: test validations + } + + /** + * Update values for multiple variables Version: 10.14.0.cl or later **Note:** This API endpoint + * is deprecated and will be removed from ThoughtSpot in a future release. Use [POST + * /api/rest/2.0/template/variables/{identifier}/update-values](/api/rest/2.0/template/variables/%7Bidentifier%7D/update-values) + * instead. Allows updating values for multiple variables in ThoughtSpot. Requires + * ADMINISTRATION role. The CAN_MANAGE_VARIABLES permission allows you to manage Formula + * Variables in the current organization scope. The API endpoint allows: * Adding new values to + * variables * Replacing existing values * Deleting values from variables When updating variable + * values, you need to specify: * The variable identifiers * The values to add/replace/remove + * for each variable * The operation to perform (ADD, REPLACE, REMOVE, RESET) Behaviour based on + * operation type: * ADD - Adds values to the variable if this is a list type variable, else + * same as replace. * REPLACE - Replaces all values of a given set of constraints with the + * current set of values. * REMOVE - Removes any values which match the set of conditions of the + * variables if this is a list type variable, else clears value. * RESET - Removes all + * constrains for a given variable, scope is ignored + * + * @throws ApiException if the Api call fails + */ + @Test + public void updateVariableValuesTest() throws ApiException { + UpdateVariableValuesRequest updateVariableValuesRequest = null; + api.updateVariableValues(updateVariableValuesRequest); + // TODO: test validations + } +} diff --git a/sdks/java/src/test/java/com/thoughtspot/client/api/VersionControlApiTest.java b/sdks/java/src/test/java/com/thoughtspot/client/api/VersionControlApiTest.java new file mode 100644 index 000000000..c31d7ad12 --- /dev/null +++ b/sdks/java/src/test/java/com/thoughtspot/client/api/VersionControlApiTest.java @@ -0,0 +1,194 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client.api; + +import com.thoughtspot.client.ApiException; +import com.thoughtspot.client.model.CommitBranchRequest; +import com.thoughtspot.client.model.CommitHistoryResponse; +import com.thoughtspot.client.model.CommitResponse; +import com.thoughtspot.client.model.CreateConfigRequest; +import com.thoughtspot.client.model.DeleteConfigRequest; +import com.thoughtspot.client.model.DeployCommitRequest; +import com.thoughtspot.client.model.DeployResponse; +import com.thoughtspot.client.model.RepoConfigObject; +import com.thoughtspot.client.model.RevertCommitRequest; +import com.thoughtspot.client.model.RevertResponse; +import com.thoughtspot.client.model.SearchCommitsRequest; +import com.thoughtspot.client.model.SearchConfigRequest; +import com.thoughtspot.client.model.UpdateConfigRequest; +import com.thoughtspot.client.model.ValidateMergeRequest; +import java.util.List; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; + +/** API tests for VersionControlApi */ +@Disabled +public class VersionControlApiTest { + + private final VersionControlApi api = new VersionControlApi(); + + /** + * Version: 9.2.0.cl or later Commits TML files of metadata objects to the Git branch configured + * on your instance. Requires at least edit access to objects used in the commit operation. + * Before using this endpoint to push your commits: * Enable Git integration on your instance. * + * Make sure the Git repository and branch details are configured on your instance. For more + * information, see [Git integration + * documentation](https://developers.thoughtspot.com/docs/git-integration). + * + * @throws ApiException if the Api call fails + */ + @Test + public void commitBranchTest() throws ApiException { + CommitBranchRequest commitBranchRequest = null; + CommitResponse response = api.commitBranch(commitBranchRequest); + // TODO: test validations + } + + /** + * Version: 9.2.0.cl or later Allows you to connect a ThoughtSpot instance to a Git repository. + * Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If + * [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled + * on your instance on your instance, the `CAN_SETUP_VERSION_CONTROL` (**Can set up + * version control**) privilege. You can use this API endpoint to connect your ThoughtSpot + * development and production environments to the development and production branches of a Git + * repository. Before using this endpoint to connect your ThoughtSpot instance to a Git + * repository, check the following prerequisites: * You have a Git repository. If you are using + * GitHub, make sure you have a valid account and an access token to connect ThoughtSpot to + * GitHub. For information about generating a token, see [GitHub + * Documentation](https://docs.github.com/en/authentication/keeping-your-account-and-data-secure/managing-your-personal-access-tokens). + * * Your access token has `repo` scope that grants full access to public and private + * repositories. * Your Git repository has a branch that can be configured as a default branch + * in ThoughtSpot. For more information, see [Git integration + * documentation](https://developers.thoughtspot.com/docs/?pageid=git-integration). + * **Note**: ThoughtSpot supports only GitHub / itHub Enterprise for CI/CD. + * + * @throws ApiException if the Api call fails + */ + @Test + public void createConfigTest() throws ApiException { + CreateConfigRequest createConfigRequest = null; + RepoConfigObject response = api.createConfig(createConfigRequest); + // TODO: test validations + } + + /** + * Version: 9.2.0.cl or later Deletes Git repository configuration from your ThoughtSpot + * instance. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If + * [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled + * on your instance on your instance, the `CAN_SETUP_VERSION_CONTROL` (**Can set up + * version control**) privilege. + * + * @throws ApiException if the Api call fails + */ + @Test + public void deleteConfigTest() throws ApiException { + DeleteConfigRequest deleteConfigRequest = null; + api.deleteConfig(deleteConfigRequest); + // TODO: test validations + } + + /** + * Version: 9.2.0.cl or later Allows you to deploy a commit and publish TML content to your + * ThoughtSpot instance. Requires at least edit access to the objects used in the deploy + * operation. The API deploys the head of the branch unless a `commit_id` is specified + * in the API request. If the branch name is not defined in the request, the default branch is + * considered for deploying commits. For more information, see [Git integration + * documentation](https://developers.thoughtspot.com/docs/git-integration). + * + * @throws ApiException if the Api call fails + */ + @Test + public void deployCommitTest() throws ApiException { + DeployCommitRequest deployCommitRequest = null; + List response = api.deployCommit(deployCommitRequest); + // TODO: test validations + } + + /** + * Version: 9.2.0.cl or later Reverts TML objects to a previous commit specified in the API + * request. Requires at least edit access to objects. In the API request, specify the + * `commit_id`. If the branch name is not specified in the request, the API will + * consider the default branch configured on your instance. By default, the API reverts all + * objects. If the revert operation fails for one of the objects provided in the commit, the API + * returns an error and does not revert any object. For more information, see [Git integration + * documentation](https://developers.thoughtspot.com/docs/git-integration). + * + * @throws ApiException if the Api call fails + */ + @Test + public void revertCommitTest() throws ApiException { + String commitId = null; + RevertCommitRequest revertCommitRequest = null; + RevertResponse response = api.revertCommit(commitId, revertCommitRequest); + // TODO: test validations + } + + /** + * Version: 9.2.0.cl or later Gets a list of commits for a given metadata object. Requires + * `DATAMANAGEMENT` (**Can manage data**) privilege. If [Role-Based Access Control + * (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance on your + * instance, the `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` (**Can manage data models**) + * privilege and edit access to the metadata objects. + * + * @throws ApiException if the Api call fails + */ + @Test + public void searchCommitsTest() throws ApiException { + SearchCommitsRequest searchCommitsRequest = null; + List response = api.searchCommits(searchCommitsRequest); + // TODO: test validations + } + + /** + * Version: 9.2.0.cl or later Gets Git repository connections configured on the ThoughtSpot + * instance. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If + * [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled + * on your instance on your instance, the `CAN_SETUP_VERSION_CONTROL` (**Can set up + * version control**) privilege. + * + * @throws ApiException if the Api call fails + */ + @Test + public void searchConfigTest() throws ApiException { + SearchConfigRequest searchConfigRequest = null; + List response = api.searchConfig(searchConfigRequest); + // TODO: test validations + } + + /** + * Version: 9.2.0.cl or later Updates Git repository configuration settings. Requires + * `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access + * Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance on + * your instance, the `CAN_SETUP_VERSION_CONTROL` (**Can set up version control**) + * privilege. + * + * @throws ApiException if the Api call fails + */ + @Test + public void updateConfigTest() throws ApiException { + UpdateConfigRequest updateConfigRequest = null; + RepoConfigObject response = api.updateConfig(updateConfigRequest); + // TODO: test validations + } + + /** + * Version: 9.2.0.cl or later Validates the content of your source branch against the objects in + * your destination environment. Before merging content from your source branch to the + * destination branch, run this API operation from your destination environment and ensure that + * the changes from the source branch function in the destination environment. Requires + * `DATAMANAGEMENT` (**Can manage data**) privilege. If [Role-Based Access Control + * (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance on your + * instance, the `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` (**Can manage data models**) + * privilege and edit access to the metadata objects. + * + * @throws ApiException if the Api call fails + */ + @Test + public void validateMergeTest() throws ApiException { + ValidateMergeRequest validateMergeRequest = null; + List response = api.validateMerge(validateMergeRequest); + // TODO: test validations + } +} diff --git a/sdks/java/src/test/java/com/thoughtspot/client/api/WebhooksApiTest.java b/sdks/java/src/test/java/com/thoughtspot/client/api/WebhooksApiTest.java new file mode 100644 index 000000000..979024507 --- /dev/null +++ b/sdks/java/src/test/java/com/thoughtspot/client/api/WebhooksApiTest.java @@ -0,0 +1,99 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client.api; + +import com.thoughtspot.client.ApiException; +import com.thoughtspot.client.model.CreateWebhookConfigurationRequest; +import com.thoughtspot.client.model.DeleteWebhookConfigurationsRequest; +import com.thoughtspot.client.model.SearchWebhookConfigurationsRequest; +import com.thoughtspot.client.model.UpdateWebhookConfigurationRequest; +import com.thoughtspot.client.model.WebhookDeleteResponse; +import com.thoughtspot.client.model.WebhookResponse; +import com.thoughtspot.client.model.WebhookSearchResponse; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; + +/** API tests for WebhooksApi */ +@Disabled +public class WebhooksApiTest { + + private final WebhooksApi api = new WebhooksApi(); + + /** + * Version: 10.14.0.cl or later Creates a new webhook configuration to receive notifications for + * specified events. The webhook will be triggered when the configured events occur in the + * system. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) or + * `DEVELOPER` (**Has developer privilege**) privilege. If [Role-Based Access Control + * (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, users with + * `CAN_MANAGE_WEBHOOKS` (**Can manage webhooks**) privilege are also authorized to + * perform this action. + * + * @throws ApiException if the Api call fails + */ + @Test + public void createWebhookConfigurationTest() throws ApiException { + CreateWebhookConfigurationRequest createWebhookConfigurationRequest = null; + WebhookResponse response = + api.createWebhookConfiguration(createWebhookConfigurationRequest); + // TODO: test validations + } + + /** + * Version: 10.14.0.cl or later Deletes one or more webhook configurations by their unique id or + * name. Returns status of each deletion operation, including successfully deleted webhooks and + * any failures with error details. Requires `ADMINISTRATION` (**Can administer + * ThoughtSpot**) or `DEVELOPER` (**Has developer privilege**) privilege. If + * [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled + * on your instance, users with `CAN_MANAGE_WEBHOOKS` (**Can manage webhooks**) + * privilege are also authorized to perform this action. + * + * @throws ApiException if the Api call fails + */ + @Test + public void deleteWebhookConfigurationsTest() throws ApiException { + DeleteWebhookConfigurationsRequest deleteWebhookConfigurationsRequest = null; + WebhookDeleteResponse response = + api.deleteWebhookConfigurations(deleteWebhookConfigurationsRequest); + // TODO: test validations + } + + /** + * Version: 10.14.0.cl or later Searches for webhook configurations based on various criteria + * such as Org, webhook identifier, event type, with support for pagination and sorting. Returns + * matching webhook configurations with their complete details. Requires + * `ADMINISTRATION` (**Can administer ThoughtSpot**) or `DEVELOPER` (**Has + * developer privilege**) privilege. If [Role-Based Access Control + * (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, users with + * `CAN_MANAGE_WEBHOOKS` (**Can manage webhooks**) privilege are also authorized to + * perform this action. + * + * @throws ApiException if the Api call fails + */ + @Test + public void searchWebhookConfigurationsTest() throws ApiException { + SearchWebhookConfigurationsRequest searchWebhookConfigurationsRequest = null; + WebhookSearchResponse response = + api.searchWebhookConfigurations(searchWebhookConfigurationsRequest); + // TODO: test validations + } + + /** + * Version: 10.14.0.cl or later Updates an existing webhook configuration by its unique id or + * name. Only the provided fields will be updated. Requires `ADMINISTRATION` (**Can + * administer ThoughtSpot**) or `DEVELOPER` (**Has developer privilege**) privilege. + * If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is + * enabled on your instance, users with `CAN_MANAGE_WEBHOOKS` (**Can manage + * webhooks**) privilege are also authorized to perform this action. + * + * @throws ApiException if the Api call fails + */ + @Test + public void updateWebhookConfigurationTest() throws ApiException { + String webhookIdentifier = null; + UpdateWebhookConfigurationRequest updateWebhookConfigurationRequest = null; + api.updateWebhookConfiguration(webhookIdentifier, updateWebhookConfigurationRequest); + // TODO: test validations + } +} diff --git a/sdks/java/src/test/java/com/thoughtspot/client/model/AIContextTest.java b/sdks/java/src/test/java/com/thoughtspot/client/model/AIContextTest.java new file mode 100644 index 000000000..91d1c6b9b --- /dev/null +++ b/sdks/java/src/test/java/com/thoughtspot/client/model/AIContextTest.java @@ -0,0 +1,30 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client.model; + +import org.junit.jupiter.api.Test; + +/** Model tests for AIContext */ +public class AIContextTest { + private final AIContext model = new AIContext(); + + /** Model tests for AIContext */ + @Test + public void testAIContext() { + // TODO: test AIContext + } + + /** Test the property 'instructions' */ + @Test + public void instructionsTest() { + // TODO: test instructions + } + + /** Test the property 'content' */ + @Test + public void contentTest() { + // TODO: test content + } +} diff --git a/sdks/java/src/test/java/com/thoughtspot/client/model/APIKeyInputTest.java b/sdks/java/src/test/java/com/thoughtspot/client/model/APIKeyInputTest.java new file mode 100644 index 000000000..b9c493d2d --- /dev/null +++ b/sdks/java/src/test/java/com/thoughtspot/client/model/APIKeyInputTest.java @@ -0,0 +1,30 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client.model; + +import org.junit.jupiter.api.Test; + +/** Model tests for APIKeyInput */ +public class APIKeyInputTest { + private final APIKeyInput model = new APIKeyInput(); + + /** Model tests for APIKeyInput */ + @Test + public void testAPIKeyInput() { + // TODO: test APIKeyInput + } + + /** Test the property 'key' */ + @Test + public void keyTest() { + // TODO: test key + } + + /** Test the property 'value' */ + @Test + public void valueTest() { + // TODO: test value + } +} diff --git a/sdks/java/src/test/java/com/thoughtspot/client/model/APIKeyTest.java b/sdks/java/src/test/java/com/thoughtspot/client/model/APIKeyTest.java new file mode 100644 index 000000000..1763dc712 --- /dev/null +++ b/sdks/java/src/test/java/com/thoughtspot/client/model/APIKeyTest.java @@ -0,0 +1,30 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client.model; + +import org.junit.jupiter.api.Test; + +/** Model tests for APIKey */ +public class APIKeyTest { + private final APIKey model = new APIKey(); + + /** Model tests for APIKey */ + @Test + public void testAPIKey() { + // TODO: test APIKey + } + + /** Test the property 'key' */ + @Test + public void keyTest() { + // TODO: test key + } + + /** Test the property 'value' */ + @Test + public void valueTest() { + // TODO: test value + } +} diff --git a/sdks/java/src/test/java/com/thoughtspot/client/model/AccessTokenTest.java b/sdks/java/src/test/java/com/thoughtspot/client/model/AccessTokenTest.java new file mode 100644 index 000000000..8d59cab11 --- /dev/null +++ b/sdks/java/src/test/java/com/thoughtspot/client/model/AccessTokenTest.java @@ -0,0 +1,54 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client.model; + +import org.junit.jupiter.api.Test; + +/** Model tests for AccessToken */ +public class AccessTokenTest { + private final AccessToken model = new AccessToken(); + + /** Model tests for AccessToken */ + @Test + public void testAccessToken() { + // TODO: test AccessToken + } + + /** Test the property 'id' */ + @Test + public void idTest() { + // TODO: test id + } + + /** Test the property 'token' */ + @Test + public void tokenTest() { + // TODO: test token + } + + /** Test the property 'org' */ + @Test + public void orgTest() { + // TODO: test org + } + + /** Test the property 'user' */ + @Test + public void userTest() { + // TODO: test user + } + + /** Test the property 'creationTimeInMillis' */ + @Test + public void creationTimeInMillisTest() { + // TODO: test creationTimeInMillis + } + + /** Test the property 'expirationTimeInMillis' */ + @Test + public void expirationTimeInMillisTest() { + // TODO: test expirationTimeInMillis + } +} diff --git a/sdks/java/src/test/java/com/thoughtspot/client/model/ActionConfigInputCreateTest.java b/sdks/java/src/test/java/com/thoughtspot/client/model/ActionConfigInputCreateTest.java new file mode 100644 index 000000000..12f3f40aa --- /dev/null +++ b/sdks/java/src/test/java/com/thoughtspot/client/model/ActionConfigInputCreateTest.java @@ -0,0 +1,30 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client.model; + +import org.junit.jupiter.api.Test; + +/** Model tests for ActionConfigInputCreate */ +public class ActionConfigInputCreateTest { + private final ActionConfigInputCreate model = new ActionConfigInputCreate(); + + /** Model tests for ActionConfigInputCreate */ + @Test + public void testActionConfigInputCreate() { + // TODO: test ActionConfigInputCreate + } + + /** Test the property 'position' */ + @Test + public void positionTest() { + // TODO: test position + } + + /** Test the property 'visibility' */ + @Test + public void visibilityTest() { + // TODO: test visibility + } +} diff --git a/sdks/java/src/test/java/com/thoughtspot/client/model/ActionConfigInputTest.java b/sdks/java/src/test/java/com/thoughtspot/client/model/ActionConfigInputTest.java new file mode 100644 index 000000000..eeb1f62cf --- /dev/null +++ b/sdks/java/src/test/java/com/thoughtspot/client/model/ActionConfigInputTest.java @@ -0,0 +1,30 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client.model; + +import org.junit.jupiter.api.Test; + +/** Model tests for ActionConfigInput */ +public class ActionConfigInputTest { + private final ActionConfigInput model = new ActionConfigInput(); + + /** Model tests for ActionConfigInput */ + @Test + public void testActionConfigInput() { + // TODO: test ActionConfigInput + } + + /** Test the property 'position' */ + @Test + public void positionTest() { + // TODO: test position + } + + /** Test the property 'visibility' */ + @Test + public void visibilityTest() { + // TODO: test visibility + } +} diff --git a/sdks/java/src/test/java/com/thoughtspot/client/model/ActionConfigTest.java b/sdks/java/src/test/java/com/thoughtspot/client/model/ActionConfigTest.java new file mode 100644 index 000000000..c01f68ec2 --- /dev/null +++ b/sdks/java/src/test/java/com/thoughtspot/client/model/ActionConfigTest.java @@ -0,0 +1,30 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client.model; + +import org.junit.jupiter.api.Test; + +/** Model tests for ActionConfig */ +public class ActionConfigTest { + private final ActionConfig model = new ActionConfig(); + + /** Model tests for ActionConfig */ + @Test + public void testActionConfig() { + // TODO: test ActionConfig + } + + /** Test the property 'position' */ + @Test + public void positionTest() { + // TODO: test position + } + + /** Test the property 'visibility' */ + @Test + public void visibilityTest() { + // TODO: test visibility + } +} diff --git a/sdks/java/src/test/java/com/thoughtspot/client/model/ActionDetailsInputCreateTest.java b/sdks/java/src/test/java/com/thoughtspot/client/model/ActionDetailsInputCreateTest.java new file mode 100644 index 000000000..f96268812 --- /dev/null +++ b/sdks/java/src/test/java/com/thoughtspot/client/model/ActionDetailsInputCreateTest.java @@ -0,0 +1,30 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client.model; + +import org.junit.jupiter.api.Test; + +/** Model tests for ActionDetailsInputCreate */ +public class ActionDetailsInputCreateTest { + private final ActionDetailsInputCreate model = new ActionDetailsInputCreate(); + + /** Model tests for ActionDetailsInputCreate */ + @Test + public void testActionDetailsInputCreate() { + // TODO: test ActionDetailsInputCreate + } + + /** Test the property 'CALLBACK' */ + @Test + public void CALLBACKTest() { + // TODO: test CALLBACK + } + + /** Test the property 'URL' */ + @Test + public void URLTest() { + // TODO: test URL + } +} diff --git a/sdks/java/src/test/java/com/thoughtspot/client/model/ActionDetailsInputTest.java b/sdks/java/src/test/java/com/thoughtspot/client/model/ActionDetailsInputTest.java new file mode 100644 index 000000000..cf2607194 --- /dev/null +++ b/sdks/java/src/test/java/com/thoughtspot/client/model/ActionDetailsInputTest.java @@ -0,0 +1,30 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client.model; + +import org.junit.jupiter.api.Test; + +/** Model tests for ActionDetailsInput */ +public class ActionDetailsInputTest { + private final ActionDetailsInput model = new ActionDetailsInput(); + + /** Model tests for ActionDetailsInput */ + @Test + public void testActionDetailsInput() { + // TODO: test ActionDetailsInput + } + + /** Test the property 'CALLBACK' */ + @Test + public void CALLBACKTest() { + // TODO: test CALLBACK + } + + /** Test the property 'URL' */ + @Test + public void URLTest() { + // TODO: test URL + } +} diff --git a/sdks/java/src/test/java/com/thoughtspot/client/model/ActionDetailsTest.java b/sdks/java/src/test/java/com/thoughtspot/client/model/ActionDetailsTest.java new file mode 100644 index 000000000..f5d7bcb77 --- /dev/null +++ b/sdks/java/src/test/java/com/thoughtspot/client/model/ActionDetailsTest.java @@ -0,0 +1,30 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client.model; + +import org.junit.jupiter.api.Test; + +/** Model tests for ActionDetails */ +public class ActionDetailsTest { + private final ActionDetails model = new ActionDetails(); + + /** Model tests for ActionDetails */ + @Test + public void testActionDetails() { + // TODO: test ActionDetails + } + + /** Test the property 'callback' */ + @Test + public void callbackTest() { + // TODO: test callback + } + + /** Test the property 'url' */ + @Test + public void urlTest() { + // TODO: test url + } +} diff --git a/sdks/java/src/test/java/com/thoughtspot/client/model/ActivateUserRequestTest.java b/sdks/java/src/test/java/com/thoughtspot/client/model/ActivateUserRequestTest.java new file mode 100644 index 000000000..39f242168 --- /dev/null +++ b/sdks/java/src/test/java/com/thoughtspot/client/model/ActivateUserRequestTest.java @@ -0,0 +1,42 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client.model; + +import org.junit.jupiter.api.Test; + +/** Model tests for ActivateUserRequest */ +public class ActivateUserRequestTest { + private final ActivateUserRequest model = new ActivateUserRequest(); + + /** Model tests for ActivateUserRequest */ + @Test + public void testActivateUserRequest() { + // TODO: test ActivateUserRequest + } + + /** Test the property 'userIdentifier' */ + @Test + public void userIdentifierTest() { + // TODO: test userIdentifier + } + + /** Test the property 'authToken' */ + @Test + public void authTokenTest() { + // TODO: test authToken + } + + /** Test the property 'password' */ + @Test + public void passwordTest() { + // TODO: test password + } + + /** Test the property 'properties' */ + @Test + public void propertiesTest() { + // TODO: test properties + } +} diff --git a/sdks/java/src/test/java/com/thoughtspot/client/model/AgentConversationTest.java b/sdks/java/src/test/java/com/thoughtspot/client/model/AgentConversationTest.java new file mode 100644 index 000000000..03fe88926 --- /dev/null +++ b/sdks/java/src/test/java/com/thoughtspot/client/model/AgentConversationTest.java @@ -0,0 +1,30 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client.model; + +import org.junit.jupiter.api.Test; + +/** Model tests for AgentConversation */ +public class AgentConversationTest { + private final AgentConversation model = new AgentConversation(); + + /** Model tests for AgentConversation */ + @Test + public void testAgentConversation() { + // TODO: test AgentConversation + } + + /** Test the property 'conversationId' */ + @Test + public void conversationIdTest() { + // TODO: test conversationId + } + + /** Test the property 'conversationIdentifier' */ + @Test + public void conversationIdentifierTest() { + // TODO: test conversationIdentifier + } +} diff --git a/sdks/java/src/test/java/com/thoughtspot/client/model/AnswerContentTest.java b/sdks/java/src/test/java/com/thoughtspot/client/model/AnswerContentTest.java new file mode 100644 index 000000000..55f0bc2aa --- /dev/null +++ b/sdks/java/src/test/java/com/thoughtspot/client/model/AnswerContentTest.java @@ -0,0 +1,60 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client.model; + +import org.junit.jupiter.api.Test; + +/** Model tests for AnswerContent */ +public class AnswerContentTest { + private final AnswerContent model = new AnswerContent(); + + /** Model tests for AnswerContent */ + @Test + public void testAnswerContent() { + // TODO: test AnswerContent + } + + /** Test the property 'availableDataRowCount' */ + @Test + public void availableDataRowCountTest() { + // TODO: test availableDataRowCount + } + + /** Test the property 'columnNames' */ + @Test + public void columnNamesTest() { + // TODO: test columnNames + } + + /** Test the property 'dataRows' */ + @Test + public void dataRowsTest() { + // TODO: test dataRows + } + + /** Test the property 'recordOffset' */ + @Test + public void recordOffsetTest() { + // TODO: test recordOffset + } + + /** Test the property 'recordSize' */ + @Test + public void recordSizeTest() { + // TODO: test recordSize + } + + /** Test the property 'returnedDataRowCount' */ + @Test + public void returnedDataRowCountTest() { + // TODO: test returnedDataRowCount + } + + /** Test the property 'samplingRatio' */ + @Test + public void samplingRatioTest() { + // TODO: test samplingRatio + } +} diff --git a/sdks/java/src/test/java/com/thoughtspot/client/model/AnswerDataResponseTest.java b/sdks/java/src/test/java/com/thoughtspot/client/model/AnswerDataResponseTest.java new file mode 100644 index 000000000..979133b9d --- /dev/null +++ b/sdks/java/src/test/java/com/thoughtspot/client/model/AnswerDataResponseTest.java @@ -0,0 +1,36 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client.model; + +import org.junit.jupiter.api.Test; + +/** Model tests for AnswerDataResponse */ +public class AnswerDataResponseTest { + private final AnswerDataResponse model = new AnswerDataResponse(); + + /** Model tests for AnswerDataResponse */ + @Test + public void testAnswerDataResponse() { + // TODO: test AnswerDataResponse + } + + /** Test the property 'metadataId' */ + @Test + public void metadataIdTest() { + // TODO: test metadataId + } + + /** Test the property 'metadataName' */ + @Test + public void metadataNameTest() { + // TODO: test metadataName + } + + /** Test the property 'contents' */ + @Test + public void contentsTest() { + // TODO: test contents + } +} diff --git a/sdks/java/src/test/java/com/thoughtspot/client/model/AnswerPngOptionsInputTest.java b/sdks/java/src/test/java/com/thoughtspot/client/model/AnswerPngOptionsInputTest.java new file mode 100644 index 000000000..a8094b371 --- /dev/null +++ b/sdks/java/src/test/java/com/thoughtspot/client/model/AnswerPngOptionsInputTest.java @@ -0,0 +1,36 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client.model; + +import org.junit.jupiter.api.Test; + +/** Model tests for AnswerPngOptionsInput */ +public class AnswerPngOptionsInputTest { + private final AnswerPngOptionsInput model = new AnswerPngOptionsInput(); + + /** Model tests for AnswerPngOptionsInput */ + @Test + public void testAnswerPngOptionsInput() { + // TODO: test AnswerPngOptionsInput + } + + /** Test the property 'xResolution' */ + @Test + public void xResolutionTest() { + // TODO: test xResolution + } + + /** Test the property 'yResolution' */ + @Test + public void yResolutionTest() { + // TODO: test yResolution + } + + /** Test the property 'scaling' */ + @Test + public void scalingTest() { + // TODO: test scaling + } +} diff --git a/sdks/java/src/test/java/com/thoughtspot/client/model/AssignChangeAuthorRequestTest.java b/sdks/java/src/test/java/com/thoughtspot/client/model/AssignChangeAuthorRequestTest.java new file mode 100644 index 000000000..ec7f6a722 --- /dev/null +++ b/sdks/java/src/test/java/com/thoughtspot/client/model/AssignChangeAuthorRequestTest.java @@ -0,0 +1,36 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client.model; + +import org.junit.jupiter.api.Test; + +/** Model tests for AssignChangeAuthorRequest */ +public class AssignChangeAuthorRequestTest { + private final AssignChangeAuthorRequest model = new AssignChangeAuthorRequest(); + + /** Model tests for AssignChangeAuthorRequest */ + @Test + public void testAssignChangeAuthorRequest() { + // TODO: test AssignChangeAuthorRequest + } + + /** Test the property 'metadata' */ + @Test + public void metadataTest() { + // TODO: test metadata + } + + /** Test the property 'userIdentifier' */ + @Test + public void userIdentifierTest() { + // TODO: test userIdentifier + } + + /** Test the property 'currentOwnerIdentifier' */ + @Test + public void currentOwnerIdentifierTest() { + // TODO: test currentOwnerIdentifier + } +} diff --git a/sdks/java/src/test/java/com/thoughtspot/client/model/AssignTagRequestTest.java b/sdks/java/src/test/java/com/thoughtspot/client/model/AssignTagRequestTest.java new file mode 100644 index 000000000..678e2f46f --- /dev/null +++ b/sdks/java/src/test/java/com/thoughtspot/client/model/AssignTagRequestTest.java @@ -0,0 +1,30 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client.model; + +import org.junit.jupiter.api.Test; + +/** Model tests for AssignTagRequest */ +public class AssignTagRequestTest { + private final AssignTagRequest model = new AssignTagRequest(); + + /** Model tests for AssignTagRequest */ + @Test + public void testAssignTagRequest() { + // TODO: test AssignTagRequest + } + + /** Test the property 'metadata' */ + @Test + public void metadataTest() { + // TODO: test metadata + } + + /** Test the property 'tagIdentifiers' */ + @Test + public void tagIdentifiersTest() { + // TODO: test tagIdentifiers + } +} diff --git a/sdks/java/src/test/java/com/thoughtspot/client/model/AssociateMetadataInputCreateTest.java b/sdks/java/src/test/java/com/thoughtspot/client/model/AssociateMetadataInputCreateTest.java new file mode 100644 index 000000000..647512716 --- /dev/null +++ b/sdks/java/src/test/java/com/thoughtspot/client/model/AssociateMetadataInputCreateTest.java @@ -0,0 +1,36 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client.model; + +import org.junit.jupiter.api.Test; + +/** Model tests for AssociateMetadataInputCreate */ +public class AssociateMetadataInputCreateTest { + private final AssociateMetadataInputCreate model = new AssociateMetadataInputCreate(); + + /** Model tests for AssociateMetadataInputCreate */ + @Test + public void testAssociateMetadataInputCreate() { + // TODO: test AssociateMetadataInputCreate + } + + /** Test the property 'actionConfig' */ + @Test + public void actionConfigTest() { + // TODO: test actionConfig + } + + /** Test the property 'identifier' */ + @Test + public void identifierTest() { + // TODO: test identifier + } + + /** Test the property 'type' */ + @Test + public void typeTest() { + // TODO: test type + } +} diff --git a/sdks/java/src/test/java/com/thoughtspot/client/model/AssociateMetadataInputTest.java b/sdks/java/src/test/java/com/thoughtspot/client/model/AssociateMetadataInputTest.java new file mode 100644 index 000000000..c55d611c6 --- /dev/null +++ b/sdks/java/src/test/java/com/thoughtspot/client/model/AssociateMetadataInputTest.java @@ -0,0 +1,36 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client.model; + +import org.junit.jupiter.api.Test; + +/** Model tests for AssociateMetadataInput */ +public class AssociateMetadataInputTest { + private final AssociateMetadataInput model = new AssociateMetadataInput(); + + /** Model tests for AssociateMetadataInput */ + @Test + public void testAssociateMetadataInput() { + // TODO: test AssociateMetadataInput + } + + /** Test the property 'actionConfig' */ + @Test + public void actionConfigTest() { + // TODO: test actionConfig + } + + /** Test the property 'identifier' */ + @Test + public void identifierTest() { + // TODO: test identifier + } + + /** Test the property 'type' */ + @Test + public void typeTest() { + // TODO: test type + } +} diff --git a/sdks/java/src/test/java/com/thoughtspot/client/model/AuthClusterPreferencesInputTest.java b/sdks/java/src/test/java/com/thoughtspot/client/model/AuthClusterPreferencesInputTest.java new file mode 100644 index 000000000..cb9e0625c --- /dev/null +++ b/sdks/java/src/test/java/com/thoughtspot/client/model/AuthClusterPreferencesInputTest.java @@ -0,0 +1,24 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client.model; + +import org.junit.jupiter.api.Test; + +/** Model tests for AuthClusterPreferencesInput */ +public class AuthClusterPreferencesInputTest { + private final AuthClusterPreferencesInput model = new AuthClusterPreferencesInput(); + + /** Model tests for AuthClusterPreferencesInput */ + @Test + public void testAuthClusterPreferencesInput() { + // TODO: test AuthClusterPreferencesInput + } + + /** Test the property 'authStatus' */ + @Test + public void authStatusTest() { + // TODO: test authStatus + } +} diff --git a/sdks/java/src/test/java/com/thoughtspot/client/model/AuthClusterPreferencesTest.java b/sdks/java/src/test/java/com/thoughtspot/client/model/AuthClusterPreferencesTest.java new file mode 100644 index 000000000..3e6189b35 --- /dev/null +++ b/sdks/java/src/test/java/com/thoughtspot/client/model/AuthClusterPreferencesTest.java @@ -0,0 +1,30 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client.model; + +import org.junit.jupiter.api.Test; + +/** Model tests for AuthClusterPreferences */ +public class AuthClusterPreferencesTest { + private final AuthClusterPreferences model = new AuthClusterPreferences(); + + /** Model tests for AuthClusterPreferences */ + @Test + public void testAuthClusterPreferences() { + // TODO: test AuthClusterPreferences + } + + /** Test the property 'authStatus' */ + @Test + public void authStatusTest() { + // TODO: test authStatus + } + + /** Test the property 'accessTokens' */ + @Test + public void accessTokensTest() { + // TODO: test accessTokens + } +} diff --git a/sdks/java/src/test/java/com/thoughtspot/client/model/AuthOrgInfoTest.java b/sdks/java/src/test/java/com/thoughtspot/client/model/AuthOrgInfoTest.java new file mode 100644 index 000000000..45b295937 --- /dev/null +++ b/sdks/java/src/test/java/com/thoughtspot/client/model/AuthOrgInfoTest.java @@ -0,0 +1,30 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client.model; + +import org.junit.jupiter.api.Test; + +/** Model tests for AuthOrgInfo */ +public class AuthOrgInfoTest { + private final AuthOrgInfo model = new AuthOrgInfo(); + + /** Model tests for AuthOrgInfo */ + @Test + public void testAuthOrgInfo() { + // TODO: test AuthOrgInfo + } + + /** Test the property 'id' */ + @Test + public void idTest() { + // TODO: test id + } + + /** Test the property 'name' */ + @Test + public void nameTest() { + // TODO: test name + } +} diff --git a/sdks/java/src/test/java/com/thoughtspot/client/model/AuthOrgPreferenceInputTest.java b/sdks/java/src/test/java/com/thoughtspot/client/model/AuthOrgPreferenceInputTest.java new file mode 100644 index 000000000..3b5950a5d --- /dev/null +++ b/sdks/java/src/test/java/com/thoughtspot/client/model/AuthOrgPreferenceInputTest.java @@ -0,0 +1,30 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client.model; + +import org.junit.jupiter.api.Test; + +/** Model tests for AuthOrgPreferenceInput */ +public class AuthOrgPreferenceInputTest { + private final AuthOrgPreferenceInput model = new AuthOrgPreferenceInput(); + + /** Model tests for AuthOrgPreferenceInput */ + @Test + public void testAuthOrgPreferenceInput() { + // TODO: test AuthOrgPreferenceInput + } + + /** Test the property 'orgIdentifier' */ + @Test + public void orgIdentifierTest() { + // TODO: test orgIdentifier + } + + /** Test the property 'authStatus' */ + @Test + public void authStatusTest() { + // TODO: test authStatus + } +} diff --git a/sdks/java/src/test/java/com/thoughtspot/client/model/AuthOrgPreferenceTest.java b/sdks/java/src/test/java/com/thoughtspot/client/model/AuthOrgPreferenceTest.java new file mode 100644 index 000000000..7afa4f822 --- /dev/null +++ b/sdks/java/src/test/java/com/thoughtspot/client/model/AuthOrgPreferenceTest.java @@ -0,0 +1,36 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client.model; + +import org.junit.jupiter.api.Test; + +/** Model tests for AuthOrgPreference */ +public class AuthOrgPreferenceTest { + private final AuthOrgPreference model = new AuthOrgPreference(); + + /** Model tests for AuthOrgPreference */ + @Test + public void testAuthOrgPreference() { + // TODO: test AuthOrgPreference + } + + /** Test the property 'org' */ + @Test + public void orgTest() { + // TODO: test org + } + + /** Test the property 'authStatus' */ + @Test + public void authStatusTest() { + // TODO: test authStatus + } + + /** Test the property 'accessTokens' */ + @Test + public void accessTokensTest() { + // TODO: test accessTokens + } +} diff --git a/sdks/java/src/test/java/com/thoughtspot/client/model/AuthSettingsAccessTokenTest.java b/sdks/java/src/test/java/com/thoughtspot/client/model/AuthSettingsAccessTokenTest.java new file mode 100644 index 000000000..1d39c66bd --- /dev/null +++ b/sdks/java/src/test/java/com/thoughtspot/client/model/AuthSettingsAccessTokenTest.java @@ -0,0 +1,24 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client.model; + +import org.junit.jupiter.api.Test; + +/** Model tests for AuthSettingsAccessToken */ +public class AuthSettingsAccessTokenTest { + private final AuthSettingsAccessToken model = new AuthSettingsAccessToken(); + + /** Model tests for AuthSettingsAccessToken */ + @Test + public void testAuthSettingsAccessToken() { + // TODO: test AuthSettingsAccessToken + } + + /** Test the property 'key' */ + @Test + public void keyTest() { + // TODO: test key + } +} diff --git a/sdks/java/src/test/java/com/thoughtspot/client/model/AuthenticationInputTest.java b/sdks/java/src/test/java/com/thoughtspot/client/model/AuthenticationInputTest.java new file mode 100644 index 000000000..23f4bb251 --- /dev/null +++ b/sdks/java/src/test/java/com/thoughtspot/client/model/AuthenticationInputTest.java @@ -0,0 +1,42 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client.model; + +import org.junit.jupiter.api.Test; + +/** Model tests for AuthenticationInput */ +public class AuthenticationInputTest { + private final AuthenticationInput model = new AuthenticationInput(); + + /** Model tests for AuthenticationInput */ + @Test + public void testAuthenticationInput() { + // TODO: test AuthenticationInput + } + + /** Test the property 'apIKey' */ + @Test + public void apIKeyTest() { + // TODO: test apIKey + } + + /** Test the property 'basicAuth' */ + @Test + public void basicAuthTest() { + // TODO: test basicAuth + } + + /** Test the property 'bearerToken' */ + @Test + public void bearerTokenTest() { + // TODO: test bearerToken + } + + /** Test the property 'noAuth' */ + @Test + public void noAuthTest() { + // TODO: test noAuth + } +} diff --git a/sdks/java/src/test/java/com/thoughtspot/client/model/AuthenticationTest.java b/sdks/java/src/test/java/com/thoughtspot/client/model/AuthenticationTest.java new file mode 100644 index 000000000..e84b3f56d --- /dev/null +++ b/sdks/java/src/test/java/com/thoughtspot/client/model/AuthenticationTest.java @@ -0,0 +1,42 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client.model; + +import org.junit.jupiter.api.Test; + +/** Model tests for Authentication */ +public class AuthenticationTest { + private final Authentication model = new Authentication(); + + /** Model tests for Authentication */ + @Test + public void testAuthentication() { + // TODO: test Authentication + } + + /** Test the property 'apIKey' */ + @Test + public void apIKeyTest() { + // TODO: test apIKey + } + + /** Test the property 'basicAuth' */ + @Test + public void basicAuthTest() { + // TODO: test basicAuth + } + + /** Test the property 'bearerToken' */ + @Test + public void bearerTokenTest() { + // TODO: test bearerToken + } + + /** Test the property 'noAuth' */ + @Test + public void noAuthTest() { + // TODO: test noAuth + } +} diff --git a/sdks/java/src/test/java/com/thoughtspot/client/model/AuthorMetadataTypeInputTest.java b/sdks/java/src/test/java/com/thoughtspot/client/model/AuthorMetadataTypeInputTest.java new file mode 100644 index 000000000..bc936bf54 --- /dev/null +++ b/sdks/java/src/test/java/com/thoughtspot/client/model/AuthorMetadataTypeInputTest.java @@ -0,0 +1,30 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client.model; + +import org.junit.jupiter.api.Test; + +/** Model tests for AuthorMetadataTypeInput */ +public class AuthorMetadataTypeInputTest { + private final AuthorMetadataTypeInput model = new AuthorMetadataTypeInput(); + + /** Model tests for AuthorMetadataTypeInput */ + @Test + public void testAuthorMetadataTypeInput() { + // TODO: test AuthorMetadataTypeInput + } + + /** Test the property 'type' */ + @Test + public void typeTest() { + // TODO: test type + } + + /** Test the property 'identifier' */ + @Test + public void identifierTest() { + // TODO: test identifier + } +} diff --git a/sdks/java/src/test/java/com/thoughtspot/client/model/AuthorTest.java b/sdks/java/src/test/java/com/thoughtspot/client/model/AuthorTest.java new file mode 100644 index 000000000..3ed91ca5f --- /dev/null +++ b/sdks/java/src/test/java/com/thoughtspot/client/model/AuthorTest.java @@ -0,0 +1,30 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client.model; + +import org.junit.jupiter.api.Test; + +/** Model tests for Author */ +public class AuthorTest { + private final Author model = new Author(); + + /** Model tests for Author */ + @Test + public void testAuthor() { + // TODO: test Author + } + + /** Test the property 'id' */ + @Test + public void idTest() { + // TODO: test id + } + + /** Test the property 'name' */ + @Test + public void nameTest() { + // TODO: test name + } +} diff --git a/sdks/java/src/test/java/com/thoughtspot/client/model/AuthorTypeTest.java b/sdks/java/src/test/java/com/thoughtspot/client/model/AuthorTypeTest.java new file mode 100644 index 000000000..c0e1d74d3 --- /dev/null +++ b/sdks/java/src/test/java/com/thoughtspot/client/model/AuthorTypeTest.java @@ -0,0 +1,30 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client.model; + +import org.junit.jupiter.api.Test; + +/** Model tests for AuthorType */ +public class AuthorTypeTest { + private final AuthorType model = new AuthorType(); + + /** Model tests for AuthorType */ + @Test + public void testAuthorType() { + // TODO: test AuthorType + } + + /** Test the property 'email' */ + @Test + public void emailTest() { + // TODO: test email + } + + /** Test the property 'username' */ + @Test + public void usernameTest() { + // TODO: test username + } +} diff --git a/sdks/java/src/test/java/com/thoughtspot/client/model/AwsS3ConfigInputTest.java b/sdks/java/src/test/java/com/thoughtspot/client/model/AwsS3ConfigInputTest.java new file mode 100644 index 000000000..aa00a69cb --- /dev/null +++ b/sdks/java/src/test/java/com/thoughtspot/client/model/AwsS3ConfigInputTest.java @@ -0,0 +1,48 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client.model; + +import org.junit.jupiter.api.Test; + +/** Model tests for AwsS3ConfigInput */ +public class AwsS3ConfigInputTest { + private final AwsS3ConfigInput model = new AwsS3ConfigInput(); + + /** Model tests for AwsS3ConfigInput */ + @Test + public void testAwsS3ConfigInput() { + // TODO: test AwsS3ConfigInput + } + + /** Test the property 'bucketName' */ + @Test + public void bucketNameTest() { + // TODO: test bucketName + } + + /** Test the property 'region' */ + @Test + public void regionTest() { + // TODO: test region + } + + /** Test the property 'roleArn' */ + @Test + public void roleArnTest() { + // TODO: test roleArn + } + + /** Test the property 'externalId' */ + @Test + public void externalIdTest() { + // TODO: test externalId + } + + /** Test the property 'pathPrefix' */ + @Test + public void pathPrefixTest() { + // TODO: test pathPrefix + } +} diff --git a/sdks/java/src/test/java/com/thoughtspot/client/model/AwsS3ConfigTest.java b/sdks/java/src/test/java/com/thoughtspot/client/model/AwsS3ConfigTest.java new file mode 100644 index 000000000..ad5ad767c --- /dev/null +++ b/sdks/java/src/test/java/com/thoughtspot/client/model/AwsS3ConfigTest.java @@ -0,0 +1,48 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client.model; + +import org.junit.jupiter.api.Test; + +/** Model tests for AwsS3Config */ +public class AwsS3ConfigTest { + private final AwsS3Config model = new AwsS3Config(); + + /** Model tests for AwsS3Config */ + @Test + public void testAwsS3Config() { + // TODO: test AwsS3Config + } + + /** Test the property 'bucketName' */ + @Test + public void bucketNameTest() { + // TODO: test bucketName + } + + /** Test the property 'region' */ + @Test + public void regionTest() { + // TODO: test region + } + + /** Test the property 'roleArn' */ + @Test + public void roleArnTest() { + // TODO: test roleArn + } + + /** Test the property 'externalId' */ + @Test + public void externalIdTest() { + // TODO: test externalId + } + + /** Test the property 'pathPrefix' */ + @Test + public void pathPrefixTest() { + // TODO: test pathPrefix + } +} diff --git a/sdks/java/src/test/java/com/thoughtspot/client/model/BasicAuthInputTest.java b/sdks/java/src/test/java/com/thoughtspot/client/model/BasicAuthInputTest.java new file mode 100644 index 000000000..f50864339 --- /dev/null +++ b/sdks/java/src/test/java/com/thoughtspot/client/model/BasicAuthInputTest.java @@ -0,0 +1,30 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client.model; + +import org.junit.jupiter.api.Test; + +/** Model tests for BasicAuthInput */ +public class BasicAuthInputTest { + private final BasicAuthInput model = new BasicAuthInput(); + + /** Model tests for BasicAuthInput */ + @Test + public void testBasicAuthInput() { + // TODO: test BasicAuthInput + } + + /** Test the property 'password' */ + @Test + public void passwordTest() { + // TODO: test password + } + + /** Test the property 'username' */ + @Test + public void usernameTest() { + // TODO: test username + } +} diff --git a/sdks/java/src/test/java/com/thoughtspot/client/model/BasicAuthTest.java b/sdks/java/src/test/java/com/thoughtspot/client/model/BasicAuthTest.java new file mode 100644 index 000000000..0fa5a390c --- /dev/null +++ b/sdks/java/src/test/java/com/thoughtspot/client/model/BasicAuthTest.java @@ -0,0 +1,30 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client.model; + +import org.junit.jupiter.api.Test; + +/** Model tests for BasicAuth */ +public class BasicAuthTest { + private final BasicAuth model = new BasicAuth(); + + /** Model tests for BasicAuth */ + @Test + public void testBasicAuth() { + // TODO: test BasicAuth + } + + /** Test the property 'password' */ + @Test + public void passwordTest() { + // TODO: test password + } + + /** Test the property 'username' */ + @Test + public void usernameTest() { + // TODO: test username + } +} diff --git a/sdks/java/src/test/java/com/thoughtspot/client/model/CALLBACKInputMandatoryTest.java b/sdks/java/src/test/java/com/thoughtspot/client/model/CALLBACKInputMandatoryTest.java new file mode 100644 index 000000000..941a5379e --- /dev/null +++ b/sdks/java/src/test/java/com/thoughtspot/client/model/CALLBACKInputMandatoryTest.java @@ -0,0 +1,24 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client.model; + +import org.junit.jupiter.api.Test; + +/** Model tests for CALLBACKInputMandatory */ +public class CALLBACKInputMandatoryTest { + private final CALLBACKInputMandatory model = new CALLBACKInputMandatory(); + + /** Model tests for CALLBACKInputMandatory */ + @Test + public void testCALLBACKInputMandatory() { + // TODO: test CALLBACKInputMandatory + } + + /** Test the property 'reference' */ + @Test + public void referenceTest() { + // TODO: test reference + } +} diff --git a/sdks/java/src/test/java/com/thoughtspot/client/model/CALLBACKInputTest.java b/sdks/java/src/test/java/com/thoughtspot/client/model/CALLBACKInputTest.java new file mode 100644 index 000000000..03b57974b --- /dev/null +++ b/sdks/java/src/test/java/com/thoughtspot/client/model/CALLBACKInputTest.java @@ -0,0 +1,24 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client.model; + +import org.junit.jupiter.api.Test; + +/** Model tests for CALLBACKInput */ +public class CALLBACKInputTest { + private final CALLBACKInput model = new CALLBACKInput(); + + /** Model tests for CALLBACKInput */ + @Test + public void testCALLBACKInput() { + // TODO: test CALLBACKInput + } + + /** Test the property 'reference' */ + @Test + public void referenceTest() { + // TODO: test reference + } +} diff --git a/sdks/java/src/test/java/com/thoughtspot/client/model/CALLBACKTest.java b/sdks/java/src/test/java/com/thoughtspot/client/model/CALLBACKTest.java new file mode 100644 index 000000000..7f0071acc --- /dev/null +++ b/sdks/java/src/test/java/com/thoughtspot/client/model/CALLBACKTest.java @@ -0,0 +1,24 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client.model; + +import org.junit.jupiter.api.Test; + +/** Model tests for CALLBACK */ +public class CALLBACKTest { + private final CALLBACK model = new CALLBACK(); + + /** Model tests for CALLBACK */ + @Test + public void testCALLBACK() { + // TODO: test CALLBACK + } + + /** Test the property 'reference' */ + @Test + public void referenceTest() { + // TODO: test reference + } +} diff --git a/sdks/java/src/test/java/com/thoughtspot/client/model/CalendarResponseTest.java b/sdks/java/src/test/java/com/thoughtspot/client/model/CalendarResponseTest.java new file mode 100644 index 000000000..3b96fbf22 --- /dev/null +++ b/sdks/java/src/test/java/com/thoughtspot/client/model/CalendarResponseTest.java @@ -0,0 +1,60 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client.model; + +import org.junit.jupiter.api.Test; + +/** Model tests for CalendarResponse */ +public class CalendarResponseTest { + private final CalendarResponse model = new CalendarResponse(); + + /** Model tests for CalendarResponse */ + @Test + public void testCalendarResponse() { + // TODO: test CalendarResponse + } + + /** Test the property 'calendarName' */ + @Test + public void calendarNameTest() { + // TODO: test calendarName + } + + /** Test the property 'connectionName' */ + @Test + public void connectionNameTest() { + // TODO: test connectionName + } + + /** Test the property 'dataWarehouseType' */ + @Test + public void dataWarehouseTypeTest() { + // TODO: test dataWarehouseType + } + + /** Test the property 'modificationTimeInMillis' */ + @Test + public void modificationTimeInMillisTest() { + // TODO: test modificationTimeInMillis + } + + /** Test the property 'authorName' */ + @Test + public void authorNameTest() { + // TODO: test authorName + } + + /** Test the property 'connectionId' */ + @Test + public void connectionIdTest() { + // TODO: test connectionId + } + + /** Test the property 'calendarId' */ + @Test + public void calendarIdTest() { + // TODO: test calendarId + } +} diff --git a/sdks/java/src/test/java/com/thoughtspot/client/model/ChangeUserPasswordRequestTest.java b/sdks/java/src/test/java/com/thoughtspot/client/model/ChangeUserPasswordRequestTest.java new file mode 100644 index 000000000..8609b6a35 --- /dev/null +++ b/sdks/java/src/test/java/com/thoughtspot/client/model/ChangeUserPasswordRequestTest.java @@ -0,0 +1,36 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client.model; + +import org.junit.jupiter.api.Test; + +/** Model tests for ChangeUserPasswordRequest */ +public class ChangeUserPasswordRequestTest { + private final ChangeUserPasswordRequest model = new ChangeUserPasswordRequest(); + + /** Model tests for ChangeUserPasswordRequest */ + @Test + public void testChangeUserPasswordRequest() { + // TODO: test ChangeUserPasswordRequest + } + + /** Test the property 'currentPassword' */ + @Test + public void currentPasswordTest() { + // TODO: test currentPassword + } + + /** Test the property 'newPassword' */ + @Test + public void newPasswordTest() { + // TODO: test newPassword + } + + /** Test the property 'userIdentifier' */ + @Test + public void userIdentifierTest() { + // TODO: test userIdentifier + } +} diff --git a/sdks/java/src/test/java/com/thoughtspot/client/model/ChannelHistoryEventInfoTest.java b/sdks/java/src/test/java/com/thoughtspot/client/model/ChannelHistoryEventInfoTest.java new file mode 100644 index 000000000..2bfd0fbe4 --- /dev/null +++ b/sdks/java/src/test/java/com/thoughtspot/client/model/ChannelHistoryEventInfoTest.java @@ -0,0 +1,42 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client.model; + +import org.junit.jupiter.api.Test; + +/** Model tests for ChannelHistoryEventInfo */ +public class ChannelHistoryEventInfoTest { + private final ChannelHistoryEventInfo model = new ChannelHistoryEventInfo(); + + /** Model tests for ChannelHistoryEventInfo */ + @Test + public void testChannelHistoryEventInfo() { + // TODO: test ChannelHistoryEventInfo + } + + /** Test the property 'type' */ + @Test + public void typeTest() { + // TODO: test type + } + + /** Test the property 'id' */ + @Test + public void idTest() { + // TODO: test id + } + + /** Test the property 'name' */ + @Test + public void nameTest() { + // TODO: test name + } + + /** Test the property 'runId' */ + @Test + public void runIdTest() { + // TODO: test runId + } +} diff --git a/sdks/java/src/test/java/com/thoughtspot/client/model/ChannelHistoryEventInputTest.java b/sdks/java/src/test/java/com/thoughtspot/client/model/ChannelHistoryEventInputTest.java new file mode 100644 index 000000000..16a9281b2 --- /dev/null +++ b/sdks/java/src/test/java/com/thoughtspot/client/model/ChannelHistoryEventInputTest.java @@ -0,0 +1,30 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client.model; + +import org.junit.jupiter.api.Test; + +/** Model tests for ChannelHistoryEventInput */ +public class ChannelHistoryEventInputTest { + private final ChannelHistoryEventInput model = new ChannelHistoryEventInput(); + + /** Model tests for ChannelHistoryEventInput */ + @Test + public void testChannelHistoryEventInput() { + // TODO: test ChannelHistoryEventInput + } + + /** Test the property 'type' */ + @Test + public void typeTest() { + // TODO: test type + } + + /** Test the property 'identifier' */ + @Test + public void identifierTest() { + // TODO: test identifier + } +} diff --git a/sdks/java/src/test/java/com/thoughtspot/client/model/ChannelHistoryJobTest.java b/sdks/java/src/test/java/com/thoughtspot/client/model/ChannelHistoryJobTest.java new file mode 100644 index 000000000..246bc22c3 --- /dev/null +++ b/sdks/java/src/test/java/com/thoughtspot/client/model/ChannelHistoryJobTest.java @@ -0,0 +1,60 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client.model; + +import org.junit.jupiter.api.Test; + +/** Model tests for ChannelHistoryJob */ +public class ChannelHistoryJobTest { + private final ChannelHistoryJob model = new ChannelHistoryJob(); + + /** Model tests for ChannelHistoryJob */ + @Test + public void testChannelHistoryJob() { + // TODO: test ChannelHistoryJob + } + + /** Test the property 'id' */ + @Test + public void idTest() { + // TODO: test id + } + + /** Test the property 'status' */ + @Test + public void statusTest() { + // TODO: test status + } + + /** Test the property 'creationTimeInMillis' */ + @Test + public void creationTimeInMillisTest() { + // TODO: test creationTimeInMillis + } + + /** Test the property 'event' */ + @Test + public void eventTest() { + // TODO: test event + } + + /** Test the property 'recipients' */ + @Test + public void recipientsTest() { + // TODO: test recipients + } + + /** Test the property 'detail' */ + @Test + public void detailTest() { + // TODO: test detail + } + + /** Test the property 'tryCount' */ + @Test + public void tryCountTest() { + // TODO: test tryCount + } +} diff --git a/sdks/java/src/test/java/com/thoughtspot/client/model/ChannelValidationAwsS3InfoTest.java b/sdks/java/src/test/java/com/thoughtspot/client/model/ChannelValidationAwsS3InfoTest.java new file mode 100644 index 000000000..615dbcf57 --- /dev/null +++ b/sdks/java/src/test/java/com/thoughtspot/client/model/ChannelValidationAwsS3InfoTest.java @@ -0,0 +1,36 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client.model; + +import org.junit.jupiter.api.Test; + +/** Model tests for ChannelValidationAwsS3Info */ +public class ChannelValidationAwsS3InfoTest { + private final ChannelValidationAwsS3Info model = new ChannelValidationAwsS3Info(); + + /** Model tests for ChannelValidationAwsS3Info */ + @Test + public void testChannelValidationAwsS3Info() { + // TODO: test ChannelValidationAwsS3Info + } + + /** Test the property 'bucketName' */ + @Test + public void bucketNameTest() { + // TODO: test bucketName + } + + /** Test the property 'fileName' */ + @Test + public void fileNameTest() { + // TODO: test fileName + } + + /** Test the property 'objectKey' */ + @Test + public void objectKeyTest() { + // TODO: test objectKey + } +} diff --git a/sdks/java/src/test/java/com/thoughtspot/client/model/ChannelValidationDetailTest.java b/sdks/java/src/test/java/com/thoughtspot/client/model/ChannelValidationDetailTest.java new file mode 100644 index 000000000..57ddd5d10 --- /dev/null +++ b/sdks/java/src/test/java/com/thoughtspot/client/model/ChannelValidationDetailTest.java @@ -0,0 +1,48 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client.model; + +import org.junit.jupiter.api.Test; + +/** Model tests for ChannelValidationDetail */ +public class ChannelValidationDetailTest { + private final ChannelValidationDetail model = new ChannelValidationDetail(); + + /** Model tests for ChannelValidationDetail */ + @Test + public void testChannelValidationDetail() { + // TODO: test ChannelValidationDetail + } + + /** Test the property 'validationStep' */ + @Test + public void validationStepTest() { + // TODO: test validationStep + } + + /** Test the property 'status' */ + @Test + public void statusTest() { + // TODO: test status + } + + /** Test the property 'httpStatus' */ + @Test + public void httpStatusTest() { + // TODO: test httpStatus + } + + /** Test the property 'errorMessage' */ + @Test + public void errorMessageTest() { + // TODO: test errorMessage + } + + /** Test the property 'awsS3Info' */ + @Test + public void awsS3InfoTest() { + // TODO: test awsS3Info + } +} diff --git a/sdks/java/src/test/java/com/thoughtspot/client/model/ClusterNonEmbedAccessInputTest.java b/sdks/java/src/test/java/com/thoughtspot/client/model/ClusterNonEmbedAccessInputTest.java new file mode 100644 index 000000000..886090930 --- /dev/null +++ b/sdks/java/src/test/java/com/thoughtspot/client/model/ClusterNonEmbedAccessInputTest.java @@ -0,0 +1,30 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client.model; + +import org.junit.jupiter.api.Test; + +/** Model tests for ClusterNonEmbedAccessInput */ +public class ClusterNonEmbedAccessInputTest { + private final ClusterNonEmbedAccessInput model = new ClusterNonEmbedAccessInput(); + + /** Model tests for ClusterNonEmbedAccessInput */ + @Test + public void testClusterNonEmbedAccessInput() { + // TODO: test ClusterNonEmbedAccessInput + } + + /** Test the property 'blockFullAppAccess' */ + @Test + public void blockFullAppAccessTest() { + // TODO: test blockFullAppAccess + } + + /** Test the property 'groupsIdentifiersWithAccess' */ + @Test + public void groupsIdentifiersWithAccessTest() { + // TODO: test groupsIdentifiersWithAccess + } +} diff --git a/sdks/java/src/test/java/com/thoughtspot/client/model/ClusterNonEmbedAccessTest.java b/sdks/java/src/test/java/com/thoughtspot/client/model/ClusterNonEmbedAccessTest.java new file mode 100644 index 000000000..5b7169a3b --- /dev/null +++ b/sdks/java/src/test/java/com/thoughtspot/client/model/ClusterNonEmbedAccessTest.java @@ -0,0 +1,30 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client.model; + +import org.junit.jupiter.api.Test; + +/** Model tests for ClusterNonEmbedAccess */ +public class ClusterNonEmbedAccessTest { + private final ClusterNonEmbedAccess model = new ClusterNonEmbedAccess(); + + /** Model tests for ClusterNonEmbedAccess */ + @Test + public void testClusterNonEmbedAccess() { + // TODO: test ClusterNonEmbedAccess + } + + /** Test the property 'blockFullAppAccess' */ + @Test + public void blockFullAppAccessTest() { + // TODO: test blockFullAppAccess + } + + /** Test the property 'groupsWithAccess' */ + @Test + public void groupsWithAccessTest() { + // TODO: test groupsWithAccess + } +} diff --git a/sdks/java/src/test/java/com/thoughtspot/client/model/CollectionDeleteResponseTest.java b/sdks/java/src/test/java/com/thoughtspot/client/model/CollectionDeleteResponseTest.java new file mode 100644 index 000000000..620c9e484 --- /dev/null +++ b/sdks/java/src/test/java/com/thoughtspot/client/model/CollectionDeleteResponseTest.java @@ -0,0 +1,30 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client.model; + +import org.junit.jupiter.api.Test; + +/** Model tests for CollectionDeleteResponse */ +public class CollectionDeleteResponseTest { + private final CollectionDeleteResponse model = new CollectionDeleteResponse(); + + /** Model tests for CollectionDeleteResponse */ + @Test + public void testCollectionDeleteResponse() { + // TODO: test CollectionDeleteResponse + } + + /** Test the property 'metadataDeleted' */ + @Test + public void metadataDeletedTest() { + // TODO: test metadataDeleted + } + + /** Test the property 'metadataSkipped' */ + @Test + public void metadataSkippedTest() { + // TODO: test metadataSkipped + } +} diff --git a/sdks/java/src/test/java/com/thoughtspot/client/model/CollectionDeleteTypeIdentifiersTest.java b/sdks/java/src/test/java/com/thoughtspot/client/model/CollectionDeleteTypeIdentifiersTest.java new file mode 100644 index 000000000..e615a94f6 --- /dev/null +++ b/sdks/java/src/test/java/com/thoughtspot/client/model/CollectionDeleteTypeIdentifiersTest.java @@ -0,0 +1,30 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client.model; + +import org.junit.jupiter.api.Test; + +/** Model tests for CollectionDeleteTypeIdentifiers */ +public class CollectionDeleteTypeIdentifiersTest { + private final CollectionDeleteTypeIdentifiers model = new CollectionDeleteTypeIdentifiers(); + + /** Model tests for CollectionDeleteTypeIdentifiers */ + @Test + public void testCollectionDeleteTypeIdentifiers() { + // TODO: test CollectionDeleteTypeIdentifiers + } + + /** Test the property 'type' */ + @Test + public void typeTest() { + // TODO: test type + } + + /** Test the property 'identifiers' */ + @Test + public void identifiersTest() { + // TODO: test identifiers + } +} diff --git a/sdks/java/src/test/java/com/thoughtspot/client/model/CollectionEntityIdentifierTest.java b/sdks/java/src/test/java/com/thoughtspot/client/model/CollectionEntityIdentifierTest.java new file mode 100644 index 000000000..48660ba58 --- /dev/null +++ b/sdks/java/src/test/java/com/thoughtspot/client/model/CollectionEntityIdentifierTest.java @@ -0,0 +1,30 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client.model; + +import org.junit.jupiter.api.Test; + +/** Model tests for CollectionEntityIdentifier */ +public class CollectionEntityIdentifierTest { + private final CollectionEntityIdentifier model = new CollectionEntityIdentifier(); + + /** Model tests for CollectionEntityIdentifier */ + @Test + public void testCollectionEntityIdentifier() { + // TODO: test CollectionEntityIdentifier + } + + /** Test the property 'identifier' */ + @Test + public void identifierTest() { + // TODO: test identifier + } + + /** Test the property 'name' */ + @Test + public void nameTest() { + // TODO: test name + } +} diff --git a/sdks/java/src/test/java/com/thoughtspot/client/model/CollectionMetadataInputTest.java b/sdks/java/src/test/java/com/thoughtspot/client/model/CollectionMetadataInputTest.java new file mode 100644 index 000000000..dcbedca87 --- /dev/null +++ b/sdks/java/src/test/java/com/thoughtspot/client/model/CollectionMetadataInputTest.java @@ -0,0 +1,30 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client.model; + +import org.junit.jupiter.api.Test; + +/** Model tests for CollectionMetadataInput */ +public class CollectionMetadataInputTest { + private final CollectionMetadataInput model = new CollectionMetadataInput(); + + /** Model tests for CollectionMetadataInput */ + @Test + public void testCollectionMetadataInput() { + // TODO: test CollectionMetadataInput + } + + /** Test the property 'type' */ + @Test + public void typeTest() { + // TODO: test type + } + + /** Test the property 'identifiers' */ + @Test + public void identifiersTest() { + // TODO: test identifiers + } +} diff --git a/sdks/java/src/test/java/com/thoughtspot/client/model/CollectionMetadataItemTest.java b/sdks/java/src/test/java/com/thoughtspot/client/model/CollectionMetadataItemTest.java new file mode 100644 index 000000000..bed481270 --- /dev/null +++ b/sdks/java/src/test/java/com/thoughtspot/client/model/CollectionMetadataItemTest.java @@ -0,0 +1,30 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client.model; + +import org.junit.jupiter.api.Test; + +/** Model tests for CollectionMetadataItem */ +public class CollectionMetadataItemTest { + private final CollectionMetadataItem model = new CollectionMetadataItem(); + + /** Model tests for CollectionMetadataItem */ + @Test + public void testCollectionMetadataItem() { + // TODO: test CollectionMetadataItem + } + + /** Test the property 'type' */ + @Test + public void typeTest() { + // TODO: test type + } + + /** Test the property 'identifiers' */ + @Test + public void identifiersTest() { + // TODO: test identifiers + } +} diff --git a/sdks/java/src/test/java/com/thoughtspot/client/model/CollectionSearchResponseTest.java b/sdks/java/src/test/java/com/thoughtspot/client/model/CollectionSearchResponseTest.java new file mode 100644 index 000000000..396c0e310 --- /dev/null +++ b/sdks/java/src/test/java/com/thoughtspot/client/model/CollectionSearchResponseTest.java @@ -0,0 +1,48 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client.model; + +import org.junit.jupiter.api.Test; + +/** Model tests for CollectionSearchResponse */ +public class CollectionSearchResponseTest { + private final CollectionSearchResponse model = new CollectionSearchResponse(); + + /** Model tests for CollectionSearchResponse */ + @Test + public void testCollectionSearchResponse() { + // TODO: test CollectionSearchResponse + } + + /** Test the property 'collections' */ + @Test + public void collectionsTest() { + // TODO: test collections + } + + /** Test the property 'recordOffset' */ + @Test + public void recordOffsetTest() { + // TODO: test recordOffset + } + + /** Test the property 'recordSize' */ + @Test + public void recordSizeTest() { + // TODO: test recordSize + } + + /** Test the property 'isLastBatch' */ + @Test + public void isLastBatchTest() { + // TODO: test isLastBatch + } + + /** Test the property 'count' */ + @Test + public void countTest() { + // TODO: test count + } +} diff --git a/sdks/java/src/test/java/com/thoughtspot/client/model/CollectionTest.java b/sdks/java/src/test/java/com/thoughtspot/client/model/CollectionTest.java new file mode 100644 index 000000000..88b937f09 --- /dev/null +++ b/sdks/java/src/test/java/com/thoughtspot/client/model/CollectionTest.java @@ -0,0 +1,72 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client.model; + +import org.junit.jupiter.api.Test; + +/** Model tests for Collection */ +public class CollectionTest { + private final Collection model = new Collection(); + + /** Model tests for Collection */ + @Test + public void testCollection() { + // TODO: test Collection + } + + /** Test the property 'id' */ + @Test + public void idTest() { + // TODO: test id + } + + /** Test the property 'name' */ + @Test + public void nameTest() { + // TODO: test name + } + + /** Test the property 'description' */ + @Test + public void descriptionTest() { + // TODO: test description + } + + /** Test the property 'metadata' */ + @Test + public void metadataTest() { + // TODO: test metadata + } + + /** Test the property 'createdAt' */ + @Test + public void createdAtTest() { + // TODO: test createdAt + } + + /** Test the property 'updatedAt' */ + @Test + public void updatedAtTest() { + // TODO: test updatedAt + } + + /** Test the property 'authorName' */ + @Test + public void authorNameTest() { + // TODO: test authorName + } + + /** Test the property 'authorId' */ + @Test + public void authorIdTest() { + // TODO: test authorId + } + + /** Test the property 'org' */ + @Test + public void orgTest() { + // TODO: test org + } +} diff --git a/sdks/java/src/test/java/com/thoughtspot/client/model/ColumnSecurityRuleColumnTest.java b/sdks/java/src/test/java/com/thoughtspot/client/model/ColumnSecurityRuleColumnTest.java new file mode 100644 index 000000000..f1c66b528 --- /dev/null +++ b/sdks/java/src/test/java/com/thoughtspot/client/model/ColumnSecurityRuleColumnTest.java @@ -0,0 +1,30 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client.model; + +import org.junit.jupiter.api.Test; + +/** Model tests for ColumnSecurityRuleColumn */ +public class ColumnSecurityRuleColumnTest { + private final ColumnSecurityRuleColumn model = new ColumnSecurityRuleColumn(); + + /** Model tests for ColumnSecurityRuleColumn */ + @Test + public void testColumnSecurityRuleColumn() { + // TODO: test ColumnSecurityRuleColumn + } + + /** Test the property 'id' */ + @Test + public void idTest() { + // TODO: test id + } + + /** Test the property 'name' */ + @Test + public void nameTest() { + // TODO: test name + } +} diff --git a/sdks/java/src/test/java/com/thoughtspot/client/model/ColumnSecurityRuleGroupOperationTest.java b/sdks/java/src/test/java/com/thoughtspot/client/model/ColumnSecurityRuleGroupOperationTest.java new file mode 100644 index 000000000..4dc95df88 --- /dev/null +++ b/sdks/java/src/test/java/com/thoughtspot/client/model/ColumnSecurityRuleGroupOperationTest.java @@ -0,0 +1,30 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client.model; + +import org.junit.jupiter.api.Test; + +/** Model tests for ColumnSecurityRuleGroupOperation */ +public class ColumnSecurityRuleGroupOperationTest { + private final ColumnSecurityRuleGroupOperation model = new ColumnSecurityRuleGroupOperation(); + + /** Model tests for ColumnSecurityRuleGroupOperation */ + @Test + public void testColumnSecurityRuleGroupOperation() { + // TODO: test ColumnSecurityRuleGroupOperation + } + + /** Test the property 'operation' */ + @Test + public void operationTest() { + // TODO: test operation + } + + /** Test the property 'groupIdentifiers' */ + @Test + public void groupIdentifiersTest() { + // TODO: test groupIdentifiers + } +} diff --git a/sdks/java/src/test/java/com/thoughtspot/client/model/ColumnSecurityRuleGroupTest.java b/sdks/java/src/test/java/com/thoughtspot/client/model/ColumnSecurityRuleGroupTest.java new file mode 100644 index 000000000..930a225e3 --- /dev/null +++ b/sdks/java/src/test/java/com/thoughtspot/client/model/ColumnSecurityRuleGroupTest.java @@ -0,0 +1,30 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client.model; + +import org.junit.jupiter.api.Test; + +/** Model tests for ColumnSecurityRuleGroup */ +public class ColumnSecurityRuleGroupTest { + private final ColumnSecurityRuleGroup model = new ColumnSecurityRuleGroup(); + + /** Model tests for ColumnSecurityRuleGroup */ + @Test + public void testColumnSecurityRuleGroup() { + // TODO: test ColumnSecurityRuleGroup + } + + /** Test the property 'id' */ + @Test + public void idTest() { + // TODO: test id + } + + /** Test the property 'name' */ + @Test + public void nameTest() { + // TODO: test name + } +} diff --git a/sdks/java/src/test/java/com/thoughtspot/client/model/ColumnSecurityRuleResponseTest.java b/sdks/java/src/test/java/com/thoughtspot/client/model/ColumnSecurityRuleResponseTest.java new file mode 100644 index 000000000..d2f530313 --- /dev/null +++ b/sdks/java/src/test/java/com/thoughtspot/client/model/ColumnSecurityRuleResponseTest.java @@ -0,0 +1,36 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client.model; + +import org.junit.jupiter.api.Test; + +/** Model tests for ColumnSecurityRuleResponse */ +public class ColumnSecurityRuleResponseTest { + private final ColumnSecurityRuleResponse model = new ColumnSecurityRuleResponse(); + + /** Model tests for ColumnSecurityRuleResponse */ + @Test + public void testColumnSecurityRuleResponse() { + // TODO: test ColumnSecurityRuleResponse + } + + /** Test the property 'tableGuid' */ + @Test + public void tableGuidTest() { + // TODO: test tableGuid + } + + /** Test the property 'objId' */ + @Test + public void objIdTest() { + // TODO: test objId + } + + /** Test the property 'columnSecurityRules' */ + @Test + public void columnSecurityRulesTest() { + // TODO: test columnSecurityRules + } +} diff --git a/sdks/java/src/test/java/com/thoughtspot/client/model/ColumnSecurityRuleSourceTableTest.java b/sdks/java/src/test/java/com/thoughtspot/client/model/ColumnSecurityRuleSourceTableTest.java new file mode 100644 index 000000000..b10953354 --- /dev/null +++ b/sdks/java/src/test/java/com/thoughtspot/client/model/ColumnSecurityRuleSourceTableTest.java @@ -0,0 +1,30 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client.model; + +import org.junit.jupiter.api.Test; + +/** Model tests for ColumnSecurityRuleSourceTable */ +public class ColumnSecurityRuleSourceTableTest { + private final ColumnSecurityRuleSourceTable model = new ColumnSecurityRuleSourceTable(); + + /** Model tests for ColumnSecurityRuleSourceTable */ + @Test + public void testColumnSecurityRuleSourceTable() { + // TODO: test ColumnSecurityRuleSourceTable + } + + /** Test the property 'id' */ + @Test + public void idTest() { + // TODO: test id + } + + /** Test the property 'name' */ + @Test + public void nameTest() { + // TODO: test name + } +} diff --git a/sdks/java/src/test/java/com/thoughtspot/client/model/ColumnSecurityRuleTableInputTest.java b/sdks/java/src/test/java/com/thoughtspot/client/model/ColumnSecurityRuleTableInputTest.java new file mode 100644 index 000000000..efaf08449 --- /dev/null +++ b/sdks/java/src/test/java/com/thoughtspot/client/model/ColumnSecurityRuleTableInputTest.java @@ -0,0 +1,30 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client.model; + +import org.junit.jupiter.api.Test; + +/** Model tests for ColumnSecurityRuleTableInput */ +public class ColumnSecurityRuleTableInputTest { + private final ColumnSecurityRuleTableInput model = new ColumnSecurityRuleTableInput(); + + /** Model tests for ColumnSecurityRuleTableInput */ + @Test + public void testColumnSecurityRuleTableInput() { + // TODO: test ColumnSecurityRuleTableInput + } + + /** Test the property 'identifier' */ + @Test + public void identifierTest() { + // TODO: test identifier + } + + /** Test the property 'objIdentifier' */ + @Test + public void objIdentifierTest() { + // TODO: test objIdentifier + } +} diff --git a/sdks/java/src/test/java/com/thoughtspot/client/model/ColumnSecurityRuleTest.java b/sdks/java/src/test/java/com/thoughtspot/client/model/ColumnSecurityRuleTest.java new file mode 100644 index 000000000..1af11b541 --- /dev/null +++ b/sdks/java/src/test/java/com/thoughtspot/client/model/ColumnSecurityRuleTest.java @@ -0,0 +1,36 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client.model; + +import org.junit.jupiter.api.Test; + +/** Model tests for ColumnSecurityRule */ +public class ColumnSecurityRuleTest { + private final ColumnSecurityRule model = new ColumnSecurityRule(); + + /** Model tests for ColumnSecurityRule */ + @Test + public void testColumnSecurityRule() { + // TODO: test ColumnSecurityRule + } + + /** Test the property 'column' */ + @Test + public void columnTest() { + // TODO: test column + } + + /** Test the property 'groups' */ + @Test + public void groupsTest() { + // TODO: test groups + } + + /** Test the property 'sourceTableDetails' */ + @Test + public void sourceTableDetailsTest() { + // TODO: test sourceTableDetails + } +} diff --git a/sdks/java/src/test/java/com/thoughtspot/client/model/ColumnSecurityRuleUpdateTest.java b/sdks/java/src/test/java/com/thoughtspot/client/model/ColumnSecurityRuleUpdateTest.java new file mode 100644 index 000000000..d27a2b59f --- /dev/null +++ b/sdks/java/src/test/java/com/thoughtspot/client/model/ColumnSecurityRuleUpdateTest.java @@ -0,0 +1,36 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client.model; + +import org.junit.jupiter.api.Test; + +/** Model tests for ColumnSecurityRuleUpdate */ +public class ColumnSecurityRuleUpdateTest { + private final ColumnSecurityRuleUpdate model = new ColumnSecurityRuleUpdate(); + + /** Model tests for ColumnSecurityRuleUpdate */ + @Test + public void testColumnSecurityRuleUpdate() { + // TODO: test ColumnSecurityRuleUpdate + } + + /** Test the property 'columnIdentifier' */ + @Test + public void columnIdentifierTest() { + // TODO: test columnIdentifier + } + + /** Test the property 'isUnsecured' */ + @Test + public void isUnsecuredTest() { + // TODO: test isUnsecured + } + + /** Test the property 'groupAccess' */ + @Test + public void groupAccessTest() { + // TODO: test groupAccess + } +} diff --git a/sdks/java/src/test/java/com/thoughtspot/client/model/ColumnTest.java b/sdks/java/src/test/java/com/thoughtspot/client/model/ColumnTest.java new file mode 100644 index 000000000..0a949d2bc --- /dev/null +++ b/sdks/java/src/test/java/com/thoughtspot/client/model/ColumnTest.java @@ -0,0 +1,54 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client.model; + +import org.junit.jupiter.api.Test; + +/** Model tests for Column */ +public class ColumnTest { + private final Column model = new Column(); + + /** Model tests for Column */ + @Test + public void testColumn() { + // TODO: test Column + } + + /** Test the property 'name' */ + @Test + public void nameTest() { + // TODO: test name + } + + /** Test the property 'dataType' */ + @Test + public void dataTypeTest() { + // TODO: test dataType + } + + /** Test the property 'isAggregate' */ + @Test + public void isAggregateTest() { + // TODO: test isAggregate + } + + /** Test the property 'canImport' */ + @Test + public void canImportTest() { + // TODO: test canImport + } + + /** Test the property 'selected' */ + @Test + public void selectedTest() { + // TODO: test selected + } + + /** Test the property 'isLinkedActive' */ + @Test + public void isLinkedActiveTest() { + // TODO: test isLinkedActive + } +} diff --git a/sdks/java/src/test/java/com/thoughtspot/client/model/CommitBranchRequestTest.java b/sdks/java/src/test/java/com/thoughtspot/client/model/CommitBranchRequestTest.java new file mode 100644 index 000000000..ac9858e78 --- /dev/null +++ b/sdks/java/src/test/java/com/thoughtspot/client/model/CommitBranchRequestTest.java @@ -0,0 +1,42 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client.model; + +import org.junit.jupiter.api.Test; + +/** Model tests for CommitBranchRequest */ +public class CommitBranchRequestTest { + private final CommitBranchRequest model = new CommitBranchRequest(); + + /** Model tests for CommitBranchRequest */ + @Test + public void testCommitBranchRequest() { + // TODO: test CommitBranchRequest + } + + /** Test the property 'metadata' */ + @Test + public void metadataTest() { + // TODO: test metadata + } + + /** Test the property 'deleteAware' */ + @Test + public void deleteAwareTest() { + // TODO: test deleteAware + } + + /** Test the property 'branchName' */ + @Test + public void branchNameTest() { + // TODO: test branchName + } + + /** Test the property 'comment' */ + @Test + public void commentTest() { + // TODO: test comment + } +} diff --git a/sdks/java/src/test/java/com/thoughtspot/client/model/CommitFileTypeTest.java b/sdks/java/src/test/java/com/thoughtspot/client/model/CommitFileTypeTest.java new file mode 100644 index 000000000..6ac2db6b2 --- /dev/null +++ b/sdks/java/src/test/java/com/thoughtspot/client/model/CommitFileTypeTest.java @@ -0,0 +1,36 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client.model; + +import org.junit.jupiter.api.Test; + +/** Model tests for CommitFileType */ +public class CommitFileTypeTest { + private final CommitFileType model = new CommitFileType(); + + /** Model tests for CommitFileType */ + @Test + public void testCommitFileType() { + // TODO: test CommitFileType + } + + /** Test the property 'fileName' */ + @Test + public void fileNameTest() { + // TODO: test fileName + } + + /** Test the property 'statusCode' */ + @Test + public void statusCodeTest() { + // TODO: test statusCode + } + + /** Test the property 'statusMessage' */ + @Test + public void statusMessageTest() { + // TODO: test statusMessage + } +} diff --git a/sdks/java/src/test/java/com/thoughtspot/client/model/CommitHistoryResponseTest.java b/sdks/java/src/test/java/com/thoughtspot/client/model/CommitHistoryResponseTest.java new file mode 100644 index 000000000..7f1cf0050 --- /dev/null +++ b/sdks/java/src/test/java/com/thoughtspot/client/model/CommitHistoryResponseTest.java @@ -0,0 +1,54 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client.model; + +import org.junit.jupiter.api.Test; + +/** Model tests for CommitHistoryResponse */ +public class CommitHistoryResponseTest { + private final CommitHistoryResponse model = new CommitHistoryResponse(); + + /** Model tests for CommitHistoryResponse */ + @Test + public void testCommitHistoryResponse() { + // TODO: test CommitHistoryResponse + } + + /** Test the property 'committer' */ + @Test + public void committerTest() { + // TODO: test committer + } + + /** Test the property 'author' */ + @Test + public void authorTest() { + // TODO: test author + } + + /** Test the property 'comment' */ + @Test + public void commentTest() { + // TODO: test comment + } + + /** Test the property 'commitTime' */ + @Test + public void commitTimeTest() { + // TODO: test commitTime + } + + /** Test the property 'commitId' */ + @Test + public void commitIdTest() { + // TODO: test commitId + } + + /** Test the property 'branch' */ + @Test + public void branchTest() { + // TODO: test branch + } +} diff --git a/sdks/java/src/test/java/com/thoughtspot/client/model/CommitResponseTest.java b/sdks/java/src/test/java/com/thoughtspot/client/model/CommitResponseTest.java new file mode 100644 index 000000000..23e3bf399 --- /dev/null +++ b/sdks/java/src/test/java/com/thoughtspot/client/model/CommitResponseTest.java @@ -0,0 +1,60 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client.model; + +import org.junit.jupiter.api.Test; + +/** Model tests for CommitResponse */ +public class CommitResponseTest { + private final CommitResponse model = new CommitResponse(); + + /** Model tests for CommitResponse */ + @Test + public void testCommitResponse() { + // TODO: test CommitResponse + } + + /** Test the property 'committer' */ + @Test + public void committerTest() { + // TODO: test committer + } + + /** Test the property 'author' */ + @Test + public void authorTest() { + // TODO: test author + } + + /** Test the property 'comment' */ + @Test + public void commentTest() { + // TODO: test comment + } + + /** Test the property 'commitTime' */ + @Test + public void commitTimeTest() { + // TODO: test commitTime + } + + /** Test the property 'commitId' */ + @Test + public void commitIdTest() { + // TODO: test commitId + } + + /** Test the property 'branch' */ + @Test + public void branchTest() { + // TODO: test branch + } + + /** Test the property 'committedFiles' */ + @Test + public void committedFilesTest() { + // TODO: test committedFiles + } +} diff --git a/sdks/java/src/test/java/com/thoughtspot/client/model/CommiterTypeTest.java b/sdks/java/src/test/java/com/thoughtspot/client/model/CommiterTypeTest.java new file mode 100644 index 000000000..c3ba217d2 --- /dev/null +++ b/sdks/java/src/test/java/com/thoughtspot/client/model/CommiterTypeTest.java @@ -0,0 +1,30 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client.model; + +import org.junit.jupiter.api.Test; + +/** Model tests for CommiterType */ +public class CommiterTypeTest { + private final CommiterType model = new CommiterType(); + + /** Model tests for CommiterType */ + @Test + public void testCommiterType() { + // TODO: test CommiterType + } + + /** Test the property 'email' */ + @Test + public void emailTest() { + // TODO: test email + } + + /** Test the property 'username' */ + @Test + public void usernameTest() { + // TODO: test username + } +} diff --git a/sdks/java/src/test/java/com/thoughtspot/client/model/CommunicationChannelPreferencesResponseTest.java b/sdks/java/src/test/java/com/thoughtspot/client/model/CommunicationChannelPreferencesResponseTest.java new file mode 100644 index 000000000..ecdb3a95e --- /dev/null +++ b/sdks/java/src/test/java/com/thoughtspot/client/model/CommunicationChannelPreferencesResponseTest.java @@ -0,0 +1,31 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client.model; + +import org.junit.jupiter.api.Test; + +/** Model tests for CommunicationChannelPreferencesResponse */ +public class CommunicationChannelPreferencesResponseTest { + private final CommunicationChannelPreferencesResponse model = + new CommunicationChannelPreferencesResponse(); + + /** Model tests for CommunicationChannelPreferencesResponse */ + @Test + public void testCommunicationChannelPreferencesResponse() { + // TODO: test CommunicationChannelPreferencesResponse + } + + /** Test the property 'clusterPreferences' */ + @Test + public void clusterPreferencesTest() { + // TODO: test clusterPreferences + } + + /** Test the property 'orgPreferences' */ + @Test + public void orgPreferencesTest() { + // TODO: test orgPreferences + } +} diff --git a/sdks/java/src/test/java/com/thoughtspot/client/model/CommunicationChannelValidateResponseTest.java b/sdks/java/src/test/java/com/thoughtspot/client/model/CommunicationChannelValidateResponseTest.java new file mode 100644 index 000000000..d92f9ef82 --- /dev/null +++ b/sdks/java/src/test/java/com/thoughtspot/client/model/CommunicationChannelValidateResponseTest.java @@ -0,0 +1,61 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client.model; + +import org.junit.jupiter.api.Test; + +/** Model tests for CommunicationChannelValidateResponse */ +public class CommunicationChannelValidateResponseTest { + private final CommunicationChannelValidateResponse model = + new CommunicationChannelValidateResponse(); + + /** Model tests for CommunicationChannelValidateResponse */ + @Test + public void testCommunicationChannelValidateResponse() { + // TODO: test CommunicationChannelValidateResponse + } + + /** Test the property 'channelType' */ + @Test + public void channelTypeTest() { + // TODO: test channelType + } + + /** Test the property 'channelId' */ + @Test + public void channelIdTest() { + // TODO: test channelId + } + + /** Test the property 'channelName' */ + @Test + public void channelNameTest() { + // TODO: test channelName + } + + /** Test the property 'eventType' */ + @Test + public void eventTypeTest() { + // TODO: test eventType + } + + /** Test the property 'jobId' */ + @Test + public void jobIdTest() { + // TODO: test jobId + } + + /** Test the property 'resultCode' */ + @Test + public void resultCodeTest() { + // TODO: test resultCode + } + + /** Test the property 'details' */ + @Test + public void detailsTest() { + // TODO: test details + } +} diff --git a/sdks/java/src/test/java/com/thoughtspot/client/model/ConfigureAuthSettingsRequestTest.java b/sdks/java/src/test/java/com/thoughtspot/client/model/ConfigureAuthSettingsRequestTest.java new file mode 100644 index 000000000..900e601ff --- /dev/null +++ b/sdks/java/src/test/java/com/thoughtspot/client/model/ConfigureAuthSettingsRequestTest.java @@ -0,0 +1,36 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client.model; + +import org.junit.jupiter.api.Test; + +/** Model tests for ConfigureAuthSettingsRequest */ +public class ConfigureAuthSettingsRequestTest { + private final ConfigureAuthSettingsRequest model = new ConfigureAuthSettingsRequest(); + + /** Model tests for ConfigureAuthSettingsRequest */ + @Test + public void testConfigureAuthSettingsRequest() { + // TODO: test ConfigureAuthSettingsRequest + } + + /** Test the property 'authType' */ + @Test + public void authTypeTest() { + // TODO: test authType + } + + /** Test the property 'clusterPreferences' */ + @Test + public void clusterPreferencesTest() { + // TODO: test clusterPreferences + } + + /** Test the property 'orgPreferences' */ + @Test + public void orgPreferencesTest() { + // TODO: test orgPreferences + } +} diff --git a/sdks/java/src/test/java/com/thoughtspot/client/model/ConfigureCommunicationChannelPreferencesRequestTest.java b/sdks/java/src/test/java/com/thoughtspot/client/model/ConfigureCommunicationChannelPreferencesRequestTest.java new file mode 100644 index 000000000..6d80b8bab --- /dev/null +++ b/sdks/java/src/test/java/com/thoughtspot/client/model/ConfigureCommunicationChannelPreferencesRequestTest.java @@ -0,0 +1,31 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client.model; + +import org.junit.jupiter.api.Test; + +/** Model tests for ConfigureCommunicationChannelPreferencesRequest */ +public class ConfigureCommunicationChannelPreferencesRequestTest { + private final ConfigureCommunicationChannelPreferencesRequest model = + new ConfigureCommunicationChannelPreferencesRequest(); + + /** Model tests for ConfigureCommunicationChannelPreferencesRequest */ + @Test + public void testConfigureCommunicationChannelPreferencesRequest() { + // TODO: test ConfigureCommunicationChannelPreferencesRequest + } + + /** Test the property 'clusterPreferences' */ + @Test + public void clusterPreferencesTest() { + // TODO: test clusterPreferences + } + + /** Test the property 'orgPreferences' */ + @Test + public void orgPreferencesTest() { + // TODO: test orgPreferences + } +} diff --git a/sdks/java/src/test/java/com/thoughtspot/client/model/ConfigureSecuritySettingsRequestTest.java b/sdks/java/src/test/java/com/thoughtspot/client/model/ConfigureSecuritySettingsRequestTest.java new file mode 100644 index 000000000..996a808f2 --- /dev/null +++ b/sdks/java/src/test/java/com/thoughtspot/client/model/ConfigureSecuritySettingsRequestTest.java @@ -0,0 +1,30 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client.model; + +import org.junit.jupiter.api.Test; + +/** Model tests for ConfigureSecuritySettingsRequest */ +public class ConfigureSecuritySettingsRequestTest { + private final ConfigureSecuritySettingsRequest model = new ConfigureSecuritySettingsRequest(); + + /** Model tests for ConfigureSecuritySettingsRequest */ + @Test + public void testConfigureSecuritySettingsRequest() { + // TODO: test ConfigureSecuritySettingsRequest + } + + /** Test the property 'clusterPreferences' */ + @Test + public void clusterPreferencesTest() { + // TODO: test clusterPreferences + } + + /** Test the property 'orgPreferences' */ + @Test + public void orgPreferencesTest() { + // TODO: test orgPreferences + } +} diff --git a/sdks/java/src/test/java/com/thoughtspot/client/model/ConnectionConfigurationResponseTest.java b/sdks/java/src/test/java/com/thoughtspot/client/model/ConnectionConfigurationResponseTest.java new file mode 100644 index 000000000..cc884c9ed --- /dev/null +++ b/sdks/java/src/test/java/com/thoughtspot/client/model/ConnectionConfigurationResponseTest.java @@ -0,0 +1,84 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client.model; + +import org.junit.jupiter.api.Test; + +/** Model tests for ConnectionConfigurationResponse */ +public class ConnectionConfigurationResponseTest { + private final ConnectionConfigurationResponse model = new ConnectionConfigurationResponse(); + + /** Model tests for ConnectionConfigurationResponse */ + @Test + public void testConnectionConfigurationResponse() { + // TODO: test ConnectionConfigurationResponse + } + + /** Test the property 'configurationIdentifier' */ + @Test + public void configurationIdentifierTest() { + // TODO: test configurationIdentifier + } + + /** Test the property 'name' */ + @Test + public void nameTest() { + // TODO: test name + } + + /** Test the property 'description' */ + @Test + public void descriptionTest() { + // TODO: test description + } + + /** Test the property '_configuration' */ + @Test + public void _configurationTest() { + // TODO: test _configuration + } + + /** Test the property 'policyPrincipals' */ + @Test + public void policyPrincipalsTest() { + // TODO: test policyPrincipals + } + + /** Test the property 'policyProcesses' */ + @Test + public void policyProcessesTest() { + // TODO: test policyProcesses + } + + /** Test the property 'disabled' */ + @Test + public void disabledTest() { + // TODO: test disabled + } + + /** Test the property 'dataWarehouseType' */ + @Test + public void dataWarehouseTypeTest() { + // TODO: test dataWarehouseType + } + + /** Test the property 'policyType' */ + @Test + public void policyTypeTest() { + // TODO: test policyType + } + + /** Test the property 'sameAsParent' */ + @Test + public void sameAsParentTest() { + // TODO: test sameAsParent + } + + /** Test the property 'policyProcessOptions' */ + @Test + public void policyProcessOptionsTest() { + // TODO: test policyProcessOptions + } +} diff --git a/sdks/java/src/test/java/com/thoughtspot/client/model/ConnectionConfigurationSearchRequestTest.java b/sdks/java/src/test/java/com/thoughtspot/client/model/ConnectionConfigurationSearchRequestTest.java new file mode 100644 index 000000000..ff0245fa2 --- /dev/null +++ b/sdks/java/src/test/java/com/thoughtspot/client/model/ConnectionConfigurationSearchRequestTest.java @@ -0,0 +1,37 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client.model; + +import org.junit.jupiter.api.Test; + +/** Model tests for ConnectionConfigurationSearchRequest */ +public class ConnectionConfigurationSearchRequestTest { + private final ConnectionConfigurationSearchRequest model = + new ConnectionConfigurationSearchRequest(); + + /** Model tests for ConnectionConfigurationSearchRequest */ + @Test + public void testConnectionConfigurationSearchRequest() { + // TODO: test ConnectionConfigurationSearchRequest + } + + /** Test the property 'connectionIdentifier' */ + @Test + public void connectionIdentifierTest() { + // TODO: test connectionIdentifier + } + + /** Test the property 'configurationIdentifier' */ + @Test + public void configurationIdentifierTest() { + // TODO: test configurationIdentifier + } + + /** Test the property 'policyType' */ + @Test + public void policyTypeTest() { + // TODO: test policyType + } +} diff --git a/sdks/java/src/test/java/com/thoughtspot/client/model/ConnectionInputTest.java b/sdks/java/src/test/java/com/thoughtspot/client/model/ConnectionInputTest.java new file mode 100644 index 000000000..3601a9b50 --- /dev/null +++ b/sdks/java/src/test/java/com/thoughtspot/client/model/ConnectionInputTest.java @@ -0,0 +1,36 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client.model; + +import org.junit.jupiter.api.Test; + +/** Model tests for ConnectionInput */ +public class ConnectionInputTest { + private final ConnectionInput model = new ConnectionInput(); + + /** Model tests for ConnectionInput */ + @Test + public void testConnectionInput() { + // TODO: test ConnectionInput + } + + /** Test the property 'identifier' */ + @Test + public void identifierTest() { + // TODO: test identifier + } + + /** Test the property 'namePattern' */ + @Test + public void namePatternTest() { + // TODO: test namePattern + } + + /** Test the property 'dataWarehouseObjects' */ + @Test + public void dataWarehouseObjectsTest() { + // TODO: test dataWarehouseObjects + } +} diff --git a/sdks/java/src/test/java/com/thoughtspot/client/model/ContextPayloadV2InputTest.java b/sdks/java/src/test/java/com/thoughtspot/client/model/ContextPayloadV2InputTest.java new file mode 100644 index 000000000..1b3bc1b83 --- /dev/null +++ b/sdks/java/src/test/java/com/thoughtspot/client/model/ContextPayloadV2InputTest.java @@ -0,0 +1,30 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client.model; + +import org.junit.jupiter.api.Test; + +/** Model tests for ContextPayloadV2Input */ +public class ContextPayloadV2InputTest { + private final ContextPayloadV2Input model = new ContextPayloadV2Input(); + + /** Model tests for ContextPayloadV2Input */ + @Test + public void testContextPayloadV2Input() { + // TODO: test ContextPayloadV2Input + } + + /** Test the property 'type' */ + @Test + public void typeTest() { + // TODO: test type + } + + /** Test the property 'dataSourceContext' */ + @Test + public void dataSourceContextTest() { + // TODO: test dataSourceContext + } +} diff --git a/sdks/java/src/test/java/com/thoughtspot/client/model/ConversationSettingsInputTest.java b/sdks/java/src/test/java/com/thoughtspot/client/model/ConversationSettingsInputTest.java new file mode 100644 index 000000000..678dd7797 --- /dev/null +++ b/sdks/java/src/test/java/com/thoughtspot/client/model/ConversationSettingsInputTest.java @@ -0,0 +1,42 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client.model; + +import org.junit.jupiter.api.Test; + +/** Model tests for ConversationSettingsInput */ +public class ConversationSettingsInputTest { + private final ConversationSettingsInput model = new ConversationSettingsInput(); + + /** Model tests for ConversationSettingsInput */ + @Test + public void testConversationSettingsInput() { + // TODO: test ConversationSettingsInput + } + + /** Test the property 'enableContextualChangeAnalysis' */ + @Test + public void enableContextualChangeAnalysisTest() { + // TODO: test enableContextualChangeAnalysis + } + + /** Test the property 'enableNaturalLanguageAnswerGeneration' */ + @Test + public void enableNaturalLanguageAnswerGenerationTest() { + // TODO: test enableNaturalLanguageAnswerGeneration + } + + /** Test the property 'enableReasoning' */ + @Test + public void enableReasoningTest() { + // TODO: test enableReasoning + } + + /** Test the property 'enableSaveChat' */ + @Test + public void enableSaveChatTest() { + // TODO: test enableSaveChat + } +} diff --git a/sdks/java/src/test/java/com/thoughtspot/client/model/ConversationTest.java b/sdks/java/src/test/java/com/thoughtspot/client/model/ConversationTest.java new file mode 100644 index 000000000..ef7f5eb7f --- /dev/null +++ b/sdks/java/src/test/java/com/thoughtspot/client/model/ConversationTest.java @@ -0,0 +1,24 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client.model; + +import org.junit.jupiter.api.Test; + +/** Model tests for Conversation */ +public class ConversationTest { + private final Conversation model = new Conversation(); + + /** Model tests for Conversation */ + @Test + public void testConversation() { + // TODO: test Conversation + } + + /** Test the property 'conversationIdentifier' */ + @Test + public void conversationIdentifierTest() { + // TODO: test conversationIdentifier + } +} diff --git a/sdks/java/src/test/java/com/thoughtspot/client/model/ConvertWorksheetToModelRequestTest.java b/sdks/java/src/test/java/com/thoughtspot/client/model/ConvertWorksheetToModelRequestTest.java new file mode 100644 index 000000000..9c75901c2 --- /dev/null +++ b/sdks/java/src/test/java/com/thoughtspot/client/model/ConvertWorksheetToModelRequestTest.java @@ -0,0 +1,42 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client.model; + +import org.junit.jupiter.api.Test; + +/** Model tests for ConvertWorksheetToModelRequest */ +public class ConvertWorksheetToModelRequestTest { + private final ConvertWorksheetToModelRequest model = new ConvertWorksheetToModelRequest(); + + /** Model tests for ConvertWorksheetToModelRequest */ + @Test + public void testConvertWorksheetToModelRequest() { + // TODO: test ConvertWorksheetToModelRequest + } + + /** Test the property 'worksheetIds' */ + @Test + public void worksheetIdsTest() { + // TODO: test worksheetIds + } + + /** Test the property 'excludeWorksheetIds' */ + @Test + public void excludeWorksheetIdsTest() { + // TODO: test excludeWorksheetIds + } + + /** Test the property 'convertAll' */ + @Test + public void convertAllTest() { + // TODO: test convertAll + } + + /** Test the property 'applyChanges' */ + @Test + public void applyChangesTest() { + // TODO: test applyChanges + } +} diff --git a/sdks/java/src/test/java/com/thoughtspot/client/model/CopyObjectRequestTest.java b/sdks/java/src/test/java/com/thoughtspot/client/model/CopyObjectRequestTest.java new file mode 100644 index 000000000..778ef5a6d --- /dev/null +++ b/sdks/java/src/test/java/com/thoughtspot/client/model/CopyObjectRequestTest.java @@ -0,0 +1,42 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client.model; + +import org.junit.jupiter.api.Test; + +/** Model tests for CopyObjectRequest */ +public class CopyObjectRequestTest { + private final CopyObjectRequest model = new CopyObjectRequest(); + + /** Model tests for CopyObjectRequest */ + @Test + public void testCopyObjectRequest() { + // TODO: test CopyObjectRequest + } + + /** Test the property 'description' */ + @Test + public void descriptionTest() { + // TODO: test description + } + + /** Test the property 'identifier' */ + @Test + public void identifierTest() { + // TODO: test identifier + } + + /** Test the property 'type' */ + @Test + public void typeTest() { + // TODO: test type + } + + /** Test the property 'title' */ + @Test + public void titleTest() { + // TODO: test title + } +} diff --git a/sdks/java/src/test/java/com/thoughtspot/client/model/CreateAgentConversationRequestTest.java b/sdks/java/src/test/java/com/thoughtspot/client/model/CreateAgentConversationRequestTest.java new file mode 100644 index 000000000..dd219f64b --- /dev/null +++ b/sdks/java/src/test/java/com/thoughtspot/client/model/CreateAgentConversationRequestTest.java @@ -0,0 +1,30 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client.model; + +import org.junit.jupiter.api.Test; + +/** Model tests for CreateAgentConversationRequest */ +public class CreateAgentConversationRequestTest { + private final CreateAgentConversationRequest model = new CreateAgentConversationRequest(); + + /** Model tests for CreateAgentConversationRequest */ + @Test + public void testCreateAgentConversationRequest() { + // TODO: test CreateAgentConversationRequest + } + + /** Test the property 'metadataContext' */ + @Test + public void metadataContextTest() { + // TODO: test metadataContext + } + + /** Test the property 'conversationSettings' */ + @Test + public void conversationSettingsTest() { + // TODO: test conversationSettings + } +} diff --git a/sdks/java/src/test/java/com/thoughtspot/client/model/CreateCalendarRequestTest.java b/sdks/java/src/test/java/com/thoughtspot/client/model/CreateCalendarRequestTest.java new file mode 100644 index 000000000..705ff0237 --- /dev/null +++ b/sdks/java/src/test/java/com/thoughtspot/client/model/CreateCalendarRequestTest.java @@ -0,0 +1,78 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client.model; + +import org.junit.jupiter.api.Test; + +/** Model tests for CreateCalendarRequest */ +public class CreateCalendarRequestTest { + private final CreateCalendarRequest model = new CreateCalendarRequest(); + + /** Model tests for CreateCalendarRequest */ + @Test + public void testCreateCalendarRequest() { + // TODO: test CreateCalendarRequest + } + + /** Test the property 'name' */ + @Test + public void nameTest() { + // TODO: test name + } + + /** Test the property 'creationMethod' */ + @Test + public void creationMethodTest() { + // TODO: test creationMethod + } + + /** Test the property 'tableReference' */ + @Test + public void tableReferenceTest() { + // TODO: test tableReference + } + + /** Test the property 'startDate' */ + @Test + public void startDateTest() { + // TODO: test startDate + } + + /** Test the property 'endDate' */ + @Test + public void endDateTest() { + // TODO: test endDate + } + + /** Test the property 'calendarType' */ + @Test + public void calendarTypeTest() { + // TODO: test calendarType + } + + /** Test the property 'monthOffset' */ + @Test + public void monthOffsetTest() { + // TODO: test monthOffset + } + + /** Test the property 'startDayOfWeek' */ + @Test + public void startDayOfWeekTest() { + // TODO: test startDayOfWeek + } + + /** Test the property 'quarterNamePrefix' */ + @Test + public void quarterNamePrefixTest() { + // TODO: test quarterNamePrefix + } + + /** Test the property 'yearNamePrefix' */ + @Test + public void yearNamePrefixTest() { + // TODO: test yearNamePrefix + } +} diff --git a/sdks/java/src/test/java/com/thoughtspot/client/model/CreateCollectionRequestTest.java b/sdks/java/src/test/java/com/thoughtspot/client/model/CreateCollectionRequestTest.java new file mode 100644 index 000000000..e7a8188c5 --- /dev/null +++ b/sdks/java/src/test/java/com/thoughtspot/client/model/CreateCollectionRequestTest.java @@ -0,0 +1,36 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client.model; + +import org.junit.jupiter.api.Test; + +/** Model tests for CreateCollectionRequest */ +public class CreateCollectionRequestTest { + private final CreateCollectionRequest model = new CreateCollectionRequest(); + + /** Model tests for CreateCollectionRequest */ + @Test + public void testCreateCollectionRequest() { + // TODO: test CreateCollectionRequest + } + + /** Test the property 'name' */ + @Test + public void nameTest() { + // TODO: test name + } + + /** Test the property 'description' */ + @Test + public void descriptionTest() { + // TODO: test description + } + + /** Test the property 'metadata' */ + @Test + public void metadataTest() { + // TODO: test metadata + } +} diff --git a/sdks/java/src/test/java/com/thoughtspot/client/model/CreateConfigRequestTest.java b/sdks/java/src/test/java/com/thoughtspot/client/model/CreateConfigRequestTest.java new file mode 100644 index 000000000..66ece3eac --- /dev/null +++ b/sdks/java/src/test/java/com/thoughtspot/client/model/CreateConfigRequestTest.java @@ -0,0 +1,66 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client.model; + +import org.junit.jupiter.api.Test; + +/** Model tests for CreateConfigRequest */ +public class CreateConfigRequestTest { + private final CreateConfigRequest model = new CreateConfigRequest(); + + /** Model tests for CreateConfigRequest */ + @Test + public void testCreateConfigRequest() { + // TODO: test CreateConfigRequest + } + + /** Test the property 'repositoryUrl' */ + @Test + public void repositoryUrlTest() { + // TODO: test repositoryUrl + } + + /** Test the property 'username' */ + @Test + public void usernameTest() { + // TODO: test username + } + + /** Test the property 'accessToken' */ + @Test + public void accessTokenTest() { + // TODO: test accessToken + } + + /** Test the property 'orgIdentifier' */ + @Test + public void orgIdentifierTest() { + // TODO: test orgIdentifier + } + + /** Test the property 'branchNames' */ + @Test + public void branchNamesTest() { + // TODO: test branchNames + } + + /** Test the property 'commitBranchName' */ + @Test + public void commitBranchNameTest() { + // TODO: test commitBranchName + } + + /** Test the property 'enableGuidMapping' */ + @Test + public void enableGuidMappingTest() { + // TODO: test enableGuidMapping + } + + /** Test the property 'configurationBranchName' */ + @Test + public void configurationBranchNameTest() { + // TODO: test configurationBranchName + } +} diff --git a/sdks/java/src/test/java/com/thoughtspot/client/model/CreateConnectionConfigurationRequestTest.java b/sdks/java/src/test/java/com/thoughtspot/client/model/CreateConnectionConfigurationRequestTest.java new file mode 100644 index 000000000..d1baf99ad --- /dev/null +++ b/sdks/java/src/test/java/com/thoughtspot/client/model/CreateConnectionConfigurationRequestTest.java @@ -0,0 +1,79 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client.model; + +import org.junit.jupiter.api.Test; + +/** Model tests for CreateConnectionConfigurationRequest */ +public class CreateConnectionConfigurationRequestTest { + private final CreateConnectionConfigurationRequest model = + new CreateConnectionConfigurationRequest(); + + /** Model tests for CreateConnectionConfigurationRequest */ + @Test + public void testCreateConnectionConfigurationRequest() { + // TODO: test CreateConnectionConfigurationRequest + } + + /** Test the property 'name' */ + @Test + public void nameTest() { + // TODO: test name + } + + /** Test the property 'description' */ + @Test + public void descriptionTest() { + // TODO: test description + } + + /** Test the property 'connectionIdentifier' */ + @Test + public void connectionIdentifierTest() { + // TODO: test connectionIdentifier + } + + /** Test the property 'sameAsParent' */ + @Test + public void sameAsParentTest() { + // TODO: test sameAsParent + } + + /** Test the property 'policyProcessOptions' */ + @Test + public void policyProcessOptionsTest() { + // TODO: test policyProcessOptions + } + + /** Test the property 'authenticationType' */ + @Test + public void authenticationTypeTest() { + // TODO: test authenticationType + } + + /** Test the property '_configuration' */ + @Test + public void _configurationTest() { + // TODO: test _configuration + } + + /** Test the property 'policyType' */ + @Test + public void policyTypeTest() { + // TODO: test policyType + } + + /** Test the property 'policyPrincipals' */ + @Test + public void policyPrincipalsTest() { + // TODO: test policyPrincipals + } + + /** Test the property 'policyProcesses' */ + @Test + public void policyProcessesTest() { + // TODO: test policyProcesses + } +} diff --git a/sdks/java/src/test/java/com/thoughtspot/client/model/CreateConnectionRequestTest.java b/sdks/java/src/test/java/com/thoughtspot/client/model/CreateConnectionRequestTest.java new file mode 100644 index 000000000..254966ddb --- /dev/null +++ b/sdks/java/src/test/java/com/thoughtspot/client/model/CreateConnectionRequestTest.java @@ -0,0 +1,48 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client.model; + +import org.junit.jupiter.api.Test; + +/** Model tests for CreateConnectionRequest */ +public class CreateConnectionRequestTest { + private final CreateConnectionRequest model = new CreateConnectionRequest(); + + /** Model tests for CreateConnectionRequest */ + @Test + public void testCreateConnectionRequest() { + // TODO: test CreateConnectionRequest + } + + /** Test the property 'name' */ + @Test + public void nameTest() { + // TODO: test name + } + + /** Test the property 'description' */ + @Test + public void descriptionTest() { + // TODO: test description + } + + /** Test the property 'dataWarehouseType' */ + @Test + public void dataWarehouseTypeTest() { + // TODO: test dataWarehouseType + } + + /** Test the property 'dataWarehouseConfig' */ + @Test + public void dataWarehouseConfigTest() { + // TODO: test dataWarehouseConfig + } + + /** Test the property 'validate' */ + @Test + public void validateTest() { + // TODO: test validate + } +} diff --git a/sdks/java/src/test/java/com/thoughtspot/client/model/CreateConnectionResponseTest.java b/sdks/java/src/test/java/com/thoughtspot/client/model/CreateConnectionResponseTest.java new file mode 100644 index 000000000..7b5a6c155 --- /dev/null +++ b/sdks/java/src/test/java/com/thoughtspot/client/model/CreateConnectionResponseTest.java @@ -0,0 +1,42 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client.model; + +import org.junit.jupiter.api.Test; + +/** Model tests for CreateConnectionResponse */ +public class CreateConnectionResponseTest { + private final CreateConnectionResponse model = new CreateConnectionResponse(); + + /** Model tests for CreateConnectionResponse */ + @Test + public void testCreateConnectionResponse() { + // TODO: test CreateConnectionResponse + } + + /** Test the property 'id' */ + @Test + public void idTest() { + // TODO: test id + } + + /** Test the property 'name' */ + @Test + public void nameTest() { + // TODO: test name + } + + /** Test the property 'dataWarehouseType' */ + @Test + public void dataWarehouseTypeTest() { + // TODO: test dataWarehouseType + } + + /** Test the property 'details' */ + @Test + public void detailsTest() { + // TODO: test details + } +} diff --git a/sdks/java/src/test/java/com/thoughtspot/client/model/CreateConversationRequestTest.java b/sdks/java/src/test/java/com/thoughtspot/client/model/CreateConversationRequestTest.java new file mode 100644 index 000000000..aff3e99d5 --- /dev/null +++ b/sdks/java/src/test/java/com/thoughtspot/client/model/CreateConversationRequestTest.java @@ -0,0 +1,30 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client.model; + +import org.junit.jupiter.api.Test; + +/** Model tests for CreateConversationRequest */ +public class CreateConversationRequestTest { + private final CreateConversationRequest model = new CreateConversationRequest(); + + /** Model tests for CreateConversationRequest */ + @Test + public void testCreateConversationRequest() { + // TODO: test CreateConversationRequest + } + + /** Test the property 'metadataIdentifier' */ + @Test + public void metadataIdentifierTest() { + // TODO: test metadataIdentifier + } + + /** Test the property 'tokens' */ + @Test + public void tokensTest() { + // TODO: test tokens + } +} diff --git a/sdks/java/src/test/java/com/thoughtspot/client/model/CreateCustomActionRequestTest.java b/sdks/java/src/test/java/com/thoughtspot/client/model/CreateCustomActionRequestTest.java new file mode 100644 index 000000000..191380d9b --- /dev/null +++ b/sdks/java/src/test/java/com/thoughtspot/client/model/CreateCustomActionRequestTest.java @@ -0,0 +1,48 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client.model; + +import org.junit.jupiter.api.Test; + +/** Model tests for CreateCustomActionRequest */ +public class CreateCustomActionRequestTest { + private final CreateCustomActionRequest model = new CreateCustomActionRequest(); + + /** Model tests for CreateCustomActionRequest */ + @Test + public void testCreateCustomActionRequest() { + // TODO: test CreateCustomActionRequest + } + + /** Test the property 'name' */ + @Test + public void nameTest() { + // TODO: test name + } + + /** Test the property 'actionDetails' */ + @Test + public void actionDetailsTest() { + // TODO: test actionDetails + } + + /** Test the property 'associateMetadata' */ + @Test + public void associateMetadataTest() { + // TODO: test associateMetadata + } + + /** Test the property 'defaultActionConfig' */ + @Test + public void defaultActionConfigTest() { + // TODO: test defaultActionConfig + } + + /** Test the property 'groupIdentifiers' */ + @Test + public void groupIdentifiersTest() { + // TODO: test groupIdentifiers + } +} diff --git a/sdks/java/src/test/java/com/thoughtspot/client/model/CreateEmailCustomizationRequestTest.java b/sdks/java/src/test/java/com/thoughtspot/client/model/CreateEmailCustomizationRequestTest.java new file mode 100644 index 000000000..f727b96f5 --- /dev/null +++ b/sdks/java/src/test/java/com/thoughtspot/client/model/CreateEmailCustomizationRequestTest.java @@ -0,0 +1,30 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client.model; + +import org.junit.jupiter.api.Test; + +/** Model tests for CreateEmailCustomizationRequest */ +public class CreateEmailCustomizationRequestTest { + private final CreateEmailCustomizationRequest model = new CreateEmailCustomizationRequest(); + + /** Model tests for CreateEmailCustomizationRequest */ + @Test + public void testCreateEmailCustomizationRequest() { + // TODO: test CreateEmailCustomizationRequest + } + + /** Test the property 'templateProperties' */ + @Test + public void templatePropertiesTest() { + // TODO: test templateProperties + } + + /** Test the property 'orgIdentifier' */ + @Test + public void orgIdentifierTest() { + // TODO: test orgIdentifier + } +} diff --git a/sdks/java/src/test/java/com/thoughtspot/client/model/CreateEmailCustomizationResponseTest.java b/sdks/java/src/test/java/com/thoughtspot/client/model/CreateEmailCustomizationResponseTest.java new file mode 100644 index 000000000..f1168b4d5 --- /dev/null +++ b/sdks/java/src/test/java/com/thoughtspot/client/model/CreateEmailCustomizationResponseTest.java @@ -0,0 +1,42 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client.model; + +import org.junit.jupiter.api.Test; + +/** Model tests for CreateEmailCustomizationResponse */ +public class CreateEmailCustomizationResponseTest { + private final CreateEmailCustomizationResponse model = new CreateEmailCustomizationResponse(); + + /** Model tests for CreateEmailCustomizationResponse */ + @Test + public void testCreateEmailCustomizationResponse() { + // TODO: test CreateEmailCustomizationResponse + } + + /** Test the property 'tenantId' */ + @Test + public void tenantIdTest() { + // TODO: test tenantId + } + + /** Test the property 'org' */ + @Test + public void orgTest() { + // TODO: test org + } + + /** Test the property 'name' */ + @Test + public void nameTest() { + // TODO: test name + } + + /** Test the property 'templateProperties' */ + @Test + public void templatePropertiesTest() { + // TODO: test templateProperties + } +} diff --git a/sdks/java/src/test/java/com/thoughtspot/client/model/CreateOrgRequestTest.java b/sdks/java/src/test/java/com/thoughtspot/client/model/CreateOrgRequestTest.java new file mode 100644 index 000000000..1323406fd --- /dev/null +++ b/sdks/java/src/test/java/com/thoughtspot/client/model/CreateOrgRequestTest.java @@ -0,0 +1,30 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client.model; + +import org.junit.jupiter.api.Test; + +/** Model tests for CreateOrgRequest */ +public class CreateOrgRequestTest { + private final CreateOrgRequest model = new CreateOrgRequest(); + + /** Model tests for CreateOrgRequest */ + @Test + public void testCreateOrgRequest() { + // TODO: test CreateOrgRequest + } + + /** Test the property 'name' */ + @Test + public void nameTest() { + // TODO: test name + } + + /** Test the property 'description' */ + @Test + public void descriptionTest() { + // TODO: test description + } +} diff --git a/sdks/java/src/test/java/com/thoughtspot/client/model/CreateRoleRequestTest.java b/sdks/java/src/test/java/com/thoughtspot/client/model/CreateRoleRequestTest.java new file mode 100644 index 000000000..d2452a478 --- /dev/null +++ b/sdks/java/src/test/java/com/thoughtspot/client/model/CreateRoleRequestTest.java @@ -0,0 +1,42 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client.model; + +import org.junit.jupiter.api.Test; + +/** Model tests for CreateRoleRequest */ +public class CreateRoleRequestTest { + private final CreateRoleRequest model = new CreateRoleRequest(); + + /** Model tests for CreateRoleRequest */ + @Test + public void testCreateRoleRequest() { + // TODO: test CreateRoleRequest + } + + /** Test the property 'name' */ + @Test + public void nameTest() { + // TODO: test name + } + + /** Test the property 'description' */ + @Test + public void descriptionTest() { + // TODO: test description + } + + /** Test the property 'privileges' */ + @Test + public void privilegesTest() { + // TODO: test privileges + } + + /** Test the property 'readOnly' */ + @Test + public void readOnlyTest() { + // TODO: test readOnly + } +} diff --git a/sdks/java/src/test/java/com/thoughtspot/client/model/CreateScheduleRequestTest.java b/sdks/java/src/test/java/com/thoughtspot/client/model/CreateScheduleRequestTest.java new file mode 100644 index 000000000..6c2d8ac47 --- /dev/null +++ b/sdks/java/src/test/java/com/thoughtspot/client/model/CreateScheduleRequestTest.java @@ -0,0 +1,84 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client.model; + +import org.junit.jupiter.api.Test; + +/** Model tests for CreateScheduleRequest */ +public class CreateScheduleRequestTest { + private final CreateScheduleRequest model = new CreateScheduleRequest(); + + /** Model tests for CreateScheduleRequest */ + @Test + public void testCreateScheduleRequest() { + // TODO: test CreateScheduleRequest + } + + /** Test the property 'name' */ + @Test + public void nameTest() { + // TODO: test name + } + + /** Test the property 'description' */ + @Test + public void descriptionTest() { + // TODO: test description + } + + /** Test the property 'metadataType' */ + @Test + public void metadataTypeTest() { + // TODO: test metadataType + } + + /** Test the property 'metadataIdentifier' */ + @Test + public void metadataIdentifierTest() { + // TODO: test metadataIdentifier + } + + /** Test the property 'fileFormat' */ + @Test + public void fileFormatTest() { + // TODO: test fileFormat + } + + /** Test the property 'liveboardOptions' */ + @Test + public void liveboardOptionsTest() { + // TODO: test liveboardOptions + } + + /** Test the property 'pdfOptions' */ + @Test + public void pdfOptionsTest() { + // TODO: test pdfOptions + } + + /** Test the property 'timeZone' */ + @Test + public void timeZoneTest() { + // TODO: test timeZone + } + + /** Test the property 'frequency' */ + @Test + public void frequencyTest() { + // TODO: test frequency + } + + /** Test the property 'recipientDetails' */ + @Test + public void recipientDetailsTest() { + // TODO: test recipientDetails + } + + /** Test the property 'personalisedViewId' */ + @Test + public void personalisedViewIdTest() { + // TODO: test personalisedViewId + } +} diff --git a/sdks/java/src/test/java/com/thoughtspot/client/model/CreateTagRequestTest.java b/sdks/java/src/test/java/com/thoughtspot/client/model/CreateTagRequestTest.java new file mode 100644 index 000000000..69b9a22b3 --- /dev/null +++ b/sdks/java/src/test/java/com/thoughtspot/client/model/CreateTagRequestTest.java @@ -0,0 +1,30 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client.model; + +import org.junit.jupiter.api.Test; + +/** Model tests for CreateTagRequest */ +public class CreateTagRequestTest { + private final CreateTagRequest model = new CreateTagRequest(); + + /** Model tests for CreateTagRequest */ + @Test + public void testCreateTagRequest() { + // TODO: test CreateTagRequest + } + + /** Test the property 'name' */ + @Test + public void nameTest() { + // TODO: test name + } + + /** Test the property 'color' */ + @Test + public void colorTest() { + // TODO: test color + } +} diff --git a/sdks/java/src/test/java/com/thoughtspot/client/model/CreateUserGroupRequestTest.java b/sdks/java/src/test/java/com/thoughtspot/client/model/CreateUserGroupRequestTest.java new file mode 100644 index 000000000..48a4680be --- /dev/null +++ b/sdks/java/src/test/java/com/thoughtspot/client/model/CreateUserGroupRequestTest.java @@ -0,0 +1,78 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client.model; + +import org.junit.jupiter.api.Test; + +/** Model tests for CreateUserGroupRequest */ +public class CreateUserGroupRequestTest { + private final CreateUserGroupRequest model = new CreateUserGroupRequest(); + + /** Model tests for CreateUserGroupRequest */ + @Test + public void testCreateUserGroupRequest() { + // TODO: test CreateUserGroupRequest + } + + /** Test the property 'name' */ + @Test + public void nameTest() { + // TODO: test name + } + + /** Test the property 'displayName' */ + @Test + public void displayNameTest() { + // TODO: test displayName + } + + /** Test the property 'defaultLiveboardIdentifiers' */ + @Test + public void defaultLiveboardIdentifiersTest() { + // TODO: test defaultLiveboardIdentifiers + } + + /** Test the property 'description' */ + @Test + public void descriptionTest() { + // TODO: test description + } + + /** Test the property 'privileges' */ + @Test + public void privilegesTest() { + // TODO: test privileges + } + + /** Test the property 'subGroupIdentifiers' */ + @Test + public void subGroupIdentifiersTest() { + // TODO: test subGroupIdentifiers + } + + /** Test the property 'type' */ + @Test + public void typeTest() { + // TODO: test type + } + + /** Test the property 'userIdentifiers' */ + @Test + public void userIdentifiersTest() { + // TODO: test userIdentifiers + } + + /** Test the property 'visibility' */ + @Test + public void visibilityTest() { + // TODO: test visibility + } + + /** Test the property 'roleIdentifiers' */ + @Test + public void roleIdentifiersTest() { + // TODO: test roleIdentifiers + } +} diff --git a/sdks/java/src/test/java/com/thoughtspot/client/model/CreateUserRequestTest.java b/sdks/java/src/test/java/com/thoughtspot/client/model/CreateUserRequestTest.java new file mode 100644 index 000000000..4f128c23b --- /dev/null +++ b/sdks/java/src/test/java/com/thoughtspot/client/model/CreateUserRequestTest.java @@ -0,0 +1,138 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client.model; + +import org.junit.jupiter.api.Test; + +/** Model tests for CreateUserRequest */ +public class CreateUserRequestTest { + private final CreateUserRequest model = new CreateUserRequest(); + + /** Model tests for CreateUserRequest */ + @Test + public void testCreateUserRequest() { + // TODO: test CreateUserRequest + } + + /** Test the property 'name' */ + @Test + public void nameTest() { + // TODO: test name + } + + /** Test the property 'displayName' */ + @Test + public void displayNameTest() { + // TODO: test displayName + } + + /** Test the property 'password' */ + @Test + public void passwordTest() { + // TODO: test password + } + + /** Test the property 'email' */ + @Test + public void emailTest() { + // TODO: test email + } + + /** Test the property 'accountType' */ + @Test + public void accountTypeTest() { + // TODO: test accountType + } + + /** Test the property 'accountStatus' */ + @Test + public void accountStatusTest() { + // TODO: test accountStatus + } + + /** Test the property 'orgIdentifiers' */ + @Test + public void orgIdentifiersTest() { + // TODO: test orgIdentifiers + } + + /** Test the property 'groupIdentifiers' */ + @Test + public void groupIdentifiersTest() { + // TODO: test groupIdentifiers + } + + /** Test the property 'visibility' */ + @Test + public void visibilityTest() { + // TODO: test visibility + } + + /** Test the property 'notifyOnShare' */ + @Test + public void notifyOnShareTest() { + // TODO: test notifyOnShare + } + + /** Test the property 'showOnboardingExperience' */ + @Test + public void showOnboardingExperienceTest() { + // TODO: test showOnboardingExperience + } + + /** Test the property 'onboardingExperienceCompleted' */ + @Test + public void onboardingExperienceCompletedTest() { + // TODO: test onboardingExperienceCompleted + } + + /** Test the property 'homeLiveboardIdentifier' */ + @Test + public void homeLiveboardIdentifierTest() { + // TODO: test homeLiveboardIdentifier + } + + /** Test the property 'favoriteMetadata' */ + @Test + public void favoriteMetadataTest() { + // TODO: test favoriteMetadata + } + + /** Test the property 'preferredLocale' */ + @Test + public void preferredLocaleTest() { + // TODO: test preferredLocale + } + + /** Test the property 'useBrowserLanguage' */ + @Test + public void useBrowserLanguageTest() { + // TODO: test useBrowserLanguage + } + + /** Test the property 'extendedProperties' */ + @Test + public void extendedPropertiesTest() { + // TODO: test extendedProperties + } + + /** Test the property 'extendedPreferences' */ + @Test + public void extendedPreferencesTest() { + // TODO: test extendedPreferences + } + + /** Test the property 'triggerWelcomeEmail' */ + @Test + public void triggerWelcomeEmailTest() { + // TODO: test triggerWelcomeEmail + } + + /** Test the property 'triggerActivationEmail' */ + @Test + public void triggerActivationEmailTest() { + // TODO: test triggerActivationEmail + } +} diff --git a/sdks/java/src/test/java/com/thoughtspot/client/model/CreateVariableRequestTest.java b/sdks/java/src/test/java/com/thoughtspot/client/model/CreateVariableRequestTest.java new file mode 100644 index 000000000..4654faa97 --- /dev/null +++ b/sdks/java/src/test/java/com/thoughtspot/client/model/CreateVariableRequestTest.java @@ -0,0 +1,42 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client.model; + +import org.junit.jupiter.api.Test; + +/** Model tests for CreateVariableRequest */ +public class CreateVariableRequestTest { + private final CreateVariableRequest model = new CreateVariableRequest(); + + /** Model tests for CreateVariableRequest */ + @Test + public void testCreateVariableRequest() { + // TODO: test CreateVariableRequest + } + + /** Test the property 'type' */ + @Test + public void typeTest() { + // TODO: test type + } + + /** Test the property 'name' */ + @Test + public void nameTest() { + // TODO: test name + } + + /** Test the property 'isSensitive' */ + @Test + public void isSensitiveTest() { + // TODO: test isSensitive + } + + /** Test the property 'dataType' */ + @Test + public void dataTypeTest() { + // TODO: test dataType + } +} diff --git a/sdks/java/src/test/java/com/thoughtspot/client/model/CreateWebhookConfigurationRequestTest.java b/sdks/java/src/test/java/com/thoughtspot/client/model/CreateWebhookConfigurationRequestTest.java new file mode 100644 index 000000000..1f26fa880 --- /dev/null +++ b/sdks/java/src/test/java/com/thoughtspot/client/model/CreateWebhookConfigurationRequestTest.java @@ -0,0 +1,72 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client.model; + +import org.junit.jupiter.api.Test; + +/** Model tests for CreateWebhookConfigurationRequest */ +public class CreateWebhookConfigurationRequestTest { + private final CreateWebhookConfigurationRequest model = new CreateWebhookConfigurationRequest(); + + /** Model tests for CreateWebhookConfigurationRequest */ + @Test + public void testCreateWebhookConfigurationRequest() { + // TODO: test CreateWebhookConfigurationRequest + } + + /** Test the property 'name' */ + @Test + public void nameTest() { + // TODO: test name + } + + /** Test the property 'description' */ + @Test + public void descriptionTest() { + // TODO: test description + } + + /** Test the property 'url' */ + @Test + public void urlTest() { + // TODO: test url + } + + /** Test the property 'urlParams' */ + @Test + public void urlParamsTest() { + // TODO: test urlParams + } + + /** Test the property 'events' */ + @Test + public void eventsTest() { + // TODO: test events + } + + /** Test the property 'authentication' */ + @Test + public void authenticationTest() { + // TODO: test authentication + } + + /** Test the property 'signatureVerification' */ + @Test + public void signatureVerificationTest() { + // TODO: test signatureVerification + } + + /** Test the property 'storageDestination' */ + @Test + public void storageDestinationTest() { + // TODO: test storageDestination + } + + /** Test the property 'additionalHeaders' */ + @Test + public void additionalHeadersTest() { + // TODO: test additionalHeaders + } +} diff --git a/sdks/java/src/test/java/com/thoughtspot/client/model/CronExpressionInputTest.java b/sdks/java/src/test/java/com/thoughtspot/client/model/CronExpressionInputTest.java new file mode 100644 index 000000000..dc572b7f9 --- /dev/null +++ b/sdks/java/src/test/java/com/thoughtspot/client/model/CronExpressionInputTest.java @@ -0,0 +1,54 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client.model; + +import org.junit.jupiter.api.Test; + +/** Model tests for CronExpressionInput */ +public class CronExpressionInputTest { + private final CronExpressionInput model = new CronExpressionInput(); + + /** Model tests for CronExpressionInput */ + @Test + public void testCronExpressionInput() { + // TODO: test CronExpressionInput + } + + /** Test the property 'dayOfMonth' */ + @Test + public void dayOfMonthTest() { + // TODO: test dayOfMonth + } + + /** Test the property 'dayOfWeek' */ + @Test + public void dayOfWeekTest() { + // TODO: test dayOfWeek + } + + /** Test the property 'hour' */ + @Test + public void hourTest() { + // TODO: test hour + } + + /** Test the property 'minute' */ + @Test + public void minuteTest() { + // TODO: test minute + } + + /** Test the property 'month' */ + @Test + public void monthTest() { + // TODO: test month + } + + /** Test the property 'second' */ + @Test + public void secondTest() { + // TODO: test second + } +} diff --git a/sdks/java/src/test/java/com/thoughtspot/client/model/CronExpressionTest.java b/sdks/java/src/test/java/com/thoughtspot/client/model/CronExpressionTest.java new file mode 100644 index 000000000..960be0b55 --- /dev/null +++ b/sdks/java/src/test/java/com/thoughtspot/client/model/CronExpressionTest.java @@ -0,0 +1,54 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client.model; + +import org.junit.jupiter.api.Test; + +/** Model tests for CronExpression */ +public class CronExpressionTest { + private final CronExpression model = new CronExpression(); + + /** Model tests for CronExpression */ + @Test + public void testCronExpression() { + // TODO: test CronExpression + } + + /** Test the property 'dayOfMonth' */ + @Test + public void dayOfMonthTest() { + // TODO: test dayOfMonth + } + + /** Test the property 'dayOfWeek' */ + @Test + public void dayOfWeekTest() { + // TODO: test dayOfWeek + } + + /** Test the property 'hour' */ + @Test + public void hourTest() { + // TODO: test hour + } + + /** Test the property 'minute' */ + @Test + public void minuteTest() { + // TODO: test minute + } + + /** Test the property 'month' */ + @Test + public void monthTest() { + // TODO: test month + } + + /** Test the property 'second' */ + @Test + public void secondTest() { + // TODO: test second + } +} diff --git a/sdks/java/src/test/java/com/thoughtspot/client/model/CspSettingsInputTest.java b/sdks/java/src/test/java/com/thoughtspot/client/model/CspSettingsInputTest.java new file mode 100644 index 000000000..90a0fddef --- /dev/null +++ b/sdks/java/src/test/java/com/thoughtspot/client/model/CspSettingsInputTest.java @@ -0,0 +1,60 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client.model; + +import org.junit.jupiter.api.Test; + +/** Model tests for CspSettingsInput */ +public class CspSettingsInputTest { + private final CspSettingsInput model = new CspSettingsInput(); + + /** Model tests for CspSettingsInput */ + @Test + public void testCspSettingsInput() { + // TODO: test CspSettingsInput + } + + /** Test the property 'connectSrcUrls' */ + @Test + public void connectSrcUrlsTest() { + // TODO: test connectSrcUrls + } + + /** Test the property 'fontSrcUrls' */ + @Test + public void fontSrcUrlsTest() { + // TODO: test fontSrcUrls + } + + /** Test the property 'visualEmbedHosts' */ + @Test + public void visualEmbedHostsTest() { + // TODO: test visualEmbedHosts + } + + /** Test the property 'iframeSrcUrls' */ + @Test + public void iframeSrcUrlsTest() { + // TODO: test iframeSrcUrls + } + + /** Test the property 'imgSrcUrls' */ + @Test + public void imgSrcUrlsTest() { + // TODO: test imgSrcUrls + } + + /** Test the property 'scriptSrcUrls' */ + @Test + public void scriptSrcUrlsTest() { + // TODO: test scriptSrcUrls + } + + /** Test the property 'styleSrcUrls' */ + @Test + public void styleSrcUrlsTest() { + // TODO: test styleSrcUrls + } +} diff --git a/sdks/java/src/test/java/com/thoughtspot/client/model/CspSettingsTest.java b/sdks/java/src/test/java/com/thoughtspot/client/model/CspSettingsTest.java new file mode 100644 index 000000000..aa26917cb --- /dev/null +++ b/sdks/java/src/test/java/com/thoughtspot/client/model/CspSettingsTest.java @@ -0,0 +1,60 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client.model; + +import org.junit.jupiter.api.Test; + +/** Model tests for CspSettings */ +public class CspSettingsTest { + private final CspSettings model = new CspSettings(); + + /** Model tests for CspSettings */ + @Test + public void testCspSettings() { + // TODO: test CspSettings + } + + /** Test the property 'connectSrcUrls' */ + @Test + public void connectSrcUrlsTest() { + // TODO: test connectSrcUrls + } + + /** Test the property 'fontSrcUrls' */ + @Test + public void fontSrcUrlsTest() { + // TODO: test fontSrcUrls + } + + /** Test the property 'visualEmbedHosts' */ + @Test + public void visualEmbedHostsTest() { + // TODO: test visualEmbedHosts + } + + /** Test the property 'iframeSrcUrls' */ + @Test + public void iframeSrcUrlsTest() { + // TODO: test iframeSrcUrls + } + + /** Test the property 'imgSrcUrls' */ + @Test + public void imgSrcUrlsTest() { + // TODO: test imgSrcUrls + } + + /** Test the property 'scriptSrcUrls' */ + @Test + public void scriptSrcUrlsTest() { + // TODO: test scriptSrcUrls + } + + /** Test the property 'styleSrcUrls' */ + @Test + public void styleSrcUrlsTest() { + // TODO: test styleSrcUrls + } +} diff --git a/sdks/java/src/test/java/com/thoughtspot/client/model/CustomActionMetadataTypeInputTest.java b/sdks/java/src/test/java/com/thoughtspot/client/model/CustomActionMetadataTypeInputTest.java new file mode 100644 index 000000000..3f78750a4 --- /dev/null +++ b/sdks/java/src/test/java/com/thoughtspot/client/model/CustomActionMetadataTypeInputTest.java @@ -0,0 +1,30 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client.model; + +import org.junit.jupiter.api.Test; + +/** Model tests for CustomActionMetadataTypeInput */ +public class CustomActionMetadataTypeInputTest { + private final CustomActionMetadataTypeInput model = new CustomActionMetadataTypeInput(); + + /** Model tests for CustomActionMetadataTypeInput */ + @Test + public void testCustomActionMetadataTypeInput() { + // TODO: test CustomActionMetadataTypeInput + } + + /** Test the property 'type' */ + @Test + public void typeTest() { + // TODO: test type + } + + /** Test the property 'identifier' */ + @Test + public void identifierTest() { + // TODO: test identifier + } +} diff --git a/sdks/java/src/test/java/com/thoughtspot/client/model/DataSourceContextInputTest.java b/sdks/java/src/test/java/com/thoughtspot/client/model/DataSourceContextInputTest.java new file mode 100644 index 000000000..a01adc0c8 --- /dev/null +++ b/sdks/java/src/test/java/com/thoughtspot/client/model/DataSourceContextInputTest.java @@ -0,0 +1,36 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client.model; + +import org.junit.jupiter.api.Test; + +/** Model tests for DataSourceContextInput */ +public class DataSourceContextInputTest { + private final DataSourceContextInput model = new DataSourceContextInput(); + + /** Model tests for DataSourceContextInput */ + @Test + public void testDataSourceContextInput() { + // TODO: test DataSourceContextInput + } + + /** Test the property 'dataSourceIdentifier' */ + @Test + public void dataSourceIdentifierTest() { + // TODO: test dataSourceIdentifier + } + + /** Test the property 'dataSourceIdentifiers' */ + @Test + public void dataSourceIdentifiersTest() { + // TODO: test dataSourceIdentifiers + } + + /** Test the property 'guid' */ + @Test + public void guidTest() { + // TODO: test guid + } +} diff --git a/sdks/java/src/test/java/com/thoughtspot/client/model/DataSourceTest.java b/sdks/java/src/test/java/com/thoughtspot/client/model/DataSourceTest.java new file mode 100644 index 000000000..28166c243 --- /dev/null +++ b/sdks/java/src/test/java/com/thoughtspot/client/model/DataSourceTest.java @@ -0,0 +1,36 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client.model; + +import org.junit.jupiter.api.Test; + +/** Model tests for DataSource */ +public class DataSourceTest { + private final DataSource model = new DataSource(); + + /** Model tests for DataSource */ + @Test + public void testDataSource() { + // TODO: test DataSource + } + + /** Test the property 'confidence' */ + @Test + public void confidenceTest() { + // TODO: test confidence + } + + /** Test the property 'details' */ + @Test + public void detailsTest() { + // TODO: test details + } + + /** Test the property 'reasoning' */ + @Test + public void reasoningTest() { + // TODO: test reasoning + } +} diff --git a/sdks/java/src/test/java/com/thoughtspot/client/model/DataWarehouseObjectInputTest.java b/sdks/java/src/test/java/com/thoughtspot/client/model/DataWarehouseObjectInputTest.java new file mode 100644 index 000000000..df75ab457 --- /dev/null +++ b/sdks/java/src/test/java/com/thoughtspot/client/model/DataWarehouseObjectInputTest.java @@ -0,0 +1,42 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client.model; + +import org.junit.jupiter.api.Test; + +/** Model tests for DataWarehouseObjectInput */ +public class DataWarehouseObjectInputTest { + private final DataWarehouseObjectInput model = new DataWarehouseObjectInput(); + + /** Model tests for DataWarehouseObjectInput */ + @Test + public void testDataWarehouseObjectInput() { + // TODO: test DataWarehouseObjectInput + } + + /** Test the property 'database' */ + @Test + public void databaseTest() { + // TODO: test database + } + + /** Test the property 'schema' */ + @Test + public void schemaTest() { + // TODO: test schema + } + + /** Test the property 'table' */ + @Test + public void tableTest() { + // TODO: test table + } + + /** Test the property 'column' */ + @Test + public void columnTest() { + // TODO: test column + } +} diff --git a/sdks/java/src/test/java/com/thoughtspot/client/model/DataWarehouseObjectsTest.java b/sdks/java/src/test/java/com/thoughtspot/client/model/DataWarehouseObjectsTest.java new file mode 100644 index 000000000..aee05c28f --- /dev/null +++ b/sdks/java/src/test/java/com/thoughtspot/client/model/DataWarehouseObjectsTest.java @@ -0,0 +1,24 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client.model; + +import org.junit.jupiter.api.Test; + +/** Model tests for DataWarehouseObjects */ +public class DataWarehouseObjectsTest { + private final DataWarehouseObjects model = new DataWarehouseObjects(); + + /** Model tests for DataWarehouseObjects */ + @Test + public void testDataWarehouseObjects() { + // TODO: test DataWarehouseObjects + } + + /** Test the property 'databases' */ + @Test + public void databasesTest() { + // TODO: test databases + } +} diff --git a/sdks/java/src/test/java/com/thoughtspot/client/model/DatabaseTest.java b/sdks/java/src/test/java/com/thoughtspot/client/model/DatabaseTest.java new file mode 100644 index 000000000..f28763ba1 --- /dev/null +++ b/sdks/java/src/test/java/com/thoughtspot/client/model/DatabaseTest.java @@ -0,0 +1,36 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client.model; + +import org.junit.jupiter.api.Test; + +/** Model tests for Database */ +public class DatabaseTest { + private final Database model = new Database(); + + /** Model tests for Database */ + @Test + public void testDatabase() { + // TODO: test Database + } + + /** Test the property 'name' */ + @Test + public void nameTest() { + // TODO: test name + } + + /** Test the property 'schemas' */ + @Test + public void schemasTest() { + // TODO: test schemas + } + + /** Test the property 'autoCreated' */ + @Test + public void autoCreatedTest() { + // TODO: test autoCreated + } +} diff --git a/sdks/java/src/test/java/com/thoughtspot/client/model/DbtSearchResponseTest.java b/sdks/java/src/test/java/com/thoughtspot/client/model/DbtSearchResponseTest.java new file mode 100644 index 000000000..6d84865d5 --- /dev/null +++ b/sdks/java/src/test/java/com/thoughtspot/client/model/DbtSearchResponseTest.java @@ -0,0 +1,60 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client.model; + +import org.junit.jupiter.api.Test; + +/** Model tests for DbtSearchResponse */ +public class DbtSearchResponseTest { + private final DbtSearchResponse model = new DbtSearchResponse(); + + /** Model tests for DbtSearchResponse */ + @Test + public void testDbtSearchResponse() { + // TODO: test DbtSearchResponse + } + + /** Test the property 'dbtConnectionIdentifier' */ + @Test + public void dbtConnectionIdentifierTest() { + // TODO: test dbtConnectionIdentifier + } + + /** Test the property 'projectName' */ + @Test + public void projectNameTest() { + // TODO: test projectName + } + + /** Test the property 'connectionId' */ + @Test + public void connectionIdTest() { + // TODO: test connectionId + } + + /** Test the property 'connectionName' */ + @Test + public void connectionNameTest() { + // TODO: test connectionName + } + + /** Test the property 'cdwDatabase' */ + @Test + public void cdwDatabaseTest() { + // TODO: test cdwDatabase + } + + /** Test the property 'importType' */ + @Test + public void importTypeTest() { + // TODO: test importType + } + + /** Test the property 'authorName' */ + @Test + public void authorNameTest() { + // TODO: test authorName + } +} diff --git a/sdks/java/src/test/java/com/thoughtspot/client/model/DeactivateUserRequestTest.java b/sdks/java/src/test/java/com/thoughtspot/client/model/DeactivateUserRequestTest.java new file mode 100644 index 000000000..737aeb32e --- /dev/null +++ b/sdks/java/src/test/java/com/thoughtspot/client/model/DeactivateUserRequestTest.java @@ -0,0 +1,30 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client.model; + +import org.junit.jupiter.api.Test; + +/** Model tests for DeactivateUserRequest */ +public class DeactivateUserRequestTest { + private final DeactivateUserRequest model = new DeactivateUserRequest(); + + /** Model tests for DeactivateUserRequest */ + @Test + public void testDeactivateUserRequest() { + // TODO: test DeactivateUserRequest + } + + /** Test the property 'userIdentifier' */ + @Test + public void userIdentifierTest() { + // TODO: test userIdentifier + } + + /** Test the property 'baseUrl' */ + @Test + public void baseUrlTest() { + // TODO: test baseUrl + } +} diff --git a/sdks/java/src/test/java/com/thoughtspot/client/model/DefaultActionConfigInputCreateTest.java b/sdks/java/src/test/java/com/thoughtspot/client/model/DefaultActionConfigInputCreateTest.java new file mode 100644 index 000000000..a43f59f6a --- /dev/null +++ b/sdks/java/src/test/java/com/thoughtspot/client/model/DefaultActionConfigInputCreateTest.java @@ -0,0 +1,24 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client.model; + +import org.junit.jupiter.api.Test; + +/** Model tests for DefaultActionConfigInputCreate */ +public class DefaultActionConfigInputCreateTest { + private final DefaultActionConfigInputCreate model = new DefaultActionConfigInputCreate(); + + /** Model tests for DefaultActionConfigInputCreate */ + @Test + public void testDefaultActionConfigInputCreate() { + // TODO: test DefaultActionConfigInputCreate + } + + /** Test the property 'visibility' */ + @Test + public void visibilityTest() { + // TODO: test visibility + } +} diff --git a/sdks/java/src/test/java/com/thoughtspot/client/model/DefaultActionConfigInputTest.java b/sdks/java/src/test/java/com/thoughtspot/client/model/DefaultActionConfigInputTest.java new file mode 100644 index 000000000..eca39f3e3 --- /dev/null +++ b/sdks/java/src/test/java/com/thoughtspot/client/model/DefaultActionConfigInputTest.java @@ -0,0 +1,24 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client.model; + +import org.junit.jupiter.api.Test; + +/** Model tests for DefaultActionConfigInput */ +public class DefaultActionConfigInputTest { + private final DefaultActionConfigInput model = new DefaultActionConfigInput(); + + /** Model tests for DefaultActionConfigInput */ + @Test + public void testDefaultActionConfigInput() { + // TODO: test DefaultActionConfigInput + } + + /** Test the property 'visibility' */ + @Test + public void visibilityTest() { + // TODO: test visibility + } +} diff --git a/sdks/java/src/test/java/com/thoughtspot/client/model/DefaultActionConfigSearchInputTest.java b/sdks/java/src/test/java/com/thoughtspot/client/model/DefaultActionConfigSearchInputTest.java new file mode 100644 index 000000000..94c5c9aa2 --- /dev/null +++ b/sdks/java/src/test/java/com/thoughtspot/client/model/DefaultActionConfigSearchInputTest.java @@ -0,0 +1,24 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client.model; + +import org.junit.jupiter.api.Test; + +/** Model tests for DefaultActionConfigSearchInput */ +public class DefaultActionConfigSearchInputTest { + private final DefaultActionConfigSearchInput model = new DefaultActionConfigSearchInput(); + + /** Model tests for DefaultActionConfigSearchInput */ + @Test + public void testDefaultActionConfigSearchInput() { + // TODO: test DefaultActionConfigSearchInput + } + + /** Test the property 'visibility' */ + @Test + public void visibilityTest() { + // TODO: test visibility + } +} diff --git a/sdks/java/src/test/java/com/thoughtspot/client/model/DefaultActionConfigTest.java b/sdks/java/src/test/java/com/thoughtspot/client/model/DefaultActionConfigTest.java new file mode 100644 index 000000000..17588e7fd --- /dev/null +++ b/sdks/java/src/test/java/com/thoughtspot/client/model/DefaultActionConfigTest.java @@ -0,0 +1,24 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client.model; + +import org.junit.jupiter.api.Test; + +/** Model tests for DefaultActionConfig */ +public class DefaultActionConfigTest { + private final DefaultActionConfig model = new DefaultActionConfig(); + + /** Model tests for DefaultActionConfig */ + @Test + public void testDefaultActionConfig() { + // TODO: test DefaultActionConfig + } + + /** Test the property 'visibility' */ + @Test + public void visibilityTest() { + // TODO: test visibility + } +} diff --git a/sdks/java/src/test/java/com/thoughtspot/client/model/DeleteCollectionRequestTest.java b/sdks/java/src/test/java/com/thoughtspot/client/model/DeleteCollectionRequestTest.java new file mode 100644 index 000000000..f0f1538b7 --- /dev/null +++ b/sdks/java/src/test/java/com/thoughtspot/client/model/DeleteCollectionRequestTest.java @@ -0,0 +1,36 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client.model; + +import org.junit.jupiter.api.Test; + +/** Model tests for DeleteCollectionRequest */ +public class DeleteCollectionRequestTest { + private final DeleteCollectionRequest model = new DeleteCollectionRequest(); + + /** Model tests for DeleteCollectionRequest */ + @Test + public void testDeleteCollectionRequest() { + // TODO: test DeleteCollectionRequest + } + + /** Test the property 'collectionIdentifiers' */ + @Test + public void collectionIdentifiersTest() { + // TODO: test collectionIdentifiers + } + + /** Test the property 'deleteChildren' */ + @Test + public void deleteChildrenTest() { + // TODO: test deleteChildren + } + + /** Test the property 'dryRun' */ + @Test + public void dryRunTest() { + // TODO: test dryRun + } +} diff --git a/sdks/java/src/test/java/com/thoughtspot/client/model/DeleteConfigRequestTest.java b/sdks/java/src/test/java/com/thoughtspot/client/model/DeleteConfigRequestTest.java new file mode 100644 index 000000000..6300f8599 --- /dev/null +++ b/sdks/java/src/test/java/com/thoughtspot/client/model/DeleteConfigRequestTest.java @@ -0,0 +1,24 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client.model; + +import org.junit.jupiter.api.Test; + +/** Model tests for DeleteConfigRequest */ +public class DeleteConfigRequestTest { + private final DeleteConfigRequest model = new DeleteConfigRequest(); + + /** Model tests for DeleteConfigRequest */ + @Test + public void testDeleteConfigRequest() { + // TODO: test DeleteConfigRequest + } + + /** Test the property 'clusterLevel' */ + @Test + public void clusterLevelTest() { + // TODO: test clusterLevel + } +} diff --git a/sdks/java/src/test/java/com/thoughtspot/client/model/DeleteConnectionConfigurationRequestTest.java b/sdks/java/src/test/java/com/thoughtspot/client/model/DeleteConnectionConfigurationRequestTest.java new file mode 100644 index 000000000..60778ca94 --- /dev/null +++ b/sdks/java/src/test/java/com/thoughtspot/client/model/DeleteConnectionConfigurationRequestTest.java @@ -0,0 +1,31 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client.model; + +import org.junit.jupiter.api.Test; + +/** Model tests for DeleteConnectionConfigurationRequest */ +public class DeleteConnectionConfigurationRequestTest { + private final DeleteConnectionConfigurationRequest model = + new DeleteConnectionConfigurationRequest(); + + /** Model tests for DeleteConnectionConfigurationRequest */ + @Test + public void testDeleteConnectionConfigurationRequest() { + // TODO: test DeleteConnectionConfigurationRequest + } + + /** Test the property 'configurationIdentifier' */ + @Test + public void configurationIdentifierTest() { + // TODO: test configurationIdentifier + } + + /** Test the property 'connectionIdentifier' */ + @Test + public void connectionIdentifierTest() { + // TODO: test connectionIdentifier + } +} diff --git a/sdks/java/src/test/java/com/thoughtspot/client/model/DeleteConnectionRequestTest.java b/sdks/java/src/test/java/com/thoughtspot/client/model/DeleteConnectionRequestTest.java new file mode 100644 index 000000000..6f410af68 --- /dev/null +++ b/sdks/java/src/test/java/com/thoughtspot/client/model/DeleteConnectionRequestTest.java @@ -0,0 +1,24 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client.model; + +import org.junit.jupiter.api.Test; + +/** Model tests for DeleteConnectionRequest */ +public class DeleteConnectionRequestTest { + private final DeleteConnectionRequest model = new DeleteConnectionRequest(); + + /** Model tests for DeleteConnectionRequest */ + @Test + public void testDeleteConnectionRequest() { + // TODO: test DeleteConnectionRequest + } + + /** Test the property 'connectionIdentifier' */ + @Test + public void connectionIdentifierTest() { + // TODO: test connectionIdentifier + } +} diff --git a/sdks/java/src/test/java/com/thoughtspot/client/model/DeleteMetadataRequestTest.java b/sdks/java/src/test/java/com/thoughtspot/client/model/DeleteMetadataRequestTest.java new file mode 100644 index 000000000..a94df3385 --- /dev/null +++ b/sdks/java/src/test/java/com/thoughtspot/client/model/DeleteMetadataRequestTest.java @@ -0,0 +1,30 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client.model; + +import org.junit.jupiter.api.Test; + +/** Model tests for DeleteMetadataRequest */ +public class DeleteMetadataRequestTest { + private final DeleteMetadataRequest model = new DeleteMetadataRequest(); + + /** Model tests for DeleteMetadataRequest */ + @Test + public void testDeleteMetadataRequest() { + // TODO: test DeleteMetadataRequest + } + + /** Test the property 'metadata' */ + @Test + public void metadataTest() { + // TODO: test metadata + } + + /** Test the property 'deleteDisabledObjects' */ + @Test + public void deleteDisabledObjectsTest() { + // TODO: test deleteDisabledObjects + } +} diff --git a/sdks/java/src/test/java/com/thoughtspot/client/model/DeleteMetadataTypeInputTest.java b/sdks/java/src/test/java/com/thoughtspot/client/model/DeleteMetadataTypeInputTest.java new file mode 100644 index 000000000..dac043d9d --- /dev/null +++ b/sdks/java/src/test/java/com/thoughtspot/client/model/DeleteMetadataTypeInputTest.java @@ -0,0 +1,30 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client.model; + +import org.junit.jupiter.api.Test; + +/** Model tests for DeleteMetadataTypeInput */ +public class DeleteMetadataTypeInputTest { + private final DeleteMetadataTypeInput model = new DeleteMetadataTypeInput(); + + /** Model tests for DeleteMetadataTypeInput */ + @Test + public void testDeleteMetadataTypeInput() { + // TODO: test DeleteMetadataTypeInput + } + + /** Test the property 'type' */ + @Test + public void typeTest() { + // TODO: test type + } + + /** Test the property 'identifier' */ + @Test + public void identifierTest() { + // TODO: test identifier + } +} diff --git a/sdks/java/src/test/java/com/thoughtspot/client/model/DeleteOrgEmailCustomizationRequestTest.java b/sdks/java/src/test/java/com/thoughtspot/client/model/DeleteOrgEmailCustomizationRequestTest.java new file mode 100644 index 000000000..6564034dd --- /dev/null +++ b/sdks/java/src/test/java/com/thoughtspot/client/model/DeleteOrgEmailCustomizationRequestTest.java @@ -0,0 +1,25 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client.model; + +import org.junit.jupiter.api.Test; + +/** Model tests for DeleteOrgEmailCustomizationRequest */ +public class DeleteOrgEmailCustomizationRequestTest { + private final DeleteOrgEmailCustomizationRequest model = + new DeleteOrgEmailCustomizationRequest(); + + /** Model tests for DeleteOrgEmailCustomizationRequest */ + @Test + public void testDeleteOrgEmailCustomizationRequest() { + // TODO: test DeleteOrgEmailCustomizationRequest + } + + /** Test the property 'orgIdentifiers' */ + @Test + public void orgIdentifiersTest() { + // TODO: test orgIdentifiers + } +} diff --git a/sdks/java/src/test/java/com/thoughtspot/client/model/DeleteVariablesRequestTest.java b/sdks/java/src/test/java/com/thoughtspot/client/model/DeleteVariablesRequestTest.java new file mode 100644 index 000000000..43974b269 --- /dev/null +++ b/sdks/java/src/test/java/com/thoughtspot/client/model/DeleteVariablesRequestTest.java @@ -0,0 +1,24 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client.model; + +import org.junit.jupiter.api.Test; + +/** Model tests for DeleteVariablesRequest */ +public class DeleteVariablesRequestTest { + private final DeleteVariablesRequest model = new DeleteVariablesRequest(); + + /** Model tests for DeleteVariablesRequest */ + @Test + public void testDeleteVariablesRequest() { + // TODO: test DeleteVariablesRequest + } + + /** Test the property 'identifiers' */ + @Test + public void identifiersTest() { + // TODO: test identifiers + } +} diff --git a/sdks/java/src/test/java/com/thoughtspot/client/model/DeleteWebhookConfigurationsRequestTest.java b/sdks/java/src/test/java/com/thoughtspot/client/model/DeleteWebhookConfigurationsRequestTest.java new file mode 100644 index 000000000..cb0c6bf3e --- /dev/null +++ b/sdks/java/src/test/java/com/thoughtspot/client/model/DeleteWebhookConfigurationsRequestTest.java @@ -0,0 +1,25 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client.model; + +import org.junit.jupiter.api.Test; + +/** Model tests for DeleteWebhookConfigurationsRequest */ +public class DeleteWebhookConfigurationsRequestTest { + private final DeleteWebhookConfigurationsRequest model = + new DeleteWebhookConfigurationsRequest(); + + /** Model tests for DeleteWebhookConfigurationsRequest */ + @Test + public void testDeleteWebhookConfigurationsRequest() { + // TODO: test DeleteWebhookConfigurationsRequest + } + + /** Test the property 'webhookIdentifiers' */ + @Test + public void webhookIdentifiersTest() { + // TODO: test webhookIdentifiers + } +} diff --git a/sdks/java/src/test/java/com/thoughtspot/client/model/DeployCommitRequestTest.java b/sdks/java/src/test/java/com/thoughtspot/client/model/DeployCommitRequestTest.java new file mode 100644 index 000000000..2f7846e8a --- /dev/null +++ b/sdks/java/src/test/java/com/thoughtspot/client/model/DeployCommitRequestTest.java @@ -0,0 +1,42 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client.model; + +import org.junit.jupiter.api.Test; + +/** Model tests for DeployCommitRequest */ +public class DeployCommitRequestTest { + private final DeployCommitRequest model = new DeployCommitRequest(); + + /** Model tests for DeployCommitRequest */ + @Test + public void testDeployCommitRequest() { + // TODO: test DeployCommitRequest + } + + /** Test the property 'commitId' */ + @Test + public void commitIdTest() { + // TODO: test commitId + } + + /** Test the property 'branchName' */ + @Test + public void branchNameTest() { + // TODO: test branchName + } + + /** Test the property 'deployType' */ + @Test + public void deployTypeTest() { + // TODO: test deployType + } + + /** Test the property 'deployPolicy' */ + @Test + public void deployPolicyTest() { + // TODO: test deployPolicy + } +} diff --git a/sdks/java/src/test/java/com/thoughtspot/client/model/DeployResponseTest.java b/sdks/java/src/test/java/com/thoughtspot/client/model/DeployResponseTest.java new file mode 100644 index 000000000..5bea96810 --- /dev/null +++ b/sdks/java/src/test/java/com/thoughtspot/client/model/DeployResponseTest.java @@ -0,0 +1,48 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client.model; + +import org.junit.jupiter.api.Test; + +/** Model tests for DeployResponse */ +public class DeployResponseTest { + private final DeployResponse model = new DeployResponse(); + + /** Model tests for DeployResponse */ + @Test + public void testDeployResponse() { + // TODO: test DeployResponse + } + + /** Test the property 'fileName' */ + @Test + public void fileNameTest() { + // TODO: test fileName + } + + /** Test the property 'metadataName' */ + @Test + public void metadataNameTest() { + // TODO: test metadataName + } + + /** Test the property 'metadataType' */ + @Test + public void metadataTypeTest() { + // TODO: test metadataType + } + + /** Test the property 'statusCode' */ + @Test + public void statusCodeTest() { + // TODO: test statusCode + } + + /** Test the property 'statusMessage' */ + @Test + public void statusMessageTest() { + // TODO: test statusMessage + } +} diff --git a/sdks/java/src/test/java/com/thoughtspot/client/model/EntityHeaderTest.java b/sdks/java/src/test/java/com/thoughtspot/client/model/EntityHeaderTest.java new file mode 100644 index 000000000..212689539 --- /dev/null +++ b/sdks/java/src/test/java/com/thoughtspot/client/model/EntityHeaderTest.java @@ -0,0 +1,36 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client.model; + +import org.junit.jupiter.api.Test; + +/** Model tests for EntityHeader */ +public class EntityHeaderTest { + private final EntityHeader model = new EntityHeader(); + + /** Model tests for EntityHeader */ + @Test + public void testEntityHeader() { + // TODO: test EntityHeader + } + + /** Test the property 'description' */ + @Test + public void descriptionTest() { + // TODO: test description + } + + /** Test the property 'dataSourceName' */ + @Test + public void dataSourceNameTest() { + // TODO: test dataSourceName + } + + /** Test the property 'dataSourceIdentifier' */ + @Test + public void dataSourceIdentifierTest() { + // TODO: test dataSourceIdentifier + } +} diff --git a/sdks/java/src/test/java/com/thoughtspot/client/model/ErrorResponseTest.java b/sdks/java/src/test/java/com/thoughtspot/client/model/ErrorResponseTest.java new file mode 100644 index 000000000..2709eceb8 --- /dev/null +++ b/sdks/java/src/test/java/com/thoughtspot/client/model/ErrorResponseTest.java @@ -0,0 +1,24 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client.model; + +import org.junit.jupiter.api.Test; + +/** Model tests for ErrorResponse */ +public class ErrorResponseTest { + private final ErrorResponse model = new ErrorResponse(); + + /** Model tests for ErrorResponse */ + @Test + public void testErrorResponse() { + // TODO: test ErrorResponse + } + + /** Test the property 'error' */ + @Test + public void errorTest() { + // TODO: test error + } +} diff --git a/sdks/java/src/test/java/com/thoughtspot/client/model/EurekaDataSourceSuggestionResponseTest.java b/sdks/java/src/test/java/com/thoughtspot/client/model/EurekaDataSourceSuggestionResponseTest.java new file mode 100644 index 000000000..2ce83268c --- /dev/null +++ b/sdks/java/src/test/java/com/thoughtspot/client/model/EurekaDataSourceSuggestionResponseTest.java @@ -0,0 +1,25 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client.model; + +import org.junit.jupiter.api.Test; + +/** Model tests for EurekaDataSourceSuggestionResponse */ +public class EurekaDataSourceSuggestionResponseTest { + private final EurekaDataSourceSuggestionResponse model = + new EurekaDataSourceSuggestionResponse(); + + /** Model tests for EurekaDataSourceSuggestionResponse */ + @Test + public void testEurekaDataSourceSuggestionResponse() { + // TODO: test EurekaDataSourceSuggestionResponse + } + + /** Test the property 'dataSources' */ + @Test + public void dataSourcesTest() { + // TODO: test dataSources + } +} diff --git a/sdks/java/src/test/java/com/thoughtspot/client/model/EurekaDecomposeQueryResponseTest.java b/sdks/java/src/test/java/com/thoughtspot/client/model/EurekaDecomposeQueryResponseTest.java new file mode 100644 index 000000000..015c40391 --- /dev/null +++ b/sdks/java/src/test/java/com/thoughtspot/client/model/EurekaDecomposeQueryResponseTest.java @@ -0,0 +1,24 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client.model; + +import org.junit.jupiter.api.Test; + +/** Model tests for EurekaDecomposeQueryResponse */ +public class EurekaDecomposeQueryResponseTest { + private final EurekaDecomposeQueryResponse model = new EurekaDecomposeQueryResponse(); + + /** Model tests for EurekaDecomposeQueryResponse */ + @Test + public void testEurekaDecomposeQueryResponse() { + // TODO: test EurekaDecomposeQueryResponse + } + + /** Test the property 'decomposedQueryResponse' */ + @Test + public void decomposedQueryResponseTest() { + // TODO: test decomposedQueryResponse + } +} diff --git a/sdks/java/src/test/java/com/thoughtspot/client/model/EurekaGetNLInstructionsResponseTest.java b/sdks/java/src/test/java/com/thoughtspot/client/model/EurekaGetNLInstructionsResponseTest.java new file mode 100644 index 000000000..b8cf22374 --- /dev/null +++ b/sdks/java/src/test/java/com/thoughtspot/client/model/EurekaGetNLInstructionsResponseTest.java @@ -0,0 +1,24 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client.model; + +import org.junit.jupiter.api.Test; + +/** Model tests for EurekaGetNLInstructionsResponse */ +public class EurekaGetNLInstructionsResponseTest { + private final EurekaGetNLInstructionsResponse model = new EurekaGetNLInstructionsResponse(); + + /** Model tests for EurekaGetNLInstructionsResponse */ + @Test + public void testEurekaGetNLInstructionsResponse() { + // TODO: test EurekaGetNLInstructionsResponse + } + + /** Test the property 'nlInstructionsInfo' */ + @Test + public void nlInstructionsInfoTest() { + // TODO: test nlInstructionsInfo + } +} diff --git a/sdks/java/src/test/java/com/thoughtspot/client/model/EurekaGetRelevantQuestionsResponseTest.java b/sdks/java/src/test/java/com/thoughtspot/client/model/EurekaGetRelevantQuestionsResponseTest.java new file mode 100644 index 000000000..b8928780b --- /dev/null +++ b/sdks/java/src/test/java/com/thoughtspot/client/model/EurekaGetRelevantQuestionsResponseTest.java @@ -0,0 +1,25 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client.model; + +import org.junit.jupiter.api.Test; + +/** Model tests for EurekaGetRelevantQuestionsResponse */ +public class EurekaGetRelevantQuestionsResponseTest { + private final EurekaGetRelevantQuestionsResponse model = + new EurekaGetRelevantQuestionsResponse(); + + /** Model tests for EurekaGetRelevantQuestionsResponse */ + @Test + public void testEurekaGetRelevantQuestionsResponse() { + // TODO: test EurekaGetRelevantQuestionsResponse + } + + /** Test the property 'relevantQuestions' */ + @Test + public void relevantQuestionsTest() { + // TODO: test relevantQuestions + } +} diff --git a/sdks/java/src/test/java/com/thoughtspot/client/model/EurekaLLMDecomposeQueryResponseTest.java b/sdks/java/src/test/java/com/thoughtspot/client/model/EurekaLLMDecomposeQueryResponseTest.java new file mode 100644 index 000000000..33bf26361 --- /dev/null +++ b/sdks/java/src/test/java/com/thoughtspot/client/model/EurekaLLMDecomposeQueryResponseTest.java @@ -0,0 +1,24 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client.model; + +import org.junit.jupiter.api.Test; + +/** Model tests for EurekaLLMDecomposeQueryResponse */ +public class EurekaLLMDecomposeQueryResponseTest { + private final EurekaLLMDecomposeQueryResponse model = new EurekaLLMDecomposeQueryResponse(); + + /** Model tests for EurekaLLMDecomposeQueryResponse */ + @Test + public void testEurekaLLMDecomposeQueryResponse() { + // TODO: test EurekaLLMDecomposeQueryResponse + } + + /** Test the property 'decomposedQueries' */ + @Test + public void decomposedQueriesTest() { + // TODO: test decomposedQueries + } +} diff --git a/sdks/java/src/test/java/com/thoughtspot/client/model/EurekaLLMSuggestedQueryTest.java b/sdks/java/src/test/java/com/thoughtspot/client/model/EurekaLLMSuggestedQueryTest.java new file mode 100644 index 000000000..1062f9869 --- /dev/null +++ b/sdks/java/src/test/java/com/thoughtspot/client/model/EurekaLLMSuggestedQueryTest.java @@ -0,0 +1,36 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client.model; + +import org.junit.jupiter.api.Test; + +/** Model tests for EurekaLLMSuggestedQuery */ +public class EurekaLLMSuggestedQueryTest { + private final EurekaLLMSuggestedQuery model = new EurekaLLMSuggestedQuery(); + + /** Model tests for EurekaLLMSuggestedQuery */ + @Test + public void testEurekaLLMSuggestedQuery() { + // TODO: test EurekaLLMSuggestedQuery + } + + /** Test the property 'query' */ + @Test + public void queryTest() { + // TODO: test query + } + + /** Test the property 'worksheetId' */ + @Test + public void worksheetIdTest() { + // TODO: test worksheetId + } + + /** Test the property 'worksheetName' */ + @Test + public void worksheetNameTest() { + // TODO: test worksheetName + } +} diff --git a/sdks/java/src/test/java/com/thoughtspot/client/model/EurekaRelevantQuestionTest.java b/sdks/java/src/test/java/com/thoughtspot/client/model/EurekaRelevantQuestionTest.java new file mode 100644 index 000000000..b07cdc44b --- /dev/null +++ b/sdks/java/src/test/java/com/thoughtspot/client/model/EurekaRelevantQuestionTest.java @@ -0,0 +1,36 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client.model; + +import org.junit.jupiter.api.Test; + +/** Model tests for EurekaRelevantQuestion */ +public class EurekaRelevantQuestionTest { + private final EurekaRelevantQuestion model = new EurekaRelevantQuestion(); + + /** Model tests for EurekaRelevantQuestion */ + @Test + public void testEurekaRelevantQuestion() { + // TODO: test EurekaRelevantQuestion + } + + /** Test the property 'query' */ + @Test + public void queryTest() { + // TODO: test query + } + + /** Test the property 'dataSourceIdentifier' */ + @Test + public void dataSourceIdentifierTest() { + // TODO: test dataSourceIdentifier + } + + /** Test the property 'dataSourceName' */ + @Test + public void dataSourceNameTest() { + // TODO: test dataSourceName + } +} diff --git a/sdks/java/src/test/java/com/thoughtspot/client/model/EurekaSetNLInstructionsResponseTest.java b/sdks/java/src/test/java/com/thoughtspot/client/model/EurekaSetNLInstructionsResponseTest.java new file mode 100644 index 000000000..3769e05ea --- /dev/null +++ b/sdks/java/src/test/java/com/thoughtspot/client/model/EurekaSetNLInstructionsResponseTest.java @@ -0,0 +1,24 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client.model; + +import org.junit.jupiter.api.Test; + +/** Model tests for EurekaSetNLInstructionsResponse */ +public class EurekaSetNLInstructionsResponseTest { + private final EurekaSetNLInstructionsResponse model = new EurekaSetNLInstructionsResponse(); + + /** Model tests for EurekaSetNLInstructionsResponse */ + @Test + public void testEurekaSetNLInstructionsResponse() { + // TODO: test EurekaSetNLInstructionsResponse + } + + /** Test the property 'success' */ + @Test + public void successTest() { + // TODO: test success + } +} diff --git a/sdks/java/src/test/java/com/thoughtspot/client/model/EventChannelConfigInputTest.java b/sdks/java/src/test/java/com/thoughtspot/client/model/EventChannelConfigInputTest.java new file mode 100644 index 000000000..daefae038 --- /dev/null +++ b/sdks/java/src/test/java/com/thoughtspot/client/model/EventChannelConfigInputTest.java @@ -0,0 +1,30 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client.model; + +import org.junit.jupiter.api.Test; + +/** Model tests for EventChannelConfigInput */ +public class EventChannelConfigInputTest { + private final EventChannelConfigInput model = new EventChannelConfigInput(); + + /** Model tests for EventChannelConfigInput */ + @Test + public void testEventChannelConfigInput() { + // TODO: test EventChannelConfigInput + } + + /** Test the property 'eventType' */ + @Test + public void eventTypeTest() { + // TODO: test eventType + } + + /** Test the property 'channels' */ + @Test + public void channelsTest() { + // TODO: test channels + } +} diff --git a/sdks/java/src/test/java/com/thoughtspot/client/model/EventChannelConfigTest.java b/sdks/java/src/test/java/com/thoughtspot/client/model/EventChannelConfigTest.java new file mode 100644 index 000000000..c07287999 --- /dev/null +++ b/sdks/java/src/test/java/com/thoughtspot/client/model/EventChannelConfigTest.java @@ -0,0 +1,30 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client.model; + +import org.junit.jupiter.api.Test; + +/** Model tests for EventChannelConfig */ +public class EventChannelConfigTest { + private final EventChannelConfig model = new EventChannelConfig(); + + /** Model tests for EventChannelConfig */ + @Test + public void testEventChannelConfig() { + // TODO: test EventChannelConfig + } + + /** Test the property 'eventType' */ + @Test + public void eventTypeTest() { + // TODO: test eventType + } + + /** Test the property 'channels' */ + @Test + public void channelsTest() { + // TODO: test channels + } +} diff --git a/sdks/java/src/test/java/com/thoughtspot/client/model/ExcludeMetadataListItemInputTest.java b/sdks/java/src/test/java/com/thoughtspot/client/model/ExcludeMetadataListItemInputTest.java new file mode 100644 index 000000000..d8674285c --- /dev/null +++ b/sdks/java/src/test/java/com/thoughtspot/client/model/ExcludeMetadataListItemInputTest.java @@ -0,0 +1,30 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client.model; + +import org.junit.jupiter.api.Test; + +/** Model tests for ExcludeMetadataListItemInput */ +public class ExcludeMetadataListItemInputTest { + private final ExcludeMetadataListItemInput model = new ExcludeMetadataListItemInput(); + + /** Model tests for ExcludeMetadataListItemInput */ + @Test + public void testExcludeMetadataListItemInput() { + // TODO: test ExcludeMetadataListItemInput + } + + /** Test the property 'identifier' */ + @Test + public void identifierTest() { + // TODO: test identifier + } + + /** Test the property 'type' */ + @Test + public void typeTest() { + // TODO: test type + } +} diff --git a/sdks/java/src/test/java/com/thoughtspot/client/model/ExportAnswerReportRequestTest.java b/sdks/java/src/test/java/com/thoughtspot/client/model/ExportAnswerReportRequestTest.java new file mode 100644 index 000000000..2b44a3409 --- /dev/null +++ b/sdks/java/src/test/java/com/thoughtspot/client/model/ExportAnswerReportRequestTest.java @@ -0,0 +1,84 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client.model; + +import org.junit.jupiter.api.Test; + +/** Model tests for ExportAnswerReportRequest */ +public class ExportAnswerReportRequestTest { + private final ExportAnswerReportRequest model = new ExportAnswerReportRequest(); + + /** Model tests for ExportAnswerReportRequest */ + @Test + public void testExportAnswerReportRequest() { + // TODO: test ExportAnswerReportRequest + } + + /** Test the property 'metadataIdentifier' */ + @Test + public void metadataIdentifierTest() { + // TODO: test metadataIdentifier + } + + /** Test the property 'sessionIdentifier' */ + @Test + public void sessionIdentifierTest() { + // TODO: test sessionIdentifier + } + + /** Test the property 'generationNumber' */ + @Test + public void generationNumberTest() { + // TODO: test generationNumber + } + + /** Test the property 'fileFormat' */ + @Test + public void fileFormatTest() { + // TODO: test fileFormat + } + + /** Test the property 'runtimeFilter' */ + @Test + public void runtimeFilterTest() { + // TODO: test runtimeFilter + } + + /** Test the property 'runtimeSort' */ + @Test + public void runtimeSortTest() { + // TODO: test runtimeSort + } + + /** Test the property 'runtimeParamOverride' */ + @Test + public void runtimeParamOverrideTest() { + // TODO: test runtimeParamOverride + } + + /** Test the property 'regionalSettings' */ + @Test + public void regionalSettingsTest() { + // TODO: test regionalSettings + } + + /** Test the property 'pngOptions' */ + @Test + public void pngOptionsTest() { + // TODO: test pngOptions + } + + /** Test the property 'personalisedViewIdentifier' */ + @Test + public void personalisedViewIdentifierTest() { + // TODO: test personalisedViewIdentifier + } + + /** Test the property 'type' */ + @Test + public void typeTest() { + // TODO: test type + } +} diff --git a/sdks/java/src/test/java/com/thoughtspot/client/model/ExportLiveboardReportRequestTest.java b/sdks/java/src/test/java/com/thoughtspot/client/model/ExportLiveboardReportRequestTest.java new file mode 100644 index 000000000..905e18137 --- /dev/null +++ b/sdks/java/src/test/java/com/thoughtspot/client/model/ExportLiveboardReportRequestTest.java @@ -0,0 +1,96 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client.model; + +import org.junit.jupiter.api.Test; + +/** Model tests for ExportLiveboardReportRequest */ +public class ExportLiveboardReportRequestTest { + private final ExportLiveboardReportRequest model = new ExportLiveboardReportRequest(); + + /** Model tests for ExportLiveboardReportRequest */ + @Test + public void testExportLiveboardReportRequest() { + // TODO: test ExportLiveboardReportRequest + } + + /** Test the property 'metadataIdentifier' */ + @Test + public void metadataIdentifierTest() { + // TODO: test metadataIdentifier + } + + /** Test the property 'tabIdentifiers' */ + @Test + public void tabIdentifiersTest() { + // TODO: test tabIdentifiers + } + + /** Test the property 'personalisedViewIdentifier' */ + @Test + public void personalisedViewIdentifierTest() { + // TODO: test personalisedViewIdentifier + } + + /** Test the property 'visualizationIdentifiers' */ + @Test + public void visualizationIdentifiersTest() { + // TODO: test visualizationIdentifiers + } + + /** Test the property 'transientContent' */ + @Test + public void transientContentTest() { + // TODO: test transientContent + } + + /** Test the property 'fileFormat' */ + @Test + public void fileFormatTest() { + // TODO: test fileFormat + } + + /** Test the property 'runtimeFilter' */ + @Test + public void runtimeFilterTest() { + // TODO: test runtimeFilter + } + + /** Test the property 'overrideFilters' */ + @Test + public void overrideFiltersTest() { + // TODO: test overrideFilters + } + + /** Test the property 'runtimeSort' */ + @Test + public void runtimeSortTest() { + // TODO: test runtimeSort + } + + /** Test the property 'pdfOptions' */ + @Test + public void pdfOptionsTest() { + // TODO: test pdfOptions + } + + /** Test the property 'pngOptions' */ + @Test + public void pngOptionsTest() { + // TODO: test pngOptions + } + + /** Test the property 'runtimeParamOverride' */ + @Test + public void runtimeParamOverrideTest() { + // TODO: test runtimeParamOverride + } + + /** Test the property 'regionalSettings' */ + @Test + public void regionalSettingsTest() { + // TODO: test regionalSettings + } +} diff --git a/sdks/java/src/test/java/com/thoughtspot/client/model/ExportMetadataTMLBatchedRequestTest.java b/sdks/java/src/test/java/com/thoughtspot/client/model/ExportMetadataTMLBatchedRequestTest.java new file mode 100644 index 000000000..40108c659 --- /dev/null +++ b/sdks/java/src/test/java/com/thoughtspot/client/model/ExportMetadataTMLBatchedRequestTest.java @@ -0,0 +1,54 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client.model; + +import org.junit.jupiter.api.Test; + +/** Model tests for ExportMetadataTMLBatchedRequest */ +public class ExportMetadataTMLBatchedRequestTest { + private final ExportMetadataTMLBatchedRequest model = new ExportMetadataTMLBatchedRequest(); + + /** Model tests for ExportMetadataTMLBatchedRequest */ + @Test + public void testExportMetadataTMLBatchedRequest() { + // TODO: test ExportMetadataTMLBatchedRequest + } + + /** Test the property 'metadataType' */ + @Test + public void metadataTypeTest() { + // TODO: test metadataType + } + + /** Test the property 'batchOffset' */ + @Test + public void batchOffsetTest() { + // TODO: test batchOffset + } + + /** Test the property 'batchSize' */ + @Test + public void batchSizeTest() { + // TODO: test batchSize + } + + /** Test the property 'edocFormat' */ + @Test + public void edocFormatTest() { + // TODO: test edocFormat + } + + /** Test the property 'exportDependent' */ + @Test + public void exportDependentTest() { + // TODO: test exportDependent + } + + /** Test the property 'allOrgsOverride' */ + @Test + public void allOrgsOverrideTest() { + // TODO: test allOrgsOverride + } +} diff --git a/sdks/java/src/test/java/com/thoughtspot/client/model/ExportMetadataTMLRequestTest.java b/sdks/java/src/test/java/com/thoughtspot/client/model/ExportMetadataTMLRequestTest.java new file mode 100644 index 000000000..5cfb8623c --- /dev/null +++ b/sdks/java/src/test/java/com/thoughtspot/client/model/ExportMetadataTMLRequestTest.java @@ -0,0 +1,72 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client.model; + +import org.junit.jupiter.api.Test; + +/** Model tests for ExportMetadataTMLRequest */ +public class ExportMetadataTMLRequestTest { + private final ExportMetadataTMLRequest model = new ExportMetadataTMLRequest(); + + /** Model tests for ExportMetadataTMLRequest */ + @Test + public void testExportMetadataTMLRequest() { + // TODO: test ExportMetadataTMLRequest + } + + /** Test the property 'metadata' */ + @Test + public void metadataTest() { + // TODO: test metadata + } + + /** Test the property 'exportAssociated' */ + @Test + public void exportAssociatedTest() { + // TODO: test exportAssociated + } + + /** Test the property 'exportFqn' */ + @Test + public void exportFqnTest() { + // TODO: test exportFqn + } + + /** Test the property 'edocFormat' */ + @Test + public void edocFormatTest() { + // TODO: test edocFormat + } + + /** Test the property 'exportSchemaVersion' */ + @Test + public void exportSchemaVersionTest() { + // TODO: test exportSchemaVersion + } + + /** Test the property 'exportDependent' */ + @Test + public void exportDependentTest() { + // TODO: test exportDependent + } + + /** Test the property 'exportConnectionAsDependent' */ + @Test + public void exportConnectionAsDependentTest() { + // TODO: test exportConnectionAsDependent + } + + /** Test the property 'allOrgsOverride' */ + @Test + public void allOrgsOverrideTest() { + // TODO: test allOrgsOverride + } + + /** Test the property 'exportOptions' */ + @Test + public void exportOptionsTest() { + // TODO: test exportOptions + } +} diff --git a/sdks/java/src/test/java/com/thoughtspot/client/model/ExportMetadataTypeInputTest.java b/sdks/java/src/test/java/com/thoughtspot/client/model/ExportMetadataTypeInputTest.java new file mode 100644 index 000000000..bccfb9a6c --- /dev/null +++ b/sdks/java/src/test/java/com/thoughtspot/client/model/ExportMetadataTypeInputTest.java @@ -0,0 +1,42 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client.model; + +import org.junit.jupiter.api.Test; + +/** Model tests for ExportMetadataTypeInput */ +public class ExportMetadataTypeInputTest { + private final ExportMetadataTypeInput model = new ExportMetadataTypeInput(); + + /** Model tests for ExportMetadataTypeInput */ + @Test + public void testExportMetadataTypeInput() { + // TODO: test ExportMetadataTypeInput + } + + /** Test the property 'type' */ + @Test + public void typeTest() { + // TODO: test type + } + + /** Test the property 'identifier' */ + @Test + public void identifierTest() { + // TODO: test identifier + } + + /** Test the property 'sessionIdentifier' */ + @Test + public void sessionIdentifierTest() { + // TODO: test sessionIdentifier + } + + /** Test the property 'generationNumber' */ + @Test + public void generationNumberTest() { + // TODO: test generationNumber + } +} diff --git a/sdks/java/src/test/java/com/thoughtspot/client/model/ExportOptionsTest.java b/sdks/java/src/test/java/com/thoughtspot/client/model/ExportOptionsTest.java new file mode 100644 index 000000000..6ce8ef180 --- /dev/null +++ b/sdks/java/src/test/java/com/thoughtspot/client/model/ExportOptionsTest.java @@ -0,0 +1,54 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client.model; + +import org.junit.jupiter.api.Test; + +/** Model tests for ExportOptions */ +public class ExportOptionsTest { + private final ExportOptions model = new ExportOptions(); + + /** Model tests for ExportOptions */ + @Test + public void testExportOptions() { + // TODO: test ExportOptions + } + + /** Test the property 'includeObjIdRef' */ + @Test + public void includeObjIdRefTest() { + // TODO: test includeObjIdRef + } + + /** Test the property 'includeGuid' */ + @Test + public void includeGuidTest() { + // TODO: test includeGuid + } + + /** Test the property 'includeObjId' */ + @Test + public void includeObjIdTest() { + // TODO: test includeObjId + } + + /** Test the property 'exportWithAssociatedFeedbacks' */ + @Test + public void exportWithAssociatedFeedbacksTest() { + // TODO: test exportWithAssociatedFeedbacks + } + + /** Test the property 'exportColumnSecurityRules' */ + @Test + public void exportColumnSecurityRulesTest() { + // TODO: test exportColumnSecurityRules + } + + /** Test the property 'exportWithColumnAliases' */ + @Test + public void exportWithColumnAliasesTest() { + // TODO: test exportWithColumnAliases + } +} diff --git a/sdks/java/src/test/java/com/thoughtspot/client/model/ExternalTableInputTest.java b/sdks/java/src/test/java/com/thoughtspot/client/model/ExternalTableInputTest.java new file mode 100644 index 000000000..3dcc3e11a --- /dev/null +++ b/sdks/java/src/test/java/com/thoughtspot/client/model/ExternalTableInputTest.java @@ -0,0 +1,42 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client.model; + +import org.junit.jupiter.api.Test; + +/** Model tests for ExternalTableInput */ +public class ExternalTableInputTest { + private final ExternalTableInput model = new ExternalTableInput(); + + /** Model tests for ExternalTableInput */ + @Test + public void testExternalTableInput() { + // TODO: test ExternalTableInput + } + + /** Test the property 'connectionIdentifier' */ + @Test + public void connectionIdentifierTest() { + // TODO: test connectionIdentifier + } + + /** Test the property 'databaseName' */ + @Test + public void databaseNameTest() { + // TODO: test databaseName + } + + /** Test the property 'schemaName' */ + @Test + public void schemaNameTest() { + // TODO: test schemaName + } + + /** Test the property 'tableName' */ + @Test + public void tableNameTest() { + // TODO: test tableName + } +} diff --git a/sdks/java/src/test/java/com/thoughtspot/client/model/FavoriteMetadataInputTest.java b/sdks/java/src/test/java/com/thoughtspot/client/model/FavoriteMetadataInputTest.java new file mode 100644 index 000000000..4d6f71eb9 --- /dev/null +++ b/sdks/java/src/test/java/com/thoughtspot/client/model/FavoriteMetadataInputTest.java @@ -0,0 +1,30 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client.model; + +import org.junit.jupiter.api.Test; + +/** Model tests for FavoriteMetadataInput */ +public class FavoriteMetadataInputTest { + private final FavoriteMetadataInput model = new FavoriteMetadataInput(); + + /** Model tests for FavoriteMetadataInput */ + @Test + public void testFavoriteMetadataInput() { + // TODO: test FavoriteMetadataInput + } + + /** Test the property 'identifier' */ + @Test + public void identifierTest() { + // TODO: test identifier + } + + /** Test the property 'type' */ + @Test + public void typeTest() { + // TODO: test type + } +} diff --git a/sdks/java/src/test/java/com/thoughtspot/client/model/FavoriteMetadataItemTest.java b/sdks/java/src/test/java/com/thoughtspot/client/model/FavoriteMetadataItemTest.java new file mode 100644 index 000000000..965735592 --- /dev/null +++ b/sdks/java/src/test/java/com/thoughtspot/client/model/FavoriteMetadataItemTest.java @@ -0,0 +1,36 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client.model; + +import org.junit.jupiter.api.Test; + +/** Model tests for FavoriteMetadataItem */ +public class FavoriteMetadataItemTest { + private final FavoriteMetadataItem model = new FavoriteMetadataItem(); + + /** Model tests for FavoriteMetadataItem */ + @Test + public void testFavoriteMetadataItem() { + // TODO: test FavoriteMetadataItem + } + + /** Test the property 'id' */ + @Test + public void idTest() { + // TODO: test id + } + + /** Test the property 'name' */ + @Test + public void nameTest() { + // TODO: test name + } + + /** Test the property 'type' */ + @Test + public void typeTest() { + // TODO: test type + } +} diff --git a/sdks/java/src/test/java/com/thoughtspot/client/model/FavoriteObjectOptionsInputTest.java b/sdks/java/src/test/java/com/thoughtspot/client/model/FavoriteObjectOptionsInputTest.java new file mode 100644 index 000000000..8b6ae8dbf --- /dev/null +++ b/sdks/java/src/test/java/com/thoughtspot/client/model/FavoriteObjectOptionsInputTest.java @@ -0,0 +1,30 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client.model; + +import org.junit.jupiter.api.Test; + +/** Model tests for FavoriteObjectOptionsInput */ +public class FavoriteObjectOptionsInputTest { + private final FavoriteObjectOptionsInput model = new FavoriteObjectOptionsInput(); + + /** Model tests for FavoriteObjectOptionsInput */ + @Test + public void testFavoriteObjectOptionsInput() { + // TODO: test FavoriteObjectOptionsInput + } + + /** Test the property 'include' */ + @Test + public void includeTest() { + // TODO: test include + } + + /** Test the property 'userIdentifiers' */ + @Test + public void userIdentifiersTest() { + // TODO: test userIdentifiers + } +} diff --git a/sdks/java/src/test/java/com/thoughtspot/client/model/FetchAnswerDataRequestTest.java b/sdks/java/src/test/java/com/thoughtspot/client/model/FetchAnswerDataRequestTest.java new file mode 100644 index 000000000..3456c8439 --- /dev/null +++ b/sdks/java/src/test/java/com/thoughtspot/client/model/FetchAnswerDataRequestTest.java @@ -0,0 +1,60 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client.model; + +import org.junit.jupiter.api.Test; + +/** Model tests for FetchAnswerDataRequest */ +public class FetchAnswerDataRequestTest { + private final FetchAnswerDataRequest model = new FetchAnswerDataRequest(); + + /** Model tests for FetchAnswerDataRequest */ + @Test + public void testFetchAnswerDataRequest() { + // TODO: test FetchAnswerDataRequest + } + + /** Test the property 'metadataIdentifier' */ + @Test + public void metadataIdentifierTest() { + // TODO: test metadataIdentifier + } + + /** Test the property 'dataFormat' */ + @Test + public void dataFormatTest() { + // TODO: test dataFormat + } + + /** Test the property 'recordOffset' */ + @Test + public void recordOffsetTest() { + // TODO: test recordOffset + } + + /** Test the property 'recordSize' */ + @Test + public void recordSizeTest() { + // TODO: test recordSize + } + + /** Test the property 'runtimeFilter' */ + @Test + public void runtimeFilterTest() { + // TODO: test runtimeFilter + } + + /** Test the property 'runtimeSort' */ + @Test + public void runtimeSortTest() { + // TODO: test runtimeSort + } + + /** Test the property 'runtimeParamOverride' */ + @Test + public void runtimeParamOverrideTest() { + // TODO: test runtimeParamOverride + } +} diff --git a/sdks/java/src/test/java/com/thoughtspot/client/model/FetchAnswerSqlQueryRequestTest.java b/sdks/java/src/test/java/com/thoughtspot/client/model/FetchAnswerSqlQueryRequestTest.java new file mode 100644 index 000000000..ce5368b9b --- /dev/null +++ b/sdks/java/src/test/java/com/thoughtspot/client/model/FetchAnswerSqlQueryRequestTest.java @@ -0,0 +1,24 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client.model; + +import org.junit.jupiter.api.Test; + +/** Model tests for FetchAnswerSqlQueryRequest */ +public class FetchAnswerSqlQueryRequestTest { + private final FetchAnswerSqlQueryRequest model = new FetchAnswerSqlQueryRequest(); + + /** Model tests for FetchAnswerSqlQueryRequest */ + @Test + public void testFetchAnswerSqlQueryRequest() { + // TODO: test FetchAnswerSqlQueryRequest + } + + /** Test the property 'metadataIdentifier' */ + @Test + public void metadataIdentifierTest() { + // TODO: test metadataIdentifier + } +} diff --git a/sdks/java/src/test/java/com/thoughtspot/client/model/FetchAsyncImportTaskStatusRequestTest.java b/sdks/java/src/test/java/com/thoughtspot/client/model/FetchAsyncImportTaskStatusRequestTest.java new file mode 100644 index 000000000..50e4eceeb --- /dev/null +++ b/sdks/java/src/test/java/com/thoughtspot/client/model/FetchAsyncImportTaskStatusRequestTest.java @@ -0,0 +1,54 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client.model; + +import org.junit.jupiter.api.Test; + +/** Model tests for FetchAsyncImportTaskStatusRequest */ +public class FetchAsyncImportTaskStatusRequestTest { + private final FetchAsyncImportTaskStatusRequest model = new FetchAsyncImportTaskStatusRequest(); + + /** Model tests for FetchAsyncImportTaskStatusRequest */ + @Test + public void testFetchAsyncImportTaskStatusRequest() { + // TODO: test FetchAsyncImportTaskStatusRequest + } + + /** Test the property 'taskIds' */ + @Test + public void taskIdsTest() { + // TODO: test taskIds + } + + /** Test the property 'taskStatus' */ + @Test + public void taskStatusTest() { + // TODO: test taskStatus + } + + /** Test the property 'authorIdentifier' */ + @Test + public void authorIdentifierTest() { + // TODO: test authorIdentifier + } + + /** Test the property 'recordOffset' */ + @Test + public void recordOffsetTest() { + // TODO: test recordOffset + } + + /** Test the property 'recordSize' */ + @Test + public void recordSizeTest() { + // TODO: test recordSize + } + + /** Test the property 'includeImportResponse' */ + @Test + public void includeImportResponseTest() { + // TODO: test includeImportResponse + } +} diff --git a/sdks/java/src/test/java/com/thoughtspot/client/model/FetchColumnSecurityRulesRequestTest.java b/sdks/java/src/test/java/com/thoughtspot/client/model/FetchColumnSecurityRulesRequestTest.java new file mode 100644 index 000000000..395eeaf1d --- /dev/null +++ b/sdks/java/src/test/java/com/thoughtspot/client/model/FetchColumnSecurityRulesRequestTest.java @@ -0,0 +1,24 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client.model; + +import org.junit.jupiter.api.Test; + +/** Model tests for FetchColumnSecurityRulesRequest */ +public class FetchColumnSecurityRulesRequestTest { + private final FetchColumnSecurityRulesRequest model = new FetchColumnSecurityRulesRequest(); + + /** Model tests for FetchColumnSecurityRulesRequest */ + @Test + public void testFetchColumnSecurityRulesRequest() { + // TODO: test FetchColumnSecurityRulesRequest + } + + /** Test the property 'tables' */ + @Test + public void tablesTest() { + // TODO: test tables + } +} diff --git a/sdks/java/src/test/java/com/thoughtspot/client/model/FetchConnectionDiffStatusResponseTest.java b/sdks/java/src/test/java/com/thoughtspot/client/model/FetchConnectionDiffStatusResponseTest.java new file mode 100644 index 000000000..b64f58e4e --- /dev/null +++ b/sdks/java/src/test/java/com/thoughtspot/client/model/FetchConnectionDiffStatusResponseTest.java @@ -0,0 +1,24 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client.model; + +import org.junit.jupiter.api.Test; + +/** Model tests for FetchConnectionDiffStatusResponse */ +public class FetchConnectionDiffStatusResponseTest { + private final FetchConnectionDiffStatusResponse model = new FetchConnectionDiffStatusResponse(); + + /** Model tests for FetchConnectionDiffStatusResponse */ + @Test + public void testFetchConnectionDiffStatusResponse() { + // TODO: test FetchConnectionDiffStatusResponse + } + + /** Test the property 'status' */ + @Test + public void statusTest() { + // TODO: test status + } +} diff --git a/sdks/java/src/test/java/com/thoughtspot/client/model/FetchLiveboardDataRequestTest.java b/sdks/java/src/test/java/com/thoughtspot/client/model/FetchLiveboardDataRequestTest.java new file mode 100644 index 000000000..1a9536954 --- /dev/null +++ b/sdks/java/src/test/java/com/thoughtspot/client/model/FetchLiveboardDataRequestTest.java @@ -0,0 +1,72 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client.model; + +import org.junit.jupiter.api.Test; + +/** Model tests for FetchLiveboardDataRequest */ +public class FetchLiveboardDataRequestTest { + private final FetchLiveboardDataRequest model = new FetchLiveboardDataRequest(); + + /** Model tests for FetchLiveboardDataRequest */ + @Test + public void testFetchLiveboardDataRequest() { + // TODO: test FetchLiveboardDataRequest + } + + /** Test the property 'metadataIdentifier' */ + @Test + public void metadataIdentifierTest() { + // TODO: test metadataIdentifier + } + + /** Test the property 'visualizationIdentifiers' */ + @Test + public void visualizationIdentifiersTest() { + // TODO: test visualizationIdentifiers + } + + /** Test the property 'transientContent' */ + @Test + public void transientContentTest() { + // TODO: test transientContent + } + + /** Test the property 'dataFormat' */ + @Test + public void dataFormatTest() { + // TODO: test dataFormat + } + + /** Test the property 'recordOffset' */ + @Test + public void recordOffsetTest() { + // TODO: test recordOffset + } + + /** Test the property 'recordSize' */ + @Test + public void recordSizeTest() { + // TODO: test recordSize + } + + /** Test the property 'runtimeFilter' */ + @Test + public void runtimeFilterTest() { + // TODO: test runtimeFilter + } + + /** Test the property 'runtimeSort' */ + @Test + public void runtimeSortTest() { + // TODO: test runtimeSort + } + + /** Test the property 'runtimeParamOverride' */ + @Test + public void runtimeParamOverrideTest() { + // TODO: test runtimeParamOverride + } +} diff --git a/sdks/java/src/test/java/com/thoughtspot/client/model/FetchLiveboardSqlQueryRequestTest.java b/sdks/java/src/test/java/com/thoughtspot/client/model/FetchLiveboardSqlQueryRequestTest.java new file mode 100644 index 000000000..d3f7df868 --- /dev/null +++ b/sdks/java/src/test/java/com/thoughtspot/client/model/FetchLiveboardSqlQueryRequestTest.java @@ -0,0 +1,30 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client.model; + +import org.junit.jupiter.api.Test; + +/** Model tests for FetchLiveboardSqlQueryRequest */ +public class FetchLiveboardSqlQueryRequestTest { + private final FetchLiveboardSqlQueryRequest model = new FetchLiveboardSqlQueryRequest(); + + /** Model tests for FetchLiveboardSqlQueryRequest */ + @Test + public void testFetchLiveboardSqlQueryRequest() { + // TODO: test FetchLiveboardSqlQueryRequest + } + + /** Test the property 'metadataIdentifier' */ + @Test + public void metadataIdentifierTest() { + // TODO: test metadataIdentifier + } + + /** Test the property 'visualizationIdentifiers' */ + @Test + public void visualizationIdentifiersTest() { + // TODO: test visualizationIdentifiers + } +} diff --git a/sdks/java/src/test/java/com/thoughtspot/client/model/FetchLogsRequestTest.java b/sdks/java/src/test/java/com/thoughtspot/client/model/FetchLogsRequestTest.java new file mode 100644 index 000000000..6400f5de0 --- /dev/null +++ b/sdks/java/src/test/java/com/thoughtspot/client/model/FetchLogsRequestTest.java @@ -0,0 +1,42 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client.model; + +import org.junit.jupiter.api.Test; + +/** Model tests for FetchLogsRequest */ +public class FetchLogsRequestTest { + private final FetchLogsRequest model = new FetchLogsRequest(); + + /** Model tests for FetchLogsRequest */ + @Test + public void testFetchLogsRequest() { + // TODO: test FetchLogsRequest + } + + /** Test the property 'logType' */ + @Test + public void logTypeTest() { + // TODO: test logType + } + + /** Test the property 'startEpochTimeInMillis' */ + @Test + public void startEpochTimeInMillisTest() { + // TODO: test startEpochTimeInMillis + } + + /** Test the property 'endEpochTimeInMillis' */ + @Test + public void endEpochTimeInMillisTest() { + // TODO: test endEpochTimeInMillis + } + + /** Test the property 'getAllLogs' */ + @Test + public void getAllLogsTest() { + // TODO: test getAllLogs + } +} diff --git a/sdks/java/src/test/java/com/thoughtspot/client/model/FetchObjectPrivilegesRequestTest.java b/sdks/java/src/test/java/com/thoughtspot/client/model/FetchObjectPrivilegesRequestTest.java new file mode 100644 index 000000000..a2e23cfc4 --- /dev/null +++ b/sdks/java/src/test/java/com/thoughtspot/client/model/FetchObjectPrivilegesRequestTest.java @@ -0,0 +1,42 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client.model; + +import org.junit.jupiter.api.Test; + +/** Model tests for FetchObjectPrivilegesRequest */ +public class FetchObjectPrivilegesRequestTest { + private final FetchObjectPrivilegesRequest model = new FetchObjectPrivilegesRequest(); + + /** Model tests for FetchObjectPrivilegesRequest */ + @Test + public void testFetchObjectPrivilegesRequest() { + // TODO: test FetchObjectPrivilegesRequest + } + + /** Test the property 'metadata' */ + @Test + public void metadataTest() { + // TODO: test metadata + } + + /** Test the property 'principals' */ + @Test + public void principalsTest() { + // TODO: test principals + } + + /** Test the property 'recordOffset' */ + @Test + public void recordOffsetTest() { + // TODO: test recordOffset + } + + /** Test the property 'recordSize' */ + @Test + public void recordSizeTest() { + // TODO: test recordSize + } +} diff --git a/sdks/java/src/test/java/com/thoughtspot/client/model/FetchPermissionsOfPrincipalsRequestTest.java b/sdks/java/src/test/java/com/thoughtspot/client/model/FetchPermissionsOfPrincipalsRequestTest.java new file mode 100644 index 000000000..4961abdd4 --- /dev/null +++ b/sdks/java/src/test/java/com/thoughtspot/client/model/FetchPermissionsOfPrincipalsRequestTest.java @@ -0,0 +1,49 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client.model; + +import org.junit.jupiter.api.Test; + +/** Model tests for FetchPermissionsOfPrincipalsRequest */ +public class FetchPermissionsOfPrincipalsRequestTest { + private final FetchPermissionsOfPrincipalsRequest model = + new FetchPermissionsOfPrincipalsRequest(); + + /** Model tests for FetchPermissionsOfPrincipalsRequest */ + @Test + public void testFetchPermissionsOfPrincipalsRequest() { + // TODO: test FetchPermissionsOfPrincipalsRequest + } + + /** Test the property 'principals' */ + @Test + public void principalsTest() { + // TODO: test principals + } + + /** Test the property 'metadata' */ + @Test + public void metadataTest() { + // TODO: test metadata + } + + /** Test the property 'recordOffset' */ + @Test + public void recordOffsetTest() { + // TODO: test recordOffset + } + + /** Test the property 'recordSize' */ + @Test + public void recordSizeTest() { + // TODO: test recordSize + } + + /** Test the property 'defaultMetadataType' */ + @Test + public void defaultMetadataTypeTest() { + // TODO: test defaultMetadataType + } +} diff --git a/sdks/java/src/test/java/com/thoughtspot/client/model/FetchPermissionsOnMetadataRequestTest.java b/sdks/java/src/test/java/com/thoughtspot/client/model/FetchPermissionsOnMetadataRequestTest.java new file mode 100644 index 000000000..3daf0ac3b --- /dev/null +++ b/sdks/java/src/test/java/com/thoughtspot/client/model/FetchPermissionsOnMetadataRequestTest.java @@ -0,0 +1,54 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client.model; + +import org.junit.jupiter.api.Test; + +/** Model tests for FetchPermissionsOnMetadataRequest */ +public class FetchPermissionsOnMetadataRequestTest { + private final FetchPermissionsOnMetadataRequest model = new FetchPermissionsOnMetadataRequest(); + + /** Model tests for FetchPermissionsOnMetadataRequest */ + @Test + public void testFetchPermissionsOnMetadataRequest() { + // TODO: test FetchPermissionsOnMetadataRequest + } + + /** Test the property 'metadata' */ + @Test + public void metadataTest() { + // TODO: test metadata + } + + /** Test the property 'principals' */ + @Test + public void principalsTest() { + // TODO: test principals + } + + /** Test the property 'includeDependentObjects' */ + @Test + public void includeDependentObjectsTest() { + // TODO: test includeDependentObjects + } + + /** Test the property 'recordOffset' */ + @Test + public void recordOffsetTest() { + // TODO: test recordOffset + } + + /** Test the property 'recordSize' */ + @Test + public void recordSizeTest() { + // TODO: test recordSize + } + + /** Test the property 'permissionType' */ + @Test + public void permissionTypeTest() { + // TODO: test permissionType + } +} diff --git a/sdks/java/src/test/java/com/thoughtspot/client/model/FilterRulesTest.java b/sdks/java/src/test/java/com/thoughtspot/client/model/FilterRulesTest.java new file mode 100644 index 000000000..6af9c9d9a --- /dev/null +++ b/sdks/java/src/test/java/com/thoughtspot/client/model/FilterRulesTest.java @@ -0,0 +1,36 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client.model; + +import org.junit.jupiter.api.Test; + +/** Model tests for FilterRules */ +public class FilterRulesTest { + private final FilterRules model = new FilterRules(); + + /** Model tests for FilterRules */ + @Test + public void testFilterRules() { + // TODO: test FilterRules + } + + /** Test the property 'columnName' */ + @Test + public void columnNameTest() { + // TODO: test columnName + } + + /** Test the property 'operator' */ + @Test + public void operatorTest() { + // TODO: test operator + } + + /** Test the property 'values' */ + @Test + public void valuesTest() { + // TODO: test values + } +} diff --git a/sdks/java/src/test/java/com/thoughtspot/client/model/ForceLogoutUsersRequestTest.java b/sdks/java/src/test/java/com/thoughtspot/client/model/ForceLogoutUsersRequestTest.java new file mode 100644 index 000000000..4f5a110f2 --- /dev/null +++ b/sdks/java/src/test/java/com/thoughtspot/client/model/ForceLogoutUsersRequestTest.java @@ -0,0 +1,24 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client.model; + +import org.junit.jupiter.api.Test; + +/** Model tests for ForceLogoutUsersRequest */ +public class ForceLogoutUsersRequestTest { + private final ForceLogoutUsersRequest model = new ForceLogoutUsersRequest(); + + /** Model tests for ForceLogoutUsersRequest */ + @Test + public void testForceLogoutUsersRequest() { + // TODO: test ForceLogoutUsersRequest + } + + /** Test the property 'userIdentifiers' */ + @Test + public void userIdentifiersTest() { + // TODO: test userIdentifiers + } +} diff --git a/sdks/java/src/test/java/com/thoughtspot/client/model/FrequencyInputTest.java b/sdks/java/src/test/java/com/thoughtspot/client/model/FrequencyInputTest.java new file mode 100644 index 000000000..dc9e51eb8 --- /dev/null +++ b/sdks/java/src/test/java/com/thoughtspot/client/model/FrequencyInputTest.java @@ -0,0 +1,24 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client.model; + +import org.junit.jupiter.api.Test; + +/** Model tests for FrequencyInput */ +public class FrequencyInputTest { + private final FrequencyInput model = new FrequencyInput(); + + /** Model tests for FrequencyInput */ + @Test + public void testFrequencyInput() { + // TODO: test FrequencyInput + } + + /** Test the property 'cronExpression' */ + @Test + public void cronExpressionTest() { + // TODO: test cronExpression + } +} diff --git a/sdks/java/src/test/java/com/thoughtspot/client/model/FrequencyTest.java b/sdks/java/src/test/java/com/thoughtspot/client/model/FrequencyTest.java new file mode 100644 index 000000000..d4e891fcb --- /dev/null +++ b/sdks/java/src/test/java/com/thoughtspot/client/model/FrequencyTest.java @@ -0,0 +1,24 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client.model; + +import org.junit.jupiter.api.Test; + +/** Model tests for Frequency */ +public class FrequencyTest { + private final Frequency model = new Frequency(); + + /** Model tests for Frequency */ + @Test + public void testFrequency() { + // TODO: test Frequency + } + + /** Test the property 'cronExpression' */ + @Test + public void cronExpressionTest() { + // TODO: test cronExpression + } +} diff --git a/sdks/java/src/test/java/com/thoughtspot/client/model/GenerateCSVRequestTest.java b/sdks/java/src/test/java/com/thoughtspot/client/model/GenerateCSVRequestTest.java new file mode 100644 index 000000000..e23b5511b --- /dev/null +++ b/sdks/java/src/test/java/com/thoughtspot/client/model/GenerateCSVRequestTest.java @@ -0,0 +1,60 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client.model; + +import org.junit.jupiter.api.Test; + +/** Model tests for GenerateCSVRequest */ +public class GenerateCSVRequestTest { + private final GenerateCSVRequest model = new GenerateCSVRequest(); + + /** Model tests for GenerateCSVRequest */ + @Test + public void testGenerateCSVRequest() { + // TODO: test GenerateCSVRequest + } + + /** Test the property 'startDate' */ + @Test + public void startDateTest() { + // TODO: test startDate + } + + /** Test the property 'endDate' */ + @Test + public void endDateTest() { + // TODO: test endDate + } + + /** Test the property 'calendarType' */ + @Test + public void calendarTypeTest() { + // TODO: test calendarType + } + + /** Test the property 'monthOffset' */ + @Test + public void monthOffsetTest() { + // TODO: test monthOffset + } + + /** Test the property 'startDayOfWeek' */ + @Test + public void startDayOfWeekTest() { + // TODO: test startDayOfWeek + } + + /** Test the property 'quarterNamePrefix' */ + @Test + public void quarterNamePrefixTest() { + // TODO: test quarterNamePrefix + } + + /** Test the property 'yearNamePrefix' */ + @Test + public void yearNamePrefixTest() { + // TODO: test yearNamePrefix + } +} diff --git a/sdks/java/src/test/java/com/thoughtspot/client/model/GenericInfoTest.java b/sdks/java/src/test/java/com/thoughtspot/client/model/GenericInfoTest.java new file mode 100644 index 000000000..1a9956782 --- /dev/null +++ b/sdks/java/src/test/java/com/thoughtspot/client/model/GenericInfoTest.java @@ -0,0 +1,30 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client.model; + +import org.junit.jupiter.api.Test; + +/** Model tests for GenericInfo */ +public class GenericInfoTest { + private final GenericInfo model = new GenericInfo(); + + /** Model tests for GenericInfo */ + @Test + public void testGenericInfo() { + // TODO: test GenericInfo + } + + /** Test the property 'id' */ + @Test + public void idTest() { + // TODO: test id + } + + /** Test the property 'name' */ + @Test + public void nameTest() { + // TODO: test name + } +} diff --git a/sdks/java/src/test/java/com/thoughtspot/client/model/GetAsyncImportStatusResponseTest.java b/sdks/java/src/test/java/com/thoughtspot/client/model/GetAsyncImportStatusResponseTest.java new file mode 100644 index 000000000..a85e81b9d --- /dev/null +++ b/sdks/java/src/test/java/com/thoughtspot/client/model/GetAsyncImportStatusResponseTest.java @@ -0,0 +1,30 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client.model; + +import org.junit.jupiter.api.Test; + +/** Model tests for GetAsyncImportStatusResponse */ +public class GetAsyncImportStatusResponseTest { + private final GetAsyncImportStatusResponse model = new GetAsyncImportStatusResponse(); + + /** Model tests for GetAsyncImportStatusResponse */ + @Test + public void testGetAsyncImportStatusResponse() { + // TODO: test GetAsyncImportStatusResponse + } + + /** Test the property 'statusList' */ + @Test + public void statusListTest() { + // TODO: test statusList + } + + /** Test the property 'lastBatch' */ + @Test + public void lastBatchTest() { + // TODO: test lastBatch + } +} diff --git a/sdks/java/src/test/java/com/thoughtspot/client/model/GetCustomAccessTokenRequestTest.java b/sdks/java/src/test/java/com/thoughtspot/client/model/GetCustomAccessTokenRequestTest.java new file mode 100644 index 000000000..59476339f --- /dev/null +++ b/sdks/java/src/test/java/com/thoughtspot/client/model/GetCustomAccessTokenRequestTest.java @@ -0,0 +1,102 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client.model; + +import org.junit.jupiter.api.Test; + +/** Model tests for GetCustomAccessTokenRequest */ +public class GetCustomAccessTokenRequestTest { + private final GetCustomAccessTokenRequest model = new GetCustomAccessTokenRequest(); + + /** Model tests for GetCustomAccessTokenRequest */ + @Test + public void testGetCustomAccessTokenRequest() { + // TODO: test GetCustomAccessTokenRequest + } + + /** Test the property 'username' */ + @Test + public void usernameTest() { + // TODO: test username + } + + /** Test the property 'password' */ + @Test + public void passwordTest() { + // TODO: test password + } + + /** Test the property 'secretKey' */ + @Test + public void secretKeyTest() { + // TODO: test secretKey + } + + /** Test the property 'validityTimeInSec' */ + @Test + public void validityTimeInSecTest() { + // TODO: test validityTimeInSec + } + + /** Test the property 'orgIdentifier' */ + @Test + public void orgIdentifierTest() { + // TODO: test orgIdentifier + } + + /** Test the property 'persistOption' */ + @Test + public void persistOptionTest() { + // TODO: test persistOption + } + + /** Test the property 'filterRules' */ + @Test + public void filterRulesTest() { + // TODO: test filterRules + } + + /** Test the property 'parameterValues' */ + @Test + public void parameterValuesTest() { + // TODO: test parameterValues + } + + /** Test the property 'variableValues' */ + @Test + public void variableValuesTest() { + // TODO: test variableValues + } + + /** Test the property 'objects' */ + @Test + public void objectsTest() { + // TODO: test objects + } + + /** Test the property 'email' */ + @Test + public void emailTest() { + // TODO: test email + } + + /** Test the property 'displayName' */ + @Test + public void displayNameTest() { + // TODO: test displayName + } + + /** Test the property 'groups' */ + @Test + public void groupsTest() { + // TODO: test groups + } + + /** Test the property 'autoCreate' */ + @Test + public void autoCreateTest() { + // TODO: test autoCreate + } +} diff --git a/sdks/java/src/test/java/com/thoughtspot/client/model/GetDataSourceSuggestionsRequestTest.java b/sdks/java/src/test/java/com/thoughtspot/client/model/GetDataSourceSuggestionsRequestTest.java new file mode 100644 index 000000000..22412d2a1 --- /dev/null +++ b/sdks/java/src/test/java/com/thoughtspot/client/model/GetDataSourceSuggestionsRequestTest.java @@ -0,0 +1,24 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client.model; + +import org.junit.jupiter.api.Test; + +/** Model tests for GetDataSourceSuggestionsRequest */ +public class GetDataSourceSuggestionsRequestTest { + private final GetDataSourceSuggestionsRequest model = new GetDataSourceSuggestionsRequest(); + + /** Model tests for GetDataSourceSuggestionsRequest */ + @Test + public void testGetDataSourceSuggestionsRequest() { + // TODO: test GetDataSourceSuggestionsRequest + } + + /** Test the property 'query' */ + @Test + public void queryTest() { + // TODO: test query + } +} diff --git a/sdks/java/src/test/java/com/thoughtspot/client/model/GetFullAccessTokenRequestTest.java b/sdks/java/src/test/java/com/thoughtspot/client/model/GetFullAccessTokenRequestTest.java new file mode 100644 index 000000000..46df6bf17 --- /dev/null +++ b/sdks/java/src/test/java/com/thoughtspot/client/model/GetFullAccessTokenRequestTest.java @@ -0,0 +1,78 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client.model; + +import org.junit.jupiter.api.Test; + +/** Model tests for GetFullAccessTokenRequest */ +public class GetFullAccessTokenRequestTest { + private final GetFullAccessTokenRequest model = new GetFullAccessTokenRequest(); + + /** Model tests for GetFullAccessTokenRequest */ + @Test + public void testGetFullAccessTokenRequest() { + // TODO: test GetFullAccessTokenRequest + } + + /** Test the property 'username' */ + @Test + public void usernameTest() { + // TODO: test username + } + + /** Test the property 'password' */ + @Test + public void passwordTest() { + // TODO: test password + } + + /** Test the property 'secretKey' */ + @Test + public void secretKeyTest() { + // TODO: test secretKey + } + + /** Test the property 'validityTimeInSec' */ + @Test + public void validityTimeInSecTest() { + // TODO: test validityTimeInSec + } + + /** Test the property 'orgId' */ + @Test + public void orgIdTest() { + // TODO: test orgId + } + + /** Test the property 'email' */ + @Test + public void emailTest() { + // TODO: test email + } + + /** Test the property 'displayName' */ + @Test + public void displayNameTest() { + // TODO: test displayName + } + + /** Test the property 'autoCreate' */ + @Test + public void autoCreateTest() { + // TODO: test autoCreate + } + + /** Test the property 'groupIdentifiers' */ + @Test + public void groupIdentifiersTest() { + // TODO: test groupIdentifiers + } + + /** Test the property 'userParameters' */ + @Test + public void userParametersTest() { + // TODO: test userParameters + } +} diff --git a/sdks/java/src/test/java/com/thoughtspot/client/model/GetNLInstructionsRequestTest.java b/sdks/java/src/test/java/com/thoughtspot/client/model/GetNLInstructionsRequestTest.java new file mode 100644 index 000000000..33c5889cf --- /dev/null +++ b/sdks/java/src/test/java/com/thoughtspot/client/model/GetNLInstructionsRequestTest.java @@ -0,0 +1,24 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client.model; + +import org.junit.jupiter.api.Test; + +/** Model tests for GetNLInstructionsRequest */ +public class GetNLInstructionsRequestTest { + private final GetNLInstructionsRequest model = new GetNLInstructionsRequest(); + + /** Model tests for GetNLInstructionsRequest */ + @Test + public void testGetNLInstructionsRequest() { + // TODO: test GetNLInstructionsRequest + } + + /** Test the property 'dataSourceIdentifier' */ + @Test + public void dataSourceIdentifierTest() { + // TODO: test dataSourceIdentifier + } +} diff --git a/sdks/java/src/test/java/com/thoughtspot/client/model/GetObjectAccessTokenRequestTest.java b/sdks/java/src/test/java/com/thoughtspot/client/model/GetObjectAccessTokenRequestTest.java new file mode 100644 index 000000000..6d4882569 --- /dev/null +++ b/sdks/java/src/test/java/com/thoughtspot/client/model/GetObjectAccessTokenRequestTest.java @@ -0,0 +1,84 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client.model; + +import org.junit.jupiter.api.Test; + +/** Model tests for GetObjectAccessTokenRequest */ +public class GetObjectAccessTokenRequestTest { + private final GetObjectAccessTokenRequest model = new GetObjectAccessTokenRequest(); + + /** Model tests for GetObjectAccessTokenRequest */ + @Test + public void testGetObjectAccessTokenRequest() { + // TODO: test GetObjectAccessTokenRequest + } + + /** Test the property 'username' */ + @Test + public void usernameTest() { + // TODO: test username + } + + /** Test the property 'objectId' */ + @Test + public void objectIdTest() { + // TODO: test objectId + } + + /** Test the property 'password' */ + @Test + public void passwordTest() { + // TODO: test password + } + + /** Test the property 'secretKey' */ + @Test + public void secretKeyTest() { + // TODO: test secretKey + } + + /** Test the property 'validityTimeInSec' */ + @Test + public void validityTimeInSecTest() { + // TODO: test validityTimeInSec + } + + /** Test the property 'orgId' */ + @Test + public void orgIdTest() { + // TODO: test orgId + } + + /** Test the property 'email' */ + @Test + public void emailTest() { + // TODO: test email + } + + /** Test the property 'displayName' */ + @Test + public void displayNameTest() { + // TODO: test displayName + } + + /** Test the property 'autoCreate' */ + @Test + public void autoCreateTest() { + // TODO: test autoCreate + } + + /** Test the property 'groupIdentifiers' */ + @Test + public void groupIdentifiersTest() { + // TODO: test groupIdentifiers + } + + /** Test the property 'userParameters' */ + @Test + public void userParametersTest() { + // TODO: test userParameters + } +} diff --git a/sdks/java/src/test/java/com/thoughtspot/client/model/GetRelevantQuestionsRequestTest.java b/sdks/java/src/test/java/com/thoughtspot/client/model/GetRelevantQuestionsRequestTest.java new file mode 100644 index 000000000..01feb96dc --- /dev/null +++ b/sdks/java/src/test/java/com/thoughtspot/client/model/GetRelevantQuestionsRequestTest.java @@ -0,0 +1,48 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client.model; + +import org.junit.jupiter.api.Test; + +/** Model tests for GetRelevantQuestionsRequest */ +public class GetRelevantQuestionsRequestTest { + private final GetRelevantQuestionsRequest model = new GetRelevantQuestionsRequest(); + + /** Model tests for GetRelevantQuestionsRequest */ + @Test + public void testGetRelevantQuestionsRequest() { + // TODO: test GetRelevantQuestionsRequest + } + + /** Test the property 'metadataContext' */ + @Test + public void metadataContextTest() { + // TODO: test metadataContext + } + + /** Test the property 'limitRelevantQuestions' */ + @Test + public void limitRelevantQuestionsTest() { + // TODO: test limitRelevantQuestions + } + + /** Test the property 'bypassCache' */ + @Test + public void bypassCacheTest() { + // TODO: test bypassCache + } + + /** Test the property 'query' */ + @Test + public void queryTest() { + // TODO: test query + } + + /** Test the property 'aiContext' */ + @Test + public void aiContextTest() { + // TODO: test aiContext + } +} diff --git a/sdks/java/src/test/java/com/thoughtspot/client/model/GetTokenResponseTest.java b/sdks/java/src/test/java/com/thoughtspot/client/model/GetTokenResponseTest.java new file mode 100644 index 000000000..6e571bae9 --- /dev/null +++ b/sdks/java/src/test/java/com/thoughtspot/client/model/GetTokenResponseTest.java @@ -0,0 +1,48 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client.model; + +import org.junit.jupiter.api.Test; + +/** Model tests for GetTokenResponse */ +public class GetTokenResponseTest { + private final GetTokenResponse model = new GetTokenResponse(); + + /** Model tests for GetTokenResponse */ + @Test + public void testGetTokenResponse() { + // TODO: test GetTokenResponse + } + + /** Test the property 'token' */ + @Test + public void tokenTest() { + // TODO: test token + } + + /** Test the property 'creationTimeInMillis' */ + @Test + public void creationTimeInMillisTest() { + // TODO: test creationTimeInMillis + } + + /** Test the property 'expirationTimeInMillis' */ + @Test + public void expirationTimeInMillisTest() { + // TODO: test expirationTimeInMillis + } + + /** Test the property 'validForUserId' */ + @Test + public void validForUserIdTest() { + // TODO: test validForUserId + } + + /** Test the property 'validForUsername' */ + @Test + public void validForUsernameTest() { + // TODO: test validForUsername + } +} diff --git a/sdks/java/src/test/java/com/thoughtspot/client/model/GroupInfoTest.java b/sdks/java/src/test/java/com/thoughtspot/client/model/GroupInfoTest.java new file mode 100644 index 000000000..7725d7e1c --- /dev/null +++ b/sdks/java/src/test/java/com/thoughtspot/client/model/GroupInfoTest.java @@ -0,0 +1,30 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client.model; + +import org.junit.jupiter.api.Test; + +/** Model tests for GroupInfo */ +public class GroupInfoTest { + private final GroupInfo model = new GroupInfo(); + + /** Model tests for GroupInfo */ + @Test + public void testGroupInfo() { + // TODO: test GroupInfo + } + + /** Test the property 'id' */ + @Test + public void idTest() { + // TODO: test id + } + + /** Test the property 'name' */ + @Test + public void nameTest() { + // TODO: test name + } +} diff --git a/sdks/java/src/test/java/com/thoughtspot/client/model/GroupObjectTest.java b/sdks/java/src/test/java/com/thoughtspot/client/model/GroupObjectTest.java new file mode 100644 index 000000000..bcb2eb26d --- /dev/null +++ b/sdks/java/src/test/java/com/thoughtspot/client/model/GroupObjectTest.java @@ -0,0 +1,24 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client.model; + +import org.junit.jupiter.api.Test; + +/** Model tests for GroupObject */ +public class GroupObjectTest { + private final GroupObject model = new GroupObject(); + + /** Model tests for GroupObject */ + @Test + public void testGroupObject() { + // TODO: test GroupObject + } + + /** Test the property 'identifier' */ + @Test + public void identifierTest() { + // TODO: test identifier + } +} diff --git a/sdks/java/src/test/java/com/thoughtspot/client/model/GroupsImportListInputTest.java b/sdks/java/src/test/java/com/thoughtspot/client/model/GroupsImportListInputTest.java new file mode 100644 index 000000000..0d789c0b8 --- /dev/null +++ b/sdks/java/src/test/java/com/thoughtspot/client/model/GroupsImportListInputTest.java @@ -0,0 +1,72 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client.model; + +import org.junit.jupiter.api.Test; + +/** Model tests for GroupsImportListInput */ +public class GroupsImportListInputTest { + private final GroupsImportListInput model = new GroupsImportListInput(); + + /** Model tests for GroupsImportListInput */ + @Test + public void testGroupsImportListInput() { + // TODO: test GroupsImportListInput + } + + /** Test the property 'displayName' */ + @Test + public void displayNameTest() { + // TODO: test displayName + } + + /** Test the property 'groupIdentifier' */ + @Test + public void groupIdentifierTest() { + // TODO: test groupIdentifier + } + + /** Test the property 'defaultLiveboardIdentifiers' */ + @Test + public void defaultLiveboardIdentifiersTest() { + // TODO: test defaultLiveboardIdentifiers + } + + /** Test the property 'description' */ + @Test + public void descriptionTest() { + // TODO: test description + } + + /** Test the property 'privileges' */ + @Test + public void privilegesTest() { + // TODO: test privileges + } + + /** Test the property 'subGroupIdentifiers' */ + @Test + public void subGroupIdentifiersTest() { + // TODO: test subGroupIdentifiers + } + + /** Test the property 'type' */ + @Test + public void typeTest() { + // TODO: test type + } + + /** Test the property 'userIdentifiers' */ + @Test + public void userIdentifiersTest() { + // TODO: test userIdentifiers + } + + /** Test the property 'visibility' */ + @Test + public void visibilityTest() { + // TODO: test visibility + } +} diff --git a/sdks/java/src/test/java/com/thoughtspot/client/model/HeaderAttributeInputTest.java b/sdks/java/src/test/java/com/thoughtspot/client/model/HeaderAttributeInputTest.java new file mode 100644 index 000000000..a162e76ec --- /dev/null +++ b/sdks/java/src/test/java/com/thoughtspot/client/model/HeaderAttributeInputTest.java @@ -0,0 +1,30 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client.model; + +import org.junit.jupiter.api.Test; + +/** Model tests for HeaderAttributeInput */ +public class HeaderAttributeInputTest { + private final HeaderAttributeInput model = new HeaderAttributeInput(); + + /** Model tests for HeaderAttributeInput */ + @Test + public void testHeaderAttributeInput() { + // TODO: test HeaderAttributeInput + } + + /** Test the property 'name' */ + @Test + public void nameTest() { + // TODO: test name + } + + /** Test the property 'value' */ + @Test + public void valueTest() { + // TODO: test value + } +} diff --git a/sdks/java/src/test/java/com/thoughtspot/client/model/HeaderUpdateInputTest.java b/sdks/java/src/test/java/com/thoughtspot/client/model/HeaderUpdateInputTest.java new file mode 100644 index 000000000..874f145e5 --- /dev/null +++ b/sdks/java/src/test/java/com/thoughtspot/client/model/HeaderUpdateInputTest.java @@ -0,0 +1,42 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client.model; + +import org.junit.jupiter.api.Test; + +/** Model tests for HeaderUpdateInput */ +public class HeaderUpdateInputTest { + private final HeaderUpdateInput model = new HeaderUpdateInput(); + + /** Model tests for HeaderUpdateInput */ + @Test + public void testHeaderUpdateInput() { + // TODO: test HeaderUpdateInput + } + + /** Test the property 'identifier' */ + @Test + public void identifierTest() { + // TODO: test identifier + } + + /** Test the property 'objIdentifier' */ + @Test + public void objIdentifierTest() { + // TODO: test objIdentifier + } + + /** Test the property 'type' */ + @Test + public void typeTest() { + // TODO: test type + } + + /** Test the property 'attributes' */ + @Test + public void attributesTest() { + // TODO: test attributes + } +} diff --git a/sdks/java/src/test/java/com/thoughtspot/client/model/ImportEPackAsyncTaskStatusTest.java b/sdks/java/src/test/java/com/thoughtspot/client/model/ImportEPackAsyncTaskStatusTest.java new file mode 100644 index 000000000..509c09bcd --- /dev/null +++ b/sdks/java/src/test/java/com/thoughtspot/client/model/ImportEPackAsyncTaskStatusTest.java @@ -0,0 +1,108 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client.model; + +import org.junit.jupiter.api.Test; + +/** Model tests for ImportEPackAsyncTaskStatus */ +public class ImportEPackAsyncTaskStatusTest { + private final ImportEPackAsyncTaskStatus model = new ImportEPackAsyncTaskStatus(); + + /** Model tests for ImportEPackAsyncTaskStatus */ + @Test + public void testImportEPackAsyncTaskStatus() { + // TODO: test ImportEPackAsyncTaskStatus + } + + /** Test the property 'tenantId' */ + @Test + public void tenantIdTest() { + // TODO: test tenantId + } + + /** Test the property 'orgId' */ + @Test + public void orgIdTest() { + // TODO: test orgId + } + + /** Test the property 'taskId' */ + @Test + public void taskIdTest() { + // TODO: test taskId + } + + /** Test the property 'taskName' */ + @Test + public void taskNameTest() { + // TODO: test taskName + } + + /** Test the property 'importResponse' */ + @Test + public void importResponseTest() { + // TODO: test importResponse + } + + /** Test the property 'taskStatus' */ + @Test + public void taskStatusTest() { + // TODO: test taskStatus + } + + /** Test the property 'authorId' */ + @Test + public void authorIdTest() { + // TODO: test authorId + } + + /** Test the property 'importPolicy' */ + @Test + public void importPolicyTest() { + // TODO: test importPolicy + } + + /** Test the property 'createdAt' */ + @Test + public void createdAtTest() { + // TODO: test createdAt + } + + /** Test the property 'inProgressAt' */ + @Test + public void inProgressAtTest() { + // TODO: test inProgressAt + } + + /** Test the property 'completedAt' */ + @Test + public void completedAtTest() { + // TODO: test completedAt + } + + /** Test the property 'totalObjectCount' */ + @Test + public void totalObjectCountTest() { + // TODO: test totalObjectCount + } + + /** Test the property 'objectProcessedCount' */ + @Test + public void objectProcessedCountTest() { + // TODO: test objectProcessedCount + } + + /** Test the property 'modifiedAt' */ + @Test + public void modifiedAtTest() { + // TODO: test modifiedAt + } + + /** Test the property 'authorDisplayName' */ + @Test + public void authorDisplayNameTest() { + // TODO: test authorDisplayName + } +} diff --git a/sdks/java/src/test/java/com/thoughtspot/client/model/ImportMetadataTMLAsyncRequestTest.java b/sdks/java/src/test/java/com/thoughtspot/client/model/ImportMetadataTMLAsyncRequestTest.java new file mode 100644 index 000000000..beff677e5 --- /dev/null +++ b/sdks/java/src/test/java/com/thoughtspot/client/model/ImportMetadataTMLAsyncRequestTest.java @@ -0,0 +1,54 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client.model; + +import org.junit.jupiter.api.Test; + +/** Model tests for ImportMetadataTMLAsyncRequest */ +public class ImportMetadataTMLAsyncRequestTest { + private final ImportMetadataTMLAsyncRequest model = new ImportMetadataTMLAsyncRequest(); + + /** Model tests for ImportMetadataTMLAsyncRequest */ + @Test + public void testImportMetadataTMLAsyncRequest() { + // TODO: test ImportMetadataTMLAsyncRequest + } + + /** Test the property 'metadataTmls' */ + @Test + public void metadataTmlsTest() { + // TODO: test metadataTmls + } + + /** Test the property 'createNew' */ + @Test + public void createNewTest() { + // TODO: test createNew + } + + /** Test the property 'allOrgsOverride' */ + @Test + public void allOrgsOverrideTest() { + // TODO: test allOrgsOverride + } + + /** Test the property 'importPolicy' */ + @Test + public void importPolicyTest() { + // TODO: test importPolicy + } + + /** Test the property 'skipDiffCheck' */ + @Test + public void skipDiffCheckTest() { + // TODO: test skipDiffCheck + } + + /** Test the property 'enableLargeMetadataValidation' */ + @Test + public void enableLargeMetadataValidationTest() { + // TODO: test enableLargeMetadataValidation + } +} diff --git a/sdks/java/src/test/java/com/thoughtspot/client/model/ImportMetadataTMLRequestTest.java b/sdks/java/src/test/java/com/thoughtspot/client/model/ImportMetadataTMLRequestTest.java new file mode 100644 index 000000000..6bfb52bc3 --- /dev/null +++ b/sdks/java/src/test/java/com/thoughtspot/client/model/ImportMetadataTMLRequestTest.java @@ -0,0 +1,54 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client.model; + +import org.junit.jupiter.api.Test; + +/** Model tests for ImportMetadataTMLRequest */ +public class ImportMetadataTMLRequestTest { + private final ImportMetadataTMLRequest model = new ImportMetadataTMLRequest(); + + /** Model tests for ImportMetadataTMLRequest */ + @Test + public void testImportMetadataTMLRequest() { + // TODO: test ImportMetadataTMLRequest + } + + /** Test the property 'metadataTmls' */ + @Test + public void metadataTmlsTest() { + // TODO: test metadataTmls + } + + /** Test the property 'importPolicy' */ + @Test + public void importPolicyTest() { + // TODO: test importPolicy + } + + /** Test the property 'createNew' */ + @Test + public void createNewTest() { + // TODO: test createNew + } + + /** Test the property 'allOrgsOverride' */ + @Test + public void allOrgsOverrideTest() { + // TODO: test allOrgsOverride + } + + /** Test the property 'skipDiffCheck' */ + @Test + public void skipDiffCheckTest() { + // TODO: test skipDiffCheck + } + + /** Test the property 'enableLargeMetadataValidation' */ + @Test + public void enableLargeMetadataValidationTest() { + // TODO: test enableLargeMetadataValidation + } +} diff --git a/sdks/java/src/test/java/com/thoughtspot/client/model/ImportUserGroupsRequestTest.java b/sdks/java/src/test/java/com/thoughtspot/client/model/ImportUserGroupsRequestTest.java new file mode 100644 index 000000000..a65847900 --- /dev/null +++ b/sdks/java/src/test/java/com/thoughtspot/client/model/ImportUserGroupsRequestTest.java @@ -0,0 +1,36 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client.model; + +import org.junit.jupiter.api.Test; + +/** Model tests for ImportUserGroupsRequest */ +public class ImportUserGroupsRequestTest { + private final ImportUserGroupsRequest model = new ImportUserGroupsRequest(); + + /** Model tests for ImportUserGroupsRequest */ + @Test + public void testImportUserGroupsRequest() { + // TODO: test ImportUserGroupsRequest + } + + /** Test the property 'groups' */ + @Test + public void groupsTest() { + // TODO: test groups + } + + /** Test the property 'deleteUnspecifiedGroups' */ + @Test + public void deleteUnspecifiedGroupsTest() { + // TODO: test deleteUnspecifiedGroups + } + + /** Test the property 'dryRun' */ + @Test + public void dryRunTest() { + // TODO: test dryRun + } +} diff --git a/sdks/java/src/test/java/com/thoughtspot/client/model/ImportUserGroupsResponseTest.java b/sdks/java/src/test/java/com/thoughtspot/client/model/ImportUserGroupsResponseTest.java new file mode 100644 index 000000000..91741137e --- /dev/null +++ b/sdks/java/src/test/java/com/thoughtspot/client/model/ImportUserGroupsResponseTest.java @@ -0,0 +1,36 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client.model; + +import org.junit.jupiter.api.Test; + +/** Model tests for ImportUserGroupsResponse */ +public class ImportUserGroupsResponseTest { + private final ImportUserGroupsResponse model = new ImportUserGroupsResponse(); + + /** Model tests for ImportUserGroupsResponse */ + @Test + public void testImportUserGroupsResponse() { + // TODO: test ImportUserGroupsResponse + } + + /** Test the property 'groupsAdded' */ + @Test + public void groupsAddedTest() { + // TODO: test groupsAdded + } + + /** Test the property 'groupsDeleted' */ + @Test + public void groupsDeletedTest() { + // TODO: test groupsDeleted + } + + /** Test the property 'groupsUpdated' */ + @Test + public void groupsUpdatedTest() { + // TODO: test groupsUpdated + } +} diff --git a/sdks/java/src/test/java/com/thoughtspot/client/model/ImportUserTest.java b/sdks/java/src/test/java/com/thoughtspot/client/model/ImportUserTest.java new file mode 100644 index 000000000..02fcb9106 --- /dev/null +++ b/sdks/java/src/test/java/com/thoughtspot/client/model/ImportUserTest.java @@ -0,0 +1,114 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client.model; + +import org.junit.jupiter.api.Test; + +/** Model tests for ImportUser */ +public class ImportUserTest { + private final ImportUser model = new ImportUser(); + + /** Model tests for ImportUser */ + @Test + public void testImportUser() { + // TODO: test ImportUser + } + + /** Test the property 'userIdentifier' */ + @Test + public void userIdentifierTest() { + // TODO: test userIdentifier + } + + /** Test the property 'displayName' */ + @Test + public void displayNameTest() { + // TODO: test displayName + } + + /** Test the property 'password' */ + @Test + public void passwordTest() { + // TODO: test password + } + + /** Test the property 'accountType' */ + @Test + public void accountTypeTest() { + // TODO: test accountType + } + + /** Test the property 'accountStatus' */ + @Test + public void accountStatusTest() { + // TODO: test accountStatus + } + + /** Test the property 'email' */ + @Test + public void emailTest() { + // TODO: test email + } + + /** Test the property 'orgIdentifiers' */ + @Test + public void orgIdentifiersTest() { + // TODO: test orgIdentifiers + } + + /** Test the property 'groupIdentifiers' */ + @Test + public void groupIdentifiersTest() { + // TODO: test groupIdentifiers + } + + /** Test the property 'visibility' */ + @Test + public void visibilityTest() { + // TODO: test visibility + } + + /** Test the property 'notifyOnShare' */ + @Test + public void notifyOnShareTest() { + // TODO: test notifyOnShare + } + + /** Test the property 'showOnboardingExperience' */ + @Test + public void showOnboardingExperienceTest() { + // TODO: test showOnboardingExperience + } + + /** Test the property 'onboardingExperienceCompleted' */ + @Test + public void onboardingExperienceCompletedTest() { + // TODO: test onboardingExperienceCompleted + } + + /** Test the property 'homeLiveboardIdentifier' */ + @Test + public void homeLiveboardIdentifierTest() { + // TODO: test homeLiveboardIdentifier + } + + /** Test the property 'favoriteMetadata' */ + @Test + public void favoriteMetadataTest() { + // TODO: test favoriteMetadata + } + + /** Test the property 'preferredLocale' */ + @Test + public void preferredLocaleTest() { + // TODO: test preferredLocale + } + + /** Test the property 'useBrowserLanguage' */ + @Test + public void useBrowserLanguageTest() { + // TODO: test useBrowserLanguage + } +} diff --git a/sdks/java/src/test/java/com/thoughtspot/client/model/ImportUserTypeTest.java b/sdks/java/src/test/java/com/thoughtspot/client/model/ImportUserTypeTest.java new file mode 100644 index 000000000..68f1801ec --- /dev/null +++ b/sdks/java/src/test/java/com/thoughtspot/client/model/ImportUserTypeTest.java @@ -0,0 +1,30 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client.model; + +import org.junit.jupiter.api.Test; + +/** Model tests for ImportUserType */ +public class ImportUserTypeTest { + private final ImportUserType model = new ImportUserType(); + + /** Model tests for ImportUserType */ + @Test + public void testImportUserType() { + // TODO: test ImportUserType + } + + /** Test the property 'id' */ + @Test + public void idTest() { + // TODO: test id + } + + /** Test the property 'name' */ + @Test + public void nameTest() { + // TODO: test name + } +} diff --git a/sdks/java/src/test/java/com/thoughtspot/client/model/ImportUsersRequestTest.java b/sdks/java/src/test/java/com/thoughtspot/client/model/ImportUsersRequestTest.java new file mode 100644 index 000000000..38899f874 --- /dev/null +++ b/sdks/java/src/test/java/com/thoughtspot/client/model/ImportUsersRequestTest.java @@ -0,0 +1,42 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client.model; + +import org.junit.jupiter.api.Test; + +/** Model tests for ImportUsersRequest */ +public class ImportUsersRequestTest { + private final ImportUsersRequest model = new ImportUsersRequest(); + + /** Model tests for ImportUsersRequest */ + @Test + public void testImportUsersRequest() { + // TODO: test ImportUsersRequest + } + + /** Test the property 'users' */ + @Test + public void usersTest() { + // TODO: test users + } + + /** Test the property 'defaultPassword' */ + @Test + public void defaultPasswordTest() { + // TODO: test defaultPassword + } + + /** Test the property 'dryRun' */ + @Test + public void dryRunTest() { + // TODO: test dryRun + } + + /** Test the property 'deleteUnspecifiedUsers' */ + @Test + public void deleteUnspecifiedUsersTest() { + // TODO: test deleteUnspecifiedUsers + } +} diff --git a/sdks/java/src/test/java/com/thoughtspot/client/model/ImportUsersResponseTest.java b/sdks/java/src/test/java/com/thoughtspot/client/model/ImportUsersResponseTest.java new file mode 100644 index 000000000..cbf7722f6 --- /dev/null +++ b/sdks/java/src/test/java/com/thoughtspot/client/model/ImportUsersResponseTest.java @@ -0,0 +1,36 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client.model; + +import org.junit.jupiter.api.Test; + +/** Model tests for ImportUsersResponse */ +public class ImportUsersResponseTest { + private final ImportUsersResponse model = new ImportUsersResponse(); + + /** Model tests for ImportUsersResponse */ + @Test + public void testImportUsersResponse() { + // TODO: test ImportUsersResponse + } + + /** Test the property 'usersAdded' */ + @Test + public void usersAddedTest() { + // TODO: test usersAdded + } + + /** Test the property 'usersUpdated' */ + @Test + public void usersUpdatedTest() { + // TODO: test usersUpdated + } + + /** Test the property 'usersDeleted' */ + @Test + public void usersDeletedTest() { + // TODO: test usersDeleted + } +} diff --git a/sdks/java/src/test/java/com/thoughtspot/client/model/InputEurekaNLSRequestTest.java b/sdks/java/src/test/java/com/thoughtspot/client/model/InputEurekaNLSRequestTest.java new file mode 100644 index 000000000..8fe177e19 --- /dev/null +++ b/sdks/java/src/test/java/com/thoughtspot/client/model/InputEurekaNLSRequestTest.java @@ -0,0 +1,42 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client.model; + +import org.junit.jupiter.api.Test; + +/** Model tests for InputEurekaNLSRequest */ +public class InputEurekaNLSRequestTest { + private final InputEurekaNLSRequest model = new InputEurekaNLSRequest(); + + /** Model tests for InputEurekaNLSRequest */ + @Test + public void testInputEurekaNLSRequest() { + // TODO: test InputEurekaNLSRequest + } + + /** Test the property 'agentVersion' */ + @Test + public void agentVersionTest() { + // TODO: test agentVersion + } + + /** Test the property 'bypassCache' */ + @Test + public void bypassCacheTest() { + // TODO: test bypassCache + } + + /** Test the property 'instructions' */ + @Test + public void instructionsTest() { + // TODO: test instructions + } + + /** Test the property 'query' */ + @Test + public void queryTest() { + // TODO: test query + } +} diff --git a/sdks/java/src/test/java/com/thoughtspot/client/model/JWTMetadataObjectTest.java b/sdks/java/src/test/java/com/thoughtspot/client/model/JWTMetadataObjectTest.java new file mode 100644 index 000000000..8b3046281 --- /dev/null +++ b/sdks/java/src/test/java/com/thoughtspot/client/model/JWTMetadataObjectTest.java @@ -0,0 +1,30 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client.model; + +import org.junit.jupiter.api.Test; + +/** Model tests for JWTMetadataObject */ +public class JWTMetadataObjectTest { + private final JWTMetadataObject model = new JWTMetadataObject(); + + /** Model tests for JWTMetadataObject */ + @Test + public void testJWTMetadataObject() { + // TODO: test JWTMetadataObject + } + + /** Test the property 'identifier' */ + @Test + public void identifierTest() { + // TODO: test identifier + } + + /** Test the property 'type' */ + @Test + public void typeTest() { + // TODO: test type + } +} diff --git a/sdks/java/src/test/java/com/thoughtspot/client/model/JWTParameterTest.java b/sdks/java/src/test/java/com/thoughtspot/client/model/JWTParameterTest.java new file mode 100644 index 000000000..94534a930 --- /dev/null +++ b/sdks/java/src/test/java/com/thoughtspot/client/model/JWTParameterTest.java @@ -0,0 +1,36 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client.model; + +import org.junit.jupiter.api.Test; + +/** Model tests for JWTParameter */ +public class JWTParameterTest { + private final JWTParameter model = new JWTParameter(); + + /** Model tests for JWTParameter */ + @Test + public void testJWTParameter() { + // TODO: test JWTParameter + } + + /** Test the property 'runtimeFilter' */ + @Test + public void runtimeFilterTest() { + // TODO: test runtimeFilter + } + + /** Test the property 'runtimeSort' */ + @Test + public void runtimeSortTest() { + // TODO: test runtimeSort + } + + /** Test the property 'runtimeParamOverride' */ + @Test + public void runtimeParamOverrideTest() { + // TODO: test runtimeParamOverride + } +} diff --git a/sdks/java/src/test/java/com/thoughtspot/client/model/JWTUserOptionsFullTest.java b/sdks/java/src/test/java/com/thoughtspot/client/model/JWTUserOptionsFullTest.java new file mode 100644 index 000000000..aa550d338 --- /dev/null +++ b/sdks/java/src/test/java/com/thoughtspot/client/model/JWTUserOptionsFullTest.java @@ -0,0 +1,24 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client.model; + +import org.junit.jupiter.api.Test; + +/** Model tests for JWTUserOptionsFull */ +public class JWTUserOptionsFullTest { + private final JWTUserOptionsFull model = new JWTUserOptionsFull(); + + /** Model tests for JWTUserOptionsFull */ + @Test + public void testJWTUserOptionsFull() { + // TODO: test JWTUserOptionsFull + } + + /** Test the property 'parameters' */ + @Test + public void parametersTest() { + // TODO: test parameters + } +} diff --git a/sdks/java/src/test/java/com/thoughtspot/client/model/JWTUserOptionsTest.java b/sdks/java/src/test/java/com/thoughtspot/client/model/JWTUserOptionsTest.java new file mode 100644 index 000000000..773400431 --- /dev/null +++ b/sdks/java/src/test/java/com/thoughtspot/client/model/JWTUserOptionsTest.java @@ -0,0 +1,30 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client.model; + +import org.junit.jupiter.api.Test; + +/** Model tests for JWTUserOptions */ +public class JWTUserOptionsTest { + private final JWTUserOptions model = new JWTUserOptions(); + + /** Model tests for JWTUserOptions */ + @Test + public void testJWTUserOptions() { + // TODO: test JWTUserOptions + } + + /** Test the property 'parameters' */ + @Test + public void parametersTest() { + // TODO: test parameters + } + + /** Test the property 'metadata' */ + @Test + public void metadataTest() { + // TODO: test metadata + } +} diff --git a/sdks/java/src/test/java/com/thoughtspot/client/model/JobRecipientTest.java b/sdks/java/src/test/java/com/thoughtspot/client/model/JobRecipientTest.java new file mode 100644 index 000000000..bdd874b98 --- /dev/null +++ b/sdks/java/src/test/java/com/thoughtspot/client/model/JobRecipientTest.java @@ -0,0 +1,42 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client.model; + +import org.junit.jupiter.api.Test; + +/** Model tests for JobRecipient */ +public class JobRecipientTest { + private final JobRecipient model = new JobRecipient(); + + /** Model tests for JobRecipient */ + @Test + public void testJobRecipient() { + // TODO: test JobRecipient + } + + /** Test the property 'type' */ + @Test + public void typeTest() { + // TODO: test type + } + + /** Test the property 'id' */ + @Test + public void idTest() { + // TODO: test id + } + + /** Test the property 'name' */ + @Test + public void nameTest() { + // TODO: test name + } + + /** Test the property 'email' */ + @Test + public void emailTest() { + // TODO: test email + } +} diff --git a/sdks/java/src/test/java/com/thoughtspot/client/model/LiveboardContentTest.java b/sdks/java/src/test/java/com/thoughtspot/client/model/LiveboardContentTest.java new file mode 100644 index 000000000..7aa309a3e --- /dev/null +++ b/sdks/java/src/test/java/com/thoughtspot/client/model/LiveboardContentTest.java @@ -0,0 +1,72 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client.model; + +import org.junit.jupiter.api.Test; + +/** Model tests for LiveboardContent */ +public class LiveboardContentTest { + private final LiveboardContent model = new LiveboardContent(); + + /** Model tests for LiveboardContent */ + @Test + public void testLiveboardContent() { + // TODO: test LiveboardContent + } + + /** Test the property 'availableDataRowCount' */ + @Test + public void availableDataRowCountTest() { + // TODO: test availableDataRowCount + } + + /** Test the property 'columnNames' */ + @Test + public void columnNamesTest() { + // TODO: test columnNames + } + + /** Test the property 'dataRows' */ + @Test + public void dataRowsTest() { + // TODO: test dataRows + } + + /** Test the property 'recordOffset' */ + @Test + public void recordOffsetTest() { + // TODO: test recordOffset + } + + /** Test the property 'recordSize' */ + @Test + public void recordSizeTest() { + // TODO: test recordSize + } + + /** Test the property 'returnedDataRowCount' */ + @Test + public void returnedDataRowCountTest() { + // TODO: test returnedDataRowCount + } + + /** Test the property 'samplingRatio' */ + @Test + public void samplingRatioTest() { + // TODO: test samplingRatio + } + + /** Test the property 'visualizationId' */ + @Test + public void visualizationIdTest() { + // TODO: test visualizationId + } + + /** Test the property 'visualizationName' */ + @Test + public void visualizationNameTest() { + // TODO: test visualizationName + } +} diff --git a/sdks/java/src/test/java/com/thoughtspot/client/model/LiveboardDataResponseTest.java b/sdks/java/src/test/java/com/thoughtspot/client/model/LiveboardDataResponseTest.java new file mode 100644 index 000000000..c3a40b86b --- /dev/null +++ b/sdks/java/src/test/java/com/thoughtspot/client/model/LiveboardDataResponseTest.java @@ -0,0 +1,36 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client.model; + +import org.junit.jupiter.api.Test; + +/** Model tests for LiveboardDataResponse */ +public class LiveboardDataResponseTest { + private final LiveboardDataResponse model = new LiveboardDataResponse(); + + /** Model tests for LiveboardDataResponse */ + @Test + public void testLiveboardDataResponse() { + // TODO: test LiveboardDataResponse + } + + /** Test the property 'metadataId' */ + @Test + public void metadataIdTest() { + // TODO: test metadataId + } + + /** Test the property 'metadataName' */ + @Test + public void metadataNameTest() { + // TODO: test metadataName + } + + /** Test the property 'contents' */ + @Test + public void contentsTest() { + // TODO: test contents + } +} diff --git a/sdks/java/src/test/java/com/thoughtspot/client/model/LiveboardOptionsInputTest.java b/sdks/java/src/test/java/com/thoughtspot/client/model/LiveboardOptionsInputTest.java new file mode 100644 index 000000000..ab1feb183 --- /dev/null +++ b/sdks/java/src/test/java/com/thoughtspot/client/model/LiveboardOptionsInputTest.java @@ -0,0 +1,24 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client.model; + +import org.junit.jupiter.api.Test; + +/** Model tests for LiveboardOptionsInput */ +public class LiveboardOptionsInputTest { + private final LiveboardOptionsInput model = new LiveboardOptionsInput(); + + /** Model tests for LiveboardOptionsInput */ + @Test + public void testLiveboardOptionsInput() { + // TODO: test LiveboardOptionsInput + } + + /** Test the property 'visualizationIdentifiers' */ + @Test + public void visualizationIdentifiersTest() { + // TODO: test visualizationIdentifiers + } +} diff --git a/sdks/java/src/test/java/com/thoughtspot/client/model/LiveboardOptionsTest.java b/sdks/java/src/test/java/com/thoughtspot/client/model/LiveboardOptionsTest.java new file mode 100644 index 000000000..25d2576fa --- /dev/null +++ b/sdks/java/src/test/java/com/thoughtspot/client/model/LiveboardOptionsTest.java @@ -0,0 +1,24 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client.model; + +import org.junit.jupiter.api.Test; + +/** Model tests for LiveboardOptions */ +public class LiveboardOptionsTest { + private final LiveboardOptions model = new LiveboardOptions(); + + /** Model tests for LiveboardOptions */ + @Test + public void testLiveboardOptions() { + // TODO: test LiveboardOptions + } + + /** Test the property 'visualizationIdentifiers' */ + @Test + public void visualizationIdentifiersTest() { + // TODO: test visualizationIdentifiers + } +} diff --git a/sdks/java/src/test/java/com/thoughtspot/client/model/LogResponseTest.java b/sdks/java/src/test/java/com/thoughtspot/client/model/LogResponseTest.java new file mode 100644 index 000000000..5aa7ccaf5 --- /dev/null +++ b/sdks/java/src/test/java/com/thoughtspot/client/model/LogResponseTest.java @@ -0,0 +1,30 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client.model; + +import org.junit.jupiter.api.Test; + +/** Model tests for LogResponse */ +public class LogResponseTest { + private final LogResponse model = new LogResponse(); + + /** Model tests for LogResponse */ + @Test + public void testLogResponse() { + // TODO: test LogResponse + } + + /** Test the property 'date' */ + @Test + public void dateTest() { + // TODO: test date + } + + /** Test the property 'log' */ + @Test + public void logTest() { + // TODO: test log + } +} diff --git a/sdks/java/src/test/java/com/thoughtspot/client/model/LoginRequestTest.java b/sdks/java/src/test/java/com/thoughtspot/client/model/LoginRequestTest.java new file mode 100644 index 000000000..3b1fa5e34 --- /dev/null +++ b/sdks/java/src/test/java/com/thoughtspot/client/model/LoginRequestTest.java @@ -0,0 +1,42 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client.model; + +import org.junit.jupiter.api.Test; + +/** Model tests for LoginRequest */ +public class LoginRequestTest { + private final LoginRequest model = new LoginRequest(); + + /** Model tests for LoginRequest */ + @Test + public void testLoginRequest() { + // TODO: test LoginRequest + } + + /** Test the property 'username' */ + @Test + public void usernameTest() { + // TODO: test username + } + + /** Test the property 'password' */ + @Test + public void passwordTest() { + // TODO: test password + } + + /** Test the property 'orgIdentifier' */ + @Test + public void orgIdentifierTest() { + // TODO: test orgIdentifier + } + + /** Test the property 'rememberMe' */ + @Test + public void rememberMeTest() { + // TODO: test rememberMe + } +} diff --git a/sdks/java/src/test/java/com/thoughtspot/client/model/ManageObjectPrivilegeRequestTest.java b/sdks/java/src/test/java/com/thoughtspot/client/model/ManageObjectPrivilegeRequestTest.java new file mode 100644 index 000000000..4bd80c5bc --- /dev/null +++ b/sdks/java/src/test/java/com/thoughtspot/client/model/ManageObjectPrivilegeRequestTest.java @@ -0,0 +1,48 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client.model; + +import org.junit.jupiter.api.Test; + +/** Model tests for ManageObjectPrivilegeRequest */ +public class ManageObjectPrivilegeRequestTest { + private final ManageObjectPrivilegeRequest model = new ManageObjectPrivilegeRequest(); + + /** Model tests for ManageObjectPrivilegeRequest */ + @Test + public void testManageObjectPrivilegeRequest() { + // TODO: test ManageObjectPrivilegeRequest + } + + /** Test the property 'operation' */ + @Test + public void operationTest() { + // TODO: test operation + } + + /** Test the property 'metadataType' */ + @Test + public void metadataTypeTest() { + // TODO: test metadataType + } + + /** Test the property 'objectPrivilegeTypes' */ + @Test + public void objectPrivilegeTypesTest() { + // TODO: test objectPrivilegeTypes + } + + /** Test the property 'metadataIdentifiers' */ + @Test + public void metadataIdentifiersTest() { + // TODO: test metadataIdentifiers + } + + /** Test the property 'principals' */ + @Test + public void principalsTest() { + // TODO: test principals + } +} diff --git a/sdks/java/src/test/java/com/thoughtspot/client/model/MetadataAssociationItemTest.java b/sdks/java/src/test/java/com/thoughtspot/client/model/MetadataAssociationItemTest.java new file mode 100644 index 000000000..1a1bcea50 --- /dev/null +++ b/sdks/java/src/test/java/com/thoughtspot/client/model/MetadataAssociationItemTest.java @@ -0,0 +1,36 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client.model; + +import org.junit.jupiter.api.Test; + +/** Model tests for MetadataAssociationItem */ +public class MetadataAssociationItemTest { + private final MetadataAssociationItem model = new MetadataAssociationItem(); + + /** Model tests for MetadataAssociationItem */ + @Test + public void testMetadataAssociationItem() { + // TODO: test MetadataAssociationItem + } + + /** Test the property 'actionConfig' */ + @Test + public void actionConfigTest() { + // TODO: test actionConfig + } + + /** Test the property 'identifier' */ + @Test + public void identifierTest() { + // TODO: test identifier + } + + /** Test the property 'type' */ + @Test + public void typeTest() { + // TODO: test type + } +} diff --git a/sdks/java/src/test/java/com/thoughtspot/client/model/MetadataContextTest.java b/sdks/java/src/test/java/com/thoughtspot/client/model/MetadataContextTest.java new file mode 100644 index 000000000..e322a7fae --- /dev/null +++ b/sdks/java/src/test/java/com/thoughtspot/client/model/MetadataContextTest.java @@ -0,0 +1,42 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client.model; + +import org.junit.jupiter.api.Test; + +/** Model tests for MetadataContext */ +public class MetadataContextTest { + private final MetadataContext model = new MetadataContext(); + + /** Model tests for MetadataContext */ + @Test + public void testMetadataContext() { + // TODO: test MetadataContext + } + + /** Test the property 'dataSourceIdentifiers' */ + @Test + public void dataSourceIdentifiersTest() { + // TODO: test dataSourceIdentifiers + } + + /** Test the property 'answerIdentifiers' */ + @Test + public void answerIdentifiersTest() { + // TODO: test answerIdentifiers + } + + /** Test the property 'conversationIdentifier' */ + @Test + public void conversationIdentifierTest() { + // TODO: test conversationIdentifier + } + + /** Test the property 'liveboardIdentifiers' */ + @Test + public void liveboardIdentifiersTest() { + // TODO: test liveboardIdentifiers + } +} diff --git a/sdks/java/src/test/java/com/thoughtspot/client/model/MetadataInputTest.java b/sdks/java/src/test/java/com/thoughtspot/client/model/MetadataInputTest.java new file mode 100644 index 000000000..514f9d64a --- /dev/null +++ b/sdks/java/src/test/java/com/thoughtspot/client/model/MetadataInputTest.java @@ -0,0 +1,30 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client.model; + +import org.junit.jupiter.api.Test; + +/** Model tests for MetadataInput */ +public class MetadataInputTest { + private final MetadataInput model = new MetadataInput(); + + /** Model tests for MetadataInput */ + @Test + public void testMetadataInput() { + // TODO: test MetadataInput + } + + /** Test the property 'identifier' */ + @Test + public void identifierTest() { + // TODO: test identifier + } + + /** Test the property 'type' */ + @Test + public void typeTest() { + // TODO: test type + } +} diff --git a/sdks/java/src/test/java/com/thoughtspot/client/model/MetadataListItemInputTest.java b/sdks/java/src/test/java/com/thoughtspot/client/model/MetadataListItemInputTest.java new file mode 100644 index 000000000..12230bcd9 --- /dev/null +++ b/sdks/java/src/test/java/com/thoughtspot/client/model/MetadataListItemInputTest.java @@ -0,0 +1,48 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client.model; + +import org.junit.jupiter.api.Test; + +/** Model tests for MetadataListItemInput */ +public class MetadataListItemInputTest { + private final MetadataListItemInput model = new MetadataListItemInput(); + + /** Model tests for MetadataListItemInput */ + @Test + public void testMetadataListItemInput() { + // TODO: test MetadataListItemInput + } + + /** Test the property 'identifier' */ + @Test + public void identifierTest() { + // TODO: test identifier + } + + /** Test the property 'objIdentifier' */ + @Test + public void objIdentifierTest() { + // TODO: test objIdentifier + } + + /** Test the property 'namePattern' */ + @Test + public void namePatternTest() { + // TODO: test namePattern + } + + /** Test the property 'type' */ + @Test + public void typeTest() { + // TODO: test type + } + + /** Test the property 'subtypes' */ + @Test + public void subtypesTest() { + // TODO: test subtypes + } +} diff --git a/sdks/java/src/test/java/com/thoughtspot/client/model/MetadataObjectTest.java b/sdks/java/src/test/java/com/thoughtspot/client/model/MetadataObjectTest.java new file mode 100644 index 000000000..e5fd2a285 --- /dev/null +++ b/sdks/java/src/test/java/com/thoughtspot/client/model/MetadataObjectTest.java @@ -0,0 +1,30 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client.model; + +import org.junit.jupiter.api.Test; + +/** Model tests for MetadataObject */ +public class MetadataObjectTest { + private final MetadataObject model = new MetadataObject(); + + /** Model tests for MetadataObject */ + @Test + public void testMetadataObject() { + // TODO: test MetadataObject + } + + /** Test the property 'identifier' */ + @Test + public void identifierTest() { + // TODO: test identifier + } + + /** Test the property 'type' */ + @Test + public void typeTest() { + // TODO: test type + } +} diff --git a/sdks/java/src/test/java/com/thoughtspot/client/model/MetadataResponseTest.java b/sdks/java/src/test/java/com/thoughtspot/client/model/MetadataResponseTest.java new file mode 100644 index 000000000..7dcd919b1 --- /dev/null +++ b/sdks/java/src/test/java/com/thoughtspot/client/model/MetadataResponseTest.java @@ -0,0 +1,36 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client.model; + +import org.junit.jupiter.api.Test; + +/** Model tests for MetadataResponse */ +public class MetadataResponseTest { + private final MetadataResponse model = new MetadataResponse(); + + /** Model tests for MetadataResponse */ + @Test + public void testMetadataResponse() { + // TODO: test MetadataResponse + } + + /** Test the property 'name' */ + @Test + public void nameTest() { + // TODO: test name + } + + /** Test the property 'id' */ + @Test + public void idTest() { + // TODO: test id + } + + /** Test the property 'type' */ + @Test + public void typeTest() { + // TODO: test type + } +} diff --git a/sdks/java/src/test/java/com/thoughtspot/client/model/MetadataSearchResponseTest.java b/sdks/java/src/test/java/com/thoughtspot/client/model/MetadataSearchResponseTest.java new file mode 100644 index 000000000..ac9d909bd --- /dev/null +++ b/sdks/java/src/test/java/com/thoughtspot/client/model/MetadataSearchResponseTest.java @@ -0,0 +1,78 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client.model; + +import org.junit.jupiter.api.Test; + +/** Model tests for MetadataSearchResponse */ +public class MetadataSearchResponseTest { + private final MetadataSearchResponse model = new MetadataSearchResponse(); + + /** Model tests for MetadataSearchResponse */ + @Test + public void testMetadataSearchResponse() { + // TODO: test MetadataSearchResponse + } + + /** Test the property 'metadataId' */ + @Test + public void metadataIdTest() { + // TODO: test metadataId + } + + /** Test the property 'metadataName' */ + @Test + public void metadataNameTest() { + // TODO: test metadataName + } + + /** Test the property 'metadataType' */ + @Test + public void metadataTypeTest() { + // TODO: test metadataType + } + + /** Test the property 'metadataObjId' */ + @Test + public void metadataObjIdTest() { + // TODO: test metadataObjId + } + + /** Test the property 'dependentObjects' */ + @Test + public void dependentObjectsTest() { + // TODO: test dependentObjects + } + + /** Test the property 'incompleteObjects' */ + @Test + public void incompleteObjectsTest() { + // TODO: test incompleteObjects + } + + /** Test the property 'metadataDetail' */ + @Test + public void metadataDetailTest() { + // TODO: test metadataDetail + } + + /** Test the property 'metadataHeader' */ + @Test + public void metadataHeaderTest() { + // TODO: test metadataHeader + } + + /** Test the property 'visualizationHeaders' */ + @Test + public void visualizationHeadersTest() { + // TODO: test visualizationHeaders + } + + /** Test the property 'stats' */ + @Test + public void statsTest() { + // TODO: test stats + } +} diff --git a/sdks/java/src/test/java/com/thoughtspot/client/model/MetadataSearchSortOptionsTest.java b/sdks/java/src/test/java/com/thoughtspot/client/model/MetadataSearchSortOptionsTest.java new file mode 100644 index 000000000..84fb004ff --- /dev/null +++ b/sdks/java/src/test/java/com/thoughtspot/client/model/MetadataSearchSortOptionsTest.java @@ -0,0 +1,30 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client.model; + +import org.junit.jupiter.api.Test; + +/** Model tests for MetadataSearchSortOptions */ +public class MetadataSearchSortOptionsTest { + private final MetadataSearchSortOptions model = new MetadataSearchSortOptions(); + + /** Model tests for MetadataSearchSortOptions */ + @Test + public void testMetadataSearchSortOptions() { + // TODO: test MetadataSearchSortOptions + } + + /** Test the property 'fieldName' */ + @Test + public void fieldNameTest() { + // TODO: test fieldName + } + + /** Test the property 'order' */ + @Test + public void orderTest() { + // TODO: test order + } +} diff --git a/sdks/java/src/test/java/com/thoughtspot/client/model/ModelTableListTest.java b/sdks/java/src/test/java/com/thoughtspot/client/model/ModelTableListTest.java new file mode 100644 index 000000000..501e35c7f --- /dev/null +++ b/sdks/java/src/test/java/com/thoughtspot/client/model/ModelTableListTest.java @@ -0,0 +1,36 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client.model; + +import org.junit.jupiter.api.Test; + +/** Model tests for ModelTableList */ +public class ModelTableListTest { + private final ModelTableList model = new ModelTableList(); + + /** Model tests for ModelTableList */ + @Test + public void testModelTableList() { + // TODO: test ModelTableList + } + + /** Test the property 'modelName' */ + @Test + public void modelNameTest() { + // TODO: test modelName + } + + /** Test the property 'modelPath' */ + @Test + public void modelPathTest() { + // TODO: test modelPath + } + + /** Test the property 'tables' */ + @Test + public void tablesTest() { + // TODO: test tables + } +} diff --git a/sdks/java/src/test/java/com/thoughtspot/client/model/NLInstructionsInfoInputTest.java b/sdks/java/src/test/java/com/thoughtspot/client/model/NLInstructionsInfoInputTest.java new file mode 100644 index 000000000..554edf2ef --- /dev/null +++ b/sdks/java/src/test/java/com/thoughtspot/client/model/NLInstructionsInfoInputTest.java @@ -0,0 +1,30 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client.model; + +import org.junit.jupiter.api.Test; + +/** Model tests for NLInstructionsInfoInput */ +public class NLInstructionsInfoInputTest { + private final NLInstructionsInfoInput model = new NLInstructionsInfoInput(); + + /** Model tests for NLInstructionsInfoInput */ + @Test + public void testNLInstructionsInfoInput() { + // TODO: test NLInstructionsInfoInput + } + + /** Test the property 'instructions' */ + @Test + public void instructionsTest() { + // TODO: test instructions + } + + /** Test the property 'scope' */ + @Test + public void scopeTest() { + // TODO: test scope + } +} diff --git a/sdks/java/src/test/java/com/thoughtspot/client/model/NLInstructionsInfoTest.java b/sdks/java/src/test/java/com/thoughtspot/client/model/NLInstructionsInfoTest.java new file mode 100644 index 000000000..da784233f --- /dev/null +++ b/sdks/java/src/test/java/com/thoughtspot/client/model/NLInstructionsInfoTest.java @@ -0,0 +1,30 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client.model; + +import org.junit.jupiter.api.Test; + +/** Model tests for NLInstructionsInfo */ +public class NLInstructionsInfoTest { + private final NLInstructionsInfo model = new NLInstructionsInfo(); + + /** Model tests for NLInstructionsInfo */ + @Test + public void testNLInstructionsInfo() { + // TODO: test NLInstructionsInfo + } + + /** Test the property 'instructions' */ + @Test + public void instructionsTest() { + // TODO: test instructions + } + + /** Test the property 'scope' */ + @Test + public void scopeTest() { + // TODO: test scope + } +} diff --git a/sdks/java/src/test/java/com/thoughtspot/client/model/ObjectIDAndNameTest.java b/sdks/java/src/test/java/com/thoughtspot/client/model/ObjectIDAndNameTest.java new file mode 100644 index 000000000..b145056b0 --- /dev/null +++ b/sdks/java/src/test/java/com/thoughtspot/client/model/ObjectIDAndNameTest.java @@ -0,0 +1,30 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client.model; + +import org.junit.jupiter.api.Test; + +/** Model tests for ObjectIDAndName */ +public class ObjectIDAndNameTest { + private final ObjectIDAndName model = new ObjectIDAndName(); + + /** Model tests for ObjectIDAndName */ + @Test + public void testObjectIDAndName() { + // TODO: test ObjectIDAndName + } + + /** Test the property 'id' */ + @Test + public void idTest() { + // TODO: test id + } + + /** Test the property 'name' */ + @Test + public void nameTest() { + // TODO: test name + } +} diff --git a/sdks/java/src/test/java/com/thoughtspot/client/model/ObjectPrivilegesMetadataInputTest.java b/sdks/java/src/test/java/com/thoughtspot/client/model/ObjectPrivilegesMetadataInputTest.java new file mode 100644 index 000000000..e594a8582 --- /dev/null +++ b/sdks/java/src/test/java/com/thoughtspot/client/model/ObjectPrivilegesMetadataInputTest.java @@ -0,0 +1,30 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client.model; + +import org.junit.jupiter.api.Test; + +/** Model tests for ObjectPrivilegesMetadataInput */ +public class ObjectPrivilegesMetadataInputTest { + private final ObjectPrivilegesMetadataInput model = new ObjectPrivilegesMetadataInput(); + + /** Model tests for ObjectPrivilegesMetadataInput */ + @Test + public void testObjectPrivilegesMetadataInput() { + // TODO: test ObjectPrivilegesMetadataInput + } + + /** Test the property 'type' */ + @Test + public void typeTest() { + // TODO: test type + } + + /** Test the property 'identifier' */ + @Test + public void identifierTest() { + // TODO: test identifier + } +} diff --git a/sdks/java/src/test/java/com/thoughtspot/client/model/ObjectPrivilegesOfMetadataResponseTest.java b/sdks/java/src/test/java/com/thoughtspot/client/model/ObjectPrivilegesOfMetadataResponseTest.java new file mode 100644 index 000000000..2de5f224c --- /dev/null +++ b/sdks/java/src/test/java/com/thoughtspot/client/model/ObjectPrivilegesOfMetadataResponseTest.java @@ -0,0 +1,25 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client.model; + +import org.junit.jupiter.api.Test; + +/** Model tests for ObjectPrivilegesOfMetadataResponse */ +public class ObjectPrivilegesOfMetadataResponseTest { + private final ObjectPrivilegesOfMetadataResponse model = + new ObjectPrivilegesOfMetadataResponse(); + + /** Model tests for ObjectPrivilegesOfMetadataResponse */ + @Test + public void testObjectPrivilegesOfMetadataResponse() { + // TODO: test ObjectPrivilegesOfMetadataResponse + } + + /** Test the property 'metadataObjectPrivileges' */ + @Test + public void metadataObjectPrivilegesTest() { + // TODO: test metadataObjectPrivileges + } +} diff --git a/sdks/java/src/test/java/com/thoughtspot/client/model/OrgChannelConfigInputTest.java b/sdks/java/src/test/java/com/thoughtspot/client/model/OrgChannelConfigInputTest.java new file mode 100644 index 000000000..6019e8bd7 --- /dev/null +++ b/sdks/java/src/test/java/com/thoughtspot/client/model/OrgChannelConfigInputTest.java @@ -0,0 +1,42 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client.model; + +import org.junit.jupiter.api.Test; + +/** Model tests for OrgChannelConfigInput */ +public class OrgChannelConfigInputTest { + private final OrgChannelConfigInput model = new OrgChannelConfigInput(); + + /** Model tests for OrgChannelConfigInput */ + @Test + public void testOrgChannelConfigInput() { + // TODO: test OrgChannelConfigInput + } + + /** Test the property 'orgIdentifier' */ + @Test + public void orgIdentifierTest() { + // TODO: test orgIdentifier + } + + /** Test the property 'operation' */ + @Test + public void operationTest() { + // TODO: test operation + } + + /** Test the property 'preferences' */ + @Test + public void preferencesTest() { + // TODO: test preferences + } + + /** Test the property 'resetEvents' */ + @Test + public void resetEventsTest() { + // TODO: test resetEvents + } +} diff --git a/sdks/java/src/test/java/com/thoughtspot/client/model/OrgChannelConfigResponseTest.java b/sdks/java/src/test/java/com/thoughtspot/client/model/OrgChannelConfigResponseTest.java new file mode 100644 index 000000000..21b2736a5 --- /dev/null +++ b/sdks/java/src/test/java/com/thoughtspot/client/model/OrgChannelConfigResponseTest.java @@ -0,0 +1,30 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client.model; + +import org.junit.jupiter.api.Test; + +/** Model tests for OrgChannelConfigResponse */ +public class OrgChannelConfigResponseTest { + private final OrgChannelConfigResponse model = new OrgChannelConfigResponse(); + + /** Model tests for OrgChannelConfigResponse */ + @Test + public void testOrgChannelConfigResponse() { + // TODO: test OrgChannelConfigResponse + } + + /** Test the property 'org' */ + @Test + public void orgTest() { + // TODO: test org + } + + /** Test the property 'preferences' */ + @Test + public void preferencesTest() { + // TODO: test preferences + } +} diff --git a/sdks/java/src/test/java/com/thoughtspot/client/model/OrgDetailsTest.java b/sdks/java/src/test/java/com/thoughtspot/client/model/OrgDetailsTest.java new file mode 100644 index 000000000..85dadad54 --- /dev/null +++ b/sdks/java/src/test/java/com/thoughtspot/client/model/OrgDetailsTest.java @@ -0,0 +1,30 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client.model; + +import org.junit.jupiter.api.Test; + +/** Model tests for OrgDetails */ +public class OrgDetailsTest { + private final OrgDetails model = new OrgDetails(); + + /** Model tests for OrgDetails */ + @Test + public void testOrgDetails() { + // TODO: test OrgDetails + } + + /** Test the property 'id' */ + @Test + public void idTest() { + // TODO: test id + } + + /** Test the property 'name' */ + @Test + public void nameTest() { + // TODO: test name + } +} diff --git a/sdks/java/src/test/java/com/thoughtspot/client/model/OrgInfoTest.java b/sdks/java/src/test/java/com/thoughtspot/client/model/OrgInfoTest.java new file mode 100644 index 000000000..503978c0a --- /dev/null +++ b/sdks/java/src/test/java/com/thoughtspot/client/model/OrgInfoTest.java @@ -0,0 +1,30 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client.model; + +import org.junit.jupiter.api.Test; + +/** Model tests for OrgInfo */ +public class OrgInfoTest { + private final OrgInfo model = new OrgInfo(); + + /** Model tests for OrgInfo */ + @Test + public void testOrgInfo() { + // TODO: test OrgInfo + } + + /** Test the property 'id' */ + @Test + public void idTest() { + // TODO: test id + } + + /** Test the property 'name' */ + @Test + public void nameTest() { + // TODO: test name + } +} diff --git a/sdks/java/src/test/java/com/thoughtspot/client/model/OrgNonEmbedAccessInputTest.java b/sdks/java/src/test/java/com/thoughtspot/client/model/OrgNonEmbedAccessInputTest.java new file mode 100644 index 000000000..dcb8b6145 --- /dev/null +++ b/sdks/java/src/test/java/com/thoughtspot/client/model/OrgNonEmbedAccessInputTest.java @@ -0,0 +1,30 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client.model; + +import org.junit.jupiter.api.Test; + +/** Model tests for OrgNonEmbedAccessInput */ +public class OrgNonEmbedAccessInputTest { + private final OrgNonEmbedAccessInput model = new OrgNonEmbedAccessInput(); + + /** Model tests for OrgNonEmbedAccessInput */ + @Test + public void testOrgNonEmbedAccessInput() { + // TODO: test OrgNonEmbedAccessInput + } + + /** Test the property 'blockFullAppAccess' */ + @Test + public void blockFullAppAccessTest() { + // TODO: test blockFullAppAccess + } + + /** Test the property 'groupsIdentifiersWithAccess' */ + @Test + public void groupsIdentifiersWithAccessTest() { + // TODO: test groupsIdentifiersWithAccess + } +} diff --git a/sdks/java/src/test/java/com/thoughtspot/client/model/OrgNonEmbedAccessTest.java b/sdks/java/src/test/java/com/thoughtspot/client/model/OrgNonEmbedAccessTest.java new file mode 100644 index 000000000..b4d9ac62f --- /dev/null +++ b/sdks/java/src/test/java/com/thoughtspot/client/model/OrgNonEmbedAccessTest.java @@ -0,0 +1,30 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client.model; + +import org.junit.jupiter.api.Test; + +/** Model tests for OrgNonEmbedAccess */ +public class OrgNonEmbedAccessTest { + private final OrgNonEmbedAccess model = new OrgNonEmbedAccess(); + + /** Model tests for OrgNonEmbedAccess */ + @Test + public void testOrgNonEmbedAccess() { + // TODO: test OrgNonEmbedAccess + } + + /** Test the property 'blockFullAppAccess' */ + @Test + public void blockFullAppAccessTest() { + // TODO: test blockFullAppAccess + } + + /** Test the property 'groupsWithAccess' */ + @Test + public void groupsWithAccessTest() { + // TODO: test groupsWithAccess + } +} diff --git a/sdks/java/src/test/java/com/thoughtspot/client/model/OrgPreferenceSearchCriteriaInputTest.java b/sdks/java/src/test/java/com/thoughtspot/client/model/OrgPreferenceSearchCriteriaInputTest.java new file mode 100644 index 000000000..2f3197d88 --- /dev/null +++ b/sdks/java/src/test/java/com/thoughtspot/client/model/OrgPreferenceSearchCriteriaInputTest.java @@ -0,0 +1,30 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client.model; + +import org.junit.jupiter.api.Test; + +/** Model tests for OrgPreferenceSearchCriteriaInput */ +public class OrgPreferenceSearchCriteriaInputTest { + private final OrgPreferenceSearchCriteriaInput model = new OrgPreferenceSearchCriteriaInput(); + + /** Model tests for OrgPreferenceSearchCriteriaInput */ + @Test + public void testOrgPreferenceSearchCriteriaInput() { + // TODO: test OrgPreferenceSearchCriteriaInput + } + + /** Test the property 'orgIdentifier' */ + @Test + public void orgIdentifierTest() { + // TODO: test orgIdentifier + } + + /** Test the property 'eventTypes' */ + @Test + public void eventTypesTest() { + // TODO: test eventTypes + } +} diff --git a/sdks/java/src/test/java/com/thoughtspot/client/model/OrgResponseTest.java b/sdks/java/src/test/java/com/thoughtspot/client/model/OrgResponseTest.java new file mode 100644 index 000000000..d5527113a --- /dev/null +++ b/sdks/java/src/test/java/com/thoughtspot/client/model/OrgResponseTest.java @@ -0,0 +1,48 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client.model; + +import org.junit.jupiter.api.Test; + +/** Model tests for OrgResponse */ +public class OrgResponseTest { + private final OrgResponse model = new OrgResponse(); + + /** Model tests for OrgResponse */ + @Test + public void testOrgResponse() { + // TODO: test OrgResponse + } + + /** Test the property 'id' */ + @Test + public void idTest() { + // TODO: test id + } + + /** Test the property 'name' */ + @Test + public void nameTest() { + // TODO: test name + } + + /** Test the property 'status' */ + @Test + public void statusTest() { + // TODO: test status + } + + /** Test the property 'description' */ + @Test + public void descriptionTest() { + // TODO: test description + } + + /** Test the property 'visibility' */ + @Test + public void visibilityTest() { + // TODO: test visibility + } +} diff --git a/sdks/java/src/test/java/com/thoughtspot/client/model/OrgTest.java b/sdks/java/src/test/java/com/thoughtspot/client/model/OrgTest.java new file mode 100644 index 000000000..e7a229fa9 --- /dev/null +++ b/sdks/java/src/test/java/com/thoughtspot/client/model/OrgTest.java @@ -0,0 +1,30 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client.model; + +import org.junit.jupiter.api.Test; + +/** Model tests for Org */ +public class OrgTest { + private final Org model = new Org(); + + /** Model tests for Org */ + @Test + public void testOrg() { + // TODO: test Org + } + + /** Test the property 'id' */ + @Test + public void idTest() { + // TODO: test id + } + + /** Test the property 'name' */ + @Test + public void nameTest() { + // TODO: test name + } +} diff --git a/sdks/java/src/test/java/com/thoughtspot/client/model/OrgTypeTest.java b/sdks/java/src/test/java/com/thoughtspot/client/model/OrgTypeTest.java new file mode 100644 index 000000000..0d6b78a6f --- /dev/null +++ b/sdks/java/src/test/java/com/thoughtspot/client/model/OrgTypeTest.java @@ -0,0 +1,30 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client.model; + +import org.junit.jupiter.api.Test; + +/** Model tests for OrgType */ +public class OrgTypeTest { + private final OrgType model = new OrgType(); + + /** Model tests for OrgType */ + @Test + public void testOrgType() { + // TODO: test OrgType + } + + /** Test the property 'name' */ + @Test + public void nameTest() { + // TODO: test name + } + + /** Test the property 'id' */ + @Test + public void idTest() { + // TODO: test id + } +} diff --git a/sdks/java/src/test/java/com/thoughtspot/client/model/ParameterValuesTest.java b/sdks/java/src/test/java/com/thoughtspot/client/model/ParameterValuesTest.java new file mode 100644 index 000000000..75fc1360e --- /dev/null +++ b/sdks/java/src/test/java/com/thoughtspot/client/model/ParameterValuesTest.java @@ -0,0 +1,30 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client.model; + +import org.junit.jupiter.api.Test; + +/** Model tests for ParameterValues */ +public class ParameterValuesTest { + private final ParameterValues model = new ParameterValues(); + + /** Model tests for ParameterValues */ + @Test + public void testParameterValues() { + // TODO: test ParameterValues + } + + /** Test the property 'name' */ + @Test + public void nameTest() { + // TODO: test name + } + + /** Test the property 'values' */ + @Test + public void valuesTest() { + // TODO: test values + } +} diff --git a/sdks/java/src/test/java/com/thoughtspot/client/model/ParameterizeMetadataFieldsRequestTest.java b/sdks/java/src/test/java/com/thoughtspot/client/model/ParameterizeMetadataFieldsRequestTest.java new file mode 100644 index 000000000..286244a16 --- /dev/null +++ b/sdks/java/src/test/java/com/thoughtspot/client/model/ParameterizeMetadataFieldsRequestTest.java @@ -0,0 +1,48 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client.model; + +import org.junit.jupiter.api.Test; + +/** Model tests for ParameterizeMetadataFieldsRequest */ +public class ParameterizeMetadataFieldsRequestTest { + private final ParameterizeMetadataFieldsRequest model = new ParameterizeMetadataFieldsRequest(); + + /** Model tests for ParameterizeMetadataFieldsRequest */ + @Test + public void testParameterizeMetadataFieldsRequest() { + // TODO: test ParameterizeMetadataFieldsRequest + } + + /** Test the property 'metadataType' */ + @Test + public void metadataTypeTest() { + // TODO: test metadataType + } + + /** Test the property 'metadataIdentifier' */ + @Test + public void metadataIdentifierTest() { + // TODO: test metadataIdentifier + } + + /** Test the property 'fieldType' */ + @Test + public void fieldTypeTest() { + // TODO: test fieldType + } + + /** Test the property 'fieldNames' */ + @Test + public void fieldNamesTest() { + // TODO: test fieldNames + } + + /** Test the property 'variableIdentifier' */ + @Test + public void variableIdentifierTest() { + // TODO: test variableIdentifier + } +} diff --git a/sdks/java/src/test/java/com/thoughtspot/client/model/ParameterizeMetadataRequestTest.java b/sdks/java/src/test/java/com/thoughtspot/client/model/ParameterizeMetadataRequestTest.java new file mode 100644 index 000000000..bec446a54 --- /dev/null +++ b/sdks/java/src/test/java/com/thoughtspot/client/model/ParameterizeMetadataRequestTest.java @@ -0,0 +1,48 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client.model; + +import org.junit.jupiter.api.Test; + +/** Model tests for ParameterizeMetadataRequest */ +public class ParameterizeMetadataRequestTest { + private final ParameterizeMetadataRequest model = new ParameterizeMetadataRequest(); + + /** Model tests for ParameterizeMetadataRequest */ + @Test + public void testParameterizeMetadataRequest() { + // TODO: test ParameterizeMetadataRequest + } + + /** Test the property 'metadataType' */ + @Test + public void metadataTypeTest() { + // TODO: test metadataType + } + + /** Test the property 'metadataIdentifier' */ + @Test + public void metadataIdentifierTest() { + // TODO: test metadataIdentifier + } + + /** Test the property 'fieldType' */ + @Test + public void fieldTypeTest() { + // TODO: test fieldType + } + + /** Test the property 'fieldName' */ + @Test + public void fieldNameTest() { + // TODO: test fieldName + } + + /** Test the property 'variableIdentifier' */ + @Test + public void variableIdentifierTest() { + // TODO: test variableIdentifier + } +} diff --git a/sdks/java/src/test/java/com/thoughtspot/client/model/ParametersListItemInputTest.java b/sdks/java/src/test/java/com/thoughtspot/client/model/ParametersListItemInputTest.java new file mode 100644 index 000000000..a265bbe86 --- /dev/null +++ b/sdks/java/src/test/java/com/thoughtspot/client/model/ParametersListItemInputTest.java @@ -0,0 +1,30 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client.model; + +import org.junit.jupiter.api.Test; + +/** Model tests for ParametersListItemInput */ +public class ParametersListItemInputTest { + private final ParametersListItemInput model = new ParametersListItemInput(); + + /** Model tests for ParametersListItemInput */ + @Test + public void testParametersListItemInput() { + // TODO: test ParametersListItemInput + } + + /** Test the property 'key' */ + @Test + public void keyTest() { + // TODO: test key + } + + /** Test the property 'value' */ + @Test + public void valueTest() { + // TODO: test value + } +} diff --git a/sdks/java/src/test/java/com/thoughtspot/client/model/ParametersListItemTest.java b/sdks/java/src/test/java/com/thoughtspot/client/model/ParametersListItemTest.java new file mode 100644 index 000000000..ef7f001d9 --- /dev/null +++ b/sdks/java/src/test/java/com/thoughtspot/client/model/ParametersListItemTest.java @@ -0,0 +1,30 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client.model; + +import org.junit.jupiter.api.Test; + +/** Model tests for ParametersListItem */ +public class ParametersListItemTest { + private final ParametersListItem model = new ParametersListItem(); + + /** Model tests for ParametersListItem */ + @Test + public void testParametersListItem() { + // TODO: test ParametersListItem + } + + /** Test the property 'key' */ + @Test + public void keyTest() { + // TODO: test key + } + + /** Test the property 'value' */ + @Test + public void valueTest() { + // TODO: test value + } +} diff --git a/sdks/java/src/test/java/com/thoughtspot/client/model/PdfOptionsInputTest.java b/sdks/java/src/test/java/com/thoughtspot/client/model/PdfOptionsInputTest.java new file mode 100644 index 000000000..35d82e53e --- /dev/null +++ b/sdks/java/src/test/java/com/thoughtspot/client/model/PdfOptionsInputTest.java @@ -0,0 +1,72 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client.model; + +import org.junit.jupiter.api.Test; + +/** Model tests for PdfOptionsInput */ +public class PdfOptionsInputTest { + private final PdfOptionsInput model = new PdfOptionsInput(); + + /** Model tests for PdfOptionsInput */ + @Test + public void testPdfOptionsInput() { + // TODO: test PdfOptionsInput + } + + /** Test the property 'pageSize' */ + @Test + public void pageSizeTest() { + // TODO: test pageSize + } + + /** Test the property 'zoomLevel' */ + @Test + public void zoomLevelTest() { + // TODO: test zoomLevel + } + + /** Test the property 'includeCoverPage' */ + @Test + public void includeCoverPageTest() { + // TODO: test includeCoverPage + } + + /** Test the property 'includeCustomLogo' */ + @Test + public void includeCustomLogoTest() { + // TODO: test includeCustomLogo + } + + /** Test the property 'includeFilterPage' */ + @Test + public void includeFilterPageTest() { + // TODO: test includeFilterPage + } + + /** Test the property 'includePageNumber' */ + @Test + public void includePageNumberTest() { + // TODO: test includePageNumber + } + + /** Test the property 'pageOrientation' */ + @Test + public void pageOrientationTest() { + // TODO: test pageOrientation + } + + /** Test the property 'truncateTable' */ + @Test + public void truncateTableTest() { + // TODO: test truncateTable + } + + /** Test the property 'pageFooterText' */ + @Test + public void pageFooterTextTest() { + // TODO: test pageFooterText + } +} diff --git a/sdks/java/src/test/java/com/thoughtspot/client/model/PdfOptionsTest.java b/sdks/java/src/test/java/com/thoughtspot/client/model/PdfOptionsTest.java new file mode 100644 index 000000000..302bc2792 --- /dev/null +++ b/sdks/java/src/test/java/com/thoughtspot/client/model/PdfOptionsTest.java @@ -0,0 +1,72 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client.model; + +import org.junit.jupiter.api.Test; + +/** Model tests for PdfOptions */ +public class PdfOptionsTest { + private final PdfOptions model = new PdfOptions(); + + /** Model tests for PdfOptions */ + @Test + public void testPdfOptions() { + // TODO: test PdfOptions + } + + /** Test the property 'completeLiveboard' */ + @Test + public void completeLiveboardTest() { + // TODO: test completeLiveboard + } + + /** Test the property 'includeCoverPage' */ + @Test + public void includeCoverPageTest() { + // TODO: test includeCoverPage + } + + /** Test the property 'includeCustomLogo' */ + @Test + public void includeCustomLogoTest() { + // TODO: test includeCustomLogo + } + + /** Test the property 'includeFilterPage' */ + @Test + public void includeFilterPageTest() { + // TODO: test includeFilterPage + } + + /** Test the property 'includePageNumber' */ + @Test + public void includePageNumberTest() { + // TODO: test includePageNumber + } + + /** Test the property 'pageFooterText' */ + @Test + public void pageFooterTextTest() { + // TODO: test pageFooterText + } + + /** Test the property 'pageOrientation' */ + @Test + public void pageOrientationTest() { + // TODO: test pageOrientation + } + + /** Test the property 'pageSize' */ + @Test + public void pageSizeTest() { + // TODO: test pageSize + } + + /** Test the property 'truncateTable' */ + @Test + public void truncateTableTest() { + // TODO: test truncateTable + } +} diff --git a/sdks/java/src/test/java/com/thoughtspot/client/model/PermissionInputTest.java b/sdks/java/src/test/java/com/thoughtspot/client/model/PermissionInputTest.java new file mode 100644 index 000000000..fe005f61f --- /dev/null +++ b/sdks/java/src/test/java/com/thoughtspot/client/model/PermissionInputTest.java @@ -0,0 +1,30 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client.model; + +import org.junit.jupiter.api.Test; + +/** Model tests for PermissionInput */ +public class PermissionInputTest { + private final PermissionInput model = new PermissionInput(); + + /** Model tests for PermissionInput */ + @Test + public void testPermissionInput() { + // TODO: test PermissionInput + } + + /** Test the property 'principal' */ + @Test + public void principalTest() { + // TODO: test principal + } + + /** Test the property 'shareMode' */ + @Test + public void shareModeTest() { + // TODO: test shareMode + } +} diff --git a/sdks/java/src/test/java/com/thoughtspot/client/model/PermissionOfMetadataResponseTest.java b/sdks/java/src/test/java/com/thoughtspot/client/model/PermissionOfMetadataResponseTest.java new file mode 100644 index 000000000..eaa01f310 --- /dev/null +++ b/sdks/java/src/test/java/com/thoughtspot/client/model/PermissionOfMetadataResponseTest.java @@ -0,0 +1,24 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client.model; + +import org.junit.jupiter.api.Test; + +/** Model tests for PermissionOfMetadataResponse */ +public class PermissionOfMetadataResponseTest { + private final PermissionOfMetadataResponse model = new PermissionOfMetadataResponse(); + + /** Model tests for PermissionOfMetadataResponse */ + @Test + public void testPermissionOfMetadataResponse() { + // TODO: test PermissionOfMetadataResponse + } + + /** Test the property 'metadataPermissionDetails' */ + @Test + public void metadataPermissionDetailsTest() { + // TODO: test metadataPermissionDetails + } +} diff --git a/sdks/java/src/test/java/com/thoughtspot/client/model/PermissionOfPrincipalsResponseTest.java b/sdks/java/src/test/java/com/thoughtspot/client/model/PermissionOfPrincipalsResponseTest.java new file mode 100644 index 000000000..a98e12641 --- /dev/null +++ b/sdks/java/src/test/java/com/thoughtspot/client/model/PermissionOfPrincipalsResponseTest.java @@ -0,0 +1,24 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client.model; + +import org.junit.jupiter.api.Test; + +/** Model tests for PermissionOfPrincipalsResponse */ +public class PermissionOfPrincipalsResponseTest { + private final PermissionOfPrincipalsResponse model = new PermissionOfPrincipalsResponse(); + + /** Model tests for PermissionOfPrincipalsResponse */ + @Test + public void testPermissionOfPrincipalsResponse() { + // TODO: test PermissionOfPrincipalsResponse + } + + /** Test the property 'principalPermissionDetails' */ + @Test + public void principalPermissionDetailsTest() { + // TODO: test principalPermissionDetails + } +} diff --git a/sdks/java/src/test/java/com/thoughtspot/client/model/PermissionsMetadataTypeInputTest.java b/sdks/java/src/test/java/com/thoughtspot/client/model/PermissionsMetadataTypeInputTest.java new file mode 100644 index 000000000..f73a14cdb --- /dev/null +++ b/sdks/java/src/test/java/com/thoughtspot/client/model/PermissionsMetadataTypeInputTest.java @@ -0,0 +1,30 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client.model; + +import org.junit.jupiter.api.Test; + +/** Model tests for PermissionsMetadataTypeInput */ +public class PermissionsMetadataTypeInputTest { + private final PermissionsMetadataTypeInput model = new PermissionsMetadataTypeInput(); + + /** Model tests for PermissionsMetadataTypeInput */ + @Test + public void testPermissionsMetadataTypeInput() { + // TODO: test PermissionsMetadataTypeInput + } + + /** Test the property 'type' */ + @Test + public void typeTest() { + // TODO: test type + } + + /** Test the property 'identifier' */ + @Test + public void identifierTest() { + // TODO: test identifier + } +} diff --git a/sdks/java/src/test/java/com/thoughtspot/client/model/PngOptionsInputTest.java b/sdks/java/src/test/java/com/thoughtspot/client/model/PngOptionsInputTest.java new file mode 100644 index 000000000..64f6ff489 --- /dev/null +++ b/sdks/java/src/test/java/com/thoughtspot/client/model/PngOptionsInputTest.java @@ -0,0 +1,54 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client.model; + +import org.junit.jupiter.api.Test; + +/** Model tests for PngOptionsInput */ +public class PngOptionsInputTest { + private final PngOptionsInput model = new PngOptionsInput(); + + /** Model tests for PngOptionsInput */ + @Test + public void testPngOptionsInput() { + // TODO: test PngOptionsInput + } + + /** Test the property 'includeCoverPage' */ + @Test + public void includeCoverPageTest() { + // TODO: test includeCoverPage + } + + /** Test the property 'includeFilterPage' */ + @Test + public void includeFilterPageTest() { + // TODO: test includeFilterPage + } + + /** Test the property 'personalisedViewId' */ + @Test + public void personalisedViewIdTest() { + // TODO: test personalisedViewId + } + + /** Test the property 'imageResolution' */ + @Test + public void imageResolutionTest() { + // TODO: test imageResolution + } + + /** Test the property 'imageScale' */ + @Test + public void imageScaleTest() { + // TODO: test imageScale + } + + /** Test the property 'includeHeader' */ + @Test + public void includeHeaderTest() { + // TODO: test includeHeader + } +} diff --git a/sdks/java/src/test/java/com/thoughtspot/client/model/PolicyProcessOptionsInputTest.java b/sdks/java/src/test/java/com/thoughtspot/client/model/PolicyProcessOptionsInputTest.java new file mode 100644 index 000000000..c0ef407a4 --- /dev/null +++ b/sdks/java/src/test/java/com/thoughtspot/client/model/PolicyProcessOptionsInputTest.java @@ -0,0 +1,24 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client.model; + +import org.junit.jupiter.api.Test; + +/** Model tests for PolicyProcessOptionsInput */ +public class PolicyProcessOptionsInputTest { + private final PolicyProcessOptionsInput model = new PolicyProcessOptionsInput(); + + /** Model tests for PolicyProcessOptionsInput */ + @Test + public void testPolicyProcessOptionsInput() { + // TODO: test PolicyProcessOptionsInput + } + + /** Test the property 'impersonateUser' */ + @Test + public void impersonateUserTest() { + // TODO: test impersonateUser + } +} diff --git a/sdks/java/src/test/java/com/thoughtspot/client/model/PolicyProcessOptionsTest.java b/sdks/java/src/test/java/com/thoughtspot/client/model/PolicyProcessOptionsTest.java new file mode 100644 index 000000000..c301b9162 --- /dev/null +++ b/sdks/java/src/test/java/com/thoughtspot/client/model/PolicyProcessOptionsTest.java @@ -0,0 +1,24 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client.model; + +import org.junit.jupiter.api.Test; + +/** Model tests for PolicyProcessOptions */ +public class PolicyProcessOptionsTest { + private final PolicyProcessOptions model = new PolicyProcessOptions(); + + /** Model tests for PolicyProcessOptions */ + @Test + public void testPolicyProcessOptions() { + // TODO: test PolicyProcessOptions + } + + /** Test the property 'impersonateUser' */ + @Test + public void impersonateUserTest() { + // TODO: test impersonateUser + } +} diff --git a/sdks/java/src/test/java/com/thoughtspot/client/model/PrincipalsInputTest.java b/sdks/java/src/test/java/com/thoughtspot/client/model/PrincipalsInputTest.java new file mode 100644 index 000000000..fa7f31552 --- /dev/null +++ b/sdks/java/src/test/java/com/thoughtspot/client/model/PrincipalsInputTest.java @@ -0,0 +1,30 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client.model; + +import org.junit.jupiter.api.Test; + +/** Model tests for PrincipalsInput */ +public class PrincipalsInputTest { + private final PrincipalsInput model = new PrincipalsInput(); + + /** Model tests for PrincipalsInput */ + @Test + public void testPrincipalsInput() { + // TODO: test PrincipalsInput + } + + /** Test the property 'identifier' */ + @Test + public void identifierTest() { + // TODO: test identifier + } + + /** Test the property 'type' */ + @Test + public void typeTest() { + // TODO: test type + } +} diff --git a/sdks/java/src/test/java/com/thoughtspot/client/model/PrincipalsListItemInputTest.java b/sdks/java/src/test/java/com/thoughtspot/client/model/PrincipalsListItemInputTest.java new file mode 100644 index 000000000..78f82d4b1 --- /dev/null +++ b/sdks/java/src/test/java/com/thoughtspot/client/model/PrincipalsListItemInputTest.java @@ -0,0 +1,30 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client.model; + +import org.junit.jupiter.api.Test; + +/** Model tests for PrincipalsListItemInput */ +public class PrincipalsListItemInputTest { + private final PrincipalsListItemInput model = new PrincipalsListItemInput(); + + /** Model tests for PrincipalsListItemInput */ + @Test + public void testPrincipalsListItemInput() { + // TODO: test PrincipalsListItemInput + } + + /** Test the property 'identifier' */ + @Test + public void identifierTest() { + // TODO: test identifier + } + + /** Test the property 'type' */ + @Test + public void typeTest() { + // TODO: test type + } +} diff --git a/sdks/java/src/test/java/com/thoughtspot/client/model/PrincipalsListItemTest.java b/sdks/java/src/test/java/com/thoughtspot/client/model/PrincipalsListItemTest.java new file mode 100644 index 000000000..1fe4e310f --- /dev/null +++ b/sdks/java/src/test/java/com/thoughtspot/client/model/PrincipalsListItemTest.java @@ -0,0 +1,30 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client.model; + +import org.junit.jupiter.api.Test; + +/** Model tests for PrincipalsListItem */ +public class PrincipalsListItemTest { + private final PrincipalsListItem model = new PrincipalsListItem(); + + /** Model tests for PrincipalsListItem */ + @Test + public void testPrincipalsListItem() { + // TODO: test PrincipalsListItem + } + + /** Test the property 'identifier' */ + @Test + public void identifierTest() { + // TODO: test identifier + } + + /** Test the property 'type' */ + @Test + public void typeTest() { + // TODO: test type + } +} diff --git a/sdks/java/src/test/java/com/thoughtspot/client/model/PublishMetadataListItemTest.java b/sdks/java/src/test/java/com/thoughtspot/client/model/PublishMetadataListItemTest.java new file mode 100644 index 000000000..d74e3c36f --- /dev/null +++ b/sdks/java/src/test/java/com/thoughtspot/client/model/PublishMetadataListItemTest.java @@ -0,0 +1,30 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client.model; + +import org.junit.jupiter.api.Test; + +/** Model tests for PublishMetadataListItem */ +public class PublishMetadataListItemTest { + private final PublishMetadataListItem model = new PublishMetadataListItem(); + + /** Model tests for PublishMetadataListItem */ + @Test + public void testPublishMetadataListItem() { + // TODO: test PublishMetadataListItem + } + + /** Test the property 'identifier' */ + @Test + public void identifierTest() { + // TODO: test identifier + } + + /** Test the property 'type' */ + @Test + public void typeTest() { + // TODO: test type + } +} diff --git a/sdks/java/src/test/java/com/thoughtspot/client/model/PublishMetadataRequestTest.java b/sdks/java/src/test/java/com/thoughtspot/client/model/PublishMetadataRequestTest.java new file mode 100644 index 000000000..8be9f8da3 --- /dev/null +++ b/sdks/java/src/test/java/com/thoughtspot/client/model/PublishMetadataRequestTest.java @@ -0,0 +1,36 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client.model; + +import org.junit.jupiter.api.Test; + +/** Model tests for PublishMetadataRequest */ +public class PublishMetadataRequestTest { + private final PublishMetadataRequest model = new PublishMetadataRequest(); + + /** Model tests for PublishMetadataRequest */ + @Test + public void testPublishMetadataRequest() { + // TODO: test PublishMetadataRequest + } + + /** Test the property 'metadata' */ + @Test + public void metadataTest() { + // TODO: test metadata + } + + /** Test the property 'orgIdentifiers' */ + @Test + public void orgIdentifiersTest() { + // TODO: test orgIdentifiers + } + + /** Test the property 'skipValidation' */ + @Test + public void skipValidationTest() { + // TODO: test skipValidation + } +} diff --git a/sdks/java/src/test/java/com/thoughtspot/client/model/PutVariableValuesRequestTest.java b/sdks/java/src/test/java/com/thoughtspot/client/model/PutVariableValuesRequestTest.java new file mode 100644 index 000000000..73c723033 --- /dev/null +++ b/sdks/java/src/test/java/com/thoughtspot/client/model/PutVariableValuesRequestTest.java @@ -0,0 +1,30 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client.model; + +import org.junit.jupiter.api.Test; + +/** Model tests for PutVariableValuesRequest */ +public class PutVariableValuesRequestTest { + private final PutVariableValuesRequest model = new PutVariableValuesRequest(); + + /** Model tests for PutVariableValuesRequest */ + @Test + public void testPutVariableValuesRequest() { + // TODO: test PutVariableValuesRequest + } + + /** Test the property 'operation' */ + @Test + public void operationTest() { + // TODO: test operation + } + + /** Test the property 'variableAssignment' */ + @Test + public void variableAssignmentTest() { + // TODO: test variableAssignment + } +} diff --git a/sdks/java/src/test/java/com/thoughtspot/client/model/QueryGetDecomposedQueryRequestTest.java b/sdks/java/src/test/java/com/thoughtspot/client/model/QueryGetDecomposedQueryRequestTest.java new file mode 100644 index 000000000..066322234 --- /dev/null +++ b/sdks/java/src/test/java/com/thoughtspot/client/model/QueryGetDecomposedQueryRequestTest.java @@ -0,0 +1,60 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client.model; + +import org.junit.jupiter.api.Test; + +/** Model tests for QueryGetDecomposedQueryRequest */ +public class QueryGetDecomposedQueryRequestTest { + private final QueryGetDecomposedQueryRequest model = new QueryGetDecomposedQueryRequest(); + + /** Model tests for QueryGetDecomposedQueryRequest */ + @Test + public void testQueryGetDecomposedQueryRequest() { + // TODO: test QueryGetDecomposedQueryRequest + } + + /** Test the property 'answerIds' */ + @Test + public void answerIdsTest() { + // TODO: test answerIds + } + + /** Test the property 'content' */ + @Test + public void contentTest() { + // TODO: test content + } + + /** Test the property 'conversationId' */ + @Test + public void conversationIdTest() { + // TODO: test conversationId + } + + /** Test the property 'liveboardIds' */ + @Test + public void liveboardIdsTest() { + // TODO: test liveboardIds + } + + /** Test the property 'maxDecomposedQueries' */ + @Test + public void maxDecomposedQueriesTest() { + // TODO: test maxDecomposedQueries + } + + /** Test the property 'nlsRequest' */ + @Test + public void nlsRequestTest() { + // TODO: test nlsRequest + } + + /** Test the property 'worksheetIds' */ + @Test + public void worksheetIdsTest() { + // TODO: test worksheetIds + } +} diff --git a/sdks/java/src/test/java/com/thoughtspot/client/model/RecipientDetailsInputTest.java b/sdks/java/src/test/java/com/thoughtspot/client/model/RecipientDetailsInputTest.java new file mode 100644 index 000000000..b158fa14d --- /dev/null +++ b/sdks/java/src/test/java/com/thoughtspot/client/model/RecipientDetailsInputTest.java @@ -0,0 +1,30 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client.model; + +import org.junit.jupiter.api.Test; + +/** Model tests for RecipientDetailsInput */ +public class RecipientDetailsInputTest { + private final RecipientDetailsInput model = new RecipientDetailsInput(); + + /** Model tests for RecipientDetailsInput */ + @Test + public void testRecipientDetailsInput() { + // TODO: test RecipientDetailsInput + } + + /** Test the property 'emails' */ + @Test + public void emailsTest() { + // TODO: test emails + } + + /** Test the property 'principals' */ + @Test + public void principalsTest() { + // TODO: test principals + } +} diff --git a/sdks/java/src/test/java/com/thoughtspot/client/model/RecipientDetailsTest.java b/sdks/java/src/test/java/com/thoughtspot/client/model/RecipientDetailsTest.java new file mode 100644 index 000000000..fb0af587b --- /dev/null +++ b/sdks/java/src/test/java/com/thoughtspot/client/model/RecipientDetailsTest.java @@ -0,0 +1,30 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client.model; + +import org.junit.jupiter.api.Test; + +/** Model tests for RecipientDetails */ +public class RecipientDetailsTest { + private final RecipientDetails model = new RecipientDetails(); + + /** Model tests for RecipientDetails */ + @Test + public void testRecipientDetails() { + // TODO: test RecipientDetails + } + + /** Test the property 'emails' */ + @Test + public void emailsTest() { + // TODO: test emails + } + + /** Test the property 'principals' */ + @Test + public void principalsTest() { + // TODO: test principals + } +} diff --git a/sdks/java/src/test/java/com/thoughtspot/client/model/RegionalSettingsInputTest.java b/sdks/java/src/test/java/com/thoughtspot/client/model/RegionalSettingsInputTest.java new file mode 100644 index 000000000..514438de3 --- /dev/null +++ b/sdks/java/src/test/java/com/thoughtspot/client/model/RegionalSettingsInputTest.java @@ -0,0 +1,42 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client.model; + +import org.junit.jupiter.api.Test; + +/** Model tests for RegionalSettingsInput */ +public class RegionalSettingsInputTest { + private final RegionalSettingsInput model = new RegionalSettingsInput(); + + /** Model tests for RegionalSettingsInput */ + @Test + public void testRegionalSettingsInput() { + // TODO: test RegionalSettingsInput + } + + /** Test the property 'currencyFormat' */ + @Test + public void currencyFormatTest() { + // TODO: test currencyFormat + } + + /** Test the property 'userLocale' */ + @Test + public void userLocaleTest() { + // TODO: test userLocale + } + + /** Test the property 'numberFormatLocale' */ + @Test + public void numberFormatLocaleTest() { + // TODO: test numberFormatLocale + } + + /** Test the property 'dateFormatLocale' */ + @Test + public void dateFormatLocaleTest() { + // TODO: test dateFormatLocale + } +} diff --git a/sdks/java/src/test/java/com/thoughtspot/client/model/RepoConfigObjectTest.java b/sdks/java/src/test/java/com/thoughtspot/client/model/RepoConfigObjectTest.java new file mode 100644 index 000000000..ce98da74b --- /dev/null +++ b/sdks/java/src/test/java/com/thoughtspot/client/model/RepoConfigObjectTest.java @@ -0,0 +1,60 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client.model; + +import org.junit.jupiter.api.Test; + +/** Model tests for RepoConfigObject */ +public class RepoConfigObjectTest { + private final RepoConfigObject model = new RepoConfigObject(); + + /** Model tests for RepoConfigObject */ + @Test + public void testRepoConfigObject() { + // TODO: test RepoConfigObject + } + + /** Test the property 'repositoryUrl' */ + @Test + public void repositoryUrlTest() { + // TODO: test repositoryUrl + } + + /** Test the property 'username' */ + @Test + public void usernameTest() { + // TODO: test username + } + + /** Test the property 'commitBranchName' */ + @Test + public void commitBranchNameTest() { + // TODO: test commitBranchName + } + + /** Test the property 'branches' */ + @Test + public void branchesTest() { + // TODO: test branches + } + + /** Test the property 'enableGuidMapping' */ + @Test + public void enableGuidMappingTest() { + // TODO: test enableGuidMapping + } + + /** Test the property 'configurationBranchName' */ + @Test + public void configurationBranchNameTest() { + // TODO: test configurationBranchName + } + + /** Test the property 'org' */ + @Test + public void orgTest() { + // TODO: test org + } +} diff --git a/sdks/java/src/test/java/com/thoughtspot/client/model/ResetUserPasswordRequestTest.java b/sdks/java/src/test/java/com/thoughtspot/client/model/ResetUserPasswordRequestTest.java new file mode 100644 index 000000000..112f5a617 --- /dev/null +++ b/sdks/java/src/test/java/com/thoughtspot/client/model/ResetUserPasswordRequestTest.java @@ -0,0 +1,30 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client.model; + +import org.junit.jupiter.api.Test; + +/** Model tests for ResetUserPasswordRequest */ +public class ResetUserPasswordRequestTest { + private final ResetUserPasswordRequest model = new ResetUserPasswordRequest(); + + /** Model tests for ResetUserPasswordRequest */ + @Test + public void testResetUserPasswordRequest() { + // TODO: test ResetUserPasswordRequest + } + + /** Test the property 'newPassword' */ + @Test + public void newPasswordTest() { + // TODO: test newPassword + } + + /** Test the property 'userIdentifier' */ + @Test + public void userIdentifierTest() { + // TODO: test userIdentifier + } +} diff --git a/sdks/java/src/test/java/com/thoughtspot/client/model/ResponseActivationURLTest.java b/sdks/java/src/test/java/com/thoughtspot/client/model/ResponseActivationURLTest.java new file mode 100644 index 000000000..098b39b8e --- /dev/null +++ b/sdks/java/src/test/java/com/thoughtspot/client/model/ResponseActivationURLTest.java @@ -0,0 +1,24 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client.model; + +import org.junit.jupiter.api.Test; + +/** Model tests for ResponseActivationURL */ +public class ResponseActivationURLTest { + private final ResponseActivationURL model = new ResponseActivationURL(); + + /** Model tests for ResponseActivationURL */ + @Test + public void testResponseActivationURL() { + // TODO: test ResponseActivationURL + } + + /** Test the property 'activationLink' */ + @Test + public void activationLinkTest() { + // TODO: test activationLink + } +} diff --git a/sdks/java/src/test/java/com/thoughtspot/client/model/ResponseCopyObjectTest.java b/sdks/java/src/test/java/com/thoughtspot/client/model/ResponseCopyObjectTest.java new file mode 100644 index 000000000..cb825c152 --- /dev/null +++ b/sdks/java/src/test/java/com/thoughtspot/client/model/ResponseCopyObjectTest.java @@ -0,0 +1,24 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client.model; + +import org.junit.jupiter.api.Test; + +/** Model tests for ResponseCopyObject */ +public class ResponseCopyObjectTest { + private final ResponseCopyObject model = new ResponseCopyObject(); + + /** Model tests for ResponseCopyObject */ + @Test + public void testResponseCopyObject() { + // TODO: test ResponseCopyObject + } + + /** Test the property 'metadataId' */ + @Test + public void metadataIdTest() { + // TODO: test metadataId + } +} diff --git a/sdks/java/src/test/java/com/thoughtspot/client/model/ResponseCustomActionTest.java b/sdks/java/src/test/java/com/thoughtspot/client/model/ResponseCustomActionTest.java new file mode 100644 index 000000000..d5c796b76 --- /dev/null +++ b/sdks/java/src/test/java/com/thoughtspot/client/model/ResponseCustomActionTest.java @@ -0,0 +1,54 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client.model; + +import org.junit.jupiter.api.Test; + +/** Model tests for ResponseCustomAction */ +public class ResponseCustomActionTest { + private final ResponseCustomAction model = new ResponseCustomAction(); + + /** Model tests for ResponseCustomAction */ + @Test + public void testResponseCustomAction() { + // TODO: test ResponseCustomAction + } + + /** Test the property 'actionDetails' */ + @Test + public void actionDetailsTest() { + // TODO: test actionDetails + } + + /** Test the property 'defaultActionConfig' */ + @Test + public void defaultActionConfigTest() { + // TODO: test defaultActionConfig + } + + /** Test the property 'id' */ + @Test + public void idTest() { + // TODO: test id + } + + /** Test the property 'metadataAssociation' */ + @Test + public void metadataAssociationTest() { + // TODO: test metadataAssociation + } + + /** Test the property 'name' */ + @Test + public void nameTest() { + // TODO: test name + } + + /** Test the property 'userGroups' */ + @Test + public void userGroupsTest() { + // TODO: test userGroups + } +} diff --git a/sdks/java/src/test/java/com/thoughtspot/client/model/ResponseFailedEntitiesTest.java b/sdks/java/src/test/java/com/thoughtspot/client/model/ResponseFailedEntitiesTest.java new file mode 100644 index 000000000..154d9e1df --- /dev/null +++ b/sdks/java/src/test/java/com/thoughtspot/client/model/ResponseFailedEntitiesTest.java @@ -0,0 +1,24 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client.model; + +import org.junit.jupiter.api.Test; + +/** Model tests for ResponseFailedEntities */ +public class ResponseFailedEntitiesTest { + private final ResponseFailedEntities model = new ResponseFailedEntities(); + + /** Model tests for ResponseFailedEntities */ + @Test + public void testResponseFailedEntities() { + // TODO: test ResponseFailedEntities + } + + /** Test the property 'data' */ + @Test + public void dataTest() { + // TODO: test data + } +} diff --git a/sdks/java/src/test/java/com/thoughtspot/client/model/ResponseFailedEntityTest.java b/sdks/java/src/test/java/com/thoughtspot/client/model/ResponseFailedEntityTest.java new file mode 100644 index 000000000..f9f7d85e3 --- /dev/null +++ b/sdks/java/src/test/java/com/thoughtspot/client/model/ResponseFailedEntityTest.java @@ -0,0 +1,36 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client.model; + +import org.junit.jupiter.api.Test; + +/** Model tests for ResponseFailedEntity */ +public class ResponseFailedEntityTest { + private final ResponseFailedEntity model = new ResponseFailedEntity(); + + /** Model tests for ResponseFailedEntity */ + @Test + public void testResponseFailedEntity() { + // TODO: test ResponseFailedEntity + } + + /** Test the property 'id' */ + @Test + public void idTest() { + // TODO: test id + } + + /** Test the property 'name' */ + @Test + public void nameTest() { + // TODO: test name + } + + /** Test the property 'error' */ + @Test + public void errorTest() { + // TODO: test error + } +} diff --git a/sdks/java/src/test/java/com/thoughtspot/client/model/ResponseIncompleteEntitiesTest.java b/sdks/java/src/test/java/com/thoughtspot/client/model/ResponseIncompleteEntitiesTest.java new file mode 100644 index 000000000..51dc446a5 --- /dev/null +++ b/sdks/java/src/test/java/com/thoughtspot/client/model/ResponseIncompleteEntitiesTest.java @@ -0,0 +1,24 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client.model; + +import org.junit.jupiter.api.Test; + +/** Model tests for ResponseIncompleteEntities */ +public class ResponseIncompleteEntitiesTest { + private final ResponseIncompleteEntities model = new ResponseIncompleteEntities(); + + /** Model tests for ResponseIncompleteEntities */ + @Test + public void testResponseIncompleteEntities() { + // TODO: test ResponseIncompleteEntities + } + + /** Test the property 'data' */ + @Test + public void dataTest() { + // TODO: test data + } +} diff --git a/sdks/java/src/test/java/com/thoughtspot/client/model/ResponseIncompleteEntityTest.java b/sdks/java/src/test/java/com/thoughtspot/client/model/ResponseIncompleteEntityTest.java new file mode 100644 index 000000000..ad0b87bd6 --- /dev/null +++ b/sdks/java/src/test/java/com/thoughtspot/client/model/ResponseIncompleteEntityTest.java @@ -0,0 +1,36 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client.model; + +import org.junit.jupiter.api.Test; + +/** Model tests for ResponseIncompleteEntity */ +public class ResponseIncompleteEntityTest { + private final ResponseIncompleteEntity model = new ResponseIncompleteEntity(); + + /** Model tests for ResponseIncompleteEntity */ + @Test + public void testResponseIncompleteEntity() { + // TODO: test ResponseIncompleteEntity + } + + /** Test the property 'id' */ + @Test + public void idTest() { + // TODO: test id + } + + /** Test the property 'name' */ + @Test + public void nameTest() { + // TODO: test name + } + + /** Test the property 'error' */ + @Test + public void errorTest() { + // TODO: test error + } +} diff --git a/sdks/java/src/test/java/com/thoughtspot/client/model/ResponseMessageTest.java b/sdks/java/src/test/java/com/thoughtspot/client/model/ResponseMessageTest.java new file mode 100644 index 000000000..9951b25c6 --- /dev/null +++ b/sdks/java/src/test/java/com/thoughtspot/client/model/ResponseMessageTest.java @@ -0,0 +1,54 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client.model; + +import org.junit.jupiter.api.Test; + +/** Model tests for ResponseMessage */ +public class ResponseMessageTest { + private final ResponseMessage model = new ResponseMessage(); + + /** Model tests for ResponseMessage */ + @Test + public void testResponseMessage() { + // TODO: test ResponseMessage + } + + /** Test the property 'sessionIdentifier' */ + @Test + public void sessionIdentifierTest() { + // TODO: test sessionIdentifier + } + + /** Test the property 'generationNumber' */ + @Test + public void generationNumberTest() { + // TODO: test generationNumber + } + + /** Test the property 'messageType' */ + @Test + public void messageTypeTest() { + // TODO: test messageType + } + + /** Test the property 'visualizationType' */ + @Test + public void visualizationTypeTest() { + // TODO: test visualizationType + } + + /** Test the property 'tokens' */ + @Test + public void tokensTest() { + // TODO: test tokens + } + + /** Test the property 'displayTokens' */ + @Test + public void displayTokensTest() { + // TODO: test displayTokens + } +} diff --git a/sdks/java/src/test/java/com/thoughtspot/client/model/ResponsePostUpgradeFailedEntitiesTest.java b/sdks/java/src/test/java/com/thoughtspot/client/model/ResponsePostUpgradeFailedEntitiesTest.java new file mode 100644 index 000000000..e1718620d --- /dev/null +++ b/sdks/java/src/test/java/com/thoughtspot/client/model/ResponsePostUpgradeFailedEntitiesTest.java @@ -0,0 +1,24 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client.model; + +import org.junit.jupiter.api.Test; + +/** Model tests for ResponsePostUpgradeFailedEntities */ +public class ResponsePostUpgradeFailedEntitiesTest { + private final ResponsePostUpgradeFailedEntities model = new ResponsePostUpgradeFailedEntities(); + + /** Model tests for ResponsePostUpgradeFailedEntities */ + @Test + public void testResponsePostUpgradeFailedEntities() { + // TODO: test ResponsePostUpgradeFailedEntities + } + + /** Test the property 'data' */ + @Test + public void dataTest() { + // TODO: test data + } +} diff --git a/sdks/java/src/test/java/com/thoughtspot/client/model/ResponsePostUpgradeFailedEntityTest.java b/sdks/java/src/test/java/com/thoughtspot/client/model/ResponsePostUpgradeFailedEntityTest.java new file mode 100644 index 000000000..9210925aa --- /dev/null +++ b/sdks/java/src/test/java/com/thoughtspot/client/model/ResponsePostUpgradeFailedEntityTest.java @@ -0,0 +1,36 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client.model; + +import org.junit.jupiter.api.Test; + +/** Model tests for ResponsePostUpgradeFailedEntity */ +public class ResponsePostUpgradeFailedEntityTest { + private final ResponsePostUpgradeFailedEntity model = new ResponsePostUpgradeFailedEntity(); + + /** Model tests for ResponsePostUpgradeFailedEntity */ + @Test + public void testResponsePostUpgradeFailedEntity() { + // TODO: test ResponsePostUpgradeFailedEntity + } + + /** Test the property 'id' */ + @Test + public void idTest() { + // TODO: test id + } + + /** Test the property 'name' */ + @Test + public void nameTest() { + // TODO: test name + } + + /** Test the property 'error' */ + @Test + public void errorTest() { + // TODO: test error + } +} diff --git a/sdks/java/src/test/java/com/thoughtspot/client/model/ResponseScheduleRunTest.java b/sdks/java/src/test/java/com/thoughtspot/client/model/ResponseScheduleRunTest.java new file mode 100644 index 000000000..524ae3cbf --- /dev/null +++ b/sdks/java/src/test/java/com/thoughtspot/client/model/ResponseScheduleRunTest.java @@ -0,0 +1,48 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client.model; + +import org.junit.jupiter.api.Test; + +/** Model tests for ResponseScheduleRun */ +public class ResponseScheduleRunTest { + private final ResponseScheduleRun model = new ResponseScheduleRun(); + + /** Model tests for ResponseScheduleRun */ + @Test + public void testResponseScheduleRun() { + // TODO: test ResponseScheduleRun + } + + /** Test the property 'id' */ + @Test + public void idTest() { + // TODO: test id + } + + /** Test the property 'startTimeInMillis' */ + @Test + public void startTimeInMillisTest() { + // TODO: test startTimeInMillis + } + + /** Test the property 'endTimeInMillis' */ + @Test + public void endTimeInMillisTest() { + // TODO: test endTimeInMillis + } + + /** Test the property 'status' */ + @Test + public void statusTest() { + // TODO: test status + } + + /** Test the property 'detail' */ + @Test + public void detailTest() { + // TODO: test detail + } +} diff --git a/sdks/java/src/test/java/com/thoughtspot/client/model/ResponseScheduleTest.java b/sdks/java/src/test/java/com/thoughtspot/client/model/ResponseScheduleTest.java new file mode 100644 index 000000000..a031390b3 --- /dev/null +++ b/sdks/java/src/test/java/com/thoughtspot/client/model/ResponseScheduleTest.java @@ -0,0 +1,108 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client.model; + +import org.junit.jupiter.api.Test; + +/** Model tests for ResponseSchedule */ +public class ResponseScheduleTest { + private final ResponseSchedule model = new ResponseSchedule(); + + /** Model tests for ResponseSchedule */ + @Test + public void testResponseSchedule() { + // TODO: test ResponseSchedule + } + + /** Test the property 'author' */ + @Test + public void authorTest() { + // TODO: test author + } + + /** Test the property 'creationTimeInMillis' */ + @Test + public void creationTimeInMillisTest() { + // TODO: test creationTimeInMillis + } + + /** Test the property 'description' */ + @Test + public void descriptionTest() { + // TODO: test description + } + + /** Test the property 'fileFormat' */ + @Test + public void fileFormatTest() { + // TODO: test fileFormat + } + + /** Test the property 'frequency' */ + @Test + public void frequencyTest() { + // TODO: test frequency + } + + /** Test the property 'id' */ + @Test + public void idTest() { + // TODO: test id + } + + /** Test the property 'liveboardOptions' */ + @Test + public void liveboardOptionsTest() { + // TODO: test liveboardOptions + } + + /** Test the property 'metadata' */ + @Test + public void metadataTest() { + // TODO: test metadata + } + + /** Test the property 'name' */ + @Test + public void nameTest() { + // TODO: test name + } + + /** Test the property 'pdfOptions' */ + @Test + public void pdfOptionsTest() { + // TODO: test pdfOptions + } + + /** Test the property 'recipientDetails' */ + @Test + public void recipientDetailsTest() { + // TODO: test recipientDetails + } + + /** Test the property 'status' */ + @Test + public void statusTest() { + // TODO: test status + } + + /** Test the property 'timeZone' */ + @Test + public void timeZoneTest() { + // TODO: test timeZone + } + + /** Test the property 'historyRuns' */ + @Test + public void historyRunsTest() { + // TODO: test historyRuns + } + + /** Test the property 'personalisedViewId' */ + @Test + public void personalisedViewIdTest() { + // TODO: test personalisedViewId + } +} diff --git a/sdks/java/src/test/java/com/thoughtspot/client/model/ResponseSuccessfulEntitiesTest.java b/sdks/java/src/test/java/com/thoughtspot/client/model/ResponseSuccessfulEntitiesTest.java new file mode 100644 index 000000000..34aa6d956 --- /dev/null +++ b/sdks/java/src/test/java/com/thoughtspot/client/model/ResponseSuccessfulEntitiesTest.java @@ -0,0 +1,24 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client.model; + +import org.junit.jupiter.api.Test; + +/** Model tests for ResponseSuccessfulEntities */ +public class ResponseSuccessfulEntitiesTest { + private final ResponseSuccessfulEntities model = new ResponseSuccessfulEntities(); + + /** Model tests for ResponseSuccessfulEntities */ + @Test + public void testResponseSuccessfulEntities() { + // TODO: test ResponseSuccessfulEntities + } + + /** Test the property 'data' */ + @Test + public void dataTest() { + // TODO: test data + } +} diff --git a/sdks/java/src/test/java/com/thoughtspot/client/model/ResponseSuccessfulEntityTest.java b/sdks/java/src/test/java/com/thoughtspot/client/model/ResponseSuccessfulEntityTest.java new file mode 100644 index 000000000..2f0dafe0a --- /dev/null +++ b/sdks/java/src/test/java/com/thoughtspot/client/model/ResponseSuccessfulEntityTest.java @@ -0,0 +1,30 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client.model; + +import org.junit.jupiter.api.Test; + +/** Model tests for ResponseSuccessfulEntity */ +public class ResponseSuccessfulEntityTest { + private final ResponseSuccessfulEntity model = new ResponseSuccessfulEntity(); + + /** Model tests for ResponseSuccessfulEntity */ + @Test + public void testResponseSuccessfulEntity() { + // TODO: test ResponseSuccessfulEntity + } + + /** Test the property 'id' */ + @Test + public void idTest() { + // TODO: test id + } + + /** Test the property 'name' */ + @Test + public void nameTest() { + // TODO: test name + } +} diff --git a/sdks/java/src/test/java/com/thoughtspot/client/model/ResponseWorksheetToModelConversionTest.java b/sdks/java/src/test/java/com/thoughtspot/client/model/ResponseWorksheetToModelConversionTest.java new file mode 100644 index 000000000..8527e05a8 --- /dev/null +++ b/sdks/java/src/test/java/com/thoughtspot/client/model/ResponseWorksheetToModelConversionTest.java @@ -0,0 +1,79 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client.model; + +import org.junit.jupiter.api.Test; + +/** Model tests for ResponseWorksheetToModelConversion */ +public class ResponseWorksheetToModelConversionTest { + private final ResponseWorksheetToModelConversion model = + new ResponseWorksheetToModelConversion(); + + /** Model tests for ResponseWorksheetToModelConversion */ + @Test + public void testResponseWorksheetToModelConversion() { + // TODO: test ResponseWorksheetToModelConversion + } + + /** Test the property 'name' */ + @Test + public void nameTest() { + // TODO: test name + } + + /** Test the property 'successCount' */ + @Test + public void successCountTest() { + // TODO: test successCount + } + + /** Test the property 'failureCount' */ + @Test + public void failureCountTest() { + // TODO: test failureCount + } + + /** Test the property 'incompleteCount' */ + @Test + public void incompleteCountTest() { + // TODO: test incompleteCount + } + + /** Test the property 'postUpgradeFailedCount' */ + @Test + public void postUpgradeFailedCountTest() { + // TODO: test postUpgradeFailedCount + } + + /** Test the property 'totalTimeInMillis' */ + @Test + public void totalTimeInMillisTest() { + // TODO: test totalTimeInMillis + } + + /** Test the property 'successfulEntities' */ + @Test + public void successfulEntitiesTest() { + // TODO: test successfulEntities + } + + /** Test the property 'failedEntities' */ + @Test + public void failedEntitiesTest() { + // TODO: test failedEntities + } + + /** Test the property 'incompleteEntities' */ + @Test + public void incompleteEntitiesTest() { + // TODO: test incompleteEntities + } + + /** Test the property 'postUpgradeFailedEntities' */ + @Test + public void postUpgradeFailedEntitiesTest() { + // TODO: test postUpgradeFailedEntities + } +} diff --git a/sdks/java/src/test/java/com/thoughtspot/client/model/RevertCommitRequestTest.java b/sdks/java/src/test/java/com/thoughtspot/client/model/RevertCommitRequestTest.java new file mode 100644 index 000000000..dfbe7a00e --- /dev/null +++ b/sdks/java/src/test/java/com/thoughtspot/client/model/RevertCommitRequestTest.java @@ -0,0 +1,36 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client.model; + +import org.junit.jupiter.api.Test; + +/** Model tests for RevertCommitRequest */ +public class RevertCommitRequestTest { + private final RevertCommitRequest model = new RevertCommitRequest(); + + /** Model tests for RevertCommitRequest */ + @Test + public void testRevertCommitRequest() { + // TODO: test RevertCommitRequest + } + + /** Test the property 'metadata' */ + @Test + public void metadataTest() { + // TODO: test metadata + } + + /** Test the property 'branchName' */ + @Test + public void branchNameTest() { + // TODO: test branchName + } + + /** Test the property 'revertPolicy' */ + @Test + public void revertPolicyTest() { + // TODO: test revertPolicy + } +} diff --git a/sdks/java/src/test/java/com/thoughtspot/client/model/RevertResponseTest.java b/sdks/java/src/test/java/com/thoughtspot/client/model/RevertResponseTest.java new file mode 100644 index 000000000..adec1a8ea --- /dev/null +++ b/sdks/java/src/test/java/com/thoughtspot/client/model/RevertResponseTest.java @@ -0,0 +1,66 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client.model; + +import org.junit.jupiter.api.Test; + +/** Model tests for RevertResponse */ +public class RevertResponseTest { + private final RevertResponse model = new RevertResponse(); + + /** Model tests for RevertResponse */ + @Test + public void testRevertResponse() { + // TODO: test RevertResponse + } + + /** Test the property 'committer' */ + @Test + public void committerTest() { + // TODO: test committer + } + + /** Test the property 'author' */ + @Test + public void authorTest() { + // TODO: test author + } + + /** Test the property 'comment' */ + @Test + public void commentTest() { + // TODO: test comment + } + + /** Test the property 'commitTime' */ + @Test + public void commitTimeTest() { + // TODO: test commitTime + } + + /** Test the property 'commitId' */ + @Test + public void commitIdTest() { + // TODO: test commitId + } + + /** Test the property 'branch' */ + @Test + public void branchTest() { + // TODO: test branch + } + + /** Test the property 'committedFiles' */ + @Test + public void committedFilesTest() { + // TODO: test committedFiles + } + + /** Test the property 'revertedMetadata' */ + @Test + public void revertedMetadataTest() { + // TODO: test revertedMetadata + } +} diff --git a/sdks/java/src/test/java/com/thoughtspot/client/model/RevertedMetadataTest.java b/sdks/java/src/test/java/com/thoughtspot/client/model/RevertedMetadataTest.java new file mode 100644 index 000000000..4257bdb79 --- /dev/null +++ b/sdks/java/src/test/java/com/thoughtspot/client/model/RevertedMetadataTest.java @@ -0,0 +1,48 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client.model; + +import org.junit.jupiter.api.Test; + +/** Model tests for RevertedMetadata */ +public class RevertedMetadataTest { + private final RevertedMetadata model = new RevertedMetadata(); + + /** Model tests for RevertedMetadata */ + @Test + public void testRevertedMetadata() { + // TODO: test RevertedMetadata + } + + /** Test the property 'fileName' */ + @Test + public void fileNameTest() { + // TODO: test fileName + } + + /** Test the property 'metadataName' */ + @Test + public void metadataNameTest() { + // TODO: test metadataName + } + + /** Test the property 'metadataType' */ + @Test + public void metadataTypeTest() { + // TODO: test metadataType + } + + /** Test the property 'statusCode' */ + @Test + public void statusCodeTest() { + // TODO: test statusCode + } + + /** Test the property 'statusMessage' */ + @Test + public void statusMessageTest() { + // TODO: test statusMessage + } +} diff --git a/sdks/java/src/test/java/com/thoughtspot/client/model/RevokeRefreshTokensRequestTest.java b/sdks/java/src/test/java/com/thoughtspot/client/model/RevokeRefreshTokensRequestTest.java new file mode 100644 index 000000000..b7bcf3799 --- /dev/null +++ b/sdks/java/src/test/java/com/thoughtspot/client/model/RevokeRefreshTokensRequestTest.java @@ -0,0 +1,36 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client.model; + +import org.junit.jupiter.api.Test; + +/** Model tests for RevokeRefreshTokensRequest */ +public class RevokeRefreshTokensRequestTest { + private final RevokeRefreshTokensRequest model = new RevokeRefreshTokensRequest(); + + /** Model tests for RevokeRefreshTokensRequest */ + @Test + public void testRevokeRefreshTokensRequest() { + // TODO: test RevokeRefreshTokensRequest + } + + /** Test the property 'configurationIdentifiers' */ + @Test + public void configurationIdentifiersTest() { + // TODO: test configurationIdentifiers + } + + /** Test the property 'userIdentifiers' */ + @Test + public void userIdentifiersTest() { + // TODO: test userIdentifiers + } + + /** Test the property 'orgIdentifiers' */ + @Test + public void orgIdentifiersTest() { + // TODO: test orgIdentifiers + } +} diff --git a/sdks/java/src/test/java/com/thoughtspot/client/model/RevokeRefreshTokensResponseTest.java b/sdks/java/src/test/java/com/thoughtspot/client/model/RevokeRefreshTokensResponseTest.java new file mode 100644 index 000000000..8c7c872bc --- /dev/null +++ b/sdks/java/src/test/java/com/thoughtspot/client/model/RevokeRefreshTokensResponseTest.java @@ -0,0 +1,24 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client.model; + +import org.junit.jupiter.api.Test; + +/** Model tests for RevokeRefreshTokensResponse */ +public class RevokeRefreshTokensResponseTest { + private final RevokeRefreshTokensResponse model = new RevokeRefreshTokensResponse(); + + /** Model tests for RevokeRefreshTokensResponse */ + @Test + public void testRevokeRefreshTokensResponse() { + // TODO: test RevokeRefreshTokensResponse + } + + /** Test the property 'data' */ + @Test + public void dataTest() { + // TODO: test data + } +} diff --git a/sdks/java/src/test/java/com/thoughtspot/client/model/RevokeTokenRequestTest.java b/sdks/java/src/test/java/com/thoughtspot/client/model/RevokeTokenRequestTest.java new file mode 100644 index 000000000..4531a2ccb --- /dev/null +++ b/sdks/java/src/test/java/com/thoughtspot/client/model/RevokeTokenRequestTest.java @@ -0,0 +1,30 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client.model; + +import org.junit.jupiter.api.Test; + +/** Model tests for RevokeTokenRequest */ +public class RevokeTokenRequestTest { + private final RevokeTokenRequest model = new RevokeTokenRequest(); + + /** Model tests for RevokeTokenRequest */ + @Test + public void testRevokeTokenRequest() { + // TODO: test RevokeTokenRequest + } + + /** Test the property 'userIdentifier' */ + @Test + public void userIdentifierTest() { + // TODO: test userIdentifier + } + + /** Test the property 'token' */ + @Test + public void tokenTest() { + // TODO: test token + } +} diff --git a/sdks/java/src/test/java/com/thoughtspot/client/model/RiseGQLArgWrapperTest.java b/sdks/java/src/test/java/com/thoughtspot/client/model/RiseGQLArgWrapperTest.java new file mode 100644 index 000000000..9d2a3038b --- /dev/null +++ b/sdks/java/src/test/java/com/thoughtspot/client/model/RiseGQLArgWrapperTest.java @@ -0,0 +1,30 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client.model; + +import org.junit.jupiter.api.Test; + +/** Model tests for RiseGQLArgWrapper */ +public class RiseGQLArgWrapperTest { + private final RiseGQLArgWrapper model = new RiseGQLArgWrapper(); + + /** Model tests for RiseGQLArgWrapper */ + @Test + public void testRiseGQLArgWrapper() { + // TODO: test RiseGQLArgWrapper + } + + /** Test the property 'name' */ + @Test + public void nameTest() { + // TODO: test name + } + + /** Test the property 'type' */ + @Test + public void typeTest() { + // TODO: test type + } +} diff --git a/sdks/java/src/test/java/com/thoughtspot/client/model/RiseSetterTest.java b/sdks/java/src/test/java/com/thoughtspot/client/model/RiseSetterTest.java new file mode 100644 index 000000000..463f5a721 --- /dev/null +++ b/sdks/java/src/test/java/com/thoughtspot/client/model/RiseSetterTest.java @@ -0,0 +1,30 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client.model; + +import org.junit.jupiter.api.Test; + +/** Model tests for RiseSetter */ +public class RiseSetterTest { + private final RiseSetter model = new RiseSetter(); + + /** Model tests for RiseSetter */ + @Test + public void testRiseSetter() { + // TODO: test RiseSetter + } + + /** Test the property 'field' */ + @Test + public void fieldTest() { + // TODO: test field + } + + /** Test the property 'path' */ + @Test + public void pathTest() { + // TODO: test path + } +} diff --git a/sdks/java/src/test/java/com/thoughtspot/client/model/RoleResponseTest.java b/sdks/java/src/test/java/com/thoughtspot/client/model/RoleResponseTest.java new file mode 100644 index 000000000..d2c3e1401 --- /dev/null +++ b/sdks/java/src/test/java/com/thoughtspot/client/model/RoleResponseTest.java @@ -0,0 +1,120 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client.model; + +import org.junit.jupiter.api.Test; + +/** Model tests for RoleResponse */ +public class RoleResponseTest { + private final RoleResponse model = new RoleResponse(); + + /** Model tests for RoleResponse */ + @Test + public void testRoleResponse() { + // TODO: test RoleResponse + } + + /** Test the property 'id' */ + @Test + public void idTest() { + // TODO: test id + } + + /** Test the property 'name' */ + @Test + public void nameTest() { + // TODO: test name + } + + /** Test the property 'description' */ + @Test + public void descriptionTest() { + // TODO: test description + } + + /** Test the property 'groupsAssignedCount' */ + @Test + public void groupsAssignedCountTest() { + // TODO: test groupsAssignedCount + } + + /** Test the property 'orgs' */ + @Test + public void orgsTest() { + // TODO: test orgs + } + + /** Test the property 'groups' */ + @Test + public void groupsTest() { + // TODO: test groups + } + + /** Test the property 'privileges' */ + @Test + public void privilegesTest() { + // TODO: test privileges + } + + /** Test the property 'permission' */ + @Test + public void permissionTest() { + // TODO: test permission + } + + /** Test the property 'authorId' */ + @Test + public void authorIdTest() { + // TODO: test authorId + } + + /** Test the property 'modifierId' */ + @Test + public void modifierIdTest() { + // TODO: test modifierId + } + + /** Test the property 'creationTimeInMillis' */ + @Test + public void creationTimeInMillisTest() { + // TODO: test creationTimeInMillis + } + + /** Test the property 'modificationTimeInMillis' */ + @Test + public void modificationTimeInMillisTest() { + // TODO: test modificationTimeInMillis + } + + /** Test the property 'deleted' */ + @Test + public void deletedTest() { + // TODO: test deleted + } + + /** Test the property 'deprecated' */ + @Test + public void deprecatedTest() { + // TODO: test deprecated + } + + /** Test the property 'external' */ + @Test + public void externalTest() { + // TODO: test external + } + + /** Test the property 'hidden' */ + @Test + public void hiddenTest() { + // TODO: test hidden + } + + /** Test the property 'sharedViaConnection' */ + @Test + public void sharedViaConnectionTest() { + // TODO: test sharedViaConnection + } +} diff --git a/sdks/java/src/test/java/com/thoughtspot/client/model/RoleTest.java b/sdks/java/src/test/java/com/thoughtspot/client/model/RoleTest.java new file mode 100644 index 000000000..dbd6adb6b --- /dev/null +++ b/sdks/java/src/test/java/com/thoughtspot/client/model/RoleTest.java @@ -0,0 +1,30 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client.model; + +import org.junit.jupiter.api.Test; + +/** Model tests for Role */ +public class RoleTest { + private final Role model = new Role(); + + /** Model tests for Role */ + @Test + public void testRole() { + // TODO: test Role + } + + /** Test the property 'id' */ + @Test + public void idTest() { + // TODO: test id + } + + /** Test the property 'name' */ + @Test + public void nameTest() { + // TODO: test name + } +} diff --git a/sdks/java/src/test/java/com/thoughtspot/client/model/RuntimeFilterTest.java b/sdks/java/src/test/java/com/thoughtspot/client/model/RuntimeFilterTest.java new file mode 100644 index 000000000..9451953f9 --- /dev/null +++ b/sdks/java/src/test/java/com/thoughtspot/client/model/RuntimeFilterTest.java @@ -0,0 +1,24 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client.model; + +import org.junit.jupiter.api.Test; + +/** Model tests for RuntimeFilter */ +public class RuntimeFilterTest { + private final RuntimeFilter model = new RuntimeFilter(); + + /** Model tests for RuntimeFilter */ + @Test + public void testRuntimeFilter() { + // TODO: test RuntimeFilter + } + + /** Test the property 'runtimeFilter' */ + @Test + public void runtimeFilterTest() { + // TODO: test runtimeFilter + } +} diff --git a/sdks/java/src/test/java/com/thoughtspot/client/model/RuntimeFiltersTest.java b/sdks/java/src/test/java/com/thoughtspot/client/model/RuntimeFiltersTest.java new file mode 100644 index 000000000..4603c31d0 --- /dev/null +++ b/sdks/java/src/test/java/com/thoughtspot/client/model/RuntimeFiltersTest.java @@ -0,0 +1,48 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client.model; + +import org.junit.jupiter.api.Test; + +/** Model tests for RuntimeFilters */ +public class RuntimeFiltersTest { + private final RuntimeFilters model = new RuntimeFilters(); + + /** Model tests for RuntimeFilters */ + @Test + public void testRuntimeFilters() { + // TODO: test RuntimeFilters + } + + /** Test the property 'columnName' */ + @Test + public void columnNameTest() { + // TODO: test columnName + } + + /** Test the property 'values' */ + @Test + public void valuesTest() { + // TODO: test values + } + + /** Test the property 'operator' */ + @Test + public void operatorTest() { + // TODO: test operator + } + + /** Test the property 'persist' */ + @Test + public void persistTest() { + // TODO: test persist + } + + /** Test the property 'objects' */ + @Test + public void objectsTest() { + // TODO: test objects + } +} diff --git a/sdks/java/src/test/java/com/thoughtspot/client/model/RuntimeParamOverrideTest.java b/sdks/java/src/test/java/com/thoughtspot/client/model/RuntimeParamOverrideTest.java new file mode 100644 index 000000000..289b3e9fb --- /dev/null +++ b/sdks/java/src/test/java/com/thoughtspot/client/model/RuntimeParamOverrideTest.java @@ -0,0 +1,24 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client.model; + +import org.junit.jupiter.api.Test; + +/** Model tests for RuntimeParamOverride */ +public class RuntimeParamOverrideTest { + private final RuntimeParamOverride model = new RuntimeParamOverride(); + + /** Model tests for RuntimeParamOverride */ + @Test + public void testRuntimeParamOverride() { + // TODO: test RuntimeParamOverride + } + + /** Test the property 'runtimeParamOverride' */ + @Test + public void runtimeParamOverrideTest() { + // TODO: test runtimeParamOverride + } +} diff --git a/sdks/java/src/test/java/com/thoughtspot/client/model/RuntimeParametersTest.java b/sdks/java/src/test/java/com/thoughtspot/client/model/RuntimeParametersTest.java new file mode 100644 index 000000000..a6ede07de --- /dev/null +++ b/sdks/java/src/test/java/com/thoughtspot/client/model/RuntimeParametersTest.java @@ -0,0 +1,42 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client.model; + +import org.junit.jupiter.api.Test; + +/** Model tests for RuntimeParameters */ +public class RuntimeParametersTest { + private final RuntimeParameters model = new RuntimeParameters(); + + /** Model tests for RuntimeParameters */ + @Test + public void testRuntimeParameters() { + // TODO: test RuntimeParameters + } + + /** Test the property 'name' */ + @Test + public void nameTest() { + // TODO: test name + } + + /** Test the property 'values' */ + @Test + public void valuesTest() { + // TODO: test values + } + + /** Test the property 'persist' */ + @Test + public void persistTest() { + // TODO: test persist + } + + /** Test the property 'objects' */ + @Test + public void objectsTest() { + // TODO: test objects + } +} diff --git a/sdks/java/src/test/java/com/thoughtspot/client/model/RuntimeSortTest.java b/sdks/java/src/test/java/com/thoughtspot/client/model/RuntimeSortTest.java new file mode 100644 index 000000000..3333ee5f2 --- /dev/null +++ b/sdks/java/src/test/java/com/thoughtspot/client/model/RuntimeSortTest.java @@ -0,0 +1,24 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client.model; + +import org.junit.jupiter.api.Test; + +/** Model tests for RuntimeSort */ +public class RuntimeSortTest { + private final RuntimeSort model = new RuntimeSort(); + + /** Model tests for RuntimeSort */ + @Test + public void testRuntimeSort() { + // TODO: test RuntimeSort + } + + /** Test the property 'runtimeSort' */ + @Test + public void runtimeSortTest() { + // TODO: test runtimeSort + } +} diff --git a/sdks/java/src/test/java/com/thoughtspot/client/model/RuntimeSortsTest.java b/sdks/java/src/test/java/com/thoughtspot/client/model/RuntimeSortsTest.java new file mode 100644 index 000000000..3fc20ecad --- /dev/null +++ b/sdks/java/src/test/java/com/thoughtspot/client/model/RuntimeSortsTest.java @@ -0,0 +1,42 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client.model; + +import org.junit.jupiter.api.Test; + +/** Model tests for RuntimeSorts */ +public class RuntimeSortsTest { + private final RuntimeSorts model = new RuntimeSorts(); + + /** Model tests for RuntimeSorts */ + @Test + public void testRuntimeSorts() { + // TODO: test RuntimeSorts + } + + /** Test the property 'columnName' */ + @Test + public void columnNameTest() { + // TODO: test columnName + } + + /** Test the property 'order' */ + @Test + public void orderTest() { + // TODO: test order + } + + /** Test the property 'persist' */ + @Test + public void persistTest() { + // TODO: test persist + } + + /** Test the property 'objects' */ + @Test + public void objectsTest() { + // TODO: test objects + } +} diff --git a/sdks/java/src/test/java/com/thoughtspot/client/model/ScheduleHistoryRunsOptionsInputTest.java b/sdks/java/src/test/java/com/thoughtspot/client/model/ScheduleHistoryRunsOptionsInputTest.java new file mode 100644 index 000000000..5943493ee --- /dev/null +++ b/sdks/java/src/test/java/com/thoughtspot/client/model/ScheduleHistoryRunsOptionsInputTest.java @@ -0,0 +1,36 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client.model; + +import org.junit.jupiter.api.Test; + +/** Model tests for ScheduleHistoryRunsOptionsInput */ +public class ScheduleHistoryRunsOptionsInputTest { + private final ScheduleHistoryRunsOptionsInput model = new ScheduleHistoryRunsOptionsInput(); + + /** Model tests for ScheduleHistoryRunsOptionsInput */ + @Test + public void testScheduleHistoryRunsOptionsInput() { + // TODO: test ScheduleHistoryRunsOptionsInput + } + + /** Test the property 'includeHistoryRuns' */ + @Test + public void includeHistoryRunsTest() { + // TODO: test includeHistoryRuns + } + + /** Test the property 'recordSize' */ + @Test + public void recordSizeTest() { + // TODO: test recordSize + } + + /** Test the property 'recordOffset' */ + @Test + public void recordOffsetTest() { + // TODO: test recordOffset + } +} diff --git a/sdks/java/src/test/java/com/thoughtspot/client/model/SchedulesPdfOptionsInputTest.java b/sdks/java/src/test/java/com/thoughtspot/client/model/SchedulesPdfOptionsInputTest.java new file mode 100644 index 000000000..ad7e3a1db --- /dev/null +++ b/sdks/java/src/test/java/com/thoughtspot/client/model/SchedulesPdfOptionsInputTest.java @@ -0,0 +1,72 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client.model; + +import org.junit.jupiter.api.Test; + +/** Model tests for SchedulesPdfOptionsInput */ +public class SchedulesPdfOptionsInputTest { + private final SchedulesPdfOptionsInput model = new SchedulesPdfOptionsInput(); + + /** Model tests for SchedulesPdfOptionsInput */ + @Test + public void testSchedulesPdfOptionsInput() { + // TODO: test SchedulesPdfOptionsInput + } + + /** Test the property 'completeLiveboard' */ + @Test + public void completeLiveboardTest() { + // TODO: test completeLiveboard + } + + /** Test the property 'includeCoverPage' */ + @Test + public void includeCoverPageTest() { + // TODO: test includeCoverPage + } + + /** Test the property 'includeCustomLogo' */ + @Test + public void includeCustomLogoTest() { + // TODO: test includeCustomLogo + } + + /** Test the property 'includeFilterPage' */ + @Test + public void includeFilterPageTest() { + // TODO: test includeFilterPage + } + + /** Test the property 'includePageNumber' */ + @Test + public void includePageNumberTest() { + // TODO: test includePageNumber + } + + /** Test the property 'pageFooterText' */ + @Test + public void pageFooterTextTest() { + // TODO: test pageFooterText + } + + /** Test the property 'pageOrientation' */ + @Test + public void pageOrientationTest() { + // TODO: test pageOrientation + } + + /** Test the property 'pageSize' */ + @Test + public void pageSizeTest() { + // TODO: test pageSize + } + + /** Test the property 'truncateTable' */ + @Test + public void truncateTableTest() { + // TODO: test truncateTable + } +} diff --git a/sdks/java/src/test/java/com/thoughtspot/client/model/SchemaObjectTest.java b/sdks/java/src/test/java/com/thoughtspot/client/model/SchemaObjectTest.java new file mode 100644 index 000000000..37f16a996 --- /dev/null +++ b/sdks/java/src/test/java/com/thoughtspot/client/model/SchemaObjectTest.java @@ -0,0 +1,30 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client.model; + +import org.junit.jupiter.api.Test; + +/** Model tests for SchemaObject */ +public class SchemaObjectTest { + private final SchemaObject model = new SchemaObject(); + + /** Model tests for SchemaObject */ + @Test + public void testSchemaObject() { + // TODO: test SchemaObject + } + + /** Test the property 'name' */ + @Test + public void nameTest() { + // TODO: test name + } + + /** Test the property 'tables' */ + @Test + public void tablesTest() { + // TODO: test tables + } +} diff --git a/sdks/java/src/test/java/com/thoughtspot/client/model/ScopeTest.java b/sdks/java/src/test/java/com/thoughtspot/client/model/ScopeTest.java new file mode 100644 index 000000000..4dd07ec04 --- /dev/null +++ b/sdks/java/src/test/java/com/thoughtspot/client/model/ScopeTest.java @@ -0,0 +1,36 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client.model; + +import org.junit.jupiter.api.Test; + +/** Model tests for Scope */ +public class ScopeTest { + private final Scope model = new Scope(); + + /** Model tests for Scope */ + @Test + public void testScope() { + // TODO: test Scope + } + + /** Test the property 'accessType' */ + @Test + public void accessTypeTest() { + // TODO: test accessType + } + + /** Test the property 'orgId' */ + @Test + public void orgIdTest() { + // TODO: test orgId + } + + /** Test the property 'metadataId' */ + @Test + public void metadataIdTest() { + // TODO: test metadataId + } +} diff --git a/sdks/java/src/test/java/com/thoughtspot/client/model/ScriptSrcUrlsInputTest.java b/sdks/java/src/test/java/com/thoughtspot/client/model/ScriptSrcUrlsInputTest.java new file mode 100644 index 000000000..167f3b1d0 --- /dev/null +++ b/sdks/java/src/test/java/com/thoughtspot/client/model/ScriptSrcUrlsInputTest.java @@ -0,0 +1,30 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client.model; + +import org.junit.jupiter.api.Test; + +/** Model tests for ScriptSrcUrlsInput */ +public class ScriptSrcUrlsInputTest { + private final ScriptSrcUrlsInput model = new ScriptSrcUrlsInput(); + + /** Model tests for ScriptSrcUrlsInput */ + @Test + public void testScriptSrcUrlsInput() { + // TODO: test ScriptSrcUrlsInput + } + + /** Test the property 'enabled' */ + @Test + public void enabledTest() { + // TODO: test enabled + } + + /** Test the property 'urls' */ + @Test + public void urlsTest() { + // TODO: test urls + } +} diff --git a/sdks/java/src/test/java/com/thoughtspot/client/model/ScriptSrcUrlsTest.java b/sdks/java/src/test/java/com/thoughtspot/client/model/ScriptSrcUrlsTest.java new file mode 100644 index 000000000..71480a53b --- /dev/null +++ b/sdks/java/src/test/java/com/thoughtspot/client/model/ScriptSrcUrlsTest.java @@ -0,0 +1,30 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client.model; + +import org.junit.jupiter.api.Test; + +/** Model tests for ScriptSrcUrls */ +public class ScriptSrcUrlsTest { + private final ScriptSrcUrls model = new ScriptSrcUrls(); + + /** Model tests for ScriptSrcUrls */ + @Test + public void testScriptSrcUrls() { + // TODO: test ScriptSrcUrls + } + + /** Test the property 'enabled' */ + @Test + public void enabledTest() { + // TODO: test enabled + } + + /** Test the property 'urls' */ + @Test + public void urlsTest() { + // TODO: test urls + } +} diff --git a/sdks/java/src/test/java/com/thoughtspot/client/model/SearchAuthSettingsRequestTest.java b/sdks/java/src/test/java/com/thoughtspot/client/model/SearchAuthSettingsRequestTest.java new file mode 100644 index 000000000..58511630b --- /dev/null +++ b/sdks/java/src/test/java/com/thoughtspot/client/model/SearchAuthSettingsRequestTest.java @@ -0,0 +1,30 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client.model; + +import org.junit.jupiter.api.Test; + +/** Model tests for SearchAuthSettingsRequest */ +public class SearchAuthSettingsRequestTest { + private final SearchAuthSettingsRequest model = new SearchAuthSettingsRequest(); + + /** Model tests for SearchAuthSettingsRequest */ + @Test + public void testSearchAuthSettingsRequest() { + // TODO: test SearchAuthSettingsRequest + } + + /** Test the property 'authType' */ + @Test + public void authTypeTest() { + // TODO: test authType + } + + /** Test the property 'scope' */ + @Test + public void scopeTest() { + // TODO: test scope + } +} diff --git a/sdks/java/src/test/java/com/thoughtspot/client/model/SearchAuthSettingsResponseTest.java b/sdks/java/src/test/java/com/thoughtspot/client/model/SearchAuthSettingsResponseTest.java new file mode 100644 index 000000000..23cc57d4b --- /dev/null +++ b/sdks/java/src/test/java/com/thoughtspot/client/model/SearchAuthSettingsResponseTest.java @@ -0,0 +1,36 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client.model; + +import org.junit.jupiter.api.Test; + +/** Model tests for SearchAuthSettingsResponse */ +public class SearchAuthSettingsResponseTest { + private final SearchAuthSettingsResponse model = new SearchAuthSettingsResponse(); + + /** Model tests for SearchAuthSettingsResponse */ + @Test + public void testSearchAuthSettingsResponse() { + // TODO: test SearchAuthSettingsResponse + } + + /** Test the property 'authType' */ + @Test + public void authTypeTest() { + // TODO: test authType + } + + /** Test the property 'clusterPreferences' */ + @Test + public void clusterPreferencesTest() { + // TODO: test clusterPreferences + } + + /** Test the property 'orgPreferences' */ + @Test + public void orgPreferencesTest() { + // TODO: test orgPreferences + } +} diff --git a/sdks/java/src/test/java/com/thoughtspot/client/model/SearchCalendarsRequestTest.java b/sdks/java/src/test/java/com/thoughtspot/client/model/SearchCalendarsRequestTest.java new file mode 100644 index 000000000..3fdebb922 --- /dev/null +++ b/sdks/java/src/test/java/com/thoughtspot/client/model/SearchCalendarsRequestTest.java @@ -0,0 +1,48 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client.model; + +import org.junit.jupiter.api.Test; + +/** Model tests for SearchCalendarsRequest */ +public class SearchCalendarsRequestTest { + private final SearchCalendarsRequest model = new SearchCalendarsRequest(); + + /** Model tests for SearchCalendarsRequest */ + @Test + public void testSearchCalendarsRequest() { + // TODO: test SearchCalendarsRequest + } + + /** Test the property 'connectionIdentifier' */ + @Test + public void connectionIdentifierTest() { + // TODO: test connectionIdentifier + } + + /** Test the property 'namePattern' */ + @Test + public void namePatternTest() { + // TODO: test namePattern + } + + /** Test the property 'recordOffset' */ + @Test + public void recordOffsetTest() { + // TODO: test recordOffset + } + + /** Test the property 'recordSize' */ + @Test + public void recordSizeTest() { + // TODO: test recordSize + } + + /** Test the property 'sortOptions' */ + @Test + public void sortOptionsTest() { + // TODO: test sortOptions + } +} diff --git a/sdks/java/src/test/java/com/thoughtspot/client/model/SearchChannelHistoryRequestTest.java b/sdks/java/src/test/java/com/thoughtspot/client/model/SearchChannelHistoryRequestTest.java new file mode 100644 index 000000000..e53c9fe61 --- /dev/null +++ b/sdks/java/src/test/java/com/thoughtspot/client/model/SearchChannelHistoryRequestTest.java @@ -0,0 +1,54 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client.model; + +import org.junit.jupiter.api.Test; + +/** Model tests for SearchChannelHistoryRequest */ +public class SearchChannelHistoryRequestTest { + private final SearchChannelHistoryRequest model = new SearchChannelHistoryRequest(); + + /** Model tests for SearchChannelHistoryRequest */ + @Test + public void testSearchChannelHistoryRequest() { + // TODO: test SearchChannelHistoryRequest + } + + /** Test the property 'channelType' */ + @Test + public void channelTypeTest() { + // TODO: test channelType + } + + /** Test the property 'jobIds' */ + @Test + public void jobIdsTest() { + // TODO: test jobIds + } + + /** Test the property 'channelIdentifiers' */ + @Test + public void channelIdentifiersTest() { + // TODO: test channelIdentifiers + } + + /** Test the property 'channelStatus' */ + @Test + public void channelStatusTest() { + // TODO: test channelStatus + } + + /** Test the property 'events' */ + @Test + public void eventsTest() { + // TODO: test events + } + + /** Test the property 'startEpochTimeInMillis' */ + @Test + public void startEpochTimeInMillisTest() { + // TODO: test startEpochTimeInMillis + } +} diff --git a/sdks/java/src/test/java/com/thoughtspot/client/model/SearchChannelHistoryResponseTest.java b/sdks/java/src/test/java/com/thoughtspot/client/model/SearchChannelHistoryResponseTest.java new file mode 100644 index 000000000..37e05541e --- /dev/null +++ b/sdks/java/src/test/java/com/thoughtspot/client/model/SearchChannelHistoryResponseTest.java @@ -0,0 +1,24 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client.model; + +import org.junit.jupiter.api.Test; + +/** Model tests for SearchChannelHistoryResponse */ +public class SearchChannelHistoryResponseTest { + private final SearchChannelHistoryResponse model = new SearchChannelHistoryResponse(); + + /** Model tests for SearchChannelHistoryResponse */ + @Test + public void testSearchChannelHistoryResponse() { + // TODO: test SearchChannelHistoryResponse + } + + /** Test the property 'jobs' */ + @Test + public void jobsTest() { + // TODO: test jobs + } +} diff --git a/sdks/java/src/test/java/com/thoughtspot/client/model/SearchCollectionsRequestTest.java b/sdks/java/src/test/java/com/thoughtspot/client/model/SearchCollectionsRequestTest.java new file mode 100644 index 000000000..7fd8caada --- /dev/null +++ b/sdks/java/src/test/java/com/thoughtspot/client/model/SearchCollectionsRequestTest.java @@ -0,0 +1,60 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client.model; + +import org.junit.jupiter.api.Test; + +/** Model tests for SearchCollectionsRequest */ +public class SearchCollectionsRequestTest { + private final SearchCollectionsRequest model = new SearchCollectionsRequest(); + + /** Model tests for SearchCollectionsRequest */ + @Test + public void testSearchCollectionsRequest() { + // TODO: test SearchCollectionsRequest + } + + /** Test the property 'namePattern' */ + @Test + public void namePatternTest() { + // TODO: test namePattern + } + + /** Test the property 'recordOffset' */ + @Test + public void recordOffsetTest() { + // TODO: test recordOffset + } + + /** Test the property 'recordSize' */ + @Test + public void recordSizeTest() { + // TODO: test recordSize + } + + /** Test the property 'collectionIdentifiers' */ + @Test + public void collectionIdentifiersTest() { + // TODO: test collectionIdentifiers + } + + /** Test the property 'createdByUserIdentifiers' */ + @Test + public void createdByUserIdentifiersTest() { + // TODO: test createdByUserIdentifiers + } + + /** Test the property 'includeMetadata' */ + @Test + public void includeMetadataTest() { + // TODO: test includeMetadata + } + + /** Test the property 'sortOptions' */ + @Test + public void sortOptionsTest() { + // TODO: test sortOptions + } +} diff --git a/sdks/java/src/test/java/com/thoughtspot/client/model/SearchCommitsRequestTest.java b/sdks/java/src/test/java/com/thoughtspot/client/model/SearchCommitsRequestTest.java new file mode 100644 index 000000000..0d6f150c2 --- /dev/null +++ b/sdks/java/src/test/java/com/thoughtspot/client/model/SearchCommitsRequestTest.java @@ -0,0 +1,48 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client.model; + +import org.junit.jupiter.api.Test; + +/** Model tests for SearchCommitsRequest */ +public class SearchCommitsRequestTest { + private final SearchCommitsRequest model = new SearchCommitsRequest(); + + /** Model tests for SearchCommitsRequest */ + @Test + public void testSearchCommitsRequest() { + // TODO: test SearchCommitsRequest + } + + /** Test the property 'metadataIdentifier' */ + @Test + public void metadataIdentifierTest() { + // TODO: test metadataIdentifier + } + + /** Test the property 'metadataType' */ + @Test + public void metadataTypeTest() { + // TODO: test metadataType + } + + /** Test the property 'branchName' */ + @Test + public void branchNameTest() { + // TODO: test branchName + } + + /** Test the property 'recordOffset' */ + @Test + public void recordOffsetTest() { + // TODO: test recordOffset + } + + /** Test the property 'recordSize' */ + @Test + public void recordSizeTest() { + // TODO: test recordSize + } +} diff --git a/sdks/java/src/test/java/com/thoughtspot/client/model/SearchCommunicationChannelPreferencesRequestTest.java b/sdks/java/src/test/java/com/thoughtspot/client/model/SearchCommunicationChannelPreferencesRequestTest.java new file mode 100644 index 000000000..80393b66a --- /dev/null +++ b/sdks/java/src/test/java/com/thoughtspot/client/model/SearchCommunicationChannelPreferencesRequestTest.java @@ -0,0 +1,31 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client.model; + +import org.junit.jupiter.api.Test; + +/** Model tests for SearchCommunicationChannelPreferencesRequest */ +public class SearchCommunicationChannelPreferencesRequestTest { + private final SearchCommunicationChannelPreferencesRequest model = + new SearchCommunicationChannelPreferencesRequest(); + + /** Model tests for SearchCommunicationChannelPreferencesRequest */ + @Test + public void testSearchCommunicationChannelPreferencesRequest() { + // TODO: test SearchCommunicationChannelPreferencesRequest + } + + /** Test the property 'clusterPreferences' */ + @Test + public void clusterPreferencesTest() { + // TODO: test clusterPreferences + } + + /** Test the property 'orgPreferences' */ + @Test + public void orgPreferencesTest() { + // TODO: test orgPreferences + } +} diff --git a/sdks/java/src/test/java/com/thoughtspot/client/model/SearchConfigRequestTest.java b/sdks/java/src/test/java/com/thoughtspot/client/model/SearchConfigRequestTest.java new file mode 100644 index 000000000..0d1f4524c --- /dev/null +++ b/sdks/java/src/test/java/com/thoughtspot/client/model/SearchConfigRequestTest.java @@ -0,0 +1,24 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client.model; + +import org.junit.jupiter.api.Test; + +/** Model tests for SearchConfigRequest */ +public class SearchConfigRequestTest { + private final SearchConfigRequest model = new SearchConfigRequest(); + + /** Model tests for SearchConfigRequest */ + @Test + public void testSearchConfigRequest() { + // TODO: test SearchConfigRequest + } + + /** Test the property 'orgIdentifiers' */ + @Test + public void orgIdentifiersTest() { + // TODO: test orgIdentifiers + } +} diff --git a/sdks/java/src/test/java/com/thoughtspot/client/model/SearchConnectionRequestTest.java b/sdks/java/src/test/java/com/thoughtspot/client/model/SearchConnectionRequestTest.java new file mode 100644 index 000000000..fce605050 --- /dev/null +++ b/sdks/java/src/test/java/com/thoughtspot/client/model/SearchConnectionRequestTest.java @@ -0,0 +1,84 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client.model; + +import org.junit.jupiter.api.Test; + +/** Model tests for SearchConnectionRequest */ +public class SearchConnectionRequestTest { + private final SearchConnectionRequest model = new SearchConnectionRequest(); + + /** Model tests for SearchConnectionRequest */ + @Test + public void testSearchConnectionRequest() { + // TODO: test SearchConnectionRequest + } + + /** Test the property 'connections' */ + @Test + public void connectionsTest() { + // TODO: test connections + } + + /** Test the property 'dataWarehouseTypes' */ + @Test + public void dataWarehouseTypesTest() { + // TODO: test dataWarehouseTypes + } + + /** Test the property 'recordOffset' */ + @Test + public void recordOffsetTest() { + // TODO: test recordOffset + } + + /** Test the property 'recordSize' */ + @Test + public void recordSizeTest() { + // TODO: test recordSize + } + + /** Test the property 'tagIdentifiers' */ + @Test + public void tagIdentifiersTest() { + // TODO: test tagIdentifiers + } + + /** Test the property 'dataWarehouseObjectType' */ + @Test + public void dataWarehouseObjectTypeTest() { + // TODO: test dataWarehouseObjectType + } + + /** Test the property 'sortOptions' */ + @Test + public void sortOptionsTest() { + // TODO: test sortOptions + } + + /** Test the property 'includeDetails' */ + @Test + public void includeDetailsTest() { + // TODO: test includeDetails + } + + /** Test the property '_configuration' */ + @Test + public void _configurationTest() { + // TODO: test _configuration + } + + /** Test the property 'authenticationType' */ + @Test + public void authenticationTypeTest() { + // TODO: test authenticationType + } + + /** Test the property 'showResolvedParameters' */ + @Test + public void showResolvedParametersTest() { + // TODO: test showResolvedParameters + } +} diff --git a/sdks/java/src/test/java/com/thoughtspot/client/model/SearchConnectionResponseTest.java b/sdks/java/src/test/java/com/thoughtspot/client/model/SearchConnectionResponseTest.java new file mode 100644 index 000000000..94df7aff7 --- /dev/null +++ b/sdks/java/src/test/java/com/thoughtspot/client/model/SearchConnectionResponseTest.java @@ -0,0 +1,54 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client.model; + +import org.junit.jupiter.api.Test; + +/** Model tests for SearchConnectionResponse */ +public class SearchConnectionResponseTest { + private final SearchConnectionResponse model = new SearchConnectionResponse(); + + /** Model tests for SearchConnectionResponse */ + @Test + public void testSearchConnectionResponse() { + // TODO: test SearchConnectionResponse + } + + /** Test the property 'id' */ + @Test + public void idTest() { + // TODO: test id + } + + /** Test the property 'name' */ + @Test + public void nameTest() { + // TODO: test name + } + + /** Test the property 'description' */ + @Test + public void descriptionTest() { + // TODO: test description + } + + /** Test the property 'dataWarehouseType' */ + @Test + public void dataWarehouseTypeTest() { + // TODO: test dataWarehouseType + } + + /** Test the property 'dataWarehouseObjects' */ + @Test + public void dataWarehouseObjectsTest() { + // TODO: test dataWarehouseObjects + } + + /** Test the property 'details' */ + @Test + public void detailsTest() { + // TODO: test details + } +} diff --git a/sdks/java/src/test/java/com/thoughtspot/client/model/SearchCustomActionsRequestTest.java b/sdks/java/src/test/java/com/thoughtspot/client/model/SearchCustomActionsRequestTest.java new file mode 100644 index 000000000..db42bfe57 --- /dev/null +++ b/sdks/java/src/test/java/com/thoughtspot/client/model/SearchCustomActionsRequestTest.java @@ -0,0 +1,60 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client.model; + +import org.junit.jupiter.api.Test; + +/** Model tests for SearchCustomActionsRequest */ +public class SearchCustomActionsRequestTest { + private final SearchCustomActionsRequest model = new SearchCustomActionsRequest(); + + /** Model tests for SearchCustomActionsRequest */ + @Test + public void testSearchCustomActionsRequest() { + // TODO: test SearchCustomActionsRequest + } + + /** Test the property 'customActionIdentifier' */ + @Test + public void customActionIdentifierTest() { + // TODO: test customActionIdentifier + } + + /** Test the property 'namePattern' */ + @Test + public void namePatternTest() { + // TODO: test namePattern + } + + /** Test the property 'defaultActionConfig' */ + @Test + public void defaultActionConfigTest() { + // TODO: test defaultActionConfig + } + + /** Test the property 'includeGroupAssociations' */ + @Test + public void includeGroupAssociationsTest() { + // TODO: test includeGroupAssociations + } + + /** Test the property 'includeMetadataAssociations' */ + @Test + public void includeMetadataAssociationsTest() { + // TODO: test includeMetadataAssociations + } + + /** Test the property 'metadata' */ + @Test + public void metadataTest() { + // TODO: test metadata + } + + /** Test the property 'type' */ + @Test + public void typeTest() { + // TODO: test type + } +} diff --git a/sdks/java/src/test/java/com/thoughtspot/client/model/SearchDataRequestTest.java b/sdks/java/src/test/java/com/thoughtspot/client/model/SearchDataRequestTest.java new file mode 100644 index 000000000..bec58f33d --- /dev/null +++ b/sdks/java/src/test/java/com/thoughtspot/client/model/SearchDataRequestTest.java @@ -0,0 +1,66 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client.model; + +import org.junit.jupiter.api.Test; + +/** Model tests for SearchDataRequest */ +public class SearchDataRequestTest { + private final SearchDataRequest model = new SearchDataRequest(); + + /** Model tests for SearchDataRequest */ + @Test + public void testSearchDataRequest() { + // TODO: test SearchDataRequest + } + + /** Test the property 'queryString' */ + @Test + public void queryStringTest() { + // TODO: test queryString + } + + /** Test the property 'logicalTableIdentifier' */ + @Test + public void logicalTableIdentifierTest() { + // TODO: test logicalTableIdentifier + } + + /** Test the property 'dataFormat' */ + @Test + public void dataFormatTest() { + // TODO: test dataFormat + } + + /** Test the property 'recordOffset' */ + @Test + public void recordOffsetTest() { + // TODO: test recordOffset + } + + /** Test the property 'recordSize' */ + @Test + public void recordSizeTest() { + // TODO: test recordSize + } + + /** Test the property 'runtimeFilter' */ + @Test + public void runtimeFilterTest() { + // TODO: test runtimeFilter + } + + /** Test the property 'runtimeSort' */ + @Test + public void runtimeSortTest() { + // TODO: test runtimeSort + } + + /** Test the property 'runtimeParamOverride' */ + @Test + public void runtimeParamOverrideTest() { + // TODO: test runtimeParamOverride + } +} diff --git a/sdks/java/src/test/java/com/thoughtspot/client/model/SearchDataResponseTest.java b/sdks/java/src/test/java/com/thoughtspot/client/model/SearchDataResponseTest.java new file mode 100644 index 000000000..ca86bc0f2 --- /dev/null +++ b/sdks/java/src/test/java/com/thoughtspot/client/model/SearchDataResponseTest.java @@ -0,0 +1,24 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client.model; + +import org.junit.jupiter.api.Test; + +/** Model tests for SearchDataResponse */ +public class SearchDataResponseTest { + private final SearchDataResponse model = new SearchDataResponse(); + + /** Model tests for SearchDataResponse */ + @Test + public void testSearchDataResponse() { + // TODO: test SearchDataResponse + } + + /** Test the property 'contents' */ + @Test + public void contentsTest() { + // TODO: test contents + } +} diff --git a/sdks/java/src/test/java/com/thoughtspot/client/model/SearchEmailCustomizationRequestTest.java b/sdks/java/src/test/java/com/thoughtspot/client/model/SearchEmailCustomizationRequestTest.java new file mode 100644 index 000000000..948d70539 --- /dev/null +++ b/sdks/java/src/test/java/com/thoughtspot/client/model/SearchEmailCustomizationRequestTest.java @@ -0,0 +1,24 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client.model; + +import org.junit.jupiter.api.Test; + +/** Model tests for SearchEmailCustomizationRequest */ +public class SearchEmailCustomizationRequestTest { + private final SearchEmailCustomizationRequest model = new SearchEmailCustomizationRequest(); + + /** Model tests for SearchEmailCustomizationRequest */ + @Test + public void testSearchEmailCustomizationRequest() { + // TODO: test SearchEmailCustomizationRequest + } + + /** Test the property 'orgIdentifiers' */ + @Test + public void orgIdentifiersTest() { + // TODO: test orgIdentifiers + } +} diff --git a/sdks/java/src/test/java/com/thoughtspot/client/model/SearchMetadataRequestTest.java b/sdks/java/src/test/java/com/thoughtspot/client/model/SearchMetadataRequestTest.java new file mode 100644 index 000000000..c1c168ffc --- /dev/null +++ b/sdks/java/src/test/java/com/thoughtspot/client/model/SearchMetadataRequestTest.java @@ -0,0 +1,174 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client.model; + +import org.junit.jupiter.api.Test; + +/** Model tests for SearchMetadataRequest */ +public class SearchMetadataRequestTest { + private final SearchMetadataRequest model = new SearchMetadataRequest(); + + /** Model tests for SearchMetadataRequest */ + @Test + public void testSearchMetadataRequest() { + // TODO: test SearchMetadataRequest + } + + /** Test the property 'metadata' */ + @Test + public void metadataTest() { + // TODO: test metadata + } + + /** Test the property 'permissions' */ + @Test + public void permissionsTest() { + // TODO: test permissions + } + + /** Test the property 'createdByUserIdentifiers' */ + @Test + public void createdByUserIdentifiersTest() { + // TODO: test createdByUserIdentifiers + } + + /** Test the property 'dependentObjectVersion' */ + @Test + public void dependentObjectVersionTest() { + // TODO: test dependentObjectVersion + } + + /** Test the property 'excludeObjects' */ + @Test + public void excludeObjectsTest() { + // TODO: test excludeObjects + } + + /** Test the property 'favoriteObjectOptions' */ + @Test + public void favoriteObjectOptionsTest() { + // TODO: test favoriteObjectOptions + } + + /** Test the property 'includeAutoCreatedObjects' */ + @Test + public void includeAutoCreatedObjectsTest() { + // TODO: test includeAutoCreatedObjects + } + + /** Test the property 'includeDependentObjects' */ + @Test + public void includeDependentObjectsTest() { + // TODO: test includeDependentObjects + } + + /** Test the property 'dependentObjectsRecordSize' */ + @Test + public void dependentObjectsRecordSizeTest() { + // TODO: test dependentObjectsRecordSize + } + + /** Test the property 'includeDetails' */ + @Test + public void includeDetailsTest() { + // TODO: test includeDetails + } + + /** Test the property 'includePersonalisedViews' */ + @Test + public void includePersonalisedViewsTest() { + // TODO: test includePersonalisedViews + } + + /** Test the property 'includeHeaders' */ + @Test + public void includeHeadersTest() { + // TODO: test includeHeaders + } + + /** Test the property 'includeHiddenObjects' */ + @Test + public void includeHiddenObjectsTest() { + // TODO: test includeHiddenObjects + } + + /** Test the property 'includeIncompleteObjects' */ + @Test + public void includeIncompleteObjectsTest() { + // TODO: test includeIncompleteObjects + } + + /** Test the property 'includeVisualizationHeaders' */ + @Test + public void includeVisualizationHeadersTest() { + // TODO: test includeVisualizationHeaders + } + + /** Test the property 'includeWorksheetSearchAssistData' */ + @Test + public void includeWorksheetSearchAssistDataTest() { + // TODO: test includeWorksheetSearchAssistData + } + + /** Test the property 'modifiedByUserIdentifiers' */ + @Test + public void modifiedByUserIdentifiersTest() { + // TODO: test modifiedByUserIdentifiers + } + + /** Test the property 'recordOffset' */ + @Test + public void recordOffsetTest() { + // TODO: test recordOffset + } + + /** Test the property 'recordSize' */ + @Test + public void recordSizeTest() { + // TODO: test recordSize + } + + /** Test the property 'sortOptions' */ + @Test + public void sortOptionsTest() { + // TODO: test sortOptions + } + + /** Test the property 'tagIdentifiers' */ + @Test + public void tagIdentifiersTest() { + // TODO: test tagIdentifiers + } + + /** Test the property 'includeStats' */ + @Test + public void includeStatsTest() { + // TODO: test includeStats + } + + /** Test the property 'includeDiscoverableObjects' */ + @Test + public void includeDiscoverableObjectsTest() { + // TODO: test includeDiscoverableObjects + } + + /** Test the property 'showResolvedParameters' */ + @Test + public void showResolvedParametersTest() { + // TODO: test showResolvedParameters + } + + /** Test the property 'liveboardResponseVersion' */ + @Test + public void liveboardResponseVersionTest() { + // TODO: test liveboardResponseVersion + } + + /** Test the property 'includeOnlyPublishedObjects' */ + @Test + public void includeOnlyPublishedObjectsTest() { + // TODO: test includeOnlyPublishedObjects + } +} diff --git a/sdks/java/src/test/java/com/thoughtspot/client/model/SearchOrgsRequestTest.java b/sdks/java/src/test/java/com/thoughtspot/client/model/SearchOrgsRequestTest.java new file mode 100644 index 000000000..018b876c7 --- /dev/null +++ b/sdks/java/src/test/java/com/thoughtspot/client/model/SearchOrgsRequestTest.java @@ -0,0 +1,48 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client.model; + +import org.junit.jupiter.api.Test; + +/** Model tests for SearchOrgsRequest */ +public class SearchOrgsRequestTest { + private final SearchOrgsRequest model = new SearchOrgsRequest(); + + /** Model tests for SearchOrgsRequest */ + @Test + public void testSearchOrgsRequest() { + // TODO: test SearchOrgsRequest + } + + /** Test the property 'orgIdentifier' */ + @Test + public void orgIdentifierTest() { + // TODO: test orgIdentifier + } + + /** Test the property 'description' */ + @Test + public void descriptionTest() { + // TODO: test description + } + + /** Test the property 'visibility' */ + @Test + public void visibilityTest() { + // TODO: test visibility + } + + /** Test the property 'status' */ + @Test + public void statusTest() { + // TODO: test status + } + + /** Test the property 'userIdentifiers' */ + @Test + public void userIdentifiersTest() { + // TODO: test userIdentifiers + } +} diff --git a/sdks/java/src/test/java/com/thoughtspot/client/model/SearchRoleResponseTest.java b/sdks/java/src/test/java/com/thoughtspot/client/model/SearchRoleResponseTest.java new file mode 100644 index 000000000..c0ca11191 --- /dev/null +++ b/sdks/java/src/test/java/com/thoughtspot/client/model/SearchRoleResponseTest.java @@ -0,0 +1,120 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client.model; + +import org.junit.jupiter.api.Test; + +/** Model tests for SearchRoleResponse */ +public class SearchRoleResponseTest { + private final SearchRoleResponse model = new SearchRoleResponse(); + + /** Model tests for SearchRoleResponse */ + @Test + public void testSearchRoleResponse() { + // TODO: test SearchRoleResponse + } + + /** Test the property 'id' */ + @Test + public void idTest() { + // TODO: test id + } + + /** Test the property 'name' */ + @Test + public void nameTest() { + // TODO: test name + } + + /** Test the property 'description' */ + @Test + public void descriptionTest() { + // TODO: test description + } + + /** Test the property 'groupsAssignedCount' */ + @Test + public void groupsAssignedCountTest() { + // TODO: test groupsAssignedCount + } + + /** Test the property 'orgs' */ + @Test + public void orgsTest() { + // TODO: test orgs + } + + /** Test the property 'groups' */ + @Test + public void groupsTest() { + // TODO: test groups + } + + /** Test the property 'privileges' */ + @Test + public void privilegesTest() { + // TODO: test privileges + } + + /** Test the property 'permission' */ + @Test + public void permissionTest() { + // TODO: test permission + } + + /** Test the property 'authorId' */ + @Test + public void authorIdTest() { + // TODO: test authorId + } + + /** Test the property 'modifierId' */ + @Test + public void modifierIdTest() { + // TODO: test modifierId + } + + /** Test the property 'creationTimeInMillis' */ + @Test + public void creationTimeInMillisTest() { + // TODO: test creationTimeInMillis + } + + /** Test the property 'modificationTimeInMillis' */ + @Test + public void modificationTimeInMillisTest() { + // TODO: test modificationTimeInMillis + } + + /** Test the property 'deleted' */ + @Test + public void deletedTest() { + // TODO: test deleted + } + + /** Test the property 'deprecated' */ + @Test + public void deprecatedTest() { + // TODO: test deprecated + } + + /** Test the property 'external' */ + @Test + public void externalTest() { + // TODO: test external + } + + /** Test the property 'hidden' */ + @Test + public void hiddenTest() { + // TODO: test hidden + } + + /** Test the property 'sharedViaConnection' */ + @Test + public void sharedViaConnectionTest() { + // TODO: test sharedViaConnection + } +} diff --git a/sdks/java/src/test/java/com/thoughtspot/client/model/SearchRolesRequestTest.java b/sdks/java/src/test/java/com/thoughtspot/client/model/SearchRolesRequestTest.java new file mode 100644 index 000000000..b249da802 --- /dev/null +++ b/sdks/java/src/test/java/com/thoughtspot/client/model/SearchRolesRequestTest.java @@ -0,0 +1,66 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client.model; + +import org.junit.jupiter.api.Test; + +/** Model tests for SearchRolesRequest */ +public class SearchRolesRequestTest { + private final SearchRolesRequest model = new SearchRolesRequest(); + + /** Model tests for SearchRolesRequest */ + @Test + public void testSearchRolesRequest() { + // TODO: test SearchRolesRequest + } + + /** Test the property 'roleIdentifiers' */ + @Test + public void roleIdentifiersTest() { + // TODO: test roleIdentifiers + } + + /** Test the property 'orgIdentifiers' */ + @Test + public void orgIdentifiersTest() { + // TODO: test orgIdentifiers + } + + /** Test the property 'groupIdentifiers' */ + @Test + public void groupIdentifiersTest() { + // TODO: test groupIdentifiers + } + + /** Test the property 'privileges' */ + @Test + public void privilegesTest() { + // TODO: test privileges + } + + /** Test the property 'deprecated' */ + @Test + public void deprecatedTest() { + // TODO: test deprecated + } + + /** Test the property 'external' */ + @Test + public void externalTest() { + // TODO: test external + } + + /** Test the property 'sharedViaConnection' */ + @Test + public void sharedViaConnectionTest() { + // TODO: test sharedViaConnection + } + + /** Test the property 'permissions' */ + @Test + public void permissionsTest() { + // TODO: test permissions + } +} diff --git a/sdks/java/src/test/java/com/thoughtspot/client/model/SearchSchedulesRequestTest.java b/sdks/java/src/test/java/com/thoughtspot/client/model/SearchSchedulesRequestTest.java new file mode 100644 index 000000000..31a5be6e1 --- /dev/null +++ b/sdks/java/src/test/java/com/thoughtspot/client/model/SearchSchedulesRequestTest.java @@ -0,0 +1,54 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client.model; + +import org.junit.jupiter.api.Test; + +/** Model tests for SearchSchedulesRequest */ +public class SearchSchedulesRequestTest { + private final SearchSchedulesRequest model = new SearchSchedulesRequest(); + + /** Model tests for SearchSchedulesRequest */ + @Test + public void testSearchSchedulesRequest() { + // TODO: test SearchSchedulesRequest + } + + /** Test the property 'metadata' */ + @Test + public void metadataTest() { + // TODO: test metadata + } + + /** Test the property 'recordOffset' */ + @Test + public void recordOffsetTest() { + // TODO: test recordOffset + } + + /** Test the property 'recordSize' */ + @Test + public void recordSizeTest() { + // TODO: test recordSize + } + + /** Test the property 'sortOptions' */ + @Test + public void sortOptionsTest() { + // TODO: test sortOptions + } + + /** Test the property 'historyRunsOptions' */ + @Test + public void historyRunsOptionsTest() { + // TODO: test historyRunsOptions + } + + /** Test the property 'scheduleIdentifiers' */ + @Test + public void scheduleIdentifiersTest() { + // TODO: test scheduleIdentifiers + } +} diff --git a/sdks/java/src/test/java/com/thoughtspot/client/model/SearchSecuritySettingsRequestTest.java b/sdks/java/src/test/java/com/thoughtspot/client/model/SearchSecuritySettingsRequestTest.java new file mode 100644 index 000000000..984c10c84 --- /dev/null +++ b/sdks/java/src/test/java/com/thoughtspot/client/model/SearchSecuritySettingsRequestTest.java @@ -0,0 +1,24 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client.model; + +import org.junit.jupiter.api.Test; + +/** Model tests for SearchSecuritySettingsRequest */ +public class SearchSecuritySettingsRequestTest { + private final SearchSecuritySettingsRequest model = new SearchSecuritySettingsRequest(); + + /** Model tests for SearchSecuritySettingsRequest */ + @Test + public void testSearchSecuritySettingsRequest() { + // TODO: test SearchSecuritySettingsRequest + } + + /** Test the property 'scope' */ + @Test + public void scopeTest() { + // TODO: test scope + } +} diff --git a/sdks/java/src/test/java/com/thoughtspot/client/model/SearchTagsRequestTest.java b/sdks/java/src/test/java/com/thoughtspot/client/model/SearchTagsRequestTest.java new file mode 100644 index 000000000..4ad139158 --- /dev/null +++ b/sdks/java/src/test/java/com/thoughtspot/client/model/SearchTagsRequestTest.java @@ -0,0 +1,36 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client.model; + +import org.junit.jupiter.api.Test; + +/** Model tests for SearchTagsRequest */ +public class SearchTagsRequestTest { + private final SearchTagsRequest model = new SearchTagsRequest(); + + /** Model tests for SearchTagsRequest */ + @Test + public void testSearchTagsRequest() { + // TODO: test SearchTagsRequest + } + + /** Test the property 'tagIdentifier' */ + @Test + public void tagIdentifierTest() { + // TODO: test tagIdentifier + } + + /** Test the property 'namePattern' */ + @Test + public void namePatternTest() { + // TODO: test namePattern + } + + /** Test the property 'color' */ + @Test + public void colorTest() { + // TODO: test color + } +} diff --git a/sdks/java/src/test/java/com/thoughtspot/client/model/SearchUserGroupsRequestTest.java b/sdks/java/src/test/java/com/thoughtspot/client/model/SearchUserGroupsRequestTest.java new file mode 100644 index 000000000..f6ca59a08 --- /dev/null +++ b/sdks/java/src/test/java/com/thoughtspot/client/model/SearchUserGroupsRequestTest.java @@ -0,0 +1,120 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client.model; + +import org.junit.jupiter.api.Test; + +/** Model tests for SearchUserGroupsRequest */ +public class SearchUserGroupsRequestTest { + private final SearchUserGroupsRequest model = new SearchUserGroupsRequest(); + + /** Model tests for SearchUserGroupsRequest */ + @Test + public void testSearchUserGroupsRequest() { + // TODO: test SearchUserGroupsRequest + } + + /** Test the property 'defaultLiveboardIdentifiers' */ + @Test + public void defaultLiveboardIdentifiersTest() { + // TODO: test defaultLiveboardIdentifiers + } + + /** Test the property 'description' */ + @Test + public void descriptionTest() { + // TODO: test description + } + + /** Test the property 'displayName' */ + @Test + public void displayNameTest() { + // TODO: test displayName + } + + /** Test the property 'namePattern' */ + @Test + public void namePatternTest() { + // TODO: test namePattern + } + + /** Test the property 'groupIdentifier' */ + @Test + public void groupIdentifierTest() { + // TODO: test groupIdentifier + } + + /** Test the property 'orgIdentifiers' */ + @Test + public void orgIdentifiersTest() { + // TODO: test orgIdentifiers + } + + /** Test the property 'privileges' */ + @Test + public void privilegesTest() { + // TODO: test privileges + } + + /** Test the property 'subGroupIdentifiers' */ + @Test + public void subGroupIdentifiersTest() { + // TODO: test subGroupIdentifiers + } + + /** Test the property 'type' */ + @Test + public void typeTest() { + // TODO: test type + } + + /** Test the property 'userIdentifiers' */ + @Test + public void userIdentifiersTest() { + // TODO: test userIdentifiers + } + + /** Test the property 'visibility' */ + @Test + public void visibilityTest() { + // TODO: test visibility + } + + /** Test the property 'roleIdentifiers' */ + @Test + public void roleIdentifiersTest() { + // TODO: test roleIdentifiers + } + + /** Test the property 'recordOffset' */ + @Test + public void recordOffsetTest() { + // TODO: test recordOffset + } + + /** Test the property 'recordSize' */ + @Test + public void recordSizeTest() { + // TODO: test recordSize + } + + /** Test the property 'sortOptions' */ + @Test + public void sortOptionsTest() { + // TODO: test sortOptions + } + + /** Test the property 'includeUsers' */ + @Test + public void includeUsersTest() { + // TODO: test includeUsers + } + + /** Test the property 'includeSubGroups' */ + @Test + public void includeSubGroupsTest() { + // TODO: test includeSubGroups + } +} diff --git a/sdks/java/src/test/java/com/thoughtspot/client/model/SearchUsersRequestTest.java b/sdks/java/src/test/java/com/thoughtspot/client/model/SearchUsersRequestTest.java new file mode 100644 index 000000000..3642de9e5 --- /dev/null +++ b/sdks/java/src/test/java/com/thoughtspot/client/model/SearchUsersRequestTest.java @@ -0,0 +1,144 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client.model; + +import org.junit.jupiter.api.Test; + +/** Model tests for SearchUsersRequest */ +public class SearchUsersRequestTest { + private final SearchUsersRequest model = new SearchUsersRequest(); + + /** Model tests for SearchUsersRequest */ + @Test + public void testSearchUsersRequest() { + // TODO: test SearchUsersRequest + } + + /** Test the property 'userIdentifier' */ + @Test + public void userIdentifierTest() { + // TODO: test userIdentifier + } + + /** Test the property 'displayName' */ + @Test + public void displayNameTest() { + // TODO: test displayName + } + + /** Test the property 'namePattern' */ + @Test + public void namePatternTest() { + // TODO: test namePattern + } + + /** Test the property 'visibility' */ + @Test + public void visibilityTest() { + // TODO: test visibility + } + + /** Test the property 'email' */ + @Test + public void emailTest() { + // TODO: test email + } + + /** Test the property 'groupIdentifiers' */ + @Test + public void groupIdentifiersTest() { + // TODO: test groupIdentifiers + } + + /** Test the property 'privileges' */ + @Test + public void privilegesTest() { + // TODO: test privileges + } + + /** Test the property 'accountType' */ + @Test + public void accountTypeTest() { + // TODO: test accountType + } + + /** Test the property 'accountStatus' */ + @Test + public void accountStatusTest() { + // TODO: test accountStatus + } + + /** Test the property 'notifyOnShare' */ + @Test + public void notifyOnShareTest() { + // TODO: test notifyOnShare + } + + /** Test the property 'showOnboardingExperience' */ + @Test + public void showOnboardingExperienceTest() { + // TODO: test showOnboardingExperience + } + + /** Test the property 'onboardingExperienceCompleted' */ + @Test + public void onboardingExperienceCompletedTest() { + // TODO: test onboardingExperienceCompleted + } + + /** Test the property 'orgIdentifiers' */ + @Test + public void orgIdentifiersTest() { + // TODO: test orgIdentifiers + } + + /** Test the property 'homeLiveboardIdentifier' */ + @Test + public void homeLiveboardIdentifierTest() { + // TODO: test homeLiveboardIdentifier + } + + /** Test the property 'favoriteMetadata' */ + @Test + public void favoriteMetadataTest() { + // TODO: test favoriteMetadata + } + + /** Test the property 'recordOffset' */ + @Test + public void recordOffsetTest() { + // TODO: test recordOffset + } + + /** Test the property 'recordSize' */ + @Test + public void recordSizeTest() { + // TODO: test recordSize + } + + /** Test the property 'sortOptions' */ + @Test + public void sortOptionsTest() { + // TODO: test sortOptions + } + + /** Test the property 'roleIdentifiers' */ + @Test + public void roleIdentifiersTest() { + // TODO: test roleIdentifiers + } + + /** Test the property 'includeFavoriteMetadata' */ + @Test + public void includeFavoriteMetadataTest() { + // TODO: test includeFavoriteMetadata + } + + /** Test the property 'includeVariableValues' */ + @Test + public void includeVariableValuesTest() { + // TODO: test includeVariableValues + } +} diff --git a/sdks/java/src/test/java/com/thoughtspot/client/model/SearchVariablesRequestTest.java b/sdks/java/src/test/java/com/thoughtspot/client/model/SearchVariablesRequestTest.java new file mode 100644 index 000000000..7ccc6d011 --- /dev/null +++ b/sdks/java/src/test/java/com/thoughtspot/client/model/SearchVariablesRequestTest.java @@ -0,0 +1,48 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client.model; + +import org.junit.jupiter.api.Test; + +/** Model tests for SearchVariablesRequest */ +public class SearchVariablesRequestTest { + private final SearchVariablesRequest model = new SearchVariablesRequest(); + + /** Model tests for SearchVariablesRequest */ + @Test + public void testSearchVariablesRequest() { + // TODO: test SearchVariablesRequest + } + + /** Test the property 'variableDetails' */ + @Test + public void variableDetailsTest() { + // TODO: test variableDetails + } + + /** Test the property 'valueScope' */ + @Test + public void valueScopeTest() { + // TODO: test valueScope + } + + /** Test the property 'recordOffset' */ + @Test + public void recordOffsetTest() { + // TODO: test recordOffset + } + + /** Test the property 'recordSize' */ + @Test + public void recordSizeTest() { + // TODO: test recordSize + } + + /** Test the property 'responseContent' */ + @Test + public void responseContentTest() { + // TODO: test responseContent + } +} diff --git a/sdks/java/src/test/java/com/thoughtspot/client/model/SearchWebhookConfigurationsRequestTest.java b/sdks/java/src/test/java/com/thoughtspot/client/model/SearchWebhookConfigurationsRequestTest.java new file mode 100644 index 000000000..f864a8b21 --- /dev/null +++ b/sdks/java/src/test/java/com/thoughtspot/client/model/SearchWebhookConfigurationsRequestTest.java @@ -0,0 +1,55 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client.model; + +import org.junit.jupiter.api.Test; + +/** Model tests for SearchWebhookConfigurationsRequest */ +public class SearchWebhookConfigurationsRequestTest { + private final SearchWebhookConfigurationsRequest model = + new SearchWebhookConfigurationsRequest(); + + /** Model tests for SearchWebhookConfigurationsRequest */ + @Test + public void testSearchWebhookConfigurationsRequest() { + // TODO: test SearchWebhookConfigurationsRequest + } + + /** Test the property 'orgIdentifier' */ + @Test + public void orgIdentifierTest() { + // TODO: test orgIdentifier + } + + /** Test the property 'webhookIdentifier' */ + @Test + public void webhookIdentifierTest() { + // TODO: test webhookIdentifier + } + + /** Test the property 'eventType' */ + @Test + public void eventTypeTest() { + // TODO: test eventType + } + + /** Test the property 'recordOffset' */ + @Test + public void recordOffsetTest() { + // TODO: test recordOffset + } + + /** Test the property 'recordSize' */ + @Test + public void recordSizeTest() { + // TODO: test recordSize + } + + /** Test the property 'sortOptions' */ + @Test + public void sortOptionsTest() { + // TODO: test sortOptions + } +} diff --git a/sdks/java/src/test/java/com/thoughtspot/client/model/SecuritySettingsClusterPreferencesInputTest.java b/sdks/java/src/test/java/com/thoughtspot/client/model/SecuritySettingsClusterPreferencesInputTest.java new file mode 100644 index 000000000..2a3a2b546 --- /dev/null +++ b/sdks/java/src/test/java/com/thoughtspot/client/model/SecuritySettingsClusterPreferencesInputTest.java @@ -0,0 +1,49 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client.model; + +import org.junit.jupiter.api.Test; + +/** Model tests for SecuritySettingsClusterPreferencesInput */ +public class SecuritySettingsClusterPreferencesInputTest { + private final SecuritySettingsClusterPreferencesInput model = + new SecuritySettingsClusterPreferencesInput(); + + /** Model tests for SecuritySettingsClusterPreferencesInput */ + @Test + public void testSecuritySettingsClusterPreferencesInput() { + // TODO: test SecuritySettingsClusterPreferencesInput + } + + /** Test the property 'enablePartitionedCookies' */ + @Test + public void enablePartitionedCookiesTest() { + // TODO: test enablePartitionedCookies + } + + /** Test the property 'corsWhitelistedUrls' */ + @Test + public void corsWhitelistedUrlsTest() { + // TODO: test corsWhitelistedUrls + } + + /** Test the property 'cspSettings' */ + @Test + public void cspSettingsTest() { + // TODO: test cspSettings + } + + /** Test the property 'samlRedirectUrls' */ + @Test + public void samlRedirectUrlsTest() { + // TODO: test samlRedirectUrls + } + + /** Test the property 'nonEmbedAccess' */ + @Test + public void nonEmbedAccessTest() { + // TODO: test nonEmbedAccess + } +} diff --git a/sdks/java/src/test/java/com/thoughtspot/client/model/SecuritySettingsClusterPreferencesTest.java b/sdks/java/src/test/java/com/thoughtspot/client/model/SecuritySettingsClusterPreferencesTest.java new file mode 100644 index 000000000..1238af0a1 --- /dev/null +++ b/sdks/java/src/test/java/com/thoughtspot/client/model/SecuritySettingsClusterPreferencesTest.java @@ -0,0 +1,55 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client.model; + +import org.junit.jupiter.api.Test; + +/** Model tests for SecuritySettingsClusterPreferences */ +public class SecuritySettingsClusterPreferencesTest { + private final SecuritySettingsClusterPreferences model = + new SecuritySettingsClusterPreferences(); + + /** Model tests for SecuritySettingsClusterPreferences */ + @Test + public void testSecuritySettingsClusterPreferences() { + // TODO: test SecuritySettingsClusterPreferences + } + + /** Test the property 'enablePartitionedCookies' */ + @Test + public void enablePartitionedCookiesTest() { + // TODO: test enablePartitionedCookies + } + + /** Test the property 'corsWhitelistedUrls' */ + @Test + public void corsWhitelistedUrlsTest() { + // TODO: test corsWhitelistedUrls + } + + /** Test the property 'cspSettings' */ + @Test + public void cspSettingsTest() { + // TODO: test cspSettings + } + + /** Test the property 'samlRedirectUrls' */ + @Test + public void samlRedirectUrlsTest() { + // TODO: test samlRedirectUrls + } + + /** Test the property 'nonEmbedAccess' */ + @Test + public void nonEmbedAccessTest() { + // TODO: test nonEmbedAccess + } + + /** Test the property 'trustedAuthStatus' */ + @Test + public void trustedAuthStatusTest() { + // TODO: test trustedAuthStatus + } +} diff --git a/sdks/java/src/test/java/com/thoughtspot/client/model/SecuritySettingsOrgDetailsTest.java b/sdks/java/src/test/java/com/thoughtspot/client/model/SecuritySettingsOrgDetailsTest.java new file mode 100644 index 000000000..78dd358e1 --- /dev/null +++ b/sdks/java/src/test/java/com/thoughtspot/client/model/SecuritySettingsOrgDetailsTest.java @@ -0,0 +1,30 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client.model; + +import org.junit.jupiter.api.Test; + +/** Model tests for SecuritySettingsOrgDetails */ +public class SecuritySettingsOrgDetailsTest { + private final SecuritySettingsOrgDetails model = new SecuritySettingsOrgDetails(); + + /** Model tests for SecuritySettingsOrgDetails */ + @Test + public void testSecuritySettingsOrgDetails() { + // TODO: test SecuritySettingsOrgDetails + } + + /** Test the property 'id' */ + @Test + public void idTest() { + // TODO: test id + } + + /** Test the property 'name' */ + @Test + public void nameTest() { + // TODO: test name + } +} diff --git a/sdks/java/src/test/java/com/thoughtspot/client/model/SecuritySettingsOrgPreferencesInputTest.java b/sdks/java/src/test/java/com/thoughtspot/client/model/SecuritySettingsOrgPreferencesInputTest.java new file mode 100644 index 000000000..bf85c7972 --- /dev/null +++ b/sdks/java/src/test/java/com/thoughtspot/client/model/SecuritySettingsOrgPreferencesInputTest.java @@ -0,0 +1,37 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client.model; + +import org.junit.jupiter.api.Test; + +/** Model tests for SecuritySettingsOrgPreferencesInput */ +public class SecuritySettingsOrgPreferencesInputTest { + private final SecuritySettingsOrgPreferencesInput model = + new SecuritySettingsOrgPreferencesInput(); + + /** Model tests for SecuritySettingsOrgPreferencesInput */ + @Test + public void testSecuritySettingsOrgPreferencesInput() { + // TODO: test SecuritySettingsOrgPreferencesInput + } + + /** Test the property 'orgIdentifier' */ + @Test + public void orgIdentifierTest() { + // TODO: test orgIdentifier + } + + /** Test the property 'corsWhitelistedUrls' */ + @Test + public void corsWhitelistedUrlsTest() { + // TODO: test corsWhitelistedUrls + } + + /** Test the property 'nonEmbedAccess' */ + @Test + public void nonEmbedAccessTest() { + // TODO: test nonEmbedAccess + } +} diff --git a/sdks/java/src/test/java/com/thoughtspot/client/model/SecuritySettingsOrgPreferencesTest.java b/sdks/java/src/test/java/com/thoughtspot/client/model/SecuritySettingsOrgPreferencesTest.java new file mode 100644 index 000000000..9e532c16a --- /dev/null +++ b/sdks/java/src/test/java/com/thoughtspot/client/model/SecuritySettingsOrgPreferencesTest.java @@ -0,0 +1,42 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client.model; + +import org.junit.jupiter.api.Test; + +/** Model tests for SecuritySettingsOrgPreferences */ +public class SecuritySettingsOrgPreferencesTest { + private final SecuritySettingsOrgPreferences model = new SecuritySettingsOrgPreferences(); + + /** Model tests for SecuritySettingsOrgPreferences */ + @Test + public void testSecuritySettingsOrgPreferences() { + // TODO: test SecuritySettingsOrgPreferences + } + + /** Test the property 'org' */ + @Test + public void orgTest() { + // TODO: test org + } + + /** Test the property 'corsWhitelistedUrls' */ + @Test + public void corsWhitelistedUrlsTest() { + // TODO: test corsWhitelistedUrls + } + + /** Test the property 'nonEmbedAccess' */ + @Test + public void nonEmbedAccessTest() { + // TODO: test nonEmbedAccess + } + + /** Test the property 'trustedAuthStatus' */ + @Test + public void trustedAuthStatusTest() { + // TODO: test trustedAuthStatus + } +} diff --git a/sdks/java/src/test/java/com/thoughtspot/client/model/SecuritySettingsResponseTest.java b/sdks/java/src/test/java/com/thoughtspot/client/model/SecuritySettingsResponseTest.java new file mode 100644 index 000000000..8e0d3dea3 --- /dev/null +++ b/sdks/java/src/test/java/com/thoughtspot/client/model/SecuritySettingsResponseTest.java @@ -0,0 +1,30 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client.model; + +import org.junit.jupiter.api.Test; + +/** Model tests for SecuritySettingsResponse */ +public class SecuritySettingsResponseTest { + private final SecuritySettingsResponse model = new SecuritySettingsResponse(); + + /** Model tests for SecuritySettingsResponse */ + @Test + public void testSecuritySettingsResponse() { + // TODO: test SecuritySettingsResponse + } + + /** Test the property 'clusterPreferences' */ + @Test + public void clusterPreferencesTest() { + // TODO: test clusterPreferences + } + + /** Test the property 'orgPreferences' */ + @Test + public void orgPreferencesTest() { + // TODO: test orgPreferences + } +} diff --git a/sdks/java/src/test/java/com/thoughtspot/client/model/SendAgentConversationMessageRequestTest.java b/sdks/java/src/test/java/com/thoughtspot/client/model/SendAgentConversationMessageRequestTest.java new file mode 100644 index 000000000..92fe7a879 --- /dev/null +++ b/sdks/java/src/test/java/com/thoughtspot/client/model/SendAgentConversationMessageRequestTest.java @@ -0,0 +1,25 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client.model; + +import org.junit.jupiter.api.Test; + +/** Model tests for SendAgentConversationMessageRequest */ +public class SendAgentConversationMessageRequestTest { + private final SendAgentConversationMessageRequest model = + new SendAgentConversationMessageRequest(); + + /** Model tests for SendAgentConversationMessageRequest */ + @Test + public void testSendAgentConversationMessageRequest() { + // TODO: test SendAgentConversationMessageRequest + } + + /** Test the property 'messages' */ + @Test + public void messagesTest() { + // TODO: test messages + } +} diff --git a/sdks/java/src/test/java/com/thoughtspot/client/model/SendAgentConversationMessageStreamingRequestTest.java b/sdks/java/src/test/java/com/thoughtspot/client/model/SendAgentConversationMessageStreamingRequestTest.java new file mode 100644 index 000000000..3aadc8a6b --- /dev/null +++ b/sdks/java/src/test/java/com/thoughtspot/client/model/SendAgentConversationMessageStreamingRequestTest.java @@ -0,0 +1,25 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client.model; + +import org.junit.jupiter.api.Test; + +/** Model tests for SendAgentConversationMessageStreamingRequest */ +public class SendAgentConversationMessageStreamingRequestTest { + private final SendAgentConversationMessageStreamingRequest model = + new SendAgentConversationMessageStreamingRequest(); + + /** Model tests for SendAgentConversationMessageStreamingRequest */ + @Test + public void testSendAgentConversationMessageStreamingRequest() { + // TODO: test SendAgentConversationMessageStreamingRequest + } + + /** Test the property 'messages' */ + @Test + public void messagesTest() { + // TODO: test messages + } +} diff --git a/sdks/java/src/test/java/com/thoughtspot/client/model/SendAgentMessageRequestTest.java b/sdks/java/src/test/java/com/thoughtspot/client/model/SendAgentMessageRequestTest.java new file mode 100644 index 000000000..cc3e0dab9 --- /dev/null +++ b/sdks/java/src/test/java/com/thoughtspot/client/model/SendAgentMessageRequestTest.java @@ -0,0 +1,24 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client.model; + +import org.junit.jupiter.api.Test; + +/** Model tests for SendAgentMessageRequest */ +public class SendAgentMessageRequestTest { + private final SendAgentMessageRequest model = new SendAgentMessageRequest(); + + /** Model tests for SendAgentMessageRequest */ + @Test + public void testSendAgentMessageRequest() { + // TODO: test SendAgentMessageRequest + } + + /** Test the property 'messages' */ + @Test + public void messagesTest() { + // TODO: test messages + } +} diff --git a/sdks/java/src/test/java/com/thoughtspot/client/model/SendAgentMessageResponseTest.java b/sdks/java/src/test/java/com/thoughtspot/client/model/SendAgentMessageResponseTest.java new file mode 100644 index 000000000..a1fb4b743 --- /dev/null +++ b/sdks/java/src/test/java/com/thoughtspot/client/model/SendAgentMessageResponseTest.java @@ -0,0 +1,30 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client.model; + +import org.junit.jupiter.api.Test; + +/** Model tests for SendAgentMessageResponse */ +public class SendAgentMessageResponseTest { + private final SendAgentMessageResponse model = new SendAgentMessageResponse(); + + /** Model tests for SendAgentMessageResponse */ + @Test + public void testSendAgentMessageResponse() { + // TODO: test SendAgentMessageResponse + } + + /** Test the property 'success' */ + @Test + public void successTest() { + // TODO: test success + } + + /** Test the property 'message' */ + @Test + public void messageTest() { + // TODO: test message + } +} diff --git a/sdks/java/src/test/java/com/thoughtspot/client/model/SendAgentMessageStreamingRequestTest.java b/sdks/java/src/test/java/com/thoughtspot/client/model/SendAgentMessageStreamingRequestTest.java new file mode 100644 index 000000000..bfb022db0 --- /dev/null +++ b/sdks/java/src/test/java/com/thoughtspot/client/model/SendAgentMessageStreamingRequestTest.java @@ -0,0 +1,30 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client.model; + +import org.junit.jupiter.api.Test; + +/** Model tests for SendAgentMessageStreamingRequest */ +public class SendAgentMessageStreamingRequestTest { + private final SendAgentMessageStreamingRequest model = new SendAgentMessageStreamingRequest(); + + /** Model tests for SendAgentMessageStreamingRequest */ + @Test + public void testSendAgentMessageStreamingRequest() { + // TODO: test SendAgentMessageStreamingRequest + } + + /** Test the property 'conversationIdentifier' */ + @Test + public void conversationIdentifierTest() { + // TODO: test conversationIdentifier + } + + /** Test the property 'messages' */ + @Test + public void messagesTest() { + // TODO: test messages + } +} diff --git a/sdks/java/src/test/java/com/thoughtspot/client/model/SendMessageRequestTest.java b/sdks/java/src/test/java/com/thoughtspot/client/model/SendMessageRequestTest.java new file mode 100644 index 000000000..b12243fca --- /dev/null +++ b/sdks/java/src/test/java/com/thoughtspot/client/model/SendMessageRequestTest.java @@ -0,0 +1,30 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client.model; + +import org.junit.jupiter.api.Test; + +/** Model tests for SendMessageRequest */ +public class SendMessageRequestTest { + private final SendMessageRequest model = new SendMessageRequest(); + + /** Model tests for SendMessageRequest */ + @Test + public void testSendMessageRequest() { + // TODO: test SendMessageRequest + } + + /** Test the property 'metadataIdentifier' */ + @Test + public void metadataIdentifierTest() { + // TODO: test metadataIdentifier + } + + /** Test the property 'message' */ + @Test + public void messageTest() { + // TODO: test message + } +} diff --git a/sdks/java/src/test/java/com/thoughtspot/client/model/SetNLInstructionsRequestTest.java b/sdks/java/src/test/java/com/thoughtspot/client/model/SetNLInstructionsRequestTest.java new file mode 100644 index 000000000..e7d68b968 --- /dev/null +++ b/sdks/java/src/test/java/com/thoughtspot/client/model/SetNLInstructionsRequestTest.java @@ -0,0 +1,30 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client.model; + +import org.junit.jupiter.api.Test; + +/** Model tests for SetNLInstructionsRequest */ +public class SetNLInstructionsRequestTest { + private final SetNLInstructionsRequest model = new SetNLInstructionsRequest(); + + /** Model tests for SetNLInstructionsRequest */ + @Test + public void testSetNLInstructionsRequest() { + // TODO: test SetNLInstructionsRequest + } + + /** Test the property 'dataSourceIdentifier' */ + @Test + public void dataSourceIdentifierTest() { + // TODO: test dataSourceIdentifier + } + + /** Test the property 'nlInstructionsInfo' */ + @Test + public void nlInstructionsInfoTest() { + // TODO: test nlInstructionsInfo + } +} diff --git a/sdks/java/src/test/java/com/thoughtspot/client/model/ShareMetadataRequestTest.java b/sdks/java/src/test/java/com/thoughtspot/client/model/ShareMetadataRequestTest.java new file mode 100644 index 000000000..a6c539674 --- /dev/null +++ b/sdks/java/src/test/java/com/thoughtspot/client/model/ShareMetadataRequestTest.java @@ -0,0 +1,78 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client.model; + +import org.junit.jupiter.api.Test; + +/** Model tests for ShareMetadataRequest */ +public class ShareMetadataRequestTest { + private final ShareMetadataRequest model = new ShareMetadataRequest(); + + /** Model tests for ShareMetadataRequest */ + @Test + public void testShareMetadataRequest() { + // TODO: test ShareMetadataRequest + } + + /** Test the property 'metadataType' */ + @Test + public void metadataTypeTest() { + // TODO: test metadataType + } + + /** Test the property 'metadataIdentifiers' */ + @Test + public void metadataIdentifiersTest() { + // TODO: test metadataIdentifiers + } + + /** Test the property 'metadata' */ + @Test + public void metadataTest() { + // TODO: test metadata + } + + /** Test the property 'permissions' */ + @Test + public void permissionsTest() { + // TODO: test permissions + } + + /** Test the property 'visualizationIdentifiers' */ + @Test + public void visualizationIdentifiersTest() { + // TODO: test visualizationIdentifiers + } + + /** Test the property 'emails' */ + @Test + public void emailsTest() { + // TODO: test emails + } + + /** Test the property 'message' */ + @Test + public void messageTest() { + // TODO: test message + } + + /** Test the property 'enableCustomUrl' */ + @Test + public void enableCustomUrlTest() { + // TODO: test enableCustomUrl + } + + /** Test the property 'notifyOnShare' */ + @Test + public void notifyOnShareTest() { + // TODO: test notifyOnShare + } + + /** Test the property 'hasLenientDiscoverability' */ + @Test + public void hasLenientDiscoverabilityTest() { + // TODO: test hasLenientDiscoverability + } +} diff --git a/sdks/java/src/test/java/com/thoughtspot/client/model/ShareMetadataTypeInputTest.java b/sdks/java/src/test/java/com/thoughtspot/client/model/ShareMetadataTypeInputTest.java new file mode 100644 index 000000000..5dba3847d --- /dev/null +++ b/sdks/java/src/test/java/com/thoughtspot/client/model/ShareMetadataTypeInputTest.java @@ -0,0 +1,30 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client.model; + +import org.junit.jupiter.api.Test; + +/** Model tests for ShareMetadataTypeInput */ +public class ShareMetadataTypeInputTest { + private final ShareMetadataTypeInput model = new ShareMetadataTypeInput(); + + /** Model tests for ShareMetadataTypeInput */ + @Test + public void testShareMetadataTypeInput() { + // TODO: test ShareMetadataTypeInput + } + + /** Test the property 'type' */ + @Test + public void typeTest() { + // TODO: test type + } + + /** Test the property 'identifier' */ + @Test + public void identifierTest() { + // TODO: test identifier + } +} diff --git a/sdks/java/src/test/java/com/thoughtspot/client/model/SharePermissionsInputTest.java b/sdks/java/src/test/java/com/thoughtspot/client/model/SharePermissionsInputTest.java new file mode 100644 index 000000000..ac30515b5 --- /dev/null +++ b/sdks/java/src/test/java/com/thoughtspot/client/model/SharePermissionsInputTest.java @@ -0,0 +1,36 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client.model; + +import org.junit.jupiter.api.Test; + +/** Model tests for SharePermissionsInput */ +public class SharePermissionsInputTest { + private final SharePermissionsInput model = new SharePermissionsInput(); + + /** Model tests for SharePermissionsInput */ + @Test + public void testSharePermissionsInput() { + // TODO: test SharePermissionsInput + } + + /** Test the property 'principal' */ + @Test + public void principalTest() { + // TODO: test principal + } + + /** Test the property 'shareMode' */ + @Test + public void shareModeTest() { + // TODO: test shareMode + } + + /** Test the property 'contentShareMode' */ + @Test + public void contentShareModeTest() { + // TODO: test contentShareMode + } +} diff --git a/sdks/java/src/test/java/com/thoughtspot/client/model/SingleAnswerRequestTest.java b/sdks/java/src/test/java/com/thoughtspot/client/model/SingleAnswerRequestTest.java new file mode 100644 index 000000000..96629dbd2 --- /dev/null +++ b/sdks/java/src/test/java/com/thoughtspot/client/model/SingleAnswerRequestTest.java @@ -0,0 +1,30 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client.model; + +import org.junit.jupiter.api.Test; + +/** Model tests for SingleAnswerRequest */ +public class SingleAnswerRequestTest { + private final SingleAnswerRequest model = new SingleAnswerRequest(); + + /** Model tests for SingleAnswerRequest */ + @Test + public void testSingleAnswerRequest() { + // TODO: test SingleAnswerRequest + } + + /** Test the property 'query' */ + @Test + public void queryTest() { + // TODO: test query + } + + /** Test the property 'metadataIdentifier' */ + @Test + public void metadataIdentifierTest() { + // TODO: test metadataIdentifier + } +} diff --git a/sdks/java/src/test/java/com/thoughtspot/client/model/SortOptionInputTest.java b/sdks/java/src/test/java/com/thoughtspot/client/model/SortOptionInputTest.java new file mode 100644 index 000000000..6f3642f78 --- /dev/null +++ b/sdks/java/src/test/java/com/thoughtspot/client/model/SortOptionInputTest.java @@ -0,0 +1,30 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client.model; + +import org.junit.jupiter.api.Test; + +/** Model tests for SortOptionInput */ +public class SortOptionInputTest { + private final SortOptionInput model = new SortOptionInput(); + + /** Model tests for SortOptionInput */ + @Test + public void testSortOptionInput() { + // TODO: test SortOptionInput + } + + /** Test the property 'fieldName' */ + @Test + public void fieldNameTest() { + // TODO: test fieldName + } + + /** Test the property 'order' */ + @Test + public void orderTest() { + // TODO: test order + } +} diff --git a/sdks/java/src/test/java/com/thoughtspot/client/model/SortOptionTest.java b/sdks/java/src/test/java/com/thoughtspot/client/model/SortOptionTest.java new file mode 100644 index 000000000..450fd8d25 --- /dev/null +++ b/sdks/java/src/test/java/com/thoughtspot/client/model/SortOptionTest.java @@ -0,0 +1,30 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client.model; + +import org.junit.jupiter.api.Test; + +/** Model tests for SortOption */ +public class SortOptionTest { + private final SortOption model = new SortOption(); + + /** Model tests for SortOption */ + @Test + public void testSortOption() { + // TODO: test SortOption + } + + /** Test the property 'fieldName' */ + @Test + public void fieldNameTest() { + // TODO: test fieldName + } + + /** Test the property 'order' */ + @Test + public void orderTest() { + // TODO: test order + } +} diff --git a/sdks/java/src/test/java/com/thoughtspot/client/model/SortOptionsTest.java b/sdks/java/src/test/java/com/thoughtspot/client/model/SortOptionsTest.java new file mode 100644 index 000000000..e875b6e4e --- /dev/null +++ b/sdks/java/src/test/java/com/thoughtspot/client/model/SortOptionsTest.java @@ -0,0 +1,30 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client.model; + +import org.junit.jupiter.api.Test; + +/** Model tests for SortOptions */ +public class SortOptionsTest { + private final SortOptions model = new SortOptions(); + + /** Model tests for SortOptions */ + @Test + public void testSortOptions() { + // TODO: test SortOptions + } + + /** Test the property 'fieldName' */ + @Test + public void fieldNameTest() { + // TODO: test fieldName + } + + /** Test the property 'order' */ + @Test + public void orderTest() { + // TODO: test order + } +} diff --git a/sdks/java/src/test/java/com/thoughtspot/client/model/SortingOptionsTest.java b/sdks/java/src/test/java/com/thoughtspot/client/model/SortingOptionsTest.java new file mode 100644 index 000000000..6b7c2b39a --- /dev/null +++ b/sdks/java/src/test/java/com/thoughtspot/client/model/SortingOptionsTest.java @@ -0,0 +1,30 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client.model; + +import org.junit.jupiter.api.Test; + +/** Model tests for SortingOptions */ +public class SortingOptionsTest { + private final SortingOptions model = new SortingOptions(); + + /** Model tests for SortingOptions */ + @Test + public void testSortingOptions() { + // TODO: test SortingOptions + } + + /** Test the property 'fieldName' */ + @Test + public void fieldNameTest() { + // TODO: test fieldName + } + + /** Test the property 'order' */ + @Test + public void orderTest() { + // TODO: test order + } +} diff --git a/sdks/java/src/test/java/com/thoughtspot/client/model/SqlQueryResponseTest.java b/sdks/java/src/test/java/com/thoughtspot/client/model/SqlQueryResponseTest.java new file mode 100644 index 000000000..9f1b14bc8 --- /dev/null +++ b/sdks/java/src/test/java/com/thoughtspot/client/model/SqlQueryResponseTest.java @@ -0,0 +1,42 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client.model; + +import org.junit.jupiter.api.Test; + +/** Model tests for SqlQueryResponse */ +public class SqlQueryResponseTest { + private final SqlQueryResponse model = new SqlQueryResponse(); + + /** Model tests for SqlQueryResponse */ + @Test + public void testSqlQueryResponse() { + // TODO: test SqlQueryResponse + } + + /** Test the property 'metadataId' */ + @Test + public void metadataIdTest() { + // TODO: test metadataId + } + + /** Test the property 'metadataName' */ + @Test + public void metadataNameTest() { + // TODO: test metadataName + } + + /** Test the property 'metadataType' */ + @Test + public void metadataTypeTest() { + // TODO: test metadataType + } + + /** Test the property 'sqlQueries' */ + @Test + public void sqlQueriesTest() { + // TODO: test sqlQueries + } +} diff --git a/sdks/java/src/test/java/com/thoughtspot/client/model/SqlQueryTest.java b/sdks/java/src/test/java/com/thoughtspot/client/model/SqlQueryTest.java new file mode 100644 index 000000000..de02b13df --- /dev/null +++ b/sdks/java/src/test/java/com/thoughtspot/client/model/SqlQueryTest.java @@ -0,0 +1,36 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client.model; + +import org.junit.jupiter.api.Test; + +/** Model tests for SqlQuery */ +public class SqlQueryTest { + private final SqlQuery model = new SqlQuery(); + + /** Model tests for SqlQuery */ + @Test + public void testSqlQuery() { + // TODO: test SqlQuery + } + + /** Test the property 'metadataId' */ + @Test + public void metadataIdTest() { + // TODO: test metadataId + } + + /** Test the property 'metadataName' */ + @Test + public void metadataNameTest() { + // TODO: test metadataName + } + + /** Test the property 'sqlQuery' */ + @Test + public void sqlQueryTest() { + // TODO: test sqlQuery + } +} diff --git a/sdks/java/src/test/java/com/thoughtspot/client/model/StorageConfigInputTest.java b/sdks/java/src/test/java/com/thoughtspot/client/model/StorageConfigInputTest.java new file mode 100644 index 000000000..f3fcbdcce --- /dev/null +++ b/sdks/java/src/test/java/com/thoughtspot/client/model/StorageConfigInputTest.java @@ -0,0 +1,24 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client.model; + +import org.junit.jupiter.api.Test; + +/** Model tests for StorageConfigInput */ +public class StorageConfigInputTest { + private final StorageConfigInput model = new StorageConfigInput(); + + /** Model tests for StorageConfigInput */ + @Test + public void testStorageConfigInput() { + // TODO: test StorageConfigInput + } + + /** Test the property 'awsS3Config' */ + @Test + public void awsS3ConfigTest() { + // TODO: test awsS3Config + } +} diff --git a/sdks/java/src/test/java/com/thoughtspot/client/model/StorageConfigTest.java b/sdks/java/src/test/java/com/thoughtspot/client/model/StorageConfigTest.java new file mode 100644 index 000000000..225435264 --- /dev/null +++ b/sdks/java/src/test/java/com/thoughtspot/client/model/StorageConfigTest.java @@ -0,0 +1,24 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client.model; + +import org.junit.jupiter.api.Test; + +/** Model tests for StorageConfig */ +public class StorageConfigTest { + private final StorageConfig model = new StorageConfig(); + + /** Model tests for StorageConfig */ + @Test + public void testStorageConfig() { + // TODO: test StorageConfig + } + + /** Test the property 'awsS3Config' */ + @Test + public void awsS3ConfigTest() { + // TODO: test awsS3Config + } +} diff --git a/sdks/java/src/test/java/com/thoughtspot/client/model/StorageDestinationInputTest.java b/sdks/java/src/test/java/com/thoughtspot/client/model/StorageDestinationInputTest.java new file mode 100644 index 000000000..a82cf75f0 --- /dev/null +++ b/sdks/java/src/test/java/com/thoughtspot/client/model/StorageDestinationInputTest.java @@ -0,0 +1,30 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client.model; + +import org.junit.jupiter.api.Test; + +/** Model tests for StorageDestinationInput */ +public class StorageDestinationInputTest { + private final StorageDestinationInput model = new StorageDestinationInput(); + + /** Model tests for StorageDestinationInput */ + @Test + public void testStorageDestinationInput() { + // TODO: test StorageDestinationInput + } + + /** Test the property 'storageType' */ + @Test + public void storageTypeTest() { + // TODO: test storageType + } + + /** Test the property 'storageConfig' */ + @Test + public void storageConfigTest() { + // TODO: test storageConfig + } +} diff --git a/sdks/java/src/test/java/com/thoughtspot/client/model/StorageDestinationTest.java b/sdks/java/src/test/java/com/thoughtspot/client/model/StorageDestinationTest.java new file mode 100644 index 000000000..3edfe1ccf --- /dev/null +++ b/sdks/java/src/test/java/com/thoughtspot/client/model/StorageDestinationTest.java @@ -0,0 +1,30 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client.model; + +import org.junit.jupiter.api.Test; + +/** Model tests for StorageDestination */ +public class StorageDestinationTest { + private final StorageDestination model = new StorageDestination(); + + /** Model tests for StorageDestination */ + @Test + public void testStorageDestination() { + // TODO: test StorageDestination + } + + /** Test the property 'storageType' */ + @Test + public void storageTypeTest() { + // TODO: test storageType + } + + /** Test the property 'storageConfig' */ + @Test + public void storageConfigTest() { + // TODO: test storageConfig + } +} diff --git a/sdks/java/src/test/java/com/thoughtspot/client/model/SyncMetadataRequestTest.java b/sdks/java/src/test/java/com/thoughtspot/client/model/SyncMetadataRequestTest.java new file mode 100644 index 000000000..f2f8a8fe5 --- /dev/null +++ b/sdks/java/src/test/java/com/thoughtspot/client/model/SyncMetadataRequestTest.java @@ -0,0 +1,30 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client.model; + +import org.junit.jupiter.api.Test; + +/** Model tests for SyncMetadataRequest */ +public class SyncMetadataRequestTest { + private final SyncMetadataRequest model = new SyncMetadataRequest(); + + /** Model tests for SyncMetadataRequest */ + @Test + public void testSyncMetadataRequest() { + // TODO: test SyncMetadataRequest + } + + /** Test the property 'tables' */ + @Test + public void tablesTest() { + // TODO: test tables + } + + /** Test the property 'syncAttributes' */ + @Test + public void syncAttributesTest() { + // TODO: test syncAttributes + } +} diff --git a/sdks/java/src/test/java/com/thoughtspot/client/model/SyncMetadataResponseTest.java b/sdks/java/src/test/java/com/thoughtspot/client/model/SyncMetadataResponseTest.java new file mode 100644 index 000000000..89c12ff4d --- /dev/null +++ b/sdks/java/src/test/java/com/thoughtspot/client/model/SyncMetadataResponseTest.java @@ -0,0 +1,54 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client.model; + +import org.junit.jupiter.api.Test; + +/** Model tests for SyncMetadataResponse */ +public class SyncMetadataResponseTest { + private final SyncMetadataResponse model = new SyncMetadataResponse(); + + /** Model tests for SyncMetadataResponse */ + @Test + public void testSyncMetadataResponse() { + // TODO: test SyncMetadataResponse + } + + /** Test the property 'status' */ + @Test + public void statusTest() { + // TODO: test status + } + + /** Test the property 'tablesUpdated' */ + @Test + public void tablesUpdatedTest() { + // TODO: test tablesUpdated + } + + /** Test the property 'columnsUpdated' */ + @Test + public void columnsUpdatedTest() { + // TODO: test columnsUpdated + } + + /** Test the property 'tablesFailed' */ + @Test + public void tablesFailedTest() { + // TODO: test tablesFailed + } + + /** Test the property 'columnsFailed' */ + @Test + public void columnsFailedTest() { + // TODO: test columnsFailed + } + + /** Test the property 'message' */ + @Test + public void messageTest() { + // TODO: test message + } +} diff --git a/sdks/java/src/test/java/com/thoughtspot/client/model/SystemConfigTest.java b/sdks/java/src/test/java/com/thoughtspot/client/model/SystemConfigTest.java new file mode 100644 index 000000000..1d32713cb --- /dev/null +++ b/sdks/java/src/test/java/com/thoughtspot/client/model/SystemConfigTest.java @@ -0,0 +1,36 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client.model; + +import org.junit.jupiter.api.Test; + +/** Model tests for SystemConfig */ +public class SystemConfigTest { + private final SystemConfig model = new SystemConfig(); + + /** Model tests for SystemConfig */ + @Test + public void testSystemConfig() { + // TODO: test SystemConfig + } + + /** Test the property 'onboardingContentUrl' */ + @Test + public void onboardingContentUrlTest() { + // TODO: test onboardingContentUrl + } + + /** Test the property 'samlEnabled' */ + @Test + public void samlEnabledTest() { + // TODO: test samlEnabled + } + + /** Test the property 'oktaEnabled' */ + @Test + public void oktaEnabledTest() { + // TODO: test oktaEnabled + } +} diff --git a/sdks/java/src/test/java/com/thoughtspot/client/model/SystemInfoTest.java b/sdks/java/src/test/java/com/thoughtspot/client/model/SystemInfoTest.java new file mode 100644 index 000000000..015a1c84d --- /dev/null +++ b/sdks/java/src/test/java/com/thoughtspot/client/model/SystemInfoTest.java @@ -0,0 +1,156 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client.model; + +import org.junit.jupiter.api.Test; + +/** Model tests for SystemInfo */ +public class SystemInfoTest { + private final SystemInfo model = new SystemInfo(); + + /** Model tests for SystemInfo */ + @Test + public void testSystemInfo() { + // TODO: test SystemInfo + } + + /** Test the property 'id' */ + @Test + public void idTest() { + // TODO: test id + } + + /** Test the property 'name' */ + @Test + public void nameTest() { + // TODO: test name + } + + /** Test the property 'releaseVersion' */ + @Test + public void releaseVersionTest() { + // TODO: test releaseVersion + } + + /** Test the property 'timeZone' */ + @Test + public void timeZoneTest() { + // TODO: test timeZone + } + + /** Test the property 'locale' */ + @Test + public void localeTest() { + // TODO: test locale + } + + /** Test the property 'dateFormat' */ + @Test + public void dateFormatTest() { + // TODO: test dateFormat + } + + /** Test the property 'apiVersion' */ + @Test + public void apiVersionTest() { + // TODO: test apiVersion + } + + /** Test the property 'type' */ + @Test + public void typeTest() { + // TODO: test type + } + + /** Test the property 'environment' */ + @Test + public void environmentTest() { + // TODO: test environment + } + + /** Test the property 'license' */ + @Test + public void licenseTest() { + // TODO: test license + } + + /** Test the property 'dateTimeFormat' */ + @Test + public void dateTimeFormatTest() { + // TODO: test dateTimeFormat + } + + /** Test the property 'timeFormat' */ + @Test + public void timeFormatTest() { + // TODO: test timeFormat + } + + /** Test the property 'systemUserId' */ + @Test + public void systemUserIdTest() { + // TODO: test systemUserId + } + + /** Test the property 'superUserId' */ + @Test + public void superUserIdTest() { + // TODO: test superUserId + } + + /** Test the property 'hiddenObjectId' */ + @Test + public void hiddenObjectIdTest() { + // TODO: test hiddenObjectId + } + + /** Test the property 'systemGroupId' */ + @Test + public void systemGroupIdTest() { + // TODO: test systemGroupId + } + + /** Test the property 'tsadminUserId' */ + @Test + public void tsadminUserIdTest() { + // TODO: test tsadminUserId + } + + /** Test the property 'adminGroupId' */ + @Test + public void adminGroupIdTest() { + // TODO: test adminGroupId + } + + /** Test the property 'allTablesConnectionId' */ + @Test + public void allTablesConnectionIdTest() { + // TODO: test allTablesConnectionId + } + + /** Test the property 'allUserGroupId' */ + @Test + public void allUserGroupIdTest() { + // TODO: test allUserGroupId + } + + /** Test the property 'acceptLanguage' */ + @Test + public void acceptLanguageTest() { + // TODO: test acceptLanguage + } + + /** Test the property 'allUserGroupMemberUserCount' */ + @Test + public void allUserGroupMemberUserCountTest() { + // TODO: test allUserGroupMemberUserCount + } + + /** Test the property 'logicalModelVersion' */ + @Test + public void logicalModelVersionTest() { + // TODO: test logicalModelVersion + } +} diff --git a/sdks/java/src/test/java/com/thoughtspot/client/model/SystemOverrideInfoTest.java b/sdks/java/src/test/java/com/thoughtspot/client/model/SystemOverrideInfoTest.java new file mode 100644 index 000000000..939a5cedc --- /dev/null +++ b/sdks/java/src/test/java/com/thoughtspot/client/model/SystemOverrideInfoTest.java @@ -0,0 +1,24 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client.model; + +import org.junit.jupiter.api.Test; + +/** Model tests for SystemOverrideInfo */ +public class SystemOverrideInfoTest { + private final SystemOverrideInfo model = new SystemOverrideInfo(); + + /** Model tests for SystemOverrideInfo */ + @Test + public void testSystemOverrideInfo() { + // TODO: test SystemOverrideInfo + } + + /** Test the property 'configOverrideInfo' */ + @Test + public void configOverrideInfoTest() { + // TODO: test configOverrideInfo + } +} diff --git a/sdks/java/src/test/java/com/thoughtspot/client/model/TableTest.java b/sdks/java/src/test/java/com/thoughtspot/client/model/TableTest.java new file mode 100644 index 000000000..b012110dd --- /dev/null +++ b/sdks/java/src/test/java/com/thoughtspot/client/model/TableTest.java @@ -0,0 +1,60 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client.model; + +import org.junit.jupiter.api.Test; + +/** Model tests for Table */ +public class TableTest { + private final Table model = new Table(); + + /** Model tests for Table */ + @Test + public void testTable() { + // TODO: test Table + } + + /** Test the property 'name' */ + @Test + public void nameTest() { + // TODO: test name + } + + /** Test the property 'columns' */ + @Test + public void columnsTest() { + // TODO: test columns + } + + /** Test the property 'type' */ + @Test + public void typeTest() { + // TODO: test type + } + + /** Test the property 'description' */ + @Test + public void descriptionTest() { + // TODO: test description + } + + /** Test the property 'selected' */ + @Test + public void selectedTest() { + // TODO: test selected + } + + /** Test the property 'linked' */ + @Test + public void linkedTest() { + // TODO: test linked + } + + /** Test the property 'relationships' */ + @Test + public void relationshipsTest() { + // TODO: test relationships + } +} diff --git a/sdks/java/src/test/java/com/thoughtspot/client/model/TagMetadataTypeInputTest.java b/sdks/java/src/test/java/com/thoughtspot/client/model/TagMetadataTypeInputTest.java new file mode 100644 index 000000000..61d972459 --- /dev/null +++ b/sdks/java/src/test/java/com/thoughtspot/client/model/TagMetadataTypeInputTest.java @@ -0,0 +1,30 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client.model; + +import org.junit.jupiter.api.Test; + +/** Model tests for TagMetadataTypeInput */ +public class TagMetadataTypeInputTest { + private final TagMetadataTypeInput model = new TagMetadataTypeInput(); + + /** Model tests for TagMetadataTypeInput */ + @Test + public void testTagMetadataTypeInput() { + // TODO: test TagMetadataTypeInput + } + + /** Test the property 'type' */ + @Test + public void typeTest() { + // TODO: test type + } + + /** Test the property 'identifier' */ + @Test + public void identifierTest() { + // TODO: test identifier + } +} diff --git a/sdks/java/src/test/java/com/thoughtspot/client/model/TagTest.java b/sdks/java/src/test/java/com/thoughtspot/client/model/TagTest.java new file mode 100644 index 000000000..0f4cd786c --- /dev/null +++ b/sdks/java/src/test/java/com/thoughtspot/client/model/TagTest.java @@ -0,0 +1,90 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client.model; + +import org.junit.jupiter.api.Test; + +/** Model tests for Tag */ +public class TagTest { + private final Tag model = new Tag(); + + /** Model tests for Tag */ + @Test + public void testTag() { + // TODO: test Tag + } + + /** Test the property 'name' */ + @Test + public void nameTest() { + // TODO: test name + } + + /** Test the property 'id' */ + @Test + public void idTest() { + // TODO: test id + } + + /** Test the property 'color' */ + @Test + public void colorTest() { + // TODO: test color + } + + /** Test the property 'deleted' */ + @Test + public void deletedTest() { + // TODO: test deleted + } + + /** Test the property 'hidden' */ + @Test + public void hiddenTest() { + // TODO: test hidden + } + + /** Test the property 'external' */ + @Test + public void externalTest() { + // TODO: test external + } + + /** Test the property 'deprecated' */ + @Test + public void deprecatedTest() { + // TODO: test deprecated + } + + /** Test the property 'creationTimeInMillis' */ + @Test + public void creationTimeInMillisTest() { + // TODO: test creationTimeInMillis + } + + /** Test the property 'modificationTimeInMillis' */ + @Test + public void modificationTimeInMillisTest() { + // TODO: test modificationTimeInMillis + } + + /** Test the property 'authorId' */ + @Test + public void authorIdTest() { + // TODO: test authorId + } + + /** Test the property 'modifierId' */ + @Test + public void modifierIdTest() { + // TODO: test modifierId + } + + /** Test the property 'ownerId' */ + @Test + public void ownerIdTest() { + // TODO: test ownerId + } +} diff --git a/sdks/java/src/test/java/com/thoughtspot/client/model/TemplatePropertiesInputCreateTest.java b/sdks/java/src/test/java/com/thoughtspot/client/model/TemplatePropertiesInputCreateTest.java new file mode 100644 index 000000000..bae57e288 --- /dev/null +++ b/sdks/java/src/test/java/com/thoughtspot/client/model/TemplatePropertiesInputCreateTest.java @@ -0,0 +1,186 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client.model; + +import org.junit.jupiter.api.Test; + +/** Model tests for TemplatePropertiesInputCreate */ +public class TemplatePropertiesInputCreateTest { + private final TemplatePropertiesInputCreate model = new TemplatePropertiesInputCreate(); + + /** Model tests for TemplatePropertiesInputCreate */ + @Test + public void testTemplatePropertiesInputCreate() { + // TODO: test TemplatePropertiesInputCreate + } + + /** Test the property 'ctaButtonBgColor' */ + @Test + public void ctaButtonBgColorTest() { + // TODO: test ctaButtonBgColor + } + + /** Test the property 'ctaTextFontColor' */ + @Test + public void ctaTextFontColorTest() { + // TODO: test ctaTextFontColor + } + + /** Test the property 'primaryBgColor' */ + @Test + public void primaryBgColorTest() { + // TODO: test primaryBgColor + } + + /** Test the property 'homeUrl' */ + @Test + public void homeUrlTest() { + // TODO: test homeUrl + } + + /** Test the property 'logoUrl' */ + @Test + public void logoUrlTest() { + // TODO: test logoUrl + } + + /** Test the property 'fontFamily' */ + @Test + public void fontFamilyTest() { + // TODO: test fontFamily + } + + /** Test the property 'productName' */ + @Test + public void productNameTest() { + // TODO: test productName + } + + /** Test the property 'footerAddress' */ + @Test + public void footerAddressTest() { + // TODO: test footerAddress + } + + /** Test the property 'footerPhone' */ + @Test + public void footerPhoneTest() { + // TODO: test footerPhone + } + + /** Test the property 'replacementValueForLiveboard' */ + @Test + public void replacementValueForLiveboardTest() { + // TODO: test replacementValueForLiveboard + } + + /** Test the property 'replacementValueForAnswer' */ + @Test + public void replacementValueForAnswerTest() { + // TODO: test replacementValueForAnswer + } + + /** Test the property 'replacementValueForSpotIq' */ + @Test + public void replacementValueForSpotIqTest() { + // TODO: test replacementValueForSpotIq + } + + /** Test the property 'hideFooterAddress' */ + @Test + public void hideFooterAddressTest() { + // TODO: test hideFooterAddress + } + + /** Test the property 'hideFooterPhone' */ + @Test + public void hideFooterPhoneTest() { + // TODO: test hideFooterPhone + } + + /** Test the property 'hideManageNotification' */ + @Test + public void hideManageNotificationTest() { + // TODO: test hideManageNotification + } + + /** Test the property 'hideMobileAppNudge' */ + @Test + public void hideMobileAppNudgeTest() { + // TODO: test hideMobileAppNudge + } + + /** Test the property 'hidePrivacyPolicy' */ + @Test + public void hidePrivacyPolicyTest() { + // TODO: test hidePrivacyPolicy + } + + /** Test the property 'hideProductName' */ + @Test + public void hideProductNameTest() { + // TODO: test hideProductName + } + + /** Test the property 'hideTsVocabularyDefinitions' */ + @Test + public void hideTsVocabularyDefinitionsTest() { + // TODO: test hideTsVocabularyDefinitions + } + + /** Test the property 'hideNotificationStatus' */ + @Test + public void hideNotificationStatusTest() { + // TODO: test hideNotificationStatus + } + + /** Test the property 'hideErrorMessage' */ + @Test + public void hideErrorMessageTest() { + // TODO: test hideErrorMessage + } + + /** Test the property 'hideUnsubscribeLink' */ + @Test + public void hideUnsubscribeLinkTest() { + // TODO: test hideUnsubscribeLink + } + + /** Test the property 'hideModifyAlert' */ + @Test + public void hideModifyAlertTest() { + // TODO: test hideModifyAlert + } + + /** Test the property 'companyPrivacyPolicyUrl' */ + @Test + public void companyPrivacyPolicyUrlTest() { + // TODO: test companyPrivacyPolicyUrl + } + + /** Test the property 'companyWebsiteUrl' */ + @Test + public void companyWebsiteUrlTest() { + // TODO: test companyWebsiteUrl + } + + /** Test the property 'contactSupportUrl' */ + @Test + public void contactSupportUrlTest() { + // TODO: test contactSupportUrl + } + + /** Test the property 'hideContactSupportUrl' */ + @Test + public void hideContactSupportUrlTest() { + // TODO: test hideContactSupportUrl + } + + /** Test the property 'hideLogoUrl' */ + @Test + public void hideLogoUrlTest() { + // TODO: test hideLogoUrl + } +} diff --git a/sdks/java/src/test/java/com/thoughtspot/client/model/TokenAccessScopeObjectTest.java b/sdks/java/src/test/java/com/thoughtspot/client/model/TokenAccessScopeObjectTest.java new file mode 100644 index 000000000..1c60be796 --- /dev/null +++ b/sdks/java/src/test/java/com/thoughtspot/client/model/TokenAccessScopeObjectTest.java @@ -0,0 +1,30 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client.model; + +import org.junit.jupiter.api.Test; + +/** Model tests for TokenAccessScopeObject */ +public class TokenAccessScopeObjectTest { + private final TokenAccessScopeObject model = new TokenAccessScopeObject(); + + /** Model tests for TokenAccessScopeObject */ + @Test + public void testTokenAccessScopeObject() { + // TODO: test TokenAccessScopeObject + } + + /** Test the property 'type' */ + @Test + public void typeTest() { + // TODO: test type + } + + /** Test the property 'identifier' */ + @Test + public void identifierTest() { + // TODO: test identifier + } +} diff --git a/sdks/java/src/test/java/com/thoughtspot/client/model/TokenTest.java b/sdks/java/src/test/java/com/thoughtspot/client/model/TokenTest.java new file mode 100644 index 000000000..30062a873 --- /dev/null +++ b/sdks/java/src/test/java/com/thoughtspot/client/model/TokenTest.java @@ -0,0 +1,54 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client.model; + +import org.junit.jupiter.api.Test; + +/** Model tests for Token */ +public class TokenTest { + private final Token model = new Token(); + + /** Model tests for Token */ + @Test + public void testToken() { + // TODO: test Token + } + + /** Test the property 'token' */ + @Test + public void tokenTest() { + // TODO: test token + } + + /** Test the property 'creationTimeInMillis' */ + @Test + public void creationTimeInMillisTest() { + // TODO: test creationTimeInMillis + } + + /** Test the property 'expirationTimeInMillis' */ + @Test + public void expirationTimeInMillisTest() { + // TODO: test expirationTimeInMillis + } + + /** Test the property 'scope' */ + @Test + public void scopeTest() { + // TODO: test scope + } + + /** Test the property 'validForUserId' */ + @Test + public void validForUserIdTest() { + // TODO: test validForUserId + } + + /** Test the property 'validForUsername' */ + @Test + public void validForUsernameTest() { + // TODO: test validForUsername + } +} diff --git a/sdks/java/src/test/java/com/thoughtspot/client/model/TokenValidationResponseTest.java b/sdks/java/src/test/java/com/thoughtspot/client/model/TokenValidationResponseTest.java new file mode 100644 index 000000000..b0ee9aba0 --- /dev/null +++ b/sdks/java/src/test/java/com/thoughtspot/client/model/TokenValidationResponseTest.java @@ -0,0 +1,48 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client.model; + +import org.junit.jupiter.api.Test; + +/** Model tests for TokenValidationResponse */ +public class TokenValidationResponseTest { + private final TokenValidationResponse model = new TokenValidationResponse(); + + /** Model tests for TokenValidationResponse */ + @Test + public void testTokenValidationResponse() { + // TODO: test TokenValidationResponse + } + + /** Test the property 'creationTimeInMillis' */ + @Test + public void creationTimeInMillisTest() { + // TODO: test creationTimeInMillis + } + + /** Test the property 'expirationTimeInMillis' */ + @Test + public void expirationTimeInMillisTest() { + // TODO: test expirationTimeInMillis + } + + /** Test the property 'scope' */ + @Test + public void scopeTest() { + // TODO: test scope + } + + /** Test the property 'validForUserId' */ + @Test + public void validForUserIdTest() { + // TODO: test validForUserId + } + + /** Test the property 'tokenType' */ + @Test + public void tokenTypeTest() { + // TODO: test tokenType + } +} diff --git a/sdks/java/src/test/java/com/thoughtspot/client/model/URLInputMandatoryTest.java b/sdks/java/src/test/java/com/thoughtspot/client/model/URLInputMandatoryTest.java new file mode 100644 index 000000000..274d5d5ae --- /dev/null +++ b/sdks/java/src/test/java/com/thoughtspot/client/model/URLInputMandatoryTest.java @@ -0,0 +1,42 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client.model; + +import org.junit.jupiter.api.Test; + +/** Model tests for URLInputMandatory */ +public class URLInputMandatoryTest { + private final URLInputMandatory model = new URLInputMandatory(); + + /** Model tests for URLInputMandatory */ + @Test + public void testURLInputMandatory() { + // TODO: test URLInputMandatory + } + + /** Test the property 'authentication' */ + @Test + public void authenticationTest() { + // TODO: test authentication + } + + /** Test the property 'parameters' */ + @Test + public void parametersTest() { + // TODO: test parameters + } + + /** Test the property 'url' */ + @Test + public void urlTest() { + // TODO: test url + } + + /** Test the property 'reference' */ + @Test + public void referenceTest() { + // TODO: test reference + } +} diff --git a/sdks/java/src/test/java/com/thoughtspot/client/model/URLInputTest.java b/sdks/java/src/test/java/com/thoughtspot/client/model/URLInputTest.java new file mode 100644 index 000000000..5aa0bfaa8 --- /dev/null +++ b/sdks/java/src/test/java/com/thoughtspot/client/model/URLInputTest.java @@ -0,0 +1,42 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client.model; + +import org.junit.jupiter.api.Test; + +/** Model tests for URLInput */ +public class URLInputTest { + private final URLInput model = new URLInput(); + + /** Model tests for URLInput */ + @Test + public void testURLInput() { + // TODO: test URLInput + } + + /** Test the property 'authentication' */ + @Test + public void authenticationTest() { + // TODO: test authentication + } + + /** Test the property 'parameters' */ + @Test + public void parametersTest() { + // TODO: test parameters + } + + /** Test the property 'url' */ + @Test + public void urlTest() { + // TODO: test url + } + + /** Test the property 'reference' */ + @Test + public void referenceTest() { + // TODO: test reference + } +} diff --git a/sdks/java/src/test/java/com/thoughtspot/client/model/URLTest.java b/sdks/java/src/test/java/com/thoughtspot/client/model/URLTest.java new file mode 100644 index 000000000..0aee46a67 --- /dev/null +++ b/sdks/java/src/test/java/com/thoughtspot/client/model/URLTest.java @@ -0,0 +1,42 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client.model; + +import org.junit.jupiter.api.Test; + +/** Model tests for URL */ +public class URLTest { + private final URL model = new URL(); + + /** Model tests for URL */ + @Test + public void testURL() { + // TODO: test URL + } + + /** Test the property 'authentication' */ + @Test + public void authenticationTest() { + // TODO: test authentication + } + + /** Test the property 'parameters' */ + @Test + public void parametersTest() { + // TODO: test parameters + } + + /** Test the property 'url' */ + @Test + public void urlTest() { + // TODO: test url + } + + /** Test the property 'reference' */ + @Test + public void referenceTest() { + // TODO: test reference + } +} diff --git a/sdks/java/src/test/java/com/thoughtspot/client/model/UnassignTagRequestTest.java b/sdks/java/src/test/java/com/thoughtspot/client/model/UnassignTagRequestTest.java new file mode 100644 index 000000000..1b954ade2 --- /dev/null +++ b/sdks/java/src/test/java/com/thoughtspot/client/model/UnassignTagRequestTest.java @@ -0,0 +1,30 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client.model; + +import org.junit.jupiter.api.Test; + +/** Model tests for UnassignTagRequest */ +public class UnassignTagRequestTest { + private final UnassignTagRequest model = new UnassignTagRequest(); + + /** Model tests for UnassignTagRequest */ + @Test + public void testUnassignTagRequest() { + // TODO: test UnassignTagRequest + } + + /** Test the property 'metadata' */ + @Test + public void metadataTest() { + // TODO: test metadata + } + + /** Test the property 'tagIdentifiers' */ + @Test + public void tagIdentifiersTest() { + // TODO: test tagIdentifiers + } +} diff --git a/sdks/java/src/test/java/com/thoughtspot/client/model/UnparameterizeMetadataRequestTest.java b/sdks/java/src/test/java/com/thoughtspot/client/model/UnparameterizeMetadataRequestTest.java new file mode 100644 index 000000000..c6edf9aed --- /dev/null +++ b/sdks/java/src/test/java/com/thoughtspot/client/model/UnparameterizeMetadataRequestTest.java @@ -0,0 +1,48 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client.model; + +import org.junit.jupiter.api.Test; + +/** Model tests for UnparameterizeMetadataRequest */ +public class UnparameterizeMetadataRequestTest { + private final UnparameterizeMetadataRequest model = new UnparameterizeMetadataRequest(); + + /** Model tests for UnparameterizeMetadataRequest */ + @Test + public void testUnparameterizeMetadataRequest() { + // TODO: test UnparameterizeMetadataRequest + } + + /** Test the property 'metadataType' */ + @Test + public void metadataTypeTest() { + // TODO: test metadataType + } + + /** Test the property 'metadataIdentifier' */ + @Test + public void metadataIdentifierTest() { + // TODO: test metadataIdentifier + } + + /** Test the property 'fieldType' */ + @Test + public void fieldTypeTest() { + // TODO: test fieldType + } + + /** Test the property 'fieldName' */ + @Test + public void fieldNameTest() { + // TODO: test fieldName + } + + /** Test the property 'value' */ + @Test + public void valueTest() { + // TODO: test value + } +} diff --git a/sdks/java/src/test/java/com/thoughtspot/client/model/UnpublishMetadataRequestTest.java b/sdks/java/src/test/java/com/thoughtspot/client/model/UnpublishMetadataRequestTest.java new file mode 100644 index 000000000..970095a6c --- /dev/null +++ b/sdks/java/src/test/java/com/thoughtspot/client/model/UnpublishMetadataRequestTest.java @@ -0,0 +1,42 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client.model; + +import org.junit.jupiter.api.Test; + +/** Model tests for UnpublishMetadataRequest */ +public class UnpublishMetadataRequestTest { + private final UnpublishMetadataRequest model = new UnpublishMetadataRequest(); + + /** Model tests for UnpublishMetadataRequest */ + @Test + public void testUnpublishMetadataRequest() { + // TODO: test UnpublishMetadataRequest + } + + /** Test the property 'force' */ + @Test + public void forceTest() { + // TODO: test force + } + + /** Test the property 'includeDependencies' */ + @Test + public void includeDependenciesTest() { + // TODO: test includeDependencies + } + + /** Test the property 'metadata' */ + @Test + public void metadataTest() { + // TODO: test metadata + } + + /** Test the property 'orgIdentifiers' */ + @Test + public void orgIdentifiersTest() { + // TODO: test orgIdentifiers + } +} diff --git a/sdks/java/src/test/java/com/thoughtspot/client/model/UpdateCalendarRequestTest.java b/sdks/java/src/test/java/com/thoughtspot/client/model/UpdateCalendarRequestTest.java new file mode 100644 index 000000000..5562cbbd1 --- /dev/null +++ b/sdks/java/src/test/java/com/thoughtspot/client/model/UpdateCalendarRequestTest.java @@ -0,0 +1,72 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client.model; + +import org.junit.jupiter.api.Test; + +/** Model tests for UpdateCalendarRequest */ +public class UpdateCalendarRequestTest { + private final UpdateCalendarRequest model = new UpdateCalendarRequest(); + + /** Model tests for UpdateCalendarRequest */ + @Test + public void testUpdateCalendarRequest() { + // TODO: test UpdateCalendarRequest + } + + /** Test the property 'updateMethod' */ + @Test + public void updateMethodTest() { + // TODO: test updateMethod + } + + /** Test the property 'tableReference' */ + @Test + public void tableReferenceTest() { + // TODO: test tableReference + } + + /** Test the property 'startDate' */ + @Test + public void startDateTest() { + // TODO: test startDate + } + + /** Test the property 'endDate' */ + @Test + public void endDateTest() { + // TODO: test endDate + } + + /** Test the property 'calendarType' */ + @Test + public void calendarTypeTest() { + // TODO: test calendarType + } + + /** Test the property 'monthOffset' */ + @Test + public void monthOffsetTest() { + // TODO: test monthOffset + } + + /** Test the property 'startDayOfWeek' */ + @Test + public void startDayOfWeekTest() { + // TODO: test startDayOfWeek + } + + /** Test the property 'quarterNamePrefix' */ + @Test + public void quarterNamePrefixTest() { + // TODO: test quarterNamePrefix + } + + /** Test the property 'yearNamePrefix' */ + @Test + public void yearNamePrefixTest() { + // TODO: test yearNamePrefix + } +} diff --git a/sdks/java/src/test/java/com/thoughtspot/client/model/UpdateCollectionRequestTest.java b/sdks/java/src/test/java/com/thoughtspot/client/model/UpdateCollectionRequestTest.java new file mode 100644 index 000000000..7cb04129a --- /dev/null +++ b/sdks/java/src/test/java/com/thoughtspot/client/model/UpdateCollectionRequestTest.java @@ -0,0 +1,42 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client.model; + +import org.junit.jupiter.api.Test; + +/** Model tests for UpdateCollectionRequest */ +public class UpdateCollectionRequestTest { + private final UpdateCollectionRequest model = new UpdateCollectionRequest(); + + /** Model tests for UpdateCollectionRequest */ + @Test + public void testUpdateCollectionRequest() { + // TODO: test UpdateCollectionRequest + } + + /** Test the property 'name' */ + @Test + public void nameTest() { + // TODO: test name + } + + /** Test the property 'description' */ + @Test + public void descriptionTest() { + // TODO: test description + } + + /** Test the property 'metadata' */ + @Test + public void metadataTest() { + // TODO: test metadata + } + + /** Test the property 'operation' */ + @Test + public void operationTest() { + // TODO: test operation + } +} diff --git a/sdks/java/src/test/java/com/thoughtspot/client/model/UpdateColumnSecurityRulesRequestTest.java b/sdks/java/src/test/java/com/thoughtspot/client/model/UpdateColumnSecurityRulesRequestTest.java new file mode 100644 index 000000000..1cbb89dca --- /dev/null +++ b/sdks/java/src/test/java/com/thoughtspot/client/model/UpdateColumnSecurityRulesRequestTest.java @@ -0,0 +1,42 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client.model; + +import org.junit.jupiter.api.Test; + +/** Model tests for UpdateColumnSecurityRulesRequest */ +public class UpdateColumnSecurityRulesRequestTest { + private final UpdateColumnSecurityRulesRequest model = new UpdateColumnSecurityRulesRequest(); + + /** Model tests for UpdateColumnSecurityRulesRequest */ + @Test + public void testUpdateColumnSecurityRulesRequest() { + // TODO: test UpdateColumnSecurityRulesRequest + } + + /** Test the property 'identifier' */ + @Test + public void identifierTest() { + // TODO: test identifier + } + + /** Test the property 'objIdentifier' */ + @Test + public void objIdentifierTest() { + // TODO: test objIdentifier + } + + /** Test the property 'clearCsr' */ + @Test + public void clearCsrTest() { + // TODO: test clearCsr + } + + /** Test the property 'columnSecurityRules' */ + @Test + public void columnSecurityRulesTest() { + // TODO: test columnSecurityRules + } +} diff --git a/sdks/java/src/test/java/com/thoughtspot/client/model/UpdateConfigRequestTest.java b/sdks/java/src/test/java/com/thoughtspot/client/model/UpdateConfigRequestTest.java new file mode 100644 index 000000000..1581fecdc --- /dev/null +++ b/sdks/java/src/test/java/com/thoughtspot/client/model/UpdateConfigRequestTest.java @@ -0,0 +1,60 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client.model; + +import org.junit.jupiter.api.Test; + +/** Model tests for UpdateConfigRequest */ +public class UpdateConfigRequestTest { + private final UpdateConfigRequest model = new UpdateConfigRequest(); + + /** Model tests for UpdateConfigRequest */ + @Test + public void testUpdateConfigRequest() { + // TODO: test UpdateConfigRequest + } + + /** Test the property 'username' */ + @Test + public void usernameTest() { + // TODO: test username + } + + /** Test the property 'accessToken' */ + @Test + public void accessTokenTest() { + // TODO: test accessToken + } + + /** Test the property 'orgIdentifier' */ + @Test + public void orgIdentifierTest() { + // TODO: test orgIdentifier + } + + /** Test the property 'branchNames' */ + @Test + public void branchNamesTest() { + // TODO: test branchNames + } + + /** Test the property 'commitBranchName' */ + @Test + public void commitBranchNameTest() { + // TODO: test commitBranchName + } + + /** Test the property 'enableGuidMapping' */ + @Test + public void enableGuidMappingTest() { + // TODO: test enableGuidMapping + } + + /** Test the property 'configurationBranchName' */ + @Test + public void configurationBranchNameTest() { + // TODO: test configurationBranchName + } +} diff --git a/sdks/java/src/test/java/com/thoughtspot/client/model/UpdateConnectionConfigurationRequestTest.java b/sdks/java/src/test/java/com/thoughtspot/client/model/UpdateConnectionConfigurationRequestTest.java new file mode 100644 index 000000000..b76f95516 --- /dev/null +++ b/sdks/java/src/test/java/com/thoughtspot/client/model/UpdateConnectionConfigurationRequestTest.java @@ -0,0 +1,85 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client.model; + +import org.junit.jupiter.api.Test; + +/** Model tests for UpdateConnectionConfigurationRequest */ +public class UpdateConnectionConfigurationRequestTest { + private final UpdateConnectionConfigurationRequest model = + new UpdateConnectionConfigurationRequest(); + + /** Model tests for UpdateConnectionConfigurationRequest */ + @Test + public void testUpdateConnectionConfigurationRequest() { + // TODO: test UpdateConnectionConfigurationRequest + } + + /** Test the property 'connectionIdentifier' */ + @Test + public void connectionIdentifierTest() { + // TODO: test connectionIdentifier + } + + /** Test the property 'name' */ + @Test + public void nameTest() { + // TODO: test name + } + + /** Test the property 'description' */ + @Test + public void descriptionTest() { + // TODO: test description + } + + /** Test the property 'sameAsParent' */ + @Test + public void sameAsParentTest() { + // TODO: test sameAsParent + } + + /** Test the property 'policyProcessOptions' */ + @Test + public void policyProcessOptionsTest() { + // TODO: test policyProcessOptions + } + + /** Test the property 'authenticationType' */ + @Test + public void authenticationTypeTest() { + // TODO: test authenticationType + } + + /** Test the property '_configuration' */ + @Test + public void _configurationTest() { + // TODO: test _configuration + } + + /** Test the property 'policyType' */ + @Test + public void policyTypeTest() { + // TODO: test policyType + } + + /** Test the property 'policyPrincipals' */ + @Test + public void policyPrincipalsTest() { + // TODO: test policyPrincipals + } + + /** Test the property 'policyProcesses' */ + @Test + public void policyProcessesTest() { + // TODO: test policyProcesses + } + + /** Test the property 'disable' */ + @Test + public void disableTest() { + // TODO: test disable + } +} diff --git a/sdks/java/src/test/java/com/thoughtspot/client/model/UpdateConnectionRequestTest.java b/sdks/java/src/test/java/com/thoughtspot/client/model/UpdateConnectionRequestTest.java new file mode 100644 index 000000000..20deb9ee1 --- /dev/null +++ b/sdks/java/src/test/java/com/thoughtspot/client/model/UpdateConnectionRequestTest.java @@ -0,0 +1,48 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client.model; + +import org.junit.jupiter.api.Test; + +/** Model tests for UpdateConnectionRequest */ +public class UpdateConnectionRequestTest { + private final UpdateConnectionRequest model = new UpdateConnectionRequest(); + + /** Model tests for UpdateConnectionRequest */ + @Test + public void testUpdateConnectionRequest() { + // TODO: test UpdateConnectionRequest + } + + /** Test the property 'connectionIdentifier' */ + @Test + public void connectionIdentifierTest() { + // TODO: test connectionIdentifier + } + + /** Test the property 'name' */ + @Test + public void nameTest() { + // TODO: test name + } + + /** Test the property 'description' */ + @Test + public void descriptionTest() { + // TODO: test description + } + + /** Test the property 'dataWarehouseConfig' */ + @Test + public void dataWarehouseConfigTest() { + // TODO: test dataWarehouseConfig + } + + /** Test the property 'validate' */ + @Test + public void validateTest() { + // TODO: test validate + } +} diff --git a/sdks/java/src/test/java/com/thoughtspot/client/model/UpdateConnectionStatusRequestTest.java b/sdks/java/src/test/java/com/thoughtspot/client/model/UpdateConnectionStatusRequestTest.java new file mode 100644 index 000000000..9c4c0776e --- /dev/null +++ b/sdks/java/src/test/java/com/thoughtspot/client/model/UpdateConnectionStatusRequestTest.java @@ -0,0 +1,24 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client.model; + +import org.junit.jupiter.api.Test; + +/** Model tests for UpdateConnectionStatusRequest */ +public class UpdateConnectionStatusRequestTest { + private final UpdateConnectionStatusRequest model = new UpdateConnectionStatusRequest(); + + /** Model tests for UpdateConnectionStatusRequest */ + @Test + public void testUpdateConnectionStatusRequest() { + // TODO: test UpdateConnectionStatusRequest + } + + /** Test the property 'status' */ + @Test + public void statusTest() { + // TODO: test status + } +} diff --git a/sdks/java/src/test/java/com/thoughtspot/client/model/UpdateConnectionV2RequestTest.java b/sdks/java/src/test/java/com/thoughtspot/client/model/UpdateConnectionV2RequestTest.java new file mode 100644 index 000000000..6cd75972f --- /dev/null +++ b/sdks/java/src/test/java/com/thoughtspot/client/model/UpdateConnectionV2RequestTest.java @@ -0,0 +1,42 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client.model; + +import org.junit.jupiter.api.Test; + +/** Model tests for UpdateConnectionV2Request */ +public class UpdateConnectionV2RequestTest { + private final UpdateConnectionV2Request model = new UpdateConnectionV2Request(); + + /** Model tests for UpdateConnectionV2Request */ + @Test + public void testUpdateConnectionV2Request() { + // TODO: test UpdateConnectionV2Request + } + + /** Test the property 'name' */ + @Test + public void nameTest() { + // TODO: test name + } + + /** Test the property 'description' */ + @Test + public void descriptionTest() { + // TODO: test description + } + + /** Test the property 'dataWarehouseConfig' */ + @Test + public void dataWarehouseConfigTest() { + // TODO: test dataWarehouseConfig + } + + /** Test the property 'validate' */ + @Test + public void validateTest() { + // TODO: test validate + } +} diff --git a/sdks/java/src/test/java/com/thoughtspot/client/model/UpdateCustomActionRequestTest.java b/sdks/java/src/test/java/com/thoughtspot/client/model/UpdateCustomActionRequestTest.java new file mode 100644 index 000000000..23f080962 --- /dev/null +++ b/sdks/java/src/test/java/com/thoughtspot/client/model/UpdateCustomActionRequestTest.java @@ -0,0 +1,54 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client.model; + +import org.junit.jupiter.api.Test; + +/** Model tests for UpdateCustomActionRequest */ +public class UpdateCustomActionRequestTest { + private final UpdateCustomActionRequest model = new UpdateCustomActionRequest(); + + /** Model tests for UpdateCustomActionRequest */ + @Test + public void testUpdateCustomActionRequest() { + // TODO: test UpdateCustomActionRequest + } + + /** Test the property 'actionDetails' */ + @Test + public void actionDetailsTest() { + // TODO: test actionDetails + } + + /** Test the property 'associateMetadata' */ + @Test + public void associateMetadataTest() { + // TODO: test associateMetadata + } + + /** Test the property 'defaultActionConfig' */ + @Test + public void defaultActionConfigTest() { + // TODO: test defaultActionConfig + } + + /** Test the property 'groupIdentifiers' */ + @Test + public void groupIdentifiersTest() { + // TODO: test groupIdentifiers + } + + /** Test the property 'name' */ + @Test + public void nameTest() { + // TODO: test name + } + + /** Test the property 'operation' */ + @Test + public void operationTest() { + // TODO: test operation + } +} diff --git a/sdks/java/src/test/java/com/thoughtspot/client/model/UpdateEmailCustomizationRequestTest.java b/sdks/java/src/test/java/com/thoughtspot/client/model/UpdateEmailCustomizationRequestTest.java new file mode 100644 index 000000000..e3d1ab34c --- /dev/null +++ b/sdks/java/src/test/java/com/thoughtspot/client/model/UpdateEmailCustomizationRequestTest.java @@ -0,0 +1,30 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client.model; + +import org.junit.jupiter.api.Test; + +/** Model tests for UpdateEmailCustomizationRequest */ +public class UpdateEmailCustomizationRequestTest { + private final UpdateEmailCustomizationRequest model = new UpdateEmailCustomizationRequest(); + + /** Model tests for UpdateEmailCustomizationRequest */ + @Test + public void testUpdateEmailCustomizationRequest() { + // TODO: test UpdateEmailCustomizationRequest + } + + /** Test the property 'templateProperties' */ + @Test + public void templatePropertiesTest() { + // TODO: test templateProperties + } + + /** Test the property 'orgIdentifier' */ + @Test + public void orgIdentifierTest() { + // TODO: test orgIdentifier + } +} diff --git a/sdks/java/src/test/java/com/thoughtspot/client/model/UpdateMetadataHeaderRequestTest.java b/sdks/java/src/test/java/com/thoughtspot/client/model/UpdateMetadataHeaderRequestTest.java new file mode 100644 index 000000000..8467f5794 --- /dev/null +++ b/sdks/java/src/test/java/com/thoughtspot/client/model/UpdateMetadataHeaderRequestTest.java @@ -0,0 +1,30 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client.model; + +import org.junit.jupiter.api.Test; + +/** Model tests for UpdateMetadataHeaderRequest */ +public class UpdateMetadataHeaderRequestTest { + private final UpdateMetadataHeaderRequest model = new UpdateMetadataHeaderRequest(); + + /** Model tests for UpdateMetadataHeaderRequest */ + @Test + public void testUpdateMetadataHeaderRequest() { + // TODO: test UpdateMetadataHeaderRequest + } + + /** Test the property 'headersUpdate' */ + @Test + public void headersUpdateTest() { + // TODO: test headersUpdate + } + + /** Test the property 'orgIdentifier' */ + @Test + public void orgIdentifierTest() { + // TODO: test orgIdentifier + } +} diff --git a/sdks/java/src/test/java/com/thoughtspot/client/model/UpdateMetadataObjIdRequestTest.java b/sdks/java/src/test/java/com/thoughtspot/client/model/UpdateMetadataObjIdRequestTest.java new file mode 100644 index 000000000..d001e018e --- /dev/null +++ b/sdks/java/src/test/java/com/thoughtspot/client/model/UpdateMetadataObjIdRequestTest.java @@ -0,0 +1,24 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client.model; + +import org.junit.jupiter.api.Test; + +/** Model tests for UpdateMetadataObjIdRequest */ +public class UpdateMetadataObjIdRequestTest { + private final UpdateMetadataObjIdRequest model = new UpdateMetadataObjIdRequest(); + + /** Model tests for UpdateMetadataObjIdRequest */ + @Test + public void testUpdateMetadataObjIdRequest() { + // TODO: test UpdateMetadataObjIdRequest + } + + /** Test the property 'metadata' */ + @Test + public void metadataTest() { + // TODO: test metadata + } +} diff --git a/sdks/java/src/test/java/com/thoughtspot/client/model/UpdateObjIdInputTest.java b/sdks/java/src/test/java/com/thoughtspot/client/model/UpdateObjIdInputTest.java new file mode 100644 index 000000000..e5243d5c0 --- /dev/null +++ b/sdks/java/src/test/java/com/thoughtspot/client/model/UpdateObjIdInputTest.java @@ -0,0 +1,42 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client.model; + +import org.junit.jupiter.api.Test; + +/** Model tests for UpdateObjIdInput */ +public class UpdateObjIdInputTest { + private final UpdateObjIdInput model = new UpdateObjIdInput(); + + /** Model tests for UpdateObjIdInput */ + @Test + public void testUpdateObjIdInput() { + // TODO: test UpdateObjIdInput + } + + /** Test the property 'metadataIdentifier' */ + @Test + public void metadataIdentifierTest() { + // TODO: test metadataIdentifier + } + + /** Test the property 'type' */ + @Test + public void typeTest() { + // TODO: test type + } + + /** Test the property 'currentObjId' */ + @Test + public void currentObjIdTest() { + // TODO: test currentObjId + } + + /** Test the property 'newObjId' */ + @Test + public void newObjIdTest() { + // TODO: test newObjId + } +} diff --git a/sdks/java/src/test/java/com/thoughtspot/client/model/UpdateOrgRequestTest.java b/sdks/java/src/test/java/com/thoughtspot/client/model/UpdateOrgRequestTest.java new file mode 100644 index 000000000..229e0a9d2 --- /dev/null +++ b/sdks/java/src/test/java/com/thoughtspot/client/model/UpdateOrgRequestTest.java @@ -0,0 +1,48 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client.model; + +import org.junit.jupiter.api.Test; + +/** Model tests for UpdateOrgRequest */ +public class UpdateOrgRequestTest { + private final UpdateOrgRequest model = new UpdateOrgRequest(); + + /** Model tests for UpdateOrgRequest */ + @Test + public void testUpdateOrgRequest() { + // TODO: test UpdateOrgRequest + } + + /** Test the property 'name' */ + @Test + public void nameTest() { + // TODO: test name + } + + /** Test the property 'description' */ + @Test + public void descriptionTest() { + // TODO: test description + } + + /** Test the property 'userIdentifiers' */ + @Test + public void userIdentifiersTest() { + // TODO: test userIdentifiers + } + + /** Test the property 'groupIdentifiers' */ + @Test + public void groupIdentifiersTest() { + // TODO: test groupIdentifiers + } + + /** Test the property 'operation' */ + @Test + public void operationTest() { + // TODO: test operation + } +} diff --git a/sdks/java/src/test/java/com/thoughtspot/client/model/UpdateRoleRequestTest.java b/sdks/java/src/test/java/com/thoughtspot/client/model/UpdateRoleRequestTest.java new file mode 100644 index 000000000..12008a8c5 --- /dev/null +++ b/sdks/java/src/test/java/com/thoughtspot/client/model/UpdateRoleRequestTest.java @@ -0,0 +1,36 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client.model; + +import org.junit.jupiter.api.Test; + +/** Model tests for UpdateRoleRequest */ +public class UpdateRoleRequestTest { + private final UpdateRoleRequest model = new UpdateRoleRequest(); + + /** Model tests for UpdateRoleRequest */ + @Test + public void testUpdateRoleRequest() { + // TODO: test UpdateRoleRequest + } + + /** Test the property 'name' */ + @Test + public void nameTest() { + // TODO: test name + } + + /** Test the property 'description' */ + @Test + public void descriptionTest() { + // TODO: test description + } + + /** Test the property 'privileges' */ + @Test + public void privilegesTest() { + // TODO: test privileges + } +} diff --git a/sdks/java/src/test/java/com/thoughtspot/client/model/UpdateScheduleRequestTest.java b/sdks/java/src/test/java/com/thoughtspot/client/model/UpdateScheduleRequestTest.java new file mode 100644 index 000000000..98daac65a --- /dev/null +++ b/sdks/java/src/test/java/com/thoughtspot/client/model/UpdateScheduleRequestTest.java @@ -0,0 +1,90 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client.model; + +import org.junit.jupiter.api.Test; + +/** Model tests for UpdateScheduleRequest */ +public class UpdateScheduleRequestTest { + private final UpdateScheduleRequest model = new UpdateScheduleRequest(); + + /** Model tests for UpdateScheduleRequest */ + @Test + public void testUpdateScheduleRequest() { + // TODO: test UpdateScheduleRequest + } + + /** Test the property 'name' */ + @Test + public void nameTest() { + // TODO: test name + } + + /** Test the property 'description' */ + @Test + public void descriptionTest() { + // TODO: test description + } + + /** Test the property 'metadataType' */ + @Test + public void metadataTypeTest() { + // TODO: test metadataType + } + + /** Test the property 'metadataIdentifier' */ + @Test + public void metadataIdentifierTest() { + // TODO: test metadataIdentifier + } + + /** Test the property 'fileFormat' */ + @Test + public void fileFormatTest() { + // TODO: test fileFormat + } + + /** Test the property 'liveboardOptions' */ + @Test + public void liveboardOptionsTest() { + // TODO: test liveboardOptions + } + + /** Test the property 'pdfOptions' */ + @Test + public void pdfOptionsTest() { + // TODO: test pdfOptions + } + + /** Test the property 'timeZone' */ + @Test + public void timeZoneTest() { + // TODO: test timeZone + } + + /** Test the property 'frequency' */ + @Test + public void frequencyTest() { + // TODO: test frequency + } + + /** Test the property 'recipientDetails' */ + @Test + public void recipientDetailsTest() { + // TODO: test recipientDetails + } + + /** Test the property 'status' */ + @Test + public void statusTest() { + // TODO: test status + } + + /** Test the property 'personalisedViewId' */ + @Test + public void personalisedViewIdTest() { + // TODO: test personalisedViewId + } +} diff --git a/sdks/java/src/test/java/com/thoughtspot/client/model/UpdateSystemConfigRequestTest.java b/sdks/java/src/test/java/com/thoughtspot/client/model/UpdateSystemConfigRequestTest.java new file mode 100644 index 000000000..8cf08d04f --- /dev/null +++ b/sdks/java/src/test/java/com/thoughtspot/client/model/UpdateSystemConfigRequestTest.java @@ -0,0 +1,24 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client.model; + +import org.junit.jupiter.api.Test; + +/** Model tests for UpdateSystemConfigRequest */ +public class UpdateSystemConfigRequestTest { + private final UpdateSystemConfigRequest model = new UpdateSystemConfigRequest(); + + /** Model tests for UpdateSystemConfigRequest */ + @Test + public void testUpdateSystemConfigRequest() { + // TODO: test UpdateSystemConfigRequest + } + + /** Test the property '_configuration' */ + @Test + public void _configurationTest() { + // TODO: test _configuration + } +} diff --git a/sdks/java/src/test/java/com/thoughtspot/client/model/UpdateTagRequestTest.java b/sdks/java/src/test/java/com/thoughtspot/client/model/UpdateTagRequestTest.java new file mode 100644 index 000000000..e4dd88aae --- /dev/null +++ b/sdks/java/src/test/java/com/thoughtspot/client/model/UpdateTagRequestTest.java @@ -0,0 +1,30 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client.model; + +import org.junit.jupiter.api.Test; + +/** Model tests for UpdateTagRequest */ +public class UpdateTagRequestTest { + private final UpdateTagRequest model = new UpdateTagRequest(); + + /** Model tests for UpdateTagRequest */ + @Test + public void testUpdateTagRequest() { + // TODO: test UpdateTagRequest + } + + /** Test the property 'name' */ + @Test + public void nameTest() { + // TODO: test name + } + + /** Test the property 'color' */ + @Test + public void colorTest() { + // TODO: test color + } +} diff --git a/sdks/java/src/test/java/com/thoughtspot/client/model/UpdateUserGroupRequestTest.java b/sdks/java/src/test/java/com/thoughtspot/client/model/UpdateUserGroupRequestTest.java new file mode 100644 index 000000000..8d94b1c5c --- /dev/null +++ b/sdks/java/src/test/java/com/thoughtspot/client/model/UpdateUserGroupRequestTest.java @@ -0,0 +1,84 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client.model; + +import org.junit.jupiter.api.Test; + +/** Model tests for UpdateUserGroupRequest */ +public class UpdateUserGroupRequestTest { + private final UpdateUserGroupRequest model = new UpdateUserGroupRequest(); + + /** Model tests for UpdateUserGroupRequest */ + @Test + public void testUpdateUserGroupRequest() { + // TODO: test UpdateUserGroupRequest + } + + /** Test the property 'name' */ + @Test + public void nameTest() { + // TODO: test name + } + + /** Test the property 'defaultLiveboardIdentifiers' */ + @Test + public void defaultLiveboardIdentifiersTest() { + // TODO: test defaultLiveboardIdentifiers + } + + /** Test the property 'description' */ + @Test + public void descriptionTest() { + // TODO: test description + } + + /** Test the property 'displayName' */ + @Test + public void displayNameTest() { + // TODO: test displayName + } + + /** Test the property 'privileges' */ + @Test + public void privilegesTest() { + // TODO: test privileges + } + + /** Test the property 'subGroupIdentifiers' */ + @Test + public void subGroupIdentifiersTest() { + // TODO: test subGroupIdentifiers + } + + /** Test the property 'type' */ + @Test + public void typeTest() { + // TODO: test type + } + + /** Test the property 'userIdentifiers' */ + @Test + public void userIdentifiersTest() { + // TODO: test userIdentifiers + } + + /** Test the property 'visibility' */ + @Test + public void visibilityTest() { + // TODO: test visibility + } + + /** Test the property 'roleIdentifiers' */ + @Test + public void roleIdentifiersTest() { + // TODO: test roleIdentifiers + } + + /** Test the property 'operation' */ + @Test + public void operationTest() { + // TODO: test operation + } +} diff --git a/sdks/java/src/test/java/com/thoughtspot/client/model/UpdateUserRequestTest.java b/sdks/java/src/test/java/com/thoughtspot/client/model/UpdateUserRequestTest.java new file mode 100644 index 000000000..72788d066 --- /dev/null +++ b/sdks/java/src/test/java/com/thoughtspot/client/model/UpdateUserRequestTest.java @@ -0,0 +1,126 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client.model; + +import org.junit.jupiter.api.Test; + +/** Model tests for UpdateUserRequest */ +public class UpdateUserRequestTest { + private final UpdateUserRequest model = new UpdateUserRequest(); + + /** Model tests for UpdateUserRequest */ + @Test + public void testUpdateUserRequest() { + // TODO: test UpdateUserRequest + } + + /** Test the property 'name' */ + @Test + public void nameTest() { + // TODO: test name + } + + /** Test the property 'displayName' */ + @Test + public void displayNameTest() { + // TODO: test displayName + } + + /** Test the property 'visibility' */ + @Test + public void visibilityTest() { + // TODO: test visibility + } + + /** Test the property 'email' */ + @Test + public void emailTest() { + // TODO: test email + } + + /** Test the property 'accountStatus' */ + @Test + public void accountStatusTest() { + // TODO: test accountStatus + } + + /** Test the property 'notifyOnShare' */ + @Test + public void notifyOnShareTest() { + // TODO: test notifyOnShare + } + + /** Test the property 'showOnboardingExperience' */ + @Test + public void showOnboardingExperienceTest() { + // TODO: test showOnboardingExperience + } + + /** Test the property 'onboardingExperienceCompleted' */ + @Test + public void onboardingExperienceCompletedTest() { + // TODO: test onboardingExperienceCompleted + } + + /** Test the property 'accountType' */ + @Test + public void accountTypeTest() { + // TODO: test accountType + } + + /** Test the property 'groupIdentifiers' */ + @Test + public void groupIdentifiersTest() { + // TODO: test groupIdentifiers + } + + /** Test the property 'homeLiveboardIdentifier' */ + @Test + public void homeLiveboardIdentifierTest() { + // TODO: test homeLiveboardIdentifier + } + + /** Test the property 'favoriteMetadata' */ + @Test + public void favoriteMetadataTest() { + // TODO: test favoriteMetadata + } + + /** Test the property 'orgIdentifiers' */ + @Test + public void orgIdentifiersTest() { + // TODO: test orgIdentifiers + } + + /** Test the property 'operation' */ + @Test + public void operationTest() { + // TODO: test operation + } + + /** Test the property 'preferredLocale' */ + @Test + public void preferredLocaleTest() { + // TODO: test preferredLocale + } + + /** Test the property 'useBrowserLanguage' */ + @Test + public void useBrowserLanguageTest() { + // TODO: test useBrowserLanguage + } + + /** Test the property 'extendedProperties' */ + @Test + public void extendedPropertiesTest() { + // TODO: test extendedProperties + } + + /** Test the property 'extendedPreferences' */ + @Test + public void extendedPreferencesTest() { + // TODO: test extendedPreferences + } +} diff --git a/sdks/java/src/test/java/com/thoughtspot/client/model/UpdateVariableRequestTest.java b/sdks/java/src/test/java/com/thoughtspot/client/model/UpdateVariableRequestTest.java new file mode 100644 index 000000000..2494b8b1b --- /dev/null +++ b/sdks/java/src/test/java/com/thoughtspot/client/model/UpdateVariableRequestTest.java @@ -0,0 +1,24 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client.model; + +import org.junit.jupiter.api.Test; + +/** Model tests for UpdateVariableRequest */ +public class UpdateVariableRequestTest { + private final UpdateVariableRequest model = new UpdateVariableRequest(); + + /** Model tests for UpdateVariableRequest */ + @Test + public void testUpdateVariableRequest() { + // TODO: test UpdateVariableRequest + } + + /** Test the property 'name' */ + @Test + public void nameTest() { + // TODO: test name + } +} diff --git a/sdks/java/src/test/java/com/thoughtspot/client/model/UpdateVariableValuesRequestTest.java b/sdks/java/src/test/java/com/thoughtspot/client/model/UpdateVariableValuesRequestTest.java new file mode 100644 index 000000000..37b223614 --- /dev/null +++ b/sdks/java/src/test/java/com/thoughtspot/client/model/UpdateVariableValuesRequestTest.java @@ -0,0 +1,30 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client.model; + +import org.junit.jupiter.api.Test; + +/** Model tests for UpdateVariableValuesRequest */ +public class UpdateVariableValuesRequestTest { + private final UpdateVariableValuesRequest model = new UpdateVariableValuesRequest(); + + /** Model tests for UpdateVariableValuesRequest */ + @Test + public void testUpdateVariableValuesRequest() { + // TODO: test UpdateVariableValuesRequest + } + + /** Test the property 'variableAssignment' */ + @Test + public void variableAssignmentTest() { + // TODO: test variableAssignment + } + + /** Test the property 'variableValueScope' */ + @Test + public void variableValueScopeTest() { + // TODO: test variableValueScope + } +} diff --git a/sdks/java/src/test/java/com/thoughtspot/client/model/UpdateWebhookConfigurationRequestTest.java b/sdks/java/src/test/java/com/thoughtspot/client/model/UpdateWebhookConfigurationRequestTest.java new file mode 100644 index 000000000..f56ecdb34 --- /dev/null +++ b/sdks/java/src/test/java/com/thoughtspot/client/model/UpdateWebhookConfigurationRequestTest.java @@ -0,0 +1,72 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client.model; + +import org.junit.jupiter.api.Test; + +/** Model tests for UpdateWebhookConfigurationRequest */ +public class UpdateWebhookConfigurationRequestTest { + private final UpdateWebhookConfigurationRequest model = new UpdateWebhookConfigurationRequest(); + + /** Model tests for UpdateWebhookConfigurationRequest */ + @Test + public void testUpdateWebhookConfigurationRequest() { + // TODO: test UpdateWebhookConfigurationRequest + } + + /** Test the property 'name' */ + @Test + public void nameTest() { + // TODO: test name + } + + /** Test the property 'description' */ + @Test + public void descriptionTest() { + // TODO: test description + } + + /** Test the property 'url' */ + @Test + public void urlTest() { + // TODO: test url + } + + /** Test the property 'urlParams' */ + @Test + public void urlParamsTest() { + // TODO: test urlParams + } + + /** Test the property 'events' */ + @Test + public void eventsTest() { + // TODO: test events + } + + /** Test the property 'authentication' */ + @Test + public void authenticationTest() { + // TODO: test authentication + } + + /** Test the property 'signatureVerification' */ + @Test + public void signatureVerificationTest() { + // TODO: test signatureVerification + } + + /** Test the property 'storageDestination' */ + @Test + public void storageDestinationTest() { + // TODO: test storageDestination + } + + /** Test the property 'additionalHeaders' */ + @Test + public void additionalHeadersTest() { + // TODO: test additionalHeaders + } +} diff --git a/sdks/java/src/test/java/com/thoughtspot/client/model/UserGroupResponseTest.java b/sdks/java/src/test/java/com/thoughtspot/client/model/UserGroupResponseTest.java new file mode 100644 index 000000000..9a58329c4 --- /dev/null +++ b/sdks/java/src/test/java/com/thoughtspot/client/model/UserGroupResponseTest.java @@ -0,0 +1,198 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client.model; + +import org.junit.jupiter.api.Test; + +/** Model tests for UserGroupResponse */ +public class UserGroupResponseTest { + private final UserGroupResponse model = new UserGroupResponse(); + + /** Model tests for UserGroupResponse */ + @Test + public void testUserGroupResponse() { + // TODO: test UserGroupResponse + } + + /** Test the property 'authorId' */ + @Test + public void authorIdTest() { + // TODO: test authorId + } + + /** Test the property 'completeDetail' */ + @Test + public void completeDetailTest() { + // TODO: test completeDetail + } + + /** Test the property 'content' */ + @Test + public void contentTest() { + // TODO: test content + } + + /** Test the property 'creationTimeInMillis' */ + @Test + public void creationTimeInMillisTest() { + // TODO: test creationTimeInMillis + } + + /** Test the property 'defaultLiveboards' */ + @Test + public void defaultLiveboardsTest() { + // TODO: test defaultLiveboards + } + + /** Test the property 'deleted' */ + @Test + public void deletedTest() { + // TODO: test deleted + } + + /** Test the property 'deprecated' */ + @Test + public void deprecatedTest() { + // TODO: test deprecated + } + + /** Test the property 'description' */ + @Test + public void descriptionTest() { + // TODO: test description + } + + /** Test the property 'displayName' */ + @Test + public void displayNameTest() { + // TODO: test displayName + } + + /** Test the property 'external' */ + @Test + public void externalTest() { + // TODO: test external + } + + /** Test the property 'generationNumber' */ + @Test + public void generationNumberTest() { + // TODO: test generationNumber + } + + /** Test the property 'hidden' */ + @Test + public void hiddenTest() { + // TODO: test hidden + } + + /** Test the property 'id' */ + @Test + public void idTest() { + // TODO: test id + } + + /** Test the property 'index' */ + @Test + public void indexTest() { + // TODO: test index + } + + /** Test the property 'indexVersion' */ + @Test + public void indexVersionTest() { + // TODO: test indexVersion + } + + /** Test the property 'metadataVersion' */ + @Test + public void metadataVersionTest() { + // TODO: test metadataVersion + } + + /** Test the property 'modificationTimeInMillis' */ + @Test + public void modificationTimeInMillisTest() { + // TODO: test modificationTimeInMillis + } + + /** Test the property 'modifierId' */ + @Test + public void modifierIdTest() { + // TODO: test modifierId + } + + /** Test the property 'name' */ + @Test + public void nameTest() { + // TODO: test name + } + + /** Test the property 'orgs' */ + @Test + public void orgsTest() { + // TODO: test orgs + } + + /** Test the property 'ownerId' */ + @Test + public void ownerIdTest() { + // TODO: test ownerId + } + + /** Test the property 'parentType' */ + @Test + public void parentTypeTest() { + // TODO: test parentType + } + + /** Test the property 'privileges' */ + @Test + public void privilegesTest() { + // TODO: test privileges + } + + /** Test the property 'subGroups' */ + @Test + public void subGroupsTest() { + // TODO: test subGroups + } + + /** Test the property 'systemGroup' */ + @Test + public void systemGroupTest() { + // TODO: test systemGroup + } + + /** Test the property 'tags' */ + @Test + public void tagsTest() { + // TODO: test tags + } + + /** Test the property 'type' */ + @Test + public void typeTest() { + // TODO: test type + } + + /** Test the property 'users' */ + @Test + public void usersTest() { + // TODO: test users + } + + /** Test the property 'visibility' */ + @Test + public void visibilityTest() { + // TODO: test visibility + } + + /** Test the property 'roles' */ + @Test + public void rolesTest() { + // TODO: test roles + } +} diff --git a/sdks/java/src/test/java/com/thoughtspot/client/model/UserGroupTest.java b/sdks/java/src/test/java/com/thoughtspot/client/model/UserGroupTest.java new file mode 100644 index 000000000..9d79b7377 --- /dev/null +++ b/sdks/java/src/test/java/com/thoughtspot/client/model/UserGroupTest.java @@ -0,0 +1,30 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client.model; + +import org.junit.jupiter.api.Test; + +/** Model tests for UserGroup */ +public class UserGroupTest { + private final UserGroup model = new UserGroup(); + + /** Model tests for UserGroup */ + @Test + public void testUserGroup() { + // TODO: test UserGroup + } + + /** Test the property 'id' */ + @Test + public void idTest() { + // TODO: test id + } + + /** Test the property 'name' */ + @Test + public void nameTest() { + // TODO: test name + } +} diff --git a/sdks/java/src/test/java/com/thoughtspot/client/model/UserInfoTest.java b/sdks/java/src/test/java/com/thoughtspot/client/model/UserInfoTest.java new file mode 100644 index 000000000..5452c5549 --- /dev/null +++ b/sdks/java/src/test/java/com/thoughtspot/client/model/UserInfoTest.java @@ -0,0 +1,30 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client.model; + +import org.junit.jupiter.api.Test; + +/** Model tests for UserInfo */ +public class UserInfoTest { + private final UserInfo model = new UserInfo(); + + /** Model tests for UserInfo */ + @Test + public void testUserInfo() { + // TODO: test UserInfo + } + + /** Test the property 'id' */ + @Test + public void idTest() { + // TODO: test id + } + + /** Test the property 'name' */ + @Test + public void nameTest() { + // TODO: test name + } +} diff --git a/sdks/java/src/test/java/com/thoughtspot/client/model/UserObjectTest.java b/sdks/java/src/test/java/com/thoughtspot/client/model/UserObjectTest.java new file mode 100644 index 000000000..8d53c9435 --- /dev/null +++ b/sdks/java/src/test/java/com/thoughtspot/client/model/UserObjectTest.java @@ -0,0 +1,30 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client.model; + +import org.junit.jupiter.api.Test; + +/** Model tests for UserObject */ +public class UserObjectTest { + private final UserObject model = new UserObject(); + + /** Model tests for UserObject */ + @Test + public void testUserObject() { + // TODO: test UserObject + } + + /** Test the property 'type' */ + @Test + public void typeTest() { + // TODO: test type + } + + /** Test the property 'identifier' */ + @Test + public void identifierTest() { + // TODO: test identifier + } +} diff --git a/sdks/java/src/test/java/com/thoughtspot/client/model/UserParameterOptionsTest.java b/sdks/java/src/test/java/com/thoughtspot/client/model/UserParameterOptionsTest.java new file mode 100644 index 000000000..7030323bb --- /dev/null +++ b/sdks/java/src/test/java/com/thoughtspot/client/model/UserParameterOptionsTest.java @@ -0,0 +1,42 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client.model; + +import org.junit.jupiter.api.Test; + +/** Model tests for UserParameterOptions */ +public class UserParameterOptionsTest { + private final UserParameterOptions model = new UserParameterOptions(); + + /** Model tests for UserParameterOptions */ + @Test + public void testUserParameterOptions() { + // TODO: test UserParameterOptions + } + + /** Test the property 'objects' */ + @Test + public void objectsTest() { + // TODO: test objects + } + + /** Test the property 'runtimeFilters' */ + @Test + public void runtimeFiltersTest() { + // TODO: test runtimeFilters + } + + /** Test the property 'runtimeSorts' */ + @Test + public void runtimeSortsTest() { + // TODO: test runtimeSorts + } + + /** Test the property 'parameters' */ + @Test + public void parametersTest() { + // TODO: test parameters + } +} diff --git a/sdks/java/src/test/java/com/thoughtspot/client/model/UserPrincipalTest.java b/sdks/java/src/test/java/com/thoughtspot/client/model/UserPrincipalTest.java new file mode 100644 index 000000000..74458e302 --- /dev/null +++ b/sdks/java/src/test/java/com/thoughtspot/client/model/UserPrincipalTest.java @@ -0,0 +1,36 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client.model; + +import org.junit.jupiter.api.Test; + +/** Model tests for UserPrincipal */ +public class UserPrincipalTest { + private final UserPrincipal model = new UserPrincipal(); + + /** Model tests for UserPrincipal */ + @Test + public void testUserPrincipal() { + // TODO: test UserPrincipal + } + + /** Test the property 'id' */ + @Test + public void idTest() { + // TODO: test id + } + + /** Test the property 'name' */ + @Test + public void nameTest() { + // TODO: test name + } + + /** Test the property 'type' */ + @Test + public void typeTest() { + // TODO: test type + } +} diff --git a/sdks/java/src/test/java/com/thoughtspot/client/model/UserTest.java b/sdks/java/src/test/java/com/thoughtspot/client/model/UserTest.java new file mode 100644 index 000000000..507c37ccb --- /dev/null +++ b/sdks/java/src/test/java/com/thoughtspot/client/model/UserTest.java @@ -0,0 +1,300 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client.model; + +import org.junit.jupiter.api.Test; + +/** Model tests for User */ +public class UserTest { + private final User model = new User(); + + /** Model tests for User */ + @Test + public void testUser() { + // TODO: test User + } + + /** Test the property 'id' */ + @Test + public void idTest() { + // TODO: test id + } + + /** Test the property 'name' */ + @Test + public void nameTest() { + // TODO: test name + } + + /** Test the property 'displayName' */ + @Test + public void displayNameTest() { + // TODO: test displayName + } + + /** Test the property 'visibility' */ + @Test + public void visibilityTest() { + // TODO: test visibility + } + + /** Test the property 'authorId' */ + @Test + public void authorIdTest() { + // TODO: test authorId + } + + /** Test the property 'canChangePassword' */ + @Test + public void canChangePasswordTest() { + // TODO: test canChangePassword + } + + /** Test the property 'completeDetail' */ + @Test + public void completeDetailTest() { + // TODO: test completeDetail + } + + /** Test the property 'creationTimeInMillis' */ + @Test + public void creationTimeInMillisTest() { + // TODO: test creationTimeInMillis + } + + /** Test the property 'currentOrg' */ + @Test + public void currentOrgTest() { + // TODO: test currentOrg + } + + /** Test the property 'deleted' */ + @Test + public void deletedTest() { + // TODO: test deleted + } + + /** Test the property 'deprecated' */ + @Test + public void deprecatedTest() { + // TODO: test deprecated + } + + /** Test the property 'accountType' */ + @Test + public void accountTypeTest() { + // TODO: test accountType + } + + /** Test the property 'accountStatus' */ + @Test + public void accountStatusTest() { + // TODO: test accountStatus + } + + /** Test the property 'email' */ + @Test + public void emailTest() { + // TODO: test email + } + + /** Test the property 'expirationTimeInMillis' */ + @Test + public void expirationTimeInMillisTest() { + // TODO: test expirationTimeInMillis + } + + /** Test the property 'external' */ + @Test + public void externalTest() { + // TODO: test external + } + + /** Test the property 'favoriteMetadata' */ + @Test + public void favoriteMetadataTest() { + // TODO: test favoriteMetadata + } + + /** Test the property 'firstLoginTimeInMillis' */ + @Test + public void firstLoginTimeInMillisTest() { + // TODO: test firstLoginTimeInMillis + } + + /** Test the property 'groupMask' */ + @Test + public void groupMaskTest() { + // TODO: test groupMask + } + + /** Test the property 'hidden' */ + @Test + public void hiddenTest() { + // TODO: test hidden + } + + /** Test the property 'homeLiveboard' */ + @Test + public void homeLiveboardTest() { + // TODO: test homeLiveboard + } + + /** Test the property 'incompleteDetails' */ + @Test + public void incompleteDetailsTest() { + // TODO: test incompleteDetails + } + + /** Test the property 'isFirstLogin' */ + @Test + public void isFirstLoginTest() { + // TODO: test isFirstLogin + } + + /** Test the property 'modificationTimeInMillis' */ + @Test + public void modificationTimeInMillisTest() { + // TODO: test modificationTimeInMillis + } + + /** Test the property 'modifierId' */ + @Test + public void modifierIdTest() { + // TODO: test modifierId + } + + /** Test the property 'notifyOnShare' */ + @Test + public void notifyOnShareTest() { + // TODO: test notifyOnShare + } + + /** Test the property 'onboardingExperienceCompleted' */ + @Test + public void onboardingExperienceCompletedTest() { + // TODO: test onboardingExperienceCompleted + } + + /** Test the property 'orgs' */ + @Test + public void orgsTest() { + // TODO: test orgs + } + + /** Test the property 'ownerId' */ + @Test + public void ownerIdTest() { + // TODO: test ownerId + } + + /** Test the property 'parentType' */ + @Test + public void parentTypeTest() { + // TODO: test parentType + } + + /** Test the property 'privileges' */ + @Test + public void privilegesTest() { + // TODO: test privileges + } + + /** Test the property 'showOnboardingExperience' */ + @Test + public void showOnboardingExperienceTest() { + // TODO: test showOnboardingExperience + } + + /** Test the property 'superUser' */ + @Test + public void superUserTest() { + // TODO: test superUser + } + + /** Test the property 'systemUser' */ + @Test + public void systemUserTest() { + // TODO: test systemUser + } + + /** Test the property 'tags' */ + @Test + public void tagsTest() { + // TODO: test tags + } + + /** Test the property 'tenantId' */ + @Test + public void tenantIdTest() { + // TODO: test tenantId + } + + /** Test the property 'userGroups' */ + @Test + public void userGroupsTest() { + // TODO: test userGroups + } + + /** Test the property 'userInheritedGroups' */ + @Test + public void userInheritedGroupsTest() { + // TODO: test userInheritedGroups + } + + /** Test the property 'welcomeEmailSent' */ + @Test + public void welcomeEmailSentTest() { + // TODO: test welcomeEmailSent + } + + /** Test the property 'orgPrivileges' */ + @Test + public void orgPrivilegesTest() { + // TODO: test orgPrivileges + } + + /** Test the property 'preferredLocale' */ + @Test + public void preferredLocaleTest() { + // TODO: test preferredLocale + } + + /** Test the property 'useBrowserLanguage' */ + @Test + public void useBrowserLanguageTest() { + // TODO: test useBrowserLanguage + } + + /** Test the property 'extendedProperties' */ + @Test + public void extendedPropertiesTest() { + // TODO: test extendedProperties + } + + /** Test the property 'extendedPreferences' */ + @Test + public void extendedPreferencesTest() { + // TODO: test extendedPreferences + } + + /** Test the property 'userParameters' */ + @Test + public void userParametersTest() { + // TODO: test userParameters + } + + /** Test the property 'accessControlProperties' */ + @Test + public void accessControlPropertiesTest() { + // TODO: test accessControlProperties + } + + /** Test the property 'variableValues' */ + @Test + public void variableValuesTest() { + // TODO: test variableValues + } +} diff --git a/sdks/java/src/test/java/com/thoughtspot/client/model/ValidateCommunicationChannelRequestTest.java b/sdks/java/src/test/java/com/thoughtspot/client/model/ValidateCommunicationChannelRequestTest.java new file mode 100644 index 000000000..bdb49beab --- /dev/null +++ b/sdks/java/src/test/java/com/thoughtspot/client/model/ValidateCommunicationChannelRequestTest.java @@ -0,0 +1,37 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client.model; + +import org.junit.jupiter.api.Test; + +/** Model tests for ValidateCommunicationChannelRequest */ +public class ValidateCommunicationChannelRequestTest { + private final ValidateCommunicationChannelRequest model = + new ValidateCommunicationChannelRequest(); + + /** Model tests for ValidateCommunicationChannelRequest */ + @Test + public void testValidateCommunicationChannelRequest() { + // TODO: test ValidateCommunicationChannelRequest + } + + /** Test the property 'channelType' */ + @Test + public void channelTypeTest() { + // TODO: test channelType + } + + /** Test the property 'channelIdentifier' */ + @Test + public void channelIdentifierTest() { + // TODO: test channelIdentifier + } + + /** Test the property 'eventType' */ + @Test + public void eventTypeTest() { + // TODO: test eventType + } +} diff --git a/sdks/java/src/test/java/com/thoughtspot/client/model/ValidateMergeRequestTest.java b/sdks/java/src/test/java/com/thoughtspot/client/model/ValidateMergeRequestTest.java new file mode 100644 index 000000000..e5ae99287 --- /dev/null +++ b/sdks/java/src/test/java/com/thoughtspot/client/model/ValidateMergeRequestTest.java @@ -0,0 +1,30 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client.model; + +import org.junit.jupiter.api.Test; + +/** Model tests for ValidateMergeRequest */ +public class ValidateMergeRequestTest { + private final ValidateMergeRequest model = new ValidateMergeRequest(); + + /** Model tests for ValidateMergeRequest */ + @Test + public void testValidateMergeRequest() { + // TODO: test ValidateMergeRequest + } + + /** Test the property 'sourceBranchName' */ + @Test + public void sourceBranchNameTest() { + // TODO: test sourceBranchName + } + + /** Test the property 'targetBranchName' */ + @Test + public void targetBranchNameTest() { + // TODO: test targetBranchName + } +} diff --git a/sdks/java/src/test/java/com/thoughtspot/client/model/ValidateTokenRequestTest.java b/sdks/java/src/test/java/com/thoughtspot/client/model/ValidateTokenRequestTest.java new file mode 100644 index 000000000..c4d273414 --- /dev/null +++ b/sdks/java/src/test/java/com/thoughtspot/client/model/ValidateTokenRequestTest.java @@ -0,0 +1,24 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client.model; + +import org.junit.jupiter.api.Test; + +/** Model tests for ValidateTokenRequest */ +public class ValidateTokenRequestTest { + private final ValidateTokenRequest model = new ValidateTokenRequest(); + + /** Model tests for ValidateTokenRequest */ + @Test + public void testValidateTokenRequest() { + // TODO: test ValidateTokenRequest + } + + /** Test the property 'token' */ + @Test + public void tokenTest() { + // TODO: test token + } +} diff --git a/sdks/java/src/test/java/com/thoughtspot/client/model/ValueScopeInputTest.java b/sdks/java/src/test/java/com/thoughtspot/client/model/ValueScopeInputTest.java new file mode 100644 index 000000000..e81c33293 --- /dev/null +++ b/sdks/java/src/test/java/com/thoughtspot/client/model/ValueScopeInputTest.java @@ -0,0 +1,42 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client.model; + +import org.junit.jupiter.api.Test; + +/** Model tests for ValueScopeInput */ +public class ValueScopeInputTest { + private final ValueScopeInput model = new ValueScopeInput(); + + /** Model tests for ValueScopeInput */ + @Test + public void testValueScopeInput() { + // TODO: test ValueScopeInput + } + + /** Test the property 'orgIdentifier' */ + @Test + public void orgIdentifierTest() { + // TODO: test orgIdentifier + } + + /** Test the property 'principalType' */ + @Test + public void principalTypeTest() { + // TODO: test principalType + } + + /** Test the property 'principalIdentifier' */ + @Test + public void principalIdentifierTest() { + // TODO: test principalIdentifier + } + + /** Test the property 'modelIdentifier' */ + @Test + public void modelIdentifierTest() { + // TODO: test modelIdentifier + } +} diff --git a/sdks/java/src/test/java/com/thoughtspot/client/model/VariableDetailInputTest.java b/sdks/java/src/test/java/com/thoughtspot/client/model/VariableDetailInputTest.java new file mode 100644 index 000000000..6c7c4ccb5 --- /dev/null +++ b/sdks/java/src/test/java/com/thoughtspot/client/model/VariableDetailInputTest.java @@ -0,0 +1,36 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client.model; + +import org.junit.jupiter.api.Test; + +/** Model tests for VariableDetailInput */ +public class VariableDetailInputTest { + private final VariableDetailInput model = new VariableDetailInput(); + + /** Model tests for VariableDetailInput */ + @Test + public void testVariableDetailInput() { + // TODO: test VariableDetailInput + } + + /** Test the property 'identifier' */ + @Test + public void identifierTest() { + // TODO: test identifier + } + + /** Test the property 'type' */ + @Test + public void typeTest() { + // TODO: test type + } + + /** Test the property 'namePattern' */ + @Test + public void namePatternTest() { + // TODO: test namePattern + } +} diff --git a/sdks/java/src/test/java/com/thoughtspot/client/model/VariableOrgInfoTest.java b/sdks/java/src/test/java/com/thoughtspot/client/model/VariableOrgInfoTest.java new file mode 100644 index 000000000..c5d0ba149 --- /dev/null +++ b/sdks/java/src/test/java/com/thoughtspot/client/model/VariableOrgInfoTest.java @@ -0,0 +1,30 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client.model; + +import org.junit.jupiter.api.Test; + +/** Model tests for VariableOrgInfo */ +public class VariableOrgInfoTest { + private final VariableOrgInfo model = new VariableOrgInfo(); + + /** Model tests for VariableOrgInfo */ + @Test + public void testVariableOrgInfo() { + // TODO: test VariableOrgInfo + } + + /** Test the property 'id' */ + @Test + public void idTest() { + // TODO: test id + } + + /** Test the property 'name' */ + @Test + public void nameTest() { + // TODO: test name + } +} diff --git a/sdks/java/src/test/java/com/thoughtspot/client/model/VariablePutAssignmentInputTest.java b/sdks/java/src/test/java/com/thoughtspot/client/model/VariablePutAssignmentInputTest.java new file mode 100644 index 000000000..7e77ecb40 --- /dev/null +++ b/sdks/java/src/test/java/com/thoughtspot/client/model/VariablePutAssignmentInputTest.java @@ -0,0 +1,54 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client.model; + +import org.junit.jupiter.api.Test; + +/** Model tests for VariablePutAssignmentInput */ +public class VariablePutAssignmentInputTest { + private final VariablePutAssignmentInput model = new VariablePutAssignmentInput(); + + /** Model tests for VariablePutAssignmentInput */ + @Test + public void testVariablePutAssignmentInput() { + // TODO: test VariablePutAssignmentInput + } + + /** Test the property 'assignedValues' */ + @Test + public void assignedValuesTest() { + // TODO: test assignedValues + } + + /** Test the property 'orgIdentifier' */ + @Test + public void orgIdentifierTest() { + // TODO: test orgIdentifier + } + + /** Test the property 'principalType' */ + @Test + public void principalTypeTest() { + // TODO: test principalType + } + + /** Test the property 'principalIdentifier' */ + @Test + public void principalIdentifierTest() { + // TODO: test principalIdentifier + } + + /** Test the property 'modelIdentifier' */ + @Test + public void modelIdentifierTest() { + // TODO: test modelIdentifier + } + + /** Test the property 'priority' */ + @Test + public void priorityTest() { + // TODO: test priority + } +} diff --git a/sdks/java/src/test/java/com/thoughtspot/client/model/VariableTest.java b/sdks/java/src/test/java/com/thoughtspot/client/model/VariableTest.java new file mode 100644 index 000000000..4ffa5be7f --- /dev/null +++ b/sdks/java/src/test/java/com/thoughtspot/client/model/VariableTest.java @@ -0,0 +1,54 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client.model; + +import org.junit.jupiter.api.Test; + +/** Model tests for Variable */ +public class VariableTest { + private final Variable model = new Variable(); + + /** Model tests for Variable */ + @Test + public void testVariable() { + // TODO: test Variable + } + + /** Test the property 'id' */ + @Test + public void idTest() { + // TODO: test id + } + + /** Test the property 'name' */ + @Test + public void nameTest() { + // TODO: test name + } + + /** Test the property 'variableType' */ + @Test + public void variableTypeTest() { + // TODO: test variableType + } + + /** Test the property 'sensitive' */ + @Test + public void sensitiveTest() { + // TODO: test sensitive + } + + /** Test the property 'values' */ + @Test + public void valuesTest() { + // TODO: test values + } + + /** Test the property 'org' */ + @Test + public void orgTest() { + // TODO: test org + } +} diff --git a/sdks/java/src/test/java/com/thoughtspot/client/model/VariableUpdateAssignmentInputTest.java b/sdks/java/src/test/java/com/thoughtspot/client/model/VariableUpdateAssignmentInputTest.java new file mode 100644 index 000000000..1f56e0fe3 --- /dev/null +++ b/sdks/java/src/test/java/com/thoughtspot/client/model/VariableUpdateAssignmentInputTest.java @@ -0,0 +1,36 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client.model; + +import org.junit.jupiter.api.Test; + +/** Model tests for VariableUpdateAssignmentInput */ +public class VariableUpdateAssignmentInputTest { + private final VariableUpdateAssignmentInput model = new VariableUpdateAssignmentInput(); + + /** Model tests for VariableUpdateAssignmentInput */ + @Test + public void testVariableUpdateAssignmentInput() { + // TODO: test VariableUpdateAssignmentInput + } + + /** Test the property 'variableIdentifier' */ + @Test + public void variableIdentifierTest() { + // TODO: test variableIdentifier + } + + /** Test the property 'variableValues' */ + @Test + public void variableValuesTest() { + // TODO: test variableValues + } + + /** Test the property 'operation' */ + @Test + public void operationTest() { + // TODO: test operation + } +} diff --git a/sdks/java/src/test/java/com/thoughtspot/client/model/VariableUpdateScopeInputTest.java b/sdks/java/src/test/java/com/thoughtspot/client/model/VariableUpdateScopeInputTest.java new file mode 100644 index 000000000..0f391acde --- /dev/null +++ b/sdks/java/src/test/java/com/thoughtspot/client/model/VariableUpdateScopeInputTest.java @@ -0,0 +1,48 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client.model; + +import org.junit.jupiter.api.Test; + +/** Model tests for VariableUpdateScopeInput */ +public class VariableUpdateScopeInputTest { + private final VariableUpdateScopeInput model = new VariableUpdateScopeInput(); + + /** Model tests for VariableUpdateScopeInput */ + @Test + public void testVariableUpdateScopeInput() { + // TODO: test VariableUpdateScopeInput + } + + /** Test the property 'orgIdentifier' */ + @Test + public void orgIdentifierTest() { + // TODO: test orgIdentifier + } + + /** Test the property 'principalType' */ + @Test + public void principalTypeTest() { + // TODO: test principalType + } + + /** Test the property 'principalIdentifier' */ + @Test + public void principalIdentifierTest() { + // TODO: test principalIdentifier + } + + /** Test the property 'modelIdentifier' */ + @Test + public void modelIdentifierTest() { + // TODO: test modelIdentifier + } + + /** Test the property 'priority' */ + @Test + public void priorityTest() { + // TODO: test priority + } +} diff --git a/sdks/java/src/test/java/com/thoughtspot/client/model/VariableValueTest.java b/sdks/java/src/test/java/com/thoughtspot/client/model/VariableValueTest.java new file mode 100644 index 000000000..79356e3d6 --- /dev/null +++ b/sdks/java/src/test/java/com/thoughtspot/client/model/VariableValueTest.java @@ -0,0 +1,60 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client.model; + +import org.junit.jupiter.api.Test; + +/** Model tests for VariableValue */ +public class VariableValueTest { + private final VariableValue model = new VariableValue(); + + /** Model tests for VariableValue */ + @Test + public void testVariableValue() { + // TODO: test VariableValue + } + + /** Test the property 'value' */ + @Test + public void valueTest() { + // TODO: test value + } + + /** Test the property 'valueList' */ + @Test + public void valueListTest() { + // TODO: test valueList + } + + /** Test the property 'orgIdentifier' */ + @Test + public void orgIdentifierTest() { + // TODO: test orgIdentifier + } + + /** Test the property 'principalType' */ + @Test + public void principalTypeTest() { + // TODO: test principalType + } + + /** Test the property 'principalIdentifier' */ + @Test + public void principalIdentifierTest() { + // TODO: test principalIdentifier + } + + /** Test the property 'modelIdentifier' */ + @Test + public void modelIdentifierTest() { + // TODO: test modelIdentifier + } + + /** Test the property 'priority' */ + @Test + public void priorityTest() { + // TODO: test priority + } +} diff --git a/sdks/java/src/test/java/com/thoughtspot/client/model/VariableValuesTest.java b/sdks/java/src/test/java/com/thoughtspot/client/model/VariableValuesTest.java new file mode 100644 index 000000000..145945621 --- /dev/null +++ b/sdks/java/src/test/java/com/thoughtspot/client/model/VariableValuesTest.java @@ -0,0 +1,30 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client.model; + +import org.junit.jupiter.api.Test; + +/** Model tests for VariableValues */ +public class VariableValuesTest { + private final VariableValues model = new VariableValues(); + + /** Model tests for VariableValues */ + @Test + public void testVariableValues() { + // TODO: test VariableValues + } + + /** Test the property 'name' */ + @Test + public void nameTest() { + // TODO: test name + } + + /** Test the property 'values' */ + @Test + public void valuesTest() { + // TODO: test values + } +} diff --git a/sdks/java/src/test/java/com/thoughtspot/client/model/WebhookAuthApiKeyInputTest.java b/sdks/java/src/test/java/com/thoughtspot/client/model/WebhookAuthApiKeyInputTest.java new file mode 100644 index 000000000..4ae3d3fc4 --- /dev/null +++ b/sdks/java/src/test/java/com/thoughtspot/client/model/WebhookAuthApiKeyInputTest.java @@ -0,0 +1,30 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client.model; + +import org.junit.jupiter.api.Test; + +/** Model tests for WebhookAuthApiKeyInput */ +public class WebhookAuthApiKeyInputTest { + private final WebhookAuthApiKeyInput model = new WebhookAuthApiKeyInput(); + + /** Model tests for WebhookAuthApiKeyInput */ + @Test + public void testWebhookAuthApiKeyInput() { + // TODO: test WebhookAuthApiKeyInput + } + + /** Test the property 'key' */ + @Test + public void keyTest() { + // TODO: test key + } + + /** Test the property 'value' */ + @Test + public void valueTest() { + // TODO: test value + } +} diff --git a/sdks/java/src/test/java/com/thoughtspot/client/model/WebhookAuthApiKeyTest.java b/sdks/java/src/test/java/com/thoughtspot/client/model/WebhookAuthApiKeyTest.java new file mode 100644 index 000000000..7ff9eb165 --- /dev/null +++ b/sdks/java/src/test/java/com/thoughtspot/client/model/WebhookAuthApiKeyTest.java @@ -0,0 +1,30 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client.model; + +import org.junit.jupiter.api.Test; + +/** Model tests for WebhookAuthApiKey */ +public class WebhookAuthApiKeyTest { + private final WebhookAuthApiKey model = new WebhookAuthApiKey(); + + /** Model tests for WebhookAuthApiKey */ + @Test + public void testWebhookAuthApiKey() { + // TODO: test WebhookAuthApiKey + } + + /** Test the property 'key' */ + @Test + public void keyTest() { + // TODO: test key + } + + /** Test the property 'value' */ + @Test + public void valueTest() { + // TODO: test value + } +} diff --git a/sdks/java/src/test/java/com/thoughtspot/client/model/WebhookAuthBasicAuthInputTest.java b/sdks/java/src/test/java/com/thoughtspot/client/model/WebhookAuthBasicAuthInputTest.java new file mode 100644 index 000000000..2bfc0709d --- /dev/null +++ b/sdks/java/src/test/java/com/thoughtspot/client/model/WebhookAuthBasicAuthInputTest.java @@ -0,0 +1,30 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client.model; + +import org.junit.jupiter.api.Test; + +/** Model tests for WebhookAuthBasicAuthInput */ +public class WebhookAuthBasicAuthInputTest { + private final WebhookAuthBasicAuthInput model = new WebhookAuthBasicAuthInput(); + + /** Model tests for WebhookAuthBasicAuthInput */ + @Test + public void testWebhookAuthBasicAuthInput() { + // TODO: test WebhookAuthBasicAuthInput + } + + /** Test the property 'username' */ + @Test + public void usernameTest() { + // TODO: test username + } + + /** Test the property 'password' */ + @Test + public void passwordTest() { + // TODO: test password + } +} diff --git a/sdks/java/src/test/java/com/thoughtspot/client/model/WebhookAuthBasicAuthTest.java b/sdks/java/src/test/java/com/thoughtspot/client/model/WebhookAuthBasicAuthTest.java new file mode 100644 index 000000000..9ab7b5238 --- /dev/null +++ b/sdks/java/src/test/java/com/thoughtspot/client/model/WebhookAuthBasicAuthTest.java @@ -0,0 +1,30 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client.model; + +import org.junit.jupiter.api.Test; + +/** Model tests for WebhookAuthBasicAuth */ +public class WebhookAuthBasicAuthTest { + private final WebhookAuthBasicAuth model = new WebhookAuthBasicAuth(); + + /** Model tests for WebhookAuthBasicAuth */ + @Test + public void testWebhookAuthBasicAuth() { + // TODO: test WebhookAuthBasicAuth + } + + /** Test the property 'username' */ + @Test + public void usernameTest() { + // TODO: test username + } + + /** Test the property 'password' */ + @Test + public void passwordTest() { + // TODO: test password + } +} diff --git a/sdks/java/src/test/java/com/thoughtspot/client/model/WebhookAuthOAuth2InputTest.java b/sdks/java/src/test/java/com/thoughtspot/client/model/WebhookAuthOAuth2InputTest.java new file mode 100644 index 000000000..ebc5d8694 --- /dev/null +++ b/sdks/java/src/test/java/com/thoughtspot/client/model/WebhookAuthOAuth2InputTest.java @@ -0,0 +1,36 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client.model; + +import org.junit.jupiter.api.Test; + +/** Model tests for WebhookAuthOAuth2Input */ +public class WebhookAuthOAuth2InputTest { + private final WebhookAuthOAuth2Input model = new WebhookAuthOAuth2Input(); + + /** Model tests for WebhookAuthOAuth2Input */ + @Test + public void testWebhookAuthOAuth2Input() { + // TODO: test WebhookAuthOAuth2Input + } + + /** Test the property 'authorizationUrl' */ + @Test + public void authorizationUrlTest() { + // TODO: test authorizationUrl + } + + /** Test the property 'clientId' */ + @Test + public void clientIdTest() { + // TODO: test clientId + } + + /** Test the property 'clientSecret' */ + @Test + public void clientSecretTest() { + // TODO: test clientSecret + } +} diff --git a/sdks/java/src/test/java/com/thoughtspot/client/model/WebhookAuthOAuth2Test.java b/sdks/java/src/test/java/com/thoughtspot/client/model/WebhookAuthOAuth2Test.java new file mode 100644 index 000000000..174a981fe --- /dev/null +++ b/sdks/java/src/test/java/com/thoughtspot/client/model/WebhookAuthOAuth2Test.java @@ -0,0 +1,36 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client.model; + +import org.junit.jupiter.api.Test; + +/** Model tests for WebhookAuthOAuth2 */ +public class WebhookAuthOAuth2Test { + private final WebhookAuthOAuth2 model = new WebhookAuthOAuth2(); + + /** Model tests for WebhookAuthOAuth2 */ + @Test + public void testWebhookAuthOAuth2() { + // TODO: test WebhookAuthOAuth2 + } + + /** Test the property 'authorizationUrl' */ + @Test + public void authorizationUrlTest() { + // TODO: test authorizationUrl + } + + /** Test the property 'clientId' */ + @Test + public void clientIdTest() { + // TODO: test clientId + } + + /** Test the property 'clientSecret' */ + @Test + public void clientSecretTest() { + // TODO: test clientSecret + } +} diff --git a/sdks/java/src/test/java/com/thoughtspot/client/model/WebhookAuthenticationInputTest.java b/sdks/java/src/test/java/com/thoughtspot/client/model/WebhookAuthenticationInputTest.java new file mode 100644 index 000000000..590bfb6e6 --- /dev/null +++ b/sdks/java/src/test/java/com/thoughtspot/client/model/WebhookAuthenticationInputTest.java @@ -0,0 +1,42 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client.model; + +import org.junit.jupiter.api.Test; + +/** Model tests for WebhookAuthenticationInput */ +public class WebhookAuthenticationInputTest { + private final WebhookAuthenticationInput model = new WebhookAuthenticationInput(); + + /** Model tests for WebhookAuthenticationInput */ + @Test + public void testWebhookAuthenticationInput() { + // TODO: test WebhookAuthenticationInput + } + + /** Test the property 'API_KEY' */ + @Test + public void API_KEYTest() { + // TODO: test API_KEY + } + + /** Test the property 'BASIC_AUTH' */ + @Test + public void BASIC_AUTHTest() { + // TODO: test BASIC_AUTH + } + + /** Test the property 'BEARER_TOKEN' */ + @Test + public void BEARER_TOKENTest() { + // TODO: test BEARER_TOKEN + } + + /** Test the property 'OAUTH2' */ + @Test + public void OAUTH2Test() { + // TODO: test OAUTH2 + } +} diff --git a/sdks/java/src/test/java/com/thoughtspot/client/model/WebhookAuthenticationTest.java b/sdks/java/src/test/java/com/thoughtspot/client/model/WebhookAuthenticationTest.java new file mode 100644 index 000000000..81346e033 --- /dev/null +++ b/sdks/java/src/test/java/com/thoughtspot/client/model/WebhookAuthenticationTest.java @@ -0,0 +1,42 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client.model; + +import org.junit.jupiter.api.Test; + +/** Model tests for WebhookAuthentication */ +public class WebhookAuthenticationTest { + private final WebhookAuthentication model = new WebhookAuthentication(); + + /** Model tests for WebhookAuthentication */ + @Test + public void testWebhookAuthentication() { + // TODO: test WebhookAuthentication + } + + /** Test the property 'API_KEY' */ + @Test + public void API_KEYTest() { + // TODO: test API_KEY + } + + /** Test the property 'BASIC_AUTH' */ + @Test + public void BASIC_AUTHTest() { + // TODO: test BASIC_AUTH + } + + /** Test the property 'BEARER_TOKEN' */ + @Test + public void BEARER_TOKENTest() { + // TODO: test BEARER_TOKEN + } + + /** Test the property 'OAUTH2' */ + @Test + public void OAUTH2Test() { + // TODO: test OAUTH2 + } +} diff --git a/sdks/java/src/test/java/com/thoughtspot/client/model/WebhookDeleteFailureTest.java b/sdks/java/src/test/java/com/thoughtspot/client/model/WebhookDeleteFailureTest.java new file mode 100644 index 000000000..d2eebe451 --- /dev/null +++ b/sdks/java/src/test/java/com/thoughtspot/client/model/WebhookDeleteFailureTest.java @@ -0,0 +1,36 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client.model; + +import org.junit.jupiter.api.Test; + +/** Model tests for WebhookDeleteFailure */ +public class WebhookDeleteFailureTest { + private final WebhookDeleteFailure model = new WebhookDeleteFailure(); + + /** Model tests for WebhookDeleteFailure */ + @Test + public void testWebhookDeleteFailure() { + // TODO: test WebhookDeleteFailure + } + + /** Test the property 'id' */ + @Test + public void idTest() { + // TODO: test id + } + + /** Test the property 'name' */ + @Test + public void nameTest() { + // TODO: test name + } + + /** Test the property 'error' */ + @Test + public void errorTest() { + // TODO: test error + } +} diff --git a/sdks/java/src/test/java/com/thoughtspot/client/model/WebhookDeleteResponseTest.java b/sdks/java/src/test/java/com/thoughtspot/client/model/WebhookDeleteResponseTest.java new file mode 100644 index 000000000..0f0314e33 --- /dev/null +++ b/sdks/java/src/test/java/com/thoughtspot/client/model/WebhookDeleteResponseTest.java @@ -0,0 +1,42 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client.model; + +import org.junit.jupiter.api.Test; + +/** Model tests for WebhookDeleteResponse */ +public class WebhookDeleteResponseTest { + private final WebhookDeleteResponse model = new WebhookDeleteResponse(); + + /** Model tests for WebhookDeleteResponse */ + @Test + public void testWebhookDeleteResponse() { + // TODO: test WebhookDeleteResponse + } + + /** Test the property 'deletedCount' */ + @Test + public void deletedCountTest() { + // TODO: test deletedCount + } + + /** Test the property 'failedCount' */ + @Test + public void failedCountTest() { + // TODO: test failedCount + } + + /** Test the property 'deletedWebhooks' */ + @Test + public void deletedWebhooksTest() { + // TODO: test deletedWebhooks + } + + /** Test the property 'failedWebhooks' */ + @Test + public void failedWebhooksTest() { + // TODO: test failedWebhooks + } +} diff --git a/sdks/java/src/test/java/com/thoughtspot/client/model/WebhookKeyValuePairInputTest.java b/sdks/java/src/test/java/com/thoughtspot/client/model/WebhookKeyValuePairInputTest.java new file mode 100644 index 000000000..4fa43f78b --- /dev/null +++ b/sdks/java/src/test/java/com/thoughtspot/client/model/WebhookKeyValuePairInputTest.java @@ -0,0 +1,30 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client.model; + +import org.junit.jupiter.api.Test; + +/** Model tests for WebhookKeyValuePairInput */ +public class WebhookKeyValuePairInputTest { + private final WebhookKeyValuePairInput model = new WebhookKeyValuePairInput(); + + /** Model tests for WebhookKeyValuePairInput */ + @Test + public void testWebhookKeyValuePairInput() { + // TODO: test WebhookKeyValuePairInput + } + + /** Test the property 'key' */ + @Test + public void keyTest() { + // TODO: test key + } + + /** Test the property 'value' */ + @Test + public void valueTest() { + // TODO: test value + } +} diff --git a/sdks/java/src/test/java/com/thoughtspot/client/model/WebhookKeyValuePairTest.java b/sdks/java/src/test/java/com/thoughtspot/client/model/WebhookKeyValuePairTest.java new file mode 100644 index 000000000..ea73823f2 --- /dev/null +++ b/sdks/java/src/test/java/com/thoughtspot/client/model/WebhookKeyValuePairTest.java @@ -0,0 +1,30 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client.model; + +import org.junit.jupiter.api.Test; + +/** Model tests for WebhookKeyValuePair */ +public class WebhookKeyValuePairTest { + private final WebhookKeyValuePair model = new WebhookKeyValuePair(); + + /** Model tests for WebhookKeyValuePair */ + @Test + public void testWebhookKeyValuePair() { + // TODO: test WebhookKeyValuePair + } + + /** Test the property 'key' */ + @Test + public void keyTest() { + // TODO: test key + } + + /** Test the property 'value' */ + @Test + public void valueTest() { + // TODO: test value + } +} diff --git a/sdks/java/src/test/java/com/thoughtspot/client/model/WebhookOrgTest.java b/sdks/java/src/test/java/com/thoughtspot/client/model/WebhookOrgTest.java new file mode 100644 index 000000000..59085662b --- /dev/null +++ b/sdks/java/src/test/java/com/thoughtspot/client/model/WebhookOrgTest.java @@ -0,0 +1,30 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client.model; + +import org.junit.jupiter.api.Test; + +/** Model tests for WebhookOrg */ +public class WebhookOrgTest { + private final WebhookOrg model = new WebhookOrg(); + + /** Model tests for WebhookOrg */ + @Test + public void testWebhookOrg() { + // TODO: test WebhookOrg + } + + /** Test the property 'id' */ + @Test + public void idTest() { + // TODO: test id + } + + /** Test the property 'name' */ + @Test + public void nameTest() { + // TODO: test name + } +} diff --git a/sdks/java/src/test/java/com/thoughtspot/client/model/WebhookPaginationTest.java b/sdks/java/src/test/java/com/thoughtspot/client/model/WebhookPaginationTest.java new file mode 100644 index 000000000..062998a9d --- /dev/null +++ b/sdks/java/src/test/java/com/thoughtspot/client/model/WebhookPaginationTest.java @@ -0,0 +1,42 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client.model; + +import org.junit.jupiter.api.Test; + +/** Model tests for WebhookPagination */ +public class WebhookPaginationTest { + private final WebhookPagination model = new WebhookPagination(); + + /** Model tests for WebhookPagination */ + @Test + public void testWebhookPagination() { + // TODO: test WebhookPagination + } + + /** Test the property 'recordOffset' */ + @Test + public void recordOffsetTest() { + // TODO: test recordOffset + } + + /** Test the property 'recordSize' */ + @Test + public void recordSizeTest() { + // TODO: test recordSize + } + + /** Test the property 'totalCount' */ + @Test + public void totalCountTest() { + // TODO: test totalCount + } + + /** Test the property 'hasMore' */ + @Test + public void hasMoreTest() { + // TODO: test hasMore + } +} diff --git a/sdks/java/src/test/java/com/thoughtspot/client/model/WebhookResponseTest.java b/sdks/java/src/test/java/com/thoughtspot/client/model/WebhookResponseTest.java new file mode 100644 index 000000000..50a9777dd --- /dev/null +++ b/sdks/java/src/test/java/com/thoughtspot/client/model/WebhookResponseTest.java @@ -0,0 +1,108 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client.model; + +import org.junit.jupiter.api.Test; + +/** Model tests for WebhookResponse */ +public class WebhookResponseTest { + private final WebhookResponse model = new WebhookResponse(); + + /** Model tests for WebhookResponse */ + @Test + public void testWebhookResponse() { + // TODO: test WebhookResponse + } + + /** Test the property 'id' */ + @Test + public void idTest() { + // TODO: test id + } + + /** Test the property 'name' */ + @Test + public void nameTest() { + // TODO: test name + } + + /** Test the property 'description' */ + @Test + public void descriptionTest() { + // TODO: test description + } + + /** Test the property 'org' */ + @Test + public void orgTest() { + // TODO: test org + } + + /** Test the property 'url' */ + @Test + public void urlTest() { + // TODO: test url + } + + /** Test the property 'urlParams' */ + @Test + public void urlParamsTest() { + // TODO: test urlParams + } + + /** Test the property 'events' */ + @Test + public void eventsTest() { + // TODO: test events + } + + /** Test the property 'authentication' */ + @Test + public void authenticationTest() { + // TODO: test authentication + } + + /** Test the property 'signatureVerification' */ + @Test + public void signatureVerificationTest() { + // TODO: test signatureVerification + } + + /** Test the property 'additionalHeaders' */ + @Test + public void additionalHeadersTest() { + // TODO: test additionalHeaders + } + + /** Test the property 'creationTimeInMillis' */ + @Test + public void creationTimeInMillisTest() { + // TODO: test creationTimeInMillis + } + + /** Test the property 'modificationTimeInMillis' */ + @Test + public void modificationTimeInMillisTest() { + // TODO: test modificationTimeInMillis + } + + /** Test the property 'createdBy' */ + @Test + public void createdByTest() { + // TODO: test createdBy + } + + /** Test the property 'lastModifiedBy' */ + @Test + public void lastModifiedByTest() { + // TODO: test lastModifiedBy + } + + /** Test the property 'storageDestination' */ + @Test + public void storageDestinationTest() { + // TODO: test storageDestination + } +} diff --git a/sdks/java/src/test/java/com/thoughtspot/client/model/WebhookSearchResponseTest.java b/sdks/java/src/test/java/com/thoughtspot/client/model/WebhookSearchResponseTest.java new file mode 100644 index 000000000..53d0e60c5 --- /dev/null +++ b/sdks/java/src/test/java/com/thoughtspot/client/model/WebhookSearchResponseTest.java @@ -0,0 +1,30 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client.model; + +import org.junit.jupiter.api.Test; + +/** Model tests for WebhookSearchResponse */ +public class WebhookSearchResponseTest { + private final WebhookSearchResponse model = new WebhookSearchResponse(); + + /** Model tests for WebhookSearchResponse */ + @Test + public void testWebhookSearchResponse() { + // TODO: test WebhookSearchResponse + } + + /** Test the property 'webhooks' */ + @Test + public void webhooksTest() { + // TODO: test webhooks + } + + /** Test the property 'pagination' */ + @Test + public void paginationTest() { + // TODO: test pagination + } +} diff --git a/sdks/java/src/test/java/com/thoughtspot/client/model/WebhookSignatureVerificationInputTest.java b/sdks/java/src/test/java/com/thoughtspot/client/model/WebhookSignatureVerificationInputTest.java new file mode 100644 index 000000000..49e049c66 --- /dev/null +++ b/sdks/java/src/test/java/com/thoughtspot/client/model/WebhookSignatureVerificationInputTest.java @@ -0,0 +1,42 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client.model; + +import org.junit.jupiter.api.Test; + +/** Model tests for WebhookSignatureVerificationInput */ +public class WebhookSignatureVerificationInputTest { + private final WebhookSignatureVerificationInput model = new WebhookSignatureVerificationInput(); + + /** Model tests for WebhookSignatureVerificationInput */ + @Test + public void testWebhookSignatureVerificationInput() { + // TODO: test WebhookSignatureVerificationInput + } + + /** Test the property 'type' */ + @Test + public void typeTest() { + // TODO: test type + } + + /** Test the property 'header' */ + @Test + public void headerTest() { + // TODO: test header + } + + /** Test the property 'algorithm' */ + @Test + public void algorithmTest() { + // TODO: test algorithm + } + + /** Test the property 'secret' */ + @Test + public void secretTest() { + // TODO: test secret + } +} diff --git a/sdks/java/src/test/java/com/thoughtspot/client/model/WebhookSignatureVerificationTest.java b/sdks/java/src/test/java/com/thoughtspot/client/model/WebhookSignatureVerificationTest.java new file mode 100644 index 000000000..61889f344 --- /dev/null +++ b/sdks/java/src/test/java/com/thoughtspot/client/model/WebhookSignatureVerificationTest.java @@ -0,0 +1,42 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client.model; + +import org.junit.jupiter.api.Test; + +/** Model tests for WebhookSignatureVerification */ +public class WebhookSignatureVerificationTest { + private final WebhookSignatureVerification model = new WebhookSignatureVerification(); + + /** Model tests for WebhookSignatureVerification */ + @Test + public void testWebhookSignatureVerification() { + // TODO: test WebhookSignatureVerification + } + + /** Test the property 'type' */ + @Test + public void typeTest() { + // TODO: test type + } + + /** Test the property 'header' */ + @Test + public void headerTest() { + // TODO: test header + } + + /** Test the property 'algorithm' */ + @Test + public void algorithmTest() { + // TODO: test algorithm + } + + /** Test the property 'secret' */ + @Test + public void secretTest() { + // TODO: test secret + } +} diff --git a/sdks/java/src/test/java/com/thoughtspot/client/model/WebhookSortOptionsInputTest.java b/sdks/java/src/test/java/com/thoughtspot/client/model/WebhookSortOptionsInputTest.java new file mode 100644 index 000000000..7f69c60de --- /dev/null +++ b/sdks/java/src/test/java/com/thoughtspot/client/model/WebhookSortOptionsInputTest.java @@ -0,0 +1,30 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client.model; + +import org.junit.jupiter.api.Test; + +/** Model tests for WebhookSortOptionsInput */ +public class WebhookSortOptionsInputTest { + private final WebhookSortOptionsInput model = new WebhookSortOptionsInput(); + + /** Model tests for WebhookSortOptionsInput */ + @Test + public void testWebhookSortOptionsInput() { + // TODO: test WebhookSortOptionsInput + } + + /** Test the property 'fieldName' */ + @Test + public void fieldNameTest() { + // TODO: test fieldName + } + + /** Test the property 'order' */ + @Test + public void orderTest() { + // TODO: test order + } +} diff --git a/sdks/java/src/test/java/com/thoughtspot/client/model/WebhookUserTest.java b/sdks/java/src/test/java/com/thoughtspot/client/model/WebhookUserTest.java new file mode 100644 index 000000000..485e0cbe1 --- /dev/null +++ b/sdks/java/src/test/java/com/thoughtspot/client/model/WebhookUserTest.java @@ -0,0 +1,30 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client.model; + +import org.junit.jupiter.api.Test; + +/** Model tests for WebhookUser */ +public class WebhookUserTest { + private final WebhookUser model = new WebhookUser(); + + /** Model tests for WebhookUser */ + @Test + public void testWebhookUser() { + // TODO: test WebhookUser + } + + /** Test the property 'id' */ + @Test + public void idTest() { + // TODO: test id + } + + /** Test the property 'name' */ + @Test + public void nameTest() { + // TODO: test name + } +} diff --git a/sdks/java/utils/settings.xml b/sdks/java/utils/settings.xml new file mode 100644 index 000000000..731eaa7c1 --- /dev/null +++ b/sdks/java/utils/settings.xml @@ -0,0 +1,28 @@ + + + + + + central + $MVN_USERNAME + $MVN_PASSWORD + + + $GPG_KEY_ID + $GPG_PASSPHRASE + + + + + gpg.signing + + true + + + $GPG_KEY_ID + + + + \ No newline at end of file diff --git a/sdks/typescript/.gitignore b/sdks/typescript/.gitignore new file mode 100644 index 000000000..b512c09d4 --- /dev/null +++ b/sdks/typescript/.gitignore @@ -0,0 +1 @@ +node_modules \ No newline at end of file diff --git a/sdks/typescript/.openapi-generator-ignore b/sdks/typescript/.openapi-generator-ignore new file mode 100755 index 000000000..afa4804e9 --- /dev/null +++ b/sdks/typescript/.openapi-generator-ignore @@ -0,0 +1,7 @@ +# OpenAPI Generator Ignore +# Generated by openapi-generator https://github.com/openapitools/openapi-generator + +# apis/Class[0-9][0-9][0-9]*.* +# Class[0-9][0-9][0-9]*.* + +tests/customTests/**/*.ts diff --git a/sdks/typescript/.openapi-generator/FILES b/sdks/typescript/.openapi-generator/FILES new file mode 100644 index 000000000..d4de6014a --- /dev/null +++ b/sdks/typescript/.openapi-generator/FILES @@ -0,0 +1,563 @@ +.gitignore +AIApi.md +AuthenticationApi.md +CollectionsApi.md +ConnectionConfigurationsApi.md +ConnectionsApi.md +CustomActionApi.md +CustomCalendarsApi.md +DBTApi.md +DataApi.md +EmailCustomizationApi.md +GroupsApi.md +JobsApi.md +LogApi.md +MetadataApi.md +OrgsApi.md +README.md +ReportsApi.md +RolesApi.md +SchedulesApi.md +SecurityApi.md +SystemApi.md +TagsApi.md +ThoughtSpotRestApi.md +UsersApi.md +VariableApi.md +VersionControlApi.md +WebhooksApi.md +apis/AIApi.ts +apis/AuthenticationApi.ts +apis/CollectionsApi.ts +apis/ConnectionConfigurationsApi.ts +apis/ConnectionsApi.ts +apis/CustomActionApi.ts +apis/CustomCalendarsApi.ts +apis/DBTApi.ts +apis/DataApi.ts +apis/EmailCustomizationApi.ts +apis/GroupsApi.ts +apis/JobsApi.ts +apis/LogApi.ts +apis/MetadataApi.ts +apis/OrgsApi.ts +apis/ReportsApi.ts +apis/RolesApi.ts +apis/SchedulesApi.ts +apis/SecurityApi.ts +apis/SystemApi.ts +apis/TagsApi.ts +apis/ThoughtSpotRestApi.ts +apis/UsersApi.ts +apis/VariableApi.ts +apis/VersionControlApi.ts +apis/WebhooksApi.ts +apis/baseapi.ts +apis/exception.ts +auth/auth.ts +configuration.ts +git_push.sh +http/http.ts +http/isomorphic-fetch.ts +index.ts +middleware.ts +models/AIContext.ts +models/APIKey.ts +models/APIKeyInput.ts +models/AccessToken.ts +models/ActionConfig.ts +models/ActionConfigInput.ts +models/ActionConfigInputCreate.ts +models/ActionDetails.ts +models/ActionDetailsInput.ts +models/ActionDetailsInputCreate.ts +models/ActivateUserRequest.ts +models/AgentConversation.ts +models/AnswerContent.ts +models/AnswerDataResponse.ts +models/AnswerPngOptionsInput.ts +models/AssignChangeAuthorRequest.ts +models/AssignTagRequest.ts +models/AssociateMetadataInput.ts +models/AssociateMetadataInputCreate.ts +models/AuthClusterPreferences.ts +models/AuthClusterPreferencesInput.ts +models/AuthOrgInfo.ts +models/AuthOrgPreference.ts +models/AuthOrgPreferenceInput.ts +models/AuthSettingsAccessToken.ts +models/Authentication.ts +models/AuthenticationInput.ts +models/Author.ts +models/AuthorMetadataTypeInput.ts +models/AuthorType.ts +models/AwsS3Config.ts +models/AwsS3ConfigInput.ts +models/BasicAuth.ts +models/BasicAuthInput.ts +models/CALLBACK.ts +models/CALLBACKInput.ts +models/CALLBACKInputMandatory.ts +models/CalendarResponse.ts +models/ChangeUserPasswordRequest.ts +models/ChannelHistoryEventInfo.ts +models/ChannelHistoryEventInput.ts +models/ChannelHistoryJob.ts +models/ChannelValidationAwsS3Info.ts +models/ChannelValidationDetail.ts +models/ClusterNonEmbedAccess.ts +models/ClusterNonEmbedAccessInput.ts +models/Collection.ts +models/CollectionDeleteResponse.ts +models/CollectionDeleteTypeIdentifiers.ts +models/CollectionEntityIdentifier.ts +models/CollectionMetadataInput.ts +models/CollectionMetadataItem.ts +models/CollectionSearchResponse.ts +models/Column.ts +models/ColumnSecurityRule.ts +models/ColumnSecurityRuleColumn.ts +models/ColumnSecurityRuleGroup.ts +models/ColumnSecurityRuleGroupOperation.ts +models/ColumnSecurityRuleResponse.ts +models/ColumnSecurityRuleSourceTable.ts +models/ColumnSecurityRuleTableInput.ts +models/ColumnSecurityRuleUpdate.ts +models/CommitBranchRequest.ts +models/CommitFileType.ts +models/CommitHistoryResponse.ts +models/CommitResponse.ts +models/CommiterType.ts +models/CommunicationChannelPreferencesResponse.ts +models/CommunicationChannelValidateResponse.ts +models/ConfigureAuthSettingsRequest.ts +models/ConfigureAuthSettingsRequestClusterPreferences.ts +models/ConfigureCommunicationChannelPreferencesRequest.ts +models/ConfigureSecuritySettingsRequest.ts +models/ConfigureSecuritySettingsRequestClusterPreferences.ts +models/ConnectionConfigurationResponse.ts +models/ConnectionConfigurationSearchRequest.ts +models/ConnectionInput.ts +models/ContextPayloadV2Input.ts +models/Conversation.ts +models/ConversationSettingsInput.ts +models/ConvertWorksheetToModelRequest.ts +models/CopyObjectRequest.ts +models/CreateAgentConversationRequest.ts +models/CreateAgentConversationRequestConversationSettings.ts +models/CreateAgentConversationRequestMetadataContext.ts +models/CreateCalendarRequest.ts +models/CreateCalendarRequestTableReference.ts +models/CreateCollectionRequest.ts +models/CreateConfigRequest.ts +models/CreateConnectionConfigurationRequest.ts +models/CreateConnectionConfigurationRequestPolicyProcessOptions.ts +models/CreateConnectionRequest.ts +models/CreateConnectionResponse.ts +models/CreateConversationRequest.ts +models/CreateCustomActionRequest.ts +models/CreateCustomActionRequestActionDetails.ts +models/CreateCustomActionRequestDefaultActionConfig.ts +models/CreateEmailCustomizationRequest.ts +models/CreateEmailCustomizationRequestTemplateProperties.ts +models/CreateEmailCustomizationResponse.ts +models/CreateOrgRequest.ts +models/CreateRoleRequest.ts +models/CreateScheduleRequest.ts +models/CreateScheduleRequestFrequency.ts +models/CreateScheduleRequestLiveboardOptions.ts +models/CreateScheduleRequestPdfOptions.ts +models/CreateScheduleRequestRecipientDetails.ts +models/CreateTagRequest.ts +models/CreateUserGroupRequest.ts +models/CreateUserRequest.ts +models/CreateVariableRequest.ts +models/CreateWebhookConfigurationRequest.ts +models/CreateWebhookConfigurationRequestAuthentication.ts +models/CreateWebhookConfigurationRequestSignatureVerification.ts +models/CreateWebhookConfigurationRequestStorageDestination.ts +models/CronExpression.ts +models/CronExpressionInput.ts +models/CspSettings.ts +models/CspSettingsInput.ts +models/CustomActionMetadataTypeInput.ts +models/DataSource.ts +models/DataSourceContextInput.ts +models/DataWarehouseObjectInput.ts +models/DataWarehouseObjects.ts +models/Database.ts +models/DbtSearchResponse.ts +models/DeactivateUserRequest.ts +models/DefaultActionConfig.ts +models/DefaultActionConfigInput.ts +models/DefaultActionConfigInputCreate.ts +models/DefaultActionConfigSearchInput.ts +models/DeleteCollectionRequest.ts +models/DeleteConfigRequest.ts +models/DeleteConnectionConfigurationRequest.ts +models/DeleteConnectionRequest.ts +models/DeleteMetadataRequest.ts +models/DeleteMetadataTypeInput.ts +models/DeleteOrgEmailCustomizationRequest.ts +models/DeleteVariablesRequest.ts +models/DeleteWebhookConfigurationsRequest.ts +models/DeployCommitRequest.ts +models/DeployResponse.ts +models/EntityHeader.ts +models/ErrorResponse.ts +models/EurekaDataSourceSuggestionResponse.ts +models/EurekaDecomposeQueryResponse.ts +models/EurekaGetNLInstructionsResponse.ts +models/EurekaGetRelevantQuestionsResponse.ts +models/EurekaLLMDecomposeQueryResponse.ts +models/EurekaLLMSuggestedQuery.ts +models/EurekaRelevantQuestion.ts +models/EurekaSetNLInstructionsResponse.ts +models/EventChannelConfig.ts +models/EventChannelConfigInput.ts +models/ExcludeMetadataListItemInput.ts +models/ExportAnswerReportRequest.ts +models/ExportAnswerReportRequestPngOptions.ts +models/ExportAnswerReportRequestRegionalSettings.ts +models/ExportLiveboardReportRequest.ts +models/ExportLiveboardReportRequestPdfOptions.ts +models/ExportLiveboardReportRequestPngOptions.ts +models/ExportMetadataTMLBatchedRequest.ts +models/ExportMetadataTMLRequest.ts +models/ExportMetadataTMLRequestExportOptions.ts +models/ExportMetadataTypeInput.ts +models/ExportOptions.ts +models/ExternalTableInput.ts +models/FavoriteMetadataInput.ts +models/FavoriteMetadataItem.ts +models/FavoriteObjectOptionsInput.ts +models/FetchAnswerDataRequest.ts +models/FetchAnswerSqlQueryRequest.ts +models/FetchAsyncImportTaskStatusRequest.ts +models/FetchColumnSecurityRulesRequest.ts +models/FetchConnectionDiffStatusResponse.ts +models/FetchLiveboardDataRequest.ts +models/FetchLiveboardSqlQueryRequest.ts +models/FetchLogsRequest.ts +models/FetchObjectPrivilegesRequest.ts +models/FetchPermissionsOfPrincipalsRequest.ts +models/FetchPermissionsOnMetadataRequest.ts +models/FilterRules.ts +models/ForceLogoutUsersRequest.ts +models/Frequency.ts +models/FrequencyInput.ts +models/GenerateCSVRequest.ts +models/GenericInfo.ts +models/GetAsyncImportStatusResponse.ts +models/GetCustomAccessTokenRequest.ts +models/GetDataSourceSuggestionsRequest.ts +models/GetFullAccessTokenRequest.ts +models/GetFullAccessTokenRequestUserParameters.ts +models/GetNLInstructionsRequest.ts +models/GetObjectAccessTokenRequest.ts +models/GetRelevantQuestionsRequest.ts +models/GetRelevantQuestionsRequestAiContext.ts +models/GetRelevantQuestionsRequestMetadataContext.ts +models/GetTokenResponse.ts +models/GroupInfo.ts +models/GroupObject.ts +models/GroupsImportListInput.ts +models/HeaderAttributeInput.ts +models/HeaderUpdateInput.ts +models/ImportEPackAsyncTaskStatus.ts +models/ImportMetadataTMLAsyncRequest.ts +models/ImportMetadataTMLRequest.ts +models/ImportUser.ts +models/ImportUserGroupsRequest.ts +models/ImportUserGroupsResponse.ts +models/ImportUserType.ts +models/ImportUsersRequest.ts +models/ImportUsersResponse.ts +models/InputEurekaNLSRequest.ts +models/JWTMetadataObject.ts +models/JWTParameter.ts +models/JWTUserOptions.ts +models/JWTUserOptionsFull.ts +models/JobRecipient.ts +models/LiveboardContent.ts +models/LiveboardDataResponse.ts +models/LiveboardOptions.ts +models/LiveboardOptionsInput.ts +models/LogResponse.ts +models/LoginRequest.ts +models/ManageObjectPrivilegeRequest.ts +models/MetadataAssociationItem.ts +models/MetadataContext.ts +models/MetadataInput.ts +models/MetadataListItemInput.ts +models/MetadataObject.ts +models/MetadataResponse.ts +models/MetadataSearchResponse.ts +models/MetadataSearchSortOptions.ts +models/ModelTableList.ts +models/NLInstructionsInfo.ts +models/NLInstructionsInfoInput.ts +models/ObjectIDAndName.ts +models/ObjectPrivilegesMetadataInput.ts +models/ObjectPrivilegesOfMetadataResponse.ts +models/ObjectSerializer.ts +models/Org.ts +models/OrgChannelConfigInput.ts +models/OrgChannelConfigResponse.ts +models/OrgDetails.ts +models/OrgInfo.ts +models/OrgNonEmbedAccess.ts +models/OrgNonEmbedAccessInput.ts +models/OrgPreferenceSearchCriteriaInput.ts +models/OrgResponse.ts +models/OrgType.ts +models/ParameterValues.ts +models/ParameterizeMetadataFieldsRequest.ts +models/ParameterizeMetadataRequest.ts +models/ParametersListItem.ts +models/ParametersListItemInput.ts +models/PdfOptions.ts +models/PdfOptionsInput.ts +models/PermissionInput.ts +models/PermissionOfMetadataResponse.ts +models/PermissionOfPrincipalsResponse.ts +models/PermissionsMetadataTypeInput.ts +models/PngOptionsInput.ts +models/PolicyProcessOptions.ts +models/PolicyProcessOptionsInput.ts +models/PrincipalsInput.ts +models/PrincipalsListItem.ts +models/PrincipalsListItemInput.ts +models/PublishMetadataListItem.ts +models/PublishMetadataRequest.ts +models/PutVariableValuesRequest.ts +models/QueryGetDecomposedQueryRequest.ts +models/QueryGetDecomposedQueryRequestNlsRequest.ts +models/RecipientDetails.ts +models/RecipientDetailsInput.ts +models/RegionalSettingsInput.ts +models/RepoConfigObject.ts +models/ResetUserPasswordRequest.ts +models/ResponseActivationURL.ts +models/ResponseCopyObject.ts +models/ResponseCustomAction.ts +models/ResponseFailedEntities.ts +models/ResponseFailedEntity.ts +models/ResponseIncompleteEntities.ts +models/ResponseIncompleteEntity.ts +models/ResponseMessage.ts +models/ResponsePostUpgradeFailedEntities.ts +models/ResponsePostUpgradeFailedEntity.ts +models/ResponseSchedule.ts +models/ResponseScheduleRun.ts +models/ResponseSuccessfulEntities.ts +models/ResponseSuccessfulEntity.ts +models/ResponseWorksheetToModelConversion.ts +models/RevertCommitRequest.ts +models/RevertResponse.ts +models/RevertedMetadata.ts +models/RevokeRefreshTokensRequest.ts +models/RevokeRefreshTokensResponse.ts +models/RevokeTokenRequest.ts +models/RiseGQLArgWrapper.ts +models/RiseSetter.ts +models/Role.ts +models/RoleResponse.ts +models/RuntimeFilter.ts +models/RuntimeFilters.ts +models/RuntimeParamOverride.ts +models/RuntimeParameters.ts +models/RuntimeSort.ts +models/RuntimeSorts.ts +models/ScheduleHistoryRunsOptionsInput.ts +models/SchedulesPdfOptionsInput.ts +models/SchemaObject.ts +models/Scope.ts +models/ScriptSrcUrls.ts +models/ScriptSrcUrlsInput.ts +models/SearchAuthSettingsRequest.ts +models/SearchAuthSettingsResponse.ts +models/SearchCalendarsRequest.ts +models/SearchCalendarsRequestSortOptions.ts +models/SearchChannelHistoryRequest.ts +models/SearchChannelHistoryResponse.ts +models/SearchCollectionsRequest.ts +models/SearchCollectionsRequestSortOptions.ts +models/SearchCommitsRequest.ts +models/SearchCommunicationChannelPreferencesRequest.ts +models/SearchConfigRequest.ts +models/SearchConnectionRequest.ts +models/SearchConnectionRequestSortOptions.ts +models/SearchConnectionResponse.ts +models/SearchCustomActionsRequest.ts +models/SearchCustomActionsRequestDefaultActionConfig.ts +models/SearchDataRequest.ts +models/SearchDataResponse.ts +models/SearchEmailCustomizationRequest.ts +models/SearchMetadataRequest.ts +models/SearchMetadataRequestFavoriteObjectOptions.ts +models/SearchMetadataRequestSortOptions.ts +models/SearchOrgsRequest.ts +models/SearchRoleResponse.ts +models/SearchRolesRequest.ts +models/SearchSchedulesRequest.ts +models/SearchSchedulesRequestHistoryRunsOptions.ts +models/SearchSchedulesRequestSortOptions.ts +models/SearchSecuritySettingsRequest.ts +models/SearchTagsRequest.ts +models/SearchUserGroupsRequest.ts +models/SearchUserGroupsRequestSortOptions.ts +models/SearchUsersRequest.ts +models/SearchVariablesRequest.ts +models/SearchWebhookConfigurationsRequest.ts +models/SearchWebhookConfigurationsRequestSortOptions.ts +models/SecuritySettingsClusterPreferences.ts +models/SecuritySettingsClusterPreferencesInput.ts +models/SecuritySettingsOrgDetails.ts +models/SecuritySettingsOrgPreferences.ts +models/SecuritySettingsOrgPreferencesInput.ts +models/SecuritySettingsResponse.ts +models/SendAgentConversationMessageRequest.ts +models/SendAgentConversationMessageStreamingRequest.ts +models/SendAgentMessageRequest.ts +models/SendAgentMessageResponse.ts +models/SendAgentMessageStreamingRequest.ts +models/SendMessageRequest.ts +models/SetNLInstructionsRequest.ts +models/ShareMetadataRequest.ts +models/ShareMetadataTypeInput.ts +models/SharePermissionsInput.ts +models/SingleAnswerRequest.ts +models/SortOption.ts +models/SortOptionInput.ts +models/SortOptions.ts +models/SortingOptions.ts +models/SqlQuery.ts +models/SqlQueryResponse.ts +models/StorageConfig.ts +models/StorageConfigInput.ts +models/StorageDestination.ts +models/StorageDestinationInput.ts +models/SyncMetadataRequest.ts +models/SyncMetadataResponse.ts +models/SystemConfig.ts +models/SystemInfo.ts +models/SystemOverrideInfo.ts +models/Table.ts +models/Tag.ts +models/TagMetadataTypeInput.ts +models/TemplatePropertiesInputCreate.ts +models/Token.ts +models/TokenAccessScopeObject.ts +models/TokenValidationResponse.ts +models/URL.ts +models/URLInput.ts +models/URLInputMandatory.ts +models/UnassignTagRequest.ts +models/UnparameterizeMetadataRequest.ts +models/UnpublishMetadataRequest.ts +models/UpdateCalendarRequest.ts +models/UpdateCalendarRequestTableReference.ts +models/UpdateCollectionRequest.ts +models/UpdateColumnSecurityRulesRequest.ts +models/UpdateConfigRequest.ts +models/UpdateConnectionConfigurationRequest.ts +models/UpdateConnectionRequest.ts +models/UpdateConnectionStatusRequest.ts +models/UpdateConnectionV2Request.ts +models/UpdateCustomActionRequest.ts +models/UpdateCustomActionRequestActionDetails.ts +models/UpdateCustomActionRequestDefaultActionConfig.ts +models/UpdateEmailCustomizationRequest.ts +models/UpdateMetadataHeaderRequest.ts +models/UpdateMetadataObjIdRequest.ts +models/UpdateObjIdInput.ts +models/UpdateOrgRequest.ts +models/UpdateRoleRequest.ts +models/UpdateScheduleRequest.ts +models/UpdateScheduleRequestFrequency.ts +models/UpdateScheduleRequestLiveboardOptions.ts +models/UpdateScheduleRequestPdfOptions.ts +models/UpdateScheduleRequestRecipientDetails.ts +models/UpdateSystemConfigRequest.ts +models/UpdateTagRequest.ts +models/UpdateUserGroupRequest.ts +models/UpdateUserRequest.ts +models/UpdateVariableRequest.ts +models/UpdateVariableValuesRequest.ts +models/UpdateWebhookConfigurationRequest.ts +models/User.ts +models/UserGroup.ts +models/UserGroupResponse.ts +models/UserInfo.ts +models/UserObject.ts +models/UserParameterOptions.ts +models/UserPrincipal.ts +models/ValidateCommunicationChannelRequest.ts +models/ValidateMergeRequest.ts +models/ValidateTokenRequest.ts +models/ValueScopeInput.ts +models/Variable.ts +models/VariableDetailInput.ts +models/VariableOrgInfo.ts +models/VariablePutAssignmentInput.ts +models/VariableUpdateAssignmentInput.ts +models/VariableUpdateScopeInput.ts +models/VariableValue.ts +models/VariableValues.ts +models/WebhookAuthApiKey.ts +models/WebhookAuthApiKeyInput.ts +models/WebhookAuthBasicAuth.ts +models/WebhookAuthBasicAuthInput.ts +models/WebhookAuthOAuth2.ts +models/WebhookAuthOAuth2Input.ts +models/WebhookAuthentication.ts +models/WebhookAuthenticationInput.ts +models/WebhookDeleteFailure.ts +models/WebhookDeleteResponse.ts +models/WebhookKeyValuePair.ts +models/WebhookKeyValuePairInput.ts +models/WebhookOrg.ts +models/WebhookPagination.ts +models/WebhookResponse.ts +models/WebhookSearchResponse.ts +models/WebhookSignatureVerification.ts +models/WebhookSignatureVerificationInput.ts +models/WebhookSortOptionsInput.ts +models/WebhookUser.ts +models/all.ts +package.json +rxjsStub.ts +servers.ts +tests/AIApiTest.ts +tests/AuthenticationApiTest.ts +tests/CollectionsApiTest.ts +tests/ConnectionConfigurationsApiTest.ts +tests/ConnectionsApiTest.ts +tests/CustomActionApiTest.ts +tests/CustomCalendarsApiTest.ts +tests/DBTApiTest.ts +tests/DataApiTest.ts +tests/EmailCustomizationApiTest.ts +tests/GroupsApiTest.ts +tests/JobsApiTest.ts +tests/LogApiTest.ts +tests/MetadataApiTest.ts +tests/OrgsApiTest.ts +tests/ReportsApiTest.ts +tests/RolesApiTest.ts +tests/SchedulesApiTest.ts +tests/SecurityApiTest.ts +tests/SystemApiTest.ts +tests/TagsApiTest.ts +tests/ThoughtSpotRestApiTest.ts +tests/UsersApiTest.ts +tests/VariableApiTest.ts +tests/VersionControlApiTest.ts +tests/WebhooksApiTest.ts +tsconfig.json +types/ObjectParamAPI.ts +types/ObservableAPI.ts +types/PromiseAPI.ts +util.ts +utils/config.ts diff --git a/sdks/typescript/.openapi-generator/VERSION b/sdks/typescript/.openapi-generator/VERSION new file mode 100644 index 000000000..cd802a1ec --- /dev/null +++ b/sdks/typescript/.openapi-generator/VERSION @@ -0,0 +1 @@ +6.6.0 \ No newline at end of file diff --git a/sdks/typescript/AIApi.md b/sdks/typescript/AIApi.md new file mode 100644 index 000000000..cf4ec0aad --- /dev/null +++ b/sdks/typescript/AIApi.md @@ -0,0 +1,952 @@ +# ThoughtSpotRestApiSdk.AIApi + +All URIs are relative to *CLUSTER_URL* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**createAgentConversation**](AIApi.md#createAgentConversation) | **POST** /api/rest/2.0/ai/agent/conversation/create | +[**createConversation**](AIApi.md#createConversation) | **POST** /api/rest/2.0/ai/conversation/create | +[**getDataSourceSuggestions**](AIApi.md#getDataSourceSuggestions) | **POST** /api/rest/2.0/ai/data-source-suggestions | +[**getNLInstructions**](AIApi.md#getNLInstructions) | **POST** /api/rest/2.0/ai/instructions/get | +[**getRelevantQuestions**](AIApi.md#getRelevantQuestions) | **POST** /api/rest/2.0/ai/relevant-questions/ | +[**queryGetDecomposedQuery**](AIApi.md#queryGetDecomposedQuery) | **POST** /api/rest/2.0/ai/analytical-questions | +[**sendAgentConversationMessage**](AIApi.md#sendAgentConversationMessage) | **POST** /api/rest/2.0/ai/agent/conversation/{conversation_identifier}/send | +[**sendAgentConversationMessageStreaming**](AIApi.md#sendAgentConversationMessageStreaming) | **POST** /api/rest/2.0/ai/agent/conversation/{conversation_identifier}/send/stream | +[**sendAgentMessage**](AIApi.md#sendAgentMessage) | **POST** /api/rest/2.0/ai/agent/{conversation_identifier}/converse | +[**sendAgentMessageStreaming**](AIApi.md#sendAgentMessageStreaming) | **POST** /api/rest/2.0/ai/agent/converse/sse | +[**sendMessage**](AIApi.md#sendMessage) | **POST** /api/rest/2.0/ai/conversation/{conversation_identifier}/converse | +[**setNLInstructions**](AIApi.md#setNLInstructions) | **POST** /api/rest/2.0/ai/instructions/set | +[**singleAnswer**](AIApi.md#singleAnswer) | **POST** /api/rest/2.0/ai/answer/create | +[**stopConversation**](AIApi.md#stopConversation) | **POST** /api/rest/2.0/ai/agent/conversation/{conversation_identifier}/stop-response | + + +# **createAgentConversation** +> AgentConversation createAgentConversation(createAgentConversationRequest) + + Version: 26.2.0.cl or later Creates a new Spotter agent conversation based on the provided context and settings. The endpoint was in Beta from 26.2.0.cl through 26.4.0.cl. Requires `CAN_USE_SPOTTER` privilege and at least view access to the metadata object specified in the request. #### Usage guidelines The request must include the `metadata_context` parameter to define the conversation context. The context type can be one of: - `DATA_SOURCE` *(available from 26.5.0.cl)*: targets a specific data source. Provide `data_source_identifier` in `data_source_context` for a single data source, or `data_source_identifiers` for multi-data-source context. The deprecated `guid` field is accepted for backwards compatibility. - `AUTO_MODE` *(available from 26.5.0.cl)*: automatically discovers and selects the most relevant datasets for the user\'s queries. > **Note for callers on versions 26.2.0.cl – 26.4.0.cl (Beta):** use the lowercase `data_source` enum value with the `guid` field instead of the above. Example: `{ \"type\": \"data_source\", \"data_source_context\": { \"guid\": \"\" } }`. The `conversation_settings` parameter controls which Spotter capabilities are enabled for the conversation: - `enable_contextual_change_analysis` (default: `true`, **deprecated from 26.2.0.cl**) — always enabled in Spotter 3; setting this to `false` has no effect on versions >= 26.2.0.cl - `enable_natural_language_answer_generation` (default: `true`, **deprecated from 26.2.0.cl**) — always enabled in Spotter 3; setting this to `false` has no effect on versions >= 26.2.0.cl - `enable_reasoning` (default: `true`, **deprecated from 26.2.0.cl**) — always enabled in Spotter 3; setting this to `false` has no effect on versions >= 26.2.0.cl - `enable_save_chat` (default: `false`, *available from 26.5.0.cl*) — enables saving the conversation for later retrieval via conversation history If the request is successful, the response includes a unique `conversation_identifier` that must be passed to `sendAgentConversationMessage` or `sendAgentConversationMessageStreaming` to send messages within this conversation. The response also includes `conversation_id` with the same value for backwards compatibility; use `conversation_identifier` for new integrations. #### Example request ```json { \"metadata_context\": { \"type\": \"DATA_SOURCE\", \"data_source_context\": { \"data_source_identifier\": \"a1b2c3d4-e5f6-7890-abcd-ef1234567890\" } }, \"conversation_settings\": {} } ``` #### Error responses | Code | Description | | ---- | --------------------------------------------------------------------------------------------------------------------------------------- | | 401 | Unauthorized — authentication token is missing, expired, or invalid. | | 403 | Forbidden — the authenticated user does not have `CAN_USE_SPOTTER` privilege or lacks view permission on the specified metadata object. | > ###### Note: > > - This endpoint was in Beta from 26.2.0.cl through 26.4.0.cl and is Generally Available from version 26.5.0.cl. > - This endpoint requires Spotter - please contact ThoughtSpot support to enable Spotter on your cluster. + +### Example + + +```typescript +import { createBearerAuthenticationConfig, AIApi, CreateAgentConversationRequest } from '@thoughtspot/rest-api-sdk'; + +const configuration = createBearerAuthenticationConfig("CLUSTER_SERVER_URL", { + username: "YOUR_USERNAME", + password: "YOUR_PASSWORD", +}); +const apiInstance = new AIApi(configuration); + +apiInstance.createAgentConversation( + // CreateAgentConversationRequest + { + metadata_context: null, + conversation_settings: null, + } +).then((data:any) => { + console.log('API called successfully. Returned data: ' + data); +}).catch((error:any) => console.error(error)); + + +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **createAgentConversationRequest** | **CreateAgentConversationRequest**| | + + +### Return type + +**AgentConversation** + +### Authorization + +[bearerAuth](README.md#bearerAuth) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Common successful response | - | +**201** | Common error response | - | +**400** | Operation failed | - | +**401** | Unauthorized access. | - | +**403** | Forbidden access. | - | +**500** | Operation failed | - | + +[[Back to top]](#) [[Back to API list]](README.md#documentation-for-api-endpoints) [[Back to Model list]](README.md#documentation-for-models) [[Back to README]](README.md) + +# **createConversation** +> Conversation createConversation(createConversationRequest) + + Version: 10.4.0.cl or later Creates a new conversation session tied to a specific data model for AI-driven natural language querying. Requires `CAN_USE_SPOTTER` privilege and at least view access to the metadata object specified in the request. #### Usage guidelines The request must include: - `metadata_identifier`: the unique ID of the data source that provides context for the conversation Optionally, you can provide: - `tokens`: a token string to set initial context for the conversation (e.g., `\"[sales],[item type],[state]\"`) If the request is successful, ThoughtSpot returns a unique `conversation_identifier` that must be passed to `sendMessage` to continue the conversation. #### Error responses | Code | Description | |------|-------------| | 401 | Unauthorized — authentication token is missing, expired, or invalid. | | 403 | Forbidden — the authenticated user does not have `CAN_USE_SPOTTER` privilege or lacks view permission on the specified metadata object. | > ###### Note: > * This endpoint is currently in Beta. Breaking changes may be introduced before the endpoint is made Generally Available. > * This endpoint requires Spotter - please contact ThoughtSpot support to enable Spotter on your cluster. + +### Example + + +```typescript +import { createBearerAuthenticationConfig, AIApi, CreateConversationRequest } from '@thoughtspot/rest-api-sdk'; + +const configuration = createBearerAuthenticationConfig("CLUSTER_SERVER_URL", { + username: "YOUR_USERNAME", + password: "YOUR_PASSWORD", +}); +const apiInstance = new AIApi(configuration); + +apiInstance.createConversation( + // CreateConversationRequest + { + metadata_identifier: "metadata_identifier_example", + tokens: "tokens_example", + } +).then((data:any) => { + console.log('API called successfully. Returned data: ' + data); +}).catch((error:any) => console.error(error)); + + +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **createConversationRequest** | **CreateConversationRequest**| | + + +### Return type + +**Conversation** + +### Authorization + +[bearerAuth](README.md#bearerAuth) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Common successful response | - | +**201** | Common error response | - | +**400** | Operation failed | - | +**401** | Unauthorized access. | - | +**403** | Forbidden access. | - | +**500** | Operation failed | - | + +[[Back to top]](#) [[Back to API list]](README.md#documentation-for-api-endpoints) [[Back to Model list]](README.md#documentation-for-models) [[Back to README]](README.md) + +# **getDataSourceSuggestions** +> EurekaDataSourceSuggestionResponse getDataSourceSuggestions(getDataSourceSuggestionsRequest) + + Version: 10.15.0.cl or later Suggests the most relevant data sources for a given natural language query, ranked by confidence with LLM-generated reasoning. Requires `CAN_USE_SPOTTER` privilege and at least view-level access to the underlying metadata entities referenced in the response. #### Usage guidelines The request must include: - `query`: the natural language question to find relevant data sources for If the request is successful, the API returns a ranked list of suggested data sources, each containing: - `confidence`: a float score indicating the model\'s confidence in the relevance of the suggestion - `details`: metadata about the data source - `data_source_identifier`: the unique ID of the data source - `data_source_name`: the display name of the data source - `description`: a description of the data source - `reasoning`: LLM-generated rationale explaining why the data source was recommended #### Error responses | Code | Description | |------|--------------------------------------------------------------------------------------------------------------------------------------------| | 401 | Unauthorized — authentication token is missing, expired, or invalid. | | 403 | Forbidden — the authenticated user does not have `CAN_USE_SPOTTER` privilege or lacks view permission on the underlying metadata entities. | > ###### Note: > * This endpoint is currently in Beta. Breaking changes may be introduced before it is made Generally Available. > * This endpoint requires Spotter — please contact ThoughtSpot Support to enable Spotter on your cluster. + +### Example + + +```typescript +import { createBearerAuthenticationConfig, AIApi, GetDataSourceSuggestionsRequest } from '@thoughtspot/rest-api-sdk'; + +const configuration = createBearerAuthenticationConfig("CLUSTER_SERVER_URL", { + username: "YOUR_USERNAME", + password: "YOUR_PASSWORD", +}); +const apiInstance = new AIApi(configuration); + +apiInstance.getDataSourceSuggestions( + // GetDataSourceSuggestionsRequest + { + query: "query_example", + } +).then((data:any) => { + console.log('API called successfully. Returned data: ' + data); +}).catch((error:any) => console.error(error)); + + +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **getDataSourceSuggestionsRequest** | **GetDataSourceSuggestionsRequest**| | + + +### Return type + +**EurekaDataSourceSuggestionResponse** + +### Authorization + +[bearerAuth](README.md#bearerAuth) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Common successful response | - | +**201** | Common error response | - | +**400** | Operation failed | - | +**401** | Unauthorized access. | - | +**403** | Forbidden access. | - | +**500** | Operation failed | - | + +[[Back to top]](#) [[Back to API list]](README.md#documentation-for-api-endpoints) [[Back to Model list]](README.md#documentation-for-models) [[Back to README]](README.md) + +# **getNLInstructions** +> EurekaGetNLInstructionsResponse getNLInstructions(getNLInstructionsRequest) + + Version: 10.15.0.cl or later Retrieves existing natural language (NL) instructions configured for a specific data model. These instructions guide the AI system in understanding data context and generating more accurate responses. Requires `CAN_USE_SPOTTER` privilege, at least view access on the data model, and a bearer token corresponding to the org where the data model exists. #### Usage guidelines The request must include: - `data_source_identifier`: the unique ID of the data model to retrieve instructions for If the request is successful, the API returns: - `nl_instructions_info`: an array of instruction objects, each containing: - `instructions`: the configured text instructions for AI processing - `scope`: the scope of the instruction — currently only `GLOBAL` is supported #### Instructions scope - **GLOBAL**: Instructions that apply globally across the system on the given data-model (currently only global instructions are supported) #### Error responses | Code | Description | |------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| | 401 | Unauthorized — authentication token is missing, expired, or invalid. | | 403 | Forbidden — the authenticated user does not have `CAN_USE_SPOTTER` privilege, lacks view access on the data model, or the bearer token does not correspond to the org where the data model exists. | > ###### Note: > > - To use this API, the user needs at least view access on the data model, and must use the bearer token corresponding to the org where the data model exists. > - This endpoint is currently in Beta. Breaking changes may be introduced before the endpoint is made Generally Available. > - Available from version 10.15.0.cl and later. > - This endpoint requires Spotter — please contact ThoughtSpot Support to enable Spotter on your cluster. > - Use this API to review currently configured instructions before modifying them with `setNLInstructions`. + +### Example + + +```typescript +import { createBearerAuthenticationConfig, AIApi, GetNLInstructionsRequest } from '@thoughtspot/rest-api-sdk'; + +const configuration = createBearerAuthenticationConfig("CLUSTER_SERVER_URL", { + username: "YOUR_USERNAME", + password: "YOUR_PASSWORD", +}); +const apiInstance = new AIApi(configuration); + +apiInstance.getNLInstructions( + // GetNLInstructionsRequest + { + data_source_identifier: "data_source_identifier_example", + } +).then((data:any) => { + console.log('API called successfully. Returned data: ' + data); +}).catch((error:any) => console.error(error)); + + +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **getNLInstructionsRequest** | **GetNLInstructionsRequest**| | + + +### Return type + +**EurekaGetNLInstructionsResponse** + +### Authorization + +[bearerAuth](README.md#bearerAuth) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Common successful response | - | +**201** | Common error response | - | +**400** | Operation failed | - | +**401** | Unauthorized access. | - | +**403** | Forbidden access. | - | +**500** | Operation failed | - | + +[[Back to top]](#) [[Back to API list]](README.md#documentation-for-api-endpoints) [[Back to Model list]](README.md#documentation-for-models) [[Back to README]](README.md) + +# **getRelevantQuestions** +> EurekaGetRelevantQuestionsResponse getRelevantQuestions(getRelevantQuestionsRequest) + + Version: 10.13.0.cl or later Breaks down a natural language query into a series of smaller analytical sub-questions, each mapped to a relevant data source. Requires `CAN_USE_SPOTTER` privilege and at least view-level access to the referenced metadata objects. #### Usage guidelines The request must include: - `query`: the natural language question to decompose into analytical sub-questions - `metadata_context`: at least one of the following context identifiers to guide question generation: - `conversation_identifier` — an existing conversation session ID - `answer_identifiers` — a list of Answer GUIDs - `liveboard_identifiers` — a list of Liveboard GUIDs - `data_source_identifiers` — a list of data source GUIDs Optional parameters for refining the output: - `ai_context`: additional context to improve response quality - `content` — supplementary text or CSV data as string input - `instructions` — custom text instructions for the AI system - `limit_relevant_questions`: maximum number of questions to return (default: `5`) - `bypass_cache`: if `true`, forces fresh computation instead of returning cached results If the request is successful, the API returns a list of relevant analytical questions, each containing: - `query`: the generated sub-question - `data_source_identifier`: the unique ID of the data source the question targets - `data_source_name`: the display name of the corresponding data source #### Error responses | Code | Description | |------|---------------------------------------------------------------------------------------------------------------------------------------| | 401 | Unauthorized — authentication token is missing, expired, or invalid. | | 403 | Forbidden — the authenticated user does not have `CAN_USE_SPOTTER` privilege or lacks view access to the referenced metadata objects. | > ###### Note: > * This endpoint is currently in Beta. Breaking changes may be introduced before the endpoint is made Generally Available. > * This endpoint requires Spotter - please contact ThoughtSpot support to enable Spotter on your cluster. + +### Example + + +```typescript +import { createBearerAuthenticationConfig, AIApi, GetRelevantQuestionsRequest } from '@thoughtspot/rest-api-sdk'; + +const configuration = createBearerAuthenticationConfig("CLUSTER_SERVER_URL", { + username: "YOUR_USERNAME", + password: "YOUR_PASSWORD", +}); +const apiInstance = new AIApi(configuration); + +apiInstance.getRelevantQuestions( + // GetRelevantQuestionsRequest + { + metadata_context: null, + limit_relevant_questions: 1, + bypass_cache: true, + query: "query_example", + ai_context: null, + } +).then((data:any) => { + console.log('API called successfully. Returned data: ' + data); +}).catch((error:any) => console.error(error)); + + +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **getRelevantQuestionsRequest** | **GetRelevantQuestionsRequest**| | + + +### Return type + +**EurekaGetRelevantQuestionsResponse** + +### Authorization + +[bearerAuth](README.md#bearerAuth) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Common successful response | - | +**201** | Common error response | - | +**400** | Operation failed | - | +**401** | Unauthorized access. | - | +**403** | Forbidden access. | - | +**500** | Operation failed | - | + +[[Back to top]](#) [[Back to API list]](README.md#documentation-for-api-endpoints) [[Back to Model list]](README.md#documentation-for-models) [[Back to README]](README.md) + +# **queryGetDecomposedQuery** +> EurekaDecomposeQueryResponse queryGetDecomposedQuery(queryGetDecomposedQueryRequest) + + Version: 10.7.0.cl or later **Deprecated** — Use `getRelevantQuestions` instead (available from 10.13.0.cl). Breaks down a topical or goal-oriented natural language question into smaller, actionable analytical sub-questions, each mapped to a relevant data source for independent execution. Requires `CAN_USE_SPOTTER` privilege and at least view-level access to the referenced metadata objects. #### Usage guidelines The request accepts the following parameters: - `nlsRequest`: contains the user `query` to decompose, along with optional `instructions` and `bypassCache` flag - `worksheetIds`: list of data source identifiers to scope the decomposition - `answerIds`: list of Answer GUIDs whose data guides the response - `liveboardIds`: list of Liveboard GUIDs whose data guides the response - `conversationId`: an existing conversation session ID for context continuity - `content`: supplementary text or CSV data to improve response quality - `maxDecomposedQueries`: maximum number of sub-questions to return (default: `5`) If the request is successful, the API returns a `decomposedQueryResponse` containing a list of `decomposedQueries`, each with: - `query`: the generated analytical sub-question - `worksheetId`: the unique ID of the data source the question targets - `worksheetName`: the display name of the corresponding data source #### Error responses | Code | Description | |------|---------------------------------------------------------------------------------------------------------------------------------------| | 401 | Unauthorized — authentication token is missing, expired, or invalid. | | 403 | Forbidden — the authenticated user does not have `CAN_USE_SPOTTER` privilege or lacks view access to the referenced metadata objects. | > ###### Note: > * This endpoint is deprecated since 10.13.0.cl. Use `getRelevantQuestions` for new integrations. > * This endpoint is currently in Beta. Breaking changes may be introduced before the endpoint is made Generally Available. > * This endpoint requires Spotter — please contact ThoughtSpot support to enable Spotter on your cluster. + +### Example + + +```typescript +import { createBearerAuthenticationConfig, AIApi, QueryGetDecomposedQueryRequest } from '@thoughtspot/rest-api-sdk'; + +const configuration = createBearerAuthenticationConfig("CLUSTER_SERVER_URL", { + username: "YOUR_USERNAME", + password: "YOUR_PASSWORD", +}); +const apiInstance = new AIApi(configuration); + +apiInstance.queryGetDecomposedQuery( + // QueryGetDecomposedQueryRequest + { + answerIds: [ + "answerIds_example", + ], + content: [ + "content_example", + ], + conversationId: "conversationId_example", + liveboardIds: [ + "liveboardIds_example", + ], + maxDecomposedQueries: 1, + nlsRequest: null, + worksheetIds: [ + "worksheetIds_example", + ], + } +).then((data:any) => { + console.log('API called successfully. Returned data: ' + data); +}).catch((error:any) => console.error(error)); + + +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **queryGetDecomposedQueryRequest** | **QueryGetDecomposedQueryRequest**| | + + +### Return type + +**EurekaDecomposeQueryResponse** + +### Authorization + +[bearerAuth](README.md#bearerAuth) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Common successful response | - | +**201** | Common error response | - | +**400** | Operation failed | - | +**401** | Unauthorized access. | - | +**403** | Forbidden access. | - | +**500** | Operation failed | - | + +[[Back to top]](#) [[Back to API list]](README.md#documentation-for-api-endpoints) [[Back to Model list]](README.md#documentation-for-models) [[Back to README]](README.md) + +# **sendAgentConversationMessage** +> any sendAgentConversationMessage(sendAgentConversationMessageRequest) + + Version: 26.5.0.cl or later Sends natural language messages to an existing Spotter agent conversation and returns the complete response synchronously. Requires `CAN_USE_SPOTTER` privilege and access to the metadata object associated with the conversation. The user must have access to the conversation session referenced by `conversation_identifier`. A conversation must first be created using the `createAgentConversation` API. #### Usage guidelines The request must include: - `conversation_identifier`: the unique session ID returned by `createAgentConversation`, used for context continuity and message tracking - `messages`: an array of one or more text messages to send to the agent The API returns an array of response objects, each containing: - `type`: the kind of response — `text`, `answer`, or `error` - `message`: the main content of the response - `metadata`: additional information depending on the message type (e.g., answer metadata includes analytics and visualization details) #### Error responses | Code | Description | |------|----------------------------------------------------------------------------------------------------------------------------------| | 401 | Unauthorized — authentication token is missing, expired, or invalid. | | 403 | Forbidden — the authenticated user does not have `CAN_USE_SPOTTER` privilege or lacks permission on the referenced conversation. | > ###### Note: > > - This endpoint is Generally Available from version 26.5.0.cl. > - This endpoint requires Spotter - please contact ThoughtSpot support to enable Spotter on your cluster. > - For real-time streamed responses, use `sendAgentConversationMessageStreaming` instead. + +### Example + + +```typescript +import { createBearerAuthenticationConfig, AIApi, SendAgentConversationMessageRequest } from '@thoughtspot/rest-api-sdk'; + +const configuration = createBearerAuthenticationConfig("CLUSTER_SERVER_URL", { + username: "YOUR_USERNAME", + password: "YOUR_PASSWORD", +}); +const apiInstance = new AIApi(configuration); + +apiInstance.sendAgentConversationMessage( + // string | Unique identifier for the conversation (used to track context) + "conversation_identifier_example" , + // SendAgentConversationMessageRequest + { + messages: [ + "messages_example", + ], + } +).then((data:any) => { + console.log('API called successfully. Returned data: ' + data); +}).catch((error:any) => console.error(error)); + + +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **sendAgentConversationMessageRequest** | **SendAgentConversationMessageRequest**| | + **conversationIdentifier** | [**string**] | Unique identifier for the conversation (used to track context) | defaults to undefined + + +### Return type + +**any** + +### Authorization + +[bearerAuth](README.md#bearerAuth) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Common successful response | - | +**201** | Common error response | - | +**400** | Operation failed | - | +**401** | Unauthorized access. | - | +**403** | Forbidden access. | - | +**500** | Operation failed | - | + +[[Back to top]](#) [[Back to API list]](README.md#documentation-for-api-endpoints) [[Back to Model list]](README.md#documentation-for-models) [[Back to README]](README.md) + +# **sendAgentConversationMessageStreaming** +> SendAgentMessageResponse sendAgentConversationMessageStreaming(sendAgentConversationMessageStreamingRequest) + + Version: 26.5.0.cl or later Sends one or more natural language messages to an existing Spotter agent conversation and returns the response as a real-time Server-Sent Events stream. Requires `CAN_USE_SPOTTER` privilege and access to the metadata object associated with the conversation. The user must have access to the conversation session referenced by `conversation_identifier`. A conversation must first be created using the `createAgentConversation` API. #### Usage guidelines The request must include: - `conversation_identifier`: the unique session ID returned by `createAgentConversation`, used for context continuity and message tracking - `messages`: an array of one or more text messages to send to the agent If the request is valid, the API returns a Server-Sent Events (SSE) stream. Each line has the form `data: [{\"type\": \"...\", ...}]` — a JSON array of event objects. Event types include: - `ack`: confirms receipt of the request (`node_id`) - `conv_title`: conversation title (`title`, `conv_id`) - `notification`: status updates on operations (`group_id`, `metadata`, `code` — e.g. `TOOL_CALL_NOTIFICATION`, `nls_start`, `FINAL_RESPONSE_NOTIFICATION`) - `text-chunk`: incremental content chunks (`id`, `group_id`, `metadata` with `format` and `type` such as `thinking` or `text`, `content`) - `text`: full text block with same structure as `text-chunk` - `answer`: structured answer with metadata (`id`, `group_id`, `metadata` with `sage_query`, `session_id`, `title`, etc., `title`) - `error`: if a failure occurs #### Error responses | Code | Description | | ---- | -------------------------------------------------------------------------------------------------------------------------------- | | 401 | Unauthorized — authentication token is missing, expired, or invalid. | | 403 | Forbidden — the authenticated user does not have `CAN_USE_SPOTTER` privilege or lacks permission on the referenced conversation. | > ###### Note: > > - This endpoint is Generally Available from version 26.5.0.cl. > - This endpoint requires Spotter - please contact ThoughtSpot support to enable Spotter on your cluster. > - The streaming protocol uses Server-Sent Events (SSE). > - For the complete response in a single payload, use `sendAgentConversationMessage` instead. + +### Example + + +```typescript +import { createBearerAuthenticationConfig, AIApi, SendAgentConversationMessageStreamingRequest } from '@thoughtspot/rest-api-sdk'; + +const configuration = createBearerAuthenticationConfig("CLUSTER_SERVER_URL", { + username: "YOUR_USERNAME", + password: "YOUR_PASSWORD", +}); +const apiInstance = new AIApi(configuration); + +apiInstance.sendAgentConversationMessageStreaming( + // string | Unique identifier for the conversation (used to track context) + "conversation_identifier_example" , + // SendAgentConversationMessageStreamingRequest + { + messages: [ + "messages_example", + ], + } +).then((data:any) => { + console.log('API called successfully. Returned data: ' + data); +}).catch((error:any) => console.error(error)); + + +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **sendAgentConversationMessageStreamingRequest** | **SendAgentConversationMessageStreamingRequest**| | + **conversationIdentifier** | [**string**] | Unique identifier for the conversation (used to track context) | defaults to undefined + + +### Return type + +**SendAgentMessageResponse** + +### Authorization + +[bearerAuth](README.md#bearerAuth) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Common successful response | - | +**201** | Common error response | - | +**400** | Operation failed | - | +**401** | Unauthorized access. | - | +**403** | Forbidden access. | - | +**500** | Operation failed | - | + +[[Back to top]](#) [[Back to API list]](README.md#documentation-for-api-endpoints) [[Back to Model list]](README.md#documentation-for-models) [[Back to README]](README.md) + +# **sendAgentMessage** +> any sendAgentMessage(sendAgentMessageRequest) + + Version: 26.2.0.cl or later **Deprecated** — Use `sendAgentConversationMessage` instead. Send natural language messages to an existing Spotter agent conversation and returns the complete response synchronously. Requires `CAN_USE_SPOTTER` privilege and access to the metadata object associated with the conversation. The user must have access to the conversation session referenced by `conversation_identifier`. A conversation must first be created using the `createAgentConversation` API. #### Usage guidelines The request must include: - `conversation_identifier`: the unique session ID returned by `createAgentConversation`, used for context continuity and message tracking - `messages`: an array of one or more text messages to send to the agent The API returns an array of response objects, each containing: - `type`: the kind of response — `text`, `answer`, or `error` - `message`: the main content of the response - `metadata`: additional information depending on the message type (e.g., answer metadata includes analytics and visualization details) #### Error responses | Code | Description | |------|----------------------------------------------------------------------------------------------------------------------------------| | 401 | Unauthorized — authentication token is missing, expired, or invalid. | | 403 | Forbidden — the authenticated user does not have `CAN_USE_SPOTTER` privilege or lacks permission on the referenced conversation. | > ###### Note: > > - This endpoint is deprecated. Use `sendAgentConversationMessage` for new integrations. > - This endpoint is currently in Beta. Breaking changes may be introduced before the endpoint is made Generally Available. > - This endpoint requires Spotter - please contact ThoughtSpot support to enable Spotter on your cluster. + +### Example + + +```typescript +import { createBearerAuthenticationConfig, AIApi, SendAgentMessageRequest } from '@thoughtspot/rest-api-sdk'; + +const configuration = createBearerAuthenticationConfig("CLUSTER_SERVER_URL", { + username: "YOUR_USERNAME", + password: "YOUR_PASSWORD", +}); +const apiInstance = new AIApi(configuration); + +apiInstance.sendAgentMessage( + // string | Unique identifier for the conversation (used to track context) + "conversation_identifier_example" , + // SendAgentMessageRequest + { + messages: [ + "messages_example", + ], + } +).then((data:any) => { + console.log('API called successfully. Returned data: ' + data); +}).catch((error:any) => console.error(error)); + + +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **sendAgentMessageRequest** | **SendAgentMessageRequest**| | + **conversationIdentifier** | [**string**] | Unique identifier for the conversation (used to track context) | defaults to undefined + + +### Return type + +**any** + +### Authorization + +[bearerAuth](README.md#bearerAuth) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Common successful response | - | +**201** | Common error response | - | +**400** | Operation failed | - | +**401** | Unauthorized access. | - | +**403** | Forbidden access. | - | +**500** | Operation failed | - | + +[[Back to top]](#) [[Back to API list]](README.md#documentation-for-api-endpoints) [[Back to Model list]](README.md#documentation-for-models) [[Back to README]](README.md) + +# **sendAgentMessageStreaming** +> SendAgentMessageResponse sendAgentMessageStreaming(sendAgentMessageStreamingRequest) + + Version: 26.2.0.cl or later **Deprecated** — Use `sendAgentConversationMessageStreaming` instead. Sends one or more natural language messages to an existing Spotter agent conversation and returns the response as a real-time Server-Sent Events stream. Requires `CAN_USE_SPOTTER` privilege and access to the metadata object associated with the conversation. The user must have access to the conversation session referenced by `conversation_identifier`. A conversation must first be created using the `createAgentConversation` API. #### Usage guidelines The request must include: - `conversation_identifier`: the unique session ID returned by `createAgentConversation`, used for context continuity and message tracking - `messages`: an array of one or more text messages to send to the agent If the request is valid, the API returns a Server-Sent Events (SSE) stream. Each line has the form `data: [{\"type\": \"...\", ...}]` — a JSON array of event objects. Event types include: - `ack`: confirms receipt of the request (`node_id`) - `conv_title`: conversation title (`title`, `conv_id`) - `notification`: status updates on operations (`group_id`, `metadata`, `code` — e.g. `TOOL_CALL_NOTIFICATION`, `nls_start`, `FINAL_RESPONSE_NOTIFICATION`) - `text-chunk`: incremental content chunks (`id`, `group_id`, `metadata` with `format` and `type` such as `thinking` or `text`, `content`) - `text`: full text block with same structure as `text-chunk` - `answer`: structured answer with metadata (`id`, `group_id`, `metadata` with `sage_query`, `session_id`, `title`, etc., `title`) - `error`: if a failure occurs #### Error responses | Code | Description | |------|----------------------------------------------------------------------------------------------------------------------------------| | 401 | Unauthorized — authentication token is missing, expired, or invalid. | | 403 | Forbidden — the authenticated user does not have `CAN_USE_SPOTTER` privilege or lacks permission on the referenced conversation. | > ###### Note: > > - This endpoint is deprecated. Use `sendAgentConversationMessageStreaming` for new integrations. > - This endpoint is currently in Beta. Breaking changes may be introduced before the endpoint is made Generally Available. > - This endpoint requires Spotter - please contact ThoughtSpot support to enable Spotter on your cluster. > - The streaming protocol uses Server-Sent Events (SSE). + +### Example + + +```typescript +import { createBearerAuthenticationConfig, AIApi, SendAgentMessageStreamingRequest } from '@thoughtspot/rest-api-sdk'; + +const configuration = createBearerAuthenticationConfig("CLUSTER_SERVER_URL", { + username: "YOUR_USERNAME", + password: "YOUR_PASSWORD", +}); +const apiInstance = new AIApi(configuration); + +apiInstance.sendAgentMessageStreaming( + // SendAgentMessageStreamingRequest + { + conversation_identifier: "conversation_identifier_example", + messages: [ + "messages_example", + ], + } +).then((data:any) => { + console.log('API called successfully. Returned data: ' + data); +}).catch((error:any) => console.error(error)); + + +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **sendAgentMessageStreamingRequest** | **SendAgentMessageStreamingRequest**| | + + +### Return type + +**SendAgentMessageResponse** + +### Authorization + +[bearerAuth](README.md#bearerAuth) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Common successful response | - | +**201** | Common error response | - | +**400** | Operation failed | - | +**401** | Unauthorized access. | - | +**403** | Forbidden access. | - | +**500** | Operation failed | - | + +[[Back to top]](#) [[Back to API list]](README.md#documentation-for-api-endpoints) [[Back to Model list]](README.md#documentation-for-models) [[Back to README]](README.md) + +# **sendMessage** +> Array sendMessage(sendMessageRequest) + + Version: 10.4.0.cl or later Sends a follow-up message to an existing conversation within the context of a data model. Requires `CAN_USE_SPOTTER` privilege and at least view access to the metadata object specified in the request. A conversation must first be created using the `createConversation` API. #### Usage guidelines The request must include: - `conversation_identifier`: the unique session ID returned by `createConversation` - `metadata_identifier`: the unique ID of the data source used for the conversation - `message`: a natural language string with the follow-up question If the request is successful, the API returns an array of response messages, each containing: - `session_identifier`: the unique ID of the generated response - `generation_number`: the generation number of the response - `message_type`: the type of the response (e.g., `TSAnswer`) - `visualization_type`: the generated visualization type (`Chart`, `Table`, or `Undefined`) - `tokens` / `display_tokens`: the search tokens and user-friendly display tokens for the response #### Error responses | Code | Description | |------|-----------------------------------------------------------------------------------------------------------------------------------------| | 401 | Unauthorized — authentication token is missing, expired, or invalid. | | 403 | Forbidden — the authenticated user does not have `CAN_USE_SPOTTER` privilege or lacks view permission on the specified metadata object. | > ###### Note: > * This endpoint is currently in Beta. Breaking changes may be introduced before the endpoint is made Generally Available. > * This endpoint requires Spotter - please contact ThoughtSpot support to enable Spotter on your cluster. + +### Example + + +```typescript +import { createBearerAuthenticationConfig, AIApi, SendMessageRequest } from '@thoughtspot/rest-api-sdk'; + +const configuration = createBearerAuthenticationConfig("CLUSTER_SERVER_URL", { + username: "YOUR_USERNAME", + password: "YOUR_PASSWORD", +}); +const apiInstance = new AIApi(configuration); + +apiInstance.sendMessage( + // string | Unique identifier of the conversation. + "conversation_identifier_example" , + // SendMessageRequest + { + metadata_identifier: "metadata_identifier_example", + message: "message_example", + } +).then((data:any) => { + console.log('API called successfully. Returned data: ' + data); +}).catch((error:any) => console.error(error)); + + +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **sendMessageRequest** | **SendMessageRequest**| | + **conversationIdentifier** | [**string**] | Unique identifier of the conversation. | defaults to undefined + + +### Return type + +**Array** + +### Authorization + +[bearerAuth](README.md#bearerAuth) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Common successful response | - | +**201** | Common error response | - | +**400** | Operation failed | - | +**401** | Unauthorized access. | - | +**403** | Forbidden access. | - | +**500** | Operation failed | - | + +[[Back to top]](#) [[Back to API list]](README.md#documentation-for-api-endpoints) [[Back to Model list]](README.md#documentation-for-models) [[Back to README]](README.md) + +# **setNLInstructions** +> EurekaSetNLInstructionsResponse setNLInstructions(setNLInstructionsRequest) + + Version: 10.15.0.cl or later This API allows users to set natural language (NL) instructions for a specific data-model to improve AI-generated answers and query processing. These instructions help guide the AI system to better understand the data context and provide more accurate responses. Requires `CAN_USE_SPOTTER` privilege, either edit access or `SPOTTER_COACHING_PRIVILEGE` on the data model, and a bearer token corresponding to the org where the data model exists. #### Usage guidelines To set NL instructions for a data-model, the request must include: - `data_source_identifier`: The unique ID of the data-model for which to set NL instructions - `nl_instructions_info`: An array of instruction objects, each containing: - `instructions`: Array of text instructions for the LLM - `scope`: The scope of the instruction (`GLOBAL`). Currently only `GLOBAL` is supported. It can be extended to data-model-user scope in future. #### Instructions scope - **GLOBAL**: instructions that apply to all users querying this data model If the request is successful, the API returns: - `success`: a boolean indicating whether the operation completed successfully #### Error responses | Code | Description | |------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| | 401 | Unauthorized — authentication token is missing, expired, or invalid. | | 403 | Forbidden — the authenticated user does not have `CAN_USE_SPOTTER` privilege, lacks edit access or `SPOTTER_COACHING_PRIVILEGE` on the data model, or the bearer token does not correspond to the org where the data model exists. | > ###### Note: > > - To use this API, the user needs either edit access or `SPOTTER_COACHING_PRIVILEGE` on the data model, and must use the bearer token corresponding to the org where the data model exists. > - This endpoint is currently in Beta. Breaking changes may be introduced before the endpoint is made Generally Available. > - Available from version 10.15.0.cl and later. > - This endpoint requires Spotter — please contact ThoughtSpot Support to enable Spotter on your cluster. > - Instructions help improve the accuracy and relevance of AI-generated responses for the specified data-model. + +### Example + + +```typescript +import { createBearerAuthenticationConfig, AIApi, SetNLInstructionsRequest } from '@thoughtspot/rest-api-sdk'; + +const configuration = createBearerAuthenticationConfig("CLUSTER_SERVER_URL", { + username: "YOUR_USERNAME", + password: "YOUR_PASSWORD", +}); +const apiInstance = new AIApi(configuration); + +apiInstance.setNLInstructions( + // SetNLInstructionsRequest + { + data_source_identifier: "data_source_identifier_example", + nl_instructions_info: [ + { + instructions: [ + "instructions_example", + ], + scope: "GLOBAL", + }, + ], + } +).then((data:any) => { + console.log('API called successfully. Returned data: ' + data); +}).catch((error:any) => console.error(error)); + + +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **setNLInstructionsRequest** | **SetNLInstructionsRequest**| | + + +### Return type + +**EurekaSetNLInstructionsResponse** + +### Authorization + +[bearerAuth](README.md#bearerAuth) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Common successful response | - | +**201** | Common error response | - | +**400** | Operation failed | - | +**401** | Unauthorized access. | - | +**403** | Forbidden access. | - | +**500** | Operation failed | - | + +[[Back to top]](#) [[Back to API list]](README.md#documentation-for-api-endpoints) [[Back to Model list]](README.md#documentation-for-models) [[Back to README]](README.md) + +# **singleAnswer** +> ResponseMessage singleAnswer(singleAnswerRequest) + + Version: 10.4.0.cl or later Processes a natural language query against a specified data model and returns a single AI-generated answer without requiring a conversation session. Requires `CAN_USE_SPOTTER` privilege and at least view access to the metadata object specified in the request. #### Usage guidelines The request must include: - `query`: a natural language question (e.g., \"What were total sales last quarter?\") - `metadata_identifier`: the unique ID of the data source to query against If the request is successful, the API returns a response message containing: - `session_identifier`: the unique ID of the generated response - `generation_number`: the generation number of the response - `message_type`: the type of the response (e.g., `TSAnswer`) - `visualization_type`: the generated visualization type (`Chart`, `Table`, or `Undefined`) - `tokens` / `display_tokens`: the search tokens and user-friendly display tokens for the response #### Error responses | Code | Description | |------|-----------------------------------------------------------------------------------------------------------------------------------------| | 401 | Unauthorized — authentication token is missing, expired, or invalid. | | 403 | Forbidden — the authenticated user does not have `CAN_USE_SPOTTER` privilege or lacks view permission on the specified metadata object. | > ###### Note: > * This endpoint is currently in Beta. Breaking changes may be introduced before the endpoint is made Generally Available. > * This endpoint requires Spotter - please contact ThoughtSpot support to enable Spotter on your cluster. + +### Example + + +```typescript +import { createBearerAuthenticationConfig, AIApi, SingleAnswerRequest } from '@thoughtspot/rest-api-sdk'; + +const configuration = createBearerAuthenticationConfig("CLUSTER_SERVER_URL", { + username: "YOUR_USERNAME", + password: "YOUR_PASSWORD", +}); +const apiInstance = new AIApi(configuration); + +apiInstance.singleAnswer( + // SingleAnswerRequest + { + query: "query_example", + metadata_identifier: "metadata_identifier_example", + } +).then((data:any) => { + console.log('API called successfully. Returned data: ' + data); +}).catch((error:any) => console.error(error)); + + +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **singleAnswerRequest** | **SingleAnswerRequest**| | + + +### Return type + +**ResponseMessage** + +### Authorization + +[bearerAuth](README.md#bearerAuth) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Common successful response | - | +**201** | Common error response | - | +**400** | Operation failed | - | +**401** | Unauthorized access. | - | +**403** | Forbidden access. | - | +**500** | Operation failed | - | + +[[Back to top]](#) [[Back to API list]](README.md#documentation-for-api-endpoints) [[Back to Model list]](README.md#documentation-for-models) [[Back to README]](README.md) + +# **stopConversation** +> void stopConversation() + + Stops an in-progress agent conversation response. Version: 26.6.0.cl or later Version: 26.6.0.cl or later Stops an in-progress agent response for the specified conversation. Use this endpoint to cancel a response that is actively being generated — for example, when the user navigates away, reformulates their question, or no longer needs the current result. Requires `CAN_USE_SPOTTER` privilege and access to the specified conversation. #### Usage guidelines The request must include: - `conversation_identifier` *(path parameter)*: the unique ID of the conversation whose active response should be stopped, as returned by `createAgentConversation` A successful request returns an empty `204 No Content` response. If there is no active response in progress at the time of the call, the request is still treated as successful. After stopping a response, the conversation session remains active. You can continue sending messages using `sendAgentConversationMessage` or `sendAgentConversationMessageStreaming`. #### Example request ```bash POST /api/rest/2.0/ai/agent/conversation/{conversation_identifier}/stop-response ``` #### Typical usage scenario This endpoint is useful when integrating Spotter into a chat UI where users can cancel a long-running query. For example: 1. User sends a message via `sendAgentConversationMessageStreaming`. 2. User clicks a \"Stop generating\" button while the response is streaming. 3. Your client calls `stopConversation` with the active `conversation_identifier`. 4. The stream is terminated and the user can ask a new question. #### Error responses | Code | Description | |------|-------------| | 401 | Unauthorized — authentication token is missing, expired, or invalid. | | 403 | Forbidden — the authenticated user does not have `CAN_USE_SPOTTER` privilege or lacks access to the specified conversation. | > ###### Note: > > - Calling this endpoint when no response is in progress does not return an error. > - The conversation context is preserved after stopping — previous messages and answers remain accessible. > - Available from version 26.6.0.cl and later. > - This endpoint requires Spotter — please contact ThoughtSpot Support to enable Spotter on your cluster. > - This feature is available only for **Spotter 3** (`SPOTTER3`) version. + +### Example + + +```typescript +import { createBearerAuthenticationConfig, AIApi, StopConversationRequest } from '@thoughtspot/rest-api-sdk'; + +const configuration = createBearerAuthenticationConfig("CLUSTER_SERVER_URL", { + username: "YOUR_USERNAME", + password: "YOUR_PASSWORD", +}); +const apiInstance = new AIApi(configuration); + +apiInstance.stopConversation( + // string | Unique identifier of the conversation to stop. + "conversation_identifier_example" +).then((data:any) => { + console.log('API called successfully. Returned data: ' + data); +}).catch((error:any) => console.error(error)); + + +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **conversationIdentifier** | [**string**] | Unique identifier of the conversation to stop. | defaults to undefined + + +### Return type + +**void** + +### Authorization + +[bearerAuth](README.md#bearerAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**204** | Successfully stopped the in-progress agent conversation response for the given. | - | +**400** | Operation failed | - | +**401** | Unauthorized access. | - | +**403** | Forbidden access. | - | +**500** | Operation failed | - | + +[[Back to top]](#) [[Back to API list]](README.md#documentation-for-api-endpoints) [[Back to Model list]](README.md#documentation-for-models) [[Back to README]](README.md) + diff --git a/sdks/typescript/AuthenticationApi.md b/sdks/typescript/AuthenticationApi.md new file mode 100644 index 000000000..cee046630 --- /dev/null +++ b/sdks/typescript/AuthenticationApi.md @@ -0,0 +1,756 @@ +# ThoughtSpotRestApiSdk.AuthenticationApi + +All URIs are relative to *CLUSTER_URL* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**configureAuthSettings**](AuthenticationApi.md#configureAuthSettings) | **POST** /api/rest/2.0/auth/configure | +[**getCurrentUserInfo**](AuthenticationApi.md#getCurrentUserInfo) | **GET** /api/rest/2.0/auth/session/user | +[**getCurrentUserToken**](AuthenticationApi.md#getCurrentUserToken) | **GET** /api/rest/2.0/auth/session/token | +[**getCustomAccessToken**](AuthenticationApi.md#getCustomAccessToken) | **POST** /api/rest/2.0/auth/token/custom | +[**getFullAccessToken**](AuthenticationApi.md#getFullAccessToken) | **POST** /api/rest/2.0/auth/token/full | +[**getObjectAccessToken**](AuthenticationApi.md#getObjectAccessToken) | **POST** /api/rest/2.0/auth/token/object | +[**login**](AuthenticationApi.md#login) | **POST** /api/rest/2.0/auth/session/login | +[**logout**](AuthenticationApi.md#logout) | **POST** /api/rest/2.0/auth/session/logout | +[**revokeToken**](AuthenticationApi.md#revokeToken) | **POST** /api/rest/2.0/auth/token/revoke | +[**searchAuthSettings**](AuthenticationApi.md#searchAuthSettings) | **POST** /api/rest/2.0/auth/search | +[**validateToken**](AuthenticationApi.md#validateToken) | **POST** /api/rest/2.0/auth/token/validate | + + +# **configureAuthSettings** +> void configureAuthSettings(configureAuthSettingsRequest) + + Version: 26.6.0.cl or later Enables or disables authentication at cluster or org level for the specified auth type. Currently supports `TRUSTED_AUTH`. #### Required privileges Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) or `CONTROL_TRUSTED_AUTH` (**Can Enable or Disable Trusted Authentication**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled, the `CONTROL_TRUSTED_AUTH` privilege is required. #### Usage guidelines Use `cluster_preferences` to enable or disable authentication at the cluster level. Cluster-level settings can only be configured from the Primary Org. - `ENABLED` — Generates a new access token if one does not exist. An existing token is preserved. - `DISABLED` — Revokes the existing cluster-level access token. Use `org_preferences` to enable or disable authentication for one or more Orgs. Each entry must include an `org_identifier` (unique ID or name) and an `auth_status`. Org-level configuration requires the per-Org authentication feature to be enabled on your instance. - `ENABLED` — Generates a new org-level access token if one does not exist. - `DISABLED` — Revokes the existing org-level access token for that Org. Both `cluster_preferences` and `org_preferences` are optional. Omitting a field leaves the corresponding settings unchanged. If both are omitted, the API returns `204 No Content` without making any changes. **Note**: Cluster-level and org-level settings are independent of each other. Enabling or disabling one does not affect the other. + +### Example + + +```typescript +import { createBearerAuthenticationConfig, AuthenticationApi, ConfigureAuthSettingsRequest } from '@thoughtspot/rest-api-sdk'; + +const configuration = createBearerAuthenticationConfig("CLUSTER_SERVER_URL", { + username: "YOUR_USERNAME", + password: "YOUR_PASSWORD", +}); +const apiInstance = new AuthenticationApi(configuration); + +apiInstance.configureAuthSettings( + // ConfigureAuthSettingsRequest + { + auth_type: "TRUSTED_AUTH", + cluster_preferences: null, + org_preferences: [ + { + org_identifier: "org_identifier_example", + auth_status: "ENABLED", + }, + ], + } +).then((data:any) => { + console.log('API called successfully. Returned data: ' + data); +}).catch((error:any) => console.error(error)); + + +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **configureAuthSettingsRequest** | **ConfigureAuthSettingsRequest**| | + + +### Return type + +**void** + +### Authorization + +[bearerAuth](README.md#bearerAuth) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**204** | Trusted authentication settings configured successfully. | - | +**400** | Invalid request. | - | +**401** | Unauthorized access. | - | +**403** | Forbidden access. | - | +**500** | Unexpected error | - | + +[[Back to top]](#) [[Back to API list]](README.md#documentation-for-api-endpoints) [[Back to Model list]](README.md#documentation-for-models) [[Back to README]](README.md) + +# **getCurrentUserInfo** +> User getCurrentUserInfo() + + Version: 9.0.0.cl or later Retrieves details of the current user session for the token provided in the request header. Any ThoughtSpot user can access this endpoint and send an API request. The data returned in the API response varies according to user\'s privilege and object access permissions. **NOTE**: In ThoughtSpot, users with cluster administration privileges can access all Orgs by default. However, unless the administrator is explicitly added to an Org, the Orgs list in the session information returned by the API will include only the Primary Org. To include other Orgs in the API response, you must explicitly add the administrator to each Org in the Admin settings page in the UI or via user REST API. + +### Example + + +```typescript +import { createBearerAuthenticationConfig, AuthenticationApi, GetCurrentUserInfoRequest } from '@thoughtspot/rest-api-sdk'; + +const configuration = createBearerAuthenticationConfig("CLUSTER_SERVER_URL", { + username: "YOUR_USERNAME", + password: "YOUR_PASSWORD", +}); +const apiInstance = new AuthenticationApi(configuration); + +apiInstance.getCurrentUserInfo().then((data:any) => { + console.log('API called successfully. Returned data: ' + JSON.stringify(data)); +}).catch((error:any) => console.error(error)); + + +``` + + +### Parameters +This endpoint does not need any parameter. + + +### Return type + +**User** + +### Authorization + +[bearerAuth](README.md#bearerAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Fetch current session user detail successful. | - | +**400** | Invalid request. | - | +**401** | Unauthorized access. | - | +**403** | Forbidden access. | - | +**500** | Unexpected error | - | + +[[Back to top]](#) [[Back to API list]](README.md#documentation-for-api-endpoints) [[Back to Model list]](README.md#documentation-for-models) [[Back to README]](README.md) + +# **getCurrentUserToken** +> GetTokenResponse getCurrentUserToken() + + Version: 9.4.0.cl or later Retrieves details of the current session token for the bearer token provided in the request header. This API endpoint does not create a new token. Instead, it returns details about the token, including the token string, creation time, expiration time, and the associated user. Use this endpoint to introspect your current session token, debug authentication issues, or when a frontend application needs session token details. Any ThoughtSpot user with a valid bearer token can access this endpoint and send an API request + +### Example + + +```typescript +import { createBearerAuthenticationConfig, AuthenticationApi, GetCurrentUserTokenRequest } from '@thoughtspot/rest-api-sdk'; + +const configuration = createBearerAuthenticationConfig("CLUSTER_SERVER_URL", { + username: "YOUR_USERNAME", + password: "YOUR_PASSWORD", +}); +const apiInstance = new AuthenticationApi(configuration); + +apiInstance.getCurrentUserToken().then((data:any) => { + console.log('API called successfully. Returned data: ' + JSON.stringify(data)); +}).catch((error:any) => console.error(error)); + + +``` + + +### Parameters +This endpoint does not need any parameter. + + +### Return type + +**GetTokenResponse** + +### Authorization + +[bearerAuth](README.md#bearerAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Fetching token for current user successful. | - | +**400** | Invalid request. | - | +**401** | Unauthorized access. | - | +**403** | Forbidden access. | - | +**500** | Unexpected error | - | + +[[Back to top]](#) [[Back to API list]](README.md#documentation-for-api-endpoints) [[Back to Model list]](README.md#documentation-for-models) [[Back to README]](README.md) + +# **getCustomAccessToken** +> AccessToken getCustomAccessToken(getCustomAccessTokenRequest) + + Version: 10.4.0.cl or later Creates an authentication token that provides values for the formula variables in the Row Level Security (RLS) rules for a given user. Recommended for use cases that require Attribute-based access control (ABAC) via RLS. #### Required privileges To add a new user and assign privileges during auto-creation, the `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege is required. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled, the `CONTROL_TRUSTED_AUTH` (**Can Enable or Disable Trusted Authentication**) privilege and edit access to the data source are required. To configure formula variables for all Orgs on your instance or the Primary Org, cluster administration privileges are required. Org administrators can configure formula variables for their respective Orgs. If Role-Based Access Control (RBAC) is enabled, users with the `CAN_MANAGE_VARIABLES` (**Can manage variables**) role privilege can also create and manage variables for their Org context. #### Usage guidelines You can generate a token by providing a `username` and `password`, or by using a `secret_key`. To generate a `secret_key`, the administrator must enable [Trusted authentication](https://developers.thoughtspot.com/docs/trusted-auth-secret-key) in the **Develop** > **Customizations** > **Security Settings** page. **Note**: * When both `password` and `secret_key` are included in the API request, `password` takes precedence. * If [Multi-Factor Authentication (MFA)](https://docs.thoughtspot.com/cloud/latest/authentication-local-mfa) is enabled on your instance, the API login request with `username` and `password` returns an error. You can switch to token-based authentication with `secret_key` or contact ThoughtSpot Support for assistance. The token obtained from ThoughtSpot is valid for 5 minutes by default. You can configure the token expiration time as required. #### ABAC via RLS To implement ABAC via RLS and assign security entitlements to users during session creation, generate a token with custom variable values. The values set in the authentication token are applied to the formula variables referenced in RLS rules at the table level, which determines the data each user can access based on their entitlements. The variable values can be configured to persist for a specific set of Models in user sessions initiated with the token, allowing different RLS rules to be set for different data models. Once defined, the rules are added to the user\'s `variable_values` object, after which all sessions will use the persisted values. For more information, see [ABAC via tokens Documentation](https://developers.thoughtspot.com/docs/abac-via-rls-variables). ##### Formula variables Before defining variable values, ensure the variables are created and available on your instance. To create a formula variable, you can use the **Create variable** (`/api/rest/2.0/template/variables/create`) REST API endpoint, with the variable `type` set as `Formula_Variable` in the API request. The API doesn\'t support `\"persist_option\": \"RESET\"` and `\"persist_option\": \"NONE\"` when `variable_values` are defined in the request. If you are using `variable_values` for token generation, you must use other supported persist options such as `APPEND` or `REPLACE`. If you want to use `RESET` or `NONE`, do not pass any `variable_values`. In such cases, `variable_values` will remain unaffected. #### Supported objects The supported object type is `LOGICAL_TABLE`. When using `object_id` with `variable_values`, models are supported. #### Just-in-time provisioning For [just-in-time user creation and provisioning](https://developers.thoughtspot.com/docs/just-in-time-provisioning), specify the following attributes in the API request: * `auto_create` * `username` * `display_name` * `email` * `groups` Set `auto_create` to `true` if the username does not exist in ThoughtSpot. If the username already exists in ThoughtSpot and `auto_create` is set to `true`, user properties such as display name, email, Org and group entitlements will not be updated with new values. Setting `auto_create` to `true` does not create formula variables. Hence, this setting will not be applicable to `variable_values`. #### Important point to note All options in the token creation APIs that define user access to data in ThoughtSpot will take effect during token creation, not when the token is used for authentication. For example, `auto_create:true` will create the user when the authentication token is created. Persist options such as `APPEND` and `REPLACE` will persist `variable_values` on the user profile when the token is created. + +### Example + + +```typescript +import { createBearerAuthenticationConfig, AuthenticationApi, GetCustomAccessTokenRequest } from '@thoughtspot/rest-api-sdk'; + +const configuration = createBearerAuthenticationConfig("CLUSTER_SERVER_URL", { + username: "YOUR_USERNAME", + password: "YOUR_PASSWORD", +}); +const apiInstance = new AuthenticationApi(configuration); + +apiInstance.getCustomAccessToken( + // GetCustomAccessTokenRequest + { + username: "username_example", + password: "", + secret_key: "", + validity_time_in_sec: 300, + org_identifier: "org_identifier_example", + persist_option: "REPLACE", + filter_rules: [ + { + column_name: "column_name_example", + operator: "EQ", + values: [ + {}, + ], + }, + ], + parameter_values: [ + { + name: "name_example", + values: [ + {}, + ], + }, + ], + variable_values: [ + { + name: "name_example", + values: [ + {}, + ], + }, + ], + objects: [ + { + type: "LOGICAL_TABLE", + identifier: "identifier_example", + }, + ], + email: "email_example", + display_name: "display_name_example", + groups: [ + { + identifier: "identifier_example", + }, + ], + auto_create: true, + } +).then((data:any) => { + console.log('API called successfully. Returned data: ' + data); +}).catch((error:any) => console.error(error)); + + +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **getCustomAccessTokenRequest** | **GetCustomAccessTokenRequest**| | + + +### Return type + +**AccessToken** + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | ABAC token creation was successful. | - | +**400** | Invalid request. This could be due to missing or incorrect parameters. | - | +**401** | Unauthorized access. The request could not be authenticated. | - | +**403** | Forbidden access. The user does not have permission to access this resource. | - | +**500** | An unexpected error occurred on the server. | - | + +[[Back to top]](#) [[Back to API list]](README.md#documentation-for-api-endpoints) [[Back to Model list]](README.md#documentation-for-models) [[Back to README]](README.md) + +# **getFullAccessToken** +> Token getFullAccessToken(getFullAccessTokenRequest) + + Version: 9.0.0.cl or later Generates an authentication token for creating a full session in ThoughtSpot for a given user. Recommended for use cases that do not require Attribute-based access control (ABAC) via Row Level Security (RLS). #### Usage guidelines You can generate a token for a user by providing a `username` and `password`, or by using the `secret_key` generated for your instance. To generate a `secret_key`, the administrator must enable [Trusted authentication](https://developers.thoughtspot.com/docs/trusted-auth-secret-key) in the **Develop** > **Customizations** > **Security Settings** page. **Note**: * When both `password` and `secret_key` are included in the API request, `password` takes precedence. * If [Multi-Factor Authentication (MFA)](https://docs.thoughtspot.com/cloud/latest/authentication-local-mfa) is enabled on your instance, the API login request with `username` and `password` returns an error. You can switch to token-based authentication with `secret_key` or contact ThoughtSpot Support for assistance. The token obtained from ThoughtSpot is valid for 5 minutes by default. You can configure the token expiration time as required. #### Just-in-time provisioning For [just-in-time user creation and provisioning](https://developers.thoughtspot.com/docs/just-in-time-provisioning), specify the following attributes in the API request: * `auto_create` * `username` * `display_name` * `email` * `group_identifiers` Set `auto_create` to `true` if the username does not exist in ThoughtSpot. If the user already exists in ThoughtSpot and `auto_create` is set to `true`, user properties such as display name, email and group assignment will be updated. To add a new user and assign privileges during auto-creation, the `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege is required. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled, the `CONTROL_TRUSTED_AUTH` (**Can Enable or Disable Trusted Authentication**) privilege is required. #### Important point to note All options in the token creation APIs that define user access to data in ThoughtSpot will take effect during token creation, not when the token is used for authentication. For example, `auto_create:true` will create the user when the authentication token is created. + +### Example + + +```typescript +import { createBearerAuthenticationConfig, AuthenticationApi, GetFullAccessTokenRequest } from '@thoughtspot/rest-api-sdk'; + +const configuration = createBearerAuthenticationConfig("CLUSTER_SERVER_URL", { + username: "YOUR_USERNAME", + password: "YOUR_PASSWORD", +}); +const apiInstance = new AuthenticationApi(configuration); + +apiInstance.getFullAccessToken( + // GetFullAccessTokenRequest + { + username: "username_example", + password: "", + secret_key: "", + validity_time_in_sec: 300, + org_id: 1, + email: "email_example", + display_name: "display_name_example", + auto_create: false, + group_identifiers: [ + "group_identifiers_example", + ], + user_parameters: null, + } +).then((data:any) => { + console.log('API called successfully. Returned data: ' + data); +}).catch((error:any) => console.error(error)); + + +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **getFullAccessTokenRequest** | **GetFullAccessTokenRequest**| | + + +### Return type + +**Token** + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Bearer auth token creation successful. | - | +**400** | Invalid request. | - | +**401** | Unauthorized access. | - | +**403** | Forbidden access. | - | +**500** | Unexpected error | - | + +[[Back to top]](#) [[Back to API list]](README.md#documentation-for-api-endpoints) [[Back to Model list]](README.md#documentation-for-models) [[Back to README]](README.md) + +# **getObjectAccessToken** +> Token getObjectAccessToken(getObjectAccessTokenRequest) + + Version: 9.0.0.cl or later Generates an authentication token that provides access to a specific metadata object. This object list is intersected with the list of objects the user is allowed to access via group membership. For more information, see [Object security](https://docs.thoughtspot.com/cloud/latest/security-data-object#object_security). #### Usage guidelines You can generate a token for a user by providing a `username` and `password`, or by using the `secret_key` generated for your instance. To generate a `secret_key`, the administrator must enable [Trusted authentication](https://developers.thoughtspot.com/docs/trusted-auth-secret-key) in the **Develop** > **Customizations** > **Security Settings** page. **Note**: * When both `password` and `secret_key` are included in the API request, `password` takes precedence. * If [Multi-Factor Authentication (MFA)](https://docs.thoughtspot.com/cloud/latest/authentication-local-mfa) is enabled on your instance, the API login request with `username` and `password` returns an error. You can switch to token-based authentication with `secret_key` or contact ThoughtSpot Support for assistance. The token obtained from ThoughtSpot is valid for 5 minutes by default. You can configure the token expiration time as required. #### Just-in-time provisioning For [just-in-time user creation and provisioning](https://developers.thoughtspot.com/docs/just-in-time-provisioning), specify the following attributes in the API request: * `auto_create` * `username` * `display_name` * `email` * `group_identifiers` Set `auto_create` to `true` if the user is not available in ThoughtSpot. If the user already exists in ThoughtSpot and the `auto_create` parameter is set to `true`, user properties such as display name, email, and group assignment will be updated. To add a new user and assign privileges, the `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege is required. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled, the `CONTROL_TRUSTED_AUTH`(**Can Enable or Disable Trusted Authentication**) privilege is required. #### Important point to note All options in the token creation APIs that define user access to data in ThoughtSpot will take effect during token creation, not when the token is used for authentication. For example, `auto_create:true` will create the user when the authentication token is created. + +### Example + + +```typescript +import { createBearerAuthenticationConfig, AuthenticationApi, GetObjectAccessTokenRequest } from '@thoughtspot/rest-api-sdk'; + +const configuration = createBearerAuthenticationConfig("CLUSTER_SERVER_URL", { + username: "YOUR_USERNAME", + password: "YOUR_PASSWORD", +}); +const apiInstance = new AuthenticationApi(configuration); + +apiInstance.getObjectAccessToken( + // GetObjectAccessTokenRequest + { + username: "username_example", + object_id: "object_id_example", + password: "", + secret_key: "", + validity_time_in_sec: 300, + org_id: 1, + email: "email_example", + display_name: "display_name_example", + auto_create: false, + group_identifiers: [ + "group_identifiers_example", + ], + user_parameters: null, + } +).then((data:any) => { + console.log('API called successfully. Returned data: ' + data); +}).catch((error:any) => console.error(error)); + + +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **getObjectAccessTokenRequest** | **GetObjectAccessTokenRequest**| | + + +### Return type + +**Token** + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Bearer auth token creation successful. | - | +**400** | Invalid request. | - | +**401** | Unauthorized access. | - | +**403** | Forbidden access. | - | +**500** | Unexpected error | - | + +[[Back to top]](#) [[Back to API list]](README.md#documentation-for-api-endpoints) [[Back to Model list]](README.md#documentation-for-models) [[Back to README]](README.md) + +# **login** +> void login(loginRequest) + + Version: 9.0.0.cl or later Creates a login session for a ThoughtSpot user with Basic authentication. In Basic authentication method, REST clients log in to ThoughtSpot using `username` and `password` attributes. On a multi-tenant cluster with Orgs, users can pass the ID of the Org in the API request to log in to a specific Org context. **Note**: If Multi-Factor Authentication (MFA) is enabled on your instance, the API login request with basic authentication (`username` and `password` ) returns an error. Contact ThoughtSpot Support for assistance. A successful login returns a session cookie that can be used in your subsequent API requests. + +### Example + + +```typescript +import { createBearerAuthenticationConfig, AuthenticationApi, LoginRequest } from '@thoughtspot/rest-api-sdk'; + +const configuration = createBearerAuthenticationConfig("CLUSTER_SERVER_URL", { + username: "YOUR_USERNAME", + password: "YOUR_PASSWORD", +}); +const apiInstance = new AuthenticationApi(configuration); + +apiInstance.login( + // LoginRequest + { + username: "username_example", + password: "password_example", + org_identifier: "org_identifier_example", + remember_me: false, + } +).then((data:any) => { + console.log('API called successfully. Returned data: ' + data); +}).catch((error:any) => console.error(error)); + + +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **loginRequest** | **LoginRequest**| | + + +### Return type + +**void** + +### Authorization + +[bearerAuth](README.md#bearerAuth) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**204** | User login successful. | - | +**400** | Invalid request. | - | +**401** | Unauthorized access. | - | +**403** | Forbidden access. | - | +**500** | Unexpected error | - | + +[[Back to top]](#) [[Back to API list]](README.md#documentation-for-api-endpoints) [[Back to Model list]](README.md#documentation-for-models) [[Back to README]](README.md) + +# **logout** +> void logout() + + Version: 9.0.0.cl or later Logs out a user from their current session. + +### Example + + +```typescript +import { createBearerAuthenticationConfig, AuthenticationApi, LogoutRequest } from '@thoughtspot/rest-api-sdk'; + +const configuration = createBearerAuthenticationConfig("CLUSTER_SERVER_URL", { + username: "YOUR_USERNAME", + password: "YOUR_PASSWORD", +}); +const apiInstance = new AuthenticationApi(configuration); + +apiInstance.logout().then((data:any) => { + console.log('API called successfully. Returned data: ' + JSON.stringify(data)); +}).catch((error:any) => console.error(error)); + + +``` + + +### Parameters +This endpoint does not need any parameter. + + +### Return type + +**void** + +### Authorization + +[bearerAuth](README.md#bearerAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**204** | User logout successful. | - | +**400** | Invalid request. | - | +**401** | Unauthorized access. | - | +**403** | Forbidden access. | - | +**500** | Unexpected error | - | + +[[Back to top]](#) [[Back to API list]](README.md#documentation-for-api-endpoints) [[Back to Model list]](README.md#documentation-for-models) [[Back to README]](README.md) + +# **revokeToken** +> void revokeToken(revokeTokenRequest) + + Version: 9.0.0.cl or later Revokes the authentication token issued for current user session. The token of your current session expires when you make a call to the `/api/rest/2.0/auth/token/revoke` endpoint. the users will not be able to access ThoughtSpot objects until a new token is obtained. To restart your session, request for a new token from ThoughtSpot. See [Get Full Access Token](#/http/api-endpoints/authentication/get-full-access-token). + +### Example + + +```typescript +import { createBearerAuthenticationConfig, AuthenticationApi, RevokeTokenRequest } from '@thoughtspot/rest-api-sdk'; + +const configuration = createBearerAuthenticationConfig("CLUSTER_SERVER_URL", { + username: "YOUR_USERNAME", + password: "YOUR_PASSWORD", +}); +const apiInstance = new AuthenticationApi(configuration); + +apiInstance.revokeToken( + // RevokeTokenRequest + { + user_identifier: "user_identifier_example", + token: "token_example", + } +).then((data:any) => { + console.log('API called successfully. Returned data: ' + data); +}).catch((error:any) => console.error(error)); + + +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **revokeTokenRequest** | **RevokeTokenRequest**| | + + +### Return type + +**void** + +### Authorization + +[bearerAuth](README.md#bearerAuth) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**204** | Token successfully revoked. | - | +**400** | Invalid request. | - | +**401** | Unauthorized access. | - | +**403** | Forbidden access. | - | +**500** | Unexpected error | - | + +[[Back to top]](#) [[Back to API list]](README.md#documentation-for-api-endpoints) [[Back to Model list]](README.md#documentation-for-models) [[Back to README]](README.md) + +# **searchAuthSettings** +> SearchAuthSettingsResponse searchAuthSettings(searchAuthSettingsRequest) + + Version: 26.6.0.cl or later Returns the authentication configuration for the specified auth type at cluster and org level. Currently supports `TRUSTED_AUTH`. #### Required privileges Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) or `CONTROL_TRUSTED_AUTH` (**Can Enable or Disable Trusted Authentication**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled, the `CONTROL_TRUSTED_AUTH` privilege is required. #### Usage guidelines Use `scope` to control which level of settings are returned: - `CLUSTER` — Returns cluster-level authentication status and access tokens. Accessible only from the Primary Org. - `ORG` — Returns org-level authentication status and access tokens for the current Org. Requires the per-Org authentication feature to be enabled on your instance. - If `scope` is omitted, both cluster and org-level settings are returned based on the caller\'s org context and feature availability. The `access_tokens` array in `cluster_preferences` or `org_preferences` is omitted when no token is configured at that level. **Note**: Access tokens returned in the response are sensitive credentials. Treat them with the same care as passwords. + +### Example + + +```typescript +import { createBearerAuthenticationConfig, AuthenticationApi, SearchAuthSettingsRequest } from '@thoughtspot/rest-api-sdk'; + +const configuration = createBearerAuthenticationConfig("CLUSTER_SERVER_URL", { + username: "YOUR_USERNAME", + password: "YOUR_PASSWORD", +}); +const apiInstance = new AuthenticationApi(configuration); + +apiInstance.searchAuthSettings( + // SearchAuthSettingsRequest + { + auth_type: "TRUSTED_AUTH", + scope: "CLUSTER", + } +).then((data:any) => { + console.log('API called successfully. Returned data: ' + data); +}).catch((error:any) => console.error(error)); + + +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **searchAuthSettingsRequest** | **SearchAuthSettingsRequest**| | + + +### Return type + +**SearchAuthSettingsResponse** + +### Authorization + +[bearerAuth](README.md#bearerAuth) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Authentication settings retrieved successfully. | - | +**400** | Invalid request. | - | +**401** | Unauthorized access. | - | +**403** | Forbidden access. | - | +**500** | Unexpected error | - | + +[[Back to top]](#) [[Back to API list]](README.md#documentation-for-api-endpoints) [[Back to Model list]](README.md#documentation-for-models) [[Back to README]](README.md) + +# **validateToken** +> TokenValidationResponse validateToken(validateTokenRequest) + + Version: 9.12.0.cl or later Validates the authentication token specified in the API request. If your token is not valid, [Get a new token](#/http/api-endpoints/authentication/get-full-access-token). + +### Example + + +```typescript +import { createBearerAuthenticationConfig, AuthenticationApi, ValidateTokenRequest } from '@thoughtspot/rest-api-sdk'; + +const configuration = createBearerAuthenticationConfig("CLUSTER_SERVER_URL", { + username: "YOUR_USERNAME", + password: "YOUR_PASSWORD", +}); +const apiInstance = new AuthenticationApi(configuration); + +apiInstance.validateToken( + // ValidateTokenRequest + { + token: "token_example", + } +).then((data:any) => { + console.log('API called successfully. Returned data: ' + data); +}).catch((error:any) => console.error(error)); + + +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **validateTokenRequest** | **ValidateTokenRequest**| | + + +### Return type + +**TokenValidationResponse** + +### Authorization + +[bearerAuth](README.md#bearerAuth) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Token validation successful. | - | +**400** | Invalid request. | - | +**401** | Unauthorized access. | - | +**403** | Forbidden access. | - | +**500** | Unexpected error | - | + +[[Back to top]](#) [[Back to API list]](README.md#documentation-for-api-endpoints) [[Back to Model list]](README.md#documentation-for-models) [[Back to README]](README.md) + diff --git a/sdks/typescript/CollectionsApi.md b/sdks/typescript/CollectionsApi.md new file mode 100644 index 000000000..c4a78c811 --- /dev/null +++ b/sdks/typescript/CollectionsApi.md @@ -0,0 +1,298 @@ +# ThoughtSpotRestApiSdk.CollectionsApi + +All URIs are relative to *CLUSTER_URL* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**createCollection**](CollectionsApi.md#createCollection) | **POST** /api/rest/2.0/collections/create | +[**deleteCollection**](CollectionsApi.md#deleteCollection) | **POST** /api/rest/2.0/collections/delete | +[**searchCollections**](CollectionsApi.md#searchCollections) | **POST** /api/rest/2.0/collections/search | +[**updateCollection**](CollectionsApi.md#updateCollection) | **POST** /api/rest/2.0/collections/{collection_identifier}/update | + + +# **createCollection** +> Collection createCollection(createCollectionRequest) + + Version: 26.4.0.cl or later Creates a new collection in ThoughtSpot. Collections allow you to organize and group related metadata objects such as Liveboards, Answers, worksheets, and other data objects. You can also create nested collections (sub-collections) to build a hierarchical structure. #### Supported operations The API endpoint lets you perform the following operations: * Create a new collection * Add metadata objects (Liveboards, Answers, Logical Tables) to the collection * Create nested collections by adding sub-collections + +### Example + + +```typescript +import { createBearerAuthenticationConfig, CollectionsApi, CreateCollectionRequest } from '@thoughtspot/rest-api-sdk'; + +const configuration = createBearerAuthenticationConfig("CLUSTER_SERVER_URL", { + username: "YOUR_USERNAME", + password: "YOUR_PASSWORD", +}); +const apiInstance = new CollectionsApi(configuration); + +apiInstance.createCollection( + // CreateCollectionRequest + { + name: "name_example", + description: "description_example", + metadata: [ + { + type: "LIVEBOARD", + identifiers: [ + "identifiers_example", + ], + }, + ], + } +).then((data:any) => { + console.log('API called successfully. Returned data: ' + data); +}).catch((error:any) => console.error(error)); + + +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **createCollectionRequest** | **CreateCollectionRequest**| | + + +### Return type + +**Collection** + +### Authorization + +[bearerAuth](README.md#bearerAuth) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Collection created successfully | - | +**400** | Invalid request. | - | +**401** | Unauthorized access. | - | +**403** | Forbidden access. | - | +**500** | Unexpected error | - | + +[[Back to top]](#) [[Back to API list]](README.md#documentation-for-api-endpoints) [[Back to Model list]](README.md#documentation-for-models) [[Back to README]](README.md) + +# **deleteCollection** +> CollectionDeleteResponse deleteCollection(deleteCollectionRequest) + + Version: 26.4.0.cl or later Deletes one or more collections from ThoughtSpot. #### Delete options * **delete_children**: When set to `true`, deletes the child objects (metadata items) within the collection that the user has access to. Objects that the user does not have permission to delete will be skipped. * **dry_run**: When set to `true`, performs a preview of the deletion operation without actually deleting anything. The response shows what would be deleted, allowing you to review before committing the deletion. #### Response The response includes: * **metadata_deleted**: List of metadata objects that were successfully deleted * **metadata_skipped**: List of metadata objects that were skipped due to lack of permissions or other constraints + +### Example + + +```typescript +import { createBearerAuthenticationConfig, CollectionsApi, DeleteCollectionRequest } from '@thoughtspot/rest-api-sdk'; + +const configuration = createBearerAuthenticationConfig("CLUSTER_SERVER_URL", { + username: "YOUR_USERNAME", + password: "YOUR_PASSWORD", +}); +const apiInstance = new CollectionsApi(configuration); + +apiInstance.deleteCollection( + // DeleteCollectionRequest + { + collection_identifiers: [ + "collection_identifiers_example", + ], + delete_children: false, + dry_run: false, + } +).then((data:any) => { + console.log('API called successfully. Returned data: ' + data); +}).catch((error:any) => console.error(error)); + + +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **deleteCollectionRequest** | **DeleteCollectionRequest**| | + + +### Return type + +**CollectionDeleteResponse** + +### Authorization + +[bearerAuth](README.md#bearerAuth) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Collections deleted successfully. | - | +**400** | Invalid request. | - | +**401** | Unauthorized access. | - | +**403** | Forbidden access. | - | +**404** | Resource not found. | - | +**500** | Unexpected error | - | + +[[Back to top]](#) [[Back to API list]](README.md#documentation-for-api-endpoints) [[Back to Model list]](README.md#documentation-for-models) [[Back to README]](README.md) + +# **searchCollections** +> CollectionSearchResponse searchCollections(searchCollectionsRequest) + + Version: 26.4.0.cl or later Gets a list of collections available in ThoughtSpot. To get details of a specific collection, specify the collection GUID or name. You can also filter the API response based on the collection name pattern, author, and other criteria. #### Search options * **name_pattern**: Use \'%\' as a wildcard character to match collection names * **collection_identifiers**: Search for specific collections by their GUIDs or names * **include_metadata**: When set to `true`, includes the metadata objects within each collection in the response **NOTE**: If the API returns an empty list, consider increasing the value of the `record_size` parameter. To search across all available collections, set `record_size` to `-1`. + +### Example + + +```typescript +import { createBearerAuthenticationConfig, CollectionsApi, SearchCollectionsRequest } from '@thoughtspot/rest-api-sdk'; + +const configuration = createBearerAuthenticationConfig("CLUSTER_SERVER_URL", { + username: "YOUR_USERNAME", + password: "YOUR_PASSWORD", +}); +const apiInstance = new CollectionsApi(configuration); + +apiInstance.searchCollections( + // SearchCollectionsRequest + { + name_pattern: "name_pattern_example", + record_offset: 0, + record_size: 10, + collection_identifiers: [ + "collection_identifiers_example", + ], + created_by_user_identifiers: [ + "created_by_user_identifiers_example", + ], + include_metadata: false, + sort_options: null, + } +).then((data:any) => { + console.log('API called successfully. Returned data: ' + data); +}).catch((error:any) => console.error(error)); + + +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **searchCollectionsRequest** | **SearchCollectionsRequest**| | + + +### Return type + +**CollectionSearchResponse** + +### Authorization + +[bearerAuth](README.md#bearerAuth) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Successfully retrieved list of collections | - | +**400** | Invalid request. | - | +**401** | Unauthorized access. | - | +**403** | Forbidden access. | - | +**500** | Unexpected error | - | + +[[Back to top]](#) [[Back to API list]](README.md#documentation-for-api-endpoints) [[Back to Model list]](README.md#documentation-for-models) [[Back to README]](README.md) + +# **updateCollection** +> void updateCollection(updateCollectionRequest) + + Version: 26.4.0.cl or later Updates an existing collection in ThoughtSpot. #### Supported operations This API endpoint lets you perform the following operations: * Update collection name and description * Change visibility settings * Add metadata objects to the collection (operation: ADD) * Remove metadata objects from the collection (operation: REMOVE) * Replace all metadata objects in the collection (operation: REPLACE) #### Operation types * **ADD**: Adds the specified metadata objects to the existing collection without removing current items * **REMOVE**: Removes only the specified metadata objects from the collection * **REPLACE**: Replaces all existing metadata objects with the specified items (default behavior) + +### Example + + +```typescript +import { createBearerAuthenticationConfig, CollectionsApi, UpdateCollectionRequest } from '@thoughtspot/rest-api-sdk'; + +const configuration = createBearerAuthenticationConfig("CLUSTER_SERVER_URL", { + username: "YOUR_USERNAME", + password: "YOUR_PASSWORD", +}); +const apiInstance = new CollectionsApi(configuration); + +apiInstance.updateCollection( + // string | Unique GUID of the collection. Note: Collection names cannot be used as identifiers since duplicate names are allowed. + "collection_identifier_example" , + // UpdateCollectionRequest + { + name: "name_example", + description: "description_example", + metadata: [ + { + type: "LIVEBOARD", + identifiers: [ + "identifiers_example", + ], + }, + ], + operation: "REPLACE", + } +).then((data:any) => { + console.log('API called successfully. Returned data: ' + data); +}).catch((error:any) => console.error(error)); + + +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **updateCollectionRequest** | **UpdateCollectionRequest**| | + **collectionIdentifier** | [**string**] | Unique GUID of the collection. Note: Collection names cannot be used as identifiers since duplicate names are allowed. | defaults to undefined + + +### Return type + +**void** + +### Authorization + +[bearerAuth](README.md#bearerAuth) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**204** | Collection updated successfully. No content returned. | - | +**400** | Invalid request. | - | +**401** | Unauthorized access. | - | +**403** | Forbidden access. | - | +**404** | Resource not found. | - | +**500** | Unexpected error | - | + +[[Back to top]](#) [[Back to API list]](README.md#documentation-for-api-endpoints) [[Back to Model list]](README.md#documentation-for-models) [[Back to README]](README.md) + diff --git a/sdks/typescript/ConnectionConfigurationsApi.md b/sdks/typescript/ConnectionConfigurationsApi.md new file mode 100644 index 000000000..571261469 --- /dev/null +++ b/sdks/typescript/ConnectionConfigurationsApi.md @@ -0,0 +1,293 @@ +# ThoughtSpotRestApiSdk.ConnectionConfigurationsApi + +All URIs are relative to *CLUSTER_URL* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**connectionConfigurationSearch**](ConnectionConfigurationsApi.md#connectionConfigurationSearch) | **POST** /api/rest/2.0/connection-configurations/search | +[**createConnectionConfiguration**](ConnectionConfigurationsApi.md#createConnectionConfiguration) | **POST** /api/rest/2.0/connection-configurations/create | +[**deleteConnectionConfiguration**](ConnectionConfigurationsApi.md#deleteConnectionConfiguration) | **POST** /api/rest/2.0/connection-configurations/delete | +[**updateConnectionConfiguration**](ConnectionConfigurationsApi.md#updateConnectionConfiguration) | **POST** /api/rest/2.0/connection-configurations/{configuration_identifier}/update | + + +# **connectionConfigurationSearch** +> Array connectionConfigurationSearch(connectionConfigurationSearchRequest) + + Version: 10.12.0.cl or later Gets connection configuration objects. Requires `DATAMANAGEMENT` (**Can manage data**) and edit permissions to the connection object, or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) privilege is required. #### Usage guidelines * To get a list of all configurations available in the ThoughtSpot system, send the API request with only the connection name or GUID in the request body. * To fetch details of a configuration object, specify the configuration object name or GUID. + +### Example + + +```typescript +import { createBearerAuthenticationConfig, ConnectionConfigurationsApi, ConnectionConfigurationSearchRequest } from '@thoughtspot/rest-api-sdk'; + +const configuration = createBearerAuthenticationConfig("CLUSTER_SERVER_URL", { + username: "YOUR_USERNAME", + password: "YOUR_PASSWORD", +}); +const apiInstance = new ConnectionConfigurationsApi(configuration); + +apiInstance.connectionConfigurationSearch( + // ConnectionConfigurationSearchRequest + { + connection_identifier: "connection_identifier_example", + configuration_identifier: "configuration_identifier_example", + policy_type: "NO_POLICY", + } +).then((data:any) => { + console.log('API called successfully. Returned data: ' + data); +}).catch((error:any) => console.error(error)); + + +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **connectionConfigurationSearchRequest** | **ConnectionConfigurationSearchRequest**| | + + +### Return type + +**Array** + +### Authorization + +[bearerAuth](README.md#bearerAuth) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Configuration fetched successfully. | - | +**400** | Invalid request. | - | +**401** | Unauthorized access. | - | +**403** | Forbidden access. | - | +**500** | Unexpected error | - | + +[[Back to top]](#) [[Back to API list]](README.md#documentation-for-api-endpoints) [[Back to Model list]](README.md#documentation-for-models) [[Back to README]](README.md) + +# **createConnectionConfiguration** +> ConnectionConfigurationResponse createConnectionConfiguration(createConnectionConfigurationRequest) + + Version: 10.12.0.cl or later Creates an additional configuration to an existing connection to a data warehouse. Requires `DATAMANAGEMENT` (**Can manage data**) or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) privilege is required. #### Usage guidelines * A JSON map of configuration attributes in `configuration`. The following example shows the configuration attributes: ``` { \"user\":\"DEV_USER\", \"password\":\"TestConn123\", \"role\":\"DEV\", \"warehouse\":\"DEV_WH\" } ``` * If the `policy_type` is `PRINCIPALS`, then `policy_principals` is a required field. * If the `policy_type` is `PROCESSES`, then `policy_processes` is a required field. * If the `policy_type` is `NO_POLICY`, then `policy_principals` and `policy_processes` are not required fields. #### Parameterized Connection Support For parameterized connections that use OAuth authentication, only the same_as_parent and policy_process_options attributes are allowed in the API request. These attributes are not applicable to connections that are not parameterized. + +### Example + + +```typescript +import { createBearerAuthenticationConfig, ConnectionConfigurationsApi, CreateConnectionConfigurationRequest } from '@thoughtspot/rest-api-sdk'; + +const configuration = createBearerAuthenticationConfig("CLUSTER_SERVER_URL", { + username: "YOUR_USERNAME", + password: "YOUR_PASSWORD", +}); +const apiInstance = new ConnectionConfigurationsApi(configuration); + +apiInstance.createConnectionConfiguration( + // CreateConnectionConfigurationRequest + { + name: "name_example", + description: "description_example", + connection_identifier: "connection_identifier_example", + same_as_parent: false, + policy_process_options: null, + authentication_type: "SERVICE_ACCOUNT", + configuration: {}, + policy_type: "NO_POLICY", + policy_principals: [ + "policy_principals_example", + ], + policy_processes: [ + "SAGE_INDEXING", + ], + } +).then((data:any) => { + console.log('API called successfully. Returned data: ' + data); +}).catch((error:any) => console.error(error)); + + +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **createConnectionConfigurationRequest** | **CreateConnectionConfigurationRequest**| | + + +### Return type + +**ConnectionConfigurationResponse** + +### Authorization + +[bearerAuth](README.md#bearerAuth) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Connection configuration successfully created. | - | +**400** | Invalid request. | - | +**401** | Unauthorized access. | - | +**403** | Forbidden access. | - | +**500** | Unexpected error | - | + +[[Back to top]](#) [[Back to API list]](README.md#documentation-for-api-endpoints) [[Back to Model list]](README.md#documentation-for-models) [[Back to README]](README.md) + +# **deleteConnectionConfiguration** +> void deleteConnectionConfiguration(deleteConnectionConfigurationRequest) + + Version: 10.12.0.cl or later Deletes connection configuration objects. Requires `DATAMANAGEMENT` (**Can manage data**) and edit permissions to the connection object, or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) privilege is required. + +### Example + + +```typescript +import { createBearerAuthenticationConfig, ConnectionConfigurationsApi, DeleteConnectionConfigurationRequest } from '@thoughtspot/rest-api-sdk'; + +const configuration = createBearerAuthenticationConfig("CLUSTER_SERVER_URL", { + username: "YOUR_USERNAME", + password: "YOUR_PASSWORD", +}); +const apiInstance = new ConnectionConfigurationsApi(configuration); + +apiInstance.deleteConnectionConfiguration( + // DeleteConnectionConfigurationRequest + { + configuration_identifier: "configuration_identifier_example", + connection_identifier: "connection_identifier_example", + } +).then((data:any) => { + console.log('API called successfully. Returned data: ' + data); +}).catch((error:any) => console.error(error)); + + +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **deleteConnectionConfigurationRequest** | **DeleteConnectionConfigurationRequest**| | + + +### Return type + +**void** + +### Authorization + +[bearerAuth](README.md#bearerAuth) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**204** | Connection Configurations successfully deleted. | - | +**400** | Invalid request. | - | +**401** | Unauthorized access. | - | +**403** | Forbidden access. | - | +**500** | Unexpected error | - | + +[[Back to top]](#) [[Back to API list]](README.md#documentation-for-api-endpoints) [[Back to Model list]](README.md#documentation-for-models) [[Back to README]](README.md) + +# **updateConnectionConfiguration** +> void updateConnectionConfiguration(updateConnectionConfigurationRequest) + + Version: 10.12.0.cl or later Updates a connection configuration object. Requires `DATAMANAGEMENT` (**Can manage data**) and edit permissions to the connection object, or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) privilege is required. #### Supported operations This API endpoint lets you perform the following operations in a single API request: * Edit the name or description of the configuration * Edit the configuration properties * Edit the `policy_type` * Edit the type of authentication * Enable or disable a configuration #### Parameterized Connection Support For parameterized oauth based connections, only the `same_as_parent` and `policy_process_options` attributes are allowed. These attributes are not applicable to connections that are not parameterized. **NOTE**: When updating a configuration where `disabled` is `true`, you must reset `disabled` to `true` in your update request payload. If not explicitly set again, the API will default `disabled` to `false`. + +### Example + + +```typescript +import { createBearerAuthenticationConfig, ConnectionConfigurationsApi, UpdateConnectionConfigurationRequest } from '@thoughtspot/rest-api-sdk'; + +const configuration = createBearerAuthenticationConfig("CLUSTER_SERVER_URL", { + username: "YOUR_USERNAME", + password: "YOUR_PASSWORD", +}); +const apiInstance = new ConnectionConfigurationsApi(configuration); + +apiInstance.updateConnectionConfiguration( + // string | Unique ID or name of the configuration. + "configuration_identifier_example" , + // UpdateConnectionConfigurationRequest + { + connection_identifier: "connection_identifier_example", + name: "name_example", + description: "description_example", + same_as_parent: false, + policy_process_options: null, + authentication_type: "SERVICE_ACCOUNT", + configuration: {}, + policy_type: "NO_POLICY", + policy_principals: [ + "policy_principals_example", + ], + policy_processes: [ + "SAGE_INDEXING", + ], + disable: false, + } +).then((data:any) => { + console.log('API called successfully. Returned data: ' + data); +}).catch((error:any) => console.error(error)); + + +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **updateConnectionConfigurationRequest** | **UpdateConnectionConfigurationRequest**| | + **configurationIdentifier** | [**string**] | Unique ID or name of the configuration. | defaults to undefined + + +### Return type + +**void** + +### Authorization + +[bearerAuth](README.md#bearerAuth) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**204** | Connection configuration successfully updated. | - | +**400** | Invalid request. | - | +**401** | Unauthorized access. | - | +**403** | Forbidden access. | - | +**500** | Unexpected error | - | + +[[Back to top]](#) [[Back to API list]](README.md#documentation-for-api-endpoints) [[Back to Model list]](README.md#documentation-for-models) [[Back to README]](README.md) + diff --git a/sdks/typescript/ConnectionsApi.md b/sdks/typescript/ConnectionsApi.md new file mode 100644 index 000000000..7ea58c1bf --- /dev/null +++ b/sdks/typescript/ConnectionsApi.md @@ -0,0 +1,758 @@ +# ThoughtSpotRestApiSdk.ConnectionsApi + +All URIs are relative to *CLUSTER_URL* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**createConnection**](ConnectionsApi.md#createConnection) | **POST** /api/rest/2.0/connection/create | +[**deleteConnection**](ConnectionsApi.md#deleteConnection) | **POST** /api/rest/2.0/connection/delete | +[**deleteConnectionV2**](ConnectionsApi.md#deleteConnectionV2) | **POST** /api/rest/2.0/connections/{connection_identifier}/delete | +[**downloadConnectionMetadataChanges**](ConnectionsApi.md#downloadConnectionMetadataChanges) | **POST** /api/rest/2.0/connections/download-connection-metadata-changes/{connection_identifier} | +[**fetchConnectionDiffStatus**](ConnectionsApi.md#fetchConnectionDiffStatus) | **POST** /api/rest/2.0/connections/fetch-connection-diff-status/{connection_identifier} | +[**revokeRefreshTokens**](ConnectionsApi.md#revokeRefreshTokens) | **POST** /api/rest/2.0/connections/{connection_identifier}/revoke-refresh-tokens | +[**searchConnection**](ConnectionsApi.md#searchConnection) | **POST** /api/rest/2.0/connection/search | +[**syncMetadata**](ConnectionsApi.md#syncMetadata) | **POST** /api/rest/2.0/connections/{connection_identifier}/resync-metadata | +[**updateConnection**](ConnectionsApi.md#updateConnection) | **POST** /api/rest/2.0/connection/update | +[**updateConnectionStatus**](ConnectionsApi.md#updateConnectionStatus) | **POST** /api/rest/2.0/connections/{connection_identifier}/status | +[**updateConnectionV2**](ConnectionsApi.md#updateConnectionV2) | **POST** /api/rest/2.0/connections/{connection_identifier}/update | + + +# **createConnection** +> CreateConnectionResponse createConnection(createConnectionRequest) + + Version: 9.2.0.cl or later Creates a connection to a data warehouse for live query services. Requires `DATAMANAGEMENT` (**Can manage data**) or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) privilege is required. #### Create a connection without tables To create a connection without tables: 1. Pass these parameters in your API request. * Name of the connection. * Type of the data warehouse to connect to. * A JSON map of configuration attributes in `data_warehouse_config`. The following example shows the configuration attributes for a SnowFlake connection: ``` { \"configuration\":{ \"accountName\":\"thoughtspot_partner\", \"user\":\"tsadmin\", \"password\":\"TestConn123\", \"role\":\"sysadmin\", \"warehouse\":\"MEDIUM_WH\" }, \"authenticationType\": \"SERVICE_ACCOUNT\", \"externalDatabases\":[ ] } ``` 2. Set `validate` to `false`. **NOTE:** If the `authentication_type` is anything other than SERVICE_ACCOUNT, you must explicitly provide the authenticationType property in the payload. If you do not specify authenticationType, the API will default to SERVICE_ACCOUNT as the authentication type. #### Create a connection with tables If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) and `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` (**Can manage data models**) privilege is required. To create a connection with tables: 1. Pass these parameters in your API request. * Name of the connection. * Type of the data warehouse to connect to. * A JSON map of configuration attributes, database details, and table properties in `data_warehouse_config` as shown in the following example: ``` { \"configuration\":{ \"accountName\":\"thoughtspot_partner\", \"user\":\"tsadmin\", \"password\":\"TestConn123\", \"role\":\"sysadmin\", \"warehouse\":\"MEDIUM_WH\" }, \"authenticationType\": \"SERVICE_ACCOUNT\", \"externalDatabases\":[ { \"name\":\"AllDatatypes\", \"isAutoCreated\":false, \"schemas\":[ { \"name\":\"alldatatypes\", \"tables\":[ { \"name\":\"allDatatypes\", \"type\":\"TABLE\", \"description\":\"\", \"selected\":true, \"linked\":true, \"columns\":[ { \"name\":\"CNUMBER\", \"type\":\"INT64\", \"canImport\":true, \"selected\":true, \"isLinkedActive\":true, \"isImported\":false, \"tableName\":\"allDatatypes\", \"schemaName\":\"alldatatypes\", \"dbName\":\"AllDatatypes\" }, { \"name\":\"CDECIMAL\", \"type\":\"INT64\", \"canImport\":true, \"selected\":true, \"isLinkedActive\":true, \"isImported\":false, \"tableName\":\"allDatatypes\", \"schemaName\":\"alldatatypes\", \"dbName\":\"AllDatatypes\" } ] } ] } ] } ] } ``` 2. Set `validate` to `true`. **NOTE:** If the `authentication_type` is anything other than SERVICE_ACCOUNT, you must explicitly provide the authenticationType property in the payload. If you do not specify authenticationType, the API will default to SERVICE_ACCOUNT as the authentication type. + +### Example + + +```typescript +import { createBearerAuthenticationConfig, ConnectionsApi, CreateConnectionRequest } from '@thoughtspot/rest-api-sdk'; + +const configuration = createBearerAuthenticationConfig("CLUSTER_SERVER_URL", { + username: "YOUR_USERNAME", + password: "YOUR_PASSWORD", +}); +const apiInstance = new ConnectionsApi(configuration); + +apiInstance.createConnection( + // CreateConnectionRequest + { + name: "name_example", + description: "description_example", + data_warehouse_type: "SNOWFLAKE", + data_warehouse_config: {}, + validate: true, + } +).then((data:any) => { + console.log('API called successfully. Returned data: ' + data); +}).catch((error:any) => console.error(error)); + + +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **createConnectionRequest** | **CreateConnectionRequest**| | + + +### Return type + +**CreateConnectionResponse** + +### Authorization + +[bearerAuth](README.md#bearerAuth) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Connection to the datasource successfully created. | - | +**400** | Invalid request. | - | +**401** | Unauthorized access. | - | +**403** | Forbidden access. | - | +**500** | Unexpected error | - | + +[[Back to top]](#) [[Back to API list]](README.md#documentation-for-api-endpoints) [[Back to Model list]](README.md#documentation-for-models) [[Back to README]](README.md) + +# **deleteConnection** +> void deleteConnection(deleteConnectionRequest) + + Version: 9.2.0.cl or later **Important**: This endpoint is deprecated and will be removed from ThoughtSpot in September 2025. ThoughtSpot strongly recommends using the [Delete Connection V2](#/http/api-endpoints/connections/delete-connection-v2) endpoint to delete your connection objects. #### Usage guidelines Deletes a connection object. Requires `DATAMANAGEMENT` (**Can manage data**) and edit permissions to the connection object, or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) privilege is required. **Note**: If a connection has dependent objects, make sure you remove its associations before the delete operation. + +### Example + + +```typescript +import { createBearerAuthenticationConfig, ConnectionsApi, DeleteConnectionRequest } from '@thoughtspot/rest-api-sdk'; + +const configuration = createBearerAuthenticationConfig("CLUSTER_SERVER_URL", { + username: "YOUR_USERNAME", + password: "YOUR_PASSWORD", +}); +const apiInstance = new ConnectionsApi(configuration); + +apiInstance.deleteConnection( + // DeleteConnectionRequest + { + connection_identifier: "connection_identifier_example", + } +).then((data:any) => { + console.log('API called successfully. Returned data: ' + data); +}).catch((error:any) => console.error(error)); + + +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **deleteConnectionRequest** | **DeleteConnectionRequest**| | + + +### Return type + +**void** + +### Authorization + +[bearerAuth](README.md#bearerAuth) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**204** | Connection successfully deleted. | - | +**400** | Invalid request. | - | +**401** | Unauthorized access. | - | +**403** | Forbidden access. | - | +**500** | Unexpected error | - | + +[[Back to top]](#) [[Back to API list]](README.md#documentation-for-api-endpoints) [[Back to Model list]](README.md#documentation-for-models) [[Back to README]](README.md) + +# **deleteConnectionV2** +> void deleteConnectionV2() + + Version: 10.4.0.cl or later Deletes a connection object. **Note**: If a connection has dependent objects, make sure you remove its associations before the delete operation. Requires `DATAMANAGEMENT` (**Can manage data**) and edit permissions to the connection object, or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) privilege is required. + +### Example + + +```typescript +import { createBearerAuthenticationConfig, ConnectionsApi, DeleteConnectionV2Request } from '@thoughtspot/rest-api-sdk'; + +const configuration = createBearerAuthenticationConfig("CLUSTER_SERVER_URL", { + username: "YOUR_USERNAME", + password: "YOUR_PASSWORD", +}); +const apiInstance = new ConnectionsApi(configuration); + +apiInstance.deleteConnectionV2( + // string | Unique ID or name of the connection. + "connection_identifier_example" +).then((data:any) => { + console.log('API called successfully. Returned data: ' + data); +}).catch((error:any) => console.error(error)); + + +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **connectionIdentifier** | [**string**] | Unique ID or name of the connection. | defaults to undefined + + +### Return type + +**void** + +### Authorization + +[bearerAuth](README.md#bearerAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**204** | Connection successfully deleted. | - | +**400** | Invalid request. | - | +**401** | Unauthorized access. | - | +**403** | Forbidden access. | - | +**500** | Unexpected error | - | + +[[Back to top]](#) [[Back to API list]](README.md#documentation-for-api-endpoints) [[Back to Model list]](README.md#documentation-for-models) [[Back to README]](README.md) + +# **downloadConnectionMetadataChanges** +> HttpFile downloadConnectionMetadataChanges() + + Version: 9.9.0.cl or later Exports the difference in connection metadata between CDW and ThoughtSpot Requires `DATAMANAGEMENT` (**Can manage data**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the following Data control privileges may be required: - `CAN_MANAGE_CUSTOM_CALENDAR`(**Can manage custom calendars**) - `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) - `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` (**Can manage data models**) To download the connection metadata difference between ThoughtSpot and CDW, pass the connection GUID as `connection_identifier` in the API request. + +### Example + + +```typescript +import { createBearerAuthenticationConfig, ConnectionsApi, DownloadConnectionMetadataChangesRequest } from '@thoughtspot/rest-api-sdk'; + +const configuration = createBearerAuthenticationConfig("CLUSTER_SERVER_URL", { + username: "YOUR_USERNAME", + password: "YOUR_PASSWORD", +}); +const apiInstance = new ConnectionsApi(configuration); + +apiInstance.downloadConnectionMetadataChanges( + // string | GUID of the connection + "connection_identifier_example" +).then((data:any) => { + console.log('API called successfully. Returned data: ' + data); +}).catch((error:any) => console.error(error)); + + +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **connectionIdentifier** | [**string**] | GUID of the connection | defaults to undefined + + +### Return type + +**HttpFile** + +### Authorization + +[bearerAuth](README.md#bearerAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/octet-stream, application/json + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Export metadata changes. | - | +**400** | Invalid request. | - | +**401** | Unauthorized access. | - | +**403** | Forbidden access. | - | +**500** | Unexpected error | - | + +[[Back to top]](#) [[Back to API list]](README.md#documentation-for-api-endpoints) [[Back to Model list]](README.md#documentation-for-models) [[Back to README]](README.md) + +# **fetchConnectionDiffStatus** +> FetchConnectionDiffStatusResponse fetchConnectionDiffStatus() + + Version: 9.9.0.cl or later Validates the difference in connection metadata between CDW and ThoughtSpot. Requires `DATAMANAGEMENT` (**Can manage data**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the following Data control privileges may be required: - `CAN_MANAGE_CUSTOM_CALENDAR`(**Can manage custom calendars**) - `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) - `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` (**Can manage data models**) Returns a boolean indicating whether there is any difference between the connection metadata at ThoughtSpot and CDW. To get the connection metadata difference status, pass the connection GUID as `connection_identifier` in the API request. + +### Example + + +```typescript +import { createBearerAuthenticationConfig, ConnectionsApi, FetchConnectionDiffStatusRequest } from '@thoughtspot/rest-api-sdk'; + +const configuration = createBearerAuthenticationConfig("CLUSTER_SERVER_URL", { + username: "YOUR_USERNAME", + password: "YOUR_PASSWORD", +}); +const apiInstance = new ConnectionsApi(configuration); + +apiInstance.fetchConnectionDiffStatus( + // string | GUID of the connection + "connection_identifier_example" +).then((data:any) => { + console.log('API called successfully. Returned data: ' + data); +}).catch((error:any) => console.error(error)); + + +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **connectionIdentifier** | [**string**] | GUID of the connection | defaults to undefined + + +### Return type + +**FetchConnectionDiffStatusResponse** + +### Authorization + +[bearerAuth](README.md#bearerAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | true/false | - | +**400** | Invalid request. | - | +**401** | Unauthorized access. | - | +**403** | Forbidden access. | - | +**500** | Unexpected error | - | + +[[Back to top]](#) [[Back to API list]](README.md#documentation-for-api-endpoints) [[Back to Model list]](README.md#documentation-for-models) [[Back to README]](README.md) + +# **revokeRefreshTokens** +> RevokeRefreshTokensResponse revokeRefreshTokens(revokeRefreshTokensRequest) + + Version: 26.2.0.cl or later Revokes OAuth refresh tokens for users who no longer require access to a data warehouse connection. When a token is revoked, the affected user\'s session for that connection is terminated, and they must re-authenticate to regain access. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) or `DATAMANAGEMENT` (**Can manage data**) privileges. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on the ThoughtSpot instance, users with `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) privilege can also make API requests to revoke tokens for connection users. #### Usage guidelines You can specify different combinations of identifiers to control which refresh tokens are revoked. - **connection_identifier**: Revokes refresh tokens for all users of the connection, except the connection author. - **connection_identifier** and **user_identifiers**: Revokes refresh tokens only for the users specified in the request. If the name or ID of the connection author is included in the request, their token will also be revoked. - **connection_identifier** and **configuration_identifiers**: Revokes refresh tokens for all users on the specified configurations, except the configuration author. - **connection_identifier**, **configuration_identifiers**, and **user_identifiers**: Revokes refresh tokens for the specified users on the specified configurations. - **connection_identifier** and **org_identifiers**: Revokes refresh tokens for the specified Orgs. Applicable only for published connections. - **connection_identifier**, **org_identifiers**, and **user_identifiers**: Revokes refresh tokens for the specified users in the specified Orgs. Applicable only for published connections. **NOTE**: The `org_identifiers` parameter is only applicable for published connections. Using this parameter for unpublished connections will result in an error. Ensure that the connections are published before making the API request. + +### Example + + +```typescript +import { createBearerAuthenticationConfig, ConnectionsApi, RevokeRefreshTokensRequest } from '@thoughtspot/rest-api-sdk'; + +const configuration = createBearerAuthenticationConfig("CLUSTER_SERVER_URL", { + username: "YOUR_USERNAME", + password: "YOUR_PASSWORD", +}); +const apiInstance = new ConnectionsApi(configuration); + +apiInstance.revokeRefreshTokens( + // string | Unique ID or name of the connection whose refresh tokens need to be revoked. All the users associated with the connection will have their refresh tokens revoked except the author. + "connection_identifier_example" , + // RevokeRefreshTokensRequest + { + configuration_identifiers: [ + "configuration_identifiers_example", + ], + user_identifiers: [ + "user_identifiers_example", + ], + org_identifiers: [ + "org_identifiers_example", + ], + } +).then((data:any) => { + console.log('API called successfully. Returned data: ' + data); +}).catch((error:any) => console.error(error)); + + +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **revokeRefreshTokensRequest** | **RevokeRefreshTokensRequest**| | + **connectionIdentifier** | [**string**] | Unique ID or name of the connection whose refresh tokens need to be revoked. All the users associated with the connection will have their refresh tokens revoked except the author. | defaults to undefined + + +### Return type + +**RevokeRefreshTokensResponse** + +### Authorization + +[bearerAuth](README.md#bearerAuth) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Token(s) successfully revoked. | - | +**400** | Invalid request. | - | +**401** | Unauthorized access. | - | +**403** | Forbidden access. | - | +**404** | Object not found | - | +**409** | Conflict | - | +**500** | Unexpected error | - | + +[[Back to top]](#) [[Back to API list]](README.md#documentation-for-api-endpoints) [[Back to Model list]](README.md#documentation-for-models) [[Back to README]](README.md) + +# **searchConnection** +> Array searchConnection(searchConnectionRequest) + + Version: 9.2.0.cl or later Gets connection objects. Requires `DATAMANAGEMENT` (**Can manage data**) or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) privilege is required. - To get a list of all connections available in the ThoughtSpot system, send the API request without any attributes in the request body. - To get the connection objects for a specific type of data warehouse, specify the type in `data_warehouse_types`. - To fetch details of a connection object, specify the connection object GUID or name. The `name_pattern` attribute allows passing partial text with `%` for a wildcard match. - To get details of the database, schemas, tables, or columns from a data connection object, specify `data_warehouse_object_type`. - To get a specific database, schema, table, or column from a connection object, define the object type in `data_warehouse_object_type` and object properties in the `data_warehouse_objects` array. For example, to search for a column, you must pass the database, schema, and table names in the API request. Note that in the following example, object properties are set in a hierarchical order (`database` > `schema` > `table` > `column`). ``` { \"connections\": [ { \"identifier\": \"b9d1f2ef-fa65-4a4b-994e-30fa2d57b0c2\", \"data_warehouse_objects\": [ { \"database\": \"NEBULADEV\", \"schema\": \"INFORMATION_SCHEMA\", \"table\": \"APPLICABLE_ROLES\", \"column\": \"ROLE_NAME\" } ] } ], \"data_warehouse_object_type\": \"COLUMN\" } ``` - To fetch data by `configuration`, specify `data_warehouse_object_type`. For example, to fetch columns from the `DEVELOPMENT` database, specify the `data_warehouse_object_type` as `DATABASE` and define the `configuration` string as `{\"database\":\"DEVELOPMENT\"}`. To get column data for a specific table, specify the table, for example,`{\"database\":\"RETAILAPPAREL\",\"table\":\"PIPES\"}`. - To query connections by `authentication_type`, specify `data_warehouse_object_type`. Supported values for `authentication_type` are: - `SERVICE_ACCOUNT`: For connections that require service account credentials to authenticate to the Cloud Data Warehouse and fetch data. - `OAUTH`: For connections that require OAuth credentials to authenticate to the Cloud Data Warehouse and fetch data. Teradata, Oracle, and Presto Cloud Data Warehouses do not support the OAuth authentication type. - `IAM`: For connections that have the IAM OAuth set up. This authentication type is supported on Amazon Redshift connections only. - `EXTOAUTH`: For connections that have External OAuth set up. ThoughtSpot supports external [OAuth with Microsoft Azure Active Directory (AD)](https://docs.thoughtspot.com/cloud/latest/ connections-snowflake-azure-ad-oauth) and [Okta for Snowflake data connections](https://docs.thoughtspot.com/cloud/latest/connections-snowflake-okta-oauth). - `KEY_PAIR`: For connections that require Key Pair account credentials to authenticate to the Cloud Data Warehouse and fetch data. This authentication type is supported on Snowflake connections only. - `OAUTH_WITH_PKCE`: For connections that require OAuth with PKCE account credentials to authenticate to the Cloud Data Warehouse and fetch data. This authentication type is supported on Snowflake, Starburst, Databricks, Denodo connections only. - `EXTOAUTH_WITH_PKCE`: For connections that require External OAuth With PKCE account credentials to authenticate to the Cloud Data Warehouse and fetch data. This authentication type is supported on Snowflake connections only. - `OAUTH_WITH_PEZ`: For connections that require OAuth With PEZ account credentials to authenticate to the Cloud Data Warehouse and fetch data. This authentication type is supported on Amazon Redshift connections only. - `OAUTH_WITH_SERVICE_PRINCIPAL`: For connections that require OAuth With Service Principal account credentials to authenticate to the Cloud Data Warehouse and fetch data. This authentication type is supported on Databricks connections only. - `PERSONAL_ACCESS_TOKEN`: For connections that require Personal Access Token account credentials to authenticate to the Cloud Data Warehouse and fetch data. This authentication type is supported on Databricks connections only. - `OAUTH_CLIENT_CREDENTIALS`: For connections that require OAuth Client Credentials to authenticate to the Cloud Data Warehouse and fetch data. This authentication type is supported on Snowflake connections only. - To include more details about connection objects in the API response, set `include_details` to `true`. - You can also sort the output by field names and filter connections by tags. **NOTE**: When filtering connection records by parameters other than `data_warehouse_types` or `tag_identifiers`, ensure that you set `record_size` to `-1` and `record_offset` to `0` for precise results. + +### Example + + +```typescript +import { createBearerAuthenticationConfig, ConnectionsApi, SearchConnectionRequest } from '@thoughtspot/rest-api-sdk'; + +const configuration = createBearerAuthenticationConfig("CLUSTER_SERVER_URL", { + username: "YOUR_USERNAME", + password: "YOUR_PASSWORD", +}); +const apiInstance = new ConnectionsApi(configuration); + +apiInstance.searchConnection( + // SearchConnectionRequest + { + connections: [ + { + identifier: "identifier_example", + name_pattern: "name_pattern_example", + data_warehouse_objects: [ + { + database: "database_example", + schema: "schema_example", + table: "table_example", + column: "column_example", + }, + ], + }, + ], + data_warehouse_types: [ + "SNOWFLAKE", + ], + record_offset: 0, + record_size: 10, + tag_identifiers: [ + "tag_identifiers_example", + ], + data_warehouse_object_type: "DATABASE", + sort_options: null, + include_details: true, + configuration: {}, + authentication_type: "SERVICE_ACCOUNT", + show_resolved_parameters: false, + } +).then((data:any) => { + console.log('API called successfully. Returned data: ' + data); +}).catch((error:any) => console.error(error)); + + +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **searchConnectionRequest** | **SearchConnectionRequest**| | + + +### Return type + +**Array** + +### Authorization + +[bearerAuth](README.md#bearerAuth) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | List of connections to the datasource. | - | +**400** | Invalid request. | - | +**401** | Unauthorized access. | - | +**403** | Forbidden access. | - | +**500** | Unexpected error | - | + +[[Back to top]](#) [[Back to API list]](README.md#documentation-for-api-endpoints) [[Back to Model list]](README.md#documentation-for-models) [[Back to README]](README.md) + +# **syncMetadata** +> SyncMetadataResponse syncMetadata(syncMetadataRequest) + + Version: 26.5.0.cl or later Synchronizes connection metadata attributes from your Cloud Data Warehouse (CDW) with ThoughtSpot. Requires the `DATAMANAGEMENT` (**Can manage data**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` (**Can manage data models**) privilege is required. #### Usage guidelines To synchronize attributes from a CDW, specify the connection GUID or name in the `connection_identifier` path parameter and `sync_attributes` in the request body. Default attribute is `[\"DESCRIPTION\"]`. ##### Hierarchical schema * Connection: The connection object for the sync operation. * Tables: Tables for the sync operation. When no table is specified, all tables are synchronized. * Columns: If the table is specified, you can add the columns for the sync operation. If no columns are specified, all columns in the specified table are considered for the sync operation. To set the scope for the sync operation: * Connection-level: To sync all tables and columns, pass an empty request body, or only the attributes in the request body. * Table-level: To synchronize specific tables and their columns, specify the table identifiers in the `tables` array. * Column-level: To synchronize specific columns, specify the table identifier as the key and column identifiers as the value in the `tables` array. ``` { \"tables\": [ {\"table-guid-1\": [\"column-guid-1\", \"column-guid-2\"]}, \"table-guid-2\" ], \"sync_attributes\": [\"DESCRIPTION\"] } ``` ##### API response If the sync operation is successful, the API returns the following information: * Status of the sync operation. For example, `SUCCESS`, `PARTIAL_SUCCESS`, or `NO_UPDATE`. * Number of tables and columns that were updated. * Number of tables and columns with the sync failed status when the overall sync status is `PARTIAL_SUCCESS`. * Message text indicating the sync results. + +### Example + + +```typescript +import { createBearerAuthenticationConfig, ConnectionsApi, SyncMetadataRequest } from '@thoughtspot/rest-api-sdk'; + +const configuration = createBearerAuthenticationConfig("CLUSTER_SERVER_URL", { + username: "YOUR_USERNAME", + password: "YOUR_PASSWORD", +}); +const apiInstance = new ConnectionsApi(configuration); + +apiInstance.syncMetadata( + // string | Unique ID or name of the connection. + "connection_identifier_example" , + // SyncMetadataRequest + { + tables: {}, + sync_attributes: ["DESCRIPTION"], + } +).then((data:any) => { + console.log('API called successfully. Returned data: ' + data); +}).catch((error:any) => console.error(error)); + + +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **syncMetadataRequest** | **SyncMetadataRequest**| | + **connectionIdentifier** | [**string**] | Unique ID or name of the connection. | defaults to undefined + + +### Return type + +**SyncMetadataResponse** + +### Authorization + +[bearerAuth](README.md#bearerAuth) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Metadata synced successfully. | - | +**400** | Invalid request parameters or hierarchy. | - | +**401** | Unauthorized access. | - | +**403** | Forbidden access. | - | +**404** | Connection, table, or column not found. | - | +**500** | Unexpected error | - | + +[[Back to top]](#) [[Back to API list]](README.md#documentation-for-api-endpoints) [[Back to Model list]](README.md#documentation-for-models) [[Back to README]](README.md) + +# **updateConnection** +> void updateConnection(updateConnectionRequest) + + Version: 9.2.0.cl or later **Important**: This endpoint is deprecated and will be removed from ThoughtSpot in September 2025. ThoughtSpot strongly recommends using the [Update connection V2](#/http/api-endpoints/connections/update-connection-v2) endpoint to update your connection objects. #### Usage guidelines Updates a connection object. Requires `DATAMANAGEMENT` (**Can manage data**) and edit permissions to the connection object, or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) privilege is required. To update a connection object, pass these parameters in your API request: 1. GUID of the connection object. 2. If you are updating tables or database schema of a connection object: a. Add the updated JSON map of metadata with database, schema, and tables in `data_warehouse_config`. b. Set `validate` to `true`. 3. If you are updating a configuration attribute, connection name, or description, you can set `validate` to `false`. + +### Example + + +```typescript +import { createBearerAuthenticationConfig, ConnectionsApi, UpdateConnectionRequest } from '@thoughtspot/rest-api-sdk'; + +const configuration = createBearerAuthenticationConfig("CLUSTER_SERVER_URL", { + username: "YOUR_USERNAME", + password: "YOUR_PASSWORD", +}); +const apiInstance = new ConnectionsApi(configuration); + +apiInstance.updateConnection( + // UpdateConnectionRequest + { + connection_identifier: "connection_identifier_example", + name: "name_example", + description: "description_example", + data_warehouse_config: {}, + validate: true, + } +).then((data:any) => { + console.log('API called successfully. Returned data: ' + data); +}).catch((error:any) => console.error(error)); + + +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **updateConnectionRequest** | **UpdateConnectionRequest**| | + + +### Return type + +**void** + +### Authorization + +[bearerAuth](README.md#bearerAuth) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**204** | Connection successfully updated. | - | +**400** | Invalid request. | - | +**401** | Unauthorized access. | - | +**403** | Forbidden access. | - | +**500** | Unexpected error | - | + +[[Back to top]](#) [[Back to API list]](README.md#documentation-for-api-endpoints) [[Back to Model list]](README.md#documentation-for-models) [[Back to README]](README.md) + +# **updateConnectionStatus** +> void updateConnectionStatus(updateConnectionStatusRequest) + + Version: 26.6.0.cl or later Activates or deactivates a connection. A deactivated connection cannot be used for queries or operations until it is activated again. Requires `DATAMANAGEMENT` (**Can manage data**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) privilege is required. Only the connection owner or an administrator can perform this operation. #### Usage guidelines To update the status of a connection, specify the connection GUID or name in the `connection_identifier` path parameter and the desired `status` in the request body. - **ACTIVATED**: Enables the connection. Queries and operations can resume on an activated connection. - **DEACTIVATED**: Disables the connection. It does not remove the connection metadata, but only makes the connection unavailable for queries and operations. You can reactivate a deactivated connection by setting \"status\": \"ACTIVATED\". + +### Example + + +```typescript +import { createBearerAuthenticationConfig, ConnectionsApi, UpdateConnectionStatusRequest } from '@thoughtspot/rest-api-sdk'; + +const configuration = createBearerAuthenticationConfig("CLUSTER_SERVER_URL", { + username: "YOUR_USERNAME", + password: "YOUR_PASSWORD", +}); +const apiInstance = new ConnectionsApi(configuration); + +apiInstance.updateConnectionStatus( + // string | Unique ID or name of the connection. + "connection_identifier_example" , + // UpdateConnectionStatusRequest + { + status: "ACTIVATED", + } +).then((data:any) => { + console.log('API called successfully. Returned data: ' + data); +}).catch((error:any) => console.error(error)); + + +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **updateConnectionStatusRequest** | **UpdateConnectionStatusRequest**| | + **connectionIdentifier** | [**string**] | Unique ID or name of the connection. | defaults to undefined + + +### Return type + +**void** + +### Authorization + +[bearerAuth](README.md#bearerAuth) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**204** | Connection status updated successfully. | - | +**400** | Invalid request. | - | +**401** | Unauthorized access. | - | +**403** | Forbidden access. | - | +**404** | Object not found | - | +**500** | Unexpected error | - | + +[[Back to top]](#) [[Back to API list]](README.md#documentation-for-api-endpoints) [[Back to Model list]](README.md#documentation-for-models) [[Back to README]](README.md) + +# **updateConnectionV2** +> void updateConnectionV2(updateConnectionV2Request) + + Version: 10.4.0.cl or later Updates a connection object. Requires `DATAMANAGEMENT` (**Can manage data**) and edit permissions to the connection object, or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) privilege is required. To update a connection object, pass these parameters in your API request: 1. GUID of the connection object. 2. If you are updating tables or database schema of a connection object: a. Add the updated JSON map of metadata with database, schema, and tables in `data_warehouse_config`. b. Set `validate` to `true`. **NOTE:** If the `authentication_type` is anything other than SERVICE_ACCOUNT, you must explicitly provide the authenticationType property in the payload. If you do not specify authenticationType, the API will default to SERVICE_ACCOUNT as the authentication type. * A JSON map of configuration attributes, database details, and table properties in `data_warehouse_config` as shown in the following example: * This is an example of updating a single table in a empty connection: ``` { \"authenticationType\": \"SERVICE_ACCOUNT\", \"externalDatabases\": [ { \"name\": \"DEVELOPMENT\", \"isAutoCreated\": false, \"schemas\": [ { \"name\": \"TS_dataset\", \"tables\": [ { \"name\": \"DEMORENAME\", \"type\": \"TABLE\", \"description\": \"\", \"selected\": true, \"linked\": true, \"gid\": 0, \"datasetId\": \"-1\", \"subType\": \"\", \"reportId\": \"\", \"viewId\": \"\", \"columns\": [ { \"name\": \"Col1\", \"type\": \"VARCHAR\", \"canImport\": true, \"selected\": true, \"description\": \"\", \"isLinkedActive\": true, \"isAggregate\": false }, { \"name\": \"Col2\", \"type\": \"VARCHAR\", \"canImport\": true, \"selected\": true, \"description\": \"\", \"isLinkedActive\": true, \"isAggregate\": false }, { \"name\": \"Col3\", \"type\": \"VARCHAR\", \"canImport\": true, \"selected\": true, \"description\": \"\", \"isLinkedActive\": true, \"isAggregate\": false }, { \"name\": \"Col312\", \"type\": \"VARCHAR\", \"canImport\": true, \"selected\": true, \"description\": \"\", \"isLinkedActive\": true, \"isAggregate\": false }, { \"name\": \"Col4\", \"type\": \"VARCHAR\", \"canImport\": true, \"selected\": true, \"description\": \"\", \"isLinkedActive\": true, \"isAggregate\": false } ], \"relationships\": [] } ] } ] } ], \"configuration\": { \"password\": \"\", \"database\": \"DEVELOPMENT\", \"role\": \"DEV\", \"accountName\": \"thoughtspot_partner\", \"warehouse\": \"DEMO_WH\", \"user\": \"DEV_USER\" } } ``` * This is an example of updating a single table in an existing connection with tables: ``` { \"authenticationType\": \"SERVICE_ACCOUNT\", \"externalDatabases\": [ { \"name\": \"DEVELOPMENT\", \"isAutoCreated\": false, \"schemas\": [ { \"name\": \"TS_dataset\", \"tables\": [ { \"name\": \"CUSTOMER\", \"type\": \"TABLE\", \"description\": \"\", \"selected\": true, \"linked\": true, \"gid\": 0, \"datasetId\": \"-1\", \"subType\": \"\", \"reportId\": \"\", \"viewId\": \"\", \"columns\": [], \"relationships\": [] }, { \"name\": \"tpch5k_falcon_default_schema_users\", \"type\": \"TABLE\", \"description\": \"\", \"selected\": true, \"linked\": true, \"gid\": 0, \"datasetId\": \"-1\", \"subType\": \"\", \"reportId\": \"\", \"viewId\": \"\", \"columns\": [ { \"name\": \"user_id\", \"type\": \"INT64\", \"canImport\": true, \"selected\": true, \"description\": \"\", \"isLinkedActive\": true, \"isAggregate\": false }, { \"name\": \"product_id\", \"type\": \"INT64\", \"canImport\": true, \"selected\": true, \"description\": \"\", \"isLinkedActive\": true, \"isAggregate\": false }, { \"name\": \"user_cost\", \"type\": \"INT64\", \"canImport\": true, \"selected\": true, \"description\": \"\", \"isLinkedActive\": true, \"isAggregate\": false } ], \"relationships\": [] } ] } ] } ], \"configuration\": { \"password\": \"\", \"database\": \"DEVELOPMENT\", \"role\": \"DEV\", \"accountName\": \"thoughtspot_partner\", \"warehouse\": \"DEMO_WH\", \"user\": \"DEV_USER\" } } ``` 3. If you are updating a configuration attribute, connection name, or description, you can set `validate` to `false`. **NOTE:** If the `authentication_type` is anything other than SERVICE_ACCOUNT, you must explicitly provide the authenticationType property in the payload. If you do not specify authenticationType, the API will default to SERVICE_ACCOUNT as the authentication type. * A JSON map of configuration attributes in `data_warehouse_config`. The following example shows the configuration attributes for a Snowflake connection: ``` { \"configuration\":{ \"accountName\":\"thoughtspot_partner\", \"user\":\"tsadmin\", \"password\":\"TestConn123\", \"role\":\"sysadmin\", \"warehouse\":\"MEDIUM_WH\" }, \"externalDatabases\":[ ] } ``` + +### Example + + +```typescript +import { createBearerAuthenticationConfig, ConnectionsApi, UpdateConnectionV2Request } from '@thoughtspot/rest-api-sdk'; + +const configuration = createBearerAuthenticationConfig("CLUSTER_SERVER_URL", { + username: "YOUR_USERNAME", + password: "YOUR_PASSWORD", +}); +const apiInstance = new ConnectionsApi(configuration); + +apiInstance.updateConnectionV2( + // string | Unique ID or name of the connection. + "connection_identifier_example" , + // UpdateConnectionV2Request + { + name: "name_example", + description: "description_example", + data_warehouse_config: {}, + validate: true, + } +).then((data:any) => { + console.log('API called successfully. Returned data: ' + data); +}).catch((error:any) => console.error(error)); + + +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **updateConnectionV2Request** | **UpdateConnectionV2Request**| | + **connectionIdentifier** | [**string**] | Unique ID or name of the connection. | defaults to undefined + + +### Return type + +**void** + +### Authorization + +[bearerAuth](README.md#bearerAuth) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**204** | Connection successfully updated. | - | +**400** | Invalid request. | - | +**401** | Unauthorized access. | - | +**403** | Forbidden access. | - | +**500** | Unexpected error | - | + +[[Back to top]](#) [[Back to API list]](README.md#documentation-for-api-endpoints) [[Back to Model list]](README.md#documentation-for-models) [[Back to README]](README.md) + diff --git a/sdks/typescript/CustomActionApi.md b/sdks/typescript/CustomActionApi.md new file mode 100644 index 000000000..257675597 --- /dev/null +++ b/sdks/typescript/CustomActionApi.md @@ -0,0 +1,303 @@ +# ThoughtSpotRestApiSdk.CustomActionApi + +All URIs are relative to *CLUSTER_URL* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**createCustomAction**](CustomActionApi.md#createCustomAction) | **POST** /api/rest/2.0/customization/custom-actions | +[**deleteCustomAction**](CustomActionApi.md#deleteCustomAction) | **POST** /api/rest/2.0/customization/custom-actions/{custom_action_identifier}/delete | +[**searchCustomActions**](CustomActionApi.md#searchCustomActions) | **POST** /api/rest/2.0/customization/custom-actions/search | +[**updateCustomAction**](CustomActionApi.md#updateCustomAction) | **POST** /api/rest/2.0/customization/custom-actions/{custom_action_identifier}/update | + + +# **createCustomAction** +> ResponseCustomAction createCustomAction(createCustomActionRequest) + + Version: 9.6.0.cl or later Creates a custom action that appears as a menu action on a saved Answer or Liveboard visualization. Requires `DEVELOPER` (**Has Developer privilege**) or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `DEVELOPER` (**Has developer privilege**) privilege is required. #### Usage Guidelines The API lets you create the following types of custom actions: * URL-based action Allows pushing data to an external URL. * Callback action Triggers a callback to the host application and initiates a response payload on an embedded ThoughtSpot instance. By default, custom actions are visible to only administrator or developer users. To make a custom action available to other users, and specify the groups in `group_identifiers`. By default, the custom action is set as a _global_ action on all visualizations and saved Answers. To assign a custom action to specific Liveboard visualization, saved Answer, or Worksheet, set `visibility` to `false` in `default_action_config` property and specify the GUID or name of the object in `associate_metadata`. For more information, see [Custom actions](https://developers.thoughtspot.com/docs/custom-action-intro). + +### Example + + +```typescript +import { createBearerAuthenticationConfig, CustomActionApi, CreateCustomActionRequest } from '@thoughtspot/rest-api-sdk'; + +const configuration = createBearerAuthenticationConfig("CLUSTER_SERVER_URL", { + username: "YOUR_USERNAME", + password: "YOUR_PASSWORD", +}); +const apiInstance = new CustomActionApi(configuration); + +apiInstance.createCustomAction( + // CreateCustomActionRequest + { + name: "name_example", + action_details: null, + associate_metadata: [ + { + action_config: { + position: "MENU", + visibility: true, + }, + identifier: "identifier_example", + type: "VISUALIZATION", + }, + ], + default_action_config: null, + group_identifiers: [ + "group_identifiers_example", + ], + } +).then((data:any) => { + console.log('API called successfully. Returned data: ' + data); +}).catch((error:any) => console.error(error)); + + +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **createCustomActionRequest** | **CreateCustomActionRequest**| | + + +### Return type + +**ResponseCustomAction** + +### Authorization + +[bearerAuth](README.md#bearerAuth) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Custom action created successfully. | - | +**400** | Invalid request. | - | +**401** | Unauthorized access. | - | +**403** | Forbidden access. | - | +**500** | Unexpected error | - | + +[[Back to top]](#) [[Back to API list]](README.md#documentation-for-api-endpoints) [[Back to Model list]](README.md#documentation-for-models) [[Back to README]](README.md) + +# **deleteCustomAction** +> void deleteCustomAction() + + Version: 9.6.0.cl or later Removes the custom action specified in the API request. Requires `DEVELOPER` (**Has Developer privilege**) or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `DEVELOPER` (**Has developer privilege**) privilege is required. + +### Example + + +```typescript +import { createBearerAuthenticationConfig, CustomActionApi, DeleteCustomActionRequest } from '@thoughtspot/rest-api-sdk'; + +const configuration = createBearerAuthenticationConfig("CLUSTER_SERVER_URL", { + username: "YOUR_USERNAME", + password: "YOUR_PASSWORD", +}); +const apiInstance = new CustomActionApi(configuration); + +apiInstance.deleteCustomAction( + // string | Unique ID or name of the custom action. + "custom_action_identifier_example" +).then((data:any) => { + console.log('API called successfully. Returned data: ' + data); +}).catch((error:any) => console.error(error)); + + +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **customActionIdentifier** | [**string**] | Unique ID or name of the custom action. | defaults to undefined + + +### Return type + +**void** + +### Authorization + +[bearerAuth](README.md#bearerAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**204** | Custom action is successfully deleted. | - | +**400** | Invalid request. | - | +**401** | Unauthorized access. | - | +**403** | Forbidden access. | - | +**500** | Unexpected error | - | + +[[Back to top]](#) [[Back to API list]](README.md#documentation-for-api-endpoints) [[Back to Model list]](README.md#documentation-for-models) [[Back to README]](README.md) + +# **searchCustomActions** +> Array searchCustomActions(searchCustomActionsRequest) + + Version: 9.6.0.cl or later Gets custom actions configured on the cluster. Requires `DEVELOPER` (**Has Developer privilege**) or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `DEVELOPER` (**Has developer privilege**) privilege is required. + +### Example + + +```typescript +import { createBearerAuthenticationConfig, CustomActionApi, SearchCustomActionsRequest } from '@thoughtspot/rest-api-sdk'; + +const configuration = createBearerAuthenticationConfig("CLUSTER_SERVER_URL", { + username: "YOUR_USERNAME", + password: "YOUR_PASSWORD", +}); +const apiInstance = new CustomActionApi(configuration); + +apiInstance.searchCustomActions( + // SearchCustomActionsRequest + { + custom_action_identifier: "custom_action_identifier_example", + name_pattern: "name_pattern_example", + default_action_config: null, + include_group_associations: false, + include_metadata_associations: false, + metadata: [ + { + type: "VISUALIZATION", + identifier: "identifier_example", + }, + ], + type: "CALLBACK", + } +).then((data:any) => { + console.log('API called successfully. Returned data: ' + data); +}).catch((error:any) => console.error(error)); + + +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **searchCustomActionsRequest** | **SearchCustomActionsRequest**| | + + +### Return type + +**Array** + +### Authorization + +[bearerAuth](README.md#bearerAuth) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Custom action search is successful. | - | +**400** | Invalid request. | - | +**401** | Unauthorized access. | - | +**403** | Forbidden access. | - | +**500** | Unexpected error | - | + +[[Back to top]](#) [[Back to API list]](README.md#documentation-for-api-endpoints) [[Back to Model list]](README.md#documentation-for-models) [[Back to README]](README.md) + +# **updateCustomAction** +> void updateCustomAction(updateCustomActionRequest) + + Version: 9.6.0.cl or later Updates a custom action. Requires `DEVELOPER` (**Has Developer privilege**) or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `DEVELOPER` (**Has developer privilege**) privilege is required. #### Usage Guidelines The API allows you to modify the following properties: * Name of the custom action * Action availability to groups * Association to metadata objects * Authentication settings for a URL-based action For more information, see [Custom actions](https://developers.thoughtspot.com/docs/custom-action-intro). + +### Example + + +```typescript +import { createBearerAuthenticationConfig, CustomActionApi, UpdateCustomActionRequest } from '@thoughtspot/rest-api-sdk'; + +const configuration = createBearerAuthenticationConfig("CLUSTER_SERVER_URL", { + username: "YOUR_USERNAME", + password: "YOUR_PASSWORD", +}); +const apiInstance = new CustomActionApi(configuration); + +apiInstance.updateCustomAction( + // string | Unique ID or name of the custom action. + "custom_action_identifier_example" , + // UpdateCustomActionRequest + { + action_details: null, + associate_metadata: [ + { + action_config: { + position: "MENU", + visibility: true, + }, + identifier: "identifier_example", + type: "VISUALIZATION", + }, + ], + default_action_config: null, + group_identifiers: [ + "group_identifiers_example", + ], + name: "name_example", + operation: "ADD", + } +).then((data:any) => { + console.log('API called successfully. Returned data: ' + data); +}).catch((error:any) => console.error(error)); + + +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **updateCustomActionRequest** | **UpdateCustomActionRequest**| | + **customActionIdentifier** | [**string**] | Unique ID or name of the custom action. | defaults to undefined + + +### Return type + +**void** + +### Authorization + +[bearerAuth](README.md#bearerAuth) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**204** | Custom action updated successfully. | - | +**400** | Invalid request. | - | +**401** | Unauthorized access. | - | +**403** | Forbidden access. | - | +**500** | Unexpected error | - | + +[[Back to top]](#) [[Back to API list]](README.md#documentation-for-api-endpoints) [[Back to Model list]](README.md#documentation-for-models) [[Back to README]](README.md) + diff --git a/sdks/typescript/CustomCalendarsApi.md b/sdks/typescript/CustomCalendarsApi.md new file mode 100644 index 000000000..2ddb3baa7 --- /dev/null +++ b/sdks/typescript/CustomCalendarsApi.md @@ -0,0 +1,351 @@ +# ThoughtSpotRestApiSdk.CustomCalendarsApi + +All URIs are relative to *CLUSTER_URL* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**createCalendar**](CustomCalendarsApi.md#createCalendar) | **POST** /api/rest/2.0/calendars/create | +[**deleteCalendar**](CustomCalendarsApi.md#deleteCalendar) | **POST** /api/rest/2.0/calendars/{calendar_identifier}/delete | +[**generateCSV**](CustomCalendarsApi.md#generateCSV) | **POST** /api/rest/2.0/calendars/generate-csv | +[**searchCalendars**](CustomCalendarsApi.md#searchCalendars) | **POST** /api/rest/2.0/calendars/search | +[**updateCalendar**](CustomCalendarsApi.md#updateCalendar) | **POST** /api/rest/2.0/calendars/{calendar_identifier}/update | + + +# **createCalendar** +> CalendarResponse createCalendar(createCalendarRequest) + + Version: 10.12.0.cl or later Creates a new [custom calendar](https://docs.thoughtspot.com/cloud/latest/connections-cust-cal). Requires `DATAMANAGEMENT` (**Can manage data**) or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your ThoughtSpot instance, the `CAN_MANAGE_CUSTOM_CALENDAR` (**Can manage custom calendars**) privilege is required. #### Usage guidelines You can create a custom calendar from scratch or an existing Table in ThoughtSpot. For both methods of calendar creation, the following parameters are required: * Name of the custom calendar. * Calendar creation method. To create a calendar from an existing table, specify the method: - `FROM_EXISTING_TABLE` - Creates calendar from the table reference provided in the API request. - `FROM_INPUT_PARAMS` - Creates a calendar from the parameters defined in the API request. * Connection ID and Table name * Database and schema name attributes: For most Cloud Data Warehouse (CDW) connectors, both `database_name` and `schema_name` attributes are required. However, the attribute requirements are conditional and vary based on the connector type and its metadata structure. For example, for connectors such as Teradata, MySQL, SingleSore, Amazon Aurora MySQL, Amazon RDS MySQL, Oracle, and GCP_MYSQL, the `schema_name` is required, whereas the `database_name` attribute is not. Similarly, connectors such as ClickHouse require you to specify the `database_name` and the schema specification in such cases is optional. **NOTE**: If you are creating a calendar from an existing table, ensure that the referenced table matches the required DDL for custom calendars. If the schema does not match, the API returns an error. ##### Calendar type The API allows you to create the following types of calendars: * `MONTH_OFFSET`. The default calendar type. A `MONTH_OFFSET` calendar is offset by a few months from the standard calendar months (January to December) and the year begins with the month defined in the request. For example, if the `month_offset` value is set as `April`, the calendar year begins in April. * `4-4-5`. Each quarter in the calendar will include two 4-week months followed by one 5-week month. * `4-5-4`. Each quarter in the calendar will include two 4-week months with a 5-week month between. * `5-4-4`. Each quarter begins with a 5-week month, followed by two 4-week months. To start and end the calendar on a specific date, specify the dates in the `MM/DD/YYYY` format. For `MONTH_OFFSET` calendars, ensure that the `start_date` matches the month specified in the `month_offset` attribute. You can also set the starting day of the week and customize the prefixes for year and quarter labels. #### Examples To create a calendar from an existing table: ``` { \"name\": \"MyCustomCalendar1\", \"table_reference\": { \"connection_identifier\": \"4db8ea22-2ff4-4224-b05a-26674717e468\", \"table_name\": \"MyCalendarTable\", \"database_name\": \"RETAILAPPAREL\", \"schema_name\": \"PUBLIC\" }, \"creation_method\": \"FROM_EXISTING_TABLE\", } ``` To create a calendar from scratch: ``` { \"name\": \"MyCustomCalendar1\", \"table_reference\": { \"connection_identifier\": \"4db8ea22-2ff4-4224-b05a-26674717e468\", \"table_name\": \"MyCalendarTable\", \"database_name\": \"RETAILAPPAREL\", \"schema_name\": \"PUBLIC\" }, \"creation_method\": \"FROM_INPUT_PARAMS\", \"calendar_type\": \"MONTH_OFFSET\", \"month_offset\": \"April\", \"start_day_of_week\": \"Monday\", \"quarter_name_prefix\": \"Q\", \"year_name_prefix\": \"FY\", \"start_date\": \"04/01/2025\", \"end_date\": \"04/31/2025\" } ``` + +### Example + + +```typescript +import { createBearerAuthenticationConfig, CustomCalendarsApi, CreateCalendarRequest } from '@thoughtspot/rest-api-sdk'; + +const configuration = createBearerAuthenticationConfig("CLUSTER_SERVER_URL", { + username: "YOUR_USERNAME", + password: "YOUR_PASSWORD", +}); +const apiInstance = new CustomCalendarsApi(configuration); + +apiInstance.createCalendar( + // CreateCalendarRequest + { + name: "name_example", + creation_method: "FROM_INPUT_PARAMS", + table_reference: null, + start_date: "start_date_example", + end_date: "end_date_example", + calendar_type: "MONTH_OFFSET", + month_offset: "January", + start_day_of_week: "Sunday", + quarter_name_prefix: "", + year_name_prefix: "", + } +).then((data:any) => { + console.log('API called successfully. Returned data: ' + data); +}).catch((error:any) => console.error(error)); + + +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **createCalendarRequest** | **CreateCalendarRequest**| | + + +### Return type + +**CalendarResponse** + +### Authorization + +[bearerAuth](README.md#bearerAuth) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Custom calendar created successfully. | - | +**400** | Invalid request. | - | +**401** | Unauthorized access. | - | +**403** | Forbidden access. | - | +**500** | Unexpected error | - | + +[[Back to top]](#) [[Back to API list]](README.md#documentation-for-api-endpoints) [[Back to Model list]](README.md#documentation-for-models) [[Back to README]](README.md) + +# **deleteCalendar** +> void deleteCalendar() + + Version: 10.12.0.cl or later Deletes a [custom calendar](https://docs.thoughtspot.com/cloud/latest/connections-cust-cal). Requires `DATAMANAGEMENT` (**Can manage data**) or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your ThoughtSpot instance, the `CAN_MANAGE_CUSTOM_CALENDAR` (**Can manage custom calendars**) privilege is required. #### Usage guidelines To delete a custom calendar, specify the calendar ID as a path parameter in the request URL. + +### Example + + +```typescript +import { createBearerAuthenticationConfig, CustomCalendarsApi, DeleteCalendarRequest } from '@thoughtspot/rest-api-sdk'; + +const configuration = createBearerAuthenticationConfig("CLUSTER_SERVER_URL", { + username: "YOUR_USERNAME", + password: "YOUR_PASSWORD", +}); +const apiInstance = new CustomCalendarsApi(configuration); + +apiInstance.deleteCalendar( + // string | Unique ID or name of the Calendar. + "calendar_identifier_example" +).then((data:any) => { + console.log('API called successfully. Returned data: ' + data); +}).catch((error:any) => console.error(error)); + + +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **calendarIdentifier** | [**string**] | Unique ID or name of the Calendar. | defaults to undefined + + +### Return type + +**void** + +### Authorization + +[bearerAuth](README.md#bearerAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**204** | Custom calendar successfully deleted. | - | +**400** | Invalid request. | - | +**401** | Unauthorized access. | - | +**403** | Forbidden access. | - | +**500** | Unexpected error | - | + +[[Back to top]](#) [[Back to API list]](README.md#documentation-for-api-endpoints) [[Back to Model list]](README.md#documentation-for-models) [[Back to README]](README.md) + +# **generateCSV** +> any generateCSV(generateCSVRequest) + + Version: 10.12.0.cl or later Exports a [custom calendar](https://docs.thoughtspot.com/cloud/latest/connections-cust-cal) in the CSV format. Requires `DATAMANAGEMENT` (**Can manage data**) or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your ThoughtSpot instance, the `CAN_MANAGE_CUSTOM_CALENDAR` (**Can manage custom calendars**) privilege is required. #### Usage guidelines Use this API to download a custom calendar in the CSV file format. In your API request, specify the following parameters. * Start and end date of the calendar. For \"month offset\" calendars, the start date must match the month defined in the `month_offset` attribute. You can also specify optional parameters such as the starting day of the week and prefixes for the quarter and year labels. + +### Example + + +```typescript +import { createBearerAuthenticationConfig, CustomCalendarsApi, GenerateCSVRequest } from '@thoughtspot/rest-api-sdk'; + +const configuration = createBearerAuthenticationConfig("CLUSTER_SERVER_URL", { + username: "YOUR_USERNAME", + password: "YOUR_PASSWORD", +}); +const apiInstance = new CustomCalendarsApi(configuration); + +apiInstance.generateCSV( + // GenerateCSVRequest + { + start_date: "start_date_example", + end_date: "end_date_example", + calendar_type: "MONTH_OFFSET", + month_offset: "January", + start_day_of_week: "Sunday", + quarter_name_prefix: "quarter_name_prefix_example", + year_name_prefix: "year_name_prefix_example", + } +).then((data:any) => { + console.log('API called successfully. Returned data: ' + data); +}).catch((error:any) => console.error(error)); + + +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **generateCSVRequest** | **GenerateCSVRequest**| | + + +### Return type + +**any** + +### Authorization + +[bearerAuth](README.md#bearerAuth) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Generate custom calendar data based on specifications, as a CSV file. | - | +**400** | Invalid request. | - | +**401** | Unauthorized access. | - | +**403** | Forbidden access. | - | +**500** | Unexpected error | - | + +[[Back to top]](#) [[Back to API list]](README.md#documentation-for-api-endpoints) [[Back to Model list]](README.md#documentation-for-models) [[Back to README]](README.md) + +# **searchCalendars** +> Array searchCalendars(searchCalendarsRequest) + + Version: 10.12.0.cl or later Gets a list of [custom calendars](https://docs.thoughtspot.com/cloud/latest/connections-cust-cal). Requires `DATAMANAGEMENT` (**Can manage data**) or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your ThoughtSpot instance, the `CAN_MANAGE_CUSTOM_CALENDAR` (**Can manage custom calendars**) privilege is required. #### Usage guidelines By default, the API returns a list of custom calendars for all connection objects. To retrieve custom calendar details for a particular connection, specify the connection ID. You can also use other search parameters such as `name_pattern` and `sort_options` as search filters. The `name_pattern` parameter filters and returns only those objects that match the specified pattern. Use `%` as a wildcard for pattern matching. + +### Example + + +```typescript +import { createBearerAuthenticationConfig, CustomCalendarsApi, SearchCalendarsRequest } from '@thoughtspot/rest-api-sdk'; + +const configuration = createBearerAuthenticationConfig("CLUSTER_SERVER_URL", { + username: "YOUR_USERNAME", + password: "YOUR_PASSWORD", +}); +const apiInstance = new CustomCalendarsApi(configuration); + +apiInstance.searchCalendars( + // SearchCalendarsRequest + { + connection_identifier: "connection_identifier_example", + name_pattern: "name_pattern_example", + record_offset: 0, + record_size: 10, + sort_options: null, + } +).then((data:any) => { + console.log('API called successfully. Returned data: ' + data); +}).catch((error:any) => console.error(error)); + + +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **searchCalendarsRequest** | **SearchCalendarsRequest**| | + + +### Return type + +**Array** + +### Authorization + +[bearerAuth](README.md#bearerAuth) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Custom calendar fetched successfully. | - | +**400** | Invalid request. | - | +**401** | Unauthorized access. | - | +**403** | Forbidden access. | - | +**500** | Unexpected error | - | + +[[Back to top]](#) [[Back to API list]](README.md#documentation-for-api-endpoints) [[Back to Model list]](README.md#documentation-for-models) [[Back to README]](README.md) + +# **updateCalendar** +> void updateCalendar(updateCalendarRequest) + + Version: 10.12.0.cl or later Updates the properties of a [custom calendar](https://docs.thoughtspot.com/cloud/latest/connections-cust-cal). Requires `DATAMANAGEMENT` (**Can manage data**) or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your ThoughtSpot instance, the `CAN_MANAGE_CUSTOM_CALENDAR` (**Can manage custom calendars**) privilege is required. #### Usage guidelines You can update the properties of a calendar using one of the following methods: * `FROM_INPUT_PARAMS` to update the calendar properties with the values defined in the API request. * `FROM_EXISTING_TABLE` Creates a calendar from the parameters defined in the API request. To update a custom calendar, specify the calendar ID as a path parameter in the request URL and the following parameters in the request body: * Connection ID and Table name * Database and schema name attributes: For most Cloud Data Warehouse (CDW) connectors, both `database_name` and `schema_name` attributes are required. However, the attribute requirements are conditional and vary based on the connector type and its metadata structure. For example, for connectors such as Teradata, MySQL, SingleSore, Amazon Aurora MySQL, Amazon RDS MySQL, Oracle, and GCP_MYSQL, the `schema_name` is required, whereas the `database_name` attribute is not. Similarly, connectors such as ClickHouse require you to specify the `database_name` and the schema specification in such cases is optional. The API allows you to modify the calendar type, month offset value, start and end date, starting day of the week, and prefixes assigned to the year and quarter labels. #### Examples Update a custom calendar using an existing Table in ThoughtSpot: ``` { \"update_method\": \"FROM_EXISTING_TABLE\", \"table_reference\": { \"connection_identifier\": \"Connection1\", \"database_name\": \"db1\", \"table_name\": \"custom_calendar_2025\", \"schame_name\": \"schemaVar\" } } ``` Update a custom calendar with the attributes defined in the API request: ``` { \"update_method\": \"FROM_INPUT_PARAMS\", \"table_reference\": { \"connection_identifier\": \"Connection1\", \"database_name\": \"db1\", \"table_name\": \"custom_calendar_2025\", \"schame_name\": \"schemaVar\" }, \"month_offset\": \"August\", \"start_day_of_week\": \"Monday\", \"start_date\": \"08/01/2025\", \"end_date\": \"07/31/2026\" } ``` + +### Example + + +```typescript +import { createBearerAuthenticationConfig, CustomCalendarsApi, UpdateCalendarRequest } from '@thoughtspot/rest-api-sdk'; + +const configuration = createBearerAuthenticationConfig("CLUSTER_SERVER_URL", { + username: "YOUR_USERNAME", + password: "YOUR_PASSWORD", +}); +const apiInstance = new CustomCalendarsApi(configuration); + +apiInstance.updateCalendar( + // string | Unique Id or name of the calendar. + "calendar_identifier_example" , + // UpdateCalendarRequest + { + update_method: "FROM_INPUT_PARAMS", + table_reference: null, + start_date: "start_date_example", + end_date: "end_date_example", + calendar_type: "MONTH_OFFSET", + month_offset: "January", + start_day_of_week: "Sunday", + quarter_name_prefix: "", + year_name_prefix: "", + } +).then((data:any) => { + console.log('API called successfully. Returned data: ' + data); +}).catch((error:any) => console.error(error)); + + +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **updateCalendarRequest** | **UpdateCalendarRequest**| | + **calendarIdentifier** | [**string**] | Unique Id or name of the calendar. | defaults to undefined + + +### Return type + +**void** + +### Authorization + +[bearerAuth](README.md#bearerAuth) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**204** | Custom calendar updated successfully. | - | +**400** | Invalid request. | - | +**401** | Unauthorized access. | - | +**403** | Forbidden access. | - | +**500** | Unexpected error | - | + +[[Back to top]](#) [[Back to API list]](README.md#documentation-for-api-endpoints) [[Back to Model list]](README.md#documentation-for-models) [[Back to README]](README.md) + diff --git a/sdks/typescript/DBTApi.md b/sdks/typescript/DBTApi.md new file mode 100644 index 000000000..7cc75d9a9 --- /dev/null +++ b/sdks/typescript/DBTApi.md @@ -0,0 +1,440 @@ +# ThoughtSpotRestApiSdk.DBTApi + +All URIs are relative to *CLUSTER_URL* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**dbtConnection**](DBTApi.md#dbtConnection) | **POST** /api/rest/2.0/dbt/dbt-connection | +[**dbtGenerateSyncTml**](DBTApi.md#dbtGenerateSyncTml) | **POST** /api/rest/2.0/dbt/generate-sync-tml | +[**dbtGenerateTml**](DBTApi.md#dbtGenerateTml) | **POST** /api/rest/2.0/dbt/generate-tml | +[**dbtSearch**](DBTApi.md#dbtSearch) | **POST** /api/rest/2.0/dbt/search | +[**deleteDbtConnection**](DBTApi.md#deleteDbtConnection) | **POST** /api/rest/2.0/dbt/{dbt_connection_identifier}/delete | +[**updateDbtConnection**](DBTApi.md#updateDbtConnection) | **POST** /api/rest/2.0/dbt/update-dbt-connection | + + +# **dbtConnection** +> any dbtConnection() + + Version: 9.9.0.cl or later Creates a DBT connection object in ThoughtSpot. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege or `DATAMANAGEMENT` (**Can manage data**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the following Data control privileges may be required: - `CAN_MANAGE_CUSTOM_CALENDAR`(**Can manage custom calendars**) - `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) - `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` (**Can manage data models**) #### About create DBT connection DBT connection in ThoughtSpot is used by the user to define DBT credentials for cloud . The API needs embrace connection, embrace database name, DBT url, import type, DBT account identifier, DBT project identifier, DBT access token and environment details (or) embrace connection, embrace database name, import type, file_content to create a connection object. To know more about DBT, see ThoughtSpot Product Documentation. + +### Example + + +```typescript +import { createBearerAuthenticationConfig, DBTApi, DbtConnectionRequest } from '@thoughtspot/rest-api-sdk'; + +const configuration = createBearerAuthenticationConfig("CLUSTER_SERVER_URL", { + username: "YOUR_USERNAME", + password: "YOUR_PASSWORD", +}); +const apiInstance = new DBTApi(configuration); + +apiInstance.dbtConnection( + // string | Name of the connection. + "connectionName_example" , + // string | Name of the Database. + "databaseName_example" , + // string | Mention type of Import (optional) + "DBT_CLOUD" , + // string | Access token is mandatory when Import_Type is DBT_CLOUD. (optional) + "accessToken_example" , + // string | DBT URL is mandatory when Import_Type is DBT_CLOUD. (optional) + "dbtUrl_example" , + // string | Account ID is mandatory when Import_Type is DBT_CLOUD (optional) + "accountId_example" , + // string | Project ID is mandatory when Import_Type is DBT_CLOUD (optional) + "projectId_example" , + // string | DBT Environment ID\\\" (optional) + "dbtEnvId_example" , + // string | Name of the project (optional) + "projectName_example" , + // HttpFile | Upload DBT Manifest and Catalog artifact files as a ZIP file. This field is Mandatory when Import Type is \\\'ZIP_FILE\\\' (optional) + { data: Buffer.from(fs.readFileSync('/path/to/file', 'utf-8')), name: '/path/to/file' } +).then((data:any) => { + console.log('API called successfully. Returned data: ' + data); +}).catch((error:any) => console.error(error)); + + +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **connectionName** | [**string**] | Name of the connection. | defaults to undefined + **databaseName** | [**string**] | Name of the Database. | defaults to undefined + **importType** | [**string**]**Array<'DBT_CLOUD' | 'ZIP_FILE'>** | Mention type of Import | (optional) defaults to 'DBT_CLOUD' + **accessToken** | [**string**] | Access token is mandatory when Import_Type is DBT_CLOUD. | (optional) defaults to undefined + **dbtUrl** | [**string**] | DBT URL is mandatory when Import_Type is DBT_CLOUD. | (optional) defaults to undefined + **accountId** | [**string**] | Account ID is mandatory when Import_Type is DBT_CLOUD | (optional) defaults to undefined + **projectId** | [**string**] | Project ID is mandatory when Import_Type is DBT_CLOUD | (optional) defaults to undefined + **dbtEnvId** | [**string**] | DBT Environment ID\\\" | (optional) defaults to undefined + **projectName** | [**string**] | Name of the project | (optional) defaults to undefined + **fileContent** | [**HttpFile**] | Upload DBT Manifest and Catalog artifact files as a ZIP file. This field is Mandatory when Import Type is \\\'ZIP_FILE\\\' | (optional) defaults to undefined + + +### Return type + +**any** + +### Authorization + +[bearerAuth](README.md#bearerAuth) + +### HTTP request headers + + - **Content-Type**: multipart/form-data + - **Accept**: application/json + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Succesfully created DBT Connection. | - | +**400** | Invalid request. | - | +**401** | Unauthorized access. | - | +**403** | Forbidden access. | - | +**500** | Unexpected error | - | + +[[Back to top]](#) [[Back to API list]](README.md#documentation-for-api-endpoints) [[Back to Model list]](README.md#documentation-for-models) [[Back to README]](README.md) + +# **dbtGenerateSyncTml** +> any dbtGenerateSyncTml() + + Version: 9.9.0.cl or later Resynchronize the existing list of models, tables, worksheet tml’s and import them to Thoughtspot based on the DBT connection object. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege or `DATAMANAGEMENT` (**Can manage data**) privilege, along with an existing DBT connection. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the following data control privileges may be required: - `CAN_MANAGE_CUSTOM_CALENDAR`(**Can manage custom calendars**) - `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) - `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` (**Can manage data models**) + +### Example + + +```typescript +import { createBearerAuthenticationConfig, DBTApi, DbtGenerateSyncTmlRequest } from '@thoughtspot/rest-api-sdk'; + +const configuration = createBearerAuthenticationConfig("CLUSTER_SERVER_URL", { + username: "YOUR_USERNAME", + password: "YOUR_PASSWORD", +}); +const apiInstance = new DBTApi(configuration); + +apiInstance.dbtGenerateSyncTml( + // string | Unique ID of the DBT connection. + "dbtConnectionIdentifier_example" , + // HttpFile | Upload DBT Manifest and Catalog artifact files as a ZIP file. This field is mandatory if the connection was created with import_type ‘ZIP_FILE’ (optional) + { data: Buffer.from(fs.readFileSync('/path/to/file', 'utf-8')), name: '/path/to/file' } +).then((data:any) => { + console.log('API called successfully. Returned data: ' + data); +}).catch((error:any) => console.error(error)); + + +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **dbtConnectionIdentifier** | [**string**] | Unique ID of the DBT connection. | defaults to undefined + **fileContent** | [**HttpFile**] | Upload DBT Manifest and Catalog artifact files as a ZIP file. This field is mandatory if the connection was created with import_type ‘ZIP_FILE’ | (optional) defaults to undefined + + +### Return type + +**any** + +### Authorization + +[bearerAuth](README.md#bearerAuth) + +### HTTP request headers + + - **Content-Type**: multipart/form-data + - **Accept**: application/json + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Sync Table and Worksheet TML\'s are successfully generated. | - | +**400** | Invalid request. | - | +**401** | Unauthorized access. | - | +**403** | Forbidden access. | - | +**500** | Unexpected error | - | + +[[Back to top]](#) [[Back to API list]](README.md#documentation-for-api-endpoints) [[Back to Model list]](README.md#documentation-for-models) [[Back to README]](README.md) + +# **dbtGenerateTml** +> any dbtGenerateTml() + + Version: 9.9.0.cl or later Generate required table and worksheet and import them. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege or `DATAMANAGEMENT` (**Can manage data**) privilege, along with an existing DBT connection. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the following data control privileges may be required: - `CAN_MANAGE_CUSTOM_CALENDAR`(**Can manage custom calendars**) - `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) - `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` (**Can manage data models**) #### About generate TML Models and Worksheets to be imported can be selected by the user as part of the API. + +### Example + + +```typescript +import { createBearerAuthenticationConfig, DBTApi, DbtGenerateTmlRequest } from '@thoughtspot/rest-api-sdk'; + +const configuration = createBearerAuthenticationConfig("CLUSTER_SERVER_URL", { + username: "YOUR_USERNAME", + password: "YOUR_PASSWORD", +}); +const apiInstance = new DBTApi(configuration); + +apiInstance.dbtGenerateTml( + // string | Unique ID of the DBT connection. + "dbtConnectionIdentifier_example" , + // string | List of Models and their respective Tables Example: \\\'[{\\\"model_name\\\": \\\"model_name\\\", \\\"tables\\\": [\\\"table_name\\\"]}]\\\' + "modelTables_example" , + // string | Mention the worksheet tmls to import + "ALL" , + // string | List of worksheets is mandatory when import_Worksheets is type SELECTED Example: [\\\"worksheet_name\\\"] (optional) + "worksheets_example" , + // HttpFile | Upload DBT Manifest and Catalog artifact files as a ZIP file. This field is mandatory if the connection was created with import_type ‘ZIP_FILE’ (optional) + { data: Buffer.from(fs.readFileSync('/path/to/file', 'utf-8')), name: '/path/to/file' } +).then((data:any) => { + console.log('API called successfully. Returned data: ' + data); +}).catch((error:any) => console.error(error)); + + +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **dbtConnectionIdentifier** | [**string**] | Unique ID of the DBT connection. | defaults to undefined + **modelTables** | [**string**] | List of Models and their respective Tables Example: \\\'[{\\\"model_name\\\": \\\"model_name\\\", \\\"tables\\\": [\\\"table_name\\\"]}]\\\' | defaults to undefined + **importWorksheets** | [**string**]**Array<'ALL' | 'NONE' | 'SELECTED'>** | Mention the worksheet tmls to import | defaults to undefined + **worksheets** | [**string**] | List of worksheets is mandatory when import_Worksheets is type SELECTED Example: [\\\"worksheet_name\\\"] | (optional) defaults to undefined + **fileContent** | [**HttpFile**] | Upload DBT Manifest and Catalog artifact files as a ZIP file. This field is mandatory if the connection was created with import_type ‘ZIP_FILE’ | (optional) defaults to undefined + + +### Return type + +**any** + +### Authorization + +[bearerAuth](README.md#bearerAuth) + +### HTTP request headers + + - **Content-Type**: multipart/form-data + - **Accept**: application/json + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Required Table and Worksheet TML\'s are successfully generated. | - | +**400** | Invalid request. | - | +**401** | Unauthorized access. | - | +**403** | Forbidden access. | - | +**500** | Unexpected error | - | + +[[Back to top]](#) [[Back to API list]](README.md#documentation-for-api-endpoints) [[Back to Model list]](README.md#documentation-for-models) [[Back to README]](README.md) + +# **dbtSearch** +> Array dbtSearch() + + Version: 9.9.0.cl or later Gets a list of DBT connection objects by user and organization, available on the ThoughtSpot system. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege or `DATAMANAGEMENT` (**Can manage data**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the following Data control privileges may be required: - `CAN_MANAGE_CUSTOM_CALENDAR`(**Can manage custom calendars**) - `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) - `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` (**Can manage data models**) #### About search DBT connection To get details of a specific DBT connection identifier, database connection identifier, database connection name, database name, project name, project identifier, environment identifier , import type and author. + +### Example + + +```typescript +import { createBearerAuthenticationConfig, DBTApi, DbtSearchRequest } from '@thoughtspot/rest-api-sdk'; + +const configuration = createBearerAuthenticationConfig("CLUSTER_SERVER_URL", { + username: "YOUR_USERNAME", + password: "YOUR_PASSWORD", +}); +const apiInstance = new DBTApi(configuration); + +apiInstance.dbtSearch().then((data:any) => { + console.log('API called successfully. Returned data: ' + JSON.stringify(data)); +}).catch((error:any) => console.error(error)); + + +``` + + +### Parameters +This endpoint does not need any parameter. + + +### Return type + +**Array** + +### Authorization + +[bearerAuth](README.md#bearerAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Retrieved list of DBT connections successfully. | - | +**400** | Invalid request. | - | +**401** | Unauthorized access. | - | +**403** | Forbidden access. | - | +**500** | Unexpected error | - | + +[[Back to top]](#) [[Back to API list]](README.md#documentation-for-api-endpoints) [[Back to Model list]](README.md#documentation-for-models) [[Back to README]](README.md) + +# **deleteDbtConnection** +> void deleteDbtConnection() + + Version: 9.9.0.cl or later Removes the specified DBT connection object from the ThoughtSpot system. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) or `DATAMANAGEMENT` (**Can manage data ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the following Data control privileges may be required: - `CAN_MANAGE_CUSTOM_CALENDAR`(**Can manage custom calendars**) - `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) - `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` (**Can manage data models**) + +### Example + + +```typescript +import { createBearerAuthenticationConfig, DBTApi, DeleteDbtConnectionRequest } from '@thoughtspot/rest-api-sdk'; + +const configuration = createBearerAuthenticationConfig("CLUSTER_SERVER_URL", { + username: "YOUR_USERNAME", + password: "YOUR_PASSWORD", +}); +const apiInstance = new DBTApi(configuration); + +apiInstance.deleteDbtConnection( + // string | Unique ID of the DBT Connection. + "dbt_connection_identifier_example" +).then((data:any) => { + console.log('API called successfully. Returned data: ' + data); +}).catch((error:any) => console.error(error)); + + +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **dbtConnectionIdentifier** | [**string**] | Unique ID of the DBT Connection. | defaults to undefined + + +### Return type + +**void** + +### Authorization + +[bearerAuth](README.md#bearerAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**204** | DBT Connection successfully deleted. | - | +**400** | Invalid request. | - | +**401** | Unauthorized access. | - | +**403** | Forbidden access. | - | +**500** | Unexpected error | - | + +[[Back to top]](#) [[Back to API list]](README.md#documentation-for-api-endpoints) [[Back to Model list]](README.md#documentation-for-models) [[Back to README]](README.md) + +# **updateDbtConnection** +> any updateDbtConnection() + + Version: 9.9.0.cl or later Updates a DBT connection object. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege or `DATAMANAGEMENT` (**Can manage data ThoughtSpot**) privilege, along with an existing DBT connection. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the following data control privileges may be required: - `CAN_MANAGE_CUSTOM_CALENDAR`(**Can manage custom calendars**) - `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) - `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` (**Can manage data models**) #### About update DBT connection You can modify DBT connection object properties such as embrace connection name, embrace database name, import type, account identifier, access token, project identifier and environment (or) embrace connection, embrace database name, import type, file_content settings. + +### Example + + +```typescript +import { createBearerAuthenticationConfig, DBTApi, UpdateDbtConnectionRequest } from '@thoughtspot/rest-api-sdk'; + +const configuration = createBearerAuthenticationConfig("CLUSTER_SERVER_URL", { + username: "YOUR_USERNAME", + password: "YOUR_PASSWORD", +}); +const apiInstance = new DBTApi(configuration); + +apiInstance.updateDbtConnection( + // string | Unique ID of the DBT Connection. + "dbtConnectionIdentifier_example" , + // string | Name of the connection. (optional) + "connectionName_example" , + // string | Name of the Database. (optional) + "databaseName_example" , + // string | Mention type of Import (optional) + "DBT_CLOUD" , + // string | Access token is mandatory when Import_Type is DBT_CLOUD. (optional) + "accessToken_example" , + // string | DBT URL is mandatory when Import_Type is DBT_CLOUD. (optional) + "dbtUrl_example" , + // string | Account ID is mandatory when Import_Type is DBT_CLOUD (optional) + "accountId_example" , + // string | Project ID is mandatory when Import_Type is DBT_CLOUD (optional) + "projectId_example" , + // string | DBT Environment ID\\\" (optional) + "dbtEnvId_example" , + // string | Name of the project (optional) + "projectName_example" , + // HttpFile | Upload DBT Manifest and Catalog artifact files as a ZIP file. This field is Mandatory when Import Type is \\\'ZIP_FILE\\\' (optional) + { data: Buffer.from(fs.readFileSync('/path/to/file', 'utf-8')), name: '/path/to/file' } +).then((data:any) => { + console.log('API called successfully. Returned data: ' + data); +}).catch((error:any) => console.error(error)); + + +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **dbtConnectionIdentifier** | [**string**] | Unique ID of the DBT Connection. | defaults to undefined + **connectionName** | [**string**] | Name of the connection. | (optional) defaults to undefined + **databaseName** | [**string**] | Name of the Database. | (optional) defaults to undefined + **importType** | [**string**]**Array<'DBT_CLOUD' | 'ZIP_FILE'>** | Mention type of Import | (optional) defaults to 'DBT_CLOUD' + **accessToken** | [**string**] | Access token is mandatory when Import_Type is DBT_CLOUD. | (optional) defaults to undefined + **dbtUrl** | [**string**] | DBT URL is mandatory when Import_Type is DBT_CLOUD. | (optional) defaults to undefined + **accountId** | [**string**] | Account ID is mandatory when Import_Type is DBT_CLOUD | (optional) defaults to undefined + **projectId** | [**string**] | Project ID is mandatory when Import_Type is DBT_CLOUD | (optional) defaults to undefined + **dbtEnvId** | [**string**] | DBT Environment ID\\\" | (optional) defaults to undefined + **projectName** | [**string**] | Name of the project | (optional) defaults to undefined + **fileContent** | [**HttpFile**] | Upload DBT Manifest and Catalog artifact files as a ZIP file. This field is Mandatory when Import Type is \\\'ZIP_FILE\\\' | (optional) defaults to undefined + + +### Return type + +**any** + +### Authorization + +[bearerAuth](README.md#bearerAuth) + +### HTTP request headers + + - **Content-Type**: multipart/form-data + - **Accept**: application/json + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | DBT Connection successfully updated. | - | +**400** | Invalid request. | - | +**401** | Unauthorized access. | - | +**403** | Forbidden access. | - | +**500** | Unexpected error | - | + +[[Back to top]](#) [[Back to API list]](README.md#documentation-for-api-endpoints) [[Back to Model list]](README.md#documentation-for-models) [[Back to README]](README.md) + diff --git a/sdks/typescript/DataApi.md b/sdks/typescript/DataApi.md new file mode 100644 index 000000000..1b6b02d95 --- /dev/null +++ b/sdks/typescript/DataApi.md @@ -0,0 +1,220 @@ +# ThoughtSpotRestApiSdk.DataApi + +All URIs are relative to *CLUSTER_URL* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**fetchAnswerData**](DataApi.md#fetchAnswerData) | **POST** /api/rest/2.0/metadata/answer/data | +[**fetchLiveboardData**](DataApi.md#fetchLiveboardData) | **POST** /api/rest/2.0/metadata/liveboard/data | +[**searchData**](DataApi.md#searchData) | **POST** /api/rest/2.0/searchdata | + + +# **fetchAnswerData** +> AnswerDataResponse fetchAnswerData(fetchAnswerDataRequest) + + Version: 9.0.0.cl or later Fetches data from a saved Answer. Requires at least view access to the saved Answer. The `record_size` attribute determines the number of records to retrieve in an API call. For more information about pagination, record size, and maximum row limit, see [Pagination and record size settings](https://developers.thoughtspot.com/docs/fetch-data-and-report-apis#_pagination_settings_for_data_and_report_apis). + +### Example + + +```typescript +import { createBearerAuthenticationConfig, DataApi, FetchAnswerDataRequest } from '@thoughtspot/rest-api-sdk'; + +const configuration = createBearerAuthenticationConfig("CLUSTER_SERVER_URL", { + username: "YOUR_USERNAME", + password: "YOUR_PASSWORD", +}); +const apiInstance = new DataApi(configuration); + +apiInstance.fetchAnswerData( + // FetchAnswerDataRequest + { + metadata_identifier: "metadata_identifier_example", + data_format: "COMPACT", + record_offset: 0, + record_size: 10, + runtime_filter: {}, + runtime_sort: {}, + runtime_param_override: {}, + } +).then((data:any) => { + console.log('API called successfully. Returned data: ' + data); +}).catch((error:any) => console.error(error)); + + +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **fetchAnswerDataRequest** | **FetchAnswerDataRequest**| | + + +### Return type + +**AnswerDataResponse** + +### Authorization + +[bearerAuth](README.md#bearerAuth) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Fetching data of specified metadata object is successful. | - | +**400** | Invalid request. | - | +**401** | Unauthorized access. | - | +**403** | Forbidden access. | - | +**500** | Unexpected error | - | + +[[Back to top]](#) [[Back to API list]](README.md#documentation-for-api-endpoints) [[Back to Model list]](README.md#documentation-for-models) [[Back to README]](README.md) + +# **fetchLiveboardData** +> LiveboardDataResponse fetchLiveboardData(fetchLiveboardDataRequest) + + Version: 9.0.0.cl or later Gets data from a Liveboard object and its visualization. Requires at least view access to the Liveboard. #### Usage guidelines In the request body, specify the GUID or name of the Liveboard. To get data for specific visualizations, add the GUIDs or names of the visualizations in the API request. To include unsaved changes in the report, pass the `transient_pinboard_content` script generated from the `getExportRequestForCurrentPinboard` method in the Visual Embed SDK. Upon successful execution, the API returns the report with unsaved changes. If the new Liveboard experience mode, the transient content includes ad hoc changes to visualizations such as sorting, toggling of legends, and data drill down. For more information, and see [Liveboard data API](https://developers.thoughtspot.com/docs/fetch-data-and-report-apis#_fetch_liveboard_data_api). + +### Example + + +```typescript +import { createBearerAuthenticationConfig, DataApi, FetchLiveboardDataRequest } from '@thoughtspot/rest-api-sdk'; + +const configuration = createBearerAuthenticationConfig("CLUSTER_SERVER_URL", { + username: "YOUR_USERNAME", + password: "YOUR_PASSWORD", +}); +const apiInstance = new DataApi(configuration); + +apiInstance.fetchLiveboardData( + // FetchLiveboardDataRequest + { + metadata_identifier: "metadata_identifier_example", + visualization_identifiers: [ + "visualization_identifiers_example", + ], + transient_content: "transient_content_example", + data_format: "COMPACT", + record_offset: 0, + record_size: 10, + runtime_filter: {}, + runtime_sort: {}, + runtime_param_override: {}, + } +).then((data:any) => { + console.log('API called successfully. Returned data: ' + data); +}).catch((error:any) => console.error(error)); + + +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **fetchLiveboardDataRequest** | **FetchLiveboardDataRequest**| | + + +### Return type + +**LiveboardDataResponse** + +### Authorization + +[bearerAuth](README.md#bearerAuth) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Fetching data of specified metadata object is successful. | - | +**400** | Invalid request. | - | +**401** | Unauthorized access. | - | +**403** | Forbidden access. | - | +**500** | Unexpected error | - | + +[[Back to top]](#) [[Back to API list]](README.md#documentation-for-api-endpoints) [[Back to Model list]](README.md#documentation-for-models) [[Back to README]](README.md) + +# **searchData** +> SearchDataResponse searchData(searchDataRequest) + + Version: 9.0.0.cl or later Generates an Answer from a given data source. Requires at least view access to the data source object (Worksheet or View). #### Usage guidelines To search data, specify the data source GUID in `logical_table_identifier`. The data source can be a Worksheet, View, Table, or SQL view. Pass search tokens in the `query_string` attribute in the API request as shown in the following example: ``` { \"query_string\": \"[sales] by [store]\", \"logical_table_identifier\": \"cd252e5c-b552-49a8-821d-3eadaa049cca\", } ``` For more information about the `query_string` format and data source attribute, see [Search data API](https://developers.thoughtspot.com/docs/fetch-data-and-report-apis#_search_data_api). The `record_size` attribute determines the number of records to retrieve in an API call. For more information about pagination, record size, and maximum row limit, see [Pagination and record size settings](https://developers.thoughtspot.com/docs/fetch-data-and-report-apis#_pagination_settings_for_data_and_report_api). + +### Example + + +```typescript +import { createBearerAuthenticationConfig, DataApi, SearchDataRequest } from '@thoughtspot/rest-api-sdk'; + +const configuration = createBearerAuthenticationConfig("CLUSTER_SERVER_URL", { + username: "YOUR_USERNAME", + password: "YOUR_PASSWORD", +}); +const apiInstance = new DataApi(configuration); + +apiInstance.searchData( + // SearchDataRequest + { + query_string: "query_string_example", + logical_table_identifier: "logical_table_identifier_example", + data_format: "COMPACT", + record_offset: 0, + record_size: 10, + runtime_filter: {}, + runtime_sort: {}, + runtime_param_override: {}, + } +).then((data:any) => { + console.log('API called successfully. Returned data: ' + data); +}).catch((error:any) => console.error(error)); + + +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **searchDataRequest** | **SearchDataRequest**| | + + +### Return type + +**SearchDataResponse** + +### Authorization + +[bearerAuth](README.md#bearerAuth) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Fetching data of specified metadata object is successful. | - | +**400** | Invalid request. | - | +**401** | Unauthorized access. | - | +**403** | Forbidden access. | - | +**500** | Unexpected error | - | + +[[Back to top]](#) [[Back to API list]](README.md#documentation-for-api-endpoints) [[Back to Model list]](README.md#documentation-for-models) [[Back to README]](README.md) + diff --git a/sdks/typescript/EmailCustomizationApi.md b/sdks/typescript/EmailCustomizationApi.md new file mode 100644 index 000000000..acec60419 --- /dev/null +++ b/sdks/typescript/EmailCustomizationApi.md @@ -0,0 +1,378 @@ +# ThoughtSpotRestApiSdk.EmailCustomizationApi + +All URIs are relative to *CLUSTER_URL* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**createEmailCustomization**](EmailCustomizationApi.md#createEmailCustomization) | **POST** /api/rest/2.0/customization/email | +[**deleteEmailCustomization**](EmailCustomizationApi.md#deleteEmailCustomization) | **POST** /api/rest/2.0/customization/email/{template_identifier}/delete | +[**deleteOrgEmailCustomization**](EmailCustomizationApi.md#deleteOrgEmailCustomization) | **POST** /api/rest/2.0/customization/email/delete | +[**searchEmailCustomization**](EmailCustomizationApi.md#searchEmailCustomization) | **POST** /api/rest/2.0/customization/email/search | +[**updateEmailCustomization**](EmailCustomizationApi.md#updateEmailCustomization) | **POST** /api/rest/2.0/customization/email/update | +[**validateEmailCustomization**](EmailCustomizationApi.md#validateEmailCustomization) | **POST** /api/rest/2.0/customization/email/validate | + + +# **createEmailCustomization** +> CreateEmailCustomizationResponse createEmailCustomization(createEmailCustomizationRequest) + + Version: 10.10.0.cl or later Creates a customization configuration for the notification email. #### Pre-requisites Requires `DEVELOPER` (**has developer privilege**) or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `DEVELOPER` (**Has developer privilege**) privilege is required. **NOTE**:This endpoint in currently in beta. Contact ThoughtSpot support to enable this on your instance. #### Usage guidelines To create a custom configuration pass these parameters in your API request: - A JSON map of configuration attributes `template_properties`. The following example shows a sample set of customization configuration: ``` { { \"cta_button_bg_color\": \"#444DEA\", \"cta_text_font_color\": \"#FFFFFF\", \"primary_bg_color\": \"#D3DEF0\", \"logo_url\": \"https://storage.pardot.com/710713/1642089901EbkRibJq/TS_fullworkmark_darkmode.png\", \"font_family\": \"\", \"product_name\": \"ThoughtSpot\", \"footer_address\": \"444 Castro St, Suite 1000 Mountain View, CA 94041\", \"footer_phone\": \"(800) 508-7008\", \"replacement_value_for_liveboard\": \"Dashboard\", \"replacement_value_for_answer\": \"Chart\", \"replacement_value_for_spot_iq\": \"AI Insights\", \"hide_footer_phone\": false, \"hide_footer_address\": false, \"hide_product_name\": false, \"hide_manage_notification\": false, \"hide_mobile_app_nudge\": false, \"hide_privacy_policy\": false, \"hide_ts_vocabulary_definitions\": false, \"hide_error_message\": false, \"hide_unsubscribe_link\": false, \"hide_notification_status\": false, \"hide_modify_alert\": false, \"company_website_url\": \"https://your-website.com/\", \"company_privacy_policy_url\" : \"https://link-to-privacy-policy.com/\", \"contact_support_url\": \"https://link-to-contact-support.com/\", \"hide_contact_support_url\": false, \"hide_logo_url\" : false } } ``` + +### Example + + +```typescript +import { createBearerAuthenticationConfig, EmailCustomizationApi, CreateEmailCustomizationRequest } from '@thoughtspot/rest-api-sdk'; + +const configuration = createBearerAuthenticationConfig("CLUSTER_SERVER_URL", { + username: "YOUR_USERNAME", + password: "YOUR_PASSWORD", +}); +const apiInstance = new EmailCustomizationApi(configuration); + +apiInstance.createEmailCustomization( + // CreateEmailCustomizationRequest + { + template_properties: null, + org_identifier: "org_identifier_example", + } +).then((data:any) => { + console.log('API called successfully. Returned data: ' + data); +}).catch((error:any) => console.error(error)); + + +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **createEmailCustomizationRequest** | **CreateEmailCustomizationRequest**| | + + +### Return type + +**CreateEmailCustomizationResponse** + +### Authorization + +[bearerAuth](README.md#bearerAuth) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**400** | Invalid request. | - | +**403** | Unauthorized access. | - | +**500** | Unexpected error | - | + +[[Back to top]](#) [[Back to API list]](README.md#documentation-for-api-endpoints) [[Back to Model list]](README.md#documentation-for-models) [[Back to README]](README.md) + +# **deleteEmailCustomization** +> void deleteEmailCustomization() + + Version: 10.10.0.cl or later Deletes the configuration for the email customization. #### Pre-requisites Requires `DEVELOPER` (**has developer privilege**) or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `DEVELOPER` (**Has developer privilege**) privilege is required. **NOTE**:This endpoint in currently in beta. Contact ThoughtSpot support to enable this on your instance. #### Usage guidelines - Call the search API endpoint to get the `template_identifier` from the response. - Use that `template_identifier` as a parameter in this API request. + +### Example + + +```typescript +import { createBearerAuthenticationConfig, EmailCustomizationApi, DeleteEmailCustomizationRequest } from '@thoughtspot/rest-api-sdk'; + +const configuration = createBearerAuthenticationConfig("CLUSTER_SERVER_URL", { + username: "YOUR_USERNAME", + password: "YOUR_PASSWORD", +}); +const apiInstance = new EmailCustomizationApi(configuration); + +apiInstance.deleteEmailCustomization( + // string | Unique ID or name of the email customization. + "template_identifier_example" +).then((data:any) => { + console.log('API called successfully. Returned data: ' + data); +}).catch((error:any) => console.error(error)); + + +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **templateIdentifier** | [**string**] | Unique ID or name of the email customization. | defaults to undefined + + +### Return type + +**void** + +### Authorization + +[bearerAuth](README.md#bearerAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**204** | Email Customization configuration successfully deleted. | - | +**400** | Invalid request. | - | +**403** | Unauthorized access. | - | +**500** | Unexpected error | - | + +[[Back to top]](#) [[Back to API list]](README.md#documentation-for-api-endpoints) [[Back to Model list]](README.md#documentation-for-models) [[Back to README]](README.md) + +# **deleteOrgEmailCustomization** +> void deleteOrgEmailCustomization(deleteOrgEmailCustomizationRequest) + + Version: 10.12.0.cl or later Deletes the configuration for the email customization. #### Pre-requisites Requires `DEVELOPER` (**has developer privilege**) or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `DEVELOPER` (**Has developer privilege**) privilege is required. **NOTE**:This endpoint in currently in beta. Contact ThoughtSpot support to enable this on your instance. #### Usage guidelines - Call the search API endpoint to get the `org_identifier` from the response. - Use that `org_identifier` as a parameter in this API request. + +### Example + + +```typescript +import { createBearerAuthenticationConfig, EmailCustomizationApi, DeleteOrgEmailCustomizationRequest } from '@thoughtspot/rest-api-sdk'; + +const configuration = createBearerAuthenticationConfig("CLUSTER_SERVER_URL", { + username: "YOUR_USERNAME", + password: "YOUR_PASSWORD", +}); +const apiInstance = new EmailCustomizationApi(configuration); + +apiInstance.deleteOrgEmailCustomization( + // DeleteOrgEmailCustomizationRequest + { + org_identifiers: [ + "org_identifiers_example", + ], + } +).then((data:any) => { + console.log('API called successfully. Returned data: ' + data); +}).catch((error:any) => console.error(error)); + + +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **deleteOrgEmailCustomizationRequest** | **DeleteOrgEmailCustomizationRequest**| | + + +### Return type + +**void** + +### Authorization + +[bearerAuth](README.md#bearerAuth) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**204** | Email Customization configuration successfully deleted. | - | +**400** | Invalid request. | - | +**401** | Unauthorized access. | - | +**403** | Unauthorized access. | - | +**500** | Unexpected error | - | + +[[Back to top]](#) [[Back to API list]](README.md#documentation-for-api-endpoints) [[Back to Model list]](README.md#documentation-for-models) [[Back to README]](README.md) + +# **searchEmailCustomization** +> Array searchEmailCustomization(searchEmailCustomizationRequest) + + Version: 10.10.0.cl or later Search the email customization configuration if any set for the ThoughtSpot system. #### Pre-requisites Requires `DEVELOPER` (**has developer privilege**) or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `DEVELOPER` (**Has developer privilege**) privilege is required. **NOTE**:This endpoint in currently in beta. Contact ThoughtSpot support to enable this on your instance. + +### Example + + +```typescript +import { createBearerAuthenticationConfig, EmailCustomizationApi, SearchEmailCustomizationRequest } from '@thoughtspot/rest-api-sdk'; + +const configuration = createBearerAuthenticationConfig("CLUSTER_SERVER_URL", { + username: "YOUR_USERNAME", + password: "YOUR_PASSWORD", +}); +const apiInstance = new EmailCustomizationApi(configuration); + +apiInstance.searchEmailCustomization( + // SearchEmailCustomizationRequest + { + org_identifiers: [ + "org_identifiers_example", + ], + } +).then((data:any) => { + console.log('API called successfully. Returned data: ' + data); +}).catch((error:any) => console.error(error)); + + +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **searchEmailCustomizationRequest** | **SearchEmailCustomizationRequest**| | + + +### Return type + +**Array** + +### Authorization + +[bearerAuth](README.md#bearerAuth) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**400** | Invalid request. | - | +**403** | Unauthorized access. | - | +**500** | Unexpected error | - | + +[[Back to top]](#) [[Back to API list]](README.md#documentation-for-api-endpoints) [[Back to Model list]](README.md#documentation-for-models) [[Back to README]](README.md) + +# **updateEmailCustomization** +> void updateEmailCustomization(updateEmailCustomizationRequest) + + Version: 10.12.0.cl or later Updates a customization configuration for the notification email. #### Pre-requisites Requires `DEVELOPER` (**has developer privilege**) or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `DEVELOPER` (**Has developer privilege**) privilege is required. **NOTE**:This endpoint in currently in beta. Contact ThoughtSpot support to enable this on your instance. #### Usage guidelines To update a custom configuration pass these parameters in your API request: - A JSON map of configuration attributes `template_properties`. The following example shows a sample set of customization configuration: ``` { { \"cta_button_bg_color\": \"#444DEA\", \"cta_text_font_color\": \"#FFFFFF\", \"primary_bg_color\": \"#D3DEF0\", \"logo_url\": \"https://storage.pardot.com/710713/1642089901EbkRibJq/TS_fullworkmark_darkmode.png\", \"font_family\": \"\", \"product_name\": \"ThoughtSpot\", \"footer_address\": \"444 Castro St, Suite 1000 Mountain View, CA 94041\", \"footer_phone\": \"(800) 508-7008\", \"replacement_value_for_liveboard\": \"Dashboard\", \"replacement_value_for_answer\": \"Chart\", \"replacement_value_for_spot_iq\": \"AI Insights\", \"hide_footer_phone\": false, \"hide_footer_address\": false, \"hide_product_name\": false, \"hide_manage_notification\": false, \"hide_mobile_app_nudge\": false, \"hide_privacy_policy\": false, \"hide_ts_vocabulary_definitions\": false, \"hide_error_message\": false, \"hide_unsubscribe_link\": false, \"hide_notification_status\": false, \"hide_modify_alert\": false, \"company_website_url\": \"https://your-website.com/\", \"company_privacy_policy_url\" : \"https://link-to-privacy-policy.com/\", \"contact_support_url\": \"https://link-to-contact-support.com/\", \"hide_contact_support_url\": false, \"hide_logo_url\" : false } } ``` + +### Example + + +```typescript +import { createBearerAuthenticationConfig, EmailCustomizationApi, UpdateEmailCustomizationRequest } from '@thoughtspot/rest-api-sdk'; + +const configuration = createBearerAuthenticationConfig("CLUSTER_SERVER_URL", { + username: "YOUR_USERNAME", + password: "YOUR_PASSWORD", +}); +const apiInstance = new EmailCustomizationApi(configuration); + +apiInstance.updateEmailCustomization( + // UpdateEmailCustomizationRequest + { + template_properties: null, + org_identifier: "org_identifier_example", + } +).then((data:any) => { + console.log('API called successfully. Returned data: ' + data); +}).catch((error:any) => console.error(error)); + + +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **updateEmailCustomizationRequest** | **UpdateEmailCustomizationRequest**| | + + +### Return type + +**void** + +### Authorization + +[bearerAuth](README.md#bearerAuth) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**204** | Email Customization configuration successfully updated. | - | +**400** | Invalid request. | - | +**401** | Unauthorized access. | - | +**403** | Unauthorized access. | - | +**500** | Unexpected error | - | + +[[Back to top]](#) [[Back to API list]](README.md#documentation-for-api-endpoints) [[Back to Model list]](README.md#documentation-for-models) [[Back to README]](README.md) + +# **validateEmailCustomization** +> void validateEmailCustomization() + + Version: 10.10.0.cl or later Validates the email customization configuration if any set for the ThoughtSpot system. #### Pre-requisites Requires `DEVELOPER` (**has developer privilege**) or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `DEVELOPER` (**Has developer privilege**) privilege is required. **NOTE**:This endpoint in currently in beta. Contact ThoughtSpot support to enable this on your instance. + +### Example + + +```typescript +import { createBearerAuthenticationConfig, EmailCustomizationApi, ValidateEmailCustomizationRequest } from '@thoughtspot/rest-api-sdk'; + +const configuration = createBearerAuthenticationConfig("CLUSTER_SERVER_URL", { + username: "YOUR_USERNAME", + password: "YOUR_PASSWORD", +}); +const apiInstance = new EmailCustomizationApi(configuration); + +apiInstance.validateEmailCustomization().then((data:any) => { + console.log('API called successfully. Returned data: ' + JSON.stringify(data)); +}).catch((error:any) => console.error(error)); + + +``` + + +### Parameters +This endpoint does not need any parameter. + + +### Return type + +**void** + +### Authorization + +[bearerAuth](README.md#bearerAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**204** | Triggered test email for customization configuration | - | +**400** | Invalid request. | - | +**403** | Unauthorized access. | - | +**500** | Unexpected error | - | + +[[Back to top]](#) [[Back to API list]](README.md#documentation-for-api-endpoints) [[Back to Model list]](README.md#documentation-for-models) [[Back to README]](README.md) + diff --git a/sdks/typescript/GroupsApi.md b/sdks/typescript/GroupsApi.md new file mode 100644 index 000000000..e771a9930 --- /dev/null +++ b/sdks/typescript/GroupsApi.md @@ -0,0 +1,413 @@ +# ThoughtSpotRestApiSdk.GroupsApi + +All URIs are relative to *CLUSTER_URL* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**createUserGroup**](GroupsApi.md#createUserGroup) | **POST** /api/rest/2.0/groups/create | +[**deleteUserGroup**](GroupsApi.md#deleteUserGroup) | **POST** /api/rest/2.0/groups/{group_identifier}/delete | +[**importUserGroups**](GroupsApi.md#importUserGroups) | **POST** /api/rest/2.0/groups/import | +[**searchUserGroups**](GroupsApi.md#searchUserGroups) | **POST** /api/rest/2.0/groups/search | +[**updateUserGroup**](GroupsApi.md#updateUserGroup) | **POST** /api/rest/2.0/groups/{group_identifier}/update | + + +# **createUserGroup** +> UserGroupResponse createUserGroup(createUserGroupRequest) + + Version: 9.0.0.cl or later Creates a group object in ThoughtSpot. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `GROUP_ADMINISTRATION` (**Can manage groups**) privilege is required. #### About groups Groups in ThoughtSpot are used by the administrators to define privileges and organize users based on their roles and access requirements. To know more about groups and privileges, see [ThoughtSpot Product Documentation](https://docs.thoughtspot.com/cloud/latest/groups-privileges). #### Supported operations The API endpoint lets you perform the following operations: * Assign privileges * Add users * Define sharing visibility * Add sub-groups * Assign a default Liveboard + +### Example + + +```typescript +import { createBearerAuthenticationConfig, GroupsApi, CreateUserGroupRequest } from '@thoughtspot/rest-api-sdk'; + +const configuration = createBearerAuthenticationConfig("CLUSTER_SERVER_URL", { + username: "YOUR_USERNAME", + password: "YOUR_PASSWORD", +}); +const apiInstance = new GroupsApi(configuration); + +apiInstance.createUserGroup( + // CreateUserGroupRequest + { + name: "name_example", + display_name: "display_name_example", + default_liveboard_identifiers: [ + "default_liveboard_identifiers_example", + ], + description: "description_example", + privileges: [ + "ADMINISTRATION", + ], + sub_group_identifiers: [ + "sub_group_identifiers_example", + ], + type: "LOCAL_GROUP", + user_identifiers: [ + "user_identifiers_example", + ], + visibility: "SHARABLE", + role_identifiers: [ + "role_identifiers_example", + ], + } +).then((data:any) => { + console.log('API called successfully. Returned data: ' + data); +}).catch((error:any) => console.error(error)); + + +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **createUserGroupRequest** | **CreateUserGroupRequest**| | + + +### Return type + +**UserGroupResponse** + +### Authorization + +[bearerAuth](README.md#bearerAuth) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | User group successfully created. | - | +**400** | Invalid request. | - | +**401** | Unauthorized access. | - | +**403** | Forbidden access. | - | +**500** | Unexpected error | - | + +[[Back to top]](#) [[Back to API list]](README.md#documentation-for-api-endpoints) [[Back to Model list]](README.md#documentation-for-models) [[Back to README]](README.md) + +# **deleteUserGroup** +> void deleteUserGroup() + + Version: 9.0.0.cl or later Removes the specified group object from the ThoughtSpot system. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `GROUP_ADMINISTRATION` (**Can manage groups**) privilege is required. + +### Example + + +```typescript +import { createBearerAuthenticationConfig, GroupsApi, DeleteUserGroupRequest } from '@thoughtspot/rest-api-sdk'; + +const configuration = createBearerAuthenticationConfig("CLUSTER_SERVER_URL", { + username: "YOUR_USERNAME", + password: "YOUR_PASSWORD", +}); +const apiInstance = new GroupsApi(configuration); + +apiInstance.deleteUserGroup( + // string | GUID or name of the group. + "group_identifier_example" +).then((data:any) => { + console.log('API called successfully. Returned data: ' + data); +}).catch((error:any) => console.error(error)); + + +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **groupIdentifier** | [**string**] | GUID or name of the group. | defaults to undefined + + +### Return type + +**void** + +### Authorization + +[bearerAuth](README.md#bearerAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**204** | User group successfully deleted. | - | +**400** | Invalid request. | - | +**401** | Unauthorized access. | - | +**403** | Forbidden access. | - | +**500** | Unexpected error | - | + +[[Back to top]](#) [[Back to API list]](README.md#documentation-for-api-endpoints) [[Back to Model list]](README.md#documentation-for-models) [[Back to README]](README.md) + +# **importUserGroups** +> ImportUserGroupsResponse importUserGroups(importUserGroupsRequest) + + Version: 9.0.0.cl or later Imports group objects from external databases into ThoughtSpot. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `GROUP_ADMINISTRATION` (**Can manage groups**) privilege is required. During the import operation: * If the specified group is not available in ThoughtSpot, it will be added to ThoughtSpot. * If `delete_unspecified_groups` is set to `true`, the groups not specified in the API request, excluding administrator and system user groups, are deleted. * If the specified groups are already available in ThoughtSpot, the object properties of these groups are modified and synchronized as per the input data in the API request. A successful API call returns the object that represents the changes made in the ThoughtSpot system. + +### Example + + +```typescript +import { createBearerAuthenticationConfig, GroupsApi, ImportUserGroupsRequest } from '@thoughtspot/rest-api-sdk'; + +const configuration = createBearerAuthenticationConfig("CLUSTER_SERVER_URL", { + username: "YOUR_USERNAME", + password: "YOUR_PASSWORD", +}); +const apiInstance = new GroupsApi(configuration); + +apiInstance.importUserGroups( + // ImportUserGroupsRequest + { + groups: [ + { + display_name: "display_name_example", + group_identifier: "group_identifier_example", + default_liveboard_identifiers: [ + "default_liveboard_identifiers_example", + ], + description: "description_example", + privileges: [ + "ADMINISTRATION", + ], + sub_group_identifiers: [ + "sub_group_identifiers_example", + ], + type: "LOCAL_GROUP", + user_identifiers: [ + "user_identifiers_example", + ], + visibility: "SHARABLE", + }, + ], + delete_unspecified_groups: false, + dry_run: true, + } +).then((data:any) => { + console.log('API called successfully. Returned data: ' + data); +}).catch((error:any) => console.error(error)); + + +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **importUserGroupsRequest** | **ImportUserGroupsRequest**| | + + +### Return type + +**ImportUserGroupsResponse** + +### Authorization + +[bearerAuth](README.md#bearerAuth) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Import user groups operation successful. | - | +**400** | Invalid request. | - | +**401** | Unauthorized access. | - | +**403** | Forbidden access. | - | +**500** | Unexpected error | - | + +[[Back to top]](#) [[Back to API list]](README.md#documentation-for-api-endpoints) [[Back to Model list]](README.md#documentation-for-models) [[Back to README]](README.md) + +# **searchUserGroups** +> Array searchUserGroups(searchUserGroupsRequest) + + Version: 9.0.0.cl or later Gets a list of user group objects from the ThoughtSpot system. To get details of a specific user group, specify the user group GUID or name. You can also filter the API response based on User ID, Org ID, Role ID, type of group, sharing visibility, privileges assigned to the group, and the Liveboard IDs assigned to the users in the group. Available to all users. Users with `ADMINISTRATION` (**Can administer ThoughtSpot**) privileges can view all users properties. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `GROUP_ADMINISTRATION` (**Can manage groups**) privilege is required. **NOTE**: If you do not get precise results, try setting `record_size` to `-1` and `record_offset` to `0`. + +### Example + + +```typescript +import { createBearerAuthenticationConfig, GroupsApi, SearchUserGroupsRequest } from '@thoughtspot/rest-api-sdk'; + +const configuration = createBearerAuthenticationConfig("CLUSTER_SERVER_URL", { + username: "YOUR_USERNAME", + password: "YOUR_PASSWORD", +}); +const apiInstance = new GroupsApi(configuration); + +apiInstance.searchUserGroups( + // SearchUserGroupsRequest + { + default_liveboard_identifiers: [ + "default_liveboard_identifiers_example", + ], + description: "description_example", + display_name: "display_name_example", + name_pattern: "name_pattern_example", + group_identifier: "group_identifier_example", + org_identifiers: [ + "org_identifiers_example", + ], + privileges: [ + "ADMINISTRATION", + ], + sub_group_identifiers: [ + "sub_group_identifiers_example", + ], + type: "LOCAL_GROUP", + user_identifiers: [ + "user_identifiers_example", + ], + visibility: "SHARABLE", + role_identifiers: [ + "role_identifiers_example", + ], + record_offset: 0, + record_size: 10, + sort_options: null, + include_users: true, + include_sub_groups: true, + } +).then((data:any) => { + console.log('API called successfully. Returned data: ' + data); +}).catch((error:any) => console.error(error)); + + +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **searchUserGroupsRequest** | **SearchUserGroupsRequest**| | + + +### Return type + +**Array** + +### Authorization + +[bearerAuth](README.md#bearerAuth) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | User group search result. | - | +**400** | Invalid request. | - | +**401** | Unauthorized access. | - | +**403** | Forbidden access. | - | +**500** | Unexpected error | - | + +[[Back to top]](#) [[Back to API list]](README.md#documentation-for-api-endpoints) [[Back to Model list]](README.md#documentation-for-models) [[Back to README]](README.md) + +# **updateUserGroup** +> void updateUserGroup(updateUserGroupRequest) + + Version: 9.0.0.cl or later Updates the properties of a group object in ThoughtSpot. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `GROUP_ADMINISTRATION` (**Can manage groups**) privilege is required. #### Supported operations This API endpoint lets you perform the following operations in a single API request: * Edit [privileges](https://developers.thoughtspot.com/docs/?pageid=api-user-management#group-privileges) * Add or remove users * Change sharing visibility settings * Add or remove sub-groups * Assign a default Liveboard or update the existing settings + +### Example + + +```typescript +import { createBearerAuthenticationConfig, GroupsApi, UpdateUserGroupRequest } from '@thoughtspot/rest-api-sdk'; + +const configuration = createBearerAuthenticationConfig("CLUSTER_SERVER_URL", { + username: "YOUR_USERNAME", + password: "YOUR_PASSWORD", +}); +const apiInstance = new GroupsApi(configuration); + +apiInstance.updateUserGroup( + // string | GUID or name of the group. + "group_identifier_example" , + // UpdateUserGroupRequest + { + name: "name_example", + default_liveboard_identifiers: [ + "default_liveboard_identifiers_example", + ], + description: "description_example", + display_name: "display_name_example", + privileges: [ + "ADMINISTRATION", + ], + sub_group_identifiers: [ + "sub_group_identifiers_example", + ], + type: "LOCAL_GROUP", + user_identifiers: [ + "user_identifiers_example", + ], + visibility: "SHARABLE", + role_identifiers: [ + "role_identifiers_example", + ], + operation: "REPLACE", + } +).then((data:any) => { + console.log('API called successfully. Returned data: ' + data); +}).catch((error:any) => console.error(error)); + + +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **updateUserGroupRequest** | **UpdateUserGroupRequest**| | + **groupIdentifier** | [**string**] | GUID or name of the group. | defaults to undefined + + +### Return type + +**void** + +### Authorization + +[bearerAuth](README.md#bearerAuth) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**204** | User group successfully updated. | - | +**400** | Invalid request. | - | +**401** | Unauthorized access. | - | +**403** | Forbidden access. | - | +**500** | Unexpected error | - | + +[[Back to top]](#) [[Back to API list]](README.md#documentation-for-api-endpoints) [[Back to Model list]](README.md#documentation-for-models) [[Back to README]](README.md) + diff --git a/sdks/typescript/JobsApi.md b/sdks/typescript/JobsApi.md new file mode 100644 index 000000000..1f91a1fa7 --- /dev/null +++ b/sdks/typescript/JobsApi.md @@ -0,0 +1,85 @@ +# ThoughtSpotRestApiSdk.JobsApi + +All URIs are relative to *CLUSTER_URL* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**searchChannelHistory**](JobsApi.md#searchChannelHistory) | **POST** /api/rest/2.0/jobs/history/communication-channels/search | + + +# **searchChannelHistory** +> SearchChannelHistoryResponse searchChannelHistory(searchChannelHistoryRequest) + + Version: 26.4.0.cl or later Searches delivery history for communication channels such as webhooks. Returns channel-level delivery status for each job execution record. Use this to monitor channel health and delivery success rates across events. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) or `DEVELOPER` (**Has developer privilege**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, users with `CAN_MANAGE_WEBHOOKS` (**Can manage webhooks**) privilege are also authorized to perform this action. **NOTE**: When `channel_type` is `WEBHOOK`, the following constraints apply: - `job_ids`, `channel_identifiers`, and `events` each accept at most one element. - When `job_ids` is provided, it is used as the sole lookup key and other filter fields are ignored. - When `job_ids` is not provided, `channel_identifiers` and `events` are both required, each containing exactly one element. - Records older than the configured retention period are not returned. - Use `start_epoch_time_in_millis` and/or `end_epoch_time_in_millis` to narrow results to a specific time window. + +### Example + + +```typescript +import { createBearerAuthenticationConfig, JobsApi, SearchChannelHistoryRequest } from '@thoughtspot/rest-api-sdk'; + +const configuration = createBearerAuthenticationConfig("CLUSTER_SERVER_URL", { + username: "YOUR_USERNAME", + password: "YOUR_PASSWORD", +}); +const apiInstance = new JobsApi(configuration); + +apiInstance.searchChannelHistory( + // SearchChannelHistoryRequest + { + channel_type: "WEBHOOK", + job_ids: [ + "job_ids_example", + ], + channel_identifiers: [ + "channel_identifiers_example", + ], + channel_status: "PENDING", + events: [ + { + type: "LIVEBOARD_SCHEDULE", + identifier: "identifier_example", + }, + ], + start_epoch_time_in_millis: 3.14, + } +).then((data:any) => { + console.log('API called successfully. Returned data: ' + data); +}).catch((error:any) => console.error(error)); + + +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **searchChannelHistoryRequest** | **SearchChannelHistoryRequest**| | + + +### Return type + +**SearchChannelHistoryResponse** + +### Authorization + +[bearerAuth](README.md#bearerAuth) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Channel status logs retrieved successfully. | - | +**400** | Invalid request. | - | +**401** | Unauthorized access. | - | +**403** | Forbidden access. | - | +**500** | Unexpected error | - | + +[[Back to top]](#) [[Back to API list]](README.md#documentation-for-api-endpoints) [[Back to Model list]](README.md#documentation-for-models) [[Back to README]](README.md) + diff --git a/sdks/typescript/LogApi.md b/sdks/typescript/LogApi.md new file mode 100644 index 000000000..8282d655b --- /dev/null +++ b/sdks/typescript/LogApi.md @@ -0,0 +1,74 @@ +# ThoughtSpotRestApiSdk.LogApi + +All URIs are relative to *CLUSTER_URL* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**fetchLogs**](LogApi.md#fetchLogs) | **POST** /api/rest/2.0/logs/fetch | + + +# **fetchLogs** +> Array fetchLogs(fetchLogsRequest) + + Version: 9.0.0.cl or later Fetches security audit logs. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the [Admin Control](https://developers.thoughtspot.com/docs/rbac#_admin_control) privileges are required. #### Usage guidelines By default, the API retrieves logs for the last 24 hours. You can set a custom duration in EPOCH time. Make sure the log duration specified in your API request doesn’t exceed 24 hours. If you must fetch logs for a longer time range, modify the duration and make multiple sequential API requests. Upon successful execution, the API returns logs with the following information: * timestamp of the event * event ID * event type * name and GUID of the user * IP address of ThoughtSpot instance For more information see [Audit logs Documentation](https://developers.thoughtspot.com/docs/audit-logs). + +### Example + + +```typescript +import { createBearerAuthenticationConfig, LogApi, FetchLogsRequest } from '@thoughtspot/rest-api-sdk'; + +const configuration = createBearerAuthenticationConfig("CLUSTER_SERVER_URL", { + username: "YOUR_USERNAME", + password: "YOUR_PASSWORD", +}); +const apiInstance = new LogApi(configuration); + +apiInstance.fetchLogs( + // FetchLogsRequest + { + log_type: "SECURITY_AUDIT", + start_epoch_time_in_millis: 3.14, + end_epoch_time_in_millis: 3.14, + get_all_logs: true, + } +).then((data:any) => { + console.log('API called successfully. Returned data: ' + data); +}).catch((error:any) => console.error(error)); + + +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **fetchLogsRequest** | **FetchLogsRequest**| | + + +### Return type + +**Array** + +### Authorization + +[bearerAuth](README.md#bearerAuth) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Log fetched successfully. | - | +**400** | Invalid request. | - | +**401** | Unauthorized access. | - | +**403** | Forbidden access. | - | +**500** | Unexpected error | - | + +[[Back to top]](#) [[Back to API list]](README.md#documentation-for-api-endpoints) [[Back to Model list]](README.md#documentation-for-models) [[Back to README]](README.md) + diff --git a/sdks/typescript/MetadataApi.md b/sdks/typescript/MetadataApi.md new file mode 100644 index 000000000..3fe12d76b --- /dev/null +++ b/sdks/typescript/MetadataApi.md @@ -0,0 +1,1167 @@ +# ThoughtSpotRestApiSdk.MetadataApi + +All URIs are relative to *CLUSTER_URL* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**convertWorksheetToModel**](MetadataApi.md#convertWorksheetToModel) | **POST** /api/rest/2.0/metadata/worksheets/convert | +[**copyObject**](MetadataApi.md#copyObject) | **POST** /api/rest/2.0/metadata/copyobject | +[**deleteMetadata**](MetadataApi.md#deleteMetadata) | **POST** /api/rest/2.0/metadata/delete | +[**exportMetadataTML**](MetadataApi.md#exportMetadataTML) | **POST** /api/rest/2.0/metadata/tml/export | +[**exportMetadataTMLBatched**](MetadataApi.md#exportMetadataTMLBatched) | **POST** /api/rest/2.0/metadata/tml/export/batch | +[**fetchAnswerSqlQuery**](MetadataApi.md#fetchAnswerSqlQuery) | **POST** /api/rest/2.0/metadata/answer/sql | +[**fetchAsyncImportTaskStatus**](MetadataApi.md#fetchAsyncImportTaskStatus) | **POST** /api/rest/2.0/metadata/tml/async/status | +[**fetchLiveboardSqlQuery**](MetadataApi.md#fetchLiveboardSqlQuery) | **POST** /api/rest/2.0/metadata/liveboard/sql | +[**importMetadataTML**](MetadataApi.md#importMetadataTML) | **POST** /api/rest/2.0/metadata/tml/import | +[**importMetadataTMLAsync**](MetadataApi.md#importMetadataTMLAsync) | **POST** /api/rest/2.0/metadata/tml/async/import | +[**parameterizeMetadata**](MetadataApi.md#parameterizeMetadata) | **POST** /api/rest/2.0/metadata/parameterize | +[**parameterizeMetadataFields**](MetadataApi.md#parameterizeMetadataFields) | **POST** /api/rest/2.0/metadata/parameterize-fields | +[**searchMetadata**](MetadataApi.md#searchMetadata) | **POST** /api/rest/2.0/metadata/search | +[**unparameterizeMetadata**](MetadataApi.md#unparameterizeMetadata) | **POST** /api/rest/2.0/metadata/unparameterize | +[**updateMetadataHeader**](MetadataApi.md#updateMetadataHeader) | **POST** /api/rest/2.0/metadata/headers/update | +[**updateMetadataObjId**](MetadataApi.md#updateMetadataObjId) | **POST** /api/rest/2.0/metadata/update-obj-id | + + +# **convertWorksheetToModel** +> ResponseWorksheetToModelConversion convertWorksheetToModel(convertWorksheetToModelRequest) + + Convert worksheets to models Version: 10.6.0.cl or later ## Prerequisites - **Privileges Required:** - `DATAMANAGEMENT` (Can manage data) or `ADMINISTRATION` (Can administer ThoughtSpot). - **Additional Privileges (if RBAC is enabled):** - `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` (Can manage data models). --- ## Usage Guidelines ### Parameters 1. **worksheet_ids** - **Description:** A comma-separated list of GUIDs (Globally Unique Identifiers) specifying the Worksheets to be converted. - **Usage:** - Used only when `convert_all` is set to `false`. - Leave empty or omit when `convert_all` is set to `true`. 2. **exclude_worksheet_ids** - **Description:** A comma-separated list of GUIDs specifying Worksheets to be excluded from conversion. - **Usage:** - Useful when `convert_all` is set to `true` and specific Worksheets should not be converted. 3. **convert_all** - **Description:** Sets the scope of conversion. - **Options:** - `true`: Converts all Worksheets in the system, except those specified in `exclude_worksheet_ids`. - `false`: Converts only the Worksheets listed in `worksheet_ids`. 4. **apply_changes** - **Description:** Specifies whether to apply changes directly to ThoughtSpot or to generate a preview before applying any changes.Used for validation of conversion. - **Options:** - `true`: Applies conversion changes directly to ThoughtSpot. - `false`: Generates only a preview of the changes and does not apply any changes to ThoughtSpot --- ## Best Practices 1. **Backup Before Conversion:** Always export metadata as a backup before initiating the conversion process 2. **Partial Conversion for Testing:** Test the conversion process by setting `convert_all` to `false` and specifying a small number of `worksheet_ids`. 3. **Verify Dependencies:** Check for dependent objects, such as Tables and Connections, to avoid invalid references. 4. **Review Changes:** Use `apply_changes: false` to preview the impact of the conversion before applying changes. --- ## Examples ### Convert Specific Worksheets ```json { \"worksheet_ids\": [\"guid1\", \"guid2\", \"guid3\"], \"exclude_worksheet_ids\": [], \"convert_all\": false, \"apply_changes\": true } ``` ### Convert All Accessible Worksheets ```json { \"worksheet_ids\": [], \"exclude_worksheet_ids\": [], \"convert_all\": true, \"apply_changes\": true } ``` ### Exclude Specific Worksheets While Converting All Accessible Worksheets ```json { \"worksheet_ids\": [], \"exclude_worksheet_ids\": [\"abc\"], \"convert_all\": true, \"apply_changes\": true } ``` + +### Example + + +```typescript +import { createBearerAuthenticationConfig, MetadataApi, ConvertWorksheetToModelRequest } from '@thoughtspot/rest-api-sdk'; + +const configuration = createBearerAuthenticationConfig("CLUSTER_SERVER_URL", { + username: "YOUR_USERNAME", + password: "YOUR_PASSWORD", +}); +const apiInstance = new MetadataApi(configuration); + +apiInstance.convertWorksheetToModel( + // ConvertWorksheetToModelRequest + { + worksheet_ids: [ + "worksheet_ids_example", + ], + exclude_worksheet_ids: [ + "exclude_worksheet_ids_example", + ], + convert_all: false, + apply_changes: false, + } +).then((data:any) => { + console.log('API called successfully. Returned data: ' + data); +}).catch((error:any) => console.error(error)); + + +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **convertWorksheetToModelRequest** | **ConvertWorksheetToModelRequest**| | + + +### Return type + +**ResponseWorksheetToModelConversion** + +### Authorization + +[bearerAuth](README.md#bearerAuth) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Conversion of worksheets to model done successfully. | - | +**400** | Invalid request. | - | +**401** | Unauthorized access. | - | +**403** | Forbidden access. | - | +**500** | Unexpected error | - | + +[[Back to top]](#) [[Back to API list]](README.md#documentation-for-api-endpoints) [[Back to Model list]](README.md#documentation-for-models) [[Back to README]](README.md) + +# **copyObject** +> ResponseCopyObject copyObject(copyObjectRequest) + + Makes a copy of an Answer or Liveboard Version: 10.3.0.cl or later Creates a copy of a metadata object. Requires at least view access to the metadata object being copied. Upon successful execution, the API creates a copy of the metadata object specified in the API request and returns the ID of the new object. + +### Example + + +```typescript +import { createBearerAuthenticationConfig, MetadataApi, CopyObjectRequest } from '@thoughtspot/rest-api-sdk'; + +const configuration = createBearerAuthenticationConfig("CLUSTER_SERVER_URL", { + username: "YOUR_USERNAME", + password: "YOUR_PASSWORD", +}); +const apiInstance = new MetadataApi(configuration); + +apiInstance.copyObject( + // CopyObjectRequest + { + description: "description_example", + identifier: "identifier_example", + type: "LIVEBOARD", + title: "title_example", + } +).then((data:any) => { + console.log('API called successfully. Returned data: ' + data); +}).catch((error:any) => console.error(error)); + + +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **copyObjectRequest** | **CopyObjectRequest**| | + + +### Return type + +**ResponseCopyObject** + +### Authorization + +[bearerAuth](README.md#bearerAuth) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Successfully created a copy of the object | - | +**400** | Invalid request. | - | +**401** | Unauthorized access. | - | +**403** | Forbidden access. | - | +**404** | Object not found | - | +**500** | Unexpected error | - | + +[[Back to top]](#) [[Back to API list]](README.md#documentation-for-api-endpoints) [[Back to Model list]](README.md#documentation-for-models) [[Back to README]](README.md) + +# **deleteMetadata** +> void deleteMetadata(deleteMetadataRequest) + + Version: 9.0.0.cl or later Removes the specified metadata object from the ThoughtSpot system. Requires edit access to the metadata object. + +### Example + + +```typescript +import { createBearerAuthenticationConfig, MetadataApi, DeleteMetadataRequest } from '@thoughtspot/rest-api-sdk'; + +const configuration = createBearerAuthenticationConfig("CLUSTER_SERVER_URL", { + username: "YOUR_USERNAME", + password: "YOUR_PASSWORD", +}); +const apiInstance = new MetadataApi(configuration); + +apiInstance.deleteMetadata( + // DeleteMetadataRequest + { + metadata: [ + { + type: "LIVEBOARD", + identifier: "identifier_example", + }, + ], + delete_disabled_objects: false, + } +).then((data:any) => { + console.log('API called successfully. Returned data: ' + data); +}).catch((error:any) => console.error(error)); + + +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **deleteMetadataRequest** | **DeleteMetadataRequest**| | + + +### Return type + +**void** + +### Authorization + +[bearerAuth](README.md#bearerAuth) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**204** | Metadata objects successfully deleted. | - | +**400** | Invalid request. | - | +**401** | Unauthorized access. | - | +**403** | Forbidden access. | - | +**500** | Unexpected error | - | + +[[Back to top]](#) [[Back to API list]](README.md#documentation-for-api-endpoints) [[Back to Model list]](README.md#documentation-for-models) [[Back to README]](README.md) + +# **exportMetadataTML** +> Array exportMetadataTML(exportMetadataTMLRequest) + + Version: 9.0.0.cl or later Exports the [TML](https://docs.thoughtspot.com/cloud/latest/tml) representation of metadata objects in JSON or YAML format. Requires `DATADOWNLOADING` (**Can download Data**) and at least view access to the metadata object. #### Usage guidelines * You can export one or several objects by passing metadata object GUIDs in the `metadata` array. * When exporting TML content for a Liveboard or Answer object, you can set `export_associated` to `true` to retrieve TML content for underlying Worksheets, Tables, or Views, including the GUID of each object within the headers. When `export_associated` is set to `true`, consider retrieving one metadata object at a time. * Set `export_fqns` to `true` to add FQNs of the referenced objects in the TML content. For example, if you send an API request to retrieve TML for a Liveboard and its associated objects, the API returns the TML content with FQNs of the referenced Worksheet. Exporting TML with FQNs is useful if ThoughtSpot has multiple objects with the same name and you want to eliminate ambiguity when importing TML files into ThoughtSpot. It eliminates the need for adding FQNs of the referenced objects manually during the import operation. * To export only the TML of feedbacks associated with an object, set the GUID of the object as `identifier`, and set the `type` as `FEEDBACK` in the `metadata` array. * To export the TML of an object along with the feedbacks associated with it, set the GUID of the object as `identifier`, set the `type` as `LOGIAL_TABLE` in the `metadata` array, and set `export_with_associated_feedbacks` in `export_options` to true. For more information, see [TML Documentation](https://developers.thoughtspot.com/docs/tml#_export_a_tml). For more information on feedbacks, see [Feedback Documentation](https://docs.thoughtspot.com/cloud/latest/sage-feedback). + +### Example + + +```typescript +import { createBearerAuthenticationConfig, MetadataApi, ExportMetadataTMLRequest } from '@thoughtspot/rest-api-sdk'; + +const configuration = createBearerAuthenticationConfig("CLUSTER_SERVER_URL", { + username: "YOUR_USERNAME", + password: "YOUR_PASSWORD", +}); +const apiInstance = new MetadataApi(configuration); + +apiInstance.exportMetadataTML( + // ExportMetadataTMLRequest + { + metadata: [ + { + type: "LIVEBOARD", + identifier: "identifier_example", + session_identifier: "session_identifier_example", + generation_number: 1, + }, + ], + export_associated: false, + export_fqn: false, + edoc_format: "JSON", + export_schema_version: "DEFAULT", + export_dependent: false, + export_connection_as_dependent: false, + all_orgs_override: false, + export_options: null, + } +).then((data:any) => { + console.log('API called successfully. Returned data: ' + data); +}).catch((error:any) => console.error(error)); + + +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **exportMetadataTMLRequest** | **ExportMetadataTMLRequest**| | + + +### Return type + +**Array** + +### Authorization + +[bearerAuth](README.md#bearerAuth) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Export TMLs of specified metadata objects is successful. | - | +**400** | Invalid request. | - | +**401** | Unauthorized access. | - | +**403** | Forbidden access. | - | +**500** | Unexpected error | - | + +[[Back to top]](#) [[Back to API list]](README.md#documentation-for-api-endpoints) [[Back to Model list]](README.md#documentation-for-models) [[Back to README]](README.md) + +# **exportMetadataTMLBatched** +> any exportMetadataTMLBatched(exportMetadataTMLBatchedRequest) + + Version: 10.1.0.cl or later Exports the [TML](https://docs.thoughtspot.com/cloud/latest/tml) representation of metadata objects in JSON or YAML format. ### **Permissions Required** Requires `DATAMANAGEMENT` (**Can manage data**) and `USERMANAGEMENT` (**Can manage users**) privileges. #### **Usage Guidelines** This API is only applicable for `USER`, `GROUP`, and `ROLES` metadata types. - `batch_offset` Indicates the starting position within the complete dataset from which the API should begin returning objects. Useful for paginating results efficiently. - `batch_size` Specifies the number of objects or items to retrieve in a single request. Helps control response size for better performance. - `edoc_format` Defines the format of the TML content. The exported metadata can be in JSON or YAML format. - `export_dependent` Specifies whether to include dependent metadata objects in the export. Ensures related objects are also retrieved if needed. - `all_orgs_override` Indicates whether the export operation applies across all organizations. Useful for multi-tenant environments where cross-org exports are required. + +### Example + + +```typescript +import { createBearerAuthenticationConfig, MetadataApi, ExportMetadataTMLBatchedRequest } from '@thoughtspot/rest-api-sdk'; + +const configuration = createBearerAuthenticationConfig("CLUSTER_SERVER_URL", { + username: "YOUR_USERNAME", + password: "YOUR_PASSWORD", +}); +const apiInstance = new MetadataApi(configuration); + +apiInstance.exportMetadataTMLBatched( + // ExportMetadataTMLBatchedRequest + { + metadata_type: "USER", + batch_offset: 0, + batch_size: 20, + edoc_format: "JSON", + export_dependent: false, + all_orgs_override: false, + } +).then((data:any) => { + console.log('API called successfully. Returned data: ' + data); +}).catch((error:any) => console.error(error)); + + +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **exportMetadataTMLBatchedRequest** | **ExportMetadataTMLBatchedRequest**| | + + +### Return type + +**any** + +### Authorization + +[bearerAuth](README.md#bearerAuth) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Export TMLs of specified metadata objects is successful. | - | +**400** | Invalid request. | - | +**401** | Unauthorized access. | - | +**403** | Forbidden access. | - | +**500** | Unexpected error | - | + +[[Back to top]](#) [[Back to API list]](README.md#documentation-for-api-endpoints) [[Back to Model list]](README.md#documentation-for-models) [[Back to README]](README.md) + +# **fetchAnswerSqlQuery** +> SqlQueryResponse fetchAnswerSqlQuery(fetchAnswerSqlQueryRequest) + + Version: 9.0.0.cl or later Fetches the underlying SQL query data for an Answer object. Requires at least view access to the Answer object. Upon successful execution, the API returns the SQL queries for the specified object as shown in this example: ``` { \"metadata_id\":\"8fbe44a8-46ad-4b16-8d39-184b2fada490\", \"metadata_name\":\"Total sales\", \"metadata_type\":\"ANSWER\", \"sql_queries\":[ { \"metadata_id\":\"8fbe44a8-46ad-4b16-8d39-184b2fada490\", \"metadata_name\":\"Total sales -test\", \"sql_query\":\"SELECT \\n \\\"ta_1\\\".\\\"REGION\\\" \\\"ca_1\\\", \\n \\\"ta_2\\\".\\\"PRODUCTNAME\\\" \\\"ca_2\\\", \\n \\\"ta_1\\\".\\\"STORENAME\\\" \\\"ca_3\\\", \\n CASE\\n WHEN sum(\\\"ta_3\\\".\\\"SALES\\\") IS NOT NULL THEN sum(\\\"ta_3\\\".\\\"SALES\\\")\\n ELSE 0\\n END \\\"ca_4\\\", \\n CASE\\n WHEN sum(\\\"ta_3\\\".\\\"QUANTITYPURCHASED\\\") IS NOT NULL THEN sum(\\\"ta_3\\\".\\\"QUANTITYPURCHASED\\\")\\n ELSE 0\\n END \\\"ca_5\\\"\\nFROM \\\"RETAILAPPAREL\\\".\\\"PUBLIC\\\".\\\"FACT_RETAPP_SALES\\\" \\\"ta_3\\\"\\n JOIN \\\"RETAILAPPAREL\\\".\\\"PUBLIC\\\".\\\"DIM_RETAPP_STORES\\\" \\\"ta_1\\\"\\n ON \\\"ta_3\\\".\\\"STOREID\\\" = \\\"ta_1\\\".\\\"STOREID\\\"\\n JOIN \\\"RETAILAPPAREL\\\".\\\"PUBLIC\\\".\\\"DIM_RETAPP_PRODUCTS\\\" \\\"ta_2\\\"\\n ON \\\"ta_3\\\".\\\"PRODUCTID\\\" = \\\"ta_2\\\".\\\"PRODUCTID\\\"\\nGROUP BY \\n \\\"ca_1\\\", \\n \\\"ca_2\\\", \\n \\\"ca_3\\\"\\n\" } ] } ``` + +### Example + + +```typescript +import { createBearerAuthenticationConfig, MetadataApi, FetchAnswerSqlQueryRequest } from '@thoughtspot/rest-api-sdk'; + +const configuration = createBearerAuthenticationConfig("CLUSTER_SERVER_URL", { + username: "YOUR_USERNAME", + password: "YOUR_PASSWORD", +}); +const apiInstance = new MetadataApi(configuration); + +apiInstance.fetchAnswerSqlQuery( + // FetchAnswerSqlQueryRequest + { + metadata_identifier: "metadata_identifier_example", + } +).then((data:any) => { + console.log('API called successfully. Returned data: ' + data); +}).catch((error:any) => console.error(error)); + + +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **fetchAnswerSqlQueryRequest** | **FetchAnswerSqlQueryRequest**| | + + +### Return type + +**SqlQueryResponse** + +### Authorization + +[bearerAuth](README.md#bearerAuth) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Fetching SQL query of specified metadata object is successful. | - | +**400** | Invalid request. | - | +**401** | Unauthorized access. | - | +**403** | Forbidden access. | - | +**500** | Unexpected error | - | + +[[Back to top]](#) [[Back to API list]](README.md#documentation-for-api-endpoints) [[Back to Model list]](README.md#documentation-for-models) [[Back to README]](README.md) + +# **fetchAsyncImportTaskStatus** +> GetAsyncImportStatusResponse fetchAsyncImportTaskStatus(fetchAsyncImportTaskStatusRequest) + + Version: 10.4.0.cl or later Gets information about the status of the TML async import task scheduled using the `/api/rest/2.0/metadata/tml/async/import` API call. To fetch the task details, specify the ID of the TML async import task. Requires access to the task ID. The API allows users who initiated the asynchronous TML import via `/api/rest/2.0/metadata/tml/async/import` to view the status of their tasks. Users with administration privilege can view the status of all import tasks initiated by the users in their Org. #### Usage guidelines See [TML API Documentation](https://developers.thoughtspot.com/docs/tml#_fetch_status_of_the_tml_import_task) for usage guidelines. + +### Example + + +```typescript +import { createBearerAuthenticationConfig, MetadataApi, FetchAsyncImportTaskStatusRequest } from '@thoughtspot/rest-api-sdk'; + +const configuration = createBearerAuthenticationConfig("CLUSTER_SERVER_URL", { + username: "YOUR_USERNAME", + password: "YOUR_PASSWORD", +}); +const apiInstance = new MetadataApi(configuration); + +apiInstance.fetchAsyncImportTaskStatus( + // FetchAsyncImportTaskStatusRequest + { + task_ids: [ + "task_ids_example", + ], + task_status: [ + "COMPLETED", + ], + author_identifier: "author_identifier_example", + record_offset: 0, + record_size: 5, + include_import_response: false, + } +).then((data:any) => { + console.log('API called successfully. Returned data: ' + data); +}).catch((error:any) => console.error(error)); + + +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **fetchAsyncImportTaskStatusRequest** | **FetchAsyncImportTaskStatusRequest**| | + + +### Return type + +**GetAsyncImportStatusResponse** + +### Authorization + +[bearerAuth](README.md#bearerAuth) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Async TML Import Task statuses fetched successfully. | - | +**400** | Invalid request. | - | +**401** | Unauthorized access. | - | +**403** | Forbidden access. | - | +**500** | Unexpected error | - | + +[[Back to top]](#) [[Back to API list]](README.md#documentation-for-api-endpoints) [[Back to Model list]](README.md#documentation-for-models) [[Back to README]](README.md) + +# **fetchLiveboardSqlQuery** +> SqlQueryResponse fetchLiveboardSqlQuery(fetchLiveboardSqlQueryRequest) + + Version: 9.0.0.cl or later Fetches the underlying SQL query data for a Liveboard object and its visualizations. Requires at least view access to the Liveboard object. To get SQL query data for a Liveboard, specify the GUID of the Liveboard. Optionally, you can add an array of visualization GUIDs to retrieve the SQL query data for visualizations in the Liveboard. Upon successful execution, the API returns the SQL queries for the specified object as shown in this example: ``` { \"metadata_id\": \"fa68ae91-7588-4136-bacd-d71fb12dda69\", \"metadata_name\": \"Total Sales\", \"metadata_type\": \"LIVEBOARD\", \"sql_queries\": [ { \"metadata_id\": \"b3b6d2b9-089a-490c-8e16-b144650b7843\", \"metadata_name\": \"Total quantity purchased, Total sales by region\", \"sql_query\": \"SELECT \\n \\\"ta_1\\\".\\\"REGION\\\" \\\"ca_1\\\", \\n CASE\\n WHEN sum(\\\"ta_2\\\".\\\"QUANTITYPURCHASED\\\") IS NOT NULL THEN sum(\\\"ta_2\\\".\\\"QUANTITYPURCHASED\\\")\\n ELSE 0\\n END \\\"ca_2\\\", \\n CASE\\n WHEN sum(\\\"ta_2\\\".\\\"SALES\\\") IS NOT NULL THEN sum(\\\"ta_2\\\".\\\"SALES\\\")\\n ELSE 0\\n END \\\"ca_3\\\"\\nFROM \\\"RETAILAPPAREL\\\".\\\"PUBLIC\\\".\\\"FACT_RETAPP_SALES\\\" \\\"ta_2\\\"\\n JOIN \\\"RETAILAPPAREL\\\".\\\"PUBLIC\\\".\\\"DIM_RETAPP_STORES\\\" \\\"ta_1\\\"\\n ON \\\"ta_2\\\".\\\"STOREID\\\" = \\\"ta_1\\\".\\\"STOREID\\\"\\nGROUP BY \\\"ca_1\\\"\" } ] } ``` + +### Example + + +```typescript +import { createBearerAuthenticationConfig, MetadataApi, FetchLiveboardSqlQueryRequest } from '@thoughtspot/rest-api-sdk'; + +const configuration = createBearerAuthenticationConfig("CLUSTER_SERVER_URL", { + username: "YOUR_USERNAME", + password: "YOUR_PASSWORD", +}); +const apiInstance = new MetadataApi(configuration); + +apiInstance.fetchLiveboardSqlQuery( + // FetchLiveboardSqlQueryRequest + { + metadata_identifier: "metadata_identifier_example", + visualization_identifiers: [ + "visualization_identifiers_example", + ], + } +).then((data:any) => { + console.log('API called successfully. Returned data: ' + data); +}).catch((error:any) => console.error(error)); + + +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **fetchLiveboardSqlQueryRequest** | **FetchLiveboardSqlQueryRequest**| | + + +### Return type + +**SqlQueryResponse** + +### Authorization + +[bearerAuth](README.md#bearerAuth) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Fetching SQL query of specified metadata object is successful. | - | +**400** | Invalid request. | - | +**401** | Unauthorized access. | - | +**403** | Forbidden access. | - | +**500** | Unexpected error | - | + +[[Back to top]](#) [[Back to API list]](README.md#documentation-for-api-endpoints) [[Back to Model list]](README.md#documentation-for-models) [[Back to README]](README.md) + +# **importMetadataTML** +> Array importMetadataTML(importMetadataTMLRequest) + + Version: 9.0.0.cl or later Imports [TML](https://docs.thoughtspot.com/cloud/latest/tml) files into ThoughtSpot. Requires `DATAMANAGEMENT` (**Can manage data**) or `ADMINISTRATION` (**Can administer ThoughtsSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the following Data control privileges may be required: - `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) - `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` (**Can manage data models**) #### Usage guidelines * Import all related objects in a single TML Import API call. For example, Tables that use the same Connection object and Worksheets connected to these Tables. * Include the `fqn` property to distinguish objects that have the same name. For example, if you have multiple Connections or Worksheets with the same name on ThoughtSpot and the Connection or Worksheet referenced in your TML file does not have a unique name to distinguish, it may result in invalid object references. Adding `fqn` helps ThoughtSpot differentiate a Table from another with the same name. We recommend [exporting TML with FQNs](#/http/api-endpoints/metadata/export-metadata-tml) and using these during the import operation. * You can upload multiple TML files at a time. If you import a Worksheet along with Liveboards, Answers, and other dependent objects in a single API call, the imported objects will be immediately available for use. When you import only a Worksheet object, it may take some time for the Worksheet to become available in the ThoughtSpot system. Please wait for a few minutes, and then proceed to create an Answer and Liveboard from the newly imported Worksheet. For more information, see [TML Documentation](https://developers.thoughtspot.com/docs/tml#_import_a_tml). + +### Example + + +```typescript +import { createBearerAuthenticationConfig, MetadataApi, ImportMetadataTMLRequest } from '@thoughtspot/rest-api-sdk'; + +const configuration = createBearerAuthenticationConfig("CLUSTER_SERVER_URL", { + username: "YOUR_USERNAME", + password: "YOUR_PASSWORD", +}); +const apiInstance = new MetadataApi(configuration); + +apiInstance.importMetadataTML( + // ImportMetadataTMLRequest + { + metadata_tmls: [ + "metadata_tmls_example", + ], + import_policy: "PARTIAL", + create_new: false, + all_orgs_override: false, + skip_diff_check: false, + enable_large_metadata_validation: false, + } +).then((data:any) => { + console.log('API called successfully. Returned data: ' + data); +}).catch((error:any) => console.error(error)); + + +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **importMetadataTMLRequest** | **ImportMetadataTMLRequest**| | + + +### Return type + +**Array** + +### Authorization + +[bearerAuth](README.md#bearerAuth) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Import metadata objects using specified TMLs is successful. | - | +**400** | Invalid request. | - | +**401** | Unauthorized access. | - | +**403** | Forbidden access. | - | +**500** | Unexpected error | - | + +[[Back to top]](#) [[Back to API list]](README.md#documentation-for-api-endpoints) [[Back to Model list]](README.md#documentation-for-models) [[Back to README]](README.md) + +# **importMetadataTMLAsync** +> ImportEPackAsyncTaskStatus importMetadataTMLAsync(importMetadataTMLAsyncRequest) + + Version: 10.4.0.cl or later Schedules a task to import [TML](https://docs.thoughtspot.com/cloud/latest/tml) files into ThoughtSpot. You can use this API endpoint to process TML objects asynchronously when importing TMLs of large and complex metadata objects into ThoughtSpot. Unlike the synchronous import TML operation, the API processes TML data in the background and returns a task ID, which can be used to check the status of the import task via `/api/rest/2.0/metadata/tml/async/status` API endpoint. Requires `DATAMANAGEMENT` (**Can manage data**) or `ADMINISTRATION` (**Can administer ThoughtsSpot**) privilege, and edit access to the TML objects. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the following Data control privileges may be required: - `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) - `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` (**Can manage data models**) #### Usage guidelines See [Async TML API Documentation](https://developers.thoughtspot.com/docs/tml#_import_tml_objects_asynchronously) for usage guidelines. + +### Example + + +```typescript +import { createBearerAuthenticationConfig, MetadataApi, ImportMetadataTMLAsyncRequest } from '@thoughtspot/rest-api-sdk'; + +const configuration = createBearerAuthenticationConfig("CLUSTER_SERVER_URL", { + username: "YOUR_USERNAME", + password: "YOUR_PASSWORD", +}); +const apiInstance = new MetadataApi(configuration); + +apiInstance.importMetadataTMLAsync( + // ImportMetadataTMLAsyncRequest + { + metadata_tmls: [ + "metadata_tmls_example", + ], + create_new: false, + all_orgs_override: false, + import_policy: "PARTIAL_OBJECT", + skip_diff_check: false, + enable_large_metadata_validation: false, + } +).then((data:any) => { + console.log('API called successfully. Returned data: ' + data); +}).catch((error:any) => console.error(error)); + + +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **importMetadataTMLAsyncRequest** | **ImportMetadataTMLAsyncRequest**| | + + +### Return type + +**ImportEPackAsyncTaskStatus** + +### Authorization + +[bearerAuth](README.md#bearerAuth) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Async TML Import Task submitted successfully. | - | +**400** | Invalid request. | - | +**401** | Unauthorized access. | - | +**403** | Forbidden access. | - | +**500** | Unexpected error | - | + +[[Back to top]](#) [[Back to API list]](README.md#documentation-for-api-endpoints) [[Back to Model list]](README.md#documentation-for-models) [[Back to README]](README.md) + +# **parameterizeMetadata** +> void parameterizeMetadata(parameterizeMetadataRequest) + + Parameterize fields in metadata objects. Version: 10.9.0.cl or later **Note:** This API endpoint is deprecated and will be removed from ThoughtSpot in a future release. Use [POST /api/rest/2.0/metadata/parameterize-fields](/api/rest/2.0/metadata/parameterize-fields) instead. Allows parameterizing fields in metadata objects in ThoughtSpot. Requires appropriate permissions to modify the metadata object. The API endpoint allows parameterizing the following types of metadata objects: * Logical Tables * Connections * Connection Configs For a Logical Table the field type must be `ATTRIBUTE` and field name can be one of: * databaseName * schemaName * tableName For a Connection or Connection Config, the field type is always `CONNECTION_PROPERTY`. In this case, field_name specifies the exact property of the Connection or Connection Config that needs to be parameterized. For Connection Config, the only supported field name is: * impersonate_user + +### Example + + +```typescript +import { createBearerAuthenticationConfig, MetadataApi, ParameterizeMetadataRequest } from '@thoughtspot/rest-api-sdk'; + +const configuration = createBearerAuthenticationConfig("CLUSTER_SERVER_URL", { + username: "YOUR_USERNAME", + password: "YOUR_PASSWORD", +}); +const apiInstance = new MetadataApi(configuration); + +apiInstance.parameterizeMetadata( + // ParameterizeMetadataRequest + { + metadata_type: "LOGICAL_TABLE", + metadata_identifier: "metadata_identifier_example", + field_type: "ATTRIBUTE", + field_name: "field_name_example", + variable_identifier: "variable_identifier_example", + } +).then((data:any) => { + console.log('API called successfully. Returned data: ' + data); +}).catch((error:any) => console.error(error)); + + +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **parameterizeMetadataRequest** | **ParameterizeMetadataRequest**| | + + +### Return type + +**void** + +### Authorization + +[bearerAuth](README.md#bearerAuth) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**204** | Parameterize successful. | - | +**400** | Invalid request. | - | +**401** | Unauthorized access. | - | +**403** | Forbidden access. | - | +**500** | Unexpected error | - | + +[[Back to top]](#) [[Back to API list]](README.md#documentation-for-api-endpoints) [[Back to Model list]](README.md#documentation-for-models) [[Back to README]](README.md) + +# **parameterizeMetadataFields** +> void parameterizeMetadataFields(parameterizeMetadataFieldsRequest) + + Parameterize multiple fields of metadata objects. For example [schemaName, databaseName] for LOGICAL_TABLE. Version: 26.5.0.cl or later Allows parameterizing multiple fields of metadata objects in ThoughtSpot. For example, you can parameterize [schemaName, databaseName] for LOGICAL_TABLE. Requires appropriate permissions to modify the metadata object. The API endpoint allows parameterizing the following types of metadata objects: * Logical Tables * Connections * Connection Configs For a Logical Table, the field type must be `ATTRIBUTE` and field names can include: * databaseName * schemaName * tableName For a Connection or Connection Config, the field type is always `CONNECTION_PROPERTY`. In this case, field_names specifies the exact properties of the Connection or Connection Config that need to be parameterized. For Connection Config, supported field names include: * impersonate_user You can parameterize multiple fields at once by providing an array of field names. + +### Example + + +```typescript +import { createBearerAuthenticationConfig, MetadataApi, ParameterizeMetadataFieldsRequest } from '@thoughtspot/rest-api-sdk'; + +const configuration = createBearerAuthenticationConfig("CLUSTER_SERVER_URL", { + username: "YOUR_USERNAME", + password: "YOUR_PASSWORD", +}); +const apiInstance = new MetadataApi(configuration); + +apiInstance.parameterizeMetadataFields( + // ParameterizeMetadataFieldsRequest + { + metadata_type: "LOGICAL_TABLE", + metadata_identifier: "metadata_identifier_example", + field_type: "ATTRIBUTE", + field_names: [ + "field_names_example", + ], + variable_identifier: "variable_identifier_example", + } +).then((data:any) => { + console.log('API called successfully. Returned data: ' + data); +}).catch((error:any) => console.error(error)); + + +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **parameterizeMetadataFieldsRequest** | **ParameterizeMetadataFieldsRequest**| | + + +### Return type + +**void** + +### Authorization + +[bearerAuth](README.md#bearerAuth) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**204** | Parameterize successful. | - | +**400** | Invalid request. | - | +**401** | Unauthorized access. | - | +**403** | Forbidden access. | - | +**500** | Unexpected error | - | + +[[Back to top]](#) [[Back to API list]](README.md#documentation-for-api-endpoints) [[Back to Model list]](README.md#documentation-for-models) [[Back to README]](README.md) + +# **searchMetadata** +> Array searchMetadata(searchMetadataRequest) + + Version: 9.0.0.cl or later Gets a list of metadata objects available on the ThoughtSpot system. This API endpoint is available to all users who have view access to the object. Users with `ADMINISTRATION` (**Can administer ThoughtSpot**) privileges can view data for all metadata objects, including users and groups. #### Usage guidelines - To get all metadata objects, send the API request without any attributes. - To get metadata objects of a specific type, set the `type` attribute. For example, to fetch a Worksheet, set the type as `LOGICAL_TABLE`. - To filter metadata objects within type `LOGICAL_TABLE`, set the `subtypes` attribute. For example, to fetch a Worksheet, set the type as `LOGICAL_TABLE` & subtypes as `[WORKSHEET]`. - To get a specific metadata object, specify the GUID. - To customize your search and filter the API response, you can use several parameters. You can search for objects created or modified by specific users, by tags applied to the objects, or by using the include parameters like `include_auto_created_objects`, `include_dependent_objects`, `include_headers`, `include_incomplete_objects`, and so on. You can also define sorting options to sort the data retrieved in the API response. - To get discoverable objects when linientmodel is enabled you can use `include_discoverable_objects` as true else false. Default value is true. - For liveboard metadata type, to get the newer format, set the `liveboard_response_format` as V2. Default value is V1. - To retrieve only objects that are published, set the `include_only_published_objects` as true. Default value is false. **NOTE**: The following parameters support pagination of metadata records: - `tag_identifiers` - `type` - `subtypes` - `created_by_user_identifiers` - `modified_by_user_identifiers` - `owned_by_user_identifiers` - `exclude_objects` - `include_auto_created_objects` - `favorite_object_options` - `include_only_published_objects` If you are using other parameters to search metadata, set `record_size` to `-1` and `record_offset` to `0`. + +### Example + + +```typescript +import { createBearerAuthenticationConfig, MetadataApi, SearchMetadataRequest } from '@thoughtspot/rest-api-sdk'; + +const configuration = createBearerAuthenticationConfig("CLUSTER_SERVER_URL", { + username: "YOUR_USERNAME", + password: "YOUR_PASSWORD", +}); +const apiInstance = new MetadataApi(configuration); + +apiInstance.searchMetadata( + // SearchMetadataRequest + { + metadata: [ + { + identifier: "identifier_example", + obj_identifier: "obj_identifier_example", + name_pattern: "name_pattern_example", + type: "LIVEBOARD", + subtypes: [ + "ONE_TO_ONE_LOGICAL", + ], + }, + ], + permissions: [ + { + principal: { + identifier: "identifier_example", + type: "USER", + }, + share_mode: "READ_ONLY", + }, + ], + created_by_user_identifiers: [ + "created_by_user_identifiers_example", + ], + dependent_object_version: "V1", + exclude_objects: [ + { + identifier: "identifier_example", + type: "LIVEBOARD", + }, + ], + favorite_object_options: null, + include_auto_created_objects: false, + include_dependent_objects: false, + dependent_objects_record_size: 50, + include_details: false, + include_personalised_views: false, + include_headers: true, + include_hidden_objects: false, + include_incomplete_objects: false, + include_visualization_headers: false, + include_worksheet_search_assist_data: true, + modified_by_user_identifiers: [ + "modified_by_user_identifiers_example", + ], + record_offset: 0, + record_size: 10, + sort_options: null, + tag_identifiers: [ + "tag_identifiers_example", + ], + include_stats: false, + include_discoverable_objects: true, + show_resolved_parameters: false, + liveboard_response_version: "V1", + include_only_published_objects: false, + } +).then((data:any) => { + console.log('API called successfully. Returned data: ' + data); +}).catch((error:any) => console.error(error)); + + +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **searchMetadataRequest** | **SearchMetadataRequest**| | + + +### Return type + +**Array** + +### Authorization + +[bearerAuth](README.md#bearerAuth) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Metadata objects search result. | - | +**400** | Invalid request. | - | +**401** | Unauthorized access. | - | +**403** | Forbidden access. | - | +**500** | Unexpected error | - | + +[[Back to top]](#) [[Back to API list]](README.md#documentation-for-api-endpoints) [[Back to Model list]](README.md#documentation-for-models) [[Back to README]](README.md) + +# **unparameterizeMetadata** +> void unparameterizeMetadata(unparameterizeMetadataRequest) + + Remove parameterization from fields in metadata objects. Version: 26.5.0.cl or later Allows removing parameterization from fields in metadata objects in ThoughtSpot. Requires appropriate permissions to modify the metadata object. The API endpoint allows unparameterizing the following types of metadata objects: * Logical Tables * Connections * Connection Configs For a Logical Table the field type must be `ATTRIBUTE` and field name can be one of: * databaseName * schemaName * tableName For a Connection or Connection Config, the field type is always `CONNECTION_PROPERTY`. In this case, field_name specifies the exact property of the Connection or Connection Config that needs to be unparameterized. For Connection Config, the only supported field name is: * impersonate_user + +### Example + + +```typescript +import { createBearerAuthenticationConfig, MetadataApi, UnparameterizeMetadataRequest } from '@thoughtspot/rest-api-sdk'; + +const configuration = createBearerAuthenticationConfig("CLUSTER_SERVER_URL", { + username: "YOUR_USERNAME", + password: "YOUR_PASSWORD", +}); +const apiInstance = new MetadataApi(configuration); + +apiInstance.unparameterizeMetadata( + // UnparameterizeMetadataRequest + { + metadata_type: "LOGICAL_TABLE", + metadata_identifier: "metadata_identifier_example", + field_type: "ATTRIBUTE", + field_name: "field_name_example", + value: "value_example", + } +).then((data:any) => { + console.log('API called successfully. Returned data: ' + data); +}).catch((error:any) => console.error(error)); + + +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **unparameterizeMetadataRequest** | **UnparameterizeMetadataRequest**| | + + +### Return type + +**void** + +### Authorization + +[bearerAuth](README.md#bearerAuth) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**204** | Successfuly removed parameters. | - | +**400** | Invalid request. | - | +**401** | Unauthorized access. | - | +**403** | Forbidden access. | - | +**500** | Unexpected error | - | + +[[Back to top]](#) [[Back to API list]](README.md#documentation-for-api-endpoints) [[Back to Model list]](README.md#documentation-for-models) [[Back to README]](README.md) + +# **updateMetadataHeader** +> void updateMetadataHeader(updateMetadataHeaderRequest) + + Update header attributes for a given list of header objects. Version: 10.6.0.cl or later ## Prerequisites - **Privileges Required:** - `DATAMANAGEMENT` (Can manage data) or `ADMINISTRATION` (Can administer ThoughtSpot). - **Additional Privileges (if RBAC is enabled):** - `ORG_ADMINISTRATION` (Can manage orgs). --- ## Usage Guidelines ### Parameters 1. **headers_update** - **Description:** List of header objects with their attributes to be updated. Each object contains a list of attributes to be updated in the header. - **Usage:** - You must provide either `identifier` or `obj_identifier`, but not both. Both fields cannot be empty. - When `org_identifier` is set to `-1`, only the `identifier` value is accepted; `obj_identifier` is not allowed. 2. **org_identifier** - **Description:** GUID (Globally Unique Identifier) or name of the organization. - **Usage:** - Leaving this field empty assumes that the changes should be applied to the current organization - Provide `org_guid` or `org_name` to uniquely identify the organization where changes need to be applied. . - Provide `-1` if changes have to be applied across all the org. --- ## Note Currently, this API is enabled only for updating the `obj_identifier` attribute. Only `text` will be allowed in attribute\'s value. ## Best Practices 1. **Backup Before Conversion:** Always export metadata as a backup before initiating the update process --- ## Examples ### Only `identifier` is given ```json { \"headers_update\": [ { \"identifier\": \"guid_1\", \"obj_identifier\": \"\", \"type\": \"LOGICAL_COLUMN\", \"attributes\": [ { \"name\": \"obj_id\", \"value\": \"custom_object_id\" } ] } ], \"org_identifier\": \"orgGuid\" } ``` ### Only `obj_identifier` is given ```json { \"headers_update\": [ { \"obj_identifier\": \"custom_object_id\", \"type\": \"ANSWER\", \"attributes\": [ { \"name\": \"obj_id\", \"value\": \"custom_object_id\" } ] } ], \"org_identifier\": \"orgName\" } ``` ### Executing update for all org `-1` ```json { \"headers_update\": [ { \"identifier\": \"guid_1\", \"type\": \"ANSWER\", \"attributes\": [ { \"name\": \"obj_id\", \"value\": \"custom_object_id\" } ] } ], \"org_identifier\": -1 } ``` ### Optional `type` is not provided ```json { \"headers_update\": [ { \"identifier\": \"guid_1\", \"attributes\": [ { \"name\": \"obj_id\", \"value\": \"custom_object_id\" } ] } ], \"org_identifier\": -1 } ``` + +### Example + + +```typescript +import { createBearerAuthenticationConfig, MetadataApi, UpdateMetadataHeaderRequest } from '@thoughtspot/rest-api-sdk'; + +const configuration = createBearerAuthenticationConfig("CLUSTER_SERVER_URL", { + username: "YOUR_USERNAME", + password: "YOUR_PASSWORD", +}); +const apiInstance = new MetadataApi(configuration); + +apiInstance.updateMetadataHeader( + // UpdateMetadataHeaderRequest + { + headers_update: [ + { + identifier: "identifier_example", + obj_identifier: "obj_identifier_example", + type: "ANSWER", + attributes: [ + { + name: "name_example", + value: "value_example", + }, + ], + }, + ], + org_identifier: "org_identifier_example", + } +).then((data:any) => { + console.log('API called successfully. Returned data: ' + data); +}).catch((error:any) => console.error(error)); + + +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **updateMetadataHeaderRequest** | **UpdateMetadataHeaderRequest**| | + + +### Return type + +**void** + +### Authorization + +[bearerAuth](README.md#bearerAuth) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**204** | Headers update was successful. | - | +**400** | Invalid request. | - | +**401** | Unauthorized access. | - | +**403** | Forbidden access. | - | +**500** | Unexpected error | - | + +[[Back to top]](#) [[Back to API list]](README.md#documentation-for-api-endpoints) [[Back to Model list]](README.md#documentation-for-models) [[Back to README]](README.md) + +# **updateMetadataObjId** +> void updateMetadataObjId(updateMetadataObjIdRequest) + + Update object IDs for given metadata objects. Version: 10.8.0.cl or later ## Prerequisites - **Privileges Required:** - `DATAMANAGEMENT` (Can manage data) or `ADMINISTRATION` (Can administer ThoughtSpot). - **Additional Privileges (if RBAC is enabled):** - `ORG_ADMINISTRATION` (Can manage orgs). --- ## Usage Guidelines ### Parameters 1. **metadata** - **Description:** List of metadata objects to update their object IDs. - **Usage:** - Use either `current_obj_id` alone OR use `metadata_identifier` with `type` (when needed). - When using `metadata_identifier`, the `type` field is required if using a name instead of a GUID. - The `new_obj_id` field is always required. --- ## Note This API is specifically designed for updating object IDs of metadata objects. It internally uses the header update mechanism to perform the changes. ## Best Practices 1. **Backup Before Update:** Always export metadata as a backup before initiating the update process. 2. **Validation:** - When using `current_obj_id`, ensure it matches the existing object ID exactly. - When using `metadata_identifier` with a name, ensure the `type` is specified correctly. - Verify that the `new_obj_id` follows your naming conventions and is unique within your system. --- ## Examples ### Using current_obj_id ```json { \"metadata\": [ { \"current_obj_id\": \"existing_object_id\", \"new_obj_id\": \"new_object_id\" } ] } ``` ### Using metadata_identifier with GUID ```json { \"metadata\": [ { \"metadata_identifier\": \"01234567-89ab-cdef-0123-456789abcdef\", \"new_obj_id\": \"new_object_id\" } ] } ``` ### Using metadata_identifier with name and type ```json { \"metadata\": [ { \"metadata_identifier\": \"My Answer\", \"type\": \"ANSWER\", \"new_obj_id\": \"new_object_id\" } ] } ``` ### Multiple objects update ```json { \"metadata\": [ { \"current_obj_id\": \"existing_object_id_1\", \"new_obj_id\": \"new_object_id_1\" }, { \"metadata_identifier\": \"My Worksheet\", \"type\": \"LOGICAL_TABLE\", \"new_obj_id\": \"new_object_id_2\" } ] } ``` + +### Example + + +```typescript +import { createBearerAuthenticationConfig, MetadataApi, UpdateMetadataObjIdRequest } from '@thoughtspot/rest-api-sdk'; + +const configuration = createBearerAuthenticationConfig("CLUSTER_SERVER_URL", { + username: "YOUR_USERNAME", + password: "YOUR_PASSWORD", +}); +const apiInstance = new MetadataApi(configuration); + +apiInstance.updateMetadataObjId( + // UpdateMetadataObjIdRequest + { + metadata: [ + { + metadata_identifier: "metadata_identifier_example", + type: "ANSWER", + current_obj_id: "current_obj_id_example", + new_obj_id: "new_obj_id_example", + }, + ], + } +).then((data:any) => { + console.log('API called successfully. Returned data: ' + data); +}).catch((error:any) => console.error(error)); + + +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **updateMetadataObjIdRequest** | **UpdateMetadataObjIdRequest**| | + + +### Return type + +**void** + +### Authorization + +[bearerAuth](README.md#bearerAuth) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**204** | Headers update was successful. | - | +**400** | Invalid request. | - | +**401** | Unauthorized access. | - | +**403** | Forbidden access. | - | +**500** | Unexpected error | - | + +[[Back to top]](#) [[Back to API list]](README.md#documentation-for-api-endpoints) [[Back to Model list]](README.md#documentation-for-models) [[Back to README]](README.md) + diff --git a/sdks/typescript/OrgsApi.md b/sdks/typescript/OrgsApi.md new file mode 100644 index 000000000..c45b83d73 --- /dev/null +++ b/sdks/typescript/OrgsApi.md @@ -0,0 +1,276 @@ +# ThoughtSpotRestApiSdk.OrgsApi + +All URIs are relative to *CLUSTER_URL* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**createOrg**](OrgsApi.md#createOrg) | **POST** /api/rest/2.0/orgs/create | +[**deleteOrg**](OrgsApi.md#deleteOrg) | **POST** /api/rest/2.0/orgs/{org_identifier}/delete | +[**searchOrgs**](OrgsApi.md#searchOrgs) | **POST** /api/rest/2.0/orgs/search | +[**updateOrg**](OrgsApi.md#updateOrg) | **POST** /api/rest/2.0/orgs/{org_identifier}/update | + + +# **createOrg** +> OrgResponse createOrg(createOrgRequest) + + Version: 9.0.0.cl or later Creates an Org object. To use this API, the [Orgs](https://docs.thoughtspot.com/cloud/latest/orgs-overview) feature must be enabled in your cluster. Requires cluster administration (**Can administer Org**) privileges. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `ORG_ADMINISTRATION` (**Can manage Orgs**) privilege is required. + +### Example + + +```typescript +import { createBearerAuthenticationConfig, OrgsApi, CreateOrgRequest } from '@thoughtspot/rest-api-sdk'; + +const configuration = createBearerAuthenticationConfig("CLUSTER_SERVER_URL", { + username: "YOUR_USERNAME", + password: "YOUR_PASSWORD", +}); +const apiInstance = new OrgsApi(configuration); + +apiInstance.createOrg( + // CreateOrgRequest + { + name: "name_example", + description: "description_example", + } +).then((data:any) => { + console.log('API called successfully. Returned data: ' + data); +}).catch((error:any) => console.error(error)); + + +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **createOrgRequest** | **CreateOrgRequest**| | + + +### Return type + +**OrgResponse** + +### Authorization + +[bearerAuth](README.md#bearerAuth) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Organization successfully created. | - | +**400** | Invalid request. | - | +**401** | Unauthorized access. | - | +**403** | Forbidden access. | - | +**500** | Unexpected error | - | + +[[Back to top]](#) [[Back to API list]](README.md#documentation-for-api-endpoints) [[Back to Model list]](README.md#documentation-for-models) [[Back to README]](README.md) + +# **deleteOrg** +> void deleteOrg() + + Version: 9.0.0.cl or later Deletes an Org object from the ThoughtSpot system. Requires cluster administration (**Can administer Org**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `ORG_ADMINISTRATION` (**Can manage Orgs**) privilege is required. When you delete an Org, all its users and objects created in that Org context are removed. However, if the users in the deleted Org also exists in other Orgs, they are removed only from the deleted Org. + +### Example + + +```typescript +import { createBearerAuthenticationConfig, OrgsApi, DeleteOrgRequest } from '@thoughtspot/rest-api-sdk'; + +const configuration = createBearerAuthenticationConfig("CLUSTER_SERVER_URL", { + username: "YOUR_USERNAME", + password: "YOUR_PASSWORD", +}); +const apiInstance = new OrgsApi(configuration); + +apiInstance.deleteOrg( + // string | ID or name of the Org + "org_identifier_example" +).then((data:any) => { + console.log('API called successfully. Returned data: ' + data); +}).catch((error:any) => console.error(error)); + + +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **orgIdentifier** | [**string**] | ID or name of the Org | defaults to undefined + + +### Return type + +**void** + +### Authorization + +[bearerAuth](README.md#bearerAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**204** | Organization successfully deleted. | - | +**400** | Invalid request. | - | +**401** | Unauthorized access. | - | +**403** | Forbidden access. | - | +**500** | Unexpected error | - | + +[[Back to top]](#) [[Back to API list]](README.md#documentation-for-api-endpoints) [[Back to Model list]](README.md#documentation-for-models) [[Back to README]](README.md) + +# **searchOrgs** +> Array searchOrgs(searchOrgsRequest) + + Version: 9.0.0.cl or later Gets a list of Orgs configured on the ThoughtSpot system. To get details of a specific Org, specify the Org ID or name. You can also pass parameters such as status, visibility, and user identifiers to get a specific list of Orgs. Requires cluster administration (**Can administer Org**) privileges. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `ORG_ADMINISTRATION` (**Can manage Orgs**) privilege is required. + +### Example + + +```typescript +import { createBearerAuthenticationConfig, OrgsApi, SearchOrgsRequest } from '@thoughtspot/rest-api-sdk'; + +const configuration = createBearerAuthenticationConfig("CLUSTER_SERVER_URL", { + username: "YOUR_USERNAME", + password: "YOUR_PASSWORD", +}); +const apiInstance = new OrgsApi(configuration); + +apiInstance.searchOrgs( + // SearchOrgsRequest + { + org_identifier: "org_identifier_example", + description: "description_example", + visibility: "SHOW", + status: "ACTIVE", + user_identifiers: [ + "user_identifiers_example", + ], + } +).then((data:any) => { + console.log('API called successfully. Returned data: ' + data); +}).catch((error:any) => console.error(error)); + + +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **searchOrgsRequest** | **SearchOrgsRequest**| | + + +### Return type + +**Array** + +### Authorization + +[bearerAuth](README.md#bearerAuth) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Organization search result. | - | +**400** | Invalid request. | - | +**401** | Unauthorized access. | - | +**403** | Forbidden access. | - | +**500** | Unexpected error | - | + +[[Back to top]](#) [[Back to API list]](README.md#documentation-for-api-endpoints) [[Back to Model list]](README.md#documentation-for-models) [[Back to README]](README.md) + +# **updateOrg** +> void updateOrg(updateOrgRequest) + + Version: 9.0.0.cl or later Updates an Org object. You can modify Org properties such as name, description, and user associations. Requires cluster administration (**Can administer Org**) privileges. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `ORG_ADMINISTRATION` (**Can manage Orgs**) privilege is required. + +### Example + + +```typescript +import { createBearerAuthenticationConfig, OrgsApi, UpdateOrgRequest } from '@thoughtspot/rest-api-sdk'; + +const configuration = createBearerAuthenticationConfig("CLUSTER_SERVER_URL", { + username: "YOUR_USERNAME", + password: "YOUR_PASSWORD", +}); +const apiInstance = new OrgsApi(configuration); + +apiInstance.updateOrg( + // string | ID or name of the Org + "org_identifier_example" , + // UpdateOrgRequest + { + name: "name_example", + description: "description_example", + user_identifiers: [ + "user_identifiers_example", + ], + group_identifiers: [ + "group_identifiers_example", + ], + operation: "ADD", + } +).then((data:any) => { + console.log('API called successfully. Returned data: ' + data); +}).catch((error:any) => console.error(error)); + + +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **updateOrgRequest** | **UpdateOrgRequest**| | + **orgIdentifier** | [**string**] | ID or name of the Org | defaults to undefined + + +### Return type + +**void** + +### Authorization + +[bearerAuth](README.md#bearerAuth) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**204** | Organization successfully updated. | - | +**400** | Invalid request. | - | +**401** | Unauthorized access. | - | +**403** | Forbidden access. | - | +**500** | Unexpected error | - | + +[[Back to top]](#) [[Back to API list]](README.md#documentation-for-api-endpoints) [[Back to Model list]](README.md#documentation-for-models) [[Back to README]](README.md) + diff --git a/sdks/typescript/README.md b/sdks/typescript/README.md new file mode 100644 index 000000000..927dddd39 --- /dev/null +++ b/sdks/typescript/README.md @@ -0,0 +1,62 @@ +## @thoughtspot/rest-api-sdk@2.25.0 + +TypeScript/JavaScript client for ThoughtSpot's v2 [Rest APIs](https://developers.thoughtspot.com/docs/rest-api-v2). + +### Consuming + +Navigate to the folder of your consuming project and run the following command. + +``` +npm install @thoughtspot/rest-api-sdk --save +``` + +### Usage + +Below code snippet shows how to create a simple config and use it to +call the getUsers and getUserGroups apis. + +``` +import { + ThoughtSpotRestApi, + createBearerAuthenticationConfig +} from "@thoughtspot/rest-api-sdk"; + +const BASE_URL = "CLUSTER_URL"; + +const main = async () => { + // getting the token + const config = createBearerAuthenticationConfig(BASE_URL, { + username: "YOUR_USERNAME", + password: "YOUR_PASSWORD", + }); + + // create a thoughtspot client + const tsRestApiClient = new ThoughtSpotRestApi(config); + + try { + const users = await tsRestApiClient.searchUsers(); + console.log("Users on the cluster : "); + users.forEach((user) => { + console.log(user.name, user.email); + }); + } catch (e) { + console.log(e); + } +}; + +main(); +``` + +--- + +**NOTE:** For self certified ssl certificates, use the following config: + +``` +process.env.NODE_TLS_REJECT_UNAUTHORIZED = "0" +``` + +--- + +## Live Playground + +We recommend that you browse through the [code playground](https://try-everywhere.thoughtspot.cloud/v2/#/everywhere/api/rest/playgroundV2_0) before you start constructing your API requests. The playground offers an interactive portal with comprehensive information about the API endpoints, request and response workflows. diff --git a/sdks/typescript/ReportsApi.md b/sdks/typescript/ReportsApi.md new file mode 100644 index 000000000..57ef7e60a --- /dev/null +++ b/sdks/typescript/ReportsApi.md @@ -0,0 +1,160 @@ +# ThoughtSpotRestApiSdk.ReportsApi + +All URIs are relative to *CLUSTER_URL* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**exportAnswerReport**](ReportsApi.md#exportAnswerReport) | **POST** /api/rest/2.0/report/answer | +[**exportLiveboardReport**](ReportsApi.md#exportLiveboardReport) | **POST** /api/rest/2.0/report/liveboard | + + +# **exportAnswerReport** +> HttpFile exportAnswerReport(exportAnswerReportRequest) + + Version: 9.0.0.cl or later Exports an Answer in the given file format. You can download the Answer data as a PDF, PNG, CSV, or XLSX file. Requires at least view access to the Answer. #### Usage guidelines In the request body, specify the GUID or name of the Answer and set `file_format`. The default file format is CSV. Use the `type` parameter to specify whether the Answer being exported is a saved Answer (`SAVED`) or a pinned Answer on a Liveboard (`PINNED`). Defaults to `SAVED`. When using `PINNED`, the `metadata_identifier` must be the container id. **NOTE**: * The downloadable file returned in API response file is extensionless. Please rename the downloaded file by typing in the relevant extension. * HTML rendering is not supported for PDF exports of Answers with tables. Optionally, you can define [runtime overrides](https://developers.thoughtspot.com/docs/fetch-data-and-report-apis#_runtime_overrides) to apply to the Answer data. + +### Example + + +```typescript +import { createBearerAuthenticationConfig, ReportsApi, ExportAnswerReportRequest } from '@thoughtspot/rest-api-sdk'; + +const configuration = createBearerAuthenticationConfig("CLUSTER_SERVER_URL", { + username: "YOUR_USERNAME", + password: "YOUR_PASSWORD", +}); +const apiInstance = new ReportsApi(configuration); + +apiInstance.exportAnswerReport( + // ExportAnswerReportRequest + { + metadata_identifier: "metadata_identifier_example", + session_identifier: "session_identifier_example", + generation_number: 1, + file_format: "CSV", + runtime_filter: {}, + runtime_sort: {}, + runtime_param_override: {}, + regional_settings: null, + png_options: null, + personalised_view_identifier: "personalised_view_identifier_example", + type: "SAVED", + } +).then((data:any) => { + console.log('API called successfully. Returned data: ' + data); +}).catch((error:any) => console.error(error)); + + +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **exportAnswerReportRequest** | **ExportAnswerReportRequest**| | + + +### Return type + +**HttpFile** + +### Authorization + +[bearerAuth](README.md#bearerAuth) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/octet-stream, application/json + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Export report file of specified metadata object is successful. | - | +**400** | Invalid request. | - | +**401** | Unauthorized access. | - | +**403** | Forbidden access. | - | +**500** | Unexpected error | - | + +[[Back to top]](#) [[Back to API list]](README.md#documentation-for-api-endpoints) [[Back to Model list]](README.md#documentation-for-models) [[Back to README]](README.md) + +# **exportLiveboardReport** +> HttpFile exportLiveboardReport(exportLiveboardReportRequest) + + Version: 9.0.0.cl or later Exports a Liveboard and its visualizations in PDF, PNG, CSV, or XLSX file format. The default `file_format` is CSV. Requires at least view access to the Liveboard. #### Usage guidelines In the request body, specify the GUID or name of the Liveboard. To generate a Liveboard report with specific visualizations, add GUIDs or names of the visualizations. **NOTE**: * The downloadable file returned in API response file is extensionless. Please rename the downloaded file by typing in the relevant extension. * Optionally, you can define [runtime overrides](https://developers.thoughtspot.com/docs/fetch-data-and-report-apis#_runtime_overrides) to apply to the Answer data. * To include unsaved changes in the report, pass the `transient_pinboard_content` script generated from the `getExportRequestForCurrentPinboard` method in the Visual Embed SDK. Upon successful execution, the API returns the report with unsaved changes, including ad hoc changes to visualizations. For more information, see [Liveboard Report API](https://developers.thoughtspot.com/docs/fetch-data-and-report-apis#_liveboard_report_api). * Starting with ThoughtSpot Cloud 10.9.0.cl release, the Liveboard can be exported in the PNG format in the resolution of your choice. To enable this on your instance, contact ThoughtSpot support. When this feature is enabled, the options `include_cover_page`,`include_filter_page` within the `png_options` will not be available for PNG exports. * Starting with the ThoughtSpot Cloud 26.2.0.cl release, * Liveboards can be exported in CSV format. * All visualizations within a Liveboard can be exported as individual CSV files. * When exporting multiple visualizations or the entire Liveboard, the system returns the report as a compressed ZIP file containing the separate CSV files for each visualization. * Liveboards can also be exported in XLSX format. * All selected visualizations are consolidated into a single Excel workbook (.xlsx), with each visualization placed in its own worksheet (tab). * XLSX exports are limited to a maximum of 255 worksheets (tabs) per workbook. + +### Example + + +```typescript +import { createBearerAuthenticationConfig, ReportsApi, ExportLiveboardReportRequest } from '@thoughtspot/rest-api-sdk'; + +const configuration = createBearerAuthenticationConfig("CLUSTER_SERVER_URL", { + username: "YOUR_USERNAME", + password: "YOUR_PASSWORD", +}); +const apiInstance = new ReportsApi(configuration); + +apiInstance.exportLiveboardReport( + // ExportLiveboardReportRequest + { + metadata_identifier: "metadata_identifier_example", + tab_identifiers: [ + "tab_identifiers_example", + ], + personalised_view_identifier: "personalised_view_identifier_example", + visualization_identifiers: [ + "visualization_identifiers_example", + ], + transient_content: "transient_content_example", + file_format: "PDF", + runtime_filter: {}, + override_filters: {}, + runtime_sort: {}, + pdf_options: null, + png_options: null, + runtime_param_override: {}, + regional_settings: null, + } +).then((data:any) => { + console.log('API called successfully. Returned data: ' + data); +}).catch((error:any) => console.error(error)); + + +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **exportLiveboardReportRequest** | **ExportLiveboardReportRequest**| | + + +### Return type + +**HttpFile** + +### Authorization + +[bearerAuth](README.md#bearerAuth) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/octet-stream, application/json + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Export report file of specified metadata object is successful. | - | +**400** | Invalid request. | - | +**401** | Unauthorized access. | - | +**403** | Forbidden access. | - | +**500** | Unexpected error | - | + +[[Back to top]](#) [[Back to API list]](README.md#documentation-for-api-endpoints) [[Back to Model list]](README.md#documentation-for-models) [[Back to README]](README.md) + diff --git a/sdks/typescript/RolesApi.md b/sdks/typescript/RolesApi.md new file mode 100644 index 000000000..ef6113b96 --- /dev/null +++ b/sdks/typescript/RolesApi.md @@ -0,0 +1,287 @@ +# ThoughtSpotRestApiSdk.RolesApi + +All URIs are relative to *CLUSTER_URL* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**createRole**](RolesApi.md#createRole) | **POST** /api/rest/2.0/roles/create | +[**deleteRole**](RolesApi.md#deleteRole) | **POST** /api/rest/2.0/roles/{role_identifier}/delete | +[**searchRoles**](RolesApi.md#searchRoles) | **POST** /api/rest/2.0/roles/search | +[**updateRole**](RolesApi.md#updateRole) | **POST** /api/rest/2.0/roles/{role_identifier}/update | + + +# **createRole** +> RoleResponse createRole(createRoleRequest) + + Version: 9.5.0.cl or later Creates a Role object in ThoughtSpot. Available only if [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance. To create a Role, the `ROLE_ADMINISTRATION` (**Can manage roles**) privilege is required. + +### Example + + +```typescript +import { createBearerAuthenticationConfig, RolesApi, CreateRoleRequest } from '@thoughtspot/rest-api-sdk'; + +const configuration = createBearerAuthenticationConfig("CLUSTER_SERVER_URL", { + username: "YOUR_USERNAME", + password: "YOUR_PASSWORD", +}); +const apiInstance = new RolesApi(configuration); + +apiInstance.createRole( + // CreateRoleRequest + { + name: "name_example", + description: "description_example", + privileges: [ + "USERDATAUPLOADING", + ], + read_only: false, + } +).then((data:any) => { + console.log('API called successfully. Returned data: ' + data); +}).catch((error:any) => console.error(error)); + + +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **createRoleRequest** | **CreateRoleRequest**| | + + +### Return type + +**RoleResponse** + +### Authorization + +[bearerAuth](README.md#bearerAuth) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Role successfully created. | - | +**400** | Invalid parameters. | - | +**401** | Unauthorized access. | - | +**403** | Forbidden access. | - | +**500** | Internal error | - | + +[[Back to top]](#) [[Back to API list]](README.md#documentation-for-api-endpoints) [[Back to Model list]](README.md#documentation-for-models) [[Back to README]](README.md) + +# **deleteRole** +> void deleteRole() + + Version: 9.5.0.cl or later Deletes a Role object from the ThoughtSpot system. Available only if [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance. To delete a Role, the `ROLE_ADMINISTRATION` (**Can manage roles**) privilege is required. + +### Example + + +```typescript +import { createBearerAuthenticationConfig, RolesApi, DeleteRoleRequest } from '@thoughtspot/rest-api-sdk'; + +const configuration = createBearerAuthenticationConfig("CLUSTER_SERVER_URL", { + username: "YOUR_USERNAME", + password: "YOUR_PASSWORD", +}); +const apiInstance = new RolesApi(configuration); + +apiInstance.deleteRole( + // string | Unique ID or name of the Role. ReadOnly roles cannot be deleted. + "role_identifier_example" +).then((data:any) => { + console.log('API called successfully. Returned data: ' + data); +}).catch((error:any) => console.error(error)); + + +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **roleIdentifier** | [**string**] | Unique ID or name of the Role. ReadOnly roles cannot be deleted. | defaults to undefined + + +### Return type + +**void** + +### Authorization + +[bearerAuth](README.md#bearerAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**204** | Role successfully deleted. | - | +**400** | Invalid request. | - | +**401** | Unauthorized access. | - | +**403** | Forbidden access. | - | +**500** | Internal error | - | + +[[Back to top]](#) [[Back to API list]](README.md#documentation-for-api-endpoints) [[Back to Model list]](README.md#documentation-for-models) [[Back to README]](README.md) + +# **searchRoles** +> Array searchRoles(searchRolesRequest) + + Version: 9.5.0.cl or later Gets a list of Role objects from the ThoughtSpot system. Available if [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance. To search for Roles, the `ROLE_ADMINISTRATION` (**Can manage roles**) privilege is required. To get details of a specific Role object, specify the GUID or name. You can also filter the API response based on user group and Org identifiers, privileges assigned to the Role, and deprecation status. + +### Example + + +```typescript +import { createBearerAuthenticationConfig, RolesApi, SearchRolesRequest } from '@thoughtspot/rest-api-sdk'; + +const configuration = createBearerAuthenticationConfig("CLUSTER_SERVER_URL", { + username: "YOUR_USERNAME", + password: "YOUR_PASSWORD", +}); +const apiInstance = new RolesApi(configuration); + +apiInstance.searchRoles( + // SearchRolesRequest + { + role_identifiers: [ + "role_identifiers_example", + ], + org_identifiers: [ + "org_identifiers_example", + ], + group_identifiers: [ + "group_identifiers_example", + ], + privileges: [ + "UNKNOWN", + ], + deprecated: true, + external: true, + shared_via_connection: true, + permissions: [ + "READ_ONLY", + ], + } +).then((data:any) => { + console.log('API called successfully. Returned data: ' + data); +}).catch((error:any) => console.error(error)); + + +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **searchRolesRequest** | **SearchRolesRequest**| | + + +### Return type + +**Array** + +### Authorization + +[bearerAuth](README.md#bearerAuth) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Roles search result. | - | +**400** | Invalid request. | - | +**401** | Unauthorized access. | - | +**403** | Forbidden access. | - | +**500** | Internal error | - | + +[[Back to top]](#) [[Back to API list]](README.md#documentation-for-api-endpoints) [[Back to Model list]](README.md#documentation-for-models) [[Back to README]](README.md) + +# **updateRole** +> RoleResponse updateRole(updateRoleRequest) + + Version: 9.5.0.cl or later Updates the properties of a Role object. Available only if [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance. To update a Role, the `ROLE_ADMINISTRATION` (**Can manage roles**) privilege is required. + +### Example + + +```typescript +import { createBearerAuthenticationConfig, RolesApi, UpdateRoleRequest } from '@thoughtspot/rest-api-sdk'; + +const configuration = createBearerAuthenticationConfig("CLUSTER_SERVER_URL", { + username: "YOUR_USERNAME", + password: "YOUR_PASSWORD", +}); +const apiInstance = new RolesApi(configuration); + +apiInstance.updateRole( + // string | Unique ID or name of the Role. + "role_identifier_example" , + // UpdateRoleRequest + { + name: "name_example", + description: "description_example", + privileges: [ + "USERDATAUPLOADING", + ], + } +).then((data:any) => { + console.log('API called successfully. Returned data: ' + data); +}).catch((error:any) => console.error(error)); + + +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **updateRoleRequest** | **UpdateRoleRequest**| | + **roleIdentifier** | [**string**] | Unique ID or name of the Role. | defaults to undefined + + +### Return type + +**RoleResponse** + +### Authorization + +[bearerAuth](README.md#bearerAuth) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Role successfully updated. | - | +**400** | Invalid request. | - | +**401** | Unauthorized access. | - | +**403** | Forbidden access. | - | +**500** | Unexpected error | - | + +[[Back to top]](#) [[Back to API list]](README.md#documentation-for-api-endpoints) [[Back to Model list]](README.md#documentation-for-models) [[Back to README]](README.md) + diff --git a/sdks/typescript/SchedulesApi.md b/sdks/typescript/SchedulesApi.md new file mode 100644 index 000000000..9cb4c3186 --- /dev/null +++ b/sdks/typescript/SchedulesApi.md @@ -0,0 +1,294 @@ +# ThoughtSpotRestApiSdk.SchedulesApi + +All URIs are relative to *CLUSTER_URL* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**createSchedule**](SchedulesApi.md#createSchedule) | **POST** /api/rest/2.0/schedules/create | +[**deleteSchedule**](SchedulesApi.md#deleteSchedule) | **POST** /api/rest/2.0/schedules/{schedule_identifier}/delete | +[**searchSchedules**](SchedulesApi.md#searchSchedules) | **POST** /api/rest/2.0/schedules/search | +[**updateSchedule**](SchedulesApi.md#updateSchedule) | **POST** /api/rest/2.0/schedules/{schedule_identifier}/update | + + +# **createSchedule** +> ResponseSchedule createSchedule(createScheduleRequest) + + Create schedule. Version: 9.4.0.cl or later Creates a Liveboard schedule job. Requires at least edit access to Liveboards. To create a schedule on behalf of another user, you need `ADMINISTRATION` (**Can administer Org**) or `JOBSCHEDULING` (**Can schedule for others**) privilege and edit access to the Liveboard. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `JOBSCHEDULING` (**Can schedule for others**) privilege is required. #### Usage guidelines * The description text is mandatory. The description text appears as **Description: ** in the Liveboard schedule email notifications. * For Liveboards with both charts and tables, schedule creation is only supported in PDF and XLS formats. Schedules created in CSV formats for such Liveboards will fail to run. If `PDF` is set as the `file_format`, enable `pdf_options` to get the correct attachment. Not doing so may cause the attachment to be rendered empty. * To include only specific visualizations, specify the visualization GUIDs in the `visualization_identifiers` array. * You can schedule a Liveboard job to run periodically by setting frequency parameters. You can set the schedule to run daily, weekly, monthly or every n minutes or hours. The scheduled job can also be configured to run at a specific time of the day or on specific days of the week or month. Please ensure that when setting the schedule frequency for _minute of the object_, only values that are multiples of 5 are included. * If the `frequency` parameters are defined, you can set the time zone to a value that matches your server\'s time zone. For example, `US/Central`, `Etc/UTC`, `CET`. The default time zone is `America/Los_Angeles`. For more information about Liveboard jobs, see [ThoughtSpot Product Documentation](https://docs.thoughtspot.com/cloud/latest/liveboard-schedule). + +### Example + + +```typescript +import { createBearerAuthenticationConfig, SchedulesApi, CreateScheduleRequest } from '@thoughtspot/rest-api-sdk'; + +const configuration = createBearerAuthenticationConfig("CLUSTER_SERVER_URL", { + username: "YOUR_USERNAME", + password: "YOUR_PASSWORD", +}); +const apiInstance = new SchedulesApi(configuration); + +apiInstance.createSchedule( + // CreateScheduleRequest + { + name: "name_example", + description: "description_example", + metadata_type: "LIVEBOARD", + metadata_identifier: "metadata_identifier_example", + file_format: "PDF", + liveboard_options: null, + pdf_options: null, + time_zone: "America/Los_Angeles", + frequency: null, + recipient_details: null, + personalised_view_id: "personalised_view_id_example", + } +).then((data:any) => { + console.log('API called successfully. Returned data: ' + data); +}).catch((error:any) => console.error(error)); + + +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **createScheduleRequest** | **CreateScheduleRequest**| | + + +### Return type + +**ResponseSchedule** + +### Authorization + +[bearerAuth](README.md#bearerAuth) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Schedule successfully created. | - | +**400** | Invalid request. | - | +**401** | Unauthorized access. | - | +**403** | Forbidden access. | - | +**500** | Unexpected error | - | + +[[Back to top]](#) [[Back to API list]](README.md#documentation-for-api-endpoints) [[Back to Model list]](README.md#documentation-for-models) [[Back to README]](README.md) + +# **deleteSchedule** +> void deleteSchedule() + + Deletes a scheduled job. Version: 9.4.0.cl or later Deletes a scheduled Liveboard job. Requires at least edit access to Liveboard or `ADMINISTRATION` (**Can administer Org**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `JOBSCHEDULING` (**Can schedule for others**) privilege is required. + +### Example + + +```typescript +import { createBearerAuthenticationConfig, SchedulesApi, DeleteScheduleRequest } from '@thoughtspot/rest-api-sdk'; + +const configuration = createBearerAuthenticationConfig("CLUSTER_SERVER_URL", { + username: "YOUR_USERNAME", + password: "YOUR_PASSWORD", +}); +const apiInstance = new SchedulesApi(configuration); + +apiInstance.deleteSchedule( + // string | Unique ID or name of the scheduled job. + "schedule_identifier_example" +).then((data:any) => { + console.log('API called successfully. Returned data: ' + data); +}).catch((error:any) => console.error(error)); + + +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **scheduleIdentifier** | [**string**] | Unique ID or name of the scheduled job. | defaults to undefined + + +### Return type + +**void** + +### Authorization + +[bearerAuth](README.md#bearerAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**204** | Schedule successfully deleted. | - | +**400** | Invalid request. | - | +**401** | Unauthorized access. | - | +**403** | Forbidden access. | - | +**500** | Unexpected error | - | + +[[Back to top]](#) [[Back to API list]](README.md#documentation-for-api-endpoints) [[Back to Model list]](README.md#documentation-for-models) [[Back to README]](README.md) + +# **searchSchedules** +> Array searchSchedules(searchSchedulesRequest) + + Search Schedules Version: 9.4.0.cl or later Gets a list of scheduled jobs configured for a Liveboard. To get details of a specific scheduled job, specify the name or GUID of the scheduled job. Requires at least view access to Liveboards. **NOTE**: When filtering schedules by parameters other than `metadata`, set `record_size` to `-1` and `record_offset` to `0` for accurate results. + +### Example + + +```typescript +import { createBearerAuthenticationConfig, SchedulesApi, SearchSchedulesRequest } from '@thoughtspot/rest-api-sdk'; + +const configuration = createBearerAuthenticationConfig("CLUSTER_SERVER_URL", { + username: "YOUR_USERNAME", + password: "YOUR_PASSWORD", +}); +const apiInstance = new SchedulesApi(configuration); + +apiInstance.searchSchedules( + // SearchSchedulesRequest + { + metadata: [ + { + identifier: "identifier_example", + type: "LIVEBOARD", + }, + ], + record_offset: 1, + record_size: 1, + sort_options: null, + history_runs_options: null, + schedule_identifiers: [ + "schedule_identifiers_example", + ], + } +).then((data:any) => { + console.log('API called successfully. Returned data: ' + data); +}).catch((error:any) => console.error(error)); + + +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **searchSchedulesRequest** | **SearchSchedulesRequest**| | + + +### Return type + +**Array** + +### Authorization + +[bearerAuth](README.md#bearerAuth) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Schedule search result. | - | +**400** | Invalid request. | - | +**401** | Unauthorized access. | - | +**403** | Forbidden access. | - | +**500** | Unexpected error | - | + +[[Back to top]](#) [[Back to API list]](README.md#documentation-for-api-endpoints) [[Back to Model list]](README.md#documentation-for-models) [[Back to README]](README.md) + +# **updateSchedule** +> void updateSchedule(updateScheduleRequest) + + Update schedule. Version: 9.4.0.cl or later Updates a scheduled Liveboard job. Requires at least edit access to Liveboards. To update a schedule on behalf of another user, you need `ADMINISTRATION` (**Can administer Org**) or `JOBSCHEDULING` (**Can schedule for others**) privilege and edit access to the Liveboard. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `JOBSCHEDULING` (**Can schedule for others**) privilege is required. The API endpoint allows you to pause a scheduled job, change the status of a paused job. You can also edit the recipients list, frequency of the job, format of the file to send to the recipients in email notifications, PDF options, and time zone setting. + +### Example + + +```typescript +import { createBearerAuthenticationConfig, SchedulesApi, UpdateScheduleRequest } from '@thoughtspot/rest-api-sdk'; + +const configuration = createBearerAuthenticationConfig("CLUSTER_SERVER_URL", { + username: "YOUR_USERNAME", + password: "YOUR_PASSWORD", +}); +const apiInstance = new SchedulesApi(configuration); + +apiInstance.updateSchedule( + // string | Unique ID or name of the schedule. + "schedule_identifier_example" , + // UpdateScheduleRequest + { + name: "name_example", + description: "description_example", + metadata_type: "LIVEBOARD", + metadata_identifier: "metadata_identifier_example", + file_format: "CSV", + liveboard_options: null, + pdf_options: null, + time_zone: "Africa/Abidjan", + frequency: null, + recipient_details: null, + status: "ACTIVE", + personalised_view_id: "personalised_view_id_example", + } +).then((data:any) => { + console.log('API called successfully. Returned data: ' + data); +}).catch((error:any) => console.error(error)); + + +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **updateScheduleRequest** | **UpdateScheduleRequest**| | + **scheduleIdentifier** | [**string**] | Unique ID or name of the schedule. | defaults to undefined + + +### Return type + +**void** + +### Authorization + +[bearerAuth](README.md#bearerAuth) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**204** | Schedule successfully updated. | - | +**400** | Invalid request. | - | +**401** | Unauthorized access. | - | +**403** | Forbidden access. | - | +**500** | Unexpected error | - | + +[[Back to top]](#) [[Back to API list]](README.md#documentation-for-api-endpoints) [[Back to Model list]](README.md#documentation-for-models) [[Back to README]](README.md) + diff --git a/sdks/typescript/SecurityApi.md b/sdks/typescript/SecurityApi.md new file mode 100644 index 000000000..4fa555aea --- /dev/null +++ b/sdks/typescript/SecurityApi.md @@ -0,0 +1,767 @@ +# ThoughtSpotRestApiSdk.SecurityApi + +All URIs are relative to *CLUSTER_URL* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**assignChangeAuthor**](SecurityApi.md#assignChangeAuthor) | **POST** /api/rest/2.0/security/metadata/assign | +[**fetchColumnSecurityRules**](SecurityApi.md#fetchColumnSecurityRules) | **POST** /api/rest/2.0/security/column/rules/fetch | +[**fetchObjectPrivileges**](SecurityApi.md#fetchObjectPrivileges) | **POST** /api/rest/2.0/security/metadata/fetch-object-privileges | +[**fetchPermissionsOfPrincipals**](SecurityApi.md#fetchPermissionsOfPrincipals) | **POST** /api/rest/2.0/security/principals/fetch-permissions | +[**fetchPermissionsOnMetadata**](SecurityApi.md#fetchPermissionsOnMetadata) | **POST** /api/rest/2.0/security/metadata/fetch-permissions | +[**manageObjectPrivilege**](SecurityApi.md#manageObjectPrivilege) | **POST** /api/rest/2.0/security/metadata/manage-object-privilege | +[**publishMetadata**](SecurityApi.md#publishMetadata) | **POST** /api/rest/2.0/security/metadata/publish | +[**shareMetadata**](SecurityApi.md#shareMetadata) | **POST** /api/rest/2.0/security/metadata/share | +[**unpublishMetadata**](SecurityApi.md#unpublishMetadata) | **POST** /api/rest/2.0/security/metadata/unpublish | +[**updateColumnSecurityRules**](SecurityApi.md#updateColumnSecurityRules) | **POST** /api/rest/2.0/security/column/rules/update | + + +# **assignChangeAuthor** +> void assignChangeAuthor(assignChangeAuthorRequest) + + Version: 9.0.0.cl or later Transfers the ownership of one or several objects from one user to another. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `USER_ADMINISTRATION` (**Can manage users**) privilege and edit access to the objects are required. + +### Example + + +```typescript +import { createBearerAuthenticationConfig, SecurityApi, AssignChangeAuthorRequest } from '@thoughtspot/rest-api-sdk'; + +const configuration = createBearerAuthenticationConfig("CLUSTER_SERVER_URL", { + username: "YOUR_USERNAME", + password: "YOUR_PASSWORD", +}); +const apiInstance = new SecurityApi(configuration); + +apiInstance.assignChangeAuthor( + // AssignChangeAuthorRequest + { + metadata: [ + { + type: "LIVEBOARD", + identifier: "identifier_example", + }, + ], + user_identifier: "user_identifier_example", + current_owner_identifier: "current_owner_identifier_example", + } +).then((data:any) => { + console.log('API called successfully. Returned data: ' + data); +}).catch((error:any) => console.error(error)); + + +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **assignChangeAuthorRequest** | **AssignChangeAuthorRequest**| | + + +### Return type + +**void** + +### Authorization + +[bearerAuth](README.md#bearerAuth) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**204** | Author assignment for given metadata objects is successful. | - | +**400** | Invalid request. | - | +**401** | Unauthorized access. | - | +**403** | Forbidden access. | - | +**500** | Unexpected error | - | + +[[Back to top]](#) [[Back to API list]](README.md#documentation-for-api-endpoints) [[Back to Model list]](README.md#documentation-for-models) [[Back to README]](README.md) + +# **fetchColumnSecurityRules** +> Array fetchColumnSecurityRules(fetchColumnSecurityRulesRequest) + + Version: 10.12.0.cl or later Fetches column security rules for specified tables. This API endpoint retrieves column-level security rules configured for tables. It returns information about which columns are secured and which groups have access to those columns. #### Usage guidelines - Provide an array of table identifiers using either `identifier` (GUID or name) or `obj_identifier` (object ID) - At least one of `identifier` or `obj_identifier` must be provided for each table - The API returns column security rules for all specified tables - Users must have appropriate permissions to access security rules for the specified tables #### Required permissions - `ADMINISTRATION` - Can administer ThoughtSpot - `DATAMANAGEMENT` - Can manage data - `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` - Can manage worksheet views and tables #### Example request ```json { \"tables\": [ { \"identifier\": \"table-guid\", \"obj_identifier\": \"table-object-id\" } ] } ``` #### Response format The API returns an array of `ColumnSecurityRuleResponse` objects wrapped in a `data` field. Each `ColumnSecurityRuleResponse` object contains: - Table information (GUID and object ID) - Array of column security rules with column details, group access, and source table information #### Example response ```json { \"data\": [ { \"guid\": \"table-guid\", \"objId\": \"table-object-id\", \"columnSecurityRules\": [ { \"column\": { \"id\": \"col_123\", \"name\": \"Salary\" }, \"groups\": [ { \"id\": \"group_1\", \"name\": \"HR Department\" } ], \"sourceTableDetails\": { \"id\": \"source-table-guid\", \"name\": \"Employee_Data\" } } ] } ] } ``` + +### Example + + +```typescript +import { createBearerAuthenticationConfig, SecurityApi, FetchColumnSecurityRulesRequest } from '@thoughtspot/rest-api-sdk'; + +const configuration = createBearerAuthenticationConfig("CLUSTER_SERVER_URL", { + username: "YOUR_USERNAME", + password: "YOUR_PASSWORD", +}); +const apiInstance = new SecurityApi(configuration); + +apiInstance.fetchColumnSecurityRules( + // FetchColumnSecurityRulesRequest + { + tables: [ + { + identifier: "identifier_example", + obj_identifier: "obj_identifier_example", + }, + ], + } +).then((data:any) => { + console.log('API called successfully. Returned data: ' + data); +}).catch((error:any) => console.error(error)); + + +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **fetchColumnSecurityRulesRequest** | **FetchColumnSecurityRulesRequest**| | + + +### Return type + +**Array** + +### Authorization + +[bearerAuth](README.md#bearerAuth) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Successfully fetched column security rules | - | +**400** | Bad request - Table not found or invalid parameters | - | +**401** | Unauthorized access. | - | +**403** | Forbidden - User doesn\'t have permission to access security rules for this table | - | +**500** | Internal server error | - | + +[[Back to top]](#) [[Back to API list]](README.md#documentation-for-api-endpoints) [[Back to Model list]](README.md#documentation-for-models) [[Back to README]](README.md) + +# **fetchObjectPrivileges** +> ObjectPrivilegesOfMetadataResponse fetchObjectPrivileges(fetchObjectPrivilegesRequest) + + Version: 26.3.0.cl or later This API fetches the object privileges present for the given list of principals (user or group), on the given set of objects. It supports pagination, which can be enabled and configured using the request parameters. It provides users access to certain features based on privilege based access control. #### Usage guidelines - Specify the `type` (`USER` or `USER_GROUP`) and `identifier` (either GUID or name) of the principals for which you want to retrieve object privilege information in the `principals` array. - Specify the `type` (`LOGICAL_TABLE`) and `identifier` (either GUID or name) of the metadata objects for which you want to retrieve object privilege information in the `metadata` array. Only `LOGICAL_TABLE` metadata type is supported for now. It may be extended for other metadata types in future. - To control the offset from where principals have to be fetched, use `record_offset`. When `record_offset` is 0, information is fetched from the beginning. - To control the number of principals to be fetched, use `record_size`. Default `record_size` is 20. - Ensure `record_offset` for a subsequent request is one more than the value of `record_size` of the previous request. - Ensure using correct Authorization Bearer Token corresponding to specific user & org. #### Example request ```json { \"principals\": [ { \"type\": \"type-1\", \"identifier\": \"principal-guid-or-name-1\" }, { \"type\": \"type-2\", \"identifier\": \"principal-guid-or-name-2\" } ], \"metadata\": [ { \"type\": \"metadata-type-1\", \"identifier\": \"metadata-guid-or-name-1\" }, { \"type\": \"metadata-type-2\", \"identifier\": \"metadata-guid-or-name-2\" } ], \"record_offset\": 0, \"record_size\": 20 } ``` #### Response format The API returns an array of `metadata_object_privileges` objects wrapped in JSON. Each `metadata_object_privileges` object contains: - Metadata information (GUID, name and type) - Array of `principal_object_privilege_info`. - Each `principal_object_privilege_info` contains: - Principal type. All principals of this type are listed as described below. - Array of `principal_object_privileges`. - Each `principal_object_privileges` contains: - Principal information (GUID, name, subtype) - List of applied object level privileges. #### Example response ```json { \"metadata_object_privileges\": [ { \"metadata_id\": \"metadata-guid-1\", \"metadata_name\": \"metadata-name-1\", \"metadata_type\": \"metadata-type-1\", \"principal_object_privilege_info\": [ { \"principal_type\": \"principal-type-1\", \"principal_object_privileges\": [ { \"principal_id\": \"principal-guid-1\", \"principal_name\": \"principal-name-1\", \"principal_sub_type\": \"principal-sub-type-1\", \"object_privileges\": \"[object-privilege-1, object-privilege-2]\" }, { \"principal_id\": \"principal-guid-2\", \"principal_name\": \"principal-name-2\", \"principal_sub_type\": \"principal-sub-type-2\", \"object_privileges\": \"[object-privilege-1, object-privilege-2]\" } ] }, { \"principal_type\": \"principal-type-2\", \"principal_object_privileges\": [ { \"principal_id\": \"principal-guid-3\", \"principal_name\": \"principal-guid-4\", \"principal_sub_type\": \"principal-sub-type-4\", \"object_privileges\": \"[object-privilege-1]\" } ] } ] }, { \"metadata_id\": \"metadata-guid-2\", \"metadata_name\": \"metadata-name-2\", \"metadata_type\": \"metadata-type-2\", \"principal_object_privilege_info\": [ { \"principal_type\": \"principal-type-1\", \"principal_object_privileges\": [ { \"principal_id\": \"principal-guid-1\", \"principal_name\": \"principal-name-1\", \"principal_sub_type\": \"principal-sub-type-1\", \"object_privileges\": \"[object-privilege-3, object-privilege-4]\" }, { \"principal_id\": \"principal-guid-2\", \"principal_name\": \"principal-name-2\", \"principal_sub_type\": \"principal-sub-type-2\", \"object_privileges\": \"[object-privilege-4]\" } ] } ] } ] } ``` + +### Example + + +```typescript +import { createBearerAuthenticationConfig, SecurityApi, FetchObjectPrivilegesRequest } from '@thoughtspot/rest-api-sdk'; + +const configuration = createBearerAuthenticationConfig("CLUSTER_SERVER_URL", { + username: "YOUR_USERNAME", + password: "YOUR_PASSWORD", +}); +const apiInstance = new SecurityApi(configuration); + +apiInstance.fetchObjectPrivileges( + // FetchObjectPrivilegesRequest + { + metadata: [ + { + type: "LOGICAL_TABLE", + identifier: "identifier_example", + }, + ], + principals: [ + { + identifier: "identifier_example", + type: "USER", + }, + ], + record_offset: 0, + record_size: 20, + } +).then((data:any) => { + console.log('API called successfully. Returned data: ' + data); +}).catch((error:any) => console.error(error)); + + +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **fetchObjectPrivilegesRequest** | **FetchObjectPrivilegesRequest**| | + + +### Return type + +**ObjectPrivilegesOfMetadataResponse** + +### Authorization + +[bearerAuth](README.md#bearerAuth) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Fetching defined object privileges of metadata objects is successful. | - | +**400** | Invalid request. | - | +**401** | Unauthorized access. | - | +**403** | Forbidden access. | - | +**500** | Unexpected error | - | + +[[Back to top]](#) [[Back to API list]](README.md#documentation-for-api-endpoints) [[Back to Model list]](README.md#documentation-for-models) [[Back to README]](README.md) + +# **fetchPermissionsOfPrincipals** +> PermissionOfPrincipalsResponse fetchPermissionsOfPrincipals(fetchPermissionsOfPrincipalsRequest) + + Version: 9.0.0.cl or later Fetches object permission details for a given principal object such as a user and group. Requires view access to the metadata object. #### Usage guidelines * To get a list of all metadata objects that a user or group can access, specify the `type` and GUID or name of the principal. * To get permission details for a specific object, add the `type` and GUID or name of the metadata object to your API request. Upon successful execution, the API returns a list of metadata objects and permission details for each object. + +### Example + + +```typescript +import { createBearerAuthenticationConfig, SecurityApi, FetchPermissionsOfPrincipalsRequest } from '@thoughtspot/rest-api-sdk'; + +const configuration = createBearerAuthenticationConfig("CLUSTER_SERVER_URL", { + username: "YOUR_USERNAME", + password: "YOUR_PASSWORD", +}); +const apiInstance = new SecurityApi(configuration); + +apiInstance.fetchPermissionsOfPrincipals( + // FetchPermissionsOfPrincipalsRequest + { + principals: [ + { + identifier: "identifier_example", + type: "USER", + }, + ], + metadata: [ + { + type: "LIVEBOARD", + identifier: "identifier_example", + }, + ], + record_offset: 0, + record_size: -1, + default_metadata_type: "ALL", + } +).then((data:any) => { + console.log('API called successfully. Returned data: ' + data); +}).catch((error:any) => console.error(error)); + + +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **fetchPermissionsOfPrincipalsRequest** | **FetchPermissionsOfPrincipalsRequest**| | + + +### Return type + +**PermissionOfPrincipalsResponse** + +### Authorization + +[bearerAuth](README.md#bearerAuth) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Fetching permissions of principals is successful. | - | +**400** | Invalid request. | - | +**401** | Unauthorized access. | - | +**403** | Forbidden access. | - | +**500** | Unexpected error | - | + +[[Back to top]](#) [[Back to API list]](README.md#documentation-for-api-endpoints) [[Back to Model list]](README.md#documentation-for-models) [[Back to README]](README.md) + +# **fetchPermissionsOnMetadata** +> PermissionOfMetadataResponse fetchPermissionsOnMetadata(fetchPermissionsOnMetadataRequest) + + Version: 9.0.0.cl or later Fetches permission details for a given metadata object. Requires view access to the metadata object. #### Usage guidelines * To fetch a list of users and groups for a metadata object, specify `type` and GUID or name of the metadata object. * To get permission details for a specific user or group, add `type` and GUID or name of the principal object to your API request. Upon successful execution, the API returns permission details and principal information for the object specified in the API request. + +### Example + + +```typescript +import { createBearerAuthenticationConfig, SecurityApi, FetchPermissionsOnMetadataRequest } from '@thoughtspot/rest-api-sdk'; + +const configuration = createBearerAuthenticationConfig("CLUSTER_SERVER_URL", { + username: "YOUR_USERNAME", + password: "YOUR_PASSWORD", +}); +const apiInstance = new SecurityApi(configuration); + +apiInstance.fetchPermissionsOnMetadata( + // FetchPermissionsOnMetadataRequest + { + metadata: [ + { + type: "LIVEBOARD", + identifier: "identifier_example", + }, + ], + principals: [ + { + identifier: "identifier_example", + type: "USER", + }, + ], + include_dependent_objects: false, + record_offset: 0, + record_size: -1, + permission_type: "permission_type_example", + } +).then((data:any) => { + console.log('API called successfully. Returned data: ' + data); +}).catch((error:any) => console.error(error)); + + +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **fetchPermissionsOnMetadataRequest** | **FetchPermissionsOnMetadataRequest**| | + + +### Return type + +**PermissionOfMetadataResponse** + +### Authorization + +[bearerAuth](README.md#bearerAuth) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Fetching permissions of metadata objects is successful. | - | +**400** | Invalid request. | - | +**401** | Unauthorized access. | - | +**403** | Forbidden access. | - | +**500** | Unexpected error | - | + +[[Back to top]](#) [[Back to API list]](README.md#documentation-for-api-endpoints) [[Back to Model list]](README.md#documentation-for-models) [[Back to README]](README.md) + +# **manageObjectPrivilege** +> void manageObjectPrivilege(manageObjectPrivilegeRequest) + + Version: 26.3.0.cl or later This API allows the addition or deletion of object level privileges for a set of users and groups, on a set of metadata objects. It provides users to access certain features based on privilege based access control. #### Usage guidelines - Specify the `operation`. The supported operations are: `ADD`, `REMOVE`. - Specify the type of the objects on which the object privileges are being provided in `metadata_type`. Only `LOGICAL_TABLE` metadata type is supported for now. It may be extended for other metadata types in future. - Specify the list of object privilege types in the `object_privilege_types` array. The supported object privilege types are: `SPOTTER_COACHING_PRIVILEGE`. - Specify the identifiers (either GUID or name) for the metadata objects in the `metadata_identifiers` array. - Specify the `type` (`USER` or `USER_GROUP`) and `identifier` (either GUID or name) of the principals to which you want to apply the given operation and given object privileges in the `principals` array. - Ensure using correct Authorization Bearer Token corresponding to specific user & org. #### Example request ```json { \"operation\": \"operation-type\", \"metadata_type\": \"metadata-type\", \"object_privilege_types\": [\"privilege-type-1\", \"privilege-type-2\"], \"metadata_identifiers\": [\"metadata-guid-or-name-1\", \"metadata-guid-or-name-1\"], \"principals\": [ { \"type\": \"type-1\", \"identifier\": \"principal-guid-or-name-1\" }, { \"type\": \"type-2\", \"identifier\": \"principal-guid-or-name-2\" } ] } ``` > ###### Note: > * Only admin users, users with edit access and users with coaching privilege on a given data-model can add or remove principals related to SPOTTER_COACHING_PRIVILEGE + +### Example + + +```typescript +import { createBearerAuthenticationConfig, SecurityApi, ManageObjectPrivilegeRequest } from '@thoughtspot/rest-api-sdk'; + +const configuration = createBearerAuthenticationConfig("CLUSTER_SERVER_URL", { + username: "YOUR_USERNAME", + password: "YOUR_PASSWORD", +}); +const apiInstance = new SecurityApi(configuration); + +apiInstance.manageObjectPrivilege( + // ManageObjectPrivilegeRequest + { + operation: "ADD", + metadata_type: "LOGICAL_TABLE", + object_privilege_types: [ + "SPOTTER_COACHING_PRIVILEGE", + ], + metadata_identifiers: [ + "metadata_identifiers_example", + ], + principals: [ + { + identifier: "identifier_example", + type: "USER", + }, + ], + } +).then((data:any) => { + console.log('API called successfully. Returned data: ' + data); +}).catch((error:any) => console.error(error)); + + +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **manageObjectPrivilegeRequest** | **ManageObjectPrivilegeRequest**| | + + +### Return type + +**void** + +### Authorization + +[bearerAuth](README.md#bearerAuth) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**204** | Object privileges added/removed successfully | - | +**400** | Invalid request | - | +**401** | Unauthorized access | - | +**403** | Forbidden access | - | +**500** | Unexpected error | - | + +[[Back to top]](#) [[Back to API list]](README.md#documentation-for-api-endpoints) [[Back to Model list]](README.md#documentation-for-models) [[Back to README]](README.md) + +# **publishMetadata** +> void publishMetadata(publishMetadataRequest) + + Version: 26.5.0.cl or later Allows publishing metadata objects across organizations in ThoughtSpot. Requires ADMINISTRATION role and TENANT scope. The API endpoint allows publishing the following types of metadata objects: * Liveboards * Answers * Logical Tables This API will essentially share the objects along with it\'s dependencies to the org admins of the orgs to which it is being published. + +### Example + + +```typescript +import { createBearerAuthenticationConfig, SecurityApi, PublishMetadataRequest } from '@thoughtspot/rest-api-sdk'; + +const configuration = createBearerAuthenticationConfig("CLUSTER_SERVER_URL", { + username: "YOUR_USERNAME", + password: "YOUR_PASSWORD", +}); +const apiInstance = new SecurityApi(configuration); + +apiInstance.publishMetadata( + // PublishMetadataRequest + { + metadata: [ + { + identifier: "identifier_example", + type: "LIVEBOARD", + }, + ], + org_identifiers: [ + "org_identifiers_example", + ], + skip_validation: true, + } +).then((data:any) => { + console.log('API called successfully. Returned data: ' + data); +}).catch((error:any) => console.error(error)); + + +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **publishMetadataRequest** | **PublishMetadataRequest**| | + + +### Return type + +**void** + +### Authorization + +[bearerAuth](README.md#bearerAuth) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**204** | Publishing metadata objects is successful. | - | +**400** | Invalid request. | - | +**401** | Unauthorized access. | - | +**403** | Forbidden access. | - | +**500** | Unexpected error | - | + +[[Back to top]](#) [[Back to API list]](README.md#documentation-for-api-endpoints) [[Back to Model list]](README.md#documentation-for-models) [[Back to README]](README.md) + +# **shareMetadata** +> void shareMetadata(shareMetadataRequest) + + Version: 9.0.0.cl or later Allows sharing one or several metadata objects with users and groups in ThoughtSpot. Requires edit access to the metadata object. #### Supported metadata objects: * Liveboards * Visualizations * Answers * Models * Views * Connections * Collections #### Object permissions You can provide `READ_ONLY` or `MODIFY` access when sharing an object with another user or group. The `READ_ONLY` permission grants view access to the shared object, whereas `MODIFY` provides edit access. To prevent a user or group from accessing the shared object, specify the GUID or name of the principal and set `shareMode` to `NO_ACCESS`. #### Sharing a visualization * Sharing a visualization implicitly shares the entire Liveboard with the recipient. * Object permissions set for a shared visualization also apply to the Liveboard unless overridden by another API request or via UI. * If email notifications for object sharing are enabled, a notification with a link to the shared visualization will be sent to the recipient’s email address. Although this link opens the shared visualization, recipients can also access other visualizations in the Liveboard. #### Sharing a collection Collections support **dual permissions** that provide fine-grained control: * **Collection permissions** (`share_mode`) - controls access to the collection itself (view, edit, delete the collection) * **Content permissions** (`content_share_mode`) - controls access to objects within the collection (view, edit objects inside) **Default Behavior:** - If only `share_mode` is specified, the content permissions default to `READ_ONLY` (except when `share_mode` is `NO_ACCESS`, then content also gets `NO_ACCESS`) - To give users edit access to collection contents, explicitly set `content_share_mode: \"MODIFY\"` ## Examples The following JSON examples can be copy-pasted as request bodies for the REST v2 API endpoint: ```bash POST /callosum/v1/v2/security/metadata/share Content-Type: application/x-www-form-urlencoded ``` ### Basic collection sharing Share a collection with read-only access: ```json { \"metadata_type\": \"COLLECTION\", \"metadata_identifiers\": [\"Sales Reports Collection\"], \"permissions\": [{ \"principal\": { \"type\": \"USER\", \"identifier\": \"alice@company.com\" }, \"share_mode\": \"READ_ONLY\" }], \"notification\": { \"message\": \"I\'ve shared the Sales Reports collection with you\", \"notify_on_share\": true } } ``` ### Collection sharing with dual permissions Share a collection with different permissions for the collection vs. its contents: ```json { \"metadata_type\": \"COLLECTION\", \"metadata_identifiers\": [\"Marketing Analytics\"], \"permissions\": [{ \"principal\": { \"type\": \"USER\", \"identifier\": \"bob@company.com\" }, \"share_mode\": \"MODIFY\", \"content_share_mode\": \"READ_ONLY\" }, { \"principal\": { \"type\": \"USER_GROUP\", \"identifier\": \"Marketing Team\" }, \"share_mode\": \"READ_ONLY\", \"content_share_mode\": \"READ_ONLY\" }], \"notification\": { \"emails\": [\"bob@company.com\"], \"message\": \"You can edit the collection but content is read-only\", \"enable_custom_url\": false, \"notify_on_share\": true }, \"has_lenient_discoverability\": false } ``` ### Multiple collections sharing Share multiple collections with different users: ```json { \"metadata\": [ { \"type\": \"COLLECTION\", \"identifier\": \"Q4 Reports\" }, { \"type\": \"COLLECTION\", \"identifier\": \"Executive Dashboard Collection\" } ], \"permissions\": [{ \"principal\": { \"type\": \"USER_GROUP\", \"identifier\": \"Executives\" }, \"share_mode\": \"MODIFY\" }, { \"principal\": { \"type\": \"USER\", \"identifier\": \"manager@company.com\" }, \"share_mode\": \"READ_ONLY\", \"content_share_mode\": \"MODIFY\" }], \"notification\": { \"message\": \"Sharing quarterly collections with leadership team\", \"notify_on_share\": true } } ``` ### Remove collection access Remove access to a collection by setting share_mode to NO_ACCESS: ```json { \"metadata_type\": \"COLLECTION\", \"metadata_identifiers\": [\"Confidential Reports\"], \"permissions\": [{ \"principal\": { \"type\": \"USER\", \"identifier\": \"former-employee@company.com\" }, \"share_mode\": \"NO_ACCESS\" }], \"notification\": { \"notify_on_share\": false } } ``` ### Collection Permission Scenarios **Scenario 1: Collection Admin** - `share_mode: MODIFY` + `content_share_mode: MODIFY` = Full control over collection and its contents **Scenario 2: Collection Curator** - `share_mode: MODIFY` + `content_share_mode: READ_ONLY` = Can manage collection structure but not edit contents **Scenario 3: Content Editor** - `share_mode: READ_ONLY` + `content_share_mode: MODIFY` = Can edit objects within collection but can\'t change collection itself **Scenario 4: Viewer** - `share_mode: READ_ONLY` + `content_share_mode: READ_ONLY` = View-only access to collection and contents + +### Example + + +```typescript +import { createBearerAuthenticationConfig, SecurityApi, ShareMetadataRequest } from '@thoughtspot/rest-api-sdk'; + +const configuration = createBearerAuthenticationConfig("CLUSTER_SERVER_URL", { + username: "YOUR_USERNAME", + password: "YOUR_PASSWORD", +}); +const apiInstance = new SecurityApi(configuration); + +apiInstance.shareMetadata( + // ShareMetadataRequest + { + metadata_type: "LIVEBOARD", + metadata_identifiers: [ + "metadata_identifiers_example", + ], + metadata: [ + { + type: "LIVEBOARD", + identifier: "identifier_example", + }, + ], + permissions: [ + { + principal: { + identifier: "identifier_example", + type: "USER", + }, + share_mode: "READ_ONLY", + content_share_mode: "READ_ONLY", + }, + ], + visualization_identifiers: [ + "visualization_identifiers_example", + ], + emails: [], + message: "message_example", + enable_custom_url: false, + notify_on_share: true, + has_lenient_discoverability: false, + } +).then((data:any) => { + console.log('API called successfully. Returned data: ' + data); +}).catch((error:any) => console.error(error)); + + +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **shareMetadataRequest** | **ShareMetadataRequest**| | + + +### Return type + +**void** + +### Authorization + +[bearerAuth](README.md#bearerAuth) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**204** | Sharing metadata objects is successful. | - | +**400** | Invalid request. | - | +**401** | Unauthorized access. | - | +**403** | Forbidden access. | - | +**500** | Unexpected error | - | + +[[Back to top]](#) [[Back to API list]](README.md#documentation-for-api-endpoints) [[Back to Model list]](README.md#documentation-for-models) [[Back to README]](README.md) + +# **unpublishMetadata** +> void unpublishMetadata(unpublishMetadataRequest) + + Version: 26.5.0.cl or later Allows unpublishing metadata objects from organizations in ThoughtSpot. Requires ADMINISTRATION role and TENANT scope. The API endpoint allows unpublishing the following types of metadata objects: * Liveboards * Answers * Logical Tables When unpublishing objects, you can: * Include dependencies by setting `include_dependencies` to true - this will unpublish all dependent objects if no other published object is using them * Force unpublish by setting `force` to true - this will break all dependent objects in the unpublished organizations + +### Example + + +```typescript +import { createBearerAuthenticationConfig, SecurityApi, UnpublishMetadataRequest } from '@thoughtspot/rest-api-sdk'; + +const configuration = createBearerAuthenticationConfig("CLUSTER_SERVER_URL", { + username: "YOUR_USERNAME", + password: "YOUR_PASSWORD", +}); +const apiInstance = new SecurityApi(configuration); + +apiInstance.unpublishMetadata( + // UnpublishMetadataRequest + { + force: true, + include_dependencies: true, + metadata: [ + { + identifier: "identifier_example", + type: "LIVEBOARD", + }, + ], + org_identifiers: [ + "org_identifiers_example", + ], + } +).then((data:any) => { + console.log('API called successfully. Returned data: ' + data); +}).catch((error:any) => console.error(error)); + + +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **unpublishMetadataRequest** | **UnpublishMetadataRequest**| | + + +### Return type + +**void** + +### Authorization + +[bearerAuth](README.md#bearerAuth) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**204** | Unpublishing metadata objects is successful. | - | +**400** | Invalid request. | - | +**401** | Unauthorized access. | - | +**403** | Forbidden access. | - | +**500** | Unexpected error | - | + +[[Back to top]](#) [[Back to API list]](README.md#documentation-for-api-endpoints) [[Back to Model list]](README.md#documentation-for-models) [[Back to README]](README.md) + +# **updateColumnSecurityRules** +> void updateColumnSecurityRules(updateColumnSecurityRulesRequest) + + Version: 10.12.0.cl or later Creates, updates, or deletes column security rules for specified tables. This API endpoint allows you to create, update, or delete column-level security rules on columns of a table. The operation follows an \"all or none\" policy: if defining security rules for any of the provided columns fails, the entire operation will be rolled back, and no rules will be created. #### Usage guidelines - Provide table identifier using either `identifier` (GUID or name) or `obj_identifier` (object ID) - Use `clear_csr: true` to remove all column security rules from the table - For each column, specify the security rule using `column_security_rules` array - Use `is_unsecured: true` to mark a specific column as unprotected - Use `group_access` operations to manage group associations: - `ADD`: Add groups to the column\'s access list - `REMOVE`: Remove groups from the column\'s access list - `REPLACE`: Replace all existing groups with the specified groups #### Required permissions - `ADMINISTRATION` - Can administer ThoughtSpot - `DATAMANAGEMENT` - Can manage data (if RBAC is disabled) - `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` - Can manage worksheet views and tables (if RBAC is enabled) #### Example request ```json { \"identifier\": \"table-guid\", \"obj_identifier\": \"table-object-id\", \"clear_csr\": false, \"column_security_rules\": [ { \"column_identifier\": \"col id or col name\", \"is_unsecured\": false, \"group_access\": [ { \"operation\": \"ADD\", \"group_identifiers\": [\"hr_group_id\", \"hr_group_name\", \"finance_group_id\"] } ] }, { \"column_identifier\": \"col id or col name\", \"is_unsecured\": true }, { \"column_identifier\": \"col id or col name\", \"is_unsecured\": false, \"group_access\": [ { \"operation\": \"REPLACE\", \"group_identifiers\": [\"management_group_id\", \"management_group_name\"] } ] } ] } ``` #### Request Body Schema - `identifier` (string, optional): GUID or name of the table for which we want to create column security rules - `obj_identifier` (string, optional): The object ID of the table - `clear_csr` (boolean, optional): If true, then all the secured columns will be marked as unprotected, and all the group associations will be removed - `column_security_rules` (array of objects, required): An array where each object defines the security rule for a specific column Each column security rule object contains: - `column_identifier` (string, required): Column identifier (col_id or name) - `is_unsecured` (boolean, optional): If true, the column will be marked as unprotected and all groups associated with it will be removed - `group_access` (array of objects, optional): Array of group operation objects Each group operation object contains: - `operation` (string, required): Operation type - ADD, REMOVE, or REPLACE - `group_identifiers` (array of strings, required): Array of group identifiers (name or GUID) on which the operation will be performed #### Response This API does not return any response body. A successful operation returns HTTP 200 status code. #### Operation Types - **ADD**: Adds the specified groups to the column\'s access list - **REMOVE**: Removes the specified groups from the column\'s access list - **REPLACE**: Replaces all existing groups with the specified groups + +### Example + + +```typescript +import { createBearerAuthenticationConfig, SecurityApi, UpdateColumnSecurityRulesRequest } from '@thoughtspot/rest-api-sdk'; + +const configuration = createBearerAuthenticationConfig("CLUSTER_SERVER_URL", { + username: "YOUR_USERNAME", + password: "YOUR_PASSWORD", +}); +const apiInstance = new SecurityApi(configuration); + +apiInstance.updateColumnSecurityRules( + // UpdateColumnSecurityRulesRequest + { + identifier: "identifier_example", + obj_identifier: "obj_identifier_example", + clear_csr: true, + column_security_rules: [ + { + column_identifier: "column_identifier_example", + is_unsecured: true, + group_access: [ + { + operation: "ADD", + group_identifiers: [ + "group_identifiers_example", + ], + }, + ], + }, + ], + } +).then((data:any) => { + console.log('API called successfully. Returned data: ' + data); +}).catch((error:any) => console.error(error)); + + +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **updateColumnSecurityRulesRequest** | **UpdateColumnSecurityRulesRequest**| | + + +### Return type + +**void** + +### Authorization + +[bearerAuth](README.md#bearerAuth) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**204** | Successfully updated column security rules | - | +**400** | Bad request - Invalid parameters or table not found | - | +**401** | Unauthorized access. | - | +**403** | Forbidden - User doesn\'t have permission to modify security rules for this table | - | +**500** | Internal server error | - | + +[[Back to top]](#) [[Back to API list]](README.md#documentation-for-api-endpoints) [[Back to Model list]](README.md#documentation-for-models) [[Back to README]](README.md) + diff --git a/sdks/typescript/SystemApi.md b/sdks/typescript/SystemApi.md new file mode 100644 index 000000000..298743549 --- /dev/null +++ b/sdks/typescript/SystemApi.md @@ -0,0 +1,601 @@ +# ThoughtSpotRestApiSdk.SystemApi + +All URIs are relative to *CLUSTER_URL* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**configureCommunicationChannelPreferences**](SystemApi.md#configureCommunicationChannelPreferences) | **POST** /api/rest/2.0/system/preferences/communication-channels/configure | +[**configureSecuritySettings**](SystemApi.md#configureSecuritySettings) | **POST** /api/rest/2.0/system/security-settings/configure | +[**getSystemConfig**](SystemApi.md#getSystemConfig) | **GET** /api/rest/2.0/system/config | +[**getSystemInformation**](SystemApi.md#getSystemInformation) | **GET** /api/rest/2.0/system | +[**getSystemOverrideInfo**](SystemApi.md#getSystemOverrideInfo) | **GET** /api/rest/2.0/system/config-overrides | +[**searchCommunicationChannelPreferences**](SystemApi.md#searchCommunicationChannelPreferences) | **POST** /api/rest/2.0/system/preferences/communication-channels/search | +[**searchSecuritySettings**](SystemApi.md#searchSecuritySettings) | **POST** /api/rest/2.0/system/security-settings/search | +[**updateSystemConfig**](SystemApi.md#updateSystemConfig) | **POST** /api/rest/2.0/system/config-update | +[**validateCommunicationChannel**](SystemApi.md#validateCommunicationChannel) | **POST** /api/rest/2.0/system/communication-channels/validate | + + +# **configureCommunicationChannelPreferences** +> void configureCommunicationChannelPreferences(configureCommunicationChannelPreferencesRequest) + + Version: 10.14.0.cl or later Configure communication channel preferences. - Use `cluster_preferences` to update the default preferences for your ThoughtSpot application instance. - If your instance has [Orgs](https://docs.thoughtspot.com/cloud/latest/orgs-overview), use `org_preferences` to specify Org-specific preferences that override the defaults. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) or `DEVELOPER` (**Has developer privilege**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, users with `APPLICATION_ADMINISTRATION` (**Can manage application settings**) privilege are also authorized to perform this action. + +### Example + + +```typescript +import { createBearerAuthenticationConfig, SystemApi, ConfigureCommunicationChannelPreferencesRequest } from '@thoughtspot/rest-api-sdk'; + +const configuration = createBearerAuthenticationConfig("CLUSTER_SERVER_URL", { + username: "YOUR_USERNAME", + password: "YOUR_PASSWORD", +}); +const apiInstance = new SystemApi(configuration); + +apiInstance.configureCommunicationChannelPreferences( + // ConfigureCommunicationChannelPreferencesRequest + { + cluster_preferences: [ + { + event_type: "LIVEBOARD_SCHEDULE", + channels: [ + "EMAIL", + ], + }, + ], + org_preferences: [ + { + org_identifier: "org_identifier_example", + operation: "REPLACE", + preferences: [ + { + event_type: "LIVEBOARD_SCHEDULE", + channels: [ + "EMAIL", + ], + }, + ], + reset_events: [ + "LIVEBOARD_SCHEDULE", + ], + }, + ], + } +).then((data:any) => { + console.log('API called successfully. Returned data: ' + data); +}).catch((error:any) => console.error(error)); + + +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **configureCommunicationChannelPreferencesRequest** | **ConfigureCommunicationChannelPreferencesRequest**| | + + +### Return type + +**void** + +### Authorization + +[bearerAuth](README.md#bearerAuth) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**204** | Communication channel preferences successfully updated. | - | +**400** | Invalid request. | - | +**401** | Unauthorized access. | - | +**403** | Forbidden access. | - | +**500** | Unexpected error | - | + +[[Back to top]](#) [[Back to API list]](README.md#documentation-for-api-endpoints) [[Back to Model list]](README.md#documentation-for-models) [[Back to README]](README.md) + +# **configureSecuritySettings** +> void configureSecuritySettings(configureSecuritySettingsRequest) + + Version: 26.2.0.cl or later Configure security settings for your ThoughtSpot application instance. - Use `cluster_preferences` to update cluster-level security settings including CORS whitelisted URLs, CSP settings, SAML redirect URLs, partitioned cookies, and non-embed access configuration. - Use `org_preferences` to configure Org-specific security settings. If your instance has [Orgs](https://docs.thoughtspot.com/cloud/latest/orgs-overview), this allows configuring CORS and non-embed access settings specific to the Org. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) or `DEVELOPER` (**Has developer privilege**) privilege. Cluster-level SAML and script-src settings require `ADMINISTRATION` privilege. See [Security Settings](https://developers.thoughtspot.com/docs/security-settings) for more details. + +### Example + + +```typescript +import { createBearerAuthenticationConfig, SystemApi, ConfigureSecuritySettingsRequest } from '@thoughtspot/rest-api-sdk'; + +const configuration = createBearerAuthenticationConfig("CLUSTER_SERVER_URL", { + username: "YOUR_USERNAME", + password: "YOUR_PASSWORD", +}); +const apiInstance = new SystemApi(configuration); + +apiInstance.configureSecuritySettings( + // ConfigureSecuritySettingsRequest + { + cluster_preferences: null, + org_preferences: [ + { + org_identifier: "org_identifier_example", + cors_whitelisted_urls: [ + "cors_whitelisted_urls_example", + ], + non_embed_access: { + block_full_app_access: true, + groups_identifiers_with_access: [ + "groups_identifiers_with_access_example", + ], + }, + }, + ], + } +).then((data:any) => { + console.log('API called successfully. Returned data: ' + data); +}).catch((error:any) => console.error(error)); + + +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **configureSecuritySettingsRequest** | **ConfigureSecuritySettingsRequest**| | + + +### Return type + +**void** + +### Authorization + +[bearerAuth](README.md#bearerAuth) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**204** | Successfully configured the security settings. | - | +**400** | Invalid request. | - | +**401** | Unauthorized access. | - | +**403** | Forbidden access. | - | +**500** | Unexpected error | - | + +[[Back to top]](#) [[Back to API list]](README.md#documentation-for-api-endpoints) [[Back to Model list]](README.md#documentation-for-models) [[Back to README]](README.md) + +# **getSystemConfig** +> SystemConfig getSystemConfig() + + Version: 9.0.0.cl or later Retrieves the current configuration details of the cluster. If the request is successful, the API returns a list configuration settings applied on the cluster. Requires `ADMINISTRATION`(**Can administer ThoughtSpot**) privilege to view these complete configuration settings of the cluster. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `SYSTEM_INFO_ADMINISTRATION` (**Can view system activities**) privilege is required. This API does not require any parameters to be passed in the request. + +### Example + + +```typescript +import { createBearerAuthenticationConfig, SystemApi, GetSystemConfigRequest } from '@thoughtspot/rest-api-sdk'; + +const configuration = createBearerAuthenticationConfig("CLUSTER_SERVER_URL", { + username: "YOUR_USERNAME", + password: "YOUR_PASSWORD", +}); +const apiInstance = new SystemApi(configuration); + +apiInstance.getSystemConfig().then((data:any) => { + console.log('API called successfully. Returned data: ' + JSON.stringify(data)); +}).catch((error:any) => console.error(error)); + + +``` + + +### Parameters +This endpoint does not need any parameter. + + +### Return type + +**SystemConfig** + +### Authorization + +[bearerAuth](README.md#bearerAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Cluster config information. | - | +**400** | Invalid request. | - | +**401** | Unauthorized access. | - | +**403** | Forbidden access. | - | +**500** | Unexpected error | - | + +[[Back to top]](#) [[Back to API list]](README.md#documentation-for-api-endpoints) [[Back to Model list]](README.md#documentation-for-models) [[Back to README]](README.md) + +# **getSystemInformation** +> SystemInfo getSystemInformation() + + Version: 9.0.0.cl or later Gets system information such as the release version, locale, time zone, deployment environment, date format, and date time format of the cluster. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privileges. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `SYSTEM_INFO_ADMINISTRATION` (**Can view system activities**) privilege is required. This API does not require any parameters to be passed in the request. + +### Example + + +```typescript +import { createBearerAuthenticationConfig, SystemApi, GetSystemInformationRequest } from '@thoughtspot/rest-api-sdk'; + +const configuration = createBearerAuthenticationConfig("CLUSTER_SERVER_URL", { + username: "YOUR_USERNAME", + password: "YOUR_PASSWORD", +}); +const apiInstance = new SystemApi(configuration); + +apiInstance.getSystemInformation().then((data:any) => { + console.log('API called successfully. Returned data: ' + JSON.stringify(data)); +}).catch((error:any) => console.error(error)); + + +``` + + +### Parameters +This endpoint does not need any parameter. + + +### Return type + +**SystemInfo** + +### Authorization + +[bearerAuth](README.md#bearerAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Cluster information. | - | +**400** | Invalid request. | - | +**401** | Unauthorized access. | - | +**403** | Forbidden access. | - | +**500** | Unexpected error | - | + +[[Back to top]](#) [[Back to API list]](README.md#documentation-for-api-endpoints) [[Back to Model list]](README.md#documentation-for-models) [[Back to README]](README.md) + +# **getSystemOverrideInfo** +> SystemOverrideInfo getSystemOverrideInfo() + + Version: 9.2.0.cl or later Gets a list of configuration overrides applied on the cluster. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `APPLICATION_ADMINISTRATION` (**Can manage application settings**) privilege is required. This API does not require any parameters to be passed in the request. + +### Example + + +```typescript +import { createBearerAuthenticationConfig, SystemApi, GetSystemOverrideInfoRequest } from '@thoughtspot/rest-api-sdk'; + +const configuration = createBearerAuthenticationConfig("CLUSTER_SERVER_URL", { + username: "YOUR_USERNAME", + password: "YOUR_PASSWORD", +}); +const apiInstance = new SystemApi(configuration); + +apiInstance.getSystemOverrideInfo().then((data:any) => { + console.log('API called successfully. Returned data: ' + JSON.stringify(data)); +}).catch((error:any) => console.error(error)); + + +``` + + +### Parameters +This endpoint does not need any parameter. + + +### Return type + +**SystemOverrideInfo** + +### Authorization + +[bearerAuth](README.md#bearerAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Cluster configuration which can be overridden. | - | +**400** | Invalid request. | - | +**401** | Unauthorized access. | - | +**403** | Forbidden access. | - | +**500** | Unexpected error | - | + +[[Back to top]](#) [[Back to API list]](README.md#documentation-for-api-endpoints) [[Back to Model list]](README.md#documentation-for-models) [[Back to README]](README.md) + +# **searchCommunicationChannelPreferences** +> CommunicationChannelPreferencesResponse searchCommunicationChannelPreferences(searchCommunicationChannelPreferencesRequest) + + Version: 10.14.0.cl or later Fetch communication channel preferences. - Use `cluster_preferences` to fetch the default preferences for your ThoughtSpot application instance. - If your instance has [Orgs](https://docs.thoughtspot.com/cloud/latest/orgs-overview), use `org_preferences` to fetch any Org-specific preferences that override the defaults. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) or `DEVELOPER` (**Has developer privilege**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, users with `APPLICATION_ADMINISTRATION` (**Can manage application settings**) privilege are also authorized to perform this action. + +### Example + + +```typescript +import { createBearerAuthenticationConfig, SystemApi, SearchCommunicationChannelPreferencesRequest } from '@thoughtspot/rest-api-sdk'; + +const configuration = createBearerAuthenticationConfig("CLUSTER_SERVER_URL", { + username: "YOUR_USERNAME", + password: "YOUR_PASSWORD", +}); +const apiInstance = new SystemApi(configuration); + +apiInstance.searchCommunicationChannelPreferences( + // SearchCommunicationChannelPreferencesRequest + { + cluster_preferences: [ + "LIVEBOARD_SCHEDULE", + ], + org_preferences: [ + { + org_identifier: "org_identifier_example", + event_types: [ + "LIVEBOARD_SCHEDULE", + ], + }, + ], + } +).then((data:any) => { + console.log('API called successfully. Returned data: ' + data); +}).catch((error:any) => console.error(error)); + + +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **searchCommunicationChannelPreferencesRequest** | **SearchCommunicationChannelPreferencesRequest**| | + + +### Return type + +**CommunicationChannelPreferencesResponse** + +### Authorization + +[bearerAuth](README.md#bearerAuth) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Communication channel preferences retrieved successfully. | - | +**400** | Invalid request. | - | +**401** | Unauthorized access. | - | +**403** | Forbidden access. | - | +**500** | Unexpected error | - | + +[[Back to top]](#) [[Back to API list]](README.md#documentation-for-api-endpoints) [[Back to Model list]](README.md#documentation-for-models) [[Back to README]](README.md) + +# **searchSecuritySettings** +> SecuritySettingsResponse searchSecuritySettings(searchSecuritySettingsRequest) + + Version: 26.2.0.cl or later Fetch security settings for your ThoughtSpot application instance. - Use `scope: CLUSTER` to retrieve cluster-level security settings, including CORS and CSP allowlists, SAML redirect URLs, and settings that control access to non-embedded pages. - Use `scope: ORG` to retrieve Org-level security settings. If your instance has [Orgs](https://docs.thoughtspot.com/cloud/latest/orgs-overview), this returns CORS and non-embed access settings specific to the Org. - If `scope` is not specified, returns both cluster and Org-specific settings based on user privileges. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) or `DEVELOPER` (**Has developer privilege**) privilege. See [Security Settings](https://developers.thoughtspot.com/docs/security-settings) for more details. + +### Example + + +```typescript +import { createBearerAuthenticationConfig, SystemApi, SearchSecuritySettingsRequest } from '@thoughtspot/rest-api-sdk'; + +const configuration = createBearerAuthenticationConfig("CLUSTER_SERVER_URL", { + username: "YOUR_USERNAME", + password: "YOUR_PASSWORD", +}); +const apiInstance = new SystemApi(configuration); + +apiInstance.searchSecuritySettings( + // SearchSecuritySettingsRequest + { + scope: "CLUSTER", + } +).then((data:any) => { + console.log('API called successfully. Returned data: ' + data); +}).catch((error:any) => console.error(error)); + + +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **searchSecuritySettingsRequest** | **SearchSecuritySettingsRequest**| | + + +### Return type + +**SecuritySettingsResponse** + +### Authorization + +[bearerAuth](README.md#bearerAuth) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Successfully retrieved the list of security settings. | - | +**400** | Invalid request. | - | +**401** | Unauthorized access. | - | +**403** | Forbidden access. | - | +**500** | Unexpected error | - | + +[[Back to top]](#) [[Back to API list]](README.md#documentation-for-api-endpoints) [[Back to Model list]](README.md#documentation-for-models) [[Back to README]](README.md) + +# **updateSystemConfig** +> void updateSystemConfig(updateSystemConfigRequest) + + Version: 9.2.0.cl or later Updates the current configuration of the cluster. You must send the configuration data in JSON format. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privileges. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `APPLICATION_ADMINISTRATION` (**Can manage application settings**) privilege is required. + +### Example + + +```typescript +import { createBearerAuthenticationConfig, SystemApi, UpdateSystemConfigRequest } from '@thoughtspot/rest-api-sdk'; + +const configuration = createBearerAuthenticationConfig("CLUSTER_SERVER_URL", { + username: "YOUR_USERNAME", + password: "YOUR_PASSWORD", +}); +const apiInstance = new SystemApi(configuration); + +apiInstance.updateSystemConfig( + // UpdateSystemConfigRequest + { + configuration: {}, + } +).then((data:any) => { + console.log('API called successfully. Returned data: ' + data); +}).catch((error:any) => console.error(error)); + + +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **updateSystemConfigRequest** | **UpdateSystemConfigRequest**| | + + +### Return type + +**void** + +### Authorization + +[bearerAuth](README.md#bearerAuth) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**204** | Configuration successfully updated. | - | +**400** | Invalid request. | - | +**401** | Unauthorized access. | - | +**403** | Forbidden access. | - | +**500** | Unexpected error | - | + +[[Back to top]](#) [[Back to API list]](README.md#documentation-for-api-endpoints) [[Back to Model list]](README.md#documentation-for-models) [[Back to README]](README.md) + +# **validateCommunicationChannel** +> CommunicationChannelValidateResponse validateCommunicationChannel(validateCommunicationChannelRequest) + + Version: 26.4.0.cl or later Validates a communication channel configuration to ensure it is properly set up and can receive events. - Use `channel_type` to specify the type of communication channel to validate (e.g., WEBHOOK). - Use `channel_identifier` to provide the unique identifier or name for the communication channel. - Use `event_type` to specify the event type to validate for this channel. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) or `DEVELOPER` (**Has developer privilege**) privilege. For webhook channels, users with `CAN_MANAGE_WEBHOOKS` (**Can manage webhooks**) privilege are also authorized to perform this action. + +### Example + + +```typescript +import { createBearerAuthenticationConfig, SystemApi, ValidateCommunicationChannelRequest } from '@thoughtspot/rest-api-sdk'; + +const configuration = createBearerAuthenticationConfig("CLUSTER_SERVER_URL", { + username: "YOUR_USERNAME", + password: "YOUR_PASSWORD", +}); +const apiInstance = new SystemApi(configuration); + +apiInstance.validateCommunicationChannel( + // ValidateCommunicationChannelRequest + { + channel_type: "WEBHOOK", + channel_identifier: "channel_identifier_example", + event_type: "LIVEBOARD_SCHEDULE", + } +).then((data:any) => { + console.log('API called successfully. Returned data: ' + data); +}).catch((error:any) => console.error(error)); + + +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **validateCommunicationChannelRequest** | **ValidateCommunicationChannelRequest**| | + + +### Return type + +**CommunicationChannelValidateResponse** + +### Authorization + +[bearerAuth](README.md#bearerAuth) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | communication channel configuration validated successfully. | - | +**400** | Invalid request. | - | +**401** | Unauthorized access. | - | +**403** | Forbidden access. | - | +**500** | Unexpected error | - | + +[[Back to top]](#) [[Back to API list]](README.md#documentation-for-api-endpoints) [[Back to Model list]](README.md#documentation-for-models) [[Back to README]](README.md) + diff --git a/sdks/typescript/TagsApi.md b/sdks/typescript/TagsApi.md new file mode 100644 index 000000000..626c79167 --- /dev/null +++ b/sdks/typescript/TagsApi.md @@ -0,0 +1,407 @@ +# ThoughtSpotRestApiSdk.TagsApi + +All URIs are relative to *CLUSTER_URL* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**assignTag**](TagsApi.md#assignTag) | **POST** /api/rest/2.0/tags/assign | +[**createTag**](TagsApi.md#createTag) | **POST** /api/rest/2.0/tags/create | +[**deleteTag**](TagsApi.md#deleteTag) | **POST** /api/rest/2.0/tags/{tag_identifier}/delete | +[**searchTags**](TagsApi.md#searchTags) | **POST** /api/rest/2.0/tags/search | +[**unassignTag**](TagsApi.md#unassignTag) | **POST** /api/rest/2.0/tags/unassign | +[**updateTag**](TagsApi.md#updateTag) | **POST** /api/rest/2.0/tags/{tag_identifier}/update | + + +# **assignTag** +> void assignTag(assignTagRequest) + + Version: 9.0.0.cl or later Assigns tags to Liveboards, Answers, Tables, and Worksheets. Requires edit access to the metadata object. + +### Example + + +```typescript +import { createBearerAuthenticationConfig, TagsApi, AssignTagRequest } from '@thoughtspot/rest-api-sdk'; + +const configuration = createBearerAuthenticationConfig("CLUSTER_SERVER_URL", { + username: "YOUR_USERNAME", + password: "YOUR_PASSWORD", +}); +const apiInstance = new TagsApi(configuration); + +apiInstance.assignTag( + // AssignTagRequest + { + metadata: [ + { + type: "LIVEBOARD", + identifier: "identifier_example", + }, + ], + tag_identifiers: [ + "tag_identifiers_example", + ], + } +).then((data:any) => { + console.log('API called successfully. Returned data: ' + data); +}).catch((error:any) => console.error(error)); + + +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **assignTagRequest** | **AssignTagRequest**| | + + +### Return type + +**void** + +### Authorization + +[bearerAuth](README.md#bearerAuth) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**204** | Tags successfully assigned. | - | +**400** | Invalid request. | - | +**401** | Unauthorized access. | - | +**403** | Forbidden access. | - | +**500** | Unexpected error | - | + +[[Back to top]](#) [[Back to API list]](README.md#documentation-for-api-endpoints) [[Back to Model list]](README.md#documentation-for-models) [[Back to README]](README.md) + +# **createTag** +> Tag createTag(createTagRequest) + + Version: 9.0.0.cl or later Creates a tag object. Tags are labels that identify a metadata object. For example, you can create a tag to designate subject areas, such as sales, HR, marketing, and finance. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `TAGMANAGEMENT` (**Can manage tags**) privilege is required to create, edit, and delete tags. + +### Example + + +```typescript +import { createBearerAuthenticationConfig, TagsApi, CreateTagRequest } from '@thoughtspot/rest-api-sdk'; + +const configuration = createBearerAuthenticationConfig("CLUSTER_SERVER_URL", { + username: "YOUR_USERNAME", + password: "YOUR_PASSWORD", +}); +const apiInstance = new TagsApi(configuration); + +apiInstance.createTag( + // CreateTagRequest + { + name: "name_example", + color: "color_example", + } +).then((data:any) => { + console.log('API called successfully. Returned data: ' + data); +}).catch((error:any) => console.error(error)); + + +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **createTagRequest** | **CreateTagRequest**| | + + +### Return type + +**Tag** + +### Authorization + +[bearerAuth](README.md#bearerAuth) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Tag successfully created. | - | +**400** | Invalid request. | - | +**401** | Unauthorized access. | - | +**403** | Forbidden access. | - | +**500** | Unexpected error | - | + +[[Back to top]](#) [[Back to API list]](README.md#documentation-for-api-endpoints) [[Back to Model list]](README.md#documentation-for-models) [[Back to README]](README.md) + +# **deleteTag** +> void deleteTag() + + Version: 9.0.0.cl or later Deletes a tag object from the ThoughtSpot system Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `TAGMANAGEMENT` (**Can manage tags**) privilege is required to create, edit, and delete tags. + +### Example + + +```typescript +import { createBearerAuthenticationConfig, TagsApi, DeleteTagRequest } from '@thoughtspot/rest-api-sdk'; + +const configuration = createBearerAuthenticationConfig("CLUSTER_SERVER_URL", { + username: "YOUR_USERNAME", + password: "YOUR_PASSWORD", +}); +const apiInstance = new TagsApi(configuration); + +apiInstance.deleteTag( + // string | Tag identifier Tag name or Tag id. + "tag_identifier_example" +).then((data:any) => { + console.log('API called successfully. Returned data: ' + data); +}).catch((error:any) => console.error(error)); + + +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **tagIdentifier** | [**string**] | Tag identifier Tag name or Tag id. | defaults to undefined + + +### Return type + +**void** + +### Authorization + +[bearerAuth](README.md#bearerAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**204** | Tag successfully deleted. | - | +**400** | Invalid request. | - | +**401** | Unauthorized access. | - | +**403** | Forbidden access. | - | +**500** | Unexpected error | - | + +[[Back to top]](#) [[Back to API list]](README.md#documentation-for-api-endpoints) [[Back to Model list]](README.md#documentation-for-models) [[Back to README]](README.md) + +# **searchTags** +> Array searchTags(searchTagsRequest) + + Version: 9.0.0.cl or later Gets a list of tag objects available on the ThoughtSpot system. To get details of a specific tag object, specify the GUID or name. Any authenticated user can search for tag objects. + +### Example + + +```typescript +import { createBearerAuthenticationConfig, TagsApi, SearchTagsRequest } from '@thoughtspot/rest-api-sdk'; + +const configuration = createBearerAuthenticationConfig("CLUSTER_SERVER_URL", { + username: "YOUR_USERNAME", + password: "YOUR_PASSWORD", +}); +const apiInstance = new TagsApi(configuration); + +apiInstance.searchTags( + // SearchTagsRequest + { + tag_identifier: "tag_identifier_example", + name_pattern: "name_pattern_example", + color: "color_example", + } +).then((data:any) => { + console.log('API called successfully. Returned data: ' + data); +}).catch((error:any) => console.error(error)); + + +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **searchTagsRequest** | **SearchTagsRequest**| | + + +### Return type + +**Array** + +### Authorization + +[bearerAuth](README.md#bearerAuth) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Tags search result. | - | +**400** | Invalid request. | - | +**401** | Unauthorized access. | - | +**403** | Forbidden access. | - | +**500** | Unexpected error | - | + +[[Back to top]](#) [[Back to API list]](README.md#documentation-for-api-endpoints) [[Back to Model list]](README.md#documentation-for-models) [[Back to README]](README.md) + +# **unassignTag** +> void unassignTag(unassignTagRequest) + + Version: 9.0.0.cl or later Removes the tags applied to a Liveboard, Answer, Table, or Worksheet. Requires edit access to the metadata object. + +### Example + + +```typescript +import { createBearerAuthenticationConfig, TagsApi, UnassignTagRequest } from '@thoughtspot/rest-api-sdk'; + +const configuration = createBearerAuthenticationConfig("CLUSTER_SERVER_URL", { + username: "YOUR_USERNAME", + password: "YOUR_PASSWORD", +}); +const apiInstance = new TagsApi(configuration); + +apiInstance.unassignTag( + // UnassignTagRequest + { + metadata: [ + { + type: "LIVEBOARD", + identifier: "identifier_example", + }, + ], + tag_identifiers: [ + "tag_identifiers_example", + ], + } +).then((data:any) => { + console.log('API called successfully. Returned data: ' + data); +}).catch((error:any) => console.error(error)); + + +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **unassignTagRequest** | **UnassignTagRequest**| | + + +### Return type + +**void** + +### Authorization + +[bearerAuth](README.md#bearerAuth) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**204** | Tags successfully unassigned. | - | +**400** | Invalid request. | - | +**401** | Unauthorized access. | - | +**403** | Forbidden access. | - | +**500** | Unexpected error | - | + +[[Back to top]](#) [[Back to API list]](README.md#documentation-for-api-endpoints) [[Back to Model list]](README.md#documentation-for-models) [[Back to README]](README.md) + +# **updateTag** +> void updateTag(updateTagRequest) + + Version: 9.0.0.cl or later Updates a tag object. You can modify the `name` and `color` properties of a tag object. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `TAGMANAGEMENT` (**Can manage tags**) privilege is required to create, edit, and delete tags. + +### Example + + +```typescript +import { createBearerAuthenticationConfig, TagsApi, UpdateTagRequest } from '@thoughtspot/rest-api-sdk'; + +const configuration = createBearerAuthenticationConfig("CLUSTER_SERVER_URL", { + username: "YOUR_USERNAME", + password: "YOUR_PASSWORD", +}); +const apiInstance = new TagsApi(configuration); + +apiInstance.updateTag( + // string | Name or Id of the tag. + "tag_identifier_example" , + // UpdateTagRequest + { + name: "name_example", + color: "color_example", + } +).then((data:any) => { + console.log('API called successfully. Returned data: ' + data); +}).catch((error:any) => console.error(error)); + + +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **updateTagRequest** | **UpdateTagRequest**| | + **tagIdentifier** | [**string**] | Name or Id of the tag. | defaults to undefined + + +### Return type + +**void** + +### Authorization + +[bearerAuth](README.md#bearerAuth) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**204** | Tag successfully updated. | - | +**400** | Invalid request. | - | +**401** | Unauthorized access. | - | +**403** | Forbidden access. | - | +**500** | Unexpected error | - | + +[[Back to top]](#) [[Back to API list]](README.md#documentation-for-api-endpoints) [[Back to Model list]](README.md#documentation-for-models) [[Back to README]](README.md) + diff --git a/sdks/typescript/ThoughtSpotRestApi.md b/sdks/typescript/ThoughtSpotRestApi.md new file mode 100644 index 000000000..45970a8c5 --- /dev/null +++ b/sdks/typescript/ThoughtSpotRestApi.md @@ -0,0 +1,11278 @@ +# ThoughtSpotRestApiSdk.ThoughtSpotRestApi + +All URIs are relative to *CLUSTER_URL* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**activateUser**](ThoughtSpotRestApi.md#activateUser) | **POST** /api/rest/2.0/users/activate | +[**assignChangeAuthor**](ThoughtSpotRestApi.md#assignChangeAuthor) | **POST** /api/rest/2.0/security/metadata/assign | +[**assignTag**](ThoughtSpotRestApi.md#assignTag) | **POST** /api/rest/2.0/tags/assign | +[**changeUserPassword**](ThoughtSpotRestApi.md#changeUserPassword) | **POST** /api/rest/2.0/users/change-password | +[**commitBranch**](ThoughtSpotRestApi.md#commitBranch) | **POST** /api/rest/2.0/vcs/git/branches/commit | +[**configureAuthSettings**](ThoughtSpotRestApi.md#configureAuthSettings) | **POST** /api/rest/2.0/auth/configure | +[**configureCommunicationChannelPreferences**](ThoughtSpotRestApi.md#configureCommunicationChannelPreferences) | **POST** /api/rest/2.0/system/preferences/communication-channels/configure | +[**configureSecuritySettings**](ThoughtSpotRestApi.md#configureSecuritySettings) | **POST** /api/rest/2.0/system/security-settings/configure | +[**connectionConfigurationSearch**](ThoughtSpotRestApi.md#connectionConfigurationSearch) | **POST** /api/rest/2.0/connection-configurations/search | +[**convertWorksheetToModel**](ThoughtSpotRestApi.md#convertWorksheetToModel) | **POST** /api/rest/2.0/metadata/worksheets/convert | +[**copyObject**](ThoughtSpotRestApi.md#copyObject) | **POST** /api/rest/2.0/metadata/copyobject | +[**createAgentConversation**](ThoughtSpotRestApi.md#createAgentConversation) | **POST** /api/rest/2.0/ai/agent/conversation/create | +[**createCalendar**](ThoughtSpotRestApi.md#createCalendar) | **POST** /api/rest/2.0/calendars/create | +[**createCollection**](ThoughtSpotRestApi.md#createCollection) | **POST** /api/rest/2.0/collections/create | +[**createConfig**](ThoughtSpotRestApi.md#createConfig) | **POST** /api/rest/2.0/vcs/git/config/create | +[**createConnection**](ThoughtSpotRestApi.md#createConnection) | **POST** /api/rest/2.0/connection/create | +[**createConnectionConfiguration**](ThoughtSpotRestApi.md#createConnectionConfiguration) | **POST** /api/rest/2.0/connection-configurations/create | +[**createConversation**](ThoughtSpotRestApi.md#createConversation) | **POST** /api/rest/2.0/ai/conversation/create | +[**createCustomAction**](ThoughtSpotRestApi.md#createCustomAction) | **POST** /api/rest/2.0/customization/custom-actions | +[**createEmailCustomization**](ThoughtSpotRestApi.md#createEmailCustomization) | **POST** /api/rest/2.0/customization/email | +[**createOrg**](ThoughtSpotRestApi.md#createOrg) | **POST** /api/rest/2.0/orgs/create | +[**createRole**](ThoughtSpotRestApi.md#createRole) | **POST** /api/rest/2.0/roles/create | +[**createSchedule**](ThoughtSpotRestApi.md#createSchedule) | **POST** /api/rest/2.0/schedules/create | +[**createTag**](ThoughtSpotRestApi.md#createTag) | **POST** /api/rest/2.0/tags/create | +[**createUser**](ThoughtSpotRestApi.md#createUser) | **POST** /api/rest/2.0/users/create | +[**createUserGroup**](ThoughtSpotRestApi.md#createUserGroup) | **POST** /api/rest/2.0/groups/create | +[**createVariable**](ThoughtSpotRestApi.md#createVariable) | **POST** /api/rest/2.0/template/variables/create | +[**createWebhookConfiguration**](ThoughtSpotRestApi.md#createWebhookConfiguration) | **POST** /api/rest/2.0/webhooks/create | +[**dbtConnection**](ThoughtSpotRestApi.md#dbtConnection) | **POST** /api/rest/2.0/dbt/dbt-connection | +[**dbtGenerateSyncTml**](ThoughtSpotRestApi.md#dbtGenerateSyncTml) | **POST** /api/rest/2.0/dbt/generate-sync-tml | +[**dbtGenerateTml**](ThoughtSpotRestApi.md#dbtGenerateTml) | **POST** /api/rest/2.0/dbt/generate-tml | +[**dbtSearch**](ThoughtSpotRestApi.md#dbtSearch) | **POST** /api/rest/2.0/dbt/search | +[**deactivateUser**](ThoughtSpotRestApi.md#deactivateUser) | **POST** /api/rest/2.0/users/deactivate | +[**deleteCalendar**](ThoughtSpotRestApi.md#deleteCalendar) | **POST** /api/rest/2.0/calendars/{calendar_identifier}/delete | +[**deleteCollection**](ThoughtSpotRestApi.md#deleteCollection) | **POST** /api/rest/2.0/collections/delete | +[**deleteConfig**](ThoughtSpotRestApi.md#deleteConfig) | **POST** /api/rest/2.0/vcs/git/config/delete | +[**deleteConnection**](ThoughtSpotRestApi.md#deleteConnection) | **POST** /api/rest/2.0/connection/delete | +[**deleteConnectionConfiguration**](ThoughtSpotRestApi.md#deleteConnectionConfiguration) | **POST** /api/rest/2.0/connection-configurations/delete | +[**deleteConnectionV2**](ThoughtSpotRestApi.md#deleteConnectionV2) | **POST** /api/rest/2.0/connections/{connection_identifier}/delete | +[**deleteCustomAction**](ThoughtSpotRestApi.md#deleteCustomAction) | **POST** /api/rest/2.0/customization/custom-actions/{custom_action_identifier}/delete | +[**deleteDbtConnection**](ThoughtSpotRestApi.md#deleteDbtConnection) | **POST** /api/rest/2.0/dbt/{dbt_connection_identifier}/delete | +[**deleteEmailCustomization**](ThoughtSpotRestApi.md#deleteEmailCustomization) | **POST** /api/rest/2.0/customization/email/{template_identifier}/delete | +[**deleteMetadata**](ThoughtSpotRestApi.md#deleteMetadata) | **POST** /api/rest/2.0/metadata/delete | +[**deleteOrg**](ThoughtSpotRestApi.md#deleteOrg) | **POST** /api/rest/2.0/orgs/{org_identifier}/delete | +[**deleteOrgEmailCustomization**](ThoughtSpotRestApi.md#deleteOrgEmailCustomization) | **POST** /api/rest/2.0/customization/email/delete | +[**deleteRole**](ThoughtSpotRestApi.md#deleteRole) | **POST** /api/rest/2.0/roles/{role_identifier}/delete | +[**deleteSchedule**](ThoughtSpotRestApi.md#deleteSchedule) | **POST** /api/rest/2.0/schedules/{schedule_identifier}/delete | +[**deleteTag**](ThoughtSpotRestApi.md#deleteTag) | **POST** /api/rest/2.0/tags/{tag_identifier}/delete | +[**deleteUser**](ThoughtSpotRestApi.md#deleteUser) | **POST** /api/rest/2.0/users/{user_identifier}/delete | +[**deleteUserGroup**](ThoughtSpotRestApi.md#deleteUserGroup) | **POST** /api/rest/2.0/groups/{group_identifier}/delete | +[**deleteVariable**](ThoughtSpotRestApi.md#deleteVariable) | **POST** /api/rest/2.0/template/variables/{identifier}/delete | +[**deleteVariables**](ThoughtSpotRestApi.md#deleteVariables) | **POST** /api/rest/2.0/template/variables/delete | +[**deleteWebhookConfigurations**](ThoughtSpotRestApi.md#deleteWebhookConfigurations) | **POST** /api/rest/2.0/webhooks/delete | +[**deployCommit**](ThoughtSpotRestApi.md#deployCommit) | **POST** /api/rest/2.0/vcs/git/commits/deploy | +[**downloadConnectionMetadataChanges**](ThoughtSpotRestApi.md#downloadConnectionMetadataChanges) | **POST** /api/rest/2.0/connections/download-connection-metadata-changes/{connection_identifier} | +[**exportAnswerReport**](ThoughtSpotRestApi.md#exportAnswerReport) | **POST** /api/rest/2.0/report/answer | +[**exportLiveboardReport**](ThoughtSpotRestApi.md#exportLiveboardReport) | **POST** /api/rest/2.0/report/liveboard | +[**exportMetadataTML**](ThoughtSpotRestApi.md#exportMetadataTML) | **POST** /api/rest/2.0/metadata/tml/export | +[**exportMetadataTMLBatched**](ThoughtSpotRestApi.md#exportMetadataTMLBatched) | **POST** /api/rest/2.0/metadata/tml/export/batch | +[**fetchAnswerData**](ThoughtSpotRestApi.md#fetchAnswerData) | **POST** /api/rest/2.0/metadata/answer/data | +[**fetchAnswerSqlQuery**](ThoughtSpotRestApi.md#fetchAnswerSqlQuery) | **POST** /api/rest/2.0/metadata/answer/sql | +[**fetchAsyncImportTaskStatus**](ThoughtSpotRestApi.md#fetchAsyncImportTaskStatus) | **POST** /api/rest/2.0/metadata/tml/async/status | +[**fetchColumnSecurityRules**](ThoughtSpotRestApi.md#fetchColumnSecurityRules) | **POST** /api/rest/2.0/security/column/rules/fetch | +[**fetchConnectionDiffStatus**](ThoughtSpotRestApi.md#fetchConnectionDiffStatus) | **POST** /api/rest/2.0/connections/fetch-connection-diff-status/{connection_identifier} | +[**fetchLiveboardData**](ThoughtSpotRestApi.md#fetchLiveboardData) | **POST** /api/rest/2.0/metadata/liveboard/data | +[**fetchLiveboardSqlQuery**](ThoughtSpotRestApi.md#fetchLiveboardSqlQuery) | **POST** /api/rest/2.0/metadata/liveboard/sql | +[**fetchLogs**](ThoughtSpotRestApi.md#fetchLogs) | **POST** /api/rest/2.0/logs/fetch | +[**fetchObjectPrivileges**](ThoughtSpotRestApi.md#fetchObjectPrivileges) | **POST** /api/rest/2.0/security/metadata/fetch-object-privileges | +[**fetchPermissionsOfPrincipals**](ThoughtSpotRestApi.md#fetchPermissionsOfPrincipals) | **POST** /api/rest/2.0/security/principals/fetch-permissions | +[**fetchPermissionsOnMetadata**](ThoughtSpotRestApi.md#fetchPermissionsOnMetadata) | **POST** /api/rest/2.0/security/metadata/fetch-permissions | +[**forceLogoutUsers**](ThoughtSpotRestApi.md#forceLogoutUsers) | **POST** /api/rest/2.0/users/force-logout | +[**generateCSV**](ThoughtSpotRestApi.md#generateCSV) | **POST** /api/rest/2.0/calendars/generate-csv | +[**getCurrentUserInfo**](ThoughtSpotRestApi.md#getCurrentUserInfo) | **GET** /api/rest/2.0/auth/session/user | +[**getCurrentUserToken**](ThoughtSpotRestApi.md#getCurrentUserToken) | **GET** /api/rest/2.0/auth/session/token | +[**getCustomAccessToken**](ThoughtSpotRestApi.md#getCustomAccessToken) | **POST** /api/rest/2.0/auth/token/custom | +[**getDataSourceSuggestions**](ThoughtSpotRestApi.md#getDataSourceSuggestions) | **POST** /api/rest/2.0/ai/data-source-suggestions | +[**getFullAccessToken**](ThoughtSpotRestApi.md#getFullAccessToken) | **POST** /api/rest/2.0/auth/token/full | +[**getNLInstructions**](ThoughtSpotRestApi.md#getNLInstructions) | **POST** /api/rest/2.0/ai/instructions/get | +[**getObjectAccessToken**](ThoughtSpotRestApi.md#getObjectAccessToken) | **POST** /api/rest/2.0/auth/token/object | +[**getRelevantQuestions**](ThoughtSpotRestApi.md#getRelevantQuestions) | **POST** /api/rest/2.0/ai/relevant-questions/ | +[**getSystemConfig**](ThoughtSpotRestApi.md#getSystemConfig) | **GET** /api/rest/2.0/system/config | +[**getSystemInformation**](ThoughtSpotRestApi.md#getSystemInformation) | **GET** /api/rest/2.0/system | +[**getSystemOverrideInfo**](ThoughtSpotRestApi.md#getSystemOverrideInfo) | **GET** /api/rest/2.0/system/config-overrides | +[**importMetadataTML**](ThoughtSpotRestApi.md#importMetadataTML) | **POST** /api/rest/2.0/metadata/tml/import | +[**importMetadataTMLAsync**](ThoughtSpotRestApi.md#importMetadataTMLAsync) | **POST** /api/rest/2.0/metadata/tml/async/import | +[**importUserGroups**](ThoughtSpotRestApi.md#importUserGroups) | **POST** /api/rest/2.0/groups/import | +[**importUsers**](ThoughtSpotRestApi.md#importUsers) | **POST** /api/rest/2.0/users/import | +[**login**](ThoughtSpotRestApi.md#login) | **POST** /api/rest/2.0/auth/session/login | +[**logout**](ThoughtSpotRestApi.md#logout) | **POST** /api/rest/2.0/auth/session/logout | +[**manageObjectPrivilege**](ThoughtSpotRestApi.md#manageObjectPrivilege) | **POST** /api/rest/2.0/security/metadata/manage-object-privilege | +[**parameterizeMetadata**](ThoughtSpotRestApi.md#parameterizeMetadata) | **POST** /api/rest/2.0/metadata/parameterize | +[**parameterizeMetadataFields**](ThoughtSpotRestApi.md#parameterizeMetadataFields) | **POST** /api/rest/2.0/metadata/parameterize-fields | +[**publishMetadata**](ThoughtSpotRestApi.md#publishMetadata) | **POST** /api/rest/2.0/security/metadata/publish | +[**putVariableValues**](ThoughtSpotRestApi.md#putVariableValues) | **POST** /api/rest/2.0/template/variables/{identifier}/update-values | +[**queryGetDecomposedQuery**](ThoughtSpotRestApi.md#queryGetDecomposedQuery) | **POST** /api/rest/2.0/ai/analytical-questions | +[**resetUserPassword**](ThoughtSpotRestApi.md#resetUserPassword) | **POST** /api/rest/2.0/users/reset-password | +[**revertCommit**](ThoughtSpotRestApi.md#revertCommit) | **POST** /api/rest/2.0/vcs/git/commits/{commit_id}/revert | +[**revokeRefreshTokens**](ThoughtSpotRestApi.md#revokeRefreshTokens) | **POST** /api/rest/2.0/connections/{connection_identifier}/revoke-refresh-tokens | +[**revokeToken**](ThoughtSpotRestApi.md#revokeToken) | **POST** /api/rest/2.0/auth/token/revoke | +[**searchAuthSettings**](ThoughtSpotRestApi.md#searchAuthSettings) | **POST** /api/rest/2.0/auth/search | +[**searchCalendars**](ThoughtSpotRestApi.md#searchCalendars) | **POST** /api/rest/2.0/calendars/search | +[**searchChannelHistory**](ThoughtSpotRestApi.md#searchChannelHistory) | **POST** /api/rest/2.0/jobs/history/communication-channels/search | +[**searchCollections**](ThoughtSpotRestApi.md#searchCollections) | **POST** /api/rest/2.0/collections/search | +[**searchCommits**](ThoughtSpotRestApi.md#searchCommits) | **POST** /api/rest/2.0/vcs/git/commits/search | +[**searchCommunicationChannelPreferences**](ThoughtSpotRestApi.md#searchCommunicationChannelPreferences) | **POST** /api/rest/2.0/system/preferences/communication-channels/search | +[**searchConfig**](ThoughtSpotRestApi.md#searchConfig) | **POST** /api/rest/2.0/vcs/git/config/search | +[**searchConnection**](ThoughtSpotRestApi.md#searchConnection) | **POST** /api/rest/2.0/connection/search | +[**searchCustomActions**](ThoughtSpotRestApi.md#searchCustomActions) | **POST** /api/rest/2.0/customization/custom-actions/search | +[**searchData**](ThoughtSpotRestApi.md#searchData) | **POST** /api/rest/2.0/searchdata | +[**searchEmailCustomization**](ThoughtSpotRestApi.md#searchEmailCustomization) | **POST** /api/rest/2.0/customization/email/search | +[**searchMetadata**](ThoughtSpotRestApi.md#searchMetadata) | **POST** /api/rest/2.0/metadata/search | +[**searchOrgs**](ThoughtSpotRestApi.md#searchOrgs) | **POST** /api/rest/2.0/orgs/search | +[**searchRoles**](ThoughtSpotRestApi.md#searchRoles) | **POST** /api/rest/2.0/roles/search | +[**searchSchedules**](ThoughtSpotRestApi.md#searchSchedules) | **POST** /api/rest/2.0/schedules/search | +[**searchSecuritySettings**](ThoughtSpotRestApi.md#searchSecuritySettings) | **POST** /api/rest/2.0/system/security-settings/search | +[**searchTags**](ThoughtSpotRestApi.md#searchTags) | **POST** /api/rest/2.0/tags/search | +[**searchUserGroups**](ThoughtSpotRestApi.md#searchUserGroups) | **POST** /api/rest/2.0/groups/search | +[**searchUsers**](ThoughtSpotRestApi.md#searchUsers) | **POST** /api/rest/2.0/users/search | +[**searchVariables**](ThoughtSpotRestApi.md#searchVariables) | **POST** /api/rest/2.0/template/variables/search | +[**searchWebhookConfigurations**](ThoughtSpotRestApi.md#searchWebhookConfigurations) | **POST** /api/rest/2.0/webhooks/search | +[**sendAgentConversationMessage**](ThoughtSpotRestApi.md#sendAgentConversationMessage) | **POST** /api/rest/2.0/ai/agent/conversation/{conversation_identifier}/send | +[**sendAgentConversationMessageStreaming**](ThoughtSpotRestApi.md#sendAgentConversationMessageStreaming) | **POST** /api/rest/2.0/ai/agent/conversation/{conversation_identifier}/send/stream | +[**sendAgentMessage**](ThoughtSpotRestApi.md#sendAgentMessage) | **POST** /api/rest/2.0/ai/agent/{conversation_identifier}/converse | +[**sendAgentMessageStreaming**](ThoughtSpotRestApi.md#sendAgentMessageStreaming) | **POST** /api/rest/2.0/ai/agent/converse/sse | +[**sendMessage**](ThoughtSpotRestApi.md#sendMessage) | **POST** /api/rest/2.0/ai/conversation/{conversation_identifier}/converse | +[**setNLInstructions**](ThoughtSpotRestApi.md#setNLInstructions) | **POST** /api/rest/2.0/ai/instructions/set | +[**shareMetadata**](ThoughtSpotRestApi.md#shareMetadata) | **POST** /api/rest/2.0/security/metadata/share | +[**singleAnswer**](ThoughtSpotRestApi.md#singleAnswer) | **POST** /api/rest/2.0/ai/answer/create | +[**stopConversation**](ThoughtSpotRestApi.md#stopConversation) | **POST** /api/rest/2.0/ai/agent/conversation/{conversation_identifier}/stop-response | +[**syncMetadata**](ThoughtSpotRestApi.md#syncMetadata) | **POST** /api/rest/2.0/connections/{connection_identifier}/resync-metadata | +[**unassignTag**](ThoughtSpotRestApi.md#unassignTag) | **POST** /api/rest/2.0/tags/unassign | +[**unparameterizeMetadata**](ThoughtSpotRestApi.md#unparameterizeMetadata) | **POST** /api/rest/2.0/metadata/unparameterize | +[**unpublishMetadata**](ThoughtSpotRestApi.md#unpublishMetadata) | **POST** /api/rest/2.0/security/metadata/unpublish | +[**updateCalendar**](ThoughtSpotRestApi.md#updateCalendar) | **POST** /api/rest/2.0/calendars/{calendar_identifier}/update | +[**updateCollection**](ThoughtSpotRestApi.md#updateCollection) | **POST** /api/rest/2.0/collections/{collection_identifier}/update | +[**updateColumnSecurityRules**](ThoughtSpotRestApi.md#updateColumnSecurityRules) | **POST** /api/rest/2.0/security/column/rules/update | +[**updateConfig**](ThoughtSpotRestApi.md#updateConfig) | **POST** /api/rest/2.0/vcs/git/config/update | +[**updateConnection**](ThoughtSpotRestApi.md#updateConnection) | **POST** /api/rest/2.0/connection/update | +[**updateConnectionConfiguration**](ThoughtSpotRestApi.md#updateConnectionConfiguration) | **POST** /api/rest/2.0/connection-configurations/{configuration_identifier}/update | +[**updateConnectionStatus**](ThoughtSpotRestApi.md#updateConnectionStatus) | **POST** /api/rest/2.0/connections/{connection_identifier}/status | +[**updateConnectionV2**](ThoughtSpotRestApi.md#updateConnectionV2) | **POST** /api/rest/2.0/connections/{connection_identifier}/update | +[**updateCustomAction**](ThoughtSpotRestApi.md#updateCustomAction) | **POST** /api/rest/2.0/customization/custom-actions/{custom_action_identifier}/update | +[**updateDbtConnection**](ThoughtSpotRestApi.md#updateDbtConnection) | **POST** /api/rest/2.0/dbt/update-dbt-connection | +[**updateEmailCustomization**](ThoughtSpotRestApi.md#updateEmailCustomization) | **POST** /api/rest/2.0/customization/email/update | +[**updateMetadataHeader**](ThoughtSpotRestApi.md#updateMetadataHeader) | **POST** /api/rest/2.0/metadata/headers/update | +[**updateMetadataObjId**](ThoughtSpotRestApi.md#updateMetadataObjId) | **POST** /api/rest/2.0/metadata/update-obj-id | +[**updateOrg**](ThoughtSpotRestApi.md#updateOrg) | **POST** /api/rest/2.0/orgs/{org_identifier}/update | +[**updateRole**](ThoughtSpotRestApi.md#updateRole) | **POST** /api/rest/2.0/roles/{role_identifier}/update | +[**updateSchedule**](ThoughtSpotRestApi.md#updateSchedule) | **POST** /api/rest/2.0/schedules/{schedule_identifier}/update | +[**updateSystemConfig**](ThoughtSpotRestApi.md#updateSystemConfig) | **POST** /api/rest/2.0/system/config-update | +[**updateTag**](ThoughtSpotRestApi.md#updateTag) | **POST** /api/rest/2.0/tags/{tag_identifier}/update | +[**updateUser**](ThoughtSpotRestApi.md#updateUser) | **POST** /api/rest/2.0/users/{user_identifier}/update | +[**updateUserGroup**](ThoughtSpotRestApi.md#updateUserGroup) | **POST** /api/rest/2.0/groups/{group_identifier}/update | +[**updateVariable**](ThoughtSpotRestApi.md#updateVariable) | **POST** /api/rest/2.0/template/variables/{identifier}/update | +[**updateVariableValues**](ThoughtSpotRestApi.md#updateVariableValues) | **POST** /api/rest/2.0/template/variables/update-values | +[**updateWebhookConfiguration**](ThoughtSpotRestApi.md#updateWebhookConfiguration) | **POST** /api/rest/2.0/webhooks/{webhook_identifier}/update | +[**validateCommunicationChannel**](ThoughtSpotRestApi.md#validateCommunicationChannel) | **POST** /api/rest/2.0/system/communication-channels/validate | +[**validateEmailCustomization**](ThoughtSpotRestApi.md#validateEmailCustomization) | **POST** /api/rest/2.0/customization/email/validate | +[**validateMerge**](ThoughtSpotRestApi.md#validateMerge) | **POST** /api/rest/2.0/vcs/git/branches/validate | +[**validateToken**](ThoughtSpotRestApi.md#validateToken) | **POST** /api/rest/2.0/auth/token/validate | + + +# **activateUser** +> User activateUser(activateUserRequest) + + Version: 9.7.0.cl or later Activates a deactivated user account. Requires `ADMINISTRATION` (**Can administer Thoughtspot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `USER_ADMINISTRATION` (**Can manage users**) privilege is required. To activate an inactive user account, the API request body must include the following information: - Username or the GUID of the user account. - Auth token generated for the deactivated user. The auth token is sent in the API response when a user is deactivated. - Password for the user account. + +### Example + + +```typescript +import { createBearerAuthenticationConfig, ThoughtSpotRestApi, ActivateUserRequest } from '@thoughtspot/rest-api-sdk'; + +const configuration = createBearerAuthenticationConfig("CLUSTER_SERVER_URL", { + username: "YOUR_USERNAME", + password: "YOUR_PASSWORD", +}); +const apiInstance = new ThoughtSpotRestApi(configuration); + +apiInstance.activateUser( + // ActivateUserRequest + { + user_identifier: "user_identifier_example", + auth_token: "auth_token_example", + password: "password_example", + properties: "properties_example", + } +).then((data:any) => { + console.log('API called successfully. Returned data: ' + data); +}).catch((error:any) => console.error(error)); + + +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **activateUserRequest** | **ActivateUserRequest**| | + + +### Return type + +**User** + +### Authorization + +[bearerAuth](README.md#bearerAuth) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | User activated successfully. | - | +**400** | Invalid request. | - | +**401** | Unauthorized access. | - | +**403** | Forbidden access. | - | +**500** | Unexpected error | - | + +[[Back to top]](#) [[Back to API list]](README.md#documentation-for-api-endpoints) [[Back to Model list]](README.md#documentation-for-models) [[Back to README]](README.md) + +# **assignChangeAuthor** +> void assignChangeAuthor(assignChangeAuthorRequest) + + Version: 9.0.0.cl or later Transfers the ownership of one or several objects from one user to another. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `USER_ADMINISTRATION` (**Can manage users**) privilege and edit access to the objects are required. + +### Example + + +```typescript +import { createBearerAuthenticationConfig, ThoughtSpotRestApi, AssignChangeAuthorRequest } from '@thoughtspot/rest-api-sdk'; + +const configuration = createBearerAuthenticationConfig("CLUSTER_SERVER_URL", { + username: "YOUR_USERNAME", + password: "YOUR_PASSWORD", +}); +const apiInstance = new ThoughtSpotRestApi(configuration); + +apiInstance.assignChangeAuthor( + // AssignChangeAuthorRequest + { + metadata: [ + { + type: "LIVEBOARD", + identifier: "identifier_example", + }, + ], + user_identifier: "user_identifier_example", + current_owner_identifier: "current_owner_identifier_example", + } +).then((data:any) => { + console.log('API called successfully. Returned data: ' + data); +}).catch((error:any) => console.error(error)); + + +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **assignChangeAuthorRequest** | **AssignChangeAuthorRequest**| | + + +### Return type + +**void** + +### Authorization + +[bearerAuth](README.md#bearerAuth) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**204** | Author assignment for given metadata objects is successful. | - | +**400** | Invalid request. | - | +**401** | Unauthorized access. | - | +**403** | Forbidden access. | - | +**500** | Unexpected error | - | + +[[Back to top]](#) [[Back to API list]](README.md#documentation-for-api-endpoints) [[Back to Model list]](README.md#documentation-for-models) [[Back to README]](README.md) + +# **assignTag** +> void assignTag(assignTagRequest) + + Version: 9.0.0.cl or later Assigns tags to Liveboards, Answers, Tables, and Worksheets. Requires edit access to the metadata object. + +### Example + + +```typescript +import { createBearerAuthenticationConfig, ThoughtSpotRestApi, AssignTagRequest } from '@thoughtspot/rest-api-sdk'; + +const configuration = createBearerAuthenticationConfig("CLUSTER_SERVER_URL", { + username: "YOUR_USERNAME", + password: "YOUR_PASSWORD", +}); +const apiInstance = new ThoughtSpotRestApi(configuration); + +apiInstance.assignTag( + // AssignTagRequest + { + metadata: [ + { + type: "LIVEBOARD", + identifier: "identifier_example", + }, + ], + tag_identifiers: [ + "tag_identifiers_example", + ], + } +).then((data:any) => { + console.log('API called successfully. Returned data: ' + data); +}).catch((error:any) => console.error(error)); + + +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **assignTagRequest** | **AssignTagRequest**| | + + +### Return type + +**void** + +### Authorization + +[bearerAuth](README.md#bearerAuth) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**204** | Tags successfully assigned. | - | +**400** | Invalid request. | - | +**401** | Unauthorized access. | - | +**403** | Forbidden access. | - | +**500** | Unexpected error | - | + +[[Back to top]](#) [[Back to API list]](README.md#documentation-for-api-endpoints) [[Back to Model list]](README.md#documentation-for-models) [[Back to README]](README.md) + +# **changeUserPassword** +> void changeUserPassword(changeUserPasswordRequest) + + Version: 9.0.0.cl or later Updates the current password of the user. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `USER_ADMINISTRATION` (**Can manage users**) privilege is required. + +### Example + + +```typescript +import { createBearerAuthenticationConfig, ThoughtSpotRestApi, ChangeUserPasswordRequest } from '@thoughtspot/rest-api-sdk'; + +const configuration = createBearerAuthenticationConfig("CLUSTER_SERVER_URL", { + username: "YOUR_USERNAME", + password: "YOUR_PASSWORD", +}); +const apiInstance = new ThoughtSpotRestApi(configuration); + +apiInstance.changeUserPassword( + // ChangeUserPasswordRequest + { + current_password: "current_password_example", + new_password: "new_password_example", + user_identifier: "user_identifier_example", + } +).then((data:any) => { + console.log('API called successfully. Returned data: ' + data); +}).catch((error:any) => console.error(error)); + + +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **changeUserPasswordRequest** | **ChangeUserPasswordRequest**| | + + +### Return type + +**void** + +### Authorization + +[bearerAuth](README.md#bearerAuth) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**204** | User password change operation successful. | - | +**400** | Invalid request. | - | +**401** | Unauthorized access. | - | +**403** | Forbidden access. | - | +**500** | Unexpected error | - | + +[[Back to top]](#) [[Back to API list]](README.md#documentation-for-api-endpoints) [[Back to Model list]](README.md#documentation-for-models) [[Back to README]](README.md) + +# **commitBranch** +> CommitResponse commitBranch(commitBranchRequest) + + Version: 9.2.0.cl or later Commits TML files of metadata objects to the Git branch configured on your instance. Requires at least edit access to objects used in the commit operation. Before using this endpoint to push your commits: * Enable Git integration on your instance. * Make sure the Git repository and branch details are configured on your instance. For more information, see [Git integration documentation](https://developers.thoughtspot.com/docs/git-integration). + +### Example + + +```typescript +import { createBearerAuthenticationConfig, ThoughtSpotRestApi, CommitBranchRequest } from '@thoughtspot/rest-api-sdk'; + +const configuration = createBearerAuthenticationConfig("CLUSTER_SERVER_URL", { + username: "YOUR_USERNAME", + password: "YOUR_PASSWORD", +}); +const apiInstance = new ThoughtSpotRestApi(configuration); + +apiInstance.commitBranch( + // CommitBranchRequest + { + metadata: [ + { + identifier: "identifier_example", + type: "LIVEBOARD", + }, + ], + delete_aware: true, + branch_name: "branch_name_example", + comment: "comment_example", + } +).then((data:any) => { + console.log('API called successfully. Returned data: ' + data); +}).catch((error:any) => console.error(error)); + + +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **commitBranchRequest** | **CommitBranchRequest**| | + + +### Return type + +**CommitResponse** + +### Authorization + +[bearerAuth](README.md#bearerAuth) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Successfully committed the metadata objects | - | +**400** | Invalid request. | - | +**401** | Unauthorized access. | - | +**403** | Forbidden access. | - | +**500** | Unexpected error | - | + +[[Back to top]](#) [[Back to API list]](README.md#documentation-for-api-endpoints) [[Back to Model list]](README.md#documentation-for-models) [[Back to README]](README.md) + +# **configureAuthSettings** +> void configureAuthSettings(configureAuthSettingsRequest) + + Version: 26.6.0.cl or later Enables or disables authentication at cluster or org level for the specified auth type. Currently supports `TRUSTED_AUTH`. #### Required privileges Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) or `CONTROL_TRUSTED_AUTH` (**Can Enable or Disable Trusted Authentication**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled, the `CONTROL_TRUSTED_AUTH` privilege is required. #### Usage guidelines Use `cluster_preferences` to enable or disable authentication at the cluster level. Cluster-level settings can only be configured from the Primary Org. - `ENABLED` — Generates a new access token if one does not exist. An existing token is preserved. - `DISABLED` — Revokes the existing cluster-level access token. Use `org_preferences` to enable or disable authentication for one or more Orgs. Each entry must include an `org_identifier` (unique ID or name) and an `auth_status`. Org-level configuration requires the per-Org authentication feature to be enabled on your instance. - `ENABLED` — Generates a new org-level access token if one does not exist. - `DISABLED` — Revokes the existing org-level access token for that Org. Both `cluster_preferences` and `org_preferences` are optional. Omitting a field leaves the corresponding settings unchanged. If both are omitted, the API returns `204 No Content` without making any changes. **Note**: Cluster-level and org-level settings are independent of each other. Enabling or disabling one does not affect the other. + +### Example + + +```typescript +import { createBearerAuthenticationConfig, ThoughtSpotRestApi, ConfigureAuthSettingsRequest } from '@thoughtspot/rest-api-sdk'; + +const configuration = createBearerAuthenticationConfig("CLUSTER_SERVER_URL", { + username: "YOUR_USERNAME", + password: "YOUR_PASSWORD", +}); +const apiInstance = new ThoughtSpotRestApi(configuration); + +apiInstance.configureAuthSettings( + // ConfigureAuthSettingsRequest + { + auth_type: "TRUSTED_AUTH", + cluster_preferences: null, + org_preferences: [ + { + org_identifier: "org_identifier_example", + auth_status: "ENABLED", + }, + ], + } +).then((data:any) => { + console.log('API called successfully. Returned data: ' + data); +}).catch((error:any) => console.error(error)); + + +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **configureAuthSettingsRequest** | **ConfigureAuthSettingsRequest**| | + + +### Return type + +**void** + +### Authorization + +[bearerAuth](README.md#bearerAuth) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**204** | Trusted authentication settings configured successfully. | - | +**400** | Invalid request. | - | +**401** | Unauthorized access. | - | +**403** | Forbidden access. | - | +**500** | Unexpected error | - | + +[[Back to top]](#) [[Back to API list]](README.md#documentation-for-api-endpoints) [[Back to Model list]](README.md#documentation-for-models) [[Back to README]](README.md) + +# **configureCommunicationChannelPreferences** +> void configureCommunicationChannelPreferences(configureCommunicationChannelPreferencesRequest) + + Version: 10.14.0.cl or later Configure communication channel preferences. - Use `cluster_preferences` to update the default preferences for your ThoughtSpot application instance. - If your instance has [Orgs](https://docs.thoughtspot.com/cloud/latest/orgs-overview), use `org_preferences` to specify Org-specific preferences that override the defaults. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) or `DEVELOPER` (**Has developer privilege**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, users with `APPLICATION_ADMINISTRATION` (**Can manage application settings**) privilege are also authorized to perform this action. + +### Example + + +```typescript +import { createBearerAuthenticationConfig, ThoughtSpotRestApi, ConfigureCommunicationChannelPreferencesRequest } from '@thoughtspot/rest-api-sdk'; + +const configuration = createBearerAuthenticationConfig("CLUSTER_SERVER_URL", { + username: "YOUR_USERNAME", + password: "YOUR_PASSWORD", +}); +const apiInstance = new ThoughtSpotRestApi(configuration); + +apiInstance.configureCommunicationChannelPreferences( + // ConfigureCommunicationChannelPreferencesRequest + { + cluster_preferences: [ + { + event_type: "LIVEBOARD_SCHEDULE", + channels: [ + "EMAIL", + ], + }, + ], + org_preferences: [ + { + org_identifier: "org_identifier_example", + operation: "REPLACE", + preferences: [ + { + event_type: "LIVEBOARD_SCHEDULE", + channels: [ + "EMAIL", + ], + }, + ], + reset_events: [ + "LIVEBOARD_SCHEDULE", + ], + }, + ], + } +).then((data:any) => { + console.log('API called successfully. Returned data: ' + data); +}).catch((error:any) => console.error(error)); + + +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **configureCommunicationChannelPreferencesRequest** | **ConfigureCommunicationChannelPreferencesRequest**| | + + +### Return type + +**void** + +### Authorization + +[bearerAuth](README.md#bearerAuth) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**204** | Communication channel preferences successfully updated. | - | +**400** | Invalid request. | - | +**401** | Unauthorized access. | - | +**403** | Forbidden access. | - | +**500** | Unexpected error | - | + +[[Back to top]](#) [[Back to API list]](README.md#documentation-for-api-endpoints) [[Back to Model list]](README.md#documentation-for-models) [[Back to README]](README.md) + +# **configureSecuritySettings** +> void configureSecuritySettings(configureSecuritySettingsRequest) + + Version: 26.2.0.cl or later Configure security settings for your ThoughtSpot application instance. - Use `cluster_preferences` to update cluster-level security settings including CORS whitelisted URLs, CSP settings, SAML redirect URLs, partitioned cookies, and non-embed access configuration. - Use `org_preferences` to configure Org-specific security settings. If your instance has [Orgs](https://docs.thoughtspot.com/cloud/latest/orgs-overview), this allows configuring CORS and non-embed access settings specific to the Org. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) or `DEVELOPER` (**Has developer privilege**) privilege. Cluster-level SAML and script-src settings require `ADMINISTRATION` privilege. See [Security Settings](https://developers.thoughtspot.com/docs/security-settings) for more details. + +### Example + + +```typescript +import { createBearerAuthenticationConfig, ThoughtSpotRestApi, ConfigureSecuritySettingsRequest } from '@thoughtspot/rest-api-sdk'; + +const configuration = createBearerAuthenticationConfig("CLUSTER_SERVER_URL", { + username: "YOUR_USERNAME", + password: "YOUR_PASSWORD", +}); +const apiInstance = new ThoughtSpotRestApi(configuration); + +apiInstance.configureSecuritySettings( + // ConfigureSecuritySettingsRequest + { + cluster_preferences: null, + org_preferences: [ + { + org_identifier: "org_identifier_example", + cors_whitelisted_urls: [ + "cors_whitelisted_urls_example", + ], + non_embed_access: { + block_full_app_access: true, + groups_identifiers_with_access: [ + "groups_identifiers_with_access_example", + ], + }, + }, + ], + } +).then((data:any) => { + console.log('API called successfully. Returned data: ' + data); +}).catch((error:any) => console.error(error)); + + +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **configureSecuritySettingsRequest** | **ConfigureSecuritySettingsRequest**| | + + +### Return type + +**void** + +### Authorization + +[bearerAuth](README.md#bearerAuth) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**204** | Successfully configured the security settings. | - | +**400** | Invalid request. | - | +**401** | Unauthorized access. | - | +**403** | Forbidden access. | - | +**500** | Unexpected error | - | + +[[Back to top]](#) [[Back to API list]](README.md#documentation-for-api-endpoints) [[Back to Model list]](README.md#documentation-for-models) [[Back to README]](README.md) + +# **connectionConfigurationSearch** +> Array connectionConfigurationSearch(connectionConfigurationSearchRequest) + + Version: 10.12.0.cl or later Gets connection configuration objects. Requires `DATAMANAGEMENT` (**Can manage data**) and edit permissions to the connection object, or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) privilege is required. #### Usage guidelines * To get a list of all configurations available in the ThoughtSpot system, send the API request with only the connection name or GUID in the request body. * To fetch details of a configuration object, specify the configuration object name or GUID. + +### Example + + +```typescript +import { createBearerAuthenticationConfig, ThoughtSpotRestApi, ConnectionConfigurationSearchRequest } from '@thoughtspot/rest-api-sdk'; + +const configuration = createBearerAuthenticationConfig("CLUSTER_SERVER_URL", { + username: "YOUR_USERNAME", + password: "YOUR_PASSWORD", +}); +const apiInstance = new ThoughtSpotRestApi(configuration); + +apiInstance.connectionConfigurationSearch( + // ConnectionConfigurationSearchRequest + { + connection_identifier: "connection_identifier_example", + configuration_identifier: "configuration_identifier_example", + policy_type: "NO_POLICY", + } +).then((data:any) => { + console.log('API called successfully. Returned data: ' + data); +}).catch((error:any) => console.error(error)); + + +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **connectionConfigurationSearchRequest** | **ConnectionConfigurationSearchRequest**| | + + +### Return type + +**Array** + +### Authorization + +[bearerAuth](README.md#bearerAuth) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Configuration fetched successfully. | - | +**400** | Invalid request. | - | +**401** | Unauthorized access. | - | +**403** | Forbidden access. | - | +**500** | Unexpected error | - | + +[[Back to top]](#) [[Back to API list]](README.md#documentation-for-api-endpoints) [[Back to Model list]](README.md#documentation-for-models) [[Back to README]](README.md) + +# **convertWorksheetToModel** +> ResponseWorksheetToModelConversion convertWorksheetToModel(convertWorksheetToModelRequest) + + Convert worksheets to models Version: 10.6.0.cl or later ## Prerequisites - **Privileges Required:** - `DATAMANAGEMENT` (Can manage data) or `ADMINISTRATION` (Can administer ThoughtSpot). - **Additional Privileges (if RBAC is enabled):** - `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` (Can manage data models). --- ## Usage Guidelines ### Parameters 1. **worksheet_ids** - **Description:** A comma-separated list of GUIDs (Globally Unique Identifiers) specifying the Worksheets to be converted. - **Usage:** - Used only when `convert_all` is set to `false`. - Leave empty or omit when `convert_all` is set to `true`. 2. **exclude_worksheet_ids** - **Description:** A comma-separated list of GUIDs specifying Worksheets to be excluded from conversion. - **Usage:** - Useful when `convert_all` is set to `true` and specific Worksheets should not be converted. 3. **convert_all** - **Description:** Sets the scope of conversion. - **Options:** - `true`: Converts all Worksheets in the system, except those specified in `exclude_worksheet_ids`. - `false`: Converts only the Worksheets listed in `worksheet_ids`. 4. **apply_changes** - **Description:** Specifies whether to apply changes directly to ThoughtSpot or to generate a preview before applying any changes.Used for validation of conversion. - **Options:** - `true`: Applies conversion changes directly to ThoughtSpot. - `false`: Generates only a preview of the changes and does not apply any changes to ThoughtSpot --- ## Best Practices 1. **Backup Before Conversion:** Always export metadata as a backup before initiating the conversion process 2. **Partial Conversion for Testing:** Test the conversion process by setting `convert_all` to `false` and specifying a small number of `worksheet_ids`. 3. **Verify Dependencies:** Check for dependent objects, such as Tables and Connections, to avoid invalid references. 4. **Review Changes:** Use `apply_changes: false` to preview the impact of the conversion before applying changes. --- ## Examples ### Convert Specific Worksheets ```json { \"worksheet_ids\": [\"guid1\", \"guid2\", \"guid3\"], \"exclude_worksheet_ids\": [], \"convert_all\": false, \"apply_changes\": true } ``` ### Convert All Accessible Worksheets ```json { \"worksheet_ids\": [], \"exclude_worksheet_ids\": [], \"convert_all\": true, \"apply_changes\": true } ``` ### Exclude Specific Worksheets While Converting All Accessible Worksheets ```json { \"worksheet_ids\": [], \"exclude_worksheet_ids\": [\"abc\"], \"convert_all\": true, \"apply_changes\": true } ``` + +### Example + + +```typescript +import { createBearerAuthenticationConfig, ThoughtSpotRestApi, ConvertWorksheetToModelRequest } from '@thoughtspot/rest-api-sdk'; + +const configuration = createBearerAuthenticationConfig("CLUSTER_SERVER_URL", { + username: "YOUR_USERNAME", + password: "YOUR_PASSWORD", +}); +const apiInstance = new ThoughtSpotRestApi(configuration); + +apiInstance.convertWorksheetToModel( + // ConvertWorksheetToModelRequest + { + worksheet_ids: [ + "worksheet_ids_example", + ], + exclude_worksheet_ids: [ + "exclude_worksheet_ids_example", + ], + convert_all: false, + apply_changes: false, + } +).then((data:any) => { + console.log('API called successfully. Returned data: ' + data); +}).catch((error:any) => console.error(error)); + + +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **convertWorksheetToModelRequest** | **ConvertWorksheetToModelRequest**| | + + +### Return type + +**ResponseWorksheetToModelConversion** + +### Authorization + +[bearerAuth](README.md#bearerAuth) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Conversion of worksheets to model done successfully. | - | +**400** | Invalid request. | - | +**401** | Unauthorized access. | - | +**403** | Forbidden access. | - | +**500** | Unexpected error | - | + +[[Back to top]](#) [[Back to API list]](README.md#documentation-for-api-endpoints) [[Back to Model list]](README.md#documentation-for-models) [[Back to README]](README.md) + +# **copyObject** +> ResponseCopyObject copyObject(copyObjectRequest) + + Makes a copy of an Answer or Liveboard Version: 10.3.0.cl or later Creates a copy of a metadata object. Requires at least view access to the metadata object being copied. Upon successful execution, the API creates a copy of the metadata object specified in the API request and returns the ID of the new object. + +### Example + + +```typescript +import { createBearerAuthenticationConfig, ThoughtSpotRestApi, CopyObjectRequest } from '@thoughtspot/rest-api-sdk'; + +const configuration = createBearerAuthenticationConfig("CLUSTER_SERVER_URL", { + username: "YOUR_USERNAME", + password: "YOUR_PASSWORD", +}); +const apiInstance = new ThoughtSpotRestApi(configuration); + +apiInstance.copyObject( + // CopyObjectRequest + { + description: "description_example", + identifier: "identifier_example", + type: "LIVEBOARD", + title: "title_example", + } +).then((data:any) => { + console.log('API called successfully. Returned data: ' + data); +}).catch((error:any) => console.error(error)); + + +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **copyObjectRequest** | **CopyObjectRequest**| | + + +### Return type + +**ResponseCopyObject** + +### Authorization + +[bearerAuth](README.md#bearerAuth) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Successfully created a copy of the object | - | +**400** | Invalid request. | - | +**401** | Unauthorized access. | - | +**403** | Forbidden access. | - | +**404** | Object not found | - | +**500** | Unexpected error | - | + +[[Back to top]](#) [[Back to API list]](README.md#documentation-for-api-endpoints) [[Back to Model list]](README.md#documentation-for-models) [[Back to README]](README.md) + +# **createAgentConversation** +> AgentConversation createAgentConversation(createAgentConversationRequest) + + Version: 26.2.0.cl or later Creates a new Spotter agent conversation based on the provided context and settings. The endpoint was in Beta from 26.2.0.cl through 26.4.0.cl. Requires `CAN_USE_SPOTTER` privilege and at least view access to the metadata object specified in the request. #### Usage guidelines The request must include the `metadata_context` parameter to define the conversation context. The context type can be one of: - `DATA_SOURCE` *(available from 26.5.0.cl)*: targets a specific data source. Provide `data_source_identifier` in `data_source_context` for a single data source, or `data_source_identifiers` for multi-data-source context. The deprecated `guid` field is accepted for backwards compatibility. - `AUTO_MODE` *(available from 26.5.0.cl)*: automatically discovers and selects the most relevant datasets for the user\'s queries. > **Note for callers on versions 26.2.0.cl – 26.4.0.cl (Beta):** use the lowercase `data_source` enum value with the `guid` field instead of the above. Example: `{ \"type\": \"data_source\", \"data_source_context\": { \"guid\": \"\" } }`. The `conversation_settings` parameter controls which Spotter capabilities are enabled for the conversation: - `enable_contextual_change_analysis` (default: `true`, **deprecated from 26.2.0.cl**) — always enabled in Spotter 3; setting this to `false` has no effect on versions >= 26.2.0.cl - `enable_natural_language_answer_generation` (default: `true`, **deprecated from 26.2.0.cl**) — always enabled in Spotter 3; setting this to `false` has no effect on versions >= 26.2.0.cl - `enable_reasoning` (default: `true`, **deprecated from 26.2.0.cl**) — always enabled in Spotter 3; setting this to `false` has no effect on versions >= 26.2.0.cl - `enable_save_chat` (default: `false`, *available from 26.5.0.cl*) — enables saving the conversation for later retrieval via conversation history If the request is successful, the response includes a unique `conversation_identifier` that must be passed to `sendAgentConversationMessage` or `sendAgentConversationMessageStreaming` to send messages within this conversation. The response also includes `conversation_id` with the same value for backwards compatibility; use `conversation_identifier` for new integrations. #### Example request ```json { \"metadata_context\": { \"type\": \"DATA_SOURCE\", \"data_source_context\": { \"data_source_identifier\": \"a1b2c3d4-e5f6-7890-abcd-ef1234567890\" } }, \"conversation_settings\": {} } ``` #### Error responses | Code | Description | | ---- | --------------------------------------------------------------------------------------------------------------------------------------- | | 401 | Unauthorized — authentication token is missing, expired, or invalid. | | 403 | Forbidden — the authenticated user does not have `CAN_USE_SPOTTER` privilege or lacks view permission on the specified metadata object. | > ###### Note: > > - This endpoint was in Beta from 26.2.0.cl through 26.4.0.cl and is Generally Available from version 26.5.0.cl. > - This endpoint requires Spotter - please contact ThoughtSpot support to enable Spotter on your cluster. + +### Example + + +```typescript +import { createBearerAuthenticationConfig, ThoughtSpotRestApi, CreateAgentConversationRequest } from '@thoughtspot/rest-api-sdk'; + +const configuration = createBearerAuthenticationConfig("CLUSTER_SERVER_URL", { + username: "YOUR_USERNAME", + password: "YOUR_PASSWORD", +}); +const apiInstance = new ThoughtSpotRestApi(configuration); + +apiInstance.createAgentConversation( + // CreateAgentConversationRequest + { + metadata_context: null, + conversation_settings: null, + } +).then((data:any) => { + console.log('API called successfully. Returned data: ' + data); +}).catch((error:any) => console.error(error)); + + +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **createAgentConversationRequest** | **CreateAgentConversationRequest**| | + + +### Return type + +**AgentConversation** + +### Authorization + +[bearerAuth](README.md#bearerAuth) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Common successful response | - | +**201** | Common error response | - | +**400** | Operation failed | - | +**401** | Unauthorized access. | - | +**403** | Forbidden access. | - | +**500** | Operation failed | - | + +[[Back to top]](#) [[Back to API list]](README.md#documentation-for-api-endpoints) [[Back to Model list]](README.md#documentation-for-models) [[Back to README]](README.md) + +# **createCalendar** +> CalendarResponse createCalendar(createCalendarRequest) + + Version: 10.12.0.cl or later Creates a new [custom calendar](https://docs.thoughtspot.com/cloud/latest/connections-cust-cal). Requires `DATAMANAGEMENT` (**Can manage data**) or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your ThoughtSpot instance, the `CAN_MANAGE_CUSTOM_CALENDAR` (**Can manage custom calendars**) privilege is required. #### Usage guidelines You can create a custom calendar from scratch or an existing Table in ThoughtSpot. For both methods of calendar creation, the following parameters are required: * Name of the custom calendar. * Calendar creation method. To create a calendar from an existing table, specify the method: - `FROM_EXISTING_TABLE` - Creates calendar from the table reference provided in the API request. - `FROM_INPUT_PARAMS` - Creates a calendar from the parameters defined in the API request. * Connection ID and Table name * Database and schema name attributes: For most Cloud Data Warehouse (CDW) connectors, both `database_name` and `schema_name` attributes are required. However, the attribute requirements are conditional and vary based on the connector type and its metadata structure. For example, for connectors such as Teradata, MySQL, SingleSore, Amazon Aurora MySQL, Amazon RDS MySQL, Oracle, and GCP_MYSQL, the `schema_name` is required, whereas the `database_name` attribute is not. Similarly, connectors such as ClickHouse require you to specify the `database_name` and the schema specification in such cases is optional. **NOTE**: If you are creating a calendar from an existing table, ensure that the referenced table matches the required DDL for custom calendars. If the schema does not match, the API returns an error. ##### Calendar type The API allows you to create the following types of calendars: * `MONTH_OFFSET`. The default calendar type. A `MONTH_OFFSET` calendar is offset by a few months from the standard calendar months (January to December) and the year begins with the month defined in the request. For example, if the `month_offset` value is set as `April`, the calendar year begins in April. * `4-4-5`. Each quarter in the calendar will include two 4-week months followed by one 5-week month. * `4-5-4`. Each quarter in the calendar will include two 4-week months with a 5-week month between. * `5-4-4`. Each quarter begins with a 5-week month, followed by two 4-week months. To start and end the calendar on a specific date, specify the dates in the `MM/DD/YYYY` format. For `MONTH_OFFSET` calendars, ensure that the `start_date` matches the month specified in the `month_offset` attribute. You can also set the starting day of the week and customize the prefixes for year and quarter labels. #### Examples To create a calendar from an existing table: ``` { \"name\": \"MyCustomCalendar1\", \"table_reference\": { \"connection_identifier\": \"4db8ea22-2ff4-4224-b05a-26674717e468\", \"table_name\": \"MyCalendarTable\", \"database_name\": \"RETAILAPPAREL\", \"schema_name\": \"PUBLIC\" }, \"creation_method\": \"FROM_EXISTING_TABLE\", } ``` To create a calendar from scratch: ``` { \"name\": \"MyCustomCalendar1\", \"table_reference\": { \"connection_identifier\": \"4db8ea22-2ff4-4224-b05a-26674717e468\", \"table_name\": \"MyCalendarTable\", \"database_name\": \"RETAILAPPAREL\", \"schema_name\": \"PUBLIC\" }, \"creation_method\": \"FROM_INPUT_PARAMS\", \"calendar_type\": \"MONTH_OFFSET\", \"month_offset\": \"April\", \"start_day_of_week\": \"Monday\", \"quarter_name_prefix\": \"Q\", \"year_name_prefix\": \"FY\", \"start_date\": \"04/01/2025\", \"end_date\": \"04/31/2025\" } ``` + +### Example + + +```typescript +import { createBearerAuthenticationConfig, ThoughtSpotRestApi, CreateCalendarRequest } from '@thoughtspot/rest-api-sdk'; + +const configuration = createBearerAuthenticationConfig("CLUSTER_SERVER_URL", { + username: "YOUR_USERNAME", + password: "YOUR_PASSWORD", +}); +const apiInstance = new ThoughtSpotRestApi(configuration); + +apiInstance.createCalendar( + // CreateCalendarRequest + { + name: "name_example", + creation_method: "FROM_INPUT_PARAMS", + table_reference: null, + start_date: "start_date_example", + end_date: "end_date_example", + calendar_type: "MONTH_OFFSET", + month_offset: "January", + start_day_of_week: "Sunday", + quarter_name_prefix: "", + year_name_prefix: "", + } +).then((data:any) => { + console.log('API called successfully. Returned data: ' + data); +}).catch((error:any) => console.error(error)); + + +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **createCalendarRequest** | **CreateCalendarRequest**| | + + +### Return type + +**CalendarResponse** + +### Authorization + +[bearerAuth](README.md#bearerAuth) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Custom calendar created successfully. | - | +**400** | Invalid request. | - | +**401** | Unauthorized access. | - | +**403** | Forbidden access. | - | +**500** | Unexpected error | - | + +[[Back to top]](#) [[Back to API list]](README.md#documentation-for-api-endpoints) [[Back to Model list]](README.md#documentation-for-models) [[Back to README]](README.md) + +# **createCollection** +> Collection createCollection(createCollectionRequest) + + Version: 26.4.0.cl or later Creates a new collection in ThoughtSpot. Collections allow you to organize and group related metadata objects such as Liveboards, Answers, worksheets, and other data objects. You can also create nested collections (sub-collections) to build a hierarchical structure. #### Supported operations The API endpoint lets you perform the following operations: * Create a new collection * Add metadata objects (Liveboards, Answers, Logical Tables) to the collection * Create nested collections by adding sub-collections + +### Example + + +```typescript +import { createBearerAuthenticationConfig, ThoughtSpotRestApi, CreateCollectionRequest } from '@thoughtspot/rest-api-sdk'; + +const configuration = createBearerAuthenticationConfig("CLUSTER_SERVER_URL", { + username: "YOUR_USERNAME", + password: "YOUR_PASSWORD", +}); +const apiInstance = new ThoughtSpotRestApi(configuration); + +apiInstance.createCollection( + // CreateCollectionRequest + { + name: "name_example", + description: "description_example", + metadata: [ + { + type: "LIVEBOARD", + identifiers: [ + "identifiers_example", + ], + }, + ], + } +).then((data:any) => { + console.log('API called successfully. Returned data: ' + data); +}).catch((error:any) => console.error(error)); + + +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **createCollectionRequest** | **CreateCollectionRequest**| | + + +### Return type + +**Collection** + +### Authorization + +[bearerAuth](README.md#bearerAuth) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Collection created successfully | - | +**400** | Invalid request. | - | +**401** | Unauthorized access. | - | +**403** | Forbidden access. | - | +**500** | Unexpected error | - | + +[[Back to top]](#) [[Back to API list]](README.md#documentation-for-api-endpoints) [[Back to Model list]](README.md#documentation-for-models) [[Back to README]](README.md) + +# **createConfig** +> RepoConfigObject createConfig(createConfigRequest) + + Version: 9.2.0.cl or later Allows you to connect a ThoughtSpot instance to a Git repository. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance on your instance, the `CAN_SETUP_VERSION_CONTROL` (**Can set up version control**) privilege. You can use this API endpoint to connect your ThoughtSpot development and production environments to the development and production branches of a Git repository. Before using this endpoint to connect your ThoughtSpot instance to a Git repository, check the following prerequisites: * You have a Git repository. If you are using GitHub, make sure you have a valid account and an access token to connect ThoughtSpot to GitHub. For information about generating a token, see [GitHub Documentation](https://docs.github.com/en/authentication/keeping-your-account-and-data-secure/managing-your-personal-access-tokens). * Your access token has `repo` scope that grants full access to public and private repositories. * Your Git repository has a branch that can be configured as a default branch in ThoughtSpot. For more information, see [Git integration documentation](https://developers.thoughtspot.com/docs/?pageid=git-integration). **Note**: ThoughtSpot supports only GitHub / itHub Enterprise for CI/CD. + +### Example + + +```typescript +import { createBearerAuthenticationConfig, ThoughtSpotRestApi, CreateConfigRequest } from '@thoughtspot/rest-api-sdk'; + +const configuration = createBearerAuthenticationConfig("CLUSTER_SERVER_URL", { + username: "YOUR_USERNAME", + password: "YOUR_PASSWORD", +}); +const apiInstance = new ThoughtSpotRestApi(configuration); + +apiInstance.createConfig( + // CreateConfigRequest + { + repository_url: "repository_url_example", + username: "username_example", + access_token: "access_token_example", + org_identifier: "org_identifier_example", + branch_names: [ + "branch_names_example", + ], + commit_branch_name: "commit_branch_name_example", + enable_guid_mapping: true, + configuration_branch_name: "configuration_branch_name_example", + } +).then((data:any) => { + console.log('API called successfully. Returned data: ' + data); +}).catch((error:any) => console.error(error)); + + +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **createConfigRequest** | **CreateConfigRequest**| | + + +### Return type + +**RepoConfigObject** + +### Authorization + +[bearerAuth](README.md#bearerAuth) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Successfully configured local repository | - | +**400** | Invalid request. | - | +**401** | Unauthorized access. | - | +**403** | Forbidden access. | - | +**500** | Unexpected error | - | + +[[Back to top]](#) [[Back to API list]](README.md#documentation-for-api-endpoints) [[Back to Model list]](README.md#documentation-for-models) [[Back to README]](README.md) + +# **createConnection** +> CreateConnectionResponse createConnection(createConnectionRequest) + + Version: 9.2.0.cl or later Creates a connection to a data warehouse for live query services. Requires `DATAMANAGEMENT` (**Can manage data**) or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) privilege is required. #### Create a connection without tables To create a connection without tables: 1. Pass these parameters in your API request. * Name of the connection. * Type of the data warehouse to connect to. * A JSON map of configuration attributes in `data_warehouse_config`. The following example shows the configuration attributes for a SnowFlake connection: ``` { \"configuration\":{ \"accountName\":\"thoughtspot_partner\", \"user\":\"tsadmin\", \"password\":\"TestConn123\", \"role\":\"sysadmin\", \"warehouse\":\"MEDIUM_WH\" }, \"authenticationType\": \"SERVICE_ACCOUNT\", \"externalDatabases\":[ ] } ``` 2. Set `validate` to `false`. **NOTE:** If the `authentication_type` is anything other than SERVICE_ACCOUNT, you must explicitly provide the authenticationType property in the payload. If you do not specify authenticationType, the API will default to SERVICE_ACCOUNT as the authentication type. #### Create a connection with tables If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) and `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` (**Can manage data models**) privilege is required. To create a connection with tables: 1. Pass these parameters in your API request. * Name of the connection. * Type of the data warehouse to connect to. * A JSON map of configuration attributes, database details, and table properties in `data_warehouse_config` as shown in the following example: ``` { \"configuration\":{ \"accountName\":\"thoughtspot_partner\", \"user\":\"tsadmin\", \"password\":\"TestConn123\", \"role\":\"sysadmin\", \"warehouse\":\"MEDIUM_WH\" }, \"authenticationType\": \"SERVICE_ACCOUNT\", \"externalDatabases\":[ { \"name\":\"AllDatatypes\", \"isAutoCreated\":false, \"schemas\":[ { \"name\":\"alldatatypes\", \"tables\":[ { \"name\":\"allDatatypes\", \"type\":\"TABLE\", \"description\":\"\", \"selected\":true, \"linked\":true, \"columns\":[ { \"name\":\"CNUMBER\", \"type\":\"INT64\", \"canImport\":true, \"selected\":true, \"isLinkedActive\":true, \"isImported\":false, \"tableName\":\"allDatatypes\", \"schemaName\":\"alldatatypes\", \"dbName\":\"AllDatatypes\" }, { \"name\":\"CDECIMAL\", \"type\":\"INT64\", \"canImport\":true, \"selected\":true, \"isLinkedActive\":true, \"isImported\":false, \"tableName\":\"allDatatypes\", \"schemaName\":\"alldatatypes\", \"dbName\":\"AllDatatypes\" } ] } ] } ] } ] } ``` 2. Set `validate` to `true`. **NOTE:** If the `authentication_type` is anything other than SERVICE_ACCOUNT, you must explicitly provide the authenticationType property in the payload. If you do not specify authenticationType, the API will default to SERVICE_ACCOUNT as the authentication type. + +### Example + + +```typescript +import { createBearerAuthenticationConfig, ThoughtSpotRestApi, CreateConnectionRequest } from '@thoughtspot/rest-api-sdk'; + +const configuration = createBearerAuthenticationConfig("CLUSTER_SERVER_URL", { + username: "YOUR_USERNAME", + password: "YOUR_PASSWORD", +}); +const apiInstance = new ThoughtSpotRestApi(configuration); + +apiInstance.createConnection( + // CreateConnectionRequest + { + name: "name_example", + description: "description_example", + data_warehouse_type: "SNOWFLAKE", + data_warehouse_config: {}, + validate: true, + } +).then((data:any) => { + console.log('API called successfully. Returned data: ' + data); +}).catch((error:any) => console.error(error)); + + +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **createConnectionRequest** | **CreateConnectionRequest**| | + + +### Return type + +**CreateConnectionResponse** + +### Authorization + +[bearerAuth](README.md#bearerAuth) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Connection to the datasource successfully created. | - | +**400** | Invalid request. | - | +**401** | Unauthorized access. | - | +**403** | Forbidden access. | - | +**500** | Unexpected error | - | + +[[Back to top]](#) [[Back to API list]](README.md#documentation-for-api-endpoints) [[Back to Model list]](README.md#documentation-for-models) [[Back to README]](README.md) + +# **createConnectionConfiguration** +> ConnectionConfigurationResponse createConnectionConfiguration(createConnectionConfigurationRequest) + + Version: 10.12.0.cl or later Creates an additional configuration to an existing connection to a data warehouse. Requires `DATAMANAGEMENT` (**Can manage data**) or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) privilege is required. #### Usage guidelines * A JSON map of configuration attributes in `configuration`. The following example shows the configuration attributes: ``` { \"user\":\"DEV_USER\", \"password\":\"TestConn123\", \"role\":\"DEV\", \"warehouse\":\"DEV_WH\" } ``` * If the `policy_type` is `PRINCIPALS`, then `policy_principals` is a required field. * If the `policy_type` is `PROCESSES`, then `policy_processes` is a required field. * If the `policy_type` is `NO_POLICY`, then `policy_principals` and `policy_processes` are not required fields. #### Parameterized Connection Support For parameterized connections that use OAuth authentication, only the same_as_parent and policy_process_options attributes are allowed in the API request. These attributes are not applicable to connections that are not parameterized. + +### Example + + +```typescript +import { createBearerAuthenticationConfig, ThoughtSpotRestApi, CreateConnectionConfigurationRequest } from '@thoughtspot/rest-api-sdk'; + +const configuration = createBearerAuthenticationConfig("CLUSTER_SERVER_URL", { + username: "YOUR_USERNAME", + password: "YOUR_PASSWORD", +}); +const apiInstance = new ThoughtSpotRestApi(configuration); + +apiInstance.createConnectionConfiguration( + // CreateConnectionConfigurationRequest + { + name: "name_example", + description: "description_example", + connection_identifier: "connection_identifier_example", + same_as_parent: false, + policy_process_options: null, + authentication_type: "SERVICE_ACCOUNT", + configuration: {}, + policy_type: "NO_POLICY", + policy_principals: [ + "policy_principals_example", + ], + policy_processes: [ + "SAGE_INDEXING", + ], + } +).then((data:any) => { + console.log('API called successfully. Returned data: ' + data); +}).catch((error:any) => console.error(error)); + + +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **createConnectionConfigurationRequest** | **CreateConnectionConfigurationRequest**| | + + +### Return type + +**ConnectionConfigurationResponse** + +### Authorization + +[bearerAuth](README.md#bearerAuth) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Connection configuration successfully created. | - | +**400** | Invalid request. | - | +**401** | Unauthorized access. | - | +**403** | Forbidden access. | - | +**500** | Unexpected error | - | + +[[Back to top]](#) [[Back to API list]](README.md#documentation-for-api-endpoints) [[Back to Model list]](README.md#documentation-for-models) [[Back to README]](README.md) + +# **createConversation** +> Conversation createConversation(createConversationRequest) + + Version: 10.4.0.cl or later Creates a new conversation session tied to a specific data model for AI-driven natural language querying. Requires `CAN_USE_SPOTTER` privilege and at least view access to the metadata object specified in the request. #### Usage guidelines The request must include: - `metadata_identifier`: the unique ID of the data source that provides context for the conversation Optionally, you can provide: - `tokens`: a token string to set initial context for the conversation (e.g., `\"[sales],[item type],[state]\"`) If the request is successful, ThoughtSpot returns a unique `conversation_identifier` that must be passed to `sendMessage` to continue the conversation. #### Error responses | Code | Description | |------|-------------| | 401 | Unauthorized — authentication token is missing, expired, or invalid. | | 403 | Forbidden — the authenticated user does not have `CAN_USE_SPOTTER` privilege or lacks view permission on the specified metadata object. | > ###### Note: > * This endpoint is currently in Beta. Breaking changes may be introduced before the endpoint is made Generally Available. > * This endpoint requires Spotter - please contact ThoughtSpot support to enable Spotter on your cluster. + +### Example + + +```typescript +import { createBearerAuthenticationConfig, ThoughtSpotRestApi, CreateConversationRequest } from '@thoughtspot/rest-api-sdk'; + +const configuration = createBearerAuthenticationConfig("CLUSTER_SERVER_URL", { + username: "YOUR_USERNAME", + password: "YOUR_PASSWORD", +}); +const apiInstance = new ThoughtSpotRestApi(configuration); + +apiInstance.createConversation( + // CreateConversationRequest + { + metadata_identifier: "metadata_identifier_example", + tokens: "tokens_example", + } +).then((data:any) => { + console.log('API called successfully. Returned data: ' + data); +}).catch((error:any) => console.error(error)); + + +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **createConversationRequest** | **CreateConversationRequest**| | + + +### Return type + +**Conversation** + +### Authorization + +[bearerAuth](README.md#bearerAuth) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Common successful response | - | +**201** | Common error response | - | +**400** | Operation failed | - | +**401** | Unauthorized access. | - | +**403** | Forbidden access. | - | +**500** | Operation failed | - | + +[[Back to top]](#) [[Back to API list]](README.md#documentation-for-api-endpoints) [[Back to Model list]](README.md#documentation-for-models) [[Back to README]](README.md) + +# **createCustomAction** +> ResponseCustomAction createCustomAction(createCustomActionRequest) + + Version: 9.6.0.cl or later Creates a custom action that appears as a menu action on a saved Answer or Liveboard visualization. Requires `DEVELOPER` (**Has Developer privilege**) or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `DEVELOPER` (**Has developer privilege**) privilege is required. #### Usage Guidelines The API lets you create the following types of custom actions: * URL-based action Allows pushing data to an external URL. * Callback action Triggers a callback to the host application and initiates a response payload on an embedded ThoughtSpot instance. By default, custom actions are visible to only administrator or developer users. To make a custom action available to other users, and specify the groups in `group_identifiers`. By default, the custom action is set as a _global_ action on all visualizations and saved Answers. To assign a custom action to specific Liveboard visualization, saved Answer, or Worksheet, set `visibility` to `false` in `default_action_config` property and specify the GUID or name of the object in `associate_metadata`. For more information, see [Custom actions](https://developers.thoughtspot.com/docs/custom-action-intro). + +### Example + + +```typescript +import { createBearerAuthenticationConfig, ThoughtSpotRestApi, CreateCustomActionRequest } from '@thoughtspot/rest-api-sdk'; + +const configuration = createBearerAuthenticationConfig("CLUSTER_SERVER_URL", { + username: "YOUR_USERNAME", + password: "YOUR_PASSWORD", +}); +const apiInstance = new ThoughtSpotRestApi(configuration); + +apiInstance.createCustomAction( + // CreateCustomActionRequest + { + name: "name_example", + action_details: null, + associate_metadata: [ + { + action_config: { + position: "MENU", + visibility: true, + }, + identifier: "identifier_example", + type: "VISUALIZATION", + }, + ], + default_action_config: null, + group_identifiers: [ + "group_identifiers_example", + ], + } +).then((data:any) => { + console.log('API called successfully. Returned data: ' + data); +}).catch((error:any) => console.error(error)); + + +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **createCustomActionRequest** | **CreateCustomActionRequest**| | + + +### Return type + +**ResponseCustomAction** + +### Authorization + +[bearerAuth](README.md#bearerAuth) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Custom action created successfully. | - | +**400** | Invalid request. | - | +**401** | Unauthorized access. | - | +**403** | Forbidden access. | - | +**500** | Unexpected error | - | + +[[Back to top]](#) [[Back to API list]](README.md#documentation-for-api-endpoints) [[Back to Model list]](README.md#documentation-for-models) [[Back to README]](README.md) + +# **createEmailCustomization** +> CreateEmailCustomizationResponse createEmailCustomization(createEmailCustomizationRequest) + + Version: 10.10.0.cl or later Creates a customization configuration for the notification email. #### Pre-requisites Requires `DEVELOPER` (**has developer privilege**) or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `DEVELOPER` (**Has developer privilege**) privilege is required. **NOTE**:This endpoint in currently in beta. Contact ThoughtSpot support to enable this on your instance. #### Usage guidelines To create a custom configuration pass these parameters in your API request: - A JSON map of configuration attributes `template_properties`. The following example shows a sample set of customization configuration: ``` { { \"cta_button_bg_color\": \"#444DEA\", \"cta_text_font_color\": \"#FFFFFF\", \"primary_bg_color\": \"#D3DEF0\", \"logo_url\": \"https://storage.pardot.com/710713/1642089901EbkRibJq/TS_fullworkmark_darkmode.png\", \"font_family\": \"\", \"product_name\": \"ThoughtSpot\", \"footer_address\": \"444 Castro St, Suite 1000 Mountain View, CA 94041\", \"footer_phone\": \"(800) 508-7008\", \"replacement_value_for_liveboard\": \"Dashboard\", \"replacement_value_for_answer\": \"Chart\", \"replacement_value_for_spot_iq\": \"AI Insights\", \"hide_footer_phone\": false, \"hide_footer_address\": false, \"hide_product_name\": false, \"hide_manage_notification\": false, \"hide_mobile_app_nudge\": false, \"hide_privacy_policy\": false, \"hide_ts_vocabulary_definitions\": false, \"hide_error_message\": false, \"hide_unsubscribe_link\": false, \"hide_notification_status\": false, \"hide_modify_alert\": false, \"company_website_url\": \"https://your-website.com/\", \"company_privacy_policy_url\" : \"https://link-to-privacy-policy.com/\", \"contact_support_url\": \"https://link-to-contact-support.com/\", \"hide_contact_support_url\": false, \"hide_logo_url\" : false } } ``` + +### Example + + +```typescript +import { createBearerAuthenticationConfig, ThoughtSpotRestApi, CreateEmailCustomizationRequest } from '@thoughtspot/rest-api-sdk'; + +const configuration = createBearerAuthenticationConfig("CLUSTER_SERVER_URL", { + username: "YOUR_USERNAME", + password: "YOUR_PASSWORD", +}); +const apiInstance = new ThoughtSpotRestApi(configuration); + +apiInstance.createEmailCustomization( + // CreateEmailCustomizationRequest + { + template_properties: null, + org_identifier: "org_identifier_example", + } +).then((data:any) => { + console.log('API called successfully. Returned data: ' + data); +}).catch((error:any) => console.error(error)); + + +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **createEmailCustomizationRequest** | **CreateEmailCustomizationRequest**| | + + +### Return type + +**CreateEmailCustomizationResponse** + +### Authorization + +[bearerAuth](README.md#bearerAuth) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**400** | Invalid request. | - | +**403** | Unauthorized access. | - | +**500** | Unexpected error | - | + +[[Back to top]](#) [[Back to API list]](README.md#documentation-for-api-endpoints) [[Back to Model list]](README.md#documentation-for-models) [[Back to README]](README.md) + +# **createOrg** +> OrgResponse createOrg(createOrgRequest) + + Version: 9.0.0.cl or later Creates an Org object. To use this API, the [Orgs](https://docs.thoughtspot.com/cloud/latest/orgs-overview) feature must be enabled in your cluster. Requires cluster administration (**Can administer Org**) privileges. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `ORG_ADMINISTRATION` (**Can manage Orgs**) privilege is required. + +### Example + + +```typescript +import { createBearerAuthenticationConfig, ThoughtSpotRestApi, CreateOrgRequest } from '@thoughtspot/rest-api-sdk'; + +const configuration = createBearerAuthenticationConfig("CLUSTER_SERVER_URL", { + username: "YOUR_USERNAME", + password: "YOUR_PASSWORD", +}); +const apiInstance = new ThoughtSpotRestApi(configuration); + +apiInstance.createOrg( + // CreateOrgRequest + { + name: "name_example", + description: "description_example", + } +).then((data:any) => { + console.log('API called successfully. Returned data: ' + data); +}).catch((error:any) => console.error(error)); + + +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **createOrgRequest** | **CreateOrgRequest**| | + + +### Return type + +**OrgResponse** + +### Authorization + +[bearerAuth](README.md#bearerAuth) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Organization successfully created. | - | +**400** | Invalid request. | - | +**401** | Unauthorized access. | - | +**403** | Forbidden access. | - | +**500** | Unexpected error | - | + +[[Back to top]](#) [[Back to API list]](README.md#documentation-for-api-endpoints) [[Back to Model list]](README.md#documentation-for-models) [[Back to README]](README.md) + +# **createRole** +> RoleResponse createRole(createRoleRequest) + + Version: 9.5.0.cl or later Creates a Role object in ThoughtSpot. Available only if [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance. To create a Role, the `ROLE_ADMINISTRATION` (**Can manage roles**) privilege is required. + +### Example + + +```typescript +import { createBearerAuthenticationConfig, ThoughtSpotRestApi, CreateRoleRequest } from '@thoughtspot/rest-api-sdk'; + +const configuration = createBearerAuthenticationConfig("CLUSTER_SERVER_URL", { + username: "YOUR_USERNAME", + password: "YOUR_PASSWORD", +}); +const apiInstance = new ThoughtSpotRestApi(configuration); + +apiInstance.createRole( + // CreateRoleRequest + { + name: "name_example", + description: "description_example", + privileges: [ + "USERDATAUPLOADING", + ], + read_only: false, + } +).then((data:any) => { + console.log('API called successfully. Returned data: ' + data); +}).catch((error:any) => console.error(error)); + + +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **createRoleRequest** | **CreateRoleRequest**| | + + +### Return type + +**RoleResponse** + +### Authorization + +[bearerAuth](README.md#bearerAuth) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Role successfully created. | - | +**400** | Invalid parameters. | - | +**401** | Unauthorized access. | - | +**403** | Forbidden access. | - | +**500** | Internal error | - | + +[[Back to top]](#) [[Back to API list]](README.md#documentation-for-api-endpoints) [[Back to Model list]](README.md#documentation-for-models) [[Back to README]](README.md) + +# **createSchedule** +> ResponseSchedule createSchedule(createScheduleRequest) + + Create schedule. Version: 9.4.0.cl or later Creates a Liveboard schedule job. Requires at least edit access to Liveboards. To create a schedule on behalf of another user, you need `ADMINISTRATION` (**Can administer Org**) or `JOBSCHEDULING` (**Can schedule for others**) privilege and edit access to the Liveboard. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `JOBSCHEDULING` (**Can schedule for others**) privilege is required. #### Usage guidelines * The description text is mandatory. The description text appears as **Description: ** in the Liveboard schedule email notifications. * For Liveboards with both charts and tables, schedule creation is only supported in PDF and XLS formats. Schedules created in CSV formats for such Liveboards will fail to run. If `PDF` is set as the `file_format`, enable `pdf_options` to get the correct attachment. Not doing so may cause the attachment to be rendered empty. * To include only specific visualizations, specify the visualization GUIDs in the `visualization_identifiers` array. * You can schedule a Liveboard job to run periodically by setting frequency parameters. You can set the schedule to run daily, weekly, monthly or every n minutes or hours. The scheduled job can also be configured to run at a specific time of the day or on specific days of the week or month. Please ensure that when setting the schedule frequency for _minute of the object_, only values that are multiples of 5 are included. * If the `frequency` parameters are defined, you can set the time zone to a value that matches your server\'s time zone. For example, `US/Central`, `Etc/UTC`, `CET`. The default time zone is `America/Los_Angeles`. For more information about Liveboard jobs, see [ThoughtSpot Product Documentation](https://docs.thoughtspot.com/cloud/latest/liveboard-schedule). + +### Example + + +```typescript +import { createBearerAuthenticationConfig, ThoughtSpotRestApi, CreateScheduleRequest } from '@thoughtspot/rest-api-sdk'; + +const configuration = createBearerAuthenticationConfig("CLUSTER_SERVER_URL", { + username: "YOUR_USERNAME", + password: "YOUR_PASSWORD", +}); +const apiInstance = new ThoughtSpotRestApi(configuration); + +apiInstance.createSchedule( + // CreateScheduleRequest + { + name: "name_example", + description: "description_example", + metadata_type: "LIVEBOARD", + metadata_identifier: "metadata_identifier_example", + file_format: "PDF", + liveboard_options: null, + pdf_options: null, + time_zone: "America/Los_Angeles", + frequency: null, + recipient_details: null, + personalised_view_id: "personalised_view_id_example", + } +).then((data:any) => { + console.log('API called successfully. Returned data: ' + data); +}).catch((error:any) => console.error(error)); + + +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **createScheduleRequest** | **CreateScheduleRequest**| | + + +### Return type + +**ResponseSchedule** + +### Authorization + +[bearerAuth](README.md#bearerAuth) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Schedule successfully created. | - | +**400** | Invalid request. | - | +**401** | Unauthorized access. | - | +**403** | Forbidden access. | - | +**500** | Unexpected error | - | + +[[Back to top]](#) [[Back to API list]](README.md#documentation-for-api-endpoints) [[Back to Model list]](README.md#documentation-for-models) [[Back to README]](README.md) + +# **createTag** +> Tag createTag(createTagRequest) + + Version: 9.0.0.cl or later Creates a tag object. Tags are labels that identify a metadata object. For example, you can create a tag to designate subject areas, such as sales, HR, marketing, and finance. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `TAGMANAGEMENT` (**Can manage tags**) privilege is required to create, edit, and delete tags. + +### Example + + +```typescript +import { createBearerAuthenticationConfig, ThoughtSpotRestApi, CreateTagRequest } from '@thoughtspot/rest-api-sdk'; + +const configuration = createBearerAuthenticationConfig("CLUSTER_SERVER_URL", { + username: "YOUR_USERNAME", + password: "YOUR_PASSWORD", +}); +const apiInstance = new ThoughtSpotRestApi(configuration); + +apiInstance.createTag( + // CreateTagRequest + { + name: "name_example", + color: "color_example", + } +).then((data:any) => { + console.log('API called successfully. Returned data: ' + data); +}).catch((error:any) => console.error(error)); + + +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **createTagRequest** | **CreateTagRequest**| | + + +### Return type + +**Tag** + +### Authorization + +[bearerAuth](README.md#bearerAuth) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Tag successfully created. | - | +**400** | Invalid request. | - | +**401** | Unauthorized access. | - | +**403** | Forbidden access. | - | +**500** | Unexpected error | - | + +[[Back to top]](#) [[Back to API list]](README.md#documentation-for-api-endpoints) [[Back to Model list]](README.md#documentation-for-models) [[Back to README]](README.md) + +# **createUser** +> User createUser(createUserRequest) + + Version: 9.0.0.cl or later Creates a user in ThoughtSpot. The API endpoint allows you to configure several user properties such as email address, account status, share notification preferences, and sharing visibility. You can provision the user to [groups](https://docs.thoughtspot.com/cloud/latest/groups-privileges) and [Orgs](https://docs.thoughtspot.com/cloud/latest/orgs-overview). You can also add Liveboard, Answer, and Worksheet objects to the user’s favorites list, assign a default Liveboard for the user, and set user preferences. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `USER_ADMINISTRATION` (**Can manage users**) privilege is required. + +### Example + + +```typescript +import { createBearerAuthenticationConfig, ThoughtSpotRestApi, CreateUserRequest } from '@thoughtspot/rest-api-sdk'; + +const configuration = createBearerAuthenticationConfig("CLUSTER_SERVER_URL", { + username: "YOUR_USERNAME", + password: "YOUR_PASSWORD", +}); +const apiInstance = new ThoughtSpotRestApi(configuration); + +apiInstance.createUser( + // CreateUserRequest + { + name: "name_example", + display_name: "display_name_example", + password: "password_example", + email: "email_example", + account_type: "LOCAL_USER", + account_status: "ACTIVE", + org_identifiers: [ + "org_identifiers_example", + ], + group_identifiers: [ + "group_identifiers_example", + ], + visibility: "SHARABLE", + notify_on_share: true, + show_onboarding_experience: true, + onboarding_experience_completed: false, + home_liveboard_identifier: "home_liveboard_identifier_example", + favorite_metadata: [ + { + identifier: "identifier_example", + type: "LIVEBOARD", + }, + ], + preferred_locale: "en-CA", + use_browser_language: true, + extended_properties: {}, + extended_preferences: {}, + trigger_welcome_email: true, + trigger_activation_email: true, + } +).then((data:any) => { + console.log('API called successfully. Returned data: ' + data); +}).catch((error:any) => console.error(error)); + + +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **createUserRequest** | **CreateUserRequest**| | + + +### Return type + +**User** + +### Authorization + +[bearerAuth](README.md#bearerAuth) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | User successfully created. | - | +**400** | Invalid request. | - | +**401** | Unauthorized access. | - | +**403** | Forbidden access. | - | +**500** | Unexpected error | - | + +[[Back to top]](#) [[Back to API list]](README.md#documentation-for-api-endpoints) [[Back to Model list]](README.md#documentation-for-models) [[Back to README]](README.md) + +# **createUserGroup** +> UserGroupResponse createUserGroup(createUserGroupRequest) + + Version: 9.0.0.cl or later Creates a group object in ThoughtSpot. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `GROUP_ADMINISTRATION` (**Can manage groups**) privilege is required. #### About groups Groups in ThoughtSpot are used by the administrators to define privileges and organize users based on their roles and access requirements. To know more about groups and privileges, see [ThoughtSpot Product Documentation](https://docs.thoughtspot.com/cloud/latest/groups-privileges). #### Supported operations The API endpoint lets you perform the following operations: * Assign privileges * Add users * Define sharing visibility * Add sub-groups * Assign a default Liveboard + +### Example + + +```typescript +import { createBearerAuthenticationConfig, ThoughtSpotRestApi, CreateUserGroupRequest } from '@thoughtspot/rest-api-sdk'; + +const configuration = createBearerAuthenticationConfig("CLUSTER_SERVER_URL", { + username: "YOUR_USERNAME", + password: "YOUR_PASSWORD", +}); +const apiInstance = new ThoughtSpotRestApi(configuration); + +apiInstance.createUserGroup( + // CreateUserGroupRequest + { + name: "name_example", + display_name: "display_name_example", + default_liveboard_identifiers: [ + "default_liveboard_identifiers_example", + ], + description: "description_example", + privileges: [ + "ADMINISTRATION", + ], + sub_group_identifiers: [ + "sub_group_identifiers_example", + ], + type: "LOCAL_GROUP", + user_identifiers: [ + "user_identifiers_example", + ], + visibility: "SHARABLE", + role_identifiers: [ + "role_identifiers_example", + ], + } +).then((data:any) => { + console.log('API called successfully. Returned data: ' + data); +}).catch((error:any) => console.error(error)); + + +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **createUserGroupRequest** | **CreateUserGroupRequest**| | + + +### Return type + +**UserGroupResponse** + +### Authorization + +[bearerAuth](README.md#bearerAuth) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | User group successfully created. | - | +**400** | Invalid request. | - | +**401** | Unauthorized access. | - | +**403** | Forbidden access. | - | +**500** | Unexpected error | - | + +[[Back to top]](#) [[Back to API list]](README.md#documentation-for-api-endpoints) [[Back to Model list]](README.md#documentation-for-models) [[Back to README]](README.md) + +# **createVariable** +> Variable createVariable(createVariableRequest) + + Create a variable which can be used for parameterizing metadata objects Version: 26.4.0.cl or later Allows creating a variable which can be used for parameterizing metadata objects in ThoughtSpot. Requires ADMINISTRATION role and TENANT scope. The CAN_MANAGE_VARIABLES permission allows you to manage Formula Variables in the current organization scope. The API endpoint supports the following types of variables: * CONNECTION_PROPERTY - For connection properties * TABLE_MAPPING - For table mappings * CONNECTION_PROPERTY_PER_PRINCIPAL - For connection properties per principal. In order to use this please contact support to enable this. * FORMULA_VARIABLE - For Formula variables, introduced in 10.15.0.cl When creating a variable, you need to specify: * The variable type * A unique name for the variable * Whether the variable contains sensitive values (defaults to false) * The data type of the variable, only specify for formula variables (defaults to null) The operation will fail if: * The user lacks required permissions * The variable name already exists * The variable type is invalid + +### Example + + +```typescript +import { createBearerAuthenticationConfig, ThoughtSpotRestApi, CreateVariableRequest } from '@thoughtspot/rest-api-sdk'; + +const configuration = createBearerAuthenticationConfig("CLUSTER_SERVER_URL", { + username: "YOUR_USERNAME", + password: "YOUR_PASSWORD", +}); +const apiInstance = new ThoughtSpotRestApi(configuration); + +apiInstance.createVariable( + // CreateVariableRequest + { + type: "CONNECTION_PROPERTY", + name: "name_example", + is_sensitive: false, + data_type: "VARCHAR", + } +).then((data:any) => { + console.log('API called successfully. Returned data: ' + data); +}).catch((error:any) => console.error(error)); + + +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **createVariableRequest** | **CreateVariableRequest**| | + + +### Return type + +**Variable** + +### Authorization + +[bearerAuth](README.md#bearerAuth) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Create variable is successful. | - | +**400** | Invalid request. | - | +**401** | Unauthorized access. | - | +**403** | Forbidden access. | - | +**500** | Unexpected error | - | + +[[Back to top]](#) [[Back to API list]](README.md#documentation-for-api-endpoints) [[Back to Model list]](README.md#documentation-for-models) [[Back to README]](README.md) + +# **createWebhookConfiguration** +> WebhookResponse createWebhookConfiguration(createWebhookConfigurationRequest) + + Version: 10.14.0.cl or later Creates a new webhook configuration to receive notifications for specified events. The webhook will be triggered when the configured events occur in the system. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) or `DEVELOPER` (**Has developer privilege**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, users with `CAN_MANAGE_WEBHOOKS` (**Can manage webhooks**) privilege are also authorized to perform this action. + +### Example + + +```typescript +import { createBearerAuthenticationConfig, ThoughtSpotRestApi, CreateWebhookConfigurationRequest } from '@thoughtspot/rest-api-sdk'; + +const configuration = createBearerAuthenticationConfig("CLUSTER_SERVER_URL", { + username: "YOUR_USERNAME", + password: "YOUR_PASSWORD", +}); +const apiInstance = new ThoughtSpotRestApi(configuration); + +apiInstance.createWebhookConfiguration( + // CreateWebhookConfigurationRequest + { + name: "name_example", + description: "description_example", + url: "url_example", + url_params: {}, + events: [ + "LIVEBOARD_SCHEDULE", + ], + authentication: null, + signature_verification: null, + storage_destination: null, + additional_headers: [ + { + key: "key_example", + value: "value_example", + }, + ], + } +).then((data:any) => { + console.log('API called successfully. Returned data: ' + data); +}).catch((error:any) => console.error(error)); + + +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **createWebhookConfigurationRequest** | **CreateWebhookConfigurationRequest**| | + + +### Return type + +**WebhookResponse** + +### Authorization + +[bearerAuth](README.md#bearerAuth) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Webhook configuration created successfully | - | +**400** | Invalid request. | - | +**401** | Unauthorized access. | - | +**403** | Forbidden access. | - | +**500** | Unexpected error | - | + +[[Back to top]](#) [[Back to API list]](README.md#documentation-for-api-endpoints) [[Back to Model list]](README.md#documentation-for-models) [[Back to README]](README.md) + +# **dbtConnection** +> any dbtConnection() + + Version: 9.9.0.cl or later Creates a DBT connection object in ThoughtSpot. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege or `DATAMANAGEMENT` (**Can manage data**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the following Data control privileges may be required: - `CAN_MANAGE_CUSTOM_CALENDAR`(**Can manage custom calendars**) - `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) - `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` (**Can manage data models**) #### About create DBT connection DBT connection in ThoughtSpot is used by the user to define DBT credentials for cloud . The API needs embrace connection, embrace database name, DBT url, import type, DBT account identifier, DBT project identifier, DBT access token and environment details (or) embrace connection, embrace database name, import type, file_content to create a connection object. To know more about DBT, see ThoughtSpot Product Documentation. + +### Example + + +```typescript +import { createBearerAuthenticationConfig, ThoughtSpotRestApi, DbtConnectionRequest } from '@thoughtspot/rest-api-sdk'; + +const configuration = createBearerAuthenticationConfig("CLUSTER_SERVER_URL", { + username: "YOUR_USERNAME", + password: "YOUR_PASSWORD", +}); +const apiInstance = new ThoughtSpotRestApi(configuration); + +apiInstance.dbtConnection( + // string | Name of the connection. + "connectionName_example" , + // string | Name of the Database. + "databaseName_example" , + // string | Mention type of Import (optional) + "DBT_CLOUD" , + // string | Access token is mandatory when Import_Type is DBT_CLOUD. (optional) + "accessToken_example" , + // string | DBT URL is mandatory when Import_Type is DBT_CLOUD. (optional) + "dbtUrl_example" , + // string | Account ID is mandatory when Import_Type is DBT_CLOUD (optional) + "accountId_example" , + // string | Project ID is mandatory when Import_Type is DBT_CLOUD (optional) + "projectId_example" , + // string | DBT Environment ID\\\" (optional) + "dbtEnvId_example" , + // string | Name of the project (optional) + "projectName_example" , + // HttpFile | Upload DBT Manifest and Catalog artifact files as a ZIP file. This field is Mandatory when Import Type is \\\'ZIP_FILE\\\' (optional) + { data: Buffer.from(fs.readFileSync('/path/to/file', 'utf-8')), name: '/path/to/file' } +).then((data:any) => { + console.log('API called successfully. Returned data: ' + data); +}).catch((error:any) => console.error(error)); + + +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **connectionName** | [**string**] | Name of the connection. | defaults to undefined + **databaseName** | [**string**] | Name of the Database. | defaults to undefined + **importType** | [**string**]**Array<'DBT_CLOUD' | 'ZIP_FILE'>** | Mention type of Import | (optional) defaults to 'DBT_CLOUD' + **accessToken** | [**string**] | Access token is mandatory when Import_Type is DBT_CLOUD. | (optional) defaults to undefined + **dbtUrl** | [**string**] | DBT URL is mandatory when Import_Type is DBT_CLOUD. | (optional) defaults to undefined + **accountId** | [**string**] | Account ID is mandatory when Import_Type is DBT_CLOUD | (optional) defaults to undefined + **projectId** | [**string**] | Project ID is mandatory when Import_Type is DBT_CLOUD | (optional) defaults to undefined + **dbtEnvId** | [**string**] | DBT Environment ID\\\" | (optional) defaults to undefined + **projectName** | [**string**] | Name of the project | (optional) defaults to undefined + **fileContent** | [**HttpFile**] | Upload DBT Manifest and Catalog artifact files as a ZIP file. This field is Mandatory when Import Type is \\\'ZIP_FILE\\\' | (optional) defaults to undefined + + +### Return type + +**any** + +### Authorization + +[bearerAuth](README.md#bearerAuth) + +### HTTP request headers + + - **Content-Type**: multipart/form-data + - **Accept**: application/json + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Succesfully created DBT Connection. | - | +**400** | Invalid request. | - | +**401** | Unauthorized access. | - | +**403** | Forbidden access. | - | +**500** | Unexpected error | - | + +[[Back to top]](#) [[Back to API list]](README.md#documentation-for-api-endpoints) [[Back to Model list]](README.md#documentation-for-models) [[Back to README]](README.md) + +# **dbtGenerateSyncTml** +> any dbtGenerateSyncTml() + + Version: 9.9.0.cl or later Resynchronize the existing list of models, tables, worksheet tml’s and import them to Thoughtspot based on the DBT connection object. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege or `DATAMANAGEMENT` (**Can manage data**) privilege, along with an existing DBT connection. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the following data control privileges may be required: - `CAN_MANAGE_CUSTOM_CALENDAR`(**Can manage custom calendars**) - `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) - `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` (**Can manage data models**) + +### Example + + +```typescript +import { createBearerAuthenticationConfig, ThoughtSpotRestApi, DbtGenerateSyncTmlRequest } from '@thoughtspot/rest-api-sdk'; + +const configuration = createBearerAuthenticationConfig("CLUSTER_SERVER_URL", { + username: "YOUR_USERNAME", + password: "YOUR_PASSWORD", +}); +const apiInstance = new ThoughtSpotRestApi(configuration); + +apiInstance.dbtGenerateSyncTml( + // string | Unique ID of the DBT connection. + "dbtConnectionIdentifier_example" , + // HttpFile | Upload DBT Manifest and Catalog artifact files as a ZIP file. This field is mandatory if the connection was created with import_type ‘ZIP_FILE’ (optional) + { data: Buffer.from(fs.readFileSync('/path/to/file', 'utf-8')), name: '/path/to/file' } +).then((data:any) => { + console.log('API called successfully. Returned data: ' + data); +}).catch((error:any) => console.error(error)); + + +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **dbtConnectionIdentifier** | [**string**] | Unique ID of the DBT connection. | defaults to undefined + **fileContent** | [**HttpFile**] | Upload DBT Manifest and Catalog artifact files as a ZIP file. This field is mandatory if the connection was created with import_type ‘ZIP_FILE’ | (optional) defaults to undefined + + +### Return type + +**any** + +### Authorization + +[bearerAuth](README.md#bearerAuth) + +### HTTP request headers + + - **Content-Type**: multipart/form-data + - **Accept**: application/json + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Sync Table and Worksheet TML\'s are successfully generated. | - | +**400** | Invalid request. | - | +**401** | Unauthorized access. | - | +**403** | Forbidden access. | - | +**500** | Unexpected error | - | + +[[Back to top]](#) [[Back to API list]](README.md#documentation-for-api-endpoints) [[Back to Model list]](README.md#documentation-for-models) [[Back to README]](README.md) + +# **dbtGenerateTml** +> any dbtGenerateTml() + + Version: 9.9.0.cl or later Generate required table and worksheet and import them. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege or `DATAMANAGEMENT` (**Can manage data**) privilege, along with an existing DBT connection. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the following data control privileges may be required: - `CAN_MANAGE_CUSTOM_CALENDAR`(**Can manage custom calendars**) - `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) - `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` (**Can manage data models**) #### About generate TML Models and Worksheets to be imported can be selected by the user as part of the API. + +### Example + + +```typescript +import { createBearerAuthenticationConfig, ThoughtSpotRestApi, DbtGenerateTmlRequest } from '@thoughtspot/rest-api-sdk'; + +const configuration = createBearerAuthenticationConfig("CLUSTER_SERVER_URL", { + username: "YOUR_USERNAME", + password: "YOUR_PASSWORD", +}); +const apiInstance = new ThoughtSpotRestApi(configuration); + +apiInstance.dbtGenerateTml( + // string | Unique ID of the DBT connection. + "dbtConnectionIdentifier_example" , + // string | List of Models and their respective Tables Example: \\\'[{\\\"model_name\\\": \\\"model_name\\\", \\\"tables\\\": [\\\"table_name\\\"]}]\\\' + "modelTables_example" , + // string | Mention the worksheet tmls to import + "ALL" , + // string | List of worksheets is mandatory when import_Worksheets is type SELECTED Example: [\\\"worksheet_name\\\"] (optional) + "worksheets_example" , + // HttpFile | Upload DBT Manifest and Catalog artifact files as a ZIP file. This field is mandatory if the connection was created with import_type ‘ZIP_FILE’ (optional) + { data: Buffer.from(fs.readFileSync('/path/to/file', 'utf-8')), name: '/path/to/file' } +).then((data:any) => { + console.log('API called successfully. Returned data: ' + data); +}).catch((error:any) => console.error(error)); + + +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **dbtConnectionIdentifier** | [**string**] | Unique ID of the DBT connection. | defaults to undefined + **modelTables** | [**string**] | List of Models and their respective Tables Example: \\\'[{\\\"model_name\\\": \\\"model_name\\\", \\\"tables\\\": [\\\"table_name\\\"]}]\\\' | defaults to undefined + **importWorksheets** | [**string**]**Array<'ALL' | 'NONE' | 'SELECTED'>** | Mention the worksheet tmls to import | defaults to undefined + **worksheets** | [**string**] | List of worksheets is mandatory when import_Worksheets is type SELECTED Example: [\\\"worksheet_name\\\"] | (optional) defaults to undefined + **fileContent** | [**HttpFile**] | Upload DBT Manifest and Catalog artifact files as a ZIP file. This field is mandatory if the connection was created with import_type ‘ZIP_FILE’ | (optional) defaults to undefined + + +### Return type + +**any** + +### Authorization + +[bearerAuth](README.md#bearerAuth) + +### HTTP request headers + + - **Content-Type**: multipart/form-data + - **Accept**: application/json + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Required Table and Worksheet TML\'s are successfully generated. | - | +**400** | Invalid request. | - | +**401** | Unauthorized access. | - | +**403** | Forbidden access. | - | +**500** | Unexpected error | - | + +[[Back to top]](#) [[Back to API list]](README.md#documentation-for-api-endpoints) [[Back to Model list]](README.md#documentation-for-models) [[Back to README]](README.md) + +# **dbtSearch** +> Array dbtSearch() + + Version: 9.9.0.cl or later Gets a list of DBT connection objects by user and organization, available on the ThoughtSpot system. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege or `DATAMANAGEMENT` (**Can manage data**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the following Data control privileges may be required: - `CAN_MANAGE_CUSTOM_CALENDAR`(**Can manage custom calendars**) - `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) - `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` (**Can manage data models**) #### About search DBT connection To get details of a specific DBT connection identifier, database connection identifier, database connection name, database name, project name, project identifier, environment identifier , import type and author. + +### Example + + +```typescript +import { createBearerAuthenticationConfig, ThoughtSpotRestApi, DbtSearchRequest } from '@thoughtspot/rest-api-sdk'; + +const configuration = createBearerAuthenticationConfig("CLUSTER_SERVER_URL", { + username: "YOUR_USERNAME", + password: "YOUR_PASSWORD", +}); +const apiInstance = new ThoughtSpotRestApi(configuration); + +apiInstance.dbtSearch().then((data:any) => { + console.log('API called successfully. Returned data: ' + JSON.stringify(data)); +}).catch((error:any) => console.error(error)); + + +``` + + +### Parameters +This endpoint does not need any parameter. + + +### Return type + +**Array** + +### Authorization + +[bearerAuth](README.md#bearerAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Retrieved list of DBT connections successfully. | - | +**400** | Invalid request. | - | +**401** | Unauthorized access. | - | +**403** | Forbidden access. | - | +**500** | Unexpected error | - | + +[[Back to top]](#) [[Back to API list]](README.md#documentation-for-api-endpoints) [[Back to Model list]](README.md#documentation-for-models) [[Back to README]](README.md) + +# **deactivateUser** +> ResponseActivationURL deactivateUser(deactivateUserRequest) + + Version: 9.7.0.cl or later Deactivates a user account. Requires `ADMINISTRATION` (**Can administer Thoughtspot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `USER_ADMINISTRATION` (**Can manage users**) privilege is required. To deactivate a user account, the API request body must include the following information: - Username or the GUID of the user account - Base URL of the ThoughtSpot instance If the API request is successful, ThoughtSpot returns the activation URL in the response. The activation URL is valid for 14 days and can be used to re-activate the account and reset the password of the deactivated account. + +### Example + + +```typescript +import { createBearerAuthenticationConfig, ThoughtSpotRestApi, DeactivateUserRequest } from '@thoughtspot/rest-api-sdk'; + +const configuration = createBearerAuthenticationConfig("CLUSTER_SERVER_URL", { + username: "YOUR_USERNAME", + password: "YOUR_PASSWORD", +}); +const apiInstance = new ThoughtSpotRestApi(configuration); + +apiInstance.deactivateUser( + // DeactivateUserRequest + { + user_identifier: "user_identifier_example", + base_url: "base_url_example", + } +).then((data:any) => { + console.log('API called successfully. Returned data: ' + data); +}).catch((error:any) => console.error(error)); + + +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **deactivateUserRequest** | **DeactivateUserRequest**| | + + +### Return type + +**ResponseActivationURL** + +### Authorization + +[bearerAuth](README.md#bearerAuth) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | User deactivated successfully. | - | +**400** | Invalid request. | - | +**401** | Unauthorized access. | - | +**403** | Forbidden access. | - | +**500** | Unexpected error | - | + +[[Back to top]](#) [[Back to API list]](README.md#documentation-for-api-endpoints) [[Back to Model list]](README.md#documentation-for-models) [[Back to README]](README.md) + +# **deleteCalendar** +> void deleteCalendar() + + Version: 10.12.0.cl or later Deletes a [custom calendar](https://docs.thoughtspot.com/cloud/latest/connections-cust-cal). Requires `DATAMANAGEMENT` (**Can manage data**) or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your ThoughtSpot instance, the `CAN_MANAGE_CUSTOM_CALENDAR` (**Can manage custom calendars**) privilege is required. #### Usage guidelines To delete a custom calendar, specify the calendar ID as a path parameter in the request URL. + +### Example + + +```typescript +import { createBearerAuthenticationConfig, ThoughtSpotRestApi, DeleteCalendarRequest } from '@thoughtspot/rest-api-sdk'; + +const configuration = createBearerAuthenticationConfig("CLUSTER_SERVER_URL", { + username: "YOUR_USERNAME", + password: "YOUR_PASSWORD", +}); +const apiInstance = new ThoughtSpotRestApi(configuration); + +apiInstance.deleteCalendar( + // string | Unique ID or name of the Calendar. + "calendar_identifier_example" +).then((data:any) => { + console.log('API called successfully. Returned data: ' + data); +}).catch((error:any) => console.error(error)); + + +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **calendarIdentifier** | [**string**] | Unique ID or name of the Calendar. | defaults to undefined + + +### Return type + +**void** + +### Authorization + +[bearerAuth](README.md#bearerAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**204** | Custom calendar successfully deleted. | - | +**400** | Invalid request. | - | +**401** | Unauthorized access. | - | +**403** | Forbidden access. | - | +**500** | Unexpected error | - | + +[[Back to top]](#) [[Back to API list]](README.md#documentation-for-api-endpoints) [[Back to Model list]](README.md#documentation-for-models) [[Back to README]](README.md) + +# **deleteCollection** +> CollectionDeleteResponse deleteCollection(deleteCollectionRequest) + + Version: 26.4.0.cl or later Deletes one or more collections from ThoughtSpot. #### Delete options * **delete_children**: When set to `true`, deletes the child objects (metadata items) within the collection that the user has access to. Objects that the user does not have permission to delete will be skipped. * **dry_run**: When set to `true`, performs a preview of the deletion operation without actually deleting anything. The response shows what would be deleted, allowing you to review before committing the deletion. #### Response The response includes: * **metadata_deleted**: List of metadata objects that were successfully deleted * **metadata_skipped**: List of metadata objects that were skipped due to lack of permissions or other constraints + +### Example + + +```typescript +import { createBearerAuthenticationConfig, ThoughtSpotRestApi, DeleteCollectionRequest } from '@thoughtspot/rest-api-sdk'; + +const configuration = createBearerAuthenticationConfig("CLUSTER_SERVER_URL", { + username: "YOUR_USERNAME", + password: "YOUR_PASSWORD", +}); +const apiInstance = new ThoughtSpotRestApi(configuration); + +apiInstance.deleteCollection( + // DeleteCollectionRequest + { + collection_identifiers: [ + "collection_identifiers_example", + ], + delete_children: false, + dry_run: false, + } +).then((data:any) => { + console.log('API called successfully. Returned data: ' + data); +}).catch((error:any) => console.error(error)); + + +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **deleteCollectionRequest** | **DeleteCollectionRequest**| | + + +### Return type + +**CollectionDeleteResponse** + +### Authorization + +[bearerAuth](README.md#bearerAuth) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Collections deleted successfully. | - | +**400** | Invalid request. | - | +**401** | Unauthorized access. | - | +**403** | Forbidden access. | - | +**404** | Resource not found. | - | +**500** | Unexpected error | - | + +[[Back to top]](#) [[Back to API list]](README.md#documentation-for-api-endpoints) [[Back to Model list]](README.md#documentation-for-models) [[Back to README]](README.md) + +# **deleteConfig** +> void deleteConfig(deleteConfigRequest) + + Version: 9.2.0.cl or later Deletes Git repository configuration from your ThoughtSpot instance. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance on your instance, the `CAN_SETUP_VERSION_CONTROL` (**Can set up version control**) privilege. + +### Example + + +```typescript +import { createBearerAuthenticationConfig, ThoughtSpotRestApi, DeleteConfigRequest } from '@thoughtspot/rest-api-sdk'; + +const configuration = createBearerAuthenticationConfig("CLUSTER_SERVER_URL", { + username: "YOUR_USERNAME", + password: "YOUR_PASSWORD", +}); +const apiInstance = new ThoughtSpotRestApi(configuration); + +apiInstance.deleteConfig( + // DeleteConfigRequest + { + cluster_level: true, + } +).then((data:any) => { + console.log('API called successfully. Returned data: ' + data); +}).catch((error:any) => console.error(error)); + + +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **deleteConfigRequest** | **DeleteConfigRequest**| | + + +### Return type + +**void** + +### Authorization + +[bearerAuth](README.md#bearerAuth) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**204** | Successfully deleted local repository configuration | - | +**400** | Invalid request. | - | +**401** | Unauthorized access. | - | +**403** | Forbidden access. | - | +**500** | Unexpected error | - | + +[[Back to top]](#) [[Back to API list]](README.md#documentation-for-api-endpoints) [[Back to Model list]](README.md#documentation-for-models) [[Back to README]](README.md) + +# **deleteConnection** +> void deleteConnection(deleteConnectionRequest) + + Version: 9.2.0.cl or later **Important**: This endpoint is deprecated and will be removed from ThoughtSpot in September 2025. ThoughtSpot strongly recommends using the [Delete Connection V2](#/http/api-endpoints/connections/delete-connection-v2) endpoint to delete your connection objects. #### Usage guidelines Deletes a connection object. Requires `DATAMANAGEMENT` (**Can manage data**) and edit permissions to the connection object, or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) privilege is required. **Note**: If a connection has dependent objects, make sure you remove its associations before the delete operation. + +### Example + + +```typescript +import { createBearerAuthenticationConfig, ThoughtSpotRestApi, DeleteConnectionRequest } from '@thoughtspot/rest-api-sdk'; + +const configuration = createBearerAuthenticationConfig("CLUSTER_SERVER_URL", { + username: "YOUR_USERNAME", + password: "YOUR_PASSWORD", +}); +const apiInstance = new ThoughtSpotRestApi(configuration); + +apiInstance.deleteConnection( + // DeleteConnectionRequest + { + connection_identifier: "connection_identifier_example", + } +).then((data:any) => { + console.log('API called successfully. Returned data: ' + data); +}).catch((error:any) => console.error(error)); + + +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **deleteConnectionRequest** | **DeleteConnectionRequest**| | + + +### Return type + +**void** + +### Authorization + +[bearerAuth](README.md#bearerAuth) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**204** | Connection successfully deleted. | - | +**400** | Invalid request. | - | +**401** | Unauthorized access. | - | +**403** | Forbidden access. | - | +**500** | Unexpected error | - | + +[[Back to top]](#) [[Back to API list]](README.md#documentation-for-api-endpoints) [[Back to Model list]](README.md#documentation-for-models) [[Back to README]](README.md) + +# **deleteConnectionConfiguration** +> void deleteConnectionConfiguration(deleteConnectionConfigurationRequest) + + Version: 10.12.0.cl or later Deletes connection configuration objects. Requires `DATAMANAGEMENT` (**Can manage data**) and edit permissions to the connection object, or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) privilege is required. + +### Example + + +```typescript +import { createBearerAuthenticationConfig, ThoughtSpotRestApi, DeleteConnectionConfigurationRequest } from '@thoughtspot/rest-api-sdk'; + +const configuration = createBearerAuthenticationConfig("CLUSTER_SERVER_URL", { + username: "YOUR_USERNAME", + password: "YOUR_PASSWORD", +}); +const apiInstance = new ThoughtSpotRestApi(configuration); + +apiInstance.deleteConnectionConfiguration( + // DeleteConnectionConfigurationRequest + { + configuration_identifier: "configuration_identifier_example", + connection_identifier: "connection_identifier_example", + } +).then((data:any) => { + console.log('API called successfully. Returned data: ' + data); +}).catch((error:any) => console.error(error)); + + +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **deleteConnectionConfigurationRequest** | **DeleteConnectionConfigurationRequest**| | + + +### Return type + +**void** + +### Authorization + +[bearerAuth](README.md#bearerAuth) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**204** | Connection Configurations successfully deleted. | - | +**400** | Invalid request. | - | +**401** | Unauthorized access. | - | +**403** | Forbidden access. | - | +**500** | Unexpected error | - | + +[[Back to top]](#) [[Back to API list]](README.md#documentation-for-api-endpoints) [[Back to Model list]](README.md#documentation-for-models) [[Back to README]](README.md) + +# **deleteConnectionV2** +> void deleteConnectionV2() + + Version: 10.4.0.cl or later Deletes a connection object. **Note**: If a connection has dependent objects, make sure you remove its associations before the delete operation. Requires `DATAMANAGEMENT` (**Can manage data**) and edit permissions to the connection object, or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) privilege is required. + +### Example + + +```typescript +import { createBearerAuthenticationConfig, ThoughtSpotRestApi, DeleteConnectionV2Request } from '@thoughtspot/rest-api-sdk'; + +const configuration = createBearerAuthenticationConfig("CLUSTER_SERVER_URL", { + username: "YOUR_USERNAME", + password: "YOUR_PASSWORD", +}); +const apiInstance = new ThoughtSpotRestApi(configuration); + +apiInstance.deleteConnectionV2( + // string | Unique ID or name of the connection. + "connection_identifier_example" +).then((data:any) => { + console.log('API called successfully. Returned data: ' + data); +}).catch((error:any) => console.error(error)); + + +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **connectionIdentifier** | [**string**] | Unique ID or name of the connection. | defaults to undefined + + +### Return type + +**void** + +### Authorization + +[bearerAuth](README.md#bearerAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**204** | Connection successfully deleted. | - | +**400** | Invalid request. | - | +**401** | Unauthorized access. | - | +**403** | Forbidden access. | - | +**500** | Unexpected error | - | + +[[Back to top]](#) [[Back to API list]](README.md#documentation-for-api-endpoints) [[Back to Model list]](README.md#documentation-for-models) [[Back to README]](README.md) + +# **deleteCustomAction** +> void deleteCustomAction() + + Version: 9.6.0.cl or later Removes the custom action specified in the API request. Requires `DEVELOPER` (**Has Developer privilege**) or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `DEVELOPER` (**Has developer privilege**) privilege is required. + +### Example + + +```typescript +import { createBearerAuthenticationConfig, ThoughtSpotRestApi, DeleteCustomActionRequest } from '@thoughtspot/rest-api-sdk'; + +const configuration = createBearerAuthenticationConfig("CLUSTER_SERVER_URL", { + username: "YOUR_USERNAME", + password: "YOUR_PASSWORD", +}); +const apiInstance = new ThoughtSpotRestApi(configuration); + +apiInstance.deleteCustomAction( + // string | Unique ID or name of the custom action. + "custom_action_identifier_example" +).then((data:any) => { + console.log('API called successfully. Returned data: ' + data); +}).catch((error:any) => console.error(error)); + + +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **customActionIdentifier** | [**string**] | Unique ID or name of the custom action. | defaults to undefined + + +### Return type + +**void** + +### Authorization + +[bearerAuth](README.md#bearerAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**204** | Custom action is successfully deleted. | - | +**400** | Invalid request. | - | +**401** | Unauthorized access. | - | +**403** | Forbidden access. | - | +**500** | Unexpected error | - | + +[[Back to top]](#) [[Back to API list]](README.md#documentation-for-api-endpoints) [[Back to Model list]](README.md#documentation-for-models) [[Back to README]](README.md) + +# **deleteDbtConnection** +> void deleteDbtConnection() + + Version: 9.9.0.cl or later Removes the specified DBT connection object from the ThoughtSpot system. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) or `DATAMANAGEMENT` (**Can manage data ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the following Data control privileges may be required: - `CAN_MANAGE_CUSTOM_CALENDAR`(**Can manage custom calendars**) - `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) - `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` (**Can manage data models**) + +### Example + + +```typescript +import { createBearerAuthenticationConfig, ThoughtSpotRestApi, DeleteDbtConnectionRequest } from '@thoughtspot/rest-api-sdk'; + +const configuration = createBearerAuthenticationConfig("CLUSTER_SERVER_URL", { + username: "YOUR_USERNAME", + password: "YOUR_PASSWORD", +}); +const apiInstance = new ThoughtSpotRestApi(configuration); + +apiInstance.deleteDbtConnection( + // string | Unique ID of the DBT Connection. + "dbt_connection_identifier_example" +).then((data:any) => { + console.log('API called successfully. Returned data: ' + data); +}).catch((error:any) => console.error(error)); + + +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **dbtConnectionIdentifier** | [**string**] | Unique ID of the DBT Connection. | defaults to undefined + + +### Return type + +**void** + +### Authorization + +[bearerAuth](README.md#bearerAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**204** | DBT Connection successfully deleted. | - | +**400** | Invalid request. | - | +**401** | Unauthorized access. | - | +**403** | Forbidden access. | - | +**500** | Unexpected error | - | + +[[Back to top]](#) [[Back to API list]](README.md#documentation-for-api-endpoints) [[Back to Model list]](README.md#documentation-for-models) [[Back to README]](README.md) + +# **deleteEmailCustomization** +> void deleteEmailCustomization() + + Version: 10.10.0.cl or later Deletes the configuration for the email customization. #### Pre-requisites Requires `DEVELOPER` (**has developer privilege**) or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `DEVELOPER` (**Has developer privilege**) privilege is required. **NOTE**:This endpoint in currently in beta. Contact ThoughtSpot support to enable this on your instance. #### Usage guidelines - Call the search API endpoint to get the `template_identifier` from the response. - Use that `template_identifier` as a parameter in this API request. + +### Example + + +```typescript +import { createBearerAuthenticationConfig, ThoughtSpotRestApi, DeleteEmailCustomizationRequest } from '@thoughtspot/rest-api-sdk'; + +const configuration = createBearerAuthenticationConfig("CLUSTER_SERVER_URL", { + username: "YOUR_USERNAME", + password: "YOUR_PASSWORD", +}); +const apiInstance = new ThoughtSpotRestApi(configuration); + +apiInstance.deleteEmailCustomization( + // string | Unique ID or name of the email customization. + "template_identifier_example" +).then((data:any) => { + console.log('API called successfully. Returned data: ' + data); +}).catch((error:any) => console.error(error)); + + +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **templateIdentifier** | [**string**] | Unique ID or name of the email customization. | defaults to undefined + + +### Return type + +**void** + +### Authorization + +[bearerAuth](README.md#bearerAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**204** | Email Customization configuration successfully deleted. | - | +**400** | Invalid request. | - | +**403** | Unauthorized access. | - | +**500** | Unexpected error | - | + +[[Back to top]](#) [[Back to API list]](README.md#documentation-for-api-endpoints) [[Back to Model list]](README.md#documentation-for-models) [[Back to README]](README.md) + +# **deleteMetadata** +> void deleteMetadata(deleteMetadataRequest) + + Version: 9.0.0.cl or later Removes the specified metadata object from the ThoughtSpot system. Requires edit access to the metadata object. + +### Example + + +```typescript +import { createBearerAuthenticationConfig, ThoughtSpotRestApi, DeleteMetadataRequest } from '@thoughtspot/rest-api-sdk'; + +const configuration = createBearerAuthenticationConfig("CLUSTER_SERVER_URL", { + username: "YOUR_USERNAME", + password: "YOUR_PASSWORD", +}); +const apiInstance = new ThoughtSpotRestApi(configuration); + +apiInstance.deleteMetadata( + // DeleteMetadataRequest + { + metadata: [ + { + type: "LIVEBOARD", + identifier: "identifier_example", + }, + ], + delete_disabled_objects: false, + } +).then((data:any) => { + console.log('API called successfully. Returned data: ' + data); +}).catch((error:any) => console.error(error)); + + +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **deleteMetadataRequest** | **DeleteMetadataRequest**| | + + +### Return type + +**void** + +### Authorization + +[bearerAuth](README.md#bearerAuth) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**204** | Metadata objects successfully deleted. | - | +**400** | Invalid request. | - | +**401** | Unauthorized access. | - | +**403** | Forbidden access. | - | +**500** | Unexpected error | - | + +[[Back to top]](#) [[Back to API list]](README.md#documentation-for-api-endpoints) [[Back to Model list]](README.md#documentation-for-models) [[Back to README]](README.md) + +# **deleteOrg** +> void deleteOrg() + + Version: 9.0.0.cl or later Deletes an Org object from the ThoughtSpot system. Requires cluster administration (**Can administer Org**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `ORG_ADMINISTRATION` (**Can manage Orgs**) privilege is required. When you delete an Org, all its users and objects created in that Org context are removed. However, if the users in the deleted Org also exists in other Orgs, they are removed only from the deleted Org. + +### Example + + +```typescript +import { createBearerAuthenticationConfig, ThoughtSpotRestApi, DeleteOrgRequest } from '@thoughtspot/rest-api-sdk'; + +const configuration = createBearerAuthenticationConfig("CLUSTER_SERVER_URL", { + username: "YOUR_USERNAME", + password: "YOUR_PASSWORD", +}); +const apiInstance = new ThoughtSpotRestApi(configuration); + +apiInstance.deleteOrg( + // string | ID or name of the Org + "org_identifier_example" +).then((data:any) => { + console.log('API called successfully. Returned data: ' + data); +}).catch((error:any) => console.error(error)); + + +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **orgIdentifier** | [**string**] | ID or name of the Org | defaults to undefined + + +### Return type + +**void** + +### Authorization + +[bearerAuth](README.md#bearerAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**204** | Organization successfully deleted. | - | +**400** | Invalid request. | - | +**401** | Unauthorized access. | - | +**403** | Forbidden access. | - | +**500** | Unexpected error | - | + +[[Back to top]](#) [[Back to API list]](README.md#documentation-for-api-endpoints) [[Back to Model list]](README.md#documentation-for-models) [[Back to README]](README.md) + +# **deleteOrgEmailCustomization** +> void deleteOrgEmailCustomization(deleteOrgEmailCustomizationRequest) + + Version: 10.12.0.cl or later Deletes the configuration for the email customization. #### Pre-requisites Requires `DEVELOPER` (**has developer privilege**) or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `DEVELOPER` (**Has developer privilege**) privilege is required. **NOTE**:This endpoint in currently in beta. Contact ThoughtSpot support to enable this on your instance. #### Usage guidelines - Call the search API endpoint to get the `org_identifier` from the response. - Use that `org_identifier` as a parameter in this API request. + +### Example + + +```typescript +import { createBearerAuthenticationConfig, ThoughtSpotRestApi, DeleteOrgEmailCustomizationRequest } from '@thoughtspot/rest-api-sdk'; + +const configuration = createBearerAuthenticationConfig("CLUSTER_SERVER_URL", { + username: "YOUR_USERNAME", + password: "YOUR_PASSWORD", +}); +const apiInstance = new ThoughtSpotRestApi(configuration); + +apiInstance.deleteOrgEmailCustomization( + // DeleteOrgEmailCustomizationRequest + { + org_identifiers: [ + "org_identifiers_example", + ], + } +).then((data:any) => { + console.log('API called successfully. Returned data: ' + data); +}).catch((error:any) => console.error(error)); + + +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **deleteOrgEmailCustomizationRequest** | **DeleteOrgEmailCustomizationRequest**| | + + +### Return type + +**void** + +### Authorization + +[bearerAuth](README.md#bearerAuth) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**204** | Email Customization configuration successfully deleted. | - | +**400** | Invalid request. | - | +**401** | Unauthorized access. | - | +**403** | Unauthorized access. | - | +**500** | Unexpected error | - | + +[[Back to top]](#) [[Back to API list]](README.md#documentation-for-api-endpoints) [[Back to Model list]](README.md#documentation-for-models) [[Back to README]](README.md) + +# **deleteRole** +> void deleteRole() + + Version: 9.5.0.cl or later Deletes a Role object from the ThoughtSpot system. Available only if [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance. To delete a Role, the `ROLE_ADMINISTRATION` (**Can manage roles**) privilege is required. + +### Example + + +```typescript +import { createBearerAuthenticationConfig, ThoughtSpotRestApi, DeleteRoleRequest } from '@thoughtspot/rest-api-sdk'; + +const configuration = createBearerAuthenticationConfig("CLUSTER_SERVER_URL", { + username: "YOUR_USERNAME", + password: "YOUR_PASSWORD", +}); +const apiInstance = new ThoughtSpotRestApi(configuration); + +apiInstance.deleteRole( + // string | Unique ID or name of the Role. ReadOnly roles cannot be deleted. + "role_identifier_example" +).then((data:any) => { + console.log('API called successfully. Returned data: ' + data); +}).catch((error:any) => console.error(error)); + + +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **roleIdentifier** | [**string**] | Unique ID or name of the Role. ReadOnly roles cannot be deleted. | defaults to undefined + + +### Return type + +**void** + +### Authorization + +[bearerAuth](README.md#bearerAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**204** | Role successfully deleted. | - | +**400** | Invalid request. | - | +**401** | Unauthorized access. | - | +**403** | Forbidden access. | - | +**500** | Internal error | - | + +[[Back to top]](#) [[Back to API list]](README.md#documentation-for-api-endpoints) [[Back to Model list]](README.md#documentation-for-models) [[Back to README]](README.md) + +# **deleteSchedule** +> void deleteSchedule() + + Deletes a scheduled job. Version: 9.4.0.cl or later Deletes a scheduled Liveboard job. Requires at least edit access to Liveboard or `ADMINISTRATION` (**Can administer Org**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `JOBSCHEDULING` (**Can schedule for others**) privilege is required. + +### Example + + +```typescript +import { createBearerAuthenticationConfig, ThoughtSpotRestApi, DeleteScheduleRequest } from '@thoughtspot/rest-api-sdk'; + +const configuration = createBearerAuthenticationConfig("CLUSTER_SERVER_URL", { + username: "YOUR_USERNAME", + password: "YOUR_PASSWORD", +}); +const apiInstance = new ThoughtSpotRestApi(configuration); + +apiInstance.deleteSchedule( + // string | Unique ID or name of the scheduled job. + "schedule_identifier_example" +).then((data:any) => { + console.log('API called successfully. Returned data: ' + data); +}).catch((error:any) => console.error(error)); + + +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **scheduleIdentifier** | [**string**] | Unique ID or name of the scheduled job. | defaults to undefined + + +### Return type + +**void** + +### Authorization + +[bearerAuth](README.md#bearerAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**204** | Schedule successfully deleted. | - | +**400** | Invalid request. | - | +**401** | Unauthorized access. | - | +**403** | Forbidden access. | - | +**500** | Unexpected error | - | + +[[Back to top]](#) [[Back to API list]](README.md#documentation-for-api-endpoints) [[Back to Model list]](README.md#documentation-for-models) [[Back to README]](README.md) + +# **deleteTag** +> void deleteTag() + + Version: 9.0.0.cl or later Deletes a tag object from the ThoughtSpot system Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `TAGMANAGEMENT` (**Can manage tags**) privilege is required to create, edit, and delete tags. + +### Example + + +```typescript +import { createBearerAuthenticationConfig, ThoughtSpotRestApi, DeleteTagRequest } from '@thoughtspot/rest-api-sdk'; + +const configuration = createBearerAuthenticationConfig("CLUSTER_SERVER_URL", { + username: "YOUR_USERNAME", + password: "YOUR_PASSWORD", +}); +const apiInstance = new ThoughtSpotRestApi(configuration); + +apiInstance.deleteTag( + // string | Tag identifier Tag name or Tag id. + "tag_identifier_example" +).then((data:any) => { + console.log('API called successfully. Returned data: ' + data); +}).catch((error:any) => console.error(error)); + + +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **tagIdentifier** | [**string**] | Tag identifier Tag name or Tag id. | defaults to undefined + + +### Return type + +**void** + +### Authorization + +[bearerAuth](README.md#bearerAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**204** | Tag successfully deleted. | - | +**400** | Invalid request. | - | +**401** | Unauthorized access. | - | +**403** | Forbidden access. | - | +**500** | Unexpected error | - | + +[[Back to top]](#) [[Back to API list]](README.md#documentation-for-api-endpoints) [[Back to Model list]](README.md#documentation-for-models) [[Back to README]](README.md) + +# **deleteUser** +> void deleteUser() + + Version: 9.0.0.cl or later Deletes a user from the ThoughtSpot system. If you want to remove a user from a specific Org but not from ThoughtSpot, update the group and Org mapping properties of the user object via a POST API call to the [/api/rest/2.0/users/{user_identifier}/update](#/http/api-endpoints/users/update-user) endpoint. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `USER_ADMINISTRATION` (**Can manage users**) privilege is required. + +### Example + + +```typescript +import { createBearerAuthenticationConfig, ThoughtSpotRestApi, DeleteUserRequest } from '@thoughtspot/rest-api-sdk'; + +const configuration = createBearerAuthenticationConfig("CLUSTER_SERVER_URL", { + username: "YOUR_USERNAME", + password: "YOUR_PASSWORD", +}); +const apiInstance = new ThoughtSpotRestApi(configuration); + +apiInstance.deleteUser( + // string | GUID / name of the user + "user_identifier_example" +).then((data:any) => { + console.log('API called successfully. Returned data: ' + data); +}).catch((error:any) => console.error(error)); + + +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **userIdentifier** | [**string**] | GUID / name of the user | defaults to undefined + + +### Return type + +**void** + +### Authorization + +[bearerAuth](README.md#bearerAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**204** | User successfully deleted. | - | +**400** | Invalid request. | - | +**401** | Unauthorized access. | - | +**403** | Forbidden access. | - | +**500** | Unexpected error | - | + +[[Back to top]](#) [[Back to API list]](README.md#documentation-for-api-endpoints) [[Back to Model list]](README.md#documentation-for-models) [[Back to README]](README.md) + +# **deleteUserGroup** +> void deleteUserGroup() + + Version: 9.0.0.cl or later Removes the specified group object from the ThoughtSpot system. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `GROUP_ADMINISTRATION` (**Can manage groups**) privilege is required. + +### Example + + +```typescript +import { createBearerAuthenticationConfig, ThoughtSpotRestApi, DeleteUserGroupRequest } from '@thoughtspot/rest-api-sdk'; + +const configuration = createBearerAuthenticationConfig("CLUSTER_SERVER_URL", { + username: "YOUR_USERNAME", + password: "YOUR_PASSWORD", +}); +const apiInstance = new ThoughtSpotRestApi(configuration); + +apiInstance.deleteUserGroup( + // string | GUID or name of the group. + "group_identifier_example" +).then((data:any) => { + console.log('API called successfully. Returned data: ' + data); +}).catch((error:any) => console.error(error)); + + +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **groupIdentifier** | [**string**] | GUID or name of the group. | defaults to undefined + + +### Return type + +**void** + +### Authorization + +[bearerAuth](README.md#bearerAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**204** | User group successfully deleted. | - | +**400** | Invalid request. | - | +**401** | Unauthorized access. | - | +**403** | Forbidden access. | - | +**500** | Unexpected error | - | + +[[Back to top]](#) [[Back to API list]](README.md#documentation-for-api-endpoints) [[Back to Model list]](README.md#documentation-for-models) [[Back to README]](README.md) + +# **deleteVariable** +> void deleteVariable() + + Delete a variable Version: 10.14.0.cl or later **Note:** This API endpoint is deprecated and will be removed from ThoughtSpot in a future release. Use [POST /api/rest/2.0/template/variables/delete](/api/rest/2.0/template/variables/delete) instead. Allows deleting a variable from ThoughtSpot. Requires ADMINISTRATION role and TENANT scope. The CAN_MANAGE_VARIABLES permission allows you to manage Formula Variables in the current organization scope. The API endpoint requires: * The variable identifier (ID or name) The operation will fail if: * The user lacks required permissions * The variable doesn\'t exist * The variable is being used by other objects + +### Example + + +```typescript +import { createBearerAuthenticationConfig, ThoughtSpotRestApi, DeleteVariableRequest } from '@thoughtspot/rest-api-sdk'; + +const configuration = createBearerAuthenticationConfig("CLUSTER_SERVER_URL", { + username: "YOUR_USERNAME", + password: "YOUR_PASSWORD", +}); +const apiInstance = new ThoughtSpotRestApi(configuration); + +apiInstance.deleteVariable( + // string | Unique id or name of the variable + "identifier_example" +).then((data:any) => { + console.log('API called successfully. Returned data: ' + data); +}).catch((error:any) => console.error(error)); + + +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **identifier** | [**string**] | Unique id or name of the variable | defaults to undefined + + +### Return type + +**void** + +### Authorization + +[bearerAuth](README.md#bearerAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**204** | Deleting the variable is successful. | - | +**400** | Invalid request. | - | +**401** | Unauthorized access. | - | +**403** | Forbidden access. | - | +**500** | Unexpected error | - | + +[[Back to top]](#) [[Back to API list]](README.md#documentation-for-api-endpoints) [[Back to Model list]](README.md#documentation-for-models) [[Back to README]](README.md) + +# **deleteVariables** +> void deleteVariables(deleteVariablesRequest) + + Delete variable(s) Version: 26.4.0.cl or later Allows deleting multiple variables from ThoughtSpot. Requires ADMINISTRATION role and TENANT scope. The CAN_MANAGE_VARIABLES permission allows you to manage Formula Variables in the current organization scope. The API endpoint requires: * The variable identifiers (IDs or names) The operation will fail if: * The user lacks required permissions * Any of the variables don\'t exist * Any of the variables are being used by other objects + +### Example + + +```typescript +import { createBearerAuthenticationConfig, ThoughtSpotRestApi, DeleteVariablesRequest } from '@thoughtspot/rest-api-sdk'; + +const configuration = createBearerAuthenticationConfig("CLUSTER_SERVER_URL", { + username: "YOUR_USERNAME", + password: "YOUR_PASSWORD", +}); +const apiInstance = new ThoughtSpotRestApi(configuration); + +apiInstance.deleteVariables( + // DeleteVariablesRequest + { + identifiers: [ + "identifiers_example", + ], + } +).then((data:any) => { + console.log('API called successfully. Returned data: ' + data); +}).catch((error:any) => console.error(error)); + + +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **deleteVariablesRequest** | **DeleteVariablesRequest**| | + + +### Return type + +**void** + +### Authorization + +[bearerAuth](README.md#bearerAuth) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**204** | Deletion of variable(s) is successful. | - | +**400** | Invalid request. | - | +**401** | Unauthorized access. | - | +**403** | Forbidden access. | - | +**500** | Unexpected error | - | + +[[Back to top]](#) [[Back to API list]](README.md#documentation-for-api-endpoints) [[Back to Model list]](README.md#documentation-for-models) [[Back to README]](README.md) + +# **deleteWebhookConfigurations** +> WebhookDeleteResponse deleteWebhookConfigurations(deleteWebhookConfigurationsRequest) + + Version: 10.14.0.cl or later Deletes one or more webhook configurations by their unique id or name. Returns status of each deletion operation, including successfully deleted webhooks and any failures with error details. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) or `DEVELOPER` (**Has developer privilege**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, users with `CAN_MANAGE_WEBHOOKS` (**Can manage webhooks**) privilege are also authorized to perform this action. + +### Example + + +```typescript +import { createBearerAuthenticationConfig, ThoughtSpotRestApi, DeleteWebhookConfigurationsRequest } from '@thoughtspot/rest-api-sdk'; + +const configuration = createBearerAuthenticationConfig("CLUSTER_SERVER_URL", { + username: "YOUR_USERNAME", + password: "YOUR_PASSWORD", +}); +const apiInstance = new ThoughtSpotRestApi(configuration); + +apiInstance.deleteWebhookConfigurations( + // DeleteWebhookConfigurationsRequest + { + webhook_identifiers: [ + "webhook_identifiers_example", + ], + } +).then((data:any) => { + console.log('API called successfully. Returned data: ' + data); +}).catch((error:any) => console.error(error)); + + +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **deleteWebhookConfigurationsRequest** | **DeleteWebhookConfigurationsRequest**| | + + +### Return type + +**WebhookDeleteResponse** + +### Authorization + +[bearerAuth](README.md#bearerAuth) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Webhook configurations deleted successfully | - | +**400** | Invalid request. | - | +**401** | Unauthorized access. | - | +**403** | Forbidden access. | - | +**500** | Unexpected error | - | + +[[Back to top]](#) [[Back to API list]](README.md#documentation-for-api-endpoints) [[Back to Model list]](README.md#documentation-for-models) [[Back to README]](README.md) + +# **deployCommit** +> Array deployCommit(deployCommitRequest) + + Version: 9.2.0.cl or later Allows you to deploy a commit and publish TML content to your ThoughtSpot instance. Requires at least edit access to the objects used in the deploy operation. The API deploys the head of the branch unless a `commit_id` is specified in the API request. If the branch name is not defined in the request, the default branch is considered for deploying commits. For more information, see [Git integration documentation](https://developers.thoughtspot.com/docs/git-integration). + +### Example + + +```typescript +import { createBearerAuthenticationConfig, ThoughtSpotRestApi, DeployCommitRequest } from '@thoughtspot/rest-api-sdk'; + +const configuration = createBearerAuthenticationConfig("CLUSTER_SERVER_URL", { + username: "YOUR_USERNAME", + password: "YOUR_PASSWORD", +}); +const apiInstance = new ThoughtSpotRestApi(configuration); + +apiInstance.deployCommit( + // DeployCommitRequest + { + commit_id: "commit_id_example", + branch_name: "branch_name_example", + deploy_type: "DELTA", + deploy_policy: "ALL_OR_NONE", + } +).then((data:any) => { + console.log('API called successfully. Returned data: ' + data); +}).catch((error:any) => console.error(error)); + + +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **deployCommitRequest** | **DeployCommitRequest**| | + + +### Return type + +**Array** + +### Authorization + +[bearerAuth](README.md#bearerAuth) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Successfully deployed the changes | - | +**400** | Invalid request. | - | +**401** | Unauthorized access. | - | +**403** | Forbidden access. | - | +**500** | Unexpected error | - | + +[[Back to top]](#) [[Back to API list]](README.md#documentation-for-api-endpoints) [[Back to Model list]](README.md#documentation-for-models) [[Back to README]](README.md) + +# **downloadConnectionMetadataChanges** +> HttpFile downloadConnectionMetadataChanges() + + Version: 9.9.0.cl or later Exports the difference in connection metadata between CDW and ThoughtSpot Requires `DATAMANAGEMENT` (**Can manage data**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the following Data control privileges may be required: - `CAN_MANAGE_CUSTOM_CALENDAR`(**Can manage custom calendars**) - `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) - `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` (**Can manage data models**) To download the connection metadata difference between ThoughtSpot and CDW, pass the connection GUID as `connection_identifier` in the API request. + +### Example + + +```typescript +import { createBearerAuthenticationConfig, ThoughtSpotRestApi, DownloadConnectionMetadataChangesRequest } from '@thoughtspot/rest-api-sdk'; + +const configuration = createBearerAuthenticationConfig("CLUSTER_SERVER_URL", { + username: "YOUR_USERNAME", + password: "YOUR_PASSWORD", +}); +const apiInstance = new ThoughtSpotRestApi(configuration); + +apiInstance.downloadConnectionMetadataChanges( + // string | GUID of the connection + "connection_identifier_example" +).then((data:any) => { + console.log('API called successfully. Returned data: ' + data); +}).catch((error:any) => console.error(error)); + + +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **connectionIdentifier** | [**string**] | GUID of the connection | defaults to undefined + + +### Return type + +**HttpFile** + +### Authorization + +[bearerAuth](README.md#bearerAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/octet-stream, application/json + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Export metadata changes. | - | +**400** | Invalid request. | - | +**401** | Unauthorized access. | - | +**403** | Forbidden access. | - | +**500** | Unexpected error | - | + +[[Back to top]](#) [[Back to API list]](README.md#documentation-for-api-endpoints) [[Back to Model list]](README.md#documentation-for-models) [[Back to README]](README.md) + +# **exportAnswerReport** +> HttpFile exportAnswerReport(exportAnswerReportRequest) + + Version: 9.0.0.cl or later Exports an Answer in the given file format. You can download the Answer data as a PDF, PNG, CSV, or XLSX file. Requires at least view access to the Answer. #### Usage guidelines In the request body, specify the GUID or name of the Answer and set `file_format`. The default file format is CSV. Use the `type` parameter to specify whether the Answer being exported is a saved Answer (`SAVED`) or a pinned Answer on a Liveboard (`PINNED`). Defaults to `SAVED`. When using `PINNED`, the `metadata_identifier` must be the container id. **NOTE**: * The downloadable file returned in API response file is extensionless. Please rename the downloaded file by typing in the relevant extension. * HTML rendering is not supported for PDF exports of Answers with tables. Optionally, you can define [runtime overrides](https://developers.thoughtspot.com/docs/fetch-data-and-report-apis#_runtime_overrides) to apply to the Answer data. + +### Example + + +```typescript +import { createBearerAuthenticationConfig, ThoughtSpotRestApi, ExportAnswerReportRequest } from '@thoughtspot/rest-api-sdk'; + +const configuration = createBearerAuthenticationConfig("CLUSTER_SERVER_URL", { + username: "YOUR_USERNAME", + password: "YOUR_PASSWORD", +}); +const apiInstance = new ThoughtSpotRestApi(configuration); + +apiInstance.exportAnswerReport( + // ExportAnswerReportRequest + { + metadata_identifier: "metadata_identifier_example", + session_identifier: "session_identifier_example", + generation_number: 1, + file_format: "CSV", + runtime_filter: {}, + runtime_sort: {}, + runtime_param_override: {}, + regional_settings: null, + png_options: null, + personalised_view_identifier: "personalised_view_identifier_example", + type: "SAVED", + } +).then((data:any) => { + console.log('API called successfully. Returned data: ' + data); +}).catch((error:any) => console.error(error)); + + +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **exportAnswerReportRequest** | **ExportAnswerReportRequest**| | + + +### Return type + +**HttpFile** + +### Authorization + +[bearerAuth](README.md#bearerAuth) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/octet-stream, application/json + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Export report file of specified metadata object is successful. | - | +**400** | Invalid request. | - | +**401** | Unauthorized access. | - | +**403** | Forbidden access. | - | +**500** | Unexpected error | - | + +[[Back to top]](#) [[Back to API list]](README.md#documentation-for-api-endpoints) [[Back to Model list]](README.md#documentation-for-models) [[Back to README]](README.md) + +# **exportLiveboardReport** +> HttpFile exportLiveboardReport(exportLiveboardReportRequest) + + Version: 9.0.0.cl or later Exports a Liveboard and its visualizations in PDF, PNG, CSV, or XLSX file format. The default `file_format` is CSV. Requires at least view access to the Liveboard. #### Usage guidelines In the request body, specify the GUID or name of the Liveboard. To generate a Liveboard report with specific visualizations, add GUIDs or names of the visualizations. **NOTE**: * The downloadable file returned in API response file is extensionless. Please rename the downloaded file by typing in the relevant extension. * Optionally, you can define [runtime overrides](https://developers.thoughtspot.com/docs/fetch-data-and-report-apis#_runtime_overrides) to apply to the Answer data. * To include unsaved changes in the report, pass the `transient_pinboard_content` script generated from the `getExportRequestForCurrentPinboard` method in the Visual Embed SDK. Upon successful execution, the API returns the report with unsaved changes, including ad hoc changes to visualizations. For more information, see [Liveboard Report API](https://developers.thoughtspot.com/docs/fetch-data-and-report-apis#_liveboard_report_api). * Starting with ThoughtSpot Cloud 10.9.0.cl release, the Liveboard can be exported in the PNG format in the resolution of your choice. To enable this on your instance, contact ThoughtSpot support. When this feature is enabled, the options `include_cover_page`,`include_filter_page` within the `png_options` will not be available for PNG exports. * Starting with the ThoughtSpot Cloud 26.2.0.cl release, * Liveboards can be exported in CSV format. * All visualizations within a Liveboard can be exported as individual CSV files. * When exporting multiple visualizations or the entire Liveboard, the system returns the report as a compressed ZIP file containing the separate CSV files for each visualization. * Liveboards can also be exported in XLSX format. * All selected visualizations are consolidated into a single Excel workbook (.xlsx), with each visualization placed in its own worksheet (tab). * XLSX exports are limited to a maximum of 255 worksheets (tabs) per workbook. + +### Example + + +```typescript +import { createBearerAuthenticationConfig, ThoughtSpotRestApi, ExportLiveboardReportRequest } from '@thoughtspot/rest-api-sdk'; + +const configuration = createBearerAuthenticationConfig("CLUSTER_SERVER_URL", { + username: "YOUR_USERNAME", + password: "YOUR_PASSWORD", +}); +const apiInstance = new ThoughtSpotRestApi(configuration); + +apiInstance.exportLiveboardReport( + // ExportLiveboardReportRequest + { + metadata_identifier: "metadata_identifier_example", + tab_identifiers: [ + "tab_identifiers_example", + ], + personalised_view_identifier: "personalised_view_identifier_example", + visualization_identifiers: [ + "visualization_identifiers_example", + ], + transient_content: "transient_content_example", + file_format: "PDF", + runtime_filter: {}, + override_filters: {}, + runtime_sort: {}, + pdf_options: null, + png_options: null, + runtime_param_override: {}, + regional_settings: null, + } +).then((data:any) => { + console.log('API called successfully. Returned data: ' + data); +}).catch((error:any) => console.error(error)); + + +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **exportLiveboardReportRequest** | **ExportLiveboardReportRequest**| | + + +### Return type + +**HttpFile** + +### Authorization + +[bearerAuth](README.md#bearerAuth) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/octet-stream, application/json + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Export report file of specified metadata object is successful. | - | +**400** | Invalid request. | - | +**401** | Unauthorized access. | - | +**403** | Forbidden access. | - | +**500** | Unexpected error | - | + +[[Back to top]](#) [[Back to API list]](README.md#documentation-for-api-endpoints) [[Back to Model list]](README.md#documentation-for-models) [[Back to README]](README.md) + +# **exportMetadataTML** +> Array exportMetadataTML(exportMetadataTMLRequest) + + Version: 9.0.0.cl or later Exports the [TML](https://docs.thoughtspot.com/cloud/latest/tml) representation of metadata objects in JSON or YAML format. Requires `DATADOWNLOADING` (**Can download Data**) and at least view access to the metadata object. #### Usage guidelines * You can export one or several objects by passing metadata object GUIDs in the `metadata` array. * When exporting TML content for a Liveboard or Answer object, you can set `export_associated` to `true` to retrieve TML content for underlying Worksheets, Tables, or Views, including the GUID of each object within the headers. When `export_associated` is set to `true`, consider retrieving one metadata object at a time. * Set `export_fqns` to `true` to add FQNs of the referenced objects in the TML content. For example, if you send an API request to retrieve TML for a Liveboard and its associated objects, the API returns the TML content with FQNs of the referenced Worksheet. Exporting TML with FQNs is useful if ThoughtSpot has multiple objects with the same name and you want to eliminate ambiguity when importing TML files into ThoughtSpot. It eliminates the need for adding FQNs of the referenced objects manually during the import operation. * To export only the TML of feedbacks associated with an object, set the GUID of the object as `identifier`, and set the `type` as `FEEDBACK` in the `metadata` array. * To export the TML of an object along with the feedbacks associated with it, set the GUID of the object as `identifier`, set the `type` as `LOGIAL_TABLE` in the `metadata` array, and set `export_with_associated_feedbacks` in `export_options` to true. For more information, see [TML Documentation](https://developers.thoughtspot.com/docs/tml#_export_a_tml). For more information on feedbacks, see [Feedback Documentation](https://docs.thoughtspot.com/cloud/latest/sage-feedback). + +### Example + + +```typescript +import { createBearerAuthenticationConfig, ThoughtSpotRestApi, ExportMetadataTMLRequest } from '@thoughtspot/rest-api-sdk'; + +const configuration = createBearerAuthenticationConfig("CLUSTER_SERVER_URL", { + username: "YOUR_USERNAME", + password: "YOUR_PASSWORD", +}); +const apiInstance = new ThoughtSpotRestApi(configuration); + +apiInstance.exportMetadataTML( + // ExportMetadataTMLRequest + { + metadata: [ + { + type: "LIVEBOARD", + identifier: "identifier_example", + session_identifier: "session_identifier_example", + generation_number: 1, + }, + ], + export_associated: false, + export_fqn: false, + edoc_format: "JSON", + export_schema_version: "DEFAULT", + export_dependent: false, + export_connection_as_dependent: false, + all_orgs_override: false, + export_options: null, + } +).then((data:any) => { + console.log('API called successfully. Returned data: ' + data); +}).catch((error:any) => console.error(error)); + + +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **exportMetadataTMLRequest** | **ExportMetadataTMLRequest**| | + + +### Return type + +**Array** + +### Authorization + +[bearerAuth](README.md#bearerAuth) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Export TMLs of specified metadata objects is successful. | - | +**400** | Invalid request. | - | +**401** | Unauthorized access. | - | +**403** | Forbidden access. | - | +**500** | Unexpected error | - | + +[[Back to top]](#) [[Back to API list]](README.md#documentation-for-api-endpoints) [[Back to Model list]](README.md#documentation-for-models) [[Back to README]](README.md) + +# **exportMetadataTMLBatched** +> any exportMetadataTMLBatched(exportMetadataTMLBatchedRequest) + + Version: 10.1.0.cl or later Exports the [TML](https://docs.thoughtspot.com/cloud/latest/tml) representation of metadata objects in JSON or YAML format. ### **Permissions Required** Requires `DATAMANAGEMENT` (**Can manage data**) and `USERMANAGEMENT` (**Can manage users**) privileges. #### **Usage Guidelines** This API is only applicable for `USER`, `GROUP`, and `ROLES` metadata types. - `batch_offset` Indicates the starting position within the complete dataset from which the API should begin returning objects. Useful for paginating results efficiently. - `batch_size` Specifies the number of objects or items to retrieve in a single request. Helps control response size for better performance. - `edoc_format` Defines the format of the TML content. The exported metadata can be in JSON or YAML format. - `export_dependent` Specifies whether to include dependent metadata objects in the export. Ensures related objects are also retrieved if needed. - `all_orgs_override` Indicates whether the export operation applies across all organizations. Useful for multi-tenant environments where cross-org exports are required. + +### Example + + +```typescript +import { createBearerAuthenticationConfig, ThoughtSpotRestApi, ExportMetadataTMLBatchedRequest } from '@thoughtspot/rest-api-sdk'; + +const configuration = createBearerAuthenticationConfig("CLUSTER_SERVER_URL", { + username: "YOUR_USERNAME", + password: "YOUR_PASSWORD", +}); +const apiInstance = new ThoughtSpotRestApi(configuration); + +apiInstance.exportMetadataTMLBatched( + // ExportMetadataTMLBatchedRequest + { + metadata_type: "USER", + batch_offset: 0, + batch_size: 20, + edoc_format: "JSON", + export_dependent: false, + all_orgs_override: false, + } +).then((data:any) => { + console.log('API called successfully. Returned data: ' + data); +}).catch((error:any) => console.error(error)); + + +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **exportMetadataTMLBatchedRequest** | **ExportMetadataTMLBatchedRequest**| | + + +### Return type + +**any** + +### Authorization + +[bearerAuth](README.md#bearerAuth) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Export TMLs of specified metadata objects is successful. | - | +**400** | Invalid request. | - | +**401** | Unauthorized access. | - | +**403** | Forbidden access. | - | +**500** | Unexpected error | - | + +[[Back to top]](#) [[Back to API list]](README.md#documentation-for-api-endpoints) [[Back to Model list]](README.md#documentation-for-models) [[Back to README]](README.md) + +# **fetchAnswerData** +> AnswerDataResponse fetchAnswerData(fetchAnswerDataRequest) + + Version: 9.0.0.cl or later Fetches data from a saved Answer. Requires at least view access to the saved Answer. The `record_size` attribute determines the number of records to retrieve in an API call. For more information about pagination, record size, and maximum row limit, see [Pagination and record size settings](https://developers.thoughtspot.com/docs/fetch-data-and-report-apis#_pagination_settings_for_data_and_report_apis). + +### Example + + +```typescript +import { createBearerAuthenticationConfig, ThoughtSpotRestApi, FetchAnswerDataRequest } from '@thoughtspot/rest-api-sdk'; + +const configuration = createBearerAuthenticationConfig("CLUSTER_SERVER_URL", { + username: "YOUR_USERNAME", + password: "YOUR_PASSWORD", +}); +const apiInstance = new ThoughtSpotRestApi(configuration); + +apiInstance.fetchAnswerData( + // FetchAnswerDataRequest + { + metadata_identifier: "metadata_identifier_example", + data_format: "COMPACT", + record_offset: 0, + record_size: 10, + runtime_filter: {}, + runtime_sort: {}, + runtime_param_override: {}, + } +).then((data:any) => { + console.log('API called successfully. Returned data: ' + data); +}).catch((error:any) => console.error(error)); + + +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **fetchAnswerDataRequest** | **FetchAnswerDataRequest**| | + + +### Return type + +**AnswerDataResponse** + +### Authorization + +[bearerAuth](README.md#bearerAuth) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Fetching data of specified metadata object is successful. | - | +**400** | Invalid request. | - | +**401** | Unauthorized access. | - | +**403** | Forbidden access. | - | +**500** | Unexpected error | - | + +[[Back to top]](#) [[Back to API list]](README.md#documentation-for-api-endpoints) [[Back to Model list]](README.md#documentation-for-models) [[Back to README]](README.md) + +# **fetchAnswerSqlQuery** +> SqlQueryResponse fetchAnswerSqlQuery(fetchAnswerSqlQueryRequest) + + Version: 9.0.0.cl or later Fetches the underlying SQL query data for an Answer object. Requires at least view access to the Answer object. Upon successful execution, the API returns the SQL queries for the specified object as shown in this example: ``` { \"metadata_id\":\"8fbe44a8-46ad-4b16-8d39-184b2fada490\", \"metadata_name\":\"Total sales\", \"metadata_type\":\"ANSWER\", \"sql_queries\":[ { \"metadata_id\":\"8fbe44a8-46ad-4b16-8d39-184b2fada490\", \"metadata_name\":\"Total sales -test\", \"sql_query\":\"SELECT \\n \\\"ta_1\\\".\\\"REGION\\\" \\\"ca_1\\\", \\n \\\"ta_2\\\".\\\"PRODUCTNAME\\\" \\\"ca_2\\\", \\n \\\"ta_1\\\".\\\"STORENAME\\\" \\\"ca_3\\\", \\n CASE\\n WHEN sum(\\\"ta_3\\\".\\\"SALES\\\") IS NOT NULL THEN sum(\\\"ta_3\\\".\\\"SALES\\\")\\n ELSE 0\\n END \\\"ca_4\\\", \\n CASE\\n WHEN sum(\\\"ta_3\\\".\\\"QUANTITYPURCHASED\\\") IS NOT NULL THEN sum(\\\"ta_3\\\".\\\"QUANTITYPURCHASED\\\")\\n ELSE 0\\n END \\\"ca_5\\\"\\nFROM \\\"RETAILAPPAREL\\\".\\\"PUBLIC\\\".\\\"FACT_RETAPP_SALES\\\" \\\"ta_3\\\"\\n JOIN \\\"RETAILAPPAREL\\\".\\\"PUBLIC\\\".\\\"DIM_RETAPP_STORES\\\" \\\"ta_1\\\"\\n ON \\\"ta_3\\\".\\\"STOREID\\\" = \\\"ta_1\\\".\\\"STOREID\\\"\\n JOIN \\\"RETAILAPPAREL\\\".\\\"PUBLIC\\\".\\\"DIM_RETAPP_PRODUCTS\\\" \\\"ta_2\\\"\\n ON \\\"ta_3\\\".\\\"PRODUCTID\\\" = \\\"ta_2\\\".\\\"PRODUCTID\\\"\\nGROUP BY \\n \\\"ca_1\\\", \\n \\\"ca_2\\\", \\n \\\"ca_3\\\"\\n\" } ] } ``` + +### Example + + +```typescript +import { createBearerAuthenticationConfig, ThoughtSpotRestApi, FetchAnswerSqlQueryRequest } from '@thoughtspot/rest-api-sdk'; + +const configuration = createBearerAuthenticationConfig("CLUSTER_SERVER_URL", { + username: "YOUR_USERNAME", + password: "YOUR_PASSWORD", +}); +const apiInstance = new ThoughtSpotRestApi(configuration); + +apiInstance.fetchAnswerSqlQuery( + // FetchAnswerSqlQueryRequest + { + metadata_identifier: "metadata_identifier_example", + } +).then((data:any) => { + console.log('API called successfully. Returned data: ' + data); +}).catch((error:any) => console.error(error)); + + +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **fetchAnswerSqlQueryRequest** | **FetchAnswerSqlQueryRequest**| | + + +### Return type + +**SqlQueryResponse** + +### Authorization + +[bearerAuth](README.md#bearerAuth) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Fetching SQL query of specified metadata object is successful. | - | +**400** | Invalid request. | - | +**401** | Unauthorized access. | - | +**403** | Forbidden access. | - | +**500** | Unexpected error | - | + +[[Back to top]](#) [[Back to API list]](README.md#documentation-for-api-endpoints) [[Back to Model list]](README.md#documentation-for-models) [[Back to README]](README.md) + +# **fetchAsyncImportTaskStatus** +> GetAsyncImportStatusResponse fetchAsyncImportTaskStatus(fetchAsyncImportTaskStatusRequest) + + Version: 10.4.0.cl or later Gets information about the status of the TML async import task scheduled using the `/api/rest/2.0/metadata/tml/async/import` API call. To fetch the task details, specify the ID of the TML async import task. Requires access to the task ID. The API allows users who initiated the asynchronous TML import via `/api/rest/2.0/metadata/tml/async/import` to view the status of their tasks. Users with administration privilege can view the status of all import tasks initiated by the users in their Org. #### Usage guidelines See [TML API Documentation](https://developers.thoughtspot.com/docs/tml#_fetch_status_of_the_tml_import_task) for usage guidelines. + +### Example + + +```typescript +import { createBearerAuthenticationConfig, ThoughtSpotRestApi, FetchAsyncImportTaskStatusRequest } from '@thoughtspot/rest-api-sdk'; + +const configuration = createBearerAuthenticationConfig("CLUSTER_SERVER_URL", { + username: "YOUR_USERNAME", + password: "YOUR_PASSWORD", +}); +const apiInstance = new ThoughtSpotRestApi(configuration); + +apiInstance.fetchAsyncImportTaskStatus( + // FetchAsyncImportTaskStatusRequest + { + task_ids: [ + "task_ids_example", + ], + task_status: [ + "COMPLETED", + ], + author_identifier: "author_identifier_example", + record_offset: 0, + record_size: 5, + include_import_response: false, + } +).then((data:any) => { + console.log('API called successfully. Returned data: ' + data); +}).catch((error:any) => console.error(error)); + + +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **fetchAsyncImportTaskStatusRequest** | **FetchAsyncImportTaskStatusRequest**| | + + +### Return type + +**GetAsyncImportStatusResponse** + +### Authorization + +[bearerAuth](README.md#bearerAuth) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Async TML Import Task statuses fetched successfully. | - | +**400** | Invalid request. | - | +**401** | Unauthorized access. | - | +**403** | Forbidden access. | - | +**500** | Unexpected error | - | + +[[Back to top]](#) [[Back to API list]](README.md#documentation-for-api-endpoints) [[Back to Model list]](README.md#documentation-for-models) [[Back to README]](README.md) + +# **fetchColumnSecurityRules** +> Array fetchColumnSecurityRules(fetchColumnSecurityRulesRequest) + + Version: 10.12.0.cl or later Fetches column security rules for specified tables. This API endpoint retrieves column-level security rules configured for tables. It returns information about which columns are secured and which groups have access to those columns. #### Usage guidelines - Provide an array of table identifiers using either `identifier` (GUID or name) or `obj_identifier` (object ID) - At least one of `identifier` or `obj_identifier` must be provided for each table - The API returns column security rules for all specified tables - Users must have appropriate permissions to access security rules for the specified tables #### Required permissions - `ADMINISTRATION` - Can administer ThoughtSpot - `DATAMANAGEMENT` - Can manage data - `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` - Can manage worksheet views and tables #### Example request ```json { \"tables\": [ { \"identifier\": \"table-guid\", \"obj_identifier\": \"table-object-id\" } ] } ``` #### Response format The API returns an array of `ColumnSecurityRuleResponse` objects wrapped in a `data` field. Each `ColumnSecurityRuleResponse` object contains: - Table information (GUID and object ID) - Array of column security rules with column details, group access, and source table information #### Example response ```json { \"data\": [ { \"guid\": \"table-guid\", \"objId\": \"table-object-id\", \"columnSecurityRules\": [ { \"column\": { \"id\": \"col_123\", \"name\": \"Salary\" }, \"groups\": [ { \"id\": \"group_1\", \"name\": \"HR Department\" } ], \"sourceTableDetails\": { \"id\": \"source-table-guid\", \"name\": \"Employee_Data\" } } ] } ] } ``` + +### Example + + +```typescript +import { createBearerAuthenticationConfig, ThoughtSpotRestApi, FetchColumnSecurityRulesRequest } from '@thoughtspot/rest-api-sdk'; + +const configuration = createBearerAuthenticationConfig("CLUSTER_SERVER_URL", { + username: "YOUR_USERNAME", + password: "YOUR_PASSWORD", +}); +const apiInstance = new ThoughtSpotRestApi(configuration); + +apiInstance.fetchColumnSecurityRules( + // FetchColumnSecurityRulesRequest + { + tables: [ + { + identifier: "identifier_example", + obj_identifier: "obj_identifier_example", + }, + ], + } +).then((data:any) => { + console.log('API called successfully. Returned data: ' + data); +}).catch((error:any) => console.error(error)); + + +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **fetchColumnSecurityRulesRequest** | **FetchColumnSecurityRulesRequest**| | + + +### Return type + +**Array** + +### Authorization + +[bearerAuth](README.md#bearerAuth) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Successfully fetched column security rules | - | +**400** | Bad request - Table not found or invalid parameters | - | +**401** | Unauthorized access. | - | +**403** | Forbidden - User doesn\'t have permission to access security rules for this table | - | +**500** | Internal server error | - | + +[[Back to top]](#) [[Back to API list]](README.md#documentation-for-api-endpoints) [[Back to Model list]](README.md#documentation-for-models) [[Back to README]](README.md) + +# **fetchConnectionDiffStatus** +> FetchConnectionDiffStatusResponse fetchConnectionDiffStatus() + + Version: 9.9.0.cl or later Validates the difference in connection metadata between CDW and ThoughtSpot. Requires `DATAMANAGEMENT` (**Can manage data**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the following Data control privileges may be required: - `CAN_MANAGE_CUSTOM_CALENDAR`(**Can manage custom calendars**) - `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) - `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` (**Can manage data models**) Returns a boolean indicating whether there is any difference between the connection metadata at ThoughtSpot and CDW. To get the connection metadata difference status, pass the connection GUID as `connection_identifier` in the API request. + +### Example + + +```typescript +import { createBearerAuthenticationConfig, ThoughtSpotRestApi, FetchConnectionDiffStatusRequest } from '@thoughtspot/rest-api-sdk'; + +const configuration = createBearerAuthenticationConfig("CLUSTER_SERVER_URL", { + username: "YOUR_USERNAME", + password: "YOUR_PASSWORD", +}); +const apiInstance = new ThoughtSpotRestApi(configuration); + +apiInstance.fetchConnectionDiffStatus( + // string | GUID of the connection + "connection_identifier_example" +).then((data:any) => { + console.log('API called successfully. Returned data: ' + data); +}).catch((error:any) => console.error(error)); + + +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **connectionIdentifier** | [**string**] | GUID of the connection | defaults to undefined + + +### Return type + +**FetchConnectionDiffStatusResponse** + +### Authorization + +[bearerAuth](README.md#bearerAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | true/false | - | +**400** | Invalid request. | - | +**401** | Unauthorized access. | - | +**403** | Forbidden access. | - | +**500** | Unexpected error | - | + +[[Back to top]](#) [[Back to API list]](README.md#documentation-for-api-endpoints) [[Back to Model list]](README.md#documentation-for-models) [[Back to README]](README.md) + +# **fetchLiveboardData** +> LiveboardDataResponse fetchLiveboardData(fetchLiveboardDataRequest) + + Version: 9.0.0.cl or later Gets data from a Liveboard object and its visualization. Requires at least view access to the Liveboard. #### Usage guidelines In the request body, specify the GUID or name of the Liveboard. To get data for specific visualizations, add the GUIDs or names of the visualizations in the API request. To include unsaved changes in the report, pass the `transient_pinboard_content` script generated from the `getExportRequestForCurrentPinboard` method in the Visual Embed SDK. Upon successful execution, the API returns the report with unsaved changes. If the new Liveboard experience mode, the transient content includes ad hoc changes to visualizations such as sorting, toggling of legends, and data drill down. For more information, and see [Liveboard data API](https://developers.thoughtspot.com/docs/fetch-data-and-report-apis#_fetch_liveboard_data_api). + +### Example + + +```typescript +import { createBearerAuthenticationConfig, ThoughtSpotRestApi, FetchLiveboardDataRequest } from '@thoughtspot/rest-api-sdk'; + +const configuration = createBearerAuthenticationConfig("CLUSTER_SERVER_URL", { + username: "YOUR_USERNAME", + password: "YOUR_PASSWORD", +}); +const apiInstance = new ThoughtSpotRestApi(configuration); + +apiInstance.fetchLiveboardData( + // FetchLiveboardDataRequest + { + metadata_identifier: "metadata_identifier_example", + visualization_identifiers: [ + "visualization_identifiers_example", + ], + transient_content: "transient_content_example", + data_format: "COMPACT", + record_offset: 0, + record_size: 10, + runtime_filter: {}, + runtime_sort: {}, + runtime_param_override: {}, + } +).then((data:any) => { + console.log('API called successfully. Returned data: ' + data); +}).catch((error:any) => console.error(error)); + + +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **fetchLiveboardDataRequest** | **FetchLiveboardDataRequest**| | + + +### Return type + +**LiveboardDataResponse** + +### Authorization + +[bearerAuth](README.md#bearerAuth) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Fetching data of specified metadata object is successful. | - | +**400** | Invalid request. | - | +**401** | Unauthorized access. | - | +**403** | Forbidden access. | - | +**500** | Unexpected error | - | + +[[Back to top]](#) [[Back to API list]](README.md#documentation-for-api-endpoints) [[Back to Model list]](README.md#documentation-for-models) [[Back to README]](README.md) + +# **fetchLiveboardSqlQuery** +> SqlQueryResponse fetchLiveboardSqlQuery(fetchLiveboardSqlQueryRequest) + + Version: 9.0.0.cl or later Fetches the underlying SQL query data for a Liveboard object and its visualizations. Requires at least view access to the Liveboard object. To get SQL query data for a Liveboard, specify the GUID of the Liveboard. Optionally, you can add an array of visualization GUIDs to retrieve the SQL query data for visualizations in the Liveboard. Upon successful execution, the API returns the SQL queries for the specified object as shown in this example: ``` { \"metadata_id\": \"fa68ae91-7588-4136-bacd-d71fb12dda69\", \"metadata_name\": \"Total Sales\", \"metadata_type\": \"LIVEBOARD\", \"sql_queries\": [ { \"metadata_id\": \"b3b6d2b9-089a-490c-8e16-b144650b7843\", \"metadata_name\": \"Total quantity purchased, Total sales by region\", \"sql_query\": \"SELECT \\n \\\"ta_1\\\".\\\"REGION\\\" \\\"ca_1\\\", \\n CASE\\n WHEN sum(\\\"ta_2\\\".\\\"QUANTITYPURCHASED\\\") IS NOT NULL THEN sum(\\\"ta_2\\\".\\\"QUANTITYPURCHASED\\\")\\n ELSE 0\\n END \\\"ca_2\\\", \\n CASE\\n WHEN sum(\\\"ta_2\\\".\\\"SALES\\\") IS NOT NULL THEN sum(\\\"ta_2\\\".\\\"SALES\\\")\\n ELSE 0\\n END \\\"ca_3\\\"\\nFROM \\\"RETAILAPPAREL\\\".\\\"PUBLIC\\\".\\\"FACT_RETAPP_SALES\\\" \\\"ta_2\\\"\\n JOIN \\\"RETAILAPPAREL\\\".\\\"PUBLIC\\\".\\\"DIM_RETAPP_STORES\\\" \\\"ta_1\\\"\\n ON \\\"ta_2\\\".\\\"STOREID\\\" = \\\"ta_1\\\".\\\"STOREID\\\"\\nGROUP BY \\\"ca_1\\\"\" } ] } ``` + +### Example + + +```typescript +import { createBearerAuthenticationConfig, ThoughtSpotRestApi, FetchLiveboardSqlQueryRequest } from '@thoughtspot/rest-api-sdk'; + +const configuration = createBearerAuthenticationConfig("CLUSTER_SERVER_URL", { + username: "YOUR_USERNAME", + password: "YOUR_PASSWORD", +}); +const apiInstance = new ThoughtSpotRestApi(configuration); + +apiInstance.fetchLiveboardSqlQuery( + // FetchLiveboardSqlQueryRequest + { + metadata_identifier: "metadata_identifier_example", + visualization_identifiers: [ + "visualization_identifiers_example", + ], + } +).then((data:any) => { + console.log('API called successfully. Returned data: ' + data); +}).catch((error:any) => console.error(error)); + + +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **fetchLiveboardSqlQueryRequest** | **FetchLiveboardSqlQueryRequest**| | + + +### Return type + +**SqlQueryResponse** + +### Authorization + +[bearerAuth](README.md#bearerAuth) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Fetching SQL query of specified metadata object is successful. | - | +**400** | Invalid request. | - | +**401** | Unauthorized access. | - | +**403** | Forbidden access. | - | +**500** | Unexpected error | - | + +[[Back to top]](#) [[Back to API list]](README.md#documentation-for-api-endpoints) [[Back to Model list]](README.md#documentation-for-models) [[Back to README]](README.md) + +# **fetchLogs** +> Array fetchLogs(fetchLogsRequest) + + Version: 9.0.0.cl or later Fetches security audit logs. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the [Admin Control](https://developers.thoughtspot.com/docs/rbac#_admin_control) privileges are required. #### Usage guidelines By default, the API retrieves logs for the last 24 hours. You can set a custom duration in EPOCH time. Make sure the log duration specified in your API request doesn’t exceed 24 hours. If you must fetch logs for a longer time range, modify the duration and make multiple sequential API requests. Upon successful execution, the API returns logs with the following information: * timestamp of the event * event ID * event type * name and GUID of the user * IP address of ThoughtSpot instance For more information see [Audit logs Documentation](https://developers.thoughtspot.com/docs/audit-logs). + +### Example + + +```typescript +import { createBearerAuthenticationConfig, ThoughtSpotRestApi, FetchLogsRequest } from '@thoughtspot/rest-api-sdk'; + +const configuration = createBearerAuthenticationConfig("CLUSTER_SERVER_URL", { + username: "YOUR_USERNAME", + password: "YOUR_PASSWORD", +}); +const apiInstance = new ThoughtSpotRestApi(configuration); + +apiInstance.fetchLogs( + // FetchLogsRequest + { + log_type: "SECURITY_AUDIT", + start_epoch_time_in_millis: 3.14, + end_epoch_time_in_millis: 3.14, + get_all_logs: true, + } +).then((data:any) => { + console.log('API called successfully. Returned data: ' + data); +}).catch((error:any) => console.error(error)); + + +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **fetchLogsRequest** | **FetchLogsRequest**| | + + +### Return type + +**Array** + +### Authorization + +[bearerAuth](README.md#bearerAuth) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Log fetched successfully. | - | +**400** | Invalid request. | - | +**401** | Unauthorized access. | - | +**403** | Forbidden access. | - | +**500** | Unexpected error | - | + +[[Back to top]](#) [[Back to API list]](README.md#documentation-for-api-endpoints) [[Back to Model list]](README.md#documentation-for-models) [[Back to README]](README.md) + +# **fetchObjectPrivileges** +> ObjectPrivilegesOfMetadataResponse fetchObjectPrivileges(fetchObjectPrivilegesRequest) + + Version: 26.3.0.cl or later This API fetches the object privileges present for the given list of principals (user or group), on the given set of objects. It supports pagination, which can be enabled and configured using the request parameters. It provides users access to certain features based on privilege based access control. #### Usage guidelines - Specify the `type` (`USER` or `USER_GROUP`) and `identifier` (either GUID or name) of the principals for which you want to retrieve object privilege information in the `principals` array. - Specify the `type` (`LOGICAL_TABLE`) and `identifier` (either GUID or name) of the metadata objects for which you want to retrieve object privilege information in the `metadata` array. Only `LOGICAL_TABLE` metadata type is supported for now. It may be extended for other metadata types in future. - To control the offset from where principals have to be fetched, use `record_offset`. When `record_offset` is 0, information is fetched from the beginning. - To control the number of principals to be fetched, use `record_size`. Default `record_size` is 20. - Ensure `record_offset` for a subsequent request is one more than the value of `record_size` of the previous request. - Ensure using correct Authorization Bearer Token corresponding to specific user & org. #### Example request ```json { \"principals\": [ { \"type\": \"type-1\", \"identifier\": \"principal-guid-or-name-1\" }, { \"type\": \"type-2\", \"identifier\": \"principal-guid-or-name-2\" } ], \"metadata\": [ { \"type\": \"metadata-type-1\", \"identifier\": \"metadata-guid-or-name-1\" }, { \"type\": \"metadata-type-2\", \"identifier\": \"metadata-guid-or-name-2\" } ], \"record_offset\": 0, \"record_size\": 20 } ``` #### Response format The API returns an array of `metadata_object_privileges` objects wrapped in JSON. Each `metadata_object_privileges` object contains: - Metadata information (GUID, name and type) - Array of `principal_object_privilege_info`. - Each `principal_object_privilege_info` contains: - Principal type. All principals of this type are listed as described below. - Array of `principal_object_privileges`. - Each `principal_object_privileges` contains: - Principal information (GUID, name, subtype) - List of applied object level privileges. #### Example response ```json { \"metadata_object_privileges\": [ { \"metadata_id\": \"metadata-guid-1\", \"metadata_name\": \"metadata-name-1\", \"metadata_type\": \"metadata-type-1\", \"principal_object_privilege_info\": [ { \"principal_type\": \"principal-type-1\", \"principal_object_privileges\": [ { \"principal_id\": \"principal-guid-1\", \"principal_name\": \"principal-name-1\", \"principal_sub_type\": \"principal-sub-type-1\", \"object_privileges\": \"[object-privilege-1, object-privilege-2]\" }, { \"principal_id\": \"principal-guid-2\", \"principal_name\": \"principal-name-2\", \"principal_sub_type\": \"principal-sub-type-2\", \"object_privileges\": \"[object-privilege-1, object-privilege-2]\" } ] }, { \"principal_type\": \"principal-type-2\", \"principal_object_privileges\": [ { \"principal_id\": \"principal-guid-3\", \"principal_name\": \"principal-guid-4\", \"principal_sub_type\": \"principal-sub-type-4\", \"object_privileges\": \"[object-privilege-1]\" } ] } ] }, { \"metadata_id\": \"metadata-guid-2\", \"metadata_name\": \"metadata-name-2\", \"metadata_type\": \"metadata-type-2\", \"principal_object_privilege_info\": [ { \"principal_type\": \"principal-type-1\", \"principal_object_privileges\": [ { \"principal_id\": \"principal-guid-1\", \"principal_name\": \"principal-name-1\", \"principal_sub_type\": \"principal-sub-type-1\", \"object_privileges\": \"[object-privilege-3, object-privilege-4]\" }, { \"principal_id\": \"principal-guid-2\", \"principal_name\": \"principal-name-2\", \"principal_sub_type\": \"principal-sub-type-2\", \"object_privileges\": \"[object-privilege-4]\" } ] } ] } ] } ``` + +### Example + + +```typescript +import { createBearerAuthenticationConfig, ThoughtSpotRestApi, FetchObjectPrivilegesRequest } from '@thoughtspot/rest-api-sdk'; + +const configuration = createBearerAuthenticationConfig("CLUSTER_SERVER_URL", { + username: "YOUR_USERNAME", + password: "YOUR_PASSWORD", +}); +const apiInstance = new ThoughtSpotRestApi(configuration); + +apiInstance.fetchObjectPrivileges( + // FetchObjectPrivilegesRequest + { + metadata: [ + { + type: "LOGICAL_TABLE", + identifier: "identifier_example", + }, + ], + principals: [ + { + identifier: "identifier_example", + type: "USER", + }, + ], + record_offset: 0, + record_size: 20, + } +).then((data:any) => { + console.log('API called successfully. Returned data: ' + data); +}).catch((error:any) => console.error(error)); + + +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **fetchObjectPrivilegesRequest** | **FetchObjectPrivilegesRequest**| | + + +### Return type + +**ObjectPrivilegesOfMetadataResponse** + +### Authorization + +[bearerAuth](README.md#bearerAuth) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Fetching defined object privileges of metadata objects is successful. | - | +**400** | Invalid request. | - | +**401** | Unauthorized access. | - | +**403** | Forbidden access. | - | +**500** | Unexpected error | - | + +[[Back to top]](#) [[Back to API list]](README.md#documentation-for-api-endpoints) [[Back to Model list]](README.md#documentation-for-models) [[Back to README]](README.md) + +# **fetchPermissionsOfPrincipals** +> PermissionOfPrincipalsResponse fetchPermissionsOfPrincipals(fetchPermissionsOfPrincipalsRequest) + + Version: 9.0.0.cl or later Fetches object permission details for a given principal object such as a user and group. Requires view access to the metadata object. #### Usage guidelines * To get a list of all metadata objects that a user or group can access, specify the `type` and GUID or name of the principal. * To get permission details for a specific object, add the `type` and GUID or name of the metadata object to your API request. Upon successful execution, the API returns a list of metadata objects and permission details for each object. + +### Example + + +```typescript +import { createBearerAuthenticationConfig, ThoughtSpotRestApi, FetchPermissionsOfPrincipalsRequest } from '@thoughtspot/rest-api-sdk'; + +const configuration = createBearerAuthenticationConfig("CLUSTER_SERVER_URL", { + username: "YOUR_USERNAME", + password: "YOUR_PASSWORD", +}); +const apiInstance = new ThoughtSpotRestApi(configuration); + +apiInstance.fetchPermissionsOfPrincipals( + // FetchPermissionsOfPrincipalsRequest + { + principals: [ + { + identifier: "identifier_example", + type: "USER", + }, + ], + metadata: [ + { + type: "LIVEBOARD", + identifier: "identifier_example", + }, + ], + record_offset: 0, + record_size: -1, + default_metadata_type: "ALL", + } +).then((data:any) => { + console.log('API called successfully. Returned data: ' + data); +}).catch((error:any) => console.error(error)); + + +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **fetchPermissionsOfPrincipalsRequest** | **FetchPermissionsOfPrincipalsRequest**| | + + +### Return type + +**PermissionOfPrincipalsResponse** + +### Authorization + +[bearerAuth](README.md#bearerAuth) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Fetching permissions of principals is successful. | - | +**400** | Invalid request. | - | +**401** | Unauthorized access. | - | +**403** | Forbidden access. | - | +**500** | Unexpected error | - | + +[[Back to top]](#) [[Back to API list]](README.md#documentation-for-api-endpoints) [[Back to Model list]](README.md#documentation-for-models) [[Back to README]](README.md) + +# **fetchPermissionsOnMetadata** +> PermissionOfMetadataResponse fetchPermissionsOnMetadata(fetchPermissionsOnMetadataRequest) + + Version: 9.0.0.cl or later Fetches permission details for a given metadata object. Requires view access to the metadata object. #### Usage guidelines * To fetch a list of users and groups for a metadata object, specify `type` and GUID or name of the metadata object. * To get permission details for a specific user or group, add `type` and GUID or name of the principal object to your API request. Upon successful execution, the API returns permission details and principal information for the object specified in the API request. + +### Example + + +```typescript +import { createBearerAuthenticationConfig, ThoughtSpotRestApi, FetchPermissionsOnMetadataRequest } from '@thoughtspot/rest-api-sdk'; + +const configuration = createBearerAuthenticationConfig("CLUSTER_SERVER_URL", { + username: "YOUR_USERNAME", + password: "YOUR_PASSWORD", +}); +const apiInstance = new ThoughtSpotRestApi(configuration); + +apiInstance.fetchPermissionsOnMetadata( + // FetchPermissionsOnMetadataRequest + { + metadata: [ + { + type: "LIVEBOARD", + identifier: "identifier_example", + }, + ], + principals: [ + { + identifier: "identifier_example", + type: "USER", + }, + ], + include_dependent_objects: false, + record_offset: 0, + record_size: -1, + permission_type: "permission_type_example", + } +).then((data:any) => { + console.log('API called successfully. Returned data: ' + data); +}).catch((error:any) => console.error(error)); + + +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **fetchPermissionsOnMetadataRequest** | **FetchPermissionsOnMetadataRequest**| | + + +### Return type + +**PermissionOfMetadataResponse** + +### Authorization + +[bearerAuth](README.md#bearerAuth) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Fetching permissions of metadata objects is successful. | - | +**400** | Invalid request. | - | +**401** | Unauthorized access. | - | +**403** | Forbidden access. | - | +**500** | Unexpected error | - | + +[[Back to top]](#) [[Back to API list]](README.md#documentation-for-api-endpoints) [[Back to Model list]](README.md#documentation-for-models) [[Back to README]](README.md) + +# **forceLogoutUsers** +> void forceLogoutUsers(forceLogoutUsersRequest) + + Version: 9.0.0.cl or later Enforces logout on current user sessions. Use this API with caution as it may invalidate active user sessions and force users to re-login. Make sure you specify the usernames or GUIDs. If you pass null values in the API call, all user sessions on your cluster become invalid, and the users are forced to re-login. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `USER_ADMINISTRATION` (**Can manage users**) privilege is required. + +### Example + + +```typescript +import { createBearerAuthenticationConfig, ThoughtSpotRestApi, ForceLogoutUsersRequest } from '@thoughtspot/rest-api-sdk'; + +const configuration = createBearerAuthenticationConfig("CLUSTER_SERVER_URL", { + username: "YOUR_USERNAME", + password: "YOUR_PASSWORD", +}); +const apiInstance = new ThoughtSpotRestApi(configuration); + +apiInstance.forceLogoutUsers( + // ForceLogoutUsersRequest + { + user_identifiers: [ + "user_identifiers_example", + ], + } +).then((data:any) => { + console.log('API called successfully. Returned data: ' + data); +}).catch((error:any) => console.error(error)); + + +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **forceLogoutUsersRequest** | **ForceLogoutUsersRequest**| | + + +### Return type + +**void** + +### Authorization + +[bearerAuth](README.md#bearerAuth) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**204** | Force logging out of users operation successful. | - | +**400** | Invalid request. | - | +**401** | Unauthorized access. | - | +**403** | Forbidden access. | - | +**500** | Unexpected error | - | + +[[Back to top]](#) [[Back to API list]](README.md#documentation-for-api-endpoints) [[Back to Model list]](README.md#documentation-for-models) [[Back to README]](README.md) + +# **generateCSV** +> any generateCSV(generateCSVRequest) + + Version: 10.12.0.cl or later Exports a [custom calendar](https://docs.thoughtspot.com/cloud/latest/connections-cust-cal) in the CSV format. Requires `DATAMANAGEMENT` (**Can manage data**) or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your ThoughtSpot instance, the `CAN_MANAGE_CUSTOM_CALENDAR` (**Can manage custom calendars**) privilege is required. #### Usage guidelines Use this API to download a custom calendar in the CSV file format. In your API request, specify the following parameters. * Start and end date of the calendar. For \"month offset\" calendars, the start date must match the month defined in the `month_offset` attribute. You can also specify optional parameters such as the starting day of the week and prefixes for the quarter and year labels. + +### Example + + +```typescript +import { createBearerAuthenticationConfig, ThoughtSpotRestApi, GenerateCSVRequest } from '@thoughtspot/rest-api-sdk'; + +const configuration = createBearerAuthenticationConfig("CLUSTER_SERVER_URL", { + username: "YOUR_USERNAME", + password: "YOUR_PASSWORD", +}); +const apiInstance = new ThoughtSpotRestApi(configuration); + +apiInstance.generateCSV( + // GenerateCSVRequest + { + start_date: "start_date_example", + end_date: "end_date_example", + calendar_type: "MONTH_OFFSET", + month_offset: "January", + start_day_of_week: "Sunday", + quarter_name_prefix: "quarter_name_prefix_example", + year_name_prefix: "year_name_prefix_example", + } +).then((data:any) => { + console.log('API called successfully. Returned data: ' + data); +}).catch((error:any) => console.error(error)); + + +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **generateCSVRequest** | **GenerateCSVRequest**| | + + +### Return type + +**any** + +### Authorization + +[bearerAuth](README.md#bearerAuth) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Generate custom calendar data based on specifications, as a CSV file. | - | +**400** | Invalid request. | - | +**401** | Unauthorized access. | - | +**403** | Forbidden access. | - | +**500** | Unexpected error | - | + +[[Back to top]](#) [[Back to API list]](README.md#documentation-for-api-endpoints) [[Back to Model list]](README.md#documentation-for-models) [[Back to README]](README.md) + +# **getCurrentUserInfo** +> User getCurrentUserInfo() + + Version: 9.0.0.cl or later Retrieves details of the current user session for the token provided in the request header. Any ThoughtSpot user can access this endpoint and send an API request. The data returned in the API response varies according to user\'s privilege and object access permissions. **NOTE**: In ThoughtSpot, users with cluster administration privileges can access all Orgs by default. However, unless the administrator is explicitly added to an Org, the Orgs list in the session information returned by the API will include only the Primary Org. To include other Orgs in the API response, you must explicitly add the administrator to each Org in the Admin settings page in the UI or via user REST API. + +### Example + + +```typescript +import { createBearerAuthenticationConfig, ThoughtSpotRestApi, GetCurrentUserInfoRequest } from '@thoughtspot/rest-api-sdk'; + +const configuration = createBearerAuthenticationConfig("CLUSTER_SERVER_URL", { + username: "YOUR_USERNAME", + password: "YOUR_PASSWORD", +}); +const apiInstance = new ThoughtSpotRestApi(configuration); + +apiInstance.getCurrentUserInfo().then((data:any) => { + console.log('API called successfully. Returned data: ' + JSON.stringify(data)); +}).catch((error:any) => console.error(error)); + + +``` + + +### Parameters +This endpoint does not need any parameter. + + +### Return type + +**User** + +### Authorization + +[bearerAuth](README.md#bearerAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Fetch current session user detail successful. | - | +**400** | Invalid request. | - | +**401** | Unauthorized access. | - | +**403** | Forbidden access. | - | +**500** | Unexpected error | - | + +[[Back to top]](#) [[Back to API list]](README.md#documentation-for-api-endpoints) [[Back to Model list]](README.md#documentation-for-models) [[Back to README]](README.md) + +# **getCurrentUserToken** +> GetTokenResponse getCurrentUserToken() + + Version: 9.4.0.cl or later Retrieves details of the current session token for the bearer token provided in the request header. This API endpoint does not create a new token. Instead, it returns details about the token, including the token string, creation time, expiration time, and the associated user. Use this endpoint to introspect your current session token, debug authentication issues, or when a frontend application needs session token details. Any ThoughtSpot user with a valid bearer token can access this endpoint and send an API request + +### Example + + +```typescript +import { createBearerAuthenticationConfig, ThoughtSpotRestApi, GetCurrentUserTokenRequest } from '@thoughtspot/rest-api-sdk'; + +const configuration = createBearerAuthenticationConfig("CLUSTER_SERVER_URL", { + username: "YOUR_USERNAME", + password: "YOUR_PASSWORD", +}); +const apiInstance = new ThoughtSpotRestApi(configuration); + +apiInstance.getCurrentUserToken().then((data:any) => { + console.log('API called successfully. Returned data: ' + JSON.stringify(data)); +}).catch((error:any) => console.error(error)); + + +``` + + +### Parameters +This endpoint does not need any parameter. + + +### Return type + +**GetTokenResponse** + +### Authorization + +[bearerAuth](README.md#bearerAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Fetching token for current user successful. | - | +**400** | Invalid request. | - | +**401** | Unauthorized access. | - | +**403** | Forbidden access. | - | +**500** | Unexpected error | - | + +[[Back to top]](#) [[Back to API list]](README.md#documentation-for-api-endpoints) [[Back to Model list]](README.md#documentation-for-models) [[Back to README]](README.md) + +# **getCustomAccessToken** +> AccessToken getCustomAccessToken(getCustomAccessTokenRequest) + + Version: 10.4.0.cl or later Creates an authentication token that provides values for the formula variables in the Row Level Security (RLS) rules for a given user. Recommended for use cases that require Attribute-based access control (ABAC) via RLS. #### Required privileges To add a new user and assign privileges during auto-creation, the `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege is required. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled, the `CONTROL_TRUSTED_AUTH` (**Can Enable or Disable Trusted Authentication**) privilege and edit access to the data source are required. To configure formula variables for all Orgs on your instance or the Primary Org, cluster administration privileges are required. Org administrators can configure formula variables for their respective Orgs. If Role-Based Access Control (RBAC) is enabled, users with the `CAN_MANAGE_VARIABLES` (**Can manage variables**) role privilege can also create and manage variables for their Org context. #### Usage guidelines You can generate a token by providing a `username` and `password`, or by using a `secret_key`. To generate a `secret_key`, the administrator must enable [Trusted authentication](https://developers.thoughtspot.com/docs/trusted-auth-secret-key) in the **Develop** > **Customizations** > **Security Settings** page. **Note**: * When both `password` and `secret_key` are included in the API request, `password` takes precedence. * If [Multi-Factor Authentication (MFA)](https://docs.thoughtspot.com/cloud/latest/authentication-local-mfa) is enabled on your instance, the API login request with `username` and `password` returns an error. You can switch to token-based authentication with `secret_key` or contact ThoughtSpot Support for assistance. The token obtained from ThoughtSpot is valid for 5 minutes by default. You can configure the token expiration time as required. #### ABAC via RLS To implement ABAC via RLS and assign security entitlements to users during session creation, generate a token with custom variable values. The values set in the authentication token are applied to the formula variables referenced in RLS rules at the table level, which determines the data each user can access based on their entitlements. The variable values can be configured to persist for a specific set of Models in user sessions initiated with the token, allowing different RLS rules to be set for different data models. Once defined, the rules are added to the user\'s `variable_values` object, after which all sessions will use the persisted values. For more information, see [ABAC via tokens Documentation](https://developers.thoughtspot.com/docs/abac-via-rls-variables). ##### Formula variables Before defining variable values, ensure the variables are created and available on your instance. To create a formula variable, you can use the **Create variable** (`/api/rest/2.0/template/variables/create`) REST API endpoint, with the variable `type` set as `Formula_Variable` in the API request. The API doesn\'t support `\"persist_option\": \"RESET\"` and `\"persist_option\": \"NONE\"` when `variable_values` are defined in the request. If you are using `variable_values` for token generation, you must use other supported persist options such as `APPEND` or `REPLACE`. If you want to use `RESET` or `NONE`, do not pass any `variable_values`. In such cases, `variable_values` will remain unaffected. #### Supported objects The supported object type is `LOGICAL_TABLE`. When using `object_id` with `variable_values`, models are supported. #### Just-in-time provisioning For [just-in-time user creation and provisioning](https://developers.thoughtspot.com/docs/just-in-time-provisioning), specify the following attributes in the API request: * `auto_create` * `username` * `display_name` * `email` * `groups` Set `auto_create` to `true` if the username does not exist in ThoughtSpot. If the username already exists in ThoughtSpot and `auto_create` is set to `true`, user properties such as display name, email, Org and group entitlements will not be updated with new values. Setting `auto_create` to `true` does not create formula variables. Hence, this setting will not be applicable to `variable_values`. #### Important point to note All options in the token creation APIs that define user access to data in ThoughtSpot will take effect during token creation, not when the token is used for authentication. For example, `auto_create:true` will create the user when the authentication token is created. Persist options such as `APPEND` and `REPLACE` will persist `variable_values` on the user profile when the token is created. + +### Example + + +```typescript +import { createBearerAuthenticationConfig, ThoughtSpotRestApi, GetCustomAccessTokenRequest } from '@thoughtspot/rest-api-sdk'; + +const configuration = createBearerAuthenticationConfig("CLUSTER_SERVER_URL", { + username: "YOUR_USERNAME", + password: "YOUR_PASSWORD", +}); +const apiInstance = new ThoughtSpotRestApi(configuration); + +apiInstance.getCustomAccessToken( + // GetCustomAccessTokenRequest + { + username: "username_example", + password: "", + secret_key: "", + validity_time_in_sec: 300, + org_identifier: "org_identifier_example", + persist_option: "REPLACE", + filter_rules: [ + { + column_name: "column_name_example", + operator: "EQ", + values: [ + {}, + ], + }, + ], + parameter_values: [ + { + name: "name_example", + values: [ + {}, + ], + }, + ], + variable_values: [ + { + name: "name_example", + values: [ + {}, + ], + }, + ], + objects: [ + { + type: "LOGICAL_TABLE", + identifier: "identifier_example", + }, + ], + email: "email_example", + display_name: "display_name_example", + groups: [ + { + identifier: "identifier_example", + }, + ], + auto_create: true, + } +).then((data:any) => { + console.log('API called successfully. Returned data: ' + data); +}).catch((error:any) => console.error(error)); + + +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **getCustomAccessTokenRequest** | **GetCustomAccessTokenRequest**| | + + +### Return type + +**AccessToken** + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | ABAC token creation was successful. | - | +**400** | Invalid request. This could be due to missing or incorrect parameters. | - | +**401** | Unauthorized access. The request could not be authenticated. | - | +**403** | Forbidden access. The user does not have permission to access this resource. | - | +**500** | An unexpected error occurred on the server. | - | + +[[Back to top]](#) [[Back to API list]](README.md#documentation-for-api-endpoints) [[Back to Model list]](README.md#documentation-for-models) [[Back to README]](README.md) + +# **getDataSourceSuggestions** +> EurekaDataSourceSuggestionResponse getDataSourceSuggestions(getDataSourceSuggestionsRequest) + + Version: 10.15.0.cl or later Suggests the most relevant data sources for a given natural language query, ranked by confidence with LLM-generated reasoning. Requires `CAN_USE_SPOTTER` privilege and at least view-level access to the underlying metadata entities referenced in the response. #### Usage guidelines The request must include: - `query`: the natural language question to find relevant data sources for If the request is successful, the API returns a ranked list of suggested data sources, each containing: - `confidence`: a float score indicating the model\'s confidence in the relevance of the suggestion - `details`: metadata about the data source - `data_source_identifier`: the unique ID of the data source - `data_source_name`: the display name of the data source - `description`: a description of the data source - `reasoning`: LLM-generated rationale explaining why the data source was recommended #### Error responses | Code | Description | |------|--------------------------------------------------------------------------------------------------------------------------------------------| | 401 | Unauthorized — authentication token is missing, expired, or invalid. | | 403 | Forbidden — the authenticated user does not have `CAN_USE_SPOTTER` privilege or lacks view permission on the underlying metadata entities. | > ###### Note: > * This endpoint is currently in Beta. Breaking changes may be introduced before it is made Generally Available. > * This endpoint requires Spotter — please contact ThoughtSpot Support to enable Spotter on your cluster. + +### Example + + +```typescript +import { createBearerAuthenticationConfig, ThoughtSpotRestApi, GetDataSourceSuggestionsRequest } from '@thoughtspot/rest-api-sdk'; + +const configuration = createBearerAuthenticationConfig("CLUSTER_SERVER_URL", { + username: "YOUR_USERNAME", + password: "YOUR_PASSWORD", +}); +const apiInstance = new ThoughtSpotRestApi(configuration); + +apiInstance.getDataSourceSuggestions( + // GetDataSourceSuggestionsRequest + { + query: "query_example", + } +).then((data:any) => { + console.log('API called successfully. Returned data: ' + data); +}).catch((error:any) => console.error(error)); + + +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **getDataSourceSuggestionsRequest** | **GetDataSourceSuggestionsRequest**| | + + +### Return type + +**EurekaDataSourceSuggestionResponse** + +### Authorization + +[bearerAuth](README.md#bearerAuth) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Common successful response | - | +**201** | Common error response | - | +**400** | Operation failed | - | +**401** | Unauthorized access. | - | +**403** | Forbidden access. | - | +**500** | Operation failed | - | + +[[Back to top]](#) [[Back to API list]](README.md#documentation-for-api-endpoints) [[Back to Model list]](README.md#documentation-for-models) [[Back to README]](README.md) + +# **getFullAccessToken** +> Token getFullAccessToken(getFullAccessTokenRequest) + + Version: 9.0.0.cl or later Generates an authentication token for creating a full session in ThoughtSpot for a given user. Recommended for use cases that do not require Attribute-based access control (ABAC) via Row Level Security (RLS). #### Usage guidelines You can generate a token for a user by providing a `username` and `password`, or by using the `secret_key` generated for your instance. To generate a `secret_key`, the administrator must enable [Trusted authentication](https://developers.thoughtspot.com/docs/trusted-auth-secret-key) in the **Develop** > **Customizations** > **Security Settings** page. **Note**: * When both `password` and `secret_key` are included in the API request, `password` takes precedence. * If [Multi-Factor Authentication (MFA)](https://docs.thoughtspot.com/cloud/latest/authentication-local-mfa) is enabled on your instance, the API login request with `username` and `password` returns an error. You can switch to token-based authentication with `secret_key` or contact ThoughtSpot Support for assistance. The token obtained from ThoughtSpot is valid for 5 minutes by default. You can configure the token expiration time as required. #### Just-in-time provisioning For [just-in-time user creation and provisioning](https://developers.thoughtspot.com/docs/just-in-time-provisioning), specify the following attributes in the API request: * `auto_create` * `username` * `display_name` * `email` * `group_identifiers` Set `auto_create` to `true` if the username does not exist in ThoughtSpot. If the user already exists in ThoughtSpot and `auto_create` is set to `true`, user properties such as display name, email and group assignment will be updated. To add a new user and assign privileges during auto-creation, the `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege is required. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled, the `CONTROL_TRUSTED_AUTH` (**Can Enable or Disable Trusted Authentication**) privilege is required. #### Important point to note All options in the token creation APIs that define user access to data in ThoughtSpot will take effect during token creation, not when the token is used for authentication. For example, `auto_create:true` will create the user when the authentication token is created. + +### Example + + +```typescript +import { createBearerAuthenticationConfig, ThoughtSpotRestApi, GetFullAccessTokenRequest } from '@thoughtspot/rest-api-sdk'; + +const configuration = createBearerAuthenticationConfig("CLUSTER_SERVER_URL", { + username: "YOUR_USERNAME", + password: "YOUR_PASSWORD", +}); +const apiInstance = new ThoughtSpotRestApi(configuration); + +apiInstance.getFullAccessToken( + // GetFullAccessTokenRequest + { + username: "username_example", + password: "", + secret_key: "", + validity_time_in_sec: 300, + org_id: 1, + email: "email_example", + display_name: "display_name_example", + auto_create: false, + group_identifiers: [ + "group_identifiers_example", + ], + user_parameters: null, + } +).then((data:any) => { + console.log('API called successfully. Returned data: ' + data); +}).catch((error:any) => console.error(error)); + + +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **getFullAccessTokenRequest** | **GetFullAccessTokenRequest**| | + + +### Return type + +**Token** + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Bearer auth token creation successful. | - | +**400** | Invalid request. | - | +**401** | Unauthorized access. | - | +**403** | Forbidden access. | - | +**500** | Unexpected error | - | + +[[Back to top]](#) [[Back to API list]](README.md#documentation-for-api-endpoints) [[Back to Model list]](README.md#documentation-for-models) [[Back to README]](README.md) + +# **getNLInstructions** +> EurekaGetNLInstructionsResponse getNLInstructions(getNLInstructionsRequest) + + Version: 10.15.0.cl or later Retrieves existing natural language (NL) instructions configured for a specific data model. These instructions guide the AI system in understanding data context and generating more accurate responses. Requires `CAN_USE_SPOTTER` privilege, at least view access on the data model, and a bearer token corresponding to the org where the data model exists. #### Usage guidelines The request must include: - `data_source_identifier`: the unique ID of the data model to retrieve instructions for If the request is successful, the API returns: - `nl_instructions_info`: an array of instruction objects, each containing: - `instructions`: the configured text instructions for AI processing - `scope`: the scope of the instruction — currently only `GLOBAL` is supported #### Instructions scope - **GLOBAL**: Instructions that apply globally across the system on the given data-model (currently only global instructions are supported) #### Error responses | Code | Description | |------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| | 401 | Unauthorized — authentication token is missing, expired, or invalid. | | 403 | Forbidden — the authenticated user does not have `CAN_USE_SPOTTER` privilege, lacks view access on the data model, or the bearer token does not correspond to the org where the data model exists. | > ###### Note: > > - To use this API, the user needs at least view access on the data model, and must use the bearer token corresponding to the org where the data model exists. > - This endpoint is currently in Beta. Breaking changes may be introduced before the endpoint is made Generally Available. > - Available from version 10.15.0.cl and later. > - This endpoint requires Spotter — please contact ThoughtSpot Support to enable Spotter on your cluster. > - Use this API to review currently configured instructions before modifying them with `setNLInstructions`. + +### Example + + +```typescript +import { createBearerAuthenticationConfig, ThoughtSpotRestApi, GetNLInstructionsRequest } from '@thoughtspot/rest-api-sdk'; + +const configuration = createBearerAuthenticationConfig("CLUSTER_SERVER_URL", { + username: "YOUR_USERNAME", + password: "YOUR_PASSWORD", +}); +const apiInstance = new ThoughtSpotRestApi(configuration); + +apiInstance.getNLInstructions( + // GetNLInstructionsRequest + { + data_source_identifier: "data_source_identifier_example", + } +).then((data:any) => { + console.log('API called successfully. Returned data: ' + data); +}).catch((error:any) => console.error(error)); + + +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **getNLInstructionsRequest** | **GetNLInstructionsRequest**| | + + +### Return type + +**EurekaGetNLInstructionsResponse** + +### Authorization + +[bearerAuth](README.md#bearerAuth) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Common successful response | - | +**201** | Common error response | - | +**400** | Operation failed | - | +**401** | Unauthorized access. | - | +**403** | Forbidden access. | - | +**500** | Operation failed | - | + +[[Back to top]](#) [[Back to API list]](README.md#documentation-for-api-endpoints) [[Back to Model list]](README.md#documentation-for-models) [[Back to README]](README.md) + +# **getObjectAccessToken** +> Token getObjectAccessToken(getObjectAccessTokenRequest) + + Version: 9.0.0.cl or later Generates an authentication token that provides access to a specific metadata object. This object list is intersected with the list of objects the user is allowed to access via group membership. For more information, see [Object security](https://docs.thoughtspot.com/cloud/latest/security-data-object#object_security). #### Usage guidelines You can generate a token for a user by providing a `username` and `password`, or by using the `secret_key` generated for your instance. To generate a `secret_key`, the administrator must enable [Trusted authentication](https://developers.thoughtspot.com/docs/trusted-auth-secret-key) in the **Develop** > **Customizations** > **Security Settings** page. **Note**: * When both `password` and `secret_key` are included in the API request, `password` takes precedence. * If [Multi-Factor Authentication (MFA)](https://docs.thoughtspot.com/cloud/latest/authentication-local-mfa) is enabled on your instance, the API login request with `username` and `password` returns an error. You can switch to token-based authentication with `secret_key` or contact ThoughtSpot Support for assistance. The token obtained from ThoughtSpot is valid for 5 minutes by default. You can configure the token expiration time as required. #### Just-in-time provisioning For [just-in-time user creation and provisioning](https://developers.thoughtspot.com/docs/just-in-time-provisioning), specify the following attributes in the API request: * `auto_create` * `username` * `display_name` * `email` * `group_identifiers` Set `auto_create` to `true` if the user is not available in ThoughtSpot. If the user already exists in ThoughtSpot and the `auto_create` parameter is set to `true`, user properties such as display name, email, and group assignment will be updated. To add a new user and assign privileges, the `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege is required. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled, the `CONTROL_TRUSTED_AUTH`(**Can Enable or Disable Trusted Authentication**) privilege is required. #### Important point to note All options in the token creation APIs that define user access to data in ThoughtSpot will take effect during token creation, not when the token is used for authentication. For example, `auto_create:true` will create the user when the authentication token is created. + +### Example + + +```typescript +import { createBearerAuthenticationConfig, ThoughtSpotRestApi, GetObjectAccessTokenRequest } from '@thoughtspot/rest-api-sdk'; + +const configuration = createBearerAuthenticationConfig("CLUSTER_SERVER_URL", { + username: "YOUR_USERNAME", + password: "YOUR_PASSWORD", +}); +const apiInstance = new ThoughtSpotRestApi(configuration); + +apiInstance.getObjectAccessToken( + // GetObjectAccessTokenRequest + { + username: "username_example", + object_id: "object_id_example", + password: "", + secret_key: "", + validity_time_in_sec: 300, + org_id: 1, + email: "email_example", + display_name: "display_name_example", + auto_create: false, + group_identifiers: [ + "group_identifiers_example", + ], + user_parameters: null, + } +).then((data:any) => { + console.log('API called successfully. Returned data: ' + data); +}).catch((error:any) => console.error(error)); + + +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **getObjectAccessTokenRequest** | **GetObjectAccessTokenRequest**| | + + +### Return type + +**Token** + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Bearer auth token creation successful. | - | +**400** | Invalid request. | - | +**401** | Unauthorized access. | - | +**403** | Forbidden access. | - | +**500** | Unexpected error | - | + +[[Back to top]](#) [[Back to API list]](README.md#documentation-for-api-endpoints) [[Back to Model list]](README.md#documentation-for-models) [[Back to README]](README.md) + +# **getRelevantQuestions** +> EurekaGetRelevantQuestionsResponse getRelevantQuestions(getRelevantQuestionsRequest) + + Version: 10.13.0.cl or later Breaks down a natural language query into a series of smaller analytical sub-questions, each mapped to a relevant data source. Requires `CAN_USE_SPOTTER` privilege and at least view-level access to the referenced metadata objects. #### Usage guidelines The request must include: - `query`: the natural language question to decompose into analytical sub-questions - `metadata_context`: at least one of the following context identifiers to guide question generation: - `conversation_identifier` — an existing conversation session ID - `answer_identifiers` — a list of Answer GUIDs - `liveboard_identifiers` — a list of Liveboard GUIDs - `data_source_identifiers` — a list of data source GUIDs Optional parameters for refining the output: - `ai_context`: additional context to improve response quality - `content` — supplementary text or CSV data as string input - `instructions` — custom text instructions for the AI system - `limit_relevant_questions`: maximum number of questions to return (default: `5`) - `bypass_cache`: if `true`, forces fresh computation instead of returning cached results If the request is successful, the API returns a list of relevant analytical questions, each containing: - `query`: the generated sub-question - `data_source_identifier`: the unique ID of the data source the question targets - `data_source_name`: the display name of the corresponding data source #### Error responses | Code | Description | |------|---------------------------------------------------------------------------------------------------------------------------------------| | 401 | Unauthorized — authentication token is missing, expired, or invalid. | | 403 | Forbidden — the authenticated user does not have `CAN_USE_SPOTTER` privilege or lacks view access to the referenced metadata objects. | > ###### Note: > * This endpoint is currently in Beta. Breaking changes may be introduced before the endpoint is made Generally Available. > * This endpoint requires Spotter - please contact ThoughtSpot support to enable Spotter on your cluster. + +### Example + + +```typescript +import { createBearerAuthenticationConfig, ThoughtSpotRestApi, GetRelevantQuestionsRequest } from '@thoughtspot/rest-api-sdk'; + +const configuration = createBearerAuthenticationConfig("CLUSTER_SERVER_URL", { + username: "YOUR_USERNAME", + password: "YOUR_PASSWORD", +}); +const apiInstance = new ThoughtSpotRestApi(configuration); + +apiInstance.getRelevantQuestions( + // GetRelevantQuestionsRequest + { + metadata_context: null, + limit_relevant_questions: 1, + bypass_cache: true, + query: "query_example", + ai_context: null, + } +).then((data:any) => { + console.log('API called successfully. Returned data: ' + data); +}).catch((error:any) => console.error(error)); + + +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **getRelevantQuestionsRequest** | **GetRelevantQuestionsRequest**| | + + +### Return type + +**EurekaGetRelevantQuestionsResponse** + +### Authorization + +[bearerAuth](README.md#bearerAuth) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Common successful response | - | +**201** | Common error response | - | +**400** | Operation failed | - | +**401** | Unauthorized access. | - | +**403** | Forbidden access. | - | +**500** | Operation failed | - | + +[[Back to top]](#) [[Back to API list]](README.md#documentation-for-api-endpoints) [[Back to Model list]](README.md#documentation-for-models) [[Back to README]](README.md) + +# **getSystemConfig** +> SystemConfig getSystemConfig() + + Version: 9.0.0.cl or later Retrieves the current configuration details of the cluster. If the request is successful, the API returns a list configuration settings applied on the cluster. Requires `ADMINISTRATION`(**Can administer ThoughtSpot**) privilege to view these complete configuration settings of the cluster. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `SYSTEM_INFO_ADMINISTRATION` (**Can view system activities**) privilege is required. This API does not require any parameters to be passed in the request. + +### Example + + +```typescript +import { createBearerAuthenticationConfig, ThoughtSpotRestApi, GetSystemConfigRequest } from '@thoughtspot/rest-api-sdk'; + +const configuration = createBearerAuthenticationConfig("CLUSTER_SERVER_URL", { + username: "YOUR_USERNAME", + password: "YOUR_PASSWORD", +}); +const apiInstance = new ThoughtSpotRestApi(configuration); + +apiInstance.getSystemConfig().then((data:any) => { + console.log('API called successfully. Returned data: ' + JSON.stringify(data)); +}).catch((error:any) => console.error(error)); + + +``` + + +### Parameters +This endpoint does not need any parameter. + + +### Return type + +**SystemConfig** + +### Authorization + +[bearerAuth](README.md#bearerAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Cluster config information. | - | +**400** | Invalid request. | - | +**401** | Unauthorized access. | - | +**403** | Forbidden access. | - | +**500** | Unexpected error | - | + +[[Back to top]](#) [[Back to API list]](README.md#documentation-for-api-endpoints) [[Back to Model list]](README.md#documentation-for-models) [[Back to README]](README.md) + +# **getSystemInformation** +> SystemInfo getSystemInformation() + + Version: 9.0.0.cl or later Gets system information such as the release version, locale, time zone, deployment environment, date format, and date time format of the cluster. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privileges. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `SYSTEM_INFO_ADMINISTRATION` (**Can view system activities**) privilege is required. This API does not require any parameters to be passed in the request. + +### Example + + +```typescript +import { createBearerAuthenticationConfig, ThoughtSpotRestApi, GetSystemInformationRequest } from '@thoughtspot/rest-api-sdk'; + +const configuration = createBearerAuthenticationConfig("CLUSTER_SERVER_URL", { + username: "YOUR_USERNAME", + password: "YOUR_PASSWORD", +}); +const apiInstance = new ThoughtSpotRestApi(configuration); + +apiInstance.getSystemInformation().then((data:any) => { + console.log('API called successfully. Returned data: ' + JSON.stringify(data)); +}).catch((error:any) => console.error(error)); + + +``` + + +### Parameters +This endpoint does not need any parameter. + + +### Return type + +**SystemInfo** + +### Authorization + +[bearerAuth](README.md#bearerAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Cluster information. | - | +**400** | Invalid request. | - | +**401** | Unauthorized access. | - | +**403** | Forbidden access. | - | +**500** | Unexpected error | - | + +[[Back to top]](#) [[Back to API list]](README.md#documentation-for-api-endpoints) [[Back to Model list]](README.md#documentation-for-models) [[Back to README]](README.md) + +# **getSystemOverrideInfo** +> SystemOverrideInfo getSystemOverrideInfo() + + Version: 9.2.0.cl or later Gets a list of configuration overrides applied on the cluster. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `APPLICATION_ADMINISTRATION` (**Can manage application settings**) privilege is required. This API does not require any parameters to be passed in the request. + +### Example + + +```typescript +import { createBearerAuthenticationConfig, ThoughtSpotRestApi, GetSystemOverrideInfoRequest } from '@thoughtspot/rest-api-sdk'; + +const configuration = createBearerAuthenticationConfig("CLUSTER_SERVER_URL", { + username: "YOUR_USERNAME", + password: "YOUR_PASSWORD", +}); +const apiInstance = new ThoughtSpotRestApi(configuration); + +apiInstance.getSystemOverrideInfo().then((data:any) => { + console.log('API called successfully. Returned data: ' + JSON.stringify(data)); +}).catch((error:any) => console.error(error)); + + +``` + + +### Parameters +This endpoint does not need any parameter. + + +### Return type + +**SystemOverrideInfo** + +### Authorization + +[bearerAuth](README.md#bearerAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Cluster configuration which can be overridden. | - | +**400** | Invalid request. | - | +**401** | Unauthorized access. | - | +**403** | Forbidden access. | - | +**500** | Unexpected error | - | + +[[Back to top]](#) [[Back to API list]](README.md#documentation-for-api-endpoints) [[Back to Model list]](README.md#documentation-for-models) [[Back to README]](README.md) + +# **importMetadataTML** +> Array importMetadataTML(importMetadataTMLRequest) + + Version: 9.0.0.cl or later Imports [TML](https://docs.thoughtspot.com/cloud/latest/tml) files into ThoughtSpot. Requires `DATAMANAGEMENT` (**Can manage data**) or `ADMINISTRATION` (**Can administer ThoughtsSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the following Data control privileges may be required: - `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) - `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` (**Can manage data models**) #### Usage guidelines * Import all related objects in a single TML Import API call. For example, Tables that use the same Connection object and Worksheets connected to these Tables. * Include the `fqn` property to distinguish objects that have the same name. For example, if you have multiple Connections or Worksheets with the same name on ThoughtSpot and the Connection or Worksheet referenced in your TML file does not have a unique name to distinguish, it may result in invalid object references. Adding `fqn` helps ThoughtSpot differentiate a Table from another with the same name. We recommend [exporting TML with FQNs](#/http/api-endpoints/metadata/export-metadata-tml) and using these during the import operation. * You can upload multiple TML files at a time. If you import a Worksheet along with Liveboards, Answers, and other dependent objects in a single API call, the imported objects will be immediately available for use. When you import only a Worksheet object, it may take some time for the Worksheet to become available in the ThoughtSpot system. Please wait for a few minutes, and then proceed to create an Answer and Liveboard from the newly imported Worksheet. For more information, see [TML Documentation](https://developers.thoughtspot.com/docs/tml#_import_a_tml). + +### Example + + +```typescript +import { createBearerAuthenticationConfig, ThoughtSpotRestApi, ImportMetadataTMLRequest } from '@thoughtspot/rest-api-sdk'; + +const configuration = createBearerAuthenticationConfig("CLUSTER_SERVER_URL", { + username: "YOUR_USERNAME", + password: "YOUR_PASSWORD", +}); +const apiInstance = new ThoughtSpotRestApi(configuration); + +apiInstance.importMetadataTML( + // ImportMetadataTMLRequest + { + metadata_tmls: [ + "metadata_tmls_example", + ], + import_policy: "PARTIAL", + create_new: false, + all_orgs_override: false, + skip_diff_check: false, + enable_large_metadata_validation: false, + } +).then((data:any) => { + console.log('API called successfully. Returned data: ' + data); +}).catch((error:any) => console.error(error)); + + +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **importMetadataTMLRequest** | **ImportMetadataTMLRequest**| | + + +### Return type + +**Array** + +### Authorization + +[bearerAuth](README.md#bearerAuth) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Import metadata objects using specified TMLs is successful. | - | +**400** | Invalid request. | - | +**401** | Unauthorized access. | - | +**403** | Forbidden access. | - | +**500** | Unexpected error | - | + +[[Back to top]](#) [[Back to API list]](README.md#documentation-for-api-endpoints) [[Back to Model list]](README.md#documentation-for-models) [[Back to README]](README.md) + +# **importMetadataTMLAsync** +> ImportEPackAsyncTaskStatus importMetadataTMLAsync(importMetadataTMLAsyncRequest) + + Version: 10.4.0.cl or later Schedules a task to import [TML](https://docs.thoughtspot.com/cloud/latest/tml) files into ThoughtSpot. You can use this API endpoint to process TML objects asynchronously when importing TMLs of large and complex metadata objects into ThoughtSpot. Unlike the synchronous import TML operation, the API processes TML data in the background and returns a task ID, which can be used to check the status of the import task via `/api/rest/2.0/metadata/tml/async/status` API endpoint. Requires `DATAMANAGEMENT` (**Can manage data**) or `ADMINISTRATION` (**Can administer ThoughtsSpot**) privilege, and edit access to the TML objects. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the following Data control privileges may be required: - `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) - `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` (**Can manage data models**) #### Usage guidelines See [Async TML API Documentation](https://developers.thoughtspot.com/docs/tml#_import_tml_objects_asynchronously) for usage guidelines. + +### Example + + +```typescript +import { createBearerAuthenticationConfig, ThoughtSpotRestApi, ImportMetadataTMLAsyncRequest } from '@thoughtspot/rest-api-sdk'; + +const configuration = createBearerAuthenticationConfig("CLUSTER_SERVER_URL", { + username: "YOUR_USERNAME", + password: "YOUR_PASSWORD", +}); +const apiInstance = new ThoughtSpotRestApi(configuration); + +apiInstance.importMetadataTMLAsync( + // ImportMetadataTMLAsyncRequest + { + metadata_tmls: [ + "metadata_tmls_example", + ], + create_new: false, + all_orgs_override: false, + import_policy: "PARTIAL_OBJECT", + skip_diff_check: false, + enable_large_metadata_validation: false, + } +).then((data:any) => { + console.log('API called successfully. Returned data: ' + data); +}).catch((error:any) => console.error(error)); + + +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **importMetadataTMLAsyncRequest** | **ImportMetadataTMLAsyncRequest**| | + + +### Return type + +**ImportEPackAsyncTaskStatus** + +### Authorization + +[bearerAuth](README.md#bearerAuth) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Async TML Import Task submitted successfully. | - | +**400** | Invalid request. | - | +**401** | Unauthorized access. | - | +**403** | Forbidden access. | - | +**500** | Unexpected error | - | + +[[Back to top]](#) [[Back to API list]](README.md#documentation-for-api-endpoints) [[Back to Model list]](README.md#documentation-for-models) [[Back to README]](README.md) + +# **importUserGroups** +> ImportUserGroupsResponse importUserGroups(importUserGroupsRequest) + + Version: 9.0.0.cl or later Imports group objects from external databases into ThoughtSpot. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `GROUP_ADMINISTRATION` (**Can manage groups**) privilege is required. During the import operation: * If the specified group is not available in ThoughtSpot, it will be added to ThoughtSpot. * If `delete_unspecified_groups` is set to `true`, the groups not specified in the API request, excluding administrator and system user groups, are deleted. * If the specified groups are already available in ThoughtSpot, the object properties of these groups are modified and synchronized as per the input data in the API request. A successful API call returns the object that represents the changes made in the ThoughtSpot system. + +### Example + + +```typescript +import { createBearerAuthenticationConfig, ThoughtSpotRestApi, ImportUserGroupsRequest } from '@thoughtspot/rest-api-sdk'; + +const configuration = createBearerAuthenticationConfig("CLUSTER_SERVER_URL", { + username: "YOUR_USERNAME", + password: "YOUR_PASSWORD", +}); +const apiInstance = new ThoughtSpotRestApi(configuration); + +apiInstance.importUserGroups( + // ImportUserGroupsRequest + { + groups: [ + { + display_name: "display_name_example", + group_identifier: "group_identifier_example", + default_liveboard_identifiers: [ + "default_liveboard_identifiers_example", + ], + description: "description_example", + privileges: [ + "ADMINISTRATION", + ], + sub_group_identifiers: [ + "sub_group_identifiers_example", + ], + type: "LOCAL_GROUP", + user_identifiers: [ + "user_identifiers_example", + ], + visibility: "SHARABLE", + }, + ], + delete_unspecified_groups: false, + dry_run: true, + } +).then((data:any) => { + console.log('API called successfully. Returned data: ' + data); +}).catch((error:any) => console.error(error)); + + +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **importUserGroupsRequest** | **ImportUserGroupsRequest**| | + + +### Return type + +**ImportUserGroupsResponse** + +### Authorization + +[bearerAuth](README.md#bearerAuth) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Import user groups operation successful. | - | +**400** | Invalid request. | - | +**401** | Unauthorized access. | - | +**403** | Forbidden access. | - | +**500** | Unexpected error | - | + +[[Back to top]](#) [[Back to API list]](README.md#documentation-for-api-endpoints) [[Back to Model list]](README.md#documentation-for-models) [[Back to README]](README.md) + +# **importUsers** +> ImportUsersResponse importUsers(importUsersRequest) + + Version: 9.0.0.cl or later Imports user data from external databases into ThoughtSpot. During the user import operation: * If the specified users are not available in ThoughtSpot, the users are created and assigned a default password. Defining a `default_password` in the API request is optional. * If `delete_unspecified_users` is set to `true`, the users not specified in the API request, excluding the `tsadmin`, `guest`, `system` and `su` users, are deleted. * If the specified user objects are already available in ThoughtSpot, the object properties are updated and synchronized as per the input data in the API request. A successful API call returns the object that represents the changes made in the ThoughtSpot system. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `USER_ADMINISTRATION` (**Can manage users**) privilege is required. + +### Example + + +```typescript +import { createBearerAuthenticationConfig, ThoughtSpotRestApi, ImportUsersRequest } from '@thoughtspot/rest-api-sdk'; + +const configuration = createBearerAuthenticationConfig("CLUSTER_SERVER_URL", { + username: "YOUR_USERNAME", + password: "YOUR_PASSWORD", +}); +const apiInstance = new ThoughtSpotRestApi(configuration); + +apiInstance.importUsers( + // ImportUsersRequest + { + users: [ + { + user_identifier: "user_identifier_example", + display_name: "display_name_example", + password: "password_example", + account_type: "LOCAL_USER", + account_status: "ACTIVE", + email: "email_example", + org_identifiers: [ + "org_identifiers_example", + ], + group_identifiers: [ + "group_identifiers_example", + ], + visibility: "SHARABLE", + notify_on_share: true, + show_onboarding_experience: true, + onboarding_experience_completed: true, + home_liveboard_identifier: "home_liveboard_identifier_example", + favorite_metadata: [ + { + identifier: "identifier_example", + type: "LIVEBOARD", + }, + ], + preferred_locale: "en-CA", + use_browser_language: true, + }, + ], + default_password: "default_password_example", + dry_run: true, + delete_unspecified_users: false, + } +).then((data:any) => { + console.log('API called successfully. Returned data: ' + data); +}).catch((error:any) => console.error(error)); + + +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **importUsersRequest** | **ImportUsersRequest**| | + + +### Return type + +**ImportUsersResponse** + +### Authorization + +[bearerAuth](README.md#bearerAuth) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Import users operation successful. | - | +**400** | Invalid request. | - | +**401** | Unauthorized access. | - | +**403** | Forbidden access. | - | +**500** | Unexpected error | - | + +[[Back to top]](#) [[Back to API list]](README.md#documentation-for-api-endpoints) [[Back to Model list]](README.md#documentation-for-models) [[Back to README]](README.md) + +# **login** +> void login(loginRequest) + + Version: 9.0.0.cl or later Creates a login session for a ThoughtSpot user with Basic authentication. In Basic authentication method, REST clients log in to ThoughtSpot using `username` and `password` attributes. On a multi-tenant cluster with Orgs, users can pass the ID of the Org in the API request to log in to a specific Org context. **Note**: If Multi-Factor Authentication (MFA) is enabled on your instance, the API login request with basic authentication (`username` and `password` ) returns an error. Contact ThoughtSpot Support for assistance. A successful login returns a session cookie that can be used in your subsequent API requests. + +### Example + + +```typescript +import { createBearerAuthenticationConfig, ThoughtSpotRestApi, LoginRequest } from '@thoughtspot/rest-api-sdk'; + +const configuration = createBearerAuthenticationConfig("CLUSTER_SERVER_URL", { + username: "YOUR_USERNAME", + password: "YOUR_PASSWORD", +}); +const apiInstance = new ThoughtSpotRestApi(configuration); + +apiInstance.login( + // LoginRequest + { + username: "username_example", + password: "password_example", + org_identifier: "org_identifier_example", + remember_me: false, + } +).then((data:any) => { + console.log('API called successfully. Returned data: ' + data); +}).catch((error:any) => console.error(error)); + + +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **loginRequest** | **LoginRequest**| | + + +### Return type + +**void** + +### Authorization + +[bearerAuth](README.md#bearerAuth) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**204** | User login successful. | - | +**400** | Invalid request. | - | +**401** | Unauthorized access. | - | +**403** | Forbidden access. | - | +**500** | Unexpected error | - | + +[[Back to top]](#) [[Back to API list]](README.md#documentation-for-api-endpoints) [[Back to Model list]](README.md#documentation-for-models) [[Back to README]](README.md) + +# **logout** +> void logout() + + Version: 9.0.0.cl or later Logs out a user from their current session. + +### Example + + +```typescript +import { createBearerAuthenticationConfig, ThoughtSpotRestApi, LogoutRequest } from '@thoughtspot/rest-api-sdk'; + +const configuration = createBearerAuthenticationConfig("CLUSTER_SERVER_URL", { + username: "YOUR_USERNAME", + password: "YOUR_PASSWORD", +}); +const apiInstance = new ThoughtSpotRestApi(configuration); + +apiInstance.logout().then((data:any) => { + console.log('API called successfully. Returned data: ' + JSON.stringify(data)); +}).catch((error:any) => console.error(error)); + + +``` + + +### Parameters +This endpoint does not need any parameter. + + +### Return type + +**void** + +### Authorization + +[bearerAuth](README.md#bearerAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**204** | User logout successful. | - | +**400** | Invalid request. | - | +**401** | Unauthorized access. | - | +**403** | Forbidden access. | - | +**500** | Unexpected error | - | + +[[Back to top]](#) [[Back to API list]](README.md#documentation-for-api-endpoints) [[Back to Model list]](README.md#documentation-for-models) [[Back to README]](README.md) + +# **manageObjectPrivilege** +> void manageObjectPrivilege(manageObjectPrivilegeRequest) + + Version: 26.3.0.cl or later This API allows the addition or deletion of object level privileges for a set of users and groups, on a set of metadata objects. It provides users to access certain features based on privilege based access control. #### Usage guidelines - Specify the `operation`. The supported operations are: `ADD`, `REMOVE`. - Specify the type of the objects on which the object privileges are being provided in `metadata_type`. Only `LOGICAL_TABLE` metadata type is supported for now. It may be extended for other metadata types in future. - Specify the list of object privilege types in the `object_privilege_types` array. The supported object privilege types are: `SPOTTER_COACHING_PRIVILEGE`. - Specify the identifiers (either GUID or name) for the metadata objects in the `metadata_identifiers` array. - Specify the `type` (`USER` or `USER_GROUP`) and `identifier` (either GUID or name) of the principals to which you want to apply the given operation and given object privileges in the `principals` array. - Ensure using correct Authorization Bearer Token corresponding to specific user & org. #### Example request ```json { \"operation\": \"operation-type\", \"metadata_type\": \"metadata-type\", \"object_privilege_types\": [\"privilege-type-1\", \"privilege-type-2\"], \"metadata_identifiers\": [\"metadata-guid-or-name-1\", \"metadata-guid-or-name-1\"], \"principals\": [ { \"type\": \"type-1\", \"identifier\": \"principal-guid-or-name-1\" }, { \"type\": \"type-2\", \"identifier\": \"principal-guid-or-name-2\" } ] } ``` > ###### Note: > * Only admin users, users with edit access and users with coaching privilege on a given data-model can add or remove principals related to SPOTTER_COACHING_PRIVILEGE + +### Example + + +```typescript +import { createBearerAuthenticationConfig, ThoughtSpotRestApi, ManageObjectPrivilegeRequest } from '@thoughtspot/rest-api-sdk'; + +const configuration = createBearerAuthenticationConfig("CLUSTER_SERVER_URL", { + username: "YOUR_USERNAME", + password: "YOUR_PASSWORD", +}); +const apiInstance = new ThoughtSpotRestApi(configuration); + +apiInstance.manageObjectPrivilege( + // ManageObjectPrivilegeRequest + { + operation: "ADD", + metadata_type: "LOGICAL_TABLE", + object_privilege_types: [ + "SPOTTER_COACHING_PRIVILEGE", + ], + metadata_identifiers: [ + "metadata_identifiers_example", + ], + principals: [ + { + identifier: "identifier_example", + type: "USER", + }, + ], + } +).then((data:any) => { + console.log('API called successfully. Returned data: ' + data); +}).catch((error:any) => console.error(error)); + + +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **manageObjectPrivilegeRequest** | **ManageObjectPrivilegeRequest**| | + + +### Return type + +**void** + +### Authorization + +[bearerAuth](README.md#bearerAuth) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**204** | Object privileges added/removed successfully | - | +**400** | Invalid request | - | +**401** | Unauthorized access | - | +**403** | Forbidden access | - | +**500** | Unexpected error | - | + +[[Back to top]](#) [[Back to API list]](README.md#documentation-for-api-endpoints) [[Back to Model list]](README.md#documentation-for-models) [[Back to README]](README.md) + +# **parameterizeMetadata** +> void parameterizeMetadata(parameterizeMetadataRequest) + + Parameterize fields in metadata objects. Version: 10.9.0.cl or later **Note:** This API endpoint is deprecated and will be removed from ThoughtSpot in a future release. Use [POST /api/rest/2.0/metadata/parameterize-fields](/api/rest/2.0/metadata/parameterize-fields) instead. Allows parameterizing fields in metadata objects in ThoughtSpot. Requires appropriate permissions to modify the metadata object. The API endpoint allows parameterizing the following types of metadata objects: * Logical Tables * Connections * Connection Configs For a Logical Table the field type must be `ATTRIBUTE` and field name can be one of: * databaseName * schemaName * tableName For a Connection or Connection Config, the field type is always `CONNECTION_PROPERTY`. In this case, field_name specifies the exact property of the Connection or Connection Config that needs to be parameterized. For Connection Config, the only supported field name is: * impersonate_user + +### Example + + +```typescript +import { createBearerAuthenticationConfig, ThoughtSpotRestApi, ParameterizeMetadataRequest } from '@thoughtspot/rest-api-sdk'; + +const configuration = createBearerAuthenticationConfig("CLUSTER_SERVER_URL", { + username: "YOUR_USERNAME", + password: "YOUR_PASSWORD", +}); +const apiInstance = new ThoughtSpotRestApi(configuration); + +apiInstance.parameterizeMetadata( + // ParameterizeMetadataRequest + { + metadata_type: "LOGICAL_TABLE", + metadata_identifier: "metadata_identifier_example", + field_type: "ATTRIBUTE", + field_name: "field_name_example", + variable_identifier: "variable_identifier_example", + } +).then((data:any) => { + console.log('API called successfully. Returned data: ' + data); +}).catch((error:any) => console.error(error)); + + +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **parameterizeMetadataRequest** | **ParameterizeMetadataRequest**| | + + +### Return type + +**void** + +### Authorization + +[bearerAuth](README.md#bearerAuth) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**204** | Parameterize successful. | - | +**400** | Invalid request. | - | +**401** | Unauthorized access. | - | +**403** | Forbidden access. | - | +**500** | Unexpected error | - | + +[[Back to top]](#) [[Back to API list]](README.md#documentation-for-api-endpoints) [[Back to Model list]](README.md#documentation-for-models) [[Back to README]](README.md) + +# **parameterizeMetadataFields** +> void parameterizeMetadataFields(parameterizeMetadataFieldsRequest) + + Parameterize multiple fields of metadata objects. For example [schemaName, databaseName] for LOGICAL_TABLE. Version: 26.5.0.cl or later Allows parameterizing multiple fields of metadata objects in ThoughtSpot. For example, you can parameterize [schemaName, databaseName] for LOGICAL_TABLE. Requires appropriate permissions to modify the metadata object. The API endpoint allows parameterizing the following types of metadata objects: * Logical Tables * Connections * Connection Configs For a Logical Table, the field type must be `ATTRIBUTE` and field names can include: * databaseName * schemaName * tableName For a Connection or Connection Config, the field type is always `CONNECTION_PROPERTY`. In this case, field_names specifies the exact properties of the Connection or Connection Config that need to be parameterized. For Connection Config, supported field names include: * impersonate_user You can parameterize multiple fields at once by providing an array of field names. + +### Example + + +```typescript +import { createBearerAuthenticationConfig, ThoughtSpotRestApi, ParameterizeMetadataFieldsRequest } from '@thoughtspot/rest-api-sdk'; + +const configuration = createBearerAuthenticationConfig("CLUSTER_SERVER_URL", { + username: "YOUR_USERNAME", + password: "YOUR_PASSWORD", +}); +const apiInstance = new ThoughtSpotRestApi(configuration); + +apiInstance.parameterizeMetadataFields( + // ParameterizeMetadataFieldsRequest + { + metadata_type: "LOGICAL_TABLE", + metadata_identifier: "metadata_identifier_example", + field_type: "ATTRIBUTE", + field_names: [ + "field_names_example", + ], + variable_identifier: "variable_identifier_example", + } +).then((data:any) => { + console.log('API called successfully. Returned data: ' + data); +}).catch((error:any) => console.error(error)); + + +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **parameterizeMetadataFieldsRequest** | **ParameterizeMetadataFieldsRequest**| | + + +### Return type + +**void** + +### Authorization + +[bearerAuth](README.md#bearerAuth) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**204** | Parameterize successful. | - | +**400** | Invalid request. | - | +**401** | Unauthorized access. | - | +**403** | Forbidden access. | - | +**500** | Unexpected error | - | + +[[Back to top]](#) [[Back to API list]](README.md#documentation-for-api-endpoints) [[Back to Model list]](README.md#documentation-for-models) [[Back to README]](README.md) + +# **publishMetadata** +> void publishMetadata(publishMetadataRequest) + + Version: 26.5.0.cl or later Allows publishing metadata objects across organizations in ThoughtSpot. Requires ADMINISTRATION role and TENANT scope. The API endpoint allows publishing the following types of metadata objects: * Liveboards * Answers * Logical Tables This API will essentially share the objects along with it\'s dependencies to the org admins of the orgs to which it is being published. + +### Example + + +```typescript +import { createBearerAuthenticationConfig, ThoughtSpotRestApi, PublishMetadataRequest } from '@thoughtspot/rest-api-sdk'; + +const configuration = createBearerAuthenticationConfig("CLUSTER_SERVER_URL", { + username: "YOUR_USERNAME", + password: "YOUR_PASSWORD", +}); +const apiInstance = new ThoughtSpotRestApi(configuration); + +apiInstance.publishMetadata( + // PublishMetadataRequest + { + metadata: [ + { + identifier: "identifier_example", + type: "LIVEBOARD", + }, + ], + org_identifiers: [ + "org_identifiers_example", + ], + skip_validation: true, + } +).then((data:any) => { + console.log('API called successfully. Returned data: ' + data); +}).catch((error:any) => console.error(error)); + + +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **publishMetadataRequest** | **PublishMetadataRequest**| | + + +### Return type + +**void** + +### Authorization + +[bearerAuth](README.md#bearerAuth) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**204** | Publishing metadata objects is successful. | - | +**400** | Invalid request. | - | +**401** | Unauthorized access. | - | +**403** | Forbidden access. | - | +**500** | Unexpected error | - | + +[[Back to top]](#) [[Back to API list]](README.md#documentation-for-api-endpoints) [[Back to Model list]](README.md#documentation-for-models) [[Back to README]](README.md) + +# **putVariableValues** +> void putVariableValues(putVariableValuesRequest) + + Update values for a variable Version: 26.4.0.cl or later Allows updating values for a specific variable in ThoughtSpot. Requires ADMINISTRATION role. The CAN_MANAGE_VARIABLES permission allows you to manage Formula Variables in the current organization scope. The API endpoint allows: * Adding new values to the variable * Replacing existing values * Deleting values from the variable * Resetting all values When updating variable values, you need to specify: * The variable identifier (ID or name) * The values to add/replace/remove * The operation to perform (ADD, REPLACE, REMOVE, RESET) Behaviour based on operation type: * ADD - Adds values to the variable if this is a list type variable, else same as replace. * REPLACE - Replaces all values of a given set of constraints with the current set of values. * REMOVE - Removes any values which match the set of conditions of the variables if this is a list type variable, else clears value. * RESET - Removes all constraints for the given variable, scope is ignored + +### Example + + +```typescript +import { createBearerAuthenticationConfig, ThoughtSpotRestApi, PutVariableValuesRequest } from '@thoughtspot/rest-api-sdk'; + +const configuration = createBearerAuthenticationConfig("CLUSTER_SERVER_URL", { + username: "YOUR_USERNAME", + password: "YOUR_PASSWORD", +}); +const apiInstance = new ThoughtSpotRestApi(configuration); + +apiInstance.putVariableValues( + // string | Unique ID or name of the variable + "identifier_example" , + // PutVariableValuesRequest + { + operation: "ADD", + variable_assignment: [ + { + assigned_values: [ + "assigned_values_example", + ], + org_identifier: "org_identifier_example", + principal_type: "USER", + principal_identifier: "principal_identifier_example", + model_identifier: "model_identifier_example", + priority: 1, + }, + ], + } +).then((data:any) => { + console.log('API called successfully. Returned data: ' + data); +}).catch((error:any) => console.error(error)); + + +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **putVariableValuesRequest** | **PutVariableValuesRequest**| | + **identifier** | [**string**] | Unique ID or name of the variable | defaults to undefined + + +### Return type + +**void** + +### Authorization + +[bearerAuth](README.md#bearerAuth) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**204** | Variable values updated successfully. | - | +**400** | Invalid request. | - | +**401** | Unauthorized access. | - | +**403** | Forbidden access. | - | +**500** | Unexpected error | - | + +[[Back to top]](#) [[Back to API list]](README.md#documentation-for-api-endpoints) [[Back to Model list]](README.md#documentation-for-models) [[Back to README]](README.md) + +# **queryGetDecomposedQuery** +> EurekaDecomposeQueryResponse queryGetDecomposedQuery(queryGetDecomposedQueryRequest) + + Version: 10.7.0.cl or later **Deprecated** — Use `getRelevantQuestions` instead (available from 10.13.0.cl). Breaks down a topical or goal-oriented natural language question into smaller, actionable analytical sub-questions, each mapped to a relevant data source for independent execution. Requires `CAN_USE_SPOTTER` privilege and at least view-level access to the referenced metadata objects. #### Usage guidelines The request accepts the following parameters: - `nlsRequest`: contains the user `query` to decompose, along with optional `instructions` and `bypassCache` flag - `worksheetIds`: list of data source identifiers to scope the decomposition - `answerIds`: list of Answer GUIDs whose data guides the response - `liveboardIds`: list of Liveboard GUIDs whose data guides the response - `conversationId`: an existing conversation session ID for context continuity - `content`: supplementary text or CSV data to improve response quality - `maxDecomposedQueries`: maximum number of sub-questions to return (default: `5`) If the request is successful, the API returns a `decomposedQueryResponse` containing a list of `decomposedQueries`, each with: - `query`: the generated analytical sub-question - `worksheetId`: the unique ID of the data source the question targets - `worksheetName`: the display name of the corresponding data source #### Error responses | Code | Description | |------|---------------------------------------------------------------------------------------------------------------------------------------| | 401 | Unauthorized — authentication token is missing, expired, or invalid. | | 403 | Forbidden — the authenticated user does not have `CAN_USE_SPOTTER` privilege or lacks view access to the referenced metadata objects. | > ###### Note: > * This endpoint is deprecated since 10.13.0.cl. Use `getRelevantQuestions` for new integrations. > * This endpoint is currently in Beta. Breaking changes may be introduced before the endpoint is made Generally Available. > * This endpoint requires Spotter — please contact ThoughtSpot support to enable Spotter on your cluster. + +### Example + + +```typescript +import { createBearerAuthenticationConfig, ThoughtSpotRestApi, QueryGetDecomposedQueryRequest } from '@thoughtspot/rest-api-sdk'; + +const configuration = createBearerAuthenticationConfig("CLUSTER_SERVER_URL", { + username: "YOUR_USERNAME", + password: "YOUR_PASSWORD", +}); +const apiInstance = new ThoughtSpotRestApi(configuration); + +apiInstance.queryGetDecomposedQuery( + // QueryGetDecomposedQueryRequest + { + answerIds: [ + "answerIds_example", + ], + content: [ + "content_example", + ], + conversationId: "conversationId_example", + liveboardIds: [ + "liveboardIds_example", + ], + maxDecomposedQueries: 1, + nlsRequest: null, + worksheetIds: [ + "worksheetIds_example", + ], + } +).then((data:any) => { + console.log('API called successfully. Returned data: ' + data); +}).catch((error:any) => console.error(error)); + + +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **queryGetDecomposedQueryRequest** | **QueryGetDecomposedQueryRequest**| | + + +### Return type + +**EurekaDecomposeQueryResponse** + +### Authorization + +[bearerAuth](README.md#bearerAuth) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Common successful response | - | +**201** | Common error response | - | +**400** | Operation failed | - | +**401** | Unauthorized access. | - | +**403** | Forbidden access. | - | +**500** | Operation failed | - | + +[[Back to top]](#) [[Back to API list]](README.md#documentation-for-api-endpoints) [[Back to Model list]](README.md#documentation-for-models) [[Back to README]](README.md) + +# **resetUserPassword** +> void resetUserPassword(resetUserPasswordRequest) + + Version: 9.0.0.cl or later Resets the password of a user account. Administrators can reset password on behalf of a user. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `USER_ADMINISTRATION` (**Can manage users**) privilege is required. + +### Example + + +```typescript +import { createBearerAuthenticationConfig, ThoughtSpotRestApi, ResetUserPasswordRequest } from '@thoughtspot/rest-api-sdk'; + +const configuration = createBearerAuthenticationConfig("CLUSTER_SERVER_URL", { + username: "YOUR_USERNAME", + password: "YOUR_PASSWORD", +}); +const apiInstance = new ThoughtSpotRestApi(configuration); + +apiInstance.resetUserPassword( + // ResetUserPasswordRequest + { + new_password: "new_password_example", + user_identifier: "user_identifier_example", + } +).then((data:any) => { + console.log('API called successfully. Returned data: ' + data); +}).catch((error:any) => console.error(error)); + + +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **resetUserPasswordRequest** | **ResetUserPasswordRequest**| | + + +### Return type + +**void** + +### Authorization + +[bearerAuth](README.md#bearerAuth) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**204** | User password reset operation successful. | - | +**400** | Invalid request. | - | +**401** | Unauthorized access. | - | +**403** | Forbidden access. | - | +**500** | Unexpected error | - | + +[[Back to top]](#) [[Back to API list]](README.md#documentation-for-api-endpoints) [[Back to Model list]](README.md#documentation-for-models) [[Back to README]](README.md) + +# **revertCommit** +> RevertResponse revertCommit(revertCommitRequest) + + Version: 9.2.0.cl or later Reverts TML objects to a previous commit specified in the API request. Requires at least edit access to objects. In the API request, specify the `commit_id`. If the branch name is not specified in the request, the API will consider the default branch configured on your instance. By default, the API reverts all objects. If the revert operation fails for one of the objects provided in the commit, the API returns an error and does not revert any object. For more information, see [Git integration documentation](https://developers.thoughtspot.com/docs/git-integration). + +### Example + + +```typescript +import { createBearerAuthenticationConfig, ThoughtSpotRestApi, RevertCommitRequest } from '@thoughtspot/rest-api-sdk'; + +const configuration = createBearerAuthenticationConfig("CLUSTER_SERVER_URL", { + username: "YOUR_USERNAME", + password: "YOUR_PASSWORD", +}); +const apiInstance = new ThoughtSpotRestApi(configuration); + +apiInstance.revertCommit( + // string | Commit id to which the object should be reverted + "commit_id_example" , + // RevertCommitRequest + { + metadata: [ + { + identifier: "identifier_example", + type: "LIVEBOARD", + }, + ], + branch_name: "branch_name_example", + revert_policy: "ALL_OR_NONE", + } +).then((data:any) => { + console.log('API called successfully. Returned data: ' + data); +}).catch((error:any) => console.error(error)); + + +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **revertCommitRequest** | **RevertCommitRequest**| | + **commitId** | [**string**] | Commit id to which the object should be reverted | defaults to undefined + + +### Return type + +**RevertResponse** + +### Authorization + +[bearerAuth](README.md#bearerAuth) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Reverted the object to the commit point specified | - | +**400** | Invalid request. | - | +**401** | Unauthorized access. | - | +**403** | Forbidden access. | - | +**500** | Unexpected error | - | + +[[Back to top]](#) [[Back to API list]](README.md#documentation-for-api-endpoints) [[Back to Model list]](README.md#documentation-for-models) [[Back to README]](README.md) + +# **revokeRefreshTokens** +> RevokeRefreshTokensResponse revokeRefreshTokens(revokeRefreshTokensRequest) + + Version: 26.2.0.cl or later Revokes OAuth refresh tokens for users who no longer require access to a data warehouse connection. When a token is revoked, the affected user\'s session for that connection is terminated, and they must re-authenticate to regain access. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) or `DATAMANAGEMENT` (**Can manage data**) privileges. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on the ThoughtSpot instance, users with `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) privilege can also make API requests to revoke tokens for connection users. #### Usage guidelines You can specify different combinations of identifiers to control which refresh tokens are revoked. - **connection_identifier**: Revokes refresh tokens for all users of the connection, except the connection author. - **connection_identifier** and **user_identifiers**: Revokes refresh tokens only for the users specified in the request. If the name or ID of the connection author is included in the request, their token will also be revoked. - **connection_identifier** and **configuration_identifiers**: Revokes refresh tokens for all users on the specified configurations, except the configuration author. - **connection_identifier**, **configuration_identifiers**, and **user_identifiers**: Revokes refresh tokens for the specified users on the specified configurations. - **connection_identifier** and **org_identifiers**: Revokes refresh tokens for the specified Orgs. Applicable only for published connections. - **connection_identifier**, **org_identifiers**, and **user_identifiers**: Revokes refresh tokens for the specified users in the specified Orgs. Applicable only for published connections. **NOTE**: The `org_identifiers` parameter is only applicable for published connections. Using this parameter for unpublished connections will result in an error. Ensure that the connections are published before making the API request. + +### Example + + +```typescript +import { createBearerAuthenticationConfig, ThoughtSpotRestApi, RevokeRefreshTokensRequest } from '@thoughtspot/rest-api-sdk'; + +const configuration = createBearerAuthenticationConfig("CLUSTER_SERVER_URL", { + username: "YOUR_USERNAME", + password: "YOUR_PASSWORD", +}); +const apiInstance = new ThoughtSpotRestApi(configuration); + +apiInstance.revokeRefreshTokens( + // string | Unique ID or name of the connection whose refresh tokens need to be revoked. All the users associated with the connection will have their refresh tokens revoked except the author. + "connection_identifier_example" , + // RevokeRefreshTokensRequest + { + configuration_identifiers: [ + "configuration_identifiers_example", + ], + user_identifiers: [ + "user_identifiers_example", + ], + org_identifiers: [ + "org_identifiers_example", + ], + } +).then((data:any) => { + console.log('API called successfully. Returned data: ' + data); +}).catch((error:any) => console.error(error)); + + +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **revokeRefreshTokensRequest** | **RevokeRefreshTokensRequest**| | + **connectionIdentifier** | [**string**] | Unique ID or name of the connection whose refresh tokens need to be revoked. All the users associated with the connection will have their refresh tokens revoked except the author. | defaults to undefined + + +### Return type + +**RevokeRefreshTokensResponse** + +### Authorization + +[bearerAuth](README.md#bearerAuth) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Token(s) successfully revoked. | - | +**400** | Invalid request. | - | +**401** | Unauthorized access. | - | +**403** | Forbidden access. | - | +**404** | Object not found | - | +**409** | Conflict | - | +**500** | Unexpected error | - | + +[[Back to top]](#) [[Back to API list]](README.md#documentation-for-api-endpoints) [[Back to Model list]](README.md#documentation-for-models) [[Back to README]](README.md) + +# **revokeToken** +> void revokeToken(revokeTokenRequest) + + Version: 9.0.0.cl or later Revokes the authentication token issued for current user session. The token of your current session expires when you make a call to the `/api/rest/2.0/auth/token/revoke` endpoint. the users will not be able to access ThoughtSpot objects until a new token is obtained. To restart your session, request for a new token from ThoughtSpot. See [Get Full Access Token](#/http/api-endpoints/authentication/get-full-access-token). + +### Example + + +```typescript +import { createBearerAuthenticationConfig, ThoughtSpotRestApi, RevokeTokenRequest } from '@thoughtspot/rest-api-sdk'; + +const configuration = createBearerAuthenticationConfig("CLUSTER_SERVER_URL", { + username: "YOUR_USERNAME", + password: "YOUR_PASSWORD", +}); +const apiInstance = new ThoughtSpotRestApi(configuration); + +apiInstance.revokeToken( + // RevokeTokenRequest + { + user_identifier: "user_identifier_example", + token: "token_example", + } +).then((data:any) => { + console.log('API called successfully. Returned data: ' + data); +}).catch((error:any) => console.error(error)); + + +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **revokeTokenRequest** | **RevokeTokenRequest**| | + + +### Return type + +**void** + +### Authorization + +[bearerAuth](README.md#bearerAuth) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**204** | Token successfully revoked. | - | +**400** | Invalid request. | - | +**401** | Unauthorized access. | - | +**403** | Forbidden access. | - | +**500** | Unexpected error | - | + +[[Back to top]](#) [[Back to API list]](README.md#documentation-for-api-endpoints) [[Back to Model list]](README.md#documentation-for-models) [[Back to README]](README.md) + +# **searchAuthSettings** +> SearchAuthSettingsResponse searchAuthSettings(searchAuthSettingsRequest) + + Version: 26.6.0.cl or later Returns the authentication configuration for the specified auth type at cluster and org level. Currently supports `TRUSTED_AUTH`. #### Required privileges Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) or `CONTROL_TRUSTED_AUTH` (**Can Enable or Disable Trusted Authentication**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled, the `CONTROL_TRUSTED_AUTH` privilege is required. #### Usage guidelines Use `scope` to control which level of settings are returned: - `CLUSTER` — Returns cluster-level authentication status and access tokens. Accessible only from the Primary Org. - `ORG` — Returns org-level authentication status and access tokens for the current Org. Requires the per-Org authentication feature to be enabled on your instance. - If `scope` is omitted, both cluster and org-level settings are returned based on the caller\'s org context and feature availability. The `access_tokens` array in `cluster_preferences` or `org_preferences` is omitted when no token is configured at that level. **Note**: Access tokens returned in the response are sensitive credentials. Treat them with the same care as passwords. + +### Example + + +```typescript +import { createBearerAuthenticationConfig, ThoughtSpotRestApi, SearchAuthSettingsRequest } from '@thoughtspot/rest-api-sdk'; + +const configuration = createBearerAuthenticationConfig("CLUSTER_SERVER_URL", { + username: "YOUR_USERNAME", + password: "YOUR_PASSWORD", +}); +const apiInstance = new ThoughtSpotRestApi(configuration); + +apiInstance.searchAuthSettings( + // SearchAuthSettingsRequest + { + auth_type: "TRUSTED_AUTH", + scope: "CLUSTER", + } +).then((data:any) => { + console.log('API called successfully. Returned data: ' + data); +}).catch((error:any) => console.error(error)); + + +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **searchAuthSettingsRequest** | **SearchAuthSettingsRequest**| | + + +### Return type + +**SearchAuthSettingsResponse** + +### Authorization + +[bearerAuth](README.md#bearerAuth) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Authentication settings retrieved successfully. | - | +**400** | Invalid request. | - | +**401** | Unauthorized access. | - | +**403** | Forbidden access. | - | +**500** | Unexpected error | - | + +[[Back to top]](#) [[Back to API list]](README.md#documentation-for-api-endpoints) [[Back to Model list]](README.md#documentation-for-models) [[Back to README]](README.md) + +# **searchCalendars** +> Array searchCalendars(searchCalendarsRequest) + + Version: 10.12.0.cl or later Gets a list of [custom calendars](https://docs.thoughtspot.com/cloud/latest/connections-cust-cal). Requires `DATAMANAGEMENT` (**Can manage data**) or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your ThoughtSpot instance, the `CAN_MANAGE_CUSTOM_CALENDAR` (**Can manage custom calendars**) privilege is required. #### Usage guidelines By default, the API returns a list of custom calendars for all connection objects. To retrieve custom calendar details for a particular connection, specify the connection ID. You can also use other search parameters such as `name_pattern` and `sort_options` as search filters. The `name_pattern` parameter filters and returns only those objects that match the specified pattern. Use `%` as a wildcard for pattern matching. + +### Example + + +```typescript +import { createBearerAuthenticationConfig, ThoughtSpotRestApi, SearchCalendarsRequest } from '@thoughtspot/rest-api-sdk'; + +const configuration = createBearerAuthenticationConfig("CLUSTER_SERVER_URL", { + username: "YOUR_USERNAME", + password: "YOUR_PASSWORD", +}); +const apiInstance = new ThoughtSpotRestApi(configuration); + +apiInstance.searchCalendars( + // SearchCalendarsRequest + { + connection_identifier: "connection_identifier_example", + name_pattern: "name_pattern_example", + record_offset: 0, + record_size: 10, + sort_options: null, + } +).then((data:any) => { + console.log('API called successfully. Returned data: ' + data); +}).catch((error:any) => console.error(error)); + + +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **searchCalendarsRequest** | **SearchCalendarsRequest**| | + + +### Return type + +**Array** + +### Authorization + +[bearerAuth](README.md#bearerAuth) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Custom calendar fetched successfully. | - | +**400** | Invalid request. | - | +**401** | Unauthorized access. | - | +**403** | Forbidden access. | - | +**500** | Unexpected error | - | + +[[Back to top]](#) [[Back to API list]](README.md#documentation-for-api-endpoints) [[Back to Model list]](README.md#documentation-for-models) [[Back to README]](README.md) + +# **searchChannelHistory** +> SearchChannelHistoryResponse searchChannelHistory(searchChannelHistoryRequest) + + Version: 26.4.0.cl or later Searches delivery history for communication channels such as webhooks. Returns channel-level delivery status for each job execution record. Use this to monitor channel health and delivery success rates across events. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) or `DEVELOPER` (**Has developer privilege**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, users with `CAN_MANAGE_WEBHOOKS` (**Can manage webhooks**) privilege are also authorized to perform this action. **NOTE**: When `channel_type` is `WEBHOOK`, the following constraints apply: - `job_ids`, `channel_identifiers`, and `events` each accept at most one element. - When `job_ids` is provided, it is used as the sole lookup key and other filter fields are ignored. - When `job_ids` is not provided, `channel_identifiers` and `events` are both required, each containing exactly one element. - Records older than the configured retention period are not returned. - Use `start_epoch_time_in_millis` and/or `end_epoch_time_in_millis` to narrow results to a specific time window. + +### Example + + +```typescript +import { createBearerAuthenticationConfig, ThoughtSpotRestApi, SearchChannelHistoryRequest } from '@thoughtspot/rest-api-sdk'; + +const configuration = createBearerAuthenticationConfig("CLUSTER_SERVER_URL", { + username: "YOUR_USERNAME", + password: "YOUR_PASSWORD", +}); +const apiInstance = new ThoughtSpotRestApi(configuration); + +apiInstance.searchChannelHistory( + // SearchChannelHistoryRequest + { + channel_type: "WEBHOOK", + job_ids: [ + "job_ids_example", + ], + channel_identifiers: [ + "channel_identifiers_example", + ], + channel_status: "PENDING", + events: [ + { + type: "LIVEBOARD_SCHEDULE", + identifier: "identifier_example", + }, + ], + start_epoch_time_in_millis: 3.14, + } +).then((data:any) => { + console.log('API called successfully. Returned data: ' + data); +}).catch((error:any) => console.error(error)); + + +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **searchChannelHistoryRequest** | **SearchChannelHistoryRequest**| | + + +### Return type + +**SearchChannelHistoryResponse** + +### Authorization + +[bearerAuth](README.md#bearerAuth) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Channel status logs retrieved successfully. | - | +**400** | Invalid request. | - | +**401** | Unauthorized access. | - | +**403** | Forbidden access. | - | +**500** | Unexpected error | - | + +[[Back to top]](#) [[Back to API list]](README.md#documentation-for-api-endpoints) [[Back to Model list]](README.md#documentation-for-models) [[Back to README]](README.md) + +# **searchCollections** +> CollectionSearchResponse searchCollections(searchCollectionsRequest) + + Version: 26.4.0.cl or later Gets a list of collections available in ThoughtSpot. To get details of a specific collection, specify the collection GUID or name. You can also filter the API response based on the collection name pattern, author, and other criteria. #### Search options * **name_pattern**: Use \'%\' as a wildcard character to match collection names * **collection_identifiers**: Search for specific collections by their GUIDs or names * **include_metadata**: When set to `true`, includes the metadata objects within each collection in the response **NOTE**: If the API returns an empty list, consider increasing the value of the `record_size` parameter. To search across all available collections, set `record_size` to `-1`. + +### Example + + +```typescript +import { createBearerAuthenticationConfig, ThoughtSpotRestApi, SearchCollectionsRequest } from '@thoughtspot/rest-api-sdk'; + +const configuration = createBearerAuthenticationConfig("CLUSTER_SERVER_URL", { + username: "YOUR_USERNAME", + password: "YOUR_PASSWORD", +}); +const apiInstance = new ThoughtSpotRestApi(configuration); + +apiInstance.searchCollections( + // SearchCollectionsRequest + { + name_pattern: "name_pattern_example", + record_offset: 0, + record_size: 10, + collection_identifiers: [ + "collection_identifiers_example", + ], + created_by_user_identifiers: [ + "created_by_user_identifiers_example", + ], + include_metadata: false, + sort_options: null, + } +).then((data:any) => { + console.log('API called successfully. Returned data: ' + data); +}).catch((error:any) => console.error(error)); + + +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **searchCollectionsRequest** | **SearchCollectionsRequest**| | + + +### Return type + +**CollectionSearchResponse** + +### Authorization + +[bearerAuth](README.md#bearerAuth) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Successfully retrieved list of collections | - | +**400** | Invalid request. | - | +**401** | Unauthorized access. | - | +**403** | Forbidden access. | - | +**500** | Unexpected error | - | + +[[Back to top]](#) [[Back to API list]](README.md#documentation-for-api-endpoints) [[Back to Model list]](README.md#documentation-for-models) [[Back to README]](README.md) + +# **searchCommits** +> Array searchCommits(searchCommitsRequest) + + Version: 9.2.0.cl or later Gets a list of commits for a given metadata object. Requires `DATAMANAGEMENT` (**Can manage data**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance on your instance, the `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` (**Can manage data models**) privilege and edit access to the metadata objects. + +### Example + + +```typescript +import { createBearerAuthenticationConfig, ThoughtSpotRestApi, SearchCommitsRequest } from '@thoughtspot/rest-api-sdk'; + +const configuration = createBearerAuthenticationConfig("CLUSTER_SERVER_URL", { + username: "YOUR_USERNAME", + password: "YOUR_PASSWORD", +}); +const apiInstance = new ThoughtSpotRestApi(configuration); + +apiInstance.searchCommits( + // SearchCommitsRequest + { + metadata_identifier: "metadata_identifier_example", + metadata_type: "LIVEBOARD", + branch_name: "branch_name_example", + record_offset: 1, + record_size: 1, + } +).then((data:any) => { + console.log('API called successfully. Returned data: ' + data); +}).catch((error:any) => console.error(error)); + + +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **searchCommitsRequest** | **SearchCommitsRequest**| | + + +### Return type + +**Array** + +### Authorization + +[bearerAuth](README.md#bearerAuth) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Commit history of the metadata object | - | +**400** | Invalid request. | - | +**401** | Unauthorized access. | - | +**403** | Forbidden access. | - | +**500** | Unexpected error | - | + +[[Back to top]](#) [[Back to API list]](README.md#documentation-for-api-endpoints) [[Back to Model list]](README.md#documentation-for-models) [[Back to README]](README.md) + +# **searchCommunicationChannelPreferences** +> CommunicationChannelPreferencesResponse searchCommunicationChannelPreferences(searchCommunicationChannelPreferencesRequest) + + Version: 10.14.0.cl or later Fetch communication channel preferences. - Use `cluster_preferences` to fetch the default preferences for your ThoughtSpot application instance. - If your instance has [Orgs](https://docs.thoughtspot.com/cloud/latest/orgs-overview), use `org_preferences` to fetch any Org-specific preferences that override the defaults. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) or `DEVELOPER` (**Has developer privilege**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, users with `APPLICATION_ADMINISTRATION` (**Can manage application settings**) privilege are also authorized to perform this action. + +### Example + + +```typescript +import { createBearerAuthenticationConfig, ThoughtSpotRestApi, SearchCommunicationChannelPreferencesRequest } from '@thoughtspot/rest-api-sdk'; + +const configuration = createBearerAuthenticationConfig("CLUSTER_SERVER_URL", { + username: "YOUR_USERNAME", + password: "YOUR_PASSWORD", +}); +const apiInstance = new ThoughtSpotRestApi(configuration); + +apiInstance.searchCommunicationChannelPreferences( + // SearchCommunicationChannelPreferencesRequest + { + cluster_preferences: [ + "LIVEBOARD_SCHEDULE", + ], + org_preferences: [ + { + org_identifier: "org_identifier_example", + event_types: [ + "LIVEBOARD_SCHEDULE", + ], + }, + ], + } +).then((data:any) => { + console.log('API called successfully. Returned data: ' + data); +}).catch((error:any) => console.error(error)); + + +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **searchCommunicationChannelPreferencesRequest** | **SearchCommunicationChannelPreferencesRequest**| | + + +### Return type + +**CommunicationChannelPreferencesResponse** + +### Authorization + +[bearerAuth](README.md#bearerAuth) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Communication channel preferences retrieved successfully. | - | +**400** | Invalid request. | - | +**401** | Unauthorized access. | - | +**403** | Forbidden access. | - | +**500** | Unexpected error | - | + +[[Back to top]](#) [[Back to API list]](README.md#documentation-for-api-endpoints) [[Back to Model list]](README.md#documentation-for-models) [[Back to README]](README.md) + +# **searchConfig** +> Array searchConfig(searchConfigRequest) + + Version: 9.2.0.cl or later Gets Git repository connections configured on the ThoughtSpot instance. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance on your instance, the `CAN_SETUP_VERSION_CONTROL` (**Can set up version control**) privilege. + +### Example + + +```typescript +import { createBearerAuthenticationConfig, ThoughtSpotRestApi, SearchConfigRequest } from '@thoughtspot/rest-api-sdk'; + +const configuration = createBearerAuthenticationConfig("CLUSTER_SERVER_URL", { + username: "YOUR_USERNAME", + password: "YOUR_PASSWORD", +}); +const apiInstance = new ThoughtSpotRestApi(configuration); + +apiInstance.searchConfig( + // SearchConfigRequest + { + org_identifiers: [ + "org_identifiers_example", + ], + } +).then((data:any) => { + console.log('API called successfully. Returned data: ' + data); +}).catch((error:any) => console.error(error)); + + +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **searchConfigRequest** | **SearchConfigRequest**| | + + +### Return type + +**Array** + +### Authorization + +[bearerAuth](README.md#bearerAuth) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Details of local repository configuration | - | +**400** | Invalid request. | - | +**401** | Unauthorized access. | - | +**403** | Forbidden access. | - | +**500** | Unexpected error | - | + +[[Back to top]](#) [[Back to API list]](README.md#documentation-for-api-endpoints) [[Back to Model list]](README.md#documentation-for-models) [[Back to README]](README.md) + +# **searchConnection** +> Array searchConnection(searchConnectionRequest) + + Version: 9.2.0.cl or later Gets connection objects. Requires `DATAMANAGEMENT` (**Can manage data**) or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) privilege is required. - To get a list of all connections available in the ThoughtSpot system, send the API request without any attributes in the request body. - To get the connection objects for a specific type of data warehouse, specify the type in `data_warehouse_types`. - To fetch details of a connection object, specify the connection object GUID or name. The `name_pattern` attribute allows passing partial text with `%` for a wildcard match. - To get details of the database, schemas, tables, or columns from a data connection object, specify `data_warehouse_object_type`. - To get a specific database, schema, table, or column from a connection object, define the object type in `data_warehouse_object_type` and object properties in the `data_warehouse_objects` array. For example, to search for a column, you must pass the database, schema, and table names in the API request. Note that in the following example, object properties are set in a hierarchical order (`database` > `schema` > `table` > `column`). ``` { \"connections\": [ { \"identifier\": \"b9d1f2ef-fa65-4a4b-994e-30fa2d57b0c2\", \"data_warehouse_objects\": [ { \"database\": \"NEBULADEV\", \"schema\": \"INFORMATION_SCHEMA\", \"table\": \"APPLICABLE_ROLES\", \"column\": \"ROLE_NAME\" } ] } ], \"data_warehouse_object_type\": \"COLUMN\" } ``` - To fetch data by `configuration`, specify `data_warehouse_object_type`. For example, to fetch columns from the `DEVELOPMENT` database, specify the `data_warehouse_object_type` as `DATABASE` and define the `configuration` string as `{\"database\":\"DEVELOPMENT\"}`. To get column data for a specific table, specify the table, for example,`{\"database\":\"RETAILAPPAREL\",\"table\":\"PIPES\"}`. - To query connections by `authentication_type`, specify `data_warehouse_object_type`. Supported values for `authentication_type` are: - `SERVICE_ACCOUNT`: For connections that require service account credentials to authenticate to the Cloud Data Warehouse and fetch data. - `OAUTH`: For connections that require OAuth credentials to authenticate to the Cloud Data Warehouse and fetch data. Teradata, Oracle, and Presto Cloud Data Warehouses do not support the OAuth authentication type. - `IAM`: For connections that have the IAM OAuth set up. This authentication type is supported on Amazon Redshift connections only. - `EXTOAUTH`: For connections that have External OAuth set up. ThoughtSpot supports external [OAuth with Microsoft Azure Active Directory (AD)](https://docs.thoughtspot.com/cloud/latest/ connections-snowflake-azure-ad-oauth) and [Okta for Snowflake data connections](https://docs.thoughtspot.com/cloud/latest/connections-snowflake-okta-oauth). - `KEY_PAIR`: For connections that require Key Pair account credentials to authenticate to the Cloud Data Warehouse and fetch data. This authentication type is supported on Snowflake connections only. - `OAUTH_WITH_PKCE`: For connections that require OAuth with PKCE account credentials to authenticate to the Cloud Data Warehouse and fetch data. This authentication type is supported on Snowflake, Starburst, Databricks, Denodo connections only. - `EXTOAUTH_WITH_PKCE`: For connections that require External OAuth With PKCE account credentials to authenticate to the Cloud Data Warehouse and fetch data. This authentication type is supported on Snowflake connections only. - `OAUTH_WITH_PEZ`: For connections that require OAuth With PEZ account credentials to authenticate to the Cloud Data Warehouse and fetch data. This authentication type is supported on Amazon Redshift connections only. - `OAUTH_WITH_SERVICE_PRINCIPAL`: For connections that require OAuth With Service Principal account credentials to authenticate to the Cloud Data Warehouse and fetch data. This authentication type is supported on Databricks connections only. - `PERSONAL_ACCESS_TOKEN`: For connections that require Personal Access Token account credentials to authenticate to the Cloud Data Warehouse and fetch data. This authentication type is supported on Databricks connections only. - `OAUTH_CLIENT_CREDENTIALS`: For connections that require OAuth Client Credentials to authenticate to the Cloud Data Warehouse and fetch data. This authentication type is supported on Snowflake connections only. - To include more details about connection objects in the API response, set `include_details` to `true`. - You can also sort the output by field names and filter connections by tags. **NOTE**: When filtering connection records by parameters other than `data_warehouse_types` or `tag_identifiers`, ensure that you set `record_size` to `-1` and `record_offset` to `0` for precise results. + +### Example + + +```typescript +import { createBearerAuthenticationConfig, ThoughtSpotRestApi, SearchConnectionRequest } from '@thoughtspot/rest-api-sdk'; + +const configuration = createBearerAuthenticationConfig("CLUSTER_SERVER_URL", { + username: "YOUR_USERNAME", + password: "YOUR_PASSWORD", +}); +const apiInstance = new ThoughtSpotRestApi(configuration); + +apiInstance.searchConnection( + // SearchConnectionRequest + { + connections: [ + { + identifier: "identifier_example", + name_pattern: "name_pattern_example", + data_warehouse_objects: [ + { + database: "database_example", + schema: "schema_example", + table: "table_example", + column: "column_example", + }, + ], + }, + ], + data_warehouse_types: [ + "SNOWFLAKE", + ], + record_offset: 0, + record_size: 10, + tag_identifiers: [ + "tag_identifiers_example", + ], + data_warehouse_object_type: "DATABASE", + sort_options: null, + include_details: true, + configuration: {}, + authentication_type: "SERVICE_ACCOUNT", + show_resolved_parameters: false, + } +).then((data:any) => { + console.log('API called successfully. Returned data: ' + data); +}).catch((error:any) => console.error(error)); + + +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **searchConnectionRequest** | **SearchConnectionRequest**| | + + +### Return type + +**Array** + +### Authorization + +[bearerAuth](README.md#bearerAuth) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | List of connections to the datasource. | - | +**400** | Invalid request. | - | +**401** | Unauthorized access. | - | +**403** | Forbidden access. | - | +**500** | Unexpected error | - | + +[[Back to top]](#) [[Back to API list]](README.md#documentation-for-api-endpoints) [[Back to Model list]](README.md#documentation-for-models) [[Back to README]](README.md) + +# **searchCustomActions** +> Array searchCustomActions(searchCustomActionsRequest) + + Version: 9.6.0.cl or later Gets custom actions configured on the cluster. Requires `DEVELOPER` (**Has Developer privilege**) or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `DEVELOPER` (**Has developer privilege**) privilege is required. + +### Example + + +```typescript +import { createBearerAuthenticationConfig, ThoughtSpotRestApi, SearchCustomActionsRequest } from '@thoughtspot/rest-api-sdk'; + +const configuration = createBearerAuthenticationConfig("CLUSTER_SERVER_URL", { + username: "YOUR_USERNAME", + password: "YOUR_PASSWORD", +}); +const apiInstance = new ThoughtSpotRestApi(configuration); + +apiInstance.searchCustomActions( + // SearchCustomActionsRequest + { + custom_action_identifier: "custom_action_identifier_example", + name_pattern: "name_pattern_example", + default_action_config: null, + include_group_associations: false, + include_metadata_associations: false, + metadata: [ + { + type: "VISUALIZATION", + identifier: "identifier_example", + }, + ], + type: "CALLBACK", + } +).then((data:any) => { + console.log('API called successfully. Returned data: ' + data); +}).catch((error:any) => console.error(error)); + + +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **searchCustomActionsRequest** | **SearchCustomActionsRequest**| | + + +### Return type + +**Array** + +### Authorization + +[bearerAuth](README.md#bearerAuth) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Custom action search is successful. | - | +**400** | Invalid request. | - | +**401** | Unauthorized access. | - | +**403** | Forbidden access. | - | +**500** | Unexpected error | - | + +[[Back to top]](#) [[Back to API list]](README.md#documentation-for-api-endpoints) [[Back to Model list]](README.md#documentation-for-models) [[Back to README]](README.md) + +# **searchData** +> SearchDataResponse searchData(searchDataRequest) + + Version: 9.0.0.cl or later Generates an Answer from a given data source. Requires at least view access to the data source object (Worksheet or View). #### Usage guidelines To search data, specify the data source GUID in `logical_table_identifier`. The data source can be a Worksheet, View, Table, or SQL view. Pass search tokens in the `query_string` attribute in the API request as shown in the following example: ``` { \"query_string\": \"[sales] by [store]\", \"logical_table_identifier\": \"cd252e5c-b552-49a8-821d-3eadaa049cca\", } ``` For more information about the `query_string` format and data source attribute, see [Search data API](https://developers.thoughtspot.com/docs/fetch-data-and-report-apis#_search_data_api). The `record_size` attribute determines the number of records to retrieve in an API call. For more information about pagination, record size, and maximum row limit, see [Pagination and record size settings](https://developers.thoughtspot.com/docs/fetch-data-and-report-apis#_pagination_settings_for_data_and_report_api). + +### Example + + +```typescript +import { createBearerAuthenticationConfig, ThoughtSpotRestApi, SearchDataRequest } from '@thoughtspot/rest-api-sdk'; + +const configuration = createBearerAuthenticationConfig("CLUSTER_SERVER_URL", { + username: "YOUR_USERNAME", + password: "YOUR_PASSWORD", +}); +const apiInstance = new ThoughtSpotRestApi(configuration); + +apiInstance.searchData( + // SearchDataRequest + { + query_string: "query_string_example", + logical_table_identifier: "logical_table_identifier_example", + data_format: "COMPACT", + record_offset: 0, + record_size: 10, + runtime_filter: {}, + runtime_sort: {}, + runtime_param_override: {}, + } +).then((data:any) => { + console.log('API called successfully. Returned data: ' + data); +}).catch((error:any) => console.error(error)); + + +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **searchDataRequest** | **SearchDataRequest**| | + + +### Return type + +**SearchDataResponse** + +### Authorization + +[bearerAuth](README.md#bearerAuth) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Fetching data of specified metadata object is successful. | - | +**400** | Invalid request. | - | +**401** | Unauthorized access. | - | +**403** | Forbidden access. | - | +**500** | Unexpected error | - | + +[[Back to top]](#) [[Back to API list]](README.md#documentation-for-api-endpoints) [[Back to Model list]](README.md#documentation-for-models) [[Back to README]](README.md) + +# **searchEmailCustomization** +> Array searchEmailCustomization(searchEmailCustomizationRequest) + + Version: 10.10.0.cl or later Search the email customization configuration if any set for the ThoughtSpot system. #### Pre-requisites Requires `DEVELOPER` (**has developer privilege**) or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `DEVELOPER` (**Has developer privilege**) privilege is required. **NOTE**:This endpoint in currently in beta. Contact ThoughtSpot support to enable this on your instance. + +### Example + + +```typescript +import { createBearerAuthenticationConfig, ThoughtSpotRestApi, SearchEmailCustomizationRequest } from '@thoughtspot/rest-api-sdk'; + +const configuration = createBearerAuthenticationConfig("CLUSTER_SERVER_URL", { + username: "YOUR_USERNAME", + password: "YOUR_PASSWORD", +}); +const apiInstance = new ThoughtSpotRestApi(configuration); + +apiInstance.searchEmailCustomization( + // SearchEmailCustomizationRequest + { + org_identifiers: [ + "org_identifiers_example", + ], + } +).then((data:any) => { + console.log('API called successfully. Returned data: ' + data); +}).catch((error:any) => console.error(error)); + + +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **searchEmailCustomizationRequest** | **SearchEmailCustomizationRequest**| | + + +### Return type + +**Array** + +### Authorization + +[bearerAuth](README.md#bearerAuth) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**400** | Invalid request. | - | +**403** | Unauthorized access. | - | +**500** | Unexpected error | - | + +[[Back to top]](#) [[Back to API list]](README.md#documentation-for-api-endpoints) [[Back to Model list]](README.md#documentation-for-models) [[Back to README]](README.md) + +# **searchMetadata** +> Array searchMetadata(searchMetadataRequest) + + Version: 9.0.0.cl or later Gets a list of metadata objects available on the ThoughtSpot system. This API endpoint is available to all users who have view access to the object. Users with `ADMINISTRATION` (**Can administer ThoughtSpot**) privileges can view data for all metadata objects, including users and groups. #### Usage guidelines - To get all metadata objects, send the API request without any attributes. - To get metadata objects of a specific type, set the `type` attribute. For example, to fetch a Worksheet, set the type as `LOGICAL_TABLE`. - To filter metadata objects within type `LOGICAL_TABLE`, set the `subtypes` attribute. For example, to fetch a Worksheet, set the type as `LOGICAL_TABLE` & subtypes as `[WORKSHEET]`. - To get a specific metadata object, specify the GUID. - To customize your search and filter the API response, you can use several parameters. You can search for objects created or modified by specific users, by tags applied to the objects, or by using the include parameters like `include_auto_created_objects`, `include_dependent_objects`, `include_headers`, `include_incomplete_objects`, and so on. You can also define sorting options to sort the data retrieved in the API response. - To get discoverable objects when linientmodel is enabled you can use `include_discoverable_objects` as true else false. Default value is true. - For liveboard metadata type, to get the newer format, set the `liveboard_response_format` as V2. Default value is V1. - To retrieve only objects that are published, set the `include_only_published_objects` as true. Default value is false. **NOTE**: The following parameters support pagination of metadata records: - `tag_identifiers` - `type` - `subtypes` - `created_by_user_identifiers` - `modified_by_user_identifiers` - `owned_by_user_identifiers` - `exclude_objects` - `include_auto_created_objects` - `favorite_object_options` - `include_only_published_objects` If you are using other parameters to search metadata, set `record_size` to `-1` and `record_offset` to `0`. + +### Example + + +```typescript +import { createBearerAuthenticationConfig, ThoughtSpotRestApi, SearchMetadataRequest } from '@thoughtspot/rest-api-sdk'; + +const configuration = createBearerAuthenticationConfig("CLUSTER_SERVER_URL", { + username: "YOUR_USERNAME", + password: "YOUR_PASSWORD", +}); +const apiInstance = new ThoughtSpotRestApi(configuration); + +apiInstance.searchMetadata( + // SearchMetadataRequest + { + metadata: [ + { + identifier: "identifier_example", + obj_identifier: "obj_identifier_example", + name_pattern: "name_pattern_example", + type: "LIVEBOARD", + subtypes: [ + "ONE_TO_ONE_LOGICAL", + ], + }, + ], + permissions: [ + { + principal: { + identifier: "identifier_example", + type: "USER", + }, + share_mode: "READ_ONLY", + }, + ], + created_by_user_identifiers: [ + "created_by_user_identifiers_example", + ], + dependent_object_version: "V1", + exclude_objects: [ + { + identifier: "identifier_example", + type: "LIVEBOARD", + }, + ], + favorite_object_options: null, + include_auto_created_objects: false, + include_dependent_objects: false, + dependent_objects_record_size: 50, + include_details: false, + include_personalised_views: false, + include_headers: true, + include_hidden_objects: false, + include_incomplete_objects: false, + include_visualization_headers: false, + include_worksheet_search_assist_data: true, + modified_by_user_identifiers: [ + "modified_by_user_identifiers_example", + ], + record_offset: 0, + record_size: 10, + sort_options: null, + tag_identifiers: [ + "tag_identifiers_example", + ], + include_stats: false, + include_discoverable_objects: true, + show_resolved_parameters: false, + liveboard_response_version: "V1", + include_only_published_objects: false, + } +).then((data:any) => { + console.log('API called successfully. Returned data: ' + data); +}).catch((error:any) => console.error(error)); + + +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **searchMetadataRequest** | **SearchMetadataRequest**| | + + +### Return type + +**Array** + +### Authorization + +[bearerAuth](README.md#bearerAuth) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Metadata objects search result. | - | +**400** | Invalid request. | - | +**401** | Unauthorized access. | - | +**403** | Forbidden access. | - | +**500** | Unexpected error | - | + +[[Back to top]](#) [[Back to API list]](README.md#documentation-for-api-endpoints) [[Back to Model list]](README.md#documentation-for-models) [[Back to README]](README.md) + +# **searchOrgs** +> Array searchOrgs(searchOrgsRequest) + + Version: 9.0.0.cl or later Gets a list of Orgs configured on the ThoughtSpot system. To get details of a specific Org, specify the Org ID or name. You can also pass parameters such as status, visibility, and user identifiers to get a specific list of Orgs. Requires cluster administration (**Can administer Org**) privileges. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `ORG_ADMINISTRATION` (**Can manage Orgs**) privilege is required. + +### Example + + +```typescript +import { createBearerAuthenticationConfig, ThoughtSpotRestApi, SearchOrgsRequest } from '@thoughtspot/rest-api-sdk'; + +const configuration = createBearerAuthenticationConfig("CLUSTER_SERVER_URL", { + username: "YOUR_USERNAME", + password: "YOUR_PASSWORD", +}); +const apiInstance = new ThoughtSpotRestApi(configuration); + +apiInstance.searchOrgs( + // SearchOrgsRequest + { + org_identifier: "org_identifier_example", + description: "description_example", + visibility: "SHOW", + status: "ACTIVE", + user_identifiers: [ + "user_identifiers_example", + ], + } +).then((data:any) => { + console.log('API called successfully. Returned data: ' + data); +}).catch((error:any) => console.error(error)); + + +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **searchOrgsRequest** | **SearchOrgsRequest**| | + + +### Return type + +**Array** + +### Authorization + +[bearerAuth](README.md#bearerAuth) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Organization search result. | - | +**400** | Invalid request. | - | +**401** | Unauthorized access. | - | +**403** | Forbidden access. | - | +**500** | Unexpected error | - | + +[[Back to top]](#) [[Back to API list]](README.md#documentation-for-api-endpoints) [[Back to Model list]](README.md#documentation-for-models) [[Back to README]](README.md) + +# **searchRoles** +> Array searchRoles(searchRolesRequest) + + Version: 9.5.0.cl or later Gets a list of Role objects from the ThoughtSpot system. Available if [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance. To search for Roles, the `ROLE_ADMINISTRATION` (**Can manage roles**) privilege is required. To get details of a specific Role object, specify the GUID or name. You can also filter the API response based on user group and Org identifiers, privileges assigned to the Role, and deprecation status. + +### Example + + +```typescript +import { createBearerAuthenticationConfig, ThoughtSpotRestApi, SearchRolesRequest } from '@thoughtspot/rest-api-sdk'; + +const configuration = createBearerAuthenticationConfig("CLUSTER_SERVER_URL", { + username: "YOUR_USERNAME", + password: "YOUR_PASSWORD", +}); +const apiInstance = new ThoughtSpotRestApi(configuration); + +apiInstance.searchRoles( + // SearchRolesRequest + { + role_identifiers: [ + "role_identifiers_example", + ], + org_identifiers: [ + "org_identifiers_example", + ], + group_identifiers: [ + "group_identifiers_example", + ], + privileges: [ + "UNKNOWN", + ], + deprecated: true, + external: true, + shared_via_connection: true, + permissions: [ + "READ_ONLY", + ], + } +).then((data:any) => { + console.log('API called successfully. Returned data: ' + data); +}).catch((error:any) => console.error(error)); + + +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **searchRolesRequest** | **SearchRolesRequest**| | + + +### Return type + +**Array** + +### Authorization + +[bearerAuth](README.md#bearerAuth) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Roles search result. | - | +**400** | Invalid request. | - | +**401** | Unauthorized access. | - | +**403** | Forbidden access. | - | +**500** | Internal error | - | + +[[Back to top]](#) [[Back to API list]](README.md#documentation-for-api-endpoints) [[Back to Model list]](README.md#documentation-for-models) [[Back to README]](README.md) + +# **searchSchedules** +> Array searchSchedules(searchSchedulesRequest) + + Search Schedules Version: 9.4.0.cl or later Gets a list of scheduled jobs configured for a Liveboard. To get details of a specific scheduled job, specify the name or GUID of the scheduled job. Requires at least view access to Liveboards. **NOTE**: When filtering schedules by parameters other than `metadata`, set `record_size` to `-1` and `record_offset` to `0` for accurate results. + +### Example + + +```typescript +import { createBearerAuthenticationConfig, ThoughtSpotRestApi, SearchSchedulesRequest } from '@thoughtspot/rest-api-sdk'; + +const configuration = createBearerAuthenticationConfig("CLUSTER_SERVER_URL", { + username: "YOUR_USERNAME", + password: "YOUR_PASSWORD", +}); +const apiInstance = new ThoughtSpotRestApi(configuration); + +apiInstance.searchSchedules( + // SearchSchedulesRequest + { + metadata: [ + { + identifier: "identifier_example", + type: "LIVEBOARD", + }, + ], + record_offset: 1, + record_size: 1, + sort_options: null, + history_runs_options: null, + schedule_identifiers: [ + "schedule_identifiers_example", + ], + } +).then((data:any) => { + console.log('API called successfully. Returned data: ' + data); +}).catch((error:any) => console.error(error)); + + +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **searchSchedulesRequest** | **SearchSchedulesRequest**| | + + +### Return type + +**Array** + +### Authorization + +[bearerAuth](README.md#bearerAuth) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Schedule search result. | - | +**400** | Invalid request. | - | +**401** | Unauthorized access. | - | +**403** | Forbidden access. | - | +**500** | Unexpected error | - | + +[[Back to top]](#) [[Back to API list]](README.md#documentation-for-api-endpoints) [[Back to Model list]](README.md#documentation-for-models) [[Back to README]](README.md) + +# **searchSecuritySettings** +> SecuritySettingsResponse searchSecuritySettings(searchSecuritySettingsRequest) + + Version: 26.2.0.cl or later Fetch security settings for your ThoughtSpot application instance. - Use `scope: CLUSTER` to retrieve cluster-level security settings, including CORS and CSP allowlists, SAML redirect URLs, and settings that control access to non-embedded pages. - Use `scope: ORG` to retrieve Org-level security settings. If your instance has [Orgs](https://docs.thoughtspot.com/cloud/latest/orgs-overview), this returns CORS and non-embed access settings specific to the Org. - If `scope` is not specified, returns both cluster and Org-specific settings based on user privileges. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) or `DEVELOPER` (**Has developer privilege**) privilege. See [Security Settings](https://developers.thoughtspot.com/docs/security-settings) for more details. + +### Example + + +```typescript +import { createBearerAuthenticationConfig, ThoughtSpotRestApi, SearchSecuritySettingsRequest } from '@thoughtspot/rest-api-sdk'; + +const configuration = createBearerAuthenticationConfig("CLUSTER_SERVER_URL", { + username: "YOUR_USERNAME", + password: "YOUR_PASSWORD", +}); +const apiInstance = new ThoughtSpotRestApi(configuration); + +apiInstance.searchSecuritySettings( + // SearchSecuritySettingsRequest + { + scope: "CLUSTER", + } +).then((data:any) => { + console.log('API called successfully. Returned data: ' + data); +}).catch((error:any) => console.error(error)); + + +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **searchSecuritySettingsRequest** | **SearchSecuritySettingsRequest**| | + + +### Return type + +**SecuritySettingsResponse** + +### Authorization + +[bearerAuth](README.md#bearerAuth) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Successfully retrieved the list of security settings. | - | +**400** | Invalid request. | - | +**401** | Unauthorized access. | - | +**403** | Forbidden access. | - | +**500** | Unexpected error | - | + +[[Back to top]](#) [[Back to API list]](README.md#documentation-for-api-endpoints) [[Back to Model list]](README.md#documentation-for-models) [[Back to README]](README.md) + +# **searchTags** +> Array searchTags(searchTagsRequest) + + Version: 9.0.0.cl or later Gets a list of tag objects available on the ThoughtSpot system. To get details of a specific tag object, specify the GUID or name. Any authenticated user can search for tag objects. + +### Example + + +```typescript +import { createBearerAuthenticationConfig, ThoughtSpotRestApi, SearchTagsRequest } from '@thoughtspot/rest-api-sdk'; + +const configuration = createBearerAuthenticationConfig("CLUSTER_SERVER_URL", { + username: "YOUR_USERNAME", + password: "YOUR_PASSWORD", +}); +const apiInstance = new ThoughtSpotRestApi(configuration); + +apiInstance.searchTags( + // SearchTagsRequest + { + tag_identifier: "tag_identifier_example", + name_pattern: "name_pattern_example", + color: "color_example", + } +).then((data:any) => { + console.log('API called successfully. Returned data: ' + data); +}).catch((error:any) => console.error(error)); + + +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **searchTagsRequest** | **SearchTagsRequest**| | + + +### Return type + +**Array** + +### Authorization + +[bearerAuth](README.md#bearerAuth) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Tags search result. | - | +**400** | Invalid request. | - | +**401** | Unauthorized access. | - | +**403** | Forbidden access. | - | +**500** | Unexpected error | - | + +[[Back to top]](#) [[Back to API list]](README.md#documentation-for-api-endpoints) [[Back to Model list]](README.md#documentation-for-models) [[Back to README]](README.md) + +# **searchUserGroups** +> Array searchUserGroups(searchUserGroupsRequest) + + Version: 9.0.0.cl or later Gets a list of user group objects from the ThoughtSpot system. To get details of a specific user group, specify the user group GUID or name. You can also filter the API response based on User ID, Org ID, Role ID, type of group, sharing visibility, privileges assigned to the group, and the Liveboard IDs assigned to the users in the group. Available to all users. Users with `ADMINISTRATION` (**Can administer ThoughtSpot**) privileges can view all users properties. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `GROUP_ADMINISTRATION` (**Can manage groups**) privilege is required. **NOTE**: If you do not get precise results, try setting `record_size` to `-1` and `record_offset` to `0`. + +### Example + + +```typescript +import { createBearerAuthenticationConfig, ThoughtSpotRestApi, SearchUserGroupsRequest } from '@thoughtspot/rest-api-sdk'; + +const configuration = createBearerAuthenticationConfig("CLUSTER_SERVER_URL", { + username: "YOUR_USERNAME", + password: "YOUR_PASSWORD", +}); +const apiInstance = new ThoughtSpotRestApi(configuration); + +apiInstance.searchUserGroups( + // SearchUserGroupsRequest + { + default_liveboard_identifiers: [ + "default_liveboard_identifiers_example", + ], + description: "description_example", + display_name: "display_name_example", + name_pattern: "name_pattern_example", + group_identifier: "group_identifier_example", + org_identifiers: [ + "org_identifiers_example", + ], + privileges: [ + "ADMINISTRATION", + ], + sub_group_identifiers: [ + "sub_group_identifiers_example", + ], + type: "LOCAL_GROUP", + user_identifiers: [ + "user_identifiers_example", + ], + visibility: "SHARABLE", + role_identifiers: [ + "role_identifiers_example", + ], + record_offset: 0, + record_size: 10, + sort_options: null, + include_users: true, + include_sub_groups: true, + } +).then((data:any) => { + console.log('API called successfully. Returned data: ' + data); +}).catch((error:any) => console.error(error)); + + +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **searchUserGroupsRequest** | **SearchUserGroupsRequest**| | + + +### Return type + +**Array** + +### Authorization + +[bearerAuth](README.md#bearerAuth) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | User group search result. | - | +**400** | Invalid request. | - | +**401** | Unauthorized access. | - | +**403** | Forbidden access. | - | +**500** | Unexpected error | - | + +[[Back to top]](#) [[Back to API list]](README.md#documentation-for-api-endpoints) [[Back to Model list]](README.md#documentation-for-models) [[Back to README]](README.md) + +# **searchUsers** +> Array searchUsers(searchUsersRequest) + + Version: 9.0.0.cl or later Gets a list of users available on the ThoughtSpot system. To get details of a specific user, specify the user GUID or name. You can also filter the API response based on groups, Org ID, user visibility, account status, user type, and user preference settings and favorites. Available to all users. Users with `ADMINISTRATION` (**Can administer ThoughtSpot**) privileges can view all users properties. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `USER_ADMINISTRATION` (**Can manage users**) privilege is required. **NOTE**: If the API returns an empty list, consider increasing the value of the `record_size` parameter. To search across all available users, set `record_size` to `-1`. + +### Example + + +```typescript +import { createBearerAuthenticationConfig, ThoughtSpotRestApi, SearchUsersRequest } from '@thoughtspot/rest-api-sdk'; + +const configuration = createBearerAuthenticationConfig("CLUSTER_SERVER_URL", { + username: "YOUR_USERNAME", + password: "YOUR_PASSWORD", +}); +const apiInstance = new ThoughtSpotRestApi(configuration); + +apiInstance.searchUsers( + // SearchUsersRequest + { + user_identifier: "user_identifier_example", + display_name: "display_name_example", + name_pattern: "name_pattern_example", + visibility: "SHARABLE", + email: "email_example", + group_identifiers: [ + "group_identifiers_example", + ], + privileges: [ + "ADMINISTRATION", + ], + account_type: "LOCAL_USER", + account_status: "ACTIVE", + notify_on_share: true, + show_onboarding_experience: true, + onboarding_experience_completed: true, + org_identifiers: [ + "org_identifiers_example", + ], + home_liveboard_identifier: "home_liveboard_identifier_example", + favorite_metadata: [ + { + identifier: "identifier_example", + type: "LIVEBOARD", + }, + ], + record_offset: 0, + record_size: 10, + sort_options: null, + role_identifiers: [ + "role_identifiers_example", + ], + include_favorite_metadata: false, + include_variable_values: false, + } +).then((data:any) => { + console.log('API called successfully. Returned data: ' + data); +}).catch((error:any) => console.error(error)); + + +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **searchUsersRequest** | **SearchUsersRequest**| | + + +### Return type + +**Array** + +### Authorization + +[bearerAuth](README.md#bearerAuth) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | User search result. | - | +**400** | Invalid request. | - | +**401** | Unauthorized access. | - | +**403** | Forbidden access. | - | +**500** | Unexpected error | - | + +[[Back to top]](#) [[Back to API list]](README.md#documentation-for-api-endpoints) [[Back to Model list]](README.md#documentation-for-models) [[Back to README]](README.md) + +# **searchVariables** +> Array searchVariables(searchVariablesRequest) + + Search variables Version: 26.4.0.cl or later Allows searching for variables in ThoughtSpot. Requires ADMINISTRATION role. The CAN_MANAGE_VARIABLES permission allows you to manage Formula Variables in the current organization scope. The API endpoint supports searching variables by: * Variable identifier (ID or name) * Variable type * Name pattern (case-insensitive, supports % for wildcard) The search results can be formatted in three ways: * METADATA - Returns only variable metadata (default) * METADATA_AND_VALUES - Returns variable metadata and values The values can be filtered by scope: * org_identifier * principal_identifier * model_identifier + +### Example + + +```typescript +import { createBearerAuthenticationConfig, ThoughtSpotRestApi, SearchVariablesRequest } from '@thoughtspot/rest-api-sdk'; + +const configuration = createBearerAuthenticationConfig("CLUSTER_SERVER_URL", { + username: "YOUR_USERNAME", + password: "YOUR_PASSWORD", +}); +const apiInstance = new ThoughtSpotRestApi(configuration); + +apiInstance.searchVariables( + // SearchVariablesRequest + { + variable_details: [ + { + identifier: "identifier_example", + type: "CONNECTION_PROPERTY", + name_pattern: "name_pattern_example", + }, + ], + value_scope: [ + { + org_identifier: "org_identifier_example", + principal_type: "USER", + principal_identifier: "principal_identifier_example", + model_identifier: "model_identifier_example", + }, + ], + record_offset: 0, + record_size: 10, + response_content: "METADATA", + } +).then((data:any) => { + console.log('API called successfully. Returned data: ' + data); +}).catch((error:any) => console.error(error)); + + +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **searchVariablesRequest** | **SearchVariablesRequest**| | + + +### Return type + +**Array** + +### Authorization + +[bearerAuth](README.md#bearerAuth) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | List of variables is successful. | - | +**400** | Invalid request. | - | +**401** | Unauthorized access. | - | +**403** | Forbidden access. | - | +**500** | Unexpected error | - | + +[[Back to top]](#) [[Back to API list]](README.md#documentation-for-api-endpoints) [[Back to Model list]](README.md#documentation-for-models) [[Back to README]](README.md) + +# **searchWebhookConfigurations** +> WebhookSearchResponse searchWebhookConfigurations(searchWebhookConfigurationsRequest) + + Version: 10.14.0.cl or later Searches for webhook configurations based on various criteria such as Org, webhook identifier, event type, with support for pagination and sorting. Returns matching webhook configurations with their complete details. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) or `DEVELOPER` (**Has developer privilege**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, users with `CAN_MANAGE_WEBHOOKS` (**Can manage webhooks**) privilege are also authorized to perform this action. + +### Example + + +```typescript +import { createBearerAuthenticationConfig, ThoughtSpotRestApi, SearchWebhookConfigurationsRequest } from '@thoughtspot/rest-api-sdk'; + +const configuration = createBearerAuthenticationConfig("CLUSTER_SERVER_URL", { + username: "YOUR_USERNAME", + password: "YOUR_PASSWORD", +}); +const apiInstance = new ThoughtSpotRestApi(configuration); + +apiInstance.searchWebhookConfigurations( + // SearchWebhookConfigurationsRequest + { + org_identifier: "org_identifier_example", + webhook_identifier: "webhook_identifier_example", + event_type: "LIVEBOARD_SCHEDULE", + record_offset: 0, + record_size: 50, + sort_options: null, + } +).then((data:any) => { + console.log('API called successfully. Returned data: ' + data); +}).catch((error:any) => console.error(error)); + + +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **searchWebhookConfigurationsRequest** | **SearchWebhookConfigurationsRequest**| | + + +### Return type + +**WebhookSearchResponse** + +### Authorization + +[bearerAuth](README.md#bearerAuth) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Webhook configurations retrieved successfully | - | +**400** | Invalid request. | - | +**401** | Unauthorized access. | - | +**403** | Forbidden access. | - | +**500** | Unexpected error | - | + +[[Back to top]](#) [[Back to API list]](README.md#documentation-for-api-endpoints) [[Back to Model list]](README.md#documentation-for-models) [[Back to README]](README.md) + +# **sendAgentConversationMessage** +> any sendAgentConversationMessage(sendAgentConversationMessageRequest) + + Version: 26.5.0.cl or later Sends natural language messages to an existing Spotter agent conversation and returns the complete response synchronously. Requires `CAN_USE_SPOTTER` privilege and access to the metadata object associated with the conversation. The user must have access to the conversation session referenced by `conversation_identifier`. A conversation must first be created using the `createAgentConversation` API. #### Usage guidelines The request must include: - `conversation_identifier`: the unique session ID returned by `createAgentConversation`, used for context continuity and message tracking - `messages`: an array of one or more text messages to send to the agent The API returns an array of response objects, each containing: - `type`: the kind of response — `text`, `answer`, or `error` - `message`: the main content of the response - `metadata`: additional information depending on the message type (e.g., answer metadata includes analytics and visualization details) #### Error responses | Code | Description | |------|----------------------------------------------------------------------------------------------------------------------------------| | 401 | Unauthorized — authentication token is missing, expired, or invalid. | | 403 | Forbidden — the authenticated user does not have `CAN_USE_SPOTTER` privilege or lacks permission on the referenced conversation. | > ###### Note: > > - This endpoint is Generally Available from version 26.5.0.cl. > - This endpoint requires Spotter - please contact ThoughtSpot support to enable Spotter on your cluster. > - For real-time streamed responses, use `sendAgentConversationMessageStreaming` instead. + +### Example + + +```typescript +import { createBearerAuthenticationConfig, ThoughtSpotRestApi, SendAgentConversationMessageRequest } from '@thoughtspot/rest-api-sdk'; + +const configuration = createBearerAuthenticationConfig("CLUSTER_SERVER_URL", { + username: "YOUR_USERNAME", + password: "YOUR_PASSWORD", +}); +const apiInstance = new ThoughtSpotRestApi(configuration); + +apiInstance.sendAgentConversationMessage( + // string | Unique identifier for the conversation (used to track context) + "conversation_identifier_example" , + // SendAgentConversationMessageRequest + { + messages: [ + "messages_example", + ], + } +).then((data:any) => { + console.log('API called successfully. Returned data: ' + data); +}).catch((error:any) => console.error(error)); + + +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **sendAgentConversationMessageRequest** | **SendAgentConversationMessageRequest**| | + **conversationIdentifier** | [**string**] | Unique identifier for the conversation (used to track context) | defaults to undefined + + +### Return type + +**any** + +### Authorization + +[bearerAuth](README.md#bearerAuth) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Common successful response | - | +**201** | Common error response | - | +**400** | Operation failed | - | +**401** | Unauthorized access. | - | +**403** | Forbidden access. | - | +**500** | Operation failed | - | + +[[Back to top]](#) [[Back to API list]](README.md#documentation-for-api-endpoints) [[Back to Model list]](README.md#documentation-for-models) [[Back to README]](README.md) + +# **sendAgentConversationMessageStreaming** +> SendAgentMessageResponse sendAgentConversationMessageStreaming(sendAgentConversationMessageStreamingRequest) + + Version: 26.5.0.cl or later Sends one or more natural language messages to an existing Spotter agent conversation and returns the response as a real-time Server-Sent Events stream. Requires `CAN_USE_SPOTTER` privilege and access to the metadata object associated with the conversation. The user must have access to the conversation session referenced by `conversation_identifier`. A conversation must first be created using the `createAgentConversation` API. #### Usage guidelines The request must include: - `conversation_identifier`: the unique session ID returned by `createAgentConversation`, used for context continuity and message tracking - `messages`: an array of one or more text messages to send to the agent If the request is valid, the API returns a Server-Sent Events (SSE) stream. Each line has the form `data: [{\"type\": \"...\", ...}]` — a JSON array of event objects. Event types include: - `ack`: confirms receipt of the request (`node_id`) - `conv_title`: conversation title (`title`, `conv_id`) - `notification`: status updates on operations (`group_id`, `metadata`, `code` — e.g. `TOOL_CALL_NOTIFICATION`, `nls_start`, `FINAL_RESPONSE_NOTIFICATION`) - `text-chunk`: incremental content chunks (`id`, `group_id`, `metadata` with `format` and `type` such as `thinking` or `text`, `content`) - `text`: full text block with same structure as `text-chunk` - `answer`: structured answer with metadata (`id`, `group_id`, `metadata` with `sage_query`, `session_id`, `title`, etc., `title`) - `error`: if a failure occurs #### Error responses | Code | Description | | ---- | -------------------------------------------------------------------------------------------------------------------------------- | | 401 | Unauthorized — authentication token is missing, expired, or invalid. | | 403 | Forbidden — the authenticated user does not have `CAN_USE_SPOTTER` privilege or lacks permission on the referenced conversation. | > ###### Note: > > - This endpoint is Generally Available from version 26.5.0.cl. > - This endpoint requires Spotter - please contact ThoughtSpot support to enable Spotter on your cluster. > - The streaming protocol uses Server-Sent Events (SSE). > - For the complete response in a single payload, use `sendAgentConversationMessage` instead. + +### Example + + +```typescript +import { createBearerAuthenticationConfig, ThoughtSpotRestApi, SendAgentConversationMessageStreamingRequest } from '@thoughtspot/rest-api-sdk'; + +const configuration = createBearerAuthenticationConfig("CLUSTER_SERVER_URL", { + username: "YOUR_USERNAME", + password: "YOUR_PASSWORD", +}); +const apiInstance = new ThoughtSpotRestApi(configuration); + +apiInstance.sendAgentConversationMessageStreaming( + // string | Unique identifier for the conversation (used to track context) + "conversation_identifier_example" , + // SendAgentConversationMessageStreamingRequest + { + messages: [ + "messages_example", + ], + } +).then((data:any) => { + console.log('API called successfully. Returned data: ' + data); +}).catch((error:any) => console.error(error)); + + +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **sendAgentConversationMessageStreamingRequest** | **SendAgentConversationMessageStreamingRequest**| | + **conversationIdentifier** | [**string**] | Unique identifier for the conversation (used to track context) | defaults to undefined + + +### Return type + +**SendAgentMessageResponse** + +### Authorization + +[bearerAuth](README.md#bearerAuth) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Common successful response | - | +**201** | Common error response | - | +**400** | Operation failed | - | +**401** | Unauthorized access. | - | +**403** | Forbidden access. | - | +**500** | Operation failed | - | + +[[Back to top]](#) [[Back to API list]](README.md#documentation-for-api-endpoints) [[Back to Model list]](README.md#documentation-for-models) [[Back to README]](README.md) + +# **sendAgentMessage** +> any sendAgentMessage(sendAgentMessageRequest) + + Version: 26.2.0.cl or later **Deprecated** — Use `sendAgentConversationMessage` instead. Send natural language messages to an existing Spotter agent conversation and returns the complete response synchronously. Requires `CAN_USE_SPOTTER` privilege and access to the metadata object associated with the conversation. The user must have access to the conversation session referenced by `conversation_identifier`. A conversation must first be created using the `createAgentConversation` API. #### Usage guidelines The request must include: - `conversation_identifier`: the unique session ID returned by `createAgentConversation`, used for context continuity and message tracking - `messages`: an array of one or more text messages to send to the agent The API returns an array of response objects, each containing: - `type`: the kind of response — `text`, `answer`, or `error` - `message`: the main content of the response - `metadata`: additional information depending on the message type (e.g., answer metadata includes analytics and visualization details) #### Error responses | Code | Description | |------|----------------------------------------------------------------------------------------------------------------------------------| | 401 | Unauthorized — authentication token is missing, expired, or invalid. | | 403 | Forbidden — the authenticated user does not have `CAN_USE_SPOTTER` privilege or lacks permission on the referenced conversation. | > ###### Note: > > - This endpoint is deprecated. Use `sendAgentConversationMessage` for new integrations. > - This endpoint is currently in Beta. Breaking changes may be introduced before the endpoint is made Generally Available. > - This endpoint requires Spotter - please contact ThoughtSpot support to enable Spotter on your cluster. + +### Example + + +```typescript +import { createBearerAuthenticationConfig, ThoughtSpotRestApi, SendAgentMessageRequest } from '@thoughtspot/rest-api-sdk'; + +const configuration = createBearerAuthenticationConfig("CLUSTER_SERVER_URL", { + username: "YOUR_USERNAME", + password: "YOUR_PASSWORD", +}); +const apiInstance = new ThoughtSpotRestApi(configuration); + +apiInstance.sendAgentMessage( + // string | Unique identifier for the conversation (used to track context) + "conversation_identifier_example" , + // SendAgentMessageRequest + { + messages: [ + "messages_example", + ], + } +).then((data:any) => { + console.log('API called successfully. Returned data: ' + data); +}).catch((error:any) => console.error(error)); + + +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **sendAgentMessageRequest** | **SendAgentMessageRequest**| | + **conversationIdentifier** | [**string**] | Unique identifier for the conversation (used to track context) | defaults to undefined + + +### Return type + +**any** + +### Authorization + +[bearerAuth](README.md#bearerAuth) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Common successful response | - | +**201** | Common error response | - | +**400** | Operation failed | - | +**401** | Unauthorized access. | - | +**403** | Forbidden access. | - | +**500** | Operation failed | - | + +[[Back to top]](#) [[Back to API list]](README.md#documentation-for-api-endpoints) [[Back to Model list]](README.md#documentation-for-models) [[Back to README]](README.md) + +# **sendAgentMessageStreaming** +> SendAgentMessageResponse sendAgentMessageStreaming(sendAgentMessageStreamingRequest) + + Version: 26.2.0.cl or later **Deprecated** — Use `sendAgentConversationMessageStreaming` instead. Sends one or more natural language messages to an existing Spotter agent conversation and returns the response as a real-time Server-Sent Events stream. Requires `CAN_USE_SPOTTER` privilege and access to the metadata object associated with the conversation. The user must have access to the conversation session referenced by `conversation_identifier`. A conversation must first be created using the `createAgentConversation` API. #### Usage guidelines The request must include: - `conversation_identifier`: the unique session ID returned by `createAgentConversation`, used for context continuity and message tracking - `messages`: an array of one or more text messages to send to the agent If the request is valid, the API returns a Server-Sent Events (SSE) stream. Each line has the form `data: [{\"type\": \"...\", ...}]` — a JSON array of event objects. Event types include: - `ack`: confirms receipt of the request (`node_id`) - `conv_title`: conversation title (`title`, `conv_id`) - `notification`: status updates on operations (`group_id`, `metadata`, `code` — e.g. `TOOL_CALL_NOTIFICATION`, `nls_start`, `FINAL_RESPONSE_NOTIFICATION`) - `text-chunk`: incremental content chunks (`id`, `group_id`, `metadata` with `format` and `type` such as `thinking` or `text`, `content`) - `text`: full text block with same structure as `text-chunk` - `answer`: structured answer with metadata (`id`, `group_id`, `metadata` with `sage_query`, `session_id`, `title`, etc., `title`) - `error`: if a failure occurs #### Error responses | Code | Description | |------|----------------------------------------------------------------------------------------------------------------------------------| | 401 | Unauthorized — authentication token is missing, expired, or invalid. | | 403 | Forbidden — the authenticated user does not have `CAN_USE_SPOTTER` privilege or lacks permission on the referenced conversation. | > ###### Note: > > - This endpoint is deprecated. Use `sendAgentConversationMessageStreaming` for new integrations. > - This endpoint is currently in Beta. Breaking changes may be introduced before the endpoint is made Generally Available. > - This endpoint requires Spotter - please contact ThoughtSpot support to enable Spotter on your cluster. > - The streaming protocol uses Server-Sent Events (SSE). + +### Example + + +```typescript +import { createBearerAuthenticationConfig, ThoughtSpotRestApi, SendAgentMessageStreamingRequest } from '@thoughtspot/rest-api-sdk'; + +const configuration = createBearerAuthenticationConfig("CLUSTER_SERVER_URL", { + username: "YOUR_USERNAME", + password: "YOUR_PASSWORD", +}); +const apiInstance = new ThoughtSpotRestApi(configuration); + +apiInstance.sendAgentMessageStreaming( + // SendAgentMessageStreamingRequest + { + conversation_identifier: "conversation_identifier_example", + messages: [ + "messages_example", + ], + } +).then((data:any) => { + console.log('API called successfully. Returned data: ' + data); +}).catch((error:any) => console.error(error)); + + +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **sendAgentMessageStreamingRequest** | **SendAgentMessageStreamingRequest**| | + + +### Return type + +**SendAgentMessageResponse** + +### Authorization + +[bearerAuth](README.md#bearerAuth) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Common successful response | - | +**201** | Common error response | - | +**400** | Operation failed | - | +**401** | Unauthorized access. | - | +**403** | Forbidden access. | - | +**500** | Operation failed | - | + +[[Back to top]](#) [[Back to API list]](README.md#documentation-for-api-endpoints) [[Back to Model list]](README.md#documentation-for-models) [[Back to README]](README.md) + +# **sendMessage** +> Array sendMessage(sendMessageRequest) + + Version: 10.4.0.cl or later Sends a follow-up message to an existing conversation within the context of a data model. Requires `CAN_USE_SPOTTER` privilege and at least view access to the metadata object specified in the request. A conversation must first be created using the `createConversation` API. #### Usage guidelines The request must include: - `conversation_identifier`: the unique session ID returned by `createConversation` - `metadata_identifier`: the unique ID of the data source used for the conversation - `message`: a natural language string with the follow-up question If the request is successful, the API returns an array of response messages, each containing: - `session_identifier`: the unique ID of the generated response - `generation_number`: the generation number of the response - `message_type`: the type of the response (e.g., `TSAnswer`) - `visualization_type`: the generated visualization type (`Chart`, `Table`, or `Undefined`) - `tokens` / `display_tokens`: the search tokens and user-friendly display tokens for the response #### Error responses | Code | Description | |------|-----------------------------------------------------------------------------------------------------------------------------------------| | 401 | Unauthorized — authentication token is missing, expired, or invalid. | | 403 | Forbidden — the authenticated user does not have `CAN_USE_SPOTTER` privilege or lacks view permission on the specified metadata object. | > ###### Note: > * This endpoint is currently in Beta. Breaking changes may be introduced before the endpoint is made Generally Available. > * This endpoint requires Spotter - please contact ThoughtSpot support to enable Spotter on your cluster. + +### Example + + +```typescript +import { createBearerAuthenticationConfig, ThoughtSpotRestApi, SendMessageRequest } from '@thoughtspot/rest-api-sdk'; + +const configuration = createBearerAuthenticationConfig("CLUSTER_SERVER_URL", { + username: "YOUR_USERNAME", + password: "YOUR_PASSWORD", +}); +const apiInstance = new ThoughtSpotRestApi(configuration); + +apiInstance.sendMessage( + // string | Unique identifier of the conversation. + "conversation_identifier_example" , + // SendMessageRequest + { + metadata_identifier: "metadata_identifier_example", + message: "message_example", + } +).then((data:any) => { + console.log('API called successfully. Returned data: ' + data); +}).catch((error:any) => console.error(error)); + + +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **sendMessageRequest** | **SendMessageRequest**| | + **conversationIdentifier** | [**string**] | Unique identifier of the conversation. | defaults to undefined + + +### Return type + +**Array** + +### Authorization + +[bearerAuth](README.md#bearerAuth) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Common successful response | - | +**201** | Common error response | - | +**400** | Operation failed | - | +**401** | Unauthorized access. | - | +**403** | Forbidden access. | - | +**500** | Operation failed | - | + +[[Back to top]](#) [[Back to API list]](README.md#documentation-for-api-endpoints) [[Back to Model list]](README.md#documentation-for-models) [[Back to README]](README.md) + +# **setNLInstructions** +> EurekaSetNLInstructionsResponse setNLInstructions(setNLInstructionsRequest) + + Version: 10.15.0.cl or later This API allows users to set natural language (NL) instructions for a specific data-model to improve AI-generated answers and query processing. These instructions help guide the AI system to better understand the data context and provide more accurate responses. Requires `CAN_USE_SPOTTER` privilege, either edit access or `SPOTTER_COACHING_PRIVILEGE` on the data model, and a bearer token corresponding to the org where the data model exists. #### Usage guidelines To set NL instructions for a data-model, the request must include: - `data_source_identifier`: The unique ID of the data-model for which to set NL instructions - `nl_instructions_info`: An array of instruction objects, each containing: - `instructions`: Array of text instructions for the LLM - `scope`: The scope of the instruction (`GLOBAL`). Currently only `GLOBAL` is supported. It can be extended to data-model-user scope in future. #### Instructions scope - **GLOBAL**: instructions that apply to all users querying this data model If the request is successful, the API returns: - `success`: a boolean indicating whether the operation completed successfully #### Error responses | Code | Description | |------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| | 401 | Unauthorized — authentication token is missing, expired, or invalid. | | 403 | Forbidden — the authenticated user does not have `CAN_USE_SPOTTER` privilege, lacks edit access or `SPOTTER_COACHING_PRIVILEGE` on the data model, or the bearer token does not correspond to the org where the data model exists. | > ###### Note: > > - To use this API, the user needs either edit access or `SPOTTER_COACHING_PRIVILEGE` on the data model, and must use the bearer token corresponding to the org where the data model exists. > - This endpoint is currently in Beta. Breaking changes may be introduced before the endpoint is made Generally Available. > - Available from version 10.15.0.cl and later. > - This endpoint requires Spotter — please contact ThoughtSpot Support to enable Spotter on your cluster. > - Instructions help improve the accuracy and relevance of AI-generated responses for the specified data-model. + +### Example + + +```typescript +import { createBearerAuthenticationConfig, ThoughtSpotRestApi, SetNLInstructionsRequest } from '@thoughtspot/rest-api-sdk'; + +const configuration = createBearerAuthenticationConfig("CLUSTER_SERVER_URL", { + username: "YOUR_USERNAME", + password: "YOUR_PASSWORD", +}); +const apiInstance = new ThoughtSpotRestApi(configuration); + +apiInstance.setNLInstructions( + // SetNLInstructionsRequest + { + data_source_identifier: "data_source_identifier_example", + nl_instructions_info: [ + { + instructions: [ + "instructions_example", + ], + scope: "GLOBAL", + }, + ], + } +).then((data:any) => { + console.log('API called successfully. Returned data: ' + data); +}).catch((error:any) => console.error(error)); + + +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **setNLInstructionsRequest** | **SetNLInstructionsRequest**| | + + +### Return type + +**EurekaSetNLInstructionsResponse** + +### Authorization + +[bearerAuth](README.md#bearerAuth) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Common successful response | - | +**201** | Common error response | - | +**400** | Operation failed | - | +**401** | Unauthorized access. | - | +**403** | Forbidden access. | - | +**500** | Operation failed | - | + +[[Back to top]](#) [[Back to API list]](README.md#documentation-for-api-endpoints) [[Back to Model list]](README.md#documentation-for-models) [[Back to README]](README.md) + +# **shareMetadata** +> void shareMetadata(shareMetadataRequest) + + Version: 9.0.0.cl or later Allows sharing one or several metadata objects with users and groups in ThoughtSpot. Requires edit access to the metadata object. #### Supported metadata objects: * Liveboards * Visualizations * Answers * Models * Views * Connections * Collections #### Object permissions You can provide `READ_ONLY` or `MODIFY` access when sharing an object with another user or group. The `READ_ONLY` permission grants view access to the shared object, whereas `MODIFY` provides edit access. To prevent a user or group from accessing the shared object, specify the GUID or name of the principal and set `shareMode` to `NO_ACCESS`. #### Sharing a visualization * Sharing a visualization implicitly shares the entire Liveboard with the recipient. * Object permissions set for a shared visualization also apply to the Liveboard unless overridden by another API request or via UI. * If email notifications for object sharing are enabled, a notification with a link to the shared visualization will be sent to the recipient’s email address. Although this link opens the shared visualization, recipients can also access other visualizations in the Liveboard. #### Sharing a collection Collections support **dual permissions** that provide fine-grained control: * **Collection permissions** (`share_mode`) - controls access to the collection itself (view, edit, delete the collection) * **Content permissions** (`content_share_mode`) - controls access to objects within the collection (view, edit objects inside) **Default Behavior:** - If only `share_mode` is specified, the content permissions default to `READ_ONLY` (except when `share_mode` is `NO_ACCESS`, then content also gets `NO_ACCESS`) - To give users edit access to collection contents, explicitly set `content_share_mode: \"MODIFY\"` ## Examples The following JSON examples can be copy-pasted as request bodies for the REST v2 API endpoint: ```bash POST /callosum/v1/v2/security/metadata/share Content-Type: application/x-www-form-urlencoded ``` ### Basic collection sharing Share a collection with read-only access: ```json { \"metadata_type\": \"COLLECTION\", \"metadata_identifiers\": [\"Sales Reports Collection\"], \"permissions\": [{ \"principal\": { \"type\": \"USER\", \"identifier\": \"alice@company.com\" }, \"share_mode\": \"READ_ONLY\" }], \"notification\": { \"message\": \"I\'ve shared the Sales Reports collection with you\", \"notify_on_share\": true } } ``` ### Collection sharing with dual permissions Share a collection with different permissions for the collection vs. its contents: ```json { \"metadata_type\": \"COLLECTION\", \"metadata_identifiers\": [\"Marketing Analytics\"], \"permissions\": [{ \"principal\": { \"type\": \"USER\", \"identifier\": \"bob@company.com\" }, \"share_mode\": \"MODIFY\", \"content_share_mode\": \"READ_ONLY\" }, { \"principal\": { \"type\": \"USER_GROUP\", \"identifier\": \"Marketing Team\" }, \"share_mode\": \"READ_ONLY\", \"content_share_mode\": \"READ_ONLY\" }], \"notification\": { \"emails\": [\"bob@company.com\"], \"message\": \"You can edit the collection but content is read-only\", \"enable_custom_url\": false, \"notify_on_share\": true }, \"has_lenient_discoverability\": false } ``` ### Multiple collections sharing Share multiple collections with different users: ```json { \"metadata\": [ { \"type\": \"COLLECTION\", \"identifier\": \"Q4 Reports\" }, { \"type\": \"COLLECTION\", \"identifier\": \"Executive Dashboard Collection\" } ], \"permissions\": [{ \"principal\": { \"type\": \"USER_GROUP\", \"identifier\": \"Executives\" }, \"share_mode\": \"MODIFY\" }, { \"principal\": { \"type\": \"USER\", \"identifier\": \"manager@company.com\" }, \"share_mode\": \"READ_ONLY\", \"content_share_mode\": \"MODIFY\" }], \"notification\": { \"message\": \"Sharing quarterly collections with leadership team\", \"notify_on_share\": true } } ``` ### Remove collection access Remove access to a collection by setting share_mode to NO_ACCESS: ```json { \"metadata_type\": \"COLLECTION\", \"metadata_identifiers\": [\"Confidential Reports\"], \"permissions\": [{ \"principal\": { \"type\": \"USER\", \"identifier\": \"former-employee@company.com\" }, \"share_mode\": \"NO_ACCESS\" }], \"notification\": { \"notify_on_share\": false } } ``` ### Collection Permission Scenarios **Scenario 1: Collection Admin** - `share_mode: MODIFY` + `content_share_mode: MODIFY` = Full control over collection and its contents **Scenario 2: Collection Curator** - `share_mode: MODIFY` + `content_share_mode: READ_ONLY` = Can manage collection structure but not edit contents **Scenario 3: Content Editor** - `share_mode: READ_ONLY` + `content_share_mode: MODIFY` = Can edit objects within collection but can\'t change collection itself **Scenario 4: Viewer** - `share_mode: READ_ONLY` + `content_share_mode: READ_ONLY` = View-only access to collection and contents + +### Example + + +```typescript +import { createBearerAuthenticationConfig, ThoughtSpotRestApi, ShareMetadataRequest } from '@thoughtspot/rest-api-sdk'; + +const configuration = createBearerAuthenticationConfig("CLUSTER_SERVER_URL", { + username: "YOUR_USERNAME", + password: "YOUR_PASSWORD", +}); +const apiInstance = new ThoughtSpotRestApi(configuration); + +apiInstance.shareMetadata( + // ShareMetadataRequest + { + metadata_type: "LIVEBOARD", + metadata_identifiers: [ + "metadata_identifiers_example", + ], + metadata: [ + { + type: "LIVEBOARD", + identifier: "identifier_example", + }, + ], + permissions: [ + { + principal: { + identifier: "identifier_example", + type: "USER", + }, + share_mode: "READ_ONLY", + content_share_mode: "READ_ONLY", + }, + ], + visualization_identifiers: [ + "visualization_identifiers_example", + ], + emails: [], + message: "message_example", + enable_custom_url: false, + notify_on_share: true, + has_lenient_discoverability: false, + } +).then((data:any) => { + console.log('API called successfully. Returned data: ' + data); +}).catch((error:any) => console.error(error)); + + +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **shareMetadataRequest** | **ShareMetadataRequest**| | + + +### Return type + +**void** + +### Authorization + +[bearerAuth](README.md#bearerAuth) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**204** | Sharing metadata objects is successful. | - | +**400** | Invalid request. | - | +**401** | Unauthorized access. | - | +**403** | Forbidden access. | - | +**500** | Unexpected error | - | + +[[Back to top]](#) [[Back to API list]](README.md#documentation-for-api-endpoints) [[Back to Model list]](README.md#documentation-for-models) [[Back to README]](README.md) + +# **singleAnswer** +> ResponseMessage singleAnswer(singleAnswerRequest) + + Version: 10.4.0.cl or later Processes a natural language query against a specified data model and returns a single AI-generated answer without requiring a conversation session. Requires `CAN_USE_SPOTTER` privilege and at least view access to the metadata object specified in the request. #### Usage guidelines The request must include: - `query`: a natural language question (e.g., \"What were total sales last quarter?\") - `metadata_identifier`: the unique ID of the data source to query against If the request is successful, the API returns a response message containing: - `session_identifier`: the unique ID of the generated response - `generation_number`: the generation number of the response - `message_type`: the type of the response (e.g., `TSAnswer`) - `visualization_type`: the generated visualization type (`Chart`, `Table`, or `Undefined`) - `tokens` / `display_tokens`: the search tokens and user-friendly display tokens for the response #### Error responses | Code | Description | |------|-----------------------------------------------------------------------------------------------------------------------------------------| | 401 | Unauthorized — authentication token is missing, expired, or invalid. | | 403 | Forbidden — the authenticated user does not have `CAN_USE_SPOTTER` privilege or lacks view permission on the specified metadata object. | > ###### Note: > * This endpoint is currently in Beta. Breaking changes may be introduced before the endpoint is made Generally Available. > * This endpoint requires Spotter - please contact ThoughtSpot support to enable Spotter on your cluster. + +### Example + + +```typescript +import { createBearerAuthenticationConfig, ThoughtSpotRestApi, SingleAnswerRequest } from '@thoughtspot/rest-api-sdk'; + +const configuration = createBearerAuthenticationConfig("CLUSTER_SERVER_URL", { + username: "YOUR_USERNAME", + password: "YOUR_PASSWORD", +}); +const apiInstance = new ThoughtSpotRestApi(configuration); + +apiInstance.singleAnswer( + // SingleAnswerRequest + { + query: "query_example", + metadata_identifier: "metadata_identifier_example", + } +).then((data:any) => { + console.log('API called successfully. Returned data: ' + data); +}).catch((error:any) => console.error(error)); + + +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **singleAnswerRequest** | **SingleAnswerRequest**| | + + +### Return type + +**ResponseMessage** + +### Authorization + +[bearerAuth](README.md#bearerAuth) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Common successful response | - | +**201** | Common error response | - | +**400** | Operation failed | - | +**401** | Unauthorized access. | - | +**403** | Forbidden access. | - | +**500** | Operation failed | - | + +[[Back to top]](#) [[Back to API list]](README.md#documentation-for-api-endpoints) [[Back to Model list]](README.md#documentation-for-models) [[Back to README]](README.md) + +# **stopConversation** +> void stopConversation() + + Stops an in-progress agent conversation response. Version: 26.6.0.cl or later Version: 26.6.0.cl or later Stops an in-progress agent response for the specified conversation. Use this endpoint to cancel a response that is actively being generated — for example, when the user navigates away, reformulates their question, or no longer needs the current result. Requires `CAN_USE_SPOTTER` privilege and access to the specified conversation. #### Usage guidelines The request must include: - `conversation_identifier` *(path parameter)*: the unique ID of the conversation whose active response should be stopped, as returned by `createAgentConversation` A successful request returns an empty `204 No Content` response. If there is no active response in progress at the time of the call, the request is still treated as successful. After stopping a response, the conversation session remains active. You can continue sending messages using `sendAgentConversationMessage` or `sendAgentConversationMessageStreaming`. #### Example request ```bash POST /api/rest/2.0/ai/agent/conversation/{conversation_identifier}/stop-response ``` #### Typical usage scenario This endpoint is useful when integrating Spotter into a chat UI where users can cancel a long-running query. For example: 1. User sends a message via `sendAgentConversationMessageStreaming`. 2. User clicks a \"Stop generating\" button while the response is streaming. 3. Your client calls `stopConversation` with the active `conversation_identifier`. 4. The stream is terminated and the user can ask a new question. #### Error responses | Code | Description | |------|-------------| | 401 | Unauthorized — authentication token is missing, expired, or invalid. | | 403 | Forbidden — the authenticated user does not have `CAN_USE_SPOTTER` privilege or lacks access to the specified conversation. | > ###### Note: > > - Calling this endpoint when no response is in progress does not return an error. > - The conversation context is preserved after stopping — previous messages and answers remain accessible. > - Available from version 26.6.0.cl and later. > - This endpoint requires Spotter — please contact ThoughtSpot Support to enable Spotter on your cluster. > - This feature is available only for **Spotter 3** (`SPOTTER3`) version. + +### Example + + +```typescript +import { createBearerAuthenticationConfig, ThoughtSpotRestApi, StopConversationRequest } from '@thoughtspot/rest-api-sdk'; + +const configuration = createBearerAuthenticationConfig("CLUSTER_SERVER_URL", { + username: "YOUR_USERNAME", + password: "YOUR_PASSWORD", +}); +const apiInstance = new ThoughtSpotRestApi(configuration); + +apiInstance.stopConversation( + // string | Unique identifier of the conversation to stop. + "conversation_identifier_example" +).then((data:any) => { + console.log('API called successfully. Returned data: ' + data); +}).catch((error:any) => console.error(error)); + + +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **conversationIdentifier** | [**string**] | Unique identifier of the conversation to stop. | defaults to undefined + + +### Return type + +**void** + +### Authorization + +[bearerAuth](README.md#bearerAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**204** | Successfully stopped the in-progress agent conversation response for the given. | - | +**400** | Operation failed | - | +**401** | Unauthorized access. | - | +**403** | Forbidden access. | - | +**500** | Operation failed | - | + +[[Back to top]](#) [[Back to API list]](README.md#documentation-for-api-endpoints) [[Back to Model list]](README.md#documentation-for-models) [[Back to README]](README.md) + +# **syncMetadata** +> SyncMetadataResponse syncMetadata(syncMetadataRequest) + + Version: 26.5.0.cl or later Synchronizes connection metadata attributes from your Cloud Data Warehouse (CDW) with ThoughtSpot. Requires the `DATAMANAGEMENT` (**Can manage data**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` (**Can manage data models**) privilege is required. #### Usage guidelines To synchronize attributes from a CDW, specify the connection GUID or name in the `connection_identifier` path parameter and `sync_attributes` in the request body. Default attribute is `[\"DESCRIPTION\"]`. ##### Hierarchical schema * Connection: The connection object for the sync operation. * Tables: Tables for the sync operation. When no table is specified, all tables are synchronized. * Columns: If the table is specified, you can add the columns for the sync operation. If no columns are specified, all columns in the specified table are considered for the sync operation. To set the scope for the sync operation: * Connection-level: To sync all tables and columns, pass an empty request body, or only the attributes in the request body. * Table-level: To synchronize specific tables and their columns, specify the table identifiers in the `tables` array. * Column-level: To synchronize specific columns, specify the table identifier as the key and column identifiers as the value in the `tables` array. ``` { \"tables\": [ {\"table-guid-1\": [\"column-guid-1\", \"column-guid-2\"]}, \"table-guid-2\" ], \"sync_attributes\": [\"DESCRIPTION\"] } ``` ##### API response If the sync operation is successful, the API returns the following information: * Status of the sync operation. For example, `SUCCESS`, `PARTIAL_SUCCESS`, or `NO_UPDATE`. * Number of tables and columns that were updated. * Number of tables and columns with the sync failed status when the overall sync status is `PARTIAL_SUCCESS`. * Message text indicating the sync results. + +### Example + + +```typescript +import { createBearerAuthenticationConfig, ThoughtSpotRestApi, SyncMetadataRequest } from '@thoughtspot/rest-api-sdk'; + +const configuration = createBearerAuthenticationConfig("CLUSTER_SERVER_URL", { + username: "YOUR_USERNAME", + password: "YOUR_PASSWORD", +}); +const apiInstance = new ThoughtSpotRestApi(configuration); + +apiInstance.syncMetadata( + // string | Unique ID or name of the connection. + "connection_identifier_example" , + // SyncMetadataRequest + { + tables: {}, + sync_attributes: ["DESCRIPTION"], + } +).then((data:any) => { + console.log('API called successfully. Returned data: ' + data); +}).catch((error:any) => console.error(error)); + + +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **syncMetadataRequest** | **SyncMetadataRequest**| | + **connectionIdentifier** | [**string**] | Unique ID or name of the connection. | defaults to undefined + + +### Return type + +**SyncMetadataResponse** + +### Authorization + +[bearerAuth](README.md#bearerAuth) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Metadata synced successfully. | - | +**400** | Invalid request parameters or hierarchy. | - | +**401** | Unauthorized access. | - | +**403** | Forbidden access. | - | +**404** | Connection, table, or column not found. | - | +**500** | Unexpected error | - | + +[[Back to top]](#) [[Back to API list]](README.md#documentation-for-api-endpoints) [[Back to Model list]](README.md#documentation-for-models) [[Back to README]](README.md) + +# **unassignTag** +> void unassignTag(unassignTagRequest) + + Version: 9.0.0.cl or later Removes the tags applied to a Liveboard, Answer, Table, or Worksheet. Requires edit access to the metadata object. + +### Example + + +```typescript +import { createBearerAuthenticationConfig, ThoughtSpotRestApi, UnassignTagRequest } from '@thoughtspot/rest-api-sdk'; + +const configuration = createBearerAuthenticationConfig("CLUSTER_SERVER_URL", { + username: "YOUR_USERNAME", + password: "YOUR_PASSWORD", +}); +const apiInstance = new ThoughtSpotRestApi(configuration); + +apiInstance.unassignTag( + // UnassignTagRequest + { + metadata: [ + { + type: "LIVEBOARD", + identifier: "identifier_example", + }, + ], + tag_identifiers: [ + "tag_identifiers_example", + ], + } +).then((data:any) => { + console.log('API called successfully. Returned data: ' + data); +}).catch((error:any) => console.error(error)); + + +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **unassignTagRequest** | **UnassignTagRequest**| | + + +### Return type + +**void** + +### Authorization + +[bearerAuth](README.md#bearerAuth) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**204** | Tags successfully unassigned. | - | +**400** | Invalid request. | - | +**401** | Unauthorized access. | - | +**403** | Forbidden access. | - | +**500** | Unexpected error | - | + +[[Back to top]](#) [[Back to API list]](README.md#documentation-for-api-endpoints) [[Back to Model list]](README.md#documentation-for-models) [[Back to README]](README.md) + +# **unparameterizeMetadata** +> void unparameterizeMetadata(unparameterizeMetadataRequest) + + Remove parameterization from fields in metadata objects. Version: 26.5.0.cl or later Allows removing parameterization from fields in metadata objects in ThoughtSpot. Requires appropriate permissions to modify the metadata object. The API endpoint allows unparameterizing the following types of metadata objects: * Logical Tables * Connections * Connection Configs For a Logical Table the field type must be `ATTRIBUTE` and field name can be one of: * databaseName * schemaName * tableName For a Connection or Connection Config, the field type is always `CONNECTION_PROPERTY`. In this case, field_name specifies the exact property of the Connection or Connection Config that needs to be unparameterized. For Connection Config, the only supported field name is: * impersonate_user + +### Example + + +```typescript +import { createBearerAuthenticationConfig, ThoughtSpotRestApi, UnparameterizeMetadataRequest } from '@thoughtspot/rest-api-sdk'; + +const configuration = createBearerAuthenticationConfig("CLUSTER_SERVER_URL", { + username: "YOUR_USERNAME", + password: "YOUR_PASSWORD", +}); +const apiInstance = new ThoughtSpotRestApi(configuration); + +apiInstance.unparameterizeMetadata( + // UnparameterizeMetadataRequest + { + metadata_type: "LOGICAL_TABLE", + metadata_identifier: "metadata_identifier_example", + field_type: "ATTRIBUTE", + field_name: "field_name_example", + value: "value_example", + } +).then((data:any) => { + console.log('API called successfully. Returned data: ' + data); +}).catch((error:any) => console.error(error)); + + +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **unparameterizeMetadataRequest** | **UnparameterizeMetadataRequest**| | + + +### Return type + +**void** + +### Authorization + +[bearerAuth](README.md#bearerAuth) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**204** | Successfuly removed parameters. | - | +**400** | Invalid request. | - | +**401** | Unauthorized access. | - | +**403** | Forbidden access. | - | +**500** | Unexpected error | - | + +[[Back to top]](#) [[Back to API list]](README.md#documentation-for-api-endpoints) [[Back to Model list]](README.md#documentation-for-models) [[Back to README]](README.md) + +# **unpublishMetadata** +> void unpublishMetadata(unpublishMetadataRequest) + + Version: 26.5.0.cl or later Allows unpublishing metadata objects from organizations in ThoughtSpot. Requires ADMINISTRATION role and TENANT scope. The API endpoint allows unpublishing the following types of metadata objects: * Liveboards * Answers * Logical Tables When unpublishing objects, you can: * Include dependencies by setting `include_dependencies` to true - this will unpublish all dependent objects if no other published object is using them * Force unpublish by setting `force` to true - this will break all dependent objects in the unpublished organizations + +### Example + + +```typescript +import { createBearerAuthenticationConfig, ThoughtSpotRestApi, UnpublishMetadataRequest } from '@thoughtspot/rest-api-sdk'; + +const configuration = createBearerAuthenticationConfig("CLUSTER_SERVER_URL", { + username: "YOUR_USERNAME", + password: "YOUR_PASSWORD", +}); +const apiInstance = new ThoughtSpotRestApi(configuration); + +apiInstance.unpublishMetadata( + // UnpublishMetadataRequest + { + force: true, + include_dependencies: true, + metadata: [ + { + identifier: "identifier_example", + type: "LIVEBOARD", + }, + ], + org_identifiers: [ + "org_identifiers_example", + ], + } +).then((data:any) => { + console.log('API called successfully. Returned data: ' + data); +}).catch((error:any) => console.error(error)); + + +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **unpublishMetadataRequest** | **UnpublishMetadataRequest**| | + + +### Return type + +**void** + +### Authorization + +[bearerAuth](README.md#bearerAuth) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**204** | Unpublishing metadata objects is successful. | - | +**400** | Invalid request. | - | +**401** | Unauthorized access. | - | +**403** | Forbidden access. | - | +**500** | Unexpected error | - | + +[[Back to top]](#) [[Back to API list]](README.md#documentation-for-api-endpoints) [[Back to Model list]](README.md#documentation-for-models) [[Back to README]](README.md) + +# **updateCalendar** +> void updateCalendar(updateCalendarRequest) + + Version: 10.12.0.cl or later Updates the properties of a [custom calendar](https://docs.thoughtspot.com/cloud/latest/connections-cust-cal). Requires `DATAMANAGEMENT` (**Can manage data**) or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your ThoughtSpot instance, the `CAN_MANAGE_CUSTOM_CALENDAR` (**Can manage custom calendars**) privilege is required. #### Usage guidelines You can update the properties of a calendar using one of the following methods: * `FROM_INPUT_PARAMS` to update the calendar properties with the values defined in the API request. * `FROM_EXISTING_TABLE` Creates a calendar from the parameters defined in the API request. To update a custom calendar, specify the calendar ID as a path parameter in the request URL and the following parameters in the request body: * Connection ID and Table name * Database and schema name attributes: For most Cloud Data Warehouse (CDW) connectors, both `database_name` and `schema_name` attributes are required. However, the attribute requirements are conditional and vary based on the connector type and its metadata structure. For example, for connectors such as Teradata, MySQL, SingleSore, Amazon Aurora MySQL, Amazon RDS MySQL, Oracle, and GCP_MYSQL, the `schema_name` is required, whereas the `database_name` attribute is not. Similarly, connectors such as ClickHouse require you to specify the `database_name` and the schema specification in such cases is optional. The API allows you to modify the calendar type, month offset value, start and end date, starting day of the week, and prefixes assigned to the year and quarter labels. #### Examples Update a custom calendar using an existing Table in ThoughtSpot: ``` { \"update_method\": \"FROM_EXISTING_TABLE\", \"table_reference\": { \"connection_identifier\": \"Connection1\", \"database_name\": \"db1\", \"table_name\": \"custom_calendar_2025\", \"schame_name\": \"schemaVar\" } } ``` Update a custom calendar with the attributes defined in the API request: ``` { \"update_method\": \"FROM_INPUT_PARAMS\", \"table_reference\": { \"connection_identifier\": \"Connection1\", \"database_name\": \"db1\", \"table_name\": \"custom_calendar_2025\", \"schame_name\": \"schemaVar\" }, \"month_offset\": \"August\", \"start_day_of_week\": \"Monday\", \"start_date\": \"08/01/2025\", \"end_date\": \"07/31/2026\" } ``` + +### Example + + +```typescript +import { createBearerAuthenticationConfig, ThoughtSpotRestApi, UpdateCalendarRequest } from '@thoughtspot/rest-api-sdk'; + +const configuration = createBearerAuthenticationConfig("CLUSTER_SERVER_URL", { + username: "YOUR_USERNAME", + password: "YOUR_PASSWORD", +}); +const apiInstance = new ThoughtSpotRestApi(configuration); + +apiInstance.updateCalendar( + // string | Unique Id or name of the calendar. + "calendar_identifier_example" , + // UpdateCalendarRequest + { + update_method: "FROM_INPUT_PARAMS", + table_reference: null, + start_date: "start_date_example", + end_date: "end_date_example", + calendar_type: "MONTH_OFFSET", + month_offset: "January", + start_day_of_week: "Sunday", + quarter_name_prefix: "", + year_name_prefix: "", + } +).then((data:any) => { + console.log('API called successfully. Returned data: ' + data); +}).catch((error:any) => console.error(error)); + + +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **updateCalendarRequest** | **UpdateCalendarRequest**| | + **calendarIdentifier** | [**string**] | Unique Id or name of the calendar. | defaults to undefined + + +### Return type + +**void** + +### Authorization + +[bearerAuth](README.md#bearerAuth) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**204** | Custom calendar updated successfully. | - | +**400** | Invalid request. | - | +**401** | Unauthorized access. | - | +**403** | Forbidden access. | - | +**500** | Unexpected error | - | + +[[Back to top]](#) [[Back to API list]](README.md#documentation-for-api-endpoints) [[Back to Model list]](README.md#documentation-for-models) [[Back to README]](README.md) + +# **updateCollection** +> void updateCollection(updateCollectionRequest) + + Version: 26.4.0.cl or later Updates an existing collection in ThoughtSpot. #### Supported operations This API endpoint lets you perform the following operations: * Update collection name and description * Change visibility settings * Add metadata objects to the collection (operation: ADD) * Remove metadata objects from the collection (operation: REMOVE) * Replace all metadata objects in the collection (operation: REPLACE) #### Operation types * **ADD**: Adds the specified metadata objects to the existing collection without removing current items * **REMOVE**: Removes only the specified metadata objects from the collection * **REPLACE**: Replaces all existing metadata objects with the specified items (default behavior) + +### Example + + +```typescript +import { createBearerAuthenticationConfig, ThoughtSpotRestApi, UpdateCollectionRequest } from '@thoughtspot/rest-api-sdk'; + +const configuration = createBearerAuthenticationConfig("CLUSTER_SERVER_URL", { + username: "YOUR_USERNAME", + password: "YOUR_PASSWORD", +}); +const apiInstance = new ThoughtSpotRestApi(configuration); + +apiInstance.updateCollection( + // string | Unique GUID of the collection. Note: Collection names cannot be used as identifiers since duplicate names are allowed. + "collection_identifier_example" , + // UpdateCollectionRequest + { + name: "name_example", + description: "description_example", + metadata: [ + { + type: "LIVEBOARD", + identifiers: [ + "identifiers_example", + ], + }, + ], + operation: "REPLACE", + } +).then((data:any) => { + console.log('API called successfully. Returned data: ' + data); +}).catch((error:any) => console.error(error)); + + +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **updateCollectionRequest** | **UpdateCollectionRequest**| | + **collectionIdentifier** | [**string**] | Unique GUID of the collection. Note: Collection names cannot be used as identifiers since duplicate names are allowed. | defaults to undefined + + +### Return type + +**void** + +### Authorization + +[bearerAuth](README.md#bearerAuth) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**204** | Collection updated successfully. No content returned. | - | +**400** | Invalid request. | - | +**401** | Unauthorized access. | - | +**403** | Forbidden access. | - | +**404** | Resource not found. | - | +**500** | Unexpected error | - | + +[[Back to top]](#) [[Back to API list]](README.md#documentation-for-api-endpoints) [[Back to Model list]](README.md#documentation-for-models) [[Back to README]](README.md) + +# **updateColumnSecurityRules** +> void updateColumnSecurityRules(updateColumnSecurityRulesRequest) + + Version: 10.12.0.cl or later Creates, updates, or deletes column security rules for specified tables. This API endpoint allows you to create, update, or delete column-level security rules on columns of a table. The operation follows an \"all or none\" policy: if defining security rules for any of the provided columns fails, the entire operation will be rolled back, and no rules will be created. #### Usage guidelines - Provide table identifier using either `identifier` (GUID or name) or `obj_identifier` (object ID) - Use `clear_csr: true` to remove all column security rules from the table - For each column, specify the security rule using `column_security_rules` array - Use `is_unsecured: true` to mark a specific column as unprotected - Use `group_access` operations to manage group associations: - `ADD`: Add groups to the column\'s access list - `REMOVE`: Remove groups from the column\'s access list - `REPLACE`: Replace all existing groups with the specified groups #### Required permissions - `ADMINISTRATION` - Can administer ThoughtSpot - `DATAMANAGEMENT` - Can manage data (if RBAC is disabled) - `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` - Can manage worksheet views and tables (if RBAC is enabled) #### Example request ```json { \"identifier\": \"table-guid\", \"obj_identifier\": \"table-object-id\", \"clear_csr\": false, \"column_security_rules\": [ { \"column_identifier\": \"col id or col name\", \"is_unsecured\": false, \"group_access\": [ { \"operation\": \"ADD\", \"group_identifiers\": [\"hr_group_id\", \"hr_group_name\", \"finance_group_id\"] } ] }, { \"column_identifier\": \"col id or col name\", \"is_unsecured\": true }, { \"column_identifier\": \"col id or col name\", \"is_unsecured\": false, \"group_access\": [ { \"operation\": \"REPLACE\", \"group_identifiers\": [\"management_group_id\", \"management_group_name\"] } ] } ] } ``` #### Request Body Schema - `identifier` (string, optional): GUID or name of the table for which we want to create column security rules - `obj_identifier` (string, optional): The object ID of the table - `clear_csr` (boolean, optional): If true, then all the secured columns will be marked as unprotected, and all the group associations will be removed - `column_security_rules` (array of objects, required): An array where each object defines the security rule for a specific column Each column security rule object contains: - `column_identifier` (string, required): Column identifier (col_id or name) - `is_unsecured` (boolean, optional): If true, the column will be marked as unprotected and all groups associated with it will be removed - `group_access` (array of objects, optional): Array of group operation objects Each group operation object contains: - `operation` (string, required): Operation type - ADD, REMOVE, or REPLACE - `group_identifiers` (array of strings, required): Array of group identifiers (name or GUID) on which the operation will be performed #### Response This API does not return any response body. A successful operation returns HTTP 200 status code. #### Operation Types - **ADD**: Adds the specified groups to the column\'s access list - **REMOVE**: Removes the specified groups from the column\'s access list - **REPLACE**: Replaces all existing groups with the specified groups + +### Example + + +```typescript +import { createBearerAuthenticationConfig, ThoughtSpotRestApi, UpdateColumnSecurityRulesRequest } from '@thoughtspot/rest-api-sdk'; + +const configuration = createBearerAuthenticationConfig("CLUSTER_SERVER_URL", { + username: "YOUR_USERNAME", + password: "YOUR_PASSWORD", +}); +const apiInstance = new ThoughtSpotRestApi(configuration); + +apiInstance.updateColumnSecurityRules( + // UpdateColumnSecurityRulesRequest + { + identifier: "identifier_example", + obj_identifier: "obj_identifier_example", + clear_csr: true, + column_security_rules: [ + { + column_identifier: "column_identifier_example", + is_unsecured: true, + group_access: [ + { + operation: "ADD", + group_identifiers: [ + "group_identifiers_example", + ], + }, + ], + }, + ], + } +).then((data:any) => { + console.log('API called successfully. Returned data: ' + data); +}).catch((error:any) => console.error(error)); + + +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **updateColumnSecurityRulesRequest** | **UpdateColumnSecurityRulesRequest**| | + + +### Return type + +**void** + +### Authorization + +[bearerAuth](README.md#bearerAuth) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**204** | Successfully updated column security rules | - | +**400** | Bad request - Invalid parameters or table not found | - | +**401** | Unauthorized access. | - | +**403** | Forbidden - User doesn\'t have permission to modify security rules for this table | - | +**500** | Internal server error | - | + +[[Back to top]](#) [[Back to API list]](README.md#documentation-for-api-endpoints) [[Back to Model list]](README.md#documentation-for-models) [[Back to README]](README.md) + +# **updateConfig** +> RepoConfigObject updateConfig(updateConfigRequest) + + Version: 9.2.0.cl or later Updates Git repository configuration settings. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance on your instance, the `CAN_SETUP_VERSION_CONTROL` (**Can set up version control**) privilege. + +### Example + + +```typescript +import { createBearerAuthenticationConfig, ThoughtSpotRestApi, UpdateConfigRequest } from '@thoughtspot/rest-api-sdk'; + +const configuration = createBearerAuthenticationConfig("CLUSTER_SERVER_URL", { + username: "YOUR_USERNAME", + password: "YOUR_PASSWORD", +}); +const apiInstance = new ThoughtSpotRestApi(configuration); + +apiInstance.updateConfig( + // UpdateConfigRequest + { + username: "username_example", + access_token: "access_token_example", + org_identifier: "org_identifier_example", + branch_names: [ + "branch_names_example", + ], + commit_branch_name: "commit_branch_name_example", + enable_guid_mapping: true, + configuration_branch_name: "configuration_branch_name_example", + } +).then((data:any) => { + console.log('API called successfully. Returned data: ' + data); +}).catch((error:any) => console.error(error)); + + +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **updateConfigRequest** | **UpdateConfigRequest**| | + + +### Return type + +**RepoConfigObject** + +### Authorization + +[bearerAuth](README.md#bearerAuth) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Successfully updated local repository configuration | - | +**400** | Invalid request. | - | +**401** | Unauthorized access. | - | +**403** | Forbidden access. | - | +**500** | Unexpected error | - | + +[[Back to top]](#) [[Back to API list]](README.md#documentation-for-api-endpoints) [[Back to Model list]](README.md#documentation-for-models) [[Back to README]](README.md) + +# **updateConnection** +> void updateConnection(updateConnectionRequest) + + Version: 9.2.0.cl or later **Important**: This endpoint is deprecated and will be removed from ThoughtSpot in September 2025. ThoughtSpot strongly recommends using the [Update connection V2](#/http/api-endpoints/connections/update-connection-v2) endpoint to update your connection objects. #### Usage guidelines Updates a connection object. Requires `DATAMANAGEMENT` (**Can manage data**) and edit permissions to the connection object, or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) privilege is required. To update a connection object, pass these parameters in your API request: 1. GUID of the connection object. 2. If you are updating tables or database schema of a connection object: a. Add the updated JSON map of metadata with database, schema, and tables in `data_warehouse_config`. b. Set `validate` to `true`. 3. If you are updating a configuration attribute, connection name, or description, you can set `validate` to `false`. + +### Example + + +```typescript +import { createBearerAuthenticationConfig, ThoughtSpotRestApi, UpdateConnectionRequest } from '@thoughtspot/rest-api-sdk'; + +const configuration = createBearerAuthenticationConfig("CLUSTER_SERVER_URL", { + username: "YOUR_USERNAME", + password: "YOUR_PASSWORD", +}); +const apiInstance = new ThoughtSpotRestApi(configuration); + +apiInstance.updateConnection( + // UpdateConnectionRequest + { + connection_identifier: "connection_identifier_example", + name: "name_example", + description: "description_example", + data_warehouse_config: {}, + validate: true, + } +).then((data:any) => { + console.log('API called successfully. Returned data: ' + data); +}).catch((error:any) => console.error(error)); + + +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **updateConnectionRequest** | **UpdateConnectionRequest**| | + + +### Return type + +**void** + +### Authorization + +[bearerAuth](README.md#bearerAuth) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**204** | Connection successfully updated. | - | +**400** | Invalid request. | - | +**401** | Unauthorized access. | - | +**403** | Forbidden access. | - | +**500** | Unexpected error | - | + +[[Back to top]](#) [[Back to API list]](README.md#documentation-for-api-endpoints) [[Back to Model list]](README.md#documentation-for-models) [[Back to README]](README.md) + +# **updateConnectionConfiguration** +> void updateConnectionConfiguration(updateConnectionConfigurationRequest) + + Version: 10.12.0.cl or later Updates a connection configuration object. Requires `DATAMANAGEMENT` (**Can manage data**) and edit permissions to the connection object, or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) privilege is required. #### Supported operations This API endpoint lets you perform the following operations in a single API request: * Edit the name or description of the configuration * Edit the configuration properties * Edit the `policy_type` * Edit the type of authentication * Enable or disable a configuration #### Parameterized Connection Support For parameterized oauth based connections, only the `same_as_parent` and `policy_process_options` attributes are allowed. These attributes are not applicable to connections that are not parameterized. **NOTE**: When updating a configuration where `disabled` is `true`, you must reset `disabled` to `true` in your update request payload. If not explicitly set again, the API will default `disabled` to `false`. + +### Example + + +```typescript +import { createBearerAuthenticationConfig, ThoughtSpotRestApi, UpdateConnectionConfigurationRequest } from '@thoughtspot/rest-api-sdk'; + +const configuration = createBearerAuthenticationConfig("CLUSTER_SERVER_URL", { + username: "YOUR_USERNAME", + password: "YOUR_PASSWORD", +}); +const apiInstance = new ThoughtSpotRestApi(configuration); + +apiInstance.updateConnectionConfiguration( + // string | Unique ID or name of the configuration. + "configuration_identifier_example" , + // UpdateConnectionConfigurationRequest + { + connection_identifier: "connection_identifier_example", + name: "name_example", + description: "description_example", + same_as_parent: false, + policy_process_options: null, + authentication_type: "SERVICE_ACCOUNT", + configuration: {}, + policy_type: "NO_POLICY", + policy_principals: [ + "policy_principals_example", + ], + policy_processes: [ + "SAGE_INDEXING", + ], + disable: false, + } +).then((data:any) => { + console.log('API called successfully. Returned data: ' + data); +}).catch((error:any) => console.error(error)); + + +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **updateConnectionConfigurationRequest** | **UpdateConnectionConfigurationRequest**| | + **configurationIdentifier** | [**string**] | Unique ID or name of the configuration. | defaults to undefined + + +### Return type + +**void** + +### Authorization + +[bearerAuth](README.md#bearerAuth) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**204** | Connection configuration successfully updated. | - | +**400** | Invalid request. | - | +**401** | Unauthorized access. | - | +**403** | Forbidden access. | - | +**500** | Unexpected error | - | + +[[Back to top]](#) [[Back to API list]](README.md#documentation-for-api-endpoints) [[Back to Model list]](README.md#documentation-for-models) [[Back to README]](README.md) + +# **updateConnectionStatus** +> void updateConnectionStatus(updateConnectionStatusRequest) + + Version: 26.6.0.cl or later Activates or deactivates a connection. A deactivated connection cannot be used for queries or operations until it is activated again. Requires `DATAMANAGEMENT` (**Can manage data**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) privilege is required. Only the connection owner or an administrator can perform this operation. #### Usage guidelines To update the status of a connection, specify the connection GUID or name in the `connection_identifier` path parameter and the desired `status` in the request body. - **ACTIVATED**: Enables the connection. Queries and operations can resume on an activated connection. - **DEACTIVATED**: Disables the connection. It does not remove the connection metadata, but only makes the connection unavailable for queries and operations. You can reactivate a deactivated connection by setting \"status\": \"ACTIVATED\". + +### Example + + +```typescript +import { createBearerAuthenticationConfig, ThoughtSpotRestApi, UpdateConnectionStatusRequest } from '@thoughtspot/rest-api-sdk'; + +const configuration = createBearerAuthenticationConfig("CLUSTER_SERVER_URL", { + username: "YOUR_USERNAME", + password: "YOUR_PASSWORD", +}); +const apiInstance = new ThoughtSpotRestApi(configuration); + +apiInstance.updateConnectionStatus( + // string | Unique ID or name of the connection. + "connection_identifier_example" , + // UpdateConnectionStatusRequest + { + status: "ACTIVATED", + } +).then((data:any) => { + console.log('API called successfully. Returned data: ' + data); +}).catch((error:any) => console.error(error)); + + +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **updateConnectionStatusRequest** | **UpdateConnectionStatusRequest**| | + **connectionIdentifier** | [**string**] | Unique ID or name of the connection. | defaults to undefined + + +### Return type + +**void** + +### Authorization + +[bearerAuth](README.md#bearerAuth) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**204** | Connection status updated successfully. | - | +**400** | Invalid request. | - | +**401** | Unauthorized access. | - | +**403** | Forbidden access. | - | +**404** | Object not found | - | +**500** | Unexpected error | - | + +[[Back to top]](#) [[Back to API list]](README.md#documentation-for-api-endpoints) [[Back to Model list]](README.md#documentation-for-models) [[Back to README]](README.md) + +# **updateConnectionV2** +> void updateConnectionV2(updateConnectionV2Request) + + Version: 10.4.0.cl or later Updates a connection object. Requires `DATAMANAGEMENT` (**Can manage data**) and edit permissions to the connection object, or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) privilege is required. To update a connection object, pass these parameters in your API request: 1. GUID of the connection object. 2. If you are updating tables or database schema of a connection object: a. Add the updated JSON map of metadata with database, schema, and tables in `data_warehouse_config`. b. Set `validate` to `true`. **NOTE:** If the `authentication_type` is anything other than SERVICE_ACCOUNT, you must explicitly provide the authenticationType property in the payload. If you do not specify authenticationType, the API will default to SERVICE_ACCOUNT as the authentication type. * A JSON map of configuration attributes, database details, and table properties in `data_warehouse_config` as shown in the following example: * This is an example of updating a single table in a empty connection: ``` { \"authenticationType\": \"SERVICE_ACCOUNT\", \"externalDatabases\": [ { \"name\": \"DEVELOPMENT\", \"isAutoCreated\": false, \"schemas\": [ { \"name\": \"TS_dataset\", \"tables\": [ { \"name\": \"DEMORENAME\", \"type\": \"TABLE\", \"description\": \"\", \"selected\": true, \"linked\": true, \"gid\": 0, \"datasetId\": \"-1\", \"subType\": \"\", \"reportId\": \"\", \"viewId\": \"\", \"columns\": [ { \"name\": \"Col1\", \"type\": \"VARCHAR\", \"canImport\": true, \"selected\": true, \"description\": \"\", \"isLinkedActive\": true, \"isAggregate\": false }, { \"name\": \"Col2\", \"type\": \"VARCHAR\", \"canImport\": true, \"selected\": true, \"description\": \"\", \"isLinkedActive\": true, \"isAggregate\": false }, { \"name\": \"Col3\", \"type\": \"VARCHAR\", \"canImport\": true, \"selected\": true, \"description\": \"\", \"isLinkedActive\": true, \"isAggregate\": false }, { \"name\": \"Col312\", \"type\": \"VARCHAR\", \"canImport\": true, \"selected\": true, \"description\": \"\", \"isLinkedActive\": true, \"isAggregate\": false }, { \"name\": \"Col4\", \"type\": \"VARCHAR\", \"canImport\": true, \"selected\": true, \"description\": \"\", \"isLinkedActive\": true, \"isAggregate\": false } ], \"relationships\": [] } ] } ] } ], \"configuration\": { \"password\": \"\", \"database\": \"DEVELOPMENT\", \"role\": \"DEV\", \"accountName\": \"thoughtspot_partner\", \"warehouse\": \"DEMO_WH\", \"user\": \"DEV_USER\" } } ``` * This is an example of updating a single table in an existing connection with tables: ``` { \"authenticationType\": \"SERVICE_ACCOUNT\", \"externalDatabases\": [ { \"name\": \"DEVELOPMENT\", \"isAutoCreated\": false, \"schemas\": [ { \"name\": \"TS_dataset\", \"tables\": [ { \"name\": \"CUSTOMER\", \"type\": \"TABLE\", \"description\": \"\", \"selected\": true, \"linked\": true, \"gid\": 0, \"datasetId\": \"-1\", \"subType\": \"\", \"reportId\": \"\", \"viewId\": \"\", \"columns\": [], \"relationships\": [] }, { \"name\": \"tpch5k_falcon_default_schema_users\", \"type\": \"TABLE\", \"description\": \"\", \"selected\": true, \"linked\": true, \"gid\": 0, \"datasetId\": \"-1\", \"subType\": \"\", \"reportId\": \"\", \"viewId\": \"\", \"columns\": [ { \"name\": \"user_id\", \"type\": \"INT64\", \"canImport\": true, \"selected\": true, \"description\": \"\", \"isLinkedActive\": true, \"isAggregate\": false }, { \"name\": \"product_id\", \"type\": \"INT64\", \"canImport\": true, \"selected\": true, \"description\": \"\", \"isLinkedActive\": true, \"isAggregate\": false }, { \"name\": \"user_cost\", \"type\": \"INT64\", \"canImport\": true, \"selected\": true, \"description\": \"\", \"isLinkedActive\": true, \"isAggregate\": false } ], \"relationships\": [] } ] } ] } ], \"configuration\": { \"password\": \"\", \"database\": \"DEVELOPMENT\", \"role\": \"DEV\", \"accountName\": \"thoughtspot_partner\", \"warehouse\": \"DEMO_WH\", \"user\": \"DEV_USER\" } } ``` 3. If you are updating a configuration attribute, connection name, or description, you can set `validate` to `false`. **NOTE:** If the `authentication_type` is anything other than SERVICE_ACCOUNT, you must explicitly provide the authenticationType property in the payload. If you do not specify authenticationType, the API will default to SERVICE_ACCOUNT as the authentication type. * A JSON map of configuration attributes in `data_warehouse_config`. The following example shows the configuration attributes for a Snowflake connection: ``` { \"configuration\":{ \"accountName\":\"thoughtspot_partner\", \"user\":\"tsadmin\", \"password\":\"TestConn123\", \"role\":\"sysadmin\", \"warehouse\":\"MEDIUM_WH\" }, \"externalDatabases\":[ ] } ``` + +### Example + + +```typescript +import { createBearerAuthenticationConfig, ThoughtSpotRestApi, UpdateConnectionV2Request } from '@thoughtspot/rest-api-sdk'; + +const configuration = createBearerAuthenticationConfig("CLUSTER_SERVER_URL", { + username: "YOUR_USERNAME", + password: "YOUR_PASSWORD", +}); +const apiInstance = new ThoughtSpotRestApi(configuration); + +apiInstance.updateConnectionV2( + // string | Unique ID or name of the connection. + "connection_identifier_example" , + // UpdateConnectionV2Request + { + name: "name_example", + description: "description_example", + data_warehouse_config: {}, + validate: true, + } +).then((data:any) => { + console.log('API called successfully. Returned data: ' + data); +}).catch((error:any) => console.error(error)); + + +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **updateConnectionV2Request** | **UpdateConnectionV2Request**| | + **connectionIdentifier** | [**string**] | Unique ID or name of the connection. | defaults to undefined + + +### Return type + +**void** + +### Authorization + +[bearerAuth](README.md#bearerAuth) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**204** | Connection successfully updated. | - | +**400** | Invalid request. | - | +**401** | Unauthorized access. | - | +**403** | Forbidden access. | - | +**500** | Unexpected error | - | + +[[Back to top]](#) [[Back to API list]](README.md#documentation-for-api-endpoints) [[Back to Model list]](README.md#documentation-for-models) [[Back to README]](README.md) + +# **updateCustomAction** +> void updateCustomAction(updateCustomActionRequest) + + Version: 9.6.0.cl or later Updates a custom action. Requires `DEVELOPER` (**Has Developer privilege**) or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `DEVELOPER` (**Has developer privilege**) privilege is required. #### Usage Guidelines The API allows you to modify the following properties: * Name of the custom action * Action availability to groups * Association to metadata objects * Authentication settings for a URL-based action For more information, see [Custom actions](https://developers.thoughtspot.com/docs/custom-action-intro). + +### Example + + +```typescript +import { createBearerAuthenticationConfig, ThoughtSpotRestApi, UpdateCustomActionRequest } from '@thoughtspot/rest-api-sdk'; + +const configuration = createBearerAuthenticationConfig("CLUSTER_SERVER_URL", { + username: "YOUR_USERNAME", + password: "YOUR_PASSWORD", +}); +const apiInstance = new ThoughtSpotRestApi(configuration); + +apiInstance.updateCustomAction( + // string | Unique ID or name of the custom action. + "custom_action_identifier_example" , + // UpdateCustomActionRequest + { + action_details: null, + associate_metadata: [ + { + action_config: { + position: "MENU", + visibility: true, + }, + identifier: "identifier_example", + type: "VISUALIZATION", + }, + ], + default_action_config: null, + group_identifiers: [ + "group_identifiers_example", + ], + name: "name_example", + operation: "ADD", + } +).then((data:any) => { + console.log('API called successfully. Returned data: ' + data); +}).catch((error:any) => console.error(error)); + + +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **updateCustomActionRequest** | **UpdateCustomActionRequest**| | + **customActionIdentifier** | [**string**] | Unique ID or name of the custom action. | defaults to undefined + + +### Return type + +**void** + +### Authorization + +[bearerAuth](README.md#bearerAuth) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**204** | Custom action updated successfully. | - | +**400** | Invalid request. | - | +**401** | Unauthorized access. | - | +**403** | Forbidden access. | - | +**500** | Unexpected error | - | + +[[Back to top]](#) [[Back to API list]](README.md#documentation-for-api-endpoints) [[Back to Model list]](README.md#documentation-for-models) [[Back to README]](README.md) + +# **updateDbtConnection** +> any updateDbtConnection() + + Version: 9.9.0.cl or later Updates a DBT connection object. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege or `DATAMANAGEMENT` (**Can manage data ThoughtSpot**) privilege, along with an existing DBT connection. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the following data control privileges may be required: - `CAN_MANAGE_CUSTOM_CALENDAR`(**Can manage custom calendars**) - `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) - `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` (**Can manage data models**) #### About update DBT connection You can modify DBT connection object properties such as embrace connection name, embrace database name, import type, account identifier, access token, project identifier and environment (or) embrace connection, embrace database name, import type, file_content settings. + +### Example + + +```typescript +import { createBearerAuthenticationConfig, ThoughtSpotRestApi, UpdateDbtConnectionRequest } from '@thoughtspot/rest-api-sdk'; + +const configuration = createBearerAuthenticationConfig("CLUSTER_SERVER_URL", { + username: "YOUR_USERNAME", + password: "YOUR_PASSWORD", +}); +const apiInstance = new ThoughtSpotRestApi(configuration); + +apiInstance.updateDbtConnection( + // string | Unique ID of the DBT Connection. + "dbtConnectionIdentifier_example" , + // string | Name of the connection. (optional) + "connectionName_example" , + // string | Name of the Database. (optional) + "databaseName_example" , + // string | Mention type of Import (optional) + "DBT_CLOUD" , + // string | Access token is mandatory when Import_Type is DBT_CLOUD. (optional) + "accessToken_example" , + // string | DBT URL is mandatory when Import_Type is DBT_CLOUD. (optional) + "dbtUrl_example" , + // string | Account ID is mandatory when Import_Type is DBT_CLOUD (optional) + "accountId_example" , + // string | Project ID is mandatory when Import_Type is DBT_CLOUD (optional) + "projectId_example" , + // string | DBT Environment ID\\\" (optional) + "dbtEnvId_example" , + // string | Name of the project (optional) + "projectName_example" , + // HttpFile | Upload DBT Manifest and Catalog artifact files as a ZIP file. This field is Mandatory when Import Type is \\\'ZIP_FILE\\\' (optional) + { data: Buffer.from(fs.readFileSync('/path/to/file', 'utf-8')), name: '/path/to/file' } +).then((data:any) => { + console.log('API called successfully. Returned data: ' + data); +}).catch((error:any) => console.error(error)); + + +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **dbtConnectionIdentifier** | [**string**] | Unique ID of the DBT Connection. | defaults to undefined + **connectionName** | [**string**] | Name of the connection. | (optional) defaults to undefined + **databaseName** | [**string**] | Name of the Database. | (optional) defaults to undefined + **importType** | [**string**]**Array<'DBT_CLOUD' | 'ZIP_FILE'>** | Mention type of Import | (optional) defaults to 'DBT_CLOUD' + **accessToken** | [**string**] | Access token is mandatory when Import_Type is DBT_CLOUD. | (optional) defaults to undefined + **dbtUrl** | [**string**] | DBT URL is mandatory when Import_Type is DBT_CLOUD. | (optional) defaults to undefined + **accountId** | [**string**] | Account ID is mandatory when Import_Type is DBT_CLOUD | (optional) defaults to undefined + **projectId** | [**string**] | Project ID is mandatory when Import_Type is DBT_CLOUD | (optional) defaults to undefined + **dbtEnvId** | [**string**] | DBT Environment ID\\\" | (optional) defaults to undefined + **projectName** | [**string**] | Name of the project | (optional) defaults to undefined + **fileContent** | [**HttpFile**] | Upload DBT Manifest and Catalog artifact files as a ZIP file. This field is Mandatory when Import Type is \\\'ZIP_FILE\\\' | (optional) defaults to undefined + + +### Return type + +**any** + +### Authorization + +[bearerAuth](README.md#bearerAuth) + +### HTTP request headers + + - **Content-Type**: multipart/form-data + - **Accept**: application/json + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | DBT Connection successfully updated. | - | +**400** | Invalid request. | - | +**401** | Unauthorized access. | - | +**403** | Forbidden access. | - | +**500** | Unexpected error | - | + +[[Back to top]](#) [[Back to API list]](README.md#documentation-for-api-endpoints) [[Back to Model list]](README.md#documentation-for-models) [[Back to README]](README.md) + +# **updateEmailCustomization** +> void updateEmailCustomization(updateEmailCustomizationRequest) + + Version: 10.12.0.cl or later Updates a customization configuration for the notification email. #### Pre-requisites Requires `DEVELOPER` (**has developer privilege**) or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `DEVELOPER` (**Has developer privilege**) privilege is required. **NOTE**:This endpoint in currently in beta. Contact ThoughtSpot support to enable this on your instance. #### Usage guidelines To update a custom configuration pass these parameters in your API request: - A JSON map of configuration attributes `template_properties`. The following example shows a sample set of customization configuration: ``` { { \"cta_button_bg_color\": \"#444DEA\", \"cta_text_font_color\": \"#FFFFFF\", \"primary_bg_color\": \"#D3DEF0\", \"logo_url\": \"https://storage.pardot.com/710713/1642089901EbkRibJq/TS_fullworkmark_darkmode.png\", \"font_family\": \"\", \"product_name\": \"ThoughtSpot\", \"footer_address\": \"444 Castro St, Suite 1000 Mountain View, CA 94041\", \"footer_phone\": \"(800) 508-7008\", \"replacement_value_for_liveboard\": \"Dashboard\", \"replacement_value_for_answer\": \"Chart\", \"replacement_value_for_spot_iq\": \"AI Insights\", \"hide_footer_phone\": false, \"hide_footer_address\": false, \"hide_product_name\": false, \"hide_manage_notification\": false, \"hide_mobile_app_nudge\": false, \"hide_privacy_policy\": false, \"hide_ts_vocabulary_definitions\": false, \"hide_error_message\": false, \"hide_unsubscribe_link\": false, \"hide_notification_status\": false, \"hide_modify_alert\": false, \"company_website_url\": \"https://your-website.com/\", \"company_privacy_policy_url\" : \"https://link-to-privacy-policy.com/\", \"contact_support_url\": \"https://link-to-contact-support.com/\", \"hide_contact_support_url\": false, \"hide_logo_url\" : false } } ``` + +### Example + + +```typescript +import { createBearerAuthenticationConfig, ThoughtSpotRestApi, UpdateEmailCustomizationRequest } from '@thoughtspot/rest-api-sdk'; + +const configuration = createBearerAuthenticationConfig("CLUSTER_SERVER_URL", { + username: "YOUR_USERNAME", + password: "YOUR_PASSWORD", +}); +const apiInstance = new ThoughtSpotRestApi(configuration); + +apiInstance.updateEmailCustomization( + // UpdateEmailCustomizationRequest + { + template_properties: null, + org_identifier: "org_identifier_example", + } +).then((data:any) => { + console.log('API called successfully. Returned data: ' + data); +}).catch((error:any) => console.error(error)); + + +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **updateEmailCustomizationRequest** | **UpdateEmailCustomizationRequest**| | + + +### Return type + +**void** + +### Authorization + +[bearerAuth](README.md#bearerAuth) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**204** | Email Customization configuration successfully updated. | - | +**400** | Invalid request. | - | +**401** | Unauthorized access. | - | +**403** | Unauthorized access. | - | +**500** | Unexpected error | - | + +[[Back to top]](#) [[Back to API list]](README.md#documentation-for-api-endpoints) [[Back to Model list]](README.md#documentation-for-models) [[Back to README]](README.md) + +# **updateMetadataHeader** +> void updateMetadataHeader(updateMetadataHeaderRequest) + + Update header attributes for a given list of header objects. Version: 10.6.0.cl or later ## Prerequisites - **Privileges Required:** - `DATAMANAGEMENT` (Can manage data) or `ADMINISTRATION` (Can administer ThoughtSpot). - **Additional Privileges (if RBAC is enabled):** - `ORG_ADMINISTRATION` (Can manage orgs). --- ## Usage Guidelines ### Parameters 1. **headers_update** - **Description:** List of header objects with their attributes to be updated. Each object contains a list of attributes to be updated in the header. - **Usage:** - You must provide either `identifier` or `obj_identifier`, but not both. Both fields cannot be empty. - When `org_identifier` is set to `-1`, only the `identifier` value is accepted; `obj_identifier` is not allowed. 2. **org_identifier** - **Description:** GUID (Globally Unique Identifier) or name of the organization. - **Usage:** - Leaving this field empty assumes that the changes should be applied to the current organization - Provide `org_guid` or `org_name` to uniquely identify the organization where changes need to be applied. . - Provide `-1` if changes have to be applied across all the org. --- ## Note Currently, this API is enabled only for updating the `obj_identifier` attribute. Only `text` will be allowed in attribute\'s value. ## Best Practices 1. **Backup Before Conversion:** Always export metadata as a backup before initiating the update process --- ## Examples ### Only `identifier` is given ```json { \"headers_update\": [ { \"identifier\": \"guid_1\", \"obj_identifier\": \"\", \"type\": \"LOGICAL_COLUMN\", \"attributes\": [ { \"name\": \"obj_id\", \"value\": \"custom_object_id\" } ] } ], \"org_identifier\": \"orgGuid\" } ``` ### Only `obj_identifier` is given ```json { \"headers_update\": [ { \"obj_identifier\": \"custom_object_id\", \"type\": \"ANSWER\", \"attributes\": [ { \"name\": \"obj_id\", \"value\": \"custom_object_id\" } ] } ], \"org_identifier\": \"orgName\" } ``` ### Executing update for all org `-1` ```json { \"headers_update\": [ { \"identifier\": \"guid_1\", \"type\": \"ANSWER\", \"attributes\": [ { \"name\": \"obj_id\", \"value\": \"custom_object_id\" } ] } ], \"org_identifier\": -1 } ``` ### Optional `type` is not provided ```json { \"headers_update\": [ { \"identifier\": \"guid_1\", \"attributes\": [ { \"name\": \"obj_id\", \"value\": \"custom_object_id\" } ] } ], \"org_identifier\": -1 } ``` + +### Example + + +```typescript +import { createBearerAuthenticationConfig, ThoughtSpotRestApi, UpdateMetadataHeaderRequest } from '@thoughtspot/rest-api-sdk'; + +const configuration = createBearerAuthenticationConfig("CLUSTER_SERVER_URL", { + username: "YOUR_USERNAME", + password: "YOUR_PASSWORD", +}); +const apiInstance = new ThoughtSpotRestApi(configuration); + +apiInstance.updateMetadataHeader( + // UpdateMetadataHeaderRequest + { + headers_update: [ + { + identifier: "identifier_example", + obj_identifier: "obj_identifier_example", + type: "ANSWER", + attributes: [ + { + name: "name_example", + value: "value_example", + }, + ], + }, + ], + org_identifier: "org_identifier_example", + } +).then((data:any) => { + console.log('API called successfully. Returned data: ' + data); +}).catch((error:any) => console.error(error)); + + +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **updateMetadataHeaderRequest** | **UpdateMetadataHeaderRequest**| | + + +### Return type + +**void** + +### Authorization + +[bearerAuth](README.md#bearerAuth) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**204** | Headers update was successful. | - | +**400** | Invalid request. | - | +**401** | Unauthorized access. | - | +**403** | Forbidden access. | - | +**500** | Unexpected error | - | + +[[Back to top]](#) [[Back to API list]](README.md#documentation-for-api-endpoints) [[Back to Model list]](README.md#documentation-for-models) [[Back to README]](README.md) + +# **updateMetadataObjId** +> void updateMetadataObjId(updateMetadataObjIdRequest) + + Update object IDs for given metadata objects. Version: 10.8.0.cl or later ## Prerequisites - **Privileges Required:** - `DATAMANAGEMENT` (Can manage data) or `ADMINISTRATION` (Can administer ThoughtSpot). - **Additional Privileges (if RBAC is enabled):** - `ORG_ADMINISTRATION` (Can manage orgs). --- ## Usage Guidelines ### Parameters 1. **metadata** - **Description:** List of metadata objects to update their object IDs. - **Usage:** - Use either `current_obj_id` alone OR use `metadata_identifier` with `type` (when needed). - When using `metadata_identifier`, the `type` field is required if using a name instead of a GUID. - The `new_obj_id` field is always required. --- ## Note This API is specifically designed for updating object IDs of metadata objects. It internally uses the header update mechanism to perform the changes. ## Best Practices 1. **Backup Before Update:** Always export metadata as a backup before initiating the update process. 2. **Validation:** - When using `current_obj_id`, ensure it matches the existing object ID exactly. - When using `metadata_identifier` with a name, ensure the `type` is specified correctly. - Verify that the `new_obj_id` follows your naming conventions and is unique within your system. --- ## Examples ### Using current_obj_id ```json { \"metadata\": [ { \"current_obj_id\": \"existing_object_id\", \"new_obj_id\": \"new_object_id\" } ] } ``` ### Using metadata_identifier with GUID ```json { \"metadata\": [ { \"metadata_identifier\": \"01234567-89ab-cdef-0123-456789abcdef\", \"new_obj_id\": \"new_object_id\" } ] } ``` ### Using metadata_identifier with name and type ```json { \"metadata\": [ { \"metadata_identifier\": \"My Answer\", \"type\": \"ANSWER\", \"new_obj_id\": \"new_object_id\" } ] } ``` ### Multiple objects update ```json { \"metadata\": [ { \"current_obj_id\": \"existing_object_id_1\", \"new_obj_id\": \"new_object_id_1\" }, { \"metadata_identifier\": \"My Worksheet\", \"type\": \"LOGICAL_TABLE\", \"new_obj_id\": \"new_object_id_2\" } ] } ``` + +### Example + + +```typescript +import { createBearerAuthenticationConfig, ThoughtSpotRestApi, UpdateMetadataObjIdRequest } from '@thoughtspot/rest-api-sdk'; + +const configuration = createBearerAuthenticationConfig("CLUSTER_SERVER_URL", { + username: "YOUR_USERNAME", + password: "YOUR_PASSWORD", +}); +const apiInstance = new ThoughtSpotRestApi(configuration); + +apiInstance.updateMetadataObjId( + // UpdateMetadataObjIdRequest + { + metadata: [ + { + metadata_identifier: "metadata_identifier_example", + type: "ANSWER", + current_obj_id: "current_obj_id_example", + new_obj_id: "new_obj_id_example", + }, + ], + } +).then((data:any) => { + console.log('API called successfully. Returned data: ' + data); +}).catch((error:any) => console.error(error)); + + +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **updateMetadataObjIdRequest** | **UpdateMetadataObjIdRequest**| | + + +### Return type + +**void** + +### Authorization + +[bearerAuth](README.md#bearerAuth) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**204** | Headers update was successful. | - | +**400** | Invalid request. | - | +**401** | Unauthorized access. | - | +**403** | Forbidden access. | - | +**500** | Unexpected error | - | + +[[Back to top]](#) [[Back to API list]](README.md#documentation-for-api-endpoints) [[Back to Model list]](README.md#documentation-for-models) [[Back to README]](README.md) + +# **updateOrg** +> void updateOrg(updateOrgRequest) + + Version: 9.0.0.cl or later Updates an Org object. You can modify Org properties such as name, description, and user associations. Requires cluster administration (**Can administer Org**) privileges. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `ORG_ADMINISTRATION` (**Can manage Orgs**) privilege is required. + +### Example + + +```typescript +import { createBearerAuthenticationConfig, ThoughtSpotRestApi, UpdateOrgRequest } from '@thoughtspot/rest-api-sdk'; + +const configuration = createBearerAuthenticationConfig("CLUSTER_SERVER_URL", { + username: "YOUR_USERNAME", + password: "YOUR_PASSWORD", +}); +const apiInstance = new ThoughtSpotRestApi(configuration); + +apiInstance.updateOrg( + // string | ID or name of the Org + "org_identifier_example" , + // UpdateOrgRequest + { + name: "name_example", + description: "description_example", + user_identifiers: [ + "user_identifiers_example", + ], + group_identifiers: [ + "group_identifiers_example", + ], + operation: "ADD", + } +).then((data:any) => { + console.log('API called successfully. Returned data: ' + data); +}).catch((error:any) => console.error(error)); + + +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **updateOrgRequest** | **UpdateOrgRequest**| | + **orgIdentifier** | [**string**] | ID or name of the Org | defaults to undefined + + +### Return type + +**void** + +### Authorization + +[bearerAuth](README.md#bearerAuth) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**204** | Organization successfully updated. | - | +**400** | Invalid request. | - | +**401** | Unauthorized access. | - | +**403** | Forbidden access. | - | +**500** | Unexpected error | - | + +[[Back to top]](#) [[Back to API list]](README.md#documentation-for-api-endpoints) [[Back to Model list]](README.md#documentation-for-models) [[Back to README]](README.md) + +# **updateRole** +> RoleResponse updateRole(updateRoleRequest) + + Version: 9.5.0.cl or later Updates the properties of a Role object. Available only if [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance. To update a Role, the `ROLE_ADMINISTRATION` (**Can manage roles**) privilege is required. + +### Example + + +```typescript +import { createBearerAuthenticationConfig, ThoughtSpotRestApi, UpdateRoleRequest } from '@thoughtspot/rest-api-sdk'; + +const configuration = createBearerAuthenticationConfig("CLUSTER_SERVER_URL", { + username: "YOUR_USERNAME", + password: "YOUR_PASSWORD", +}); +const apiInstance = new ThoughtSpotRestApi(configuration); + +apiInstance.updateRole( + // string | Unique ID or name of the Role. + "role_identifier_example" , + // UpdateRoleRequest + { + name: "name_example", + description: "description_example", + privileges: [ + "USERDATAUPLOADING", + ], + } +).then((data:any) => { + console.log('API called successfully. Returned data: ' + data); +}).catch((error:any) => console.error(error)); + + +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **updateRoleRequest** | **UpdateRoleRequest**| | + **roleIdentifier** | [**string**] | Unique ID or name of the Role. | defaults to undefined + + +### Return type + +**RoleResponse** + +### Authorization + +[bearerAuth](README.md#bearerAuth) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Role successfully updated. | - | +**400** | Invalid request. | - | +**401** | Unauthorized access. | - | +**403** | Forbidden access. | - | +**500** | Unexpected error | - | + +[[Back to top]](#) [[Back to API list]](README.md#documentation-for-api-endpoints) [[Back to Model list]](README.md#documentation-for-models) [[Back to README]](README.md) + +# **updateSchedule** +> void updateSchedule(updateScheduleRequest) + + Update schedule. Version: 9.4.0.cl or later Updates a scheduled Liveboard job. Requires at least edit access to Liveboards. To update a schedule on behalf of another user, you need `ADMINISTRATION` (**Can administer Org**) or `JOBSCHEDULING` (**Can schedule for others**) privilege and edit access to the Liveboard. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `JOBSCHEDULING` (**Can schedule for others**) privilege is required. The API endpoint allows you to pause a scheduled job, change the status of a paused job. You can also edit the recipients list, frequency of the job, format of the file to send to the recipients in email notifications, PDF options, and time zone setting. + +### Example + + +```typescript +import { createBearerAuthenticationConfig, ThoughtSpotRestApi, UpdateScheduleRequest } from '@thoughtspot/rest-api-sdk'; + +const configuration = createBearerAuthenticationConfig("CLUSTER_SERVER_URL", { + username: "YOUR_USERNAME", + password: "YOUR_PASSWORD", +}); +const apiInstance = new ThoughtSpotRestApi(configuration); + +apiInstance.updateSchedule( + // string | Unique ID or name of the schedule. + "schedule_identifier_example" , + // UpdateScheduleRequest + { + name: "name_example", + description: "description_example", + metadata_type: "LIVEBOARD", + metadata_identifier: "metadata_identifier_example", + file_format: "CSV", + liveboard_options: null, + pdf_options: null, + time_zone: "Africa/Abidjan", + frequency: null, + recipient_details: null, + status: "ACTIVE", + personalised_view_id: "personalised_view_id_example", + } +).then((data:any) => { + console.log('API called successfully. Returned data: ' + data); +}).catch((error:any) => console.error(error)); + + +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **updateScheduleRequest** | **UpdateScheduleRequest**| | + **scheduleIdentifier** | [**string**] | Unique ID or name of the schedule. | defaults to undefined + + +### Return type + +**void** + +### Authorization + +[bearerAuth](README.md#bearerAuth) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**204** | Schedule successfully updated. | - | +**400** | Invalid request. | - | +**401** | Unauthorized access. | - | +**403** | Forbidden access. | - | +**500** | Unexpected error | - | + +[[Back to top]](#) [[Back to API list]](README.md#documentation-for-api-endpoints) [[Back to Model list]](README.md#documentation-for-models) [[Back to README]](README.md) + +# **updateSystemConfig** +> void updateSystemConfig(updateSystemConfigRequest) + + Version: 9.2.0.cl or later Updates the current configuration of the cluster. You must send the configuration data in JSON format. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privileges. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `APPLICATION_ADMINISTRATION` (**Can manage application settings**) privilege is required. + +### Example + + +```typescript +import { createBearerAuthenticationConfig, ThoughtSpotRestApi, UpdateSystemConfigRequest } from '@thoughtspot/rest-api-sdk'; + +const configuration = createBearerAuthenticationConfig("CLUSTER_SERVER_URL", { + username: "YOUR_USERNAME", + password: "YOUR_PASSWORD", +}); +const apiInstance = new ThoughtSpotRestApi(configuration); + +apiInstance.updateSystemConfig( + // UpdateSystemConfigRequest + { + configuration: {}, + } +).then((data:any) => { + console.log('API called successfully. Returned data: ' + data); +}).catch((error:any) => console.error(error)); + + +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **updateSystemConfigRequest** | **UpdateSystemConfigRequest**| | + + +### Return type + +**void** + +### Authorization + +[bearerAuth](README.md#bearerAuth) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**204** | Configuration successfully updated. | - | +**400** | Invalid request. | - | +**401** | Unauthorized access. | - | +**403** | Forbidden access. | - | +**500** | Unexpected error | - | + +[[Back to top]](#) [[Back to API list]](README.md#documentation-for-api-endpoints) [[Back to Model list]](README.md#documentation-for-models) [[Back to README]](README.md) + +# **updateTag** +> void updateTag(updateTagRequest) + + Version: 9.0.0.cl or later Updates a tag object. You can modify the `name` and `color` properties of a tag object. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `TAGMANAGEMENT` (**Can manage tags**) privilege is required to create, edit, and delete tags. + +### Example + + +```typescript +import { createBearerAuthenticationConfig, ThoughtSpotRestApi, UpdateTagRequest } from '@thoughtspot/rest-api-sdk'; + +const configuration = createBearerAuthenticationConfig("CLUSTER_SERVER_URL", { + username: "YOUR_USERNAME", + password: "YOUR_PASSWORD", +}); +const apiInstance = new ThoughtSpotRestApi(configuration); + +apiInstance.updateTag( + // string | Name or Id of the tag. + "tag_identifier_example" , + // UpdateTagRequest + { + name: "name_example", + color: "color_example", + } +).then((data:any) => { + console.log('API called successfully. Returned data: ' + data); +}).catch((error:any) => console.error(error)); + + +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **updateTagRequest** | **UpdateTagRequest**| | + **tagIdentifier** | [**string**] | Name or Id of the tag. | defaults to undefined + + +### Return type + +**void** + +### Authorization + +[bearerAuth](README.md#bearerAuth) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**204** | Tag successfully updated. | - | +**400** | Invalid request. | - | +**401** | Unauthorized access. | - | +**403** | Forbidden access. | - | +**500** | Unexpected error | - | + +[[Back to top]](#) [[Back to API list]](README.md#documentation-for-api-endpoints) [[Back to Model list]](README.md#documentation-for-models) [[Back to README]](README.md) + +# **updateUser** +> void updateUser(updateUserRequest) + + Version: 9.0.0.cl or later Updates the properties of a user object. You can modify user properties such as username, email, and share notification settings. You can also assign new groups and Orgs, remove the user from a group or Org, reset password, and modify user preferences. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `USER_ADMINISTRATION` (**Can manage users**) privilege is required. + +### Example + + +```typescript +import { createBearerAuthenticationConfig, ThoughtSpotRestApi, UpdateUserRequest } from '@thoughtspot/rest-api-sdk'; + +const configuration = createBearerAuthenticationConfig("CLUSTER_SERVER_URL", { + username: "YOUR_USERNAME", + password: "YOUR_PASSWORD", +}); +const apiInstance = new ThoughtSpotRestApi(configuration); + +apiInstance.updateUser( + // string | GUID / name of the user + "user_identifier_example" , + // UpdateUserRequest + { + name: "name_example", + display_name: "display_name_example", + visibility: "SHARABLE", + email: "email_example", + account_status: "ACTIVE", + notify_on_share: true, + show_onboarding_experience: true, + onboarding_experience_completed: true, + account_type: "LOCAL_USER", + group_identifiers: [ + "group_identifiers_example", + ], + home_liveboard_identifier: "home_liveboard_identifier_example", + favorite_metadata: [ + { + identifier: "identifier_example", + type: "LIVEBOARD", + }, + ], + org_identifiers: [ + "org_identifiers_example", + ], + operation: "REPLACE", + preferred_locale: "en-CA", + use_browser_language: true, + extended_properties: {}, + extended_preferences: {}, + } +).then((data:any) => { + console.log('API called successfully. Returned data: ' + data); +}).catch((error:any) => console.error(error)); + + +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **updateUserRequest** | **UpdateUserRequest**| | + **userIdentifier** | [**string**] | GUID / name of the user | defaults to undefined + + +### Return type + +**void** + +### Authorization + +[bearerAuth](README.md#bearerAuth) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**204** | User successfully updated. | - | +**400** | Invalid request. | - | +**401** | Unauthorized access. | - | +**403** | Forbidden access. | - | +**500** | Unexpected error | - | + +[[Back to top]](#) [[Back to API list]](README.md#documentation-for-api-endpoints) [[Back to Model list]](README.md#documentation-for-models) [[Back to README]](README.md) + +# **updateUserGroup** +> void updateUserGroup(updateUserGroupRequest) + + Version: 9.0.0.cl or later Updates the properties of a group object in ThoughtSpot. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `GROUP_ADMINISTRATION` (**Can manage groups**) privilege is required. #### Supported operations This API endpoint lets you perform the following operations in a single API request: * Edit [privileges](https://developers.thoughtspot.com/docs/?pageid=api-user-management#group-privileges) * Add or remove users * Change sharing visibility settings * Add or remove sub-groups * Assign a default Liveboard or update the existing settings + +### Example + + +```typescript +import { createBearerAuthenticationConfig, ThoughtSpotRestApi, UpdateUserGroupRequest } from '@thoughtspot/rest-api-sdk'; + +const configuration = createBearerAuthenticationConfig("CLUSTER_SERVER_URL", { + username: "YOUR_USERNAME", + password: "YOUR_PASSWORD", +}); +const apiInstance = new ThoughtSpotRestApi(configuration); + +apiInstance.updateUserGroup( + // string | GUID or name of the group. + "group_identifier_example" , + // UpdateUserGroupRequest + { + name: "name_example", + default_liveboard_identifiers: [ + "default_liveboard_identifiers_example", + ], + description: "description_example", + display_name: "display_name_example", + privileges: [ + "ADMINISTRATION", + ], + sub_group_identifiers: [ + "sub_group_identifiers_example", + ], + type: "LOCAL_GROUP", + user_identifiers: [ + "user_identifiers_example", + ], + visibility: "SHARABLE", + role_identifiers: [ + "role_identifiers_example", + ], + operation: "REPLACE", + } +).then((data:any) => { + console.log('API called successfully. Returned data: ' + data); +}).catch((error:any) => console.error(error)); + + +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **updateUserGroupRequest** | **UpdateUserGroupRequest**| | + **groupIdentifier** | [**string**] | GUID or name of the group. | defaults to undefined + + +### Return type + +**void** + +### Authorization + +[bearerAuth](README.md#bearerAuth) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**204** | User group successfully updated. | - | +**400** | Invalid request. | - | +**401** | Unauthorized access. | - | +**403** | Forbidden access. | - | +**500** | Unexpected error | - | + +[[Back to top]](#) [[Back to API list]](README.md#documentation-for-api-endpoints) [[Back to Model list]](README.md#documentation-for-models) [[Back to README]](README.md) + +# **updateVariable** +> void updateVariable(updateVariableRequest) + + Update a variable\'s name Version: 26.4.0.cl or later Allows updating a variable\'s name in ThoughtSpot. Requires ADMINISTRATION role and TENANT scope. The CAN_MANAGE_VARIABLES permission allows you to manage Formula Variables in the current organization scope. The API endpoint allows updating: * The variable name + +### Example + + +```typescript +import { createBearerAuthenticationConfig, ThoughtSpotRestApi, UpdateVariableRequest } from '@thoughtspot/rest-api-sdk'; + +const configuration = createBearerAuthenticationConfig("CLUSTER_SERVER_URL", { + username: "YOUR_USERNAME", + password: "YOUR_PASSWORD", +}); +const apiInstance = new ThoughtSpotRestApi(configuration); + +apiInstance.updateVariable( + // string | Unique id or name of the variable to update. + "identifier_example" , + // UpdateVariableRequest + { + name: "name_example", + } +).then((data:any) => { + console.log('API called successfully. Returned data: ' + data); +}).catch((error:any) => console.error(error)); + + +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **updateVariableRequest** | **UpdateVariableRequest**| | + **identifier** | [**string**] | Unique id or name of the variable to update. | defaults to undefined + + +### Return type + +**void** + +### Authorization + +[bearerAuth](README.md#bearerAuth) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**204** | Variable name updated successfully. | - | +**400** | Invalid request. | - | +**401** | Unauthorized access. | - | +**403** | Forbidden access. | - | +**500** | Unexpected error | - | + +[[Back to top]](#) [[Back to API list]](README.md#documentation-for-api-endpoints) [[Back to Model list]](README.md#documentation-for-models) [[Back to README]](README.md) + +# **updateVariableValues** +> void updateVariableValues(updateVariableValuesRequest) + + Update values for multiple variables Version: 10.14.0.cl or later **Note:** This API endpoint is deprecated and will be removed from ThoughtSpot in a future release. Use [POST /api/rest/2.0/template/variables/{identifier}/update-values](/api/rest/2.0/template/variables/%7Bidentifier%7D/update-values) instead. Allows updating values for multiple variables in ThoughtSpot. Requires ADMINISTRATION role. The CAN_MANAGE_VARIABLES permission allows you to manage Formula Variables in the current organization scope. The API endpoint allows: * Adding new values to variables * Replacing existing values * Deleting values from variables When updating variable values, you need to specify: * The variable identifiers * The values to add/replace/remove for each variable * The operation to perform (ADD, REPLACE, REMOVE, RESET) Behaviour based on operation type: * ADD - Adds values to the variable if this is a list type variable, else same as replace. * REPLACE - Replaces all values of a given set of constraints with the current set of values. * REMOVE - Removes any values which match the set of conditions of the variables if this is a list type variable, else clears value. * RESET - Removes all constrains for a given variable, scope is ignored + +### Example + + +```typescript +import { createBearerAuthenticationConfig, ThoughtSpotRestApi, UpdateVariableValuesRequest } from '@thoughtspot/rest-api-sdk'; + +const configuration = createBearerAuthenticationConfig("CLUSTER_SERVER_URL", { + username: "YOUR_USERNAME", + password: "YOUR_PASSWORD", +}); +const apiInstance = new ThoughtSpotRestApi(configuration); + +apiInstance.updateVariableValues( + // UpdateVariableValuesRequest + { + variable_assignment: [ + { + variable_identifier: "variable_identifier_example", + variable_values: [ + "variable_values_example", + ], + operation: "ADD", + }, + ], + variable_value_scope: [ + { + org_identifier: "org_identifier_example", + principal_type: "USER", + principal_identifier: "principal_identifier_example", + model_identifier: "model_identifier_example", + priority: 1, + }, + ], + } +).then((data:any) => { + console.log('API called successfully. Returned data: ' + data); +}).catch((error:any) => console.error(error)); + + +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **updateVariableValuesRequest** | **UpdateVariableValuesRequest**| | + + +### Return type + +**void** + +### Authorization + +[bearerAuth](README.md#bearerAuth) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**204** | Variable values updated successfully. | - | +**400** | Invalid request. | - | +**401** | Unauthorized access. | - | +**403** | Forbidden access. | - | +**500** | Unexpected error | - | + +[[Back to top]](#) [[Back to API list]](README.md#documentation-for-api-endpoints) [[Back to Model list]](README.md#documentation-for-models) [[Back to README]](README.md) + +# **updateWebhookConfiguration** +> void updateWebhookConfiguration(updateWebhookConfigurationRequest) + + Version: 10.14.0.cl or later Updates an existing webhook configuration by its unique id or name. Only the provided fields will be updated. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) or `DEVELOPER` (**Has developer privilege**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, users with `CAN_MANAGE_WEBHOOKS` (**Can manage webhooks**) privilege are also authorized to perform this action. + +### Example + + +```typescript +import { createBearerAuthenticationConfig, ThoughtSpotRestApi, UpdateWebhookConfigurationRequest } from '@thoughtspot/rest-api-sdk'; + +const configuration = createBearerAuthenticationConfig("CLUSTER_SERVER_URL", { + username: "YOUR_USERNAME", + password: "YOUR_PASSWORD", +}); +const apiInstance = new ThoughtSpotRestApi(configuration); + +apiInstance.updateWebhookConfiguration( + // string | Unique ID or name of the webhook configuration. + "webhook_identifier_example" , + // UpdateWebhookConfigurationRequest + { + name: "name_example", + description: "description_example", + url: "url_example", + url_params: {}, + events: [ + "LIVEBOARD_SCHEDULE", + ], + authentication: null, + signature_verification: null, + storage_destination: null, + additional_headers: [ + { + key: "key_example", + value: "value_example", + }, + ], + } +).then((data:any) => { + console.log('API called successfully. Returned data: ' + data); +}).catch((error:any) => console.error(error)); + + +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **updateWebhookConfigurationRequest** | **UpdateWebhookConfigurationRequest**| | + **webhookIdentifier** | [**string**] | Unique ID or name of the webhook configuration. | defaults to undefined + + +### Return type + +**void** + +### Authorization + +[bearerAuth](README.md#bearerAuth) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**204** | Webhook configuration updated successfully | - | +**400** | Invalid request. | - | +**401** | Unauthorized access. | - | +**403** | Forbidden access. | - | +**500** | Unexpected error | - | + +[[Back to top]](#) [[Back to API list]](README.md#documentation-for-api-endpoints) [[Back to Model list]](README.md#documentation-for-models) [[Back to README]](README.md) + +# **validateCommunicationChannel** +> CommunicationChannelValidateResponse validateCommunicationChannel(validateCommunicationChannelRequest) + + Version: 26.4.0.cl or later Validates a communication channel configuration to ensure it is properly set up and can receive events. - Use `channel_type` to specify the type of communication channel to validate (e.g., WEBHOOK). - Use `channel_identifier` to provide the unique identifier or name for the communication channel. - Use `event_type` to specify the event type to validate for this channel. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) or `DEVELOPER` (**Has developer privilege**) privilege. For webhook channels, users with `CAN_MANAGE_WEBHOOKS` (**Can manage webhooks**) privilege are also authorized to perform this action. + +### Example + + +```typescript +import { createBearerAuthenticationConfig, ThoughtSpotRestApi, ValidateCommunicationChannelRequest } from '@thoughtspot/rest-api-sdk'; + +const configuration = createBearerAuthenticationConfig("CLUSTER_SERVER_URL", { + username: "YOUR_USERNAME", + password: "YOUR_PASSWORD", +}); +const apiInstance = new ThoughtSpotRestApi(configuration); + +apiInstance.validateCommunicationChannel( + // ValidateCommunicationChannelRequest + { + channel_type: "WEBHOOK", + channel_identifier: "channel_identifier_example", + event_type: "LIVEBOARD_SCHEDULE", + } +).then((data:any) => { + console.log('API called successfully. Returned data: ' + data); +}).catch((error:any) => console.error(error)); + + +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **validateCommunicationChannelRequest** | **ValidateCommunicationChannelRequest**| | + + +### Return type + +**CommunicationChannelValidateResponse** + +### Authorization + +[bearerAuth](README.md#bearerAuth) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | communication channel configuration validated successfully. | - | +**400** | Invalid request. | - | +**401** | Unauthorized access. | - | +**403** | Forbidden access. | - | +**500** | Unexpected error | - | + +[[Back to top]](#) [[Back to API list]](README.md#documentation-for-api-endpoints) [[Back to Model list]](README.md#documentation-for-models) [[Back to README]](README.md) + +# **validateEmailCustomization** +> void validateEmailCustomization() + + Version: 10.10.0.cl or later Validates the email customization configuration if any set for the ThoughtSpot system. #### Pre-requisites Requires `DEVELOPER` (**has developer privilege**) or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `DEVELOPER` (**Has developer privilege**) privilege is required. **NOTE**:This endpoint in currently in beta. Contact ThoughtSpot support to enable this on your instance. + +### Example + + +```typescript +import { createBearerAuthenticationConfig, ThoughtSpotRestApi, ValidateEmailCustomizationRequest } from '@thoughtspot/rest-api-sdk'; + +const configuration = createBearerAuthenticationConfig("CLUSTER_SERVER_URL", { + username: "YOUR_USERNAME", + password: "YOUR_PASSWORD", +}); +const apiInstance = new ThoughtSpotRestApi(configuration); + +apiInstance.validateEmailCustomization().then((data:any) => { + console.log('API called successfully. Returned data: ' + JSON.stringify(data)); +}).catch((error:any) => console.error(error)); + + +``` + + +### Parameters +This endpoint does not need any parameter. + + +### Return type + +**void** + +### Authorization + +[bearerAuth](README.md#bearerAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**204** | Triggered test email for customization configuration | - | +**400** | Invalid request. | - | +**403** | Unauthorized access. | - | +**500** | Unexpected error | - | + +[[Back to top]](#) [[Back to API list]](README.md#documentation-for-api-endpoints) [[Back to Model list]](README.md#documentation-for-models) [[Back to README]](README.md) + +# **validateMerge** +> Array validateMerge(validateMergeRequest) + + Version: 9.2.0.cl or later Validates the content of your source branch against the objects in your destination environment. Before merging content from your source branch to the destination branch, run this API operation from your destination environment and ensure that the changes from the source branch function in the destination environment. Requires `DATAMANAGEMENT` (**Can manage data**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance on your instance, the `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` (**Can manage data models**) privilege and edit access to the metadata objects. + +### Example + + +```typescript +import { createBearerAuthenticationConfig, ThoughtSpotRestApi, ValidateMergeRequest } from '@thoughtspot/rest-api-sdk'; + +const configuration = createBearerAuthenticationConfig("CLUSTER_SERVER_URL", { + username: "YOUR_USERNAME", + password: "YOUR_PASSWORD", +}); +const apiInstance = new ThoughtSpotRestApi(configuration); + +apiInstance.validateMerge( + // ValidateMergeRequest + { + source_branch_name: "source_branch_name_example", + target_branch_name: "target_branch_name_example", + } +).then((data:any) => { + console.log('API called successfully. Returned data: ' + data); +}).catch((error:any) => console.error(error)); + + +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **validateMergeRequest** | **ValidateMergeRequest**| | + + +### Return type + +**Array** + +### Authorization + +[bearerAuth](README.md#bearerAuth) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | validation done successfully | - | +**400** | Invalid request. | - | +**401** | Unauthorized access. | - | +**403** | Forbidden access. | - | +**500** | Unexpected error | - | + +[[Back to top]](#) [[Back to API list]](README.md#documentation-for-api-endpoints) [[Back to Model list]](README.md#documentation-for-models) [[Back to README]](README.md) + +# **validateToken** +> TokenValidationResponse validateToken(validateTokenRequest) + + Version: 9.12.0.cl or later Validates the authentication token specified in the API request. If your token is not valid, [Get a new token](#/http/api-endpoints/authentication/get-full-access-token). + +### Example + + +```typescript +import { createBearerAuthenticationConfig, ThoughtSpotRestApi, ValidateTokenRequest } from '@thoughtspot/rest-api-sdk'; + +const configuration = createBearerAuthenticationConfig("CLUSTER_SERVER_URL", { + username: "YOUR_USERNAME", + password: "YOUR_PASSWORD", +}); +const apiInstance = new ThoughtSpotRestApi(configuration); + +apiInstance.validateToken( + // ValidateTokenRequest + { + token: "token_example", + } +).then((data:any) => { + console.log('API called successfully. Returned data: ' + data); +}).catch((error:any) => console.error(error)); + + +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **validateTokenRequest** | **ValidateTokenRequest**| | + + +### Return type + +**TokenValidationResponse** + +### Authorization + +[bearerAuth](README.md#bearerAuth) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Token validation successful. | - | +**400** | Invalid request. | - | +**401** | Unauthorized access. | - | +**403** | Forbidden access. | - | +**500** | Unexpected error | - | + +[[Back to top]](#) [[Back to API list]](README.md#documentation-for-api-endpoints) [[Back to Model list]](README.md#documentation-for-models) [[Back to README]](README.md) + diff --git a/sdks/typescript/UsersApi.md b/sdks/typescript/UsersApi.md new file mode 100644 index 000000000..4965e83cd --- /dev/null +++ b/sdks/typescript/UsersApi.md @@ -0,0 +1,766 @@ +# ThoughtSpotRestApiSdk.UsersApi + +All URIs are relative to *CLUSTER_URL* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**activateUser**](UsersApi.md#activateUser) | **POST** /api/rest/2.0/users/activate | +[**changeUserPassword**](UsersApi.md#changeUserPassword) | **POST** /api/rest/2.0/users/change-password | +[**createUser**](UsersApi.md#createUser) | **POST** /api/rest/2.0/users/create | +[**deactivateUser**](UsersApi.md#deactivateUser) | **POST** /api/rest/2.0/users/deactivate | +[**deleteUser**](UsersApi.md#deleteUser) | **POST** /api/rest/2.0/users/{user_identifier}/delete | +[**forceLogoutUsers**](UsersApi.md#forceLogoutUsers) | **POST** /api/rest/2.0/users/force-logout | +[**importUsers**](UsersApi.md#importUsers) | **POST** /api/rest/2.0/users/import | +[**resetUserPassword**](UsersApi.md#resetUserPassword) | **POST** /api/rest/2.0/users/reset-password | +[**searchUsers**](UsersApi.md#searchUsers) | **POST** /api/rest/2.0/users/search | +[**updateUser**](UsersApi.md#updateUser) | **POST** /api/rest/2.0/users/{user_identifier}/update | + + +# **activateUser** +> User activateUser(activateUserRequest) + + Version: 9.7.0.cl or later Activates a deactivated user account. Requires `ADMINISTRATION` (**Can administer Thoughtspot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `USER_ADMINISTRATION` (**Can manage users**) privilege is required. To activate an inactive user account, the API request body must include the following information: - Username or the GUID of the user account. - Auth token generated for the deactivated user. The auth token is sent in the API response when a user is deactivated. - Password for the user account. + +### Example + + +```typescript +import { createBearerAuthenticationConfig, UsersApi, ActivateUserRequest } from '@thoughtspot/rest-api-sdk'; + +const configuration = createBearerAuthenticationConfig("CLUSTER_SERVER_URL", { + username: "YOUR_USERNAME", + password: "YOUR_PASSWORD", +}); +const apiInstance = new UsersApi(configuration); + +apiInstance.activateUser( + // ActivateUserRequest + { + user_identifier: "user_identifier_example", + auth_token: "auth_token_example", + password: "password_example", + properties: "properties_example", + } +).then((data:any) => { + console.log('API called successfully. Returned data: ' + data); +}).catch((error:any) => console.error(error)); + + +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **activateUserRequest** | **ActivateUserRequest**| | + + +### Return type + +**User** + +### Authorization + +[bearerAuth](README.md#bearerAuth) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | User activated successfully. | - | +**400** | Invalid request. | - | +**401** | Unauthorized access. | - | +**403** | Forbidden access. | - | +**500** | Unexpected error | - | + +[[Back to top]](#) [[Back to API list]](README.md#documentation-for-api-endpoints) [[Back to Model list]](README.md#documentation-for-models) [[Back to README]](README.md) + +# **changeUserPassword** +> void changeUserPassword(changeUserPasswordRequest) + + Version: 9.0.0.cl or later Updates the current password of the user. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `USER_ADMINISTRATION` (**Can manage users**) privilege is required. + +### Example + + +```typescript +import { createBearerAuthenticationConfig, UsersApi, ChangeUserPasswordRequest } from '@thoughtspot/rest-api-sdk'; + +const configuration = createBearerAuthenticationConfig("CLUSTER_SERVER_URL", { + username: "YOUR_USERNAME", + password: "YOUR_PASSWORD", +}); +const apiInstance = new UsersApi(configuration); + +apiInstance.changeUserPassword( + // ChangeUserPasswordRequest + { + current_password: "current_password_example", + new_password: "new_password_example", + user_identifier: "user_identifier_example", + } +).then((data:any) => { + console.log('API called successfully. Returned data: ' + data); +}).catch((error:any) => console.error(error)); + + +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **changeUserPasswordRequest** | **ChangeUserPasswordRequest**| | + + +### Return type + +**void** + +### Authorization + +[bearerAuth](README.md#bearerAuth) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**204** | User password change operation successful. | - | +**400** | Invalid request. | - | +**401** | Unauthorized access. | - | +**403** | Forbidden access. | - | +**500** | Unexpected error | - | + +[[Back to top]](#) [[Back to API list]](README.md#documentation-for-api-endpoints) [[Back to Model list]](README.md#documentation-for-models) [[Back to README]](README.md) + +# **createUser** +> User createUser(createUserRequest) + + Version: 9.0.0.cl or later Creates a user in ThoughtSpot. The API endpoint allows you to configure several user properties such as email address, account status, share notification preferences, and sharing visibility. You can provision the user to [groups](https://docs.thoughtspot.com/cloud/latest/groups-privileges) and [Orgs](https://docs.thoughtspot.com/cloud/latest/orgs-overview). You can also add Liveboard, Answer, and Worksheet objects to the user’s favorites list, assign a default Liveboard for the user, and set user preferences. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `USER_ADMINISTRATION` (**Can manage users**) privilege is required. + +### Example + + +```typescript +import { createBearerAuthenticationConfig, UsersApi, CreateUserRequest } from '@thoughtspot/rest-api-sdk'; + +const configuration = createBearerAuthenticationConfig("CLUSTER_SERVER_URL", { + username: "YOUR_USERNAME", + password: "YOUR_PASSWORD", +}); +const apiInstance = new UsersApi(configuration); + +apiInstance.createUser( + // CreateUserRequest + { + name: "name_example", + display_name: "display_name_example", + password: "password_example", + email: "email_example", + account_type: "LOCAL_USER", + account_status: "ACTIVE", + org_identifiers: [ + "org_identifiers_example", + ], + group_identifiers: [ + "group_identifiers_example", + ], + visibility: "SHARABLE", + notify_on_share: true, + show_onboarding_experience: true, + onboarding_experience_completed: false, + home_liveboard_identifier: "home_liveboard_identifier_example", + favorite_metadata: [ + { + identifier: "identifier_example", + type: "LIVEBOARD", + }, + ], + preferred_locale: "en-CA", + use_browser_language: true, + extended_properties: {}, + extended_preferences: {}, + trigger_welcome_email: true, + trigger_activation_email: true, + } +).then((data:any) => { + console.log('API called successfully. Returned data: ' + data); +}).catch((error:any) => console.error(error)); + + +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **createUserRequest** | **CreateUserRequest**| | + + +### Return type + +**User** + +### Authorization + +[bearerAuth](README.md#bearerAuth) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | User successfully created. | - | +**400** | Invalid request. | - | +**401** | Unauthorized access. | - | +**403** | Forbidden access. | - | +**500** | Unexpected error | - | + +[[Back to top]](#) [[Back to API list]](README.md#documentation-for-api-endpoints) [[Back to Model list]](README.md#documentation-for-models) [[Back to README]](README.md) + +# **deactivateUser** +> ResponseActivationURL deactivateUser(deactivateUserRequest) + + Version: 9.7.0.cl or later Deactivates a user account. Requires `ADMINISTRATION` (**Can administer Thoughtspot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `USER_ADMINISTRATION` (**Can manage users**) privilege is required. To deactivate a user account, the API request body must include the following information: - Username or the GUID of the user account - Base URL of the ThoughtSpot instance If the API request is successful, ThoughtSpot returns the activation URL in the response. The activation URL is valid for 14 days and can be used to re-activate the account and reset the password of the deactivated account. + +### Example + + +```typescript +import { createBearerAuthenticationConfig, UsersApi, DeactivateUserRequest } from '@thoughtspot/rest-api-sdk'; + +const configuration = createBearerAuthenticationConfig("CLUSTER_SERVER_URL", { + username: "YOUR_USERNAME", + password: "YOUR_PASSWORD", +}); +const apiInstance = new UsersApi(configuration); + +apiInstance.deactivateUser( + // DeactivateUserRequest + { + user_identifier: "user_identifier_example", + base_url: "base_url_example", + } +).then((data:any) => { + console.log('API called successfully. Returned data: ' + data); +}).catch((error:any) => console.error(error)); + + +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **deactivateUserRequest** | **DeactivateUserRequest**| | + + +### Return type + +**ResponseActivationURL** + +### Authorization + +[bearerAuth](README.md#bearerAuth) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | User deactivated successfully. | - | +**400** | Invalid request. | - | +**401** | Unauthorized access. | - | +**403** | Forbidden access. | - | +**500** | Unexpected error | - | + +[[Back to top]](#) [[Back to API list]](README.md#documentation-for-api-endpoints) [[Back to Model list]](README.md#documentation-for-models) [[Back to README]](README.md) + +# **deleteUser** +> void deleteUser() + + Version: 9.0.0.cl or later Deletes a user from the ThoughtSpot system. If you want to remove a user from a specific Org but not from ThoughtSpot, update the group and Org mapping properties of the user object via a POST API call to the [/api/rest/2.0/users/{user_identifier}/update](#/http/api-endpoints/users/update-user) endpoint. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `USER_ADMINISTRATION` (**Can manage users**) privilege is required. + +### Example + + +```typescript +import { createBearerAuthenticationConfig, UsersApi, DeleteUserRequest } from '@thoughtspot/rest-api-sdk'; + +const configuration = createBearerAuthenticationConfig("CLUSTER_SERVER_URL", { + username: "YOUR_USERNAME", + password: "YOUR_PASSWORD", +}); +const apiInstance = new UsersApi(configuration); + +apiInstance.deleteUser( + // string | GUID / name of the user + "user_identifier_example" +).then((data:any) => { + console.log('API called successfully. Returned data: ' + data); +}).catch((error:any) => console.error(error)); + + +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **userIdentifier** | [**string**] | GUID / name of the user | defaults to undefined + + +### Return type + +**void** + +### Authorization + +[bearerAuth](README.md#bearerAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**204** | User successfully deleted. | - | +**400** | Invalid request. | - | +**401** | Unauthorized access. | - | +**403** | Forbidden access. | - | +**500** | Unexpected error | - | + +[[Back to top]](#) [[Back to API list]](README.md#documentation-for-api-endpoints) [[Back to Model list]](README.md#documentation-for-models) [[Back to README]](README.md) + +# **forceLogoutUsers** +> void forceLogoutUsers(forceLogoutUsersRequest) + + Version: 9.0.0.cl or later Enforces logout on current user sessions. Use this API with caution as it may invalidate active user sessions and force users to re-login. Make sure you specify the usernames or GUIDs. If you pass null values in the API call, all user sessions on your cluster become invalid, and the users are forced to re-login. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `USER_ADMINISTRATION` (**Can manage users**) privilege is required. + +### Example + + +```typescript +import { createBearerAuthenticationConfig, UsersApi, ForceLogoutUsersRequest } from '@thoughtspot/rest-api-sdk'; + +const configuration = createBearerAuthenticationConfig("CLUSTER_SERVER_URL", { + username: "YOUR_USERNAME", + password: "YOUR_PASSWORD", +}); +const apiInstance = new UsersApi(configuration); + +apiInstance.forceLogoutUsers( + // ForceLogoutUsersRequest + { + user_identifiers: [ + "user_identifiers_example", + ], + } +).then((data:any) => { + console.log('API called successfully. Returned data: ' + data); +}).catch((error:any) => console.error(error)); + + +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **forceLogoutUsersRequest** | **ForceLogoutUsersRequest**| | + + +### Return type + +**void** + +### Authorization + +[bearerAuth](README.md#bearerAuth) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**204** | Force logging out of users operation successful. | - | +**400** | Invalid request. | - | +**401** | Unauthorized access. | - | +**403** | Forbidden access. | - | +**500** | Unexpected error | - | + +[[Back to top]](#) [[Back to API list]](README.md#documentation-for-api-endpoints) [[Back to Model list]](README.md#documentation-for-models) [[Back to README]](README.md) + +# **importUsers** +> ImportUsersResponse importUsers(importUsersRequest) + + Version: 9.0.0.cl or later Imports user data from external databases into ThoughtSpot. During the user import operation: * If the specified users are not available in ThoughtSpot, the users are created and assigned a default password. Defining a `default_password` in the API request is optional. * If `delete_unspecified_users` is set to `true`, the users not specified in the API request, excluding the `tsadmin`, `guest`, `system` and `su` users, are deleted. * If the specified user objects are already available in ThoughtSpot, the object properties are updated and synchronized as per the input data in the API request. A successful API call returns the object that represents the changes made in the ThoughtSpot system. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `USER_ADMINISTRATION` (**Can manage users**) privilege is required. + +### Example + + +```typescript +import { createBearerAuthenticationConfig, UsersApi, ImportUsersRequest } from '@thoughtspot/rest-api-sdk'; + +const configuration = createBearerAuthenticationConfig("CLUSTER_SERVER_URL", { + username: "YOUR_USERNAME", + password: "YOUR_PASSWORD", +}); +const apiInstance = new UsersApi(configuration); + +apiInstance.importUsers( + // ImportUsersRequest + { + users: [ + { + user_identifier: "user_identifier_example", + display_name: "display_name_example", + password: "password_example", + account_type: "LOCAL_USER", + account_status: "ACTIVE", + email: "email_example", + org_identifiers: [ + "org_identifiers_example", + ], + group_identifiers: [ + "group_identifiers_example", + ], + visibility: "SHARABLE", + notify_on_share: true, + show_onboarding_experience: true, + onboarding_experience_completed: true, + home_liveboard_identifier: "home_liveboard_identifier_example", + favorite_metadata: [ + { + identifier: "identifier_example", + type: "LIVEBOARD", + }, + ], + preferred_locale: "en-CA", + use_browser_language: true, + }, + ], + default_password: "default_password_example", + dry_run: true, + delete_unspecified_users: false, + } +).then((data:any) => { + console.log('API called successfully. Returned data: ' + data); +}).catch((error:any) => console.error(error)); + + +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **importUsersRequest** | **ImportUsersRequest**| | + + +### Return type + +**ImportUsersResponse** + +### Authorization + +[bearerAuth](README.md#bearerAuth) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Import users operation successful. | - | +**400** | Invalid request. | - | +**401** | Unauthorized access. | - | +**403** | Forbidden access. | - | +**500** | Unexpected error | - | + +[[Back to top]](#) [[Back to API list]](README.md#documentation-for-api-endpoints) [[Back to Model list]](README.md#documentation-for-models) [[Back to README]](README.md) + +# **resetUserPassword** +> void resetUserPassword(resetUserPasswordRequest) + + Version: 9.0.0.cl or later Resets the password of a user account. Administrators can reset password on behalf of a user. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `USER_ADMINISTRATION` (**Can manage users**) privilege is required. + +### Example + + +```typescript +import { createBearerAuthenticationConfig, UsersApi, ResetUserPasswordRequest } from '@thoughtspot/rest-api-sdk'; + +const configuration = createBearerAuthenticationConfig("CLUSTER_SERVER_URL", { + username: "YOUR_USERNAME", + password: "YOUR_PASSWORD", +}); +const apiInstance = new UsersApi(configuration); + +apiInstance.resetUserPassword( + // ResetUserPasswordRequest + { + new_password: "new_password_example", + user_identifier: "user_identifier_example", + } +).then((data:any) => { + console.log('API called successfully. Returned data: ' + data); +}).catch((error:any) => console.error(error)); + + +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **resetUserPasswordRequest** | **ResetUserPasswordRequest**| | + + +### Return type + +**void** + +### Authorization + +[bearerAuth](README.md#bearerAuth) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**204** | User password reset operation successful. | - | +**400** | Invalid request. | - | +**401** | Unauthorized access. | - | +**403** | Forbidden access. | - | +**500** | Unexpected error | - | + +[[Back to top]](#) [[Back to API list]](README.md#documentation-for-api-endpoints) [[Back to Model list]](README.md#documentation-for-models) [[Back to README]](README.md) + +# **searchUsers** +> Array searchUsers(searchUsersRequest) + + Version: 9.0.0.cl or later Gets a list of users available on the ThoughtSpot system. To get details of a specific user, specify the user GUID or name. You can also filter the API response based on groups, Org ID, user visibility, account status, user type, and user preference settings and favorites. Available to all users. Users with `ADMINISTRATION` (**Can administer ThoughtSpot**) privileges can view all users properties. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `USER_ADMINISTRATION` (**Can manage users**) privilege is required. **NOTE**: If the API returns an empty list, consider increasing the value of the `record_size` parameter. To search across all available users, set `record_size` to `-1`. + +### Example + + +```typescript +import { createBearerAuthenticationConfig, UsersApi, SearchUsersRequest } from '@thoughtspot/rest-api-sdk'; + +const configuration = createBearerAuthenticationConfig("CLUSTER_SERVER_URL", { + username: "YOUR_USERNAME", + password: "YOUR_PASSWORD", +}); +const apiInstance = new UsersApi(configuration); + +apiInstance.searchUsers( + // SearchUsersRequest + { + user_identifier: "user_identifier_example", + display_name: "display_name_example", + name_pattern: "name_pattern_example", + visibility: "SHARABLE", + email: "email_example", + group_identifiers: [ + "group_identifiers_example", + ], + privileges: [ + "ADMINISTRATION", + ], + account_type: "LOCAL_USER", + account_status: "ACTIVE", + notify_on_share: true, + show_onboarding_experience: true, + onboarding_experience_completed: true, + org_identifiers: [ + "org_identifiers_example", + ], + home_liveboard_identifier: "home_liveboard_identifier_example", + favorite_metadata: [ + { + identifier: "identifier_example", + type: "LIVEBOARD", + }, + ], + record_offset: 0, + record_size: 10, + sort_options: null, + role_identifiers: [ + "role_identifiers_example", + ], + include_favorite_metadata: false, + include_variable_values: false, + } +).then((data:any) => { + console.log('API called successfully. Returned data: ' + data); +}).catch((error:any) => console.error(error)); + + +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **searchUsersRequest** | **SearchUsersRequest**| | + + +### Return type + +**Array** + +### Authorization + +[bearerAuth](README.md#bearerAuth) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | User search result. | - | +**400** | Invalid request. | - | +**401** | Unauthorized access. | - | +**403** | Forbidden access. | - | +**500** | Unexpected error | - | + +[[Back to top]](#) [[Back to API list]](README.md#documentation-for-api-endpoints) [[Back to Model list]](README.md#documentation-for-models) [[Back to README]](README.md) + +# **updateUser** +> void updateUser(updateUserRequest) + + Version: 9.0.0.cl or later Updates the properties of a user object. You can modify user properties such as username, email, and share notification settings. You can also assign new groups and Orgs, remove the user from a group or Org, reset password, and modify user preferences. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `USER_ADMINISTRATION` (**Can manage users**) privilege is required. + +### Example + + +```typescript +import { createBearerAuthenticationConfig, UsersApi, UpdateUserRequest } from '@thoughtspot/rest-api-sdk'; + +const configuration = createBearerAuthenticationConfig("CLUSTER_SERVER_URL", { + username: "YOUR_USERNAME", + password: "YOUR_PASSWORD", +}); +const apiInstance = new UsersApi(configuration); + +apiInstance.updateUser( + // string | GUID / name of the user + "user_identifier_example" , + // UpdateUserRequest + { + name: "name_example", + display_name: "display_name_example", + visibility: "SHARABLE", + email: "email_example", + account_status: "ACTIVE", + notify_on_share: true, + show_onboarding_experience: true, + onboarding_experience_completed: true, + account_type: "LOCAL_USER", + group_identifiers: [ + "group_identifiers_example", + ], + home_liveboard_identifier: "home_liveboard_identifier_example", + favorite_metadata: [ + { + identifier: "identifier_example", + type: "LIVEBOARD", + }, + ], + org_identifiers: [ + "org_identifiers_example", + ], + operation: "REPLACE", + preferred_locale: "en-CA", + use_browser_language: true, + extended_properties: {}, + extended_preferences: {}, + } +).then((data:any) => { + console.log('API called successfully. Returned data: ' + data); +}).catch((error:any) => console.error(error)); + + +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **updateUserRequest** | **UpdateUserRequest**| | + **userIdentifier** | [**string**] | GUID / name of the user | defaults to undefined + + +### Return type + +**void** + +### Authorization + +[bearerAuth](README.md#bearerAuth) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**204** | User successfully updated. | - | +**400** | Invalid request. | - | +**401** | Unauthorized access. | - | +**403** | Forbidden access. | - | +**500** | Unexpected error | - | + +[[Back to top]](#) [[Back to API list]](README.md#documentation-for-api-endpoints) [[Back to Model list]](README.md#documentation-for-models) [[Back to README]](README.md) + diff --git a/sdks/typescript/VariableApi.md b/sdks/typescript/VariableApi.md new file mode 100644 index 000000000..ea6e15f5c --- /dev/null +++ b/sdks/typescript/VariableApi.md @@ -0,0 +1,504 @@ +# ThoughtSpotRestApiSdk.VariableApi + +All URIs are relative to *CLUSTER_URL* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**createVariable**](VariableApi.md#createVariable) | **POST** /api/rest/2.0/template/variables/create | +[**deleteVariable**](VariableApi.md#deleteVariable) | **POST** /api/rest/2.0/template/variables/{identifier}/delete | +[**deleteVariables**](VariableApi.md#deleteVariables) | **POST** /api/rest/2.0/template/variables/delete | +[**putVariableValues**](VariableApi.md#putVariableValues) | **POST** /api/rest/2.0/template/variables/{identifier}/update-values | +[**searchVariables**](VariableApi.md#searchVariables) | **POST** /api/rest/2.0/template/variables/search | +[**updateVariable**](VariableApi.md#updateVariable) | **POST** /api/rest/2.0/template/variables/{identifier}/update | +[**updateVariableValues**](VariableApi.md#updateVariableValues) | **POST** /api/rest/2.0/template/variables/update-values | + + +# **createVariable** +> Variable createVariable(createVariableRequest) + + Create a variable which can be used for parameterizing metadata objects Version: 26.4.0.cl or later Allows creating a variable which can be used for parameterizing metadata objects in ThoughtSpot. Requires ADMINISTRATION role and TENANT scope. The CAN_MANAGE_VARIABLES permission allows you to manage Formula Variables in the current organization scope. The API endpoint supports the following types of variables: * CONNECTION_PROPERTY - For connection properties * TABLE_MAPPING - For table mappings * CONNECTION_PROPERTY_PER_PRINCIPAL - For connection properties per principal. In order to use this please contact support to enable this. * FORMULA_VARIABLE - For Formula variables, introduced in 10.15.0.cl When creating a variable, you need to specify: * The variable type * A unique name for the variable * Whether the variable contains sensitive values (defaults to false) * The data type of the variable, only specify for formula variables (defaults to null) The operation will fail if: * The user lacks required permissions * The variable name already exists * The variable type is invalid + +### Example + + +```typescript +import { createBearerAuthenticationConfig, VariableApi, CreateVariableRequest } from '@thoughtspot/rest-api-sdk'; + +const configuration = createBearerAuthenticationConfig("CLUSTER_SERVER_URL", { + username: "YOUR_USERNAME", + password: "YOUR_PASSWORD", +}); +const apiInstance = new VariableApi(configuration); + +apiInstance.createVariable( + // CreateVariableRequest + { + type: "CONNECTION_PROPERTY", + name: "name_example", + is_sensitive: false, + data_type: "VARCHAR", + } +).then((data:any) => { + console.log('API called successfully. Returned data: ' + data); +}).catch((error:any) => console.error(error)); + + +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **createVariableRequest** | **CreateVariableRequest**| | + + +### Return type + +**Variable** + +### Authorization + +[bearerAuth](README.md#bearerAuth) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Create variable is successful. | - | +**400** | Invalid request. | - | +**401** | Unauthorized access. | - | +**403** | Forbidden access. | - | +**500** | Unexpected error | - | + +[[Back to top]](#) [[Back to API list]](README.md#documentation-for-api-endpoints) [[Back to Model list]](README.md#documentation-for-models) [[Back to README]](README.md) + +# **deleteVariable** +> void deleteVariable() + + Delete a variable Version: 10.14.0.cl or later **Note:** This API endpoint is deprecated and will be removed from ThoughtSpot in a future release. Use [POST /api/rest/2.0/template/variables/delete](/api/rest/2.0/template/variables/delete) instead. Allows deleting a variable from ThoughtSpot. Requires ADMINISTRATION role and TENANT scope. The CAN_MANAGE_VARIABLES permission allows you to manage Formula Variables in the current organization scope. The API endpoint requires: * The variable identifier (ID or name) The operation will fail if: * The user lacks required permissions * The variable doesn\'t exist * The variable is being used by other objects + +### Example + + +```typescript +import { createBearerAuthenticationConfig, VariableApi, DeleteVariableRequest } from '@thoughtspot/rest-api-sdk'; + +const configuration = createBearerAuthenticationConfig("CLUSTER_SERVER_URL", { + username: "YOUR_USERNAME", + password: "YOUR_PASSWORD", +}); +const apiInstance = new VariableApi(configuration); + +apiInstance.deleteVariable( + // string | Unique id or name of the variable + "identifier_example" +).then((data:any) => { + console.log('API called successfully. Returned data: ' + data); +}).catch((error:any) => console.error(error)); + + +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **identifier** | [**string**] | Unique id or name of the variable | defaults to undefined + + +### Return type + +**void** + +### Authorization + +[bearerAuth](README.md#bearerAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**204** | Deleting the variable is successful. | - | +**400** | Invalid request. | - | +**401** | Unauthorized access. | - | +**403** | Forbidden access. | - | +**500** | Unexpected error | - | + +[[Back to top]](#) [[Back to API list]](README.md#documentation-for-api-endpoints) [[Back to Model list]](README.md#documentation-for-models) [[Back to README]](README.md) + +# **deleteVariables** +> void deleteVariables(deleteVariablesRequest) + + Delete variable(s) Version: 26.4.0.cl or later Allows deleting multiple variables from ThoughtSpot. Requires ADMINISTRATION role and TENANT scope. The CAN_MANAGE_VARIABLES permission allows you to manage Formula Variables in the current organization scope. The API endpoint requires: * The variable identifiers (IDs or names) The operation will fail if: * The user lacks required permissions * Any of the variables don\'t exist * Any of the variables are being used by other objects + +### Example + + +```typescript +import { createBearerAuthenticationConfig, VariableApi, DeleteVariablesRequest } from '@thoughtspot/rest-api-sdk'; + +const configuration = createBearerAuthenticationConfig("CLUSTER_SERVER_URL", { + username: "YOUR_USERNAME", + password: "YOUR_PASSWORD", +}); +const apiInstance = new VariableApi(configuration); + +apiInstance.deleteVariables( + // DeleteVariablesRequest + { + identifiers: [ + "identifiers_example", + ], + } +).then((data:any) => { + console.log('API called successfully. Returned data: ' + data); +}).catch((error:any) => console.error(error)); + + +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **deleteVariablesRequest** | **DeleteVariablesRequest**| | + + +### Return type + +**void** + +### Authorization + +[bearerAuth](README.md#bearerAuth) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**204** | Deletion of variable(s) is successful. | - | +**400** | Invalid request. | - | +**401** | Unauthorized access. | - | +**403** | Forbidden access. | - | +**500** | Unexpected error | - | + +[[Back to top]](#) [[Back to API list]](README.md#documentation-for-api-endpoints) [[Back to Model list]](README.md#documentation-for-models) [[Back to README]](README.md) + +# **putVariableValues** +> void putVariableValues(putVariableValuesRequest) + + Update values for a variable Version: 26.4.0.cl or later Allows updating values for a specific variable in ThoughtSpot. Requires ADMINISTRATION role. The CAN_MANAGE_VARIABLES permission allows you to manage Formula Variables in the current organization scope. The API endpoint allows: * Adding new values to the variable * Replacing existing values * Deleting values from the variable * Resetting all values When updating variable values, you need to specify: * The variable identifier (ID or name) * The values to add/replace/remove * The operation to perform (ADD, REPLACE, REMOVE, RESET) Behaviour based on operation type: * ADD - Adds values to the variable if this is a list type variable, else same as replace. * REPLACE - Replaces all values of a given set of constraints with the current set of values. * REMOVE - Removes any values which match the set of conditions of the variables if this is a list type variable, else clears value. * RESET - Removes all constraints for the given variable, scope is ignored + +### Example + + +```typescript +import { createBearerAuthenticationConfig, VariableApi, PutVariableValuesRequest } from '@thoughtspot/rest-api-sdk'; + +const configuration = createBearerAuthenticationConfig("CLUSTER_SERVER_URL", { + username: "YOUR_USERNAME", + password: "YOUR_PASSWORD", +}); +const apiInstance = new VariableApi(configuration); + +apiInstance.putVariableValues( + // string | Unique ID or name of the variable + "identifier_example" , + // PutVariableValuesRequest + { + operation: "ADD", + variable_assignment: [ + { + assigned_values: [ + "assigned_values_example", + ], + org_identifier: "org_identifier_example", + principal_type: "USER", + principal_identifier: "principal_identifier_example", + model_identifier: "model_identifier_example", + priority: 1, + }, + ], + } +).then((data:any) => { + console.log('API called successfully. Returned data: ' + data); +}).catch((error:any) => console.error(error)); + + +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **putVariableValuesRequest** | **PutVariableValuesRequest**| | + **identifier** | [**string**] | Unique ID or name of the variable | defaults to undefined + + +### Return type + +**void** + +### Authorization + +[bearerAuth](README.md#bearerAuth) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**204** | Variable values updated successfully. | - | +**400** | Invalid request. | - | +**401** | Unauthorized access. | - | +**403** | Forbidden access. | - | +**500** | Unexpected error | - | + +[[Back to top]](#) [[Back to API list]](README.md#documentation-for-api-endpoints) [[Back to Model list]](README.md#documentation-for-models) [[Back to README]](README.md) + +# **searchVariables** +> Array searchVariables(searchVariablesRequest) + + Search variables Version: 26.4.0.cl or later Allows searching for variables in ThoughtSpot. Requires ADMINISTRATION role. The CAN_MANAGE_VARIABLES permission allows you to manage Formula Variables in the current organization scope. The API endpoint supports searching variables by: * Variable identifier (ID or name) * Variable type * Name pattern (case-insensitive, supports % for wildcard) The search results can be formatted in three ways: * METADATA - Returns only variable metadata (default) * METADATA_AND_VALUES - Returns variable metadata and values The values can be filtered by scope: * org_identifier * principal_identifier * model_identifier + +### Example + + +```typescript +import { createBearerAuthenticationConfig, VariableApi, SearchVariablesRequest } from '@thoughtspot/rest-api-sdk'; + +const configuration = createBearerAuthenticationConfig("CLUSTER_SERVER_URL", { + username: "YOUR_USERNAME", + password: "YOUR_PASSWORD", +}); +const apiInstance = new VariableApi(configuration); + +apiInstance.searchVariables( + // SearchVariablesRequest + { + variable_details: [ + { + identifier: "identifier_example", + type: "CONNECTION_PROPERTY", + name_pattern: "name_pattern_example", + }, + ], + value_scope: [ + { + org_identifier: "org_identifier_example", + principal_type: "USER", + principal_identifier: "principal_identifier_example", + model_identifier: "model_identifier_example", + }, + ], + record_offset: 0, + record_size: 10, + response_content: "METADATA", + } +).then((data:any) => { + console.log('API called successfully. Returned data: ' + data); +}).catch((error:any) => console.error(error)); + + +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **searchVariablesRequest** | **SearchVariablesRequest**| | + + +### Return type + +**Array** + +### Authorization + +[bearerAuth](README.md#bearerAuth) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | List of variables is successful. | - | +**400** | Invalid request. | - | +**401** | Unauthorized access. | - | +**403** | Forbidden access. | - | +**500** | Unexpected error | - | + +[[Back to top]](#) [[Back to API list]](README.md#documentation-for-api-endpoints) [[Back to Model list]](README.md#documentation-for-models) [[Back to README]](README.md) + +# **updateVariable** +> void updateVariable(updateVariableRequest) + + Update a variable\'s name Version: 26.4.0.cl or later Allows updating a variable\'s name in ThoughtSpot. Requires ADMINISTRATION role and TENANT scope. The CAN_MANAGE_VARIABLES permission allows you to manage Formula Variables in the current organization scope. The API endpoint allows updating: * The variable name + +### Example + + +```typescript +import { createBearerAuthenticationConfig, VariableApi, UpdateVariableRequest } from '@thoughtspot/rest-api-sdk'; + +const configuration = createBearerAuthenticationConfig("CLUSTER_SERVER_URL", { + username: "YOUR_USERNAME", + password: "YOUR_PASSWORD", +}); +const apiInstance = new VariableApi(configuration); + +apiInstance.updateVariable( + // string | Unique id or name of the variable to update. + "identifier_example" , + // UpdateVariableRequest + { + name: "name_example", + } +).then((data:any) => { + console.log('API called successfully. Returned data: ' + data); +}).catch((error:any) => console.error(error)); + + +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **updateVariableRequest** | **UpdateVariableRequest**| | + **identifier** | [**string**] | Unique id or name of the variable to update. | defaults to undefined + + +### Return type + +**void** + +### Authorization + +[bearerAuth](README.md#bearerAuth) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**204** | Variable name updated successfully. | - | +**400** | Invalid request. | - | +**401** | Unauthorized access. | - | +**403** | Forbidden access. | - | +**500** | Unexpected error | - | + +[[Back to top]](#) [[Back to API list]](README.md#documentation-for-api-endpoints) [[Back to Model list]](README.md#documentation-for-models) [[Back to README]](README.md) + +# **updateVariableValues** +> void updateVariableValues(updateVariableValuesRequest) + + Update values for multiple variables Version: 10.14.0.cl or later **Note:** This API endpoint is deprecated and will be removed from ThoughtSpot in a future release. Use [POST /api/rest/2.0/template/variables/{identifier}/update-values](/api/rest/2.0/template/variables/%7Bidentifier%7D/update-values) instead. Allows updating values for multiple variables in ThoughtSpot. Requires ADMINISTRATION role. The CAN_MANAGE_VARIABLES permission allows you to manage Formula Variables in the current organization scope. The API endpoint allows: * Adding new values to variables * Replacing existing values * Deleting values from variables When updating variable values, you need to specify: * The variable identifiers * The values to add/replace/remove for each variable * The operation to perform (ADD, REPLACE, REMOVE, RESET) Behaviour based on operation type: * ADD - Adds values to the variable if this is a list type variable, else same as replace. * REPLACE - Replaces all values of a given set of constraints with the current set of values. * REMOVE - Removes any values which match the set of conditions of the variables if this is a list type variable, else clears value. * RESET - Removes all constrains for a given variable, scope is ignored + +### Example + + +```typescript +import { createBearerAuthenticationConfig, VariableApi, UpdateVariableValuesRequest } from '@thoughtspot/rest-api-sdk'; + +const configuration = createBearerAuthenticationConfig("CLUSTER_SERVER_URL", { + username: "YOUR_USERNAME", + password: "YOUR_PASSWORD", +}); +const apiInstance = new VariableApi(configuration); + +apiInstance.updateVariableValues( + // UpdateVariableValuesRequest + { + variable_assignment: [ + { + variable_identifier: "variable_identifier_example", + variable_values: [ + "variable_values_example", + ], + operation: "ADD", + }, + ], + variable_value_scope: [ + { + org_identifier: "org_identifier_example", + principal_type: "USER", + principal_identifier: "principal_identifier_example", + model_identifier: "model_identifier_example", + priority: 1, + }, + ], + } +).then((data:any) => { + console.log('API called successfully. Returned data: ' + data); +}).catch((error:any) => console.error(error)); + + +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **updateVariableValuesRequest** | **UpdateVariableValuesRequest**| | + + +### Return type + +**void** + +### Authorization + +[bearerAuth](README.md#bearerAuth) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**204** | Variable values updated successfully. | - | +**400** | Invalid request. | - | +**401** | Unauthorized access. | - | +**403** | Forbidden access. | - | +**500** | Unexpected error | - | + +[[Back to top]](#) [[Back to API list]](README.md#documentation-for-api-endpoints) [[Back to Model list]](README.md#documentation-for-models) [[Back to README]](README.md) + diff --git a/sdks/typescript/VersionControlApi.md b/sdks/typescript/VersionControlApi.md new file mode 100644 index 000000000..1a7c869c1 --- /dev/null +++ b/sdks/typescript/VersionControlApi.md @@ -0,0 +1,620 @@ +# ThoughtSpotRestApiSdk.VersionControlApi + +All URIs are relative to *CLUSTER_URL* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**commitBranch**](VersionControlApi.md#commitBranch) | **POST** /api/rest/2.0/vcs/git/branches/commit | +[**createConfig**](VersionControlApi.md#createConfig) | **POST** /api/rest/2.0/vcs/git/config/create | +[**deleteConfig**](VersionControlApi.md#deleteConfig) | **POST** /api/rest/2.0/vcs/git/config/delete | +[**deployCommit**](VersionControlApi.md#deployCommit) | **POST** /api/rest/2.0/vcs/git/commits/deploy | +[**revertCommit**](VersionControlApi.md#revertCommit) | **POST** /api/rest/2.0/vcs/git/commits/{commit_id}/revert | +[**searchCommits**](VersionControlApi.md#searchCommits) | **POST** /api/rest/2.0/vcs/git/commits/search | +[**searchConfig**](VersionControlApi.md#searchConfig) | **POST** /api/rest/2.0/vcs/git/config/search | +[**updateConfig**](VersionControlApi.md#updateConfig) | **POST** /api/rest/2.0/vcs/git/config/update | +[**validateMerge**](VersionControlApi.md#validateMerge) | **POST** /api/rest/2.0/vcs/git/branches/validate | + + +# **commitBranch** +> CommitResponse commitBranch(commitBranchRequest) + + Version: 9.2.0.cl or later Commits TML files of metadata objects to the Git branch configured on your instance. Requires at least edit access to objects used in the commit operation. Before using this endpoint to push your commits: * Enable Git integration on your instance. * Make sure the Git repository and branch details are configured on your instance. For more information, see [Git integration documentation](https://developers.thoughtspot.com/docs/git-integration). + +### Example + + +```typescript +import { createBearerAuthenticationConfig, VersionControlApi, CommitBranchRequest } from '@thoughtspot/rest-api-sdk'; + +const configuration = createBearerAuthenticationConfig("CLUSTER_SERVER_URL", { + username: "YOUR_USERNAME", + password: "YOUR_PASSWORD", +}); +const apiInstance = new VersionControlApi(configuration); + +apiInstance.commitBranch( + // CommitBranchRequest + { + metadata: [ + { + identifier: "identifier_example", + type: "LIVEBOARD", + }, + ], + delete_aware: true, + branch_name: "branch_name_example", + comment: "comment_example", + } +).then((data:any) => { + console.log('API called successfully. Returned data: ' + data); +}).catch((error:any) => console.error(error)); + + +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **commitBranchRequest** | **CommitBranchRequest**| | + + +### Return type + +**CommitResponse** + +### Authorization + +[bearerAuth](README.md#bearerAuth) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Successfully committed the metadata objects | - | +**400** | Invalid request. | - | +**401** | Unauthorized access. | - | +**403** | Forbidden access. | - | +**500** | Unexpected error | - | + +[[Back to top]](#) [[Back to API list]](README.md#documentation-for-api-endpoints) [[Back to Model list]](README.md#documentation-for-models) [[Back to README]](README.md) + +# **createConfig** +> RepoConfigObject createConfig(createConfigRequest) + + Version: 9.2.0.cl or later Allows you to connect a ThoughtSpot instance to a Git repository. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance on your instance, the `CAN_SETUP_VERSION_CONTROL` (**Can set up version control**) privilege. You can use this API endpoint to connect your ThoughtSpot development and production environments to the development and production branches of a Git repository. Before using this endpoint to connect your ThoughtSpot instance to a Git repository, check the following prerequisites: * You have a Git repository. If you are using GitHub, make sure you have a valid account and an access token to connect ThoughtSpot to GitHub. For information about generating a token, see [GitHub Documentation](https://docs.github.com/en/authentication/keeping-your-account-and-data-secure/managing-your-personal-access-tokens). * Your access token has `repo` scope that grants full access to public and private repositories. * Your Git repository has a branch that can be configured as a default branch in ThoughtSpot. For more information, see [Git integration documentation](https://developers.thoughtspot.com/docs/?pageid=git-integration). **Note**: ThoughtSpot supports only GitHub / itHub Enterprise for CI/CD. + +### Example + + +```typescript +import { createBearerAuthenticationConfig, VersionControlApi, CreateConfigRequest } from '@thoughtspot/rest-api-sdk'; + +const configuration = createBearerAuthenticationConfig("CLUSTER_SERVER_URL", { + username: "YOUR_USERNAME", + password: "YOUR_PASSWORD", +}); +const apiInstance = new VersionControlApi(configuration); + +apiInstance.createConfig( + // CreateConfigRequest + { + repository_url: "repository_url_example", + username: "username_example", + access_token: "access_token_example", + org_identifier: "org_identifier_example", + branch_names: [ + "branch_names_example", + ], + commit_branch_name: "commit_branch_name_example", + enable_guid_mapping: true, + configuration_branch_name: "configuration_branch_name_example", + } +).then((data:any) => { + console.log('API called successfully. Returned data: ' + data); +}).catch((error:any) => console.error(error)); + + +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **createConfigRequest** | **CreateConfigRequest**| | + + +### Return type + +**RepoConfigObject** + +### Authorization + +[bearerAuth](README.md#bearerAuth) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Successfully configured local repository | - | +**400** | Invalid request. | - | +**401** | Unauthorized access. | - | +**403** | Forbidden access. | - | +**500** | Unexpected error | - | + +[[Back to top]](#) [[Back to API list]](README.md#documentation-for-api-endpoints) [[Back to Model list]](README.md#documentation-for-models) [[Back to README]](README.md) + +# **deleteConfig** +> void deleteConfig(deleteConfigRequest) + + Version: 9.2.0.cl or later Deletes Git repository configuration from your ThoughtSpot instance. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance on your instance, the `CAN_SETUP_VERSION_CONTROL` (**Can set up version control**) privilege. + +### Example + + +```typescript +import { createBearerAuthenticationConfig, VersionControlApi, DeleteConfigRequest } from '@thoughtspot/rest-api-sdk'; + +const configuration = createBearerAuthenticationConfig("CLUSTER_SERVER_URL", { + username: "YOUR_USERNAME", + password: "YOUR_PASSWORD", +}); +const apiInstance = new VersionControlApi(configuration); + +apiInstance.deleteConfig( + // DeleteConfigRequest + { + cluster_level: true, + } +).then((data:any) => { + console.log('API called successfully. Returned data: ' + data); +}).catch((error:any) => console.error(error)); + + +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **deleteConfigRequest** | **DeleteConfigRequest**| | + + +### Return type + +**void** + +### Authorization + +[bearerAuth](README.md#bearerAuth) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**204** | Successfully deleted local repository configuration | - | +**400** | Invalid request. | - | +**401** | Unauthorized access. | - | +**403** | Forbidden access. | - | +**500** | Unexpected error | - | + +[[Back to top]](#) [[Back to API list]](README.md#documentation-for-api-endpoints) [[Back to Model list]](README.md#documentation-for-models) [[Back to README]](README.md) + +# **deployCommit** +> Array deployCommit(deployCommitRequest) + + Version: 9.2.0.cl or later Allows you to deploy a commit and publish TML content to your ThoughtSpot instance. Requires at least edit access to the objects used in the deploy operation. The API deploys the head of the branch unless a `commit_id` is specified in the API request. If the branch name is not defined in the request, the default branch is considered for deploying commits. For more information, see [Git integration documentation](https://developers.thoughtspot.com/docs/git-integration). + +### Example + + +```typescript +import { createBearerAuthenticationConfig, VersionControlApi, DeployCommitRequest } from '@thoughtspot/rest-api-sdk'; + +const configuration = createBearerAuthenticationConfig("CLUSTER_SERVER_URL", { + username: "YOUR_USERNAME", + password: "YOUR_PASSWORD", +}); +const apiInstance = new VersionControlApi(configuration); + +apiInstance.deployCommit( + // DeployCommitRequest + { + commit_id: "commit_id_example", + branch_name: "branch_name_example", + deploy_type: "DELTA", + deploy_policy: "ALL_OR_NONE", + } +).then((data:any) => { + console.log('API called successfully. Returned data: ' + data); +}).catch((error:any) => console.error(error)); + + +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **deployCommitRequest** | **DeployCommitRequest**| | + + +### Return type + +**Array** + +### Authorization + +[bearerAuth](README.md#bearerAuth) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Successfully deployed the changes | - | +**400** | Invalid request. | - | +**401** | Unauthorized access. | - | +**403** | Forbidden access. | - | +**500** | Unexpected error | - | + +[[Back to top]](#) [[Back to API list]](README.md#documentation-for-api-endpoints) [[Back to Model list]](README.md#documentation-for-models) [[Back to README]](README.md) + +# **revertCommit** +> RevertResponse revertCommit(revertCommitRequest) + + Version: 9.2.0.cl or later Reverts TML objects to a previous commit specified in the API request. Requires at least edit access to objects. In the API request, specify the `commit_id`. If the branch name is not specified in the request, the API will consider the default branch configured on your instance. By default, the API reverts all objects. If the revert operation fails for one of the objects provided in the commit, the API returns an error and does not revert any object. For more information, see [Git integration documentation](https://developers.thoughtspot.com/docs/git-integration). + +### Example + + +```typescript +import { createBearerAuthenticationConfig, VersionControlApi, RevertCommitRequest } from '@thoughtspot/rest-api-sdk'; + +const configuration = createBearerAuthenticationConfig("CLUSTER_SERVER_URL", { + username: "YOUR_USERNAME", + password: "YOUR_PASSWORD", +}); +const apiInstance = new VersionControlApi(configuration); + +apiInstance.revertCommit( + // string | Commit id to which the object should be reverted + "commit_id_example" , + // RevertCommitRequest + { + metadata: [ + { + identifier: "identifier_example", + type: "LIVEBOARD", + }, + ], + branch_name: "branch_name_example", + revert_policy: "ALL_OR_NONE", + } +).then((data:any) => { + console.log('API called successfully. Returned data: ' + data); +}).catch((error:any) => console.error(error)); + + +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **revertCommitRequest** | **RevertCommitRequest**| | + **commitId** | [**string**] | Commit id to which the object should be reverted | defaults to undefined + + +### Return type + +**RevertResponse** + +### Authorization + +[bearerAuth](README.md#bearerAuth) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Reverted the object to the commit point specified | - | +**400** | Invalid request. | - | +**401** | Unauthorized access. | - | +**403** | Forbidden access. | - | +**500** | Unexpected error | - | + +[[Back to top]](#) [[Back to API list]](README.md#documentation-for-api-endpoints) [[Back to Model list]](README.md#documentation-for-models) [[Back to README]](README.md) + +# **searchCommits** +> Array searchCommits(searchCommitsRequest) + + Version: 9.2.0.cl or later Gets a list of commits for a given metadata object. Requires `DATAMANAGEMENT` (**Can manage data**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance on your instance, the `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` (**Can manage data models**) privilege and edit access to the metadata objects. + +### Example + + +```typescript +import { createBearerAuthenticationConfig, VersionControlApi, SearchCommitsRequest } from '@thoughtspot/rest-api-sdk'; + +const configuration = createBearerAuthenticationConfig("CLUSTER_SERVER_URL", { + username: "YOUR_USERNAME", + password: "YOUR_PASSWORD", +}); +const apiInstance = new VersionControlApi(configuration); + +apiInstance.searchCommits( + // SearchCommitsRequest + { + metadata_identifier: "metadata_identifier_example", + metadata_type: "LIVEBOARD", + branch_name: "branch_name_example", + record_offset: 1, + record_size: 1, + } +).then((data:any) => { + console.log('API called successfully. Returned data: ' + data); +}).catch((error:any) => console.error(error)); + + +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **searchCommitsRequest** | **SearchCommitsRequest**| | + + +### Return type + +**Array** + +### Authorization + +[bearerAuth](README.md#bearerAuth) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Commit history of the metadata object | - | +**400** | Invalid request. | - | +**401** | Unauthorized access. | - | +**403** | Forbidden access. | - | +**500** | Unexpected error | - | + +[[Back to top]](#) [[Back to API list]](README.md#documentation-for-api-endpoints) [[Back to Model list]](README.md#documentation-for-models) [[Back to README]](README.md) + +# **searchConfig** +> Array searchConfig(searchConfigRequest) + + Version: 9.2.0.cl or later Gets Git repository connections configured on the ThoughtSpot instance. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance on your instance, the `CAN_SETUP_VERSION_CONTROL` (**Can set up version control**) privilege. + +### Example + + +```typescript +import { createBearerAuthenticationConfig, VersionControlApi, SearchConfigRequest } from '@thoughtspot/rest-api-sdk'; + +const configuration = createBearerAuthenticationConfig("CLUSTER_SERVER_URL", { + username: "YOUR_USERNAME", + password: "YOUR_PASSWORD", +}); +const apiInstance = new VersionControlApi(configuration); + +apiInstance.searchConfig( + // SearchConfigRequest + { + org_identifiers: [ + "org_identifiers_example", + ], + } +).then((data:any) => { + console.log('API called successfully. Returned data: ' + data); +}).catch((error:any) => console.error(error)); + + +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **searchConfigRequest** | **SearchConfigRequest**| | + + +### Return type + +**Array** + +### Authorization + +[bearerAuth](README.md#bearerAuth) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Details of local repository configuration | - | +**400** | Invalid request. | - | +**401** | Unauthorized access. | - | +**403** | Forbidden access. | - | +**500** | Unexpected error | - | + +[[Back to top]](#) [[Back to API list]](README.md#documentation-for-api-endpoints) [[Back to Model list]](README.md#documentation-for-models) [[Back to README]](README.md) + +# **updateConfig** +> RepoConfigObject updateConfig(updateConfigRequest) + + Version: 9.2.0.cl or later Updates Git repository configuration settings. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance on your instance, the `CAN_SETUP_VERSION_CONTROL` (**Can set up version control**) privilege. + +### Example + + +```typescript +import { createBearerAuthenticationConfig, VersionControlApi, UpdateConfigRequest } from '@thoughtspot/rest-api-sdk'; + +const configuration = createBearerAuthenticationConfig("CLUSTER_SERVER_URL", { + username: "YOUR_USERNAME", + password: "YOUR_PASSWORD", +}); +const apiInstance = new VersionControlApi(configuration); + +apiInstance.updateConfig( + // UpdateConfigRequest + { + username: "username_example", + access_token: "access_token_example", + org_identifier: "org_identifier_example", + branch_names: [ + "branch_names_example", + ], + commit_branch_name: "commit_branch_name_example", + enable_guid_mapping: true, + configuration_branch_name: "configuration_branch_name_example", + } +).then((data:any) => { + console.log('API called successfully. Returned data: ' + data); +}).catch((error:any) => console.error(error)); + + +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **updateConfigRequest** | **UpdateConfigRequest**| | + + +### Return type + +**RepoConfigObject** + +### Authorization + +[bearerAuth](README.md#bearerAuth) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Successfully updated local repository configuration | - | +**400** | Invalid request. | - | +**401** | Unauthorized access. | - | +**403** | Forbidden access. | - | +**500** | Unexpected error | - | + +[[Back to top]](#) [[Back to API list]](README.md#documentation-for-api-endpoints) [[Back to Model list]](README.md#documentation-for-models) [[Back to README]](README.md) + +# **validateMerge** +> Array validateMerge(validateMergeRequest) + + Version: 9.2.0.cl or later Validates the content of your source branch against the objects in your destination environment. Before merging content from your source branch to the destination branch, run this API operation from your destination environment and ensure that the changes from the source branch function in the destination environment. Requires `DATAMANAGEMENT` (**Can manage data**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance on your instance, the `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` (**Can manage data models**) privilege and edit access to the metadata objects. + +### Example + + +```typescript +import { createBearerAuthenticationConfig, VersionControlApi, ValidateMergeRequest } from '@thoughtspot/rest-api-sdk'; + +const configuration = createBearerAuthenticationConfig("CLUSTER_SERVER_URL", { + username: "YOUR_USERNAME", + password: "YOUR_PASSWORD", +}); +const apiInstance = new VersionControlApi(configuration); + +apiInstance.validateMerge( + // ValidateMergeRequest + { + source_branch_name: "source_branch_name_example", + target_branch_name: "target_branch_name_example", + } +).then((data:any) => { + console.log('API called successfully. Returned data: ' + data); +}).catch((error:any) => console.error(error)); + + +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **validateMergeRequest** | **ValidateMergeRequest**| | + + +### Return type + +**Array** + +### Authorization + +[bearerAuth](README.md#bearerAuth) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | validation done successfully | - | +**400** | Invalid request. | - | +**401** | Unauthorized access. | - | +**403** | Forbidden access. | - | +**500** | Unexpected error | - | + +[[Back to top]](#) [[Back to API list]](README.md#documentation-for-api-endpoints) [[Back to Model list]](README.md#documentation-for-models) [[Back to README]](README.md) + diff --git a/sdks/typescript/WebhooksApi.md b/sdks/typescript/WebhooksApi.md new file mode 100644 index 000000000..3f3aea5f8 --- /dev/null +++ b/sdks/typescript/WebhooksApi.md @@ -0,0 +1,300 @@ +# ThoughtSpotRestApiSdk.WebhooksApi + +All URIs are relative to *CLUSTER_URL* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**createWebhookConfiguration**](WebhooksApi.md#createWebhookConfiguration) | **POST** /api/rest/2.0/webhooks/create | +[**deleteWebhookConfigurations**](WebhooksApi.md#deleteWebhookConfigurations) | **POST** /api/rest/2.0/webhooks/delete | +[**searchWebhookConfigurations**](WebhooksApi.md#searchWebhookConfigurations) | **POST** /api/rest/2.0/webhooks/search | +[**updateWebhookConfiguration**](WebhooksApi.md#updateWebhookConfiguration) | **POST** /api/rest/2.0/webhooks/{webhook_identifier}/update | + + +# **createWebhookConfiguration** +> WebhookResponse createWebhookConfiguration(createWebhookConfigurationRequest) + + Version: 10.14.0.cl or later Creates a new webhook configuration to receive notifications for specified events. The webhook will be triggered when the configured events occur in the system. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) or `DEVELOPER` (**Has developer privilege**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, users with `CAN_MANAGE_WEBHOOKS` (**Can manage webhooks**) privilege are also authorized to perform this action. + +### Example + + +```typescript +import { createBearerAuthenticationConfig, WebhooksApi, CreateWebhookConfigurationRequest } from '@thoughtspot/rest-api-sdk'; + +const configuration = createBearerAuthenticationConfig("CLUSTER_SERVER_URL", { + username: "YOUR_USERNAME", + password: "YOUR_PASSWORD", +}); +const apiInstance = new WebhooksApi(configuration); + +apiInstance.createWebhookConfiguration( + // CreateWebhookConfigurationRequest + { + name: "name_example", + description: "description_example", + url: "url_example", + url_params: {}, + events: [ + "LIVEBOARD_SCHEDULE", + ], + authentication: null, + signature_verification: null, + storage_destination: null, + additional_headers: [ + { + key: "key_example", + value: "value_example", + }, + ], + } +).then((data:any) => { + console.log('API called successfully. Returned data: ' + data); +}).catch((error:any) => console.error(error)); + + +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **createWebhookConfigurationRequest** | **CreateWebhookConfigurationRequest**| | + + +### Return type + +**WebhookResponse** + +### Authorization + +[bearerAuth](README.md#bearerAuth) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Webhook configuration created successfully | - | +**400** | Invalid request. | - | +**401** | Unauthorized access. | - | +**403** | Forbidden access. | - | +**500** | Unexpected error | - | + +[[Back to top]](#) [[Back to API list]](README.md#documentation-for-api-endpoints) [[Back to Model list]](README.md#documentation-for-models) [[Back to README]](README.md) + +# **deleteWebhookConfigurations** +> WebhookDeleteResponse deleteWebhookConfigurations(deleteWebhookConfigurationsRequest) + + Version: 10.14.0.cl or later Deletes one or more webhook configurations by their unique id or name. Returns status of each deletion operation, including successfully deleted webhooks and any failures with error details. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) or `DEVELOPER` (**Has developer privilege**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, users with `CAN_MANAGE_WEBHOOKS` (**Can manage webhooks**) privilege are also authorized to perform this action. + +### Example + + +```typescript +import { createBearerAuthenticationConfig, WebhooksApi, DeleteWebhookConfigurationsRequest } from '@thoughtspot/rest-api-sdk'; + +const configuration = createBearerAuthenticationConfig("CLUSTER_SERVER_URL", { + username: "YOUR_USERNAME", + password: "YOUR_PASSWORD", +}); +const apiInstance = new WebhooksApi(configuration); + +apiInstance.deleteWebhookConfigurations( + // DeleteWebhookConfigurationsRequest + { + webhook_identifiers: [ + "webhook_identifiers_example", + ], + } +).then((data:any) => { + console.log('API called successfully. Returned data: ' + data); +}).catch((error:any) => console.error(error)); + + +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **deleteWebhookConfigurationsRequest** | **DeleteWebhookConfigurationsRequest**| | + + +### Return type + +**WebhookDeleteResponse** + +### Authorization + +[bearerAuth](README.md#bearerAuth) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Webhook configurations deleted successfully | - | +**400** | Invalid request. | - | +**401** | Unauthorized access. | - | +**403** | Forbidden access. | - | +**500** | Unexpected error | - | + +[[Back to top]](#) [[Back to API list]](README.md#documentation-for-api-endpoints) [[Back to Model list]](README.md#documentation-for-models) [[Back to README]](README.md) + +# **searchWebhookConfigurations** +> WebhookSearchResponse searchWebhookConfigurations(searchWebhookConfigurationsRequest) + + Version: 10.14.0.cl or later Searches for webhook configurations based on various criteria such as Org, webhook identifier, event type, with support for pagination and sorting. Returns matching webhook configurations with their complete details. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) or `DEVELOPER` (**Has developer privilege**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, users with `CAN_MANAGE_WEBHOOKS` (**Can manage webhooks**) privilege are also authorized to perform this action. + +### Example + + +```typescript +import { createBearerAuthenticationConfig, WebhooksApi, SearchWebhookConfigurationsRequest } from '@thoughtspot/rest-api-sdk'; + +const configuration = createBearerAuthenticationConfig("CLUSTER_SERVER_URL", { + username: "YOUR_USERNAME", + password: "YOUR_PASSWORD", +}); +const apiInstance = new WebhooksApi(configuration); + +apiInstance.searchWebhookConfigurations( + // SearchWebhookConfigurationsRequest + { + org_identifier: "org_identifier_example", + webhook_identifier: "webhook_identifier_example", + event_type: "LIVEBOARD_SCHEDULE", + record_offset: 0, + record_size: 50, + sort_options: null, + } +).then((data:any) => { + console.log('API called successfully. Returned data: ' + data); +}).catch((error:any) => console.error(error)); + + +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **searchWebhookConfigurationsRequest** | **SearchWebhookConfigurationsRequest**| | + + +### Return type + +**WebhookSearchResponse** + +### Authorization + +[bearerAuth](README.md#bearerAuth) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Webhook configurations retrieved successfully | - | +**400** | Invalid request. | - | +**401** | Unauthorized access. | - | +**403** | Forbidden access. | - | +**500** | Unexpected error | - | + +[[Back to top]](#) [[Back to API list]](README.md#documentation-for-api-endpoints) [[Back to Model list]](README.md#documentation-for-models) [[Back to README]](README.md) + +# **updateWebhookConfiguration** +> void updateWebhookConfiguration(updateWebhookConfigurationRequest) + + Version: 10.14.0.cl or later Updates an existing webhook configuration by its unique id or name. Only the provided fields will be updated. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) or `DEVELOPER` (**Has developer privilege**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, users with `CAN_MANAGE_WEBHOOKS` (**Can manage webhooks**) privilege are also authorized to perform this action. + +### Example + + +```typescript +import { createBearerAuthenticationConfig, WebhooksApi, UpdateWebhookConfigurationRequest } from '@thoughtspot/rest-api-sdk'; + +const configuration = createBearerAuthenticationConfig("CLUSTER_SERVER_URL", { + username: "YOUR_USERNAME", + password: "YOUR_PASSWORD", +}); +const apiInstance = new WebhooksApi(configuration); + +apiInstance.updateWebhookConfiguration( + // string | Unique ID or name of the webhook configuration. + "webhook_identifier_example" , + // UpdateWebhookConfigurationRequest + { + name: "name_example", + description: "description_example", + url: "url_example", + url_params: {}, + events: [ + "LIVEBOARD_SCHEDULE", + ], + authentication: null, + signature_verification: null, + storage_destination: null, + additional_headers: [ + { + key: "key_example", + value: "value_example", + }, + ], + } +).then((data:any) => { + console.log('API called successfully. Returned data: ' + data); +}).catch((error:any) => console.error(error)); + + +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **updateWebhookConfigurationRequest** | **UpdateWebhookConfigurationRequest**| | + **webhookIdentifier** | [**string**] | Unique ID or name of the webhook configuration. | defaults to undefined + + +### Return type + +**void** + +### Authorization + +[bearerAuth](README.md#bearerAuth) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**204** | Webhook configuration updated successfully | - | +**400** | Invalid request. | - | +**401** | Unauthorized access. | - | +**403** | Forbidden access. | - | +**500** | Unexpected error | - | + +[[Back to top]](#) [[Back to API list]](README.md#documentation-for-api-endpoints) [[Back to Model list]](README.md#documentation-for-models) [[Back to README]](README.md) + diff --git a/sdks/typescript/apis/AIApi.ts b/sdks/typescript/apis/AIApi.ts new file mode 100644 index 000000000..9e2433a87 --- /dev/null +++ b/sdks/typescript/apis/AIApi.ts @@ -0,0 +1,1665 @@ +// TODO: better import syntax? +import {BaseAPIRequestFactory, RequiredError, COLLECTION_FORMATS} from './baseapi'; +import {Configuration} from '../configuration'; +import {RequestContext, HttpMethod, ResponseContext, HttpFile} from '../http/http'; +import {ObjectSerializer} from '../models/ObjectSerializer'; +import {ApiException} from './exception'; +import {canConsumeForm, isCodeInRange} from '../util'; +import {SecurityAuthentication} from '../auth/auth'; + + +import { AgentConversation } from '../models/AgentConversation'; +import { Conversation } from '../models/Conversation'; +import { CreateAgentConversationRequest } from '../models/CreateAgentConversationRequest'; +import { CreateConversationRequest } from '../models/CreateConversationRequest'; +import { ErrorResponse } from '../models/ErrorResponse'; +import { EurekaDataSourceSuggestionResponse } from '../models/EurekaDataSourceSuggestionResponse'; +import { EurekaDecomposeQueryResponse } from '../models/EurekaDecomposeQueryResponse'; +import { EurekaGetNLInstructionsResponse } from '../models/EurekaGetNLInstructionsResponse'; +import { EurekaGetRelevantQuestionsResponse } from '../models/EurekaGetRelevantQuestionsResponse'; +import { EurekaSetNLInstructionsResponse } from '../models/EurekaSetNLInstructionsResponse'; +import { GetDataSourceSuggestionsRequest } from '../models/GetDataSourceSuggestionsRequest'; +import { GetNLInstructionsRequest } from '../models/GetNLInstructionsRequest'; +import { GetRelevantQuestionsRequest } from '../models/GetRelevantQuestionsRequest'; +import { QueryGetDecomposedQueryRequest } from '../models/QueryGetDecomposedQueryRequest'; +import { ResponseMessage } from '../models/ResponseMessage'; +import { SendAgentConversationMessageRequest } from '../models/SendAgentConversationMessageRequest'; +import { SendAgentConversationMessageStreamingRequest } from '../models/SendAgentConversationMessageStreamingRequest'; +import { SendAgentMessageRequest } from '../models/SendAgentMessageRequest'; +import { SendAgentMessageResponse } from '../models/SendAgentMessageResponse'; +import { SendAgentMessageStreamingRequest } from '../models/SendAgentMessageStreamingRequest'; +import { SendMessageRequest } from '../models/SendMessageRequest'; +import { SetNLInstructionsRequest } from '../models/SetNLInstructionsRequest'; +import { SingleAnswerRequest } from '../models/SingleAnswerRequest'; + +/** + * no description + */ +export class AIApiRequestFactory extends BaseAPIRequestFactory { + + /** + * Version: 26.2.0.cl or later Creates a new Spotter agent conversation based on the provided context and settings. The endpoint was in Beta from 26.2.0.cl through 26.4.0.cl. Requires `CAN_USE_SPOTTER` privilege and at least view access to the metadata object specified in the request. #### Usage guidelines The request must include the `metadata_context` parameter to define the conversation context. The context type can be one of: - `DATA_SOURCE` *(available from 26.5.0.cl)*: targets a specific data source. Provide `data_source_identifier` in `data_source_context` for a single data source, or `data_source_identifiers` for multi-data-source context. The deprecated `guid` field is accepted for backwards compatibility. - `AUTO_MODE` *(available from 26.5.0.cl)*: automatically discovers and selects the most relevant datasets for the user\'s queries. > **Note for callers on versions 26.2.0.cl – 26.4.0.cl (Beta):** use the lowercase `data_source` enum value with the `guid` field instead of the above. Example: `{ \"type\": \"data_source\", \"data_source_context\": { \"guid\": \"\" } }`. The `conversation_settings` parameter controls which Spotter capabilities are enabled for the conversation: - `enable_contextual_change_analysis` (default: `true`, **deprecated from 26.2.0.cl**) — always enabled in Spotter 3; setting this to `false` has no effect on versions >= 26.2.0.cl - `enable_natural_language_answer_generation` (default: `true`, **deprecated from 26.2.0.cl**) — always enabled in Spotter 3; setting this to `false` has no effect on versions >= 26.2.0.cl - `enable_reasoning` (default: `true`, **deprecated from 26.2.0.cl**) — always enabled in Spotter 3; setting this to `false` has no effect on versions >= 26.2.0.cl - `enable_save_chat` (default: `false`, *available from 26.5.0.cl*) — enables saving the conversation for later retrieval via conversation history If the request is successful, the response includes a unique `conversation_identifier` that must be passed to `sendAgentConversationMessage` or `sendAgentConversationMessageStreaming` to send messages within this conversation. The response also includes `conversation_id` with the same value for backwards compatibility; use `conversation_identifier` for new integrations. #### Example request ```json { \"metadata_context\": { \"type\": \"DATA_SOURCE\", \"data_source_context\": { \"data_source_identifier\": \"a1b2c3d4-e5f6-7890-abcd-ef1234567890\" } }, \"conversation_settings\": {} } ``` #### Error responses | Code | Description | | ---- | --------------------------------------------------------------------------------------------------------------------------------------- | | 401 | Unauthorized — authentication token is missing, expired, or invalid. | | 403 | Forbidden — the authenticated user does not have `CAN_USE_SPOTTER` privilege or lacks view permission on the specified metadata object. | > ###### Note: > > - This endpoint was in Beta from 26.2.0.cl through 26.4.0.cl and is Generally Available from version 26.5.0.cl. > - This endpoint requires Spotter - please contact ThoughtSpot support to enable Spotter on your cluster. + * @param createAgentConversationRequest + */ + public async createAgentConversation(createAgentConversationRequest: CreateAgentConversationRequest, _options?: Configuration): Promise { + let _config = _options || this.configuration; + + // verify required parameter 'createAgentConversationRequest' is not null or undefined + if (createAgentConversationRequest === null || createAgentConversationRequest === undefined) { + throw new RequiredError("AIApi", "createAgentConversation", "createAgentConversationRequest"); + } + + + // Path Params + const localVarPath = '/api/rest/2.0/ai/agent/conversation/create'; + + // Make Request Context + const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.POST); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.25.0") + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.25.0") + + + + + // Body Params + const contentType = ObjectSerializer.getPreferredMediaType([ + "application/json" + ]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = ObjectSerializer.stringify( + ObjectSerializer.serialize(createAgentConversationRequest, "CreateAgentConversationRequest", ""), + contentType + ); + requestContext.setBody(serializedBody); + + let authMethod: SecurityAuthentication | undefined; + // Apply auth methods + authMethod = _config.authMethods["bearerAuth"] + if (authMethod?.applySecurityAuthentication) { + await authMethod?.applySecurityAuthentication(requestContext); + } + + const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default + if (defaultAuth?.applySecurityAuthentication) { + await defaultAuth?.applySecurityAuthentication(requestContext); + } + + return requestContext; + } + + /** + * Version: 10.4.0.cl or later Creates a new conversation session tied to a specific data model for AI-driven natural language querying. Requires `CAN_USE_SPOTTER` privilege and at least view access to the metadata object specified in the request. #### Usage guidelines The request must include: - `metadata_identifier`: the unique ID of the data source that provides context for the conversation Optionally, you can provide: - `tokens`: a token string to set initial context for the conversation (e.g., `\"[sales],[item type],[state]\"`) If the request is successful, ThoughtSpot returns a unique `conversation_identifier` that must be passed to `sendMessage` to continue the conversation. #### Error responses | Code | Description | |------|-------------| | 401 | Unauthorized — authentication token is missing, expired, or invalid. | | 403 | Forbidden — the authenticated user does not have `CAN_USE_SPOTTER` privilege or lacks view permission on the specified metadata object. | > ###### Note: > * This endpoint is currently in Beta. Breaking changes may be introduced before the endpoint is made Generally Available. > * This endpoint requires Spotter - please contact ThoughtSpot support to enable Spotter on your cluster. + * @param createConversationRequest + */ + public async createConversation(createConversationRequest: CreateConversationRequest, _options?: Configuration): Promise { + let _config = _options || this.configuration; + + // verify required parameter 'createConversationRequest' is not null or undefined + if (createConversationRequest === null || createConversationRequest === undefined) { + throw new RequiredError("AIApi", "createConversation", "createConversationRequest"); + } + + + // Path Params + const localVarPath = '/api/rest/2.0/ai/conversation/create'; + + // Make Request Context + const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.POST); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.25.0") + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.25.0") + + + + + // Body Params + const contentType = ObjectSerializer.getPreferredMediaType([ + "application/json" + ]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = ObjectSerializer.stringify( + ObjectSerializer.serialize(createConversationRequest, "CreateConversationRequest", ""), + contentType + ); + requestContext.setBody(serializedBody); + + let authMethod: SecurityAuthentication | undefined; + // Apply auth methods + authMethod = _config.authMethods["bearerAuth"] + if (authMethod?.applySecurityAuthentication) { + await authMethod?.applySecurityAuthentication(requestContext); + } + + const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default + if (defaultAuth?.applySecurityAuthentication) { + await defaultAuth?.applySecurityAuthentication(requestContext); + } + + return requestContext; + } + + /** + * Version: 10.15.0.cl or later Suggests the most relevant data sources for a given natural language query, ranked by confidence with LLM-generated reasoning. Requires `CAN_USE_SPOTTER` privilege and at least view-level access to the underlying metadata entities referenced in the response. #### Usage guidelines The request must include: - `query`: the natural language question to find relevant data sources for If the request is successful, the API returns a ranked list of suggested data sources, each containing: - `confidence`: a float score indicating the model\'s confidence in the relevance of the suggestion - `details`: metadata about the data source - `data_source_identifier`: the unique ID of the data source - `data_source_name`: the display name of the data source - `description`: a description of the data source - `reasoning`: LLM-generated rationale explaining why the data source was recommended #### Error responses | Code | Description | |------|--------------------------------------------------------------------------------------------------------------------------------------------| | 401 | Unauthorized — authentication token is missing, expired, or invalid. | | 403 | Forbidden — the authenticated user does not have `CAN_USE_SPOTTER` privilege or lacks view permission on the underlying metadata entities. | > ###### Note: > * This endpoint is currently in Beta. Breaking changes may be introduced before it is made Generally Available. > * This endpoint requires Spotter — please contact ThoughtSpot Support to enable Spotter on your cluster. + * @param getDataSourceSuggestionsRequest + */ + public async getDataSourceSuggestions(getDataSourceSuggestionsRequest: GetDataSourceSuggestionsRequest, _options?: Configuration): Promise { + let _config = _options || this.configuration; + + // verify required parameter 'getDataSourceSuggestionsRequest' is not null or undefined + if (getDataSourceSuggestionsRequest === null || getDataSourceSuggestionsRequest === undefined) { + throw new RequiredError("AIApi", "getDataSourceSuggestions", "getDataSourceSuggestionsRequest"); + } + + + // Path Params + const localVarPath = '/api/rest/2.0/ai/data-source-suggestions'; + + // Make Request Context + const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.POST); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.25.0") + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.25.0") + + + + + // Body Params + const contentType = ObjectSerializer.getPreferredMediaType([ + "application/json" + ]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = ObjectSerializer.stringify( + ObjectSerializer.serialize(getDataSourceSuggestionsRequest, "GetDataSourceSuggestionsRequest", ""), + contentType + ); + requestContext.setBody(serializedBody); + + let authMethod: SecurityAuthentication | undefined; + // Apply auth methods + authMethod = _config.authMethods["bearerAuth"] + if (authMethod?.applySecurityAuthentication) { + await authMethod?.applySecurityAuthentication(requestContext); + } + + const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default + if (defaultAuth?.applySecurityAuthentication) { + await defaultAuth?.applySecurityAuthentication(requestContext); + } + + return requestContext; + } + + /** + * Version: 10.15.0.cl or later Retrieves existing natural language (NL) instructions configured for a specific data model. These instructions guide the AI system in understanding data context and generating more accurate responses. Requires `CAN_USE_SPOTTER` privilege, at least view access on the data model, and a bearer token corresponding to the org where the data model exists. #### Usage guidelines The request must include: - `data_source_identifier`: the unique ID of the data model to retrieve instructions for If the request is successful, the API returns: - `nl_instructions_info`: an array of instruction objects, each containing: - `instructions`: the configured text instructions for AI processing - `scope`: the scope of the instruction — currently only `GLOBAL` is supported #### Instructions scope - **GLOBAL**: Instructions that apply globally across the system on the given data-model (currently only global instructions are supported) #### Error responses | Code | Description | |------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| | 401 | Unauthorized — authentication token is missing, expired, or invalid. | | 403 | Forbidden — the authenticated user does not have `CAN_USE_SPOTTER` privilege, lacks view access on the data model, or the bearer token does not correspond to the org where the data model exists. | > ###### Note: > > - To use this API, the user needs at least view access on the data model, and must use the bearer token corresponding to the org where the data model exists. > - This endpoint is currently in Beta. Breaking changes may be introduced before the endpoint is made Generally Available. > - Available from version 10.15.0.cl and later. > - This endpoint requires Spotter — please contact ThoughtSpot Support to enable Spotter on your cluster. > - Use this API to review currently configured instructions before modifying them with `setNLInstructions`. + * @param getNLInstructionsRequest + */ + public async getNLInstructions(getNLInstructionsRequest: GetNLInstructionsRequest, _options?: Configuration): Promise { + let _config = _options || this.configuration; + + // verify required parameter 'getNLInstructionsRequest' is not null or undefined + if (getNLInstructionsRequest === null || getNLInstructionsRequest === undefined) { + throw new RequiredError("AIApi", "getNLInstructions", "getNLInstructionsRequest"); + } + + + // Path Params + const localVarPath = '/api/rest/2.0/ai/instructions/get'; + + // Make Request Context + const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.POST); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.25.0") + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.25.0") + + + + + // Body Params + const contentType = ObjectSerializer.getPreferredMediaType([ + "application/json" + ]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = ObjectSerializer.stringify( + ObjectSerializer.serialize(getNLInstructionsRequest, "GetNLInstructionsRequest", ""), + contentType + ); + requestContext.setBody(serializedBody); + + let authMethod: SecurityAuthentication | undefined; + // Apply auth methods + authMethod = _config.authMethods["bearerAuth"] + if (authMethod?.applySecurityAuthentication) { + await authMethod?.applySecurityAuthentication(requestContext); + } + + const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default + if (defaultAuth?.applySecurityAuthentication) { + await defaultAuth?.applySecurityAuthentication(requestContext); + } + + return requestContext; + } + + /** + * Version: 10.13.0.cl or later Breaks down a natural language query into a series of smaller analytical sub-questions, each mapped to a relevant data source. Requires `CAN_USE_SPOTTER` privilege and at least view-level access to the referenced metadata objects. #### Usage guidelines The request must include: - `query`: the natural language question to decompose into analytical sub-questions - `metadata_context`: at least one of the following context identifiers to guide question generation: - `conversation_identifier` — an existing conversation session ID - `answer_identifiers` — a list of Answer GUIDs - `liveboard_identifiers` — a list of Liveboard GUIDs - `data_source_identifiers` — a list of data source GUIDs Optional parameters for refining the output: - `ai_context`: additional context to improve response quality - `content` — supplementary text or CSV data as string input - `instructions` — custom text instructions for the AI system - `limit_relevant_questions`: maximum number of questions to return (default: `5`) - `bypass_cache`: if `true`, forces fresh computation instead of returning cached results If the request is successful, the API returns a list of relevant analytical questions, each containing: - `query`: the generated sub-question - `data_source_identifier`: the unique ID of the data source the question targets - `data_source_name`: the display name of the corresponding data source #### Error responses | Code | Description | |------|---------------------------------------------------------------------------------------------------------------------------------------| | 401 | Unauthorized — authentication token is missing, expired, or invalid. | | 403 | Forbidden — the authenticated user does not have `CAN_USE_SPOTTER` privilege or lacks view access to the referenced metadata objects. | > ###### Note: > * This endpoint is currently in Beta. Breaking changes may be introduced before the endpoint is made Generally Available. > * This endpoint requires Spotter - please contact ThoughtSpot support to enable Spotter on your cluster. + * @param getRelevantQuestionsRequest + */ + public async getRelevantQuestions(getRelevantQuestionsRequest: GetRelevantQuestionsRequest, _options?: Configuration): Promise { + let _config = _options || this.configuration; + + // verify required parameter 'getRelevantQuestionsRequest' is not null or undefined + if (getRelevantQuestionsRequest === null || getRelevantQuestionsRequest === undefined) { + throw new RequiredError("AIApi", "getRelevantQuestions", "getRelevantQuestionsRequest"); + } + + + // Path Params + const localVarPath = '/api/rest/2.0/ai/relevant-questions/'; + + // Make Request Context + const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.POST); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.25.0") + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.25.0") + + + + + // Body Params + const contentType = ObjectSerializer.getPreferredMediaType([ + "application/json" + ]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = ObjectSerializer.stringify( + ObjectSerializer.serialize(getRelevantQuestionsRequest, "GetRelevantQuestionsRequest", ""), + contentType + ); + requestContext.setBody(serializedBody); + + let authMethod: SecurityAuthentication | undefined; + // Apply auth methods + authMethod = _config.authMethods["bearerAuth"] + if (authMethod?.applySecurityAuthentication) { + await authMethod?.applySecurityAuthentication(requestContext); + } + + const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default + if (defaultAuth?.applySecurityAuthentication) { + await defaultAuth?.applySecurityAuthentication(requestContext); + } + + return requestContext; + } + + /** + * Version: 10.7.0.cl or later **Deprecated** — Use `getRelevantQuestions` instead (available from 10.13.0.cl). Breaks down a topical or goal-oriented natural language question into smaller, actionable analytical sub-questions, each mapped to a relevant data source for independent execution. Requires `CAN_USE_SPOTTER` privilege and at least view-level access to the referenced metadata objects. #### Usage guidelines The request accepts the following parameters: - `nlsRequest`: contains the user `query` to decompose, along with optional `instructions` and `bypassCache` flag - `worksheetIds`: list of data source identifiers to scope the decomposition - `answerIds`: list of Answer GUIDs whose data guides the response - `liveboardIds`: list of Liveboard GUIDs whose data guides the response - `conversationId`: an existing conversation session ID for context continuity - `content`: supplementary text or CSV data to improve response quality - `maxDecomposedQueries`: maximum number of sub-questions to return (default: `5`) If the request is successful, the API returns a `decomposedQueryResponse` containing a list of `decomposedQueries`, each with: - `query`: the generated analytical sub-question - `worksheetId`: the unique ID of the data source the question targets - `worksheetName`: the display name of the corresponding data source #### Error responses | Code | Description | |------|---------------------------------------------------------------------------------------------------------------------------------------| | 401 | Unauthorized — authentication token is missing, expired, or invalid. | | 403 | Forbidden — the authenticated user does not have `CAN_USE_SPOTTER` privilege or lacks view access to the referenced metadata objects. | > ###### Note: > * This endpoint is deprecated since 10.13.0.cl. Use `getRelevantQuestions` for new integrations. > * This endpoint is currently in Beta. Breaking changes may be introduced before the endpoint is made Generally Available. > * This endpoint requires Spotter — please contact ThoughtSpot support to enable Spotter on your cluster. + * @param queryGetDecomposedQueryRequest + */ + public async queryGetDecomposedQuery(queryGetDecomposedQueryRequest: QueryGetDecomposedQueryRequest, _options?: Configuration): Promise { + let _config = _options || this.configuration; + + // verify required parameter 'queryGetDecomposedQueryRequest' is not null or undefined + if (queryGetDecomposedQueryRequest === null || queryGetDecomposedQueryRequest === undefined) { + throw new RequiredError("AIApi", "queryGetDecomposedQuery", "queryGetDecomposedQueryRequest"); + } + + + // Path Params + const localVarPath = '/api/rest/2.0/ai/analytical-questions'; + + // Make Request Context + const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.POST); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.25.0") + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.25.0") + + + + + // Body Params + const contentType = ObjectSerializer.getPreferredMediaType([ + "application/json" + ]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = ObjectSerializer.stringify( + ObjectSerializer.serialize(queryGetDecomposedQueryRequest, "QueryGetDecomposedQueryRequest", ""), + contentType + ); + requestContext.setBody(serializedBody); + + let authMethod: SecurityAuthentication | undefined; + // Apply auth methods + authMethod = _config.authMethods["bearerAuth"] + if (authMethod?.applySecurityAuthentication) { + await authMethod?.applySecurityAuthentication(requestContext); + } + + const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default + if (defaultAuth?.applySecurityAuthentication) { + await defaultAuth?.applySecurityAuthentication(requestContext); + } + + return requestContext; + } + + /** + * Version: 26.5.0.cl or later Sends natural language messages to an existing Spotter agent conversation and returns the complete response synchronously. Requires `CAN_USE_SPOTTER` privilege and access to the metadata object associated with the conversation. The user must have access to the conversation session referenced by `conversation_identifier`. A conversation must first be created using the `createAgentConversation` API. #### Usage guidelines The request must include: - `conversation_identifier`: the unique session ID returned by `createAgentConversation`, used for context continuity and message tracking - `messages`: an array of one or more text messages to send to the agent The API returns an array of response objects, each containing: - `type`: the kind of response — `text`, `answer`, or `error` - `message`: the main content of the response - `metadata`: additional information depending on the message type (e.g., answer metadata includes analytics and visualization details) #### Error responses | Code | Description | |------|----------------------------------------------------------------------------------------------------------------------------------| | 401 | Unauthorized — authentication token is missing, expired, or invalid. | | 403 | Forbidden — the authenticated user does not have `CAN_USE_SPOTTER` privilege or lacks permission on the referenced conversation. | > ###### Note: > > - This endpoint is Generally Available from version 26.5.0.cl. > - This endpoint requires Spotter - please contact ThoughtSpot support to enable Spotter on your cluster. > - For real-time streamed responses, use `sendAgentConversationMessageStreaming` instead. + * @param conversationIdentifier Unique identifier for the conversation (used to track context) + * @param sendAgentConversationMessageRequest + */ + public async sendAgentConversationMessage(conversationIdentifier: string, sendAgentConversationMessageRequest: SendAgentConversationMessageRequest, _options?: Configuration): Promise { + let _config = _options || this.configuration; + + // verify required parameter 'conversationIdentifier' is not null or undefined + if (conversationIdentifier === null || conversationIdentifier === undefined) { + throw new RequiredError("AIApi", "sendAgentConversationMessage", "conversationIdentifier"); + } + + + // verify required parameter 'sendAgentConversationMessageRequest' is not null or undefined + if (sendAgentConversationMessageRequest === null || sendAgentConversationMessageRequest === undefined) { + throw new RequiredError("AIApi", "sendAgentConversationMessage", "sendAgentConversationMessageRequest"); + } + + + // Path Params + const localVarPath = '/api/rest/2.0/ai/agent/conversation/{conversation_identifier}/send' + .replace('{' + 'conversation_identifier' + '}', encodeURIComponent(String(conversationIdentifier))); + + // Make Request Context + const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.POST); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.25.0") + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.25.0") + + + + + // Body Params + const contentType = ObjectSerializer.getPreferredMediaType([ + "application/json" + ]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = ObjectSerializer.stringify( + ObjectSerializer.serialize(sendAgentConversationMessageRequest, "SendAgentConversationMessageRequest", ""), + contentType + ); + requestContext.setBody(serializedBody); + + let authMethod: SecurityAuthentication | undefined; + // Apply auth methods + authMethod = _config.authMethods["bearerAuth"] + if (authMethod?.applySecurityAuthentication) { + await authMethod?.applySecurityAuthentication(requestContext); + } + + const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default + if (defaultAuth?.applySecurityAuthentication) { + await defaultAuth?.applySecurityAuthentication(requestContext); + } + + return requestContext; + } + + /** + * Version: 26.5.0.cl or later Sends one or more natural language messages to an existing Spotter agent conversation and returns the response as a real-time Server-Sent Events stream. Requires `CAN_USE_SPOTTER` privilege and access to the metadata object associated with the conversation. The user must have access to the conversation session referenced by `conversation_identifier`. A conversation must first be created using the `createAgentConversation` API. #### Usage guidelines The request must include: - `conversation_identifier`: the unique session ID returned by `createAgentConversation`, used for context continuity and message tracking - `messages`: an array of one or more text messages to send to the agent If the request is valid, the API returns a Server-Sent Events (SSE) stream. Each line has the form `data: [{\"type\": \"...\", ...}]` — a JSON array of event objects. Event types include: - `ack`: confirms receipt of the request (`node_id`) - `conv_title`: conversation title (`title`, `conv_id`) - `notification`: status updates on operations (`group_id`, `metadata`, `code` — e.g. `TOOL_CALL_NOTIFICATION`, `nls_start`, `FINAL_RESPONSE_NOTIFICATION`) - `text-chunk`: incremental content chunks (`id`, `group_id`, `metadata` with `format` and `type` such as `thinking` or `text`, `content`) - `text`: full text block with same structure as `text-chunk` - `answer`: structured answer with metadata (`id`, `group_id`, `metadata` with `sage_query`, `session_id`, `title`, etc., `title`) - `error`: if a failure occurs #### Error responses | Code | Description | | ---- | -------------------------------------------------------------------------------------------------------------------------------- | | 401 | Unauthorized — authentication token is missing, expired, or invalid. | | 403 | Forbidden — the authenticated user does not have `CAN_USE_SPOTTER` privilege or lacks permission on the referenced conversation. | > ###### Note: > > - This endpoint is Generally Available from version 26.5.0.cl. > - This endpoint requires Spotter - please contact ThoughtSpot support to enable Spotter on your cluster. > - The streaming protocol uses Server-Sent Events (SSE). > - For the complete response in a single payload, use `sendAgentConversationMessage` instead. + * @param conversationIdentifier Unique identifier for the conversation (used to track context) + * @param sendAgentConversationMessageStreamingRequest + */ + public async sendAgentConversationMessageStreaming(conversationIdentifier: string, sendAgentConversationMessageStreamingRequest: SendAgentConversationMessageStreamingRequest, _options?: Configuration): Promise { + let _config = _options || this.configuration; + + // verify required parameter 'conversationIdentifier' is not null or undefined + if (conversationIdentifier === null || conversationIdentifier === undefined) { + throw new RequiredError("AIApi", "sendAgentConversationMessageStreaming", "conversationIdentifier"); + } + + + // verify required parameter 'sendAgentConversationMessageStreamingRequest' is not null or undefined + if (sendAgentConversationMessageStreamingRequest === null || sendAgentConversationMessageStreamingRequest === undefined) { + throw new RequiredError("AIApi", "sendAgentConversationMessageStreaming", "sendAgentConversationMessageStreamingRequest"); + } + + + // Path Params + const localVarPath = '/api/rest/2.0/ai/agent/conversation/{conversation_identifier}/send/stream' + .replace('{' + 'conversation_identifier' + '}', encodeURIComponent(String(conversationIdentifier))); + + // Make Request Context + const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.POST); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.25.0") + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.25.0") + + + + + // Body Params + const contentType = ObjectSerializer.getPreferredMediaType([ + "application/json" + ]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = ObjectSerializer.stringify( + ObjectSerializer.serialize(sendAgentConversationMessageStreamingRequest, "SendAgentConversationMessageStreamingRequest", ""), + contentType + ); + requestContext.setBody(serializedBody); + + let authMethod: SecurityAuthentication | undefined; + // Apply auth methods + authMethod = _config.authMethods["bearerAuth"] + if (authMethod?.applySecurityAuthentication) { + await authMethod?.applySecurityAuthentication(requestContext); + } + + const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default + if (defaultAuth?.applySecurityAuthentication) { + await defaultAuth?.applySecurityAuthentication(requestContext); + } + + return requestContext; + } + + /** + * Version: 26.2.0.cl or later **Deprecated** — Use `sendAgentConversationMessage` instead. Send natural language messages to an existing Spotter agent conversation and returns the complete response synchronously. Requires `CAN_USE_SPOTTER` privilege and access to the metadata object associated with the conversation. The user must have access to the conversation session referenced by `conversation_identifier`. A conversation must first be created using the `createAgentConversation` API. #### Usage guidelines The request must include: - `conversation_identifier`: the unique session ID returned by `createAgentConversation`, used for context continuity and message tracking - `messages`: an array of one or more text messages to send to the agent The API returns an array of response objects, each containing: - `type`: the kind of response — `text`, `answer`, or `error` - `message`: the main content of the response - `metadata`: additional information depending on the message type (e.g., answer metadata includes analytics and visualization details) #### Error responses | Code | Description | |------|----------------------------------------------------------------------------------------------------------------------------------| | 401 | Unauthorized — authentication token is missing, expired, or invalid. | | 403 | Forbidden — the authenticated user does not have `CAN_USE_SPOTTER` privilege or lacks permission on the referenced conversation. | > ###### Note: > > - This endpoint is deprecated. Use `sendAgentConversationMessage` for new integrations. > - This endpoint is currently in Beta. Breaking changes may be introduced before the endpoint is made Generally Available. > - This endpoint requires Spotter - please contact ThoughtSpot support to enable Spotter on your cluster. + * @param conversationIdentifier Unique identifier for the conversation (used to track context) + * @param sendAgentMessageRequest + */ + public async sendAgentMessage(conversationIdentifier: string, sendAgentMessageRequest: SendAgentMessageRequest, _options?: Configuration): Promise { + let _config = _options || this.configuration; + + // verify required parameter 'conversationIdentifier' is not null or undefined + if (conversationIdentifier === null || conversationIdentifier === undefined) { + throw new RequiredError("AIApi", "sendAgentMessage", "conversationIdentifier"); + } + + + // verify required parameter 'sendAgentMessageRequest' is not null or undefined + if (sendAgentMessageRequest === null || sendAgentMessageRequest === undefined) { + throw new RequiredError("AIApi", "sendAgentMessage", "sendAgentMessageRequest"); + } + + + // Path Params + const localVarPath = '/api/rest/2.0/ai/agent/{conversation_identifier}/converse' + .replace('{' + 'conversation_identifier' + '}', encodeURIComponent(String(conversationIdentifier))); + + // Make Request Context + const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.POST); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.25.0") + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.25.0") + + + + + // Body Params + const contentType = ObjectSerializer.getPreferredMediaType([ + "application/json" + ]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = ObjectSerializer.stringify( + ObjectSerializer.serialize(sendAgentMessageRequest, "SendAgentMessageRequest", ""), + contentType + ); + requestContext.setBody(serializedBody); + + let authMethod: SecurityAuthentication | undefined; + // Apply auth methods + authMethod = _config.authMethods["bearerAuth"] + if (authMethod?.applySecurityAuthentication) { + await authMethod?.applySecurityAuthentication(requestContext); + } + + const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default + if (defaultAuth?.applySecurityAuthentication) { + await defaultAuth?.applySecurityAuthentication(requestContext); + } + + return requestContext; + } + + /** + * Version: 26.2.0.cl or later **Deprecated** — Use `sendAgentConversationMessageStreaming` instead. Sends one or more natural language messages to an existing Spotter agent conversation and returns the response as a real-time Server-Sent Events stream. Requires `CAN_USE_SPOTTER` privilege and access to the metadata object associated with the conversation. The user must have access to the conversation session referenced by `conversation_identifier`. A conversation must first be created using the `createAgentConversation` API. #### Usage guidelines The request must include: - `conversation_identifier`: the unique session ID returned by `createAgentConversation`, used for context continuity and message tracking - `messages`: an array of one or more text messages to send to the agent If the request is valid, the API returns a Server-Sent Events (SSE) stream. Each line has the form `data: [{\"type\": \"...\", ...}]` — a JSON array of event objects. Event types include: - `ack`: confirms receipt of the request (`node_id`) - `conv_title`: conversation title (`title`, `conv_id`) - `notification`: status updates on operations (`group_id`, `metadata`, `code` — e.g. `TOOL_CALL_NOTIFICATION`, `nls_start`, `FINAL_RESPONSE_NOTIFICATION`) - `text-chunk`: incremental content chunks (`id`, `group_id`, `metadata` with `format` and `type` such as `thinking` or `text`, `content`) - `text`: full text block with same structure as `text-chunk` - `answer`: structured answer with metadata (`id`, `group_id`, `metadata` with `sage_query`, `session_id`, `title`, etc., `title`) - `error`: if a failure occurs #### Error responses | Code | Description | |------|----------------------------------------------------------------------------------------------------------------------------------| | 401 | Unauthorized — authentication token is missing, expired, or invalid. | | 403 | Forbidden — the authenticated user does not have `CAN_USE_SPOTTER` privilege or lacks permission on the referenced conversation. | > ###### Note: > > - This endpoint is deprecated. Use `sendAgentConversationMessageStreaming` for new integrations. > - This endpoint is currently in Beta. Breaking changes may be introduced before the endpoint is made Generally Available. > - This endpoint requires Spotter - please contact ThoughtSpot support to enable Spotter on your cluster. > - The streaming protocol uses Server-Sent Events (SSE). + * @param sendAgentMessageStreamingRequest + */ + public async sendAgentMessageStreaming(sendAgentMessageStreamingRequest: SendAgentMessageStreamingRequest, _options?: Configuration): Promise { + let _config = _options || this.configuration; + + // verify required parameter 'sendAgentMessageStreamingRequest' is not null or undefined + if (sendAgentMessageStreamingRequest === null || sendAgentMessageStreamingRequest === undefined) { + throw new RequiredError("AIApi", "sendAgentMessageStreaming", "sendAgentMessageStreamingRequest"); + } + + + // Path Params + const localVarPath = '/api/rest/2.0/ai/agent/converse/sse'; + + // Make Request Context + const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.POST); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.25.0") + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.25.0") + + + + + // Body Params + const contentType = ObjectSerializer.getPreferredMediaType([ + "application/json" + ]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = ObjectSerializer.stringify( + ObjectSerializer.serialize(sendAgentMessageStreamingRequest, "SendAgentMessageStreamingRequest", ""), + contentType + ); + requestContext.setBody(serializedBody); + + let authMethod: SecurityAuthentication | undefined; + // Apply auth methods + authMethod = _config.authMethods["bearerAuth"] + if (authMethod?.applySecurityAuthentication) { + await authMethod?.applySecurityAuthentication(requestContext); + } + + const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default + if (defaultAuth?.applySecurityAuthentication) { + await defaultAuth?.applySecurityAuthentication(requestContext); + } + + return requestContext; + } + + /** + * Version: 10.4.0.cl or later Sends a follow-up message to an existing conversation within the context of a data model. Requires `CAN_USE_SPOTTER` privilege and at least view access to the metadata object specified in the request. A conversation must first be created using the `createConversation` API. #### Usage guidelines The request must include: - `conversation_identifier`: the unique session ID returned by `createConversation` - `metadata_identifier`: the unique ID of the data source used for the conversation - `message`: a natural language string with the follow-up question If the request is successful, the API returns an array of response messages, each containing: - `session_identifier`: the unique ID of the generated response - `generation_number`: the generation number of the response - `message_type`: the type of the response (e.g., `TSAnswer`) - `visualization_type`: the generated visualization type (`Chart`, `Table`, or `Undefined`) - `tokens` / `display_tokens`: the search tokens and user-friendly display tokens for the response #### Error responses | Code | Description | |------|-----------------------------------------------------------------------------------------------------------------------------------------| | 401 | Unauthorized — authentication token is missing, expired, or invalid. | | 403 | Forbidden — the authenticated user does not have `CAN_USE_SPOTTER` privilege or lacks view permission on the specified metadata object. | > ###### Note: > * This endpoint is currently in Beta. Breaking changes may be introduced before the endpoint is made Generally Available. > * This endpoint requires Spotter - please contact ThoughtSpot support to enable Spotter on your cluster. + * @param conversationIdentifier Unique identifier of the conversation. + * @param sendMessageRequest + */ + public async sendMessage(conversationIdentifier: string, sendMessageRequest: SendMessageRequest, _options?: Configuration): Promise { + let _config = _options || this.configuration; + + // verify required parameter 'conversationIdentifier' is not null or undefined + if (conversationIdentifier === null || conversationIdentifier === undefined) { + throw new RequiredError("AIApi", "sendMessage", "conversationIdentifier"); + } + + + // verify required parameter 'sendMessageRequest' is not null or undefined + if (sendMessageRequest === null || sendMessageRequest === undefined) { + throw new RequiredError("AIApi", "sendMessage", "sendMessageRequest"); + } + + + // Path Params + const localVarPath = '/api/rest/2.0/ai/conversation/{conversation_identifier}/converse' + .replace('{' + 'conversation_identifier' + '}', encodeURIComponent(String(conversationIdentifier))); + + // Make Request Context + const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.POST); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.25.0") + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.25.0") + + + + + // Body Params + const contentType = ObjectSerializer.getPreferredMediaType([ + "application/json" + ]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = ObjectSerializer.stringify( + ObjectSerializer.serialize(sendMessageRequest, "SendMessageRequest", ""), + contentType + ); + requestContext.setBody(serializedBody); + + let authMethod: SecurityAuthentication | undefined; + // Apply auth methods + authMethod = _config.authMethods["bearerAuth"] + if (authMethod?.applySecurityAuthentication) { + await authMethod?.applySecurityAuthentication(requestContext); + } + + const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default + if (defaultAuth?.applySecurityAuthentication) { + await defaultAuth?.applySecurityAuthentication(requestContext); + } + + return requestContext; + } + + /** + * Version: 10.15.0.cl or later This API allows users to set natural language (NL) instructions for a specific data-model to improve AI-generated answers and query processing. These instructions help guide the AI system to better understand the data context and provide more accurate responses. Requires `CAN_USE_SPOTTER` privilege, either edit access or `SPOTTER_COACHING_PRIVILEGE` on the data model, and a bearer token corresponding to the org where the data model exists. #### Usage guidelines To set NL instructions for a data-model, the request must include: - `data_source_identifier`: The unique ID of the data-model for which to set NL instructions - `nl_instructions_info`: An array of instruction objects, each containing: - `instructions`: Array of text instructions for the LLM - `scope`: The scope of the instruction (`GLOBAL`). Currently only `GLOBAL` is supported. It can be extended to data-model-user scope in future. #### Instructions scope - **GLOBAL**: instructions that apply to all users querying this data model If the request is successful, the API returns: - `success`: a boolean indicating whether the operation completed successfully #### Error responses | Code | Description | |------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| | 401 | Unauthorized — authentication token is missing, expired, or invalid. | | 403 | Forbidden — the authenticated user does not have `CAN_USE_SPOTTER` privilege, lacks edit access or `SPOTTER_COACHING_PRIVILEGE` on the data model, or the bearer token does not correspond to the org where the data model exists. | > ###### Note: > > - To use this API, the user needs either edit access or `SPOTTER_COACHING_PRIVILEGE` on the data model, and must use the bearer token corresponding to the org where the data model exists. > - This endpoint is currently in Beta. Breaking changes may be introduced before the endpoint is made Generally Available. > - Available from version 10.15.0.cl and later. > - This endpoint requires Spotter — please contact ThoughtSpot Support to enable Spotter on your cluster. > - Instructions help improve the accuracy and relevance of AI-generated responses for the specified data-model. + * @param setNLInstructionsRequest + */ + public async setNLInstructions(setNLInstructionsRequest: SetNLInstructionsRequest, _options?: Configuration): Promise { + let _config = _options || this.configuration; + + // verify required parameter 'setNLInstructionsRequest' is not null or undefined + if (setNLInstructionsRequest === null || setNLInstructionsRequest === undefined) { + throw new RequiredError("AIApi", "setNLInstructions", "setNLInstructionsRequest"); + } + + + // Path Params + const localVarPath = '/api/rest/2.0/ai/instructions/set'; + + // Make Request Context + const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.POST); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.25.0") + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.25.0") + + + + + // Body Params + const contentType = ObjectSerializer.getPreferredMediaType([ + "application/json" + ]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = ObjectSerializer.stringify( + ObjectSerializer.serialize(setNLInstructionsRequest, "SetNLInstructionsRequest", ""), + contentType + ); + requestContext.setBody(serializedBody); + + let authMethod: SecurityAuthentication | undefined; + // Apply auth methods + authMethod = _config.authMethods["bearerAuth"] + if (authMethod?.applySecurityAuthentication) { + await authMethod?.applySecurityAuthentication(requestContext); + } + + const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default + if (defaultAuth?.applySecurityAuthentication) { + await defaultAuth?.applySecurityAuthentication(requestContext); + } + + return requestContext; + } + + /** + * Version: 10.4.0.cl or later Processes a natural language query against a specified data model and returns a single AI-generated answer without requiring a conversation session. Requires `CAN_USE_SPOTTER` privilege and at least view access to the metadata object specified in the request. #### Usage guidelines The request must include: - `query`: a natural language question (e.g., \"What were total sales last quarter?\") - `metadata_identifier`: the unique ID of the data source to query against If the request is successful, the API returns a response message containing: - `session_identifier`: the unique ID of the generated response - `generation_number`: the generation number of the response - `message_type`: the type of the response (e.g., `TSAnswer`) - `visualization_type`: the generated visualization type (`Chart`, `Table`, or `Undefined`) - `tokens` / `display_tokens`: the search tokens and user-friendly display tokens for the response #### Error responses | Code | Description | |------|-----------------------------------------------------------------------------------------------------------------------------------------| | 401 | Unauthorized — authentication token is missing, expired, or invalid. | | 403 | Forbidden — the authenticated user does not have `CAN_USE_SPOTTER` privilege or lacks view permission on the specified metadata object. | > ###### Note: > * This endpoint is currently in Beta. Breaking changes may be introduced before the endpoint is made Generally Available. > * This endpoint requires Spotter - please contact ThoughtSpot support to enable Spotter on your cluster. + * @param singleAnswerRequest + */ + public async singleAnswer(singleAnswerRequest: SingleAnswerRequest, _options?: Configuration): Promise { + let _config = _options || this.configuration; + + // verify required parameter 'singleAnswerRequest' is not null or undefined + if (singleAnswerRequest === null || singleAnswerRequest === undefined) { + throw new RequiredError("AIApi", "singleAnswer", "singleAnswerRequest"); + } + + + // Path Params + const localVarPath = '/api/rest/2.0/ai/answer/create'; + + // Make Request Context + const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.POST); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.25.0") + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.25.0") + + + + + // Body Params + const contentType = ObjectSerializer.getPreferredMediaType([ + "application/json" + ]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = ObjectSerializer.stringify( + ObjectSerializer.serialize(singleAnswerRequest, "SingleAnswerRequest", ""), + contentType + ); + requestContext.setBody(serializedBody); + + let authMethod: SecurityAuthentication | undefined; + // Apply auth methods + authMethod = _config.authMethods["bearerAuth"] + if (authMethod?.applySecurityAuthentication) { + await authMethod?.applySecurityAuthentication(requestContext); + } + + const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default + if (defaultAuth?.applySecurityAuthentication) { + await defaultAuth?.applySecurityAuthentication(requestContext); + } + + return requestContext; + } + + /** + * Stops an in-progress agent conversation response. Version: 26.6.0.cl or later Version: 26.6.0.cl or later Stops an in-progress agent response for the specified conversation. Use this endpoint to cancel a response that is actively being generated — for example, when the user navigates away, reformulates their question, or no longer needs the current result. Requires `CAN_USE_SPOTTER` privilege and access to the specified conversation. #### Usage guidelines The request must include: - `conversation_identifier` *(path parameter)*: the unique ID of the conversation whose active response should be stopped, as returned by `createAgentConversation` A successful request returns an empty `204 No Content` response. If there is no active response in progress at the time of the call, the request is still treated as successful. After stopping a response, the conversation session remains active. You can continue sending messages using `sendAgentConversationMessage` or `sendAgentConversationMessageStreaming`. #### Example request ```bash POST /api/rest/2.0/ai/agent/conversation/{conversation_identifier}/stop-response ``` #### Typical usage scenario This endpoint is useful when integrating Spotter into a chat UI where users can cancel a long-running query. For example: 1. User sends a message via `sendAgentConversationMessageStreaming`. 2. User clicks a \"Stop generating\" button while the response is streaming. 3. Your client calls `stopConversation` with the active `conversation_identifier`. 4. The stream is terminated and the user can ask a new question. #### Error responses | Code | Description | |------|-------------| | 401 | Unauthorized — authentication token is missing, expired, or invalid. | | 403 | Forbidden — the authenticated user does not have `CAN_USE_SPOTTER` privilege or lacks access to the specified conversation. | > ###### Note: > > - Calling this endpoint when no response is in progress does not return an error. > - The conversation context is preserved after stopping — previous messages and answers remain accessible. > - Available from version 26.6.0.cl and later. > - This endpoint requires Spotter — please contact ThoughtSpot Support to enable Spotter on your cluster. > - This feature is available only for **Spotter 3** (`SPOTTER3`) version. + * @param conversationIdentifier Unique identifier of the conversation to stop. + */ + public async stopConversation(conversationIdentifier: string, _options?: Configuration): Promise { + let _config = _options || this.configuration; + + // verify required parameter 'conversationIdentifier' is not null or undefined + if (conversationIdentifier === null || conversationIdentifier === undefined) { + throw new RequiredError("AIApi", "stopConversation", "conversationIdentifier"); + } + + + // Path Params + const localVarPath = '/api/rest/2.0/ai/agent/conversation/{conversation_identifier}/stop-response' + .replace('{' + 'conversation_identifier' + '}', encodeURIComponent(String(conversationIdentifier))); + + // Make Request Context + const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.POST); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.25.0") + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.25.0") + + + + + let authMethod: SecurityAuthentication | undefined; + // Apply auth methods + authMethod = _config.authMethods["bearerAuth"] + if (authMethod?.applySecurityAuthentication) { + await authMethod?.applySecurityAuthentication(requestContext); + } + + const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default + if (defaultAuth?.applySecurityAuthentication) { + await defaultAuth?.applySecurityAuthentication(requestContext); + } + + return requestContext; + } + +} + +export class AIApiResponseProcessor { + + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to createAgentConversation + * @throws ApiException if the response code was not in [200, 299] + */ + public async createAgentConversation(response: ResponseContext): Promise { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("200", response.httpStatusCode)) { + const body: AgentConversation = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "AgentConversation", "" + ) as AgentConversation; + return body; + } + if (isCodeInRange("201", response.httpStatusCode)) { + const body: AgentConversation = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "AgentConversation", "" + ) as AgentConversation; + return body; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Operation failed", body, response.headers); + } + if (isCodeInRange("401", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Operation failed", body, response.headers); + } + + // Work around for missing responses in specification, e.g. for petstore.yaml + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body: AgentConversation = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "AgentConversation", "" + ) as AgentConversation; + return body; + } + + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", await response.getBodyAsAny(), response.headers); + } + + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to createConversation + * @throws ApiException if the response code was not in [200, 299] + */ + public async createConversation(response: ResponseContext): Promise { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("200", response.httpStatusCode)) { + const body: Conversation = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "Conversation", "" + ) as Conversation; + return body; + } + if (isCodeInRange("201", response.httpStatusCode)) { + const body: Conversation = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "Conversation", "" + ) as Conversation; + return body; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Operation failed", body, response.headers); + } + if (isCodeInRange("401", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Operation failed", body, response.headers); + } + + // Work around for missing responses in specification, e.g. for petstore.yaml + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body: Conversation = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "Conversation", "" + ) as Conversation; + return body; + } + + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", await response.getBodyAsAny(), response.headers); + } + + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to getDataSourceSuggestions + * @throws ApiException if the response code was not in [200, 299] + */ + public async getDataSourceSuggestions(response: ResponseContext): Promise { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("200", response.httpStatusCode)) { + const body: EurekaDataSourceSuggestionResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "EurekaDataSourceSuggestionResponse", "" + ) as EurekaDataSourceSuggestionResponse; + return body; + } + if (isCodeInRange("201", response.httpStatusCode)) { + const body: EurekaDataSourceSuggestionResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "EurekaDataSourceSuggestionResponse", "" + ) as EurekaDataSourceSuggestionResponse; + return body; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Operation failed", body, response.headers); + } + if (isCodeInRange("401", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Operation failed", body, response.headers); + } + + // Work around for missing responses in specification, e.g. for petstore.yaml + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body: EurekaDataSourceSuggestionResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "EurekaDataSourceSuggestionResponse", "" + ) as EurekaDataSourceSuggestionResponse; + return body; + } + + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", await response.getBodyAsAny(), response.headers); + } + + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to getNLInstructions + * @throws ApiException if the response code was not in [200, 299] + */ + public async getNLInstructions(response: ResponseContext): Promise { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("200", response.httpStatusCode)) { + const body: EurekaGetNLInstructionsResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "EurekaGetNLInstructionsResponse", "" + ) as EurekaGetNLInstructionsResponse; + return body; + } + if (isCodeInRange("201", response.httpStatusCode)) { + const body: EurekaGetNLInstructionsResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "EurekaGetNLInstructionsResponse", "" + ) as EurekaGetNLInstructionsResponse; + return body; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Operation failed", body, response.headers); + } + if (isCodeInRange("401", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Operation failed", body, response.headers); + } + + // Work around for missing responses in specification, e.g. for petstore.yaml + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body: EurekaGetNLInstructionsResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "EurekaGetNLInstructionsResponse", "" + ) as EurekaGetNLInstructionsResponse; + return body; + } + + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", await response.getBodyAsAny(), response.headers); + } + + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to getRelevantQuestions + * @throws ApiException if the response code was not in [200, 299] + */ + public async getRelevantQuestions(response: ResponseContext): Promise { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("200", response.httpStatusCode)) { + const body: EurekaGetRelevantQuestionsResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "EurekaGetRelevantQuestionsResponse", "" + ) as EurekaGetRelevantQuestionsResponse; + return body; + } + if (isCodeInRange("201", response.httpStatusCode)) { + const body: EurekaGetRelevantQuestionsResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "EurekaGetRelevantQuestionsResponse", "" + ) as EurekaGetRelevantQuestionsResponse; + return body; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Operation failed", body, response.headers); + } + if (isCodeInRange("401", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Operation failed", body, response.headers); + } + + // Work around for missing responses in specification, e.g. for petstore.yaml + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body: EurekaGetRelevantQuestionsResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "EurekaGetRelevantQuestionsResponse", "" + ) as EurekaGetRelevantQuestionsResponse; + return body; + } + + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", await response.getBodyAsAny(), response.headers); + } + + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to queryGetDecomposedQuery + * @throws ApiException if the response code was not in [200, 299] + */ + public async queryGetDecomposedQuery(response: ResponseContext): Promise { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("200", response.httpStatusCode)) { + const body: EurekaDecomposeQueryResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "EurekaDecomposeQueryResponse", "" + ) as EurekaDecomposeQueryResponse; + return body; + } + if (isCodeInRange("201", response.httpStatusCode)) { + const body: EurekaDecomposeQueryResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "EurekaDecomposeQueryResponse", "" + ) as EurekaDecomposeQueryResponse; + return body; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Operation failed", body, response.headers); + } + if (isCodeInRange("401", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Operation failed", body, response.headers); + } + + // Work around for missing responses in specification, e.g. for petstore.yaml + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body: EurekaDecomposeQueryResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "EurekaDecomposeQueryResponse", "" + ) as EurekaDecomposeQueryResponse; + return body; + } + + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", await response.getBodyAsAny(), response.headers); + } + + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to sendAgentConversationMessage + * @throws ApiException if the response code was not in [200, 299] + */ + public async sendAgentConversationMessage(response: ResponseContext): Promise { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("200", response.httpStatusCode)) { + const body: any = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "any", "" + ) as any; + return body; + } + if (isCodeInRange("201", response.httpStatusCode)) { + const body: any = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "any", "" + ) as any; + return body; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Operation failed", body, response.headers); + } + if (isCodeInRange("401", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Operation failed", body, response.headers); + } + + // Work around for missing responses in specification, e.g. for petstore.yaml + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body: any = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "any", "" + ) as any; + return body; + } + + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", await response.getBodyAsAny(), response.headers); + } + + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to sendAgentConversationMessageStreaming + * @throws ApiException if the response code was not in [200, 299] + */ + public async sendAgentConversationMessageStreaming(response: ResponseContext): Promise { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("200", response.httpStatusCode)) { + const body: SendAgentMessageResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "SendAgentMessageResponse", "" + ) as SendAgentMessageResponse; + return body; + } + if (isCodeInRange("201", response.httpStatusCode)) { + const body: SendAgentMessageResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "SendAgentMessageResponse", "" + ) as SendAgentMessageResponse; + return body; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Operation failed", body, response.headers); + } + if (isCodeInRange("401", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Operation failed", body, response.headers); + } + + // Work around for missing responses in specification, e.g. for petstore.yaml + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body: SendAgentMessageResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "SendAgentMessageResponse", "" + ) as SendAgentMessageResponse; + return body; + } + + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", await response.getBodyAsAny(), response.headers); + } + + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to sendAgentMessage + * @throws ApiException if the response code was not in [200, 299] + */ + public async sendAgentMessage(response: ResponseContext): Promise { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("200", response.httpStatusCode)) { + const body: any = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "any", "" + ) as any; + return body; + } + if (isCodeInRange("201", response.httpStatusCode)) { + const body: any = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "any", "" + ) as any; + return body; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Operation failed", body, response.headers); + } + if (isCodeInRange("401", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Operation failed", body, response.headers); + } + + // Work around for missing responses in specification, e.g. for petstore.yaml + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body: any = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "any", "" + ) as any; + return body; + } + + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", await response.getBodyAsAny(), response.headers); + } + + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to sendAgentMessageStreaming + * @throws ApiException if the response code was not in [200, 299] + */ + public async sendAgentMessageStreaming(response: ResponseContext): Promise { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("200", response.httpStatusCode)) { + const body: SendAgentMessageResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "SendAgentMessageResponse", "" + ) as SendAgentMessageResponse; + return body; + } + if (isCodeInRange("201", response.httpStatusCode)) { + const body: SendAgentMessageResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "SendAgentMessageResponse", "" + ) as SendAgentMessageResponse; + return body; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Operation failed", body, response.headers); + } + if (isCodeInRange("401", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Operation failed", body, response.headers); + } + + // Work around for missing responses in specification, e.g. for petstore.yaml + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body: SendAgentMessageResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "SendAgentMessageResponse", "" + ) as SendAgentMessageResponse; + return body; + } + + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", await response.getBodyAsAny(), response.headers); + } + + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to sendMessage + * @throws ApiException if the response code was not in [200, 299] + */ + public async sendMessage(response: ResponseContext): Promise > { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("200", response.httpStatusCode)) { + const body: Array = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "Array", "" + ) as Array; + return body; + } + if (isCodeInRange("201", response.httpStatusCode)) { + const body: Array = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "Array", "" + ) as Array; + return body; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Operation failed", body, response.headers); + } + if (isCodeInRange("401", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Operation failed", body, response.headers); + } + + // Work around for missing responses in specification, e.g. for petstore.yaml + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body: Array = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "Array", "" + ) as Array; + return body; + } + + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", await response.getBodyAsAny(), response.headers); + } + + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to setNLInstructions + * @throws ApiException if the response code was not in [200, 299] + */ + public async setNLInstructions(response: ResponseContext): Promise { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("200", response.httpStatusCode)) { + const body: EurekaSetNLInstructionsResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "EurekaSetNLInstructionsResponse", "" + ) as EurekaSetNLInstructionsResponse; + return body; + } + if (isCodeInRange("201", response.httpStatusCode)) { + const body: EurekaSetNLInstructionsResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "EurekaSetNLInstructionsResponse", "" + ) as EurekaSetNLInstructionsResponse; + return body; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Operation failed", body, response.headers); + } + if (isCodeInRange("401", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Operation failed", body, response.headers); + } + + // Work around for missing responses in specification, e.g. for petstore.yaml + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body: EurekaSetNLInstructionsResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "EurekaSetNLInstructionsResponse", "" + ) as EurekaSetNLInstructionsResponse; + return body; + } + + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", await response.getBodyAsAny(), response.headers); + } + + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to singleAnswer + * @throws ApiException if the response code was not in [200, 299] + */ + public async singleAnswer(response: ResponseContext): Promise { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("200", response.httpStatusCode)) { + const body: ResponseMessage = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ResponseMessage", "" + ) as ResponseMessage; + return body; + } + if (isCodeInRange("201", response.httpStatusCode)) { + const body: ResponseMessage = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ResponseMessage", "" + ) as ResponseMessage; + return body; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Operation failed", body, response.headers); + } + if (isCodeInRange("401", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Operation failed", body, response.headers); + } + + // Work around for missing responses in specification, e.g. for petstore.yaml + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body: ResponseMessage = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ResponseMessage", "" + ) as ResponseMessage; + return body; + } + + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", await response.getBodyAsAny(), response.headers); + } + + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to stopConversation + * @throws ApiException if the response code was not in [200, 299] + */ + public async stopConversation(response: ResponseContext): Promise { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("204", response.httpStatusCode)) { + return; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Operation failed", body, response.headers); + } + if (isCodeInRange("401", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Operation failed", body, response.headers); + } + + // Work around for missing responses in specification, e.g. for petstore.yaml + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body: void = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "void", "" + ) as void; + return body; + } + + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", await response.getBodyAsAny(), response.headers); + } + +} diff --git a/sdks/typescript/apis/AuthenticationApi.ts b/sdks/typescript/apis/AuthenticationApi.ts new file mode 100644 index 000000000..bcd6b6ff7 --- /dev/null +++ b/sdks/typescript/apis/AuthenticationApi.ts @@ -0,0 +1,1136 @@ +// TODO: better import syntax? +import {BaseAPIRequestFactory, RequiredError, COLLECTION_FORMATS} from './baseapi'; +import {Configuration} from '../configuration'; +import {RequestContext, HttpMethod, ResponseContext, HttpFile} from '../http/http'; +import {ObjectSerializer} from '../models/ObjectSerializer'; +import {ApiException} from './exception'; +import {canConsumeForm, isCodeInRange} from '../util'; +import {SecurityAuthentication} from '../auth/auth'; + + +import { AccessToken } from '../models/AccessToken'; +import { ConfigureAuthSettingsRequest } from '../models/ConfigureAuthSettingsRequest'; +import { ErrorResponse } from '../models/ErrorResponse'; +import { GetCustomAccessTokenRequest } from '../models/GetCustomAccessTokenRequest'; +import { GetFullAccessTokenRequest } from '../models/GetFullAccessTokenRequest'; +import { GetObjectAccessTokenRequest } from '../models/GetObjectAccessTokenRequest'; +import { GetTokenResponse } from '../models/GetTokenResponse'; +import { LoginRequest } from '../models/LoginRequest'; +import { RevokeTokenRequest } from '../models/RevokeTokenRequest'; +import { SearchAuthSettingsRequest } from '../models/SearchAuthSettingsRequest'; +import { SearchAuthSettingsResponse } from '../models/SearchAuthSettingsResponse'; +import { Token } from '../models/Token'; +import { TokenValidationResponse } from '../models/TokenValidationResponse'; +import { User } from '../models/User'; +import { ValidateTokenRequest } from '../models/ValidateTokenRequest'; + +/** + * no description + */ +export class AuthenticationApiRequestFactory extends BaseAPIRequestFactory { + + /** + * Version: 26.6.0.cl or later Enables or disables authentication at cluster or org level for the specified auth type. Currently supports `TRUSTED_AUTH`. #### Required privileges Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) or `CONTROL_TRUSTED_AUTH` (**Can Enable or Disable Trusted Authentication**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled, the `CONTROL_TRUSTED_AUTH` privilege is required. #### Usage guidelines Use `cluster_preferences` to enable or disable authentication at the cluster level. Cluster-level settings can only be configured from the Primary Org. - `ENABLED` — Generates a new access token if one does not exist. An existing token is preserved. - `DISABLED` — Revokes the existing cluster-level access token. Use `org_preferences` to enable or disable authentication for one or more Orgs. Each entry must include an `org_identifier` (unique ID or name) and an `auth_status`. Org-level configuration requires the per-Org authentication feature to be enabled on your instance. - `ENABLED` — Generates a new org-level access token if one does not exist. - `DISABLED` — Revokes the existing org-level access token for that Org. Both `cluster_preferences` and `org_preferences` are optional. Omitting a field leaves the corresponding settings unchanged. If both are omitted, the API returns `204 No Content` without making any changes. **Note**: Cluster-level and org-level settings are independent of each other. Enabling or disabling one does not affect the other. + * @param configureAuthSettingsRequest + */ + public async configureAuthSettings(configureAuthSettingsRequest: ConfigureAuthSettingsRequest, _options?: Configuration): Promise { + let _config = _options || this.configuration; + + // verify required parameter 'configureAuthSettingsRequest' is not null or undefined + if (configureAuthSettingsRequest === null || configureAuthSettingsRequest === undefined) { + throw new RequiredError("AuthenticationApi", "configureAuthSettings", "configureAuthSettingsRequest"); + } + + + // Path Params + const localVarPath = '/api/rest/2.0/auth/configure'; + + // Make Request Context + const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.POST); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.25.0") + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.25.0") + + + + + // Body Params + const contentType = ObjectSerializer.getPreferredMediaType([ + "application/json" + ]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = ObjectSerializer.stringify( + ObjectSerializer.serialize(configureAuthSettingsRequest, "ConfigureAuthSettingsRequest", ""), + contentType + ); + requestContext.setBody(serializedBody); + + let authMethod: SecurityAuthentication | undefined; + // Apply auth methods + authMethod = _config.authMethods["bearerAuth"] + if (authMethod?.applySecurityAuthentication) { + await authMethod?.applySecurityAuthentication(requestContext); + } + + const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default + if (defaultAuth?.applySecurityAuthentication) { + await defaultAuth?.applySecurityAuthentication(requestContext); + } + + return requestContext; + } + + /** + * Version: 9.0.0.cl or later Retrieves details of the current user session for the token provided in the request header. Any ThoughtSpot user can access this endpoint and send an API request. The data returned in the API response varies according to user\'s privilege and object access permissions. **NOTE**: In ThoughtSpot, users with cluster administration privileges can access all Orgs by default. However, unless the administrator is explicitly added to an Org, the Orgs list in the session information returned by the API will include only the Primary Org. To include other Orgs in the API response, you must explicitly add the administrator to each Org in the Admin settings page in the UI or via user REST API. + */ + public async getCurrentUserInfo(_options?: Configuration): Promise { + let _config = _options || this.configuration; + + // Path Params + const localVarPath = '/api/rest/2.0/auth/session/user'; + + // Make Request Context + const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.GET); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.25.0") + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.25.0") + + + + + let authMethod: SecurityAuthentication | undefined; + // Apply auth methods + authMethod = _config.authMethods["bearerAuth"] + if (authMethod?.applySecurityAuthentication) { + await authMethod?.applySecurityAuthentication(requestContext); + } + + const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default + if (defaultAuth?.applySecurityAuthentication) { + await defaultAuth?.applySecurityAuthentication(requestContext); + } + + return requestContext; + } + + /** + * Version: 9.4.0.cl or later Retrieves details of the current session token for the bearer token provided in the request header. This API endpoint does not create a new token. Instead, it returns details about the token, including the token string, creation time, expiration time, and the associated user. Use this endpoint to introspect your current session token, debug authentication issues, or when a frontend application needs session token details. Any ThoughtSpot user with a valid bearer token can access this endpoint and send an API request + */ + public async getCurrentUserToken(_options?: Configuration): Promise { + let _config = _options || this.configuration; + + // Path Params + const localVarPath = '/api/rest/2.0/auth/session/token'; + + // Make Request Context + const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.GET); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.25.0") + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.25.0") + + + + + let authMethod: SecurityAuthentication | undefined; + // Apply auth methods + authMethod = _config.authMethods["bearerAuth"] + if (authMethod?.applySecurityAuthentication) { + await authMethod?.applySecurityAuthentication(requestContext); + } + + const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default + if (defaultAuth?.applySecurityAuthentication) { + await defaultAuth?.applySecurityAuthentication(requestContext); + } + + return requestContext; + } + + /** + * Version: 10.4.0.cl or later Creates an authentication token that provides values for the formula variables in the Row Level Security (RLS) rules for a given user. Recommended for use cases that require Attribute-based access control (ABAC) via RLS. #### Required privileges To add a new user and assign privileges during auto-creation, the `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege is required. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled, the `CONTROL_TRUSTED_AUTH` (**Can Enable or Disable Trusted Authentication**) privilege and edit access to the data source are required. To configure formula variables for all Orgs on your instance or the Primary Org, cluster administration privileges are required. Org administrators can configure formula variables for their respective Orgs. If Role-Based Access Control (RBAC) is enabled, users with the `CAN_MANAGE_VARIABLES` (**Can manage variables**) role privilege can also create and manage variables for their Org context. #### Usage guidelines You can generate a token by providing a `username` and `password`, or by using a `secret_key`. To generate a `secret_key`, the administrator must enable [Trusted authentication](https://developers.thoughtspot.com/docs/trusted-auth-secret-key) in the **Develop** > **Customizations** > **Security Settings** page. **Note**: * When both `password` and `secret_key` are included in the API request, `password` takes precedence. * If [Multi-Factor Authentication (MFA)](https://docs.thoughtspot.com/cloud/latest/authentication-local-mfa) is enabled on your instance, the API login request with `username` and `password` returns an error. You can switch to token-based authentication with `secret_key` or contact ThoughtSpot Support for assistance. The token obtained from ThoughtSpot is valid for 5 minutes by default. You can configure the token expiration time as required. #### ABAC via RLS To implement ABAC via RLS and assign security entitlements to users during session creation, generate a token with custom variable values. The values set in the authentication token are applied to the formula variables referenced in RLS rules at the table level, which determines the data each user can access based on their entitlements. The variable values can be configured to persist for a specific set of Models in user sessions initiated with the token, allowing different RLS rules to be set for different data models. Once defined, the rules are added to the user\'s `variable_values` object, after which all sessions will use the persisted values. For more information, see [ABAC via tokens Documentation](https://developers.thoughtspot.com/docs/abac-via-rls-variables). ##### Formula variables Before defining variable values, ensure the variables are created and available on your instance. To create a formula variable, you can use the **Create variable** (`/api/rest/2.0/template/variables/create`) REST API endpoint, with the variable `type` set as `Formula_Variable` in the API request. The API doesn\'t support `\"persist_option\": \"RESET\"` and `\"persist_option\": \"NONE\"` when `variable_values` are defined in the request. If you are using `variable_values` for token generation, you must use other supported persist options such as `APPEND` or `REPLACE`. If you want to use `RESET` or `NONE`, do not pass any `variable_values`. In such cases, `variable_values` will remain unaffected. #### Supported objects The supported object type is `LOGICAL_TABLE`. When using `object_id` with `variable_values`, models are supported. #### Just-in-time provisioning For [just-in-time user creation and provisioning](https://developers.thoughtspot.com/docs/just-in-time-provisioning), specify the following attributes in the API request: * `auto_create` * `username` * `display_name` * `email` * `groups` Set `auto_create` to `true` if the username does not exist in ThoughtSpot. If the username already exists in ThoughtSpot and `auto_create` is set to `true`, user properties such as display name, email, Org and group entitlements will not be updated with new values. Setting `auto_create` to `true` does not create formula variables. Hence, this setting will not be applicable to `variable_values`. #### Important point to note All options in the token creation APIs that define user access to data in ThoughtSpot will take effect during token creation, not when the token is used for authentication. For example, `auto_create:true` will create the user when the authentication token is created. Persist options such as `APPEND` and `REPLACE` will persist `variable_values` on the user profile when the token is created. + * @param getCustomAccessTokenRequest + */ + public async getCustomAccessToken(getCustomAccessTokenRequest: GetCustomAccessTokenRequest, _options?: Configuration): Promise { + let _config = _options || this.configuration; + + // verify required parameter 'getCustomAccessTokenRequest' is not null or undefined + if (getCustomAccessTokenRequest === null || getCustomAccessTokenRequest === undefined) { + throw new RequiredError("AuthenticationApi", "getCustomAccessToken", "getCustomAccessTokenRequest"); + } + + + // Path Params + const localVarPath = '/api/rest/2.0/auth/token/custom'; + + // Make Request Context + const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.POST); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.25.0") + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.25.0") + + + + + // Body Params + const contentType = ObjectSerializer.getPreferredMediaType([ + "application/json" + ]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = ObjectSerializer.stringify( + ObjectSerializer.serialize(getCustomAccessTokenRequest, "GetCustomAccessTokenRequest", ""), + contentType + ); + requestContext.setBody(serializedBody); + + + const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default + if (defaultAuth?.applySecurityAuthentication) { + await defaultAuth?.applySecurityAuthentication(requestContext); + } + + return requestContext; + } + + /** + * Version: 9.0.0.cl or later Generates an authentication token for creating a full session in ThoughtSpot for a given user. Recommended for use cases that do not require Attribute-based access control (ABAC) via Row Level Security (RLS). #### Usage guidelines You can generate a token for a user by providing a `username` and `password`, or by using the `secret_key` generated for your instance. To generate a `secret_key`, the administrator must enable [Trusted authentication](https://developers.thoughtspot.com/docs/trusted-auth-secret-key) in the **Develop** > **Customizations** > **Security Settings** page. **Note**: * When both `password` and `secret_key` are included in the API request, `password` takes precedence. * If [Multi-Factor Authentication (MFA)](https://docs.thoughtspot.com/cloud/latest/authentication-local-mfa) is enabled on your instance, the API login request with `username` and `password` returns an error. You can switch to token-based authentication with `secret_key` or contact ThoughtSpot Support for assistance. The token obtained from ThoughtSpot is valid for 5 minutes by default. You can configure the token expiration time as required. #### Just-in-time provisioning For [just-in-time user creation and provisioning](https://developers.thoughtspot.com/docs/just-in-time-provisioning), specify the following attributes in the API request: * `auto_create` * `username` * `display_name` * `email` * `group_identifiers` Set `auto_create` to `true` if the username does not exist in ThoughtSpot. If the user already exists in ThoughtSpot and `auto_create` is set to `true`, user properties such as display name, email and group assignment will be updated. To add a new user and assign privileges during auto-creation, the `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege is required. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled, the `CONTROL_TRUSTED_AUTH` (**Can Enable or Disable Trusted Authentication**) privilege is required. #### Important point to note All options in the token creation APIs that define user access to data in ThoughtSpot will take effect during token creation, not when the token is used for authentication. For example, `auto_create:true` will create the user when the authentication token is created. + * @param getFullAccessTokenRequest + */ + public async getFullAccessToken(getFullAccessTokenRequest: GetFullAccessTokenRequest, _options?: Configuration): Promise { + let _config = _options || this.configuration; + + // verify required parameter 'getFullAccessTokenRequest' is not null or undefined + if (getFullAccessTokenRequest === null || getFullAccessTokenRequest === undefined) { + throw new RequiredError("AuthenticationApi", "getFullAccessToken", "getFullAccessTokenRequest"); + } + + + // Path Params + const localVarPath = '/api/rest/2.0/auth/token/full'; + + // Make Request Context + const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.POST); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.25.0") + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.25.0") + + + + + // Body Params + const contentType = ObjectSerializer.getPreferredMediaType([ + "application/json" + ]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = ObjectSerializer.stringify( + ObjectSerializer.serialize(getFullAccessTokenRequest, "GetFullAccessTokenRequest", ""), + contentType + ); + requestContext.setBody(serializedBody); + + + const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default + if (defaultAuth?.applySecurityAuthentication) { + await defaultAuth?.applySecurityAuthentication(requestContext); + } + + return requestContext; + } + + /** + * Version: 9.0.0.cl or later Generates an authentication token that provides access to a specific metadata object. This object list is intersected with the list of objects the user is allowed to access via group membership. For more information, see [Object security](https://docs.thoughtspot.com/cloud/latest/security-data-object#object_security). #### Usage guidelines You can generate a token for a user by providing a `username` and `password`, or by using the `secret_key` generated for your instance. To generate a `secret_key`, the administrator must enable [Trusted authentication](https://developers.thoughtspot.com/docs/trusted-auth-secret-key) in the **Develop** > **Customizations** > **Security Settings** page. **Note**: * When both `password` and `secret_key` are included in the API request, `password` takes precedence. * If [Multi-Factor Authentication (MFA)](https://docs.thoughtspot.com/cloud/latest/authentication-local-mfa) is enabled on your instance, the API login request with `username` and `password` returns an error. You can switch to token-based authentication with `secret_key` or contact ThoughtSpot Support for assistance. The token obtained from ThoughtSpot is valid for 5 minutes by default. You can configure the token expiration time as required. #### Just-in-time provisioning For [just-in-time user creation and provisioning](https://developers.thoughtspot.com/docs/just-in-time-provisioning), specify the following attributes in the API request: * `auto_create` * `username` * `display_name` * `email` * `group_identifiers` Set `auto_create` to `true` if the user is not available in ThoughtSpot. If the user already exists in ThoughtSpot and the `auto_create` parameter is set to `true`, user properties such as display name, email, and group assignment will be updated. To add a new user and assign privileges, the `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege is required. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled, the `CONTROL_TRUSTED_AUTH`(**Can Enable or Disable Trusted Authentication**) privilege is required. #### Important point to note All options in the token creation APIs that define user access to data in ThoughtSpot will take effect during token creation, not when the token is used for authentication. For example, `auto_create:true` will create the user when the authentication token is created. + * @param getObjectAccessTokenRequest + */ + public async getObjectAccessToken(getObjectAccessTokenRequest: GetObjectAccessTokenRequest, _options?: Configuration): Promise { + let _config = _options || this.configuration; + + // verify required parameter 'getObjectAccessTokenRequest' is not null or undefined + if (getObjectAccessTokenRequest === null || getObjectAccessTokenRequest === undefined) { + throw new RequiredError("AuthenticationApi", "getObjectAccessToken", "getObjectAccessTokenRequest"); + } + + + // Path Params + const localVarPath = '/api/rest/2.0/auth/token/object'; + + // Make Request Context + const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.POST); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.25.0") + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.25.0") + + + + + // Body Params + const contentType = ObjectSerializer.getPreferredMediaType([ + "application/json" + ]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = ObjectSerializer.stringify( + ObjectSerializer.serialize(getObjectAccessTokenRequest, "GetObjectAccessTokenRequest", ""), + contentType + ); + requestContext.setBody(serializedBody); + + + const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default + if (defaultAuth?.applySecurityAuthentication) { + await defaultAuth?.applySecurityAuthentication(requestContext); + } + + return requestContext; + } + + /** + * Version: 9.0.0.cl or later Creates a login session for a ThoughtSpot user with Basic authentication. In Basic authentication method, REST clients log in to ThoughtSpot using `username` and `password` attributes. On a multi-tenant cluster with Orgs, users can pass the ID of the Org in the API request to log in to a specific Org context. **Note**: If Multi-Factor Authentication (MFA) is enabled on your instance, the API login request with basic authentication (`username` and `password` ) returns an error. Contact ThoughtSpot Support for assistance. A successful login returns a session cookie that can be used in your subsequent API requests. + * @param loginRequest + */ + public async login(loginRequest: LoginRequest, _options?: Configuration): Promise { + let _config = _options || this.configuration; + + // verify required parameter 'loginRequest' is not null or undefined + if (loginRequest === null || loginRequest === undefined) { + throw new RequiredError("AuthenticationApi", "login", "loginRequest"); + } + + + // Path Params + const localVarPath = '/api/rest/2.0/auth/session/login'; + + // Make Request Context + const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.POST); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.25.0") + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.25.0") + + + + + // Body Params + const contentType = ObjectSerializer.getPreferredMediaType([ + "application/json" + ]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = ObjectSerializer.stringify( + ObjectSerializer.serialize(loginRequest, "LoginRequest", ""), + contentType + ); + requestContext.setBody(serializedBody); + + let authMethod: SecurityAuthentication | undefined; + // Apply auth methods + authMethod = _config.authMethods["bearerAuth"] + if (authMethod?.applySecurityAuthentication) { + await authMethod?.applySecurityAuthentication(requestContext); + } + + const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default + if (defaultAuth?.applySecurityAuthentication) { + await defaultAuth?.applySecurityAuthentication(requestContext); + } + + return requestContext; + } + + /** + * Version: 9.0.0.cl or later Logs out a user from their current session. + */ + public async logout(_options?: Configuration): Promise { + let _config = _options || this.configuration; + + // Path Params + const localVarPath = '/api/rest/2.0/auth/session/logout'; + + // Make Request Context + const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.POST); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.25.0") + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.25.0") + + + + + let authMethod: SecurityAuthentication | undefined; + // Apply auth methods + authMethod = _config.authMethods["bearerAuth"] + if (authMethod?.applySecurityAuthentication) { + await authMethod?.applySecurityAuthentication(requestContext); + } + + const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default + if (defaultAuth?.applySecurityAuthentication) { + await defaultAuth?.applySecurityAuthentication(requestContext); + } + + return requestContext; + } + + /** + * Version: 9.0.0.cl or later Revokes the authentication token issued for current user session. The token of your current session expires when you make a call to the `/api/rest/2.0/auth/token/revoke` endpoint. the users will not be able to access ThoughtSpot objects until a new token is obtained. To restart your session, request for a new token from ThoughtSpot. See [Get Full Access Token](#/http/api-endpoints/authentication/get-full-access-token). + * @param revokeTokenRequest + */ + public async revokeToken(revokeTokenRequest: RevokeTokenRequest, _options?: Configuration): Promise { + let _config = _options || this.configuration; + + // verify required parameter 'revokeTokenRequest' is not null or undefined + if (revokeTokenRequest === null || revokeTokenRequest === undefined) { + throw new RequiredError("AuthenticationApi", "revokeToken", "revokeTokenRequest"); + } + + + // Path Params + const localVarPath = '/api/rest/2.0/auth/token/revoke'; + + // Make Request Context + const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.POST); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.25.0") + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.25.0") + + + + + // Body Params + const contentType = ObjectSerializer.getPreferredMediaType([ + "application/json" + ]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = ObjectSerializer.stringify( + ObjectSerializer.serialize(revokeTokenRequest, "RevokeTokenRequest", ""), + contentType + ); + requestContext.setBody(serializedBody); + + let authMethod: SecurityAuthentication | undefined; + // Apply auth methods + authMethod = _config.authMethods["bearerAuth"] + if (authMethod?.applySecurityAuthentication) { + await authMethod?.applySecurityAuthentication(requestContext); + } + + const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default + if (defaultAuth?.applySecurityAuthentication) { + await defaultAuth?.applySecurityAuthentication(requestContext); + } + + return requestContext; + } + + /** + * Version: 26.6.0.cl or later Returns the authentication configuration for the specified auth type at cluster and org level. Currently supports `TRUSTED_AUTH`. #### Required privileges Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) or `CONTROL_TRUSTED_AUTH` (**Can Enable or Disable Trusted Authentication**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled, the `CONTROL_TRUSTED_AUTH` privilege is required. #### Usage guidelines Use `scope` to control which level of settings are returned: - `CLUSTER` — Returns cluster-level authentication status and access tokens. Accessible only from the Primary Org. - `ORG` — Returns org-level authentication status and access tokens for the current Org. Requires the per-Org authentication feature to be enabled on your instance. - If `scope` is omitted, both cluster and org-level settings are returned based on the caller\'s org context and feature availability. The `access_tokens` array in `cluster_preferences` or `org_preferences` is omitted when no token is configured at that level. **Note**: Access tokens returned in the response are sensitive credentials. Treat them with the same care as passwords. + * @param searchAuthSettingsRequest + */ + public async searchAuthSettings(searchAuthSettingsRequest: SearchAuthSettingsRequest, _options?: Configuration): Promise { + let _config = _options || this.configuration; + + // verify required parameter 'searchAuthSettingsRequest' is not null or undefined + if (searchAuthSettingsRequest === null || searchAuthSettingsRequest === undefined) { + throw new RequiredError("AuthenticationApi", "searchAuthSettings", "searchAuthSettingsRequest"); + } + + + // Path Params + const localVarPath = '/api/rest/2.0/auth/search'; + + // Make Request Context + const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.POST); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.25.0") + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.25.0") + + + + + // Body Params + const contentType = ObjectSerializer.getPreferredMediaType([ + "application/json" + ]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = ObjectSerializer.stringify( + ObjectSerializer.serialize(searchAuthSettingsRequest, "SearchAuthSettingsRequest", ""), + contentType + ); + requestContext.setBody(serializedBody); + + let authMethod: SecurityAuthentication | undefined; + // Apply auth methods + authMethod = _config.authMethods["bearerAuth"] + if (authMethod?.applySecurityAuthentication) { + await authMethod?.applySecurityAuthentication(requestContext); + } + + const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default + if (defaultAuth?.applySecurityAuthentication) { + await defaultAuth?.applySecurityAuthentication(requestContext); + } + + return requestContext; + } + + /** + * Version: 9.12.0.cl or later Validates the authentication token specified in the API request. If your token is not valid, [Get a new token](#/http/api-endpoints/authentication/get-full-access-token). + * @param validateTokenRequest + */ + public async validateToken(validateTokenRequest: ValidateTokenRequest, _options?: Configuration): Promise { + let _config = _options || this.configuration; + + // verify required parameter 'validateTokenRequest' is not null or undefined + if (validateTokenRequest === null || validateTokenRequest === undefined) { + throw new RequiredError("AuthenticationApi", "validateToken", "validateTokenRequest"); + } + + + // Path Params + const localVarPath = '/api/rest/2.0/auth/token/validate'; + + // Make Request Context + const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.POST); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.25.0") + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.25.0") + + + + + // Body Params + const contentType = ObjectSerializer.getPreferredMediaType([ + "application/json" + ]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = ObjectSerializer.stringify( + ObjectSerializer.serialize(validateTokenRequest, "ValidateTokenRequest", ""), + contentType + ); + requestContext.setBody(serializedBody); + + let authMethod: SecurityAuthentication | undefined; + // Apply auth methods + authMethod = _config.authMethods["bearerAuth"] + if (authMethod?.applySecurityAuthentication) { + await authMethod?.applySecurityAuthentication(requestContext); + } + + const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default + if (defaultAuth?.applySecurityAuthentication) { + await defaultAuth?.applySecurityAuthentication(requestContext); + } + + return requestContext; + } + +} + +export class AuthenticationApiResponseProcessor { + + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to configureAuthSettings + * @throws ApiException if the response code was not in [200, 299] + */ + public async configureAuthSettings(response: ResponseContext): Promise { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("204", response.httpStatusCode)) { + return; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Invalid request.", body, response.headers); + } + if (isCodeInRange("401", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Unexpected error", body, response.headers); + } + + // Work around for missing responses in specification, e.g. for petstore.yaml + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body: void = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "void", "" + ) as void; + return body; + } + + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", await response.getBodyAsAny(), response.headers); + } + + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to getCurrentUserInfo + * @throws ApiException if the response code was not in [200, 299] + */ + public async getCurrentUserInfo(response: ResponseContext): Promise { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("200", response.httpStatusCode)) { + const body: User = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "User", "" + ) as User; + return body; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Invalid request.", body, response.headers); + } + if (isCodeInRange("401", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Unexpected error", body, response.headers); + } + + // Work around for missing responses in specification, e.g. for petstore.yaml + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body: User = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "User", "" + ) as User; + return body; + } + + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", await response.getBodyAsAny(), response.headers); + } + + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to getCurrentUserToken + * @throws ApiException if the response code was not in [200, 299] + */ + public async getCurrentUserToken(response: ResponseContext): Promise { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("200", response.httpStatusCode)) { + const body: GetTokenResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "GetTokenResponse", "" + ) as GetTokenResponse; + return body; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Invalid request.", body, response.headers); + } + if (isCodeInRange("401", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Unexpected error", body, response.headers); + } + + // Work around for missing responses in specification, e.g. for petstore.yaml + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body: GetTokenResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "GetTokenResponse", "" + ) as GetTokenResponse; + return body; + } + + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", await response.getBodyAsAny(), response.headers); + } + + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to getCustomAccessToken + * @throws ApiException if the response code was not in [200, 299] + */ + public async getCustomAccessToken(response: ResponseContext): Promise { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("200", response.httpStatusCode)) { + const body: AccessToken = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "AccessToken", "" + ) as AccessToken; + return body; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Invalid request. This could be due to missing or incorrect parameters.", body, response.headers); + } + if (isCodeInRange("401", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Unauthorized access. The request could not be authenticated.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Forbidden access. The user does not have permission to access this resource.", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "An unexpected error occurred on the server.", body, response.headers); + } + + // Work around for missing responses in specification, e.g. for petstore.yaml + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body: AccessToken = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "AccessToken", "" + ) as AccessToken; + return body; + } + + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", await response.getBodyAsAny(), response.headers); + } + + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to getFullAccessToken + * @throws ApiException if the response code was not in [200, 299] + */ + public async getFullAccessToken(response: ResponseContext): Promise { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("200", response.httpStatusCode)) { + const body: Token = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "Token", "" + ) as Token; + return body; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Invalid request.", body, response.headers); + } + if (isCodeInRange("401", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Unexpected error", body, response.headers); + } + + // Work around for missing responses in specification, e.g. for petstore.yaml + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body: Token = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "Token", "" + ) as Token; + return body; + } + + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", await response.getBodyAsAny(), response.headers); + } + + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to getObjectAccessToken + * @throws ApiException if the response code was not in [200, 299] + */ + public async getObjectAccessToken(response: ResponseContext): Promise { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("200", response.httpStatusCode)) { + const body: Token = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "Token", "" + ) as Token; + return body; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Invalid request.", body, response.headers); + } + if (isCodeInRange("401", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Unexpected error", body, response.headers); + } + + // Work around for missing responses in specification, e.g. for petstore.yaml + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body: Token = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "Token", "" + ) as Token; + return body; + } + + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", await response.getBodyAsAny(), response.headers); + } + + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to login + * @throws ApiException if the response code was not in [200, 299] + */ + public async login(response: ResponseContext): Promise { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("204", response.httpStatusCode)) { + return; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Invalid request.", body, response.headers); + } + if (isCodeInRange("401", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Unexpected error", body, response.headers); + } + + // Work around for missing responses in specification, e.g. for petstore.yaml + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body: void = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "void", "" + ) as void; + return body; + } + + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", await response.getBodyAsAny(), response.headers); + } + + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to logout + * @throws ApiException if the response code was not in [200, 299] + */ + public async logout(response: ResponseContext): Promise { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("204", response.httpStatusCode)) { + return; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Invalid request.", body, response.headers); + } + if (isCodeInRange("401", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Unexpected error", body, response.headers); + } + + // Work around for missing responses in specification, e.g. for petstore.yaml + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body: void = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "void", "" + ) as void; + return body; + } + + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", await response.getBodyAsAny(), response.headers); + } + + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to revokeToken + * @throws ApiException if the response code was not in [200, 299] + */ + public async revokeToken(response: ResponseContext): Promise { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("204", response.httpStatusCode)) { + return; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Invalid request.", body, response.headers); + } + if (isCodeInRange("401", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Unexpected error", body, response.headers); + } + + // Work around for missing responses in specification, e.g. for petstore.yaml + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body: void = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "void", "" + ) as void; + return body; + } + + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", await response.getBodyAsAny(), response.headers); + } + + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to searchAuthSettings + * @throws ApiException if the response code was not in [200, 299] + */ + public async searchAuthSettings(response: ResponseContext): Promise { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("200", response.httpStatusCode)) { + const body: SearchAuthSettingsResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "SearchAuthSettingsResponse", "" + ) as SearchAuthSettingsResponse; + return body; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Invalid request.", body, response.headers); + } + if (isCodeInRange("401", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Unexpected error", body, response.headers); + } + + // Work around for missing responses in specification, e.g. for petstore.yaml + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body: SearchAuthSettingsResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "SearchAuthSettingsResponse", "" + ) as SearchAuthSettingsResponse; + return body; + } + + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", await response.getBodyAsAny(), response.headers); + } + + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to validateToken + * @throws ApiException if the response code was not in [200, 299] + */ + public async validateToken(response: ResponseContext): Promise { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("200", response.httpStatusCode)) { + const body: TokenValidationResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "TokenValidationResponse", "" + ) as TokenValidationResponse; + return body; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Invalid request.", body, response.headers); + } + if (isCodeInRange("401", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Unexpected error", body, response.headers); + } + + // Work around for missing responses in specification, e.g. for petstore.yaml + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body: TokenValidationResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "TokenValidationResponse", "" + ) as TokenValidationResponse; + return body; + } + + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", await response.getBodyAsAny(), response.headers); + } + +} diff --git a/sdks/typescript/apis/CollectionsApi.ts b/sdks/typescript/apis/CollectionsApi.ts new file mode 100644 index 000000000..a1aeca33a --- /dev/null +++ b/sdks/typescript/apis/CollectionsApi.ts @@ -0,0 +1,479 @@ +// TODO: better import syntax? +import {BaseAPIRequestFactory, RequiredError, COLLECTION_FORMATS} from './baseapi'; +import {Configuration} from '../configuration'; +import {RequestContext, HttpMethod, ResponseContext, HttpFile} from '../http/http'; +import {ObjectSerializer} from '../models/ObjectSerializer'; +import {ApiException} from './exception'; +import {canConsumeForm, isCodeInRange} from '../util'; +import {SecurityAuthentication} from '../auth/auth'; + + +import { Collection } from '../models/Collection'; +import { CollectionDeleteResponse } from '../models/CollectionDeleteResponse'; +import { CollectionSearchResponse } from '../models/CollectionSearchResponse'; +import { CreateCollectionRequest } from '../models/CreateCollectionRequest'; +import { DeleteCollectionRequest } from '../models/DeleteCollectionRequest'; +import { ErrorResponse } from '../models/ErrorResponse'; +import { SearchCollectionsRequest } from '../models/SearchCollectionsRequest'; +import { UpdateCollectionRequest } from '../models/UpdateCollectionRequest'; + +/** + * no description + */ +export class CollectionsApiRequestFactory extends BaseAPIRequestFactory { + + /** + * Version: 26.4.0.cl or later Creates a new collection in ThoughtSpot. Collections allow you to organize and group related metadata objects such as Liveboards, Answers, worksheets, and other data objects. You can also create nested collections (sub-collections) to build a hierarchical structure. #### Supported operations The API endpoint lets you perform the following operations: * Create a new collection * Add metadata objects (Liveboards, Answers, Logical Tables) to the collection * Create nested collections by adding sub-collections + * @param createCollectionRequest + */ + public async createCollection(createCollectionRequest: CreateCollectionRequest, _options?: Configuration): Promise { + let _config = _options || this.configuration; + + // verify required parameter 'createCollectionRequest' is not null or undefined + if (createCollectionRequest === null || createCollectionRequest === undefined) { + throw new RequiredError("CollectionsApi", "createCollection", "createCollectionRequest"); + } + + + // Path Params + const localVarPath = '/api/rest/2.0/collections/create'; + + // Make Request Context + const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.POST); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.25.0") + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.25.0") + + + + + // Body Params + const contentType = ObjectSerializer.getPreferredMediaType([ + "application/json" + ]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = ObjectSerializer.stringify( + ObjectSerializer.serialize(createCollectionRequest, "CreateCollectionRequest", ""), + contentType + ); + requestContext.setBody(serializedBody); + + let authMethod: SecurityAuthentication | undefined; + // Apply auth methods + authMethod = _config.authMethods["bearerAuth"] + if (authMethod?.applySecurityAuthentication) { + await authMethod?.applySecurityAuthentication(requestContext); + } + + const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default + if (defaultAuth?.applySecurityAuthentication) { + await defaultAuth?.applySecurityAuthentication(requestContext); + } + + return requestContext; + } + + /** + * Version: 26.4.0.cl or later Deletes one or more collections from ThoughtSpot. #### Delete options * **delete_children**: When set to `true`, deletes the child objects (metadata items) within the collection that the user has access to. Objects that the user does not have permission to delete will be skipped. * **dry_run**: When set to `true`, performs a preview of the deletion operation without actually deleting anything. The response shows what would be deleted, allowing you to review before committing the deletion. #### Response The response includes: * **metadata_deleted**: List of metadata objects that were successfully deleted * **metadata_skipped**: List of metadata objects that were skipped due to lack of permissions or other constraints + * @param deleteCollectionRequest + */ + public async deleteCollection(deleteCollectionRequest: DeleteCollectionRequest, _options?: Configuration): Promise { + let _config = _options || this.configuration; + + // verify required parameter 'deleteCollectionRequest' is not null or undefined + if (deleteCollectionRequest === null || deleteCollectionRequest === undefined) { + throw new RequiredError("CollectionsApi", "deleteCollection", "deleteCollectionRequest"); + } + + + // Path Params + const localVarPath = '/api/rest/2.0/collections/delete'; + + // Make Request Context + const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.POST); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.25.0") + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.25.0") + + + + + // Body Params + const contentType = ObjectSerializer.getPreferredMediaType([ + "application/json" + ]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = ObjectSerializer.stringify( + ObjectSerializer.serialize(deleteCollectionRequest, "DeleteCollectionRequest", ""), + contentType + ); + requestContext.setBody(serializedBody); + + let authMethod: SecurityAuthentication | undefined; + // Apply auth methods + authMethod = _config.authMethods["bearerAuth"] + if (authMethod?.applySecurityAuthentication) { + await authMethod?.applySecurityAuthentication(requestContext); + } + + const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default + if (defaultAuth?.applySecurityAuthentication) { + await defaultAuth?.applySecurityAuthentication(requestContext); + } + + return requestContext; + } + + /** + * Version: 26.4.0.cl or later Gets a list of collections available in ThoughtSpot. To get details of a specific collection, specify the collection GUID or name. You can also filter the API response based on the collection name pattern, author, and other criteria. #### Search options * **name_pattern**: Use \'%\' as a wildcard character to match collection names * **collection_identifiers**: Search for specific collections by their GUIDs or names * **include_metadata**: When set to `true`, includes the metadata objects within each collection in the response **NOTE**: If the API returns an empty list, consider increasing the value of the `record_size` parameter. To search across all available collections, set `record_size` to `-1`. + * @param searchCollectionsRequest + */ + public async searchCollections(searchCollectionsRequest: SearchCollectionsRequest, _options?: Configuration): Promise { + let _config = _options || this.configuration; + + // verify required parameter 'searchCollectionsRequest' is not null or undefined + if (searchCollectionsRequest === null || searchCollectionsRequest === undefined) { + throw new RequiredError("CollectionsApi", "searchCollections", "searchCollectionsRequest"); + } + + + // Path Params + const localVarPath = '/api/rest/2.0/collections/search'; + + // Make Request Context + const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.POST); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.25.0") + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.25.0") + + + + + // Body Params + const contentType = ObjectSerializer.getPreferredMediaType([ + "application/json" + ]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = ObjectSerializer.stringify( + ObjectSerializer.serialize(searchCollectionsRequest, "SearchCollectionsRequest", ""), + contentType + ); + requestContext.setBody(serializedBody); + + let authMethod: SecurityAuthentication | undefined; + // Apply auth methods + authMethod = _config.authMethods["bearerAuth"] + if (authMethod?.applySecurityAuthentication) { + await authMethod?.applySecurityAuthentication(requestContext); + } + + const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default + if (defaultAuth?.applySecurityAuthentication) { + await defaultAuth?.applySecurityAuthentication(requestContext); + } + + return requestContext; + } + + /** + * Version: 26.4.0.cl or later Updates an existing collection in ThoughtSpot. #### Supported operations This API endpoint lets you perform the following operations: * Update collection name and description * Change visibility settings * Add metadata objects to the collection (operation: ADD) * Remove metadata objects from the collection (operation: REMOVE) * Replace all metadata objects in the collection (operation: REPLACE) #### Operation types * **ADD**: Adds the specified metadata objects to the existing collection without removing current items * **REMOVE**: Removes only the specified metadata objects from the collection * **REPLACE**: Replaces all existing metadata objects with the specified items (default behavior) + * @param collectionIdentifier Unique GUID of the collection. Note: Collection names cannot be used as identifiers since duplicate names are allowed. + * @param updateCollectionRequest + */ + public async updateCollection(collectionIdentifier: string, updateCollectionRequest: UpdateCollectionRequest, _options?: Configuration): Promise { + let _config = _options || this.configuration; + + // verify required parameter 'collectionIdentifier' is not null or undefined + if (collectionIdentifier === null || collectionIdentifier === undefined) { + throw new RequiredError("CollectionsApi", "updateCollection", "collectionIdentifier"); + } + + + // verify required parameter 'updateCollectionRequest' is not null or undefined + if (updateCollectionRequest === null || updateCollectionRequest === undefined) { + throw new RequiredError("CollectionsApi", "updateCollection", "updateCollectionRequest"); + } + + + // Path Params + const localVarPath = '/api/rest/2.0/collections/{collection_identifier}/update' + .replace('{' + 'collection_identifier' + '}', encodeURIComponent(String(collectionIdentifier))); + + // Make Request Context + const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.POST); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.25.0") + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.25.0") + + + + + // Body Params + const contentType = ObjectSerializer.getPreferredMediaType([ + "application/json" + ]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = ObjectSerializer.stringify( + ObjectSerializer.serialize(updateCollectionRequest, "UpdateCollectionRequest", ""), + contentType + ); + requestContext.setBody(serializedBody); + + let authMethod: SecurityAuthentication | undefined; + // Apply auth methods + authMethod = _config.authMethods["bearerAuth"] + if (authMethod?.applySecurityAuthentication) { + await authMethod?.applySecurityAuthentication(requestContext); + } + + const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default + if (defaultAuth?.applySecurityAuthentication) { + await defaultAuth?.applySecurityAuthentication(requestContext); + } + + return requestContext; + } + +} + +export class CollectionsApiResponseProcessor { + + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to createCollection + * @throws ApiException if the response code was not in [200, 299] + */ + public async createCollection(response: ResponseContext): Promise { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("200", response.httpStatusCode)) { + const body: Collection = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "Collection", "" + ) as Collection; + return body; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Invalid request.", body, response.headers); + } + if (isCodeInRange("401", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Unexpected error", body, response.headers); + } + + // Work around for missing responses in specification, e.g. for petstore.yaml + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body: Collection = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "Collection", "" + ) as Collection; + return body; + } + + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", await response.getBodyAsAny(), response.headers); + } + + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to deleteCollection + * @throws ApiException if the response code was not in [200, 299] + */ + public async deleteCollection(response: ResponseContext): Promise { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("200", response.httpStatusCode)) { + const body: CollectionDeleteResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "CollectionDeleteResponse", "" + ) as CollectionDeleteResponse; + return body; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Invalid request.", body, response.headers); + } + if (isCodeInRange("401", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } + if (isCodeInRange("404", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Resource not found.", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Unexpected error", body, response.headers); + } + + // Work around for missing responses in specification, e.g. for petstore.yaml + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body: CollectionDeleteResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "CollectionDeleteResponse", "" + ) as CollectionDeleteResponse; + return body; + } + + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", await response.getBodyAsAny(), response.headers); + } + + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to searchCollections + * @throws ApiException if the response code was not in [200, 299] + */ + public async searchCollections(response: ResponseContext): Promise { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("200", response.httpStatusCode)) { + const body: CollectionSearchResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "CollectionSearchResponse", "" + ) as CollectionSearchResponse; + return body; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Invalid request.", body, response.headers); + } + if (isCodeInRange("401", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Unexpected error", body, response.headers); + } + + // Work around for missing responses in specification, e.g. for petstore.yaml + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body: CollectionSearchResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "CollectionSearchResponse", "" + ) as CollectionSearchResponse; + return body; + } + + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", await response.getBodyAsAny(), response.headers); + } + + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to updateCollection + * @throws ApiException if the response code was not in [200, 299] + */ + public async updateCollection(response: ResponseContext): Promise { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("204", response.httpStatusCode)) { + return; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Invalid request.", body, response.headers); + } + if (isCodeInRange("401", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } + if (isCodeInRange("404", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Resource not found.", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Unexpected error", body, response.headers); + } + + // Work around for missing responses in specification, e.g. for petstore.yaml + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body: void = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "void", "" + ) as void; + return body; + } + + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", await response.getBodyAsAny(), response.headers); + } + +} diff --git a/sdks/typescript/apis/ConnectionConfigurationsApi.ts b/sdks/typescript/apis/ConnectionConfigurationsApi.ts new file mode 100644 index 000000000..76434dd21 --- /dev/null +++ b/sdks/typescript/apis/ConnectionConfigurationsApi.ts @@ -0,0 +1,459 @@ +// TODO: better import syntax? +import {BaseAPIRequestFactory, RequiredError, COLLECTION_FORMATS} from './baseapi'; +import {Configuration} from '../configuration'; +import {RequestContext, HttpMethod, ResponseContext, HttpFile} from '../http/http'; +import {ObjectSerializer} from '../models/ObjectSerializer'; +import {ApiException} from './exception'; +import {canConsumeForm, isCodeInRange} from '../util'; +import {SecurityAuthentication} from '../auth/auth'; + + +import { ConnectionConfigurationResponse } from '../models/ConnectionConfigurationResponse'; +import { ConnectionConfigurationSearchRequest } from '../models/ConnectionConfigurationSearchRequest'; +import { CreateConnectionConfigurationRequest } from '../models/CreateConnectionConfigurationRequest'; +import { DeleteConnectionConfigurationRequest } from '../models/DeleteConnectionConfigurationRequest'; +import { ErrorResponse } from '../models/ErrorResponse'; +import { UpdateConnectionConfigurationRequest } from '../models/UpdateConnectionConfigurationRequest'; + +/** + * no description + */ +export class ConnectionConfigurationsApiRequestFactory extends BaseAPIRequestFactory { + + /** + * Version: 10.12.0.cl or later Gets connection configuration objects. Requires `DATAMANAGEMENT` (**Can manage data**) and edit permissions to the connection object, or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) privilege is required. #### Usage guidelines * To get a list of all configurations available in the ThoughtSpot system, send the API request with only the connection name or GUID in the request body. * To fetch details of a configuration object, specify the configuration object name or GUID. + * @param connectionConfigurationSearchRequest + */ + public async connectionConfigurationSearch(connectionConfigurationSearchRequest: ConnectionConfigurationSearchRequest, _options?: Configuration): Promise { + let _config = _options || this.configuration; + + // verify required parameter 'connectionConfigurationSearchRequest' is not null or undefined + if (connectionConfigurationSearchRequest === null || connectionConfigurationSearchRequest === undefined) { + throw new RequiredError("ConnectionConfigurationsApi", "connectionConfigurationSearch", "connectionConfigurationSearchRequest"); + } + + + // Path Params + const localVarPath = '/api/rest/2.0/connection-configurations/search'; + + // Make Request Context + const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.POST); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.25.0") + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.25.0") + + + + + // Body Params + const contentType = ObjectSerializer.getPreferredMediaType([ + "application/json" + ]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = ObjectSerializer.stringify( + ObjectSerializer.serialize(connectionConfigurationSearchRequest, "ConnectionConfigurationSearchRequest", ""), + contentType + ); + requestContext.setBody(serializedBody); + + let authMethod: SecurityAuthentication | undefined; + // Apply auth methods + authMethod = _config.authMethods["bearerAuth"] + if (authMethod?.applySecurityAuthentication) { + await authMethod?.applySecurityAuthentication(requestContext); + } + + const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default + if (defaultAuth?.applySecurityAuthentication) { + await defaultAuth?.applySecurityAuthentication(requestContext); + } + + return requestContext; + } + + /** + * Version: 10.12.0.cl or later Creates an additional configuration to an existing connection to a data warehouse. Requires `DATAMANAGEMENT` (**Can manage data**) or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) privilege is required. #### Usage guidelines * A JSON map of configuration attributes in `configuration`. The following example shows the configuration attributes: ``` { \"user\":\"DEV_USER\", \"password\":\"TestConn123\", \"role\":\"DEV\", \"warehouse\":\"DEV_WH\" } ``` * If the `policy_type` is `PRINCIPALS`, then `policy_principals` is a required field. * If the `policy_type` is `PROCESSES`, then `policy_processes` is a required field. * If the `policy_type` is `NO_POLICY`, then `policy_principals` and `policy_processes` are not required fields. #### Parameterized Connection Support For parameterized connections that use OAuth authentication, only the same_as_parent and policy_process_options attributes are allowed in the API request. These attributes are not applicable to connections that are not parameterized. + * @param createConnectionConfigurationRequest + */ + public async createConnectionConfiguration(createConnectionConfigurationRequest: CreateConnectionConfigurationRequest, _options?: Configuration): Promise { + let _config = _options || this.configuration; + + // verify required parameter 'createConnectionConfigurationRequest' is not null or undefined + if (createConnectionConfigurationRequest === null || createConnectionConfigurationRequest === undefined) { + throw new RequiredError("ConnectionConfigurationsApi", "createConnectionConfiguration", "createConnectionConfigurationRequest"); + } + + + // Path Params + const localVarPath = '/api/rest/2.0/connection-configurations/create'; + + // Make Request Context + const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.POST); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.25.0") + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.25.0") + + + + + // Body Params + const contentType = ObjectSerializer.getPreferredMediaType([ + "application/json" + ]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = ObjectSerializer.stringify( + ObjectSerializer.serialize(createConnectionConfigurationRequest, "CreateConnectionConfigurationRequest", ""), + contentType + ); + requestContext.setBody(serializedBody); + + let authMethod: SecurityAuthentication | undefined; + // Apply auth methods + authMethod = _config.authMethods["bearerAuth"] + if (authMethod?.applySecurityAuthentication) { + await authMethod?.applySecurityAuthentication(requestContext); + } + + const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default + if (defaultAuth?.applySecurityAuthentication) { + await defaultAuth?.applySecurityAuthentication(requestContext); + } + + return requestContext; + } + + /** + * Version: 10.12.0.cl or later Deletes connection configuration objects. Requires `DATAMANAGEMENT` (**Can manage data**) and edit permissions to the connection object, or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) privilege is required. + * @param deleteConnectionConfigurationRequest + */ + public async deleteConnectionConfiguration(deleteConnectionConfigurationRequest: DeleteConnectionConfigurationRequest, _options?: Configuration): Promise { + let _config = _options || this.configuration; + + // verify required parameter 'deleteConnectionConfigurationRequest' is not null or undefined + if (deleteConnectionConfigurationRequest === null || deleteConnectionConfigurationRequest === undefined) { + throw new RequiredError("ConnectionConfigurationsApi", "deleteConnectionConfiguration", "deleteConnectionConfigurationRequest"); + } + + + // Path Params + const localVarPath = '/api/rest/2.0/connection-configurations/delete'; + + // Make Request Context + const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.POST); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.25.0") + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.25.0") + + + + + // Body Params + const contentType = ObjectSerializer.getPreferredMediaType([ + "application/json" + ]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = ObjectSerializer.stringify( + ObjectSerializer.serialize(deleteConnectionConfigurationRequest, "DeleteConnectionConfigurationRequest", ""), + contentType + ); + requestContext.setBody(serializedBody); + + let authMethod: SecurityAuthentication | undefined; + // Apply auth methods + authMethod = _config.authMethods["bearerAuth"] + if (authMethod?.applySecurityAuthentication) { + await authMethod?.applySecurityAuthentication(requestContext); + } + + const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default + if (defaultAuth?.applySecurityAuthentication) { + await defaultAuth?.applySecurityAuthentication(requestContext); + } + + return requestContext; + } + + /** + * Version: 10.12.0.cl or later Updates a connection configuration object. Requires `DATAMANAGEMENT` (**Can manage data**) and edit permissions to the connection object, or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) privilege is required. #### Supported operations This API endpoint lets you perform the following operations in a single API request: * Edit the name or description of the configuration * Edit the configuration properties * Edit the `policy_type` * Edit the type of authentication * Enable or disable a configuration #### Parameterized Connection Support For parameterized oauth based connections, only the `same_as_parent` and `policy_process_options` attributes are allowed. These attributes are not applicable to connections that are not parameterized. **NOTE**: When updating a configuration where `disabled` is `true`, you must reset `disabled` to `true` in your update request payload. If not explicitly set again, the API will default `disabled` to `false`. + * @param configurationIdentifier Unique ID or name of the configuration. + * @param updateConnectionConfigurationRequest + */ + public async updateConnectionConfiguration(configurationIdentifier: string, updateConnectionConfigurationRequest: UpdateConnectionConfigurationRequest, _options?: Configuration): Promise { + let _config = _options || this.configuration; + + // verify required parameter 'configurationIdentifier' is not null or undefined + if (configurationIdentifier === null || configurationIdentifier === undefined) { + throw new RequiredError("ConnectionConfigurationsApi", "updateConnectionConfiguration", "configurationIdentifier"); + } + + + // verify required parameter 'updateConnectionConfigurationRequest' is not null or undefined + if (updateConnectionConfigurationRequest === null || updateConnectionConfigurationRequest === undefined) { + throw new RequiredError("ConnectionConfigurationsApi", "updateConnectionConfiguration", "updateConnectionConfigurationRequest"); + } + + + // Path Params + const localVarPath = '/api/rest/2.0/connection-configurations/{configuration_identifier}/update' + .replace('{' + 'configuration_identifier' + '}', encodeURIComponent(String(configurationIdentifier))); + + // Make Request Context + const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.POST); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.25.0") + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.25.0") + + + + + // Body Params + const contentType = ObjectSerializer.getPreferredMediaType([ + "application/json" + ]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = ObjectSerializer.stringify( + ObjectSerializer.serialize(updateConnectionConfigurationRequest, "UpdateConnectionConfigurationRequest", ""), + contentType + ); + requestContext.setBody(serializedBody); + + let authMethod: SecurityAuthentication | undefined; + // Apply auth methods + authMethod = _config.authMethods["bearerAuth"] + if (authMethod?.applySecurityAuthentication) { + await authMethod?.applySecurityAuthentication(requestContext); + } + + const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default + if (defaultAuth?.applySecurityAuthentication) { + await defaultAuth?.applySecurityAuthentication(requestContext); + } + + return requestContext; + } + +} + +export class ConnectionConfigurationsApiResponseProcessor { + + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to connectionConfigurationSearch + * @throws ApiException if the response code was not in [200, 299] + */ + public async connectionConfigurationSearch(response: ResponseContext): Promise > { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("200", response.httpStatusCode)) { + const body: Array = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "Array", "" + ) as Array; + return body; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Invalid request.", body, response.headers); + } + if (isCodeInRange("401", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Unexpected error", body, response.headers); + } + + // Work around for missing responses in specification, e.g. for petstore.yaml + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body: Array = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "Array", "" + ) as Array; + return body; + } + + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", await response.getBodyAsAny(), response.headers); + } + + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to createConnectionConfiguration + * @throws ApiException if the response code was not in [200, 299] + */ + public async createConnectionConfiguration(response: ResponseContext): Promise { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("200", response.httpStatusCode)) { + const body: ConnectionConfigurationResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ConnectionConfigurationResponse", "" + ) as ConnectionConfigurationResponse; + return body; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Invalid request.", body, response.headers); + } + if (isCodeInRange("401", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Unexpected error", body, response.headers); + } + + // Work around for missing responses in specification, e.g. for petstore.yaml + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body: ConnectionConfigurationResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ConnectionConfigurationResponse", "" + ) as ConnectionConfigurationResponse; + return body; + } + + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", await response.getBodyAsAny(), response.headers); + } + + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to deleteConnectionConfiguration + * @throws ApiException if the response code was not in [200, 299] + */ + public async deleteConnectionConfiguration(response: ResponseContext): Promise { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("204", response.httpStatusCode)) { + return; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Invalid request.", body, response.headers); + } + if (isCodeInRange("401", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Unexpected error", body, response.headers); + } + + // Work around for missing responses in specification, e.g. for petstore.yaml + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body: void = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "void", "" + ) as void; + return body; + } + + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", await response.getBodyAsAny(), response.headers); + } + + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to updateConnectionConfiguration + * @throws ApiException if the response code was not in [200, 299] + */ + public async updateConnectionConfiguration(response: ResponseContext): Promise { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("204", response.httpStatusCode)) { + return; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Invalid request.", body, response.headers); + } + if (isCodeInRange("401", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Unexpected error", body, response.headers); + } + + // Work around for missing responses in specification, e.g. for petstore.yaml + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body: void = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "void", "" + ) as void; + return body; + } + + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", await response.getBodyAsAny(), response.headers); + } + +} diff --git a/sdks/typescript/apis/ConnectionsApi.ts b/sdks/typescript/apis/ConnectionsApi.ts new file mode 100644 index 000000000..e9bc55f70 --- /dev/null +++ b/sdks/typescript/apis/ConnectionsApi.ts @@ -0,0 +1,1230 @@ +// TODO: better import syntax? +import {BaseAPIRequestFactory, RequiredError, COLLECTION_FORMATS} from './baseapi'; +import {Configuration} from '../configuration'; +import {RequestContext, HttpMethod, ResponseContext, HttpFile} from '../http/http'; +import {ObjectSerializer} from '../models/ObjectSerializer'; +import {ApiException} from './exception'; +import {canConsumeForm, isCodeInRange} from '../util'; +import {SecurityAuthentication} from '../auth/auth'; + + +import { CreateConnectionRequest } from '../models/CreateConnectionRequest'; +import { CreateConnectionResponse } from '../models/CreateConnectionResponse'; +import { DeleteConnectionRequest } from '../models/DeleteConnectionRequest'; +import { ErrorResponse } from '../models/ErrorResponse'; +import { FetchConnectionDiffStatusResponse } from '../models/FetchConnectionDiffStatusResponse'; +import { RevokeRefreshTokensRequest } from '../models/RevokeRefreshTokensRequest'; +import { RevokeRefreshTokensResponse } from '../models/RevokeRefreshTokensResponse'; +import { SearchConnectionRequest } from '../models/SearchConnectionRequest'; +import { SearchConnectionResponse } from '../models/SearchConnectionResponse'; +import { SyncMetadataRequest } from '../models/SyncMetadataRequest'; +import { SyncMetadataResponse } from '../models/SyncMetadataResponse'; +import { UpdateConnectionRequest } from '../models/UpdateConnectionRequest'; +import { UpdateConnectionStatusRequest } from '../models/UpdateConnectionStatusRequest'; +import { UpdateConnectionV2Request } from '../models/UpdateConnectionV2Request'; + +/** + * no description + */ +export class ConnectionsApiRequestFactory extends BaseAPIRequestFactory { + + /** + * Version: 9.2.0.cl or later Creates a connection to a data warehouse for live query services. Requires `DATAMANAGEMENT` (**Can manage data**) or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) privilege is required. #### Create a connection without tables To create a connection without tables: 1. Pass these parameters in your API request. * Name of the connection. * Type of the data warehouse to connect to. * A JSON map of configuration attributes in `data_warehouse_config`. The following example shows the configuration attributes for a SnowFlake connection: ``` { \"configuration\":{ \"accountName\":\"thoughtspot_partner\", \"user\":\"tsadmin\", \"password\":\"TestConn123\", \"role\":\"sysadmin\", \"warehouse\":\"MEDIUM_WH\" }, \"authenticationType\": \"SERVICE_ACCOUNT\", \"externalDatabases\":[ ] } ``` 2. Set `validate` to `false`. **NOTE:** If the `authentication_type` is anything other than SERVICE_ACCOUNT, you must explicitly provide the authenticationType property in the payload. If you do not specify authenticationType, the API will default to SERVICE_ACCOUNT as the authentication type. #### Create a connection with tables If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) and `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` (**Can manage data models**) privilege is required. To create a connection with tables: 1. Pass these parameters in your API request. * Name of the connection. * Type of the data warehouse to connect to. * A JSON map of configuration attributes, database details, and table properties in `data_warehouse_config` as shown in the following example: ``` { \"configuration\":{ \"accountName\":\"thoughtspot_partner\", \"user\":\"tsadmin\", \"password\":\"TestConn123\", \"role\":\"sysadmin\", \"warehouse\":\"MEDIUM_WH\" }, \"authenticationType\": \"SERVICE_ACCOUNT\", \"externalDatabases\":[ { \"name\":\"AllDatatypes\", \"isAutoCreated\":false, \"schemas\":[ { \"name\":\"alldatatypes\", \"tables\":[ { \"name\":\"allDatatypes\", \"type\":\"TABLE\", \"description\":\"\", \"selected\":true, \"linked\":true, \"columns\":[ { \"name\":\"CNUMBER\", \"type\":\"INT64\", \"canImport\":true, \"selected\":true, \"isLinkedActive\":true, \"isImported\":false, \"tableName\":\"allDatatypes\", \"schemaName\":\"alldatatypes\", \"dbName\":\"AllDatatypes\" }, { \"name\":\"CDECIMAL\", \"type\":\"INT64\", \"canImport\":true, \"selected\":true, \"isLinkedActive\":true, \"isImported\":false, \"tableName\":\"allDatatypes\", \"schemaName\":\"alldatatypes\", \"dbName\":\"AllDatatypes\" } ] } ] } ] } ] } ``` 2. Set `validate` to `true`. **NOTE:** If the `authentication_type` is anything other than SERVICE_ACCOUNT, you must explicitly provide the authenticationType property in the payload. If you do not specify authenticationType, the API will default to SERVICE_ACCOUNT as the authentication type. + * @param createConnectionRequest + */ + public async createConnection(createConnectionRequest: CreateConnectionRequest, _options?: Configuration): Promise { + let _config = _options || this.configuration; + + // verify required parameter 'createConnectionRequest' is not null or undefined + if (createConnectionRequest === null || createConnectionRequest === undefined) { + throw new RequiredError("ConnectionsApi", "createConnection", "createConnectionRequest"); + } + + + // Path Params + const localVarPath = '/api/rest/2.0/connection/create'; + + // Make Request Context + const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.POST); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.25.0") + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.25.0") + + + + + // Body Params + const contentType = ObjectSerializer.getPreferredMediaType([ + "application/json" + ]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = ObjectSerializer.stringify( + ObjectSerializer.serialize(createConnectionRequest, "CreateConnectionRequest", ""), + contentType + ); + requestContext.setBody(serializedBody); + + let authMethod: SecurityAuthentication | undefined; + // Apply auth methods + authMethod = _config.authMethods["bearerAuth"] + if (authMethod?.applySecurityAuthentication) { + await authMethod?.applySecurityAuthentication(requestContext); + } + + const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default + if (defaultAuth?.applySecurityAuthentication) { + await defaultAuth?.applySecurityAuthentication(requestContext); + } + + return requestContext; + } + + /** + * Version: 9.2.0.cl or later **Important**: This endpoint is deprecated and will be removed from ThoughtSpot in September 2025. ThoughtSpot strongly recommends using the [Delete Connection V2](#/http/api-endpoints/connections/delete-connection-v2) endpoint to delete your connection objects. #### Usage guidelines Deletes a connection object. Requires `DATAMANAGEMENT` (**Can manage data**) and edit permissions to the connection object, or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) privilege is required. **Note**: If a connection has dependent objects, make sure you remove its associations before the delete operation. + * @param deleteConnectionRequest + */ + public async deleteConnection(deleteConnectionRequest: DeleteConnectionRequest, _options?: Configuration): Promise { + let _config = _options || this.configuration; + + // verify required parameter 'deleteConnectionRequest' is not null or undefined + if (deleteConnectionRequest === null || deleteConnectionRequest === undefined) { + throw new RequiredError("ConnectionsApi", "deleteConnection", "deleteConnectionRequest"); + } + + + // Path Params + const localVarPath = '/api/rest/2.0/connection/delete'; + + // Make Request Context + const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.POST); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.25.0") + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.25.0") + + + + + // Body Params + const contentType = ObjectSerializer.getPreferredMediaType([ + "application/json" + ]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = ObjectSerializer.stringify( + ObjectSerializer.serialize(deleteConnectionRequest, "DeleteConnectionRequest", ""), + contentType + ); + requestContext.setBody(serializedBody); + + let authMethod: SecurityAuthentication | undefined; + // Apply auth methods + authMethod = _config.authMethods["bearerAuth"] + if (authMethod?.applySecurityAuthentication) { + await authMethod?.applySecurityAuthentication(requestContext); + } + + const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default + if (defaultAuth?.applySecurityAuthentication) { + await defaultAuth?.applySecurityAuthentication(requestContext); + } + + return requestContext; + } + + /** + * Version: 10.4.0.cl or later Deletes a connection object. **Note**: If a connection has dependent objects, make sure you remove its associations before the delete operation. Requires `DATAMANAGEMENT` (**Can manage data**) and edit permissions to the connection object, or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) privilege is required. + * @param connectionIdentifier Unique ID or name of the connection. + */ + public async deleteConnectionV2(connectionIdentifier: string, _options?: Configuration): Promise { + let _config = _options || this.configuration; + + // verify required parameter 'connectionIdentifier' is not null or undefined + if (connectionIdentifier === null || connectionIdentifier === undefined) { + throw new RequiredError("ConnectionsApi", "deleteConnectionV2", "connectionIdentifier"); + } + + + // Path Params + const localVarPath = '/api/rest/2.0/connections/{connection_identifier}/delete' + .replace('{' + 'connection_identifier' + '}', encodeURIComponent(String(connectionIdentifier))); + + // Make Request Context + const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.POST); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.25.0") + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.25.0") + + + + + let authMethod: SecurityAuthentication | undefined; + // Apply auth methods + authMethod = _config.authMethods["bearerAuth"] + if (authMethod?.applySecurityAuthentication) { + await authMethod?.applySecurityAuthentication(requestContext); + } + + const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default + if (defaultAuth?.applySecurityAuthentication) { + await defaultAuth?.applySecurityAuthentication(requestContext); + } + + return requestContext; + } + + /** + * Version: 9.9.0.cl or later Exports the difference in connection metadata between CDW and ThoughtSpot Requires `DATAMANAGEMENT` (**Can manage data**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the following Data control privileges may be required: - `CAN_MANAGE_CUSTOM_CALENDAR`(**Can manage custom calendars**) - `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) - `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` (**Can manage data models**) To download the connection metadata difference between ThoughtSpot and CDW, pass the connection GUID as `connection_identifier` in the API request. + * @param connectionIdentifier GUID of the connection + */ + public async downloadConnectionMetadataChanges(connectionIdentifier: string, _options?: Configuration): Promise { + let _config = _options || this.configuration; + + // verify required parameter 'connectionIdentifier' is not null or undefined + if (connectionIdentifier === null || connectionIdentifier === undefined) { + throw new RequiredError("ConnectionsApi", "downloadConnectionMetadataChanges", "connectionIdentifier"); + } + + + // Path Params + const localVarPath = '/api/rest/2.0/connections/download-connection-metadata-changes/{connection_identifier}' + .replace('{' + 'connection_identifier' + '}', encodeURIComponent(String(connectionIdentifier))); + + // Make Request Context + const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.POST); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.25.0") + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.25.0") + + + + + let authMethod: SecurityAuthentication | undefined; + // Apply auth methods + authMethod = _config.authMethods["bearerAuth"] + if (authMethod?.applySecurityAuthentication) { + await authMethod?.applySecurityAuthentication(requestContext); + } + + const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default + if (defaultAuth?.applySecurityAuthentication) { + await defaultAuth?.applySecurityAuthentication(requestContext); + } + + return requestContext; + } + + /** + * Version: 9.9.0.cl or later Validates the difference in connection metadata between CDW and ThoughtSpot. Requires `DATAMANAGEMENT` (**Can manage data**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the following Data control privileges may be required: - `CAN_MANAGE_CUSTOM_CALENDAR`(**Can manage custom calendars**) - `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) - `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` (**Can manage data models**) Returns a boolean indicating whether there is any difference between the connection metadata at ThoughtSpot and CDW. To get the connection metadata difference status, pass the connection GUID as `connection_identifier` in the API request. + * @param connectionIdentifier GUID of the connection + */ + public async fetchConnectionDiffStatus(connectionIdentifier: string, _options?: Configuration): Promise { + let _config = _options || this.configuration; + + // verify required parameter 'connectionIdentifier' is not null or undefined + if (connectionIdentifier === null || connectionIdentifier === undefined) { + throw new RequiredError("ConnectionsApi", "fetchConnectionDiffStatus", "connectionIdentifier"); + } + + + // Path Params + const localVarPath = '/api/rest/2.0/connections/fetch-connection-diff-status/{connection_identifier}' + .replace('{' + 'connection_identifier' + '}', encodeURIComponent(String(connectionIdentifier))); + + // Make Request Context + const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.POST); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.25.0") + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.25.0") + + + + + let authMethod: SecurityAuthentication | undefined; + // Apply auth methods + authMethod = _config.authMethods["bearerAuth"] + if (authMethod?.applySecurityAuthentication) { + await authMethod?.applySecurityAuthentication(requestContext); + } + + const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default + if (defaultAuth?.applySecurityAuthentication) { + await defaultAuth?.applySecurityAuthentication(requestContext); + } + + return requestContext; + } + + /** + * Version: 26.2.0.cl or later Revokes OAuth refresh tokens for users who no longer require access to a data warehouse connection. When a token is revoked, the affected user\'s session for that connection is terminated, and they must re-authenticate to regain access. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) or `DATAMANAGEMENT` (**Can manage data**) privileges. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on the ThoughtSpot instance, users with `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) privilege can also make API requests to revoke tokens for connection users. #### Usage guidelines You can specify different combinations of identifiers to control which refresh tokens are revoked. - **connection_identifier**: Revokes refresh tokens for all users of the connection, except the connection author. - **connection_identifier** and **user_identifiers**: Revokes refresh tokens only for the users specified in the request. If the name or ID of the connection author is included in the request, their token will also be revoked. - **connection_identifier** and **configuration_identifiers**: Revokes refresh tokens for all users on the specified configurations, except the configuration author. - **connection_identifier**, **configuration_identifiers**, and **user_identifiers**: Revokes refresh tokens for the specified users on the specified configurations. - **connection_identifier** and **org_identifiers**: Revokes refresh tokens for the specified Orgs. Applicable only for published connections. - **connection_identifier**, **org_identifiers**, and **user_identifiers**: Revokes refresh tokens for the specified users in the specified Orgs. Applicable only for published connections. **NOTE**: The `org_identifiers` parameter is only applicable for published connections. Using this parameter for unpublished connections will result in an error. Ensure that the connections are published before making the API request. + * @param connectionIdentifier Unique ID or name of the connection whose refresh tokens need to be revoked. All the users associated with the connection will have their refresh tokens revoked except the author. + * @param revokeRefreshTokensRequest + */ + public async revokeRefreshTokens(connectionIdentifier: string, revokeRefreshTokensRequest: RevokeRefreshTokensRequest, _options?: Configuration): Promise { + let _config = _options || this.configuration; + + // verify required parameter 'connectionIdentifier' is not null or undefined + if (connectionIdentifier === null || connectionIdentifier === undefined) { + throw new RequiredError("ConnectionsApi", "revokeRefreshTokens", "connectionIdentifier"); + } + + + // verify required parameter 'revokeRefreshTokensRequest' is not null or undefined + if (revokeRefreshTokensRequest === null || revokeRefreshTokensRequest === undefined) { + throw new RequiredError("ConnectionsApi", "revokeRefreshTokens", "revokeRefreshTokensRequest"); + } + + + // Path Params + const localVarPath = '/api/rest/2.0/connections/{connection_identifier}/revoke-refresh-tokens' + .replace('{' + 'connection_identifier' + '}', encodeURIComponent(String(connectionIdentifier))); + + // Make Request Context + const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.POST); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.25.0") + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.25.0") + + + + + // Body Params + const contentType = ObjectSerializer.getPreferredMediaType([ + "application/json" + ]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = ObjectSerializer.stringify( + ObjectSerializer.serialize(revokeRefreshTokensRequest, "RevokeRefreshTokensRequest", ""), + contentType + ); + requestContext.setBody(serializedBody); + + let authMethod: SecurityAuthentication | undefined; + // Apply auth methods + authMethod = _config.authMethods["bearerAuth"] + if (authMethod?.applySecurityAuthentication) { + await authMethod?.applySecurityAuthentication(requestContext); + } + + const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default + if (defaultAuth?.applySecurityAuthentication) { + await defaultAuth?.applySecurityAuthentication(requestContext); + } + + return requestContext; + } + + /** + * Version: 9.2.0.cl or later Gets connection objects. Requires `DATAMANAGEMENT` (**Can manage data**) or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) privilege is required. - To get a list of all connections available in the ThoughtSpot system, send the API request without any attributes in the request body. - To get the connection objects for a specific type of data warehouse, specify the type in `data_warehouse_types`. - To fetch details of a connection object, specify the connection object GUID or name. The `name_pattern` attribute allows passing partial text with `%` for a wildcard match. - To get details of the database, schemas, tables, or columns from a data connection object, specify `data_warehouse_object_type`. - To get a specific database, schema, table, or column from a connection object, define the object type in `data_warehouse_object_type` and object properties in the `data_warehouse_objects` array. For example, to search for a column, you must pass the database, schema, and table names in the API request. Note that in the following example, object properties are set in a hierarchical order (`database` > `schema` > `table` > `column`). ``` { \"connections\": [ { \"identifier\": \"b9d1f2ef-fa65-4a4b-994e-30fa2d57b0c2\", \"data_warehouse_objects\": [ { \"database\": \"NEBULADEV\", \"schema\": \"INFORMATION_SCHEMA\", \"table\": \"APPLICABLE_ROLES\", \"column\": \"ROLE_NAME\" } ] } ], \"data_warehouse_object_type\": \"COLUMN\" } ``` - To fetch data by `configuration`, specify `data_warehouse_object_type`. For example, to fetch columns from the `DEVELOPMENT` database, specify the `data_warehouse_object_type` as `DATABASE` and define the `configuration` string as `{\"database\":\"DEVELOPMENT\"}`. To get column data for a specific table, specify the table, for example,`{\"database\":\"RETAILAPPAREL\",\"table\":\"PIPES\"}`. - To query connections by `authentication_type`, specify `data_warehouse_object_type`. Supported values for `authentication_type` are: - `SERVICE_ACCOUNT`: For connections that require service account credentials to authenticate to the Cloud Data Warehouse and fetch data. - `OAUTH`: For connections that require OAuth credentials to authenticate to the Cloud Data Warehouse and fetch data. Teradata, Oracle, and Presto Cloud Data Warehouses do not support the OAuth authentication type. - `IAM`: For connections that have the IAM OAuth set up. This authentication type is supported on Amazon Redshift connections only. - `EXTOAUTH`: For connections that have External OAuth set up. ThoughtSpot supports external [OAuth with Microsoft Azure Active Directory (AD)](https://docs.thoughtspot.com/cloud/latest/ connections-snowflake-azure-ad-oauth) and [Okta for Snowflake data connections](https://docs.thoughtspot.com/cloud/latest/connections-snowflake-okta-oauth). - `KEY_PAIR`: For connections that require Key Pair account credentials to authenticate to the Cloud Data Warehouse and fetch data. This authentication type is supported on Snowflake connections only. - `OAUTH_WITH_PKCE`: For connections that require OAuth with PKCE account credentials to authenticate to the Cloud Data Warehouse and fetch data. This authentication type is supported on Snowflake, Starburst, Databricks, Denodo connections only. - `EXTOAUTH_WITH_PKCE`: For connections that require External OAuth With PKCE account credentials to authenticate to the Cloud Data Warehouse and fetch data. This authentication type is supported on Snowflake connections only. - `OAUTH_WITH_PEZ`: For connections that require OAuth With PEZ account credentials to authenticate to the Cloud Data Warehouse and fetch data. This authentication type is supported on Amazon Redshift connections only. - `OAUTH_WITH_SERVICE_PRINCIPAL`: For connections that require OAuth With Service Principal account credentials to authenticate to the Cloud Data Warehouse and fetch data. This authentication type is supported on Databricks connections only. - `PERSONAL_ACCESS_TOKEN`: For connections that require Personal Access Token account credentials to authenticate to the Cloud Data Warehouse and fetch data. This authentication type is supported on Databricks connections only. - `OAUTH_CLIENT_CREDENTIALS`: For connections that require OAuth Client Credentials to authenticate to the Cloud Data Warehouse and fetch data. This authentication type is supported on Snowflake connections only. - To include more details about connection objects in the API response, set `include_details` to `true`. - You can also sort the output by field names and filter connections by tags. **NOTE**: When filtering connection records by parameters other than `data_warehouse_types` or `tag_identifiers`, ensure that you set `record_size` to `-1` and `record_offset` to `0` for precise results. + * @param searchConnectionRequest + */ + public async searchConnection(searchConnectionRequest: SearchConnectionRequest, _options?: Configuration): Promise { + let _config = _options || this.configuration; + + // verify required parameter 'searchConnectionRequest' is not null or undefined + if (searchConnectionRequest === null || searchConnectionRequest === undefined) { + throw new RequiredError("ConnectionsApi", "searchConnection", "searchConnectionRequest"); + } + + + // Path Params + const localVarPath = '/api/rest/2.0/connection/search'; + + // Make Request Context + const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.POST); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.25.0") + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.25.0") + + + + + // Body Params + const contentType = ObjectSerializer.getPreferredMediaType([ + "application/json" + ]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = ObjectSerializer.stringify( + ObjectSerializer.serialize(searchConnectionRequest, "SearchConnectionRequest", ""), + contentType + ); + requestContext.setBody(serializedBody); + + let authMethod: SecurityAuthentication | undefined; + // Apply auth methods + authMethod = _config.authMethods["bearerAuth"] + if (authMethod?.applySecurityAuthentication) { + await authMethod?.applySecurityAuthentication(requestContext); + } + + const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default + if (defaultAuth?.applySecurityAuthentication) { + await defaultAuth?.applySecurityAuthentication(requestContext); + } + + return requestContext; + } + + /** + * Version: 26.5.0.cl or later Synchronizes connection metadata attributes from your Cloud Data Warehouse (CDW) with ThoughtSpot. Requires the `DATAMANAGEMENT` (**Can manage data**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` (**Can manage data models**) privilege is required. #### Usage guidelines To synchronize attributes from a CDW, specify the connection GUID or name in the `connection_identifier` path parameter and `sync_attributes` in the request body. Default attribute is `[\"DESCRIPTION\"]`. ##### Hierarchical schema * Connection: The connection object for the sync operation. * Tables: Tables for the sync operation. When no table is specified, all tables are synchronized. * Columns: If the table is specified, you can add the columns for the sync operation. If no columns are specified, all columns in the specified table are considered for the sync operation. To set the scope for the sync operation: * Connection-level: To sync all tables and columns, pass an empty request body, or only the attributes in the request body. * Table-level: To synchronize specific tables and their columns, specify the table identifiers in the `tables` array. * Column-level: To synchronize specific columns, specify the table identifier as the key and column identifiers as the value in the `tables` array. ``` { \"tables\": [ {\"table-guid-1\": [\"column-guid-1\", \"column-guid-2\"]}, \"table-guid-2\" ], \"sync_attributes\": [\"DESCRIPTION\"] } ``` ##### API response If the sync operation is successful, the API returns the following information: * Status of the sync operation. For example, `SUCCESS`, `PARTIAL_SUCCESS`, or `NO_UPDATE`. * Number of tables and columns that were updated. * Number of tables and columns with the sync failed status when the overall sync status is `PARTIAL_SUCCESS`. * Message text indicating the sync results. + * @param connectionIdentifier Unique ID or name of the connection. + * @param syncMetadataRequest + */ + public async syncMetadata(connectionIdentifier: string, syncMetadataRequest: SyncMetadataRequest, _options?: Configuration): Promise { + let _config = _options || this.configuration; + + // verify required parameter 'connectionIdentifier' is not null or undefined + if (connectionIdentifier === null || connectionIdentifier === undefined) { + throw new RequiredError("ConnectionsApi", "syncMetadata", "connectionIdentifier"); + } + + + // verify required parameter 'syncMetadataRequest' is not null or undefined + if (syncMetadataRequest === null || syncMetadataRequest === undefined) { + throw new RequiredError("ConnectionsApi", "syncMetadata", "syncMetadataRequest"); + } + + + // Path Params + const localVarPath = '/api/rest/2.0/connections/{connection_identifier}/resync-metadata' + .replace('{' + 'connection_identifier' + '}', encodeURIComponent(String(connectionIdentifier))); + + // Make Request Context + const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.POST); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.25.0") + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.25.0") + + + + + // Body Params + const contentType = ObjectSerializer.getPreferredMediaType([ + "application/json" + ]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = ObjectSerializer.stringify( + ObjectSerializer.serialize(syncMetadataRequest, "SyncMetadataRequest", ""), + contentType + ); + requestContext.setBody(serializedBody); + + let authMethod: SecurityAuthentication | undefined; + // Apply auth methods + authMethod = _config.authMethods["bearerAuth"] + if (authMethod?.applySecurityAuthentication) { + await authMethod?.applySecurityAuthentication(requestContext); + } + + const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default + if (defaultAuth?.applySecurityAuthentication) { + await defaultAuth?.applySecurityAuthentication(requestContext); + } + + return requestContext; + } + + /** + * Version: 9.2.0.cl or later **Important**: This endpoint is deprecated and will be removed from ThoughtSpot in September 2025. ThoughtSpot strongly recommends using the [Update connection V2](#/http/api-endpoints/connections/update-connection-v2) endpoint to update your connection objects. #### Usage guidelines Updates a connection object. Requires `DATAMANAGEMENT` (**Can manage data**) and edit permissions to the connection object, or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) privilege is required. To update a connection object, pass these parameters in your API request: 1. GUID of the connection object. 2. If you are updating tables or database schema of a connection object: a. Add the updated JSON map of metadata with database, schema, and tables in `data_warehouse_config`. b. Set `validate` to `true`. 3. If you are updating a configuration attribute, connection name, or description, you can set `validate` to `false`. + * @param updateConnectionRequest + */ + public async updateConnection(updateConnectionRequest: UpdateConnectionRequest, _options?: Configuration): Promise { + let _config = _options || this.configuration; + + // verify required parameter 'updateConnectionRequest' is not null or undefined + if (updateConnectionRequest === null || updateConnectionRequest === undefined) { + throw new RequiredError("ConnectionsApi", "updateConnection", "updateConnectionRequest"); + } + + + // Path Params + const localVarPath = '/api/rest/2.0/connection/update'; + + // Make Request Context + const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.POST); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.25.0") + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.25.0") + + + + + // Body Params + const contentType = ObjectSerializer.getPreferredMediaType([ + "application/json" + ]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = ObjectSerializer.stringify( + ObjectSerializer.serialize(updateConnectionRequest, "UpdateConnectionRequest", ""), + contentType + ); + requestContext.setBody(serializedBody); + + let authMethod: SecurityAuthentication | undefined; + // Apply auth methods + authMethod = _config.authMethods["bearerAuth"] + if (authMethod?.applySecurityAuthentication) { + await authMethod?.applySecurityAuthentication(requestContext); + } + + const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default + if (defaultAuth?.applySecurityAuthentication) { + await defaultAuth?.applySecurityAuthentication(requestContext); + } + + return requestContext; + } + + /** + * Version: 26.6.0.cl or later Activates or deactivates a connection. A deactivated connection cannot be used for queries or operations until it is activated again. Requires `DATAMANAGEMENT` (**Can manage data**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) privilege is required. Only the connection owner or an administrator can perform this operation. #### Usage guidelines To update the status of a connection, specify the connection GUID or name in the `connection_identifier` path parameter and the desired `status` in the request body. - **ACTIVATED**: Enables the connection. Queries and operations can resume on an activated connection. - **DEACTIVATED**: Disables the connection. It does not remove the connection metadata, but only makes the connection unavailable for queries and operations. You can reactivate a deactivated connection by setting \"status\": \"ACTIVATED\". + * @param connectionIdentifier Unique ID or name of the connection. + * @param updateConnectionStatusRequest + */ + public async updateConnectionStatus(connectionIdentifier: string, updateConnectionStatusRequest: UpdateConnectionStatusRequest, _options?: Configuration): Promise { + let _config = _options || this.configuration; + + // verify required parameter 'connectionIdentifier' is not null or undefined + if (connectionIdentifier === null || connectionIdentifier === undefined) { + throw new RequiredError("ConnectionsApi", "updateConnectionStatus", "connectionIdentifier"); + } + + + // verify required parameter 'updateConnectionStatusRequest' is not null or undefined + if (updateConnectionStatusRequest === null || updateConnectionStatusRequest === undefined) { + throw new RequiredError("ConnectionsApi", "updateConnectionStatus", "updateConnectionStatusRequest"); + } + + + // Path Params + const localVarPath = '/api/rest/2.0/connections/{connection_identifier}/status' + .replace('{' + 'connection_identifier' + '}', encodeURIComponent(String(connectionIdentifier))); + + // Make Request Context + const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.POST); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.25.0") + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.25.0") + + + + + // Body Params + const contentType = ObjectSerializer.getPreferredMediaType([ + "application/json" + ]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = ObjectSerializer.stringify( + ObjectSerializer.serialize(updateConnectionStatusRequest, "UpdateConnectionStatusRequest", ""), + contentType + ); + requestContext.setBody(serializedBody); + + let authMethod: SecurityAuthentication | undefined; + // Apply auth methods + authMethod = _config.authMethods["bearerAuth"] + if (authMethod?.applySecurityAuthentication) { + await authMethod?.applySecurityAuthentication(requestContext); + } + + const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default + if (defaultAuth?.applySecurityAuthentication) { + await defaultAuth?.applySecurityAuthentication(requestContext); + } + + return requestContext; + } + + /** + * Version: 10.4.0.cl or later Updates a connection object. Requires `DATAMANAGEMENT` (**Can manage data**) and edit permissions to the connection object, or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) privilege is required. To update a connection object, pass these parameters in your API request: 1. GUID of the connection object. 2. If you are updating tables or database schema of a connection object: a. Add the updated JSON map of metadata with database, schema, and tables in `data_warehouse_config`. b. Set `validate` to `true`. **NOTE:** If the `authentication_type` is anything other than SERVICE_ACCOUNT, you must explicitly provide the authenticationType property in the payload. If you do not specify authenticationType, the API will default to SERVICE_ACCOUNT as the authentication type. * A JSON map of configuration attributes, database details, and table properties in `data_warehouse_config` as shown in the following example: * This is an example of updating a single table in a empty connection: ``` { \"authenticationType\": \"SERVICE_ACCOUNT\", \"externalDatabases\": [ { \"name\": \"DEVELOPMENT\", \"isAutoCreated\": false, \"schemas\": [ { \"name\": \"TS_dataset\", \"tables\": [ { \"name\": \"DEMORENAME\", \"type\": \"TABLE\", \"description\": \"\", \"selected\": true, \"linked\": true, \"gid\": 0, \"datasetId\": \"-1\", \"subType\": \"\", \"reportId\": \"\", \"viewId\": \"\", \"columns\": [ { \"name\": \"Col1\", \"type\": \"VARCHAR\", \"canImport\": true, \"selected\": true, \"description\": \"\", \"isLinkedActive\": true, \"isAggregate\": false }, { \"name\": \"Col2\", \"type\": \"VARCHAR\", \"canImport\": true, \"selected\": true, \"description\": \"\", \"isLinkedActive\": true, \"isAggregate\": false }, { \"name\": \"Col3\", \"type\": \"VARCHAR\", \"canImport\": true, \"selected\": true, \"description\": \"\", \"isLinkedActive\": true, \"isAggregate\": false }, { \"name\": \"Col312\", \"type\": \"VARCHAR\", \"canImport\": true, \"selected\": true, \"description\": \"\", \"isLinkedActive\": true, \"isAggregate\": false }, { \"name\": \"Col4\", \"type\": \"VARCHAR\", \"canImport\": true, \"selected\": true, \"description\": \"\", \"isLinkedActive\": true, \"isAggregate\": false } ], \"relationships\": [] } ] } ] } ], \"configuration\": { \"password\": \"\", \"database\": \"DEVELOPMENT\", \"role\": \"DEV\", \"accountName\": \"thoughtspot_partner\", \"warehouse\": \"DEMO_WH\", \"user\": \"DEV_USER\" } } ``` * This is an example of updating a single table in an existing connection with tables: ``` { \"authenticationType\": \"SERVICE_ACCOUNT\", \"externalDatabases\": [ { \"name\": \"DEVELOPMENT\", \"isAutoCreated\": false, \"schemas\": [ { \"name\": \"TS_dataset\", \"tables\": [ { \"name\": \"CUSTOMER\", \"type\": \"TABLE\", \"description\": \"\", \"selected\": true, \"linked\": true, \"gid\": 0, \"datasetId\": \"-1\", \"subType\": \"\", \"reportId\": \"\", \"viewId\": \"\", \"columns\": [], \"relationships\": [] }, { \"name\": \"tpch5k_falcon_default_schema_users\", \"type\": \"TABLE\", \"description\": \"\", \"selected\": true, \"linked\": true, \"gid\": 0, \"datasetId\": \"-1\", \"subType\": \"\", \"reportId\": \"\", \"viewId\": \"\", \"columns\": [ { \"name\": \"user_id\", \"type\": \"INT64\", \"canImport\": true, \"selected\": true, \"description\": \"\", \"isLinkedActive\": true, \"isAggregate\": false }, { \"name\": \"product_id\", \"type\": \"INT64\", \"canImport\": true, \"selected\": true, \"description\": \"\", \"isLinkedActive\": true, \"isAggregate\": false }, { \"name\": \"user_cost\", \"type\": \"INT64\", \"canImport\": true, \"selected\": true, \"description\": \"\", \"isLinkedActive\": true, \"isAggregate\": false } ], \"relationships\": [] } ] } ] } ], \"configuration\": { \"password\": \"\", \"database\": \"DEVELOPMENT\", \"role\": \"DEV\", \"accountName\": \"thoughtspot_partner\", \"warehouse\": \"DEMO_WH\", \"user\": \"DEV_USER\" } } ``` 3. If you are updating a configuration attribute, connection name, or description, you can set `validate` to `false`. **NOTE:** If the `authentication_type` is anything other than SERVICE_ACCOUNT, you must explicitly provide the authenticationType property in the payload. If you do not specify authenticationType, the API will default to SERVICE_ACCOUNT as the authentication type. * A JSON map of configuration attributes in `data_warehouse_config`. The following example shows the configuration attributes for a Snowflake connection: ``` { \"configuration\":{ \"accountName\":\"thoughtspot_partner\", \"user\":\"tsadmin\", \"password\":\"TestConn123\", \"role\":\"sysadmin\", \"warehouse\":\"MEDIUM_WH\" }, \"externalDatabases\":[ ] } ``` + * @param connectionIdentifier Unique ID or name of the connection. + * @param updateConnectionV2Request + */ + public async updateConnectionV2(connectionIdentifier: string, updateConnectionV2Request: UpdateConnectionV2Request, _options?: Configuration): Promise { + let _config = _options || this.configuration; + + // verify required parameter 'connectionIdentifier' is not null or undefined + if (connectionIdentifier === null || connectionIdentifier === undefined) { + throw new RequiredError("ConnectionsApi", "updateConnectionV2", "connectionIdentifier"); + } + + + // verify required parameter 'updateConnectionV2Request' is not null or undefined + if (updateConnectionV2Request === null || updateConnectionV2Request === undefined) { + throw new RequiredError("ConnectionsApi", "updateConnectionV2", "updateConnectionV2Request"); + } + + + // Path Params + const localVarPath = '/api/rest/2.0/connections/{connection_identifier}/update' + .replace('{' + 'connection_identifier' + '}', encodeURIComponent(String(connectionIdentifier))); + + // Make Request Context + const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.POST); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.25.0") + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.25.0") + + + + + // Body Params + const contentType = ObjectSerializer.getPreferredMediaType([ + "application/json" + ]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = ObjectSerializer.stringify( + ObjectSerializer.serialize(updateConnectionV2Request, "UpdateConnectionV2Request", ""), + contentType + ); + requestContext.setBody(serializedBody); + + let authMethod: SecurityAuthentication | undefined; + // Apply auth methods + authMethod = _config.authMethods["bearerAuth"] + if (authMethod?.applySecurityAuthentication) { + await authMethod?.applySecurityAuthentication(requestContext); + } + + const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default + if (defaultAuth?.applySecurityAuthentication) { + await defaultAuth?.applySecurityAuthentication(requestContext); + } + + return requestContext; + } + +} + +export class ConnectionsApiResponseProcessor { + + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to createConnection + * @throws ApiException if the response code was not in [200, 299] + */ + public async createConnection(response: ResponseContext): Promise { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("200", response.httpStatusCode)) { + const body: CreateConnectionResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "CreateConnectionResponse", "" + ) as CreateConnectionResponse; + return body; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Invalid request.", body, response.headers); + } + if (isCodeInRange("401", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Unexpected error", body, response.headers); + } + + // Work around for missing responses in specification, e.g. for petstore.yaml + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body: CreateConnectionResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "CreateConnectionResponse", "" + ) as CreateConnectionResponse; + return body; + } + + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", await response.getBodyAsAny(), response.headers); + } + + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to deleteConnection + * @throws ApiException if the response code was not in [200, 299] + */ + public async deleteConnection(response: ResponseContext): Promise { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("204", response.httpStatusCode)) { + return; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Invalid request.", body, response.headers); + } + if (isCodeInRange("401", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Unexpected error", body, response.headers); + } + + // Work around for missing responses in specification, e.g. for petstore.yaml + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body: void = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "void", "" + ) as void; + return body; + } + + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", await response.getBodyAsAny(), response.headers); + } + + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to deleteConnectionV2 + * @throws ApiException if the response code was not in [200, 299] + */ + public async deleteConnectionV2(response: ResponseContext): Promise { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("204", response.httpStatusCode)) { + return; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Invalid request.", body, response.headers); + } + if (isCodeInRange("401", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Unexpected error", body, response.headers); + } + + // Work around for missing responses in specification, e.g. for petstore.yaml + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body: void = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "void", "" + ) as void; + return body; + } + + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", await response.getBodyAsAny(), response.headers); + } + + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to downloadConnectionMetadataChanges + * @throws ApiException if the response code was not in [200, 299] + */ + public async downloadConnectionMetadataChanges(response: ResponseContext): Promise { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("200", response.httpStatusCode)) { + const body: HttpFile = await response.getBodyAsFile() as any as HttpFile; + return body; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "binary" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Invalid request.", body, response.headers); + } + if (isCodeInRange("401", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "binary" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "binary" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "binary" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Unexpected error", body, response.headers); + } + + // Work around for missing responses in specification, e.g. for petstore.yaml + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body: HttpFile = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "HttpFile", "binary" + ) as HttpFile; + return body; + } + + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", await response.getBodyAsAny(), response.headers); + } + + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to fetchConnectionDiffStatus + * @throws ApiException if the response code was not in [200, 299] + */ + public async fetchConnectionDiffStatus(response: ResponseContext): Promise { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("200", response.httpStatusCode)) { + const body: FetchConnectionDiffStatusResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "FetchConnectionDiffStatusResponse", "" + ) as FetchConnectionDiffStatusResponse; + return body; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Invalid request.", body, response.headers); + } + if (isCodeInRange("401", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Unexpected error", body, response.headers); + } + + // Work around for missing responses in specification, e.g. for petstore.yaml + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body: FetchConnectionDiffStatusResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "FetchConnectionDiffStatusResponse", "" + ) as FetchConnectionDiffStatusResponse; + return body; + } + + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", await response.getBodyAsAny(), response.headers); + } + + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to revokeRefreshTokens + * @throws ApiException if the response code was not in [200, 299] + */ + public async revokeRefreshTokens(response: ResponseContext): Promise { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("200", response.httpStatusCode)) { + const body: RevokeRefreshTokensResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "RevokeRefreshTokensResponse", "" + ) as RevokeRefreshTokensResponse; + return body; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Invalid request.", body, response.headers); + } + if (isCodeInRange("401", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } + if (isCodeInRange("404", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Object not found", body, response.headers); + } + if (isCodeInRange("409", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Conflict", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Unexpected error", body, response.headers); + } + + // Work around for missing responses in specification, e.g. for petstore.yaml + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body: RevokeRefreshTokensResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "RevokeRefreshTokensResponse", "" + ) as RevokeRefreshTokensResponse; + return body; + } + + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", await response.getBodyAsAny(), response.headers); + } + + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to searchConnection + * @throws ApiException if the response code was not in [200, 299] + */ + public async searchConnection(response: ResponseContext): Promise > { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("200", response.httpStatusCode)) { + const body: Array = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "Array", "" + ) as Array; + return body; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Invalid request.", body, response.headers); + } + if (isCodeInRange("401", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Unexpected error", body, response.headers); + } + + // Work around for missing responses in specification, e.g. for petstore.yaml + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body: Array = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "Array", "" + ) as Array; + return body; + } + + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", await response.getBodyAsAny(), response.headers); + } + + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to syncMetadata + * @throws ApiException if the response code was not in [200, 299] + */ + public async syncMetadata(response: ResponseContext): Promise { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("200", response.httpStatusCode)) { + const body: SyncMetadataResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "SyncMetadataResponse", "" + ) as SyncMetadataResponse; + return body; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Invalid request parameters or hierarchy.", body, response.headers); + } + if (isCodeInRange("401", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } + if (isCodeInRange("404", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Connection, table, or column not found.", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Unexpected error", body, response.headers); + } + + // Work around for missing responses in specification, e.g. for petstore.yaml + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body: SyncMetadataResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "SyncMetadataResponse", "" + ) as SyncMetadataResponse; + return body; + } + + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", await response.getBodyAsAny(), response.headers); + } + + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to updateConnection + * @throws ApiException if the response code was not in [200, 299] + */ + public async updateConnection(response: ResponseContext): Promise { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("204", response.httpStatusCode)) { + return; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Invalid request.", body, response.headers); + } + if (isCodeInRange("401", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Unexpected error", body, response.headers); + } + + // Work around for missing responses in specification, e.g. for petstore.yaml + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body: void = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "void", "" + ) as void; + return body; + } + + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", await response.getBodyAsAny(), response.headers); + } + + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to updateConnectionStatus + * @throws ApiException if the response code was not in [200, 299] + */ + public async updateConnectionStatus(response: ResponseContext): Promise { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("204", response.httpStatusCode)) { + return; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Invalid request.", body, response.headers); + } + if (isCodeInRange("401", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } + if (isCodeInRange("404", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Object not found", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Unexpected error", body, response.headers); + } + + // Work around for missing responses in specification, e.g. for petstore.yaml + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body: void = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "void", "" + ) as void; + return body; + } + + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", await response.getBodyAsAny(), response.headers); + } + + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to updateConnectionV2 + * @throws ApiException if the response code was not in [200, 299] + */ + public async updateConnectionV2(response: ResponseContext): Promise { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("204", response.httpStatusCode)) { + return; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Invalid request.", body, response.headers); + } + if (isCodeInRange("401", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Unexpected error", body, response.headers); + } + + // Work around for missing responses in specification, e.g. for petstore.yaml + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body: void = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "void", "" + ) as void; + return body; + } + + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", await response.getBodyAsAny(), response.headers); + } + +} diff --git a/sdks/typescript/apis/CustomActionApi.ts b/sdks/typescript/apis/CustomActionApi.ts new file mode 100644 index 000000000..1970ef318 --- /dev/null +++ b/sdks/typescript/apis/CustomActionApi.ts @@ -0,0 +1,448 @@ +// TODO: better import syntax? +import {BaseAPIRequestFactory, RequiredError, COLLECTION_FORMATS} from './baseapi'; +import {Configuration} from '../configuration'; +import {RequestContext, HttpMethod, ResponseContext, HttpFile} from '../http/http'; +import {ObjectSerializer} from '../models/ObjectSerializer'; +import {ApiException} from './exception'; +import {canConsumeForm, isCodeInRange} from '../util'; +import {SecurityAuthentication} from '../auth/auth'; + + +import { CreateCustomActionRequest } from '../models/CreateCustomActionRequest'; +import { ErrorResponse } from '../models/ErrorResponse'; +import { ResponseCustomAction } from '../models/ResponseCustomAction'; +import { SearchCustomActionsRequest } from '../models/SearchCustomActionsRequest'; +import { UpdateCustomActionRequest } from '../models/UpdateCustomActionRequest'; + +/** + * no description + */ +export class CustomActionApiRequestFactory extends BaseAPIRequestFactory { + + /** + * Version: 9.6.0.cl or later Creates a custom action that appears as a menu action on a saved Answer or Liveboard visualization. Requires `DEVELOPER` (**Has Developer privilege**) or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `DEVELOPER` (**Has developer privilege**) privilege is required. #### Usage Guidelines The API lets you create the following types of custom actions: * URL-based action Allows pushing data to an external URL. * Callback action Triggers a callback to the host application and initiates a response payload on an embedded ThoughtSpot instance. By default, custom actions are visible to only administrator or developer users. To make a custom action available to other users, and specify the groups in `group_identifiers`. By default, the custom action is set as a _global_ action on all visualizations and saved Answers. To assign a custom action to specific Liveboard visualization, saved Answer, or Worksheet, set `visibility` to `false` in `default_action_config` property and specify the GUID or name of the object in `associate_metadata`. For more information, see [Custom actions](https://developers.thoughtspot.com/docs/custom-action-intro). + * @param createCustomActionRequest + */ + public async createCustomAction(createCustomActionRequest: CreateCustomActionRequest, _options?: Configuration): Promise { + let _config = _options || this.configuration; + + // verify required parameter 'createCustomActionRequest' is not null or undefined + if (createCustomActionRequest === null || createCustomActionRequest === undefined) { + throw new RequiredError("CustomActionApi", "createCustomAction", "createCustomActionRequest"); + } + + + // Path Params + const localVarPath = '/api/rest/2.0/customization/custom-actions'; + + // Make Request Context + const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.POST); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.25.0") + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.25.0") + + + + + // Body Params + const contentType = ObjectSerializer.getPreferredMediaType([ + "application/json" + ]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = ObjectSerializer.stringify( + ObjectSerializer.serialize(createCustomActionRequest, "CreateCustomActionRequest", ""), + contentType + ); + requestContext.setBody(serializedBody); + + let authMethod: SecurityAuthentication | undefined; + // Apply auth methods + authMethod = _config.authMethods["bearerAuth"] + if (authMethod?.applySecurityAuthentication) { + await authMethod?.applySecurityAuthentication(requestContext); + } + + const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default + if (defaultAuth?.applySecurityAuthentication) { + await defaultAuth?.applySecurityAuthentication(requestContext); + } + + return requestContext; + } + + /** + * Version: 9.6.0.cl or later Removes the custom action specified in the API request. Requires `DEVELOPER` (**Has Developer privilege**) or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `DEVELOPER` (**Has developer privilege**) privilege is required. + * @param customActionIdentifier Unique ID or name of the custom action. + */ + public async deleteCustomAction(customActionIdentifier: string, _options?: Configuration): Promise { + let _config = _options || this.configuration; + + // verify required parameter 'customActionIdentifier' is not null or undefined + if (customActionIdentifier === null || customActionIdentifier === undefined) { + throw new RequiredError("CustomActionApi", "deleteCustomAction", "customActionIdentifier"); + } + + + // Path Params + const localVarPath = '/api/rest/2.0/customization/custom-actions/{custom_action_identifier}/delete' + .replace('{' + 'custom_action_identifier' + '}', encodeURIComponent(String(customActionIdentifier))); + + // Make Request Context + const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.POST); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.25.0") + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.25.0") + + + + + let authMethod: SecurityAuthentication | undefined; + // Apply auth methods + authMethod = _config.authMethods["bearerAuth"] + if (authMethod?.applySecurityAuthentication) { + await authMethod?.applySecurityAuthentication(requestContext); + } + + const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default + if (defaultAuth?.applySecurityAuthentication) { + await defaultAuth?.applySecurityAuthentication(requestContext); + } + + return requestContext; + } + + /** + * Version: 9.6.0.cl or later Gets custom actions configured on the cluster. Requires `DEVELOPER` (**Has Developer privilege**) or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `DEVELOPER` (**Has developer privilege**) privilege is required. + * @param searchCustomActionsRequest + */ + public async searchCustomActions(searchCustomActionsRequest: SearchCustomActionsRequest, _options?: Configuration): Promise { + let _config = _options || this.configuration; + + // verify required parameter 'searchCustomActionsRequest' is not null or undefined + if (searchCustomActionsRequest === null || searchCustomActionsRequest === undefined) { + throw new RequiredError("CustomActionApi", "searchCustomActions", "searchCustomActionsRequest"); + } + + + // Path Params + const localVarPath = '/api/rest/2.0/customization/custom-actions/search'; + + // Make Request Context + const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.POST); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.25.0") + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.25.0") + + + + + // Body Params + const contentType = ObjectSerializer.getPreferredMediaType([ + "application/json" + ]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = ObjectSerializer.stringify( + ObjectSerializer.serialize(searchCustomActionsRequest, "SearchCustomActionsRequest", ""), + contentType + ); + requestContext.setBody(serializedBody); + + let authMethod: SecurityAuthentication | undefined; + // Apply auth methods + authMethod = _config.authMethods["bearerAuth"] + if (authMethod?.applySecurityAuthentication) { + await authMethod?.applySecurityAuthentication(requestContext); + } + + const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default + if (defaultAuth?.applySecurityAuthentication) { + await defaultAuth?.applySecurityAuthentication(requestContext); + } + + return requestContext; + } + + /** + * Version: 9.6.0.cl or later Updates a custom action. Requires `DEVELOPER` (**Has Developer privilege**) or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `DEVELOPER` (**Has developer privilege**) privilege is required. #### Usage Guidelines The API allows you to modify the following properties: * Name of the custom action * Action availability to groups * Association to metadata objects * Authentication settings for a URL-based action For more information, see [Custom actions](https://developers.thoughtspot.com/docs/custom-action-intro). + * @param customActionIdentifier Unique ID or name of the custom action. + * @param updateCustomActionRequest + */ + public async updateCustomAction(customActionIdentifier: string, updateCustomActionRequest: UpdateCustomActionRequest, _options?: Configuration): Promise { + let _config = _options || this.configuration; + + // verify required parameter 'customActionIdentifier' is not null or undefined + if (customActionIdentifier === null || customActionIdentifier === undefined) { + throw new RequiredError("CustomActionApi", "updateCustomAction", "customActionIdentifier"); + } + + + // verify required parameter 'updateCustomActionRequest' is not null or undefined + if (updateCustomActionRequest === null || updateCustomActionRequest === undefined) { + throw new RequiredError("CustomActionApi", "updateCustomAction", "updateCustomActionRequest"); + } + + + // Path Params + const localVarPath = '/api/rest/2.0/customization/custom-actions/{custom_action_identifier}/update' + .replace('{' + 'custom_action_identifier' + '}', encodeURIComponent(String(customActionIdentifier))); + + // Make Request Context + const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.POST); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.25.0") + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.25.0") + + + + + // Body Params + const contentType = ObjectSerializer.getPreferredMediaType([ + "application/json" + ]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = ObjectSerializer.stringify( + ObjectSerializer.serialize(updateCustomActionRequest, "UpdateCustomActionRequest", ""), + contentType + ); + requestContext.setBody(serializedBody); + + let authMethod: SecurityAuthentication | undefined; + // Apply auth methods + authMethod = _config.authMethods["bearerAuth"] + if (authMethod?.applySecurityAuthentication) { + await authMethod?.applySecurityAuthentication(requestContext); + } + + const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default + if (defaultAuth?.applySecurityAuthentication) { + await defaultAuth?.applySecurityAuthentication(requestContext); + } + + return requestContext; + } + +} + +export class CustomActionApiResponseProcessor { + + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to createCustomAction + * @throws ApiException if the response code was not in [200, 299] + */ + public async createCustomAction(response: ResponseContext): Promise { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("200", response.httpStatusCode)) { + const body: ResponseCustomAction = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ResponseCustomAction", "" + ) as ResponseCustomAction; + return body; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Invalid request.", body, response.headers); + } + if (isCodeInRange("401", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Unexpected error", body, response.headers); + } + + // Work around for missing responses in specification, e.g. for petstore.yaml + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body: ResponseCustomAction = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ResponseCustomAction", "" + ) as ResponseCustomAction; + return body; + } + + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", await response.getBodyAsAny(), response.headers); + } + + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to deleteCustomAction + * @throws ApiException if the response code was not in [200, 299] + */ + public async deleteCustomAction(response: ResponseContext): Promise { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("204", response.httpStatusCode)) { + return; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Invalid request.", body, response.headers); + } + if (isCodeInRange("401", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Unexpected error", body, response.headers); + } + + // Work around for missing responses in specification, e.g. for petstore.yaml + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body: void = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "void", "" + ) as void; + return body; + } + + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", await response.getBodyAsAny(), response.headers); + } + + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to searchCustomActions + * @throws ApiException if the response code was not in [200, 299] + */ + public async searchCustomActions(response: ResponseContext): Promise > { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("200", response.httpStatusCode)) { + const body: Array = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "Array", "" + ) as Array; + return body; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Invalid request.", body, response.headers); + } + if (isCodeInRange("401", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Unexpected error", body, response.headers); + } + + // Work around for missing responses in specification, e.g. for petstore.yaml + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body: Array = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "Array", "" + ) as Array; + return body; + } + + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", await response.getBodyAsAny(), response.headers); + } + + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to updateCustomAction + * @throws ApiException if the response code was not in [200, 299] + */ + public async updateCustomAction(response: ResponseContext): Promise { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("204", response.httpStatusCode)) { + return; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Invalid request.", body, response.headers); + } + if (isCodeInRange("401", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Unexpected error", body, response.headers); + } + + // Work around for missing responses in specification, e.g. for petstore.yaml + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body: void = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "void", "" + ) as void; + return body; + } + + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", await response.getBodyAsAny(), response.headers); + } + +} diff --git a/sdks/typescript/apis/CustomCalendarsApi.ts b/sdks/typescript/apis/CustomCalendarsApi.ts new file mode 100644 index 000000000..a96036fde --- /dev/null +++ b/sdks/typescript/apis/CustomCalendarsApi.ts @@ -0,0 +1,557 @@ +// TODO: better import syntax? +import {BaseAPIRequestFactory, RequiredError, COLLECTION_FORMATS} from './baseapi'; +import {Configuration} from '../configuration'; +import {RequestContext, HttpMethod, ResponseContext, HttpFile} from '../http/http'; +import {ObjectSerializer} from '../models/ObjectSerializer'; +import {ApiException} from './exception'; +import {canConsumeForm, isCodeInRange} from '../util'; +import {SecurityAuthentication} from '../auth/auth'; + + +import { CalendarResponse } from '../models/CalendarResponse'; +import { CreateCalendarRequest } from '../models/CreateCalendarRequest'; +import { ErrorResponse } from '../models/ErrorResponse'; +import { GenerateCSVRequest } from '../models/GenerateCSVRequest'; +import { SearchCalendarsRequest } from '../models/SearchCalendarsRequest'; +import { UpdateCalendarRequest } from '../models/UpdateCalendarRequest'; + +/** + * no description + */ +export class CustomCalendarsApiRequestFactory extends BaseAPIRequestFactory { + + /** + * Version: 10.12.0.cl or later Creates a new [custom calendar](https://docs.thoughtspot.com/cloud/latest/connections-cust-cal). Requires `DATAMANAGEMENT` (**Can manage data**) or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your ThoughtSpot instance, the `CAN_MANAGE_CUSTOM_CALENDAR` (**Can manage custom calendars**) privilege is required. #### Usage guidelines You can create a custom calendar from scratch or an existing Table in ThoughtSpot. For both methods of calendar creation, the following parameters are required: * Name of the custom calendar. * Calendar creation method. To create a calendar from an existing table, specify the method: - `FROM_EXISTING_TABLE` - Creates calendar from the table reference provided in the API request. - `FROM_INPUT_PARAMS` - Creates a calendar from the parameters defined in the API request. * Connection ID and Table name * Database and schema name attributes: For most Cloud Data Warehouse (CDW) connectors, both `database_name` and `schema_name` attributes are required. However, the attribute requirements are conditional and vary based on the connector type and its metadata structure. For example, for connectors such as Teradata, MySQL, SingleSore, Amazon Aurora MySQL, Amazon RDS MySQL, Oracle, and GCP_MYSQL, the `schema_name` is required, whereas the `database_name` attribute is not. Similarly, connectors such as ClickHouse require you to specify the `database_name` and the schema specification in such cases is optional. **NOTE**: If you are creating a calendar from an existing table, ensure that the referenced table matches the required DDL for custom calendars. If the schema does not match, the API returns an error. ##### Calendar type The API allows you to create the following types of calendars: * `MONTH_OFFSET`. The default calendar type. A `MONTH_OFFSET` calendar is offset by a few months from the standard calendar months (January to December) and the year begins with the month defined in the request. For example, if the `month_offset` value is set as `April`, the calendar year begins in April. * `4-4-5`. Each quarter in the calendar will include two 4-week months followed by one 5-week month. * `4-5-4`. Each quarter in the calendar will include two 4-week months with a 5-week month between. * `5-4-4`. Each quarter begins with a 5-week month, followed by two 4-week months. To start and end the calendar on a specific date, specify the dates in the `MM/DD/YYYY` format. For `MONTH_OFFSET` calendars, ensure that the `start_date` matches the month specified in the `month_offset` attribute. You can also set the starting day of the week and customize the prefixes for year and quarter labels. #### Examples To create a calendar from an existing table: ``` { \"name\": \"MyCustomCalendar1\", \"table_reference\": { \"connection_identifier\": \"4db8ea22-2ff4-4224-b05a-26674717e468\", \"table_name\": \"MyCalendarTable\", \"database_name\": \"RETAILAPPAREL\", \"schema_name\": \"PUBLIC\" }, \"creation_method\": \"FROM_EXISTING_TABLE\", } ``` To create a calendar from scratch: ``` { \"name\": \"MyCustomCalendar1\", \"table_reference\": { \"connection_identifier\": \"4db8ea22-2ff4-4224-b05a-26674717e468\", \"table_name\": \"MyCalendarTable\", \"database_name\": \"RETAILAPPAREL\", \"schema_name\": \"PUBLIC\" }, \"creation_method\": \"FROM_INPUT_PARAMS\", \"calendar_type\": \"MONTH_OFFSET\", \"month_offset\": \"April\", \"start_day_of_week\": \"Monday\", \"quarter_name_prefix\": \"Q\", \"year_name_prefix\": \"FY\", \"start_date\": \"04/01/2025\", \"end_date\": \"04/31/2025\" } ``` + * @param createCalendarRequest + */ + public async createCalendar(createCalendarRequest: CreateCalendarRequest, _options?: Configuration): Promise { + let _config = _options || this.configuration; + + // verify required parameter 'createCalendarRequest' is not null or undefined + if (createCalendarRequest === null || createCalendarRequest === undefined) { + throw new RequiredError("CustomCalendarsApi", "createCalendar", "createCalendarRequest"); + } + + + // Path Params + const localVarPath = '/api/rest/2.0/calendars/create'; + + // Make Request Context + const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.POST); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.25.0") + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.25.0") + + + + + // Body Params + const contentType = ObjectSerializer.getPreferredMediaType([ + "application/json" + ]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = ObjectSerializer.stringify( + ObjectSerializer.serialize(createCalendarRequest, "CreateCalendarRequest", ""), + contentType + ); + requestContext.setBody(serializedBody); + + let authMethod: SecurityAuthentication | undefined; + // Apply auth methods + authMethod = _config.authMethods["bearerAuth"] + if (authMethod?.applySecurityAuthentication) { + await authMethod?.applySecurityAuthentication(requestContext); + } + + const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default + if (defaultAuth?.applySecurityAuthentication) { + await defaultAuth?.applySecurityAuthentication(requestContext); + } + + return requestContext; + } + + /** + * Version: 10.12.0.cl or later Deletes a [custom calendar](https://docs.thoughtspot.com/cloud/latest/connections-cust-cal). Requires `DATAMANAGEMENT` (**Can manage data**) or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your ThoughtSpot instance, the `CAN_MANAGE_CUSTOM_CALENDAR` (**Can manage custom calendars**) privilege is required. #### Usage guidelines To delete a custom calendar, specify the calendar ID as a path parameter in the request URL. + * @param calendarIdentifier Unique ID or name of the Calendar. + */ + public async deleteCalendar(calendarIdentifier: string, _options?: Configuration): Promise { + let _config = _options || this.configuration; + + // verify required parameter 'calendarIdentifier' is not null or undefined + if (calendarIdentifier === null || calendarIdentifier === undefined) { + throw new RequiredError("CustomCalendarsApi", "deleteCalendar", "calendarIdentifier"); + } + + + // Path Params + const localVarPath = '/api/rest/2.0/calendars/{calendar_identifier}/delete' + .replace('{' + 'calendar_identifier' + '}', encodeURIComponent(String(calendarIdentifier))); + + // Make Request Context + const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.POST); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.25.0") + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.25.0") + + + + + let authMethod: SecurityAuthentication | undefined; + // Apply auth methods + authMethod = _config.authMethods["bearerAuth"] + if (authMethod?.applySecurityAuthentication) { + await authMethod?.applySecurityAuthentication(requestContext); + } + + const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default + if (defaultAuth?.applySecurityAuthentication) { + await defaultAuth?.applySecurityAuthentication(requestContext); + } + + return requestContext; + } + + /** + * Version: 10.12.0.cl or later Exports a [custom calendar](https://docs.thoughtspot.com/cloud/latest/connections-cust-cal) in the CSV format. Requires `DATAMANAGEMENT` (**Can manage data**) or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your ThoughtSpot instance, the `CAN_MANAGE_CUSTOM_CALENDAR` (**Can manage custom calendars**) privilege is required. #### Usage guidelines Use this API to download a custom calendar in the CSV file format. In your API request, specify the following parameters. * Start and end date of the calendar. For \"month offset\" calendars, the start date must match the month defined in the `month_offset` attribute. You can also specify optional parameters such as the starting day of the week and prefixes for the quarter and year labels. + * @param generateCSVRequest + */ + public async generateCSV(generateCSVRequest: GenerateCSVRequest, _options?: Configuration): Promise { + let _config = _options || this.configuration; + + // verify required parameter 'generateCSVRequest' is not null or undefined + if (generateCSVRequest === null || generateCSVRequest === undefined) { + throw new RequiredError("CustomCalendarsApi", "generateCSV", "generateCSVRequest"); + } + + + // Path Params + const localVarPath = '/api/rest/2.0/calendars/generate-csv'; + + // Make Request Context + const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.POST); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.25.0") + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.25.0") + + + + + // Body Params + const contentType = ObjectSerializer.getPreferredMediaType([ + "application/json" + ]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = ObjectSerializer.stringify( + ObjectSerializer.serialize(generateCSVRequest, "GenerateCSVRequest", ""), + contentType + ); + requestContext.setBody(serializedBody); + + let authMethod: SecurityAuthentication | undefined; + // Apply auth methods + authMethod = _config.authMethods["bearerAuth"] + if (authMethod?.applySecurityAuthentication) { + await authMethod?.applySecurityAuthentication(requestContext); + } + + const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default + if (defaultAuth?.applySecurityAuthentication) { + await defaultAuth?.applySecurityAuthentication(requestContext); + } + + return requestContext; + } + + /** + * Version: 10.12.0.cl or later Gets a list of [custom calendars](https://docs.thoughtspot.com/cloud/latest/connections-cust-cal). Requires `DATAMANAGEMENT` (**Can manage data**) or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your ThoughtSpot instance, the `CAN_MANAGE_CUSTOM_CALENDAR` (**Can manage custom calendars**) privilege is required. #### Usage guidelines By default, the API returns a list of custom calendars for all connection objects. To retrieve custom calendar details for a particular connection, specify the connection ID. You can also use other search parameters such as `name_pattern` and `sort_options` as search filters. The `name_pattern` parameter filters and returns only those objects that match the specified pattern. Use `%` as a wildcard for pattern matching. + * @param searchCalendarsRequest + */ + public async searchCalendars(searchCalendarsRequest: SearchCalendarsRequest, _options?: Configuration): Promise { + let _config = _options || this.configuration; + + // verify required parameter 'searchCalendarsRequest' is not null or undefined + if (searchCalendarsRequest === null || searchCalendarsRequest === undefined) { + throw new RequiredError("CustomCalendarsApi", "searchCalendars", "searchCalendarsRequest"); + } + + + // Path Params + const localVarPath = '/api/rest/2.0/calendars/search'; + + // Make Request Context + const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.POST); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.25.0") + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.25.0") + + + + + // Body Params + const contentType = ObjectSerializer.getPreferredMediaType([ + "application/json" + ]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = ObjectSerializer.stringify( + ObjectSerializer.serialize(searchCalendarsRequest, "SearchCalendarsRequest", ""), + contentType + ); + requestContext.setBody(serializedBody); + + let authMethod: SecurityAuthentication | undefined; + // Apply auth methods + authMethod = _config.authMethods["bearerAuth"] + if (authMethod?.applySecurityAuthentication) { + await authMethod?.applySecurityAuthentication(requestContext); + } + + const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default + if (defaultAuth?.applySecurityAuthentication) { + await defaultAuth?.applySecurityAuthentication(requestContext); + } + + return requestContext; + } + + /** + * Version: 10.12.0.cl or later Updates the properties of a [custom calendar](https://docs.thoughtspot.com/cloud/latest/connections-cust-cal). Requires `DATAMANAGEMENT` (**Can manage data**) or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your ThoughtSpot instance, the `CAN_MANAGE_CUSTOM_CALENDAR` (**Can manage custom calendars**) privilege is required. #### Usage guidelines You can update the properties of a calendar using one of the following methods: * `FROM_INPUT_PARAMS` to update the calendar properties with the values defined in the API request. * `FROM_EXISTING_TABLE` Creates a calendar from the parameters defined in the API request. To update a custom calendar, specify the calendar ID as a path parameter in the request URL and the following parameters in the request body: * Connection ID and Table name * Database and schema name attributes: For most Cloud Data Warehouse (CDW) connectors, both `database_name` and `schema_name` attributes are required. However, the attribute requirements are conditional and vary based on the connector type and its metadata structure. For example, for connectors such as Teradata, MySQL, SingleSore, Amazon Aurora MySQL, Amazon RDS MySQL, Oracle, and GCP_MYSQL, the `schema_name` is required, whereas the `database_name` attribute is not. Similarly, connectors such as ClickHouse require you to specify the `database_name` and the schema specification in such cases is optional. The API allows you to modify the calendar type, month offset value, start and end date, starting day of the week, and prefixes assigned to the year and quarter labels. #### Examples Update a custom calendar using an existing Table in ThoughtSpot: ``` { \"update_method\": \"FROM_EXISTING_TABLE\", \"table_reference\": { \"connection_identifier\": \"Connection1\", \"database_name\": \"db1\", \"table_name\": \"custom_calendar_2025\", \"schame_name\": \"schemaVar\" } } ``` Update a custom calendar with the attributes defined in the API request: ``` { \"update_method\": \"FROM_INPUT_PARAMS\", \"table_reference\": { \"connection_identifier\": \"Connection1\", \"database_name\": \"db1\", \"table_name\": \"custom_calendar_2025\", \"schame_name\": \"schemaVar\" }, \"month_offset\": \"August\", \"start_day_of_week\": \"Monday\", \"start_date\": \"08/01/2025\", \"end_date\": \"07/31/2026\" } ``` + * @param calendarIdentifier Unique Id or name of the calendar. + * @param updateCalendarRequest + */ + public async updateCalendar(calendarIdentifier: string, updateCalendarRequest: UpdateCalendarRequest, _options?: Configuration): Promise { + let _config = _options || this.configuration; + + // verify required parameter 'calendarIdentifier' is not null or undefined + if (calendarIdentifier === null || calendarIdentifier === undefined) { + throw new RequiredError("CustomCalendarsApi", "updateCalendar", "calendarIdentifier"); + } + + + // verify required parameter 'updateCalendarRequest' is not null or undefined + if (updateCalendarRequest === null || updateCalendarRequest === undefined) { + throw new RequiredError("CustomCalendarsApi", "updateCalendar", "updateCalendarRequest"); + } + + + // Path Params + const localVarPath = '/api/rest/2.0/calendars/{calendar_identifier}/update' + .replace('{' + 'calendar_identifier' + '}', encodeURIComponent(String(calendarIdentifier))); + + // Make Request Context + const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.POST); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.25.0") + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.25.0") + + + + + // Body Params + const contentType = ObjectSerializer.getPreferredMediaType([ + "application/json" + ]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = ObjectSerializer.stringify( + ObjectSerializer.serialize(updateCalendarRequest, "UpdateCalendarRequest", ""), + contentType + ); + requestContext.setBody(serializedBody); + + let authMethod: SecurityAuthentication | undefined; + // Apply auth methods + authMethod = _config.authMethods["bearerAuth"] + if (authMethod?.applySecurityAuthentication) { + await authMethod?.applySecurityAuthentication(requestContext); + } + + const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default + if (defaultAuth?.applySecurityAuthentication) { + await defaultAuth?.applySecurityAuthentication(requestContext); + } + + return requestContext; + } + +} + +export class CustomCalendarsApiResponseProcessor { + + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to createCalendar + * @throws ApiException if the response code was not in [200, 299] + */ + public async createCalendar(response: ResponseContext): Promise { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("200", response.httpStatusCode)) { + const body: CalendarResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "CalendarResponse", "" + ) as CalendarResponse; + return body; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Invalid request.", body, response.headers); + } + if (isCodeInRange("401", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Unexpected error", body, response.headers); + } + + // Work around for missing responses in specification, e.g. for petstore.yaml + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body: CalendarResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "CalendarResponse", "" + ) as CalendarResponse; + return body; + } + + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", await response.getBodyAsAny(), response.headers); + } + + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to deleteCalendar + * @throws ApiException if the response code was not in [200, 299] + */ + public async deleteCalendar(response: ResponseContext): Promise { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("204", response.httpStatusCode)) { + return; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Invalid request.", body, response.headers); + } + if (isCodeInRange("401", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Unexpected error", body, response.headers); + } + + // Work around for missing responses in specification, e.g. for petstore.yaml + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body: void = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "void", "" + ) as void; + return body; + } + + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", await response.getBodyAsAny(), response.headers); + } + + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to generateCSV + * @throws ApiException if the response code was not in [200, 299] + */ + public async generateCSV(response: ResponseContext): Promise { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("200", response.httpStatusCode)) { + const body: any = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "any", "" + ) as any; + return body; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Invalid request.", body, response.headers); + } + if (isCodeInRange("401", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Unexpected error", body, response.headers); + } + + // Work around for missing responses in specification, e.g. for petstore.yaml + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body: any = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "any", "" + ) as any; + return body; + } + + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", await response.getBodyAsAny(), response.headers); + } + + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to searchCalendars + * @throws ApiException if the response code was not in [200, 299] + */ + public async searchCalendars(response: ResponseContext): Promise > { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("200", response.httpStatusCode)) { + const body: Array = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "Array", "" + ) as Array; + return body; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Invalid request.", body, response.headers); + } + if (isCodeInRange("401", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Unexpected error", body, response.headers); + } + + // Work around for missing responses in specification, e.g. for petstore.yaml + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body: Array = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "Array", "" + ) as Array; + return body; + } + + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", await response.getBodyAsAny(), response.headers); + } + + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to updateCalendar + * @throws ApiException if the response code was not in [200, 299] + */ + public async updateCalendar(response: ResponseContext): Promise { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("204", response.httpStatusCode)) { + return; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Invalid request.", body, response.headers); + } + if (isCodeInRange("401", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Unexpected error", body, response.headers); + } + + // Work around for missing responses in specification, e.g. for petstore.yaml + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body: void = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "void", "" + ) as void; + return body; + } + + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", await response.getBodyAsAny(), response.headers); + } + +} diff --git a/sdks/typescript/apis/DBTApi.ts b/sdks/typescript/apis/DBTApi.ts new file mode 100644 index 000000000..19d79ae7b --- /dev/null +++ b/sdks/typescript/apis/DBTApi.ts @@ -0,0 +1,862 @@ +// TODO: better import syntax? +import {BaseAPIRequestFactory, RequiredError, COLLECTION_FORMATS} from './baseapi'; +import {Configuration} from '../configuration'; +import {RequestContext, HttpMethod, ResponseContext, HttpFile} from '../http/http'; +import {ObjectSerializer} from '../models/ObjectSerializer'; +import {ApiException} from './exception'; +import {canConsumeForm, isCodeInRange} from '../util'; +import {SecurityAuthentication} from '../auth/auth'; + + +import { DbtSearchResponse } from '../models/DbtSearchResponse'; +import { ErrorResponse } from '../models/ErrorResponse'; + +/** + * no description + */ +export class DBTApiRequestFactory extends BaseAPIRequestFactory { + + /** + * Version: 9.9.0.cl or later Creates a DBT connection object in ThoughtSpot. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege or `DATAMANAGEMENT` (**Can manage data**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the following Data control privileges may be required: - `CAN_MANAGE_CUSTOM_CALENDAR`(**Can manage custom calendars**) - `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) - `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` (**Can manage data models**) #### About create DBT connection DBT connection in ThoughtSpot is used by the user to define DBT credentials for cloud . The API needs embrace connection, embrace database name, DBT url, import type, DBT account identifier, DBT project identifier, DBT access token and environment details (or) embrace connection, embrace database name, import type, file_content to create a connection object. To know more about DBT, see ThoughtSpot Product Documentation. + * @param connectionName Name of the connection. + * @param databaseName Name of the Database. + * @param importType Mention type of Import + * @param accessToken Access token is mandatory when Import_Type is DBT_CLOUD. + * @param dbtUrl DBT URL is mandatory when Import_Type is DBT_CLOUD. + * @param accountId Account ID is mandatory when Import_Type is DBT_CLOUD + * @param projectId Project ID is mandatory when Import_Type is DBT_CLOUD + * @param dbtEnvId DBT Environment ID\\\" + * @param projectName Name of the project + * @param fileContent Upload DBT Manifest and Catalog artifact files as a ZIP file. This field is Mandatory when Import Type is \\\'ZIP_FILE\\\' + */ + public async dbtConnection(connectionName: string, databaseName: string, importType?: string, accessToken?: string, dbtUrl?: string, accountId?: string, projectId?: string, dbtEnvId?: string, projectName?: string, fileContent?: HttpFile, _options?: Configuration): Promise { + let _config = _options || this.configuration; + + // verify required parameter 'connectionName' is not null or undefined + if (connectionName === null || connectionName === undefined) { + throw new RequiredError("DBTApi", "dbtConnection", "connectionName"); + } + + + // verify required parameter 'databaseName' is not null or undefined + if (databaseName === null || databaseName === undefined) { + throw new RequiredError("DBTApi", "dbtConnection", "databaseName"); + } + + + + + + + + + + + // Path Params + const localVarPath = '/api/rest/2.0/dbt/dbt-connection'; + + // Make Request Context + const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.POST); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.25.0") + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.25.0") + + + + // Form Params + const useForm = canConsumeForm([ + 'multipart/form-data', + ]); + + let localVarFormParams + if (useForm) { + localVarFormParams = new FormData(); + } else { + localVarFormParams = new URLSearchParams(); + } + + if (connectionName !== undefined) { + // TODO: replace .append with .set + localVarFormParams.append('connection_name', connectionName as any); + } + if (databaseName !== undefined) { + // TODO: replace .append with .set + localVarFormParams.append('database_name', databaseName as any); + } + if (importType !== undefined) { + // TODO: replace .append with .set + localVarFormParams.append('import_type', importType as any); + } + if (accessToken !== undefined) { + // TODO: replace .append with .set + localVarFormParams.append('access_token', accessToken as any); + } + if (dbtUrl !== undefined) { + // TODO: replace .append with .set + localVarFormParams.append('dbt_url', dbtUrl as any); + } + if (accountId !== undefined) { + // TODO: replace .append with .set + localVarFormParams.append('account_id', accountId as any); + } + if (projectId !== undefined) { + // TODO: replace .append with .set + localVarFormParams.append('project_id', projectId as any); + } + if (dbtEnvId !== undefined) { + // TODO: replace .append with .set + localVarFormParams.append('dbt_env_id', dbtEnvId as any); + } + if (projectName !== undefined) { + // TODO: replace .append with .set + localVarFormParams.append('project_name', projectName as any); + } + if (fileContent !== undefined) { + // TODO: replace .append with .set + if (localVarFormParams instanceof FormData) { + localVarFormParams.append('file_content', fileContent, fileContent.name); + } + } + + requestContext.setBody(localVarFormParams); + + if(!useForm) { + const contentType = ObjectSerializer.getPreferredMediaType([ + "multipart/form-data" + ]); + requestContext.setHeaderParam("Content-Type", contentType); + } + + let authMethod: SecurityAuthentication | undefined; + // Apply auth methods + authMethod = _config.authMethods["bearerAuth"] + if (authMethod?.applySecurityAuthentication) { + await authMethod?.applySecurityAuthentication(requestContext); + } + + const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default + if (defaultAuth?.applySecurityAuthentication) { + await defaultAuth?.applySecurityAuthentication(requestContext); + } + + return requestContext; + } + + /** + * Version: 9.9.0.cl or later Resynchronize the existing list of models, tables, worksheet tml’s and import them to Thoughtspot based on the DBT connection object. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege or `DATAMANAGEMENT` (**Can manage data**) privilege, along with an existing DBT connection. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the following data control privileges may be required: - `CAN_MANAGE_CUSTOM_CALENDAR`(**Can manage custom calendars**) - `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) - `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` (**Can manage data models**) + * @param dbtConnectionIdentifier Unique ID of the DBT connection. + * @param fileContent Upload DBT Manifest and Catalog artifact files as a ZIP file. This field is mandatory if the connection was created with import_type ‘ZIP_FILE’ + */ + public async dbtGenerateSyncTml(dbtConnectionIdentifier: string, fileContent?: HttpFile, _options?: Configuration): Promise { + let _config = _options || this.configuration; + + // verify required parameter 'dbtConnectionIdentifier' is not null or undefined + if (dbtConnectionIdentifier === null || dbtConnectionIdentifier === undefined) { + throw new RequiredError("DBTApi", "dbtGenerateSyncTml", "dbtConnectionIdentifier"); + } + + + + // Path Params + const localVarPath = '/api/rest/2.0/dbt/generate-sync-tml'; + + // Make Request Context + const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.POST); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.25.0") + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.25.0") + + + + // Form Params + const useForm = canConsumeForm([ + 'multipart/form-data', + ]); + + let localVarFormParams + if (useForm) { + localVarFormParams = new FormData(); + } else { + localVarFormParams = new URLSearchParams(); + } + + if (dbtConnectionIdentifier !== undefined) { + // TODO: replace .append with .set + localVarFormParams.append('dbt_connection_identifier', dbtConnectionIdentifier as any); + } + if (fileContent !== undefined) { + // TODO: replace .append with .set + if (localVarFormParams instanceof FormData) { + localVarFormParams.append('file_content', fileContent, fileContent.name); + } + } + + requestContext.setBody(localVarFormParams); + + if(!useForm) { + const contentType = ObjectSerializer.getPreferredMediaType([ + "multipart/form-data" + ]); + requestContext.setHeaderParam("Content-Type", contentType); + } + + let authMethod: SecurityAuthentication | undefined; + // Apply auth methods + authMethod = _config.authMethods["bearerAuth"] + if (authMethod?.applySecurityAuthentication) { + await authMethod?.applySecurityAuthentication(requestContext); + } + + const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default + if (defaultAuth?.applySecurityAuthentication) { + await defaultAuth?.applySecurityAuthentication(requestContext); + } + + return requestContext; + } + + /** + * Version: 9.9.0.cl or later Generate required table and worksheet and import them. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege or `DATAMANAGEMENT` (**Can manage data**) privilege, along with an existing DBT connection. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the following data control privileges may be required: - `CAN_MANAGE_CUSTOM_CALENDAR`(**Can manage custom calendars**) - `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) - `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` (**Can manage data models**) #### About generate TML Models and Worksheets to be imported can be selected by the user as part of the API. + * @param dbtConnectionIdentifier Unique ID of the DBT connection. + * @param modelTables List of Models and their respective Tables Example: \\\'[{\\\"model_name\\\": \\\"model_name\\\", \\\"tables\\\": [\\\"table_name\\\"]}]\\\' + * @param importWorksheets Mention the worksheet tmls to import + * @param worksheets List of worksheets is mandatory when import_Worksheets is type SELECTED Example: [\\\"worksheet_name\\\"] + * @param fileContent Upload DBT Manifest and Catalog artifact files as a ZIP file. This field is mandatory if the connection was created with import_type ‘ZIP_FILE’ + */ + public async dbtGenerateTml(dbtConnectionIdentifier: string, modelTables: string, importWorksheets: string, worksheets?: string, fileContent?: HttpFile, _options?: Configuration): Promise { + let _config = _options || this.configuration; + + // verify required parameter 'dbtConnectionIdentifier' is not null or undefined + if (dbtConnectionIdentifier === null || dbtConnectionIdentifier === undefined) { + throw new RequiredError("DBTApi", "dbtGenerateTml", "dbtConnectionIdentifier"); + } + + + // verify required parameter 'modelTables' is not null or undefined + if (modelTables === null || modelTables === undefined) { + throw new RequiredError("DBTApi", "dbtGenerateTml", "modelTables"); + } + + + // verify required parameter 'importWorksheets' is not null or undefined + if (importWorksheets === null || importWorksheets === undefined) { + throw new RequiredError("DBTApi", "dbtGenerateTml", "importWorksheets"); + } + + + + + // Path Params + const localVarPath = '/api/rest/2.0/dbt/generate-tml'; + + // Make Request Context + const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.POST); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.25.0") + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.25.0") + + + + // Form Params + const useForm = canConsumeForm([ + 'multipart/form-data', + ]); + + let localVarFormParams + if (useForm) { + localVarFormParams = new FormData(); + } else { + localVarFormParams = new URLSearchParams(); + } + + if (dbtConnectionIdentifier !== undefined) { + // TODO: replace .append with .set + localVarFormParams.append('dbt_connection_identifier', dbtConnectionIdentifier as any); + } + if (modelTables !== undefined) { + // TODO: replace .append with .set + localVarFormParams.append('model_tables', modelTables as any); + } + if (importWorksheets !== undefined) { + // TODO: replace .append with .set + localVarFormParams.append('import_worksheets', importWorksheets as any); + } + if (worksheets !== undefined) { + // TODO: replace .append with .set + localVarFormParams.append('worksheets', worksheets as any); + } + if (fileContent !== undefined) { + // TODO: replace .append with .set + if (localVarFormParams instanceof FormData) { + localVarFormParams.append('file_content', fileContent, fileContent.name); + } + } + + requestContext.setBody(localVarFormParams); + + if(!useForm) { + const contentType = ObjectSerializer.getPreferredMediaType([ + "multipart/form-data" + ]); + requestContext.setHeaderParam("Content-Type", contentType); + } + + let authMethod: SecurityAuthentication | undefined; + // Apply auth methods + authMethod = _config.authMethods["bearerAuth"] + if (authMethod?.applySecurityAuthentication) { + await authMethod?.applySecurityAuthentication(requestContext); + } + + const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default + if (defaultAuth?.applySecurityAuthentication) { + await defaultAuth?.applySecurityAuthentication(requestContext); + } + + return requestContext; + } + + /** + * Version: 9.9.0.cl or later Gets a list of DBT connection objects by user and organization, available on the ThoughtSpot system. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege or `DATAMANAGEMENT` (**Can manage data**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the following Data control privileges may be required: - `CAN_MANAGE_CUSTOM_CALENDAR`(**Can manage custom calendars**) - `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) - `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` (**Can manage data models**) #### About search DBT connection To get details of a specific DBT connection identifier, database connection identifier, database connection name, database name, project name, project identifier, environment identifier , import type and author. + */ + public async dbtSearch(_options?: Configuration): Promise { + let _config = _options || this.configuration; + + // Path Params + const localVarPath = '/api/rest/2.0/dbt/search'; + + // Make Request Context + const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.POST); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.25.0") + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.25.0") + + + + + let authMethod: SecurityAuthentication | undefined; + // Apply auth methods + authMethod = _config.authMethods["bearerAuth"] + if (authMethod?.applySecurityAuthentication) { + await authMethod?.applySecurityAuthentication(requestContext); + } + + const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default + if (defaultAuth?.applySecurityAuthentication) { + await defaultAuth?.applySecurityAuthentication(requestContext); + } + + return requestContext; + } + + /** + * Version: 9.9.0.cl or later Removes the specified DBT connection object from the ThoughtSpot system. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) or `DATAMANAGEMENT` (**Can manage data ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the following Data control privileges may be required: - `CAN_MANAGE_CUSTOM_CALENDAR`(**Can manage custom calendars**) - `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) - `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` (**Can manage data models**) + * @param dbtConnectionIdentifier Unique ID of the DBT Connection. + */ + public async deleteDbtConnection(dbtConnectionIdentifier: string, _options?: Configuration): Promise { + let _config = _options || this.configuration; + + // verify required parameter 'dbtConnectionIdentifier' is not null or undefined + if (dbtConnectionIdentifier === null || dbtConnectionIdentifier === undefined) { + throw new RequiredError("DBTApi", "deleteDbtConnection", "dbtConnectionIdentifier"); + } + + + // Path Params + const localVarPath = '/api/rest/2.0/dbt/{dbt_connection_identifier}/delete' + .replace('{' + 'dbt_connection_identifier' + '}', encodeURIComponent(String(dbtConnectionIdentifier))); + + // Make Request Context + const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.POST); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.25.0") + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.25.0") + + + + + let authMethod: SecurityAuthentication | undefined; + // Apply auth methods + authMethod = _config.authMethods["bearerAuth"] + if (authMethod?.applySecurityAuthentication) { + await authMethod?.applySecurityAuthentication(requestContext); + } + + const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default + if (defaultAuth?.applySecurityAuthentication) { + await defaultAuth?.applySecurityAuthentication(requestContext); + } + + return requestContext; + } + + /** + * Version: 9.9.0.cl or later Updates a DBT connection object. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege or `DATAMANAGEMENT` (**Can manage data ThoughtSpot**) privilege, along with an existing DBT connection. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the following data control privileges may be required: - `CAN_MANAGE_CUSTOM_CALENDAR`(**Can manage custom calendars**) - `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) - `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` (**Can manage data models**) #### About update DBT connection You can modify DBT connection object properties such as embrace connection name, embrace database name, import type, account identifier, access token, project identifier and environment (or) embrace connection, embrace database name, import type, file_content settings. + * @param dbtConnectionIdentifier Unique ID of the DBT Connection. + * @param connectionName Name of the connection. + * @param databaseName Name of the Database. + * @param importType Mention type of Import + * @param accessToken Access token is mandatory when Import_Type is DBT_CLOUD. + * @param dbtUrl DBT URL is mandatory when Import_Type is DBT_CLOUD. + * @param accountId Account ID is mandatory when Import_Type is DBT_CLOUD + * @param projectId Project ID is mandatory when Import_Type is DBT_CLOUD + * @param dbtEnvId DBT Environment ID\\\" + * @param projectName Name of the project + * @param fileContent Upload DBT Manifest and Catalog artifact files as a ZIP file. This field is Mandatory when Import Type is \\\'ZIP_FILE\\\' + */ + public async updateDbtConnection(dbtConnectionIdentifier: string, connectionName?: string, databaseName?: string, importType?: string, accessToken?: string, dbtUrl?: string, accountId?: string, projectId?: string, dbtEnvId?: string, projectName?: string, fileContent?: HttpFile, _options?: Configuration): Promise { + let _config = _options || this.configuration; + + // verify required parameter 'dbtConnectionIdentifier' is not null or undefined + if (dbtConnectionIdentifier === null || dbtConnectionIdentifier === undefined) { + throw new RequiredError("DBTApi", "updateDbtConnection", "dbtConnectionIdentifier"); + } + + + + + + + + + + + + + // Path Params + const localVarPath = '/api/rest/2.0/dbt/update-dbt-connection'; + + // Make Request Context + const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.POST); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.25.0") + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.25.0") + + + + // Form Params + const useForm = canConsumeForm([ + 'multipart/form-data', + ]); + + let localVarFormParams + if (useForm) { + localVarFormParams = new FormData(); + } else { + localVarFormParams = new URLSearchParams(); + } + + if (dbtConnectionIdentifier !== undefined) { + // TODO: replace .append with .set + localVarFormParams.append('dbt_connection_identifier', dbtConnectionIdentifier as any); + } + if (connectionName !== undefined) { + // TODO: replace .append with .set + localVarFormParams.append('connection_name', connectionName as any); + } + if (databaseName !== undefined) { + // TODO: replace .append with .set + localVarFormParams.append('database_name', databaseName as any); + } + if (importType !== undefined) { + // TODO: replace .append with .set + localVarFormParams.append('import_type', importType as any); + } + if (accessToken !== undefined) { + // TODO: replace .append with .set + localVarFormParams.append('access_token', accessToken as any); + } + if (dbtUrl !== undefined) { + // TODO: replace .append with .set + localVarFormParams.append('dbt_url', dbtUrl as any); + } + if (accountId !== undefined) { + // TODO: replace .append with .set + localVarFormParams.append('account_id', accountId as any); + } + if (projectId !== undefined) { + // TODO: replace .append with .set + localVarFormParams.append('project_id', projectId as any); + } + if (dbtEnvId !== undefined) { + // TODO: replace .append with .set + localVarFormParams.append('dbt_env_id', dbtEnvId as any); + } + if (projectName !== undefined) { + // TODO: replace .append with .set + localVarFormParams.append('project_name', projectName as any); + } + if (fileContent !== undefined) { + // TODO: replace .append with .set + if (localVarFormParams instanceof FormData) { + localVarFormParams.append('file_content', fileContent, fileContent.name); + } + } + + requestContext.setBody(localVarFormParams); + + if(!useForm) { + const contentType = ObjectSerializer.getPreferredMediaType([ + "multipart/form-data" + ]); + requestContext.setHeaderParam("Content-Type", contentType); + } + + let authMethod: SecurityAuthentication | undefined; + // Apply auth methods + authMethod = _config.authMethods["bearerAuth"] + if (authMethod?.applySecurityAuthentication) { + await authMethod?.applySecurityAuthentication(requestContext); + } + + const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default + if (defaultAuth?.applySecurityAuthentication) { + await defaultAuth?.applySecurityAuthentication(requestContext); + } + + return requestContext; + } + +} + +export class DBTApiResponseProcessor { + + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to dbtConnection + * @throws ApiException if the response code was not in [200, 299] + */ + public async dbtConnection(response: ResponseContext): Promise { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("200", response.httpStatusCode)) { + const body: any = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "any", "" + ) as any; + return body; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Invalid request.", body, response.headers); + } + if (isCodeInRange("401", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Unexpected error", body, response.headers); + } + + // Work around for missing responses in specification, e.g. for petstore.yaml + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body: any = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "any", "" + ) as any; + return body; + } + + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", await response.getBodyAsAny(), response.headers); + } + + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to dbtGenerateSyncTml + * @throws ApiException if the response code was not in [200, 299] + */ + public async dbtGenerateSyncTml(response: ResponseContext): Promise { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("200", response.httpStatusCode)) { + const body: any = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "any", "" + ) as any; + return body; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Invalid request.", body, response.headers); + } + if (isCodeInRange("401", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Unexpected error", body, response.headers); + } + + // Work around for missing responses in specification, e.g. for petstore.yaml + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body: any = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "any", "" + ) as any; + return body; + } + + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", await response.getBodyAsAny(), response.headers); + } + + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to dbtGenerateTml + * @throws ApiException if the response code was not in [200, 299] + */ + public async dbtGenerateTml(response: ResponseContext): Promise { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("200", response.httpStatusCode)) { + const body: any = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "any", "" + ) as any; + return body; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Invalid request.", body, response.headers); + } + if (isCodeInRange("401", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Unexpected error", body, response.headers); + } + + // Work around for missing responses in specification, e.g. for petstore.yaml + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body: any = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "any", "" + ) as any; + return body; + } + + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", await response.getBodyAsAny(), response.headers); + } + + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to dbtSearch + * @throws ApiException if the response code was not in [200, 299] + */ + public async dbtSearch(response: ResponseContext): Promise > { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("200", response.httpStatusCode)) { + const body: Array = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "Array", "" + ) as Array; + return body; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Invalid request.", body, response.headers); + } + if (isCodeInRange("401", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Unexpected error", body, response.headers); + } + + // Work around for missing responses in specification, e.g. for petstore.yaml + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body: Array = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "Array", "" + ) as Array; + return body; + } + + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", await response.getBodyAsAny(), response.headers); + } + + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to deleteDbtConnection + * @throws ApiException if the response code was not in [200, 299] + */ + public async deleteDbtConnection(response: ResponseContext): Promise { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("204", response.httpStatusCode)) { + return; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Invalid request.", body, response.headers); + } + if (isCodeInRange("401", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Unexpected error", body, response.headers); + } + + // Work around for missing responses in specification, e.g. for petstore.yaml + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body: void = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "void", "" + ) as void; + return body; + } + + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", await response.getBodyAsAny(), response.headers); + } + + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to updateDbtConnection + * @throws ApiException if the response code was not in [200, 299] + */ + public async updateDbtConnection(response: ResponseContext): Promise { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("200", response.httpStatusCode)) { + const body: any = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "any", "" + ) as any; + return body; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Invalid request.", body, response.headers); + } + if (isCodeInRange("401", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Unexpected error", body, response.headers); + } + + // Work around for missing responses in specification, e.g. for petstore.yaml + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body: any = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "any", "" + ) as any; + return body; + } + + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", await response.getBodyAsAny(), response.headers); + } + +} diff --git a/sdks/typescript/apis/DataApi.ts b/sdks/typescript/apis/DataApi.ts new file mode 100644 index 000000000..09586104f --- /dev/null +++ b/sdks/typescript/apis/DataApi.ts @@ -0,0 +1,352 @@ +// TODO: better import syntax? +import {BaseAPIRequestFactory, RequiredError, COLLECTION_FORMATS} from './baseapi'; +import {Configuration} from '../configuration'; +import {RequestContext, HttpMethod, ResponseContext, HttpFile} from '../http/http'; +import {ObjectSerializer} from '../models/ObjectSerializer'; +import {ApiException} from './exception'; +import {canConsumeForm, isCodeInRange} from '../util'; +import {SecurityAuthentication} from '../auth/auth'; + + +import { AnswerDataResponse } from '../models/AnswerDataResponse'; +import { ErrorResponse } from '../models/ErrorResponse'; +import { FetchAnswerDataRequest } from '../models/FetchAnswerDataRequest'; +import { FetchLiveboardDataRequest } from '../models/FetchLiveboardDataRequest'; +import { LiveboardDataResponse } from '../models/LiveboardDataResponse'; +import { SearchDataRequest } from '../models/SearchDataRequest'; +import { SearchDataResponse } from '../models/SearchDataResponse'; + +/** + * no description + */ +export class DataApiRequestFactory extends BaseAPIRequestFactory { + + /** + * Version: 9.0.0.cl or later Fetches data from a saved Answer. Requires at least view access to the saved Answer. The `record_size` attribute determines the number of records to retrieve in an API call. For more information about pagination, record size, and maximum row limit, see [Pagination and record size settings](https://developers.thoughtspot.com/docs/fetch-data-and-report-apis#_pagination_settings_for_data_and_report_apis). + * @param fetchAnswerDataRequest + */ + public async fetchAnswerData(fetchAnswerDataRequest: FetchAnswerDataRequest, _options?: Configuration): Promise { + let _config = _options || this.configuration; + + // verify required parameter 'fetchAnswerDataRequest' is not null or undefined + if (fetchAnswerDataRequest === null || fetchAnswerDataRequest === undefined) { + throw new RequiredError("DataApi", "fetchAnswerData", "fetchAnswerDataRequest"); + } + + + // Path Params + const localVarPath = '/api/rest/2.0/metadata/answer/data'; + + // Make Request Context + const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.POST); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.25.0") + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.25.0") + + + + + // Body Params + const contentType = ObjectSerializer.getPreferredMediaType([ + "application/json" + ]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = ObjectSerializer.stringify( + ObjectSerializer.serialize(fetchAnswerDataRequest, "FetchAnswerDataRequest", ""), + contentType + ); + requestContext.setBody(serializedBody); + + let authMethod: SecurityAuthentication | undefined; + // Apply auth methods + authMethod = _config.authMethods["bearerAuth"] + if (authMethod?.applySecurityAuthentication) { + await authMethod?.applySecurityAuthentication(requestContext); + } + + const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default + if (defaultAuth?.applySecurityAuthentication) { + await defaultAuth?.applySecurityAuthentication(requestContext); + } + + return requestContext; + } + + /** + * Version: 9.0.0.cl or later Gets data from a Liveboard object and its visualization. Requires at least view access to the Liveboard. #### Usage guidelines In the request body, specify the GUID or name of the Liveboard. To get data for specific visualizations, add the GUIDs or names of the visualizations in the API request. To include unsaved changes in the report, pass the `transient_pinboard_content` script generated from the `getExportRequestForCurrentPinboard` method in the Visual Embed SDK. Upon successful execution, the API returns the report with unsaved changes. If the new Liveboard experience mode, the transient content includes ad hoc changes to visualizations such as sorting, toggling of legends, and data drill down. For more information, and see [Liveboard data API](https://developers.thoughtspot.com/docs/fetch-data-and-report-apis#_fetch_liveboard_data_api). + * @param fetchLiveboardDataRequest + */ + public async fetchLiveboardData(fetchLiveboardDataRequest: FetchLiveboardDataRequest, _options?: Configuration): Promise { + let _config = _options || this.configuration; + + // verify required parameter 'fetchLiveboardDataRequest' is not null or undefined + if (fetchLiveboardDataRequest === null || fetchLiveboardDataRequest === undefined) { + throw new RequiredError("DataApi", "fetchLiveboardData", "fetchLiveboardDataRequest"); + } + + + // Path Params + const localVarPath = '/api/rest/2.0/metadata/liveboard/data'; + + // Make Request Context + const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.POST); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.25.0") + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.25.0") + + + + + // Body Params + const contentType = ObjectSerializer.getPreferredMediaType([ + "application/json" + ]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = ObjectSerializer.stringify( + ObjectSerializer.serialize(fetchLiveboardDataRequest, "FetchLiveboardDataRequest", ""), + contentType + ); + requestContext.setBody(serializedBody); + + let authMethod: SecurityAuthentication | undefined; + // Apply auth methods + authMethod = _config.authMethods["bearerAuth"] + if (authMethod?.applySecurityAuthentication) { + await authMethod?.applySecurityAuthentication(requestContext); + } + + const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default + if (defaultAuth?.applySecurityAuthentication) { + await defaultAuth?.applySecurityAuthentication(requestContext); + } + + return requestContext; + } + + /** + * Version: 9.0.0.cl or later Generates an Answer from a given data source. Requires at least view access to the data source object (Worksheet or View). #### Usage guidelines To search data, specify the data source GUID in `logical_table_identifier`. The data source can be a Worksheet, View, Table, or SQL view. Pass search tokens in the `query_string` attribute in the API request as shown in the following example: ``` { \"query_string\": \"[sales] by [store]\", \"logical_table_identifier\": \"cd252e5c-b552-49a8-821d-3eadaa049cca\", } ``` For more information about the `query_string` format and data source attribute, see [Search data API](https://developers.thoughtspot.com/docs/fetch-data-and-report-apis#_search_data_api). The `record_size` attribute determines the number of records to retrieve in an API call. For more information about pagination, record size, and maximum row limit, see [Pagination and record size settings](https://developers.thoughtspot.com/docs/fetch-data-and-report-apis#_pagination_settings_for_data_and_report_api). + * @param searchDataRequest + */ + public async searchData(searchDataRequest: SearchDataRequest, _options?: Configuration): Promise { + let _config = _options || this.configuration; + + // verify required parameter 'searchDataRequest' is not null or undefined + if (searchDataRequest === null || searchDataRequest === undefined) { + throw new RequiredError("DataApi", "searchData", "searchDataRequest"); + } + + + // Path Params + const localVarPath = '/api/rest/2.0/searchdata'; + + // Make Request Context + const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.POST); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.25.0") + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.25.0") + + + + + // Body Params + const contentType = ObjectSerializer.getPreferredMediaType([ + "application/json" + ]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = ObjectSerializer.stringify( + ObjectSerializer.serialize(searchDataRequest, "SearchDataRequest", ""), + contentType + ); + requestContext.setBody(serializedBody); + + let authMethod: SecurityAuthentication | undefined; + // Apply auth methods + authMethod = _config.authMethods["bearerAuth"] + if (authMethod?.applySecurityAuthentication) { + await authMethod?.applySecurityAuthentication(requestContext); + } + + const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default + if (defaultAuth?.applySecurityAuthentication) { + await defaultAuth?.applySecurityAuthentication(requestContext); + } + + return requestContext; + } + +} + +export class DataApiResponseProcessor { + + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to fetchAnswerData + * @throws ApiException if the response code was not in [200, 299] + */ + public async fetchAnswerData(response: ResponseContext): Promise { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("200", response.httpStatusCode)) { + const body: AnswerDataResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "AnswerDataResponse", "" + ) as AnswerDataResponse; + return body; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Invalid request.", body, response.headers); + } + if (isCodeInRange("401", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Unexpected error", body, response.headers); + } + + // Work around for missing responses in specification, e.g. for petstore.yaml + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body: AnswerDataResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "AnswerDataResponse", "" + ) as AnswerDataResponse; + return body; + } + + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", await response.getBodyAsAny(), response.headers); + } + + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to fetchLiveboardData + * @throws ApiException if the response code was not in [200, 299] + */ + public async fetchLiveboardData(response: ResponseContext): Promise { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("200", response.httpStatusCode)) { + const body: LiveboardDataResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "LiveboardDataResponse", "" + ) as LiveboardDataResponse; + return body; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Invalid request.", body, response.headers); + } + if (isCodeInRange("401", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Unexpected error", body, response.headers); + } + + // Work around for missing responses in specification, e.g. for petstore.yaml + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body: LiveboardDataResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "LiveboardDataResponse", "" + ) as LiveboardDataResponse; + return body; + } + + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", await response.getBodyAsAny(), response.headers); + } + + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to searchData + * @throws ApiException if the response code was not in [200, 299] + */ + public async searchData(response: ResponseContext): Promise { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("200", response.httpStatusCode)) { + const body: SearchDataResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "SearchDataResponse", "" + ) as SearchDataResponse; + return body; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Invalid request.", body, response.headers); + } + if (isCodeInRange("401", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Unexpected error", body, response.headers); + } + + // Work around for missing responses in specification, e.g. for petstore.yaml + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body: SearchDataResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "SearchDataResponse", "" + ) as SearchDataResponse; + return body; + } + + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", await response.getBodyAsAny(), response.headers); + } + +} diff --git a/sdks/typescript/apis/EmailCustomizationApi.ts b/sdks/typescript/apis/EmailCustomizationApi.ts new file mode 100644 index 000000000..0a9cf70ad --- /dev/null +++ b/sdks/typescript/apis/EmailCustomizationApi.ts @@ -0,0 +1,603 @@ +// TODO: better import syntax? +import {BaseAPIRequestFactory, RequiredError, COLLECTION_FORMATS} from './baseapi'; +import {Configuration} from '../configuration'; +import {RequestContext, HttpMethod, ResponseContext, HttpFile} from '../http/http'; +import {ObjectSerializer} from '../models/ObjectSerializer'; +import {ApiException} from './exception'; +import {canConsumeForm, isCodeInRange} from '../util'; +import {SecurityAuthentication} from '../auth/auth'; + + +import { CreateEmailCustomizationRequest } from '../models/CreateEmailCustomizationRequest'; +import { CreateEmailCustomizationResponse } from '../models/CreateEmailCustomizationResponse'; +import { DeleteOrgEmailCustomizationRequest } from '../models/DeleteOrgEmailCustomizationRequest'; +import { ErrorResponse } from '../models/ErrorResponse'; +import { SearchEmailCustomizationRequest } from '../models/SearchEmailCustomizationRequest'; +import { UpdateEmailCustomizationRequest } from '../models/UpdateEmailCustomizationRequest'; + +/** + * no description + */ +export class EmailCustomizationApiRequestFactory extends BaseAPIRequestFactory { + + /** + * Version: 10.10.0.cl or later Creates a customization configuration for the notification email. #### Pre-requisites Requires `DEVELOPER` (**has developer privilege**) or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `DEVELOPER` (**Has developer privilege**) privilege is required. **NOTE**:This endpoint in currently in beta. Contact ThoughtSpot support to enable this on your instance. #### Usage guidelines To create a custom configuration pass these parameters in your API request: - A JSON map of configuration attributes `template_properties`. The following example shows a sample set of customization configuration: ``` { { \"cta_button_bg_color\": \"#444DEA\", \"cta_text_font_color\": \"#FFFFFF\", \"primary_bg_color\": \"#D3DEF0\", \"logo_url\": \"https://storage.pardot.com/710713/1642089901EbkRibJq/TS_fullworkmark_darkmode.png\", \"font_family\": \"\", \"product_name\": \"ThoughtSpot\", \"footer_address\": \"444 Castro St, Suite 1000 Mountain View, CA 94041\", \"footer_phone\": \"(800) 508-7008\", \"replacement_value_for_liveboard\": \"Dashboard\", \"replacement_value_for_answer\": \"Chart\", \"replacement_value_for_spot_iq\": \"AI Insights\", \"hide_footer_phone\": false, \"hide_footer_address\": false, \"hide_product_name\": false, \"hide_manage_notification\": false, \"hide_mobile_app_nudge\": false, \"hide_privacy_policy\": false, \"hide_ts_vocabulary_definitions\": false, \"hide_error_message\": false, \"hide_unsubscribe_link\": false, \"hide_notification_status\": false, \"hide_modify_alert\": false, \"company_website_url\": \"https://your-website.com/\", \"company_privacy_policy_url\" : \"https://link-to-privacy-policy.com/\", \"contact_support_url\": \"https://link-to-contact-support.com/\", \"hide_contact_support_url\": false, \"hide_logo_url\" : false } } ``` + * @param createEmailCustomizationRequest + */ + public async createEmailCustomization(createEmailCustomizationRequest: CreateEmailCustomizationRequest, _options?: Configuration): Promise { + let _config = _options || this.configuration; + + // verify required parameter 'createEmailCustomizationRequest' is not null or undefined + if (createEmailCustomizationRequest === null || createEmailCustomizationRequest === undefined) { + throw new RequiredError("EmailCustomizationApi", "createEmailCustomization", "createEmailCustomizationRequest"); + } + + + // Path Params + const localVarPath = '/api/rest/2.0/customization/email'; + + // Make Request Context + const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.POST); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.25.0") + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.25.0") + + + + + // Body Params + const contentType = ObjectSerializer.getPreferredMediaType([ + "application/json" + ]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = ObjectSerializer.stringify( + ObjectSerializer.serialize(createEmailCustomizationRequest, "CreateEmailCustomizationRequest", ""), + contentType + ); + requestContext.setBody(serializedBody); + + let authMethod: SecurityAuthentication | undefined; + // Apply auth methods + authMethod = _config.authMethods["bearerAuth"] + if (authMethod?.applySecurityAuthentication) { + await authMethod?.applySecurityAuthentication(requestContext); + } + + const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default + if (defaultAuth?.applySecurityAuthentication) { + await defaultAuth?.applySecurityAuthentication(requestContext); + } + + return requestContext; + } + + /** + * Version: 10.10.0.cl or later Deletes the configuration for the email customization. #### Pre-requisites Requires `DEVELOPER` (**has developer privilege**) or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `DEVELOPER` (**Has developer privilege**) privilege is required. **NOTE**:This endpoint in currently in beta. Contact ThoughtSpot support to enable this on your instance. #### Usage guidelines - Call the search API endpoint to get the `template_identifier` from the response. - Use that `template_identifier` as a parameter in this API request. + * @param templateIdentifier Unique ID or name of the email customization. + */ + public async deleteEmailCustomization(templateIdentifier: string, _options?: Configuration): Promise { + let _config = _options || this.configuration; + + // verify required parameter 'templateIdentifier' is not null or undefined + if (templateIdentifier === null || templateIdentifier === undefined) { + throw new RequiredError("EmailCustomizationApi", "deleteEmailCustomization", "templateIdentifier"); + } + + + // Path Params + const localVarPath = '/api/rest/2.0/customization/email/{template_identifier}/delete' + .replace('{' + 'template_identifier' + '}', encodeURIComponent(String(templateIdentifier))); + + // Make Request Context + const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.POST); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.25.0") + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.25.0") + + + + + let authMethod: SecurityAuthentication | undefined; + // Apply auth methods + authMethod = _config.authMethods["bearerAuth"] + if (authMethod?.applySecurityAuthentication) { + await authMethod?.applySecurityAuthentication(requestContext); + } + + const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default + if (defaultAuth?.applySecurityAuthentication) { + await defaultAuth?.applySecurityAuthentication(requestContext); + } + + return requestContext; + } + + /** + * Version: 10.12.0.cl or later Deletes the configuration for the email customization. #### Pre-requisites Requires `DEVELOPER` (**has developer privilege**) or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `DEVELOPER` (**Has developer privilege**) privilege is required. **NOTE**:This endpoint in currently in beta. Contact ThoughtSpot support to enable this on your instance. #### Usage guidelines - Call the search API endpoint to get the `org_identifier` from the response. - Use that `org_identifier` as a parameter in this API request. + * @param deleteOrgEmailCustomizationRequest + */ + public async deleteOrgEmailCustomization(deleteOrgEmailCustomizationRequest: DeleteOrgEmailCustomizationRequest, _options?: Configuration): Promise { + let _config = _options || this.configuration; + + // verify required parameter 'deleteOrgEmailCustomizationRequest' is not null or undefined + if (deleteOrgEmailCustomizationRequest === null || deleteOrgEmailCustomizationRequest === undefined) { + throw new RequiredError("EmailCustomizationApi", "deleteOrgEmailCustomization", "deleteOrgEmailCustomizationRequest"); + } + + + // Path Params + const localVarPath = '/api/rest/2.0/customization/email/delete'; + + // Make Request Context + const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.POST); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.25.0") + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.25.0") + + + + + // Body Params + const contentType = ObjectSerializer.getPreferredMediaType([ + "application/json" + ]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = ObjectSerializer.stringify( + ObjectSerializer.serialize(deleteOrgEmailCustomizationRequest, "DeleteOrgEmailCustomizationRequest", ""), + contentType + ); + requestContext.setBody(serializedBody); + + let authMethod: SecurityAuthentication | undefined; + // Apply auth methods + authMethod = _config.authMethods["bearerAuth"] + if (authMethod?.applySecurityAuthentication) { + await authMethod?.applySecurityAuthentication(requestContext); + } + + const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default + if (defaultAuth?.applySecurityAuthentication) { + await defaultAuth?.applySecurityAuthentication(requestContext); + } + + return requestContext; + } + + /** + * Version: 10.10.0.cl or later Search the email customization configuration if any set for the ThoughtSpot system. #### Pre-requisites Requires `DEVELOPER` (**has developer privilege**) or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `DEVELOPER` (**Has developer privilege**) privilege is required. **NOTE**:This endpoint in currently in beta. Contact ThoughtSpot support to enable this on your instance. + * @param searchEmailCustomizationRequest + */ + public async searchEmailCustomization(searchEmailCustomizationRequest: SearchEmailCustomizationRequest, _options?: Configuration): Promise { + let _config = _options || this.configuration; + + // verify required parameter 'searchEmailCustomizationRequest' is not null or undefined + if (searchEmailCustomizationRequest === null || searchEmailCustomizationRequest === undefined) { + throw new RequiredError("EmailCustomizationApi", "searchEmailCustomization", "searchEmailCustomizationRequest"); + } + + + // Path Params + const localVarPath = '/api/rest/2.0/customization/email/search'; + + // Make Request Context + const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.POST); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.25.0") + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.25.0") + + + + + // Body Params + const contentType = ObjectSerializer.getPreferredMediaType([ + "application/json" + ]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = ObjectSerializer.stringify( + ObjectSerializer.serialize(searchEmailCustomizationRequest, "SearchEmailCustomizationRequest", ""), + contentType + ); + requestContext.setBody(serializedBody); + + let authMethod: SecurityAuthentication | undefined; + // Apply auth methods + authMethod = _config.authMethods["bearerAuth"] + if (authMethod?.applySecurityAuthentication) { + await authMethod?.applySecurityAuthentication(requestContext); + } + + const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default + if (defaultAuth?.applySecurityAuthentication) { + await defaultAuth?.applySecurityAuthentication(requestContext); + } + + return requestContext; + } + + /** + * Version: 10.12.0.cl or later Updates a customization configuration for the notification email. #### Pre-requisites Requires `DEVELOPER` (**has developer privilege**) or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `DEVELOPER` (**Has developer privilege**) privilege is required. **NOTE**:This endpoint in currently in beta. Contact ThoughtSpot support to enable this on your instance. #### Usage guidelines To update a custom configuration pass these parameters in your API request: - A JSON map of configuration attributes `template_properties`. The following example shows a sample set of customization configuration: ``` { { \"cta_button_bg_color\": \"#444DEA\", \"cta_text_font_color\": \"#FFFFFF\", \"primary_bg_color\": \"#D3DEF0\", \"logo_url\": \"https://storage.pardot.com/710713/1642089901EbkRibJq/TS_fullworkmark_darkmode.png\", \"font_family\": \"\", \"product_name\": \"ThoughtSpot\", \"footer_address\": \"444 Castro St, Suite 1000 Mountain View, CA 94041\", \"footer_phone\": \"(800) 508-7008\", \"replacement_value_for_liveboard\": \"Dashboard\", \"replacement_value_for_answer\": \"Chart\", \"replacement_value_for_spot_iq\": \"AI Insights\", \"hide_footer_phone\": false, \"hide_footer_address\": false, \"hide_product_name\": false, \"hide_manage_notification\": false, \"hide_mobile_app_nudge\": false, \"hide_privacy_policy\": false, \"hide_ts_vocabulary_definitions\": false, \"hide_error_message\": false, \"hide_unsubscribe_link\": false, \"hide_notification_status\": false, \"hide_modify_alert\": false, \"company_website_url\": \"https://your-website.com/\", \"company_privacy_policy_url\" : \"https://link-to-privacy-policy.com/\", \"contact_support_url\": \"https://link-to-contact-support.com/\", \"hide_contact_support_url\": false, \"hide_logo_url\" : false } } ``` + * @param updateEmailCustomizationRequest + */ + public async updateEmailCustomization(updateEmailCustomizationRequest: UpdateEmailCustomizationRequest, _options?: Configuration): Promise { + let _config = _options || this.configuration; + + // verify required parameter 'updateEmailCustomizationRequest' is not null or undefined + if (updateEmailCustomizationRequest === null || updateEmailCustomizationRequest === undefined) { + throw new RequiredError("EmailCustomizationApi", "updateEmailCustomization", "updateEmailCustomizationRequest"); + } + + + // Path Params + const localVarPath = '/api/rest/2.0/customization/email/update'; + + // Make Request Context + const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.POST); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.25.0") + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.25.0") + + + + + // Body Params + const contentType = ObjectSerializer.getPreferredMediaType([ + "application/json" + ]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = ObjectSerializer.stringify( + ObjectSerializer.serialize(updateEmailCustomizationRequest, "UpdateEmailCustomizationRequest", ""), + contentType + ); + requestContext.setBody(serializedBody); + + let authMethod: SecurityAuthentication | undefined; + // Apply auth methods + authMethod = _config.authMethods["bearerAuth"] + if (authMethod?.applySecurityAuthentication) { + await authMethod?.applySecurityAuthentication(requestContext); + } + + const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default + if (defaultAuth?.applySecurityAuthentication) { + await defaultAuth?.applySecurityAuthentication(requestContext); + } + + return requestContext; + } + + /** + * Version: 10.10.0.cl or later Validates the email customization configuration if any set for the ThoughtSpot system. #### Pre-requisites Requires `DEVELOPER` (**has developer privilege**) or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `DEVELOPER` (**Has developer privilege**) privilege is required. **NOTE**:This endpoint in currently in beta. Contact ThoughtSpot support to enable this on your instance. + */ + public async validateEmailCustomization(_options?: Configuration): Promise { + let _config = _options || this.configuration; + + // Path Params + const localVarPath = '/api/rest/2.0/customization/email/validate'; + + // Make Request Context + const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.POST); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.25.0") + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.25.0") + + + + + let authMethod: SecurityAuthentication | undefined; + // Apply auth methods + authMethod = _config.authMethods["bearerAuth"] + if (authMethod?.applySecurityAuthentication) { + await authMethod?.applySecurityAuthentication(requestContext); + } + + const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default + if (defaultAuth?.applySecurityAuthentication) { + await defaultAuth?.applySecurityAuthentication(requestContext); + } + + return requestContext; + } + +} + +export class EmailCustomizationApiResponseProcessor { + + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to createEmailCustomization + * @throws ApiException if the response code was not in [200, 299] + */ + public async createEmailCustomization(response: ResponseContext): Promise { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("200", response.httpStatusCode)) { + const body: CreateEmailCustomizationResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "CreateEmailCustomizationResponse", "" + ) as CreateEmailCustomizationResponse; + return body; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Invalid request.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Unexpected error", body, response.headers); + } + + // Work around for missing responses in specification, e.g. for petstore.yaml + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body: CreateEmailCustomizationResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "CreateEmailCustomizationResponse", "" + ) as CreateEmailCustomizationResponse; + return body; + } + + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", await response.getBodyAsAny(), response.headers); + } + + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to deleteEmailCustomization + * @throws ApiException if the response code was not in [200, 299] + */ + public async deleteEmailCustomization(response: ResponseContext): Promise { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("204", response.httpStatusCode)) { + return; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Invalid request.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Unexpected error", body, response.headers); + } + + // Work around for missing responses in specification, e.g. for petstore.yaml + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body: void = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "void", "" + ) as void; + return body; + } + + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", await response.getBodyAsAny(), response.headers); + } + + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to deleteOrgEmailCustomization + * @throws ApiException if the response code was not in [200, 299] + */ + public async deleteOrgEmailCustomization(response: ResponseContext): Promise { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("204", response.httpStatusCode)) { + return; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Invalid request.", body, response.headers); + } + if (isCodeInRange("401", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Unexpected error", body, response.headers); + } + + // Work around for missing responses in specification, e.g. for petstore.yaml + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body: void = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "void", "" + ) as void; + return body; + } + + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", await response.getBodyAsAny(), response.headers); + } + + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to searchEmailCustomization + * @throws ApiException if the response code was not in [200, 299] + */ + public async searchEmailCustomization(response: ResponseContext): Promise > { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("200", response.httpStatusCode)) { + const body: Array = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "Array", "" + ) as Array; + return body; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Invalid request.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Unexpected error", body, response.headers); + } + + // Work around for missing responses in specification, e.g. for petstore.yaml + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body: Array = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "Array", "" + ) as Array; + return body; + } + + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", await response.getBodyAsAny(), response.headers); + } + + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to updateEmailCustomization + * @throws ApiException if the response code was not in [200, 299] + */ + public async updateEmailCustomization(response: ResponseContext): Promise { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("204", response.httpStatusCode)) { + return; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Invalid request.", body, response.headers); + } + if (isCodeInRange("401", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Unexpected error", body, response.headers); + } + + // Work around for missing responses in specification, e.g. for petstore.yaml + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body: void = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "void", "" + ) as void; + return body; + } + + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", await response.getBodyAsAny(), response.headers); + } + + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to validateEmailCustomization + * @throws ApiException if the response code was not in [200, 299] + */ + public async validateEmailCustomization(response: ResponseContext): Promise { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("204", response.httpStatusCode)) { + return; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Invalid request.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Unexpected error", body, response.headers); + } + + // Work around for missing responses in specification, e.g. for petstore.yaml + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body: void = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "void", "" + ) as void; + return body; + } + + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", await response.getBodyAsAny(), response.headers); + } + +} diff --git a/sdks/typescript/apis/GroupsApi.ts b/sdks/typescript/apis/GroupsApi.ts new file mode 100644 index 000000000..02a08c4dd --- /dev/null +++ b/sdks/typescript/apis/GroupsApi.ts @@ -0,0 +1,558 @@ +// TODO: better import syntax? +import {BaseAPIRequestFactory, RequiredError, COLLECTION_FORMATS} from './baseapi'; +import {Configuration} from '../configuration'; +import {RequestContext, HttpMethod, ResponseContext, HttpFile} from '../http/http'; +import {ObjectSerializer} from '../models/ObjectSerializer'; +import {ApiException} from './exception'; +import {canConsumeForm, isCodeInRange} from '../util'; +import {SecurityAuthentication} from '../auth/auth'; + + +import { CreateUserGroupRequest } from '../models/CreateUserGroupRequest'; +import { ErrorResponse } from '../models/ErrorResponse'; +import { ImportUserGroupsRequest } from '../models/ImportUserGroupsRequest'; +import { ImportUserGroupsResponse } from '../models/ImportUserGroupsResponse'; +import { SearchUserGroupsRequest } from '../models/SearchUserGroupsRequest'; +import { UpdateUserGroupRequest } from '../models/UpdateUserGroupRequest'; +import { UserGroupResponse } from '../models/UserGroupResponse'; + +/** + * no description + */ +export class GroupsApiRequestFactory extends BaseAPIRequestFactory { + + /** + * Version: 9.0.0.cl or later Creates a group object in ThoughtSpot. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `GROUP_ADMINISTRATION` (**Can manage groups**) privilege is required. #### About groups Groups in ThoughtSpot are used by the administrators to define privileges and organize users based on their roles and access requirements. To know more about groups and privileges, see [ThoughtSpot Product Documentation](https://docs.thoughtspot.com/cloud/latest/groups-privileges). #### Supported operations The API endpoint lets you perform the following operations: * Assign privileges * Add users * Define sharing visibility * Add sub-groups * Assign a default Liveboard + * @param createUserGroupRequest + */ + public async createUserGroup(createUserGroupRequest: CreateUserGroupRequest, _options?: Configuration): Promise { + let _config = _options || this.configuration; + + // verify required parameter 'createUserGroupRequest' is not null or undefined + if (createUserGroupRequest === null || createUserGroupRequest === undefined) { + throw new RequiredError("GroupsApi", "createUserGroup", "createUserGroupRequest"); + } + + + // Path Params + const localVarPath = '/api/rest/2.0/groups/create'; + + // Make Request Context + const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.POST); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.25.0") + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.25.0") + + + + + // Body Params + const contentType = ObjectSerializer.getPreferredMediaType([ + "application/json" + ]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = ObjectSerializer.stringify( + ObjectSerializer.serialize(createUserGroupRequest, "CreateUserGroupRequest", ""), + contentType + ); + requestContext.setBody(serializedBody); + + let authMethod: SecurityAuthentication | undefined; + // Apply auth methods + authMethod = _config.authMethods["bearerAuth"] + if (authMethod?.applySecurityAuthentication) { + await authMethod?.applySecurityAuthentication(requestContext); + } + + const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default + if (defaultAuth?.applySecurityAuthentication) { + await defaultAuth?.applySecurityAuthentication(requestContext); + } + + return requestContext; + } + + /** + * Version: 9.0.0.cl or later Removes the specified group object from the ThoughtSpot system. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `GROUP_ADMINISTRATION` (**Can manage groups**) privilege is required. + * @param groupIdentifier GUID or name of the group. + */ + public async deleteUserGroup(groupIdentifier: string, _options?: Configuration): Promise { + let _config = _options || this.configuration; + + // verify required parameter 'groupIdentifier' is not null or undefined + if (groupIdentifier === null || groupIdentifier === undefined) { + throw new RequiredError("GroupsApi", "deleteUserGroup", "groupIdentifier"); + } + + + // Path Params + const localVarPath = '/api/rest/2.0/groups/{group_identifier}/delete' + .replace('{' + 'group_identifier' + '}', encodeURIComponent(String(groupIdentifier))); + + // Make Request Context + const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.POST); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.25.0") + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.25.0") + + + + + let authMethod: SecurityAuthentication | undefined; + // Apply auth methods + authMethod = _config.authMethods["bearerAuth"] + if (authMethod?.applySecurityAuthentication) { + await authMethod?.applySecurityAuthentication(requestContext); + } + + const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default + if (defaultAuth?.applySecurityAuthentication) { + await defaultAuth?.applySecurityAuthentication(requestContext); + } + + return requestContext; + } + + /** + * Version: 9.0.0.cl or later Imports group objects from external databases into ThoughtSpot. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `GROUP_ADMINISTRATION` (**Can manage groups**) privilege is required. During the import operation: * If the specified group is not available in ThoughtSpot, it will be added to ThoughtSpot. * If `delete_unspecified_groups` is set to `true`, the groups not specified in the API request, excluding administrator and system user groups, are deleted. * If the specified groups are already available in ThoughtSpot, the object properties of these groups are modified and synchronized as per the input data in the API request. A successful API call returns the object that represents the changes made in the ThoughtSpot system. + * @param importUserGroupsRequest + */ + public async importUserGroups(importUserGroupsRequest: ImportUserGroupsRequest, _options?: Configuration): Promise { + let _config = _options || this.configuration; + + // verify required parameter 'importUserGroupsRequest' is not null or undefined + if (importUserGroupsRequest === null || importUserGroupsRequest === undefined) { + throw new RequiredError("GroupsApi", "importUserGroups", "importUserGroupsRequest"); + } + + + // Path Params + const localVarPath = '/api/rest/2.0/groups/import'; + + // Make Request Context + const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.POST); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.25.0") + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.25.0") + + + + + // Body Params + const contentType = ObjectSerializer.getPreferredMediaType([ + "application/json" + ]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = ObjectSerializer.stringify( + ObjectSerializer.serialize(importUserGroupsRequest, "ImportUserGroupsRequest", ""), + contentType + ); + requestContext.setBody(serializedBody); + + let authMethod: SecurityAuthentication | undefined; + // Apply auth methods + authMethod = _config.authMethods["bearerAuth"] + if (authMethod?.applySecurityAuthentication) { + await authMethod?.applySecurityAuthentication(requestContext); + } + + const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default + if (defaultAuth?.applySecurityAuthentication) { + await defaultAuth?.applySecurityAuthentication(requestContext); + } + + return requestContext; + } + + /** + * Version: 9.0.0.cl or later Gets a list of user group objects from the ThoughtSpot system. To get details of a specific user group, specify the user group GUID or name. You can also filter the API response based on User ID, Org ID, Role ID, type of group, sharing visibility, privileges assigned to the group, and the Liveboard IDs assigned to the users in the group. Available to all users. Users with `ADMINISTRATION` (**Can administer ThoughtSpot**) privileges can view all users properties. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `GROUP_ADMINISTRATION` (**Can manage groups**) privilege is required. **NOTE**: If you do not get precise results, try setting `record_size` to `-1` and `record_offset` to `0`. + * @param searchUserGroupsRequest + */ + public async searchUserGroups(searchUserGroupsRequest: SearchUserGroupsRequest, _options?: Configuration): Promise { + let _config = _options || this.configuration; + + // verify required parameter 'searchUserGroupsRequest' is not null or undefined + if (searchUserGroupsRequest === null || searchUserGroupsRequest === undefined) { + throw new RequiredError("GroupsApi", "searchUserGroups", "searchUserGroupsRequest"); + } + + + // Path Params + const localVarPath = '/api/rest/2.0/groups/search'; + + // Make Request Context + const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.POST); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.25.0") + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.25.0") + + + + + // Body Params + const contentType = ObjectSerializer.getPreferredMediaType([ + "application/json" + ]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = ObjectSerializer.stringify( + ObjectSerializer.serialize(searchUserGroupsRequest, "SearchUserGroupsRequest", ""), + contentType + ); + requestContext.setBody(serializedBody); + + let authMethod: SecurityAuthentication | undefined; + // Apply auth methods + authMethod = _config.authMethods["bearerAuth"] + if (authMethod?.applySecurityAuthentication) { + await authMethod?.applySecurityAuthentication(requestContext); + } + + const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default + if (defaultAuth?.applySecurityAuthentication) { + await defaultAuth?.applySecurityAuthentication(requestContext); + } + + return requestContext; + } + + /** + * Version: 9.0.0.cl or later Updates the properties of a group object in ThoughtSpot. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `GROUP_ADMINISTRATION` (**Can manage groups**) privilege is required. #### Supported operations This API endpoint lets you perform the following operations in a single API request: * Edit [privileges](https://developers.thoughtspot.com/docs/?pageid=api-user-management#group-privileges) * Add or remove users * Change sharing visibility settings * Add or remove sub-groups * Assign a default Liveboard or update the existing settings + * @param groupIdentifier GUID or name of the group. + * @param updateUserGroupRequest + */ + public async updateUserGroup(groupIdentifier: string, updateUserGroupRequest: UpdateUserGroupRequest, _options?: Configuration): Promise { + let _config = _options || this.configuration; + + // verify required parameter 'groupIdentifier' is not null or undefined + if (groupIdentifier === null || groupIdentifier === undefined) { + throw new RequiredError("GroupsApi", "updateUserGroup", "groupIdentifier"); + } + + + // verify required parameter 'updateUserGroupRequest' is not null or undefined + if (updateUserGroupRequest === null || updateUserGroupRequest === undefined) { + throw new RequiredError("GroupsApi", "updateUserGroup", "updateUserGroupRequest"); + } + + + // Path Params + const localVarPath = '/api/rest/2.0/groups/{group_identifier}/update' + .replace('{' + 'group_identifier' + '}', encodeURIComponent(String(groupIdentifier))); + + // Make Request Context + const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.POST); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.25.0") + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.25.0") + + + + + // Body Params + const contentType = ObjectSerializer.getPreferredMediaType([ + "application/json" + ]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = ObjectSerializer.stringify( + ObjectSerializer.serialize(updateUserGroupRequest, "UpdateUserGroupRequest", ""), + contentType + ); + requestContext.setBody(serializedBody); + + let authMethod: SecurityAuthentication | undefined; + // Apply auth methods + authMethod = _config.authMethods["bearerAuth"] + if (authMethod?.applySecurityAuthentication) { + await authMethod?.applySecurityAuthentication(requestContext); + } + + const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default + if (defaultAuth?.applySecurityAuthentication) { + await defaultAuth?.applySecurityAuthentication(requestContext); + } + + return requestContext; + } + +} + +export class GroupsApiResponseProcessor { + + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to createUserGroup + * @throws ApiException if the response code was not in [200, 299] + */ + public async createUserGroup(response: ResponseContext): Promise { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("200", response.httpStatusCode)) { + const body: UserGroupResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "UserGroupResponse", "" + ) as UserGroupResponse; + return body; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Invalid request.", body, response.headers); + } + if (isCodeInRange("401", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Unexpected error", body, response.headers); + } + + // Work around for missing responses in specification, e.g. for petstore.yaml + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body: UserGroupResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "UserGroupResponse", "" + ) as UserGroupResponse; + return body; + } + + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", await response.getBodyAsAny(), response.headers); + } + + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to deleteUserGroup + * @throws ApiException if the response code was not in [200, 299] + */ + public async deleteUserGroup(response: ResponseContext): Promise { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("204", response.httpStatusCode)) { + return; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Invalid request.", body, response.headers); + } + if (isCodeInRange("401", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Unexpected error", body, response.headers); + } + + // Work around for missing responses in specification, e.g. for petstore.yaml + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body: void = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "void", "" + ) as void; + return body; + } + + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", await response.getBodyAsAny(), response.headers); + } + + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to importUserGroups + * @throws ApiException if the response code was not in [200, 299] + */ + public async importUserGroups(response: ResponseContext): Promise { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("200", response.httpStatusCode)) { + const body: ImportUserGroupsResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ImportUserGroupsResponse", "" + ) as ImportUserGroupsResponse; + return body; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Invalid request.", body, response.headers); + } + if (isCodeInRange("401", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Unexpected error", body, response.headers); + } + + // Work around for missing responses in specification, e.g. for petstore.yaml + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body: ImportUserGroupsResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ImportUserGroupsResponse", "" + ) as ImportUserGroupsResponse; + return body; + } + + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", await response.getBodyAsAny(), response.headers); + } + + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to searchUserGroups + * @throws ApiException if the response code was not in [200, 299] + */ + public async searchUserGroups(response: ResponseContext): Promise > { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("200", response.httpStatusCode)) { + const body: Array = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "Array", "" + ) as Array; + return body; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Invalid request.", body, response.headers); + } + if (isCodeInRange("401", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Unexpected error", body, response.headers); + } + + // Work around for missing responses in specification, e.g. for petstore.yaml + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body: Array = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "Array", "" + ) as Array; + return body; + } + + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", await response.getBodyAsAny(), response.headers); + } + + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to updateUserGroup + * @throws ApiException if the response code was not in [200, 299] + */ + public async updateUserGroup(response: ResponseContext): Promise { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("204", response.httpStatusCode)) { + return; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Invalid request.", body, response.headers); + } + if (isCodeInRange("401", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Unexpected error", body, response.headers); + } + + // Work around for missing responses in specification, e.g. for petstore.yaml + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body: void = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "void", "" + ) as void; + return body; + } + + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", await response.getBodyAsAny(), response.headers); + } + +} diff --git a/sdks/typescript/apis/JobsApi.ts b/sdks/typescript/apis/JobsApi.ts new file mode 100644 index 000000000..3d56ffb8c --- /dev/null +++ b/sdks/typescript/apis/JobsApi.ts @@ -0,0 +1,132 @@ +// TODO: better import syntax? +import {BaseAPIRequestFactory, RequiredError, COLLECTION_FORMATS} from './baseapi'; +import {Configuration} from '../configuration'; +import {RequestContext, HttpMethod, ResponseContext, HttpFile} from '../http/http'; +import {ObjectSerializer} from '../models/ObjectSerializer'; +import {ApiException} from './exception'; +import {canConsumeForm, isCodeInRange} from '../util'; +import {SecurityAuthentication} from '../auth/auth'; + + +import { ErrorResponse } from '../models/ErrorResponse'; +import { SearchChannelHistoryRequest } from '../models/SearchChannelHistoryRequest'; +import { SearchChannelHistoryResponse } from '../models/SearchChannelHistoryResponse'; + +/** + * no description + */ +export class JobsApiRequestFactory extends BaseAPIRequestFactory { + + /** + * Version: 26.4.0.cl or later Searches delivery history for communication channels such as webhooks. Returns channel-level delivery status for each job execution record. Use this to monitor channel health and delivery success rates across events. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) or `DEVELOPER` (**Has developer privilege**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, users with `CAN_MANAGE_WEBHOOKS` (**Can manage webhooks**) privilege are also authorized to perform this action. **NOTE**: When `channel_type` is `WEBHOOK`, the following constraints apply: - `job_ids`, `channel_identifiers`, and `events` each accept at most one element. - When `job_ids` is provided, it is used as the sole lookup key and other filter fields are ignored. - When `job_ids` is not provided, `channel_identifiers` and `events` are both required, each containing exactly one element. - Records older than the configured retention period are not returned. - Use `start_epoch_time_in_millis` and/or `end_epoch_time_in_millis` to narrow results to a specific time window. + * @param searchChannelHistoryRequest + */ + public async searchChannelHistory(searchChannelHistoryRequest: SearchChannelHistoryRequest, _options?: Configuration): Promise { + let _config = _options || this.configuration; + + // verify required parameter 'searchChannelHistoryRequest' is not null or undefined + if (searchChannelHistoryRequest === null || searchChannelHistoryRequest === undefined) { + throw new RequiredError("JobsApi", "searchChannelHistory", "searchChannelHistoryRequest"); + } + + + // Path Params + const localVarPath = '/api/rest/2.0/jobs/history/communication-channels/search'; + + // Make Request Context + const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.POST); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.25.0") + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.25.0") + + + + + // Body Params + const contentType = ObjectSerializer.getPreferredMediaType([ + "application/json" + ]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = ObjectSerializer.stringify( + ObjectSerializer.serialize(searchChannelHistoryRequest, "SearchChannelHistoryRequest", ""), + contentType + ); + requestContext.setBody(serializedBody); + + let authMethod: SecurityAuthentication | undefined; + // Apply auth methods + authMethod = _config.authMethods["bearerAuth"] + if (authMethod?.applySecurityAuthentication) { + await authMethod?.applySecurityAuthentication(requestContext); + } + + const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default + if (defaultAuth?.applySecurityAuthentication) { + await defaultAuth?.applySecurityAuthentication(requestContext); + } + + return requestContext; + } + +} + +export class JobsApiResponseProcessor { + + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to searchChannelHistory + * @throws ApiException if the response code was not in [200, 299] + */ + public async searchChannelHistory(response: ResponseContext): Promise { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("200", response.httpStatusCode)) { + const body: SearchChannelHistoryResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "SearchChannelHistoryResponse", "" + ) as SearchChannelHistoryResponse; + return body; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Invalid request.", body, response.headers); + } + if (isCodeInRange("401", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Unexpected error", body, response.headers); + } + + // Work around for missing responses in specification, e.g. for petstore.yaml + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body: SearchChannelHistoryResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "SearchChannelHistoryResponse", "" + ) as SearchChannelHistoryResponse; + return body; + } + + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", await response.getBodyAsAny(), response.headers); + } + +} diff --git a/sdks/typescript/apis/LogApi.ts b/sdks/typescript/apis/LogApi.ts new file mode 100644 index 000000000..a87271e7d --- /dev/null +++ b/sdks/typescript/apis/LogApi.ts @@ -0,0 +1,132 @@ +// TODO: better import syntax? +import {BaseAPIRequestFactory, RequiredError, COLLECTION_FORMATS} from './baseapi'; +import {Configuration} from '../configuration'; +import {RequestContext, HttpMethod, ResponseContext, HttpFile} from '../http/http'; +import {ObjectSerializer} from '../models/ObjectSerializer'; +import {ApiException} from './exception'; +import {canConsumeForm, isCodeInRange} from '../util'; +import {SecurityAuthentication} from '../auth/auth'; + + +import { ErrorResponse } from '../models/ErrorResponse'; +import { FetchLogsRequest } from '../models/FetchLogsRequest'; +import { LogResponse } from '../models/LogResponse'; + +/** + * no description + */ +export class LogApiRequestFactory extends BaseAPIRequestFactory { + + /** + * Version: 9.0.0.cl or later Fetches security audit logs. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the [Admin Control](https://developers.thoughtspot.com/docs/rbac#_admin_control) privileges are required. #### Usage guidelines By default, the API retrieves logs for the last 24 hours. You can set a custom duration in EPOCH time. Make sure the log duration specified in your API request doesn’t exceed 24 hours. If you must fetch logs for a longer time range, modify the duration and make multiple sequential API requests. Upon successful execution, the API returns logs with the following information: * timestamp of the event * event ID * event type * name and GUID of the user * IP address of ThoughtSpot instance For more information see [Audit logs Documentation](https://developers.thoughtspot.com/docs/audit-logs). + * @param fetchLogsRequest + */ + public async fetchLogs(fetchLogsRequest: FetchLogsRequest, _options?: Configuration): Promise { + let _config = _options || this.configuration; + + // verify required parameter 'fetchLogsRequest' is not null or undefined + if (fetchLogsRequest === null || fetchLogsRequest === undefined) { + throw new RequiredError("LogApi", "fetchLogs", "fetchLogsRequest"); + } + + + // Path Params + const localVarPath = '/api/rest/2.0/logs/fetch'; + + // Make Request Context + const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.POST); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.25.0") + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.25.0") + + + + + // Body Params + const contentType = ObjectSerializer.getPreferredMediaType([ + "application/json" + ]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = ObjectSerializer.stringify( + ObjectSerializer.serialize(fetchLogsRequest, "FetchLogsRequest", ""), + contentType + ); + requestContext.setBody(serializedBody); + + let authMethod: SecurityAuthentication | undefined; + // Apply auth methods + authMethod = _config.authMethods["bearerAuth"] + if (authMethod?.applySecurityAuthentication) { + await authMethod?.applySecurityAuthentication(requestContext); + } + + const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default + if (defaultAuth?.applySecurityAuthentication) { + await defaultAuth?.applySecurityAuthentication(requestContext); + } + + return requestContext; + } + +} + +export class LogApiResponseProcessor { + + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to fetchLogs + * @throws ApiException if the response code was not in [200, 299] + */ + public async fetchLogs(response: ResponseContext): Promise > { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("200", response.httpStatusCode)) { + const body: Array = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "Array", "" + ) as Array; + return body; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Invalid request.", body, response.headers); + } + if (isCodeInRange("401", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Unexpected error", body, response.headers); + } + + // Work around for missing responses in specification, e.g. for petstore.yaml + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body: Array = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "Array", "" + ) as Array; + return body; + } + + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", await response.getBodyAsAny(), response.headers); + } + +} diff --git a/sdks/typescript/apis/MetadataApi.ts b/sdks/typescript/apis/MetadataApi.ts new file mode 100644 index 000000000..6054a368f --- /dev/null +++ b/sdks/typescript/apis/MetadataApi.ts @@ -0,0 +1,1755 @@ +// TODO: better import syntax? +import {BaseAPIRequestFactory, RequiredError, COLLECTION_FORMATS} from './baseapi'; +import {Configuration} from '../configuration'; +import {RequestContext, HttpMethod, ResponseContext, HttpFile} from '../http/http'; +import {ObjectSerializer} from '../models/ObjectSerializer'; +import {ApiException} from './exception'; +import {canConsumeForm, isCodeInRange} from '../util'; +import {SecurityAuthentication} from '../auth/auth'; + + +import { ConvertWorksheetToModelRequest } from '../models/ConvertWorksheetToModelRequest'; +import { CopyObjectRequest } from '../models/CopyObjectRequest'; +import { DeleteMetadataRequest } from '../models/DeleteMetadataRequest'; +import { ErrorResponse } from '../models/ErrorResponse'; +import { ExportMetadataTMLBatchedRequest } from '../models/ExportMetadataTMLBatchedRequest'; +import { ExportMetadataTMLRequest } from '../models/ExportMetadataTMLRequest'; +import { FetchAnswerSqlQueryRequest } from '../models/FetchAnswerSqlQueryRequest'; +import { FetchAsyncImportTaskStatusRequest } from '../models/FetchAsyncImportTaskStatusRequest'; +import { FetchLiveboardSqlQueryRequest } from '../models/FetchLiveboardSqlQueryRequest'; +import { GetAsyncImportStatusResponse } from '../models/GetAsyncImportStatusResponse'; +import { ImportEPackAsyncTaskStatus } from '../models/ImportEPackAsyncTaskStatus'; +import { ImportMetadataTMLAsyncRequest } from '../models/ImportMetadataTMLAsyncRequest'; +import { ImportMetadataTMLRequest } from '../models/ImportMetadataTMLRequest'; +import { MetadataSearchResponse } from '../models/MetadataSearchResponse'; +import { ParameterizeMetadataFieldsRequest } from '../models/ParameterizeMetadataFieldsRequest'; +import { ParameterizeMetadataRequest } from '../models/ParameterizeMetadataRequest'; +import { ResponseCopyObject } from '../models/ResponseCopyObject'; +import { ResponseWorksheetToModelConversion } from '../models/ResponseWorksheetToModelConversion'; +import { SearchMetadataRequest } from '../models/SearchMetadataRequest'; +import { SqlQueryResponse } from '../models/SqlQueryResponse'; +import { UnparameterizeMetadataRequest } from '../models/UnparameterizeMetadataRequest'; +import { UpdateMetadataHeaderRequest } from '../models/UpdateMetadataHeaderRequest'; +import { UpdateMetadataObjIdRequest } from '../models/UpdateMetadataObjIdRequest'; + +/** + * no description + */ +export class MetadataApiRequestFactory extends BaseAPIRequestFactory { + + /** + * Convert worksheets to models Version: 10.6.0.cl or later ## Prerequisites - **Privileges Required:** - `DATAMANAGEMENT` (Can manage data) or `ADMINISTRATION` (Can administer ThoughtSpot). - **Additional Privileges (if RBAC is enabled):** - `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` (Can manage data models). --- ## Usage Guidelines ### Parameters 1. **worksheet_ids** - **Description:** A comma-separated list of GUIDs (Globally Unique Identifiers) specifying the Worksheets to be converted. - **Usage:** - Used only when `convert_all` is set to `false`. - Leave empty or omit when `convert_all` is set to `true`. 2. **exclude_worksheet_ids** - **Description:** A comma-separated list of GUIDs specifying Worksheets to be excluded from conversion. - **Usage:** - Useful when `convert_all` is set to `true` and specific Worksheets should not be converted. 3. **convert_all** - **Description:** Sets the scope of conversion. - **Options:** - `true`: Converts all Worksheets in the system, except those specified in `exclude_worksheet_ids`. - `false`: Converts only the Worksheets listed in `worksheet_ids`. 4. **apply_changes** - **Description:** Specifies whether to apply changes directly to ThoughtSpot or to generate a preview before applying any changes.Used for validation of conversion. - **Options:** - `true`: Applies conversion changes directly to ThoughtSpot. - `false`: Generates only a preview of the changes and does not apply any changes to ThoughtSpot --- ## Best Practices 1. **Backup Before Conversion:** Always export metadata as a backup before initiating the conversion process 2. **Partial Conversion for Testing:** Test the conversion process by setting `convert_all` to `false` and specifying a small number of `worksheet_ids`. 3. **Verify Dependencies:** Check for dependent objects, such as Tables and Connections, to avoid invalid references. 4. **Review Changes:** Use `apply_changes: false` to preview the impact of the conversion before applying changes. --- ## Examples ### Convert Specific Worksheets ```json { \"worksheet_ids\": [\"guid1\", \"guid2\", \"guid3\"], \"exclude_worksheet_ids\": [], \"convert_all\": false, \"apply_changes\": true } ``` ### Convert All Accessible Worksheets ```json { \"worksheet_ids\": [], \"exclude_worksheet_ids\": [], \"convert_all\": true, \"apply_changes\": true } ``` ### Exclude Specific Worksheets While Converting All Accessible Worksheets ```json { \"worksheet_ids\": [], \"exclude_worksheet_ids\": [\"abc\"], \"convert_all\": true, \"apply_changes\": true } ``` + * @param convertWorksheetToModelRequest + */ + public async convertWorksheetToModel(convertWorksheetToModelRequest: ConvertWorksheetToModelRequest, _options?: Configuration): Promise { + let _config = _options || this.configuration; + + // verify required parameter 'convertWorksheetToModelRequest' is not null or undefined + if (convertWorksheetToModelRequest === null || convertWorksheetToModelRequest === undefined) { + throw new RequiredError("MetadataApi", "convertWorksheetToModel", "convertWorksheetToModelRequest"); + } + + + // Path Params + const localVarPath = '/api/rest/2.0/metadata/worksheets/convert'; + + // Make Request Context + const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.POST); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.25.0") + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.25.0") + + + + + // Body Params + const contentType = ObjectSerializer.getPreferredMediaType([ + "application/json" + ]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = ObjectSerializer.stringify( + ObjectSerializer.serialize(convertWorksheetToModelRequest, "ConvertWorksheetToModelRequest", ""), + contentType + ); + requestContext.setBody(serializedBody); + + let authMethod: SecurityAuthentication | undefined; + // Apply auth methods + authMethod = _config.authMethods["bearerAuth"] + if (authMethod?.applySecurityAuthentication) { + await authMethod?.applySecurityAuthentication(requestContext); + } + + const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default + if (defaultAuth?.applySecurityAuthentication) { + await defaultAuth?.applySecurityAuthentication(requestContext); + } + + return requestContext; + } + + /** + * Makes a copy of an Answer or Liveboard Version: 10.3.0.cl or later Creates a copy of a metadata object. Requires at least view access to the metadata object being copied. Upon successful execution, the API creates a copy of the metadata object specified in the API request and returns the ID of the new object. + * @param copyObjectRequest + */ + public async copyObject(copyObjectRequest: CopyObjectRequest, _options?: Configuration): Promise { + let _config = _options || this.configuration; + + // verify required parameter 'copyObjectRequest' is not null or undefined + if (copyObjectRequest === null || copyObjectRequest === undefined) { + throw new RequiredError("MetadataApi", "copyObject", "copyObjectRequest"); + } + + + // Path Params + const localVarPath = '/api/rest/2.0/metadata/copyobject'; + + // Make Request Context + const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.POST); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.25.0") + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.25.0") + + + + + // Body Params + const contentType = ObjectSerializer.getPreferredMediaType([ + "application/json" + ]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = ObjectSerializer.stringify( + ObjectSerializer.serialize(copyObjectRequest, "CopyObjectRequest", ""), + contentType + ); + requestContext.setBody(serializedBody); + + let authMethod: SecurityAuthentication | undefined; + // Apply auth methods + authMethod = _config.authMethods["bearerAuth"] + if (authMethod?.applySecurityAuthentication) { + await authMethod?.applySecurityAuthentication(requestContext); + } + + const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default + if (defaultAuth?.applySecurityAuthentication) { + await defaultAuth?.applySecurityAuthentication(requestContext); + } + + return requestContext; + } + + /** + * Version: 9.0.0.cl or later Removes the specified metadata object from the ThoughtSpot system. Requires edit access to the metadata object. + * @param deleteMetadataRequest + */ + public async deleteMetadata(deleteMetadataRequest: DeleteMetadataRequest, _options?: Configuration): Promise { + let _config = _options || this.configuration; + + // verify required parameter 'deleteMetadataRequest' is not null or undefined + if (deleteMetadataRequest === null || deleteMetadataRequest === undefined) { + throw new RequiredError("MetadataApi", "deleteMetadata", "deleteMetadataRequest"); + } + + + // Path Params + const localVarPath = '/api/rest/2.0/metadata/delete'; + + // Make Request Context + const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.POST); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.25.0") + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.25.0") + + + + + // Body Params + const contentType = ObjectSerializer.getPreferredMediaType([ + "application/json" + ]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = ObjectSerializer.stringify( + ObjectSerializer.serialize(deleteMetadataRequest, "DeleteMetadataRequest", ""), + contentType + ); + requestContext.setBody(serializedBody); + + let authMethod: SecurityAuthentication | undefined; + // Apply auth methods + authMethod = _config.authMethods["bearerAuth"] + if (authMethod?.applySecurityAuthentication) { + await authMethod?.applySecurityAuthentication(requestContext); + } + + const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default + if (defaultAuth?.applySecurityAuthentication) { + await defaultAuth?.applySecurityAuthentication(requestContext); + } + + return requestContext; + } + + /** + * Version: 9.0.0.cl or later Exports the [TML](https://docs.thoughtspot.com/cloud/latest/tml) representation of metadata objects in JSON or YAML format. Requires `DATADOWNLOADING` (**Can download Data**) and at least view access to the metadata object. #### Usage guidelines * You can export one or several objects by passing metadata object GUIDs in the `metadata` array. * When exporting TML content for a Liveboard or Answer object, you can set `export_associated` to `true` to retrieve TML content for underlying Worksheets, Tables, or Views, including the GUID of each object within the headers. When `export_associated` is set to `true`, consider retrieving one metadata object at a time. * Set `export_fqns` to `true` to add FQNs of the referenced objects in the TML content. For example, if you send an API request to retrieve TML for a Liveboard and its associated objects, the API returns the TML content with FQNs of the referenced Worksheet. Exporting TML with FQNs is useful if ThoughtSpot has multiple objects with the same name and you want to eliminate ambiguity when importing TML files into ThoughtSpot. It eliminates the need for adding FQNs of the referenced objects manually during the import operation. * To export only the TML of feedbacks associated with an object, set the GUID of the object as `identifier`, and set the `type` as `FEEDBACK` in the `metadata` array. * To export the TML of an object along with the feedbacks associated with it, set the GUID of the object as `identifier`, set the `type` as `LOGIAL_TABLE` in the `metadata` array, and set `export_with_associated_feedbacks` in `export_options` to true. For more information, see [TML Documentation](https://developers.thoughtspot.com/docs/tml#_export_a_tml). For more information on feedbacks, see [Feedback Documentation](https://docs.thoughtspot.com/cloud/latest/sage-feedback). + * @param exportMetadataTMLRequest + */ + public async exportMetadataTML(exportMetadataTMLRequest: ExportMetadataTMLRequest, _options?: Configuration): Promise { + let _config = _options || this.configuration; + + // verify required parameter 'exportMetadataTMLRequest' is not null or undefined + if (exportMetadataTMLRequest === null || exportMetadataTMLRequest === undefined) { + throw new RequiredError("MetadataApi", "exportMetadataTML", "exportMetadataTMLRequest"); + } + + + // Path Params + const localVarPath = '/api/rest/2.0/metadata/tml/export'; + + // Make Request Context + const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.POST); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.25.0") + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.25.0") + + + + + // Body Params + const contentType = ObjectSerializer.getPreferredMediaType([ + "application/json" + ]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = ObjectSerializer.stringify( + ObjectSerializer.serialize(exportMetadataTMLRequest, "ExportMetadataTMLRequest", ""), + contentType + ); + requestContext.setBody(serializedBody); + + let authMethod: SecurityAuthentication | undefined; + // Apply auth methods + authMethod = _config.authMethods["bearerAuth"] + if (authMethod?.applySecurityAuthentication) { + await authMethod?.applySecurityAuthentication(requestContext); + } + + const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default + if (defaultAuth?.applySecurityAuthentication) { + await defaultAuth?.applySecurityAuthentication(requestContext); + } + + return requestContext; + } + + /** + * Version: 10.1.0.cl or later Exports the [TML](https://docs.thoughtspot.com/cloud/latest/tml) representation of metadata objects in JSON or YAML format. ### **Permissions Required** Requires `DATAMANAGEMENT` (**Can manage data**) and `USERMANAGEMENT` (**Can manage users**) privileges. #### **Usage Guidelines** This API is only applicable for `USER`, `GROUP`, and `ROLES` metadata types. - `batch_offset` Indicates the starting position within the complete dataset from which the API should begin returning objects. Useful for paginating results efficiently. - `batch_size` Specifies the number of objects or items to retrieve in a single request. Helps control response size for better performance. - `edoc_format` Defines the format of the TML content. The exported metadata can be in JSON or YAML format. - `export_dependent` Specifies whether to include dependent metadata objects in the export. Ensures related objects are also retrieved if needed. - `all_orgs_override` Indicates whether the export operation applies across all organizations. Useful for multi-tenant environments where cross-org exports are required. + * @param exportMetadataTMLBatchedRequest + */ + public async exportMetadataTMLBatched(exportMetadataTMLBatchedRequest: ExportMetadataTMLBatchedRequest, _options?: Configuration): Promise { + let _config = _options || this.configuration; + + // verify required parameter 'exportMetadataTMLBatchedRequest' is not null or undefined + if (exportMetadataTMLBatchedRequest === null || exportMetadataTMLBatchedRequest === undefined) { + throw new RequiredError("MetadataApi", "exportMetadataTMLBatched", "exportMetadataTMLBatchedRequest"); + } + + + // Path Params + const localVarPath = '/api/rest/2.0/metadata/tml/export/batch'; + + // Make Request Context + const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.POST); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.25.0") + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.25.0") + + + + + // Body Params + const contentType = ObjectSerializer.getPreferredMediaType([ + "application/json" + ]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = ObjectSerializer.stringify( + ObjectSerializer.serialize(exportMetadataTMLBatchedRequest, "ExportMetadataTMLBatchedRequest", ""), + contentType + ); + requestContext.setBody(serializedBody); + + let authMethod: SecurityAuthentication | undefined; + // Apply auth methods + authMethod = _config.authMethods["bearerAuth"] + if (authMethod?.applySecurityAuthentication) { + await authMethod?.applySecurityAuthentication(requestContext); + } + + const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default + if (defaultAuth?.applySecurityAuthentication) { + await defaultAuth?.applySecurityAuthentication(requestContext); + } + + return requestContext; + } + + /** + * Version: 9.0.0.cl or later Fetches the underlying SQL query data for an Answer object. Requires at least view access to the Answer object. Upon successful execution, the API returns the SQL queries for the specified object as shown in this example: ``` { \"metadata_id\":\"8fbe44a8-46ad-4b16-8d39-184b2fada490\", \"metadata_name\":\"Total sales\", \"metadata_type\":\"ANSWER\", \"sql_queries\":[ { \"metadata_id\":\"8fbe44a8-46ad-4b16-8d39-184b2fada490\", \"metadata_name\":\"Total sales -test\", \"sql_query\":\"SELECT \\n \\\"ta_1\\\".\\\"REGION\\\" \\\"ca_1\\\", \\n \\\"ta_2\\\".\\\"PRODUCTNAME\\\" \\\"ca_2\\\", \\n \\\"ta_1\\\".\\\"STORENAME\\\" \\\"ca_3\\\", \\n CASE\\n WHEN sum(\\\"ta_3\\\".\\\"SALES\\\") IS NOT NULL THEN sum(\\\"ta_3\\\".\\\"SALES\\\")\\n ELSE 0\\n END \\\"ca_4\\\", \\n CASE\\n WHEN sum(\\\"ta_3\\\".\\\"QUANTITYPURCHASED\\\") IS NOT NULL THEN sum(\\\"ta_3\\\".\\\"QUANTITYPURCHASED\\\")\\n ELSE 0\\n END \\\"ca_5\\\"\\nFROM \\\"RETAILAPPAREL\\\".\\\"PUBLIC\\\".\\\"FACT_RETAPP_SALES\\\" \\\"ta_3\\\"\\n JOIN \\\"RETAILAPPAREL\\\".\\\"PUBLIC\\\".\\\"DIM_RETAPP_STORES\\\" \\\"ta_1\\\"\\n ON \\\"ta_3\\\".\\\"STOREID\\\" = \\\"ta_1\\\".\\\"STOREID\\\"\\n JOIN \\\"RETAILAPPAREL\\\".\\\"PUBLIC\\\".\\\"DIM_RETAPP_PRODUCTS\\\" \\\"ta_2\\\"\\n ON \\\"ta_3\\\".\\\"PRODUCTID\\\" = \\\"ta_2\\\".\\\"PRODUCTID\\\"\\nGROUP BY \\n \\\"ca_1\\\", \\n \\\"ca_2\\\", \\n \\\"ca_3\\\"\\n\" } ] } ``` + * @param fetchAnswerSqlQueryRequest + */ + public async fetchAnswerSqlQuery(fetchAnswerSqlQueryRequest: FetchAnswerSqlQueryRequest, _options?: Configuration): Promise { + let _config = _options || this.configuration; + + // verify required parameter 'fetchAnswerSqlQueryRequest' is not null or undefined + if (fetchAnswerSqlQueryRequest === null || fetchAnswerSqlQueryRequest === undefined) { + throw new RequiredError("MetadataApi", "fetchAnswerSqlQuery", "fetchAnswerSqlQueryRequest"); + } + + + // Path Params + const localVarPath = '/api/rest/2.0/metadata/answer/sql'; + + // Make Request Context + const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.POST); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.25.0") + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.25.0") + + + + + // Body Params + const contentType = ObjectSerializer.getPreferredMediaType([ + "application/json" + ]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = ObjectSerializer.stringify( + ObjectSerializer.serialize(fetchAnswerSqlQueryRequest, "FetchAnswerSqlQueryRequest", ""), + contentType + ); + requestContext.setBody(serializedBody); + + let authMethod: SecurityAuthentication | undefined; + // Apply auth methods + authMethod = _config.authMethods["bearerAuth"] + if (authMethod?.applySecurityAuthentication) { + await authMethod?.applySecurityAuthentication(requestContext); + } + + const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default + if (defaultAuth?.applySecurityAuthentication) { + await defaultAuth?.applySecurityAuthentication(requestContext); + } + + return requestContext; + } + + /** + * Version: 10.4.0.cl or later Gets information about the status of the TML async import task scheduled using the `/api/rest/2.0/metadata/tml/async/import` API call. To fetch the task details, specify the ID of the TML async import task. Requires access to the task ID. The API allows users who initiated the asynchronous TML import via `/api/rest/2.0/metadata/tml/async/import` to view the status of their tasks. Users with administration privilege can view the status of all import tasks initiated by the users in their Org. #### Usage guidelines See [TML API Documentation](https://developers.thoughtspot.com/docs/tml#_fetch_status_of_the_tml_import_task) for usage guidelines. + * @param fetchAsyncImportTaskStatusRequest + */ + public async fetchAsyncImportTaskStatus(fetchAsyncImportTaskStatusRequest: FetchAsyncImportTaskStatusRequest, _options?: Configuration): Promise { + let _config = _options || this.configuration; + + // verify required parameter 'fetchAsyncImportTaskStatusRequest' is not null or undefined + if (fetchAsyncImportTaskStatusRequest === null || fetchAsyncImportTaskStatusRequest === undefined) { + throw new RequiredError("MetadataApi", "fetchAsyncImportTaskStatus", "fetchAsyncImportTaskStatusRequest"); + } + + + // Path Params + const localVarPath = '/api/rest/2.0/metadata/tml/async/status'; + + // Make Request Context + const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.POST); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.25.0") + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.25.0") + + + + + // Body Params + const contentType = ObjectSerializer.getPreferredMediaType([ + "application/json" + ]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = ObjectSerializer.stringify( + ObjectSerializer.serialize(fetchAsyncImportTaskStatusRequest, "FetchAsyncImportTaskStatusRequest", ""), + contentType + ); + requestContext.setBody(serializedBody); + + let authMethod: SecurityAuthentication | undefined; + // Apply auth methods + authMethod = _config.authMethods["bearerAuth"] + if (authMethod?.applySecurityAuthentication) { + await authMethod?.applySecurityAuthentication(requestContext); + } + + const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default + if (defaultAuth?.applySecurityAuthentication) { + await defaultAuth?.applySecurityAuthentication(requestContext); + } + + return requestContext; + } + + /** + * Version: 9.0.0.cl or later Fetches the underlying SQL query data for a Liveboard object and its visualizations. Requires at least view access to the Liveboard object. To get SQL query data for a Liveboard, specify the GUID of the Liveboard. Optionally, you can add an array of visualization GUIDs to retrieve the SQL query data for visualizations in the Liveboard. Upon successful execution, the API returns the SQL queries for the specified object as shown in this example: ``` { \"metadata_id\": \"fa68ae91-7588-4136-bacd-d71fb12dda69\", \"metadata_name\": \"Total Sales\", \"metadata_type\": \"LIVEBOARD\", \"sql_queries\": [ { \"metadata_id\": \"b3b6d2b9-089a-490c-8e16-b144650b7843\", \"metadata_name\": \"Total quantity purchased, Total sales by region\", \"sql_query\": \"SELECT \\n \\\"ta_1\\\".\\\"REGION\\\" \\\"ca_1\\\", \\n CASE\\n WHEN sum(\\\"ta_2\\\".\\\"QUANTITYPURCHASED\\\") IS NOT NULL THEN sum(\\\"ta_2\\\".\\\"QUANTITYPURCHASED\\\")\\n ELSE 0\\n END \\\"ca_2\\\", \\n CASE\\n WHEN sum(\\\"ta_2\\\".\\\"SALES\\\") IS NOT NULL THEN sum(\\\"ta_2\\\".\\\"SALES\\\")\\n ELSE 0\\n END \\\"ca_3\\\"\\nFROM \\\"RETAILAPPAREL\\\".\\\"PUBLIC\\\".\\\"FACT_RETAPP_SALES\\\" \\\"ta_2\\\"\\n JOIN \\\"RETAILAPPAREL\\\".\\\"PUBLIC\\\".\\\"DIM_RETAPP_STORES\\\" \\\"ta_1\\\"\\n ON \\\"ta_2\\\".\\\"STOREID\\\" = \\\"ta_1\\\".\\\"STOREID\\\"\\nGROUP BY \\\"ca_1\\\"\" } ] } ``` + * @param fetchLiveboardSqlQueryRequest + */ + public async fetchLiveboardSqlQuery(fetchLiveboardSqlQueryRequest: FetchLiveboardSqlQueryRequest, _options?: Configuration): Promise { + let _config = _options || this.configuration; + + // verify required parameter 'fetchLiveboardSqlQueryRequest' is not null or undefined + if (fetchLiveboardSqlQueryRequest === null || fetchLiveboardSqlQueryRequest === undefined) { + throw new RequiredError("MetadataApi", "fetchLiveboardSqlQuery", "fetchLiveboardSqlQueryRequest"); + } + + + // Path Params + const localVarPath = '/api/rest/2.0/metadata/liveboard/sql'; + + // Make Request Context + const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.POST); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.25.0") + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.25.0") + + + + + // Body Params + const contentType = ObjectSerializer.getPreferredMediaType([ + "application/json" + ]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = ObjectSerializer.stringify( + ObjectSerializer.serialize(fetchLiveboardSqlQueryRequest, "FetchLiveboardSqlQueryRequest", ""), + contentType + ); + requestContext.setBody(serializedBody); + + let authMethod: SecurityAuthentication | undefined; + // Apply auth methods + authMethod = _config.authMethods["bearerAuth"] + if (authMethod?.applySecurityAuthentication) { + await authMethod?.applySecurityAuthentication(requestContext); + } + + const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default + if (defaultAuth?.applySecurityAuthentication) { + await defaultAuth?.applySecurityAuthentication(requestContext); + } + + return requestContext; + } + + /** + * Version: 9.0.0.cl or later Imports [TML](https://docs.thoughtspot.com/cloud/latest/tml) files into ThoughtSpot. Requires `DATAMANAGEMENT` (**Can manage data**) or `ADMINISTRATION` (**Can administer ThoughtsSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the following Data control privileges may be required: - `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) - `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` (**Can manage data models**) #### Usage guidelines * Import all related objects in a single TML Import API call. For example, Tables that use the same Connection object and Worksheets connected to these Tables. * Include the `fqn` property to distinguish objects that have the same name. For example, if you have multiple Connections or Worksheets with the same name on ThoughtSpot and the Connection or Worksheet referenced in your TML file does not have a unique name to distinguish, it may result in invalid object references. Adding `fqn` helps ThoughtSpot differentiate a Table from another with the same name. We recommend [exporting TML with FQNs](#/http/api-endpoints/metadata/export-metadata-tml) and using these during the import operation. * You can upload multiple TML files at a time. If you import a Worksheet along with Liveboards, Answers, and other dependent objects in a single API call, the imported objects will be immediately available for use. When you import only a Worksheet object, it may take some time for the Worksheet to become available in the ThoughtSpot system. Please wait for a few minutes, and then proceed to create an Answer and Liveboard from the newly imported Worksheet. For more information, see [TML Documentation](https://developers.thoughtspot.com/docs/tml#_import_a_tml). + * @param importMetadataTMLRequest + */ + public async importMetadataTML(importMetadataTMLRequest: ImportMetadataTMLRequest, _options?: Configuration): Promise { + let _config = _options || this.configuration; + + // verify required parameter 'importMetadataTMLRequest' is not null or undefined + if (importMetadataTMLRequest === null || importMetadataTMLRequest === undefined) { + throw new RequiredError("MetadataApi", "importMetadataTML", "importMetadataTMLRequest"); + } + + + // Path Params + const localVarPath = '/api/rest/2.0/metadata/tml/import'; + + // Make Request Context + const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.POST); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.25.0") + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.25.0") + + + + + // Body Params + const contentType = ObjectSerializer.getPreferredMediaType([ + "application/json" + ]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = ObjectSerializer.stringify( + ObjectSerializer.serialize(importMetadataTMLRequest, "ImportMetadataTMLRequest", ""), + contentType + ); + requestContext.setBody(serializedBody); + + let authMethod: SecurityAuthentication | undefined; + // Apply auth methods + authMethod = _config.authMethods["bearerAuth"] + if (authMethod?.applySecurityAuthentication) { + await authMethod?.applySecurityAuthentication(requestContext); + } + + const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default + if (defaultAuth?.applySecurityAuthentication) { + await defaultAuth?.applySecurityAuthentication(requestContext); + } + + return requestContext; + } + + /** + * Version: 10.4.0.cl or later Schedules a task to import [TML](https://docs.thoughtspot.com/cloud/latest/tml) files into ThoughtSpot. You can use this API endpoint to process TML objects asynchronously when importing TMLs of large and complex metadata objects into ThoughtSpot. Unlike the synchronous import TML operation, the API processes TML data in the background and returns a task ID, which can be used to check the status of the import task via `/api/rest/2.0/metadata/tml/async/status` API endpoint. Requires `DATAMANAGEMENT` (**Can manage data**) or `ADMINISTRATION` (**Can administer ThoughtsSpot**) privilege, and edit access to the TML objects. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the following Data control privileges may be required: - `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) - `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` (**Can manage data models**) #### Usage guidelines See [Async TML API Documentation](https://developers.thoughtspot.com/docs/tml#_import_tml_objects_asynchronously) for usage guidelines. + * @param importMetadataTMLAsyncRequest + */ + public async importMetadataTMLAsync(importMetadataTMLAsyncRequest: ImportMetadataTMLAsyncRequest, _options?: Configuration): Promise { + let _config = _options || this.configuration; + + // verify required parameter 'importMetadataTMLAsyncRequest' is not null or undefined + if (importMetadataTMLAsyncRequest === null || importMetadataTMLAsyncRequest === undefined) { + throw new RequiredError("MetadataApi", "importMetadataTMLAsync", "importMetadataTMLAsyncRequest"); + } + + + // Path Params + const localVarPath = '/api/rest/2.0/metadata/tml/async/import'; + + // Make Request Context + const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.POST); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.25.0") + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.25.0") + + + + + // Body Params + const contentType = ObjectSerializer.getPreferredMediaType([ + "application/json" + ]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = ObjectSerializer.stringify( + ObjectSerializer.serialize(importMetadataTMLAsyncRequest, "ImportMetadataTMLAsyncRequest", ""), + contentType + ); + requestContext.setBody(serializedBody); + + let authMethod: SecurityAuthentication | undefined; + // Apply auth methods + authMethod = _config.authMethods["bearerAuth"] + if (authMethod?.applySecurityAuthentication) { + await authMethod?.applySecurityAuthentication(requestContext); + } + + const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default + if (defaultAuth?.applySecurityAuthentication) { + await defaultAuth?.applySecurityAuthentication(requestContext); + } + + return requestContext; + } + + /** + * Parameterize fields in metadata objects. Version: 10.9.0.cl or later **Note:** This API endpoint is deprecated and will be removed from ThoughtSpot in a future release. Use [POST /api/rest/2.0/metadata/parameterize-fields](/api/rest/2.0/metadata/parameterize-fields) instead. Allows parameterizing fields in metadata objects in ThoughtSpot. Requires appropriate permissions to modify the metadata object. The API endpoint allows parameterizing the following types of metadata objects: * Logical Tables * Connections * Connection Configs For a Logical Table the field type must be `ATTRIBUTE` and field name can be one of: * databaseName * schemaName * tableName For a Connection or Connection Config, the field type is always `CONNECTION_PROPERTY`. In this case, field_name specifies the exact property of the Connection or Connection Config that needs to be parameterized. For Connection Config, the only supported field name is: * impersonate_user + * @param parameterizeMetadataRequest + */ + public async parameterizeMetadata(parameterizeMetadataRequest: ParameterizeMetadataRequest, _options?: Configuration): Promise { + let _config = _options || this.configuration; + + // verify required parameter 'parameterizeMetadataRequest' is not null or undefined + if (parameterizeMetadataRequest === null || parameterizeMetadataRequest === undefined) { + throw new RequiredError("MetadataApi", "parameterizeMetadata", "parameterizeMetadataRequest"); + } + + + // Path Params + const localVarPath = '/api/rest/2.0/metadata/parameterize'; + + // Make Request Context + const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.POST); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.25.0") + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.25.0") + + + + + // Body Params + const contentType = ObjectSerializer.getPreferredMediaType([ + "application/json" + ]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = ObjectSerializer.stringify( + ObjectSerializer.serialize(parameterizeMetadataRequest, "ParameterizeMetadataRequest", ""), + contentType + ); + requestContext.setBody(serializedBody); + + let authMethod: SecurityAuthentication | undefined; + // Apply auth methods + authMethod = _config.authMethods["bearerAuth"] + if (authMethod?.applySecurityAuthentication) { + await authMethod?.applySecurityAuthentication(requestContext); + } + + const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default + if (defaultAuth?.applySecurityAuthentication) { + await defaultAuth?.applySecurityAuthentication(requestContext); + } + + return requestContext; + } + + /** + * Parameterize multiple fields of metadata objects. For example [schemaName, databaseName] for LOGICAL_TABLE. Version: 26.5.0.cl or later Allows parameterizing multiple fields of metadata objects in ThoughtSpot. For example, you can parameterize [schemaName, databaseName] for LOGICAL_TABLE. Requires appropriate permissions to modify the metadata object. The API endpoint allows parameterizing the following types of metadata objects: * Logical Tables * Connections * Connection Configs For a Logical Table, the field type must be `ATTRIBUTE` and field names can include: * databaseName * schemaName * tableName For a Connection or Connection Config, the field type is always `CONNECTION_PROPERTY`. In this case, field_names specifies the exact properties of the Connection or Connection Config that need to be parameterized. For Connection Config, supported field names include: * impersonate_user You can parameterize multiple fields at once by providing an array of field names. + * @param parameterizeMetadataFieldsRequest + */ + public async parameterizeMetadataFields(parameterizeMetadataFieldsRequest: ParameterizeMetadataFieldsRequest, _options?: Configuration): Promise { + let _config = _options || this.configuration; + + // verify required parameter 'parameterizeMetadataFieldsRequest' is not null or undefined + if (parameterizeMetadataFieldsRequest === null || parameterizeMetadataFieldsRequest === undefined) { + throw new RequiredError("MetadataApi", "parameterizeMetadataFields", "parameterizeMetadataFieldsRequest"); + } + + + // Path Params + const localVarPath = '/api/rest/2.0/metadata/parameterize-fields'; + + // Make Request Context + const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.POST); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.25.0") + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.25.0") + + + + + // Body Params + const contentType = ObjectSerializer.getPreferredMediaType([ + "application/json" + ]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = ObjectSerializer.stringify( + ObjectSerializer.serialize(parameterizeMetadataFieldsRequest, "ParameterizeMetadataFieldsRequest", ""), + contentType + ); + requestContext.setBody(serializedBody); + + let authMethod: SecurityAuthentication | undefined; + // Apply auth methods + authMethod = _config.authMethods["bearerAuth"] + if (authMethod?.applySecurityAuthentication) { + await authMethod?.applySecurityAuthentication(requestContext); + } + + const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default + if (defaultAuth?.applySecurityAuthentication) { + await defaultAuth?.applySecurityAuthentication(requestContext); + } + + return requestContext; + } + + /** + * Version: 9.0.0.cl or later Gets a list of metadata objects available on the ThoughtSpot system. This API endpoint is available to all users who have view access to the object. Users with `ADMINISTRATION` (**Can administer ThoughtSpot**) privileges can view data for all metadata objects, including users and groups. #### Usage guidelines - To get all metadata objects, send the API request without any attributes. - To get metadata objects of a specific type, set the `type` attribute. For example, to fetch a Worksheet, set the type as `LOGICAL_TABLE`. - To filter metadata objects within type `LOGICAL_TABLE`, set the `subtypes` attribute. For example, to fetch a Worksheet, set the type as `LOGICAL_TABLE` & subtypes as `[WORKSHEET]`. - To get a specific metadata object, specify the GUID. - To customize your search and filter the API response, you can use several parameters. You can search for objects created or modified by specific users, by tags applied to the objects, or by using the include parameters like `include_auto_created_objects`, `include_dependent_objects`, `include_headers`, `include_incomplete_objects`, and so on. You can also define sorting options to sort the data retrieved in the API response. - To get discoverable objects when linientmodel is enabled you can use `include_discoverable_objects` as true else false. Default value is true. - For liveboard metadata type, to get the newer format, set the `liveboard_response_format` as V2. Default value is V1. - To retrieve only objects that are published, set the `include_only_published_objects` as true. Default value is false. **NOTE**: The following parameters support pagination of metadata records: - `tag_identifiers` - `type` - `subtypes` - `created_by_user_identifiers` - `modified_by_user_identifiers` - `owned_by_user_identifiers` - `exclude_objects` - `include_auto_created_objects` - `favorite_object_options` - `include_only_published_objects` If you are using other parameters to search metadata, set `record_size` to `-1` and `record_offset` to `0`. + * @param searchMetadataRequest + */ + public async searchMetadata(searchMetadataRequest: SearchMetadataRequest, _options?: Configuration): Promise { + let _config = _options || this.configuration; + + // verify required parameter 'searchMetadataRequest' is not null or undefined + if (searchMetadataRequest === null || searchMetadataRequest === undefined) { + throw new RequiredError("MetadataApi", "searchMetadata", "searchMetadataRequest"); + } + + + // Path Params + const localVarPath = '/api/rest/2.0/metadata/search'; + + // Make Request Context + const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.POST); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.25.0") + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.25.0") + + + + + // Body Params + const contentType = ObjectSerializer.getPreferredMediaType([ + "application/json" + ]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = ObjectSerializer.stringify( + ObjectSerializer.serialize(searchMetadataRequest, "SearchMetadataRequest", ""), + contentType + ); + requestContext.setBody(serializedBody); + + let authMethod: SecurityAuthentication | undefined; + // Apply auth methods + authMethod = _config.authMethods["bearerAuth"] + if (authMethod?.applySecurityAuthentication) { + await authMethod?.applySecurityAuthentication(requestContext); + } + + const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default + if (defaultAuth?.applySecurityAuthentication) { + await defaultAuth?.applySecurityAuthentication(requestContext); + } + + return requestContext; + } + + /** + * Remove parameterization from fields in metadata objects. Version: 26.5.0.cl or later Allows removing parameterization from fields in metadata objects in ThoughtSpot. Requires appropriate permissions to modify the metadata object. The API endpoint allows unparameterizing the following types of metadata objects: * Logical Tables * Connections * Connection Configs For a Logical Table the field type must be `ATTRIBUTE` and field name can be one of: * databaseName * schemaName * tableName For a Connection or Connection Config, the field type is always `CONNECTION_PROPERTY`. In this case, field_name specifies the exact property of the Connection or Connection Config that needs to be unparameterized. For Connection Config, the only supported field name is: * impersonate_user + * @param unparameterizeMetadataRequest + */ + public async unparameterizeMetadata(unparameterizeMetadataRequest: UnparameterizeMetadataRequest, _options?: Configuration): Promise { + let _config = _options || this.configuration; + + // verify required parameter 'unparameterizeMetadataRequest' is not null or undefined + if (unparameterizeMetadataRequest === null || unparameterizeMetadataRequest === undefined) { + throw new RequiredError("MetadataApi", "unparameterizeMetadata", "unparameterizeMetadataRequest"); + } + + + // Path Params + const localVarPath = '/api/rest/2.0/metadata/unparameterize'; + + // Make Request Context + const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.POST); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.25.0") + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.25.0") + + + + + // Body Params + const contentType = ObjectSerializer.getPreferredMediaType([ + "application/json" + ]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = ObjectSerializer.stringify( + ObjectSerializer.serialize(unparameterizeMetadataRequest, "UnparameterizeMetadataRequest", ""), + contentType + ); + requestContext.setBody(serializedBody); + + let authMethod: SecurityAuthentication | undefined; + // Apply auth methods + authMethod = _config.authMethods["bearerAuth"] + if (authMethod?.applySecurityAuthentication) { + await authMethod?.applySecurityAuthentication(requestContext); + } + + const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default + if (defaultAuth?.applySecurityAuthentication) { + await defaultAuth?.applySecurityAuthentication(requestContext); + } + + return requestContext; + } + + /** + * Update header attributes for a given list of header objects. Version: 10.6.0.cl or later ## Prerequisites - **Privileges Required:** - `DATAMANAGEMENT` (Can manage data) or `ADMINISTRATION` (Can administer ThoughtSpot). - **Additional Privileges (if RBAC is enabled):** - `ORG_ADMINISTRATION` (Can manage orgs). --- ## Usage Guidelines ### Parameters 1. **headers_update** - **Description:** List of header objects with their attributes to be updated. Each object contains a list of attributes to be updated in the header. - **Usage:** - You must provide either `identifier` or `obj_identifier`, but not both. Both fields cannot be empty. - When `org_identifier` is set to `-1`, only the `identifier` value is accepted; `obj_identifier` is not allowed. 2. **org_identifier** - **Description:** GUID (Globally Unique Identifier) or name of the organization. - **Usage:** - Leaving this field empty assumes that the changes should be applied to the current organization - Provide `org_guid` or `org_name` to uniquely identify the organization where changes need to be applied. . - Provide `-1` if changes have to be applied across all the org. --- ## Note Currently, this API is enabled only for updating the `obj_identifier` attribute. Only `text` will be allowed in attribute\'s value. ## Best Practices 1. **Backup Before Conversion:** Always export metadata as a backup before initiating the update process --- ## Examples ### Only `identifier` is given ```json { \"headers_update\": [ { \"identifier\": \"guid_1\", \"obj_identifier\": \"\", \"type\": \"LOGICAL_COLUMN\", \"attributes\": [ { \"name\": \"obj_id\", \"value\": \"custom_object_id\" } ] } ], \"org_identifier\": \"orgGuid\" } ``` ### Only `obj_identifier` is given ```json { \"headers_update\": [ { \"obj_identifier\": \"custom_object_id\", \"type\": \"ANSWER\", \"attributes\": [ { \"name\": \"obj_id\", \"value\": \"custom_object_id\" } ] } ], \"org_identifier\": \"orgName\" } ``` ### Executing update for all org `-1` ```json { \"headers_update\": [ { \"identifier\": \"guid_1\", \"type\": \"ANSWER\", \"attributes\": [ { \"name\": \"obj_id\", \"value\": \"custom_object_id\" } ] } ], \"org_identifier\": -1 } ``` ### Optional `type` is not provided ```json { \"headers_update\": [ { \"identifier\": \"guid_1\", \"attributes\": [ { \"name\": \"obj_id\", \"value\": \"custom_object_id\" } ] } ], \"org_identifier\": -1 } ``` + * @param updateMetadataHeaderRequest + */ + public async updateMetadataHeader(updateMetadataHeaderRequest: UpdateMetadataHeaderRequest, _options?: Configuration): Promise { + let _config = _options || this.configuration; + + // verify required parameter 'updateMetadataHeaderRequest' is not null or undefined + if (updateMetadataHeaderRequest === null || updateMetadataHeaderRequest === undefined) { + throw new RequiredError("MetadataApi", "updateMetadataHeader", "updateMetadataHeaderRequest"); + } + + + // Path Params + const localVarPath = '/api/rest/2.0/metadata/headers/update'; + + // Make Request Context + const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.POST); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.25.0") + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.25.0") + + + + + // Body Params + const contentType = ObjectSerializer.getPreferredMediaType([ + "application/json" + ]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = ObjectSerializer.stringify( + ObjectSerializer.serialize(updateMetadataHeaderRequest, "UpdateMetadataHeaderRequest", ""), + contentType + ); + requestContext.setBody(serializedBody); + + let authMethod: SecurityAuthentication | undefined; + // Apply auth methods + authMethod = _config.authMethods["bearerAuth"] + if (authMethod?.applySecurityAuthentication) { + await authMethod?.applySecurityAuthentication(requestContext); + } + + const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default + if (defaultAuth?.applySecurityAuthentication) { + await defaultAuth?.applySecurityAuthentication(requestContext); + } + + return requestContext; + } + + /** + * Update object IDs for given metadata objects. Version: 10.8.0.cl or later ## Prerequisites - **Privileges Required:** - `DATAMANAGEMENT` (Can manage data) or `ADMINISTRATION` (Can administer ThoughtSpot). - **Additional Privileges (if RBAC is enabled):** - `ORG_ADMINISTRATION` (Can manage orgs). --- ## Usage Guidelines ### Parameters 1. **metadata** - **Description:** List of metadata objects to update their object IDs. - **Usage:** - Use either `current_obj_id` alone OR use `metadata_identifier` with `type` (when needed). - When using `metadata_identifier`, the `type` field is required if using a name instead of a GUID. - The `new_obj_id` field is always required. --- ## Note This API is specifically designed for updating object IDs of metadata objects. It internally uses the header update mechanism to perform the changes. ## Best Practices 1. **Backup Before Update:** Always export metadata as a backup before initiating the update process. 2. **Validation:** - When using `current_obj_id`, ensure it matches the existing object ID exactly. - When using `metadata_identifier` with a name, ensure the `type` is specified correctly. - Verify that the `new_obj_id` follows your naming conventions and is unique within your system. --- ## Examples ### Using current_obj_id ```json { \"metadata\": [ { \"current_obj_id\": \"existing_object_id\", \"new_obj_id\": \"new_object_id\" } ] } ``` ### Using metadata_identifier with GUID ```json { \"metadata\": [ { \"metadata_identifier\": \"01234567-89ab-cdef-0123-456789abcdef\", \"new_obj_id\": \"new_object_id\" } ] } ``` ### Using metadata_identifier with name and type ```json { \"metadata\": [ { \"metadata_identifier\": \"My Answer\", \"type\": \"ANSWER\", \"new_obj_id\": \"new_object_id\" } ] } ``` ### Multiple objects update ```json { \"metadata\": [ { \"current_obj_id\": \"existing_object_id_1\", \"new_obj_id\": \"new_object_id_1\" }, { \"metadata_identifier\": \"My Worksheet\", \"type\": \"LOGICAL_TABLE\", \"new_obj_id\": \"new_object_id_2\" } ] } ``` + * @param updateMetadataObjIdRequest + */ + public async updateMetadataObjId(updateMetadataObjIdRequest: UpdateMetadataObjIdRequest, _options?: Configuration): Promise { + let _config = _options || this.configuration; + + // verify required parameter 'updateMetadataObjIdRequest' is not null or undefined + if (updateMetadataObjIdRequest === null || updateMetadataObjIdRequest === undefined) { + throw new RequiredError("MetadataApi", "updateMetadataObjId", "updateMetadataObjIdRequest"); + } + + + // Path Params + const localVarPath = '/api/rest/2.0/metadata/update-obj-id'; + + // Make Request Context + const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.POST); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.25.0") + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.25.0") + + + + + // Body Params + const contentType = ObjectSerializer.getPreferredMediaType([ + "application/json" + ]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = ObjectSerializer.stringify( + ObjectSerializer.serialize(updateMetadataObjIdRequest, "UpdateMetadataObjIdRequest", ""), + contentType + ); + requestContext.setBody(serializedBody); + + let authMethod: SecurityAuthentication | undefined; + // Apply auth methods + authMethod = _config.authMethods["bearerAuth"] + if (authMethod?.applySecurityAuthentication) { + await authMethod?.applySecurityAuthentication(requestContext); + } + + const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default + if (defaultAuth?.applySecurityAuthentication) { + await defaultAuth?.applySecurityAuthentication(requestContext); + } + + return requestContext; + } + +} + +export class MetadataApiResponseProcessor { + + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to convertWorksheetToModel + * @throws ApiException if the response code was not in [200, 299] + */ + public async convertWorksheetToModel(response: ResponseContext): Promise { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("200", response.httpStatusCode)) { + const body: ResponseWorksheetToModelConversion = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ResponseWorksheetToModelConversion", "" + ) as ResponseWorksheetToModelConversion; + return body; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Invalid request.", body, response.headers); + } + if (isCodeInRange("401", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Unexpected error", body, response.headers); + } + + // Work around for missing responses in specification, e.g. for petstore.yaml + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body: ResponseWorksheetToModelConversion = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ResponseWorksheetToModelConversion", "" + ) as ResponseWorksheetToModelConversion; + return body; + } + + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", await response.getBodyAsAny(), response.headers); + } + + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to copyObject + * @throws ApiException if the response code was not in [200, 299] + */ + public async copyObject(response: ResponseContext): Promise { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("200", response.httpStatusCode)) { + const body: ResponseCopyObject = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ResponseCopyObject", "" + ) as ResponseCopyObject; + return body; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Invalid request.", body, response.headers); + } + if (isCodeInRange("401", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } + if (isCodeInRange("404", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Object not found", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Unexpected error", body, response.headers); + } + + // Work around for missing responses in specification, e.g. for petstore.yaml + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body: ResponseCopyObject = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ResponseCopyObject", "" + ) as ResponseCopyObject; + return body; + } + + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", await response.getBodyAsAny(), response.headers); + } + + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to deleteMetadata + * @throws ApiException if the response code was not in [200, 299] + */ + public async deleteMetadata(response: ResponseContext): Promise { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("204", response.httpStatusCode)) { + return; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Invalid request.", body, response.headers); + } + if (isCodeInRange("401", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Unexpected error", body, response.headers); + } + + // Work around for missing responses in specification, e.g. for petstore.yaml + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body: void = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "void", "" + ) as void; + return body; + } + + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", await response.getBodyAsAny(), response.headers); + } + + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to exportMetadataTML + * @throws ApiException if the response code was not in [200, 299] + */ + public async exportMetadataTML(response: ResponseContext): Promise > { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("200", response.httpStatusCode)) { + const body: Array = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "Array", "" + ) as Array; + return body; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Invalid request.", body, response.headers); + } + if (isCodeInRange("401", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Unexpected error", body, response.headers); + } + + // Work around for missing responses in specification, e.g. for petstore.yaml + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body: Array = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "Array", "" + ) as Array; + return body; + } + + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", await response.getBodyAsAny(), response.headers); + } + + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to exportMetadataTMLBatched + * @throws ApiException if the response code was not in [200, 299] + */ + public async exportMetadataTMLBatched(response: ResponseContext): Promise { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("200", response.httpStatusCode)) { + const body: any = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "any", "" + ) as any; + return body; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Invalid request.", body, response.headers); + } + if (isCodeInRange("401", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Unexpected error", body, response.headers); + } + + // Work around for missing responses in specification, e.g. for petstore.yaml + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body: any = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "any", "" + ) as any; + return body; + } + + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", await response.getBodyAsAny(), response.headers); + } + + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to fetchAnswerSqlQuery + * @throws ApiException if the response code was not in [200, 299] + */ + public async fetchAnswerSqlQuery(response: ResponseContext): Promise { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("200", response.httpStatusCode)) { + const body: SqlQueryResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "SqlQueryResponse", "" + ) as SqlQueryResponse; + return body; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Invalid request.", body, response.headers); + } + if (isCodeInRange("401", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Unexpected error", body, response.headers); + } + + // Work around for missing responses in specification, e.g. for petstore.yaml + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body: SqlQueryResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "SqlQueryResponse", "" + ) as SqlQueryResponse; + return body; + } + + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", await response.getBodyAsAny(), response.headers); + } + + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to fetchAsyncImportTaskStatus + * @throws ApiException if the response code was not in [200, 299] + */ + public async fetchAsyncImportTaskStatus(response: ResponseContext): Promise { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("200", response.httpStatusCode)) { + const body: GetAsyncImportStatusResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "GetAsyncImportStatusResponse", "" + ) as GetAsyncImportStatusResponse; + return body; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Invalid request.", body, response.headers); + } + if (isCodeInRange("401", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Unexpected error", body, response.headers); + } + + // Work around for missing responses in specification, e.g. for petstore.yaml + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body: GetAsyncImportStatusResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "GetAsyncImportStatusResponse", "" + ) as GetAsyncImportStatusResponse; + return body; + } + + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", await response.getBodyAsAny(), response.headers); + } + + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to fetchLiveboardSqlQuery + * @throws ApiException if the response code was not in [200, 299] + */ + public async fetchLiveboardSqlQuery(response: ResponseContext): Promise { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("200", response.httpStatusCode)) { + const body: SqlQueryResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "SqlQueryResponse", "" + ) as SqlQueryResponse; + return body; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Invalid request.", body, response.headers); + } + if (isCodeInRange("401", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Unexpected error", body, response.headers); + } + + // Work around for missing responses in specification, e.g. for petstore.yaml + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body: SqlQueryResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "SqlQueryResponse", "" + ) as SqlQueryResponse; + return body; + } + + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", await response.getBodyAsAny(), response.headers); + } + + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to importMetadataTML + * @throws ApiException if the response code was not in [200, 299] + */ + public async importMetadataTML(response: ResponseContext): Promise > { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("200", response.httpStatusCode)) { + const body: Array = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "Array", "" + ) as Array; + return body; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Invalid request.", body, response.headers); + } + if (isCodeInRange("401", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Unexpected error", body, response.headers); + } + + // Work around for missing responses in specification, e.g. for petstore.yaml + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body: Array = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "Array", "" + ) as Array; + return body; + } + + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", await response.getBodyAsAny(), response.headers); + } + + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to importMetadataTMLAsync + * @throws ApiException if the response code was not in [200, 299] + */ + public async importMetadataTMLAsync(response: ResponseContext): Promise { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("200", response.httpStatusCode)) { + const body: ImportEPackAsyncTaskStatus = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ImportEPackAsyncTaskStatus", "" + ) as ImportEPackAsyncTaskStatus; + return body; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Invalid request.", body, response.headers); + } + if (isCodeInRange("401", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Unexpected error", body, response.headers); + } + + // Work around for missing responses in specification, e.g. for petstore.yaml + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body: ImportEPackAsyncTaskStatus = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ImportEPackAsyncTaskStatus", "" + ) as ImportEPackAsyncTaskStatus; + return body; + } + + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", await response.getBodyAsAny(), response.headers); + } + + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to parameterizeMetadata + * @throws ApiException if the response code was not in [200, 299] + */ + public async parameterizeMetadata(response: ResponseContext): Promise { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("204", response.httpStatusCode)) { + return; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Invalid request.", body, response.headers); + } + if (isCodeInRange("401", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Unexpected error", body, response.headers); + } + + // Work around for missing responses in specification, e.g. for petstore.yaml + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body: void = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "void", "" + ) as void; + return body; + } + + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", await response.getBodyAsAny(), response.headers); + } + + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to parameterizeMetadataFields + * @throws ApiException if the response code was not in [200, 299] + */ + public async parameterizeMetadataFields(response: ResponseContext): Promise { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("204", response.httpStatusCode)) { + return; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Invalid request.", body, response.headers); + } + if (isCodeInRange("401", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Unexpected error", body, response.headers); + } + + // Work around for missing responses in specification, e.g. for petstore.yaml + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body: void = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "void", "" + ) as void; + return body; + } + + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", await response.getBodyAsAny(), response.headers); + } + + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to searchMetadata + * @throws ApiException if the response code was not in [200, 299] + */ + public async searchMetadata(response: ResponseContext): Promise > { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("200", response.httpStatusCode)) { + const body: Array = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "Array", "" + ) as Array; + return body; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Invalid request.", body, response.headers); + } + if (isCodeInRange("401", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Unexpected error", body, response.headers); + } + + // Work around for missing responses in specification, e.g. for petstore.yaml + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body: Array = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "Array", "" + ) as Array; + return body; + } + + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", await response.getBodyAsAny(), response.headers); + } + + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to unparameterizeMetadata + * @throws ApiException if the response code was not in [200, 299] + */ + public async unparameterizeMetadata(response: ResponseContext): Promise { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("204", response.httpStatusCode)) { + return; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Invalid request.", body, response.headers); + } + if (isCodeInRange("401", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Unexpected error", body, response.headers); + } + + // Work around for missing responses in specification, e.g. for petstore.yaml + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body: void = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "void", "" + ) as void; + return body; + } + + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", await response.getBodyAsAny(), response.headers); + } + + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to updateMetadataHeader + * @throws ApiException if the response code was not in [200, 299] + */ + public async updateMetadataHeader(response: ResponseContext): Promise { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("204", response.httpStatusCode)) { + return; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Invalid request.", body, response.headers); + } + if (isCodeInRange("401", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Unexpected error", body, response.headers); + } + + // Work around for missing responses in specification, e.g. for petstore.yaml + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body: void = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "void", "" + ) as void; + return body; + } + + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", await response.getBodyAsAny(), response.headers); + } + + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to updateMetadataObjId + * @throws ApiException if the response code was not in [200, 299] + */ + public async updateMetadataObjId(response: ResponseContext): Promise { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("204", response.httpStatusCode)) { + return; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Invalid request.", body, response.headers); + } + if (isCodeInRange("401", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Unexpected error", body, response.headers); + } + + // Work around for missing responses in specification, e.g. for petstore.yaml + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body: void = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "void", "" + ) as void; + return body; + } + + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", await response.getBodyAsAny(), response.headers); + } + +} diff --git a/sdks/typescript/apis/OrgsApi.ts b/sdks/typescript/apis/OrgsApi.ts new file mode 100644 index 000000000..0ab106637 --- /dev/null +++ b/sdks/typescript/apis/OrgsApi.ts @@ -0,0 +1,448 @@ +// TODO: better import syntax? +import {BaseAPIRequestFactory, RequiredError, COLLECTION_FORMATS} from './baseapi'; +import {Configuration} from '../configuration'; +import {RequestContext, HttpMethod, ResponseContext, HttpFile} from '../http/http'; +import {ObjectSerializer} from '../models/ObjectSerializer'; +import {ApiException} from './exception'; +import {canConsumeForm, isCodeInRange} from '../util'; +import {SecurityAuthentication} from '../auth/auth'; + + +import { CreateOrgRequest } from '../models/CreateOrgRequest'; +import { ErrorResponse } from '../models/ErrorResponse'; +import { OrgResponse } from '../models/OrgResponse'; +import { SearchOrgsRequest } from '../models/SearchOrgsRequest'; +import { UpdateOrgRequest } from '../models/UpdateOrgRequest'; + +/** + * no description + */ +export class OrgsApiRequestFactory extends BaseAPIRequestFactory { + + /** + * Version: 9.0.0.cl or later Creates an Org object. To use this API, the [Orgs](https://docs.thoughtspot.com/cloud/latest/orgs-overview) feature must be enabled in your cluster. Requires cluster administration (**Can administer Org**) privileges. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `ORG_ADMINISTRATION` (**Can manage Orgs**) privilege is required. + * @param createOrgRequest + */ + public async createOrg(createOrgRequest: CreateOrgRequest, _options?: Configuration): Promise { + let _config = _options || this.configuration; + + // verify required parameter 'createOrgRequest' is not null or undefined + if (createOrgRequest === null || createOrgRequest === undefined) { + throw new RequiredError("OrgsApi", "createOrg", "createOrgRequest"); + } + + + // Path Params + const localVarPath = '/api/rest/2.0/orgs/create'; + + // Make Request Context + const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.POST); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.25.0") + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.25.0") + + + + + // Body Params + const contentType = ObjectSerializer.getPreferredMediaType([ + "application/json" + ]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = ObjectSerializer.stringify( + ObjectSerializer.serialize(createOrgRequest, "CreateOrgRequest", ""), + contentType + ); + requestContext.setBody(serializedBody); + + let authMethod: SecurityAuthentication | undefined; + // Apply auth methods + authMethod = _config.authMethods["bearerAuth"] + if (authMethod?.applySecurityAuthentication) { + await authMethod?.applySecurityAuthentication(requestContext); + } + + const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default + if (defaultAuth?.applySecurityAuthentication) { + await defaultAuth?.applySecurityAuthentication(requestContext); + } + + return requestContext; + } + + /** + * Version: 9.0.0.cl or later Deletes an Org object from the ThoughtSpot system. Requires cluster administration (**Can administer Org**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `ORG_ADMINISTRATION` (**Can manage Orgs**) privilege is required. When you delete an Org, all its users and objects created in that Org context are removed. However, if the users in the deleted Org also exists in other Orgs, they are removed only from the deleted Org. + * @param orgIdentifier ID or name of the Org + */ + public async deleteOrg(orgIdentifier: string, _options?: Configuration): Promise { + let _config = _options || this.configuration; + + // verify required parameter 'orgIdentifier' is not null or undefined + if (orgIdentifier === null || orgIdentifier === undefined) { + throw new RequiredError("OrgsApi", "deleteOrg", "orgIdentifier"); + } + + + // Path Params + const localVarPath = '/api/rest/2.0/orgs/{org_identifier}/delete' + .replace('{' + 'org_identifier' + '}', encodeURIComponent(String(orgIdentifier))); + + // Make Request Context + const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.POST); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.25.0") + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.25.0") + + + + + let authMethod: SecurityAuthentication | undefined; + // Apply auth methods + authMethod = _config.authMethods["bearerAuth"] + if (authMethod?.applySecurityAuthentication) { + await authMethod?.applySecurityAuthentication(requestContext); + } + + const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default + if (defaultAuth?.applySecurityAuthentication) { + await defaultAuth?.applySecurityAuthentication(requestContext); + } + + return requestContext; + } + + /** + * Version: 9.0.0.cl or later Gets a list of Orgs configured on the ThoughtSpot system. To get details of a specific Org, specify the Org ID or name. You can also pass parameters such as status, visibility, and user identifiers to get a specific list of Orgs. Requires cluster administration (**Can administer Org**) privileges. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `ORG_ADMINISTRATION` (**Can manage Orgs**) privilege is required. + * @param searchOrgsRequest + */ + public async searchOrgs(searchOrgsRequest: SearchOrgsRequest, _options?: Configuration): Promise { + let _config = _options || this.configuration; + + // verify required parameter 'searchOrgsRequest' is not null or undefined + if (searchOrgsRequest === null || searchOrgsRequest === undefined) { + throw new RequiredError("OrgsApi", "searchOrgs", "searchOrgsRequest"); + } + + + // Path Params + const localVarPath = '/api/rest/2.0/orgs/search'; + + // Make Request Context + const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.POST); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.25.0") + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.25.0") + + + + + // Body Params + const contentType = ObjectSerializer.getPreferredMediaType([ + "application/json" + ]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = ObjectSerializer.stringify( + ObjectSerializer.serialize(searchOrgsRequest, "SearchOrgsRequest", ""), + contentType + ); + requestContext.setBody(serializedBody); + + let authMethod: SecurityAuthentication | undefined; + // Apply auth methods + authMethod = _config.authMethods["bearerAuth"] + if (authMethod?.applySecurityAuthentication) { + await authMethod?.applySecurityAuthentication(requestContext); + } + + const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default + if (defaultAuth?.applySecurityAuthentication) { + await defaultAuth?.applySecurityAuthentication(requestContext); + } + + return requestContext; + } + + /** + * Version: 9.0.0.cl or later Updates an Org object. You can modify Org properties such as name, description, and user associations. Requires cluster administration (**Can administer Org**) privileges. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `ORG_ADMINISTRATION` (**Can manage Orgs**) privilege is required. + * @param orgIdentifier ID or name of the Org + * @param updateOrgRequest + */ + public async updateOrg(orgIdentifier: string, updateOrgRequest: UpdateOrgRequest, _options?: Configuration): Promise { + let _config = _options || this.configuration; + + // verify required parameter 'orgIdentifier' is not null or undefined + if (orgIdentifier === null || orgIdentifier === undefined) { + throw new RequiredError("OrgsApi", "updateOrg", "orgIdentifier"); + } + + + // verify required parameter 'updateOrgRequest' is not null or undefined + if (updateOrgRequest === null || updateOrgRequest === undefined) { + throw new RequiredError("OrgsApi", "updateOrg", "updateOrgRequest"); + } + + + // Path Params + const localVarPath = '/api/rest/2.0/orgs/{org_identifier}/update' + .replace('{' + 'org_identifier' + '}', encodeURIComponent(String(orgIdentifier))); + + // Make Request Context + const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.POST); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.25.0") + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.25.0") + + + + + // Body Params + const contentType = ObjectSerializer.getPreferredMediaType([ + "application/json" + ]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = ObjectSerializer.stringify( + ObjectSerializer.serialize(updateOrgRequest, "UpdateOrgRequest", ""), + contentType + ); + requestContext.setBody(serializedBody); + + let authMethod: SecurityAuthentication | undefined; + // Apply auth methods + authMethod = _config.authMethods["bearerAuth"] + if (authMethod?.applySecurityAuthentication) { + await authMethod?.applySecurityAuthentication(requestContext); + } + + const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default + if (defaultAuth?.applySecurityAuthentication) { + await defaultAuth?.applySecurityAuthentication(requestContext); + } + + return requestContext; + } + +} + +export class OrgsApiResponseProcessor { + + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to createOrg + * @throws ApiException if the response code was not in [200, 299] + */ + public async createOrg(response: ResponseContext): Promise { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("200", response.httpStatusCode)) { + const body: OrgResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "OrgResponse", "" + ) as OrgResponse; + return body; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Invalid request.", body, response.headers); + } + if (isCodeInRange("401", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Unexpected error", body, response.headers); + } + + // Work around for missing responses in specification, e.g. for petstore.yaml + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body: OrgResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "OrgResponse", "" + ) as OrgResponse; + return body; + } + + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", await response.getBodyAsAny(), response.headers); + } + + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to deleteOrg + * @throws ApiException if the response code was not in [200, 299] + */ + public async deleteOrg(response: ResponseContext): Promise { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("204", response.httpStatusCode)) { + return; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Invalid request.", body, response.headers); + } + if (isCodeInRange("401", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Unexpected error", body, response.headers); + } + + // Work around for missing responses in specification, e.g. for petstore.yaml + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body: void = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "void", "" + ) as void; + return body; + } + + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", await response.getBodyAsAny(), response.headers); + } + + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to searchOrgs + * @throws ApiException if the response code was not in [200, 299] + */ + public async searchOrgs(response: ResponseContext): Promise > { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("200", response.httpStatusCode)) { + const body: Array = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "Array", "" + ) as Array; + return body; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Invalid request.", body, response.headers); + } + if (isCodeInRange("401", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Unexpected error", body, response.headers); + } + + // Work around for missing responses in specification, e.g. for petstore.yaml + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body: Array = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "Array", "" + ) as Array; + return body; + } + + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", await response.getBodyAsAny(), response.headers); + } + + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to updateOrg + * @throws ApiException if the response code was not in [200, 299] + */ + public async updateOrg(response: ResponseContext): Promise { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("204", response.httpStatusCode)) { + return; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Invalid request.", body, response.headers); + } + if (isCodeInRange("401", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Unexpected error", body, response.headers); + } + + // Work around for missing responses in specification, e.g. for petstore.yaml + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body: void = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "void", "" + ) as void; + return body; + } + + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", await response.getBodyAsAny(), response.headers); + } + +} diff --git a/sdks/typescript/apis/ReportsApi.ts b/sdks/typescript/apis/ReportsApi.ts new file mode 100644 index 000000000..78e286d9d --- /dev/null +++ b/sdks/typescript/apis/ReportsApi.ts @@ -0,0 +1,234 @@ +// TODO: better import syntax? +import {BaseAPIRequestFactory, RequiredError, COLLECTION_FORMATS} from './baseapi'; +import {Configuration} from '../configuration'; +import {RequestContext, HttpMethod, ResponseContext, HttpFile} from '../http/http'; +import {ObjectSerializer} from '../models/ObjectSerializer'; +import {ApiException} from './exception'; +import {canConsumeForm, isCodeInRange} from '../util'; +import {SecurityAuthentication} from '../auth/auth'; + + +import { ErrorResponse } from '../models/ErrorResponse'; +import { ExportAnswerReportRequest } from '../models/ExportAnswerReportRequest'; +import { ExportLiveboardReportRequest } from '../models/ExportLiveboardReportRequest'; + +/** + * no description + */ +export class ReportsApiRequestFactory extends BaseAPIRequestFactory { + + /** + * Version: 9.0.0.cl or later Exports an Answer in the given file format. You can download the Answer data as a PDF, PNG, CSV, or XLSX file. Requires at least view access to the Answer. #### Usage guidelines In the request body, specify the GUID or name of the Answer and set `file_format`. The default file format is CSV. Use the `type` parameter to specify whether the Answer being exported is a saved Answer (`SAVED`) or a pinned Answer on a Liveboard (`PINNED`). Defaults to `SAVED`. When using `PINNED`, the `metadata_identifier` must be the container id. **NOTE**: * The downloadable file returned in API response file is extensionless. Please rename the downloaded file by typing in the relevant extension. * HTML rendering is not supported for PDF exports of Answers with tables. Optionally, you can define [runtime overrides](https://developers.thoughtspot.com/docs/fetch-data-and-report-apis#_runtime_overrides) to apply to the Answer data. + * @param exportAnswerReportRequest + */ + public async exportAnswerReport(exportAnswerReportRequest: ExportAnswerReportRequest, _options?: Configuration): Promise { + let _config = _options || this.configuration; + + // verify required parameter 'exportAnswerReportRequest' is not null or undefined + if (exportAnswerReportRequest === null || exportAnswerReportRequest === undefined) { + throw new RequiredError("ReportsApi", "exportAnswerReport", "exportAnswerReportRequest"); + } + + + // Path Params + const localVarPath = '/api/rest/2.0/report/answer'; + + // Make Request Context + const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.POST); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.25.0") + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.25.0") + + + + + // Body Params + const contentType = ObjectSerializer.getPreferredMediaType([ + "application/json" + ]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = ObjectSerializer.stringify( + ObjectSerializer.serialize(exportAnswerReportRequest, "ExportAnswerReportRequest", ""), + contentType + ); + requestContext.setBody(serializedBody); + + let authMethod: SecurityAuthentication | undefined; + // Apply auth methods + authMethod = _config.authMethods["bearerAuth"] + if (authMethod?.applySecurityAuthentication) { + await authMethod?.applySecurityAuthentication(requestContext); + } + + const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default + if (defaultAuth?.applySecurityAuthentication) { + await defaultAuth?.applySecurityAuthentication(requestContext); + } + + return requestContext; + } + + /** + * Version: 9.0.0.cl or later Exports a Liveboard and its visualizations in PDF, PNG, CSV, or XLSX file format. The default `file_format` is CSV. Requires at least view access to the Liveboard. #### Usage guidelines In the request body, specify the GUID or name of the Liveboard. To generate a Liveboard report with specific visualizations, add GUIDs or names of the visualizations. **NOTE**: * The downloadable file returned in API response file is extensionless. Please rename the downloaded file by typing in the relevant extension. * Optionally, you can define [runtime overrides](https://developers.thoughtspot.com/docs/fetch-data-and-report-apis#_runtime_overrides) to apply to the Answer data. * To include unsaved changes in the report, pass the `transient_pinboard_content` script generated from the `getExportRequestForCurrentPinboard` method in the Visual Embed SDK. Upon successful execution, the API returns the report with unsaved changes, including ad hoc changes to visualizations. For more information, see [Liveboard Report API](https://developers.thoughtspot.com/docs/fetch-data-and-report-apis#_liveboard_report_api). * Starting with ThoughtSpot Cloud 10.9.0.cl release, the Liveboard can be exported in the PNG format in the resolution of your choice. To enable this on your instance, contact ThoughtSpot support. When this feature is enabled, the options `include_cover_page`,`include_filter_page` within the `png_options` will not be available for PNG exports. * Starting with the ThoughtSpot Cloud 26.2.0.cl release, * Liveboards can be exported in CSV format. * All visualizations within a Liveboard can be exported as individual CSV files. * When exporting multiple visualizations or the entire Liveboard, the system returns the report as a compressed ZIP file containing the separate CSV files for each visualization. * Liveboards can also be exported in XLSX format. * All selected visualizations are consolidated into a single Excel workbook (.xlsx), with each visualization placed in its own worksheet (tab). * XLSX exports are limited to a maximum of 255 worksheets (tabs) per workbook. + * @param exportLiveboardReportRequest + */ + public async exportLiveboardReport(exportLiveboardReportRequest: ExportLiveboardReportRequest, _options?: Configuration): Promise { + let _config = _options || this.configuration; + + // verify required parameter 'exportLiveboardReportRequest' is not null or undefined + if (exportLiveboardReportRequest === null || exportLiveboardReportRequest === undefined) { + throw new RequiredError("ReportsApi", "exportLiveboardReport", "exportLiveboardReportRequest"); + } + + + // Path Params + const localVarPath = '/api/rest/2.0/report/liveboard'; + + // Make Request Context + const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.POST); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.25.0") + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.25.0") + + + + + // Body Params + const contentType = ObjectSerializer.getPreferredMediaType([ + "application/json" + ]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = ObjectSerializer.stringify( + ObjectSerializer.serialize(exportLiveboardReportRequest, "ExportLiveboardReportRequest", ""), + contentType + ); + requestContext.setBody(serializedBody); + + let authMethod: SecurityAuthentication | undefined; + // Apply auth methods + authMethod = _config.authMethods["bearerAuth"] + if (authMethod?.applySecurityAuthentication) { + await authMethod?.applySecurityAuthentication(requestContext); + } + + const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default + if (defaultAuth?.applySecurityAuthentication) { + await defaultAuth?.applySecurityAuthentication(requestContext); + } + + return requestContext; + } + +} + +export class ReportsApiResponseProcessor { + + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to exportAnswerReport + * @throws ApiException if the response code was not in [200, 299] + */ + public async exportAnswerReport(response: ResponseContext): Promise { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("200", response.httpStatusCode)) { + const body: HttpFile = await response.getBodyAsFile() as any as HttpFile; + return body; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "binary" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Invalid request.", body, response.headers); + } + if (isCodeInRange("401", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "binary" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "binary" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "binary" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Unexpected error", body, response.headers); + } + + // Work around for missing responses in specification, e.g. for petstore.yaml + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body: HttpFile = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "HttpFile", "binary" + ) as HttpFile; + return body; + } + + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", await response.getBodyAsAny(), response.headers); + } + + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to exportLiveboardReport + * @throws ApiException if the response code was not in [200, 299] + */ + public async exportLiveboardReport(response: ResponseContext): Promise { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("200", response.httpStatusCode)) { + const body: HttpFile = await response.getBodyAsFile() as any as HttpFile; + return body; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "binary" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Invalid request.", body, response.headers); + } + if (isCodeInRange("401", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "binary" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "binary" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "binary" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Unexpected error", body, response.headers); + } + + // Work around for missing responses in specification, e.g. for petstore.yaml + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body: HttpFile = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "HttpFile", "binary" + ) as HttpFile; + return body; + } + + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", await response.getBodyAsAny(), response.headers); + } + +} diff --git a/sdks/typescript/apis/RolesApi.ts b/sdks/typescript/apis/RolesApi.ts new file mode 100644 index 000000000..1019419ba --- /dev/null +++ b/sdks/typescript/apis/RolesApi.ts @@ -0,0 +1,453 @@ +// TODO: better import syntax? +import {BaseAPIRequestFactory, RequiredError, COLLECTION_FORMATS} from './baseapi'; +import {Configuration} from '../configuration'; +import {RequestContext, HttpMethod, ResponseContext, HttpFile} from '../http/http'; +import {ObjectSerializer} from '../models/ObjectSerializer'; +import {ApiException} from './exception'; +import {canConsumeForm, isCodeInRange} from '../util'; +import {SecurityAuthentication} from '../auth/auth'; + + +import { CreateRoleRequest } from '../models/CreateRoleRequest'; +import { ErrorResponse } from '../models/ErrorResponse'; +import { RoleResponse } from '../models/RoleResponse'; +import { SearchRoleResponse } from '../models/SearchRoleResponse'; +import { SearchRolesRequest } from '../models/SearchRolesRequest'; +import { UpdateRoleRequest } from '../models/UpdateRoleRequest'; + +/** + * no description + */ +export class RolesApiRequestFactory extends BaseAPIRequestFactory { + + /** + * Version: 9.5.0.cl or later Creates a Role object in ThoughtSpot. Available only if [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance. To create a Role, the `ROLE_ADMINISTRATION` (**Can manage roles**) privilege is required. + * @param createRoleRequest + */ + public async createRole(createRoleRequest: CreateRoleRequest, _options?: Configuration): Promise { + let _config = _options || this.configuration; + + // verify required parameter 'createRoleRequest' is not null or undefined + if (createRoleRequest === null || createRoleRequest === undefined) { + throw new RequiredError("RolesApi", "createRole", "createRoleRequest"); + } + + + // Path Params + const localVarPath = '/api/rest/2.0/roles/create'; + + // Make Request Context + const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.POST); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.25.0") + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.25.0") + + + + + // Body Params + const contentType = ObjectSerializer.getPreferredMediaType([ + "application/json" + ]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = ObjectSerializer.stringify( + ObjectSerializer.serialize(createRoleRequest, "CreateRoleRequest", ""), + contentType + ); + requestContext.setBody(serializedBody); + + let authMethod: SecurityAuthentication | undefined; + // Apply auth methods + authMethod = _config.authMethods["bearerAuth"] + if (authMethod?.applySecurityAuthentication) { + await authMethod?.applySecurityAuthentication(requestContext); + } + + const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default + if (defaultAuth?.applySecurityAuthentication) { + await defaultAuth?.applySecurityAuthentication(requestContext); + } + + return requestContext; + } + + /** + * Version: 9.5.0.cl or later Deletes a Role object from the ThoughtSpot system. Available only if [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance. To delete a Role, the `ROLE_ADMINISTRATION` (**Can manage roles**) privilege is required. + * @param roleIdentifier Unique ID or name of the Role. ReadOnly roles cannot be deleted. + */ + public async deleteRole(roleIdentifier: string, _options?: Configuration): Promise { + let _config = _options || this.configuration; + + // verify required parameter 'roleIdentifier' is not null or undefined + if (roleIdentifier === null || roleIdentifier === undefined) { + throw new RequiredError("RolesApi", "deleteRole", "roleIdentifier"); + } + + + // Path Params + const localVarPath = '/api/rest/2.0/roles/{role_identifier}/delete' + .replace('{' + 'role_identifier' + '}', encodeURIComponent(String(roleIdentifier))); + + // Make Request Context + const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.POST); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.25.0") + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.25.0") + + + + + let authMethod: SecurityAuthentication | undefined; + // Apply auth methods + authMethod = _config.authMethods["bearerAuth"] + if (authMethod?.applySecurityAuthentication) { + await authMethod?.applySecurityAuthentication(requestContext); + } + + const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default + if (defaultAuth?.applySecurityAuthentication) { + await defaultAuth?.applySecurityAuthentication(requestContext); + } + + return requestContext; + } + + /** + * Version: 9.5.0.cl or later Gets a list of Role objects from the ThoughtSpot system. Available if [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance. To search for Roles, the `ROLE_ADMINISTRATION` (**Can manage roles**) privilege is required. To get details of a specific Role object, specify the GUID or name. You can also filter the API response based on user group and Org identifiers, privileges assigned to the Role, and deprecation status. + * @param searchRolesRequest + */ + public async searchRoles(searchRolesRequest: SearchRolesRequest, _options?: Configuration): Promise { + let _config = _options || this.configuration; + + // verify required parameter 'searchRolesRequest' is not null or undefined + if (searchRolesRequest === null || searchRolesRequest === undefined) { + throw new RequiredError("RolesApi", "searchRoles", "searchRolesRequest"); + } + + + // Path Params + const localVarPath = '/api/rest/2.0/roles/search'; + + // Make Request Context + const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.POST); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.25.0") + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.25.0") + + + + + // Body Params + const contentType = ObjectSerializer.getPreferredMediaType([ + "application/json" + ]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = ObjectSerializer.stringify( + ObjectSerializer.serialize(searchRolesRequest, "SearchRolesRequest", ""), + contentType + ); + requestContext.setBody(serializedBody); + + let authMethod: SecurityAuthentication | undefined; + // Apply auth methods + authMethod = _config.authMethods["bearerAuth"] + if (authMethod?.applySecurityAuthentication) { + await authMethod?.applySecurityAuthentication(requestContext); + } + + const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default + if (defaultAuth?.applySecurityAuthentication) { + await defaultAuth?.applySecurityAuthentication(requestContext); + } + + return requestContext; + } + + /** + * Version: 9.5.0.cl or later Updates the properties of a Role object. Available only if [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance. To update a Role, the `ROLE_ADMINISTRATION` (**Can manage roles**) privilege is required. + * @param roleIdentifier Unique ID or name of the Role. + * @param updateRoleRequest + */ + public async updateRole(roleIdentifier: string, updateRoleRequest: UpdateRoleRequest, _options?: Configuration): Promise { + let _config = _options || this.configuration; + + // verify required parameter 'roleIdentifier' is not null or undefined + if (roleIdentifier === null || roleIdentifier === undefined) { + throw new RequiredError("RolesApi", "updateRole", "roleIdentifier"); + } + + + // verify required parameter 'updateRoleRequest' is not null or undefined + if (updateRoleRequest === null || updateRoleRequest === undefined) { + throw new RequiredError("RolesApi", "updateRole", "updateRoleRequest"); + } + + + // Path Params + const localVarPath = '/api/rest/2.0/roles/{role_identifier}/update' + .replace('{' + 'role_identifier' + '}', encodeURIComponent(String(roleIdentifier))); + + // Make Request Context + const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.POST); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.25.0") + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.25.0") + + + + + // Body Params + const contentType = ObjectSerializer.getPreferredMediaType([ + "application/json" + ]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = ObjectSerializer.stringify( + ObjectSerializer.serialize(updateRoleRequest, "UpdateRoleRequest", ""), + contentType + ); + requestContext.setBody(serializedBody); + + let authMethod: SecurityAuthentication | undefined; + // Apply auth methods + authMethod = _config.authMethods["bearerAuth"] + if (authMethod?.applySecurityAuthentication) { + await authMethod?.applySecurityAuthentication(requestContext); + } + + const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default + if (defaultAuth?.applySecurityAuthentication) { + await defaultAuth?.applySecurityAuthentication(requestContext); + } + + return requestContext; + } + +} + +export class RolesApiResponseProcessor { + + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to createRole + * @throws ApiException if the response code was not in [200, 299] + */ + public async createRole(response: ResponseContext): Promise { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("200", response.httpStatusCode)) { + const body: RoleResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "RoleResponse", "" + ) as RoleResponse; + return body; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Invalid parameters.", body, response.headers); + } + if (isCodeInRange("401", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Internal error", body, response.headers); + } + + // Work around for missing responses in specification, e.g. for petstore.yaml + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body: RoleResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "RoleResponse", "" + ) as RoleResponse; + return body; + } + + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", await response.getBodyAsAny(), response.headers); + } + + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to deleteRole + * @throws ApiException if the response code was not in [200, 299] + */ + public async deleteRole(response: ResponseContext): Promise { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("204", response.httpStatusCode)) { + return; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Invalid request.", body, response.headers); + } + if (isCodeInRange("401", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Internal error", body, response.headers); + } + + // Work around for missing responses in specification, e.g. for petstore.yaml + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body: void = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "void", "" + ) as void; + return body; + } + + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", await response.getBodyAsAny(), response.headers); + } + + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to searchRoles + * @throws ApiException if the response code was not in [200, 299] + */ + public async searchRoles(response: ResponseContext): Promise > { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("200", response.httpStatusCode)) { + const body: Array = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "Array", "" + ) as Array; + return body; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Invalid request.", body, response.headers); + } + if (isCodeInRange("401", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Internal error", body, response.headers); + } + + // Work around for missing responses in specification, e.g. for petstore.yaml + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body: Array = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "Array", "" + ) as Array; + return body; + } + + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", await response.getBodyAsAny(), response.headers); + } + + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to updateRole + * @throws ApiException if the response code was not in [200, 299] + */ + public async updateRole(response: ResponseContext): Promise { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("200", response.httpStatusCode)) { + const body: RoleResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "RoleResponse", "" + ) as RoleResponse; + return body; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Invalid request.", body, response.headers); + } + if (isCodeInRange("401", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Unexpected error", body, response.headers); + } + + // Work around for missing responses in specification, e.g. for petstore.yaml + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body: RoleResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "RoleResponse", "" + ) as RoleResponse; + return body; + } + + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", await response.getBodyAsAny(), response.headers); + } + +} diff --git a/sdks/typescript/apis/SchedulesApi.ts b/sdks/typescript/apis/SchedulesApi.ts new file mode 100644 index 000000000..1cbdd4cde --- /dev/null +++ b/sdks/typescript/apis/SchedulesApi.ts @@ -0,0 +1,448 @@ +// TODO: better import syntax? +import {BaseAPIRequestFactory, RequiredError, COLLECTION_FORMATS} from './baseapi'; +import {Configuration} from '../configuration'; +import {RequestContext, HttpMethod, ResponseContext, HttpFile} from '../http/http'; +import {ObjectSerializer} from '../models/ObjectSerializer'; +import {ApiException} from './exception'; +import {canConsumeForm, isCodeInRange} from '../util'; +import {SecurityAuthentication} from '../auth/auth'; + + +import { CreateScheduleRequest } from '../models/CreateScheduleRequest'; +import { ErrorResponse } from '../models/ErrorResponse'; +import { ResponseSchedule } from '../models/ResponseSchedule'; +import { SearchSchedulesRequest } from '../models/SearchSchedulesRequest'; +import { UpdateScheduleRequest } from '../models/UpdateScheduleRequest'; + +/** + * no description + */ +export class SchedulesApiRequestFactory extends BaseAPIRequestFactory { + + /** + * Create schedule. Version: 9.4.0.cl or later Creates a Liveboard schedule job. Requires at least edit access to Liveboards. To create a schedule on behalf of another user, you need `ADMINISTRATION` (**Can administer Org**) or `JOBSCHEDULING` (**Can schedule for others**) privilege and edit access to the Liveboard. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `JOBSCHEDULING` (**Can schedule for others**) privilege is required. #### Usage guidelines * The description text is mandatory. The description text appears as **Description: ** in the Liveboard schedule email notifications. * For Liveboards with both charts and tables, schedule creation is only supported in PDF and XLS formats. Schedules created in CSV formats for such Liveboards will fail to run. If `PDF` is set as the `file_format`, enable `pdf_options` to get the correct attachment. Not doing so may cause the attachment to be rendered empty. * To include only specific visualizations, specify the visualization GUIDs in the `visualization_identifiers` array. * You can schedule a Liveboard job to run periodically by setting frequency parameters. You can set the schedule to run daily, weekly, monthly or every n minutes or hours. The scheduled job can also be configured to run at a specific time of the day or on specific days of the week or month. Please ensure that when setting the schedule frequency for _minute of the object_, only values that are multiples of 5 are included. * If the `frequency` parameters are defined, you can set the time zone to a value that matches your server\'s time zone. For example, `US/Central`, `Etc/UTC`, `CET`. The default time zone is `America/Los_Angeles`. For more information about Liveboard jobs, see [ThoughtSpot Product Documentation](https://docs.thoughtspot.com/cloud/latest/liveboard-schedule). + * @param createScheduleRequest + */ + public async createSchedule(createScheduleRequest: CreateScheduleRequest, _options?: Configuration): Promise { + let _config = _options || this.configuration; + + // verify required parameter 'createScheduleRequest' is not null or undefined + if (createScheduleRequest === null || createScheduleRequest === undefined) { + throw new RequiredError("SchedulesApi", "createSchedule", "createScheduleRequest"); + } + + + // Path Params + const localVarPath = '/api/rest/2.0/schedules/create'; + + // Make Request Context + const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.POST); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.25.0") + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.25.0") + + + + + // Body Params + const contentType = ObjectSerializer.getPreferredMediaType([ + "application/json" + ]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = ObjectSerializer.stringify( + ObjectSerializer.serialize(createScheduleRequest, "CreateScheduleRequest", ""), + contentType + ); + requestContext.setBody(serializedBody); + + let authMethod: SecurityAuthentication | undefined; + // Apply auth methods + authMethod = _config.authMethods["bearerAuth"] + if (authMethod?.applySecurityAuthentication) { + await authMethod?.applySecurityAuthentication(requestContext); + } + + const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default + if (defaultAuth?.applySecurityAuthentication) { + await defaultAuth?.applySecurityAuthentication(requestContext); + } + + return requestContext; + } + + /** + * Deletes a scheduled job. Version: 9.4.0.cl or later Deletes a scheduled Liveboard job. Requires at least edit access to Liveboard or `ADMINISTRATION` (**Can administer Org**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `JOBSCHEDULING` (**Can schedule for others**) privilege is required. + * @param scheduleIdentifier Unique ID or name of the scheduled job. + */ + public async deleteSchedule(scheduleIdentifier: string, _options?: Configuration): Promise { + let _config = _options || this.configuration; + + // verify required parameter 'scheduleIdentifier' is not null or undefined + if (scheduleIdentifier === null || scheduleIdentifier === undefined) { + throw new RequiredError("SchedulesApi", "deleteSchedule", "scheduleIdentifier"); + } + + + // Path Params + const localVarPath = '/api/rest/2.0/schedules/{schedule_identifier}/delete' + .replace('{' + 'schedule_identifier' + '}', encodeURIComponent(String(scheduleIdentifier))); + + // Make Request Context + const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.POST); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.25.0") + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.25.0") + + + + + let authMethod: SecurityAuthentication | undefined; + // Apply auth methods + authMethod = _config.authMethods["bearerAuth"] + if (authMethod?.applySecurityAuthentication) { + await authMethod?.applySecurityAuthentication(requestContext); + } + + const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default + if (defaultAuth?.applySecurityAuthentication) { + await defaultAuth?.applySecurityAuthentication(requestContext); + } + + return requestContext; + } + + /** + * Search Schedules Version: 9.4.0.cl or later Gets a list of scheduled jobs configured for a Liveboard. To get details of a specific scheduled job, specify the name or GUID of the scheduled job. Requires at least view access to Liveboards. **NOTE**: When filtering schedules by parameters other than `metadata`, set `record_size` to `-1` and `record_offset` to `0` for accurate results. + * @param searchSchedulesRequest + */ + public async searchSchedules(searchSchedulesRequest: SearchSchedulesRequest, _options?: Configuration): Promise { + let _config = _options || this.configuration; + + // verify required parameter 'searchSchedulesRequest' is not null or undefined + if (searchSchedulesRequest === null || searchSchedulesRequest === undefined) { + throw new RequiredError("SchedulesApi", "searchSchedules", "searchSchedulesRequest"); + } + + + // Path Params + const localVarPath = '/api/rest/2.0/schedules/search'; + + // Make Request Context + const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.POST); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.25.0") + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.25.0") + + + + + // Body Params + const contentType = ObjectSerializer.getPreferredMediaType([ + "application/json" + ]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = ObjectSerializer.stringify( + ObjectSerializer.serialize(searchSchedulesRequest, "SearchSchedulesRequest", ""), + contentType + ); + requestContext.setBody(serializedBody); + + let authMethod: SecurityAuthentication | undefined; + // Apply auth methods + authMethod = _config.authMethods["bearerAuth"] + if (authMethod?.applySecurityAuthentication) { + await authMethod?.applySecurityAuthentication(requestContext); + } + + const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default + if (defaultAuth?.applySecurityAuthentication) { + await defaultAuth?.applySecurityAuthentication(requestContext); + } + + return requestContext; + } + + /** + * Update schedule. Version: 9.4.0.cl or later Updates a scheduled Liveboard job. Requires at least edit access to Liveboards. To update a schedule on behalf of another user, you need `ADMINISTRATION` (**Can administer Org**) or `JOBSCHEDULING` (**Can schedule for others**) privilege and edit access to the Liveboard. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `JOBSCHEDULING` (**Can schedule for others**) privilege is required. The API endpoint allows you to pause a scheduled job, change the status of a paused job. You can also edit the recipients list, frequency of the job, format of the file to send to the recipients in email notifications, PDF options, and time zone setting. + * @param scheduleIdentifier Unique ID or name of the schedule. + * @param updateScheduleRequest + */ + public async updateSchedule(scheduleIdentifier: string, updateScheduleRequest: UpdateScheduleRequest, _options?: Configuration): Promise { + let _config = _options || this.configuration; + + // verify required parameter 'scheduleIdentifier' is not null or undefined + if (scheduleIdentifier === null || scheduleIdentifier === undefined) { + throw new RequiredError("SchedulesApi", "updateSchedule", "scheduleIdentifier"); + } + + + // verify required parameter 'updateScheduleRequest' is not null or undefined + if (updateScheduleRequest === null || updateScheduleRequest === undefined) { + throw new RequiredError("SchedulesApi", "updateSchedule", "updateScheduleRequest"); + } + + + // Path Params + const localVarPath = '/api/rest/2.0/schedules/{schedule_identifier}/update' + .replace('{' + 'schedule_identifier' + '}', encodeURIComponent(String(scheduleIdentifier))); + + // Make Request Context + const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.POST); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.25.0") + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.25.0") + + + + + // Body Params + const contentType = ObjectSerializer.getPreferredMediaType([ + "application/json" + ]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = ObjectSerializer.stringify( + ObjectSerializer.serialize(updateScheduleRequest, "UpdateScheduleRequest", ""), + contentType + ); + requestContext.setBody(serializedBody); + + let authMethod: SecurityAuthentication | undefined; + // Apply auth methods + authMethod = _config.authMethods["bearerAuth"] + if (authMethod?.applySecurityAuthentication) { + await authMethod?.applySecurityAuthentication(requestContext); + } + + const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default + if (defaultAuth?.applySecurityAuthentication) { + await defaultAuth?.applySecurityAuthentication(requestContext); + } + + return requestContext; + } + +} + +export class SchedulesApiResponseProcessor { + + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to createSchedule + * @throws ApiException if the response code was not in [200, 299] + */ + public async createSchedule(response: ResponseContext): Promise { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("200", response.httpStatusCode)) { + const body: ResponseSchedule = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ResponseSchedule", "" + ) as ResponseSchedule; + return body; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Invalid request.", body, response.headers); + } + if (isCodeInRange("401", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Unexpected error", body, response.headers); + } + + // Work around for missing responses in specification, e.g. for petstore.yaml + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body: ResponseSchedule = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ResponseSchedule", "" + ) as ResponseSchedule; + return body; + } + + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", await response.getBodyAsAny(), response.headers); + } + + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to deleteSchedule + * @throws ApiException if the response code was not in [200, 299] + */ + public async deleteSchedule(response: ResponseContext): Promise { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("204", response.httpStatusCode)) { + return; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Invalid request.", body, response.headers); + } + if (isCodeInRange("401", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Unexpected error", body, response.headers); + } + + // Work around for missing responses in specification, e.g. for petstore.yaml + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body: void = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "void", "" + ) as void; + return body; + } + + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", await response.getBodyAsAny(), response.headers); + } + + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to searchSchedules + * @throws ApiException if the response code was not in [200, 299] + */ + public async searchSchedules(response: ResponseContext): Promise > { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("200", response.httpStatusCode)) { + const body: Array = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "Array", "" + ) as Array; + return body; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Invalid request.", body, response.headers); + } + if (isCodeInRange("401", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Unexpected error", body, response.headers); + } + + // Work around for missing responses in specification, e.g. for petstore.yaml + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body: Array = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "Array", "" + ) as Array; + return body; + } + + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", await response.getBodyAsAny(), response.headers); + } + + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to updateSchedule + * @throws ApiException if the response code was not in [200, 299] + */ + public async updateSchedule(response: ResponseContext): Promise { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("204", response.httpStatusCode)) { + return; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Invalid request.", body, response.headers); + } + if (isCodeInRange("401", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Unexpected error", body, response.headers); + } + + // Work around for missing responses in specification, e.g. for petstore.yaml + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body: void = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "void", "" + ) as void; + return body; + } + + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", await response.getBodyAsAny(), response.headers); + } + +} diff --git a/sdks/typescript/apis/SecurityApi.ts b/sdks/typescript/apis/SecurityApi.ts new file mode 100644 index 000000000..d6070c868 --- /dev/null +++ b/sdks/typescript/apis/SecurityApi.ts @@ -0,0 +1,1092 @@ +// TODO: better import syntax? +import {BaseAPIRequestFactory, RequiredError, COLLECTION_FORMATS} from './baseapi'; +import {Configuration} from '../configuration'; +import {RequestContext, HttpMethod, ResponseContext, HttpFile} from '../http/http'; +import {ObjectSerializer} from '../models/ObjectSerializer'; +import {ApiException} from './exception'; +import {canConsumeForm, isCodeInRange} from '../util'; +import {SecurityAuthentication} from '../auth/auth'; + + +import { AssignChangeAuthorRequest } from '../models/AssignChangeAuthorRequest'; +import { ColumnSecurityRuleResponse } from '../models/ColumnSecurityRuleResponse'; +import { ErrorResponse } from '../models/ErrorResponse'; +import { FetchColumnSecurityRulesRequest } from '../models/FetchColumnSecurityRulesRequest'; +import { FetchObjectPrivilegesRequest } from '../models/FetchObjectPrivilegesRequest'; +import { FetchPermissionsOfPrincipalsRequest } from '../models/FetchPermissionsOfPrincipalsRequest'; +import { FetchPermissionsOnMetadataRequest } from '../models/FetchPermissionsOnMetadataRequest'; +import { ManageObjectPrivilegeRequest } from '../models/ManageObjectPrivilegeRequest'; +import { ObjectPrivilegesOfMetadataResponse } from '../models/ObjectPrivilegesOfMetadataResponse'; +import { PermissionOfMetadataResponse } from '../models/PermissionOfMetadataResponse'; +import { PermissionOfPrincipalsResponse } from '../models/PermissionOfPrincipalsResponse'; +import { PublishMetadataRequest } from '../models/PublishMetadataRequest'; +import { ShareMetadataRequest } from '../models/ShareMetadataRequest'; +import { UnpublishMetadataRequest } from '../models/UnpublishMetadataRequest'; +import { UpdateColumnSecurityRulesRequest } from '../models/UpdateColumnSecurityRulesRequest'; + +/** + * no description + */ +export class SecurityApiRequestFactory extends BaseAPIRequestFactory { + + /** + * Version: 9.0.0.cl or later Transfers the ownership of one or several objects from one user to another. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `USER_ADMINISTRATION` (**Can manage users**) privilege and edit access to the objects are required. + * @param assignChangeAuthorRequest + */ + public async assignChangeAuthor(assignChangeAuthorRequest: AssignChangeAuthorRequest, _options?: Configuration): Promise { + let _config = _options || this.configuration; + + // verify required parameter 'assignChangeAuthorRequest' is not null or undefined + if (assignChangeAuthorRequest === null || assignChangeAuthorRequest === undefined) { + throw new RequiredError("SecurityApi", "assignChangeAuthor", "assignChangeAuthorRequest"); + } + + + // Path Params + const localVarPath = '/api/rest/2.0/security/metadata/assign'; + + // Make Request Context + const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.POST); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.25.0") + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.25.0") + + + + + // Body Params + const contentType = ObjectSerializer.getPreferredMediaType([ + "application/json" + ]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = ObjectSerializer.stringify( + ObjectSerializer.serialize(assignChangeAuthorRequest, "AssignChangeAuthorRequest", ""), + contentType + ); + requestContext.setBody(serializedBody); + + let authMethod: SecurityAuthentication | undefined; + // Apply auth methods + authMethod = _config.authMethods["bearerAuth"] + if (authMethod?.applySecurityAuthentication) { + await authMethod?.applySecurityAuthentication(requestContext); + } + + const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default + if (defaultAuth?.applySecurityAuthentication) { + await defaultAuth?.applySecurityAuthentication(requestContext); + } + + return requestContext; + } + + /** + * Version: 10.12.0.cl or later Fetches column security rules for specified tables. This API endpoint retrieves column-level security rules configured for tables. It returns information about which columns are secured and which groups have access to those columns. #### Usage guidelines - Provide an array of table identifiers using either `identifier` (GUID or name) or `obj_identifier` (object ID) - At least one of `identifier` or `obj_identifier` must be provided for each table - The API returns column security rules for all specified tables - Users must have appropriate permissions to access security rules for the specified tables #### Required permissions - `ADMINISTRATION` - Can administer ThoughtSpot - `DATAMANAGEMENT` - Can manage data - `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` - Can manage worksheet views and tables #### Example request ```json { \"tables\": [ { \"identifier\": \"table-guid\", \"obj_identifier\": \"table-object-id\" } ] } ``` #### Response format The API returns an array of `ColumnSecurityRuleResponse` objects wrapped in a `data` field. Each `ColumnSecurityRuleResponse` object contains: - Table information (GUID and object ID) - Array of column security rules with column details, group access, and source table information #### Example response ```json { \"data\": [ { \"guid\": \"table-guid\", \"objId\": \"table-object-id\", \"columnSecurityRules\": [ { \"column\": { \"id\": \"col_123\", \"name\": \"Salary\" }, \"groups\": [ { \"id\": \"group_1\", \"name\": \"HR Department\" } ], \"sourceTableDetails\": { \"id\": \"source-table-guid\", \"name\": \"Employee_Data\" } } ] } ] } ``` + * @param fetchColumnSecurityRulesRequest + */ + public async fetchColumnSecurityRules(fetchColumnSecurityRulesRequest: FetchColumnSecurityRulesRequest, _options?: Configuration): Promise { + let _config = _options || this.configuration; + + // verify required parameter 'fetchColumnSecurityRulesRequest' is not null or undefined + if (fetchColumnSecurityRulesRequest === null || fetchColumnSecurityRulesRequest === undefined) { + throw new RequiredError("SecurityApi", "fetchColumnSecurityRules", "fetchColumnSecurityRulesRequest"); + } + + + // Path Params + const localVarPath = '/api/rest/2.0/security/column/rules/fetch'; + + // Make Request Context + const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.POST); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.25.0") + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.25.0") + + + + + // Body Params + const contentType = ObjectSerializer.getPreferredMediaType([ + "application/json" + ]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = ObjectSerializer.stringify( + ObjectSerializer.serialize(fetchColumnSecurityRulesRequest, "FetchColumnSecurityRulesRequest", ""), + contentType + ); + requestContext.setBody(serializedBody); + + let authMethod: SecurityAuthentication | undefined; + // Apply auth methods + authMethod = _config.authMethods["bearerAuth"] + if (authMethod?.applySecurityAuthentication) { + await authMethod?.applySecurityAuthentication(requestContext); + } + + const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default + if (defaultAuth?.applySecurityAuthentication) { + await defaultAuth?.applySecurityAuthentication(requestContext); + } + + return requestContext; + } + + /** + * Version: 26.3.0.cl or later This API fetches the object privileges present for the given list of principals (user or group), on the given set of objects. It supports pagination, which can be enabled and configured using the request parameters. It provides users access to certain features based on privilege based access control. #### Usage guidelines - Specify the `type` (`USER` or `USER_GROUP`) and `identifier` (either GUID or name) of the principals for which you want to retrieve object privilege information in the `principals` array. - Specify the `type` (`LOGICAL_TABLE`) and `identifier` (either GUID or name) of the metadata objects for which you want to retrieve object privilege information in the `metadata` array. Only `LOGICAL_TABLE` metadata type is supported for now. It may be extended for other metadata types in future. - To control the offset from where principals have to be fetched, use `record_offset`. When `record_offset` is 0, information is fetched from the beginning. - To control the number of principals to be fetched, use `record_size`. Default `record_size` is 20. - Ensure `record_offset` for a subsequent request is one more than the value of `record_size` of the previous request. - Ensure using correct Authorization Bearer Token corresponding to specific user & org. #### Example request ```json { \"principals\": [ { \"type\": \"type-1\", \"identifier\": \"principal-guid-or-name-1\" }, { \"type\": \"type-2\", \"identifier\": \"principal-guid-or-name-2\" } ], \"metadata\": [ { \"type\": \"metadata-type-1\", \"identifier\": \"metadata-guid-or-name-1\" }, { \"type\": \"metadata-type-2\", \"identifier\": \"metadata-guid-or-name-2\" } ], \"record_offset\": 0, \"record_size\": 20 } ``` #### Response format The API returns an array of `metadata_object_privileges` objects wrapped in JSON. Each `metadata_object_privileges` object contains: - Metadata information (GUID, name and type) - Array of `principal_object_privilege_info`. - Each `principal_object_privilege_info` contains: - Principal type. All principals of this type are listed as described below. - Array of `principal_object_privileges`. - Each `principal_object_privileges` contains: - Principal information (GUID, name, subtype) - List of applied object level privileges. #### Example response ```json { \"metadata_object_privileges\": [ { \"metadata_id\": \"metadata-guid-1\", \"metadata_name\": \"metadata-name-1\", \"metadata_type\": \"metadata-type-1\", \"principal_object_privilege_info\": [ { \"principal_type\": \"principal-type-1\", \"principal_object_privileges\": [ { \"principal_id\": \"principal-guid-1\", \"principal_name\": \"principal-name-1\", \"principal_sub_type\": \"principal-sub-type-1\", \"object_privileges\": \"[object-privilege-1, object-privilege-2]\" }, { \"principal_id\": \"principal-guid-2\", \"principal_name\": \"principal-name-2\", \"principal_sub_type\": \"principal-sub-type-2\", \"object_privileges\": \"[object-privilege-1, object-privilege-2]\" } ] }, { \"principal_type\": \"principal-type-2\", \"principal_object_privileges\": [ { \"principal_id\": \"principal-guid-3\", \"principal_name\": \"principal-guid-4\", \"principal_sub_type\": \"principal-sub-type-4\", \"object_privileges\": \"[object-privilege-1]\" } ] } ] }, { \"metadata_id\": \"metadata-guid-2\", \"metadata_name\": \"metadata-name-2\", \"metadata_type\": \"metadata-type-2\", \"principal_object_privilege_info\": [ { \"principal_type\": \"principal-type-1\", \"principal_object_privileges\": [ { \"principal_id\": \"principal-guid-1\", \"principal_name\": \"principal-name-1\", \"principal_sub_type\": \"principal-sub-type-1\", \"object_privileges\": \"[object-privilege-3, object-privilege-4]\" }, { \"principal_id\": \"principal-guid-2\", \"principal_name\": \"principal-name-2\", \"principal_sub_type\": \"principal-sub-type-2\", \"object_privileges\": \"[object-privilege-4]\" } ] } ] } ] } ``` + * @param fetchObjectPrivilegesRequest + */ + public async fetchObjectPrivileges(fetchObjectPrivilegesRequest: FetchObjectPrivilegesRequest, _options?: Configuration): Promise { + let _config = _options || this.configuration; + + // verify required parameter 'fetchObjectPrivilegesRequest' is not null or undefined + if (fetchObjectPrivilegesRequest === null || fetchObjectPrivilegesRequest === undefined) { + throw new RequiredError("SecurityApi", "fetchObjectPrivileges", "fetchObjectPrivilegesRequest"); + } + + + // Path Params + const localVarPath = '/api/rest/2.0/security/metadata/fetch-object-privileges'; + + // Make Request Context + const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.POST); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.25.0") + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.25.0") + + + + + // Body Params + const contentType = ObjectSerializer.getPreferredMediaType([ + "application/json" + ]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = ObjectSerializer.stringify( + ObjectSerializer.serialize(fetchObjectPrivilegesRequest, "FetchObjectPrivilegesRequest", ""), + contentType + ); + requestContext.setBody(serializedBody); + + let authMethod: SecurityAuthentication | undefined; + // Apply auth methods + authMethod = _config.authMethods["bearerAuth"] + if (authMethod?.applySecurityAuthentication) { + await authMethod?.applySecurityAuthentication(requestContext); + } + + const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default + if (defaultAuth?.applySecurityAuthentication) { + await defaultAuth?.applySecurityAuthentication(requestContext); + } + + return requestContext; + } + + /** + * Version: 9.0.0.cl or later Fetches object permission details for a given principal object such as a user and group. Requires view access to the metadata object. #### Usage guidelines * To get a list of all metadata objects that a user or group can access, specify the `type` and GUID or name of the principal. * To get permission details for a specific object, add the `type` and GUID or name of the metadata object to your API request. Upon successful execution, the API returns a list of metadata objects and permission details for each object. + * @param fetchPermissionsOfPrincipalsRequest + */ + public async fetchPermissionsOfPrincipals(fetchPermissionsOfPrincipalsRequest: FetchPermissionsOfPrincipalsRequest, _options?: Configuration): Promise { + let _config = _options || this.configuration; + + // verify required parameter 'fetchPermissionsOfPrincipalsRequest' is not null or undefined + if (fetchPermissionsOfPrincipalsRequest === null || fetchPermissionsOfPrincipalsRequest === undefined) { + throw new RequiredError("SecurityApi", "fetchPermissionsOfPrincipals", "fetchPermissionsOfPrincipalsRequest"); + } + + + // Path Params + const localVarPath = '/api/rest/2.0/security/principals/fetch-permissions'; + + // Make Request Context + const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.POST); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.25.0") + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.25.0") + + + + + // Body Params + const contentType = ObjectSerializer.getPreferredMediaType([ + "application/json" + ]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = ObjectSerializer.stringify( + ObjectSerializer.serialize(fetchPermissionsOfPrincipalsRequest, "FetchPermissionsOfPrincipalsRequest", ""), + contentType + ); + requestContext.setBody(serializedBody); + + let authMethod: SecurityAuthentication | undefined; + // Apply auth methods + authMethod = _config.authMethods["bearerAuth"] + if (authMethod?.applySecurityAuthentication) { + await authMethod?.applySecurityAuthentication(requestContext); + } + + const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default + if (defaultAuth?.applySecurityAuthentication) { + await defaultAuth?.applySecurityAuthentication(requestContext); + } + + return requestContext; + } + + /** + * Version: 9.0.0.cl or later Fetches permission details for a given metadata object. Requires view access to the metadata object. #### Usage guidelines * To fetch a list of users and groups for a metadata object, specify `type` and GUID or name of the metadata object. * To get permission details for a specific user or group, add `type` and GUID or name of the principal object to your API request. Upon successful execution, the API returns permission details and principal information for the object specified in the API request. + * @param fetchPermissionsOnMetadataRequest + */ + public async fetchPermissionsOnMetadata(fetchPermissionsOnMetadataRequest: FetchPermissionsOnMetadataRequest, _options?: Configuration): Promise { + let _config = _options || this.configuration; + + // verify required parameter 'fetchPermissionsOnMetadataRequest' is not null or undefined + if (fetchPermissionsOnMetadataRequest === null || fetchPermissionsOnMetadataRequest === undefined) { + throw new RequiredError("SecurityApi", "fetchPermissionsOnMetadata", "fetchPermissionsOnMetadataRequest"); + } + + + // Path Params + const localVarPath = '/api/rest/2.0/security/metadata/fetch-permissions'; + + // Make Request Context + const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.POST); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.25.0") + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.25.0") + + + + + // Body Params + const contentType = ObjectSerializer.getPreferredMediaType([ + "application/json" + ]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = ObjectSerializer.stringify( + ObjectSerializer.serialize(fetchPermissionsOnMetadataRequest, "FetchPermissionsOnMetadataRequest", ""), + contentType + ); + requestContext.setBody(serializedBody); + + let authMethod: SecurityAuthentication | undefined; + // Apply auth methods + authMethod = _config.authMethods["bearerAuth"] + if (authMethod?.applySecurityAuthentication) { + await authMethod?.applySecurityAuthentication(requestContext); + } + + const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default + if (defaultAuth?.applySecurityAuthentication) { + await defaultAuth?.applySecurityAuthentication(requestContext); + } + + return requestContext; + } + + /** + * Version: 26.3.0.cl or later This API allows the addition or deletion of object level privileges for a set of users and groups, on a set of metadata objects. It provides users to access certain features based on privilege based access control. #### Usage guidelines - Specify the `operation`. The supported operations are: `ADD`, `REMOVE`. - Specify the type of the objects on which the object privileges are being provided in `metadata_type`. Only `LOGICAL_TABLE` metadata type is supported for now. It may be extended for other metadata types in future. - Specify the list of object privilege types in the `object_privilege_types` array. The supported object privilege types are: `SPOTTER_COACHING_PRIVILEGE`. - Specify the identifiers (either GUID or name) for the metadata objects in the `metadata_identifiers` array. - Specify the `type` (`USER` or `USER_GROUP`) and `identifier` (either GUID or name) of the principals to which you want to apply the given operation and given object privileges in the `principals` array. - Ensure using correct Authorization Bearer Token corresponding to specific user & org. #### Example request ```json { \"operation\": \"operation-type\", \"metadata_type\": \"metadata-type\", \"object_privilege_types\": [\"privilege-type-1\", \"privilege-type-2\"], \"metadata_identifiers\": [\"metadata-guid-or-name-1\", \"metadata-guid-or-name-1\"], \"principals\": [ { \"type\": \"type-1\", \"identifier\": \"principal-guid-or-name-1\" }, { \"type\": \"type-2\", \"identifier\": \"principal-guid-or-name-2\" } ] } ``` > ###### Note: > * Only admin users, users with edit access and users with coaching privilege on a given data-model can add or remove principals related to SPOTTER_COACHING_PRIVILEGE + * @param manageObjectPrivilegeRequest + */ + public async manageObjectPrivilege(manageObjectPrivilegeRequest: ManageObjectPrivilegeRequest, _options?: Configuration): Promise { + let _config = _options || this.configuration; + + // verify required parameter 'manageObjectPrivilegeRequest' is not null or undefined + if (manageObjectPrivilegeRequest === null || manageObjectPrivilegeRequest === undefined) { + throw new RequiredError("SecurityApi", "manageObjectPrivilege", "manageObjectPrivilegeRequest"); + } + + + // Path Params + const localVarPath = '/api/rest/2.0/security/metadata/manage-object-privilege'; + + // Make Request Context + const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.POST); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.25.0") + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.25.0") + + + + + // Body Params + const contentType = ObjectSerializer.getPreferredMediaType([ + "application/json" + ]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = ObjectSerializer.stringify( + ObjectSerializer.serialize(manageObjectPrivilegeRequest, "ManageObjectPrivilegeRequest", ""), + contentType + ); + requestContext.setBody(serializedBody); + + let authMethod: SecurityAuthentication | undefined; + // Apply auth methods + authMethod = _config.authMethods["bearerAuth"] + if (authMethod?.applySecurityAuthentication) { + await authMethod?.applySecurityAuthentication(requestContext); + } + + const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default + if (defaultAuth?.applySecurityAuthentication) { + await defaultAuth?.applySecurityAuthentication(requestContext); + } + + return requestContext; + } + + /** + * Version: 26.5.0.cl or later Allows publishing metadata objects across organizations in ThoughtSpot. Requires ADMINISTRATION role and TENANT scope. The API endpoint allows publishing the following types of metadata objects: * Liveboards * Answers * Logical Tables This API will essentially share the objects along with it\'s dependencies to the org admins of the orgs to which it is being published. + * @param publishMetadataRequest + */ + public async publishMetadata(publishMetadataRequest: PublishMetadataRequest, _options?: Configuration): Promise { + let _config = _options || this.configuration; + + // verify required parameter 'publishMetadataRequest' is not null or undefined + if (publishMetadataRequest === null || publishMetadataRequest === undefined) { + throw new RequiredError("SecurityApi", "publishMetadata", "publishMetadataRequest"); + } + + + // Path Params + const localVarPath = '/api/rest/2.0/security/metadata/publish'; + + // Make Request Context + const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.POST); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.25.0") + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.25.0") + + + + + // Body Params + const contentType = ObjectSerializer.getPreferredMediaType([ + "application/json" + ]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = ObjectSerializer.stringify( + ObjectSerializer.serialize(publishMetadataRequest, "PublishMetadataRequest", ""), + contentType + ); + requestContext.setBody(serializedBody); + + let authMethod: SecurityAuthentication | undefined; + // Apply auth methods + authMethod = _config.authMethods["bearerAuth"] + if (authMethod?.applySecurityAuthentication) { + await authMethod?.applySecurityAuthentication(requestContext); + } + + const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default + if (defaultAuth?.applySecurityAuthentication) { + await defaultAuth?.applySecurityAuthentication(requestContext); + } + + return requestContext; + } + + /** + * Version: 9.0.0.cl or later Allows sharing one or several metadata objects with users and groups in ThoughtSpot. Requires edit access to the metadata object. #### Supported metadata objects: * Liveboards * Visualizations * Answers * Models * Views * Connections * Collections #### Object permissions You can provide `READ_ONLY` or `MODIFY` access when sharing an object with another user or group. The `READ_ONLY` permission grants view access to the shared object, whereas `MODIFY` provides edit access. To prevent a user or group from accessing the shared object, specify the GUID or name of the principal and set `shareMode` to `NO_ACCESS`. #### Sharing a visualization * Sharing a visualization implicitly shares the entire Liveboard with the recipient. * Object permissions set for a shared visualization also apply to the Liveboard unless overridden by another API request or via UI. * If email notifications for object sharing are enabled, a notification with a link to the shared visualization will be sent to the recipient’s email address. Although this link opens the shared visualization, recipients can also access other visualizations in the Liveboard. #### Sharing a collection Collections support **dual permissions** that provide fine-grained control: * **Collection permissions** (`share_mode`) - controls access to the collection itself (view, edit, delete the collection) * **Content permissions** (`content_share_mode`) - controls access to objects within the collection (view, edit objects inside) **Default Behavior:** - If only `share_mode` is specified, the content permissions default to `READ_ONLY` (except when `share_mode` is `NO_ACCESS`, then content also gets `NO_ACCESS`) - To give users edit access to collection contents, explicitly set `content_share_mode: \"MODIFY\"` ## Examples The following JSON examples can be copy-pasted as request bodies for the REST v2 API endpoint: ```bash POST /callosum/v1/v2/security/metadata/share Content-Type: application/x-www-form-urlencoded ``` ### Basic collection sharing Share a collection with read-only access: ```json { \"metadata_type\": \"COLLECTION\", \"metadata_identifiers\": [\"Sales Reports Collection\"], \"permissions\": [{ \"principal\": { \"type\": \"USER\", \"identifier\": \"alice@company.com\" }, \"share_mode\": \"READ_ONLY\" }], \"notification\": { \"message\": \"I\'ve shared the Sales Reports collection with you\", \"notify_on_share\": true } } ``` ### Collection sharing with dual permissions Share a collection with different permissions for the collection vs. its contents: ```json { \"metadata_type\": \"COLLECTION\", \"metadata_identifiers\": [\"Marketing Analytics\"], \"permissions\": [{ \"principal\": { \"type\": \"USER\", \"identifier\": \"bob@company.com\" }, \"share_mode\": \"MODIFY\", \"content_share_mode\": \"READ_ONLY\" }, { \"principal\": { \"type\": \"USER_GROUP\", \"identifier\": \"Marketing Team\" }, \"share_mode\": \"READ_ONLY\", \"content_share_mode\": \"READ_ONLY\" }], \"notification\": { \"emails\": [\"bob@company.com\"], \"message\": \"You can edit the collection but content is read-only\", \"enable_custom_url\": false, \"notify_on_share\": true }, \"has_lenient_discoverability\": false } ``` ### Multiple collections sharing Share multiple collections with different users: ```json { \"metadata\": [ { \"type\": \"COLLECTION\", \"identifier\": \"Q4 Reports\" }, { \"type\": \"COLLECTION\", \"identifier\": \"Executive Dashboard Collection\" } ], \"permissions\": [{ \"principal\": { \"type\": \"USER_GROUP\", \"identifier\": \"Executives\" }, \"share_mode\": \"MODIFY\" }, { \"principal\": { \"type\": \"USER\", \"identifier\": \"manager@company.com\" }, \"share_mode\": \"READ_ONLY\", \"content_share_mode\": \"MODIFY\" }], \"notification\": { \"message\": \"Sharing quarterly collections with leadership team\", \"notify_on_share\": true } } ``` ### Remove collection access Remove access to a collection by setting share_mode to NO_ACCESS: ```json { \"metadata_type\": \"COLLECTION\", \"metadata_identifiers\": [\"Confidential Reports\"], \"permissions\": [{ \"principal\": { \"type\": \"USER\", \"identifier\": \"former-employee@company.com\" }, \"share_mode\": \"NO_ACCESS\" }], \"notification\": { \"notify_on_share\": false } } ``` ### Collection Permission Scenarios **Scenario 1: Collection Admin** - `share_mode: MODIFY` + `content_share_mode: MODIFY` = Full control over collection and its contents **Scenario 2: Collection Curator** - `share_mode: MODIFY` + `content_share_mode: READ_ONLY` = Can manage collection structure but not edit contents **Scenario 3: Content Editor** - `share_mode: READ_ONLY` + `content_share_mode: MODIFY` = Can edit objects within collection but can\'t change collection itself **Scenario 4: Viewer** - `share_mode: READ_ONLY` + `content_share_mode: READ_ONLY` = View-only access to collection and contents + * @param shareMetadataRequest + */ + public async shareMetadata(shareMetadataRequest: ShareMetadataRequest, _options?: Configuration): Promise { + let _config = _options || this.configuration; + + // verify required parameter 'shareMetadataRequest' is not null or undefined + if (shareMetadataRequest === null || shareMetadataRequest === undefined) { + throw new RequiredError("SecurityApi", "shareMetadata", "shareMetadataRequest"); + } + + + // Path Params + const localVarPath = '/api/rest/2.0/security/metadata/share'; + + // Make Request Context + const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.POST); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.25.0") + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.25.0") + + + + + // Body Params + const contentType = ObjectSerializer.getPreferredMediaType([ + "application/json" + ]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = ObjectSerializer.stringify( + ObjectSerializer.serialize(shareMetadataRequest, "ShareMetadataRequest", ""), + contentType + ); + requestContext.setBody(serializedBody); + + let authMethod: SecurityAuthentication | undefined; + // Apply auth methods + authMethod = _config.authMethods["bearerAuth"] + if (authMethod?.applySecurityAuthentication) { + await authMethod?.applySecurityAuthentication(requestContext); + } + + const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default + if (defaultAuth?.applySecurityAuthentication) { + await defaultAuth?.applySecurityAuthentication(requestContext); + } + + return requestContext; + } + + /** + * Version: 26.5.0.cl or later Allows unpublishing metadata objects from organizations in ThoughtSpot. Requires ADMINISTRATION role and TENANT scope. The API endpoint allows unpublishing the following types of metadata objects: * Liveboards * Answers * Logical Tables When unpublishing objects, you can: * Include dependencies by setting `include_dependencies` to true - this will unpublish all dependent objects if no other published object is using them * Force unpublish by setting `force` to true - this will break all dependent objects in the unpublished organizations + * @param unpublishMetadataRequest + */ + public async unpublishMetadata(unpublishMetadataRequest: UnpublishMetadataRequest, _options?: Configuration): Promise { + let _config = _options || this.configuration; + + // verify required parameter 'unpublishMetadataRequest' is not null or undefined + if (unpublishMetadataRequest === null || unpublishMetadataRequest === undefined) { + throw new RequiredError("SecurityApi", "unpublishMetadata", "unpublishMetadataRequest"); + } + + + // Path Params + const localVarPath = '/api/rest/2.0/security/metadata/unpublish'; + + // Make Request Context + const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.POST); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.25.0") + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.25.0") + + + + + // Body Params + const contentType = ObjectSerializer.getPreferredMediaType([ + "application/json" + ]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = ObjectSerializer.stringify( + ObjectSerializer.serialize(unpublishMetadataRequest, "UnpublishMetadataRequest", ""), + contentType + ); + requestContext.setBody(serializedBody); + + let authMethod: SecurityAuthentication | undefined; + // Apply auth methods + authMethod = _config.authMethods["bearerAuth"] + if (authMethod?.applySecurityAuthentication) { + await authMethod?.applySecurityAuthentication(requestContext); + } + + const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default + if (defaultAuth?.applySecurityAuthentication) { + await defaultAuth?.applySecurityAuthentication(requestContext); + } + + return requestContext; + } + + /** + * Version: 10.12.0.cl or later Creates, updates, or deletes column security rules for specified tables. This API endpoint allows you to create, update, or delete column-level security rules on columns of a table. The operation follows an \"all or none\" policy: if defining security rules for any of the provided columns fails, the entire operation will be rolled back, and no rules will be created. #### Usage guidelines - Provide table identifier using either `identifier` (GUID or name) or `obj_identifier` (object ID) - Use `clear_csr: true` to remove all column security rules from the table - For each column, specify the security rule using `column_security_rules` array - Use `is_unsecured: true` to mark a specific column as unprotected - Use `group_access` operations to manage group associations: - `ADD`: Add groups to the column\'s access list - `REMOVE`: Remove groups from the column\'s access list - `REPLACE`: Replace all existing groups with the specified groups #### Required permissions - `ADMINISTRATION` - Can administer ThoughtSpot - `DATAMANAGEMENT` - Can manage data (if RBAC is disabled) - `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` - Can manage worksheet views and tables (if RBAC is enabled) #### Example request ```json { \"identifier\": \"table-guid\", \"obj_identifier\": \"table-object-id\", \"clear_csr\": false, \"column_security_rules\": [ { \"column_identifier\": \"col id or col name\", \"is_unsecured\": false, \"group_access\": [ { \"operation\": \"ADD\", \"group_identifiers\": [\"hr_group_id\", \"hr_group_name\", \"finance_group_id\"] } ] }, { \"column_identifier\": \"col id or col name\", \"is_unsecured\": true }, { \"column_identifier\": \"col id or col name\", \"is_unsecured\": false, \"group_access\": [ { \"operation\": \"REPLACE\", \"group_identifiers\": [\"management_group_id\", \"management_group_name\"] } ] } ] } ``` #### Request Body Schema - `identifier` (string, optional): GUID or name of the table for which we want to create column security rules - `obj_identifier` (string, optional): The object ID of the table - `clear_csr` (boolean, optional): If true, then all the secured columns will be marked as unprotected, and all the group associations will be removed - `column_security_rules` (array of objects, required): An array where each object defines the security rule for a specific column Each column security rule object contains: - `column_identifier` (string, required): Column identifier (col_id or name) - `is_unsecured` (boolean, optional): If true, the column will be marked as unprotected and all groups associated with it will be removed - `group_access` (array of objects, optional): Array of group operation objects Each group operation object contains: - `operation` (string, required): Operation type - ADD, REMOVE, or REPLACE - `group_identifiers` (array of strings, required): Array of group identifiers (name or GUID) on which the operation will be performed #### Response This API does not return any response body. A successful operation returns HTTP 200 status code. #### Operation Types - **ADD**: Adds the specified groups to the column\'s access list - **REMOVE**: Removes the specified groups from the column\'s access list - **REPLACE**: Replaces all existing groups with the specified groups + * @param updateColumnSecurityRulesRequest + */ + public async updateColumnSecurityRules(updateColumnSecurityRulesRequest: UpdateColumnSecurityRulesRequest, _options?: Configuration): Promise { + let _config = _options || this.configuration; + + // verify required parameter 'updateColumnSecurityRulesRequest' is not null or undefined + if (updateColumnSecurityRulesRequest === null || updateColumnSecurityRulesRequest === undefined) { + throw new RequiredError("SecurityApi", "updateColumnSecurityRules", "updateColumnSecurityRulesRequest"); + } + + + // Path Params + const localVarPath = '/api/rest/2.0/security/column/rules/update'; + + // Make Request Context + const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.POST); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.25.0") + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.25.0") + + + + + // Body Params + const contentType = ObjectSerializer.getPreferredMediaType([ + "application/json" + ]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = ObjectSerializer.stringify( + ObjectSerializer.serialize(updateColumnSecurityRulesRequest, "UpdateColumnSecurityRulesRequest", ""), + contentType + ); + requestContext.setBody(serializedBody); + + let authMethod: SecurityAuthentication | undefined; + // Apply auth methods + authMethod = _config.authMethods["bearerAuth"] + if (authMethod?.applySecurityAuthentication) { + await authMethod?.applySecurityAuthentication(requestContext); + } + + const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default + if (defaultAuth?.applySecurityAuthentication) { + await defaultAuth?.applySecurityAuthentication(requestContext); + } + + return requestContext; + } + +} + +export class SecurityApiResponseProcessor { + + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to assignChangeAuthor + * @throws ApiException if the response code was not in [200, 299] + */ + public async assignChangeAuthor(response: ResponseContext): Promise { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("204", response.httpStatusCode)) { + return; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Invalid request.", body, response.headers); + } + if (isCodeInRange("401", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Unexpected error", body, response.headers); + } + + // Work around for missing responses in specification, e.g. for petstore.yaml + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body: void = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "void", "" + ) as void; + return body; + } + + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", await response.getBodyAsAny(), response.headers); + } + + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to fetchColumnSecurityRules + * @throws ApiException if the response code was not in [200, 299] + */ + public async fetchColumnSecurityRules(response: ResponseContext): Promise > { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("200", response.httpStatusCode)) { + const body: Array = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "Array", "" + ) as Array; + return body; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Bad request - Table not found or invalid parameters", body, response.headers); + } + if (isCodeInRange("401", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Forbidden - User doesn\'t have permission to access security rules for this table", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Internal server error", body, response.headers); + } + + // Work around for missing responses in specification, e.g. for petstore.yaml + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body: Array = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "Array", "" + ) as Array; + return body; + } + + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", await response.getBodyAsAny(), response.headers); + } + + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to fetchObjectPrivileges + * @throws ApiException if the response code was not in [200, 299] + */ + public async fetchObjectPrivileges(response: ResponseContext): Promise { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("200", response.httpStatusCode)) { + const body: ObjectPrivilegesOfMetadataResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ObjectPrivilegesOfMetadataResponse", "" + ) as ObjectPrivilegesOfMetadataResponse; + return body; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Invalid request.", body, response.headers); + } + if (isCodeInRange("401", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Unexpected error", body, response.headers); + } + + // Work around for missing responses in specification, e.g. for petstore.yaml + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body: ObjectPrivilegesOfMetadataResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ObjectPrivilegesOfMetadataResponse", "" + ) as ObjectPrivilegesOfMetadataResponse; + return body; + } + + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", await response.getBodyAsAny(), response.headers); + } + + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to fetchPermissionsOfPrincipals + * @throws ApiException if the response code was not in [200, 299] + */ + public async fetchPermissionsOfPrincipals(response: ResponseContext): Promise { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("200", response.httpStatusCode)) { + const body: PermissionOfPrincipalsResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "PermissionOfPrincipalsResponse", "" + ) as PermissionOfPrincipalsResponse; + return body; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Invalid request.", body, response.headers); + } + if (isCodeInRange("401", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Unexpected error", body, response.headers); + } + + // Work around for missing responses in specification, e.g. for petstore.yaml + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body: PermissionOfPrincipalsResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "PermissionOfPrincipalsResponse", "" + ) as PermissionOfPrincipalsResponse; + return body; + } + + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", await response.getBodyAsAny(), response.headers); + } + + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to fetchPermissionsOnMetadata + * @throws ApiException if the response code was not in [200, 299] + */ + public async fetchPermissionsOnMetadata(response: ResponseContext): Promise { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("200", response.httpStatusCode)) { + const body: PermissionOfMetadataResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "PermissionOfMetadataResponse", "" + ) as PermissionOfMetadataResponse; + return body; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Invalid request.", body, response.headers); + } + if (isCodeInRange("401", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Unexpected error", body, response.headers); + } + + // Work around for missing responses in specification, e.g. for petstore.yaml + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body: PermissionOfMetadataResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "PermissionOfMetadataResponse", "" + ) as PermissionOfMetadataResponse; + return body; + } + + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", await response.getBodyAsAny(), response.headers); + } + + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to manageObjectPrivilege + * @throws ApiException if the response code was not in [200, 299] + */ + public async manageObjectPrivilege(response: ResponseContext): Promise { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("204", response.httpStatusCode)) { + return; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Invalid request", body, response.headers); + } + if (isCodeInRange("401", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Unauthorized access", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Forbidden access", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Unexpected error", body, response.headers); + } + + // Work around for missing responses in specification, e.g. for petstore.yaml + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body: void = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "void", "" + ) as void; + return body; + } + + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", await response.getBodyAsAny(), response.headers); + } + + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to publishMetadata + * @throws ApiException if the response code was not in [200, 299] + */ + public async publishMetadata(response: ResponseContext): Promise { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("204", response.httpStatusCode)) { + return; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Invalid request.", body, response.headers); + } + if (isCodeInRange("401", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Unexpected error", body, response.headers); + } + + // Work around for missing responses in specification, e.g. for petstore.yaml + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body: void = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "void", "" + ) as void; + return body; + } + + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", await response.getBodyAsAny(), response.headers); + } + + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to shareMetadata + * @throws ApiException if the response code was not in [200, 299] + */ + public async shareMetadata(response: ResponseContext): Promise { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("204", response.httpStatusCode)) { + return; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Invalid request.", body, response.headers); + } + if (isCodeInRange("401", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Unexpected error", body, response.headers); + } + + // Work around for missing responses in specification, e.g. for petstore.yaml + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body: void = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "void", "" + ) as void; + return body; + } + + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", await response.getBodyAsAny(), response.headers); + } + + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to unpublishMetadata + * @throws ApiException if the response code was not in [200, 299] + */ + public async unpublishMetadata(response: ResponseContext): Promise { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("204", response.httpStatusCode)) { + return; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Invalid request.", body, response.headers); + } + if (isCodeInRange("401", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Unexpected error", body, response.headers); + } + + // Work around for missing responses in specification, e.g. for petstore.yaml + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body: void = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "void", "" + ) as void; + return body; + } + + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", await response.getBodyAsAny(), response.headers); + } + + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to updateColumnSecurityRules + * @throws ApiException if the response code was not in [200, 299] + */ + public async updateColumnSecurityRules(response: ResponseContext): Promise { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("204", response.httpStatusCode)) { + return; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Bad request - Invalid parameters or table not found", body, response.headers); + } + if (isCodeInRange("401", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Forbidden - User doesn\'t have permission to modify security rules for this table", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Internal server error", body, response.headers); + } + + // Work around for missing responses in specification, e.g. for petstore.yaml + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body: void = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "void", "" + ) as void; + return body; + } + + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", await response.getBodyAsAny(), response.headers); + } + +} diff --git a/sdks/typescript/apis/SystemApi.ts b/sdks/typescript/apis/SystemApi.ts new file mode 100644 index 000000000..1a9f5af82 --- /dev/null +++ b/sdks/typescript/apis/SystemApi.ts @@ -0,0 +1,940 @@ +// TODO: better import syntax? +import {BaseAPIRequestFactory, RequiredError, COLLECTION_FORMATS} from './baseapi'; +import {Configuration} from '../configuration'; +import {RequestContext, HttpMethod, ResponseContext, HttpFile} from '../http/http'; +import {ObjectSerializer} from '../models/ObjectSerializer'; +import {ApiException} from './exception'; +import {canConsumeForm, isCodeInRange} from '../util'; +import {SecurityAuthentication} from '../auth/auth'; + + +import { CommunicationChannelPreferencesResponse } from '../models/CommunicationChannelPreferencesResponse'; +import { CommunicationChannelValidateResponse } from '../models/CommunicationChannelValidateResponse'; +import { ConfigureCommunicationChannelPreferencesRequest } from '../models/ConfigureCommunicationChannelPreferencesRequest'; +import { ConfigureSecuritySettingsRequest } from '../models/ConfigureSecuritySettingsRequest'; +import { ErrorResponse } from '../models/ErrorResponse'; +import { SearchCommunicationChannelPreferencesRequest } from '../models/SearchCommunicationChannelPreferencesRequest'; +import { SearchSecuritySettingsRequest } from '../models/SearchSecuritySettingsRequest'; +import { SecuritySettingsResponse } from '../models/SecuritySettingsResponse'; +import { SystemConfig } from '../models/SystemConfig'; +import { SystemInfo } from '../models/SystemInfo'; +import { SystemOverrideInfo } from '../models/SystemOverrideInfo'; +import { UpdateSystemConfigRequest } from '../models/UpdateSystemConfigRequest'; +import { ValidateCommunicationChannelRequest } from '../models/ValidateCommunicationChannelRequest'; + +/** + * no description + */ +export class SystemApiRequestFactory extends BaseAPIRequestFactory { + + /** + * Version: 10.14.0.cl or later Configure communication channel preferences. - Use `cluster_preferences` to update the default preferences for your ThoughtSpot application instance. - If your instance has [Orgs](https://docs.thoughtspot.com/cloud/latest/orgs-overview), use `org_preferences` to specify Org-specific preferences that override the defaults. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) or `DEVELOPER` (**Has developer privilege**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, users with `APPLICATION_ADMINISTRATION` (**Can manage application settings**) privilege are also authorized to perform this action. + * @param configureCommunicationChannelPreferencesRequest + */ + public async configureCommunicationChannelPreferences(configureCommunicationChannelPreferencesRequest: ConfigureCommunicationChannelPreferencesRequest, _options?: Configuration): Promise { + let _config = _options || this.configuration; + + // verify required parameter 'configureCommunicationChannelPreferencesRequest' is not null or undefined + if (configureCommunicationChannelPreferencesRequest === null || configureCommunicationChannelPreferencesRequest === undefined) { + throw new RequiredError("SystemApi", "configureCommunicationChannelPreferences", "configureCommunicationChannelPreferencesRequest"); + } + + + // Path Params + const localVarPath = '/api/rest/2.0/system/preferences/communication-channels/configure'; + + // Make Request Context + const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.POST); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.25.0") + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.25.0") + + + + + // Body Params + const contentType = ObjectSerializer.getPreferredMediaType([ + "application/json" + ]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = ObjectSerializer.stringify( + ObjectSerializer.serialize(configureCommunicationChannelPreferencesRequest, "ConfigureCommunicationChannelPreferencesRequest", ""), + contentType + ); + requestContext.setBody(serializedBody); + + let authMethod: SecurityAuthentication | undefined; + // Apply auth methods + authMethod = _config.authMethods["bearerAuth"] + if (authMethod?.applySecurityAuthentication) { + await authMethod?.applySecurityAuthentication(requestContext); + } + + const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default + if (defaultAuth?.applySecurityAuthentication) { + await defaultAuth?.applySecurityAuthentication(requestContext); + } + + return requestContext; + } + + /** + * Version: 26.2.0.cl or later Configure security settings for your ThoughtSpot application instance. - Use `cluster_preferences` to update cluster-level security settings including CORS whitelisted URLs, CSP settings, SAML redirect URLs, partitioned cookies, and non-embed access configuration. - Use `org_preferences` to configure Org-specific security settings. If your instance has [Orgs](https://docs.thoughtspot.com/cloud/latest/orgs-overview), this allows configuring CORS and non-embed access settings specific to the Org. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) or `DEVELOPER` (**Has developer privilege**) privilege. Cluster-level SAML and script-src settings require `ADMINISTRATION` privilege. See [Security Settings](https://developers.thoughtspot.com/docs/security-settings) for more details. + * @param configureSecuritySettingsRequest + */ + public async configureSecuritySettings(configureSecuritySettingsRequest: ConfigureSecuritySettingsRequest, _options?: Configuration): Promise { + let _config = _options || this.configuration; + + // verify required parameter 'configureSecuritySettingsRequest' is not null or undefined + if (configureSecuritySettingsRequest === null || configureSecuritySettingsRequest === undefined) { + throw new RequiredError("SystemApi", "configureSecuritySettings", "configureSecuritySettingsRequest"); + } + + + // Path Params + const localVarPath = '/api/rest/2.0/system/security-settings/configure'; + + // Make Request Context + const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.POST); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.25.0") + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.25.0") + + + + + // Body Params + const contentType = ObjectSerializer.getPreferredMediaType([ + "application/json" + ]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = ObjectSerializer.stringify( + ObjectSerializer.serialize(configureSecuritySettingsRequest, "ConfigureSecuritySettingsRequest", ""), + contentType + ); + requestContext.setBody(serializedBody); + + let authMethod: SecurityAuthentication | undefined; + // Apply auth methods + authMethod = _config.authMethods["bearerAuth"] + if (authMethod?.applySecurityAuthentication) { + await authMethod?.applySecurityAuthentication(requestContext); + } + + const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default + if (defaultAuth?.applySecurityAuthentication) { + await defaultAuth?.applySecurityAuthentication(requestContext); + } + + return requestContext; + } + + /** + * Version: 9.0.0.cl or later Retrieves the current configuration details of the cluster. If the request is successful, the API returns a list configuration settings applied on the cluster. Requires `ADMINISTRATION`(**Can administer ThoughtSpot**) privilege to view these complete configuration settings of the cluster. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `SYSTEM_INFO_ADMINISTRATION` (**Can view system activities**) privilege is required. This API does not require any parameters to be passed in the request. + */ + public async getSystemConfig(_options?: Configuration): Promise { + let _config = _options || this.configuration; + + // Path Params + const localVarPath = '/api/rest/2.0/system/config'; + + // Make Request Context + const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.GET); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.25.0") + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.25.0") + + + + + let authMethod: SecurityAuthentication | undefined; + // Apply auth methods + authMethod = _config.authMethods["bearerAuth"] + if (authMethod?.applySecurityAuthentication) { + await authMethod?.applySecurityAuthentication(requestContext); + } + + const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default + if (defaultAuth?.applySecurityAuthentication) { + await defaultAuth?.applySecurityAuthentication(requestContext); + } + + return requestContext; + } + + /** + * Version: 9.0.0.cl or later Gets system information such as the release version, locale, time zone, deployment environment, date format, and date time format of the cluster. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privileges. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `SYSTEM_INFO_ADMINISTRATION` (**Can view system activities**) privilege is required. This API does not require any parameters to be passed in the request. + */ + public async getSystemInformation(_options?: Configuration): Promise { + let _config = _options || this.configuration; + + // Path Params + const localVarPath = '/api/rest/2.0/system'; + + // Make Request Context + const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.GET); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.25.0") + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.25.0") + + + + + let authMethod: SecurityAuthentication | undefined; + // Apply auth methods + authMethod = _config.authMethods["bearerAuth"] + if (authMethod?.applySecurityAuthentication) { + await authMethod?.applySecurityAuthentication(requestContext); + } + + const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default + if (defaultAuth?.applySecurityAuthentication) { + await defaultAuth?.applySecurityAuthentication(requestContext); + } + + return requestContext; + } + + /** + * Version: 9.2.0.cl or later Gets a list of configuration overrides applied on the cluster. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `APPLICATION_ADMINISTRATION` (**Can manage application settings**) privilege is required. This API does not require any parameters to be passed in the request. + */ + public async getSystemOverrideInfo(_options?: Configuration): Promise { + let _config = _options || this.configuration; + + // Path Params + const localVarPath = '/api/rest/2.0/system/config-overrides'; + + // Make Request Context + const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.GET); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.25.0") + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.25.0") + + + + + let authMethod: SecurityAuthentication | undefined; + // Apply auth methods + authMethod = _config.authMethods["bearerAuth"] + if (authMethod?.applySecurityAuthentication) { + await authMethod?.applySecurityAuthentication(requestContext); + } + + const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default + if (defaultAuth?.applySecurityAuthentication) { + await defaultAuth?.applySecurityAuthentication(requestContext); + } + + return requestContext; + } + + /** + * Version: 10.14.0.cl or later Fetch communication channel preferences. - Use `cluster_preferences` to fetch the default preferences for your ThoughtSpot application instance. - If your instance has [Orgs](https://docs.thoughtspot.com/cloud/latest/orgs-overview), use `org_preferences` to fetch any Org-specific preferences that override the defaults. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) or `DEVELOPER` (**Has developer privilege**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, users with `APPLICATION_ADMINISTRATION` (**Can manage application settings**) privilege are also authorized to perform this action. + * @param searchCommunicationChannelPreferencesRequest + */ + public async searchCommunicationChannelPreferences(searchCommunicationChannelPreferencesRequest: SearchCommunicationChannelPreferencesRequest, _options?: Configuration): Promise { + let _config = _options || this.configuration; + + // verify required parameter 'searchCommunicationChannelPreferencesRequest' is not null or undefined + if (searchCommunicationChannelPreferencesRequest === null || searchCommunicationChannelPreferencesRequest === undefined) { + throw new RequiredError("SystemApi", "searchCommunicationChannelPreferences", "searchCommunicationChannelPreferencesRequest"); + } + + + // Path Params + const localVarPath = '/api/rest/2.0/system/preferences/communication-channels/search'; + + // Make Request Context + const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.POST); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.25.0") + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.25.0") + + + + + // Body Params + const contentType = ObjectSerializer.getPreferredMediaType([ + "application/json" + ]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = ObjectSerializer.stringify( + ObjectSerializer.serialize(searchCommunicationChannelPreferencesRequest, "SearchCommunicationChannelPreferencesRequest", ""), + contentType + ); + requestContext.setBody(serializedBody); + + let authMethod: SecurityAuthentication | undefined; + // Apply auth methods + authMethod = _config.authMethods["bearerAuth"] + if (authMethod?.applySecurityAuthentication) { + await authMethod?.applySecurityAuthentication(requestContext); + } + + const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default + if (defaultAuth?.applySecurityAuthentication) { + await defaultAuth?.applySecurityAuthentication(requestContext); + } + + return requestContext; + } + + /** + * Version: 26.2.0.cl or later Fetch security settings for your ThoughtSpot application instance. - Use `scope: CLUSTER` to retrieve cluster-level security settings, including CORS and CSP allowlists, SAML redirect URLs, and settings that control access to non-embedded pages. - Use `scope: ORG` to retrieve Org-level security settings. If your instance has [Orgs](https://docs.thoughtspot.com/cloud/latest/orgs-overview), this returns CORS and non-embed access settings specific to the Org. - If `scope` is not specified, returns both cluster and Org-specific settings based on user privileges. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) or `DEVELOPER` (**Has developer privilege**) privilege. See [Security Settings](https://developers.thoughtspot.com/docs/security-settings) for more details. + * @param searchSecuritySettingsRequest + */ + public async searchSecuritySettings(searchSecuritySettingsRequest: SearchSecuritySettingsRequest, _options?: Configuration): Promise { + let _config = _options || this.configuration; + + // verify required parameter 'searchSecuritySettingsRequest' is not null or undefined + if (searchSecuritySettingsRequest === null || searchSecuritySettingsRequest === undefined) { + throw new RequiredError("SystemApi", "searchSecuritySettings", "searchSecuritySettingsRequest"); + } + + + // Path Params + const localVarPath = '/api/rest/2.0/system/security-settings/search'; + + // Make Request Context + const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.POST); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.25.0") + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.25.0") + + + + + // Body Params + const contentType = ObjectSerializer.getPreferredMediaType([ + "application/json" + ]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = ObjectSerializer.stringify( + ObjectSerializer.serialize(searchSecuritySettingsRequest, "SearchSecuritySettingsRequest", ""), + contentType + ); + requestContext.setBody(serializedBody); + + let authMethod: SecurityAuthentication | undefined; + // Apply auth methods + authMethod = _config.authMethods["bearerAuth"] + if (authMethod?.applySecurityAuthentication) { + await authMethod?.applySecurityAuthentication(requestContext); + } + + const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default + if (defaultAuth?.applySecurityAuthentication) { + await defaultAuth?.applySecurityAuthentication(requestContext); + } + + return requestContext; + } + + /** + * Version: 9.2.0.cl or later Updates the current configuration of the cluster. You must send the configuration data in JSON format. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privileges. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `APPLICATION_ADMINISTRATION` (**Can manage application settings**) privilege is required. + * @param updateSystemConfigRequest + */ + public async updateSystemConfig(updateSystemConfigRequest: UpdateSystemConfigRequest, _options?: Configuration): Promise { + let _config = _options || this.configuration; + + // verify required parameter 'updateSystemConfigRequest' is not null or undefined + if (updateSystemConfigRequest === null || updateSystemConfigRequest === undefined) { + throw new RequiredError("SystemApi", "updateSystemConfig", "updateSystemConfigRequest"); + } + + + // Path Params + const localVarPath = '/api/rest/2.0/system/config-update'; + + // Make Request Context + const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.POST); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.25.0") + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.25.0") + + + + + // Body Params + const contentType = ObjectSerializer.getPreferredMediaType([ + "application/json" + ]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = ObjectSerializer.stringify( + ObjectSerializer.serialize(updateSystemConfigRequest, "UpdateSystemConfigRequest", ""), + contentType + ); + requestContext.setBody(serializedBody); + + let authMethod: SecurityAuthentication | undefined; + // Apply auth methods + authMethod = _config.authMethods["bearerAuth"] + if (authMethod?.applySecurityAuthentication) { + await authMethod?.applySecurityAuthentication(requestContext); + } + + const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default + if (defaultAuth?.applySecurityAuthentication) { + await defaultAuth?.applySecurityAuthentication(requestContext); + } + + return requestContext; + } + + /** + * Version: 26.4.0.cl or later Validates a communication channel configuration to ensure it is properly set up and can receive events. - Use `channel_type` to specify the type of communication channel to validate (e.g., WEBHOOK). - Use `channel_identifier` to provide the unique identifier or name for the communication channel. - Use `event_type` to specify the event type to validate for this channel. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) or `DEVELOPER` (**Has developer privilege**) privilege. For webhook channels, users with `CAN_MANAGE_WEBHOOKS` (**Can manage webhooks**) privilege are also authorized to perform this action. + * @param validateCommunicationChannelRequest + */ + public async validateCommunicationChannel(validateCommunicationChannelRequest: ValidateCommunicationChannelRequest, _options?: Configuration): Promise { + let _config = _options || this.configuration; + + // verify required parameter 'validateCommunicationChannelRequest' is not null or undefined + if (validateCommunicationChannelRequest === null || validateCommunicationChannelRequest === undefined) { + throw new RequiredError("SystemApi", "validateCommunicationChannel", "validateCommunicationChannelRequest"); + } + + + // Path Params + const localVarPath = '/api/rest/2.0/system/communication-channels/validate'; + + // Make Request Context + const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.POST); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.25.0") + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.25.0") + + + + + // Body Params + const contentType = ObjectSerializer.getPreferredMediaType([ + "application/json" + ]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = ObjectSerializer.stringify( + ObjectSerializer.serialize(validateCommunicationChannelRequest, "ValidateCommunicationChannelRequest", ""), + contentType + ); + requestContext.setBody(serializedBody); + + let authMethod: SecurityAuthentication | undefined; + // Apply auth methods + authMethod = _config.authMethods["bearerAuth"] + if (authMethod?.applySecurityAuthentication) { + await authMethod?.applySecurityAuthentication(requestContext); + } + + const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default + if (defaultAuth?.applySecurityAuthentication) { + await defaultAuth?.applySecurityAuthentication(requestContext); + } + + return requestContext; + } + +} + +export class SystemApiResponseProcessor { + + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to configureCommunicationChannelPreferences + * @throws ApiException if the response code was not in [200, 299] + */ + public async configureCommunicationChannelPreferences(response: ResponseContext): Promise { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("204", response.httpStatusCode)) { + return; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Invalid request.", body, response.headers); + } + if (isCodeInRange("401", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Unexpected error", body, response.headers); + } + + // Work around for missing responses in specification, e.g. for petstore.yaml + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body: void = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "void", "" + ) as void; + return body; + } + + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", await response.getBodyAsAny(), response.headers); + } + + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to configureSecuritySettings + * @throws ApiException if the response code was not in [200, 299] + */ + public async configureSecuritySettings(response: ResponseContext): Promise { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("204", response.httpStatusCode)) { + return; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Invalid request.", body, response.headers); + } + if (isCodeInRange("401", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Unexpected error", body, response.headers); + } + + // Work around for missing responses in specification, e.g. for petstore.yaml + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body: void = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "void", "" + ) as void; + return body; + } + + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", await response.getBodyAsAny(), response.headers); + } + + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to getSystemConfig + * @throws ApiException if the response code was not in [200, 299] + */ + public async getSystemConfig(response: ResponseContext): Promise { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("200", response.httpStatusCode)) { + const body: SystemConfig = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "SystemConfig", "" + ) as SystemConfig; + return body; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Invalid request.", body, response.headers); + } + if (isCodeInRange("401", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Unexpected error", body, response.headers); + } + + // Work around for missing responses in specification, e.g. for petstore.yaml + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body: SystemConfig = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "SystemConfig", "" + ) as SystemConfig; + return body; + } + + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", await response.getBodyAsAny(), response.headers); + } + + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to getSystemInformation + * @throws ApiException if the response code was not in [200, 299] + */ + public async getSystemInformation(response: ResponseContext): Promise { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("200", response.httpStatusCode)) { + const body: SystemInfo = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "SystemInfo", "" + ) as SystemInfo; + return body; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Invalid request.", body, response.headers); + } + if (isCodeInRange("401", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Unexpected error", body, response.headers); + } + + // Work around for missing responses in specification, e.g. for petstore.yaml + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body: SystemInfo = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "SystemInfo", "" + ) as SystemInfo; + return body; + } + + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", await response.getBodyAsAny(), response.headers); + } + + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to getSystemOverrideInfo + * @throws ApiException if the response code was not in [200, 299] + */ + public async getSystemOverrideInfo(response: ResponseContext): Promise { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("200", response.httpStatusCode)) { + const body: SystemOverrideInfo = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "SystemOverrideInfo", "" + ) as SystemOverrideInfo; + return body; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Invalid request.", body, response.headers); + } + if (isCodeInRange("401", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Unexpected error", body, response.headers); + } + + // Work around for missing responses in specification, e.g. for petstore.yaml + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body: SystemOverrideInfo = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "SystemOverrideInfo", "" + ) as SystemOverrideInfo; + return body; + } + + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", await response.getBodyAsAny(), response.headers); + } + + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to searchCommunicationChannelPreferences + * @throws ApiException if the response code was not in [200, 299] + */ + public async searchCommunicationChannelPreferences(response: ResponseContext): Promise { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("200", response.httpStatusCode)) { + const body: CommunicationChannelPreferencesResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "CommunicationChannelPreferencesResponse", "" + ) as CommunicationChannelPreferencesResponse; + return body; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Invalid request.", body, response.headers); + } + if (isCodeInRange("401", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Unexpected error", body, response.headers); + } + + // Work around for missing responses in specification, e.g. for petstore.yaml + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body: CommunicationChannelPreferencesResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "CommunicationChannelPreferencesResponse", "" + ) as CommunicationChannelPreferencesResponse; + return body; + } + + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", await response.getBodyAsAny(), response.headers); + } + + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to searchSecuritySettings + * @throws ApiException if the response code was not in [200, 299] + */ + public async searchSecuritySettings(response: ResponseContext): Promise { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("200", response.httpStatusCode)) { + const body: SecuritySettingsResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "SecuritySettingsResponse", "" + ) as SecuritySettingsResponse; + return body; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Invalid request.", body, response.headers); + } + if (isCodeInRange("401", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Unexpected error", body, response.headers); + } + + // Work around for missing responses in specification, e.g. for petstore.yaml + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body: SecuritySettingsResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "SecuritySettingsResponse", "" + ) as SecuritySettingsResponse; + return body; + } + + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", await response.getBodyAsAny(), response.headers); + } + + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to updateSystemConfig + * @throws ApiException if the response code was not in [200, 299] + */ + public async updateSystemConfig(response: ResponseContext): Promise { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("204", response.httpStatusCode)) { + return; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Invalid request.", body, response.headers); + } + if (isCodeInRange("401", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Unexpected error", body, response.headers); + } + + // Work around for missing responses in specification, e.g. for petstore.yaml + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body: void = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "void", "" + ) as void; + return body; + } + + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", await response.getBodyAsAny(), response.headers); + } + + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to validateCommunicationChannel + * @throws ApiException if the response code was not in [200, 299] + */ + public async validateCommunicationChannel(response: ResponseContext): Promise { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("200", response.httpStatusCode)) { + const body: CommunicationChannelValidateResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "CommunicationChannelValidateResponse", "" + ) as CommunicationChannelValidateResponse; + return body; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Invalid request.", body, response.headers); + } + if (isCodeInRange("401", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Unexpected error", body, response.headers); + } + + // Work around for missing responses in specification, e.g. for petstore.yaml + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body: CommunicationChannelValidateResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "CommunicationChannelValidateResponse", "" + ) as CommunicationChannelValidateResponse; + return body; + } + + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", await response.getBodyAsAny(), response.headers); + } + +} diff --git a/sdks/typescript/apis/TagsApi.ts b/sdks/typescript/apis/TagsApi.ts new file mode 100644 index 000000000..5723db2dc --- /dev/null +++ b/sdks/typescript/apis/TagsApi.ts @@ -0,0 +1,658 @@ +// TODO: better import syntax? +import {BaseAPIRequestFactory, RequiredError, COLLECTION_FORMATS} from './baseapi'; +import {Configuration} from '../configuration'; +import {RequestContext, HttpMethod, ResponseContext, HttpFile} from '../http/http'; +import {ObjectSerializer} from '../models/ObjectSerializer'; +import {ApiException} from './exception'; +import {canConsumeForm, isCodeInRange} from '../util'; +import {SecurityAuthentication} from '../auth/auth'; + + +import { AssignTagRequest } from '../models/AssignTagRequest'; +import { CreateTagRequest } from '../models/CreateTagRequest'; +import { ErrorResponse } from '../models/ErrorResponse'; +import { SearchTagsRequest } from '../models/SearchTagsRequest'; +import { Tag } from '../models/Tag'; +import { UnassignTagRequest } from '../models/UnassignTagRequest'; +import { UpdateTagRequest } from '../models/UpdateTagRequest'; + +/** + * no description + */ +export class TagsApiRequestFactory extends BaseAPIRequestFactory { + + /** + * Version: 9.0.0.cl or later Assigns tags to Liveboards, Answers, Tables, and Worksheets. Requires edit access to the metadata object. + * @param assignTagRequest + */ + public async assignTag(assignTagRequest: AssignTagRequest, _options?: Configuration): Promise { + let _config = _options || this.configuration; + + // verify required parameter 'assignTagRequest' is not null or undefined + if (assignTagRequest === null || assignTagRequest === undefined) { + throw new RequiredError("TagsApi", "assignTag", "assignTagRequest"); + } + + + // Path Params + const localVarPath = '/api/rest/2.0/tags/assign'; + + // Make Request Context + const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.POST); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.25.0") + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.25.0") + + + + + // Body Params + const contentType = ObjectSerializer.getPreferredMediaType([ + "application/json" + ]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = ObjectSerializer.stringify( + ObjectSerializer.serialize(assignTagRequest, "AssignTagRequest", ""), + contentType + ); + requestContext.setBody(serializedBody); + + let authMethod: SecurityAuthentication | undefined; + // Apply auth methods + authMethod = _config.authMethods["bearerAuth"] + if (authMethod?.applySecurityAuthentication) { + await authMethod?.applySecurityAuthentication(requestContext); + } + + const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default + if (defaultAuth?.applySecurityAuthentication) { + await defaultAuth?.applySecurityAuthentication(requestContext); + } + + return requestContext; + } + + /** + * Version: 9.0.0.cl or later Creates a tag object. Tags are labels that identify a metadata object. For example, you can create a tag to designate subject areas, such as sales, HR, marketing, and finance. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `TAGMANAGEMENT` (**Can manage tags**) privilege is required to create, edit, and delete tags. + * @param createTagRequest + */ + public async createTag(createTagRequest: CreateTagRequest, _options?: Configuration): Promise { + let _config = _options || this.configuration; + + // verify required parameter 'createTagRequest' is not null or undefined + if (createTagRequest === null || createTagRequest === undefined) { + throw new RequiredError("TagsApi", "createTag", "createTagRequest"); + } + + + // Path Params + const localVarPath = '/api/rest/2.0/tags/create'; + + // Make Request Context + const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.POST); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.25.0") + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.25.0") + + + + + // Body Params + const contentType = ObjectSerializer.getPreferredMediaType([ + "application/json" + ]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = ObjectSerializer.stringify( + ObjectSerializer.serialize(createTagRequest, "CreateTagRequest", ""), + contentType + ); + requestContext.setBody(serializedBody); + + let authMethod: SecurityAuthentication | undefined; + // Apply auth methods + authMethod = _config.authMethods["bearerAuth"] + if (authMethod?.applySecurityAuthentication) { + await authMethod?.applySecurityAuthentication(requestContext); + } + + const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default + if (defaultAuth?.applySecurityAuthentication) { + await defaultAuth?.applySecurityAuthentication(requestContext); + } + + return requestContext; + } + + /** + * Version: 9.0.0.cl or later Deletes a tag object from the ThoughtSpot system Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `TAGMANAGEMENT` (**Can manage tags**) privilege is required to create, edit, and delete tags. + * @param tagIdentifier Tag identifier Tag name or Tag id. + */ + public async deleteTag(tagIdentifier: string, _options?: Configuration): Promise { + let _config = _options || this.configuration; + + // verify required parameter 'tagIdentifier' is not null or undefined + if (tagIdentifier === null || tagIdentifier === undefined) { + throw new RequiredError("TagsApi", "deleteTag", "tagIdentifier"); + } + + + // Path Params + const localVarPath = '/api/rest/2.0/tags/{tag_identifier}/delete' + .replace('{' + 'tag_identifier' + '}', encodeURIComponent(String(tagIdentifier))); + + // Make Request Context + const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.POST); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.25.0") + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.25.0") + + + + + let authMethod: SecurityAuthentication | undefined; + // Apply auth methods + authMethod = _config.authMethods["bearerAuth"] + if (authMethod?.applySecurityAuthentication) { + await authMethod?.applySecurityAuthentication(requestContext); + } + + const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default + if (defaultAuth?.applySecurityAuthentication) { + await defaultAuth?.applySecurityAuthentication(requestContext); + } + + return requestContext; + } + + /** + * Version: 9.0.0.cl or later Gets a list of tag objects available on the ThoughtSpot system. To get details of a specific tag object, specify the GUID or name. Any authenticated user can search for tag objects. + * @param searchTagsRequest + */ + public async searchTags(searchTagsRequest: SearchTagsRequest, _options?: Configuration): Promise { + let _config = _options || this.configuration; + + // verify required parameter 'searchTagsRequest' is not null or undefined + if (searchTagsRequest === null || searchTagsRequest === undefined) { + throw new RequiredError("TagsApi", "searchTags", "searchTagsRequest"); + } + + + // Path Params + const localVarPath = '/api/rest/2.0/tags/search'; + + // Make Request Context + const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.POST); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.25.0") + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.25.0") + + + + + // Body Params + const contentType = ObjectSerializer.getPreferredMediaType([ + "application/json" + ]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = ObjectSerializer.stringify( + ObjectSerializer.serialize(searchTagsRequest, "SearchTagsRequest", ""), + contentType + ); + requestContext.setBody(serializedBody); + + let authMethod: SecurityAuthentication | undefined; + // Apply auth methods + authMethod = _config.authMethods["bearerAuth"] + if (authMethod?.applySecurityAuthentication) { + await authMethod?.applySecurityAuthentication(requestContext); + } + + const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default + if (defaultAuth?.applySecurityAuthentication) { + await defaultAuth?.applySecurityAuthentication(requestContext); + } + + return requestContext; + } + + /** + * Version: 9.0.0.cl or later Removes the tags applied to a Liveboard, Answer, Table, or Worksheet. Requires edit access to the metadata object. + * @param unassignTagRequest + */ + public async unassignTag(unassignTagRequest: UnassignTagRequest, _options?: Configuration): Promise { + let _config = _options || this.configuration; + + // verify required parameter 'unassignTagRequest' is not null or undefined + if (unassignTagRequest === null || unassignTagRequest === undefined) { + throw new RequiredError("TagsApi", "unassignTag", "unassignTagRequest"); + } + + + // Path Params + const localVarPath = '/api/rest/2.0/tags/unassign'; + + // Make Request Context + const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.POST); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.25.0") + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.25.0") + + + + + // Body Params + const contentType = ObjectSerializer.getPreferredMediaType([ + "application/json" + ]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = ObjectSerializer.stringify( + ObjectSerializer.serialize(unassignTagRequest, "UnassignTagRequest", ""), + contentType + ); + requestContext.setBody(serializedBody); + + let authMethod: SecurityAuthentication | undefined; + // Apply auth methods + authMethod = _config.authMethods["bearerAuth"] + if (authMethod?.applySecurityAuthentication) { + await authMethod?.applySecurityAuthentication(requestContext); + } + + const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default + if (defaultAuth?.applySecurityAuthentication) { + await defaultAuth?.applySecurityAuthentication(requestContext); + } + + return requestContext; + } + + /** + * Version: 9.0.0.cl or later Updates a tag object. You can modify the `name` and `color` properties of a tag object. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `TAGMANAGEMENT` (**Can manage tags**) privilege is required to create, edit, and delete tags. + * @param tagIdentifier Name or Id of the tag. + * @param updateTagRequest + */ + public async updateTag(tagIdentifier: string, updateTagRequest: UpdateTagRequest, _options?: Configuration): Promise { + let _config = _options || this.configuration; + + // verify required parameter 'tagIdentifier' is not null or undefined + if (tagIdentifier === null || tagIdentifier === undefined) { + throw new RequiredError("TagsApi", "updateTag", "tagIdentifier"); + } + + + // verify required parameter 'updateTagRequest' is not null or undefined + if (updateTagRequest === null || updateTagRequest === undefined) { + throw new RequiredError("TagsApi", "updateTag", "updateTagRequest"); + } + + + // Path Params + const localVarPath = '/api/rest/2.0/tags/{tag_identifier}/update' + .replace('{' + 'tag_identifier' + '}', encodeURIComponent(String(tagIdentifier))); + + // Make Request Context + const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.POST); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.25.0") + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.25.0") + + + + + // Body Params + const contentType = ObjectSerializer.getPreferredMediaType([ + "application/json" + ]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = ObjectSerializer.stringify( + ObjectSerializer.serialize(updateTagRequest, "UpdateTagRequest", ""), + contentType + ); + requestContext.setBody(serializedBody); + + let authMethod: SecurityAuthentication | undefined; + // Apply auth methods + authMethod = _config.authMethods["bearerAuth"] + if (authMethod?.applySecurityAuthentication) { + await authMethod?.applySecurityAuthentication(requestContext); + } + + const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default + if (defaultAuth?.applySecurityAuthentication) { + await defaultAuth?.applySecurityAuthentication(requestContext); + } + + return requestContext; + } + +} + +export class TagsApiResponseProcessor { + + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to assignTag + * @throws ApiException if the response code was not in [200, 299] + */ + public async assignTag(response: ResponseContext): Promise { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("204", response.httpStatusCode)) { + return; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Invalid request.", body, response.headers); + } + if (isCodeInRange("401", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Unexpected error", body, response.headers); + } + + // Work around for missing responses in specification, e.g. for petstore.yaml + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body: void = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "void", "" + ) as void; + return body; + } + + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", await response.getBodyAsAny(), response.headers); + } + + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to createTag + * @throws ApiException if the response code was not in [200, 299] + */ + public async createTag(response: ResponseContext): Promise { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("200", response.httpStatusCode)) { + const body: Tag = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "Tag", "" + ) as Tag; + return body; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Invalid request.", body, response.headers); + } + if (isCodeInRange("401", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Unexpected error", body, response.headers); + } + + // Work around for missing responses in specification, e.g. for petstore.yaml + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body: Tag = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "Tag", "" + ) as Tag; + return body; + } + + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", await response.getBodyAsAny(), response.headers); + } + + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to deleteTag + * @throws ApiException if the response code was not in [200, 299] + */ + public async deleteTag(response: ResponseContext): Promise { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("204", response.httpStatusCode)) { + return; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Invalid request.", body, response.headers); + } + if (isCodeInRange("401", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Unexpected error", body, response.headers); + } + + // Work around for missing responses in specification, e.g. for petstore.yaml + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body: void = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "void", "" + ) as void; + return body; + } + + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", await response.getBodyAsAny(), response.headers); + } + + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to searchTags + * @throws ApiException if the response code was not in [200, 299] + */ + public async searchTags(response: ResponseContext): Promise > { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("200", response.httpStatusCode)) { + const body: Array = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "Array", "" + ) as Array; + return body; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Invalid request.", body, response.headers); + } + if (isCodeInRange("401", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Unexpected error", body, response.headers); + } + + // Work around for missing responses in specification, e.g. for petstore.yaml + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body: Array = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "Array", "" + ) as Array; + return body; + } + + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", await response.getBodyAsAny(), response.headers); + } + + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to unassignTag + * @throws ApiException if the response code was not in [200, 299] + */ + public async unassignTag(response: ResponseContext): Promise { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("204", response.httpStatusCode)) { + return; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Invalid request.", body, response.headers); + } + if (isCodeInRange("401", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Unexpected error", body, response.headers); + } + + // Work around for missing responses in specification, e.g. for petstore.yaml + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body: void = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "void", "" + ) as void; + return body; + } + + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", await response.getBodyAsAny(), response.headers); + } + + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to updateTag + * @throws ApiException if the response code was not in [200, 299] + */ + public async updateTag(response: ResponseContext): Promise { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("204", response.httpStatusCode)) { + return; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Invalid request.", body, response.headers); + } + if (isCodeInRange("401", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Unexpected error", body, response.headers); + } + + // Work around for missing responses in specification, e.g. for petstore.yaml + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body: void = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "void", "" + ) as void; + return body; + } + + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", await response.getBodyAsAny(), response.headers); + } + +} diff --git a/sdks/typescript/apis/ThoughtSpotRestApi.ts b/sdks/typescript/apis/ThoughtSpotRestApi.ts new file mode 100644 index 000000000..e3b12f240 --- /dev/null +++ b/sdks/typescript/apis/ThoughtSpotRestApi.ts @@ -0,0 +1,17452 @@ +// TODO: better import syntax? +import {BaseAPIRequestFactory, RequiredError, COLLECTION_FORMATS} from './baseapi'; +import {Configuration} from '../configuration'; +import {RequestContext, HttpMethod, ResponseContext, HttpFile} from '../http/http'; +import {ObjectSerializer} from '../models/ObjectSerializer'; +import {ApiException} from './exception'; +import {canConsumeForm, isCodeInRange} from '../util'; +import {SecurityAuthentication} from '../auth/auth'; + + +import { AccessToken } from '../models/AccessToken'; +import { ActivateUserRequest } from '../models/ActivateUserRequest'; +import { AgentConversation } from '../models/AgentConversation'; +import { AnswerDataResponse } from '../models/AnswerDataResponse'; +import { AssignChangeAuthorRequest } from '../models/AssignChangeAuthorRequest'; +import { AssignTagRequest } from '../models/AssignTagRequest'; +import { CalendarResponse } from '../models/CalendarResponse'; +import { ChangeUserPasswordRequest } from '../models/ChangeUserPasswordRequest'; +import { Collection } from '../models/Collection'; +import { CollectionDeleteResponse } from '../models/CollectionDeleteResponse'; +import { CollectionSearchResponse } from '../models/CollectionSearchResponse'; +import { ColumnSecurityRuleResponse } from '../models/ColumnSecurityRuleResponse'; +import { CommitBranchRequest } from '../models/CommitBranchRequest'; +import { CommitHistoryResponse } from '../models/CommitHistoryResponse'; +import { CommitResponse } from '../models/CommitResponse'; +import { CommunicationChannelPreferencesResponse } from '../models/CommunicationChannelPreferencesResponse'; +import { CommunicationChannelValidateResponse } from '../models/CommunicationChannelValidateResponse'; +import { ConfigureAuthSettingsRequest } from '../models/ConfigureAuthSettingsRequest'; +import { ConfigureCommunicationChannelPreferencesRequest } from '../models/ConfigureCommunicationChannelPreferencesRequest'; +import { ConfigureSecuritySettingsRequest } from '../models/ConfigureSecuritySettingsRequest'; +import { ConnectionConfigurationResponse } from '../models/ConnectionConfigurationResponse'; +import { ConnectionConfigurationSearchRequest } from '../models/ConnectionConfigurationSearchRequest'; +import { Conversation } from '../models/Conversation'; +import { ConvertWorksheetToModelRequest } from '../models/ConvertWorksheetToModelRequest'; +import { CopyObjectRequest } from '../models/CopyObjectRequest'; +import { CreateAgentConversationRequest } from '../models/CreateAgentConversationRequest'; +import { CreateCalendarRequest } from '../models/CreateCalendarRequest'; +import { CreateCollectionRequest } from '../models/CreateCollectionRequest'; +import { CreateConfigRequest } from '../models/CreateConfigRequest'; +import { CreateConnectionConfigurationRequest } from '../models/CreateConnectionConfigurationRequest'; +import { CreateConnectionRequest } from '../models/CreateConnectionRequest'; +import { CreateConnectionResponse } from '../models/CreateConnectionResponse'; +import { CreateConversationRequest } from '../models/CreateConversationRequest'; +import { CreateCustomActionRequest } from '../models/CreateCustomActionRequest'; +import { CreateEmailCustomizationRequest } from '../models/CreateEmailCustomizationRequest'; +import { CreateEmailCustomizationResponse } from '../models/CreateEmailCustomizationResponse'; +import { CreateOrgRequest } from '../models/CreateOrgRequest'; +import { CreateRoleRequest } from '../models/CreateRoleRequest'; +import { CreateScheduleRequest } from '../models/CreateScheduleRequest'; +import { CreateTagRequest } from '../models/CreateTagRequest'; +import { CreateUserGroupRequest } from '../models/CreateUserGroupRequest'; +import { CreateUserRequest } from '../models/CreateUserRequest'; +import { CreateVariableRequest } from '../models/CreateVariableRequest'; +import { CreateWebhookConfigurationRequest } from '../models/CreateWebhookConfigurationRequest'; +import { DbtSearchResponse } from '../models/DbtSearchResponse'; +import { DeactivateUserRequest } from '../models/DeactivateUserRequest'; +import { DeleteCollectionRequest } from '../models/DeleteCollectionRequest'; +import { DeleteConfigRequest } from '../models/DeleteConfigRequest'; +import { DeleteConnectionConfigurationRequest } from '../models/DeleteConnectionConfigurationRequest'; +import { DeleteConnectionRequest } from '../models/DeleteConnectionRequest'; +import { DeleteMetadataRequest } from '../models/DeleteMetadataRequest'; +import { DeleteOrgEmailCustomizationRequest } from '../models/DeleteOrgEmailCustomizationRequest'; +import { DeleteVariablesRequest } from '../models/DeleteVariablesRequest'; +import { DeleteWebhookConfigurationsRequest } from '../models/DeleteWebhookConfigurationsRequest'; +import { DeployCommitRequest } from '../models/DeployCommitRequest'; +import { DeployResponse } from '../models/DeployResponse'; +import { ErrorResponse } from '../models/ErrorResponse'; +import { EurekaDataSourceSuggestionResponse } from '../models/EurekaDataSourceSuggestionResponse'; +import { EurekaDecomposeQueryResponse } from '../models/EurekaDecomposeQueryResponse'; +import { EurekaGetNLInstructionsResponse } from '../models/EurekaGetNLInstructionsResponse'; +import { EurekaGetRelevantQuestionsResponse } from '../models/EurekaGetRelevantQuestionsResponse'; +import { EurekaSetNLInstructionsResponse } from '../models/EurekaSetNLInstructionsResponse'; +import { ExportAnswerReportRequest } from '../models/ExportAnswerReportRequest'; +import { ExportLiveboardReportRequest } from '../models/ExportLiveboardReportRequest'; +import { ExportMetadataTMLBatchedRequest } from '../models/ExportMetadataTMLBatchedRequest'; +import { ExportMetadataTMLRequest } from '../models/ExportMetadataTMLRequest'; +import { FetchAnswerDataRequest } from '../models/FetchAnswerDataRequest'; +import { FetchAnswerSqlQueryRequest } from '../models/FetchAnswerSqlQueryRequest'; +import { FetchAsyncImportTaskStatusRequest } from '../models/FetchAsyncImportTaskStatusRequest'; +import { FetchColumnSecurityRulesRequest } from '../models/FetchColumnSecurityRulesRequest'; +import { FetchConnectionDiffStatusResponse } from '../models/FetchConnectionDiffStatusResponse'; +import { FetchLiveboardDataRequest } from '../models/FetchLiveboardDataRequest'; +import { FetchLiveboardSqlQueryRequest } from '../models/FetchLiveboardSqlQueryRequest'; +import { FetchLogsRequest } from '../models/FetchLogsRequest'; +import { FetchObjectPrivilegesRequest } from '../models/FetchObjectPrivilegesRequest'; +import { FetchPermissionsOfPrincipalsRequest } from '../models/FetchPermissionsOfPrincipalsRequest'; +import { FetchPermissionsOnMetadataRequest } from '../models/FetchPermissionsOnMetadataRequest'; +import { ForceLogoutUsersRequest } from '../models/ForceLogoutUsersRequest'; +import { GenerateCSVRequest } from '../models/GenerateCSVRequest'; +import { GetAsyncImportStatusResponse } from '../models/GetAsyncImportStatusResponse'; +import { GetCustomAccessTokenRequest } from '../models/GetCustomAccessTokenRequest'; +import { GetDataSourceSuggestionsRequest } from '../models/GetDataSourceSuggestionsRequest'; +import { GetFullAccessTokenRequest } from '../models/GetFullAccessTokenRequest'; +import { GetNLInstructionsRequest } from '../models/GetNLInstructionsRequest'; +import { GetObjectAccessTokenRequest } from '../models/GetObjectAccessTokenRequest'; +import { GetRelevantQuestionsRequest } from '../models/GetRelevantQuestionsRequest'; +import { GetTokenResponse } from '../models/GetTokenResponse'; +import { ImportEPackAsyncTaskStatus } from '../models/ImportEPackAsyncTaskStatus'; +import { ImportMetadataTMLAsyncRequest } from '../models/ImportMetadataTMLAsyncRequest'; +import { ImportMetadataTMLRequest } from '../models/ImportMetadataTMLRequest'; +import { ImportUserGroupsRequest } from '../models/ImportUserGroupsRequest'; +import { ImportUserGroupsResponse } from '../models/ImportUserGroupsResponse'; +import { ImportUsersRequest } from '../models/ImportUsersRequest'; +import { ImportUsersResponse } from '../models/ImportUsersResponse'; +import { LiveboardDataResponse } from '../models/LiveboardDataResponse'; +import { LogResponse } from '../models/LogResponse'; +import { LoginRequest } from '../models/LoginRequest'; +import { ManageObjectPrivilegeRequest } from '../models/ManageObjectPrivilegeRequest'; +import { MetadataSearchResponse } from '../models/MetadataSearchResponse'; +import { ObjectPrivilegesOfMetadataResponse } from '../models/ObjectPrivilegesOfMetadataResponse'; +import { OrgResponse } from '../models/OrgResponse'; +import { ParameterizeMetadataFieldsRequest } from '../models/ParameterizeMetadataFieldsRequest'; +import { ParameterizeMetadataRequest } from '../models/ParameterizeMetadataRequest'; +import { PermissionOfMetadataResponse } from '../models/PermissionOfMetadataResponse'; +import { PermissionOfPrincipalsResponse } from '../models/PermissionOfPrincipalsResponse'; +import { PublishMetadataRequest } from '../models/PublishMetadataRequest'; +import { PutVariableValuesRequest } from '../models/PutVariableValuesRequest'; +import { QueryGetDecomposedQueryRequest } from '../models/QueryGetDecomposedQueryRequest'; +import { RepoConfigObject } from '../models/RepoConfigObject'; +import { ResetUserPasswordRequest } from '../models/ResetUserPasswordRequest'; +import { ResponseActivationURL } from '../models/ResponseActivationURL'; +import { ResponseCopyObject } from '../models/ResponseCopyObject'; +import { ResponseCustomAction } from '../models/ResponseCustomAction'; +import { ResponseMessage } from '../models/ResponseMessage'; +import { ResponseSchedule } from '../models/ResponseSchedule'; +import { ResponseWorksheetToModelConversion } from '../models/ResponseWorksheetToModelConversion'; +import { RevertCommitRequest } from '../models/RevertCommitRequest'; +import { RevertResponse } from '../models/RevertResponse'; +import { RevokeRefreshTokensRequest } from '../models/RevokeRefreshTokensRequest'; +import { RevokeRefreshTokensResponse } from '../models/RevokeRefreshTokensResponse'; +import { RevokeTokenRequest } from '../models/RevokeTokenRequest'; +import { RoleResponse } from '../models/RoleResponse'; +import { SearchAuthSettingsRequest } from '../models/SearchAuthSettingsRequest'; +import { SearchAuthSettingsResponse } from '../models/SearchAuthSettingsResponse'; +import { SearchCalendarsRequest } from '../models/SearchCalendarsRequest'; +import { SearchChannelHistoryRequest } from '../models/SearchChannelHistoryRequest'; +import { SearchChannelHistoryResponse } from '../models/SearchChannelHistoryResponse'; +import { SearchCollectionsRequest } from '../models/SearchCollectionsRequest'; +import { SearchCommitsRequest } from '../models/SearchCommitsRequest'; +import { SearchCommunicationChannelPreferencesRequest } from '../models/SearchCommunicationChannelPreferencesRequest'; +import { SearchConfigRequest } from '../models/SearchConfigRequest'; +import { SearchConnectionRequest } from '../models/SearchConnectionRequest'; +import { SearchConnectionResponse } from '../models/SearchConnectionResponse'; +import { SearchCustomActionsRequest } from '../models/SearchCustomActionsRequest'; +import { SearchDataRequest } from '../models/SearchDataRequest'; +import { SearchDataResponse } from '../models/SearchDataResponse'; +import { SearchEmailCustomizationRequest } from '../models/SearchEmailCustomizationRequest'; +import { SearchMetadataRequest } from '../models/SearchMetadataRequest'; +import { SearchOrgsRequest } from '../models/SearchOrgsRequest'; +import { SearchRoleResponse } from '../models/SearchRoleResponse'; +import { SearchRolesRequest } from '../models/SearchRolesRequest'; +import { SearchSchedulesRequest } from '../models/SearchSchedulesRequest'; +import { SearchSecuritySettingsRequest } from '../models/SearchSecuritySettingsRequest'; +import { SearchTagsRequest } from '../models/SearchTagsRequest'; +import { SearchUserGroupsRequest } from '../models/SearchUserGroupsRequest'; +import { SearchUsersRequest } from '../models/SearchUsersRequest'; +import { SearchVariablesRequest } from '../models/SearchVariablesRequest'; +import { SearchWebhookConfigurationsRequest } from '../models/SearchWebhookConfigurationsRequest'; +import { SecuritySettingsResponse } from '../models/SecuritySettingsResponse'; +import { SendAgentConversationMessageRequest } from '../models/SendAgentConversationMessageRequest'; +import { SendAgentConversationMessageStreamingRequest } from '../models/SendAgentConversationMessageStreamingRequest'; +import { SendAgentMessageRequest } from '../models/SendAgentMessageRequest'; +import { SendAgentMessageResponse } from '../models/SendAgentMessageResponse'; +import { SendAgentMessageStreamingRequest } from '../models/SendAgentMessageStreamingRequest'; +import { SendMessageRequest } from '../models/SendMessageRequest'; +import { SetNLInstructionsRequest } from '../models/SetNLInstructionsRequest'; +import { ShareMetadataRequest } from '../models/ShareMetadataRequest'; +import { SingleAnswerRequest } from '../models/SingleAnswerRequest'; +import { SqlQueryResponse } from '../models/SqlQueryResponse'; +import { SyncMetadataRequest } from '../models/SyncMetadataRequest'; +import { SyncMetadataResponse } from '../models/SyncMetadataResponse'; +import { SystemConfig } from '../models/SystemConfig'; +import { SystemInfo } from '../models/SystemInfo'; +import { SystemOverrideInfo } from '../models/SystemOverrideInfo'; +import { Tag } from '../models/Tag'; +import { Token } from '../models/Token'; +import { TokenValidationResponse } from '../models/TokenValidationResponse'; +import { UnassignTagRequest } from '../models/UnassignTagRequest'; +import { UnparameterizeMetadataRequest } from '../models/UnparameterizeMetadataRequest'; +import { UnpublishMetadataRequest } from '../models/UnpublishMetadataRequest'; +import { UpdateCalendarRequest } from '../models/UpdateCalendarRequest'; +import { UpdateCollectionRequest } from '../models/UpdateCollectionRequest'; +import { UpdateColumnSecurityRulesRequest } from '../models/UpdateColumnSecurityRulesRequest'; +import { UpdateConfigRequest } from '../models/UpdateConfigRequest'; +import { UpdateConnectionConfigurationRequest } from '../models/UpdateConnectionConfigurationRequest'; +import { UpdateConnectionRequest } from '../models/UpdateConnectionRequest'; +import { UpdateConnectionStatusRequest } from '../models/UpdateConnectionStatusRequest'; +import { UpdateConnectionV2Request } from '../models/UpdateConnectionV2Request'; +import { UpdateCustomActionRequest } from '../models/UpdateCustomActionRequest'; +import { UpdateEmailCustomizationRequest } from '../models/UpdateEmailCustomizationRequest'; +import { UpdateMetadataHeaderRequest } from '../models/UpdateMetadataHeaderRequest'; +import { UpdateMetadataObjIdRequest } from '../models/UpdateMetadataObjIdRequest'; +import { UpdateOrgRequest } from '../models/UpdateOrgRequest'; +import { UpdateRoleRequest } from '../models/UpdateRoleRequest'; +import { UpdateScheduleRequest } from '../models/UpdateScheduleRequest'; +import { UpdateSystemConfigRequest } from '../models/UpdateSystemConfigRequest'; +import { UpdateTagRequest } from '../models/UpdateTagRequest'; +import { UpdateUserGroupRequest } from '../models/UpdateUserGroupRequest'; +import { UpdateUserRequest } from '../models/UpdateUserRequest'; +import { UpdateVariableRequest } from '../models/UpdateVariableRequest'; +import { UpdateVariableValuesRequest } from '../models/UpdateVariableValuesRequest'; +import { UpdateWebhookConfigurationRequest } from '../models/UpdateWebhookConfigurationRequest'; +import { User } from '../models/User'; +import { UserGroupResponse } from '../models/UserGroupResponse'; +import { ValidateCommunicationChannelRequest } from '../models/ValidateCommunicationChannelRequest'; +import { ValidateMergeRequest } from '../models/ValidateMergeRequest'; +import { ValidateTokenRequest } from '../models/ValidateTokenRequest'; +import { Variable } from '../models/Variable'; +import { WebhookDeleteResponse } from '../models/WebhookDeleteResponse'; +import { WebhookResponse } from '../models/WebhookResponse'; +import { WebhookSearchResponse } from '../models/WebhookSearchResponse'; + +/** + * no description + */ +export class ThoughtSpotRestApiRequestFactory extends BaseAPIRequestFactory { + + /** + * Version: 9.7.0.cl or later Activates a deactivated user account. Requires `ADMINISTRATION` (**Can administer Thoughtspot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `USER_ADMINISTRATION` (**Can manage users**) privilege is required. To activate an inactive user account, the API request body must include the following information: - Username or the GUID of the user account. - Auth token generated for the deactivated user. The auth token is sent in the API response when a user is deactivated. - Password for the user account. + * @param activateUserRequest + */ + public async activateUser(activateUserRequest: ActivateUserRequest, _options?: Configuration): Promise { + let _config = _options || this.configuration; + + // verify required parameter 'activateUserRequest' is not null or undefined + if (activateUserRequest === null || activateUserRequest === undefined) { + throw new RequiredError("ThoughtSpotRestApi", "activateUser", "activateUserRequest"); + } + + + // Path Params + const localVarPath = '/api/rest/2.0/users/activate'; + + // Make Request Context + const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.POST); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.25.0") + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.25.0") + + + + + // Body Params + const contentType = ObjectSerializer.getPreferredMediaType([ + "application/json" + ]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = ObjectSerializer.stringify( + ObjectSerializer.serialize(activateUserRequest, "ActivateUserRequest", ""), + contentType + ); + requestContext.setBody(serializedBody); + + let authMethod: SecurityAuthentication | undefined; + // Apply auth methods + authMethod = _config.authMethods["bearerAuth"] + if (authMethod?.applySecurityAuthentication) { + await authMethod?.applySecurityAuthentication(requestContext); + } + + const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default + if (defaultAuth?.applySecurityAuthentication) { + await defaultAuth?.applySecurityAuthentication(requestContext); + } + + return requestContext; + } + + /** + * Version: 9.0.0.cl or later Transfers the ownership of one or several objects from one user to another. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `USER_ADMINISTRATION` (**Can manage users**) privilege and edit access to the objects are required. + * @param assignChangeAuthorRequest + */ + public async assignChangeAuthor(assignChangeAuthorRequest: AssignChangeAuthorRequest, _options?: Configuration): Promise { + let _config = _options || this.configuration; + + // verify required parameter 'assignChangeAuthorRequest' is not null or undefined + if (assignChangeAuthorRequest === null || assignChangeAuthorRequest === undefined) { + throw new RequiredError("ThoughtSpotRestApi", "assignChangeAuthor", "assignChangeAuthorRequest"); + } + + + // Path Params + const localVarPath = '/api/rest/2.0/security/metadata/assign'; + + // Make Request Context + const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.POST); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.25.0") + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.25.0") + + + + + // Body Params + const contentType = ObjectSerializer.getPreferredMediaType([ + "application/json" + ]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = ObjectSerializer.stringify( + ObjectSerializer.serialize(assignChangeAuthorRequest, "AssignChangeAuthorRequest", ""), + contentType + ); + requestContext.setBody(serializedBody); + + let authMethod: SecurityAuthentication | undefined; + // Apply auth methods + authMethod = _config.authMethods["bearerAuth"] + if (authMethod?.applySecurityAuthentication) { + await authMethod?.applySecurityAuthentication(requestContext); + } + + const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default + if (defaultAuth?.applySecurityAuthentication) { + await defaultAuth?.applySecurityAuthentication(requestContext); + } + + return requestContext; + } + + /** + * Version: 9.0.0.cl or later Assigns tags to Liveboards, Answers, Tables, and Worksheets. Requires edit access to the metadata object. + * @param assignTagRequest + */ + public async assignTag(assignTagRequest: AssignTagRequest, _options?: Configuration): Promise { + let _config = _options || this.configuration; + + // verify required parameter 'assignTagRequest' is not null or undefined + if (assignTagRequest === null || assignTagRequest === undefined) { + throw new RequiredError("ThoughtSpotRestApi", "assignTag", "assignTagRequest"); + } + + + // Path Params + const localVarPath = '/api/rest/2.0/tags/assign'; + + // Make Request Context + const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.POST); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.25.0") + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.25.0") + + + + + // Body Params + const contentType = ObjectSerializer.getPreferredMediaType([ + "application/json" + ]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = ObjectSerializer.stringify( + ObjectSerializer.serialize(assignTagRequest, "AssignTagRequest", ""), + contentType + ); + requestContext.setBody(serializedBody); + + let authMethod: SecurityAuthentication | undefined; + // Apply auth methods + authMethod = _config.authMethods["bearerAuth"] + if (authMethod?.applySecurityAuthentication) { + await authMethod?.applySecurityAuthentication(requestContext); + } + + const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default + if (defaultAuth?.applySecurityAuthentication) { + await defaultAuth?.applySecurityAuthentication(requestContext); + } + + return requestContext; + } + + /** + * Version: 9.0.0.cl or later Updates the current password of the user. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `USER_ADMINISTRATION` (**Can manage users**) privilege is required. + * @param changeUserPasswordRequest + */ + public async changeUserPassword(changeUserPasswordRequest: ChangeUserPasswordRequest, _options?: Configuration): Promise { + let _config = _options || this.configuration; + + // verify required parameter 'changeUserPasswordRequest' is not null or undefined + if (changeUserPasswordRequest === null || changeUserPasswordRequest === undefined) { + throw new RequiredError("ThoughtSpotRestApi", "changeUserPassword", "changeUserPasswordRequest"); + } + + + // Path Params + const localVarPath = '/api/rest/2.0/users/change-password'; + + // Make Request Context + const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.POST); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.25.0") + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.25.0") + + + + + // Body Params + const contentType = ObjectSerializer.getPreferredMediaType([ + "application/json" + ]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = ObjectSerializer.stringify( + ObjectSerializer.serialize(changeUserPasswordRequest, "ChangeUserPasswordRequest", ""), + contentType + ); + requestContext.setBody(serializedBody); + + let authMethod: SecurityAuthentication | undefined; + // Apply auth methods + authMethod = _config.authMethods["bearerAuth"] + if (authMethod?.applySecurityAuthentication) { + await authMethod?.applySecurityAuthentication(requestContext); + } + + const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default + if (defaultAuth?.applySecurityAuthentication) { + await defaultAuth?.applySecurityAuthentication(requestContext); + } + + return requestContext; + } + + /** + * Version: 9.2.0.cl or later Commits TML files of metadata objects to the Git branch configured on your instance. Requires at least edit access to objects used in the commit operation. Before using this endpoint to push your commits: * Enable Git integration on your instance. * Make sure the Git repository and branch details are configured on your instance. For more information, see [Git integration documentation](https://developers.thoughtspot.com/docs/git-integration). + * @param commitBranchRequest + */ + public async commitBranch(commitBranchRequest: CommitBranchRequest, _options?: Configuration): Promise { + let _config = _options || this.configuration; + + // verify required parameter 'commitBranchRequest' is not null or undefined + if (commitBranchRequest === null || commitBranchRequest === undefined) { + throw new RequiredError("ThoughtSpotRestApi", "commitBranch", "commitBranchRequest"); + } + + + // Path Params + const localVarPath = '/api/rest/2.0/vcs/git/branches/commit'; + + // Make Request Context + const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.POST); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.25.0") + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.25.0") + + + + + // Body Params + const contentType = ObjectSerializer.getPreferredMediaType([ + "application/json" + ]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = ObjectSerializer.stringify( + ObjectSerializer.serialize(commitBranchRequest, "CommitBranchRequest", ""), + contentType + ); + requestContext.setBody(serializedBody); + + let authMethod: SecurityAuthentication | undefined; + // Apply auth methods + authMethod = _config.authMethods["bearerAuth"] + if (authMethod?.applySecurityAuthentication) { + await authMethod?.applySecurityAuthentication(requestContext); + } + + const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default + if (defaultAuth?.applySecurityAuthentication) { + await defaultAuth?.applySecurityAuthentication(requestContext); + } + + return requestContext; + } + + /** + * Version: 26.6.0.cl or later Enables or disables authentication at cluster or org level for the specified auth type. Currently supports `TRUSTED_AUTH`. #### Required privileges Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) or `CONTROL_TRUSTED_AUTH` (**Can Enable or Disable Trusted Authentication**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled, the `CONTROL_TRUSTED_AUTH` privilege is required. #### Usage guidelines Use `cluster_preferences` to enable or disable authentication at the cluster level. Cluster-level settings can only be configured from the Primary Org. - `ENABLED` — Generates a new access token if one does not exist. An existing token is preserved. - `DISABLED` — Revokes the existing cluster-level access token. Use `org_preferences` to enable or disable authentication for one or more Orgs. Each entry must include an `org_identifier` (unique ID or name) and an `auth_status`. Org-level configuration requires the per-Org authentication feature to be enabled on your instance. - `ENABLED` — Generates a new org-level access token if one does not exist. - `DISABLED` — Revokes the existing org-level access token for that Org. Both `cluster_preferences` and `org_preferences` are optional. Omitting a field leaves the corresponding settings unchanged. If both are omitted, the API returns `204 No Content` without making any changes. **Note**: Cluster-level and org-level settings are independent of each other. Enabling or disabling one does not affect the other. + * @param configureAuthSettingsRequest + */ + public async configureAuthSettings(configureAuthSettingsRequest: ConfigureAuthSettingsRequest, _options?: Configuration): Promise { + let _config = _options || this.configuration; + + // verify required parameter 'configureAuthSettingsRequest' is not null or undefined + if (configureAuthSettingsRequest === null || configureAuthSettingsRequest === undefined) { + throw new RequiredError("ThoughtSpotRestApi", "configureAuthSettings", "configureAuthSettingsRequest"); + } + + + // Path Params + const localVarPath = '/api/rest/2.0/auth/configure'; + + // Make Request Context + const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.POST); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.25.0") + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.25.0") + + + + + // Body Params + const contentType = ObjectSerializer.getPreferredMediaType([ + "application/json" + ]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = ObjectSerializer.stringify( + ObjectSerializer.serialize(configureAuthSettingsRequest, "ConfigureAuthSettingsRequest", ""), + contentType + ); + requestContext.setBody(serializedBody); + + let authMethod: SecurityAuthentication | undefined; + // Apply auth methods + authMethod = _config.authMethods["bearerAuth"] + if (authMethod?.applySecurityAuthentication) { + await authMethod?.applySecurityAuthentication(requestContext); + } + + const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default + if (defaultAuth?.applySecurityAuthentication) { + await defaultAuth?.applySecurityAuthentication(requestContext); + } + + return requestContext; + } + + /** + * Version: 10.14.0.cl or later Configure communication channel preferences. - Use `cluster_preferences` to update the default preferences for your ThoughtSpot application instance. - If your instance has [Orgs](https://docs.thoughtspot.com/cloud/latest/orgs-overview), use `org_preferences` to specify Org-specific preferences that override the defaults. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) or `DEVELOPER` (**Has developer privilege**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, users with `APPLICATION_ADMINISTRATION` (**Can manage application settings**) privilege are also authorized to perform this action. + * @param configureCommunicationChannelPreferencesRequest + */ + public async configureCommunicationChannelPreferences(configureCommunicationChannelPreferencesRequest: ConfigureCommunicationChannelPreferencesRequest, _options?: Configuration): Promise { + let _config = _options || this.configuration; + + // verify required parameter 'configureCommunicationChannelPreferencesRequest' is not null or undefined + if (configureCommunicationChannelPreferencesRequest === null || configureCommunicationChannelPreferencesRequest === undefined) { + throw new RequiredError("ThoughtSpotRestApi", "configureCommunicationChannelPreferences", "configureCommunicationChannelPreferencesRequest"); + } + + + // Path Params + const localVarPath = '/api/rest/2.0/system/preferences/communication-channels/configure'; + + // Make Request Context + const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.POST); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.25.0") + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.25.0") + + + + + // Body Params + const contentType = ObjectSerializer.getPreferredMediaType([ + "application/json" + ]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = ObjectSerializer.stringify( + ObjectSerializer.serialize(configureCommunicationChannelPreferencesRequest, "ConfigureCommunicationChannelPreferencesRequest", ""), + contentType + ); + requestContext.setBody(serializedBody); + + let authMethod: SecurityAuthentication | undefined; + // Apply auth methods + authMethod = _config.authMethods["bearerAuth"] + if (authMethod?.applySecurityAuthentication) { + await authMethod?.applySecurityAuthentication(requestContext); + } + + const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default + if (defaultAuth?.applySecurityAuthentication) { + await defaultAuth?.applySecurityAuthentication(requestContext); + } + + return requestContext; + } + + /** + * Version: 26.2.0.cl or later Configure security settings for your ThoughtSpot application instance. - Use `cluster_preferences` to update cluster-level security settings including CORS whitelisted URLs, CSP settings, SAML redirect URLs, partitioned cookies, and non-embed access configuration. - Use `org_preferences` to configure Org-specific security settings. If your instance has [Orgs](https://docs.thoughtspot.com/cloud/latest/orgs-overview), this allows configuring CORS and non-embed access settings specific to the Org. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) or `DEVELOPER` (**Has developer privilege**) privilege. Cluster-level SAML and script-src settings require `ADMINISTRATION` privilege. See [Security Settings](https://developers.thoughtspot.com/docs/security-settings) for more details. + * @param configureSecuritySettingsRequest + */ + public async configureSecuritySettings(configureSecuritySettingsRequest: ConfigureSecuritySettingsRequest, _options?: Configuration): Promise { + let _config = _options || this.configuration; + + // verify required parameter 'configureSecuritySettingsRequest' is not null or undefined + if (configureSecuritySettingsRequest === null || configureSecuritySettingsRequest === undefined) { + throw new RequiredError("ThoughtSpotRestApi", "configureSecuritySettings", "configureSecuritySettingsRequest"); + } + + + // Path Params + const localVarPath = '/api/rest/2.0/system/security-settings/configure'; + + // Make Request Context + const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.POST); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.25.0") + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.25.0") + + + + + // Body Params + const contentType = ObjectSerializer.getPreferredMediaType([ + "application/json" + ]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = ObjectSerializer.stringify( + ObjectSerializer.serialize(configureSecuritySettingsRequest, "ConfigureSecuritySettingsRequest", ""), + contentType + ); + requestContext.setBody(serializedBody); + + let authMethod: SecurityAuthentication | undefined; + // Apply auth methods + authMethod = _config.authMethods["bearerAuth"] + if (authMethod?.applySecurityAuthentication) { + await authMethod?.applySecurityAuthentication(requestContext); + } + + const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default + if (defaultAuth?.applySecurityAuthentication) { + await defaultAuth?.applySecurityAuthentication(requestContext); + } + + return requestContext; + } + + /** + * Version: 10.12.0.cl or later Gets connection configuration objects. Requires `DATAMANAGEMENT` (**Can manage data**) and edit permissions to the connection object, or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) privilege is required. #### Usage guidelines * To get a list of all configurations available in the ThoughtSpot system, send the API request with only the connection name or GUID in the request body. * To fetch details of a configuration object, specify the configuration object name or GUID. + * @param connectionConfigurationSearchRequest + */ + public async connectionConfigurationSearch(connectionConfigurationSearchRequest: ConnectionConfigurationSearchRequest, _options?: Configuration): Promise { + let _config = _options || this.configuration; + + // verify required parameter 'connectionConfigurationSearchRequest' is not null or undefined + if (connectionConfigurationSearchRequest === null || connectionConfigurationSearchRequest === undefined) { + throw new RequiredError("ThoughtSpotRestApi", "connectionConfigurationSearch", "connectionConfigurationSearchRequest"); + } + + + // Path Params + const localVarPath = '/api/rest/2.0/connection-configurations/search'; + + // Make Request Context + const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.POST); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.25.0") + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.25.0") + + + + + // Body Params + const contentType = ObjectSerializer.getPreferredMediaType([ + "application/json" + ]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = ObjectSerializer.stringify( + ObjectSerializer.serialize(connectionConfigurationSearchRequest, "ConnectionConfigurationSearchRequest", ""), + contentType + ); + requestContext.setBody(serializedBody); + + let authMethod: SecurityAuthentication | undefined; + // Apply auth methods + authMethod = _config.authMethods["bearerAuth"] + if (authMethod?.applySecurityAuthentication) { + await authMethod?.applySecurityAuthentication(requestContext); + } + + const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default + if (defaultAuth?.applySecurityAuthentication) { + await defaultAuth?.applySecurityAuthentication(requestContext); + } + + return requestContext; + } + + /** + * Convert worksheets to models Version: 10.6.0.cl or later ## Prerequisites - **Privileges Required:** - `DATAMANAGEMENT` (Can manage data) or `ADMINISTRATION` (Can administer ThoughtSpot). - **Additional Privileges (if RBAC is enabled):** - `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` (Can manage data models). --- ## Usage Guidelines ### Parameters 1. **worksheet_ids** - **Description:** A comma-separated list of GUIDs (Globally Unique Identifiers) specifying the Worksheets to be converted. - **Usage:** - Used only when `convert_all` is set to `false`. - Leave empty or omit when `convert_all` is set to `true`. 2. **exclude_worksheet_ids** - **Description:** A comma-separated list of GUIDs specifying Worksheets to be excluded from conversion. - **Usage:** - Useful when `convert_all` is set to `true` and specific Worksheets should not be converted. 3. **convert_all** - **Description:** Sets the scope of conversion. - **Options:** - `true`: Converts all Worksheets in the system, except those specified in `exclude_worksheet_ids`. - `false`: Converts only the Worksheets listed in `worksheet_ids`. 4. **apply_changes** - **Description:** Specifies whether to apply changes directly to ThoughtSpot or to generate a preview before applying any changes.Used for validation of conversion. - **Options:** - `true`: Applies conversion changes directly to ThoughtSpot. - `false`: Generates only a preview of the changes and does not apply any changes to ThoughtSpot --- ## Best Practices 1. **Backup Before Conversion:** Always export metadata as a backup before initiating the conversion process 2. **Partial Conversion for Testing:** Test the conversion process by setting `convert_all` to `false` and specifying a small number of `worksheet_ids`. 3. **Verify Dependencies:** Check for dependent objects, such as Tables and Connections, to avoid invalid references. 4. **Review Changes:** Use `apply_changes: false` to preview the impact of the conversion before applying changes. --- ## Examples ### Convert Specific Worksheets ```json { \"worksheet_ids\": [\"guid1\", \"guid2\", \"guid3\"], \"exclude_worksheet_ids\": [], \"convert_all\": false, \"apply_changes\": true } ``` ### Convert All Accessible Worksheets ```json { \"worksheet_ids\": [], \"exclude_worksheet_ids\": [], \"convert_all\": true, \"apply_changes\": true } ``` ### Exclude Specific Worksheets While Converting All Accessible Worksheets ```json { \"worksheet_ids\": [], \"exclude_worksheet_ids\": [\"abc\"], \"convert_all\": true, \"apply_changes\": true } ``` + * @param convertWorksheetToModelRequest + */ + public async convertWorksheetToModel(convertWorksheetToModelRequest: ConvertWorksheetToModelRequest, _options?: Configuration): Promise { + let _config = _options || this.configuration; + + // verify required parameter 'convertWorksheetToModelRequest' is not null or undefined + if (convertWorksheetToModelRequest === null || convertWorksheetToModelRequest === undefined) { + throw new RequiredError("ThoughtSpotRestApi", "convertWorksheetToModel", "convertWorksheetToModelRequest"); + } + + + // Path Params + const localVarPath = '/api/rest/2.0/metadata/worksheets/convert'; + + // Make Request Context + const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.POST); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.25.0") + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.25.0") + + + + + // Body Params + const contentType = ObjectSerializer.getPreferredMediaType([ + "application/json" + ]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = ObjectSerializer.stringify( + ObjectSerializer.serialize(convertWorksheetToModelRequest, "ConvertWorksheetToModelRequest", ""), + contentType + ); + requestContext.setBody(serializedBody); + + let authMethod: SecurityAuthentication | undefined; + // Apply auth methods + authMethod = _config.authMethods["bearerAuth"] + if (authMethod?.applySecurityAuthentication) { + await authMethod?.applySecurityAuthentication(requestContext); + } + + const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default + if (defaultAuth?.applySecurityAuthentication) { + await defaultAuth?.applySecurityAuthentication(requestContext); + } + + return requestContext; + } + + /** + * Makes a copy of an Answer or Liveboard Version: 10.3.0.cl or later Creates a copy of a metadata object. Requires at least view access to the metadata object being copied. Upon successful execution, the API creates a copy of the metadata object specified in the API request and returns the ID of the new object. + * @param copyObjectRequest + */ + public async copyObject(copyObjectRequest: CopyObjectRequest, _options?: Configuration): Promise { + let _config = _options || this.configuration; + + // verify required parameter 'copyObjectRequest' is not null or undefined + if (copyObjectRequest === null || copyObjectRequest === undefined) { + throw new RequiredError("ThoughtSpotRestApi", "copyObject", "copyObjectRequest"); + } + + + // Path Params + const localVarPath = '/api/rest/2.0/metadata/copyobject'; + + // Make Request Context + const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.POST); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.25.0") + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.25.0") + + + + + // Body Params + const contentType = ObjectSerializer.getPreferredMediaType([ + "application/json" + ]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = ObjectSerializer.stringify( + ObjectSerializer.serialize(copyObjectRequest, "CopyObjectRequest", ""), + contentType + ); + requestContext.setBody(serializedBody); + + let authMethod: SecurityAuthentication | undefined; + // Apply auth methods + authMethod = _config.authMethods["bearerAuth"] + if (authMethod?.applySecurityAuthentication) { + await authMethod?.applySecurityAuthentication(requestContext); + } + + const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default + if (defaultAuth?.applySecurityAuthentication) { + await defaultAuth?.applySecurityAuthentication(requestContext); + } + + return requestContext; + } + + /** + * Version: 26.2.0.cl or later Creates a new Spotter agent conversation based on the provided context and settings. The endpoint was in Beta from 26.2.0.cl through 26.4.0.cl. Requires `CAN_USE_SPOTTER` privilege and at least view access to the metadata object specified in the request. #### Usage guidelines The request must include the `metadata_context` parameter to define the conversation context. The context type can be one of: - `DATA_SOURCE` *(available from 26.5.0.cl)*: targets a specific data source. Provide `data_source_identifier` in `data_source_context` for a single data source, or `data_source_identifiers` for multi-data-source context. The deprecated `guid` field is accepted for backwards compatibility. - `AUTO_MODE` *(available from 26.5.0.cl)*: automatically discovers and selects the most relevant datasets for the user\'s queries. > **Note for callers on versions 26.2.0.cl – 26.4.0.cl (Beta):** use the lowercase `data_source` enum value with the `guid` field instead of the above. Example: `{ \"type\": \"data_source\", \"data_source_context\": { \"guid\": \"\" } }`. The `conversation_settings` parameter controls which Spotter capabilities are enabled for the conversation: - `enable_contextual_change_analysis` (default: `true`, **deprecated from 26.2.0.cl**) — always enabled in Spotter 3; setting this to `false` has no effect on versions >= 26.2.0.cl - `enable_natural_language_answer_generation` (default: `true`, **deprecated from 26.2.0.cl**) — always enabled in Spotter 3; setting this to `false` has no effect on versions >= 26.2.0.cl - `enable_reasoning` (default: `true`, **deprecated from 26.2.0.cl**) — always enabled in Spotter 3; setting this to `false` has no effect on versions >= 26.2.0.cl - `enable_save_chat` (default: `false`, *available from 26.5.0.cl*) — enables saving the conversation for later retrieval via conversation history If the request is successful, the response includes a unique `conversation_identifier` that must be passed to `sendAgentConversationMessage` or `sendAgentConversationMessageStreaming` to send messages within this conversation. The response also includes `conversation_id` with the same value for backwards compatibility; use `conversation_identifier` for new integrations. #### Example request ```json { \"metadata_context\": { \"type\": \"DATA_SOURCE\", \"data_source_context\": { \"data_source_identifier\": \"a1b2c3d4-e5f6-7890-abcd-ef1234567890\" } }, \"conversation_settings\": {} } ``` #### Error responses | Code | Description | | ---- | --------------------------------------------------------------------------------------------------------------------------------------- | | 401 | Unauthorized — authentication token is missing, expired, or invalid. | | 403 | Forbidden — the authenticated user does not have `CAN_USE_SPOTTER` privilege or lacks view permission on the specified metadata object. | > ###### Note: > > - This endpoint was in Beta from 26.2.0.cl through 26.4.0.cl and is Generally Available from version 26.5.0.cl. > - This endpoint requires Spotter - please contact ThoughtSpot support to enable Spotter on your cluster. + * @param createAgentConversationRequest + */ + public async createAgentConversation(createAgentConversationRequest: CreateAgentConversationRequest, _options?: Configuration): Promise { + let _config = _options || this.configuration; + + // verify required parameter 'createAgentConversationRequest' is not null or undefined + if (createAgentConversationRequest === null || createAgentConversationRequest === undefined) { + throw new RequiredError("ThoughtSpotRestApi", "createAgentConversation", "createAgentConversationRequest"); + } + + + // Path Params + const localVarPath = '/api/rest/2.0/ai/agent/conversation/create'; + + // Make Request Context + const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.POST); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.25.0") + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.25.0") + + + + + // Body Params + const contentType = ObjectSerializer.getPreferredMediaType([ + "application/json" + ]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = ObjectSerializer.stringify( + ObjectSerializer.serialize(createAgentConversationRequest, "CreateAgentConversationRequest", ""), + contentType + ); + requestContext.setBody(serializedBody); + + let authMethod: SecurityAuthentication | undefined; + // Apply auth methods + authMethod = _config.authMethods["bearerAuth"] + if (authMethod?.applySecurityAuthentication) { + await authMethod?.applySecurityAuthentication(requestContext); + } + + const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default + if (defaultAuth?.applySecurityAuthentication) { + await defaultAuth?.applySecurityAuthentication(requestContext); + } + + return requestContext; + } + + /** + * Version: 10.12.0.cl or later Creates a new [custom calendar](https://docs.thoughtspot.com/cloud/latest/connections-cust-cal). Requires `DATAMANAGEMENT` (**Can manage data**) or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your ThoughtSpot instance, the `CAN_MANAGE_CUSTOM_CALENDAR` (**Can manage custom calendars**) privilege is required. #### Usage guidelines You can create a custom calendar from scratch or an existing Table in ThoughtSpot. For both methods of calendar creation, the following parameters are required: * Name of the custom calendar. * Calendar creation method. To create a calendar from an existing table, specify the method: - `FROM_EXISTING_TABLE` - Creates calendar from the table reference provided in the API request. - `FROM_INPUT_PARAMS` - Creates a calendar from the parameters defined in the API request. * Connection ID and Table name * Database and schema name attributes: For most Cloud Data Warehouse (CDW) connectors, both `database_name` and `schema_name` attributes are required. However, the attribute requirements are conditional and vary based on the connector type and its metadata structure. For example, for connectors such as Teradata, MySQL, SingleSore, Amazon Aurora MySQL, Amazon RDS MySQL, Oracle, and GCP_MYSQL, the `schema_name` is required, whereas the `database_name` attribute is not. Similarly, connectors such as ClickHouse require you to specify the `database_name` and the schema specification in such cases is optional. **NOTE**: If you are creating a calendar from an existing table, ensure that the referenced table matches the required DDL for custom calendars. If the schema does not match, the API returns an error. ##### Calendar type The API allows you to create the following types of calendars: * `MONTH_OFFSET`. The default calendar type. A `MONTH_OFFSET` calendar is offset by a few months from the standard calendar months (January to December) and the year begins with the month defined in the request. For example, if the `month_offset` value is set as `April`, the calendar year begins in April. * `4-4-5`. Each quarter in the calendar will include two 4-week months followed by one 5-week month. * `4-5-4`. Each quarter in the calendar will include two 4-week months with a 5-week month between. * `5-4-4`. Each quarter begins with a 5-week month, followed by two 4-week months. To start and end the calendar on a specific date, specify the dates in the `MM/DD/YYYY` format. For `MONTH_OFFSET` calendars, ensure that the `start_date` matches the month specified in the `month_offset` attribute. You can also set the starting day of the week and customize the prefixes for year and quarter labels. #### Examples To create a calendar from an existing table: ``` { \"name\": \"MyCustomCalendar1\", \"table_reference\": { \"connection_identifier\": \"4db8ea22-2ff4-4224-b05a-26674717e468\", \"table_name\": \"MyCalendarTable\", \"database_name\": \"RETAILAPPAREL\", \"schema_name\": \"PUBLIC\" }, \"creation_method\": \"FROM_EXISTING_TABLE\", } ``` To create a calendar from scratch: ``` { \"name\": \"MyCustomCalendar1\", \"table_reference\": { \"connection_identifier\": \"4db8ea22-2ff4-4224-b05a-26674717e468\", \"table_name\": \"MyCalendarTable\", \"database_name\": \"RETAILAPPAREL\", \"schema_name\": \"PUBLIC\" }, \"creation_method\": \"FROM_INPUT_PARAMS\", \"calendar_type\": \"MONTH_OFFSET\", \"month_offset\": \"April\", \"start_day_of_week\": \"Monday\", \"quarter_name_prefix\": \"Q\", \"year_name_prefix\": \"FY\", \"start_date\": \"04/01/2025\", \"end_date\": \"04/31/2025\" } ``` + * @param createCalendarRequest + */ + public async createCalendar(createCalendarRequest: CreateCalendarRequest, _options?: Configuration): Promise { + let _config = _options || this.configuration; + + // verify required parameter 'createCalendarRequest' is not null or undefined + if (createCalendarRequest === null || createCalendarRequest === undefined) { + throw new RequiredError("ThoughtSpotRestApi", "createCalendar", "createCalendarRequest"); + } + + + // Path Params + const localVarPath = '/api/rest/2.0/calendars/create'; + + // Make Request Context + const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.POST); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.25.0") + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.25.0") + + + + + // Body Params + const contentType = ObjectSerializer.getPreferredMediaType([ + "application/json" + ]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = ObjectSerializer.stringify( + ObjectSerializer.serialize(createCalendarRequest, "CreateCalendarRequest", ""), + contentType + ); + requestContext.setBody(serializedBody); + + let authMethod: SecurityAuthentication | undefined; + // Apply auth methods + authMethod = _config.authMethods["bearerAuth"] + if (authMethod?.applySecurityAuthentication) { + await authMethod?.applySecurityAuthentication(requestContext); + } + + const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default + if (defaultAuth?.applySecurityAuthentication) { + await defaultAuth?.applySecurityAuthentication(requestContext); + } + + return requestContext; + } + + /** + * Version: 26.4.0.cl or later Creates a new collection in ThoughtSpot. Collections allow you to organize and group related metadata objects such as Liveboards, Answers, worksheets, and other data objects. You can also create nested collections (sub-collections) to build a hierarchical structure. #### Supported operations The API endpoint lets you perform the following operations: * Create a new collection * Add metadata objects (Liveboards, Answers, Logical Tables) to the collection * Create nested collections by adding sub-collections + * @param createCollectionRequest + */ + public async createCollection(createCollectionRequest: CreateCollectionRequest, _options?: Configuration): Promise { + let _config = _options || this.configuration; + + // verify required parameter 'createCollectionRequest' is not null or undefined + if (createCollectionRequest === null || createCollectionRequest === undefined) { + throw new RequiredError("ThoughtSpotRestApi", "createCollection", "createCollectionRequest"); + } + + + // Path Params + const localVarPath = '/api/rest/2.0/collections/create'; + + // Make Request Context + const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.POST); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.25.0") + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.25.0") + + + + + // Body Params + const contentType = ObjectSerializer.getPreferredMediaType([ + "application/json" + ]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = ObjectSerializer.stringify( + ObjectSerializer.serialize(createCollectionRequest, "CreateCollectionRequest", ""), + contentType + ); + requestContext.setBody(serializedBody); + + let authMethod: SecurityAuthentication | undefined; + // Apply auth methods + authMethod = _config.authMethods["bearerAuth"] + if (authMethod?.applySecurityAuthentication) { + await authMethod?.applySecurityAuthentication(requestContext); + } + + const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default + if (defaultAuth?.applySecurityAuthentication) { + await defaultAuth?.applySecurityAuthentication(requestContext); + } + + return requestContext; + } + + /** + * Version: 9.2.0.cl or later Allows you to connect a ThoughtSpot instance to a Git repository. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance on your instance, the `CAN_SETUP_VERSION_CONTROL` (**Can set up version control**) privilege. You can use this API endpoint to connect your ThoughtSpot development and production environments to the development and production branches of a Git repository. Before using this endpoint to connect your ThoughtSpot instance to a Git repository, check the following prerequisites: * You have a Git repository. If you are using GitHub, make sure you have a valid account and an access token to connect ThoughtSpot to GitHub. For information about generating a token, see [GitHub Documentation](https://docs.github.com/en/authentication/keeping-your-account-and-data-secure/managing-your-personal-access-tokens). * Your access token has `repo` scope that grants full access to public and private repositories. * Your Git repository has a branch that can be configured as a default branch in ThoughtSpot. For more information, see [Git integration documentation](https://developers.thoughtspot.com/docs/?pageid=git-integration). **Note**: ThoughtSpot supports only GitHub / itHub Enterprise for CI/CD. + * @param createConfigRequest + */ + public async createConfig(createConfigRequest: CreateConfigRequest, _options?: Configuration): Promise { + let _config = _options || this.configuration; + + // verify required parameter 'createConfigRequest' is not null or undefined + if (createConfigRequest === null || createConfigRequest === undefined) { + throw new RequiredError("ThoughtSpotRestApi", "createConfig", "createConfigRequest"); + } + + + // Path Params + const localVarPath = '/api/rest/2.0/vcs/git/config/create'; + + // Make Request Context + const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.POST); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.25.0") + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.25.0") + + + + + // Body Params + const contentType = ObjectSerializer.getPreferredMediaType([ + "application/json" + ]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = ObjectSerializer.stringify( + ObjectSerializer.serialize(createConfigRequest, "CreateConfigRequest", ""), + contentType + ); + requestContext.setBody(serializedBody); + + let authMethod: SecurityAuthentication | undefined; + // Apply auth methods + authMethod = _config.authMethods["bearerAuth"] + if (authMethod?.applySecurityAuthentication) { + await authMethod?.applySecurityAuthentication(requestContext); + } + + const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default + if (defaultAuth?.applySecurityAuthentication) { + await defaultAuth?.applySecurityAuthentication(requestContext); + } + + return requestContext; + } + + /** + * Version: 9.2.0.cl or later Creates a connection to a data warehouse for live query services. Requires `DATAMANAGEMENT` (**Can manage data**) or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) privilege is required. #### Create a connection without tables To create a connection without tables: 1. Pass these parameters in your API request. * Name of the connection. * Type of the data warehouse to connect to. * A JSON map of configuration attributes in `data_warehouse_config`. The following example shows the configuration attributes for a SnowFlake connection: ``` { \"configuration\":{ \"accountName\":\"thoughtspot_partner\", \"user\":\"tsadmin\", \"password\":\"TestConn123\", \"role\":\"sysadmin\", \"warehouse\":\"MEDIUM_WH\" }, \"authenticationType\": \"SERVICE_ACCOUNT\", \"externalDatabases\":[ ] } ``` 2. Set `validate` to `false`. **NOTE:** If the `authentication_type` is anything other than SERVICE_ACCOUNT, you must explicitly provide the authenticationType property in the payload. If you do not specify authenticationType, the API will default to SERVICE_ACCOUNT as the authentication type. #### Create a connection with tables If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) and `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` (**Can manage data models**) privilege is required. To create a connection with tables: 1. Pass these parameters in your API request. * Name of the connection. * Type of the data warehouse to connect to. * A JSON map of configuration attributes, database details, and table properties in `data_warehouse_config` as shown in the following example: ``` { \"configuration\":{ \"accountName\":\"thoughtspot_partner\", \"user\":\"tsadmin\", \"password\":\"TestConn123\", \"role\":\"sysadmin\", \"warehouse\":\"MEDIUM_WH\" }, \"authenticationType\": \"SERVICE_ACCOUNT\", \"externalDatabases\":[ { \"name\":\"AllDatatypes\", \"isAutoCreated\":false, \"schemas\":[ { \"name\":\"alldatatypes\", \"tables\":[ { \"name\":\"allDatatypes\", \"type\":\"TABLE\", \"description\":\"\", \"selected\":true, \"linked\":true, \"columns\":[ { \"name\":\"CNUMBER\", \"type\":\"INT64\", \"canImport\":true, \"selected\":true, \"isLinkedActive\":true, \"isImported\":false, \"tableName\":\"allDatatypes\", \"schemaName\":\"alldatatypes\", \"dbName\":\"AllDatatypes\" }, { \"name\":\"CDECIMAL\", \"type\":\"INT64\", \"canImport\":true, \"selected\":true, \"isLinkedActive\":true, \"isImported\":false, \"tableName\":\"allDatatypes\", \"schemaName\":\"alldatatypes\", \"dbName\":\"AllDatatypes\" } ] } ] } ] } ] } ``` 2. Set `validate` to `true`. **NOTE:** If the `authentication_type` is anything other than SERVICE_ACCOUNT, you must explicitly provide the authenticationType property in the payload. If you do not specify authenticationType, the API will default to SERVICE_ACCOUNT as the authentication type. + * @param createConnectionRequest + */ + public async createConnection(createConnectionRequest: CreateConnectionRequest, _options?: Configuration): Promise { + let _config = _options || this.configuration; + + // verify required parameter 'createConnectionRequest' is not null or undefined + if (createConnectionRequest === null || createConnectionRequest === undefined) { + throw new RequiredError("ThoughtSpotRestApi", "createConnection", "createConnectionRequest"); + } + + + // Path Params + const localVarPath = '/api/rest/2.0/connection/create'; + + // Make Request Context + const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.POST); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.25.0") + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.25.0") + + + + + // Body Params + const contentType = ObjectSerializer.getPreferredMediaType([ + "application/json" + ]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = ObjectSerializer.stringify( + ObjectSerializer.serialize(createConnectionRequest, "CreateConnectionRequest", ""), + contentType + ); + requestContext.setBody(serializedBody); + + let authMethod: SecurityAuthentication | undefined; + // Apply auth methods + authMethod = _config.authMethods["bearerAuth"] + if (authMethod?.applySecurityAuthentication) { + await authMethod?.applySecurityAuthentication(requestContext); + } + + const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default + if (defaultAuth?.applySecurityAuthentication) { + await defaultAuth?.applySecurityAuthentication(requestContext); + } + + return requestContext; + } + + /** + * Version: 10.12.0.cl or later Creates an additional configuration to an existing connection to a data warehouse. Requires `DATAMANAGEMENT` (**Can manage data**) or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) privilege is required. #### Usage guidelines * A JSON map of configuration attributes in `configuration`. The following example shows the configuration attributes: ``` { \"user\":\"DEV_USER\", \"password\":\"TestConn123\", \"role\":\"DEV\", \"warehouse\":\"DEV_WH\" } ``` * If the `policy_type` is `PRINCIPALS`, then `policy_principals` is a required field. * If the `policy_type` is `PROCESSES`, then `policy_processes` is a required field. * If the `policy_type` is `NO_POLICY`, then `policy_principals` and `policy_processes` are not required fields. #### Parameterized Connection Support For parameterized connections that use OAuth authentication, only the same_as_parent and policy_process_options attributes are allowed in the API request. These attributes are not applicable to connections that are not parameterized. + * @param createConnectionConfigurationRequest + */ + public async createConnectionConfiguration(createConnectionConfigurationRequest: CreateConnectionConfigurationRequest, _options?: Configuration): Promise { + let _config = _options || this.configuration; + + // verify required parameter 'createConnectionConfigurationRequest' is not null or undefined + if (createConnectionConfigurationRequest === null || createConnectionConfigurationRequest === undefined) { + throw new RequiredError("ThoughtSpotRestApi", "createConnectionConfiguration", "createConnectionConfigurationRequest"); + } + + + // Path Params + const localVarPath = '/api/rest/2.0/connection-configurations/create'; + + // Make Request Context + const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.POST); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.25.0") + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.25.0") + + + + + // Body Params + const contentType = ObjectSerializer.getPreferredMediaType([ + "application/json" + ]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = ObjectSerializer.stringify( + ObjectSerializer.serialize(createConnectionConfigurationRequest, "CreateConnectionConfigurationRequest", ""), + contentType + ); + requestContext.setBody(serializedBody); + + let authMethod: SecurityAuthentication | undefined; + // Apply auth methods + authMethod = _config.authMethods["bearerAuth"] + if (authMethod?.applySecurityAuthentication) { + await authMethod?.applySecurityAuthentication(requestContext); + } + + const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default + if (defaultAuth?.applySecurityAuthentication) { + await defaultAuth?.applySecurityAuthentication(requestContext); + } + + return requestContext; + } + + /** + * Version: 10.4.0.cl or later Creates a new conversation session tied to a specific data model for AI-driven natural language querying. Requires `CAN_USE_SPOTTER` privilege and at least view access to the metadata object specified in the request. #### Usage guidelines The request must include: - `metadata_identifier`: the unique ID of the data source that provides context for the conversation Optionally, you can provide: - `tokens`: a token string to set initial context for the conversation (e.g., `\"[sales],[item type],[state]\"`) If the request is successful, ThoughtSpot returns a unique `conversation_identifier` that must be passed to `sendMessage` to continue the conversation. #### Error responses | Code | Description | |------|-------------| | 401 | Unauthorized — authentication token is missing, expired, or invalid. | | 403 | Forbidden — the authenticated user does not have `CAN_USE_SPOTTER` privilege or lacks view permission on the specified metadata object. | > ###### Note: > * This endpoint is currently in Beta. Breaking changes may be introduced before the endpoint is made Generally Available. > * This endpoint requires Spotter - please contact ThoughtSpot support to enable Spotter on your cluster. + * @param createConversationRequest + */ + public async createConversation(createConversationRequest: CreateConversationRequest, _options?: Configuration): Promise { + let _config = _options || this.configuration; + + // verify required parameter 'createConversationRequest' is not null or undefined + if (createConversationRequest === null || createConversationRequest === undefined) { + throw new RequiredError("ThoughtSpotRestApi", "createConversation", "createConversationRequest"); + } + + + // Path Params + const localVarPath = '/api/rest/2.0/ai/conversation/create'; + + // Make Request Context + const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.POST); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.25.0") + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.25.0") + + + + + // Body Params + const contentType = ObjectSerializer.getPreferredMediaType([ + "application/json" + ]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = ObjectSerializer.stringify( + ObjectSerializer.serialize(createConversationRequest, "CreateConversationRequest", ""), + contentType + ); + requestContext.setBody(serializedBody); + + let authMethod: SecurityAuthentication | undefined; + // Apply auth methods + authMethod = _config.authMethods["bearerAuth"] + if (authMethod?.applySecurityAuthentication) { + await authMethod?.applySecurityAuthentication(requestContext); + } + + const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default + if (defaultAuth?.applySecurityAuthentication) { + await defaultAuth?.applySecurityAuthentication(requestContext); + } + + return requestContext; + } + + /** + * Version: 9.6.0.cl or later Creates a custom action that appears as a menu action on a saved Answer or Liveboard visualization. Requires `DEVELOPER` (**Has Developer privilege**) or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `DEVELOPER` (**Has developer privilege**) privilege is required. #### Usage Guidelines The API lets you create the following types of custom actions: * URL-based action Allows pushing data to an external URL. * Callback action Triggers a callback to the host application and initiates a response payload on an embedded ThoughtSpot instance. By default, custom actions are visible to only administrator or developer users. To make a custom action available to other users, and specify the groups in `group_identifiers`. By default, the custom action is set as a _global_ action on all visualizations and saved Answers. To assign a custom action to specific Liveboard visualization, saved Answer, or Worksheet, set `visibility` to `false` in `default_action_config` property and specify the GUID or name of the object in `associate_metadata`. For more information, see [Custom actions](https://developers.thoughtspot.com/docs/custom-action-intro). + * @param createCustomActionRequest + */ + public async createCustomAction(createCustomActionRequest: CreateCustomActionRequest, _options?: Configuration): Promise { + let _config = _options || this.configuration; + + // verify required parameter 'createCustomActionRequest' is not null or undefined + if (createCustomActionRequest === null || createCustomActionRequest === undefined) { + throw new RequiredError("ThoughtSpotRestApi", "createCustomAction", "createCustomActionRequest"); + } + + + // Path Params + const localVarPath = '/api/rest/2.0/customization/custom-actions'; + + // Make Request Context + const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.POST); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.25.0") + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.25.0") + + + + + // Body Params + const contentType = ObjectSerializer.getPreferredMediaType([ + "application/json" + ]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = ObjectSerializer.stringify( + ObjectSerializer.serialize(createCustomActionRequest, "CreateCustomActionRequest", ""), + contentType + ); + requestContext.setBody(serializedBody); + + let authMethod: SecurityAuthentication | undefined; + // Apply auth methods + authMethod = _config.authMethods["bearerAuth"] + if (authMethod?.applySecurityAuthentication) { + await authMethod?.applySecurityAuthentication(requestContext); + } + + const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default + if (defaultAuth?.applySecurityAuthentication) { + await defaultAuth?.applySecurityAuthentication(requestContext); + } + + return requestContext; + } + + /** + * Version: 10.10.0.cl or later Creates a customization configuration for the notification email. #### Pre-requisites Requires `DEVELOPER` (**has developer privilege**) or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `DEVELOPER` (**Has developer privilege**) privilege is required. **NOTE**:This endpoint in currently in beta. Contact ThoughtSpot support to enable this on your instance. #### Usage guidelines To create a custom configuration pass these parameters in your API request: - A JSON map of configuration attributes `template_properties`. The following example shows a sample set of customization configuration: ``` { { \"cta_button_bg_color\": \"#444DEA\", \"cta_text_font_color\": \"#FFFFFF\", \"primary_bg_color\": \"#D3DEF0\", \"logo_url\": \"https://storage.pardot.com/710713/1642089901EbkRibJq/TS_fullworkmark_darkmode.png\", \"font_family\": \"\", \"product_name\": \"ThoughtSpot\", \"footer_address\": \"444 Castro St, Suite 1000 Mountain View, CA 94041\", \"footer_phone\": \"(800) 508-7008\", \"replacement_value_for_liveboard\": \"Dashboard\", \"replacement_value_for_answer\": \"Chart\", \"replacement_value_for_spot_iq\": \"AI Insights\", \"hide_footer_phone\": false, \"hide_footer_address\": false, \"hide_product_name\": false, \"hide_manage_notification\": false, \"hide_mobile_app_nudge\": false, \"hide_privacy_policy\": false, \"hide_ts_vocabulary_definitions\": false, \"hide_error_message\": false, \"hide_unsubscribe_link\": false, \"hide_notification_status\": false, \"hide_modify_alert\": false, \"company_website_url\": \"https://your-website.com/\", \"company_privacy_policy_url\" : \"https://link-to-privacy-policy.com/\", \"contact_support_url\": \"https://link-to-contact-support.com/\", \"hide_contact_support_url\": false, \"hide_logo_url\" : false } } ``` + * @param createEmailCustomizationRequest + */ + public async createEmailCustomization(createEmailCustomizationRequest: CreateEmailCustomizationRequest, _options?: Configuration): Promise { + let _config = _options || this.configuration; + + // verify required parameter 'createEmailCustomizationRequest' is not null or undefined + if (createEmailCustomizationRequest === null || createEmailCustomizationRequest === undefined) { + throw new RequiredError("ThoughtSpotRestApi", "createEmailCustomization", "createEmailCustomizationRequest"); + } + + + // Path Params + const localVarPath = '/api/rest/2.0/customization/email'; + + // Make Request Context + const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.POST); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.25.0") + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.25.0") + + + + + // Body Params + const contentType = ObjectSerializer.getPreferredMediaType([ + "application/json" + ]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = ObjectSerializer.stringify( + ObjectSerializer.serialize(createEmailCustomizationRequest, "CreateEmailCustomizationRequest", ""), + contentType + ); + requestContext.setBody(serializedBody); + + let authMethod: SecurityAuthentication | undefined; + // Apply auth methods + authMethod = _config.authMethods["bearerAuth"] + if (authMethod?.applySecurityAuthentication) { + await authMethod?.applySecurityAuthentication(requestContext); + } + + const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default + if (defaultAuth?.applySecurityAuthentication) { + await defaultAuth?.applySecurityAuthentication(requestContext); + } + + return requestContext; + } + + /** + * Version: 9.0.0.cl or later Creates an Org object. To use this API, the [Orgs](https://docs.thoughtspot.com/cloud/latest/orgs-overview) feature must be enabled in your cluster. Requires cluster administration (**Can administer Org**) privileges. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `ORG_ADMINISTRATION` (**Can manage Orgs**) privilege is required. + * @param createOrgRequest + */ + public async createOrg(createOrgRequest: CreateOrgRequest, _options?: Configuration): Promise { + let _config = _options || this.configuration; + + // verify required parameter 'createOrgRequest' is not null or undefined + if (createOrgRequest === null || createOrgRequest === undefined) { + throw new RequiredError("ThoughtSpotRestApi", "createOrg", "createOrgRequest"); + } + + + // Path Params + const localVarPath = '/api/rest/2.0/orgs/create'; + + // Make Request Context + const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.POST); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.25.0") + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.25.0") + + + + + // Body Params + const contentType = ObjectSerializer.getPreferredMediaType([ + "application/json" + ]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = ObjectSerializer.stringify( + ObjectSerializer.serialize(createOrgRequest, "CreateOrgRequest", ""), + contentType + ); + requestContext.setBody(serializedBody); + + let authMethod: SecurityAuthentication | undefined; + // Apply auth methods + authMethod = _config.authMethods["bearerAuth"] + if (authMethod?.applySecurityAuthentication) { + await authMethod?.applySecurityAuthentication(requestContext); + } + + const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default + if (defaultAuth?.applySecurityAuthentication) { + await defaultAuth?.applySecurityAuthentication(requestContext); + } + + return requestContext; + } + + /** + * Version: 9.5.0.cl or later Creates a Role object in ThoughtSpot. Available only if [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance. To create a Role, the `ROLE_ADMINISTRATION` (**Can manage roles**) privilege is required. + * @param createRoleRequest + */ + public async createRole(createRoleRequest: CreateRoleRequest, _options?: Configuration): Promise { + let _config = _options || this.configuration; + + // verify required parameter 'createRoleRequest' is not null or undefined + if (createRoleRequest === null || createRoleRequest === undefined) { + throw new RequiredError("ThoughtSpotRestApi", "createRole", "createRoleRequest"); + } + + + // Path Params + const localVarPath = '/api/rest/2.0/roles/create'; + + // Make Request Context + const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.POST); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.25.0") + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.25.0") + + + + + // Body Params + const contentType = ObjectSerializer.getPreferredMediaType([ + "application/json" + ]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = ObjectSerializer.stringify( + ObjectSerializer.serialize(createRoleRequest, "CreateRoleRequest", ""), + contentType + ); + requestContext.setBody(serializedBody); + + let authMethod: SecurityAuthentication | undefined; + // Apply auth methods + authMethod = _config.authMethods["bearerAuth"] + if (authMethod?.applySecurityAuthentication) { + await authMethod?.applySecurityAuthentication(requestContext); + } + + const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default + if (defaultAuth?.applySecurityAuthentication) { + await defaultAuth?.applySecurityAuthentication(requestContext); + } + + return requestContext; + } + + /** + * Create schedule. Version: 9.4.0.cl or later Creates a Liveboard schedule job. Requires at least edit access to Liveboards. To create a schedule on behalf of another user, you need `ADMINISTRATION` (**Can administer Org**) or `JOBSCHEDULING` (**Can schedule for others**) privilege and edit access to the Liveboard. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `JOBSCHEDULING` (**Can schedule for others**) privilege is required. #### Usage guidelines * The description text is mandatory. The description text appears as **Description: ** in the Liveboard schedule email notifications. * For Liveboards with both charts and tables, schedule creation is only supported in PDF and XLS formats. Schedules created in CSV formats for such Liveboards will fail to run. If `PDF` is set as the `file_format`, enable `pdf_options` to get the correct attachment. Not doing so may cause the attachment to be rendered empty. * To include only specific visualizations, specify the visualization GUIDs in the `visualization_identifiers` array. * You can schedule a Liveboard job to run periodically by setting frequency parameters. You can set the schedule to run daily, weekly, monthly or every n minutes or hours. The scheduled job can also be configured to run at a specific time of the day or on specific days of the week or month. Please ensure that when setting the schedule frequency for _minute of the object_, only values that are multiples of 5 are included. * If the `frequency` parameters are defined, you can set the time zone to a value that matches your server\'s time zone. For example, `US/Central`, `Etc/UTC`, `CET`. The default time zone is `America/Los_Angeles`. For more information about Liveboard jobs, see [ThoughtSpot Product Documentation](https://docs.thoughtspot.com/cloud/latest/liveboard-schedule). + * @param createScheduleRequest + */ + public async createSchedule(createScheduleRequest: CreateScheduleRequest, _options?: Configuration): Promise { + let _config = _options || this.configuration; + + // verify required parameter 'createScheduleRequest' is not null or undefined + if (createScheduleRequest === null || createScheduleRequest === undefined) { + throw new RequiredError("ThoughtSpotRestApi", "createSchedule", "createScheduleRequest"); + } + + + // Path Params + const localVarPath = '/api/rest/2.0/schedules/create'; + + // Make Request Context + const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.POST); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.25.0") + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.25.0") + + + + + // Body Params + const contentType = ObjectSerializer.getPreferredMediaType([ + "application/json" + ]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = ObjectSerializer.stringify( + ObjectSerializer.serialize(createScheduleRequest, "CreateScheduleRequest", ""), + contentType + ); + requestContext.setBody(serializedBody); + + let authMethod: SecurityAuthentication | undefined; + // Apply auth methods + authMethod = _config.authMethods["bearerAuth"] + if (authMethod?.applySecurityAuthentication) { + await authMethod?.applySecurityAuthentication(requestContext); + } + + const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default + if (defaultAuth?.applySecurityAuthentication) { + await defaultAuth?.applySecurityAuthentication(requestContext); + } + + return requestContext; + } + + /** + * Version: 9.0.0.cl or later Creates a tag object. Tags are labels that identify a metadata object. For example, you can create a tag to designate subject areas, such as sales, HR, marketing, and finance. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `TAGMANAGEMENT` (**Can manage tags**) privilege is required to create, edit, and delete tags. + * @param createTagRequest + */ + public async createTag(createTagRequest: CreateTagRequest, _options?: Configuration): Promise { + let _config = _options || this.configuration; + + // verify required parameter 'createTagRequest' is not null or undefined + if (createTagRequest === null || createTagRequest === undefined) { + throw new RequiredError("ThoughtSpotRestApi", "createTag", "createTagRequest"); + } + + + // Path Params + const localVarPath = '/api/rest/2.0/tags/create'; + + // Make Request Context + const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.POST); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.25.0") + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.25.0") + + + + + // Body Params + const contentType = ObjectSerializer.getPreferredMediaType([ + "application/json" + ]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = ObjectSerializer.stringify( + ObjectSerializer.serialize(createTagRequest, "CreateTagRequest", ""), + contentType + ); + requestContext.setBody(serializedBody); + + let authMethod: SecurityAuthentication | undefined; + // Apply auth methods + authMethod = _config.authMethods["bearerAuth"] + if (authMethod?.applySecurityAuthentication) { + await authMethod?.applySecurityAuthentication(requestContext); + } + + const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default + if (defaultAuth?.applySecurityAuthentication) { + await defaultAuth?.applySecurityAuthentication(requestContext); + } + + return requestContext; + } + + /** + * Version: 9.0.0.cl or later Creates a user in ThoughtSpot. The API endpoint allows you to configure several user properties such as email address, account status, share notification preferences, and sharing visibility. You can provision the user to [groups](https://docs.thoughtspot.com/cloud/latest/groups-privileges) and [Orgs](https://docs.thoughtspot.com/cloud/latest/orgs-overview). You can also add Liveboard, Answer, and Worksheet objects to the user’s favorites list, assign a default Liveboard for the user, and set user preferences. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `USER_ADMINISTRATION` (**Can manage users**) privilege is required. + * @param createUserRequest + */ + public async createUser(createUserRequest: CreateUserRequest, _options?: Configuration): Promise { + let _config = _options || this.configuration; + + // verify required parameter 'createUserRequest' is not null or undefined + if (createUserRequest === null || createUserRequest === undefined) { + throw new RequiredError("ThoughtSpotRestApi", "createUser", "createUserRequest"); + } + + + // Path Params + const localVarPath = '/api/rest/2.0/users/create'; + + // Make Request Context + const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.POST); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.25.0") + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.25.0") + + + + + // Body Params + const contentType = ObjectSerializer.getPreferredMediaType([ + "application/json" + ]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = ObjectSerializer.stringify( + ObjectSerializer.serialize(createUserRequest, "CreateUserRequest", ""), + contentType + ); + requestContext.setBody(serializedBody); + + let authMethod: SecurityAuthentication | undefined; + // Apply auth methods + authMethod = _config.authMethods["bearerAuth"] + if (authMethod?.applySecurityAuthentication) { + await authMethod?.applySecurityAuthentication(requestContext); + } + + const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default + if (defaultAuth?.applySecurityAuthentication) { + await defaultAuth?.applySecurityAuthentication(requestContext); + } + + return requestContext; + } + + /** + * Version: 9.0.0.cl or later Creates a group object in ThoughtSpot. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `GROUP_ADMINISTRATION` (**Can manage groups**) privilege is required. #### About groups Groups in ThoughtSpot are used by the administrators to define privileges and organize users based on their roles and access requirements. To know more about groups and privileges, see [ThoughtSpot Product Documentation](https://docs.thoughtspot.com/cloud/latest/groups-privileges). #### Supported operations The API endpoint lets you perform the following operations: * Assign privileges * Add users * Define sharing visibility * Add sub-groups * Assign a default Liveboard + * @param createUserGroupRequest + */ + public async createUserGroup(createUserGroupRequest: CreateUserGroupRequest, _options?: Configuration): Promise { + let _config = _options || this.configuration; + + // verify required parameter 'createUserGroupRequest' is not null or undefined + if (createUserGroupRequest === null || createUserGroupRequest === undefined) { + throw new RequiredError("ThoughtSpotRestApi", "createUserGroup", "createUserGroupRequest"); + } + + + // Path Params + const localVarPath = '/api/rest/2.0/groups/create'; + + // Make Request Context + const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.POST); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.25.0") + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.25.0") + + + + + // Body Params + const contentType = ObjectSerializer.getPreferredMediaType([ + "application/json" + ]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = ObjectSerializer.stringify( + ObjectSerializer.serialize(createUserGroupRequest, "CreateUserGroupRequest", ""), + contentType + ); + requestContext.setBody(serializedBody); + + let authMethod: SecurityAuthentication | undefined; + // Apply auth methods + authMethod = _config.authMethods["bearerAuth"] + if (authMethod?.applySecurityAuthentication) { + await authMethod?.applySecurityAuthentication(requestContext); + } + + const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default + if (defaultAuth?.applySecurityAuthentication) { + await defaultAuth?.applySecurityAuthentication(requestContext); + } + + return requestContext; + } + + /** + * Create a variable which can be used for parameterizing metadata objects Version: 26.4.0.cl or later Allows creating a variable which can be used for parameterizing metadata objects in ThoughtSpot. Requires ADMINISTRATION role and TENANT scope. The CAN_MANAGE_VARIABLES permission allows you to manage Formula Variables in the current organization scope. The API endpoint supports the following types of variables: * CONNECTION_PROPERTY - For connection properties * TABLE_MAPPING - For table mappings * CONNECTION_PROPERTY_PER_PRINCIPAL - For connection properties per principal. In order to use this please contact support to enable this. * FORMULA_VARIABLE - For Formula variables, introduced in 10.15.0.cl When creating a variable, you need to specify: * The variable type * A unique name for the variable * Whether the variable contains sensitive values (defaults to false) * The data type of the variable, only specify for formula variables (defaults to null) The operation will fail if: * The user lacks required permissions * The variable name already exists * The variable type is invalid + * @param createVariableRequest + */ + public async createVariable(createVariableRequest: CreateVariableRequest, _options?: Configuration): Promise { + let _config = _options || this.configuration; + + // verify required parameter 'createVariableRequest' is not null or undefined + if (createVariableRequest === null || createVariableRequest === undefined) { + throw new RequiredError("ThoughtSpotRestApi", "createVariable", "createVariableRequest"); + } + + + // Path Params + const localVarPath = '/api/rest/2.0/template/variables/create'; + + // Make Request Context + const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.POST); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.25.0") + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.25.0") + + + + + // Body Params + const contentType = ObjectSerializer.getPreferredMediaType([ + "application/json" + ]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = ObjectSerializer.stringify( + ObjectSerializer.serialize(createVariableRequest, "CreateVariableRequest", ""), + contentType + ); + requestContext.setBody(serializedBody); + + let authMethod: SecurityAuthentication | undefined; + // Apply auth methods + authMethod = _config.authMethods["bearerAuth"] + if (authMethod?.applySecurityAuthentication) { + await authMethod?.applySecurityAuthentication(requestContext); + } + + const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default + if (defaultAuth?.applySecurityAuthentication) { + await defaultAuth?.applySecurityAuthentication(requestContext); + } + + return requestContext; + } + + /** + * Version: 10.14.0.cl or later Creates a new webhook configuration to receive notifications for specified events. The webhook will be triggered when the configured events occur in the system. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) or `DEVELOPER` (**Has developer privilege**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, users with `CAN_MANAGE_WEBHOOKS` (**Can manage webhooks**) privilege are also authorized to perform this action. + * @param createWebhookConfigurationRequest + */ + public async createWebhookConfiguration(createWebhookConfigurationRequest: CreateWebhookConfigurationRequest, _options?: Configuration): Promise { + let _config = _options || this.configuration; + + // verify required parameter 'createWebhookConfigurationRequest' is not null or undefined + if (createWebhookConfigurationRequest === null || createWebhookConfigurationRequest === undefined) { + throw new RequiredError("ThoughtSpotRestApi", "createWebhookConfiguration", "createWebhookConfigurationRequest"); + } + + + // Path Params + const localVarPath = '/api/rest/2.0/webhooks/create'; + + // Make Request Context + const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.POST); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.25.0") + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.25.0") + + + + + // Body Params + const contentType = ObjectSerializer.getPreferredMediaType([ + "application/json" + ]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = ObjectSerializer.stringify( + ObjectSerializer.serialize(createWebhookConfigurationRequest, "CreateWebhookConfigurationRequest", ""), + contentType + ); + requestContext.setBody(serializedBody); + + let authMethod: SecurityAuthentication | undefined; + // Apply auth methods + authMethod = _config.authMethods["bearerAuth"] + if (authMethod?.applySecurityAuthentication) { + await authMethod?.applySecurityAuthentication(requestContext); + } + + const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default + if (defaultAuth?.applySecurityAuthentication) { + await defaultAuth?.applySecurityAuthentication(requestContext); + } + + return requestContext; + } + + /** + * Version: 9.9.0.cl or later Creates a DBT connection object in ThoughtSpot. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege or `DATAMANAGEMENT` (**Can manage data**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the following Data control privileges may be required: - `CAN_MANAGE_CUSTOM_CALENDAR`(**Can manage custom calendars**) - `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) - `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` (**Can manage data models**) #### About create DBT connection DBT connection in ThoughtSpot is used by the user to define DBT credentials for cloud . The API needs embrace connection, embrace database name, DBT url, import type, DBT account identifier, DBT project identifier, DBT access token and environment details (or) embrace connection, embrace database name, import type, file_content to create a connection object. To know more about DBT, see ThoughtSpot Product Documentation. + * @param connectionName Name of the connection. + * @param databaseName Name of the Database. + * @param importType Mention type of Import + * @param accessToken Access token is mandatory when Import_Type is DBT_CLOUD. + * @param dbtUrl DBT URL is mandatory when Import_Type is DBT_CLOUD. + * @param accountId Account ID is mandatory when Import_Type is DBT_CLOUD + * @param projectId Project ID is mandatory when Import_Type is DBT_CLOUD + * @param dbtEnvId DBT Environment ID\\\" + * @param projectName Name of the project + * @param fileContent Upload DBT Manifest and Catalog artifact files as a ZIP file. This field is Mandatory when Import Type is \\\'ZIP_FILE\\\' + */ + public async dbtConnection(connectionName: string, databaseName: string, importType?: string, accessToken?: string, dbtUrl?: string, accountId?: string, projectId?: string, dbtEnvId?: string, projectName?: string, fileContent?: HttpFile, _options?: Configuration): Promise { + let _config = _options || this.configuration; + + // verify required parameter 'connectionName' is not null or undefined + if (connectionName === null || connectionName === undefined) { + throw new RequiredError("ThoughtSpotRestApi", "dbtConnection", "connectionName"); + } + + + // verify required parameter 'databaseName' is not null or undefined + if (databaseName === null || databaseName === undefined) { + throw new RequiredError("ThoughtSpotRestApi", "dbtConnection", "databaseName"); + } + + + + + + + + + + + // Path Params + const localVarPath = '/api/rest/2.0/dbt/dbt-connection'; + + // Make Request Context + const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.POST); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.25.0") + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.25.0") + + + + // Form Params + const useForm = canConsumeForm([ + 'multipart/form-data', + ]); + + let localVarFormParams + if (useForm) { + localVarFormParams = new FormData(); + } else { + localVarFormParams = new URLSearchParams(); + } + + if (connectionName !== undefined) { + // TODO: replace .append with .set + localVarFormParams.append('connection_name', connectionName as any); + } + if (databaseName !== undefined) { + // TODO: replace .append with .set + localVarFormParams.append('database_name', databaseName as any); + } + if (importType !== undefined) { + // TODO: replace .append with .set + localVarFormParams.append('import_type', importType as any); + } + if (accessToken !== undefined) { + // TODO: replace .append with .set + localVarFormParams.append('access_token', accessToken as any); + } + if (dbtUrl !== undefined) { + // TODO: replace .append with .set + localVarFormParams.append('dbt_url', dbtUrl as any); + } + if (accountId !== undefined) { + // TODO: replace .append with .set + localVarFormParams.append('account_id', accountId as any); + } + if (projectId !== undefined) { + // TODO: replace .append with .set + localVarFormParams.append('project_id', projectId as any); + } + if (dbtEnvId !== undefined) { + // TODO: replace .append with .set + localVarFormParams.append('dbt_env_id', dbtEnvId as any); + } + if (projectName !== undefined) { + // TODO: replace .append with .set + localVarFormParams.append('project_name', projectName as any); + } + if (fileContent !== undefined) { + // TODO: replace .append with .set + if (localVarFormParams instanceof FormData) { + localVarFormParams.append('file_content', fileContent, fileContent.name); + } + } + + requestContext.setBody(localVarFormParams); + + if(!useForm) { + const contentType = ObjectSerializer.getPreferredMediaType([ + "multipart/form-data" + ]); + requestContext.setHeaderParam("Content-Type", contentType); + } + + let authMethod: SecurityAuthentication | undefined; + // Apply auth methods + authMethod = _config.authMethods["bearerAuth"] + if (authMethod?.applySecurityAuthentication) { + await authMethod?.applySecurityAuthentication(requestContext); + } + + const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default + if (defaultAuth?.applySecurityAuthentication) { + await defaultAuth?.applySecurityAuthentication(requestContext); + } + + return requestContext; + } + + /** + * Version: 9.9.0.cl or later Resynchronize the existing list of models, tables, worksheet tml’s and import them to Thoughtspot based on the DBT connection object. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege or `DATAMANAGEMENT` (**Can manage data**) privilege, along with an existing DBT connection. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the following data control privileges may be required: - `CAN_MANAGE_CUSTOM_CALENDAR`(**Can manage custom calendars**) - `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) - `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` (**Can manage data models**) + * @param dbtConnectionIdentifier Unique ID of the DBT connection. + * @param fileContent Upload DBT Manifest and Catalog artifact files as a ZIP file. This field is mandatory if the connection was created with import_type ‘ZIP_FILE’ + */ + public async dbtGenerateSyncTml(dbtConnectionIdentifier: string, fileContent?: HttpFile, _options?: Configuration): Promise { + let _config = _options || this.configuration; + + // verify required parameter 'dbtConnectionIdentifier' is not null or undefined + if (dbtConnectionIdentifier === null || dbtConnectionIdentifier === undefined) { + throw new RequiredError("ThoughtSpotRestApi", "dbtGenerateSyncTml", "dbtConnectionIdentifier"); + } + + + + // Path Params + const localVarPath = '/api/rest/2.0/dbt/generate-sync-tml'; + + // Make Request Context + const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.POST); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.25.0") + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.25.0") + + + + // Form Params + const useForm = canConsumeForm([ + 'multipart/form-data', + ]); + + let localVarFormParams + if (useForm) { + localVarFormParams = new FormData(); + } else { + localVarFormParams = new URLSearchParams(); + } + + if (dbtConnectionIdentifier !== undefined) { + // TODO: replace .append with .set + localVarFormParams.append('dbt_connection_identifier', dbtConnectionIdentifier as any); + } + if (fileContent !== undefined) { + // TODO: replace .append with .set + if (localVarFormParams instanceof FormData) { + localVarFormParams.append('file_content', fileContent, fileContent.name); + } + } + + requestContext.setBody(localVarFormParams); + + if(!useForm) { + const contentType = ObjectSerializer.getPreferredMediaType([ + "multipart/form-data" + ]); + requestContext.setHeaderParam("Content-Type", contentType); + } + + let authMethod: SecurityAuthentication | undefined; + // Apply auth methods + authMethod = _config.authMethods["bearerAuth"] + if (authMethod?.applySecurityAuthentication) { + await authMethod?.applySecurityAuthentication(requestContext); + } + + const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default + if (defaultAuth?.applySecurityAuthentication) { + await defaultAuth?.applySecurityAuthentication(requestContext); + } + + return requestContext; + } + + /** + * Version: 9.9.0.cl or later Generate required table and worksheet and import them. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege or `DATAMANAGEMENT` (**Can manage data**) privilege, along with an existing DBT connection. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the following data control privileges may be required: - `CAN_MANAGE_CUSTOM_CALENDAR`(**Can manage custom calendars**) - `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) - `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` (**Can manage data models**) #### About generate TML Models and Worksheets to be imported can be selected by the user as part of the API. + * @param dbtConnectionIdentifier Unique ID of the DBT connection. + * @param modelTables List of Models and their respective Tables Example: \\\'[{\\\"model_name\\\": \\\"model_name\\\", \\\"tables\\\": [\\\"table_name\\\"]}]\\\' + * @param importWorksheets Mention the worksheet tmls to import + * @param worksheets List of worksheets is mandatory when import_Worksheets is type SELECTED Example: [\\\"worksheet_name\\\"] + * @param fileContent Upload DBT Manifest and Catalog artifact files as a ZIP file. This field is mandatory if the connection was created with import_type ‘ZIP_FILE’ + */ + public async dbtGenerateTml(dbtConnectionIdentifier: string, modelTables: string, importWorksheets: string, worksheets?: string, fileContent?: HttpFile, _options?: Configuration): Promise { + let _config = _options || this.configuration; + + // verify required parameter 'dbtConnectionIdentifier' is not null or undefined + if (dbtConnectionIdentifier === null || dbtConnectionIdentifier === undefined) { + throw new RequiredError("ThoughtSpotRestApi", "dbtGenerateTml", "dbtConnectionIdentifier"); + } + + + // verify required parameter 'modelTables' is not null or undefined + if (modelTables === null || modelTables === undefined) { + throw new RequiredError("ThoughtSpotRestApi", "dbtGenerateTml", "modelTables"); + } + + + // verify required parameter 'importWorksheets' is not null or undefined + if (importWorksheets === null || importWorksheets === undefined) { + throw new RequiredError("ThoughtSpotRestApi", "dbtGenerateTml", "importWorksheets"); + } + + + + + // Path Params + const localVarPath = '/api/rest/2.0/dbt/generate-tml'; + + // Make Request Context + const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.POST); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.25.0") + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.25.0") + + + + // Form Params + const useForm = canConsumeForm([ + 'multipart/form-data', + ]); + + let localVarFormParams + if (useForm) { + localVarFormParams = new FormData(); + } else { + localVarFormParams = new URLSearchParams(); + } + + if (dbtConnectionIdentifier !== undefined) { + // TODO: replace .append with .set + localVarFormParams.append('dbt_connection_identifier', dbtConnectionIdentifier as any); + } + if (modelTables !== undefined) { + // TODO: replace .append with .set + localVarFormParams.append('model_tables', modelTables as any); + } + if (importWorksheets !== undefined) { + // TODO: replace .append with .set + localVarFormParams.append('import_worksheets', importWorksheets as any); + } + if (worksheets !== undefined) { + // TODO: replace .append with .set + localVarFormParams.append('worksheets', worksheets as any); + } + if (fileContent !== undefined) { + // TODO: replace .append with .set + if (localVarFormParams instanceof FormData) { + localVarFormParams.append('file_content', fileContent, fileContent.name); + } + } + + requestContext.setBody(localVarFormParams); + + if(!useForm) { + const contentType = ObjectSerializer.getPreferredMediaType([ + "multipart/form-data" + ]); + requestContext.setHeaderParam("Content-Type", contentType); + } + + let authMethod: SecurityAuthentication | undefined; + // Apply auth methods + authMethod = _config.authMethods["bearerAuth"] + if (authMethod?.applySecurityAuthentication) { + await authMethod?.applySecurityAuthentication(requestContext); + } + + const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default + if (defaultAuth?.applySecurityAuthentication) { + await defaultAuth?.applySecurityAuthentication(requestContext); + } + + return requestContext; + } + + /** + * Version: 9.9.0.cl or later Gets a list of DBT connection objects by user and organization, available on the ThoughtSpot system. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege or `DATAMANAGEMENT` (**Can manage data**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the following Data control privileges may be required: - `CAN_MANAGE_CUSTOM_CALENDAR`(**Can manage custom calendars**) - `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) - `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` (**Can manage data models**) #### About search DBT connection To get details of a specific DBT connection identifier, database connection identifier, database connection name, database name, project name, project identifier, environment identifier , import type and author. + */ + public async dbtSearch(_options?: Configuration): Promise { + let _config = _options || this.configuration; + + // Path Params + const localVarPath = '/api/rest/2.0/dbt/search'; + + // Make Request Context + const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.POST); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.25.0") + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.25.0") + + + + + let authMethod: SecurityAuthentication | undefined; + // Apply auth methods + authMethod = _config.authMethods["bearerAuth"] + if (authMethod?.applySecurityAuthentication) { + await authMethod?.applySecurityAuthentication(requestContext); + } + + const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default + if (defaultAuth?.applySecurityAuthentication) { + await defaultAuth?.applySecurityAuthentication(requestContext); + } + + return requestContext; + } + + /** + * Version: 9.7.0.cl or later Deactivates a user account. Requires `ADMINISTRATION` (**Can administer Thoughtspot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `USER_ADMINISTRATION` (**Can manage users**) privilege is required. To deactivate a user account, the API request body must include the following information: - Username or the GUID of the user account - Base URL of the ThoughtSpot instance If the API request is successful, ThoughtSpot returns the activation URL in the response. The activation URL is valid for 14 days and can be used to re-activate the account and reset the password of the deactivated account. + * @param deactivateUserRequest + */ + public async deactivateUser(deactivateUserRequest: DeactivateUserRequest, _options?: Configuration): Promise { + let _config = _options || this.configuration; + + // verify required parameter 'deactivateUserRequest' is not null or undefined + if (deactivateUserRequest === null || deactivateUserRequest === undefined) { + throw new RequiredError("ThoughtSpotRestApi", "deactivateUser", "deactivateUserRequest"); + } + + + // Path Params + const localVarPath = '/api/rest/2.0/users/deactivate'; + + // Make Request Context + const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.POST); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.25.0") + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.25.0") + + + + + // Body Params + const contentType = ObjectSerializer.getPreferredMediaType([ + "application/json" + ]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = ObjectSerializer.stringify( + ObjectSerializer.serialize(deactivateUserRequest, "DeactivateUserRequest", ""), + contentType + ); + requestContext.setBody(serializedBody); + + let authMethod: SecurityAuthentication | undefined; + // Apply auth methods + authMethod = _config.authMethods["bearerAuth"] + if (authMethod?.applySecurityAuthentication) { + await authMethod?.applySecurityAuthentication(requestContext); + } + + const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default + if (defaultAuth?.applySecurityAuthentication) { + await defaultAuth?.applySecurityAuthentication(requestContext); + } + + return requestContext; + } + + /** + * Version: 10.12.0.cl or later Deletes a [custom calendar](https://docs.thoughtspot.com/cloud/latest/connections-cust-cal). Requires `DATAMANAGEMENT` (**Can manage data**) or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your ThoughtSpot instance, the `CAN_MANAGE_CUSTOM_CALENDAR` (**Can manage custom calendars**) privilege is required. #### Usage guidelines To delete a custom calendar, specify the calendar ID as a path parameter in the request URL. + * @param calendarIdentifier Unique ID or name of the Calendar. + */ + public async deleteCalendar(calendarIdentifier: string, _options?: Configuration): Promise { + let _config = _options || this.configuration; + + // verify required parameter 'calendarIdentifier' is not null or undefined + if (calendarIdentifier === null || calendarIdentifier === undefined) { + throw new RequiredError("ThoughtSpotRestApi", "deleteCalendar", "calendarIdentifier"); + } + + + // Path Params + const localVarPath = '/api/rest/2.0/calendars/{calendar_identifier}/delete' + .replace('{' + 'calendar_identifier' + '}', encodeURIComponent(String(calendarIdentifier))); + + // Make Request Context + const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.POST); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.25.0") + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.25.0") + + + + + let authMethod: SecurityAuthentication | undefined; + // Apply auth methods + authMethod = _config.authMethods["bearerAuth"] + if (authMethod?.applySecurityAuthentication) { + await authMethod?.applySecurityAuthentication(requestContext); + } + + const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default + if (defaultAuth?.applySecurityAuthentication) { + await defaultAuth?.applySecurityAuthentication(requestContext); + } + + return requestContext; + } + + /** + * Version: 26.4.0.cl or later Deletes one or more collections from ThoughtSpot. #### Delete options * **delete_children**: When set to `true`, deletes the child objects (metadata items) within the collection that the user has access to. Objects that the user does not have permission to delete will be skipped. * **dry_run**: When set to `true`, performs a preview of the deletion operation without actually deleting anything. The response shows what would be deleted, allowing you to review before committing the deletion. #### Response The response includes: * **metadata_deleted**: List of metadata objects that were successfully deleted * **metadata_skipped**: List of metadata objects that were skipped due to lack of permissions or other constraints + * @param deleteCollectionRequest + */ + public async deleteCollection(deleteCollectionRequest: DeleteCollectionRequest, _options?: Configuration): Promise { + let _config = _options || this.configuration; + + // verify required parameter 'deleteCollectionRequest' is not null or undefined + if (deleteCollectionRequest === null || deleteCollectionRequest === undefined) { + throw new RequiredError("ThoughtSpotRestApi", "deleteCollection", "deleteCollectionRequest"); + } + + + // Path Params + const localVarPath = '/api/rest/2.0/collections/delete'; + + // Make Request Context + const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.POST); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.25.0") + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.25.0") + + + + + // Body Params + const contentType = ObjectSerializer.getPreferredMediaType([ + "application/json" + ]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = ObjectSerializer.stringify( + ObjectSerializer.serialize(deleteCollectionRequest, "DeleteCollectionRequest", ""), + contentType + ); + requestContext.setBody(serializedBody); + + let authMethod: SecurityAuthentication | undefined; + // Apply auth methods + authMethod = _config.authMethods["bearerAuth"] + if (authMethod?.applySecurityAuthentication) { + await authMethod?.applySecurityAuthentication(requestContext); + } + + const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default + if (defaultAuth?.applySecurityAuthentication) { + await defaultAuth?.applySecurityAuthentication(requestContext); + } + + return requestContext; + } + + /** + * Version: 9.2.0.cl or later Deletes Git repository configuration from your ThoughtSpot instance. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance on your instance, the `CAN_SETUP_VERSION_CONTROL` (**Can set up version control**) privilege. + * @param deleteConfigRequest + */ + public async deleteConfig(deleteConfigRequest: DeleteConfigRequest, _options?: Configuration): Promise { + let _config = _options || this.configuration; + + // verify required parameter 'deleteConfigRequest' is not null or undefined + if (deleteConfigRequest === null || deleteConfigRequest === undefined) { + throw new RequiredError("ThoughtSpotRestApi", "deleteConfig", "deleteConfigRequest"); + } + + + // Path Params + const localVarPath = '/api/rest/2.0/vcs/git/config/delete'; + + // Make Request Context + const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.POST); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.25.0") + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.25.0") + + + + + // Body Params + const contentType = ObjectSerializer.getPreferredMediaType([ + "application/json" + ]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = ObjectSerializer.stringify( + ObjectSerializer.serialize(deleteConfigRequest, "DeleteConfigRequest", ""), + contentType + ); + requestContext.setBody(serializedBody); + + let authMethod: SecurityAuthentication | undefined; + // Apply auth methods + authMethod = _config.authMethods["bearerAuth"] + if (authMethod?.applySecurityAuthentication) { + await authMethod?.applySecurityAuthentication(requestContext); + } + + const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default + if (defaultAuth?.applySecurityAuthentication) { + await defaultAuth?.applySecurityAuthentication(requestContext); + } + + return requestContext; + } + + /** + * Version: 9.2.0.cl or later **Important**: This endpoint is deprecated and will be removed from ThoughtSpot in September 2025. ThoughtSpot strongly recommends using the [Delete Connection V2](#/http/api-endpoints/connections/delete-connection-v2) endpoint to delete your connection objects. #### Usage guidelines Deletes a connection object. Requires `DATAMANAGEMENT` (**Can manage data**) and edit permissions to the connection object, or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) privilege is required. **Note**: If a connection has dependent objects, make sure you remove its associations before the delete operation. + * @param deleteConnectionRequest + */ + public async deleteConnection(deleteConnectionRequest: DeleteConnectionRequest, _options?: Configuration): Promise { + let _config = _options || this.configuration; + + // verify required parameter 'deleteConnectionRequest' is not null or undefined + if (deleteConnectionRequest === null || deleteConnectionRequest === undefined) { + throw new RequiredError("ThoughtSpotRestApi", "deleteConnection", "deleteConnectionRequest"); + } + + + // Path Params + const localVarPath = '/api/rest/2.0/connection/delete'; + + // Make Request Context + const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.POST); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.25.0") + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.25.0") + + + + + // Body Params + const contentType = ObjectSerializer.getPreferredMediaType([ + "application/json" + ]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = ObjectSerializer.stringify( + ObjectSerializer.serialize(deleteConnectionRequest, "DeleteConnectionRequest", ""), + contentType + ); + requestContext.setBody(serializedBody); + + let authMethod: SecurityAuthentication | undefined; + // Apply auth methods + authMethod = _config.authMethods["bearerAuth"] + if (authMethod?.applySecurityAuthentication) { + await authMethod?.applySecurityAuthentication(requestContext); + } + + const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default + if (defaultAuth?.applySecurityAuthentication) { + await defaultAuth?.applySecurityAuthentication(requestContext); + } + + return requestContext; + } + + /** + * Version: 10.12.0.cl or later Deletes connection configuration objects. Requires `DATAMANAGEMENT` (**Can manage data**) and edit permissions to the connection object, or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) privilege is required. + * @param deleteConnectionConfigurationRequest + */ + public async deleteConnectionConfiguration(deleteConnectionConfigurationRequest: DeleteConnectionConfigurationRequest, _options?: Configuration): Promise { + let _config = _options || this.configuration; + + // verify required parameter 'deleteConnectionConfigurationRequest' is not null or undefined + if (deleteConnectionConfigurationRequest === null || deleteConnectionConfigurationRequest === undefined) { + throw new RequiredError("ThoughtSpotRestApi", "deleteConnectionConfiguration", "deleteConnectionConfigurationRequest"); + } + + + // Path Params + const localVarPath = '/api/rest/2.0/connection-configurations/delete'; + + // Make Request Context + const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.POST); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.25.0") + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.25.0") + + + + + // Body Params + const contentType = ObjectSerializer.getPreferredMediaType([ + "application/json" + ]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = ObjectSerializer.stringify( + ObjectSerializer.serialize(deleteConnectionConfigurationRequest, "DeleteConnectionConfigurationRequest", ""), + contentType + ); + requestContext.setBody(serializedBody); + + let authMethod: SecurityAuthentication | undefined; + // Apply auth methods + authMethod = _config.authMethods["bearerAuth"] + if (authMethod?.applySecurityAuthentication) { + await authMethod?.applySecurityAuthentication(requestContext); + } + + const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default + if (defaultAuth?.applySecurityAuthentication) { + await defaultAuth?.applySecurityAuthentication(requestContext); + } + + return requestContext; + } + + /** + * Version: 10.4.0.cl or later Deletes a connection object. **Note**: If a connection has dependent objects, make sure you remove its associations before the delete operation. Requires `DATAMANAGEMENT` (**Can manage data**) and edit permissions to the connection object, or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) privilege is required. + * @param connectionIdentifier Unique ID or name of the connection. + */ + public async deleteConnectionV2(connectionIdentifier: string, _options?: Configuration): Promise { + let _config = _options || this.configuration; + + // verify required parameter 'connectionIdentifier' is not null or undefined + if (connectionIdentifier === null || connectionIdentifier === undefined) { + throw new RequiredError("ThoughtSpotRestApi", "deleteConnectionV2", "connectionIdentifier"); + } + + + // Path Params + const localVarPath = '/api/rest/2.0/connections/{connection_identifier}/delete' + .replace('{' + 'connection_identifier' + '}', encodeURIComponent(String(connectionIdentifier))); + + // Make Request Context + const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.POST); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.25.0") + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.25.0") + + + + + let authMethod: SecurityAuthentication | undefined; + // Apply auth methods + authMethod = _config.authMethods["bearerAuth"] + if (authMethod?.applySecurityAuthentication) { + await authMethod?.applySecurityAuthentication(requestContext); + } + + const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default + if (defaultAuth?.applySecurityAuthentication) { + await defaultAuth?.applySecurityAuthentication(requestContext); + } + + return requestContext; + } + + /** + * Version: 9.6.0.cl or later Removes the custom action specified in the API request. Requires `DEVELOPER` (**Has Developer privilege**) or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `DEVELOPER` (**Has developer privilege**) privilege is required. + * @param customActionIdentifier Unique ID or name of the custom action. + */ + public async deleteCustomAction(customActionIdentifier: string, _options?: Configuration): Promise { + let _config = _options || this.configuration; + + // verify required parameter 'customActionIdentifier' is not null or undefined + if (customActionIdentifier === null || customActionIdentifier === undefined) { + throw new RequiredError("ThoughtSpotRestApi", "deleteCustomAction", "customActionIdentifier"); + } + + + // Path Params + const localVarPath = '/api/rest/2.0/customization/custom-actions/{custom_action_identifier}/delete' + .replace('{' + 'custom_action_identifier' + '}', encodeURIComponent(String(customActionIdentifier))); + + // Make Request Context + const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.POST); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.25.0") + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.25.0") + + + + + let authMethod: SecurityAuthentication | undefined; + // Apply auth methods + authMethod = _config.authMethods["bearerAuth"] + if (authMethod?.applySecurityAuthentication) { + await authMethod?.applySecurityAuthentication(requestContext); + } + + const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default + if (defaultAuth?.applySecurityAuthentication) { + await defaultAuth?.applySecurityAuthentication(requestContext); + } + + return requestContext; + } + + /** + * Version: 9.9.0.cl or later Removes the specified DBT connection object from the ThoughtSpot system. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) or `DATAMANAGEMENT` (**Can manage data ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the following Data control privileges may be required: - `CAN_MANAGE_CUSTOM_CALENDAR`(**Can manage custom calendars**) - `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) - `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` (**Can manage data models**) + * @param dbtConnectionIdentifier Unique ID of the DBT Connection. + */ + public async deleteDbtConnection(dbtConnectionIdentifier: string, _options?: Configuration): Promise { + let _config = _options || this.configuration; + + // verify required parameter 'dbtConnectionIdentifier' is not null or undefined + if (dbtConnectionIdentifier === null || dbtConnectionIdentifier === undefined) { + throw new RequiredError("ThoughtSpotRestApi", "deleteDbtConnection", "dbtConnectionIdentifier"); + } + + + // Path Params + const localVarPath = '/api/rest/2.0/dbt/{dbt_connection_identifier}/delete' + .replace('{' + 'dbt_connection_identifier' + '}', encodeURIComponent(String(dbtConnectionIdentifier))); + + // Make Request Context + const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.POST); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.25.0") + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.25.0") + + + + + let authMethod: SecurityAuthentication | undefined; + // Apply auth methods + authMethod = _config.authMethods["bearerAuth"] + if (authMethod?.applySecurityAuthentication) { + await authMethod?.applySecurityAuthentication(requestContext); + } + + const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default + if (defaultAuth?.applySecurityAuthentication) { + await defaultAuth?.applySecurityAuthentication(requestContext); + } + + return requestContext; + } + + /** + * Version: 10.10.0.cl or later Deletes the configuration for the email customization. #### Pre-requisites Requires `DEVELOPER` (**has developer privilege**) or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `DEVELOPER` (**Has developer privilege**) privilege is required. **NOTE**:This endpoint in currently in beta. Contact ThoughtSpot support to enable this on your instance. #### Usage guidelines - Call the search API endpoint to get the `template_identifier` from the response. - Use that `template_identifier` as a parameter in this API request. + * @param templateIdentifier Unique ID or name of the email customization. + */ + public async deleteEmailCustomization(templateIdentifier: string, _options?: Configuration): Promise { + let _config = _options || this.configuration; + + // verify required parameter 'templateIdentifier' is not null or undefined + if (templateIdentifier === null || templateIdentifier === undefined) { + throw new RequiredError("ThoughtSpotRestApi", "deleteEmailCustomization", "templateIdentifier"); + } + + + // Path Params + const localVarPath = '/api/rest/2.0/customization/email/{template_identifier}/delete' + .replace('{' + 'template_identifier' + '}', encodeURIComponent(String(templateIdentifier))); + + // Make Request Context + const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.POST); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.25.0") + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.25.0") + + + + + let authMethod: SecurityAuthentication | undefined; + // Apply auth methods + authMethod = _config.authMethods["bearerAuth"] + if (authMethod?.applySecurityAuthentication) { + await authMethod?.applySecurityAuthentication(requestContext); + } + + const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default + if (defaultAuth?.applySecurityAuthentication) { + await defaultAuth?.applySecurityAuthentication(requestContext); + } + + return requestContext; + } + + /** + * Version: 9.0.0.cl or later Removes the specified metadata object from the ThoughtSpot system. Requires edit access to the metadata object. + * @param deleteMetadataRequest + */ + public async deleteMetadata(deleteMetadataRequest: DeleteMetadataRequest, _options?: Configuration): Promise { + let _config = _options || this.configuration; + + // verify required parameter 'deleteMetadataRequest' is not null or undefined + if (deleteMetadataRequest === null || deleteMetadataRequest === undefined) { + throw new RequiredError("ThoughtSpotRestApi", "deleteMetadata", "deleteMetadataRequest"); + } + + + // Path Params + const localVarPath = '/api/rest/2.0/metadata/delete'; + + // Make Request Context + const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.POST); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.25.0") + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.25.0") + + + + + // Body Params + const contentType = ObjectSerializer.getPreferredMediaType([ + "application/json" + ]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = ObjectSerializer.stringify( + ObjectSerializer.serialize(deleteMetadataRequest, "DeleteMetadataRequest", ""), + contentType + ); + requestContext.setBody(serializedBody); + + let authMethod: SecurityAuthentication | undefined; + // Apply auth methods + authMethod = _config.authMethods["bearerAuth"] + if (authMethod?.applySecurityAuthentication) { + await authMethod?.applySecurityAuthentication(requestContext); + } + + const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default + if (defaultAuth?.applySecurityAuthentication) { + await defaultAuth?.applySecurityAuthentication(requestContext); + } + + return requestContext; + } + + /** + * Version: 9.0.0.cl or later Deletes an Org object from the ThoughtSpot system. Requires cluster administration (**Can administer Org**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `ORG_ADMINISTRATION` (**Can manage Orgs**) privilege is required. When you delete an Org, all its users and objects created in that Org context are removed. However, if the users in the deleted Org also exists in other Orgs, they are removed only from the deleted Org. + * @param orgIdentifier ID or name of the Org + */ + public async deleteOrg(orgIdentifier: string, _options?: Configuration): Promise { + let _config = _options || this.configuration; + + // verify required parameter 'orgIdentifier' is not null or undefined + if (orgIdentifier === null || orgIdentifier === undefined) { + throw new RequiredError("ThoughtSpotRestApi", "deleteOrg", "orgIdentifier"); + } + + + // Path Params + const localVarPath = '/api/rest/2.0/orgs/{org_identifier}/delete' + .replace('{' + 'org_identifier' + '}', encodeURIComponent(String(orgIdentifier))); + + // Make Request Context + const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.POST); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.25.0") + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.25.0") + + + + + let authMethod: SecurityAuthentication | undefined; + // Apply auth methods + authMethod = _config.authMethods["bearerAuth"] + if (authMethod?.applySecurityAuthentication) { + await authMethod?.applySecurityAuthentication(requestContext); + } + + const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default + if (defaultAuth?.applySecurityAuthentication) { + await defaultAuth?.applySecurityAuthentication(requestContext); + } + + return requestContext; + } + + /** + * Version: 10.12.0.cl or later Deletes the configuration for the email customization. #### Pre-requisites Requires `DEVELOPER` (**has developer privilege**) or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `DEVELOPER` (**Has developer privilege**) privilege is required. **NOTE**:This endpoint in currently in beta. Contact ThoughtSpot support to enable this on your instance. #### Usage guidelines - Call the search API endpoint to get the `org_identifier` from the response. - Use that `org_identifier` as a parameter in this API request. + * @param deleteOrgEmailCustomizationRequest + */ + public async deleteOrgEmailCustomization(deleteOrgEmailCustomizationRequest: DeleteOrgEmailCustomizationRequest, _options?: Configuration): Promise { + let _config = _options || this.configuration; + + // verify required parameter 'deleteOrgEmailCustomizationRequest' is not null or undefined + if (deleteOrgEmailCustomizationRequest === null || deleteOrgEmailCustomizationRequest === undefined) { + throw new RequiredError("ThoughtSpotRestApi", "deleteOrgEmailCustomization", "deleteOrgEmailCustomizationRequest"); + } + + + // Path Params + const localVarPath = '/api/rest/2.0/customization/email/delete'; + + // Make Request Context + const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.POST); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.25.0") + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.25.0") + + + + + // Body Params + const contentType = ObjectSerializer.getPreferredMediaType([ + "application/json" + ]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = ObjectSerializer.stringify( + ObjectSerializer.serialize(deleteOrgEmailCustomizationRequest, "DeleteOrgEmailCustomizationRequest", ""), + contentType + ); + requestContext.setBody(serializedBody); + + let authMethod: SecurityAuthentication | undefined; + // Apply auth methods + authMethod = _config.authMethods["bearerAuth"] + if (authMethod?.applySecurityAuthentication) { + await authMethod?.applySecurityAuthentication(requestContext); + } + + const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default + if (defaultAuth?.applySecurityAuthentication) { + await defaultAuth?.applySecurityAuthentication(requestContext); + } + + return requestContext; + } + + /** + * Version: 9.5.0.cl or later Deletes a Role object from the ThoughtSpot system. Available only if [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance. To delete a Role, the `ROLE_ADMINISTRATION` (**Can manage roles**) privilege is required. + * @param roleIdentifier Unique ID or name of the Role. ReadOnly roles cannot be deleted. + */ + public async deleteRole(roleIdentifier: string, _options?: Configuration): Promise { + let _config = _options || this.configuration; + + // verify required parameter 'roleIdentifier' is not null or undefined + if (roleIdentifier === null || roleIdentifier === undefined) { + throw new RequiredError("ThoughtSpotRestApi", "deleteRole", "roleIdentifier"); + } + + + // Path Params + const localVarPath = '/api/rest/2.0/roles/{role_identifier}/delete' + .replace('{' + 'role_identifier' + '}', encodeURIComponent(String(roleIdentifier))); + + // Make Request Context + const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.POST); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.25.0") + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.25.0") + + + + + let authMethod: SecurityAuthentication | undefined; + // Apply auth methods + authMethod = _config.authMethods["bearerAuth"] + if (authMethod?.applySecurityAuthentication) { + await authMethod?.applySecurityAuthentication(requestContext); + } + + const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default + if (defaultAuth?.applySecurityAuthentication) { + await defaultAuth?.applySecurityAuthentication(requestContext); + } + + return requestContext; + } + + /** + * Deletes a scheduled job. Version: 9.4.0.cl or later Deletes a scheduled Liveboard job. Requires at least edit access to Liveboard or `ADMINISTRATION` (**Can administer Org**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `JOBSCHEDULING` (**Can schedule for others**) privilege is required. + * @param scheduleIdentifier Unique ID or name of the scheduled job. + */ + public async deleteSchedule(scheduleIdentifier: string, _options?: Configuration): Promise { + let _config = _options || this.configuration; + + // verify required parameter 'scheduleIdentifier' is not null or undefined + if (scheduleIdentifier === null || scheduleIdentifier === undefined) { + throw new RequiredError("ThoughtSpotRestApi", "deleteSchedule", "scheduleIdentifier"); + } + + + // Path Params + const localVarPath = '/api/rest/2.0/schedules/{schedule_identifier}/delete' + .replace('{' + 'schedule_identifier' + '}', encodeURIComponent(String(scheduleIdentifier))); + + // Make Request Context + const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.POST); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.25.0") + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.25.0") + + + + + let authMethod: SecurityAuthentication | undefined; + // Apply auth methods + authMethod = _config.authMethods["bearerAuth"] + if (authMethod?.applySecurityAuthentication) { + await authMethod?.applySecurityAuthentication(requestContext); + } + + const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default + if (defaultAuth?.applySecurityAuthentication) { + await defaultAuth?.applySecurityAuthentication(requestContext); + } + + return requestContext; + } + + /** + * Version: 9.0.0.cl or later Deletes a tag object from the ThoughtSpot system Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `TAGMANAGEMENT` (**Can manage tags**) privilege is required to create, edit, and delete tags. + * @param tagIdentifier Tag identifier Tag name or Tag id. + */ + public async deleteTag(tagIdentifier: string, _options?: Configuration): Promise { + let _config = _options || this.configuration; + + // verify required parameter 'tagIdentifier' is not null or undefined + if (tagIdentifier === null || tagIdentifier === undefined) { + throw new RequiredError("ThoughtSpotRestApi", "deleteTag", "tagIdentifier"); + } + + + // Path Params + const localVarPath = '/api/rest/2.0/tags/{tag_identifier}/delete' + .replace('{' + 'tag_identifier' + '}', encodeURIComponent(String(tagIdentifier))); + + // Make Request Context + const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.POST); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.25.0") + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.25.0") + + + + + let authMethod: SecurityAuthentication | undefined; + // Apply auth methods + authMethod = _config.authMethods["bearerAuth"] + if (authMethod?.applySecurityAuthentication) { + await authMethod?.applySecurityAuthentication(requestContext); + } + + const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default + if (defaultAuth?.applySecurityAuthentication) { + await defaultAuth?.applySecurityAuthentication(requestContext); + } + + return requestContext; + } + + /** + * Version: 9.0.0.cl or later Deletes a user from the ThoughtSpot system. If you want to remove a user from a specific Org but not from ThoughtSpot, update the group and Org mapping properties of the user object via a POST API call to the [/api/rest/2.0/users/{user_identifier}/update](#/http/api-endpoints/users/update-user) endpoint. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `USER_ADMINISTRATION` (**Can manage users**) privilege is required. + * @param userIdentifier GUID / name of the user + */ + public async deleteUser(userIdentifier: string, _options?: Configuration): Promise { + let _config = _options || this.configuration; + + // verify required parameter 'userIdentifier' is not null or undefined + if (userIdentifier === null || userIdentifier === undefined) { + throw new RequiredError("ThoughtSpotRestApi", "deleteUser", "userIdentifier"); + } + + + // Path Params + const localVarPath = '/api/rest/2.0/users/{user_identifier}/delete' + .replace('{' + 'user_identifier' + '}', encodeURIComponent(String(userIdentifier))); + + // Make Request Context + const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.POST); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.25.0") + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.25.0") + + + + + let authMethod: SecurityAuthentication | undefined; + // Apply auth methods + authMethod = _config.authMethods["bearerAuth"] + if (authMethod?.applySecurityAuthentication) { + await authMethod?.applySecurityAuthentication(requestContext); + } + + const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default + if (defaultAuth?.applySecurityAuthentication) { + await defaultAuth?.applySecurityAuthentication(requestContext); + } + + return requestContext; + } + + /** + * Version: 9.0.0.cl or later Removes the specified group object from the ThoughtSpot system. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `GROUP_ADMINISTRATION` (**Can manage groups**) privilege is required. + * @param groupIdentifier GUID or name of the group. + */ + public async deleteUserGroup(groupIdentifier: string, _options?: Configuration): Promise { + let _config = _options || this.configuration; + + // verify required parameter 'groupIdentifier' is not null or undefined + if (groupIdentifier === null || groupIdentifier === undefined) { + throw new RequiredError("ThoughtSpotRestApi", "deleteUserGroup", "groupIdentifier"); + } + + + // Path Params + const localVarPath = '/api/rest/2.0/groups/{group_identifier}/delete' + .replace('{' + 'group_identifier' + '}', encodeURIComponent(String(groupIdentifier))); + + // Make Request Context + const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.POST); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.25.0") + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.25.0") + + + + + let authMethod: SecurityAuthentication | undefined; + // Apply auth methods + authMethod = _config.authMethods["bearerAuth"] + if (authMethod?.applySecurityAuthentication) { + await authMethod?.applySecurityAuthentication(requestContext); + } + + const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default + if (defaultAuth?.applySecurityAuthentication) { + await defaultAuth?.applySecurityAuthentication(requestContext); + } + + return requestContext; + } + + /** + * Delete a variable Version: 10.14.0.cl or later **Note:** This API endpoint is deprecated and will be removed from ThoughtSpot in a future release. Use [POST /api/rest/2.0/template/variables/delete](/api/rest/2.0/template/variables/delete) instead. Allows deleting a variable from ThoughtSpot. Requires ADMINISTRATION role and TENANT scope. The CAN_MANAGE_VARIABLES permission allows you to manage Formula Variables in the current organization scope. The API endpoint requires: * The variable identifier (ID or name) The operation will fail if: * The user lacks required permissions * The variable doesn\'t exist * The variable is being used by other objects + * @param identifier Unique id or name of the variable + */ + public async deleteVariable(identifier: string, _options?: Configuration): Promise { + let _config = _options || this.configuration; + + // verify required parameter 'identifier' is not null or undefined + if (identifier === null || identifier === undefined) { + throw new RequiredError("ThoughtSpotRestApi", "deleteVariable", "identifier"); + } + + + // Path Params + const localVarPath = '/api/rest/2.0/template/variables/{identifier}/delete' + .replace('{' + 'identifier' + '}', encodeURIComponent(String(identifier))); + + // Make Request Context + const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.POST); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.25.0") + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.25.0") + + + + + let authMethod: SecurityAuthentication | undefined; + // Apply auth methods + authMethod = _config.authMethods["bearerAuth"] + if (authMethod?.applySecurityAuthentication) { + await authMethod?.applySecurityAuthentication(requestContext); + } + + const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default + if (defaultAuth?.applySecurityAuthentication) { + await defaultAuth?.applySecurityAuthentication(requestContext); + } + + return requestContext; + } + + /** + * Delete variable(s) Version: 26.4.0.cl or later Allows deleting multiple variables from ThoughtSpot. Requires ADMINISTRATION role and TENANT scope. The CAN_MANAGE_VARIABLES permission allows you to manage Formula Variables in the current organization scope. The API endpoint requires: * The variable identifiers (IDs or names) The operation will fail if: * The user lacks required permissions * Any of the variables don\'t exist * Any of the variables are being used by other objects + * @param deleteVariablesRequest + */ + public async deleteVariables(deleteVariablesRequest: DeleteVariablesRequest, _options?: Configuration): Promise { + let _config = _options || this.configuration; + + // verify required parameter 'deleteVariablesRequest' is not null or undefined + if (deleteVariablesRequest === null || deleteVariablesRequest === undefined) { + throw new RequiredError("ThoughtSpotRestApi", "deleteVariables", "deleteVariablesRequest"); + } + + + // Path Params + const localVarPath = '/api/rest/2.0/template/variables/delete'; + + // Make Request Context + const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.POST); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.25.0") + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.25.0") + + + + + // Body Params + const contentType = ObjectSerializer.getPreferredMediaType([ + "application/json" + ]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = ObjectSerializer.stringify( + ObjectSerializer.serialize(deleteVariablesRequest, "DeleteVariablesRequest", ""), + contentType + ); + requestContext.setBody(serializedBody); + + let authMethod: SecurityAuthentication | undefined; + // Apply auth methods + authMethod = _config.authMethods["bearerAuth"] + if (authMethod?.applySecurityAuthentication) { + await authMethod?.applySecurityAuthentication(requestContext); + } + + const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default + if (defaultAuth?.applySecurityAuthentication) { + await defaultAuth?.applySecurityAuthentication(requestContext); + } + + return requestContext; + } + + /** + * Version: 10.14.0.cl or later Deletes one or more webhook configurations by their unique id or name. Returns status of each deletion operation, including successfully deleted webhooks and any failures with error details. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) or `DEVELOPER` (**Has developer privilege**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, users with `CAN_MANAGE_WEBHOOKS` (**Can manage webhooks**) privilege are also authorized to perform this action. + * @param deleteWebhookConfigurationsRequest + */ + public async deleteWebhookConfigurations(deleteWebhookConfigurationsRequest: DeleteWebhookConfigurationsRequest, _options?: Configuration): Promise { + let _config = _options || this.configuration; + + // verify required parameter 'deleteWebhookConfigurationsRequest' is not null or undefined + if (deleteWebhookConfigurationsRequest === null || deleteWebhookConfigurationsRequest === undefined) { + throw new RequiredError("ThoughtSpotRestApi", "deleteWebhookConfigurations", "deleteWebhookConfigurationsRequest"); + } + + + // Path Params + const localVarPath = '/api/rest/2.0/webhooks/delete'; + + // Make Request Context + const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.POST); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.25.0") + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.25.0") + + + + + // Body Params + const contentType = ObjectSerializer.getPreferredMediaType([ + "application/json" + ]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = ObjectSerializer.stringify( + ObjectSerializer.serialize(deleteWebhookConfigurationsRequest, "DeleteWebhookConfigurationsRequest", ""), + contentType + ); + requestContext.setBody(serializedBody); + + let authMethod: SecurityAuthentication | undefined; + // Apply auth methods + authMethod = _config.authMethods["bearerAuth"] + if (authMethod?.applySecurityAuthentication) { + await authMethod?.applySecurityAuthentication(requestContext); + } + + const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default + if (defaultAuth?.applySecurityAuthentication) { + await defaultAuth?.applySecurityAuthentication(requestContext); + } + + return requestContext; + } + + /** + * Version: 9.2.0.cl or later Allows you to deploy a commit and publish TML content to your ThoughtSpot instance. Requires at least edit access to the objects used in the deploy operation. The API deploys the head of the branch unless a `commit_id` is specified in the API request. If the branch name is not defined in the request, the default branch is considered for deploying commits. For more information, see [Git integration documentation](https://developers.thoughtspot.com/docs/git-integration). + * @param deployCommitRequest + */ + public async deployCommit(deployCommitRequest: DeployCommitRequest, _options?: Configuration): Promise { + let _config = _options || this.configuration; + + // verify required parameter 'deployCommitRequest' is not null or undefined + if (deployCommitRequest === null || deployCommitRequest === undefined) { + throw new RequiredError("ThoughtSpotRestApi", "deployCommit", "deployCommitRequest"); + } + + + // Path Params + const localVarPath = '/api/rest/2.0/vcs/git/commits/deploy'; + + // Make Request Context + const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.POST); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.25.0") + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.25.0") + + + + + // Body Params + const contentType = ObjectSerializer.getPreferredMediaType([ + "application/json" + ]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = ObjectSerializer.stringify( + ObjectSerializer.serialize(deployCommitRequest, "DeployCommitRequest", ""), + contentType + ); + requestContext.setBody(serializedBody); + + let authMethod: SecurityAuthentication | undefined; + // Apply auth methods + authMethod = _config.authMethods["bearerAuth"] + if (authMethod?.applySecurityAuthentication) { + await authMethod?.applySecurityAuthentication(requestContext); + } + + const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default + if (defaultAuth?.applySecurityAuthentication) { + await defaultAuth?.applySecurityAuthentication(requestContext); + } + + return requestContext; + } + + /** + * Version: 9.9.0.cl or later Exports the difference in connection metadata between CDW and ThoughtSpot Requires `DATAMANAGEMENT` (**Can manage data**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the following Data control privileges may be required: - `CAN_MANAGE_CUSTOM_CALENDAR`(**Can manage custom calendars**) - `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) - `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` (**Can manage data models**) To download the connection metadata difference between ThoughtSpot and CDW, pass the connection GUID as `connection_identifier` in the API request. + * @param connectionIdentifier GUID of the connection + */ + public async downloadConnectionMetadataChanges(connectionIdentifier: string, _options?: Configuration): Promise { + let _config = _options || this.configuration; + + // verify required parameter 'connectionIdentifier' is not null or undefined + if (connectionIdentifier === null || connectionIdentifier === undefined) { + throw new RequiredError("ThoughtSpotRestApi", "downloadConnectionMetadataChanges", "connectionIdentifier"); + } + + + // Path Params + const localVarPath = '/api/rest/2.0/connections/download-connection-metadata-changes/{connection_identifier}' + .replace('{' + 'connection_identifier' + '}', encodeURIComponent(String(connectionIdentifier))); + + // Make Request Context + const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.POST); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.25.0") + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.25.0") + + + + + let authMethod: SecurityAuthentication | undefined; + // Apply auth methods + authMethod = _config.authMethods["bearerAuth"] + if (authMethod?.applySecurityAuthentication) { + await authMethod?.applySecurityAuthentication(requestContext); + } + + const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default + if (defaultAuth?.applySecurityAuthentication) { + await defaultAuth?.applySecurityAuthentication(requestContext); + } + + return requestContext; + } + + /** + * Version: 9.0.0.cl or later Exports an Answer in the given file format. You can download the Answer data as a PDF, PNG, CSV, or XLSX file. Requires at least view access to the Answer. #### Usage guidelines In the request body, specify the GUID or name of the Answer and set `file_format`. The default file format is CSV. Use the `type` parameter to specify whether the Answer being exported is a saved Answer (`SAVED`) or a pinned Answer on a Liveboard (`PINNED`). Defaults to `SAVED`. When using `PINNED`, the `metadata_identifier` must be the container id. **NOTE**: * The downloadable file returned in API response file is extensionless. Please rename the downloaded file by typing in the relevant extension. * HTML rendering is not supported for PDF exports of Answers with tables. Optionally, you can define [runtime overrides](https://developers.thoughtspot.com/docs/fetch-data-and-report-apis#_runtime_overrides) to apply to the Answer data. + * @param exportAnswerReportRequest + */ + public async exportAnswerReport(exportAnswerReportRequest: ExportAnswerReportRequest, _options?: Configuration): Promise { + let _config = _options || this.configuration; + + // verify required parameter 'exportAnswerReportRequest' is not null or undefined + if (exportAnswerReportRequest === null || exportAnswerReportRequest === undefined) { + throw new RequiredError("ThoughtSpotRestApi", "exportAnswerReport", "exportAnswerReportRequest"); + } + + + // Path Params + const localVarPath = '/api/rest/2.0/report/answer'; + + // Make Request Context + const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.POST); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.25.0") + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.25.0") + + + + + // Body Params + const contentType = ObjectSerializer.getPreferredMediaType([ + "application/json" + ]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = ObjectSerializer.stringify( + ObjectSerializer.serialize(exportAnswerReportRequest, "ExportAnswerReportRequest", ""), + contentType + ); + requestContext.setBody(serializedBody); + + let authMethod: SecurityAuthentication | undefined; + // Apply auth methods + authMethod = _config.authMethods["bearerAuth"] + if (authMethod?.applySecurityAuthentication) { + await authMethod?.applySecurityAuthentication(requestContext); + } + + const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default + if (defaultAuth?.applySecurityAuthentication) { + await defaultAuth?.applySecurityAuthentication(requestContext); + } + + return requestContext; + } + + /** + * Version: 9.0.0.cl or later Exports a Liveboard and its visualizations in PDF, PNG, CSV, or XLSX file format. The default `file_format` is CSV. Requires at least view access to the Liveboard. #### Usage guidelines In the request body, specify the GUID or name of the Liveboard. To generate a Liveboard report with specific visualizations, add GUIDs or names of the visualizations. **NOTE**: * The downloadable file returned in API response file is extensionless. Please rename the downloaded file by typing in the relevant extension. * Optionally, you can define [runtime overrides](https://developers.thoughtspot.com/docs/fetch-data-and-report-apis#_runtime_overrides) to apply to the Answer data. * To include unsaved changes in the report, pass the `transient_pinboard_content` script generated from the `getExportRequestForCurrentPinboard` method in the Visual Embed SDK. Upon successful execution, the API returns the report with unsaved changes, including ad hoc changes to visualizations. For more information, see [Liveboard Report API](https://developers.thoughtspot.com/docs/fetch-data-and-report-apis#_liveboard_report_api). * Starting with ThoughtSpot Cloud 10.9.0.cl release, the Liveboard can be exported in the PNG format in the resolution of your choice. To enable this on your instance, contact ThoughtSpot support. When this feature is enabled, the options `include_cover_page`,`include_filter_page` within the `png_options` will not be available for PNG exports. * Starting with the ThoughtSpot Cloud 26.2.0.cl release, * Liveboards can be exported in CSV format. * All visualizations within a Liveboard can be exported as individual CSV files. * When exporting multiple visualizations or the entire Liveboard, the system returns the report as a compressed ZIP file containing the separate CSV files for each visualization. * Liveboards can also be exported in XLSX format. * All selected visualizations are consolidated into a single Excel workbook (.xlsx), with each visualization placed in its own worksheet (tab). * XLSX exports are limited to a maximum of 255 worksheets (tabs) per workbook. + * @param exportLiveboardReportRequest + */ + public async exportLiveboardReport(exportLiveboardReportRequest: ExportLiveboardReportRequest, _options?: Configuration): Promise { + let _config = _options || this.configuration; + + // verify required parameter 'exportLiveboardReportRequest' is not null or undefined + if (exportLiveboardReportRequest === null || exportLiveboardReportRequest === undefined) { + throw new RequiredError("ThoughtSpotRestApi", "exportLiveboardReport", "exportLiveboardReportRequest"); + } + + + // Path Params + const localVarPath = '/api/rest/2.0/report/liveboard'; + + // Make Request Context + const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.POST); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.25.0") + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.25.0") + + + + + // Body Params + const contentType = ObjectSerializer.getPreferredMediaType([ + "application/json" + ]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = ObjectSerializer.stringify( + ObjectSerializer.serialize(exportLiveboardReportRequest, "ExportLiveboardReportRequest", ""), + contentType + ); + requestContext.setBody(serializedBody); + + let authMethod: SecurityAuthentication | undefined; + // Apply auth methods + authMethod = _config.authMethods["bearerAuth"] + if (authMethod?.applySecurityAuthentication) { + await authMethod?.applySecurityAuthentication(requestContext); + } + + const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default + if (defaultAuth?.applySecurityAuthentication) { + await defaultAuth?.applySecurityAuthentication(requestContext); + } + + return requestContext; + } + + /** + * Version: 9.0.0.cl or later Exports the [TML](https://docs.thoughtspot.com/cloud/latest/tml) representation of metadata objects in JSON or YAML format. Requires `DATADOWNLOADING` (**Can download Data**) and at least view access to the metadata object. #### Usage guidelines * You can export one or several objects by passing metadata object GUIDs in the `metadata` array. * When exporting TML content for a Liveboard or Answer object, you can set `export_associated` to `true` to retrieve TML content for underlying Worksheets, Tables, or Views, including the GUID of each object within the headers. When `export_associated` is set to `true`, consider retrieving one metadata object at a time. * Set `export_fqns` to `true` to add FQNs of the referenced objects in the TML content. For example, if you send an API request to retrieve TML for a Liveboard and its associated objects, the API returns the TML content with FQNs of the referenced Worksheet. Exporting TML with FQNs is useful if ThoughtSpot has multiple objects with the same name and you want to eliminate ambiguity when importing TML files into ThoughtSpot. It eliminates the need for adding FQNs of the referenced objects manually during the import operation. * To export only the TML of feedbacks associated with an object, set the GUID of the object as `identifier`, and set the `type` as `FEEDBACK` in the `metadata` array. * To export the TML of an object along with the feedbacks associated with it, set the GUID of the object as `identifier`, set the `type` as `LOGIAL_TABLE` in the `metadata` array, and set `export_with_associated_feedbacks` in `export_options` to true. For more information, see [TML Documentation](https://developers.thoughtspot.com/docs/tml#_export_a_tml). For more information on feedbacks, see [Feedback Documentation](https://docs.thoughtspot.com/cloud/latest/sage-feedback). + * @param exportMetadataTMLRequest + */ + public async exportMetadataTML(exportMetadataTMLRequest: ExportMetadataTMLRequest, _options?: Configuration): Promise { + let _config = _options || this.configuration; + + // verify required parameter 'exportMetadataTMLRequest' is not null or undefined + if (exportMetadataTMLRequest === null || exportMetadataTMLRequest === undefined) { + throw new RequiredError("ThoughtSpotRestApi", "exportMetadataTML", "exportMetadataTMLRequest"); + } + + + // Path Params + const localVarPath = '/api/rest/2.0/metadata/tml/export'; + + // Make Request Context + const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.POST); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.25.0") + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.25.0") + + + + + // Body Params + const contentType = ObjectSerializer.getPreferredMediaType([ + "application/json" + ]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = ObjectSerializer.stringify( + ObjectSerializer.serialize(exportMetadataTMLRequest, "ExportMetadataTMLRequest", ""), + contentType + ); + requestContext.setBody(serializedBody); + + let authMethod: SecurityAuthentication | undefined; + // Apply auth methods + authMethod = _config.authMethods["bearerAuth"] + if (authMethod?.applySecurityAuthentication) { + await authMethod?.applySecurityAuthentication(requestContext); + } + + const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default + if (defaultAuth?.applySecurityAuthentication) { + await defaultAuth?.applySecurityAuthentication(requestContext); + } + + return requestContext; + } + + /** + * Version: 10.1.0.cl or later Exports the [TML](https://docs.thoughtspot.com/cloud/latest/tml) representation of metadata objects in JSON or YAML format. ### **Permissions Required** Requires `DATAMANAGEMENT` (**Can manage data**) and `USERMANAGEMENT` (**Can manage users**) privileges. #### **Usage Guidelines** This API is only applicable for `USER`, `GROUP`, and `ROLES` metadata types. - `batch_offset` Indicates the starting position within the complete dataset from which the API should begin returning objects. Useful for paginating results efficiently. - `batch_size` Specifies the number of objects or items to retrieve in a single request. Helps control response size for better performance. - `edoc_format` Defines the format of the TML content. The exported metadata can be in JSON or YAML format. - `export_dependent` Specifies whether to include dependent metadata objects in the export. Ensures related objects are also retrieved if needed. - `all_orgs_override` Indicates whether the export operation applies across all organizations. Useful for multi-tenant environments where cross-org exports are required. + * @param exportMetadataTMLBatchedRequest + */ + public async exportMetadataTMLBatched(exportMetadataTMLBatchedRequest: ExportMetadataTMLBatchedRequest, _options?: Configuration): Promise { + let _config = _options || this.configuration; + + // verify required parameter 'exportMetadataTMLBatchedRequest' is not null or undefined + if (exportMetadataTMLBatchedRequest === null || exportMetadataTMLBatchedRequest === undefined) { + throw new RequiredError("ThoughtSpotRestApi", "exportMetadataTMLBatched", "exportMetadataTMLBatchedRequest"); + } + + + // Path Params + const localVarPath = '/api/rest/2.0/metadata/tml/export/batch'; + + // Make Request Context + const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.POST); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.25.0") + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.25.0") + + + + + // Body Params + const contentType = ObjectSerializer.getPreferredMediaType([ + "application/json" + ]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = ObjectSerializer.stringify( + ObjectSerializer.serialize(exportMetadataTMLBatchedRequest, "ExportMetadataTMLBatchedRequest", ""), + contentType + ); + requestContext.setBody(serializedBody); + + let authMethod: SecurityAuthentication | undefined; + // Apply auth methods + authMethod = _config.authMethods["bearerAuth"] + if (authMethod?.applySecurityAuthentication) { + await authMethod?.applySecurityAuthentication(requestContext); + } + + const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default + if (defaultAuth?.applySecurityAuthentication) { + await defaultAuth?.applySecurityAuthentication(requestContext); + } + + return requestContext; + } + + /** + * Version: 9.0.0.cl or later Fetches data from a saved Answer. Requires at least view access to the saved Answer. The `record_size` attribute determines the number of records to retrieve in an API call. For more information about pagination, record size, and maximum row limit, see [Pagination and record size settings](https://developers.thoughtspot.com/docs/fetch-data-and-report-apis#_pagination_settings_for_data_and_report_apis). + * @param fetchAnswerDataRequest + */ + public async fetchAnswerData(fetchAnswerDataRequest: FetchAnswerDataRequest, _options?: Configuration): Promise { + let _config = _options || this.configuration; + + // verify required parameter 'fetchAnswerDataRequest' is not null or undefined + if (fetchAnswerDataRequest === null || fetchAnswerDataRequest === undefined) { + throw new RequiredError("ThoughtSpotRestApi", "fetchAnswerData", "fetchAnswerDataRequest"); + } + + + // Path Params + const localVarPath = '/api/rest/2.0/metadata/answer/data'; + + // Make Request Context + const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.POST); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.25.0") + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.25.0") + + + + + // Body Params + const contentType = ObjectSerializer.getPreferredMediaType([ + "application/json" + ]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = ObjectSerializer.stringify( + ObjectSerializer.serialize(fetchAnswerDataRequest, "FetchAnswerDataRequest", ""), + contentType + ); + requestContext.setBody(serializedBody); + + let authMethod: SecurityAuthentication | undefined; + // Apply auth methods + authMethod = _config.authMethods["bearerAuth"] + if (authMethod?.applySecurityAuthentication) { + await authMethod?.applySecurityAuthentication(requestContext); + } + + const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default + if (defaultAuth?.applySecurityAuthentication) { + await defaultAuth?.applySecurityAuthentication(requestContext); + } + + return requestContext; + } + + /** + * Version: 9.0.0.cl or later Fetches the underlying SQL query data for an Answer object. Requires at least view access to the Answer object. Upon successful execution, the API returns the SQL queries for the specified object as shown in this example: ``` { \"metadata_id\":\"8fbe44a8-46ad-4b16-8d39-184b2fada490\", \"metadata_name\":\"Total sales\", \"metadata_type\":\"ANSWER\", \"sql_queries\":[ { \"metadata_id\":\"8fbe44a8-46ad-4b16-8d39-184b2fada490\", \"metadata_name\":\"Total sales -test\", \"sql_query\":\"SELECT \\n \\\"ta_1\\\".\\\"REGION\\\" \\\"ca_1\\\", \\n \\\"ta_2\\\".\\\"PRODUCTNAME\\\" \\\"ca_2\\\", \\n \\\"ta_1\\\".\\\"STORENAME\\\" \\\"ca_3\\\", \\n CASE\\n WHEN sum(\\\"ta_3\\\".\\\"SALES\\\") IS NOT NULL THEN sum(\\\"ta_3\\\".\\\"SALES\\\")\\n ELSE 0\\n END \\\"ca_4\\\", \\n CASE\\n WHEN sum(\\\"ta_3\\\".\\\"QUANTITYPURCHASED\\\") IS NOT NULL THEN sum(\\\"ta_3\\\".\\\"QUANTITYPURCHASED\\\")\\n ELSE 0\\n END \\\"ca_5\\\"\\nFROM \\\"RETAILAPPAREL\\\".\\\"PUBLIC\\\".\\\"FACT_RETAPP_SALES\\\" \\\"ta_3\\\"\\n JOIN \\\"RETAILAPPAREL\\\".\\\"PUBLIC\\\".\\\"DIM_RETAPP_STORES\\\" \\\"ta_1\\\"\\n ON \\\"ta_3\\\".\\\"STOREID\\\" = \\\"ta_1\\\".\\\"STOREID\\\"\\n JOIN \\\"RETAILAPPAREL\\\".\\\"PUBLIC\\\".\\\"DIM_RETAPP_PRODUCTS\\\" \\\"ta_2\\\"\\n ON \\\"ta_3\\\".\\\"PRODUCTID\\\" = \\\"ta_2\\\".\\\"PRODUCTID\\\"\\nGROUP BY \\n \\\"ca_1\\\", \\n \\\"ca_2\\\", \\n \\\"ca_3\\\"\\n\" } ] } ``` + * @param fetchAnswerSqlQueryRequest + */ + public async fetchAnswerSqlQuery(fetchAnswerSqlQueryRequest: FetchAnswerSqlQueryRequest, _options?: Configuration): Promise { + let _config = _options || this.configuration; + + // verify required parameter 'fetchAnswerSqlQueryRequest' is not null or undefined + if (fetchAnswerSqlQueryRequest === null || fetchAnswerSqlQueryRequest === undefined) { + throw new RequiredError("ThoughtSpotRestApi", "fetchAnswerSqlQuery", "fetchAnswerSqlQueryRequest"); + } + + + // Path Params + const localVarPath = '/api/rest/2.0/metadata/answer/sql'; + + // Make Request Context + const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.POST); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.25.0") + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.25.0") + + + + + // Body Params + const contentType = ObjectSerializer.getPreferredMediaType([ + "application/json" + ]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = ObjectSerializer.stringify( + ObjectSerializer.serialize(fetchAnswerSqlQueryRequest, "FetchAnswerSqlQueryRequest", ""), + contentType + ); + requestContext.setBody(serializedBody); + + let authMethod: SecurityAuthentication | undefined; + // Apply auth methods + authMethod = _config.authMethods["bearerAuth"] + if (authMethod?.applySecurityAuthentication) { + await authMethod?.applySecurityAuthentication(requestContext); + } + + const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default + if (defaultAuth?.applySecurityAuthentication) { + await defaultAuth?.applySecurityAuthentication(requestContext); + } + + return requestContext; + } + + /** + * Version: 10.4.0.cl or later Gets information about the status of the TML async import task scheduled using the `/api/rest/2.0/metadata/tml/async/import` API call. To fetch the task details, specify the ID of the TML async import task. Requires access to the task ID. The API allows users who initiated the asynchronous TML import via `/api/rest/2.0/metadata/tml/async/import` to view the status of their tasks. Users with administration privilege can view the status of all import tasks initiated by the users in their Org. #### Usage guidelines See [TML API Documentation](https://developers.thoughtspot.com/docs/tml#_fetch_status_of_the_tml_import_task) for usage guidelines. + * @param fetchAsyncImportTaskStatusRequest + */ + public async fetchAsyncImportTaskStatus(fetchAsyncImportTaskStatusRequest: FetchAsyncImportTaskStatusRequest, _options?: Configuration): Promise { + let _config = _options || this.configuration; + + // verify required parameter 'fetchAsyncImportTaskStatusRequest' is not null or undefined + if (fetchAsyncImportTaskStatusRequest === null || fetchAsyncImportTaskStatusRequest === undefined) { + throw new RequiredError("ThoughtSpotRestApi", "fetchAsyncImportTaskStatus", "fetchAsyncImportTaskStatusRequest"); + } + + + // Path Params + const localVarPath = '/api/rest/2.0/metadata/tml/async/status'; + + // Make Request Context + const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.POST); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.25.0") + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.25.0") + + + + + // Body Params + const contentType = ObjectSerializer.getPreferredMediaType([ + "application/json" + ]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = ObjectSerializer.stringify( + ObjectSerializer.serialize(fetchAsyncImportTaskStatusRequest, "FetchAsyncImportTaskStatusRequest", ""), + contentType + ); + requestContext.setBody(serializedBody); + + let authMethod: SecurityAuthentication | undefined; + // Apply auth methods + authMethod = _config.authMethods["bearerAuth"] + if (authMethod?.applySecurityAuthentication) { + await authMethod?.applySecurityAuthentication(requestContext); + } + + const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default + if (defaultAuth?.applySecurityAuthentication) { + await defaultAuth?.applySecurityAuthentication(requestContext); + } + + return requestContext; + } + + /** + * Version: 10.12.0.cl or later Fetches column security rules for specified tables. This API endpoint retrieves column-level security rules configured for tables. It returns information about which columns are secured and which groups have access to those columns. #### Usage guidelines - Provide an array of table identifiers using either `identifier` (GUID or name) or `obj_identifier` (object ID) - At least one of `identifier` or `obj_identifier` must be provided for each table - The API returns column security rules for all specified tables - Users must have appropriate permissions to access security rules for the specified tables #### Required permissions - `ADMINISTRATION` - Can administer ThoughtSpot - `DATAMANAGEMENT` - Can manage data - `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` - Can manage worksheet views and tables #### Example request ```json { \"tables\": [ { \"identifier\": \"table-guid\", \"obj_identifier\": \"table-object-id\" } ] } ``` #### Response format The API returns an array of `ColumnSecurityRuleResponse` objects wrapped in a `data` field. Each `ColumnSecurityRuleResponse` object contains: - Table information (GUID and object ID) - Array of column security rules with column details, group access, and source table information #### Example response ```json { \"data\": [ { \"guid\": \"table-guid\", \"objId\": \"table-object-id\", \"columnSecurityRules\": [ { \"column\": { \"id\": \"col_123\", \"name\": \"Salary\" }, \"groups\": [ { \"id\": \"group_1\", \"name\": \"HR Department\" } ], \"sourceTableDetails\": { \"id\": \"source-table-guid\", \"name\": \"Employee_Data\" } } ] } ] } ``` + * @param fetchColumnSecurityRulesRequest + */ + public async fetchColumnSecurityRules(fetchColumnSecurityRulesRequest: FetchColumnSecurityRulesRequest, _options?: Configuration): Promise { + let _config = _options || this.configuration; + + // verify required parameter 'fetchColumnSecurityRulesRequest' is not null or undefined + if (fetchColumnSecurityRulesRequest === null || fetchColumnSecurityRulesRequest === undefined) { + throw new RequiredError("ThoughtSpotRestApi", "fetchColumnSecurityRules", "fetchColumnSecurityRulesRequest"); + } + + + // Path Params + const localVarPath = '/api/rest/2.0/security/column/rules/fetch'; + + // Make Request Context + const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.POST); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.25.0") + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.25.0") + + + + + // Body Params + const contentType = ObjectSerializer.getPreferredMediaType([ + "application/json" + ]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = ObjectSerializer.stringify( + ObjectSerializer.serialize(fetchColumnSecurityRulesRequest, "FetchColumnSecurityRulesRequest", ""), + contentType + ); + requestContext.setBody(serializedBody); + + let authMethod: SecurityAuthentication | undefined; + // Apply auth methods + authMethod = _config.authMethods["bearerAuth"] + if (authMethod?.applySecurityAuthentication) { + await authMethod?.applySecurityAuthentication(requestContext); + } + + const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default + if (defaultAuth?.applySecurityAuthentication) { + await defaultAuth?.applySecurityAuthentication(requestContext); + } + + return requestContext; + } + + /** + * Version: 9.9.0.cl or later Validates the difference in connection metadata between CDW and ThoughtSpot. Requires `DATAMANAGEMENT` (**Can manage data**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the following Data control privileges may be required: - `CAN_MANAGE_CUSTOM_CALENDAR`(**Can manage custom calendars**) - `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) - `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` (**Can manage data models**) Returns a boolean indicating whether there is any difference between the connection metadata at ThoughtSpot and CDW. To get the connection metadata difference status, pass the connection GUID as `connection_identifier` in the API request. + * @param connectionIdentifier GUID of the connection + */ + public async fetchConnectionDiffStatus(connectionIdentifier: string, _options?: Configuration): Promise { + let _config = _options || this.configuration; + + // verify required parameter 'connectionIdentifier' is not null or undefined + if (connectionIdentifier === null || connectionIdentifier === undefined) { + throw new RequiredError("ThoughtSpotRestApi", "fetchConnectionDiffStatus", "connectionIdentifier"); + } + + + // Path Params + const localVarPath = '/api/rest/2.0/connections/fetch-connection-diff-status/{connection_identifier}' + .replace('{' + 'connection_identifier' + '}', encodeURIComponent(String(connectionIdentifier))); + + // Make Request Context + const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.POST); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.25.0") + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.25.0") + + + + + let authMethod: SecurityAuthentication | undefined; + // Apply auth methods + authMethod = _config.authMethods["bearerAuth"] + if (authMethod?.applySecurityAuthentication) { + await authMethod?.applySecurityAuthentication(requestContext); + } + + const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default + if (defaultAuth?.applySecurityAuthentication) { + await defaultAuth?.applySecurityAuthentication(requestContext); + } + + return requestContext; + } + + /** + * Version: 9.0.0.cl or later Gets data from a Liveboard object and its visualization. Requires at least view access to the Liveboard. #### Usage guidelines In the request body, specify the GUID or name of the Liveboard. To get data for specific visualizations, add the GUIDs or names of the visualizations in the API request. To include unsaved changes in the report, pass the `transient_pinboard_content` script generated from the `getExportRequestForCurrentPinboard` method in the Visual Embed SDK. Upon successful execution, the API returns the report with unsaved changes. If the new Liveboard experience mode, the transient content includes ad hoc changes to visualizations such as sorting, toggling of legends, and data drill down. For more information, and see [Liveboard data API](https://developers.thoughtspot.com/docs/fetch-data-and-report-apis#_fetch_liveboard_data_api). + * @param fetchLiveboardDataRequest + */ + public async fetchLiveboardData(fetchLiveboardDataRequest: FetchLiveboardDataRequest, _options?: Configuration): Promise { + let _config = _options || this.configuration; + + // verify required parameter 'fetchLiveboardDataRequest' is not null or undefined + if (fetchLiveboardDataRequest === null || fetchLiveboardDataRequest === undefined) { + throw new RequiredError("ThoughtSpotRestApi", "fetchLiveboardData", "fetchLiveboardDataRequest"); + } + + + // Path Params + const localVarPath = '/api/rest/2.0/metadata/liveboard/data'; + + // Make Request Context + const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.POST); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.25.0") + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.25.0") + + + + + // Body Params + const contentType = ObjectSerializer.getPreferredMediaType([ + "application/json" + ]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = ObjectSerializer.stringify( + ObjectSerializer.serialize(fetchLiveboardDataRequest, "FetchLiveboardDataRequest", ""), + contentType + ); + requestContext.setBody(serializedBody); + + let authMethod: SecurityAuthentication | undefined; + // Apply auth methods + authMethod = _config.authMethods["bearerAuth"] + if (authMethod?.applySecurityAuthentication) { + await authMethod?.applySecurityAuthentication(requestContext); + } + + const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default + if (defaultAuth?.applySecurityAuthentication) { + await defaultAuth?.applySecurityAuthentication(requestContext); + } + + return requestContext; + } + + /** + * Version: 9.0.0.cl or later Fetches the underlying SQL query data for a Liveboard object and its visualizations. Requires at least view access to the Liveboard object. To get SQL query data for a Liveboard, specify the GUID of the Liveboard. Optionally, you can add an array of visualization GUIDs to retrieve the SQL query data for visualizations in the Liveboard. Upon successful execution, the API returns the SQL queries for the specified object as shown in this example: ``` { \"metadata_id\": \"fa68ae91-7588-4136-bacd-d71fb12dda69\", \"metadata_name\": \"Total Sales\", \"metadata_type\": \"LIVEBOARD\", \"sql_queries\": [ { \"metadata_id\": \"b3b6d2b9-089a-490c-8e16-b144650b7843\", \"metadata_name\": \"Total quantity purchased, Total sales by region\", \"sql_query\": \"SELECT \\n \\\"ta_1\\\".\\\"REGION\\\" \\\"ca_1\\\", \\n CASE\\n WHEN sum(\\\"ta_2\\\".\\\"QUANTITYPURCHASED\\\") IS NOT NULL THEN sum(\\\"ta_2\\\".\\\"QUANTITYPURCHASED\\\")\\n ELSE 0\\n END \\\"ca_2\\\", \\n CASE\\n WHEN sum(\\\"ta_2\\\".\\\"SALES\\\") IS NOT NULL THEN sum(\\\"ta_2\\\".\\\"SALES\\\")\\n ELSE 0\\n END \\\"ca_3\\\"\\nFROM \\\"RETAILAPPAREL\\\".\\\"PUBLIC\\\".\\\"FACT_RETAPP_SALES\\\" \\\"ta_2\\\"\\n JOIN \\\"RETAILAPPAREL\\\".\\\"PUBLIC\\\".\\\"DIM_RETAPP_STORES\\\" \\\"ta_1\\\"\\n ON \\\"ta_2\\\".\\\"STOREID\\\" = \\\"ta_1\\\".\\\"STOREID\\\"\\nGROUP BY \\\"ca_1\\\"\" } ] } ``` + * @param fetchLiveboardSqlQueryRequest + */ + public async fetchLiveboardSqlQuery(fetchLiveboardSqlQueryRequest: FetchLiveboardSqlQueryRequest, _options?: Configuration): Promise { + let _config = _options || this.configuration; + + // verify required parameter 'fetchLiveboardSqlQueryRequest' is not null or undefined + if (fetchLiveboardSqlQueryRequest === null || fetchLiveboardSqlQueryRequest === undefined) { + throw new RequiredError("ThoughtSpotRestApi", "fetchLiveboardSqlQuery", "fetchLiveboardSqlQueryRequest"); + } + + + // Path Params + const localVarPath = '/api/rest/2.0/metadata/liveboard/sql'; + + // Make Request Context + const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.POST); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.25.0") + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.25.0") + + + + + // Body Params + const contentType = ObjectSerializer.getPreferredMediaType([ + "application/json" + ]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = ObjectSerializer.stringify( + ObjectSerializer.serialize(fetchLiveboardSqlQueryRequest, "FetchLiveboardSqlQueryRequest", ""), + contentType + ); + requestContext.setBody(serializedBody); + + let authMethod: SecurityAuthentication | undefined; + // Apply auth methods + authMethod = _config.authMethods["bearerAuth"] + if (authMethod?.applySecurityAuthentication) { + await authMethod?.applySecurityAuthentication(requestContext); + } + + const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default + if (defaultAuth?.applySecurityAuthentication) { + await defaultAuth?.applySecurityAuthentication(requestContext); + } + + return requestContext; + } + + /** + * Version: 9.0.0.cl or later Fetches security audit logs. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the [Admin Control](https://developers.thoughtspot.com/docs/rbac#_admin_control) privileges are required. #### Usage guidelines By default, the API retrieves logs for the last 24 hours. You can set a custom duration in EPOCH time. Make sure the log duration specified in your API request doesn’t exceed 24 hours. If you must fetch logs for a longer time range, modify the duration and make multiple sequential API requests. Upon successful execution, the API returns logs with the following information: * timestamp of the event * event ID * event type * name and GUID of the user * IP address of ThoughtSpot instance For more information see [Audit logs Documentation](https://developers.thoughtspot.com/docs/audit-logs). + * @param fetchLogsRequest + */ + public async fetchLogs(fetchLogsRequest: FetchLogsRequest, _options?: Configuration): Promise { + let _config = _options || this.configuration; + + // verify required parameter 'fetchLogsRequest' is not null or undefined + if (fetchLogsRequest === null || fetchLogsRequest === undefined) { + throw new RequiredError("ThoughtSpotRestApi", "fetchLogs", "fetchLogsRequest"); + } + + + // Path Params + const localVarPath = '/api/rest/2.0/logs/fetch'; + + // Make Request Context + const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.POST); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.25.0") + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.25.0") + + + + + // Body Params + const contentType = ObjectSerializer.getPreferredMediaType([ + "application/json" + ]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = ObjectSerializer.stringify( + ObjectSerializer.serialize(fetchLogsRequest, "FetchLogsRequest", ""), + contentType + ); + requestContext.setBody(serializedBody); + + let authMethod: SecurityAuthentication | undefined; + // Apply auth methods + authMethod = _config.authMethods["bearerAuth"] + if (authMethod?.applySecurityAuthentication) { + await authMethod?.applySecurityAuthentication(requestContext); + } + + const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default + if (defaultAuth?.applySecurityAuthentication) { + await defaultAuth?.applySecurityAuthentication(requestContext); + } + + return requestContext; + } + + /** + * Version: 26.3.0.cl or later This API fetches the object privileges present for the given list of principals (user or group), on the given set of objects. It supports pagination, which can be enabled and configured using the request parameters. It provides users access to certain features based on privilege based access control. #### Usage guidelines - Specify the `type` (`USER` or `USER_GROUP`) and `identifier` (either GUID or name) of the principals for which you want to retrieve object privilege information in the `principals` array. - Specify the `type` (`LOGICAL_TABLE`) and `identifier` (either GUID or name) of the metadata objects for which you want to retrieve object privilege information in the `metadata` array. Only `LOGICAL_TABLE` metadata type is supported for now. It may be extended for other metadata types in future. - To control the offset from where principals have to be fetched, use `record_offset`. When `record_offset` is 0, information is fetched from the beginning. - To control the number of principals to be fetched, use `record_size`. Default `record_size` is 20. - Ensure `record_offset` for a subsequent request is one more than the value of `record_size` of the previous request. - Ensure using correct Authorization Bearer Token corresponding to specific user & org. #### Example request ```json { \"principals\": [ { \"type\": \"type-1\", \"identifier\": \"principal-guid-or-name-1\" }, { \"type\": \"type-2\", \"identifier\": \"principal-guid-or-name-2\" } ], \"metadata\": [ { \"type\": \"metadata-type-1\", \"identifier\": \"metadata-guid-or-name-1\" }, { \"type\": \"metadata-type-2\", \"identifier\": \"metadata-guid-or-name-2\" } ], \"record_offset\": 0, \"record_size\": 20 } ``` #### Response format The API returns an array of `metadata_object_privileges` objects wrapped in JSON. Each `metadata_object_privileges` object contains: - Metadata information (GUID, name and type) - Array of `principal_object_privilege_info`. - Each `principal_object_privilege_info` contains: - Principal type. All principals of this type are listed as described below. - Array of `principal_object_privileges`. - Each `principal_object_privileges` contains: - Principal information (GUID, name, subtype) - List of applied object level privileges. #### Example response ```json { \"metadata_object_privileges\": [ { \"metadata_id\": \"metadata-guid-1\", \"metadata_name\": \"metadata-name-1\", \"metadata_type\": \"metadata-type-1\", \"principal_object_privilege_info\": [ { \"principal_type\": \"principal-type-1\", \"principal_object_privileges\": [ { \"principal_id\": \"principal-guid-1\", \"principal_name\": \"principal-name-1\", \"principal_sub_type\": \"principal-sub-type-1\", \"object_privileges\": \"[object-privilege-1, object-privilege-2]\" }, { \"principal_id\": \"principal-guid-2\", \"principal_name\": \"principal-name-2\", \"principal_sub_type\": \"principal-sub-type-2\", \"object_privileges\": \"[object-privilege-1, object-privilege-2]\" } ] }, { \"principal_type\": \"principal-type-2\", \"principal_object_privileges\": [ { \"principal_id\": \"principal-guid-3\", \"principal_name\": \"principal-guid-4\", \"principal_sub_type\": \"principal-sub-type-4\", \"object_privileges\": \"[object-privilege-1]\" } ] } ] }, { \"metadata_id\": \"metadata-guid-2\", \"metadata_name\": \"metadata-name-2\", \"metadata_type\": \"metadata-type-2\", \"principal_object_privilege_info\": [ { \"principal_type\": \"principal-type-1\", \"principal_object_privileges\": [ { \"principal_id\": \"principal-guid-1\", \"principal_name\": \"principal-name-1\", \"principal_sub_type\": \"principal-sub-type-1\", \"object_privileges\": \"[object-privilege-3, object-privilege-4]\" }, { \"principal_id\": \"principal-guid-2\", \"principal_name\": \"principal-name-2\", \"principal_sub_type\": \"principal-sub-type-2\", \"object_privileges\": \"[object-privilege-4]\" } ] } ] } ] } ``` + * @param fetchObjectPrivilegesRequest + */ + public async fetchObjectPrivileges(fetchObjectPrivilegesRequest: FetchObjectPrivilegesRequest, _options?: Configuration): Promise { + let _config = _options || this.configuration; + + // verify required parameter 'fetchObjectPrivilegesRequest' is not null or undefined + if (fetchObjectPrivilegesRequest === null || fetchObjectPrivilegesRequest === undefined) { + throw new RequiredError("ThoughtSpotRestApi", "fetchObjectPrivileges", "fetchObjectPrivilegesRequest"); + } + + + // Path Params + const localVarPath = '/api/rest/2.0/security/metadata/fetch-object-privileges'; + + // Make Request Context + const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.POST); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.25.0") + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.25.0") + + + + + // Body Params + const contentType = ObjectSerializer.getPreferredMediaType([ + "application/json" + ]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = ObjectSerializer.stringify( + ObjectSerializer.serialize(fetchObjectPrivilegesRequest, "FetchObjectPrivilegesRequest", ""), + contentType + ); + requestContext.setBody(serializedBody); + + let authMethod: SecurityAuthentication | undefined; + // Apply auth methods + authMethod = _config.authMethods["bearerAuth"] + if (authMethod?.applySecurityAuthentication) { + await authMethod?.applySecurityAuthentication(requestContext); + } + + const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default + if (defaultAuth?.applySecurityAuthentication) { + await defaultAuth?.applySecurityAuthentication(requestContext); + } + + return requestContext; + } + + /** + * Version: 9.0.0.cl or later Fetches object permission details for a given principal object such as a user and group. Requires view access to the metadata object. #### Usage guidelines * To get a list of all metadata objects that a user or group can access, specify the `type` and GUID or name of the principal. * To get permission details for a specific object, add the `type` and GUID or name of the metadata object to your API request. Upon successful execution, the API returns a list of metadata objects and permission details for each object. + * @param fetchPermissionsOfPrincipalsRequest + */ + public async fetchPermissionsOfPrincipals(fetchPermissionsOfPrincipalsRequest: FetchPermissionsOfPrincipalsRequest, _options?: Configuration): Promise { + let _config = _options || this.configuration; + + // verify required parameter 'fetchPermissionsOfPrincipalsRequest' is not null or undefined + if (fetchPermissionsOfPrincipalsRequest === null || fetchPermissionsOfPrincipalsRequest === undefined) { + throw new RequiredError("ThoughtSpotRestApi", "fetchPermissionsOfPrincipals", "fetchPermissionsOfPrincipalsRequest"); + } + + + // Path Params + const localVarPath = '/api/rest/2.0/security/principals/fetch-permissions'; + + // Make Request Context + const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.POST); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.25.0") + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.25.0") + + + + + // Body Params + const contentType = ObjectSerializer.getPreferredMediaType([ + "application/json" + ]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = ObjectSerializer.stringify( + ObjectSerializer.serialize(fetchPermissionsOfPrincipalsRequest, "FetchPermissionsOfPrincipalsRequest", ""), + contentType + ); + requestContext.setBody(serializedBody); + + let authMethod: SecurityAuthentication | undefined; + // Apply auth methods + authMethod = _config.authMethods["bearerAuth"] + if (authMethod?.applySecurityAuthentication) { + await authMethod?.applySecurityAuthentication(requestContext); + } + + const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default + if (defaultAuth?.applySecurityAuthentication) { + await defaultAuth?.applySecurityAuthentication(requestContext); + } + + return requestContext; + } + + /** + * Version: 9.0.0.cl or later Fetches permission details for a given metadata object. Requires view access to the metadata object. #### Usage guidelines * To fetch a list of users and groups for a metadata object, specify `type` and GUID or name of the metadata object. * To get permission details for a specific user or group, add `type` and GUID or name of the principal object to your API request. Upon successful execution, the API returns permission details and principal information for the object specified in the API request. + * @param fetchPermissionsOnMetadataRequest + */ + public async fetchPermissionsOnMetadata(fetchPermissionsOnMetadataRequest: FetchPermissionsOnMetadataRequest, _options?: Configuration): Promise { + let _config = _options || this.configuration; + + // verify required parameter 'fetchPermissionsOnMetadataRequest' is not null or undefined + if (fetchPermissionsOnMetadataRequest === null || fetchPermissionsOnMetadataRequest === undefined) { + throw new RequiredError("ThoughtSpotRestApi", "fetchPermissionsOnMetadata", "fetchPermissionsOnMetadataRequest"); + } + + + // Path Params + const localVarPath = '/api/rest/2.0/security/metadata/fetch-permissions'; + + // Make Request Context + const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.POST); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.25.0") + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.25.0") + + + + + // Body Params + const contentType = ObjectSerializer.getPreferredMediaType([ + "application/json" + ]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = ObjectSerializer.stringify( + ObjectSerializer.serialize(fetchPermissionsOnMetadataRequest, "FetchPermissionsOnMetadataRequest", ""), + contentType + ); + requestContext.setBody(serializedBody); + + let authMethod: SecurityAuthentication | undefined; + // Apply auth methods + authMethod = _config.authMethods["bearerAuth"] + if (authMethod?.applySecurityAuthentication) { + await authMethod?.applySecurityAuthentication(requestContext); + } + + const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default + if (defaultAuth?.applySecurityAuthentication) { + await defaultAuth?.applySecurityAuthentication(requestContext); + } + + return requestContext; + } + + /** + * Version: 9.0.0.cl or later Enforces logout on current user sessions. Use this API with caution as it may invalidate active user sessions and force users to re-login. Make sure you specify the usernames or GUIDs. If you pass null values in the API call, all user sessions on your cluster become invalid, and the users are forced to re-login. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `USER_ADMINISTRATION` (**Can manage users**) privilege is required. + * @param forceLogoutUsersRequest + */ + public async forceLogoutUsers(forceLogoutUsersRequest: ForceLogoutUsersRequest, _options?: Configuration): Promise { + let _config = _options || this.configuration; + + // verify required parameter 'forceLogoutUsersRequest' is not null or undefined + if (forceLogoutUsersRequest === null || forceLogoutUsersRequest === undefined) { + throw new RequiredError("ThoughtSpotRestApi", "forceLogoutUsers", "forceLogoutUsersRequest"); + } + + + // Path Params + const localVarPath = '/api/rest/2.0/users/force-logout'; + + // Make Request Context + const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.POST); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.25.0") + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.25.0") + + + + + // Body Params + const contentType = ObjectSerializer.getPreferredMediaType([ + "application/json" + ]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = ObjectSerializer.stringify( + ObjectSerializer.serialize(forceLogoutUsersRequest, "ForceLogoutUsersRequest", ""), + contentType + ); + requestContext.setBody(serializedBody); + + let authMethod: SecurityAuthentication | undefined; + // Apply auth methods + authMethod = _config.authMethods["bearerAuth"] + if (authMethod?.applySecurityAuthentication) { + await authMethod?.applySecurityAuthentication(requestContext); + } + + const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default + if (defaultAuth?.applySecurityAuthentication) { + await defaultAuth?.applySecurityAuthentication(requestContext); + } + + return requestContext; + } + + /** + * Version: 10.12.0.cl or later Exports a [custom calendar](https://docs.thoughtspot.com/cloud/latest/connections-cust-cal) in the CSV format. Requires `DATAMANAGEMENT` (**Can manage data**) or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your ThoughtSpot instance, the `CAN_MANAGE_CUSTOM_CALENDAR` (**Can manage custom calendars**) privilege is required. #### Usage guidelines Use this API to download a custom calendar in the CSV file format. In your API request, specify the following parameters. * Start and end date of the calendar. For \"month offset\" calendars, the start date must match the month defined in the `month_offset` attribute. You can also specify optional parameters such as the starting day of the week and prefixes for the quarter and year labels. + * @param generateCSVRequest + */ + public async generateCSV(generateCSVRequest: GenerateCSVRequest, _options?: Configuration): Promise { + let _config = _options || this.configuration; + + // verify required parameter 'generateCSVRequest' is not null or undefined + if (generateCSVRequest === null || generateCSVRequest === undefined) { + throw new RequiredError("ThoughtSpotRestApi", "generateCSV", "generateCSVRequest"); + } + + + // Path Params + const localVarPath = '/api/rest/2.0/calendars/generate-csv'; + + // Make Request Context + const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.POST); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.25.0") + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.25.0") + + + + + // Body Params + const contentType = ObjectSerializer.getPreferredMediaType([ + "application/json" + ]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = ObjectSerializer.stringify( + ObjectSerializer.serialize(generateCSVRequest, "GenerateCSVRequest", ""), + contentType + ); + requestContext.setBody(serializedBody); + + let authMethod: SecurityAuthentication | undefined; + // Apply auth methods + authMethod = _config.authMethods["bearerAuth"] + if (authMethod?.applySecurityAuthentication) { + await authMethod?.applySecurityAuthentication(requestContext); + } + + const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default + if (defaultAuth?.applySecurityAuthentication) { + await defaultAuth?.applySecurityAuthentication(requestContext); + } + + return requestContext; + } + + /** + * Version: 9.0.0.cl or later Retrieves details of the current user session for the token provided in the request header. Any ThoughtSpot user can access this endpoint and send an API request. The data returned in the API response varies according to user\'s privilege and object access permissions. **NOTE**: In ThoughtSpot, users with cluster administration privileges can access all Orgs by default. However, unless the administrator is explicitly added to an Org, the Orgs list in the session information returned by the API will include only the Primary Org. To include other Orgs in the API response, you must explicitly add the administrator to each Org in the Admin settings page in the UI or via user REST API. + */ + public async getCurrentUserInfo(_options?: Configuration): Promise { + let _config = _options || this.configuration; + + // Path Params + const localVarPath = '/api/rest/2.0/auth/session/user'; + + // Make Request Context + const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.GET); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.25.0") + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.25.0") + + + + + let authMethod: SecurityAuthentication | undefined; + // Apply auth methods + authMethod = _config.authMethods["bearerAuth"] + if (authMethod?.applySecurityAuthentication) { + await authMethod?.applySecurityAuthentication(requestContext); + } + + const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default + if (defaultAuth?.applySecurityAuthentication) { + await defaultAuth?.applySecurityAuthentication(requestContext); + } + + return requestContext; + } + + /** + * Version: 9.4.0.cl or later Retrieves details of the current session token for the bearer token provided in the request header. This API endpoint does not create a new token. Instead, it returns details about the token, including the token string, creation time, expiration time, and the associated user. Use this endpoint to introspect your current session token, debug authentication issues, or when a frontend application needs session token details. Any ThoughtSpot user with a valid bearer token can access this endpoint and send an API request + */ + public async getCurrentUserToken(_options?: Configuration): Promise { + let _config = _options || this.configuration; + + // Path Params + const localVarPath = '/api/rest/2.0/auth/session/token'; + + // Make Request Context + const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.GET); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.25.0") + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.25.0") + + + + + let authMethod: SecurityAuthentication | undefined; + // Apply auth methods + authMethod = _config.authMethods["bearerAuth"] + if (authMethod?.applySecurityAuthentication) { + await authMethod?.applySecurityAuthentication(requestContext); + } + + const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default + if (defaultAuth?.applySecurityAuthentication) { + await defaultAuth?.applySecurityAuthentication(requestContext); + } + + return requestContext; + } + + /** + * Version: 10.4.0.cl or later Creates an authentication token that provides values for the formula variables in the Row Level Security (RLS) rules for a given user. Recommended for use cases that require Attribute-based access control (ABAC) via RLS. #### Required privileges To add a new user and assign privileges during auto-creation, the `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege is required. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled, the `CONTROL_TRUSTED_AUTH` (**Can Enable or Disable Trusted Authentication**) privilege and edit access to the data source are required. To configure formula variables for all Orgs on your instance or the Primary Org, cluster administration privileges are required. Org administrators can configure formula variables for their respective Orgs. If Role-Based Access Control (RBAC) is enabled, users with the `CAN_MANAGE_VARIABLES` (**Can manage variables**) role privilege can also create and manage variables for their Org context. #### Usage guidelines You can generate a token by providing a `username` and `password`, or by using a `secret_key`. To generate a `secret_key`, the administrator must enable [Trusted authentication](https://developers.thoughtspot.com/docs/trusted-auth-secret-key) in the **Develop** > **Customizations** > **Security Settings** page. **Note**: * When both `password` and `secret_key` are included in the API request, `password` takes precedence. * If [Multi-Factor Authentication (MFA)](https://docs.thoughtspot.com/cloud/latest/authentication-local-mfa) is enabled on your instance, the API login request with `username` and `password` returns an error. You can switch to token-based authentication with `secret_key` or contact ThoughtSpot Support for assistance. The token obtained from ThoughtSpot is valid for 5 minutes by default. You can configure the token expiration time as required. #### ABAC via RLS To implement ABAC via RLS and assign security entitlements to users during session creation, generate a token with custom variable values. The values set in the authentication token are applied to the formula variables referenced in RLS rules at the table level, which determines the data each user can access based on their entitlements. The variable values can be configured to persist for a specific set of Models in user sessions initiated with the token, allowing different RLS rules to be set for different data models. Once defined, the rules are added to the user\'s `variable_values` object, after which all sessions will use the persisted values. For more information, see [ABAC via tokens Documentation](https://developers.thoughtspot.com/docs/abac-via-rls-variables). ##### Formula variables Before defining variable values, ensure the variables are created and available on your instance. To create a formula variable, you can use the **Create variable** (`/api/rest/2.0/template/variables/create`) REST API endpoint, with the variable `type` set as `Formula_Variable` in the API request. The API doesn\'t support `\"persist_option\": \"RESET\"` and `\"persist_option\": \"NONE\"` when `variable_values` are defined in the request. If you are using `variable_values` for token generation, you must use other supported persist options such as `APPEND` or `REPLACE`. If you want to use `RESET` or `NONE`, do not pass any `variable_values`. In such cases, `variable_values` will remain unaffected. #### Supported objects The supported object type is `LOGICAL_TABLE`. When using `object_id` with `variable_values`, models are supported. #### Just-in-time provisioning For [just-in-time user creation and provisioning](https://developers.thoughtspot.com/docs/just-in-time-provisioning), specify the following attributes in the API request: * `auto_create` * `username` * `display_name` * `email` * `groups` Set `auto_create` to `true` if the username does not exist in ThoughtSpot. If the username already exists in ThoughtSpot and `auto_create` is set to `true`, user properties such as display name, email, Org and group entitlements will not be updated with new values. Setting `auto_create` to `true` does not create formula variables. Hence, this setting will not be applicable to `variable_values`. #### Important point to note All options in the token creation APIs that define user access to data in ThoughtSpot will take effect during token creation, not when the token is used for authentication. For example, `auto_create:true` will create the user when the authentication token is created. Persist options such as `APPEND` and `REPLACE` will persist `variable_values` on the user profile when the token is created. + * @param getCustomAccessTokenRequest + */ + public async getCustomAccessToken(getCustomAccessTokenRequest: GetCustomAccessTokenRequest, _options?: Configuration): Promise { + let _config = _options || this.configuration; + + // verify required parameter 'getCustomAccessTokenRequest' is not null or undefined + if (getCustomAccessTokenRequest === null || getCustomAccessTokenRequest === undefined) { + throw new RequiredError("ThoughtSpotRestApi", "getCustomAccessToken", "getCustomAccessTokenRequest"); + } + + + // Path Params + const localVarPath = '/api/rest/2.0/auth/token/custom'; + + // Make Request Context + const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.POST); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.25.0") + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.25.0") + + + + + // Body Params + const contentType = ObjectSerializer.getPreferredMediaType([ + "application/json" + ]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = ObjectSerializer.stringify( + ObjectSerializer.serialize(getCustomAccessTokenRequest, "GetCustomAccessTokenRequest", ""), + contentType + ); + requestContext.setBody(serializedBody); + + + const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default + if (defaultAuth?.applySecurityAuthentication) { + await defaultAuth?.applySecurityAuthentication(requestContext); + } + + return requestContext; + } + + /** + * Version: 10.15.0.cl or later Suggests the most relevant data sources for a given natural language query, ranked by confidence with LLM-generated reasoning. Requires `CAN_USE_SPOTTER` privilege and at least view-level access to the underlying metadata entities referenced in the response. #### Usage guidelines The request must include: - `query`: the natural language question to find relevant data sources for If the request is successful, the API returns a ranked list of suggested data sources, each containing: - `confidence`: a float score indicating the model\'s confidence in the relevance of the suggestion - `details`: metadata about the data source - `data_source_identifier`: the unique ID of the data source - `data_source_name`: the display name of the data source - `description`: a description of the data source - `reasoning`: LLM-generated rationale explaining why the data source was recommended #### Error responses | Code | Description | |------|--------------------------------------------------------------------------------------------------------------------------------------------| | 401 | Unauthorized — authentication token is missing, expired, or invalid. | | 403 | Forbidden — the authenticated user does not have `CAN_USE_SPOTTER` privilege or lacks view permission on the underlying metadata entities. | > ###### Note: > * This endpoint is currently in Beta. Breaking changes may be introduced before it is made Generally Available. > * This endpoint requires Spotter — please contact ThoughtSpot Support to enable Spotter on your cluster. + * @param getDataSourceSuggestionsRequest + */ + public async getDataSourceSuggestions(getDataSourceSuggestionsRequest: GetDataSourceSuggestionsRequest, _options?: Configuration): Promise { + let _config = _options || this.configuration; + + // verify required parameter 'getDataSourceSuggestionsRequest' is not null or undefined + if (getDataSourceSuggestionsRequest === null || getDataSourceSuggestionsRequest === undefined) { + throw new RequiredError("ThoughtSpotRestApi", "getDataSourceSuggestions", "getDataSourceSuggestionsRequest"); + } + + + // Path Params + const localVarPath = '/api/rest/2.0/ai/data-source-suggestions'; + + // Make Request Context + const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.POST); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.25.0") + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.25.0") + + + + + // Body Params + const contentType = ObjectSerializer.getPreferredMediaType([ + "application/json" + ]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = ObjectSerializer.stringify( + ObjectSerializer.serialize(getDataSourceSuggestionsRequest, "GetDataSourceSuggestionsRequest", ""), + contentType + ); + requestContext.setBody(serializedBody); + + let authMethod: SecurityAuthentication | undefined; + // Apply auth methods + authMethod = _config.authMethods["bearerAuth"] + if (authMethod?.applySecurityAuthentication) { + await authMethod?.applySecurityAuthentication(requestContext); + } + + const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default + if (defaultAuth?.applySecurityAuthentication) { + await defaultAuth?.applySecurityAuthentication(requestContext); + } + + return requestContext; + } + + /** + * Version: 9.0.0.cl or later Generates an authentication token for creating a full session in ThoughtSpot for a given user. Recommended for use cases that do not require Attribute-based access control (ABAC) via Row Level Security (RLS). #### Usage guidelines You can generate a token for a user by providing a `username` and `password`, or by using the `secret_key` generated for your instance. To generate a `secret_key`, the administrator must enable [Trusted authentication](https://developers.thoughtspot.com/docs/trusted-auth-secret-key) in the **Develop** > **Customizations** > **Security Settings** page. **Note**: * When both `password` and `secret_key` are included in the API request, `password` takes precedence. * If [Multi-Factor Authentication (MFA)](https://docs.thoughtspot.com/cloud/latest/authentication-local-mfa) is enabled on your instance, the API login request with `username` and `password` returns an error. You can switch to token-based authentication with `secret_key` or contact ThoughtSpot Support for assistance. The token obtained from ThoughtSpot is valid for 5 minutes by default. You can configure the token expiration time as required. #### Just-in-time provisioning For [just-in-time user creation and provisioning](https://developers.thoughtspot.com/docs/just-in-time-provisioning), specify the following attributes in the API request: * `auto_create` * `username` * `display_name` * `email` * `group_identifiers` Set `auto_create` to `true` if the username does not exist in ThoughtSpot. If the user already exists in ThoughtSpot and `auto_create` is set to `true`, user properties such as display name, email and group assignment will be updated. To add a new user and assign privileges during auto-creation, the `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege is required. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled, the `CONTROL_TRUSTED_AUTH` (**Can Enable or Disable Trusted Authentication**) privilege is required. #### Important point to note All options in the token creation APIs that define user access to data in ThoughtSpot will take effect during token creation, not when the token is used for authentication. For example, `auto_create:true` will create the user when the authentication token is created. + * @param getFullAccessTokenRequest + */ + public async getFullAccessToken(getFullAccessTokenRequest: GetFullAccessTokenRequest, _options?: Configuration): Promise { + let _config = _options || this.configuration; + + // verify required parameter 'getFullAccessTokenRequest' is not null or undefined + if (getFullAccessTokenRequest === null || getFullAccessTokenRequest === undefined) { + throw new RequiredError("ThoughtSpotRestApi", "getFullAccessToken", "getFullAccessTokenRequest"); + } + + + // Path Params + const localVarPath = '/api/rest/2.0/auth/token/full'; + + // Make Request Context + const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.POST); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.25.0") + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.25.0") + + + + + // Body Params + const contentType = ObjectSerializer.getPreferredMediaType([ + "application/json" + ]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = ObjectSerializer.stringify( + ObjectSerializer.serialize(getFullAccessTokenRequest, "GetFullAccessTokenRequest", ""), + contentType + ); + requestContext.setBody(serializedBody); + + + const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default + if (defaultAuth?.applySecurityAuthentication) { + await defaultAuth?.applySecurityAuthentication(requestContext); + } + + return requestContext; + } + + /** + * Version: 10.15.0.cl or later Retrieves existing natural language (NL) instructions configured for a specific data model. These instructions guide the AI system in understanding data context and generating more accurate responses. Requires `CAN_USE_SPOTTER` privilege, at least view access on the data model, and a bearer token corresponding to the org where the data model exists. #### Usage guidelines The request must include: - `data_source_identifier`: the unique ID of the data model to retrieve instructions for If the request is successful, the API returns: - `nl_instructions_info`: an array of instruction objects, each containing: - `instructions`: the configured text instructions for AI processing - `scope`: the scope of the instruction — currently only `GLOBAL` is supported #### Instructions scope - **GLOBAL**: Instructions that apply globally across the system on the given data-model (currently only global instructions are supported) #### Error responses | Code | Description | |------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| | 401 | Unauthorized — authentication token is missing, expired, or invalid. | | 403 | Forbidden — the authenticated user does not have `CAN_USE_SPOTTER` privilege, lacks view access on the data model, or the bearer token does not correspond to the org where the data model exists. | > ###### Note: > > - To use this API, the user needs at least view access on the data model, and must use the bearer token corresponding to the org where the data model exists. > - This endpoint is currently in Beta. Breaking changes may be introduced before the endpoint is made Generally Available. > - Available from version 10.15.0.cl and later. > - This endpoint requires Spotter — please contact ThoughtSpot Support to enable Spotter on your cluster. > - Use this API to review currently configured instructions before modifying them with `setNLInstructions`. + * @param getNLInstructionsRequest + */ + public async getNLInstructions(getNLInstructionsRequest: GetNLInstructionsRequest, _options?: Configuration): Promise { + let _config = _options || this.configuration; + + // verify required parameter 'getNLInstructionsRequest' is not null or undefined + if (getNLInstructionsRequest === null || getNLInstructionsRequest === undefined) { + throw new RequiredError("ThoughtSpotRestApi", "getNLInstructions", "getNLInstructionsRequest"); + } + + + // Path Params + const localVarPath = '/api/rest/2.0/ai/instructions/get'; + + // Make Request Context + const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.POST); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.25.0") + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.25.0") + + + + + // Body Params + const contentType = ObjectSerializer.getPreferredMediaType([ + "application/json" + ]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = ObjectSerializer.stringify( + ObjectSerializer.serialize(getNLInstructionsRequest, "GetNLInstructionsRequest", ""), + contentType + ); + requestContext.setBody(serializedBody); + + let authMethod: SecurityAuthentication | undefined; + // Apply auth methods + authMethod = _config.authMethods["bearerAuth"] + if (authMethod?.applySecurityAuthentication) { + await authMethod?.applySecurityAuthentication(requestContext); + } + + const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default + if (defaultAuth?.applySecurityAuthentication) { + await defaultAuth?.applySecurityAuthentication(requestContext); + } + + return requestContext; + } + + /** + * Version: 9.0.0.cl or later Generates an authentication token that provides access to a specific metadata object. This object list is intersected with the list of objects the user is allowed to access via group membership. For more information, see [Object security](https://docs.thoughtspot.com/cloud/latest/security-data-object#object_security). #### Usage guidelines You can generate a token for a user by providing a `username` and `password`, or by using the `secret_key` generated for your instance. To generate a `secret_key`, the administrator must enable [Trusted authentication](https://developers.thoughtspot.com/docs/trusted-auth-secret-key) in the **Develop** > **Customizations** > **Security Settings** page. **Note**: * When both `password` and `secret_key` are included in the API request, `password` takes precedence. * If [Multi-Factor Authentication (MFA)](https://docs.thoughtspot.com/cloud/latest/authentication-local-mfa) is enabled on your instance, the API login request with `username` and `password` returns an error. You can switch to token-based authentication with `secret_key` or contact ThoughtSpot Support for assistance. The token obtained from ThoughtSpot is valid for 5 minutes by default. You can configure the token expiration time as required. #### Just-in-time provisioning For [just-in-time user creation and provisioning](https://developers.thoughtspot.com/docs/just-in-time-provisioning), specify the following attributes in the API request: * `auto_create` * `username` * `display_name` * `email` * `group_identifiers` Set `auto_create` to `true` if the user is not available in ThoughtSpot. If the user already exists in ThoughtSpot and the `auto_create` parameter is set to `true`, user properties such as display name, email, and group assignment will be updated. To add a new user and assign privileges, the `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege is required. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled, the `CONTROL_TRUSTED_AUTH`(**Can Enable or Disable Trusted Authentication**) privilege is required. #### Important point to note All options in the token creation APIs that define user access to data in ThoughtSpot will take effect during token creation, not when the token is used for authentication. For example, `auto_create:true` will create the user when the authentication token is created. + * @param getObjectAccessTokenRequest + */ + public async getObjectAccessToken(getObjectAccessTokenRequest: GetObjectAccessTokenRequest, _options?: Configuration): Promise { + let _config = _options || this.configuration; + + // verify required parameter 'getObjectAccessTokenRequest' is not null or undefined + if (getObjectAccessTokenRequest === null || getObjectAccessTokenRequest === undefined) { + throw new RequiredError("ThoughtSpotRestApi", "getObjectAccessToken", "getObjectAccessTokenRequest"); + } + + + // Path Params + const localVarPath = '/api/rest/2.0/auth/token/object'; + + // Make Request Context + const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.POST); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.25.0") + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.25.0") + + + + + // Body Params + const contentType = ObjectSerializer.getPreferredMediaType([ + "application/json" + ]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = ObjectSerializer.stringify( + ObjectSerializer.serialize(getObjectAccessTokenRequest, "GetObjectAccessTokenRequest", ""), + contentType + ); + requestContext.setBody(serializedBody); + + + const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default + if (defaultAuth?.applySecurityAuthentication) { + await defaultAuth?.applySecurityAuthentication(requestContext); + } + + return requestContext; + } + + /** + * Version: 10.13.0.cl or later Breaks down a natural language query into a series of smaller analytical sub-questions, each mapped to a relevant data source. Requires `CAN_USE_SPOTTER` privilege and at least view-level access to the referenced metadata objects. #### Usage guidelines The request must include: - `query`: the natural language question to decompose into analytical sub-questions - `metadata_context`: at least one of the following context identifiers to guide question generation: - `conversation_identifier` — an existing conversation session ID - `answer_identifiers` — a list of Answer GUIDs - `liveboard_identifiers` — a list of Liveboard GUIDs - `data_source_identifiers` — a list of data source GUIDs Optional parameters for refining the output: - `ai_context`: additional context to improve response quality - `content` — supplementary text or CSV data as string input - `instructions` — custom text instructions for the AI system - `limit_relevant_questions`: maximum number of questions to return (default: `5`) - `bypass_cache`: if `true`, forces fresh computation instead of returning cached results If the request is successful, the API returns a list of relevant analytical questions, each containing: - `query`: the generated sub-question - `data_source_identifier`: the unique ID of the data source the question targets - `data_source_name`: the display name of the corresponding data source #### Error responses | Code | Description | |------|---------------------------------------------------------------------------------------------------------------------------------------| | 401 | Unauthorized — authentication token is missing, expired, or invalid. | | 403 | Forbidden — the authenticated user does not have `CAN_USE_SPOTTER` privilege or lacks view access to the referenced metadata objects. | > ###### Note: > * This endpoint is currently in Beta. Breaking changes may be introduced before the endpoint is made Generally Available. > * This endpoint requires Spotter - please contact ThoughtSpot support to enable Spotter on your cluster. + * @param getRelevantQuestionsRequest + */ + public async getRelevantQuestions(getRelevantQuestionsRequest: GetRelevantQuestionsRequest, _options?: Configuration): Promise { + let _config = _options || this.configuration; + + // verify required parameter 'getRelevantQuestionsRequest' is not null or undefined + if (getRelevantQuestionsRequest === null || getRelevantQuestionsRequest === undefined) { + throw new RequiredError("ThoughtSpotRestApi", "getRelevantQuestions", "getRelevantQuestionsRequest"); + } + + + // Path Params + const localVarPath = '/api/rest/2.0/ai/relevant-questions/'; + + // Make Request Context + const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.POST); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.25.0") + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.25.0") + + + + + // Body Params + const contentType = ObjectSerializer.getPreferredMediaType([ + "application/json" + ]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = ObjectSerializer.stringify( + ObjectSerializer.serialize(getRelevantQuestionsRequest, "GetRelevantQuestionsRequest", ""), + contentType + ); + requestContext.setBody(serializedBody); + + let authMethod: SecurityAuthentication | undefined; + // Apply auth methods + authMethod = _config.authMethods["bearerAuth"] + if (authMethod?.applySecurityAuthentication) { + await authMethod?.applySecurityAuthentication(requestContext); + } + + const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default + if (defaultAuth?.applySecurityAuthentication) { + await defaultAuth?.applySecurityAuthentication(requestContext); + } + + return requestContext; + } + + /** + * Version: 9.0.0.cl or later Retrieves the current configuration details of the cluster. If the request is successful, the API returns a list configuration settings applied on the cluster. Requires `ADMINISTRATION`(**Can administer ThoughtSpot**) privilege to view these complete configuration settings of the cluster. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `SYSTEM_INFO_ADMINISTRATION` (**Can view system activities**) privilege is required. This API does not require any parameters to be passed in the request. + */ + public async getSystemConfig(_options?: Configuration): Promise { + let _config = _options || this.configuration; + + // Path Params + const localVarPath = '/api/rest/2.0/system/config'; + + // Make Request Context + const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.GET); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.25.0") + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.25.0") + + + + + let authMethod: SecurityAuthentication | undefined; + // Apply auth methods + authMethod = _config.authMethods["bearerAuth"] + if (authMethod?.applySecurityAuthentication) { + await authMethod?.applySecurityAuthentication(requestContext); + } + + const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default + if (defaultAuth?.applySecurityAuthentication) { + await defaultAuth?.applySecurityAuthentication(requestContext); + } + + return requestContext; + } + + /** + * Version: 9.0.0.cl or later Gets system information such as the release version, locale, time zone, deployment environment, date format, and date time format of the cluster. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privileges. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `SYSTEM_INFO_ADMINISTRATION` (**Can view system activities**) privilege is required. This API does not require any parameters to be passed in the request. + */ + public async getSystemInformation(_options?: Configuration): Promise { + let _config = _options || this.configuration; + + // Path Params + const localVarPath = '/api/rest/2.0/system'; + + // Make Request Context + const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.GET); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.25.0") + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.25.0") + + + + + let authMethod: SecurityAuthentication | undefined; + // Apply auth methods + authMethod = _config.authMethods["bearerAuth"] + if (authMethod?.applySecurityAuthentication) { + await authMethod?.applySecurityAuthentication(requestContext); + } + + const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default + if (defaultAuth?.applySecurityAuthentication) { + await defaultAuth?.applySecurityAuthentication(requestContext); + } + + return requestContext; + } + + /** + * Version: 9.2.0.cl or later Gets a list of configuration overrides applied on the cluster. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `APPLICATION_ADMINISTRATION` (**Can manage application settings**) privilege is required. This API does not require any parameters to be passed in the request. + */ + public async getSystemOverrideInfo(_options?: Configuration): Promise { + let _config = _options || this.configuration; + + // Path Params + const localVarPath = '/api/rest/2.0/system/config-overrides'; + + // Make Request Context + const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.GET); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.25.0") + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.25.0") + + + + + let authMethod: SecurityAuthentication | undefined; + // Apply auth methods + authMethod = _config.authMethods["bearerAuth"] + if (authMethod?.applySecurityAuthentication) { + await authMethod?.applySecurityAuthentication(requestContext); + } + + const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default + if (defaultAuth?.applySecurityAuthentication) { + await defaultAuth?.applySecurityAuthentication(requestContext); + } + + return requestContext; + } + + /** + * Version: 9.0.0.cl or later Imports [TML](https://docs.thoughtspot.com/cloud/latest/tml) files into ThoughtSpot. Requires `DATAMANAGEMENT` (**Can manage data**) or `ADMINISTRATION` (**Can administer ThoughtsSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the following Data control privileges may be required: - `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) - `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` (**Can manage data models**) #### Usage guidelines * Import all related objects in a single TML Import API call. For example, Tables that use the same Connection object and Worksheets connected to these Tables. * Include the `fqn` property to distinguish objects that have the same name. For example, if you have multiple Connections or Worksheets with the same name on ThoughtSpot and the Connection or Worksheet referenced in your TML file does not have a unique name to distinguish, it may result in invalid object references. Adding `fqn` helps ThoughtSpot differentiate a Table from another with the same name. We recommend [exporting TML with FQNs](#/http/api-endpoints/metadata/export-metadata-tml) and using these during the import operation. * You can upload multiple TML files at a time. If you import a Worksheet along with Liveboards, Answers, and other dependent objects in a single API call, the imported objects will be immediately available for use. When you import only a Worksheet object, it may take some time for the Worksheet to become available in the ThoughtSpot system. Please wait for a few minutes, and then proceed to create an Answer and Liveboard from the newly imported Worksheet. For more information, see [TML Documentation](https://developers.thoughtspot.com/docs/tml#_import_a_tml). + * @param importMetadataTMLRequest + */ + public async importMetadataTML(importMetadataTMLRequest: ImportMetadataTMLRequest, _options?: Configuration): Promise { + let _config = _options || this.configuration; + + // verify required parameter 'importMetadataTMLRequest' is not null or undefined + if (importMetadataTMLRequest === null || importMetadataTMLRequest === undefined) { + throw new RequiredError("ThoughtSpotRestApi", "importMetadataTML", "importMetadataTMLRequest"); + } + + + // Path Params + const localVarPath = '/api/rest/2.0/metadata/tml/import'; + + // Make Request Context + const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.POST); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.25.0") + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.25.0") + + + + + // Body Params + const contentType = ObjectSerializer.getPreferredMediaType([ + "application/json" + ]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = ObjectSerializer.stringify( + ObjectSerializer.serialize(importMetadataTMLRequest, "ImportMetadataTMLRequest", ""), + contentType + ); + requestContext.setBody(serializedBody); + + let authMethod: SecurityAuthentication | undefined; + // Apply auth methods + authMethod = _config.authMethods["bearerAuth"] + if (authMethod?.applySecurityAuthentication) { + await authMethod?.applySecurityAuthentication(requestContext); + } + + const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default + if (defaultAuth?.applySecurityAuthentication) { + await defaultAuth?.applySecurityAuthentication(requestContext); + } + + return requestContext; + } + + /** + * Version: 10.4.0.cl or later Schedules a task to import [TML](https://docs.thoughtspot.com/cloud/latest/tml) files into ThoughtSpot. You can use this API endpoint to process TML objects asynchronously when importing TMLs of large and complex metadata objects into ThoughtSpot. Unlike the synchronous import TML operation, the API processes TML data in the background and returns a task ID, which can be used to check the status of the import task via `/api/rest/2.0/metadata/tml/async/status` API endpoint. Requires `DATAMANAGEMENT` (**Can manage data**) or `ADMINISTRATION` (**Can administer ThoughtsSpot**) privilege, and edit access to the TML objects. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the following Data control privileges may be required: - `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) - `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` (**Can manage data models**) #### Usage guidelines See [Async TML API Documentation](https://developers.thoughtspot.com/docs/tml#_import_tml_objects_asynchronously) for usage guidelines. + * @param importMetadataTMLAsyncRequest + */ + public async importMetadataTMLAsync(importMetadataTMLAsyncRequest: ImportMetadataTMLAsyncRequest, _options?: Configuration): Promise { + let _config = _options || this.configuration; + + // verify required parameter 'importMetadataTMLAsyncRequest' is not null or undefined + if (importMetadataTMLAsyncRequest === null || importMetadataTMLAsyncRequest === undefined) { + throw new RequiredError("ThoughtSpotRestApi", "importMetadataTMLAsync", "importMetadataTMLAsyncRequest"); + } + + + // Path Params + const localVarPath = '/api/rest/2.0/metadata/tml/async/import'; + + // Make Request Context + const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.POST); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.25.0") + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.25.0") + + + + + // Body Params + const contentType = ObjectSerializer.getPreferredMediaType([ + "application/json" + ]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = ObjectSerializer.stringify( + ObjectSerializer.serialize(importMetadataTMLAsyncRequest, "ImportMetadataTMLAsyncRequest", ""), + contentType + ); + requestContext.setBody(serializedBody); + + let authMethod: SecurityAuthentication | undefined; + // Apply auth methods + authMethod = _config.authMethods["bearerAuth"] + if (authMethod?.applySecurityAuthentication) { + await authMethod?.applySecurityAuthentication(requestContext); + } + + const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default + if (defaultAuth?.applySecurityAuthentication) { + await defaultAuth?.applySecurityAuthentication(requestContext); + } + + return requestContext; + } + + /** + * Version: 9.0.0.cl or later Imports group objects from external databases into ThoughtSpot. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `GROUP_ADMINISTRATION` (**Can manage groups**) privilege is required. During the import operation: * If the specified group is not available in ThoughtSpot, it will be added to ThoughtSpot. * If `delete_unspecified_groups` is set to `true`, the groups not specified in the API request, excluding administrator and system user groups, are deleted. * If the specified groups are already available in ThoughtSpot, the object properties of these groups are modified and synchronized as per the input data in the API request. A successful API call returns the object that represents the changes made in the ThoughtSpot system. + * @param importUserGroupsRequest + */ + public async importUserGroups(importUserGroupsRequest: ImportUserGroupsRequest, _options?: Configuration): Promise { + let _config = _options || this.configuration; + + // verify required parameter 'importUserGroupsRequest' is not null or undefined + if (importUserGroupsRequest === null || importUserGroupsRequest === undefined) { + throw new RequiredError("ThoughtSpotRestApi", "importUserGroups", "importUserGroupsRequest"); + } + + + // Path Params + const localVarPath = '/api/rest/2.0/groups/import'; + + // Make Request Context + const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.POST); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.25.0") + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.25.0") + + + + + // Body Params + const contentType = ObjectSerializer.getPreferredMediaType([ + "application/json" + ]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = ObjectSerializer.stringify( + ObjectSerializer.serialize(importUserGroupsRequest, "ImportUserGroupsRequest", ""), + contentType + ); + requestContext.setBody(serializedBody); + + let authMethod: SecurityAuthentication | undefined; + // Apply auth methods + authMethod = _config.authMethods["bearerAuth"] + if (authMethod?.applySecurityAuthentication) { + await authMethod?.applySecurityAuthentication(requestContext); + } + + const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default + if (defaultAuth?.applySecurityAuthentication) { + await defaultAuth?.applySecurityAuthentication(requestContext); + } + + return requestContext; + } + + /** + * Version: 9.0.0.cl or later Imports user data from external databases into ThoughtSpot. During the user import operation: * If the specified users are not available in ThoughtSpot, the users are created and assigned a default password. Defining a `default_password` in the API request is optional. * If `delete_unspecified_users` is set to `true`, the users not specified in the API request, excluding the `tsadmin`, `guest`, `system` and `su` users, are deleted. * If the specified user objects are already available in ThoughtSpot, the object properties are updated and synchronized as per the input data in the API request. A successful API call returns the object that represents the changes made in the ThoughtSpot system. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `USER_ADMINISTRATION` (**Can manage users**) privilege is required. + * @param importUsersRequest + */ + public async importUsers(importUsersRequest: ImportUsersRequest, _options?: Configuration): Promise { + let _config = _options || this.configuration; + + // verify required parameter 'importUsersRequest' is not null or undefined + if (importUsersRequest === null || importUsersRequest === undefined) { + throw new RequiredError("ThoughtSpotRestApi", "importUsers", "importUsersRequest"); + } + + + // Path Params + const localVarPath = '/api/rest/2.0/users/import'; + + // Make Request Context + const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.POST); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.25.0") + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.25.0") + + + + + // Body Params + const contentType = ObjectSerializer.getPreferredMediaType([ + "application/json" + ]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = ObjectSerializer.stringify( + ObjectSerializer.serialize(importUsersRequest, "ImportUsersRequest", ""), + contentType + ); + requestContext.setBody(serializedBody); + + let authMethod: SecurityAuthentication | undefined; + // Apply auth methods + authMethod = _config.authMethods["bearerAuth"] + if (authMethod?.applySecurityAuthentication) { + await authMethod?.applySecurityAuthentication(requestContext); + } + + const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default + if (defaultAuth?.applySecurityAuthentication) { + await defaultAuth?.applySecurityAuthentication(requestContext); + } + + return requestContext; + } + + /** + * Version: 9.0.0.cl or later Creates a login session for a ThoughtSpot user with Basic authentication. In Basic authentication method, REST clients log in to ThoughtSpot using `username` and `password` attributes. On a multi-tenant cluster with Orgs, users can pass the ID of the Org in the API request to log in to a specific Org context. **Note**: If Multi-Factor Authentication (MFA) is enabled on your instance, the API login request with basic authentication (`username` and `password` ) returns an error. Contact ThoughtSpot Support for assistance. A successful login returns a session cookie that can be used in your subsequent API requests. + * @param loginRequest + */ + public async login(loginRequest: LoginRequest, _options?: Configuration): Promise { + let _config = _options || this.configuration; + + // verify required parameter 'loginRequest' is not null or undefined + if (loginRequest === null || loginRequest === undefined) { + throw new RequiredError("ThoughtSpotRestApi", "login", "loginRequest"); + } + + + // Path Params + const localVarPath = '/api/rest/2.0/auth/session/login'; + + // Make Request Context + const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.POST); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.25.0") + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.25.0") + + + + + // Body Params + const contentType = ObjectSerializer.getPreferredMediaType([ + "application/json" + ]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = ObjectSerializer.stringify( + ObjectSerializer.serialize(loginRequest, "LoginRequest", ""), + contentType + ); + requestContext.setBody(serializedBody); + + let authMethod: SecurityAuthentication | undefined; + // Apply auth methods + authMethod = _config.authMethods["bearerAuth"] + if (authMethod?.applySecurityAuthentication) { + await authMethod?.applySecurityAuthentication(requestContext); + } + + const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default + if (defaultAuth?.applySecurityAuthentication) { + await defaultAuth?.applySecurityAuthentication(requestContext); + } + + return requestContext; + } + + /** + * Version: 9.0.0.cl or later Logs out a user from their current session. + */ + public async logout(_options?: Configuration): Promise { + let _config = _options || this.configuration; + + // Path Params + const localVarPath = '/api/rest/2.0/auth/session/logout'; + + // Make Request Context + const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.POST); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.25.0") + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.25.0") + + + + + let authMethod: SecurityAuthentication | undefined; + // Apply auth methods + authMethod = _config.authMethods["bearerAuth"] + if (authMethod?.applySecurityAuthentication) { + await authMethod?.applySecurityAuthentication(requestContext); + } + + const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default + if (defaultAuth?.applySecurityAuthentication) { + await defaultAuth?.applySecurityAuthentication(requestContext); + } + + return requestContext; + } + + /** + * Version: 26.3.0.cl or later This API allows the addition or deletion of object level privileges for a set of users and groups, on a set of metadata objects. It provides users to access certain features based on privilege based access control. #### Usage guidelines - Specify the `operation`. The supported operations are: `ADD`, `REMOVE`. - Specify the type of the objects on which the object privileges are being provided in `metadata_type`. Only `LOGICAL_TABLE` metadata type is supported for now. It may be extended for other metadata types in future. - Specify the list of object privilege types in the `object_privilege_types` array. The supported object privilege types are: `SPOTTER_COACHING_PRIVILEGE`. - Specify the identifiers (either GUID or name) for the metadata objects in the `metadata_identifiers` array. - Specify the `type` (`USER` or `USER_GROUP`) and `identifier` (either GUID or name) of the principals to which you want to apply the given operation and given object privileges in the `principals` array. - Ensure using correct Authorization Bearer Token corresponding to specific user & org. #### Example request ```json { \"operation\": \"operation-type\", \"metadata_type\": \"metadata-type\", \"object_privilege_types\": [\"privilege-type-1\", \"privilege-type-2\"], \"metadata_identifiers\": [\"metadata-guid-or-name-1\", \"metadata-guid-or-name-1\"], \"principals\": [ { \"type\": \"type-1\", \"identifier\": \"principal-guid-or-name-1\" }, { \"type\": \"type-2\", \"identifier\": \"principal-guid-or-name-2\" } ] } ``` > ###### Note: > * Only admin users, users with edit access and users with coaching privilege on a given data-model can add or remove principals related to SPOTTER_COACHING_PRIVILEGE + * @param manageObjectPrivilegeRequest + */ + public async manageObjectPrivilege(manageObjectPrivilegeRequest: ManageObjectPrivilegeRequest, _options?: Configuration): Promise { + let _config = _options || this.configuration; + + // verify required parameter 'manageObjectPrivilegeRequest' is not null or undefined + if (manageObjectPrivilegeRequest === null || manageObjectPrivilegeRequest === undefined) { + throw new RequiredError("ThoughtSpotRestApi", "manageObjectPrivilege", "manageObjectPrivilegeRequest"); + } + + + // Path Params + const localVarPath = '/api/rest/2.0/security/metadata/manage-object-privilege'; + + // Make Request Context + const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.POST); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.25.0") + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.25.0") + + + + + // Body Params + const contentType = ObjectSerializer.getPreferredMediaType([ + "application/json" + ]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = ObjectSerializer.stringify( + ObjectSerializer.serialize(manageObjectPrivilegeRequest, "ManageObjectPrivilegeRequest", ""), + contentType + ); + requestContext.setBody(serializedBody); + + let authMethod: SecurityAuthentication | undefined; + // Apply auth methods + authMethod = _config.authMethods["bearerAuth"] + if (authMethod?.applySecurityAuthentication) { + await authMethod?.applySecurityAuthentication(requestContext); + } + + const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default + if (defaultAuth?.applySecurityAuthentication) { + await defaultAuth?.applySecurityAuthentication(requestContext); + } + + return requestContext; + } + + /** + * Parameterize fields in metadata objects. Version: 10.9.0.cl or later **Note:** This API endpoint is deprecated and will be removed from ThoughtSpot in a future release. Use [POST /api/rest/2.0/metadata/parameterize-fields](/api/rest/2.0/metadata/parameterize-fields) instead. Allows parameterizing fields in metadata objects in ThoughtSpot. Requires appropriate permissions to modify the metadata object. The API endpoint allows parameterizing the following types of metadata objects: * Logical Tables * Connections * Connection Configs For a Logical Table the field type must be `ATTRIBUTE` and field name can be one of: * databaseName * schemaName * tableName For a Connection or Connection Config, the field type is always `CONNECTION_PROPERTY`. In this case, field_name specifies the exact property of the Connection or Connection Config that needs to be parameterized. For Connection Config, the only supported field name is: * impersonate_user + * @param parameterizeMetadataRequest + */ + public async parameterizeMetadata(parameterizeMetadataRequest: ParameterizeMetadataRequest, _options?: Configuration): Promise { + let _config = _options || this.configuration; + + // verify required parameter 'parameterizeMetadataRequest' is not null or undefined + if (parameterizeMetadataRequest === null || parameterizeMetadataRequest === undefined) { + throw new RequiredError("ThoughtSpotRestApi", "parameterizeMetadata", "parameterizeMetadataRequest"); + } + + + // Path Params + const localVarPath = '/api/rest/2.0/metadata/parameterize'; + + // Make Request Context + const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.POST); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.25.0") + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.25.0") + + + + + // Body Params + const contentType = ObjectSerializer.getPreferredMediaType([ + "application/json" + ]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = ObjectSerializer.stringify( + ObjectSerializer.serialize(parameterizeMetadataRequest, "ParameterizeMetadataRequest", ""), + contentType + ); + requestContext.setBody(serializedBody); + + let authMethod: SecurityAuthentication | undefined; + // Apply auth methods + authMethod = _config.authMethods["bearerAuth"] + if (authMethod?.applySecurityAuthentication) { + await authMethod?.applySecurityAuthentication(requestContext); + } + + const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default + if (defaultAuth?.applySecurityAuthentication) { + await defaultAuth?.applySecurityAuthentication(requestContext); + } + + return requestContext; + } + + /** + * Parameterize multiple fields of metadata objects. For example [schemaName, databaseName] for LOGICAL_TABLE. Version: 26.5.0.cl or later Allows parameterizing multiple fields of metadata objects in ThoughtSpot. For example, you can parameterize [schemaName, databaseName] for LOGICAL_TABLE. Requires appropriate permissions to modify the metadata object. The API endpoint allows parameterizing the following types of metadata objects: * Logical Tables * Connections * Connection Configs For a Logical Table, the field type must be `ATTRIBUTE` and field names can include: * databaseName * schemaName * tableName For a Connection or Connection Config, the field type is always `CONNECTION_PROPERTY`. In this case, field_names specifies the exact properties of the Connection or Connection Config that need to be parameterized. For Connection Config, supported field names include: * impersonate_user You can parameterize multiple fields at once by providing an array of field names. + * @param parameterizeMetadataFieldsRequest + */ + public async parameterizeMetadataFields(parameterizeMetadataFieldsRequest: ParameterizeMetadataFieldsRequest, _options?: Configuration): Promise { + let _config = _options || this.configuration; + + // verify required parameter 'parameterizeMetadataFieldsRequest' is not null or undefined + if (parameterizeMetadataFieldsRequest === null || parameterizeMetadataFieldsRequest === undefined) { + throw new RequiredError("ThoughtSpotRestApi", "parameterizeMetadataFields", "parameterizeMetadataFieldsRequest"); + } + + + // Path Params + const localVarPath = '/api/rest/2.0/metadata/parameterize-fields'; + + // Make Request Context + const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.POST); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.25.0") + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.25.0") + + + + + // Body Params + const contentType = ObjectSerializer.getPreferredMediaType([ + "application/json" + ]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = ObjectSerializer.stringify( + ObjectSerializer.serialize(parameterizeMetadataFieldsRequest, "ParameterizeMetadataFieldsRequest", ""), + contentType + ); + requestContext.setBody(serializedBody); + + let authMethod: SecurityAuthentication | undefined; + // Apply auth methods + authMethod = _config.authMethods["bearerAuth"] + if (authMethod?.applySecurityAuthentication) { + await authMethod?.applySecurityAuthentication(requestContext); + } + + const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default + if (defaultAuth?.applySecurityAuthentication) { + await defaultAuth?.applySecurityAuthentication(requestContext); + } + + return requestContext; + } + + /** + * Version: 26.5.0.cl or later Allows publishing metadata objects across organizations in ThoughtSpot. Requires ADMINISTRATION role and TENANT scope. The API endpoint allows publishing the following types of metadata objects: * Liveboards * Answers * Logical Tables This API will essentially share the objects along with it\'s dependencies to the org admins of the orgs to which it is being published. + * @param publishMetadataRequest + */ + public async publishMetadata(publishMetadataRequest: PublishMetadataRequest, _options?: Configuration): Promise { + let _config = _options || this.configuration; + + // verify required parameter 'publishMetadataRequest' is not null or undefined + if (publishMetadataRequest === null || publishMetadataRequest === undefined) { + throw new RequiredError("ThoughtSpotRestApi", "publishMetadata", "publishMetadataRequest"); + } + + + // Path Params + const localVarPath = '/api/rest/2.0/security/metadata/publish'; + + // Make Request Context + const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.POST); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.25.0") + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.25.0") + + + + + // Body Params + const contentType = ObjectSerializer.getPreferredMediaType([ + "application/json" + ]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = ObjectSerializer.stringify( + ObjectSerializer.serialize(publishMetadataRequest, "PublishMetadataRequest", ""), + contentType + ); + requestContext.setBody(serializedBody); + + let authMethod: SecurityAuthentication | undefined; + // Apply auth methods + authMethod = _config.authMethods["bearerAuth"] + if (authMethod?.applySecurityAuthentication) { + await authMethod?.applySecurityAuthentication(requestContext); + } + + const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default + if (defaultAuth?.applySecurityAuthentication) { + await defaultAuth?.applySecurityAuthentication(requestContext); + } + + return requestContext; + } + + /** + * Update values for a variable Version: 26.4.0.cl or later Allows updating values for a specific variable in ThoughtSpot. Requires ADMINISTRATION role. The CAN_MANAGE_VARIABLES permission allows you to manage Formula Variables in the current organization scope. The API endpoint allows: * Adding new values to the variable * Replacing existing values * Deleting values from the variable * Resetting all values When updating variable values, you need to specify: * The variable identifier (ID or name) * The values to add/replace/remove * The operation to perform (ADD, REPLACE, REMOVE, RESET) Behaviour based on operation type: * ADD - Adds values to the variable if this is a list type variable, else same as replace. * REPLACE - Replaces all values of a given set of constraints with the current set of values. * REMOVE - Removes any values which match the set of conditions of the variables if this is a list type variable, else clears value. * RESET - Removes all constraints for the given variable, scope is ignored + * @param identifier Unique ID or name of the variable + * @param putVariableValuesRequest + */ + public async putVariableValues(identifier: string, putVariableValuesRequest: PutVariableValuesRequest, _options?: Configuration): Promise { + let _config = _options || this.configuration; + + // verify required parameter 'identifier' is not null or undefined + if (identifier === null || identifier === undefined) { + throw new RequiredError("ThoughtSpotRestApi", "putVariableValues", "identifier"); + } + + + // verify required parameter 'putVariableValuesRequest' is not null or undefined + if (putVariableValuesRequest === null || putVariableValuesRequest === undefined) { + throw new RequiredError("ThoughtSpotRestApi", "putVariableValues", "putVariableValuesRequest"); + } + + + // Path Params + const localVarPath = '/api/rest/2.0/template/variables/{identifier}/update-values' + .replace('{' + 'identifier' + '}', encodeURIComponent(String(identifier))); + + // Make Request Context + const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.POST); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.25.0") + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.25.0") + + + + + // Body Params + const contentType = ObjectSerializer.getPreferredMediaType([ + "application/json" + ]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = ObjectSerializer.stringify( + ObjectSerializer.serialize(putVariableValuesRequest, "PutVariableValuesRequest", ""), + contentType + ); + requestContext.setBody(serializedBody); + + let authMethod: SecurityAuthentication | undefined; + // Apply auth methods + authMethod = _config.authMethods["bearerAuth"] + if (authMethod?.applySecurityAuthentication) { + await authMethod?.applySecurityAuthentication(requestContext); + } + + const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default + if (defaultAuth?.applySecurityAuthentication) { + await defaultAuth?.applySecurityAuthentication(requestContext); + } + + return requestContext; + } + + /** + * Version: 10.7.0.cl or later **Deprecated** — Use `getRelevantQuestions` instead (available from 10.13.0.cl). Breaks down a topical or goal-oriented natural language question into smaller, actionable analytical sub-questions, each mapped to a relevant data source for independent execution. Requires `CAN_USE_SPOTTER` privilege and at least view-level access to the referenced metadata objects. #### Usage guidelines The request accepts the following parameters: - `nlsRequest`: contains the user `query` to decompose, along with optional `instructions` and `bypassCache` flag - `worksheetIds`: list of data source identifiers to scope the decomposition - `answerIds`: list of Answer GUIDs whose data guides the response - `liveboardIds`: list of Liveboard GUIDs whose data guides the response - `conversationId`: an existing conversation session ID for context continuity - `content`: supplementary text or CSV data to improve response quality - `maxDecomposedQueries`: maximum number of sub-questions to return (default: `5`) If the request is successful, the API returns a `decomposedQueryResponse` containing a list of `decomposedQueries`, each with: - `query`: the generated analytical sub-question - `worksheetId`: the unique ID of the data source the question targets - `worksheetName`: the display name of the corresponding data source #### Error responses | Code | Description | |------|---------------------------------------------------------------------------------------------------------------------------------------| | 401 | Unauthorized — authentication token is missing, expired, or invalid. | | 403 | Forbidden — the authenticated user does not have `CAN_USE_SPOTTER` privilege or lacks view access to the referenced metadata objects. | > ###### Note: > * This endpoint is deprecated since 10.13.0.cl. Use `getRelevantQuestions` for new integrations. > * This endpoint is currently in Beta. Breaking changes may be introduced before the endpoint is made Generally Available. > * This endpoint requires Spotter — please contact ThoughtSpot support to enable Spotter on your cluster. + * @param queryGetDecomposedQueryRequest + */ + public async queryGetDecomposedQuery(queryGetDecomposedQueryRequest: QueryGetDecomposedQueryRequest, _options?: Configuration): Promise { + let _config = _options || this.configuration; + + // verify required parameter 'queryGetDecomposedQueryRequest' is not null or undefined + if (queryGetDecomposedQueryRequest === null || queryGetDecomposedQueryRequest === undefined) { + throw new RequiredError("ThoughtSpotRestApi", "queryGetDecomposedQuery", "queryGetDecomposedQueryRequest"); + } + + + // Path Params + const localVarPath = '/api/rest/2.0/ai/analytical-questions'; + + // Make Request Context + const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.POST); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.25.0") + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.25.0") + + + + + // Body Params + const contentType = ObjectSerializer.getPreferredMediaType([ + "application/json" + ]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = ObjectSerializer.stringify( + ObjectSerializer.serialize(queryGetDecomposedQueryRequest, "QueryGetDecomposedQueryRequest", ""), + contentType + ); + requestContext.setBody(serializedBody); + + let authMethod: SecurityAuthentication | undefined; + // Apply auth methods + authMethod = _config.authMethods["bearerAuth"] + if (authMethod?.applySecurityAuthentication) { + await authMethod?.applySecurityAuthentication(requestContext); + } + + const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default + if (defaultAuth?.applySecurityAuthentication) { + await defaultAuth?.applySecurityAuthentication(requestContext); + } + + return requestContext; + } + + /** + * Version: 9.0.0.cl or later Resets the password of a user account. Administrators can reset password on behalf of a user. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `USER_ADMINISTRATION` (**Can manage users**) privilege is required. + * @param resetUserPasswordRequest + */ + public async resetUserPassword(resetUserPasswordRequest: ResetUserPasswordRequest, _options?: Configuration): Promise { + let _config = _options || this.configuration; + + // verify required parameter 'resetUserPasswordRequest' is not null or undefined + if (resetUserPasswordRequest === null || resetUserPasswordRequest === undefined) { + throw new RequiredError("ThoughtSpotRestApi", "resetUserPassword", "resetUserPasswordRequest"); + } + + + // Path Params + const localVarPath = '/api/rest/2.0/users/reset-password'; + + // Make Request Context + const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.POST); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.25.0") + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.25.0") + + + + + // Body Params + const contentType = ObjectSerializer.getPreferredMediaType([ + "application/json" + ]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = ObjectSerializer.stringify( + ObjectSerializer.serialize(resetUserPasswordRequest, "ResetUserPasswordRequest", ""), + contentType + ); + requestContext.setBody(serializedBody); + + let authMethod: SecurityAuthentication | undefined; + // Apply auth methods + authMethod = _config.authMethods["bearerAuth"] + if (authMethod?.applySecurityAuthentication) { + await authMethod?.applySecurityAuthentication(requestContext); + } + + const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default + if (defaultAuth?.applySecurityAuthentication) { + await defaultAuth?.applySecurityAuthentication(requestContext); + } + + return requestContext; + } + + /** + * Version: 9.2.0.cl or later Reverts TML objects to a previous commit specified in the API request. Requires at least edit access to objects. In the API request, specify the `commit_id`. If the branch name is not specified in the request, the API will consider the default branch configured on your instance. By default, the API reverts all objects. If the revert operation fails for one of the objects provided in the commit, the API returns an error and does not revert any object. For more information, see [Git integration documentation](https://developers.thoughtspot.com/docs/git-integration). + * @param commitId Commit id to which the object should be reverted + * @param revertCommitRequest + */ + public async revertCommit(commitId: string, revertCommitRequest: RevertCommitRequest, _options?: Configuration): Promise { + let _config = _options || this.configuration; + + // verify required parameter 'commitId' is not null or undefined + if (commitId === null || commitId === undefined) { + throw new RequiredError("ThoughtSpotRestApi", "revertCommit", "commitId"); + } + + + // verify required parameter 'revertCommitRequest' is not null or undefined + if (revertCommitRequest === null || revertCommitRequest === undefined) { + throw new RequiredError("ThoughtSpotRestApi", "revertCommit", "revertCommitRequest"); + } + + + // Path Params + const localVarPath = '/api/rest/2.0/vcs/git/commits/{commit_id}/revert' + .replace('{' + 'commit_id' + '}', encodeURIComponent(String(commitId))); + + // Make Request Context + const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.POST); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.25.0") + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.25.0") + + + + + // Body Params + const contentType = ObjectSerializer.getPreferredMediaType([ + "application/json" + ]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = ObjectSerializer.stringify( + ObjectSerializer.serialize(revertCommitRequest, "RevertCommitRequest", ""), + contentType + ); + requestContext.setBody(serializedBody); + + let authMethod: SecurityAuthentication | undefined; + // Apply auth methods + authMethod = _config.authMethods["bearerAuth"] + if (authMethod?.applySecurityAuthentication) { + await authMethod?.applySecurityAuthentication(requestContext); + } + + const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default + if (defaultAuth?.applySecurityAuthentication) { + await defaultAuth?.applySecurityAuthentication(requestContext); + } + + return requestContext; + } + + /** + * Version: 26.2.0.cl or later Revokes OAuth refresh tokens for users who no longer require access to a data warehouse connection. When a token is revoked, the affected user\'s session for that connection is terminated, and they must re-authenticate to regain access. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) or `DATAMANAGEMENT` (**Can manage data**) privileges. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on the ThoughtSpot instance, users with `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) privilege can also make API requests to revoke tokens for connection users. #### Usage guidelines You can specify different combinations of identifiers to control which refresh tokens are revoked. - **connection_identifier**: Revokes refresh tokens for all users of the connection, except the connection author. - **connection_identifier** and **user_identifiers**: Revokes refresh tokens only for the users specified in the request. If the name or ID of the connection author is included in the request, their token will also be revoked. - **connection_identifier** and **configuration_identifiers**: Revokes refresh tokens for all users on the specified configurations, except the configuration author. - **connection_identifier**, **configuration_identifiers**, and **user_identifiers**: Revokes refresh tokens for the specified users on the specified configurations. - **connection_identifier** and **org_identifiers**: Revokes refresh tokens for the specified Orgs. Applicable only for published connections. - **connection_identifier**, **org_identifiers**, and **user_identifiers**: Revokes refresh tokens for the specified users in the specified Orgs. Applicable only for published connections. **NOTE**: The `org_identifiers` parameter is only applicable for published connections. Using this parameter for unpublished connections will result in an error. Ensure that the connections are published before making the API request. + * @param connectionIdentifier Unique ID or name of the connection whose refresh tokens need to be revoked. All the users associated with the connection will have their refresh tokens revoked except the author. + * @param revokeRefreshTokensRequest + */ + public async revokeRefreshTokens(connectionIdentifier: string, revokeRefreshTokensRequest: RevokeRefreshTokensRequest, _options?: Configuration): Promise { + let _config = _options || this.configuration; + + // verify required parameter 'connectionIdentifier' is not null or undefined + if (connectionIdentifier === null || connectionIdentifier === undefined) { + throw new RequiredError("ThoughtSpotRestApi", "revokeRefreshTokens", "connectionIdentifier"); + } + + + // verify required parameter 'revokeRefreshTokensRequest' is not null or undefined + if (revokeRefreshTokensRequest === null || revokeRefreshTokensRequest === undefined) { + throw new RequiredError("ThoughtSpotRestApi", "revokeRefreshTokens", "revokeRefreshTokensRequest"); + } + + + // Path Params + const localVarPath = '/api/rest/2.0/connections/{connection_identifier}/revoke-refresh-tokens' + .replace('{' + 'connection_identifier' + '}', encodeURIComponent(String(connectionIdentifier))); + + // Make Request Context + const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.POST); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.25.0") + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.25.0") + + + + + // Body Params + const contentType = ObjectSerializer.getPreferredMediaType([ + "application/json" + ]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = ObjectSerializer.stringify( + ObjectSerializer.serialize(revokeRefreshTokensRequest, "RevokeRefreshTokensRequest", ""), + contentType + ); + requestContext.setBody(serializedBody); + + let authMethod: SecurityAuthentication | undefined; + // Apply auth methods + authMethod = _config.authMethods["bearerAuth"] + if (authMethod?.applySecurityAuthentication) { + await authMethod?.applySecurityAuthentication(requestContext); + } + + const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default + if (defaultAuth?.applySecurityAuthentication) { + await defaultAuth?.applySecurityAuthentication(requestContext); + } + + return requestContext; + } + + /** + * Version: 9.0.0.cl or later Revokes the authentication token issued for current user session. The token of your current session expires when you make a call to the `/api/rest/2.0/auth/token/revoke` endpoint. the users will not be able to access ThoughtSpot objects until a new token is obtained. To restart your session, request for a new token from ThoughtSpot. See [Get Full Access Token](#/http/api-endpoints/authentication/get-full-access-token). + * @param revokeTokenRequest + */ + public async revokeToken(revokeTokenRequest: RevokeTokenRequest, _options?: Configuration): Promise { + let _config = _options || this.configuration; + + // verify required parameter 'revokeTokenRequest' is not null or undefined + if (revokeTokenRequest === null || revokeTokenRequest === undefined) { + throw new RequiredError("ThoughtSpotRestApi", "revokeToken", "revokeTokenRequest"); + } + + + // Path Params + const localVarPath = '/api/rest/2.0/auth/token/revoke'; + + // Make Request Context + const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.POST); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.25.0") + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.25.0") + + + + + // Body Params + const contentType = ObjectSerializer.getPreferredMediaType([ + "application/json" + ]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = ObjectSerializer.stringify( + ObjectSerializer.serialize(revokeTokenRequest, "RevokeTokenRequest", ""), + contentType + ); + requestContext.setBody(serializedBody); + + let authMethod: SecurityAuthentication | undefined; + // Apply auth methods + authMethod = _config.authMethods["bearerAuth"] + if (authMethod?.applySecurityAuthentication) { + await authMethod?.applySecurityAuthentication(requestContext); + } + + const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default + if (defaultAuth?.applySecurityAuthentication) { + await defaultAuth?.applySecurityAuthentication(requestContext); + } + + return requestContext; + } + + /** + * Version: 26.6.0.cl or later Returns the authentication configuration for the specified auth type at cluster and org level. Currently supports `TRUSTED_AUTH`. #### Required privileges Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) or `CONTROL_TRUSTED_AUTH` (**Can Enable or Disable Trusted Authentication**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled, the `CONTROL_TRUSTED_AUTH` privilege is required. #### Usage guidelines Use `scope` to control which level of settings are returned: - `CLUSTER` — Returns cluster-level authentication status and access tokens. Accessible only from the Primary Org. - `ORG` — Returns org-level authentication status and access tokens for the current Org. Requires the per-Org authentication feature to be enabled on your instance. - If `scope` is omitted, both cluster and org-level settings are returned based on the caller\'s org context and feature availability. The `access_tokens` array in `cluster_preferences` or `org_preferences` is omitted when no token is configured at that level. **Note**: Access tokens returned in the response are sensitive credentials. Treat them with the same care as passwords. + * @param searchAuthSettingsRequest + */ + public async searchAuthSettings(searchAuthSettingsRequest: SearchAuthSettingsRequest, _options?: Configuration): Promise { + let _config = _options || this.configuration; + + // verify required parameter 'searchAuthSettingsRequest' is not null or undefined + if (searchAuthSettingsRequest === null || searchAuthSettingsRequest === undefined) { + throw new RequiredError("ThoughtSpotRestApi", "searchAuthSettings", "searchAuthSettingsRequest"); + } + + + // Path Params + const localVarPath = '/api/rest/2.0/auth/search'; + + // Make Request Context + const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.POST); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.25.0") + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.25.0") + + + + + // Body Params + const contentType = ObjectSerializer.getPreferredMediaType([ + "application/json" + ]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = ObjectSerializer.stringify( + ObjectSerializer.serialize(searchAuthSettingsRequest, "SearchAuthSettingsRequest", ""), + contentType + ); + requestContext.setBody(serializedBody); + + let authMethod: SecurityAuthentication | undefined; + // Apply auth methods + authMethod = _config.authMethods["bearerAuth"] + if (authMethod?.applySecurityAuthentication) { + await authMethod?.applySecurityAuthentication(requestContext); + } + + const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default + if (defaultAuth?.applySecurityAuthentication) { + await defaultAuth?.applySecurityAuthentication(requestContext); + } + + return requestContext; + } + + /** + * Version: 10.12.0.cl or later Gets a list of [custom calendars](https://docs.thoughtspot.com/cloud/latest/connections-cust-cal). Requires `DATAMANAGEMENT` (**Can manage data**) or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your ThoughtSpot instance, the `CAN_MANAGE_CUSTOM_CALENDAR` (**Can manage custom calendars**) privilege is required. #### Usage guidelines By default, the API returns a list of custom calendars for all connection objects. To retrieve custom calendar details for a particular connection, specify the connection ID. You can also use other search parameters such as `name_pattern` and `sort_options` as search filters. The `name_pattern` parameter filters and returns only those objects that match the specified pattern. Use `%` as a wildcard for pattern matching. + * @param searchCalendarsRequest + */ + public async searchCalendars(searchCalendarsRequest: SearchCalendarsRequest, _options?: Configuration): Promise { + let _config = _options || this.configuration; + + // verify required parameter 'searchCalendarsRequest' is not null or undefined + if (searchCalendarsRequest === null || searchCalendarsRequest === undefined) { + throw new RequiredError("ThoughtSpotRestApi", "searchCalendars", "searchCalendarsRequest"); + } + + + // Path Params + const localVarPath = '/api/rest/2.0/calendars/search'; + + // Make Request Context + const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.POST); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.25.0") + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.25.0") + + + + + // Body Params + const contentType = ObjectSerializer.getPreferredMediaType([ + "application/json" + ]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = ObjectSerializer.stringify( + ObjectSerializer.serialize(searchCalendarsRequest, "SearchCalendarsRequest", ""), + contentType + ); + requestContext.setBody(serializedBody); + + let authMethod: SecurityAuthentication | undefined; + // Apply auth methods + authMethod = _config.authMethods["bearerAuth"] + if (authMethod?.applySecurityAuthentication) { + await authMethod?.applySecurityAuthentication(requestContext); + } + + const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default + if (defaultAuth?.applySecurityAuthentication) { + await defaultAuth?.applySecurityAuthentication(requestContext); + } + + return requestContext; + } + + /** + * Version: 26.4.0.cl or later Searches delivery history for communication channels such as webhooks. Returns channel-level delivery status for each job execution record. Use this to monitor channel health and delivery success rates across events. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) or `DEVELOPER` (**Has developer privilege**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, users with `CAN_MANAGE_WEBHOOKS` (**Can manage webhooks**) privilege are also authorized to perform this action. **NOTE**: When `channel_type` is `WEBHOOK`, the following constraints apply: - `job_ids`, `channel_identifiers`, and `events` each accept at most one element. - When `job_ids` is provided, it is used as the sole lookup key and other filter fields are ignored. - When `job_ids` is not provided, `channel_identifiers` and `events` are both required, each containing exactly one element. - Records older than the configured retention period are not returned. - Use `start_epoch_time_in_millis` and/or `end_epoch_time_in_millis` to narrow results to a specific time window. + * @param searchChannelHistoryRequest + */ + public async searchChannelHistory(searchChannelHistoryRequest: SearchChannelHistoryRequest, _options?: Configuration): Promise { + let _config = _options || this.configuration; + + // verify required parameter 'searchChannelHistoryRequest' is not null or undefined + if (searchChannelHistoryRequest === null || searchChannelHistoryRequest === undefined) { + throw new RequiredError("ThoughtSpotRestApi", "searchChannelHistory", "searchChannelHistoryRequest"); + } + + + // Path Params + const localVarPath = '/api/rest/2.0/jobs/history/communication-channels/search'; + + // Make Request Context + const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.POST); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.25.0") + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.25.0") + + + + + // Body Params + const contentType = ObjectSerializer.getPreferredMediaType([ + "application/json" + ]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = ObjectSerializer.stringify( + ObjectSerializer.serialize(searchChannelHistoryRequest, "SearchChannelHistoryRequest", ""), + contentType + ); + requestContext.setBody(serializedBody); + + let authMethod: SecurityAuthentication | undefined; + // Apply auth methods + authMethod = _config.authMethods["bearerAuth"] + if (authMethod?.applySecurityAuthentication) { + await authMethod?.applySecurityAuthentication(requestContext); + } + + const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default + if (defaultAuth?.applySecurityAuthentication) { + await defaultAuth?.applySecurityAuthentication(requestContext); + } + + return requestContext; + } + + /** + * Version: 26.4.0.cl or later Gets a list of collections available in ThoughtSpot. To get details of a specific collection, specify the collection GUID or name. You can also filter the API response based on the collection name pattern, author, and other criteria. #### Search options * **name_pattern**: Use \'%\' as a wildcard character to match collection names * **collection_identifiers**: Search for specific collections by their GUIDs or names * **include_metadata**: When set to `true`, includes the metadata objects within each collection in the response **NOTE**: If the API returns an empty list, consider increasing the value of the `record_size` parameter. To search across all available collections, set `record_size` to `-1`. + * @param searchCollectionsRequest + */ + public async searchCollections(searchCollectionsRequest: SearchCollectionsRequest, _options?: Configuration): Promise { + let _config = _options || this.configuration; + + // verify required parameter 'searchCollectionsRequest' is not null or undefined + if (searchCollectionsRequest === null || searchCollectionsRequest === undefined) { + throw new RequiredError("ThoughtSpotRestApi", "searchCollections", "searchCollectionsRequest"); + } + + + // Path Params + const localVarPath = '/api/rest/2.0/collections/search'; + + // Make Request Context + const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.POST); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.25.0") + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.25.0") + + + + + // Body Params + const contentType = ObjectSerializer.getPreferredMediaType([ + "application/json" + ]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = ObjectSerializer.stringify( + ObjectSerializer.serialize(searchCollectionsRequest, "SearchCollectionsRequest", ""), + contentType + ); + requestContext.setBody(serializedBody); + + let authMethod: SecurityAuthentication | undefined; + // Apply auth methods + authMethod = _config.authMethods["bearerAuth"] + if (authMethod?.applySecurityAuthentication) { + await authMethod?.applySecurityAuthentication(requestContext); + } + + const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default + if (defaultAuth?.applySecurityAuthentication) { + await defaultAuth?.applySecurityAuthentication(requestContext); + } + + return requestContext; + } + + /** + * Version: 9.2.0.cl or later Gets a list of commits for a given metadata object. Requires `DATAMANAGEMENT` (**Can manage data**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance on your instance, the `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` (**Can manage data models**) privilege and edit access to the metadata objects. + * @param searchCommitsRequest + */ + public async searchCommits(searchCommitsRequest: SearchCommitsRequest, _options?: Configuration): Promise { + let _config = _options || this.configuration; + + // verify required parameter 'searchCommitsRequest' is not null or undefined + if (searchCommitsRequest === null || searchCommitsRequest === undefined) { + throw new RequiredError("ThoughtSpotRestApi", "searchCommits", "searchCommitsRequest"); + } + + + // Path Params + const localVarPath = '/api/rest/2.0/vcs/git/commits/search'; + + // Make Request Context + const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.POST); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.25.0") + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.25.0") + + + + + // Body Params + const contentType = ObjectSerializer.getPreferredMediaType([ + "application/json" + ]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = ObjectSerializer.stringify( + ObjectSerializer.serialize(searchCommitsRequest, "SearchCommitsRequest", ""), + contentType + ); + requestContext.setBody(serializedBody); + + let authMethod: SecurityAuthentication | undefined; + // Apply auth methods + authMethod = _config.authMethods["bearerAuth"] + if (authMethod?.applySecurityAuthentication) { + await authMethod?.applySecurityAuthentication(requestContext); + } + + const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default + if (defaultAuth?.applySecurityAuthentication) { + await defaultAuth?.applySecurityAuthentication(requestContext); + } + + return requestContext; + } + + /** + * Version: 10.14.0.cl or later Fetch communication channel preferences. - Use `cluster_preferences` to fetch the default preferences for your ThoughtSpot application instance. - If your instance has [Orgs](https://docs.thoughtspot.com/cloud/latest/orgs-overview), use `org_preferences` to fetch any Org-specific preferences that override the defaults. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) or `DEVELOPER` (**Has developer privilege**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, users with `APPLICATION_ADMINISTRATION` (**Can manage application settings**) privilege are also authorized to perform this action. + * @param searchCommunicationChannelPreferencesRequest + */ + public async searchCommunicationChannelPreferences(searchCommunicationChannelPreferencesRequest: SearchCommunicationChannelPreferencesRequest, _options?: Configuration): Promise { + let _config = _options || this.configuration; + + // verify required parameter 'searchCommunicationChannelPreferencesRequest' is not null or undefined + if (searchCommunicationChannelPreferencesRequest === null || searchCommunicationChannelPreferencesRequest === undefined) { + throw new RequiredError("ThoughtSpotRestApi", "searchCommunicationChannelPreferences", "searchCommunicationChannelPreferencesRequest"); + } + + + // Path Params + const localVarPath = '/api/rest/2.0/system/preferences/communication-channels/search'; + + // Make Request Context + const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.POST); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.25.0") + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.25.0") + + + + + // Body Params + const contentType = ObjectSerializer.getPreferredMediaType([ + "application/json" + ]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = ObjectSerializer.stringify( + ObjectSerializer.serialize(searchCommunicationChannelPreferencesRequest, "SearchCommunicationChannelPreferencesRequest", ""), + contentType + ); + requestContext.setBody(serializedBody); + + let authMethod: SecurityAuthentication | undefined; + // Apply auth methods + authMethod = _config.authMethods["bearerAuth"] + if (authMethod?.applySecurityAuthentication) { + await authMethod?.applySecurityAuthentication(requestContext); + } + + const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default + if (defaultAuth?.applySecurityAuthentication) { + await defaultAuth?.applySecurityAuthentication(requestContext); + } + + return requestContext; + } + + /** + * Version: 9.2.0.cl or later Gets Git repository connections configured on the ThoughtSpot instance. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance on your instance, the `CAN_SETUP_VERSION_CONTROL` (**Can set up version control**) privilege. + * @param searchConfigRequest + */ + public async searchConfig(searchConfigRequest: SearchConfigRequest, _options?: Configuration): Promise { + let _config = _options || this.configuration; + + // verify required parameter 'searchConfigRequest' is not null or undefined + if (searchConfigRequest === null || searchConfigRequest === undefined) { + throw new RequiredError("ThoughtSpotRestApi", "searchConfig", "searchConfigRequest"); + } + + + // Path Params + const localVarPath = '/api/rest/2.0/vcs/git/config/search'; + + // Make Request Context + const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.POST); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.25.0") + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.25.0") + + + + + // Body Params + const contentType = ObjectSerializer.getPreferredMediaType([ + "application/json" + ]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = ObjectSerializer.stringify( + ObjectSerializer.serialize(searchConfigRequest, "SearchConfigRequest", ""), + contentType + ); + requestContext.setBody(serializedBody); + + let authMethod: SecurityAuthentication | undefined; + // Apply auth methods + authMethod = _config.authMethods["bearerAuth"] + if (authMethod?.applySecurityAuthentication) { + await authMethod?.applySecurityAuthentication(requestContext); + } + + const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default + if (defaultAuth?.applySecurityAuthentication) { + await defaultAuth?.applySecurityAuthentication(requestContext); + } + + return requestContext; + } + + /** + * Version: 9.2.0.cl or later Gets connection objects. Requires `DATAMANAGEMENT` (**Can manage data**) or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) privilege is required. - To get a list of all connections available in the ThoughtSpot system, send the API request without any attributes in the request body. - To get the connection objects for a specific type of data warehouse, specify the type in `data_warehouse_types`. - To fetch details of a connection object, specify the connection object GUID or name. The `name_pattern` attribute allows passing partial text with `%` for a wildcard match. - To get details of the database, schemas, tables, or columns from a data connection object, specify `data_warehouse_object_type`. - To get a specific database, schema, table, or column from a connection object, define the object type in `data_warehouse_object_type` and object properties in the `data_warehouse_objects` array. For example, to search for a column, you must pass the database, schema, and table names in the API request. Note that in the following example, object properties are set in a hierarchical order (`database` > `schema` > `table` > `column`). ``` { \"connections\": [ { \"identifier\": \"b9d1f2ef-fa65-4a4b-994e-30fa2d57b0c2\", \"data_warehouse_objects\": [ { \"database\": \"NEBULADEV\", \"schema\": \"INFORMATION_SCHEMA\", \"table\": \"APPLICABLE_ROLES\", \"column\": \"ROLE_NAME\" } ] } ], \"data_warehouse_object_type\": \"COLUMN\" } ``` - To fetch data by `configuration`, specify `data_warehouse_object_type`. For example, to fetch columns from the `DEVELOPMENT` database, specify the `data_warehouse_object_type` as `DATABASE` and define the `configuration` string as `{\"database\":\"DEVELOPMENT\"}`. To get column data for a specific table, specify the table, for example,`{\"database\":\"RETAILAPPAREL\",\"table\":\"PIPES\"}`. - To query connections by `authentication_type`, specify `data_warehouse_object_type`. Supported values for `authentication_type` are: - `SERVICE_ACCOUNT`: For connections that require service account credentials to authenticate to the Cloud Data Warehouse and fetch data. - `OAUTH`: For connections that require OAuth credentials to authenticate to the Cloud Data Warehouse and fetch data. Teradata, Oracle, and Presto Cloud Data Warehouses do not support the OAuth authentication type. - `IAM`: For connections that have the IAM OAuth set up. This authentication type is supported on Amazon Redshift connections only. - `EXTOAUTH`: For connections that have External OAuth set up. ThoughtSpot supports external [OAuth with Microsoft Azure Active Directory (AD)](https://docs.thoughtspot.com/cloud/latest/ connections-snowflake-azure-ad-oauth) and [Okta for Snowflake data connections](https://docs.thoughtspot.com/cloud/latest/connections-snowflake-okta-oauth). - `KEY_PAIR`: For connections that require Key Pair account credentials to authenticate to the Cloud Data Warehouse and fetch data. This authentication type is supported on Snowflake connections only. - `OAUTH_WITH_PKCE`: For connections that require OAuth with PKCE account credentials to authenticate to the Cloud Data Warehouse and fetch data. This authentication type is supported on Snowflake, Starburst, Databricks, Denodo connections only. - `EXTOAUTH_WITH_PKCE`: For connections that require External OAuth With PKCE account credentials to authenticate to the Cloud Data Warehouse and fetch data. This authentication type is supported on Snowflake connections only. - `OAUTH_WITH_PEZ`: For connections that require OAuth With PEZ account credentials to authenticate to the Cloud Data Warehouse and fetch data. This authentication type is supported on Amazon Redshift connections only. - `OAUTH_WITH_SERVICE_PRINCIPAL`: For connections that require OAuth With Service Principal account credentials to authenticate to the Cloud Data Warehouse and fetch data. This authentication type is supported on Databricks connections only. - `PERSONAL_ACCESS_TOKEN`: For connections that require Personal Access Token account credentials to authenticate to the Cloud Data Warehouse and fetch data. This authentication type is supported on Databricks connections only. - `OAUTH_CLIENT_CREDENTIALS`: For connections that require OAuth Client Credentials to authenticate to the Cloud Data Warehouse and fetch data. This authentication type is supported on Snowflake connections only. - To include more details about connection objects in the API response, set `include_details` to `true`. - You can also sort the output by field names and filter connections by tags. **NOTE**: When filtering connection records by parameters other than `data_warehouse_types` or `tag_identifiers`, ensure that you set `record_size` to `-1` and `record_offset` to `0` for precise results. + * @param searchConnectionRequest + */ + public async searchConnection(searchConnectionRequest: SearchConnectionRequest, _options?: Configuration): Promise { + let _config = _options || this.configuration; + + // verify required parameter 'searchConnectionRequest' is not null or undefined + if (searchConnectionRequest === null || searchConnectionRequest === undefined) { + throw new RequiredError("ThoughtSpotRestApi", "searchConnection", "searchConnectionRequest"); + } + + + // Path Params + const localVarPath = '/api/rest/2.0/connection/search'; + + // Make Request Context + const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.POST); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.25.0") + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.25.0") + + + + + // Body Params + const contentType = ObjectSerializer.getPreferredMediaType([ + "application/json" + ]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = ObjectSerializer.stringify( + ObjectSerializer.serialize(searchConnectionRequest, "SearchConnectionRequest", ""), + contentType + ); + requestContext.setBody(serializedBody); + + let authMethod: SecurityAuthentication | undefined; + // Apply auth methods + authMethod = _config.authMethods["bearerAuth"] + if (authMethod?.applySecurityAuthentication) { + await authMethod?.applySecurityAuthentication(requestContext); + } + + const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default + if (defaultAuth?.applySecurityAuthentication) { + await defaultAuth?.applySecurityAuthentication(requestContext); + } + + return requestContext; + } + + /** + * Version: 9.6.0.cl or later Gets custom actions configured on the cluster. Requires `DEVELOPER` (**Has Developer privilege**) or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `DEVELOPER` (**Has developer privilege**) privilege is required. + * @param searchCustomActionsRequest + */ + public async searchCustomActions(searchCustomActionsRequest: SearchCustomActionsRequest, _options?: Configuration): Promise { + let _config = _options || this.configuration; + + // verify required parameter 'searchCustomActionsRequest' is not null or undefined + if (searchCustomActionsRequest === null || searchCustomActionsRequest === undefined) { + throw new RequiredError("ThoughtSpotRestApi", "searchCustomActions", "searchCustomActionsRequest"); + } + + + // Path Params + const localVarPath = '/api/rest/2.0/customization/custom-actions/search'; + + // Make Request Context + const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.POST); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.25.0") + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.25.0") + + + + + // Body Params + const contentType = ObjectSerializer.getPreferredMediaType([ + "application/json" + ]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = ObjectSerializer.stringify( + ObjectSerializer.serialize(searchCustomActionsRequest, "SearchCustomActionsRequest", ""), + contentType + ); + requestContext.setBody(serializedBody); + + let authMethod: SecurityAuthentication | undefined; + // Apply auth methods + authMethod = _config.authMethods["bearerAuth"] + if (authMethod?.applySecurityAuthentication) { + await authMethod?.applySecurityAuthentication(requestContext); + } + + const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default + if (defaultAuth?.applySecurityAuthentication) { + await defaultAuth?.applySecurityAuthentication(requestContext); + } + + return requestContext; + } + + /** + * Version: 9.0.0.cl or later Generates an Answer from a given data source. Requires at least view access to the data source object (Worksheet or View). #### Usage guidelines To search data, specify the data source GUID in `logical_table_identifier`. The data source can be a Worksheet, View, Table, or SQL view. Pass search tokens in the `query_string` attribute in the API request as shown in the following example: ``` { \"query_string\": \"[sales] by [store]\", \"logical_table_identifier\": \"cd252e5c-b552-49a8-821d-3eadaa049cca\", } ``` For more information about the `query_string` format and data source attribute, see [Search data API](https://developers.thoughtspot.com/docs/fetch-data-and-report-apis#_search_data_api). The `record_size` attribute determines the number of records to retrieve in an API call. For more information about pagination, record size, and maximum row limit, see [Pagination and record size settings](https://developers.thoughtspot.com/docs/fetch-data-and-report-apis#_pagination_settings_for_data_and_report_api). + * @param searchDataRequest + */ + public async searchData(searchDataRequest: SearchDataRequest, _options?: Configuration): Promise { + let _config = _options || this.configuration; + + // verify required parameter 'searchDataRequest' is not null or undefined + if (searchDataRequest === null || searchDataRequest === undefined) { + throw new RequiredError("ThoughtSpotRestApi", "searchData", "searchDataRequest"); + } + + + // Path Params + const localVarPath = '/api/rest/2.0/searchdata'; + + // Make Request Context + const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.POST); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.25.0") + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.25.0") + + + + + // Body Params + const contentType = ObjectSerializer.getPreferredMediaType([ + "application/json" + ]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = ObjectSerializer.stringify( + ObjectSerializer.serialize(searchDataRequest, "SearchDataRequest", ""), + contentType + ); + requestContext.setBody(serializedBody); + + let authMethod: SecurityAuthentication | undefined; + // Apply auth methods + authMethod = _config.authMethods["bearerAuth"] + if (authMethod?.applySecurityAuthentication) { + await authMethod?.applySecurityAuthentication(requestContext); + } + + const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default + if (defaultAuth?.applySecurityAuthentication) { + await defaultAuth?.applySecurityAuthentication(requestContext); + } + + return requestContext; + } + + /** + * Version: 10.10.0.cl or later Search the email customization configuration if any set for the ThoughtSpot system. #### Pre-requisites Requires `DEVELOPER` (**has developer privilege**) or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `DEVELOPER` (**Has developer privilege**) privilege is required. **NOTE**:This endpoint in currently in beta. Contact ThoughtSpot support to enable this on your instance. + * @param searchEmailCustomizationRequest + */ + public async searchEmailCustomization(searchEmailCustomizationRequest: SearchEmailCustomizationRequest, _options?: Configuration): Promise { + let _config = _options || this.configuration; + + // verify required parameter 'searchEmailCustomizationRequest' is not null or undefined + if (searchEmailCustomizationRequest === null || searchEmailCustomizationRequest === undefined) { + throw new RequiredError("ThoughtSpotRestApi", "searchEmailCustomization", "searchEmailCustomizationRequest"); + } + + + // Path Params + const localVarPath = '/api/rest/2.0/customization/email/search'; + + // Make Request Context + const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.POST); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.25.0") + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.25.0") + + + + + // Body Params + const contentType = ObjectSerializer.getPreferredMediaType([ + "application/json" + ]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = ObjectSerializer.stringify( + ObjectSerializer.serialize(searchEmailCustomizationRequest, "SearchEmailCustomizationRequest", ""), + contentType + ); + requestContext.setBody(serializedBody); + + let authMethod: SecurityAuthentication | undefined; + // Apply auth methods + authMethod = _config.authMethods["bearerAuth"] + if (authMethod?.applySecurityAuthentication) { + await authMethod?.applySecurityAuthentication(requestContext); + } + + const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default + if (defaultAuth?.applySecurityAuthentication) { + await defaultAuth?.applySecurityAuthentication(requestContext); + } + + return requestContext; + } + + /** + * Version: 9.0.0.cl or later Gets a list of metadata objects available on the ThoughtSpot system. This API endpoint is available to all users who have view access to the object. Users with `ADMINISTRATION` (**Can administer ThoughtSpot**) privileges can view data for all metadata objects, including users and groups. #### Usage guidelines - To get all metadata objects, send the API request without any attributes. - To get metadata objects of a specific type, set the `type` attribute. For example, to fetch a Worksheet, set the type as `LOGICAL_TABLE`. - To filter metadata objects within type `LOGICAL_TABLE`, set the `subtypes` attribute. For example, to fetch a Worksheet, set the type as `LOGICAL_TABLE` & subtypes as `[WORKSHEET]`. - To get a specific metadata object, specify the GUID. - To customize your search and filter the API response, you can use several parameters. You can search for objects created or modified by specific users, by tags applied to the objects, or by using the include parameters like `include_auto_created_objects`, `include_dependent_objects`, `include_headers`, `include_incomplete_objects`, and so on. You can also define sorting options to sort the data retrieved in the API response. - To get discoverable objects when linientmodel is enabled you can use `include_discoverable_objects` as true else false. Default value is true. - For liveboard metadata type, to get the newer format, set the `liveboard_response_format` as V2. Default value is V1. - To retrieve only objects that are published, set the `include_only_published_objects` as true. Default value is false. **NOTE**: The following parameters support pagination of metadata records: - `tag_identifiers` - `type` - `subtypes` - `created_by_user_identifiers` - `modified_by_user_identifiers` - `owned_by_user_identifiers` - `exclude_objects` - `include_auto_created_objects` - `favorite_object_options` - `include_only_published_objects` If you are using other parameters to search metadata, set `record_size` to `-1` and `record_offset` to `0`. + * @param searchMetadataRequest + */ + public async searchMetadata(searchMetadataRequest: SearchMetadataRequest, _options?: Configuration): Promise { + let _config = _options || this.configuration; + + // verify required parameter 'searchMetadataRequest' is not null or undefined + if (searchMetadataRequest === null || searchMetadataRequest === undefined) { + throw new RequiredError("ThoughtSpotRestApi", "searchMetadata", "searchMetadataRequest"); + } + + + // Path Params + const localVarPath = '/api/rest/2.0/metadata/search'; + + // Make Request Context + const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.POST); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.25.0") + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.25.0") + + + + + // Body Params + const contentType = ObjectSerializer.getPreferredMediaType([ + "application/json" + ]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = ObjectSerializer.stringify( + ObjectSerializer.serialize(searchMetadataRequest, "SearchMetadataRequest", ""), + contentType + ); + requestContext.setBody(serializedBody); + + let authMethod: SecurityAuthentication | undefined; + // Apply auth methods + authMethod = _config.authMethods["bearerAuth"] + if (authMethod?.applySecurityAuthentication) { + await authMethod?.applySecurityAuthentication(requestContext); + } + + const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default + if (defaultAuth?.applySecurityAuthentication) { + await defaultAuth?.applySecurityAuthentication(requestContext); + } + + return requestContext; + } + + /** + * Version: 9.0.0.cl or later Gets a list of Orgs configured on the ThoughtSpot system. To get details of a specific Org, specify the Org ID or name. You can also pass parameters such as status, visibility, and user identifiers to get a specific list of Orgs. Requires cluster administration (**Can administer Org**) privileges. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `ORG_ADMINISTRATION` (**Can manage Orgs**) privilege is required. + * @param searchOrgsRequest + */ + public async searchOrgs(searchOrgsRequest: SearchOrgsRequest, _options?: Configuration): Promise { + let _config = _options || this.configuration; + + // verify required parameter 'searchOrgsRequest' is not null or undefined + if (searchOrgsRequest === null || searchOrgsRequest === undefined) { + throw new RequiredError("ThoughtSpotRestApi", "searchOrgs", "searchOrgsRequest"); + } + + + // Path Params + const localVarPath = '/api/rest/2.0/orgs/search'; + + // Make Request Context + const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.POST); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.25.0") + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.25.0") + + + + + // Body Params + const contentType = ObjectSerializer.getPreferredMediaType([ + "application/json" + ]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = ObjectSerializer.stringify( + ObjectSerializer.serialize(searchOrgsRequest, "SearchOrgsRequest", ""), + contentType + ); + requestContext.setBody(serializedBody); + + let authMethod: SecurityAuthentication | undefined; + // Apply auth methods + authMethod = _config.authMethods["bearerAuth"] + if (authMethod?.applySecurityAuthentication) { + await authMethod?.applySecurityAuthentication(requestContext); + } + + const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default + if (defaultAuth?.applySecurityAuthentication) { + await defaultAuth?.applySecurityAuthentication(requestContext); + } + + return requestContext; + } + + /** + * Version: 9.5.0.cl or later Gets a list of Role objects from the ThoughtSpot system. Available if [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance. To search for Roles, the `ROLE_ADMINISTRATION` (**Can manage roles**) privilege is required. To get details of a specific Role object, specify the GUID or name. You can also filter the API response based on user group and Org identifiers, privileges assigned to the Role, and deprecation status. + * @param searchRolesRequest + */ + public async searchRoles(searchRolesRequest: SearchRolesRequest, _options?: Configuration): Promise { + let _config = _options || this.configuration; + + // verify required parameter 'searchRolesRequest' is not null or undefined + if (searchRolesRequest === null || searchRolesRequest === undefined) { + throw new RequiredError("ThoughtSpotRestApi", "searchRoles", "searchRolesRequest"); + } + + + // Path Params + const localVarPath = '/api/rest/2.0/roles/search'; + + // Make Request Context + const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.POST); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.25.0") + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.25.0") + + + + + // Body Params + const contentType = ObjectSerializer.getPreferredMediaType([ + "application/json" + ]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = ObjectSerializer.stringify( + ObjectSerializer.serialize(searchRolesRequest, "SearchRolesRequest", ""), + contentType + ); + requestContext.setBody(serializedBody); + + let authMethod: SecurityAuthentication | undefined; + // Apply auth methods + authMethod = _config.authMethods["bearerAuth"] + if (authMethod?.applySecurityAuthentication) { + await authMethod?.applySecurityAuthentication(requestContext); + } + + const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default + if (defaultAuth?.applySecurityAuthentication) { + await defaultAuth?.applySecurityAuthentication(requestContext); + } + + return requestContext; + } + + /** + * Search Schedules Version: 9.4.0.cl or later Gets a list of scheduled jobs configured for a Liveboard. To get details of a specific scheduled job, specify the name or GUID of the scheduled job. Requires at least view access to Liveboards. **NOTE**: When filtering schedules by parameters other than `metadata`, set `record_size` to `-1` and `record_offset` to `0` for accurate results. + * @param searchSchedulesRequest + */ + public async searchSchedules(searchSchedulesRequest: SearchSchedulesRequest, _options?: Configuration): Promise { + let _config = _options || this.configuration; + + // verify required parameter 'searchSchedulesRequest' is not null or undefined + if (searchSchedulesRequest === null || searchSchedulesRequest === undefined) { + throw new RequiredError("ThoughtSpotRestApi", "searchSchedules", "searchSchedulesRequest"); + } + + + // Path Params + const localVarPath = '/api/rest/2.0/schedules/search'; + + // Make Request Context + const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.POST); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.25.0") + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.25.0") + + + + + // Body Params + const contentType = ObjectSerializer.getPreferredMediaType([ + "application/json" + ]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = ObjectSerializer.stringify( + ObjectSerializer.serialize(searchSchedulesRequest, "SearchSchedulesRequest", ""), + contentType + ); + requestContext.setBody(serializedBody); + + let authMethod: SecurityAuthentication | undefined; + // Apply auth methods + authMethod = _config.authMethods["bearerAuth"] + if (authMethod?.applySecurityAuthentication) { + await authMethod?.applySecurityAuthentication(requestContext); + } + + const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default + if (defaultAuth?.applySecurityAuthentication) { + await defaultAuth?.applySecurityAuthentication(requestContext); + } + + return requestContext; + } + + /** + * Version: 26.2.0.cl or later Fetch security settings for your ThoughtSpot application instance. - Use `scope: CLUSTER` to retrieve cluster-level security settings, including CORS and CSP allowlists, SAML redirect URLs, and settings that control access to non-embedded pages. - Use `scope: ORG` to retrieve Org-level security settings. If your instance has [Orgs](https://docs.thoughtspot.com/cloud/latest/orgs-overview), this returns CORS and non-embed access settings specific to the Org. - If `scope` is not specified, returns both cluster and Org-specific settings based on user privileges. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) or `DEVELOPER` (**Has developer privilege**) privilege. See [Security Settings](https://developers.thoughtspot.com/docs/security-settings) for more details. + * @param searchSecuritySettingsRequest + */ + public async searchSecuritySettings(searchSecuritySettingsRequest: SearchSecuritySettingsRequest, _options?: Configuration): Promise { + let _config = _options || this.configuration; + + // verify required parameter 'searchSecuritySettingsRequest' is not null or undefined + if (searchSecuritySettingsRequest === null || searchSecuritySettingsRequest === undefined) { + throw new RequiredError("ThoughtSpotRestApi", "searchSecuritySettings", "searchSecuritySettingsRequest"); + } + + + // Path Params + const localVarPath = '/api/rest/2.0/system/security-settings/search'; + + // Make Request Context + const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.POST); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.25.0") + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.25.0") + + + + + // Body Params + const contentType = ObjectSerializer.getPreferredMediaType([ + "application/json" + ]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = ObjectSerializer.stringify( + ObjectSerializer.serialize(searchSecuritySettingsRequest, "SearchSecuritySettingsRequest", ""), + contentType + ); + requestContext.setBody(serializedBody); + + let authMethod: SecurityAuthentication | undefined; + // Apply auth methods + authMethod = _config.authMethods["bearerAuth"] + if (authMethod?.applySecurityAuthentication) { + await authMethod?.applySecurityAuthentication(requestContext); + } + + const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default + if (defaultAuth?.applySecurityAuthentication) { + await defaultAuth?.applySecurityAuthentication(requestContext); + } + + return requestContext; + } + + /** + * Version: 9.0.0.cl or later Gets a list of tag objects available on the ThoughtSpot system. To get details of a specific tag object, specify the GUID or name. Any authenticated user can search for tag objects. + * @param searchTagsRequest + */ + public async searchTags(searchTagsRequest: SearchTagsRequest, _options?: Configuration): Promise { + let _config = _options || this.configuration; + + // verify required parameter 'searchTagsRequest' is not null or undefined + if (searchTagsRequest === null || searchTagsRequest === undefined) { + throw new RequiredError("ThoughtSpotRestApi", "searchTags", "searchTagsRequest"); + } + + + // Path Params + const localVarPath = '/api/rest/2.0/tags/search'; + + // Make Request Context + const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.POST); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.25.0") + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.25.0") + + + + + // Body Params + const contentType = ObjectSerializer.getPreferredMediaType([ + "application/json" + ]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = ObjectSerializer.stringify( + ObjectSerializer.serialize(searchTagsRequest, "SearchTagsRequest", ""), + contentType + ); + requestContext.setBody(serializedBody); + + let authMethod: SecurityAuthentication | undefined; + // Apply auth methods + authMethod = _config.authMethods["bearerAuth"] + if (authMethod?.applySecurityAuthentication) { + await authMethod?.applySecurityAuthentication(requestContext); + } + + const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default + if (defaultAuth?.applySecurityAuthentication) { + await defaultAuth?.applySecurityAuthentication(requestContext); + } + + return requestContext; + } + + /** + * Version: 9.0.0.cl or later Gets a list of user group objects from the ThoughtSpot system. To get details of a specific user group, specify the user group GUID or name. You can also filter the API response based on User ID, Org ID, Role ID, type of group, sharing visibility, privileges assigned to the group, and the Liveboard IDs assigned to the users in the group. Available to all users. Users with `ADMINISTRATION` (**Can administer ThoughtSpot**) privileges can view all users properties. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `GROUP_ADMINISTRATION` (**Can manage groups**) privilege is required. **NOTE**: If you do not get precise results, try setting `record_size` to `-1` and `record_offset` to `0`. + * @param searchUserGroupsRequest + */ + public async searchUserGroups(searchUserGroupsRequest: SearchUserGroupsRequest, _options?: Configuration): Promise { + let _config = _options || this.configuration; + + // verify required parameter 'searchUserGroupsRequest' is not null or undefined + if (searchUserGroupsRequest === null || searchUserGroupsRequest === undefined) { + throw new RequiredError("ThoughtSpotRestApi", "searchUserGroups", "searchUserGroupsRequest"); + } + + + // Path Params + const localVarPath = '/api/rest/2.0/groups/search'; + + // Make Request Context + const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.POST); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.25.0") + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.25.0") + + + + + // Body Params + const contentType = ObjectSerializer.getPreferredMediaType([ + "application/json" + ]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = ObjectSerializer.stringify( + ObjectSerializer.serialize(searchUserGroupsRequest, "SearchUserGroupsRequest", ""), + contentType + ); + requestContext.setBody(serializedBody); + + let authMethod: SecurityAuthentication | undefined; + // Apply auth methods + authMethod = _config.authMethods["bearerAuth"] + if (authMethod?.applySecurityAuthentication) { + await authMethod?.applySecurityAuthentication(requestContext); + } + + const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default + if (defaultAuth?.applySecurityAuthentication) { + await defaultAuth?.applySecurityAuthentication(requestContext); + } + + return requestContext; + } + + /** + * Version: 9.0.0.cl or later Gets a list of users available on the ThoughtSpot system. To get details of a specific user, specify the user GUID or name. You can also filter the API response based on groups, Org ID, user visibility, account status, user type, and user preference settings and favorites. Available to all users. Users with `ADMINISTRATION` (**Can administer ThoughtSpot**) privileges can view all users properties. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `USER_ADMINISTRATION` (**Can manage users**) privilege is required. **NOTE**: If the API returns an empty list, consider increasing the value of the `record_size` parameter. To search across all available users, set `record_size` to `-1`. + * @param searchUsersRequest + */ + public async searchUsers(searchUsersRequest: SearchUsersRequest, _options?: Configuration): Promise { + let _config = _options || this.configuration; + + // verify required parameter 'searchUsersRequest' is not null or undefined + if (searchUsersRequest === null || searchUsersRequest === undefined) { + throw new RequiredError("ThoughtSpotRestApi", "searchUsers", "searchUsersRequest"); + } + + + // Path Params + const localVarPath = '/api/rest/2.0/users/search'; + + // Make Request Context + const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.POST); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.25.0") + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.25.0") + + + + + // Body Params + const contentType = ObjectSerializer.getPreferredMediaType([ + "application/json" + ]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = ObjectSerializer.stringify( + ObjectSerializer.serialize(searchUsersRequest, "SearchUsersRequest", ""), + contentType + ); + requestContext.setBody(serializedBody); + + let authMethod: SecurityAuthentication | undefined; + // Apply auth methods + authMethod = _config.authMethods["bearerAuth"] + if (authMethod?.applySecurityAuthentication) { + await authMethod?.applySecurityAuthentication(requestContext); + } + + const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default + if (defaultAuth?.applySecurityAuthentication) { + await defaultAuth?.applySecurityAuthentication(requestContext); + } + + return requestContext; + } + + /** + * Search variables Version: 26.4.0.cl or later Allows searching for variables in ThoughtSpot. Requires ADMINISTRATION role. The CAN_MANAGE_VARIABLES permission allows you to manage Formula Variables in the current organization scope. The API endpoint supports searching variables by: * Variable identifier (ID or name) * Variable type * Name pattern (case-insensitive, supports % for wildcard) The search results can be formatted in three ways: * METADATA - Returns only variable metadata (default) * METADATA_AND_VALUES - Returns variable metadata and values The values can be filtered by scope: * org_identifier * principal_identifier * model_identifier + * @param searchVariablesRequest + */ + public async searchVariables(searchVariablesRequest: SearchVariablesRequest, _options?: Configuration): Promise { + let _config = _options || this.configuration; + + // verify required parameter 'searchVariablesRequest' is not null or undefined + if (searchVariablesRequest === null || searchVariablesRequest === undefined) { + throw new RequiredError("ThoughtSpotRestApi", "searchVariables", "searchVariablesRequest"); + } + + + // Path Params + const localVarPath = '/api/rest/2.0/template/variables/search'; + + // Make Request Context + const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.POST); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.25.0") + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.25.0") + + + + + // Body Params + const contentType = ObjectSerializer.getPreferredMediaType([ + "application/json" + ]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = ObjectSerializer.stringify( + ObjectSerializer.serialize(searchVariablesRequest, "SearchVariablesRequest", ""), + contentType + ); + requestContext.setBody(serializedBody); + + let authMethod: SecurityAuthentication | undefined; + // Apply auth methods + authMethod = _config.authMethods["bearerAuth"] + if (authMethod?.applySecurityAuthentication) { + await authMethod?.applySecurityAuthentication(requestContext); + } + + const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default + if (defaultAuth?.applySecurityAuthentication) { + await defaultAuth?.applySecurityAuthentication(requestContext); + } + + return requestContext; + } + + /** + * Version: 10.14.0.cl or later Searches for webhook configurations based on various criteria such as Org, webhook identifier, event type, with support for pagination and sorting. Returns matching webhook configurations with their complete details. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) or `DEVELOPER` (**Has developer privilege**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, users with `CAN_MANAGE_WEBHOOKS` (**Can manage webhooks**) privilege are also authorized to perform this action. + * @param searchWebhookConfigurationsRequest + */ + public async searchWebhookConfigurations(searchWebhookConfigurationsRequest: SearchWebhookConfigurationsRequest, _options?: Configuration): Promise { + let _config = _options || this.configuration; + + // verify required parameter 'searchWebhookConfigurationsRequest' is not null or undefined + if (searchWebhookConfigurationsRequest === null || searchWebhookConfigurationsRequest === undefined) { + throw new RequiredError("ThoughtSpotRestApi", "searchWebhookConfigurations", "searchWebhookConfigurationsRequest"); + } + + + // Path Params + const localVarPath = '/api/rest/2.0/webhooks/search'; + + // Make Request Context + const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.POST); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.25.0") + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.25.0") + + + + + // Body Params + const contentType = ObjectSerializer.getPreferredMediaType([ + "application/json" + ]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = ObjectSerializer.stringify( + ObjectSerializer.serialize(searchWebhookConfigurationsRequest, "SearchWebhookConfigurationsRequest", ""), + contentType + ); + requestContext.setBody(serializedBody); + + let authMethod: SecurityAuthentication | undefined; + // Apply auth methods + authMethod = _config.authMethods["bearerAuth"] + if (authMethod?.applySecurityAuthentication) { + await authMethod?.applySecurityAuthentication(requestContext); + } + + const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default + if (defaultAuth?.applySecurityAuthentication) { + await defaultAuth?.applySecurityAuthentication(requestContext); + } + + return requestContext; + } + + /** + * Version: 26.5.0.cl or later Sends natural language messages to an existing Spotter agent conversation and returns the complete response synchronously. Requires `CAN_USE_SPOTTER` privilege and access to the metadata object associated with the conversation. The user must have access to the conversation session referenced by `conversation_identifier`. A conversation must first be created using the `createAgentConversation` API. #### Usage guidelines The request must include: - `conversation_identifier`: the unique session ID returned by `createAgentConversation`, used for context continuity and message tracking - `messages`: an array of one or more text messages to send to the agent The API returns an array of response objects, each containing: - `type`: the kind of response — `text`, `answer`, or `error` - `message`: the main content of the response - `metadata`: additional information depending on the message type (e.g., answer metadata includes analytics and visualization details) #### Error responses | Code | Description | |------|----------------------------------------------------------------------------------------------------------------------------------| | 401 | Unauthorized — authentication token is missing, expired, or invalid. | | 403 | Forbidden — the authenticated user does not have `CAN_USE_SPOTTER` privilege or lacks permission on the referenced conversation. | > ###### Note: > > - This endpoint is Generally Available from version 26.5.0.cl. > - This endpoint requires Spotter - please contact ThoughtSpot support to enable Spotter on your cluster. > - For real-time streamed responses, use `sendAgentConversationMessageStreaming` instead. + * @param conversationIdentifier Unique identifier for the conversation (used to track context) + * @param sendAgentConversationMessageRequest + */ + public async sendAgentConversationMessage(conversationIdentifier: string, sendAgentConversationMessageRequest: SendAgentConversationMessageRequest, _options?: Configuration): Promise { + let _config = _options || this.configuration; + + // verify required parameter 'conversationIdentifier' is not null or undefined + if (conversationIdentifier === null || conversationIdentifier === undefined) { + throw new RequiredError("ThoughtSpotRestApi", "sendAgentConversationMessage", "conversationIdentifier"); + } + + + // verify required parameter 'sendAgentConversationMessageRequest' is not null or undefined + if (sendAgentConversationMessageRequest === null || sendAgentConversationMessageRequest === undefined) { + throw new RequiredError("ThoughtSpotRestApi", "sendAgentConversationMessage", "sendAgentConversationMessageRequest"); + } + + + // Path Params + const localVarPath = '/api/rest/2.0/ai/agent/conversation/{conversation_identifier}/send' + .replace('{' + 'conversation_identifier' + '}', encodeURIComponent(String(conversationIdentifier))); + + // Make Request Context + const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.POST); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.25.0") + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.25.0") + + + + + // Body Params + const contentType = ObjectSerializer.getPreferredMediaType([ + "application/json" + ]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = ObjectSerializer.stringify( + ObjectSerializer.serialize(sendAgentConversationMessageRequest, "SendAgentConversationMessageRequest", ""), + contentType + ); + requestContext.setBody(serializedBody); + + let authMethod: SecurityAuthentication | undefined; + // Apply auth methods + authMethod = _config.authMethods["bearerAuth"] + if (authMethod?.applySecurityAuthentication) { + await authMethod?.applySecurityAuthentication(requestContext); + } + + const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default + if (defaultAuth?.applySecurityAuthentication) { + await defaultAuth?.applySecurityAuthentication(requestContext); + } + + return requestContext; + } + + /** + * Version: 26.5.0.cl or later Sends one or more natural language messages to an existing Spotter agent conversation and returns the response as a real-time Server-Sent Events stream. Requires `CAN_USE_SPOTTER` privilege and access to the metadata object associated with the conversation. The user must have access to the conversation session referenced by `conversation_identifier`. A conversation must first be created using the `createAgentConversation` API. #### Usage guidelines The request must include: - `conversation_identifier`: the unique session ID returned by `createAgentConversation`, used for context continuity and message tracking - `messages`: an array of one or more text messages to send to the agent If the request is valid, the API returns a Server-Sent Events (SSE) stream. Each line has the form `data: [{\"type\": \"...\", ...}]` — a JSON array of event objects. Event types include: - `ack`: confirms receipt of the request (`node_id`) - `conv_title`: conversation title (`title`, `conv_id`) - `notification`: status updates on operations (`group_id`, `metadata`, `code` — e.g. `TOOL_CALL_NOTIFICATION`, `nls_start`, `FINAL_RESPONSE_NOTIFICATION`) - `text-chunk`: incremental content chunks (`id`, `group_id`, `metadata` with `format` and `type` such as `thinking` or `text`, `content`) - `text`: full text block with same structure as `text-chunk` - `answer`: structured answer with metadata (`id`, `group_id`, `metadata` with `sage_query`, `session_id`, `title`, etc., `title`) - `error`: if a failure occurs #### Error responses | Code | Description | | ---- | -------------------------------------------------------------------------------------------------------------------------------- | | 401 | Unauthorized — authentication token is missing, expired, or invalid. | | 403 | Forbidden — the authenticated user does not have `CAN_USE_SPOTTER` privilege or lacks permission on the referenced conversation. | > ###### Note: > > - This endpoint is Generally Available from version 26.5.0.cl. > - This endpoint requires Spotter - please contact ThoughtSpot support to enable Spotter on your cluster. > - The streaming protocol uses Server-Sent Events (SSE). > - For the complete response in a single payload, use `sendAgentConversationMessage` instead. + * @param conversationIdentifier Unique identifier for the conversation (used to track context) + * @param sendAgentConversationMessageStreamingRequest + */ + public async sendAgentConversationMessageStreaming(conversationIdentifier: string, sendAgentConversationMessageStreamingRequest: SendAgentConversationMessageStreamingRequest, _options?: Configuration): Promise { + let _config = _options || this.configuration; + + // verify required parameter 'conversationIdentifier' is not null or undefined + if (conversationIdentifier === null || conversationIdentifier === undefined) { + throw new RequiredError("ThoughtSpotRestApi", "sendAgentConversationMessageStreaming", "conversationIdentifier"); + } + + + // verify required parameter 'sendAgentConversationMessageStreamingRequest' is not null or undefined + if (sendAgentConversationMessageStreamingRequest === null || sendAgentConversationMessageStreamingRequest === undefined) { + throw new RequiredError("ThoughtSpotRestApi", "sendAgentConversationMessageStreaming", "sendAgentConversationMessageStreamingRequest"); + } + + + // Path Params + const localVarPath = '/api/rest/2.0/ai/agent/conversation/{conversation_identifier}/send/stream' + .replace('{' + 'conversation_identifier' + '}', encodeURIComponent(String(conversationIdentifier))); + + // Make Request Context + const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.POST); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.25.0") + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.25.0") + + + + + // Body Params + const contentType = ObjectSerializer.getPreferredMediaType([ + "application/json" + ]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = ObjectSerializer.stringify( + ObjectSerializer.serialize(sendAgentConversationMessageStreamingRequest, "SendAgentConversationMessageStreamingRequest", ""), + contentType + ); + requestContext.setBody(serializedBody); + + let authMethod: SecurityAuthentication | undefined; + // Apply auth methods + authMethod = _config.authMethods["bearerAuth"] + if (authMethod?.applySecurityAuthentication) { + await authMethod?.applySecurityAuthentication(requestContext); + } + + const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default + if (defaultAuth?.applySecurityAuthentication) { + await defaultAuth?.applySecurityAuthentication(requestContext); + } + + return requestContext; + } + + /** + * Version: 26.2.0.cl or later **Deprecated** — Use `sendAgentConversationMessage` instead. Send natural language messages to an existing Spotter agent conversation and returns the complete response synchronously. Requires `CAN_USE_SPOTTER` privilege and access to the metadata object associated with the conversation. The user must have access to the conversation session referenced by `conversation_identifier`. A conversation must first be created using the `createAgentConversation` API. #### Usage guidelines The request must include: - `conversation_identifier`: the unique session ID returned by `createAgentConversation`, used for context continuity and message tracking - `messages`: an array of one or more text messages to send to the agent The API returns an array of response objects, each containing: - `type`: the kind of response — `text`, `answer`, or `error` - `message`: the main content of the response - `metadata`: additional information depending on the message type (e.g., answer metadata includes analytics and visualization details) #### Error responses | Code | Description | |------|----------------------------------------------------------------------------------------------------------------------------------| | 401 | Unauthorized — authentication token is missing, expired, or invalid. | | 403 | Forbidden — the authenticated user does not have `CAN_USE_SPOTTER` privilege or lacks permission on the referenced conversation. | > ###### Note: > > - This endpoint is deprecated. Use `sendAgentConversationMessage` for new integrations. > - This endpoint is currently in Beta. Breaking changes may be introduced before the endpoint is made Generally Available. > - This endpoint requires Spotter - please contact ThoughtSpot support to enable Spotter on your cluster. + * @param conversationIdentifier Unique identifier for the conversation (used to track context) + * @param sendAgentMessageRequest + */ + public async sendAgentMessage(conversationIdentifier: string, sendAgentMessageRequest: SendAgentMessageRequest, _options?: Configuration): Promise { + let _config = _options || this.configuration; + + // verify required parameter 'conversationIdentifier' is not null or undefined + if (conversationIdentifier === null || conversationIdentifier === undefined) { + throw new RequiredError("ThoughtSpotRestApi", "sendAgentMessage", "conversationIdentifier"); + } + + + // verify required parameter 'sendAgentMessageRequest' is not null or undefined + if (sendAgentMessageRequest === null || sendAgentMessageRequest === undefined) { + throw new RequiredError("ThoughtSpotRestApi", "sendAgentMessage", "sendAgentMessageRequest"); + } + + + // Path Params + const localVarPath = '/api/rest/2.0/ai/agent/{conversation_identifier}/converse' + .replace('{' + 'conversation_identifier' + '}', encodeURIComponent(String(conversationIdentifier))); + + // Make Request Context + const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.POST); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.25.0") + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.25.0") + + + + + // Body Params + const contentType = ObjectSerializer.getPreferredMediaType([ + "application/json" + ]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = ObjectSerializer.stringify( + ObjectSerializer.serialize(sendAgentMessageRequest, "SendAgentMessageRequest", ""), + contentType + ); + requestContext.setBody(serializedBody); + + let authMethod: SecurityAuthentication | undefined; + // Apply auth methods + authMethod = _config.authMethods["bearerAuth"] + if (authMethod?.applySecurityAuthentication) { + await authMethod?.applySecurityAuthentication(requestContext); + } + + const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default + if (defaultAuth?.applySecurityAuthentication) { + await defaultAuth?.applySecurityAuthentication(requestContext); + } + + return requestContext; + } + + /** + * Version: 26.2.0.cl or later **Deprecated** — Use `sendAgentConversationMessageStreaming` instead. Sends one or more natural language messages to an existing Spotter agent conversation and returns the response as a real-time Server-Sent Events stream. Requires `CAN_USE_SPOTTER` privilege and access to the metadata object associated with the conversation. The user must have access to the conversation session referenced by `conversation_identifier`. A conversation must first be created using the `createAgentConversation` API. #### Usage guidelines The request must include: - `conversation_identifier`: the unique session ID returned by `createAgentConversation`, used for context continuity and message tracking - `messages`: an array of one or more text messages to send to the agent If the request is valid, the API returns a Server-Sent Events (SSE) stream. Each line has the form `data: [{\"type\": \"...\", ...}]` — a JSON array of event objects. Event types include: - `ack`: confirms receipt of the request (`node_id`) - `conv_title`: conversation title (`title`, `conv_id`) - `notification`: status updates on operations (`group_id`, `metadata`, `code` — e.g. `TOOL_CALL_NOTIFICATION`, `nls_start`, `FINAL_RESPONSE_NOTIFICATION`) - `text-chunk`: incremental content chunks (`id`, `group_id`, `metadata` with `format` and `type` such as `thinking` or `text`, `content`) - `text`: full text block with same structure as `text-chunk` - `answer`: structured answer with metadata (`id`, `group_id`, `metadata` with `sage_query`, `session_id`, `title`, etc., `title`) - `error`: if a failure occurs #### Error responses | Code | Description | |------|----------------------------------------------------------------------------------------------------------------------------------| | 401 | Unauthorized — authentication token is missing, expired, or invalid. | | 403 | Forbidden — the authenticated user does not have `CAN_USE_SPOTTER` privilege or lacks permission on the referenced conversation. | > ###### Note: > > - This endpoint is deprecated. Use `sendAgentConversationMessageStreaming` for new integrations. > - This endpoint is currently in Beta. Breaking changes may be introduced before the endpoint is made Generally Available. > - This endpoint requires Spotter - please contact ThoughtSpot support to enable Spotter on your cluster. > - The streaming protocol uses Server-Sent Events (SSE). + * @param sendAgentMessageStreamingRequest + */ + public async sendAgentMessageStreaming(sendAgentMessageStreamingRequest: SendAgentMessageStreamingRequest, _options?: Configuration): Promise { + let _config = _options || this.configuration; + + // verify required parameter 'sendAgentMessageStreamingRequest' is not null or undefined + if (sendAgentMessageStreamingRequest === null || sendAgentMessageStreamingRequest === undefined) { + throw new RequiredError("ThoughtSpotRestApi", "sendAgentMessageStreaming", "sendAgentMessageStreamingRequest"); + } + + + // Path Params + const localVarPath = '/api/rest/2.0/ai/agent/converse/sse'; + + // Make Request Context + const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.POST); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.25.0") + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.25.0") + + + + + // Body Params + const contentType = ObjectSerializer.getPreferredMediaType([ + "application/json" + ]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = ObjectSerializer.stringify( + ObjectSerializer.serialize(sendAgentMessageStreamingRequest, "SendAgentMessageStreamingRequest", ""), + contentType + ); + requestContext.setBody(serializedBody); + + let authMethod: SecurityAuthentication | undefined; + // Apply auth methods + authMethod = _config.authMethods["bearerAuth"] + if (authMethod?.applySecurityAuthentication) { + await authMethod?.applySecurityAuthentication(requestContext); + } + + const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default + if (defaultAuth?.applySecurityAuthentication) { + await defaultAuth?.applySecurityAuthentication(requestContext); + } + + return requestContext; + } + + /** + * Version: 10.4.0.cl or later Sends a follow-up message to an existing conversation within the context of a data model. Requires `CAN_USE_SPOTTER` privilege and at least view access to the metadata object specified in the request. A conversation must first be created using the `createConversation` API. #### Usage guidelines The request must include: - `conversation_identifier`: the unique session ID returned by `createConversation` - `metadata_identifier`: the unique ID of the data source used for the conversation - `message`: a natural language string with the follow-up question If the request is successful, the API returns an array of response messages, each containing: - `session_identifier`: the unique ID of the generated response - `generation_number`: the generation number of the response - `message_type`: the type of the response (e.g., `TSAnswer`) - `visualization_type`: the generated visualization type (`Chart`, `Table`, or `Undefined`) - `tokens` / `display_tokens`: the search tokens and user-friendly display tokens for the response #### Error responses | Code | Description | |------|-----------------------------------------------------------------------------------------------------------------------------------------| | 401 | Unauthorized — authentication token is missing, expired, or invalid. | | 403 | Forbidden — the authenticated user does not have `CAN_USE_SPOTTER` privilege or lacks view permission on the specified metadata object. | > ###### Note: > * This endpoint is currently in Beta. Breaking changes may be introduced before the endpoint is made Generally Available. > * This endpoint requires Spotter - please contact ThoughtSpot support to enable Spotter on your cluster. + * @param conversationIdentifier Unique identifier of the conversation. + * @param sendMessageRequest + */ + public async sendMessage(conversationIdentifier: string, sendMessageRequest: SendMessageRequest, _options?: Configuration): Promise { + let _config = _options || this.configuration; + + // verify required parameter 'conversationIdentifier' is not null or undefined + if (conversationIdentifier === null || conversationIdentifier === undefined) { + throw new RequiredError("ThoughtSpotRestApi", "sendMessage", "conversationIdentifier"); + } + + + // verify required parameter 'sendMessageRequest' is not null or undefined + if (sendMessageRequest === null || sendMessageRequest === undefined) { + throw new RequiredError("ThoughtSpotRestApi", "sendMessage", "sendMessageRequest"); + } + + + // Path Params + const localVarPath = '/api/rest/2.0/ai/conversation/{conversation_identifier}/converse' + .replace('{' + 'conversation_identifier' + '}', encodeURIComponent(String(conversationIdentifier))); + + // Make Request Context + const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.POST); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.25.0") + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.25.0") + + + + + // Body Params + const contentType = ObjectSerializer.getPreferredMediaType([ + "application/json" + ]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = ObjectSerializer.stringify( + ObjectSerializer.serialize(sendMessageRequest, "SendMessageRequest", ""), + contentType + ); + requestContext.setBody(serializedBody); + + let authMethod: SecurityAuthentication | undefined; + // Apply auth methods + authMethod = _config.authMethods["bearerAuth"] + if (authMethod?.applySecurityAuthentication) { + await authMethod?.applySecurityAuthentication(requestContext); + } + + const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default + if (defaultAuth?.applySecurityAuthentication) { + await defaultAuth?.applySecurityAuthentication(requestContext); + } + + return requestContext; + } + + /** + * Version: 10.15.0.cl or later This API allows users to set natural language (NL) instructions for a specific data-model to improve AI-generated answers and query processing. These instructions help guide the AI system to better understand the data context and provide more accurate responses. Requires `CAN_USE_SPOTTER` privilege, either edit access or `SPOTTER_COACHING_PRIVILEGE` on the data model, and a bearer token corresponding to the org where the data model exists. #### Usage guidelines To set NL instructions for a data-model, the request must include: - `data_source_identifier`: The unique ID of the data-model for which to set NL instructions - `nl_instructions_info`: An array of instruction objects, each containing: - `instructions`: Array of text instructions for the LLM - `scope`: The scope of the instruction (`GLOBAL`). Currently only `GLOBAL` is supported. It can be extended to data-model-user scope in future. #### Instructions scope - **GLOBAL**: instructions that apply to all users querying this data model If the request is successful, the API returns: - `success`: a boolean indicating whether the operation completed successfully #### Error responses | Code | Description | |------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| | 401 | Unauthorized — authentication token is missing, expired, or invalid. | | 403 | Forbidden — the authenticated user does not have `CAN_USE_SPOTTER` privilege, lacks edit access or `SPOTTER_COACHING_PRIVILEGE` on the data model, or the bearer token does not correspond to the org where the data model exists. | > ###### Note: > > - To use this API, the user needs either edit access or `SPOTTER_COACHING_PRIVILEGE` on the data model, and must use the bearer token corresponding to the org where the data model exists. > - This endpoint is currently in Beta. Breaking changes may be introduced before the endpoint is made Generally Available. > - Available from version 10.15.0.cl and later. > - This endpoint requires Spotter — please contact ThoughtSpot Support to enable Spotter on your cluster. > - Instructions help improve the accuracy and relevance of AI-generated responses for the specified data-model. + * @param setNLInstructionsRequest + */ + public async setNLInstructions(setNLInstructionsRequest: SetNLInstructionsRequest, _options?: Configuration): Promise { + let _config = _options || this.configuration; + + // verify required parameter 'setNLInstructionsRequest' is not null or undefined + if (setNLInstructionsRequest === null || setNLInstructionsRequest === undefined) { + throw new RequiredError("ThoughtSpotRestApi", "setNLInstructions", "setNLInstructionsRequest"); + } + + + // Path Params + const localVarPath = '/api/rest/2.0/ai/instructions/set'; + + // Make Request Context + const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.POST); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.25.0") + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.25.0") + + + + + // Body Params + const contentType = ObjectSerializer.getPreferredMediaType([ + "application/json" + ]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = ObjectSerializer.stringify( + ObjectSerializer.serialize(setNLInstructionsRequest, "SetNLInstructionsRequest", ""), + contentType + ); + requestContext.setBody(serializedBody); + + let authMethod: SecurityAuthentication | undefined; + // Apply auth methods + authMethod = _config.authMethods["bearerAuth"] + if (authMethod?.applySecurityAuthentication) { + await authMethod?.applySecurityAuthentication(requestContext); + } + + const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default + if (defaultAuth?.applySecurityAuthentication) { + await defaultAuth?.applySecurityAuthentication(requestContext); + } + + return requestContext; + } + + /** + * Version: 9.0.0.cl or later Allows sharing one or several metadata objects with users and groups in ThoughtSpot. Requires edit access to the metadata object. #### Supported metadata objects: * Liveboards * Visualizations * Answers * Models * Views * Connections * Collections #### Object permissions You can provide `READ_ONLY` or `MODIFY` access when sharing an object with another user or group. The `READ_ONLY` permission grants view access to the shared object, whereas `MODIFY` provides edit access. To prevent a user or group from accessing the shared object, specify the GUID or name of the principal and set `shareMode` to `NO_ACCESS`. #### Sharing a visualization * Sharing a visualization implicitly shares the entire Liveboard with the recipient. * Object permissions set for a shared visualization also apply to the Liveboard unless overridden by another API request or via UI. * If email notifications for object sharing are enabled, a notification with a link to the shared visualization will be sent to the recipient’s email address. Although this link opens the shared visualization, recipients can also access other visualizations in the Liveboard. #### Sharing a collection Collections support **dual permissions** that provide fine-grained control: * **Collection permissions** (`share_mode`) - controls access to the collection itself (view, edit, delete the collection) * **Content permissions** (`content_share_mode`) - controls access to objects within the collection (view, edit objects inside) **Default Behavior:** - If only `share_mode` is specified, the content permissions default to `READ_ONLY` (except when `share_mode` is `NO_ACCESS`, then content also gets `NO_ACCESS`) - To give users edit access to collection contents, explicitly set `content_share_mode: \"MODIFY\"` ## Examples The following JSON examples can be copy-pasted as request bodies for the REST v2 API endpoint: ```bash POST /callosum/v1/v2/security/metadata/share Content-Type: application/x-www-form-urlencoded ``` ### Basic collection sharing Share a collection with read-only access: ```json { \"metadata_type\": \"COLLECTION\", \"metadata_identifiers\": [\"Sales Reports Collection\"], \"permissions\": [{ \"principal\": { \"type\": \"USER\", \"identifier\": \"alice@company.com\" }, \"share_mode\": \"READ_ONLY\" }], \"notification\": { \"message\": \"I\'ve shared the Sales Reports collection with you\", \"notify_on_share\": true } } ``` ### Collection sharing with dual permissions Share a collection with different permissions for the collection vs. its contents: ```json { \"metadata_type\": \"COLLECTION\", \"metadata_identifiers\": [\"Marketing Analytics\"], \"permissions\": [{ \"principal\": { \"type\": \"USER\", \"identifier\": \"bob@company.com\" }, \"share_mode\": \"MODIFY\", \"content_share_mode\": \"READ_ONLY\" }, { \"principal\": { \"type\": \"USER_GROUP\", \"identifier\": \"Marketing Team\" }, \"share_mode\": \"READ_ONLY\", \"content_share_mode\": \"READ_ONLY\" }], \"notification\": { \"emails\": [\"bob@company.com\"], \"message\": \"You can edit the collection but content is read-only\", \"enable_custom_url\": false, \"notify_on_share\": true }, \"has_lenient_discoverability\": false } ``` ### Multiple collections sharing Share multiple collections with different users: ```json { \"metadata\": [ { \"type\": \"COLLECTION\", \"identifier\": \"Q4 Reports\" }, { \"type\": \"COLLECTION\", \"identifier\": \"Executive Dashboard Collection\" } ], \"permissions\": [{ \"principal\": { \"type\": \"USER_GROUP\", \"identifier\": \"Executives\" }, \"share_mode\": \"MODIFY\" }, { \"principal\": { \"type\": \"USER\", \"identifier\": \"manager@company.com\" }, \"share_mode\": \"READ_ONLY\", \"content_share_mode\": \"MODIFY\" }], \"notification\": { \"message\": \"Sharing quarterly collections with leadership team\", \"notify_on_share\": true } } ``` ### Remove collection access Remove access to a collection by setting share_mode to NO_ACCESS: ```json { \"metadata_type\": \"COLLECTION\", \"metadata_identifiers\": [\"Confidential Reports\"], \"permissions\": [{ \"principal\": { \"type\": \"USER\", \"identifier\": \"former-employee@company.com\" }, \"share_mode\": \"NO_ACCESS\" }], \"notification\": { \"notify_on_share\": false } } ``` ### Collection Permission Scenarios **Scenario 1: Collection Admin** - `share_mode: MODIFY` + `content_share_mode: MODIFY` = Full control over collection and its contents **Scenario 2: Collection Curator** - `share_mode: MODIFY` + `content_share_mode: READ_ONLY` = Can manage collection structure but not edit contents **Scenario 3: Content Editor** - `share_mode: READ_ONLY` + `content_share_mode: MODIFY` = Can edit objects within collection but can\'t change collection itself **Scenario 4: Viewer** - `share_mode: READ_ONLY` + `content_share_mode: READ_ONLY` = View-only access to collection and contents + * @param shareMetadataRequest + */ + public async shareMetadata(shareMetadataRequest: ShareMetadataRequest, _options?: Configuration): Promise { + let _config = _options || this.configuration; + + // verify required parameter 'shareMetadataRequest' is not null or undefined + if (shareMetadataRequest === null || shareMetadataRequest === undefined) { + throw new RequiredError("ThoughtSpotRestApi", "shareMetadata", "shareMetadataRequest"); + } + + + // Path Params + const localVarPath = '/api/rest/2.0/security/metadata/share'; + + // Make Request Context + const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.POST); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.25.0") + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.25.0") + + + + + // Body Params + const contentType = ObjectSerializer.getPreferredMediaType([ + "application/json" + ]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = ObjectSerializer.stringify( + ObjectSerializer.serialize(shareMetadataRequest, "ShareMetadataRequest", ""), + contentType + ); + requestContext.setBody(serializedBody); + + let authMethod: SecurityAuthentication | undefined; + // Apply auth methods + authMethod = _config.authMethods["bearerAuth"] + if (authMethod?.applySecurityAuthentication) { + await authMethod?.applySecurityAuthentication(requestContext); + } + + const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default + if (defaultAuth?.applySecurityAuthentication) { + await defaultAuth?.applySecurityAuthentication(requestContext); + } + + return requestContext; + } + + /** + * Version: 10.4.0.cl or later Processes a natural language query against a specified data model and returns a single AI-generated answer without requiring a conversation session. Requires `CAN_USE_SPOTTER` privilege and at least view access to the metadata object specified in the request. #### Usage guidelines The request must include: - `query`: a natural language question (e.g., \"What were total sales last quarter?\") - `metadata_identifier`: the unique ID of the data source to query against If the request is successful, the API returns a response message containing: - `session_identifier`: the unique ID of the generated response - `generation_number`: the generation number of the response - `message_type`: the type of the response (e.g., `TSAnswer`) - `visualization_type`: the generated visualization type (`Chart`, `Table`, or `Undefined`) - `tokens` / `display_tokens`: the search tokens and user-friendly display tokens for the response #### Error responses | Code | Description | |------|-----------------------------------------------------------------------------------------------------------------------------------------| | 401 | Unauthorized — authentication token is missing, expired, or invalid. | | 403 | Forbidden — the authenticated user does not have `CAN_USE_SPOTTER` privilege or lacks view permission on the specified metadata object. | > ###### Note: > * This endpoint is currently in Beta. Breaking changes may be introduced before the endpoint is made Generally Available. > * This endpoint requires Spotter - please contact ThoughtSpot support to enable Spotter on your cluster. + * @param singleAnswerRequest + */ + public async singleAnswer(singleAnswerRequest: SingleAnswerRequest, _options?: Configuration): Promise { + let _config = _options || this.configuration; + + // verify required parameter 'singleAnswerRequest' is not null or undefined + if (singleAnswerRequest === null || singleAnswerRequest === undefined) { + throw new RequiredError("ThoughtSpotRestApi", "singleAnswer", "singleAnswerRequest"); + } + + + // Path Params + const localVarPath = '/api/rest/2.0/ai/answer/create'; + + // Make Request Context + const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.POST); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.25.0") + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.25.0") + + + + + // Body Params + const contentType = ObjectSerializer.getPreferredMediaType([ + "application/json" + ]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = ObjectSerializer.stringify( + ObjectSerializer.serialize(singleAnswerRequest, "SingleAnswerRequest", ""), + contentType + ); + requestContext.setBody(serializedBody); + + let authMethod: SecurityAuthentication | undefined; + // Apply auth methods + authMethod = _config.authMethods["bearerAuth"] + if (authMethod?.applySecurityAuthentication) { + await authMethod?.applySecurityAuthentication(requestContext); + } + + const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default + if (defaultAuth?.applySecurityAuthentication) { + await defaultAuth?.applySecurityAuthentication(requestContext); + } + + return requestContext; + } + + /** + * Stops an in-progress agent conversation response. Version: 26.6.0.cl or later Version: 26.6.0.cl or later Stops an in-progress agent response for the specified conversation. Use this endpoint to cancel a response that is actively being generated — for example, when the user navigates away, reformulates their question, or no longer needs the current result. Requires `CAN_USE_SPOTTER` privilege and access to the specified conversation. #### Usage guidelines The request must include: - `conversation_identifier` *(path parameter)*: the unique ID of the conversation whose active response should be stopped, as returned by `createAgentConversation` A successful request returns an empty `204 No Content` response. If there is no active response in progress at the time of the call, the request is still treated as successful. After stopping a response, the conversation session remains active. You can continue sending messages using `sendAgentConversationMessage` or `sendAgentConversationMessageStreaming`. #### Example request ```bash POST /api/rest/2.0/ai/agent/conversation/{conversation_identifier}/stop-response ``` #### Typical usage scenario This endpoint is useful when integrating Spotter into a chat UI where users can cancel a long-running query. For example: 1. User sends a message via `sendAgentConversationMessageStreaming`. 2. User clicks a \"Stop generating\" button while the response is streaming. 3. Your client calls `stopConversation` with the active `conversation_identifier`. 4. The stream is terminated and the user can ask a new question. #### Error responses | Code | Description | |------|-------------| | 401 | Unauthorized — authentication token is missing, expired, or invalid. | | 403 | Forbidden — the authenticated user does not have `CAN_USE_SPOTTER` privilege or lacks access to the specified conversation. | > ###### Note: > > - Calling this endpoint when no response is in progress does not return an error. > - The conversation context is preserved after stopping — previous messages and answers remain accessible. > - Available from version 26.6.0.cl and later. > - This endpoint requires Spotter — please contact ThoughtSpot Support to enable Spotter on your cluster. > - This feature is available only for **Spotter 3** (`SPOTTER3`) version. + * @param conversationIdentifier Unique identifier of the conversation to stop. + */ + public async stopConversation(conversationIdentifier: string, _options?: Configuration): Promise { + let _config = _options || this.configuration; + + // verify required parameter 'conversationIdentifier' is not null or undefined + if (conversationIdentifier === null || conversationIdentifier === undefined) { + throw new RequiredError("ThoughtSpotRestApi", "stopConversation", "conversationIdentifier"); + } + + + // Path Params + const localVarPath = '/api/rest/2.0/ai/agent/conversation/{conversation_identifier}/stop-response' + .replace('{' + 'conversation_identifier' + '}', encodeURIComponent(String(conversationIdentifier))); + + // Make Request Context + const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.POST); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.25.0") + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.25.0") + + + + + let authMethod: SecurityAuthentication | undefined; + // Apply auth methods + authMethod = _config.authMethods["bearerAuth"] + if (authMethod?.applySecurityAuthentication) { + await authMethod?.applySecurityAuthentication(requestContext); + } + + const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default + if (defaultAuth?.applySecurityAuthentication) { + await defaultAuth?.applySecurityAuthentication(requestContext); + } + + return requestContext; + } + + /** + * Version: 26.5.0.cl or later Synchronizes connection metadata attributes from your Cloud Data Warehouse (CDW) with ThoughtSpot. Requires the `DATAMANAGEMENT` (**Can manage data**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` (**Can manage data models**) privilege is required. #### Usage guidelines To synchronize attributes from a CDW, specify the connection GUID or name in the `connection_identifier` path parameter and `sync_attributes` in the request body. Default attribute is `[\"DESCRIPTION\"]`. ##### Hierarchical schema * Connection: The connection object for the sync operation. * Tables: Tables for the sync operation. When no table is specified, all tables are synchronized. * Columns: If the table is specified, you can add the columns for the sync operation. If no columns are specified, all columns in the specified table are considered for the sync operation. To set the scope for the sync operation: * Connection-level: To sync all tables and columns, pass an empty request body, or only the attributes in the request body. * Table-level: To synchronize specific tables and their columns, specify the table identifiers in the `tables` array. * Column-level: To synchronize specific columns, specify the table identifier as the key and column identifiers as the value in the `tables` array. ``` { \"tables\": [ {\"table-guid-1\": [\"column-guid-1\", \"column-guid-2\"]}, \"table-guid-2\" ], \"sync_attributes\": [\"DESCRIPTION\"] } ``` ##### API response If the sync operation is successful, the API returns the following information: * Status of the sync operation. For example, `SUCCESS`, `PARTIAL_SUCCESS`, or `NO_UPDATE`. * Number of tables and columns that were updated. * Number of tables and columns with the sync failed status when the overall sync status is `PARTIAL_SUCCESS`. * Message text indicating the sync results. + * @param connectionIdentifier Unique ID or name of the connection. + * @param syncMetadataRequest + */ + public async syncMetadata(connectionIdentifier: string, syncMetadataRequest: SyncMetadataRequest, _options?: Configuration): Promise { + let _config = _options || this.configuration; + + // verify required parameter 'connectionIdentifier' is not null or undefined + if (connectionIdentifier === null || connectionIdentifier === undefined) { + throw new RequiredError("ThoughtSpotRestApi", "syncMetadata", "connectionIdentifier"); + } + + + // verify required parameter 'syncMetadataRequest' is not null or undefined + if (syncMetadataRequest === null || syncMetadataRequest === undefined) { + throw new RequiredError("ThoughtSpotRestApi", "syncMetadata", "syncMetadataRequest"); + } + + + // Path Params + const localVarPath = '/api/rest/2.0/connections/{connection_identifier}/resync-metadata' + .replace('{' + 'connection_identifier' + '}', encodeURIComponent(String(connectionIdentifier))); + + // Make Request Context + const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.POST); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.25.0") + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.25.0") + + + + + // Body Params + const contentType = ObjectSerializer.getPreferredMediaType([ + "application/json" + ]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = ObjectSerializer.stringify( + ObjectSerializer.serialize(syncMetadataRequest, "SyncMetadataRequest", ""), + contentType + ); + requestContext.setBody(serializedBody); + + let authMethod: SecurityAuthentication | undefined; + // Apply auth methods + authMethod = _config.authMethods["bearerAuth"] + if (authMethod?.applySecurityAuthentication) { + await authMethod?.applySecurityAuthentication(requestContext); + } + + const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default + if (defaultAuth?.applySecurityAuthentication) { + await defaultAuth?.applySecurityAuthentication(requestContext); + } + + return requestContext; + } + + /** + * Version: 9.0.0.cl or later Removes the tags applied to a Liveboard, Answer, Table, or Worksheet. Requires edit access to the metadata object. + * @param unassignTagRequest + */ + public async unassignTag(unassignTagRequest: UnassignTagRequest, _options?: Configuration): Promise { + let _config = _options || this.configuration; + + // verify required parameter 'unassignTagRequest' is not null or undefined + if (unassignTagRequest === null || unassignTagRequest === undefined) { + throw new RequiredError("ThoughtSpotRestApi", "unassignTag", "unassignTagRequest"); + } + + + // Path Params + const localVarPath = '/api/rest/2.0/tags/unassign'; + + // Make Request Context + const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.POST); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.25.0") + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.25.0") + + + + + // Body Params + const contentType = ObjectSerializer.getPreferredMediaType([ + "application/json" + ]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = ObjectSerializer.stringify( + ObjectSerializer.serialize(unassignTagRequest, "UnassignTagRequest", ""), + contentType + ); + requestContext.setBody(serializedBody); + + let authMethod: SecurityAuthentication | undefined; + // Apply auth methods + authMethod = _config.authMethods["bearerAuth"] + if (authMethod?.applySecurityAuthentication) { + await authMethod?.applySecurityAuthentication(requestContext); + } + + const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default + if (defaultAuth?.applySecurityAuthentication) { + await defaultAuth?.applySecurityAuthentication(requestContext); + } + + return requestContext; + } + + /** + * Remove parameterization from fields in metadata objects. Version: 26.5.0.cl or later Allows removing parameterization from fields in metadata objects in ThoughtSpot. Requires appropriate permissions to modify the metadata object. The API endpoint allows unparameterizing the following types of metadata objects: * Logical Tables * Connections * Connection Configs For a Logical Table the field type must be `ATTRIBUTE` and field name can be one of: * databaseName * schemaName * tableName For a Connection or Connection Config, the field type is always `CONNECTION_PROPERTY`. In this case, field_name specifies the exact property of the Connection or Connection Config that needs to be unparameterized. For Connection Config, the only supported field name is: * impersonate_user + * @param unparameterizeMetadataRequest + */ + public async unparameterizeMetadata(unparameterizeMetadataRequest: UnparameterizeMetadataRequest, _options?: Configuration): Promise { + let _config = _options || this.configuration; + + // verify required parameter 'unparameterizeMetadataRequest' is not null or undefined + if (unparameterizeMetadataRequest === null || unparameterizeMetadataRequest === undefined) { + throw new RequiredError("ThoughtSpotRestApi", "unparameterizeMetadata", "unparameterizeMetadataRequest"); + } + + + // Path Params + const localVarPath = '/api/rest/2.0/metadata/unparameterize'; + + // Make Request Context + const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.POST); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.25.0") + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.25.0") + + + + + // Body Params + const contentType = ObjectSerializer.getPreferredMediaType([ + "application/json" + ]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = ObjectSerializer.stringify( + ObjectSerializer.serialize(unparameterizeMetadataRequest, "UnparameterizeMetadataRequest", ""), + contentType + ); + requestContext.setBody(serializedBody); + + let authMethod: SecurityAuthentication | undefined; + // Apply auth methods + authMethod = _config.authMethods["bearerAuth"] + if (authMethod?.applySecurityAuthentication) { + await authMethod?.applySecurityAuthentication(requestContext); + } + + const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default + if (defaultAuth?.applySecurityAuthentication) { + await defaultAuth?.applySecurityAuthentication(requestContext); + } + + return requestContext; + } + + /** + * Version: 26.5.0.cl or later Allows unpublishing metadata objects from organizations in ThoughtSpot. Requires ADMINISTRATION role and TENANT scope. The API endpoint allows unpublishing the following types of metadata objects: * Liveboards * Answers * Logical Tables When unpublishing objects, you can: * Include dependencies by setting `include_dependencies` to true - this will unpublish all dependent objects if no other published object is using them * Force unpublish by setting `force` to true - this will break all dependent objects in the unpublished organizations + * @param unpublishMetadataRequest + */ + public async unpublishMetadata(unpublishMetadataRequest: UnpublishMetadataRequest, _options?: Configuration): Promise { + let _config = _options || this.configuration; + + // verify required parameter 'unpublishMetadataRequest' is not null or undefined + if (unpublishMetadataRequest === null || unpublishMetadataRequest === undefined) { + throw new RequiredError("ThoughtSpotRestApi", "unpublishMetadata", "unpublishMetadataRequest"); + } + + + // Path Params + const localVarPath = '/api/rest/2.0/security/metadata/unpublish'; + + // Make Request Context + const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.POST); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.25.0") + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.25.0") + + + + + // Body Params + const contentType = ObjectSerializer.getPreferredMediaType([ + "application/json" + ]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = ObjectSerializer.stringify( + ObjectSerializer.serialize(unpublishMetadataRequest, "UnpublishMetadataRequest", ""), + contentType + ); + requestContext.setBody(serializedBody); + + let authMethod: SecurityAuthentication | undefined; + // Apply auth methods + authMethod = _config.authMethods["bearerAuth"] + if (authMethod?.applySecurityAuthentication) { + await authMethod?.applySecurityAuthentication(requestContext); + } + + const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default + if (defaultAuth?.applySecurityAuthentication) { + await defaultAuth?.applySecurityAuthentication(requestContext); + } + + return requestContext; + } + + /** + * Version: 10.12.0.cl or later Updates the properties of a [custom calendar](https://docs.thoughtspot.com/cloud/latest/connections-cust-cal). Requires `DATAMANAGEMENT` (**Can manage data**) or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your ThoughtSpot instance, the `CAN_MANAGE_CUSTOM_CALENDAR` (**Can manage custom calendars**) privilege is required. #### Usage guidelines You can update the properties of a calendar using one of the following methods: * `FROM_INPUT_PARAMS` to update the calendar properties with the values defined in the API request. * `FROM_EXISTING_TABLE` Creates a calendar from the parameters defined in the API request. To update a custom calendar, specify the calendar ID as a path parameter in the request URL and the following parameters in the request body: * Connection ID and Table name * Database and schema name attributes: For most Cloud Data Warehouse (CDW) connectors, both `database_name` and `schema_name` attributes are required. However, the attribute requirements are conditional and vary based on the connector type and its metadata structure. For example, for connectors such as Teradata, MySQL, SingleSore, Amazon Aurora MySQL, Amazon RDS MySQL, Oracle, and GCP_MYSQL, the `schema_name` is required, whereas the `database_name` attribute is not. Similarly, connectors such as ClickHouse require you to specify the `database_name` and the schema specification in such cases is optional. The API allows you to modify the calendar type, month offset value, start and end date, starting day of the week, and prefixes assigned to the year and quarter labels. #### Examples Update a custom calendar using an existing Table in ThoughtSpot: ``` { \"update_method\": \"FROM_EXISTING_TABLE\", \"table_reference\": { \"connection_identifier\": \"Connection1\", \"database_name\": \"db1\", \"table_name\": \"custom_calendar_2025\", \"schame_name\": \"schemaVar\" } } ``` Update a custom calendar with the attributes defined in the API request: ``` { \"update_method\": \"FROM_INPUT_PARAMS\", \"table_reference\": { \"connection_identifier\": \"Connection1\", \"database_name\": \"db1\", \"table_name\": \"custom_calendar_2025\", \"schame_name\": \"schemaVar\" }, \"month_offset\": \"August\", \"start_day_of_week\": \"Monday\", \"start_date\": \"08/01/2025\", \"end_date\": \"07/31/2026\" } ``` + * @param calendarIdentifier Unique Id or name of the calendar. + * @param updateCalendarRequest + */ + public async updateCalendar(calendarIdentifier: string, updateCalendarRequest: UpdateCalendarRequest, _options?: Configuration): Promise { + let _config = _options || this.configuration; + + // verify required parameter 'calendarIdentifier' is not null or undefined + if (calendarIdentifier === null || calendarIdentifier === undefined) { + throw new RequiredError("ThoughtSpotRestApi", "updateCalendar", "calendarIdentifier"); + } + + + // verify required parameter 'updateCalendarRequest' is not null or undefined + if (updateCalendarRequest === null || updateCalendarRequest === undefined) { + throw new RequiredError("ThoughtSpotRestApi", "updateCalendar", "updateCalendarRequest"); + } + + + // Path Params + const localVarPath = '/api/rest/2.0/calendars/{calendar_identifier}/update' + .replace('{' + 'calendar_identifier' + '}', encodeURIComponent(String(calendarIdentifier))); + + // Make Request Context + const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.POST); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.25.0") + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.25.0") + + + + + // Body Params + const contentType = ObjectSerializer.getPreferredMediaType([ + "application/json" + ]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = ObjectSerializer.stringify( + ObjectSerializer.serialize(updateCalendarRequest, "UpdateCalendarRequest", ""), + contentType + ); + requestContext.setBody(serializedBody); + + let authMethod: SecurityAuthentication | undefined; + // Apply auth methods + authMethod = _config.authMethods["bearerAuth"] + if (authMethod?.applySecurityAuthentication) { + await authMethod?.applySecurityAuthentication(requestContext); + } + + const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default + if (defaultAuth?.applySecurityAuthentication) { + await defaultAuth?.applySecurityAuthentication(requestContext); + } + + return requestContext; + } + + /** + * Version: 26.4.0.cl or later Updates an existing collection in ThoughtSpot. #### Supported operations This API endpoint lets you perform the following operations: * Update collection name and description * Change visibility settings * Add metadata objects to the collection (operation: ADD) * Remove metadata objects from the collection (operation: REMOVE) * Replace all metadata objects in the collection (operation: REPLACE) #### Operation types * **ADD**: Adds the specified metadata objects to the existing collection without removing current items * **REMOVE**: Removes only the specified metadata objects from the collection * **REPLACE**: Replaces all existing metadata objects with the specified items (default behavior) + * @param collectionIdentifier Unique GUID of the collection. Note: Collection names cannot be used as identifiers since duplicate names are allowed. + * @param updateCollectionRequest + */ + public async updateCollection(collectionIdentifier: string, updateCollectionRequest: UpdateCollectionRequest, _options?: Configuration): Promise { + let _config = _options || this.configuration; + + // verify required parameter 'collectionIdentifier' is not null or undefined + if (collectionIdentifier === null || collectionIdentifier === undefined) { + throw new RequiredError("ThoughtSpotRestApi", "updateCollection", "collectionIdentifier"); + } + + + // verify required parameter 'updateCollectionRequest' is not null or undefined + if (updateCollectionRequest === null || updateCollectionRequest === undefined) { + throw new RequiredError("ThoughtSpotRestApi", "updateCollection", "updateCollectionRequest"); + } + + + // Path Params + const localVarPath = '/api/rest/2.0/collections/{collection_identifier}/update' + .replace('{' + 'collection_identifier' + '}', encodeURIComponent(String(collectionIdentifier))); + + // Make Request Context + const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.POST); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.25.0") + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.25.0") + + + + + // Body Params + const contentType = ObjectSerializer.getPreferredMediaType([ + "application/json" + ]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = ObjectSerializer.stringify( + ObjectSerializer.serialize(updateCollectionRequest, "UpdateCollectionRequest", ""), + contentType + ); + requestContext.setBody(serializedBody); + + let authMethod: SecurityAuthentication | undefined; + // Apply auth methods + authMethod = _config.authMethods["bearerAuth"] + if (authMethod?.applySecurityAuthentication) { + await authMethod?.applySecurityAuthentication(requestContext); + } + + const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default + if (defaultAuth?.applySecurityAuthentication) { + await defaultAuth?.applySecurityAuthentication(requestContext); + } + + return requestContext; + } + + /** + * Version: 10.12.0.cl or later Creates, updates, or deletes column security rules for specified tables. This API endpoint allows you to create, update, or delete column-level security rules on columns of a table. The operation follows an \"all or none\" policy: if defining security rules for any of the provided columns fails, the entire operation will be rolled back, and no rules will be created. #### Usage guidelines - Provide table identifier using either `identifier` (GUID or name) or `obj_identifier` (object ID) - Use `clear_csr: true` to remove all column security rules from the table - For each column, specify the security rule using `column_security_rules` array - Use `is_unsecured: true` to mark a specific column as unprotected - Use `group_access` operations to manage group associations: - `ADD`: Add groups to the column\'s access list - `REMOVE`: Remove groups from the column\'s access list - `REPLACE`: Replace all existing groups with the specified groups #### Required permissions - `ADMINISTRATION` - Can administer ThoughtSpot - `DATAMANAGEMENT` - Can manage data (if RBAC is disabled) - `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` - Can manage worksheet views and tables (if RBAC is enabled) #### Example request ```json { \"identifier\": \"table-guid\", \"obj_identifier\": \"table-object-id\", \"clear_csr\": false, \"column_security_rules\": [ { \"column_identifier\": \"col id or col name\", \"is_unsecured\": false, \"group_access\": [ { \"operation\": \"ADD\", \"group_identifiers\": [\"hr_group_id\", \"hr_group_name\", \"finance_group_id\"] } ] }, { \"column_identifier\": \"col id or col name\", \"is_unsecured\": true }, { \"column_identifier\": \"col id or col name\", \"is_unsecured\": false, \"group_access\": [ { \"operation\": \"REPLACE\", \"group_identifiers\": [\"management_group_id\", \"management_group_name\"] } ] } ] } ``` #### Request Body Schema - `identifier` (string, optional): GUID or name of the table for which we want to create column security rules - `obj_identifier` (string, optional): The object ID of the table - `clear_csr` (boolean, optional): If true, then all the secured columns will be marked as unprotected, and all the group associations will be removed - `column_security_rules` (array of objects, required): An array where each object defines the security rule for a specific column Each column security rule object contains: - `column_identifier` (string, required): Column identifier (col_id or name) - `is_unsecured` (boolean, optional): If true, the column will be marked as unprotected and all groups associated with it will be removed - `group_access` (array of objects, optional): Array of group operation objects Each group operation object contains: - `operation` (string, required): Operation type - ADD, REMOVE, or REPLACE - `group_identifiers` (array of strings, required): Array of group identifiers (name or GUID) on which the operation will be performed #### Response This API does not return any response body. A successful operation returns HTTP 200 status code. #### Operation Types - **ADD**: Adds the specified groups to the column\'s access list - **REMOVE**: Removes the specified groups from the column\'s access list - **REPLACE**: Replaces all existing groups with the specified groups + * @param updateColumnSecurityRulesRequest + */ + public async updateColumnSecurityRules(updateColumnSecurityRulesRequest: UpdateColumnSecurityRulesRequest, _options?: Configuration): Promise { + let _config = _options || this.configuration; + + // verify required parameter 'updateColumnSecurityRulesRequest' is not null or undefined + if (updateColumnSecurityRulesRequest === null || updateColumnSecurityRulesRequest === undefined) { + throw new RequiredError("ThoughtSpotRestApi", "updateColumnSecurityRules", "updateColumnSecurityRulesRequest"); + } + + + // Path Params + const localVarPath = '/api/rest/2.0/security/column/rules/update'; + + // Make Request Context + const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.POST); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.25.0") + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.25.0") + + + + + // Body Params + const contentType = ObjectSerializer.getPreferredMediaType([ + "application/json" + ]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = ObjectSerializer.stringify( + ObjectSerializer.serialize(updateColumnSecurityRulesRequest, "UpdateColumnSecurityRulesRequest", ""), + contentType + ); + requestContext.setBody(serializedBody); + + let authMethod: SecurityAuthentication | undefined; + // Apply auth methods + authMethod = _config.authMethods["bearerAuth"] + if (authMethod?.applySecurityAuthentication) { + await authMethod?.applySecurityAuthentication(requestContext); + } + + const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default + if (defaultAuth?.applySecurityAuthentication) { + await defaultAuth?.applySecurityAuthentication(requestContext); + } + + return requestContext; + } + + /** + * Version: 9.2.0.cl or later Updates Git repository configuration settings. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance on your instance, the `CAN_SETUP_VERSION_CONTROL` (**Can set up version control**) privilege. + * @param updateConfigRequest + */ + public async updateConfig(updateConfigRequest: UpdateConfigRequest, _options?: Configuration): Promise { + let _config = _options || this.configuration; + + // verify required parameter 'updateConfigRequest' is not null or undefined + if (updateConfigRequest === null || updateConfigRequest === undefined) { + throw new RequiredError("ThoughtSpotRestApi", "updateConfig", "updateConfigRequest"); + } + + + // Path Params + const localVarPath = '/api/rest/2.0/vcs/git/config/update'; + + // Make Request Context + const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.POST); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.25.0") + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.25.0") + + + + + // Body Params + const contentType = ObjectSerializer.getPreferredMediaType([ + "application/json" + ]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = ObjectSerializer.stringify( + ObjectSerializer.serialize(updateConfigRequest, "UpdateConfigRequest", ""), + contentType + ); + requestContext.setBody(serializedBody); + + let authMethod: SecurityAuthentication | undefined; + // Apply auth methods + authMethod = _config.authMethods["bearerAuth"] + if (authMethod?.applySecurityAuthentication) { + await authMethod?.applySecurityAuthentication(requestContext); + } + + const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default + if (defaultAuth?.applySecurityAuthentication) { + await defaultAuth?.applySecurityAuthentication(requestContext); + } + + return requestContext; + } + + /** + * Version: 9.2.0.cl or later **Important**: This endpoint is deprecated and will be removed from ThoughtSpot in September 2025. ThoughtSpot strongly recommends using the [Update connection V2](#/http/api-endpoints/connections/update-connection-v2) endpoint to update your connection objects. #### Usage guidelines Updates a connection object. Requires `DATAMANAGEMENT` (**Can manage data**) and edit permissions to the connection object, or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) privilege is required. To update a connection object, pass these parameters in your API request: 1. GUID of the connection object. 2. If you are updating tables or database schema of a connection object: a. Add the updated JSON map of metadata with database, schema, and tables in `data_warehouse_config`. b. Set `validate` to `true`. 3. If you are updating a configuration attribute, connection name, or description, you can set `validate` to `false`. + * @param updateConnectionRequest + */ + public async updateConnection(updateConnectionRequest: UpdateConnectionRequest, _options?: Configuration): Promise { + let _config = _options || this.configuration; + + // verify required parameter 'updateConnectionRequest' is not null or undefined + if (updateConnectionRequest === null || updateConnectionRequest === undefined) { + throw new RequiredError("ThoughtSpotRestApi", "updateConnection", "updateConnectionRequest"); + } + + + // Path Params + const localVarPath = '/api/rest/2.0/connection/update'; + + // Make Request Context + const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.POST); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.25.0") + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.25.0") + + + + + // Body Params + const contentType = ObjectSerializer.getPreferredMediaType([ + "application/json" + ]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = ObjectSerializer.stringify( + ObjectSerializer.serialize(updateConnectionRequest, "UpdateConnectionRequest", ""), + contentType + ); + requestContext.setBody(serializedBody); + + let authMethod: SecurityAuthentication | undefined; + // Apply auth methods + authMethod = _config.authMethods["bearerAuth"] + if (authMethod?.applySecurityAuthentication) { + await authMethod?.applySecurityAuthentication(requestContext); + } + + const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default + if (defaultAuth?.applySecurityAuthentication) { + await defaultAuth?.applySecurityAuthentication(requestContext); + } + + return requestContext; + } + + /** + * Version: 10.12.0.cl or later Updates a connection configuration object. Requires `DATAMANAGEMENT` (**Can manage data**) and edit permissions to the connection object, or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) privilege is required. #### Supported operations This API endpoint lets you perform the following operations in a single API request: * Edit the name or description of the configuration * Edit the configuration properties * Edit the `policy_type` * Edit the type of authentication * Enable or disable a configuration #### Parameterized Connection Support For parameterized oauth based connections, only the `same_as_parent` and `policy_process_options` attributes are allowed. These attributes are not applicable to connections that are not parameterized. **NOTE**: When updating a configuration where `disabled` is `true`, you must reset `disabled` to `true` in your update request payload. If not explicitly set again, the API will default `disabled` to `false`. + * @param configurationIdentifier Unique ID or name of the configuration. + * @param updateConnectionConfigurationRequest + */ + public async updateConnectionConfiguration(configurationIdentifier: string, updateConnectionConfigurationRequest: UpdateConnectionConfigurationRequest, _options?: Configuration): Promise { + let _config = _options || this.configuration; + + // verify required parameter 'configurationIdentifier' is not null or undefined + if (configurationIdentifier === null || configurationIdentifier === undefined) { + throw new RequiredError("ThoughtSpotRestApi", "updateConnectionConfiguration", "configurationIdentifier"); + } + + + // verify required parameter 'updateConnectionConfigurationRequest' is not null or undefined + if (updateConnectionConfigurationRequest === null || updateConnectionConfigurationRequest === undefined) { + throw new RequiredError("ThoughtSpotRestApi", "updateConnectionConfiguration", "updateConnectionConfigurationRequest"); + } + + + // Path Params + const localVarPath = '/api/rest/2.0/connection-configurations/{configuration_identifier}/update' + .replace('{' + 'configuration_identifier' + '}', encodeURIComponent(String(configurationIdentifier))); + + // Make Request Context + const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.POST); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.25.0") + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.25.0") + + + + + // Body Params + const contentType = ObjectSerializer.getPreferredMediaType([ + "application/json" + ]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = ObjectSerializer.stringify( + ObjectSerializer.serialize(updateConnectionConfigurationRequest, "UpdateConnectionConfigurationRequest", ""), + contentType + ); + requestContext.setBody(serializedBody); + + let authMethod: SecurityAuthentication | undefined; + // Apply auth methods + authMethod = _config.authMethods["bearerAuth"] + if (authMethod?.applySecurityAuthentication) { + await authMethod?.applySecurityAuthentication(requestContext); + } + + const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default + if (defaultAuth?.applySecurityAuthentication) { + await defaultAuth?.applySecurityAuthentication(requestContext); + } + + return requestContext; + } + + /** + * Version: 26.6.0.cl or later Activates or deactivates a connection. A deactivated connection cannot be used for queries or operations until it is activated again. Requires `DATAMANAGEMENT` (**Can manage data**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) privilege is required. Only the connection owner or an administrator can perform this operation. #### Usage guidelines To update the status of a connection, specify the connection GUID or name in the `connection_identifier` path parameter and the desired `status` in the request body. - **ACTIVATED**: Enables the connection. Queries and operations can resume on an activated connection. - **DEACTIVATED**: Disables the connection. It does not remove the connection metadata, but only makes the connection unavailable for queries and operations. You can reactivate a deactivated connection by setting \"status\": \"ACTIVATED\". + * @param connectionIdentifier Unique ID or name of the connection. + * @param updateConnectionStatusRequest + */ + public async updateConnectionStatus(connectionIdentifier: string, updateConnectionStatusRequest: UpdateConnectionStatusRequest, _options?: Configuration): Promise { + let _config = _options || this.configuration; + + // verify required parameter 'connectionIdentifier' is not null or undefined + if (connectionIdentifier === null || connectionIdentifier === undefined) { + throw new RequiredError("ThoughtSpotRestApi", "updateConnectionStatus", "connectionIdentifier"); + } + + + // verify required parameter 'updateConnectionStatusRequest' is not null or undefined + if (updateConnectionStatusRequest === null || updateConnectionStatusRequest === undefined) { + throw new RequiredError("ThoughtSpotRestApi", "updateConnectionStatus", "updateConnectionStatusRequest"); + } + + + // Path Params + const localVarPath = '/api/rest/2.0/connections/{connection_identifier}/status' + .replace('{' + 'connection_identifier' + '}', encodeURIComponent(String(connectionIdentifier))); + + // Make Request Context + const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.POST); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.25.0") + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.25.0") + + + + + // Body Params + const contentType = ObjectSerializer.getPreferredMediaType([ + "application/json" + ]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = ObjectSerializer.stringify( + ObjectSerializer.serialize(updateConnectionStatusRequest, "UpdateConnectionStatusRequest", ""), + contentType + ); + requestContext.setBody(serializedBody); + + let authMethod: SecurityAuthentication | undefined; + // Apply auth methods + authMethod = _config.authMethods["bearerAuth"] + if (authMethod?.applySecurityAuthentication) { + await authMethod?.applySecurityAuthentication(requestContext); + } + + const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default + if (defaultAuth?.applySecurityAuthentication) { + await defaultAuth?.applySecurityAuthentication(requestContext); + } + + return requestContext; + } + + /** + * Version: 10.4.0.cl or later Updates a connection object. Requires `DATAMANAGEMENT` (**Can manage data**) and edit permissions to the connection object, or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) privilege is required. To update a connection object, pass these parameters in your API request: 1. GUID of the connection object. 2. If you are updating tables or database schema of a connection object: a. Add the updated JSON map of metadata with database, schema, and tables in `data_warehouse_config`. b. Set `validate` to `true`. **NOTE:** If the `authentication_type` is anything other than SERVICE_ACCOUNT, you must explicitly provide the authenticationType property in the payload. If you do not specify authenticationType, the API will default to SERVICE_ACCOUNT as the authentication type. * A JSON map of configuration attributes, database details, and table properties in `data_warehouse_config` as shown in the following example: * This is an example of updating a single table in a empty connection: ``` { \"authenticationType\": \"SERVICE_ACCOUNT\", \"externalDatabases\": [ { \"name\": \"DEVELOPMENT\", \"isAutoCreated\": false, \"schemas\": [ { \"name\": \"TS_dataset\", \"tables\": [ { \"name\": \"DEMORENAME\", \"type\": \"TABLE\", \"description\": \"\", \"selected\": true, \"linked\": true, \"gid\": 0, \"datasetId\": \"-1\", \"subType\": \"\", \"reportId\": \"\", \"viewId\": \"\", \"columns\": [ { \"name\": \"Col1\", \"type\": \"VARCHAR\", \"canImport\": true, \"selected\": true, \"description\": \"\", \"isLinkedActive\": true, \"isAggregate\": false }, { \"name\": \"Col2\", \"type\": \"VARCHAR\", \"canImport\": true, \"selected\": true, \"description\": \"\", \"isLinkedActive\": true, \"isAggregate\": false }, { \"name\": \"Col3\", \"type\": \"VARCHAR\", \"canImport\": true, \"selected\": true, \"description\": \"\", \"isLinkedActive\": true, \"isAggregate\": false }, { \"name\": \"Col312\", \"type\": \"VARCHAR\", \"canImport\": true, \"selected\": true, \"description\": \"\", \"isLinkedActive\": true, \"isAggregate\": false }, { \"name\": \"Col4\", \"type\": \"VARCHAR\", \"canImport\": true, \"selected\": true, \"description\": \"\", \"isLinkedActive\": true, \"isAggregate\": false } ], \"relationships\": [] } ] } ] } ], \"configuration\": { \"password\": \"\", \"database\": \"DEVELOPMENT\", \"role\": \"DEV\", \"accountName\": \"thoughtspot_partner\", \"warehouse\": \"DEMO_WH\", \"user\": \"DEV_USER\" } } ``` * This is an example of updating a single table in an existing connection with tables: ``` { \"authenticationType\": \"SERVICE_ACCOUNT\", \"externalDatabases\": [ { \"name\": \"DEVELOPMENT\", \"isAutoCreated\": false, \"schemas\": [ { \"name\": \"TS_dataset\", \"tables\": [ { \"name\": \"CUSTOMER\", \"type\": \"TABLE\", \"description\": \"\", \"selected\": true, \"linked\": true, \"gid\": 0, \"datasetId\": \"-1\", \"subType\": \"\", \"reportId\": \"\", \"viewId\": \"\", \"columns\": [], \"relationships\": [] }, { \"name\": \"tpch5k_falcon_default_schema_users\", \"type\": \"TABLE\", \"description\": \"\", \"selected\": true, \"linked\": true, \"gid\": 0, \"datasetId\": \"-1\", \"subType\": \"\", \"reportId\": \"\", \"viewId\": \"\", \"columns\": [ { \"name\": \"user_id\", \"type\": \"INT64\", \"canImport\": true, \"selected\": true, \"description\": \"\", \"isLinkedActive\": true, \"isAggregate\": false }, { \"name\": \"product_id\", \"type\": \"INT64\", \"canImport\": true, \"selected\": true, \"description\": \"\", \"isLinkedActive\": true, \"isAggregate\": false }, { \"name\": \"user_cost\", \"type\": \"INT64\", \"canImport\": true, \"selected\": true, \"description\": \"\", \"isLinkedActive\": true, \"isAggregate\": false } ], \"relationships\": [] } ] } ] } ], \"configuration\": { \"password\": \"\", \"database\": \"DEVELOPMENT\", \"role\": \"DEV\", \"accountName\": \"thoughtspot_partner\", \"warehouse\": \"DEMO_WH\", \"user\": \"DEV_USER\" } } ``` 3. If you are updating a configuration attribute, connection name, or description, you can set `validate` to `false`. **NOTE:** If the `authentication_type` is anything other than SERVICE_ACCOUNT, you must explicitly provide the authenticationType property in the payload. If you do not specify authenticationType, the API will default to SERVICE_ACCOUNT as the authentication type. * A JSON map of configuration attributes in `data_warehouse_config`. The following example shows the configuration attributes for a Snowflake connection: ``` { \"configuration\":{ \"accountName\":\"thoughtspot_partner\", \"user\":\"tsadmin\", \"password\":\"TestConn123\", \"role\":\"sysadmin\", \"warehouse\":\"MEDIUM_WH\" }, \"externalDatabases\":[ ] } ``` + * @param connectionIdentifier Unique ID or name of the connection. + * @param updateConnectionV2Request + */ + public async updateConnectionV2(connectionIdentifier: string, updateConnectionV2Request: UpdateConnectionV2Request, _options?: Configuration): Promise { + let _config = _options || this.configuration; + + // verify required parameter 'connectionIdentifier' is not null or undefined + if (connectionIdentifier === null || connectionIdentifier === undefined) { + throw new RequiredError("ThoughtSpotRestApi", "updateConnectionV2", "connectionIdentifier"); + } + + + // verify required parameter 'updateConnectionV2Request' is not null or undefined + if (updateConnectionV2Request === null || updateConnectionV2Request === undefined) { + throw new RequiredError("ThoughtSpotRestApi", "updateConnectionV2", "updateConnectionV2Request"); + } + + + // Path Params + const localVarPath = '/api/rest/2.0/connections/{connection_identifier}/update' + .replace('{' + 'connection_identifier' + '}', encodeURIComponent(String(connectionIdentifier))); + + // Make Request Context + const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.POST); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.25.0") + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.25.0") + + + + + // Body Params + const contentType = ObjectSerializer.getPreferredMediaType([ + "application/json" + ]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = ObjectSerializer.stringify( + ObjectSerializer.serialize(updateConnectionV2Request, "UpdateConnectionV2Request", ""), + contentType + ); + requestContext.setBody(serializedBody); + + let authMethod: SecurityAuthentication | undefined; + // Apply auth methods + authMethod = _config.authMethods["bearerAuth"] + if (authMethod?.applySecurityAuthentication) { + await authMethod?.applySecurityAuthentication(requestContext); + } + + const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default + if (defaultAuth?.applySecurityAuthentication) { + await defaultAuth?.applySecurityAuthentication(requestContext); + } + + return requestContext; + } + + /** + * Version: 9.6.0.cl or later Updates a custom action. Requires `DEVELOPER` (**Has Developer privilege**) or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `DEVELOPER` (**Has developer privilege**) privilege is required. #### Usage Guidelines The API allows you to modify the following properties: * Name of the custom action * Action availability to groups * Association to metadata objects * Authentication settings for a URL-based action For more information, see [Custom actions](https://developers.thoughtspot.com/docs/custom-action-intro). + * @param customActionIdentifier Unique ID or name of the custom action. + * @param updateCustomActionRequest + */ + public async updateCustomAction(customActionIdentifier: string, updateCustomActionRequest: UpdateCustomActionRequest, _options?: Configuration): Promise { + let _config = _options || this.configuration; + + // verify required parameter 'customActionIdentifier' is not null or undefined + if (customActionIdentifier === null || customActionIdentifier === undefined) { + throw new RequiredError("ThoughtSpotRestApi", "updateCustomAction", "customActionIdentifier"); + } + + + // verify required parameter 'updateCustomActionRequest' is not null or undefined + if (updateCustomActionRequest === null || updateCustomActionRequest === undefined) { + throw new RequiredError("ThoughtSpotRestApi", "updateCustomAction", "updateCustomActionRequest"); + } + + + // Path Params + const localVarPath = '/api/rest/2.0/customization/custom-actions/{custom_action_identifier}/update' + .replace('{' + 'custom_action_identifier' + '}', encodeURIComponent(String(customActionIdentifier))); + + // Make Request Context + const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.POST); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.25.0") + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.25.0") + + + + + // Body Params + const contentType = ObjectSerializer.getPreferredMediaType([ + "application/json" + ]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = ObjectSerializer.stringify( + ObjectSerializer.serialize(updateCustomActionRequest, "UpdateCustomActionRequest", ""), + contentType + ); + requestContext.setBody(serializedBody); + + let authMethod: SecurityAuthentication | undefined; + // Apply auth methods + authMethod = _config.authMethods["bearerAuth"] + if (authMethod?.applySecurityAuthentication) { + await authMethod?.applySecurityAuthentication(requestContext); + } + + const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default + if (defaultAuth?.applySecurityAuthentication) { + await defaultAuth?.applySecurityAuthentication(requestContext); + } + + return requestContext; + } + + /** + * Version: 9.9.0.cl or later Updates a DBT connection object. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege or `DATAMANAGEMENT` (**Can manage data ThoughtSpot**) privilege, along with an existing DBT connection. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the following data control privileges may be required: - `CAN_MANAGE_CUSTOM_CALENDAR`(**Can manage custom calendars**) - `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) - `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` (**Can manage data models**) #### About update DBT connection You can modify DBT connection object properties such as embrace connection name, embrace database name, import type, account identifier, access token, project identifier and environment (or) embrace connection, embrace database name, import type, file_content settings. + * @param dbtConnectionIdentifier Unique ID of the DBT Connection. + * @param connectionName Name of the connection. + * @param databaseName Name of the Database. + * @param importType Mention type of Import + * @param accessToken Access token is mandatory when Import_Type is DBT_CLOUD. + * @param dbtUrl DBT URL is mandatory when Import_Type is DBT_CLOUD. + * @param accountId Account ID is mandatory when Import_Type is DBT_CLOUD + * @param projectId Project ID is mandatory when Import_Type is DBT_CLOUD + * @param dbtEnvId DBT Environment ID\\\" + * @param projectName Name of the project + * @param fileContent Upload DBT Manifest and Catalog artifact files as a ZIP file. This field is Mandatory when Import Type is \\\'ZIP_FILE\\\' + */ + public async updateDbtConnection(dbtConnectionIdentifier: string, connectionName?: string, databaseName?: string, importType?: string, accessToken?: string, dbtUrl?: string, accountId?: string, projectId?: string, dbtEnvId?: string, projectName?: string, fileContent?: HttpFile, _options?: Configuration): Promise { + let _config = _options || this.configuration; + + // verify required parameter 'dbtConnectionIdentifier' is not null or undefined + if (dbtConnectionIdentifier === null || dbtConnectionIdentifier === undefined) { + throw new RequiredError("ThoughtSpotRestApi", "updateDbtConnection", "dbtConnectionIdentifier"); + } + + + + + + + + + + + + + // Path Params + const localVarPath = '/api/rest/2.0/dbt/update-dbt-connection'; + + // Make Request Context + const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.POST); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.25.0") + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.25.0") + + + + // Form Params + const useForm = canConsumeForm([ + 'multipart/form-data', + ]); + + let localVarFormParams + if (useForm) { + localVarFormParams = new FormData(); + } else { + localVarFormParams = new URLSearchParams(); + } + + if (dbtConnectionIdentifier !== undefined) { + // TODO: replace .append with .set + localVarFormParams.append('dbt_connection_identifier', dbtConnectionIdentifier as any); + } + if (connectionName !== undefined) { + // TODO: replace .append with .set + localVarFormParams.append('connection_name', connectionName as any); + } + if (databaseName !== undefined) { + // TODO: replace .append with .set + localVarFormParams.append('database_name', databaseName as any); + } + if (importType !== undefined) { + // TODO: replace .append with .set + localVarFormParams.append('import_type', importType as any); + } + if (accessToken !== undefined) { + // TODO: replace .append with .set + localVarFormParams.append('access_token', accessToken as any); + } + if (dbtUrl !== undefined) { + // TODO: replace .append with .set + localVarFormParams.append('dbt_url', dbtUrl as any); + } + if (accountId !== undefined) { + // TODO: replace .append with .set + localVarFormParams.append('account_id', accountId as any); + } + if (projectId !== undefined) { + // TODO: replace .append with .set + localVarFormParams.append('project_id', projectId as any); + } + if (dbtEnvId !== undefined) { + // TODO: replace .append with .set + localVarFormParams.append('dbt_env_id', dbtEnvId as any); + } + if (projectName !== undefined) { + // TODO: replace .append with .set + localVarFormParams.append('project_name', projectName as any); + } + if (fileContent !== undefined) { + // TODO: replace .append with .set + if (localVarFormParams instanceof FormData) { + localVarFormParams.append('file_content', fileContent, fileContent.name); + } + } + + requestContext.setBody(localVarFormParams); + + if(!useForm) { + const contentType = ObjectSerializer.getPreferredMediaType([ + "multipart/form-data" + ]); + requestContext.setHeaderParam("Content-Type", contentType); + } + + let authMethod: SecurityAuthentication | undefined; + // Apply auth methods + authMethod = _config.authMethods["bearerAuth"] + if (authMethod?.applySecurityAuthentication) { + await authMethod?.applySecurityAuthentication(requestContext); + } + + const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default + if (defaultAuth?.applySecurityAuthentication) { + await defaultAuth?.applySecurityAuthentication(requestContext); + } + + return requestContext; + } + + /** + * Version: 10.12.0.cl or later Updates a customization configuration for the notification email. #### Pre-requisites Requires `DEVELOPER` (**has developer privilege**) or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `DEVELOPER` (**Has developer privilege**) privilege is required. **NOTE**:This endpoint in currently in beta. Contact ThoughtSpot support to enable this on your instance. #### Usage guidelines To update a custom configuration pass these parameters in your API request: - A JSON map of configuration attributes `template_properties`. The following example shows a sample set of customization configuration: ``` { { \"cta_button_bg_color\": \"#444DEA\", \"cta_text_font_color\": \"#FFFFFF\", \"primary_bg_color\": \"#D3DEF0\", \"logo_url\": \"https://storage.pardot.com/710713/1642089901EbkRibJq/TS_fullworkmark_darkmode.png\", \"font_family\": \"\", \"product_name\": \"ThoughtSpot\", \"footer_address\": \"444 Castro St, Suite 1000 Mountain View, CA 94041\", \"footer_phone\": \"(800) 508-7008\", \"replacement_value_for_liveboard\": \"Dashboard\", \"replacement_value_for_answer\": \"Chart\", \"replacement_value_for_spot_iq\": \"AI Insights\", \"hide_footer_phone\": false, \"hide_footer_address\": false, \"hide_product_name\": false, \"hide_manage_notification\": false, \"hide_mobile_app_nudge\": false, \"hide_privacy_policy\": false, \"hide_ts_vocabulary_definitions\": false, \"hide_error_message\": false, \"hide_unsubscribe_link\": false, \"hide_notification_status\": false, \"hide_modify_alert\": false, \"company_website_url\": \"https://your-website.com/\", \"company_privacy_policy_url\" : \"https://link-to-privacy-policy.com/\", \"contact_support_url\": \"https://link-to-contact-support.com/\", \"hide_contact_support_url\": false, \"hide_logo_url\" : false } } ``` + * @param updateEmailCustomizationRequest + */ + public async updateEmailCustomization(updateEmailCustomizationRequest: UpdateEmailCustomizationRequest, _options?: Configuration): Promise { + let _config = _options || this.configuration; + + // verify required parameter 'updateEmailCustomizationRequest' is not null or undefined + if (updateEmailCustomizationRequest === null || updateEmailCustomizationRequest === undefined) { + throw new RequiredError("ThoughtSpotRestApi", "updateEmailCustomization", "updateEmailCustomizationRequest"); + } + + + // Path Params + const localVarPath = '/api/rest/2.0/customization/email/update'; + + // Make Request Context + const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.POST); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.25.0") + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.25.0") + + + + + // Body Params + const contentType = ObjectSerializer.getPreferredMediaType([ + "application/json" + ]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = ObjectSerializer.stringify( + ObjectSerializer.serialize(updateEmailCustomizationRequest, "UpdateEmailCustomizationRequest", ""), + contentType + ); + requestContext.setBody(serializedBody); + + let authMethod: SecurityAuthentication | undefined; + // Apply auth methods + authMethod = _config.authMethods["bearerAuth"] + if (authMethod?.applySecurityAuthentication) { + await authMethod?.applySecurityAuthentication(requestContext); + } + + const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default + if (defaultAuth?.applySecurityAuthentication) { + await defaultAuth?.applySecurityAuthentication(requestContext); + } + + return requestContext; + } + + /** + * Update header attributes for a given list of header objects. Version: 10.6.0.cl or later ## Prerequisites - **Privileges Required:** - `DATAMANAGEMENT` (Can manage data) or `ADMINISTRATION` (Can administer ThoughtSpot). - **Additional Privileges (if RBAC is enabled):** - `ORG_ADMINISTRATION` (Can manage orgs). --- ## Usage Guidelines ### Parameters 1. **headers_update** - **Description:** List of header objects with their attributes to be updated. Each object contains a list of attributes to be updated in the header. - **Usage:** - You must provide either `identifier` or `obj_identifier`, but not both. Both fields cannot be empty. - When `org_identifier` is set to `-1`, only the `identifier` value is accepted; `obj_identifier` is not allowed. 2. **org_identifier** - **Description:** GUID (Globally Unique Identifier) or name of the organization. - **Usage:** - Leaving this field empty assumes that the changes should be applied to the current organization - Provide `org_guid` or `org_name` to uniquely identify the organization where changes need to be applied. . - Provide `-1` if changes have to be applied across all the org. --- ## Note Currently, this API is enabled only for updating the `obj_identifier` attribute. Only `text` will be allowed in attribute\'s value. ## Best Practices 1. **Backup Before Conversion:** Always export metadata as a backup before initiating the update process --- ## Examples ### Only `identifier` is given ```json { \"headers_update\": [ { \"identifier\": \"guid_1\", \"obj_identifier\": \"\", \"type\": \"LOGICAL_COLUMN\", \"attributes\": [ { \"name\": \"obj_id\", \"value\": \"custom_object_id\" } ] } ], \"org_identifier\": \"orgGuid\" } ``` ### Only `obj_identifier` is given ```json { \"headers_update\": [ { \"obj_identifier\": \"custom_object_id\", \"type\": \"ANSWER\", \"attributes\": [ { \"name\": \"obj_id\", \"value\": \"custom_object_id\" } ] } ], \"org_identifier\": \"orgName\" } ``` ### Executing update for all org `-1` ```json { \"headers_update\": [ { \"identifier\": \"guid_1\", \"type\": \"ANSWER\", \"attributes\": [ { \"name\": \"obj_id\", \"value\": \"custom_object_id\" } ] } ], \"org_identifier\": -1 } ``` ### Optional `type` is not provided ```json { \"headers_update\": [ { \"identifier\": \"guid_1\", \"attributes\": [ { \"name\": \"obj_id\", \"value\": \"custom_object_id\" } ] } ], \"org_identifier\": -1 } ``` + * @param updateMetadataHeaderRequest + */ + public async updateMetadataHeader(updateMetadataHeaderRequest: UpdateMetadataHeaderRequest, _options?: Configuration): Promise { + let _config = _options || this.configuration; + + // verify required parameter 'updateMetadataHeaderRequest' is not null or undefined + if (updateMetadataHeaderRequest === null || updateMetadataHeaderRequest === undefined) { + throw new RequiredError("ThoughtSpotRestApi", "updateMetadataHeader", "updateMetadataHeaderRequest"); + } + + + // Path Params + const localVarPath = '/api/rest/2.0/metadata/headers/update'; + + // Make Request Context + const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.POST); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.25.0") + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.25.0") + + + + + // Body Params + const contentType = ObjectSerializer.getPreferredMediaType([ + "application/json" + ]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = ObjectSerializer.stringify( + ObjectSerializer.serialize(updateMetadataHeaderRequest, "UpdateMetadataHeaderRequest", ""), + contentType + ); + requestContext.setBody(serializedBody); + + let authMethod: SecurityAuthentication | undefined; + // Apply auth methods + authMethod = _config.authMethods["bearerAuth"] + if (authMethod?.applySecurityAuthentication) { + await authMethod?.applySecurityAuthentication(requestContext); + } + + const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default + if (defaultAuth?.applySecurityAuthentication) { + await defaultAuth?.applySecurityAuthentication(requestContext); + } + + return requestContext; + } + + /** + * Update object IDs for given metadata objects. Version: 10.8.0.cl or later ## Prerequisites - **Privileges Required:** - `DATAMANAGEMENT` (Can manage data) or `ADMINISTRATION` (Can administer ThoughtSpot). - **Additional Privileges (if RBAC is enabled):** - `ORG_ADMINISTRATION` (Can manage orgs). --- ## Usage Guidelines ### Parameters 1. **metadata** - **Description:** List of metadata objects to update their object IDs. - **Usage:** - Use either `current_obj_id` alone OR use `metadata_identifier` with `type` (when needed). - When using `metadata_identifier`, the `type` field is required if using a name instead of a GUID. - The `new_obj_id` field is always required. --- ## Note This API is specifically designed for updating object IDs of metadata objects. It internally uses the header update mechanism to perform the changes. ## Best Practices 1. **Backup Before Update:** Always export metadata as a backup before initiating the update process. 2. **Validation:** - When using `current_obj_id`, ensure it matches the existing object ID exactly. - When using `metadata_identifier` with a name, ensure the `type` is specified correctly. - Verify that the `new_obj_id` follows your naming conventions and is unique within your system. --- ## Examples ### Using current_obj_id ```json { \"metadata\": [ { \"current_obj_id\": \"existing_object_id\", \"new_obj_id\": \"new_object_id\" } ] } ``` ### Using metadata_identifier with GUID ```json { \"metadata\": [ { \"metadata_identifier\": \"01234567-89ab-cdef-0123-456789abcdef\", \"new_obj_id\": \"new_object_id\" } ] } ``` ### Using metadata_identifier with name and type ```json { \"metadata\": [ { \"metadata_identifier\": \"My Answer\", \"type\": \"ANSWER\", \"new_obj_id\": \"new_object_id\" } ] } ``` ### Multiple objects update ```json { \"metadata\": [ { \"current_obj_id\": \"existing_object_id_1\", \"new_obj_id\": \"new_object_id_1\" }, { \"metadata_identifier\": \"My Worksheet\", \"type\": \"LOGICAL_TABLE\", \"new_obj_id\": \"new_object_id_2\" } ] } ``` + * @param updateMetadataObjIdRequest + */ + public async updateMetadataObjId(updateMetadataObjIdRequest: UpdateMetadataObjIdRequest, _options?: Configuration): Promise { + let _config = _options || this.configuration; + + // verify required parameter 'updateMetadataObjIdRequest' is not null or undefined + if (updateMetadataObjIdRequest === null || updateMetadataObjIdRequest === undefined) { + throw new RequiredError("ThoughtSpotRestApi", "updateMetadataObjId", "updateMetadataObjIdRequest"); + } + + + // Path Params + const localVarPath = '/api/rest/2.0/metadata/update-obj-id'; + + // Make Request Context + const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.POST); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.25.0") + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.25.0") + + + + + // Body Params + const contentType = ObjectSerializer.getPreferredMediaType([ + "application/json" + ]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = ObjectSerializer.stringify( + ObjectSerializer.serialize(updateMetadataObjIdRequest, "UpdateMetadataObjIdRequest", ""), + contentType + ); + requestContext.setBody(serializedBody); + + let authMethod: SecurityAuthentication | undefined; + // Apply auth methods + authMethod = _config.authMethods["bearerAuth"] + if (authMethod?.applySecurityAuthentication) { + await authMethod?.applySecurityAuthentication(requestContext); + } + + const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default + if (defaultAuth?.applySecurityAuthentication) { + await defaultAuth?.applySecurityAuthentication(requestContext); + } + + return requestContext; + } + + /** + * Version: 9.0.0.cl or later Updates an Org object. You can modify Org properties such as name, description, and user associations. Requires cluster administration (**Can administer Org**) privileges. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `ORG_ADMINISTRATION` (**Can manage Orgs**) privilege is required. + * @param orgIdentifier ID or name of the Org + * @param updateOrgRequest + */ + public async updateOrg(orgIdentifier: string, updateOrgRequest: UpdateOrgRequest, _options?: Configuration): Promise { + let _config = _options || this.configuration; + + // verify required parameter 'orgIdentifier' is not null or undefined + if (orgIdentifier === null || orgIdentifier === undefined) { + throw new RequiredError("ThoughtSpotRestApi", "updateOrg", "orgIdentifier"); + } + + + // verify required parameter 'updateOrgRequest' is not null or undefined + if (updateOrgRequest === null || updateOrgRequest === undefined) { + throw new RequiredError("ThoughtSpotRestApi", "updateOrg", "updateOrgRequest"); + } + + + // Path Params + const localVarPath = '/api/rest/2.0/orgs/{org_identifier}/update' + .replace('{' + 'org_identifier' + '}', encodeURIComponent(String(orgIdentifier))); + + // Make Request Context + const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.POST); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.25.0") + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.25.0") + + + + + // Body Params + const contentType = ObjectSerializer.getPreferredMediaType([ + "application/json" + ]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = ObjectSerializer.stringify( + ObjectSerializer.serialize(updateOrgRequest, "UpdateOrgRequest", ""), + contentType + ); + requestContext.setBody(serializedBody); + + let authMethod: SecurityAuthentication | undefined; + // Apply auth methods + authMethod = _config.authMethods["bearerAuth"] + if (authMethod?.applySecurityAuthentication) { + await authMethod?.applySecurityAuthentication(requestContext); + } + + const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default + if (defaultAuth?.applySecurityAuthentication) { + await defaultAuth?.applySecurityAuthentication(requestContext); + } + + return requestContext; + } + + /** + * Version: 9.5.0.cl or later Updates the properties of a Role object. Available only if [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance. To update a Role, the `ROLE_ADMINISTRATION` (**Can manage roles**) privilege is required. + * @param roleIdentifier Unique ID or name of the Role. + * @param updateRoleRequest + */ + public async updateRole(roleIdentifier: string, updateRoleRequest: UpdateRoleRequest, _options?: Configuration): Promise { + let _config = _options || this.configuration; + + // verify required parameter 'roleIdentifier' is not null or undefined + if (roleIdentifier === null || roleIdentifier === undefined) { + throw new RequiredError("ThoughtSpotRestApi", "updateRole", "roleIdentifier"); + } + + + // verify required parameter 'updateRoleRequest' is not null or undefined + if (updateRoleRequest === null || updateRoleRequest === undefined) { + throw new RequiredError("ThoughtSpotRestApi", "updateRole", "updateRoleRequest"); + } + + + // Path Params + const localVarPath = '/api/rest/2.0/roles/{role_identifier}/update' + .replace('{' + 'role_identifier' + '}', encodeURIComponent(String(roleIdentifier))); + + // Make Request Context + const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.POST); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.25.0") + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.25.0") + + + + + // Body Params + const contentType = ObjectSerializer.getPreferredMediaType([ + "application/json" + ]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = ObjectSerializer.stringify( + ObjectSerializer.serialize(updateRoleRequest, "UpdateRoleRequest", ""), + contentType + ); + requestContext.setBody(serializedBody); + + let authMethod: SecurityAuthentication | undefined; + // Apply auth methods + authMethod = _config.authMethods["bearerAuth"] + if (authMethod?.applySecurityAuthentication) { + await authMethod?.applySecurityAuthentication(requestContext); + } + + const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default + if (defaultAuth?.applySecurityAuthentication) { + await defaultAuth?.applySecurityAuthentication(requestContext); + } + + return requestContext; + } + + /** + * Update schedule. Version: 9.4.0.cl or later Updates a scheduled Liveboard job. Requires at least edit access to Liveboards. To update a schedule on behalf of another user, you need `ADMINISTRATION` (**Can administer Org**) or `JOBSCHEDULING` (**Can schedule for others**) privilege and edit access to the Liveboard. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `JOBSCHEDULING` (**Can schedule for others**) privilege is required. The API endpoint allows you to pause a scheduled job, change the status of a paused job. You can also edit the recipients list, frequency of the job, format of the file to send to the recipients in email notifications, PDF options, and time zone setting. + * @param scheduleIdentifier Unique ID or name of the schedule. + * @param updateScheduleRequest + */ + public async updateSchedule(scheduleIdentifier: string, updateScheduleRequest: UpdateScheduleRequest, _options?: Configuration): Promise { + let _config = _options || this.configuration; + + // verify required parameter 'scheduleIdentifier' is not null or undefined + if (scheduleIdentifier === null || scheduleIdentifier === undefined) { + throw new RequiredError("ThoughtSpotRestApi", "updateSchedule", "scheduleIdentifier"); + } + + + // verify required parameter 'updateScheduleRequest' is not null or undefined + if (updateScheduleRequest === null || updateScheduleRequest === undefined) { + throw new RequiredError("ThoughtSpotRestApi", "updateSchedule", "updateScheduleRequest"); + } + + + // Path Params + const localVarPath = '/api/rest/2.0/schedules/{schedule_identifier}/update' + .replace('{' + 'schedule_identifier' + '}', encodeURIComponent(String(scheduleIdentifier))); + + // Make Request Context + const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.POST); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.25.0") + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.25.0") + + + + + // Body Params + const contentType = ObjectSerializer.getPreferredMediaType([ + "application/json" + ]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = ObjectSerializer.stringify( + ObjectSerializer.serialize(updateScheduleRequest, "UpdateScheduleRequest", ""), + contentType + ); + requestContext.setBody(serializedBody); + + let authMethod: SecurityAuthentication | undefined; + // Apply auth methods + authMethod = _config.authMethods["bearerAuth"] + if (authMethod?.applySecurityAuthentication) { + await authMethod?.applySecurityAuthentication(requestContext); + } + + const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default + if (defaultAuth?.applySecurityAuthentication) { + await defaultAuth?.applySecurityAuthentication(requestContext); + } + + return requestContext; + } + + /** + * Version: 9.2.0.cl or later Updates the current configuration of the cluster. You must send the configuration data in JSON format. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privileges. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `APPLICATION_ADMINISTRATION` (**Can manage application settings**) privilege is required. + * @param updateSystemConfigRequest + */ + public async updateSystemConfig(updateSystemConfigRequest: UpdateSystemConfigRequest, _options?: Configuration): Promise { + let _config = _options || this.configuration; + + // verify required parameter 'updateSystemConfigRequest' is not null or undefined + if (updateSystemConfigRequest === null || updateSystemConfigRequest === undefined) { + throw new RequiredError("ThoughtSpotRestApi", "updateSystemConfig", "updateSystemConfigRequest"); + } + + + // Path Params + const localVarPath = '/api/rest/2.0/system/config-update'; + + // Make Request Context + const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.POST); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.25.0") + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.25.0") + + + + + // Body Params + const contentType = ObjectSerializer.getPreferredMediaType([ + "application/json" + ]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = ObjectSerializer.stringify( + ObjectSerializer.serialize(updateSystemConfigRequest, "UpdateSystemConfigRequest", ""), + contentType + ); + requestContext.setBody(serializedBody); + + let authMethod: SecurityAuthentication | undefined; + // Apply auth methods + authMethod = _config.authMethods["bearerAuth"] + if (authMethod?.applySecurityAuthentication) { + await authMethod?.applySecurityAuthentication(requestContext); + } + + const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default + if (defaultAuth?.applySecurityAuthentication) { + await defaultAuth?.applySecurityAuthentication(requestContext); + } + + return requestContext; + } + + /** + * Version: 9.0.0.cl or later Updates a tag object. You can modify the `name` and `color` properties of a tag object. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `TAGMANAGEMENT` (**Can manage tags**) privilege is required to create, edit, and delete tags. + * @param tagIdentifier Name or Id of the tag. + * @param updateTagRequest + */ + public async updateTag(tagIdentifier: string, updateTagRequest: UpdateTagRequest, _options?: Configuration): Promise { + let _config = _options || this.configuration; + + // verify required parameter 'tagIdentifier' is not null or undefined + if (tagIdentifier === null || tagIdentifier === undefined) { + throw new RequiredError("ThoughtSpotRestApi", "updateTag", "tagIdentifier"); + } + + + // verify required parameter 'updateTagRequest' is not null or undefined + if (updateTagRequest === null || updateTagRequest === undefined) { + throw new RequiredError("ThoughtSpotRestApi", "updateTag", "updateTagRequest"); + } + + + // Path Params + const localVarPath = '/api/rest/2.0/tags/{tag_identifier}/update' + .replace('{' + 'tag_identifier' + '}', encodeURIComponent(String(tagIdentifier))); + + // Make Request Context + const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.POST); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.25.0") + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.25.0") + + + + + // Body Params + const contentType = ObjectSerializer.getPreferredMediaType([ + "application/json" + ]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = ObjectSerializer.stringify( + ObjectSerializer.serialize(updateTagRequest, "UpdateTagRequest", ""), + contentType + ); + requestContext.setBody(serializedBody); + + let authMethod: SecurityAuthentication | undefined; + // Apply auth methods + authMethod = _config.authMethods["bearerAuth"] + if (authMethod?.applySecurityAuthentication) { + await authMethod?.applySecurityAuthentication(requestContext); + } + + const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default + if (defaultAuth?.applySecurityAuthentication) { + await defaultAuth?.applySecurityAuthentication(requestContext); + } + + return requestContext; + } + + /** + * Version: 9.0.0.cl or later Updates the properties of a user object. You can modify user properties such as username, email, and share notification settings. You can also assign new groups and Orgs, remove the user from a group or Org, reset password, and modify user preferences. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `USER_ADMINISTRATION` (**Can manage users**) privilege is required. + * @param userIdentifier GUID / name of the user + * @param updateUserRequest + */ + public async updateUser(userIdentifier: string, updateUserRequest: UpdateUserRequest, _options?: Configuration): Promise { + let _config = _options || this.configuration; + + // verify required parameter 'userIdentifier' is not null or undefined + if (userIdentifier === null || userIdentifier === undefined) { + throw new RequiredError("ThoughtSpotRestApi", "updateUser", "userIdentifier"); + } + + + // verify required parameter 'updateUserRequest' is not null or undefined + if (updateUserRequest === null || updateUserRequest === undefined) { + throw new RequiredError("ThoughtSpotRestApi", "updateUser", "updateUserRequest"); + } + + + // Path Params + const localVarPath = '/api/rest/2.0/users/{user_identifier}/update' + .replace('{' + 'user_identifier' + '}', encodeURIComponent(String(userIdentifier))); + + // Make Request Context + const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.POST); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.25.0") + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.25.0") + + + + + // Body Params + const contentType = ObjectSerializer.getPreferredMediaType([ + "application/json" + ]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = ObjectSerializer.stringify( + ObjectSerializer.serialize(updateUserRequest, "UpdateUserRequest", ""), + contentType + ); + requestContext.setBody(serializedBody); + + let authMethod: SecurityAuthentication | undefined; + // Apply auth methods + authMethod = _config.authMethods["bearerAuth"] + if (authMethod?.applySecurityAuthentication) { + await authMethod?.applySecurityAuthentication(requestContext); + } + + const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default + if (defaultAuth?.applySecurityAuthentication) { + await defaultAuth?.applySecurityAuthentication(requestContext); + } + + return requestContext; + } + + /** + * Version: 9.0.0.cl or later Updates the properties of a group object in ThoughtSpot. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `GROUP_ADMINISTRATION` (**Can manage groups**) privilege is required. #### Supported operations This API endpoint lets you perform the following operations in a single API request: * Edit [privileges](https://developers.thoughtspot.com/docs/?pageid=api-user-management#group-privileges) * Add or remove users * Change sharing visibility settings * Add or remove sub-groups * Assign a default Liveboard or update the existing settings + * @param groupIdentifier GUID or name of the group. + * @param updateUserGroupRequest + */ + public async updateUserGroup(groupIdentifier: string, updateUserGroupRequest: UpdateUserGroupRequest, _options?: Configuration): Promise { + let _config = _options || this.configuration; + + // verify required parameter 'groupIdentifier' is not null or undefined + if (groupIdentifier === null || groupIdentifier === undefined) { + throw new RequiredError("ThoughtSpotRestApi", "updateUserGroup", "groupIdentifier"); + } + + + // verify required parameter 'updateUserGroupRequest' is not null or undefined + if (updateUserGroupRequest === null || updateUserGroupRequest === undefined) { + throw new RequiredError("ThoughtSpotRestApi", "updateUserGroup", "updateUserGroupRequest"); + } + + + // Path Params + const localVarPath = '/api/rest/2.0/groups/{group_identifier}/update' + .replace('{' + 'group_identifier' + '}', encodeURIComponent(String(groupIdentifier))); + + // Make Request Context + const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.POST); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.25.0") + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.25.0") + + + + + // Body Params + const contentType = ObjectSerializer.getPreferredMediaType([ + "application/json" + ]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = ObjectSerializer.stringify( + ObjectSerializer.serialize(updateUserGroupRequest, "UpdateUserGroupRequest", ""), + contentType + ); + requestContext.setBody(serializedBody); + + let authMethod: SecurityAuthentication | undefined; + // Apply auth methods + authMethod = _config.authMethods["bearerAuth"] + if (authMethod?.applySecurityAuthentication) { + await authMethod?.applySecurityAuthentication(requestContext); + } + + const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default + if (defaultAuth?.applySecurityAuthentication) { + await defaultAuth?.applySecurityAuthentication(requestContext); + } + + return requestContext; + } + + /** + * Update a variable\'s name Version: 26.4.0.cl or later Allows updating a variable\'s name in ThoughtSpot. Requires ADMINISTRATION role and TENANT scope. The CAN_MANAGE_VARIABLES permission allows you to manage Formula Variables in the current organization scope. The API endpoint allows updating: * The variable name + * @param identifier Unique id or name of the variable to update. + * @param updateVariableRequest + */ + public async updateVariable(identifier: string, updateVariableRequest: UpdateVariableRequest, _options?: Configuration): Promise { + let _config = _options || this.configuration; + + // verify required parameter 'identifier' is not null or undefined + if (identifier === null || identifier === undefined) { + throw new RequiredError("ThoughtSpotRestApi", "updateVariable", "identifier"); + } + + + // verify required parameter 'updateVariableRequest' is not null or undefined + if (updateVariableRequest === null || updateVariableRequest === undefined) { + throw new RequiredError("ThoughtSpotRestApi", "updateVariable", "updateVariableRequest"); + } + + + // Path Params + const localVarPath = '/api/rest/2.0/template/variables/{identifier}/update' + .replace('{' + 'identifier' + '}', encodeURIComponent(String(identifier))); + + // Make Request Context + const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.POST); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.25.0") + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.25.0") + + + + + // Body Params + const contentType = ObjectSerializer.getPreferredMediaType([ + "application/json" + ]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = ObjectSerializer.stringify( + ObjectSerializer.serialize(updateVariableRequest, "UpdateVariableRequest", ""), + contentType + ); + requestContext.setBody(serializedBody); + + let authMethod: SecurityAuthentication | undefined; + // Apply auth methods + authMethod = _config.authMethods["bearerAuth"] + if (authMethod?.applySecurityAuthentication) { + await authMethod?.applySecurityAuthentication(requestContext); + } + + const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default + if (defaultAuth?.applySecurityAuthentication) { + await defaultAuth?.applySecurityAuthentication(requestContext); + } + + return requestContext; + } + + /** + * Update values for multiple variables Version: 10.14.0.cl or later **Note:** This API endpoint is deprecated and will be removed from ThoughtSpot in a future release. Use [POST /api/rest/2.0/template/variables/{identifier}/update-values](/api/rest/2.0/template/variables/%7Bidentifier%7D/update-values) instead. Allows updating values for multiple variables in ThoughtSpot. Requires ADMINISTRATION role. The CAN_MANAGE_VARIABLES permission allows you to manage Formula Variables in the current organization scope. The API endpoint allows: * Adding new values to variables * Replacing existing values * Deleting values from variables When updating variable values, you need to specify: * The variable identifiers * The values to add/replace/remove for each variable * The operation to perform (ADD, REPLACE, REMOVE, RESET) Behaviour based on operation type: * ADD - Adds values to the variable if this is a list type variable, else same as replace. * REPLACE - Replaces all values of a given set of constraints with the current set of values. * REMOVE - Removes any values which match the set of conditions of the variables if this is a list type variable, else clears value. * RESET - Removes all constrains for a given variable, scope is ignored + * @param updateVariableValuesRequest + */ + public async updateVariableValues(updateVariableValuesRequest: UpdateVariableValuesRequest, _options?: Configuration): Promise { + let _config = _options || this.configuration; + + // verify required parameter 'updateVariableValuesRequest' is not null or undefined + if (updateVariableValuesRequest === null || updateVariableValuesRequest === undefined) { + throw new RequiredError("ThoughtSpotRestApi", "updateVariableValues", "updateVariableValuesRequest"); + } + + + // Path Params + const localVarPath = '/api/rest/2.0/template/variables/update-values'; + + // Make Request Context + const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.POST); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.25.0") + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.25.0") + + + + + // Body Params + const contentType = ObjectSerializer.getPreferredMediaType([ + "application/json" + ]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = ObjectSerializer.stringify( + ObjectSerializer.serialize(updateVariableValuesRequest, "UpdateVariableValuesRequest", ""), + contentType + ); + requestContext.setBody(serializedBody); + + let authMethod: SecurityAuthentication | undefined; + // Apply auth methods + authMethod = _config.authMethods["bearerAuth"] + if (authMethod?.applySecurityAuthentication) { + await authMethod?.applySecurityAuthentication(requestContext); + } + + const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default + if (defaultAuth?.applySecurityAuthentication) { + await defaultAuth?.applySecurityAuthentication(requestContext); + } + + return requestContext; + } + + /** + * Version: 10.14.0.cl or later Updates an existing webhook configuration by its unique id or name. Only the provided fields will be updated. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) or `DEVELOPER` (**Has developer privilege**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, users with `CAN_MANAGE_WEBHOOKS` (**Can manage webhooks**) privilege are also authorized to perform this action. + * @param webhookIdentifier Unique ID or name of the webhook configuration. + * @param updateWebhookConfigurationRequest + */ + public async updateWebhookConfiguration(webhookIdentifier: string, updateWebhookConfigurationRequest: UpdateWebhookConfigurationRequest, _options?: Configuration): Promise { + let _config = _options || this.configuration; + + // verify required parameter 'webhookIdentifier' is not null or undefined + if (webhookIdentifier === null || webhookIdentifier === undefined) { + throw new RequiredError("ThoughtSpotRestApi", "updateWebhookConfiguration", "webhookIdentifier"); + } + + + // verify required parameter 'updateWebhookConfigurationRequest' is not null or undefined + if (updateWebhookConfigurationRequest === null || updateWebhookConfigurationRequest === undefined) { + throw new RequiredError("ThoughtSpotRestApi", "updateWebhookConfiguration", "updateWebhookConfigurationRequest"); + } + + + // Path Params + const localVarPath = '/api/rest/2.0/webhooks/{webhook_identifier}/update' + .replace('{' + 'webhook_identifier' + '}', encodeURIComponent(String(webhookIdentifier))); + + // Make Request Context + const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.POST); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.25.0") + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.25.0") + + + + + // Body Params + const contentType = ObjectSerializer.getPreferredMediaType([ + "application/json" + ]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = ObjectSerializer.stringify( + ObjectSerializer.serialize(updateWebhookConfigurationRequest, "UpdateWebhookConfigurationRequest", ""), + contentType + ); + requestContext.setBody(serializedBody); + + let authMethod: SecurityAuthentication | undefined; + // Apply auth methods + authMethod = _config.authMethods["bearerAuth"] + if (authMethod?.applySecurityAuthentication) { + await authMethod?.applySecurityAuthentication(requestContext); + } + + const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default + if (defaultAuth?.applySecurityAuthentication) { + await defaultAuth?.applySecurityAuthentication(requestContext); + } + + return requestContext; + } + + /** + * Version: 26.4.0.cl or later Validates a communication channel configuration to ensure it is properly set up and can receive events. - Use `channel_type` to specify the type of communication channel to validate (e.g., WEBHOOK). - Use `channel_identifier` to provide the unique identifier or name for the communication channel. - Use `event_type` to specify the event type to validate for this channel. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) or `DEVELOPER` (**Has developer privilege**) privilege. For webhook channels, users with `CAN_MANAGE_WEBHOOKS` (**Can manage webhooks**) privilege are also authorized to perform this action. + * @param validateCommunicationChannelRequest + */ + public async validateCommunicationChannel(validateCommunicationChannelRequest: ValidateCommunicationChannelRequest, _options?: Configuration): Promise { + let _config = _options || this.configuration; + + // verify required parameter 'validateCommunicationChannelRequest' is not null or undefined + if (validateCommunicationChannelRequest === null || validateCommunicationChannelRequest === undefined) { + throw new RequiredError("ThoughtSpotRestApi", "validateCommunicationChannel", "validateCommunicationChannelRequest"); + } + + + // Path Params + const localVarPath = '/api/rest/2.0/system/communication-channels/validate'; + + // Make Request Context + const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.POST); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.25.0") + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.25.0") + + + + + // Body Params + const contentType = ObjectSerializer.getPreferredMediaType([ + "application/json" + ]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = ObjectSerializer.stringify( + ObjectSerializer.serialize(validateCommunicationChannelRequest, "ValidateCommunicationChannelRequest", ""), + contentType + ); + requestContext.setBody(serializedBody); + + let authMethod: SecurityAuthentication | undefined; + // Apply auth methods + authMethod = _config.authMethods["bearerAuth"] + if (authMethod?.applySecurityAuthentication) { + await authMethod?.applySecurityAuthentication(requestContext); + } + + const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default + if (defaultAuth?.applySecurityAuthentication) { + await defaultAuth?.applySecurityAuthentication(requestContext); + } + + return requestContext; + } + + /** + * Version: 10.10.0.cl or later Validates the email customization configuration if any set for the ThoughtSpot system. #### Pre-requisites Requires `DEVELOPER` (**has developer privilege**) or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `DEVELOPER` (**Has developer privilege**) privilege is required. **NOTE**:This endpoint in currently in beta. Contact ThoughtSpot support to enable this on your instance. + */ + public async validateEmailCustomization(_options?: Configuration): Promise { + let _config = _options || this.configuration; + + // Path Params + const localVarPath = '/api/rest/2.0/customization/email/validate'; + + // Make Request Context + const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.POST); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.25.0") + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.25.0") + + + + + let authMethod: SecurityAuthentication | undefined; + // Apply auth methods + authMethod = _config.authMethods["bearerAuth"] + if (authMethod?.applySecurityAuthentication) { + await authMethod?.applySecurityAuthentication(requestContext); + } + + const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default + if (defaultAuth?.applySecurityAuthentication) { + await defaultAuth?.applySecurityAuthentication(requestContext); + } + + return requestContext; + } + + /** + * Version: 9.2.0.cl or later Validates the content of your source branch against the objects in your destination environment. Before merging content from your source branch to the destination branch, run this API operation from your destination environment and ensure that the changes from the source branch function in the destination environment. Requires `DATAMANAGEMENT` (**Can manage data**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance on your instance, the `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` (**Can manage data models**) privilege and edit access to the metadata objects. + * @param validateMergeRequest + */ + public async validateMerge(validateMergeRequest: ValidateMergeRequest, _options?: Configuration): Promise { + let _config = _options || this.configuration; + + // verify required parameter 'validateMergeRequest' is not null or undefined + if (validateMergeRequest === null || validateMergeRequest === undefined) { + throw new RequiredError("ThoughtSpotRestApi", "validateMerge", "validateMergeRequest"); + } + + + // Path Params + const localVarPath = '/api/rest/2.0/vcs/git/branches/validate'; + + // Make Request Context + const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.POST); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.25.0") + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.25.0") + + + + + // Body Params + const contentType = ObjectSerializer.getPreferredMediaType([ + "application/json" + ]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = ObjectSerializer.stringify( + ObjectSerializer.serialize(validateMergeRequest, "ValidateMergeRequest", ""), + contentType + ); + requestContext.setBody(serializedBody); + + let authMethod: SecurityAuthentication | undefined; + // Apply auth methods + authMethod = _config.authMethods["bearerAuth"] + if (authMethod?.applySecurityAuthentication) { + await authMethod?.applySecurityAuthentication(requestContext); + } + + const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default + if (defaultAuth?.applySecurityAuthentication) { + await defaultAuth?.applySecurityAuthentication(requestContext); + } + + return requestContext; + } + + /** + * Version: 9.12.0.cl or later Validates the authentication token specified in the API request. If your token is not valid, [Get a new token](#/http/api-endpoints/authentication/get-full-access-token). + * @param validateTokenRequest + */ + public async validateToken(validateTokenRequest: ValidateTokenRequest, _options?: Configuration): Promise { + let _config = _options || this.configuration; + + // verify required parameter 'validateTokenRequest' is not null or undefined + if (validateTokenRequest === null || validateTokenRequest === undefined) { + throw new RequiredError("ThoughtSpotRestApi", "validateToken", "validateTokenRequest"); + } + + + // Path Params + const localVarPath = '/api/rest/2.0/auth/token/validate'; + + // Make Request Context + const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.POST); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.25.0") + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.25.0") + + + + + // Body Params + const contentType = ObjectSerializer.getPreferredMediaType([ + "application/json" + ]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = ObjectSerializer.stringify( + ObjectSerializer.serialize(validateTokenRequest, "ValidateTokenRequest", ""), + contentType + ); + requestContext.setBody(serializedBody); + + let authMethod: SecurityAuthentication | undefined; + // Apply auth methods + authMethod = _config.authMethods["bearerAuth"] + if (authMethod?.applySecurityAuthentication) { + await authMethod?.applySecurityAuthentication(requestContext); + } + + const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default + if (defaultAuth?.applySecurityAuthentication) { + await defaultAuth?.applySecurityAuthentication(requestContext); + } + + return requestContext; + } + +} + +export class ThoughtSpotRestApiResponseProcessor { + + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to activateUser + * @throws ApiException if the response code was not in [200, 299] + */ + public async activateUser(response: ResponseContext): Promise { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("200", response.httpStatusCode)) { + const body: User = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "User", "" + ) as User; + return body; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Invalid request.", body, response.headers); + } + if (isCodeInRange("401", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Unexpected error", body, response.headers); + } + + // Work around for missing responses in specification, e.g. for petstore.yaml + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body: User = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "User", "" + ) as User; + return body; + } + + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", await response.getBodyAsAny(), response.headers); + } + + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to assignChangeAuthor + * @throws ApiException if the response code was not in [200, 299] + */ + public async assignChangeAuthor(response: ResponseContext): Promise { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("204", response.httpStatusCode)) { + return; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Invalid request.", body, response.headers); + } + if (isCodeInRange("401", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Unexpected error", body, response.headers); + } + + // Work around for missing responses in specification, e.g. for petstore.yaml + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body: void = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "void", "" + ) as void; + return body; + } + + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", await response.getBodyAsAny(), response.headers); + } + + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to assignTag + * @throws ApiException if the response code was not in [200, 299] + */ + public async assignTag(response: ResponseContext): Promise { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("204", response.httpStatusCode)) { + return; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Invalid request.", body, response.headers); + } + if (isCodeInRange("401", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Unexpected error", body, response.headers); + } + + // Work around for missing responses in specification, e.g. for petstore.yaml + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body: void = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "void", "" + ) as void; + return body; + } + + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", await response.getBodyAsAny(), response.headers); + } + + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to changeUserPassword + * @throws ApiException if the response code was not in [200, 299] + */ + public async changeUserPassword(response: ResponseContext): Promise { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("204", response.httpStatusCode)) { + return; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Invalid request.", body, response.headers); + } + if (isCodeInRange("401", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Unexpected error", body, response.headers); + } + + // Work around for missing responses in specification, e.g. for petstore.yaml + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body: void = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "void", "" + ) as void; + return body; + } + + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", await response.getBodyAsAny(), response.headers); + } + + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to commitBranch + * @throws ApiException if the response code was not in [200, 299] + */ + public async commitBranch(response: ResponseContext): Promise { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("200", response.httpStatusCode)) { + const body: CommitResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "CommitResponse", "" + ) as CommitResponse; + return body; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Invalid request.", body, response.headers); + } + if (isCodeInRange("401", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Unexpected error", body, response.headers); + } + + // Work around for missing responses in specification, e.g. for petstore.yaml + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body: CommitResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "CommitResponse", "" + ) as CommitResponse; + return body; + } + + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", await response.getBodyAsAny(), response.headers); + } + + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to configureAuthSettings + * @throws ApiException if the response code was not in [200, 299] + */ + public async configureAuthSettings(response: ResponseContext): Promise { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("204", response.httpStatusCode)) { + return; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Invalid request.", body, response.headers); + } + if (isCodeInRange("401", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Unexpected error", body, response.headers); + } + + // Work around for missing responses in specification, e.g. for petstore.yaml + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body: void = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "void", "" + ) as void; + return body; + } + + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", await response.getBodyAsAny(), response.headers); + } + + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to configureCommunicationChannelPreferences + * @throws ApiException if the response code was not in [200, 299] + */ + public async configureCommunicationChannelPreferences(response: ResponseContext): Promise { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("204", response.httpStatusCode)) { + return; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Invalid request.", body, response.headers); + } + if (isCodeInRange("401", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Unexpected error", body, response.headers); + } + + // Work around for missing responses in specification, e.g. for petstore.yaml + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body: void = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "void", "" + ) as void; + return body; + } + + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", await response.getBodyAsAny(), response.headers); + } + + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to configureSecuritySettings + * @throws ApiException if the response code was not in [200, 299] + */ + public async configureSecuritySettings(response: ResponseContext): Promise { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("204", response.httpStatusCode)) { + return; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Invalid request.", body, response.headers); + } + if (isCodeInRange("401", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Unexpected error", body, response.headers); + } + + // Work around for missing responses in specification, e.g. for petstore.yaml + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body: void = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "void", "" + ) as void; + return body; + } + + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", await response.getBodyAsAny(), response.headers); + } + + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to connectionConfigurationSearch + * @throws ApiException if the response code was not in [200, 299] + */ + public async connectionConfigurationSearch(response: ResponseContext): Promise > { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("200", response.httpStatusCode)) { + const body: Array = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "Array", "" + ) as Array; + return body; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Invalid request.", body, response.headers); + } + if (isCodeInRange("401", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Unexpected error", body, response.headers); + } + + // Work around for missing responses in specification, e.g. for petstore.yaml + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body: Array = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "Array", "" + ) as Array; + return body; + } + + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", await response.getBodyAsAny(), response.headers); + } + + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to convertWorksheetToModel + * @throws ApiException if the response code was not in [200, 299] + */ + public async convertWorksheetToModel(response: ResponseContext): Promise { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("200", response.httpStatusCode)) { + const body: ResponseWorksheetToModelConversion = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ResponseWorksheetToModelConversion", "" + ) as ResponseWorksheetToModelConversion; + return body; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Invalid request.", body, response.headers); + } + if (isCodeInRange("401", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Unexpected error", body, response.headers); + } + + // Work around for missing responses in specification, e.g. for petstore.yaml + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body: ResponseWorksheetToModelConversion = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ResponseWorksheetToModelConversion", "" + ) as ResponseWorksheetToModelConversion; + return body; + } + + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", await response.getBodyAsAny(), response.headers); + } + + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to copyObject + * @throws ApiException if the response code was not in [200, 299] + */ + public async copyObject(response: ResponseContext): Promise { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("200", response.httpStatusCode)) { + const body: ResponseCopyObject = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ResponseCopyObject", "" + ) as ResponseCopyObject; + return body; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Invalid request.", body, response.headers); + } + if (isCodeInRange("401", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } + if (isCodeInRange("404", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Object not found", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Unexpected error", body, response.headers); + } + + // Work around for missing responses in specification, e.g. for petstore.yaml + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body: ResponseCopyObject = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ResponseCopyObject", "" + ) as ResponseCopyObject; + return body; + } + + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", await response.getBodyAsAny(), response.headers); + } + + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to createAgentConversation + * @throws ApiException if the response code was not in [200, 299] + */ + public async createAgentConversation(response: ResponseContext): Promise { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("200", response.httpStatusCode)) { + const body: AgentConversation = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "AgentConversation", "" + ) as AgentConversation; + return body; + } + if (isCodeInRange("201", response.httpStatusCode)) { + const body: AgentConversation = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "AgentConversation", "" + ) as AgentConversation; + return body; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Operation failed", body, response.headers); + } + if (isCodeInRange("401", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Operation failed", body, response.headers); + } + + // Work around for missing responses in specification, e.g. for petstore.yaml + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body: AgentConversation = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "AgentConversation", "" + ) as AgentConversation; + return body; + } + + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", await response.getBodyAsAny(), response.headers); + } + + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to createCalendar + * @throws ApiException if the response code was not in [200, 299] + */ + public async createCalendar(response: ResponseContext): Promise { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("200", response.httpStatusCode)) { + const body: CalendarResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "CalendarResponse", "" + ) as CalendarResponse; + return body; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Invalid request.", body, response.headers); + } + if (isCodeInRange("401", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Unexpected error", body, response.headers); + } + + // Work around for missing responses in specification, e.g. for petstore.yaml + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body: CalendarResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "CalendarResponse", "" + ) as CalendarResponse; + return body; + } + + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", await response.getBodyAsAny(), response.headers); + } + + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to createCollection + * @throws ApiException if the response code was not in [200, 299] + */ + public async createCollection(response: ResponseContext): Promise { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("200", response.httpStatusCode)) { + const body: Collection = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "Collection", "" + ) as Collection; + return body; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Invalid request.", body, response.headers); + } + if (isCodeInRange("401", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Unexpected error", body, response.headers); + } + + // Work around for missing responses in specification, e.g. for petstore.yaml + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body: Collection = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "Collection", "" + ) as Collection; + return body; + } + + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", await response.getBodyAsAny(), response.headers); + } + + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to createConfig + * @throws ApiException if the response code was not in [200, 299] + */ + public async createConfig(response: ResponseContext): Promise { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("200", response.httpStatusCode)) { + const body: RepoConfigObject = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "RepoConfigObject", "" + ) as RepoConfigObject; + return body; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Invalid request.", body, response.headers); + } + if (isCodeInRange("401", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Unexpected error", body, response.headers); + } + + // Work around for missing responses in specification, e.g. for petstore.yaml + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body: RepoConfigObject = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "RepoConfigObject", "" + ) as RepoConfigObject; + return body; + } + + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", await response.getBodyAsAny(), response.headers); + } + + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to createConnection + * @throws ApiException if the response code was not in [200, 299] + */ + public async createConnection(response: ResponseContext): Promise { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("200", response.httpStatusCode)) { + const body: CreateConnectionResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "CreateConnectionResponse", "" + ) as CreateConnectionResponse; + return body; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Invalid request.", body, response.headers); + } + if (isCodeInRange("401", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Unexpected error", body, response.headers); + } + + // Work around for missing responses in specification, e.g. for petstore.yaml + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body: CreateConnectionResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "CreateConnectionResponse", "" + ) as CreateConnectionResponse; + return body; + } + + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", await response.getBodyAsAny(), response.headers); + } + + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to createConnectionConfiguration + * @throws ApiException if the response code was not in [200, 299] + */ + public async createConnectionConfiguration(response: ResponseContext): Promise { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("200", response.httpStatusCode)) { + const body: ConnectionConfigurationResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ConnectionConfigurationResponse", "" + ) as ConnectionConfigurationResponse; + return body; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Invalid request.", body, response.headers); + } + if (isCodeInRange("401", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Unexpected error", body, response.headers); + } + + // Work around for missing responses in specification, e.g. for petstore.yaml + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body: ConnectionConfigurationResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ConnectionConfigurationResponse", "" + ) as ConnectionConfigurationResponse; + return body; + } + + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", await response.getBodyAsAny(), response.headers); + } + + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to createConversation + * @throws ApiException if the response code was not in [200, 299] + */ + public async createConversation(response: ResponseContext): Promise { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("200", response.httpStatusCode)) { + const body: Conversation = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "Conversation", "" + ) as Conversation; + return body; + } + if (isCodeInRange("201", response.httpStatusCode)) { + const body: Conversation = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "Conversation", "" + ) as Conversation; + return body; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Operation failed", body, response.headers); + } + if (isCodeInRange("401", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Operation failed", body, response.headers); + } + + // Work around for missing responses in specification, e.g. for petstore.yaml + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body: Conversation = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "Conversation", "" + ) as Conversation; + return body; + } + + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", await response.getBodyAsAny(), response.headers); + } + + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to createCustomAction + * @throws ApiException if the response code was not in [200, 299] + */ + public async createCustomAction(response: ResponseContext): Promise { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("200", response.httpStatusCode)) { + const body: ResponseCustomAction = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ResponseCustomAction", "" + ) as ResponseCustomAction; + return body; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Invalid request.", body, response.headers); + } + if (isCodeInRange("401", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Unexpected error", body, response.headers); + } + + // Work around for missing responses in specification, e.g. for petstore.yaml + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body: ResponseCustomAction = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ResponseCustomAction", "" + ) as ResponseCustomAction; + return body; + } + + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", await response.getBodyAsAny(), response.headers); + } + + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to createEmailCustomization + * @throws ApiException if the response code was not in [200, 299] + */ + public async createEmailCustomization(response: ResponseContext): Promise { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("200", response.httpStatusCode)) { + const body: CreateEmailCustomizationResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "CreateEmailCustomizationResponse", "" + ) as CreateEmailCustomizationResponse; + return body; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Invalid request.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Unexpected error", body, response.headers); + } + + // Work around for missing responses in specification, e.g. for petstore.yaml + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body: CreateEmailCustomizationResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "CreateEmailCustomizationResponse", "" + ) as CreateEmailCustomizationResponse; + return body; + } + + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", await response.getBodyAsAny(), response.headers); + } + + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to createOrg + * @throws ApiException if the response code was not in [200, 299] + */ + public async createOrg(response: ResponseContext): Promise { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("200", response.httpStatusCode)) { + const body: OrgResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "OrgResponse", "" + ) as OrgResponse; + return body; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Invalid request.", body, response.headers); + } + if (isCodeInRange("401", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Unexpected error", body, response.headers); + } + + // Work around for missing responses in specification, e.g. for petstore.yaml + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body: OrgResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "OrgResponse", "" + ) as OrgResponse; + return body; + } + + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", await response.getBodyAsAny(), response.headers); + } + + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to createRole + * @throws ApiException if the response code was not in [200, 299] + */ + public async createRole(response: ResponseContext): Promise { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("200", response.httpStatusCode)) { + const body: RoleResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "RoleResponse", "" + ) as RoleResponse; + return body; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Invalid parameters.", body, response.headers); + } + if (isCodeInRange("401", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Internal error", body, response.headers); + } + + // Work around for missing responses in specification, e.g. for petstore.yaml + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body: RoleResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "RoleResponse", "" + ) as RoleResponse; + return body; + } + + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", await response.getBodyAsAny(), response.headers); + } + + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to createSchedule + * @throws ApiException if the response code was not in [200, 299] + */ + public async createSchedule(response: ResponseContext): Promise { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("200", response.httpStatusCode)) { + const body: ResponseSchedule = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ResponseSchedule", "" + ) as ResponseSchedule; + return body; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Invalid request.", body, response.headers); + } + if (isCodeInRange("401", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Unexpected error", body, response.headers); + } + + // Work around for missing responses in specification, e.g. for petstore.yaml + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body: ResponseSchedule = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ResponseSchedule", "" + ) as ResponseSchedule; + return body; + } + + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", await response.getBodyAsAny(), response.headers); + } + + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to createTag + * @throws ApiException if the response code was not in [200, 299] + */ + public async createTag(response: ResponseContext): Promise { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("200", response.httpStatusCode)) { + const body: Tag = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "Tag", "" + ) as Tag; + return body; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Invalid request.", body, response.headers); + } + if (isCodeInRange("401", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Unexpected error", body, response.headers); + } + + // Work around for missing responses in specification, e.g. for petstore.yaml + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body: Tag = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "Tag", "" + ) as Tag; + return body; + } + + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", await response.getBodyAsAny(), response.headers); + } + + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to createUser + * @throws ApiException if the response code was not in [200, 299] + */ + public async createUser(response: ResponseContext): Promise { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("200", response.httpStatusCode)) { + const body: User = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "User", "" + ) as User; + return body; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Invalid request.", body, response.headers); + } + if (isCodeInRange("401", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Unexpected error", body, response.headers); + } + + // Work around for missing responses in specification, e.g. for petstore.yaml + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body: User = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "User", "" + ) as User; + return body; + } + + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", await response.getBodyAsAny(), response.headers); + } + + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to createUserGroup + * @throws ApiException if the response code was not in [200, 299] + */ + public async createUserGroup(response: ResponseContext): Promise { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("200", response.httpStatusCode)) { + const body: UserGroupResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "UserGroupResponse", "" + ) as UserGroupResponse; + return body; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Invalid request.", body, response.headers); + } + if (isCodeInRange("401", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Unexpected error", body, response.headers); + } + + // Work around for missing responses in specification, e.g. for petstore.yaml + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body: UserGroupResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "UserGroupResponse", "" + ) as UserGroupResponse; + return body; + } + + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", await response.getBodyAsAny(), response.headers); + } + + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to createVariable + * @throws ApiException if the response code was not in [200, 299] + */ + public async createVariable(response: ResponseContext): Promise { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("200", response.httpStatusCode)) { + const body: Variable = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "Variable", "" + ) as Variable; + return body; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Invalid request.", body, response.headers); + } + if (isCodeInRange("401", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Unexpected error", body, response.headers); + } + + // Work around for missing responses in specification, e.g. for petstore.yaml + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body: Variable = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "Variable", "" + ) as Variable; + return body; + } + + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", await response.getBodyAsAny(), response.headers); + } + + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to createWebhookConfiguration + * @throws ApiException if the response code was not in [200, 299] + */ + public async createWebhookConfiguration(response: ResponseContext): Promise { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("200", response.httpStatusCode)) { + const body: WebhookResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "WebhookResponse", "" + ) as WebhookResponse; + return body; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Invalid request.", body, response.headers); + } + if (isCodeInRange("401", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Unexpected error", body, response.headers); + } + + // Work around for missing responses in specification, e.g. for petstore.yaml + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body: WebhookResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "WebhookResponse", "" + ) as WebhookResponse; + return body; + } + + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", await response.getBodyAsAny(), response.headers); + } + + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to dbtConnection + * @throws ApiException if the response code was not in [200, 299] + */ + public async dbtConnection(response: ResponseContext): Promise { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("200", response.httpStatusCode)) { + const body: any = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "any", "" + ) as any; + return body; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Invalid request.", body, response.headers); + } + if (isCodeInRange("401", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Unexpected error", body, response.headers); + } + + // Work around for missing responses in specification, e.g. for petstore.yaml + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body: any = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "any", "" + ) as any; + return body; + } + + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", await response.getBodyAsAny(), response.headers); + } + + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to dbtGenerateSyncTml + * @throws ApiException if the response code was not in [200, 299] + */ + public async dbtGenerateSyncTml(response: ResponseContext): Promise { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("200", response.httpStatusCode)) { + const body: any = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "any", "" + ) as any; + return body; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Invalid request.", body, response.headers); + } + if (isCodeInRange("401", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Unexpected error", body, response.headers); + } + + // Work around for missing responses in specification, e.g. for petstore.yaml + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body: any = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "any", "" + ) as any; + return body; + } + + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", await response.getBodyAsAny(), response.headers); + } + + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to dbtGenerateTml + * @throws ApiException if the response code was not in [200, 299] + */ + public async dbtGenerateTml(response: ResponseContext): Promise { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("200", response.httpStatusCode)) { + const body: any = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "any", "" + ) as any; + return body; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Invalid request.", body, response.headers); + } + if (isCodeInRange("401", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Unexpected error", body, response.headers); + } + + // Work around for missing responses in specification, e.g. for petstore.yaml + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body: any = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "any", "" + ) as any; + return body; + } + + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", await response.getBodyAsAny(), response.headers); + } + + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to dbtSearch + * @throws ApiException if the response code was not in [200, 299] + */ + public async dbtSearch(response: ResponseContext): Promise > { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("200", response.httpStatusCode)) { + const body: Array = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "Array", "" + ) as Array; + return body; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Invalid request.", body, response.headers); + } + if (isCodeInRange("401", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Unexpected error", body, response.headers); + } + + // Work around for missing responses in specification, e.g. for petstore.yaml + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body: Array = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "Array", "" + ) as Array; + return body; + } + + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", await response.getBodyAsAny(), response.headers); + } + + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to deactivateUser + * @throws ApiException if the response code was not in [200, 299] + */ + public async deactivateUser(response: ResponseContext): Promise { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("200", response.httpStatusCode)) { + const body: ResponseActivationURL = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ResponseActivationURL", "" + ) as ResponseActivationURL; + return body; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Invalid request.", body, response.headers); + } + if (isCodeInRange("401", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Unexpected error", body, response.headers); + } + + // Work around for missing responses in specification, e.g. for petstore.yaml + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body: ResponseActivationURL = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ResponseActivationURL", "" + ) as ResponseActivationURL; + return body; + } + + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", await response.getBodyAsAny(), response.headers); + } + + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to deleteCalendar + * @throws ApiException if the response code was not in [200, 299] + */ + public async deleteCalendar(response: ResponseContext): Promise { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("204", response.httpStatusCode)) { + return; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Invalid request.", body, response.headers); + } + if (isCodeInRange("401", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Unexpected error", body, response.headers); + } + + // Work around for missing responses in specification, e.g. for petstore.yaml + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body: void = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "void", "" + ) as void; + return body; + } + + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", await response.getBodyAsAny(), response.headers); + } + + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to deleteCollection + * @throws ApiException if the response code was not in [200, 299] + */ + public async deleteCollection(response: ResponseContext): Promise { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("200", response.httpStatusCode)) { + const body: CollectionDeleteResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "CollectionDeleteResponse", "" + ) as CollectionDeleteResponse; + return body; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Invalid request.", body, response.headers); + } + if (isCodeInRange("401", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } + if (isCodeInRange("404", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Resource not found.", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Unexpected error", body, response.headers); + } + + // Work around for missing responses in specification, e.g. for petstore.yaml + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body: CollectionDeleteResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "CollectionDeleteResponse", "" + ) as CollectionDeleteResponse; + return body; + } + + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", await response.getBodyAsAny(), response.headers); + } + + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to deleteConfig + * @throws ApiException if the response code was not in [200, 299] + */ + public async deleteConfig(response: ResponseContext): Promise { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("204", response.httpStatusCode)) { + return; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Invalid request.", body, response.headers); + } + if (isCodeInRange("401", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Unexpected error", body, response.headers); + } + + // Work around for missing responses in specification, e.g. for petstore.yaml + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body: void = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "void", "" + ) as void; + return body; + } + + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", await response.getBodyAsAny(), response.headers); + } + + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to deleteConnection + * @throws ApiException if the response code was not in [200, 299] + */ + public async deleteConnection(response: ResponseContext): Promise { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("204", response.httpStatusCode)) { + return; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Invalid request.", body, response.headers); + } + if (isCodeInRange("401", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Unexpected error", body, response.headers); + } + + // Work around for missing responses in specification, e.g. for petstore.yaml + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body: void = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "void", "" + ) as void; + return body; + } + + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", await response.getBodyAsAny(), response.headers); + } + + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to deleteConnectionConfiguration + * @throws ApiException if the response code was not in [200, 299] + */ + public async deleteConnectionConfiguration(response: ResponseContext): Promise { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("204", response.httpStatusCode)) { + return; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Invalid request.", body, response.headers); + } + if (isCodeInRange("401", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Unexpected error", body, response.headers); + } + + // Work around for missing responses in specification, e.g. for petstore.yaml + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body: void = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "void", "" + ) as void; + return body; + } + + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", await response.getBodyAsAny(), response.headers); + } + + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to deleteConnectionV2 + * @throws ApiException if the response code was not in [200, 299] + */ + public async deleteConnectionV2(response: ResponseContext): Promise { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("204", response.httpStatusCode)) { + return; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Invalid request.", body, response.headers); + } + if (isCodeInRange("401", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Unexpected error", body, response.headers); + } + + // Work around for missing responses in specification, e.g. for petstore.yaml + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body: void = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "void", "" + ) as void; + return body; + } + + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", await response.getBodyAsAny(), response.headers); + } + + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to deleteCustomAction + * @throws ApiException if the response code was not in [200, 299] + */ + public async deleteCustomAction(response: ResponseContext): Promise { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("204", response.httpStatusCode)) { + return; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Invalid request.", body, response.headers); + } + if (isCodeInRange("401", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Unexpected error", body, response.headers); + } + + // Work around for missing responses in specification, e.g. for petstore.yaml + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body: void = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "void", "" + ) as void; + return body; + } + + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", await response.getBodyAsAny(), response.headers); + } + + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to deleteDbtConnection + * @throws ApiException if the response code was not in [200, 299] + */ + public async deleteDbtConnection(response: ResponseContext): Promise { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("204", response.httpStatusCode)) { + return; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Invalid request.", body, response.headers); + } + if (isCodeInRange("401", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Unexpected error", body, response.headers); + } + + // Work around for missing responses in specification, e.g. for petstore.yaml + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body: void = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "void", "" + ) as void; + return body; + } + + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", await response.getBodyAsAny(), response.headers); + } + + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to deleteEmailCustomization + * @throws ApiException if the response code was not in [200, 299] + */ + public async deleteEmailCustomization(response: ResponseContext): Promise { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("204", response.httpStatusCode)) { + return; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Invalid request.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Unexpected error", body, response.headers); + } + + // Work around for missing responses in specification, e.g. for petstore.yaml + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body: void = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "void", "" + ) as void; + return body; + } + + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", await response.getBodyAsAny(), response.headers); + } + + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to deleteMetadata + * @throws ApiException if the response code was not in [200, 299] + */ + public async deleteMetadata(response: ResponseContext): Promise { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("204", response.httpStatusCode)) { + return; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Invalid request.", body, response.headers); + } + if (isCodeInRange("401", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Unexpected error", body, response.headers); + } + + // Work around for missing responses in specification, e.g. for petstore.yaml + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body: void = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "void", "" + ) as void; + return body; + } + + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", await response.getBodyAsAny(), response.headers); + } + + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to deleteOrg + * @throws ApiException if the response code was not in [200, 299] + */ + public async deleteOrg(response: ResponseContext): Promise { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("204", response.httpStatusCode)) { + return; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Invalid request.", body, response.headers); + } + if (isCodeInRange("401", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Unexpected error", body, response.headers); + } + + // Work around for missing responses in specification, e.g. for petstore.yaml + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body: void = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "void", "" + ) as void; + return body; + } + + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", await response.getBodyAsAny(), response.headers); + } + + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to deleteOrgEmailCustomization + * @throws ApiException if the response code was not in [200, 299] + */ + public async deleteOrgEmailCustomization(response: ResponseContext): Promise { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("204", response.httpStatusCode)) { + return; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Invalid request.", body, response.headers); + } + if (isCodeInRange("401", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Unexpected error", body, response.headers); + } + + // Work around for missing responses in specification, e.g. for petstore.yaml + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body: void = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "void", "" + ) as void; + return body; + } + + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", await response.getBodyAsAny(), response.headers); + } + + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to deleteRole + * @throws ApiException if the response code was not in [200, 299] + */ + public async deleteRole(response: ResponseContext): Promise { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("204", response.httpStatusCode)) { + return; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Invalid request.", body, response.headers); + } + if (isCodeInRange("401", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Internal error", body, response.headers); + } + + // Work around for missing responses in specification, e.g. for petstore.yaml + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body: void = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "void", "" + ) as void; + return body; + } + + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", await response.getBodyAsAny(), response.headers); + } + + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to deleteSchedule + * @throws ApiException if the response code was not in [200, 299] + */ + public async deleteSchedule(response: ResponseContext): Promise { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("204", response.httpStatusCode)) { + return; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Invalid request.", body, response.headers); + } + if (isCodeInRange("401", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Unexpected error", body, response.headers); + } + + // Work around for missing responses in specification, e.g. for petstore.yaml + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body: void = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "void", "" + ) as void; + return body; + } + + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", await response.getBodyAsAny(), response.headers); + } + + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to deleteTag + * @throws ApiException if the response code was not in [200, 299] + */ + public async deleteTag(response: ResponseContext): Promise { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("204", response.httpStatusCode)) { + return; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Invalid request.", body, response.headers); + } + if (isCodeInRange("401", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Unexpected error", body, response.headers); + } + + // Work around for missing responses in specification, e.g. for petstore.yaml + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body: void = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "void", "" + ) as void; + return body; + } + + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", await response.getBodyAsAny(), response.headers); + } + + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to deleteUser + * @throws ApiException if the response code was not in [200, 299] + */ + public async deleteUser(response: ResponseContext): Promise { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("204", response.httpStatusCode)) { + return; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Invalid request.", body, response.headers); + } + if (isCodeInRange("401", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Unexpected error", body, response.headers); + } + + // Work around for missing responses in specification, e.g. for petstore.yaml + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body: void = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "void", "" + ) as void; + return body; + } + + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", await response.getBodyAsAny(), response.headers); + } + + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to deleteUserGroup + * @throws ApiException if the response code was not in [200, 299] + */ + public async deleteUserGroup(response: ResponseContext): Promise { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("204", response.httpStatusCode)) { + return; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Invalid request.", body, response.headers); + } + if (isCodeInRange("401", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Unexpected error", body, response.headers); + } + + // Work around for missing responses in specification, e.g. for petstore.yaml + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body: void = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "void", "" + ) as void; + return body; + } + + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", await response.getBodyAsAny(), response.headers); + } + + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to deleteVariable + * @throws ApiException if the response code was not in [200, 299] + */ + public async deleteVariable(response: ResponseContext): Promise { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("204", response.httpStatusCode)) { + return; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Invalid request.", body, response.headers); + } + if (isCodeInRange("401", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Unexpected error", body, response.headers); + } + + // Work around for missing responses in specification, e.g. for petstore.yaml + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body: void = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "void", "" + ) as void; + return body; + } + + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", await response.getBodyAsAny(), response.headers); + } + + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to deleteVariables + * @throws ApiException if the response code was not in [200, 299] + */ + public async deleteVariables(response: ResponseContext): Promise { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("204", response.httpStatusCode)) { + return; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Invalid request.", body, response.headers); + } + if (isCodeInRange("401", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Unexpected error", body, response.headers); + } + + // Work around for missing responses in specification, e.g. for petstore.yaml + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body: void = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "void", "" + ) as void; + return body; + } + + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", await response.getBodyAsAny(), response.headers); + } + + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to deleteWebhookConfigurations + * @throws ApiException if the response code was not in [200, 299] + */ + public async deleteWebhookConfigurations(response: ResponseContext): Promise { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("200", response.httpStatusCode)) { + const body: WebhookDeleteResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "WebhookDeleteResponse", "" + ) as WebhookDeleteResponse; + return body; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Invalid request.", body, response.headers); + } + if (isCodeInRange("401", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Unexpected error", body, response.headers); + } + + // Work around for missing responses in specification, e.g. for petstore.yaml + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body: WebhookDeleteResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "WebhookDeleteResponse", "" + ) as WebhookDeleteResponse; + return body; + } + + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", await response.getBodyAsAny(), response.headers); + } + + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to deployCommit + * @throws ApiException if the response code was not in [200, 299] + */ + public async deployCommit(response: ResponseContext): Promise > { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("200", response.httpStatusCode)) { + const body: Array = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "Array", "" + ) as Array; + return body; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Invalid request.", body, response.headers); + } + if (isCodeInRange("401", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Unexpected error", body, response.headers); + } + + // Work around for missing responses in specification, e.g. for petstore.yaml + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body: Array = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "Array", "" + ) as Array; + return body; + } + + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", await response.getBodyAsAny(), response.headers); + } + + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to downloadConnectionMetadataChanges + * @throws ApiException if the response code was not in [200, 299] + */ + public async downloadConnectionMetadataChanges(response: ResponseContext): Promise { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("200", response.httpStatusCode)) { + const body: HttpFile = await response.getBodyAsFile() as any as HttpFile; + return body; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "binary" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Invalid request.", body, response.headers); + } + if (isCodeInRange("401", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "binary" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "binary" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "binary" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Unexpected error", body, response.headers); + } + + // Work around for missing responses in specification, e.g. for petstore.yaml + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body: HttpFile = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "HttpFile", "binary" + ) as HttpFile; + return body; + } + + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", await response.getBodyAsAny(), response.headers); + } + + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to exportAnswerReport + * @throws ApiException if the response code was not in [200, 299] + */ + public async exportAnswerReport(response: ResponseContext): Promise { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("200", response.httpStatusCode)) { + const body: HttpFile = await response.getBodyAsFile() as any as HttpFile; + return body; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "binary" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Invalid request.", body, response.headers); + } + if (isCodeInRange("401", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "binary" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "binary" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "binary" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Unexpected error", body, response.headers); + } + + // Work around for missing responses in specification, e.g. for petstore.yaml + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body: HttpFile = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "HttpFile", "binary" + ) as HttpFile; + return body; + } + + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", await response.getBodyAsAny(), response.headers); + } + + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to exportLiveboardReport + * @throws ApiException if the response code was not in [200, 299] + */ + public async exportLiveboardReport(response: ResponseContext): Promise { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("200", response.httpStatusCode)) { + const body: HttpFile = await response.getBodyAsFile() as any as HttpFile; + return body; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "binary" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Invalid request.", body, response.headers); + } + if (isCodeInRange("401", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "binary" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "binary" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "binary" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Unexpected error", body, response.headers); + } + + // Work around for missing responses in specification, e.g. for petstore.yaml + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body: HttpFile = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "HttpFile", "binary" + ) as HttpFile; + return body; + } + + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", await response.getBodyAsAny(), response.headers); + } + + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to exportMetadataTML + * @throws ApiException if the response code was not in [200, 299] + */ + public async exportMetadataTML(response: ResponseContext): Promise > { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("200", response.httpStatusCode)) { + const body: Array = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "Array", "" + ) as Array; + return body; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Invalid request.", body, response.headers); + } + if (isCodeInRange("401", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Unexpected error", body, response.headers); + } + + // Work around for missing responses in specification, e.g. for petstore.yaml + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body: Array = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "Array", "" + ) as Array; + return body; + } + + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", await response.getBodyAsAny(), response.headers); + } + + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to exportMetadataTMLBatched + * @throws ApiException if the response code was not in [200, 299] + */ + public async exportMetadataTMLBatched(response: ResponseContext): Promise { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("200", response.httpStatusCode)) { + const body: any = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "any", "" + ) as any; + return body; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Invalid request.", body, response.headers); + } + if (isCodeInRange("401", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Unexpected error", body, response.headers); + } + + // Work around for missing responses in specification, e.g. for petstore.yaml + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body: any = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "any", "" + ) as any; + return body; + } + + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", await response.getBodyAsAny(), response.headers); + } + + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to fetchAnswerData + * @throws ApiException if the response code was not in [200, 299] + */ + public async fetchAnswerData(response: ResponseContext): Promise { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("200", response.httpStatusCode)) { + const body: AnswerDataResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "AnswerDataResponse", "" + ) as AnswerDataResponse; + return body; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Invalid request.", body, response.headers); + } + if (isCodeInRange("401", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Unexpected error", body, response.headers); + } + + // Work around for missing responses in specification, e.g. for petstore.yaml + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body: AnswerDataResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "AnswerDataResponse", "" + ) as AnswerDataResponse; + return body; + } + + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", await response.getBodyAsAny(), response.headers); + } + + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to fetchAnswerSqlQuery + * @throws ApiException if the response code was not in [200, 299] + */ + public async fetchAnswerSqlQuery(response: ResponseContext): Promise { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("200", response.httpStatusCode)) { + const body: SqlQueryResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "SqlQueryResponse", "" + ) as SqlQueryResponse; + return body; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Invalid request.", body, response.headers); + } + if (isCodeInRange("401", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Unexpected error", body, response.headers); + } + + // Work around for missing responses in specification, e.g. for petstore.yaml + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body: SqlQueryResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "SqlQueryResponse", "" + ) as SqlQueryResponse; + return body; + } + + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", await response.getBodyAsAny(), response.headers); + } + + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to fetchAsyncImportTaskStatus + * @throws ApiException if the response code was not in [200, 299] + */ + public async fetchAsyncImportTaskStatus(response: ResponseContext): Promise { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("200", response.httpStatusCode)) { + const body: GetAsyncImportStatusResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "GetAsyncImportStatusResponse", "" + ) as GetAsyncImportStatusResponse; + return body; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Invalid request.", body, response.headers); + } + if (isCodeInRange("401", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Unexpected error", body, response.headers); + } + + // Work around for missing responses in specification, e.g. for petstore.yaml + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body: GetAsyncImportStatusResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "GetAsyncImportStatusResponse", "" + ) as GetAsyncImportStatusResponse; + return body; + } + + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", await response.getBodyAsAny(), response.headers); + } + + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to fetchColumnSecurityRules + * @throws ApiException if the response code was not in [200, 299] + */ + public async fetchColumnSecurityRules(response: ResponseContext): Promise > { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("200", response.httpStatusCode)) { + const body: Array = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "Array", "" + ) as Array; + return body; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Bad request - Table not found or invalid parameters", body, response.headers); + } + if (isCodeInRange("401", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Forbidden - User doesn\'t have permission to access security rules for this table", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Internal server error", body, response.headers); + } + + // Work around for missing responses in specification, e.g. for petstore.yaml + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body: Array = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "Array", "" + ) as Array; + return body; + } + + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", await response.getBodyAsAny(), response.headers); + } + + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to fetchConnectionDiffStatus + * @throws ApiException if the response code was not in [200, 299] + */ + public async fetchConnectionDiffStatus(response: ResponseContext): Promise { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("200", response.httpStatusCode)) { + const body: FetchConnectionDiffStatusResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "FetchConnectionDiffStatusResponse", "" + ) as FetchConnectionDiffStatusResponse; + return body; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Invalid request.", body, response.headers); + } + if (isCodeInRange("401", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Unexpected error", body, response.headers); + } + + // Work around for missing responses in specification, e.g. for petstore.yaml + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body: FetchConnectionDiffStatusResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "FetchConnectionDiffStatusResponse", "" + ) as FetchConnectionDiffStatusResponse; + return body; + } + + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", await response.getBodyAsAny(), response.headers); + } + + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to fetchLiveboardData + * @throws ApiException if the response code was not in [200, 299] + */ + public async fetchLiveboardData(response: ResponseContext): Promise { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("200", response.httpStatusCode)) { + const body: LiveboardDataResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "LiveboardDataResponse", "" + ) as LiveboardDataResponse; + return body; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Invalid request.", body, response.headers); + } + if (isCodeInRange("401", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Unexpected error", body, response.headers); + } + + // Work around for missing responses in specification, e.g. for petstore.yaml + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body: LiveboardDataResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "LiveboardDataResponse", "" + ) as LiveboardDataResponse; + return body; + } + + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", await response.getBodyAsAny(), response.headers); + } + + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to fetchLiveboardSqlQuery + * @throws ApiException if the response code was not in [200, 299] + */ + public async fetchLiveboardSqlQuery(response: ResponseContext): Promise { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("200", response.httpStatusCode)) { + const body: SqlQueryResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "SqlQueryResponse", "" + ) as SqlQueryResponse; + return body; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Invalid request.", body, response.headers); + } + if (isCodeInRange("401", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Unexpected error", body, response.headers); + } + + // Work around for missing responses in specification, e.g. for petstore.yaml + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body: SqlQueryResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "SqlQueryResponse", "" + ) as SqlQueryResponse; + return body; + } + + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", await response.getBodyAsAny(), response.headers); + } + + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to fetchLogs + * @throws ApiException if the response code was not in [200, 299] + */ + public async fetchLogs(response: ResponseContext): Promise > { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("200", response.httpStatusCode)) { + const body: Array = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "Array", "" + ) as Array; + return body; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Invalid request.", body, response.headers); + } + if (isCodeInRange("401", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Unexpected error", body, response.headers); + } + + // Work around for missing responses in specification, e.g. for petstore.yaml + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body: Array = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "Array", "" + ) as Array; + return body; + } + + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", await response.getBodyAsAny(), response.headers); + } + + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to fetchObjectPrivileges + * @throws ApiException if the response code was not in [200, 299] + */ + public async fetchObjectPrivileges(response: ResponseContext): Promise { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("200", response.httpStatusCode)) { + const body: ObjectPrivilegesOfMetadataResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ObjectPrivilegesOfMetadataResponse", "" + ) as ObjectPrivilegesOfMetadataResponse; + return body; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Invalid request.", body, response.headers); + } + if (isCodeInRange("401", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Unexpected error", body, response.headers); + } + + // Work around for missing responses in specification, e.g. for petstore.yaml + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body: ObjectPrivilegesOfMetadataResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ObjectPrivilegesOfMetadataResponse", "" + ) as ObjectPrivilegesOfMetadataResponse; + return body; + } + + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", await response.getBodyAsAny(), response.headers); + } + + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to fetchPermissionsOfPrincipals + * @throws ApiException if the response code was not in [200, 299] + */ + public async fetchPermissionsOfPrincipals(response: ResponseContext): Promise { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("200", response.httpStatusCode)) { + const body: PermissionOfPrincipalsResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "PermissionOfPrincipalsResponse", "" + ) as PermissionOfPrincipalsResponse; + return body; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Invalid request.", body, response.headers); + } + if (isCodeInRange("401", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Unexpected error", body, response.headers); + } + + // Work around for missing responses in specification, e.g. for petstore.yaml + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body: PermissionOfPrincipalsResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "PermissionOfPrincipalsResponse", "" + ) as PermissionOfPrincipalsResponse; + return body; + } + + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", await response.getBodyAsAny(), response.headers); + } + + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to fetchPermissionsOnMetadata + * @throws ApiException if the response code was not in [200, 299] + */ + public async fetchPermissionsOnMetadata(response: ResponseContext): Promise { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("200", response.httpStatusCode)) { + const body: PermissionOfMetadataResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "PermissionOfMetadataResponse", "" + ) as PermissionOfMetadataResponse; + return body; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Invalid request.", body, response.headers); + } + if (isCodeInRange("401", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Unexpected error", body, response.headers); + } + + // Work around for missing responses in specification, e.g. for petstore.yaml + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body: PermissionOfMetadataResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "PermissionOfMetadataResponse", "" + ) as PermissionOfMetadataResponse; + return body; + } + + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", await response.getBodyAsAny(), response.headers); + } + + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to forceLogoutUsers + * @throws ApiException if the response code was not in [200, 299] + */ + public async forceLogoutUsers(response: ResponseContext): Promise { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("204", response.httpStatusCode)) { + return; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Invalid request.", body, response.headers); + } + if (isCodeInRange("401", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Unexpected error", body, response.headers); + } + + // Work around for missing responses in specification, e.g. for petstore.yaml + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body: void = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "void", "" + ) as void; + return body; + } + + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", await response.getBodyAsAny(), response.headers); + } + + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to generateCSV + * @throws ApiException if the response code was not in [200, 299] + */ + public async generateCSV(response: ResponseContext): Promise { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("200", response.httpStatusCode)) { + const body: any = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "any", "" + ) as any; + return body; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Invalid request.", body, response.headers); + } + if (isCodeInRange("401", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Unexpected error", body, response.headers); + } + + // Work around for missing responses in specification, e.g. for petstore.yaml + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body: any = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "any", "" + ) as any; + return body; + } + + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", await response.getBodyAsAny(), response.headers); + } + + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to getCurrentUserInfo + * @throws ApiException if the response code was not in [200, 299] + */ + public async getCurrentUserInfo(response: ResponseContext): Promise { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("200", response.httpStatusCode)) { + const body: User = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "User", "" + ) as User; + return body; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Invalid request.", body, response.headers); + } + if (isCodeInRange("401", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Unexpected error", body, response.headers); + } + + // Work around for missing responses in specification, e.g. for petstore.yaml + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body: User = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "User", "" + ) as User; + return body; + } + + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", await response.getBodyAsAny(), response.headers); + } + + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to getCurrentUserToken + * @throws ApiException if the response code was not in [200, 299] + */ + public async getCurrentUserToken(response: ResponseContext): Promise { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("200", response.httpStatusCode)) { + const body: GetTokenResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "GetTokenResponse", "" + ) as GetTokenResponse; + return body; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Invalid request.", body, response.headers); + } + if (isCodeInRange("401", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Unexpected error", body, response.headers); + } + + // Work around for missing responses in specification, e.g. for petstore.yaml + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body: GetTokenResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "GetTokenResponse", "" + ) as GetTokenResponse; + return body; + } + + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", await response.getBodyAsAny(), response.headers); + } + + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to getCustomAccessToken + * @throws ApiException if the response code was not in [200, 299] + */ + public async getCustomAccessToken(response: ResponseContext): Promise { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("200", response.httpStatusCode)) { + const body: AccessToken = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "AccessToken", "" + ) as AccessToken; + return body; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Invalid request. This could be due to missing or incorrect parameters.", body, response.headers); + } + if (isCodeInRange("401", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Unauthorized access. The request could not be authenticated.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Forbidden access. The user does not have permission to access this resource.", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "An unexpected error occurred on the server.", body, response.headers); + } + + // Work around for missing responses in specification, e.g. for petstore.yaml + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body: AccessToken = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "AccessToken", "" + ) as AccessToken; + return body; + } + + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", await response.getBodyAsAny(), response.headers); + } + + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to getDataSourceSuggestions + * @throws ApiException if the response code was not in [200, 299] + */ + public async getDataSourceSuggestions(response: ResponseContext): Promise { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("200", response.httpStatusCode)) { + const body: EurekaDataSourceSuggestionResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "EurekaDataSourceSuggestionResponse", "" + ) as EurekaDataSourceSuggestionResponse; + return body; + } + if (isCodeInRange("201", response.httpStatusCode)) { + const body: EurekaDataSourceSuggestionResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "EurekaDataSourceSuggestionResponse", "" + ) as EurekaDataSourceSuggestionResponse; + return body; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Operation failed", body, response.headers); + } + if (isCodeInRange("401", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Operation failed", body, response.headers); + } + + // Work around for missing responses in specification, e.g. for petstore.yaml + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body: EurekaDataSourceSuggestionResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "EurekaDataSourceSuggestionResponse", "" + ) as EurekaDataSourceSuggestionResponse; + return body; + } + + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", await response.getBodyAsAny(), response.headers); + } + + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to getFullAccessToken + * @throws ApiException if the response code was not in [200, 299] + */ + public async getFullAccessToken(response: ResponseContext): Promise { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("200", response.httpStatusCode)) { + const body: Token = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "Token", "" + ) as Token; + return body; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Invalid request.", body, response.headers); + } + if (isCodeInRange("401", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Unexpected error", body, response.headers); + } + + // Work around for missing responses in specification, e.g. for petstore.yaml + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body: Token = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "Token", "" + ) as Token; + return body; + } + + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", await response.getBodyAsAny(), response.headers); + } + + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to getNLInstructions + * @throws ApiException if the response code was not in [200, 299] + */ + public async getNLInstructions(response: ResponseContext): Promise { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("200", response.httpStatusCode)) { + const body: EurekaGetNLInstructionsResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "EurekaGetNLInstructionsResponse", "" + ) as EurekaGetNLInstructionsResponse; + return body; + } + if (isCodeInRange("201", response.httpStatusCode)) { + const body: EurekaGetNLInstructionsResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "EurekaGetNLInstructionsResponse", "" + ) as EurekaGetNLInstructionsResponse; + return body; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Operation failed", body, response.headers); + } + if (isCodeInRange("401", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Operation failed", body, response.headers); + } + + // Work around for missing responses in specification, e.g. for petstore.yaml + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body: EurekaGetNLInstructionsResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "EurekaGetNLInstructionsResponse", "" + ) as EurekaGetNLInstructionsResponse; + return body; + } + + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", await response.getBodyAsAny(), response.headers); + } + + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to getObjectAccessToken + * @throws ApiException if the response code was not in [200, 299] + */ + public async getObjectAccessToken(response: ResponseContext): Promise { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("200", response.httpStatusCode)) { + const body: Token = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "Token", "" + ) as Token; + return body; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Invalid request.", body, response.headers); + } + if (isCodeInRange("401", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Unexpected error", body, response.headers); + } + + // Work around for missing responses in specification, e.g. for petstore.yaml + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body: Token = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "Token", "" + ) as Token; + return body; + } + + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", await response.getBodyAsAny(), response.headers); + } + + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to getRelevantQuestions + * @throws ApiException if the response code was not in [200, 299] + */ + public async getRelevantQuestions(response: ResponseContext): Promise { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("200", response.httpStatusCode)) { + const body: EurekaGetRelevantQuestionsResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "EurekaGetRelevantQuestionsResponse", "" + ) as EurekaGetRelevantQuestionsResponse; + return body; + } + if (isCodeInRange("201", response.httpStatusCode)) { + const body: EurekaGetRelevantQuestionsResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "EurekaGetRelevantQuestionsResponse", "" + ) as EurekaGetRelevantQuestionsResponse; + return body; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Operation failed", body, response.headers); + } + if (isCodeInRange("401", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Operation failed", body, response.headers); + } + + // Work around for missing responses in specification, e.g. for petstore.yaml + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body: EurekaGetRelevantQuestionsResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "EurekaGetRelevantQuestionsResponse", "" + ) as EurekaGetRelevantQuestionsResponse; + return body; + } + + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", await response.getBodyAsAny(), response.headers); + } + + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to getSystemConfig + * @throws ApiException if the response code was not in [200, 299] + */ + public async getSystemConfig(response: ResponseContext): Promise { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("200", response.httpStatusCode)) { + const body: SystemConfig = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "SystemConfig", "" + ) as SystemConfig; + return body; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Invalid request.", body, response.headers); + } + if (isCodeInRange("401", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Unexpected error", body, response.headers); + } + + // Work around for missing responses in specification, e.g. for petstore.yaml + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body: SystemConfig = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "SystemConfig", "" + ) as SystemConfig; + return body; + } + + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", await response.getBodyAsAny(), response.headers); + } + + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to getSystemInformation + * @throws ApiException if the response code was not in [200, 299] + */ + public async getSystemInformation(response: ResponseContext): Promise { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("200", response.httpStatusCode)) { + const body: SystemInfo = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "SystemInfo", "" + ) as SystemInfo; + return body; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Invalid request.", body, response.headers); + } + if (isCodeInRange("401", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Unexpected error", body, response.headers); + } + + // Work around for missing responses in specification, e.g. for petstore.yaml + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body: SystemInfo = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "SystemInfo", "" + ) as SystemInfo; + return body; + } + + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", await response.getBodyAsAny(), response.headers); + } + + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to getSystemOverrideInfo + * @throws ApiException if the response code was not in [200, 299] + */ + public async getSystemOverrideInfo(response: ResponseContext): Promise { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("200", response.httpStatusCode)) { + const body: SystemOverrideInfo = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "SystemOverrideInfo", "" + ) as SystemOverrideInfo; + return body; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Invalid request.", body, response.headers); + } + if (isCodeInRange("401", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Unexpected error", body, response.headers); + } + + // Work around for missing responses in specification, e.g. for petstore.yaml + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body: SystemOverrideInfo = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "SystemOverrideInfo", "" + ) as SystemOverrideInfo; + return body; + } + + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", await response.getBodyAsAny(), response.headers); + } + + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to importMetadataTML + * @throws ApiException if the response code was not in [200, 299] + */ + public async importMetadataTML(response: ResponseContext): Promise > { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("200", response.httpStatusCode)) { + const body: Array = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "Array", "" + ) as Array; + return body; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Invalid request.", body, response.headers); + } + if (isCodeInRange("401", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Unexpected error", body, response.headers); + } + + // Work around for missing responses in specification, e.g. for petstore.yaml + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body: Array = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "Array", "" + ) as Array; + return body; + } + + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", await response.getBodyAsAny(), response.headers); + } + + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to importMetadataTMLAsync + * @throws ApiException if the response code was not in [200, 299] + */ + public async importMetadataTMLAsync(response: ResponseContext): Promise { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("200", response.httpStatusCode)) { + const body: ImportEPackAsyncTaskStatus = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ImportEPackAsyncTaskStatus", "" + ) as ImportEPackAsyncTaskStatus; + return body; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Invalid request.", body, response.headers); + } + if (isCodeInRange("401", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Unexpected error", body, response.headers); + } + + // Work around for missing responses in specification, e.g. for petstore.yaml + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body: ImportEPackAsyncTaskStatus = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ImportEPackAsyncTaskStatus", "" + ) as ImportEPackAsyncTaskStatus; + return body; + } + + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", await response.getBodyAsAny(), response.headers); + } + + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to importUserGroups + * @throws ApiException if the response code was not in [200, 299] + */ + public async importUserGroups(response: ResponseContext): Promise { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("200", response.httpStatusCode)) { + const body: ImportUserGroupsResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ImportUserGroupsResponse", "" + ) as ImportUserGroupsResponse; + return body; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Invalid request.", body, response.headers); + } + if (isCodeInRange("401", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Unexpected error", body, response.headers); + } + + // Work around for missing responses in specification, e.g. for petstore.yaml + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body: ImportUserGroupsResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ImportUserGroupsResponse", "" + ) as ImportUserGroupsResponse; + return body; + } + + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", await response.getBodyAsAny(), response.headers); + } + + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to importUsers + * @throws ApiException if the response code was not in [200, 299] + */ + public async importUsers(response: ResponseContext): Promise { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("200", response.httpStatusCode)) { + const body: ImportUsersResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ImportUsersResponse", "" + ) as ImportUsersResponse; + return body; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Invalid request.", body, response.headers); + } + if (isCodeInRange("401", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Unexpected error", body, response.headers); + } + + // Work around for missing responses in specification, e.g. for petstore.yaml + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body: ImportUsersResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ImportUsersResponse", "" + ) as ImportUsersResponse; + return body; + } + + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", await response.getBodyAsAny(), response.headers); + } + + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to login + * @throws ApiException if the response code was not in [200, 299] + */ + public async login(response: ResponseContext): Promise { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("204", response.httpStatusCode)) { + return; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Invalid request.", body, response.headers); + } + if (isCodeInRange("401", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Unexpected error", body, response.headers); + } + + // Work around for missing responses in specification, e.g. for petstore.yaml + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body: void = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "void", "" + ) as void; + return body; + } + + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", await response.getBodyAsAny(), response.headers); + } + + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to logout + * @throws ApiException if the response code was not in [200, 299] + */ + public async logout(response: ResponseContext): Promise { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("204", response.httpStatusCode)) { + return; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Invalid request.", body, response.headers); + } + if (isCodeInRange("401", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Unexpected error", body, response.headers); + } + + // Work around for missing responses in specification, e.g. for petstore.yaml + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body: void = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "void", "" + ) as void; + return body; + } + + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", await response.getBodyAsAny(), response.headers); + } + + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to manageObjectPrivilege + * @throws ApiException if the response code was not in [200, 299] + */ + public async manageObjectPrivilege(response: ResponseContext): Promise { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("204", response.httpStatusCode)) { + return; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Invalid request", body, response.headers); + } + if (isCodeInRange("401", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Unauthorized access", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Forbidden access", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Unexpected error", body, response.headers); + } + + // Work around for missing responses in specification, e.g. for petstore.yaml + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body: void = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "void", "" + ) as void; + return body; + } + + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", await response.getBodyAsAny(), response.headers); + } + + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to parameterizeMetadata + * @throws ApiException if the response code was not in [200, 299] + */ + public async parameterizeMetadata(response: ResponseContext): Promise { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("204", response.httpStatusCode)) { + return; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Invalid request.", body, response.headers); + } + if (isCodeInRange("401", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Unexpected error", body, response.headers); + } + + // Work around for missing responses in specification, e.g. for petstore.yaml + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body: void = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "void", "" + ) as void; + return body; + } + + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", await response.getBodyAsAny(), response.headers); + } + + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to parameterizeMetadataFields + * @throws ApiException if the response code was not in [200, 299] + */ + public async parameterizeMetadataFields(response: ResponseContext): Promise { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("204", response.httpStatusCode)) { + return; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Invalid request.", body, response.headers); + } + if (isCodeInRange("401", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Unexpected error", body, response.headers); + } + + // Work around for missing responses in specification, e.g. for petstore.yaml + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body: void = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "void", "" + ) as void; + return body; + } + + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", await response.getBodyAsAny(), response.headers); + } + + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to publishMetadata + * @throws ApiException if the response code was not in [200, 299] + */ + public async publishMetadata(response: ResponseContext): Promise { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("204", response.httpStatusCode)) { + return; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Invalid request.", body, response.headers); + } + if (isCodeInRange("401", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Unexpected error", body, response.headers); + } + + // Work around for missing responses in specification, e.g. for petstore.yaml + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body: void = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "void", "" + ) as void; + return body; + } + + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", await response.getBodyAsAny(), response.headers); + } + + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to putVariableValues + * @throws ApiException if the response code was not in [200, 299] + */ + public async putVariableValues(response: ResponseContext): Promise { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("204", response.httpStatusCode)) { + return; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Invalid request.", body, response.headers); + } + if (isCodeInRange("401", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Unexpected error", body, response.headers); + } + + // Work around for missing responses in specification, e.g. for petstore.yaml + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body: void = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "void", "" + ) as void; + return body; + } + + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", await response.getBodyAsAny(), response.headers); + } + + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to queryGetDecomposedQuery + * @throws ApiException if the response code was not in [200, 299] + */ + public async queryGetDecomposedQuery(response: ResponseContext): Promise { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("200", response.httpStatusCode)) { + const body: EurekaDecomposeQueryResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "EurekaDecomposeQueryResponse", "" + ) as EurekaDecomposeQueryResponse; + return body; + } + if (isCodeInRange("201", response.httpStatusCode)) { + const body: EurekaDecomposeQueryResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "EurekaDecomposeQueryResponse", "" + ) as EurekaDecomposeQueryResponse; + return body; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Operation failed", body, response.headers); + } + if (isCodeInRange("401", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Operation failed", body, response.headers); + } + + // Work around for missing responses in specification, e.g. for petstore.yaml + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body: EurekaDecomposeQueryResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "EurekaDecomposeQueryResponse", "" + ) as EurekaDecomposeQueryResponse; + return body; + } + + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", await response.getBodyAsAny(), response.headers); + } + + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to resetUserPassword + * @throws ApiException if the response code was not in [200, 299] + */ + public async resetUserPassword(response: ResponseContext): Promise { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("204", response.httpStatusCode)) { + return; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Invalid request.", body, response.headers); + } + if (isCodeInRange("401", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Unexpected error", body, response.headers); + } + + // Work around for missing responses in specification, e.g. for petstore.yaml + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body: void = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "void", "" + ) as void; + return body; + } + + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", await response.getBodyAsAny(), response.headers); + } + + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to revertCommit + * @throws ApiException if the response code was not in [200, 299] + */ + public async revertCommit(response: ResponseContext): Promise { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("200", response.httpStatusCode)) { + const body: RevertResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "RevertResponse", "" + ) as RevertResponse; + return body; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Invalid request.", body, response.headers); + } + if (isCodeInRange("401", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Unexpected error", body, response.headers); + } + + // Work around for missing responses in specification, e.g. for petstore.yaml + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body: RevertResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "RevertResponse", "" + ) as RevertResponse; + return body; + } + + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", await response.getBodyAsAny(), response.headers); + } + + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to revokeRefreshTokens + * @throws ApiException if the response code was not in [200, 299] + */ + public async revokeRefreshTokens(response: ResponseContext): Promise { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("200", response.httpStatusCode)) { + const body: RevokeRefreshTokensResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "RevokeRefreshTokensResponse", "" + ) as RevokeRefreshTokensResponse; + return body; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Invalid request.", body, response.headers); + } + if (isCodeInRange("401", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } + if (isCodeInRange("404", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Object not found", body, response.headers); + } + if (isCodeInRange("409", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Conflict", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Unexpected error", body, response.headers); + } + + // Work around for missing responses in specification, e.g. for petstore.yaml + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body: RevokeRefreshTokensResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "RevokeRefreshTokensResponse", "" + ) as RevokeRefreshTokensResponse; + return body; + } + + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", await response.getBodyAsAny(), response.headers); + } + + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to revokeToken + * @throws ApiException if the response code was not in [200, 299] + */ + public async revokeToken(response: ResponseContext): Promise { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("204", response.httpStatusCode)) { + return; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Invalid request.", body, response.headers); + } + if (isCodeInRange("401", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Unexpected error", body, response.headers); + } + + // Work around for missing responses in specification, e.g. for petstore.yaml + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body: void = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "void", "" + ) as void; + return body; + } + + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", await response.getBodyAsAny(), response.headers); + } + + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to searchAuthSettings + * @throws ApiException if the response code was not in [200, 299] + */ + public async searchAuthSettings(response: ResponseContext): Promise { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("200", response.httpStatusCode)) { + const body: SearchAuthSettingsResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "SearchAuthSettingsResponse", "" + ) as SearchAuthSettingsResponse; + return body; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Invalid request.", body, response.headers); + } + if (isCodeInRange("401", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Unexpected error", body, response.headers); + } + + // Work around for missing responses in specification, e.g. for petstore.yaml + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body: SearchAuthSettingsResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "SearchAuthSettingsResponse", "" + ) as SearchAuthSettingsResponse; + return body; + } + + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", await response.getBodyAsAny(), response.headers); + } + + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to searchCalendars + * @throws ApiException if the response code was not in [200, 299] + */ + public async searchCalendars(response: ResponseContext): Promise > { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("200", response.httpStatusCode)) { + const body: Array = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "Array", "" + ) as Array; + return body; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Invalid request.", body, response.headers); + } + if (isCodeInRange("401", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Unexpected error", body, response.headers); + } + + // Work around for missing responses in specification, e.g. for petstore.yaml + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body: Array = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "Array", "" + ) as Array; + return body; + } + + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", await response.getBodyAsAny(), response.headers); + } + + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to searchChannelHistory + * @throws ApiException if the response code was not in [200, 299] + */ + public async searchChannelHistory(response: ResponseContext): Promise { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("200", response.httpStatusCode)) { + const body: SearchChannelHistoryResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "SearchChannelHistoryResponse", "" + ) as SearchChannelHistoryResponse; + return body; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Invalid request.", body, response.headers); + } + if (isCodeInRange("401", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Unexpected error", body, response.headers); + } + + // Work around for missing responses in specification, e.g. for petstore.yaml + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body: SearchChannelHistoryResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "SearchChannelHistoryResponse", "" + ) as SearchChannelHistoryResponse; + return body; + } + + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", await response.getBodyAsAny(), response.headers); + } + + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to searchCollections + * @throws ApiException if the response code was not in [200, 299] + */ + public async searchCollections(response: ResponseContext): Promise { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("200", response.httpStatusCode)) { + const body: CollectionSearchResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "CollectionSearchResponse", "" + ) as CollectionSearchResponse; + return body; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Invalid request.", body, response.headers); + } + if (isCodeInRange("401", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Unexpected error", body, response.headers); + } + + // Work around for missing responses in specification, e.g. for petstore.yaml + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body: CollectionSearchResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "CollectionSearchResponse", "" + ) as CollectionSearchResponse; + return body; + } + + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", await response.getBodyAsAny(), response.headers); + } + + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to searchCommits + * @throws ApiException if the response code was not in [200, 299] + */ + public async searchCommits(response: ResponseContext): Promise > { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("200", response.httpStatusCode)) { + const body: Array = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "Array", "" + ) as Array; + return body; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Invalid request.", body, response.headers); + } + if (isCodeInRange("401", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Unexpected error", body, response.headers); + } + + // Work around for missing responses in specification, e.g. for petstore.yaml + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body: Array = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "Array", "" + ) as Array; + return body; + } + + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", await response.getBodyAsAny(), response.headers); + } + + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to searchCommunicationChannelPreferences + * @throws ApiException if the response code was not in [200, 299] + */ + public async searchCommunicationChannelPreferences(response: ResponseContext): Promise { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("200", response.httpStatusCode)) { + const body: CommunicationChannelPreferencesResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "CommunicationChannelPreferencesResponse", "" + ) as CommunicationChannelPreferencesResponse; + return body; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Invalid request.", body, response.headers); + } + if (isCodeInRange("401", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Unexpected error", body, response.headers); + } + + // Work around for missing responses in specification, e.g. for petstore.yaml + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body: CommunicationChannelPreferencesResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "CommunicationChannelPreferencesResponse", "" + ) as CommunicationChannelPreferencesResponse; + return body; + } + + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", await response.getBodyAsAny(), response.headers); + } + + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to searchConfig + * @throws ApiException if the response code was not in [200, 299] + */ + public async searchConfig(response: ResponseContext): Promise > { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("200", response.httpStatusCode)) { + const body: Array = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "Array", "" + ) as Array; + return body; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Invalid request.", body, response.headers); + } + if (isCodeInRange("401", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Unexpected error", body, response.headers); + } + + // Work around for missing responses in specification, e.g. for petstore.yaml + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body: Array = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "Array", "" + ) as Array; + return body; + } + + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", await response.getBodyAsAny(), response.headers); + } + + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to searchConnection + * @throws ApiException if the response code was not in [200, 299] + */ + public async searchConnection(response: ResponseContext): Promise > { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("200", response.httpStatusCode)) { + const body: Array = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "Array", "" + ) as Array; + return body; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Invalid request.", body, response.headers); + } + if (isCodeInRange("401", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Unexpected error", body, response.headers); + } + + // Work around for missing responses in specification, e.g. for petstore.yaml + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body: Array = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "Array", "" + ) as Array; + return body; + } + + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", await response.getBodyAsAny(), response.headers); + } + + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to searchCustomActions + * @throws ApiException if the response code was not in [200, 299] + */ + public async searchCustomActions(response: ResponseContext): Promise > { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("200", response.httpStatusCode)) { + const body: Array = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "Array", "" + ) as Array; + return body; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Invalid request.", body, response.headers); + } + if (isCodeInRange("401", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Unexpected error", body, response.headers); + } + + // Work around for missing responses in specification, e.g. for petstore.yaml + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body: Array = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "Array", "" + ) as Array; + return body; + } + + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", await response.getBodyAsAny(), response.headers); + } + + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to searchData + * @throws ApiException if the response code was not in [200, 299] + */ + public async searchData(response: ResponseContext): Promise { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("200", response.httpStatusCode)) { + const body: SearchDataResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "SearchDataResponse", "" + ) as SearchDataResponse; + return body; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Invalid request.", body, response.headers); + } + if (isCodeInRange("401", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Unexpected error", body, response.headers); + } + + // Work around for missing responses in specification, e.g. for petstore.yaml + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body: SearchDataResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "SearchDataResponse", "" + ) as SearchDataResponse; + return body; + } + + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", await response.getBodyAsAny(), response.headers); + } + + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to searchEmailCustomization + * @throws ApiException if the response code was not in [200, 299] + */ + public async searchEmailCustomization(response: ResponseContext): Promise > { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("200", response.httpStatusCode)) { + const body: Array = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "Array", "" + ) as Array; + return body; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Invalid request.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Unexpected error", body, response.headers); + } + + // Work around for missing responses in specification, e.g. for petstore.yaml + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body: Array = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "Array", "" + ) as Array; + return body; + } + + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", await response.getBodyAsAny(), response.headers); + } + + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to searchMetadata + * @throws ApiException if the response code was not in [200, 299] + */ + public async searchMetadata(response: ResponseContext): Promise > { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("200", response.httpStatusCode)) { + const body: Array = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "Array", "" + ) as Array; + return body; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Invalid request.", body, response.headers); + } + if (isCodeInRange("401", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Unexpected error", body, response.headers); + } + + // Work around for missing responses in specification, e.g. for petstore.yaml + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body: Array = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "Array", "" + ) as Array; + return body; + } + + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", await response.getBodyAsAny(), response.headers); + } + + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to searchOrgs + * @throws ApiException if the response code was not in [200, 299] + */ + public async searchOrgs(response: ResponseContext): Promise > { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("200", response.httpStatusCode)) { + const body: Array = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "Array", "" + ) as Array; + return body; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Invalid request.", body, response.headers); + } + if (isCodeInRange("401", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Unexpected error", body, response.headers); + } + + // Work around for missing responses in specification, e.g. for petstore.yaml + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body: Array = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "Array", "" + ) as Array; + return body; + } + + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", await response.getBodyAsAny(), response.headers); + } + + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to searchRoles + * @throws ApiException if the response code was not in [200, 299] + */ + public async searchRoles(response: ResponseContext): Promise > { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("200", response.httpStatusCode)) { + const body: Array = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "Array", "" + ) as Array; + return body; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Invalid request.", body, response.headers); + } + if (isCodeInRange("401", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Internal error", body, response.headers); + } + + // Work around for missing responses in specification, e.g. for petstore.yaml + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body: Array = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "Array", "" + ) as Array; + return body; + } + + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", await response.getBodyAsAny(), response.headers); + } + + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to searchSchedules + * @throws ApiException if the response code was not in [200, 299] + */ + public async searchSchedules(response: ResponseContext): Promise > { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("200", response.httpStatusCode)) { + const body: Array = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "Array", "" + ) as Array; + return body; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Invalid request.", body, response.headers); + } + if (isCodeInRange("401", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Unexpected error", body, response.headers); + } + + // Work around for missing responses in specification, e.g. for petstore.yaml + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body: Array = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "Array", "" + ) as Array; + return body; + } + + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", await response.getBodyAsAny(), response.headers); + } + + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to searchSecuritySettings + * @throws ApiException if the response code was not in [200, 299] + */ + public async searchSecuritySettings(response: ResponseContext): Promise { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("200", response.httpStatusCode)) { + const body: SecuritySettingsResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "SecuritySettingsResponse", "" + ) as SecuritySettingsResponse; + return body; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Invalid request.", body, response.headers); + } + if (isCodeInRange("401", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Unexpected error", body, response.headers); + } + + // Work around for missing responses in specification, e.g. for petstore.yaml + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body: SecuritySettingsResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "SecuritySettingsResponse", "" + ) as SecuritySettingsResponse; + return body; + } + + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", await response.getBodyAsAny(), response.headers); + } + + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to searchTags + * @throws ApiException if the response code was not in [200, 299] + */ + public async searchTags(response: ResponseContext): Promise > { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("200", response.httpStatusCode)) { + const body: Array = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "Array", "" + ) as Array; + return body; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Invalid request.", body, response.headers); + } + if (isCodeInRange("401", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Unexpected error", body, response.headers); + } + + // Work around for missing responses in specification, e.g. for petstore.yaml + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body: Array = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "Array", "" + ) as Array; + return body; + } + + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", await response.getBodyAsAny(), response.headers); + } + + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to searchUserGroups + * @throws ApiException if the response code was not in [200, 299] + */ + public async searchUserGroups(response: ResponseContext): Promise > { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("200", response.httpStatusCode)) { + const body: Array = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "Array", "" + ) as Array; + return body; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Invalid request.", body, response.headers); + } + if (isCodeInRange("401", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Unexpected error", body, response.headers); + } + + // Work around for missing responses in specification, e.g. for petstore.yaml + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body: Array = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "Array", "" + ) as Array; + return body; + } + + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", await response.getBodyAsAny(), response.headers); + } + + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to searchUsers + * @throws ApiException if the response code was not in [200, 299] + */ + public async searchUsers(response: ResponseContext): Promise > { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("200", response.httpStatusCode)) { + const body: Array = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "Array", "" + ) as Array; + return body; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Invalid request.", body, response.headers); + } + if (isCodeInRange("401", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Unexpected error", body, response.headers); + } + + // Work around for missing responses in specification, e.g. for petstore.yaml + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body: Array = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "Array", "" + ) as Array; + return body; + } + + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", await response.getBodyAsAny(), response.headers); + } + + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to searchVariables + * @throws ApiException if the response code was not in [200, 299] + */ + public async searchVariables(response: ResponseContext): Promise > { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("200", response.httpStatusCode)) { + const body: Array = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "Array", "" + ) as Array; + return body; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Invalid request.", body, response.headers); + } + if (isCodeInRange("401", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Unexpected error", body, response.headers); + } + + // Work around for missing responses in specification, e.g. for petstore.yaml + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body: Array = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "Array", "" + ) as Array; + return body; + } + + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", await response.getBodyAsAny(), response.headers); + } + + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to searchWebhookConfigurations + * @throws ApiException if the response code was not in [200, 299] + */ + public async searchWebhookConfigurations(response: ResponseContext): Promise { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("200", response.httpStatusCode)) { + const body: WebhookSearchResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "WebhookSearchResponse", "" + ) as WebhookSearchResponse; + return body; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Invalid request.", body, response.headers); + } + if (isCodeInRange("401", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Unexpected error", body, response.headers); + } + + // Work around for missing responses in specification, e.g. for petstore.yaml + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body: WebhookSearchResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "WebhookSearchResponse", "" + ) as WebhookSearchResponse; + return body; + } + + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", await response.getBodyAsAny(), response.headers); + } + + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to sendAgentConversationMessage + * @throws ApiException if the response code was not in [200, 299] + */ + public async sendAgentConversationMessage(response: ResponseContext): Promise { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("200", response.httpStatusCode)) { + const body: any = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "any", "" + ) as any; + return body; + } + if (isCodeInRange("201", response.httpStatusCode)) { + const body: any = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "any", "" + ) as any; + return body; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Operation failed", body, response.headers); + } + if (isCodeInRange("401", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Operation failed", body, response.headers); + } + + // Work around for missing responses in specification, e.g. for petstore.yaml + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body: any = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "any", "" + ) as any; + return body; + } + + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", await response.getBodyAsAny(), response.headers); + } + + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to sendAgentConversationMessageStreaming + * @throws ApiException if the response code was not in [200, 299] + */ + public async sendAgentConversationMessageStreaming(response: ResponseContext): Promise { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("200", response.httpStatusCode)) { + const body: SendAgentMessageResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "SendAgentMessageResponse", "" + ) as SendAgentMessageResponse; + return body; + } + if (isCodeInRange("201", response.httpStatusCode)) { + const body: SendAgentMessageResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "SendAgentMessageResponse", "" + ) as SendAgentMessageResponse; + return body; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Operation failed", body, response.headers); + } + if (isCodeInRange("401", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Operation failed", body, response.headers); + } + + // Work around for missing responses in specification, e.g. for petstore.yaml + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body: SendAgentMessageResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "SendAgentMessageResponse", "" + ) as SendAgentMessageResponse; + return body; + } + + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", await response.getBodyAsAny(), response.headers); + } + + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to sendAgentMessage + * @throws ApiException if the response code was not in [200, 299] + */ + public async sendAgentMessage(response: ResponseContext): Promise { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("200", response.httpStatusCode)) { + const body: any = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "any", "" + ) as any; + return body; + } + if (isCodeInRange("201", response.httpStatusCode)) { + const body: any = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "any", "" + ) as any; + return body; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Operation failed", body, response.headers); + } + if (isCodeInRange("401", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Operation failed", body, response.headers); + } + + // Work around for missing responses in specification, e.g. for petstore.yaml + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body: any = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "any", "" + ) as any; + return body; + } + + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", await response.getBodyAsAny(), response.headers); + } + + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to sendAgentMessageStreaming + * @throws ApiException if the response code was not in [200, 299] + */ + public async sendAgentMessageStreaming(response: ResponseContext): Promise { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("200", response.httpStatusCode)) { + const body: SendAgentMessageResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "SendAgentMessageResponse", "" + ) as SendAgentMessageResponse; + return body; + } + if (isCodeInRange("201", response.httpStatusCode)) { + const body: SendAgentMessageResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "SendAgentMessageResponse", "" + ) as SendAgentMessageResponse; + return body; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Operation failed", body, response.headers); + } + if (isCodeInRange("401", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Operation failed", body, response.headers); + } + + // Work around for missing responses in specification, e.g. for petstore.yaml + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body: SendAgentMessageResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "SendAgentMessageResponse", "" + ) as SendAgentMessageResponse; + return body; + } + + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", await response.getBodyAsAny(), response.headers); + } + + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to sendMessage + * @throws ApiException if the response code was not in [200, 299] + */ + public async sendMessage(response: ResponseContext): Promise > { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("200", response.httpStatusCode)) { + const body: Array = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "Array", "" + ) as Array; + return body; + } + if (isCodeInRange("201", response.httpStatusCode)) { + const body: Array = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "Array", "" + ) as Array; + return body; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Operation failed", body, response.headers); + } + if (isCodeInRange("401", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Operation failed", body, response.headers); + } + + // Work around for missing responses in specification, e.g. for petstore.yaml + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body: Array = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "Array", "" + ) as Array; + return body; + } + + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", await response.getBodyAsAny(), response.headers); + } + + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to setNLInstructions + * @throws ApiException if the response code was not in [200, 299] + */ + public async setNLInstructions(response: ResponseContext): Promise { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("200", response.httpStatusCode)) { + const body: EurekaSetNLInstructionsResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "EurekaSetNLInstructionsResponse", "" + ) as EurekaSetNLInstructionsResponse; + return body; + } + if (isCodeInRange("201", response.httpStatusCode)) { + const body: EurekaSetNLInstructionsResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "EurekaSetNLInstructionsResponse", "" + ) as EurekaSetNLInstructionsResponse; + return body; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Operation failed", body, response.headers); + } + if (isCodeInRange("401", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Operation failed", body, response.headers); + } + + // Work around for missing responses in specification, e.g. for petstore.yaml + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body: EurekaSetNLInstructionsResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "EurekaSetNLInstructionsResponse", "" + ) as EurekaSetNLInstructionsResponse; + return body; + } + + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", await response.getBodyAsAny(), response.headers); + } + + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to shareMetadata + * @throws ApiException if the response code was not in [200, 299] + */ + public async shareMetadata(response: ResponseContext): Promise { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("204", response.httpStatusCode)) { + return; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Invalid request.", body, response.headers); + } + if (isCodeInRange("401", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Unexpected error", body, response.headers); + } + + // Work around for missing responses in specification, e.g. for petstore.yaml + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body: void = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "void", "" + ) as void; + return body; + } + + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", await response.getBodyAsAny(), response.headers); + } + + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to singleAnswer + * @throws ApiException if the response code was not in [200, 299] + */ + public async singleAnswer(response: ResponseContext): Promise { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("200", response.httpStatusCode)) { + const body: ResponseMessage = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ResponseMessage", "" + ) as ResponseMessage; + return body; + } + if (isCodeInRange("201", response.httpStatusCode)) { + const body: ResponseMessage = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ResponseMessage", "" + ) as ResponseMessage; + return body; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Operation failed", body, response.headers); + } + if (isCodeInRange("401", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Operation failed", body, response.headers); + } + + // Work around for missing responses in specification, e.g. for petstore.yaml + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body: ResponseMessage = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ResponseMessage", "" + ) as ResponseMessage; + return body; + } + + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", await response.getBodyAsAny(), response.headers); + } + + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to stopConversation + * @throws ApiException if the response code was not in [200, 299] + */ + public async stopConversation(response: ResponseContext): Promise { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("204", response.httpStatusCode)) { + return; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Operation failed", body, response.headers); + } + if (isCodeInRange("401", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Operation failed", body, response.headers); + } + + // Work around for missing responses in specification, e.g. for petstore.yaml + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body: void = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "void", "" + ) as void; + return body; + } + + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", await response.getBodyAsAny(), response.headers); + } + + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to syncMetadata + * @throws ApiException if the response code was not in [200, 299] + */ + public async syncMetadata(response: ResponseContext): Promise { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("200", response.httpStatusCode)) { + const body: SyncMetadataResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "SyncMetadataResponse", "" + ) as SyncMetadataResponse; + return body; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Invalid request parameters or hierarchy.", body, response.headers); + } + if (isCodeInRange("401", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } + if (isCodeInRange("404", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Connection, table, or column not found.", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Unexpected error", body, response.headers); + } + + // Work around for missing responses in specification, e.g. for petstore.yaml + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body: SyncMetadataResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "SyncMetadataResponse", "" + ) as SyncMetadataResponse; + return body; + } + + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", await response.getBodyAsAny(), response.headers); + } + + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to unassignTag + * @throws ApiException if the response code was not in [200, 299] + */ + public async unassignTag(response: ResponseContext): Promise { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("204", response.httpStatusCode)) { + return; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Invalid request.", body, response.headers); + } + if (isCodeInRange("401", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Unexpected error", body, response.headers); + } + + // Work around for missing responses in specification, e.g. for petstore.yaml + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body: void = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "void", "" + ) as void; + return body; + } + + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", await response.getBodyAsAny(), response.headers); + } + + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to unparameterizeMetadata + * @throws ApiException if the response code was not in [200, 299] + */ + public async unparameterizeMetadata(response: ResponseContext): Promise { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("204", response.httpStatusCode)) { + return; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Invalid request.", body, response.headers); + } + if (isCodeInRange("401", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Unexpected error", body, response.headers); + } + + // Work around for missing responses in specification, e.g. for petstore.yaml + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body: void = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "void", "" + ) as void; + return body; + } + + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", await response.getBodyAsAny(), response.headers); + } + + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to unpublishMetadata + * @throws ApiException if the response code was not in [200, 299] + */ + public async unpublishMetadata(response: ResponseContext): Promise { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("204", response.httpStatusCode)) { + return; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Invalid request.", body, response.headers); + } + if (isCodeInRange("401", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Unexpected error", body, response.headers); + } + + // Work around for missing responses in specification, e.g. for petstore.yaml + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body: void = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "void", "" + ) as void; + return body; + } + + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", await response.getBodyAsAny(), response.headers); + } + + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to updateCalendar + * @throws ApiException if the response code was not in [200, 299] + */ + public async updateCalendar(response: ResponseContext): Promise { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("204", response.httpStatusCode)) { + return; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Invalid request.", body, response.headers); + } + if (isCodeInRange("401", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Unexpected error", body, response.headers); + } + + // Work around for missing responses in specification, e.g. for petstore.yaml + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body: void = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "void", "" + ) as void; + return body; + } + + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", await response.getBodyAsAny(), response.headers); + } + + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to updateCollection + * @throws ApiException if the response code was not in [200, 299] + */ + public async updateCollection(response: ResponseContext): Promise { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("204", response.httpStatusCode)) { + return; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Invalid request.", body, response.headers); + } + if (isCodeInRange("401", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } + if (isCodeInRange("404", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Resource not found.", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Unexpected error", body, response.headers); + } + + // Work around for missing responses in specification, e.g. for petstore.yaml + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body: void = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "void", "" + ) as void; + return body; + } + + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", await response.getBodyAsAny(), response.headers); + } + + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to updateColumnSecurityRules + * @throws ApiException if the response code was not in [200, 299] + */ + public async updateColumnSecurityRules(response: ResponseContext): Promise { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("204", response.httpStatusCode)) { + return; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Bad request - Invalid parameters or table not found", body, response.headers); + } + if (isCodeInRange("401", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Forbidden - User doesn\'t have permission to modify security rules for this table", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Internal server error", body, response.headers); + } + + // Work around for missing responses in specification, e.g. for petstore.yaml + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body: void = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "void", "" + ) as void; + return body; + } + + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", await response.getBodyAsAny(), response.headers); + } + + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to updateConfig + * @throws ApiException if the response code was not in [200, 299] + */ + public async updateConfig(response: ResponseContext): Promise { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("200", response.httpStatusCode)) { + const body: RepoConfigObject = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "RepoConfigObject", "" + ) as RepoConfigObject; + return body; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Invalid request.", body, response.headers); + } + if (isCodeInRange("401", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Unexpected error", body, response.headers); + } + + // Work around for missing responses in specification, e.g. for petstore.yaml + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body: RepoConfigObject = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "RepoConfigObject", "" + ) as RepoConfigObject; + return body; + } + + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", await response.getBodyAsAny(), response.headers); + } + + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to updateConnection + * @throws ApiException if the response code was not in [200, 299] + */ + public async updateConnection(response: ResponseContext): Promise { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("204", response.httpStatusCode)) { + return; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Invalid request.", body, response.headers); + } + if (isCodeInRange("401", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Unexpected error", body, response.headers); + } + + // Work around for missing responses in specification, e.g. for petstore.yaml + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body: void = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "void", "" + ) as void; + return body; + } + + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", await response.getBodyAsAny(), response.headers); + } + + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to updateConnectionConfiguration + * @throws ApiException if the response code was not in [200, 299] + */ + public async updateConnectionConfiguration(response: ResponseContext): Promise { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("204", response.httpStatusCode)) { + return; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Invalid request.", body, response.headers); + } + if (isCodeInRange("401", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Unexpected error", body, response.headers); + } + + // Work around for missing responses in specification, e.g. for petstore.yaml + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body: void = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "void", "" + ) as void; + return body; + } + + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", await response.getBodyAsAny(), response.headers); + } + + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to updateConnectionStatus + * @throws ApiException if the response code was not in [200, 299] + */ + public async updateConnectionStatus(response: ResponseContext): Promise { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("204", response.httpStatusCode)) { + return; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Invalid request.", body, response.headers); + } + if (isCodeInRange("401", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } + if (isCodeInRange("404", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Object not found", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Unexpected error", body, response.headers); + } + + // Work around for missing responses in specification, e.g. for petstore.yaml + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body: void = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "void", "" + ) as void; + return body; + } + + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", await response.getBodyAsAny(), response.headers); + } + + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to updateConnectionV2 + * @throws ApiException if the response code was not in [200, 299] + */ + public async updateConnectionV2(response: ResponseContext): Promise { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("204", response.httpStatusCode)) { + return; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Invalid request.", body, response.headers); + } + if (isCodeInRange("401", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Unexpected error", body, response.headers); + } + + // Work around for missing responses in specification, e.g. for petstore.yaml + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body: void = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "void", "" + ) as void; + return body; + } + + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", await response.getBodyAsAny(), response.headers); + } + + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to updateCustomAction + * @throws ApiException if the response code was not in [200, 299] + */ + public async updateCustomAction(response: ResponseContext): Promise { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("204", response.httpStatusCode)) { + return; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Invalid request.", body, response.headers); + } + if (isCodeInRange("401", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Unexpected error", body, response.headers); + } + + // Work around for missing responses in specification, e.g. for petstore.yaml + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body: void = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "void", "" + ) as void; + return body; + } + + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", await response.getBodyAsAny(), response.headers); + } + + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to updateDbtConnection + * @throws ApiException if the response code was not in [200, 299] + */ + public async updateDbtConnection(response: ResponseContext): Promise { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("200", response.httpStatusCode)) { + const body: any = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "any", "" + ) as any; + return body; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Invalid request.", body, response.headers); + } + if (isCodeInRange("401", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Unexpected error", body, response.headers); + } + + // Work around for missing responses in specification, e.g. for petstore.yaml + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body: any = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "any", "" + ) as any; + return body; + } + + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", await response.getBodyAsAny(), response.headers); + } + + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to updateEmailCustomization + * @throws ApiException if the response code was not in [200, 299] + */ + public async updateEmailCustomization(response: ResponseContext): Promise { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("204", response.httpStatusCode)) { + return; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Invalid request.", body, response.headers); + } + if (isCodeInRange("401", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Unexpected error", body, response.headers); + } + + // Work around for missing responses in specification, e.g. for petstore.yaml + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body: void = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "void", "" + ) as void; + return body; + } + + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", await response.getBodyAsAny(), response.headers); + } + + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to updateMetadataHeader + * @throws ApiException if the response code was not in [200, 299] + */ + public async updateMetadataHeader(response: ResponseContext): Promise { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("204", response.httpStatusCode)) { + return; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Invalid request.", body, response.headers); + } + if (isCodeInRange("401", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Unexpected error", body, response.headers); + } + + // Work around for missing responses in specification, e.g. for petstore.yaml + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body: void = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "void", "" + ) as void; + return body; + } + + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", await response.getBodyAsAny(), response.headers); + } + + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to updateMetadataObjId + * @throws ApiException if the response code was not in [200, 299] + */ + public async updateMetadataObjId(response: ResponseContext): Promise { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("204", response.httpStatusCode)) { + return; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Invalid request.", body, response.headers); + } + if (isCodeInRange("401", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Unexpected error", body, response.headers); + } + + // Work around for missing responses in specification, e.g. for petstore.yaml + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body: void = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "void", "" + ) as void; + return body; + } + + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", await response.getBodyAsAny(), response.headers); + } + + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to updateOrg + * @throws ApiException if the response code was not in [200, 299] + */ + public async updateOrg(response: ResponseContext): Promise { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("204", response.httpStatusCode)) { + return; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Invalid request.", body, response.headers); + } + if (isCodeInRange("401", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Unexpected error", body, response.headers); + } + + // Work around for missing responses in specification, e.g. for petstore.yaml + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body: void = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "void", "" + ) as void; + return body; + } + + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", await response.getBodyAsAny(), response.headers); + } + + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to updateRole + * @throws ApiException if the response code was not in [200, 299] + */ + public async updateRole(response: ResponseContext): Promise { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("200", response.httpStatusCode)) { + const body: RoleResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "RoleResponse", "" + ) as RoleResponse; + return body; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Invalid request.", body, response.headers); + } + if (isCodeInRange("401", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Unexpected error", body, response.headers); + } + + // Work around for missing responses in specification, e.g. for petstore.yaml + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body: RoleResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "RoleResponse", "" + ) as RoleResponse; + return body; + } + + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", await response.getBodyAsAny(), response.headers); + } + + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to updateSchedule + * @throws ApiException if the response code was not in [200, 299] + */ + public async updateSchedule(response: ResponseContext): Promise { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("204", response.httpStatusCode)) { + return; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Invalid request.", body, response.headers); + } + if (isCodeInRange("401", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Unexpected error", body, response.headers); + } + + // Work around for missing responses in specification, e.g. for petstore.yaml + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body: void = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "void", "" + ) as void; + return body; + } + + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", await response.getBodyAsAny(), response.headers); + } + + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to updateSystemConfig + * @throws ApiException if the response code was not in [200, 299] + */ + public async updateSystemConfig(response: ResponseContext): Promise { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("204", response.httpStatusCode)) { + return; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Invalid request.", body, response.headers); + } + if (isCodeInRange("401", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Unexpected error", body, response.headers); + } + + // Work around for missing responses in specification, e.g. for petstore.yaml + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body: void = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "void", "" + ) as void; + return body; + } + + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", await response.getBodyAsAny(), response.headers); + } + + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to updateTag + * @throws ApiException if the response code was not in [200, 299] + */ + public async updateTag(response: ResponseContext): Promise { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("204", response.httpStatusCode)) { + return; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Invalid request.", body, response.headers); + } + if (isCodeInRange("401", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Unexpected error", body, response.headers); + } + + // Work around for missing responses in specification, e.g. for petstore.yaml + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body: void = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "void", "" + ) as void; + return body; + } + + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", await response.getBodyAsAny(), response.headers); + } + + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to updateUser + * @throws ApiException if the response code was not in [200, 299] + */ + public async updateUser(response: ResponseContext): Promise { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("204", response.httpStatusCode)) { + return; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Invalid request.", body, response.headers); + } + if (isCodeInRange("401", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Unexpected error", body, response.headers); + } + + // Work around for missing responses in specification, e.g. for petstore.yaml + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body: void = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "void", "" + ) as void; + return body; + } + + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", await response.getBodyAsAny(), response.headers); + } + + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to updateUserGroup + * @throws ApiException if the response code was not in [200, 299] + */ + public async updateUserGroup(response: ResponseContext): Promise { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("204", response.httpStatusCode)) { + return; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Invalid request.", body, response.headers); + } + if (isCodeInRange("401", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Unexpected error", body, response.headers); + } + + // Work around for missing responses in specification, e.g. for petstore.yaml + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body: void = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "void", "" + ) as void; + return body; + } + + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", await response.getBodyAsAny(), response.headers); + } + + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to updateVariable + * @throws ApiException if the response code was not in [200, 299] + */ + public async updateVariable(response: ResponseContext): Promise { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("204", response.httpStatusCode)) { + return; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Invalid request.", body, response.headers); + } + if (isCodeInRange("401", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Unexpected error", body, response.headers); + } + + // Work around for missing responses in specification, e.g. for petstore.yaml + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body: void = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "void", "" + ) as void; + return body; + } + + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", await response.getBodyAsAny(), response.headers); + } + + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to updateVariableValues + * @throws ApiException if the response code was not in [200, 299] + */ + public async updateVariableValues(response: ResponseContext): Promise { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("204", response.httpStatusCode)) { + return; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Invalid request.", body, response.headers); + } + if (isCodeInRange("401", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Unexpected error", body, response.headers); + } + + // Work around for missing responses in specification, e.g. for petstore.yaml + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body: void = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "void", "" + ) as void; + return body; + } + + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", await response.getBodyAsAny(), response.headers); + } + + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to updateWebhookConfiguration + * @throws ApiException if the response code was not in [200, 299] + */ + public async updateWebhookConfiguration(response: ResponseContext): Promise { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("204", response.httpStatusCode)) { + return; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Invalid request.", body, response.headers); + } + if (isCodeInRange("401", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Unexpected error", body, response.headers); + } + + // Work around for missing responses in specification, e.g. for petstore.yaml + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body: void = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "void", "" + ) as void; + return body; + } + + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", await response.getBodyAsAny(), response.headers); + } + + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to validateCommunicationChannel + * @throws ApiException if the response code was not in [200, 299] + */ + public async validateCommunicationChannel(response: ResponseContext): Promise { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("200", response.httpStatusCode)) { + const body: CommunicationChannelValidateResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "CommunicationChannelValidateResponse", "" + ) as CommunicationChannelValidateResponse; + return body; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Invalid request.", body, response.headers); + } + if (isCodeInRange("401", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Unexpected error", body, response.headers); + } + + // Work around for missing responses in specification, e.g. for petstore.yaml + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body: CommunicationChannelValidateResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "CommunicationChannelValidateResponse", "" + ) as CommunicationChannelValidateResponse; + return body; + } + + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", await response.getBodyAsAny(), response.headers); + } + + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to validateEmailCustomization + * @throws ApiException if the response code was not in [200, 299] + */ + public async validateEmailCustomization(response: ResponseContext): Promise { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("204", response.httpStatusCode)) { + return; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Invalid request.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Unexpected error", body, response.headers); + } + + // Work around for missing responses in specification, e.g. for petstore.yaml + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body: void = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "void", "" + ) as void; + return body; + } + + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", await response.getBodyAsAny(), response.headers); + } + + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to validateMerge + * @throws ApiException if the response code was not in [200, 299] + */ + public async validateMerge(response: ResponseContext): Promise > { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("200", response.httpStatusCode)) { + const body: Array = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "Array", "" + ) as Array; + return body; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Invalid request.", body, response.headers); + } + if (isCodeInRange("401", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Unexpected error", body, response.headers); + } + + // Work around for missing responses in specification, e.g. for petstore.yaml + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body: Array = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "Array", "" + ) as Array; + return body; + } + + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", await response.getBodyAsAny(), response.headers); + } + + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to validateToken + * @throws ApiException if the response code was not in [200, 299] + */ + public async validateToken(response: ResponseContext): Promise { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("200", response.httpStatusCode)) { + const body: TokenValidationResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "TokenValidationResponse", "" + ) as TokenValidationResponse; + return body; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Invalid request.", body, response.headers); + } + if (isCodeInRange("401", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Unexpected error", body, response.headers); + } + + // Work around for missing responses in specification, e.g. for petstore.yaml + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body: TokenValidationResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "TokenValidationResponse", "" + ) as TokenValidationResponse; + return body; + } + + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", await response.getBodyAsAny(), response.headers); + } + +} diff --git a/sdks/typescript/apis/UsersApi.ts b/sdks/typescript/apis/UsersApi.ts new file mode 100644 index 000000000..eb50d68fa --- /dev/null +++ b/sdks/typescript/apis/UsersApi.ts @@ -0,0 +1,1092 @@ +// TODO: better import syntax? +import {BaseAPIRequestFactory, RequiredError, COLLECTION_FORMATS} from './baseapi'; +import {Configuration} from '../configuration'; +import {RequestContext, HttpMethod, ResponseContext, HttpFile} from '../http/http'; +import {ObjectSerializer} from '../models/ObjectSerializer'; +import {ApiException} from './exception'; +import {canConsumeForm, isCodeInRange} from '../util'; +import {SecurityAuthentication} from '../auth/auth'; + + +import { ActivateUserRequest } from '../models/ActivateUserRequest'; +import { ChangeUserPasswordRequest } from '../models/ChangeUserPasswordRequest'; +import { CreateUserRequest } from '../models/CreateUserRequest'; +import { DeactivateUserRequest } from '../models/DeactivateUserRequest'; +import { ErrorResponse } from '../models/ErrorResponse'; +import { ForceLogoutUsersRequest } from '../models/ForceLogoutUsersRequest'; +import { ImportUsersRequest } from '../models/ImportUsersRequest'; +import { ImportUsersResponse } from '../models/ImportUsersResponse'; +import { ResetUserPasswordRequest } from '../models/ResetUserPasswordRequest'; +import { ResponseActivationURL } from '../models/ResponseActivationURL'; +import { SearchUsersRequest } from '../models/SearchUsersRequest'; +import { UpdateUserRequest } from '../models/UpdateUserRequest'; +import { User } from '../models/User'; + +/** + * no description + */ +export class UsersApiRequestFactory extends BaseAPIRequestFactory { + + /** + * Version: 9.7.0.cl or later Activates a deactivated user account. Requires `ADMINISTRATION` (**Can administer Thoughtspot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `USER_ADMINISTRATION` (**Can manage users**) privilege is required. To activate an inactive user account, the API request body must include the following information: - Username or the GUID of the user account. - Auth token generated for the deactivated user. The auth token is sent in the API response when a user is deactivated. - Password for the user account. + * @param activateUserRequest + */ + public async activateUser(activateUserRequest: ActivateUserRequest, _options?: Configuration): Promise { + let _config = _options || this.configuration; + + // verify required parameter 'activateUserRequest' is not null or undefined + if (activateUserRequest === null || activateUserRequest === undefined) { + throw new RequiredError("UsersApi", "activateUser", "activateUserRequest"); + } + + + // Path Params + const localVarPath = '/api/rest/2.0/users/activate'; + + // Make Request Context + const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.POST); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.25.0") + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.25.0") + + + + + // Body Params + const contentType = ObjectSerializer.getPreferredMediaType([ + "application/json" + ]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = ObjectSerializer.stringify( + ObjectSerializer.serialize(activateUserRequest, "ActivateUserRequest", ""), + contentType + ); + requestContext.setBody(serializedBody); + + let authMethod: SecurityAuthentication | undefined; + // Apply auth methods + authMethod = _config.authMethods["bearerAuth"] + if (authMethod?.applySecurityAuthentication) { + await authMethod?.applySecurityAuthentication(requestContext); + } + + const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default + if (defaultAuth?.applySecurityAuthentication) { + await defaultAuth?.applySecurityAuthentication(requestContext); + } + + return requestContext; + } + + /** + * Version: 9.0.0.cl or later Updates the current password of the user. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `USER_ADMINISTRATION` (**Can manage users**) privilege is required. + * @param changeUserPasswordRequest + */ + public async changeUserPassword(changeUserPasswordRequest: ChangeUserPasswordRequest, _options?: Configuration): Promise { + let _config = _options || this.configuration; + + // verify required parameter 'changeUserPasswordRequest' is not null or undefined + if (changeUserPasswordRequest === null || changeUserPasswordRequest === undefined) { + throw new RequiredError("UsersApi", "changeUserPassword", "changeUserPasswordRequest"); + } + + + // Path Params + const localVarPath = '/api/rest/2.0/users/change-password'; + + // Make Request Context + const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.POST); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.25.0") + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.25.0") + + + + + // Body Params + const contentType = ObjectSerializer.getPreferredMediaType([ + "application/json" + ]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = ObjectSerializer.stringify( + ObjectSerializer.serialize(changeUserPasswordRequest, "ChangeUserPasswordRequest", ""), + contentType + ); + requestContext.setBody(serializedBody); + + let authMethod: SecurityAuthentication | undefined; + // Apply auth methods + authMethod = _config.authMethods["bearerAuth"] + if (authMethod?.applySecurityAuthentication) { + await authMethod?.applySecurityAuthentication(requestContext); + } + + const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default + if (defaultAuth?.applySecurityAuthentication) { + await defaultAuth?.applySecurityAuthentication(requestContext); + } + + return requestContext; + } + + /** + * Version: 9.0.0.cl or later Creates a user in ThoughtSpot. The API endpoint allows you to configure several user properties such as email address, account status, share notification preferences, and sharing visibility. You can provision the user to [groups](https://docs.thoughtspot.com/cloud/latest/groups-privileges) and [Orgs](https://docs.thoughtspot.com/cloud/latest/orgs-overview). You can also add Liveboard, Answer, and Worksheet objects to the user’s favorites list, assign a default Liveboard for the user, and set user preferences. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `USER_ADMINISTRATION` (**Can manage users**) privilege is required. + * @param createUserRequest + */ + public async createUser(createUserRequest: CreateUserRequest, _options?: Configuration): Promise { + let _config = _options || this.configuration; + + // verify required parameter 'createUserRequest' is not null or undefined + if (createUserRequest === null || createUserRequest === undefined) { + throw new RequiredError("UsersApi", "createUser", "createUserRequest"); + } + + + // Path Params + const localVarPath = '/api/rest/2.0/users/create'; + + // Make Request Context + const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.POST); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.25.0") + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.25.0") + + + + + // Body Params + const contentType = ObjectSerializer.getPreferredMediaType([ + "application/json" + ]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = ObjectSerializer.stringify( + ObjectSerializer.serialize(createUserRequest, "CreateUserRequest", ""), + contentType + ); + requestContext.setBody(serializedBody); + + let authMethod: SecurityAuthentication | undefined; + // Apply auth methods + authMethod = _config.authMethods["bearerAuth"] + if (authMethod?.applySecurityAuthentication) { + await authMethod?.applySecurityAuthentication(requestContext); + } + + const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default + if (defaultAuth?.applySecurityAuthentication) { + await defaultAuth?.applySecurityAuthentication(requestContext); + } + + return requestContext; + } + + /** + * Version: 9.7.0.cl or later Deactivates a user account. Requires `ADMINISTRATION` (**Can administer Thoughtspot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `USER_ADMINISTRATION` (**Can manage users**) privilege is required. To deactivate a user account, the API request body must include the following information: - Username or the GUID of the user account - Base URL of the ThoughtSpot instance If the API request is successful, ThoughtSpot returns the activation URL in the response. The activation URL is valid for 14 days and can be used to re-activate the account and reset the password of the deactivated account. + * @param deactivateUserRequest + */ + public async deactivateUser(deactivateUserRequest: DeactivateUserRequest, _options?: Configuration): Promise { + let _config = _options || this.configuration; + + // verify required parameter 'deactivateUserRequest' is not null or undefined + if (deactivateUserRequest === null || deactivateUserRequest === undefined) { + throw new RequiredError("UsersApi", "deactivateUser", "deactivateUserRequest"); + } + + + // Path Params + const localVarPath = '/api/rest/2.0/users/deactivate'; + + // Make Request Context + const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.POST); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.25.0") + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.25.0") + + + + + // Body Params + const contentType = ObjectSerializer.getPreferredMediaType([ + "application/json" + ]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = ObjectSerializer.stringify( + ObjectSerializer.serialize(deactivateUserRequest, "DeactivateUserRequest", ""), + contentType + ); + requestContext.setBody(serializedBody); + + let authMethod: SecurityAuthentication | undefined; + // Apply auth methods + authMethod = _config.authMethods["bearerAuth"] + if (authMethod?.applySecurityAuthentication) { + await authMethod?.applySecurityAuthentication(requestContext); + } + + const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default + if (defaultAuth?.applySecurityAuthentication) { + await defaultAuth?.applySecurityAuthentication(requestContext); + } + + return requestContext; + } + + /** + * Version: 9.0.0.cl or later Deletes a user from the ThoughtSpot system. If you want to remove a user from a specific Org but not from ThoughtSpot, update the group and Org mapping properties of the user object via a POST API call to the [/api/rest/2.0/users/{user_identifier}/update](#/http/api-endpoints/users/update-user) endpoint. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `USER_ADMINISTRATION` (**Can manage users**) privilege is required. + * @param userIdentifier GUID / name of the user + */ + public async deleteUser(userIdentifier: string, _options?: Configuration): Promise { + let _config = _options || this.configuration; + + // verify required parameter 'userIdentifier' is not null or undefined + if (userIdentifier === null || userIdentifier === undefined) { + throw new RequiredError("UsersApi", "deleteUser", "userIdentifier"); + } + + + // Path Params + const localVarPath = '/api/rest/2.0/users/{user_identifier}/delete' + .replace('{' + 'user_identifier' + '}', encodeURIComponent(String(userIdentifier))); + + // Make Request Context + const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.POST); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.25.0") + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.25.0") + + + + + let authMethod: SecurityAuthentication | undefined; + // Apply auth methods + authMethod = _config.authMethods["bearerAuth"] + if (authMethod?.applySecurityAuthentication) { + await authMethod?.applySecurityAuthentication(requestContext); + } + + const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default + if (defaultAuth?.applySecurityAuthentication) { + await defaultAuth?.applySecurityAuthentication(requestContext); + } + + return requestContext; + } + + /** + * Version: 9.0.0.cl or later Enforces logout on current user sessions. Use this API with caution as it may invalidate active user sessions and force users to re-login. Make sure you specify the usernames or GUIDs. If you pass null values in the API call, all user sessions on your cluster become invalid, and the users are forced to re-login. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `USER_ADMINISTRATION` (**Can manage users**) privilege is required. + * @param forceLogoutUsersRequest + */ + public async forceLogoutUsers(forceLogoutUsersRequest: ForceLogoutUsersRequest, _options?: Configuration): Promise { + let _config = _options || this.configuration; + + // verify required parameter 'forceLogoutUsersRequest' is not null or undefined + if (forceLogoutUsersRequest === null || forceLogoutUsersRequest === undefined) { + throw new RequiredError("UsersApi", "forceLogoutUsers", "forceLogoutUsersRequest"); + } + + + // Path Params + const localVarPath = '/api/rest/2.0/users/force-logout'; + + // Make Request Context + const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.POST); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.25.0") + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.25.0") + + + + + // Body Params + const contentType = ObjectSerializer.getPreferredMediaType([ + "application/json" + ]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = ObjectSerializer.stringify( + ObjectSerializer.serialize(forceLogoutUsersRequest, "ForceLogoutUsersRequest", ""), + contentType + ); + requestContext.setBody(serializedBody); + + let authMethod: SecurityAuthentication | undefined; + // Apply auth methods + authMethod = _config.authMethods["bearerAuth"] + if (authMethod?.applySecurityAuthentication) { + await authMethod?.applySecurityAuthentication(requestContext); + } + + const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default + if (defaultAuth?.applySecurityAuthentication) { + await defaultAuth?.applySecurityAuthentication(requestContext); + } + + return requestContext; + } + + /** + * Version: 9.0.0.cl or later Imports user data from external databases into ThoughtSpot. During the user import operation: * If the specified users are not available in ThoughtSpot, the users are created and assigned a default password. Defining a `default_password` in the API request is optional. * If `delete_unspecified_users` is set to `true`, the users not specified in the API request, excluding the `tsadmin`, `guest`, `system` and `su` users, are deleted. * If the specified user objects are already available in ThoughtSpot, the object properties are updated and synchronized as per the input data in the API request. A successful API call returns the object that represents the changes made in the ThoughtSpot system. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `USER_ADMINISTRATION` (**Can manage users**) privilege is required. + * @param importUsersRequest + */ + public async importUsers(importUsersRequest: ImportUsersRequest, _options?: Configuration): Promise { + let _config = _options || this.configuration; + + // verify required parameter 'importUsersRequest' is not null or undefined + if (importUsersRequest === null || importUsersRequest === undefined) { + throw new RequiredError("UsersApi", "importUsers", "importUsersRequest"); + } + + + // Path Params + const localVarPath = '/api/rest/2.0/users/import'; + + // Make Request Context + const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.POST); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.25.0") + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.25.0") + + + + + // Body Params + const contentType = ObjectSerializer.getPreferredMediaType([ + "application/json" + ]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = ObjectSerializer.stringify( + ObjectSerializer.serialize(importUsersRequest, "ImportUsersRequest", ""), + contentType + ); + requestContext.setBody(serializedBody); + + let authMethod: SecurityAuthentication | undefined; + // Apply auth methods + authMethod = _config.authMethods["bearerAuth"] + if (authMethod?.applySecurityAuthentication) { + await authMethod?.applySecurityAuthentication(requestContext); + } + + const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default + if (defaultAuth?.applySecurityAuthentication) { + await defaultAuth?.applySecurityAuthentication(requestContext); + } + + return requestContext; + } + + /** + * Version: 9.0.0.cl or later Resets the password of a user account. Administrators can reset password on behalf of a user. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `USER_ADMINISTRATION` (**Can manage users**) privilege is required. + * @param resetUserPasswordRequest + */ + public async resetUserPassword(resetUserPasswordRequest: ResetUserPasswordRequest, _options?: Configuration): Promise { + let _config = _options || this.configuration; + + // verify required parameter 'resetUserPasswordRequest' is not null or undefined + if (resetUserPasswordRequest === null || resetUserPasswordRequest === undefined) { + throw new RequiredError("UsersApi", "resetUserPassword", "resetUserPasswordRequest"); + } + + + // Path Params + const localVarPath = '/api/rest/2.0/users/reset-password'; + + // Make Request Context + const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.POST); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.25.0") + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.25.0") + + + + + // Body Params + const contentType = ObjectSerializer.getPreferredMediaType([ + "application/json" + ]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = ObjectSerializer.stringify( + ObjectSerializer.serialize(resetUserPasswordRequest, "ResetUserPasswordRequest", ""), + contentType + ); + requestContext.setBody(serializedBody); + + let authMethod: SecurityAuthentication | undefined; + // Apply auth methods + authMethod = _config.authMethods["bearerAuth"] + if (authMethod?.applySecurityAuthentication) { + await authMethod?.applySecurityAuthentication(requestContext); + } + + const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default + if (defaultAuth?.applySecurityAuthentication) { + await defaultAuth?.applySecurityAuthentication(requestContext); + } + + return requestContext; + } + + /** + * Version: 9.0.0.cl or later Gets a list of users available on the ThoughtSpot system. To get details of a specific user, specify the user GUID or name. You can also filter the API response based on groups, Org ID, user visibility, account status, user type, and user preference settings and favorites. Available to all users. Users with `ADMINISTRATION` (**Can administer ThoughtSpot**) privileges can view all users properties. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `USER_ADMINISTRATION` (**Can manage users**) privilege is required. **NOTE**: If the API returns an empty list, consider increasing the value of the `record_size` parameter. To search across all available users, set `record_size` to `-1`. + * @param searchUsersRequest + */ + public async searchUsers(searchUsersRequest: SearchUsersRequest, _options?: Configuration): Promise { + let _config = _options || this.configuration; + + // verify required parameter 'searchUsersRequest' is not null or undefined + if (searchUsersRequest === null || searchUsersRequest === undefined) { + throw new RequiredError("UsersApi", "searchUsers", "searchUsersRequest"); + } + + + // Path Params + const localVarPath = '/api/rest/2.0/users/search'; + + // Make Request Context + const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.POST); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.25.0") + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.25.0") + + + + + // Body Params + const contentType = ObjectSerializer.getPreferredMediaType([ + "application/json" + ]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = ObjectSerializer.stringify( + ObjectSerializer.serialize(searchUsersRequest, "SearchUsersRequest", ""), + contentType + ); + requestContext.setBody(serializedBody); + + let authMethod: SecurityAuthentication | undefined; + // Apply auth methods + authMethod = _config.authMethods["bearerAuth"] + if (authMethod?.applySecurityAuthentication) { + await authMethod?.applySecurityAuthentication(requestContext); + } + + const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default + if (defaultAuth?.applySecurityAuthentication) { + await defaultAuth?.applySecurityAuthentication(requestContext); + } + + return requestContext; + } + + /** + * Version: 9.0.0.cl or later Updates the properties of a user object. You can modify user properties such as username, email, and share notification settings. You can also assign new groups and Orgs, remove the user from a group or Org, reset password, and modify user preferences. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `USER_ADMINISTRATION` (**Can manage users**) privilege is required. + * @param userIdentifier GUID / name of the user + * @param updateUserRequest + */ + public async updateUser(userIdentifier: string, updateUserRequest: UpdateUserRequest, _options?: Configuration): Promise { + let _config = _options || this.configuration; + + // verify required parameter 'userIdentifier' is not null or undefined + if (userIdentifier === null || userIdentifier === undefined) { + throw new RequiredError("UsersApi", "updateUser", "userIdentifier"); + } + + + // verify required parameter 'updateUserRequest' is not null or undefined + if (updateUserRequest === null || updateUserRequest === undefined) { + throw new RequiredError("UsersApi", "updateUser", "updateUserRequest"); + } + + + // Path Params + const localVarPath = '/api/rest/2.0/users/{user_identifier}/update' + .replace('{' + 'user_identifier' + '}', encodeURIComponent(String(userIdentifier))); + + // Make Request Context + const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.POST); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.25.0") + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.25.0") + + + + + // Body Params + const contentType = ObjectSerializer.getPreferredMediaType([ + "application/json" + ]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = ObjectSerializer.stringify( + ObjectSerializer.serialize(updateUserRequest, "UpdateUserRequest", ""), + contentType + ); + requestContext.setBody(serializedBody); + + let authMethod: SecurityAuthentication | undefined; + // Apply auth methods + authMethod = _config.authMethods["bearerAuth"] + if (authMethod?.applySecurityAuthentication) { + await authMethod?.applySecurityAuthentication(requestContext); + } + + const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default + if (defaultAuth?.applySecurityAuthentication) { + await defaultAuth?.applySecurityAuthentication(requestContext); + } + + return requestContext; + } + +} + +export class UsersApiResponseProcessor { + + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to activateUser + * @throws ApiException if the response code was not in [200, 299] + */ + public async activateUser(response: ResponseContext): Promise { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("200", response.httpStatusCode)) { + const body: User = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "User", "" + ) as User; + return body; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Invalid request.", body, response.headers); + } + if (isCodeInRange("401", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Unexpected error", body, response.headers); + } + + // Work around for missing responses in specification, e.g. for petstore.yaml + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body: User = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "User", "" + ) as User; + return body; + } + + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", await response.getBodyAsAny(), response.headers); + } + + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to changeUserPassword + * @throws ApiException if the response code was not in [200, 299] + */ + public async changeUserPassword(response: ResponseContext): Promise { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("204", response.httpStatusCode)) { + return; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Invalid request.", body, response.headers); + } + if (isCodeInRange("401", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Unexpected error", body, response.headers); + } + + // Work around for missing responses in specification, e.g. for petstore.yaml + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body: void = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "void", "" + ) as void; + return body; + } + + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", await response.getBodyAsAny(), response.headers); + } + + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to createUser + * @throws ApiException if the response code was not in [200, 299] + */ + public async createUser(response: ResponseContext): Promise { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("200", response.httpStatusCode)) { + const body: User = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "User", "" + ) as User; + return body; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Invalid request.", body, response.headers); + } + if (isCodeInRange("401", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Unexpected error", body, response.headers); + } + + // Work around for missing responses in specification, e.g. for petstore.yaml + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body: User = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "User", "" + ) as User; + return body; + } + + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", await response.getBodyAsAny(), response.headers); + } + + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to deactivateUser + * @throws ApiException if the response code was not in [200, 299] + */ + public async deactivateUser(response: ResponseContext): Promise { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("200", response.httpStatusCode)) { + const body: ResponseActivationURL = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ResponseActivationURL", "" + ) as ResponseActivationURL; + return body; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Invalid request.", body, response.headers); + } + if (isCodeInRange("401", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Unexpected error", body, response.headers); + } + + // Work around for missing responses in specification, e.g. for petstore.yaml + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body: ResponseActivationURL = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ResponseActivationURL", "" + ) as ResponseActivationURL; + return body; + } + + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", await response.getBodyAsAny(), response.headers); + } + + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to deleteUser + * @throws ApiException if the response code was not in [200, 299] + */ + public async deleteUser(response: ResponseContext): Promise { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("204", response.httpStatusCode)) { + return; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Invalid request.", body, response.headers); + } + if (isCodeInRange("401", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Unexpected error", body, response.headers); + } + + // Work around for missing responses in specification, e.g. for petstore.yaml + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body: void = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "void", "" + ) as void; + return body; + } + + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", await response.getBodyAsAny(), response.headers); + } + + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to forceLogoutUsers + * @throws ApiException if the response code was not in [200, 299] + */ + public async forceLogoutUsers(response: ResponseContext): Promise { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("204", response.httpStatusCode)) { + return; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Invalid request.", body, response.headers); + } + if (isCodeInRange("401", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Unexpected error", body, response.headers); + } + + // Work around for missing responses in specification, e.g. for petstore.yaml + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body: void = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "void", "" + ) as void; + return body; + } + + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", await response.getBodyAsAny(), response.headers); + } + + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to importUsers + * @throws ApiException if the response code was not in [200, 299] + */ + public async importUsers(response: ResponseContext): Promise { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("200", response.httpStatusCode)) { + const body: ImportUsersResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ImportUsersResponse", "" + ) as ImportUsersResponse; + return body; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Invalid request.", body, response.headers); + } + if (isCodeInRange("401", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Unexpected error", body, response.headers); + } + + // Work around for missing responses in specification, e.g. for petstore.yaml + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body: ImportUsersResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ImportUsersResponse", "" + ) as ImportUsersResponse; + return body; + } + + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", await response.getBodyAsAny(), response.headers); + } + + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to resetUserPassword + * @throws ApiException if the response code was not in [200, 299] + */ + public async resetUserPassword(response: ResponseContext): Promise { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("204", response.httpStatusCode)) { + return; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Invalid request.", body, response.headers); + } + if (isCodeInRange("401", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Unexpected error", body, response.headers); + } + + // Work around for missing responses in specification, e.g. for petstore.yaml + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body: void = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "void", "" + ) as void; + return body; + } + + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", await response.getBodyAsAny(), response.headers); + } + + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to searchUsers + * @throws ApiException if the response code was not in [200, 299] + */ + public async searchUsers(response: ResponseContext): Promise > { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("200", response.httpStatusCode)) { + const body: Array = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "Array", "" + ) as Array; + return body; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Invalid request.", body, response.headers); + } + if (isCodeInRange("401", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Unexpected error", body, response.headers); + } + + // Work around for missing responses in specification, e.g. for petstore.yaml + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body: Array = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "Array", "" + ) as Array; + return body; + } + + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", await response.getBodyAsAny(), response.headers); + } + + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to updateUser + * @throws ApiException if the response code was not in [200, 299] + */ + public async updateUser(response: ResponseContext): Promise { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("204", response.httpStatusCode)) { + return; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Invalid request.", body, response.headers); + } + if (isCodeInRange("401", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Unexpected error", body, response.headers); + } + + // Work around for missing responses in specification, e.g. for petstore.yaml + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body: void = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "void", "" + ) as void; + return body; + } + + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", await response.getBodyAsAny(), response.headers); + } + +} diff --git a/sdks/typescript/apis/VariableApi.ts b/sdks/typescript/apis/VariableApi.ts new file mode 100644 index 000000000..e390f33f3 --- /dev/null +++ b/sdks/typescript/apis/VariableApi.ts @@ -0,0 +1,771 @@ +// TODO: better import syntax? +import {BaseAPIRequestFactory, RequiredError, COLLECTION_FORMATS} from './baseapi'; +import {Configuration} from '../configuration'; +import {RequestContext, HttpMethod, ResponseContext, HttpFile} from '../http/http'; +import {ObjectSerializer} from '../models/ObjectSerializer'; +import {ApiException} from './exception'; +import {canConsumeForm, isCodeInRange} from '../util'; +import {SecurityAuthentication} from '../auth/auth'; + + +import { CreateVariableRequest } from '../models/CreateVariableRequest'; +import { DeleteVariablesRequest } from '../models/DeleteVariablesRequest'; +import { ErrorResponse } from '../models/ErrorResponse'; +import { PutVariableValuesRequest } from '../models/PutVariableValuesRequest'; +import { SearchVariablesRequest } from '../models/SearchVariablesRequest'; +import { UpdateVariableRequest } from '../models/UpdateVariableRequest'; +import { UpdateVariableValuesRequest } from '../models/UpdateVariableValuesRequest'; +import { Variable } from '../models/Variable'; + +/** + * no description + */ +export class VariableApiRequestFactory extends BaseAPIRequestFactory { + + /** + * Create a variable which can be used for parameterizing metadata objects Version: 26.4.0.cl or later Allows creating a variable which can be used for parameterizing metadata objects in ThoughtSpot. Requires ADMINISTRATION role and TENANT scope. The CAN_MANAGE_VARIABLES permission allows you to manage Formula Variables in the current organization scope. The API endpoint supports the following types of variables: * CONNECTION_PROPERTY - For connection properties * TABLE_MAPPING - For table mappings * CONNECTION_PROPERTY_PER_PRINCIPAL - For connection properties per principal. In order to use this please contact support to enable this. * FORMULA_VARIABLE - For Formula variables, introduced in 10.15.0.cl When creating a variable, you need to specify: * The variable type * A unique name for the variable * Whether the variable contains sensitive values (defaults to false) * The data type of the variable, only specify for formula variables (defaults to null) The operation will fail if: * The user lacks required permissions * The variable name already exists * The variable type is invalid + * @param createVariableRequest + */ + public async createVariable(createVariableRequest: CreateVariableRequest, _options?: Configuration): Promise { + let _config = _options || this.configuration; + + // verify required parameter 'createVariableRequest' is not null or undefined + if (createVariableRequest === null || createVariableRequest === undefined) { + throw new RequiredError("VariableApi", "createVariable", "createVariableRequest"); + } + + + // Path Params + const localVarPath = '/api/rest/2.0/template/variables/create'; + + // Make Request Context + const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.POST); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.25.0") + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.25.0") + + + + + // Body Params + const contentType = ObjectSerializer.getPreferredMediaType([ + "application/json" + ]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = ObjectSerializer.stringify( + ObjectSerializer.serialize(createVariableRequest, "CreateVariableRequest", ""), + contentType + ); + requestContext.setBody(serializedBody); + + let authMethod: SecurityAuthentication | undefined; + // Apply auth methods + authMethod = _config.authMethods["bearerAuth"] + if (authMethod?.applySecurityAuthentication) { + await authMethod?.applySecurityAuthentication(requestContext); + } + + const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default + if (defaultAuth?.applySecurityAuthentication) { + await defaultAuth?.applySecurityAuthentication(requestContext); + } + + return requestContext; + } + + /** + * Delete a variable Version: 10.14.0.cl or later **Note:** This API endpoint is deprecated and will be removed from ThoughtSpot in a future release. Use [POST /api/rest/2.0/template/variables/delete](/api/rest/2.0/template/variables/delete) instead. Allows deleting a variable from ThoughtSpot. Requires ADMINISTRATION role and TENANT scope. The CAN_MANAGE_VARIABLES permission allows you to manage Formula Variables in the current organization scope. The API endpoint requires: * The variable identifier (ID or name) The operation will fail if: * The user lacks required permissions * The variable doesn\'t exist * The variable is being used by other objects + * @param identifier Unique id or name of the variable + */ + public async deleteVariable(identifier: string, _options?: Configuration): Promise { + let _config = _options || this.configuration; + + // verify required parameter 'identifier' is not null or undefined + if (identifier === null || identifier === undefined) { + throw new RequiredError("VariableApi", "deleteVariable", "identifier"); + } + + + // Path Params + const localVarPath = '/api/rest/2.0/template/variables/{identifier}/delete' + .replace('{' + 'identifier' + '}', encodeURIComponent(String(identifier))); + + // Make Request Context + const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.POST); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.25.0") + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.25.0") + + + + + let authMethod: SecurityAuthentication | undefined; + // Apply auth methods + authMethod = _config.authMethods["bearerAuth"] + if (authMethod?.applySecurityAuthentication) { + await authMethod?.applySecurityAuthentication(requestContext); + } + + const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default + if (defaultAuth?.applySecurityAuthentication) { + await defaultAuth?.applySecurityAuthentication(requestContext); + } + + return requestContext; + } + + /** + * Delete variable(s) Version: 26.4.0.cl or later Allows deleting multiple variables from ThoughtSpot. Requires ADMINISTRATION role and TENANT scope. The CAN_MANAGE_VARIABLES permission allows you to manage Formula Variables in the current organization scope. The API endpoint requires: * The variable identifiers (IDs or names) The operation will fail if: * The user lacks required permissions * Any of the variables don\'t exist * Any of the variables are being used by other objects + * @param deleteVariablesRequest + */ + public async deleteVariables(deleteVariablesRequest: DeleteVariablesRequest, _options?: Configuration): Promise { + let _config = _options || this.configuration; + + // verify required parameter 'deleteVariablesRequest' is not null or undefined + if (deleteVariablesRequest === null || deleteVariablesRequest === undefined) { + throw new RequiredError("VariableApi", "deleteVariables", "deleteVariablesRequest"); + } + + + // Path Params + const localVarPath = '/api/rest/2.0/template/variables/delete'; + + // Make Request Context + const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.POST); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.25.0") + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.25.0") + + + + + // Body Params + const contentType = ObjectSerializer.getPreferredMediaType([ + "application/json" + ]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = ObjectSerializer.stringify( + ObjectSerializer.serialize(deleteVariablesRequest, "DeleteVariablesRequest", ""), + contentType + ); + requestContext.setBody(serializedBody); + + let authMethod: SecurityAuthentication | undefined; + // Apply auth methods + authMethod = _config.authMethods["bearerAuth"] + if (authMethod?.applySecurityAuthentication) { + await authMethod?.applySecurityAuthentication(requestContext); + } + + const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default + if (defaultAuth?.applySecurityAuthentication) { + await defaultAuth?.applySecurityAuthentication(requestContext); + } + + return requestContext; + } + + /** + * Update values for a variable Version: 26.4.0.cl or later Allows updating values for a specific variable in ThoughtSpot. Requires ADMINISTRATION role. The CAN_MANAGE_VARIABLES permission allows you to manage Formula Variables in the current organization scope. The API endpoint allows: * Adding new values to the variable * Replacing existing values * Deleting values from the variable * Resetting all values When updating variable values, you need to specify: * The variable identifier (ID or name) * The values to add/replace/remove * The operation to perform (ADD, REPLACE, REMOVE, RESET) Behaviour based on operation type: * ADD - Adds values to the variable if this is a list type variable, else same as replace. * REPLACE - Replaces all values of a given set of constraints with the current set of values. * REMOVE - Removes any values which match the set of conditions of the variables if this is a list type variable, else clears value. * RESET - Removes all constraints for the given variable, scope is ignored + * @param identifier Unique ID or name of the variable + * @param putVariableValuesRequest + */ + public async putVariableValues(identifier: string, putVariableValuesRequest: PutVariableValuesRequest, _options?: Configuration): Promise { + let _config = _options || this.configuration; + + // verify required parameter 'identifier' is not null or undefined + if (identifier === null || identifier === undefined) { + throw new RequiredError("VariableApi", "putVariableValues", "identifier"); + } + + + // verify required parameter 'putVariableValuesRequest' is not null or undefined + if (putVariableValuesRequest === null || putVariableValuesRequest === undefined) { + throw new RequiredError("VariableApi", "putVariableValues", "putVariableValuesRequest"); + } + + + // Path Params + const localVarPath = '/api/rest/2.0/template/variables/{identifier}/update-values' + .replace('{' + 'identifier' + '}', encodeURIComponent(String(identifier))); + + // Make Request Context + const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.POST); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.25.0") + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.25.0") + + + + + // Body Params + const contentType = ObjectSerializer.getPreferredMediaType([ + "application/json" + ]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = ObjectSerializer.stringify( + ObjectSerializer.serialize(putVariableValuesRequest, "PutVariableValuesRequest", ""), + contentType + ); + requestContext.setBody(serializedBody); + + let authMethod: SecurityAuthentication | undefined; + // Apply auth methods + authMethod = _config.authMethods["bearerAuth"] + if (authMethod?.applySecurityAuthentication) { + await authMethod?.applySecurityAuthentication(requestContext); + } + + const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default + if (defaultAuth?.applySecurityAuthentication) { + await defaultAuth?.applySecurityAuthentication(requestContext); + } + + return requestContext; + } + + /** + * Search variables Version: 26.4.0.cl or later Allows searching for variables in ThoughtSpot. Requires ADMINISTRATION role. The CAN_MANAGE_VARIABLES permission allows you to manage Formula Variables in the current organization scope. The API endpoint supports searching variables by: * Variable identifier (ID or name) * Variable type * Name pattern (case-insensitive, supports % for wildcard) The search results can be formatted in three ways: * METADATA - Returns only variable metadata (default) * METADATA_AND_VALUES - Returns variable metadata and values The values can be filtered by scope: * org_identifier * principal_identifier * model_identifier + * @param searchVariablesRequest + */ + public async searchVariables(searchVariablesRequest: SearchVariablesRequest, _options?: Configuration): Promise { + let _config = _options || this.configuration; + + // verify required parameter 'searchVariablesRequest' is not null or undefined + if (searchVariablesRequest === null || searchVariablesRequest === undefined) { + throw new RequiredError("VariableApi", "searchVariables", "searchVariablesRequest"); + } + + + // Path Params + const localVarPath = '/api/rest/2.0/template/variables/search'; + + // Make Request Context + const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.POST); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.25.0") + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.25.0") + + + + + // Body Params + const contentType = ObjectSerializer.getPreferredMediaType([ + "application/json" + ]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = ObjectSerializer.stringify( + ObjectSerializer.serialize(searchVariablesRequest, "SearchVariablesRequest", ""), + contentType + ); + requestContext.setBody(serializedBody); + + let authMethod: SecurityAuthentication | undefined; + // Apply auth methods + authMethod = _config.authMethods["bearerAuth"] + if (authMethod?.applySecurityAuthentication) { + await authMethod?.applySecurityAuthentication(requestContext); + } + + const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default + if (defaultAuth?.applySecurityAuthentication) { + await defaultAuth?.applySecurityAuthentication(requestContext); + } + + return requestContext; + } + + /** + * Update a variable\'s name Version: 26.4.0.cl or later Allows updating a variable\'s name in ThoughtSpot. Requires ADMINISTRATION role and TENANT scope. The CAN_MANAGE_VARIABLES permission allows you to manage Formula Variables in the current organization scope. The API endpoint allows updating: * The variable name + * @param identifier Unique id or name of the variable to update. + * @param updateVariableRequest + */ + public async updateVariable(identifier: string, updateVariableRequest: UpdateVariableRequest, _options?: Configuration): Promise { + let _config = _options || this.configuration; + + // verify required parameter 'identifier' is not null or undefined + if (identifier === null || identifier === undefined) { + throw new RequiredError("VariableApi", "updateVariable", "identifier"); + } + + + // verify required parameter 'updateVariableRequest' is not null or undefined + if (updateVariableRequest === null || updateVariableRequest === undefined) { + throw new RequiredError("VariableApi", "updateVariable", "updateVariableRequest"); + } + + + // Path Params + const localVarPath = '/api/rest/2.0/template/variables/{identifier}/update' + .replace('{' + 'identifier' + '}', encodeURIComponent(String(identifier))); + + // Make Request Context + const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.POST); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.25.0") + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.25.0") + + + + + // Body Params + const contentType = ObjectSerializer.getPreferredMediaType([ + "application/json" + ]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = ObjectSerializer.stringify( + ObjectSerializer.serialize(updateVariableRequest, "UpdateVariableRequest", ""), + contentType + ); + requestContext.setBody(serializedBody); + + let authMethod: SecurityAuthentication | undefined; + // Apply auth methods + authMethod = _config.authMethods["bearerAuth"] + if (authMethod?.applySecurityAuthentication) { + await authMethod?.applySecurityAuthentication(requestContext); + } + + const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default + if (defaultAuth?.applySecurityAuthentication) { + await defaultAuth?.applySecurityAuthentication(requestContext); + } + + return requestContext; + } + + /** + * Update values for multiple variables Version: 10.14.0.cl or later **Note:** This API endpoint is deprecated and will be removed from ThoughtSpot in a future release. Use [POST /api/rest/2.0/template/variables/{identifier}/update-values](/api/rest/2.0/template/variables/%7Bidentifier%7D/update-values) instead. Allows updating values for multiple variables in ThoughtSpot. Requires ADMINISTRATION role. The CAN_MANAGE_VARIABLES permission allows you to manage Formula Variables in the current organization scope. The API endpoint allows: * Adding new values to variables * Replacing existing values * Deleting values from variables When updating variable values, you need to specify: * The variable identifiers * The values to add/replace/remove for each variable * The operation to perform (ADD, REPLACE, REMOVE, RESET) Behaviour based on operation type: * ADD - Adds values to the variable if this is a list type variable, else same as replace. * REPLACE - Replaces all values of a given set of constraints with the current set of values. * REMOVE - Removes any values which match the set of conditions of the variables if this is a list type variable, else clears value. * RESET - Removes all constrains for a given variable, scope is ignored + * @param updateVariableValuesRequest + */ + public async updateVariableValues(updateVariableValuesRequest: UpdateVariableValuesRequest, _options?: Configuration): Promise { + let _config = _options || this.configuration; + + // verify required parameter 'updateVariableValuesRequest' is not null or undefined + if (updateVariableValuesRequest === null || updateVariableValuesRequest === undefined) { + throw new RequiredError("VariableApi", "updateVariableValues", "updateVariableValuesRequest"); + } + + + // Path Params + const localVarPath = '/api/rest/2.0/template/variables/update-values'; + + // Make Request Context + const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.POST); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.25.0") + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.25.0") + + + + + // Body Params + const contentType = ObjectSerializer.getPreferredMediaType([ + "application/json" + ]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = ObjectSerializer.stringify( + ObjectSerializer.serialize(updateVariableValuesRequest, "UpdateVariableValuesRequest", ""), + contentType + ); + requestContext.setBody(serializedBody); + + let authMethod: SecurityAuthentication | undefined; + // Apply auth methods + authMethod = _config.authMethods["bearerAuth"] + if (authMethod?.applySecurityAuthentication) { + await authMethod?.applySecurityAuthentication(requestContext); + } + + const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default + if (defaultAuth?.applySecurityAuthentication) { + await defaultAuth?.applySecurityAuthentication(requestContext); + } + + return requestContext; + } + +} + +export class VariableApiResponseProcessor { + + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to createVariable + * @throws ApiException if the response code was not in [200, 299] + */ + public async createVariable(response: ResponseContext): Promise { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("200", response.httpStatusCode)) { + const body: Variable = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "Variable", "" + ) as Variable; + return body; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Invalid request.", body, response.headers); + } + if (isCodeInRange("401", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Unexpected error", body, response.headers); + } + + // Work around for missing responses in specification, e.g. for petstore.yaml + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body: Variable = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "Variable", "" + ) as Variable; + return body; + } + + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", await response.getBodyAsAny(), response.headers); + } + + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to deleteVariable + * @throws ApiException if the response code was not in [200, 299] + */ + public async deleteVariable(response: ResponseContext): Promise { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("204", response.httpStatusCode)) { + return; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Invalid request.", body, response.headers); + } + if (isCodeInRange("401", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Unexpected error", body, response.headers); + } + + // Work around for missing responses in specification, e.g. for petstore.yaml + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body: void = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "void", "" + ) as void; + return body; + } + + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", await response.getBodyAsAny(), response.headers); + } + + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to deleteVariables + * @throws ApiException if the response code was not in [200, 299] + */ + public async deleteVariables(response: ResponseContext): Promise { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("204", response.httpStatusCode)) { + return; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Invalid request.", body, response.headers); + } + if (isCodeInRange("401", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Unexpected error", body, response.headers); + } + + // Work around for missing responses in specification, e.g. for petstore.yaml + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body: void = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "void", "" + ) as void; + return body; + } + + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", await response.getBodyAsAny(), response.headers); + } + + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to putVariableValues + * @throws ApiException if the response code was not in [200, 299] + */ + public async putVariableValues(response: ResponseContext): Promise { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("204", response.httpStatusCode)) { + return; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Invalid request.", body, response.headers); + } + if (isCodeInRange("401", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Unexpected error", body, response.headers); + } + + // Work around for missing responses in specification, e.g. for petstore.yaml + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body: void = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "void", "" + ) as void; + return body; + } + + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", await response.getBodyAsAny(), response.headers); + } + + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to searchVariables + * @throws ApiException if the response code was not in [200, 299] + */ + public async searchVariables(response: ResponseContext): Promise > { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("200", response.httpStatusCode)) { + const body: Array = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "Array", "" + ) as Array; + return body; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Invalid request.", body, response.headers); + } + if (isCodeInRange("401", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Unexpected error", body, response.headers); + } + + // Work around for missing responses in specification, e.g. for petstore.yaml + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body: Array = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "Array", "" + ) as Array; + return body; + } + + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", await response.getBodyAsAny(), response.headers); + } + + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to updateVariable + * @throws ApiException if the response code was not in [200, 299] + */ + public async updateVariable(response: ResponseContext): Promise { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("204", response.httpStatusCode)) { + return; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Invalid request.", body, response.headers); + } + if (isCodeInRange("401", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Unexpected error", body, response.headers); + } + + // Work around for missing responses in specification, e.g. for petstore.yaml + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body: void = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "void", "" + ) as void; + return body; + } + + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", await response.getBodyAsAny(), response.headers); + } + + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to updateVariableValues + * @throws ApiException if the response code was not in [200, 299] + */ + public async updateVariableValues(response: ResponseContext): Promise { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("204", response.httpStatusCode)) { + return; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Invalid request.", body, response.headers); + } + if (isCodeInRange("401", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Unexpected error", body, response.headers); + } + + // Work around for missing responses in specification, e.g. for petstore.yaml + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body: void = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "void", "" + ) as void; + return body; + } + + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", await response.getBodyAsAny(), response.headers); + } + +} diff --git a/sdks/typescript/apis/VersionControlApi.ts b/sdks/typescript/apis/VersionControlApi.ts new file mode 100644 index 000000000..0de77b949 --- /dev/null +++ b/sdks/typescript/apis/VersionControlApi.ts @@ -0,0 +1,1012 @@ +// TODO: better import syntax? +import {BaseAPIRequestFactory, RequiredError, COLLECTION_FORMATS} from './baseapi'; +import {Configuration} from '../configuration'; +import {RequestContext, HttpMethod, ResponseContext, HttpFile} from '../http/http'; +import {ObjectSerializer} from '../models/ObjectSerializer'; +import {ApiException} from './exception'; +import {canConsumeForm, isCodeInRange} from '../util'; +import {SecurityAuthentication} from '../auth/auth'; + + +import { CommitBranchRequest } from '../models/CommitBranchRequest'; +import { CommitHistoryResponse } from '../models/CommitHistoryResponse'; +import { CommitResponse } from '../models/CommitResponse'; +import { CreateConfigRequest } from '../models/CreateConfigRequest'; +import { DeleteConfigRequest } from '../models/DeleteConfigRequest'; +import { DeployCommitRequest } from '../models/DeployCommitRequest'; +import { DeployResponse } from '../models/DeployResponse'; +import { ErrorResponse } from '../models/ErrorResponse'; +import { RepoConfigObject } from '../models/RepoConfigObject'; +import { RevertCommitRequest } from '../models/RevertCommitRequest'; +import { RevertResponse } from '../models/RevertResponse'; +import { SearchCommitsRequest } from '../models/SearchCommitsRequest'; +import { SearchConfigRequest } from '../models/SearchConfigRequest'; +import { UpdateConfigRequest } from '../models/UpdateConfigRequest'; +import { ValidateMergeRequest } from '../models/ValidateMergeRequest'; + +/** + * no description + */ +export class VersionControlApiRequestFactory extends BaseAPIRequestFactory { + + /** + * Version: 9.2.0.cl or later Commits TML files of metadata objects to the Git branch configured on your instance. Requires at least edit access to objects used in the commit operation. Before using this endpoint to push your commits: * Enable Git integration on your instance. * Make sure the Git repository and branch details are configured on your instance. For more information, see [Git integration documentation](https://developers.thoughtspot.com/docs/git-integration). + * @param commitBranchRequest + */ + public async commitBranch(commitBranchRequest: CommitBranchRequest, _options?: Configuration): Promise { + let _config = _options || this.configuration; + + // verify required parameter 'commitBranchRequest' is not null or undefined + if (commitBranchRequest === null || commitBranchRequest === undefined) { + throw new RequiredError("VersionControlApi", "commitBranch", "commitBranchRequest"); + } + + + // Path Params + const localVarPath = '/api/rest/2.0/vcs/git/branches/commit'; + + // Make Request Context + const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.POST); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.25.0") + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.25.0") + + + + + // Body Params + const contentType = ObjectSerializer.getPreferredMediaType([ + "application/json" + ]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = ObjectSerializer.stringify( + ObjectSerializer.serialize(commitBranchRequest, "CommitBranchRequest", ""), + contentType + ); + requestContext.setBody(serializedBody); + + let authMethod: SecurityAuthentication | undefined; + // Apply auth methods + authMethod = _config.authMethods["bearerAuth"] + if (authMethod?.applySecurityAuthentication) { + await authMethod?.applySecurityAuthentication(requestContext); + } + + const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default + if (defaultAuth?.applySecurityAuthentication) { + await defaultAuth?.applySecurityAuthentication(requestContext); + } + + return requestContext; + } + + /** + * Version: 9.2.0.cl or later Allows you to connect a ThoughtSpot instance to a Git repository. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance on your instance, the `CAN_SETUP_VERSION_CONTROL` (**Can set up version control**) privilege. You can use this API endpoint to connect your ThoughtSpot development and production environments to the development and production branches of a Git repository. Before using this endpoint to connect your ThoughtSpot instance to a Git repository, check the following prerequisites: * You have a Git repository. If you are using GitHub, make sure you have a valid account and an access token to connect ThoughtSpot to GitHub. For information about generating a token, see [GitHub Documentation](https://docs.github.com/en/authentication/keeping-your-account-and-data-secure/managing-your-personal-access-tokens). * Your access token has `repo` scope that grants full access to public and private repositories. * Your Git repository has a branch that can be configured as a default branch in ThoughtSpot. For more information, see [Git integration documentation](https://developers.thoughtspot.com/docs/?pageid=git-integration). **Note**: ThoughtSpot supports only GitHub / itHub Enterprise for CI/CD. + * @param createConfigRequest + */ + public async createConfig(createConfigRequest: CreateConfigRequest, _options?: Configuration): Promise { + let _config = _options || this.configuration; + + // verify required parameter 'createConfigRequest' is not null or undefined + if (createConfigRequest === null || createConfigRequest === undefined) { + throw new RequiredError("VersionControlApi", "createConfig", "createConfigRequest"); + } + + + // Path Params + const localVarPath = '/api/rest/2.0/vcs/git/config/create'; + + // Make Request Context + const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.POST); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.25.0") + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.25.0") + + + + + // Body Params + const contentType = ObjectSerializer.getPreferredMediaType([ + "application/json" + ]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = ObjectSerializer.stringify( + ObjectSerializer.serialize(createConfigRequest, "CreateConfigRequest", ""), + contentType + ); + requestContext.setBody(serializedBody); + + let authMethod: SecurityAuthentication | undefined; + // Apply auth methods + authMethod = _config.authMethods["bearerAuth"] + if (authMethod?.applySecurityAuthentication) { + await authMethod?.applySecurityAuthentication(requestContext); + } + + const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default + if (defaultAuth?.applySecurityAuthentication) { + await defaultAuth?.applySecurityAuthentication(requestContext); + } + + return requestContext; + } + + /** + * Version: 9.2.0.cl or later Deletes Git repository configuration from your ThoughtSpot instance. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance on your instance, the `CAN_SETUP_VERSION_CONTROL` (**Can set up version control**) privilege. + * @param deleteConfigRequest + */ + public async deleteConfig(deleteConfigRequest: DeleteConfigRequest, _options?: Configuration): Promise { + let _config = _options || this.configuration; + + // verify required parameter 'deleteConfigRequest' is not null or undefined + if (deleteConfigRequest === null || deleteConfigRequest === undefined) { + throw new RequiredError("VersionControlApi", "deleteConfig", "deleteConfigRequest"); + } + + + // Path Params + const localVarPath = '/api/rest/2.0/vcs/git/config/delete'; + + // Make Request Context + const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.POST); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.25.0") + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.25.0") + + + + + // Body Params + const contentType = ObjectSerializer.getPreferredMediaType([ + "application/json" + ]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = ObjectSerializer.stringify( + ObjectSerializer.serialize(deleteConfigRequest, "DeleteConfigRequest", ""), + contentType + ); + requestContext.setBody(serializedBody); + + let authMethod: SecurityAuthentication | undefined; + // Apply auth methods + authMethod = _config.authMethods["bearerAuth"] + if (authMethod?.applySecurityAuthentication) { + await authMethod?.applySecurityAuthentication(requestContext); + } + + const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default + if (defaultAuth?.applySecurityAuthentication) { + await defaultAuth?.applySecurityAuthentication(requestContext); + } + + return requestContext; + } + + /** + * Version: 9.2.0.cl or later Allows you to deploy a commit and publish TML content to your ThoughtSpot instance. Requires at least edit access to the objects used in the deploy operation. The API deploys the head of the branch unless a `commit_id` is specified in the API request. If the branch name is not defined in the request, the default branch is considered for deploying commits. For more information, see [Git integration documentation](https://developers.thoughtspot.com/docs/git-integration). + * @param deployCommitRequest + */ + public async deployCommit(deployCommitRequest: DeployCommitRequest, _options?: Configuration): Promise { + let _config = _options || this.configuration; + + // verify required parameter 'deployCommitRequest' is not null or undefined + if (deployCommitRequest === null || deployCommitRequest === undefined) { + throw new RequiredError("VersionControlApi", "deployCommit", "deployCommitRequest"); + } + + + // Path Params + const localVarPath = '/api/rest/2.0/vcs/git/commits/deploy'; + + // Make Request Context + const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.POST); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.25.0") + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.25.0") + + + + + // Body Params + const contentType = ObjectSerializer.getPreferredMediaType([ + "application/json" + ]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = ObjectSerializer.stringify( + ObjectSerializer.serialize(deployCommitRequest, "DeployCommitRequest", ""), + contentType + ); + requestContext.setBody(serializedBody); + + let authMethod: SecurityAuthentication | undefined; + // Apply auth methods + authMethod = _config.authMethods["bearerAuth"] + if (authMethod?.applySecurityAuthentication) { + await authMethod?.applySecurityAuthentication(requestContext); + } + + const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default + if (defaultAuth?.applySecurityAuthentication) { + await defaultAuth?.applySecurityAuthentication(requestContext); + } + + return requestContext; + } + + /** + * Version: 9.2.0.cl or later Reverts TML objects to a previous commit specified in the API request. Requires at least edit access to objects. In the API request, specify the `commit_id`. If the branch name is not specified in the request, the API will consider the default branch configured on your instance. By default, the API reverts all objects. If the revert operation fails for one of the objects provided in the commit, the API returns an error and does not revert any object. For more information, see [Git integration documentation](https://developers.thoughtspot.com/docs/git-integration). + * @param commitId Commit id to which the object should be reverted + * @param revertCommitRequest + */ + public async revertCommit(commitId: string, revertCommitRequest: RevertCommitRequest, _options?: Configuration): Promise { + let _config = _options || this.configuration; + + // verify required parameter 'commitId' is not null or undefined + if (commitId === null || commitId === undefined) { + throw new RequiredError("VersionControlApi", "revertCommit", "commitId"); + } + + + // verify required parameter 'revertCommitRequest' is not null or undefined + if (revertCommitRequest === null || revertCommitRequest === undefined) { + throw new RequiredError("VersionControlApi", "revertCommit", "revertCommitRequest"); + } + + + // Path Params + const localVarPath = '/api/rest/2.0/vcs/git/commits/{commit_id}/revert' + .replace('{' + 'commit_id' + '}', encodeURIComponent(String(commitId))); + + // Make Request Context + const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.POST); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.25.0") + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.25.0") + + + + + // Body Params + const contentType = ObjectSerializer.getPreferredMediaType([ + "application/json" + ]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = ObjectSerializer.stringify( + ObjectSerializer.serialize(revertCommitRequest, "RevertCommitRequest", ""), + contentType + ); + requestContext.setBody(serializedBody); + + let authMethod: SecurityAuthentication | undefined; + // Apply auth methods + authMethod = _config.authMethods["bearerAuth"] + if (authMethod?.applySecurityAuthentication) { + await authMethod?.applySecurityAuthentication(requestContext); + } + + const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default + if (defaultAuth?.applySecurityAuthentication) { + await defaultAuth?.applySecurityAuthentication(requestContext); + } + + return requestContext; + } + + /** + * Version: 9.2.0.cl or later Gets a list of commits for a given metadata object. Requires `DATAMANAGEMENT` (**Can manage data**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance on your instance, the `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` (**Can manage data models**) privilege and edit access to the metadata objects. + * @param searchCommitsRequest + */ + public async searchCommits(searchCommitsRequest: SearchCommitsRequest, _options?: Configuration): Promise { + let _config = _options || this.configuration; + + // verify required parameter 'searchCommitsRequest' is not null or undefined + if (searchCommitsRequest === null || searchCommitsRequest === undefined) { + throw new RequiredError("VersionControlApi", "searchCommits", "searchCommitsRequest"); + } + + + // Path Params + const localVarPath = '/api/rest/2.0/vcs/git/commits/search'; + + // Make Request Context + const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.POST); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.25.0") + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.25.0") + + + + + // Body Params + const contentType = ObjectSerializer.getPreferredMediaType([ + "application/json" + ]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = ObjectSerializer.stringify( + ObjectSerializer.serialize(searchCommitsRequest, "SearchCommitsRequest", ""), + contentType + ); + requestContext.setBody(serializedBody); + + let authMethod: SecurityAuthentication | undefined; + // Apply auth methods + authMethod = _config.authMethods["bearerAuth"] + if (authMethod?.applySecurityAuthentication) { + await authMethod?.applySecurityAuthentication(requestContext); + } + + const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default + if (defaultAuth?.applySecurityAuthentication) { + await defaultAuth?.applySecurityAuthentication(requestContext); + } + + return requestContext; + } + + /** + * Version: 9.2.0.cl or later Gets Git repository connections configured on the ThoughtSpot instance. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance on your instance, the `CAN_SETUP_VERSION_CONTROL` (**Can set up version control**) privilege. + * @param searchConfigRequest + */ + public async searchConfig(searchConfigRequest: SearchConfigRequest, _options?: Configuration): Promise { + let _config = _options || this.configuration; + + // verify required parameter 'searchConfigRequest' is not null or undefined + if (searchConfigRequest === null || searchConfigRequest === undefined) { + throw new RequiredError("VersionControlApi", "searchConfig", "searchConfigRequest"); + } + + + // Path Params + const localVarPath = '/api/rest/2.0/vcs/git/config/search'; + + // Make Request Context + const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.POST); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.25.0") + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.25.0") + + + + + // Body Params + const contentType = ObjectSerializer.getPreferredMediaType([ + "application/json" + ]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = ObjectSerializer.stringify( + ObjectSerializer.serialize(searchConfigRequest, "SearchConfigRequest", ""), + contentType + ); + requestContext.setBody(serializedBody); + + let authMethod: SecurityAuthentication | undefined; + // Apply auth methods + authMethod = _config.authMethods["bearerAuth"] + if (authMethod?.applySecurityAuthentication) { + await authMethod?.applySecurityAuthentication(requestContext); + } + + const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default + if (defaultAuth?.applySecurityAuthentication) { + await defaultAuth?.applySecurityAuthentication(requestContext); + } + + return requestContext; + } + + /** + * Version: 9.2.0.cl or later Updates Git repository configuration settings. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance on your instance, the `CAN_SETUP_VERSION_CONTROL` (**Can set up version control**) privilege. + * @param updateConfigRequest + */ + public async updateConfig(updateConfigRequest: UpdateConfigRequest, _options?: Configuration): Promise { + let _config = _options || this.configuration; + + // verify required parameter 'updateConfigRequest' is not null or undefined + if (updateConfigRequest === null || updateConfigRequest === undefined) { + throw new RequiredError("VersionControlApi", "updateConfig", "updateConfigRequest"); + } + + + // Path Params + const localVarPath = '/api/rest/2.0/vcs/git/config/update'; + + // Make Request Context + const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.POST); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.25.0") + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.25.0") + + + + + // Body Params + const contentType = ObjectSerializer.getPreferredMediaType([ + "application/json" + ]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = ObjectSerializer.stringify( + ObjectSerializer.serialize(updateConfigRequest, "UpdateConfigRequest", ""), + contentType + ); + requestContext.setBody(serializedBody); + + let authMethod: SecurityAuthentication | undefined; + // Apply auth methods + authMethod = _config.authMethods["bearerAuth"] + if (authMethod?.applySecurityAuthentication) { + await authMethod?.applySecurityAuthentication(requestContext); + } + + const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default + if (defaultAuth?.applySecurityAuthentication) { + await defaultAuth?.applySecurityAuthentication(requestContext); + } + + return requestContext; + } + + /** + * Version: 9.2.0.cl or later Validates the content of your source branch against the objects in your destination environment. Before merging content from your source branch to the destination branch, run this API operation from your destination environment and ensure that the changes from the source branch function in the destination environment. Requires `DATAMANAGEMENT` (**Can manage data**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance on your instance, the `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` (**Can manage data models**) privilege and edit access to the metadata objects. + * @param validateMergeRequest + */ + public async validateMerge(validateMergeRequest: ValidateMergeRequest, _options?: Configuration): Promise { + let _config = _options || this.configuration; + + // verify required parameter 'validateMergeRequest' is not null or undefined + if (validateMergeRequest === null || validateMergeRequest === undefined) { + throw new RequiredError("VersionControlApi", "validateMerge", "validateMergeRequest"); + } + + + // Path Params + const localVarPath = '/api/rest/2.0/vcs/git/branches/validate'; + + // Make Request Context + const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.POST); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.25.0") + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.25.0") + + + + + // Body Params + const contentType = ObjectSerializer.getPreferredMediaType([ + "application/json" + ]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = ObjectSerializer.stringify( + ObjectSerializer.serialize(validateMergeRequest, "ValidateMergeRequest", ""), + contentType + ); + requestContext.setBody(serializedBody); + + let authMethod: SecurityAuthentication | undefined; + // Apply auth methods + authMethod = _config.authMethods["bearerAuth"] + if (authMethod?.applySecurityAuthentication) { + await authMethod?.applySecurityAuthentication(requestContext); + } + + const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default + if (defaultAuth?.applySecurityAuthentication) { + await defaultAuth?.applySecurityAuthentication(requestContext); + } + + return requestContext; + } + +} + +export class VersionControlApiResponseProcessor { + + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to commitBranch + * @throws ApiException if the response code was not in [200, 299] + */ + public async commitBranch(response: ResponseContext): Promise { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("200", response.httpStatusCode)) { + const body: CommitResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "CommitResponse", "" + ) as CommitResponse; + return body; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Invalid request.", body, response.headers); + } + if (isCodeInRange("401", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Unexpected error", body, response.headers); + } + + // Work around for missing responses in specification, e.g. for petstore.yaml + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body: CommitResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "CommitResponse", "" + ) as CommitResponse; + return body; + } + + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", await response.getBodyAsAny(), response.headers); + } + + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to createConfig + * @throws ApiException if the response code was not in [200, 299] + */ + public async createConfig(response: ResponseContext): Promise { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("200", response.httpStatusCode)) { + const body: RepoConfigObject = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "RepoConfigObject", "" + ) as RepoConfigObject; + return body; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Invalid request.", body, response.headers); + } + if (isCodeInRange("401", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Unexpected error", body, response.headers); + } + + // Work around for missing responses in specification, e.g. for petstore.yaml + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body: RepoConfigObject = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "RepoConfigObject", "" + ) as RepoConfigObject; + return body; + } + + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", await response.getBodyAsAny(), response.headers); + } + + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to deleteConfig + * @throws ApiException if the response code was not in [200, 299] + */ + public async deleteConfig(response: ResponseContext): Promise { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("204", response.httpStatusCode)) { + return; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Invalid request.", body, response.headers); + } + if (isCodeInRange("401", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Unexpected error", body, response.headers); + } + + // Work around for missing responses in specification, e.g. for petstore.yaml + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body: void = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "void", "" + ) as void; + return body; + } + + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", await response.getBodyAsAny(), response.headers); + } + + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to deployCommit + * @throws ApiException if the response code was not in [200, 299] + */ + public async deployCommit(response: ResponseContext): Promise > { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("200", response.httpStatusCode)) { + const body: Array = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "Array", "" + ) as Array; + return body; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Invalid request.", body, response.headers); + } + if (isCodeInRange("401", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Unexpected error", body, response.headers); + } + + // Work around for missing responses in specification, e.g. for petstore.yaml + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body: Array = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "Array", "" + ) as Array; + return body; + } + + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", await response.getBodyAsAny(), response.headers); + } + + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to revertCommit + * @throws ApiException if the response code was not in [200, 299] + */ + public async revertCommit(response: ResponseContext): Promise { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("200", response.httpStatusCode)) { + const body: RevertResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "RevertResponse", "" + ) as RevertResponse; + return body; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Invalid request.", body, response.headers); + } + if (isCodeInRange("401", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Unexpected error", body, response.headers); + } + + // Work around for missing responses in specification, e.g. for petstore.yaml + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body: RevertResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "RevertResponse", "" + ) as RevertResponse; + return body; + } + + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", await response.getBodyAsAny(), response.headers); + } + + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to searchCommits + * @throws ApiException if the response code was not in [200, 299] + */ + public async searchCommits(response: ResponseContext): Promise > { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("200", response.httpStatusCode)) { + const body: Array = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "Array", "" + ) as Array; + return body; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Invalid request.", body, response.headers); + } + if (isCodeInRange("401", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Unexpected error", body, response.headers); + } + + // Work around for missing responses in specification, e.g. for petstore.yaml + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body: Array = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "Array", "" + ) as Array; + return body; + } + + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", await response.getBodyAsAny(), response.headers); + } + + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to searchConfig + * @throws ApiException if the response code was not in [200, 299] + */ + public async searchConfig(response: ResponseContext): Promise > { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("200", response.httpStatusCode)) { + const body: Array = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "Array", "" + ) as Array; + return body; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Invalid request.", body, response.headers); + } + if (isCodeInRange("401", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Unexpected error", body, response.headers); + } + + // Work around for missing responses in specification, e.g. for petstore.yaml + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body: Array = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "Array", "" + ) as Array; + return body; + } + + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", await response.getBodyAsAny(), response.headers); + } + + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to updateConfig + * @throws ApiException if the response code was not in [200, 299] + */ + public async updateConfig(response: ResponseContext): Promise { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("200", response.httpStatusCode)) { + const body: RepoConfigObject = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "RepoConfigObject", "" + ) as RepoConfigObject; + return body; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Invalid request.", body, response.headers); + } + if (isCodeInRange("401", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Unexpected error", body, response.headers); + } + + // Work around for missing responses in specification, e.g. for petstore.yaml + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body: RepoConfigObject = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "RepoConfigObject", "" + ) as RepoConfigObject; + return body; + } + + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", await response.getBodyAsAny(), response.headers); + } + + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to validateMerge + * @throws ApiException if the response code was not in [200, 299] + */ + public async validateMerge(response: ResponseContext): Promise > { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("200", response.httpStatusCode)) { + const body: Array = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "Array", "" + ) as Array; + return body; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Invalid request.", body, response.headers); + } + if (isCodeInRange("401", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Unexpected error", body, response.headers); + } + + // Work around for missing responses in specification, e.g. for petstore.yaml + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body: Array = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "Array", "" + ) as Array; + return body; + } + + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", await response.getBodyAsAny(), response.headers); + } + +} diff --git a/sdks/typescript/apis/WebhooksApi.ts b/sdks/typescript/apis/WebhooksApi.ts new file mode 100644 index 000000000..d833aed61 --- /dev/null +++ b/sdks/typescript/apis/WebhooksApi.ts @@ -0,0 +1,465 @@ +// TODO: better import syntax? +import {BaseAPIRequestFactory, RequiredError, COLLECTION_FORMATS} from './baseapi'; +import {Configuration} from '../configuration'; +import {RequestContext, HttpMethod, ResponseContext, HttpFile} from '../http/http'; +import {ObjectSerializer} from '../models/ObjectSerializer'; +import {ApiException} from './exception'; +import {canConsumeForm, isCodeInRange} from '../util'; +import {SecurityAuthentication} from '../auth/auth'; + + +import { CreateWebhookConfigurationRequest } from '../models/CreateWebhookConfigurationRequest'; +import { DeleteWebhookConfigurationsRequest } from '../models/DeleteWebhookConfigurationsRequest'; +import { ErrorResponse } from '../models/ErrorResponse'; +import { SearchWebhookConfigurationsRequest } from '../models/SearchWebhookConfigurationsRequest'; +import { UpdateWebhookConfigurationRequest } from '../models/UpdateWebhookConfigurationRequest'; +import { WebhookDeleteResponse } from '../models/WebhookDeleteResponse'; +import { WebhookResponse } from '../models/WebhookResponse'; +import { WebhookSearchResponse } from '../models/WebhookSearchResponse'; + +/** + * no description + */ +export class WebhooksApiRequestFactory extends BaseAPIRequestFactory { + + /** + * Version: 10.14.0.cl or later Creates a new webhook configuration to receive notifications for specified events. The webhook will be triggered when the configured events occur in the system. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) or `DEVELOPER` (**Has developer privilege**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, users with `CAN_MANAGE_WEBHOOKS` (**Can manage webhooks**) privilege are also authorized to perform this action. + * @param createWebhookConfigurationRequest + */ + public async createWebhookConfiguration(createWebhookConfigurationRequest: CreateWebhookConfigurationRequest, _options?: Configuration): Promise { + let _config = _options || this.configuration; + + // verify required parameter 'createWebhookConfigurationRequest' is not null or undefined + if (createWebhookConfigurationRequest === null || createWebhookConfigurationRequest === undefined) { + throw new RequiredError("WebhooksApi", "createWebhookConfiguration", "createWebhookConfigurationRequest"); + } + + + // Path Params + const localVarPath = '/api/rest/2.0/webhooks/create'; + + // Make Request Context + const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.POST); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.25.0") + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.25.0") + + + + + // Body Params + const contentType = ObjectSerializer.getPreferredMediaType([ + "application/json" + ]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = ObjectSerializer.stringify( + ObjectSerializer.serialize(createWebhookConfigurationRequest, "CreateWebhookConfigurationRequest", ""), + contentType + ); + requestContext.setBody(serializedBody); + + let authMethod: SecurityAuthentication | undefined; + // Apply auth methods + authMethod = _config.authMethods["bearerAuth"] + if (authMethod?.applySecurityAuthentication) { + await authMethod?.applySecurityAuthentication(requestContext); + } + + const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default + if (defaultAuth?.applySecurityAuthentication) { + await defaultAuth?.applySecurityAuthentication(requestContext); + } + + return requestContext; + } + + /** + * Version: 10.14.0.cl or later Deletes one or more webhook configurations by their unique id or name. Returns status of each deletion operation, including successfully deleted webhooks and any failures with error details. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) or `DEVELOPER` (**Has developer privilege**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, users with `CAN_MANAGE_WEBHOOKS` (**Can manage webhooks**) privilege are also authorized to perform this action. + * @param deleteWebhookConfigurationsRequest + */ + public async deleteWebhookConfigurations(deleteWebhookConfigurationsRequest: DeleteWebhookConfigurationsRequest, _options?: Configuration): Promise { + let _config = _options || this.configuration; + + // verify required parameter 'deleteWebhookConfigurationsRequest' is not null or undefined + if (deleteWebhookConfigurationsRequest === null || deleteWebhookConfigurationsRequest === undefined) { + throw new RequiredError("WebhooksApi", "deleteWebhookConfigurations", "deleteWebhookConfigurationsRequest"); + } + + + // Path Params + const localVarPath = '/api/rest/2.0/webhooks/delete'; + + // Make Request Context + const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.POST); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.25.0") + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.25.0") + + + + + // Body Params + const contentType = ObjectSerializer.getPreferredMediaType([ + "application/json" + ]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = ObjectSerializer.stringify( + ObjectSerializer.serialize(deleteWebhookConfigurationsRequest, "DeleteWebhookConfigurationsRequest", ""), + contentType + ); + requestContext.setBody(serializedBody); + + let authMethod: SecurityAuthentication | undefined; + // Apply auth methods + authMethod = _config.authMethods["bearerAuth"] + if (authMethod?.applySecurityAuthentication) { + await authMethod?.applySecurityAuthentication(requestContext); + } + + const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default + if (defaultAuth?.applySecurityAuthentication) { + await defaultAuth?.applySecurityAuthentication(requestContext); + } + + return requestContext; + } + + /** + * Version: 10.14.0.cl or later Searches for webhook configurations based on various criteria such as Org, webhook identifier, event type, with support for pagination and sorting. Returns matching webhook configurations with their complete details. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) or `DEVELOPER` (**Has developer privilege**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, users with `CAN_MANAGE_WEBHOOKS` (**Can manage webhooks**) privilege are also authorized to perform this action. + * @param searchWebhookConfigurationsRequest + */ + public async searchWebhookConfigurations(searchWebhookConfigurationsRequest: SearchWebhookConfigurationsRequest, _options?: Configuration): Promise { + let _config = _options || this.configuration; + + // verify required parameter 'searchWebhookConfigurationsRequest' is not null or undefined + if (searchWebhookConfigurationsRequest === null || searchWebhookConfigurationsRequest === undefined) { + throw new RequiredError("WebhooksApi", "searchWebhookConfigurations", "searchWebhookConfigurationsRequest"); + } + + + // Path Params + const localVarPath = '/api/rest/2.0/webhooks/search'; + + // Make Request Context + const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.POST); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.25.0") + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.25.0") + + + + + // Body Params + const contentType = ObjectSerializer.getPreferredMediaType([ + "application/json" + ]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = ObjectSerializer.stringify( + ObjectSerializer.serialize(searchWebhookConfigurationsRequest, "SearchWebhookConfigurationsRequest", ""), + contentType + ); + requestContext.setBody(serializedBody); + + let authMethod: SecurityAuthentication | undefined; + // Apply auth methods + authMethod = _config.authMethods["bearerAuth"] + if (authMethod?.applySecurityAuthentication) { + await authMethod?.applySecurityAuthentication(requestContext); + } + + const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default + if (defaultAuth?.applySecurityAuthentication) { + await defaultAuth?.applySecurityAuthentication(requestContext); + } + + return requestContext; + } + + /** + * Version: 10.14.0.cl or later Updates an existing webhook configuration by its unique id or name. Only the provided fields will be updated. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) or `DEVELOPER` (**Has developer privilege**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, users with `CAN_MANAGE_WEBHOOKS` (**Can manage webhooks**) privilege are also authorized to perform this action. + * @param webhookIdentifier Unique ID or name of the webhook configuration. + * @param updateWebhookConfigurationRequest + */ + public async updateWebhookConfiguration(webhookIdentifier: string, updateWebhookConfigurationRequest: UpdateWebhookConfigurationRequest, _options?: Configuration): Promise { + let _config = _options || this.configuration; + + // verify required parameter 'webhookIdentifier' is not null or undefined + if (webhookIdentifier === null || webhookIdentifier === undefined) { + throw new RequiredError("WebhooksApi", "updateWebhookConfiguration", "webhookIdentifier"); + } + + + // verify required parameter 'updateWebhookConfigurationRequest' is not null or undefined + if (updateWebhookConfigurationRequest === null || updateWebhookConfigurationRequest === undefined) { + throw new RequiredError("WebhooksApi", "updateWebhookConfiguration", "updateWebhookConfigurationRequest"); + } + + + // Path Params + const localVarPath = '/api/rest/2.0/webhooks/{webhook_identifier}/update' + .replace('{' + 'webhook_identifier' + '}', encodeURIComponent(String(webhookIdentifier))); + + // Make Request Context + const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.POST); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.25.0") + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.25.0") + + + + + // Body Params + const contentType = ObjectSerializer.getPreferredMediaType([ + "application/json" + ]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = ObjectSerializer.stringify( + ObjectSerializer.serialize(updateWebhookConfigurationRequest, "UpdateWebhookConfigurationRequest", ""), + contentType + ); + requestContext.setBody(serializedBody); + + let authMethod: SecurityAuthentication | undefined; + // Apply auth methods + authMethod = _config.authMethods["bearerAuth"] + if (authMethod?.applySecurityAuthentication) { + await authMethod?.applySecurityAuthentication(requestContext); + } + + const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default + if (defaultAuth?.applySecurityAuthentication) { + await defaultAuth?.applySecurityAuthentication(requestContext); + } + + return requestContext; + } + +} + +export class WebhooksApiResponseProcessor { + + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to createWebhookConfiguration + * @throws ApiException if the response code was not in [200, 299] + */ + public async createWebhookConfiguration(response: ResponseContext): Promise { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("200", response.httpStatusCode)) { + const body: WebhookResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "WebhookResponse", "" + ) as WebhookResponse; + return body; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Invalid request.", body, response.headers); + } + if (isCodeInRange("401", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Unexpected error", body, response.headers); + } + + // Work around for missing responses in specification, e.g. for petstore.yaml + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body: WebhookResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "WebhookResponse", "" + ) as WebhookResponse; + return body; + } + + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", await response.getBodyAsAny(), response.headers); + } + + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to deleteWebhookConfigurations + * @throws ApiException if the response code was not in [200, 299] + */ + public async deleteWebhookConfigurations(response: ResponseContext): Promise { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("200", response.httpStatusCode)) { + const body: WebhookDeleteResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "WebhookDeleteResponse", "" + ) as WebhookDeleteResponse; + return body; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Invalid request.", body, response.headers); + } + if (isCodeInRange("401", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Unexpected error", body, response.headers); + } + + // Work around for missing responses in specification, e.g. for petstore.yaml + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body: WebhookDeleteResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "WebhookDeleteResponse", "" + ) as WebhookDeleteResponse; + return body; + } + + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", await response.getBodyAsAny(), response.headers); + } + + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to searchWebhookConfigurations + * @throws ApiException if the response code was not in [200, 299] + */ + public async searchWebhookConfigurations(response: ResponseContext): Promise { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("200", response.httpStatusCode)) { + const body: WebhookSearchResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "WebhookSearchResponse", "" + ) as WebhookSearchResponse; + return body; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Invalid request.", body, response.headers); + } + if (isCodeInRange("401", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Unexpected error", body, response.headers); + } + + // Work around for missing responses in specification, e.g. for petstore.yaml + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body: WebhookSearchResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "WebhookSearchResponse", "" + ) as WebhookSearchResponse; + return body; + } + + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", await response.getBodyAsAny(), response.headers); + } + + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to updateWebhookConfiguration + * @throws ApiException if the response code was not in [200, 299] + */ + public async updateWebhookConfiguration(response: ResponseContext): Promise { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("204", response.httpStatusCode)) { + return; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Invalid request.", body, response.headers); + } + if (isCodeInRange("401", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Unexpected error", body, response.headers); + } + + // Work around for missing responses in specification, e.g. for petstore.yaml + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body: void = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "void", "" + ) as void; + return body; + } + + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", await response.getBodyAsAny(), response.headers); + } + +} diff --git a/sdks/typescript/apis/baseapi.ts b/sdks/typescript/apis/baseapi.ts new file mode 100644 index 000000000..ce1e2dbc4 --- /dev/null +++ b/sdks/typescript/apis/baseapi.ts @@ -0,0 +1,37 @@ +import { Configuration } from '../configuration' + +/** + * + * @export + */ +export const COLLECTION_FORMATS = { + csv: ",", + ssv: " ", + tsv: "\t", + pipes: "|", +}; + + +/** + * + * @export + * @class BaseAPI + */ +export class BaseAPIRequestFactory { + + constructor(protected configuration: Configuration) { + } +}; + +/** + * + * @export + * @class RequiredError + * @extends {Error} + */ +export class RequiredError extends Error { + name: "RequiredError" = "RequiredError"; + constructor(public api: string, public method: string, public field: string) { + super("Required parameter " + field + " was null or undefined when calling " + api + "." + method + "."); + } +} diff --git a/sdks/typescript/apis/exception.ts b/sdks/typescript/apis/exception.ts new file mode 100644 index 000000000..9365d33a8 --- /dev/null +++ b/sdks/typescript/apis/exception.ts @@ -0,0 +1,15 @@ +/** + * Represents an error caused by an api call i.e. it has attributes for a HTTP status code + * and the returned body object. + * + * Example + * API returns a ErrorMessageObject whenever HTTP status code is not in [200, 299] + * => ApiException(404, someErrorMessageObject) + * + */ +export class ApiException extends Error { + public constructor(public code: number, message: string, public body: T, public headers: { [key: string]: string; }) { + super("HTTP-Code: " + code + "\nMessage: " + message + "\nBody: " + JSON.stringify(body) + "\nHeaders: " + + JSON.stringify(headers)) + } +} diff --git a/sdks/typescript/auth/auth.ts b/sdks/typescript/auth/auth.ts new file mode 100644 index 000000000..72366e802 --- /dev/null +++ b/sdks/typescript/auth/auth.ts @@ -0,0 +1,79 @@ +import { RequestContext } from "../http/http"; + +/** + * Interface authentication schemes. + */ +export interface SecurityAuthentication { + /* + * @return returns the name of the security authentication as specified in OAI + */ + getName(): string; + + /** + * Applies the authentication scheme to the request context + * + * @params context the request context which should use this authentication scheme + */ + applySecurityAuthentication(context: RequestContext): void | Promise; +} + +export interface TokenProvider { + getToken(): Promise | string; +} + +/** + * Applies http authentication to the request context. + */ +export class BearerAuthAuthentication implements SecurityAuthentication { + /** + * Configures the http authentication with the required details. + * + * @param tokenProvider service that can provide the up-to-date token when needed + */ + public constructor(private tokenProvider: TokenProvider) {} + + public getName(): string { + return "bearerAuth"; + } + + public async applySecurityAuthentication(context: RequestContext) { + context.setHeaderParam("Authorization", "Bearer " + await this.tokenProvider.getToken()); + } +} + + +export type AuthMethods = { + "default"?: SecurityAuthentication, + "bearerAuth"?: SecurityAuthentication +} + +export type ApiKeyConfiguration = string; +export type HttpBasicConfiguration = { "username": string, "password": string }; +export type HttpBearerConfiguration = { tokenProvider: TokenProvider }; +export type OAuth2Configuration = { accessToken: string }; + +export type AuthMethodsConfiguration = { + "default"?: SecurityAuthentication, + "bearerAuth"?: HttpBearerConfiguration +} + +/** + * Creates the authentication methods from a swagger description. + * + */ +export function configureAuthMethods(config: AuthMethodsConfiguration | undefined): AuthMethods { + let authMethods: AuthMethods = {} + + if (!config) { + return authMethods; + } + authMethods["default"] = config["default"] + + if (config["bearerAuth"]) { + authMethods["bearerAuth"] = new BearerAuthAuthentication( + config["bearerAuth"]["tokenProvider"] + ); + } + + return authMethods; +} \ No newline at end of file diff --git a/sdks/typescript/configuration.ts b/sdks/typescript/configuration.ts new file mode 100644 index 000000000..7acb56e66 --- /dev/null +++ b/sdks/typescript/configuration.ts @@ -0,0 +1,82 @@ +import { HttpLibrary } from "./http/http"; +import { Middleware, PromiseMiddleware, PromiseMiddlewareWrapper } from "./middleware"; +import { IsomorphicFetchHttpLibrary as DefaultHttpLibrary } from "./http/isomorphic-fetch"; +import { BaseServerConfiguration, server1 } from "./servers"; +import { configureAuthMethods, AuthMethods, AuthMethodsConfiguration } from "./auth/auth"; + +export interface Configuration { + readonly baseServer: BaseServerConfiguration; + readonly httpApi: HttpLibrary; + readonly middleware: Middleware[]; + readonly authMethods: AuthMethods; +} + + +/** + * Interface with which a configuration object can be configured. + */ +export interface ConfigurationParameters { + /** + * Default server to use - a list of available servers (according to the + * OpenAPI yaml definition) is included in the `servers` const in `./servers`. You can also + * create your own server with the `ServerConfiguration` class from the same + * file. + */ + baseServer?: BaseServerConfiguration; + /** + * HTTP library to use e.g. IsomorphicFetch. This can usually be skipped as + * all generators come with a default library. + * If available, additional libraries can be imported from `./http/*` + */ + httpApi?: HttpLibrary; + + /** + * The middlewares which will be applied to requests and responses. You can + * add any number of middleware components to modify requests before they + * are sent or before they are deserialized by implementing the `Middleware` + * interface defined in `./middleware` + */ + middleware?: Middleware[]; + /** + * Configures middleware functions that return promises instead of + * Observables (which are used by `middleware`). Otherwise allows for the + * same functionality as `middleware`, i.e., modifying requests before they + * are sent and before they are deserialized. + */ + promiseMiddleware?: PromiseMiddleware[]; + /** + * Configuration for the available authentication methods (e.g., api keys) + * according to the OpenAPI yaml definition. For the definition, please refer to + * `./auth/auth` + */ + authMethods?: AuthMethodsConfiguration +} + +/** + * Provide your `ConfigurationParameters` to this function to get a `Configuration` + * object that can be used to configure your APIs (in the constructor or + * for each request individually). + * + * If a property is not included in conf, a default is used: + * - baseServer: server1 + * - httpApi: IsomorphicFetchHttpLibrary + * - middleware: [] + * - promiseMiddleware: [] + * - authMethods: {} + * + * @param conf partial configuration + */ +export function createConfiguration(conf: ConfigurationParameters = {}): Configuration { + const configuration: Configuration = { + baseServer: conf.baseServer !== undefined ? conf.baseServer : server1, + httpApi: conf.httpApi || new DefaultHttpLibrary(), + middleware: conf.middleware || [], + authMethods: configureAuthMethods(conf.authMethods) + }; + if (conf.promiseMiddleware) { + conf.promiseMiddleware.forEach( + m => configuration.middleware.push(new PromiseMiddlewareWrapper(m)) + ); + } + return configuration; +} \ No newline at end of file diff --git a/sdks/typescript/dist/index.cjs b/sdks/typescript/dist/index.cjs new file mode 100644 index 000000000..a2816cc39 --- /dev/null +++ b/sdks/typescript/dist/index.cjs @@ -0,0 +1,59760 @@ +"use strict"; +var __defProp = Object.defineProperty; +var __getOwnPropDesc = Object.getOwnPropertyDescriptor; +var __getOwnPropNames = Object.getOwnPropertyNames; +var __hasOwnProp = Object.prototype.hasOwnProperty; +var __export = (target, all) => { + for (var name in all) + __defProp(target, name, { get: all[name], enumerable: true }); +}; +var __copyProps = (to, from2, except, desc) => { + if (from2 && typeof from2 === "object" || typeof from2 === "function") { + for (let key of __getOwnPropNames(from2)) + if (!__hasOwnProp.call(to, key) && key !== except) + __defProp(to, key, { get: () => from2[key], enumerable: !(desc = __getOwnPropDesc(from2, key)) || desc.enumerable }); + } + return to; +}; +var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); +var __async = (__this, __arguments, generator) => { + return new Promise((resolve, reject) => { + var fulfilled = (value) => { + try { + step(generator.next(value)); + } catch (e) { + reject(e); + } + }; + var rejected = (value) => { + try { + step(generator.throw(value)); + } catch (e) { + reject(e); + } + }; + var step = (x) => x.done ? resolve(x.value) : Promise.resolve(x.value).then(fulfilled, rejected); + step((generator = generator.apply(__this, __arguments)).next()); + }); +}; + +// index.ts +var typescript_exports = {}; +__export(typescript_exports, { + AIApi: () => PromiseAIApi, + AIContext: () => AIContext, + APIKey: () => APIKey, + APIKeyInput: () => APIKeyInput, + AccessToken: () => AccessToken, + ActionConfig: () => ActionConfig, + ActionConfigInput: () => ActionConfigInput, + ActionConfigInputCreate: () => ActionConfigInputCreate, + ActionDetails: () => ActionDetails, + ActionDetailsInput: () => ActionDetailsInput, + ActionDetailsInputCreate: () => ActionDetailsInputCreate, + ActivateUserRequest: () => ActivateUserRequest, + AgentConversation: () => AgentConversation, + AnswerContent: () => AnswerContent, + AnswerDataResponse: () => AnswerDataResponse, + AnswerPngOptionsInput: () => AnswerPngOptionsInput, + ApiException: () => ApiException, + AssignChangeAuthorRequest: () => AssignChangeAuthorRequest, + AssignTagRequest: () => AssignTagRequest, + AssociateMetadataInput: () => AssociateMetadataInput, + AssociateMetadataInputCreate: () => AssociateMetadataInputCreate, + AuthClusterPreferences: () => AuthClusterPreferences, + AuthClusterPreferencesInput: () => AuthClusterPreferencesInput, + AuthOrgInfo: () => AuthOrgInfo, + AuthOrgPreference: () => AuthOrgPreference, + AuthOrgPreferenceInput: () => AuthOrgPreferenceInput, + AuthSettingsAccessToken: () => AuthSettingsAccessToken, + Authentication: () => Authentication, + AuthenticationApi: () => PromiseAuthenticationApi, + AuthenticationInput: () => AuthenticationInput, + Author: () => Author, + AuthorMetadataTypeInput: () => AuthorMetadataTypeInput, + AuthorType: () => AuthorType, + AwsS3Config: () => AwsS3Config, + AwsS3ConfigInput: () => AwsS3ConfigInput, + BasicAuth: () => BasicAuth, + BasicAuthInput: () => BasicAuthInput, + BearerAuthAuthentication: () => BearerAuthAuthentication, + CALLBACK: () => CALLBACK, + CALLBACKInput: () => CALLBACKInput, + CALLBACKInputMandatory: () => CALLBACKInputMandatory, + CalendarResponse: () => CalendarResponse, + ChangeUserPasswordRequest: () => ChangeUserPasswordRequest, + ChannelHistoryEventInfo: () => ChannelHistoryEventInfo, + ChannelHistoryEventInput: () => ChannelHistoryEventInput, + ChannelHistoryJob: () => ChannelHistoryJob, + ChannelValidationAwsS3Info: () => ChannelValidationAwsS3Info, + ChannelValidationDetail: () => ChannelValidationDetail, + ClusterNonEmbedAccess: () => ClusterNonEmbedAccess, + ClusterNonEmbedAccessInput: () => ClusterNonEmbedAccessInput, + Collection: () => Collection, + CollectionDeleteResponse: () => CollectionDeleteResponse, + CollectionDeleteTypeIdentifiers: () => CollectionDeleteTypeIdentifiers, + CollectionEntityIdentifier: () => CollectionEntityIdentifier, + CollectionMetadataInput: () => CollectionMetadataInput, + CollectionMetadataItem: () => CollectionMetadataItem, + CollectionSearchResponse: () => CollectionSearchResponse, + CollectionsApi: () => PromiseCollectionsApi, + Column: () => Column, + ColumnSecurityRule: () => ColumnSecurityRule, + ColumnSecurityRuleColumn: () => ColumnSecurityRuleColumn, + ColumnSecurityRuleGroup: () => ColumnSecurityRuleGroup, + ColumnSecurityRuleGroupOperation: () => ColumnSecurityRuleGroupOperation, + ColumnSecurityRuleResponse: () => ColumnSecurityRuleResponse, + ColumnSecurityRuleSourceTable: () => ColumnSecurityRuleSourceTable, + ColumnSecurityRuleTableInput: () => ColumnSecurityRuleTableInput, + ColumnSecurityRuleUpdate: () => ColumnSecurityRuleUpdate, + CommitBranchRequest: () => CommitBranchRequest, + CommitFileType: () => CommitFileType, + CommitHistoryResponse: () => CommitHistoryResponse, + CommitResponse: () => CommitResponse, + CommiterType: () => CommiterType, + CommunicationChannelPreferencesResponse: () => CommunicationChannelPreferencesResponse, + CommunicationChannelValidateResponse: () => CommunicationChannelValidateResponse, + ConfigureAuthSettingsRequest: () => ConfigureAuthSettingsRequest, + ConfigureAuthSettingsRequestClusterPreferences: () => ConfigureAuthSettingsRequestClusterPreferences, + ConfigureCommunicationChannelPreferencesRequest: () => ConfigureCommunicationChannelPreferencesRequest, + ConfigureSecuritySettingsRequest: () => ConfigureSecuritySettingsRequest, + ConfigureSecuritySettingsRequestClusterPreferences: () => ConfigureSecuritySettingsRequestClusterPreferences, + ConnectionConfigurationResponse: () => ConnectionConfigurationResponse, + ConnectionConfigurationSearchRequest: () => ConnectionConfigurationSearchRequest, + ConnectionConfigurationsApi: () => PromiseConnectionConfigurationsApi, + ConnectionInput: () => ConnectionInput, + ConnectionsApi: () => PromiseConnectionsApi, + ContextPayloadV2Input: () => ContextPayloadV2Input, + Conversation: () => Conversation, + ConversationSettingsInput: () => ConversationSettingsInput, + ConvertWorksheetToModelRequest: () => ConvertWorksheetToModelRequest, + CopyObjectRequest: () => CopyObjectRequest, + CreateAgentConversationRequest: () => CreateAgentConversationRequest, + CreateAgentConversationRequestConversationSettings: () => CreateAgentConversationRequestConversationSettings, + CreateAgentConversationRequestMetadataContext: () => CreateAgentConversationRequestMetadataContext, + CreateCalendarRequest: () => CreateCalendarRequest, + CreateCalendarRequestTableReference: () => CreateCalendarRequestTableReference, + CreateCollectionRequest: () => CreateCollectionRequest, + CreateConfigRequest: () => CreateConfigRequest, + CreateConnectionConfigurationRequest: () => CreateConnectionConfigurationRequest, + CreateConnectionConfigurationRequestPolicyProcessOptions: () => CreateConnectionConfigurationRequestPolicyProcessOptions, + CreateConnectionRequest: () => CreateConnectionRequest, + CreateConnectionResponse: () => CreateConnectionResponse, + CreateConversationRequest: () => CreateConversationRequest, + CreateCustomActionRequest: () => CreateCustomActionRequest, + CreateCustomActionRequestActionDetails: () => CreateCustomActionRequestActionDetails, + CreateCustomActionRequestDefaultActionConfig: () => CreateCustomActionRequestDefaultActionConfig, + CreateEmailCustomizationRequest: () => CreateEmailCustomizationRequest, + CreateEmailCustomizationRequestTemplateProperties: () => CreateEmailCustomizationRequestTemplateProperties, + CreateEmailCustomizationResponse: () => CreateEmailCustomizationResponse, + CreateOrgRequest: () => CreateOrgRequest, + CreateRoleRequest: () => CreateRoleRequest, + CreateScheduleRequest: () => CreateScheduleRequest, + CreateScheduleRequestFrequency: () => CreateScheduleRequestFrequency, + CreateScheduleRequestLiveboardOptions: () => CreateScheduleRequestLiveboardOptions, + CreateScheduleRequestPdfOptions: () => CreateScheduleRequestPdfOptions, + CreateScheduleRequestRecipientDetails: () => CreateScheduleRequestRecipientDetails, + CreateTagRequest: () => CreateTagRequest, + CreateUserGroupRequest: () => CreateUserGroupRequest, + CreateUserRequest: () => CreateUserRequest, + CreateVariableRequest: () => CreateVariableRequest, + CreateWebhookConfigurationRequest: () => CreateWebhookConfigurationRequest, + CreateWebhookConfigurationRequestAuthentication: () => CreateWebhookConfigurationRequestAuthentication, + CreateWebhookConfigurationRequestSignatureVerification: () => CreateWebhookConfigurationRequestSignatureVerification, + CreateWebhookConfigurationRequestStorageDestination: () => CreateWebhookConfigurationRequestStorageDestination, + CronExpression: () => CronExpression, + CronExpressionInput: () => CronExpressionInput, + CspSettings: () => CspSettings, + CspSettingsInput: () => CspSettingsInput, + CustomActionApi: () => PromiseCustomActionApi, + CustomActionMetadataTypeInput: () => CustomActionMetadataTypeInput, + CustomCalendarsApi: () => PromiseCustomCalendarsApi, + DBTApi: () => PromiseDBTApi, + DataApi: () => PromiseDataApi, + DataSource: () => DataSource, + DataSourceContextInput: () => DataSourceContextInput, + DataWarehouseObjectInput: () => DataWarehouseObjectInput, + DataWarehouseObjects: () => DataWarehouseObjects, + Database: () => Database, + DbtSearchResponse: () => DbtSearchResponse, + DeactivateUserRequest: () => DeactivateUserRequest, + DefaultActionConfig: () => DefaultActionConfig, + DefaultActionConfigInput: () => DefaultActionConfigInput, + DefaultActionConfigInputCreate: () => DefaultActionConfigInputCreate, + DefaultActionConfigSearchInput: () => DefaultActionConfigSearchInput, + DeleteCollectionRequest: () => DeleteCollectionRequest, + DeleteConfigRequest: () => DeleteConfigRequest, + DeleteConnectionConfigurationRequest: () => DeleteConnectionConfigurationRequest, + DeleteConnectionRequest: () => DeleteConnectionRequest, + DeleteMetadataRequest: () => DeleteMetadataRequest, + DeleteMetadataTypeInput: () => DeleteMetadataTypeInput, + DeleteOrgEmailCustomizationRequest: () => DeleteOrgEmailCustomizationRequest, + DeleteVariablesRequest: () => DeleteVariablesRequest, + DeleteWebhookConfigurationsRequest: () => DeleteWebhookConfigurationsRequest, + DeployCommitRequest: () => DeployCommitRequest, + DeployResponse: () => DeployResponse, + EmailCustomizationApi: () => PromiseEmailCustomizationApi, + EntityHeader: () => EntityHeader, + ErrorResponse: () => ErrorResponse, + EurekaDataSourceSuggestionResponse: () => EurekaDataSourceSuggestionResponse, + EurekaDecomposeQueryResponse: () => EurekaDecomposeQueryResponse, + EurekaGetNLInstructionsResponse: () => EurekaGetNLInstructionsResponse, + EurekaGetRelevantQuestionsResponse: () => EurekaGetRelevantQuestionsResponse, + EurekaLLMDecomposeQueryResponse: () => EurekaLLMDecomposeQueryResponse, + EurekaLLMSuggestedQuery: () => EurekaLLMSuggestedQuery, + EurekaRelevantQuestion: () => EurekaRelevantQuestion, + EurekaSetNLInstructionsResponse: () => EurekaSetNLInstructionsResponse, + EventChannelConfig: () => EventChannelConfig, + EventChannelConfigInput: () => EventChannelConfigInput, + ExcludeMetadataListItemInput: () => ExcludeMetadataListItemInput, + ExportAnswerReportRequest: () => ExportAnswerReportRequest, + ExportAnswerReportRequestPngOptions: () => ExportAnswerReportRequestPngOptions, + ExportAnswerReportRequestRegionalSettings: () => ExportAnswerReportRequestRegionalSettings, + ExportLiveboardReportRequest: () => ExportLiveboardReportRequest, + ExportLiveboardReportRequestPdfOptions: () => ExportLiveboardReportRequestPdfOptions, + ExportLiveboardReportRequestPngOptions: () => ExportLiveboardReportRequestPngOptions, + ExportMetadataTMLBatchedRequest: () => ExportMetadataTMLBatchedRequest, + ExportMetadataTMLRequest: () => ExportMetadataTMLRequest, + ExportMetadataTMLRequestExportOptions: () => ExportMetadataTMLRequestExportOptions, + ExportMetadataTypeInput: () => ExportMetadataTypeInput, + ExportOptions: () => ExportOptions, + ExternalTableInput: () => ExternalTableInput, + FavoriteMetadataInput: () => FavoriteMetadataInput, + FavoriteMetadataItem: () => FavoriteMetadataItem, + FavoriteObjectOptionsInput: () => FavoriteObjectOptionsInput, + FetchAnswerDataRequest: () => FetchAnswerDataRequest, + FetchAnswerSqlQueryRequest: () => FetchAnswerSqlQueryRequest, + FetchAsyncImportTaskStatusRequest: () => FetchAsyncImportTaskStatusRequest, + FetchColumnSecurityRulesRequest: () => FetchColumnSecurityRulesRequest, + FetchConnectionDiffStatusResponse: () => FetchConnectionDiffStatusResponse, + FetchLiveboardDataRequest: () => FetchLiveboardDataRequest, + FetchLiveboardSqlQueryRequest: () => FetchLiveboardSqlQueryRequest, + FetchLogsRequest: () => FetchLogsRequest, + FetchObjectPrivilegesRequest: () => FetchObjectPrivilegesRequest, + FetchPermissionsOfPrincipalsRequest: () => FetchPermissionsOfPrincipalsRequest, + FetchPermissionsOnMetadataRequest: () => FetchPermissionsOnMetadataRequest, + FilterRules: () => FilterRules, + ForceLogoutUsersRequest: () => ForceLogoutUsersRequest, + Frequency: () => Frequency, + FrequencyInput: () => FrequencyInput, + GenerateCSVRequest: () => GenerateCSVRequest, + GenericInfo: () => GenericInfo, + GetAsyncImportStatusResponse: () => GetAsyncImportStatusResponse, + GetCustomAccessTokenRequest: () => GetCustomAccessTokenRequest, + GetDataSourceSuggestionsRequest: () => GetDataSourceSuggestionsRequest, + GetFullAccessTokenRequest: () => GetFullAccessTokenRequest, + GetFullAccessTokenRequestUserParameters: () => GetFullAccessTokenRequestUserParameters, + GetNLInstructionsRequest: () => GetNLInstructionsRequest, + GetObjectAccessTokenRequest: () => GetObjectAccessTokenRequest, + GetRelevantQuestionsRequest: () => GetRelevantQuestionsRequest, + GetRelevantQuestionsRequestAiContext: () => GetRelevantQuestionsRequestAiContext, + GetRelevantQuestionsRequestMetadataContext: () => GetRelevantQuestionsRequestMetadataContext, + GetTokenResponse: () => GetTokenResponse, + GroupInfo: () => GroupInfo, + GroupObject: () => GroupObject, + GroupsApi: () => PromiseGroupsApi, + GroupsImportListInput: () => GroupsImportListInput, + HeaderAttributeInput: () => HeaderAttributeInput, + HeaderUpdateInput: () => HeaderUpdateInput, + HttpException: () => HttpException, + HttpMethod: () => HttpMethod, + ImportEPackAsyncTaskStatus: () => ImportEPackAsyncTaskStatus, + ImportMetadataTMLAsyncRequest: () => ImportMetadataTMLAsyncRequest, + ImportMetadataTMLRequest: () => ImportMetadataTMLRequest, + ImportUser: () => ImportUser, + ImportUserGroupsRequest: () => ImportUserGroupsRequest, + ImportUserGroupsResponse: () => ImportUserGroupsResponse, + ImportUserType: () => ImportUserType, + ImportUsersRequest: () => ImportUsersRequest, + ImportUsersResponse: () => ImportUsersResponse, + InputEurekaNLSRequest: () => InputEurekaNLSRequest, + IsomorphicFetchHttpLibrary: () => IsomorphicFetchHttpLibrary, + JWTMetadataObject: () => JWTMetadataObject, + JWTParameter: () => JWTParameter, + JWTUserOptions: () => JWTUserOptions, + JWTUserOptionsFull: () => JWTUserOptionsFull, + JobRecipient: () => JobRecipient, + JobsApi: () => PromiseJobsApi, + LiveboardContent: () => LiveboardContent, + LiveboardDataResponse: () => LiveboardDataResponse, + LiveboardOptions: () => LiveboardOptions, + LiveboardOptionsInput: () => LiveboardOptionsInput, + LogApi: () => PromiseLogApi, + LogResponse: () => LogResponse, + LoginRequest: () => LoginRequest, + ManageObjectPrivilegeRequest: () => ManageObjectPrivilegeRequest, + MetadataApi: () => PromiseMetadataApi, + MetadataAssociationItem: () => MetadataAssociationItem, + MetadataContext: () => MetadataContext, + MetadataInput: () => MetadataInput, + MetadataListItemInput: () => MetadataListItemInput, + MetadataObject: () => MetadataObject, + MetadataResponse: () => MetadataResponse, + MetadataSearchResponse: () => MetadataSearchResponse, + MetadataSearchSortOptions: () => MetadataSearchSortOptions, + ModelTableList: () => ModelTableList, + NLInstructionsInfo: () => NLInstructionsInfo, + NLInstructionsInfoInput: () => NLInstructionsInfoInput, + ObjectIDAndName: () => ObjectIDAndName, + ObjectPrivilegesMetadataInput: () => ObjectPrivilegesMetadataInput, + ObjectPrivilegesOfMetadataResponse: () => ObjectPrivilegesOfMetadataResponse, + Org: () => Org, + OrgChannelConfigInput: () => OrgChannelConfigInput, + OrgChannelConfigResponse: () => OrgChannelConfigResponse, + OrgDetails: () => OrgDetails, + OrgInfo: () => OrgInfo, + OrgNonEmbedAccess: () => OrgNonEmbedAccess, + OrgNonEmbedAccessInput: () => OrgNonEmbedAccessInput, + OrgPreferenceSearchCriteriaInput: () => OrgPreferenceSearchCriteriaInput, + OrgResponse: () => OrgResponse, + OrgType: () => OrgType, + OrgsApi: () => PromiseOrgsApi, + ParameterValues: () => ParameterValues, + ParameterizeMetadataFieldsRequest: () => ParameterizeMetadataFieldsRequest, + ParameterizeMetadataRequest: () => ParameterizeMetadataRequest, + ParametersListItem: () => ParametersListItem, + ParametersListItemInput: () => ParametersListItemInput, + PdfOptions: () => PdfOptions, + PdfOptionsInput: () => PdfOptionsInput, + PermissionInput: () => PermissionInput, + PermissionOfMetadataResponse: () => PermissionOfMetadataResponse, + PermissionOfPrincipalsResponse: () => PermissionOfPrincipalsResponse, + PermissionsMetadataTypeInput: () => PermissionsMetadataTypeInput, + PngOptionsInput: () => PngOptionsInput, + PolicyProcessOptions: () => PolicyProcessOptions, + PolicyProcessOptionsInput: () => PolicyProcessOptionsInput, + PrincipalsInput: () => PrincipalsInput, + PrincipalsListItem: () => PrincipalsListItem, + PrincipalsListItemInput: () => PrincipalsListItemInput, + PublishMetadataListItem: () => PublishMetadataListItem, + PublishMetadataRequest: () => PublishMetadataRequest, + PutVariableValuesRequest: () => PutVariableValuesRequest, + QueryGetDecomposedQueryRequest: () => QueryGetDecomposedQueryRequest, + QueryGetDecomposedQueryRequestNlsRequest: () => QueryGetDecomposedQueryRequestNlsRequest, + RecipientDetails: () => RecipientDetails, + RecipientDetailsInput: () => RecipientDetailsInput, + RegionalSettingsInput: () => RegionalSettingsInput, + RepoConfigObject: () => RepoConfigObject, + ReportsApi: () => PromiseReportsApi, + RequestContext: () => RequestContext2, + RequiredError: () => RequiredError, + ResetUserPasswordRequest: () => ResetUserPasswordRequest, + ResponseActivationURL: () => ResponseActivationURL, + ResponseContext: () => ResponseContext, + ResponseCopyObject: () => ResponseCopyObject, + ResponseCustomAction: () => ResponseCustomAction, + ResponseFailedEntities: () => ResponseFailedEntities, + ResponseFailedEntity: () => ResponseFailedEntity, + ResponseIncompleteEntities: () => ResponseIncompleteEntities, + ResponseIncompleteEntity: () => ResponseIncompleteEntity, + ResponseMessage: () => ResponseMessage, + ResponsePostUpgradeFailedEntities: () => ResponsePostUpgradeFailedEntities, + ResponsePostUpgradeFailedEntity: () => ResponsePostUpgradeFailedEntity, + ResponseSchedule: () => ResponseSchedule, + ResponseScheduleRun: () => ResponseScheduleRun, + ResponseSuccessfulEntities: () => ResponseSuccessfulEntities, + ResponseSuccessfulEntity: () => ResponseSuccessfulEntity, + ResponseWorksheetToModelConversion: () => ResponseWorksheetToModelConversion, + RevertCommitRequest: () => RevertCommitRequest, + RevertResponse: () => RevertResponse, + RevertedMetadata: () => RevertedMetadata, + RevokeRefreshTokensRequest: () => RevokeRefreshTokensRequest, + RevokeRefreshTokensResponse: () => RevokeRefreshTokensResponse, + RevokeTokenRequest: () => RevokeTokenRequest, + RiseGQLArgWrapper: () => RiseGQLArgWrapper, + RiseSetter: () => RiseSetter, + Role: () => Role, + RoleResponse: () => RoleResponse, + RolesApi: () => PromiseRolesApi, + RuntimeFilter: () => RuntimeFilter, + RuntimeFilters: () => RuntimeFilters, + RuntimeParamOverride: () => RuntimeParamOverride, + RuntimeParameters: () => RuntimeParameters, + RuntimeSort: () => RuntimeSort, + RuntimeSorts: () => RuntimeSorts, + ScheduleHistoryRunsOptionsInput: () => ScheduleHistoryRunsOptionsInput, + SchedulesApi: () => PromiseSchedulesApi, + SchedulesPdfOptionsInput: () => SchedulesPdfOptionsInput, + SchemaObject: () => SchemaObject, + Scope: () => Scope, + ScriptSrcUrls: () => ScriptSrcUrls, + ScriptSrcUrlsInput: () => ScriptSrcUrlsInput, + SearchAuthSettingsRequest: () => SearchAuthSettingsRequest, + SearchAuthSettingsResponse: () => SearchAuthSettingsResponse, + SearchCalendarsRequest: () => SearchCalendarsRequest, + SearchCalendarsRequestSortOptions: () => SearchCalendarsRequestSortOptions, + SearchChannelHistoryRequest: () => SearchChannelHistoryRequest, + SearchChannelHistoryResponse: () => SearchChannelHistoryResponse, + SearchCollectionsRequest: () => SearchCollectionsRequest, + SearchCollectionsRequestSortOptions: () => SearchCollectionsRequestSortOptions, + SearchCommitsRequest: () => SearchCommitsRequest, + SearchCommunicationChannelPreferencesRequest: () => SearchCommunicationChannelPreferencesRequest, + SearchConfigRequest: () => SearchConfigRequest, + SearchConnectionRequest: () => SearchConnectionRequest, + SearchConnectionRequestSortOptions: () => SearchConnectionRequestSortOptions, + SearchConnectionResponse: () => SearchConnectionResponse, + SearchCustomActionsRequest: () => SearchCustomActionsRequest, + SearchCustomActionsRequestDefaultActionConfig: () => SearchCustomActionsRequestDefaultActionConfig, + SearchDataRequest: () => SearchDataRequest, + SearchDataResponse: () => SearchDataResponse, + SearchEmailCustomizationRequest: () => SearchEmailCustomizationRequest, + SearchMetadataRequest: () => SearchMetadataRequest, + SearchMetadataRequestFavoriteObjectOptions: () => SearchMetadataRequestFavoriteObjectOptions, + SearchMetadataRequestSortOptions: () => SearchMetadataRequestSortOptions, + SearchOrgsRequest: () => SearchOrgsRequest, + SearchRoleResponse: () => SearchRoleResponse, + SearchRolesRequest: () => SearchRolesRequest, + SearchSchedulesRequest: () => SearchSchedulesRequest, + SearchSchedulesRequestHistoryRunsOptions: () => SearchSchedulesRequestHistoryRunsOptions, + SearchSchedulesRequestSortOptions: () => SearchSchedulesRequestSortOptions, + SearchSecuritySettingsRequest: () => SearchSecuritySettingsRequest, + SearchTagsRequest: () => SearchTagsRequest, + SearchUserGroupsRequest: () => SearchUserGroupsRequest, + SearchUserGroupsRequestSortOptions: () => SearchUserGroupsRequestSortOptions, + SearchUsersRequest: () => SearchUsersRequest, + SearchVariablesRequest: () => SearchVariablesRequest, + SearchWebhookConfigurationsRequest: () => SearchWebhookConfigurationsRequest, + SearchWebhookConfigurationsRequestSortOptions: () => SearchWebhookConfigurationsRequestSortOptions, + SecurityApi: () => PromiseSecurityApi, + SecuritySettingsClusterPreferences: () => SecuritySettingsClusterPreferences, + SecuritySettingsClusterPreferencesInput: () => SecuritySettingsClusterPreferencesInput, + SecuritySettingsOrgDetails: () => SecuritySettingsOrgDetails, + SecuritySettingsOrgPreferences: () => SecuritySettingsOrgPreferences, + SecuritySettingsOrgPreferencesInput: () => SecuritySettingsOrgPreferencesInput, + SecuritySettingsResponse: () => SecuritySettingsResponse, + SelfDecodingBody: () => SelfDecodingBody, + SendAgentConversationMessageRequest: () => SendAgentConversationMessageRequest, + SendAgentConversationMessageStreamingRequest: () => SendAgentConversationMessageStreamingRequest, + SendAgentMessageRequest: () => SendAgentMessageRequest, + SendAgentMessageResponse: () => SendAgentMessageResponse, + SendAgentMessageStreamingRequest: () => SendAgentMessageStreamingRequest, + SendMessageRequest: () => SendMessageRequest, + ServerConfiguration: () => ServerConfiguration, + SetNLInstructionsRequest: () => SetNLInstructionsRequest, + ShareMetadataRequest: () => ShareMetadataRequest, + ShareMetadataTypeInput: () => ShareMetadataTypeInput, + SharePermissionsInput: () => SharePermissionsInput, + SingleAnswerRequest: () => SingleAnswerRequest, + SortOption: () => SortOption, + SortOptionInput: () => SortOptionInput, + SortOptions: () => SortOptions, + SortingOptions: () => SortingOptions, + SqlQuery: () => SqlQuery, + SqlQueryResponse: () => SqlQueryResponse, + StorageConfig: () => StorageConfig, + StorageConfigInput: () => StorageConfigInput, + StorageDestination: () => StorageDestination, + StorageDestinationInput: () => StorageDestinationInput, + SyncMetadataRequest: () => SyncMetadataRequest, + SyncMetadataResponse: () => SyncMetadataResponse, + SystemApi: () => PromiseSystemApi, + SystemConfig: () => SystemConfig, + SystemInfo: () => SystemInfo, + SystemOverrideInfo: () => SystemOverrideInfo, + Table: () => Table, + Tag: () => Tag, + TagMetadataTypeInput: () => TagMetadataTypeInput, + TagsApi: () => PromiseTagsApi, + TemplatePropertiesInputCreate: () => TemplatePropertiesInputCreate, + ThoughtSpotRestApi: () => PromiseThoughtSpotRestApi, + Token: () => Token, + TokenAccessScopeObject: () => TokenAccessScopeObject, + TokenValidationResponse: () => TokenValidationResponse, + URL: () => URL2, + URLInput: () => URLInput, + URLInputMandatory: () => URLInputMandatory, + UnassignTagRequest: () => UnassignTagRequest, + UnparameterizeMetadataRequest: () => UnparameterizeMetadataRequest, + UnpublishMetadataRequest: () => UnpublishMetadataRequest, + UpdateCalendarRequest: () => UpdateCalendarRequest, + UpdateCalendarRequestTableReference: () => UpdateCalendarRequestTableReference, + UpdateCollectionRequest: () => UpdateCollectionRequest, + UpdateColumnSecurityRulesRequest: () => UpdateColumnSecurityRulesRequest, + UpdateConfigRequest: () => UpdateConfigRequest, + UpdateConnectionConfigurationRequest: () => UpdateConnectionConfigurationRequest, + UpdateConnectionRequest: () => UpdateConnectionRequest, + UpdateConnectionStatusRequest: () => UpdateConnectionStatusRequest, + UpdateConnectionV2Request: () => UpdateConnectionV2Request, + UpdateCustomActionRequest: () => UpdateCustomActionRequest, + UpdateCustomActionRequestActionDetails: () => UpdateCustomActionRequestActionDetails, + UpdateCustomActionRequestDefaultActionConfig: () => UpdateCustomActionRequestDefaultActionConfig, + UpdateEmailCustomizationRequest: () => UpdateEmailCustomizationRequest, + UpdateMetadataHeaderRequest: () => UpdateMetadataHeaderRequest, + UpdateMetadataObjIdRequest: () => UpdateMetadataObjIdRequest, + UpdateObjIdInput: () => UpdateObjIdInput, + UpdateOrgRequest: () => UpdateOrgRequest, + UpdateRoleRequest: () => UpdateRoleRequest, + UpdateScheduleRequest: () => UpdateScheduleRequest, + UpdateScheduleRequestFrequency: () => UpdateScheduleRequestFrequency, + UpdateScheduleRequestLiveboardOptions: () => UpdateScheduleRequestLiveboardOptions, + UpdateScheduleRequestPdfOptions: () => UpdateScheduleRequestPdfOptions, + UpdateScheduleRequestRecipientDetails: () => UpdateScheduleRequestRecipientDetails, + UpdateSystemConfigRequest: () => UpdateSystemConfigRequest, + UpdateTagRequest: () => UpdateTagRequest, + UpdateUserGroupRequest: () => UpdateUserGroupRequest, + UpdateUserRequest: () => UpdateUserRequest, + UpdateVariableRequest: () => UpdateVariableRequest, + UpdateVariableValuesRequest: () => UpdateVariableValuesRequest, + UpdateWebhookConfigurationRequest: () => UpdateWebhookConfigurationRequest, + User: () => User, + UserGroup: () => UserGroup, + UserGroupResponse: () => UserGroupResponse, + UserInfo: () => UserInfo, + UserObject: () => UserObject, + UserParameterOptions: () => UserParameterOptions, + UserPrincipal: () => UserPrincipal, + UsersApi: () => PromiseUsersApi, + ValidateCommunicationChannelRequest: () => ValidateCommunicationChannelRequest, + ValidateMergeRequest: () => ValidateMergeRequest, + ValidateTokenRequest: () => ValidateTokenRequest, + ValueScopeInput: () => ValueScopeInput, + Variable: () => Variable, + VariableApi: () => PromiseVariableApi, + VariableDetailInput: () => VariableDetailInput, + VariableOrgInfo: () => VariableOrgInfo, + VariablePutAssignmentInput: () => VariablePutAssignmentInput, + VariableUpdateAssignmentInput: () => VariableUpdateAssignmentInput, + VariableUpdateScopeInput: () => VariableUpdateScopeInput, + VariableValue: () => VariableValue, + VariableValues: () => VariableValues, + VersionControlApi: () => PromiseVersionControlApi, + WebhookAuthApiKey: () => WebhookAuthApiKey, + WebhookAuthApiKeyInput: () => WebhookAuthApiKeyInput, + WebhookAuthBasicAuth: () => WebhookAuthBasicAuth, + WebhookAuthBasicAuthInput: () => WebhookAuthBasicAuthInput, + WebhookAuthOAuth2: () => WebhookAuthOAuth2, + WebhookAuthOAuth2Input: () => WebhookAuthOAuth2Input, + WebhookAuthentication: () => WebhookAuthentication, + WebhookAuthenticationInput: () => WebhookAuthenticationInput, + WebhookDeleteFailure: () => WebhookDeleteFailure, + WebhookDeleteResponse: () => WebhookDeleteResponse, + WebhookKeyValuePair: () => WebhookKeyValuePair, + WebhookKeyValuePairInput: () => WebhookKeyValuePairInput, + WebhookOrg: () => WebhookOrg, + WebhookPagination: () => WebhookPagination, + WebhookResponse: () => WebhookResponse, + WebhookSearchResponse: () => WebhookSearchResponse, + WebhookSignatureVerification: () => WebhookSignatureVerification, + WebhookSignatureVerificationInput: () => WebhookSignatureVerificationInput, + WebhookSortOptionsInput: () => WebhookSortOptionsInput, + WebhookUser: () => WebhookUser, + WebhooksApi: () => PromiseWebhooksApi, + configureAuthMethods: () => configureAuthMethods, + createBasicConfig: () => createBasicConfig, + createBearerAuthenticationConfig: () => createBearerAuthenticationConfig, + createConfiguration: () => createConfiguration, + server1: () => server1, + servers: () => servers, + wrapHttpLibrary: () => wrapHttpLibrary +}); +module.exports = __toCommonJS(typescript_exports); + +// rxjsStub.ts +var Observable = class _Observable { + constructor(promise) { + this.promise = promise; + } + toPromise() { + return this.promise; + } + pipe(callback) { + return new _Observable(this.promise.then(callback)); + } +}; +function from(promise) { + return new Observable(promise); +} +function of(value) { + return new Observable(Promise.resolve(value)); +} +function mergeMap(callback) { + return (value) => callback(value).toPromise(); +} +function map(callback) { + return callback; +} + +// http/isomorphic-fetch.ts +var import_whatwg_fetch = require("whatwg-fetch"); +var IsomorphicFetchHttpLibrary = class { + send(request) { + let method = request.getHttpMethod().toString(); + let body = request.getBody(); + const resultPromise = fetch(request.getUrl(), { + method, + body, + headers: request.getHeaders(), + credentials: "include" + }).then((resp) => { + const headers = {}; + resp.headers.forEach((value, name) => { + headers[name] = value; + }); + const body2 = { + text: () => resp.text(), + binary: () => resp.blob() + }; + return new ResponseContext(resp.status, headers, body2); + }); + return from(resultPromise); + } +}; + +// http/http.ts +var HttpMethod = /* @__PURE__ */ ((HttpMethod3) => { + HttpMethod3["GET"] = "GET"; + HttpMethod3["HEAD"] = "HEAD"; + HttpMethod3["POST"] = "POST"; + HttpMethod3["PUT"] = "PUT"; + HttpMethod3["DELETE"] = "DELETE"; + HttpMethod3["CONNECT"] = "CONNECT"; + HttpMethod3["OPTIONS"] = "OPTIONS"; + HttpMethod3["TRACE"] = "TRACE"; + HttpMethod3["PATCH"] = "PATCH"; + return HttpMethod3; +})(HttpMethod || {}); +var HttpException = class extends Error { + constructor(msg) { + super(msg); + } +}; +var RequestContext2 = class { + /** + * Creates the request context using a http method and request resource url + * + * @param url url of the requested resource + * @param httpMethod http method + */ + constructor(url, httpMethod) { + this.httpMethod = httpMethod; + this.headers = {}; + this.body = void 0; + this.url = new URL(url); + } + /* + * Returns the url set in the constructor including the query string + * + */ + getUrl() { + return this.url.toString().endsWith("/") ? this.url.toString().slice(0, -1) : this.url.toString(); + } + /** + * Replaces the url set in the constructor with this url. + * + */ + setUrl(url) { + this.url = new URL(url); + } + /** + * Sets the body of the http request either as a string or FormData + * + * Note that setting a body on a HTTP GET, HEAD, DELETE, CONNECT or TRACE + * request is discouraged. + * https://httpwg.org/http-core/draft-ietf-httpbis-semantics-latest.html#rfc.section.7.3.1 + * + * @param body the body of the request + */ + setBody(body) { + this.body = body; + } + getHttpMethod() { + return this.httpMethod; + } + getHeaders() { + return this.headers; + } + getBody() { + return this.body; + } + setQueryParam(name, value) { + this.url.searchParams.set(name, value); + } + /** + * Sets a cookie with the name and value. NO check for duplicate cookies is performed + * + */ + addCookie(name, value) { + if (!this.headers["Cookie"]) { + this.headers["Cookie"] = ""; + } + this.headers["Cookie"] += name + "=" + value + "; "; + } + setHeaderParam(key, value) { + this.headers[key] = value; + } +}; +var SelfDecodingBody = class { + constructor(dataSource) { + this.dataSource = dataSource; + } + binary() { + return this.dataSource; + } + text() { + return __async(this, null, function* () { + const data = yield this.dataSource; + if (data.text) { + return data.text(); + } + return new Promise((resolve, reject) => { + const reader = new FileReader(); + reader.addEventListener("load", () => resolve(reader.result)); + reader.addEventListener("error", () => reject(reader.error)); + reader.readAsText(data); + }); + }); + } +}; +var ResponseContext = class { + constructor(httpStatusCode, headers, body) { + this.httpStatusCode = httpStatusCode; + this.headers = headers; + this.body = body; + } + /** + * Parse header value in the form `value; param1="value1"` + * + * E.g. for Content-Type or Content-Disposition + * Parameter names are converted to lower case + * The first parameter is returned with the key `""` + */ + getParsedHeader(headerName) { + const result = {}; + if (!this.headers[headerName]) { + return result; + } + const parameters = this.headers[headerName].split(";"); + for (const parameter of parameters) { + let [key, value] = parameter.split("=", 2); + key = key.toLowerCase().trim(); + if (value === void 0) { + result[""] = key; + } else { + value = value.trim(); + if (value.startsWith('"') && value.endsWith('"')) { + value = value.substring(1, value.length - 1); + } + result[key] = value; + } + } + return result; + } + getBodyAsFile() { + return __async(this, null, function* () { + const data = yield this.body.binary(); + const fileName = this.getParsedHeader("content-disposition")["filename"] || ""; + const contentType = this.headers["content-type"] || ""; + try { + return new File([data], fileName, { type: contentType }); + } catch (error) { + return Object.assign(data, { + name: fileName, + type: contentType + }); + } + }); + } + /** + * Use a heuristic to get a body of unknown data structure. + * Return as string if possible, otherwise as binary. + */ + getBodyAsAny() { + try { + return this.body.text(); + } catch (e) { + } + try { + return this.body.binary(); + } catch (e) { + } + return Promise.resolve(void 0); + } +}; +function wrapHttpLibrary(promiseHttpLibrary) { + return { + send(request) { + return from(promiseHttpLibrary.send(request)); + } + }; +} + +// auth/auth.ts +var BearerAuthAuthentication = class { + /** + * Configures the http authentication with the required details. + * + * @param tokenProvider service that can provide the up-to-date token when needed + */ + constructor(tokenProvider) { + this.tokenProvider = tokenProvider; + } + getName() { + return "bearerAuth"; + } + applySecurityAuthentication(context) { + return __async(this, null, function* () { + context.setHeaderParam("Authorization", "Bearer " + (yield this.tokenProvider.getToken())); + }); + } +}; +function configureAuthMethods(config) { + let authMethods = {}; + if (!config) { + return authMethods; + } + authMethods["default"] = config["default"]; + if (config["bearerAuth"]) { + authMethods["bearerAuth"] = new BearerAuthAuthentication( + config["bearerAuth"]["tokenProvider"] + ); + } + return authMethods; +} + +// models/AIContext.ts +var _AIContext = class _AIContext { + static getAttributeTypeMap() { + return _AIContext.attributeTypeMap; + } + constructor() { + } +}; +_AIContext.discriminator = void 0; +_AIContext.attributeTypeMap = [ + { + "name": "instructions", + "baseName": "instructions", + "type": "Array", + "format": "" + }, + { + "name": "content", + "baseName": "content", + "type": "Array", + "format": "" + } +]; +var AIContext = _AIContext; + +// models/APIKey.ts +var _APIKey = class _APIKey { + static getAttributeTypeMap() { + return _APIKey.attributeTypeMap; + } + constructor() { + } +}; +_APIKey.discriminator = void 0; +_APIKey.attributeTypeMap = [ + { + "name": "key", + "baseName": "key", + "type": "string", + "format": "" + }, + { + "name": "value", + "baseName": "value", + "type": "string", + "format": "" + } +]; +var APIKey = _APIKey; + +// models/APIKeyInput.ts +var _APIKeyInput = class _APIKeyInput { + static getAttributeTypeMap() { + return _APIKeyInput.attributeTypeMap; + } + constructor() { + } +}; +_APIKeyInput.discriminator = void 0; +_APIKeyInput.attributeTypeMap = [ + { + "name": "key", + "baseName": "key", + "type": "string", + "format": "" + }, + { + "name": "value", + "baseName": "value", + "type": "string", + "format": "" + } +]; +var APIKeyInput = _APIKeyInput; + +// models/AccessToken.ts +var _AccessToken = class _AccessToken { + static getAttributeTypeMap() { + return _AccessToken.attributeTypeMap; + } + constructor() { + } +}; +_AccessToken.discriminator = void 0; +_AccessToken.attributeTypeMap = [ + { + "name": "id", + "baseName": "id", + "type": "string", + "format": "" + }, + { + "name": "token", + "baseName": "token", + "type": "string", + "format": "" + }, + { + "name": "org", + "baseName": "org", + "type": "OrgInfo", + "format": "" + }, + { + "name": "user", + "baseName": "user", + "type": "UserInfo", + "format": "" + }, + { + "name": "creation_time_in_millis", + "baseName": "creation_time_in_millis", + "type": "number", + "format": "float" + }, + { + "name": "expiration_time_in_millis", + "baseName": "expiration_time_in_millis", + "type": "number", + "format": "float" + } +]; +var AccessToken = _AccessToken; + +// models/ActionConfig.ts +var _ActionConfig = class _ActionConfig { + static getAttributeTypeMap() { + return _ActionConfig.attributeTypeMap; + } + constructor() { + } +}; +_ActionConfig.discriminator = void 0; +_ActionConfig.attributeTypeMap = [ + { + "name": "position", + "baseName": "position", + "type": "string", + "format": "" + }, + { + "name": "visibility", + "baseName": "visibility", + "type": "boolean", + "format": "" + } +]; +var ActionConfig = _ActionConfig; + +// models/ActionConfigInput.ts +var _ActionConfigInput = class _ActionConfigInput { + static getAttributeTypeMap() { + return _ActionConfigInput.attributeTypeMap; + } + constructor() { + } +}; +_ActionConfigInput.discriminator = void 0; +_ActionConfigInput.attributeTypeMap = [ + { + "name": "position", + "baseName": "position", + "type": "ActionConfigInputPositionEnum", + "format": "" + }, + { + "name": "visibility", + "baseName": "visibility", + "type": "boolean", + "format": "" + } +]; +var ActionConfigInput = _ActionConfigInput; + +// models/ActionConfigInputCreate.ts +var _ActionConfigInputCreate = class _ActionConfigInputCreate { + static getAttributeTypeMap() { + return _ActionConfigInputCreate.attributeTypeMap; + } + constructor() { + } +}; +_ActionConfigInputCreate.discriminator = void 0; +_ActionConfigInputCreate.attributeTypeMap = [ + { + "name": "position", + "baseName": "position", + "type": "ActionConfigInputCreatePositionEnum", + "format": "" + }, + { + "name": "visibility", + "baseName": "visibility", + "type": "boolean", + "format": "" + } +]; +var ActionConfigInputCreate = _ActionConfigInputCreate; + +// models/ActionDetails.ts +var _ActionDetails = class _ActionDetails { + static getAttributeTypeMap() { + return _ActionDetails.attributeTypeMap; + } + constructor() { + } +}; +_ActionDetails.discriminator = void 0; +_ActionDetails.attributeTypeMap = [ + { + "name": "CALLBACK", + "baseName": "CALLBACK", + "type": "CALLBACK", + "format": "" + }, + { + "name": "URL", + "baseName": "URL", + "type": "URL", + "format": "" + } +]; +var ActionDetails = _ActionDetails; + +// models/ActionDetailsInput.ts +var _ActionDetailsInput = class _ActionDetailsInput { + static getAttributeTypeMap() { + return _ActionDetailsInput.attributeTypeMap; + } + constructor() { + } +}; +_ActionDetailsInput.discriminator = void 0; +_ActionDetailsInput.attributeTypeMap = [ + { + "name": "CALLBACK", + "baseName": "CALLBACK", + "type": "CALLBACKInput", + "format": "" + }, + { + "name": "URL", + "baseName": "URL", + "type": "URLInput", + "format": "" + } +]; +var ActionDetailsInput = _ActionDetailsInput; + +// models/ActionDetailsInputCreate.ts +var _ActionDetailsInputCreate = class _ActionDetailsInputCreate { + static getAttributeTypeMap() { + return _ActionDetailsInputCreate.attributeTypeMap; + } + constructor() { + } +}; +_ActionDetailsInputCreate.discriminator = void 0; +_ActionDetailsInputCreate.attributeTypeMap = [ + { + "name": "CALLBACK", + "baseName": "CALLBACK", + "type": "CALLBACKInputMandatory", + "format": "" + }, + { + "name": "URL", + "baseName": "URL", + "type": "URLInputMandatory", + "format": "" + } +]; +var ActionDetailsInputCreate = _ActionDetailsInputCreate; + +// models/ActivateUserRequest.ts +var _ActivateUserRequest = class _ActivateUserRequest { + static getAttributeTypeMap() { + return _ActivateUserRequest.attributeTypeMap; + } + constructor() { + } +}; +_ActivateUserRequest.discriminator = void 0; +_ActivateUserRequest.attributeTypeMap = [ + { + "name": "user_identifier", + "baseName": "user_identifier", + "type": "string", + "format": "" + }, + { + "name": "auth_token", + "baseName": "auth_token", + "type": "string", + "format": "" + }, + { + "name": "password", + "baseName": "password", + "type": "string", + "format": "" + }, + { + "name": "properties", + "baseName": "properties", + "type": "string", + "format": "" + } +]; +var ActivateUserRequest = _ActivateUserRequest; + +// models/AgentConversation.ts +var _AgentConversation = class _AgentConversation { + static getAttributeTypeMap() { + return _AgentConversation.attributeTypeMap; + } + constructor() { + } +}; +_AgentConversation.discriminator = void 0; +_AgentConversation.attributeTypeMap = [ + { + "name": "conversation_id", + "baseName": "conversation_id", + "type": "string", + "format": "" + }, + { + "name": "conversation_identifier", + "baseName": "conversation_identifier", + "type": "string", + "format": "" + } +]; +var AgentConversation = _AgentConversation; + +// models/AnswerContent.ts +var _AnswerContent = class _AnswerContent { + static getAttributeTypeMap() { + return _AnswerContent.attributeTypeMap; + } + constructor() { + } +}; +_AnswerContent.discriminator = void 0; +_AnswerContent.attributeTypeMap = [ + { + "name": "available_data_row_count", + "baseName": "available_data_row_count", + "type": "number", + "format": "int32" + }, + { + "name": "column_names", + "baseName": "column_names", + "type": "Array", + "format": "" + }, + { + "name": "data_rows", + "baseName": "data_rows", + "type": "Array", + "format": "" + }, + { + "name": "record_offset", + "baseName": "record_offset", + "type": "number", + "format": "int32" + }, + { + "name": "record_size", + "baseName": "record_size", + "type": "number", + "format": "int32" + }, + { + "name": "returned_data_row_count", + "baseName": "returned_data_row_count", + "type": "number", + "format": "int32" + }, + { + "name": "sampling_ratio", + "baseName": "sampling_ratio", + "type": "number", + "format": "float" + } +]; +var AnswerContent = _AnswerContent; + +// models/AnswerDataResponse.ts +var _AnswerDataResponse = class _AnswerDataResponse { + static getAttributeTypeMap() { + return _AnswerDataResponse.attributeTypeMap; + } + constructor() { + } +}; +_AnswerDataResponse.discriminator = void 0; +_AnswerDataResponse.attributeTypeMap = [ + { + "name": "metadata_id", + "baseName": "metadata_id", + "type": "string", + "format": "" + }, + { + "name": "metadata_name", + "baseName": "metadata_name", + "type": "string", + "format": "" + }, + { + "name": "contents", + "baseName": "contents", + "type": "Array", + "format": "" + } +]; +var AnswerDataResponse = _AnswerDataResponse; + +// models/AnswerPngOptionsInput.ts +var _AnswerPngOptionsInput = class _AnswerPngOptionsInput { + static getAttributeTypeMap() { + return _AnswerPngOptionsInput.attributeTypeMap; + } + constructor() { + } +}; +_AnswerPngOptionsInput.discriminator = void 0; +_AnswerPngOptionsInput.attributeTypeMap = [ + { + "name": "x_resolution", + "baseName": "x_resolution", + "type": "number", + "format": "int32" + }, + { + "name": "y_resolution", + "baseName": "y_resolution", + "type": "number", + "format": "int32" + }, + { + "name": "scaling", + "baseName": "scaling", + "type": "number", + "format": "int32" + } +]; +var AnswerPngOptionsInput = _AnswerPngOptionsInput; + +// models/AssignChangeAuthorRequest.ts +var _AssignChangeAuthorRequest = class _AssignChangeAuthorRequest { + static getAttributeTypeMap() { + return _AssignChangeAuthorRequest.attributeTypeMap; + } + constructor() { + } +}; +_AssignChangeAuthorRequest.discriminator = void 0; +_AssignChangeAuthorRequest.attributeTypeMap = [ + { + "name": "metadata", + "baseName": "metadata", + "type": "Array", + "format": "" + }, + { + "name": "user_identifier", + "baseName": "user_identifier", + "type": "string", + "format": "" + }, + { + "name": "current_owner_identifier", + "baseName": "current_owner_identifier", + "type": "string", + "format": "" + } +]; +var AssignChangeAuthorRequest = _AssignChangeAuthorRequest; + +// models/AssignTagRequest.ts +var _AssignTagRequest = class _AssignTagRequest { + static getAttributeTypeMap() { + return _AssignTagRequest.attributeTypeMap; + } + constructor() { + } +}; +_AssignTagRequest.discriminator = void 0; +_AssignTagRequest.attributeTypeMap = [ + { + "name": "metadata", + "baseName": "metadata", + "type": "Array", + "format": "" + }, + { + "name": "tag_identifiers", + "baseName": "tag_identifiers", + "type": "Array", + "format": "" + } +]; +var AssignTagRequest = _AssignTagRequest; + +// models/AssociateMetadataInput.ts +var _AssociateMetadataInput = class _AssociateMetadataInput { + static getAttributeTypeMap() { + return _AssociateMetadataInput.attributeTypeMap; + } + constructor() { + } +}; +_AssociateMetadataInput.discriminator = void 0; +_AssociateMetadataInput.attributeTypeMap = [ + { + "name": "action_config", + "baseName": "action_config", + "type": "ActionConfigInput", + "format": "" + }, + { + "name": "identifier", + "baseName": "identifier", + "type": "string", + "format": "" + }, + { + "name": "type", + "baseName": "type", + "type": "AssociateMetadataInputTypeEnum", + "format": "" + } +]; +var AssociateMetadataInput = _AssociateMetadataInput; + +// models/AssociateMetadataInputCreate.ts +var _AssociateMetadataInputCreate = class _AssociateMetadataInputCreate { + static getAttributeTypeMap() { + return _AssociateMetadataInputCreate.attributeTypeMap; + } + constructor() { + } +}; +_AssociateMetadataInputCreate.discriminator = void 0; +_AssociateMetadataInputCreate.attributeTypeMap = [ + { + "name": "action_config", + "baseName": "action_config", + "type": "ActionConfigInputCreate", + "format": "" + }, + { + "name": "identifier", + "baseName": "identifier", + "type": "string", + "format": "" + }, + { + "name": "type", + "baseName": "type", + "type": "AssociateMetadataInputCreateTypeEnum", + "format": "" + } +]; +var AssociateMetadataInputCreate = _AssociateMetadataInputCreate; + +// models/AuthClusterPreferences.ts +var _AuthClusterPreferences = class _AuthClusterPreferences { + static getAttributeTypeMap() { + return _AuthClusterPreferences.attributeTypeMap; + } + constructor() { + } +}; +_AuthClusterPreferences.discriminator = void 0; +_AuthClusterPreferences.attributeTypeMap = [ + { + "name": "auth_status", + "baseName": "auth_status", + "type": "AuthClusterPreferencesAuthStatusEnum", + "format": "" + }, + { + "name": "access_tokens", + "baseName": "access_tokens", + "type": "Array", + "format": "" + } +]; +var AuthClusterPreferences = _AuthClusterPreferences; + +// models/AuthClusterPreferencesInput.ts +var _AuthClusterPreferencesInput = class _AuthClusterPreferencesInput { + static getAttributeTypeMap() { + return _AuthClusterPreferencesInput.attributeTypeMap; + } + constructor() { + } +}; +_AuthClusterPreferencesInput.discriminator = void 0; +_AuthClusterPreferencesInput.attributeTypeMap = [ + { + "name": "auth_status", + "baseName": "auth_status", + "type": "AuthClusterPreferencesInputAuthStatusEnum", + "format": "" + } +]; +var AuthClusterPreferencesInput = _AuthClusterPreferencesInput; + +// models/AuthOrgInfo.ts +var _AuthOrgInfo = class _AuthOrgInfo { + static getAttributeTypeMap() { + return _AuthOrgInfo.attributeTypeMap; + } + constructor() { + } +}; +_AuthOrgInfo.discriminator = void 0; +_AuthOrgInfo.attributeTypeMap = [ + { + "name": "id", + "baseName": "id", + "type": "number", + "format": "int32" + }, + { + "name": "name", + "baseName": "name", + "type": "string", + "format": "" + } +]; +var AuthOrgInfo = _AuthOrgInfo; + +// models/AuthOrgPreference.ts +var _AuthOrgPreference = class _AuthOrgPreference { + static getAttributeTypeMap() { + return _AuthOrgPreference.attributeTypeMap; + } + constructor() { + } +}; +_AuthOrgPreference.discriminator = void 0; +_AuthOrgPreference.attributeTypeMap = [ + { + "name": "org", + "baseName": "org", + "type": "AuthOrgInfo", + "format": "" + }, + { + "name": "auth_status", + "baseName": "auth_status", + "type": "AuthOrgPreferenceAuthStatusEnum", + "format": "" + }, + { + "name": "access_tokens", + "baseName": "access_tokens", + "type": "Array", + "format": "" + } +]; +var AuthOrgPreference = _AuthOrgPreference; + +// models/AuthOrgPreferenceInput.ts +var _AuthOrgPreferenceInput = class _AuthOrgPreferenceInput { + static getAttributeTypeMap() { + return _AuthOrgPreferenceInput.attributeTypeMap; + } + constructor() { + } +}; +_AuthOrgPreferenceInput.discriminator = void 0; +_AuthOrgPreferenceInput.attributeTypeMap = [ + { + "name": "org_identifier", + "baseName": "org_identifier", + "type": "string", + "format": "" + }, + { + "name": "auth_status", + "baseName": "auth_status", + "type": "AuthOrgPreferenceInputAuthStatusEnum", + "format": "" + } +]; +var AuthOrgPreferenceInput = _AuthOrgPreferenceInput; + +// models/AuthSettingsAccessToken.ts +var _AuthSettingsAccessToken = class _AuthSettingsAccessToken { + static getAttributeTypeMap() { + return _AuthSettingsAccessToken.attributeTypeMap; + } + constructor() { + } +}; +_AuthSettingsAccessToken.discriminator = void 0; +_AuthSettingsAccessToken.attributeTypeMap = [ + { + "name": "key", + "baseName": "key", + "type": "string", + "format": "" + } +]; +var AuthSettingsAccessToken = _AuthSettingsAccessToken; + +// models/Authentication.ts +var _Authentication = class _Authentication { + static getAttributeTypeMap() { + return _Authentication.attributeTypeMap; + } + constructor() { + } +}; +_Authentication.discriminator = void 0; +_Authentication.attributeTypeMap = [ + { + "name": "API_Key", + "baseName": "API_Key", + "type": "APIKey", + "format": "" + }, + { + "name": "Basic_Auth", + "baseName": "Basic_Auth", + "type": "BasicAuth", + "format": "" + }, + { + "name": "Bearer_Token", + "baseName": "Bearer_Token", + "type": "string", + "format": "" + }, + { + "name": "No_Auth", + "baseName": "No_Auth", + "type": "string", + "format": "" + } +]; +var Authentication = _Authentication; + +// models/AuthenticationInput.ts +var _AuthenticationInput = class _AuthenticationInput { + static getAttributeTypeMap() { + return _AuthenticationInput.attributeTypeMap; + } + constructor() { + } +}; +_AuthenticationInput.discriminator = void 0; +_AuthenticationInput.attributeTypeMap = [ + { + "name": "API_Key", + "baseName": "API_Key", + "type": "APIKeyInput", + "format": "" + }, + { + "name": "Basic_Auth", + "baseName": "Basic_Auth", + "type": "BasicAuthInput", + "format": "" + }, + { + "name": "Bearer_Token", + "baseName": "Bearer_Token", + "type": "string", + "format": "" + }, + { + "name": "No_Auth", + "baseName": "No_Auth", + "type": "string", + "format": "" + } +]; +var AuthenticationInput = _AuthenticationInput; + +// models/Author.ts +var _Author = class _Author { + static getAttributeTypeMap() { + return _Author.attributeTypeMap; + } + constructor() { + } +}; +_Author.discriminator = void 0; +_Author.attributeTypeMap = [ + { + "name": "id", + "baseName": "id", + "type": "string", + "format": "" + }, + { + "name": "name", + "baseName": "name", + "type": "string", + "format": "" + } +]; +var Author = _Author; + +// models/AuthorMetadataTypeInput.ts +var _AuthorMetadataTypeInput = class _AuthorMetadataTypeInput { + static getAttributeTypeMap() { + return _AuthorMetadataTypeInput.attributeTypeMap; + } + constructor() { + } +}; +_AuthorMetadataTypeInput.discriminator = void 0; +_AuthorMetadataTypeInput.attributeTypeMap = [ + { + "name": "type", + "baseName": "type", + "type": "AuthorMetadataTypeInputTypeEnum", + "format": "" + }, + { + "name": "identifier", + "baseName": "identifier", + "type": "string", + "format": "" + } +]; +var AuthorMetadataTypeInput = _AuthorMetadataTypeInput; + +// models/AuthorType.ts +var _AuthorType = class _AuthorType { + static getAttributeTypeMap() { + return _AuthorType.attributeTypeMap; + } + constructor() { + } +}; +_AuthorType.discriminator = void 0; +_AuthorType.attributeTypeMap = [ + { + "name": "email", + "baseName": "email", + "type": "string", + "format": "" + }, + { + "name": "username", + "baseName": "username", + "type": "string", + "format": "" + } +]; +var AuthorType = _AuthorType; + +// models/AwsS3Config.ts +var _AwsS3Config = class _AwsS3Config { + static getAttributeTypeMap() { + return _AwsS3Config.attributeTypeMap; + } + constructor() { + } +}; +_AwsS3Config.discriminator = void 0; +_AwsS3Config.attributeTypeMap = [ + { + "name": "bucket_name", + "baseName": "bucket_name", + "type": "string", + "format": "" + }, + { + "name": "region", + "baseName": "region", + "type": "string", + "format": "" + }, + { + "name": "role_arn", + "baseName": "role_arn", + "type": "string", + "format": "" + }, + { + "name": "external_id", + "baseName": "external_id", + "type": "string", + "format": "" + }, + { + "name": "path_prefix", + "baseName": "path_prefix", + "type": "string", + "format": "" + } +]; +var AwsS3Config = _AwsS3Config; + +// models/AwsS3ConfigInput.ts +var _AwsS3ConfigInput = class _AwsS3ConfigInput { + static getAttributeTypeMap() { + return _AwsS3ConfigInput.attributeTypeMap; + } + constructor() { + } +}; +_AwsS3ConfigInput.discriminator = void 0; +_AwsS3ConfigInput.attributeTypeMap = [ + { + "name": "bucket_name", + "baseName": "bucket_name", + "type": "string", + "format": "" + }, + { + "name": "region", + "baseName": "region", + "type": "string", + "format": "" + }, + { + "name": "role_arn", + "baseName": "role_arn", + "type": "string", + "format": "" + }, + { + "name": "external_id", + "baseName": "external_id", + "type": "string", + "format": "" + }, + { + "name": "path_prefix", + "baseName": "path_prefix", + "type": "string", + "format": "" + } +]; +var AwsS3ConfigInput = _AwsS3ConfigInput; + +// models/BasicAuth.ts +var _BasicAuth = class _BasicAuth { + static getAttributeTypeMap() { + return _BasicAuth.attributeTypeMap; + } + constructor() { + } +}; +_BasicAuth.discriminator = void 0; +_BasicAuth.attributeTypeMap = [ + { + "name": "password", + "baseName": "password", + "type": "string", + "format": "" + }, + { + "name": "username", + "baseName": "username", + "type": "string", + "format": "" + } +]; +var BasicAuth = _BasicAuth; + +// models/BasicAuthInput.ts +var _BasicAuthInput = class _BasicAuthInput { + static getAttributeTypeMap() { + return _BasicAuthInput.attributeTypeMap; + } + constructor() { + } +}; +_BasicAuthInput.discriminator = void 0; +_BasicAuthInput.attributeTypeMap = [ + { + "name": "password", + "baseName": "password", + "type": "string", + "format": "" + }, + { + "name": "username", + "baseName": "username", + "type": "string", + "format": "" + } +]; +var BasicAuthInput = _BasicAuthInput; + +// models/CALLBACK.ts +var _CALLBACK = class _CALLBACK { + static getAttributeTypeMap() { + return _CALLBACK.attributeTypeMap; + } + constructor() { + } +}; +_CALLBACK.discriminator = void 0; +_CALLBACK.attributeTypeMap = [ + { + "name": "reference", + "baseName": "reference", + "type": "string", + "format": "" + } +]; +var CALLBACK = _CALLBACK; + +// models/CALLBACKInput.ts +var _CALLBACKInput = class _CALLBACKInput { + static getAttributeTypeMap() { + return _CALLBACKInput.attributeTypeMap; + } + constructor() { + } +}; +_CALLBACKInput.discriminator = void 0; +_CALLBACKInput.attributeTypeMap = [ + { + "name": "reference", + "baseName": "reference", + "type": "string", + "format": "" + } +]; +var CALLBACKInput = _CALLBACKInput; + +// models/CALLBACKInputMandatory.ts +var _CALLBACKInputMandatory = class _CALLBACKInputMandatory { + static getAttributeTypeMap() { + return _CALLBACKInputMandatory.attributeTypeMap; + } + constructor() { + } +}; +_CALLBACKInputMandatory.discriminator = void 0; +_CALLBACKInputMandatory.attributeTypeMap = [ + { + "name": "reference", + "baseName": "reference", + "type": "string", + "format": "" + } +]; +var CALLBACKInputMandatory = _CALLBACKInputMandatory; + +// models/CalendarResponse.ts +var _CalendarResponse = class _CalendarResponse { + static getAttributeTypeMap() { + return _CalendarResponse.attributeTypeMap; + } + constructor() { + } +}; +_CalendarResponse.discriminator = void 0; +_CalendarResponse.attributeTypeMap = [ + { + "name": "calendar_name", + "baseName": "calendar_name", + "type": "string", + "format": "" + }, + { + "name": "connection_name", + "baseName": "connection_name", + "type": "string", + "format": "" + }, + { + "name": "data_warehouse_type", + "baseName": "data_warehouse_type", + "type": "string", + "format": "" + }, + { + "name": "modification_time_in_millis", + "baseName": "modification_time_in_millis", + "type": "string", + "format": "" + }, + { + "name": "author_name", + "baseName": "author_name", + "type": "string", + "format": "" + }, + { + "name": "connection_id", + "baseName": "connection_id", + "type": "string", + "format": "" + }, + { + "name": "calendar_id", + "baseName": "calendar_id", + "type": "string", + "format": "" + } +]; +var CalendarResponse = _CalendarResponse; + +// models/ChangeUserPasswordRequest.ts +var _ChangeUserPasswordRequest = class _ChangeUserPasswordRequest { + static getAttributeTypeMap() { + return _ChangeUserPasswordRequest.attributeTypeMap; + } + constructor() { + } +}; +_ChangeUserPasswordRequest.discriminator = void 0; +_ChangeUserPasswordRequest.attributeTypeMap = [ + { + "name": "current_password", + "baseName": "current_password", + "type": "string", + "format": "" + }, + { + "name": "new_password", + "baseName": "new_password", + "type": "string", + "format": "" + }, + { + "name": "user_identifier", + "baseName": "user_identifier", + "type": "string", + "format": "" + } +]; +var ChangeUserPasswordRequest = _ChangeUserPasswordRequest; + +// models/ChannelHistoryEventInfo.ts +var _ChannelHistoryEventInfo = class _ChannelHistoryEventInfo { + static getAttributeTypeMap() { + return _ChannelHistoryEventInfo.attributeTypeMap; + } + constructor() { + } +}; +_ChannelHistoryEventInfo.discriminator = void 0; +_ChannelHistoryEventInfo.attributeTypeMap = [ + { + "name": "type", + "baseName": "type", + "type": "ChannelHistoryEventInfoTypeEnum", + "format": "" + }, + { + "name": "id", + "baseName": "id", + "type": "string", + "format": "" + }, + { + "name": "name", + "baseName": "name", + "type": "string", + "format": "" + }, + { + "name": "run_id", + "baseName": "run_id", + "type": "string", + "format": "" + } +]; +var ChannelHistoryEventInfo = _ChannelHistoryEventInfo; + +// models/ChannelHistoryEventInput.ts +var _ChannelHistoryEventInput = class _ChannelHistoryEventInput { + static getAttributeTypeMap() { + return _ChannelHistoryEventInput.attributeTypeMap; + } + constructor() { + } +}; +_ChannelHistoryEventInput.discriminator = void 0; +_ChannelHistoryEventInput.attributeTypeMap = [ + { + "name": "type", + "baseName": "type", + "type": "ChannelHistoryEventInputTypeEnum", + "format": "" + }, + { + "name": "identifier", + "baseName": "identifier", + "type": "string", + "format": "" + } +]; +var ChannelHistoryEventInput = _ChannelHistoryEventInput; + +// models/ChannelHistoryJob.ts +var _ChannelHistoryJob = class _ChannelHistoryJob { + static getAttributeTypeMap() { + return _ChannelHistoryJob.attributeTypeMap; + } + constructor() { + } +}; +_ChannelHistoryJob.discriminator = void 0; +_ChannelHistoryJob.attributeTypeMap = [ + { + "name": "id", + "baseName": "id", + "type": "string", + "format": "" + }, + { + "name": "status", + "baseName": "status", + "type": "ChannelHistoryJobStatusEnum", + "format": "" + }, + { + "name": "creation_time_in_millis", + "baseName": "creation_time_in_millis", + "type": "number", + "format": "float" + }, + { + "name": "event", + "baseName": "event", + "type": "ChannelHistoryEventInfo", + "format": "" + }, + { + "name": "recipients", + "baseName": "recipients", + "type": "Array", + "format": "" + }, + { + "name": "detail", + "baseName": "detail", + "type": "string", + "format": "" + }, + { + "name": "try_count", + "baseName": "try_count", + "type": "number", + "format": "int32" + } +]; +var ChannelHistoryJob = _ChannelHistoryJob; + +// models/ChannelValidationAwsS3Info.ts +var _ChannelValidationAwsS3Info = class _ChannelValidationAwsS3Info { + static getAttributeTypeMap() { + return _ChannelValidationAwsS3Info.attributeTypeMap; + } + constructor() { + } +}; +_ChannelValidationAwsS3Info.discriminator = void 0; +_ChannelValidationAwsS3Info.attributeTypeMap = [ + { + "name": "bucket_name", + "baseName": "bucket_name", + "type": "string", + "format": "" + }, + { + "name": "file_name", + "baseName": "file_name", + "type": "string", + "format": "" + }, + { + "name": "object_key", + "baseName": "object_key", + "type": "string", + "format": "" + } +]; +var ChannelValidationAwsS3Info = _ChannelValidationAwsS3Info; + +// models/ChannelValidationDetail.ts +var _ChannelValidationDetail = class _ChannelValidationDetail { + static getAttributeTypeMap() { + return _ChannelValidationDetail.attributeTypeMap; + } + constructor() { + } +}; +_ChannelValidationDetail.discriminator = void 0; +_ChannelValidationDetail.attributeTypeMap = [ + { + "name": "validation_step", + "baseName": "validation_step", + "type": "ChannelValidationDetailValidationStepEnum", + "format": "" + }, + { + "name": "status", + "baseName": "status", + "type": "ChannelValidationDetailStatusEnum", + "format": "" + }, + { + "name": "http_status", + "baseName": "http_status", + "type": "number", + "format": "int32" + }, + { + "name": "error_message", + "baseName": "error_message", + "type": "string", + "format": "" + }, + { + "name": "aws_s3_info", + "baseName": "aws_s3_info", + "type": "ChannelValidationAwsS3Info", + "format": "" + } +]; +var ChannelValidationDetail = _ChannelValidationDetail; + +// models/ClusterNonEmbedAccess.ts +var _ClusterNonEmbedAccess = class _ClusterNonEmbedAccess { + static getAttributeTypeMap() { + return _ClusterNonEmbedAccess.attributeTypeMap; + } + constructor() { + } +}; +_ClusterNonEmbedAccess.discriminator = void 0; +_ClusterNonEmbedAccess.attributeTypeMap = [ + { + "name": "block_full_app_access", + "baseName": "block_full_app_access", + "type": "boolean", + "format": "" + }, + { + "name": "groups_with_access", + "baseName": "groups_with_access", + "type": "Array", + "format": "" + } +]; +var ClusterNonEmbedAccess = _ClusterNonEmbedAccess; + +// models/ClusterNonEmbedAccessInput.ts +var _ClusterNonEmbedAccessInput = class _ClusterNonEmbedAccessInput { + static getAttributeTypeMap() { + return _ClusterNonEmbedAccessInput.attributeTypeMap; + } + constructor() { + } +}; +_ClusterNonEmbedAccessInput.discriminator = void 0; +_ClusterNonEmbedAccessInput.attributeTypeMap = [ + { + "name": "block_full_app_access", + "baseName": "block_full_app_access", + "type": "boolean", + "format": "" + }, + { + "name": "groups_identifiers_with_access", + "baseName": "groups_identifiers_with_access", + "type": "Array", + "format": "" + } +]; +var ClusterNonEmbedAccessInput = _ClusterNonEmbedAccessInput; + +// models/Collection.ts +var _Collection = class _Collection { + static getAttributeTypeMap() { + return _Collection.attributeTypeMap; + } + constructor() { + } +}; +_Collection.discriminator = void 0; +_Collection.attributeTypeMap = [ + { + "name": "id", + "baseName": "id", + "type": "string", + "format": "" + }, + { + "name": "name", + "baseName": "name", + "type": "string", + "format": "" + }, + { + "name": "description", + "baseName": "description", + "type": "string", + "format": "" + }, + { + "name": "metadata", + "baseName": "metadata", + "type": "Array", + "format": "" + }, + { + "name": "created_at", + "baseName": "created_at", + "type": "string", + "format": "" + }, + { + "name": "updated_at", + "baseName": "updated_at", + "type": "string", + "format": "" + }, + { + "name": "author_name", + "baseName": "author_name", + "type": "string", + "format": "" + }, + { + "name": "author_id", + "baseName": "author_id", + "type": "string", + "format": "" + }, + { + "name": "org", + "baseName": "org", + "type": "CollectionEntityIdentifier", + "format": "" + } +]; +var Collection = _Collection; + +// models/CollectionDeleteResponse.ts +var _CollectionDeleteResponse = class _CollectionDeleteResponse { + static getAttributeTypeMap() { + return _CollectionDeleteResponse.attributeTypeMap; + } + constructor() { + } +}; +_CollectionDeleteResponse.discriminator = void 0; +_CollectionDeleteResponse.attributeTypeMap = [ + { + "name": "metadata_deleted", + "baseName": "metadata_deleted", + "type": "Array", + "format": "" + }, + { + "name": "metadata_skipped", + "baseName": "metadata_skipped", + "type": "Array", + "format": "" + } +]; +var CollectionDeleteResponse = _CollectionDeleteResponse; + +// models/CollectionDeleteTypeIdentifiers.ts +var _CollectionDeleteTypeIdentifiers = class _CollectionDeleteTypeIdentifiers { + static getAttributeTypeMap() { + return _CollectionDeleteTypeIdentifiers.attributeTypeMap; + } + constructor() { + } +}; +_CollectionDeleteTypeIdentifiers.discriminator = void 0; +_CollectionDeleteTypeIdentifiers.attributeTypeMap = [ + { + "name": "type", + "baseName": "type", + "type": "string", + "format": "" + }, + { + "name": "identifiers", + "baseName": "identifiers", + "type": "Array", + "format": "" + } +]; +var CollectionDeleteTypeIdentifiers = _CollectionDeleteTypeIdentifiers; + +// models/CollectionEntityIdentifier.ts +var _CollectionEntityIdentifier = class _CollectionEntityIdentifier { + static getAttributeTypeMap() { + return _CollectionEntityIdentifier.attributeTypeMap; + } + constructor() { + } +}; +_CollectionEntityIdentifier.discriminator = void 0; +_CollectionEntityIdentifier.attributeTypeMap = [ + { + "name": "identifier", + "baseName": "identifier", + "type": "string", + "format": "" + }, + { + "name": "name", + "baseName": "name", + "type": "string", + "format": "" + } +]; +var CollectionEntityIdentifier = _CollectionEntityIdentifier; + +// models/CollectionMetadataInput.ts +var _CollectionMetadataInput = class _CollectionMetadataInput { + static getAttributeTypeMap() { + return _CollectionMetadataInput.attributeTypeMap; + } + constructor() { + } +}; +_CollectionMetadataInput.discriminator = void 0; +_CollectionMetadataInput.attributeTypeMap = [ + { + "name": "type", + "baseName": "type", + "type": "CollectionMetadataInputTypeEnum", + "format": "" + }, + { + "name": "identifiers", + "baseName": "identifiers", + "type": "Array", + "format": "" + } +]; +var CollectionMetadataInput = _CollectionMetadataInput; + +// models/CollectionMetadataItem.ts +var _CollectionMetadataItem = class _CollectionMetadataItem { + static getAttributeTypeMap() { + return _CollectionMetadataItem.attributeTypeMap; + } + constructor() { + } +}; +_CollectionMetadataItem.discriminator = void 0; +_CollectionMetadataItem.attributeTypeMap = [ + { + "name": "type", + "baseName": "type", + "type": "string", + "format": "" + }, + { + "name": "identifiers", + "baseName": "identifiers", + "type": "Array", + "format": "" + } +]; +var CollectionMetadataItem = _CollectionMetadataItem; + +// models/CollectionSearchResponse.ts +var _CollectionSearchResponse = class _CollectionSearchResponse { + static getAttributeTypeMap() { + return _CollectionSearchResponse.attributeTypeMap; + } + constructor() { + } +}; +_CollectionSearchResponse.discriminator = void 0; +_CollectionSearchResponse.attributeTypeMap = [ + { + "name": "collections", + "baseName": "collections", + "type": "Array", + "format": "" + }, + { + "name": "record_offset", + "baseName": "record_offset", + "type": "number", + "format": "int32" + }, + { + "name": "record_size", + "baseName": "record_size", + "type": "number", + "format": "int32" + }, + { + "name": "is_last_batch", + "baseName": "is_last_batch", + "type": "boolean", + "format": "" + }, + { + "name": "count", + "baseName": "count", + "type": "number", + "format": "int32" + } +]; +var CollectionSearchResponse = _CollectionSearchResponse; + +// models/Column.ts +var _Column = class _Column { + static getAttributeTypeMap() { + return _Column.attributeTypeMap; + } + constructor() { + } +}; +_Column.discriminator = void 0; +_Column.attributeTypeMap = [ + { + "name": "name", + "baseName": "name", + "type": "string", + "format": "" + }, + { + "name": "data_type", + "baseName": "data_type", + "type": "string", + "format": "" + }, + { + "name": "is_aggregate", + "baseName": "is_aggregate", + "type": "string", + "format": "" + }, + { + "name": "can_import", + "baseName": "can_import", + "type": "boolean", + "format": "" + }, + { + "name": "selected", + "baseName": "selected", + "type": "boolean", + "format": "" + }, + { + "name": "is_linked_active", + "baseName": "is_linked_active", + "type": "boolean", + "format": "" + } +]; +var Column = _Column; + +// models/ColumnSecurityRule.ts +var _ColumnSecurityRule = class _ColumnSecurityRule { + static getAttributeTypeMap() { + return _ColumnSecurityRule.attributeTypeMap; + } + constructor() { + } +}; +_ColumnSecurityRule.discriminator = void 0; +_ColumnSecurityRule.attributeTypeMap = [ + { + "name": "column", + "baseName": "column", + "type": "ColumnSecurityRuleColumn", + "format": "" + }, + { + "name": "groups", + "baseName": "groups", + "type": "Array", + "format": "" + }, + { + "name": "source_table_details", + "baseName": "source_table_details", + "type": "ColumnSecurityRuleSourceTable", + "format": "" + } +]; +var ColumnSecurityRule = _ColumnSecurityRule; + +// models/ColumnSecurityRuleColumn.ts +var _ColumnSecurityRuleColumn = class _ColumnSecurityRuleColumn { + static getAttributeTypeMap() { + return _ColumnSecurityRuleColumn.attributeTypeMap; + } + constructor() { + } +}; +_ColumnSecurityRuleColumn.discriminator = void 0; +_ColumnSecurityRuleColumn.attributeTypeMap = [ + { + "name": "id", + "baseName": "id", + "type": "string", + "format": "" + }, + { + "name": "name", + "baseName": "name", + "type": "string", + "format": "" + } +]; +var ColumnSecurityRuleColumn = _ColumnSecurityRuleColumn; + +// models/ColumnSecurityRuleGroup.ts +var _ColumnSecurityRuleGroup = class _ColumnSecurityRuleGroup { + static getAttributeTypeMap() { + return _ColumnSecurityRuleGroup.attributeTypeMap; + } + constructor() { + } +}; +_ColumnSecurityRuleGroup.discriminator = void 0; +_ColumnSecurityRuleGroup.attributeTypeMap = [ + { + "name": "id", + "baseName": "id", + "type": "string", + "format": "" + }, + { + "name": "name", + "baseName": "name", + "type": "string", + "format": "" + } +]; +var ColumnSecurityRuleGroup = _ColumnSecurityRuleGroup; + +// models/ColumnSecurityRuleGroupOperation.ts +var _ColumnSecurityRuleGroupOperation = class _ColumnSecurityRuleGroupOperation { + static getAttributeTypeMap() { + return _ColumnSecurityRuleGroupOperation.attributeTypeMap; + } + constructor() { + } +}; +_ColumnSecurityRuleGroupOperation.discriminator = void 0; +_ColumnSecurityRuleGroupOperation.attributeTypeMap = [ + { + "name": "operation", + "baseName": "operation", + "type": "ColumnSecurityRuleGroupOperationOperationEnum", + "format": "" + }, + { + "name": "group_identifiers", + "baseName": "group_identifiers", + "type": "Array", + "format": "" + } +]; +var ColumnSecurityRuleGroupOperation = _ColumnSecurityRuleGroupOperation; + +// models/ColumnSecurityRuleResponse.ts +var _ColumnSecurityRuleResponse = class _ColumnSecurityRuleResponse { + static getAttributeTypeMap() { + return _ColumnSecurityRuleResponse.attributeTypeMap; + } + constructor() { + } +}; +_ColumnSecurityRuleResponse.discriminator = void 0; +_ColumnSecurityRuleResponse.attributeTypeMap = [ + { + "name": "table_guid", + "baseName": "table_guid", + "type": "string", + "format": "" + }, + { + "name": "obj_id", + "baseName": "obj_id", + "type": "string", + "format": "" + }, + { + "name": "column_security_rules", + "baseName": "column_security_rules", + "type": "Array", + "format": "" + } +]; +var ColumnSecurityRuleResponse = _ColumnSecurityRuleResponse; + +// models/ColumnSecurityRuleSourceTable.ts +var _ColumnSecurityRuleSourceTable = class _ColumnSecurityRuleSourceTable { + static getAttributeTypeMap() { + return _ColumnSecurityRuleSourceTable.attributeTypeMap; + } + constructor() { + } +}; +_ColumnSecurityRuleSourceTable.discriminator = void 0; +_ColumnSecurityRuleSourceTable.attributeTypeMap = [ + { + "name": "id", + "baseName": "id", + "type": "string", + "format": "" + }, + { + "name": "name", + "baseName": "name", + "type": "string", + "format": "" + } +]; +var ColumnSecurityRuleSourceTable = _ColumnSecurityRuleSourceTable; + +// models/ColumnSecurityRuleTableInput.ts +var _ColumnSecurityRuleTableInput = class _ColumnSecurityRuleTableInput { + static getAttributeTypeMap() { + return _ColumnSecurityRuleTableInput.attributeTypeMap; + } + constructor() { + } +}; +_ColumnSecurityRuleTableInput.discriminator = void 0; +_ColumnSecurityRuleTableInput.attributeTypeMap = [ + { + "name": "identifier", + "baseName": "identifier", + "type": "string", + "format": "" + }, + { + "name": "obj_identifier", + "baseName": "obj_identifier", + "type": "string", + "format": "" + } +]; +var ColumnSecurityRuleTableInput = _ColumnSecurityRuleTableInput; + +// models/ColumnSecurityRuleUpdate.ts +var _ColumnSecurityRuleUpdate = class _ColumnSecurityRuleUpdate { + static getAttributeTypeMap() { + return _ColumnSecurityRuleUpdate.attributeTypeMap; + } + constructor() { + } +}; +_ColumnSecurityRuleUpdate.discriminator = void 0; +_ColumnSecurityRuleUpdate.attributeTypeMap = [ + { + "name": "column_identifier", + "baseName": "column_identifier", + "type": "string", + "format": "" + }, + { + "name": "is_unsecured", + "baseName": "is_unsecured", + "type": "boolean", + "format": "" + }, + { + "name": "group_access", + "baseName": "group_access", + "type": "Array", + "format": "" + } +]; +var ColumnSecurityRuleUpdate = _ColumnSecurityRuleUpdate; + +// models/CommitBranchRequest.ts +var _CommitBranchRequest = class _CommitBranchRequest { + static getAttributeTypeMap() { + return _CommitBranchRequest.attributeTypeMap; + } + constructor() { + } +}; +_CommitBranchRequest.discriminator = void 0; +_CommitBranchRequest.attributeTypeMap = [ + { + "name": "metadata", + "baseName": "metadata", + "type": "Array", + "format": "" + }, + { + "name": "delete_aware", + "baseName": "delete_aware", + "type": "boolean", + "format": "" + }, + { + "name": "branch_name", + "baseName": "branch_name", + "type": "string", + "format": "" + }, + { + "name": "comment", + "baseName": "comment", + "type": "string", + "format": "" + } +]; +var CommitBranchRequest = _CommitBranchRequest; + +// models/CommitFileType.ts +var _CommitFileType = class _CommitFileType { + static getAttributeTypeMap() { + return _CommitFileType.attributeTypeMap; + } + constructor() { + } +}; +_CommitFileType.discriminator = void 0; +_CommitFileType.attributeTypeMap = [ + { + "name": "file_name", + "baseName": "file_name", + "type": "string", + "format": "" + }, + { + "name": "status_code", + "baseName": "status_code", + "type": "string", + "format": "" + }, + { + "name": "status_message", + "baseName": "status_message", + "type": "string", + "format": "" + } +]; +var CommitFileType = _CommitFileType; + +// models/CommitHistoryResponse.ts +var _CommitHistoryResponse = class _CommitHistoryResponse { + static getAttributeTypeMap() { + return _CommitHistoryResponse.attributeTypeMap; + } + constructor() { + } +}; +_CommitHistoryResponse.discriminator = void 0; +_CommitHistoryResponse.attributeTypeMap = [ + { + "name": "committer", + "baseName": "committer", + "type": "CommiterType", + "format": "" + }, + { + "name": "author", + "baseName": "author", + "type": "AuthorType", + "format": "" + }, + { + "name": "comment", + "baseName": "comment", + "type": "string", + "format": "" + }, + { + "name": "commit_time", + "baseName": "commit_time", + "type": "string", + "format": "" + }, + { + "name": "commit_id", + "baseName": "commit_id", + "type": "string", + "format": "" + }, + { + "name": "branch", + "baseName": "branch", + "type": "string", + "format": "" + } +]; +var CommitHistoryResponse = _CommitHistoryResponse; + +// models/CommitResponse.ts +var _CommitResponse = class _CommitResponse { + static getAttributeTypeMap() { + return _CommitResponse.attributeTypeMap; + } + constructor() { + } +}; +_CommitResponse.discriminator = void 0; +_CommitResponse.attributeTypeMap = [ + { + "name": "committer", + "baseName": "committer", + "type": "CommiterType", + "format": "" + }, + { + "name": "author", + "baseName": "author", + "type": "AuthorType", + "format": "" + }, + { + "name": "comment", + "baseName": "comment", + "type": "string", + "format": "" + }, + { + "name": "commit_time", + "baseName": "commit_time", + "type": "string", + "format": "" + }, + { + "name": "commit_id", + "baseName": "commit_id", + "type": "string", + "format": "" + }, + { + "name": "branch", + "baseName": "branch", + "type": "string", + "format": "" + }, + { + "name": "committed_files", + "baseName": "committed_files", + "type": "Array", + "format": "" + } +]; +var CommitResponse = _CommitResponse; + +// models/CommiterType.ts +var _CommiterType = class _CommiterType { + static getAttributeTypeMap() { + return _CommiterType.attributeTypeMap; + } + constructor() { + } +}; +_CommiterType.discriminator = void 0; +_CommiterType.attributeTypeMap = [ + { + "name": "email", + "baseName": "email", + "type": "string", + "format": "" + }, + { + "name": "username", + "baseName": "username", + "type": "string", + "format": "" + } +]; +var CommiterType = _CommiterType; + +// models/CommunicationChannelPreferencesResponse.ts +var _CommunicationChannelPreferencesResponse = class _CommunicationChannelPreferencesResponse { + static getAttributeTypeMap() { + return _CommunicationChannelPreferencesResponse.attributeTypeMap; + } + constructor() { + } +}; +_CommunicationChannelPreferencesResponse.discriminator = void 0; +_CommunicationChannelPreferencesResponse.attributeTypeMap = [ + { + "name": "cluster_preferences", + "baseName": "cluster_preferences", + "type": "Array", + "format": "" + }, + { + "name": "org_preferences", + "baseName": "org_preferences", + "type": "Array", + "format": "" + } +]; +var CommunicationChannelPreferencesResponse = _CommunicationChannelPreferencesResponse; + +// models/CommunicationChannelValidateResponse.ts +var _CommunicationChannelValidateResponse = class _CommunicationChannelValidateResponse { + static getAttributeTypeMap() { + return _CommunicationChannelValidateResponse.attributeTypeMap; + } + constructor() { + } +}; +_CommunicationChannelValidateResponse.discriminator = void 0; +_CommunicationChannelValidateResponse.attributeTypeMap = [ + { + "name": "channel_type", + "baseName": "channel_type", + "type": "CommunicationChannelValidateResponseChannelTypeEnum", + "format": "" + }, + { + "name": "channel_id", + "baseName": "channel_id", + "type": "string", + "format": "" + }, + { + "name": "channel_name", + "baseName": "channel_name", + "type": "string", + "format": "" + }, + { + "name": "event_type", + "baseName": "event_type", + "type": "CommunicationChannelValidateResponseEventTypeEnum", + "format": "" + }, + { + "name": "job_id", + "baseName": "job_id", + "type": "string", + "format": "" + }, + { + "name": "result_code", + "baseName": "result_code", + "type": "CommunicationChannelValidateResponseResultCodeEnum", + "format": "" + }, + { + "name": "details", + "baseName": "details", + "type": "Array", + "format": "" + } +]; +var CommunicationChannelValidateResponse = _CommunicationChannelValidateResponse; + +// models/ConfigureAuthSettingsRequest.ts +var _ConfigureAuthSettingsRequest = class _ConfigureAuthSettingsRequest { + static getAttributeTypeMap() { + return _ConfigureAuthSettingsRequest.attributeTypeMap; + } + constructor() { + } +}; +_ConfigureAuthSettingsRequest.discriminator = void 0; +_ConfigureAuthSettingsRequest.attributeTypeMap = [ + { + "name": "auth_type", + "baseName": "auth_type", + "type": "ConfigureAuthSettingsRequestAuthTypeEnum", + "format": "" + }, + { + "name": "cluster_preferences", + "baseName": "cluster_preferences", + "type": "ConfigureAuthSettingsRequestClusterPreferences", + "format": "" + }, + { + "name": "org_preferences", + "baseName": "org_preferences", + "type": "Array", + "format": "" + } +]; +var ConfigureAuthSettingsRequest = _ConfigureAuthSettingsRequest; + +// models/ConfigureAuthSettingsRequestClusterPreferences.ts +var _ConfigureAuthSettingsRequestClusterPreferences = class _ConfigureAuthSettingsRequestClusterPreferences { + static getAttributeTypeMap() { + return _ConfigureAuthSettingsRequestClusterPreferences.attributeTypeMap; + } + constructor() { + } +}; +_ConfigureAuthSettingsRequestClusterPreferences.discriminator = void 0; +_ConfigureAuthSettingsRequestClusterPreferences.attributeTypeMap = [ + { + "name": "auth_status", + "baseName": "auth_status", + "type": "ConfigureAuthSettingsRequestClusterPreferencesAuthStatusEnum", + "format": "" + } +]; +var ConfigureAuthSettingsRequestClusterPreferences = _ConfigureAuthSettingsRequestClusterPreferences; + +// models/ConfigureCommunicationChannelPreferencesRequest.ts +var _ConfigureCommunicationChannelPreferencesRequest = class _ConfigureCommunicationChannelPreferencesRequest { + static getAttributeTypeMap() { + return _ConfigureCommunicationChannelPreferencesRequest.attributeTypeMap; + } + constructor() { + } +}; +_ConfigureCommunicationChannelPreferencesRequest.discriminator = void 0; +_ConfigureCommunicationChannelPreferencesRequest.attributeTypeMap = [ + { + "name": "cluster_preferences", + "baseName": "cluster_preferences", + "type": "Array", + "format": "" + }, + { + "name": "org_preferences", + "baseName": "org_preferences", + "type": "Array", + "format": "" + } +]; +var ConfigureCommunicationChannelPreferencesRequest = _ConfigureCommunicationChannelPreferencesRequest; + +// models/ConfigureSecuritySettingsRequest.ts +var _ConfigureSecuritySettingsRequest = class _ConfigureSecuritySettingsRequest { + static getAttributeTypeMap() { + return _ConfigureSecuritySettingsRequest.attributeTypeMap; + } + constructor() { + } +}; +_ConfigureSecuritySettingsRequest.discriminator = void 0; +_ConfigureSecuritySettingsRequest.attributeTypeMap = [ + { + "name": "cluster_preferences", + "baseName": "cluster_preferences", + "type": "ConfigureSecuritySettingsRequestClusterPreferences", + "format": "" + }, + { + "name": "org_preferences", + "baseName": "org_preferences", + "type": "Array", + "format": "" + } +]; +var ConfigureSecuritySettingsRequest = _ConfigureSecuritySettingsRequest; + +// models/ConfigureSecuritySettingsRequestClusterPreferences.ts +var _ConfigureSecuritySettingsRequestClusterPreferences = class _ConfigureSecuritySettingsRequestClusterPreferences { + static getAttributeTypeMap() { + return _ConfigureSecuritySettingsRequestClusterPreferences.attributeTypeMap; + } + constructor() { + } +}; +_ConfigureSecuritySettingsRequestClusterPreferences.discriminator = void 0; +_ConfigureSecuritySettingsRequestClusterPreferences.attributeTypeMap = [ + { + "name": "enable_partitioned_cookies", + "baseName": "enable_partitioned_cookies", + "type": "boolean", + "format": "" + }, + { + "name": "cors_whitelisted_urls", + "baseName": "cors_whitelisted_urls", + "type": "Array", + "format": "" + }, + { + "name": "csp_settings", + "baseName": "csp_settings", + "type": "CspSettingsInput", + "format": "" + }, + { + "name": "saml_redirect_urls", + "baseName": "saml_redirect_urls", + "type": "Array", + "format": "" + }, + { + "name": "non_embed_access", + "baseName": "non_embed_access", + "type": "ClusterNonEmbedAccessInput", + "format": "" + } +]; +var ConfigureSecuritySettingsRequestClusterPreferences = _ConfigureSecuritySettingsRequestClusterPreferences; + +// models/ConnectionConfigurationResponse.ts +var _ConnectionConfigurationResponse = class _ConnectionConfigurationResponse { + static getAttributeTypeMap() { + return _ConnectionConfigurationResponse.attributeTypeMap; + } + constructor() { + } +}; +_ConnectionConfigurationResponse.discriminator = void 0; +_ConnectionConfigurationResponse.attributeTypeMap = [ + { + "name": "configuration_identifier", + "baseName": "configuration_identifier", + "type": "string", + "format": "" + }, + { + "name": "name", + "baseName": "name", + "type": "string", + "format": "" + }, + { + "name": "description", + "baseName": "description", + "type": "string", + "format": "" + }, + { + "name": "configuration", + "baseName": "configuration", + "type": "any", + "format": "" + }, + { + "name": "policy_principals", + "baseName": "policy_principals", + "type": "Array", + "format": "" + }, + { + "name": "policy_processes", + "baseName": "policy_processes", + "type": "Array", + "format": "" + }, + { + "name": "disabled", + "baseName": "disabled", + "type": "boolean", + "format": "" + }, + { + "name": "data_warehouse_type", + "baseName": "data_warehouse_type", + "type": "ConnectionConfigurationResponseDataWarehouseTypeEnum", + "format": "" + }, + { + "name": "policy_type", + "baseName": "policy_type", + "type": "ConnectionConfigurationResponsePolicyTypeEnum", + "format": "" + }, + { + "name": "same_as_parent", + "baseName": "same_as_parent", + "type": "boolean", + "format": "" + }, + { + "name": "policy_process_options", + "baseName": "policy_process_options", + "type": "PolicyProcessOptions", + "format": "" + } +]; +var ConnectionConfigurationResponse = _ConnectionConfigurationResponse; + +// models/ConnectionConfigurationSearchRequest.ts +var _ConnectionConfigurationSearchRequest = class _ConnectionConfigurationSearchRequest { + static getAttributeTypeMap() { + return _ConnectionConfigurationSearchRequest.attributeTypeMap; + } + constructor() { + } +}; +_ConnectionConfigurationSearchRequest.discriminator = void 0; +_ConnectionConfigurationSearchRequest.attributeTypeMap = [ + { + "name": "connection_identifier", + "baseName": "connection_identifier", + "type": "string", + "format": "" + }, + { + "name": "configuration_identifier", + "baseName": "configuration_identifier", + "type": "string", + "format": "" + }, + { + "name": "policy_type", + "baseName": "policy_type", + "type": "ConnectionConfigurationSearchRequestPolicyTypeEnum", + "format": "" + } +]; +var ConnectionConfigurationSearchRequest = _ConnectionConfigurationSearchRequest; + +// models/ConnectionInput.ts +var _ConnectionInput = class _ConnectionInput { + static getAttributeTypeMap() { + return _ConnectionInput.attributeTypeMap; + } + constructor() { + } +}; +_ConnectionInput.discriminator = void 0; +_ConnectionInput.attributeTypeMap = [ + { + "name": "identifier", + "baseName": "identifier", + "type": "string", + "format": "" + }, + { + "name": "name_pattern", + "baseName": "name_pattern", + "type": "string", + "format": "" + }, + { + "name": "data_warehouse_objects", + "baseName": "data_warehouse_objects", + "type": "Array", + "format": "" + } +]; +var ConnectionInput = _ConnectionInput; + +// models/ContextPayloadV2Input.ts +var _ContextPayloadV2Input = class _ContextPayloadV2Input { + static getAttributeTypeMap() { + return _ContextPayloadV2Input.attributeTypeMap; + } + constructor() { + } +}; +_ContextPayloadV2Input.discriminator = void 0; +_ContextPayloadV2Input.attributeTypeMap = [ + { + "name": "type", + "baseName": "type", + "type": "ContextPayloadV2InputTypeEnum", + "format": "" + }, + { + "name": "data_source_context", + "baseName": "data_source_context", + "type": "DataSourceContextInput", + "format": "" + } +]; +var ContextPayloadV2Input = _ContextPayloadV2Input; + +// models/Conversation.ts +var _Conversation = class _Conversation { + static getAttributeTypeMap() { + return _Conversation.attributeTypeMap; + } + constructor() { + } +}; +_Conversation.discriminator = void 0; +_Conversation.attributeTypeMap = [ + { + "name": "conversation_identifier", + "baseName": "conversation_identifier", + "type": "string", + "format": "" + } +]; +var Conversation = _Conversation; + +// models/ConversationSettingsInput.ts +var _ConversationSettingsInput = class _ConversationSettingsInput { + static getAttributeTypeMap() { + return _ConversationSettingsInput.attributeTypeMap; + } + constructor() { + } +}; +_ConversationSettingsInput.discriminator = void 0; +_ConversationSettingsInput.attributeTypeMap = [ + { + "name": "enable_contextual_change_analysis", + "baseName": "enable_contextual_change_analysis", + "type": "boolean", + "format": "" + }, + { + "name": "enable_natural_language_answer_generation", + "baseName": "enable_natural_language_answer_generation", + "type": "boolean", + "format": "" + }, + { + "name": "enable_reasoning", + "baseName": "enable_reasoning", + "type": "boolean", + "format": "" + }, + { + "name": "enable_save_chat", + "baseName": "enable_save_chat", + "type": "boolean", + "format": "" + } +]; +var ConversationSettingsInput = _ConversationSettingsInput; + +// models/ConvertWorksheetToModelRequest.ts +var _ConvertWorksheetToModelRequest = class _ConvertWorksheetToModelRequest { + static getAttributeTypeMap() { + return _ConvertWorksheetToModelRequest.attributeTypeMap; + } + constructor() { + } +}; +_ConvertWorksheetToModelRequest.discriminator = void 0; +_ConvertWorksheetToModelRequest.attributeTypeMap = [ + { + "name": "worksheet_ids", + "baseName": "worksheet_ids", + "type": "Array", + "format": "" + }, + { + "name": "exclude_worksheet_ids", + "baseName": "exclude_worksheet_ids", + "type": "Array", + "format": "" + }, + { + "name": "convert_all", + "baseName": "convert_all", + "type": "boolean", + "format": "" + }, + { + "name": "apply_changes", + "baseName": "apply_changes", + "type": "boolean", + "format": "" + } +]; +var ConvertWorksheetToModelRequest = _ConvertWorksheetToModelRequest; + +// models/CopyObjectRequest.ts +var _CopyObjectRequest = class _CopyObjectRequest { + static getAttributeTypeMap() { + return _CopyObjectRequest.attributeTypeMap; + } + constructor() { + } +}; +_CopyObjectRequest.discriminator = void 0; +_CopyObjectRequest.attributeTypeMap = [ + { + "name": "description", + "baseName": "description", + "type": "string", + "format": "" + }, + { + "name": "identifier", + "baseName": "identifier", + "type": "string", + "format": "" + }, + { + "name": "type", + "baseName": "type", + "type": "CopyObjectRequestTypeEnum", + "format": "" + }, + { + "name": "title", + "baseName": "title", + "type": "string", + "format": "" + } +]; +var CopyObjectRequest = _CopyObjectRequest; + +// models/CreateAgentConversationRequest.ts +var _CreateAgentConversationRequest = class _CreateAgentConversationRequest { + static getAttributeTypeMap() { + return _CreateAgentConversationRequest.attributeTypeMap; + } + constructor() { + } +}; +_CreateAgentConversationRequest.discriminator = void 0; +_CreateAgentConversationRequest.attributeTypeMap = [ + { + "name": "metadata_context", + "baseName": "metadata_context", + "type": "CreateAgentConversationRequestMetadataContext", + "format": "" + }, + { + "name": "conversation_settings", + "baseName": "conversation_settings", + "type": "CreateAgentConversationRequestConversationSettings", + "format": "" + } +]; +var CreateAgentConversationRequest = _CreateAgentConversationRequest; + +// models/CreateAgentConversationRequestConversationSettings.ts +var _CreateAgentConversationRequestConversationSettings = class _CreateAgentConversationRequestConversationSettings { + static getAttributeTypeMap() { + return _CreateAgentConversationRequestConversationSettings.attributeTypeMap; + } + constructor() { + } +}; +_CreateAgentConversationRequestConversationSettings.discriminator = void 0; +_CreateAgentConversationRequestConversationSettings.attributeTypeMap = [ + { + "name": "enable_contextual_change_analysis", + "baseName": "enable_contextual_change_analysis", + "type": "boolean", + "format": "" + }, + { + "name": "enable_natural_language_answer_generation", + "baseName": "enable_natural_language_answer_generation", + "type": "boolean", + "format": "" + }, + { + "name": "enable_reasoning", + "baseName": "enable_reasoning", + "type": "boolean", + "format": "" + }, + { + "name": "enable_save_chat", + "baseName": "enable_save_chat", + "type": "boolean", + "format": "" + } +]; +var CreateAgentConversationRequestConversationSettings = _CreateAgentConversationRequestConversationSettings; + +// models/CreateAgentConversationRequestMetadataContext.ts +var _CreateAgentConversationRequestMetadataContext = class _CreateAgentConversationRequestMetadataContext { + static getAttributeTypeMap() { + return _CreateAgentConversationRequestMetadataContext.attributeTypeMap; + } + constructor() { + } +}; +_CreateAgentConversationRequestMetadataContext.discriminator = void 0; +_CreateAgentConversationRequestMetadataContext.attributeTypeMap = [ + { + "name": "type", + "baseName": "type", + "type": "CreateAgentConversationRequestMetadataContextTypeEnum", + "format": "" + }, + { + "name": "data_source_context", + "baseName": "data_source_context", + "type": "DataSourceContextInput", + "format": "" + } +]; +var CreateAgentConversationRequestMetadataContext = _CreateAgentConversationRequestMetadataContext; + +// models/CreateCalendarRequest.ts +var _CreateCalendarRequest = class _CreateCalendarRequest { + static getAttributeTypeMap() { + return _CreateCalendarRequest.attributeTypeMap; + } + constructor() { + } +}; +_CreateCalendarRequest.discriminator = void 0; +_CreateCalendarRequest.attributeTypeMap = [ + { + "name": "name", + "baseName": "name", + "type": "string", + "format": "" + }, + { + "name": "creation_method", + "baseName": "creation_method", + "type": "CreateCalendarRequestCreationMethodEnum", + "format": "" + }, + { + "name": "table_reference", + "baseName": "table_reference", + "type": "CreateCalendarRequestTableReference", + "format": "" + }, + { + "name": "start_date", + "baseName": "start_date", + "type": "string", + "format": "" + }, + { + "name": "end_date", + "baseName": "end_date", + "type": "string", + "format": "" + }, + { + "name": "calendar_type", + "baseName": "calendar_type", + "type": "CreateCalendarRequestCalendarTypeEnum", + "format": "" + }, + { + "name": "month_offset", + "baseName": "month_offset", + "type": "CreateCalendarRequestMonthOffsetEnum", + "format": "" + }, + { + "name": "start_day_of_week", + "baseName": "start_day_of_week", + "type": "CreateCalendarRequestStartDayOfWeekEnum", + "format": "" + }, + { + "name": "quarter_name_prefix", + "baseName": "quarter_name_prefix", + "type": "string", + "format": "" + }, + { + "name": "year_name_prefix", + "baseName": "year_name_prefix", + "type": "string", + "format": "" + } +]; +var CreateCalendarRequest = _CreateCalendarRequest; + +// models/CreateCalendarRequestTableReference.ts +var _CreateCalendarRequestTableReference = class _CreateCalendarRequestTableReference { + static getAttributeTypeMap() { + return _CreateCalendarRequestTableReference.attributeTypeMap; + } + constructor() { + } +}; +_CreateCalendarRequestTableReference.discriminator = void 0; +_CreateCalendarRequestTableReference.attributeTypeMap = [ + { + "name": "connection_identifier", + "baseName": "connection_identifier", + "type": "string", + "format": "" + }, + { + "name": "database_name", + "baseName": "database_name", + "type": "string", + "format": "" + }, + { + "name": "schema_name", + "baseName": "schema_name", + "type": "string", + "format": "" + }, + { + "name": "table_name", + "baseName": "table_name", + "type": "string", + "format": "" + } +]; +var CreateCalendarRequestTableReference = _CreateCalendarRequestTableReference; + +// models/CreateCollectionRequest.ts +var _CreateCollectionRequest = class _CreateCollectionRequest { + static getAttributeTypeMap() { + return _CreateCollectionRequest.attributeTypeMap; + } + constructor() { + } +}; +_CreateCollectionRequest.discriminator = void 0; +_CreateCollectionRequest.attributeTypeMap = [ + { + "name": "name", + "baseName": "name", + "type": "string", + "format": "" + }, + { + "name": "description", + "baseName": "description", + "type": "string", + "format": "" + }, + { + "name": "metadata", + "baseName": "metadata", + "type": "Array", + "format": "" + } +]; +var CreateCollectionRequest = _CreateCollectionRequest; + +// models/CreateConfigRequest.ts +var _CreateConfigRequest = class _CreateConfigRequest { + static getAttributeTypeMap() { + return _CreateConfigRequest.attributeTypeMap; + } + constructor() { + } +}; +_CreateConfigRequest.discriminator = void 0; +_CreateConfigRequest.attributeTypeMap = [ + { + "name": "repository_url", + "baseName": "repository_url", + "type": "string", + "format": "" + }, + { + "name": "username", + "baseName": "username", + "type": "string", + "format": "" + }, + { + "name": "access_token", + "baseName": "access_token", + "type": "string", + "format": "" + }, + { + "name": "org_identifier", + "baseName": "org_identifier", + "type": "string", + "format": "" + }, + { + "name": "branch_names", + "baseName": "branch_names", + "type": "Array", + "format": "" + }, + { + "name": "commit_branch_name", + "baseName": "commit_branch_name", + "type": "string", + "format": "" + }, + { + "name": "enable_guid_mapping", + "baseName": "enable_guid_mapping", + "type": "boolean", + "format": "" + }, + { + "name": "configuration_branch_name", + "baseName": "configuration_branch_name", + "type": "string", + "format": "" + } +]; +var CreateConfigRequest = _CreateConfigRequest; + +// models/CreateConnectionConfigurationRequest.ts +var _CreateConnectionConfigurationRequest = class _CreateConnectionConfigurationRequest { + static getAttributeTypeMap() { + return _CreateConnectionConfigurationRequest.attributeTypeMap; + } + constructor() { + } +}; +_CreateConnectionConfigurationRequest.discriminator = void 0; +_CreateConnectionConfigurationRequest.attributeTypeMap = [ + { + "name": "name", + "baseName": "name", + "type": "string", + "format": "" + }, + { + "name": "description", + "baseName": "description", + "type": "string", + "format": "" + }, + { + "name": "connection_identifier", + "baseName": "connection_identifier", + "type": "string", + "format": "" + }, + { + "name": "same_as_parent", + "baseName": "same_as_parent", + "type": "boolean", + "format": "" + }, + { + "name": "policy_process_options", + "baseName": "policy_process_options", + "type": "CreateConnectionConfigurationRequestPolicyProcessOptions", + "format": "" + }, + { + "name": "authentication_type", + "baseName": "authentication_type", + "type": "CreateConnectionConfigurationRequestAuthenticationTypeEnum", + "format": "" + }, + { + "name": "configuration", + "baseName": "configuration", + "type": "any", + "format": "" + }, + { + "name": "policy_type", + "baseName": "policy_type", + "type": "CreateConnectionConfigurationRequestPolicyTypeEnum", + "format": "" + }, + { + "name": "policy_principals", + "baseName": "policy_principals", + "type": "Array", + "format": "" + }, + { + "name": "policy_processes", + "baseName": "policy_processes", + "type": "Array", + "format": "" + } +]; +var CreateConnectionConfigurationRequest = _CreateConnectionConfigurationRequest; + +// models/CreateConnectionConfigurationRequestPolicyProcessOptions.ts +var _CreateConnectionConfigurationRequestPolicyProcessOptions = class _CreateConnectionConfigurationRequestPolicyProcessOptions { + static getAttributeTypeMap() { + return _CreateConnectionConfigurationRequestPolicyProcessOptions.attributeTypeMap; + } + constructor() { + } +}; +_CreateConnectionConfigurationRequestPolicyProcessOptions.discriminator = void 0; +_CreateConnectionConfigurationRequestPolicyProcessOptions.attributeTypeMap = [ + { + "name": "impersonate_user", + "baseName": "impersonate_user", + "type": "string", + "format": "" + } +]; +var CreateConnectionConfigurationRequestPolicyProcessOptions = _CreateConnectionConfigurationRequestPolicyProcessOptions; + +// models/CreateConnectionRequest.ts +var _CreateConnectionRequest = class _CreateConnectionRequest { + static getAttributeTypeMap() { + return _CreateConnectionRequest.attributeTypeMap; + } + constructor() { + } +}; +_CreateConnectionRequest.discriminator = void 0; +_CreateConnectionRequest.attributeTypeMap = [ + { + "name": "name", + "baseName": "name", + "type": "string", + "format": "" + }, + { + "name": "description", + "baseName": "description", + "type": "string", + "format": "" + }, + { + "name": "data_warehouse_type", + "baseName": "data_warehouse_type", + "type": "CreateConnectionRequestDataWarehouseTypeEnum", + "format": "" + }, + { + "name": "data_warehouse_config", + "baseName": "data_warehouse_config", + "type": "any", + "format": "" + }, + { + "name": "validate", + "baseName": "validate", + "type": "boolean", + "format": "" + } +]; +var CreateConnectionRequest = _CreateConnectionRequest; + +// models/CreateConnectionResponse.ts +var _CreateConnectionResponse = class _CreateConnectionResponse { + static getAttributeTypeMap() { + return _CreateConnectionResponse.attributeTypeMap; + } + constructor() { + } +}; +_CreateConnectionResponse.discriminator = void 0; +_CreateConnectionResponse.attributeTypeMap = [ + { + "name": "id", + "baseName": "id", + "type": "string", + "format": "" + }, + { + "name": "name", + "baseName": "name", + "type": "string", + "format": "" + }, + { + "name": "data_warehouse_type", + "baseName": "data_warehouse_type", + "type": "CreateConnectionResponseDataWarehouseTypeEnum", + "format": "" + }, + { + "name": "details", + "baseName": "details", + "type": "any", + "format": "" + } +]; +var CreateConnectionResponse = _CreateConnectionResponse; + +// models/CreateConversationRequest.ts +var _CreateConversationRequest = class _CreateConversationRequest { + static getAttributeTypeMap() { + return _CreateConversationRequest.attributeTypeMap; + } + constructor() { + } +}; +_CreateConversationRequest.discriminator = void 0; +_CreateConversationRequest.attributeTypeMap = [ + { + "name": "metadata_identifier", + "baseName": "metadata_identifier", + "type": "string", + "format": "" + }, + { + "name": "tokens", + "baseName": "tokens", + "type": "string", + "format": "" + } +]; +var CreateConversationRequest = _CreateConversationRequest; + +// models/CreateCustomActionRequest.ts +var _CreateCustomActionRequest = class _CreateCustomActionRequest { + static getAttributeTypeMap() { + return _CreateCustomActionRequest.attributeTypeMap; + } + constructor() { + } +}; +_CreateCustomActionRequest.discriminator = void 0; +_CreateCustomActionRequest.attributeTypeMap = [ + { + "name": "name", + "baseName": "name", + "type": "string", + "format": "" + }, + { + "name": "action_details", + "baseName": "action_details", + "type": "CreateCustomActionRequestActionDetails", + "format": "" + }, + { + "name": "associate_metadata", + "baseName": "associate_metadata", + "type": "Array", + "format": "" + }, + { + "name": "default_action_config", + "baseName": "default_action_config", + "type": "CreateCustomActionRequestDefaultActionConfig", + "format": "" + }, + { + "name": "group_identifiers", + "baseName": "group_identifiers", + "type": "Array", + "format": "" + } +]; +var CreateCustomActionRequest = _CreateCustomActionRequest; + +// models/CreateCustomActionRequestActionDetails.ts +var _CreateCustomActionRequestActionDetails = class _CreateCustomActionRequestActionDetails { + static getAttributeTypeMap() { + return _CreateCustomActionRequestActionDetails.attributeTypeMap; + } + constructor() { + } +}; +_CreateCustomActionRequestActionDetails.discriminator = void 0; +_CreateCustomActionRequestActionDetails.attributeTypeMap = [ + { + "name": "CALLBACK", + "baseName": "CALLBACK", + "type": "CALLBACKInputMandatory", + "format": "" + }, + { + "name": "URL", + "baseName": "URL", + "type": "URLInputMandatory", + "format": "" + } +]; +var CreateCustomActionRequestActionDetails = _CreateCustomActionRequestActionDetails; + +// models/CreateCustomActionRequestDefaultActionConfig.ts +var _CreateCustomActionRequestDefaultActionConfig = class _CreateCustomActionRequestDefaultActionConfig { + static getAttributeTypeMap() { + return _CreateCustomActionRequestDefaultActionConfig.attributeTypeMap; + } + constructor() { + } +}; +_CreateCustomActionRequestDefaultActionConfig.discriminator = void 0; +_CreateCustomActionRequestDefaultActionConfig.attributeTypeMap = [ + { + "name": "visibility", + "baseName": "visibility", + "type": "boolean", + "format": "" + } +]; +var CreateCustomActionRequestDefaultActionConfig = _CreateCustomActionRequestDefaultActionConfig; + +// models/CreateEmailCustomizationRequest.ts +var _CreateEmailCustomizationRequest = class _CreateEmailCustomizationRequest { + static getAttributeTypeMap() { + return _CreateEmailCustomizationRequest.attributeTypeMap; + } + constructor() { + } +}; +_CreateEmailCustomizationRequest.discriminator = void 0; +_CreateEmailCustomizationRequest.attributeTypeMap = [ + { + "name": "template_properties", + "baseName": "template_properties", + "type": "CreateEmailCustomizationRequestTemplateProperties", + "format": "" + }, + { + "name": "org_identifier", + "baseName": "org_identifier", + "type": "string", + "format": "" + } +]; +var CreateEmailCustomizationRequest = _CreateEmailCustomizationRequest; + +// models/CreateEmailCustomizationRequestTemplateProperties.ts +var _CreateEmailCustomizationRequestTemplateProperties = class _CreateEmailCustomizationRequestTemplateProperties { + static getAttributeTypeMap() { + return _CreateEmailCustomizationRequestTemplateProperties.attributeTypeMap; + } + constructor() { + } +}; +_CreateEmailCustomizationRequestTemplateProperties.discriminator = void 0; +_CreateEmailCustomizationRequestTemplateProperties.attributeTypeMap = [ + { + "name": "cta_button_bg_color", + "baseName": "cta_button_bg_color", + "type": "string", + "format": "" + }, + { + "name": "cta_text_font_color", + "baseName": "cta_text_font_color", + "type": "string", + "format": "" + }, + { + "name": "primary_bg_color", + "baseName": "primary_bg_color", + "type": "string", + "format": "" + }, + { + "name": "home_url", + "baseName": "home_url", + "type": "string", + "format": "" + }, + { + "name": "logo_url", + "baseName": "logo_url", + "type": "string", + "format": "" + }, + { + "name": "font_family", + "baseName": "font_family", + "type": "string", + "format": "" + }, + { + "name": "product_name", + "baseName": "product_name", + "type": "string", + "format": "" + }, + { + "name": "footer_address", + "baseName": "footer_address", + "type": "string", + "format": "" + }, + { + "name": "footer_phone", + "baseName": "footer_phone", + "type": "string", + "format": "" + }, + { + "name": "replacement_value_for_liveboard", + "baseName": "replacement_value_for_liveboard", + "type": "string", + "format": "" + }, + { + "name": "replacement_value_for_answer", + "baseName": "replacement_value_for_answer", + "type": "string", + "format": "" + }, + { + "name": "replacement_value_for_spot_iq", + "baseName": "replacement_value_for_spot_iq", + "type": "string", + "format": "" + }, + { + "name": "hide_footer_address", + "baseName": "hide_footer_address", + "type": "boolean", + "format": "" + }, + { + "name": "hide_footer_phone", + "baseName": "hide_footer_phone", + "type": "boolean", + "format": "" + }, + { + "name": "hide_manage_notification", + "baseName": "hide_manage_notification", + "type": "boolean", + "format": "" + }, + { + "name": "hide_mobile_app_nudge", + "baseName": "hide_mobile_app_nudge", + "type": "boolean", + "format": "" + }, + { + "name": "hide_privacy_policy", + "baseName": "hide_privacy_policy", + "type": "boolean", + "format": "" + }, + { + "name": "hide_product_name", + "baseName": "hide_product_name", + "type": "boolean", + "format": "" + }, + { + "name": "hide_ts_vocabulary_definitions", + "baseName": "hide_ts_vocabulary_definitions", + "type": "boolean", + "format": "" + }, + { + "name": "hide_notification_status", + "baseName": "hide_notification_status", + "type": "boolean", + "format": "" + }, + { + "name": "hide_error_message", + "baseName": "hide_error_message", + "type": "boolean", + "format": "" + }, + { + "name": "hide_unsubscribe_link", + "baseName": "hide_unsubscribe_link", + "type": "boolean", + "format": "" + }, + { + "name": "hide_modify_alert", + "baseName": "hide_modify_alert", + "type": "boolean", + "format": "" + }, + { + "name": "company_privacy_policy_url", + "baseName": "company_privacy_policy_url", + "type": "string", + "format": "" + }, + { + "name": "company_website_url", + "baseName": "company_website_url", + "type": "string", + "format": "" + }, + { + "name": "contact_support_url", + "baseName": "contact_support_url", + "type": "string", + "format": "" + }, + { + "name": "hide_contact_support_url", + "baseName": "hide_contact_support_url", + "type": "boolean", + "format": "" + }, + { + "name": "hide_logo_url", + "baseName": "hide_logo_url", + "type": "boolean", + "format": "" + } +]; +var CreateEmailCustomizationRequestTemplateProperties = _CreateEmailCustomizationRequestTemplateProperties; + +// models/CreateEmailCustomizationResponse.ts +var _CreateEmailCustomizationResponse = class _CreateEmailCustomizationResponse { + static getAttributeTypeMap() { + return _CreateEmailCustomizationResponse.attributeTypeMap; + } + constructor() { + } +}; +_CreateEmailCustomizationResponse.discriminator = void 0; +_CreateEmailCustomizationResponse.attributeTypeMap = [ + { + "name": "tenant_id", + "baseName": "tenant_id", + "type": "string", + "format": "" + }, + { + "name": "org", + "baseName": "org", + "type": "OrgType", + "format": "" + }, + { + "name": "name", + "baseName": "name", + "type": "string", + "format": "" + }, + { + "name": "template_properties", + "baseName": "template_properties", + "type": "any", + "format": "" + } +]; +var CreateEmailCustomizationResponse = _CreateEmailCustomizationResponse; + +// models/CreateOrgRequest.ts +var _CreateOrgRequest = class _CreateOrgRequest { + static getAttributeTypeMap() { + return _CreateOrgRequest.attributeTypeMap; + } + constructor() { + } +}; +_CreateOrgRequest.discriminator = void 0; +_CreateOrgRequest.attributeTypeMap = [ + { + "name": "name", + "baseName": "name", + "type": "string", + "format": "" + }, + { + "name": "description", + "baseName": "description", + "type": "string", + "format": "" + } +]; +var CreateOrgRequest = _CreateOrgRequest; + +// models/CreateRoleRequest.ts +var _CreateRoleRequest = class _CreateRoleRequest { + static getAttributeTypeMap() { + return _CreateRoleRequest.attributeTypeMap; + } + constructor() { + } +}; +_CreateRoleRequest.discriminator = void 0; +_CreateRoleRequest.attributeTypeMap = [ + { + "name": "name", + "baseName": "name", + "type": "string", + "format": "" + }, + { + "name": "description", + "baseName": "description", + "type": "string", + "format": "" + }, + { + "name": "privileges", + "baseName": "privileges", + "type": "Array", + "format": "" + }, + { + "name": "read_only", + "baseName": "read_only", + "type": "boolean", + "format": "" + } +]; +var CreateRoleRequest = _CreateRoleRequest; + +// models/CreateScheduleRequest.ts +var _CreateScheduleRequest = class _CreateScheduleRequest { + static getAttributeTypeMap() { + return _CreateScheduleRequest.attributeTypeMap; + } + constructor() { + } +}; +_CreateScheduleRequest.discriminator = void 0; +_CreateScheduleRequest.attributeTypeMap = [ + { + "name": "name", + "baseName": "name", + "type": "string", + "format": "" + }, + { + "name": "description", + "baseName": "description", + "type": "string", + "format": "" + }, + { + "name": "metadata_type", + "baseName": "metadata_type", + "type": "CreateScheduleRequestMetadataTypeEnum", + "format": "" + }, + { + "name": "metadata_identifier", + "baseName": "metadata_identifier", + "type": "string", + "format": "" + }, + { + "name": "file_format", + "baseName": "file_format", + "type": "CreateScheduleRequestFileFormatEnum", + "format": "" + }, + { + "name": "liveboard_options", + "baseName": "liveboard_options", + "type": "CreateScheduleRequestLiveboardOptions", + "format": "" + }, + { + "name": "pdf_options", + "baseName": "pdf_options", + "type": "CreateScheduleRequestPdfOptions", + "format": "" + }, + { + "name": "time_zone", + "baseName": "time_zone", + "type": "CreateScheduleRequestTimeZoneEnum", + "format": "" + }, + { + "name": "frequency", + "baseName": "frequency", + "type": "CreateScheduleRequestFrequency", + "format": "" + }, + { + "name": "recipient_details", + "baseName": "recipient_details", + "type": "CreateScheduleRequestRecipientDetails", + "format": "" + }, + { + "name": "personalised_view_id", + "baseName": "personalised_view_id", + "type": "string", + "format": "" + } +]; +var CreateScheduleRequest = _CreateScheduleRequest; + +// models/CreateScheduleRequestFrequency.ts +var _CreateScheduleRequestFrequency = class _CreateScheduleRequestFrequency { + static getAttributeTypeMap() { + return _CreateScheduleRequestFrequency.attributeTypeMap; + } + constructor() { + } +}; +_CreateScheduleRequestFrequency.discriminator = void 0; +_CreateScheduleRequestFrequency.attributeTypeMap = [ + { + "name": "cron_expression", + "baseName": "cron_expression", + "type": "CronExpressionInput", + "format": "" + } +]; +var CreateScheduleRequestFrequency = _CreateScheduleRequestFrequency; + +// models/CreateScheduleRequestLiveboardOptions.ts +var _CreateScheduleRequestLiveboardOptions = class _CreateScheduleRequestLiveboardOptions { + static getAttributeTypeMap() { + return _CreateScheduleRequestLiveboardOptions.attributeTypeMap; + } + constructor() { + } +}; +_CreateScheduleRequestLiveboardOptions.discriminator = void 0; +_CreateScheduleRequestLiveboardOptions.attributeTypeMap = [ + { + "name": "visualization_identifiers", + "baseName": "visualization_identifiers", + "type": "Array", + "format": "" + } +]; +var CreateScheduleRequestLiveboardOptions = _CreateScheduleRequestLiveboardOptions; + +// models/CreateScheduleRequestPdfOptions.ts +var _CreateScheduleRequestPdfOptions = class _CreateScheduleRequestPdfOptions { + static getAttributeTypeMap() { + return _CreateScheduleRequestPdfOptions.attributeTypeMap; + } + constructor() { + } +}; +_CreateScheduleRequestPdfOptions.discriminator = void 0; +_CreateScheduleRequestPdfOptions.attributeTypeMap = [ + { + "name": "complete_liveboard", + "baseName": "complete_liveboard", + "type": "boolean", + "format": "" + }, + { + "name": "include_cover_page", + "baseName": "include_cover_page", + "type": "boolean", + "format": "" + }, + { + "name": "include_custom_logo", + "baseName": "include_custom_logo", + "type": "boolean", + "format": "" + }, + { + "name": "include_filter_page", + "baseName": "include_filter_page", + "type": "boolean", + "format": "" + }, + { + "name": "include_page_number", + "baseName": "include_page_number", + "type": "boolean", + "format": "" + }, + { + "name": "page_footer_text", + "baseName": "page_footer_text", + "type": "string", + "format": "" + }, + { + "name": "page_orientation", + "baseName": "page_orientation", + "type": "string", + "format": "" + }, + { + "name": "page_size", + "baseName": "page_size", + "type": "CreateScheduleRequestPdfOptionsPageSizeEnum", + "format": "" + }, + { + "name": "truncate_table", + "baseName": "truncate_table", + "type": "boolean", + "format": "" + } +]; +var CreateScheduleRequestPdfOptions = _CreateScheduleRequestPdfOptions; + +// models/CreateScheduleRequestRecipientDetails.ts +var _CreateScheduleRequestRecipientDetails = class _CreateScheduleRequestRecipientDetails { + static getAttributeTypeMap() { + return _CreateScheduleRequestRecipientDetails.attributeTypeMap; + } + constructor() { + } +}; +_CreateScheduleRequestRecipientDetails.discriminator = void 0; +_CreateScheduleRequestRecipientDetails.attributeTypeMap = [ + { + "name": "emails", + "baseName": "emails", + "type": "Array", + "format": "" + }, + { + "name": "principals", + "baseName": "principals", + "type": "Array", + "format": "" + } +]; +var CreateScheduleRequestRecipientDetails = _CreateScheduleRequestRecipientDetails; + +// models/CreateTagRequest.ts +var _CreateTagRequest = class _CreateTagRequest { + static getAttributeTypeMap() { + return _CreateTagRequest.attributeTypeMap; + } + constructor() { + } +}; +_CreateTagRequest.discriminator = void 0; +_CreateTagRequest.attributeTypeMap = [ + { + "name": "name", + "baseName": "name", + "type": "string", + "format": "" + }, + { + "name": "color", + "baseName": "color", + "type": "string", + "format": "" + } +]; +var CreateTagRequest = _CreateTagRequest; + +// models/CreateUserGroupRequest.ts +var _CreateUserGroupRequest = class _CreateUserGroupRequest { + static getAttributeTypeMap() { + return _CreateUserGroupRequest.attributeTypeMap; + } + constructor() { + } +}; +_CreateUserGroupRequest.discriminator = void 0; +_CreateUserGroupRequest.attributeTypeMap = [ + { + "name": "name", + "baseName": "name", + "type": "string", + "format": "" + }, + { + "name": "display_name", + "baseName": "display_name", + "type": "string", + "format": "" + }, + { + "name": "default_liveboard_identifiers", + "baseName": "default_liveboard_identifiers", + "type": "Array", + "format": "" + }, + { + "name": "description", + "baseName": "description", + "type": "string", + "format": "" + }, + { + "name": "privileges", + "baseName": "privileges", + "type": "Array", + "format": "" + }, + { + "name": "sub_group_identifiers", + "baseName": "sub_group_identifiers", + "type": "Array", + "format": "" + }, + { + "name": "type", + "baseName": "type", + "type": "CreateUserGroupRequestTypeEnum", + "format": "" + }, + { + "name": "user_identifiers", + "baseName": "user_identifiers", + "type": "Array", + "format": "" + }, + { + "name": "visibility", + "baseName": "visibility", + "type": "CreateUserGroupRequestVisibilityEnum", + "format": "" + }, + { + "name": "role_identifiers", + "baseName": "role_identifiers", + "type": "Array", + "format": "" + } +]; +var CreateUserGroupRequest = _CreateUserGroupRequest; + +// models/CreateUserRequest.ts +var _CreateUserRequest = class _CreateUserRequest { + static getAttributeTypeMap() { + return _CreateUserRequest.attributeTypeMap; + } + constructor() { + } +}; +_CreateUserRequest.discriminator = void 0; +_CreateUserRequest.attributeTypeMap = [ + { + "name": "name", + "baseName": "name", + "type": "string", + "format": "" + }, + { + "name": "display_name", + "baseName": "display_name", + "type": "string", + "format": "" + }, + { + "name": "password", + "baseName": "password", + "type": "string", + "format": "" + }, + { + "name": "email", + "baseName": "email", + "type": "string", + "format": "" + }, + { + "name": "account_type", + "baseName": "account_type", + "type": "CreateUserRequestAccountTypeEnum", + "format": "" + }, + { + "name": "account_status", + "baseName": "account_status", + "type": "CreateUserRequestAccountStatusEnum", + "format": "" + }, + { + "name": "org_identifiers", + "baseName": "org_identifiers", + "type": "Array", + "format": "" + }, + { + "name": "group_identifiers", + "baseName": "group_identifiers", + "type": "Array", + "format": "" + }, + { + "name": "visibility", + "baseName": "visibility", + "type": "CreateUserRequestVisibilityEnum", + "format": "" + }, + { + "name": "notify_on_share", + "baseName": "notify_on_share", + "type": "boolean", + "format": "" + }, + { + "name": "show_onboarding_experience", + "baseName": "show_onboarding_experience", + "type": "boolean", + "format": "" + }, + { + "name": "onboarding_experience_completed", + "baseName": "onboarding_experience_completed", + "type": "boolean", + "format": "" + }, + { + "name": "home_liveboard_identifier", + "baseName": "home_liveboard_identifier", + "type": "string", + "format": "" + }, + { + "name": "favorite_metadata", + "baseName": "favorite_metadata", + "type": "Array", + "format": "" + }, + { + "name": "preferred_locale", + "baseName": "preferred_locale", + "type": "CreateUserRequestPreferredLocaleEnum", + "format": "" + }, + { + "name": "use_browser_language", + "baseName": "use_browser_language", + "type": "boolean", + "format": "" + }, + { + "name": "extended_properties", + "baseName": "extended_properties", + "type": "any", + "format": "" + }, + { + "name": "extended_preferences", + "baseName": "extended_preferences", + "type": "any", + "format": "" + }, + { + "name": "trigger_welcome_email", + "baseName": "trigger_welcome_email", + "type": "boolean", + "format": "" + }, + { + "name": "trigger_activation_email", + "baseName": "trigger_activation_email", + "type": "boolean", + "format": "" + } +]; +var CreateUserRequest = _CreateUserRequest; + +// models/CreateVariableRequest.ts +var _CreateVariableRequest = class _CreateVariableRequest { + static getAttributeTypeMap() { + return _CreateVariableRequest.attributeTypeMap; + } + constructor() { + } +}; +_CreateVariableRequest.discriminator = void 0; +_CreateVariableRequest.attributeTypeMap = [ + { + "name": "type", + "baseName": "type", + "type": "CreateVariableRequestTypeEnum", + "format": "" + }, + { + "name": "name", + "baseName": "name", + "type": "string", + "format": "" + }, + { + "name": "is_sensitive", + "baseName": "is_sensitive", + "type": "boolean", + "format": "" + }, + { + "name": "data_type", + "baseName": "data_type", + "type": "CreateVariableRequestDataTypeEnum", + "format": "" + } +]; +var CreateVariableRequest = _CreateVariableRequest; + +// models/CreateWebhookConfigurationRequest.ts +var _CreateWebhookConfigurationRequest = class _CreateWebhookConfigurationRequest { + static getAttributeTypeMap() { + return _CreateWebhookConfigurationRequest.attributeTypeMap; + } + constructor() { + } +}; +_CreateWebhookConfigurationRequest.discriminator = void 0; +_CreateWebhookConfigurationRequest.attributeTypeMap = [ + { + "name": "name", + "baseName": "name", + "type": "string", + "format": "" + }, + { + "name": "description", + "baseName": "description", + "type": "string", + "format": "" + }, + { + "name": "url", + "baseName": "url", + "type": "string", + "format": "" + }, + { + "name": "url_params", + "baseName": "url_params", + "type": "any", + "format": "" + }, + { + "name": "events", + "baseName": "events", + "type": "Array", + "format": "" + }, + { + "name": "authentication", + "baseName": "authentication", + "type": "CreateWebhookConfigurationRequestAuthentication", + "format": "" + }, + { + "name": "signature_verification", + "baseName": "signature_verification", + "type": "CreateWebhookConfigurationRequestSignatureVerification", + "format": "" + }, + { + "name": "storage_destination", + "baseName": "storage_destination", + "type": "CreateWebhookConfigurationRequestStorageDestination", + "format": "" + }, + { + "name": "additional_headers", + "baseName": "additional_headers", + "type": "Array", + "format": "" + } +]; +var CreateWebhookConfigurationRequest = _CreateWebhookConfigurationRequest; + +// models/CreateWebhookConfigurationRequestAuthentication.ts +var _CreateWebhookConfigurationRequestAuthentication = class _CreateWebhookConfigurationRequestAuthentication { + static getAttributeTypeMap() { + return _CreateWebhookConfigurationRequestAuthentication.attributeTypeMap; + } + constructor() { + } +}; +_CreateWebhookConfigurationRequestAuthentication.discriminator = void 0; +_CreateWebhookConfigurationRequestAuthentication.attributeTypeMap = [ + { + "name": "API_KEY", + "baseName": "API_KEY", + "type": "WebhookAuthApiKeyInput", + "format": "" + }, + { + "name": "BASIC_AUTH", + "baseName": "BASIC_AUTH", + "type": "WebhookAuthBasicAuthInput", + "format": "" + }, + { + "name": "BEARER_TOKEN", + "baseName": "BEARER_TOKEN", + "type": "string", + "format": "" + }, + { + "name": "OAUTH2", + "baseName": "OAUTH2", + "type": "WebhookAuthOAuth2Input", + "format": "" + } +]; +var CreateWebhookConfigurationRequestAuthentication = _CreateWebhookConfigurationRequestAuthentication; + +// models/CreateWebhookConfigurationRequestSignatureVerification.ts +var _CreateWebhookConfigurationRequestSignatureVerification = class _CreateWebhookConfigurationRequestSignatureVerification { + static getAttributeTypeMap() { + return _CreateWebhookConfigurationRequestSignatureVerification.attributeTypeMap; + } + constructor() { + } +}; +_CreateWebhookConfigurationRequestSignatureVerification.discriminator = void 0; +_CreateWebhookConfigurationRequestSignatureVerification.attributeTypeMap = [ + { + "name": "type", + "baseName": "type", + "type": "CreateWebhookConfigurationRequestSignatureVerificationTypeEnum", + "format": "" + }, + { + "name": "header", + "baseName": "header", + "type": "string", + "format": "" + }, + { + "name": "algorithm", + "baseName": "algorithm", + "type": "CreateWebhookConfigurationRequestSignatureVerificationAlgorithmEnum", + "format": "" + }, + { + "name": "secret", + "baseName": "secret", + "type": "string", + "format": "" + } +]; +var CreateWebhookConfigurationRequestSignatureVerification = _CreateWebhookConfigurationRequestSignatureVerification; + +// models/CreateWebhookConfigurationRequestStorageDestination.ts +var _CreateWebhookConfigurationRequestStorageDestination = class _CreateWebhookConfigurationRequestStorageDestination { + static getAttributeTypeMap() { + return _CreateWebhookConfigurationRequestStorageDestination.attributeTypeMap; + } + constructor() { + } +}; +_CreateWebhookConfigurationRequestStorageDestination.discriminator = void 0; +_CreateWebhookConfigurationRequestStorageDestination.attributeTypeMap = [ + { + "name": "storage_type", + "baseName": "storage_type", + "type": "CreateWebhookConfigurationRequestStorageDestinationStorageTypeEnum", + "format": "" + }, + { + "name": "storage_config", + "baseName": "storage_config", + "type": "StorageConfigInput", + "format": "" + } +]; +var CreateWebhookConfigurationRequestStorageDestination = _CreateWebhookConfigurationRequestStorageDestination; + +// models/CronExpression.ts +var _CronExpression = class _CronExpression { + static getAttributeTypeMap() { + return _CronExpression.attributeTypeMap; + } + constructor() { + } +}; +_CronExpression.discriminator = void 0; +_CronExpression.attributeTypeMap = [ + { + "name": "day_of_month", + "baseName": "day_of_month", + "type": "string", + "format": "" + }, + { + "name": "day_of_week", + "baseName": "day_of_week", + "type": "string", + "format": "" + }, + { + "name": "hour", + "baseName": "hour", + "type": "string", + "format": "" + }, + { + "name": "minute", + "baseName": "minute", + "type": "string", + "format": "" + }, + { + "name": "month", + "baseName": "month", + "type": "string", + "format": "" + }, + { + "name": "second", + "baseName": "second", + "type": "string", + "format": "" + } +]; +var CronExpression = _CronExpression; + +// models/CronExpressionInput.ts +var _CronExpressionInput = class _CronExpressionInput { + static getAttributeTypeMap() { + return _CronExpressionInput.attributeTypeMap; + } + constructor() { + } +}; +_CronExpressionInput.discriminator = void 0; +_CronExpressionInput.attributeTypeMap = [ + { + "name": "day_of_month", + "baseName": "day_of_month", + "type": "string", + "format": "" + }, + { + "name": "day_of_week", + "baseName": "day_of_week", + "type": "string", + "format": "" + }, + { + "name": "hour", + "baseName": "hour", + "type": "string", + "format": "" + }, + { + "name": "minute", + "baseName": "minute", + "type": "string", + "format": "" + }, + { + "name": "month", + "baseName": "month", + "type": "string", + "format": "" + }, + { + "name": "second", + "baseName": "second", + "type": "string", + "format": "" + } +]; +var CronExpressionInput = _CronExpressionInput; + +// models/CspSettings.ts +var _CspSettings = class _CspSettings { + static getAttributeTypeMap() { + return _CspSettings.attributeTypeMap; + } + constructor() { + } +}; +_CspSettings.discriminator = void 0; +_CspSettings.attributeTypeMap = [ + { + "name": "connect_src_urls", + "baseName": "connect_src_urls", + "type": "Array", + "format": "" + }, + { + "name": "font_src_urls", + "baseName": "font_src_urls", + "type": "Array", + "format": "" + }, + { + "name": "visual_embed_hosts", + "baseName": "visual_embed_hosts", + "type": "Array", + "format": "" + }, + { + "name": "iframe_src_urls", + "baseName": "iframe_src_urls", + "type": "Array", + "format": "" + }, + { + "name": "img_src_urls", + "baseName": "img_src_urls", + "type": "Array", + "format": "" + }, + { + "name": "script_src_urls", + "baseName": "script_src_urls", + "type": "ScriptSrcUrls", + "format": "" + }, + { + "name": "style_src_urls", + "baseName": "style_src_urls", + "type": "Array", + "format": "" + } +]; +var CspSettings = _CspSettings; + +// models/CspSettingsInput.ts +var _CspSettingsInput = class _CspSettingsInput { + static getAttributeTypeMap() { + return _CspSettingsInput.attributeTypeMap; + } + constructor() { + } +}; +_CspSettingsInput.discriminator = void 0; +_CspSettingsInput.attributeTypeMap = [ + { + "name": "connect_src_urls", + "baseName": "connect_src_urls", + "type": "Array", + "format": "" + }, + { + "name": "font_src_urls", + "baseName": "font_src_urls", + "type": "Array", + "format": "" + }, + { + "name": "visual_embed_hosts", + "baseName": "visual_embed_hosts", + "type": "Array", + "format": "" + }, + { + "name": "iframe_src_urls", + "baseName": "iframe_src_urls", + "type": "Array", + "format": "" + }, + { + "name": "img_src_urls", + "baseName": "img_src_urls", + "type": "Array", + "format": "" + }, + { + "name": "script_src_urls", + "baseName": "script_src_urls", + "type": "ScriptSrcUrlsInput", + "format": "" + }, + { + "name": "style_src_urls", + "baseName": "style_src_urls", + "type": "Array", + "format": "" + } +]; +var CspSettingsInput = _CspSettingsInput; + +// models/CustomActionMetadataTypeInput.ts +var _CustomActionMetadataTypeInput = class _CustomActionMetadataTypeInput { + static getAttributeTypeMap() { + return _CustomActionMetadataTypeInput.attributeTypeMap; + } + constructor() { + } +}; +_CustomActionMetadataTypeInput.discriminator = void 0; +_CustomActionMetadataTypeInput.attributeTypeMap = [ + { + "name": "type", + "baseName": "type", + "type": "CustomActionMetadataTypeInputTypeEnum", + "format": "" + }, + { + "name": "identifier", + "baseName": "identifier", + "type": "string", + "format": "" + } +]; +var CustomActionMetadataTypeInput = _CustomActionMetadataTypeInput; + +// models/DataSource.ts +var _DataSource = class _DataSource { + static getAttributeTypeMap() { + return _DataSource.attributeTypeMap; + } + constructor() { + } +}; +_DataSource.discriminator = void 0; +_DataSource.attributeTypeMap = [ + { + "name": "confidence", + "baseName": "confidence", + "type": "number", + "format": "float" + }, + { + "name": "details", + "baseName": "details", + "type": "EntityHeader", + "format": "" + }, + { + "name": "reasoning", + "baseName": "reasoning", + "type": "string", + "format": "" + } +]; +var DataSource = _DataSource; + +// models/DataSourceContextInput.ts +var _DataSourceContextInput = class _DataSourceContextInput { + static getAttributeTypeMap() { + return _DataSourceContextInput.attributeTypeMap; + } + constructor() { + } +}; +_DataSourceContextInput.discriminator = void 0; +_DataSourceContextInput.attributeTypeMap = [ + { + "name": "data_source_identifier", + "baseName": "data_source_identifier", + "type": "string", + "format": "" + }, + { + "name": "data_source_identifiers", + "baseName": "data_source_identifiers", + "type": "Array", + "format": "" + }, + { + "name": "guid", + "baseName": "guid", + "type": "string", + "format": "" + } +]; +var DataSourceContextInput = _DataSourceContextInput; + +// models/DataWarehouseObjectInput.ts +var _DataWarehouseObjectInput = class _DataWarehouseObjectInput { + static getAttributeTypeMap() { + return _DataWarehouseObjectInput.attributeTypeMap; + } + constructor() { + } +}; +_DataWarehouseObjectInput.discriminator = void 0; +_DataWarehouseObjectInput.attributeTypeMap = [ + { + "name": "database", + "baseName": "database", + "type": "string", + "format": "" + }, + { + "name": "schema", + "baseName": "schema", + "type": "string", + "format": "" + }, + { + "name": "table", + "baseName": "table", + "type": "string", + "format": "" + }, + { + "name": "column", + "baseName": "column", + "type": "string", + "format": "" + } +]; +var DataWarehouseObjectInput = _DataWarehouseObjectInput; + +// models/DataWarehouseObjects.ts +var _DataWarehouseObjects = class _DataWarehouseObjects { + static getAttributeTypeMap() { + return _DataWarehouseObjects.attributeTypeMap; + } + constructor() { + } +}; +_DataWarehouseObjects.discriminator = void 0; +_DataWarehouseObjects.attributeTypeMap = [ + { + "name": "databases", + "baseName": "databases", + "type": "Array", + "format": "" + } +]; +var DataWarehouseObjects = _DataWarehouseObjects; + +// models/Database.ts +var _Database = class _Database { + static getAttributeTypeMap() { + return _Database.attributeTypeMap; + } + constructor() { + } +}; +_Database.discriminator = void 0; +_Database.attributeTypeMap = [ + { + "name": "name", + "baseName": "name", + "type": "string", + "format": "" + }, + { + "name": "schemas", + "baseName": "schemas", + "type": "Array", + "format": "" + }, + { + "name": "auto_created", + "baseName": "auto_created", + "type": "boolean", + "format": "" + } +]; +var Database = _Database; + +// models/DbtSearchResponse.ts +var _DbtSearchResponse = class _DbtSearchResponse { + static getAttributeTypeMap() { + return _DbtSearchResponse.attributeTypeMap; + } + constructor() { + } +}; +_DbtSearchResponse.discriminator = void 0; +_DbtSearchResponse.attributeTypeMap = [ + { + "name": "dbt_connection_identifier", + "baseName": "dbt_connection_identifier", + "type": "string", + "format": "" + }, + { + "name": "project_name", + "baseName": "project_name", + "type": "string", + "format": "" + }, + { + "name": "connection_id", + "baseName": "connection_id", + "type": "string", + "format": "" + }, + { + "name": "connection_name", + "baseName": "connection_name", + "type": "string", + "format": "" + }, + { + "name": "cdw_database", + "baseName": "cdw_database", + "type": "string", + "format": "" + }, + { + "name": "import_type", + "baseName": "import_type", + "type": "string", + "format": "" + }, + { + "name": "author_name", + "baseName": "author_name", + "type": "string", + "format": "" + } +]; +var DbtSearchResponse = _DbtSearchResponse; + +// models/DeactivateUserRequest.ts +var _DeactivateUserRequest = class _DeactivateUserRequest { + static getAttributeTypeMap() { + return _DeactivateUserRequest.attributeTypeMap; + } + constructor() { + } +}; +_DeactivateUserRequest.discriminator = void 0; +_DeactivateUserRequest.attributeTypeMap = [ + { + "name": "user_identifier", + "baseName": "user_identifier", + "type": "string", + "format": "" + }, + { + "name": "base_url", + "baseName": "base_url", + "type": "string", + "format": "" + } +]; +var DeactivateUserRequest = _DeactivateUserRequest; + +// models/DefaultActionConfig.ts +var _DefaultActionConfig = class _DefaultActionConfig { + static getAttributeTypeMap() { + return _DefaultActionConfig.attributeTypeMap; + } + constructor() { + } +}; +_DefaultActionConfig.discriminator = void 0; +_DefaultActionConfig.attributeTypeMap = [ + { + "name": "visibility", + "baseName": "visibility", + "type": "boolean", + "format": "" + } +]; +var DefaultActionConfig = _DefaultActionConfig; + +// models/DefaultActionConfigInput.ts +var _DefaultActionConfigInput = class _DefaultActionConfigInput { + static getAttributeTypeMap() { + return _DefaultActionConfigInput.attributeTypeMap; + } + constructor() { + } +}; +_DefaultActionConfigInput.discriminator = void 0; +_DefaultActionConfigInput.attributeTypeMap = [ + { + "name": "visibility", + "baseName": "visibility", + "type": "boolean", + "format": "" + } +]; +var DefaultActionConfigInput = _DefaultActionConfigInput; + +// models/DefaultActionConfigInputCreate.ts +var _DefaultActionConfigInputCreate = class _DefaultActionConfigInputCreate { + static getAttributeTypeMap() { + return _DefaultActionConfigInputCreate.attributeTypeMap; + } + constructor() { + } +}; +_DefaultActionConfigInputCreate.discriminator = void 0; +_DefaultActionConfigInputCreate.attributeTypeMap = [ + { + "name": "visibility", + "baseName": "visibility", + "type": "boolean", + "format": "" + } +]; +var DefaultActionConfigInputCreate = _DefaultActionConfigInputCreate; + +// models/DefaultActionConfigSearchInput.ts +var _DefaultActionConfigSearchInput = class _DefaultActionConfigSearchInput { + static getAttributeTypeMap() { + return _DefaultActionConfigSearchInput.attributeTypeMap; + } + constructor() { + } +}; +_DefaultActionConfigSearchInput.discriminator = void 0; +_DefaultActionConfigSearchInput.attributeTypeMap = [ + { + "name": "visibility", + "baseName": "visibility", + "type": "boolean", + "format": "" + } +]; +var DefaultActionConfigSearchInput = _DefaultActionConfigSearchInput; + +// models/DeleteCollectionRequest.ts +var _DeleteCollectionRequest = class _DeleteCollectionRequest { + static getAttributeTypeMap() { + return _DeleteCollectionRequest.attributeTypeMap; + } + constructor() { + } +}; +_DeleteCollectionRequest.discriminator = void 0; +_DeleteCollectionRequest.attributeTypeMap = [ + { + "name": "collection_identifiers", + "baseName": "collection_identifiers", + "type": "Array", + "format": "" + }, + { + "name": "delete_children", + "baseName": "delete_children", + "type": "boolean", + "format": "" + }, + { + "name": "dry_run", + "baseName": "dry_run", + "type": "boolean", + "format": "" + } +]; +var DeleteCollectionRequest = _DeleteCollectionRequest; + +// models/DeleteConfigRequest.ts +var _DeleteConfigRequest = class _DeleteConfigRequest { + static getAttributeTypeMap() { + return _DeleteConfigRequest.attributeTypeMap; + } + constructor() { + } +}; +_DeleteConfigRequest.discriminator = void 0; +_DeleteConfigRequest.attributeTypeMap = [ + { + "name": "cluster_level", + "baseName": "cluster_level", + "type": "boolean", + "format": "" + } +]; +var DeleteConfigRequest = _DeleteConfigRequest; + +// models/DeleteConnectionConfigurationRequest.ts +var _DeleteConnectionConfigurationRequest = class _DeleteConnectionConfigurationRequest { + static getAttributeTypeMap() { + return _DeleteConnectionConfigurationRequest.attributeTypeMap; + } + constructor() { + } +}; +_DeleteConnectionConfigurationRequest.discriminator = void 0; +_DeleteConnectionConfigurationRequest.attributeTypeMap = [ + { + "name": "configuration_identifier", + "baseName": "configuration_identifier", + "type": "string", + "format": "" + }, + { + "name": "connection_identifier", + "baseName": "connection_identifier", + "type": "string", + "format": "" + } +]; +var DeleteConnectionConfigurationRequest = _DeleteConnectionConfigurationRequest; + +// models/DeleteConnectionRequest.ts +var _DeleteConnectionRequest = class _DeleteConnectionRequest { + static getAttributeTypeMap() { + return _DeleteConnectionRequest.attributeTypeMap; + } + constructor() { + } +}; +_DeleteConnectionRequest.discriminator = void 0; +_DeleteConnectionRequest.attributeTypeMap = [ + { + "name": "connection_identifier", + "baseName": "connection_identifier", + "type": "string", + "format": "" + } +]; +var DeleteConnectionRequest = _DeleteConnectionRequest; + +// models/DeleteMetadataRequest.ts +var _DeleteMetadataRequest = class _DeleteMetadataRequest { + static getAttributeTypeMap() { + return _DeleteMetadataRequest.attributeTypeMap; + } + constructor() { + } +}; +_DeleteMetadataRequest.discriminator = void 0; +_DeleteMetadataRequest.attributeTypeMap = [ + { + "name": "metadata", + "baseName": "metadata", + "type": "Array", + "format": "" + }, + { + "name": "delete_disabled_objects", + "baseName": "delete_disabled_objects", + "type": "boolean", + "format": "" + } +]; +var DeleteMetadataRequest = _DeleteMetadataRequest; + +// models/DeleteMetadataTypeInput.ts +var _DeleteMetadataTypeInput = class _DeleteMetadataTypeInput { + static getAttributeTypeMap() { + return _DeleteMetadataTypeInput.attributeTypeMap; + } + constructor() { + } +}; +_DeleteMetadataTypeInput.discriminator = void 0; +_DeleteMetadataTypeInput.attributeTypeMap = [ + { + "name": "type", + "baseName": "type", + "type": "DeleteMetadataTypeInputTypeEnum", + "format": "" + }, + { + "name": "identifier", + "baseName": "identifier", + "type": "string", + "format": "" + } +]; +var DeleteMetadataTypeInput = _DeleteMetadataTypeInput; + +// models/DeleteOrgEmailCustomizationRequest.ts +var _DeleteOrgEmailCustomizationRequest = class _DeleteOrgEmailCustomizationRequest { + static getAttributeTypeMap() { + return _DeleteOrgEmailCustomizationRequest.attributeTypeMap; + } + constructor() { + } +}; +_DeleteOrgEmailCustomizationRequest.discriminator = void 0; +_DeleteOrgEmailCustomizationRequest.attributeTypeMap = [ + { + "name": "org_identifiers", + "baseName": "org_identifiers", + "type": "Array", + "format": "" + } +]; +var DeleteOrgEmailCustomizationRequest = _DeleteOrgEmailCustomizationRequest; + +// models/DeleteVariablesRequest.ts +var _DeleteVariablesRequest = class _DeleteVariablesRequest { + static getAttributeTypeMap() { + return _DeleteVariablesRequest.attributeTypeMap; + } + constructor() { + } +}; +_DeleteVariablesRequest.discriminator = void 0; +_DeleteVariablesRequest.attributeTypeMap = [ + { + "name": "identifiers", + "baseName": "identifiers", + "type": "Array", + "format": "" + } +]; +var DeleteVariablesRequest = _DeleteVariablesRequest; + +// models/DeleteWebhookConfigurationsRequest.ts +var _DeleteWebhookConfigurationsRequest = class _DeleteWebhookConfigurationsRequest { + static getAttributeTypeMap() { + return _DeleteWebhookConfigurationsRequest.attributeTypeMap; + } + constructor() { + } +}; +_DeleteWebhookConfigurationsRequest.discriminator = void 0; +_DeleteWebhookConfigurationsRequest.attributeTypeMap = [ + { + "name": "webhook_identifiers", + "baseName": "webhook_identifiers", + "type": "Array", + "format": "" + } +]; +var DeleteWebhookConfigurationsRequest = _DeleteWebhookConfigurationsRequest; + +// models/DeployCommitRequest.ts +var _DeployCommitRequest = class _DeployCommitRequest { + static getAttributeTypeMap() { + return _DeployCommitRequest.attributeTypeMap; + } + constructor() { + } +}; +_DeployCommitRequest.discriminator = void 0; +_DeployCommitRequest.attributeTypeMap = [ + { + "name": "commit_id", + "baseName": "commit_id", + "type": "string", + "format": "" + }, + { + "name": "branch_name", + "baseName": "branch_name", + "type": "string", + "format": "" + }, + { + "name": "deploy_type", + "baseName": "deploy_type", + "type": "DeployCommitRequestDeployTypeEnum", + "format": "" + }, + { + "name": "deploy_policy", + "baseName": "deploy_policy", + "type": "DeployCommitRequestDeployPolicyEnum", + "format": "" + } +]; +var DeployCommitRequest = _DeployCommitRequest; + +// models/DeployResponse.ts +var _DeployResponse = class _DeployResponse { + static getAttributeTypeMap() { + return _DeployResponse.attributeTypeMap; + } + constructor() { + } +}; +_DeployResponse.discriminator = void 0; +_DeployResponse.attributeTypeMap = [ + { + "name": "file_name", + "baseName": "file_name", + "type": "string", + "format": "" + }, + { + "name": "metadata_name", + "baseName": "metadata_name", + "type": "string", + "format": "" + }, + { + "name": "metadata_type", + "baseName": "metadata_type", + "type": "string", + "format": "" + }, + { + "name": "status_code", + "baseName": "status_code", + "type": "string", + "format": "" + }, + { + "name": "status_message", + "baseName": "status_message", + "type": "string", + "format": "" + } +]; +var DeployResponse = _DeployResponse; + +// models/EntityHeader.ts +var _EntityHeader = class _EntityHeader { + static getAttributeTypeMap() { + return _EntityHeader.attributeTypeMap; + } + constructor() { + } +}; +_EntityHeader.discriminator = void 0; +_EntityHeader.attributeTypeMap = [ + { + "name": "description", + "baseName": "description", + "type": "string", + "format": "" + }, + { + "name": "data_source_name", + "baseName": "data_source_name", + "type": "string", + "format": "" + }, + { + "name": "data_source_identifier", + "baseName": "data_source_identifier", + "type": "string", + "format": "" + } +]; +var EntityHeader = _EntityHeader; + +// models/ErrorResponse.ts +var _ErrorResponse = class _ErrorResponse { + static getAttributeTypeMap() { + return _ErrorResponse.attributeTypeMap; + } + constructor() { + } +}; +_ErrorResponse.discriminator = void 0; +_ErrorResponse.attributeTypeMap = [ + { + "name": "error", + "baseName": "error", + "type": "any", + "format": "" + } +]; +var ErrorResponse = _ErrorResponse; + +// models/EurekaDataSourceSuggestionResponse.ts +var _EurekaDataSourceSuggestionResponse = class _EurekaDataSourceSuggestionResponse { + static getAttributeTypeMap() { + return _EurekaDataSourceSuggestionResponse.attributeTypeMap; + } + constructor() { + } +}; +_EurekaDataSourceSuggestionResponse.discriminator = void 0; +_EurekaDataSourceSuggestionResponse.attributeTypeMap = [ + { + "name": "data_sources", + "baseName": "data_sources", + "type": "Array", + "format": "" + } +]; +var EurekaDataSourceSuggestionResponse = _EurekaDataSourceSuggestionResponse; + +// models/EurekaDecomposeQueryResponse.ts +var _EurekaDecomposeQueryResponse = class _EurekaDecomposeQueryResponse { + static getAttributeTypeMap() { + return _EurekaDecomposeQueryResponse.attributeTypeMap; + } + constructor() { + } +}; +_EurekaDecomposeQueryResponse.discriminator = void 0; +_EurekaDecomposeQueryResponse.attributeTypeMap = [ + { + "name": "decomposedQueryResponse", + "baseName": "decomposedQueryResponse", + "type": "EurekaLLMDecomposeQueryResponse", + "format": "" + } +]; +var EurekaDecomposeQueryResponse = _EurekaDecomposeQueryResponse; + +// models/EurekaGetNLInstructionsResponse.ts +var _EurekaGetNLInstructionsResponse = class _EurekaGetNLInstructionsResponse { + static getAttributeTypeMap() { + return _EurekaGetNLInstructionsResponse.attributeTypeMap; + } + constructor() { + } +}; +_EurekaGetNLInstructionsResponse.discriminator = void 0; +_EurekaGetNLInstructionsResponse.attributeTypeMap = [ + { + "name": "nl_instructions_info", + "baseName": "nl_instructions_info", + "type": "Array", + "format": "" + } +]; +var EurekaGetNLInstructionsResponse = _EurekaGetNLInstructionsResponse; + +// models/EurekaGetRelevantQuestionsResponse.ts +var _EurekaGetRelevantQuestionsResponse = class _EurekaGetRelevantQuestionsResponse { + static getAttributeTypeMap() { + return _EurekaGetRelevantQuestionsResponse.attributeTypeMap; + } + constructor() { + } +}; +_EurekaGetRelevantQuestionsResponse.discriminator = void 0; +_EurekaGetRelevantQuestionsResponse.attributeTypeMap = [ + { + "name": "relevant_questions", + "baseName": "relevant_questions", + "type": "Array", + "format": "" + } +]; +var EurekaGetRelevantQuestionsResponse = _EurekaGetRelevantQuestionsResponse; + +// models/EurekaLLMDecomposeQueryResponse.ts +var _EurekaLLMDecomposeQueryResponse = class _EurekaLLMDecomposeQueryResponse { + static getAttributeTypeMap() { + return _EurekaLLMDecomposeQueryResponse.attributeTypeMap; + } + constructor() { + } +}; +_EurekaLLMDecomposeQueryResponse.discriminator = void 0; +_EurekaLLMDecomposeQueryResponse.attributeTypeMap = [ + { + "name": "decomposedQueries", + "baseName": "decomposedQueries", + "type": "Array", + "format": "" + } +]; +var EurekaLLMDecomposeQueryResponse = _EurekaLLMDecomposeQueryResponse; + +// models/EurekaLLMSuggestedQuery.ts +var _EurekaLLMSuggestedQuery = class _EurekaLLMSuggestedQuery { + static getAttributeTypeMap() { + return _EurekaLLMSuggestedQuery.attributeTypeMap; + } + constructor() { + } +}; +_EurekaLLMSuggestedQuery.discriminator = void 0; +_EurekaLLMSuggestedQuery.attributeTypeMap = [ + { + "name": "query", + "baseName": "query", + "type": "string", + "format": "" + }, + { + "name": "worksheetId", + "baseName": "worksheetId", + "type": "string", + "format": "" + }, + { + "name": "worksheetName", + "baseName": "worksheetName", + "type": "string", + "format": "" + } +]; +var EurekaLLMSuggestedQuery = _EurekaLLMSuggestedQuery; + +// models/EurekaRelevantQuestion.ts +var _EurekaRelevantQuestion = class _EurekaRelevantQuestion { + static getAttributeTypeMap() { + return _EurekaRelevantQuestion.attributeTypeMap; + } + constructor() { + } +}; +_EurekaRelevantQuestion.discriminator = void 0; +_EurekaRelevantQuestion.attributeTypeMap = [ + { + "name": "query", + "baseName": "query", + "type": "string", + "format": "" + }, + { + "name": "data_source_identifier", + "baseName": "data_source_identifier", + "type": "string", + "format": "" + }, + { + "name": "data_source_name", + "baseName": "data_source_name", + "type": "string", + "format": "" + } +]; +var EurekaRelevantQuestion = _EurekaRelevantQuestion; + +// models/EurekaSetNLInstructionsResponse.ts +var _EurekaSetNLInstructionsResponse = class _EurekaSetNLInstructionsResponse { + static getAttributeTypeMap() { + return _EurekaSetNLInstructionsResponse.attributeTypeMap; + } + constructor() { + } +}; +_EurekaSetNLInstructionsResponse.discriminator = void 0; +_EurekaSetNLInstructionsResponse.attributeTypeMap = [ + { + "name": "success", + "baseName": "success", + "type": "boolean", + "format": "" + } +]; +var EurekaSetNLInstructionsResponse = _EurekaSetNLInstructionsResponse; + +// models/EventChannelConfig.ts +var _EventChannelConfig = class _EventChannelConfig { + static getAttributeTypeMap() { + return _EventChannelConfig.attributeTypeMap; + } + constructor() { + } +}; +_EventChannelConfig.discriminator = void 0; +_EventChannelConfig.attributeTypeMap = [ + { + "name": "event_type", + "baseName": "event_type", + "type": "EventChannelConfigEventTypeEnum", + "format": "" + }, + { + "name": "channels", + "baseName": "channels", + "type": "Array", + "format": "" + } +]; +var EventChannelConfig = _EventChannelConfig; + +// models/EventChannelConfigInput.ts +var _EventChannelConfigInput = class _EventChannelConfigInput { + static getAttributeTypeMap() { + return _EventChannelConfigInput.attributeTypeMap; + } + constructor() { + } +}; +_EventChannelConfigInput.discriminator = void 0; +_EventChannelConfigInput.attributeTypeMap = [ + { + "name": "event_type", + "baseName": "event_type", + "type": "EventChannelConfigInputEventTypeEnum", + "format": "" + }, + { + "name": "channels", + "baseName": "channels", + "type": "Array", + "format": "" + } +]; +var EventChannelConfigInput = _EventChannelConfigInput; + +// models/ExcludeMetadataListItemInput.ts +var _ExcludeMetadataListItemInput = class _ExcludeMetadataListItemInput { + static getAttributeTypeMap() { + return _ExcludeMetadataListItemInput.attributeTypeMap; + } + constructor() { + } +}; +_ExcludeMetadataListItemInput.discriminator = void 0; +_ExcludeMetadataListItemInput.attributeTypeMap = [ + { + "name": "identifier", + "baseName": "identifier", + "type": "string", + "format": "" + }, + { + "name": "type", + "baseName": "type", + "type": "ExcludeMetadataListItemInputTypeEnum", + "format": "" + } +]; +var ExcludeMetadataListItemInput = _ExcludeMetadataListItemInput; + +// models/ExportAnswerReportRequest.ts +var _ExportAnswerReportRequest = class _ExportAnswerReportRequest { + static getAttributeTypeMap() { + return _ExportAnswerReportRequest.attributeTypeMap; + } + constructor() { + } +}; +_ExportAnswerReportRequest.discriminator = void 0; +_ExportAnswerReportRequest.attributeTypeMap = [ + { + "name": "metadata_identifier", + "baseName": "metadata_identifier", + "type": "string", + "format": "" + }, + { + "name": "session_identifier", + "baseName": "session_identifier", + "type": "string", + "format": "" + }, + { + "name": "generation_number", + "baseName": "generation_number", + "type": "number", + "format": "int32" + }, + { + "name": "file_format", + "baseName": "file_format", + "type": "ExportAnswerReportRequestFileFormatEnum", + "format": "" + }, + { + "name": "runtime_filter", + "baseName": "runtime_filter", + "type": "any", + "format": "" + }, + { + "name": "runtime_sort", + "baseName": "runtime_sort", + "type": "any", + "format": "" + }, + { + "name": "runtime_param_override", + "baseName": "runtime_param_override", + "type": "any", + "format": "" + }, + { + "name": "regional_settings", + "baseName": "regional_settings", + "type": "ExportAnswerReportRequestRegionalSettings", + "format": "" + }, + { + "name": "png_options", + "baseName": "png_options", + "type": "ExportAnswerReportRequestPngOptions", + "format": "" + }, + { + "name": "personalised_view_identifier", + "baseName": "personalised_view_identifier", + "type": "string", + "format": "" + }, + { + "name": "type", + "baseName": "type", + "type": "ExportAnswerReportRequestTypeEnum", + "format": "" + } +]; +var ExportAnswerReportRequest = _ExportAnswerReportRequest; + +// models/ExportAnswerReportRequestPngOptions.ts +var _ExportAnswerReportRequestPngOptions = class _ExportAnswerReportRequestPngOptions { + static getAttributeTypeMap() { + return _ExportAnswerReportRequestPngOptions.attributeTypeMap; + } + constructor() { + } +}; +_ExportAnswerReportRequestPngOptions.discriminator = void 0; +_ExportAnswerReportRequestPngOptions.attributeTypeMap = [ + { + "name": "x_resolution", + "baseName": "x_resolution", + "type": "number", + "format": "int32" + }, + { + "name": "y_resolution", + "baseName": "y_resolution", + "type": "number", + "format": "int32" + }, + { + "name": "scaling", + "baseName": "scaling", + "type": "number", + "format": "int32" + } +]; +var ExportAnswerReportRequestPngOptions = _ExportAnswerReportRequestPngOptions; + +// models/ExportAnswerReportRequestRegionalSettings.ts +var _ExportAnswerReportRequestRegionalSettings = class _ExportAnswerReportRequestRegionalSettings { + static getAttributeTypeMap() { + return _ExportAnswerReportRequestRegionalSettings.attributeTypeMap; + } + constructor() { + } +}; +_ExportAnswerReportRequestRegionalSettings.discriminator = void 0; +_ExportAnswerReportRequestRegionalSettings.attributeTypeMap = [ + { + "name": "currency_format", + "baseName": "currency_format", + "type": "ExportAnswerReportRequestRegionalSettingsCurrencyFormatEnum", + "format": "" + }, + { + "name": "user_locale", + "baseName": "user_locale", + "type": "ExportAnswerReportRequestRegionalSettingsUserLocaleEnum", + "format": "" + }, + { + "name": "number_format_locale", + "baseName": "number_format_locale", + "type": "ExportAnswerReportRequestRegionalSettingsNumberFormatLocaleEnum", + "format": "" + }, + { + "name": "date_format_locale", + "baseName": "date_format_locale", + "type": "ExportAnswerReportRequestRegionalSettingsDateFormatLocaleEnum", + "format": "" + } +]; +var ExportAnswerReportRequestRegionalSettings = _ExportAnswerReportRequestRegionalSettings; + +// models/ExportLiveboardReportRequest.ts +var _ExportLiveboardReportRequest = class _ExportLiveboardReportRequest { + static getAttributeTypeMap() { + return _ExportLiveboardReportRequest.attributeTypeMap; + } + constructor() { + } +}; +_ExportLiveboardReportRequest.discriminator = void 0; +_ExportLiveboardReportRequest.attributeTypeMap = [ + { + "name": "metadata_identifier", + "baseName": "metadata_identifier", + "type": "string", + "format": "" + }, + { + "name": "tab_identifiers", + "baseName": "tab_identifiers", + "type": "Array", + "format": "" + }, + { + "name": "personalised_view_identifier", + "baseName": "personalised_view_identifier", + "type": "string", + "format": "" + }, + { + "name": "visualization_identifiers", + "baseName": "visualization_identifiers", + "type": "Array", + "format": "" + }, + { + "name": "transient_content", + "baseName": "transient_content", + "type": "string", + "format": "" + }, + { + "name": "file_format", + "baseName": "file_format", + "type": "ExportLiveboardReportRequestFileFormatEnum", + "format": "" + }, + { + "name": "runtime_filter", + "baseName": "runtime_filter", + "type": "any", + "format": "" + }, + { + "name": "override_filters", + "baseName": "override_filters", + "type": "any", + "format": "" + }, + { + "name": "runtime_sort", + "baseName": "runtime_sort", + "type": "any", + "format": "" + }, + { + "name": "pdf_options", + "baseName": "pdf_options", + "type": "ExportLiveboardReportRequestPdfOptions", + "format": "" + }, + { + "name": "png_options", + "baseName": "png_options", + "type": "ExportLiveboardReportRequestPngOptions", + "format": "" + }, + { + "name": "runtime_param_override", + "baseName": "runtime_param_override", + "type": "any", + "format": "" + }, + { + "name": "regional_settings", + "baseName": "regional_settings", + "type": "ExportAnswerReportRequestRegionalSettings", + "format": "" + } +]; +var ExportLiveboardReportRequest = _ExportLiveboardReportRequest; + +// models/ExportLiveboardReportRequestPdfOptions.ts +var _ExportLiveboardReportRequestPdfOptions = class _ExportLiveboardReportRequestPdfOptions { + static getAttributeTypeMap() { + return _ExportLiveboardReportRequestPdfOptions.attributeTypeMap; + } + constructor() { + } +}; +_ExportLiveboardReportRequestPdfOptions.discriminator = void 0; +_ExportLiveboardReportRequestPdfOptions.attributeTypeMap = [ + { + "name": "page_size", + "baseName": "page_size", + "type": "ExportLiveboardReportRequestPdfOptionsPageSizeEnum", + "format": "" + }, + { + "name": "zoom_level", + "baseName": "zoom_level", + "type": "number", + "format": "int32" + }, + { + "name": "include_cover_page", + "baseName": "include_cover_page", + "type": "boolean", + "format": "" + }, + { + "name": "include_custom_logo", + "baseName": "include_custom_logo", + "type": "boolean", + "format": "" + }, + { + "name": "include_filter_page", + "baseName": "include_filter_page", + "type": "boolean", + "format": "" + }, + { + "name": "include_page_number", + "baseName": "include_page_number", + "type": "boolean", + "format": "" + }, + { + "name": "page_orientation", + "baseName": "page_orientation", + "type": "ExportLiveboardReportRequestPdfOptionsPageOrientationEnum", + "format": "" + }, + { + "name": "truncate_table", + "baseName": "truncate_table", + "type": "boolean", + "format": "" + }, + { + "name": "page_footer_text", + "baseName": "page_footer_text", + "type": "string", + "format": "" + } +]; +var ExportLiveboardReportRequestPdfOptions = _ExportLiveboardReportRequestPdfOptions; + +// models/ExportLiveboardReportRequestPngOptions.ts +var _ExportLiveboardReportRequestPngOptions = class _ExportLiveboardReportRequestPngOptions { + static getAttributeTypeMap() { + return _ExportLiveboardReportRequestPngOptions.attributeTypeMap; + } + constructor() { + } +}; +_ExportLiveboardReportRequestPngOptions.discriminator = void 0; +_ExportLiveboardReportRequestPngOptions.attributeTypeMap = [ + { + "name": "include_cover_page", + "baseName": "include_cover_page", + "type": "boolean", + "format": "" + }, + { + "name": "include_filter_page", + "baseName": "include_filter_page", + "type": "boolean", + "format": "" + }, + { + "name": "personalised_view_id", + "baseName": "personalised_view_id", + "type": "string", + "format": "" + }, + { + "name": "image_resolution", + "baseName": "image_resolution", + "type": "number", + "format": "int32" + }, + { + "name": "image_scale", + "baseName": "image_scale", + "type": "number", + "format": "int32" + }, + { + "name": "include_header", + "baseName": "include_header", + "type": "boolean", + "format": "" + } +]; +var ExportLiveboardReportRequestPngOptions = _ExportLiveboardReportRequestPngOptions; + +// models/ExportMetadataTMLBatchedRequest.ts +var _ExportMetadataTMLBatchedRequest = class _ExportMetadataTMLBatchedRequest { + static getAttributeTypeMap() { + return _ExportMetadataTMLBatchedRequest.attributeTypeMap; + } + constructor() { + } +}; +_ExportMetadataTMLBatchedRequest.discriminator = void 0; +_ExportMetadataTMLBatchedRequest.attributeTypeMap = [ + { + "name": "metadata_type", + "baseName": "metadata_type", + "type": "ExportMetadataTMLBatchedRequestMetadataTypeEnum", + "format": "" + }, + { + "name": "batch_offset", + "baseName": "batch_offset", + "type": "number", + "format": "int32" + }, + { + "name": "batch_size", + "baseName": "batch_size", + "type": "number", + "format": "int32" + }, + { + "name": "edoc_format", + "baseName": "edoc_format", + "type": "ExportMetadataTMLBatchedRequestEdocFormatEnum", + "format": "" + }, + { + "name": "export_dependent", + "baseName": "export_dependent", + "type": "boolean", + "format": "" + }, + { + "name": "all_orgs_override", + "baseName": "all_orgs_override", + "type": "boolean", + "format": "" + } +]; +var ExportMetadataTMLBatchedRequest = _ExportMetadataTMLBatchedRequest; + +// models/ExportMetadataTMLRequest.ts +var _ExportMetadataTMLRequest = class _ExportMetadataTMLRequest { + static getAttributeTypeMap() { + return _ExportMetadataTMLRequest.attributeTypeMap; + } + constructor() { + } +}; +_ExportMetadataTMLRequest.discriminator = void 0; +_ExportMetadataTMLRequest.attributeTypeMap = [ + { + "name": "metadata", + "baseName": "metadata", + "type": "Array", + "format": "" + }, + { + "name": "export_associated", + "baseName": "export_associated", + "type": "boolean", + "format": "" + }, + { + "name": "export_fqn", + "baseName": "export_fqn", + "type": "boolean", + "format": "" + }, + { + "name": "edoc_format", + "baseName": "edoc_format", + "type": "ExportMetadataTMLRequestEdocFormatEnum", + "format": "" + }, + { + "name": "export_schema_version", + "baseName": "export_schema_version", + "type": "ExportMetadataTMLRequestExportSchemaVersionEnum", + "format": "" + }, + { + "name": "export_dependent", + "baseName": "export_dependent", + "type": "boolean", + "format": "" + }, + { + "name": "export_connection_as_dependent", + "baseName": "export_connection_as_dependent", + "type": "boolean", + "format": "" + }, + { + "name": "all_orgs_override", + "baseName": "all_orgs_override", + "type": "boolean", + "format": "" + }, + { + "name": "export_options", + "baseName": "export_options", + "type": "ExportMetadataTMLRequestExportOptions", + "format": "" + } +]; +var ExportMetadataTMLRequest = _ExportMetadataTMLRequest; + +// models/ExportMetadataTMLRequestExportOptions.ts +var _ExportMetadataTMLRequestExportOptions = class _ExportMetadataTMLRequestExportOptions { + static getAttributeTypeMap() { + return _ExportMetadataTMLRequestExportOptions.attributeTypeMap; + } + constructor() { + } +}; +_ExportMetadataTMLRequestExportOptions.discriminator = void 0; +_ExportMetadataTMLRequestExportOptions.attributeTypeMap = [ + { + "name": "include_obj_id_ref", + "baseName": "include_obj_id_ref", + "type": "boolean", + "format": "" + }, + { + "name": "include_guid", + "baseName": "include_guid", + "type": "boolean", + "format": "" + }, + { + "name": "include_obj_id", + "baseName": "include_obj_id", + "type": "boolean", + "format": "" + }, + { + "name": "export_with_associated_feedbacks", + "baseName": "export_with_associated_feedbacks", + "type": "boolean", + "format": "" + }, + { + "name": "export_column_security_rules", + "baseName": "export_column_security_rules", + "type": "boolean", + "format": "" + }, + { + "name": "export_with_column_aliases", + "baseName": "export_with_column_aliases", + "type": "boolean", + "format": "" + } +]; +var ExportMetadataTMLRequestExportOptions = _ExportMetadataTMLRequestExportOptions; + +// models/ExportMetadataTypeInput.ts +var _ExportMetadataTypeInput = class _ExportMetadataTypeInput { + static getAttributeTypeMap() { + return _ExportMetadataTypeInput.attributeTypeMap; + } + constructor() { + } +}; +_ExportMetadataTypeInput.discriminator = void 0; +_ExportMetadataTypeInput.attributeTypeMap = [ + { + "name": "type", + "baseName": "type", + "type": "ExportMetadataTypeInputTypeEnum", + "format": "" + }, + { + "name": "identifier", + "baseName": "identifier", + "type": "string", + "format": "" + }, + { + "name": "session_identifier", + "baseName": "session_identifier", + "type": "string", + "format": "" + }, + { + "name": "generation_number", + "baseName": "generation_number", + "type": "number", + "format": "int32" + } +]; +var ExportMetadataTypeInput = _ExportMetadataTypeInput; + +// models/ExportOptions.ts +var _ExportOptions = class _ExportOptions { + static getAttributeTypeMap() { + return _ExportOptions.attributeTypeMap; + } + constructor() { + } +}; +_ExportOptions.discriminator = void 0; +_ExportOptions.attributeTypeMap = [ + { + "name": "include_obj_id_ref", + "baseName": "include_obj_id_ref", + "type": "boolean", + "format": "" + }, + { + "name": "include_guid", + "baseName": "include_guid", + "type": "boolean", + "format": "" + }, + { + "name": "include_obj_id", + "baseName": "include_obj_id", + "type": "boolean", + "format": "" + }, + { + "name": "export_with_associated_feedbacks", + "baseName": "export_with_associated_feedbacks", + "type": "boolean", + "format": "" + }, + { + "name": "export_column_security_rules", + "baseName": "export_column_security_rules", + "type": "boolean", + "format": "" + }, + { + "name": "export_with_column_aliases", + "baseName": "export_with_column_aliases", + "type": "boolean", + "format": "" + } +]; +var ExportOptions = _ExportOptions; + +// models/ExternalTableInput.ts +var _ExternalTableInput = class _ExternalTableInput { + static getAttributeTypeMap() { + return _ExternalTableInput.attributeTypeMap; + } + constructor() { + } +}; +_ExternalTableInput.discriminator = void 0; +_ExternalTableInput.attributeTypeMap = [ + { + "name": "connection_identifier", + "baseName": "connection_identifier", + "type": "string", + "format": "" + }, + { + "name": "database_name", + "baseName": "database_name", + "type": "string", + "format": "" + }, + { + "name": "schema_name", + "baseName": "schema_name", + "type": "string", + "format": "" + }, + { + "name": "table_name", + "baseName": "table_name", + "type": "string", + "format": "" + } +]; +var ExternalTableInput = _ExternalTableInput; + +// models/FavoriteMetadataInput.ts +var _FavoriteMetadataInput = class _FavoriteMetadataInput { + static getAttributeTypeMap() { + return _FavoriteMetadataInput.attributeTypeMap; + } + constructor() { + } +}; +_FavoriteMetadataInput.discriminator = void 0; +_FavoriteMetadataInput.attributeTypeMap = [ + { + "name": "identifier", + "baseName": "identifier", + "type": "string", + "format": "" + }, + { + "name": "type", + "baseName": "type", + "type": "FavoriteMetadataInputTypeEnum", + "format": "" + } +]; +var FavoriteMetadataInput = _FavoriteMetadataInput; + +// models/FavoriteMetadataItem.ts +var _FavoriteMetadataItem = class _FavoriteMetadataItem { + static getAttributeTypeMap() { + return _FavoriteMetadataItem.attributeTypeMap; + } + constructor() { + } +}; +_FavoriteMetadataItem.discriminator = void 0; +_FavoriteMetadataItem.attributeTypeMap = [ + { + "name": "id", + "baseName": "id", + "type": "string", + "format": "" + }, + { + "name": "name", + "baseName": "name", + "type": "string", + "format": "" + }, + { + "name": "type", + "baseName": "type", + "type": "FavoriteMetadataItemTypeEnum", + "format": "" + } +]; +var FavoriteMetadataItem = _FavoriteMetadataItem; + +// models/FavoriteObjectOptionsInput.ts +var _FavoriteObjectOptionsInput = class _FavoriteObjectOptionsInput { + static getAttributeTypeMap() { + return _FavoriteObjectOptionsInput.attributeTypeMap; + } + constructor() { + } +}; +_FavoriteObjectOptionsInput.discriminator = void 0; +_FavoriteObjectOptionsInput.attributeTypeMap = [ + { + "name": "include", + "baseName": "include", + "type": "boolean", + "format": "" + }, + { + "name": "user_identifiers", + "baseName": "user_identifiers", + "type": "Array", + "format": "" + } +]; +var FavoriteObjectOptionsInput = _FavoriteObjectOptionsInput; + +// models/FetchAnswerDataRequest.ts +var _FetchAnswerDataRequest = class _FetchAnswerDataRequest { + static getAttributeTypeMap() { + return _FetchAnswerDataRequest.attributeTypeMap; + } + constructor() { + } +}; +_FetchAnswerDataRequest.discriminator = void 0; +_FetchAnswerDataRequest.attributeTypeMap = [ + { + "name": "metadata_identifier", + "baseName": "metadata_identifier", + "type": "string", + "format": "" + }, + { + "name": "data_format", + "baseName": "data_format", + "type": "FetchAnswerDataRequestDataFormatEnum", + "format": "" + }, + { + "name": "record_offset", + "baseName": "record_offset", + "type": "number", + "format": "int32" + }, + { + "name": "record_size", + "baseName": "record_size", + "type": "number", + "format": "int32" + }, + { + "name": "runtime_filter", + "baseName": "runtime_filter", + "type": "any", + "format": "" + }, + { + "name": "runtime_sort", + "baseName": "runtime_sort", + "type": "any", + "format": "" + }, + { + "name": "runtime_param_override", + "baseName": "runtime_param_override", + "type": "any", + "format": "" + } +]; +var FetchAnswerDataRequest = _FetchAnswerDataRequest; + +// models/FetchAnswerSqlQueryRequest.ts +var _FetchAnswerSqlQueryRequest = class _FetchAnswerSqlQueryRequest { + static getAttributeTypeMap() { + return _FetchAnswerSqlQueryRequest.attributeTypeMap; + } + constructor() { + } +}; +_FetchAnswerSqlQueryRequest.discriminator = void 0; +_FetchAnswerSqlQueryRequest.attributeTypeMap = [ + { + "name": "metadata_identifier", + "baseName": "metadata_identifier", + "type": "string", + "format": "" + } +]; +var FetchAnswerSqlQueryRequest = _FetchAnswerSqlQueryRequest; + +// models/FetchAsyncImportTaskStatusRequest.ts +var _FetchAsyncImportTaskStatusRequest = class _FetchAsyncImportTaskStatusRequest { + static getAttributeTypeMap() { + return _FetchAsyncImportTaskStatusRequest.attributeTypeMap; + } + constructor() { + } +}; +_FetchAsyncImportTaskStatusRequest.discriminator = void 0; +_FetchAsyncImportTaskStatusRequest.attributeTypeMap = [ + { + "name": "task_ids", + "baseName": "task_ids", + "type": "Array", + "format": "" + }, + { + "name": "task_status", + "baseName": "task_status", + "type": "Array", + "format": "" + }, + { + "name": "author_identifier", + "baseName": "author_identifier", + "type": "string", + "format": "" + }, + { + "name": "record_offset", + "baseName": "record_offset", + "type": "number", + "format": "int32" + }, + { + "name": "record_size", + "baseName": "record_size", + "type": "number", + "format": "int32" + }, + { + "name": "include_import_response", + "baseName": "include_import_response", + "type": "boolean", + "format": "" + } +]; +var FetchAsyncImportTaskStatusRequest = _FetchAsyncImportTaskStatusRequest; + +// models/FetchColumnSecurityRulesRequest.ts +var _FetchColumnSecurityRulesRequest = class _FetchColumnSecurityRulesRequest { + static getAttributeTypeMap() { + return _FetchColumnSecurityRulesRequest.attributeTypeMap; + } + constructor() { + } +}; +_FetchColumnSecurityRulesRequest.discriminator = void 0; +_FetchColumnSecurityRulesRequest.attributeTypeMap = [ + { + "name": "tables", + "baseName": "tables", + "type": "Array", + "format": "" + } +]; +var FetchColumnSecurityRulesRequest = _FetchColumnSecurityRulesRequest; + +// models/FetchConnectionDiffStatusResponse.ts +var _FetchConnectionDiffStatusResponse = class _FetchConnectionDiffStatusResponse { + static getAttributeTypeMap() { + return _FetchConnectionDiffStatusResponse.attributeTypeMap; + } + constructor() { + } +}; +_FetchConnectionDiffStatusResponse.discriminator = void 0; +_FetchConnectionDiffStatusResponse.attributeTypeMap = [ + { + "name": "status", + "baseName": "status", + "type": "boolean", + "format": "" + } +]; +var FetchConnectionDiffStatusResponse = _FetchConnectionDiffStatusResponse; + +// models/FetchLiveboardDataRequest.ts +var _FetchLiveboardDataRequest = class _FetchLiveboardDataRequest { + static getAttributeTypeMap() { + return _FetchLiveboardDataRequest.attributeTypeMap; + } + constructor() { + } +}; +_FetchLiveboardDataRequest.discriminator = void 0; +_FetchLiveboardDataRequest.attributeTypeMap = [ + { + "name": "metadata_identifier", + "baseName": "metadata_identifier", + "type": "string", + "format": "" + }, + { + "name": "visualization_identifiers", + "baseName": "visualization_identifiers", + "type": "Array", + "format": "" + }, + { + "name": "transient_content", + "baseName": "transient_content", + "type": "string", + "format": "" + }, + { + "name": "data_format", + "baseName": "data_format", + "type": "FetchLiveboardDataRequestDataFormatEnum", + "format": "" + }, + { + "name": "record_offset", + "baseName": "record_offset", + "type": "number", + "format": "int32" + }, + { + "name": "record_size", + "baseName": "record_size", + "type": "number", + "format": "int32" + }, + { + "name": "runtime_filter", + "baseName": "runtime_filter", + "type": "any", + "format": "" + }, + { + "name": "runtime_sort", + "baseName": "runtime_sort", + "type": "any", + "format": "" + }, + { + "name": "runtime_param_override", + "baseName": "runtime_param_override", + "type": "any", + "format": "" + } +]; +var FetchLiveboardDataRequest = _FetchLiveboardDataRequest; + +// models/FetchLiveboardSqlQueryRequest.ts +var _FetchLiveboardSqlQueryRequest = class _FetchLiveboardSqlQueryRequest { + static getAttributeTypeMap() { + return _FetchLiveboardSqlQueryRequest.attributeTypeMap; + } + constructor() { + } +}; +_FetchLiveboardSqlQueryRequest.discriminator = void 0; +_FetchLiveboardSqlQueryRequest.attributeTypeMap = [ + { + "name": "metadata_identifier", + "baseName": "metadata_identifier", + "type": "string", + "format": "" + }, + { + "name": "visualization_identifiers", + "baseName": "visualization_identifiers", + "type": "Array", + "format": "" + } +]; +var FetchLiveboardSqlQueryRequest = _FetchLiveboardSqlQueryRequest; + +// models/FetchLogsRequest.ts +var _FetchLogsRequest = class _FetchLogsRequest { + static getAttributeTypeMap() { + return _FetchLogsRequest.attributeTypeMap; + } + constructor() { + } +}; +_FetchLogsRequest.discriminator = void 0; +_FetchLogsRequest.attributeTypeMap = [ + { + "name": "log_type", + "baseName": "log_type", + "type": "FetchLogsRequestLogTypeEnum", + "format": "" + }, + { + "name": "start_epoch_time_in_millis", + "baseName": "start_epoch_time_in_millis", + "type": "number", + "format": "float" + }, + { + "name": "end_epoch_time_in_millis", + "baseName": "end_epoch_time_in_millis", + "type": "number", + "format": "float" + }, + { + "name": "get_all_logs", + "baseName": "get_all_logs", + "type": "boolean", + "format": "" + } +]; +var FetchLogsRequest = _FetchLogsRequest; + +// models/FetchObjectPrivilegesRequest.ts +var _FetchObjectPrivilegesRequest = class _FetchObjectPrivilegesRequest { + static getAttributeTypeMap() { + return _FetchObjectPrivilegesRequest.attributeTypeMap; + } + constructor() { + } +}; +_FetchObjectPrivilegesRequest.discriminator = void 0; +_FetchObjectPrivilegesRequest.attributeTypeMap = [ + { + "name": "metadata", + "baseName": "metadata", + "type": "Array", + "format": "" + }, + { + "name": "principals", + "baseName": "principals", + "type": "Array", + "format": "" + }, + { + "name": "record_offset", + "baseName": "record_offset", + "type": "number", + "format": "int32" + }, + { + "name": "record_size", + "baseName": "record_size", + "type": "number", + "format": "int32" + } +]; +var FetchObjectPrivilegesRequest = _FetchObjectPrivilegesRequest; + +// models/FetchPermissionsOfPrincipalsRequest.ts +var _FetchPermissionsOfPrincipalsRequest = class _FetchPermissionsOfPrincipalsRequest { + static getAttributeTypeMap() { + return _FetchPermissionsOfPrincipalsRequest.attributeTypeMap; + } + constructor() { + } +}; +_FetchPermissionsOfPrincipalsRequest.discriminator = void 0; +_FetchPermissionsOfPrincipalsRequest.attributeTypeMap = [ + { + "name": "principals", + "baseName": "principals", + "type": "Array", + "format": "" + }, + { + "name": "metadata", + "baseName": "metadata", + "type": "Array", + "format": "" + }, + { + "name": "record_offset", + "baseName": "record_offset", + "type": "number", + "format": "int32" + }, + { + "name": "record_size", + "baseName": "record_size", + "type": "number", + "format": "int32" + }, + { + "name": "default_metadata_type", + "baseName": "default_metadata_type", + "type": "FetchPermissionsOfPrincipalsRequestDefaultMetadataTypeEnum", + "format": "" + } +]; +var FetchPermissionsOfPrincipalsRequest = _FetchPermissionsOfPrincipalsRequest; + +// models/FetchPermissionsOnMetadataRequest.ts +var _FetchPermissionsOnMetadataRequest = class _FetchPermissionsOnMetadataRequest { + static getAttributeTypeMap() { + return _FetchPermissionsOnMetadataRequest.attributeTypeMap; + } + constructor() { + } +}; +_FetchPermissionsOnMetadataRequest.discriminator = void 0; +_FetchPermissionsOnMetadataRequest.attributeTypeMap = [ + { + "name": "metadata", + "baseName": "metadata", + "type": "Array", + "format": "" + }, + { + "name": "principals", + "baseName": "principals", + "type": "Array", + "format": "" + }, + { + "name": "include_dependent_objects", + "baseName": "include_dependent_objects", + "type": "boolean", + "format": "" + }, + { + "name": "record_offset", + "baseName": "record_offset", + "type": "number", + "format": "int32" + }, + { + "name": "record_size", + "baseName": "record_size", + "type": "number", + "format": "int32" + }, + { + "name": "permission_type", + "baseName": "permission_type", + "type": "string", + "format": "" + } +]; +var FetchPermissionsOnMetadataRequest = _FetchPermissionsOnMetadataRequest; + +// models/FilterRules.ts +var _FilterRules = class _FilterRules { + static getAttributeTypeMap() { + return _FilterRules.attributeTypeMap; + } + constructor() { + } +}; +_FilterRules.discriminator = void 0; +_FilterRules.attributeTypeMap = [ + { + "name": "column_name", + "baseName": "column_name", + "type": "string", + "format": "" + }, + { + "name": "operator", + "baseName": "operator", + "type": "FilterRulesOperatorEnum", + "format": "" + }, + { + "name": "values", + "baseName": "values", + "type": "Array", + "format": "" + } +]; +var FilterRules = _FilterRules; + +// models/ForceLogoutUsersRequest.ts +var _ForceLogoutUsersRequest = class _ForceLogoutUsersRequest { + static getAttributeTypeMap() { + return _ForceLogoutUsersRequest.attributeTypeMap; + } + constructor() { + } +}; +_ForceLogoutUsersRequest.discriminator = void 0; +_ForceLogoutUsersRequest.attributeTypeMap = [ + { + "name": "user_identifiers", + "baseName": "user_identifiers", + "type": "Array", + "format": "" + } +]; +var ForceLogoutUsersRequest = _ForceLogoutUsersRequest; + +// models/Frequency.ts +var _Frequency = class _Frequency { + static getAttributeTypeMap() { + return _Frequency.attributeTypeMap; + } + constructor() { + } +}; +_Frequency.discriminator = void 0; +_Frequency.attributeTypeMap = [ + { + "name": "cron_expression", + "baseName": "cron_expression", + "type": "CronExpression", + "format": "" + } +]; +var Frequency = _Frequency; + +// models/FrequencyInput.ts +var _FrequencyInput = class _FrequencyInput { + static getAttributeTypeMap() { + return _FrequencyInput.attributeTypeMap; + } + constructor() { + } +}; +_FrequencyInput.discriminator = void 0; +_FrequencyInput.attributeTypeMap = [ + { + "name": "cron_expression", + "baseName": "cron_expression", + "type": "CronExpressionInput", + "format": "" + } +]; +var FrequencyInput = _FrequencyInput; + +// models/GenerateCSVRequest.ts +var _GenerateCSVRequest = class _GenerateCSVRequest { + static getAttributeTypeMap() { + return _GenerateCSVRequest.attributeTypeMap; + } + constructor() { + } +}; +_GenerateCSVRequest.discriminator = void 0; +_GenerateCSVRequest.attributeTypeMap = [ + { + "name": "start_date", + "baseName": "start_date", + "type": "string", + "format": "" + }, + { + "name": "end_date", + "baseName": "end_date", + "type": "string", + "format": "" + }, + { + "name": "calendar_type", + "baseName": "calendar_type", + "type": "GenerateCSVRequestCalendarTypeEnum", + "format": "" + }, + { + "name": "month_offset", + "baseName": "month_offset", + "type": "GenerateCSVRequestMonthOffsetEnum", + "format": "" + }, + { + "name": "start_day_of_week", + "baseName": "start_day_of_week", + "type": "GenerateCSVRequestStartDayOfWeekEnum", + "format": "" + }, + { + "name": "quarter_name_prefix", + "baseName": "quarter_name_prefix", + "type": "string", + "format": "" + }, + { + "name": "year_name_prefix", + "baseName": "year_name_prefix", + "type": "string", + "format": "" + } +]; +var GenerateCSVRequest = _GenerateCSVRequest; + +// models/GenericInfo.ts +var _GenericInfo = class _GenericInfo { + static getAttributeTypeMap() { + return _GenericInfo.attributeTypeMap; + } + constructor() { + } +}; +_GenericInfo.discriminator = void 0; +_GenericInfo.attributeTypeMap = [ + { + "name": "id", + "baseName": "id", + "type": "string", + "format": "" + }, + { + "name": "name", + "baseName": "name", + "type": "string", + "format": "" + } +]; +var GenericInfo = _GenericInfo; + +// models/GetAsyncImportStatusResponse.ts +var _GetAsyncImportStatusResponse = class _GetAsyncImportStatusResponse { + static getAttributeTypeMap() { + return _GetAsyncImportStatusResponse.attributeTypeMap; + } + constructor() { + } +}; +_GetAsyncImportStatusResponse.discriminator = void 0; +_GetAsyncImportStatusResponse.attributeTypeMap = [ + { + "name": "status_list", + "baseName": "status_list", + "type": "Array", + "format": "" + }, + { + "name": "last_batch", + "baseName": "last_batch", + "type": "boolean", + "format": "" + } +]; +var GetAsyncImportStatusResponse = _GetAsyncImportStatusResponse; + +// models/GetCustomAccessTokenRequest.ts +var _GetCustomAccessTokenRequest = class _GetCustomAccessTokenRequest { + static getAttributeTypeMap() { + return _GetCustomAccessTokenRequest.attributeTypeMap; + } + constructor() { + } +}; +_GetCustomAccessTokenRequest.discriminator = void 0; +_GetCustomAccessTokenRequest.attributeTypeMap = [ + { + "name": "username", + "baseName": "username", + "type": "string", + "format": "" + }, + { + "name": "password", + "baseName": "password", + "type": "string", + "format": "" + }, + { + "name": "secret_key", + "baseName": "secret_key", + "type": "string", + "format": "" + }, + { + "name": "validity_time_in_sec", + "baseName": "validity_time_in_sec", + "type": "number", + "format": "int32" + }, + { + "name": "org_identifier", + "baseName": "org_identifier", + "type": "string", + "format": "" + }, + { + "name": "persist_option", + "baseName": "persist_option", + "type": "GetCustomAccessTokenRequestPersistOptionEnum", + "format": "" + }, + { + "name": "filter_rules", + "baseName": "filter_rules", + "type": "Array", + "format": "" + }, + { + "name": "parameter_values", + "baseName": "parameter_values", + "type": "Array", + "format": "" + }, + { + "name": "variable_values", + "baseName": "variable_values", + "type": "Array", + "format": "" + }, + { + "name": "objects", + "baseName": "objects", + "type": "Array", + "format": "" + }, + { + "name": "email", + "baseName": "email", + "type": "string", + "format": "" + }, + { + "name": "display_name", + "baseName": "display_name", + "type": "string", + "format": "" + }, + { + "name": "groups", + "baseName": "groups", + "type": "Array", + "format": "" + }, + { + "name": "auto_create", + "baseName": "auto_create", + "type": "boolean", + "format": "" + } +]; +var GetCustomAccessTokenRequest = _GetCustomAccessTokenRequest; + +// models/GetDataSourceSuggestionsRequest.ts +var _GetDataSourceSuggestionsRequest = class _GetDataSourceSuggestionsRequest { + static getAttributeTypeMap() { + return _GetDataSourceSuggestionsRequest.attributeTypeMap; + } + constructor() { + } +}; +_GetDataSourceSuggestionsRequest.discriminator = void 0; +_GetDataSourceSuggestionsRequest.attributeTypeMap = [ + { + "name": "query", + "baseName": "query", + "type": "string", + "format": "" + } +]; +var GetDataSourceSuggestionsRequest = _GetDataSourceSuggestionsRequest; + +// models/GetFullAccessTokenRequest.ts +var _GetFullAccessTokenRequest = class _GetFullAccessTokenRequest { + static getAttributeTypeMap() { + return _GetFullAccessTokenRequest.attributeTypeMap; + } + constructor() { + } +}; +_GetFullAccessTokenRequest.discriminator = void 0; +_GetFullAccessTokenRequest.attributeTypeMap = [ + { + "name": "username", + "baseName": "username", + "type": "string", + "format": "" + }, + { + "name": "password", + "baseName": "password", + "type": "string", + "format": "" + }, + { + "name": "secret_key", + "baseName": "secret_key", + "type": "string", + "format": "" + }, + { + "name": "validity_time_in_sec", + "baseName": "validity_time_in_sec", + "type": "number", + "format": "int32" + }, + { + "name": "org_id", + "baseName": "org_id", + "type": "number", + "format": "int32" + }, + { + "name": "email", + "baseName": "email", + "type": "string", + "format": "" + }, + { + "name": "display_name", + "baseName": "display_name", + "type": "string", + "format": "" + }, + { + "name": "auto_create", + "baseName": "auto_create", + "type": "boolean", + "format": "" + }, + { + "name": "group_identifiers", + "baseName": "group_identifiers", + "type": "Array", + "format": "" + }, + { + "name": "user_parameters", + "baseName": "user_parameters", + "type": "GetFullAccessTokenRequestUserParameters", + "format": "" + } +]; +var GetFullAccessTokenRequest = _GetFullAccessTokenRequest; + +// models/GetFullAccessTokenRequestUserParameters.ts +var _GetFullAccessTokenRequestUserParameters = class _GetFullAccessTokenRequestUserParameters { + static getAttributeTypeMap() { + return _GetFullAccessTokenRequestUserParameters.attributeTypeMap; + } + constructor() { + } +}; +_GetFullAccessTokenRequestUserParameters.discriminator = void 0; +_GetFullAccessTokenRequestUserParameters.attributeTypeMap = [ + { + "name": "objects", + "baseName": "objects", + "type": "Array", + "format": "" + }, + { + "name": "runtime_filters", + "baseName": "runtime_filters", + "type": "Array", + "format": "" + }, + { + "name": "runtime_sorts", + "baseName": "runtime_sorts", + "type": "Array", + "format": "" + }, + { + "name": "parameters", + "baseName": "parameters", + "type": "Array", + "format": "" + } +]; +var GetFullAccessTokenRequestUserParameters = _GetFullAccessTokenRequestUserParameters; + +// models/GetNLInstructionsRequest.ts +var _GetNLInstructionsRequest = class _GetNLInstructionsRequest { + static getAttributeTypeMap() { + return _GetNLInstructionsRequest.attributeTypeMap; + } + constructor() { + } +}; +_GetNLInstructionsRequest.discriminator = void 0; +_GetNLInstructionsRequest.attributeTypeMap = [ + { + "name": "data_source_identifier", + "baseName": "data_source_identifier", + "type": "string", + "format": "" + } +]; +var GetNLInstructionsRequest = _GetNLInstructionsRequest; + +// models/GetObjectAccessTokenRequest.ts +var _GetObjectAccessTokenRequest = class _GetObjectAccessTokenRequest { + static getAttributeTypeMap() { + return _GetObjectAccessTokenRequest.attributeTypeMap; + } + constructor() { + } +}; +_GetObjectAccessTokenRequest.discriminator = void 0; +_GetObjectAccessTokenRequest.attributeTypeMap = [ + { + "name": "username", + "baseName": "username", + "type": "string", + "format": "" + }, + { + "name": "object_id", + "baseName": "object_id", + "type": "string", + "format": "" + }, + { + "name": "password", + "baseName": "password", + "type": "string", + "format": "" + }, + { + "name": "secret_key", + "baseName": "secret_key", + "type": "string", + "format": "" + }, + { + "name": "validity_time_in_sec", + "baseName": "validity_time_in_sec", + "type": "number", + "format": "int32" + }, + { + "name": "org_id", + "baseName": "org_id", + "type": "number", + "format": "int32" + }, + { + "name": "email", + "baseName": "email", + "type": "string", + "format": "" + }, + { + "name": "display_name", + "baseName": "display_name", + "type": "string", + "format": "" + }, + { + "name": "auto_create", + "baseName": "auto_create", + "type": "boolean", + "format": "" + }, + { + "name": "group_identifiers", + "baseName": "group_identifiers", + "type": "Array", + "format": "" + }, + { + "name": "user_parameters", + "baseName": "user_parameters", + "type": "GetFullAccessTokenRequestUserParameters", + "format": "" + } +]; +var GetObjectAccessTokenRequest = _GetObjectAccessTokenRequest; + +// models/GetRelevantQuestionsRequest.ts +var _GetRelevantQuestionsRequest = class _GetRelevantQuestionsRequest { + static getAttributeTypeMap() { + return _GetRelevantQuestionsRequest.attributeTypeMap; + } + constructor() { + } +}; +_GetRelevantQuestionsRequest.discriminator = void 0; +_GetRelevantQuestionsRequest.attributeTypeMap = [ + { + "name": "metadata_context", + "baseName": "metadata_context", + "type": "GetRelevantQuestionsRequestMetadataContext", + "format": "" + }, + { + "name": "limit_relevant_questions", + "baseName": "limit_relevant_questions", + "type": "number", + "format": "int32" + }, + { + "name": "bypass_cache", + "baseName": "bypass_cache", + "type": "boolean", + "format": "" + }, + { + "name": "query", + "baseName": "query", + "type": "string", + "format": "" + }, + { + "name": "ai_context", + "baseName": "ai_context", + "type": "GetRelevantQuestionsRequestAiContext", + "format": "" + } +]; +var GetRelevantQuestionsRequest = _GetRelevantQuestionsRequest; + +// models/GetRelevantQuestionsRequestAiContext.ts +var _GetRelevantQuestionsRequestAiContext = class _GetRelevantQuestionsRequestAiContext { + static getAttributeTypeMap() { + return _GetRelevantQuestionsRequestAiContext.attributeTypeMap; + } + constructor() { + } +}; +_GetRelevantQuestionsRequestAiContext.discriminator = void 0; +_GetRelevantQuestionsRequestAiContext.attributeTypeMap = [ + { + "name": "instructions", + "baseName": "instructions", + "type": "Array", + "format": "" + }, + { + "name": "content", + "baseName": "content", + "type": "Array", + "format": "" + } +]; +var GetRelevantQuestionsRequestAiContext = _GetRelevantQuestionsRequestAiContext; + +// models/GetRelevantQuestionsRequestMetadataContext.ts +var _GetRelevantQuestionsRequestMetadataContext = class _GetRelevantQuestionsRequestMetadataContext { + static getAttributeTypeMap() { + return _GetRelevantQuestionsRequestMetadataContext.attributeTypeMap; + } + constructor() { + } +}; +_GetRelevantQuestionsRequestMetadataContext.discriminator = void 0; +_GetRelevantQuestionsRequestMetadataContext.attributeTypeMap = [ + { + "name": "data_source_identifiers", + "baseName": "data_source_identifiers", + "type": "Array", + "format": "" + }, + { + "name": "answer_identifiers", + "baseName": "answer_identifiers", + "type": "Array", + "format": "" + }, + { + "name": "conversation_identifier", + "baseName": "conversation_identifier", + "type": "string", + "format": "" + }, + { + "name": "liveboard_identifiers", + "baseName": "liveboard_identifiers", + "type": "Array", + "format": "" + } +]; +var GetRelevantQuestionsRequestMetadataContext = _GetRelevantQuestionsRequestMetadataContext; + +// models/GetTokenResponse.ts +var _GetTokenResponse = class _GetTokenResponse { + static getAttributeTypeMap() { + return _GetTokenResponse.attributeTypeMap; + } + constructor() { + } +}; +_GetTokenResponse.discriminator = void 0; +_GetTokenResponse.attributeTypeMap = [ + { + "name": "token", + "baseName": "token", + "type": "string", + "format": "" + }, + { + "name": "creation_time_in_millis", + "baseName": "creation_time_in_millis", + "type": "number", + "format": "float" + }, + { + "name": "expiration_time_in_millis", + "baseName": "expiration_time_in_millis", + "type": "number", + "format": "float" + }, + { + "name": "valid_for_user_id", + "baseName": "valid_for_user_id", + "type": "string", + "format": "" + }, + { + "name": "valid_for_username", + "baseName": "valid_for_username", + "type": "string", + "format": "" + } +]; +var GetTokenResponse = _GetTokenResponse; + +// models/GroupInfo.ts +var _GroupInfo = class _GroupInfo { + static getAttributeTypeMap() { + return _GroupInfo.attributeTypeMap; + } + constructor() { + } +}; +_GroupInfo.discriminator = void 0; +_GroupInfo.attributeTypeMap = [ + { + "name": "id", + "baseName": "id", + "type": "string", + "format": "" + }, + { + "name": "name", + "baseName": "name", + "type": "string", + "format": "" + } +]; +var GroupInfo = _GroupInfo; + +// models/GroupObject.ts +var _GroupObject = class _GroupObject { + static getAttributeTypeMap() { + return _GroupObject.attributeTypeMap; + } + constructor() { + } +}; +_GroupObject.discriminator = void 0; +_GroupObject.attributeTypeMap = [ + { + "name": "identifier", + "baseName": "identifier", + "type": "string", + "format": "" + } +]; +var GroupObject = _GroupObject; + +// models/GroupsImportListInput.ts +var _GroupsImportListInput = class _GroupsImportListInput { + static getAttributeTypeMap() { + return _GroupsImportListInput.attributeTypeMap; + } + constructor() { + } +}; +_GroupsImportListInput.discriminator = void 0; +_GroupsImportListInput.attributeTypeMap = [ + { + "name": "display_name", + "baseName": "display_name", + "type": "string", + "format": "" + }, + { + "name": "group_identifier", + "baseName": "group_identifier", + "type": "string", + "format": "" + }, + { + "name": "default_liveboard_identifiers", + "baseName": "default_liveboard_identifiers", + "type": "Array", + "format": "" + }, + { + "name": "description", + "baseName": "description", + "type": "string", + "format": "" + }, + { + "name": "privileges", + "baseName": "privileges", + "type": "Array", + "format": "" + }, + { + "name": "sub_group_identifiers", + "baseName": "sub_group_identifiers", + "type": "Array", + "format": "" + }, + { + "name": "type", + "baseName": "type", + "type": "GroupsImportListInputTypeEnum", + "format": "" + }, + { + "name": "user_identifiers", + "baseName": "user_identifiers", + "type": "Array", + "format": "" + }, + { + "name": "visibility", + "baseName": "visibility", + "type": "GroupsImportListInputVisibilityEnum", + "format": "" + } +]; +var GroupsImportListInput = _GroupsImportListInput; + +// models/HeaderAttributeInput.ts +var _HeaderAttributeInput = class _HeaderAttributeInput { + static getAttributeTypeMap() { + return _HeaderAttributeInput.attributeTypeMap; + } + constructor() { + } +}; +_HeaderAttributeInput.discriminator = void 0; +_HeaderAttributeInput.attributeTypeMap = [ + { + "name": "name", + "baseName": "name", + "type": "string", + "format": "" + }, + { + "name": "value", + "baseName": "value", + "type": "string", + "format": "" + } +]; +var HeaderAttributeInput = _HeaderAttributeInput; + +// models/HeaderUpdateInput.ts +var _HeaderUpdateInput = class _HeaderUpdateInput { + static getAttributeTypeMap() { + return _HeaderUpdateInput.attributeTypeMap; + } + constructor() { + } +}; +_HeaderUpdateInput.discriminator = void 0; +_HeaderUpdateInput.attributeTypeMap = [ + { + "name": "identifier", + "baseName": "identifier", + "type": "string", + "format": "" + }, + { + "name": "obj_identifier", + "baseName": "obj_identifier", + "type": "string", + "format": "" + }, + { + "name": "type", + "baseName": "type", + "type": "HeaderUpdateInputTypeEnum", + "format": "" + }, + { + "name": "attributes", + "baseName": "attributes", + "type": "Array", + "format": "" + } +]; +var HeaderUpdateInput = _HeaderUpdateInput; + +// models/ImportEPackAsyncTaskStatus.ts +var _ImportEPackAsyncTaskStatus = class _ImportEPackAsyncTaskStatus { + static getAttributeTypeMap() { + return _ImportEPackAsyncTaskStatus.attributeTypeMap; + } + constructor() { + } +}; +_ImportEPackAsyncTaskStatus.discriminator = void 0; +_ImportEPackAsyncTaskStatus.attributeTypeMap = [ + { + "name": "tenant_id", + "baseName": "tenant_id", + "type": "string", + "format": "" + }, + { + "name": "org_id", + "baseName": "org_id", + "type": "number", + "format": "int32" + }, + { + "name": "task_id", + "baseName": "task_id", + "type": "string", + "format": "" + }, + { + "name": "task_name", + "baseName": "task_name", + "type": "string", + "format": "" + }, + { + "name": "import_response", + "baseName": "import_response", + "type": "any", + "format": "" + }, + { + "name": "task_status", + "baseName": "task_status", + "type": "ImportEPackAsyncTaskStatusTaskStatusEnum", + "format": "" + }, + { + "name": "author_id", + "baseName": "author_id", + "type": "string", + "format": "" + }, + { + "name": "import_policy", + "baseName": "import_policy", + "type": "ImportEPackAsyncTaskStatusImportPolicyEnum", + "format": "" + }, + { + "name": "created_at", + "baseName": "created_at", + "type": "number", + "format": "float" + }, + { + "name": "in_progress_at", + "baseName": "in_progress_at", + "type": "number", + "format": "float" + }, + { + "name": "completed_at", + "baseName": "completed_at", + "type": "number", + "format": "float" + }, + { + "name": "total_object_count", + "baseName": "total_object_count", + "type": "number", + "format": "int32" + }, + { + "name": "object_processed_count", + "baseName": "object_processed_count", + "type": "number", + "format": "int32" + }, + { + "name": "modified_at", + "baseName": "modified_at", + "type": "number", + "format": "float" + }, + { + "name": "author_display_name", + "baseName": "author_display_name", + "type": "string", + "format": "" + } +]; +var ImportEPackAsyncTaskStatus = _ImportEPackAsyncTaskStatus; + +// models/ImportMetadataTMLAsyncRequest.ts +var _ImportMetadataTMLAsyncRequest = class _ImportMetadataTMLAsyncRequest { + static getAttributeTypeMap() { + return _ImportMetadataTMLAsyncRequest.attributeTypeMap; + } + constructor() { + } +}; +_ImportMetadataTMLAsyncRequest.discriminator = void 0; +_ImportMetadataTMLAsyncRequest.attributeTypeMap = [ + { + "name": "metadata_tmls", + "baseName": "metadata_tmls", + "type": "Array", + "format": "" + }, + { + "name": "create_new", + "baseName": "create_new", + "type": "boolean", + "format": "" + }, + { + "name": "all_orgs_override", + "baseName": "all_orgs_override", + "type": "boolean", + "format": "" + }, + { + "name": "import_policy", + "baseName": "import_policy", + "type": "ImportMetadataTMLAsyncRequestImportPolicyEnum", + "format": "" + }, + { + "name": "skip_diff_check", + "baseName": "skip_diff_check", + "type": "boolean", + "format": "" + }, + { + "name": "enable_large_metadata_validation", + "baseName": "enable_large_metadata_validation", + "type": "boolean", + "format": "" + } +]; +var ImportMetadataTMLAsyncRequest = _ImportMetadataTMLAsyncRequest; + +// models/ImportMetadataTMLRequest.ts +var _ImportMetadataTMLRequest = class _ImportMetadataTMLRequest { + static getAttributeTypeMap() { + return _ImportMetadataTMLRequest.attributeTypeMap; + } + constructor() { + } +}; +_ImportMetadataTMLRequest.discriminator = void 0; +_ImportMetadataTMLRequest.attributeTypeMap = [ + { + "name": "metadata_tmls", + "baseName": "metadata_tmls", + "type": "Array", + "format": "" + }, + { + "name": "import_policy", + "baseName": "import_policy", + "type": "ImportMetadataTMLRequestImportPolicyEnum", + "format": "" + }, + { + "name": "create_new", + "baseName": "create_new", + "type": "boolean", + "format": "" + }, + { + "name": "all_orgs_override", + "baseName": "all_orgs_override", + "type": "boolean", + "format": "" + }, + { + "name": "skip_diff_check", + "baseName": "skip_diff_check", + "type": "boolean", + "format": "" + }, + { + "name": "enable_large_metadata_validation", + "baseName": "enable_large_metadata_validation", + "type": "boolean", + "format": "" + } +]; +var ImportMetadataTMLRequest = _ImportMetadataTMLRequest; + +// models/ImportUser.ts +var _ImportUser = class _ImportUser { + static getAttributeTypeMap() { + return _ImportUser.attributeTypeMap; + } + constructor() { + } +}; +_ImportUser.discriminator = void 0; +_ImportUser.attributeTypeMap = [ + { + "name": "user_identifier", + "baseName": "user_identifier", + "type": "string", + "format": "" + }, + { + "name": "display_name", + "baseName": "display_name", + "type": "string", + "format": "" + }, + { + "name": "password", + "baseName": "password", + "type": "string", + "format": "" + }, + { + "name": "account_type", + "baseName": "account_type", + "type": "ImportUserAccountTypeEnum", + "format": "" + }, + { + "name": "account_status", + "baseName": "account_status", + "type": "ImportUserAccountStatusEnum", + "format": "" + }, + { + "name": "email", + "baseName": "email", + "type": "string", + "format": "" + }, + { + "name": "org_identifiers", + "baseName": "org_identifiers", + "type": "Array", + "format": "" + }, + { + "name": "group_identifiers", + "baseName": "group_identifiers", + "type": "Array", + "format": "" + }, + { + "name": "visibility", + "baseName": "visibility", + "type": "ImportUserVisibilityEnum", + "format": "" + }, + { + "name": "notify_on_share", + "baseName": "notify_on_share", + "type": "boolean", + "format": "" + }, + { + "name": "show_onboarding_experience", + "baseName": "show_onboarding_experience", + "type": "boolean", + "format": "" + }, + { + "name": "onboarding_experience_completed", + "baseName": "onboarding_experience_completed", + "type": "boolean", + "format": "" + }, + { + "name": "home_liveboard_identifier", + "baseName": "home_liveboard_identifier", + "type": "string", + "format": "" + }, + { + "name": "favorite_metadata", + "baseName": "favorite_metadata", + "type": "Array", + "format": "" + }, + { + "name": "preferred_locale", + "baseName": "preferred_locale", + "type": "ImportUserPreferredLocaleEnum", + "format": "" + }, + { + "name": "use_browser_language", + "baseName": "use_browser_language", + "type": "boolean", + "format": "" + } +]; +var ImportUser = _ImportUser; + +// models/ImportUserGroupsRequest.ts +var _ImportUserGroupsRequest = class _ImportUserGroupsRequest { + static getAttributeTypeMap() { + return _ImportUserGroupsRequest.attributeTypeMap; + } + constructor() { + } +}; +_ImportUserGroupsRequest.discriminator = void 0; +_ImportUserGroupsRequest.attributeTypeMap = [ + { + "name": "groups", + "baseName": "groups", + "type": "Array", + "format": "" + }, + { + "name": "delete_unspecified_groups", + "baseName": "delete_unspecified_groups", + "type": "boolean", + "format": "" + }, + { + "name": "dry_run", + "baseName": "dry_run", + "type": "boolean", + "format": "" + } +]; +var ImportUserGroupsRequest = _ImportUserGroupsRequest; + +// models/ImportUserGroupsResponse.ts +var _ImportUserGroupsResponse = class _ImportUserGroupsResponse { + static getAttributeTypeMap() { + return _ImportUserGroupsResponse.attributeTypeMap; + } + constructor() { + } +}; +_ImportUserGroupsResponse.discriminator = void 0; +_ImportUserGroupsResponse.attributeTypeMap = [ + { + "name": "groups_added", + "baseName": "groups_added", + "type": "Array", + "format": "" + }, + { + "name": "groups_deleted", + "baseName": "groups_deleted", + "type": "Array", + "format": "" + }, + { + "name": "groups_updated", + "baseName": "groups_updated", + "type": "Array", + "format": "" + } +]; +var ImportUserGroupsResponse = _ImportUserGroupsResponse; + +// models/ImportUserType.ts +var _ImportUserType = class _ImportUserType { + static getAttributeTypeMap() { + return _ImportUserType.attributeTypeMap; + } + constructor() { + } +}; +_ImportUserType.discriminator = void 0; +_ImportUserType.attributeTypeMap = [ + { + "name": "id", + "baseName": "id", + "type": "string", + "format": "" + }, + { + "name": "name", + "baseName": "name", + "type": "string", + "format": "" + } +]; +var ImportUserType = _ImportUserType; + +// models/ImportUsersRequest.ts +var _ImportUsersRequest = class _ImportUsersRequest { + static getAttributeTypeMap() { + return _ImportUsersRequest.attributeTypeMap; + } + constructor() { + } +}; +_ImportUsersRequest.discriminator = void 0; +_ImportUsersRequest.attributeTypeMap = [ + { + "name": "users", + "baseName": "users", + "type": "Array", + "format": "" + }, + { + "name": "default_password", + "baseName": "default_password", + "type": "string", + "format": "" + }, + { + "name": "dry_run", + "baseName": "dry_run", + "type": "boolean", + "format": "" + }, + { + "name": "delete_unspecified_users", + "baseName": "delete_unspecified_users", + "type": "boolean", + "format": "" + } +]; +var ImportUsersRequest = _ImportUsersRequest; + +// models/ImportUsersResponse.ts +var _ImportUsersResponse = class _ImportUsersResponse { + static getAttributeTypeMap() { + return _ImportUsersResponse.attributeTypeMap; + } + constructor() { + } +}; +_ImportUsersResponse.discriminator = void 0; +_ImportUsersResponse.attributeTypeMap = [ + { + "name": "users_added", + "baseName": "users_added", + "type": "Array", + "format": "" + }, + { + "name": "users_updated", + "baseName": "users_updated", + "type": "Array", + "format": "" + }, + { + "name": "users_deleted", + "baseName": "users_deleted", + "type": "Array", + "format": "" + } +]; +var ImportUsersResponse = _ImportUsersResponse; + +// models/InputEurekaNLSRequest.ts +var _InputEurekaNLSRequest = class _InputEurekaNLSRequest { + static getAttributeTypeMap() { + return _InputEurekaNLSRequest.attributeTypeMap; + } + constructor() { + } +}; +_InputEurekaNLSRequest.discriminator = void 0; +_InputEurekaNLSRequest.attributeTypeMap = [ + { + "name": "agentVersion", + "baseName": "agentVersion", + "type": "number", + "format": "int32" + }, + { + "name": "bypassCache", + "baseName": "bypassCache", + "type": "boolean", + "format": "" + }, + { + "name": "instructions", + "baseName": "instructions", + "type": "Array", + "format": "" + }, + { + "name": "query", + "baseName": "query", + "type": "string", + "format": "" + } +]; +var InputEurekaNLSRequest = _InputEurekaNLSRequest; + +// models/JWTMetadataObject.ts +var _JWTMetadataObject = class _JWTMetadataObject { + static getAttributeTypeMap() { + return _JWTMetadataObject.attributeTypeMap; + } + constructor() { + } +}; +_JWTMetadataObject.discriminator = void 0; +_JWTMetadataObject.attributeTypeMap = [ + { + "name": "identifier", + "baseName": "identifier", + "type": "string", + "format": "" + }, + { + "name": "type", + "baseName": "type", + "type": "JWTMetadataObjectTypeEnum", + "format": "" + } +]; +var JWTMetadataObject = _JWTMetadataObject; + +// models/JWTParameter.ts +var _JWTParameter = class _JWTParameter { + static getAttributeTypeMap() { + return _JWTParameter.attributeTypeMap; + } + constructor() { + } +}; +_JWTParameter.discriminator = void 0; +_JWTParameter.attributeTypeMap = [ + { + "name": "runtime_filter", + "baseName": "runtime_filter", + "type": "any", + "format": "" + }, + { + "name": "runtime_sort", + "baseName": "runtime_sort", + "type": "any", + "format": "" + }, + { + "name": "runtime_param_override", + "baseName": "runtime_param_override", + "type": "any", + "format": "" + } +]; +var JWTParameter = _JWTParameter; + +// models/JWTUserOptions.ts +var _JWTUserOptions = class _JWTUserOptions { + static getAttributeTypeMap() { + return _JWTUserOptions.attributeTypeMap; + } + constructor() { + } +}; +_JWTUserOptions.discriminator = void 0; +_JWTUserOptions.attributeTypeMap = [ + { + "name": "parameters", + "baseName": "parameters", + "type": "Array", + "format": "" + }, + { + "name": "metadata", + "baseName": "metadata", + "type": "Array", + "format": "" + } +]; +var JWTUserOptions = _JWTUserOptions; + +// models/JWTUserOptionsFull.ts +var _JWTUserOptionsFull = class _JWTUserOptionsFull { + static getAttributeTypeMap() { + return _JWTUserOptionsFull.attributeTypeMap; + } + constructor() { + } +}; +_JWTUserOptionsFull.discriminator = void 0; +_JWTUserOptionsFull.attributeTypeMap = [ + { + "name": "parameters", + "baseName": "parameters", + "type": "Array", + "format": "" + } +]; +var JWTUserOptionsFull = _JWTUserOptionsFull; + +// models/JobRecipient.ts +var _JobRecipient = class _JobRecipient { + static getAttributeTypeMap() { + return _JobRecipient.attributeTypeMap; + } + constructor() { + } +}; +_JobRecipient.discriminator = void 0; +_JobRecipient.attributeTypeMap = [ + { + "name": "type", + "baseName": "type", + "type": "JobRecipientTypeEnum", + "format": "" + }, + { + "name": "id", + "baseName": "id", + "type": "string", + "format": "" + }, + { + "name": "name", + "baseName": "name", + "type": "string", + "format": "" + }, + { + "name": "email", + "baseName": "email", + "type": "string", + "format": "" + } +]; +var JobRecipient = _JobRecipient; + +// models/LiveboardContent.ts +var _LiveboardContent = class _LiveboardContent { + static getAttributeTypeMap() { + return _LiveboardContent.attributeTypeMap; + } + constructor() { + } +}; +_LiveboardContent.discriminator = void 0; +_LiveboardContent.attributeTypeMap = [ + { + "name": "available_data_row_count", + "baseName": "available_data_row_count", + "type": "number", + "format": "int32" + }, + { + "name": "column_names", + "baseName": "column_names", + "type": "Array", + "format": "" + }, + { + "name": "data_rows", + "baseName": "data_rows", + "type": "Array", + "format": "" + }, + { + "name": "record_offset", + "baseName": "record_offset", + "type": "number", + "format": "int32" + }, + { + "name": "record_size", + "baseName": "record_size", + "type": "number", + "format": "int32" + }, + { + "name": "returned_data_row_count", + "baseName": "returned_data_row_count", + "type": "number", + "format": "int32" + }, + { + "name": "sampling_ratio", + "baseName": "sampling_ratio", + "type": "number", + "format": "float" + }, + { + "name": "visualization_id", + "baseName": "visualization_id", + "type": "string", + "format": "" + }, + { + "name": "visualization_name", + "baseName": "visualization_name", + "type": "string", + "format": "" + } +]; +var LiveboardContent = _LiveboardContent; + +// models/LiveboardDataResponse.ts +var _LiveboardDataResponse = class _LiveboardDataResponse { + static getAttributeTypeMap() { + return _LiveboardDataResponse.attributeTypeMap; + } + constructor() { + } +}; +_LiveboardDataResponse.discriminator = void 0; +_LiveboardDataResponse.attributeTypeMap = [ + { + "name": "metadata_id", + "baseName": "metadata_id", + "type": "string", + "format": "" + }, + { + "name": "metadata_name", + "baseName": "metadata_name", + "type": "string", + "format": "" + }, + { + "name": "contents", + "baseName": "contents", + "type": "Array", + "format": "" + } +]; +var LiveboardDataResponse = _LiveboardDataResponse; + +// models/LiveboardOptions.ts +var _LiveboardOptions = class _LiveboardOptions { + static getAttributeTypeMap() { + return _LiveboardOptions.attributeTypeMap; + } + constructor() { + } +}; +_LiveboardOptions.discriminator = void 0; +_LiveboardOptions.attributeTypeMap = [ + { + "name": "visualization_identifiers", + "baseName": "visualization_identifiers", + "type": "Array", + "format": "" + } +]; +var LiveboardOptions = _LiveboardOptions; + +// models/LiveboardOptionsInput.ts +var _LiveboardOptionsInput = class _LiveboardOptionsInput { + static getAttributeTypeMap() { + return _LiveboardOptionsInput.attributeTypeMap; + } + constructor() { + } +}; +_LiveboardOptionsInput.discriminator = void 0; +_LiveboardOptionsInput.attributeTypeMap = [ + { + "name": "visualization_identifiers", + "baseName": "visualization_identifiers", + "type": "Array", + "format": "" + } +]; +var LiveboardOptionsInput = _LiveboardOptionsInput; + +// models/LogResponse.ts +var _LogResponse = class _LogResponse { + static getAttributeTypeMap() { + return _LogResponse.attributeTypeMap; + } + constructor() { + } +}; +_LogResponse.discriminator = void 0; +_LogResponse.attributeTypeMap = [ + { + "name": "date", + "baseName": "date", + "type": "string", + "format": "" + }, + { + "name": "log", + "baseName": "log", + "type": "string", + "format": "" + } +]; +var LogResponse = _LogResponse; + +// models/LoginRequest.ts +var _LoginRequest = class _LoginRequest { + static getAttributeTypeMap() { + return _LoginRequest.attributeTypeMap; + } + constructor() { + } +}; +_LoginRequest.discriminator = void 0; +_LoginRequest.attributeTypeMap = [ + { + "name": "username", + "baseName": "username", + "type": "string", + "format": "" + }, + { + "name": "password", + "baseName": "password", + "type": "string", + "format": "" + }, + { + "name": "org_identifier", + "baseName": "org_identifier", + "type": "string", + "format": "" + }, + { + "name": "remember_me", + "baseName": "remember_me", + "type": "boolean", + "format": "" + } +]; +var LoginRequest = _LoginRequest; + +// models/ManageObjectPrivilegeRequest.ts +var _ManageObjectPrivilegeRequest = class _ManageObjectPrivilegeRequest { + static getAttributeTypeMap() { + return _ManageObjectPrivilegeRequest.attributeTypeMap; + } + constructor() { + } +}; +_ManageObjectPrivilegeRequest.discriminator = void 0; +_ManageObjectPrivilegeRequest.attributeTypeMap = [ + { + "name": "operation", + "baseName": "operation", + "type": "ManageObjectPrivilegeRequestOperationEnum", + "format": "" + }, + { + "name": "metadata_type", + "baseName": "metadata_type", + "type": "ManageObjectPrivilegeRequestMetadataTypeEnum", + "format": "" + }, + { + "name": "object_privilege_types", + "baseName": "object_privilege_types", + "type": "Array", + "format": "" + }, + { + "name": "metadata_identifiers", + "baseName": "metadata_identifiers", + "type": "Array", + "format": "" + }, + { + "name": "principals", + "baseName": "principals", + "type": "Array", + "format": "" + } +]; +var ManageObjectPrivilegeRequest = _ManageObjectPrivilegeRequest; + +// models/MetadataAssociationItem.ts +var _MetadataAssociationItem = class _MetadataAssociationItem { + static getAttributeTypeMap() { + return _MetadataAssociationItem.attributeTypeMap; + } + constructor() { + } +}; +_MetadataAssociationItem.discriminator = void 0; +_MetadataAssociationItem.attributeTypeMap = [ + { + "name": "action_config", + "baseName": "action_config", + "type": "ActionConfig", + "format": "" + }, + { + "name": "identifier", + "baseName": "identifier", + "type": "string", + "format": "" + }, + { + "name": "type", + "baseName": "type", + "type": "string", + "format": "" + } +]; +var MetadataAssociationItem = _MetadataAssociationItem; + +// models/MetadataContext.ts +var _MetadataContext = class _MetadataContext { + static getAttributeTypeMap() { + return _MetadataContext.attributeTypeMap; + } + constructor() { + } +}; +_MetadataContext.discriminator = void 0; +_MetadataContext.attributeTypeMap = [ + { + "name": "data_source_identifiers", + "baseName": "data_source_identifiers", + "type": "Array", + "format": "" + }, + { + "name": "answer_identifiers", + "baseName": "answer_identifiers", + "type": "Array", + "format": "" + }, + { + "name": "conversation_identifier", + "baseName": "conversation_identifier", + "type": "string", + "format": "" + }, + { + "name": "liveboard_identifiers", + "baseName": "liveboard_identifiers", + "type": "Array", + "format": "" + } +]; +var MetadataContext = _MetadataContext; + +// models/MetadataInput.ts +var _MetadataInput = class _MetadataInput { + static getAttributeTypeMap() { + return _MetadataInput.attributeTypeMap; + } + constructor() { + } +}; +_MetadataInput.discriminator = void 0; +_MetadataInput.attributeTypeMap = [ + { + "name": "identifier", + "baseName": "identifier", + "type": "string", + "format": "" + }, + { + "name": "type", + "baseName": "type", + "type": "MetadataInputTypeEnum", + "format": "" + } +]; +var MetadataInput = _MetadataInput; + +// models/MetadataListItemInput.ts +var _MetadataListItemInput = class _MetadataListItemInput { + static getAttributeTypeMap() { + return _MetadataListItemInput.attributeTypeMap; + } + constructor() { + } +}; +_MetadataListItemInput.discriminator = void 0; +_MetadataListItemInput.attributeTypeMap = [ + { + "name": "identifier", + "baseName": "identifier", + "type": "string", + "format": "" + }, + { + "name": "obj_identifier", + "baseName": "obj_identifier", + "type": "string", + "format": "" + }, + { + "name": "name_pattern", + "baseName": "name_pattern", + "type": "string", + "format": "" + }, + { + "name": "type", + "baseName": "type", + "type": "MetadataListItemInputTypeEnum", + "format": "" + }, + { + "name": "subtypes", + "baseName": "subtypes", + "type": "Array", + "format": "" + } +]; +var MetadataListItemInput = _MetadataListItemInput; + +// models/MetadataObject.ts +var _MetadataObject = class _MetadataObject { + static getAttributeTypeMap() { + return _MetadataObject.attributeTypeMap; + } + constructor() { + } +}; +_MetadataObject.discriminator = void 0; +_MetadataObject.attributeTypeMap = [ + { + "name": "identifier", + "baseName": "identifier", + "type": "string", + "format": "" + }, + { + "name": "type", + "baseName": "type", + "type": "MetadataObjectTypeEnum", + "format": "" + } +]; +var MetadataObject = _MetadataObject; + +// models/MetadataResponse.ts +var _MetadataResponse = class _MetadataResponse { + static getAttributeTypeMap() { + return _MetadataResponse.attributeTypeMap; + } + constructor() { + } +}; +_MetadataResponse.discriminator = void 0; +_MetadataResponse.attributeTypeMap = [ + { + "name": "name", + "baseName": "name", + "type": "string", + "format": "" + }, + { + "name": "id", + "baseName": "id", + "type": "string", + "format": "" + }, + { + "name": "type", + "baseName": "type", + "type": "MetadataResponseTypeEnum", + "format": "" + } +]; +var MetadataResponse = _MetadataResponse; + +// models/MetadataSearchResponse.ts +var _MetadataSearchResponse = class _MetadataSearchResponse { + static getAttributeTypeMap() { + return _MetadataSearchResponse.attributeTypeMap; + } + constructor() { + } +}; +_MetadataSearchResponse.discriminator = void 0; +_MetadataSearchResponse.attributeTypeMap = [ + { + "name": "metadata_id", + "baseName": "metadata_id", + "type": "string", + "format": "" + }, + { + "name": "metadata_name", + "baseName": "metadata_name", + "type": "string", + "format": "" + }, + { + "name": "metadata_type", + "baseName": "metadata_type", + "type": "MetadataSearchResponseMetadataTypeEnum", + "format": "" + }, + { + "name": "metadata_obj_id", + "baseName": "metadata_obj_id", + "type": "string", + "format": "" + }, + { + "name": "dependent_objects", + "baseName": "dependent_objects", + "type": "any", + "format": "" + }, + { + "name": "incomplete_objects", + "baseName": "incomplete_objects", + "type": "Array", + "format": "" + }, + { + "name": "metadata_detail", + "baseName": "metadata_detail", + "type": "any", + "format": "" + }, + { + "name": "metadata_header", + "baseName": "metadata_header", + "type": "any", + "format": "" + }, + { + "name": "visualization_headers", + "baseName": "visualization_headers", + "type": "Array", + "format": "" + }, + { + "name": "stats", + "baseName": "stats", + "type": "any", + "format": "" + } +]; +var MetadataSearchResponse = _MetadataSearchResponse; + +// models/MetadataSearchSortOptions.ts +var _MetadataSearchSortOptions = class _MetadataSearchSortOptions { + static getAttributeTypeMap() { + return _MetadataSearchSortOptions.attributeTypeMap; + } + constructor() { + } +}; +_MetadataSearchSortOptions.discriminator = void 0; +_MetadataSearchSortOptions.attributeTypeMap = [ + { + "name": "field_name", + "baseName": "field_name", + "type": "MetadataSearchSortOptionsFieldNameEnum", + "format": "" + }, + { + "name": "order", + "baseName": "order", + "type": "MetadataSearchSortOptionsOrderEnum", + "format": "" + } +]; +var MetadataSearchSortOptions = _MetadataSearchSortOptions; + +// models/ModelTableList.ts +var _ModelTableList = class _ModelTableList { + static getAttributeTypeMap() { + return _ModelTableList.attributeTypeMap; + } + constructor() { + } +}; +_ModelTableList.discriminator = void 0; +_ModelTableList.attributeTypeMap = [ + { + "name": "model_name", + "baseName": "model_name", + "type": "string", + "format": "" + }, + { + "name": "model_path", + "baseName": "model_path", + "type": "string", + "format": "" + }, + { + "name": "tables", + "baseName": "tables", + "type": "Array", + "format": "" + } +]; +var ModelTableList = _ModelTableList; + +// models/NLInstructionsInfo.ts +var _NLInstructionsInfo = class _NLInstructionsInfo { + static getAttributeTypeMap() { + return _NLInstructionsInfo.attributeTypeMap; + } + constructor() { + } +}; +_NLInstructionsInfo.discriminator = void 0; +_NLInstructionsInfo.attributeTypeMap = [ + { + "name": "instructions", + "baseName": "instructions", + "type": "Array", + "format": "" + }, + { + "name": "scope", + "baseName": "scope", + "type": "NLInstructionsInfoScopeEnum", + "format": "" + } +]; +var NLInstructionsInfo = _NLInstructionsInfo; + +// models/NLInstructionsInfoInput.ts +var _NLInstructionsInfoInput = class _NLInstructionsInfoInput { + static getAttributeTypeMap() { + return _NLInstructionsInfoInput.attributeTypeMap; + } + constructor() { + } +}; +_NLInstructionsInfoInput.discriminator = void 0; +_NLInstructionsInfoInput.attributeTypeMap = [ + { + "name": "instructions", + "baseName": "instructions", + "type": "Array", + "format": "" + }, + { + "name": "scope", + "baseName": "scope", + "type": "NLInstructionsInfoInputScopeEnum", + "format": "" + } +]; +var NLInstructionsInfoInput = _NLInstructionsInfoInput; + +// models/ObjectIDAndName.ts +var _ObjectIDAndName = class _ObjectIDAndName { + static getAttributeTypeMap() { + return _ObjectIDAndName.attributeTypeMap; + } + constructor() { + } +}; +_ObjectIDAndName.discriminator = void 0; +_ObjectIDAndName.attributeTypeMap = [ + { + "name": "id", + "baseName": "id", + "type": "string", + "format": "" + }, + { + "name": "name", + "baseName": "name", + "type": "string", + "format": "" + } +]; +var ObjectIDAndName = _ObjectIDAndName; + +// models/ObjectPrivilegesMetadataInput.ts +var _ObjectPrivilegesMetadataInput = class _ObjectPrivilegesMetadataInput { + static getAttributeTypeMap() { + return _ObjectPrivilegesMetadataInput.attributeTypeMap; + } + constructor() { + } +}; +_ObjectPrivilegesMetadataInput.discriminator = void 0; +_ObjectPrivilegesMetadataInput.attributeTypeMap = [ + { + "name": "type", + "baseName": "type", + "type": "ObjectPrivilegesMetadataInputTypeEnum", + "format": "" + }, + { + "name": "identifier", + "baseName": "identifier", + "type": "string", + "format": "" + } +]; +var ObjectPrivilegesMetadataInput = _ObjectPrivilegesMetadataInput; + +// models/ObjectPrivilegesOfMetadataResponse.ts +var _ObjectPrivilegesOfMetadataResponse = class _ObjectPrivilegesOfMetadataResponse { + static getAttributeTypeMap() { + return _ObjectPrivilegesOfMetadataResponse.attributeTypeMap; + } + constructor() { + } +}; +_ObjectPrivilegesOfMetadataResponse.discriminator = void 0; +_ObjectPrivilegesOfMetadataResponse.attributeTypeMap = [ + { + "name": "metadata_object_privileges", + "baseName": "metadata_object_privileges", + "type": "any", + "format": "" + } +]; +var ObjectPrivilegesOfMetadataResponse = _ObjectPrivilegesOfMetadataResponse; + +// models/Org.ts +var _Org = class _Org { + static getAttributeTypeMap() { + return _Org.attributeTypeMap; + } + constructor() { + } +}; +_Org.discriminator = void 0; +_Org.attributeTypeMap = [ + { + "name": "id", + "baseName": "id", + "type": "number", + "format": "int32" + }, + { + "name": "name", + "baseName": "name", + "type": "string", + "format": "" + } +]; +var Org = _Org; + +// models/OrgChannelConfigInput.ts +var _OrgChannelConfigInput = class _OrgChannelConfigInput { + static getAttributeTypeMap() { + return _OrgChannelConfigInput.attributeTypeMap; + } + constructor() { + } +}; +_OrgChannelConfigInput.discriminator = void 0; +_OrgChannelConfigInput.attributeTypeMap = [ + { + "name": "org_identifier", + "baseName": "org_identifier", + "type": "string", + "format": "" + }, + { + "name": "operation", + "baseName": "operation", + "type": "OrgChannelConfigInputOperationEnum", + "format": "" + }, + { + "name": "preferences", + "baseName": "preferences", + "type": "Array", + "format": "" + }, + { + "name": "reset_events", + "baseName": "reset_events", + "type": "Array", + "format": "" + } +]; +var OrgChannelConfigInput = _OrgChannelConfigInput; + +// models/OrgChannelConfigResponse.ts +var _OrgChannelConfigResponse = class _OrgChannelConfigResponse { + static getAttributeTypeMap() { + return _OrgChannelConfigResponse.attributeTypeMap; + } + constructor() { + } +}; +_OrgChannelConfigResponse.discriminator = void 0; +_OrgChannelConfigResponse.attributeTypeMap = [ + { + "name": "org", + "baseName": "org", + "type": "OrgDetails", + "format": "" + }, + { + "name": "preferences", + "baseName": "preferences", + "type": "Array", + "format": "" + } +]; +var OrgChannelConfigResponse = _OrgChannelConfigResponse; + +// models/OrgDetails.ts +var _OrgDetails = class _OrgDetails { + static getAttributeTypeMap() { + return _OrgDetails.attributeTypeMap; + } + constructor() { + } +}; +_OrgDetails.discriminator = void 0; +_OrgDetails.attributeTypeMap = [ + { + "name": "id", + "baseName": "id", + "type": "string", + "format": "" + }, + { + "name": "name", + "baseName": "name", + "type": "string", + "format": "" + } +]; +var OrgDetails = _OrgDetails; + +// models/OrgInfo.ts +var _OrgInfo = class _OrgInfo { + static getAttributeTypeMap() { + return _OrgInfo.attributeTypeMap; + } + constructor() { + } +}; +_OrgInfo.discriminator = void 0; +_OrgInfo.attributeTypeMap = [ + { + "name": "id", + "baseName": "id", + "type": "number", + "format": "int32" + }, + { + "name": "name", + "baseName": "name", + "type": "string", + "format": "" + } +]; +var OrgInfo = _OrgInfo; + +// models/OrgNonEmbedAccess.ts +var _OrgNonEmbedAccess = class _OrgNonEmbedAccess { + static getAttributeTypeMap() { + return _OrgNonEmbedAccess.attributeTypeMap; + } + constructor() { + } +}; +_OrgNonEmbedAccess.discriminator = void 0; +_OrgNonEmbedAccess.attributeTypeMap = [ + { + "name": "block_full_app_access", + "baseName": "block_full_app_access", + "type": "boolean", + "format": "" + }, + { + "name": "groups_with_access", + "baseName": "groups_with_access", + "type": "Array", + "format": "" + } +]; +var OrgNonEmbedAccess = _OrgNonEmbedAccess; + +// models/OrgNonEmbedAccessInput.ts +var _OrgNonEmbedAccessInput = class _OrgNonEmbedAccessInput { + static getAttributeTypeMap() { + return _OrgNonEmbedAccessInput.attributeTypeMap; + } + constructor() { + } +}; +_OrgNonEmbedAccessInput.discriminator = void 0; +_OrgNonEmbedAccessInput.attributeTypeMap = [ + { + "name": "block_full_app_access", + "baseName": "block_full_app_access", + "type": "boolean", + "format": "" + }, + { + "name": "groups_identifiers_with_access", + "baseName": "groups_identifiers_with_access", + "type": "Array", + "format": "" + } +]; +var OrgNonEmbedAccessInput = _OrgNonEmbedAccessInput; + +// models/OrgPreferenceSearchCriteriaInput.ts +var _OrgPreferenceSearchCriteriaInput = class _OrgPreferenceSearchCriteriaInput { + static getAttributeTypeMap() { + return _OrgPreferenceSearchCriteriaInput.attributeTypeMap; + } + constructor() { + } +}; +_OrgPreferenceSearchCriteriaInput.discriminator = void 0; +_OrgPreferenceSearchCriteriaInput.attributeTypeMap = [ + { + "name": "org_identifier", + "baseName": "org_identifier", + "type": "string", + "format": "" + }, + { + "name": "event_types", + "baseName": "event_types", + "type": "Array", + "format": "" + } +]; +var OrgPreferenceSearchCriteriaInput = _OrgPreferenceSearchCriteriaInput; + +// models/OrgResponse.ts +var _OrgResponse = class _OrgResponse { + static getAttributeTypeMap() { + return _OrgResponse.attributeTypeMap; + } + constructor() { + } +}; +_OrgResponse.discriminator = void 0; +_OrgResponse.attributeTypeMap = [ + { + "name": "id", + "baseName": "id", + "type": "number", + "format": "int32" + }, + { + "name": "name", + "baseName": "name", + "type": "string", + "format": "" + }, + { + "name": "status", + "baseName": "status", + "type": "OrgResponseStatusEnum", + "format": "" + }, + { + "name": "description", + "baseName": "description", + "type": "string", + "format": "" + }, + { + "name": "visibility", + "baseName": "visibility", + "type": "OrgResponseVisibilityEnum", + "format": "" + } +]; +var OrgResponse = _OrgResponse; + +// models/OrgType.ts +var _OrgType = class _OrgType { + static getAttributeTypeMap() { + return _OrgType.attributeTypeMap; + } + constructor() { + } +}; +_OrgType.discriminator = void 0; +_OrgType.attributeTypeMap = [ + { + "name": "name", + "baseName": "name", + "type": "string", + "format": "" + }, + { + "name": "id", + "baseName": "id", + "type": "number", + "format": "int32" + } +]; +var OrgType = _OrgType; + +// models/ParameterValues.ts +var _ParameterValues = class _ParameterValues { + static getAttributeTypeMap() { + return _ParameterValues.attributeTypeMap; + } + constructor() { + } +}; +_ParameterValues.discriminator = void 0; +_ParameterValues.attributeTypeMap = [ + { + "name": "name", + "baseName": "name", + "type": "string", + "format": "" + }, + { + "name": "values", + "baseName": "values", + "type": "Array", + "format": "" + } +]; +var ParameterValues = _ParameterValues; + +// models/ParameterizeMetadataFieldsRequest.ts +var _ParameterizeMetadataFieldsRequest = class _ParameterizeMetadataFieldsRequest { + static getAttributeTypeMap() { + return _ParameterizeMetadataFieldsRequest.attributeTypeMap; + } + constructor() { + } +}; +_ParameterizeMetadataFieldsRequest.discriminator = void 0; +_ParameterizeMetadataFieldsRequest.attributeTypeMap = [ + { + "name": "metadata_type", + "baseName": "metadata_type", + "type": "ParameterizeMetadataFieldsRequestMetadataTypeEnum", + "format": "" + }, + { + "name": "metadata_identifier", + "baseName": "metadata_identifier", + "type": "string", + "format": "" + }, + { + "name": "field_type", + "baseName": "field_type", + "type": "ParameterizeMetadataFieldsRequestFieldTypeEnum", + "format": "" + }, + { + "name": "field_names", + "baseName": "field_names", + "type": "Array", + "format": "" + }, + { + "name": "variable_identifier", + "baseName": "variable_identifier", + "type": "string", + "format": "" + } +]; +var ParameterizeMetadataFieldsRequest = _ParameterizeMetadataFieldsRequest; + +// models/ParameterizeMetadataRequest.ts +var _ParameterizeMetadataRequest = class _ParameterizeMetadataRequest { + static getAttributeTypeMap() { + return _ParameterizeMetadataRequest.attributeTypeMap; + } + constructor() { + } +}; +_ParameterizeMetadataRequest.discriminator = void 0; +_ParameterizeMetadataRequest.attributeTypeMap = [ + { + "name": "metadata_type", + "baseName": "metadata_type", + "type": "ParameterizeMetadataRequestMetadataTypeEnum", + "format": "" + }, + { + "name": "metadata_identifier", + "baseName": "metadata_identifier", + "type": "string", + "format": "" + }, + { + "name": "field_type", + "baseName": "field_type", + "type": "ParameterizeMetadataRequestFieldTypeEnum", + "format": "" + }, + { + "name": "field_name", + "baseName": "field_name", + "type": "string", + "format": "" + }, + { + "name": "variable_identifier", + "baseName": "variable_identifier", + "type": "string", + "format": "" + } +]; +var ParameterizeMetadataRequest = _ParameterizeMetadataRequest; + +// models/ParametersListItem.ts +var _ParametersListItem = class _ParametersListItem { + static getAttributeTypeMap() { + return _ParametersListItem.attributeTypeMap; + } + constructor() { + } +}; +_ParametersListItem.discriminator = void 0; +_ParametersListItem.attributeTypeMap = [ + { + "name": "key", + "baseName": "key", + "type": "string", + "format": "" + }, + { + "name": "value", + "baseName": "value", + "type": "string", + "format": "" + } +]; +var ParametersListItem = _ParametersListItem; + +// models/ParametersListItemInput.ts +var _ParametersListItemInput = class _ParametersListItemInput { + static getAttributeTypeMap() { + return _ParametersListItemInput.attributeTypeMap; + } + constructor() { + } +}; +_ParametersListItemInput.discriminator = void 0; +_ParametersListItemInput.attributeTypeMap = [ + { + "name": "key", + "baseName": "key", + "type": "string", + "format": "" + }, + { + "name": "value", + "baseName": "value", + "type": "string", + "format": "" + } +]; +var ParametersListItemInput = _ParametersListItemInput; + +// models/PdfOptions.ts +var _PdfOptions = class _PdfOptions { + static getAttributeTypeMap() { + return _PdfOptions.attributeTypeMap; + } + constructor() { + } +}; +_PdfOptions.discriminator = void 0; +_PdfOptions.attributeTypeMap = [ + { + "name": "complete_liveboard", + "baseName": "complete_liveboard", + "type": "boolean", + "format": "" + }, + { + "name": "include_cover_page", + "baseName": "include_cover_page", + "type": "boolean", + "format": "" + }, + { + "name": "include_custom_logo", + "baseName": "include_custom_logo", + "type": "boolean", + "format": "" + }, + { + "name": "include_filter_page", + "baseName": "include_filter_page", + "type": "boolean", + "format": "" + }, + { + "name": "include_page_number", + "baseName": "include_page_number", + "type": "boolean", + "format": "" + }, + { + "name": "page_footer_text", + "baseName": "page_footer_text", + "type": "string", + "format": "" + }, + { + "name": "page_orientation", + "baseName": "page_orientation", + "type": "string", + "format": "" + }, + { + "name": "page_size", + "baseName": "page_size", + "type": "PdfOptionsPageSizeEnum", + "format": "" + }, + { + "name": "truncate_table", + "baseName": "truncate_table", + "type": "boolean", + "format": "" + } +]; +var PdfOptions = _PdfOptions; + +// models/PdfOptionsInput.ts +var _PdfOptionsInput = class _PdfOptionsInput { + static getAttributeTypeMap() { + return _PdfOptionsInput.attributeTypeMap; + } + constructor() { + } +}; +_PdfOptionsInput.discriminator = void 0; +_PdfOptionsInput.attributeTypeMap = [ + { + "name": "page_size", + "baseName": "page_size", + "type": "PdfOptionsInputPageSizeEnum", + "format": "" + }, + { + "name": "zoom_level", + "baseName": "zoom_level", + "type": "number", + "format": "int32" + }, + { + "name": "include_cover_page", + "baseName": "include_cover_page", + "type": "boolean", + "format": "" + }, + { + "name": "include_custom_logo", + "baseName": "include_custom_logo", + "type": "boolean", + "format": "" + }, + { + "name": "include_filter_page", + "baseName": "include_filter_page", + "type": "boolean", + "format": "" + }, + { + "name": "include_page_number", + "baseName": "include_page_number", + "type": "boolean", + "format": "" + }, + { + "name": "page_orientation", + "baseName": "page_orientation", + "type": "PdfOptionsInputPageOrientationEnum", + "format": "" + }, + { + "name": "truncate_table", + "baseName": "truncate_table", + "type": "boolean", + "format": "" + }, + { + "name": "page_footer_text", + "baseName": "page_footer_text", + "type": "string", + "format": "" + } +]; +var PdfOptionsInput = _PdfOptionsInput; + +// models/PermissionInput.ts +var _PermissionInput = class _PermissionInput { + static getAttributeTypeMap() { + return _PermissionInput.attributeTypeMap; + } + constructor() { + } +}; +_PermissionInput.discriminator = void 0; +_PermissionInput.attributeTypeMap = [ + { + "name": "principal", + "baseName": "principal", + "type": "PrincipalsInput", + "format": "" + }, + { + "name": "share_mode", + "baseName": "share_mode", + "type": "PermissionInputShareModeEnum", + "format": "" + } +]; +var PermissionInput = _PermissionInput; + +// models/PermissionOfMetadataResponse.ts +var _PermissionOfMetadataResponse = class _PermissionOfMetadataResponse { + static getAttributeTypeMap() { + return _PermissionOfMetadataResponse.attributeTypeMap; + } + constructor() { + } +}; +_PermissionOfMetadataResponse.discriminator = void 0; +_PermissionOfMetadataResponse.attributeTypeMap = [ + { + "name": "metadata_permission_details", + "baseName": "metadata_permission_details", + "type": "any", + "format": "" + } +]; +var PermissionOfMetadataResponse = _PermissionOfMetadataResponse; + +// models/PermissionOfPrincipalsResponse.ts +var _PermissionOfPrincipalsResponse = class _PermissionOfPrincipalsResponse { + static getAttributeTypeMap() { + return _PermissionOfPrincipalsResponse.attributeTypeMap; + } + constructor() { + } +}; +_PermissionOfPrincipalsResponse.discriminator = void 0; +_PermissionOfPrincipalsResponse.attributeTypeMap = [ + { + "name": "principal_permission_details", + "baseName": "principal_permission_details", + "type": "any", + "format": "" + } +]; +var PermissionOfPrincipalsResponse = _PermissionOfPrincipalsResponse; + +// models/PermissionsMetadataTypeInput.ts +var _PermissionsMetadataTypeInput = class _PermissionsMetadataTypeInput { + static getAttributeTypeMap() { + return _PermissionsMetadataTypeInput.attributeTypeMap; + } + constructor() { + } +}; +_PermissionsMetadataTypeInput.discriminator = void 0; +_PermissionsMetadataTypeInput.attributeTypeMap = [ + { + "name": "type", + "baseName": "type", + "type": "PermissionsMetadataTypeInputTypeEnum", + "format": "" + }, + { + "name": "identifier", + "baseName": "identifier", + "type": "string", + "format": "" + } +]; +var PermissionsMetadataTypeInput = _PermissionsMetadataTypeInput; + +// models/PngOptionsInput.ts +var _PngOptionsInput = class _PngOptionsInput { + static getAttributeTypeMap() { + return _PngOptionsInput.attributeTypeMap; + } + constructor() { + } +}; +_PngOptionsInput.discriminator = void 0; +_PngOptionsInput.attributeTypeMap = [ + { + "name": "include_cover_page", + "baseName": "include_cover_page", + "type": "boolean", + "format": "" + }, + { + "name": "include_filter_page", + "baseName": "include_filter_page", + "type": "boolean", + "format": "" + }, + { + "name": "personalised_view_id", + "baseName": "personalised_view_id", + "type": "string", + "format": "" + }, + { + "name": "image_resolution", + "baseName": "image_resolution", + "type": "number", + "format": "int32" + }, + { + "name": "image_scale", + "baseName": "image_scale", + "type": "number", + "format": "int32" + }, + { + "name": "include_header", + "baseName": "include_header", + "type": "boolean", + "format": "" + } +]; +var PngOptionsInput = _PngOptionsInput; + +// models/PolicyProcessOptions.ts +var _PolicyProcessOptions = class _PolicyProcessOptions { + static getAttributeTypeMap() { + return _PolicyProcessOptions.attributeTypeMap; + } + constructor() { + } +}; +_PolicyProcessOptions.discriminator = void 0; +_PolicyProcessOptions.attributeTypeMap = [ + { + "name": "impersonate_user", + "baseName": "impersonate_user", + "type": "string", + "format": "" + } +]; +var PolicyProcessOptions = _PolicyProcessOptions; + +// models/PolicyProcessOptionsInput.ts +var _PolicyProcessOptionsInput = class _PolicyProcessOptionsInput { + static getAttributeTypeMap() { + return _PolicyProcessOptionsInput.attributeTypeMap; + } + constructor() { + } +}; +_PolicyProcessOptionsInput.discriminator = void 0; +_PolicyProcessOptionsInput.attributeTypeMap = [ + { + "name": "impersonate_user", + "baseName": "impersonate_user", + "type": "string", + "format": "" + } +]; +var PolicyProcessOptionsInput = _PolicyProcessOptionsInput; + +// models/PrincipalsInput.ts +var _PrincipalsInput = class _PrincipalsInput { + static getAttributeTypeMap() { + return _PrincipalsInput.attributeTypeMap; + } + constructor() { + } +}; +_PrincipalsInput.discriminator = void 0; +_PrincipalsInput.attributeTypeMap = [ + { + "name": "identifier", + "baseName": "identifier", + "type": "string", + "format": "" + }, + { + "name": "type", + "baseName": "type", + "type": "PrincipalsInputTypeEnum", + "format": "" + } +]; +var PrincipalsInput = _PrincipalsInput; + +// models/PrincipalsListItem.ts +var _PrincipalsListItem = class _PrincipalsListItem { + static getAttributeTypeMap() { + return _PrincipalsListItem.attributeTypeMap; + } + constructor() { + } +}; +_PrincipalsListItem.discriminator = void 0; +_PrincipalsListItem.attributeTypeMap = [ + { + "name": "identifier", + "baseName": "identifier", + "type": "string", + "format": "" + }, + { + "name": "type", + "baseName": "type", + "type": "string", + "format": "" + } +]; +var PrincipalsListItem = _PrincipalsListItem; + +// models/PrincipalsListItemInput.ts +var _PrincipalsListItemInput = class _PrincipalsListItemInput { + static getAttributeTypeMap() { + return _PrincipalsListItemInput.attributeTypeMap; + } + constructor() { + } +}; +_PrincipalsListItemInput.discriminator = void 0; +_PrincipalsListItemInput.attributeTypeMap = [ + { + "name": "identifier", + "baseName": "identifier", + "type": "string", + "format": "" + }, + { + "name": "type", + "baseName": "type", + "type": "string", + "format": "" + } +]; +var PrincipalsListItemInput = _PrincipalsListItemInput; + +// models/PublishMetadataListItem.ts +var _PublishMetadataListItem = class _PublishMetadataListItem { + static getAttributeTypeMap() { + return _PublishMetadataListItem.attributeTypeMap; + } + constructor() { + } +}; +_PublishMetadataListItem.discriminator = void 0; +_PublishMetadataListItem.attributeTypeMap = [ + { + "name": "identifier", + "baseName": "identifier", + "type": "string", + "format": "" + }, + { + "name": "type", + "baseName": "type", + "type": "PublishMetadataListItemTypeEnum", + "format": "" + } +]; +var PublishMetadataListItem = _PublishMetadataListItem; + +// models/PublishMetadataRequest.ts +var _PublishMetadataRequest = class _PublishMetadataRequest { + static getAttributeTypeMap() { + return _PublishMetadataRequest.attributeTypeMap; + } + constructor() { + } +}; +_PublishMetadataRequest.discriminator = void 0; +_PublishMetadataRequest.attributeTypeMap = [ + { + "name": "metadata", + "baseName": "metadata", + "type": "Array", + "format": "" + }, + { + "name": "org_identifiers", + "baseName": "org_identifiers", + "type": "Array", + "format": "" + }, + { + "name": "skip_validation", + "baseName": "skip_validation", + "type": "boolean", + "format": "" + } +]; +var PublishMetadataRequest = _PublishMetadataRequest; + +// models/PutVariableValuesRequest.ts +var _PutVariableValuesRequest = class _PutVariableValuesRequest { + static getAttributeTypeMap() { + return _PutVariableValuesRequest.attributeTypeMap; + } + constructor() { + } +}; +_PutVariableValuesRequest.discriminator = void 0; +_PutVariableValuesRequest.attributeTypeMap = [ + { + "name": "operation", + "baseName": "operation", + "type": "PutVariableValuesRequestOperationEnum", + "format": "" + }, + { + "name": "variable_assignment", + "baseName": "variable_assignment", + "type": "Array", + "format": "" + } +]; +var PutVariableValuesRequest = _PutVariableValuesRequest; + +// models/QueryGetDecomposedQueryRequest.ts +var _QueryGetDecomposedQueryRequest = class _QueryGetDecomposedQueryRequest { + static getAttributeTypeMap() { + return _QueryGetDecomposedQueryRequest.attributeTypeMap; + } + constructor() { + } +}; +_QueryGetDecomposedQueryRequest.discriminator = void 0; +_QueryGetDecomposedQueryRequest.attributeTypeMap = [ + { + "name": "answerIds", + "baseName": "answerIds", + "type": "Array", + "format": "" + }, + { + "name": "content", + "baseName": "content", + "type": "Array", + "format": "" + }, + { + "name": "conversationId", + "baseName": "conversationId", + "type": "string", + "format": "" + }, + { + "name": "liveboardIds", + "baseName": "liveboardIds", + "type": "Array", + "format": "" + }, + { + "name": "maxDecomposedQueries", + "baseName": "maxDecomposedQueries", + "type": "number", + "format": "int32" + }, + { + "name": "nlsRequest", + "baseName": "nlsRequest", + "type": "QueryGetDecomposedQueryRequestNlsRequest", + "format": "" + }, + { + "name": "worksheetIds", + "baseName": "worksheetIds", + "type": "Array", + "format": "" + } +]; +var QueryGetDecomposedQueryRequest = _QueryGetDecomposedQueryRequest; + +// models/QueryGetDecomposedQueryRequestNlsRequest.ts +var _QueryGetDecomposedQueryRequestNlsRequest = class _QueryGetDecomposedQueryRequestNlsRequest { + static getAttributeTypeMap() { + return _QueryGetDecomposedQueryRequestNlsRequest.attributeTypeMap; + } + constructor() { + } +}; +_QueryGetDecomposedQueryRequestNlsRequest.discriminator = void 0; +_QueryGetDecomposedQueryRequestNlsRequest.attributeTypeMap = [ + { + "name": "agentVersion", + "baseName": "agentVersion", + "type": "number", + "format": "int32" + }, + { + "name": "bypassCache", + "baseName": "bypassCache", + "type": "boolean", + "format": "" + }, + { + "name": "instructions", + "baseName": "instructions", + "type": "Array", + "format": "" + }, + { + "name": "query", + "baseName": "query", + "type": "string", + "format": "" + } +]; +var QueryGetDecomposedQueryRequestNlsRequest = _QueryGetDecomposedQueryRequestNlsRequest; + +// models/RecipientDetails.ts +var _RecipientDetails = class _RecipientDetails { + static getAttributeTypeMap() { + return _RecipientDetails.attributeTypeMap; + } + constructor() { + } +}; +_RecipientDetails.discriminator = void 0; +_RecipientDetails.attributeTypeMap = [ + { + "name": "emails", + "baseName": "emails", + "type": "Array", + "format": "" + }, + { + "name": "principals", + "baseName": "principals", + "type": "Array", + "format": "" + } +]; +var RecipientDetails = _RecipientDetails; + +// models/RecipientDetailsInput.ts +var _RecipientDetailsInput = class _RecipientDetailsInput { + static getAttributeTypeMap() { + return _RecipientDetailsInput.attributeTypeMap; + } + constructor() { + } +}; +_RecipientDetailsInput.discriminator = void 0; +_RecipientDetailsInput.attributeTypeMap = [ + { + "name": "emails", + "baseName": "emails", + "type": "Array", + "format": "" + }, + { + "name": "principals", + "baseName": "principals", + "type": "Array", + "format": "" + } +]; +var RecipientDetailsInput = _RecipientDetailsInput; + +// models/RegionalSettingsInput.ts +var _RegionalSettingsInput = class _RegionalSettingsInput { + static getAttributeTypeMap() { + return _RegionalSettingsInput.attributeTypeMap; + } + constructor() { + } +}; +_RegionalSettingsInput.discriminator = void 0; +_RegionalSettingsInput.attributeTypeMap = [ + { + "name": "currency_format", + "baseName": "currency_format", + "type": "RegionalSettingsInputCurrencyFormatEnum", + "format": "" + }, + { + "name": "user_locale", + "baseName": "user_locale", + "type": "RegionalSettingsInputUserLocaleEnum", + "format": "" + }, + { + "name": "number_format_locale", + "baseName": "number_format_locale", + "type": "RegionalSettingsInputNumberFormatLocaleEnum", + "format": "" + }, + { + "name": "date_format_locale", + "baseName": "date_format_locale", + "type": "RegionalSettingsInputDateFormatLocaleEnum", + "format": "" + } +]; +var RegionalSettingsInput = _RegionalSettingsInput; + +// models/RepoConfigObject.ts +var _RepoConfigObject = class _RepoConfigObject { + static getAttributeTypeMap() { + return _RepoConfigObject.attributeTypeMap; + } + constructor() { + } +}; +_RepoConfigObject.discriminator = void 0; +_RepoConfigObject.attributeTypeMap = [ + { + "name": "repository_url", + "baseName": "repository_url", + "type": "string", + "format": "" + }, + { + "name": "username", + "baseName": "username", + "type": "string", + "format": "" + }, + { + "name": "commit_branch_name", + "baseName": "commit_branch_name", + "type": "string", + "format": "" + }, + { + "name": "branches", + "baseName": "branches", + "type": "Array", + "format": "" + }, + { + "name": "enable_guid_mapping", + "baseName": "enable_guid_mapping", + "type": "boolean", + "format": "" + }, + { + "name": "configuration_branch_name", + "baseName": "configuration_branch_name", + "type": "string", + "format": "" + }, + { + "name": "org", + "baseName": "org", + "type": "Org", + "format": "" + } +]; +var RepoConfigObject = _RepoConfigObject; + +// models/ResetUserPasswordRequest.ts +var _ResetUserPasswordRequest = class _ResetUserPasswordRequest { + static getAttributeTypeMap() { + return _ResetUserPasswordRequest.attributeTypeMap; + } + constructor() { + } +}; +_ResetUserPasswordRequest.discriminator = void 0; +_ResetUserPasswordRequest.attributeTypeMap = [ + { + "name": "new_password", + "baseName": "new_password", + "type": "string", + "format": "" + }, + { + "name": "user_identifier", + "baseName": "user_identifier", + "type": "string", + "format": "" + } +]; +var ResetUserPasswordRequest = _ResetUserPasswordRequest; + +// models/ResponseActivationURL.ts +var _ResponseActivationURL = class _ResponseActivationURL { + static getAttributeTypeMap() { + return _ResponseActivationURL.attributeTypeMap; + } + constructor() { + } +}; +_ResponseActivationURL.discriminator = void 0; +_ResponseActivationURL.attributeTypeMap = [ + { + "name": "activation_link", + "baseName": "activation_link", + "type": "string", + "format": "" + } +]; +var ResponseActivationURL = _ResponseActivationURL; + +// models/ResponseCopyObject.ts +var _ResponseCopyObject = class _ResponseCopyObject { + static getAttributeTypeMap() { + return _ResponseCopyObject.attributeTypeMap; + } + constructor() { + } +}; +_ResponseCopyObject.discriminator = void 0; +_ResponseCopyObject.attributeTypeMap = [ + { + "name": "metadata_id", + "baseName": "metadata_id", + "type": "string", + "format": "" + } +]; +var ResponseCopyObject = _ResponseCopyObject; + +// models/ResponseCustomAction.ts +var _ResponseCustomAction = class _ResponseCustomAction { + static getAttributeTypeMap() { + return _ResponseCustomAction.attributeTypeMap; + } + constructor() { + } +}; +_ResponseCustomAction.discriminator = void 0; +_ResponseCustomAction.attributeTypeMap = [ + { + "name": "action_details", + "baseName": "action_details", + "type": "ActionDetails", + "format": "" + }, + { + "name": "default_action_config", + "baseName": "default_action_config", + "type": "DefaultActionConfig", + "format": "" + }, + { + "name": "id", + "baseName": "id", + "type": "string", + "format": "" + }, + { + "name": "metadata_association", + "baseName": "metadata_association", + "type": "Array", + "format": "" + }, + { + "name": "name", + "baseName": "name", + "type": "string", + "format": "" + }, + { + "name": "user_groups", + "baseName": "user_groups", + "type": "Array", + "format": "" + } +]; +var ResponseCustomAction = _ResponseCustomAction; + +// models/ResponseFailedEntities.ts +var _ResponseFailedEntities = class _ResponseFailedEntities { + static getAttributeTypeMap() { + return _ResponseFailedEntities.attributeTypeMap; + } + constructor() { + } +}; +_ResponseFailedEntities.discriminator = void 0; +_ResponseFailedEntities.attributeTypeMap = [ + { + "name": "data", + "baseName": "data", + "type": "Array", + "format": "" + } +]; +var ResponseFailedEntities = _ResponseFailedEntities; + +// models/ResponseFailedEntity.ts +var _ResponseFailedEntity = class _ResponseFailedEntity { + static getAttributeTypeMap() { + return _ResponseFailedEntity.attributeTypeMap; + } + constructor() { + } +}; +_ResponseFailedEntity.discriminator = void 0; +_ResponseFailedEntity.attributeTypeMap = [ + { + "name": "id", + "baseName": "id", + "type": "string", + "format": "" + }, + { + "name": "name", + "baseName": "name", + "type": "string", + "format": "" + }, + { + "name": "error", + "baseName": "error", + "type": "string", + "format": "" + } +]; +var ResponseFailedEntity = _ResponseFailedEntity; + +// models/ResponseIncompleteEntities.ts +var _ResponseIncompleteEntities = class _ResponseIncompleteEntities { + static getAttributeTypeMap() { + return _ResponseIncompleteEntities.attributeTypeMap; + } + constructor() { + } +}; +_ResponseIncompleteEntities.discriminator = void 0; +_ResponseIncompleteEntities.attributeTypeMap = [ + { + "name": "data", + "baseName": "data", + "type": "Array", + "format": "" + } +]; +var ResponseIncompleteEntities = _ResponseIncompleteEntities; + +// models/ResponseIncompleteEntity.ts +var _ResponseIncompleteEntity = class _ResponseIncompleteEntity { + static getAttributeTypeMap() { + return _ResponseIncompleteEntity.attributeTypeMap; + } + constructor() { + } +}; +_ResponseIncompleteEntity.discriminator = void 0; +_ResponseIncompleteEntity.attributeTypeMap = [ + { + "name": "id", + "baseName": "id", + "type": "string", + "format": "" + }, + { + "name": "name", + "baseName": "name", + "type": "string", + "format": "" + }, + { + "name": "error", + "baseName": "error", + "type": "string", + "format": "" + } +]; +var ResponseIncompleteEntity = _ResponseIncompleteEntity; + +// models/ResponseMessage.ts +var _ResponseMessage = class _ResponseMessage { + static getAttributeTypeMap() { + return _ResponseMessage.attributeTypeMap; + } + constructor() { + } +}; +_ResponseMessage.discriminator = void 0; +_ResponseMessage.attributeTypeMap = [ + { + "name": "session_identifier", + "baseName": "session_identifier", + "type": "string", + "format": "" + }, + { + "name": "generation_number", + "baseName": "generation_number", + "type": "number", + "format": "int32" + }, + { + "name": "message_type", + "baseName": "message_type", + "type": "ResponseMessageMessageTypeEnum", + "format": "" + }, + { + "name": "visualization_type", + "baseName": "visualization_type", + "type": "ResponseMessageVisualizationTypeEnum", + "format": "" + }, + { + "name": "tokens", + "baseName": "tokens", + "type": "string", + "format": "" + }, + { + "name": "display_tokens", + "baseName": "display_tokens", + "type": "string", + "format": "" + } +]; +var ResponseMessage = _ResponseMessage; + +// models/ResponsePostUpgradeFailedEntities.ts +var _ResponsePostUpgradeFailedEntities = class _ResponsePostUpgradeFailedEntities { + static getAttributeTypeMap() { + return _ResponsePostUpgradeFailedEntities.attributeTypeMap; + } + constructor() { + } +}; +_ResponsePostUpgradeFailedEntities.discriminator = void 0; +_ResponsePostUpgradeFailedEntities.attributeTypeMap = [ + { + "name": "data", + "baseName": "data", + "type": "Array", + "format": "" + } +]; +var ResponsePostUpgradeFailedEntities = _ResponsePostUpgradeFailedEntities; + +// models/ResponsePostUpgradeFailedEntity.ts +var _ResponsePostUpgradeFailedEntity = class _ResponsePostUpgradeFailedEntity { + static getAttributeTypeMap() { + return _ResponsePostUpgradeFailedEntity.attributeTypeMap; + } + constructor() { + } +}; +_ResponsePostUpgradeFailedEntity.discriminator = void 0; +_ResponsePostUpgradeFailedEntity.attributeTypeMap = [ + { + "name": "id", + "baseName": "id", + "type": "string", + "format": "" + }, + { + "name": "name", + "baseName": "name", + "type": "string", + "format": "" + }, + { + "name": "error", + "baseName": "error", + "type": "string", + "format": "" + } +]; +var ResponsePostUpgradeFailedEntity = _ResponsePostUpgradeFailedEntity; + +// models/ResponseSchedule.ts +var _ResponseSchedule = class _ResponseSchedule { + static getAttributeTypeMap() { + return _ResponseSchedule.attributeTypeMap; + } + constructor() { + } +}; +_ResponseSchedule.discriminator = void 0; +_ResponseSchedule.attributeTypeMap = [ + { + "name": "author", + "baseName": "author", + "type": "Author", + "format": "" + }, + { + "name": "creation_time_in_millis", + "baseName": "creation_time_in_millis", + "type": "any", + "format": "" + }, + { + "name": "description", + "baseName": "description", + "type": "string", + "format": "" + }, + { + "name": "file_format", + "baseName": "file_format", + "type": "string", + "format": "" + }, + { + "name": "frequency", + "baseName": "frequency", + "type": "Frequency", + "format": "" + }, + { + "name": "id", + "baseName": "id", + "type": "string", + "format": "" + }, + { + "name": "liveboard_options", + "baseName": "liveboard_options", + "type": "LiveboardOptions", + "format": "" + }, + { + "name": "metadata", + "baseName": "metadata", + "type": "MetadataResponse", + "format": "" + }, + { + "name": "name", + "baseName": "name", + "type": "string", + "format": "" + }, + { + "name": "pdf_options", + "baseName": "pdf_options", + "type": "PdfOptions", + "format": "" + }, + { + "name": "recipient_details", + "baseName": "recipient_details", + "type": "RecipientDetails", + "format": "" + }, + { + "name": "status", + "baseName": "status", + "type": "string", + "format": "" + }, + { + "name": "time_zone", + "baseName": "time_zone", + "type": "string", + "format": "" + }, + { + "name": "history_runs", + "baseName": "history_runs", + "type": "Array", + "format": "" + }, + { + "name": "personalised_view_id", + "baseName": "personalised_view_id", + "type": "string", + "format": "" + } +]; +var ResponseSchedule = _ResponseSchedule; + +// models/ResponseScheduleRun.ts +var _ResponseScheduleRun = class _ResponseScheduleRun { + static getAttributeTypeMap() { + return _ResponseScheduleRun.attributeTypeMap; + } + constructor() { + } +}; +_ResponseScheduleRun.discriminator = void 0; +_ResponseScheduleRun.attributeTypeMap = [ + { + "name": "id", + "baseName": "id", + "type": "string", + "format": "" + }, + { + "name": "start_time_in_millis", + "baseName": "start_time_in_millis", + "type": "number", + "format": "int32" + }, + { + "name": "end_time_in_millis", + "baseName": "end_time_in_millis", + "type": "number", + "format": "int32" + }, + { + "name": "status", + "baseName": "status", + "type": "string", + "format": "" + }, + { + "name": "detail", + "baseName": "detail", + "type": "string", + "format": "" + } +]; +var ResponseScheduleRun = _ResponseScheduleRun; + +// models/ResponseSuccessfulEntities.ts +var _ResponseSuccessfulEntities = class _ResponseSuccessfulEntities { + static getAttributeTypeMap() { + return _ResponseSuccessfulEntities.attributeTypeMap; + } + constructor() { + } +}; +_ResponseSuccessfulEntities.discriminator = void 0; +_ResponseSuccessfulEntities.attributeTypeMap = [ + { + "name": "data", + "baseName": "data", + "type": "Array", + "format": "" + } +]; +var ResponseSuccessfulEntities = _ResponseSuccessfulEntities; + +// models/ResponseSuccessfulEntity.ts +var _ResponseSuccessfulEntity = class _ResponseSuccessfulEntity { + static getAttributeTypeMap() { + return _ResponseSuccessfulEntity.attributeTypeMap; + } + constructor() { + } +}; +_ResponseSuccessfulEntity.discriminator = void 0; +_ResponseSuccessfulEntity.attributeTypeMap = [ + { + "name": "id", + "baseName": "id", + "type": "string", + "format": "" + }, + { + "name": "name", + "baseName": "name", + "type": "string", + "format": "" + } +]; +var ResponseSuccessfulEntity = _ResponseSuccessfulEntity; + +// models/ResponseWorksheetToModelConversion.ts +var _ResponseWorksheetToModelConversion = class _ResponseWorksheetToModelConversion { + static getAttributeTypeMap() { + return _ResponseWorksheetToModelConversion.attributeTypeMap; + } + constructor() { + } +}; +_ResponseWorksheetToModelConversion.discriminator = void 0; +_ResponseWorksheetToModelConversion.attributeTypeMap = [ + { + "name": "name", + "baseName": "name", + "type": "string", + "format": "" + }, + { + "name": "success_count", + "baseName": "success_count", + "type": "number", + "format": "int32" + }, + { + "name": "failure_count", + "baseName": "failure_count", + "type": "number", + "format": "int32" + }, + { + "name": "incomplete_count", + "baseName": "incomplete_count", + "type": "number", + "format": "int32" + }, + { + "name": "post_upgrade_failed_count", + "baseName": "post_upgrade_failed_count", + "type": "number", + "format": "int32" + }, + { + "name": "total_time_in_millis", + "baseName": "total_time_in_millis", + "type": "number", + "format": "int32" + }, + { + "name": "successful_entities", + "baseName": "successful_entities", + "type": "ResponseSuccessfulEntities", + "format": "" + }, + { + "name": "failed_entities", + "baseName": "failed_entities", + "type": "ResponseFailedEntities", + "format": "" + }, + { + "name": "incomplete_entities", + "baseName": "incomplete_entities", + "type": "ResponseIncompleteEntities", + "format": "" + }, + { + "name": "post_upgrade_failed_entities", + "baseName": "post_upgrade_failed_entities", + "type": "ResponsePostUpgradeFailedEntities", + "format": "" + } +]; +var ResponseWorksheetToModelConversion = _ResponseWorksheetToModelConversion; + +// models/RevertCommitRequest.ts +var _RevertCommitRequest = class _RevertCommitRequest { + static getAttributeTypeMap() { + return _RevertCommitRequest.attributeTypeMap; + } + constructor() { + } +}; +_RevertCommitRequest.discriminator = void 0; +_RevertCommitRequest.attributeTypeMap = [ + { + "name": "metadata", + "baseName": "metadata", + "type": "Array", + "format": "" + }, + { + "name": "branch_name", + "baseName": "branch_name", + "type": "string", + "format": "" + }, + { + "name": "revert_policy", + "baseName": "revert_policy", + "type": "RevertCommitRequestRevertPolicyEnum", + "format": "" + } +]; +var RevertCommitRequest = _RevertCommitRequest; + +// models/RevertResponse.ts +var _RevertResponse = class _RevertResponse { + static getAttributeTypeMap() { + return _RevertResponse.attributeTypeMap; + } + constructor() { + } +}; +_RevertResponse.discriminator = void 0; +_RevertResponse.attributeTypeMap = [ + { + "name": "committer", + "baseName": "committer", + "type": "CommiterType", + "format": "" + }, + { + "name": "author", + "baseName": "author", + "type": "AuthorType", + "format": "" + }, + { + "name": "comment", + "baseName": "comment", + "type": "string", + "format": "" + }, + { + "name": "commit_time", + "baseName": "commit_time", + "type": "string", + "format": "" + }, + { + "name": "commit_id", + "baseName": "commit_id", + "type": "string", + "format": "" + }, + { + "name": "branch", + "baseName": "branch", + "type": "string", + "format": "" + }, + { + "name": "committed_files", + "baseName": "committed_files", + "type": "Array", + "format": "" + }, + { + "name": "reverted_metadata", + "baseName": "reverted_metadata", + "type": "Array", + "format": "" + } +]; +var RevertResponse = _RevertResponse; + +// models/RevertedMetadata.ts +var _RevertedMetadata = class _RevertedMetadata { + static getAttributeTypeMap() { + return _RevertedMetadata.attributeTypeMap; + } + constructor() { + } +}; +_RevertedMetadata.discriminator = void 0; +_RevertedMetadata.attributeTypeMap = [ + { + "name": "file_name", + "baseName": "file_name", + "type": "string", + "format": "" + }, + { + "name": "metadata_name", + "baseName": "metadata_name", + "type": "string", + "format": "" + }, + { + "name": "metadata_type", + "baseName": "metadata_type", + "type": "string", + "format": "" + }, + { + "name": "status_code", + "baseName": "status_code", + "type": "string", + "format": "" + }, + { + "name": "status_message", + "baseName": "status_message", + "type": "string", + "format": "" + } +]; +var RevertedMetadata = _RevertedMetadata; + +// models/RevokeRefreshTokensRequest.ts +var _RevokeRefreshTokensRequest = class _RevokeRefreshTokensRequest { + static getAttributeTypeMap() { + return _RevokeRefreshTokensRequest.attributeTypeMap; + } + constructor() { + } +}; +_RevokeRefreshTokensRequest.discriminator = void 0; +_RevokeRefreshTokensRequest.attributeTypeMap = [ + { + "name": "configuration_identifiers", + "baseName": "configuration_identifiers", + "type": "Array", + "format": "" + }, + { + "name": "user_identifiers", + "baseName": "user_identifiers", + "type": "Array", + "format": "" + }, + { + "name": "org_identifiers", + "baseName": "org_identifiers", + "type": "Array", + "format": "" + } +]; +var RevokeRefreshTokensRequest = _RevokeRefreshTokensRequest; + +// models/RevokeRefreshTokensResponse.ts +var _RevokeRefreshTokensResponse = class _RevokeRefreshTokensResponse { + static getAttributeTypeMap() { + return _RevokeRefreshTokensResponse.attributeTypeMap; + } + constructor() { + } +}; +_RevokeRefreshTokensResponse.discriminator = void 0; +_RevokeRefreshTokensResponse.attributeTypeMap = [ + { + "name": "data", + "baseName": "data", + "type": "string", + "format": "" + } +]; +var RevokeRefreshTokensResponse = _RevokeRefreshTokensResponse; + +// models/RevokeTokenRequest.ts +var _RevokeTokenRequest = class _RevokeTokenRequest { + static getAttributeTypeMap() { + return _RevokeTokenRequest.attributeTypeMap; + } + constructor() { + } +}; +_RevokeTokenRequest.discriminator = void 0; +_RevokeTokenRequest.attributeTypeMap = [ + { + "name": "user_identifier", + "baseName": "user_identifier", + "type": "string", + "format": "" + }, + { + "name": "token", + "baseName": "token", + "type": "string", + "format": "" + } +]; +var RevokeTokenRequest = _RevokeTokenRequest; + +// models/RiseGQLArgWrapper.ts +var _RiseGQLArgWrapper = class _RiseGQLArgWrapper { + static getAttributeTypeMap() { + return _RiseGQLArgWrapper.attributeTypeMap; + } + constructor() { + } +}; +_RiseGQLArgWrapper.discriminator = void 0; +_RiseGQLArgWrapper.attributeTypeMap = [ + { + "name": "name", + "baseName": "name", + "type": "string", + "format": "" + }, + { + "name": "type", + "baseName": "type", + "type": "string", + "format": "" + } +]; +var RiseGQLArgWrapper = _RiseGQLArgWrapper; + +// models/RiseSetter.ts +var _RiseSetter = class _RiseSetter { + static getAttributeTypeMap() { + return _RiseSetter.attributeTypeMap; + } + constructor() { + } +}; +_RiseSetter.discriminator = void 0; +_RiseSetter.attributeTypeMap = [ + { + "name": "field", + "baseName": "field", + "type": "string", + "format": "" + }, + { + "name": "path", + "baseName": "path", + "type": "string", + "format": "" + } +]; +var RiseSetter = _RiseSetter; + +// models/Role.ts +var _Role = class _Role { + static getAttributeTypeMap() { + return _Role.attributeTypeMap; + } + constructor() { + } +}; +_Role.discriminator = void 0; +_Role.attributeTypeMap = [ + { + "name": "id", + "baseName": "id", + "type": "string", + "format": "" + }, + { + "name": "name", + "baseName": "name", + "type": "string", + "format": "" + } +]; +var Role = _Role; + +// models/RoleResponse.ts +var _RoleResponse = class _RoleResponse { + static getAttributeTypeMap() { + return _RoleResponse.attributeTypeMap; + } + constructor() { + } +}; +_RoleResponse.discriminator = void 0; +_RoleResponse.attributeTypeMap = [ + { + "name": "id", + "baseName": "id", + "type": "string", + "format": "" + }, + { + "name": "name", + "baseName": "name", + "type": "string", + "format": "" + }, + { + "name": "description", + "baseName": "description", + "type": "string", + "format": "" + }, + { + "name": "groups_assigned_count", + "baseName": "groups_assigned_count", + "type": "number", + "format": "int32" + }, + { + "name": "orgs", + "baseName": "orgs", + "type": "Array", + "format": "" + }, + { + "name": "groups", + "baseName": "groups", + "type": "Array", + "format": "" + }, + { + "name": "privileges", + "baseName": "privileges", + "type": "Array", + "format": "" + }, + { + "name": "permission", + "baseName": "permission", + "type": "RoleResponsePermissionEnum", + "format": "" + }, + { + "name": "author_id", + "baseName": "author_id", + "type": "string", + "format": "" + }, + { + "name": "modifier_id", + "baseName": "modifier_id", + "type": "string", + "format": "" + }, + { + "name": "creation_time_in_millis", + "baseName": "creation_time_in_millis", + "type": "any", + "format": "" + }, + { + "name": "modification_time_in_millis", + "baseName": "modification_time_in_millis", + "type": "any", + "format": "" + }, + { + "name": "deleted", + "baseName": "deleted", + "type": "boolean", + "format": "" + }, + { + "name": "deprecated", + "baseName": "deprecated", + "type": "boolean", + "format": "" + }, + { + "name": "external", + "baseName": "external", + "type": "boolean", + "format": "" + }, + { + "name": "hidden", + "baseName": "hidden", + "type": "boolean", + "format": "" + }, + { + "name": "shared_via_connection", + "baseName": "shared_via_connection", + "type": "boolean", + "format": "" + } +]; +var RoleResponse = _RoleResponse; + +// models/RuntimeFilter.ts +var _RuntimeFilter = class _RuntimeFilter { + static getAttributeTypeMap() { + return _RuntimeFilter.attributeTypeMap; + } + constructor() { + } +}; +_RuntimeFilter.discriminator = void 0; +_RuntimeFilter.attributeTypeMap = [ + { + "name": "runtime_filter", + "baseName": "runtime_filter", + "type": "any", + "format": "" + } +]; +var RuntimeFilter = _RuntimeFilter; + +// models/RuntimeFilters.ts +var _RuntimeFilters = class _RuntimeFilters { + static getAttributeTypeMap() { + return _RuntimeFilters.attributeTypeMap; + } + constructor() { + } +}; +_RuntimeFilters.discriminator = void 0; +_RuntimeFilters.attributeTypeMap = [ + { + "name": "column_name", + "baseName": "column_name", + "type": "string", + "format": "" + }, + { + "name": "values", + "baseName": "values", + "type": "Array", + "format": "" + }, + { + "name": "operator", + "baseName": "operator", + "type": "RuntimeFiltersOperatorEnum", + "format": "" + }, + { + "name": "persist", + "baseName": "persist", + "type": "boolean", + "format": "" + }, + { + "name": "objects", + "baseName": "objects", + "type": "Array", + "format": "" + } +]; +var RuntimeFilters = _RuntimeFilters; + +// models/RuntimeParamOverride.ts +var _RuntimeParamOverride = class _RuntimeParamOverride { + static getAttributeTypeMap() { + return _RuntimeParamOverride.attributeTypeMap; + } + constructor() { + } +}; +_RuntimeParamOverride.discriminator = void 0; +_RuntimeParamOverride.attributeTypeMap = [ + { + "name": "runtime_param_override", + "baseName": "runtime_param_override", + "type": "any", + "format": "" + } +]; +var RuntimeParamOverride = _RuntimeParamOverride; + +// models/RuntimeParameters.ts +var _RuntimeParameters = class _RuntimeParameters { + static getAttributeTypeMap() { + return _RuntimeParameters.attributeTypeMap; + } + constructor() { + } +}; +_RuntimeParameters.discriminator = void 0; +_RuntimeParameters.attributeTypeMap = [ + { + "name": "name", + "baseName": "name", + "type": "string", + "format": "" + }, + { + "name": "values", + "baseName": "values", + "type": "Array", + "format": "" + }, + { + "name": "persist", + "baseName": "persist", + "type": "boolean", + "format": "" + }, + { + "name": "objects", + "baseName": "objects", + "type": "Array", + "format": "" + } +]; +var RuntimeParameters = _RuntimeParameters; + +// models/RuntimeSort.ts +var _RuntimeSort = class _RuntimeSort { + static getAttributeTypeMap() { + return _RuntimeSort.attributeTypeMap; + } + constructor() { + } +}; +_RuntimeSort.discriminator = void 0; +_RuntimeSort.attributeTypeMap = [ + { + "name": "runtime_sort", + "baseName": "runtime_sort", + "type": "any", + "format": "" + } +]; +var RuntimeSort = _RuntimeSort; + +// models/RuntimeSorts.ts +var _RuntimeSorts = class _RuntimeSorts { + static getAttributeTypeMap() { + return _RuntimeSorts.attributeTypeMap; + } + constructor() { + } +}; +_RuntimeSorts.discriminator = void 0; +_RuntimeSorts.attributeTypeMap = [ + { + "name": "column_name", + "baseName": "column_name", + "type": "string", + "format": "" + }, + { + "name": "order", + "baseName": "order", + "type": "RuntimeSortsOrderEnum", + "format": "" + }, + { + "name": "persist", + "baseName": "persist", + "type": "boolean", + "format": "" + }, + { + "name": "objects", + "baseName": "objects", + "type": "Array", + "format": "" + } +]; +var RuntimeSorts = _RuntimeSorts; + +// models/ScheduleHistoryRunsOptionsInput.ts +var _ScheduleHistoryRunsOptionsInput = class _ScheduleHistoryRunsOptionsInput { + static getAttributeTypeMap() { + return _ScheduleHistoryRunsOptionsInput.attributeTypeMap; + } + constructor() { + } +}; +_ScheduleHistoryRunsOptionsInput.discriminator = void 0; +_ScheduleHistoryRunsOptionsInput.attributeTypeMap = [ + { + "name": "include_history_runs", + "baseName": "include_history_runs", + "type": "boolean", + "format": "" + }, + { + "name": "record_size", + "baseName": "record_size", + "type": "number", + "format": "int32" + }, + { + "name": "record_offset", + "baseName": "record_offset", + "type": "number", + "format": "int32" + } +]; +var ScheduleHistoryRunsOptionsInput = _ScheduleHistoryRunsOptionsInput; + +// models/SchedulesPdfOptionsInput.ts +var _SchedulesPdfOptionsInput = class _SchedulesPdfOptionsInput { + static getAttributeTypeMap() { + return _SchedulesPdfOptionsInput.attributeTypeMap; + } + constructor() { + } +}; +_SchedulesPdfOptionsInput.discriminator = void 0; +_SchedulesPdfOptionsInput.attributeTypeMap = [ + { + "name": "complete_liveboard", + "baseName": "complete_liveboard", + "type": "boolean", + "format": "" + }, + { + "name": "include_cover_page", + "baseName": "include_cover_page", + "type": "boolean", + "format": "" + }, + { + "name": "include_custom_logo", + "baseName": "include_custom_logo", + "type": "boolean", + "format": "" + }, + { + "name": "include_filter_page", + "baseName": "include_filter_page", + "type": "boolean", + "format": "" + }, + { + "name": "include_page_number", + "baseName": "include_page_number", + "type": "boolean", + "format": "" + }, + { + "name": "page_footer_text", + "baseName": "page_footer_text", + "type": "string", + "format": "" + }, + { + "name": "page_orientation", + "baseName": "page_orientation", + "type": "string", + "format": "" + }, + { + "name": "page_size", + "baseName": "page_size", + "type": "SchedulesPdfOptionsInputPageSizeEnum", + "format": "" + }, + { + "name": "truncate_table", + "baseName": "truncate_table", + "type": "boolean", + "format": "" + } +]; +var SchedulesPdfOptionsInput = _SchedulesPdfOptionsInput; + +// models/SchemaObject.ts +var _SchemaObject = class _SchemaObject { + static getAttributeTypeMap() { + return _SchemaObject.attributeTypeMap; + } + constructor() { + } +}; +_SchemaObject.discriminator = void 0; +_SchemaObject.attributeTypeMap = [ + { + "name": "name", + "baseName": "name", + "type": "string", + "format": "" + }, + { + "name": "tables", + "baseName": "tables", + "type": "Array
", + "format": "" + } +]; +var SchemaObject = _SchemaObject; + +// models/Scope.ts +var _Scope = class _Scope { + static getAttributeTypeMap() { + return _Scope.attributeTypeMap; + } + constructor() { + } +}; +_Scope.discriminator = void 0; +_Scope.attributeTypeMap = [ + { + "name": "access_type", + "baseName": "access_type", + "type": "string", + "format": "" + }, + { + "name": "org_id", + "baseName": "org_id", + "type": "number", + "format": "int32" + }, + { + "name": "metadata_id", + "baseName": "metadata_id", + "type": "string", + "format": "" + } +]; +var Scope = _Scope; + +// models/ScriptSrcUrls.ts +var _ScriptSrcUrls = class _ScriptSrcUrls { + static getAttributeTypeMap() { + return _ScriptSrcUrls.attributeTypeMap; + } + constructor() { + } +}; +_ScriptSrcUrls.discriminator = void 0; +_ScriptSrcUrls.attributeTypeMap = [ + { + "name": "enabled", + "baseName": "enabled", + "type": "boolean", + "format": "" + }, + { + "name": "urls", + "baseName": "urls", + "type": "Array", + "format": "" + } +]; +var ScriptSrcUrls = _ScriptSrcUrls; + +// models/ScriptSrcUrlsInput.ts +var _ScriptSrcUrlsInput = class _ScriptSrcUrlsInput { + static getAttributeTypeMap() { + return _ScriptSrcUrlsInput.attributeTypeMap; + } + constructor() { + } +}; +_ScriptSrcUrlsInput.discriminator = void 0; +_ScriptSrcUrlsInput.attributeTypeMap = [ + { + "name": "enabled", + "baseName": "enabled", + "type": "boolean", + "format": "" + }, + { + "name": "urls", + "baseName": "urls", + "type": "Array", + "format": "" + } +]; +var ScriptSrcUrlsInput = _ScriptSrcUrlsInput; + +// models/SearchAuthSettingsRequest.ts +var _SearchAuthSettingsRequest = class _SearchAuthSettingsRequest { + static getAttributeTypeMap() { + return _SearchAuthSettingsRequest.attributeTypeMap; + } + constructor() { + } +}; +_SearchAuthSettingsRequest.discriminator = void 0; +_SearchAuthSettingsRequest.attributeTypeMap = [ + { + "name": "auth_type", + "baseName": "auth_type", + "type": "SearchAuthSettingsRequestAuthTypeEnum", + "format": "" + }, + { + "name": "scope", + "baseName": "scope", + "type": "SearchAuthSettingsRequestScopeEnum", + "format": "" + } +]; +var SearchAuthSettingsRequest = _SearchAuthSettingsRequest; + +// models/SearchAuthSettingsResponse.ts +var _SearchAuthSettingsResponse = class _SearchAuthSettingsResponse { + static getAttributeTypeMap() { + return _SearchAuthSettingsResponse.attributeTypeMap; + } + constructor() { + } +}; +_SearchAuthSettingsResponse.discriminator = void 0; +_SearchAuthSettingsResponse.attributeTypeMap = [ + { + "name": "auth_type", + "baseName": "auth_type", + "type": "SearchAuthSettingsResponseAuthTypeEnum", + "format": "" + }, + { + "name": "cluster_preferences", + "baseName": "cluster_preferences", + "type": "AuthClusterPreferences", + "format": "" + }, + { + "name": "org_preferences", + "baseName": "org_preferences", + "type": "Array", + "format": "" + } +]; +var SearchAuthSettingsResponse = _SearchAuthSettingsResponse; + +// models/SearchCalendarsRequest.ts +var _SearchCalendarsRequest = class _SearchCalendarsRequest { + static getAttributeTypeMap() { + return _SearchCalendarsRequest.attributeTypeMap; + } + constructor() { + } +}; +_SearchCalendarsRequest.discriminator = void 0; +_SearchCalendarsRequest.attributeTypeMap = [ + { + "name": "connection_identifier", + "baseName": "connection_identifier", + "type": "string", + "format": "" + }, + { + "name": "name_pattern", + "baseName": "name_pattern", + "type": "string", + "format": "" + }, + { + "name": "record_offset", + "baseName": "record_offset", + "type": "number", + "format": "int32" + }, + { + "name": "record_size", + "baseName": "record_size", + "type": "number", + "format": "int32" + }, + { + "name": "sort_options", + "baseName": "sort_options", + "type": "SearchCalendarsRequestSortOptions", + "format": "" + } +]; +var SearchCalendarsRequest = _SearchCalendarsRequest; + +// models/SearchCalendarsRequestSortOptions.ts +var _SearchCalendarsRequestSortOptions = class _SearchCalendarsRequestSortOptions { + static getAttributeTypeMap() { + return _SearchCalendarsRequestSortOptions.attributeTypeMap; + } + constructor() { + } +}; +_SearchCalendarsRequestSortOptions.discriminator = void 0; +_SearchCalendarsRequestSortOptions.attributeTypeMap = [ + { + "name": "field_name", + "baseName": "field_name", + "type": "SearchCalendarsRequestSortOptionsFieldNameEnum", + "format": "" + }, + { + "name": "order", + "baseName": "order", + "type": "SearchCalendarsRequestSortOptionsOrderEnum", + "format": "" + } +]; +var SearchCalendarsRequestSortOptions = _SearchCalendarsRequestSortOptions; + +// models/SearchChannelHistoryRequest.ts +var _SearchChannelHistoryRequest = class _SearchChannelHistoryRequest { + static getAttributeTypeMap() { + return _SearchChannelHistoryRequest.attributeTypeMap; + } + constructor() { + } +}; +_SearchChannelHistoryRequest.discriminator = void 0; +_SearchChannelHistoryRequest.attributeTypeMap = [ + { + "name": "channel_type", + "baseName": "channel_type", + "type": "SearchChannelHistoryRequestChannelTypeEnum", + "format": "" + }, + { + "name": "job_ids", + "baseName": "job_ids", + "type": "Array", + "format": "" + }, + { + "name": "channel_identifiers", + "baseName": "channel_identifiers", + "type": "Array", + "format": "" + }, + { + "name": "channel_status", + "baseName": "channel_status", + "type": "SearchChannelHistoryRequestChannelStatusEnum", + "format": "" + }, + { + "name": "events", + "baseName": "events", + "type": "Array", + "format": "" + }, + { + "name": "start_epoch_time_in_millis", + "baseName": "start_epoch_time_in_millis", + "type": "number", + "format": "float" + } +]; +var SearchChannelHistoryRequest = _SearchChannelHistoryRequest; + +// models/SearchChannelHistoryResponse.ts +var _SearchChannelHistoryResponse = class _SearchChannelHistoryResponse { + static getAttributeTypeMap() { + return _SearchChannelHistoryResponse.attributeTypeMap; + } + constructor() { + } +}; +_SearchChannelHistoryResponse.discriminator = void 0; +_SearchChannelHistoryResponse.attributeTypeMap = [ + { + "name": "jobs", + "baseName": "jobs", + "type": "Array", + "format": "" + } +]; +var SearchChannelHistoryResponse = _SearchChannelHistoryResponse; + +// models/SearchCollectionsRequest.ts +var _SearchCollectionsRequest = class _SearchCollectionsRequest { + static getAttributeTypeMap() { + return _SearchCollectionsRequest.attributeTypeMap; + } + constructor() { + } +}; +_SearchCollectionsRequest.discriminator = void 0; +_SearchCollectionsRequest.attributeTypeMap = [ + { + "name": "name_pattern", + "baseName": "name_pattern", + "type": "string", + "format": "" + }, + { + "name": "record_offset", + "baseName": "record_offset", + "type": "number", + "format": "int32" + }, + { + "name": "record_size", + "baseName": "record_size", + "type": "number", + "format": "int32" + }, + { + "name": "collection_identifiers", + "baseName": "collection_identifiers", + "type": "Array", + "format": "" + }, + { + "name": "created_by_user_identifiers", + "baseName": "created_by_user_identifiers", + "type": "Array", + "format": "" + }, + { + "name": "include_metadata", + "baseName": "include_metadata", + "type": "boolean", + "format": "" + }, + { + "name": "sort_options", + "baseName": "sort_options", + "type": "SearchCollectionsRequestSortOptions", + "format": "" + } +]; +var SearchCollectionsRequest = _SearchCollectionsRequest; + +// models/SearchCollectionsRequestSortOptions.ts +var _SearchCollectionsRequestSortOptions = class _SearchCollectionsRequestSortOptions { + static getAttributeTypeMap() { + return _SearchCollectionsRequestSortOptions.attributeTypeMap; + } + constructor() { + } +}; +_SearchCollectionsRequestSortOptions.discriminator = void 0; +_SearchCollectionsRequestSortOptions.attributeTypeMap = [ + { + "name": "field_name", + "baseName": "field_name", + "type": "SearchCollectionsRequestSortOptionsFieldNameEnum", + "format": "" + }, + { + "name": "order", + "baseName": "order", + "type": "SearchCollectionsRequestSortOptionsOrderEnum", + "format": "" + } +]; +var SearchCollectionsRequestSortOptions = _SearchCollectionsRequestSortOptions; + +// models/SearchCommitsRequest.ts +var _SearchCommitsRequest = class _SearchCommitsRequest { + static getAttributeTypeMap() { + return _SearchCommitsRequest.attributeTypeMap; + } + constructor() { + } +}; +_SearchCommitsRequest.discriminator = void 0; +_SearchCommitsRequest.attributeTypeMap = [ + { + "name": "metadata_identifier", + "baseName": "metadata_identifier", + "type": "string", + "format": "" + }, + { + "name": "metadata_type", + "baseName": "metadata_type", + "type": "SearchCommitsRequestMetadataTypeEnum", + "format": "" + }, + { + "name": "branch_name", + "baseName": "branch_name", + "type": "string", + "format": "" + }, + { + "name": "record_offset", + "baseName": "record_offset", + "type": "number", + "format": "int32" + }, + { + "name": "record_size", + "baseName": "record_size", + "type": "number", + "format": "int32" + } +]; +var SearchCommitsRequest = _SearchCommitsRequest; + +// models/SearchCommunicationChannelPreferencesRequest.ts +var _SearchCommunicationChannelPreferencesRequest = class _SearchCommunicationChannelPreferencesRequest { + static getAttributeTypeMap() { + return _SearchCommunicationChannelPreferencesRequest.attributeTypeMap; + } + constructor() { + } +}; +_SearchCommunicationChannelPreferencesRequest.discriminator = void 0; +_SearchCommunicationChannelPreferencesRequest.attributeTypeMap = [ + { + "name": "cluster_preferences", + "baseName": "cluster_preferences", + "type": "Array", + "format": "" + }, + { + "name": "org_preferences", + "baseName": "org_preferences", + "type": "Array", + "format": "" + } +]; +var SearchCommunicationChannelPreferencesRequest = _SearchCommunicationChannelPreferencesRequest; + +// models/SearchConfigRequest.ts +var _SearchConfigRequest = class _SearchConfigRequest { + static getAttributeTypeMap() { + return _SearchConfigRequest.attributeTypeMap; + } + constructor() { + } +}; +_SearchConfigRequest.discriminator = void 0; +_SearchConfigRequest.attributeTypeMap = [ + { + "name": "org_identifiers", + "baseName": "org_identifiers", + "type": "Array", + "format": "" + } +]; +var SearchConfigRequest = _SearchConfigRequest; + +// models/SearchConnectionRequest.ts +var _SearchConnectionRequest = class _SearchConnectionRequest { + static getAttributeTypeMap() { + return _SearchConnectionRequest.attributeTypeMap; + } + constructor() { + } +}; +_SearchConnectionRequest.discriminator = void 0; +_SearchConnectionRequest.attributeTypeMap = [ + { + "name": "connections", + "baseName": "connections", + "type": "Array", + "format": "" + }, + { + "name": "data_warehouse_types", + "baseName": "data_warehouse_types", + "type": "Array", + "format": "" + }, + { + "name": "record_offset", + "baseName": "record_offset", + "type": "number", + "format": "int32" + }, + { + "name": "record_size", + "baseName": "record_size", + "type": "number", + "format": "int32" + }, + { + "name": "tag_identifiers", + "baseName": "tag_identifiers", + "type": "Array", + "format": "" + }, + { + "name": "data_warehouse_object_type", + "baseName": "data_warehouse_object_type", + "type": "SearchConnectionRequestDataWarehouseObjectTypeEnum", + "format": "" + }, + { + "name": "sort_options", + "baseName": "sort_options", + "type": "SearchConnectionRequestSortOptions", + "format": "" + }, + { + "name": "include_details", + "baseName": "include_details", + "type": "boolean", + "format": "" + }, + { + "name": "configuration", + "baseName": "configuration", + "type": "any", + "format": "" + }, + { + "name": "authentication_type", + "baseName": "authentication_type", + "type": "SearchConnectionRequestAuthenticationTypeEnum", + "format": "" + }, + { + "name": "show_resolved_parameters", + "baseName": "show_resolved_parameters", + "type": "boolean", + "format": "" + } +]; +var SearchConnectionRequest = _SearchConnectionRequest; + +// models/SearchConnectionRequestSortOptions.ts +var _SearchConnectionRequestSortOptions = class _SearchConnectionRequestSortOptions { + static getAttributeTypeMap() { + return _SearchConnectionRequestSortOptions.attributeTypeMap; + } + constructor() { + } +}; +_SearchConnectionRequestSortOptions.discriminator = void 0; +_SearchConnectionRequestSortOptions.attributeTypeMap = [ + { + "name": "field_name", + "baseName": "field_name", + "type": "SearchConnectionRequestSortOptionsFieldNameEnum", + "format": "" + }, + { + "name": "order", + "baseName": "order", + "type": "SearchConnectionRequestSortOptionsOrderEnum", + "format": "" + } +]; +var SearchConnectionRequestSortOptions = _SearchConnectionRequestSortOptions; + +// models/SearchConnectionResponse.ts +var _SearchConnectionResponse = class _SearchConnectionResponse { + static getAttributeTypeMap() { + return _SearchConnectionResponse.attributeTypeMap; + } + constructor() { + } +}; +_SearchConnectionResponse.discriminator = void 0; +_SearchConnectionResponse.attributeTypeMap = [ + { + "name": "id", + "baseName": "id", + "type": "string", + "format": "" + }, + { + "name": "name", + "baseName": "name", + "type": "string", + "format": "" + }, + { + "name": "description", + "baseName": "description", + "type": "string", + "format": "" + }, + { + "name": "data_warehouse_type", + "baseName": "data_warehouse_type", + "type": "SearchConnectionResponseDataWarehouseTypeEnum", + "format": "" + }, + { + "name": "data_warehouse_objects", + "baseName": "data_warehouse_objects", + "type": "DataWarehouseObjects", + "format": "" + }, + { + "name": "details", + "baseName": "details", + "type": "any", + "format": "" + } +]; +var SearchConnectionResponse = _SearchConnectionResponse; + +// models/SearchCustomActionsRequest.ts +var _SearchCustomActionsRequest = class _SearchCustomActionsRequest { + static getAttributeTypeMap() { + return _SearchCustomActionsRequest.attributeTypeMap; + } + constructor() { + } +}; +_SearchCustomActionsRequest.discriminator = void 0; +_SearchCustomActionsRequest.attributeTypeMap = [ + { + "name": "custom_action_identifier", + "baseName": "custom_action_identifier", + "type": "string", + "format": "" + }, + { + "name": "name_pattern", + "baseName": "name_pattern", + "type": "string", + "format": "" + }, + { + "name": "default_action_config", + "baseName": "default_action_config", + "type": "SearchCustomActionsRequestDefaultActionConfig", + "format": "" + }, + { + "name": "include_group_associations", + "baseName": "include_group_associations", + "type": "boolean", + "format": "" + }, + { + "name": "include_metadata_associations", + "baseName": "include_metadata_associations", + "type": "boolean", + "format": "" + }, + { + "name": "metadata", + "baseName": "metadata", + "type": "Array", + "format": "" + }, + { + "name": "type", + "baseName": "type", + "type": "SearchCustomActionsRequestTypeEnum", + "format": "" + } +]; +var SearchCustomActionsRequest = _SearchCustomActionsRequest; + +// models/SearchCustomActionsRequestDefaultActionConfig.ts +var _SearchCustomActionsRequestDefaultActionConfig = class _SearchCustomActionsRequestDefaultActionConfig { + static getAttributeTypeMap() { + return _SearchCustomActionsRequestDefaultActionConfig.attributeTypeMap; + } + constructor() { + } +}; +_SearchCustomActionsRequestDefaultActionConfig.discriminator = void 0; +_SearchCustomActionsRequestDefaultActionConfig.attributeTypeMap = [ + { + "name": "visibility", + "baseName": "visibility", + "type": "boolean", + "format": "" + } +]; +var SearchCustomActionsRequestDefaultActionConfig = _SearchCustomActionsRequestDefaultActionConfig; + +// models/SearchDataRequest.ts +var _SearchDataRequest = class _SearchDataRequest { + static getAttributeTypeMap() { + return _SearchDataRequest.attributeTypeMap; + } + constructor() { + } +}; +_SearchDataRequest.discriminator = void 0; +_SearchDataRequest.attributeTypeMap = [ + { + "name": "query_string", + "baseName": "query_string", + "type": "string", + "format": "" + }, + { + "name": "logical_table_identifier", + "baseName": "logical_table_identifier", + "type": "string", + "format": "" + }, + { + "name": "data_format", + "baseName": "data_format", + "type": "SearchDataRequestDataFormatEnum", + "format": "" + }, + { + "name": "record_offset", + "baseName": "record_offset", + "type": "number", + "format": "int32" + }, + { + "name": "record_size", + "baseName": "record_size", + "type": "number", + "format": "int32" + }, + { + "name": "runtime_filter", + "baseName": "runtime_filter", + "type": "any", + "format": "" + }, + { + "name": "runtime_sort", + "baseName": "runtime_sort", + "type": "any", + "format": "" + }, + { + "name": "runtime_param_override", + "baseName": "runtime_param_override", + "type": "any", + "format": "" + } +]; +var SearchDataRequest = _SearchDataRequest; + +// models/SearchDataResponse.ts +var _SearchDataResponse = class _SearchDataResponse { + static getAttributeTypeMap() { + return _SearchDataResponse.attributeTypeMap; + } + constructor() { + } +}; +_SearchDataResponse.discriminator = void 0; +_SearchDataResponse.attributeTypeMap = [ + { + "name": "contents", + "baseName": "contents", + "type": "Array", + "format": "" + } +]; +var SearchDataResponse = _SearchDataResponse; + +// models/SearchEmailCustomizationRequest.ts +var _SearchEmailCustomizationRequest = class _SearchEmailCustomizationRequest { + static getAttributeTypeMap() { + return _SearchEmailCustomizationRequest.attributeTypeMap; + } + constructor() { + } +}; +_SearchEmailCustomizationRequest.discriminator = void 0; +_SearchEmailCustomizationRequest.attributeTypeMap = [ + { + "name": "org_identifiers", + "baseName": "org_identifiers", + "type": "Array", + "format": "" + } +]; +var SearchEmailCustomizationRequest = _SearchEmailCustomizationRequest; + +// models/SearchMetadataRequest.ts +var _SearchMetadataRequest = class _SearchMetadataRequest { + static getAttributeTypeMap() { + return _SearchMetadataRequest.attributeTypeMap; + } + constructor() { + } +}; +_SearchMetadataRequest.discriminator = void 0; +_SearchMetadataRequest.attributeTypeMap = [ + { + "name": "metadata", + "baseName": "metadata", + "type": "Array", + "format": "" + }, + { + "name": "permissions", + "baseName": "permissions", + "type": "Array", + "format": "" + }, + { + "name": "created_by_user_identifiers", + "baseName": "created_by_user_identifiers", + "type": "Array", + "format": "" + }, + { + "name": "dependent_object_version", + "baseName": "dependent_object_version", + "type": "SearchMetadataRequestDependentObjectVersionEnum", + "format": "" + }, + { + "name": "exclude_objects", + "baseName": "exclude_objects", + "type": "Array", + "format": "" + }, + { + "name": "favorite_object_options", + "baseName": "favorite_object_options", + "type": "SearchMetadataRequestFavoriteObjectOptions", + "format": "" + }, + { + "name": "include_auto_created_objects", + "baseName": "include_auto_created_objects", + "type": "boolean", + "format": "" + }, + { + "name": "include_dependent_objects", + "baseName": "include_dependent_objects", + "type": "boolean", + "format": "" + }, + { + "name": "dependent_objects_record_size", + "baseName": "dependent_objects_record_size", + "type": "number", + "format": "int32" + }, + { + "name": "include_details", + "baseName": "include_details", + "type": "boolean", + "format": "" + }, + { + "name": "include_personalised_views", + "baseName": "include_personalised_views", + "type": "boolean", + "format": "" + }, + { + "name": "include_headers", + "baseName": "include_headers", + "type": "boolean", + "format": "" + }, + { + "name": "include_hidden_objects", + "baseName": "include_hidden_objects", + "type": "boolean", + "format": "" + }, + { + "name": "include_incomplete_objects", + "baseName": "include_incomplete_objects", + "type": "boolean", + "format": "" + }, + { + "name": "include_visualization_headers", + "baseName": "include_visualization_headers", + "type": "boolean", + "format": "" + }, + { + "name": "include_worksheet_search_assist_data", + "baseName": "include_worksheet_search_assist_data", + "type": "boolean", + "format": "" + }, + { + "name": "modified_by_user_identifiers", + "baseName": "modified_by_user_identifiers", + "type": "Array", + "format": "" + }, + { + "name": "record_offset", + "baseName": "record_offset", + "type": "number", + "format": "int32" + }, + { + "name": "record_size", + "baseName": "record_size", + "type": "number", + "format": "int32" + }, + { + "name": "sort_options", + "baseName": "sort_options", + "type": "SearchMetadataRequestSortOptions", + "format": "" + }, + { + "name": "tag_identifiers", + "baseName": "tag_identifiers", + "type": "Array", + "format": "" + }, + { + "name": "include_stats", + "baseName": "include_stats", + "type": "boolean", + "format": "" + }, + { + "name": "include_discoverable_objects", + "baseName": "include_discoverable_objects", + "type": "boolean", + "format": "" + }, + { + "name": "show_resolved_parameters", + "baseName": "show_resolved_parameters", + "type": "boolean", + "format": "" + }, + { + "name": "liveboard_response_version", + "baseName": "liveboard_response_version", + "type": "SearchMetadataRequestLiveboardResponseVersionEnum", + "format": "" + }, + { + "name": "include_only_published_objects", + "baseName": "include_only_published_objects", + "type": "boolean", + "format": "" + } +]; +var SearchMetadataRequest = _SearchMetadataRequest; + +// models/SearchMetadataRequestFavoriteObjectOptions.ts +var _SearchMetadataRequestFavoriteObjectOptions = class _SearchMetadataRequestFavoriteObjectOptions { + static getAttributeTypeMap() { + return _SearchMetadataRequestFavoriteObjectOptions.attributeTypeMap; + } + constructor() { + } +}; +_SearchMetadataRequestFavoriteObjectOptions.discriminator = void 0; +_SearchMetadataRequestFavoriteObjectOptions.attributeTypeMap = [ + { + "name": "include", + "baseName": "include", + "type": "boolean", + "format": "" + }, + { + "name": "user_identifiers", + "baseName": "user_identifiers", + "type": "Array", + "format": "" + } +]; +var SearchMetadataRequestFavoriteObjectOptions = _SearchMetadataRequestFavoriteObjectOptions; + +// models/SearchMetadataRequestSortOptions.ts +var _SearchMetadataRequestSortOptions = class _SearchMetadataRequestSortOptions { + static getAttributeTypeMap() { + return _SearchMetadataRequestSortOptions.attributeTypeMap; + } + constructor() { + } +}; +_SearchMetadataRequestSortOptions.discriminator = void 0; +_SearchMetadataRequestSortOptions.attributeTypeMap = [ + { + "name": "field_name", + "baseName": "field_name", + "type": "SearchMetadataRequestSortOptionsFieldNameEnum", + "format": "" + }, + { + "name": "order", + "baseName": "order", + "type": "SearchMetadataRequestSortOptionsOrderEnum", + "format": "" + } +]; +var SearchMetadataRequestSortOptions = _SearchMetadataRequestSortOptions; + +// models/SearchOrgsRequest.ts +var _SearchOrgsRequest = class _SearchOrgsRequest { + static getAttributeTypeMap() { + return _SearchOrgsRequest.attributeTypeMap; + } + constructor() { + } +}; +_SearchOrgsRequest.discriminator = void 0; +_SearchOrgsRequest.attributeTypeMap = [ + { + "name": "org_identifier", + "baseName": "org_identifier", + "type": "string", + "format": "" + }, + { + "name": "description", + "baseName": "description", + "type": "string", + "format": "" + }, + { + "name": "visibility", + "baseName": "visibility", + "type": "SearchOrgsRequestVisibilityEnum", + "format": "" + }, + { + "name": "status", + "baseName": "status", + "type": "SearchOrgsRequestStatusEnum", + "format": "" + }, + { + "name": "user_identifiers", + "baseName": "user_identifiers", + "type": "Array", + "format": "" + } +]; +var SearchOrgsRequest = _SearchOrgsRequest; + +// models/SearchRoleResponse.ts +var _SearchRoleResponse = class _SearchRoleResponse { + static getAttributeTypeMap() { + return _SearchRoleResponse.attributeTypeMap; + } + constructor() { + } +}; +_SearchRoleResponse.discriminator = void 0; +_SearchRoleResponse.attributeTypeMap = [ + { + "name": "id", + "baseName": "id", + "type": "string", + "format": "" + }, + { + "name": "name", + "baseName": "name", + "type": "string", + "format": "" + }, + { + "name": "description", + "baseName": "description", + "type": "string", + "format": "" + }, + { + "name": "groups_assigned_count", + "baseName": "groups_assigned_count", + "type": "number", + "format": "int32" + }, + { + "name": "orgs", + "baseName": "orgs", + "type": "Array", + "format": "" + }, + { + "name": "groups", + "baseName": "groups", + "type": "Array", + "format": "" + }, + { + "name": "privileges", + "baseName": "privileges", + "type": "Array", + "format": "" + }, + { + "name": "permission", + "baseName": "permission", + "type": "SearchRoleResponsePermissionEnum", + "format": "" + }, + { + "name": "author_id", + "baseName": "author_id", + "type": "string", + "format": "" + }, + { + "name": "modifier_id", + "baseName": "modifier_id", + "type": "string", + "format": "" + }, + { + "name": "creation_time_in_millis", + "baseName": "creation_time_in_millis", + "type": "any", + "format": "" + }, + { + "name": "modification_time_in_millis", + "baseName": "modification_time_in_millis", + "type": "any", + "format": "" + }, + { + "name": "deleted", + "baseName": "deleted", + "type": "boolean", + "format": "" + }, + { + "name": "deprecated", + "baseName": "deprecated", + "type": "boolean", + "format": "" + }, + { + "name": "external", + "baseName": "external", + "type": "boolean", + "format": "" + }, + { + "name": "hidden", + "baseName": "hidden", + "type": "boolean", + "format": "" + }, + { + "name": "shared_via_connection", + "baseName": "shared_via_connection", + "type": "boolean", + "format": "" + } +]; +var SearchRoleResponse = _SearchRoleResponse; + +// models/SearchRolesRequest.ts +var _SearchRolesRequest = class _SearchRolesRequest { + static getAttributeTypeMap() { + return _SearchRolesRequest.attributeTypeMap; + } + constructor() { + } +}; +_SearchRolesRequest.discriminator = void 0; +_SearchRolesRequest.attributeTypeMap = [ + { + "name": "role_identifiers", + "baseName": "role_identifiers", + "type": "Array", + "format": "" + }, + { + "name": "org_identifiers", + "baseName": "org_identifiers", + "type": "Array", + "format": "" + }, + { + "name": "group_identifiers", + "baseName": "group_identifiers", + "type": "Array", + "format": "" + }, + { + "name": "privileges", + "baseName": "privileges", + "type": "Array", + "format": "" + }, + { + "name": "deprecated", + "baseName": "deprecated", + "type": "boolean", + "format": "" + }, + { + "name": "external", + "baseName": "external", + "type": "boolean", + "format": "" + }, + { + "name": "shared_via_connection", + "baseName": "shared_via_connection", + "type": "boolean", + "format": "" + }, + { + "name": "permissions", + "baseName": "permissions", + "type": "Array", + "format": "" + } +]; +var SearchRolesRequest = _SearchRolesRequest; + +// models/SearchSchedulesRequest.ts +var _SearchSchedulesRequest = class _SearchSchedulesRequest { + static getAttributeTypeMap() { + return _SearchSchedulesRequest.attributeTypeMap; + } + constructor() { + } +}; +_SearchSchedulesRequest.discriminator = void 0; +_SearchSchedulesRequest.attributeTypeMap = [ + { + "name": "metadata", + "baseName": "metadata", + "type": "Array", + "format": "" + }, + { + "name": "record_offset", + "baseName": "record_offset", + "type": "number", + "format": "int32" + }, + { + "name": "record_size", + "baseName": "record_size", + "type": "number", + "format": "int32" + }, + { + "name": "sort_options", + "baseName": "sort_options", + "type": "SearchSchedulesRequestSortOptions", + "format": "" + }, + { + "name": "history_runs_options", + "baseName": "history_runs_options", + "type": "SearchSchedulesRequestHistoryRunsOptions", + "format": "" + }, + { + "name": "schedule_identifiers", + "baseName": "schedule_identifiers", + "type": "Array", + "format": "" + } +]; +var SearchSchedulesRequest = _SearchSchedulesRequest; + +// models/SearchSchedulesRequestHistoryRunsOptions.ts +var _SearchSchedulesRequestHistoryRunsOptions = class _SearchSchedulesRequestHistoryRunsOptions { + static getAttributeTypeMap() { + return _SearchSchedulesRequestHistoryRunsOptions.attributeTypeMap; + } + constructor() { + } +}; +_SearchSchedulesRequestHistoryRunsOptions.discriminator = void 0; +_SearchSchedulesRequestHistoryRunsOptions.attributeTypeMap = [ + { + "name": "include_history_runs", + "baseName": "include_history_runs", + "type": "boolean", + "format": "" + }, + { + "name": "record_size", + "baseName": "record_size", + "type": "number", + "format": "int32" + }, + { + "name": "record_offset", + "baseName": "record_offset", + "type": "number", + "format": "int32" + } +]; +var SearchSchedulesRequestHistoryRunsOptions = _SearchSchedulesRequestHistoryRunsOptions; + +// models/SearchSchedulesRequestSortOptions.ts +var _SearchSchedulesRequestSortOptions = class _SearchSchedulesRequestSortOptions { + static getAttributeTypeMap() { + return _SearchSchedulesRequestSortOptions.attributeTypeMap; + } + constructor() { + } +}; +_SearchSchedulesRequestSortOptions.discriminator = void 0; +_SearchSchedulesRequestSortOptions.attributeTypeMap = [ + { + "name": "field_name", + "baseName": "field_name", + "type": "string", + "format": "" + }, + { + "name": "order", + "baseName": "order", + "type": "string", + "format": "" + } +]; +var SearchSchedulesRequestSortOptions = _SearchSchedulesRequestSortOptions; + +// models/SearchSecuritySettingsRequest.ts +var _SearchSecuritySettingsRequest = class _SearchSecuritySettingsRequest { + static getAttributeTypeMap() { + return _SearchSecuritySettingsRequest.attributeTypeMap; + } + constructor() { + } +}; +_SearchSecuritySettingsRequest.discriminator = void 0; +_SearchSecuritySettingsRequest.attributeTypeMap = [ + { + "name": "scope", + "baseName": "scope", + "type": "SearchSecuritySettingsRequestScopeEnum", + "format": "" + } +]; +var SearchSecuritySettingsRequest = _SearchSecuritySettingsRequest; + +// models/SearchTagsRequest.ts +var _SearchTagsRequest = class _SearchTagsRequest { + static getAttributeTypeMap() { + return _SearchTagsRequest.attributeTypeMap; + } + constructor() { + } +}; +_SearchTagsRequest.discriminator = void 0; +_SearchTagsRequest.attributeTypeMap = [ + { + "name": "tag_identifier", + "baseName": "tag_identifier", + "type": "string", + "format": "" + }, + { + "name": "name_pattern", + "baseName": "name_pattern", + "type": "string", + "format": "" + }, + { + "name": "color", + "baseName": "color", + "type": "string", + "format": "" + } +]; +var SearchTagsRequest = _SearchTagsRequest; + +// models/SearchUserGroupsRequest.ts +var _SearchUserGroupsRequest = class _SearchUserGroupsRequest { + static getAttributeTypeMap() { + return _SearchUserGroupsRequest.attributeTypeMap; + } + constructor() { + } +}; +_SearchUserGroupsRequest.discriminator = void 0; +_SearchUserGroupsRequest.attributeTypeMap = [ + { + "name": "default_liveboard_identifiers", + "baseName": "default_liveboard_identifiers", + "type": "Array", + "format": "" + }, + { + "name": "description", + "baseName": "description", + "type": "string", + "format": "" + }, + { + "name": "display_name", + "baseName": "display_name", + "type": "string", + "format": "" + }, + { + "name": "name_pattern", + "baseName": "name_pattern", + "type": "string", + "format": "" + }, + { + "name": "group_identifier", + "baseName": "group_identifier", + "type": "string", + "format": "" + }, + { + "name": "org_identifiers", + "baseName": "org_identifiers", + "type": "Array", + "format": "" + }, + { + "name": "privileges", + "baseName": "privileges", + "type": "Array", + "format": "" + }, + { + "name": "sub_group_identifiers", + "baseName": "sub_group_identifiers", + "type": "Array", + "format": "" + }, + { + "name": "type", + "baseName": "type", + "type": "SearchUserGroupsRequestTypeEnum", + "format": "" + }, + { + "name": "user_identifiers", + "baseName": "user_identifiers", + "type": "Array", + "format": "" + }, + { + "name": "visibility", + "baseName": "visibility", + "type": "SearchUserGroupsRequestVisibilityEnum", + "format": "" + }, + { + "name": "role_identifiers", + "baseName": "role_identifiers", + "type": "Array", + "format": "" + }, + { + "name": "record_offset", + "baseName": "record_offset", + "type": "number", + "format": "int32" + }, + { + "name": "record_size", + "baseName": "record_size", + "type": "number", + "format": "int32" + }, + { + "name": "sort_options", + "baseName": "sort_options", + "type": "SearchUserGroupsRequestSortOptions", + "format": "" + }, + { + "name": "include_users", + "baseName": "include_users", + "type": "boolean", + "format": "" + }, + { + "name": "include_sub_groups", + "baseName": "include_sub_groups", + "type": "boolean", + "format": "" + } +]; +var SearchUserGroupsRequest = _SearchUserGroupsRequest; + +// models/SearchUserGroupsRequestSortOptions.ts +var _SearchUserGroupsRequestSortOptions = class _SearchUserGroupsRequestSortOptions { + static getAttributeTypeMap() { + return _SearchUserGroupsRequestSortOptions.attributeTypeMap; + } + constructor() { + } +}; +_SearchUserGroupsRequestSortOptions.discriminator = void 0; +_SearchUserGroupsRequestSortOptions.attributeTypeMap = [ + { + "name": "field_name", + "baseName": "field_name", + "type": "SearchUserGroupsRequestSortOptionsFieldNameEnum", + "format": "" + }, + { + "name": "order", + "baseName": "order", + "type": "SearchUserGroupsRequestSortOptionsOrderEnum", + "format": "" + } +]; +var SearchUserGroupsRequestSortOptions = _SearchUserGroupsRequestSortOptions; + +// models/SearchUsersRequest.ts +var _SearchUsersRequest = class _SearchUsersRequest { + static getAttributeTypeMap() { + return _SearchUsersRequest.attributeTypeMap; + } + constructor() { + } +}; +_SearchUsersRequest.discriminator = void 0; +_SearchUsersRequest.attributeTypeMap = [ + { + "name": "user_identifier", + "baseName": "user_identifier", + "type": "string", + "format": "" + }, + { + "name": "display_name", + "baseName": "display_name", + "type": "string", + "format": "" + }, + { + "name": "name_pattern", + "baseName": "name_pattern", + "type": "string", + "format": "" + }, + { + "name": "visibility", + "baseName": "visibility", + "type": "SearchUsersRequestVisibilityEnum", + "format": "" + }, + { + "name": "email", + "baseName": "email", + "type": "string", + "format": "" + }, + { + "name": "group_identifiers", + "baseName": "group_identifiers", + "type": "Array", + "format": "" + }, + { + "name": "privileges", + "baseName": "privileges", + "type": "Array", + "format": "" + }, + { + "name": "account_type", + "baseName": "account_type", + "type": "SearchUsersRequestAccountTypeEnum", + "format": "" + }, + { + "name": "account_status", + "baseName": "account_status", + "type": "SearchUsersRequestAccountStatusEnum", + "format": "" + }, + { + "name": "notify_on_share", + "baseName": "notify_on_share", + "type": "boolean", + "format": "" + }, + { + "name": "show_onboarding_experience", + "baseName": "show_onboarding_experience", + "type": "boolean", + "format": "" + }, + { + "name": "onboarding_experience_completed", + "baseName": "onboarding_experience_completed", + "type": "boolean", + "format": "" + }, + { + "name": "org_identifiers", + "baseName": "org_identifiers", + "type": "Array", + "format": "" + }, + { + "name": "home_liveboard_identifier", + "baseName": "home_liveboard_identifier", + "type": "string", + "format": "" + }, + { + "name": "favorite_metadata", + "baseName": "favorite_metadata", + "type": "Array", + "format": "" + }, + { + "name": "record_offset", + "baseName": "record_offset", + "type": "number", + "format": "int32" + }, + { + "name": "record_size", + "baseName": "record_size", + "type": "number", + "format": "int32" + }, + { + "name": "sort_options", + "baseName": "sort_options", + "type": "SearchCollectionsRequestSortOptions", + "format": "" + }, + { + "name": "role_identifiers", + "baseName": "role_identifiers", + "type": "Array", + "format": "" + }, + { + "name": "include_favorite_metadata", + "baseName": "include_favorite_metadata", + "type": "boolean", + "format": "" + }, + { + "name": "include_variable_values", + "baseName": "include_variable_values", + "type": "boolean", + "format": "" + } +]; +var SearchUsersRequest = _SearchUsersRequest; + +// models/SearchVariablesRequest.ts +var _SearchVariablesRequest = class _SearchVariablesRequest { + static getAttributeTypeMap() { + return _SearchVariablesRequest.attributeTypeMap; + } + constructor() { + } +}; +_SearchVariablesRequest.discriminator = void 0; +_SearchVariablesRequest.attributeTypeMap = [ + { + "name": "variable_details", + "baseName": "variable_details", + "type": "Array", + "format": "" + }, + { + "name": "value_scope", + "baseName": "value_scope", + "type": "Array", + "format": "" + }, + { + "name": "record_offset", + "baseName": "record_offset", + "type": "number", + "format": "int32" + }, + { + "name": "record_size", + "baseName": "record_size", + "type": "number", + "format": "int32" + }, + { + "name": "response_content", + "baseName": "response_content", + "type": "SearchVariablesRequestResponseContentEnum", + "format": "" + } +]; +var SearchVariablesRequest = _SearchVariablesRequest; + +// models/SearchWebhookConfigurationsRequest.ts +var _SearchWebhookConfigurationsRequest = class _SearchWebhookConfigurationsRequest { + static getAttributeTypeMap() { + return _SearchWebhookConfigurationsRequest.attributeTypeMap; + } + constructor() { + } +}; +_SearchWebhookConfigurationsRequest.discriminator = void 0; +_SearchWebhookConfigurationsRequest.attributeTypeMap = [ + { + "name": "org_identifier", + "baseName": "org_identifier", + "type": "string", + "format": "" + }, + { + "name": "webhook_identifier", + "baseName": "webhook_identifier", + "type": "string", + "format": "" + }, + { + "name": "event_type", + "baseName": "event_type", + "type": "SearchWebhookConfigurationsRequestEventTypeEnum", + "format": "" + }, + { + "name": "record_offset", + "baseName": "record_offset", + "type": "number", + "format": "int32" + }, + { + "name": "record_size", + "baseName": "record_size", + "type": "number", + "format": "int32" + }, + { + "name": "sort_options", + "baseName": "sort_options", + "type": "SearchWebhookConfigurationsRequestSortOptions", + "format": "" + } +]; +var SearchWebhookConfigurationsRequest = _SearchWebhookConfigurationsRequest; + +// models/SearchWebhookConfigurationsRequestSortOptions.ts +var _SearchWebhookConfigurationsRequestSortOptions = class _SearchWebhookConfigurationsRequestSortOptions { + static getAttributeTypeMap() { + return _SearchWebhookConfigurationsRequestSortOptions.attributeTypeMap; + } + constructor() { + } +}; +_SearchWebhookConfigurationsRequestSortOptions.discriminator = void 0; +_SearchWebhookConfigurationsRequestSortOptions.attributeTypeMap = [ + { + "name": "field_name", + "baseName": "field_name", + "type": "SearchWebhookConfigurationsRequestSortOptionsFieldNameEnum", + "format": "" + }, + { + "name": "order", + "baseName": "order", + "type": "SearchWebhookConfigurationsRequestSortOptionsOrderEnum", + "format": "" + } +]; +var SearchWebhookConfigurationsRequestSortOptions = _SearchWebhookConfigurationsRequestSortOptions; + +// models/SecuritySettingsClusterPreferences.ts +var _SecuritySettingsClusterPreferences = class _SecuritySettingsClusterPreferences { + static getAttributeTypeMap() { + return _SecuritySettingsClusterPreferences.attributeTypeMap; + } + constructor() { + } +}; +_SecuritySettingsClusterPreferences.discriminator = void 0; +_SecuritySettingsClusterPreferences.attributeTypeMap = [ + { + "name": "enable_partitioned_cookies", + "baseName": "enable_partitioned_cookies", + "type": "boolean", + "format": "" + }, + { + "name": "cors_whitelisted_urls", + "baseName": "cors_whitelisted_urls", + "type": "Array", + "format": "" + }, + { + "name": "csp_settings", + "baseName": "csp_settings", + "type": "CspSettings", + "format": "" + }, + { + "name": "saml_redirect_urls", + "baseName": "saml_redirect_urls", + "type": "Array", + "format": "" + }, + { + "name": "non_embed_access", + "baseName": "non_embed_access", + "type": "ClusterNonEmbedAccess", + "format": "" + }, + { + "name": "trusted_auth_status", + "baseName": "trusted_auth_status", + "type": "SecuritySettingsClusterPreferencesTrustedAuthStatusEnum", + "format": "" + } +]; +var SecuritySettingsClusterPreferences = _SecuritySettingsClusterPreferences; + +// models/SecuritySettingsClusterPreferencesInput.ts +var _SecuritySettingsClusterPreferencesInput = class _SecuritySettingsClusterPreferencesInput { + static getAttributeTypeMap() { + return _SecuritySettingsClusterPreferencesInput.attributeTypeMap; + } + constructor() { + } +}; +_SecuritySettingsClusterPreferencesInput.discriminator = void 0; +_SecuritySettingsClusterPreferencesInput.attributeTypeMap = [ + { + "name": "enable_partitioned_cookies", + "baseName": "enable_partitioned_cookies", + "type": "boolean", + "format": "" + }, + { + "name": "cors_whitelisted_urls", + "baseName": "cors_whitelisted_urls", + "type": "Array", + "format": "" + }, + { + "name": "csp_settings", + "baseName": "csp_settings", + "type": "CspSettingsInput", + "format": "" + }, + { + "name": "saml_redirect_urls", + "baseName": "saml_redirect_urls", + "type": "Array", + "format": "" + }, + { + "name": "non_embed_access", + "baseName": "non_embed_access", + "type": "ClusterNonEmbedAccessInput", + "format": "" + } +]; +var SecuritySettingsClusterPreferencesInput = _SecuritySettingsClusterPreferencesInput; + +// models/SecuritySettingsOrgDetails.ts +var _SecuritySettingsOrgDetails = class _SecuritySettingsOrgDetails { + static getAttributeTypeMap() { + return _SecuritySettingsOrgDetails.attributeTypeMap; + } + constructor() { + } +}; +_SecuritySettingsOrgDetails.discriminator = void 0; +_SecuritySettingsOrgDetails.attributeTypeMap = [ + { + "name": "id", + "baseName": "id", + "type": "number", + "format": "int32" + }, + { + "name": "name", + "baseName": "name", + "type": "string", + "format": "" + } +]; +var SecuritySettingsOrgDetails = _SecuritySettingsOrgDetails; + +// models/SecuritySettingsOrgPreferences.ts +var _SecuritySettingsOrgPreferences = class _SecuritySettingsOrgPreferences { + static getAttributeTypeMap() { + return _SecuritySettingsOrgPreferences.attributeTypeMap; + } + constructor() { + } +}; +_SecuritySettingsOrgPreferences.discriminator = void 0; +_SecuritySettingsOrgPreferences.attributeTypeMap = [ + { + "name": "org", + "baseName": "org", + "type": "SecuritySettingsOrgDetails", + "format": "" + }, + { + "name": "cors_whitelisted_urls", + "baseName": "cors_whitelisted_urls", + "type": "Array", + "format": "" + }, + { + "name": "non_embed_access", + "baseName": "non_embed_access", + "type": "OrgNonEmbedAccess", + "format": "" + }, + { + "name": "trusted_auth_status", + "baseName": "trusted_auth_status", + "type": "SecuritySettingsOrgPreferencesTrustedAuthStatusEnum", + "format": "" + } +]; +var SecuritySettingsOrgPreferences = _SecuritySettingsOrgPreferences; + +// models/SecuritySettingsOrgPreferencesInput.ts +var _SecuritySettingsOrgPreferencesInput = class _SecuritySettingsOrgPreferencesInput { + static getAttributeTypeMap() { + return _SecuritySettingsOrgPreferencesInput.attributeTypeMap; + } + constructor() { + } +}; +_SecuritySettingsOrgPreferencesInput.discriminator = void 0; +_SecuritySettingsOrgPreferencesInput.attributeTypeMap = [ + { + "name": "org_identifier", + "baseName": "org_identifier", + "type": "string", + "format": "" + }, + { + "name": "cors_whitelisted_urls", + "baseName": "cors_whitelisted_urls", + "type": "Array", + "format": "" + }, + { + "name": "non_embed_access", + "baseName": "non_embed_access", + "type": "OrgNonEmbedAccessInput", + "format": "" + } +]; +var SecuritySettingsOrgPreferencesInput = _SecuritySettingsOrgPreferencesInput; + +// models/SecuritySettingsResponse.ts +var _SecuritySettingsResponse = class _SecuritySettingsResponse { + static getAttributeTypeMap() { + return _SecuritySettingsResponse.attributeTypeMap; + } + constructor() { + } +}; +_SecuritySettingsResponse.discriminator = void 0; +_SecuritySettingsResponse.attributeTypeMap = [ + { + "name": "cluster_preferences", + "baseName": "cluster_preferences", + "type": "SecuritySettingsClusterPreferences", + "format": "" + }, + { + "name": "org_preferences", + "baseName": "org_preferences", + "type": "Array", + "format": "" + } +]; +var SecuritySettingsResponse = _SecuritySettingsResponse; + +// models/SendAgentConversationMessageRequest.ts +var _SendAgentConversationMessageRequest = class _SendAgentConversationMessageRequest { + static getAttributeTypeMap() { + return _SendAgentConversationMessageRequest.attributeTypeMap; + } + constructor() { + } +}; +_SendAgentConversationMessageRequest.discriminator = void 0; +_SendAgentConversationMessageRequest.attributeTypeMap = [ + { + "name": "messages", + "baseName": "messages", + "type": "Array", + "format": "" + } +]; +var SendAgentConversationMessageRequest = _SendAgentConversationMessageRequest; + +// models/SendAgentConversationMessageStreamingRequest.ts +var _SendAgentConversationMessageStreamingRequest = class _SendAgentConversationMessageStreamingRequest { + static getAttributeTypeMap() { + return _SendAgentConversationMessageStreamingRequest.attributeTypeMap; + } + constructor() { + } +}; +_SendAgentConversationMessageStreamingRequest.discriminator = void 0; +_SendAgentConversationMessageStreamingRequest.attributeTypeMap = [ + { + "name": "messages", + "baseName": "messages", + "type": "Array", + "format": "" + } +]; +var SendAgentConversationMessageStreamingRequest = _SendAgentConversationMessageStreamingRequest; + +// models/SendAgentMessageRequest.ts +var _SendAgentMessageRequest = class _SendAgentMessageRequest { + static getAttributeTypeMap() { + return _SendAgentMessageRequest.attributeTypeMap; + } + constructor() { + } +}; +_SendAgentMessageRequest.discriminator = void 0; +_SendAgentMessageRequest.attributeTypeMap = [ + { + "name": "messages", + "baseName": "messages", + "type": "Array", + "format": "" + } +]; +var SendAgentMessageRequest = _SendAgentMessageRequest; + +// models/SendAgentMessageResponse.ts +var _SendAgentMessageResponse = class _SendAgentMessageResponse { + static getAttributeTypeMap() { + return _SendAgentMessageResponse.attributeTypeMap; + } + constructor() { + } +}; +_SendAgentMessageResponse.discriminator = void 0; +_SendAgentMessageResponse.attributeTypeMap = [ + { + "name": "success", + "baseName": "success", + "type": "boolean", + "format": "" + }, + { + "name": "message", + "baseName": "message", + "type": "string", + "format": "" + } +]; +var SendAgentMessageResponse = _SendAgentMessageResponse; + +// models/SendAgentMessageStreamingRequest.ts +var _SendAgentMessageStreamingRequest = class _SendAgentMessageStreamingRequest { + static getAttributeTypeMap() { + return _SendAgentMessageStreamingRequest.attributeTypeMap; + } + constructor() { + } +}; +_SendAgentMessageStreamingRequest.discriminator = void 0; +_SendAgentMessageStreamingRequest.attributeTypeMap = [ + { + "name": "conversation_identifier", + "baseName": "conversation_identifier", + "type": "string", + "format": "" + }, + { + "name": "messages", + "baseName": "messages", + "type": "Array", + "format": "" + } +]; +var SendAgentMessageStreamingRequest = _SendAgentMessageStreamingRequest; + +// models/SendMessageRequest.ts +var _SendMessageRequest = class _SendMessageRequest { + static getAttributeTypeMap() { + return _SendMessageRequest.attributeTypeMap; + } + constructor() { + } +}; +_SendMessageRequest.discriminator = void 0; +_SendMessageRequest.attributeTypeMap = [ + { + "name": "metadata_identifier", + "baseName": "metadata_identifier", + "type": "string", + "format": "" + }, + { + "name": "message", + "baseName": "message", + "type": "string", + "format": "" + } +]; +var SendMessageRequest = _SendMessageRequest; + +// models/SetNLInstructionsRequest.ts +var _SetNLInstructionsRequest = class _SetNLInstructionsRequest { + static getAttributeTypeMap() { + return _SetNLInstructionsRequest.attributeTypeMap; + } + constructor() { + } +}; +_SetNLInstructionsRequest.discriminator = void 0; +_SetNLInstructionsRequest.attributeTypeMap = [ + { + "name": "data_source_identifier", + "baseName": "data_source_identifier", + "type": "string", + "format": "" + }, + { + "name": "nl_instructions_info", + "baseName": "nl_instructions_info", + "type": "Array", + "format": "" + } +]; +var SetNLInstructionsRequest = _SetNLInstructionsRequest; + +// models/ShareMetadataRequest.ts +var _ShareMetadataRequest = class _ShareMetadataRequest { + static getAttributeTypeMap() { + return _ShareMetadataRequest.attributeTypeMap; + } + constructor() { + } +}; +_ShareMetadataRequest.discriminator = void 0; +_ShareMetadataRequest.attributeTypeMap = [ + { + "name": "metadata_type", + "baseName": "metadata_type", + "type": "ShareMetadataRequestMetadataTypeEnum", + "format": "" + }, + { + "name": "metadata_identifiers", + "baseName": "metadata_identifiers", + "type": "Array", + "format": "" + }, + { + "name": "metadata", + "baseName": "metadata", + "type": "Array", + "format": "" + }, + { + "name": "permissions", + "baseName": "permissions", + "type": "Array", + "format": "" + }, + { + "name": "visualization_identifiers", + "baseName": "visualization_identifiers", + "type": "Array", + "format": "" + }, + { + "name": "emails", + "baseName": "emails", + "type": "Array", + "format": "" + }, + { + "name": "message", + "baseName": "message", + "type": "string", + "format": "" + }, + { + "name": "enable_custom_url", + "baseName": "enable_custom_url", + "type": "boolean", + "format": "" + }, + { + "name": "notify_on_share", + "baseName": "notify_on_share", + "type": "boolean", + "format": "" + }, + { + "name": "has_lenient_discoverability", + "baseName": "has_lenient_discoverability", + "type": "boolean", + "format": "" + } +]; +var ShareMetadataRequest = _ShareMetadataRequest; + +// models/ShareMetadataTypeInput.ts +var _ShareMetadataTypeInput = class _ShareMetadataTypeInput { + static getAttributeTypeMap() { + return _ShareMetadataTypeInput.attributeTypeMap; + } + constructor() { + } +}; +_ShareMetadataTypeInput.discriminator = void 0; +_ShareMetadataTypeInput.attributeTypeMap = [ + { + "name": "type", + "baseName": "type", + "type": "ShareMetadataTypeInputTypeEnum", + "format": "" + }, + { + "name": "identifier", + "baseName": "identifier", + "type": "string", + "format": "" + } +]; +var ShareMetadataTypeInput = _ShareMetadataTypeInput; + +// models/SharePermissionsInput.ts +var _SharePermissionsInput = class _SharePermissionsInput { + static getAttributeTypeMap() { + return _SharePermissionsInput.attributeTypeMap; + } + constructor() { + } +}; +_SharePermissionsInput.discriminator = void 0; +_SharePermissionsInput.attributeTypeMap = [ + { + "name": "principal", + "baseName": "principal", + "type": "PrincipalsInput", + "format": "" + }, + { + "name": "share_mode", + "baseName": "share_mode", + "type": "SharePermissionsInputShareModeEnum", + "format": "" + }, + { + "name": "content_share_mode", + "baseName": "content_share_mode", + "type": "SharePermissionsInputContentShareModeEnum", + "format": "" + } +]; +var SharePermissionsInput = _SharePermissionsInput; + +// models/SingleAnswerRequest.ts +var _SingleAnswerRequest = class _SingleAnswerRequest { + static getAttributeTypeMap() { + return _SingleAnswerRequest.attributeTypeMap; + } + constructor() { + } +}; +_SingleAnswerRequest.discriminator = void 0; +_SingleAnswerRequest.attributeTypeMap = [ + { + "name": "query", + "baseName": "query", + "type": "string", + "format": "" + }, + { + "name": "metadata_identifier", + "baseName": "metadata_identifier", + "type": "string", + "format": "" + } +]; +var SingleAnswerRequest = _SingleAnswerRequest; + +// models/SortOption.ts +var _SortOption = class _SortOption { + static getAttributeTypeMap() { + return _SortOption.attributeTypeMap; + } + constructor() { + } +}; +_SortOption.discriminator = void 0; +_SortOption.attributeTypeMap = [ + { + "name": "field_name", + "baseName": "field_name", + "type": "SortOptionFieldNameEnum", + "format": "" + }, + { + "name": "order", + "baseName": "order", + "type": "SortOptionOrderEnum", + "format": "" + } +]; +var SortOption = _SortOption; + +// models/SortOptionInput.ts +var _SortOptionInput = class _SortOptionInput { + static getAttributeTypeMap() { + return _SortOptionInput.attributeTypeMap; + } + constructor() { + } +}; +_SortOptionInput.discriminator = void 0; +_SortOptionInput.attributeTypeMap = [ + { + "name": "field_name", + "baseName": "field_name", + "type": "SortOptionInputFieldNameEnum", + "format": "" + }, + { + "name": "order", + "baseName": "order", + "type": "SortOptionInputOrderEnum", + "format": "" + } +]; +var SortOptionInput = _SortOptionInput; + +// models/SortOptions.ts +var _SortOptions = class _SortOptions { + static getAttributeTypeMap() { + return _SortOptions.attributeTypeMap; + } + constructor() { + } +}; +_SortOptions.discriminator = void 0; +_SortOptions.attributeTypeMap = [ + { + "name": "field_name", + "baseName": "field_name", + "type": "SortOptionsFieldNameEnum", + "format": "" + }, + { + "name": "order", + "baseName": "order", + "type": "SortOptionsOrderEnum", + "format": "" + } +]; +var SortOptions = _SortOptions; + +// models/SortingOptions.ts +var _SortingOptions = class _SortingOptions { + static getAttributeTypeMap() { + return _SortingOptions.attributeTypeMap; + } + constructor() { + } +}; +_SortingOptions.discriminator = void 0; +_SortingOptions.attributeTypeMap = [ + { + "name": "field_name", + "baseName": "field_name", + "type": "string", + "format": "" + }, + { + "name": "order", + "baseName": "order", + "type": "string", + "format": "" + } +]; +var SortingOptions = _SortingOptions; + +// models/SqlQuery.ts +var _SqlQuery = class _SqlQuery { + static getAttributeTypeMap() { + return _SqlQuery.attributeTypeMap; + } + constructor() { + } +}; +_SqlQuery.discriminator = void 0; +_SqlQuery.attributeTypeMap = [ + { + "name": "metadata_id", + "baseName": "metadata_id", + "type": "string", + "format": "" + }, + { + "name": "metadata_name", + "baseName": "metadata_name", + "type": "string", + "format": "" + }, + { + "name": "sql_query", + "baseName": "sql_query", + "type": "string", + "format": "" + } +]; +var SqlQuery = _SqlQuery; + +// models/SqlQueryResponse.ts +var _SqlQueryResponse = class _SqlQueryResponse { + static getAttributeTypeMap() { + return _SqlQueryResponse.attributeTypeMap; + } + constructor() { + } +}; +_SqlQueryResponse.discriminator = void 0; +_SqlQueryResponse.attributeTypeMap = [ + { + "name": "metadata_id", + "baseName": "metadata_id", + "type": "string", + "format": "" + }, + { + "name": "metadata_name", + "baseName": "metadata_name", + "type": "string", + "format": "" + }, + { + "name": "metadata_type", + "baseName": "metadata_type", + "type": "SqlQueryResponseMetadataTypeEnum", + "format": "" + }, + { + "name": "sql_queries", + "baseName": "sql_queries", + "type": "Array", + "format": "" + } +]; +var SqlQueryResponse = _SqlQueryResponse; + +// models/StorageConfig.ts +var _StorageConfig = class _StorageConfig { + static getAttributeTypeMap() { + return _StorageConfig.attributeTypeMap; + } + constructor() { + } +}; +_StorageConfig.discriminator = void 0; +_StorageConfig.attributeTypeMap = [ + { + "name": "aws_s3_config", + "baseName": "aws_s3_config", + "type": "AwsS3Config", + "format": "" + } +]; +var StorageConfig = _StorageConfig; + +// models/StorageConfigInput.ts +var _StorageConfigInput = class _StorageConfigInput { + static getAttributeTypeMap() { + return _StorageConfigInput.attributeTypeMap; + } + constructor() { + } +}; +_StorageConfigInput.discriminator = void 0; +_StorageConfigInput.attributeTypeMap = [ + { + "name": "aws_s3_config", + "baseName": "aws_s3_config", + "type": "AwsS3ConfigInput", + "format": "" + } +]; +var StorageConfigInput = _StorageConfigInput; + +// models/StorageDestination.ts +var _StorageDestination = class _StorageDestination { + static getAttributeTypeMap() { + return _StorageDestination.attributeTypeMap; + } + constructor() { + } +}; +_StorageDestination.discriminator = void 0; +_StorageDestination.attributeTypeMap = [ + { + "name": "storage_type", + "baseName": "storage_type", + "type": "StorageDestinationStorageTypeEnum", + "format": "" + }, + { + "name": "storage_config", + "baseName": "storage_config", + "type": "StorageConfig", + "format": "" + } +]; +var StorageDestination = _StorageDestination; + +// models/StorageDestinationInput.ts +var _StorageDestinationInput = class _StorageDestinationInput { + static getAttributeTypeMap() { + return _StorageDestinationInput.attributeTypeMap; + } + constructor() { + } +}; +_StorageDestinationInput.discriminator = void 0; +_StorageDestinationInput.attributeTypeMap = [ + { + "name": "storage_type", + "baseName": "storage_type", + "type": "StorageDestinationInputStorageTypeEnum", + "format": "" + }, + { + "name": "storage_config", + "baseName": "storage_config", + "type": "StorageConfigInput", + "format": "" + } +]; +var StorageDestinationInput = _StorageDestinationInput; + +// models/SyncMetadataRequest.ts +var _SyncMetadataRequest = class _SyncMetadataRequest { + static getAttributeTypeMap() { + return _SyncMetadataRequest.attributeTypeMap; + } + constructor() { + } +}; +_SyncMetadataRequest.discriminator = void 0; +_SyncMetadataRequest.attributeTypeMap = [ + { + "name": "tables", + "baseName": "tables", + "type": "any", + "format": "" + }, + { + "name": "sync_attributes", + "baseName": "sync_attributes", + "type": "Array", + "format": "" + } +]; +var SyncMetadataRequest = _SyncMetadataRequest; + +// models/SyncMetadataResponse.ts +var _SyncMetadataResponse = class _SyncMetadataResponse { + static getAttributeTypeMap() { + return _SyncMetadataResponse.attributeTypeMap; + } + constructor() { + } +}; +_SyncMetadataResponse.discriminator = void 0; +_SyncMetadataResponse.attributeTypeMap = [ + { + "name": "status", + "baseName": "status", + "type": "SyncMetadataResponseStatusEnum", + "format": "" + }, + { + "name": "tables_updated", + "baseName": "tables_updated", + "type": "number", + "format": "int32" + }, + { + "name": "columns_updated", + "baseName": "columns_updated", + "type": "number", + "format": "int32" + }, + { + "name": "tables_failed", + "baseName": "tables_failed", + "type": "number", + "format": "int32" + }, + { + "name": "columns_failed", + "baseName": "columns_failed", + "type": "number", + "format": "int32" + }, + { + "name": "message", + "baseName": "message", + "type": "string", + "format": "" + } +]; +var SyncMetadataResponse = _SyncMetadataResponse; + +// models/SystemConfig.ts +var _SystemConfig = class _SystemConfig { + static getAttributeTypeMap() { + return _SystemConfig.attributeTypeMap; + } + constructor() { + } +}; +_SystemConfig.discriminator = void 0; +_SystemConfig.attributeTypeMap = [ + { + "name": "onboarding_content_url", + "baseName": "onboarding_content_url", + "type": "string", + "format": "" + }, + { + "name": "saml_enabled", + "baseName": "saml_enabled", + "type": "boolean", + "format": "" + }, + { + "name": "okta_enabled", + "baseName": "okta_enabled", + "type": "boolean", + "format": "" + } +]; +var SystemConfig = _SystemConfig; + +// models/SystemInfo.ts +var _SystemInfo = class _SystemInfo { + static getAttributeTypeMap() { + return _SystemInfo.attributeTypeMap; + } + constructor() { + } +}; +_SystemInfo.discriminator = void 0; +_SystemInfo.attributeTypeMap = [ + { + "name": "id", + "baseName": "id", + "type": "string", + "format": "" + }, + { + "name": "name", + "baseName": "name", + "type": "string", + "format": "" + }, + { + "name": "release_version", + "baseName": "release_version", + "type": "string", + "format": "" + }, + { + "name": "time_zone", + "baseName": "time_zone", + "type": "string", + "format": "" + }, + { + "name": "locale", + "baseName": "locale", + "type": "string", + "format": "" + }, + { + "name": "date_format", + "baseName": "date_format", + "type": "string", + "format": "" + }, + { + "name": "api_version", + "baseName": "api_version", + "type": "string", + "format": "" + }, + { + "name": "type", + "baseName": "type", + "type": "string", + "format": "" + }, + { + "name": "environment", + "baseName": "environment", + "type": "string", + "format": "" + }, + { + "name": "license", + "baseName": "license", + "type": "string", + "format": "" + }, + { + "name": "date_time_format", + "baseName": "date_time_format", + "type": "string", + "format": "" + }, + { + "name": "time_format", + "baseName": "time_format", + "type": "string", + "format": "" + }, + { + "name": "system_user_id", + "baseName": "system_user_id", + "type": "string", + "format": "" + }, + { + "name": "super_user_id", + "baseName": "super_user_id", + "type": "string", + "format": "" + }, + { + "name": "hidden_object_id", + "baseName": "hidden_object_id", + "type": "string", + "format": "" + }, + { + "name": "system_group_id", + "baseName": "system_group_id", + "type": "string", + "format": "" + }, + { + "name": "tsadmin_user_id", + "baseName": "tsadmin_user_id", + "type": "string", + "format": "" + }, + { + "name": "admin_group_id", + "baseName": "admin_group_id", + "type": "string", + "format": "" + }, + { + "name": "all_tables_connection_id", + "baseName": "all_tables_connection_id", + "type": "string", + "format": "" + }, + { + "name": "all_user_group_id", + "baseName": "all_user_group_id", + "type": "string", + "format": "" + }, + { + "name": "accept_language", + "baseName": "accept_language", + "type": "string", + "format": "" + }, + { + "name": "all_user_group_member_user_count", + "baseName": "all_user_group_member_user_count", + "type": "number", + "format": "int32" + }, + { + "name": "logical_model_version", + "baseName": "logical_model_version", + "type": "number", + "format": "int32" + } +]; +var SystemInfo = _SystemInfo; + +// models/SystemOverrideInfo.ts +var _SystemOverrideInfo = class _SystemOverrideInfo { + static getAttributeTypeMap() { + return _SystemOverrideInfo.attributeTypeMap; + } + constructor() { + } +}; +_SystemOverrideInfo.discriminator = void 0; +_SystemOverrideInfo.attributeTypeMap = [ + { + "name": "config_override_info", + "baseName": "config_override_info", + "type": "any", + "format": "" + } +]; +var SystemOverrideInfo = _SystemOverrideInfo; + +// models/Table.ts +var _Table = class _Table { + static getAttributeTypeMap() { + return _Table.attributeTypeMap; + } + constructor() { + } +}; +_Table.discriminator = void 0; +_Table.attributeTypeMap = [ + { + "name": "name", + "baseName": "name", + "type": "string", + "format": "" + }, + { + "name": "columns", + "baseName": "columns", + "type": "Array", + "format": "" + }, + { + "name": "type", + "baseName": "type", + "type": "string", + "format": "" + }, + { + "name": "description", + "baseName": "description", + "type": "string", + "format": "" + }, + { + "name": "selected", + "baseName": "selected", + "type": "boolean", + "format": "" + }, + { + "name": "linked", + "baseName": "linked", + "type": "boolean", + "format": "" + }, + { + "name": "relationships", + "baseName": "relationships", + "type": "Array", + "format": "" + } +]; +var Table = _Table; + +// models/Tag.ts +var _Tag = class _Tag { + static getAttributeTypeMap() { + return _Tag.attributeTypeMap; + } + constructor() { + } +}; +_Tag.discriminator = void 0; +_Tag.attributeTypeMap = [ + { + "name": "name", + "baseName": "name", + "type": "string", + "format": "" + }, + { + "name": "id", + "baseName": "id", + "type": "string", + "format": "" + }, + { + "name": "color", + "baseName": "color", + "type": "string", + "format": "" + }, + { + "name": "deleted", + "baseName": "deleted", + "type": "boolean", + "format": "" + }, + { + "name": "hidden", + "baseName": "hidden", + "type": "boolean", + "format": "" + }, + { + "name": "external", + "baseName": "external", + "type": "boolean", + "format": "" + }, + { + "name": "deprecated", + "baseName": "deprecated", + "type": "boolean", + "format": "" + }, + { + "name": "creation_time_in_millis", + "baseName": "creation_time_in_millis", + "type": "number", + "format": "float" + }, + { + "name": "modification_time_in_millis", + "baseName": "modification_time_in_millis", + "type": "number", + "format": "float" + }, + { + "name": "author_id", + "baseName": "author_id", + "type": "string", + "format": "" + }, + { + "name": "modifier_id", + "baseName": "modifier_id", + "type": "string", + "format": "" + }, + { + "name": "owner_id", + "baseName": "owner_id", + "type": "string", + "format": "" + } +]; +var Tag = _Tag; + +// models/TagMetadataTypeInput.ts +var _TagMetadataTypeInput = class _TagMetadataTypeInput { + static getAttributeTypeMap() { + return _TagMetadataTypeInput.attributeTypeMap; + } + constructor() { + } +}; +_TagMetadataTypeInput.discriminator = void 0; +_TagMetadataTypeInput.attributeTypeMap = [ + { + "name": "type", + "baseName": "type", + "type": "TagMetadataTypeInputTypeEnum", + "format": "" + }, + { + "name": "identifier", + "baseName": "identifier", + "type": "string", + "format": "" + } +]; +var TagMetadataTypeInput = _TagMetadataTypeInput; + +// models/TemplatePropertiesInputCreate.ts +var _TemplatePropertiesInputCreate = class _TemplatePropertiesInputCreate { + static getAttributeTypeMap() { + return _TemplatePropertiesInputCreate.attributeTypeMap; + } + constructor() { + } +}; +_TemplatePropertiesInputCreate.discriminator = void 0; +_TemplatePropertiesInputCreate.attributeTypeMap = [ + { + "name": "cta_button_bg_color", + "baseName": "cta_button_bg_color", + "type": "string", + "format": "" + }, + { + "name": "cta_text_font_color", + "baseName": "cta_text_font_color", + "type": "string", + "format": "" + }, + { + "name": "primary_bg_color", + "baseName": "primary_bg_color", + "type": "string", + "format": "" + }, + { + "name": "home_url", + "baseName": "home_url", + "type": "string", + "format": "" + }, + { + "name": "logo_url", + "baseName": "logo_url", + "type": "string", + "format": "" + }, + { + "name": "font_family", + "baseName": "font_family", + "type": "string", + "format": "" + }, + { + "name": "product_name", + "baseName": "product_name", + "type": "string", + "format": "" + }, + { + "name": "footer_address", + "baseName": "footer_address", + "type": "string", + "format": "" + }, + { + "name": "footer_phone", + "baseName": "footer_phone", + "type": "string", + "format": "" + }, + { + "name": "replacement_value_for_liveboard", + "baseName": "replacement_value_for_liveboard", + "type": "string", + "format": "" + }, + { + "name": "replacement_value_for_answer", + "baseName": "replacement_value_for_answer", + "type": "string", + "format": "" + }, + { + "name": "replacement_value_for_spot_iq", + "baseName": "replacement_value_for_spot_iq", + "type": "string", + "format": "" + }, + { + "name": "hide_footer_address", + "baseName": "hide_footer_address", + "type": "boolean", + "format": "" + }, + { + "name": "hide_footer_phone", + "baseName": "hide_footer_phone", + "type": "boolean", + "format": "" + }, + { + "name": "hide_manage_notification", + "baseName": "hide_manage_notification", + "type": "boolean", + "format": "" + }, + { + "name": "hide_mobile_app_nudge", + "baseName": "hide_mobile_app_nudge", + "type": "boolean", + "format": "" + }, + { + "name": "hide_privacy_policy", + "baseName": "hide_privacy_policy", + "type": "boolean", + "format": "" + }, + { + "name": "hide_product_name", + "baseName": "hide_product_name", + "type": "boolean", + "format": "" + }, + { + "name": "hide_ts_vocabulary_definitions", + "baseName": "hide_ts_vocabulary_definitions", + "type": "boolean", + "format": "" + }, + { + "name": "hide_notification_status", + "baseName": "hide_notification_status", + "type": "boolean", + "format": "" + }, + { + "name": "hide_error_message", + "baseName": "hide_error_message", + "type": "boolean", + "format": "" + }, + { + "name": "hide_unsubscribe_link", + "baseName": "hide_unsubscribe_link", + "type": "boolean", + "format": "" + }, + { + "name": "hide_modify_alert", + "baseName": "hide_modify_alert", + "type": "boolean", + "format": "" + }, + { + "name": "company_privacy_policy_url", + "baseName": "company_privacy_policy_url", + "type": "string", + "format": "" + }, + { + "name": "company_website_url", + "baseName": "company_website_url", + "type": "string", + "format": "" + }, + { + "name": "contact_support_url", + "baseName": "contact_support_url", + "type": "string", + "format": "" + }, + { + "name": "hide_contact_support_url", + "baseName": "hide_contact_support_url", + "type": "boolean", + "format": "" + }, + { + "name": "hide_logo_url", + "baseName": "hide_logo_url", + "type": "boolean", + "format": "" + } +]; +var TemplatePropertiesInputCreate = _TemplatePropertiesInputCreate; + +// models/Token.ts +var _Token = class _Token { + static getAttributeTypeMap() { + return _Token.attributeTypeMap; + } + constructor() { + } +}; +_Token.discriminator = void 0; +_Token.attributeTypeMap = [ + { + "name": "token", + "baseName": "token", + "type": "string", + "format": "" + }, + { + "name": "creation_time_in_millis", + "baseName": "creation_time_in_millis", + "type": "number", + "format": "float" + }, + { + "name": "expiration_time_in_millis", + "baseName": "expiration_time_in_millis", + "type": "number", + "format": "float" + }, + { + "name": "scope", + "baseName": "scope", + "type": "Scope", + "format": "" + }, + { + "name": "valid_for_user_id", + "baseName": "valid_for_user_id", + "type": "string", + "format": "" + }, + { + "name": "valid_for_username", + "baseName": "valid_for_username", + "type": "string", + "format": "" + } +]; +var Token = _Token; + +// models/TokenAccessScopeObject.ts +var _TokenAccessScopeObject = class _TokenAccessScopeObject { + static getAttributeTypeMap() { + return _TokenAccessScopeObject.attributeTypeMap; + } + constructor() { + } +}; +_TokenAccessScopeObject.discriminator = void 0; +_TokenAccessScopeObject.attributeTypeMap = [ + { + "name": "type", + "baseName": "type", + "type": "TokenAccessScopeObjectTypeEnum", + "format": "" + }, + { + "name": "identifier", + "baseName": "identifier", + "type": "string", + "format": "" + } +]; +var TokenAccessScopeObject = _TokenAccessScopeObject; + +// models/TokenValidationResponse.ts +var _TokenValidationResponse = class _TokenValidationResponse { + static getAttributeTypeMap() { + return _TokenValidationResponse.attributeTypeMap; + } + constructor() { + } +}; +_TokenValidationResponse.discriminator = void 0; +_TokenValidationResponse.attributeTypeMap = [ + { + "name": "creation_time_in_millis", + "baseName": "creation_time_in_millis", + "type": "number", + "format": "float" + }, + { + "name": "expiration_time_in_millis", + "baseName": "expiration_time_in_millis", + "type": "number", + "format": "float" + }, + { + "name": "scope", + "baseName": "scope", + "type": "Scope", + "format": "" + }, + { + "name": "valid_for_user_id", + "baseName": "valid_for_user_id", + "type": "string", + "format": "" + }, + { + "name": "token_type", + "baseName": "token_type", + "type": "string", + "format": "" + } +]; +var TokenValidationResponse = _TokenValidationResponse; + +// models/URL.ts +var _URL = class _URL { + static getAttributeTypeMap() { + return _URL.attributeTypeMap; + } + constructor() { + } +}; +_URL.discriminator = void 0; +_URL.attributeTypeMap = [ + { + "name": "authentication", + "baseName": "authentication", + "type": "Authentication", + "format": "" + }, + { + "name": "parameters", + "baseName": "parameters", + "type": "Array", + "format": "" + }, + { + "name": "url", + "baseName": "url", + "type": "string", + "format": "" + }, + { + "name": "reference", + "baseName": "reference", + "type": "string", + "format": "" + } +]; +var URL2 = _URL; + +// models/URLInput.ts +var _URLInput = class _URLInput { + static getAttributeTypeMap() { + return _URLInput.attributeTypeMap; + } + constructor() { + } +}; +_URLInput.discriminator = void 0; +_URLInput.attributeTypeMap = [ + { + "name": "authentication", + "baseName": "authentication", + "type": "AuthenticationInput", + "format": "" + }, + { + "name": "parameters", + "baseName": "parameters", + "type": "Array", + "format": "" + }, + { + "name": "url", + "baseName": "url", + "type": "string", + "format": "" + }, + { + "name": "reference", + "baseName": "reference", + "type": "string", + "format": "" + } +]; +var URLInput = _URLInput; + +// models/URLInputMandatory.ts +var _URLInputMandatory = class _URLInputMandatory { + static getAttributeTypeMap() { + return _URLInputMandatory.attributeTypeMap; + } + constructor() { + } +}; +_URLInputMandatory.discriminator = void 0; +_URLInputMandatory.attributeTypeMap = [ + { + "name": "authentication", + "baseName": "authentication", + "type": "AuthenticationInput", + "format": "" + }, + { + "name": "parameters", + "baseName": "parameters", + "type": "Array", + "format": "" + }, + { + "name": "url", + "baseName": "url", + "type": "string", + "format": "" + }, + { + "name": "reference", + "baseName": "reference", + "type": "string", + "format": "" + } +]; +var URLInputMandatory = _URLInputMandatory; + +// models/UnassignTagRequest.ts +var _UnassignTagRequest = class _UnassignTagRequest { + static getAttributeTypeMap() { + return _UnassignTagRequest.attributeTypeMap; + } + constructor() { + } +}; +_UnassignTagRequest.discriminator = void 0; +_UnassignTagRequest.attributeTypeMap = [ + { + "name": "metadata", + "baseName": "metadata", + "type": "Array", + "format": "" + }, + { + "name": "tag_identifiers", + "baseName": "tag_identifiers", + "type": "Array", + "format": "" + } +]; +var UnassignTagRequest = _UnassignTagRequest; + +// models/UnparameterizeMetadataRequest.ts +var _UnparameterizeMetadataRequest = class _UnparameterizeMetadataRequest { + static getAttributeTypeMap() { + return _UnparameterizeMetadataRequest.attributeTypeMap; + } + constructor() { + } +}; +_UnparameterizeMetadataRequest.discriminator = void 0; +_UnparameterizeMetadataRequest.attributeTypeMap = [ + { + "name": "metadata_type", + "baseName": "metadata_type", + "type": "UnparameterizeMetadataRequestMetadataTypeEnum", + "format": "" + }, + { + "name": "metadata_identifier", + "baseName": "metadata_identifier", + "type": "string", + "format": "" + }, + { + "name": "field_type", + "baseName": "field_type", + "type": "UnparameterizeMetadataRequestFieldTypeEnum", + "format": "" + }, + { + "name": "field_name", + "baseName": "field_name", + "type": "string", + "format": "" + }, + { + "name": "value", + "baseName": "value", + "type": "string", + "format": "" + } +]; +var UnparameterizeMetadataRequest = _UnparameterizeMetadataRequest; + +// models/UnpublishMetadataRequest.ts +var _UnpublishMetadataRequest = class _UnpublishMetadataRequest { + static getAttributeTypeMap() { + return _UnpublishMetadataRequest.attributeTypeMap; + } + constructor() { + } +}; +_UnpublishMetadataRequest.discriminator = void 0; +_UnpublishMetadataRequest.attributeTypeMap = [ + { + "name": "force", + "baseName": "force", + "type": "boolean", + "format": "" + }, + { + "name": "include_dependencies", + "baseName": "include_dependencies", + "type": "boolean", + "format": "" + }, + { + "name": "metadata", + "baseName": "metadata", + "type": "Array", + "format": "" + }, + { + "name": "org_identifiers", + "baseName": "org_identifiers", + "type": "Array", + "format": "" + } +]; +var UnpublishMetadataRequest = _UnpublishMetadataRequest; + +// models/UpdateCalendarRequest.ts +var _UpdateCalendarRequest = class _UpdateCalendarRequest { + static getAttributeTypeMap() { + return _UpdateCalendarRequest.attributeTypeMap; + } + constructor() { + } +}; +_UpdateCalendarRequest.discriminator = void 0; +_UpdateCalendarRequest.attributeTypeMap = [ + { + "name": "update_method", + "baseName": "update_method", + "type": "UpdateCalendarRequestUpdateMethodEnum", + "format": "" + }, + { + "name": "table_reference", + "baseName": "table_reference", + "type": "UpdateCalendarRequestTableReference", + "format": "" + }, + { + "name": "start_date", + "baseName": "start_date", + "type": "string", + "format": "" + }, + { + "name": "end_date", + "baseName": "end_date", + "type": "string", + "format": "" + }, + { + "name": "calendar_type", + "baseName": "calendar_type", + "type": "UpdateCalendarRequestCalendarTypeEnum", + "format": "" + }, + { + "name": "month_offset", + "baseName": "month_offset", + "type": "UpdateCalendarRequestMonthOffsetEnum", + "format": "" + }, + { + "name": "start_day_of_week", + "baseName": "start_day_of_week", + "type": "UpdateCalendarRequestStartDayOfWeekEnum", + "format": "" + }, + { + "name": "quarter_name_prefix", + "baseName": "quarter_name_prefix", + "type": "string", + "format": "" + }, + { + "name": "year_name_prefix", + "baseName": "year_name_prefix", + "type": "string", + "format": "" + } +]; +var UpdateCalendarRequest = _UpdateCalendarRequest; + +// models/UpdateCalendarRequestTableReference.ts +var _UpdateCalendarRequestTableReference = class _UpdateCalendarRequestTableReference { + static getAttributeTypeMap() { + return _UpdateCalendarRequestTableReference.attributeTypeMap; + } + constructor() { + } +}; +_UpdateCalendarRequestTableReference.discriminator = void 0; +_UpdateCalendarRequestTableReference.attributeTypeMap = [ + { + "name": "connection_identifier", + "baseName": "connection_identifier", + "type": "string", + "format": "" + }, + { + "name": "database_name", + "baseName": "database_name", + "type": "string", + "format": "" + }, + { + "name": "schema_name", + "baseName": "schema_name", + "type": "string", + "format": "" + }, + { + "name": "table_name", + "baseName": "table_name", + "type": "string", + "format": "" + } +]; +var UpdateCalendarRequestTableReference = _UpdateCalendarRequestTableReference; + +// models/UpdateCollectionRequest.ts +var _UpdateCollectionRequest = class _UpdateCollectionRequest { + static getAttributeTypeMap() { + return _UpdateCollectionRequest.attributeTypeMap; + } + constructor() { + } +}; +_UpdateCollectionRequest.discriminator = void 0; +_UpdateCollectionRequest.attributeTypeMap = [ + { + "name": "name", + "baseName": "name", + "type": "string", + "format": "" + }, + { + "name": "description", + "baseName": "description", + "type": "string", + "format": "" + }, + { + "name": "metadata", + "baseName": "metadata", + "type": "Array", + "format": "" + }, + { + "name": "operation", + "baseName": "operation", + "type": "UpdateCollectionRequestOperationEnum", + "format": "" + } +]; +var UpdateCollectionRequest = _UpdateCollectionRequest; + +// models/UpdateColumnSecurityRulesRequest.ts +var _UpdateColumnSecurityRulesRequest = class _UpdateColumnSecurityRulesRequest { + static getAttributeTypeMap() { + return _UpdateColumnSecurityRulesRequest.attributeTypeMap; + } + constructor() { + } +}; +_UpdateColumnSecurityRulesRequest.discriminator = void 0; +_UpdateColumnSecurityRulesRequest.attributeTypeMap = [ + { + "name": "identifier", + "baseName": "identifier", + "type": "string", + "format": "" + }, + { + "name": "obj_identifier", + "baseName": "obj_identifier", + "type": "string", + "format": "" + }, + { + "name": "clear_csr", + "baseName": "clear_csr", + "type": "boolean", + "format": "" + }, + { + "name": "column_security_rules", + "baseName": "column_security_rules", + "type": "Array", + "format": "" + } +]; +var UpdateColumnSecurityRulesRequest = _UpdateColumnSecurityRulesRequest; + +// models/UpdateConfigRequest.ts +var _UpdateConfigRequest = class _UpdateConfigRequest { + static getAttributeTypeMap() { + return _UpdateConfigRequest.attributeTypeMap; + } + constructor() { + } +}; +_UpdateConfigRequest.discriminator = void 0; +_UpdateConfigRequest.attributeTypeMap = [ + { + "name": "username", + "baseName": "username", + "type": "string", + "format": "" + }, + { + "name": "access_token", + "baseName": "access_token", + "type": "string", + "format": "" + }, + { + "name": "org_identifier", + "baseName": "org_identifier", + "type": "string", + "format": "" + }, + { + "name": "branch_names", + "baseName": "branch_names", + "type": "Array", + "format": "" + }, + { + "name": "commit_branch_name", + "baseName": "commit_branch_name", + "type": "string", + "format": "" + }, + { + "name": "enable_guid_mapping", + "baseName": "enable_guid_mapping", + "type": "boolean", + "format": "" + }, + { + "name": "configuration_branch_name", + "baseName": "configuration_branch_name", + "type": "string", + "format": "" + } +]; +var UpdateConfigRequest = _UpdateConfigRequest; + +// models/UpdateConnectionConfigurationRequest.ts +var _UpdateConnectionConfigurationRequest = class _UpdateConnectionConfigurationRequest { + static getAttributeTypeMap() { + return _UpdateConnectionConfigurationRequest.attributeTypeMap; + } + constructor() { + } +}; +_UpdateConnectionConfigurationRequest.discriminator = void 0; +_UpdateConnectionConfigurationRequest.attributeTypeMap = [ + { + "name": "connection_identifier", + "baseName": "connection_identifier", + "type": "string", + "format": "" + }, + { + "name": "name", + "baseName": "name", + "type": "string", + "format": "" + }, + { + "name": "description", + "baseName": "description", + "type": "string", + "format": "" + }, + { + "name": "same_as_parent", + "baseName": "same_as_parent", + "type": "boolean", + "format": "" + }, + { + "name": "policy_process_options", + "baseName": "policy_process_options", + "type": "CreateConnectionConfigurationRequestPolicyProcessOptions", + "format": "" + }, + { + "name": "authentication_type", + "baseName": "authentication_type", + "type": "UpdateConnectionConfigurationRequestAuthenticationTypeEnum", + "format": "" + }, + { + "name": "configuration", + "baseName": "configuration", + "type": "any", + "format": "" + }, + { + "name": "policy_type", + "baseName": "policy_type", + "type": "UpdateConnectionConfigurationRequestPolicyTypeEnum", + "format": "" + }, + { + "name": "policy_principals", + "baseName": "policy_principals", + "type": "Array", + "format": "" + }, + { + "name": "policy_processes", + "baseName": "policy_processes", + "type": "Array", + "format": "" + }, + { + "name": "disable", + "baseName": "disable", + "type": "boolean", + "format": "" + } +]; +var UpdateConnectionConfigurationRequest = _UpdateConnectionConfigurationRequest; + +// models/UpdateConnectionRequest.ts +var _UpdateConnectionRequest = class _UpdateConnectionRequest { + static getAttributeTypeMap() { + return _UpdateConnectionRequest.attributeTypeMap; + } + constructor() { + } +}; +_UpdateConnectionRequest.discriminator = void 0; +_UpdateConnectionRequest.attributeTypeMap = [ + { + "name": "connection_identifier", + "baseName": "connection_identifier", + "type": "string", + "format": "" + }, + { + "name": "name", + "baseName": "name", + "type": "string", + "format": "" + }, + { + "name": "description", + "baseName": "description", + "type": "string", + "format": "" + }, + { + "name": "data_warehouse_config", + "baseName": "data_warehouse_config", + "type": "any", + "format": "" + }, + { + "name": "validate", + "baseName": "validate", + "type": "boolean", + "format": "" + } +]; +var UpdateConnectionRequest = _UpdateConnectionRequest; + +// models/UpdateConnectionStatusRequest.ts +var _UpdateConnectionStatusRequest = class _UpdateConnectionStatusRequest { + static getAttributeTypeMap() { + return _UpdateConnectionStatusRequest.attributeTypeMap; + } + constructor() { + } +}; +_UpdateConnectionStatusRequest.discriminator = void 0; +_UpdateConnectionStatusRequest.attributeTypeMap = [ + { + "name": "status", + "baseName": "status", + "type": "UpdateConnectionStatusRequestStatusEnum", + "format": "" + } +]; +var UpdateConnectionStatusRequest = _UpdateConnectionStatusRequest; + +// models/UpdateConnectionV2Request.ts +var _UpdateConnectionV2Request = class _UpdateConnectionV2Request { + static getAttributeTypeMap() { + return _UpdateConnectionV2Request.attributeTypeMap; + } + constructor() { + } +}; +_UpdateConnectionV2Request.discriminator = void 0; +_UpdateConnectionV2Request.attributeTypeMap = [ + { + "name": "name", + "baseName": "name", + "type": "string", + "format": "" + }, + { + "name": "description", + "baseName": "description", + "type": "string", + "format": "" + }, + { + "name": "data_warehouse_config", + "baseName": "data_warehouse_config", + "type": "any", + "format": "" + }, + { + "name": "validate", + "baseName": "validate", + "type": "boolean", + "format": "" + } +]; +var UpdateConnectionV2Request = _UpdateConnectionV2Request; + +// models/UpdateCustomActionRequest.ts +var _UpdateCustomActionRequest = class _UpdateCustomActionRequest { + static getAttributeTypeMap() { + return _UpdateCustomActionRequest.attributeTypeMap; + } + constructor() { + } +}; +_UpdateCustomActionRequest.discriminator = void 0; +_UpdateCustomActionRequest.attributeTypeMap = [ + { + "name": "action_details", + "baseName": "action_details", + "type": "UpdateCustomActionRequestActionDetails", + "format": "" + }, + { + "name": "associate_metadata", + "baseName": "associate_metadata", + "type": "Array", + "format": "" + }, + { + "name": "default_action_config", + "baseName": "default_action_config", + "type": "UpdateCustomActionRequestDefaultActionConfig", + "format": "" + }, + { + "name": "group_identifiers", + "baseName": "group_identifiers", + "type": "Array", + "format": "" + }, + { + "name": "name", + "baseName": "name", + "type": "string", + "format": "" + }, + { + "name": "operation", + "baseName": "operation", + "type": "UpdateCustomActionRequestOperationEnum", + "format": "" + } +]; +var UpdateCustomActionRequest = _UpdateCustomActionRequest; + +// models/UpdateCustomActionRequestActionDetails.ts +var _UpdateCustomActionRequestActionDetails = class _UpdateCustomActionRequestActionDetails { + static getAttributeTypeMap() { + return _UpdateCustomActionRequestActionDetails.attributeTypeMap; + } + constructor() { + } +}; +_UpdateCustomActionRequestActionDetails.discriminator = void 0; +_UpdateCustomActionRequestActionDetails.attributeTypeMap = [ + { + "name": "CALLBACK", + "baseName": "CALLBACK", + "type": "CALLBACKInput", + "format": "" + }, + { + "name": "URL", + "baseName": "URL", + "type": "URLInput", + "format": "" + } +]; +var UpdateCustomActionRequestActionDetails = _UpdateCustomActionRequestActionDetails; + +// models/UpdateCustomActionRequestDefaultActionConfig.ts +var _UpdateCustomActionRequestDefaultActionConfig = class _UpdateCustomActionRequestDefaultActionConfig { + static getAttributeTypeMap() { + return _UpdateCustomActionRequestDefaultActionConfig.attributeTypeMap; + } + constructor() { + } +}; +_UpdateCustomActionRequestDefaultActionConfig.discriminator = void 0; +_UpdateCustomActionRequestDefaultActionConfig.attributeTypeMap = [ + { + "name": "visibility", + "baseName": "visibility", + "type": "boolean", + "format": "" + } +]; +var UpdateCustomActionRequestDefaultActionConfig = _UpdateCustomActionRequestDefaultActionConfig; + +// models/UpdateEmailCustomizationRequest.ts +var _UpdateEmailCustomizationRequest = class _UpdateEmailCustomizationRequest { + static getAttributeTypeMap() { + return _UpdateEmailCustomizationRequest.attributeTypeMap; + } + constructor() { + } +}; +_UpdateEmailCustomizationRequest.discriminator = void 0; +_UpdateEmailCustomizationRequest.attributeTypeMap = [ + { + "name": "template_properties", + "baseName": "template_properties", + "type": "CreateEmailCustomizationRequestTemplateProperties", + "format": "" + }, + { + "name": "org_identifier", + "baseName": "org_identifier", + "type": "string", + "format": "" + } +]; +var UpdateEmailCustomizationRequest = _UpdateEmailCustomizationRequest; + +// models/UpdateMetadataHeaderRequest.ts +var _UpdateMetadataHeaderRequest = class _UpdateMetadataHeaderRequest { + static getAttributeTypeMap() { + return _UpdateMetadataHeaderRequest.attributeTypeMap; + } + constructor() { + } +}; +_UpdateMetadataHeaderRequest.discriminator = void 0; +_UpdateMetadataHeaderRequest.attributeTypeMap = [ + { + "name": "headers_update", + "baseName": "headers_update", + "type": "Array", + "format": "" + }, + { + "name": "org_identifier", + "baseName": "org_identifier", + "type": "string", + "format": "" + } +]; +var UpdateMetadataHeaderRequest = _UpdateMetadataHeaderRequest; + +// models/UpdateMetadataObjIdRequest.ts +var _UpdateMetadataObjIdRequest = class _UpdateMetadataObjIdRequest { + static getAttributeTypeMap() { + return _UpdateMetadataObjIdRequest.attributeTypeMap; + } + constructor() { + } +}; +_UpdateMetadataObjIdRequest.discriminator = void 0; +_UpdateMetadataObjIdRequest.attributeTypeMap = [ + { + "name": "metadata", + "baseName": "metadata", + "type": "Array", + "format": "" + } +]; +var UpdateMetadataObjIdRequest = _UpdateMetadataObjIdRequest; + +// models/UpdateObjIdInput.ts +var _UpdateObjIdInput = class _UpdateObjIdInput { + static getAttributeTypeMap() { + return _UpdateObjIdInput.attributeTypeMap; + } + constructor() { + } +}; +_UpdateObjIdInput.discriminator = void 0; +_UpdateObjIdInput.attributeTypeMap = [ + { + "name": "metadata_identifier", + "baseName": "metadata_identifier", + "type": "string", + "format": "" + }, + { + "name": "type", + "baseName": "type", + "type": "UpdateObjIdInputTypeEnum", + "format": "" + }, + { + "name": "current_obj_id", + "baseName": "current_obj_id", + "type": "string", + "format": "" + }, + { + "name": "new_obj_id", + "baseName": "new_obj_id", + "type": "string", + "format": "" + } +]; +var UpdateObjIdInput = _UpdateObjIdInput; + +// models/UpdateOrgRequest.ts +var _UpdateOrgRequest = class _UpdateOrgRequest { + static getAttributeTypeMap() { + return _UpdateOrgRequest.attributeTypeMap; + } + constructor() { + } +}; +_UpdateOrgRequest.discriminator = void 0; +_UpdateOrgRequest.attributeTypeMap = [ + { + "name": "name", + "baseName": "name", + "type": "string", + "format": "" + }, + { + "name": "description", + "baseName": "description", + "type": "string", + "format": "" + }, + { + "name": "user_identifiers", + "baseName": "user_identifiers", + "type": "Array", + "format": "" + }, + { + "name": "group_identifiers", + "baseName": "group_identifiers", + "type": "Array", + "format": "" + }, + { + "name": "operation", + "baseName": "operation", + "type": "UpdateOrgRequestOperationEnum", + "format": "" + } +]; +var UpdateOrgRequest = _UpdateOrgRequest; + +// models/UpdateRoleRequest.ts +var _UpdateRoleRequest = class _UpdateRoleRequest { + static getAttributeTypeMap() { + return _UpdateRoleRequest.attributeTypeMap; + } + constructor() { + } +}; +_UpdateRoleRequest.discriminator = void 0; +_UpdateRoleRequest.attributeTypeMap = [ + { + "name": "name", + "baseName": "name", + "type": "string", + "format": "" + }, + { + "name": "description", + "baseName": "description", + "type": "string", + "format": "" + }, + { + "name": "privileges", + "baseName": "privileges", + "type": "Array", + "format": "" + } +]; +var UpdateRoleRequest = _UpdateRoleRequest; + +// models/UpdateScheduleRequest.ts +var _UpdateScheduleRequest = class _UpdateScheduleRequest { + static getAttributeTypeMap() { + return _UpdateScheduleRequest.attributeTypeMap; + } + constructor() { + } +}; +_UpdateScheduleRequest.discriminator = void 0; +_UpdateScheduleRequest.attributeTypeMap = [ + { + "name": "name", + "baseName": "name", + "type": "string", + "format": "" + }, + { + "name": "description", + "baseName": "description", + "type": "string", + "format": "" + }, + { + "name": "metadata_type", + "baseName": "metadata_type", + "type": "UpdateScheduleRequestMetadataTypeEnum", + "format": "" + }, + { + "name": "metadata_identifier", + "baseName": "metadata_identifier", + "type": "string", + "format": "" + }, + { + "name": "file_format", + "baseName": "file_format", + "type": "UpdateScheduleRequestFileFormatEnum", + "format": "" + }, + { + "name": "liveboard_options", + "baseName": "liveboard_options", + "type": "UpdateScheduleRequestLiveboardOptions", + "format": "" + }, + { + "name": "pdf_options", + "baseName": "pdf_options", + "type": "UpdateScheduleRequestPdfOptions", + "format": "" + }, + { + "name": "time_zone", + "baseName": "time_zone", + "type": "UpdateScheduleRequestTimeZoneEnum", + "format": "" + }, + { + "name": "frequency", + "baseName": "frequency", + "type": "UpdateScheduleRequestFrequency", + "format": "" + }, + { + "name": "recipient_details", + "baseName": "recipient_details", + "type": "UpdateScheduleRequestRecipientDetails", + "format": "" + }, + { + "name": "status", + "baseName": "status", + "type": "UpdateScheduleRequestStatusEnum", + "format": "" + }, + { + "name": "personalised_view_id", + "baseName": "personalised_view_id", + "type": "string", + "format": "" + } +]; +var UpdateScheduleRequest = _UpdateScheduleRequest; + +// models/UpdateScheduleRequestFrequency.ts +var _UpdateScheduleRequestFrequency = class _UpdateScheduleRequestFrequency { + static getAttributeTypeMap() { + return _UpdateScheduleRequestFrequency.attributeTypeMap; + } + constructor() { + } +}; +_UpdateScheduleRequestFrequency.discriminator = void 0; +_UpdateScheduleRequestFrequency.attributeTypeMap = [ + { + "name": "cron_expression", + "baseName": "cron_expression", + "type": "CronExpressionInput", + "format": "" + } +]; +var UpdateScheduleRequestFrequency = _UpdateScheduleRequestFrequency; + +// models/UpdateScheduleRequestLiveboardOptions.ts +var _UpdateScheduleRequestLiveboardOptions = class _UpdateScheduleRequestLiveboardOptions { + static getAttributeTypeMap() { + return _UpdateScheduleRequestLiveboardOptions.attributeTypeMap; + } + constructor() { + } +}; +_UpdateScheduleRequestLiveboardOptions.discriminator = void 0; +_UpdateScheduleRequestLiveboardOptions.attributeTypeMap = [ + { + "name": "visualization_identifiers", + "baseName": "visualization_identifiers", + "type": "Array", + "format": "" + } +]; +var UpdateScheduleRequestLiveboardOptions = _UpdateScheduleRequestLiveboardOptions; + +// models/UpdateScheduleRequestPdfOptions.ts +var _UpdateScheduleRequestPdfOptions = class _UpdateScheduleRequestPdfOptions { + static getAttributeTypeMap() { + return _UpdateScheduleRequestPdfOptions.attributeTypeMap; + } + constructor() { + } +}; +_UpdateScheduleRequestPdfOptions.discriminator = void 0; +_UpdateScheduleRequestPdfOptions.attributeTypeMap = [ + { + "name": "complete_liveboard", + "baseName": "complete_liveboard", + "type": "boolean", + "format": "" + }, + { + "name": "include_cover_page", + "baseName": "include_cover_page", + "type": "boolean", + "format": "" + }, + { + "name": "include_custom_logo", + "baseName": "include_custom_logo", + "type": "boolean", + "format": "" + }, + { + "name": "include_filter_page", + "baseName": "include_filter_page", + "type": "boolean", + "format": "" + }, + { + "name": "include_page_number", + "baseName": "include_page_number", + "type": "boolean", + "format": "" + }, + { + "name": "page_footer_text", + "baseName": "page_footer_text", + "type": "string", + "format": "" + }, + { + "name": "page_orientation", + "baseName": "page_orientation", + "type": "string", + "format": "" + }, + { + "name": "page_size", + "baseName": "page_size", + "type": "UpdateScheduleRequestPdfOptionsPageSizeEnum", + "format": "" + }, + { + "name": "truncate_table", + "baseName": "truncate_table", + "type": "boolean", + "format": "" + } +]; +var UpdateScheduleRequestPdfOptions = _UpdateScheduleRequestPdfOptions; + +// models/UpdateScheduleRequestRecipientDetails.ts +var _UpdateScheduleRequestRecipientDetails = class _UpdateScheduleRequestRecipientDetails { + static getAttributeTypeMap() { + return _UpdateScheduleRequestRecipientDetails.attributeTypeMap; + } + constructor() { + } +}; +_UpdateScheduleRequestRecipientDetails.discriminator = void 0; +_UpdateScheduleRequestRecipientDetails.attributeTypeMap = [ + { + "name": "emails", + "baseName": "emails", + "type": "Array", + "format": "" + }, + { + "name": "principals", + "baseName": "principals", + "type": "Array", + "format": "" + } +]; +var UpdateScheduleRequestRecipientDetails = _UpdateScheduleRequestRecipientDetails; + +// models/UpdateSystemConfigRequest.ts +var _UpdateSystemConfigRequest = class _UpdateSystemConfigRequest { + static getAttributeTypeMap() { + return _UpdateSystemConfigRequest.attributeTypeMap; + } + constructor() { + } +}; +_UpdateSystemConfigRequest.discriminator = void 0; +_UpdateSystemConfigRequest.attributeTypeMap = [ + { + "name": "configuration", + "baseName": "configuration", + "type": "any", + "format": "" + } +]; +var UpdateSystemConfigRequest = _UpdateSystemConfigRequest; + +// models/UpdateTagRequest.ts +var _UpdateTagRequest = class _UpdateTagRequest { + static getAttributeTypeMap() { + return _UpdateTagRequest.attributeTypeMap; + } + constructor() { + } +}; +_UpdateTagRequest.discriminator = void 0; +_UpdateTagRequest.attributeTypeMap = [ + { + "name": "name", + "baseName": "name", + "type": "string", + "format": "" + }, + { + "name": "color", + "baseName": "color", + "type": "string", + "format": "" + } +]; +var UpdateTagRequest = _UpdateTagRequest; + +// models/UpdateUserGroupRequest.ts +var _UpdateUserGroupRequest = class _UpdateUserGroupRequest { + static getAttributeTypeMap() { + return _UpdateUserGroupRequest.attributeTypeMap; + } + constructor() { + } +}; +_UpdateUserGroupRequest.discriminator = void 0; +_UpdateUserGroupRequest.attributeTypeMap = [ + { + "name": "name", + "baseName": "name", + "type": "string", + "format": "" + }, + { + "name": "default_liveboard_identifiers", + "baseName": "default_liveboard_identifiers", + "type": "Array", + "format": "" + }, + { + "name": "description", + "baseName": "description", + "type": "string", + "format": "" + }, + { + "name": "display_name", + "baseName": "display_name", + "type": "string", + "format": "" + }, + { + "name": "privileges", + "baseName": "privileges", + "type": "Array", + "format": "" + }, + { + "name": "sub_group_identifiers", + "baseName": "sub_group_identifiers", + "type": "Array", + "format": "" + }, + { + "name": "type", + "baseName": "type", + "type": "UpdateUserGroupRequestTypeEnum", + "format": "" + }, + { + "name": "user_identifiers", + "baseName": "user_identifiers", + "type": "Array", + "format": "" + }, + { + "name": "visibility", + "baseName": "visibility", + "type": "UpdateUserGroupRequestVisibilityEnum", + "format": "" + }, + { + "name": "role_identifiers", + "baseName": "role_identifiers", + "type": "Array", + "format": "" + }, + { + "name": "operation", + "baseName": "operation", + "type": "UpdateUserGroupRequestOperationEnum", + "format": "" + } +]; +var UpdateUserGroupRequest = _UpdateUserGroupRequest; + +// models/UpdateUserRequest.ts +var _UpdateUserRequest = class _UpdateUserRequest { + static getAttributeTypeMap() { + return _UpdateUserRequest.attributeTypeMap; + } + constructor() { + } +}; +_UpdateUserRequest.discriminator = void 0; +_UpdateUserRequest.attributeTypeMap = [ + { + "name": "name", + "baseName": "name", + "type": "string", + "format": "" + }, + { + "name": "display_name", + "baseName": "display_name", + "type": "string", + "format": "" + }, + { + "name": "visibility", + "baseName": "visibility", + "type": "UpdateUserRequestVisibilityEnum", + "format": "" + }, + { + "name": "email", + "baseName": "email", + "type": "string", + "format": "" + }, + { + "name": "account_status", + "baseName": "account_status", + "type": "UpdateUserRequestAccountStatusEnum", + "format": "" + }, + { + "name": "notify_on_share", + "baseName": "notify_on_share", + "type": "boolean", + "format": "" + }, + { + "name": "show_onboarding_experience", + "baseName": "show_onboarding_experience", + "type": "boolean", + "format": "" + }, + { + "name": "onboarding_experience_completed", + "baseName": "onboarding_experience_completed", + "type": "boolean", + "format": "" + }, + { + "name": "account_type", + "baseName": "account_type", + "type": "UpdateUserRequestAccountTypeEnum", + "format": "" + }, + { + "name": "group_identifiers", + "baseName": "group_identifiers", + "type": "Array", + "format": "" + }, + { + "name": "home_liveboard_identifier", + "baseName": "home_liveboard_identifier", + "type": "string", + "format": "" + }, + { + "name": "favorite_metadata", + "baseName": "favorite_metadata", + "type": "Array", + "format": "" + }, + { + "name": "org_identifiers", + "baseName": "org_identifiers", + "type": "Array", + "format": "" + }, + { + "name": "operation", + "baseName": "operation", + "type": "UpdateUserRequestOperationEnum", + "format": "" + }, + { + "name": "preferred_locale", + "baseName": "preferred_locale", + "type": "UpdateUserRequestPreferredLocaleEnum", + "format": "" + }, + { + "name": "use_browser_language", + "baseName": "use_browser_language", + "type": "boolean", + "format": "" + }, + { + "name": "extended_properties", + "baseName": "extended_properties", + "type": "any", + "format": "" + }, + { + "name": "extended_preferences", + "baseName": "extended_preferences", + "type": "any", + "format": "" + } +]; +var UpdateUserRequest = _UpdateUserRequest; + +// models/UpdateVariableRequest.ts +var _UpdateVariableRequest = class _UpdateVariableRequest { + static getAttributeTypeMap() { + return _UpdateVariableRequest.attributeTypeMap; + } + constructor() { + } +}; +_UpdateVariableRequest.discriminator = void 0; +_UpdateVariableRequest.attributeTypeMap = [ + { + "name": "name", + "baseName": "name", + "type": "string", + "format": "" + } +]; +var UpdateVariableRequest = _UpdateVariableRequest; + +// models/UpdateVariableValuesRequest.ts +var _UpdateVariableValuesRequest = class _UpdateVariableValuesRequest { + static getAttributeTypeMap() { + return _UpdateVariableValuesRequest.attributeTypeMap; + } + constructor() { + } +}; +_UpdateVariableValuesRequest.discriminator = void 0; +_UpdateVariableValuesRequest.attributeTypeMap = [ + { + "name": "variable_assignment", + "baseName": "variable_assignment", + "type": "Array", + "format": "" + }, + { + "name": "variable_value_scope", + "baseName": "variable_value_scope", + "type": "Array", + "format": "" + } +]; +var UpdateVariableValuesRequest = _UpdateVariableValuesRequest; + +// models/UpdateWebhookConfigurationRequest.ts +var _UpdateWebhookConfigurationRequest = class _UpdateWebhookConfigurationRequest { + static getAttributeTypeMap() { + return _UpdateWebhookConfigurationRequest.attributeTypeMap; + } + constructor() { + } +}; +_UpdateWebhookConfigurationRequest.discriminator = void 0; +_UpdateWebhookConfigurationRequest.attributeTypeMap = [ + { + "name": "name", + "baseName": "name", + "type": "string", + "format": "" + }, + { + "name": "description", + "baseName": "description", + "type": "string", + "format": "" + }, + { + "name": "url", + "baseName": "url", + "type": "string", + "format": "" + }, + { + "name": "url_params", + "baseName": "url_params", + "type": "any", + "format": "" + }, + { + "name": "events", + "baseName": "events", + "type": "Array", + "format": "" + }, + { + "name": "authentication", + "baseName": "authentication", + "type": "CreateWebhookConfigurationRequestAuthentication", + "format": "" + }, + { + "name": "signature_verification", + "baseName": "signature_verification", + "type": "CreateWebhookConfigurationRequestSignatureVerification", + "format": "" + }, + { + "name": "storage_destination", + "baseName": "storage_destination", + "type": "CreateWebhookConfigurationRequestStorageDestination", + "format": "" + }, + { + "name": "additional_headers", + "baseName": "additional_headers", + "type": "Array", + "format": "" + } +]; +var UpdateWebhookConfigurationRequest = _UpdateWebhookConfigurationRequest; + +// models/User.ts +var _User = class _User { + static getAttributeTypeMap() { + return _User.attributeTypeMap; + } + constructor() { + } +}; +_User.discriminator = void 0; +_User.attributeTypeMap = [ + { + "name": "id", + "baseName": "id", + "type": "string", + "format": "" + }, + { + "name": "name", + "baseName": "name", + "type": "string", + "format": "" + }, + { + "name": "display_name", + "baseName": "display_name", + "type": "string", + "format": "" + }, + { + "name": "visibility", + "baseName": "visibility", + "type": "UserVisibilityEnum", + "format": "" + }, + { + "name": "author_id", + "baseName": "author_id", + "type": "string", + "format": "" + }, + { + "name": "can_change_password", + "baseName": "can_change_password", + "type": "boolean", + "format": "" + }, + { + "name": "complete_detail", + "baseName": "complete_detail", + "type": "boolean", + "format": "" + }, + { + "name": "creation_time_in_millis", + "baseName": "creation_time_in_millis", + "type": "number", + "format": "float" + }, + { + "name": "current_org", + "baseName": "current_org", + "type": "Org", + "format": "" + }, + { + "name": "deleted", + "baseName": "deleted", + "type": "boolean", + "format": "" + }, + { + "name": "deprecated", + "baseName": "deprecated", + "type": "boolean", + "format": "" + }, + { + "name": "account_type", + "baseName": "account_type", + "type": "UserAccountTypeEnum", + "format": "" + }, + { + "name": "account_status", + "baseName": "account_status", + "type": "UserAccountStatusEnum", + "format": "" + }, + { + "name": "email", + "baseName": "email", + "type": "string", + "format": "" + }, + { + "name": "expiration_time_in_millis", + "baseName": "expiration_time_in_millis", + "type": "number", + "format": "float" + }, + { + "name": "external", + "baseName": "external", + "type": "boolean", + "format": "" + }, + { + "name": "favorite_metadata", + "baseName": "favorite_metadata", + "type": "Array", + "format": "" + }, + { + "name": "first_login_time_in_millis", + "baseName": "first_login_time_in_millis", + "type": "number", + "format": "float" + }, + { + "name": "group_mask", + "baseName": "group_mask", + "type": "number", + "format": "int32" + }, + { + "name": "hidden", + "baseName": "hidden", + "type": "boolean", + "format": "" + }, + { + "name": "home_liveboard", + "baseName": "home_liveboard", + "type": "ObjectIDAndName", + "format": "" + }, + { + "name": "incomplete_details", + "baseName": "incomplete_details", + "type": "any", + "format": "" + }, + { + "name": "is_first_login", + "baseName": "is_first_login", + "type": "boolean", + "format": "" + }, + { + "name": "modification_time_in_millis", + "baseName": "modification_time_in_millis", + "type": "number", + "format": "float" + }, + { + "name": "modifier_id", + "baseName": "modifier_id", + "type": "string", + "format": "" + }, + { + "name": "notify_on_share", + "baseName": "notify_on_share", + "type": "boolean", + "format": "" + }, + { + "name": "onboarding_experience_completed", + "baseName": "onboarding_experience_completed", + "type": "boolean", + "format": "" + }, + { + "name": "orgs", + "baseName": "orgs", + "type": "Array", + "format": "" + }, + { + "name": "owner_id", + "baseName": "owner_id", + "type": "string", + "format": "" + }, + { + "name": "parent_type", + "baseName": "parent_type", + "type": "UserParentTypeEnum", + "format": "" + }, + { + "name": "privileges", + "baseName": "privileges", + "type": "Array", + "format": "" + }, + { + "name": "show_onboarding_experience", + "baseName": "show_onboarding_experience", + "type": "boolean", + "format": "" + }, + { + "name": "super_user", + "baseName": "super_user", + "type": "boolean", + "format": "" + }, + { + "name": "system_user", + "baseName": "system_user", + "type": "boolean", + "format": "" + }, + { + "name": "tags", + "baseName": "tags", + "type": "Array", + "format": "" + }, + { + "name": "tenant_id", + "baseName": "tenant_id", + "type": "string", + "format": "" + }, + { + "name": "user_groups", + "baseName": "user_groups", + "type": "Array", + "format": "" + }, + { + "name": "user_inherited_groups", + "baseName": "user_inherited_groups", + "type": "Array", + "format": "" + }, + { + "name": "welcome_email_sent", + "baseName": "welcome_email_sent", + "type": "boolean", + "format": "" + }, + { + "name": "org_privileges", + "baseName": "org_privileges", + "type": "any", + "format": "" + }, + { + "name": "preferred_locale", + "baseName": "preferred_locale", + "type": "string", + "format": "" + }, + { + "name": "use_browser_language", + "baseName": "use_browser_language", + "type": "boolean", + "format": "" + }, + { + "name": "extended_properties", + "baseName": "extended_properties", + "type": "any", + "format": "" + }, + { + "name": "extended_preferences", + "baseName": "extended_preferences", + "type": "any", + "format": "" + }, + { + "name": "user_parameters", + "baseName": "user_parameters", + "type": "any", + "format": "" + }, + { + "name": "access_control_properties", + "baseName": "access_control_properties", + "type": "any", + "format": "" + }, + { + "name": "variable_values", + "baseName": "variable_values", + "type": "any", + "format": "" + } +]; +var User = _User; + +// models/UserGroup.ts +var _UserGroup = class _UserGroup { + static getAttributeTypeMap() { + return _UserGroup.attributeTypeMap; + } + constructor() { + } +}; +_UserGroup.discriminator = void 0; +_UserGroup.attributeTypeMap = [ + { + "name": "id", + "baseName": "id", + "type": "string", + "format": "" + }, + { + "name": "name", + "baseName": "name", + "type": "string", + "format": "" + } +]; +var UserGroup = _UserGroup; + +// models/UserGroupResponse.ts +var _UserGroupResponse = class _UserGroupResponse { + static getAttributeTypeMap() { + return _UserGroupResponse.attributeTypeMap; + } + constructor() { + } +}; +_UserGroupResponse.discriminator = void 0; +_UserGroupResponse.attributeTypeMap = [ + { + "name": "author_id", + "baseName": "author_id", + "type": "string", + "format": "" + }, + { + "name": "complete_detail", + "baseName": "complete_detail", + "type": "boolean", + "format": "" + }, + { + "name": "content", + "baseName": "content", + "type": "any", + "format": "" + }, + { + "name": "creation_time_in_millis", + "baseName": "creation_time_in_millis", + "type": "number", + "format": "float" + }, + { + "name": "default_liveboards", + "baseName": "default_liveboards", + "type": "Array", + "format": "" + }, + { + "name": "deleted", + "baseName": "deleted", + "type": "boolean", + "format": "" + }, + { + "name": "deprecated", + "baseName": "deprecated", + "type": "boolean", + "format": "" + }, + { + "name": "description", + "baseName": "description", + "type": "string", + "format": "" + }, + { + "name": "display_name", + "baseName": "display_name", + "type": "string", + "format": "" + }, + { + "name": "external", + "baseName": "external", + "type": "boolean", + "format": "" + }, + { + "name": "generation_number", + "baseName": "generation_number", + "type": "number", + "format": "int32" + }, + { + "name": "hidden", + "baseName": "hidden", + "type": "boolean", + "format": "" + }, + { + "name": "id", + "baseName": "id", + "type": "string", + "format": "" + }, + { + "name": "index", + "baseName": "index", + "type": "number", + "format": "int32" + }, + { + "name": "index_version", + "baseName": "index_version", + "type": "number", + "format": "int32" + }, + { + "name": "metadata_version", + "baseName": "metadata_version", + "type": "number", + "format": "int32" + }, + { + "name": "modification_time_in_millis", + "baseName": "modification_time_in_millis", + "type": "number", + "format": "float" + }, + { + "name": "modifier_id", + "baseName": "modifier_id", + "type": "string", + "format": "" + }, + { + "name": "name", + "baseName": "name", + "type": "string", + "format": "" + }, + { + "name": "orgs", + "baseName": "orgs", + "type": "Array", + "format": "" + }, + { + "name": "owner_id", + "baseName": "owner_id", + "type": "string", + "format": "" + }, + { + "name": "parent_type", + "baseName": "parent_type", + "type": "UserGroupResponseParentTypeEnum", + "format": "" + }, + { + "name": "privileges", + "baseName": "privileges", + "type": "Array", + "format": "" + }, + { + "name": "sub_groups", + "baseName": "sub_groups", + "type": "Array", + "format": "" + }, + { + "name": "system_group", + "baseName": "system_group", + "type": "boolean", + "format": "" + }, + { + "name": "tags", + "baseName": "tags", + "type": "Array", + "format": "" + }, + { + "name": "type", + "baseName": "type", + "type": "UserGroupResponseTypeEnum", + "format": "" + }, + { + "name": "users", + "baseName": "users", + "type": "Array", + "format": "" + }, + { + "name": "visibility", + "baseName": "visibility", + "type": "UserGroupResponseVisibilityEnum", + "format": "" + }, + { + "name": "roles", + "baseName": "roles", + "type": "Array", + "format": "" + } +]; +var UserGroupResponse = _UserGroupResponse; + +// models/UserInfo.ts +var _UserInfo = class _UserInfo { + static getAttributeTypeMap() { + return _UserInfo.attributeTypeMap; + } + constructor() { + } +}; +_UserInfo.discriminator = void 0; +_UserInfo.attributeTypeMap = [ + { + "name": "id", + "baseName": "id", + "type": "string", + "format": "" + }, + { + "name": "name", + "baseName": "name", + "type": "string", + "format": "" + } +]; +var UserInfo = _UserInfo; + +// models/UserObject.ts +var _UserObject = class _UserObject { + static getAttributeTypeMap() { + return _UserObject.attributeTypeMap; + } + constructor() { + } +}; +_UserObject.discriminator = void 0; +_UserObject.attributeTypeMap = [ + { + "name": "type", + "baseName": "type", + "type": "UserObjectTypeEnum", + "format": "" + }, + { + "name": "identifier", + "baseName": "identifier", + "type": "string", + "format": "" + } +]; +var UserObject = _UserObject; + +// models/UserParameterOptions.ts +var _UserParameterOptions = class _UserParameterOptions { + static getAttributeTypeMap() { + return _UserParameterOptions.attributeTypeMap; + } + constructor() { + } +}; +_UserParameterOptions.discriminator = void 0; +_UserParameterOptions.attributeTypeMap = [ + { + "name": "objects", + "baseName": "objects", + "type": "Array", + "format": "" + }, + { + "name": "runtime_filters", + "baseName": "runtime_filters", + "type": "Array", + "format": "" + }, + { + "name": "runtime_sorts", + "baseName": "runtime_sorts", + "type": "Array", + "format": "" + }, + { + "name": "parameters", + "baseName": "parameters", + "type": "Array", + "format": "" + } +]; +var UserParameterOptions = _UserParameterOptions; + +// models/UserPrincipal.ts +var _UserPrincipal = class _UserPrincipal { + static getAttributeTypeMap() { + return _UserPrincipal.attributeTypeMap; + } + constructor() { + } +}; +_UserPrincipal.discriminator = void 0; +_UserPrincipal.attributeTypeMap = [ + { + "name": "id", + "baseName": "id", + "type": "string", + "format": "" + }, + { + "name": "name", + "baseName": "name", + "type": "string", + "format": "" + }, + { + "name": "type", + "baseName": "type", + "type": "string", + "format": "" + } +]; +var UserPrincipal = _UserPrincipal; + +// models/ValidateCommunicationChannelRequest.ts +var _ValidateCommunicationChannelRequest = class _ValidateCommunicationChannelRequest { + static getAttributeTypeMap() { + return _ValidateCommunicationChannelRequest.attributeTypeMap; + } + constructor() { + } +}; +_ValidateCommunicationChannelRequest.discriminator = void 0; +_ValidateCommunicationChannelRequest.attributeTypeMap = [ + { + "name": "channel_type", + "baseName": "channel_type", + "type": "ValidateCommunicationChannelRequestChannelTypeEnum", + "format": "" + }, + { + "name": "channel_identifier", + "baseName": "channel_identifier", + "type": "string", + "format": "" + }, + { + "name": "event_type", + "baseName": "event_type", + "type": "ValidateCommunicationChannelRequestEventTypeEnum", + "format": "" + } +]; +var ValidateCommunicationChannelRequest = _ValidateCommunicationChannelRequest; + +// models/ValidateMergeRequest.ts +var _ValidateMergeRequest = class _ValidateMergeRequest { + static getAttributeTypeMap() { + return _ValidateMergeRequest.attributeTypeMap; + } + constructor() { + } +}; +_ValidateMergeRequest.discriminator = void 0; +_ValidateMergeRequest.attributeTypeMap = [ + { + "name": "source_branch_name", + "baseName": "source_branch_name", + "type": "string", + "format": "" + }, + { + "name": "target_branch_name", + "baseName": "target_branch_name", + "type": "string", + "format": "" + } +]; +var ValidateMergeRequest = _ValidateMergeRequest; + +// models/ValidateTokenRequest.ts +var _ValidateTokenRequest = class _ValidateTokenRequest { + static getAttributeTypeMap() { + return _ValidateTokenRequest.attributeTypeMap; + } + constructor() { + } +}; +_ValidateTokenRequest.discriminator = void 0; +_ValidateTokenRequest.attributeTypeMap = [ + { + "name": "token", + "baseName": "token", + "type": "string", + "format": "" + } +]; +var ValidateTokenRequest = _ValidateTokenRequest; + +// models/ValueScopeInput.ts +var _ValueScopeInput = class _ValueScopeInput { + static getAttributeTypeMap() { + return _ValueScopeInput.attributeTypeMap; + } + constructor() { + } +}; +_ValueScopeInput.discriminator = void 0; +_ValueScopeInput.attributeTypeMap = [ + { + "name": "org_identifier", + "baseName": "org_identifier", + "type": "string", + "format": "" + }, + { + "name": "principal_type", + "baseName": "principal_type", + "type": "ValueScopeInputPrincipalTypeEnum", + "format": "" + }, + { + "name": "principal_identifier", + "baseName": "principal_identifier", + "type": "string", + "format": "" + }, + { + "name": "model_identifier", + "baseName": "model_identifier", + "type": "string", + "format": "" + } +]; +var ValueScopeInput = _ValueScopeInput; + +// models/Variable.ts +var _Variable = class _Variable { + static getAttributeTypeMap() { + return _Variable.attributeTypeMap; + } + constructor() { + } +}; +_Variable.discriminator = void 0; +_Variable.attributeTypeMap = [ + { + "name": "id", + "baseName": "id", + "type": "string", + "format": "" + }, + { + "name": "name", + "baseName": "name", + "type": "string", + "format": "" + }, + { + "name": "variable_type", + "baseName": "variable_type", + "type": "VariableVariableTypeEnum", + "format": "" + }, + { + "name": "sensitive", + "baseName": "sensitive", + "type": "boolean", + "format": "" + }, + { + "name": "values", + "baseName": "values", + "type": "Array", + "format": "" + }, + { + "name": "org", + "baseName": "org", + "type": "VariableOrgInfo", + "format": "" + } +]; +var Variable = _Variable; + +// models/VariableDetailInput.ts +var _VariableDetailInput = class _VariableDetailInput { + static getAttributeTypeMap() { + return _VariableDetailInput.attributeTypeMap; + } + constructor() { + } +}; +_VariableDetailInput.discriminator = void 0; +_VariableDetailInput.attributeTypeMap = [ + { + "name": "identifier", + "baseName": "identifier", + "type": "string", + "format": "" + }, + { + "name": "type", + "baseName": "type", + "type": "VariableDetailInputTypeEnum", + "format": "" + }, + { + "name": "name_pattern", + "baseName": "name_pattern", + "type": "string", + "format": "" + } +]; +var VariableDetailInput = _VariableDetailInput; + +// models/VariableOrgInfo.ts +var _VariableOrgInfo = class _VariableOrgInfo { + static getAttributeTypeMap() { + return _VariableOrgInfo.attributeTypeMap; + } + constructor() { + } +}; +_VariableOrgInfo.discriminator = void 0; +_VariableOrgInfo.attributeTypeMap = [ + { + "name": "id", + "baseName": "id", + "type": "number", + "format": "int32" + }, + { + "name": "name", + "baseName": "name", + "type": "string", + "format": "" + } +]; +var VariableOrgInfo = _VariableOrgInfo; + +// models/VariablePutAssignmentInput.ts +var _VariablePutAssignmentInput = class _VariablePutAssignmentInput { + static getAttributeTypeMap() { + return _VariablePutAssignmentInput.attributeTypeMap; + } + constructor() { + } +}; +_VariablePutAssignmentInput.discriminator = void 0; +_VariablePutAssignmentInput.attributeTypeMap = [ + { + "name": "assigned_values", + "baseName": "assigned_values", + "type": "Array", + "format": "" + }, + { + "name": "org_identifier", + "baseName": "org_identifier", + "type": "string", + "format": "" + }, + { + "name": "principal_type", + "baseName": "principal_type", + "type": "VariablePutAssignmentInputPrincipalTypeEnum", + "format": "" + }, + { + "name": "principal_identifier", + "baseName": "principal_identifier", + "type": "string", + "format": "" + }, + { + "name": "model_identifier", + "baseName": "model_identifier", + "type": "string", + "format": "" + }, + { + "name": "priority", + "baseName": "priority", + "type": "number", + "format": "int32" + } +]; +var VariablePutAssignmentInput = _VariablePutAssignmentInput; + +// models/VariableUpdateAssignmentInput.ts +var _VariableUpdateAssignmentInput = class _VariableUpdateAssignmentInput { + static getAttributeTypeMap() { + return _VariableUpdateAssignmentInput.attributeTypeMap; + } + constructor() { + } +}; +_VariableUpdateAssignmentInput.discriminator = void 0; +_VariableUpdateAssignmentInput.attributeTypeMap = [ + { + "name": "variable_identifier", + "baseName": "variable_identifier", + "type": "string", + "format": "" + }, + { + "name": "variable_values", + "baseName": "variable_values", + "type": "Array", + "format": "" + }, + { + "name": "operation", + "baseName": "operation", + "type": "VariableUpdateAssignmentInputOperationEnum", + "format": "" + } +]; +var VariableUpdateAssignmentInput = _VariableUpdateAssignmentInput; + +// models/VariableUpdateScopeInput.ts +var _VariableUpdateScopeInput = class _VariableUpdateScopeInput { + static getAttributeTypeMap() { + return _VariableUpdateScopeInput.attributeTypeMap; + } + constructor() { + } +}; +_VariableUpdateScopeInput.discriminator = void 0; +_VariableUpdateScopeInput.attributeTypeMap = [ + { + "name": "org_identifier", + "baseName": "org_identifier", + "type": "string", + "format": "" + }, + { + "name": "principal_type", + "baseName": "principal_type", + "type": "VariableUpdateScopeInputPrincipalTypeEnum", + "format": "" + }, + { + "name": "principal_identifier", + "baseName": "principal_identifier", + "type": "string", + "format": "" + }, + { + "name": "model_identifier", + "baseName": "model_identifier", + "type": "string", + "format": "" + }, + { + "name": "priority", + "baseName": "priority", + "type": "number", + "format": "int32" + } +]; +var VariableUpdateScopeInput = _VariableUpdateScopeInput; + +// models/VariableValue.ts +var _VariableValue = class _VariableValue { + static getAttributeTypeMap() { + return _VariableValue.attributeTypeMap; + } + constructor() { + } +}; +_VariableValue.discriminator = void 0; +_VariableValue.attributeTypeMap = [ + { + "name": "value", + "baseName": "value", + "type": "string", + "format": "" + }, + { + "name": "value_list", + "baseName": "value_list", + "type": "Array", + "format": "" + }, + { + "name": "org_identifier", + "baseName": "org_identifier", + "type": "string", + "format": "" + }, + { + "name": "principal_type", + "baseName": "principal_type", + "type": "VariableValuePrincipalTypeEnum", + "format": "" + }, + { + "name": "principal_identifier", + "baseName": "principal_identifier", + "type": "string", + "format": "" + }, + { + "name": "model_identifier", + "baseName": "model_identifier", + "type": "string", + "format": "" + }, + { + "name": "priority", + "baseName": "priority", + "type": "number", + "format": "int32" + } +]; +var VariableValue = _VariableValue; + +// models/VariableValues.ts +var _VariableValues = class _VariableValues { + static getAttributeTypeMap() { + return _VariableValues.attributeTypeMap; + } + constructor() { + } +}; +_VariableValues.discriminator = void 0; +_VariableValues.attributeTypeMap = [ + { + "name": "name", + "baseName": "name", + "type": "string", + "format": "" + }, + { + "name": "values", + "baseName": "values", + "type": "Array", + "format": "" + } +]; +var VariableValues = _VariableValues; + +// models/WebhookAuthApiKey.ts +var _WebhookAuthApiKey = class _WebhookAuthApiKey { + static getAttributeTypeMap() { + return _WebhookAuthApiKey.attributeTypeMap; + } + constructor() { + } +}; +_WebhookAuthApiKey.discriminator = void 0; +_WebhookAuthApiKey.attributeTypeMap = [ + { + "name": "key", + "baseName": "key", + "type": "string", + "format": "" + }, + { + "name": "value", + "baseName": "value", + "type": "string", + "format": "" + } +]; +var WebhookAuthApiKey = _WebhookAuthApiKey; + +// models/WebhookAuthApiKeyInput.ts +var _WebhookAuthApiKeyInput = class _WebhookAuthApiKeyInput { + static getAttributeTypeMap() { + return _WebhookAuthApiKeyInput.attributeTypeMap; + } + constructor() { + } +}; +_WebhookAuthApiKeyInput.discriminator = void 0; +_WebhookAuthApiKeyInput.attributeTypeMap = [ + { + "name": "key", + "baseName": "key", + "type": "string", + "format": "" + }, + { + "name": "value", + "baseName": "value", + "type": "string", + "format": "" + } +]; +var WebhookAuthApiKeyInput = _WebhookAuthApiKeyInput; + +// models/WebhookAuthBasicAuth.ts +var _WebhookAuthBasicAuth = class _WebhookAuthBasicAuth { + static getAttributeTypeMap() { + return _WebhookAuthBasicAuth.attributeTypeMap; + } + constructor() { + } +}; +_WebhookAuthBasicAuth.discriminator = void 0; +_WebhookAuthBasicAuth.attributeTypeMap = [ + { + "name": "username", + "baseName": "username", + "type": "string", + "format": "" + }, + { + "name": "password", + "baseName": "password", + "type": "string", + "format": "" + } +]; +var WebhookAuthBasicAuth = _WebhookAuthBasicAuth; + +// models/WebhookAuthBasicAuthInput.ts +var _WebhookAuthBasicAuthInput = class _WebhookAuthBasicAuthInput { + static getAttributeTypeMap() { + return _WebhookAuthBasicAuthInput.attributeTypeMap; + } + constructor() { + } +}; +_WebhookAuthBasicAuthInput.discriminator = void 0; +_WebhookAuthBasicAuthInput.attributeTypeMap = [ + { + "name": "username", + "baseName": "username", + "type": "string", + "format": "" + }, + { + "name": "password", + "baseName": "password", + "type": "string", + "format": "" + } +]; +var WebhookAuthBasicAuthInput = _WebhookAuthBasicAuthInput; + +// models/WebhookAuthOAuth2.ts +var _WebhookAuthOAuth2 = class _WebhookAuthOAuth2 { + static getAttributeTypeMap() { + return _WebhookAuthOAuth2.attributeTypeMap; + } + constructor() { + } +}; +_WebhookAuthOAuth2.discriminator = void 0; +_WebhookAuthOAuth2.attributeTypeMap = [ + { + "name": "authorization_url", + "baseName": "authorization_url", + "type": "string", + "format": "" + }, + { + "name": "client_id", + "baseName": "client_id", + "type": "string", + "format": "" + }, + { + "name": "client_secret", + "baseName": "client_secret", + "type": "string", + "format": "" + } +]; +var WebhookAuthOAuth2 = _WebhookAuthOAuth2; + +// models/WebhookAuthOAuth2Input.ts +var _WebhookAuthOAuth2Input = class _WebhookAuthOAuth2Input { + static getAttributeTypeMap() { + return _WebhookAuthOAuth2Input.attributeTypeMap; + } + constructor() { + } +}; +_WebhookAuthOAuth2Input.discriminator = void 0; +_WebhookAuthOAuth2Input.attributeTypeMap = [ + { + "name": "authorization_url", + "baseName": "authorization_url", + "type": "string", + "format": "" + }, + { + "name": "client_id", + "baseName": "client_id", + "type": "string", + "format": "" + }, + { + "name": "client_secret", + "baseName": "client_secret", + "type": "string", + "format": "" + } +]; +var WebhookAuthOAuth2Input = _WebhookAuthOAuth2Input; + +// models/WebhookAuthentication.ts +var _WebhookAuthentication = class _WebhookAuthentication { + static getAttributeTypeMap() { + return _WebhookAuthentication.attributeTypeMap; + } + constructor() { + } +}; +_WebhookAuthentication.discriminator = void 0; +_WebhookAuthentication.attributeTypeMap = [ + { + "name": "API_KEY", + "baseName": "API_KEY", + "type": "WebhookAuthApiKey", + "format": "" + }, + { + "name": "BASIC_AUTH", + "baseName": "BASIC_AUTH", + "type": "WebhookAuthBasicAuth", + "format": "" + }, + { + "name": "BEARER_TOKEN", + "baseName": "BEARER_TOKEN", + "type": "string", + "format": "" + }, + { + "name": "OAUTH2", + "baseName": "OAUTH2", + "type": "WebhookAuthOAuth2", + "format": "" + } +]; +var WebhookAuthentication = _WebhookAuthentication; + +// models/WebhookAuthenticationInput.ts +var _WebhookAuthenticationInput = class _WebhookAuthenticationInput { + static getAttributeTypeMap() { + return _WebhookAuthenticationInput.attributeTypeMap; + } + constructor() { + } +}; +_WebhookAuthenticationInput.discriminator = void 0; +_WebhookAuthenticationInput.attributeTypeMap = [ + { + "name": "API_KEY", + "baseName": "API_KEY", + "type": "WebhookAuthApiKeyInput", + "format": "" + }, + { + "name": "BASIC_AUTH", + "baseName": "BASIC_AUTH", + "type": "WebhookAuthBasicAuthInput", + "format": "" + }, + { + "name": "BEARER_TOKEN", + "baseName": "BEARER_TOKEN", + "type": "string", + "format": "" + }, + { + "name": "OAUTH2", + "baseName": "OAUTH2", + "type": "WebhookAuthOAuth2Input", + "format": "" + } +]; +var WebhookAuthenticationInput = _WebhookAuthenticationInput; + +// models/WebhookDeleteFailure.ts +var _WebhookDeleteFailure = class _WebhookDeleteFailure { + static getAttributeTypeMap() { + return _WebhookDeleteFailure.attributeTypeMap; + } + constructor() { + } +}; +_WebhookDeleteFailure.discriminator = void 0; +_WebhookDeleteFailure.attributeTypeMap = [ + { + "name": "id", + "baseName": "id", + "type": "string", + "format": "" + }, + { + "name": "name", + "baseName": "name", + "type": "string", + "format": "" + }, + { + "name": "error", + "baseName": "error", + "type": "string", + "format": "" + } +]; +var WebhookDeleteFailure = _WebhookDeleteFailure; + +// models/WebhookDeleteResponse.ts +var _WebhookDeleteResponse = class _WebhookDeleteResponse { + static getAttributeTypeMap() { + return _WebhookDeleteResponse.attributeTypeMap; + } + constructor() { + } +}; +_WebhookDeleteResponse.discriminator = void 0; +_WebhookDeleteResponse.attributeTypeMap = [ + { + "name": "deleted_count", + "baseName": "deleted_count", + "type": "number", + "format": "int32" + }, + { + "name": "failed_count", + "baseName": "failed_count", + "type": "number", + "format": "int32" + }, + { + "name": "deleted_webhooks", + "baseName": "deleted_webhooks", + "type": "Array", + "format": "" + }, + { + "name": "failed_webhooks", + "baseName": "failed_webhooks", + "type": "Array", + "format": "" + } +]; +var WebhookDeleteResponse = _WebhookDeleteResponse; + +// models/WebhookKeyValuePair.ts +var _WebhookKeyValuePair = class _WebhookKeyValuePair { + static getAttributeTypeMap() { + return _WebhookKeyValuePair.attributeTypeMap; + } + constructor() { + } +}; +_WebhookKeyValuePair.discriminator = void 0; +_WebhookKeyValuePair.attributeTypeMap = [ + { + "name": "key", + "baseName": "key", + "type": "string", + "format": "" + }, + { + "name": "value", + "baseName": "value", + "type": "string", + "format": "" + } +]; +var WebhookKeyValuePair = _WebhookKeyValuePair; + +// models/WebhookKeyValuePairInput.ts +var _WebhookKeyValuePairInput = class _WebhookKeyValuePairInput { + static getAttributeTypeMap() { + return _WebhookKeyValuePairInput.attributeTypeMap; + } + constructor() { + } +}; +_WebhookKeyValuePairInput.discriminator = void 0; +_WebhookKeyValuePairInput.attributeTypeMap = [ + { + "name": "key", + "baseName": "key", + "type": "string", + "format": "" + }, + { + "name": "value", + "baseName": "value", + "type": "string", + "format": "" + } +]; +var WebhookKeyValuePairInput = _WebhookKeyValuePairInput; + +// models/WebhookOrg.ts +var _WebhookOrg = class _WebhookOrg { + static getAttributeTypeMap() { + return _WebhookOrg.attributeTypeMap; + } + constructor() { + } +}; +_WebhookOrg.discriminator = void 0; +_WebhookOrg.attributeTypeMap = [ + { + "name": "id", + "baseName": "id", + "type": "string", + "format": "" + }, + { + "name": "name", + "baseName": "name", + "type": "string", + "format": "" + } +]; +var WebhookOrg = _WebhookOrg; + +// models/WebhookPagination.ts +var _WebhookPagination = class _WebhookPagination { + static getAttributeTypeMap() { + return _WebhookPagination.attributeTypeMap; + } + constructor() { + } +}; +_WebhookPagination.discriminator = void 0; +_WebhookPagination.attributeTypeMap = [ + { + "name": "record_offset", + "baseName": "record_offset", + "type": "number", + "format": "int32" + }, + { + "name": "record_size", + "baseName": "record_size", + "type": "number", + "format": "int32" + }, + { + "name": "total_count", + "baseName": "total_count", + "type": "number", + "format": "int32" + }, + { + "name": "has_more", + "baseName": "has_more", + "type": "boolean", + "format": "" + } +]; +var WebhookPagination = _WebhookPagination; + +// models/WebhookResponse.ts +var _WebhookResponse = class _WebhookResponse { + static getAttributeTypeMap() { + return _WebhookResponse.attributeTypeMap; + } + constructor() { + } +}; +_WebhookResponse.discriminator = void 0; +_WebhookResponse.attributeTypeMap = [ + { + "name": "id", + "baseName": "id", + "type": "string", + "format": "" + }, + { + "name": "name", + "baseName": "name", + "type": "string", + "format": "" + }, + { + "name": "description", + "baseName": "description", + "type": "string", + "format": "" + }, + { + "name": "org", + "baseName": "org", + "type": "WebhookOrg", + "format": "" + }, + { + "name": "url", + "baseName": "url", + "type": "string", + "format": "" + }, + { + "name": "url_params", + "baseName": "url_params", + "type": "any", + "format": "" + }, + { + "name": "events", + "baseName": "events", + "type": "Array", + "format": "" + }, + { + "name": "authentication", + "baseName": "authentication", + "type": "WebhookAuthentication", + "format": "" + }, + { + "name": "signature_verification", + "baseName": "signature_verification", + "type": "WebhookSignatureVerification", + "format": "" + }, + { + "name": "additional_headers", + "baseName": "additional_headers", + "type": "Array", + "format": "" + }, + { + "name": "creation_time_in_millis", + "baseName": "creation_time_in_millis", + "type": "number", + "format": "float" + }, + { + "name": "modification_time_in_millis", + "baseName": "modification_time_in_millis", + "type": "number", + "format": "float" + }, + { + "name": "created_by", + "baseName": "created_by", + "type": "WebhookUser", + "format": "" + }, + { + "name": "last_modified_by", + "baseName": "last_modified_by", + "type": "WebhookUser", + "format": "" + }, + { + "name": "storage_destination", + "baseName": "storage_destination", + "type": "StorageDestination", + "format": "" + } +]; +var WebhookResponse = _WebhookResponse; + +// models/WebhookSearchResponse.ts +var _WebhookSearchResponse = class _WebhookSearchResponse { + static getAttributeTypeMap() { + return _WebhookSearchResponse.attributeTypeMap; + } + constructor() { + } +}; +_WebhookSearchResponse.discriminator = void 0; +_WebhookSearchResponse.attributeTypeMap = [ + { + "name": "webhooks", + "baseName": "webhooks", + "type": "Array", + "format": "" + }, + { + "name": "pagination", + "baseName": "pagination", + "type": "WebhookPagination", + "format": "" + } +]; +var WebhookSearchResponse = _WebhookSearchResponse; + +// models/WebhookSignatureVerification.ts +var _WebhookSignatureVerification = class _WebhookSignatureVerification { + static getAttributeTypeMap() { + return _WebhookSignatureVerification.attributeTypeMap; + } + constructor() { + } +}; +_WebhookSignatureVerification.discriminator = void 0; +_WebhookSignatureVerification.attributeTypeMap = [ + { + "name": "type", + "baseName": "type", + "type": "WebhookSignatureVerificationTypeEnum", + "format": "" + }, + { + "name": "header", + "baseName": "header", + "type": "string", + "format": "" + }, + { + "name": "algorithm", + "baseName": "algorithm", + "type": "WebhookSignatureVerificationAlgorithmEnum", + "format": "" + }, + { + "name": "secret", + "baseName": "secret", + "type": "string", + "format": "" + } +]; +var WebhookSignatureVerification = _WebhookSignatureVerification; + +// models/WebhookSignatureVerificationInput.ts +var _WebhookSignatureVerificationInput = class _WebhookSignatureVerificationInput { + static getAttributeTypeMap() { + return _WebhookSignatureVerificationInput.attributeTypeMap; + } + constructor() { + } +}; +_WebhookSignatureVerificationInput.discriminator = void 0; +_WebhookSignatureVerificationInput.attributeTypeMap = [ + { + "name": "type", + "baseName": "type", + "type": "WebhookSignatureVerificationInputTypeEnum", + "format": "" + }, + { + "name": "header", + "baseName": "header", + "type": "string", + "format": "" + }, + { + "name": "algorithm", + "baseName": "algorithm", + "type": "WebhookSignatureVerificationInputAlgorithmEnum", + "format": "" + }, + { + "name": "secret", + "baseName": "secret", + "type": "string", + "format": "" + } +]; +var WebhookSignatureVerificationInput = _WebhookSignatureVerificationInput; + +// models/WebhookSortOptionsInput.ts +var _WebhookSortOptionsInput = class _WebhookSortOptionsInput { + static getAttributeTypeMap() { + return _WebhookSortOptionsInput.attributeTypeMap; + } + constructor() { + } +}; +_WebhookSortOptionsInput.discriminator = void 0; +_WebhookSortOptionsInput.attributeTypeMap = [ + { + "name": "field_name", + "baseName": "field_name", + "type": "WebhookSortOptionsInputFieldNameEnum", + "format": "" + }, + { + "name": "order", + "baseName": "order", + "type": "WebhookSortOptionsInputOrderEnum", + "format": "" + } +]; +var WebhookSortOptionsInput = _WebhookSortOptionsInput; + +// models/WebhookUser.ts +var _WebhookUser = class _WebhookUser { + static getAttributeTypeMap() { + return _WebhookUser.attributeTypeMap; + } + constructor() { + } +}; +_WebhookUser.discriminator = void 0; +_WebhookUser.attributeTypeMap = [ + { + "name": "id", + "baseName": "id", + "type": "string", + "format": "" + }, + { + "name": "name", + "baseName": "name", + "type": "string", + "format": "" + } +]; +var WebhookUser = _WebhookUser; + +// middleware.ts +var PromiseMiddlewareWrapper = class { + constructor(middleware) { + this.middleware = middleware; + } + pre(context) { + return from(this.middleware.pre(context)); + } + post(context) { + return from(this.middleware.post(context)); + } +}; + +// servers.ts +var ServerConfiguration = class { + constructor(url, variableConfiguration) { + this.url = url; + this.variableConfiguration = variableConfiguration; + } + /** + * Sets the value of the variables of this server. Variables are included in + * the `url` of this ServerConfiguration in the form `{variableName}` + * + * @param variableConfiguration a partial variable configuration for the + * variables contained in the url + */ + setVariables(variableConfiguration) { + Object.assign(this.variableConfiguration, variableConfiguration); + } + getConfiguration() { + return this.variableConfiguration; + } + getUrl() { + let replacedUrl = this.url; + for (const key in this.variableConfiguration) { + var re = new RegExp("{" + key + "}", "g"); + replacedUrl = replacedUrl.replace(re, this.variableConfiguration[key]); + } + return replacedUrl; + } + /** + * Creates a new request context for this server using the url with variables + * replaced with their respective values and the endpoint of the request appended. + * + * @param endpoint the endpoint to be queried on the server + * @param httpMethod httpMethod to be used + * + */ + makeRequestContext(endpoint, httpMethod) { + return new RequestContext2(this.getUrl() + endpoint, httpMethod); + } +}; +var server1 = new ServerConfiguration("{base-url}", { "base-url": "https://localhost:443" }); +var servers = [server1]; + +// configuration.ts +function createConfiguration(conf = {}) { + const configuration = { + baseServer: conf.baseServer !== void 0 ? conf.baseServer : server1, + httpApi: conf.httpApi || new IsomorphicFetchHttpLibrary(), + middleware: conf.middleware || [], + authMethods: configureAuthMethods(conf.authMethods) + }; + if (conf.promiseMiddleware) { + conf.promiseMiddleware.forEach( + (m) => configuration.middleware.push(new PromiseMiddlewareWrapper(m)) + ); + } + return configuration; +} + +// apis/exception.ts +var ApiException = class extends Error { + constructor(code, message, body, headers) { + super("HTTP-Code: " + code + "\nMessage: " + message + "\nBody: " + JSON.stringify(body) + "\nHeaders: " + JSON.stringify(headers)); + this.code = code; + this.body = body; + this.headers = headers; + } +}; + +// apis/baseapi.ts +var BaseAPIRequestFactory = class { + constructor(configuration) { + this.configuration = configuration; + } +}; +var RequiredError = class extends Error { + constructor(api, method, field) { + super("Required parameter " + field + " was null or undefined when calling " + api + "." + method + "."); + this.api = api; + this.method = method; + this.field = field; + this.name = "RequiredError"; + } +}; + +// models/ObjectSerializer.ts +var primitives = [ + "string", + "boolean", + "double", + "integer", + "long", + "float", + "number", + "any" +]; +var supportedMediaTypes = { + "application/json": Infinity, + "application/octet-stream": 0, + "application/x-www-form-urlencoded": 0 +}; +var enumsMap = /* @__PURE__ */ new Set([ + "ActionConfigInputPositionEnum", + "ActionConfigInputCreatePositionEnum", + "AssociateMetadataInputTypeEnum", + "AssociateMetadataInputCreateTypeEnum", + "AuthClusterPreferencesAuthStatusEnum", + "AuthClusterPreferencesInputAuthStatusEnum", + "AuthOrgPreferenceAuthStatusEnum", + "AuthOrgPreferenceInputAuthStatusEnum", + "AuthorMetadataTypeInputTypeEnum", + "ChannelHistoryEventInfoTypeEnum", + "ChannelHistoryEventInputTypeEnum", + "ChannelHistoryJobStatusEnum", + "ChannelValidationDetailValidationStepEnum", + "ChannelValidationDetailStatusEnum", + "CollectionMetadataInputTypeEnum", + "ColumnSecurityRuleGroupOperationOperationEnum", + "CommunicationChannelValidateResponseChannelTypeEnum", + "CommunicationChannelValidateResponseEventTypeEnum", + "CommunicationChannelValidateResponseResultCodeEnum", + "ConfigureAuthSettingsRequestAuthTypeEnum", + "ConfigureAuthSettingsRequestClusterPreferencesAuthStatusEnum", + "ConnectionConfigurationResponsePolicyProcessesEnum", + "ConnectionConfigurationResponseDataWarehouseTypeEnum", + "ConnectionConfigurationResponsePolicyTypeEnum", + "ConnectionConfigurationSearchRequestPolicyTypeEnum", + "ContextPayloadV2InputTypeEnum", + "CopyObjectRequestTypeEnum", + "CreateAgentConversationRequestMetadataContextTypeEnum", + "CreateCalendarRequestCreationMethodEnum", + "CreateCalendarRequestCalendarTypeEnum", + "CreateCalendarRequestMonthOffsetEnum", + "CreateCalendarRequestStartDayOfWeekEnum", + "CreateConnectionConfigurationRequestAuthenticationTypeEnum", + "CreateConnectionConfigurationRequestPolicyTypeEnum", + "CreateConnectionConfigurationRequestPolicyProcessesEnum", + "CreateConnectionRequestDataWarehouseTypeEnum", + "CreateConnectionResponseDataWarehouseTypeEnum", + "CreateRoleRequestPrivilegesEnum", + "CreateScheduleRequestMetadataTypeEnum", + "CreateScheduleRequestFileFormatEnum", + "CreateScheduleRequestTimeZoneEnum", + "CreateScheduleRequestPdfOptionsPageSizeEnum", + "CreateUserGroupRequestPrivilegesEnum", + "CreateUserGroupRequestTypeEnum", + "CreateUserGroupRequestVisibilityEnum", + "CreateUserRequestAccountTypeEnum", + "CreateUserRequestAccountStatusEnum", + "CreateUserRequestVisibilityEnum", + "CreateUserRequestPreferredLocaleEnum", + "CreateVariableRequestTypeEnum", + "CreateVariableRequestDataTypeEnum", + "CreateWebhookConfigurationRequestEventsEnum", + "CreateWebhookConfigurationRequestSignatureVerificationTypeEnum", + "CreateWebhookConfigurationRequestSignatureVerificationAlgorithmEnum", + "CreateWebhookConfigurationRequestStorageDestinationStorageTypeEnum", + "CustomActionMetadataTypeInputTypeEnum", + "DeleteMetadataTypeInputTypeEnum", + "DeployCommitRequestDeployTypeEnum", + "DeployCommitRequestDeployPolicyEnum", + "EventChannelConfigEventTypeEnum", + "EventChannelConfigChannelsEnum", + "EventChannelConfigInputEventTypeEnum", + "EventChannelConfigInputChannelsEnum", + "ExcludeMetadataListItemInputTypeEnum", + "ExportAnswerReportRequestFileFormatEnum", + "ExportAnswerReportRequestTypeEnum", + "ExportAnswerReportRequestRegionalSettingsCurrencyFormatEnum", + "ExportAnswerReportRequestRegionalSettingsUserLocaleEnum", + "ExportAnswerReportRequestRegionalSettingsNumberFormatLocaleEnum", + "ExportAnswerReportRequestRegionalSettingsDateFormatLocaleEnum", + "ExportLiveboardReportRequestFileFormatEnum", + "ExportLiveboardReportRequestPdfOptionsPageSizeEnum", + "ExportLiveboardReportRequestPdfOptionsPageOrientationEnum", + "ExportMetadataTMLBatchedRequestMetadataTypeEnum", + "ExportMetadataTMLBatchedRequestEdocFormatEnum", + "ExportMetadataTMLRequestEdocFormatEnum", + "ExportMetadataTMLRequestExportSchemaVersionEnum", + "ExportMetadataTypeInputTypeEnum", + "FavoriteMetadataInputTypeEnum", + "FavoriteMetadataItemTypeEnum", + "FetchAnswerDataRequestDataFormatEnum", + "FetchAsyncImportTaskStatusRequestTaskStatusEnum", + "FetchLiveboardDataRequestDataFormatEnum", + "FetchLogsRequestLogTypeEnum", + "FetchPermissionsOfPrincipalsRequestDefaultMetadataTypeEnum", + "FilterRulesOperatorEnum", + "GenerateCSVRequestCalendarTypeEnum", + "GenerateCSVRequestMonthOffsetEnum", + "GenerateCSVRequestStartDayOfWeekEnum", + "GetCustomAccessTokenRequestPersistOptionEnum", + "GroupsImportListInputPrivilegesEnum", + "GroupsImportListInputTypeEnum", + "GroupsImportListInputVisibilityEnum", + "HeaderUpdateInputTypeEnum", + "ImportEPackAsyncTaskStatusTaskStatusEnum", + "ImportEPackAsyncTaskStatusImportPolicyEnum", + "ImportMetadataTMLAsyncRequestImportPolicyEnum", + "ImportMetadataTMLRequestImportPolicyEnum", + "ImportUserAccountTypeEnum", + "ImportUserAccountStatusEnum", + "ImportUserVisibilityEnum", + "ImportUserPreferredLocaleEnum", + "JWTMetadataObjectTypeEnum", + "JobRecipientTypeEnum", + "ManageObjectPrivilegeRequestOperationEnum", + "ManageObjectPrivilegeRequestMetadataTypeEnum", + "ManageObjectPrivilegeRequestObjectPrivilegeTypesEnum", + "MetadataInputTypeEnum", + "MetadataListItemInputTypeEnum", + "MetadataListItemInputSubtypesEnum", + "MetadataObjectTypeEnum", + "MetadataResponseTypeEnum", + "MetadataSearchResponseMetadataTypeEnum", + "MetadataSearchSortOptionsFieldNameEnum", + "MetadataSearchSortOptionsOrderEnum", + "NLInstructionsInfoScopeEnum", + "NLInstructionsInfoInputScopeEnum", + "ObjectPrivilegesMetadataInputTypeEnum", + "OrgChannelConfigInputOperationEnum", + "OrgChannelConfigInputResetEventsEnum", + "OrgPreferenceSearchCriteriaInputEventTypesEnum", + "OrgResponseStatusEnum", + "OrgResponseVisibilityEnum", + "ParameterizeMetadataFieldsRequestMetadataTypeEnum", + "ParameterizeMetadataFieldsRequestFieldTypeEnum", + "ParameterizeMetadataRequestMetadataTypeEnum", + "ParameterizeMetadataRequestFieldTypeEnum", + "PdfOptionsPageSizeEnum", + "PdfOptionsInputPageSizeEnum", + "PdfOptionsInputPageOrientationEnum", + "PermissionInputShareModeEnum", + "PermissionsMetadataTypeInputTypeEnum", + "PrincipalsInputTypeEnum", + "PublishMetadataListItemTypeEnum", + "PutVariableValuesRequestOperationEnum", + "RegionalSettingsInputCurrencyFormatEnum", + "RegionalSettingsInputUserLocaleEnum", + "RegionalSettingsInputNumberFormatLocaleEnum", + "RegionalSettingsInputDateFormatLocaleEnum", + "ResponseMessageMessageTypeEnum", + "ResponseMessageVisualizationTypeEnum", + "RevertCommitRequestRevertPolicyEnum", + "RoleResponsePrivilegesEnum", + "RoleResponsePermissionEnum", + "RuntimeFiltersOperatorEnum", + "RuntimeSortsOrderEnum", + "SchedulesPdfOptionsInputPageSizeEnum", + "SearchAuthSettingsRequestAuthTypeEnum", + "SearchAuthSettingsRequestScopeEnum", + "SearchAuthSettingsResponseAuthTypeEnum", + "SearchCalendarsRequestSortOptionsFieldNameEnum", + "SearchCalendarsRequestSortOptionsOrderEnum", + "SearchChannelHistoryRequestChannelTypeEnum", + "SearchChannelHistoryRequestChannelStatusEnum", + "SearchCollectionsRequestSortOptionsFieldNameEnum", + "SearchCollectionsRequestSortOptionsOrderEnum", + "SearchCommitsRequestMetadataTypeEnum", + "SearchCommunicationChannelPreferencesRequestClusterPreferencesEnum", + "SearchConnectionRequestDataWarehouseTypesEnum", + "SearchConnectionRequestDataWarehouseObjectTypeEnum", + "SearchConnectionRequestAuthenticationTypeEnum", + "SearchConnectionRequestSortOptionsFieldNameEnum", + "SearchConnectionRequestSortOptionsOrderEnum", + "SearchConnectionResponseDataWarehouseTypeEnum", + "SearchCustomActionsRequestTypeEnum", + "SearchDataRequestDataFormatEnum", + "SearchMetadataRequestDependentObjectVersionEnum", + "SearchMetadataRequestLiveboardResponseVersionEnum", + "SearchMetadataRequestSortOptionsFieldNameEnum", + "SearchMetadataRequestSortOptionsOrderEnum", + "SearchOrgsRequestVisibilityEnum", + "SearchOrgsRequestStatusEnum", + "SearchRoleResponsePrivilegesEnum", + "SearchRoleResponsePermissionEnum", + "SearchRolesRequestPrivilegesEnum", + "SearchRolesRequestPermissionsEnum", + "SearchSecuritySettingsRequestScopeEnum", + "SearchUserGroupsRequestPrivilegesEnum", + "SearchUserGroupsRequestTypeEnum", + "SearchUserGroupsRequestVisibilityEnum", + "SearchUserGroupsRequestSortOptionsFieldNameEnum", + "SearchUserGroupsRequestSortOptionsOrderEnum", + "SearchUsersRequestVisibilityEnum", + "SearchUsersRequestPrivilegesEnum", + "SearchUsersRequestAccountTypeEnum", + "SearchUsersRequestAccountStatusEnum", + "SearchVariablesRequestResponseContentEnum", + "SearchWebhookConfigurationsRequestEventTypeEnum", + "SearchWebhookConfigurationsRequestSortOptionsFieldNameEnum", + "SearchWebhookConfigurationsRequestSortOptionsOrderEnum", + "SecuritySettingsClusterPreferencesTrustedAuthStatusEnum", + "SecuritySettingsOrgPreferencesTrustedAuthStatusEnum", + "ShareMetadataRequestMetadataTypeEnum", + "ShareMetadataTypeInputTypeEnum", + "SharePermissionsInputShareModeEnum", + "SharePermissionsInputContentShareModeEnum", + "SortOptionFieldNameEnum", + "SortOptionOrderEnum", + "SortOptionInputFieldNameEnum", + "SortOptionInputOrderEnum", + "SortOptionsFieldNameEnum", + "SortOptionsOrderEnum", + "SqlQueryResponseMetadataTypeEnum", + "StorageDestinationStorageTypeEnum", + "StorageDestinationInputStorageTypeEnum", + "SyncMetadataRequestSyncAttributesEnum", + "SyncMetadataResponseStatusEnum", + "TagMetadataTypeInputTypeEnum", + "TokenAccessScopeObjectTypeEnum", + "UnparameterizeMetadataRequestMetadataTypeEnum", + "UnparameterizeMetadataRequestFieldTypeEnum", + "UpdateCalendarRequestUpdateMethodEnum", + "UpdateCalendarRequestCalendarTypeEnum", + "UpdateCalendarRequestMonthOffsetEnum", + "UpdateCalendarRequestStartDayOfWeekEnum", + "UpdateCollectionRequestOperationEnum", + "UpdateConnectionConfigurationRequestAuthenticationTypeEnum", + "UpdateConnectionConfigurationRequestPolicyTypeEnum", + "UpdateConnectionConfigurationRequestPolicyProcessesEnum", + "UpdateConnectionStatusRequestStatusEnum", + "UpdateCustomActionRequestOperationEnum", + "UpdateObjIdInputTypeEnum", + "UpdateOrgRequestOperationEnum", + "UpdateRoleRequestPrivilegesEnum", + "UpdateScheduleRequestMetadataTypeEnum", + "UpdateScheduleRequestFileFormatEnum", + "UpdateScheduleRequestTimeZoneEnum", + "UpdateScheduleRequestStatusEnum", + "UpdateScheduleRequestPdfOptionsPageSizeEnum", + "UpdateUserGroupRequestPrivilegesEnum", + "UpdateUserGroupRequestTypeEnum", + "UpdateUserGroupRequestVisibilityEnum", + "UpdateUserGroupRequestOperationEnum", + "UpdateUserRequestVisibilityEnum", + "UpdateUserRequestAccountStatusEnum", + "UpdateUserRequestAccountTypeEnum", + "UpdateUserRequestOperationEnum", + "UpdateUserRequestPreferredLocaleEnum", + "UpdateWebhookConfigurationRequestEventsEnum", + "UserVisibilityEnum", + "UserAccountTypeEnum", + "UserAccountStatusEnum", + "UserParentTypeEnum", + "UserGroupResponseParentTypeEnum", + "UserGroupResponseTypeEnum", + "UserGroupResponseVisibilityEnum", + "UserObjectTypeEnum", + "ValidateCommunicationChannelRequestChannelTypeEnum", + "ValidateCommunicationChannelRequestEventTypeEnum", + "ValueScopeInputPrincipalTypeEnum", + "VariableVariableTypeEnum", + "VariableDetailInputTypeEnum", + "VariablePutAssignmentInputPrincipalTypeEnum", + "VariableUpdateAssignmentInputOperationEnum", + "VariableUpdateScopeInputPrincipalTypeEnum", + "VariableValuePrincipalTypeEnum", + "WebhookResponseEventsEnum", + "WebhookSignatureVerificationTypeEnum", + "WebhookSignatureVerificationAlgorithmEnum", + "WebhookSignatureVerificationInputTypeEnum", + "WebhookSignatureVerificationInputAlgorithmEnum", + "WebhookSortOptionsInputFieldNameEnum", + "WebhookSortOptionsInputOrderEnum" +]); +var typeMap = { + "AIContext": AIContext, + "APIKey": APIKey, + "APIKeyInput": APIKeyInput, + "AccessToken": AccessToken, + "ActionConfig": ActionConfig, + "ActionConfigInput": ActionConfigInput, + "ActionConfigInputCreate": ActionConfigInputCreate, + "ActionDetails": ActionDetails, + "ActionDetailsInput": ActionDetailsInput, + "ActionDetailsInputCreate": ActionDetailsInputCreate, + "ActivateUserRequest": ActivateUserRequest, + "AgentConversation": AgentConversation, + "AnswerContent": AnswerContent, + "AnswerDataResponse": AnswerDataResponse, + "AnswerPngOptionsInput": AnswerPngOptionsInput, + "AssignChangeAuthorRequest": AssignChangeAuthorRequest, + "AssignTagRequest": AssignTagRequest, + "AssociateMetadataInput": AssociateMetadataInput, + "AssociateMetadataInputCreate": AssociateMetadataInputCreate, + "AuthClusterPreferences": AuthClusterPreferences, + "AuthClusterPreferencesInput": AuthClusterPreferencesInput, + "AuthOrgInfo": AuthOrgInfo, + "AuthOrgPreference": AuthOrgPreference, + "AuthOrgPreferenceInput": AuthOrgPreferenceInput, + "AuthSettingsAccessToken": AuthSettingsAccessToken, + "Authentication": Authentication, + "AuthenticationInput": AuthenticationInput, + "Author": Author, + "AuthorMetadataTypeInput": AuthorMetadataTypeInput, + "AuthorType": AuthorType, + "AwsS3Config": AwsS3Config, + "AwsS3ConfigInput": AwsS3ConfigInput, + "BasicAuth": BasicAuth, + "BasicAuthInput": BasicAuthInput, + "CALLBACK": CALLBACK, + "CALLBACKInput": CALLBACKInput, + "CALLBACKInputMandatory": CALLBACKInputMandatory, + "CalendarResponse": CalendarResponse, + "ChangeUserPasswordRequest": ChangeUserPasswordRequest, + "ChannelHistoryEventInfo": ChannelHistoryEventInfo, + "ChannelHistoryEventInput": ChannelHistoryEventInput, + "ChannelHistoryJob": ChannelHistoryJob, + "ChannelValidationAwsS3Info": ChannelValidationAwsS3Info, + "ChannelValidationDetail": ChannelValidationDetail, + "ClusterNonEmbedAccess": ClusterNonEmbedAccess, + "ClusterNonEmbedAccessInput": ClusterNonEmbedAccessInput, + "Collection": Collection, + "CollectionDeleteResponse": CollectionDeleteResponse, + "CollectionDeleteTypeIdentifiers": CollectionDeleteTypeIdentifiers, + "CollectionEntityIdentifier": CollectionEntityIdentifier, + "CollectionMetadataInput": CollectionMetadataInput, + "CollectionMetadataItem": CollectionMetadataItem, + "CollectionSearchResponse": CollectionSearchResponse, + "Column": Column, + "ColumnSecurityRule": ColumnSecurityRule, + "ColumnSecurityRuleColumn": ColumnSecurityRuleColumn, + "ColumnSecurityRuleGroup": ColumnSecurityRuleGroup, + "ColumnSecurityRuleGroupOperation": ColumnSecurityRuleGroupOperation, + "ColumnSecurityRuleResponse": ColumnSecurityRuleResponse, + "ColumnSecurityRuleSourceTable": ColumnSecurityRuleSourceTable, + "ColumnSecurityRuleTableInput": ColumnSecurityRuleTableInput, + "ColumnSecurityRuleUpdate": ColumnSecurityRuleUpdate, + "CommitBranchRequest": CommitBranchRequest, + "CommitFileType": CommitFileType, + "CommitHistoryResponse": CommitHistoryResponse, + "CommitResponse": CommitResponse, + "CommiterType": CommiterType, + "CommunicationChannelPreferencesResponse": CommunicationChannelPreferencesResponse, + "CommunicationChannelValidateResponse": CommunicationChannelValidateResponse, + "ConfigureAuthSettingsRequest": ConfigureAuthSettingsRequest, + "ConfigureAuthSettingsRequestClusterPreferences": ConfigureAuthSettingsRequestClusterPreferences, + "ConfigureCommunicationChannelPreferencesRequest": ConfigureCommunicationChannelPreferencesRequest, + "ConfigureSecuritySettingsRequest": ConfigureSecuritySettingsRequest, + "ConfigureSecuritySettingsRequestClusterPreferences": ConfigureSecuritySettingsRequestClusterPreferences, + "ConnectionConfigurationResponse": ConnectionConfigurationResponse, + "ConnectionConfigurationSearchRequest": ConnectionConfigurationSearchRequest, + "ConnectionInput": ConnectionInput, + "ContextPayloadV2Input": ContextPayloadV2Input, + "Conversation": Conversation, + "ConversationSettingsInput": ConversationSettingsInput, + "ConvertWorksheetToModelRequest": ConvertWorksheetToModelRequest, + "CopyObjectRequest": CopyObjectRequest, + "CreateAgentConversationRequest": CreateAgentConversationRequest, + "CreateAgentConversationRequestConversationSettings": CreateAgentConversationRequestConversationSettings, + "CreateAgentConversationRequestMetadataContext": CreateAgentConversationRequestMetadataContext, + "CreateCalendarRequest": CreateCalendarRequest, + "CreateCalendarRequestTableReference": CreateCalendarRequestTableReference, + "CreateCollectionRequest": CreateCollectionRequest, + "CreateConfigRequest": CreateConfigRequest, + "CreateConnectionConfigurationRequest": CreateConnectionConfigurationRequest, + "CreateConnectionConfigurationRequestPolicyProcessOptions": CreateConnectionConfigurationRequestPolicyProcessOptions, + "CreateConnectionRequest": CreateConnectionRequest, + "CreateConnectionResponse": CreateConnectionResponse, + "CreateConversationRequest": CreateConversationRequest, + "CreateCustomActionRequest": CreateCustomActionRequest, + "CreateCustomActionRequestActionDetails": CreateCustomActionRequestActionDetails, + "CreateCustomActionRequestDefaultActionConfig": CreateCustomActionRequestDefaultActionConfig, + "CreateEmailCustomizationRequest": CreateEmailCustomizationRequest, + "CreateEmailCustomizationRequestTemplateProperties": CreateEmailCustomizationRequestTemplateProperties, + "CreateEmailCustomizationResponse": CreateEmailCustomizationResponse, + "CreateOrgRequest": CreateOrgRequest, + "CreateRoleRequest": CreateRoleRequest, + "CreateScheduleRequest": CreateScheduleRequest, + "CreateScheduleRequestFrequency": CreateScheduleRequestFrequency, + "CreateScheduleRequestLiveboardOptions": CreateScheduleRequestLiveboardOptions, + "CreateScheduleRequestPdfOptions": CreateScheduleRequestPdfOptions, + "CreateScheduleRequestRecipientDetails": CreateScheduleRequestRecipientDetails, + "CreateTagRequest": CreateTagRequest, + "CreateUserGroupRequest": CreateUserGroupRequest, + "CreateUserRequest": CreateUserRequest, + "CreateVariableRequest": CreateVariableRequest, + "CreateWebhookConfigurationRequest": CreateWebhookConfigurationRequest, + "CreateWebhookConfigurationRequestAuthentication": CreateWebhookConfigurationRequestAuthentication, + "CreateWebhookConfigurationRequestSignatureVerification": CreateWebhookConfigurationRequestSignatureVerification, + "CreateWebhookConfigurationRequestStorageDestination": CreateWebhookConfigurationRequestStorageDestination, + "CronExpression": CronExpression, + "CronExpressionInput": CronExpressionInput, + "CspSettings": CspSettings, + "CspSettingsInput": CspSettingsInput, + "CustomActionMetadataTypeInput": CustomActionMetadataTypeInput, + "DataSource": DataSource, + "DataSourceContextInput": DataSourceContextInput, + "DataWarehouseObjectInput": DataWarehouseObjectInput, + "DataWarehouseObjects": DataWarehouseObjects, + "Database": Database, + "DbtSearchResponse": DbtSearchResponse, + "DeactivateUserRequest": DeactivateUserRequest, + "DefaultActionConfig": DefaultActionConfig, + "DefaultActionConfigInput": DefaultActionConfigInput, + "DefaultActionConfigInputCreate": DefaultActionConfigInputCreate, + "DefaultActionConfigSearchInput": DefaultActionConfigSearchInput, + "DeleteCollectionRequest": DeleteCollectionRequest, + "DeleteConfigRequest": DeleteConfigRequest, + "DeleteConnectionConfigurationRequest": DeleteConnectionConfigurationRequest, + "DeleteConnectionRequest": DeleteConnectionRequest, + "DeleteMetadataRequest": DeleteMetadataRequest, + "DeleteMetadataTypeInput": DeleteMetadataTypeInput, + "DeleteOrgEmailCustomizationRequest": DeleteOrgEmailCustomizationRequest, + "DeleteVariablesRequest": DeleteVariablesRequest, + "DeleteWebhookConfigurationsRequest": DeleteWebhookConfigurationsRequest, + "DeployCommitRequest": DeployCommitRequest, + "DeployResponse": DeployResponse, + "EntityHeader": EntityHeader, + "ErrorResponse": ErrorResponse, + "EurekaDataSourceSuggestionResponse": EurekaDataSourceSuggestionResponse, + "EurekaDecomposeQueryResponse": EurekaDecomposeQueryResponse, + "EurekaGetNLInstructionsResponse": EurekaGetNLInstructionsResponse, + "EurekaGetRelevantQuestionsResponse": EurekaGetRelevantQuestionsResponse, + "EurekaLLMDecomposeQueryResponse": EurekaLLMDecomposeQueryResponse, + "EurekaLLMSuggestedQuery": EurekaLLMSuggestedQuery, + "EurekaRelevantQuestion": EurekaRelevantQuestion, + "EurekaSetNLInstructionsResponse": EurekaSetNLInstructionsResponse, + "EventChannelConfig": EventChannelConfig, + "EventChannelConfigInput": EventChannelConfigInput, + "ExcludeMetadataListItemInput": ExcludeMetadataListItemInput, + "ExportAnswerReportRequest": ExportAnswerReportRequest, + "ExportAnswerReportRequestPngOptions": ExportAnswerReportRequestPngOptions, + "ExportAnswerReportRequestRegionalSettings": ExportAnswerReportRequestRegionalSettings, + "ExportLiveboardReportRequest": ExportLiveboardReportRequest, + "ExportLiveboardReportRequestPdfOptions": ExportLiveboardReportRequestPdfOptions, + "ExportLiveboardReportRequestPngOptions": ExportLiveboardReportRequestPngOptions, + "ExportMetadataTMLBatchedRequest": ExportMetadataTMLBatchedRequest, + "ExportMetadataTMLRequest": ExportMetadataTMLRequest, + "ExportMetadataTMLRequestExportOptions": ExportMetadataTMLRequestExportOptions, + "ExportMetadataTypeInput": ExportMetadataTypeInput, + "ExportOptions": ExportOptions, + "ExternalTableInput": ExternalTableInput, + "FavoriteMetadataInput": FavoriteMetadataInput, + "FavoriteMetadataItem": FavoriteMetadataItem, + "FavoriteObjectOptionsInput": FavoriteObjectOptionsInput, + "FetchAnswerDataRequest": FetchAnswerDataRequest, + "FetchAnswerSqlQueryRequest": FetchAnswerSqlQueryRequest, + "FetchAsyncImportTaskStatusRequest": FetchAsyncImportTaskStatusRequest, + "FetchColumnSecurityRulesRequest": FetchColumnSecurityRulesRequest, + "FetchConnectionDiffStatusResponse": FetchConnectionDiffStatusResponse, + "FetchLiveboardDataRequest": FetchLiveboardDataRequest, + "FetchLiveboardSqlQueryRequest": FetchLiveboardSqlQueryRequest, + "FetchLogsRequest": FetchLogsRequest, + "FetchObjectPrivilegesRequest": FetchObjectPrivilegesRequest, + "FetchPermissionsOfPrincipalsRequest": FetchPermissionsOfPrincipalsRequest, + "FetchPermissionsOnMetadataRequest": FetchPermissionsOnMetadataRequest, + "FilterRules": FilterRules, + "ForceLogoutUsersRequest": ForceLogoutUsersRequest, + "Frequency": Frequency, + "FrequencyInput": FrequencyInput, + "GenerateCSVRequest": GenerateCSVRequest, + "GenericInfo": GenericInfo, + "GetAsyncImportStatusResponse": GetAsyncImportStatusResponse, + "GetCustomAccessTokenRequest": GetCustomAccessTokenRequest, + "GetDataSourceSuggestionsRequest": GetDataSourceSuggestionsRequest, + "GetFullAccessTokenRequest": GetFullAccessTokenRequest, + "GetFullAccessTokenRequestUserParameters": GetFullAccessTokenRequestUserParameters, + "GetNLInstructionsRequest": GetNLInstructionsRequest, + "GetObjectAccessTokenRequest": GetObjectAccessTokenRequest, + "GetRelevantQuestionsRequest": GetRelevantQuestionsRequest, + "GetRelevantQuestionsRequestAiContext": GetRelevantQuestionsRequestAiContext, + "GetRelevantQuestionsRequestMetadataContext": GetRelevantQuestionsRequestMetadataContext, + "GetTokenResponse": GetTokenResponse, + "GroupInfo": GroupInfo, + "GroupObject": GroupObject, + "GroupsImportListInput": GroupsImportListInput, + "HeaderAttributeInput": HeaderAttributeInput, + "HeaderUpdateInput": HeaderUpdateInput, + "ImportEPackAsyncTaskStatus": ImportEPackAsyncTaskStatus, + "ImportMetadataTMLAsyncRequest": ImportMetadataTMLAsyncRequest, + "ImportMetadataTMLRequest": ImportMetadataTMLRequest, + "ImportUser": ImportUser, + "ImportUserGroupsRequest": ImportUserGroupsRequest, + "ImportUserGroupsResponse": ImportUserGroupsResponse, + "ImportUserType": ImportUserType, + "ImportUsersRequest": ImportUsersRequest, + "ImportUsersResponse": ImportUsersResponse, + "InputEurekaNLSRequest": InputEurekaNLSRequest, + "JWTMetadataObject": JWTMetadataObject, + "JWTParameter": JWTParameter, + "JWTUserOptions": JWTUserOptions, + "JWTUserOptionsFull": JWTUserOptionsFull, + "JobRecipient": JobRecipient, + "LiveboardContent": LiveboardContent, + "LiveboardDataResponse": LiveboardDataResponse, + "LiveboardOptions": LiveboardOptions, + "LiveboardOptionsInput": LiveboardOptionsInput, + "LogResponse": LogResponse, + "LoginRequest": LoginRequest, + "ManageObjectPrivilegeRequest": ManageObjectPrivilegeRequest, + "MetadataAssociationItem": MetadataAssociationItem, + "MetadataContext": MetadataContext, + "MetadataInput": MetadataInput, + "MetadataListItemInput": MetadataListItemInput, + "MetadataObject": MetadataObject, + "MetadataResponse": MetadataResponse, + "MetadataSearchResponse": MetadataSearchResponse, + "MetadataSearchSortOptions": MetadataSearchSortOptions, + "ModelTableList": ModelTableList, + "NLInstructionsInfo": NLInstructionsInfo, + "NLInstructionsInfoInput": NLInstructionsInfoInput, + "ObjectIDAndName": ObjectIDAndName, + "ObjectPrivilegesMetadataInput": ObjectPrivilegesMetadataInput, + "ObjectPrivilegesOfMetadataResponse": ObjectPrivilegesOfMetadataResponse, + "Org": Org, + "OrgChannelConfigInput": OrgChannelConfigInput, + "OrgChannelConfigResponse": OrgChannelConfigResponse, + "OrgDetails": OrgDetails, + "OrgInfo": OrgInfo, + "OrgNonEmbedAccess": OrgNonEmbedAccess, + "OrgNonEmbedAccessInput": OrgNonEmbedAccessInput, + "OrgPreferenceSearchCriteriaInput": OrgPreferenceSearchCriteriaInput, + "OrgResponse": OrgResponse, + "OrgType": OrgType, + "ParameterValues": ParameterValues, + "ParameterizeMetadataFieldsRequest": ParameterizeMetadataFieldsRequest, + "ParameterizeMetadataRequest": ParameterizeMetadataRequest, + "ParametersListItem": ParametersListItem, + "ParametersListItemInput": ParametersListItemInput, + "PdfOptions": PdfOptions, + "PdfOptionsInput": PdfOptionsInput, + "PermissionInput": PermissionInput, + "PermissionOfMetadataResponse": PermissionOfMetadataResponse, + "PermissionOfPrincipalsResponse": PermissionOfPrincipalsResponse, + "PermissionsMetadataTypeInput": PermissionsMetadataTypeInput, + "PngOptionsInput": PngOptionsInput, + "PolicyProcessOptions": PolicyProcessOptions, + "PolicyProcessOptionsInput": PolicyProcessOptionsInput, + "PrincipalsInput": PrincipalsInput, + "PrincipalsListItem": PrincipalsListItem, + "PrincipalsListItemInput": PrincipalsListItemInput, + "PublishMetadataListItem": PublishMetadataListItem, + "PublishMetadataRequest": PublishMetadataRequest, + "PutVariableValuesRequest": PutVariableValuesRequest, + "QueryGetDecomposedQueryRequest": QueryGetDecomposedQueryRequest, + "QueryGetDecomposedQueryRequestNlsRequest": QueryGetDecomposedQueryRequestNlsRequest, + "RecipientDetails": RecipientDetails, + "RecipientDetailsInput": RecipientDetailsInput, + "RegionalSettingsInput": RegionalSettingsInput, + "RepoConfigObject": RepoConfigObject, + "ResetUserPasswordRequest": ResetUserPasswordRequest, + "ResponseActivationURL": ResponseActivationURL, + "ResponseCopyObject": ResponseCopyObject, + "ResponseCustomAction": ResponseCustomAction, + "ResponseFailedEntities": ResponseFailedEntities, + "ResponseFailedEntity": ResponseFailedEntity, + "ResponseIncompleteEntities": ResponseIncompleteEntities, + "ResponseIncompleteEntity": ResponseIncompleteEntity, + "ResponseMessage": ResponseMessage, + "ResponsePostUpgradeFailedEntities": ResponsePostUpgradeFailedEntities, + "ResponsePostUpgradeFailedEntity": ResponsePostUpgradeFailedEntity, + "ResponseSchedule": ResponseSchedule, + "ResponseScheduleRun": ResponseScheduleRun, + "ResponseSuccessfulEntities": ResponseSuccessfulEntities, + "ResponseSuccessfulEntity": ResponseSuccessfulEntity, + "ResponseWorksheetToModelConversion": ResponseWorksheetToModelConversion, + "RevertCommitRequest": RevertCommitRequest, + "RevertResponse": RevertResponse, + "RevertedMetadata": RevertedMetadata, + "RevokeRefreshTokensRequest": RevokeRefreshTokensRequest, + "RevokeRefreshTokensResponse": RevokeRefreshTokensResponse, + "RevokeTokenRequest": RevokeTokenRequest, + "RiseGQLArgWrapper": RiseGQLArgWrapper, + "RiseSetter": RiseSetter, + "Role": Role, + "RoleResponse": RoleResponse, + "RuntimeFilter": RuntimeFilter, + "RuntimeFilters": RuntimeFilters, + "RuntimeParamOverride": RuntimeParamOverride, + "RuntimeParameters": RuntimeParameters, + "RuntimeSort": RuntimeSort, + "RuntimeSorts": RuntimeSorts, + "ScheduleHistoryRunsOptionsInput": ScheduleHistoryRunsOptionsInput, + "SchedulesPdfOptionsInput": SchedulesPdfOptionsInput, + "SchemaObject": SchemaObject, + "Scope": Scope, + "ScriptSrcUrls": ScriptSrcUrls, + "ScriptSrcUrlsInput": ScriptSrcUrlsInput, + "SearchAuthSettingsRequest": SearchAuthSettingsRequest, + "SearchAuthSettingsResponse": SearchAuthSettingsResponse, + "SearchCalendarsRequest": SearchCalendarsRequest, + "SearchCalendarsRequestSortOptions": SearchCalendarsRequestSortOptions, + "SearchChannelHistoryRequest": SearchChannelHistoryRequest, + "SearchChannelHistoryResponse": SearchChannelHistoryResponse, + "SearchCollectionsRequest": SearchCollectionsRequest, + "SearchCollectionsRequestSortOptions": SearchCollectionsRequestSortOptions, + "SearchCommitsRequest": SearchCommitsRequest, + "SearchCommunicationChannelPreferencesRequest": SearchCommunicationChannelPreferencesRequest, + "SearchConfigRequest": SearchConfigRequest, + "SearchConnectionRequest": SearchConnectionRequest, + "SearchConnectionRequestSortOptions": SearchConnectionRequestSortOptions, + "SearchConnectionResponse": SearchConnectionResponse, + "SearchCustomActionsRequest": SearchCustomActionsRequest, + "SearchCustomActionsRequestDefaultActionConfig": SearchCustomActionsRequestDefaultActionConfig, + "SearchDataRequest": SearchDataRequest, + "SearchDataResponse": SearchDataResponse, + "SearchEmailCustomizationRequest": SearchEmailCustomizationRequest, + "SearchMetadataRequest": SearchMetadataRequest, + "SearchMetadataRequestFavoriteObjectOptions": SearchMetadataRequestFavoriteObjectOptions, + "SearchMetadataRequestSortOptions": SearchMetadataRequestSortOptions, + "SearchOrgsRequest": SearchOrgsRequest, + "SearchRoleResponse": SearchRoleResponse, + "SearchRolesRequest": SearchRolesRequest, + "SearchSchedulesRequest": SearchSchedulesRequest, + "SearchSchedulesRequestHistoryRunsOptions": SearchSchedulesRequestHistoryRunsOptions, + "SearchSchedulesRequestSortOptions": SearchSchedulesRequestSortOptions, + "SearchSecuritySettingsRequest": SearchSecuritySettingsRequest, + "SearchTagsRequest": SearchTagsRequest, + "SearchUserGroupsRequest": SearchUserGroupsRequest, + "SearchUserGroupsRequestSortOptions": SearchUserGroupsRequestSortOptions, + "SearchUsersRequest": SearchUsersRequest, + "SearchVariablesRequest": SearchVariablesRequest, + "SearchWebhookConfigurationsRequest": SearchWebhookConfigurationsRequest, + "SearchWebhookConfigurationsRequestSortOptions": SearchWebhookConfigurationsRequestSortOptions, + "SecuritySettingsClusterPreferences": SecuritySettingsClusterPreferences, + "SecuritySettingsClusterPreferencesInput": SecuritySettingsClusterPreferencesInput, + "SecuritySettingsOrgDetails": SecuritySettingsOrgDetails, + "SecuritySettingsOrgPreferences": SecuritySettingsOrgPreferences, + "SecuritySettingsOrgPreferencesInput": SecuritySettingsOrgPreferencesInput, + "SecuritySettingsResponse": SecuritySettingsResponse, + "SendAgentConversationMessageRequest": SendAgentConversationMessageRequest, + "SendAgentConversationMessageStreamingRequest": SendAgentConversationMessageStreamingRequest, + "SendAgentMessageRequest": SendAgentMessageRequest, + "SendAgentMessageResponse": SendAgentMessageResponse, + "SendAgentMessageStreamingRequest": SendAgentMessageStreamingRequest, + "SendMessageRequest": SendMessageRequest, + "SetNLInstructionsRequest": SetNLInstructionsRequest, + "ShareMetadataRequest": ShareMetadataRequest, + "ShareMetadataTypeInput": ShareMetadataTypeInput, + "SharePermissionsInput": SharePermissionsInput, + "SingleAnswerRequest": SingleAnswerRequest, + "SortOption": SortOption, + "SortOptionInput": SortOptionInput, + "SortOptions": SortOptions, + "SortingOptions": SortingOptions, + "SqlQuery": SqlQuery, + "SqlQueryResponse": SqlQueryResponse, + "StorageConfig": StorageConfig, + "StorageConfigInput": StorageConfigInput, + "StorageDestination": StorageDestination, + "StorageDestinationInput": StorageDestinationInput, + "SyncMetadataRequest": SyncMetadataRequest, + "SyncMetadataResponse": SyncMetadataResponse, + "SystemConfig": SystemConfig, + "SystemInfo": SystemInfo, + "SystemOverrideInfo": SystemOverrideInfo, + "Table": Table, + "Tag": Tag, + "TagMetadataTypeInput": TagMetadataTypeInput, + "TemplatePropertiesInputCreate": TemplatePropertiesInputCreate, + "Token": Token, + "TokenAccessScopeObject": TokenAccessScopeObject, + "TokenValidationResponse": TokenValidationResponse, + "URL": URL2, + "URLInput": URLInput, + "URLInputMandatory": URLInputMandatory, + "UnassignTagRequest": UnassignTagRequest, + "UnparameterizeMetadataRequest": UnparameterizeMetadataRequest, + "UnpublishMetadataRequest": UnpublishMetadataRequest, + "UpdateCalendarRequest": UpdateCalendarRequest, + "UpdateCalendarRequestTableReference": UpdateCalendarRequestTableReference, + "UpdateCollectionRequest": UpdateCollectionRequest, + "UpdateColumnSecurityRulesRequest": UpdateColumnSecurityRulesRequest, + "UpdateConfigRequest": UpdateConfigRequest, + "UpdateConnectionConfigurationRequest": UpdateConnectionConfigurationRequest, + "UpdateConnectionRequest": UpdateConnectionRequest, + "UpdateConnectionStatusRequest": UpdateConnectionStatusRequest, + "UpdateConnectionV2Request": UpdateConnectionV2Request, + "UpdateCustomActionRequest": UpdateCustomActionRequest, + "UpdateCustomActionRequestActionDetails": UpdateCustomActionRequestActionDetails, + "UpdateCustomActionRequestDefaultActionConfig": UpdateCustomActionRequestDefaultActionConfig, + "UpdateEmailCustomizationRequest": UpdateEmailCustomizationRequest, + "UpdateMetadataHeaderRequest": UpdateMetadataHeaderRequest, + "UpdateMetadataObjIdRequest": UpdateMetadataObjIdRequest, + "UpdateObjIdInput": UpdateObjIdInput, + "UpdateOrgRequest": UpdateOrgRequest, + "UpdateRoleRequest": UpdateRoleRequest, + "UpdateScheduleRequest": UpdateScheduleRequest, + "UpdateScheduleRequestFrequency": UpdateScheduleRequestFrequency, + "UpdateScheduleRequestLiveboardOptions": UpdateScheduleRequestLiveboardOptions, + "UpdateScheduleRequestPdfOptions": UpdateScheduleRequestPdfOptions, + "UpdateScheduleRequestRecipientDetails": UpdateScheduleRequestRecipientDetails, + "UpdateSystemConfigRequest": UpdateSystemConfigRequest, + "UpdateTagRequest": UpdateTagRequest, + "UpdateUserGroupRequest": UpdateUserGroupRequest, + "UpdateUserRequest": UpdateUserRequest, + "UpdateVariableRequest": UpdateVariableRequest, + "UpdateVariableValuesRequest": UpdateVariableValuesRequest, + "UpdateWebhookConfigurationRequest": UpdateWebhookConfigurationRequest, + "User": User, + "UserGroup": UserGroup, + "UserGroupResponse": UserGroupResponse, + "UserInfo": UserInfo, + "UserObject": UserObject, + "UserParameterOptions": UserParameterOptions, + "UserPrincipal": UserPrincipal, + "ValidateCommunicationChannelRequest": ValidateCommunicationChannelRequest, + "ValidateMergeRequest": ValidateMergeRequest, + "ValidateTokenRequest": ValidateTokenRequest, + "ValueScopeInput": ValueScopeInput, + "Variable": Variable, + "VariableDetailInput": VariableDetailInput, + "VariableOrgInfo": VariableOrgInfo, + "VariablePutAssignmentInput": VariablePutAssignmentInput, + "VariableUpdateAssignmentInput": VariableUpdateAssignmentInput, + "VariableUpdateScopeInput": VariableUpdateScopeInput, + "VariableValue": VariableValue, + "VariableValues": VariableValues, + "WebhookAuthApiKey": WebhookAuthApiKey, + "WebhookAuthApiKeyInput": WebhookAuthApiKeyInput, + "WebhookAuthBasicAuth": WebhookAuthBasicAuth, + "WebhookAuthBasicAuthInput": WebhookAuthBasicAuthInput, + "WebhookAuthOAuth2": WebhookAuthOAuth2, + "WebhookAuthOAuth2Input": WebhookAuthOAuth2Input, + "WebhookAuthentication": WebhookAuthentication, + "WebhookAuthenticationInput": WebhookAuthenticationInput, + "WebhookDeleteFailure": WebhookDeleteFailure, + "WebhookDeleteResponse": WebhookDeleteResponse, + "WebhookKeyValuePair": WebhookKeyValuePair, + "WebhookKeyValuePairInput": WebhookKeyValuePairInput, + "WebhookOrg": WebhookOrg, + "WebhookPagination": WebhookPagination, + "WebhookResponse": WebhookResponse, + "WebhookSearchResponse": WebhookSearchResponse, + "WebhookSignatureVerification": WebhookSignatureVerification, + "WebhookSignatureVerificationInput": WebhookSignatureVerificationInput, + "WebhookSortOptionsInput": WebhookSortOptionsInput, + "WebhookUser": WebhookUser +}; +var ObjectSerializer = class _ObjectSerializer { + static findCorrectType(data, expectedType) { + if (data == void 0) { + return expectedType; + } else if (primitives.indexOf(expectedType.toLowerCase()) !== -1) { + return expectedType; + } else if (expectedType === "Date") { + return expectedType; + } else { + if (enumsMap.has(expectedType)) { + return expectedType; + } + if (!typeMap[expectedType]) { + return expectedType; + } + let discriminatorProperty = typeMap[expectedType].discriminator; + if (discriminatorProperty == null) { + return expectedType; + } else { + if (data[discriminatorProperty]) { + var discriminatorType = data[discriminatorProperty]; + if (typeMap[discriminatorType]) { + return discriminatorType; + } else { + return expectedType; + } + } else { + return expectedType; + } + } + } + } + static serialize(data, type, format) { + if (data == void 0) { + return data; + } else if (primitives.indexOf(type.toLowerCase()) !== -1) { + return data; + } else if (type.lastIndexOf("Array<", 0) === 0) { + let subType = type.replace("Array<", ""); + subType = subType.substring(0, subType.length - 1); + let transformedData = []; + for (let date of data) { + transformedData.push(_ObjectSerializer.serialize(date, subType, format)); + } + return transformedData; + } else if (type === "Date") { + if (format == "date") { + let month = data.getMonth() + 1; + month = month < 10 ? "0" + month.toString() : month.toString(); + let day = data.getDate(); + day = day < 10 ? "0" + day.toString() : day.toString(); + return data.getFullYear() + "-" + month + "-" + day; + } else { + return data.toISOString(); + } + } else { + if (enumsMap.has(type)) { + return data; + } + if (!typeMap[type]) { + return data; + } + type = this.findCorrectType(data, type); + let attributeTypes = typeMap[type].getAttributeTypeMap(); + let instance = {}; + for (let attributeType of attributeTypes) { + instance[attributeType.baseName] = _ObjectSerializer.serialize(data[attributeType.name], attributeType.type, attributeType.format); + } + return instance; + } + } + static deserialize(data, type, format) { + type = _ObjectSerializer.findCorrectType(data, type); + if (data == void 0) { + return data; + } else if (primitives.indexOf(type.toLowerCase()) !== -1) { + return data; + } else if (type.lastIndexOf("Array<", 0) === 0) { + let subType = type.replace("Array<", ""); + subType = subType.substring(0, subType.length - 1); + let transformedData = []; + for (let date of data) { + transformedData.push(_ObjectSerializer.deserialize(date, subType, format)); + } + return transformedData; + } else if (type === "Date") { + return new Date(data); + } else { + if (enumsMap.has(type)) { + return data; + } + if (!typeMap[type]) { + return data; + } + let instance = new typeMap[type](); + let attributeTypes = typeMap[type].getAttributeTypeMap(); + for (let attributeType of attributeTypes) { + let value = _ObjectSerializer.deserialize(data[attributeType.baseName], attributeType.type, attributeType.format); + if (value !== void 0) { + instance[attributeType.name] = value; + } + } + return instance; + } + } + /** + * Normalize media type + * + * We currently do not handle any media types attributes, i.e. anything + * after a semicolon. All content is assumed to be UTF-8 compatible. + */ + static normalizeMediaType(mediaType) { + if (mediaType === void 0) { + return void 0; + } + return mediaType.split(";")[0].trim().toLowerCase(); + } + /** + * From a list of possible media types, choose the one we can handle best. + * + * The order of the given media types does not have any impact on the choice + * made. + */ + static getPreferredMediaType(mediaTypes) { + if (!mediaTypes) { + return "application/json"; + } + const normalMediaTypes = mediaTypes.map(this.normalizeMediaType); + let selectedMediaType = void 0; + let selectedRank = -Infinity; + for (const mediaType of normalMediaTypes) { + if (supportedMediaTypes[mediaType] > selectedRank) { + selectedMediaType = mediaType; + selectedRank = supportedMediaTypes[mediaType]; + } + } + if (selectedMediaType === void 0) { + throw new Error("None of the given media types are supported: " + mediaTypes.join(", ")); + } + return selectedMediaType; + } + /** + * Convert data to a string according the given media type + */ + static stringify(data, mediaType) { + if (mediaType === "text/plain") { + return String(data); + } + if (mediaType === "application/json") { + return JSON.stringify(data); + } + throw new Error("The mediaType " + mediaType + " is not supported by ObjectSerializer.stringify."); + } + /** + * Parse data from a string according to the given media type + */ + static parse(rawData, mediaType) { + if (mediaType === void 0) { + throw new Error("Cannot parse content. No Content-Type defined."); + } + if (mediaType === "text/plain") { + return rawData; + } + if (mediaType === "application/json") { + return JSON.parse(rawData); + } + if (mediaType === "text/html") { + return rawData; + } + throw new Error("The mediaType " + mediaType + " is not supported by ObjectSerializer.parse."); + } +}; + +// util.ts +function isCodeInRange(codeRange, code) { + if (codeRange === "0") { + return true; + } + if (codeRange == code.toString()) { + return true; + } else { + const codeString = code.toString(); + if (codeString.length != codeRange.length) { + return false; + } + for (let i = 0; i < codeString.length; i++) { + if (codeRange.charAt(i) != "X" && codeRange.charAt(i) != codeString.charAt(i)) { + return false; + } + } + return true; + } +} +function canConsumeForm(contentTypes) { + return contentTypes.indexOf("multipart/form-data") !== -1; +} + +// apis/AIApi.ts +var AIApiRequestFactory = class extends BaseAPIRequestFactory { + /** + * Version: 26.2.0.cl or later Creates a new Spotter agent conversation based on the provided context and settings. The endpoint was in Beta from 26.2.0.cl through 26.4.0.cl. Requires `CAN_USE_SPOTTER` privilege and at least view access to the metadata object specified in the request. #### Usage guidelines The request must include the `metadata_context` parameter to define the conversation context. The context type can be one of: - `DATA_SOURCE` *(available from 26.5.0.cl)*: targets a specific data source. Provide `data_source_identifier` in `data_source_context` for a single data source, or `data_source_identifiers` for multi-data-source context. The deprecated `guid` field is accepted for backwards compatibility. - `AUTO_MODE` *(available from 26.5.0.cl)*: automatically discovers and selects the most relevant datasets for the user\'s queries. > **Note for callers on versions 26.2.0.cl – 26.4.0.cl (Beta):** use the lowercase `data_source` enum value with the `guid` field instead of the above. Example: `{ \"type\": \"data_source\", \"data_source_context\": { \"guid\": \"\" } }`. The `conversation_settings` parameter controls which Spotter capabilities are enabled for the conversation: - `enable_contextual_change_analysis` (default: `true`, **deprecated from 26.2.0.cl**) — always enabled in Spotter 3; setting this to `false` has no effect on versions >= 26.2.0.cl - `enable_natural_language_answer_generation` (default: `true`, **deprecated from 26.2.0.cl**) — always enabled in Spotter 3; setting this to `false` has no effect on versions >= 26.2.0.cl - `enable_reasoning` (default: `true`, **deprecated from 26.2.0.cl**) — always enabled in Spotter 3; setting this to `false` has no effect on versions >= 26.2.0.cl - `enable_save_chat` (default: `false`, *available from 26.5.0.cl*) — enables saving the conversation for later retrieval via conversation history If the request is successful, the response includes a unique `conversation_identifier` that must be passed to `sendAgentConversationMessage` or `sendAgentConversationMessageStreaming` to send messages within this conversation. The response also includes `conversation_id` with the same value for backwards compatibility; use `conversation_identifier` for new integrations. #### Example request ```json { \"metadata_context\": { \"type\": \"DATA_SOURCE\", \"data_source_context\": { \"data_source_identifier\": \"a1b2c3d4-e5f6-7890-abcd-ef1234567890\" } }, \"conversation_settings\": {} } ``` #### Error responses | Code | Description | | ---- | --------------------------------------------------------------------------------------------------------------------------------------- | | 401 | Unauthorized — authentication token is missing, expired, or invalid. | | 403 | Forbidden — the authenticated user does not have `CAN_USE_SPOTTER` privilege or lacks view permission on the specified metadata object. | > ###### Note: > > - This endpoint was in Beta from 26.2.0.cl through 26.4.0.cl and is Generally Available from version 26.5.0.cl. > - This endpoint requires Spotter - please contact ThoughtSpot support to enable Spotter on your cluster. + * @param createAgentConversationRequest + */ + createAgentConversation(createAgentConversationRequest, _options) { + return __async(this, null, function* () { + var _a, _b, _c; + let _config = _options || this.configuration; + if (createAgentConversationRequest === null || createAgentConversationRequest === void 0) { + throw new RequiredError("AIApi", "createAgentConversation", "createAgentConversationRequest"); + } + const localVarPath = "/api/rest/2.0/ai/agent/conversation/create"; + const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.25.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.25.0"); + const contentType = ObjectSerializer.getPreferredMediaType([ + "application/json" + ]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = ObjectSerializer.stringify( + ObjectSerializer.serialize(createAgentConversationRequest, "CreateAgentConversationRequest", ""), + contentType + ); + requestContext.setBody(serializedBody); + let authMethod; + authMethod = _config.authMethods["bearerAuth"]; + if (authMethod == null ? void 0 : authMethod.applySecurityAuthentication) { + yield authMethod == null ? void 0 : authMethod.applySecurityAuthentication(requestContext); + } + const defaultAuth = ((_a = _options == null ? void 0 : _options.authMethods) == null ? void 0 : _a.default) || ((_c = (_b = this.configuration) == null ? void 0 : _b.authMethods) == null ? void 0 : _c.default); + if (defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication) { + yield defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication(requestContext); + } + return requestContext; + }); + } + /** + * Version: 10.4.0.cl or later Creates a new conversation session tied to a specific data model for AI-driven natural language querying. Requires `CAN_USE_SPOTTER` privilege and at least view access to the metadata object specified in the request. #### Usage guidelines The request must include: - `metadata_identifier`: the unique ID of the data source that provides context for the conversation Optionally, you can provide: - `tokens`: a token string to set initial context for the conversation (e.g., `\"[sales],[item type],[state]\"`) If the request is successful, ThoughtSpot returns a unique `conversation_identifier` that must be passed to `sendMessage` to continue the conversation. #### Error responses | Code | Description | |------|-------------| | 401 | Unauthorized — authentication token is missing, expired, or invalid. | | 403 | Forbidden — the authenticated user does not have `CAN_USE_SPOTTER` privilege or lacks view permission on the specified metadata object. | > ###### Note: > * This endpoint is currently in Beta. Breaking changes may be introduced before the endpoint is made Generally Available. > * This endpoint requires Spotter - please contact ThoughtSpot support to enable Spotter on your cluster. + * @param createConversationRequest + */ + createConversation(createConversationRequest, _options) { + return __async(this, null, function* () { + var _a, _b, _c; + let _config = _options || this.configuration; + if (createConversationRequest === null || createConversationRequest === void 0) { + throw new RequiredError("AIApi", "createConversation", "createConversationRequest"); + } + const localVarPath = "/api/rest/2.0/ai/conversation/create"; + const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.25.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.25.0"); + const contentType = ObjectSerializer.getPreferredMediaType([ + "application/json" + ]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = ObjectSerializer.stringify( + ObjectSerializer.serialize(createConversationRequest, "CreateConversationRequest", ""), + contentType + ); + requestContext.setBody(serializedBody); + let authMethod; + authMethod = _config.authMethods["bearerAuth"]; + if (authMethod == null ? void 0 : authMethod.applySecurityAuthentication) { + yield authMethod == null ? void 0 : authMethod.applySecurityAuthentication(requestContext); + } + const defaultAuth = ((_a = _options == null ? void 0 : _options.authMethods) == null ? void 0 : _a.default) || ((_c = (_b = this.configuration) == null ? void 0 : _b.authMethods) == null ? void 0 : _c.default); + if (defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication) { + yield defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication(requestContext); + } + return requestContext; + }); + } + /** + * Version: 10.15.0.cl or later Suggests the most relevant data sources for a given natural language query, ranked by confidence with LLM-generated reasoning. Requires `CAN_USE_SPOTTER` privilege and at least view-level access to the underlying metadata entities referenced in the response. #### Usage guidelines The request must include: - `query`: the natural language question to find relevant data sources for If the request is successful, the API returns a ranked list of suggested data sources, each containing: - `confidence`: a float score indicating the model\'s confidence in the relevance of the suggestion - `details`: metadata about the data source - `data_source_identifier`: the unique ID of the data source - `data_source_name`: the display name of the data source - `description`: a description of the data source - `reasoning`: LLM-generated rationale explaining why the data source was recommended #### Error responses | Code | Description | |------|--------------------------------------------------------------------------------------------------------------------------------------------| | 401 | Unauthorized — authentication token is missing, expired, or invalid. | | 403 | Forbidden — the authenticated user does not have `CAN_USE_SPOTTER` privilege or lacks view permission on the underlying metadata entities. | > ###### Note: > * This endpoint is currently in Beta. Breaking changes may be introduced before it is made Generally Available. > * This endpoint requires Spotter — please contact ThoughtSpot Support to enable Spotter on your cluster. + * @param getDataSourceSuggestionsRequest + */ + getDataSourceSuggestions(getDataSourceSuggestionsRequest, _options) { + return __async(this, null, function* () { + var _a, _b, _c; + let _config = _options || this.configuration; + if (getDataSourceSuggestionsRequest === null || getDataSourceSuggestionsRequest === void 0) { + throw new RequiredError("AIApi", "getDataSourceSuggestions", "getDataSourceSuggestionsRequest"); + } + const localVarPath = "/api/rest/2.0/ai/data-source-suggestions"; + const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.25.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.25.0"); + const contentType = ObjectSerializer.getPreferredMediaType([ + "application/json" + ]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = ObjectSerializer.stringify( + ObjectSerializer.serialize(getDataSourceSuggestionsRequest, "GetDataSourceSuggestionsRequest", ""), + contentType + ); + requestContext.setBody(serializedBody); + let authMethod; + authMethod = _config.authMethods["bearerAuth"]; + if (authMethod == null ? void 0 : authMethod.applySecurityAuthentication) { + yield authMethod == null ? void 0 : authMethod.applySecurityAuthentication(requestContext); + } + const defaultAuth = ((_a = _options == null ? void 0 : _options.authMethods) == null ? void 0 : _a.default) || ((_c = (_b = this.configuration) == null ? void 0 : _b.authMethods) == null ? void 0 : _c.default); + if (defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication) { + yield defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication(requestContext); + } + return requestContext; + }); + } + /** + * Version: 10.15.0.cl or later Retrieves existing natural language (NL) instructions configured for a specific data model. These instructions guide the AI system in understanding data context and generating more accurate responses. Requires `CAN_USE_SPOTTER` privilege, at least view access on the data model, and a bearer token corresponding to the org where the data model exists. #### Usage guidelines The request must include: - `data_source_identifier`: the unique ID of the data model to retrieve instructions for If the request is successful, the API returns: - `nl_instructions_info`: an array of instruction objects, each containing: - `instructions`: the configured text instructions for AI processing - `scope`: the scope of the instruction — currently only `GLOBAL` is supported #### Instructions scope - **GLOBAL**: Instructions that apply globally across the system on the given data-model (currently only global instructions are supported) #### Error responses | Code | Description | |------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| | 401 | Unauthorized — authentication token is missing, expired, or invalid. | | 403 | Forbidden — the authenticated user does not have `CAN_USE_SPOTTER` privilege, lacks view access on the data model, or the bearer token does not correspond to the org where the data model exists. | > ###### Note: > > - To use this API, the user needs at least view access on the data model, and must use the bearer token corresponding to the org where the data model exists. > - This endpoint is currently in Beta. Breaking changes may be introduced before the endpoint is made Generally Available. > - Available from version 10.15.0.cl and later. > - This endpoint requires Spotter — please contact ThoughtSpot Support to enable Spotter on your cluster. > - Use this API to review currently configured instructions before modifying them with `setNLInstructions`. + * @param getNLInstructionsRequest + */ + getNLInstructions(getNLInstructionsRequest, _options) { + return __async(this, null, function* () { + var _a, _b, _c; + let _config = _options || this.configuration; + if (getNLInstructionsRequest === null || getNLInstructionsRequest === void 0) { + throw new RequiredError("AIApi", "getNLInstructions", "getNLInstructionsRequest"); + } + const localVarPath = "/api/rest/2.0/ai/instructions/get"; + const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.25.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.25.0"); + const contentType = ObjectSerializer.getPreferredMediaType([ + "application/json" + ]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = ObjectSerializer.stringify( + ObjectSerializer.serialize(getNLInstructionsRequest, "GetNLInstructionsRequest", ""), + contentType + ); + requestContext.setBody(serializedBody); + let authMethod; + authMethod = _config.authMethods["bearerAuth"]; + if (authMethod == null ? void 0 : authMethod.applySecurityAuthentication) { + yield authMethod == null ? void 0 : authMethod.applySecurityAuthentication(requestContext); + } + const defaultAuth = ((_a = _options == null ? void 0 : _options.authMethods) == null ? void 0 : _a.default) || ((_c = (_b = this.configuration) == null ? void 0 : _b.authMethods) == null ? void 0 : _c.default); + if (defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication) { + yield defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication(requestContext); + } + return requestContext; + }); + } + /** + * Version: 10.13.0.cl or later Breaks down a natural language query into a series of smaller analytical sub-questions, each mapped to a relevant data source. Requires `CAN_USE_SPOTTER` privilege and at least view-level access to the referenced metadata objects. #### Usage guidelines The request must include: - `query`: the natural language question to decompose into analytical sub-questions - `metadata_context`: at least one of the following context identifiers to guide question generation: - `conversation_identifier` — an existing conversation session ID - `answer_identifiers` — a list of Answer GUIDs - `liveboard_identifiers` — a list of Liveboard GUIDs - `data_source_identifiers` — a list of data source GUIDs Optional parameters for refining the output: - `ai_context`: additional context to improve response quality - `content` — supplementary text or CSV data as string input - `instructions` — custom text instructions for the AI system - `limit_relevant_questions`: maximum number of questions to return (default: `5`) - `bypass_cache`: if `true`, forces fresh computation instead of returning cached results If the request is successful, the API returns a list of relevant analytical questions, each containing: - `query`: the generated sub-question - `data_source_identifier`: the unique ID of the data source the question targets - `data_source_name`: the display name of the corresponding data source #### Error responses | Code | Description | |------|---------------------------------------------------------------------------------------------------------------------------------------| | 401 | Unauthorized — authentication token is missing, expired, or invalid. | | 403 | Forbidden — the authenticated user does not have `CAN_USE_SPOTTER` privilege or lacks view access to the referenced metadata objects. | > ###### Note: > * This endpoint is currently in Beta. Breaking changes may be introduced before the endpoint is made Generally Available. > * This endpoint requires Spotter - please contact ThoughtSpot support to enable Spotter on your cluster. + * @param getRelevantQuestionsRequest + */ + getRelevantQuestions(getRelevantQuestionsRequest, _options) { + return __async(this, null, function* () { + var _a, _b, _c; + let _config = _options || this.configuration; + if (getRelevantQuestionsRequest === null || getRelevantQuestionsRequest === void 0) { + throw new RequiredError("AIApi", "getRelevantQuestions", "getRelevantQuestionsRequest"); + } + const localVarPath = "/api/rest/2.0/ai/relevant-questions/"; + const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.25.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.25.0"); + const contentType = ObjectSerializer.getPreferredMediaType([ + "application/json" + ]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = ObjectSerializer.stringify( + ObjectSerializer.serialize(getRelevantQuestionsRequest, "GetRelevantQuestionsRequest", ""), + contentType + ); + requestContext.setBody(serializedBody); + let authMethod; + authMethod = _config.authMethods["bearerAuth"]; + if (authMethod == null ? void 0 : authMethod.applySecurityAuthentication) { + yield authMethod == null ? void 0 : authMethod.applySecurityAuthentication(requestContext); + } + const defaultAuth = ((_a = _options == null ? void 0 : _options.authMethods) == null ? void 0 : _a.default) || ((_c = (_b = this.configuration) == null ? void 0 : _b.authMethods) == null ? void 0 : _c.default); + if (defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication) { + yield defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication(requestContext); + } + return requestContext; + }); + } + /** + * Version: 10.7.0.cl or later **Deprecated** — Use `getRelevantQuestions` instead (available from 10.13.0.cl). Breaks down a topical or goal-oriented natural language question into smaller, actionable analytical sub-questions, each mapped to a relevant data source for independent execution. Requires `CAN_USE_SPOTTER` privilege and at least view-level access to the referenced metadata objects. #### Usage guidelines The request accepts the following parameters: - `nlsRequest`: contains the user `query` to decompose, along with optional `instructions` and `bypassCache` flag - `worksheetIds`: list of data source identifiers to scope the decomposition - `answerIds`: list of Answer GUIDs whose data guides the response - `liveboardIds`: list of Liveboard GUIDs whose data guides the response - `conversationId`: an existing conversation session ID for context continuity - `content`: supplementary text or CSV data to improve response quality - `maxDecomposedQueries`: maximum number of sub-questions to return (default: `5`) If the request is successful, the API returns a `decomposedQueryResponse` containing a list of `decomposedQueries`, each with: - `query`: the generated analytical sub-question - `worksheetId`: the unique ID of the data source the question targets - `worksheetName`: the display name of the corresponding data source #### Error responses | Code | Description | |------|---------------------------------------------------------------------------------------------------------------------------------------| | 401 | Unauthorized — authentication token is missing, expired, or invalid. | | 403 | Forbidden — the authenticated user does not have `CAN_USE_SPOTTER` privilege or lacks view access to the referenced metadata objects. | > ###### Note: > * This endpoint is deprecated since 10.13.0.cl. Use `getRelevantQuestions` for new integrations. > * This endpoint is currently in Beta. Breaking changes may be introduced before the endpoint is made Generally Available. > * This endpoint requires Spotter — please contact ThoughtSpot support to enable Spotter on your cluster. + * @param queryGetDecomposedQueryRequest + */ + queryGetDecomposedQuery(queryGetDecomposedQueryRequest, _options) { + return __async(this, null, function* () { + var _a, _b, _c; + let _config = _options || this.configuration; + if (queryGetDecomposedQueryRequest === null || queryGetDecomposedQueryRequest === void 0) { + throw new RequiredError("AIApi", "queryGetDecomposedQuery", "queryGetDecomposedQueryRequest"); + } + const localVarPath = "/api/rest/2.0/ai/analytical-questions"; + const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.25.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.25.0"); + const contentType = ObjectSerializer.getPreferredMediaType([ + "application/json" + ]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = ObjectSerializer.stringify( + ObjectSerializer.serialize(queryGetDecomposedQueryRequest, "QueryGetDecomposedQueryRequest", ""), + contentType + ); + requestContext.setBody(serializedBody); + let authMethod; + authMethod = _config.authMethods["bearerAuth"]; + if (authMethod == null ? void 0 : authMethod.applySecurityAuthentication) { + yield authMethod == null ? void 0 : authMethod.applySecurityAuthentication(requestContext); + } + const defaultAuth = ((_a = _options == null ? void 0 : _options.authMethods) == null ? void 0 : _a.default) || ((_c = (_b = this.configuration) == null ? void 0 : _b.authMethods) == null ? void 0 : _c.default); + if (defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication) { + yield defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication(requestContext); + } + return requestContext; + }); + } + /** + * Version: 26.5.0.cl or later Sends natural language messages to an existing Spotter agent conversation and returns the complete response synchronously. Requires `CAN_USE_SPOTTER` privilege and access to the metadata object associated with the conversation. The user must have access to the conversation session referenced by `conversation_identifier`. A conversation must first be created using the `createAgentConversation` API. #### Usage guidelines The request must include: - `conversation_identifier`: the unique session ID returned by `createAgentConversation`, used for context continuity and message tracking - `messages`: an array of one or more text messages to send to the agent The API returns an array of response objects, each containing: - `type`: the kind of response — `text`, `answer`, or `error` - `message`: the main content of the response - `metadata`: additional information depending on the message type (e.g., answer metadata includes analytics and visualization details) #### Error responses | Code | Description | |------|----------------------------------------------------------------------------------------------------------------------------------| | 401 | Unauthorized — authentication token is missing, expired, or invalid. | | 403 | Forbidden — the authenticated user does not have `CAN_USE_SPOTTER` privilege or lacks permission on the referenced conversation. | > ###### Note: > > - This endpoint is Generally Available from version 26.5.0.cl. > - This endpoint requires Spotter - please contact ThoughtSpot support to enable Spotter on your cluster. > - For real-time streamed responses, use `sendAgentConversationMessageStreaming` instead. + * @param conversationIdentifier Unique identifier for the conversation (used to track context) + * @param sendAgentConversationMessageRequest + */ + sendAgentConversationMessage(conversationIdentifier, sendAgentConversationMessageRequest, _options) { + return __async(this, null, function* () { + var _a, _b, _c; + let _config = _options || this.configuration; + if (conversationIdentifier === null || conversationIdentifier === void 0) { + throw new RequiredError("AIApi", "sendAgentConversationMessage", "conversationIdentifier"); + } + if (sendAgentConversationMessageRequest === null || sendAgentConversationMessageRequest === void 0) { + throw new RequiredError("AIApi", "sendAgentConversationMessage", "sendAgentConversationMessageRequest"); + } + const localVarPath = "/api/rest/2.0/ai/agent/conversation/{conversation_identifier}/send".replace("{conversation_identifier}", encodeURIComponent(String(conversationIdentifier))); + const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.25.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.25.0"); + const contentType = ObjectSerializer.getPreferredMediaType([ + "application/json" + ]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = ObjectSerializer.stringify( + ObjectSerializer.serialize(sendAgentConversationMessageRequest, "SendAgentConversationMessageRequest", ""), + contentType + ); + requestContext.setBody(serializedBody); + let authMethod; + authMethod = _config.authMethods["bearerAuth"]; + if (authMethod == null ? void 0 : authMethod.applySecurityAuthentication) { + yield authMethod == null ? void 0 : authMethod.applySecurityAuthentication(requestContext); + } + const defaultAuth = ((_a = _options == null ? void 0 : _options.authMethods) == null ? void 0 : _a.default) || ((_c = (_b = this.configuration) == null ? void 0 : _b.authMethods) == null ? void 0 : _c.default); + if (defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication) { + yield defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication(requestContext); + } + return requestContext; + }); + } + /** + * Version: 26.5.0.cl or later Sends one or more natural language messages to an existing Spotter agent conversation and returns the response as a real-time Server-Sent Events stream. Requires `CAN_USE_SPOTTER` privilege and access to the metadata object associated with the conversation. The user must have access to the conversation session referenced by `conversation_identifier`. A conversation must first be created using the `createAgentConversation` API. #### Usage guidelines The request must include: - `conversation_identifier`: the unique session ID returned by `createAgentConversation`, used for context continuity and message tracking - `messages`: an array of one or more text messages to send to the agent If the request is valid, the API returns a Server-Sent Events (SSE) stream. Each line has the form `data: [{\"type\": \"...\", ...}]` — a JSON array of event objects. Event types include: - `ack`: confirms receipt of the request (`node_id`) - `conv_title`: conversation title (`title`, `conv_id`) - `notification`: status updates on operations (`group_id`, `metadata`, `code` — e.g. `TOOL_CALL_NOTIFICATION`, `nls_start`, `FINAL_RESPONSE_NOTIFICATION`) - `text-chunk`: incremental content chunks (`id`, `group_id`, `metadata` with `format` and `type` such as `thinking` or `text`, `content`) - `text`: full text block with same structure as `text-chunk` - `answer`: structured answer with metadata (`id`, `group_id`, `metadata` with `sage_query`, `session_id`, `title`, etc., `title`) - `error`: if a failure occurs #### Error responses | Code | Description | | ---- | -------------------------------------------------------------------------------------------------------------------------------- | | 401 | Unauthorized — authentication token is missing, expired, or invalid. | | 403 | Forbidden — the authenticated user does not have `CAN_USE_SPOTTER` privilege or lacks permission on the referenced conversation. | > ###### Note: > > - This endpoint is Generally Available from version 26.5.0.cl. > - This endpoint requires Spotter - please contact ThoughtSpot support to enable Spotter on your cluster. > - The streaming protocol uses Server-Sent Events (SSE). > - For the complete response in a single payload, use `sendAgentConversationMessage` instead. + * @param conversationIdentifier Unique identifier for the conversation (used to track context) + * @param sendAgentConversationMessageStreamingRequest + */ + sendAgentConversationMessageStreaming(conversationIdentifier, sendAgentConversationMessageStreamingRequest, _options) { + return __async(this, null, function* () { + var _a, _b, _c; + let _config = _options || this.configuration; + if (conversationIdentifier === null || conversationIdentifier === void 0) { + throw new RequiredError("AIApi", "sendAgentConversationMessageStreaming", "conversationIdentifier"); + } + if (sendAgentConversationMessageStreamingRequest === null || sendAgentConversationMessageStreamingRequest === void 0) { + throw new RequiredError("AIApi", "sendAgentConversationMessageStreaming", "sendAgentConversationMessageStreamingRequest"); + } + const localVarPath = "/api/rest/2.0/ai/agent/conversation/{conversation_identifier}/send/stream".replace("{conversation_identifier}", encodeURIComponent(String(conversationIdentifier))); + const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.25.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.25.0"); + const contentType = ObjectSerializer.getPreferredMediaType([ + "application/json" + ]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = ObjectSerializer.stringify( + ObjectSerializer.serialize(sendAgentConversationMessageStreamingRequest, "SendAgentConversationMessageStreamingRequest", ""), + contentType + ); + requestContext.setBody(serializedBody); + let authMethod; + authMethod = _config.authMethods["bearerAuth"]; + if (authMethod == null ? void 0 : authMethod.applySecurityAuthentication) { + yield authMethod == null ? void 0 : authMethod.applySecurityAuthentication(requestContext); + } + const defaultAuth = ((_a = _options == null ? void 0 : _options.authMethods) == null ? void 0 : _a.default) || ((_c = (_b = this.configuration) == null ? void 0 : _b.authMethods) == null ? void 0 : _c.default); + if (defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication) { + yield defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication(requestContext); + } + return requestContext; + }); + } + /** + * Version: 26.2.0.cl or later **Deprecated** — Use `sendAgentConversationMessage` instead. Send natural language messages to an existing Spotter agent conversation and returns the complete response synchronously. Requires `CAN_USE_SPOTTER` privilege and access to the metadata object associated with the conversation. The user must have access to the conversation session referenced by `conversation_identifier`. A conversation must first be created using the `createAgentConversation` API. #### Usage guidelines The request must include: - `conversation_identifier`: the unique session ID returned by `createAgentConversation`, used for context continuity and message tracking - `messages`: an array of one or more text messages to send to the agent The API returns an array of response objects, each containing: - `type`: the kind of response — `text`, `answer`, or `error` - `message`: the main content of the response - `metadata`: additional information depending on the message type (e.g., answer metadata includes analytics and visualization details) #### Error responses | Code | Description | |------|----------------------------------------------------------------------------------------------------------------------------------| | 401 | Unauthorized — authentication token is missing, expired, or invalid. | | 403 | Forbidden — the authenticated user does not have `CAN_USE_SPOTTER` privilege or lacks permission on the referenced conversation. | > ###### Note: > > - This endpoint is deprecated. Use `sendAgentConversationMessage` for new integrations. > - This endpoint is currently in Beta. Breaking changes may be introduced before the endpoint is made Generally Available. > - This endpoint requires Spotter - please contact ThoughtSpot support to enable Spotter on your cluster. + * @param conversationIdentifier Unique identifier for the conversation (used to track context) + * @param sendAgentMessageRequest + */ + sendAgentMessage(conversationIdentifier, sendAgentMessageRequest, _options) { + return __async(this, null, function* () { + var _a, _b, _c; + let _config = _options || this.configuration; + if (conversationIdentifier === null || conversationIdentifier === void 0) { + throw new RequiredError("AIApi", "sendAgentMessage", "conversationIdentifier"); + } + if (sendAgentMessageRequest === null || sendAgentMessageRequest === void 0) { + throw new RequiredError("AIApi", "sendAgentMessage", "sendAgentMessageRequest"); + } + const localVarPath = "/api/rest/2.0/ai/agent/{conversation_identifier}/converse".replace("{conversation_identifier}", encodeURIComponent(String(conversationIdentifier))); + const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.25.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.25.0"); + const contentType = ObjectSerializer.getPreferredMediaType([ + "application/json" + ]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = ObjectSerializer.stringify( + ObjectSerializer.serialize(sendAgentMessageRequest, "SendAgentMessageRequest", ""), + contentType + ); + requestContext.setBody(serializedBody); + let authMethod; + authMethod = _config.authMethods["bearerAuth"]; + if (authMethod == null ? void 0 : authMethod.applySecurityAuthentication) { + yield authMethod == null ? void 0 : authMethod.applySecurityAuthentication(requestContext); + } + const defaultAuth = ((_a = _options == null ? void 0 : _options.authMethods) == null ? void 0 : _a.default) || ((_c = (_b = this.configuration) == null ? void 0 : _b.authMethods) == null ? void 0 : _c.default); + if (defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication) { + yield defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication(requestContext); + } + return requestContext; + }); + } + /** + * Version: 26.2.0.cl or later **Deprecated** — Use `sendAgentConversationMessageStreaming` instead. Sends one or more natural language messages to an existing Spotter agent conversation and returns the response as a real-time Server-Sent Events stream. Requires `CAN_USE_SPOTTER` privilege and access to the metadata object associated with the conversation. The user must have access to the conversation session referenced by `conversation_identifier`. A conversation must first be created using the `createAgentConversation` API. #### Usage guidelines The request must include: - `conversation_identifier`: the unique session ID returned by `createAgentConversation`, used for context continuity and message tracking - `messages`: an array of one or more text messages to send to the agent If the request is valid, the API returns a Server-Sent Events (SSE) stream. Each line has the form `data: [{\"type\": \"...\", ...}]` — a JSON array of event objects. Event types include: - `ack`: confirms receipt of the request (`node_id`) - `conv_title`: conversation title (`title`, `conv_id`) - `notification`: status updates on operations (`group_id`, `metadata`, `code` — e.g. `TOOL_CALL_NOTIFICATION`, `nls_start`, `FINAL_RESPONSE_NOTIFICATION`) - `text-chunk`: incremental content chunks (`id`, `group_id`, `metadata` with `format` and `type` such as `thinking` or `text`, `content`) - `text`: full text block with same structure as `text-chunk` - `answer`: structured answer with metadata (`id`, `group_id`, `metadata` with `sage_query`, `session_id`, `title`, etc., `title`) - `error`: if a failure occurs #### Error responses | Code | Description | |------|----------------------------------------------------------------------------------------------------------------------------------| | 401 | Unauthorized — authentication token is missing, expired, or invalid. | | 403 | Forbidden — the authenticated user does not have `CAN_USE_SPOTTER` privilege or lacks permission on the referenced conversation. | > ###### Note: > > - This endpoint is deprecated. Use `sendAgentConversationMessageStreaming` for new integrations. > - This endpoint is currently in Beta. Breaking changes may be introduced before the endpoint is made Generally Available. > - This endpoint requires Spotter - please contact ThoughtSpot support to enable Spotter on your cluster. > - The streaming protocol uses Server-Sent Events (SSE). + * @param sendAgentMessageStreamingRequest + */ + sendAgentMessageStreaming(sendAgentMessageStreamingRequest, _options) { + return __async(this, null, function* () { + var _a, _b, _c; + let _config = _options || this.configuration; + if (sendAgentMessageStreamingRequest === null || sendAgentMessageStreamingRequest === void 0) { + throw new RequiredError("AIApi", "sendAgentMessageStreaming", "sendAgentMessageStreamingRequest"); + } + const localVarPath = "/api/rest/2.0/ai/agent/converse/sse"; + const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.25.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.25.0"); + const contentType = ObjectSerializer.getPreferredMediaType([ + "application/json" + ]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = ObjectSerializer.stringify( + ObjectSerializer.serialize(sendAgentMessageStreamingRequest, "SendAgentMessageStreamingRequest", ""), + contentType + ); + requestContext.setBody(serializedBody); + let authMethod; + authMethod = _config.authMethods["bearerAuth"]; + if (authMethod == null ? void 0 : authMethod.applySecurityAuthentication) { + yield authMethod == null ? void 0 : authMethod.applySecurityAuthentication(requestContext); + } + const defaultAuth = ((_a = _options == null ? void 0 : _options.authMethods) == null ? void 0 : _a.default) || ((_c = (_b = this.configuration) == null ? void 0 : _b.authMethods) == null ? void 0 : _c.default); + if (defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication) { + yield defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication(requestContext); + } + return requestContext; + }); + } + /** + * Version: 10.4.0.cl or later Sends a follow-up message to an existing conversation within the context of a data model. Requires `CAN_USE_SPOTTER` privilege and at least view access to the metadata object specified in the request. A conversation must first be created using the `createConversation` API. #### Usage guidelines The request must include: - `conversation_identifier`: the unique session ID returned by `createConversation` - `metadata_identifier`: the unique ID of the data source used for the conversation - `message`: a natural language string with the follow-up question If the request is successful, the API returns an array of response messages, each containing: - `session_identifier`: the unique ID of the generated response - `generation_number`: the generation number of the response - `message_type`: the type of the response (e.g., `TSAnswer`) - `visualization_type`: the generated visualization type (`Chart`, `Table`, or `Undefined`) - `tokens` / `display_tokens`: the search tokens and user-friendly display tokens for the response #### Error responses | Code | Description | |------|-----------------------------------------------------------------------------------------------------------------------------------------| | 401 | Unauthorized — authentication token is missing, expired, or invalid. | | 403 | Forbidden — the authenticated user does not have `CAN_USE_SPOTTER` privilege or lacks view permission on the specified metadata object. | > ###### Note: > * This endpoint is currently in Beta. Breaking changes may be introduced before the endpoint is made Generally Available. > * This endpoint requires Spotter - please contact ThoughtSpot support to enable Spotter on your cluster. + * @param conversationIdentifier Unique identifier of the conversation. + * @param sendMessageRequest + */ + sendMessage(conversationIdentifier, sendMessageRequest, _options) { + return __async(this, null, function* () { + var _a, _b, _c; + let _config = _options || this.configuration; + if (conversationIdentifier === null || conversationIdentifier === void 0) { + throw new RequiredError("AIApi", "sendMessage", "conversationIdentifier"); + } + if (sendMessageRequest === null || sendMessageRequest === void 0) { + throw new RequiredError("AIApi", "sendMessage", "sendMessageRequest"); + } + const localVarPath = "/api/rest/2.0/ai/conversation/{conversation_identifier}/converse".replace("{conversation_identifier}", encodeURIComponent(String(conversationIdentifier))); + const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.25.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.25.0"); + const contentType = ObjectSerializer.getPreferredMediaType([ + "application/json" + ]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = ObjectSerializer.stringify( + ObjectSerializer.serialize(sendMessageRequest, "SendMessageRequest", ""), + contentType + ); + requestContext.setBody(serializedBody); + let authMethod; + authMethod = _config.authMethods["bearerAuth"]; + if (authMethod == null ? void 0 : authMethod.applySecurityAuthentication) { + yield authMethod == null ? void 0 : authMethod.applySecurityAuthentication(requestContext); + } + const defaultAuth = ((_a = _options == null ? void 0 : _options.authMethods) == null ? void 0 : _a.default) || ((_c = (_b = this.configuration) == null ? void 0 : _b.authMethods) == null ? void 0 : _c.default); + if (defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication) { + yield defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication(requestContext); + } + return requestContext; + }); + } + /** + * Version: 10.15.0.cl or later This API allows users to set natural language (NL) instructions for a specific data-model to improve AI-generated answers and query processing. These instructions help guide the AI system to better understand the data context and provide more accurate responses. Requires `CAN_USE_SPOTTER` privilege, either edit access or `SPOTTER_COACHING_PRIVILEGE` on the data model, and a bearer token corresponding to the org where the data model exists. #### Usage guidelines To set NL instructions for a data-model, the request must include: - `data_source_identifier`: The unique ID of the data-model for which to set NL instructions - `nl_instructions_info`: An array of instruction objects, each containing: - `instructions`: Array of text instructions for the LLM - `scope`: The scope of the instruction (`GLOBAL`). Currently only `GLOBAL` is supported. It can be extended to data-model-user scope in future. #### Instructions scope - **GLOBAL**: instructions that apply to all users querying this data model If the request is successful, the API returns: - `success`: a boolean indicating whether the operation completed successfully #### Error responses | Code | Description | |------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| | 401 | Unauthorized — authentication token is missing, expired, or invalid. | | 403 | Forbidden — the authenticated user does not have `CAN_USE_SPOTTER` privilege, lacks edit access or `SPOTTER_COACHING_PRIVILEGE` on the data model, or the bearer token does not correspond to the org where the data model exists. | > ###### Note: > > - To use this API, the user needs either edit access or `SPOTTER_COACHING_PRIVILEGE` on the data model, and must use the bearer token corresponding to the org where the data model exists. > - This endpoint is currently in Beta. Breaking changes may be introduced before the endpoint is made Generally Available. > - Available from version 10.15.0.cl and later. > - This endpoint requires Spotter — please contact ThoughtSpot Support to enable Spotter on your cluster. > - Instructions help improve the accuracy and relevance of AI-generated responses for the specified data-model. + * @param setNLInstructionsRequest + */ + setNLInstructions(setNLInstructionsRequest, _options) { + return __async(this, null, function* () { + var _a, _b, _c; + let _config = _options || this.configuration; + if (setNLInstructionsRequest === null || setNLInstructionsRequest === void 0) { + throw new RequiredError("AIApi", "setNLInstructions", "setNLInstructionsRequest"); + } + const localVarPath = "/api/rest/2.0/ai/instructions/set"; + const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.25.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.25.0"); + const contentType = ObjectSerializer.getPreferredMediaType([ + "application/json" + ]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = ObjectSerializer.stringify( + ObjectSerializer.serialize(setNLInstructionsRequest, "SetNLInstructionsRequest", ""), + contentType + ); + requestContext.setBody(serializedBody); + let authMethod; + authMethod = _config.authMethods["bearerAuth"]; + if (authMethod == null ? void 0 : authMethod.applySecurityAuthentication) { + yield authMethod == null ? void 0 : authMethod.applySecurityAuthentication(requestContext); + } + const defaultAuth = ((_a = _options == null ? void 0 : _options.authMethods) == null ? void 0 : _a.default) || ((_c = (_b = this.configuration) == null ? void 0 : _b.authMethods) == null ? void 0 : _c.default); + if (defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication) { + yield defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication(requestContext); + } + return requestContext; + }); + } + /** + * Version: 10.4.0.cl or later Processes a natural language query against a specified data model and returns a single AI-generated answer without requiring a conversation session. Requires `CAN_USE_SPOTTER` privilege and at least view access to the metadata object specified in the request. #### Usage guidelines The request must include: - `query`: a natural language question (e.g., \"What were total sales last quarter?\") - `metadata_identifier`: the unique ID of the data source to query against If the request is successful, the API returns a response message containing: - `session_identifier`: the unique ID of the generated response - `generation_number`: the generation number of the response - `message_type`: the type of the response (e.g., `TSAnswer`) - `visualization_type`: the generated visualization type (`Chart`, `Table`, or `Undefined`) - `tokens` / `display_tokens`: the search tokens and user-friendly display tokens for the response #### Error responses | Code | Description | |------|-----------------------------------------------------------------------------------------------------------------------------------------| | 401 | Unauthorized — authentication token is missing, expired, or invalid. | | 403 | Forbidden — the authenticated user does not have `CAN_USE_SPOTTER` privilege or lacks view permission on the specified metadata object. | > ###### Note: > * This endpoint is currently in Beta. Breaking changes may be introduced before the endpoint is made Generally Available. > * This endpoint requires Spotter - please contact ThoughtSpot support to enable Spotter on your cluster. + * @param singleAnswerRequest + */ + singleAnswer(singleAnswerRequest, _options) { + return __async(this, null, function* () { + var _a, _b, _c; + let _config = _options || this.configuration; + if (singleAnswerRequest === null || singleAnswerRequest === void 0) { + throw new RequiredError("AIApi", "singleAnswer", "singleAnswerRequest"); + } + const localVarPath = "/api/rest/2.0/ai/answer/create"; + const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.25.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.25.0"); + const contentType = ObjectSerializer.getPreferredMediaType([ + "application/json" + ]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = ObjectSerializer.stringify( + ObjectSerializer.serialize(singleAnswerRequest, "SingleAnswerRequest", ""), + contentType + ); + requestContext.setBody(serializedBody); + let authMethod; + authMethod = _config.authMethods["bearerAuth"]; + if (authMethod == null ? void 0 : authMethod.applySecurityAuthentication) { + yield authMethod == null ? void 0 : authMethod.applySecurityAuthentication(requestContext); + } + const defaultAuth = ((_a = _options == null ? void 0 : _options.authMethods) == null ? void 0 : _a.default) || ((_c = (_b = this.configuration) == null ? void 0 : _b.authMethods) == null ? void 0 : _c.default); + if (defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication) { + yield defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication(requestContext); + } + return requestContext; + }); + } + /** + * Stops an in-progress agent conversation response. Version: 26.6.0.cl or later Version: 26.6.0.cl or later Stops an in-progress agent response for the specified conversation. Use this endpoint to cancel a response that is actively being generated — for example, when the user navigates away, reformulates their question, or no longer needs the current result. Requires `CAN_USE_SPOTTER` privilege and access to the specified conversation. #### Usage guidelines The request must include: - `conversation_identifier` *(path parameter)*: the unique ID of the conversation whose active response should be stopped, as returned by `createAgentConversation` A successful request returns an empty `204 No Content` response. If there is no active response in progress at the time of the call, the request is still treated as successful. After stopping a response, the conversation session remains active. You can continue sending messages using `sendAgentConversationMessage` or `sendAgentConversationMessageStreaming`. #### Example request ```bash POST /api/rest/2.0/ai/agent/conversation/{conversation_identifier}/stop-response ``` #### Typical usage scenario This endpoint is useful when integrating Spotter into a chat UI where users can cancel a long-running query. For example: 1. User sends a message via `sendAgentConversationMessageStreaming`. 2. User clicks a \"Stop generating\" button while the response is streaming. 3. Your client calls `stopConversation` with the active `conversation_identifier`. 4. The stream is terminated and the user can ask a new question. #### Error responses | Code | Description | |------|-------------| | 401 | Unauthorized — authentication token is missing, expired, or invalid. | | 403 | Forbidden — the authenticated user does not have `CAN_USE_SPOTTER` privilege or lacks access to the specified conversation. | > ###### Note: > > - Calling this endpoint when no response is in progress does not return an error. > - The conversation context is preserved after stopping — previous messages and answers remain accessible. > - Available from version 26.6.0.cl and later. > - This endpoint requires Spotter — please contact ThoughtSpot Support to enable Spotter on your cluster. > - This feature is available only for **Spotter 3** (`SPOTTER3`) version. + * @param conversationIdentifier Unique identifier of the conversation to stop. + */ + stopConversation(conversationIdentifier, _options) { + return __async(this, null, function* () { + var _a, _b, _c; + let _config = _options || this.configuration; + if (conversationIdentifier === null || conversationIdentifier === void 0) { + throw new RequiredError("AIApi", "stopConversation", "conversationIdentifier"); + } + const localVarPath = "/api/rest/2.0/ai/agent/conversation/{conversation_identifier}/stop-response".replace("{conversation_identifier}", encodeURIComponent(String(conversationIdentifier))); + const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.25.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.25.0"); + let authMethod; + authMethod = _config.authMethods["bearerAuth"]; + if (authMethod == null ? void 0 : authMethod.applySecurityAuthentication) { + yield authMethod == null ? void 0 : authMethod.applySecurityAuthentication(requestContext); + } + const defaultAuth = ((_a = _options == null ? void 0 : _options.authMethods) == null ? void 0 : _a.default) || ((_c = (_b = this.configuration) == null ? void 0 : _b.authMethods) == null ? void 0 : _c.default); + if (defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication) { + yield defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication(requestContext); + } + return requestContext; + }); + } +}; +var AIApiResponseProcessor = class { + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to createAgentConversation + * @throws ApiException if the response code was not in [200, 299] + */ + createAgentConversation(response) { + return __async(this, null, function* () { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("200", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "AgentConversation", + "" + ); + return body; + } + if (isCodeInRange("201", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "AgentConversation", + "" + ); + return body; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Operation failed", body, response.headers); + } + if (isCodeInRange("401", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Operation failed", body, response.headers); + } + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "AgentConversation", + "" + ); + return body; + } + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", yield response.getBodyAsAny(), response.headers); + }); + } + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to createConversation + * @throws ApiException if the response code was not in [200, 299] + */ + createConversation(response) { + return __async(this, null, function* () { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("200", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "Conversation", + "" + ); + return body; + } + if (isCodeInRange("201", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "Conversation", + "" + ); + return body; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Operation failed", body, response.headers); + } + if (isCodeInRange("401", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Operation failed", body, response.headers); + } + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "Conversation", + "" + ); + return body; + } + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", yield response.getBodyAsAny(), response.headers); + }); + } + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to getDataSourceSuggestions + * @throws ApiException if the response code was not in [200, 299] + */ + getDataSourceSuggestions(response) { + return __async(this, null, function* () { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("200", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "EurekaDataSourceSuggestionResponse", + "" + ); + return body; + } + if (isCodeInRange("201", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "EurekaDataSourceSuggestionResponse", + "" + ); + return body; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Operation failed", body, response.headers); + } + if (isCodeInRange("401", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Operation failed", body, response.headers); + } + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "EurekaDataSourceSuggestionResponse", + "" + ); + return body; + } + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", yield response.getBodyAsAny(), response.headers); + }); + } + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to getNLInstructions + * @throws ApiException if the response code was not in [200, 299] + */ + getNLInstructions(response) { + return __async(this, null, function* () { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("200", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "EurekaGetNLInstructionsResponse", + "" + ); + return body; + } + if (isCodeInRange("201", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "EurekaGetNLInstructionsResponse", + "" + ); + return body; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Operation failed", body, response.headers); + } + if (isCodeInRange("401", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Operation failed", body, response.headers); + } + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "EurekaGetNLInstructionsResponse", + "" + ); + return body; + } + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", yield response.getBodyAsAny(), response.headers); + }); + } + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to getRelevantQuestions + * @throws ApiException if the response code was not in [200, 299] + */ + getRelevantQuestions(response) { + return __async(this, null, function* () { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("200", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "EurekaGetRelevantQuestionsResponse", + "" + ); + return body; + } + if (isCodeInRange("201", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "EurekaGetRelevantQuestionsResponse", + "" + ); + return body; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Operation failed", body, response.headers); + } + if (isCodeInRange("401", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Operation failed", body, response.headers); + } + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "EurekaGetRelevantQuestionsResponse", + "" + ); + return body; + } + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", yield response.getBodyAsAny(), response.headers); + }); + } + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to queryGetDecomposedQuery + * @throws ApiException if the response code was not in [200, 299] + */ + queryGetDecomposedQuery(response) { + return __async(this, null, function* () { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("200", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "EurekaDecomposeQueryResponse", + "" + ); + return body; + } + if (isCodeInRange("201", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "EurekaDecomposeQueryResponse", + "" + ); + return body; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Operation failed", body, response.headers); + } + if (isCodeInRange("401", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Operation failed", body, response.headers); + } + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "EurekaDecomposeQueryResponse", + "" + ); + return body; + } + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", yield response.getBodyAsAny(), response.headers); + }); + } + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to sendAgentConversationMessage + * @throws ApiException if the response code was not in [200, 299] + */ + sendAgentConversationMessage(response) { + return __async(this, null, function* () { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("200", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "any", + "" + ); + return body; + } + if (isCodeInRange("201", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "any", + "" + ); + return body; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Operation failed", body, response.headers); + } + if (isCodeInRange("401", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Operation failed", body, response.headers); + } + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "any", + "" + ); + return body; + } + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", yield response.getBodyAsAny(), response.headers); + }); + } + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to sendAgentConversationMessageStreaming + * @throws ApiException if the response code was not in [200, 299] + */ + sendAgentConversationMessageStreaming(response) { + return __async(this, null, function* () { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("200", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "SendAgentMessageResponse", + "" + ); + return body; + } + if (isCodeInRange("201", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "SendAgentMessageResponse", + "" + ); + return body; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Operation failed", body, response.headers); + } + if (isCodeInRange("401", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Operation failed", body, response.headers); + } + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "SendAgentMessageResponse", + "" + ); + return body; + } + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", yield response.getBodyAsAny(), response.headers); + }); + } + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to sendAgentMessage + * @throws ApiException if the response code was not in [200, 299] + */ + sendAgentMessage(response) { + return __async(this, null, function* () { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("200", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "any", + "" + ); + return body; + } + if (isCodeInRange("201", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "any", + "" + ); + return body; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Operation failed", body, response.headers); + } + if (isCodeInRange("401", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Operation failed", body, response.headers); + } + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "any", + "" + ); + return body; + } + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", yield response.getBodyAsAny(), response.headers); + }); + } + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to sendAgentMessageStreaming + * @throws ApiException if the response code was not in [200, 299] + */ + sendAgentMessageStreaming(response) { + return __async(this, null, function* () { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("200", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "SendAgentMessageResponse", + "" + ); + return body; + } + if (isCodeInRange("201", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "SendAgentMessageResponse", + "" + ); + return body; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Operation failed", body, response.headers); + } + if (isCodeInRange("401", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Operation failed", body, response.headers); + } + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "SendAgentMessageResponse", + "" + ); + return body; + } + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", yield response.getBodyAsAny(), response.headers); + }); + } + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to sendMessage + * @throws ApiException if the response code was not in [200, 299] + */ + sendMessage(response) { + return __async(this, null, function* () { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("200", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "Array", + "" + ); + return body; + } + if (isCodeInRange("201", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "Array", + "" + ); + return body; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Operation failed", body, response.headers); + } + if (isCodeInRange("401", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Operation failed", body, response.headers); + } + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "Array", + "" + ); + return body; + } + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", yield response.getBodyAsAny(), response.headers); + }); + } + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to setNLInstructions + * @throws ApiException if the response code was not in [200, 299] + */ + setNLInstructions(response) { + return __async(this, null, function* () { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("200", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "EurekaSetNLInstructionsResponse", + "" + ); + return body; + } + if (isCodeInRange("201", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "EurekaSetNLInstructionsResponse", + "" + ); + return body; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Operation failed", body, response.headers); + } + if (isCodeInRange("401", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Operation failed", body, response.headers); + } + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "EurekaSetNLInstructionsResponse", + "" + ); + return body; + } + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", yield response.getBodyAsAny(), response.headers); + }); + } + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to singleAnswer + * @throws ApiException if the response code was not in [200, 299] + */ + singleAnswer(response) { + return __async(this, null, function* () { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("200", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ResponseMessage", + "" + ); + return body; + } + if (isCodeInRange("201", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ResponseMessage", + "" + ); + return body; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Operation failed", body, response.headers); + } + if (isCodeInRange("401", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Operation failed", body, response.headers); + } + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ResponseMessage", + "" + ); + return body; + } + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", yield response.getBodyAsAny(), response.headers); + }); + } + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to stopConversation + * @throws ApiException if the response code was not in [200, 299] + */ + stopConversation(response) { + return __async(this, null, function* () { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("204", response.httpStatusCode)) { + return; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Operation failed", body, response.headers); + } + if (isCodeInRange("401", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Operation failed", body, response.headers); + } + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "void", + "" + ); + return body; + } + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", yield response.getBodyAsAny(), response.headers); + }); + } +}; + +// apis/AuthenticationApi.ts +var AuthenticationApiRequestFactory = class extends BaseAPIRequestFactory { + /** + * Version: 26.6.0.cl or later Enables or disables authentication at cluster or org level for the specified auth type. Currently supports `TRUSTED_AUTH`. #### Required privileges Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) or `CONTROL_TRUSTED_AUTH` (**Can Enable or Disable Trusted Authentication**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled, the `CONTROL_TRUSTED_AUTH` privilege is required. #### Usage guidelines Use `cluster_preferences` to enable or disable authentication at the cluster level. Cluster-level settings can only be configured from the Primary Org. - `ENABLED` — Generates a new access token if one does not exist. An existing token is preserved. - `DISABLED` — Revokes the existing cluster-level access token. Use `org_preferences` to enable or disable authentication for one or more Orgs. Each entry must include an `org_identifier` (unique ID or name) and an `auth_status`. Org-level configuration requires the per-Org authentication feature to be enabled on your instance. - `ENABLED` — Generates a new org-level access token if one does not exist. - `DISABLED` — Revokes the existing org-level access token for that Org. Both `cluster_preferences` and `org_preferences` are optional. Omitting a field leaves the corresponding settings unchanged. If both are omitted, the API returns `204 No Content` without making any changes. **Note**: Cluster-level and org-level settings are independent of each other. Enabling or disabling one does not affect the other. + * @param configureAuthSettingsRequest + */ + configureAuthSettings(configureAuthSettingsRequest, _options) { + return __async(this, null, function* () { + var _a, _b, _c; + let _config = _options || this.configuration; + if (configureAuthSettingsRequest === null || configureAuthSettingsRequest === void 0) { + throw new RequiredError("AuthenticationApi", "configureAuthSettings", "configureAuthSettingsRequest"); + } + const localVarPath = "/api/rest/2.0/auth/configure"; + const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.25.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.25.0"); + const contentType = ObjectSerializer.getPreferredMediaType([ + "application/json" + ]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = ObjectSerializer.stringify( + ObjectSerializer.serialize(configureAuthSettingsRequest, "ConfigureAuthSettingsRequest", ""), + contentType + ); + requestContext.setBody(serializedBody); + let authMethod; + authMethod = _config.authMethods["bearerAuth"]; + if (authMethod == null ? void 0 : authMethod.applySecurityAuthentication) { + yield authMethod == null ? void 0 : authMethod.applySecurityAuthentication(requestContext); + } + const defaultAuth = ((_a = _options == null ? void 0 : _options.authMethods) == null ? void 0 : _a.default) || ((_c = (_b = this.configuration) == null ? void 0 : _b.authMethods) == null ? void 0 : _c.default); + if (defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication) { + yield defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication(requestContext); + } + return requestContext; + }); + } + /** + * Version: 9.0.0.cl or later Retrieves details of the current user session for the token provided in the request header. Any ThoughtSpot user can access this endpoint and send an API request. The data returned in the API response varies according to user\'s privilege and object access permissions. **NOTE**: In ThoughtSpot, users with cluster administration privileges can access all Orgs by default. However, unless the administrator is explicitly added to an Org, the Orgs list in the session information returned by the API will include only the Primary Org. To include other Orgs in the API response, you must explicitly add the administrator to each Org in the Admin settings page in the UI or via user REST API. + */ + getCurrentUserInfo(_options) { + return __async(this, null, function* () { + var _a, _b, _c; + let _config = _options || this.configuration; + const localVarPath = "/api/rest/2.0/auth/session/user"; + const requestContext = _config.baseServer.makeRequestContext(localVarPath, "GET" /* GET */); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.25.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.25.0"); + let authMethod; + authMethod = _config.authMethods["bearerAuth"]; + if (authMethod == null ? void 0 : authMethod.applySecurityAuthentication) { + yield authMethod == null ? void 0 : authMethod.applySecurityAuthentication(requestContext); + } + const defaultAuth = ((_a = _options == null ? void 0 : _options.authMethods) == null ? void 0 : _a.default) || ((_c = (_b = this.configuration) == null ? void 0 : _b.authMethods) == null ? void 0 : _c.default); + if (defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication) { + yield defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication(requestContext); + } + return requestContext; + }); + } + /** + * Version: 9.4.0.cl or later Retrieves details of the current session token for the bearer token provided in the request header. This API endpoint does not create a new token. Instead, it returns details about the token, including the token string, creation time, expiration time, and the associated user. Use this endpoint to introspect your current session token, debug authentication issues, or when a frontend application needs session token details. Any ThoughtSpot user with a valid bearer token can access this endpoint and send an API request + */ + getCurrentUserToken(_options) { + return __async(this, null, function* () { + var _a, _b, _c; + let _config = _options || this.configuration; + const localVarPath = "/api/rest/2.0/auth/session/token"; + const requestContext = _config.baseServer.makeRequestContext(localVarPath, "GET" /* GET */); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.25.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.25.0"); + let authMethod; + authMethod = _config.authMethods["bearerAuth"]; + if (authMethod == null ? void 0 : authMethod.applySecurityAuthentication) { + yield authMethod == null ? void 0 : authMethod.applySecurityAuthentication(requestContext); + } + const defaultAuth = ((_a = _options == null ? void 0 : _options.authMethods) == null ? void 0 : _a.default) || ((_c = (_b = this.configuration) == null ? void 0 : _b.authMethods) == null ? void 0 : _c.default); + if (defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication) { + yield defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication(requestContext); + } + return requestContext; + }); + } + /** + * Version: 10.4.0.cl or later Creates an authentication token that provides values for the formula variables in the Row Level Security (RLS) rules for a given user. Recommended for use cases that require Attribute-based access control (ABAC) via RLS. #### Required privileges To add a new user and assign privileges during auto-creation, the `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege is required. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled, the `CONTROL_TRUSTED_AUTH` (**Can Enable or Disable Trusted Authentication**) privilege and edit access to the data source are required. To configure formula variables for all Orgs on your instance or the Primary Org, cluster administration privileges are required. Org administrators can configure formula variables for their respective Orgs. If Role-Based Access Control (RBAC) is enabled, users with the `CAN_MANAGE_VARIABLES` (**Can manage variables**) role privilege can also create and manage variables for their Org context. #### Usage guidelines You can generate a token by providing a `username` and `password`, or by using a `secret_key`. To generate a `secret_key`, the administrator must enable [Trusted authentication](https://developers.thoughtspot.com/docs/trusted-auth-secret-key) in the **Develop** > **Customizations** > **Security Settings** page. **Note**: * When both `password` and `secret_key` are included in the API request, `password` takes precedence. * If [Multi-Factor Authentication (MFA)](https://docs.thoughtspot.com/cloud/latest/authentication-local-mfa) is enabled on your instance, the API login request with `username` and `password` returns an error. You can switch to token-based authentication with `secret_key` or contact ThoughtSpot Support for assistance. The token obtained from ThoughtSpot is valid for 5 minutes by default. You can configure the token expiration time as required. #### ABAC via RLS To implement ABAC via RLS and assign security entitlements to users during session creation, generate a token with custom variable values. The values set in the authentication token are applied to the formula variables referenced in RLS rules at the table level, which determines the data each user can access based on their entitlements. The variable values can be configured to persist for a specific set of Models in user sessions initiated with the token, allowing different RLS rules to be set for different data models. Once defined, the rules are added to the user\'s `variable_values` object, after which all sessions will use the persisted values. For more information, see [ABAC via tokens Documentation](https://developers.thoughtspot.com/docs/abac-via-rls-variables). ##### Formula variables Before defining variable values, ensure the variables are created and available on your instance. To create a formula variable, you can use the **Create variable** (`/api/rest/2.0/template/variables/create`) REST API endpoint, with the variable `type` set as `Formula_Variable` in the API request. The API doesn\'t support `\"persist_option\": \"RESET\"` and `\"persist_option\": \"NONE\"` when `variable_values` are defined in the request. If you are using `variable_values` for token generation, you must use other supported persist options such as `APPEND` or `REPLACE`. If you want to use `RESET` or `NONE`, do not pass any `variable_values`. In such cases, `variable_values` will remain unaffected. #### Supported objects The supported object type is `LOGICAL_TABLE`. When using `object_id` with `variable_values`, models are supported. #### Just-in-time provisioning For [just-in-time user creation and provisioning](https://developers.thoughtspot.com/docs/just-in-time-provisioning), specify the following attributes in the API request: * `auto_create` * `username` * `display_name` * `email` * `groups` Set `auto_create` to `true` if the username does not exist in ThoughtSpot. If the username already exists in ThoughtSpot and `auto_create` is set to `true`, user properties such as display name, email, Org and group entitlements will not be updated with new values. Setting `auto_create` to `true` does not create formula variables. Hence, this setting will not be applicable to `variable_values`. #### Important point to note All options in the token creation APIs that define user access to data in ThoughtSpot will take effect during token creation, not when the token is used for authentication. For example, `auto_create:true` will create the user when the authentication token is created. Persist options such as `APPEND` and `REPLACE` will persist `variable_values` on the user profile when the token is created. + * @param getCustomAccessTokenRequest + */ + getCustomAccessToken(getCustomAccessTokenRequest, _options) { + return __async(this, null, function* () { + var _a, _b, _c; + let _config = _options || this.configuration; + if (getCustomAccessTokenRequest === null || getCustomAccessTokenRequest === void 0) { + throw new RequiredError("AuthenticationApi", "getCustomAccessToken", "getCustomAccessTokenRequest"); + } + const localVarPath = "/api/rest/2.0/auth/token/custom"; + const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.25.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.25.0"); + const contentType = ObjectSerializer.getPreferredMediaType([ + "application/json" + ]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = ObjectSerializer.stringify( + ObjectSerializer.serialize(getCustomAccessTokenRequest, "GetCustomAccessTokenRequest", ""), + contentType + ); + requestContext.setBody(serializedBody); + const defaultAuth = ((_a = _options == null ? void 0 : _options.authMethods) == null ? void 0 : _a.default) || ((_c = (_b = this.configuration) == null ? void 0 : _b.authMethods) == null ? void 0 : _c.default); + if (defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication) { + yield defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication(requestContext); + } + return requestContext; + }); + } + /** + * Version: 9.0.0.cl or later Generates an authentication token for creating a full session in ThoughtSpot for a given user. Recommended for use cases that do not require Attribute-based access control (ABAC) via Row Level Security (RLS). #### Usage guidelines You can generate a token for a user by providing a `username` and `password`, or by using the `secret_key` generated for your instance. To generate a `secret_key`, the administrator must enable [Trusted authentication](https://developers.thoughtspot.com/docs/trusted-auth-secret-key) in the **Develop** > **Customizations** > **Security Settings** page. **Note**: * When both `password` and `secret_key` are included in the API request, `password` takes precedence. * If [Multi-Factor Authentication (MFA)](https://docs.thoughtspot.com/cloud/latest/authentication-local-mfa) is enabled on your instance, the API login request with `username` and `password` returns an error. You can switch to token-based authentication with `secret_key` or contact ThoughtSpot Support for assistance. The token obtained from ThoughtSpot is valid for 5 minutes by default. You can configure the token expiration time as required. #### Just-in-time provisioning For [just-in-time user creation and provisioning](https://developers.thoughtspot.com/docs/just-in-time-provisioning), specify the following attributes in the API request: * `auto_create` * `username` * `display_name` * `email` * `group_identifiers` Set `auto_create` to `true` if the username does not exist in ThoughtSpot. If the user already exists in ThoughtSpot and `auto_create` is set to `true`, user properties such as display name, email and group assignment will be updated. To add a new user and assign privileges during auto-creation, the `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege is required. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled, the `CONTROL_TRUSTED_AUTH` (**Can Enable or Disable Trusted Authentication**) privilege is required. #### Important point to note All options in the token creation APIs that define user access to data in ThoughtSpot will take effect during token creation, not when the token is used for authentication. For example, `auto_create:true` will create the user when the authentication token is created. + * @param getFullAccessTokenRequest + */ + getFullAccessToken(getFullAccessTokenRequest, _options) { + return __async(this, null, function* () { + var _a, _b, _c; + let _config = _options || this.configuration; + if (getFullAccessTokenRequest === null || getFullAccessTokenRequest === void 0) { + throw new RequiredError("AuthenticationApi", "getFullAccessToken", "getFullAccessTokenRequest"); + } + const localVarPath = "/api/rest/2.0/auth/token/full"; + const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.25.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.25.0"); + const contentType = ObjectSerializer.getPreferredMediaType([ + "application/json" + ]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = ObjectSerializer.stringify( + ObjectSerializer.serialize(getFullAccessTokenRequest, "GetFullAccessTokenRequest", ""), + contentType + ); + requestContext.setBody(serializedBody); + const defaultAuth = ((_a = _options == null ? void 0 : _options.authMethods) == null ? void 0 : _a.default) || ((_c = (_b = this.configuration) == null ? void 0 : _b.authMethods) == null ? void 0 : _c.default); + if (defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication) { + yield defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication(requestContext); + } + return requestContext; + }); + } + /** + * Version: 9.0.0.cl or later Generates an authentication token that provides access to a specific metadata object. This object list is intersected with the list of objects the user is allowed to access via group membership. For more information, see [Object security](https://docs.thoughtspot.com/cloud/latest/security-data-object#object_security). #### Usage guidelines You can generate a token for a user by providing a `username` and `password`, or by using the `secret_key` generated for your instance. To generate a `secret_key`, the administrator must enable [Trusted authentication](https://developers.thoughtspot.com/docs/trusted-auth-secret-key) in the **Develop** > **Customizations** > **Security Settings** page. **Note**: * When both `password` and `secret_key` are included in the API request, `password` takes precedence. * If [Multi-Factor Authentication (MFA)](https://docs.thoughtspot.com/cloud/latest/authentication-local-mfa) is enabled on your instance, the API login request with `username` and `password` returns an error. You can switch to token-based authentication with `secret_key` or contact ThoughtSpot Support for assistance. The token obtained from ThoughtSpot is valid for 5 minutes by default. You can configure the token expiration time as required. #### Just-in-time provisioning For [just-in-time user creation and provisioning](https://developers.thoughtspot.com/docs/just-in-time-provisioning), specify the following attributes in the API request: * `auto_create` * `username` * `display_name` * `email` * `group_identifiers` Set `auto_create` to `true` if the user is not available in ThoughtSpot. If the user already exists in ThoughtSpot and the `auto_create` parameter is set to `true`, user properties such as display name, email, and group assignment will be updated. To add a new user and assign privileges, the `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege is required. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled, the `CONTROL_TRUSTED_AUTH`(**Can Enable or Disable Trusted Authentication**) privilege is required. #### Important point to note All options in the token creation APIs that define user access to data in ThoughtSpot will take effect during token creation, not when the token is used for authentication. For example, `auto_create:true` will create the user when the authentication token is created. + * @param getObjectAccessTokenRequest + */ + getObjectAccessToken(getObjectAccessTokenRequest, _options) { + return __async(this, null, function* () { + var _a, _b, _c; + let _config = _options || this.configuration; + if (getObjectAccessTokenRequest === null || getObjectAccessTokenRequest === void 0) { + throw new RequiredError("AuthenticationApi", "getObjectAccessToken", "getObjectAccessTokenRequest"); + } + const localVarPath = "/api/rest/2.0/auth/token/object"; + const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.25.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.25.0"); + const contentType = ObjectSerializer.getPreferredMediaType([ + "application/json" + ]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = ObjectSerializer.stringify( + ObjectSerializer.serialize(getObjectAccessTokenRequest, "GetObjectAccessTokenRequest", ""), + contentType + ); + requestContext.setBody(serializedBody); + const defaultAuth = ((_a = _options == null ? void 0 : _options.authMethods) == null ? void 0 : _a.default) || ((_c = (_b = this.configuration) == null ? void 0 : _b.authMethods) == null ? void 0 : _c.default); + if (defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication) { + yield defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication(requestContext); + } + return requestContext; + }); + } + /** + * Version: 9.0.0.cl or later Creates a login session for a ThoughtSpot user with Basic authentication. In Basic authentication method, REST clients log in to ThoughtSpot using `username` and `password` attributes. On a multi-tenant cluster with Orgs, users can pass the ID of the Org in the API request to log in to a specific Org context. **Note**: If Multi-Factor Authentication (MFA) is enabled on your instance, the API login request with basic authentication (`username` and `password` ) returns an error. Contact ThoughtSpot Support for assistance. A successful login returns a session cookie that can be used in your subsequent API requests. + * @param loginRequest + */ + login(loginRequest, _options) { + return __async(this, null, function* () { + var _a, _b, _c; + let _config = _options || this.configuration; + if (loginRequest === null || loginRequest === void 0) { + throw new RequiredError("AuthenticationApi", "login", "loginRequest"); + } + const localVarPath = "/api/rest/2.0/auth/session/login"; + const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.25.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.25.0"); + const contentType = ObjectSerializer.getPreferredMediaType([ + "application/json" + ]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = ObjectSerializer.stringify( + ObjectSerializer.serialize(loginRequest, "LoginRequest", ""), + contentType + ); + requestContext.setBody(serializedBody); + let authMethod; + authMethod = _config.authMethods["bearerAuth"]; + if (authMethod == null ? void 0 : authMethod.applySecurityAuthentication) { + yield authMethod == null ? void 0 : authMethod.applySecurityAuthentication(requestContext); + } + const defaultAuth = ((_a = _options == null ? void 0 : _options.authMethods) == null ? void 0 : _a.default) || ((_c = (_b = this.configuration) == null ? void 0 : _b.authMethods) == null ? void 0 : _c.default); + if (defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication) { + yield defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication(requestContext); + } + return requestContext; + }); + } + /** + * Version: 9.0.0.cl or later Logs out a user from their current session. + */ + logout(_options) { + return __async(this, null, function* () { + var _a, _b, _c; + let _config = _options || this.configuration; + const localVarPath = "/api/rest/2.0/auth/session/logout"; + const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.25.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.25.0"); + let authMethod; + authMethod = _config.authMethods["bearerAuth"]; + if (authMethod == null ? void 0 : authMethod.applySecurityAuthentication) { + yield authMethod == null ? void 0 : authMethod.applySecurityAuthentication(requestContext); + } + const defaultAuth = ((_a = _options == null ? void 0 : _options.authMethods) == null ? void 0 : _a.default) || ((_c = (_b = this.configuration) == null ? void 0 : _b.authMethods) == null ? void 0 : _c.default); + if (defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication) { + yield defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication(requestContext); + } + return requestContext; + }); + } + /** + * Version: 9.0.0.cl or later Revokes the authentication token issued for current user session. The token of your current session expires when you make a call to the `/api/rest/2.0/auth/token/revoke` endpoint. the users will not be able to access ThoughtSpot objects until a new token is obtained. To restart your session, request for a new token from ThoughtSpot. See [Get Full Access Token](#/http/api-endpoints/authentication/get-full-access-token). + * @param revokeTokenRequest + */ + revokeToken(revokeTokenRequest, _options) { + return __async(this, null, function* () { + var _a, _b, _c; + let _config = _options || this.configuration; + if (revokeTokenRequest === null || revokeTokenRequest === void 0) { + throw new RequiredError("AuthenticationApi", "revokeToken", "revokeTokenRequest"); + } + const localVarPath = "/api/rest/2.0/auth/token/revoke"; + const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.25.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.25.0"); + const contentType = ObjectSerializer.getPreferredMediaType([ + "application/json" + ]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = ObjectSerializer.stringify( + ObjectSerializer.serialize(revokeTokenRequest, "RevokeTokenRequest", ""), + contentType + ); + requestContext.setBody(serializedBody); + let authMethod; + authMethod = _config.authMethods["bearerAuth"]; + if (authMethod == null ? void 0 : authMethod.applySecurityAuthentication) { + yield authMethod == null ? void 0 : authMethod.applySecurityAuthentication(requestContext); + } + const defaultAuth = ((_a = _options == null ? void 0 : _options.authMethods) == null ? void 0 : _a.default) || ((_c = (_b = this.configuration) == null ? void 0 : _b.authMethods) == null ? void 0 : _c.default); + if (defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication) { + yield defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication(requestContext); + } + return requestContext; + }); + } + /** + * Version: 26.6.0.cl or later Returns the authentication configuration for the specified auth type at cluster and org level. Currently supports `TRUSTED_AUTH`. #### Required privileges Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) or `CONTROL_TRUSTED_AUTH` (**Can Enable or Disable Trusted Authentication**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled, the `CONTROL_TRUSTED_AUTH` privilege is required. #### Usage guidelines Use `scope` to control which level of settings are returned: - `CLUSTER` — Returns cluster-level authentication status and access tokens. Accessible only from the Primary Org. - `ORG` — Returns org-level authentication status and access tokens for the current Org. Requires the per-Org authentication feature to be enabled on your instance. - If `scope` is omitted, both cluster and org-level settings are returned based on the caller\'s org context and feature availability. The `access_tokens` array in `cluster_preferences` or `org_preferences` is omitted when no token is configured at that level. **Note**: Access tokens returned in the response are sensitive credentials. Treat them with the same care as passwords. + * @param searchAuthSettingsRequest + */ + searchAuthSettings(searchAuthSettingsRequest, _options) { + return __async(this, null, function* () { + var _a, _b, _c; + let _config = _options || this.configuration; + if (searchAuthSettingsRequest === null || searchAuthSettingsRequest === void 0) { + throw new RequiredError("AuthenticationApi", "searchAuthSettings", "searchAuthSettingsRequest"); + } + const localVarPath = "/api/rest/2.0/auth/search"; + const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.25.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.25.0"); + const contentType = ObjectSerializer.getPreferredMediaType([ + "application/json" + ]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = ObjectSerializer.stringify( + ObjectSerializer.serialize(searchAuthSettingsRequest, "SearchAuthSettingsRequest", ""), + contentType + ); + requestContext.setBody(serializedBody); + let authMethod; + authMethod = _config.authMethods["bearerAuth"]; + if (authMethod == null ? void 0 : authMethod.applySecurityAuthentication) { + yield authMethod == null ? void 0 : authMethod.applySecurityAuthentication(requestContext); + } + const defaultAuth = ((_a = _options == null ? void 0 : _options.authMethods) == null ? void 0 : _a.default) || ((_c = (_b = this.configuration) == null ? void 0 : _b.authMethods) == null ? void 0 : _c.default); + if (defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication) { + yield defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication(requestContext); + } + return requestContext; + }); + } + /** + * Version: 9.12.0.cl or later Validates the authentication token specified in the API request. If your token is not valid, [Get a new token](#/http/api-endpoints/authentication/get-full-access-token). + * @param validateTokenRequest + */ + validateToken(validateTokenRequest, _options) { + return __async(this, null, function* () { + var _a, _b, _c; + let _config = _options || this.configuration; + if (validateTokenRequest === null || validateTokenRequest === void 0) { + throw new RequiredError("AuthenticationApi", "validateToken", "validateTokenRequest"); + } + const localVarPath = "/api/rest/2.0/auth/token/validate"; + const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.25.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.25.0"); + const contentType = ObjectSerializer.getPreferredMediaType([ + "application/json" + ]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = ObjectSerializer.stringify( + ObjectSerializer.serialize(validateTokenRequest, "ValidateTokenRequest", ""), + contentType + ); + requestContext.setBody(serializedBody); + let authMethod; + authMethod = _config.authMethods["bearerAuth"]; + if (authMethod == null ? void 0 : authMethod.applySecurityAuthentication) { + yield authMethod == null ? void 0 : authMethod.applySecurityAuthentication(requestContext); + } + const defaultAuth = ((_a = _options == null ? void 0 : _options.authMethods) == null ? void 0 : _a.default) || ((_c = (_b = this.configuration) == null ? void 0 : _b.authMethods) == null ? void 0 : _c.default); + if (defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication) { + yield defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication(requestContext); + } + return requestContext; + }); + } +}; +var AuthenticationApiResponseProcessor = class { + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to configureAuthSettings + * @throws ApiException if the response code was not in [200, 299] + */ + configureAuthSettings(response) { + return __async(this, null, function* () { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("204", response.httpStatusCode)) { + return; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Invalid request.", body, response.headers); + } + if (isCodeInRange("401", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unexpected error", body, response.headers); + } + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "void", + "" + ); + return body; + } + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", yield response.getBodyAsAny(), response.headers); + }); + } + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to getCurrentUserInfo + * @throws ApiException if the response code was not in [200, 299] + */ + getCurrentUserInfo(response) { + return __async(this, null, function* () { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("200", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "User", + "" + ); + return body; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Invalid request.", body, response.headers); + } + if (isCodeInRange("401", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unexpected error", body, response.headers); + } + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "User", + "" + ); + return body; + } + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", yield response.getBodyAsAny(), response.headers); + }); + } + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to getCurrentUserToken + * @throws ApiException if the response code was not in [200, 299] + */ + getCurrentUserToken(response) { + return __async(this, null, function* () { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("200", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "GetTokenResponse", + "" + ); + return body; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Invalid request.", body, response.headers); + } + if (isCodeInRange("401", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unexpected error", body, response.headers); + } + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "GetTokenResponse", + "" + ); + return body; + } + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", yield response.getBodyAsAny(), response.headers); + }); + } + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to getCustomAccessToken + * @throws ApiException if the response code was not in [200, 299] + */ + getCustomAccessToken(response) { + return __async(this, null, function* () { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("200", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "AccessToken", + "" + ); + return body; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Invalid request. This could be due to missing or incorrect parameters.", body, response.headers); + } + if (isCodeInRange("401", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unauthorized access. The request could not be authenticated.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Forbidden access. The user does not have permission to access this resource.", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "An unexpected error occurred on the server.", body, response.headers); + } + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "AccessToken", + "" + ); + return body; + } + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", yield response.getBodyAsAny(), response.headers); + }); + } + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to getFullAccessToken + * @throws ApiException if the response code was not in [200, 299] + */ + getFullAccessToken(response) { + return __async(this, null, function* () { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("200", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "Token", + "" + ); + return body; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Invalid request.", body, response.headers); + } + if (isCodeInRange("401", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unexpected error", body, response.headers); + } + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "Token", + "" + ); + return body; + } + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", yield response.getBodyAsAny(), response.headers); + }); + } + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to getObjectAccessToken + * @throws ApiException if the response code was not in [200, 299] + */ + getObjectAccessToken(response) { + return __async(this, null, function* () { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("200", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "Token", + "" + ); + return body; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Invalid request.", body, response.headers); + } + if (isCodeInRange("401", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unexpected error", body, response.headers); + } + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "Token", + "" + ); + return body; + } + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", yield response.getBodyAsAny(), response.headers); + }); + } + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to login + * @throws ApiException if the response code was not in [200, 299] + */ + login(response) { + return __async(this, null, function* () { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("204", response.httpStatusCode)) { + return; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Invalid request.", body, response.headers); + } + if (isCodeInRange("401", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unexpected error", body, response.headers); + } + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "void", + "" + ); + return body; + } + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", yield response.getBodyAsAny(), response.headers); + }); + } + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to logout + * @throws ApiException if the response code was not in [200, 299] + */ + logout(response) { + return __async(this, null, function* () { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("204", response.httpStatusCode)) { + return; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Invalid request.", body, response.headers); + } + if (isCodeInRange("401", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unexpected error", body, response.headers); + } + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "void", + "" + ); + return body; + } + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", yield response.getBodyAsAny(), response.headers); + }); + } + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to revokeToken + * @throws ApiException if the response code was not in [200, 299] + */ + revokeToken(response) { + return __async(this, null, function* () { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("204", response.httpStatusCode)) { + return; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Invalid request.", body, response.headers); + } + if (isCodeInRange("401", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unexpected error", body, response.headers); + } + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "void", + "" + ); + return body; + } + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", yield response.getBodyAsAny(), response.headers); + }); + } + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to searchAuthSettings + * @throws ApiException if the response code was not in [200, 299] + */ + searchAuthSettings(response) { + return __async(this, null, function* () { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("200", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "SearchAuthSettingsResponse", + "" + ); + return body; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Invalid request.", body, response.headers); + } + if (isCodeInRange("401", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unexpected error", body, response.headers); + } + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "SearchAuthSettingsResponse", + "" + ); + return body; + } + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", yield response.getBodyAsAny(), response.headers); + }); + } + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to validateToken + * @throws ApiException if the response code was not in [200, 299] + */ + validateToken(response) { + return __async(this, null, function* () { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("200", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "TokenValidationResponse", + "" + ); + return body; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Invalid request.", body, response.headers); + } + if (isCodeInRange("401", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unexpected error", body, response.headers); + } + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "TokenValidationResponse", + "" + ); + return body; + } + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", yield response.getBodyAsAny(), response.headers); + }); + } +}; + +// apis/CollectionsApi.ts +var CollectionsApiRequestFactory = class extends BaseAPIRequestFactory { + /** + * Version: 26.4.0.cl or later Creates a new collection in ThoughtSpot. Collections allow you to organize and group related metadata objects such as Liveboards, Answers, worksheets, and other data objects. You can also create nested collections (sub-collections) to build a hierarchical structure. #### Supported operations The API endpoint lets you perform the following operations: * Create a new collection * Add metadata objects (Liveboards, Answers, Logical Tables) to the collection * Create nested collections by adding sub-collections + * @param createCollectionRequest + */ + createCollection(createCollectionRequest, _options) { + return __async(this, null, function* () { + var _a, _b, _c; + let _config = _options || this.configuration; + if (createCollectionRequest === null || createCollectionRequest === void 0) { + throw new RequiredError("CollectionsApi", "createCollection", "createCollectionRequest"); + } + const localVarPath = "/api/rest/2.0/collections/create"; + const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.25.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.25.0"); + const contentType = ObjectSerializer.getPreferredMediaType([ + "application/json" + ]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = ObjectSerializer.stringify( + ObjectSerializer.serialize(createCollectionRequest, "CreateCollectionRequest", ""), + contentType + ); + requestContext.setBody(serializedBody); + let authMethod; + authMethod = _config.authMethods["bearerAuth"]; + if (authMethod == null ? void 0 : authMethod.applySecurityAuthentication) { + yield authMethod == null ? void 0 : authMethod.applySecurityAuthentication(requestContext); + } + const defaultAuth = ((_a = _options == null ? void 0 : _options.authMethods) == null ? void 0 : _a.default) || ((_c = (_b = this.configuration) == null ? void 0 : _b.authMethods) == null ? void 0 : _c.default); + if (defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication) { + yield defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication(requestContext); + } + return requestContext; + }); + } + /** + * Version: 26.4.0.cl or later Deletes one or more collections from ThoughtSpot. #### Delete options * **delete_children**: When set to `true`, deletes the child objects (metadata items) within the collection that the user has access to. Objects that the user does not have permission to delete will be skipped. * **dry_run**: When set to `true`, performs a preview of the deletion operation without actually deleting anything. The response shows what would be deleted, allowing you to review before committing the deletion. #### Response The response includes: * **metadata_deleted**: List of metadata objects that were successfully deleted * **metadata_skipped**: List of metadata objects that were skipped due to lack of permissions or other constraints + * @param deleteCollectionRequest + */ + deleteCollection(deleteCollectionRequest, _options) { + return __async(this, null, function* () { + var _a, _b, _c; + let _config = _options || this.configuration; + if (deleteCollectionRequest === null || deleteCollectionRequest === void 0) { + throw new RequiredError("CollectionsApi", "deleteCollection", "deleteCollectionRequest"); + } + const localVarPath = "/api/rest/2.0/collections/delete"; + const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.25.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.25.0"); + const contentType = ObjectSerializer.getPreferredMediaType([ + "application/json" + ]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = ObjectSerializer.stringify( + ObjectSerializer.serialize(deleteCollectionRequest, "DeleteCollectionRequest", ""), + contentType + ); + requestContext.setBody(serializedBody); + let authMethod; + authMethod = _config.authMethods["bearerAuth"]; + if (authMethod == null ? void 0 : authMethod.applySecurityAuthentication) { + yield authMethod == null ? void 0 : authMethod.applySecurityAuthentication(requestContext); + } + const defaultAuth = ((_a = _options == null ? void 0 : _options.authMethods) == null ? void 0 : _a.default) || ((_c = (_b = this.configuration) == null ? void 0 : _b.authMethods) == null ? void 0 : _c.default); + if (defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication) { + yield defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication(requestContext); + } + return requestContext; + }); + } + /** + * Version: 26.4.0.cl or later Gets a list of collections available in ThoughtSpot. To get details of a specific collection, specify the collection GUID or name. You can also filter the API response based on the collection name pattern, author, and other criteria. #### Search options * **name_pattern**: Use \'%\' as a wildcard character to match collection names * **collection_identifiers**: Search for specific collections by their GUIDs or names * **include_metadata**: When set to `true`, includes the metadata objects within each collection in the response **NOTE**: If the API returns an empty list, consider increasing the value of the `record_size` parameter. To search across all available collections, set `record_size` to `-1`. + * @param searchCollectionsRequest + */ + searchCollections(searchCollectionsRequest, _options) { + return __async(this, null, function* () { + var _a, _b, _c; + let _config = _options || this.configuration; + if (searchCollectionsRequest === null || searchCollectionsRequest === void 0) { + throw new RequiredError("CollectionsApi", "searchCollections", "searchCollectionsRequest"); + } + const localVarPath = "/api/rest/2.0/collections/search"; + const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.25.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.25.0"); + const contentType = ObjectSerializer.getPreferredMediaType([ + "application/json" + ]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = ObjectSerializer.stringify( + ObjectSerializer.serialize(searchCollectionsRequest, "SearchCollectionsRequest", ""), + contentType + ); + requestContext.setBody(serializedBody); + let authMethod; + authMethod = _config.authMethods["bearerAuth"]; + if (authMethod == null ? void 0 : authMethod.applySecurityAuthentication) { + yield authMethod == null ? void 0 : authMethod.applySecurityAuthentication(requestContext); + } + const defaultAuth = ((_a = _options == null ? void 0 : _options.authMethods) == null ? void 0 : _a.default) || ((_c = (_b = this.configuration) == null ? void 0 : _b.authMethods) == null ? void 0 : _c.default); + if (defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication) { + yield defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication(requestContext); + } + return requestContext; + }); + } + /** + * Version: 26.4.0.cl or later Updates an existing collection in ThoughtSpot. #### Supported operations This API endpoint lets you perform the following operations: * Update collection name and description * Change visibility settings * Add metadata objects to the collection (operation: ADD) * Remove metadata objects from the collection (operation: REMOVE) * Replace all metadata objects in the collection (operation: REPLACE) #### Operation types * **ADD**: Adds the specified metadata objects to the existing collection without removing current items * **REMOVE**: Removes only the specified metadata objects from the collection * **REPLACE**: Replaces all existing metadata objects with the specified items (default behavior) + * @param collectionIdentifier Unique GUID of the collection. Note: Collection names cannot be used as identifiers since duplicate names are allowed. + * @param updateCollectionRequest + */ + updateCollection(collectionIdentifier, updateCollectionRequest, _options) { + return __async(this, null, function* () { + var _a, _b, _c; + let _config = _options || this.configuration; + if (collectionIdentifier === null || collectionIdentifier === void 0) { + throw new RequiredError("CollectionsApi", "updateCollection", "collectionIdentifier"); + } + if (updateCollectionRequest === null || updateCollectionRequest === void 0) { + throw new RequiredError("CollectionsApi", "updateCollection", "updateCollectionRequest"); + } + const localVarPath = "/api/rest/2.0/collections/{collection_identifier}/update".replace("{collection_identifier}", encodeURIComponent(String(collectionIdentifier))); + const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.25.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.25.0"); + const contentType = ObjectSerializer.getPreferredMediaType([ + "application/json" + ]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = ObjectSerializer.stringify( + ObjectSerializer.serialize(updateCollectionRequest, "UpdateCollectionRequest", ""), + contentType + ); + requestContext.setBody(serializedBody); + let authMethod; + authMethod = _config.authMethods["bearerAuth"]; + if (authMethod == null ? void 0 : authMethod.applySecurityAuthentication) { + yield authMethod == null ? void 0 : authMethod.applySecurityAuthentication(requestContext); + } + const defaultAuth = ((_a = _options == null ? void 0 : _options.authMethods) == null ? void 0 : _a.default) || ((_c = (_b = this.configuration) == null ? void 0 : _b.authMethods) == null ? void 0 : _c.default); + if (defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication) { + yield defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication(requestContext); + } + return requestContext; + }); + } +}; +var CollectionsApiResponseProcessor = class { + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to createCollection + * @throws ApiException if the response code was not in [200, 299] + */ + createCollection(response) { + return __async(this, null, function* () { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("200", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "Collection", + "" + ); + return body; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Invalid request.", body, response.headers); + } + if (isCodeInRange("401", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unexpected error", body, response.headers); + } + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "Collection", + "" + ); + return body; + } + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", yield response.getBodyAsAny(), response.headers); + }); + } + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to deleteCollection + * @throws ApiException if the response code was not in [200, 299] + */ + deleteCollection(response) { + return __async(this, null, function* () { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("200", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "CollectionDeleteResponse", + "" + ); + return body; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Invalid request.", body, response.headers); + } + if (isCodeInRange("401", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } + if (isCodeInRange("404", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Resource not found.", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unexpected error", body, response.headers); + } + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "CollectionDeleteResponse", + "" + ); + return body; + } + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", yield response.getBodyAsAny(), response.headers); + }); + } + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to searchCollections + * @throws ApiException if the response code was not in [200, 299] + */ + searchCollections(response) { + return __async(this, null, function* () { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("200", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "CollectionSearchResponse", + "" + ); + return body; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Invalid request.", body, response.headers); + } + if (isCodeInRange("401", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unexpected error", body, response.headers); + } + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "CollectionSearchResponse", + "" + ); + return body; + } + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", yield response.getBodyAsAny(), response.headers); + }); + } + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to updateCollection + * @throws ApiException if the response code was not in [200, 299] + */ + updateCollection(response) { + return __async(this, null, function* () { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("204", response.httpStatusCode)) { + return; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Invalid request.", body, response.headers); + } + if (isCodeInRange("401", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } + if (isCodeInRange("404", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Resource not found.", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unexpected error", body, response.headers); + } + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "void", + "" + ); + return body; + } + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", yield response.getBodyAsAny(), response.headers); + }); + } +}; + +// apis/ConnectionConfigurationsApi.ts +var ConnectionConfigurationsApiRequestFactory = class extends BaseAPIRequestFactory { + /** + * Version: 10.12.0.cl or later Gets connection configuration objects. Requires `DATAMANAGEMENT` (**Can manage data**) and edit permissions to the connection object, or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) privilege is required. #### Usage guidelines * To get a list of all configurations available in the ThoughtSpot system, send the API request with only the connection name or GUID in the request body. * To fetch details of a configuration object, specify the configuration object name or GUID. + * @param connectionConfigurationSearchRequest + */ + connectionConfigurationSearch(connectionConfigurationSearchRequest, _options) { + return __async(this, null, function* () { + var _a, _b, _c; + let _config = _options || this.configuration; + if (connectionConfigurationSearchRequest === null || connectionConfigurationSearchRequest === void 0) { + throw new RequiredError("ConnectionConfigurationsApi", "connectionConfigurationSearch", "connectionConfigurationSearchRequest"); + } + const localVarPath = "/api/rest/2.0/connection-configurations/search"; + const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.25.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.25.0"); + const contentType = ObjectSerializer.getPreferredMediaType([ + "application/json" + ]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = ObjectSerializer.stringify( + ObjectSerializer.serialize(connectionConfigurationSearchRequest, "ConnectionConfigurationSearchRequest", ""), + contentType + ); + requestContext.setBody(serializedBody); + let authMethod; + authMethod = _config.authMethods["bearerAuth"]; + if (authMethod == null ? void 0 : authMethod.applySecurityAuthentication) { + yield authMethod == null ? void 0 : authMethod.applySecurityAuthentication(requestContext); + } + const defaultAuth = ((_a = _options == null ? void 0 : _options.authMethods) == null ? void 0 : _a.default) || ((_c = (_b = this.configuration) == null ? void 0 : _b.authMethods) == null ? void 0 : _c.default); + if (defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication) { + yield defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication(requestContext); + } + return requestContext; + }); + } + /** + * Version: 10.12.0.cl or later Creates an additional configuration to an existing connection to a data warehouse. Requires `DATAMANAGEMENT` (**Can manage data**) or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) privilege is required. #### Usage guidelines * A JSON map of configuration attributes in `configuration`. The following example shows the configuration attributes: ``` { \"user\":\"DEV_USER\", \"password\":\"TestConn123\", \"role\":\"DEV\", \"warehouse\":\"DEV_WH\" } ``` * If the `policy_type` is `PRINCIPALS`, then `policy_principals` is a required field. * If the `policy_type` is `PROCESSES`, then `policy_processes` is a required field. * If the `policy_type` is `NO_POLICY`, then `policy_principals` and `policy_processes` are not required fields. #### Parameterized Connection Support For parameterized connections that use OAuth authentication, only the same_as_parent and policy_process_options attributes are allowed in the API request. These attributes are not applicable to connections that are not parameterized. + * @param createConnectionConfigurationRequest + */ + createConnectionConfiguration(createConnectionConfigurationRequest, _options) { + return __async(this, null, function* () { + var _a, _b, _c; + let _config = _options || this.configuration; + if (createConnectionConfigurationRequest === null || createConnectionConfigurationRequest === void 0) { + throw new RequiredError("ConnectionConfigurationsApi", "createConnectionConfiguration", "createConnectionConfigurationRequest"); + } + const localVarPath = "/api/rest/2.0/connection-configurations/create"; + const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.25.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.25.0"); + const contentType = ObjectSerializer.getPreferredMediaType([ + "application/json" + ]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = ObjectSerializer.stringify( + ObjectSerializer.serialize(createConnectionConfigurationRequest, "CreateConnectionConfigurationRequest", ""), + contentType + ); + requestContext.setBody(serializedBody); + let authMethod; + authMethod = _config.authMethods["bearerAuth"]; + if (authMethod == null ? void 0 : authMethod.applySecurityAuthentication) { + yield authMethod == null ? void 0 : authMethod.applySecurityAuthentication(requestContext); + } + const defaultAuth = ((_a = _options == null ? void 0 : _options.authMethods) == null ? void 0 : _a.default) || ((_c = (_b = this.configuration) == null ? void 0 : _b.authMethods) == null ? void 0 : _c.default); + if (defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication) { + yield defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication(requestContext); + } + return requestContext; + }); + } + /** + * Version: 10.12.0.cl or later Deletes connection configuration objects. Requires `DATAMANAGEMENT` (**Can manage data**) and edit permissions to the connection object, or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) privilege is required. + * @param deleteConnectionConfigurationRequest + */ + deleteConnectionConfiguration(deleteConnectionConfigurationRequest, _options) { + return __async(this, null, function* () { + var _a, _b, _c; + let _config = _options || this.configuration; + if (deleteConnectionConfigurationRequest === null || deleteConnectionConfigurationRequest === void 0) { + throw new RequiredError("ConnectionConfigurationsApi", "deleteConnectionConfiguration", "deleteConnectionConfigurationRequest"); + } + const localVarPath = "/api/rest/2.0/connection-configurations/delete"; + const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.25.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.25.0"); + const contentType = ObjectSerializer.getPreferredMediaType([ + "application/json" + ]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = ObjectSerializer.stringify( + ObjectSerializer.serialize(deleteConnectionConfigurationRequest, "DeleteConnectionConfigurationRequest", ""), + contentType + ); + requestContext.setBody(serializedBody); + let authMethod; + authMethod = _config.authMethods["bearerAuth"]; + if (authMethod == null ? void 0 : authMethod.applySecurityAuthentication) { + yield authMethod == null ? void 0 : authMethod.applySecurityAuthentication(requestContext); + } + const defaultAuth = ((_a = _options == null ? void 0 : _options.authMethods) == null ? void 0 : _a.default) || ((_c = (_b = this.configuration) == null ? void 0 : _b.authMethods) == null ? void 0 : _c.default); + if (defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication) { + yield defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication(requestContext); + } + return requestContext; + }); + } + /** + * Version: 10.12.0.cl or later Updates a connection configuration object. Requires `DATAMANAGEMENT` (**Can manage data**) and edit permissions to the connection object, or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) privilege is required. #### Supported operations This API endpoint lets you perform the following operations in a single API request: * Edit the name or description of the configuration * Edit the configuration properties * Edit the `policy_type` * Edit the type of authentication * Enable or disable a configuration #### Parameterized Connection Support For parameterized oauth based connections, only the `same_as_parent` and `policy_process_options` attributes are allowed. These attributes are not applicable to connections that are not parameterized. **NOTE**: When updating a configuration where `disabled` is `true`, you must reset `disabled` to `true` in your update request payload. If not explicitly set again, the API will default `disabled` to `false`. + * @param configurationIdentifier Unique ID or name of the configuration. + * @param updateConnectionConfigurationRequest + */ + updateConnectionConfiguration(configurationIdentifier, updateConnectionConfigurationRequest, _options) { + return __async(this, null, function* () { + var _a, _b, _c; + let _config = _options || this.configuration; + if (configurationIdentifier === null || configurationIdentifier === void 0) { + throw new RequiredError("ConnectionConfigurationsApi", "updateConnectionConfiguration", "configurationIdentifier"); + } + if (updateConnectionConfigurationRequest === null || updateConnectionConfigurationRequest === void 0) { + throw new RequiredError("ConnectionConfigurationsApi", "updateConnectionConfiguration", "updateConnectionConfigurationRequest"); + } + const localVarPath = "/api/rest/2.0/connection-configurations/{configuration_identifier}/update".replace("{configuration_identifier}", encodeURIComponent(String(configurationIdentifier))); + const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.25.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.25.0"); + const contentType = ObjectSerializer.getPreferredMediaType([ + "application/json" + ]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = ObjectSerializer.stringify( + ObjectSerializer.serialize(updateConnectionConfigurationRequest, "UpdateConnectionConfigurationRequest", ""), + contentType + ); + requestContext.setBody(serializedBody); + let authMethod; + authMethod = _config.authMethods["bearerAuth"]; + if (authMethod == null ? void 0 : authMethod.applySecurityAuthentication) { + yield authMethod == null ? void 0 : authMethod.applySecurityAuthentication(requestContext); + } + const defaultAuth = ((_a = _options == null ? void 0 : _options.authMethods) == null ? void 0 : _a.default) || ((_c = (_b = this.configuration) == null ? void 0 : _b.authMethods) == null ? void 0 : _c.default); + if (defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication) { + yield defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication(requestContext); + } + return requestContext; + }); + } +}; +var ConnectionConfigurationsApiResponseProcessor = class { + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to connectionConfigurationSearch + * @throws ApiException if the response code was not in [200, 299] + */ + connectionConfigurationSearch(response) { + return __async(this, null, function* () { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("200", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "Array", + "" + ); + return body; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Invalid request.", body, response.headers); + } + if (isCodeInRange("401", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unexpected error", body, response.headers); + } + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "Array", + "" + ); + return body; + } + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", yield response.getBodyAsAny(), response.headers); + }); + } + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to createConnectionConfiguration + * @throws ApiException if the response code was not in [200, 299] + */ + createConnectionConfiguration(response) { + return __async(this, null, function* () { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("200", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ConnectionConfigurationResponse", + "" + ); + return body; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Invalid request.", body, response.headers); + } + if (isCodeInRange("401", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unexpected error", body, response.headers); + } + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ConnectionConfigurationResponse", + "" + ); + return body; + } + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", yield response.getBodyAsAny(), response.headers); + }); + } + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to deleteConnectionConfiguration + * @throws ApiException if the response code was not in [200, 299] + */ + deleteConnectionConfiguration(response) { + return __async(this, null, function* () { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("204", response.httpStatusCode)) { + return; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Invalid request.", body, response.headers); + } + if (isCodeInRange("401", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unexpected error", body, response.headers); + } + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "void", + "" + ); + return body; + } + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", yield response.getBodyAsAny(), response.headers); + }); + } + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to updateConnectionConfiguration + * @throws ApiException if the response code was not in [200, 299] + */ + updateConnectionConfiguration(response) { + return __async(this, null, function* () { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("204", response.httpStatusCode)) { + return; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Invalid request.", body, response.headers); + } + if (isCodeInRange("401", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unexpected error", body, response.headers); + } + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "void", + "" + ); + return body; + } + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", yield response.getBodyAsAny(), response.headers); + }); + } +}; + +// apis/ConnectionsApi.ts +var ConnectionsApiRequestFactory = class extends BaseAPIRequestFactory { + /** + * Version: 9.2.0.cl or later Creates a connection to a data warehouse for live query services. Requires `DATAMANAGEMENT` (**Can manage data**) or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) privilege is required. #### Create a connection without tables To create a connection without tables: 1. Pass these parameters in your API request. * Name of the connection. * Type of the data warehouse to connect to. * A JSON map of configuration attributes in `data_warehouse_config`. The following example shows the configuration attributes for a SnowFlake connection: ``` { \"configuration\":{ \"accountName\":\"thoughtspot_partner\", \"user\":\"tsadmin\", \"password\":\"TestConn123\", \"role\":\"sysadmin\", \"warehouse\":\"MEDIUM_WH\" }, \"authenticationType\": \"SERVICE_ACCOUNT\", \"externalDatabases\":[ ] } ``` 2. Set `validate` to `false`. **NOTE:** If the `authentication_type` is anything other than SERVICE_ACCOUNT, you must explicitly provide the authenticationType property in the payload. If you do not specify authenticationType, the API will default to SERVICE_ACCOUNT as the authentication type. #### Create a connection with tables If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) and `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` (**Can manage data models**) privilege is required. To create a connection with tables: 1. Pass these parameters in your API request. * Name of the connection. * Type of the data warehouse to connect to. * A JSON map of configuration attributes, database details, and table properties in `data_warehouse_config` as shown in the following example: ``` { \"configuration\":{ \"accountName\":\"thoughtspot_partner\", \"user\":\"tsadmin\", \"password\":\"TestConn123\", \"role\":\"sysadmin\", \"warehouse\":\"MEDIUM_WH\" }, \"authenticationType\": \"SERVICE_ACCOUNT\", \"externalDatabases\":[ { \"name\":\"AllDatatypes\", \"isAutoCreated\":false, \"schemas\":[ { \"name\":\"alldatatypes\", \"tables\":[ { \"name\":\"allDatatypes\", \"type\":\"TABLE\", \"description\":\"\", \"selected\":true, \"linked\":true, \"columns\":[ { \"name\":\"CNUMBER\", \"type\":\"INT64\", \"canImport\":true, \"selected\":true, \"isLinkedActive\":true, \"isImported\":false, \"tableName\":\"allDatatypes\", \"schemaName\":\"alldatatypes\", \"dbName\":\"AllDatatypes\" }, { \"name\":\"CDECIMAL\", \"type\":\"INT64\", \"canImport\":true, \"selected\":true, \"isLinkedActive\":true, \"isImported\":false, \"tableName\":\"allDatatypes\", \"schemaName\":\"alldatatypes\", \"dbName\":\"AllDatatypes\" } ] } ] } ] } ] } ``` 2. Set `validate` to `true`. **NOTE:** If the `authentication_type` is anything other than SERVICE_ACCOUNT, you must explicitly provide the authenticationType property in the payload. If you do not specify authenticationType, the API will default to SERVICE_ACCOUNT as the authentication type. + * @param createConnectionRequest + */ + createConnection(createConnectionRequest, _options) { + return __async(this, null, function* () { + var _a, _b, _c; + let _config = _options || this.configuration; + if (createConnectionRequest === null || createConnectionRequest === void 0) { + throw new RequiredError("ConnectionsApi", "createConnection", "createConnectionRequest"); + } + const localVarPath = "/api/rest/2.0/connection/create"; + const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.25.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.25.0"); + const contentType = ObjectSerializer.getPreferredMediaType([ + "application/json" + ]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = ObjectSerializer.stringify( + ObjectSerializer.serialize(createConnectionRequest, "CreateConnectionRequest", ""), + contentType + ); + requestContext.setBody(serializedBody); + let authMethod; + authMethod = _config.authMethods["bearerAuth"]; + if (authMethod == null ? void 0 : authMethod.applySecurityAuthentication) { + yield authMethod == null ? void 0 : authMethod.applySecurityAuthentication(requestContext); + } + const defaultAuth = ((_a = _options == null ? void 0 : _options.authMethods) == null ? void 0 : _a.default) || ((_c = (_b = this.configuration) == null ? void 0 : _b.authMethods) == null ? void 0 : _c.default); + if (defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication) { + yield defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication(requestContext); + } + return requestContext; + }); + } + /** + * Version: 9.2.0.cl or later **Important**: This endpoint is deprecated and will be removed from ThoughtSpot in September 2025. ThoughtSpot strongly recommends using the [Delete Connection V2](#/http/api-endpoints/connections/delete-connection-v2) endpoint to delete your connection objects. #### Usage guidelines Deletes a connection object. Requires `DATAMANAGEMENT` (**Can manage data**) and edit permissions to the connection object, or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) privilege is required. **Note**: If a connection has dependent objects, make sure you remove its associations before the delete operation. + * @param deleteConnectionRequest + */ + deleteConnection(deleteConnectionRequest, _options) { + return __async(this, null, function* () { + var _a, _b, _c; + let _config = _options || this.configuration; + if (deleteConnectionRequest === null || deleteConnectionRequest === void 0) { + throw new RequiredError("ConnectionsApi", "deleteConnection", "deleteConnectionRequest"); + } + const localVarPath = "/api/rest/2.0/connection/delete"; + const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.25.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.25.0"); + const contentType = ObjectSerializer.getPreferredMediaType([ + "application/json" + ]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = ObjectSerializer.stringify( + ObjectSerializer.serialize(deleteConnectionRequest, "DeleteConnectionRequest", ""), + contentType + ); + requestContext.setBody(serializedBody); + let authMethod; + authMethod = _config.authMethods["bearerAuth"]; + if (authMethod == null ? void 0 : authMethod.applySecurityAuthentication) { + yield authMethod == null ? void 0 : authMethod.applySecurityAuthentication(requestContext); + } + const defaultAuth = ((_a = _options == null ? void 0 : _options.authMethods) == null ? void 0 : _a.default) || ((_c = (_b = this.configuration) == null ? void 0 : _b.authMethods) == null ? void 0 : _c.default); + if (defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication) { + yield defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication(requestContext); + } + return requestContext; + }); + } + /** + * Version: 10.4.0.cl or later Deletes a connection object. **Note**: If a connection has dependent objects, make sure you remove its associations before the delete operation. Requires `DATAMANAGEMENT` (**Can manage data**) and edit permissions to the connection object, or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) privilege is required. + * @param connectionIdentifier Unique ID or name of the connection. + */ + deleteConnectionV2(connectionIdentifier, _options) { + return __async(this, null, function* () { + var _a, _b, _c; + let _config = _options || this.configuration; + if (connectionIdentifier === null || connectionIdentifier === void 0) { + throw new RequiredError("ConnectionsApi", "deleteConnectionV2", "connectionIdentifier"); + } + const localVarPath = "/api/rest/2.0/connections/{connection_identifier}/delete".replace("{connection_identifier}", encodeURIComponent(String(connectionIdentifier))); + const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.25.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.25.0"); + let authMethod; + authMethod = _config.authMethods["bearerAuth"]; + if (authMethod == null ? void 0 : authMethod.applySecurityAuthentication) { + yield authMethod == null ? void 0 : authMethod.applySecurityAuthentication(requestContext); + } + const defaultAuth = ((_a = _options == null ? void 0 : _options.authMethods) == null ? void 0 : _a.default) || ((_c = (_b = this.configuration) == null ? void 0 : _b.authMethods) == null ? void 0 : _c.default); + if (defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication) { + yield defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication(requestContext); + } + return requestContext; + }); + } + /** + * Version: 9.9.0.cl or later Exports the difference in connection metadata between CDW and ThoughtSpot Requires `DATAMANAGEMENT` (**Can manage data**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the following Data control privileges may be required: - `CAN_MANAGE_CUSTOM_CALENDAR`(**Can manage custom calendars**) - `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) - `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` (**Can manage data models**) To download the connection metadata difference between ThoughtSpot and CDW, pass the connection GUID as `connection_identifier` in the API request. + * @param connectionIdentifier GUID of the connection + */ + downloadConnectionMetadataChanges(connectionIdentifier, _options) { + return __async(this, null, function* () { + var _a, _b, _c; + let _config = _options || this.configuration; + if (connectionIdentifier === null || connectionIdentifier === void 0) { + throw new RequiredError("ConnectionsApi", "downloadConnectionMetadataChanges", "connectionIdentifier"); + } + const localVarPath = "/api/rest/2.0/connections/download-connection-metadata-changes/{connection_identifier}".replace("{connection_identifier}", encodeURIComponent(String(connectionIdentifier))); + const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.25.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.25.0"); + let authMethod; + authMethod = _config.authMethods["bearerAuth"]; + if (authMethod == null ? void 0 : authMethod.applySecurityAuthentication) { + yield authMethod == null ? void 0 : authMethod.applySecurityAuthentication(requestContext); + } + const defaultAuth = ((_a = _options == null ? void 0 : _options.authMethods) == null ? void 0 : _a.default) || ((_c = (_b = this.configuration) == null ? void 0 : _b.authMethods) == null ? void 0 : _c.default); + if (defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication) { + yield defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication(requestContext); + } + return requestContext; + }); + } + /** + * Version: 9.9.0.cl or later Validates the difference in connection metadata between CDW and ThoughtSpot. Requires `DATAMANAGEMENT` (**Can manage data**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the following Data control privileges may be required: - `CAN_MANAGE_CUSTOM_CALENDAR`(**Can manage custom calendars**) - `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) - `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` (**Can manage data models**) Returns a boolean indicating whether there is any difference between the connection metadata at ThoughtSpot and CDW. To get the connection metadata difference status, pass the connection GUID as `connection_identifier` in the API request. + * @param connectionIdentifier GUID of the connection + */ + fetchConnectionDiffStatus(connectionIdentifier, _options) { + return __async(this, null, function* () { + var _a, _b, _c; + let _config = _options || this.configuration; + if (connectionIdentifier === null || connectionIdentifier === void 0) { + throw new RequiredError("ConnectionsApi", "fetchConnectionDiffStatus", "connectionIdentifier"); + } + const localVarPath = "/api/rest/2.0/connections/fetch-connection-diff-status/{connection_identifier}".replace("{connection_identifier}", encodeURIComponent(String(connectionIdentifier))); + const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.25.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.25.0"); + let authMethod; + authMethod = _config.authMethods["bearerAuth"]; + if (authMethod == null ? void 0 : authMethod.applySecurityAuthentication) { + yield authMethod == null ? void 0 : authMethod.applySecurityAuthentication(requestContext); + } + const defaultAuth = ((_a = _options == null ? void 0 : _options.authMethods) == null ? void 0 : _a.default) || ((_c = (_b = this.configuration) == null ? void 0 : _b.authMethods) == null ? void 0 : _c.default); + if (defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication) { + yield defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication(requestContext); + } + return requestContext; + }); + } + /** + * Version: 26.2.0.cl or later Revokes OAuth refresh tokens for users who no longer require access to a data warehouse connection. When a token is revoked, the affected user\'s session for that connection is terminated, and they must re-authenticate to regain access. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) or `DATAMANAGEMENT` (**Can manage data**) privileges. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on the ThoughtSpot instance, users with `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) privilege can also make API requests to revoke tokens for connection users. #### Usage guidelines You can specify different combinations of identifiers to control which refresh tokens are revoked. - **connection_identifier**: Revokes refresh tokens for all users of the connection, except the connection author. - **connection_identifier** and **user_identifiers**: Revokes refresh tokens only for the users specified in the request. If the name or ID of the connection author is included in the request, their token will also be revoked. - **connection_identifier** and **configuration_identifiers**: Revokes refresh tokens for all users on the specified configurations, except the configuration author. - **connection_identifier**, **configuration_identifiers**, and **user_identifiers**: Revokes refresh tokens for the specified users on the specified configurations. - **connection_identifier** and **org_identifiers**: Revokes refresh tokens for the specified Orgs. Applicable only for published connections. - **connection_identifier**, **org_identifiers**, and **user_identifiers**: Revokes refresh tokens for the specified users in the specified Orgs. Applicable only for published connections. **NOTE**: The `org_identifiers` parameter is only applicable for published connections. Using this parameter for unpublished connections will result in an error. Ensure that the connections are published before making the API request. + * @param connectionIdentifier Unique ID or name of the connection whose refresh tokens need to be revoked. All the users associated with the connection will have their refresh tokens revoked except the author. + * @param revokeRefreshTokensRequest + */ + revokeRefreshTokens(connectionIdentifier, revokeRefreshTokensRequest, _options) { + return __async(this, null, function* () { + var _a, _b, _c; + let _config = _options || this.configuration; + if (connectionIdentifier === null || connectionIdentifier === void 0) { + throw new RequiredError("ConnectionsApi", "revokeRefreshTokens", "connectionIdentifier"); + } + if (revokeRefreshTokensRequest === null || revokeRefreshTokensRequest === void 0) { + throw new RequiredError("ConnectionsApi", "revokeRefreshTokens", "revokeRefreshTokensRequest"); + } + const localVarPath = "/api/rest/2.0/connections/{connection_identifier}/revoke-refresh-tokens".replace("{connection_identifier}", encodeURIComponent(String(connectionIdentifier))); + const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.25.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.25.0"); + const contentType = ObjectSerializer.getPreferredMediaType([ + "application/json" + ]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = ObjectSerializer.stringify( + ObjectSerializer.serialize(revokeRefreshTokensRequest, "RevokeRefreshTokensRequest", ""), + contentType + ); + requestContext.setBody(serializedBody); + let authMethod; + authMethod = _config.authMethods["bearerAuth"]; + if (authMethod == null ? void 0 : authMethod.applySecurityAuthentication) { + yield authMethod == null ? void 0 : authMethod.applySecurityAuthentication(requestContext); + } + const defaultAuth = ((_a = _options == null ? void 0 : _options.authMethods) == null ? void 0 : _a.default) || ((_c = (_b = this.configuration) == null ? void 0 : _b.authMethods) == null ? void 0 : _c.default); + if (defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication) { + yield defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication(requestContext); + } + return requestContext; + }); + } + /** + * Version: 9.2.0.cl or later Gets connection objects. Requires `DATAMANAGEMENT` (**Can manage data**) or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) privilege is required. - To get a list of all connections available in the ThoughtSpot system, send the API request without any attributes in the request body. - To get the connection objects for a specific type of data warehouse, specify the type in `data_warehouse_types`. - To fetch details of a connection object, specify the connection object GUID or name. The `name_pattern` attribute allows passing partial text with `%` for a wildcard match. - To get details of the database, schemas, tables, or columns from a data connection object, specify `data_warehouse_object_type`. - To get a specific database, schema, table, or column from a connection object, define the object type in `data_warehouse_object_type` and object properties in the `data_warehouse_objects` array. For example, to search for a column, you must pass the database, schema, and table names in the API request. Note that in the following example, object properties are set in a hierarchical order (`database` > `schema` > `table` > `column`). ``` { \"connections\": [ { \"identifier\": \"b9d1f2ef-fa65-4a4b-994e-30fa2d57b0c2\", \"data_warehouse_objects\": [ { \"database\": \"NEBULADEV\", \"schema\": \"INFORMATION_SCHEMA\", \"table\": \"APPLICABLE_ROLES\", \"column\": \"ROLE_NAME\" } ] } ], \"data_warehouse_object_type\": \"COLUMN\" } ``` - To fetch data by `configuration`, specify `data_warehouse_object_type`. For example, to fetch columns from the `DEVELOPMENT` database, specify the `data_warehouse_object_type` as `DATABASE` and define the `configuration` string as `{\"database\":\"DEVELOPMENT\"}`. To get column data for a specific table, specify the table, for example,`{\"database\":\"RETAILAPPAREL\",\"table\":\"PIPES\"}`. - To query connections by `authentication_type`, specify `data_warehouse_object_type`. Supported values for `authentication_type` are: - `SERVICE_ACCOUNT`: For connections that require service account credentials to authenticate to the Cloud Data Warehouse and fetch data. - `OAUTH`: For connections that require OAuth credentials to authenticate to the Cloud Data Warehouse and fetch data. Teradata, Oracle, and Presto Cloud Data Warehouses do not support the OAuth authentication type. - `IAM`: For connections that have the IAM OAuth set up. This authentication type is supported on Amazon Redshift connections only. - `EXTOAUTH`: For connections that have External OAuth set up. ThoughtSpot supports external [OAuth with Microsoft Azure Active Directory (AD)](https://docs.thoughtspot.com/cloud/latest/ connections-snowflake-azure-ad-oauth) and [Okta for Snowflake data connections](https://docs.thoughtspot.com/cloud/latest/connections-snowflake-okta-oauth). - `KEY_PAIR`: For connections that require Key Pair account credentials to authenticate to the Cloud Data Warehouse and fetch data. This authentication type is supported on Snowflake connections only. - `OAUTH_WITH_PKCE`: For connections that require OAuth with PKCE account credentials to authenticate to the Cloud Data Warehouse and fetch data. This authentication type is supported on Snowflake, Starburst, Databricks, Denodo connections only. - `EXTOAUTH_WITH_PKCE`: For connections that require External OAuth With PKCE account credentials to authenticate to the Cloud Data Warehouse and fetch data. This authentication type is supported on Snowflake connections only. - `OAUTH_WITH_PEZ`: For connections that require OAuth With PEZ account credentials to authenticate to the Cloud Data Warehouse and fetch data. This authentication type is supported on Amazon Redshift connections only. - `OAUTH_WITH_SERVICE_PRINCIPAL`: For connections that require OAuth With Service Principal account credentials to authenticate to the Cloud Data Warehouse and fetch data. This authentication type is supported on Databricks connections only. - `PERSONAL_ACCESS_TOKEN`: For connections that require Personal Access Token account credentials to authenticate to the Cloud Data Warehouse and fetch data. This authentication type is supported on Databricks connections only. - `OAUTH_CLIENT_CREDENTIALS`: For connections that require OAuth Client Credentials to authenticate to the Cloud Data Warehouse and fetch data. This authentication type is supported on Snowflake connections only. - To include more details about connection objects in the API response, set `include_details` to `true`. - You can also sort the output by field names and filter connections by tags. **NOTE**: When filtering connection records by parameters other than `data_warehouse_types` or `tag_identifiers`, ensure that you set `record_size` to `-1` and `record_offset` to `0` for precise results. + * @param searchConnectionRequest + */ + searchConnection(searchConnectionRequest, _options) { + return __async(this, null, function* () { + var _a, _b, _c; + let _config = _options || this.configuration; + if (searchConnectionRequest === null || searchConnectionRequest === void 0) { + throw new RequiredError("ConnectionsApi", "searchConnection", "searchConnectionRequest"); + } + const localVarPath = "/api/rest/2.0/connection/search"; + const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.25.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.25.0"); + const contentType = ObjectSerializer.getPreferredMediaType([ + "application/json" + ]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = ObjectSerializer.stringify( + ObjectSerializer.serialize(searchConnectionRequest, "SearchConnectionRequest", ""), + contentType + ); + requestContext.setBody(serializedBody); + let authMethod; + authMethod = _config.authMethods["bearerAuth"]; + if (authMethod == null ? void 0 : authMethod.applySecurityAuthentication) { + yield authMethod == null ? void 0 : authMethod.applySecurityAuthentication(requestContext); + } + const defaultAuth = ((_a = _options == null ? void 0 : _options.authMethods) == null ? void 0 : _a.default) || ((_c = (_b = this.configuration) == null ? void 0 : _b.authMethods) == null ? void 0 : _c.default); + if (defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication) { + yield defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication(requestContext); + } + return requestContext; + }); + } + /** + * Version: 26.5.0.cl or later Synchronizes connection metadata attributes from your Cloud Data Warehouse (CDW) with ThoughtSpot. Requires the `DATAMANAGEMENT` (**Can manage data**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` (**Can manage data models**) privilege is required. #### Usage guidelines To synchronize attributes from a CDW, specify the connection GUID or name in the `connection_identifier` path parameter and `sync_attributes` in the request body. Default attribute is `[\"DESCRIPTION\"]`. ##### Hierarchical schema * Connection: The connection object for the sync operation. * Tables: Tables for the sync operation. When no table is specified, all tables are synchronized. * Columns: If the table is specified, you can add the columns for the sync operation. If no columns are specified, all columns in the specified table are considered for the sync operation. To set the scope for the sync operation: * Connection-level: To sync all tables and columns, pass an empty request body, or only the attributes in the request body. * Table-level: To synchronize specific tables and their columns, specify the table identifiers in the `tables` array. * Column-level: To synchronize specific columns, specify the table identifier as the key and column identifiers as the value in the `tables` array. ``` { \"tables\": [ {\"table-guid-1\": [\"column-guid-1\", \"column-guid-2\"]}, \"table-guid-2\" ], \"sync_attributes\": [\"DESCRIPTION\"] } ``` ##### API response If the sync operation is successful, the API returns the following information: * Status of the sync operation. For example, `SUCCESS`, `PARTIAL_SUCCESS`, or `NO_UPDATE`. * Number of tables and columns that were updated. * Number of tables and columns with the sync failed status when the overall sync status is `PARTIAL_SUCCESS`. * Message text indicating the sync results. + * @param connectionIdentifier Unique ID or name of the connection. + * @param syncMetadataRequest + */ + syncMetadata(connectionIdentifier, syncMetadataRequest, _options) { + return __async(this, null, function* () { + var _a, _b, _c; + let _config = _options || this.configuration; + if (connectionIdentifier === null || connectionIdentifier === void 0) { + throw new RequiredError("ConnectionsApi", "syncMetadata", "connectionIdentifier"); + } + if (syncMetadataRequest === null || syncMetadataRequest === void 0) { + throw new RequiredError("ConnectionsApi", "syncMetadata", "syncMetadataRequest"); + } + const localVarPath = "/api/rest/2.0/connections/{connection_identifier}/resync-metadata".replace("{connection_identifier}", encodeURIComponent(String(connectionIdentifier))); + const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.25.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.25.0"); + const contentType = ObjectSerializer.getPreferredMediaType([ + "application/json" + ]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = ObjectSerializer.stringify( + ObjectSerializer.serialize(syncMetadataRequest, "SyncMetadataRequest", ""), + contentType + ); + requestContext.setBody(serializedBody); + let authMethod; + authMethod = _config.authMethods["bearerAuth"]; + if (authMethod == null ? void 0 : authMethod.applySecurityAuthentication) { + yield authMethod == null ? void 0 : authMethod.applySecurityAuthentication(requestContext); + } + const defaultAuth = ((_a = _options == null ? void 0 : _options.authMethods) == null ? void 0 : _a.default) || ((_c = (_b = this.configuration) == null ? void 0 : _b.authMethods) == null ? void 0 : _c.default); + if (defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication) { + yield defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication(requestContext); + } + return requestContext; + }); + } + /** + * Version: 9.2.0.cl or later **Important**: This endpoint is deprecated and will be removed from ThoughtSpot in September 2025. ThoughtSpot strongly recommends using the [Update connection V2](#/http/api-endpoints/connections/update-connection-v2) endpoint to update your connection objects. #### Usage guidelines Updates a connection object. Requires `DATAMANAGEMENT` (**Can manage data**) and edit permissions to the connection object, or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) privilege is required. To update a connection object, pass these parameters in your API request: 1. GUID of the connection object. 2. If you are updating tables or database schema of a connection object: a. Add the updated JSON map of metadata with database, schema, and tables in `data_warehouse_config`. b. Set `validate` to `true`. 3. If you are updating a configuration attribute, connection name, or description, you can set `validate` to `false`. + * @param updateConnectionRequest + */ + updateConnection(updateConnectionRequest, _options) { + return __async(this, null, function* () { + var _a, _b, _c; + let _config = _options || this.configuration; + if (updateConnectionRequest === null || updateConnectionRequest === void 0) { + throw new RequiredError("ConnectionsApi", "updateConnection", "updateConnectionRequest"); + } + const localVarPath = "/api/rest/2.0/connection/update"; + const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.25.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.25.0"); + const contentType = ObjectSerializer.getPreferredMediaType([ + "application/json" + ]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = ObjectSerializer.stringify( + ObjectSerializer.serialize(updateConnectionRequest, "UpdateConnectionRequest", ""), + contentType + ); + requestContext.setBody(serializedBody); + let authMethod; + authMethod = _config.authMethods["bearerAuth"]; + if (authMethod == null ? void 0 : authMethod.applySecurityAuthentication) { + yield authMethod == null ? void 0 : authMethod.applySecurityAuthentication(requestContext); + } + const defaultAuth = ((_a = _options == null ? void 0 : _options.authMethods) == null ? void 0 : _a.default) || ((_c = (_b = this.configuration) == null ? void 0 : _b.authMethods) == null ? void 0 : _c.default); + if (defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication) { + yield defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication(requestContext); + } + return requestContext; + }); + } + /** + * Version: 26.6.0.cl or later Activates or deactivates a connection. A deactivated connection cannot be used for queries or operations until it is activated again. Requires `DATAMANAGEMENT` (**Can manage data**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) privilege is required. Only the connection owner or an administrator can perform this operation. #### Usage guidelines To update the status of a connection, specify the connection GUID or name in the `connection_identifier` path parameter and the desired `status` in the request body. - **ACTIVATED**: Enables the connection. Queries and operations can resume on an activated connection. - **DEACTIVATED**: Disables the connection. It does not remove the connection metadata, but only makes the connection unavailable for queries and operations. You can reactivate a deactivated connection by setting \"status\": \"ACTIVATED\". + * @param connectionIdentifier Unique ID or name of the connection. + * @param updateConnectionStatusRequest + */ + updateConnectionStatus(connectionIdentifier, updateConnectionStatusRequest, _options) { + return __async(this, null, function* () { + var _a, _b, _c; + let _config = _options || this.configuration; + if (connectionIdentifier === null || connectionIdentifier === void 0) { + throw new RequiredError("ConnectionsApi", "updateConnectionStatus", "connectionIdentifier"); + } + if (updateConnectionStatusRequest === null || updateConnectionStatusRequest === void 0) { + throw new RequiredError("ConnectionsApi", "updateConnectionStatus", "updateConnectionStatusRequest"); + } + const localVarPath = "/api/rest/2.0/connections/{connection_identifier}/status".replace("{connection_identifier}", encodeURIComponent(String(connectionIdentifier))); + const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.25.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.25.0"); + const contentType = ObjectSerializer.getPreferredMediaType([ + "application/json" + ]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = ObjectSerializer.stringify( + ObjectSerializer.serialize(updateConnectionStatusRequest, "UpdateConnectionStatusRequest", ""), + contentType + ); + requestContext.setBody(serializedBody); + let authMethod; + authMethod = _config.authMethods["bearerAuth"]; + if (authMethod == null ? void 0 : authMethod.applySecurityAuthentication) { + yield authMethod == null ? void 0 : authMethod.applySecurityAuthentication(requestContext); + } + const defaultAuth = ((_a = _options == null ? void 0 : _options.authMethods) == null ? void 0 : _a.default) || ((_c = (_b = this.configuration) == null ? void 0 : _b.authMethods) == null ? void 0 : _c.default); + if (defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication) { + yield defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication(requestContext); + } + return requestContext; + }); + } + /** + * Version: 10.4.0.cl or later Updates a connection object. Requires `DATAMANAGEMENT` (**Can manage data**) and edit permissions to the connection object, or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) privilege is required. To update a connection object, pass these parameters in your API request: 1. GUID of the connection object. 2. If you are updating tables or database schema of a connection object: a. Add the updated JSON map of metadata with database, schema, and tables in `data_warehouse_config`. b. Set `validate` to `true`. **NOTE:** If the `authentication_type` is anything other than SERVICE_ACCOUNT, you must explicitly provide the authenticationType property in the payload. If you do not specify authenticationType, the API will default to SERVICE_ACCOUNT as the authentication type. * A JSON map of configuration attributes, database details, and table properties in `data_warehouse_config` as shown in the following example: * This is an example of updating a single table in a empty connection: ``` { \"authenticationType\": \"SERVICE_ACCOUNT\", \"externalDatabases\": [ { \"name\": \"DEVELOPMENT\", \"isAutoCreated\": false, \"schemas\": [ { \"name\": \"TS_dataset\", \"tables\": [ { \"name\": \"DEMORENAME\", \"type\": \"TABLE\", \"description\": \"\", \"selected\": true, \"linked\": true, \"gid\": 0, \"datasetId\": \"-1\", \"subType\": \"\", \"reportId\": \"\", \"viewId\": \"\", \"columns\": [ { \"name\": \"Col1\", \"type\": \"VARCHAR\", \"canImport\": true, \"selected\": true, \"description\": \"\", \"isLinkedActive\": true, \"isAggregate\": false }, { \"name\": \"Col2\", \"type\": \"VARCHAR\", \"canImport\": true, \"selected\": true, \"description\": \"\", \"isLinkedActive\": true, \"isAggregate\": false }, { \"name\": \"Col3\", \"type\": \"VARCHAR\", \"canImport\": true, \"selected\": true, \"description\": \"\", \"isLinkedActive\": true, \"isAggregate\": false }, { \"name\": \"Col312\", \"type\": \"VARCHAR\", \"canImport\": true, \"selected\": true, \"description\": \"\", \"isLinkedActive\": true, \"isAggregate\": false }, { \"name\": \"Col4\", \"type\": \"VARCHAR\", \"canImport\": true, \"selected\": true, \"description\": \"\", \"isLinkedActive\": true, \"isAggregate\": false } ], \"relationships\": [] } ] } ] } ], \"configuration\": { \"password\": \"\", \"database\": \"DEVELOPMENT\", \"role\": \"DEV\", \"accountName\": \"thoughtspot_partner\", \"warehouse\": \"DEMO_WH\", \"user\": \"DEV_USER\" } } ``` * This is an example of updating a single table in an existing connection with tables: ``` { \"authenticationType\": \"SERVICE_ACCOUNT\", \"externalDatabases\": [ { \"name\": \"DEVELOPMENT\", \"isAutoCreated\": false, \"schemas\": [ { \"name\": \"TS_dataset\", \"tables\": [ { \"name\": \"CUSTOMER\", \"type\": \"TABLE\", \"description\": \"\", \"selected\": true, \"linked\": true, \"gid\": 0, \"datasetId\": \"-1\", \"subType\": \"\", \"reportId\": \"\", \"viewId\": \"\", \"columns\": [], \"relationships\": [] }, { \"name\": \"tpch5k_falcon_default_schema_users\", \"type\": \"TABLE\", \"description\": \"\", \"selected\": true, \"linked\": true, \"gid\": 0, \"datasetId\": \"-1\", \"subType\": \"\", \"reportId\": \"\", \"viewId\": \"\", \"columns\": [ { \"name\": \"user_id\", \"type\": \"INT64\", \"canImport\": true, \"selected\": true, \"description\": \"\", \"isLinkedActive\": true, \"isAggregate\": false }, { \"name\": \"product_id\", \"type\": \"INT64\", \"canImport\": true, \"selected\": true, \"description\": \"\", \"isLinkedActive\": true, \"isAggregate\": false }, { \"name\": \"user_cost\", \"type\": \"INT64\", \"canImport\": true, \"selected\": true, \"description\": \"\", \"isLinkedActive\": true, \"isAggregate\": false } ], \"relationships\": [] } ] } ] } ], \"configuration\": { \"password\": \"\", \"database\": \"DEVELOPMENT\", \"role\": \"DEV\", \"accountName\": \"thoughtspot_partner\", \"warehouse\": \"DEMO_WH\", \"user\": \"DEV_USER\" } } ``` 3. If you are updating a configuration attribute, connection name, or description, you can set `validate` to `false`. **NOTE:** If the `authentication_type` is anything other than SERVICE_ACCOUNT, you must explicitly provide the authenticationType property in the payload. If you do not specify authenticationType, the API will default to SERVICE_ACCOUNT as the authentication type. * A JSON map of configuration attributes in `data_warehouse_config`. The following example shows the configuration attributes for a Snowflake connection: ``` { \"configuration\":{ \"accountName\":\"thoughtspot_partner\", \"user\":\"tsadmin\", \"password\":\"TestConn123\", \"role\":\"sysadmin\", \"warehouse\":\"MEDIUM_WH\" }, \"externalDatabases\":[ ] } ``` + * @param connectionIdentifier Unique ID or name of the connection. + * @param updateConnectionV2Request + */ + updateConnectionV2(connectionIdentifier, updateConnectionV2Request, _options) { + return __async(this, null, function* () { + var _a, _b, _c; + let _config = _options || this.configuration; + if (connectionIdentifier === null || connectionIdentifier === void 0) { + throw new RequiredError("ConnectionsApi", "updateConnectionV2", "connectionIdentifier"); + } + if (updateConnectionV2Request === null || updateConnectionV2Request === void 0) { + throw new RequiredError("ConnectionsApi", "updateConnectionV2", "updateConnectionV2Request"); + } + const localVarPath = "/api/rest/2.0/connections/{connection_identifier}/update".replace("{connection_identifier}", encodeURIComponent(String(connectionIdentifier))); + const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.25.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.25.0"); + const contentType = ObjectSerializer.getPreferredMediaType([ + "application/json" + ]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = ObjectSerializer.stringify( + ObjectSerializer.serialize(updateConnectionV2Request, "UpdateConnectionV2Request", ""), + contentType + ); + requestContext.setBody(serializedBody); + let authMethod; + authMethod = _config.authMethods["bearerAuth"]; + if (authMethod == null ? void 0 : authMethod.applySecurityAuthentication) { + yield authMethod == null ? void 0 : authMethod.applySecurityAuthentication(requestContext); + } + const defaultAuth = ((_a = _options == null ? void 0 : _options.authMethods) == null ? void 0 : _a.default) || ((_c = (_b = this.configuration) == null ? void 0 : _b.authMethods) == null ? void 0 : _c.default); + if (defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication) { + yield defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication(requestContext); + } + return requestContext; + }); + } +}; +var ConnectionsApiResponseProcessor = class { + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to createConnection + * @throws ApiException if the response code was not in [200, 299] + */ + createConnection(response) { + return __async(this, null, function* () { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("200", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "CreateConnectionResponse", + "" + ); + return body; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Invalid request.", body, response.headers); + } + if (isCodeInRange("401", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unexpected error", body, response.headers); + } + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "CreateConnectionResponse", + "" + ); + return body; + } + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", yield response.getBodyAsAny(), response.headers); + }); + } + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to deleteConnection + * @throws ApiException if the response code was not in [200, 299] + */ + deleteConnection(response) { + return __async(this, null, function* () { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("204", response.httpStatusCode)) { + return; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Invalid request.", body, response.headers); + } + if (isCodeInRange("401", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unexpected error", body, response.headers); + } + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "void", + "" + ); + return body; + } + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", yield response.getBodyAsAny(), response.headers); + }); + } + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to deleteConnectionV2 + * @throws ApiException if the response code was not in [200, 299] + */ + deleteConnectionV2(response) { + return __async(this, null, function* () { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("204", response.httpStatusCode)) { + return; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Invalid request.", body, response.headers); + } + if (isCodeInRange("401", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unexpected error", body, response.headers); + } + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "void", + "" + ); + return body; + } + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", yield response.getBodyAsAny(), response.headers); + }); + } + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to downloadConnectionMetadataChanges + * @throws ApiException if the response code was not in [200, 299] + */ + downloadConnectionMetadataChanges(response) { + return __async(this, null, function* () { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("200", response.httpStatusCode)) { + const body = yield response.getBodyAsFile(); + return body; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "binary" + ); + throw new ApiException(response.httpStatusCode, "Invalid request.", body, response.headers); + } + if (isCodeInRange("401", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "binary" + ); + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "binary" + ); + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "binary" + ); + throw new ApiException(response.httpStatusCode, "Unexpected error", body, response.headers); + } + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "HttpFile", + "binary" + ); + return body; + } + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", yield response.getBodyAsAny(), response.headers); + }); + } + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to fetchConnectionDiffStatus + * @throws ApiException if the response code was not in [200, 299] + */ + fetchConnectionDiffStatus(response) { + return __async(this, null, function* () { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("200", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "FetchConnectionDiffStatusResponse", + "" + ); + return body; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Invalid request.", body, response.headers); + } + if (isCodeInRange("401", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unexpected error", body, response.headers); + } + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "FetchConnectionDiffStatusResponse", + "" + ); + return body; + } + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", yield response.getBodyAsAny(), response.headers); + }); + } + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to revokeRefreshTokens + * @throws ApiException if the response code was not in [200, 299] + */ + revokeRefreshTokens(response) { + return __async(this, null, function* () { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("200", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "RevokeRefreshTokensResponse", + "" + ); + return body; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Invalid request.", body, response.headers); + } + if (isCodeInRange("401", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } + if (isCodeInRange("404", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Object not found", body, response.headers); + } + if (isCodeInRange("409", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Conflict", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unexpected error", body, response.headers); + } + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "RevokeRefreshTokensResponse", + "" + ); + return body; + } + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", yield response.getBodyAsAny(), response.headers); + }); + } + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to searchConnection + * @throws ApiException if the response code was not in [200, 299] + */ + searchConnection(response) { + return __async(this, null, function* () { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("200", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "Array", + "" + ); + return body; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Invalid request.", body, response.headers); + } + if (isCodeInRange("401", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unexpected error", body, response.headers); + } + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "Array", + "" + ); + return body; + } + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", yield response.getBodyAsAny(), response.headers); + }); + } + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to syncMetadata + * @throws ApiException if the response code was not in [200, 299] + */ + syncMetadata(response) { + return __async(this, null, function* () { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("200", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "SyncMetadataResponse", + "" + ); + return body; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Invalid request parameters or hierarchy.", body, response.headers); + } + if (isCodeInRange("401", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } + if (isCodeInRange("404", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Connection, table, or column not found.", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unexpected error", body, response.headers); + } + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "SyncMetadataResponse", + "" + ); + return body; + } + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", yield response.getBodyAsAny(), response.headers); + }); + } + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to updateConnection + * @throws ApiException if the response code was not in [200, 299] + */ + updateConnection(response) { + return __async(this, null, function* () { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("204", response.httpStatusCode)) { + return; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Invalid request.", body, response.headers); + } + if (isCodeInRange("401", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unexpected error", body, response.headers); + } + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "void", + "" + ); + return body; + } + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", yield response.getBodyAsAny(), response.headers); + }); + } + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to updateConnectionStatus + * @throws ApiException if the response code was not in [200, 299] + */ + updateConnectionStatus(response) { + return __async(this, null, function* () { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("204", response.httpStatusCode)) { + return; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Invalid request.", body, response.headers); + } + if (isCodeInRange("401", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } + if (isCodeInRange("404", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Object not found", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unexpected error", body, response.headers); + } + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "void", + "" + ); + return body; + } + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", yield response.getBodyAsAny(), response.headers); + }); + } + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to updateConnectionV2 + * @throws ApiException if the response code was not in [200, 299] + */ + updateConnectionV2(response) { + return __async(this, null, function* () { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("204", response.httpStatusCode)) { + return; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Invalid request.", body, response.headers); + } + if (isCodeInRange("401", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unexpected error", body, response.headers); + } + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "void", + "" + ); + return body; + } + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", yield response.getBodyAsAny(), response.headers); + }); + } +}; + +// apis/CustomActionApi.ts +var CustomActionApiRequestFactory = class extends BaseAPIRequestFactory { + /** + * Version: 9.6.0.cl or later Creates a custom action that appears as a menu action on a saved Answer or Liveboard visualization. Requires `DEVELOPER` (**Has Developer privilege**) or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `DEVELOPER` (**Has developer privilege**) privilege is required. #### Usage Guidelines The API lets you create the following types of custom actions: * URL-based action Allows pushing data to an external URL. * Callback action Triggers a callback to the host application and initiates a response payload on an embedded ThoughtSpot instance. By default, custom actions are visible to only administrator or developer users. To make a custom action available to other users, and specify the groups in `group_identifiers`. By default, the custom action is set as a _global_ action on all visualizations and saved Answers. To assign a custom action to specific Liveboard visualization, saved Answer, or Worksheet, set `visibility` to `false` in `default_action_config` property and specify the GUID or name of the object in `associate_metadata`. For more information, see [Custom actions](https://developers.thoughtspot.com/docs/custom-action-intro). + * @param createCustomActionRequest + */ + createCustomAction(createCustomActionRequest, _options) { + return __async(this, null, function* () { + var _a, _b, _c; + let _config = _options || this.configuration; + if (createCustomActionRequest === null || createCustomActionRequest === void 0) { + throw new RequiredError("CustomActionApi", "createCustomAction", "createCustomActionRequest"); + } + const localVarPath = "/api/rest/2.0/customization/custom-actions"; + const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.25.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.25.0"); + const contentType = ObjectSerializer.getPreferredMediaType([ + "application/json" + ]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = ObjectSerializer.stringify( + ObjectSerializer.serialize(createCustomActionRequest, "CreateCustomActionRequest", ""), + contentType + ); + requestContext.setBody(serializedBody); + let authMethod; + authMethod = _config.authMethods["bearerAuth"]; + if (authMethod == null ? void 0 : authMethod.applySecurityAuthentication) { + yield authMethod == null ? void 0 : authMethod.applySecurityAuthentication(requestContext); + } + const defaultAuth = ((_a = _options == null ? void 0 : _options.authMethods) == null ? void 0 : _a.default) || ((_c = (_b = this.configuration) == null ? void 0 : _b.authMethods) == null ? void 0 : _c.default); + if (defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication) { + yield defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication(requestContext); + } + return requestContext; + }); + } + /** + * Version: 9.6.0.cl or later Removes the custom action specified in the API request. Requires `DEVELOPER` (**Has Developer privilege**) or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `DEVELOPER` (**Has developer privilege**) privilege is required. + * @param customActionIdentifier Unique ID or name of the custom action. + */ + deleteCustomAction(customActionIdentifier, _options) { + return __async(this, null, function* () { + var _a, _b, _c; + let _config = _options || this.configuration; + if (customActionIdentifier === null || customActionIdentifier === void 0) { + throw new RequiredError("CustomActionApi", "deleteCustomAction", "customActionIdentifier"); + } + const localVarPath = "/api/rest/2.0/customization/custom-actions/{custom_action_identifier}/delete".replace("{custom_action_identifier}", encodeURIComponent(String(customActionIdentifier))); + const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.25.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.25.0"); + let authMethod; + authMethod = _config.authMethods["bearerAuth"]; + if (authMethod == null ? void 0 : authMethod.applySecurityAuthentication) { + yield authMethod == null ? void 0 : authMethod.applySecurityAuthentication(requestContext); + } + const defaultAuth = ((_a = _options == null ? void 0 : _options.authMethods) == null ? void 0 : _a.default) || ((_c = (_b = this.configuration) == null ? void 0 : _b.authMethods) == null ? void 0 : _c.default); + if (defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication) { + yield defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication(requestContext); + } + return requestContext; + }); + } + /** + * Version: 9.6.0.cl or later Gets custom actions configured on the cluster. Requires `DEVELOPER` (**Has Developer privilege**) or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `DEVELOPER` (**Has developer privilege**) privilege is required. + * @param searchCustomActionsRequest + */ + searchCustomActions(searchCustomActionsRequest, _options) { + return __async(this, null, function* () { + var _a, _b, _c; + let _config = _options || this.configuration; + if (searchCustomActionsRequest === null || searchCustomActionsRequest === void 0) { + throw new RequiredError("CustomActionApi", "searchCustomActions", "searchCustomActionsRequest"); + } + const localVarPath = "/api/rest/2.0/customization/custom-actions/search"; + const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.25.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.25.0"); + const contentType = ObjectSerializer.getPreferredMediaType([ + "application/json" + ]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = ObjectSerializer.stringify( + ObjectSerializer.serialize(searchCustomActionsRequest, "SearchCustomActionsRequest", ""), + contentType + ); + requestContext.setBody(serializedBody); + let authMethod; + authMethod = _config.authMethods["bearerAuth"]; + if (authMethod == null ? void 0 : authMethod.applySecurityAuthentication) { + yield authMethod == null ? void 0 : authMethod.applySecurityAuthentication(requestContext); + } + const defaultAuth = ((_a = _options == null ? void 0 : _options.authMethods) == null ? void 0 : _a.default) || ((_c = (_b = this.configuration) == null ? void 0 : _b.authMethods) == null ? void 0 : _c.default); + if (defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication) { + yield defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication(requestContext); + } + return requestContext; + }); + } + /** + * Version: 9.6.0.cl or later Updates a custom action. Requires `DEVELOPER` (**Has Developer privilege**) or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `DEVELOPER` (**Has developer privilege**) privilege is required. #### Usage Guidelines The API allows you to modify the following properties: * Name of the custom action * Action availability to groups * Association to metadata objects * Authentication settings for a URL-based action For more information, see [Custom actions](https://developers.thoughtspot.com/docs/custom-action-intro). + * @param customActionIdentifier Unique ID or name of the custom action. + * @param updateCustomActionRequest + */ + updateCustomAction(customActionIdentifier, updateCustomActionRequest, _options) { + return __async(this, null, function* () { + var _a, _b, _c; + let _config = _options || this.configuration; + if (customActionIdentifier === null || customActionIdentifier === void 0) { + throw new RequiredError("CustomActionApi", "updateCustomAction", "customActionIdentifier"); + } + if (updateCustomActionRequest === null || updateCustomActionRequest === void 0) { + throw new RequiredError("CustomActionApi", "updateCustomAction", "updateCustomActionRequest"); + } + const localVarPath = "/api/rest/2.0/customization/custom-actions/{custom_action_identifier}/update".replace("{custom_action_identifier}", encodeURIComponent(String(customActionIdentifier))); + const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.25.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.25.0"); + const contentType = ObjectSerializer.getPreferredMediaType([ + "application/json" + ]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = ObjectSerializer.stringify( + ObjectSerializer.serialize(updateCustomActionRequest, "UpdateCustomActionRequest", ""), + contentType + ); + requestContext.setBody(serializedBody); + let authMethod; + authMethod = _config.authMethods["bearerAuth"]; + if (authMethod == null ? void 0 : authMethod.applySecurityAuthentication) { + yield authMethod == null ? void 0 : authMethod.applySecurityAuthentication(requestContext); + } + const defaultAuth = ((_a = _options == null ? void 0 : _options.authMethods) == null ? void 0 : _a.default) || ((_c = (_b = this.configuration) == null ? void 0 : _b.authMethods) == null ? void 0 : _c.default); + if (defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication) { + yield defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication(requestContext); + } + return requestContext; + }); + } +}; +var CustomActionApiResponseProcessor = class { + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to createCustomAction + * @throws ApiException if the response code was not in [200, 299] + */ + createCustomAction(response) { + return __async(this, null, function* () { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("200", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ResponseCustomAction", + "" + ); + return body; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Invalid request.", body, response.headers); + } + if (isCodeInRange("401", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unexpected error", body, response.headers); + } + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ResponseCustomAction", + "" + ); + return body; + } + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", yield response.getBodyAsAny(), response.headers); + }); + } + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to deleteCustomAction + * @throws ApiException if the response code was not in [200, 299] + */ + deleteCustomAction(response) { + return __async(this, null, function* () { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("204", response.httpStatusCode)) { + return; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Invalid request.", body, response.headers); + } + if (isCodeInRange("401", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unexpected error", body, response.headers); + } + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "void", + "" + ); + return body; + } + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", yield response.getBodyAsAny(), response.headers); + }); + } + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to searchCustomActions + * @throws ApiException if the response code was not in [200, 299] + */ + searchCustomActions(response) { + return __async(this, null, function* () { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("200", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "Array", + "" + ); + return body; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Invalid request.", body, response.headers); + } + if (isCodeInRange("401", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unexpected error", body, response.headers); + } + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "Array", + "" + ); + return body; + } + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", yield response.getBodyAsAny(), response.headers); + }); + } + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to updateCustomAction + * @throws ApiException if the response code was not in [200, 299] + */ + updateCustomAction(response) { + return __async(this, null, function* () { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("204", response.httpStatusCode)) { + return; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Invalid request.", body, response.headers); + } + if (isCodeInRange("401", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unexpected error", body, response.headers); + } + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "void", + "" + ); + return body; + } + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", yield response.getBodyAsAny(), response.headers); + }); + } +}; + +// apis/CustomCalendarsApi.ts +var CustomCalendarsApiRequestFactory = class extends BaseAPIRequestFactory { + /** + * Version: 10.12.0.cl or later Creates a new [custom calendar](https://docs.thoughtspot.com/cloud/latest/connections-cust-cal). Requires `DATAMANAGEMENT` (**Can manage data**) or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your ThoughtSpot instance, the `CAN_MANAGE_CUSTOM_CALENDAR` (**Can manage custom calendars**) privilege is required. #### Usage guidelines You can create a custom calendar from scratch or an existing Table in ThoughtSpot. For both methods of calendar creation, the following parameters are required: * Name of the custom calendar. * Calendar creation method. To create a calendar from an existing table, specify the method: - `FROM_EXISTING_TABLE` - Creates calendar from the table reference provided in the API request. - `FROM_INPUT_PARAMS` - Creates a calendar from the parameters defined in the API request. * Connection ID and Table name * Database and schema name attributes: For most Cloud Data Warehouse (CDW) connectors, both `database_name` and `schema_name` attributes are required. However, the attribute requirements are conditional and vary based on the connector type and its metadata structure. For example, for connectors such as Teradata, MySQL, SingleSore, Amazon Aurora MySQL, Amazon RDS MySQL, Oracle, and GCP_MYSQL, the `schema_name` is required, whereas the `database_name` attribute is not. Similarly, connectors such as ClickHouse require you to specify the `database_name` and the schema specification in such cases is optional. **NOTE**: If you are creating a calendar from an existing table, ensure that the referenced table matches the required DDL for custom calendars. If the schema does not match, the API returns an error. ##### Calendar type The API allows you to create the following types of calendars: * `MONTH_OFFSET`. The default calendar type. A `MONTH_OFFSET` calendar is offset by a few months from the standard calendar months (January to December) and the year begins with the month defined in the request. For example, if the `month_offset` value is set as `April`, the calendar year begins in April. * `4-4-5`. Each quarter in the calendar will include two 4-week months followed by one 5-week month. * `4-5-4`. Each quarter in the calendar will include two 4-week months with a 5-week month between. * `5-4-4`. Each quarter begins with a 5-week month, followed by two 4-week months. To start and end the calendar on a specific date, specify the dates in the `MM/DD/YYYY` format. For `MONTH_OFFSET` calendars, ensure that the `start_date` matches the month specified in the `month_offset` attribute. You can also set the starting day of the week and customize the prefixes for year and quarter labels. #### Examples To create a calendar from an existing table: ``` { \"name\": \"MyCustomCalendar1\", \"table_reference\": { \"connection_identifier\": \"4db8ea22-2ff4-4224-b05a-26674717e468\", \"table_name\": \"MyCalendarTable\", \"database_name\": \"RETAILAPPAREL\", \"schema_name\": \"PUBLIC\" }, \"creation_method\": \"FROM_EXISTING_TABLE\", } ``` To create a calendar from scratch: ``` { \"name\": \"MyCustomCalendar1\", \"table_reference\": { \"connection_identifier\": \"4db8ea22-2ff4-4224-b05a-26674717e468\", \"table_name\": \"MyCalendarTable\", \"database_name\": \"RETAILAPPAREL\", \"schema_name\": \"PUBLIC\" }, \"creation_method\": \"FROM_INPUT_PARAMS\", \"calendar_type\": \"MONTH_OFFSET\", \"month_offset\": \"April\", \"start_day_of_week\": \"Monday\", \"quarter_name_prefix\": \"Q\", \"year_name_prefix\": \"FY\", \"start_date\": \"04/01/2025\", \"end_date\": \"04/31/2025\" } ``` + * @param createCalendarRequest + */ + createCalendar(createCalendarRequest, _options) { + return __async(this, null, function* () { + var _a, _b, _c; + let _config = _options || this.configuration; + if (createCalendarRequest === null || createCalendarRequest === void 0) { + throw new RequiredError("CustomCalendarsApi", "createCalendar", "createCalendarRequest"); + } + const localVarPath = "/api/rest/2.0/calendars/create"; + const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.25.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.25.0"); + const contentType = ObjectSerializer.getPreferredMediaType([ + "application/json" + ]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = ObjectSerializer.stringify( + ObjectSerializer.serialize(createCalendarRequest, "CreateCalendarRequest", ""), + contentType + ); + requestContext.setBody(serializedBody); + let authMethod; + authMethod = _config.authMethods["bearerAuth"]; + if (authMethod == null ? void 0 : authMethod.applySecurityAuthentication) { + yield authMethod == null ? void 0 : authMethod.applySecurityAuthentication(requestContext); + } + const defaultAuth = ((_a = _options == null ? void 0 : _options.authMethods) == null ? void 0 : _a.default) || ((_c = (_b = this.configuration) == null ? void 0 : _b.authMethods) == null ? void 0 : _c.default); + if (defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication) { + yield defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication(requestContext); + } + return requestContext; + }); + } + /** + * Version: 10.12.0.cl or later Deletes a [custom calendar](https://docs.thoughtspot.com/cloud/latest/connections-cust-cal). Requires `DATAMANAGEMENT` (**Can manage data**) or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your ThoughtSpot instance, the `CAN_MANAGE_CUSTOM_CALENDAR` (**Can manage custom calendars**) privilege is required. #### Usage guidelines To delete a custom calendar, specify the calendar ID as a path parameter in the request URL. + * @param calendarIdentifier Unique ID or name of the Calendar. + */ + deleteCalendar(calendarIdentifier, _options) { + return __async(this, null, function* () { + var _a, _b, _c; + let _config = _options || this.configuration; + if (calendarIdentifier === null || calendarIdentifier === void 0) { + throw new RequiredError("CustomCalendarsApi", "deleteCalendar", "calendarIdentifier"); + } + const localVarPath = "/api/rest/2.0/calendars/{calendar_identifier}/delete".replace("{calendar_identifier}", encodeURIComponent(String(calendarIdentifier))); + const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.25.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.25.0"); + let authMethod; + authMethod = _config.authMethods["bearerAuth"]; + if (authMethod == null ? void 0 : authMethod.applySecurityAuthentication) { + yield authMethod == null ? void 0 : authMethod.applySecurityAuthentication(requestContext); + } + const defaultAuth = ((_a = _options == null ? void 0 : _options.authMethods) == null ? void 0 : _a.default) || ((_c = (_b = this.configuration) == null ? void 0 : _b.authMethods) == null ? void 0 : _c.default); + if (defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication) { + yield defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication(requestContext); + } + return requestContext; + }); + } + /** + * Version: 10.12.0.cl or later Exports a [custom calendar](https://docs.thoughtspot.com/cloud/latest/connections-cust-cal) in the CSV format. Requires `DATAMANAGEMENT` (**Can manage data**) or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your ThoughtSpot instance, the `CAN_MANAGE_CUSTOM_CALENDAR` (**Can manage custom calendars**) privilege is required. #### Usage guidelines Use this API to download a custom calendar in the CSV file format. In your API request, specify the following parameters. * Start and end date of the calendar. For \"month offset\" calendars, the start date must match the month defined in the `month_offset` attribute. You can also specify optional parameters such as the starting day of the week and prefixes for the quarter and year labels. + * @param generateCSVRequest + */ + generateCSV(generateCSVRequest, _options) { + return __async(this, null, function* () { + var _a, _b, _c; + let _config = _options || this.configuration; + if (generateCSVRequest === null || generateCSVRequest === void 0) { + throw new RequiredError("CustomCalendarsApi", "generateCSV", "generateCSVRequest"); + } + const localVarPath = "/api/rest/2.0/calendars/generate-csv"; + const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.25.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.25.0"); + const contentType = ObjectSerializer.getPreferredMediaType([ + "application/json" + ]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = ObjectSerializer.stringify( + ObjectSerializer.serialize(generateCSVRequest, "GenerateCSVRequest", ""), + contentType + ); + requestContext.setBody(serializedBody); + let authMethod; + authMethod = _config.authMethods["bearerAuth"]; + if (authMethod == null ? void 0 : authMethod.applySecurityAuthentication) { + yield authMethod == null ? void 0 : authMethod.applySecurityAuthentication(requestContext); + } + const defaultAuth = ((_a = _options == null ? void 0 : _options.authMethods) == null ? void 0 : _a.default) || ((_c = (_b = this.configuration) == null ? void 0 : _b.authMethods) == null ? void 0 : _c.default); + if (defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication) { + yield defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication(requestContext); + } + return requestContext; + }); + } + /** + * Version: 10.12.0.cl or later Gets a list of [custom calendars](https://docs.thoughtspot.com/cloud/latest/connections-cust-cal). Requires `DATAMANAGEMENT` (**Can manage data**) or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your ThoughtSpot instance, the `CAN_MANAGE_CUSTOM_CALENDAR` (**Can manage custom calendars**) privilege is required. #### Usage guidelines By default, the API returns a list of custom calendars for all connection objects. To retrieve custom calendar details for a particular connection, specify the connection ID. You can also use other search parameters such as `name_pattern` and `sort_options` as search filters. The `name_pattern` parameter filters and returns only those objects that match the specified pattern. Use `%` as a wildcard for pattern matching. + * @param searchCalendarsRequest + */ + searchCalendars(searchCalendarsRequest, _options) { + return __async(this, null, function* () { + var _a, _b, _c; + let _config = _options || this.configuration; + if (searchCalendarsRequest === null || searchCalendarsRequest === void 0) { + throw new RequiredError("CustomCalendarsApi", "searchCalendars", "searchCalendarsRequest"); + } + const localVarPath = "/api/rest/2.0/calendars/search"; + const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.25.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.25.0"); + const contentType = ObjectSerializer.getPreferredMediaType([ + "application/json" + ]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = ObjectSerializer.stringify( + ObjectSerializer.serialize(searchCalendarsRequest, "SearchCalendarsRequest", ""), + contentType + ); + requestContext.setBody(serializedBody); + let authMethod; + authMethod = _config.authMethods["bearerAuth"]; + if (authMethod == null ? void 0 : authMethod.applySecurityAuthentication) { + yield authMethod == null ? void 0 : authMethod.applySecurityAuthentication(requestContext); + } + const defaultAuth = ((_a = _options == null ? void 0 : _options.authMethods) == null ? void 0 : _a.default) || ((_c = (_b = this.configuration) == null ? void 0 : _b.authMethods) == null ? void 0 : _c.default); + if (defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication) { + yield defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication(requestContext); + } + return requestContext; + }); + } + /** + * Version: 10.12.0.cl or later Updates the properties of a [custom calendar](https://docs.thoughtspot.com/cloud/latest/connections-cust-cal). Requires `DATAMANAGEMENT` (**Can manage data**) or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your ThoughtSpot instance, the `CAN_MANAGE_CUSTOM_CALENDAR` (**Can manage custom calendars**) privilege is required. #### Usage guidelines You can update the properties of a calendar using one of the following methods: * `FROM_INPUT_PARAMS` to update the calendar properties with the values defined in the API request. * `FROM_EXISTING_TABLE` Creates a calendar from the parameters defined in the API request. To update a custom calendar, specify the calendar ID as a path parameter in the request URL and the following parameters in the request body: * Connection ID and Table name * Database and schema name attributes: For most Cloud Data Warehouse (CDW) connectors, both `database_name` and `schema_name` attributes are required. However, the attribute requirements are conditional and vary based on the connector type and its metadata structure. For example, for connectors such as Teradata, MySQL, SingleSore, Amazon Aurora MySQL, Amazon RDS MySQL, Oracle, and GCP_MYSQL, the `schema_name` is required, whereas the `database_name` attribute is not. Similarly, connectors such as ClickHouse require you to specify the `database_name` and the schema specification in such cases is optional. The API allows you to modify the calendar type, month offset value, start and end date, starting day of the week, and prefixes assigned to the year and quarter labels. #### Examples Update a custom calendar using an existing Table in ThoughtSpot: ``` { \"update_method\": \"FROM_EXISTING_TABLE\", \"table_reference\": { \"connection_identifier\": \"Connection1\", \"database_name\": \"db1\", \"table_name\": \"custom_calendar_2025\", \"schame_name\": \"schemaVar\" } } ``` Update a custom calendar with the attributes defined in the API request: ``` { \"update_method\": \"FROM_INPUT_PARAMS\", \"table_reference\": { \"connection_identifier\": \"Connection1\", \"database_name\": \"db1\", \"table_name\": \"custom_calendar_2025\", \"schame_name\": \"schemaVar\" }, \"month_offset\": \"August\", \"start_day_of_week\": \"Monday\", \"start_date\": \"08/01/2025\", \"end_date\": \"07/31/2026\" } ``` + * @param calendarIdentifier Unique Id or name of the calendar. + * @param updateCalendarRequest + */ + updateCalendar(calendarIdentifier, updateCalendarRequest, _options) { + return __async(this, null, function* () { + var _a, _b, _c; + let _config = _options || this.configuration; + if (calendarIdentifier === null || calendarIdentifier === void 0) { + throw new RequiredError("CustomCalendarsApi", "updateCalendar", "calendarIdentifier"); + } + if (updateCalendarRequest === null || updateCalendarRequest === void 0) { + throw new RequiredError("CustomCalendarsApi", "updateCalendar", "updateCalendarRequest"); + } + const localVarPath = "/api/rest/2.0/calendars/{calendar_identifier}/update".replace("{calendar_identifier}", encodeURIComponent(String(calendarIdentifier))); + const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.25.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.25.0"); + const contentType = ObjectSerializer.getPreferredMediaType([ + "application/json" + ]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = ObjectSerializer.stringify( + ObjectSerializer.serialize(updateCalendarRequest, "UpdateCalendarRequest", ""), + contentType + ); + requestContext.setBody(serializedBody); + let authMethod; + authMethod = _config.authMethods["bearerAuth"]; + if (authMethod == null ? void 0 : authMethod.applySecurityAuthentication) { + yield authMethod == null ? void 0 : authMethod.applySecurityAuthentication(requestContext); + } + const defaultAuth = ((_a = _options == null ? void 0 : _options.authMethods) == null ? void 0 : _a.default) || ((_c = (_b = this.configuration) == null ? void 0 : _b.authMethods) == null ? void 0 : _c.default); + if (defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication) { + yield defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication(requestContext); + } + return requestContext; + }); + } +}; +var CustomCalendarsApiResponseProcessor = class { + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to createCalendar + * @throws ApiException if the response code was not in [200, 299] + */ + createCalendar(response) { + return __async(this, null, function* () { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("200", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "CalendarResponse", + "" + ); + return body; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Invalid request.", body, response.headers); + } + if (isCodeInRange("401", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unexpected error", body, response.headers); + } + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "CalendarResponse", + "" + ); + return body; + } + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", yield response.getBodyAsAny(), response.headers); + }); + } + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to deleteCalendar + * @throws ApiException if the response code was not in [200, 299] + */ + deleteCalendar(response) { + return __async(this, null, function* () { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("204", response.httpStatusCode)) { + return; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Invalid request.", body, response.headers); + } + if (isCodeInRange("401", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unexpected error", body, response.headers); + } + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "void", + "" + ); + return body; + } + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", yield response.getBodyAsAny(), response.headers); + }); + } + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to generateCSV + * @throws ApiException if the response code was not in [200, 299] + */ + generateCSV(response) { + return __async(this, null, function* () { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("200", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "any", + "" + ); + return body; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Invalid request.", body, response.headers); + } + if (isCodeInRange("401", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unexpected error", body, response.headers); + } + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "any", + "" + ); + return body; + } + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", yield response.getBodyAsAny(), response.headers); + }); + } + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to searchCalendars + * @throws ApiException if the response code was not in [200, 299] + */ + searchCalendars(response) { + return __async(this, null, function* () { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("200", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "Array", + "" + ); + return body; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Invalid request.", body, response.headers); + } + if (isCodeInRange("401", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unexpected error", body, response.headers); + } + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "Array", + "" + ); + return body; + } + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", yield response.getBodyAsAny(), response.headers); + }); + } + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to updateCalendar + * @throws ApiException if the response code was not in [200, 299] + */ + updateCalendar(response) { + return __async(this, null, function* () { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("204", response.httpStatusCode)) { + return; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Invalid request.", body, response.headers); + } + if (isCodeInRange("401", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unexpected error", body, response.headers); + } + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "void", + "" + ); + return body; + } + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", yield response.getBodyAsAny(), response.headers); + }); + } +}; + +// apis/DBTApi.ts +var DBTApiRequestFactory = class extends BaseAPIRequestFactory { + /** + * Version: 9.9.0.cl or later Creates a DBT connection object in ThoughtSpot. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege or `DATAMANAGEMENT` (**Can manage data**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the following Data control privileges may be required: - `CAN_MANAGE_CUSTOM_CALENDAR`(**Can manage custom calendars**) - `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) - `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` (**Can manage data models**) #### About create DBT connection DBT connection in ThoughtSpot is used by the user to define DBT credentials for cloud . The API needs embrace connection, embrace database name, DBT url, import type, DBT account identifier, DBT project identifier, DBT access token and environment details (or) embrace connection, embrace database name, import type, file_content to create a connection object. To know more about DBT, see ThoughtSpot Product Documentation. + * @param connectionName Name of the connection. + * @param databaseName Name of the Database. + * @param importType Mention type of Import + * @param accessToken Access token is mandatory when Import_Type is DBT_CLOUD. + * @param dbtUrl DBT URL is mandatory when Import_Type is DBT_CLOUD. + * @param accountId Account ID is mandatory when Import_Type is DBT_CLOUD + * @param projectId Project ID is mandatory when Import_Type is DBT_CLOUD + * @param dbtEnvId DBT Environment ID\\\" + * @param projectName Name of the project + * @param fileContent Upload DBT Manifest and Catalog artifact files as a ZIP file. This field is Mandatory when Import Type is \\\'ZIP_FILE\\\' + */ + dbtConnection(connectionName, databaseName, importType, accessToken, dbtUrl, accountId, projectId, dbtEnvId, projectName, fileContent, _options) { + return __async(this, null, function* () { + var _a, _b, _c; + let _config = _options || this.configuration; + if (connectionName === null || connectionName === void 0) { + throw new RequiredError("DBTApi", "dbtConnection", "connectionName"); + } + if (databaseName === null || databaseName === void 0) { + throw new RequiredError("DBTApi", "dbtConnection", "databaseName"); + } + const localVarPath = "/api/rest/2.0/dbt/dbt-connection"; + const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.25.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.25.0"); + const useForm = canConsumeForm([ + "multipart/form-data" + ]); + let localVarFormParams; + if (useForm) { + localVarFormParams = new FormData(); + } else { + localVarFormParams = new URLSearchParams(); + } + if (connectionName !== void 0) { + localVarFormParams.append("connection_name", connectionName); + } + if (databaseName !== void 0) { + localVarFormParams.append("database_name", databaseName); + } + if (importType !== void 0) { + localVarFormParams.append("import_type", importType); + } + if (accessToken !== void 0) { + localVarFormParams.append("access_token", accessToken); + } + if (dbtUrl !== void 0) { + localVarFormParams.append("dbt_url", dbtUrl); + } + if (accountId !== void 0) { + localVarFormParams.append("account_id", accountId); + } + if (projectId !== void 0) { + localVarFormParams.append("project_id", projectId); + } + if (dbtEnvId !== void 0) { + localVarFormParams.append("dbt_env_id", dbtEnvId); + } + if (projectName !== void 0) { + localVarFormParams.append("project_name", projectName); + } + if (fileContent !== void 0) { + if (localVarFormParams instanceof FormData) { + localVarFormParams.append("file_content", fileContent, fileContent.name); + } + } + requestContext.setBody(localVarFormParams); + if (!useForm) { + const contentType = ObjectSerializer.getPreferredMediaType([ + "multipart/form-data" + ]); + requestContext.setHeaderParam("Content-Type", contentType); + } + let authMethod; + authMethod = _config.authMethods["bearerAuth"]; + if (authMethod == null ? void 0 : authMethod.applySecurityAuthentication) { + yield authMethod == null ? void 0 : authMethod.applySecurityAuthentication(requestContext); + } + const defaultAuth = ((_a = _options == null ? void 0 : _options.authMethods) == null ? void 0 : _a.default) || ((_c = (_b = this.configuration) == null ? void 0 : _b.authMethods) == null ? void 0 : _c.default); + if (defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication) { + yield defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication(requestContext); + } + return requestContext; + }); + } + /** + * Version: 9.9.0.cl or later Resynchronize the existing list of models, tables, worksheet tml’s and import them to Thoughtspot based on the DBT connection object. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege or `DATAMANAGEMENT` (**Can manage data**) privilege, along with an existing DBT connection. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the following data control privileges may be required: - `CAN_MANAGE_CUSTOM_CALENDAR`(**Can manage custom calendars**) - `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) - `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` (**Can manage data models**) + * @param dbtConnectionIdentifier Unique ID of the DBT connection. + * @param fileContent Upload DBT Manifest and Catalog artifact files as a ZIP file. This field is mandatory if the connection was created with import_type ‘ZIP_FILE’ + */ + dbtGenerateSyncTml(dbtConnectionIdentifier, fileContent, _options) { + return __async(this, null, function* () { + var _a, _b, _c; + let _config = _options || this.configuration; + if (dbtConnectionIdentifier === null || dbtConnectionIdentifier === void 0) { + throw new RequiredError("DBTApi", "dbtGenerateSyncTml", "dbtConnectionIdentifier"); + } + const localVarPath = "/api/rest/2.0/dbt/generate-sync-tml"; + const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.25.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.25.0"); + const useForm = canConsumeForm([ + "multipart/form-data" + ]); + let localVarFormParams; + if (useForm) { + localVarFormParams = new FormData(); + } else { + localVarFormParams = new URLSearchParams(); + } + if (dbtConnectionIdentifier !== void 0) { + localVarFormParams.append("dbt_connection_identifier", dbtConnectionIdentifier); + } + if (fileContent !== void 0) { + if (localVarFormParams instanceof FormData) { + localVarFormParams.append("file_content", fileContent, fileContent.name); + } + } + requestContext.setBody(localVarFormParams); + if (!useForm) { + const contentType = ObjectSerializer.getPreferredMediaType([ + "multipart/form-data" + ]); + requestContext.setHeaderParam("Content-Type", contentType); + } + let authMethod; + authMethod = _config.authMethods["bearerAuth"]; + if (authMethod == null ? void 0 : authMethod.applySecurityAuthentication) { + yield authMethod == null ? void 0 : authMethod.applySecurityAuthentication(requestContext); + } + const defaultAuth = ((_a = _options == null ? void 0 : _options.authMethods) == null ? void 0 : _a.default) || ((_c = (_b = this.configuration) == null ? void 0 : _b.authMethods) == null ? void 0 : _c.default); + if (defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication) { + yield defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication(requestContext); + } + return requestContext; + }); + } + /** + * Version: 9.9.0.cl or later Generate required table and worksheet and import them. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege or `DATAMANAGEMENT` (**Can manage data**) privilege, along with an existing DBT connection. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the following data control privileges may be required: - `CAN_MANAGE_CUSTOM_CALENDAR`(**Can manage custom calendars**) - `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) - `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` (**Can manage data models**) #### About generate TML Models and Worksheets to be imported can be selected by the user as part of the API. + * @param dbtConnectionIdentifier Unique ID of the DBT connection. + * @param modelTables List of Models and their respective Tables Example: \\\'[{\\\"model_name\\\": \\\"model_name\\\", \\\"tables\\\": [\\\"table_name\\\"]}]\\\' + * @param importWorksheets Mention the worksheet tmls to import + * @param worksheets List of worksheets is mandatory when import_Worksheets is type SELECTED Example: [\\\"worksheet_name\\\"] + * @param fileContent Upload DBT Manifest and Catalog artifact files as a ZIP file. This field is mandatory if the connection was created with import_type ‘ZIP_FILE’ + */ + dbtGenerateTml(dbtConnectionIdentifier, modelTables, importWorksheets, worksheets, fileContent, _options) { + return __async(this, null, function* () { + var _a, _b, _c; + let _config = _options || this.configuration; + if (dbtConnectionIdentifier === null || dbtConnectionIdentifier === void 0) { + throw new RequiredError("DBTApi", "dbtGenerateTml", "dbtConnectionIdentifier"); + } + if (modelTables === null || modelTables === void 0) { + throw new RequiredError("DBTApi", "dbtGenerateTml", "modelTables"); + } + if (importWorksheets === null || importWorksheets === void 0) { + throw new RequiredError("DBTApi", "dbtGenerateTml", "importWorksheets"); + } + const localVarPath = "/api/rest/2.0/dbt/generate-tml"; + const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.25.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.25.0"); + const useForm = canConsumeForm([ + "multipart/form-data" + ]); + let localVarFormParams; + if (useForm) { + localVarFormParams = new FormData(); + } else { + localVarFormParams = new URLSearchParams(); + } + if (dbtConnectionIdentifier !== void 0) { + localVarFormParams.append("dbt_connection_identifier", dbtConnectionIdentifier); + } + if (modelTables !== void 0) { + localVarFormParams.append("model_tables", modelTables); + } + if (importWorksheets !== void 0) { + localVarFormParams.append("import_worksheets", importWorksheets); + } + if (worksheets !== void 0) { + localVarFormParams.append("worksheets", worksheets); + } + if (fileContent !== void 0) { + if (localVarFormParams instanceof FormData) { + localVarFormParams.append("file_content", fileContent, fileContent.name); + } + } + requestContext.setBody(localVarFormParams); + if (!useForm) { + const contentType = ObjectSerializer.getPreferredMediaType([ + "multipart/form-data" + ]); + requestContext.setHeaderParam("Content-Type", contentType); + } + let authMethod; + authMethod = _config.authMethods["bearerAuth"]; + if (authMethod == null ? void 0 : authMethod.applySecurityAuthentication) { + yield authMethod == null ? void 0 : authMethod.applySecurityAuthentication(requestContext); + } + const defaultAuth = ((_a = _options == null ? void 0 : _options.authMethods) == null ? void 0 : _a.default) || ((_c = (_b = this.configuration) == null ? void 0 : _b.authMethods) == null ? void 0 : _c.default); + if (defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication) { + yield defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication(requestContext); + } + return requestContext; + }); + } + /** + * Version: 9.9.0.cl or later Gets a list of DBT connection objects by user and organization, available on the ThoughtSpot system. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege or `DATAMANAGEMENT` (**Can manage data**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the following Data control privileges may be required: - `CAN_MANAGE_CUSTOM_CALENDAR`(**Can manage custom calendars**) - `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) - `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` (**Can manage data models**) #### About search DBT connection To get details of a specific DBT connection identifier, database connection identifier, database connection name, database name, project name, project identifier, environment identifier , import type and author. + */ + dbtSearch(_options) { + return __async(this, null, function* () { + var _a, _b, _c; + let _config = _options || this.configuration; + const localVarPath = "/api/rest/2.0/dbt/search"; + const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.25.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.25.0"); + let authMethod; + authMethod = _config.authMethods["bearerAuth"]; + if (authMethod == null ? void 0 : authMethod.applySecurityAuthentication) { + yield authMethod == null ? void 0 : authMethod.applySecurityAuthentication(requestContext); + } + const defaultAuth = ((_a = _options == null ? void 0 : _options.authMethods) == null ? void 0 : _a.default) || ((_c = (_b = this.configuration) == null ? void 0 : _b.authMethods) == null ? void 0 : _c.default); + if (defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication) { + yield defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication(requestContext); + } + return requestContext; + }); + } + /** + * Version: 9.9.0.cl or later Removes the specified DBT connection object from the ThoughtSpot system. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) or `DATAMANAGEMENT` (**Can manage data ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the following Data control privileges may be required: - `CAN_MANAGE_CUSTOM_CALENDAR`(**Can manage custom calendars**) - `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) - `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` (**Can manage data models**) + * @param dbtConnectionIdentifier Unique ID of the DBT Connection. + */ + deleteDbtConnection(dbtConnectionIdentifier, _options) { + return __async(this, null, function* () { + var _a, _b, _c; + let _config = _options || this.configuration; + if (dbtConnectionIdentifier === null || dbtConnectionIdentifier === void 0) { + throw new RequiredError("DBTApi", "deleteDbtConnection", "dbtConnectionIdentifier"); + } + const localVarPath = "/api/rest/2.0/dbt/{dbt_connection_identifier}/delete".replace("{dbt_connection_identifier}", encodeURIComponent(String(dbtConnectionIdentifier))); + const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.25.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.25.0"); + let authMethod; + authMethod = _config.authMethods["bearerAuth"]; + if (authMethod == null ? void 0 : authMethod.applySecurityAuthentication) { + yield authMethod == null ? void 0 : authMethod.applySecurityAuthentication(requestContext); + } + const defaultAuth = ((_a = _options == null ? void 0 : _options.authMethods) == null ? void 0 : _a.default) || ((_c = (_b = this.configuration) == null ? void 0 : _b.authMethods) == null ? void 0 : _c.default); + if (defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication) { + yield defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication(requestContext); + } + return requestContext; + }); + } + /** + * Version: 9.9.0.cl or later Updates a DBT connection object. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege or `DATAMANAGEMENT` (**Can manage data ThoughtSpot**) privilege, along with an existing DBT connection. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the following data control privileges may be required: - `CAN_MANAGE_CUSTOM_CALENDAR`(**Can manage custom calendars**) - `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) - `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` (**Can manage data models**) #### About update DBT connection You can modify DBT connection object properties such as embrace connection name, embrace database name, import type, account identifier, access token, project identifier and environment (or) embrace connection, embrace database name, import type, file_content settings. + * @param dbtConnectionIdentifier Unique ID of the DBT Connection. + * @param connectionName Name of the connection. + * @param databaseName Name of the Database. + * @param importType Mention type of Import + * @param accessToken Access token is mandatory when Import_Type is DBT_CLOUD. + * @param dbtUrl DBT URL is mandatory when Import_Type is DBT_CLOUD. + * @param accountId Account ID is mandatory when Import_Type is DBT_CLOUD + * @param projectId Project ID is mandatory when Import_Type is DBT_CLOUD + * @param dbtEnvId DBT Environment ID\\\" + * @param projectName Name of the project + * @param fileContent Upload DBT Manifest and Catalog artifact files as a ZIP file. This field is Mandatory when Import Type is \\\'ZIP_FILE\\\' + */ + updateDbtConnection(dbtConnectionIdentifier, connectionName, databaseName, importType, accessToken, dbtUrl, accountId, projectId, dbtEnvId, projectName, fileContent, _options) { + return __async(this, null, function* () { + var _a, _b, _c; + let _config = _options || this.configuration; + if (dbtConnectionIdentifier === null || dbtConnectionIdentifier === void 0) { + throw new RequiredError("DBTApi", "updateDbtConnection", "dbtConnectionIdentifier"); + } + const localVarPath = "/api/rest/2.0/dbt/update-dbt-connection"; + const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.25.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.25.0"); + const useForm = canConsumeForm([ + "multipart/form-data" + ]); + let localVarFormParams; + if (useForm) { + localVarFormParams = new FormData(); + } else { + localVarFormParams = new URLSearchParams(); + } + if (dbtConnectionIdentifier !== void 0) { + localVarFormParams.append("dbt_connection_identifier", dbtConnectionIdentifier); + } + if (connectionName !== void 0) { + localVarFormParams.append("connection_name", connectionName); + } + if (databaseName !== void 0) { + localVarFormParams.append("database_name", databaseName); + } + if (importType !== void 0) { + localVarFormParams.append("import_type", importType); + } + if (accessToken !== void 0) { + localVarFormParams.append("access_token", accessToken); + } + if (dbtUrl !== void 0) { + localVarFormParams.append("dbt_url", dbtUrl); + } + if (accountId !== void 0) { + localVarFormParams.append("account_id", accountId); + } + if (projectId !== void 0) { + localVarFormParams.append("project_id", projectId); + } + if (dbtEnvId !== void 0) { + localVarFormParams.append("dbt_env_id", dbtEnvId); + } + if (projectName !== void 0) { + localVarFormParams.append("project_name", projectName); + } + if (fileContent !== void 0) { + if (localVarFormParams instanceof FormData) { + localVarFormParams.append("file_content", fileContent, fileContent.name); + } + } + requestContext.setBody(localVarFormParams); + if (!useForm) { + const contentType = ObjectSerializer.getPreferredMediaType([ + "multipart/form-data" + ]); + requestContext.setHeaderParam("Content-Type", contentType); + } + let authMethod; + authMethod = _config.authMethods["bearerAuth"]; + if (authMethod == null ? void 0 : authMethod.applySecurityAuthentication) { + yield authMethod == null ? void 0 : authMethod.applySecurityAuthentication(requestContext); + } + const defaultAuth = ((_a = _options == null ? void 0 : _options.authMethods) == null ? void 0 : _a.default) || ((_c = (_b = this.configuration) == null ? void 0 : _b.authMethods) == null ? void 0 : _c.default); + if (defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication) { + yield defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication(requestContext); + } + return requestContext; + }); + } +}; +var DBTApiResponseProcessor = class { + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to dbtConnection + * @throws ApiException if the response code was not in [200, 299] + */ + dbtConnection(response) { + return __async(this, null, function* () { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("200", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "any", + "" + ); + return body; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Invalid request.", body, response.headers); + } + if (isCodeInRange("401", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unexpected error", body, response.headers); + } + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "any", + "" + ); + return body; + } + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", yield response.getBodyAsAny(), response.headers); + }); + } + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to dbtGenerateSyncTml + * @throws ApiException if the response code was not in [200, 299] + */ + dbtGenerateSyncTml(response) { + return __async(this, null, function* () { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("200", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "any", + "" + ); + return body; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Invalid request.", body, response.headers); + } + if (isCodeInRange("401", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unexpected error", body, response.headers); + } + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "any", + "" + ); + return body; + } + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", yield response.getBodyAsAny(), response.headers); + }); + } + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to dbtGenerateTml + * @throws ApiException if the response code was not in [200, 299] + */ + dbtGenerateTml(response) { + return __async(this, null, function* () { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("200", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "any", + "" + ); + return body; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Invalid request.", body, response.headers); + } + if (isCodeInRange("401", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unexpected error", body, response.headers); + } + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "any", + "" + ); + return body; + } + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", yield response.getBodyAsAny(), response.headers); + }); + } + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to dbtSearch + * @throws ApiException if the response code was not in [200, 299] + */ + dbtSearch(response) { + return __async(this, null, function* () { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("200", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "Array", + "" + ); + return body; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Invalid request.", body, response.headers); + } + if (isCodeInRange("401", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unexpected error", body, response.headers); + } + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "Array", + "" + ); + return body; + } + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", yield response.getBodyAsAny(), response.headers); + }); + } + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to deleteDbtConnection + * @throws ApiException if the response code was not in [200, 299] + */ + deleteDbtConnection(response) { + return __async(this, null, function* () { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("204", response.httpStatusCode)) { + return; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Invalid request.", body, response.headers); + } + if (isCodeInRange("401", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unexpected error", body, response.headers); + } + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "void", + "" + ); + return body; + } + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", yield response.getBodyAsAny(), response.headers); + }); + } + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to updateDbtConnection + * @throws ApiException if the response code was not in [200, 299] + */ + updateDbtConnection(response) { + return __async(this, null, function* () { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("200", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "any", + "" + ); + return body; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Invalid request.", body, response.headers); + } + if (isCodeInRange("401", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unexpected error", body, response.headers); + } + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "any", + "" + ); + return body; + } + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", yield response.getBodyAsAny(), response.headers); + }); + } +}; + +// apis/DataApi.ts +var DataApiRequestFactory = class extends BaseAPIRequestFactory { + /** + * Version: 9.0.0.cl or later Fetches data from a saved Answer. Requires at least view access to the saved Answer. The `record_size` attribute determines the number of records to retrieve in an API call. For more information about pagination, record size, and maximum row limit, see [Pagination and record size settings](https://developers.thoughtspot.com/docs/fetch-data-and-report-apis#_pagination_settings_for_data_and_report_apis). + * @param fetchAnswerDataRequest + */ + fetchAnswerData(fetchAnswerDataRequest, _options) { + return __async(this, null, function* () { + var _a, _b, _c; + let _config = _options || this.configuration; + if (fetchAnswerDataRequest === null || fetchAnswerDataRequest === void 0) { + throw new RequiredError("DataApi", "fetchAnswerData", "fetchAnswerDataRequest"); + } + const localVarPath = "/api/rest/2.0/metadata/answer/data"; + const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.25.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.25.0"); + const contentType = ObjectSerializer.getPreferredMediaType([ + "application/json" + ]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = ObjectSerializer.stringify( + ObjectSerializer.serialize(fetchAnswerDataRequest, "FetchAnswerDataRequest", ""), + contentType + ); + requestContext.setBody(serializedBody); + let authMethod; + authMethod = _config.authMethods["bearerAuth"]; + if (authMethod == null ? void 0 : authMethod.applySecurityAuthentication) { + yield authMethod == null ? void 0 : authMethod.applySecurityAuthentication(requestContext); + } + const defaultAuth = ((_a = _options == null ? void 0 : _options.authMethods) == null ? void 0 : _a.default) || ((_c = (_b = this.configuration) == null ? void 0 : _b.authMethods) == null ? void 0 : _c.default); + if (defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication) { + yield defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication(requestContext); + } + return requestContext; + }); + } + /** + * Version: 9.0.0.cl or later Gets data from a Liveboard object and its visualization. Requires at least view access to the Liveboard. #### Usage guidelines In the request body, specify the GUID or name of the Liveboard. To get data for specific visualizations, add the GUIDs or names of the visualizations in the API request. To include unsaved changes in the report, pass the `transient_pinboard_content` script generated from the `getExportRequestForCurrentPinboard` method in the Visual Embed SDK. Upon successful execution, the API returns the report with unsaved changes. If the new Liveboard experience mode, the transient content includes ad hoc changes to visualizations such as sorting, toggling of legends, and data drill down. For more information, and see [Liveboard data API](https://developers.thoughtspot.com/docs/fetch-data-and-report-apis#_fetch_liveboard_data_api). + * @param fetchLiveboardDataRequest + */ + fetchLiveboardData(fetchLiveboardDataRequest, _options) { + return __async(this, null, function* () { + var _a, _b, _c; + let _config = _options || this.configuration; + if (fetchLiveboardDataRequest === null || fetchLiveboardDataRequest === void 0) { + throw new RequiredError("DataApi", "fetchLiveboardData", "fetchLiveboardDataRequest"); + } + const localVarPath = "/api/rest/2.0/metadata/liveboard/data"; + const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.25.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.25.0"); + const contentType = ObjectSerializer.getPreferredMediaType([ + "application/json" + ]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = ObjectSerializer.stringify( + ObjectSerializer.serialize(fetchLiveboardDataRequest, "FetchLiveboardDataRequest", ""), + contentType + ); + requestContext.setBody(serializedBody); + let authMethod; + authMethod = _config.authMethods["bearerAuth"]; + if (authMethod == null ? void 0 : authMethod.applySecurityAuthentication) { + yield authMethod == null ? void 0 : authMethod.applySecurityAuthentication(requestContext); + } + const defaultAuth = ((_a = _options == null ? void 0 : _options.authMethods) == null ? void 0 : _a.default) || ((_c = (_b = this.configuration) == null ? void 0 : _b.authMethods) == null ? void 0 : _c.default); + if (defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication) { + yield defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication(requestContext); + } + return requestContext; + }); + } + /** + * Version: 9.0.0.cl or later Generates an Answer from a given data source. Requires at least view access to the data source object (Worksheet or View). #### Usage guidelines To search data, specify the data source GUID in `logical_table_identifier`. The data source can be a Worksheet, View, Table, or SQL view. Pass search tokens in the `query_string` attribute in the API request as shown in the following example: ``` { \"query_string\": \"[sales] by [store]\", \"logical_table_identifier\": \"cd252e5c-b552-49a8-821d-3eadaa049cca\", } ``` For more information about the `query_string` format and data source attribute, see [Search data API](https://developers.thoughtspot.com/docs/fetch-data-and-report-apis#_search_data_api). The `record_size` attribute determines the number of records to retrieve in an API call. For more information about pagination, record size, and maximum row limit, see [Pagination and record size settings](https://developers.thoughtspot.com/docs/fetch-data-and-report-apis#_pagination_settings_for_data_and_report_api). + * @param searchDataRequest + */ + searchData(searchDataRequest, _options) { + return __async(this, null, function* () { + var _a, _b, _c; + let _config = _options || this.configuration; + if (searchDataRequest === null || searchDataRequest === void 0) { + throw new RequiredError("DataApi", "searchData", "searchDataRequest"); + } + const localVarPath = "/api/rest/2.0/searchdata"; + const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.25.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.25.0"); + const contentType = ObjectSerializer.getPreferredMediaType([ + "application/json" + ]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = ObjectSerializer.stringify( + ObjectSerializer.serialize(searchDataRequest, "SearchDataRequest", ""), + contentType + ); + requestContext.setBody(serializedBody); + let authMethod; + authMethod = _config.authMethods["bearerAuth"]; + if (authMethod == null ? void 0 : authMethod.applySecurityAuthentication) { + yield authMethod == null ? void 0 : authMethod.applySecurityAuthentication(requestContext); + } + const defaultAuth = ((_a = _options == null ? void 0 : _options.authMethods) == null ? void 0 : _a.default) || ((_c = (_b = this.configuration) == null ? void 0 : _b.authMethods) == null ? void 0 : _c.default); + if (defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication) { + yield defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication(requestContext); + } + return requestContext; + }); + } +}; +var DataApiResponseProcessor = class { + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to fetchAnswerData + * @throws ApiException if the response code was not in [200, 299] + */ + fetchAnswerData(response) { + return __async(this, null, function* () { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("200", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "AnswerDataResponse", + "" + ); + return body; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Invalid request.", body, response.headers); + } + if (isCodeInRange("401", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unexpected error", body, response.headers); + } + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "AnswerDataResponse", + "" + ); + return body; + } + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", yield response.getBodyAsAny(), response.headers); + }); + } + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to fetchLiveboardData + * @throws ApiException if the response code was not in [200, 299] + */ + fetchLiveboardData(response) { + return __async(this, null, function* () { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("200", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "LiveboardDataResponse", + "" + ); + return body; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Invalid request.", body, response.headers); + } + if (isCodeInRange("401", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unexpected error", body, response.headers); + } + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "LiveboardDataResponse", + "" + ); + return body; + } + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", yield response.getBodyAsAny(), response.headers); + }); + } + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to searchData + * @throws ApiException if the response code was not in [200, 299] + */ + searchData(response) { + return __async(this, null, function* () { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("200", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "SearchDataResponse", + "" + ); + return body; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Invalid request.", body, response.headers); + } + if (isCodeInRange("401", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unexpected error", body, response.headers); + } + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "SearchDataResponse", + "" + ); + return body; + } + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", yield response.getBodyAsAny(), response.headers); + }); + } +}; + +// apis/EmailCustomizationApi.ts +var EmailCustomizationApiRequestFactory = class extends BaseAPIRequestFactory { + /** + * Version: 10.10.0.cl or later Creates a customization configuration for the notification email. #### Pre-requisites Requires `DEVELOPER` (**has developer privilege**) or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `DEVELOPER` (**Has developer privilege**) privilege is required. **NOTE**:This endpoint in currently in beta. Contact ThoughtSpot support to enable this on your instance. #### Usage guidelines To create a custom configuration pass these parameters in your API request: - A JSON map of configuration attributes `template_properties`. The following example shows a sample set of customization configuration: ``` { { \"cta_button_bg_color\": \"#444DEA\", \"cta_text_font_color\": \"#FFFFFF\", \"primary_bg_color\": \"#D3DEF0\", \"logo_url\": \"https://storage.pardot.com/710713/1642089901EbkRibJq/TS_fullworkmark_darkmode.png\", \"font_family\": \"\", \"product_name\": \"ThoughtSpot\", \"footer_address\": \"444 Castro St, Suite 1000 Mountain View, CA 94041\", \"footer_phone\": \"(800) 508-7008\", \"replacement_value_for_liveboard\": \"Dashboard\", \"replacement_value_for_answer\": \"Chart\", \"replacement_value_for_spot_iq\": \"AI Insights\", \"hide_footer_phone\": false, \"hide_footer_address\": false, \"hide_product_name\": false, \"hide_manage_notification\": false, \"hide_mobile_app_nudge\": false, \"hide_privacy_policy\": false, \"hide_ts_vocabulary_definitions\": false, \"hide_error_message\": false, \"hide_unsubscribe_link\": false, \"hide_notification_status\": false, \"hide_modify_alert\": false, \"company_website_url\": \"https://your-website.com/\", \"company_privacy_policy_url\" : \"https://link-to-privacy-policy.com/\", \"contact_support_url\": \"https://link-to-contact-support.com/\", \"hide_contact_support_url\": false, \"hide_logo_url\" : false } } ``` + * @param createEmailCustomizationRequest + */ + createEmailCustomization(createEmailCustomizationRequest, _options) { + return __async(this, null, function* () { + var _a, _b, _c; + let _config = _options || this.configuration; + if (createEmailCustomizationRequest === null || createEmailCustomizationRequest === void 0) { + throw new RequiredError("EmailCustomizationApi", "createEmailCustomization", "createEmailCustomizationRequest"); + } + const localVarPath = "/api/rest/2.0/customization/email"; + const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.25.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.25.0"); + const contentType = ObjectSerializer.getPreferredMediaType([ + "application/json" + ]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = ObjectSerializer.stringify( + ObjectSerializer.serialize(createEmailCustomizationRequest, "CreateEmailCustomizationRequest", ""), + contentType + ); + requestContext.setBody(serializedBody); + let authMethod; + authMethod = _config.authMethods["bearerAuth"]; + if (authMethod == null ? void 0 : authMethod.applySecurityAuthentication) { + yield authMethod == null ? void 0 : authMethod.applySecurityAuthentication(requestContext); + } + const defaultAuth = ((_a = _options == null ? void 0 : _options.authMethods) == null ? void 0 : _a.default) || ((_c = (_b = this.configuration) == null ? void 0 : _b.authMethods) == null ? void 0 : _c.default); + if (defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication) { + yield defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication(requestContext); + } + return requestContext; + }); + } + /** + * Version: 10.10.0.cl or later Deletes the configuration for the email customization. #### Pre-requisites Requires `DEVELOPER` (**has developer privilege**) or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `DEVELOPER` (**Has developer privilege**) privilege is required. **NOTE**:This endpoint in currently in beta. Contact ThoughtSpot support to enable this on your instance. #### Usage guidelines - Call the search API endpoint to get the `template_identifier` from the response. - Use that `template_identifier` as a parameter in this API request. + * @param templateIdentifier Unique ID or name of the email customization. + */ + deleteEmailCustomization(templateIdentifier, _options) { + return __async(this, null, function* () { + var _a, _b, _c; + let _config = _options || this.configuration; + if (templateIdentifier === null || templateIdentifier === void 0) { + throw new RequiredError("EmailCustomizationApi", "deleteEmailCustomization", "templateIdentifier"); + } + const localVarPath = "/api/rest/2.0/customization/email/{template_identifier}/delete".replace("{template_identifier}", encodeURIComponent(String(templateIdentifier))); + const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.25.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.25.0"); + let authMethod; + authMethod = _config.authMethods["bearerAuth"]; + if (authMethod == null ? void 0 : authMethod.applySecurityAuthentication) { + yield authMethod == null ? void 0 : authMethod.applySecurityAuthentication(requestContext); + } + const defaultAuth = ((_a = _options == null ? void 0 : _options.authMethods) == null ? void 0 : _a.default) || ((_c = (_b = this.configuration) == null ? void 0 : _b.authMethods) == null ? void 0 : _c.default); + if (defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication) { + yield defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication(requestContext); + } + return requestContext; + }); + } + /** + * Version: 10.12.0.cl or later Deletes the configuration for the email customization. #### Pre-requisites Requires `DEVELOPER` (**has developer privilege**) or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `DEVELOPER` (**Has developer privilege**) privilege is required. **NOTE**:This endpoint in currently in beta. Contact ThoughtSpot support to enable this on your instance. #### Usage guidelines - Call the search API endpoint to get the `org_identifier` from the response. - Use that `org_identifier` as a parameter in this API request. + * @param deleteOrgEmailCustomizationRequest + */ + deleteOrgEmailCustomization(deleteOrgEmailCustomizationRequest, _options) { + return __async(this, null, function* () { + var _a, _b, _c; + let _config = _options || this.configuration; + if (deleteOrgEmailCustomizationRequest === null || deleteOrgEmailCustomizationRequest === void 0) { + throw new RequiredError("EmailCustomizationApi", "deleteOrgEmailCustomization", "deleteOrgEmailCustomizationRequest"); + } + const localVarPath = "/api/rest/2.0/customization/email/delete"; + const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.25.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.25.0"); + const contentType = ObjectSerializer.getPreferredMediaType([ + "application/json" + ]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = ObjectSerializer.stringify( + ObjectSerializer.serialize(deleteOrgEmailCustomizationRequest, "DeleteOrgEmailCustomizationRequest", ""), + contentType + ); + requestContext.setBody(serializedBody); + let authMethod; + authMethod = _config.authMethods["bearerAuth"]; + if (authMethod == null ? void 0 : authMethod.applySecurityAuthentication) { + yield authMethod == null ? void 0 : authMethod.applySecurityAuthentication(requestContext); + } + const defaultAuth = ((_a = _options == null ? void 0 : _options.authMethods) == null ? void 0 : _a.default) || ((_c = (_b = this.configuration) == null ? void 0 : _b.authMethods) == null ? void 0 : _c.default); + if (defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication) { + yield defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication(requestContext); + } + return requestContext; + }); + } + /** + * Version: 10.10.0.cl or later Search the email customization configuration if any set for the ThoughtSpot system. #### Pre-requisites Requires `DEVELOPER` (**has developer privilege**) or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `DEVELOPER` (**Has developer privilege**) privilege is required. **NOTE**:This endpoint in currently in beta. Contact ThoughtSpot support to enable this on your instance. + * @param searchEmailCustomizationRequest + */ + searchEmailCustomization(searchEmailCustomizationRequest, _options) { + return __async(this, null, function* () { + var _a, _b, _c; + let _config = _options || this.configuration; + if (searchEmailCustomizationRequest === null || searchEmailCustomizationRequest === void 0) { + throw new RequiredError("EmailCustomizationApi", "searchEmailCustomization", "searchEmailCustomizationRequest"); + } + const localVarPath = "/api/rest/2.0/customization/email/search"; + const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.25.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.25.0"); + const contentType = ObjectSerializer.getPreferredMediaType([ + "application/json" + ]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = ObjectSerializer.stringify( + ObjectSerializer.serialize(searchEmailCustomizationRequest, "SearchEmailCustomizationRequest", ""), + contentType + ); + requestContext.setBody(serializedBody); + let authMethod; + authMethod = _config.authMethods["bearerAuth"]; + if (authMethod == null ? void 0 : authMethod.applySecurityAuthentication) { + yield authMethod == null ? void 0 : authMethod.applySecurityAuthentication(requestContext); + } + const defaultAuth = ((_a = _options == null ? void 0 : _options.authMethods) == null ? void 0 : _a.default) || ((_c = (_b = this.configuration) == null ? void 0 : _b.authMethods) == null ? void 0 : _c.default); + if (defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication) { + yield defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication(requestContext); + } + return requestContext; + }); + } + /** + * Version: 10.12.0.cl or later Updates a customization configuration for the notification email. #### Pre-requisites Requires `DEVELOPER` (**has developer privilege**) or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `DEVELOPER` (**Has developer privilege**) privilege is required. **NOTE**:This endpoint in currently in beta. Contact ThoughtSpot support to enable this on your instance. #### Usage guidelines To update a custom configuration pass these parameters in your API request: - A JSON map of configuration attributes `template_properties`. The following example shows a sample set of customization configuration: ``` { { \"cta_button_bg_color\": \"#444DEA\", \"cta_text_font_color\": \"#FFFFFF\", \"primary_bg_color\": \"#D3DEF0\", \"logo_url\": \"https://storage.pardot.com/710713/1642089901EbkRibJq/TS_fullworkmark_darkmode.png\", \"font_family\": \"\", \"product_name\": \"ThoughtSpot\", \"footer_address\": \"444 Castro St, Suite 1000 Mountain View, CA 94041\", \"footer_phone\": \"(800) 508-7008\", \"replacement_value_for_liveboard\": \"Dashboard\", \"replacement_value_for_answer\": \"Chart\", \"replacement_value_for_spot_iq\": \"AI Insights\", \"hide_footer_phone\": false, \"hide_footer_address\": false, \"hide_product_name\": false, \"hide_manage_notification\": false, \"hide_mobile_app_nudge\": false, \"hide_privacy_policy\": false, \"hide_ts_vocabulary_definitions\": false, \"hide_error_message\": false, \"hide_unsubscribe_link\": false, \"hide_notification_status\": false, \"hide_modify_alert\": false, \"company_website_url\": \"https://your-website.com/\", \"company_privacy_policy_url\" : \"https://link-to-privacy-policy.com/\", \"contact_support_url\": \"https://link-to-contact-support.com/\", \"hide_contact_support_url\": false, \"hide_logo_url\" : false } } ``` + * @param updateEmailCustomizationRequest + */ + updateEmailCustomization(updateEmailCustomizationRequest, _options) { + return __async(this, null, function* () { + var _a, _b, _c; + let _config = _options || this.configuration; + if (updateEmailCustomizationRequest === null || updateEmailCustomizationRequest === void 0) { + throw new RequiredError("EmailCustomizationApi", "updateEmailCustomization", "updateEmailCustomizationRequest"); + } + const localVarPath = "/api/rest/2.0/customization/email/update"; + const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.25.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.25.0"); + const contentType = ObjectSerializer.getPreferredMediaType([ + "application/json" + ]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = ObjectSerializer.stringify( + ObjectSerializer.serialize(updateEmailCustomizationRequest, "UpdateEmailCustomizationRequest", ""), + contentType + ); + requestContext.setBody(serializedBody); + let authMethod; + authMethod = _config.authMethods["bearerAuth"]; + if (authMethod == null ? void 0 : authMethod.applySecurityAuthentication) { + yield authMethod == null ? void 0 : authMethod.applySecurityAuthentication(requestContext); + } + const defaultAuth = ((_a = _options == null ? void 0 : _options.authMethods) == null ? void 0 : _a.default) || ((_c = (_b = this.configuration) == null ? void 0 : _b.authMethods) == null ? void 0 : _c.default); + if (defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication) { + yield defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication(requestContext); + } + return requestContext; + }); + } + /** + * Version: 10.10.0.cl or later Validates the email customization configuration if any set for the ThoughtSpot system. #### Pre-requisites Requires `DEVELOPER` (**has developer privilege**) or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `DEVELOPER` (**Has developer privilege**) privilege is required. **NOTE**:This endpoint in currently in beta. Contact ThoughtSpot support to enable this on your instance. + */ + validateEmailCustomization(_options) { + return __async(this, null, function* () { + var _a, _b, _c; + let _config = _options || this.configuration; + const localVarPath = "/api/rest/2.0/customization/email/validate"; + const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.25.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.25.0"); + let authMethod; + authMethod = _config.authMethods["bearerAuth"]; + if (authMethod == null ? void 0 : authMethod.applySecurityAuthentication) { + yield authMethod == null ? void 0 : authMethod.applySecurityAuthentication(requestContext); + } + const defaultAuth = ((_a = _options == null ? void 0 : _options.authMethods) == null ? void 0 : _a.default) || ((_c = (_b = this.configuration) == null ? void 0 : _b.authMethods) == null ? void 0 : _c.default); + if (defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication) { + yield defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication(requestContext); + } + return requestContext; + }); + } +}; +var EmailCustomizationApiResponseProcessor = class { + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to createEmailCustomization + * @throws ApiException if the response code was not in [200, 299] + */ + createEmailCustomization(response) { + return __async(this, null, function* () { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("200", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "CreateEmailCustomizationResponse", + "" + ); + return body; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Invalid request.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unexpected error", body, response.headers); + } + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "CreateEmailCustomizationResponse", + "" + ); + return body; + } + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", yield response.getBodyAsAny(), response.headers); + }); + } + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to deleteEmailCustomization + * @throws ApiException if the response code was not in [200, 299] + */ + deleteEmailCustomization(response) { + return __async(this, null, function* () { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("204", response.httpStatusCode)) { + return; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Invalid request.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unexpected error", body, response.headers); + } + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "void", + "" + ); + return body; + } + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", yield response.getBodyAsAny(), response.headers); + }); + } + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to deleteOrgEmailCustomization + * @throws ApiException if the response code was not in [200, 299] + */ + deleteOrgEmailCustomization(response) { + return __async(this, null, function* () { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("204", response.httpStatusCode)) { + return; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Invalid request.", body, response.headers); + } + if (isCodeInRange("401", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unexpected error", body, response.headers); + } + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "void", + "" + ); + return body; + } + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", yield response.getBodyAsAny(), response.headers); + }); + } + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to searchEmailCustomization + * @throws ApiException if the response code was not in [200, 299] + */ + searchEmailCustomization(response) { + return __async(this, null, function* () { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("200", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "Array", + "" + ); + return body; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Invalid request.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unexpected error", body, response.headers); + } + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "Array", + "" + ); + return body; + } + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", yield response.getBodyAsAny(), response.headers); + }); + } + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to updateEmailCustomization + * @throws ApiException if the response code was not in [200, 299] + */ + updateEmailCustomization(response) { + return __async(this, null, function* () { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("204", response.httpStatusCode)) { + return; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Invalid request.", body, response.headers); + } + if (isCodeInRange("401", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unexpected error", body, response.headers); + } + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "void", + "" + ); + return body; + } + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", yield response.getBodyAsAny(), response.headers); + }); + } + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to validateEmailCustomization + * @throws ApiException if the response code was not in [200, 299] + */ + validateEmailCustomization(response) { + return __async(this, null, function* () { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("204", response.httpStatusCode)) { + return; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Invalid request.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unexpected error", body, response.headers); + } + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "void", + "" + ); + return body; + } + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", yield response.getBodyAsAny(), response.headers); + }); + } +}; + +// apis/GroupsApi.ts +var GroupsApiRequestFactory = class extends BaseAPIRequestFactory { + /** + * Version: 9.0.0.cl or later Creates a group object in ThoughtSpot. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `GROUP_ADMINISTRATION` (**Can manage groups**) privilege is required. #### About groups Groups in ThoughtSpot are used by the administrators to define privileges and organize users based on their roles and access requirements. To know more about groups and privileges, see [ThoughtSpot Product Documentation](https://docs.thoughtspot.com/cloud/latest/groups-privileges). #### Supported operations The API endpoint lets you perform the following operations: * Assign privileges * Add users * Define sharing visibility * Add sub-groups * Assign a default Liveboard + * @param createUserGroupRequest + */ + createUserGroup(createUserGroupRequest, _options) { + return __async(this, null, function* () { + var _a, _b, _c; + let _config = _options || this.configuration; + if (createUserGroupRequest === null || createUserGroupRequest === void 0) { + throw new RequiredError("GroupsApi", "createUserGroup", "createUserGroupRequest"); + } + const localVarPath = "/api/rest/2.0/groups/create"; + const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.25.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.25.0"); + const contentType = ObjectSerializer.getPreferredMediaType([ + "application/json" + ]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = ObjectSerializer.stringify( + ObjectSerializer.serialize(createUserGroupRequest, "CreateUserGroupRequest", ""), + contentType + ); + requestContext.setBody(serializedBody); + let authMethod; + authMethod = _config.authMethods["bearerAuth"]; + if (authMethod == null ? void 0 : authMethod.applySecurityAuthentication) { + yield authMethod == null ? void 0 : authMethod.applySecurityAuthentication(requestContext); + } + const defaultAuth = ((_a = _options == null ? void 0 : _options.authMethods) == null ? void 0 : _a.default) || ((_c = (_b = this.configuration) == null ? void 0 : _b.authMethods) == null ? void 0 : _c.default); + if (defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication) { + yield defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication(requestContext); + } + return requestContext; + }); + } + /** + * Version: 9.0.0.cl or later Removes the specified group object from the ThoughtSpot system. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `GROUP_ADMINISTRATION` (**Can manage groups**) privilege is required. + * @param groupIdentifier GUID or name of the group. + */ + deleteUserGroup(groupIdentifier, _options) { + return __async(this, null, function* () { + var _a, _b, _c; + let _config = _options || this.configuration; + if (groupIdentifier === null || groupIdentifier === void 0) { + throw new RequiredError("GroupsApi", "deleteUserGroup", "groupIdentifier"); + } + const localVarPath = "/api/rest/2.0/groups/{group_identifier}/delete".replace("{group_identifier}", encodeURIComponent(String(groupIdentifier))); + const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.25.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.25.0"); + let authMethod; + authMethod = _config.authMethods["bearerAuth"]; + if (authMethod == null ? void 0 : authMethod.applySecurityAuthentication) { + yield authMethod == null ? void 0 : authMethod.applySecurityAuthentication(requestContext); + } + const defaultAuth = ((_a = _options == null ? void 0 : _options.authMethods) == null ? void 0 : _a.default) || ((_c = (_b = this.configuration) == null ? void 0 : _b.authMethods) == null ? void 0 : _c.default); + if (defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication) { + yield defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication(requestContext); + } + return requestContext; + }); + } + /** + * Version: 9.0.0.cl or later Imports group objects from external databases into ThoughtSpot. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `GROUP_ADMINISTRATION` (**Can manage groups**) privilege is required. During the import operation: * If the specified group is not available in ThoughtSpot, it will be added to ThoughtSpot. * If `delete_unspecified_groups` is set to `true`, the groups not specified in the API request, excluding administrator and system user groups, are deleted. * If the specified groups are already available in ThoughtSpot, the object properties of these groups are modified and synchronized as per the input data in the API request. A successful API call returns the object that represents the changes made in the ThoughtSpot system. + * @param importUserGroupsRequest + */ + importUserGroups(importUserGroupsRequest, _options) { + return __async(this, null, function* () { + var _a, _b, _c; + let _config = _options || this.configuration; + if (importUserGroupsRequest === null || importUserGroupsRequest === void 0) { + throw new RequiredError("GroupsApi", "importUserGroups", "importUserGroupsRequest"); + } + const localVarPath = "/api/rest/2.0/groups/import"; + const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.25.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.25.0"); + const contentType = ObjectSerializer.getPreferredMediaType([ + "application/json" + ]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = ObjectSerializer.stringify( + ObjectSerializer.serialize(importUserGroupsRequest, "ImportUserGroupsRequest", ""), + contentType + ); + requestContext.setBody(serializedBody); + let authMethod; + authMethod = _config.authMethods["bearerAuth"]; + if (authMethod == null ? void 0 : authMethod.applySecurityAuthentication) { + yield authMethod == null ? void 0 : authMethod.applySecurityAuthentication(requestContext); + } + const defaultAuth = ((_a = _options == null ? void 0 : _options.authMethods) == null ? void 0 : _a.default) || ((_c = (_b = this.configuration) == null ? void 0 : _b.authMethods) == null ? void 0 : _c.default); + if (defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication) { + yield defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication(requestContext); + } + return requestContext; + }); + } + /** + * Version: 9.0.0.cl or later Gets a list of user group objects from the ThoughtSpot system. To get details of a specific user group, specify the user group GUID or name. You can also filter the API response based on User ID, Org ID, Role ID, type of group, sharing visibility, privileges assigned to the group, and the Liveboard IDs assigned to the users in the group. Available to all users. Users with `ADMINISTRATION` (**Can administer ThoughtSpot**) privileges can view all users properties. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `GROUP_ADMINISTRATION` (**Can manage groups**) privilege is required. **NOTE**: If you do not get precise results, try setting `record_size` to `-1` and `record_offset` to `0`. + * @param searchUserGroupsRequest + */ + searchUserGroups(searchUserGroupsRequest, _options) { + return __async(this, null, function* () { + var _a, _b, _c; + let _config = _options || this.configuration; + if (searchUserGroupsRequest === null || searchUserGroupsRequest === void 0) { + throw new RequiredError("GroupsApi", "searchUserGroups", "searchUserGroupsRequest"); + } + const localVarPath = "/api/rest/2.0/groups/search"; + const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.25.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.25.0"); + const contentType = ObjectSerializer.getPreferredMediaType([ + "application/json" + ]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = ObjectSerializer.stringify( + ObjectSerializer.serialize(searchUserGroupsRequest, "SearchUserGroupsRequest", ""), + contentType + ); + requestContext.setBody(serializedBody); + let authMethod; + authMethod = _config.authMethods["bearerAuth"]; + if (authMethod == null ? void 0 : authMethod.applySecurityAuthentication) { + yield authMethod == null ? void 0 : authMethod.applySecurityAuthentication(requestContext); + } + const defaultAuth = ((_a = _options == null ? void 0 : _options.authMethods) == null ? void 0 : _a.default) || ((_c = (_b = this.configuration) == null ? void 0 : _b.authMethods) == null ? void 0 : _c.default); + if (defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication) { + yield defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication(requestContext); + } + return requestContext; + }); + } + /** + * Version: 9.0.0.cl or later Updates the properties of a group object in ThoughtSpot. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `GROUP_ADMINISTRATION` (**Can manage groups**) privilege is required. #### Supported operations This API endpoint lets you perform the following operations in a single API request: * Edit [privileges](https://developers.thoughtspot.com/docs/?pageid=api-user-management#group-privileges) * Add or remove users * Change sharing visibility settings * Add or remove sub-groups * Assign a default Liveboard or update the existing settings + * @param groupIdentifier GUID or name of the group. + * @param updateUserGroupRequest + */ + updateUserGroup(groupIdentifier, updateUserGroupRequest, _options) { + return __async(this, null, function* () { + var _a, _b, _c; + let _config = _options || this.configuration; + if (groupIdentifier === null || groupIdentifier === void 0) { + throw new RequiredError("GroupsApi", "updateUserGroup", "groupIdentifier"); + } + if (updateUserGroupRequest === null || updateUserGroupRequest === void 0) { + throw new RequiredError("GroupsApi", "updateUserGroup", "updateUserGroupRequest"); + } + const localVarPath = "/api/rest/2.0/groups/{group_identifier}/update".replace("{group_identifier}", encodeURIComponent(String(groupIdentifier))); + const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.25.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.25.0"); + const contentType = ObjectSerializer.getPreferredMediaType([ + "application/json" + ]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = ObjectSerializer.stringify( + ObjectSerializer.serialize(updateUserGroupRequest, "UpdateUserGroupRequest", ""), + contentType + ); + requestContext.setBody(serializedBody); + let authMethod; + authMethod = _config.authMethods["bearerAuth"]; + if (authMethod == null ? void 0 : authMethod.applySecurityAuthentication) { + yield authMethod == null ? void 0 : authMethod.applySecurityAuthentication(requestContext); + } + const defaultAuth = ((_a = _options == null ? void 0 : _options.authMethods) == null ? void 0 : _a.default) || ((_c = (_b = this.configuration) == null ? void 0 : _b.authMethods) == null ? void 0 : _c.default); + if (defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication) { + yield defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication(requestContext); + } + return requestContext; + }); + } +}; +var GroupsApiResponseProcessor = class { + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to createUserGroup + * @throws ApiException if the response code was not in [200, 299] + */ + createUserGroup(response) { + return __async(this, null, function* () { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("200", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "UserGroupResponse", + "" + ); + return body; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Invalid request.", body, response.headers); + } + if (isCodeInRange("401", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unexpected error", body, response.headers); + } + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "UserGroupResponse", + "" + ); + return body; + } + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", yield response.getBodyAsAny(), response.headers); + }); + } + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to deleteUserGroup + * @throws ApiException if the response code was not in [200, 299] + */ + deleteUserGroup(response) { + return __async(this, null, function* () { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("204", response.httpStatusCode)) { + return; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Invalid request.", body, response.headers); + } + if (isCodeInRange("401", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unexpected error", body, response.headers); + } + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "void", + "" + ); + return body; + } + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", yield response.getBodyAsAny(), response.headers); + }); + } + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to importUserGroups + * @throws ApiException if the response code was not in [200, 299] + */ + importUserGroups(response) { + return __async(this, null, function* () { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("200", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ImportUserGroupsResponse", + "" + ); + return body; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Invalid request.", body, response.headers); + } + if (isCodeInRange("401", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unexpected error", body, response.headers); + } + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ImportUserGroupsResponse", + "" + ); + return body; + } + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", yield response.getBodyAsAny(), response.headers); + }); + } + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to searchUserGroups + * @throws ApiException if the response code was not in [200, 299] + */ + searchUserGroups(response) { + return __async(this, null, function* () { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("200", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "Array", + "" + ); + return body; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Invalid request.", body, response.headers); + } + if (isCodeInRange("401", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unexpected error", body, response.headers); + } + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "Array", + "" + ); + return body; + } + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", yield response.getBodyAsAny(), response.headers); + }); + } + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to updateUserGroup + * @throws ApiException if the response code was not in [200, 299] + */ + updateUserGroup(response) { + return __async(this, null, function* () { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("204", response.httpStatusCode)) { + return; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Invalid request.", body, response.headers); + } + if (isCodeInRange("401", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unexpected error", body, response.headers); + } + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "void", + "" + ); + return body; + } + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", yield response.getBodyAsAny(), response.headers); + }); + } +}; + +// apis/JobsApi.ts +var JobsApiRequestFactory = class extends BaseAPIRequestFactory { + /** + * Version: 26.4.0.cl or later Searches delivery history for communication channels such as webhooks. Returns channel-level delivery status for each job execution record. Use this to monitor channel health and delivery success rates across events. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) or `DEVELOPER` (**Has developer privilege**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, users with `CAN_MANAGE_WEBHOOKS` (**Can manage webhooks**) privilege are also authorized to perform this action. **NOTE**: When `channel_type` is `WEBHOOK`, the following constraints apply: - `job_ids`, `channel_identifiers`, and `events` each accept at most one element. - When `job_ids` is provided, it is used as the sole lookup key and other filter fields are ignored. - When `job_ids` is not provided, `channel_identifiers` and `events` are both required, each containing exactly one element. - Records older than the configured retention period are not returned. - Use `start_epoch_time_in_millis` and/or `end_epoch_time_in_millis` to narrow results to a specific time window. + * @param searchChannelHistoryRequest + */ + searchChannelHistory(searchChannelHistoryRequest, _options) { + return __async(this, null, function* () { + var _a, _b, _c; + let _config = _options || this.configuration; + if (searchChannelHistoryRequest === null || searchChannelHistoryRequest === void 0) { + throw new RequiredError("JobsApi", "searchChannelHistory", "searchChannelHistoryRequest"); + } + const localVarPath = "/api/rest/2.0/jobs/history/communication-channels/search"; + const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.25.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.25.0"); + const contentType = ObjectSerializer.getPreferredMediaType([ + "application/json" + ]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = ObjectSerializer.stringify( + ObjectSerializer.serialize(searchChannelHistoryRequest, "SearchChannelHistoryRequest", ""), + contentType + ); + requestContext.setBody(serializedBody); + let authMethod; + authMethod = _config.authMethods["bearerAuth"]; + if (authMethod == null ? void 0 : authMethod.applySecurityAuthentication) { + yield authMethod == null ? void 0 : authMethod.applySecurityAuthentication(requestContext); + } + const defaultAuth = ((_a = _options == null ? void 0 : _options.authMethods) == null ? void 0 : _a.default) || ((_c = (_b = this.configuration) == null ? void 0 : _b.authMethods) == null ? void 0 : _c.default); + if (defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication) { + yield defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication(requestContext); + } + return requestContext; + }); + } +}; +var JobsApiResponseProcessor = class { + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to searchChannelHistory + * @throws ApiException if the response code was not in [200, 299] + */ + searchChannelHistory(response) { + return __async(this, null, function* () { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("200", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "SearchChannelHistoryResponse", + "" + ); + return body; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Invalid request.", body, response.headers); + } + if (isCodeInRange("401", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unexpected error", body, response.headers); + } + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "SearchChannelHistoryResponse", + "" + ); + return body; + } + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", yield response.getBodyAsAny(), response.headers); + }); + } +}; + +// apis/LogApi.ts +var LogApiRequestFactory = class extends BaseAPIRequestFactory { + /** + * Version: 9.0.0.cl or later Fetches security audit logs. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the [Admin Control](https://developers.thoughtspot.com/docs/rbac#_admin_control) privileges are required. #### Usage guidelines By default, the API retrieves logs for the last 24 hours. You can set a custom duration in EPOCH time. Make sure the log duration specified in your API request doesn’t exceed 24 hours. If you must fetch logs for a longer time range, modify the duration and make multiple sequential API requests. Upon successful execution, the API returns logs with the following information: * timestamp of the event * event ID * event type * name and GUID of the user * IP address of ThoughtSpot instance For more information see [Audit logs Documentation](https://developers.thoughtspot.com/docs/audit-logs). + * @param fetchLogsRequest + */ + fetchLogs(fetchLogsRequest, _options) { + return __async(this, null, function* () { + var _a, _b, _c; + let _config = _options || this.configuration; + if (fetchLogsRequest === null || fetchLogsRequest === void 0) { + throw new RequiredError("LogApi", "fetchLogs", "fetchLogsRequest"); + } + const localVarPath = "/api/rest/2.0/logs/fetch"; + const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.25.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.25.0"); + const contentType = ObjectSerializer.getPreferredMediaType([ + "application/json" + ]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = ObjectSerializer.stringify( + ObjectSerializer.serialize(fetchLogsRequest, "FetchLogsRequest", ""), + contentType + ); + requestContext.setBody(serializedBody); + let authMethod; + authMethod = _config.authMethods["bearerAuth"]; + if (authMethod == null ? void 0 : authMethod.applySecurityAuthentication) { + yield authMethod == null ? void 0 : authMethod.applySecurityAuthentication(requestContext); + } + const defaultAuth = ((_a = _options == null ? void 0 : _options.authMethods) == null ? void 0 : _a.default) || ((_c = (_b = this.configuration) == null ? void 0 : _b.authMethods) == null ? void 0 : _c.default); + if (defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication) { + yield defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication(requestContext); + } + return requestContext; + }); + } +}; +var LogApiResponseProcessor = class { + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to fetchLogs + * @throws ApiException if the response code was not in [200, 299] + */ + fetchLogs(response) { + return __async(this, null, function* () { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("200", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "Array", + "" + ); + return body; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Invalid request.", body, response.headers); + } + if (isCodeInRange("401", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unexpected error", body, response.headers); + } + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "Array", + "" + ); + return body; + } + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", yield response.getBodyAsAny(), response.headers); + }); + } +}; + +// apis/MetadataApi.ts +var MetadataApiRequestFactory = class extends BaseAPIRequestFactory { + /** + * Convert worksheets to models Version: 10.6.0.cl or later ## Prerequisites - **Privileges Required:** - `DATAMANAGEMENT` (Can manage data) or `ADMINISTRATION` (Can administer ThoughtSpot). - **Additional Privileges (if RBAC is enabled):** - `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` (Can manage data models). --- ## Usage Guidelines ### Parameters 1. **worksheet_ids** - **Description:** A comma-separated list of GUIDs (Globally Unique Identifiers) specifying the Worksheets to be converted. - **Usage:** - Used only when `convert_all` is set to `false`. - Leave empty or omit when `convert_all` is set to `true`. 2. **exclude_worksheet_ids** - **Description:** A comma-separated list of GUIDs specifying Worksheets to be excluded from conversion. - **Usage:** - Useful when `convert_all` is set to `true` and specific Worksheets should not be converted. 3. **convert_all** - **Description:** Sets the scope of conversion. - **Options:** - `true`: Converts all Worksheets in the system, except those specified in `exclude_worksheet_ids`. - `false`: Converts only the Worksheets listed in `worksheet_ids`. 4. **apply_changes** - **Description:** Specifies whether to apply changes directly to ThoughtSpot or to generate a preview before applying any changes.Used for validation of conversion. - **Options:** - `true`: Applies conversion changes directly to ThoughtSpot. - `false`: Generates only a preview of the changes and does not apply any changes to ThoughtSpot --- ## Best Practices 1. **Backup Before Conversion:** Always export metadata as a backup before initiating the conversion process 2. **Partial Conversion for Testing:** Test the conversion process by setting `convert_all` to `false` and specifying a small number of `worksheet_ids`. 3. **Verify Dependencies:** Check for dependent objects, such as Tables and Connections, to avoid invalid references. 4. **Review Changes:** Use `apply_changes: false` to preview the impact of the conversion before applying changes. --- ## Examples ### Convert Specific Worksheets ```json { \"worksheet_ids\": [\"guid1\", \"guid2\", \"guid3\"], \"exclude_worksheet_ids\": [], \"convert_all\": false, \"apply_changes\": true } ``` ### Convert All Accessible Worksheets ```json { \"worksheet_ids\": [], \"exclude_worksheet_ids\": [], \"convert_all\": true, \"apply_changes\": true } ``` ### Exclude Specific Worksheets While Converting All Accessible Worksheets ```json { \"worksheet_ids\": [], \"exclude_worksheet_ids\": [\"abc\"], \"convert_all\": true, \"apply_changes\": true } ``` + * @param convertWorksheetToModelRequest + */ + convertWorksheetToModel(convertWorksheetToModelRequest, _options) { + return __async(this, null, function* () { + var _a, _b, _c; + let _config = _options || this.configuration; + if (convertWorksheetToModelRequest === null || convertWorksheetToModelRequest === void 0) { + throw new RequiredError("MetadataApi", "convertWorksheetToModel", "convertWorksheetToModelRequest"); + } + const localVarPath = "/api/rest/2.0/metadata/worksheets/convert"; + const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.25.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.25.0"); + const contentType = ObjectSerializer.getPreferredMediaType([ + "application/json" + ]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = ObjectSerializer.stringify( + ObjectSerializer.serialize(convertWorksheetToModelRequest, "ConvertWorksheetToModelRequest", ""), + contentType + ); + requestContext.setBody(serializedBody); + let authMethod; + authMethod = _config.authMethods["bearerAuth"]; + if (authMethod == null ? void 0 : authMethod.applySecurityAuthentication) { + yield authMethod == null ? void 0 : authMethod.applySecurityAuthentication(requestContext); + } + const defaultAuth = ((_a = _options == null ? void 0 : _options.authMethods) == null ? void 0 : _a.default) || ((_c = (_b = this.configuration) == null ? void 0 : _b.authMethods) == null ? void 0 : _c.default); + if (defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication) { + yield defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication(requestContext); + } + return requestContext; + }); + } + /** + * Makes a copy of an Answer or Liveboard Version: 10.3.0.cl or later Creates a copy of a metadata object. Requires at least view access to the metadata object being copied. Upon successful execution, the API creates a copy of the metadata object specified in the API request and returns the ID of the new object. + * @param copyObjectRequest + */ + copyObject(copyObjectRequest, _options) { + return __async(this, null, function* () { + var _a, _b, _c; + let _config = _options || this.configuration; + if (copyObjectRequest === null || copyObjectRequest === void 0) { + throw new RequiredError("MetadataApi", "copyObject", "copyObjectRequest"); + } + const localVarPath = "/api/rest/2.0/metadata/copyobject"; + const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.25.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.25.0"); + const contentType = ObjectSerializer.getPreferredMediaType([ + "application/json" + ]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = ObjectSerializer.stringify( + ObjectSerializer.serialize(copyObjectRequest, "CopyObjectRequest", ""), + contentType + ); + requestContext.setBody(serializedBody); + let authMethod; + authMethod = _config.authMethods["bearerAuth"]; + if (authMethod == null ? void 0 : authMethod.applySecurityAuthentication) { + yield authMethod == null ? void 0 : authMethod.applySecurityAuthentication(requestContext); + } + const defaultAuth = ((_a = _options == null ? void 0 : _options.authMethods) == null ? void 0 : _a.default) || ((_c = (_b = this.configuration) == null ? void 0 : _b.authMethods) == null ? void 0 : _c.default); + if (defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication) { + yield defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication(requestContext); + } + return requestContext; + }); + } + /** + * Version: 9.0.0.cl or later Removes the specified metadata object from the ThoughtSpot system. Requires edit access to the metadata object. + * @param deleteMetadataRequest + */ + deleteMetadata(deleteMetadataRequest, _options) { + return __async(this, null, function* () { + var _a, _b, _c; + let _config = _options || this.configuration; + if (deleteMetadataRequest === null || deleteMetadataRequest === void 0) { + throw new RequiredError("MetadataApi", "deleteMetadata", "deleteMetadataRequest"); + } + const localVarPath = "/api/rest/2.0/metadata/delete"; + const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.25.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.25.0"); + const contentType = ObjectSerializer.getPreferredMediaType([ + "application/json" + ]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = ObjectSerializer.stringify( + ObjectSerializer.serialize(deleteMetadataRequest, "DeleteMetadataRequest", ""), + contentType + ); + requestContext.setBody(serializedBody); + let authMethod; + authMethod = _config.authMethods["bearerAuth"]; + if (authMethod == null ? void 0 : authMethod.applySecurityAuthentication) { + yield authMethod == null ? void 0 : authMethod.applySecurityAuthentication(requestContext); + } + const defaultAuth = ((_a = _options == null ? void 0 : _options.authMethods) == null ? void 0 : _a.default) || ((_c = (_b = this.configuration) == null ? void 0 : _b.authMethods) == null ? void 0 : _c.default); + if (defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication) { + yield defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication(requestContext); + } + return requestContext; + }); + } + /** + * Version: 9.0.0.cl or later Exports the [TML](https://docs.thoughtspot.com/cloud/latest/tml) representation of metadata objects in JSON or YAML format. Requires `DATADOWNLOADING` (**Can download Data**) and at least view access to the metadata object. #### Usage guidelines * You can export one or several objects by passing metadata object GUIDs in the `metadata` array. * When exporting TML content for a Liveboard or Answer object, you can set `export_associated` to `true` to retrieve TML content for underlying Worksheets, Tables, or Views, including the GUID of each object within the headers. When `export_associated` is set to `true`, consider retrieving one metadata object at a time. * Set `export_fqns` to `true` to add FQNs of the referenced objects in the TML content. For example, if you send an API request to retrieve TML for a Liveboard and its associated objects, the API returns the TML content with FQNs of the referenced Worksheet. Exporting TML with FQNs is useful if ThoughtSpot has multiple objects with the same name and you want to eliminate ambiguity when importing TML files into ThoughtSpot. It eliminates the need for adding FQNs of the referenced objects manually during the import operation. * To export only the TML of feedbacks associated with an object, set the GUID of the object as `identifier`, and set the `type` as `FEEDBACK` in the `metadata` array. * To export the TML of an object along with the feedbacks associated with it, set the GUID of the object as `identifier`, set the `type` as `LOGIAL_TABLE` in the `metadata` array, and set `export_with_associated_feedbacks` in `export_options` to true. For more information, see [TML Documentation](https://developers.thoughtspot.com/docs/tml#_export_a_tml). For more information on feedbacks, see [Feedback Documentation](https://docs.thoughtspot.com/cloud/latest/sage-feedback). + * @param exportMetadataTMLRequest + */ + exportMetadataTML(exportMetadataTMLRequest, _options) { + return __async(this, null, function* () { + var _a, _b, _c; + let _config = _options || this.configuration; + if (exportMetadataTMLRequest === null || exportMetadataTMLRequest === void 0) { + throw new RequiredError("MetadataApi", "exportMetadataTML", "exportMetadataTMLRequest"); + } + const localVarPath = "/api/rest/2.0/metadata/tml/export"; + const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.25.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.25.0"); + const contentType = ObjectSerializer.getPreferredMediaType([ + "application/json" + ]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = ObjectSerializer.stringify( + ObjectSerializer.serialize(exportMetadataTMLRequest, "ExportMetadataTMLRequest", ""), + contentType + ); + requestContext.setBody(serializedBody); + let authMethod; + authMethod = _config.authMethods["bearerAuth"]; + if (authMethod == null ? void 0 : authMethod.applySecurityAuthentication) { + yield authMethod == null ? void 0 : authMethod.applySecurityAuthentication(requestContext); + } + const defaultAuth = ((_a = _options == null ? void 0 : _options.authMethods) == null ? void 0 : _a.default) || ((_c = (_b = this.configuration) == null ? void 0 : _b.authMethods) == null ? void 0 : _c.default); + if (defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication) { + yield defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication(requestContext); + } + return requestContext; + }); + } + /** + * Version: 10.1.0.cl or later Exports the [TML](https://docs.thoughtspot.com/cloud/latest/tml) representation of metadata objects in JSON or YAML format. ### **Permissions Required** Requires `DATAMANAGEMENT` (**Can manage data**) and `USERMANAGEMENT` (**Can manage users**) privileges. #### **Usage Guidelines** This API is only applicable for `USER`, `GROUP`, and `ROLES` metadata types. - `batch_offset` Indicates the starting position within the complete dataset from which the API should begin returning objects. Useful for paginating results efficiently. - `batch_size` Specifies the number of objects or items to retrieve in a single request. Helps control response size for better performance. - `edoc_format` Defines the format of the TML content. The exported metadata can be in JSON or YAML format. - `export_dependent` Specifies whether to include dependent metadata objects in the export. Ensures related objects are also retrieved if needed. - `all_orgs_override` Indicates whether the export operation applies across all organizations. Useful for multi-tenant environments where cross-org exports are required. + * @param exportMetadataTMLBatchedRequest + */ + exportMetadataTMLBatched(exportMetadataTMLBatchedRequest, _options) { + return __async(this, null, function* () { + var _a, _b, _c; + let _config = _options || this.configuration; + if (exportMetadataTMLBatchedRequest === null || exportMetadataTMLBatchedRequest === void 0) { + throw new RequiredError("MetadataApi", "exportMetadataTMLBatched", "exportMetadataTMLBatchedRequest"); + } + const localVarPath = "/api/rest/2.0/metadata/tml/export/batch"; + const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.25.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.25.0"); + const contentType = ObjectSerializer.getPreferredMediaType([ + "application/json" + ]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = ObjectSerializer.stringify( + ObjectSerializer.serialize(exportMetadataTMLBatchedRequest, "ExportMetadataTMLBatchedRequest", ""), + contentType + ); + requestContext.setBody(serializedBody); + let authMethod; + authMethod = _config.authMethods["bearerAuth"]; + if (authMethod == null ? void 0 : authMethod.applySecurityAuthentication) { + yield authMethod == null ? void 0 : authMethod.applySecurityAuthentication(requestContext); + } + const defaultAuth = ((_a = _options == null ? void 0 : _options.authMethods) == null ? void 0 : _a.default) || ((_c = (_b = this.configuration) == null ? void 0 : _b.authMethods) == null ? void 0 : _c.default); + if (defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication) { + yield defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication(requestContext); + } + return requestContext; + }); + } + /** + * Version: 9.0.0.cl or later Fetches the underlying SQL query data for an Answer object. Requires at least view access to the Answer object. Upon successful execution, the API returns the SQL queries for the specified object as shown in this example: ``` { \"metadata_id\":\"8fbe44a8-46ad-4b16-8d39-184b2fada490\", \"metadata_name\":\"Total sales\", \"metadata_type\":\"ANSWER\", \"sql_queries\":[ { \"metadata_id\":\"8fbe44a8-46ad-4b16-8d39-184b2fada490\", \"metadata_name\":\"Total sales -test\", \"sql_query\":\"SELECT \\n \\\"ta_1\\\".\\\"REGION\\\" \\\"ca_1\\\", \\n \\\"ta_2\\\".\\\"PRODUCTNAME\\\" \\\"ca_2\\\", \\n \\\"ta_1\\\".\\\"STORENAME\\\" \\\"ca_3\\\", \\n CASE\\n WHEN sum(\\\"ta_3\\\".\\\"SALES\\\") IS NOT NULL THEN sum(\\\"ta_3\\\".\\\"SALES\\\")\\n ELSE 0\\n END \\\"ca_4\\\", \\n CASE\\n WHEN sum(\\\"ta_3\\\".\\\"QUANTITYPURCHASED\\\") IS NOT NULL THEN sum(\\\"ta_3\\\".\\\"QUANTITYPURCHASED\\\")\\n ELSE 0\\n END \\\"ca_5\\\"\\nFROM \\\"RETAILAPPAREL\\\".\\\"PUBLIC\\\".\\\"FACT_RETAPP_SALES\\\" \\\"ta_3\\\"\\n JOIN \\\"RETAILAPPAREL\\\".\\\"PUBLIC\\\".\\\"DIM_RETAPP_STORES\\\" \\\"ta_1\\\"\\n ON \\\"ta_3\\\".\\\"STOREID\\\" = \\\"ta_1\\\".\\\"STOREID\\\"\\n JOIN \\\"RETAILAPPAREL\\\".\\\"PUBLIC\\\".\\\"DIM_RETAPP_PRODUCTS\\\" \\\"ta_2\\\"\\n ON \\\"ta_3\\\".\\\"PRODUCTID\\\" = \\\"ta_2\\\".\\\"PRODUCTID\\\"\\nGROUP BY \\n \\\"ca_1\\\", \\n \\\"ca_2\\\", \\n \\\"ca_3\\\"\\n\" } ] } ``` + * @param fetchAnswerSqlQueryRequest + */ + fetchAnswerSqlQuery(fetchAnswerSqlQueryRequest, _options) { + return __async(this, null, function* () { + var _a, _b, _c; + let _config = _options || this.configuration; + if (fetchAnswerSqlQueryRequest === null || fetchAnswerSqlQueryRequest === void 0) { + throw new RequiredError("MetadataApi", "fetchAnswerSqlQuery", "fetchAnswerSqlQueryRequest"); + } + const localVarPath = "/api/rest/2.0/metadata/answer/sql"; + const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.25.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.25.0"); + const contentType = ObjectSerializer.getPreferredMediaType([ + "application/json" + ]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = ObjectSerializer.stringify( + ObjectSerializer.serialize(fetchAnswerSqlQueryRequest, "FetchAnswerSqlQueryRequest", ""), + contentType + ); + requestContext.setBody(serializedBody); + let authMethod; + authMethod = _config.authMethods["bearerAuth"]; + if (authMethod == null ? void 0 : authMethod.applySecurityAuthentication) { + yield authMethod == null ? void 0 : authMethod.applySecurityAuthentication(requestContext); + } + const defaultAuth = ((_a = _options == null ? void 0 : _options.authMethods) == null ? void 0 : _a.default) || ((_c = (_b = this.configuration) == null ? void 0 : _b.authMethods) == null ? void 0 : _c.default); + if (defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication) { + yield defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication(requestContext); + } + return requestContext; + }); + } + /** + * Version: 10.4.0.cl or later Gets information about the status of the TML async import task scheduled using the `/api/rest/2.0/metadata/tml/async/import` API call. To fetch the task details, specify the ID of the TML async import task. Requires access to the task ID. The API allows users who initiated the asynchronous TML import via `/api/rest/2.0/metadata/tml/async/import` to view the status of their tasks. Users with administration privilege can view the status of all import tasks initiated by the users in their Org. #### Usage guidelines See [TML API Documentation](https://developers.thoughtspot.com/docs/tml#_fetch_status_of_the_tml_import_task) for usage guidelines. + * @param fetchAsyncImportTaskStatusRequest + */ + fetchAsyncImportTaskStatus(fetchAsyncImportTaskStatusRequest, _options) { + return __async(this, null, function* () { + var _a, _b, _c; + let _config = _options || this.configuration; + if (fetchAsyncImportTaskStatusRequest === null || fetchAsyncImportTaskStatusRequest === void 0) { + throw new RequiredError("MetadataApi", "fetchAsyncImportTaskStatus", "fetchAsyncImportTaskStatusRequest"); + } + const localVarPath = "/api/rest/2.0/metadata/tml/async/status"; + const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.25.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.25.0"); + const contentType = ObjectSerializer.getPreferredMediaType([ + "application/json" + ]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = ObjectSerializer.stringify( + ObjectSerializer.serialize(fetchAsyncImportTaskStatusRequest, "FetchAsyncImportTaskStatusRequest", ""), + contentType + ); + requestContext.setBody(serializedBody); + let authMethod; + authMethod = _config.authMethods["bearerAuth"]; + if (authMethod == null ? void 0 : authMethod.applySecurityAuthentication) { + yield authMethod == null ? void 0 : authMethod.applySecurityAuthentication(requestContext); + } + const defaultAuth = ((_a = _options == null ? void 0 : _options.authMethods) == null ? void 0 : _a.default) || ((_c = (_b = this.configuration) == null ? void 0 : _b.authMethods) == null ? void 0 : _c.default); + if (defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication) { + yield defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication(requestContext); + } + return requestContext; + }); + } + /** + * Version: 9.0.0.cl or later Fetches the underlying SQL query data for a Liveboard object and its visualizations. Requires at least view access to the Liveboard object. To get SQL query data for a Liveboard, specify the GUID of the Liveboard. Optionally, you can add an array of visualization GUIDs to retrieve the SQL query data for visualizations in the Liveboard. Upon successful execution, the API returns the SQL queries for the specified object as shown in this example: ``` { \"metadata_id\": \"fa68ae91-7588-4136-bacd-d71fb12dda69\", \"metadata_name\": \"Total Sales\", \"metadata_type\": \"LIVEBOARD\", \"sql_queries\": [ { \"metadata_id\": \"b3b6d2b9-089a-490c-8e16-b144650b7843\", \"metadata_name\": \"Total quantity purchased, Total sales by region\", \"sql_query\": \"SELECT \\n \\\"ta_1\\\".\\\"REGION\\\" \\\"ca_1\\\", \\n CASE\\n WHEN sum(\\\"ta_2\\\".\\\"QUANTITYPURCHASED\\\") IS NOT NULL THEN sum(\\\"ta_2\\\".\\\"QUANTITYPURCHASED\\\")\\n ELSE 0\\n END \\\"ca_2\\\", \\n CASE\\n WHEN sum(\\\"ta_2\\\".\\\"SALES\\\") IS NOT NULL THEN sum(\\\"ta_2\\\".\\\"SALES\\\")\\n ELSE 0\\n END \\\"ca_3\\\"\\nFROM \\\"RETAILAPPAREL\\\".\\\"PUBLIC\\\".\\\"FACT_RETAPP_SALES\\\" \\\"ta_2\\\"\\n JOIN \\\"RETAILAPPAREL\\\".\\\"PUBLIC\\\".\\\"DIM_RETAPP_STORES\\\" \\\"ta_1\\\"\\n ON \\\"ta_2\\\".\\\"STOREID\\\" = \\\"ta_1\\\".\\\"STOREID\\\"\\nGROUP BY \\\"ca_1\\\"\" } ] } ``` + * @param fetchLiveboardSqlQueryRequest + */ + fetchLiveboardSqlQuery(fetchLiveboardSqlQueryRequest, _options) { + return __async(this, null, function* () { + var _a, _b, _c; + let _config = _options || this.configuration; + if (fetchLiveboardSqlQueryRequest === null || fetchLiveboardSqlQueryRequest === void 0) { + throw new RequiredError("MetadataApi", "fetchLiveboardSqlQuery", "fetchLiveboardSqlQueryRequest"); + } + const localVarPath = "/api/rest/2.0/metadata/liveboard/sql"; + const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.25.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.25.0"); + const contentType = ObjectSerializer.getPreferredMediaType([ + "application/json" + ]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = ObjectSerializer.stringify( + ObjectSerializer.serialize(fetchLiveboardSqlQueryRequest, "FetchLiveboardSqlQueryRequest", ""), + contentType + ); + requestContext.setBody(serializedBody); + let authMethod; + authMethod = _config.authMethods["bearerAuth"]; + if (authMethod == null ? void 0 : authMethod.applySecurityAuthentication) { + yield authMethod == null ? void 0 : authMethod.applySecurityAuthentication(requestContext); + } + const defaultAuth = ((_a = _options == null ? void 0 : _options.authMethods) == null ? void 0 : _a.default) || ((_c = (_b = this.configuration) == null ? void 0 : _b.authMethods) == null ? void 0 : _c.default); + if (defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication) { + yield defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication(requestContext); + } + return requestContext; + }); + } + /** + * Version: 9.0.0.cl or later Imports [TML](https://docs.thoughtspot.com/cloud/latest/tml) files into ThoughtSpot. Requires `DATAMANAGEMENT` (**Can manage data**) or `ADMINISTRATION` (**Can administer ThoughtsSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the following Data control privileges may be required: - `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) - `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` (**Can manage data models**) #### Usage guidelines * Import all related objects in a single TML Import API call. For example, Tables that use the same Connection object and Worksheets connected to these Tables. * Include the `fqn` property to distinguish objects that have the same name. For example, if you have multiple Connections or Worksheets with the same name on ThoughtSpot and the Connection or Worksheet referenced in your TML file does not have a unique name to distinguish, it may result in invalid object references. Adding `fqn` helps ThoughtSpot differentiate a Table from another with the same name. We recommend [exporting TML with FQNs](#/http/api-endpoints/metadata/export-metadata-tml) and using these during the import operation. * You can upload multiple TML files at a time. If you import a Worksheet along with Liveboards, Answers, and other dependent objects in a single API call, the imported objects will be immediately available for use. When you import only a Worksheet object, it may take some time for the Worksheet to become available in the ThoughtSpot system. Please wait for a few minutes, and then proceed to create an Answer and Liveboard from the newly imported Worksheet. For more information, see [TML Documentation](https://developers.thoughtspot.com/docs/tml#_import_a_tml). + * @param importMetadataTMLRequest + */ + importMetadataTML(importMetadataTMLRequest, _options) { + return __async(this, null, function* () { + var _a, _b, _c; + let _config = _options || this.configuration; + if (importMetadataTMLRequest === null || importMetadataTMLRequest === void 0) { + throw new RequiredError("MetadataApi", "importMetadataTML", "importMetadataTMLRequest"); + } + const localVarPath = "/api/rest/2.0/metadata/tml/import"; + const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.25.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.25.0"); + const contentType = ObjectSerializer.getPreferredMediaType([ + "application/json" + ]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = ObjectSerializer.stringify( + ObjectSerializer.serialize(importMetadataTMLRequest, "ImportMetadataTMLRequest", ""), + contentType + ); + requestContext.setBody(serializedBody); + let authMethod; + authMethod = _config.authMethods["bearerAuth"]; + if (authMethod == null ? void 0 : authMethod.applySecurityAuthentication) { + yield authMethod == null ? void 0 : authMethod.applySecurityAuthentication(requestContext); + } + const defaultAuth = ((_a = _options == null ? void 0 : _options.authMethods) == null ? void 0 : _a.default) || ((_c = (_b = this.configuration) == null ? void 0 : _b.authMethods) == null ? void 0 : _c.default); + if (defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication) { + yield defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication(requestContext); + } + return requestContext; + }); + } + /** + * Version: 10.4.0.cl or later Schedules a task to import [TML](https://docs.thoughtspot.com/cloud/latest/tml) files into ThoughtSpot. You can use this API endpoint to process TML objects asynchronously when importing TMLs of large and complex metadata objects into ThoughtSpot. Unlike the synchronous import TML operation, the API processes TML data in the background and returns a task ID, which can be used to check the status of the import task via `/api/rest/2.0/metadata/tml/async/status` API endpoint. Requires `DATAMANAGEMENT` (**Can manage data**) or `ADMINISTRATION` (**Can administer ThoughtsSpot**) privilege, and edit access to the TML objects. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the following Data control privileges may be required: - `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) - `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` (**Can manage data models**) #### Usage guidelines See [Async TML API Documentation](https://developers.thoughtspot.com/docs/tml#_import_tml_objects_asynchronously) for usage guidelines. + * @param importMetadataTMLAsyncRequest + */ + importMetadataTMLAsync(importMetadataTMLAsyncRequest, _options) { + return __async(this, null, function* () { + var _a, _b, _c; + let _config = _options || this.configuration; + if (importMetadataTMLAsyncRequest === null || importMetadataTMLAsyncRequest === void 0) { + throw new RequiredError("MetadataApi", "importMetadataTMLAsync", "importMetadataTMLAsyncRequest"); + } + const localVarPath = "/api/rest/2.0/metadata/tml/async/import"; + const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.25.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.25.0"); + const contentType = ObjectSerializer.getPreferredMediaType([ + "application/json" + ]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = ObjectSerializer.stringify( + ObjectSerializer.serialize(importMetadataTMLAsyncRequest, "ImportMetadataTMLAsyncRequest", ""), + contentType + ); + requestContext.setBody(serializedBody); + let authMethod; + authMethod = _config.authMethods["bearerAuth"]; + if (authMethod == null ? void 0 : authMethod.applySecurityAuthentication) { + yield authMethod == null ? void 0 : authMethod.applySecurityAuthentication(requestContext); + } + const defaultAuth = ((_a = _options == null ? void 0 : _options.authMethods) == null ? void 0 : _a.default) || ((_c = (_b = this.configuration) == null ? void 0 : _b.authMethods) == null ? void 0 : _c.default); + if (defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication) { + yield defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication(requestContext); + } + return requestContext; + }); + } + /** + * Parameterize fields in metadata objects. Version: 10.9.0.cl or later **Note:** This API endpoint is deprecated and will be removed from ThoughtSpot in a future release. Use [POST /api/rest/2.0/metadata/parameterize-fields](/api/rest/2.0/metadata/parameterize-fields) instead. Allows parameterizing fields in metadata objects in ThoughtSpot. Requires appropriate permissions to modify the metadata object. The API endpoint allows parameterizing the following types of metadata objects: * Logical Tables * Connections * Connection Configs For a Logical Table the field type must be `ATTRIBUTE` and field name can be one of: * databaseName * schemaName * tableName For a Connection or Connection Config, the field type is always `CONNECTION_PROPERTY`. In this case, field_name specifies the exact property of the Connection or Connection Config that needs to be parameterized. For Connection Config, the only supported field name is: * impersonate_user + * @param parameterizeMetadataRequest + */ + parameterizeMetadata(parameterizeMetadataRequest, _options) { + return __async(this, null, function* () { + var _a, _b, _c; + let _config = _options || this.configuration; + if (parameterizeMetadataRequest === null || parameterizeMetadataRequest === void 0) { + throw new RequiredError("MetadataApi", "parameterizeMetadata", "parameterizeMetadataRequest"); + } + const localVarPath = "/api/rest/2.0/metadata/parameterize"; + const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.25.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.25.0"); + const contentType = ObjectSerializer.getPreferredMediaType([ + "application/json" + ]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = ObjectSerializer.stringify( + ObjectSerializer.serialize(parameterizeMetadataRequest, "ParameterizeMetadataRequest", ""), + contentType + ); + requestContext.setBody(serializedBody); + let authMethod; + authMethod = _config.authMethods["bearerAuth"]; + if (authMethod == null ? void 0 : authMethod.applySecurityAuthentication) { + yield authMethod == null ? void 0 : authMethod.applySecurityAuthentication(requestContext); + } + const defaultAuth = ((_a = _options == null ? void 0 : _options.authMethods) == null ? void 0 : _a.default) || ((_c = (_b = this.configuration) == null ? void 0 : _b.authMethods) == null ? void 0 : _c.default); + if (defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication) { + yield defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication(requestContext); + } + return requestContext; + }); + } + /** + * Parameterize multiple fields of metadata objects. For example [schemaName, databaseName] for LOGICAL_TABLE. Version: 26.5.0.cl or later Allows parameterizing multiple fields of metadata objects in ThoughtSpot. For example, you can parameterize [schemaName, databaseName] for LOGICAL_TABLE. Requires appropriate permissions to modify the metadata object. The API endpoint allows parameterizing the following types of metadata objects: * Logical Tables * Connections * Connection Configs For a Logical Table, the field type must be `ATTRIBUTE` and field names can include: * databaseName * schemaName * tableName For a Connection or Connection Config, the field type is always `CONNECTION_PROPERTY`. In this case, field_names specifies the exact properties of the Connection or Connection Config that need to be parameterized. For Connection Config, supported field names include: * impersonate_user You can parameterize multiple fields at once by providing an array of field names. + * @param parameterizeMetadataFieldsRequest + */ + parameterizeMetadataFields(parameterizeMetadataFieldsRequest, _options) { + return __async(this, null, function* () { + var _a, _b, _c; + let _config = _options || this.configuration; + if (parameterizeMetadataFieldsRequest === null || parameterizeMetadataFieldsRequest === void 0) { + throw new RequiredError("MetadataApi", "parameterizeMetadataFields", "parameterizeMetadataFieldsRequest"); + } + const localVarPath = "/api/rest/2.0/metadata/parameterize-fields"; + const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.25.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.25.0"); + const contentType = ObjectSerializer.getPreferredMediaType([ + "application/json" + ]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = ObjectSerializer.stringify( + ObjectSerializer.serialize(parameterizeMetadataFieldsRequest, "ParameterizeMetadataFieldsRequest", ""), + contentType + ); + requestContext.setBody(serializedBody); + let authMethod; + authMethod = _config.authMethods["bearerAuth"]; + if (authMethod == null ? void 0 : authMethod.applySecurityAuthentication) { + yield authMethod == null ? void 0 : authMethod.applySecurityAuthentication(requestContext); + } + const defaultAuth = ((_a = _options == null ? void 0 : _options.authMethods) == null ? void 0 : _a.default) || ((_c = (_b = this.configuration) == null ? void 0 : _b.authMethods) == null ? void 0 : _c.default); + if (defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication) { + yield defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication(requestContext); + } + return requestContext; + }); + } + /** + * Version: 9.0.0.cl or later Gets a list of metadata objects available on the ThoughtSpot system. This API endpoint is available to all users who have view access to the object. Users with `ADMINISTRATION` (**Can administer ThoughtSpot**) privileges can view data for all metadata objects, including users and groups. #### Usage guidelines - To get all metadata objects, send the API request without any attributes. - To get metadata objects of a specific type, set the `type` attribute. For example, to fetch a Worksheet, set the type as `LOGICAL_TABLE`. - To filter metadata objects within type `LOGICAL_TABLE`, set the `subtypes` attribute. For example, to fetch a Worksheet, set the type as `LOGICAL_TABLE` & subtypes as `[WORKSHEET]`. - To get a specific metadata object, specify the GUID. - To customize your search and filter the API response, you can use several parameters. You can search for objects created or modified by specific users, by tags applied to the objects, or by using the include parameters like `include_auto_created_objects`, `include_dependent_objects`, `include_headers`, `include_incomplete_objects`, and so on. You can also define sorting options to sort the data retrieved in the API response. - To get discoverable objects when linientmodel is enabled you can use `include_discoverable_objects` as true else false. Default value is true. - For liveboard metadata type, to get the newer format, set the `liveboard_response_format` as V2. Default value is V1. - To retrieve only objects that are published, set the `include_only_published_objects` as true. Default value is false. **NOTE**: The following parameters support pagination of metadata records: - `tag_identifiers` - `type` - `subtypes` - `created_by_user_identifiers` - `modified_by_user_identifiers` - `owned_by_user_identifiers` - `exclude_objects` - `include_auto_created_objects` - `favorite_object_options` - `include_only_published_objects` If you are using other parameters to search metadata, set `record_size` to `-1` and `record_offset` to `0`. + * @param searchMetadataRequest + */ + searchMetadata(searchMetadataRequest, _options) { + return __async(this, null, function* () { + var _a, _b, _c; + let _config = _options || this.configuration; + if (searchMetadataRequest === null || searchMetadataRequest === void 0) { + throw new RequiredError("MetadataApi", "searchMetadata", "searchMetadataRequest"); + } + const localVarPath = "/api/rest/2.0/metadata/search"; + const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.25.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.25.0"); + const contentType = ObjectSerializer.getPreferredMediaType([ + "application/json" + ]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = ObjectSerializer.stringify( + ObjectSerializer.serialize(searchMetadataRequest, "SearchMetadataRequest", ""), + contentType + ); + requestContext.setBody(serializedBody); + let authMethod; + authMethod = _config.authMethods["bearerAuth"]; + if (authMethod == null ? void 0 : authMethod.applySecurityAuthentication) { + yield authMethod == null ? void 0 : authMethod.applySecurityAuthentication(requestContext); + } + const defaultAuth = ((_a = _options == null ? void 0 : _options.authMethods) == null ? void 0 : _a.default) || ((_c = (_b = this.configuration) == null ? void 0 : _b.authMethods) == null ? void 0 : _c.default); + if (defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication) { + yield defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication(requestContext); + } + return requestContext; + }); + } + /** + * Remove parameterization from fields in metadata objects. Version: 26.5.0.cl or later Allows removing parameterization from fields in metadata objects in ThoughtSpot. Requires appropriate permissions to modify the metadata object. The API endpoint allows unparameterizing the following types of metadata objects: * Logical Tables * Connections * Connection Configs For a Logical Table the field type must be `ATTRIBUTE` and field name can be one of: * databaseName * schemaName * tableName For a Connection or Connection Config, the field type is always `CONNECTION_PROPERTY`. In this case, field_name specifies the exact property of the Connection or Connection Config that needs to be unparameterized. For Connection Config, the only supported field name is: * impersonate_user + * @param unparameterizeMetadataRequest + */ + unparameterizeMetadata(unparameterizeMetadataRequest, _options) { + return __async(this, null, function* () { + var _a, _b, _c; + let _config = _options || this.configuration; + if (unparameterizeMetadataRequest === null || unparameterizeMetadataRequest === void 0) { + throw new RequiredError("MetadataApi", "unparameterizeMetadata", "unparameterizeMetadataRequest"); + } + const localVarPath = "/api/rest/2.0/metadata/unparameterize"; + const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.25.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.25.0"); + const contentType = ObjectSerializer.getPreferredMediaType([ + "application/json" + ]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = ObjectSerializer.stringify( + ObjectSerializer.serialize(unparameterizeMetadataRequest, "UnparameterizeMetadataRequest", ""), + contentType + ); + requestContext.setBody(serializedBody); + let authMethod; + authMethod = _config.authMethods["bearerAuth"]; + if (authMethod == null ? void 0 : authMethod.applySecurityAuthentication) { + yield authMethod == null ? void 0 : authMethod.applySecurityAuthentication(requestContext); + } + const defaultAuth = ((_a = _options == null ? void 0 : _options.authMethods) == null ? void 0 : _a.default) || ((_c = (_b = this.configuration) == null ? void 0 : _b.authMethods) == null ? void 0 : _c.default); + if (defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication) { + yield defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication(requestContext); + } + return requestContext; + }); + } + /** + * Update header attributes for a given list of header objects. Version: 10.6.0.cl or later ## Prerequisites - **Privileges Required:** - `DATAMANAGEMENT` (Can manage data) or `ADMINISTRATION` (Can administer ThoughtSpot). - **Additional Privileges (if RBAC is enabled):** - `ORG_ADMINISTRATION` (Can manage orgs). --- ## Usage Guidelines ### Parameters 1. **headers_update** - **Description:** List of header objects with their attributes to be updated. Each object contains a list of attributes to be updated in the header. - **Usage:** - You must provide either `identifier` or `obj_identifier`, but not both. Both fields cannot be empty. - When `org_identifier` is set to `-1`, only the `identifier` value is accepted; `obj_identifier` is not allowed. 2. **org_identifier** - **Description:** GUID (Globally Unique Identifier) or name of the organization. - **Usage:** - Leaving this field empty assumes that the changes should be applied to the current organization - Provide `org_guid` or `org_name` to uniquely identify the organization where changes need to be applied. . - Provide `-1` if changes have to be applied across all the org. --- ## Note Currently, this API is enabled only for updating the `obj_identifier` attribute. Only `text` will be allowed in attribute\'s value. ## Best Practices 1. **Backup Before Conversion:** Always export metadata as a backup before initiating the update process --- ## Examples ### Only `identifier` is given ```json { \"headers_update\": [ { \"identifier\": \"guid_1\", \"obj_identifier\": \"\", \"type\": \"LOGICAL_COLUMN\", \"attributes\": [ { \"name\": \"obj_id\", \"value\": \"custom_object_id\" } ] } ], \"org_identifier\": \"orgGuid\" } ``` ### Only `obj_identifier` is given ```json { \"headers_update\": [ { \"obj_identifier\": \"custom_object_id\", \"type\": \"ANSWER\", \"attributes\": [ { \"name\": \"obj_id\", \"value\": \"custom_object_id\" } ] } ], \"org_identifier\": \"orgName\" } ``` ### Executing update for all org `-1` ```json { \"headers_update\": [ { \"identifier\": \"guid_1\", \"type\": \"ANSWER\", \"attributes\": [ { \"name\": \"obj_id\", \"value\": \"custom_object_id\" } ] } ], \"org_identifier\": -1 } ``` ### Optional `type` is not provided ```json { \"headers_update\": [ { \"identifier\": \"guid_1\", \"attributes\": [ { \"name\": \"obj_id\", \"value\": \"custom_object_id\" } ] } ], \"org_identifier\": -1 } ``` + * @param updateMetadataHeaderRequest + */ + updateMetadataHeader(updateMetadataHeaderRequest, _options) { + return __async(this, null, function* () { + var _a, _b, _c; + let _config = _options || this.configuration; + if (updateMetadataHeaderRequest === null || updateMetadataHeaderRequest === void 0) { + throw new RequiredError("MetadataApi", "updateMetadataHeader", "updateMetadataHeaderRequest"); + } + const localVarPath = "/api/rest/2.0/metadata/headers/update"; + const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.25.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.25.0"); + const contentType = ObjectSerializer.getPreferredMediaType([ + "application/json" + ]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = ObjectSerializer.stringify( + ObjectSerializer.serialize(updateMetadataHeaderRequest, "UpdateMetadataHeaderRequest", ""), + contentType + ); + requestContext.setBody(serializedBody); + let authMethod; + authMethod = _config.authMethods["bearerAuth"]; + if (authMethod == null ? void 0 : authMethod.applySecurityAuthentication) { + yield authMethod == null ? void 0 : authMethod.applySecurityAuthentication(requestContext); + } + const defaultAuth = ((_a = _options == null ? void 0 : _options.authMethods) == null ? void 0 : _a.default) || ((_c = (_b = this.configuration) == null ? void 0 : _b.authMethods) == null ? void 0 : _c.default); + if (defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication) { + yield defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication(requestContext); + } + return requestContext; + }); + } + /** + * Update object IDs for given metadata objects. Version: 10.8.0.cl or later ## Prerequisites - **Privileges Required:** - `DATAMANAGEMENT` (Can manage data) or `ADMINISTRATION` (Can administer ThoughtSpot). - **Additional Privileges (if RBAC is enabled):** - `ORG_ADMINISTRATION` (Can manage orgs). --- ## Usage Guidelines ### Parameters 1. **metadata** - **Description:** List of metadata objects to update their object IDs. - **Usage:** - Use either `current_obj_id` alone OR use `metadata_identifier` with `type` (when needed). - When using `metadata_identifier`, the `type` field is required if using a name instead of a GUID. - The `new_obj_id` field is always required. --- ## Note This API is specifically designed for updating object IDs of metadata objects. It internally uses the header update mechanism to perform the changes. ## Best Practices 1. **Backup Before Update:** Always export metadata as a backup before initiating the update process. 2. **Validation:** - When using `current_obj_id`, ensure it matches the existing object ID exactly. - When using `metadata_identifier` with a name, ensure the `type` is specified correctly. - Verify that the `new_obj_id` follows your naming conventions and is unique within your system. --- ## Examples ### Using current_obj_id ```json { \"metadata\": [ { \"current_obj_id\": \"existing_object_id\", \"new_obj_id\": \"new_object_id\" } ] } ``` ### Using metadata_identifier with GUID ```json { \"metadata\": [ { \"metadata_identifier\": \"01234567-89ab-cdef-0123-456789abcdef\", \"new_obj_id\": \"new_object_id\" } ] } ``` ### Using metadata_identifier with name and type ```json { \"metadata\": [ { \"metadata_identifier\": \"My Answer\", \"type\": \"ANSWER\", \"new_obj_id\": \"new_object_id\" } ] } ``` ### Multiple objects update ```json { \"metadata\": [ { \"current_obj_id\": \"existing_object_id_1\", \"new_obj_id\": \"new_object_id_1\" }, { \"metadata_identifier\": \"My Worksheet\", \"type\": \"LOGICAL_TABLE\", \"new_obj_id\": \"new_object_id_2\" } ] } ``` + * @param updateMetadataObjIdRequest + */ + updateMetadataObjId(updateMetadataObjIdRequest, _options) { + return __async(this, null, function* () { + var _a, _b, _c; + let _config = _options || this.configuration; + if (updateMetadataObjIdRequest === null || updateMetadataObjIdRequest === void 0) { + throw new RequiredError("MetadataApi", "updateMetadataObjId", "updateMetadataObjIdRequest"); + } + const localVarPath = "/api/rest/2.0/metadata/update-obj-id"; + const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.25.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.25.0"); + const contentType = ObjectSerializer.getPreferredMediaType([ + "application/json" + ]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = ObjectSerializer.stringify( + ObjectSerializer.serialize(updateMetadataObjIdRequest, "UpdateMetadataObjIdRequest", ""), + contentType + ); + requestContext.setBody(serializedBody); + let authMethod; + authMethod = _config.authMethods["bearerAuth"]; + if (authMethod == null ? void 0 : authMethod.applySecurityAuthentication) { + yield authMethod == null ? void 0 : authMethod.applySecurityAuthentication(requestContext); + } + const defaultAuth = ((_a = _options == null ? void 0 : _options.authMethods) == null ? void 0 : _a.default) || ((_c = (_b = this.configuration) == null ? void 0 : _b.authMethods) == null ? void 0 : _c.default); + if (defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication) { + yield defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication(requestContext); + } + return requestContext; + }); + } +}; +var MetadataApiResponseProcessor = class { + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to convertWorksheetToModel + * @throws ApiException if the response code was not in [200, 299] + */ + convertWorksheetToModel(response) { + return __async(this, null, function* () { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("200", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ResponseWorksheetToModelConversion", + "" + ); + return body; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Invalid request.", body, response.headers); + } + if (isCodeInRange("401", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unexpected error", body, response.headers); + } + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ResponseWorksheetToModelConversion", + "" + ); + return body; + } + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", yield response.getBodyAsAny(), response.headers); + }); + } + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to copyObject + * @throws ApiException if the response code was not in [200, 299] + */ + copyObject(response) { + return __async(this, null, function* () { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("200", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ResponseCopyObject", + "" + ); + return body; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Invalid request.", body, response.headers); + } + if (isCodeInRange("401", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } + if (isCodeInRange("404", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Object not found", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unexpected error", body, response.headers); + } + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ResponseCopyObject", + "" + ); + return body; + } + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", yield response.getBodyAsAny(), response.headers); + }); + } + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to deleteMetadata + * @throws ApiException if the response code was not in [200, 299] + */ + deleteMetadata(response) { + return __async(this, null, function* () { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("204", response.httpStatusCode)) { + return; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Invalid request.", body, response.headers); + } + if (isCodeInRange("401", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unexpected error", body, response.headers); + } + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "void", + "" + ); + return body; + } + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", yield response.getBodyAsAny(), response.headers); + }); + } + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to exportMetadataTML + * @throws ApiException if the response code was not in [200, 299] + */ + exportMetadataTML(response) { + return __async(this, null, function* () { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("200", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "Array", + "" + ); + return body; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Invalid request.", body, response.headers); + } + if (isCodeInRange("401", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unexpected error", body, response.headers); + } + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "Array", + "" + ); + return body; + } + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", yield response.getBodyAsAny(), response.headers); + }); + } + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to exportMetadataTMLBatched + * @throws ApiException if the response code was not in [200, 299] + */ + exportMetadataTMLBatched(response) { + return __async(this, null, function* () { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("200", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "any", + "" + ); + return body; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Invalid request.", body, response.headers); + } + if (isCodeInRange("401", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unexpected error", body, response.headers); + } + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "any", + "" + ); + return body; + } + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", yield response.getBodyAsAny(), response.headers); + }); + } + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to fetchAnswerSqlQuery + * @throws ApiException if the response code was not in [200, 299] + */ + fetchAnswerSqlQuery(response) { + return __async(this, null, function* () { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("200", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "SqlQueryResponse", + "" + ); + return body; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Invalid request.", body, response.headers); + } + if (isCodeInRange("401", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unexpected error", body, response.headers); + } + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "SqlQueryResponse", + "" + ); + return body; + } + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", yield response.getBodyAsAny(), response.headers); + }); + } + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to fetchAsyncImportTaskStatus + * @throws ApiException if the response code was not in [200, 299] + */ + fetchAsyncImportTaskStatus(response) { + return __async(this, null, function* () { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("200", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "GetAsyncImportStatusResponse", + "" + ); + return body; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Invalid request.", body, response.headers); + } + if (isCodeInRange("401", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unexpected error", body, response.headers); + } + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "GetAsyncImportStatusResponse", + "" + ); + return body; + } + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", yield response.getBodyAsAny(), response.headers); + }); + } + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to fetchLiveboardSqlQuery + * @throws ApiException if the response code was not in [200, 299] + */ + fetchLiveboardSqlQuery(response) { + return __async(this, null, function* () { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("200", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "SqlQueryResponse", + "" + ); + return body; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Invalid request.", body, response.headers); + } + if (isCodeInRange("401", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unexpected error", body, response.headers); + } + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "SqlQueryResponse", + "" + ); + return body; + } + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", yield response.getBodyAsAny(), response.headers); + }); + } + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to importMetadataTML + * @throws ApiException if the response code was not in [200, 299] + */ + importMetadataTML(response) { + return __async(this, null, function* () { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("200", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "Array", + "" + ); + return body; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Invalid request.", body, response.headers); + } + if (isCodeInRange("401", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unexpected error", body, response.headers); + } + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "Array", + "" + ); + return body; + } + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", yield response.getBodyAsAny(), response.headers); + }); + } + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to importMetadataTMLAsync + * @throws ApiException if the response code was not in [200, 299] + */ + importMetadataTMLAsync(response) { + return __async(this, null, function* () { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("200", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ImportEPackAsyncTaskStatus", + "" + ); + return body; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Invalid request.", body, response.headers); + } + if (isCodeInRange("401", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unexpected error", body, response.headers); + } + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ImportEPackAsyncTaskStatus", + "" + ); + return body; + } + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", yield response.getBodyAsAny(), response.headers); + }); + } + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to parameterizeMetadata + * @throws ApiException if the response code was not in [200, 299] + */ + parameterizeMetadata(response) { + return __async(this, null, function* () { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("204", response.httpStatusCode)) { + return; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Invalid request.", body, response.headers); + } + if (isCodeInRange("401", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unexpected error", body, response.headers); + } + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "void", + "" + ); + return body; + } + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", yield response.getBodyAsAny(), response.headers); + }); + } + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to parameterizeMetadataFields + * @throws ApiException if the response code was not in [200, 299] + */ + parameterizeMetadataFields(response) { + return __async(this, null, function* () { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("204", response.httpStatusCode)) { + return; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Invalid request.", body, response.headers); + } + if (isCodeInRange("401", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unexpected error", body, response.headers); + } + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "void", + "" + ); + return body; + } + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", yield response.getBodyAsAny(), response.headers); + }); + } + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to searchMetadata + * @throws ApiException if the response code was not in [200, 299] + */ + searchMetadata(response) { + return __async(this, null, function* () { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("200", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "Array", + "" + ); + return body; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Invalid request.", body, response.headers); + } + if (isCodeInRange("401", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unexpected error", body, response.headers); + } + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "Array", + "" + ); + return body; + } + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", yield response.getBodyAsAny(), response.headers); + }); + } + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to unparameterizeMetadata + * @throws ApiException if the response code was not in [200, 299] + */ + unparameterizeMetadata(response) { + return __async(this, null, function* () { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("204", response.httpStatusCode)) { + return; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Invalid request.", body, response.headers); + } + if (isCodeInRange("401", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unexpected error", body, response.headers); + } + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "void", + "" + ); + return body; + } + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", yield response.getBodyAsAny(), response.headers); + }); + } + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to updateMetadataHeader + * @throws ApiException if the response code was not in [200, 299] + */ + updateMetadataHeader(response) { + return __async(this, null, function* () { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("204", response.httpStatusCode)) { + return; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Invalid request.", body, response.headers); + } + if (isCodeInRange("401", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unexpected error", body, response.headers); + } + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "void", + "" + ); + return body; + } + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", yield response.getBodyAsAny(), response.headers); + }); + } + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to updateMetadataObjId + * @throws ApiException if the response code was not in [200, 299] + */ + updateMetadataObjId(response) { + return __async(this, null, function* () { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("204", response.httpStatusCode)) { + return; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Invalid request.", body, response.headers); + } + if (isCodeInRange("401", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unexpected error", body, response.headers); + } + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "void", + "" + ); + return body; + } + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", yield response.getBodyAsAny(), response.headers); + }); + } +}; + +// apis/OrgsApi.ts +var OrgsApiRequestFactory = class extends BaseAPIRequestFactory { + /** + * Version: 9.0.0.cl or later Creates an Org object. To use this API, the [Orgs](https://docs.thoughtspot.com/cloud/latest/orgs-overview) feature must be enabled in your cluster. Requires cluster administration (**Can administer Org**) privileges. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `ORG_ADMINISTRATION` (**Can manage Orgs**) privilege is required. + * @param createOrgRequest + */ + createOrg(createOrgRequest, _options) { + return __async(this, null, function* () { + var _a, _b, _c; + let _config = _options || this.configuration; + if (createOrgRequest === null || createOrgRequest === void 0) { + throw new RequiredError("OrgsApi", "createOrg", "createOrgRequest"); + } + const localVarPath = "/api/rest/2.0/orgs/create"; + const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.25.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.25.0"); + const contentType = ObjectSerializer.getPreferredMediaType([ + "application/json" + ]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = ObjectSerializer.stringify( + ObjectSerializer.serialize(createOrgRequest, "CreateOrgRequest", ""), + contentType + ); + requestContext.setBody(serializedBody); + let authMethod; + authMethod = _config.authMethods["bearerAuth"]; + if (authMethod == null ? void 0 : authMethod.applySecurityAuthentication) { + yield authMethod == null ? void 0 : authMethod.applySecurityAuthentication(requestContext); + } + const defaultAuth = ((_a = _options == null ? void 0 : _options.authMethods) == null ? void 0 : _a.default) || ((_c = (_b = this.configuration) == null ? void 0 : _b.authMethods) == null ? void 0 : _c.default); + if (defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication) { + yield defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication(requestContext); + } + return requestContext; + }); + } + /** + * Version: 9.0.0.cl or later Deletes an Org object from the ThoughtSpot system. Requires cluster administration (**Can administer Org**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `ORG_ADMINISTRATION` (**Can manage Orgs**) privilege is required. When you delete an Org, all its users and objects created in that Org context are removed. However, if the users in the deleted Org also exists in other Orgs, they are removed only from the deleted Org. + * @param orgIdentifier ID or name of the Org + */ + deleteOrg(orgIdentifier, _options) { + return __async(this, null, function* () { + var _a, _b, _c; + let _config = _options || this.configuration; + if (orgIdentifier === null || orgIdentifier === void 0) { + throw new RequiredError("OrgsApi", "deleteOrg", "orgIdentifier"); + } + const localVarPath = "/api/rest/2.0/orgs/{org_identifier}/delete".replace("{org_identifier}", encodeURIComponent(String(orgIdentifier))); + const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.25.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.25.0"); + let authMethod; + authMethod = _config.authMethods["bearerAuth"]; + if (authMethod == null ? void 0 : authMethod.applySecurityAuthentication) { + yield authMethod == null ? void 0 : authMethod.applySecurityAuthentication(requestContext); + } + const defaultAuth = ((_a = _options == null ? void 0 : _options.authMethods) == null ? void 0 : _a.default) || ((_c = (_b = this.configuration) == null ? void 0 : _b.authMethods) == null ? void 0 : _c.default); + if (defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication) { + yield defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication(requestContext); + } + return requestContext; + }); + } + /** + * Version: 9.0.0.cl or later Gets a list of Orgs configured on the ThoughtSpot system. To get details of a specific Org, specify the Org ID or name. You can also pass parameters such as status, visibility, and user identifiers to get a specific list of Orgs. Requires cluster administration (**Can administer Org**) privileges. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `ORG_ADMINISTRATION` (**Can manage Orgs**) privilege is required. + * @param searchOrgsRequest + */ + searchOrgs(searchOrgsRequest, _options) { + return __async(this, null, function* () { + var _a, _b, _c; + let _config = _options || this.configuration; + if (searchOrgsRequest === null || searchOrgsRequest === void 0) { + throw new RequiredError("OrgsApi", "searchOrgs", "searchOrgsRequest"); + } + const localVarPath = "/api/rest/2.0/orgs/search"; + const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.25.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.25.0"); + const contentType = ObjectSerializer.getPreferredMediaType([ + "application/json" + ]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = ObjectSerializer.stringify( + ObjectSerializer.serialize(searchOrgsRequest, "SearchOrgsRequest", ""), + contentType + ); + requestContext.setBody(serializedBody); + let authMethod; + authMethod = _config.authMethods["bearerAuth"]; + if (authMethod == null ? void 0 : authMethod.applySecurityAuthentication) { + yield authMethod == null ? void 0 : authMethod.applySecurityAuthentication(requestContext); + } + const defaultAuth = ((_a = _options == null ? void 0 : _options.authMethods) == null ? void 0 : _a.default) || ((_c = (_b = this.configuration) == null ? void 0 : _b.authMethods) == null ? void 0 : _c.default); + if (defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication) { + yield defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication(requestContext); + } + return requestContext; + }); + } + /** + * Version: 9.0.0.cl or later Updates an Org object. You can modify Org properties such as name, description, and user associations. Requires cluster administration (**Can administer Org**) privileges. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `ORG_ADMINISTRATION` (**Can manage Orgs**) privilege is required. + * @param orgIdentifier ID or name of the Org + * @param updateOrgRequest + */ + updateOrg(orgIdentifier, updateOrgRequest, _options) { + return __async(this, null, function* () { + var _a, _b, _c; + let _config = _options || this.configuration; + if (orgIdentifier === null || orgIdentifier === void 0) { + throw new RequiredError("OrgsApi", "updateOrg", "orgIdentifier"); + } + if (updateOrgRequest === null || updateOrgRequest === void 0) { + throw new RequiredError("OrgsApi", "updateOrg", "updateOrgRequest"); + } + const localVarPath = "/api/rest/2.0/orgs/{org_identifier}/update".replace("{org_identifier}", encodeURIComponent(String(orgIdentifier))); + const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.25.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.25.0"); + const contentType = ObjectSerializer.getPreferredMediaType([ + "application/json" + ]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = ObjectSerializer.stringify( + ObjectSerializer.serialize(updateOrgRequest, "UpdateOrgRequest", ""), + contentType + ); + requestContext.setBody(serializedBody); + let authMethod; + authMethod = _config.authMethods["bearerAuth"]; + if (authMethod == null ? void 0 : authMethod.applySecurityAuthentication) { + yield authMethod == null ? void 0 : authMethod.applySecurityAuthentication(requestContext); + } + const defaultAuth = ((_a = _options == null ? void 0 : _options.authMethods) == null ? void 0 : _a.default) || ((_c = (_b = this.configuration) == null ? void 0 : _b.authMethods) == null ? void 0 : _c.default); + if (defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication) { + yield defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication(requestContext); + } + return requestContext; + }); + } +}; +var OrgsApiResponseProcessor = class { + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to createOrg + * @throws ApiException if the response code was not in [200, 299] + */ + createOrg(response) { + return __async(this, null, function* () { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("200", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "OrgResponse", + "" + ); + return body; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Invalid request.", body, response.headers); + } + if (isCodeInRange("401", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unexpected error", body, response.headers); + } + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "OrgResponse", + "" + ); + return body; + } + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", yield response.getBodyAsAny(), response.headers); + }); + } + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to deleteOrg + * @throws ApiException if the response code was not in [200, 299] + */ + deleteOrg(response) { + return __async(this, null, function* () { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("204", response.httpStatusCode)) { + return; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Invalid request.", body, response.headers); + } + if (isCodeInRange("401", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unexpected error", body, response.headers); + } + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "void", + "" + ); + return body; + } + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", yield response.getBodyAsAny(), response.headers); + }); + } + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to searchOrgs + * @throws ApiException if the response code was not in [200, 299] + */ + searchOrgs(response) { + return __async(this, null, function* () { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("200", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "Array", + "" + ); + return body; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Invalid request.", body, response.headers); + } + if (isCodeInRange("401", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unexpected error", body, response.headers); + } + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "Array", + "" + ); + return body; + } + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", yield response.getBodyAsAny(), response.headers); + }); + } + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to updateOrg + * @throws ApiException if the response code was not in [200, 299] + */ + updateOrg(response) { + return __async(this, null, function* () { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("204", response.httpStatusCode)) { + return; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Invalid request.", body, response.headers); + } + if (isCodeInRange("401", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unexpected error", body, response.headers); + } + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "void", + "" + ); + return body; + } + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", yield response.getBodyAsAny(), response.headers); + }); + } +}; + +// apis/ReportsApi.ts +var ReportsApiRequestFactory = class extends BaseAPIRequestFactory { + /** + * Version: 9.0.0.cl or later Exports an Answer in the given file format. You can download the Answer data as a PDF, PNG, CSV, or XLSX file. Requires at least view access to the Answer. #### Usage guidelines In the request body, specify the GUID or name of the Answer and set `file_format`. The default file format is CSV. Use the `type` parameter to specify whether the Answer being exported is a saved Answer (`SAVED`) or a pinned Answer on a Liveboard (`PINNED`). Defaults to `SAVED`. When using `PINNED`, the `metadata_identifier` must be the container id. **NOTE**: * The downloadable file returned in API response file is extensionless. Please rename the downloaded file by typing in the relevant extension. * HTML rendering is not supported for PDF exports of Answers with tables. Optionally, you can define [runtime overrides](https://developers.thoughtspot.com/docs/fetch-data-and-report-apis#_runtime_overrides) to apply to the Answer data. + * @param exportAnswerReportRequest + */ + exportAnswerReport(exportAnswerReportRequest, _options) { + return __async(this, null, function* () { + var _a, _b, _c; + let _config = _options || this.configuration; + if (exportAnswerReportRequest === null || exportAnswerReportRequest === void 0) { + throw new RequiredError("ReportsApi", "exportAnswerReport", "exportAnswerReportRequest"); + } + const localVarPath = "/api/rest/2.0/report/answer"; + const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.25.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.25.0"); + const contentType = ObjectSerializer.getPreferredMediaType([ + "application/json" + ]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = ObjectSerializer.stringify( + ObjectSerializer.serialize(exportAnswerReportRequest, "ExportAnswerReportRequest", ""), + contentType + ); + requestContext.setBody(serializedBody); + let authMethod; + authMethod = _config.authMethods["bearerAuth"]; + if (authMethod == null ? void 0 : authMethod.applySecurityAuthentication) { + yield authMethod == null ? void 0 : authMethod.applySecurityAuthentication(requestContext); + } + const defaultAuth = ((_a = _options == null ? void 0 : _options.authMethods) == null ? void 0 : _a.default) || ((_c = (_b = this.configuration) == null ? void 0 : _b.authMethods) == null ? void 0 : _c.default); + if (defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication) { + yield defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication(requestContext); + } + return requestContext; + }); + } + /** + * Version: 9.0.0.cl or later Exports a Liveboard and its visualizations in PDF, PNG, CSV, or XLSX file format. The default `file_format` is CSV. Requires at least view access to the Liveboard. #### Usage guidelines In the request body, specify the GUID or name of the Liveboard. To generate a Liveboard report with specific visualizations, add GUIDs or names of the visualizations. **NOTE**: * The downloadable file returned in API response file is extensionless. Please rename the downloaded file by typing in the relevant extension. * Optionally, you can define [runtime overrides](https://developers.thoughtspot.com/docs/fetch-data-and-report-apis#_runtime_overrides) to apply to the Answer data. * To include unsaved changes in the report, pass the `transient_pinboard_content` script generated from the `getExportRequestForCurrentPinboard` method in the Visual Embed SDK. Upon successful execution, the API returns the report with unsaved changes, including ad hoc changes to visualizations. For more information, see [Liveboard Report API](https://developers.thoughtspot.com/docs/fetch-data-and-report-apis#_liveboard_report_api). * Starting with ThoughtSpot Cloud 10.9.0.cl release, the Liveboard can be exported in the PNG format in the resolution of your choice. To enable this on your instance, contact ThoughtSpot support. When this feature is enabled, the options `include_cover_page`,`include_filter_page` within the `png_options` will not be available for PNG exports. * Starting with the ThoughtSpot Cloud 26.2.0.cl release, * Liveboards can be exported in CSV format. * All visualizations within a Liveboard can be exported as individual CSV files. * When exporting multiple visualizations or the entire Liveboard, the system returns the report as a compressed ZIP file containing the separate CSV files for each visualization. * Liveboards can also be exported in XLSX format. * All selected visualizations are consolidated into a single Excel workbook (.xlsx), with each visualization placed in its own worksheet (tab). * XLSX exports are limited to a maximum of 255 worksheets (tabs) per workbook. + * @param exportLiveboardReportRequest + */ + exportLiveboardReport(exportLiveboardReportRequest, _options) { + return __async(this, null, function* () { + var _a, _b, _c; + let _config = _options || this.configuration; + if (exportLiveboardReportRequest === null || exportLiveboardReportRequest === void 0) { + throw new RequiredError("ReportsApi", "exportLiveboardReport", "exportLiveboardReportRequest"); + } + const localVarPath = "/api/rest/2.0/report/liveboard"; + const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.25.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.25.0"); + const contentType = ObjectSerializer.getPreferredMediaType([ + "application/json" + ]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = ObjectSerializer.stringify( + ObjectSerializer.serialize(exportLiveboardReportRequest, "ExportLiveboardReportRequest", ""), + contentType + ); + requestContext.setBody(serializedBody); + let authMethod; + authMethod = _config.authMethods["bearerAuth"]; + if (authMethod == null ? void 0 : authMethod.applySecurityAuthentication) { + yield authMethod == null ? void 0 : authMethod.applySecurityAuthentication(requestContext); + } + const defaultAuth = ((_a = _options == null ? void 0 : _options.authMethods) == null ? void 0 : _a.default) || ((_c = (_b = this.configuration) == null ? void 0 : _b.authMethods) == null ? void 0 : _c.default); + if (defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication) { + yield defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication(requestContext); + } + return requestContext; + }); + } +}; +var ReportsApiResponseProcessor = class { + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to exportAnswerReport + * @throws ApiException if the response code was not in [200, 299] + */ + exportAnswerReport(response) { + return __async(this, null, function* () { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("200", response.httpStatusCode)) { + const body = yield response.getBodyAsFile(); + return body; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "binary" + ); + throw new ApiException(response.httpStatusCode, "Invalid request.", body, response.headers); + } + if (isCodeInRange("401", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "binary" + ); + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "binary" + ); + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "binary" + ); + throw new ApiException(response.httpStatusCode, "Unexpected error", body, response.headers); + } + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "HttpFile", + "binary" + ); + return body; + } + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", yield response.getBodyAsAny(), response.headers); + }); + } + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to exportLiveboardReport + * @throws ApiException if the response code was not in [200, 299] + */ + exportLiveboardReport(response) { + return __async(this, null, function* () { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("200", response.httpStatusCode)) { + const body = yield response.getBodyAsFile(); + return body; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "binary" + ); + throw new ApiException(response.httpStatusCode, "Invalid request.", body, response.headers); + } + if (isCodeInRange("401", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "binary" + ); + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "binary" + ); + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "binary" + ); + throw new ApiException(response.httpStatusCode, "Unexpected error", body, response.headers); + } + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "HttpFile", + "binary" + ); + return body; + } + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", yield response.getBodyAsAny(), response.headers); + }); + } +}; + +// apis/RolesApi.ts +var RolesApiRequestFactory = class extends BaseAPIRequestFactory { + /** + * Version: 9.5.0.cl or later Creates a Role object in ThoughtSpot. Available only if [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance. To create a Role, the `ROLE_ADMINISTRATION` (**Can manage roles**) privilege is required. + * @param createRoleRequest + */ + createRole(createRoleRequest, _options) { + return __async(this, null, function* () { + var _a, _b, _c; + let _config = _options || this.configuration; + if (createRoleRequest === null || createRoleRequest === void 0) { + throw new RequiredError("RolesApi", "createRole", "createRoleRequest"); + } + const localVarPath = "/api/rest/2.0/roles/create"; + const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.25.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.25.0"); + const contentType = ObjectSerializer.getPreferredMediaType([ + "application/json" + ]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = ObjectSerializer.stringify( + ObjectSerializer.serialize(createRoleRequest, "CreateRoleRequest", ""), + contentType + ); + requestContext.setBody(serializedBody); + let authMethod; + authMethod = _config.authMethods["bearerAuth"]; + if (authMethod == null ? void 0 : authMethod.applySecurityAuthentication) { + yield authMethod == null ? void 0 : authMethod.applySecurityAuthentication(requestContext); + } + const defaultAuth = ((_a = _options == null ? void 0 : _options.authMethods) == null ? void 0 : _a.default) || ((_c = (_b = this.configuration) == null ? void 0 : _b.authMethods) == null ? void 0 : _c.default); + if (defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication) { + yield defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication(requestContext); + } + return requestContext; + }); + } + /** + * Version: 9.5.0.cl or later Deletes a Role object from the ThoughtSpot system. Available only if [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance. To delete a Role, the `ROLE_ADMINISTRATION` (**Can manage roles**) privilege is required. + * @param roleIdentifier Unique ID or name of the Role. ReadOnly roles cannot be deleted. + */ + deleteRole(roleIdentifier, _options) { + return __async(this, null, function* () { + var _a, _b, _c; + let _config = _options || this.configuration; + if (roleIdentifier === null || roleIdentifier === void 0) { + throw new RequiredError("RolesApi", "deleteRole", "roleIdentifier"); + } + const localVarPath = "/api/rest/2.0/roles/{role_identifier}/delete".replace("{role_identifier}", encodeURIComponent(String(roleIdentifier))); + const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.25.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.25.0"); + let authMethod; + authMethod = _config.authMethods["bearerAuth"]; + if (authMethod == null ? void 0 : authMethod.applySecurityAuthentication) { + yield authMethod == null ? void 0 : authMethod.applySecurityAuthentication(requestContext); + } + const defaultAuth = ((_a = _options == null ? void 0 : _options.authMethods) == null ? void 0 : _a.default) || ((_c = (_b = this.configuration) == null ? void 0 : _b.authMethods) == null ? void 0 : _c.default); + if (defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication) { + yield defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication(requestContext); + } + return requestContext; + }); + } + /** + * Version: 9.5.0.cl or later Gets a list of Role objects from the ThoughtSpot system. Available if [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance. To search for Roles, the `ROLE_ADMINISTRATION` (**Can manage roles**) privilege is required. To get details of a specific Role object, specify the GUID or name. You can also filter the API response based on user group and Org identifiers, privileges assigned to the Role, and deprecation status. + * @param searchRolesRequest + */ + searchRoles(searchRolesRequest, _options) { + return __async(this, null, function* () { + var _a, _b, _c; + let _config = _options || this.configuration; + if (searchRolesRequest === null || searchRolesRequest === void 0) { + throw new RequiredError("RolesApi", "searchRoles", "searchRolesRequest"); + } + const localVarPath = "/api/rest/2.0/roles/search"; + const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.25.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.25.0"); + const contentType = ObjectSerializer.getPreferredMediaType([ + "application/json" + ]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = ObjectSerializer.stringify( + ObjectSerializer.serialize(searchRolesRequest, "SearchRolesRequest", ""), + contentType + ); + requestContext.setBody(serializedBody); + let authMethod; + authMethod = _config.authMethods["bearerAuth"]; + if (authMethod == null ? void 0 : authMethod.applySecurityAuthentication) { + yield authMethod == null ? void 0 : authMethod.applySecurityAuthentication(requestContext); + } + const defaultAuth = ((_a = _options == null ? void 0 : _options.authMethods) == null ? void 0 : _a.default) || ((_c = (_b = this.configuration) == null ? void 0 : _b.authMethods) == null ? void 0 : _c.default); + if (defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication) { + yield defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication(requestContext); + } + return requestContext; + }); + } + /** + * Version: 9.5.0.cl or later Updates the properties of a Role object. Available only if [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance. To update a Role, the `ROLE_ADMINISTRATION` (**Can manage roles**) privilege is required. + * @param roleIdentifier Unique ID or name of the Role. + * @param updateRoleRequest + */ + updateRole(roleIdentifier, updateRoleRequest, _options) { + return __async(this, null, function* () { + var _a, _b, _c; + let _config = _options || this.configuration; + if (roleIdentifier === null || roleIdentifier === void 0) { + throw new RequiredError("RolesApi", "updateRole", "roleIdentifier"); + } + if (updateRoleRequest === null || updateRoleRequest === void 0) { + throw new RequiredError("RolesApi", "updateRole", "updateRoleRequest"); + } + const localVarPath = "/api/rest/2.0/roles/{role_identifier}/update".replace("{role_identifier}", encodeURIComponent(String(roleIdentifier))); + const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.25.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.25.0"); + const contentType = ObjectSerializer.getPreferredMediaType([ + "application/json" + ]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = ObjectSerializer.stringify( + ObjectSerializer.serialize(updateRoleRequest, "UpdateRoleRequest", ""), + contentType + ); + requestContext.setBody(serializedBody); + let authMethod; + authMethod = _config.authMethods["bearerAuth"]; + if (authMethod == null ? void 0 : authMethod.applySecurityAuthentication) { + yield authMethod == null ? void 0 : authMethod.applySecurityAuthentication(requestContext); + } + const defaultAuth = ((_a = _options == null ? void 0 : _options.authMethods) == null ? void 0 : _a.default) || ((_c = (_b = this.configuration) == null ? void 0 : _b.authMethods) == null ? void 0 : _c.default); + if (defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication) { + yield defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication(requestContext); + } + return requestContext; + }); + } +}; +var RolesApiResponseProcessor = class { + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to createRole + * @throws ApiException if the response code was not in [200, 299] + */ + createRole(response) { + return __async(this, null, function* () { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("200", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "RoleResponse", + "" + ); + return body; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Invalid parameters.", body, response.headers); + } + if (isCodeInRange("401", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Internal error", body, response.headers); + } + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "RoleResponse", + "" + ); + return body; + } + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", yield response.getBodyAsAny(), response.headers); + }); + } + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to deleteRole + * @throws ApiException if the response code was not in [200, 299] + */ + deleteRole(response) { + return __async(this, null, function* () { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("204", response.httpStatusCode)) { + return; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Invalid request.", body, response.headers); + } + if (isCodeInRange("401", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Internal error", body, response.headers); + } + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "void", + "" + ); + return body; + } + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", yield response.getBodyAsAny(), response.headers); + }); + } + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to searchRoles + * @throws ApiException if the response code was not in [200, 299] + */ + searchRoles(response) { + return __async(this, null, function* () { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("200", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "Array", + "" + ); + return body; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Invalid request.", body, response.headers); + } + if (isCodeInRange("401", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Internal error", body, response.headers); + } + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "Array", + "" + ); + return body; + } + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", yield response.getBodyAsAny(), response.headers); + }); + } + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to updateRole + * @throws ApiException if the response code was not in [200, 299] + */ + updateRole(response) { + return __async(this, null, function* () { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("200", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "RoleResponse", + "" + ); + return body; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Invalid request.", body, response.headers); + } + if (isCodeInRange("401", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unexpected error", body, response.headers); + } + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "RoleResponse", + "" + ); + return body; + } + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", yield response.getBodyAsAny(), response.headers); + }); + } +}; + +// apis/SchedulesApi.ts +var SchedulesApiRequestFactory = class extends BaseAPIRequestFactory { + /** + * Create schedule. Version: 9.4.0.cl or later Creates a Liveboard schedule job. Requires at least edit access to Liveboards. To create a schedule on behalf of another user, you need `ADMINISTRATION` (**Can administer Org**) or `JOBSCHEDULING` (**Can schedule for others**) privilege and edit access to the Liveboard. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `JOBSCHEDULING` (**Can schedule for others**) privilege is required. #### Usage guidelines * The description text is mandatory. The description text appears as **Description: ** in the Liveboard schedule email notifications. * For Liveboards with both charts and tables, schedule creation is only supported in PDF and XLS formats. Schedules created in CSV formats for such Liveboards will fail to run. If `PDF` is set as the `file_format`, enable `pdf_options` to get the correct attachment. Not doing so may cause the attachment to be rendered empty. * To include only specific visualizations, specify the visualization GUIDs in the `visualization_identifiers` array. * You can schedule a Liveboard job to run periodically by setting frequency parameters. You can set the schedule to run daily, weekly, monthly or every n minutes or hours. The scheduled job can also be configured to run at a specific time of the day or on specific days of the week or month. Please ensure that when setting the schedule frequency for _minute of the object_, only values that are multiples of 5 are included. * If the `frequency` parameters are defined, you can set the time zone to a value that matches your server\'s time zone. For example, `US/Central`, `Etc/UTC`, `CET`. The default time zone is `America/Los_Angeles`. For more information about Liveboard jobs, see [ThoughtSpot Product Documentation](https://docs.thoughtspot.com/cloud/latest/liveboard-schedule). + * @param createScheduleRequest + */ + createSchedule(createScheduleRequest, _options) { + return __async(this, null, function* () { + var _a, _b, _c; + let _config = _options || this.configuration; + if (createScheduleRequest === null || createScheduleRequest === void 0) { + throw new RequiredError("SchedulesApi", "createSchedule", "createScheduleRequest"); + } + const localVarPath = "/api/rest/2.0/schedules/create"; + const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.25.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.25.0"); + const contentType = ObjectSerializer.getPreferredMediaType([ + "application/json" + ]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = ObjectSerializer.stringify( + ObjectSerializer.serialize(createScheduleRequest, "CreateScheduleRequest", ""), + contentType + ); + requestContext.setBody(serializedBody); + let authMethod; + authMethod = _config.authMethods["bearerAuth"]; + if (authMethod == null ? void 0 : authMethod.applySecurityAuthentication) { + yield authMethod == null ? void 0 : authMethod.applySecurityAuthentication(requestContext); + } + const defaultAuth = ((_a = _options == null ? void 0 : _options.authMethods) == null ? void 0 : _a.default) || ((_c = (_b = this.configuration) == null ? void 0 : _b.authMethods) == null ? void 0 : _c.default); + if (defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication) { + yield defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication(requestContext); + } + return requestContext; + }); + } + /** + * Deletes a scheduled job. Version: 9.4.0.cl or later Deletes a scheduled Liveboard job. Requires at least edit access to Liveboard or `ADMINISTRATION` (**Can administer Org**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `JOBSCHEDULING` (**Can schedule for others**) privilege is required. + * @param scheduleIdentifier Unique ID or name of the scheduled job. + */ + deleteSchedule(scheduleIdentifier, _options) { + return __async(this, null, function* () { + var _a, _b, _c; + let _config = _options || this.configuration; + if (scheduleIdentifier === null || scheduleIdentifier === void 0) { + throw new RequiredError("SchedulesApi", "deleteSchedule", "scheduleIdentifier"); + } + const localVarPath = "/api/rest/2.0/schedules/{schedule_identifier}/delete".replace("{schedule_identifier}", encodeURIComponent(String(scheduleIdentifier))); + const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.25.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.25.0"); + let authMethod; + authMethod = _config.authMethods["bearerAuth"]; + if (authMethod == null ? void 0 : authMethod.applySecurityAuthentication) { + yield authMethod == null ? void 0 : authMethod.applySecurityAuthentication(requestContext); + } + const defaultAuth = ((_a = _options == null ? void 0 : _options.authMethods) == null ? void 0 : _a.default) || ((_c = (_b = this.configuration) == null ? void 0 : _b.authMethods) == null ? void 0 : _c.default); + if (defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication) { + yield defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication(requestContext); + } + return requestContext; + }); + } + /** + * Search Schedules Version: 9.4.0.cl or later Gets a list of scheduled jobs configured for a Liveboard. To get details of a specific scheduled job, specify the name or GUID of the scheduled job. Requires at least view access to Liveboards. **NOTE**: When filtering schedules by parameters other than `metadata`, set `record_size` to `-1` and `record_offset` to `0` for accurate results. + * @param searchSchedulesRequest + */ + searchSchedules(searchSchedulesRequest, _options) { + return __async(this, null, function* () { + var _a, _b, _c; + let _config = _options || this.configuration; + if (searchSchedulesRequest === null || searchSchedulesRequest === void 0) { + throw new RequiredError("SchedulesApi", "searchSchedules", "searchSchedulesRequest"); + } + const localVarPath = "/api/rest/2.0/schedules/search"; + const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.25.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.25.0"); + const contentType = ObjectSerializer.getPreferredMediaType([ + "application/json" + ]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = ObjectSerializer.stringify( + ObjectSerializer.serialize(searchSchedulesRequest, "SearchSchedulesRequest", ""), + contentType + ); + requestContext.setBody(serializedBody); + let authMethod; + authMethod = _config.authMethods["bearerAuth"]; + if (authMethod == null ? void 0 : authMethod.applySecurityAuthentication) { + yield authMethod == null ? void 0 : authMethod.applySecurityAuthentication(requestContext); + } + const defaultAuth = ((_a = _options == null ? void 0 : _options.authMethods) == null ? void 0 : _a.default) || ((_c = (_b = this.configuration) == null ? void 0 : _b.authMethods) == null ? void 0 : _c.default); + if (defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication) { + yield defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication(requestContext); + } + return requestContext; + }); + } + /** + * Update schedule. Version: 9.4.0.cl or later Updates a scheduled Liveboard job. Requires at least edit access to Liveboards. To update a schedule on behalf of another user, you need `ADMINISTRATION` (**Can administer Org**) or `JOBSCHEDULING` (**Can schedule for others**) privilege and edit access to the Liveboard. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `JOBSCHEDULING` (**Can schedule for others**) privilege is required. The API endpoint allows you to pause a scheduled job, change the status of a paused job. You can also edit the recipients list, frequency of the job, format of the file to send to the recipients in email notifications, PDF options, and time zone setting. + * @param scheduleIdentifier Unique ID or name of the schedule. + * @param updateScheduleRequest + */ + updateSchedule(scheduleIdentifier, updateScheduleRequest, _options) { + return __async(this, null, function* () { + var _a, _b, _c; + let _config = _options || this.configuration; + if (scheduleIdentifier === null || scheduleIdentifier === void 0) { + throw new RequiredError("SchedulesApi", "updateSchedule", "scheduleIdentifier"); + } + if (updateScheduleRequest === null || updateScheduleRequest === void 0) { + throw new RequiredError("SchedulesApi", "updateSchedule", "updateScheduleRequest"); + } + const localVarPath = "/api/rest/2.0/schedules/{schedule_identifier}/update".replace("{schedule_identifier}", encodeURIComponent(String(scheduleIdentifier))); + const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.25.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.25.0"); + const contentType = ObjectSerializer.getPreferredMediaType([ + "application/json" + ]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = ObjectSerializer.stringify( + ObjectSerializer.serialize(updateScheduleRequest, "UpdateScheduleRequest", ""), + contentType + ); + requestContext.setBody(serializedBody); + let authMethod; + authMethod = _config.authMethods["bearerAuth"]; + if (authMethod == null ? void 0 : authMethod.applySecurityAuthentication) { + yield authMethod == null ? void 0 : authMethod.applySecurityAuthentication(requestContext); + } + const defaultAuth = ((_a = _options == null ? void 0 : _options.authMethods) == null ? void 0 : _a.default) || ((_c = (_b = this.configuration) == null ? void 0 : _b.authMethods) == null ? void 0 : _c.default); + if (defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication) { + yield defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication(requestContext); + } + return requestContext; + }); + } +}; +var SchedulesApiResponseProcessor = class { + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to createSchedule + * @throws ApiException if the response code was not in [200, 299] + */ + createSchedule(response) { + return __async(this, null, function* () { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("200", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ResponseSchedule", + "" + ); + return body; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Invalid request.", body, response.headers); + } + if (isCodeInRange("401", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unexpected error", body, response.headers); + } + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ResponseSchedule", + "" + ); + return body; + } + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", yield response.getBodyAsAny(), response.headers); + }); + } + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to deleteSchedule + * @throws ApiException if the response code was not in [200, 299] + */ + deleteSchedule(response) { + return __async(this, null, function* () { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("204", response.httpStatusCode)) { + return; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Invalid request.", body, response.headers); + } + if (isCodeInRange("401", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unexpected error", body, response.headers); + } + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "void", + "" + ); + return body; + } + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", yield response.getBodyAsAny(), response.headers); + }); + } + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to searchSchedules + * @throws ApiException if the response code was not in [200, 299] + */ + searchSchedules(response) { + return __async(this, null, function* () { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("200", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "Array", + "" + ); + return body; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Invalid request.", body, response.headers); + } + if (isCodeInRange("401", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unexpected error", body, response.headers); + } + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "Array", + "" + ); + return body; + } + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", yield response.getBodyAsAny(), response.headers); + }); + } + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to updateSchedule + * @throws ApiException if the response code was not in [200, 299] + */ + updateSchedule(response) { + return __async(this, null, function* () { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("204", response.httpStatusCode)) { + return; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Invalid request.", body, response.headers); + } + if (isCodeInRange("401", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unexpected error", body, response.headers); + } + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "void", + "" + ); + return body; + } + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", yield response.getBodyAsAny(), response.headers); + }); + } +}; + +// apis/SecurityApi.ts +var SecurityApiRequestFactory = class extends BaseAPIRequestFactory { + /** + * Version: 9.0.0.cl or later Transfers the ownership of one or several objects from one user to another. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `USER_ADMINISTRATION` (**Can manage users**) privilege and edit access to the objects are required. + * @param assignChangeAuthorRequest + */ + assignChangeAuthor(assignChangeAuthorRequest, _options) { + return __async(this, null, function* () { + var _a, _b, _c; + let _config = _options || this.configuration; + if (assignChangeAuthorRequest === null || assignChangeAuthorRequest === void 0) { + throw new RequiredError("SecurityApi", "assignChangeAuthor", "assignChangeAuthorRequest"); + } + const localVarPath = "/api/rest/2.0/security/metadata/assign"; + const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.25.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.25.0"); + const contentType = ObjectSerializer.getPreferredMediaType([ + "application/json" + ]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = ObjectSerializer.stringify( + ObjectSerializer.serialize(assignChangeAuthorRequest, "AssignChangeAuthorRequest", ""), + contentType + ); + requestContext.setBody(serializedBody); + let authMethod; + authMethod = _config.authMethods["bearerAuth"]; + if (authMethod == null ? void 0 : authMethod.applySecurityAuthentication) { + yield authMethod == null ? void 0 : authMethod.applySecurityAuthentication(requestContext); + } + const defaultAuth = ((_a = _options == null ? void 0 : _options.authMethods) == null ? void 0 : _a.default) || ((_c = (_b = this.configuration) == null ? void 0 : _b.authMethods) == null ? void 0 : _c.default); + if (defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication) { + yield defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication(requestContext); + } + return requestContext; + }); + } + /** + * Version: 10.12.0.cl or later Fetches column security rules for specified tables. This API endpoint retrieves column-level security rules configured for tables. It returns information about which columns are secured and which groups have access to those columns. #### Usage guidelines - Provide an array of table identifiers using either `identifier` (GUID or name) or `obj_identifier` (object ID) - At least one of `identifier` or `obj_identifier` must be provided for each table - The API returns column security rules for all specified tables - Users must have appropriate permissions to access security rules for the specified tables #### Required permissions - `ADMINISTRATION` - Can administer ThoughtSpot - `DATAMANAGEMENT` - Can manage data - `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` - Can manage worksheet views and tables #### Example request ```json { \"tables\": [ { \"identifier\": \"table-guid\", \"obj_identifier\": \"table-object-id\" } ] } ``` #### Response format The API returns an array of `ColumnSecurityRuleResponse` objects wrapped in a `data` field. Each `ColumnSecurityRuleResponse` object contains: - Table information (GUID and object ID) - Array of column security rules with column details, group access, and source table information #### Example response ```json { \"data\": [ { \"guid\": \"table-guid\", \"objId\": \"table-object-id\", \"columnSecurityRules\": [ { \"column\": { \"id\": \"col_123\", \"name\": \"Salary\" }, \"groups\": [ { \"id\": \"group_1\", \"name\": \"HR Department\" } ], \"sourceTableDetails\": { \"id\": \"source-table-guid\", \"name\": \"Employee_Data\" } } ] } ] } ``` + * @param fetchColumnSecurityRulesRequest + */ + fetchColumnSecurityRules(fetchColumnSecurityRulesRequest, _options) { + return __async(this, null, function* () { + var _a, _b, _c; + let _config = _options || this.configuration; + if (fetchColumnSecurityRulesRequest === null || fetchColumnSecurityRulesRequest === void 0) { + throw new RequiredError("SecurityApi", "fetchColumnSecurityRules", "fetchColumnSecurityRulesRequest"); + } + const localVarPath = "/api/rest/2.0/security/column/rules/fetch"; + const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.25.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.25.0"); + const contentType = ObjectSerializer.getPreferredMediaType([ + "application/json" + ]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = ObjectSerializer.stringify( + ObjectSerializer.serialize(fetchColumnSecurityRulesRequest, "FetchColumnSecurityRulesRequest", ""), + contentType + ); + requestContext.setBody(serializedBody); + let authMethod; + authMethod = _config.authMethods["bearerAuth"]; + if (authMethod == null ? void 0 : authMethod.applySecurityAuthentication) { + yield authMethod == null ? void 0 : authMethod.applySecurityAuthentication(requestContext); + } + const defaultAuth = ((_a = _options == null ? void 0 : _options.authMethods) == null ? void 0 : _a.default) || ((_c = (_b = this.configuration) == null ? void 0 : _b.authMethods) == null ? void 0 : _c.default); + if (defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication) { + yield defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication(requestContext); + } + return requestContext; + }); + } + /** + * Version: 26.3.0.cl or later This API fetches the object privileges present for the given list of principals (user or group), on the given set of objects. It supports pagination, which can be enabled and configured using the request parameters. It provides users access to certain features based on privilege based access control. #### Usage guidelines - Specify the `type` (`USER` or `USER_GROUP`) and `identifier` (either GUID or name) of the principals for which you want to retrieve object privilege information in the `principals` array. - Specify the `type` (`LOGICAL_TABLE`) and `identifier` (either GUID or name) of the metadata objects for which you want to retrieve object privilege information in the `metadata` array. Only `LOGICAL_TABLE` metadata type is supported for now. It may be extended for other metadata types in future. - To control the offset from where principals have to be fetched, use `record_offset`. When `record_offset` is 0, information is fetched from the beginning. - To control the number of principals to be fetched, use `record_size`. Default `record_size` is 20. - Ensure `record_offset` for a subsequent request is one more than the value of `record_size` of the previous request. - Ensure using correct Authorization Bearer Token corresponding to specific user & org. #### Example request ```json { \"principals\": [ { \"type\": \"type-1\", \"identifier\": \"principal-guid-or-name-1\" }, { \"type\": \"type-2\", \"identifier\": \"principal-guid-or-name-2\" } ], \"metadata\": [ { \"type\": \"metadata-type-1\", \"identifier\": \"metadata-guid-or-name-1\" }, { \"type\": \"metadata-type-2\", \"identifier\": \"metadata-guid-or-name-2\" } ], \"record_offset\": 0, \"record_size\": 20 } ``` #### Response format The API returns an array of `metadata_object_privileges` objects wrapped in JSON. Each `metadata_object_privileges` object contains: - Metadata information (GUID, name and type) - Array of `principal_object_privilege_info`. - Each `principal_object_privilege_info` contains: - Principal type. All principals of this type are listed as described below. - Array of `principal_object_privileges`. - Each `principal_object_privileges` contains: - Principal information (GUID, name, subtype) - List of applied object level privileges. #### Example response ```json { \"metadata_object_privileges\": [ { \"metadata_id\": \"metadata-guid-1\", \"metadata_name\": \"metadata-name-1\", \"metadata_type\": \"metadata-type-1\", \"principal_object_privilege_info\": [ { \"principal_type\": \"principal-type-1\", \"principal_object_privileges\": [ { \"principal_id\": \"principal-guid-1\", \"principal_name\": \"principal-name-1\", \"principal_sub_type\": \"principal-sub-type-1\", \"object_privileges\": \"[object-privilege-1, object-privilege-2]\" }, { \"principal_id\": \"principal-guid-2\", \"principal_name\": \"principal-name-2\", \"principal_sub_type\": \"principal-sub-type-2\", \"object_privileges\": \"[object-privilege-1, object-privilege-2]\" } ] }, { \"principal_type\": \"principal-type-2\", \"principal_object_privileges\": [ { \"principal_id\": \"principal-guid-3\", \"principal_name\": \"principal-guid-4\", \"principal_sub_type\": \"principal-sub-type-4\", \"object_privileges\": \"[object-privilege-1]\" } ] } ] }, { \"metadata_id\": \"metadata-guid-2\", \"metadata_name\": \"metadata-name-2\", \"metadata_type\": \"metadata-type-2\", \"principal_object_privilege_info\": [ { \"principal_type\": \"principal-type-1\", \"principal_object_privileges\": [ { \"principal_id\": \"principal-guid-1\", \"principal_name\": \"principal-name-1\", \"principal_sub_type\": \"principal-sub-type-1\", \"object_privileges\": \"[object-privilege-3, object-privilege-4]\" }, { \"principal_id\": \"principal-guid-2\", \"principal_name\": \"principal-name-2\", \"principal_sub_type\": \"principal-sub-type-2\", \"object_privileges\": \"[object-privilege-4]\" } ] } ] } ] } ``` + * @param fetchObjectPrivilegesRequest + */ + fetchObjectPrivileges(fetchObjectPrivilegesRequest, _options) { + return __async(this, null, function* () { + var _a, _b, _c; + let _config = _options || this.configuration; + if (fetchObjectPrivilegesRequest === null || fetchObjectPrivilegesRequest === void 0) { + throw new RequiredError("SecurityApi", "fetchObjectPrivileges", "fetchObjectPrivilegesRequest"); + } + const localVarPath = "/api/rest/2.0/security/metadata/fetch-object-privileges"; + const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.25.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.25.0"); + const contentType = ObjectSerializer.getPreferredMediaType([ + "application/json" + ]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = ObjectSerializer.stringify( + ObjectSerializer.serialize(fetchObjectPrivilegesRequest, "FetchObjectPrivilegesRequest", ""), + contentType + ); + requestContext.setBody(serializedBody); + let authMethod; + authMethod = _config.authMethods["bearerAuth"]; + if (authMethod == null ? void 0 : authMethod.applySecurityAuthentication) { + yield authMethod == null ? void 0 : authMethod.applySecurityAuthentication(requestContext); + } + const defaultAuth = ((_a = _options == null ? void 0 : _options.authMethods) == null ? void 0 : _a.default) || ((_c = (_b = this.configuration) == null ? void 0 : _b.authMethods) == null ? void 0 : _c.default); + if (defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication) { + yield defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication(requestContext); + } + return requestContext; + }); + } + /** + * Version: 9.0.0.cl or later Fetches object permission details for a given principal object such as a user and group. Requires view access to the metadata object. #### Usage guidelines * To get a list of all metadata objects that a user or group can access, specify the `type` and GUID or name of the principal. * To get permission details for a specific object, add the `type` and GUID or name of the metadata object to your API request. Upon successful execution, the API returns a list of metadata objects and permission details for each object. + * @param fetchPermissionsOfPrincipalsRequest + */ + fetchPermissionsOfPrincipals(fetchPermissionsOfPrincipalsRequest, _options) { + return __async(this, null, function* () { + var _a, _b, _c; + let _config = _options || this.configuration; + if (fetchPermissionsOfPrincipalsRequest === null || fetchPermissionsOfPrincipalsRequest === void 0) { + throw new RequiredError("SecurityApi", "fetchPermissionsOfPrincipals", "fetchPermissionsOfPrincipalsRequest"); + } + const localVarPath = "/api/rest/2.0/security/principals/fetch-permissions"; + const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.25.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.25.0"); + const contentType = ObjectSerializer.getPreferredMediaType([ + "application/json" + ]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = ObjectSerializer.stringify( + ObjectSerializer.serialize(fetchPermissionsOfPrincipalsRequest, "FetchPermissionsOfPrincipalsRequest", ""), + contentType + ); + requestContext.setBody(serializedBody); + let authMethod; + authMethod = _config.authMethods["bearerAuth"]; + if (authMethod == null ? void 0 : authMethod.applySecurityAuthentication) { + yield authMethod == null ? void 0 : authMethod.applySecurityAuthentication(requestContext); + } + const defaultAuth = ((_a = _options == null ? void 0 : _options.authMethods) == null ? void 0 : _a.default) || ((_c = (_b = this.configuration) == null ? void 0 : _b.authMethods) == null ? void 0 : _c.default); + if (defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication) { + yield defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication(requestContext); + } + return requestContext; + }); + } + /** + * Version: 9.0.0.cl or later Fetches permission details for a given metadata object. Requires view access to the metadata object. #### Usage guidelines * To fetch a list of users and groups for a metadata object, specify `type` and GUID or name of the metadata object. * To get permission details for a specific user or group, add `type` and GUID or name of the principal object to your API request. Upon successful execution, the API returns permission details and principal information for the object specified in the API request. + * @param fetchPermissionsOnMetadataRequest + */ + fetchPermissionsOnMetadata(fetchPermissionsOnMetadataRequest, _options) { + return __async(this, null, function* () { + var _a, _b, _c; + let _config = _options || this.configuration; + if (fetchPermissionsOnMetadataRequest === null || fetchPermissionsOnMetadataRequest === void 0) { + throw new RequiredError("SecurityApi", "fetchPermissionsOnMetadata", "fetchPermissionsOnMetadataRequest"); + } + const localVarPath = "/api/rest/2.0/security/metadata/fetch-permissions"; + const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.25.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.25.0"); + const contentType = ObjectSerializer.getPreferredMediaType([ + "application/json" + ]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = ObjectSerializer.stringify( + ObjectSerializer.serialize(fetchPermissionsOnMetadataRequest, "FetchPermissionsOnMetadataRequest", ""), + contentType + ); + requestContext.setBody(serializedBody); + let authMethod; + authMethod = _config.authMethods["bearerAuth"]; + if (authMethod == null ? void 0 : authMethod.applySecurityAuthentication) { + yield authMethod == null ? void 0 : authMethod.applySecurityAuthentication(requestContext); + } + const defaultAuth = ((_a = _options == null ? void 0 : _options.authMethods) == null ? void 0 : _a.default) || ((_c = (_b = this.configuration) == null ? void 0 : _b.authMethods) == null ? void 0 : _c.default); + if (defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication) { + yield defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication(requestContext); + } + return requestContext; + }); + } + /** + * Version: 26.3.0.cl or later This API allows the addition or deletion of object level privileges for a set of users and groups, on a set of metadata objects. It provides users to access certain features based on privilege based access control. #### Usage guidelines - Specify the `operation`. The supported operations are: `ADD`, `REMOVE`. - Specify the type of the objects on which the object privileges are being provided in `metadata_type`. Only `LOGICAL_TABLE` metadata type is supported for now. It may be extended for other metadata types in future. - Specify the list of object privilege types in the `object_privilege_types` array. The supported object privilege types are: `SPOTTER_COACHING_PRIVILEGE`. - Specify the identifiers (either GUID or name) for the metadata objects in the `metadata_identifiers` array. - Specify the `type` (`USER` or `USER_GROUP`) and `identifier` (either GUID or name) of the principals to which you want to apply the given operation and given object privileges in the `principals` array. - Ensure using correct Authorization Bearer Token corresponding to specific user & org. #### Example request ```json { \"operation\": \"operation-type\", \"metadata_type\": \"metadata-type\", \"object_privilege_types\": [\"privilege-type-1\", \"privilege-type-2\"], \"metadata_identifiers\": [\"metadata-guid-or-name-1\", \"metadata-guid-or-name-1\"], \"principals\": [ { \"type\": \"type-1\", \"identifier\": \"principal-guid-or-name-1\" }, { \"type\": \"type-2\", \"identifier\": \"principal-guid-or-name-2\" } ] } ``` > ###### Note: > * Only admin users, users with edit access and users with coaching privilege on a given data-model can add or remove principals related to SPOTTER_COACHING_PRIVILEGE + * @param manageObjectPrivilegeRequest + */ + manageObjectPrivilege(manageObjectPrivilegeRequest, _options) { + return __async(this, null, function* () { + var _a, _b, _c; + let _config = _options || this.configuration; + if (manageObjectPrivilegeRequest === null || manageObjectPrivilegeRequest === void 0) { + throw new RequiredError("SecurityApi", "manageObjectPrivilege", "manageObjectPrivilegeRequest"); + } + const localVarPath = "/api/rest/2.0/security/metadata/manage-object-privilege"; + const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.25.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.25.0"); + const contentType = ObjectSerializer.getPreferredMediaType([ + "application/json" + ]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = ObjectSerializer.stringify( + ObjectSerializer.serialize(manageObjectPrivilegeRequest, "ManageObjectPrivilegeRequest", ""), + contentType + ); + requestContext.setBody(serializedBody); + let authMethod; + authMethod = _config.authMethods["bearerAuth"]; + if (authMethod == null ? void 0 : authMethod.applySecurityAuthentication) { + yield authMethod == null ? void 0 : authMethod.applySecurityAuthentication(requestContext); + } + const defaultAuth = ((_a = _options == null ? void 0 : _options.authMethods) == null ? void 0 : _a.default) || ((_c = (_b = this.configuration) == null ? void 0 : _b.authMethods) == null ? void 0 : _c.default); + if (defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication) { + yield defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication(requestContext); + } + return requestContext; + }); + } + /** + * Version: 26.5.0.cl or later Allows publishing metadata objects across organizations in ThoughtSpot. Requires ADMINISTRATION role and TENANT scope. The API endpoint allows publishing the following types of metadata objects: * Liveboards * Answers * Logical Tables This API will essentially share the objects along with it\'s dependencies to the org admins of the orgs to which it is being published. + * @param publishMetadataRequest + */ + publishMetadata(publishMetadataRequest, _options) { + return __async(this, null, function* () { + var _a, _b, _c; + let _config = _options || this.configuration; + if (publishMetadataRequest === null || publishMetadataRequest === void 0) { + throw new RequiredError("SecurityApi", "publishMetadata", "publishMetadataRequest"); + } + const localVarPath = "/api/rest/2.0/security/metadata/publish"; + const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.25.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.25.0"); + const contentType = ObjectSerializer.getPreferredMediaType([ + "application/json" + ]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = ObjectSerializer.stringify( + ObjectSerializer.serialize(publishMetadataRequest, "PublishMetadataRequest", ""), + contentType + ); + requestContext.setBody(serializedBody); + let authMethod; + authMethod = _config.authMethods["bearerAuth"]; + if (authMethod == null ? void 0 : authMethod.applySecurityAuthentication) { + yield authMethod == null ? void 0 : authMethod.applySecurityAuthentication(requestContext); + } + const defaultAuth = ((_a = _options == null ? void 0 : _options.authMethods) == null ? void 0 : _a.default) || ((_c = (_b = this.configuration) == null ? void 0 : _b.authMethods) == null ? void 0 : _c.default); + if (defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication) { + yield defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication(requestContext); + } + return requestContext; + }); + } + /** + * Version: 9.0.0.cl or later Allows sharing one or several metadata objects with users and groups in ThoughtSpot. Requires edit access to the metadata object. #### Supported metadata objects: * Liveboards * Visualizations * Answers * Models * Views * Connections * Collections #### Object permissions You can provide `READ_ONLY` or `MODIFY` access when sharing an object with another user or group. The `READ_ONLY` permission grants view access to the shared object, whereas `MODIFY` provides edit access. To prevent a user or group from accessing the shared object, specify the GUID or name of the principal and set `shareMode` to `NO_ACCESS`. #### Sharing a visualization * Sharing a visualization implicitly shares the entire Liveboard with the recipient. * Object permissions set for a shared visualization also apply to the Liveboard unless overridden by another API request or via UI. * If email notifications for object sharing are enabled, a notification with a link to the shared visualization will be sent to the recipient’s email address. Although this link opens the shared visualization, recipients can also access other visualizations in the Liveboard. #### Sharing a collection Collections support **dual permissions** that provide fine-grained control: * **Collection permissions** (`share_mode`) - controls access to the collection itself (view, edit, delete the collection) * **Content permissions** (`content_share_mode`) - controls access to objects within the collection (view, edit objects inside) **Default Behavior:** - If only `share_mode` is specified, the content permissions default to `READ_ONLY` (except when `share_mode` is `NO_ACCESS`, then content also gets `NO_ACCESS`) - To give users edit access to collection contents, explicitly set `content_share_mode: \"MODIFY\"` ## Examples The following JSON examples can be copy-pasted as request bodies for the REST v2 API endpoint: ```bash POST /callosum/v1/v2/security/metadata/share Content-Type: application/x-www-form-urlencoded ``` ### Basic collection sharing Share a collection with read-only access: ```json { \"metadata_type\": \"COLLECTION\", \"metadata_identifiers\": [\"Sales Reports Collection\"], \"permissions\": [{ \"principal\": { \"type\": \"USER\", \"identifier\": \"alice@company.com\" }, \"share_mode\": \"READ_ONLY\" }], \"notification\": { \"message\": \"I\'ve shared the Sales Reports collection with you\", \"notify_on_share\": true } } ``` ### Collection sharing with dual permissions Share a collection with different permissions for the collection vs. its contents: ```json { \"metadata_type\": \"COLLECTION\", \"metadata_identifiers\": [\"Marketing Analytics\"], \"permissions\": [{ \"principal\": { \"type\": \"USER\", \"identifier\": \"bob@company.com\" }, \"share_mode\": \"MODIFY\", \"content_share_mode\": \"READ_ONLY\" }, { \"principal\": { \"type\": \"USER_GROUP\", \"identifier\": \"Marketing Team\" }, \"share_mode\": \"READ_ONLY\", \"content_share_mode\": \"READ_ONLY\" }], \"notification\": { \"emails\": [\"bob@company.com\"], \"message\": \"You can edit the collection but content is read-only\", \"enable_custom_url\": false, \"notify_on_share\": true }, \"has_lenient_discoverability\": false } ``` ### Multiple collections sharing Share multiple collections with different users: ```json { \"metadata\": [ { \"type\": \"COLLECTION\", \"identifier\": \"Q4 Reports\" }, { \"type\": \"COLLECTION\", \"identifier\": \"Executive Dashboard Collection\" } ], \"permissions\": [{ \"principal\": { \"type\": \"USER_GROUP\", \"identifier\": \"Executives\" }, \"share_mode\": \"MODIFY\" }, { \"principal\": { \"type\": \"USER\", \"identifier\": \"manager@company.com\" }, \"share_mode\": \"READ_ONLY\", \"content_share_mode\": \"MODIFY\" }], \"notification\": { \"message\": \"Sharing quarterly collections with leadership team\", \"notify_on_share\": true } } ``` ### Remove collection access Remove access to a collection by setting share_mode to NO_ACCESS: ```json { \"metadata_type\": \"COLLECTION\", \"metadata_identifiers\": [\"Confidential Reports\"], \"permissions\": [{ \"principal\": { \"type\": \"USER\", \"identifier\": \"former-employee@company.com\" }, \"share_mode\": \"NO_ACCESS\" }], \"notification\": { \"notify_on_share\": false } } ``` ### Collection Permission Scenarios **Scenario 1: Collection Admin** - `share_mode: MODIFY` + `content_share_mode: MODIFY` = Full control over collection and its contents **Scenario 2: Collection Curator** - `share_mode: MODIFY` + `content_share_mode: READ_ONLY` = Can manage collection structure but not edit contents **Scenario 3: Content Editor** - `share_mode: READ_ONLY` + `content_share_mode: MODIFY` = Can edit objects within collection but can\'t change collection itself **Scenario 4: Viewer** - `share_mode: READ_ONLY` + `content_share_mode: READ_ONLY` = View-only access to collection and contents + * @param shareMetadataRequest + */ + shareMetadata(shareMetadataRequest, _options) { + return __async(this, null, function* () { + var _a, _b, _c; + let _config = _options || this.configuration; + if (shareMetadataRequest === null || shareMetadataRequest === void 0) { + throw new RequiredError("SecurityApi", "shareMetadata", "shareMetadataRequest"); + } + const localVarPath = "/api/rest/2.0/security/metadata/share"; + const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.25.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.25.0"); + const contentType = ObjectSerializer.getPreferredMediaType([ + "application/json" + ]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = ObjectSerializer.stringify( + ObjectSerializer.serialize(shareMetadataRequest, "ShareMetadataRequest", ""), + contentType + ); + requestContext.setBody(serializedBody); + let authMethod; + authMethod = _config.authMethods["bearerAuth"]; + if (authMethod == null ? void 0 : authMethod.applySecurityAuthentication) { + yield authMethod == null ? void 0 : authMethod.applySecurityAuthentication(requestContext); + } + const defaultAuth = ((_a = _options == null ? void 0 : _options.authMethods) == null ? void 0 : _a.default) || ((_c = (_b = this.configuration) == null ? void 0 : _b.authMethods) == null ? void 0 : _c.default); + if (defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication) { + yield defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication(requestContext); + } + return requestContext; + }); + } + /** + * Version: 26.5.0.cl or later Allows unpublishing metadata objects from organizations in ThoughtSpot. Requires ADMINISTRATION role and TENANT scope. The API endpoint allows unpublishing the following types of metadata objects: * Liveboards * Answers * Logical Tables When unpublishing objects, you can: * Include dependencies by setting `include_dependencies` to true - this will unpublish all dependent objects if no other published object is using them * Force unpublish by setting `force` to true - this will break all dependent objects in the unpublished organizations + * @param unpublishMetadataRequest + */ + unpublishMetadata(unpublishMetadataRequest, _options) { + return __async(this, null, function* () { + var _a, _b, _c; + let _config = _options || this.configuration; + if (unpublishMetadataRequest === null || unpublishMetadataRequest === void 0) { + throw new RequiredError("SecurityApi", "unpublishMetadata", "unpublishMetadataRequest"); + } + const localVarPath = "/api/rest/2.0/security/metadata/unpublish"; + const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.25.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.25.0"); + const contentType = ObjectSerializer.getPreferredMediaType([ + "application/json" + ]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = ObjectSerializer.stringify( + ObjectSerializer.serialize(unpublishMetadataRequest, "UnpublishMetadataRequest", ""), + contentType + ); + requestContext.setBody(serializedBody); + let authMethod; + authMethod = _config.authMethods["bearerAuth"]; + if (authMethod == null ? void 0 : authMethod.applySecurityAuthentication) { + yield authMethod == null ? void 0 : authMethod.applySecurityAuthentication(requestContext); + } + const defaultAuth = ((_a = _options == null ? void 0 : _options.authMethods) == null ? void 0 : _a.default) || ((_c = (_b = this.configuration) == null ? void 0 : _b.authMethods) == null ? void 0 : _c.default); + if (defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication) { + yield defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication(requestContext); + } + return requestContext; + }); + } + /** + * Version: 10.12.0.cl or later Creates, updates, or deletes column security rules for specified tables. This API endpoint allows you to create, update, or delete column-level security rules on columns of a table. The operation follows an \"all or none\" policy: if defining security rules for any of the provided columns fails, the entire operation will be rolled back, and no rules will be created. #### Usage guidelines - Provide table identifier using either `identifier` (GUID or name) or `obj_identifier` (object ID) - Use `clear_csr: true` to remove all column security rules from the table - For each column, specify the security rule using `column_security_rules` array - Use `is_unsecured: true` to mark a specific column as unprotected - Use `group_access` operations to manage group associations: - `ADD`: Add groups to the column\'s access list - `REMOVE`: Remove groups from the column\'s access list - `REPLACE`: Replace all existing groups with the specified groups #### Required permissions - `ADMINISTRATION` - Can administer ThoughtSpot - `DATAMANAGEMENT` - Can manage data (if RBAC is disabled) - `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` - Can manage worksheet views and tables (if RBAC is enabled) #### Example request ```json { \"identifier\": \"table-guid\", \"obj_identifier\": \"table-object-id\", \"clear_csr\": false, \"column_security_rules\": [ { \"column_identifier\": \"col id or col name\", \"is_unsecured\": false, \"group_access\": [ { \"operation\": \"ADD\", \"group_identifiers\": [\"hr_group_id\", \"hr_group_name\", \"finance_group_id\"] } ] }, { \"column_identifier\": \"col id or col name\", \"is_unsecured\": true }, { \"column_identifier\": \"col id or col name\", \"is_unsecured\": false, \"group_access\": [ { \"operation\": \"REPLACE\", \"group_identifiers\": [\"management_group_id\", \"management_group_name\"] } ] } ] } ``` #### Request Body Schema - `identifier` (string, optional): GUID or name of the table for which we want to create column security rules - `obj_identifier` (string, optional): The object ID of the table - `clear_csr` (boolean, optional): If true, then all the secured columns will be marked as unprotected, and all the group associations will be removed - `column_security_rules` (array of objects, required): An array where each object defines the security rule for a specific column Each column security rule object contains: - `column_identifier` (string, required): Column identifier (col_id or name) - `is_unsecured` (boolean, optional): If true, the column will be marked as unprotected and all groups associated with it will be removed - `group_access` (array of objects, optional): Array of group operation objects Each group operation object contains: - `operation` (string, required): Operation type - ADD, REMOVE, or REPLACE - `group_identifiers` (array of strings, required): Array of group identifiers (name or GUID) on which the operation will be performed #### Response This API does not return any response body. A successful operation returns HTTP 200 status code. #### Operation Types - **ADD**: Adds the specified groups to the column\'s access list - **REMOVE**: Removes the specified groups from the column\'s access list - **REPLACE**: Replaces all existing groups with the specified groups + * @param updateColumnSecurityRulesRequest + */ + updateColumnSecurityRules(updateColumnSecurityRulesRequest, _options) { + return __async(this, null, function* () { + var _a, _b, _c; + let _config = _options || this.configuration; + if (updateColumnSecurityRulesRequest === null || updateColumnSecurityRulesRequest === void 0) { + throw new RequiredError("SecurityApi", "updateColumnSecurityRules", "updateColumnSecurityRulesRequest"); + } + const localVarPath = "/api/rest/2.0/security/column/rules/update"; + const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.25.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.25.0"); + const contentType = ObjectSerializer.getPreferredMediaType([ + "application/json" + ]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = ObjectSerializer.stringify( + ObjectSerializer.serialize(updateColumnSecurityRulesRequest, "UpdateColumnSecurityRulesRequest", ""), + contentType + ); + requestContext.setBody(serializedBody); + let authMethod; + authMethod = _config.authMethods["bearerAuth"]; + if (authMethod == null ? void 0 : authMethod.applySecurityAuthentication) { + yield authMethod == null ? void 0 : authMethod.applySecurityAuthentication(requestContext); + } + const defaultAuth = ((_a = _options == null ? void 0 : _options.authMethods) == null ? void 0 : _a.default) || ((_c = (_b = this.configuration) == null ? void 0 : _b.authMethods) == null ? void 0 : _c.default); + if (defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication) { + yield defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication(requestContext); + } + return requestContext; + }); + } +}; +var SecurityApiResponseProcessor = class { + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to assignChangeAuthor + * @throws ApiException if the response code was not in [200, 299] + */ + assignChangeAuthor(response) { + return __async(this, null, function* () { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("204", response.httpStatusCode)) { + return; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Invalid request.", body, response.headers); + } + if (isCodeInRange("401", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unexpected error", body, response.headers); + } + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "void", + "" + ); + return body; + } + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", yield response.getBodyAsAny(), response.headers); + }); + } + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to fetchColumnSecurityRules + * @throws ApiException if the response code was not in [200, 299] + */ + fetchColumnSecurityRules(response) { + return __async(this, null, function* () { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("200", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "Array", + "" + ); + return body; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Bad request - Table not found or invalid parameters", body, response.headers); + } + if (isCodeInRange("401", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Forbidden - User doesn't have permission to access security rules for this table", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Internal server error", body, response.headers); + } + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "Array", + "" + ); + return body; + } + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", yield response.getBodyAsAny(), response.headers); + }); + } + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to fetchObjectPrivileges + * @throws ApiException if the response code was not in [200, 299] + */ + fetchObjectPrivileges(response) { + return __async(this, null, function* () { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("200", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ObjectPrivilegesOfMetadataResponse", + "" + ); + return body; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Invalid request.", body, response.headers); + } + if (isCodeInRange("401", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unexpected error", body, response.headers); + } + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ObjectPrivilegesOfMetadataResponse", + "" + ); + return body; + } + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", yield response.getBodyAsAny(), response.headers); + }); + } + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to fetchPermissionsOfPrincipals + * @throws ApiException if the response code was not in [200, 299] + */ + fetchPermissionsOfPrincipals(response) { + return __async(this, null, function* () { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("200", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "PermissionOfPrincipalsResponse", + "" + ); + return body; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Invalid request.", body, response.headers); + } + if (isCodeInRange("401", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unexpected error", body, response.headers); + } + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "PermissionOfPrincipalsResponse", + "" + ); + return body; + } + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", yield response.getBodyAsAny(), response.headers); + }); + } + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to fetchPermissionsOnMetadata + * @throws ApiException if the response code was not in [200, 299] + */ + fetchPermissionsOnMetadata(response) { + return __async(this, null, function* () { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("200", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "PermissionOfMetadataResponse", + "" + ); + return body; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Invalid request.", body, response.headers); + } + if (isCodeInRange("401", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unexpected error", body, response.headers); + } + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "PermissionOfMetadataResponse", + "" + ); + return body; + } + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", yield response.getBodyAsAny(), response.headers); + }); + } + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to manageObjectPrivilege + * @throws ApiException if the response code was not in [200, 299] + */ + manageObjectPrivilege(response) { + return __async(this, null, function* () { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("204", response.httpStatusCode)) { + return; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Invalid request", body, response.headers); + } + if (isCodeInRange("401", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unauthorized access", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Forbidden access", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unexpected error", body, response.headers); + } + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "void", + "" + ); + return body; + } + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", yield response.getBodyAsAny(), response.headers); + }); + } + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to publishMetadata + * @throws ApiException if the response code was not in [200, 299] + */ + publishMetadata(response) { + return __async(this, null, function* () { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("204", response.httpStatusCode)) { + return; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Invalid request.", body, response.headers); + } + if (isCodeInRange("401", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unexpected error", body, response.headers); + } + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "void", + "" + ); + return body; + } + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", yield response.getBodyAsAny(), response.headers); + }); + } + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to shareMetadata + * @throws ApiException if the response code was not in [200, 299] + */ + shareMetadata(response) { + return __async(this, null, function* () { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("204", response.httpStatusCode)) { + return; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Invalid request.", body, response.headers); + } + if (isCodeInRange("401", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unexpected error", body, response.headers); + } + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "void", + "" + ); + return body; + } + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", yield response.getBodyAsAny(), response.headers); + }); + } + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to unpublishMetadata + * @throws ApiException if the response code was not in [200, 299] + */ + unpublishMetadata(response) { + return __async(this, null, function* () { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("204", response.httpStatusCode)) { + return; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Invalid request.", body, response.headers); + } + if (isCodeInRange("401", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unexpected error", body, response.headers); + } + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "void", + "" + ); + return body; + } + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", yield response.getBodyAsAny(), response.headers); + }); + } + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to updateColumnSecurityRules + * @throws ApiException if the response code was not in [200, 299] + */ + updateColumnSecurityRules(response) { + return __async(this, null, function* () { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("204", response.httpStatusCode)) { + return; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Bad request - Invalid parameters or table not found", body, response.headers); + } + if (isCodeInRange("401", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Forbidden - User doesn't have permission to modify security rules for this table", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Internal server error", body, response.headers); + } + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "void", + "" + ); + return body; + } + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", yield response.getBodyAsAny(), response.headers); + }); + } +}; + +// apis/SystemApi.ts +var SystemApiRequestFactory = class extends BaseAPIRequestFactory { + /** + * Version: 10.14.0.cl or later Configure communication channel preferences. - Use `cluster_preferences` to update the default preferences for your ThoughtSpot application instance. - If your instance has [Orgs](https://docs.thoughtspot.com/cloud/latest/orgs-overview), use `org_preferences` to specify Org-specific preferences that override the defaults. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) or `DEVELOPER` (**Has developer privilege**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, users with `APPLICATION_ADMINISTRATION` (**Can manage application settings**) privilege are also authorized to perform this action. + * @param configureCommunicationChannelPreferencesRequest + */ + configureCommunicationChannelPreferences(configureCommunicationChannelPreferencesRequest, _options) { + return __async(this, null, function* () { + var _a, _b, _c; + let _config = _options || this.configuration; + if (configureCommunicationChannelPreferencesRequest === null || configureCommunicationChannelPreferencesRequest === void 0) { + throw new RequiredError("SystemApi", "configureCommunicationChannelPreferences", "configureCommunicationChannelPreferencesRequest"); + } + const localVarPath = "/api/rest/2.0/system/preferences/communication-channels/configure"; + const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.25.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.25.0"); + const contentType = ObjectSerializer.getPreferredMediaType([ + "application/json" + ]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = ObjectSerializer.stringify( + ObjectSerializer.serialize(configureCommunicationChannelPreferencesRequest, "ConfigureCommunicationChannelPreferencesRequest", ""), + contentType + ); + requestContext.setBody(serializedBody); + let authMethod; + authMethod = _config.authMethods["bearerAuth"]; + if (authMethod == null ? void 0 : authMethod.applySecurityAuthentication) { + yield authMethod == null ? void 0 : authMethod.applySecurityAuthentication(requestContext); + } + const defaultAuth = ((_a = _options == null ? void 0 : _options.authMethods) == null ? void 0 : _a.default) || ((_c = (_b = this.configuration) == null ? void 0 : _b.authMethods) == null ? void 0 : _c.default); + if (defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication) { + yield defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication(requestContext); + } + return requestContext; + }); + } + /** + * Version: 26.2.0.cl or later Configure security settings for your ThoughtSpot application instance. - Use `cluster_preferences` to update cluster-level security settings including CORS whitelisted URLs, CSP settings, SAML redirect URLs, partitioned cookies, and non-embed access configuration. - Use `org_preferences` to configure Org-specific security settings. If your instance has [Orgs](https://docs.thoughtspot.com/cloud/latest/orgs-overview), this allows configuring CORS and non-embed access settings specific to the Org. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) or `DEVELOPER` (**Has developer privilege**) privilege. Cluster-level SAML and script-src settings require `ADMINISTRATION` privilege. See [Security Settings](https://developers.thoughtspot.com/docs/security-settings) for more details. + * @param configureSecuritySettingsRequest + */ + configureSecuritySettings(configureSecuritySettingsRequest, _options) { + return __async(this, null, function* () { + var _a, _b, _c; + let _config = _options || this.configuration; + if (configureSecuritySettingsRequest === null || configureSecuritySettingsRequest === void 0) { + throw new RequiredError("SystemApi", "configureSecuritySettings", "configureSecuritySettingsRequest"); + } + const localVarPath = "/api/rest/2.0/system/security-settings/configure"; + const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.25.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.25.0"); + const contentType = ObjectSerializer.getPreferredMediaType([ + "application/json" + ]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = ObjectSerializer.stringify( + ObjectSerializer.serialize(configureSecuritySettingsRequest, "ConfigureSecuritySettingsRequest", ""), + contentType + ); + requestContext.setBody(serializedBody); + let authMethod; + authMethod = _config.authMethods["bearerAuth"]; + if (authMethod == null ? void 0 : authMethod.applySecurityAuthentication) { + yield authMethod == null ? void 0 : authMethod.applySecurityAuthentication(requestContext); + } + const defaultAuth = ((_a = _options == null ? void 0 : _options.authMethods) == null ? void 0 : _a.default) || ((_c = (_b = this.configuration) == null ? void 0 : _b.authMethods) == null ? void 0 : _c.default); + if (defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication) { + yield defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication(requestContext); + } + return requestContext; + }); + } + /** + * Version: 9.0.0.cl or later Retrieves the current configuration details of the cluster. If the request is successful, the API returns a list configuration settings applied on the cluster. Requires `ADMINISTRATION`(**Can administer ThoughtSpot**) privilege to view these complete configuration settings of the cluster. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `SYSTEM_INFO_ADMINISTRATION` (**Can view system activities**) privilege is required. This API does not require any parameters to be passed in the request. + */ + getSystemConfig(_options) { + return __async(this, null, function* () { + var _a, _b, _c; + let _config = _options || this.configuration; + const localVarPath = "/api/rest/2.0/system/config"; + const requestContext = _config.baseServer.makeRequestContext(localVarPath, "GET" /* GET */); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.25.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.25.0"); + let authMethod; + authMethod = _config.authMethods["bearerAuth"]; + if (authMethod == null ? void 0 : authMethod.applySecurityAuthentication) { + yield authMethod == null ? void 0 : authMethod.applySecurityAuthentication(requestContext); + } + const defaultAuth = ((_a = _options == null ? void 0 : _options.authMethods) == null ? void 0 : _a.default) || ((_c = (_b = this.configuration) == null ? void 0 : _b.authMethods) == null ? void 0 : _c.default); + if (defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication) { + yield defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication(requestContext); + } + return requestContext; + }); + } + /** + * Version: 9.0.0.cl or later Gets system information such as the release version, locale, time zone, deployment environment, date format, and date time format of the cluster. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privileges. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `SYSTEM_INFO_ADMINISTRATION` (**Can view system activities**) privilege is required. This API does not require any parameters to be passed in the request. + */ + getSystemInformation(_options) { + return __async(this, null, function* () { + var _a, _b, _c; + let _config = _options || this.configuration; + const localVarPath = "/api/rest/2.0/system"; + const requestContext = _config.baseServer.makeRequestContext(localVarPath, "GET" /* GET */); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.25.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.25.0"); + let authMethod; + authMethod = _config.authMethods["bearerAuth"]; + if (authMethod == null ? void 0 : authMethod.applySecurityAuthentication) { + yield authMethod == null ? void 0 : authMethod.applySecurityAuthentication(requestContext); + } + const defaultAuth = ((_a = _options == null ? void 0 : _options.authMethods) == null ? void 0 : _a.default) || ((_c = (_b = this.configuration) == null ? void 0 : _b.authMethods) == null ? void 0 : _c.default); + if (defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication) { + yield defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication(requestContext); + } + return requestContext; + }); + } + /** + * Version: 9.2.0.cl or later Gets a list of configuration overrides applied on the cluster. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `APPLICATION_ADMINISTRATION` (**Can manage application settings**) privilege is required. This API does not require any parameters to be passed in the request. + */ + getSystemOverrideInfo(_options) { + return __async(this, null, function* () { + var _a, _b, _c; + let _config = _options || this.configuration; + const localVarPath = "/api/rest/2.0/system/config-overrides"; + const requestContext = _config.baseServer.makeRequestContext(localVarPath, "GET" /* GET */); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.25.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.25.0"); + let authMethod; + authMethod = _config.authMethods["bearerAuth"]; + if (authMethod == null ? void 0 : authMethod.applySecurityAuthentication) { + yield authMethod == null ? void 0 : authMethod.applySecurityAuthentication(requestContext); + } + const defaultAuth = ((_a = _options == null ? void 0 : _options.authMethods) == null ? void 0 : _a.default) || ((_c = (_b = this.configuration) == null ? void 0 : _b.authMethods) == null ? void 0 : _c.default); + if (defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication) { + yield defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication(requestContext); + } + return requestContext; + }); + } + /** + * Version: 10.14.0.cl or later Fetch communication channel preferences. - Use `cluster_preferences` to fetch the default preferences for your ThoughtSpot application instance. - If your instance has [Orgs](https://docs.thoughtspot.com/cloud/latest/orgs-overview), use `org_preferences` to fetch any Org-specific preferences that override the defaults. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) or `DEVELOPER` (**Has developer privilege**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, users with `APPLICATION_ADMINISTRATION` (**Can manage application settings**) privilege are also authorized to perform this action. + * @param searchCommunicationChannelPreferencesRequest + */ + searchCommunicationChannelPreferences(searchCommunicationChannelPreferencesRequest, _options) { + return __async(this, null, function* () { + var _a, _b, _c; + let _config = _options || this.configuration; + if (searchCommunicationChannelPreferencesRequest === null || searchCommunicationChannelPreferencesRequest === void 0) { + throw new RequiredError("SystemApi", "searchCommunicationChannelPreferences", "searchCommunicationChannelPreferencesRequest"); + } + const localVarPath = "/api/rest/2.0/system/preferences/communication-channels/search"; + const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.25.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.25.0"); + const contentType = ObjectSerializer.getPreferredMediaType([ + "application/json" + ]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = ObjectSerializer.stringify( + ObjectSerializer.serialize(searchCommunicationChannelPreferencesRequest, "SearchCommunicationChannelPreferencesRequest", ""), + contentType + ); + requestContext.setBody(serializedBody); + let authMethod; + authMethod = _config.authMethods["bearerAuth"]; + if (authMethod == null ? void 0 : authMethod.applySecurityAuthentication) { + yield authMethod == null ? void 0 : authMethod.applySecurityAuthentication(requestContext); + } + const defaultAuth = ((_a = _options == null ? void 0 : _options.authMethods) == null ? void 0 : _a.default) || ((_c = (_b = this.configuration) == null ? void 0 : _b.authMethods) == null ? void 0 : _c.default); + if (defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication) { + yield defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication(requestContext); + } + return requestContext; + }); + } + /** + * Version: 26.2.0.cl or later Fetch security settings for your ThoughtSpot application instance. - Use `scope: CLUSTER` to retrieve cluster-level security settings, including CORS and CSP allowlists, SAML redirect URLs, and settings that control access to non-embedded pages. - Use `scope: ORG` to retrieve Org-level security settings. If your instance has [Orgs](https://docs.thoughtspot.com/cloud/latest/orgs-overview), this returns CORS and non-embed access settings specific to the Org. - If `scope` is not specified, returns both cluster and Org-specific settings based on user privileges. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) or `DEVELOPER` (**Has developer privilege**) privilege. See [Security Settings](https://developers.thoughtspot.com/docs/security-settings) for more details. + * @param searchSecuritySettingsRequest + */ + searchSecuritySettings(searchSecuritySettingsRequest, _options) { + return __async(this, null, function* () { + var _a, _b, _c; + let _config = _options || this.configuration; + if (searchSecuritySettingsRequest === null || searchSecuritySettingsRequest === void 0) { + throw new RequiredError("SystemApi", "searchSecuritySettings", "searchSecuritySettingsRequest"); + } + const localVarPath = "/api/rest/2.0/system/security-settings/search"; + const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.25.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.25.0"); + const contentType = ObjectSerializer.getPreferredMediaType([ + "application/json" + ]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = ObjectSerializer.stringify( + ObjectSerializer.serialize(searchSecuritySettingsRequest, "SearchSecuritySettingsRequest", ""), + contentType + ); + requestContext.setBody(serializedBody); + let authMethod; + authMethod = _config.authMethods["bearerAuth"]; + if (authMethod == null ? void 0 : authMethod.applySecurityAuthentication) { + yield authMethod == null ? void 0 : authMethod.applySecurityAuthentication(requestContext); + } + const defaultAuth = ((_a = _options == null ? void 0 : _options.authMethods) == null ? void 0 : _a.default) || ((_c = (_b = this.configuration) == null ? void 0 : _b.authMethods) == null ? void 0 : _c.default); + if (defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication) { + yield defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication(requestContext); + } + return requestContext; + }); + } + /** + * Version: 9.2.0.cl or later Updates the current configuration of the cluster. You must send the configuration data in JSON format. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privileges. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `APPLICATION_ADMINISTRATION` (**Can manage application settings**) privilege is required. + * @param updateSystemConfigRequest + */ + updateSystemConfig(updateSystemConfigRequest, _options) { + return __async(this, null, function* () { + var _a, _b, _c; + let _config = _options || this.configuration; + if (updateSystemConfigRequest === null || updateSystemConfigRequest === void 0) { + throw new RequiredError("SystemApi", "updateSystemConfig", "updateSystemConfigRequest"); + } + const localVarPath = "/api/rest/2.0/system/config-update"; + const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.25.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.25.0"); + const contentType = ObjectSerializer.getPreferredMediaType([ + "application/json" + ]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = ObjectSerializer.stringify( + ObjectSerializer.serialize(updateSystemConfigRequest, "UpdateSystemConfigRequest", ""), + contentType + ); + requestContext.setBody(serializedBody); + let authMethod; + authMethod = _config.authMethods["bearerAuth"]; + if (authMethod == null ? void 0 : authMethod.applySecurityAuthentication) { + yield authMethod == null ? void 0 : authMethod.applySecurityAuthentication(requestContext); + } + const defaultAuth = ((_a = _options == null ? void 0 : _options.authMethods) == null ? void 0 : _a.default) || ((_c = (_b = this.configuration) == null ? void 0 : _b.authMethods) == null ? void 0 : _c.default); + if (defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication) { + yield defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication(requestContext); + } + return requestContext; + }); + } + /** + * Version: 26.4.0.cl or later Validates a communication channel configuration to ensure it is properly set up and can receive events. - Use `channel_type` to specify the type of communication channel to validate (e.g., WEBHOOK). - Use `channel_identifier` to provide the unique identifier or name for the communication channel. - Use `event_type` to specify the event type to validate for this channel. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) or `DEVELOPER` (**Has developer privilege**) privilege. For webhook channels, users with `CAN_MANAGE_WEBHOOKS` (**Can manage webhooks**) privilege are also authorized to perform this action. + * @param validateCommunicationChannelRequest + */ + validateCommunicationChannel(validateCommunicationChannelRequest, _options) { + return __async(this, null, function* () { + var _a, _b, _c; + let _config = _options || this.configuration; + if (validateCommunicationChannelRequest === null || validateCommunicationChannelRequest === void 0) { + throw new RequiredError("SystemApi", "validateCommunicationChannel", "validateCommunicationChannelRequest"); + } + const localVarPath = "/api/rest/2.0/system/communication-channels/validate"; + const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.25.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.25.0"); + const contentType = ObjectSerializer.getPreferredMediaType([ + "application/json" + ]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = ObjectSerializer.stringify( + ObjectSerializer.serialize(validateCommunicationChannelRequest, "ValidateCommunicationChannelRequest", ""), + contentType + ); + requestContext.setBody(serializedBody); + let authMethod; + authMethod = _config.authMethods["bearerAuth"]; + if (authMethod == null ? void 0 : authMethod.applySecurityAuthentication) { + yield authMethod == null ? void 0 : authMethod.applySecurityAuthentication(requestContext); + } + const defaultAuth = ((_a = _options == null ? void 0 : _options.authMethods) == null ? void 0 : _a.default) || ((_c = (_b = this.configuration) == null ? void 0 : _b.authMethods) == null ? void 0 : _c.default); + if (defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication) { + yield defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication(requestContext); + } + return requestContext; + }); + } +}; +var SystemApiResponseProcessor = class { + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to configureCommunicationChannelPreferences + * @throws ApiException if the response code was not in [200, 299] + */ + configureCommunicationChannelPreferences(response) { + return __async(this, null, function* () { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("204", response.httpStatusCode)) { + return; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Invalid request.", body, response.headers); + } + if (isCodeInRange("401", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unexpected error", body, response.headers); + } + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "void", + "" + ); + return body; + } + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", yield response.getBodyAsAny(), response.headers); + }); + } + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to configureSecuritySettings + * @throws ApiException if the response code was not in [200, 299] + */ + configureSecuritySettings(response) { + return __async(this, null, function* () { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("204", response.httpStatusCode)) { + return; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Invalid request.", body, response.headers); + } + if (isCodeInRange("401", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unexpected error", body, response.headers); + } + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "void", + "" + ); + return body; + } + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", yield response.getBodyAsAny(), response.headers); + }); + } + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to getSystemConfig + * @throws ApiException if the response code was not in [200, 299] + */ + getSystemConfig(response) { + return __async(this, null, function* () { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("200", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "SystemConfig", + "" + ); + return body; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Invalid request.", body, response.headers); + } + if (isCodeInRange("401", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unexpected error", body, response.headers); + } + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "SystemConfig", + "" + ); + return body; + } + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", yield response.getBodyAsAny(), response.headers); + }); + } + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to getSystemInformation + * @throws ApiException if the response code was not in [200, 299] + */ + getSystemInformation(response) { + return __async(this, null, function* () { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("200", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "SystemInfo", + "" + ); + return body; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Invalid request.", body, response.headers); + } + if (isCodeInRange("401", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unexpected error", body, response.headers); + } + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "SystemInfo", + "" + ); + return body; + } + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", yield response.getBodyAsAny(), response.headers); + }); + } + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to getSystemOverrideInfo + * @throws ApiException if the response code was not in [200, 299] + */ + getSystemOverrideInfo(response) { + return __async(this, null, function* () { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("200", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "SystemOverrideInfo", + "" + ); + return body; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Invalid request.", body, response.headers); + } + if (isCodeInRange("401", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unexpected error", body, response.headers); + } + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "SystemOverrideInfo", + "" + ); + return body; + } + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", yield response.getBodyAsAny(), response.headers); + }); + } + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to searchCommunicationChannelPreferences + * @throws ApiException if the response code was not in [200, 299] + */ + searchCommunicationChannelPreferences(response) { + return __async(this, null, function* () { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("200", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "CommunicationChannelPreferencesResponse", + "" + ); + return body; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Invalid request.", body, response.headers); + } + if (isCodeInRange("401", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unexpected error", body, response.headers); + } + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "CommunicationChannelPreferencesResponse", + "" + ); + return body; + } + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", yield response.getBodyAsAny(), response.headers); + }); + } + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to searchSecuritySettings + * @throws ApiException if the response code was not in [200, 299] + */ + searchSecuritySettings(response) { + return __async(this, null, function* () { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("200", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "SecuritySettingsResponse", + "" + ); + return body; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Invalid request.", body, response.headers); + } + if (isCodeInRange("401", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unexpected error", body, response.headers); + } + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "SecuritySettingsResponse", + "" + ); + return body; + } + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", yield response.getBodyAsAny(), response.headers); + }); + } + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to updateSystemConfig + * @throws ApiException if the response code was not in [200, 299] + */ + updateSystemConfig(response) { + return __async(this, null, function* () { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("204", response.httpStatusCode)) { + return; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Invalid request.", body, response.headers); + } + if (isCodeInRange("401", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unexpected error", body, response.headers); + } + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "void", + "" + ); + return body; + } + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", yield response.getBodyAsAny(), response.headers); + }); + } + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to validateCommunicationChannel + * @throws ApiException if the response code was not in [200, 299] + */ + validateCommunicationChannel(response) { + return __async(this, null, function* () { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("200", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "CommunicationChannelValidateResponse", + "" + ); + return body; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Invalid request.", body, response.headers); + } + if (isCodeInRange("401", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unexpected error", body, response.headers); + } + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "CommunicationChannelValidateResponse", + "" + ); + return body; + } + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", yield response.getBodyAsAny(), response.headers); + }); + } +}; + +// apis/TagsApi.ts +var TagsApiRequestFactory = class extends BaseAPIRequestFactory { + /** + * Version: 9.0.0.cl or later Assigns tags to Liveboards, Answers, Tables, and Worksheets. Requires edit access to the metadata object. + * @param assignTagRequest + */ + assignTag(assignTagRequest, _options) { + return __async(this, null, function* () { + var _a, _b, _c; + let _config = _options || this.configuration; + if (assignTagRequest === null || assignTagRequest === void 0) { + throw new RequiredError("TagsApi", "assignTag", "assignTagRequest"); + } + const localVarPath = "/api/rest/2.0/tags/assign"; + const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.25.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.25.0"); + const contentType = ObjectSerializer.getPreferredMediaType([ + "application/json" + ]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = ObjectSerializer.stringify( + ObjectSerializer.serialize(assignTagRequest, "AssignTagRequest", ""), + contentType + ); + requestContext.setBody(serializedBody); + let authMethod; + authMethod = _config.authMethods["bearerAuth"]; + if (authMethod == null ? void 0 : authMethod.applySecurityAuthentication) { + yield authMethod == null ? void 0 : authMethod.applySecurityAuthentication(requestContext); + } + const defaultAuth = ((_a = _options == null ? void 0 : _options.authMethods) == null ? void 0 : _a.default) || ((_c = (_b = this.configuration) == null ? void 0 : _b.authMethods) == null ? void 0 : _c.default); + if (defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication) { + yield defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication(requestContext); + } + return requestContext; + }); + } + /** + * Version: 9.0.0.cl or later Creates a tag object. Tags are labels that identify a metadata object. For example, you can create a tag to designate subject areas, such as sales, HR, marketing, and finance. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `TAGMANAGEMENT` (**Can manage tags**) privilege is required to create, edit, and delete tags. + * @param createTagRequest + */ + createTag(createTagRequest, _options) { + return __async(this, null, function* () { + var _a, _b, _c; + let _config = _options || this.configuration; + if (createTagRequest === null || createTagRequest === void 0) { + throw new RequiredError("TagsApi", "createTag", "createTagRequest"); + } + const localVarPath = "/api/rest/2.0/tags/create"; + const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.25.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.25.0"); + const contentType = ObjectSerializer.getPreferredMediaType([ + "application/json" + ]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = ObjectSerializer.stringify( + ObjectSerializer.serialize(createTagRequest, "CreateTagRequest", ""), + contentType + ); + requestContext.setBody(serializedBody); + let authMethod; + authMethod = _config.authMethods["bearerAuth"]; + if (authMethod == null ? void 0 : authMethod.applySecurityAuthentication) { + yield authMethod == null ? void 0 : authMethod.applySecurityAuthentication(requestContext); + } + const defaultAuth = ((_a = _options == null ? void 0 : _options.authMethods) == null ? void 0 : _a.default) || ((_c = (_b = this.configuration) == null ? void 0 : _b.authMethods) == null ? void 0 : _c.default); + if (defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication) { + yield defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication(requestContext); + } + return requestContext; + }); + } + /** + * Version: 9.0.0.cl or later Deletes a tag object from the ThoughtSpot system Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `TAGMANAGEMENT` (**Can manage tags**) privilege is required to create, edit, and delete tags. + * @param tagIdentifier Tag identifier Tag name or Tag id. + */ + deleteTag(tagIdentifier, _options) { + return __async(this, null, function* () { + var _a, _b, _c; + let _config = _options || this.configuration; + if (tagIdentifier === null || tagIdentifier === void 0) { + throw new RequiredError("TagsApi", "deleteTag", "tagIdentifier"); + } + const localVarPath = "/api/rest/2.0/tags/{tag_identifier}/delete".replace("{tag_identifier}", encodeURIComponent(String(tagIdentifier))); + const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.25.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.25.0"); + let authMethod; + authMethod = _config.authMethods["bearerAuth"]; + if (authMethod == null ? void 0 : authMethod.applySecurityAuthentication) { + yield authMethod == null ? void 0 : authMethod.applySecurityAuthentication(requestContext); + } + const defaultAuth = ((_a = _options == null ? void 0 : _options.authMethods) == null ? void 0 : _a.default) || ((_c = (_b = this.configuration) == null ? void 0 : _b.authMethods) == null ? void 0 : _c.default); + if (defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication) { + yield defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication(requestContext); + } + return requestContext; + }); + } + /** + * Version: 9.0.0.cl or later Gets a list of tag objects available on the ThoughtSpot system. To get details of a specific tag object, specify the GUID or name. Any authenticated user can search for tag objects. + * @param searchTagsRequest + */ + searchTags(searchTagsRequest, _options) { + return __async(this, null, function* () { + var _a, _b, _c; + let _config = _options || this.configuration; + if (searchTagsRequest === null || searchTagsRequest === void 0) { + throw new RequiredError("TagsApi", "searchTags", "searchTagsRequest"); + } + const localVarPath = "/api/rest/2.0/tags/search"; + const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.25.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.25.0"); + const contentType = ObjectSerializer.getPreferredMediaType([ + "application/json" + ]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = ObjectSerializer.stringify( + ObjectSerializer.serialize(searchTagsRequest, "SearchTagsRequest", ""), + contentType + ); + requestContext.setBody(serializedBody); + let authMethod; + authMethod = _config.authMethods["bearerAuth"]; + if (authMethod == null ? void 0 : authMethod.applySecurityAuthentication) { + yield authMethod == null ? void 0 : authMethod.applySecurityAuthentication(requestContext); + } + const defaultAuth = ((_a = _options == null ? void 0 : _options.authMethods) == null ? void 0 : _a.default) || ((_c = (_b = this.configuration) == null ? void 0 : _b.authMethods) == null ? void 0 : _c.default); + if (defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication) { + yield defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication(requestContext); + } + return requestContext; + }); + } + /** + * Version: 9.0.0.cl or later Removes the tags applied to a Liveboard, Answer, Table, or Worksheet. Requires edit access to the metadata object. + * @param unassignTagRequest + */ + unassignTag(unassignTagRequest, _options) { + return __async(this, null, function* () { + var _a, _b, _c; + let _config = _options || this.configuration; + if (unassignTagRequest === null || unassignTagRequest === void 0) { + throw new RequiredError("TagsApi", "unassignTag", "unassignTagRequest"); + } + const localVarPath = "/api/rest/2.0/tags/unassign"; + const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.25.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.25.0"); + const contentType = ObjectSerializer.getPreferredMediaType([ + "application/json" + ]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = ObjectSerializer.stringify( + ObjectSerializer.serialize(unassignTagRequest, "UnassignTagRequest", ""), + contentType + ); + requestContext.setBody(serializedBody); + let authMethod; + authMethod = _config.authMethods["bearerAuth"]; + if (authMethod == null ? void 0 : authMethod.applySecurityAuthentication) { + yield authMethod == null ? void 0 : authMethod.applySecurityAuthentication(requestContext); + } + const defaultAuth = ((_a = _options == null ? void 0 : _options.authMethods) == null ? void 0 : _a.default) || ((_c = (_b = this.configuration) == null ? void 0 : _b.authMethods) == null ? void 0 : _c.default); + if (defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication) { + yield defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication(requestContext); + } + return requestContext; + }); + } + /** + * Version: 9.0.0.cl or later Updates a tag object. You can modify the `name` and `color` properties of a tag object. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `TAGMANAGEMENT` (**Can manage tags**) privilege is required to create, edit, and delete tags. + * @param tagIdentifier Name or Id of the tag. + * @param updateTagRequest + */ + updateTag(tagIdentifier, updateTagRequest, _options) { + return __async(this, null, function* () { + var _a, _b, _c; + let _config = _options || this.configuration; + if (tagIdentifier === null || tagIdentifier === void 0) { + throw new RequiredError("TagsApi", "updateTag", "tagIdentifier"); + } + if (updateTagRequest === null || updateTagRequest === void 0) { + throw new RequiredError("TagsApi", "updateTag", "updateTagRequest"); + } + const localVarPath = "/api/rest/2.0/tags/{tag_identifier}/update".replace("{tag_identifier}", encodeURIComponent(String(tagIdentifier))); + const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.25.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.25.0"); + const contentType = ObjectSerializer.getPreferredMediaType([ + "application/json" + ]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = ObjectSerializer.stringify( + ObjectSerializer.serialize(updateTagRequest, "UpdateTagRequest", ""), + contentType + ); + requestContext.setBody(serializedBody); + let authMethod; + authMethod = _config.authMethods["bearerAuth"]; + if (authMethod == null ? void 0 : authMethod.applySecurityAuthentication) { + yield authMethod == null ? void 0 : authMethod.applySecurityAuthentication(requestContext); + } + const defaultAuth = ((_a = _options == null ? void 0 : _options.authMethods) == null ? void 0 : _a.default) || ((_c = (_b = this.configuration) == null ? void 0 : _b.authMethods) == null ? void 0 : _c.default); + if (defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication) { + yield defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication(requestContext); + } + return requestContext; + }); + } +}; +var TagsApiResponseProcessor = class { + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to assignTag + * @throws ApiException if the response code was not in [200, 299] + */ + assignTag(response) { + return __async(this, null, function* () { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("204", response.httpStatusCode)) { + return; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Invalid request.", body, response.headers); + } + if (isCodeInRange("401", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unexpected error", body, response.headers); + } + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "void", + "" + ); + return body; + } + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", yield response.getBodyAsAny(), response.headers); + }); + } + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to createTag + * @throws ApiException if the response code was not in [200, 299] + */ + createTag(response) { + return __async(this, null, function* () { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("200", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "Tag", + "" + ); + return body; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Invalid request.", body, response.headers); + } + if (isCodeInRange("401", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unexpected error", body, response.headers); + } + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "Tag", + "" + ); + return body; + } + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", yield response.getBodyAsAny(), response.headers); + }); + } + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to deleteTag + * @throws ApiException if the response code was not in [200, 299] + */ + deleteTag(response) { + return __async(this, null, function* () { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("204", response.httpStatusCode)) { + return; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Invalid request.", body, response.headers); + } + if (isCodeInRange("401", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unexpected error", body, response.headers); + } + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "void", + "" + ); + return body; + } + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", yield response.getBodyAsAny(), response.headers); + }); + } + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to searchTags + * @throws ApiException if the response code was not in [200, 299] + */ + searchTags(response) { + return __async(this, null, function* () { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("200", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "Array", + "" + ); + return body; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Invalid request.", body, response.headers); + } + if (isCodeInRange("401", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unexpected error", body, response.headers); + } + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "Array", + "" + ); + return body; + } + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", yield response.getBodyAsAny(), response.headers); + }); + } + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to unassignTag + * @throws ApiException if the response code was not in [200, 299] + */ + unassignTag(response) { + return __async(this, null, function* () { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("204", response.httpStatusCode)) { + return; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Invalid request.", body, response.headers); + } + if (isCodeInRange("401", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unexpected error", body, response.headers); + } + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "void", + "" + ); + return body; + } + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", yield response.getBodyAsAny(), response.headers); + }); + } + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to updateTag + * @throws ApiException if the response code was not in [200, 299] + */ + updateTag(response) { + return __async(this, null, function* () { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("204", response.httpStatusCode)) { + return; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Invalid request.", body, response.headers); + } + if (isCodeInRange("401", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unexpected error", body, response.headers); + } + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "void", + "" + ); + return body; + } + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", yield response.getBodyAsAny(), response.headers); + }); + } +}; + +// apis/ThoughtSpotRestApi.ts +var ThoughtSpotRestApiRequestFactory = class extends BaseAPIRequestFactory { + /** + * Version: 9.7.0.cl or later Activates a deactivated user account. Requires `ADMINISTRATION` (**Can administer Thoughtspot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `USER_ADMINISTRATION` (**Can manage users**) privilege is required. To activate an inactive user account, the API request body must include the following information: - Username or the GUID of the user account. - Auth token generated for the deactivated user. The auth token is sent in the API response when a user is deactivated. - Password for the user account. + * @param activateUserRequest + */ + activateUser(activateUserRequest, _options) { + return __async(this, null, function* () { + var _a, _b, _c; + let _config = _options || this.configuration; + if (activateUserRequest === null || activateUserRequest === void 0) { + throw new RequiredError("ThoughtSpotRestApi", "activateUser", "activateUserRequest"); + } + const localVarPath = "/api/rest/2.0/users/activate"; + const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.25.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.25.0"); + const contentType = ObjectSerializer.getPreferredMediaType([ + "application/json" + ]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = ObjectSerializer.stringify( + ObjectSerializer.serialize(activateUserRequest, "ActivateUserRequest", ""), + contentType + ); + requestContext.setBody(serializedBody); + let authMethod; + authMethod = _config.authMethods["bearerAuth"]; + if (authMethod == null ? void 0 : authMethod.applySecurityAuthentication) { + yield authMethod == null ? void 0 : authMethod.applySecurityAuthentication(requestContext); + } + const defaultAuth = ((_a = _options == null ? void 0 : _options.authMethods) == null ? void 0 : _a.default) || ((_c = (_b = this.configuration) == null ? void 0 : _b.authMethods) == null ? void 0 : _c.default); + if (defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication) { + yield defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication(requestContext); + } + return requestContext; + }); + } + /** + * Version: 9.0.0.cl or later Transfers the ownership of one or several objects from one user to another. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `USER_ADMINISTRATION` (**Can manage users**) privilege and edit access to the objects are required. + * @param assignChangeAuthorRequest + */ + assignChangeAuthor(assignChangeAuthorRequest, _options) { + return __async(this, null, function* () { + var _a, _b, _c; + let _config = _options || this.configuration; + if (assignChangeAuthorRequest === null || assignChangeAuthorRequest === void 0) { + throw new RequiredError("ThoughtSpotRestApi", "assignChangeAuthor", "assignChangeAuthorRequest"); + } + const localVarPath = "/api/rest/2.0/security/metadata/assign"; + const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.25.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.25.0"); + const contentType = ObjectSerializer.getPreferredMediaType([ + "application/json" + ]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = ObjectSerializer.stringify( + ObjectSerializer.serialize(assignChangeAuthorRequest, "AssignChangeAuthorRequest", ""), + contentType + ); + requestContext.setBody(serializedBody); + let authMethod; + authMethod = _config.authMethods["bearerAuth"]; + if (authMethod == null ? void 0 : authMethod.applySecurityAuthentication) { + yield authMethod == null ? void 0 : authMethod.applySecurityAuthentication(requestContext); + } + const defaultAuth = ((_a = _options == null ? void 0 : _options.authMethods) == null ? void 0 : _a.default) || ((_c = (_b = this.configuration) == null ? void 0 : _b.authMethods) == null ? void 0 : _c.default); + if (defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication) { + yield defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication(requestContext); + } + return requestContext; + }); + } + /** + * Version: 9.0.0.cl or later Assigns tags to Liveboards, Answers, Tables, and Worksheets. Requires edit access to the metadata object. + * @param assignTagRequest + */ + assignTag(assignTagRequest, _options) { + return __async(this, null, function* () { + var _a, _b, _c; + let _config = _options || this.configuration; + if (assignTagRequest === null || assignTagRequest === void 0) { + throw new RequiredError("ThoughtSpotRestApi", "assignTag", "assignTagRequest"); + } + const localVarPath = "/api/rest/2.0/tags/assign"; + const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.25.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.25.0"); + const contentType = ObjectSerializer.getPreferredMediaType([ + "application/json" + ]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = ObjectSerializer.stringify( + ObjectSerializer.serialize(assignTagRequest, "AssignTagRequest", ""), + contentType + ); + requestContext.setBody(serializedBody); + let authMethod; + authMethod = _config.authMethods["bearerAuth"]; + if (authMethod == null ? void 0 : authMethod.applySecurityAuthentication) { + yield authMethod == null ? void 0 : authMethod.applySecurityAuthentication(requestContext); + } + const defaultAuth = ((_a = _options == null ? void 0 : _options.authMethods) == null ? void 0 : _a.default) || ((_c = (_b = this.configuration) == null ? void 0 : _b.authMethods) == null ? void 0 : _c.default); + if (defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication) { + yield defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication(requestContext); + } + return requestContext; + }); + } + /** + * Version: 9.0.0.cl or later Updates the current password of the user. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `USER_ADMINISTRATION` (**Can manage users**) privilege is required. + * @param changeUserPasswordRequest + */ + changeUserPassword(changeUserPasswordRequest, _options) { + return __async(this, null, function* () { + var _a, _b, _c; + let _config = _options || this.configuration; + if (changeUserPasswordRequest === null || changeUserPasswordRequest === void 0) { + throw new RequiredError("ThoughtSpotRestApi", "changeUserPassword", "changeUserPasswordRequest"); + } + const localVarPath = "/api/rest/2.0/users/change-password"; + const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.25.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.25.0"); + const contentType = ObjectSerializer.getPreferredMediaType([ + "application/json" + ]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = ObjectSerializer.stringify( + ObjectSerializer.serialize(changeUserPasswordRequest, "ChangeUserPasswordRequest", ""), + contentType + ); + requestContext.setBody(serializedBody); + let authMethod; + authMethod = _config.authMethods["bearerAuth"]; + if (authMethod == null ? void 0 : authMethod.applySecurityAuthentication) { + yield authMethod == null ? void 0 : authMethod.applySecurityAuthentication(requestContext); + } + const defaultAuth = ((_a = _options == null ? void 0 : _options.authMethods) == null ? void 0 : _a.default) || ((_c = (_b = this.configuration) == null ? void 0 : _b.authMethods) == null ? void 0 : _c.default); + if (defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication) { + yield defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication(requestContext); + } + return requestContext; + }); + } + /** + * Version: 9.2.0.cl or later Commits TML files of metadata objects to the Git branch configured on your instance. Requires at least edit access to objects used in the commit operation. Before using this endpoint to push your commits: * Enable Git integration on your instance. * Make sure the Git repository and branch details are configured on your instance. For more information, see [Git integration documentation](https://developers.thoughtspot.com/docs/git-integration). + * @param commitBranchRequest + */ + commitBranch(commitBranchRequest, _options) { + return __async(this, null, function* () { + var _a, _b, _c; + let _config = _options || this.configuration; + if (commitBranchRequest === null || commitBranchRequest === void 0) { + throw new RequiredError("ThoughtSpotRestApi", "commitBranch", "commitBranchRequest"); + } + const localVarPath = "/api/rest/2.0/vcs/git/branches/commit"; + const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.25.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.25.0"); + const contentType = ObjectSerializer.getPreferredMediaType([ + "application/json" + ]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = ObjectSerializer.stringify( + ObjectSerializer.serialize(commitBranchRequest, "CommitBranchRequest", ""), + contentType + ); + requestContext.setBody(serializedBody); + let authMethod; + authMethod = _config.authMethods["bearerAuth"]; + if (authMethod == null ? void 0 : authMethod.applySecurityAuthentication) { + yield authMethod == null ? void 0 : authMethod.applySecurityAuthentication(requestContext); + } + const defaultAuth = ((_a = _options == null ? void 0 : _options.authMethods) == null ? void 0 : _a.default) || ((_c = (_b = this.configuration) == null ? void 0 : _b.authMethods) == null ? void 0 : _c.default); + if (defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication) { + yield defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication(requestContext); + } + return requestContext; + }); + } + /** + * Version: 26.6.0.cl or later Enables or disables authentication at cluster or org level for the specified auth type. Currently supports `TRUSTED_AUTH`. #### Required privileges Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) or `CONTROL_TRUSTED_AUTH` (**Can Enable or Disable Trusted Authentication**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled, the `CONTROL_TRUSTED_AUTH` privilege is required. #### Usage guidelines Use `cluster_preferences` to enable or disable authentication at the cluster level. Cluster-level settings can only be configured from the Primary Org. - `ENABLED` — Generates a new access token if one does not exist. An existing token is preserved. - `DISABLED` — Revokes the existing cluster-level access token. Use `org_preferences` to enable or disable authentication for one or more Orgs. Each entry must include an `org_identifier` (unique ID or name) and an `auth_status`. Org-level configuration requires the per-Org authentication feature to be enabled on your instance. - `ENABLED` — Generates a new org-level access token if one does not exist. - `DISABLED` — Revokes the existing org-level access token for that Org. Both `cluster_preferences` and `org_preferences` are optional. Omitting a field leaves the corresponding settings unchanged. If both are omitted, the API returns `204 No Content` without making any changes. **Note**: Cluster-level and org-level settings are independent of each other. Enabling or disabling one does not affect the other. + * @param configureAuthSettingsRequest + */ + configureAuthSettings(configureAuthSettingsRequest, _options) { + return __async(this, null, function* () { + var _a, _b, _c; + let _config = _options || this.configuration; + if (configureAuthSettingsRequest === null || configureAuthSettingsRequest === void 0) { + throw new RequiredError("ThoughtSpotRestApi", "configureAuthSettings", "configureAuthSettingsRequest"); + } + const localVarPath = "/api/rest/2.0/auth/configure"; + const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.25.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.25.0"); + const contentType = ObjectSerializer.getPreferredMediaType([ + "application/json" + ]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = ObjectSerializer.stringify( + ObjectSerializer.serialize(configureAuthSettingsRequest, "ConfigureAuthSettingsRequest", ""), + contentType + ); + requestContext.setBody(serializedBody); + let authMethod; + authMethod = _config.authMethods["bearerAuth"]; + if (authMethod == null ? void 0 : authMethod.applySecurityAuthentication) { + yield authMethod == null ? void 0 : authMethod.applySecurityAuthentication(requestContext); + } + const defaultAuth = ((_a = _options == null ? void 0 : _options.authMethods) == null ? void 0 : _a.default) || ((_c = (_b = this.configuration) == null ? void 0 : _b.authMethods) == null ? void 0 : _c.default); + if (defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication) { + yield defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication(requestContext); + } + return requestContext; + }); + } + /** + * Version: 10.14.0.cl or later Configure communication channel preferences. - Use `cluster_preferences` to update the default preferences for your ThoughtSpot application instance. - If your instance has [Orgs](https://docs.thoughtspot.com/cloud/latest/orgs-overview), use `org_preferences` to specify Org-specific preferences that override the defaults. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) or `DEVELOPER` (**Has developer privilege**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, users with `APPLICATION_ADMINISTRATION` (**Can manage application settings**) privilege are also authorized to perform this action. + * @param configureCommunicationChannelPreferencesRequest + */ + configureCommunicationChannelPreferences(configureCommunicationChannelPreferencesRequest, _options) { + return __async(this, null, function* () { + var _a, _b, _c; + let _config = _options || this.configuration; + if (configureCommunicationChannelPreferencesRequest === null || configureCommunicationChannelPreferencesRequest === void 0) { + throw new RequiredError("ThoughtSpotRestApi", "configureCommunicationChannelPreferences", "configureCommunicationChannelPreferencesRequest"); + } + const localVarPath = "/api/rest/2.0/system/preferences/communication-channels/configure"; + const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.25.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.25.0"); + const contentType = ObjectSerializer.getPreferredMediaType([ + "application/json" + ]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = ObjectSerializer.stringify( + ObjectSerializer.serialize(configureCommunicationChannelPreferencesRequest, "ConfigureCommunicationChannelPreferencesRequest", ""), + contentType + ); + requestContext.setBody(serializedBody); + let authMethod; + authMethod = _config.authMethods["bearerAuth"]; + if (authMethod == null ? void 0 : authMethod.applySecurityAuthentication) { + yield authMethod == null ? void 0 : authMethod.applySecurityAuthentication(requestContext); + } + const defaultAuth = ((_a = _options == null ? void 0 : _options.authMethods) == null ? void 0 : _a.default) || ((_c = (_b = this.configuration) == null ? void 0 : _b.authMethods) == null ? void 0 : _c.default); + if (defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication) { + yield defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication(requestContext); + } + return requestContext; + }); + } + /** + * Version: 26.2.0.cl or later Configure security settings for your ThoughtSpot application instance. - Use `cluster_preferences` to update cluster-level security settings including CORS whitelisted URLs, CSP settings, SAML redirect URLs, partitioned cookies, and non-embed access configuration. - Use `org_preferences` to configure Org-specific security settings. If your instance has [Orgs](https://docs.thoughtspot.com/cloud/latest/orgs-overview), this allows configuring CORS and non-embed access settings specific to the Org. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) or `DEVELOPER` (**Has developer privilege**) privilege. Cluster-level SAML and script-src settings require `ADMINISTRATION` privilege. See [Security Settings](https://developers.thoughtspot.com/docs/security-settings) for more details. + * @param configureSecuritySettingsRequest + */ + configureSecuritySettings(configureSecuritySettingsRequest, _options) { + return __async(this, null, function* () { + var _a, _b, _c; + let _config = _options || this.configuration; + if (configureSecuritySettingsRequest === null || configureSecuritySettingsRequest === void 0) { + throw new RequiredError("ThoughtSpotRestApi", "configureSecuritySettings", "configureSecuritySettingsRequest"); + } + const localVarPath = "/api/rest/2.0/system/security-settings/configure"; + const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.25.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.25.0"); + const contentType = ObjectSerializer.getPreferredMediaType([ + "application/json" + ]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = ObjectSerializer.stringify( + ObjectSerializer.serialize(configureSecuritySettingsRequest, "ConfigureSecuritySettingsRequest", ""), + contentType + ); + requestContext.setBody(serializedBody); + let authMethod; + authMethod = _config.authMethods["bearerAuth"]; + if (authMethod == null ? void 0 : authMethod.applySecurityAuthentication) { + yield authMethod == null ? void 0 : authMethod.applySecurityAuthentication(requestContext); + } + const defaultAuth = ((_a = _options == null ? void 0 : _options.authMethods) == null ? void 0 : _a.default) || ((_c = (_b = this.configuration) == null ? void 0 : _b.authMethods) == null ? void 0 : _c.default); + if (defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication) { + yield defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication(requestContext); + } + return requestContext; + }); + } + /** + * Version: 10.12.0.cl or later Gets connection configuration objects. Requires `DATAMANAGEMENT` (**Can manage data**) and edit permissions to the connection object, or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) privilege is required. #### Usage guidelines * To get a list of all configurations available in the ThoughtSpot system, send the API request with only the connection name or GUID in the request body. * To fetch details of a configuration object, specify the configuration object name or GUID. + * @param connectionConfigurationSearchRequest + */ + connectionConfigurationSearch(connectionConfigurationSearchRequest, _options) { + return __async(this, null, function* () { + var _a, _b, _c; + let _config = _options || this.configuration; + if (connectionConfigurationSearchRequest === null || connectionConfigurationSearchRequest === void 0) { + throw new RequiredError("ThoughtSpotRestApi", "connectionConfigurationSearch", "connectionConfigurationSearchRequest"); + } + const localVarPath = "/api/rest/2.0/connection-configurations/search"; + const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.25.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.25.0"); + const contentType = ObjectSerializer.getPreferredMediaType([ + "application/json" + ]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = ObjectSerializer.stringify( + ObjectSerializer.serialize(connectionConfigurationSearchRequest, "ConnectionConfigurationSearchRequest", ""), + contentType + ); + requestContext.setBody(serializedBody); + let authMethod; + authMethod = _config.authMethods["bearerAuth"]; + if (authMethod == null ? void 0 : authMethod.applySecurityAuthentication) { + yield authMethod == null ? void 0 : authMethod.applySecurityAuthentication(requestContext); + } + const defaultAuth = ((_a = _options == null ? void 0 : _options.authMethods) == null ? void 0 : _a.default) || ((_c = (_b = this.configuration) == null ? void 0 : _b.authMethods) == null ? void 0 : _c.default); + if (defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication) { + yield defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication(requestContext); + } + return requestContext; + }); + } + /** + * Convert worksheets to models Version: 10.6.0.cl or later ## Prerequisites - **Privileges Required:** - `DATAMANAGEMENT` (Can manage data) or `ADMINISTRATION` (Can administer ThoughtSpot). - **Additional Privileges (if RBAC is enabled):** - `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` (Can manage data models). --- ## Usage Guidelines ### Parameters 1. **worksheet_ids** - **Description:** A comma-separated list of GUIDs (Globally Unique Identifiers) specifying the Worksheets to be converted. - **Usage:** - Used only when `convert_all` is set to `false`. - Leave empty or omit when `convert_all` is set to `true`. 2. **exclude_worksheet_ids** - **Description:** A comma-separated list of GUIDs specifying Worksheets to be excluded from conversion. - **Usage:** - Useful when `convert_all` is set to `true` and specific Worksheets should not be converted. 3. **convert_all** - **Description:** Sets the scope of conversion. - **Options:** - `true`: Converts all Worksheets in the system, except those specified in `exclude_worksheet_ids`. - `false`: Converts only the Worksheets listed in `worksheet_ids`. 4. **apply_changes** - **Description:** Specifies whether to apply changes directly to ThoughtSpot or to generate a preview before applying any changes.Used for validation of conversion. - **Options:** - `true`: Applies conversion changes directly to ThoughtSpot. - `false`: Generates only a preview of the changes and does not apply any changes to ThoughtSpot --- ## Best Practices 1. **Backup Before Conversion:** Always export metadata as a backup before initiating the conversion process 2. **Partial Conversion for Testing:** Test the conversion process by setting `convert_all` to `false` and specifying a small number of `worksheet_ids`. 3. **Verify Dependencies:** Check for dependent objects, such as Tables and Connections, to avoid invalid references. 4. **Review Changes:** Use `apply_changes: false` to preview the impact of the conversion before applying changes. --- ## Examples ### Convert Specific Worksheets ```json { \"worksheet_ids\": [\"guid1\", \"guid2\", \"guid3\"], \"exclude_worksheet_ids\": [], \"convert_all\": false, \"apply_changes\": true } ``` ### Convert All Accessible Worksheets ```json { \"worksheet_ids\": [], \"exclude_worksheet_ids\": [], \"convert_all\": true, \"apply_changes\": true } ``` ### Exclude Specific Worksheets While Converting All Accessible Worksheets ```json { \"worksheet_ids\": [], \"exclude_worksheet_ids\": [\"abc\"], \"convert_all\": true, \"apply_changes\": true } ``` + * @param convertWorksheetToModelRequest + */ + convertWorksheetToModel(convertWorksheetToModelRequest, _options) { + return __async(this, null, function* () { + var _a, _b, _c; + let _config = _options || this.configuration; + if (convertWorksheetToModelRequest === null || convertWorksheetToModelRequest === void 0) { + throw new RequiredError("ThoughtSpotRestApi", "convertWorksheetToModel", "convertWorksheetToModelRequest"); + } + const localVarPath = "/api/rest/2.0/metadata/worksheets/convert"; + const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.25.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.25.0"); + const contentType = ObjectSerializer.getPreferredMediaType([ + "application/json" + ]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = ObjectSerializer.stringify( + ObjectSerializer.serialize(convertWorksheetToModelRequest, "ConvertWorksheetToModelRequest", ""), + contentType + ); + requestContext.setBody(serializedBody); + let authMethod; + authMethod = _config.authMethods["bearerAuth"]; + if (authMethod == null ? void 0 : authMethod.applySecurityAuthentication) { + yield authMethod == null ? void 0 : authMethod.applySecurityAuthentication(requestContext); + } + const defaultAuth = ((_a = _options == null ? void 0 : _options.authMethods) == null ? void 0 : _a.default) || ((_c = (_b = this.configuration) == null ? void 0 : _b.authMethods) == null ? void 0 : _c.default); + if (defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication) { + yield defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication(requestContext); + } + return requestContext; + }); + } + /** + * Makes a copy of an Answer or Liveboard Version: 10.3.0.cl or later Creates a copy of a metadata object. Requires at least view access to the metadata object being copied. Upon successful execution, the API creates a copy of the metadata object specified in the API request and returns the ID of the new object. + * @param copyObjectRequest + */ + copyObject(copyObjectRequest, _options) { + return __async(this, null, function* () { + var _a, _b, _c; + let _config = _options || this.configuration; + if (copyObjectRequest === null || copyObjectRequest === void 0) { + throw new RequiredError("ThoughtSpotRestApi", "copyObject", "copyObjectRequest"); + } + const localVarPath = "/api/rest/2.0/metadata/copyobject"; + const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.25.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.25.0"); + const contentType = ObjectSerializer.getPreferredMediaType([ + "application/json" + ]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = ObjectSerializer.stringify( + ObjectSerializer.serialize(copyObjectRequest, "CopyObjectRequest", ""), + contentType + ); + requestContext.setBody(serializedBody); + let authMethod; + authMethod = _config.authMethods["bearerAuth"]; + if (authMethod == null ? void 0 : authMethod.applySecurityAuthentication) { + yield authMethod == null ? void 0 : authMethod.applySecurityAuthentication(requestContext); + } + const defaultAuth = ((_a = _options == null ? void 0 : _options.authMethods) == null ? void 0 : _a.default) || ((_c = (_b = this.configuration) == null ? void 0 : _b.authMethods) == null ? void 0 : _c.default); + if (defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication) { + yield defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication(requestContext); + } + return requestContext; + }); + } + /** + * Version: 26.2.0.cl or later Creates a new Spotter agent conversation based on the provided context and settings. The endpoint was in Beta from 26.2.0.cl through 26.4.0.cl. Requires `CAN_USE_SPOTTER` privilege and at least view access to the metadata object specified in the request. #### Usage guidelines The request must include the `metadata_context` parameter to define the conversation context. The context type can be one of: - `DATA_SOURCE` *(available from 26.5.0.cl)*: targets a specific data source. Provide `data_source_identifier` in `data_source_context` for a single data source, or `data_source_identifiers` for multi-data-source context. The deprecated `guid` field is accepted for backwards compatibility. - `AUTO_MODE` *(available from 26.5.0.cl)*: automatically discovers and selects the most relevant datasets for the user\'s queries. > **Note for callers on versions 26.2.0.cl – 26.4.0.cl (Beta):** use the lowercase `data_source` enum value with the `guid` field instead of the above. Example: `{ \"type\": \"data_source\", \"data_source_context\": { \"guid\": \"\" } }`. The `conversation_settings` parameter controls which Spotter capabilities are enabled for the conversation: - `enable_contextual_change_analysis` (default: `true`, **deprecated from 26.2.0.cl**) — always enabled in Spotter 3; setting this to `false` has no effect on versions >= 26.2.0.cl - `enable_natural_language_answer_generation` (default: `true`, **deprecated from 26.2.0.cl**) — always enabled in Spotter 3; setting this to `false` has no effect on versions >= 26.2.0.cl - `enable_reasoning` (default: `true`, **deprecated from 26.2.0.cl**) — always enabled in Spotter 3; setting this to `false` has no effect on versions >= 26.2.0.cl - `enable_save_chat` (default: `false`, *available from 26.5.0.cl*) — enables saving the conversation for later retrieval via conversation history If the request is successful, the response includes a unique `conversation_identifier` that must be passed to `sendAgentConversationMessage` or `sendAgentConversationMessageStreaming` to send messages within this conversation. The response also includes `conversation_id` with the same value for backwards compatibility; use `conversation_identifier` for new integrations. #### Example request ```json { \"metadata_context\": { \"type\": \"DATA_SOURCE\", \"data_source_context\": { \"data_source_identifier\": \"a1b2c3d4-e5f6-7890-abcd-ef1234567890\" } }, \"conversation_settings\": {} } ``` #### Error responses | Code | Description | | ---- | --------------------------------------------------------------------------------------------------------------------------------------- | | 401 | Unauthorized — authentication token is missing, expired, or invalid. | | 403 | Forbidden — the authenticated user does not have `CAN_USE_SPOTTER` privilege or lacks view permission on the specified metadata object. | > ###### Note: > > - This endpoint was in Beta from 26.2.0.cl through 26.4.0.cl and is Generally Available from version 26.5.0.cl. > - This endpoint requires Spotter - please contact ThoughtSpot support to enable Spotter on your cluster. + * @param createAgentConversationRequest + */ + createAgentConversation(createAgentConversationRequest, _options) { + return __async(this, null, function* () { + var _a, _b, _c; + let _config = _options || this.configuration; + if (createAgentConversationRequest === null || createAgentConversationRequest === void 0) { + throw new RequiredError("ThoughtSpotRestApi", "createAgentConversation", "createAgentConversationRequest"); + } + const localVarPath = "/api/rest/2.0/ai/agent/conversation/create"; + const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.25.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.25.0"); + const contentType = ObjectSerializer.getPreferredMediaType([ + "application/json" + ]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = ObjectSerializer.stringify( + ObjectSerializer.serialize(createAgentConversationRequest, "CreateAgentConversationRequest", ""), + contentType + ); + requestContext.setBody(serializedBody); + let authMethod; + authMethod = _config.authMethods["bearerAuth"]; + if (authMethod == null ? void 0 : authMethod.applySecurityAuthentication) { + yield authMethod == null ? void 0 : authMethod.applySecurityAuthentication(requestContext); + } + const defaultAuth = ((_a = _options == null ? void 0 : _options.authMethods) == null ? void 0 : _a.default) || ((_c = (_b = this.configuration) == null ? void 0 : _b.authMethods) == null ? void 0 : _c.default); + if (defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication) { + yield defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication(requestContext); + } + return requestContext; + }); + } + /** + * Version: 10.12.0.cl or later Creates a new [custom calendar](https://docs.thoughtspot.com/cloud/latest/connections-cust-cal). Requires `DATAMANAGEMENT` (**Can manage data**) or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your ThoughtSpot instance, the `CAN_MANAGE_CUSTOM_CALENDAR` (**Can manage custom calendars**) privilege is required. #### Usage guidelines You can create a custom calendar from scratch or an existing Table in ThoughtSpot. For both methods of calendar creation, the following parameters are required: * Name of the custom calendar. * Calendar creation method. To create a calendar from an existing table, specify the method: - `FROM_EXISTING_TABLE` - Creates calendar from the table reference provided in the API request. - `FROM_INPUT_PARAMS` - Creates a calendar from the parameters defined in the API request. * Connection ID and Table name * Database and schema name attributes: For most Cloud Data Warehouse (CDW) connectors, both `database_name` and `schema_name` attributes are required. However, the attribute requirements are conditional and vary based on the connector type and its metadata structure. For example, for connectors such as Teradata, MySQL, SingleSore, Amazon Aurora MySQL, Amazon RDS MySQL, Oracle, and GCP_MYSQL, the `schema_name` is required, whereas the `database_name` attribute is not. Similarly, connectors such as ClickHouse require you to specify the `database_name` and the schema specification in such cases is optional. **NOTE**: If you are creating a calendar from an existing table, ensure that the referenced table matches the required DDL for custom calendars. If the schema does not match, the API returns an error. ##### Calendar type The API allows you to create the following types of calendars: * `MONTH_OFFSET`. The default calendar type. A `MONTH_OFFSET` calendar is offset by a few months from the standard calendar months (January to December) and the year begins with the month defined in the request. For example, if the `month_offset` value is set as `April`, the calendar year begins in April. * `4-4-5`. Each quarter in the calendar will include two 4-week months followed by one 5-week month. * `4-5-4`. Each quarter in the calendar will include two 4-week months with a 5-week month between. * `5-4-4`. Each quarter begins with a 5-week month, followed by two 4-week months. To start and end the calendar on a specific date, specify the dates in the `MM/DD/YYYY` format. For `MONTH_OFFSET` calendars, ensure that the `start_date` matches the month specified in the `month_offset` attribute. You can also set the starting day of the week and customize the prefixes for year and quarter labels. #### Examples To create a calendar from an existing table: ``` { \"name\": \"MyCustomCalendar1\", \"table_reference\": { \"connection_identifier\": \"4db8ea22-2ff4-4224-b05a-26674717e468\", \"table_name\": \"MyCalendarTable\", \"database_name\": \"RETAILAPPAREL\", \"schema_name\": \"PUBLIC\" }, \"creation_method\": \"FROM_EXISTING_TABLE\", } ``` To create a calendar from scratch: ``` { \"name\": \"MyCustomCalendar1\", \"table_reference\": { \"connection_identifier\": \"4db8ea22-2ff4-4224-b05a-26674717e468\", \"table_name\": \"MyCalendarTable\", \"database_name\": \"RETAILAPPAREL\", \"schema_name\": \"PUBLIC\" }, \"creation_method\": \"FROM_INPUT_PARAMS\", \"calendar_type\": \"MONTH_OFFSET\", \"month_offset\": \"April\", \"start_day_of_week\": \"Monday\", \"quarter_name_prefix\": \"Q\", \"year_name_prefix\": \"FY\", \"start_date\": \"04/01/2025\", \"end_date\": \"04/31/2025\" } ``` + * @param createCalendarRequest + */ + createCalendar(createCalendarRequest, _options) { + return __async(this, null, function* () { + var _a, _b, _c; + let _config = _options || this.configuration; + if (createCalendarRequest === null || createCalendarRequest === void 0) { + throw new RequiredError("ThoughtSpotRestApi", "createCalendar", "createCalendarRequest"); + } + const localVarPath = "/api/rest/2.0/calendars/create"; + const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.25.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.25.0"); + const contentType = ObjectSerializer.getPreferredMediaType([ + "application/json" + ]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = ObjectSerializer.stringify( + ObjectSerializer.serialize(createCalendarRequest, "CreateCalendarRequest", ""), + contentType + ); + requestContext.setBody(serializedBody); + let authMethod; + authMethod = _config.authMethods["bearerAuth"]; + if (authMethod == null ? void 0 : authMethod.applySecurityAuthentication) { + yield authMethod == null ? void 0 : authMethod.applySecurityAuthentication(requestContext); + } + const defaultAuth = ((_a = _options == null ? void 0 : _options.authMethods) == null ? void 0 : _a.default) || ((_c = (_b = this.configuration) == null ? void 0 : _b.authMethods) == null ? void 0 : _c.default); + if (defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication) { + yield defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication(requestContext); + } + return requestContext; + }); + } + /** + * Version: 26.4.0.cl or later Creates a new collection in ThoughtSpot. Collections allow you to organize and group related metadata objects such as Liveboards, Answers, worksheets, and other data objects. You can also create nested collections (sub-collections) to build a hierarchical structure. #### Supported operations The API endpoint lets you perform the following operations: * Create a new collection * Add metadata objects (Liveboards, Answers, Logical Tables) to the collection * Create nested collections by adding sub-collections + * @param createCollectionRequest + */ + createCollection(createCollectionRequest, _options) { + return __async(this, null, function* () { + var _a, _b, _c; + let _config = _options || this.configuration; + if (createCollectionRequest === null || createCollectionRequest === void 0) { + throw new RequiredError("ThoughtSpotRestApi", "createCollection", "createCollectionRequest"); + } + const localVarPath = "/api/rest/2.0/collections/create"; + const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.25.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.25.0"); + const contentType = ObjectSerializer.getPreferredMediaType([ + "application/json" + ]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = ObjectSerializer.stringify( + ObjectSerializer.serialize(createCollectionRequest, "CreateCollectionRequest", ""), + contentType + ); + requestContext.setBody(serializedBody); + let authMethod; + authMethod = _config.authMethods["bearerAuth"]; + if (authMethod == null ? void 0 : authMethod.applySecurityAuthentication) { + yield authMethod == null ? void 0 : authMethod.applySecurityAuthentication(requestContext); + } + const defaultAuth = ((_a = _options == null ? void 0 : _options.authMethods) == null ? void 0 : _a.default) || ((_c = (_b = this.configuration) == null ? void 0 : _b.authMethods) == null ? void 0 : _c.default); + if (defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication) { + yield defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication(requestContext); + } + return requestContext; + }); + } + /** + * Version: 9.2.0.cl or later Allows you to connect a ThoughtSpot instance to a Git repository. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance on your instance, the `CAN_SETUP_VERSION_CONTROL` (**Can set up version control**) privilege. You can use this API endpoint to connect your ThoughtSpot development and production environments to the development and production branches of a Git repository. Before using this endpoint to connect your ThoughtSpot instance to a Git repository, check the following prerequisites: * You have a Git repository. If you are using GitHub, make sure you have a valid account and an access token to connect ThoughtSpot to GitHub. For information about generating a token, see [GitHub Documentation](https://docs.github.com/en/authentication/keeping-your-account-and-data-secure/managing-your-personal-access-tokens). * Your access token has `repo` scope that grants full access to public and private repositories. * Your Git repository has a branch that can be configured as a default branch in ThoughtSpot. For more information, see [Git integration documentation](https://developers.thoughtspot.com/docs/?pageid=git-integration). **Note**: ThoughtSpot supports only GitHub / itHub Enterprise for CI/CD. + * @param createConfigRequest + */ + createConfig(createConfigRequest, _options) { + return __async(this, null, function* () { + var _a, _b, _c; + let _config = _options || this.configuration; + if (createConfigRequest === null || createConfigRequest === void 0) { + throw new RequiredError("ThoughtSpotRestApi", "createConfig", "createConfigRequest"); + } + const localVarPath = "/api/rest/2.0/vcs/git/config/create"; + const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.25.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.25.0"); + const contentType = ObjectSerializer.getPreferredMediaType([ + "application/json" + ]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = ObjectSerializer.stringify( + ObjectSerializer.serialize(createConfigRequest, "CreateConfigRequest", ""), + contentType + ); + requestContext.setBody(serializedBody); + let authMethod; + authMethod = _config.authMethods["bearerAuth"]; + if (authMethod == null ? void 0 : authMethod.applySecurityAuthentication) { + yield authMethod == null ? void 0 : authMethod.applySecurityAuthentication(requestContext); + } + const defaultAuth = ((_a = _options == null ? void 0 : _options.authMethods) == null ? void 0 : _a.default) || ((_c = (_b = this.configuration) == null ? void 0 : _b.authMethods) == null ? void 0 : _c.default); + if (defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication) { + yield defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication(requestContext); + } + return requestContext; + }); + } + /** + * Version: 9.2.0.cl or later Creates a connection to a data warehouse for live query services. Requires `DATAMANAGEMENT` (**Can manage data**) or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) privilege is required. #### Create a connection without tables To create a connection without tables: 1. Pass these parameters in your API request. * Name of the connection. * Type of the data warehouse to connect to. * A JSON map of configuration attributes in `data_warehouse_config`. The following example shows the configuration attributes for a SnowFlake connection: ``` { \"configuration\":{ \"accountName\":\"thoughtspot_partner\", \"user\":\"tsadmin\", \"password\":\"TestConn123\", \"role\":\"sysadmin\", \"warehouse\":\"MEDIUM_WH\" }, \"authenticationType\": \"SERVICE_ACCOUNT\", \"externalDatabases\":[ ] } ``` 2. Set `validate` to `false`. **NOTE:** If the `authentication_type` is anything other than SERVICE_ACCOUNT, you must explicitly provide the authenticationType property in the payload. If you do not specify authenticationType, the API will default to SERVICE_ACCOUNT as the authentication type. #### Create a connection with tables If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) and `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` (**Can manage data models**) privilege is required. To create a connection with tables: 1. Pass these parameters in your API request. * Name of the connection. * Type of the data warehouse to connect to. * A JSON map of configuration attributes, database details, and table properties in `data_warehouse_config` as shown in the following example: ``` { \"configuration\":{ \"accountName\":\"thoughtspot_partner\", \"user\":\"tsadmin\", \"password\":\"TestConn123\", \"role\":\"sysadmin\", \"warehouse\":\"MEDIUM_WH\" }, \"authenticationType\": \"SERVICE_ACCOUNT\", \"externalDatabases\":[ { \"name\":\"AllDatatypes\", \"isAutoCreated\":false, \"schemas\":[ { \"name\":\"alldatatypes\", \"tables\":[ { \"name\":\"allDatatypes\", \"type\":\"TABLE\", \"description\":\"\", \"selected\":true, \"linked\":true, \"columns\":[ { \"name\":\"CNUMBER\", \"type\":\"INT64\", \"canImport\":true, \"selected\":true, \"isLinkedActive\":true, \"isImported\":false, \"tableName\":\"allDatatypes\", \"schemaName\":\"alldatatypes\", \"dbName\":\"AllDatatypes\" }, { \"name\":\"CDECIMAL\", \"type\":\"INT64\", \"canImport\":true, \"selected\":true, \"isLinkedActive\":true, \"isImported\":false, \"tableName\":\"allDatatypes\", \"schemaName\":\"alldatatypes\", \"dbName\":\"AllDatatypes\" } ] } ] } ] } ] } ``` 2. Set `validate` to `true`. **NOTE:** If the `authentication_type` is anything other than SERVICE_ACCOUNT, you must explicitly provide the authenticationType property in the payload. If you do not specify authenticationType, the API will default to SERVICE_ACCOUNT as the authentication type. + * @param createConnectionRequest + */ + createConnection(createConnectionRequest, _options) { + return __async(this, null, function* () { + var _a, _b, _c; + let _config = _options || this.configuration; + if (createConnectionRequest === null || createConnectionRequest === void 0) { + throw new RequiredError("ThoughtSpotRestApi", "createConnection", "createConnectionRequest"); + } + const localVarPath = "/api/rest/2.0/connection/create"; + const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.25.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.25.0"); + const contentType = ObjectSerializer.getPreferredMediaType([ + "application/json" + ]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = ObjectSerializer.stringify( + ObjectSerializer.serialize(createConnectionRequest, "CreateConnectionRequest", ""), + contentType + ); + requestContext.setBody(serializedBody); + let authMethod; + authMethod = _config.authMethods["bearerAuth"]; + if (authMethod == null ? void 0 : authMethod.applySecurityAuthentication) { + yield authMethod == null ? void 0 : authMethod.applySecurityAuthentication(requestContext); + } + const defaultAuth = ((_a = _options == null ? void 0 : _options.authMethods) == null ? void 0 : _a.default) || ((_c = (_b = this.configuration) == null ? void 0 : _b.authMethods) == null ? void 0 : _c.default); + if (defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication) { + yield defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication(requestContext); + } + return requestContext; + }); + } + /** + * Version: 10.12.0.cl or later Creates an additional configuration to an existing connection to a data warehouse. Requires `DATAMANAGEMENT` (**Can manage data**) or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) privilege is required. #### Usage guidelines * A JSON map of configuration attributes in `configuration`. The following example shows the configuration attributes: ``` { \"user\":\"DEV_USER\", \"password\":\"TestConn123\", \"role\":\"DEV\", \"warehouse\":\"DEV_WH\" } ``` * If the `policy_type` is `PRINCIPALS`, then `policy_principals` is a required field. * If the `policy_type` is `PROCESSES`, then `policy_processes` is a required field. * If the `policy_type` is `NO_POLICY`, then `policy_principals` and `policy_processes` are not required fields. #### Parameterized Connection Support For parameterized connections that use OAuth authentication, only the same_as_parent and policy_process_options attributes are allowed in the API request. These attributes are not applicable to connections that are not parameterized. + * @param createConnectionConfigurationRequest + */ + createConnectionConfiguration(createConnectionConfigurationRequest, _options) { + return __async(this, null, function* () { + var _a, _b, _c; + let _config = _options || this.configuration; + if (createConnectionConfigurationRequest === null || createConnectionConfigurationRequest === void 0) { + throw new RequiredError("ThoughtSpotRestApi", "createConnectionConfiguration", "createConnectionConfigurationRequest"); + } + const localVarPath = "/api/rest/2.0/connection-configurations/create"; + const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.25.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.25.0"); + const contentType = ObjectSerializer.getPreferredMediaType([ + "application/json" + ]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = ObjectSerializer.stringify( + ObjectSerializer.serialize(createConnectionConfigurationRequest, "CreateConnectionConfigurationRequest", ""), + contentType + ); + requestContext.setBody(serializedBody); + let authMethod; + authMethod = _config.authMethods["bearerAuth"]; + if (authMethod == null ? void 0 : authMethod.applySecurityAuthentication) { + yield authMethod == null ? void 0 : authMethod.applySecurityAuthentication(requestContext); + } + const defaultAuth = ((_a = _options == null ? void 0 : _options.authMethods) == null ? void 0 : _a.default) || ((_c = (_b = this.configuration) == null ? void 0 : _b.authMethods) == null ? void 0 : _c.default); + if (defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication) { + yield defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication(requestContext); + } + return requestContext; + }); + } + /** + * Version: 10.4.0.cl or later Creates a new conversation session tied to a specific data model for AI-driven natural language querying. Requires `CAN_USE_SPOTTER` privilege and at least view access to the metadata object specified in the request. #### Usage guidelines The request must include: - `metadata_identifier`: the unique ID of the data source that provides context for the conversation Optionally, you can provide: - `tokens`: a token string to set initial context for the conversation (e.g., `\"[sales],[item type],[state]\"`) If the request is successful, ThoughtSpot returns a unique `conversation_identifier` that must be passed to `sendMessage` to continue the conversation. #### Error responses | Code | Description | |------|-------------| | 401 | Unauthorized — authentication token is missing, expired, or invalid. | | 403 | Forbidden — the authenticated user does not have `CAN_USE_SPOTTER` privilege or lacks view permission on the specified metadata object. | > ###### Note: > * This endpoint is currently in Beta. Breaking changes may be introduced before the endpoint is made Generally Available. > * This endpoint requires Spotter - please contact ThoughtSpot support to enable Spotter on your cluster. + * @param createConversationRequest + */ + createConversation(createConversationRequest, _options) { + return __async(this, null, function* () { + var _a, _b, _c; + let _config = _options || this.configuration; + if (createConversationRequest === null || createConversationRequest === void 0) { + throw new RequiredError("ThoughtSpotRestApi", "createConversation", "createConversationRequest"); + } + const localVarPath = "/api/rest/2.0/ai/conversation/create"; + const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.25.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.25.0"); + const contentType = ObjectSerializer.getPreferredMediaType([ + "application/json" + ]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = ObjectSerializer.stringify( + ObjectSerializer.serialize(createConversationRequest, "CreateConversationRequest", ""), + contentType + ); + requestContext.setBody(serializedBody); + let authMethod; + authMethod = _config.authMethods["bearerAuth"]; + if (authMethod == null ? void 0 : authMethod.applySecurityAuthentication) { + yield authMethod == null ? void 0 : authMethod.applySecurityAuthentication(requestContext); + } + const defaultAuth = ((_a = _options == null ? void 0 : _options.authMethods) == null ? void 0 : _a.default) || ((_c = (_b = this.configuration) == null ? void 0 : _b.authMethods) == null ? void 0 : _c.default); + if (defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication) { + yield defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication(requestContext); + } + return requestContext; + }); + } + /** + * Version: 9.6.0.cl or later Creates a custom action that appears as a menu action on a saved Answer or Liveboard visualization. Requires `DEVELOPER` (**Has Developer privilege**) or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `DEVELOPER` (**Has developer privilege**) privilege is required. #### Usage Guidelines The API lets you create the following types of custom actions: * URL-based action Allows pushing data to an external URL. * Callback action Triggers a callback to the host application and initiates a response payload on an embedded ThoughtSpot instance. By default, custom actions are visible to only administrator or developer users. To make a custom action available to other users, and specify the groups in `group_identifiers`. By default, the custom action is set as a _global_ action on all visualizations and saved Answers. To assign a custom action to specific Liveboard visualization, saved Answer, or Worksheet, set `visibility` to `false` in `default_action_config` property and specify the GUID or name of the object in `associate_metadata`. For more information, see [Custom actions](https://developers.thoughtspot.com/docs/custom-action-intro). + * @param createCustomActionRequest + */ + createCustomAction(createCustomActionRequest, _options) { + return __async(this, null, function* () { + var _a, _b, _c; + let _config = _options || this.configuration; + if (createCustomActionRequest === null || createCustomActionRequest === void 0) { + throw new RequiredError("ThoughtSpotRestApi", "createCustomAction", "createCustomActionRequest"); + } + const localVarPath = "/api/rest/2.0/customization/custom-actions"; + const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.25.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.25.0"); + const contentType = ObjectSerializer.getPreferredMediaType([ + "application/json" + ]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = ObjectSerializer.stringify( + ObjectSerializer.serialize(createCustomActionRequest, "CreateCustomActionRequest", ""), + contentType + ); + requestContext.setBody(serializedBody); + let authMethod; + authMethod = _config.authMethods["bearerAuth"]; + if (authMethod == null ? void 0 : authMethod.applySecurityAuthentication) { + yield authMethod == null ? void 0 : authMethod.applySecurityAuthentication(requestContext); + } + const defaultAuth = ((_a = _options == null ? void 0 : _options.authMethods) == null ? void 0 : _a.default) || ((_c = (_b = this.configuration) == null ? void 0 : _b.authMethods) == null ? void 0 : _c.default); + if (defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication) { + yield defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication(requestContext); + } + return requestContext; + }); + } + /** + * Version: 10.10.0.cl or later Creates a customization configuration for the notification email. #### Pre-requisites Requires `DEVELOPER` (**has developer privilege**) or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `DEVELOPER` (**Has developer privilege**) privilege is required. **NOTE**:This endpoint in currently in beta. Contact ThoughtSpot support to enable this on your instance. #### Usage guidelines To create a custom configuration pass these parameters in your API request: - A JSON map of configuration attributes `template_properties`. The following example shows a sample set of customization configuration: ``` { { \"cta_button_bg_color\": \"#444DEA\", \"cta_text_font_color\": \"#FFFFFF\", \"primary_bg_color\": \"#D3DEF0\", \"logo_url\": \"https://storage.pardot.com/710713/1642089901EbkRibJq/TS_fullworkmark_darkmode.png\", \"font_family\": \"\", \"product_name\": \"ThoughtSpot\", \"footer_address\": \"444 Castro St, Suite 1000 Mountain View, CA 94041\", \"footer_phone\": \"(800) 508-7008\", \"replacement_value_for_liveboard\": \"Dashboard\", \"replacement_value_for_answer\": \"Chart\", \"replacement_value_for_spot_iq\": \"AI Insights\", \"hide_footer_phone\": false, \"hide_footer_address\": false, \"hide_product_name\": false, \"hide_manage_notification\": false, \"hide_mobile_app_nudge\": false, \"hide_privacy_policy\": false, \"hide_ts_vocabulary_definitions\": false, \"hide_error_message\": false, \"hide_unsubscribe_link\": false, \"hide_notification_status\": false, \"hide_modify_alert\": false, \"company_website_url\": \"https://your-website.com/\", \"company_privacy_policy_url\" : \"https://link-to-privacy-policy.com/\", \"contact_support_url\": \"https://link-to-contact-support.com/\", \"hide_contact_support_url\": false, \"hide_logo_url\" : false } } ``` + * @param createEmailCustomizationRequest + */ + createEmailCustomization(createEmailCustomizationRequest, _options) { + return __async(this, null, function* () { + var _a, _b, _c; + let _config = _options || this.configuration; + if (createEmailCustomizationRequest === null || createEmailCustomizationRequest === void 0) { + throw new RequiredError("ThoughtSpotRestApi", "createEmailCustomization", "createEmailCustomizationRequest"); + } + const localVarPath = "/api/rest/2.0/customization/email"; + const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.25.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.25.0"); + const contentType = ObjectSerializer.getPreferredMediaType([ + "application/json" + ]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = ObjectSerializer.stringify( + ObjectSerializer.serialize(createEmailCustomizationRequest, "CreateEmailCustomizationRequest", ""), + contentType + ); + requestContext.setBody(serializedBody); + let authMethod; + authMethod = _config.authMethods["bearerAuth"]; + if (authMethod == null ? void 0 : authMethod.applySecurityAuthentication) { + yield authMethod == null ? void 0 : authMethod.applySecurityAuthentication(requestContext); + } + const defaultAuth = ((_a = _options == null ? void 0 : _options.authMethods) == null ? void 0 : _a.default) || ((_c = (_b = this.configuration) == null ? void 0 : _b.authMethods) == null ? void 0 : _c.default); + if (defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication) { + yield defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication(requestContext); + } + return requestContext; + }); + } + /** + * Version: 9.0.0.cl or later Creates an Org object. To use this API, the [Orgs](https://docs.thoughtspot.com/cloud/latest/orgs-overview) feature must be enabled in your cluster. Requires cluster administration (**Can administer Org**) privileges. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `ORG_ADMINISTRATION` (**Can manage Orgs**) privilege is required. + * @param createOrgRequest + */ + createOrg(createOrgRequest, _options) { + return __async(this, null, function* () { + var _a, _b, _c; + let _config = _options || this.configuration; + if (createOrgRequest === null || createOrgRequest === void 0) { + throw new RequiredError("ThoughtSpotRestApi", "createOrg", "createOrgRequest"); + } + const localVarPath = "/api/rest/2.0/orgs/create"; + const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.25.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.25.0"); + const contentType = ObjectSerializer.getPreferredMediaType([ + "application/json" + ]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = ObjectSerializer.stringify( + ObjectSerializer.serialize(createOrgRequest, "CreateOrgRequest", ""), + contentType + ); + requestContext.setBody(serializedBody); + let authMethod; + authMethod = _config.authMethods["bearerAuth"]; + if (authMethod == null ? void 0 : authMethod.applySecurityAuthentication) { + yield authMethod == null ? void 0 : authMethod.applySecurityAuthentication(requestContext); + } + const defaultAuth = ((_a = _options == null ? void 0 : _options.authMethods) == null ? void 0 : _a.default) || ((_c = (_b = this.configuration) == null ? void 0 : _b.authMethods) == null ? void 0 : _c.default); + if (defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication) { + yield defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication(requestContext); + } + return requestContext; + }); + } + /** + * Version: 9.5.0.cl or later Creates a Role object in ThoughtSpot. Available only if [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance. To create a Role, the `ROLE_ADMINISTRATION` (**Can manage roles**) privilege is required. + * @param createRoleRequest + */ + createRole(createRoleRequest, _options) { + return __async(this, null, function* () { + var _a, _b, _c; + let _config = _options || this.configuration; + if (createRoleRequest === null || createRoleRequest === void 0) { + throw new RequiredError("ThoughtSpotRestApi", "createRole", "createRoleRequest"); + } + const localVarPath = "/api/rest/2.0/roles/create"; + const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.25.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.25.0"); + const contentType = ObjectSerializer.getPreferredMediaType([ + "application/json" + ]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = ObjectSerializer.stringify( + ObjectSerializer.serialize(createRoleRequest, "CreateRoleRequest", ""), + contentType + ); + requestContext.setBody(serializedBody); + let authMethod; + authMethod = _config.authMethods["bearerAuth"]; + if (authMethod == null ? void 0 : authMethod.applySecurityAuthentication) { + yield authMethod == null ? void 0 : authMethod.applySecurityAuthentication(requestContext); + } + const defaultAuth = ((_a = _options == null ? void 0 : _options.authMethods) == null ? void 0 : _a.default) || ((_c = (_b = this.configuration) == null ? void 0 : _b.authMethods) == null ? void 0 : _c.default); + if (defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication) { + yield defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication(requestContext); + } + return requestContext; + }); + } + /** + * Create schedule. Version: 9.4.0.cl or later Creates a Liveboard schedule job. Requires at least edit access to Liveboards. To create a schedule on behalf of another user, you need `ADMINISTRATION` (**Can administer Org**) or `JOBSCHEDULING` (**Can schedule for others**) privilege and edit access to the Liveboard. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `JOBSCHEDULING` (**Can schedule for others**) privilege is required. #### Usage guidelines * The description text is mandatory. The description text appears as **Description: ** in the Liveboard schedule email notifications. * For Liveboards with both charts and tables, schedule creation is only supported in PDF and XLS formats. Schedules created in CSV formats for such Liveboards will fail to run. If `PDF` is set as the `file_format`, enable `pdf_options` to get the correct attachment. Not doing so may cause the attachment to be rendered empty. * To include only specific visualizations, specify the visualization GUIDs in the `visualization_identifiers` array. * You can schedule a Liveboard job to run periodically by setting frequency parameters. You can set the schedule to run daily, weekly, monthly or every n minutes or hours. The scheduled job can also be configured to run at a specific time of the day or on specific days of the week or month. Please ensure that when setting the schedule frequency for _minute of the object_, only values that are multiples of 5 are included. * If the `frequency` parameters are defined, you can set the time zone to a value that matches your server\'s time zone. For example, `US/Central`, `Etc/UTC`, `CET`. The default time zone is `America/Los_Angeles`. For more information about Liveboard jobs, see [ThoughtSpot Product Documentation](https://docs.thoughtspot.com/cloud/latest/liveboard-schedule). + * @param createScheduleRequest + */ + createSchedule(createScheduleRequest, _options) { + return __async(this, null, function* () { + var _a, _b, _c; + let _config = _options || this.configuration; + if (createScheduleRequest === null || createScheduleRequest === void 0) { + throw new RequiredError("ThoughtSpotRestApi", "createSchedule", "createScheduleRequest"); + } + const localVarPath = "/api/rest/2.0/schedules/create"; + const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.25.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.25.0"); + const contentType = ObjectSerializer.getPreferredMediaType([ + "application/json" + ]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = ObjectSerializer.stringify( + ObjectSerializer.serialize(createScheduleRequest, "CreateScheduleRequest", ""), + contentType + ); + requestContext.setBody(serializedBody); + let authMethod; + authMethod = _config.authMethods["bearerAuth"]; + if (authMethod == null ? void 0 : authMethod.applySecurityAuthentication) { + yield authMethod == null ? void 0 : authMethod.applySecurityAuthentication(requestContext); + } + const defaultAuth = ((_a = _options == null ? void 0 : _options.authMethods) == null ? void 0 : _a.default) || ((_c = (_b = this.configuration) == null ? void 0 : _b.authMethods) == null ? void 0 : _c.default); + if (defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication) { + yield defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication(requestContext); + } + return requestContext; + }); + } + /** + * Version: 9.0.0.cl or later Creates a tag object. Tags are labels that identify a metadata object. For example, you can create a tag to designate subject areas, such as sales, HR, marketing, and finance. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `TAGMANAGEMENT` (**Can manage tags**) privilege is required to create, edit, and delete tags. + * @param createTagRequest + */ + createTag(createTagRequest, _options) { + return __async(this, null, function* () { + var _a, _b, _c; + let _config = _options || this.configuration; + if (createTagRequest === null || createTagRequest === void 0) { + throw new RequiredError("ThoughtSpotRestApi", "createTag", "createTagRequest"); + } + const localVarPath = "/api/rest/2.0/tags/create"; + const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.25.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.25.0"); + const contentType = ObjectSerializer.getPreferredMediaType([ + "application/json" + ]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = ObjectSerializer.stringify( + ObjectSerializer.serialize(createTagRequest, "CreateTagRequest", ""), + contentType + ); + requestContext.setBody(serializedBody); + let authMethod; + authMethod = _config.authMethods["bearerAuth"]; + if (authMethod == null ? void 0 : authMethod.applySecurityAuthentication) { + yield authMethod == null ? void 0 : authMethod.applySecurityAuthentication(requestContext); + } + const defaultAuth = ((_a = _options == null ? void 0 : _options.authMethods) == null ? void 0 : _a.default) || ((_c = (_b = this.configuration) == null ? void 0 : _b.authMethods) == null ? void 0 : _c.default); + if (defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication) { + yield defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication(requestContext); + } + return requestContext; + }); + } + /** + * Version: 9.0.0.cl or later Creates a user in ThoughtSpot. The API endpoint allows you to configure several user properties such as email address, account status, share notification preferences, and sharing visibility. You can provision the user to [groups](https://docs.thoughtspot.com/cloud/latest/groups-privileges) and [Orgs](https://docs.thoughtspot.com/cloud/latest/orgs-overview). You can also add Liveboard, Answer, and Worksheet objects to the user’s favorites list, assign a default Liveboard for the user, and set user preferences. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `USER_ADMINISTRATION` (**Can manage users**) privilege is required. + * @param createUserRequest + */ + createUser(createUserRequest, _options) { + return __async(this, null, function* () { + var _a, _b, _c; + let _config = _options || this.configuration; + if (createUserRequest === null || createUserRequest === void 0) { + throw new RequiredError("ThoughtSpotRestApi", "createUser", "createUserRequest"); + } + const localVarPath = "/api/rest/2.0/users/create"; + const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.25.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.25.0"); + const contentType = ObjectSerializer.getPreferredMediaType([ + "application/json" + ]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = ObjectSerializer.stringify( + ObjectSerializer.serialize(createUserRequest, "CreateUserRequest", ""), + contentType + ); + requestContext.setBody(serializedBody); + let authMethod; + authMethod = _config.authMethods["bearerAuth"]; + if (authMethod == null ? void 0 : authMethod.applySecurityAuthentication) { + yield authMethod == null ? void 0 : authMethod.applySecurityAuthentication(requestContext); + } + const defaultAuth = ((_a = _options == null ? void 0 : _options.authMethods) == null ? void 0 : _a.default) || ((_c = (_b = this.configuration) == null ? void 0 : _b.authMethods) == null ? void 0 : _c.default); + if (defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication) { + yield defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication(requestContext); + } + return requestContext; + }); + } + /** + * Version: 9.0.0.cl or later Creates a group object in ThoughtSpot. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `GROUP_ADMINISTRATION` (**Can manage groups**) privilege is required. #### About groups Groups in ThoughtSpot are used by the administrators to define privileges and organize users based on their roles and access requirements. To know more about groups and privileges, see [ThoughtSpot Product Documentation](https://docs.thoughtspot.com/cloud/latest/groups-privileges). #### Supported operations The API endpoint lets you perform the following operations: * Assign privileges * Add users * Define sharing visibility * Add sub-groups * Assign a default Liveboard + * @param createUserGroupRequest + */ + createUserGroup(createUserGroupRequest, _options) { + return __async(this, null, function* () { + var _a, _b, _c; + let _config = _options || this.configuration; + if (createUserGroupRequest === null || createUserGroupRequest === void 0) { + throw new RequiredError("ThoughtSpotRestApi", "createUserGroup", "createUserGroupRequest"); + } + const localVarPath = "/api/rest/2.0/groups/create"; + const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.25.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.25.0"); + const contentType = ObjectSerializer.getPreferredMediaType([ + "application/json" + ]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = ObjectSerializer.stringify( + ObjectSerializer.serialize(createUserGroupRequest, "CreateUserGroupRequest", ""), + contentType + ); + requestContext.setBody(serializedBody); + let authMethod; + authMethod = _config.authMethods["bearerAuth"]; + if (authMethod == null ? void 0 : authMethod.applySecurityAuthentication) { + yield authMethod == null ? void 0 : authMethod.applySecurityAuthentication(requestContext); + } + const defaultAuth = ((_a = _options == null ? void 0 : _options.authMethods) == null ? void 0 : _a.default) || ((_c = (_b = this.configuration) == null ? void 0 : _b.authMethods) == null ? void 0 : _c.default); + if (defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication) { + yield defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication(requestContext); + } + return requestContext; + }); + } + /** + * Create a variable which can be used for parameterizing metadata objects Version: 26.4.0.cl or later Allows creating a variable which can be used for parameterizing metadata objects in ThoughtSpot. Requires ADMINISTRATION role and TENANT scope. The CAN_MANAGE_VARIABLES permission allows you to manage Formula Variables in the current organization scope. The API endpoint supports the following types of variables: * CONNECTION_PROPERTY - For connection properties * TABLE_MAPPING - For table mappings * CONNECTION_PROPERTY_PER_PRINCIPAL - For connection properties per principal. In order to use this please contact support to enable this. * FORMULA_VARIABLE - For Formula variables, introduced in 10.15.0.cl When creating a variable, you need to specify: * The variable type * A unique name for the variable * Whether the variable contains sensitive values (defaults to false) * The data type of the variable, only specify for formula variables (defaults to null) The operation will fail if: * The user lacks required permissions * The variable name already exists * The variable type is invalid + * @param createVariableRequest + */ + createVariable(createVariableRequest, _options) { + return __async(this, null, function* () { + var _a, _b, _c; + let _config = _options || this.configuration; + if (createVariableRequest === null || createVariableRequest === void 0) { + throw new RequiredError("ThoughtSpotRestApi", "createVariable", "createVariableRequest"); + } + const localVarPath = "/api/rest/2.0/template/variables/create"; + const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.25.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.25.0"); + const contentType = ObjectSerializer.getPreferredMediaType([ + "application/json" + ]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = ObjectSerializer.stringify( + ObjectSerializer.serialize(createVariableRequest, "CreateVariableRequest", ""), + contentType + ); + requestContext.setBody(serializedBody); + let authMethod; + authMethod = _config.authMethods["bearerAuth"]; + if (authMethod == null ? void 0 : authMethod.applySecurityAuthentication) { + yield authMethod == null ? void 0 : authMethod.applySecurityAuthentication(requestContext); + } + const defaultAuth = ((_a = _options == null ? void 0 : _options.authMethods) == null ? void 0 : _a.default) || ((_c = (_b = this.configuration) == null ? void 0 : _b.authMethods) == null ? void 0 : _c.default); + if (defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication) { + yield defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication(requestContext); + } + return requestContext; + }); + } + /** + * Version: 10.14.0.cl or later Creates a new webhook configuration to receive notifications for specified events. The webhook will be triggered when the configured events occur in the system. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) or `DEVELOPER` (**Has developer privilege**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, users with `CAN_MANAGE_WEBHOOKS` (**Can manage webhooks**) privilege are also authorized to perform this action. + * @param createWebhookConfigurationRequest + */ + createWebhookConfiguration(createWebhookConfigurationRequest, _options) { + return __async(this, null, function* () { + var _a, _b, _c; + let _config = _options || this.configuration; + if (createWebhookConfigurationRequest === null || createWebhookConfigurationRequest === void 0) { + throw new RequiredError("ThoughtSpotRestApi", "createWebhookConfiguration", "createWebhookConfigurationRequest"); + } + const localVarPath = "/api/rest/2.0/webhooks/create"; + const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.25.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.25.0"); + const contentType = ObjectSerializer.getPreferredMediaType([ + "application/json" + ]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = ObjectSerializer.stringify( + ObjectSerializer.serialize(createWebhookConfigurationRequest, "CreateWebhookConfigurationRequest", ""), + contentType + ); + requestContext.setBody(serializedBody); + let authMethod; + authMethod = _config.authMethods["bearerAuth"]; + if (authMethod == null ? void 0 : authMethod.applySecurityAuthentication) { + yield authMethod == null ? void 0 : authMethod.applySecurityAuthentication(requestContext); + } + const defaultAuth = ((_a = _options == null ? void 0 : _options.authMethods) == null ? void 0 : _a.default) || ((_c = (_b = this.configuration) == null ? void 0 : _b.authMethods) == null ? void 0 : _c.default); + if (defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication) { + yield defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication(requestContext); + } + return requestContext; + }); + } + /** + * Version: 9.9.0.cl or later Creates a DBT connection object in ThoughtSpot. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege or `DATAMANAGEMENT` (**Can manage data**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the following Data control privileges may be required: - `CAN_MANAGE_CUSTOM_CALENDAR`(**Can manage custom calendars**) - `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) - `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` (**Can manage data models**) #### About create DBT connection DBT connection in ThoughtSpot is used by the user to define DBT credentials for cloud . The API needs embrace connection, embrace database name, DBT url, import type, DBT account identifier, DBT project identifier, DBT access token and environment details (or) embrace connection, embrace database name, import type, file_content to create a connection object. To know more about DBT, see ThoughtSpot Product Documentation. + * @param connectionName Name of the connection. + * @param databaseName Name of the Database. + * @param importType Mention type of Import + * @param accessToken Access token is mandatory when Import_Type is DBT_CLOUD. + * @param dbtUrl DBT URL is mandatory when Import_Type is DBT_CLOUD. + * @param accountId Account ID is mandatory when Import_Type is DBT_CLOUD + * @param projectId Project ID is mandatory when Import_Type is DBT_CLOUD + * @param dbtEnvId DBT Environment ID\\\" + * @param projectName Name of the project + * @param fileContent Upload DBT Manifest and Catalog artifact files as a ZIP file. This field is Mandatory when Import Type is \\\'ZIP_FILE\\\' + */ + dbtConnection(connectionName, databaseName, importType, accessToken, dbtUrl, accountId, projectId, dbtEnvId, projectName, fileContent, _options) { + return __async(this, null, function* () { + var _a, _b, _c; + let _config = _options || this.configuration; + if (connectionName === null || connectionName === void 0) { + throw new RequiredError("ThoughtSpotRestApi", "dbtConnection", "connectionName"); + } + if (databaseName === null || databaseName === void 0) { + throw new RequiredError("ThoughtSpotRestApi", "dbtConnection", "databaseName"); + } + const localVarPath = "/api/rest/2.0/dbt/dbt-connection"; + const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.25.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.25.0"); + const useForm = canConsumeForm([ + "multipart/form-data" + ]); + let localVarFormParams; + if (useForm) { + localVarFormParams = new FormData(); + } else { + localVarFormParams = new URLSearchParams(); + } + if (connectionName !== void 0) { + localVarFormParams.append("connection_name", connectionName); + } + if (databaseName !== void 0) { + localVarFormParams.append("database_name", databaseName); + } + if (importType !== void 0) { + localVarFormParams.append("import_type", importType); + } + if (accessToken !== void 0) { + localVarFormParams.append("access_token", accessToken); + } + if (dbtUrl !== void 0) { + localVarFormParams.append("dbt_url", dbtUrl); + } + if (accountId !== void 0) { + localVarFormParams.append("account_id", accountId); + } + if (projectId !== void 0) { + localVarFormParams.append("project_id", projectId); + } + if (dbtEnvId !== void 0) { + localVarFormParams.append("dbt_env_id", dbtEnvId); + } + if (projectName !== void 0) { + localVarFormParams.append("project_name", projectName); + } + if (fileContent !== void 0) { + if (localVarFormParams instanceof FormData) { + localVarFormParams.append("file_content", fileContent, fileContent.name); + } + } + requestContext.setBody(localVarFormParams); + if (!useForm) { + const contentType = ObjectSerializer.getPreferredMediaType([ + "multipart/form-data" + ]); + requestContext.setHeaderParam("Content-Type", contentType); + } + let authMethod; + authMethod = _config.authMethods["bearerAuth"]; + if (authMethod == null ? void 0 : authMethod.applySecurityAuthentication) { + yield authMethod == null ? void 0 : authMethod.applySecurityAuthentication(requestContext); + } + const defaultAuth = ((_a = _options == null ? void 0 : _options.authMethods) == null ? void 0 : _a.default) || ((_c = (_b = this.configuration) == null ? void 0 : _b.authMethods) == null ? void 0 : _c.default); + if (defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication) { + yield defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication(requestContext); + } + return requestContext; + }); + } + /** + * Version: 9.9.0.cl or later Resynchronize the existing list of models, tables, worksheet tml’s and import them to Thoughtspot based on the DBT connection object. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege or `DATAMANAGEMENT` (**Can manage data**) privilege, along with an existing DBT connection. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the following data control privileges may be required: - `CAN_MANAGE_CUSTOM_CALENDAR`(**Can manage custom calendars**) - `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) - `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` (**Can manage data models**) + * @param dbtConnectionIdentifier Unique ID of the DBT connection. + * @param fileContent Upload DBT Manifest and Catalog artifact files as a ZIP file. This field is mandatory if the connection was created with import_type ‘ZIP_FILE’ + */ + dbtGenerateSyncTml(dbtConnectionIdentifier, fileContent, _options) { + return __async(this, null, function* () { + var _a, _b, _c; + let _config = _options || this.configuration; + if (dbtConnectionIdentifier === null || dbtConnectionIdentifier === void 0) { + throw new RequiredError("ThoughtSpotRestApi", "dbtGenerateSyncTml", "dbtConnectionIdentifier"); + } + const localVarPath = "/api/rest/2.0/dbt/generate-sync-tml"; + const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.25.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.25.0"); + const useForm = canConsumeForm([ + "multipart/form-data" + ]); + let localVarFormParams; + if (useForm) { + localVarFormParams = new FormData(); + } else { + localVarFormParams = new URLSearchParams(); + } + if (dbtConnectionIdentifier !== void 0) { + localVarFormParams.append("dbt_connection_identifier", dbtConnectionIdentifier); + } + if (fileContent !== void 0) { + if (localVarFormParams instanceof FormData) { + localVarFormParams.append("file_content", fileContent, fileContent.name); + } + } + requestContext.setBody(localVarFormParams); + if (!useForm) { + const contentType = ObjectSerializer.getPreferredMediaType([ + "multipart/form-data" + ]); + requestContext.setHeaderParam("Content-Type", contentType); + } + let authMethod; + authMethod = _config.authMethods["bearerAuth"]; + if (authMethod == null ? void 0 : authMethod.applySecurityAuthentication) { + yield authMethod == null ? void 0 : authMethod.applySecurityAuthentication(requestContext); + } + const defaultAuth = ((_a = _options == null ? void 0 : _options.authMethods) == null ? void 0 : _a.default) || ((_c = (_b = this.configuration) == null ? void 0 : _b.authMethods) == null ? void 0 : _c.default); + if (defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication) { + yield defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication(requestContext); + } + return requestContext; + }); + } + /** + * Version: 9.9.0.cl or later Generate required table and worksheet and import them. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege or `DATAMANAGEMENT` (**Can manage data**) privilege, along with an existing DBT connection. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the following data control privileges may be required: - `CAN_MANAGE_CUSTOM_CALENDAR`(**Can manage custom calendars**) - `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) - `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` (**Can manage data models**) #### About generate TML Models and Worksheets to be imported can be selected by the user as part of the API. + * @param dbtConnectionIdentifier Unique ID of the DBT connection. + * @param modelTables List of Models and their respective Tables Example: \\\'[{\\\"model_name\\\": \\\"model_name\\\", \\\"tables\\\": [\\\"table_name\\\"]}]\\\' + * @param importWorksheets Mention the worksheet tmls to import + * @param worksheets List of worksheets is mandatory when import_Worksheets is type SELECTED Example: [\\\"worksheet_name\\\"] + * @param fileContent Upload DBT Manifest and Catalog artifact files as a ZIP file. This field is mandatory if the connection was created with import_type ‘ZIP_FILE’ + */ + dbtGenerateTml(dbtConnectionIdentifier, modelTables, importWorksheets, worksheets, fileContent, _options) { + return __async(this, null, function* () { + var _a, _b, _c; + let _config = _options || this.configuration; + if (dbtConnectionIdentifier === null || dbtConnectionIdentifier === void 0) { + throw new RequiredError("ThoughtSpotRestApi", "dbtGenerateTml", "dbtConnectionIdentifier"); + } + if (modelTables === null || modelTables === void 0) { + throw new RequiredError("ThoughtSpotRestApi", "dbtGenerateTml", "modelTables"); + } + if (importWorksheets === null || importWorksheets === void 0) { + throw new RequiredError("ThoughtSpotRestApi", "dbtGenerateTml", "importWorksheets"); + } + const localVarPath = "/api/rest/2.0/dbt/generate-tml"; + const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.25.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.25.0"); + const useForm = canConsumeForm([ + "multipart/form-data" + ]); + let localVarFormParams; + if (useForm) { + localVarFormParams = new FormData(); + } else { + localVarFormParams = new URLSearchParams(); + } + if (dbtConnectionIdentifier !== void 0) { + localVarFormParams.append("dbt_connection_identifier", dbtConnectionIdentifier); + } + if (modelTables !== void 0) { + localVarFormParams.append("model_tables", modelTables); + } + if (importWorksheets !== void 0) { + localVarFormParams.append("import_worksheets", importWorksheets); + } + if (worksheets !== void 0) { + localVarFormParams.append("worksheets", worksheets); + } + if (fileContent !== void 0) { + if (localVarFormParams instanceof FormData) { + localVarFormParams.append("file_content", fileContent, fileContent.name); + } + } + requestContext.setBody(localVarFormParams); + if (!useForm) { + const contentType = ObjectSerializer.getPreferredMediaType([ + "multipart/form-data" + ]); + requestContext.setHeaderParam("Content-Type", contentType); + } + let authMethod; + authMethod = _config.authMethods["bearerAuth"]; + if (authMethod == null ? void 0 : authMethod.applySecurityAuthentication) { + yield authMethod == null ? void 0 : authMethod.applySecurityAuthentication(requestContext); + } + const defaultAuth = ((_a = _options == null ? void 0 : _options.authMethods) == null ? void 0 : _a.default) || ((_c = (_b = this.configuration) == null ? void 0 : _b.authMethods) == null ? void 0 : _c.default); + if (defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication) { + yield defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication(requestContext); + } + return requestContext; + }); + } + /** + * Version: 9.9.0.cl or later Gets a list of DBT connection objects by user and organization, available on the ThoughtSpot system. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege or `DATAMANAGEMENT` (**Can manage data**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the following Data control privileges may be required: - `CAN_MANAGE_CUSTOM_CALENDAR`(**Can manage custom calendars**) - `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) - `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` (**Can manage data models**) #### About search DBT connection To get details of a specific DBT connection identifier, database connection identifier, database connection name, database name, project name, project identifier, environment identifier , import type and author. + */ + dbtSearch(_options) { + return __async(this, null, function* () { + var _a, _b, _c; + let _config = _options || this.configuration; + const localVarPath = "/api/rest/2.0/dbt/search"; + const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.25.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.25.0"); + let authMethod; + authMethod = _config.authMethods["bearerAuth"]; + if (authMethod == null ? void 0 : authMethod.applySecurityAuthentication) { + yield authMethod == null ? void 0 : authMethod.applySecurityAuthentication(requestContext); + } + const defaultAuth = ((_a = _options == null ? void 0 : _options.authMethods) == null ? void 0 : _a.default) || ((_c = (_b = this.configuration) == null ? void 0 : _b.authMethods) == null ? void 0 : _c.default); + if (defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication) { + yield defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication(requestContext); + } + return requestContext; + }); + } + /** + * Version: 9.7.0.cl or later Deactivates a user account. Requires `ADMINISTRATION` (**Can administer Thoughtspot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `USER_ADMINISTRATION` (**Can manage users**) privilege is required. To deactivate a user account, the API request body must include the following information: - Username or the GUID of the user account - Base URL of the ThoughtSpot instance If the API request is successful, ThoughtSpot returns the activation URL in the response. The activation URL is valid for 14 days and can be used to re-activate the account and reset the password of the deactivated account. + * @param deactivateUserRequest + */ + deactivateUser(deactivateUserRequest, _options) { + return __async(this, null, function* () { + var _a, _b, _c; + let _config = _options || this.configuration; + if (deactivateUserRequest === null || deactivateUserRequest === void 0) { + throw new RequiredError("ThoughtSpotRestApi", "deactivateUser", "deactivateUserRequest"); + } + const localVarPath = "/api/rest/2.0/users/deactivate"; + const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.25.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.25.0"); + const contentType = ObjectSerializer.getPreferredMediaType([ + "application/json" + ]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = ObjectSerializer.stringify( + ObjectSerializer.serialize(deactivateUserRequest, "DeactivateUserRequest", ""), + contentType + ); + requestContext.setBody(serializedBody); + let authMethod; + authMethod = _config.authMethods["bearerAuth"]; + if (authMethod == null ? void 0 : authMethod.applySecurityAuthentication) { + yield authMethod == null ? void 0 : authMethod.applySecurityAuthentication(requestContext); + } + const defaultAuth = ((_a = _options == null ? void 0 : _options.authMethods) == null ? void 0 : _a.default) || ((_c = (_b = this.configuration) == null ? void 0 : _b.authMethods) == null ? void 0 : _c.default); + if (defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication) { + yield defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication(requestContext); + } + return requestContext; + }); + } + /** + * Version: 10.12.0.cl or later Deletes a [custom calendar](https://docs.thoughtspot.com/cloud/latest/connections-cust-cal). Requires `DATAMANAGEMENT` (**Can manage data**) or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your ThoughtSpot instance, the `CAN_MANAGE_CUSTOM_CALENDAR` (**Can manage custom calendars**) privilege is required. #### Usage guidelines To delete a custom calendar, specify the calendar ID as a path parameter in the request URL. + * @param calendarIdentifier Unique ID or name of the Calendar. + */ + deleteCalendar(calendarIdentifier, _options) { + return __async(this, null, function* () { + var _a, _b, _c; + let _config = _options || this.configuration; + if (calendarIdentifier === null || calendarIdentifier === void 0) { + throw new RequiredError("ThoughtSpotRestApi", "deleteCalendar", "calendarIdentifier"); + } + const localVarPath = "/api/rest/2.0/calendars/{calendar_identifier}/delete".replace("{calendar_identifier}", encodeURIComponent(String(calendarIdentifier))); + const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.25.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.25.0"); + let authMethod; + authMethod = _config.authMethods["bearerAuth"]; + if (authMethod == null ? void 0 : authMethod.applySecurityAuthentication) { + yield authMethod == null ? void 0 : authMethod.applySecurityAuthentication(requestContext); + } + const defaultAuth = ((_a = _options == null ? void 0 : _options.authMethods) == null ? void 0 : _a.default) || ((_c = (_b = this.configuration) == null ? void 0 : _b.authMethods) == null ? void 0 : _c.default); + if (defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication) { + yield defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication(requestContext); + } + return requestContext; + }); + } + /** + * Version: 26.4.0.cl or later Deletes one or more collections from ThoughtSpot. #### Delete options * **delete_children**: When set to `true`, deletes the child objects (metadata items) within the collection that the user has access to. Objects that the user does not have permission to delete will be skipped. * **dry_run**: When set to `true`, performs a preview of the deletion operation without actually deleting anything. The response shows what would be deleted, allowing you to review before committing the deletion. #### Response The response includes: * **metadata_deleted**: List of metadata objects that were successfully deleted * **metadata_skipped**: List of metadata objects that were skipped due to lack of permissions or other constraints + * @param deleteCollectionRequest + */ + deleteCollection(deleteCollectionRequest, _options) { + return __async(this, null, function* () { + var _a, _b, _c; + let _config = _options || this.configuration; + if (deleteCollectionRequest === null || deleteCollectionRequest === void 0) { + throw new RequiredError("ThoughtSpotRestApi", "deleteCollection", "deleteCollectionRequest"); + } + const localVarPath = "/api/rest/2.0/collections/delete"; + const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.25.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.25.0"); + const contentType = ObjectSerializer.getPreferredMediaType([ + "application/json" + ]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = ObjectSerializer.stringify( + ObjectSerializer.serialize(deleteCollectionRequest, "DeleteCollectionRequest", ""), + contentType + ); + requestContext.setBody(serializedBody); + let authMethod; + authMethod = _config.authMethods["bearerAuth"]; + if (authMethod == null ? void 0 : authMethod.applySecurityAuthentication) { + yield authMethod == null ? void 0 : authMethod.applySecurityAuthentication(requestContext); + } + const defaultAuth = ((_a = _options == null ? void 0 : _options.authMethods) == null ? void 0 : _a.default) || ((_c = (_b = this.configuration) == null ? void 0 : _b.authMethods) == null ? void 0 : _c.default); + if (defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication) { + yield defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication(requestContext); + } + return requestContext; + }); + } + /** + * Version: 9.2.0.cl or later Deletes Git repository configuration from your ThoughtSpot instance. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance on your instance, the `CAN_SETUP_VERSION_CONTROL` (**Can set up version control**) privilege. + * @param deleteConfigRequest + */ + deleteConfig(deleteConfigRequest, _options) { + return __async(this, null, function* () { + var _a, _b, _c; + let _config = _options || this.configuration; + if (deleteConfigRequest === null || deleteConfigRequest === void 0) { + throw new RequiredError("ThoughtSpotRestApi", "deleteConfig", "deleteConfigRequest"); + } + const localVarPath = "/api/rest/2.0/vcs/git/config/delete"; + const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.25.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.25.0"); + const contentType = ObjectSerializer.getPreferredMediaType([ + "application/json" + ]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = ObjectSerializer.stringify( + ObjectSerializer.serialize(deleteConfigRequest, "DeleteConfigRequest", ""), + contentType + ); + requestContext.setBody(serializedBody); + let authMethod; + authMethod = _config.authMethods["bearerAuth"]; + if (authMethod == null ? void 0 : authMethod.applySecurityAuthentication) { + yield authMethod == null ? void 0 : authMethod.applySecurityAuthentication(requestContext); + } + const defaultAuth = ((_a = _options == null ? void 0 : _options.authMethods) == null ? void 0 : _a.default) || ((_c = (_b = this.configuration) == null ? void 0 : _b.authMethods) == null ? void 0 : _c.default); + if (defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication) { + yield defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication(requestContext); + } + return requestContext; + }); + } + /** + * Version: 9.2.0.cl or later **Important**: This endpoint is deprecated and will be removed from ThoughtSpot in September 2025. ThoughtSpot strongly recommends using the [Delete Connection V2](#/http/api-endpoints/connections/delete-connection-v2) endpoint to delete your connection objects. #### Usage guidelines Deletes a connection object. Requires `DATAMANAGEMENT` (**Can manage data**) and edit permissions to the connection object, or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) privilege is required. **Note**: If a connection has dependent objects, make sure you remove its associations before the delete operation. + * @param deleteConnectionRequest + */ + deleteConnection(deleteConnectionRequest, _options) { + return __async(this, null, function* () { + var _a, _b, _c; + let _config = _options || this.configuration; + if (deleteConnectionRequest === null || deleteConnectionRequest === void 0) { + throw new RequiredError("ThoughtSpotRestApi", "deleteConnection", "deleteConnectionRequest"); + } + const localVarPath = "/api/rest/2.0/connection/delete"; + const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.25.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.25.0"); + const contentType = ObjectSerializer.getPreferredMediaType([ + "application/json" + ]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = ObjectSerializer.stringify( + ObjectSerializer.serialize(deleteConnectionRequest, "DeleteConnectionRequest", ""), + contentType + ); + requestContext.setBody(serializedBody); + let authMethod; + authMethod = _config.authMethods["bearerAuth"]; + if (authMethod == null ? void 0 : authMethod.applySecurityAuthentication) { + yield authMethod == null ? void 0 : authMethod.applySecurityAuthentication(requestContext); + } + const defaultAuth = ((_a = _options == null ? void 0 : _options.authMethods) == null ? void 0 : _a.default) || ((_c = (_b = this.configuration) == null ? void 0 : _b.authMethods) == null ? void 0 : _c.default); + if (defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication) { + yield defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication(requestContext); + } + return requestContext; + }); + } + /** + * Version: 10.12.0.cl or later Deletes connection configuration objects. Requires `DATAMANAGEMENT` (**Can manage data**) and edit permissions to the connection object, or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) privilege is required. + * @param deleteConnectionConfigurationRequest + */ + deleteConnectionConfiguration(deleteConnectionConfigurationRequest, _options) { + return __async(this, null, function* () { + var _a, _b, _c; + let _config = _options || this.configuration; + if (deleteConnectionConfigurationRequest === null || deleteConnectionConfigurationRequest === void 0) { + throw new RequiredError("ThoughtSpotRestApi", "deleteConnectionConfiguration", "deleteConnectionConfigurationRequest"); + } + const localVarPath = "/api/rest/2.0/connection-configurations/delete"; + const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.25.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.25.0"); + const contentType = ObjectSerializer.getPreferredMediaType([ + "application/json" + ]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = ObjectSerializer.stringify( + ObjectSerializer.serialize(deleteConnectionConfigurationRequest, "DeleteConnectionConfigurationRequest", ""), + contentType + ); + requestContext.setBody(serializedBody); + let authMethod; + authMethod = _config.authMethods["bearerAuth"]; + if (authMethod == null ? void 0 : authMethod.applySecurityAuthentication) { + yield authMethod == null ? void 0 : authMethod.applySecurityAuthentication(requestContext); + } + const defaultAuth = ((_a = _options == null ? void 0 : _options.authMethods) == null ? void 0 : _a.default) || ((_c = (_b = this.configuration) == null ? void 0 : _b.authMethods) == null ? void 0 : _c.default); + if (defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication) { + yield defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication(requestContext); + } + return requestContext; + }); + } + /** + * Version: 10.4.0.cl or later Deletes a connection object. **Note**: If a connection has dependent objects, make sure you remove its associations before the delete operation. Requires `DATAMANAGEMENT` (**Can manage data**) and edit permissions to the connection object, or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) privilege is required. + * @param connectionIdentifier Unique ID or name of the connection. + */ + deleteConnectionV2(connectionIdentifier, _options) { + return __async(this, null, function* () { + var _a, _b, _c; + let _config = _options || this.configuration; + if (connectionIdentifier === null || connectionIdentifier === void 0) { + throw new RequiredError("ThoughtSpotRestApi", "deleteConnectionV2", "connectionIdentifier"); + } + const localVarPath = "/api/rest/2.0/connections/{connection_identifier}/delete".replace("{connection_identifier}", encodeURIComponent(String(connectionIdentifier))); + const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.25.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.25.0"); + let authMethod; + authMethod = _config.authMethods["bearerAuth"]; + if (authMethod == null ? void 0 : authMethod.applySecurityAuthentication) { + yield authMethod == null ? void 0 : authMethod.applySecurityAuthentication(requestContext); + } + const defaultAuth = ((_a = _options == null ? void 0 : _options.authMethods) == null ? void 0 : _a.default) || ((_c = (_b = this.configuration) == null ? void 0 : _b.authMethods) == null ? void 0 : _c.default); + if (defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication) { + yield defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication(requestContext); + } + return requestContext; + }); + } + /** + * Version: 9.6.0.cl or later Removes the custom action specified in the API request. Requires `DEVELOPER` (**Has Developer privilege**) or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `DEVELOPER` (**Has developer privilege**) privilege is required. + * @param customActionIdentifier Unique ID or name of the custom action. + */ + deleteCustomAction(customActionIdentifier, _options) { + return __async(this, null, function* () { + var _a, _b, _c; + let _config = _options || this.configuration; + if (customActionIdentifier === null || customActionIdentifier === void 0) { + throw new RequiredError("ThoughtSpotRestApi", "deleteCustomAction", "customActionIdentifier"); + } + const localVarPath = "/api/rest/2.0/customization/custom-actions/{custom_action_identifier}/delete".replace("{custom_action_identifier}", encodeURIComponent(String(customActionIdentifier))); + const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.25.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.25.0"); + let authMethod; + authMethod = _config.authMethods["bearerAuth"]; + if (authMethod == null ? void 0 : authMethod.applySecurityAuthentication) { + yield authMethod == null ? void 0 : authMethod.applySecurityAuthentication(requestContext); + } + const defaultAuth = ((_a = _options == null ? void 0 : _options.authMethods) == null ? void 0 : _a.default) || ((_c = (_b = this.configuration) == null ? void 0 : _b.authMethods) == null ? void 0 : _c.default); + if (defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication) { + yield defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication(requestContext); + } + return requestContext; + }); + } + /** + * Version: 9.9.0.cl or later Removes the specified DBT connection object from the ThoughtSpot system. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) or `DATAMANAGEMENT` (**Can manage data ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the following Data control privileges may be required: - `CAN_MANAGE_CUSTOM_CALENDAR`(**Can manage custom calendars**) - `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) - `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` (**Can manage data models**) + * @param dbtConnectionIdentifier Unique ID of the DBT Connection. + */ + deleteDbtConnection(dbtConnectionIdentifier, _options) { + return __async(this, null, function* () { + var _a, _b, _c; + let _config = _options || this.configuration; + if (dbtConnectionIdentifier === null || dbtConnectionIdentifier === void 0) { + throw new RequiredError("ThoughtSpotRestApi", "deleteDbtConnection", "dbtConnectionIdentifier"); + } + const localVarPath = "/api/rest/2.0/dbt/{dbt_connection_identifier}/delete".replace("{dbt_connection_identifier}", encodeURIComponent(String(dbtConnectionIdentifier))); + const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.25.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.25.0"); + let authMethod; + authMethod = _config.authMethods["bearerAuth"]; + if (authMethod == null ? void 0 : authMethod.applySecurityAuthentication) { + yield authMethod == null ? void 0 : authMethod.applySecurityAuthentication(requestContext); + } + const defaultAuth = ((_a = _options == null ? void 0 : _options.authMethods) == null ? void 0 : _a.default) || ((_c = (_b = this.configuration) == null ? void 0 : _b.authMethods) == null ? void 0 : _c.default); + if (defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication) { + yield defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication(requestContext); + } + return requestContext; + }); + } + /** + * Version: 10.10.0.cl or later Deletes the configuration for the email customization. #### Pre-requisites Requires `DEVELOPER` (**has developer privilege**) or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `DEVELOPER` (**Has developer privilege**) privilege is required. **NOTE**:This endpoint in currently in beta. Contact ThoughtSpot support to enable this on your instance. #### Usage guidelines - Call the search API endpoint to get the `template_identifier` from the response. - Use that `template_identifier` as a parameter in this API request. + * @param templateIdentifier Unique ID or name of the email customization. + */ + deleteEmailCustomization(templateIdentifier, _options) { + return __async(this, null, function* () { + var _a, _b, _c; + let _config = _options || this.configuration; + if (templateIdentifier === null || templateIdentifier === void 0) { + throw new RequiredError("ThoughtSpotRestApi", "deleteEmailCustomization", "templateIdentifier"); + } + const localVarPath = "/api/rest/2.0/customization/email/{template_identifier}/delete".replace("{template_identifier}", encodeURIComponent(String(templateIdentifier))); + const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.25.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.25.0"); + let authMethod; + authMethod = _config.authMethods["bearerAuth"]; + if (authMethod == null ? void 0 : authMethod.applySecurityAuthentication) { + yield authMethod == null ? void 0 : authMethod.applySecurityAuthentication(requestContext); + } + const defaultAuth = ((_a = _options == null ? void 0 : _options.authMethods) == null ? void 0 : _a.default) || ((_c = (_b = this.configuration) == null ? void 0 : _b.authMethods) == null ? void 0 : _c.default); + if (defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication) { + yield defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication(requestContext); + } + return requestContext; + }); + } + /** + * Version: 9.0.0.cl or later Removes the specified metadata object from the ThoughtSpot system. Requires edit access to the metadata object. + * @param deleteMetadataRequest + */ + deleteMetadata(deleteMetadataRequest, _options) { + return __async(this, null, function* () { + var _a, _b, _c; + let _config = _options || this.configuration; + if (deleteMetadataRequest === null || deleteMetadataRequest === void 0) { + throw new RequiredError("ThoughtSpotRestApi", "deleteMetadata", "deleteMetadataRequest"); + } + const localVarPath = "/api/rest/2.0/metadata/delete"; + const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.25.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.25.0"); + const contentType = ObjectSerializer.getPreferredMediaType([ + "application/json" + ]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = ObjectSerializer.stringify( + ObjectSerializer.serialize(deleteMetadataRequest, "DeleteMetadataRequest", ""), + contentType + ); + requestContext.setBody(serializedBody); + let authMethod; + authMethod = _config.authMethods["bearerAuth"]; + if (authMethod == null ? void 0 : authMethod.applySecurityAuthentication) { + yield authMethod == null ? void 0 : authMethod.applySecurityAuthentication(requestContext); + } + const defaultAuth = ((_a = _options == null ? void 0 : _options.authMethods) == null ? void 0 : _a.default) || ((_c = (_b = this.configuration) == null ? void 0 : _b.authMethods) == null ? void 0 : _c.default); + if (defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication) { + yield defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication(requestContext); + } + return requestContext; + }); + } + /** + * Version: 9.0.0.cl or later Deletes an Org object from the ThoughtSpot system. Requires cluster administration (**Can administer Org**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `ORG_ADMINISTRATION` (**Can manage Orgs**) privilege is required. When you delete an Org, all its users and objects created in that Org context are removed. However, if the users in the deleted Org also exists in other Orgs, they are removed only from the deleted Org. + * @param orgIdentifier ID or name of the Org + */ + deleteOrg(orgIdentifier, _options) { + return __async(this, null, function* () { + var _a, _b, _c; + let _config = _options || this.configuration; + if (orgIdentifier === null || orgIdentifier === void 0) { + throw new RequiredError("ThoughtSpotRestApi", "deleteOrg", "orgIdentifier"); + } + const localVarPath = "/api/rest/2.0/orgs/{org_identifier}/delete".replace("{org_identifier}", encodeURIComponent(String(orgIdentifier))); + const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.25.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.25.0"); + let authMethod; + authMethod = _config.authMethods["bearerAuth"]; + if (authMethod == null ? void 0 : authMethod.applySecurityAuthentication) { + yield authMethod == null ? void 0 : authMethod.applySecurityAuthentication(requestContext); + } + const defaultAuth = ((_a = _options == null ? void 0 : _options.authMethods) == null ? void 0 : _a.default) || ((_c = (_b = this.configuration) == null ? void 0 : _b.authMethods) == null ? void 0 : _c.default); + if (defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication) { + yield defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication(requestContext); + } + return requestContext; + }); + } + /** + * Version: 10.12.0.cl or later Deletes the configuration for the email customization. #### Pre-requisites Requires `DEVELOPER` (**has developer privilege**) or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `DEVELOPER` (**Has developer privilege**) privilege is required. **NOTE**:This endpoint in currently in beta. Contact ThoughtSpot support to enable this on your instance. #### Usage guidelines - Call the search API endpoint to get the `org_identifier` from the response. - Use that `org_identifier` as a parameter in this API request. + * @param deleteOrgEmailCustomizationRequest + */ + deleteOrgEmailCustomization(deleteOrgEmailCustomizationRequest, _options) { + return __async(this, null, function* () { + var _a, _b, _c; + let _config = _options || this.configuration; + if (deleteOrgEmailCustomizationRequest === null || deleteOrgEmailCustomizationRequest === void 0) { + throw new RequiredError("ThoughtSpotRestApi", "deleteOrgEmailCustomization", "deleteOrgEmailCustomizationRequest"); + } + const localVarPath = "/api/rest/2.0/customization/email/delete"; + const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.25.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.25.0"); + const contentType = ObjectSerializer.getPreferredMediaType([ + "application/json" + ]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = ObjectSerializer.stringify( + ObjectSerializer.serialize(deleteOrgEmailCustomizationRequest, "DeleteOrgEmailCustomizationRequest", ""), + contentType + ); + requestContext.setBody(serializedBody); + let authMethod; + authMethod = _config.authMethods["bearerAuth"]; + if (authMethod == null ? void 0 : authMethod.applySecurityAuthentication) { + yield authMethod == null ? void 0 : authMethod.applySecurityAuthentication(requestContext); + } + const defaultAuth = ((_a = _options == null ? void 0 : _options.authMethods) == null ? void 0 : _a.default) || ((_c = (_b = this.configuration) == null ? void 0 : _b.authMethods) == null ? void 0 : _c.default); + if (defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication) { + yield defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication(requestContext); + } + return requestContext; + }); + } + /** + * Version: 9.5.0.cl or later Deletes a Role object from the ThoughtSpot system. Available only if [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance. To delete a Role, the `ROLE_ADMINISTRATION` (**Can manage roles**) privilege is required. + * @param roleIdentifier Unique ID or name of the Role. ReadOnly roles cannot be deleted. + */ + deleteRole(roleIdentifier, _options) { + return __async(this, null, function* () { + var _a, _b, _c; + let _config = _options || this.configuration; + if (roleIdentifier === null || roleIdentifier === void 0) { + throw new RequiredError("ThoughtSpotRestApi", "deleteRole", "roleIdentifier"); + } + const localVarPath = "/api/rest/2.0/roles/{role_identifier}/delete".replace("{role_identifier}", encodeURIComponent(String(roleIdentifier))); + const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.25.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.25.0"); + let authMethod; + authMethod = _config.authMethods["bearerAuth"]; + if (authMethod == null ? void 0 : authMethod.applySecurityAuthentication) { + yield authMethod == null ? void 0 : authMethod.applySecurityAuthentication(requestContext); + } + const defaultAuth = ((_a = _options == null ? void 0 : _options.authMethods) == null ? void 0 : _a.default) || ((_c = (_b = this.configuration) == null ? void 0 : _b.authMethods) == null ? void 0 : _c.default); + if (defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication) { + yield defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication(requestContext); + } + return requestContext; + }); + } + /** + * Deletes a scheduled job. Version: 9.4.0.cl or later Deletes a scheduled Liveboard job. Requires at least edit access to Liveboard or `ADMINISTRATION` (**Can administer Org**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `JOBSCHEDULING` (**Can schedule for others**) privilege is required. + * @param scheduleIdentifier Unique ID or name of the scheduled job. + */ + deleteSchedule(scheduleIdentifier, _options) { + return __async(this, null, function* () { + var _a, _b, _c; + let _config = _options || this.configuration; + if (scheduleIdentifier === null || scheduleIdentifier === void 0) { + throw new RequiredError("ThoughtSpotRestApi", "deleteSchedule", "scheduleIdentifier"); + } + const localVarPath = "/api/rest/2.0/schedules/{schedule_identifier}/delete".replace("{schedule_identifier}", encodeURIComponent(String(scheduleIdentifier))); + const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.25.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.25.0"); + let authMethod; + authMethod = _config.authMethods["bearerAuth"]; + if (authMethod == null ? void 0 : authMethod.applySecurityAuthentication) { + yield authMethod == null ? void 0 : authMethod.applySecurityAuthentication(requestContext); + } + const defaultAuth = ((_a = _options == null ? void 0 : _options.authMethods) == null ? void 0 : _a.default) || ((_c = (_b = this.configuration) == null ? void 0 : _b.authMethods) == null ? void 0 : _c.default); + if (defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication) { + yield defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication(requestContext); + } + return requestContext; + }); + } + /** + * Version: 9.0.0.cl or later Deletes a tag object from the ThoughtSpot system Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `TAGMANAGEMENT` (**Can manage tags**) privilege is required to create, edit, and delete tags. + * @param tagIdentifier Tag identifier Tag name or Tag id. + */ + deleteTag(tagIdentifier, _options) { + return __async(this, null, function* () { + var _a, _b, _c; + let _config = _options || this.configuration; + if (tagIdentifier === null || tagIdentifier === void 0) { + throw new RequiredError("ThoughtSpotRestApi", "deleteTag", "tagIdentifier"); + } + const localVarPath = "/api/rest/2.0/tags/{tag_identifier}/delete".replace("{tag_identifier}", encodeURIComponent(String(tagIdentifier))); + const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.25.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.25.0"); + let authMethod; + authMethod = _config.authMethods["bearerAuth"]; + if (authMethod == null ? void 0 : authMethod.applySecurityAuthentication) { + yield authMethod == null ? void 0 : authMethod.applySecurityAuthentication(requestContext); + } + const defaultAuth = ((_a = _options == null ? void 0 : _options.authMethods) == null ? void 0 : _a.default) || ((_c = (_b = this.configuration) == null ? void 0 : _b.authMethods) == null ? void 0 : _c.default); + if (defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication) { + yield defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication(requestContext); + } + return requestContext; + }); + } + /** + * Version: 9.0.0.cl or later Deletes a user from the ThoughtSpot system. If you want to remove a user from a specific Org but not from ThoughtSpot, update the group and Org mapping properties of the user object via a POST API call to the [/api/rest/2.0/users/{user_identifier}/update](#/http/api-endpoints/users/update-user) endpoint. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `USER_ADMINISTRATION` (**Can manage users**) privilege is required. + * @param userIdentifier GUID / name of the user + */ + deleteUser(userIdentifier, _options) { + return __async(this, null, function* () { + var _a, _b, _c; + let _config = _options || this.configuration; + if (userIdentifier === null || userIdentifier === void 0) { + throw new RequiredError("ThoughtSpotRestApi", "deleteUser", "userIdentifier"); + } + const localVarPath = "/api/rest/2.0/users/{user_identifier}/delete".replace("{user_identifier}", encodeURIComponent(String(userIdentifier))); + const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.25.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.25.0"); + let authMethod; + authMethod = _config.authMethods["bearerAuth"]; + if (authMethod == null ? void 0 : authMethod.applySecurityAuthentication) { + yield authMethod == null ? void 0 : authMethod.applySecurityAuthentication(requestContext); + } + const defaultAuth = ((_a = _options == null ? void 0 : _options.authMethods) == null ? void 0 : _a.default) || ((_c = (_b = this.configuration) == null ? void 0 : _b.authMethods) == null ? void 0 : _c.default); + if (defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication) { + yield defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication(requestContext); + } + return requestContext; + }); + } + /** + * Version: 9.0.0.cl or later Removes the specified group object from the ThoughtSpot system. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `GROUP_ADMINISTRATION` (**Can manage groups**) privilege is required. + * @param groupIdentifier GUID or name of the group. + */ + deleteUserGroup(groupIdentifier, _options) { + return __async(this, null, function* () { + var _a, _b, _c; + let _config = _options || this.configuration; + if (groupIdentifier === null || groupIdentifier === void 0) { + throw new RequiredError("ThoughtSpotRestApi", "deleteUserGroup", "groupIdentifier"); + } + const localVarPath = "/api/rest/2.0/groups/{group_identifier}/delete".replace("{group_identifier}", encodeURIComponent(String(groupIdentifier))); + const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.25.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.25.0"); + let authMethod; + authMethod = _config.authMethods["bearerAuth"]; + if (authMethod == null ? void 0 : authMethod.applySecurityAuthentication) { + yield authMethod == null ? void 0 : authMethod.applySecurityAuthentication(requestContext); + } + const defaultAuth = ((_a = _options == null ? void 0 : _options.authMethods) == null ? void 0 : _a.default) || ((_c = (_b = this.configuration) == null ? void 0 : _b.authMethods) == null ? void 0 : _c.default); + if (defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication) { + yield defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication(requestContext); + } + return requestContext; + }); + } + /** + * Delete a variable Version: 10.14.0.cl or later **Note:** This API endpoint is deprecated and will be removed from ThoughtSpot in a future release. Use [POST /api/rest/2.0/template/variables/delete](/api/rest/2.0/template/variables/delete) instead. Allows deleting a variable from ThoughtSpot. Requires ADMINISTRATION role and TENANT scope. The CAN_MANAGE_VARIABLES permission allows you to manage Formula Variables in the current organization scope. The API endpoint requires: * The variable identifier (ID or name) The operation will fail if: * The user lacks required permissions * The variable doesn\'t exist * The variable is being used by other objects + * @param identifier Unique id or name of the variable + */ + deleteVariable(identifier, _options) { + return __async(this, null, function* () { + var _a, _b, _c; + let _config = _options || this.configuration; + if (identifier === null || identifier === void 0) { + throw new RequiredError("ThoughtSpotRestApi", "deleteVariable", "identifier"); + } + const localVarPath = "/api/rest/2.0/template/variables/{identifier}/delete".replace("{identifier}", encodeURIComponent(String(identifier))); + const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.25.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.25.0"); + let authMethod; + authMethod = _config.authMethods["bearerAuth"]; + if (authMethod == null ? void 0 : authMethod.applySecurityAuthentication) { + yield authMethod == null ? void 0 : authMethod.applySecurityAuthentication(requestContext); + } + const defaultAuth = ((_a = _options == null ? void 0 : _options.authMethods) == null ? void 0 : _a.default) || ((_c = (_b = this.configuration) == null ? void 0 : _b.authMethods) == null ? void 0 : _c.default); + if (defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication) { + yield defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication(requestContext); + } + return requestContext; + }); + } + /** + * Delete variable(s) Version: 26.4.0.cl or later Allows deleting multiple variables from ThoughtSpot. Requires ADMINISTRATION role and TENANT scope. The CAN_MANAGE_VARIABLES permission allows you to manage Formula Variables in the current organization scope. The API endpoint requires: * The variable identifiers (IDs or names) The operation will fail if: * The user lacks required permissions * Any of the variables don\'t exist * Any of the variables are being used by other objects + * @param deleteVariablesRequest + */ + deleteVariables(deleteVariablesRequest, _options) { + return __async(this, null, function* () { + var _a, _b, _c; + let _config = _options || this.configuration; + if (deleteVariablesRequest === null || deleteVariablesRequest === void 0) { + throw new RequiredError("ThoughtSpotRestApi", "deleteVariables", "deleteVariablesRequest"); + } + const localVarPath = "/api/rest/2.0/template/variables/delete"; + const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.25.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.25.0"); + const contentType = ObjectSerializer.getPreferredMediaType([ + "application/json" + ]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = ObjectSerializer.stringify( + ObjectSerializer.serialize(deleteVariablesRequest, "DeleteVariablesRequest", ""), + contentType + ); + requestContext.setBody(serializedBody); + let authMethod; + authMethod = _config.authMethods["bearerAuth"]; + if (authMethod == null ? void 0 : authMethod.applySecurityAuthentication) { + yield authMethod == null ? void 0 : authMethod.applySecurityAuthentication(requestContext); + } + const defaultAuth = ((_a = _options == null ? void 0 : _options.authMethods) == null ? void 0 : _a.default) || ((_c = (_b = this.configuration) == null ? void 0 : _b.authMethods) == null ? void 0 : _c.default); + if (defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication) { + yield defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication(requestContext); + } + return requestContext; + }); + } + /** + * Version: 10.14.0.cl or later Deletes one or more webhook configurations by their unique id or name. Returns status of each deletion operation, including successfully deleted webhooks and any failures with error details. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) or `DEVELOPER` (**Has developer privilege**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, users with `CAN_MANAGE_WEBHOOKS` (**Can manage webhooks**) privilege are also authorized to perform this action. + * @param deleteWebhookConfigurationsRequest + */ + deleteWebhookConfigurations(deleteWebhookConfigurationsRequest, _options) { + return __async(this, null, function* () { + var _a, _b, _c; + let _config = _options || this.configuration; + if (deleteWebhookConfigurationsRequest === null || deleteWebhookConfigurationsRequest === void 0) { + throw new RequiredError("ThoughtSpotRestApi", "deleteWebhookConfigurations", "deleteWebhookConfigurationsRequest"); + } + const localVarPath = "/api/rest/2.0/webhooks/delete"; + const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.25.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.25.0"); + const contentType = ObjectSerializer.getPreferredMediaType([ + "application/json" + ]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = ObjectSerializer.stringify( + ObjectSerializer.serialize(deleteWebhookConfigurationsRequest, "DeleteWebhookConfigurationsRequest", ""), + contentType + ); + requestContext.setBody(serializedBody); + let authMethod; + authMethod = _config.authMethods["bearerAuth"]; + if (authMethod == null ? void 0 : authMethod.applySecurityAuthentication) { + yield authMethod == null ? void 0 : authMethod.applySecurityAuthentication(requestContext); + } + const defaultAuth = ((_a = _options == null ? void 0 : _options.authMethods) == null ? void 0 : _a.default) || ((_c = (_b = this.configuration) == null ? void 0 : _b.authMethods) == null ? void 0 : _c.default); + if (defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication) { + yield defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication(requestContext); + } + return requestContext; + }); + } + /** + * Version: 9.2.0.cl or later Allows you to deploy a commit and publish TML content to your ThoughtSpot instance. Requires at least edit access to the objects used in the deploy operation. The API deploys the head of the branch unless a `commit_id` is specified in the API request. If the branch name is not defined in the request, the default branch is considered for deploying commits. For more information, see [Git integration documentation](https://developers.thoughtspot.com/docs/git-integration). + * @param deployCommitRequest + */ + deployCommit(deployCommitRequest, _options) { + return __async(this, null, function* () { + var _a, _b, _c; + let _config = _options || this.configuration; + if (deployCommitRequest === null || deployCommitRequest === void 0) { + throw new RequiredError("ThoughtSpotRestApi", "deployCommit", "deployCommitRequest"); + } + const localVarPath = "/api/rest/2.0/vcs/git/commits/deploy"; + const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.25.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.25.0"); + const contentType = ObjectSerializer.getPreferredMediaType([ + "application/json" + ]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = ObjectSerializer.stringify( + ObjectSerializer.serialize(deployCommitRequest, "DeployCommitRequest", ""), + contentType + ); + requestContext.setBody(serializedBody); + let authMethod; + authMethod = _config.authMethods["bearerAuth"]; + if (authMethod == null ? void 0 : authMethod.applySecurityAuthentication) { + yield authMethod == null ? void 0 : authMethod.applySecurityAuthentication(requestContext); + } + const defaultAuth = ((_a = _options == null ? void 0 : _options.authMethods) == null ? void 0 : _a.default) || ((_c = (_b = this.configuration) == null ? void 0 : _b.authMethods) == null ? void 0 : _c.default); + if (defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication) { + yield defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication(requestContext); + } + return requestContext; + }); + } + /** + * Version: 9.9.0.cl or later Exports the difference in connection metadata between CDW and ThoughtSpot Requires `DATAMANAGEMENT` (**Can manage data**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the following Data control privileges may be required: - `CAN_MANAGE_CUSTOM_CALENDAR`(**Can manage custom calendars**) - `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) - `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` (**Can manage data models**) To download the connection metadata difference between ThoughtSpot and CDW, pass the connection GUID as `connection_identifier` in the API request. + * @param connectionIdentifier GUID of the connection + */ + downloadConnectionMetadataChanges(connectionIdentifier, _options) { + return __async(this, null, function* () { + var _a, _b, _c; + let _config = _options || this.configuration; + if (connectionIdentifier === null || connectionIdentifier === void 0) { + throw new RequiredError("ThoughtSpotRestApi", "downloadConnectionMetadataChanges", "connectionIdentifier"); + } + const localVarPath = "/api/rest/2.0/connections/download-connection-metadata-changes/{connection_identifier}".replace("{connection_identifier}", encodeURIComponent(String(connectionIdentifier))); + const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.25.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.25.0"); + let authMethod; + authMethod = _config.authMethods["bearerAuth"]; + if (authMethod == null ? void 0 : authMethod.applySecurityAuthentication) { + yield authMethod == null ? void 0 : authMethod.applySecurityAuthentication(requestContext); + } + const defaultAuth = ((_a = _options == null ? void 0 : _options.authMethods) == null ? void 0 : _a.default) || ((_c = (_b = this.configuration) == null ? void 0 : _b.authMethods) == null ? void 0 : _c.default); + if (defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication) { + yield defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication(requestContext); + } + return requestContext; + }); + } + /** + * Version: 9.0.0.cl or later Exports an Answer in the given file format. You can download the Answer data as a PDF, PNG, CSV, or XLSX file. Requires at least view access to the Answer. #### Usage guidelines In the request body, specify the GUID or name of the Answer and set `file_format`. The default file format is CSV. Use the `type` parameter to specify whether the Answer being exported is a saved Answer (`SAVED`) or a pinned Answer on a Liveboard (`PINNED`). Defaults to `SAVED`. When using `PINNED`, the `metadata_identifier` must be the container id. **NOTE**: * The downloadable file returned in API response file is extensionless. Please rename the downloaded file by typing in the relevant extension. * HTML rendering is not supported for PDF exports of Answers with tables. Optionally, you can define [runtime overrides](https://developers.thoughtspot.com/docs/fetch-data-and-report-apis#_runtime_overrides) to apply to the Answer data. + * @param exportAnswerReportRequest + */ + exportAnswerReport(exportAnswerReportRequest, _options) { + return __async(this, null, function* () { + var _a, _b, _c; + let _config = _options || this.configuration; + if (exportAnswerReportRequest === null || exportAnswerReportRequest === void 0) { + throw new RequiredError("ThoughtSpotRestApi", "exportAnswerReport", "exportAnswerReportRequest"); + } + const localVarPath = "/api/rest/2.0/report/answer"; + const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.25.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.25.0"); + const contentType = ObjectSerializer.getPreferredMediaType([ + "application/json" + ]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = ObjectSerializer.stringify( + ObjectSerializer.serialize(exportAnswerReportRequest, "ExportAnswerReportRequest", ""), + contentType + ); + requestContext.setBody(serializedBody); + let authMethod; + authMethod = _config.authMethods["bearerAuth"]; + if (authMethod == null ? void 0 : authMethod.applySecurityAuthentication) { + yield authMethod == null ? void 0 : authMethod.applySecurityAuthentication(requestContext); + } + const defaultAuth = ((_a = _options == null ? void 0 : _options.authMethods) == null ? void 0 : _a.default) || ((_c = (_b = this.configuration) == null ? void 0 : _b.authMethods) == null ? void 0 : _c.default); + if (defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication) { + yield defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication(requestContext); + } + return requestContext; + }); + } + /** + * Version: 9.0.0.cl or later Exports a Liveboard and its visualizations in PDF, PNG, CSV, or XLSX file format. The default `file_format` is CSV. Requires at least view access to the Liveboard. #### Usage guidelines In the request body, specify the GUID or name of the Liveboard. To generate a Liveboard report with specific visualizations, add GUIDs or names of the visualizations. **NOTE**: * The downloadable file returned in API response file is extensionless. Please rename the downloaded file by typing in the relevant extension. * Optionally, you can define [runtime overrides](https://developers.thoughtspot.com/docs/fetch-data-and-report-apis#_runtime_overrides) to apply to the Answer data. * To include unsaved changes in the report, pass the `transient_pinboard_content` script generated from the `getExportRequestForCurrentPinboard` method in the Visual Embed SDK. Upon successful execution, the API returns the report with unsaved changes, including ad hoc changes to visualizations. For more information, see [Liveboard Report API](https://developers.thoughtspot.com/docs/fetch-data-and-report-apis#_liveboard_report_api). * Starting with ThoughtSpot Cloud 10.9.0.cl release, the Liveboard can be exported in the PNG format in the resolution of your choice. To enable this on your instance, contact ThoughtSpot support. When this feature is enabled, the options `include_cover_page`,`include_filter_page` within the `png_options` will not be available for PNG exports. * Starting with the ThoughtSpot Cloud 26.2.0.cl release, * Liveboards can be exported in CSV format. * All visualizations within a Liveboard can be exported as individual CSV files. * When exporting multiple visualizations or the entire Liveboard, the system returns the report as a compressed ZIP file containing the separate CSV files for each visualization. * Liveboards can also be exported in XLSX format. * All selected visualizations are consolidated into a single Excel workbook (.xlsx), with each visualization placed in its own worksheet (tab). * XLSX exports are limited to a maximum of 255 worksheets (tabs) per workbook. + * @param exportLiveboardReportRequest + */ + exportLiveboardReport(exportLiveboardReportRequest, _options) { + return __async(this, null, function* () { + var _a, _b, _c; + let _config = _options || this.configuration; + if (exportLiveboardReportRequest === null || exportLiveboardReportRequest === void 0) { + throw new RequiredError("ThoughtSpotRestApi", "exportLiveboardReport", "exportLiveboardReportRequest"); + } + const localVarPath = "/api/rest/2.0/report/liveboard"; + const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.25.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.25.0"); + const contentType = ObjectSerializer.getPreferredMediaType([ + "application/json" + ]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = ObjectSerializer.stringify( + ObjectSerializer.serialize(exportLiveboardReportRequest, "ExportLiveboardReportRequest", ""), + contentType + ); + requestContext.setBody(serializedBody); + let authMethod; + authMethod = _config.authMethods["bearerAuth"]; + if (authMethod == null ? void 0 : authMethod.applySecurityAuthentication) { + yield authMethod == null ? void 0 : authMethod.applySecurityAuthentication(requestContext); + } + const defaultAuth = ((_a = _options == null ? void 0 : _options.authMethods) == null ? void 0 : _a.default) || ((_c = (_b = this.configuration) == null ? void 0 : _b.authMethods) == null ? void 0 : _c.default); + if (defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication) { + yield defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication(requestContext); + } + return requestContext; + }); + } + /** + * Version: 9.0.0.cl or later Exports the [TML](https://docs.thoughtspot.com/cloud/latest/tml) representation of metadata objects in JSON or YAML format. Requires `DATADOWNLOADING` (**Can download Data**) and at least view access to the metadata object. #### Usage guidelines * You can export one or several objects by passing metadata object GUIDs in the `metadata` array. * When exporting TML content for a Liveboard or Answer object, you can set `export_associated` to `true` to retrieve TML content for underlying Worksheets, Tables, or Views, including the GUID of each object within the headers. When `export_associated` is set to `true`, consider retrieving one metadata object at a time. * Set `export_fqns` to `true` to add FQNs of the referenced objects in the TML content. For example, if you send an API request to retrieve TML for a Liveboard and its associated objects, the API returns the TML content with FQNs of the referenced Worksheet. Exporting TML with FQNs is useful if ThoughtSpot has multiple objects with the same name and you want to eliminate ambiguity when importing TML files into ThoughtSpot. It eliminates the need for adding FQNs of the referenced objects manually during the import operation. * To export only the TML of feedbacks associated with an object, set the GUID of the object as `identifier`, and set the `type` as `FEEDBACK` in the `metadata` array. * To export the TML of an object along with the feedbacks associated with it, set the GUID of the object as `identifier`, set the `type` as `LOGIAL_TABLE` in the `metadata` array, and set `export_with_associated_feedbacks` in `export_options` to true. For more information, see [TML Documentation](https://developers.thoughtspot.com/docs/tml#_export_a_tml). For more information on feedbacks, see [Feedback Documentation](https://docs.thoughtspot.com/cloud/latest/sage-feedback). + * @param exportMetadataTMLRequest + */ + exportMetadataTML(exportMetadataTMLRequest, _options) { + return __async(this, null, function* () { + var _a, _b, _c; + let _config = _options || this.configuration; + if (exportMetadataTMLRequest === null || exportMetadataTMLRequest === void 0) { + throw new RequiredError("ThoughtSpotRestApi", "exportMetadataTML", "exportMetadataTMLRequest"); + } + const localVarPath = "/api/rest/2.0/metadata/tml/export"; + const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.25.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.25.0"); + const contentType = ObjectSerializer.getPreferredMediaType([ + "application/json" + ]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = ObjectSerializer.stringify( + ObjectSerializer.serialize(exportMetadataTMLRequest, "ExportMetadataTMLRequest", ""), + contentType + ); + requestContext.setBody(serializedBody); + let authMethod; + authMethod = _config.authMethods["bearerAuth"]; + if (authMethod == null ? void 0 : authMethod.applySecurityAuthentication) { + yield authMethod == null ? void 0 : authMethod.applySecurityAuthentication(requestContext); + } + const defaultAuth = ((_a = _options == null ? void 0 : _options.authMethods) == null ? void 0 : _a.default) || ((_c = (_b = this.configuration) == null ? void 0 : _b.authMethods) == null ? void 0 : _c.default); + if (defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication) { + yield defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication(requestContext); + } + return requestContext; + }); + } + /** + * Version: 10.1.0.cl or later Exports the [TML](https://docs.thoughtspot.com/cloud/latest/tml) representation of metadata objects in JSON or YAML format. ### **Permissions Required** Requires `DATAMANAGEMENT` (**Can manage data**) and `USERMANAGEMENT` (**Can manage users**) privileges. #### **Usage Guidelines** This API is only applicable for `USER`, `GROUP`, and `ROLES` metadata types. - `batch_offset` Indicates the starting position within the complete dataset from which the API should begin returning objects. Useful for paginating results efficiently. - `batch_size` Specifies the number of objects or items to retrieve in a single request. Helps control response size for better performance. - `edoc_format` Defines the format of the TML content. The exported metadata can be in JSON or YAML format. - `export_dependent` Specifies whether to include dependent metadata objects in the export. Ensures related objects are also retrieved if needed. - `all_orgs_override` Indicates whether the export operation applies across all organizations. Useful for multi-tenant environments where cross-org exports are required. + * @param exportMetadataTMLBatchedRequest + */ + exportMetadataTMLBatched(exportMetadataTMLBatchedRequest, _options) { + return __async(this, null, function* () { + var _a, _b, _c; + let _config = _options || this.configuration; + if (exportMetadataTMLBatchedRequest === null || exportMetadataTMLBatchedRequest === void 0) { + throw new RequiredError("ThoughtSpotRestApi", "exportMetadataTMLBatched", "exportMetadataTMLBatchedRequest"); + } + const localVarPath = "/api/rest/2.0/metadata/tml/export/batch"; + const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.25.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.25.0"); + const contentType = ObjectSerializer.getPreferredMediaType([ + "application/json" + ]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = ObjectSerializer.stringify( + ObjectSerializer.serialize(exportMetadataTMLBatchedRequest, "ExportMetadataTMLBatchedRequest", ""), + contentType + ); + requestContext.setBody(serializedBody); + let authMethod; + authMethod = _config.authMethods["bearerAuth"]; + if (authMethod == null ? void 0 : authMethod.applySecurityAuthentication) { + yield authMethod == null ? void 0 : authMethod.applySecurityAuthentication(requestContext); + } + const defaultAuth = ((_a = _options == null ? void 0 : _options.authMethods) == null ? void 0 : _a.default) || ((_c = (_b = this.configuration) == null ? void 0 : _b.authMethods) == null ? void 0 : _c.default); + if (defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication) { + yield defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication(requestContext); + } + return requestContext; + }); + } + /** + * Version: 9.0.0.cl or later Fetches data from a saved Answer. Requires at least view access to the saved Answer. The `record_size` attribute determines the number of records to retrieve in an API call. For more information about pagination, record size, and maximum row limit, see [Pagination and record size settings](https://developers.thoughtspot.com/docs/fetch-data-and-report-apis#_pagination_settings_for_data_and_report_apis). + * @param fetchAnswerDataRequest + */ + fetchAnswerData(fetchAnswerDataRequest, _options) { + return __async(this, null, function* () { + var _a, _b, _c; + let _config = _options || this.configuration; + if (fetchAnswerDataRequest === null || fetchAnswerDataRequest === void 0) { + throw new RequiredError("ThoughtSpotRestApi", "fetchAnswerData", "fetchAnswerDataRequest"); + } + const localVarPath = "/api/rest/2.0/metadata/answer/data"; + const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.25.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.25.0"); + const contentType = ObjectSerializer.getPreferredMediaType([ + "application/json" + ]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = ObjectSerializer.stringify( + ObjectSerializer.serialize(fetchAnswerDataRequest, "FetchAnswerDataRequest", ""), + contentType + ); + requestContext.setBody(serializedBody); + let authMethod; + authMethod = _config.authMethods["bearerAuth"]; + if (authMethod == null ? void 0 : authMethod.applySecurityAuthentication) { + yield authMethod == null ? void 0 : authMethod.applySecurityAuthentication(requestContext); + } + const defaultAuth = ((_a = _options == null ? void 0 : _options.authMethods) == null ? void 0 : _a.default) || ((_c = (_b = this.configuration) == null ? void 0 : _b.authMethods) == null ? void 0 : _c.default); + if (defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication) { + yield defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication(requestContext); + } + return requestContext; + }); + } + /** + * Version: 9.0.0.cl or later Fetches the underlying SQL query data for an Answer object. Requires at least view access to the Answer object. Upon successful execution, the API returns the SQL queries for the specified object as shown in this example: ``` { \"metadata_id\":\"8fbe44a8-46ad-4b16-8d39-184b2fada490\", \"metadata_name\":\"Total sales\", \"metadata_type\":\"ANSWER\", \"sql_queries\":[ { \"metadata_id\":\"8fbe44a8-46ad-4b16-8d39-184b2fada490\", \"metadata_name\":\"Total sales -test\", \"sql_query\":\"SELECT \\n \\\"ta_1\\\".\\\"REGION\\\" \\\"ca_1\\\", \\n \\\"ta_2\\\".\\\"PRODUCTNAME\\\" \\\"ca_2\\\", \\n \\\"ta_1\\\".\\\"STORENAME\\\" \\\"ca_3\\\", \\n CASE\\n WHEN sum(\\\"ta_3\\\".\\\"SALES\\\") IS NOT NULL THEN sum(\\\"ta_3\\\".\\\"SALES\\\")\\n ELSE 0\\n END \\\"ca_4\\\", \\n CASE\\n WHEN sum(\\\"ta_3\\\".\\\"QUANTITYPURCHASED\\\") IS NOT NULL THEN sum(\\\"ta_3\\\".\\\"QUANTITYPURCHASED\\\")\\n ELSE 0\\n END \\\"ca_5\\\"\\nFROM \\\"RETAILAPPAREL\\\".\\\"PUBLIC\\\".\\\"FACT_RETAPP_SALES\\\" \\\"ta_3\\\"\\n JOIN \\\"RETAILAPPAREL\\\".\\\"PUBLIC\\\".\\\"DIM_RETAPP_STORES\\\" \\\"ta_1\\\"\\n ON \\\"ta_3\\\".\\\"STOREID\\\" = \\\"ta_1\\\".\\\"STOREID\\\"\\n JOIN \\\"RETAILAPPAREL\\\".\\\"PUBLIC\\\".\\\"DIM_RETAPP_PRODUCTS\\\" \\\"ta_2\\\"\\n ON \\\"ta_3\\\".\\\"PRODUCTID\\\" = \\\"ta_2\\\".\\\"PRODUCTID\\\"\\nGROUP BY \\n \\\"ca_1\\\", \\n \\\"ca_2\\\", \\n \\\"ca_3\\\"\\n\" } ] } ``` + * @param fetchAnswerSqlQueryRequest + */ + fetchAnswerSqlQuery(fetchAnswerSqlQueryRequest, _options) { + return __async(this, null, function* () { + var _a, _b, _c; + let _config = _options || this.configuration; + if (fetchAnswerSqlQueryRequest === null || fetchAnswerSqlQueryRequest === void 0) { + throw new RequiredError("ThoughtSpotRestApi", "fetchAnswerSqlQuery", "fetchAnswerSqlQueryRequest"); + } + const localVarPath = "/api/rest/2.0/metadata/answer/sql"; + const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.25.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.25.0"); + const contentType = ObjectSerializer.getPreferredMediaType([ + "application/json" + ]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = ObjectSerializer.stringify( + ObjectSerializer.serialize(fetchAnswerSqlQueryRequest, "FetchAnswerSqlQueryRequest", ""), + contentType + ); + requestContext.setBody(serializedBody); + let authMethod; + authMethod = _config.authMethods["bearerAuth"]; + if (authMethod == null ? void 0 : authMethod.applySecurityAuthentication) { + yield authMethod == null ? void 0 : authMethod.applySecurityAuthentication(requestContext); + } + const defaultAuth = ((_a = _options == null ? void 0 : _options.authMethods) == null ? void 0 : _a.default) || ((_c = (_b = this.configuration) == null ? void 0 : _b.authMethods) == null ? void 0 : _c.default); + if (defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication) { + yield defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication(requestContext); + } + return requestContext; + }); + } + /** + * Version: 10.4.0.cl or later Gets information about the status of the TML async import task scheduled using the `/api/rest/2.0/metadata/tml/async/import` API call. To fetch the task details, specify the ID of the TML async import task. Requires access to the task ID. The API allows users who initiated the asynchronous TML import via `/api/rest/2.0/metadata/tml/async/import` to view the status of their tasks. Users with administration privilege can view the status of all import tasks initiated by the users in their Org. #### Usage guidelines See [TML API Documentation](https://developers.thoughtspot.com/docs/tml#_fetch_status_of_the_tml_import_task) for usage guidelines. + * @param fetchAsyncImportTaskStatusRequest + */ + fetchAsyncImportTaskStatus(fetchAsyncImportTaskStatusRequest, _options) { + return __async(this, null, function* () { + var _a, _b, _c; + let _config = _options || this.configuration; + if (fetchAsyncImportTaskStatusRequest === null || fetchAsyncImportTaskStatusRequest === void 0) { + throw new RequiredError("ThoughtSpotRestApi", "fetchAsyncImportTaskStatus", "fetchAsyncImportTaskStatusRequest"); + } + const localVarPath = "/api/rest/2.0/metadata/tml/async/status"; + const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.25.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.25.0"); + const contentType = ObjectSerializer.getPreferredMediaType([ + "application/json" + ]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = ObjectSerializer.stringify( + ObjectSerializer.serialize(fetchAsyncImportTaskStatusRequest, "FetchAsyncImportTaskStatusRequest", ""), + contentType + ); + requestContext.setBody(serializedBody); + let authMethod; + authMethod = _config.authMethods["bearerAuth"]; + if (authMethod == null ? void 0 : authMethod.applySecurityAuthentication) { + yield authMethod == null ? void 0 : authMethod.applySecurityAuthentication(requestContext); + } + const defaultAuth = ((_a = _options == null ? void 0 : _options.authMethods) == null ? void 0 : _a.default) || ((_c = (_b = this.configuration) == null ? void 0 : _b.authMethods) == null ? void 0 : _c.default); + if (defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication) { + yield defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication(requestContext); + } + return requestContext; + }); + } + /** + * Version: 10.12.0.cl or later Fetches column security rules for specified tables. This API endpoint retrieves column-level security rules configured for tables. It returns information about which columns are secured and which groups have access to those columns. #### Usage guidelines - Provide an array of table identifiers using either `identifier` (GUID or name) or `obj_identifier` (object ID) - At least one of `identifier` or `obj_identifier` must be provided for each table - The API returns column security rules for all specified tables - Users must have appropriate permissions to access security rules for the specified tables #### Required permissions - `ADMINISTRATION` - Can administer ThoughtSpot - `DATAMANAGEMENT` - Can manage data - `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` - Can manage worksheet views and tables #### Example request ```json { \"tables\": [ { \"identifier\": \"table-guid\", \"obj_identifier\": \"table-object-id\" } ] } ``` #### Response format The API returns an array of `ColumnSecurityRuleResponse` objects wrapped in a `data` field. Each `ColumnSecurityRuleResponse` object contains: - Table information (GUID and object ID) - Array of column security rules with column details, group access, and source table information #### Example response ```json { \"data\": [ { \"guid\": \"table-guid\", \"objId\": \"table-object-id\", \"columnSecurityRules\": [ { \"column\": { \"id\": \"col_123\", \"name\": \"Salary\" }, \"groups\": [ { \"id\": \"group_1\", \"name\": \"HR Department\" } ], \"sourceTableDetails\": { \"id\": \"source-table-guid\", \"name\": \"Employee_Data\" } } ] } ] } ``` + * @param fetchColumnSecurityRulesRequest + */ + fetchColumnSecurityRules(fetchColumnSecurityRulesRequest, _options) { + return __async(this, null, function* () { + var _a, _b, _c; + let _config = _options || this.configuration; + if (fetchColumnSecurityRulesRequest === null || fetchColumnSecurityRulesRequest === void 0) { + throw new RequiredError("ThoughtSpotRestApi", "fetchColumnSecurityRules", "fetchColumnSecurityRulesRequest"); + } + const localVarPath = "/api/rest/2.0/security/column/rules/fetch"; + const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.25.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.25.0"); + const contentType = ObjectSerializer.getPreferredMediaType([ + "application/json" + ]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = ObjectSerializer.stringify( + ObjectSerializer.serialize(fetchColumnSecurityRulesRequest, "FetchColumnSecurityRulesRequest", ""), + contentType + ); + requestContext.setBody(serializedBody); + let authMethod; + authMethod = _config.authMethods["bearerAuth"]; + if (authMethod == null ? void 0 : authMethod.applySecurityAuthentication) { + yield authMethod == null ? void 0 : authMethod.applySecurityAuthentication(requestContext); + } + const defaultAuth = ((_a = _options == null ? void 0 : _options.authMethods) == null ? void 0 : _a.default) || ((_c = (_b = this.configuration) == null ? void 0 : _b.authMethods) == null ? void 0 : _c.default); + if (defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication) { + yield defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication(requestContext); + } + return requestContext; + }); + } + /** + * Version: 9.9.0.cl or later Validates the difference in connection metadata between CDW and ThoughtSpot. Requires `DATAMANAGEMENT` (**Can manage data**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the following Data control privileges may be required: - `CAN_MANAGE_CUSTOM_CALENDAR`(**Can manage custom calendars**) - `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) - `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` (**Can manage data models**) Returns a boolean indicating whether there is any difference between the connection metadata at ThoughtSpot and CDW. To get the connection metadata difference status, pass the connection GUID as `connection_identifier` in the API request. + * @param connectionIdentifier GUID of the connection + */ + fetchConnectionDiffStatus(connectionIdentifier, _options) { + return __async(this, null, function* () { + var _a, _b, _c; + let _config = _options || this.configuration; + if (connectionIdentifier === null || connectionIdentifier === void 0) { + throw new RequiredError("ThoughtSpotRestApi", "fetchConnectionDiffStatus", "connectionIdentifier"); + } + const localVarPath = "/api/rest/2.0/connections/fetch-connection-diff-status/{connection_identifier}".replace("{connection_identifier}", encodeURIComponent(String(connectionIdentifier))); + const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.25.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.25.0"); + let authMethod; + authMethod = _config.authMethods["bearerAuth"]; + if (authMethod == null ? void 0 : authMethod.applySecurityAuthentication) { + yield authMethod == null ? void 0 : authMethod.applySecurityAuthentication(requestContext); + } + const defaultAuth = ((_a = _options == null ? void 0 : _options.authMethods) == null ? void 0 : _a.default) || ((_c = (_b = this.configuration) == null ? void 0 : _b.authMethods) == null ? void 0 : _c.default); + if (defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication) { + yield defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication(requestContext); + } + return requestContext; + }); + } + /** + * Version: 9.0.0.cl or later Gets data from a Liveboard object and its visualization. Requires at least view access to the Liveboard. #### Usage guidelines In the request body, specify the GUID or name of the Liveboard. To get data for specific visualizations, add the GUIDs or names of the visualizations in the API request. To include unsaved changes in the report, pass the `transient_pinboard_content` script generated from the `getExportRequestForCurrentPinboard` method in the Visual Embed SDK. Upon successful execution, the API returns the report with unsaved changes. If the new Liveboard experience mode, the transient content includes ad hoc changes to visualizations such as sorting, toggling of legends, and data drill down. For more information, and see [Liveboard data API](https://developers.thoughtspot.com/docs/fetch-data-and-report-apis#_fetch_liveboard_data_api). + * @param fetchLiveboardDataRequest + */ + fetchLiveboardData(fetchLiveboardDataRequest, _options) { + return __async(this, null, function* () { + var _a, _b, _c; + let _config = _options || this.configuration; + if (fetchLiveboardDataRequest === null || fetchLiveboardDataRequest === void 0) { + throw new RequiredError("ThoughtSpotRestApi", "fetchLiveboardData", "fetchLiveboardDataRequest"); + } + const localVarPath = "/api/rest/2.0/metadata/liveboard/data"; + const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.25.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.25.0"); + const contentType = ObjectSerializer.getPreferredMediaType([ + "application/json" + ]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = ObjectSerializer.stringify( + ObjectSerializer.serialize(fetchLiveboardDataRequest, "FetchLiveboardDataRequest", ""), + contentType + ); + requestContext.setBody(serializedBody); + let authMethod; + authMethod = _config.authMethods["bearerAuth"]; + if (authMethod == null ? void 0 : authMethod.applySecurityAuthentication) { + yield authMethod == null ? void 0 : authMethod.applySecurityAuthentication(requestContext); + } + const defaultAuth = ((_a = _options == null ? void 0 : _options.authMethods) == null ? void 0 : _a.default) || ((_c = (_b = this.configuration) == null ? void 0 : _b.authMethods) == null ? void 0 : _c.default); + if (defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication) { + yield defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication(requestContext); + } + return requestContext; + }); + } + /** + * Version: 9.0.0.cl or later Fetches the underlying SQL query data for a Liveboard object and its visualizations. Requires at least view access to the Liveboard object. To get SQL query data for a Liveboard, specify the GUID of the Liveboard. Optionally, you can add an array of visualization GUIDs to retrieve the SQL query data for visualizations in the Liveboard. Upon successful execution, the API returns the SQL queries for the specified object as shown in this example: ``` { \"metadata_id\": \"fa68ae91-7588-4136-bacd-d71fb12dda69\", \"metadata_name\": \"Total Sales\", \"metadata_type\": \"LIVEBOARD\", \"sql_queries\": [ { \"metadata_id\": \"b3b6d2b9-089a-490c-8e16-b144650b7843\", \"metadata_name\": \"Total quantity purchased, Total sales by region\", \"sql_query\": \"SELECT \\n \\\"ta_1\\\".\\\"REGION\\\" \\\"ca_1\\\", \\n CASE\\n WHEN sum(\\\"ta_2\\\".\\\"QUANTITYPURCHASED\\\") IS NOT NULL THEN sum(\\\"ta_2\\\".\\\"QUANTITYPURCHASED\\\")\\n ELSE 0\\n END \\\"ca_2\\\", \\n CASE\\n WHEN sum(\\\"ta_2\\\".\\\"SALES\\\") IS NOT NULL THEN sum(\\\"ta_2\\\".\\\"SALES\\\")\\n ELSE 0\\n END \\\"ca_3\\\"\\nFROM \\\"RETAILAPPAREL\\\".\\\"PUBLIC\\\".\\\"FACT_RETAPP_SALES\\\" \\\"ta_2\\\"\\n JOIN \\\"RETAILAPPAREL\\\".\\\"PUBLIC\\\".\\\"DIM_RETAPP_STORES\\\" \\\"ta_1\\\"\\n ON \\\"ta_2\\\".\\\"STOREID\\\" = \\\"ta_1\\\".\\\"STOREID\\\"\\nGROUP BY \\\"ca_1\\\"\" } ] } ``` + * @param fetchLiveboardSqlQueryRequest + */ + fetchLiveboardSqlQuery(fetchLiveboardSqlQueryRequest, _options) { + return __async(this, null, function* () { + var _a, _b, _c; + let _config = _options || this.configuration; + if (fetchLiveboardSqlQueryRequest === null || fetchLiveboardSqlQueryRequest === void 0) { + throw new RequiredError("ThoughtSpotRestApi", "fetchLiveboardSqlQuery", "fetchLiveboardSqlQueryRequest"); + } + const localVarPath = "/api/rest/2.0/metadata/liveboard/sql"; + const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.25.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.25.0"); + const contentType = ObjectSerializer.getPreferredMediaType([ + "application/json" + ]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = ObjectSerializer.stringify( + ObjectSerializer.serialize(fetchLiveboardSqlQueryRequest, "FetchLiveboardSqlQueryRequest", ""), + contentType + ); + requestContext.setBody(serializedBody); + let authMethod; + authMethod = _config.authMethods["bearerAuth"]; + if (authMethod == null ? void 0 : authMethod.applySecurityAuthentication) { + yield authMethod == null ? void 0 : authMethod.applySecurityAuthentication(requestContext); + } + const defaultAuth = ((_a = _options == null ? void 0 : _options.authMethods) == null ? void 0 : _a.default) || ((_c = (_b = this.configuration) == null ? void 0 : _b.authMethods) == null ? void 0 : _c.default); + if (defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication) { + yield defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication(requestContext); + } + return requestContext; + }); + } + /** + * Version: 9.0.0.cl or later Fetches security audit logs. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the [Admin Control](https://developers.thoughtspot.com/docs/rbac#_admin_control) privileges are required. #### Usage guidelines By default, the API retrieves logs for the last 24 hours. You can set a custom duration in EPOCH time. Make sure the log duration specified in your API request doesn’t exceed 24 hours. If you must fetch logs for a longer time range, modify the duration and make multiple sequential API requests. Upon successful execution, the API returns logs with the following information: * timestamp of the event * event ID * event type * name and GUID of the user * IP address of ThoughtSpot instance For more information see [Audit logs Documentation](https://developers.thoughtspot.com/docs/audit-logs). + * @param fetchLogsRequest + */ + fetchLogs(fetchLogsRequest, _options) { + return __async(this, null, function* () { + var _a, _b, _c; + let _config = _options || this.configuration; + if (fetchLogsRequest === null || fetchLogsRequest === void 0) { + throw new RequiredError("ThoughtSpotRestApi", "fetchLogs", "fetchLogsRequest"); + } + const localVarPath = "/api/rest/2.0/logs/fetch"; + const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.25.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.25.0"); + const contentType = ObjectSerializer.getPreferredMediaType([ + "application/json" + ]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = ObjectSerializer.stringify( + ObjectSerializer.serialize(fetchLogsRequest, "FetchLogsRequest", ""), + contentType + ); + requestContext.setBody(serializedBody); + let authMethod; + authMethod = _config.authMethods["bearerAuth"]; + if (authMethod == null ? void 0 : authMethod.applySecurityAuthentication) { + yield authMethod == null ? void 0 : authMethod.applySecurityAuthentication(requestContext); + } + const defaultAuth = ((_a = _options == null ? void 0 : _options.authMethods) == null ? void 0 : _a.default) || ((_c = (_b = this.configuration) == null ? void 0 : _b.authMethods) == null ? void 0 : _c.default); + if (defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication) { + yield defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication(requestContext); + } + return requestContext; + }); + } + /** + * Version: 26.3.0.cl or later This API fetches the object privileges present for the given list of principals (user or group), on the given set of objects. It supports pagination, which can be enabled and configured using the request parameters. It provides users access to certain features based on privilege based access control. #### Usage guidelines - Specify the `type` (`USER` or `USER_GROUP`) and `identifier` (either GUID or name) of the principals for which you want to retrieve object privilege information in the `principals` array. - Specify the `type` (`LOGICAL_TABLE`) and `identifier` (either GUID or name) of the metadata objects for which you want to retrieve object privilege information in the `metadata` array. Only `LOGICAL_TABLE` metadata type is supported for now. It may be extended for other metadata types in future. - To control the offset from where principals have to be fetched, use `record_offset`. When `record_offset` is 0, information is fetched from the beginning. - To control the number of principals to be fetched, use `record_size`. Default `record_size` is 20. - Ensure `record_offset` for a subsequent request is one more than the value of `record_size` of the previous request. - Ensure using correct Authorization Bearer Token corresponding to specific user & org. #### Example request ```json { \"principals\": [ { \"type\": \"type-1\", \"identifier\": \"principal-guid-or-name-1\" }, { \"type\": \"type-2\", \"identifier\": \"principal-guid-or-name-2\" } ], \"metadata\": [ { \"type\": \"metadata-type-1\", \"identifier\": \"metadata-guid-or-name-1\" }, { \"type\": \"metadata-type-2\", \"identifier\": \"metadata-guid-or-name-2\" } ], \"record_offset\": 0, \"record_size\": 20 } ``` #### Response format The API returns an array of `metadata_object_privileges` objects wrapped in JSON. Each `metadata_object_privileges` object contains: - Metadata information (GUID, name and type) - Array of `principal_object_privilege_info`. - Each `principal_object_privilege_info` contains: - Principal type. All principals of this type are listed as described below. - Array of `principal_object_privileges`. - Each `principal_object_privileges` contains: - Principal information (GUID, name, subtype) - List of applied object level privileges. #### Example response ```json { \"metadata_object_privileges\": [ { \"metadata_id\": \"metadata-guid-1\", \"metadata_name\": \"metadata-name-1\", \"metadata_type\": \"metadata-type-1\", \"principal_object_privilege_info\": [ { \"principal_type\": \"principal-type-1\", \"principal_object_privileges\": [ { \"principal_id\": \"principal-guid-1\", \"principal_name\": \"principal-name-1\", \"principal_sub_type\": \"principal-sub-type-1\", \"object_privileges\": \"[object-privilege-1, object-privilege-2]\" }, { \"principal_id\": \"principal-guid-2\", \"principal_name\": \"principal-name-2\", \"principal_sub_type\": \"principal-sub-type-2\", \"object_privileges\": \"[object-privilege-1, object-privilege-2]\" } ] }, { \"principal_type\": \"principal-type-2\", \"principal_object_privileges\": [ { \"principal_id\": \"principal-guid-3\", \"principal_name\": \"principal-guid-4\", \"principal_sub_type\": \"principal-sub-type-4\", \"object_privileges\": \"[object-privilege-1]\" } ] } ] }, { \"metadata_id\": \"metadata-guid-2\", \"metadata_name\": \"metadata-name-2\", \"metadata_type\": \"metadata-type-2\", \"principal_object_privilege_info\": [ { \"principal_type\": \"principal-type-1\", \"principal_object_privileges\": [ { \"principal_id\": \"principal-guid-1\", \"principal_name\": \"principal-name-1\", \"principal_sub_type\": \"principal-sub-type-1\", \"object_privileges\": \"[object-privilege-3, object-privilege-4]\" }, { \"principal_id\": \"principal-guid-2\", \"principal_name\": \"principal-name-2\", \"principal_sub_type\": \"principal-sub-type-2\", \"object_privileges\": \"[object-privilege-4]\" } ] } ] } ] } ``` + * @param fetchObjectPrivilegesRequest + */ + fetchObjectPrivileges(fetchObjectPrivilegesRequest, _options) { + return __async(this, null, function* () { + var _a, _b, _c; + let _config = _options || this.configuration; + if (fetchObjectPrivilegesRequest === null || fetchObjectPrivilegesRequest === void 0) { + throw new RequiredError("ThoughtSpotRestApi", "fetchObjectPrivileges", "fetchObjectPrivilegesRequest"); + } + const localVarPath = "/api/rest/2.0/security/metadata/fetch-object-privileges"; + const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.25.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.25.0"); + const contentType = ObjectSerializer.getPreferredMediaType([ + "application/json" + ]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = ObjectSerializer.stringify( + ObjectSerializer.serialize(fetchObjectPrivilegesRequest, "FetchObjectPrivilegesRequest", ""), + contentType + ); + requestContext.setBody(serializedBody); + let authMethod; + authMethod = _config.authMethods["bearerAuth"]; + if (authMethod == null ? void 0 : authMethod.applySecurityAuthentication) { + yield authMethod == null ? void 0 : authMethod.applySecurityAuthentication(requestContext); + } + const defaultAuth = ((_a = _options == null ? void 0 : _options.authMethods) == null ? void 0 : _a.default) || ((_c = (_b = this.configuration) == null ? void 0 : _b.authMethods) == null ? void 0 : _c.default); + if (defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication) { + yield defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication(requestContext); + } + return requestContext; + }); + } + /** + * Version: 9.0.0.cl or later Fetches object permission details for a given principal object such as a user and group. Requires view access to the metadata object. #### Usage guidelines * To get a list of all metadata objects that a user or group can access, specify the `type` and GUID or name of the principal. * To get permission details for a specific object, add the `type` and GUID or name of the metadata object to your API request. Upon successful execution, the API returns a list of metadata objects and permission details for each object. + * @param fetchPermissionsOfPrincipalsRequest + */ + fetchPermissionsOfPrincipals(fetchPermissionsOfPrincipalsRequest, _options) { + return __async(this, null, function* () { + var _a, _b, _c; + let _config = _options || this.configuration; + if (fetchPermissionsOfPrincipalsRequest === null || fetchPermissionsOfPrincipalsRequest === void 0) { + throw new RequiredError("ThoughtSpotRestApi", "fetchPermissionsOfPrincipals", "fetchPermissionsOfPrincipalsRequest"); + } + const localVarPath = "/api/rest/2.0/security/principals/fetch-permissions"; + const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.25.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.25.0"); + const contentType = ObjectSerializer.getPreferredMediaType([ + "application/json" + ]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = ObjectSerializer.stringify( + ObjectSerializer.serialize(fetchPermissionsOfPrincipalsRequest, "FetchPermissionsOfPrincipalsRequest", ""), + contentType + ); + requestContext.setBody(serializedBody); + let authMethod; + authMethod = _config.authMethods["bearerAuth"]; + if (authMethod == null ? void 0 : authMethod.applySecurityAuthentication) { + yield authMethod == null ? void 0 : authMethod.applySecurityAuthentication(requestContext); + } + const defaultAuth = ((_a = _options == null ? void 0 : _options.authMethods) == null ? void 0 : _a.default) || ((_c = (_b = this.configuration) == null ? void 0 : _b.authMethods) == null ? void 0 : _c.default); + if (defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication) { + yield defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication(requestContext); + } + return requestContext; + }); + } + /** + * Version: 9.0.0.cl or later Fetches permission details for a given metadata object. Requires view access to the metadata object. #### Usage guidelines * To fetch a list of users and groups for a metadata object, specify `type` and GUID or name of the metadata object. * To get permission details for a specific user or group, add `type` and GUID or name of the principal object to your API request. Upon successful execution, the API returns permission details and principal information for the object specified in the API request. + * @param fetchPermissionsOnMetadataRequest + */ + fetchPermissionsOnMetadata(fetchPermissionsOnMetadataRequest, _options) { + return __async(this, null, function* () { + var _a, _b, _c; + let _config = _options || this.configuration; + if (fetchPermissionsOnMetadataRequest === null || fetchPermissionsOnMetadataRequest === void 0) { + throw new RequiredError("ThoughtSpotRestApi", "fetchPermissionsOnMetadata", "fetchPermissionsOnMetadataRequest"); + } + const localVarPath = "/api/rest/2.0/security/metadata/fetch-permissions"; + const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.25.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.25.0"); + const contentType = ObjectSerializer.getPreferredMediaType([ + "application/json" + ]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = ObjectSerializer.stringify( + ObjectSerializer.serialize(fetchPermissionsOnMetadataRequest, "FetchPermissionsOnMetadataRequest", ""), + contentType + ); + requestContext.setBody(serializedBody); + let authMethod; + authMethod = _config.authMethods["bearerAuth"]; + if (authMethod == null ? void 0 : authMethod.applySecurityAuthentication) { + yield authMethod == null ? void 0 : authMethod.applySecurityAuthentication(requestContext); + } + const defaultAuth = ((_a = _options == null ? void 0 : _options.authMethods) == null ? void 0 : _a.default) || ((_c = (_b = this.configuration) == null ? void 0 : _b.authMethods) == null ? void 0 : _c.default); + if (defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication) { + yield defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication(requestContext); + } + return requestContext; + }); + } + /** + * Version: 9.0.0.cl or later Enforces logout on current user sessions. Use this API with caution as it may invalidate active user sessions and force users to re-login. Make sure you specify the usernames or GUIDs. If you pass null values in the API call, all user sessions on your cluster become invalid, and the users are forced to re-login. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `USER_ADMINISTRATION` (**Can manage users**) privilege is required. + * @param forceLogoutUsersRequest + */ + forceLogoutUsers(forceLogoutUsersRequest, _options) { + return __async(this, null, function* () { + var _a, _b, _c; + let _config = _options || this.configuration; + if (forceLogoutUsersRequest === null || forceLogoutUsersRequest === void 0) { + throw new RequiredError("ThoughtSpotRestApi", "forceLogoutUsers", "forceLogoutUsersRequest"); + } + const localVarPath = "/api/rest/2.0/users/force-logout"; + const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.25.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.25.0"); + const contentType = ObjectSerializer.getPreferredMediaType([ + "application/json" + ]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = ObjectSerializer.stringify( + ObjectSerializer.serialize(forceLogoutUsersRequest, "ForceLogoutUsersRequest", ""), + contentType + ); + requestContext.setBody(serializedBody); + let authMethod; + authMethod = _config.authMethods["bearerAuth"]; + if (authMethod == null ? void 0 : authMethod.applySecurityAuthentication) { + yield authMethod == null ? void 0 : authMethod.applySecurityAuthentication(requestContext); + } + const defaultAuth = ((_a = _options == null ? void 0 : _options.authMethods) == null ? void 0 : _a.default) || ((_c = (_b = this.configuration) == null ? void 0 : _b.authMethods) == null ? void 0 : _c.default); + if (defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication) { + yield defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication(requestContext); + } + return requestContext; + }); + } + /** + * Version: 10.12.0.cl or later Exports a [custom calendar](https://docs.thoughtspot.com/cloud/latest/connections-cust-cal) in the CSV format. Requires `DATAMANAGEMENT` (**Can manage data**) or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your ThoughtSpot instance, the `CAN_MANAGE_CUSTOM_CALENDAR` (**Can manage custom calendars**) privilege is required. #### Usage guidelines Use this API to download a custom calendar in the CSV file format. In your API request, specify the following parameters. * Start and end date of the calendar. For \"month offset\" calendars, the start date must match the month defined in the `month_offset` attribute. You can also specify optional parameters such as the starting day of the week and prefixes for the quarter and year labels. + * @param generateCSVRequest + */ + generateCSV(generateCSVRequest, _options) { + return __async(this, null, function* () { + var _a, _b, _c; + let _config = _options || this.configuration; + if (generateCSVRequest === null || generateCSVRequest === void 0) { + throw new RequiredError("ThoughtSpotRestApi", "generateCSV", "generateCSVRequest"); + } + const localVarPath = "/api/rest/2.0/calendars/generate-csv"; + const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.25.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.25.0"); + const contentType = ObjectSerializer.getPreferredMediaType([ + "application/json" + ]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = ObjectSerializer.stringify( + ObjectSerializer.serialize(generateCSVRequest, "GenerateCSVRequest", ""), + contentType + ); + requestContext.setBody(serializedBody); + let authMethod; + authMethod = _config.authMethods["bearerAuth"]; + if (authMethod == null ? void 0 : authMethod.applySecurityAuthentication) { + yield authMethod == null ? void 0 : authMethod.applySecurityAuthentication(requestContext); + } + const defaultAuth = ((_a = _options == null ? void 0 : _options.authMethods) == null ? void 0 : _a.default) || ((_c = (_b = this.configuration) == null ? void 0 : _b.authMethods) == null ? void 0 : _c.default); + if (defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication) { + yield defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication(requestContext); + } + return requestContext; + }); + } + /** + * Version: 9.0.0.cl or later Retrieves details of the current user session for the token provided in the request header. Any ThoughtSpot user can access this endpoint and send an API request. The data returned in the API response varies according to user\'s privilege and object access permissions. **NOTE**: In ThoughtSpot, users with cluster administration privileges can access all Orgs by default. However, unless the administrator is explicitly added to an Org, the Orgs list in the session information returned by the API will include only the Primary Org. To include other Orgs in the API response, you must explicitly add the administrator to each Org in the Admin settings page in the UI or via user REST API. + */ + getCurrentUserInfo(_options) { + return __async(this, null, function* () { + var _a, _b, _c; + let _config = _options || this.configuration; + const localVarPath = "/api/rest/2.0/auth/session/user"; + const requestContext = _config.baseServer.makeRequestContext(localVarPath, "GET" /* GET */); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.25.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.25.0"); + let authMethod; + authMethod = _config.authMethods["bearerAuth"]; + if (authMethod == null ? void 0 : authMethod.applySecurityAuthentication) { + yield authMethod == null ? void 0 : authMethod.applySecurityAuthentication(requestContext); + } + const defaultAuth = ((_a = _options == null ? void 0 : _options.authMethods) == null ? void 0 : _a.default) || ((_c = (_b = this.configuration) == null ? void 0 : _b.authMethods) == null ? void 0 : _c.default); + if (defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication) { + yield defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication(requestContext); + } + return requestContext; + }); + } + /** + * Version: 9.4.0.cl or later Retrieves details of the current session token for the bearer token provided in the request header. This API endpoint does not create a new token. Instead, it returns details about the token, including the token string, creation time, expiration time, and the associated user. Use this endpoint to introspect your current session token, debug authentication issues, or when a frontend application needs session token details. Any ThoughtSpot user with a valid bearer token can access this endpoint and send an API request + */ + getCurrentUserToken(_options) { + return __async(this, null, function* () { + var _a, _b, _c; + let _config = _options || this.configuration; + const localVarPath = "/api/rest/2.0/auth/session/token"; + const requestContext = _config.baseServer.makeRequestContext(localVarPath, "GET" /* GET */); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.25.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.25.0"); + let authMethod; + authMethod = _config.authMethods["bearerAuth"]; + if (authMethod == null ? void 0 : authMethod.applySecurityAuthentication) { + yield authMethod == null ? void 0 : authMethod.applySecurityAuthentication(requestContext); + } + const defaultAuth = ((_a = _options == null ? void 0 : _options.authMethods) == null ? void 0 : _a.default) || ((_c = (_b = this.configuration) == null ? void 0 : _b.authMethods) == null ? void 0 : _c.default); + if (defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication) { + yield defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication(requestContext); + } + return requestContext; + }); + } + /** + * Version: 10.4.0.cl or later Creates an authentication token that provides values for the formula variables in the Row Level Security (RLS) rules for a given user. Recommended for use cases that require Attribute-based access control (ABAC) via RLS. #### Required privileges To add a new user and assign privileges during auto-creation, the `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege is required. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled, the `CONTROL_TRUSTED_AUTH` (**Can Enable or Disable Trusted Authentication**) privilege and edit access to the data source are required. To configure formula variables for all Orgs on your instance or the Primary Org, cluster administration privileges are required. Org administrators can configure formula variables for their respective Orgs. If Role-Based Access Control (RBAC) is enabled, users with the `CAN_MANAGE_VARIABLES` (**Can manage variables**) role privilege can also create and manage variables for their Org context. #### Usage guidelines You can generate a token by providing a `username` and `password`, or by using a `secret_key`. To generate a `secret_key`, the administrator must enable [Trusted authentication](https://developers.thoughtspot.com/docs/trusted-auth-secret-key) in the **Develop** > **Customizations** > **Security Settings** page. **Note**: * When both `password` and `secret_key` are included in the API request, `password` takes precedence. * If [Multi-Factor Authentication (MFA)](https://docs.thoughtspot.com/cloud/latest/authentication-local-mfa) is enabled on your instance, the API login request with `username` and `password` returns an error. You can switch to token-based authentication with `secret_key` or contact ThoughtSpot Support for assistance. The token obtained from ThoughtSpot is valid for 5 minutes by default. You can configure the token expiration time as required. #### ABAC via RLS To implement ABAC via RLS and assign security entitlements to users during session creation, generate a token with custom variable values. The values set in the authentication token are applied to the formula variables referenced in RLS rules at the table level, which determines the data each user can access based on their entitlements. The variable values can be configured to persist for a specific set of Models in user sessions initiated with the token, allowing different RLS rules to be set for different data models. Once defined, the rules are added to the user\'s `variable_values` object, after which all sessions will use the persisted values. For more information, see [ABAC via tokens Documentation](https://developers.thoughtspot.com/docs/abac-via-rls-variables). ##### Formula variables Before defining variable values, ensure the variables are created and available on your instance. To create a formula variable, you can use the **Create variable** (`/api/rest/2.0/template/variables/create`) REST API endpoint, with the variable `type` set as `Formula_Variable` in the API request. The API doesn\'t support `\"persist_option\": \"RESET\"` and `\"persist_option\": \"NONE\"` when `variable_values` are defined in the request. If you are using `variable_values` for token generation, you must use other supported persist options such as `APPEND` or `REPLACE`. If you want to use `RESET` or `NONE`, do not pass any `variable_values`. In such cases, `variable_values` will remain unaffected. #### Supported objects The supported object type is `LOGICAL_TABLE`. When using `object_id` with `variable_values`, models are supported. #### Just-in-time provisioning For [just-in-time user creation and provisioning](https://developers.thoughtspot.com/docs/just-in-time-provisioning), specify the following attributes in the API request: * `auto_create` * `username` * `display_name` * `email` * `groups` Set `auto_create` to `true` if the username does not exist in ThoughtSpot. If the username already exists in ThoughtSpot and `auto_create` is set to `true`, user properties such as display name, email, Org and group entitlements will not be updated with new values. Setting `auto_create` to `true` does not create formula variables. Hence, this setting will not be applicable to `variable_values`. #### Important point to note All options in the token creation APIs that define user access to data in ThoughtSpot will take effect during token creation, not when the token is used for authentication. For example, `auto_create:true` will create the user when the authentication token is created. Persist options such as `APPEND` and `REPLACE` will persist `variable_values` on the user profile when the token is created. + * @param getCustomAccessTokenRequest + */ + getCustomAccessToken(getCustomAccessTokenRequest, _options) { + return __async(this, null, function* () { + var _a, _b, _c; + let _config = _options || this.configuration; + if (getCustomAccessTokenRequest === null || getCustomAccessTokenRequest === void 0) { + throw new RequiredError("ThoughtSpotRestApi", "getCustomAccessToken", "getCustomAccessTokenRequest"); + } + const localVarPath = "/api/rest/2.0/auth/token/custom"; + const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.25.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.25.0"); + const contentType = ObjectSerializer.getPreferredMediaType([ + "application/json" + ]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = ObjectSerializer.stringify( + ObjectSerializer.serialize(getCustomAccessTokenRequest, "GetCustomAccessTokenRequest", ""), + contentType + ); + requestContext.setBody(serializedBody); + const defaultAuth = ((_a = _options == null ? void 0 : _options.authMethods) == null ? void 0 : _a.default) || ((_c = (_b = this.configuration) == null ? void 0 : _b.authMethods) == null ? void 0 : _c.default); + if (defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication) { + yield defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication(requestContext); + } + return requestContext; + }); + } + /** + * Version: 10.15.0.cl or later Suggests the most relevant data sources for a given natural language query, ranked by confidence with LLM-generated reasoning. Requires `CAN_USE_SPOTTER` privilege and at least view-level access to the underlying metadata entities referenced in the response. #### Usage guidelines The request must include: - `query`: the natural language question to find relevant data sources for If the request is successful, the API returns a ranked list of suggested data sources, each containing: - `confidence`: a float score indicating the model\'s confidence in the relevance of the suggestion - `details`: metadata about the data source - `data_source_identifier`: the unique ID of the data source - `data_source_name`: the display name of the data source - `description`: a description of the data source - `reasoning`: LLM-generated rationale explaining why the data source was recommended #### Error responses | Code | Description | |------|--------------------------------------------------------------------------------------------------------------------------------------------| | 401 | Unauthorized — authentication token is missing, expired, or invalid. | | 403 | Forbidden — the authenticated user does not have `CAN_USE_SPOTTER` privilege or lacks view permission on the underlying metadata entities. | > ###### Note: > * This endpoint is currently in Beta. Breaking changes may be introduced before it is made Generally Available. > * This endpoint requires Spotter — please contact ThoughtSpot Support to enable Spotter on your cluster. + * @param getDataSourceSuggestionsRequest + */ + getDataSourceSuggestions(getDataSourceSuggestionsRequest, _options) { + return __async(this, null, function* () { + var _a, _b, _c; + let _config = _options || this.configuration; + if (getDataSourceSuggestionsRequest === null || getDataSourceSuggestionsRequest === void 0) { + throw new RequiredError("ThoughtSpotRestApi", "getDataSourceSuggestions", "getDataSourceSuggestionsRequest"); + } + const localVarPath = "/api/rest/2.0/ai/data-source-suggestions"; + const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.25.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.25.0"); + const contentType = ObjectSerializer.getPreferredMediaType([ + "application/json" + ]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = ObjectSerializer.stringify( + ObjectSerializer.serialize(getDataSourceSuggestionsRequest, "GetDataSourceSuggestionsRequest", ""), + contentType + ); + requestContext.setBody(serializedBody); + let authMethod; + authMethod = _config.authMethods["bearerAuth"]; + if (authMethod == null ? void 0 : authMethod.applySecurityAuthentication) { + yield authMethod == null ? void 0 : authMethod.applySecurityAuthentication(requestContext); + } + const defaultAuth = ((_a = _options == null ? void 0 : _options.authMethods) == null ? void 0 : _a.default) || ((_c = (_b = this.configuration) == null ? void 0 : _b.authMethods) == null ? void 0 : _c.default); + if (defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication) { + yield defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication(requestContext); + } + return requestContext; + }); + } + /** + * Version: 9.0.0.cl or later Generates an authentication token for creating a full session in ThoughtSpot for a given user. Recommended for use cases that do not require Attribute-based access control (ABAC) via Row Level Security (RLS). #### Usage guidelines You can generate a token for a user by providing a `username` and `password`, or by using the `secret_key` generated for your instance. To generate a `secret_key`, the administrator must enable [Trusted authentication](https://developers.thoughtspot.com/docs/trusted-auth-secret-key) in the **Develop** > **Customizations** > **Security Settings** page. **Note**: * When both `password` and `secret_key` are included in the API request, `password` takes precedence. * If [Multi-Factor Authentication (MFA)](https://docs.thoughtspot.com/cloud/latest/authentication-local-mfa) is enabled on your instance, the API login request with `username` and `password` returns an error. You can switch to token-based authentication with `secret_key` or contact ThoughtSpot Support for assistance. The token obtained from ThoughtSpot is valid for 5 minutes by default. You can configure the token expiration time as required. #### Just-in-time provisioning For [just-in-time user creation and provisioning](https://developers.thoughtspot.com/docs/just-in-time-provisioning), specify the following attributes in the API request: * `auto_create` * `username` * `display_name` * `email` * `group_identifiers` Set `auto_create` to `true` if the username does not exist in ThoughtSpot. If the user already exists in ThoughtSpot and `auto_create` is set to `true`, user properties such as display name, email and group assignment will be updated. To add a new user and assign privileges during auto-creation, the `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege is required. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled, the `CONTROL_TRUSTED_AUTH` (**Can Enable or Disable Trusted Authentication**) privilege is required. #### Important point to note All options in the token creation APIs that define user access to data in ThoughtSpot will take effect during token creation, not when the token is used for authentication. For example, `auto_create:true` will create the user when the authentication token is created. + * @param getFullAccessTokenRequest + */ + getFullAccessToken(getFullAccessTokenRequest, _options) { + return __async(this, null, function* () { + var _a, _b, _c; + let _config = _options || this.configuration; + if (getFullAccessTokenRequest === null || getFullAccessTokenRequest === void 0) { + throw new RequiredError("ThoughtSpotRestApi", "getFullAccessToken", "getFullAccessTokenRequest"); + } + const localVarPath = "/api/rest/2.0/auth/token/full"; + const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.25.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.25.0"); + const contentType = ObjectSerializer.getPreferredMediaType([ + "application/json" + ]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = ObjectSerializer.stringify( + ObjectSerializer.serialize(getFullAccessTokenRequest, "GetFullAccessTokenRequest", ""), + contentType + ); + requestContext.setBody(serializedBody); + const defaultAuth = ((_a = _options == null ? void 0 : _options.authMethods) == null ? void 0 : _a.default) || ((_c = (_b = this.configuration) == null ? void 0 : _b.authMethods) == null ? void 0 : _c.default); + if (defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication) { + yield defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication(requestContext); + } + return requestContext; + }); + } + /** + * Version: 10.15.0.cl or later Retrieves existing natural language (NL) instructions configured for a specific data model. These instructions guide the AI system in understanding data context and generating more accurate responses. Requires `CAN_USE_SPOTTER` privilege, at least view access on the data model, and a bearer token corresponding to the org where the data model exists. #### Usage guidelines The request must include: - `data_source_identifier`: the unique ID of the data model to retrieve instructions for If the request is successful, the API returns: - `nl_instructions_info`: an array of instruction objects, each containing: - `instructions`: the configured text instructions for AI processing - `scope`: the scope of the instruction — currently only `GLOBAL` is supported #### Instructions scope - **GLOBAL**: Instructions that apply globally across the system on the given data-model (currently only global instructions are supported) #### Error responses | Code | Description | |------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| | 401 | Unauthorized — authentication token is missing, expired, or invalid. | | 403 | Forbidden — the authenticated user does not have `CAN_USE_SPOTTER` privilege, lacks view access on the data model, or the bearer token does not correspond to the org where the data model exists. | > ###### Note: > > - To use this API, the user needs at least view access on the data model, and must use the bearer token corresponding to the org where the data model exists. > - This endpoint is currently in Beta. Breaking changes may be introduced before the endpoint is made Generally Available. > - Available from version 10.15.0.cl and later. > - This endpoint requires Spotter — please contact ThoughtSpot Support to enable Spotter on your cluster. > - Use this API to review currently configured instructions before modifying them with `setNLInstructions`. + * @param getNLInstructionsRequest + */ + getNLInstructions(getNLInstructionsRequest, _options) { + return __async(this, null, function* () { + var _a, _b, _c; + let _config = _options || this.configuration; + if (getNLInstructionsRequest === null || getNLInstructionsRequest === void 0) { + throw new RequiredError("ThoughtSpotRestApi", "getNLInstructions", "getNLInstructionsRequest"); + } + const localVarPath = "/api/rest/2.0/ai/instructions/get"; + const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.25.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.25.0"); + const contentType = ObjectSerializer.getPreferredMediaType([ + "application/json" + ]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = ObjectSerializer.stringify( + ObjectSerializer.serialize(getNLInstructionsRequest, "GetNLInstructionsRequest", ""), + contentType + ); + requestContext.setBody(serializedBody); + let authMethod; + authMethod = _config.authMethods["bearerAuth"]; + if (authMethod == null ? void 0 : authMethod.applySecurityAuthentication) { + yield authMethod == null ? void 0 : authMethod.applySecurityAuthentication(requestContext); + } + const defaultAuth = ((_a = _options == null ? void 0 : _options.authMethods) == null ? void 0 : _a.default) || ((_c = (_b = this.configuration) == null ? void 0 : _b.authMethods) == null ? void 0 : _c.default); + if (defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication) { + yield defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication(requestContext); + } + return requestContext; + }); + } + /** + * Version: 9.0.0.cl or later Generates an authentication token that provides access to a specific metadata object. This object list is intersected with the list of objects the user is allowed to access via group membership. For more information, see [Object security](https://docs.thoughtspot.com/cloud/latest/security-data-object#object_security). #### Usage guidelines You can generate a token for a user by providing a `username` and `password`, or by using the `secret_key` generated for your instance. To generate a `secret_key`, the administrator must enable [Trusted authentication](https://developers.thoughtspot.com/docs/trusted-auth-secret-key) in the **Develop** > **Customizations** > **Security Settings** page. **Note**: * When both `password` and `secret_key` are included in the API request, `password` takes precedence. * If [Multi-Factor Authentication (MFA)](https://docs.thoughtspot.com/cloud/latest/authentication-local-mfa) is enabled on your instance, the API login request with `username` and `password` returns an error. You can switch to token-based authentication with `secret_key` or contact ThoughtSpot Support for assistance. The token obtained from ThoughtSpot is valid for 5 minutes by default. You can configure the token expiration time as required. #### Just-in-time provisioning For [just-in-time user creation and provisioning](https://developers.thoughtspot.com/docs/just-in-time-provisioning), specify the following attributes in the API request: * `auto_create` * `username` * `display_name` * `email` * `group_identifiers` Set `auto_create` to `true` if the user is not available in ThoughtSpot. If the user already exists in ThoughtSpot and the `auto_create` parameter is set to `true`, user properties such as display name, email, and group assignment will be updated. To add a new user and assign privileges, the `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege is required. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled, the `CONTROL_TRUSTED_AUTH`(**Can Enable or Disable Trusted Authentication**) privilege is required. #### Important point to note All options in the token creation APIs that define user access to data in ThoughtSpot will take effect during token creation, not when the token is used for authentication. For example, `auto_create:true` will create the user when the authentication token is created. + * @param getObjectAccessTokenRequest + */ + getObjectAccessToken(getObjectAccessTokenRequest, _options) { + return __async(this, null, function* () { + var _a, _b, _c; + let _config = _options || this.configuration; + if (getObjectAccessTokenRequest === null || getObjectAccessTokenRequest === void 0) { + throw new RequiredError("ThoughtSpotRestApi", "getObjectAccessToken", "getObjectAccessTokenRequest"); + } + const localVarPath = "/api/rest/2.0/auth/token/object"; + const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.25.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.25.0"); + const contentType = ObjectSerializer.getPreferredMediaType([ + "application/json" + ]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = ObjectSerializer.stringify( + ObjectSerializer.serialize(getObjectAccessTokenRequest, "GetObjectAccessTokenRequest", ""), + contentType + ); + requestContext.setBody(serializedBody); + const defaultAuth = ((_a = _options == null ? void 0 : _options.authMethods) == null ? void 0 : _a.default) || ((_c = (_b = this.configuration) == null ? void 0 : _b.authMethods) == null ? void 0 : _c.default); + if (defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication) { + yield defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication(requestContext); + } + return requestContext; + }); + } + /** + * Version: 10.13.0.cl or later Breaks down a natural language query into a series of smaller analytical sub-questions, each mapped to a relevant data source. Requires `CAN_USE_SPOTTER` privilege and at least view-level access to the referenced metadata objects. #### Usage guidelines The request must include: - `query`: the natural language question to decompose into analytical sub-questions - `metadata_context`: at least one of the following context identifiers to guide question generation: - `conversation_identifier` — an existing conversation session ID - `answer_identifiers` — a list of Answer GUIDs - `liveboard_identifiers` — a list of Liveboard GUIDs - `data_source_identifiers` — a list of data source GUIDs Optional parameters for refining the output: - `ai_context`: additional context to improve response quality - `content` — supplementary text or CSV data as string input - `instructions` — custom text instructions for the AI system - `limit_relevant_questions`: maximum number of questions to return (default: `5`) - `bypass_cache`: if `true`, forces fresh computation instead of returning cached results If the request is successful, the API returns a list of relevant analytical questions, each containing: - `query`: the generated sub-question - `data_source_identifier`: the unique ID of the data source the question targets - `data_source_name`: the display name of the corresponding data source #### Error responses | Code | Description | |------|---------------------------------------------------------------------------------------------------------------------------------------| | 401 | Unauthorized — authentication token is missing, expired, or invalid. | | 403 | Forbidden — the authenticated user does not have `CAN_USE_SPOTTER` privilege or lacks view access to the referenced metadata objects. | > ###### Note: > * This endpoint is currently in Beta. Breaking changes may be introduced before the endpoint is made Generally Available. > * This endpoint requires Spotter - please contact ThoughtSpot support to enable Spotter on your cluster. + * @param getRelevantQuestionsRequest + */ + getRelevantQuestions(getRelevantQuestionsRequest, _options) { + return __async(this, null, function* () { + var _a, _b, _c; + let _config = _options || this.configuration; + if (getRelevantQuestionsRequest === null || getRelevantQuestionsRequest === void 0) { + throw new RequiredError("ThoughtSpotRestApi", "getRelevantQuestions", "getRelevantQuestionsRequest"); + } + const localVarPath = "/api/rest/2.0/ai/relevant-questions/"; + const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.25.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.25.0"); + const contentType = ObjectSerializer.getPreferredMediaType([ + "application/json" + ]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = ObjectSerializer.stringify( + ObjectSerializer.serialize(getRelevantQuestionsRequest, "GetRelevantQuestionsRequest", ""), + contentType + ); + requestContext.setBody(serializedBody); + let authMethod; + authMethod = _config.authMethods["bearerAuth"]; + if (authMethod == null ? void 0 : authMethod.applySecurityAuthentication) { + yield authMethod == null ? void 0 : authMethod.applySecurityAuthentication(requestContext); + } + const defaultAuth = ((_a = _options == null ? void 0 : _options.authMethods) == null ? void 0 : _a.default) || ((_c = (_b = this.configuration) == null ? void 0 : _b.authMethods) == null ? void 0 : _c.default); + if (defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication) { + yield defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication(requestContext); + } + return requestContext; + }); + } + /** + * Version: 9.0.0.cl or later Retrieves the current configuration details of the cluster. If the request is successful, the API returns a list configuration settings applied on the cluster. Requires `ADMINISTRATION`(**Can administer ThoughtSpot**) privilege to view these complete configuration settings of the cluster. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `SYSTEM_INFO_ADMINISTRATION` (**Can view system activities**) privilege is required. This API does not require any parameters to be passed in the request. + */ + getSystemConfig(_options) { + return __async(this, null, function* () { + var _a, _b, _c; + let _config = _options || this.configuration; + const localVarPath = "/api/rest/2.0/system/config"; + const requestContext = _config.baseServer.makeRequestContext(localVarPath, "GET" /* GET */); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.25.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.25.0"); + let authMethod; + authMethod = _config.authMethods["bearerAuth"]; + if (authMethod == null ? void 0 : authMethod.applySecurityAuthentication) { + yield authMethod == null ? void 0 : authMethod.applySecurityAuthentication(requestContext); + } + const defaultAuth = ((_a = _options == null ? void 0 : _options.authMethods) == null ? void 0 : _a.default) || ((_c = (_b = this.configuration) == null ? void 0 : _b.authMethods) == null ? void 0 : _c.default); + if (defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication) { + yield defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication(requestContext); + } + return requestContext; + }); + } + /** + * Version: 9.0.0.cl or later Gets system information such as the release version, locale, time zone, deployment environment, date format, and date time format of the cluster. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privileges. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `SYSTEM_INFO_ADMINISTRATION` (**Can view system activities**) privilege is required. This API does not require any parameters to be passed in the request. + */ + getSystemInformation(_options) { + return __async(this, null, function* () { + var _a, _b, _c; + let _config = _options || this.configuration; + const localVarPath = "/api/rest/2.0/system"; + const requestContext = _config.baseServer.makeRequestContext(localVarPath, "GET" /* GET */); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.25.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.25.0"); + let authMethod; + authMethod = _config.authMethods["bearerAuth"]; + if (authMethod == null ? void 0 : authMethod.applySecurityAuthentication) { + yield authMethod == null ? void 0 : authMethod.applySecurityAuthentication(requestContext); + } + const defaultAuth = ((_a = _options == null ? void 0 : _options.authMethods) == null ? void 0 : _a.default) || ((_c = (_b = this.configuration) == null ? void 0 : _b.authMethods) == null ? void 0 : _c.default); + if (defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication) { + yield defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication(requestContext); + } + return requestContext; + }); + } + /** + * Version: 9.2.0.cl or later Gets a list of configuration overrides applied on the cluster. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `APPLICATION_ADMINISTRATION` (**Can manage application settings**) privilege is required. This API does not require any parameters to be passed in the request. + */ + getSystemOverrideInfo(_options) { + return __async(this, null, function* () { + var _a, _b, _c; + let _config = _options || this.configuration; + const localVarPath = "/api/rest/2.0/system/config-overrides"; + const requestContext = _config.baseServer.makeRequestContext(localVarPath, "GET" /* GET */); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.25.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.25.0"); + let authMethod; + authMethod = _config.authMethods["bearerAuth"]; + if (authMethod == null ? void 0 : authMethod.applySecurityAuthentication) { + yield authMethod == null ? void 0 : authMethod.applySecurityAuthentication(requestContext); + } + const defaultAuth = ((_a = _options == null ? void 0 : _options.authMethods) == null ? void 0 : _a.default) || ((_c = (_b = this.configuration) == null ? void 0 : _b.authMethods) == null ? void 0 : _c.default); + if (defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication) { + yield defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication(requestContext); + } + return requestContext; + }); + } + /** + * Version: 9.0.0.cl or later Imports [TML](https://docs.thoughtspot.com/cloud/latest/tml) files into ThoughtSpot. Requires `DATAMANAGEMENT` (**Can manage data**) or `ADMINISTRATION` (**Can administer ThoughtsSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the following Data control privileges may be required: - `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) - `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` (**Can manage data models**) #### Usage guidelines * Import all related objects in a single TML Import API call. For example, Tables that use the same Connection object and Worksheets connected to these Tables. * Include the `fqn` property to distinguish objects that have the same name. For example, if you have multiple Connections or Worksheets with the same name on ThoughtSpot and the Connection or Worksheet referenced in your TML file does not have a unique name to distinguish, it may result in invalid object references. Adding `fqn` helps ThoughtSpot differentiate a Table from another with the same name. We recommend [exporting TML with FQNs](#/http/api-endpoints/metadata/export-metadata-tml) and using these during the import operation. * You can upload multiple TML files at a time. If you import a Worksheet along with Liveboards, Answers, and other dependent objects in a single API call, the imported objects will be immediately available for use. When you import only a Worksheet object, it may take some time for the Worksheet to become available in the ThoughtSpot system. Please wait for a few minutes, and then proceed to create an Answer and Liveboard from the newly imported Worksheet. For more information, see [TML Documentation](https://developers.thoughtspot.com/docs/tml#_import_a_tml). + * @param importMetadataTMLRequest + */ + importMetadataTML(importMetadataTMLRequest, _options) { + return __async(this, null, function* () { + var _a, _b, _c; + let _config = _options || this.configuration; + if (importMetadataTMLRequest === null || importMetadataTMLRequest === void 0) { + throw new RequiredError("ThoughtSpotRestApi", "importMetadataTML", "importMetadataTMLRequest"); + } + const localVarPath = "/api/rest/2.0/metadata/tml/import"; + const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.25.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.25.0"); + const contentType = ObjectSerializer.getPreferredMediaType([ + "application/json" + ]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = ObjectSerializer.stringify( + ObjectSerializer.serialize(importMetadataTMLRequest, "ImportMetadataTMLRequest", ""), + contentType + ); + requestContext.setBody(serializedBody); + let authMethod; + authMethod = _config.authMethods["bearerAuth"]; + if (authMethod == null ? void 0 : authMethod.applySecurityAuthentication) { + yield authMethod == null ? void 0 : authMethod.applySecurityAuthentication(requestContext); + } + const defaultAuth = ((_a = _options == null ? void 0 : _options.authMethods) == null ? void 0 : _a.default) || ((_c = (_b = this.configuration) == null ? void 0 : _b.authMethods) == null ? void 0 : _c.default); + if (defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication) { + yield defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication(requestContext); + } + return requestContext; + }); + } + /** + * Version: 10.4.0.cl or later Schedules a task to import [TML](https://docs.thoughtspot.com/cloud/latest/tml) files into ThoughtSpot. You can use this API endpoint to process TML objects asynchronously when importing TMLs of large and complex metadata objects into ThoughtSpot. Unlike the synchronous import TML operation, the API processes TML data in the background and returns a task ID, which can be used to check the status of the import task via `/api/rest/2.0/metadata/tml/async/status` API endpoint. Requires `DATAMANAGEMENT` (**Can manage data**) or `ADMINISTRATION` (**Can administer ThoughtsSpot**) privilege, and edit access to the TML objects. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the following Data control privileges may be required: - `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) - `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` (**Can manage data models**) #### Usage guidelines See [Async TML API Documentation](https://developers.thoughtspot.com/docs/tml#_import_tml_objects_asynchronously) for usage guidelines. + * @param importMetadataTMLAsyncRequest + */ + importMetadataTMLAsync(importMetadataTMLAsyncRequest, _options) { + return __async(this, null, function* () { + var _a, _b, _c; + let _config = _options || this.configuration; + if (importMetadataTMLAsyncRequest === null || importMetadataTMLAsyncRequest === void 0) { + throw new RequiredError("ThoughtSpotRestApi", "importMetadataTMLAsync", "importMetadataTMLAsyncRequest"); + } + const localVarPath = "/api/rest/2.0/metadata/tml/async/import"; + const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.25.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.25.0"); + const contentType = ObjectSerializer.getPreferredMediaType([ + "application/json" + ]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = ObjectSerializer.stringify( + ObjectSerializer.serialize(importMetadataTMLAsyncRequest, "ImportMetadataTMLAsyncRequest", ""), + contentType + ); + requestContext.setBody(serializedBody); + let authMethod; + authMethod = _config.authMethods["bearerAuth"]; + if (authMethod == null ? void 0 : authMethod.applySecurityAuthentication) { + yield authMethod == null ? void 0 : authMethod.applySecurityAuthentication(requestContext); + } + const defaultAuth = ((_a = _options == null ? void 0 : _options.authMethods) == null ? void 0 : _a.default) || ((_c = (_b = this.configuration) == null ? void 0 : _b.authMethods) == null ? void 0 : _c.default); + if (defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication) { + yield defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication(requestContext); + } + return requestContext; + }); + } + /** + * Version: 9.0.0.cl or later Imports group objects from external databases into ThoughtSpot. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `GROUP_ADMINISTRATION` (**Can manage groups**) privilege is required. During the import operation: * If the specified group is not available in ThoughtSpot, it will be added to ThoughtSpot. * If `delete_unspecified_groups` is set to `true`, the groups not specified in the API request, excluding administrator and system user groups, are deleted. * If the specified groups are already available in ThoughtSpot, the object properties of these groups are modified and synchronized as per the input data in the API request. A successful API call returns the object that represents the changes made in the ThoughtSpot system. + * @param importUserGroupsRequest + */ + importUserGroups(importUserGroupsRequest, _options) { + return __async(this, null, function* () { + var _a, _b, _c; + let _config = _options || this.configuration; + if (importUserGroupsRequest === null || importUserGroupsRequest === void 0) { + throw new RequiredError("ThoughtSpotRestApi", "importUserGroups", "importUserGroupsRequest"); + } + const localVarPath = "/api/rest/2.0/groups/import"; + const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.25.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.25.0"); + const contentType = ObjectSerializer.getPreferredMediaType([ + "application/json" + ]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = ObjectSerializer.stringify( + ObjectSerializer.serialize(importUserGroupsRequest, "ImportUserGroupsRequest", ""), + contentType + ); + requestContext.setBody(serializedBody); + let authMethod; + authMethod = _config.authMethods["bearerAuth"]; + if (authMethod == null ? void 0 : authMethod.applySecurityAuthentication) { + yield authMethod == null ? void 0 : authMethod.applySecurityAuthentication(requestContext); + } + const defaultAuth = ((_a = _options == null ? void 0 : _options.authMethods) == null ? void 0 : _a.default) || ((_c = (_b = this.configuration) == null ? void 0 : _b.authMethods) == null ? void 0 : _c.default); + if (defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication) { + yield defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication(requestContext); + } + return requestContext; + }); + } + /** + * Version: 9.0.0.cl or later Imports user data from external databases into ThoughtSpot. During the user import operation: * If the specified users are not available in ThoughtSpot, the users are created and assigned a default password. Defining a `default_password` in the API request is optional. * If `delete_unspecified_users` is set to `true`, the users not specified in the API request, excluding the `tsadmin`, `guest`, `system` and `su` users, are deleted. * If the specified user objects are already available in ThoughtSpot, the object properties are updated and synchronized as per the input data in the API request. A successful API call returns the object that represents the changes made in the ThoughtSpot system. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `USER_ADMINISTRATION` (**Can manage users**) privilege is required. + * @param importUsersRequest + */ + importUsers(importUsersRequest, _options) { + return __async(this, null, function* () { + var _a, _b, _c; + let _config = _options || this.configuration; + if (importUsersRequest === null || importUsersRequest === void 0) { + throw new RequiredError("ThoughtSpotRestApi", "importUsers", "importUsersRequest"); + } + const localVarPath = "/api/rest/2.0/users/import"; + const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.25.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.25.0"); + const contentType = ObjectSerializer.getPreferredMediaType([ + "application/json" + ]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = ObjectSerializer.stringify( + ObjectSerializer.serialize(importUsersRequest, "ImportUsersRequest", ""), + contentType + ); + requestContext.setBody(serializedBody); + let authMethod; + authMethod = _config.authMethods["bearerAuth"]; + if (authMethod == null ? void 0 : authMethod.applySecurityAuthentication) { + yield authMethod == null ? void 0 : authMethod.applySecurityAuthentication(requestContext); + } + const defaultAuth = ((_a = _options == null ? void 0 : _options.authMethods) == null ? void 0 : _a.default) || ((_c = (_b = this.configuration) == null ? void 0 : _b.authMethods) == null ? void 0 : _c.default); + if (defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication) { + yield defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication(requestContext); + } + return requestContext; + }); + } + /** + * Version: 9.0.0.cl or later Creates a login session for a ThoughtSpot user with Basic authentication. In Basic authentication method, REST clients log in to ThoughtSpot using `username` and `password` attributes. On a multi-tenant cluster with Orgs, users can pass the ID of the Org in the API request to log in to a specific Org context. **Note**: If Multi-Factor Authentication (MFA) is enabled on your instance, the API login request with basic authentication (`username` and `password` ) returns an error. Contact ThoughtSpot Support for assistance. A successful login returns a session cookie that can be used in your subsequent API requests. + * @param loginRequest + */ + login(loginRequest, _options) { + return __async(this, null, function* () { + var _a, _b, _c; + let _config = _options || this.configuration; + if (loginRequest === null || loginRequest === void 0) { + throw new RequiredError("ThoughtSpotRestApi", "login", "loginRequest"); + } + const localVarPath = "/api/rest/2.0/auth/session/login"; + const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.25.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.25.0"); + const contentType = ObjectSerializer.getPreferredMediaType([ + "application/json" + ]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = ObjectSerializer.stringify( + ObjectSerializer.serialize(loginRequest, "LoginRequest", ""), + contentType + ); + requestContext.setBody(serializedBody); + let authMethod; + authMethod = _config.authMethods["bearerAuth"]; + if (authMethod == null ? void 0 : authMethod.applySecurityAuthentication) { + yield authMethod == null ? void 0 : authMethod.applySecurityAuthentication(requestContext); + } + const defaultAuth = ((_a = _options == null ? void 0 : _options.authMethods) == null ? void 0 : _a.default) || ((_c = (_b = this.configuration) == null ? void 0 : _b.authMethods) == null ? void 0 : _c.default); + if (defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication) { + yield defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication(requestContext); + } + return requestContext; + }); + } + /** + * Version: 9.0.0.cl or later Logs out a user from their current session. + */ + logout(_options) { + return __async(this, null, function* () { + var _a, _b, _c; + let _config = _options || this.configuration; + const localVarPath = "/api/rest/2.0/auth/session/logout"; + const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.25.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.25.0"); + let authMethod; + authMethod = _config.authMethods["bearerAuth"]; + if (authMethod == null ? void 0 : authMethod.applySecurityAuthentication) { + yield authMethod == null ? void 0 : authMethod.applySecurityAuthentication(requestContext); + } + const defaultAuth = ((_a = _options == null ? void 0 : _options.authMethods) == null ? void 0 : _a.default) || ((_c = (_b = this.configuration) == null ? void 0 : _b.authMethods) == null ? void 0 : _c.default); + if (defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication) { + yield defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication(requestContext); + } + return requestContext; + }); + } + /** + * Version: 26.3.0.cl or later This API allows the addition or deletion of object level privileges for a set of users and groups, on a set of metadata objects. It provides users to access certain features based on privilege based access control. #### Usage guidelines - Specify the `operation`. The supported operations are: `ADD`, `REMOVE`. - Specify the type of the objects on which the object privileges are being provided in `metadata_type`. Only `LOGICAL_TABLE` metadata type is supported for now. It may be extended for other metadata types in future. - Specify the list of object privilege types in the `object_privilege_types` array. The supported object privilege types are: `SPOTTER_COACHING_PRIVILEGE`. - Specify the identifiers (either GUID or name) for the metadata objects in the `metadata_identifiers` array. - Specify the `type` (`USER` or `USER_GROUP`) and `identifier` (either GUID or name) of the principals to which you want to apply the given operation and given object privileges in the `principals` array. - Ensure using correct Authorization Bearer Token corresponding to specific user & org. #### Example request ```json { \"operation\": \"operation-type\", \"metadata_type\": \"metadata-type\", \"object_privilege_types\": [\"privilege-type-1\", \"privilege-type-2\"], \"metadata_identifiers\": [\"metadata-guid-or-name-1\", \"metadata-guid-or-name-1\"], \"principals\": [ { \"type\": \"type-1\", \"identifier\": \"principal-guid-or-name-1\" }, { \"type\": \"type-2\", \"identifier\": \"principal-guid-or-name-2\" } ] } ``` > ###### Note: > * Only admin users, users with edit access and users with coaching privilege on a given data-model can add or remove principals related to SPOTTER_COACHING_PRIVILEGE + * @param manageObjectPrivilegeRequest + */ + manageObjectPrivilege(manageObjectPrivilegeRequest, _options) { + return __async(this, null, function* () { + var _a, _b, _c; + let _config = _options || this.configuration; + if (manageObjectPrivilegeRequest === null || manageObjectPrivilegeRequest === void 0) { + throw new RequiredError("ThoughtSpotRestApi", "manageObjectPrivilege", "manageObjectPrivilegeRequest"); + } + const localVarPath = "/api/rest/2.0/security/metadata/manage-object-privilege"; + const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.25.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.25.0"); + const contentType = ObjectSerializer.getPreferredMediaType([ + "application/json" + ]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = ObjectSerializer.stringify( + ObjectSerializer.serialize(manageObjectPrivilegeRequest, "ManageObjectPrivilegeRequest", ""), + contentType + ); + requestContext.setBody(serializedBody); + let authMethod; + authMethod = _config.authMethods["bearerAuth"]; + if (authMethod == null ? void 0 : authMethod.applySecurityAuthentication) { + yield authMethod == null ? void 0 : authMethod.applySecurityAuthentication(requestContext); + } + const defaultAuth = ((_a = _options == null ? void 0 : _options.authMethods) == null ? void 0 : _a.default) || ((_c = (_b = this.configuration) == null ? void 0 : _b.authMethods) == null ? void 0 : _c.default); + if (defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication) { + yield defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication(requestContext); + } + return requestContext; + }); + } + /** + * Parameterize fields in metadata objects. Version: 10.9.0.cl or later **Note:** This API endpoint is deprecated and will be removed from ThoughtSpot in a future release. Use [POST /api/rest/2.0/metadata/parameterize-fields](/api/rest/2.0/metadata/parameterize-fields) instead. Allows parameterizing fields in metadata objects in ThoughtSpot. Requires appropriate permissions to modify the metadata object. The API endpoint allows parameterizing the following types of metadata objects: * Logical Tables * Connections * Connection Configs For a Logical Table the field type must be `ATTRIBUTE` and field name can be one of: * databaseName * schemaName * tableName For a Connection or Connection Config, the field type is always `CONNECTION_PROPERTY`. In this case, field_name specifies the exact property of the Connection or Connection Config that needs to be parameterized. For Connection Config, the only supported field name is: * impersonate_user + * @param parameterizeMetadataRequest + */ + parameterizeMetadata(parameterizeMetadataRequest, _options) { + return __async(this, null, function* () { + var _a, _b, _c; + let _config = _options || this.configuration; + if (parameterizeMetadataRequest === null || parameterizeMetadataRequest === void 0) { + throw new RequiredError("ThoughtSpotRestApi", "parameterizeMetadata", "parameterizeMetadataRequest"); + } + const localVarPath = "/api/rest/2.0/metadata/parameterize"; + const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.25.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.25.0"); + const contentType = ObjectSerializer.getPreferredMediaType([ + "application/json" + ]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = ObjectSerializer.stringify( + ObjectSerializer.serialize(parameterizeMetadataRequest, "ParameterizeMetadataRequest", ""), + contentType + ); + requestContext.setBody(serializedBody); + let authMethod; + authMethod = _config.authMethods["bearerAuth"]; + if (authMethod == null ? void 0 : authMethod.applySecurityAuthentication) { + yield authMethod == null ? void 0 : authMethod.applySecurityAuthentication(requestContext); + } + const defaultAuth = ((_a = _options == null ? void 0 : _options.authMethods) == null ? void 0 : _a.default) || ((_c = (_b = this.configuration) == null ? void 0 : _b.authMethods) == null ? void 0 : _c.default); + if (defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication) { + yield defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication(requestContext); + } + return requestContext; + }); + } + /** + * Parameterize multiple fields of metadata objects. For example [schemaName, databaseName] for LOGICAL_TABLE. Version: 26.5.0.cl or later Allows parameterizing multiple fields of metadata objects in ThoughtSpot. For example, you can parameterize [schemaName, databaseName] for LOGICAL_TABLE. Requires appropriate permissions to modify the metadata object. The API endpoint allows parameterizing the following types of metadata objects: * Logical Tables * Connections * Connection Configs For a Logical Table, the field type must be `ATTRIBUTE` and field names can include: * databaseName * schemaName * tableName For a Connection or Connection Config, the field type is always `CONNECTION_PROPERTY`. In this case, field_names specifies the exact properties of the Connection or Connection Config that need to be parameterized. For Connection Config, supported field names include: * impersonate_user You can parameterize multiple fields at once by providing an array of field names. + * @param parameterizeMetadataFieldsRequest + */ + parameterizeMetadataFields(parameterizeMetadataFieldsRequest, _options) { + return __async(this, null, function* () { + var _a, _b, _c; + let _config = _options || this.configuration; + if (parameterizeMetadataFieldsRequest === null || parameterizeMetadataFieldsRequest === void 0) { + throw new RequiredError("ThoughtSpotRestApi", "parameterizeMetadataFields", "parameterizeMetadataFieldsRequest"); + } + const localVarPath = "/api/rest/2.0/metadata/parameterize-fields"; + const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.25.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.25.0"); + const contentType = ObjectSerializer.getPreferredMediaType([ + "application/json" + ]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = ObjectSerializer.stringify( + ObjectSerializer.serialize(parameterizeMetadataFieldsRequest, "ParameterizeMetadataFieldsRequest", ""), + contentType + ); + requestContext.setBody(serializedBody); + let authMethod; + authMethod = _config.authMethods["bearerAuth"]; + if (authMethod == null ? void 0 : authMethod.applySecurityAuthentication) { + yield authMethod == null ? void 0 : authMethod.applySecurityAuthentication(requestContext); + } + const defaultAuth = ((_a = _options == null ? void 0 : _options.authMethods) == null ? void 0 : _a.default) || ((_c = (_b = this.configuration) == null ? void 0 : _b.authMethods) == null ? void 0 : _c.default); + if (defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication) { + yield defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication(requestContext); + } + return requestContext; + }); + } + /** + * Version: 26.5.0.cl or later Allows publishing metadata objects across organizations in ThoughtSpot. Requires ADMINISTRATION role and TENANT scope. The API endpoint allows publishing the following types of metadata objects: * Liveboards * Answers * Logical Tables This API will essentially share the objects along with it\'s dependencies to the org admins of the orgs to which it is being published. + * @param publishMetadataRequest + */ + publishMetadata(publishMetadataRequest, _options) { + return __async(this, null, function* () { + var _a, _b, _c; + let _config = _options || this.configuration; + if (publishMetadataRequest === null || publishMetadataRequest === void 0) { + throw new RequiredError("ThoughtSpotRestApi", "publishMetadata", "publishMetadataRequest"); + } + const localVarPath = "/api/rest/2.0/security/metadata/publish"; + const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.25.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.25.0"); + const contentType = ObjectSerializer.getPreferredMediaType([ + "application/json" + ]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = ObjectSerializer.stringify( + ObjectSerializer.serialize(publishMetadataRequest, "PublishMetadataRequest", ""), + contentType + ); + requestContext.setBody(serializedBody); + let authMethod; + authMethod = _config.authMethods["bearerAuth"]; + if (authMethod == null ? void 0 : authMethod.applySecurityAuthentication) { + yield authMethod == null ? void 0 : authMethod.applySecurityAuthentication(requestContext); + } + const defaultAuth = ((_a = _options == null ? void 0 : _options.authMethods) == null ? void 0 : _a.default) || ((_c = (_b = this.configuration) == null ? void 0 : _b.authMethods) == null ? void 0 : _c.default); + if (defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication) { + yield defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication(requestContext); + } + return requestContext; + }); + } + /** + * Update values for a variable Version: 26.4.0.cl or later Allows updating values for a specific variable in ThoughtSpot. Requires ADMINISTRATION role. The CAN_MANAGE_VARIABLES permission allows you to manage Formula Variables in the current organization scope. The API endpoint allows: * Adding new values to the variable * Replacing existing values * Deleting values from the variable * Resetting all values When updating variable values, you need to specify: * The variable identifier (ID or name) * The values to add/replace/remove * The operation to perform (ADD, REPLACE, REMOVE, RESET) Behaviour based on operation type: * ADD - Adds values to the variable if this is a list type variable, else same as replace. * REPLACE - Replaces all values of a given set of constraints with the current set of values. * REMOVE - Removes any values which match the set of conditions of the variables if this is a list type variable, else clears value. * RESET - Removes all constraints for the given variable, scope is ignored + * @param identifier Unique ID or name of the variable + * @param putVariableValuesRequest + */ + putVariableValues(identifier, putVariableValuesRequest, _options) { + return __async(this, null, function* () { + var _a, _b, _c; + let _config = _options || this.configuration; + if (identifier === null || identifier === void 0) { + throw new RequiredError("ThoughtSpotRestApi", "putVariableValues", "identifier"); + } + if (putVariableValuesRequest === null || putVariableValuesRequest === void 0) { + throw new RequiredError("ThoughtSpotRestApi", "putVariableValues", "putVariableValuesRequest"); + } + const localVarPath = "/api/rest/2.0/template/variables/{identifier}/update-values".replace("{identifier}", encodeURIComponent(String(identifier))); + const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.25.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.25.0"); + const contentType = ObjectSerializer.getPreferredMediaType([ + "application/json" + ]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = ObjectSerializer.stringify( + ObjectSerializer.serialize(putVariableValuesRequest, "PutVariableValuesRequest", ""), + contentType + ); + requestContext.setBody(serializedBody); + let authMethod; + authMethod = _config.authMethods["bearerAuth"]; + if (authMethod == null ? void 0 : authMethod.applySecurityAuthentication) { + yield authMethod == null ? void 0 : authMethod.applySecurityAuthentication(requestContext); + } + const defaultAuth = ((_a = _options == null ? void 0 : _options.authMethods) == null ? void 0 : _a.default) || ((_c = (_b = this.configuration) == null ? void 0 : _b.authMethods) == null ? void 0 : _c.default); + if (defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication) { + yield defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication(requestContext); + } + return requestContext; + }); + } + /** + * Version: 10.7.0.cl or later **Deprecated** — Use `getRelevantQuestions` instead (available from 10.13.0.cl). Breaks down a topical or goal-oriented natural language question into smaller, actionable analytical sub-questions, each mapped to a relevant data source for independent execution. Requires `CAN_USE_SPOTTER` privilege and at least view-level access to the referenced metadata objects. #### Usage guidelines The request accepts the following parameters: - `nlsRequest`: contains the user `query` to decompose, along with optional `instructions` and `bypassCache` flag - `worksheetIds`: list of data source identifiers to scope the decomposition - `answerIds`: list of Answer GUIDs whose data guides the response - `liveboardIds`: list of Liveboard GUIDs whose data guides the response - `conversationId`: an existing conversation session ID for context continuity - `content`: supplementary text or CSV data to improve response quality - `maxDecomposedQueries`: maximum number of sub-questions to return (default: `5`) If the request is successful, the API returns a `decomposedQueryResponse` containing a list of `decomposedQueries`, each with: - `query`: the generated analytical sub-question - `worksheetId`: the unique ID of the data source the question targets - `worksheetName`: the display name of the corresponding data source #### Error responses | Code | Description | |------|---------------------------------------------------------------------------------------------------------------------------------------| | 401 | Unauthorized — authentication token is missing, expired, or invalid. | | 403 | Forbidden — the authenticated user does not have `CAN_USE_SPOTTER` privilege or lacks view access to the referenced metadata objects. | > ###### Note: > * This endpoint is deprecated since 10.13.0.cl. Use `getRelevantQuestions` for new integrations. > * This endpoint is currently in Beta. Breaking changes may be introduced before the endpoint is made Generally Available. > * This endpoint requires Spotter — please contact ThoughtSpot support to enable Spotter on your cluster. + * @param queryGetDecomposedQueryRequest + */ + queryGetDecomposedQuery(queryGetDecomposedQueryRequest, _options) { + return __async(this, null, function* () { + var _a, _b, _c; + let _config = _options || this.configuration; + if (queryGetDecomposedQueryRequest === null || queryGetDecomposedQueryRequest === void 0) { + throw new RequiredError("ThoughtSpotRestApi", "queryGetDecomposedQuery", "queryGetDecomposedQueryRequest"); + } + const localVarPath = "/api/rest/2.0/ai/analytical-questions"; + const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.25.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.25.0"); + const contentType = ObjectSerializer.getPreferredMediaType([ + "application/json" + ]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = ObjectSerializer.stringify( + ObjectSerializer.serialize(queryGetDecomposedQueryRequest, "QueryGetDecomposedQueryRequest", ""), + contentType + ); + requestContext.setBody(serializedBody); + let authMethod; + authMethod = _config.authMethods["bearerAuth"]; + if (authMethod == null ? void 0 : authMethod.applySecurityAuthentication) { + yield authMethod == null ? void 0 : authMethod.applySecurityAuthentication(requestContext); + } + const defaultAuth = ((_a = _options == null ? void 0 : _options.authMethods) == null ? void 0 : _a.default) || ((_c = (_b = this.configuration) == null ? void 0 : _b.authMethods) == null ? void 0 : _c.default); + if (defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication) { + yield defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication(requestContext); + } + return requestContext; + }); + } + /** + * Version: 9.0.0.cl or later Resets the password of a user account. Administrators can reset password on behalf of a user. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `USER_ADMINISTRATION` (**Can manage users**) privilege is required. + * @param resetUserPasswordRequest + */ + resetUserPassword(resetUserPasswordRequest, _options) { + return __async(this, null, function* () { + var _a, _b, _c; + let _config = _options || this.configuration; + if (resetUserPasswordRequest === null || resetUserPasswordRequest === void 0) { + throw new RequiredError("ThoughtSpotRestApi", "resetUserPassword", "resetUserPasswordRequest"); + } + const localVarPath = "/api/rest/2.0/users/reset-password"; + const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.25.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.25.0"); + const contentType = ObjectSerializer.getPreferredMediaType([ + "application/json" + ]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = ObjectSerializer.stringify( + ObjectSerializer.serialize(resetUserPasswordRequest, "ResetUserPasswordRequest", ""), + contentType + ); + requestContext.setBody(serializedBody); + let authMethod; + authMethod = _config.authMethods["bearerAuth"]; + if (authMethod == null ? void 0 : authMethod.applySecurityAuthentication) { + yield authMethod == null ? void 0 : authMethod.applySecurityAuthentication(requestContext); + } + const defaultAuth = ((_a = _options == null ? void 0 : _options.authMethods) == null ? void 0 : _a.default) || ((_c = (_b = this.configuration) == null ? void 0 : _b.authMethods) == null ? void 0 : _c.default); + if (defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication) { + yield defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication(requestContext); + } + return requestContext; + }); + } + /** + * Version: 9.2.0.cl or later Reverts TML objects to a previous commit specified in the API request. Requires at least edit access to objects. In the API request, specify the `commit_id`. If the branch name is not specified in the request, the API will consider the default branch configured on your instance. By default, the API reverts all objects. If the revert operation fails for one of the objects provided in the commit, the API returns an error and does not revert any object. For more information, see [Git integration documentation](https://developers.thoughtspot.com/docs/git-integration). + * @param commitId Commit id to which the object should be reverted + * @param revertCommitRequest + */ + revertCommit(commitId, revertCommitRequest, _options) { + return __async(this, null, function* () { + var _a, _b, _c; + let _config = _options || this.configuration; + if (commitId === null || commitId === void 0) { + throw new RequiredError("ThoughtSpotRestApi", "revertCommit", "commitId"); + } + if (revertCommitRequest === null || revertCommitRequest === void 0) { + throw new RequiredError("ThoughtSpotRestApi", "revertCommit", "revertCommitRequest"); + } + const localVarPath = "/api/rest/2.0/vcs/git/commits/{commit_id}/revert".replace("{commit_id}", encodeURIComponent(String(commitId))); + const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.25.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.25.0"); + const contentType = ObjectSerializer.getPreferredMediaType([ + "application/json" + ]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = ObjectSerializer.stringify( + ObjectSerializer.serialize(revertCommitRequest, "RevertCommitRequest", ""), + contentType + ); + requestContext.setBody(serializedBody); + let authMethod; + authMethod = _config.authMethods["bearerAuth"]; + if (authMethod == null ? void 0 : authMethod.applySecurityAuthentication) { + yield authMethod == null ? void 0 : authMethod.applySecurityAuthentication(requestContext); + } + const defaultAuth = ((_a = _options == null ? void 0 : _options.authMethods) == null ? void 0 : _a.default) || ((_c = (_b = this.configuration) == null ? void 0 : _b.authMethods) == null ? void 0 : _c.default); + if (defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication) { + yield defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication(requestContext); + } + return requestContext; + }); + } + /** + * Version: 26.2.0.cl or later Revokes OAuth refresh tokens for users who no longer require access to a data warehouse connection. When a token is revoked, the affected user\'s session for that connection is terminated, and they must re-authenticate to regain access. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) or `DATAMANAGEMENT` (**Can manage data**) privileges. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on the ThoughtSpot instance, users with `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) privilege can also make API requests to revoke tokens for connection users. #### Usage guidelines You can specify different combinations of identifiers to control which refresh tokens are revoked. - **connection_identifier**: Revokes refresh tokens for all users of the connection, except the connection author. - **connection_identifier** and **user_identifiers**: Revokes refresh tokens only for the users specified in the request. If the name or ID of the connection author is included in the request, their token will also be revoked. - **connection_identifier** and **configuration_identifiers**: Revokes refresh tokens for all users on the specified configurations, except the configuration author. - **connection_identifier**, **configuration_identifiers**, and **user_identifiers**: Revokes refresh tokens for the specified users on the specified configurations. - **connection_identifier** and **org_identifiers**: Revokes refresh tokens for the specified Orgs. Applicable only for published connections. - **connection_identifier**, **org_identifiers**, and **user_identifiers**: Revokes refresh tokens for the specified users in the specified Orgs. Applicable only for published connections. **NOTE**: The `org_identifiers` parameter is only applicable for published connections. Using this parameter for unpublished connections will result in an error. Ensure that the connections are published before making the API request. + * @param connectionIdentifier Unique ID or name of the connection whose refresh tokens need to be revoked. All the users associated with the connection will have their refresh tokens revoked except the author. + * @param revokeRefreshTokensRequest + */ + revokeRefreshTokens(connectionIdentifier, revokeRefreshTokensRequest, _options) { + return __async(this, null, function* () { + var _a, _b, _c; + let _config = _options || this.configuration; + if (connectionIdentifier === null || connectionIdentifier === void 0) { + throw new RequiredError("ThoughtSpotRestApi", "revokeRefreshTokens", "connectionIdentifier"); + } + if (revokeRefreshTokensRequest === null || revokeRefreshTokensRequest === void 0) { + throw new RequiredError("ThoughtSpotRestApi", "revokeRefreshTokens", "revokeRefreshTokensRequest"); + } + const localVarPath = "/api/rest/2.0/connections/{connection_identifier}/revoke-refresh-tokens".replace("{connection_identifier}", encodeURIComponent(String(connectionIdentifier))); + const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.25.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.25.0"); + const contentType = ObjectSerializer.getPreferredMediaType([ + "application/json" + ]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = ObjectSerializer.stringify( + ObjectSerializer.serialize(revokeRefreshTokensRequest, "RevokeRefreshTokensRequest", ""), + contentType + ); + requestContext.setBody(serializedBody); + let authMethod; + authMethod = _config.authMethods["bearerAuth"]; + if (authMethod == null ? void 0 : authMethod.applySecurityAuthentication) { + yield authMethod == null ? void 0 : authMethod.applySecurityAuthentication(requestContext); + } + const defaultAuth = ((_a = _options == null ? void 0 : _options.authMethods) == null ? void 0 : _a.default) || ((_c = (_b = this.configuration) == null ? void 0 : _b.authMethods) == null ? void 0 : _c.default); + if (defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication) { + yield defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication(requestContext); + } + return requestContext; + }); + } + /** + * Version: 9.0.0.cl or later Revokes the authentication token issued for current user session. The token of your current session expires when you make a call to the `/api/rest/2.0/auth/token/revoke` endpoint. the users will not be able to access ThoughtSpot objects until a new token is obtained. To restart your session, request for a new token from ThoughtSpot. See [Get Full Access Token](#/http/api-endpoints/authentication/get-full-access-token). + * @param revokeTokenRequest + */ + revokeToken(revokeTokenRequest, _options) { + return __async(this, null, function* () { + var _a, _b, _c; + let _config = _options || this.configuration; + if (revokeTokenRequest === null || revokeTokenRequest === void 0) { + throw new RequiredError("ThoughtSpotRestApi", "revokeToken", "revokeTokenRequest"); + } + const localVarPath = "/api/rest/2.0/auth/token/revoke"; + const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.25.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.25.0"); + const contentType = ObjectSerializer.getPreferredMediaType([ + "application/json" + ]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = ObjectSerializer.stringify( + ObjectSerializer.serialize(revokeTokenRequest, "RevokeTokenRequest", ""), + contentType + ); + requestContext.setBody(serializedBody); + let authMethod; + authMethod = _config.authMethods["bearerAuth"]; + if (authMethod == null ? void 0 : authMethod.applySecurityAuthentication) { + yield authMethod == null ? void 0 : authMethod.applySecurityAuthentication(requestContext); + } + const defaultAuth = ((_a = _options == null ? void 0 : _options.authMethods) == null ? void 0 : _a.default) || ((_c = (_b = this.configuration) == null ? void 0 : _b.authMethods) == null ? void 0 : _c.default); + if (defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication) { + yield defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication(requestContext); + } + return requestContext; + }); + } + /** + * Version: 26.6.0.cl or later Returns the authentication configuration for the specified auth type at cluster and org level. Currently supports `TRUSTED_AUTH`. #### Required privileges Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) or `CONTROL_TRUSTED_AUTH` (**Can Enable or Disable Trusted Authentication**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled, the `CONTROL_TRUSTED_AUTH` privilege is required. #### Usage guidelines Use `scope` to control which level of settings are returned: - `CLUSTER` — Returns cluster-level authentication status and access tokens. Accessible only from the Primary Org. - `ORG` — Returns org-level authentication status and access tokens for the current Org. Requires the per-Org authentication feature to be enabled on your instance. - If `scope` is omitted, both cluster and org-level settings are returned based on the caller\'s org context and feature availability. The `access_tokens` array in `cluster_preferences` or `org_preferences` is omitted when no token is configured at that level. **Note**: Access tokens returned in the response are sensitive credentials. Treat them with the same care as passwords. + * @param searchAuthSettingsRequest + */ + searchAuthSettings(searchAuthSettingsRequest, _options) { + return __async(this, null, function* () { + var _a, _b, _c; + let _config = _options || this.configuration; + if (searchAuthSettingsRequest === null || searchAuthSettingsRequest === void 0) { + throw new RequiredError("ThoughtSpotRestApi", "searchAuthSettings", "searchAuthSettingsRequest"); + } + const localVarPath = "/api/rest/2.0/auth/search"; + const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.25.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.25.0"); + const contentType = ObjectSerializer.getPreferredMediaType([ + "application/json" + ]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = ObjectSerializer.stringify( + ObjectSerializer.serialize(searchAuthSettingsRequest, "SearchAuthSettingsRequest", ""), + contentType + ); + requestContext.setBody(serializedBody); + let authMethod; + authMethod = _config.authMethods["bearerAuth"]; + if (authMethod == null ? void 0 : authMethod.applySecurityAuthentication) { + yield authMethod == null ? void 0 : authMethod.applySecurityAuthentication(requestContext); + } + const defaultAuth = ((_a = _options == null ? void 0 : _options.authMethods) == null ? void 0 : _a.default) || ((_c = (_b = this.configuration) == null ? void 0 : _b.authMethods) == null ? void 0 : _c.default); + if (defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication) { + yield defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication(requestContext); + } + return requestContext; + }); + } + /** + * Version: 10.12.0.cl or later Gets a list of [custom calendars](https://docs.thoughtspot.com/cloud/latest/connections-cust-cal). Requires `DATAMANAGEMENT` (**Can manage data**) or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your ThoughtSpot instance, the `CAN_MANAGE_CUSTOM_CALENDAR` (**Can manage custom calendars**) privilege is required. #### Usage guidelines By default, the API returns a list of custom calendars for all connection objects. To retrieve custom calendar details for a particular connection, specify the connection ID. You can also use other search parameters such as `name_pattern` and `sort_options` as search filters. The `name_pattern` parameter filters and returns only those objects that match the specified pattern. Use `%` as a wildcard for pattern matching. + * @param searchCalendarsRequest + */ + searchCalendars(searchCalendarsRequest, _options) { + return __async(this, null, function* () { + var _a, _b, _c; + let _config = _options || this.configuration; + if (searchCalendarsRequest === null || searchCalendarsRequest === void 0) { + throw new RequiredError("ThoughtSpotRestApi", "searchCalendars", "searchCalendarsRequest"); + } + const localVarPath = "/api/rest/2.0/calendars/search"; + const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.25.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.25.0"); + const contentType = ObjectSerializer.getPreferredMediaType([ + "application/json" + ]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = ObjectSerializer.stringify( + ObjectSerializer.serialize(searchCalendarsRequest, "SearchCalendarsRequest", ""), + contentType + ); + requestContext.setBody(serializedBody); + let authMethod; + authMethod = _config.authMethods["bearerAuth"]; + if (authMethod == null ? void 0 : authMethod.applySecurityAuthentication) { + yield authMethod == null ? void 0 : authMethod.applySecurityAuthentication(requestContext); + } + const defaultAuth = ((_a = _options == null ? void 0 : _options.authMethods) == null ? void 0 : _a.default) || ((_c = (_b = this.configuration) == null ? void 0 : _b.authMethods) == null ? void 0 : _c.default); + if (defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication) { + yield defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication(requestContext); + } + return requestContext; + }); + } + /** + * Version: 26.4.0.cl or later Searches delivery history for communication channels such as webhooks. Returns channel-level delivery status for each job execution record. Use this to monitor channel health and delivery success rates across events. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) or `DEVELOPER` (**Has developer privilege**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, users with `CAN_MANAGE_WEBHOOKS` (**Can manage webhooks**) privilege are also authorized to perform this action. **NOTE**: When `channel_type` is `WEBHOOK`, the following constraints apply: - `job_ids`, `channel_identifiers`, and `events` each accept at most one element. - When `job_ids` is provided, it is used as the sole lookup key and other filter fields are ignored. - When `job_ids` is not provided, `channel_identifiers` and `events` are both required, each containing exactly one element. - Records older than the configured retention period are not returned. - Use `start_epoch_time_in_millis` and/or `end_epoch_time_in_millis` to narrow results to a specific time window. + * @param searchChannelHistoryRequest + */ + searchChannelHistory(searchChannelHistoryRequest, _options) { + return __async(this, null, function* () { + var _a, _b, _c; + let _config = _options || this.configuration; + if (searchChannelHistoryRequest === null || searchChannelHistoryRequest === void 0) { + throw new RequiredError("ThoughtSpotRestApi", "searchChannelHistory", "searchChannelHistoryRequest"); + } + const localVarPath = "/api/rest/2.0/jobs/history/communication-channels/search"; + const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.25.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.25.0"); + const contentType = ObjectSerializer.getPreferredMediaType([ + "application/json" + ]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = ObjectSerializer.stringify( + ObjectSerializer.serialize(searchChannelHistoryRequest, "SearchChannelHistoryRequest", ""), + contentType + ); + requestContext.setBody(serializedBody); + let authMethod; + authMethod = _config.authMethods["bearerAuth"]; + if (authMethod == null ? void 0 : authMethod.applySecurityAuthentication) { + yield authMethod == null ? void 0 : authMethod.applySecurityAuthentication(requestContext); + } + const defaultAuth = ((_a = _options == null ? void 0 : _options.authMethods) == null ? void 0 : _a.default) || ((_c = (_b = this.configuration) == null ? void 0 : _b.authMethods) == null ? void 0 : _c.default); + if (defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication) { + yield defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication(requestContext); + } + return requestContext; + }); + } + /** + * Version: 26.4.0.cl or later Gets a list of collections available in ThoughtSpot. To get details of a specific collection, specify the collection GUID or name. You can also filter the API response based on the collection name pattern, author, and other criteria. #### Search options * **name_pattern**: Use \'%\' as a wildcard character to match collection names * **collection_identifiers**: Search for specific collections by their GUIDs or names * **include_metadata**: When set to `true`, includes the metadata objects within each collection in the response **NOTE**: If the API returns an empty list, consider increasing the value of the `record_size` parameter. To search across all available collections, set `record_size` to `-1`. + * @param searchCollectionsRequest + */ + searchCollections(searchCollectionsRequest, _options) { + return __async(this, null, function* () { + var _a, _b, _c; + let _config = _options || this.configuration; + if (searchCollectionsRequest === null || searchCollectionsRequest === void 0) { + throw new RequiredError("ThoughtSpotRestApi", "searchCollections", "searchCollectionsRequest"); + } + const localVarPath = "/api/rest/2.0/collections/search"; + const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.25.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.25.0"); + const contentType = ObjectSerializer.getPreferredMediaType([ + "application/json" + ]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = ObjectSerializer.stringify( + ObjectSerializer.serialize(searchCollectionsRequest, "SearchCollectionsRequest", ""), + contentType + ); + requestContext.setBody(serializedBody); + let authMethod; + authMethod = _config.authMethods["bearerAuth"]; + if (authMethod == null ? void 0 : authMethod.applySecurityAuthentication) { + yield authMethod == null ? void 0 : authMethod.applySecurityAuthentication(requestContext); + } + const defaultAuth = ((_a = _options == null ? void 0 : _options.authMethods) == null ? void 0 : _a.default) || ((_c = (_b = this.configuration) == null ? void 0 : _b.authMethods) == null ? void 0 : _c.default); + if (defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication) { + yield defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication(requestContext); + } + return requestContext; + }); + } + /** + * Version: 9.2.0.cl or later Gets a list of commits for a given metadata object. Requires `DATAMANAGEMENT` (**Can manage data**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance on your instance, the `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` (**Can manage data models**) privilege and edit access to the metadata objects. + * @param searchCommitsRequest + */ + searchCommits(searchCommitsRequest, _options) { + return __async(this, null, function* () { + var _a, _b, _c; + let _config = _options || this.configuration; + if (searchCommitsRequest === null || searchCommitsRequest === void 0) { + throw new RequiredError("ThoughtSpotRestApi", "searchCommits", "searchCommitsRequest"); + } + const localVarPath = "/api/rest/2.0/vcs/git/commits/search"; + const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.25.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.25.0"); + const contentType = ObjectSerializer.getPreferredMediaType([ + "application/json" + ]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = ObjectSerializer.stringify( + ObjectSerializer.serialize(searchCommitsRequest, "SearchCommitsRequest", ""), + contentType + ); + requestContext.setBody(serializedBody); + let authMethod; + authMethod = _config.authMethods["bearerAuth"]; + if (authMethod == null ? void 0 : authMethod.applySecurityAuthentication) { + yield authMethod == null ? void 0 : authMethod.applySecurityAuthentication(requestContext); + } + const defaultAuth = ((_a = _options == null ? void 0 : _options.authMethods) == null ? void 0 : _a.default) || ((_c = (_b = this.configuration) == null ? void 0 : _b.authMethods) == null ? void 0 : _c.default); + if (defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication) { + yield defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication(requestContext); + } + return requestContext; + }); + } + /** + * Version: 10.14.0.cl or later Fetch communication channel preferences. - Use `cluster_preferences` to fetch the default preferences for your ThoughtSpot application instance. - If your instance has [Orgs](https://docs.thoughtspot.com/cloud/latest/orgs-overview), use `org_preferences` to fetch any Org-specific preferences that override the defaults. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) or `DEVELOPER` (**Has developer privilege**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, users with `APPLICATION_ADMINISTRATION` (**Can manage application settings**) privilege are also authorized to perform this action. + * @param searchCommunicationChannelPreferencesRequest + */ + searchCommunicationChannelPreferences(searchCommunicationChannelPreferencesRequest, _options) { + return __async(this, null, function* () { + var _a, _b, _c; + let _config = _options || this.configuration; + if (searchCommunicationChannelPreferencesRequest === null || searchCommunicationChannelPreferencesRequest === void 0) { + throw new RequiredError("ThoughtSpotRestApi", "searchCommunicationChannelPreferences", "searchCommunicationChannelPreferencesRequest"); + } + const localVarPath = "/api/rest/2.0/system/preferences/communication-channels/search"; + const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.25.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.25.0"); + const contentType = ObjectSerializer.getPreferredMediaType([ + "application/json" + ]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = ObjectSerializer.stringify( + ObjectSerializer.serialize(searchCommunicationChannelPreferencesRequest, "SearchCommunicationChannelPreferencesRequest", ""), + contentType + ); + requestContext.setBody(serializedBody); + let authMethod; + authMethod = _config.authMethods["bearerAuth"]; + if (authMethod == null ? void 0 : authMethod.applySecurityAuthentication) { + yield authMethod == null ? void 0 : authMethod.applySecurityAuthentication(requestContext); + } + const defaultAuth = ((_a = _options == null ? void 0 : _options.authMethods) == null ? void 0 : _a.default) || ((_c = (_b = this.configuration) == null ? void 0 : _b.authMethods) == null ? void 0 : _c.default); + if (defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication) { + yield defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication(requestContext); + } + return requestContext; + }); + } + /** + * Version: 9.2.0.cl or later Gets Git repository connections configured on the ThoughtSpot instance. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance on your instance, the `CAN_SETUP_VERSION_CONTROL` (**Can set up version control**) privilege. + * @param searchConfigRequest + */ + searchConfig(searchConfigRequest, _options) { + return __async(this, null, function* () { + var _a, _b, _c; + let _config = _options || this.configuration; + if (searchConfigRequest === null || searchConfigRequest === void 0) { + throw new RequiredError("ThoughtSpotRestApi", "searchConfig", "searchConfigRequest"); + } + const localVarPath = "/api/rest/2.0/vcs/git/config/search"; + const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.25.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.25.0"); + const contentType = ObjectSerializer.getPreferredMediaType([ + "application/json" + ]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = ObjectSerializer.stringify( + ObjectSerializer.serialize(searchConfigRequest, "SearchConfigRequest", ""), + contentType + ); + requestContext.setBody(serializedBody); + let authMethod; + authMethod = _config.authMethods["bearerAuth"]; + if (authMethod == null ? void 0 : authMethod.applySecurityAuthentication) { + yield authMethod == null ? void 0 : authMethod.applySecurityAuthentication(requestContext); + } + const defaultAuth = ((_a = _options == null ? void 0 : _options.authMethods) == null ? void 0 : _a.default) || ((_c = (_b = this.configuration) == null ? void 0 : _b.authMethods) == null ? void 0 : _c.default); + if (defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication) { + yield defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication(requestContext); + } + return requestContext; + }); + } + /** + * Version: 9.2.0.cl or later Gets connection objects. Requires `DATAMANAGEMENT` (**Can manage data**) or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) privilege is required. - To get a list of all connections available in the ThoughtSpot system, send the API request without any attributes in the request body. - To get the connection objects for a specific type of data warehouse, specify the type in `data_warehouse_types`. - To fetch details of a connection object, specify the connection object GUID or name. The `name_pattern` attribute allows passing partial text with `%` for a wildcard match. - To get details of the database, schemas, tables, or columns from a data connection object, specify `data_warehouse_object_type`. - To get a specific database, schema, table, or column from a connection object, define the object type in `data_warehouse_object_type` and object properties in the `data_warehouse_objects` array. For example, to search for a column, you must pass the database, schema, and table names in the API request. Note that in the following example, object properties are set in a hierarchical order (`database` > `schema` > `table` > `column`). ``` { \"connections\": [ { \"identifier\": \"b9d1f2ef-fa65-4a4b-994e-30fa2d57b0c2\", \"data_warehouse_objects\": [ { \"database\": \"NEBULADEV\", \"schema\": \"INFORMATION_SCHEMA\", \"table\": \"APPLICABLE_ROLES\", \"column\": \"ROLE_NAME\" } ] } ], \"data_warehouse_object_type\": \"COLUMN\" } ``` - To fetch data by `configuration`, specify `data_warehouse_object_type`. For example, to fetch columns from the `DEVELOPMENT` database, specify the `data_warehouse_object_type` as `DATABASE` and define the `configuration` string as `{\"database\":\"DEVELOPMENT\"}`. To get column data for a specific table, specify the table, for example,`{\"database\":\"RETAILAPPAREL\",\"table\":\"PIPES\"}`. - To query connections by `authentication_type`, specify `data_warehouse_object_type`. Supported values for `authentication_type` are: - `SERVICE_ACCOUNT`: For connections that require service account credentials to authenticate to the Cloud Data Warehouse and fetch data. - `OAUTH`: For connections that require OAuth credentials to authenticate to the Cloud Data Warehouse and fetch data. Teradata, Oracle, and Presto Cloud Data Warehouses do not support the OAuth authentication type. - `IAM`: For connections that have the IAM OAuth set up. This authentication type is supported on Amazon Redshift connections only. - `EXTOAUTH`: For connections that have External OAuth set up. ThoughtSpot supports external [OAuth with Microsoft Azure Active Directory (AD)](https://docs.thoughtspot.com/cloud/latest/ connections-snowflake-azure-ad-oauth) and [Okta for Snowflake data connections](https://docs.thoughtspot.com/cloud/latest/connections-snowflake-okta-oauth). - `KEY_PAIR`: For connections that require Key Pair account credentials to authenticate to the Cloud Data Warehouse and fetch data. This authentication type is supported on Snowflake connections only. - `OAUTH_WITH_PKCE`: For connections that require OAuth with PKCE account credentials to authenticate to the Cloud Data Warehouse and fetch data. This authentication type is supported on Snowflake, Starburst, Databricks, Denodo connections only. - `EXTOAUTH_WITH_PKCE`: For connections that require External OAuth With PKCE account credentials to authenticate to the Cloud Data Warehouse and fetch data. This authentication type is supported on Snowflake connections only. - `OAUTH_WITH_PEZ`: For connections that require OAuth With PEZ account credentials to authenticate to the Cloud Data Warehouse and fetch data. This authentication type is supported on Amazon Redshift connections only. - `OAUTH_WITH_SERVICE_PRINCIPAL`: For connections that require OAuth With Service Principal account credentials to authenticate to the Cloud Data Warehouse and fetch data. This authentication type is supported on Databricks connections only. - `PERSONAL_ACCESS_TOKEN`: For connections that require Personal Access Token account credentials to authenticate to the Cloud Data Warehouse and fetch data. This authentication type is supported on Databricks connections only. - `OAUTH_CLIENT_CREDENTIALS`: For connections that require OAuth Client Credentials to authenticate to the Cloud Data Warehouse and fetch data. This authentication type is supported on Snowflake connections only. - To include more details about connection objects in the API response, set `include_details` to `true`. - You can also sort the output by field names and filter connections by tags. **NOTE**: When filtering connection records by parameters other than `data_warehouse_types` or `tag_identifiers`, ensure that you set `record_size` to `-1` and `record_offset` to `0` for precise results. + * @param searchConnectionRequest + */ + searchConnection(searchConnectionRequest, _options) { + return __async(this, null, function* () { + var _a, _b, _c; + let _config = _options || this.configuration; + if (searchConnectionRequest === null || searchConnectionRequest === void 0) { + throw new RequiredError("ThoughtSpotRestApi", "searchConnection", "searchConnectionRequest"); + } + const localVarPath = "/api/rest/2.0/connection/search"; + const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.25.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.25.0"); + const contentType = ObjectSerializer.getPreferredMediaType([ + "application/json" + ]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = ObjectSerializer.stringify( + ObjectSerializer.serialize(searchConnectionRequest, "SearchConnectionRequest", ""), + contentType + ); + requestContext.setBody(serializedBody); + let authMethod; + authMethod = _config.authMethods["bearerAuth"]; + if (authMethod == null ? void 0 : authMethod.applySecurityAuthentication) { + yield authMethod == null ? void 0 : authMethod.applySecurityAuthentication(requestContext); + } + const defaultAuth = ((_a = _options == null ? void 0 : _options.authMethods) == null ? void 0 : _a.default) || ((_c = (_b = this.configuration) == null ? void 0 : _b.authMethods) == null ? void 0 : _c.default); + if (defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication) { + yield defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication(requestContext); + } + return requestContext; + }); + } + /** + * Version: 9.6.0.cl or later Gets custom actions configured on the cluster. Requires `DEVELOPER` (**Has Developer privilege**) or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `DEVELOPER` (**Has developer privilege**) privilege is required. + * @param searchCustomActionsRequest + */ + searchCustomActions(searchCustomActionsRequest, _options) { + return __async(this, null, function* () { + var _a, _b, _c; + let _config = _options || this.configuration; + if (searchCustomActionsRequest === null || searchCustomActionsRequest === void 0) { + throw new RequiredError("ThoughtSpotRestApi", "searchCustomActions", "searchCustomActionsRequest"); + } + const localVarPath = "/api/rest/2.0/customization/custom-actions/search"; + const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.25.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.25.0"); + const contentType = ObjectSerializer.getPreferredMediaType([ + "application/json" + ]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = ObjectSerializer.stringify( + ObjectSerializer.serialize(searchCustomActionsRequest, "SearchCustomActionsRequest", ""), + contentType + ); + requestContext.setBody(serializedBody); + let authMethod; + authMethod = _config.authMethods["bearerAuth"]; + if (authMethod == null ? void 0 : authMethod.applySecurityAuthentication) { + yield authMethod == null ? void 0 : authMethod.applySecurityAuthentication(requestContext); + } + const defaultAuth = ((_a = _options == null ? void 0 : _options.authMethods) == null ? void 0 : _a.default) || ((_c = (_b = this.configuration) == null ? void 0 : _b.authMethods) == null ? void 0 : _c.default); + if (defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication) { + yield defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication(requestContext); + } + return requestContext; + }); + } + /** + * Version: 9.0.0.cl or later Generates an Answer from a given data source. Requires at least view access to the data source object (Worksheet or View). #### Usage guidelines To search data, specify the data source GUID in `logical_table_identifier`. The data source can be a Worksheet, View, Table, or SQL view. Pass search tokens in the `query_string` attribute in the API request as shown in the following example: ``` { \"query_string\": \"[sales] by [store]\", \"logical_table_identifier\": \"cd252e5c-b552-49a8-821d-3eadaa049cca\", } ``` For more information about the `query_string` format and data source attribute, see [Search data API](https://developers.thoughtspot.com/docs/fetch-data-and-report-apis#_search_data_api). The `record_size` attribute determines the number of records to retrieve in an API call. For more information about pagination, record size, and maximum row limit, see [Pagination and record size settings](https://developers.thoughtspot.com/docs/fetch-data-and-report-apis#_pagination_settings_for_data_and_report_api). + * @param searchDataRequest + */ + searchData(searchDataRequest, _options) { + return __async(this, null, function* () { + var _a, _b, _c; + let _config = _options || this.configuration; + if (searchDataRequest === null || searchDataRequest === void 0) { + throw new RequiredError("ThoughtSpotRestApi", "searchData", "searchDataRequest"); + } + const localVarPath = "/api/rest/2.0/searchdata"; + const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.25.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.25.0"); + const contentType = ObjectSerializer.getPreferredMediaType([ + "application/json" + ]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = ObjectSerializer.stringify( + ObjectSerializer.serialize(searchDataRequest, "SearchDataRequest", ""), + contentType + ); + requestContext.setBody(serializedBody); + let authMethod; + authMethod = _config.authMethods["bearerAuth"]; + if (authMethod == null ? void 0 : authMethod.applySecurityAuthentication) { + yield authMethod == null ? void 0 : authMethod.applySecurityAuthentication(requestContext); + } + const defaultAuth = ((_a = _options == null ? void 0 : _options.authMethods) == null ? void 0 : _a.default) || ((_c = (_b = this.configuration) == null ? void 0 : _b.authMethods) == null ? void 0 : _c.default); + if (defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication) { + yield defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication(requestContext); + } + return requestContext; + }); + } + /** + * Version: 10.10.0.cl or later Search the email customization configuration if any set for the ThoughtSpot system. #### Pre-requisites Requires `DEVELOPER` (**has developer privilege**) or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `DEVELOPER` (**Has developer privilege**) privilege is required. **NOTE**:This endpoint in currently in beta. Contact ThoughtSpot support to enable this on your instance. + * @param searchEmailCustomizationRequest + */ + searchEmailCustomization(searchEmailCustomizationRequest, _options) { + return __async(this, null, function* () { + var _a, _b, _c; + let _config = _options || this.configuration; + if (searchEmailCustomizationRequest === null || searchEmailCustomizationRequest === void 0) { + throw new RequiredError("ThoughtSpotRestApi", "searchEmailCustomization", "searchEmailCustomizationRequest"); + } + const localVarPath = "/api/rest/2.0/customization/email/search"; + const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.25.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.25.0"); + const contentType = ObjectSerializer.getPreferredMediaType([ + "application/json" + ]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = ObjectSerializer.stringify( + ObjectSerializer.serialize(searchEmailCustomizationRequest, "SearchEmailCustomizationRequest", ""), + contentType + ); + requestContext.setBody(serializedBody); + let authMethod; + authMethod = _config.authMethods["bearerAuth"]; + if (authMethod == null ? void 0 : authMethod.applySecurityAuthentication) { + yield authMethod == null ? void 0 : authMethod.applySecurityAuthentication(requestContext); + } + const defaultAuth = ((_a = _options == null ? void 0 : _options.authMethods) == null ? void 0 : _a.default) || ((_c = (_b = this.configuration) == null ? void 0 : _b.authMethods) == null ? void 0 : _c.default); + if (defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication) { + yield defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication(requestContext); + } + return requestContext; + }); + } + /** + * Version: 9.0.0.cl or later Gets a list of metadata objects available on the ThoughtSpot system. This API endpoint is available to all users who have view access to the object. Users with `ADMINISTRATION` (**Can administer ThoughtSpot**) privileges can view data for all metadata objects, including users and groups. #### Usage guidelines - To get all metadata objects, send the API request without any attributes. - To get metadata objects of a specific type, set the `type` attribute. For example, to fetch a Worksheet, set the type as `LOGICAL_TABLE`. - To filter metadata objects within type `LOGICAL_TABLE`, set the `subtypes` attribute. For example, to fetch a Worksheet, set the type as `LOGICAL_TABLE` & subtypes as `[WORKSHEET]`. - To get a specific metadata object, specify the GUID. - To customize your search and filter the API response, you can use several parameters. You can search for objects created or modified by specific users, by tags applied to the objects, or by using the include parameters like `include_auto_created_objects`, `include_dependent_objects`, `include_headers`, `include_incomplete_objects`, and so on. You can also define sorting options to sort the data retrieved in the API response. - To get discoverable objects when linientmodel is enabled you can use `include_discoverable_objects` as true else false. Default value is true. - For liveboard metadata type, to get the newer format, set the `liveboard_response_format` as V2. Default value is V1. - To retrieve only objects that are published, set the `include_only_published_objects` as true. Default value is false. **NOTE**: The following parameters support pagination of metadata records: - `tag_identifiers` - `type` - `subtypes` - `created_by_user_identifiers` - `modified_by_user_identifiers` - `owned_by_user_identifiers` - `exclude_objects` - `include_auto_created_objects` - `favorite_object_options` - `include_only_published_objects` If you are using other parameters to search metadata, set `record_size` to `-1` and `record_offset` to `0`. + * @param searchMetadataRequest + */ + searchMetadata(searchMetadataRequest, _options) { + return __async(this, null, function* () { + var _a, _b, _c; + let _config = _options || this.configuration; + if (searchMetadataRequest === null || searchMetadataRequest === void 0) { + throw new RequiredError("ThoughtSpotRestApi", "searchMetadata", "searchMetadataRequest"); + } + const localVarPath = "/api/rest/2.0/metadata/search"; + const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.25.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.25.0"); + const contentType = ObjectSerializer.getPreferredMediaType([ + "application/json" + ]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = ObjectSerializer.stringify( + ObjectSerializer.serialize(searchMetadataRequest, "SearchMetadataRequest", ""), + contentType + ); + requestContext.setBody(serializedBody); + let authMethod; + authMethod = _config.authMethods["bearerAuth"]; + if (authMethod == null ? void 0 : authMethod.applySecurityAuthentication) { + yield authMethod == null ? void 0 : authMethod.applySecurityAuthentication(requestContext); + } + const defaultAuth = ((_a = _options == null ? void 0 : _options.authMethods) == null ? void 0 : _a.default) || ((_c = (_b = this.configuration) == null ? void 0 : _b.authMethods) == null ? void 0 : _c.default); + if (defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication) { + yield defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication(requestContext); + } + return requestContext; + }); + } + /** + * Version: 9.0.0.cl or later Gets a list of Orgs configured on the ThoughtSpot system. To get details of a specific Org, specify the Org ID or name. You can also pass parameters such as status, visibility, and user identifiers to get a specific list of Orgs. Requires cluster administration (**Can administer Org**) privileges. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `ORG_ADMINISTRATION` (**Can manage Orgs**) privilege is required. + * @param searchOrgsRequest + */ + searchOrgs(searchOrgsRequest, _options) { + return __async(this, null, function* () { + var _a, _b, _c; + let _config = _options || this.configuration; + if (searchOrgsRequest === null || searchOrgsRequest === void 0) { + throw new RequiredError("ThoughtSpotRestApi", "searchOrgs", "searchOrgsRequest"); + } + const localVarPath = "/api/rest/2.0/orgs/search"; + const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.25.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.25.0"); + const contentType = ObjectSerializer.getPreferredMediaType([ + "application/json" + ]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = ObjectSerializer.stringify( + ObjectSerializer.serialize(searchOrgsRequest, "SearchOrgsRequest", ""), + contentType + ); + requestContext.setBody(serializedBody); + let authMethod; + authMethod = _config.authMethods["bearerAuth"]; + if (authMethod == null ? void 0 : authMethod.applySecurityAuthentication) { + yield authMethod == null ? void 0 : authMethod.applySecurityAuthentication(requestContext); + } + const defaultAuth = ((_a = _options == null ? void 0 : _options.authMethods) == null ? void 0 : _a.default) || ((_c = (_b = this.configuration) == null ? void 0 : _b.authMethods) == null ? void 0 : _c.default); + if (defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication) { + yield defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication(requestContext); + } + return requestContext; + }); + } + /** + * Version: 9.5.0.cl or later Gets a list of Role objects from the ThoughtSpot system. Available if [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance. To search for Roles, the `ROLE_ADMINISTRATION` (**Can manage roles**) privilege is required. To get details of a specific Role object, specify the GUID or name. You can also filter the API response based on user group and Org identifiers, privileges assigned to the Role, and deprecation status. + * @param searchRolesRequest + */ + searchRoles(searchRolesRequest, _options) { + return __async(this, null, function* () { + var _a, _b, _c; + let _config = _options || this.configuration; + if (searchRolesRequest === null || searchRolesRequest === void 0) { + throw new RequiredError("ThoughtSpotRestApi", "searchRoles", "searchRolesRequest"); + } + const localVarPath = "/api/rest/2.0/roles/search"; + const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.25.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.25.0"); + const contentType = ObjectSerializer.getPreferredMediaType([ + "application/json" + ]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = ObjectSerializer.stringify( + ObjectSerializer.serialize(searchRolesRequest, "SearchRolesRequest", ""), + contentType + ); + requestContext.setBody(serializedBody); + let authMethod; + authMethod = _config.authMethods["bearerAuth"]; + if (authMethod == null ? void 0 : authMethod.applySecurityAuthentication) { + yield authMethod == null ? void 0 : authMethod.applySecurityAuthentication(requestContext); + } + const defaultAuth = ((_a = _options == null ? void 0 : _options.authMethods) == null ? void 0 : _a.default) || ((_c = (_b = this.configuration) == null ? void 0 : _b.authMethods) == null ? void 0 : _c.default); + if (defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication) { + yield defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication(requestContext); + } + return requestContext; + }); + } + /** + * Search Schedules Version: 9.4.0.cl or later Gets a list of scheduled jobs configured for a Liveboard. To get details of a specific scheduled job, specify the name or GUID of the scheduled job. Requires at least view access to Liveboards. **NOTE**: When filtering schedules by parameters other than `metadata`, set `record_size` to `-1` and `record_offset` to `0` for accurate results. + * @param searchSchedulesRequest + */ + searchSchedules(searchSchedulesRequest, _options) { + return __async(this, null, function* () { + var _a, _b, _c; + let _config = _options || this.configuration; + if (searchSchedulesRequest === null || searchSchedulesRequest === void 0) { + throw new RequiredError("ThoughtSpotRestApi", "searchSchedules", "searchSchedulesRequest"); + } + const localVarPath = "/api/rest/2.0/schedules/search"; + const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.25.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.25.0"); + const contentType = ObjectSerializer.getPreferredMediaType([ + "application/json" + ]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = ObjectSerializer.stringify( + ObjectSerializer.serialize(searchSchedulesRequest, "SearchSchedulesRequest", ""), + contentType + ); + requestContext.setBody(serializedBody); + let authMethod; + authMethod = _config.authMethods["bearerAuth"]; + if (authMethod == null ? void 0 : authMethod.applySecurityAuthentication) { + yield authMethod == null ? void 0 : authMethod.applySecurityAuthentication(requestContext); + } + const defaultAuth = ((_a = _options == null ? void 0 : _options.authMethods) == null ? void 0 : _a.default) || ((_c = (_b = this.configuration) == null ? void 0 : _b.authMethods) == null ? void 0 : _c.default); + if (defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication) { + yield defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication(requestContext); + } + return requestContext; + }); + } + /** + * Version: 26.2.0.cl or later Fetch security settings for your ThoughtSpot application instance. - Use `scope: CLUSTER` to retrieve cluster-level security settings, including CORS and CSP allowlists, SAML redirect URLs, and settings that control access to non-embedded pages. - Use `scope: ORG` to retrieve Org-level security settings. If your instance has [Orgs](https://docs.thoughtspot.com/cloud/latest/orgs-overview), this returns CORS and non-embed access settings specific to the Org. - If `scope` is not specified, returns both cluster and Org-specific settings based on user privileges. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) or `DEVELOPER` (**Has developer privilege**) privilege. See [Security Settings](https://developers.thoughtspot.com/docs/security-settings) for more details. + * @param searchSecuritySettingsRequest + */ + searchSecuritySettings(searchSecuritySettingsRequest, _options) { + return __async(this, null, function* () { + var _a, _b, _c; + let _config = _options || this.configuration; + if (searchSecuritySettingsRequest === null || searchSecuritySettingsRequest === void 0) { + throw new RequiredError("ThoughtSpotRestApi", "searchSecuritySettings", "searchSecuritySettingsRequest"); + } + const localVarPath = "/api/rest/2.0/system/security-settings/search"; + const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.25.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.25.0"); + const contentType = ObjectSerializer.getPreferredMediaType([ + "application/json" + ]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = ObjectSerializer.stringify( + ObjectSerializer.serialize(searchSecuritySettingsRequest, "SearchSecuritySettingsRequest", ""), + contentType + ); + requestContext.setBody(serializedBody); + let authMethod; + authMethod = _config.authMethods["bearerAuth"]; + if (authMethod == null ? void 0 : authMethod.applySecurityAuthentication) { + yield authMethod == null ? void 0 : authMethod.applySecurityAuthentication(requestContext); + } + const defaultAuth = ((_a = _options == null ? void 0 : _options.authMethods) == null ? void 0 : _a.default) || ((_c = (_b = this.configuration) == null ? void 0 : _b.authMethods) == null ? void 0 : _c.default); + if (defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication) { + yield defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication(requestContext); + } + return requestContext; + }); + } + /** + * Version: 9.0.0.cl or later Gets a list of tag objects available on the ThoughtSpot system. To get details of a specific tag object, specify the GUID or name. Any authenticated user can search for tag objects. + * @param searchTagsRequest + */ + searchTags(searchTagsRequest, _options) { + return __async(this, null, function* () { + var _a, _b, _c; + let _config = _options || this.configuration; + if (searchTagsRequest === null || searchTagsRequest === void 0) { + throw new RequiredError("ThoughtSpotRestApi", "searchTags", "searchTagsRequest"); + } + const localVarPath = "/api/rest/2.0/tags/search"; + const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.25.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.25.0"); + const contentType = ObjectSerializer.getPreferredMediaType([ + "application/json" + ]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = ObjectSerializer.stringify( + ObjectSerializer.serialize(searchTagsRequest, "SearchTagsRequest", ""), + contentType + ); + requestContext.setBody(serializedBody); + let authMethod; + authMethod = _config.authMethods["bearerAuth"]; + if (authMethod == null ? void 0 : authMethod.applySecurityAuthentication) { + yield authMethod == null ? void 0 : authMethod.applySecurityAuthentication(requestContext); + } + const defaultAuth = ((_a = _options == null ? void 0 : _options.authMethods) == null ? void 0 : _a.default) || ((_c = (_b = this.configuration) == null ? void 0 : _b.authMethods) == null ? void 0 : _c.default); + if (defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication) { + yield defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication(requestContext); + } + return requestContext; + }); + } + /** + * Version: 9.0.0.cl or later Gets a list of user group objects from the ThoughtSpot system. To get details of a specific user group, specify the user group GUID or name. You can also filter the API response based on User ID, Org ID, Role ID, type of group, sharing visibility, privileges assigned to the group, and the Liveboard IDs assigned to the users in the group. Available to all users. Users with `ADMINISTRATION` (**Can administer ThoughtSpot**) privileges can view all users properties. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `GROUP_ADMINISTRATION` (**Can manage groups**) privilege is required. **NOTE**: If you do not get precise results, try setting `record_size` to `-1` and `record_offset` to `0`. + * @param searchUserGroupsRequest + */ + searchUserGroups(searchUserGroupsRequest, _options) { + return __async(this, null, function* () { + var _a, _b, _c; + let _config = _options || this.configuration; + if (searchUserGroupsRequest === null || searchUserGroupsRequest === void 0) { + throw new RequiredError("ThoughtSpotRestApi", "searchUserGroups", "searchUserGroupsRequest"); + } + const localVarPath = "/api/rest/2.0/groups/search"; + const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.25.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.25.0"); + const contentType = ObjectSerializer.getPreferredMediaType([ + "application/json" + ]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = ObjectSerializer.stringify( + ObjectSerializer.serialize(searchUserGroupsRequest, "SearchUserGroupsRequest", ""), + contentType + ); + requestContext.setBody(serializedBody); + let authMethod; + authMethod = _config.authMethods["bearerAuth"]; + if (authMethod == null ? void 0 : authMethod.applySecurityAuthentication) { + yield authMethod == null ? void 0 : authMethod.applySecurityAuthentication(requestContext); + } + const defaultAuth = ((_a = _options == null ? void 0 : _options.authMethods) == null ? void 0 : _a.default) || ((_c = (_b = this.configuration) == null ? void 0 : _b.authMethods) == null ? void 0 : _c.default); + if (defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication) { + yield defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication(requestContext); + } + return requestContext; + }); + } + /** + * Version: 9.0.0.cl or later Gets a list of users available on the ThoughtSpot system. To get details of a specific user, specify the user GUID or name. You can also filter the API response based on groups, Org ID, user visibility, account status, user type, and user preference settings and favorites. Available to all users. Users with `ADMINISTRATION` (**Can administer ThoughtSpot**) privileges can view all users properties. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `USER_ADMINISTRATION` (**Can manage users**) privilege is required. **NOTE**: If the API returns an empty list, consider increasing the value of the `record_size` parameter. To search across all available users, set `record_size` to `-1`. + * @param searchUsersRequest + */ + searchUsers(searchUsersRequest, _options) { + return __async(this, null, function* () { + var _a, _b, _c; + let _config = _options || this.configuration; + if (searchUsersRequest === null || searchUsersRequest === void 0) { + throw new RequiredError("ThoughtSpotRestApi", "searchUsers", "searchUsersRequest"); + } + const localVarPath = "/api/rest/2.0/users/search"; + const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.25.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.25.0"); + const contentType = ObjectSerializer.getPreferredMediaType([ + "application/json" + ]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = ObjectSerializer.stringify( + ObjectSerializer.serialize(searchUsersRequest, "SearchUsersRequest", ""), + contentType + ); + requestContext.setBody(serializedBody); + let authMethod; + authMethod = _config.authMethods["bearerAuth"]; + if (authMethod == null ? void 0 : authMethod.applySecurityAuthentication) { + yield authMethod == null ? void 0 : authMethod.applySecurityAuthentication(requestContext); + } + const defaultAuth = ((_a = _options == null ? void 0 : _options.authMethods) == null ? void 0 : _a.default) || ((_c = (_b = this.configuration) == null ? void 0 : _b.authMethods) == null ? void 0 : _c.default); + if (defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication) { + yield defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication(requestContext); + } + return requestContext; + }); + } + /** + * Search variables Version: 26.4.0.cl or later Allows searching for variables in ThoughtSpot. Requires ADMINISTRATION role. The CAN_MANAGE_VARIABLES permission allows you to manage Formula Variables in the current organization scope. The API endpoint supports searching variables by: * Variable identifier (ID or name) * Variable type * Name pattern (case-insensitive, supports % for wildcard) The search results can be formatted in three ways: * METADATA - Returns only variable metadata (default) * METADATA_AND_VALUES - Returns variable metadata and values The values can be filtered by scope: * org_identifier * principal_identifier * model_identifier + * @param searchVariablesRequest + */ + searchVariables(searchVariablesRequest, _options) { + return __async(this, null, function* () { + var _a, _b, _c; + let _config = _options || this.configuration; + if (searchVariablesRequest === null || searchVariablesRequest === void 0) { + throw new RequiredError("ThoughtSpotRestApi", "searchVariables", "searchVariablesRequest"); + } + const localVarPath = "/api/rest/2.0/template/variables/search"; + const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.25.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.25.0"); + const contentType = ObjectSerializer.getPreferredMediaType([ + "application/json" + ]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = ObjectSerializer.stringify( + ObjectSerializer.serialize(searchVariablesRequest, "SearchVariablesRequest", ""), + contentType + ); + requestContext.setBody(serializedBody); + let authMethod; + authMethod = _config.authMethods["bearerAuth"]; + if (authMethod == null ? void 0 : authMethod.applySecurityAuthentication) { + yield authMethod == null ? void 0 : authMethod.applySecurityAuthentication(requestContext); + } + const defaultAuth = ((_a = _options == null ? void 0 : _options.authMethods) == null ? void 0 : _a.default) || ((_c = (_b = this.configuration) == null ? void 0 : _b.authMethods) == null ? void 0 : _c.default); + if (defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication) { + yield defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication(requestContext); + } + return requestContext; + }); + } + /** + * Version: 10.14.0.cl or later Searches for webhook configurations based on various criteria such as Org, webhook identifier, event type, with support for pagination and sorting. Returns matching webhook configurations with their complete details. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) or `DEVELOPER` (**Has developer privilege**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, users with `CAN_MANAGE_WEBHOOKS` (**Can manage webhooks**) privilege are also authorized to perform this action. + * @param searchWebhookConfigurationsRequest + */ + searchWebhookConfigurations(searchWebhookConfigurationsRequest, _options) { + return __async(this, null, function* () { + var _a, _b, _c; + let _config = _options || this.configuration; + if (searchWebhookConfigurationsRequest === null || searchWebhookConfigurationsRequest === void 0) { + throw new RequiredError("ThoughtSpotRestApi", "searchWebhookConfigurations", "searchWebhookConfigurationsRequest"); + } + const localVarPath = "/api/rest/2.0/webhooks/search"; + const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.25.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.25.0"); + const contentType = ObjectSerializer.getPreferredMediaType([ + "application/json" + ]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = ObjectSerializer.stringify( + ObjectSerializer.serialize(searchWebhookConfigurationsRequest, "SearchWebhookConfigurationsRequest", ""), + contentType + ); + requestContext.setBody(serializedBody); + let authMethod; + authMethod = _config.authMethods["bearerAuth"]; + if (authMethod == null ? void 0 : authMethod.applySecurityAuthentication) { + yield authMethod == null ? void 0 : authMethod.applySecurityAuthentication(requestContext); + } + const defaultAuth = ((_a = _options == null ? void 0 : _options.authMethods) == null ? void 0 : _a.default) || ((_c = (_b = this.configuration) == null ? void 0 : _b.authMethods) == null ? void 0 : _c.default); + if (defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication) { + yield defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication(requestContext); + } + return requestContext; + }); + } + /** + * Version: 26.5.0.cl or later Sends natural language messages to an existing Spotter agent conversation and returns the complete response synchronously. Requires `CAN_USE_SPOTTER` privilege and access to the metadata object associated with the conversation. The user must have access to the conversation session referenced by `conversation_identifier`. A conversation must first be created using the `createAgentConversation` API. #### Usage guidelines The request must include: - `conversation_identifier`: the unique session ID returned by `createAgentConversation`, used for context continuity and message tracking - `messages`: an array of one or more text messages to send to the agent The API returns an array of response objects, each containing: - `type`: the kind of response — `text`, `answer`, or `error` - `message`: the main content of the response - `metadata`: additional information depending on the message type (e.g., answer metadata includes analytics and visualization details) #### Error responses | Code | Description | |------|----------------------------------------------------------------------------------------------------------------------------------| | 401 | Unauthorized — authentication token is missing, expired, or invalid. | | 403 | Forbidden — the authenticated user does not have `CAN_USE_SPOTTER` privilege or lacks permission on the referenced conversation. | > ###### Note: > > - This endpoint is Generally Available from version 26.5.0.cl. > - This endpoint requires Spotter - please contact ThoughtSpot support to enable Spotter on your cluster. > - For real-time streamed responses, use `sendAgentConversationMessageStreaming` instead. + * @param conversationIdentifier Unique identifier for the conversation (used to track context) + * @param sendAgentConversationMessageRequest + */ + sendAgentConversationMessage(conversationIdentifier, sendAgentConversationMessageRequest, _options) { + return __async(this, null, function* () { + var _a, _b, _c; + let _config = _options || this.configuration; + if (conversationIdentifier === null || conversationIdentifier === void 0) { + throw new RequiredError("ThoughtSpotRestApi", "sendAgentConversationMessage", "conversationIdentifier"); + } + if (sendAgentConversationMessageRequest === null || sendAgentConversationMessageRequest === void 0) { + throw new RequiredError("ThoughtSpotRestApi", "sendAgentConversationMessage", "sendAgentConversationMessageRequest"); + } + const localVarPath = "/api/rest/2.0/ai/agent/conversation/{conversation_identifier}/send".replace("{conversation_identifier}", encodeURIComponent(String(conversationIdentifier))); + const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.25.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.25.0"); + const contentType = ObjectSerializer.getPreferredMediaType([ + "application/json" + ]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = ObjectSerializer.stringify( + ObjectSerializer.serialize(sendAgentConversationMessageRequest, "SendAgentConversationMessageRequest", ""), + contentType + ); + requestContext.setBody(serializedBody); + let authMethod; + authMethod = _config.authMethods["bearerAuth"]; + if (authMethod == null ? void 0 : authMethod.applySecurityAuthentication) { + yield authMethod == null ? void 0 : authMethod.applySecurityAuthentication(requestContext); + } + const defaultAuth = ((_a = _options == null ? void 0 : _options.authMethods) == null ? void 0 : _a.default) || ((_c = (_b = this.configuration) == null ? void 0 : _b.authMethods) == null ? void 0 : _c.default); + if (defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication) { + yield defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication(requestContext); + } + return requestContext; + }); + } + /** + * Version: 26.5.0.cl or later Sends one or more natural language messages to an existing Spotter agent conversation and returns the response as a real-time Server-Sent Events stream. Requires `CAN_USE_SPOTTER` privilege and access to the metadata object associated with the conversation. The user must have access to the conversation session referenced by `conversation_identifier`. A conversation must first be created using the `createAgentConversation` API. #### Usage guidelines The request must include: - `conversation_identifier`: the unique session ID returned by `createAgentConversation`, used for context continuity and message tracking - `messages`: an array of one or more text messages to send to the agent If the request is valid, the API returns a Server-Sent Events (SSE) stream. Each line has the form `data: [{\"type\": \"...\", ...}]` — a JSON array of event objects. Event types include: - `ack`: confirms receipt of the request (`node_id`) - `conv_title`: conversation title (`title`, `conv_id`) - `notification`: status updates on operations (`group_id`, `metadata`, `code` — e.g. `TOOL_CALL_NOTIFICATION`, `nls_start`, `FINAL_RESPONSE_NOTIFICATION`) - `text-chunk`: incremental content chunks (`id`, `group_id`, `metadata` with `format` and `type` such as `thinking` or `text`, `content`) - `text`: full text block with same structure as `text-chunk` - `answer`: structured answer with metadata (`id`, `group_id`, `metadata` with `sage_query`, `session_id`, `title`, etc., `title`) - `error`: if a failure occurs #### Error responses | Code | Description | | ---- | -------------------------------------------------------------------------------------------------------------------------------- | | 401 | Unauthorized — authentication token is missing, expired, or invalid. | | 403 | Forbidden — the authenticated user does not have `CAN_USE_SPOTTER` privilege or lacks permission on the referenced conversation. | > ###### Note: > > - This endpoint is Generally Available from version 26.5.0.cl. > - This endpoint requires Spotter - please contact ThoughtSpot support to enable Spotter on your cluster. > - The streaming protocol uses Server-Sent Events (SSE). > - For the complete response in a single payload, use `sendAgentConversationMessage` instead. + * @param conversationIdentifier Unique identifier for the conversation (used to track context) + * @param sendAgentConversationMessageStreamingRequest + */ + sendAgentConversationMessageStreaming(conversationIdentifier, sendAgentConversationMessageStreamingRequest, _options) { + return __async(this, null, function* () { + var _a, _b, _c; + let _config = _options || this.configuration; + if (conversationIdentifier === null || conversationIdentifier === void 0) { + throw new RequiredError("ThoughtSpotRestApi", "sendAgentConversationMessageStreaming", "conversationIdentifier"); + } + if (sendAgentConversationMessageStreamingRequest === null || sendAgentConversationMessageStreamingRequest === void 0) { + throw new RequiredError("ThoughtSpotRestApi", "sendAgentConversationMessageStreaming", "sendAgentConversationMessageStreamingRequest"); + } + const localVarPath = "/api/rest/2.0/ai/agent/conversation/{conversation_identifier}/send/stream".replace("{conversation_identifier}", encodeURIComponent(String(conversationIdentifier))); + const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.25.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.25.0"); + const contentType = ObjectSerializer.getPreferredMediaType([ + "application/json" + ]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = ObjectSerializer.stringify( + ObjectSerializer.serialize(sendAgentConversationMessageStreamingRequest, "SendAgentConversationMessageStreamingRequest", ""), + contentType + ); + requestContext.setBody(serializedBody); + let authMethod; + authMethod = _config.authMethods["bearerAuth"]; + if (authMethod == null ? void 0 : authMethod.applySecurityAuthentication) { + yield authMethod == null ? void 0 : authMethod.applySecurityAuthentication(requestContext); + } + const defaultAuth = ((_a = _options == null ? void 0 : _options.authMethods) == null ? void 0 : _a.default) || ((_c = (_b = this.configuration) == null ? void 0 : _b.authMethods) == null ? void 0 : _c.default); + if (defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication) { + yield defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication(requestContext); + } + return requestContext; + }); + } + /** + * Version: 26.2.0.cl or later **Deprecated** — Use `sendAgentConversationMessage` instead. Send natural language messages to an existing Spotter agent conversation and returns the complete response synchronously. Requires `CAN_USE_SPOTTER` privilege and access to the metadata object associated with the conversation. The user must have access to the conversation session referenced by `conversation_identifier`. A conversation must first be created using the `createAgentConversation` API. #### Usage guidelines The request must include: - `conversation_identifier`: the unique session ID returned by `createAgentConversation`, used for context continuity and message tracking - `messages`: an array of one or more text messages to send to the agent The API returns an array of response objects, each containing: - `type`: the kind of response — `text`, `answer`, or `error` - `message`: the main content of the response - `metadata`: additional information depending on the message type (e.g., answer metadata includes analytics and visualization details) #### Error responses | Code | Description | |------|----------------------------------------------------------------------------------------------------------------------------------| | 401 | Unauthorized — authentication token is missing, expired, or invalid. | | 403 | Forbidden — the authenticated user does not have `CAN_USE_SPOTTER` privilege or lacks permission on the referenced conversation. | > ###### Note: > > - This endpoint is deprecated. Use `sendAgentConversationMessage` for new integrations. > - This endpoint is currently in Beta. Breaking changes may be introduced before the endpoint is made Generally Available. > - This endpoint requires Spotter - please contact ThoughtSpot support to enable Spotter on your cluster. + * @param conversationIdentifier Unique identifier for the conversation (used to track context) + * @param sendAgentMessageRequest + */ + sendAgentMessage(conversationIdentifier, sendAgentMessageRequest, _options) { + return __async(this, null, function* () { + var _a, _b, _c; + let _config = _options || this.configuration; + if (conversationIdentifier === null || conversationIdentifier === void 0) { + throw new RequiredError("ThoughtSpotRestApi", "sendAgentMessage", "conversationIdentifier"); + } + if (sendAgentMessageRequest === null || sendAgentMessageRequest === void 0) { + throw new RequiredError("ThoughtSpotRestApi", "sendAgentMessage", "sendAgentMessageRequest"); + } + const localVarPath = "/api/rest/2.0/ai/agent/{conversation_identifier}/converse".replace("{conversation_identifier}", encodeURIComponent(String(conversationIdentifier))); + const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.25.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.25.0"); + const contentType = ObjectSerializer.getPreferredMediaType([ + "application/json" + ]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = ObjectSerializer.stringify( + ObjectSerializer.serialize(sendAgentMessageRequest, "SendAgentMessageRequest", ""), + contentType + ); + requestContext.setBody(serializedBody); + let authMethod; + authMethod = _config.authMethods["bearerAuth"]; + if (authMethod == null ? void 0 : authMethod.applySecurityAuthentication) { + yield authMethod == null ? void 0 : authMethod.applySecurityAuthentication(requestContext); + } + const defaultAuth = ((_a = _options == null ? void 0 : _options.authMethods) == null ? void 0 : _a.default) || ((_c = (_b = this.configuration) == null ? void 0 : _b.authMethods) == null ? void 0 : _c.default); + if (defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication) { + yield defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication(requestContext); + } + return requestContext; + }); + } + /** + * Version: 26.2.0.cl or later **Deprecated** — Use `sendAgentConversationMessageStreaming` instead. Sends one or more natural language messages to an existing Spotter agent conversation and returns the response as a real-time Server-Sent Events stream. Requires `CAN_USE_SPOTTER` privilege and access to the metadata object associated with the conversation. The user must have access to the conversation session referenced by `conversation_identifier`. A conversation must first be created using the `createAgentConversation` API. #### Usage guidelines The request must include: - `conversation_identifier`: the unique session ID returned by `createAgentConversation`, used for context continuity and message tracking - `messages`: an array of one or more text messages to send to the agent If the request is valid, the API returns a Server-Sent Events (SSE) stream. Each line has the form `data: [{\"type\": \"...\", ...}]` — a JSON array of event objects. Event types include: - `ack`: confirms receipt of the request (`node_id`) - `conv_title`: conversation title (`title`, `conv_id`) - `notification`: status updates on operations (`group_id`, `metadata`, `code` — e.g. `TOOL_CALL_NOTIFICATION`, `nls_start`, `FINAL_RESPONSE_NOTIFICATION`) - `text-chunk`: incremental content chunks (`id`, `group_id`, `metadata` with `format` and `type` such as `thinking` or `text`, `content`) - `text`: full text block with same structure as `text-chunk` - `answer`: structured answer with metadata (`id`, `group_id`, `metadata` with `sage_query`, `session_id`, `title`, etc., `title`) - `error`: if a failure occurs #### Error responses | Code | Description | |------|----------------------------------------------------------------------------------------------------------------------------------| | 401 | Unauthorized — authentication token is missing, expired, or invalid. | | 403 | Forbidden — the authenticated user does not have `CAN_USE_SPOTTER` privilege or lacks permission on the referenced conversation. | > ###### Note: > > - This endpoint is deprecated. Use `sendAgentConversationMessageStreaming` for new integrations. > - This endpoint is currently in Beta. Breaking changes may be introduced before the endpoint is made Generally Available. > - This endpoint requires Spotter - please contact ThoughtSpot support to enable Spotter on your cluster. > - The streaming protocol uses Server-Sent Events (SSE). + * @param sendAgentMessageStreamingRequest + */ + sendAgentMessageStreaming(sendAgentMessageStreamingRequest, _options) { + return __async(this, null, function* () { + var _a, _b, _c; + let _config = _options || this.configuration; + if (sendAgentMessageStreamingRequest === null || sendAgentMessageStreamingRequest === void 0) { + throw new RequiredError("ThoughtSpotRestApi", "sendAgentMessageStreaming", "sendAgentMessageStreamingRequest"); + } + const localVarPath = "/api/rest/2.0/ai/agent/converse/sse"; + const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.25.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.25.0"); + const contentType = ObjectSerializer.getPreferredMediaType([ + "application/json" + ]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = ObjectSerializer.stringify( + ObjectSerializer.serialize(sendAgentMessageStreamingRequest, "SendAgentMessageStreamingRequest", ""), + contentType + ); + requestContext.setBody(serializedBody); + let authMethod; + authMethod = _config.authMethods["bearerAuth"]; + if (authMethod == null ? void 0 : authMethod.applySecurityAuthentication) { + yield authMethod == null ? void 0 : authMethod.applySecurityAuthentication(requestContext); + } + const defaultAuth = ((_a = _options == null ? void 0 : _options.authMethods) == null ? void 0 : _a.default) || ((_c = (_b = this.configuration) == null ? void 0 : _b.authMethods) == null ? void 0 : _c.default); + if (defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication) { + yield defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication(requestContext); + } + return requestContext; + }); + } + /** + * Version: 10.4.0.cl or later Sends a follow-up message to an existing conversation within the context of a data model. Requires `CAN_USE_SPOTTER` privilege and at least view access to the metadata object specified in the request. A conversation must first be created using the `createConversation` API. #### Usage guidelines The request must include: - `conversation_identifier`: the unique session ID returned by `createConversation` - `metadata_identifier`: the unique ID of the data source used for the conversation - `message`: a natural language string with the follow-up question If the request is successful, the API returns an array of response messages, each containing: - `session_identifier`: the unique ID of the generated response - `generation_number`: the generation number of the response - `message_type`: the type of the response (e.g., `TSAnswer`) - `visualization_type`: the generated visualization type (`Chart`, `Table`, or `Undefined`) - `tokens` / `display_tokens`: the search tokens and user-friendly display tokens for the response #### Error responses | Code | Description | |------|-----------------------------------------------------------------------------------------------------------------------------------------| | 401 | Unauthorized — authentication token is missing, expired, or invalid. | | 403 | Forbidden — the authenticated user does not have `CAN_USE_SPOTTER` privilege or lacks view permission on the specified metadata object. | > ###### Note: > * This endpoint is currently in Beta. Breaking changes may be introduced before the endpoint is made Generally Available. > * This endpoint requires Spotter - please contact ThoughtSpot support to enable Spotter on your cluster. + * @param conversationIdentifier Unique identifier of the conversation. + * @param sendMessageRequest + */ + sendMessage(conversationIdentifier, sendMessageRequest, _options) { + return __async(this, null, function* () { + var _a, _b, _c; + let _config = _options || this.configuration; + if (conversationIdentifier === null || conversationIdentifier === void 0) { + throw new RequiredError("ThoughtSpotRestApi", "sendMessage", "conversationIdentifier"); + } + if (sendMessageRequest === null || sendMessageRequest === void 0) { + throw new RequiredError("ThoughtSpotRestApi", "sendMessage", "sendMessageRequest"); + } + const localVarPath = "/api/rest/2.0/ai/conversation/{conversation_identifier}/converse".replace("{conversation_identifier}", encodeURIComponent(String(conversationIdentifier))); + const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.25.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.25.0"); + const contentType = ObjectSerializer.getPreferredMediaType([ + "application/json" + ]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = ObjectSerializer.stringify( + ObjectSerializer.serialize(sendMessageRequest, "SendMessageRequest", ""), + contentType + ); + requestContext.setBody(serializedBody); + let authMethod; + authMethod = _config.authMethods["bearerAuth"]; + if (authMethod == null ? void 0 : authMethod.applySecurityAuthentication) { + yield authMethod == null ? void 0 : authMethod.applySecurityAuthentication(requestContext); + } + const defaultAuth = ((_a = _options == null ? void 0 : _options.authMethods) == null ? void 0 : _a.default) || ((_c = (_b = this.configuration) == null ? void 0 : _b.authMethods) == null ? void 0 : _c.default); + if (defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication) { + yield defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication(requestContext); + } + return requestContext; + }); + } + /** + * Version: 10.15.0.cl or later This API allows users to set natural language (NL) instructions for a specific data-model to improve AI-generated answers and query processing. These instructions help guide the AI system to better understand the data context and provide more accurate responses. Requires `CAN_USE_SPOTTER` privilege, either edit access or `SPOTTER_COACHING_PRIVILEGE` on the data model, and a bearer token corresponding to the org where the data model exists. #### Usage guidelines To set NL instructions for a data-model, the request must include: - `data_source_identifier`: The unique ID of the data-model for which to set NL instructions - `nl_instructions_info`: An array of instruction objects, each containing: - `instructions`: Array of text instructions for the LLM - `scope`: The scope of the instruction (`GLOBAL`). Currently only `GLOBAL` is supported. It can be extended to data-model-user scope in future. #### Instructions scope - **GLOBAL**: instructions that apply to all users querying this data model If the request is successful, the API returns: - `success`: a boolean indicating whether the operation completed successfully #### Error responses | Code | Description | |------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| | 401 | Unauthorized — authentication token is missing, expired, or invalid. | | 403 | Forbidden — the authenticated user does not have `CAN_USE_SPOTTER` privilege, lacks edit access or `SPOTTER_COACHING_PRIVILEGE` on the data model, or the bearer token does not correspond to the org where the data model exists. | > ###### Note: > > - To use this API, the user needs either edit access or `SPOTTER_COACHING_PRIVILEGE` on the data model, and must use the bearer token corresponding to the org where the data model exists. > - This endpoint is currently in Beta. Breaking changes may be introduced before the endpoint is made Generally Available. > - Available from version 10.15.0.cl and later. > - This endpoint requires Spotter — please contact ThoughtSpot Support to enable Spotter on your cluster. > - Instructions help improve the accuracy and relevance of AI-generated responses for the specified data-model. + * @param setNLInstructionsRequest + */ + setNLInstructions(setNLInstructionsRequest, _options) { + return __async(this, null, function* () { + var _a, _b, _c; + let _config = _options || this.configuration; + if (setNLInstructionsRequest === null || setNLInstructionsRequest === void 0) { + throw new RequiredError("ThoughtSpotRestApi", "setNLInstructions", "setNLInstructionsRequest"); + } + const localVarPath = "/api/rest/2.0/ai/instructions/set"; + const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.25.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.25.0"); + const contentType = ObjectSerializer.getPreferredMediaType([ + "application/json" + ]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = ObjectSerializer.stringify( + ObjectSerializer.serialize(setNLInstructionsRequest, "SetNLInstructionsRequest", ""), + contentType + ); + requestContext.setBody(serializedBody); + let authMethod; + authMethod = _config.authMethods["bearerAuth"]; + if (authMethod == null ? void 0 : authMethod.applySecurityAuthentication) { + yield authMethod == null ? void 0 : authMethod.applySecurityAuthentication(requestContext); + } + const defaultAuth = ((_a = _options == null ? void 0 : _options.authMethods) == null ? void 0 : _a.default) || ((_c = (_b = this.configuration) == null ? void 0 : _b.authMethods) == null ? void 0 : _c.default); + if (defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication) { + yield defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication(requestContext); + } + return requestContext; + }); + } + /** + * Version: 9.0.0.cl or later Allows sharing one or several metadata objects with users and groups in ThoughtSpot. Requires edit access to the metadata object. #### Supported metadata objects: * Liveboards * Visualizations * Answers * Models * Views * Connections * Collections #### Object permissions You can provide `READ_ONLY` or `MODIFY` access when sharing an object with another user or group. The `READ_ONLY` permission grants view access to the shared object, whereas `MODIFY` provides edit access. To prevent a user or group from accessing the shared object, specify the GUID or name of the principal and set `shareMode` to `NO_ACCESS`. #### Sharing a visualization * Sharing a visualization implicitly shares the entire Liveboard with the recipient. * Object permissions set for a shared visualization also apply to the Liveboard unless overridden by another API request or via UI. * If email notifications for object sharing are enabled, a notification with a link to the shared visualization will be sent to the recipient’s email address. Although this link opens the shared visualization, recipients can also access other visualizations in the Liveboard. #### Sharing a collection Collections support **dual permissions** that provide fine-grained control: * **Collection permissions** (`share_mode`) - controls access to the collection itself (view, edit, delete the collection) * **Content permissions** (`content_share_mode`) - controls access to objects within the collection (view, edit objects inside) **Default Behavior:** - If only `share_mode` is specified, the content permissions default to `READ_ONLY` (except when `share_mode` is `NO_ACCESS`, then content also gets `NO_ACCESS`) - To give users edit access to collection contents, explicitly set `content_share_mode: \"MODIFY\"` ## Examples The following JSON examples can be copy-pasted as request bodies for the REST v2 API endpoint: ```bash POST /callosum/v1/v2/security/metadata/share Content-Type: application/x-www-form-urlencoded ``` ### Basic collection sharing Share a collection with read-only access: ```json { \"metadata_type\": \"COLLECTION\", \"metadata_identifiers\": [\"Sales Reports Collection\"], \"permissions\": [{ \"principal\": { \"type\": \"USER\", \"identifier\": \"alice@company.com\" }, \"share_mode\": \"READ_ONLY\" }], \"notification\": { \"message\": \"I\'ve shared the Sales Reports collection with you\", \"notify_on_share\": true } } ``` ### Collection sharing with dual permissions Share a collection with different permissions for the collection vs. its contents: ```json { \"metadata_type\": \"COLLECTION\", \"metadata_identifiers\": [\"Marketing Analytics\"], \"permissions\": [{ \"principal\": { \"type\": \"USER\", \"identifier\": \"bob@company.com\" }, \"share_mode\": \"MODIFY\", \"content_share_mode\": \"READ_ONLY\" }, { \"principal\": { \"type\": \"USER_GROUP\", \"identifier\": \"Marketing Team\" }, \"share_mode\": \"READ_ONLY\", \"content_share_mode\": \"READ_ONLY\" }], \"notification\": { \"emails\": [\"bob@company.com\"], \"message\": \"You can edit the collection but content is read-only\", \"enable_custom_url\": false, \"notify_on_share\": true }, \"has_lenient_discoverability\": false } ``` ### Multiple collections sharing Share multiple collections with different users: ```json { \"metadata\": [ { \"type\": \"COLLECTION\", \"identifier\": \"Q4 Reports\" }, { \"type\": \"COLLECTION\", \"identifier\": \"Executive Dashboard Collection\" } ], \"permissions\": [{ \"principal\": { \"type\": \"USER_GROUP\", \"identifier\": \"Executives\" }, \"share_mode\": \"MODIFY\" }, { \"principal\": { \"type\": \"USER\", \"identifier\": \"manager@company.com\" }, \"share_mode\": \"READ_ONLY\", \"content_share_mode\": \"MODIFY\" }], \"notification\": { \"message\": \"Sharing quarterly collections with leadership team\", \"notify_on_share\": true } } ``` ### Remove collection access Remove access to a collection by setting share_mode to NO_ACCESS: ```json { \"metadata_type\": \"COLLECTION\", \"metadata_identifiers\": [\"Confidential Reports\"], \"permissions\": [{ \"principal\": { \"type\": \"USER\", \"identifier\": \"former-employee@company.com\" }, \"share_mode\": \"NO_ACCESS\" }], \"notification\": { \"notify_on_share\": false } } ``` ### Collection Permission Scenarios **Scenario 1: Collection Admin** - `share_mode: MODIFY` + `content_share_mode: MODIFY` = Full control over collection and its contents **Scenario 2: Collection Curator** - `share_mode: MODIFY` + `content_share_mode: READ_ONLY` = Can manage collection structure but not edit contents **Scenario 3: Content Editor** - `share_mode: READ_ONLY` + `content_share_mode: MODIFY` = Can edit objects within collection but can\'t change collection itself **Scenario 4: Viewer** - `share_mode: READ_ONLY` + `content_share_mode: READ_ONLY` = View-only access to collection and contents + * @param shareMetadataRequest + */ + shareMetadata(shareMetadataRequest, _options) { + return __async(this, null, function* () { + var _a, _b, _c; + let _config = _options || this.configuration; + if (shareMetadataRequest === null || shareMetadataRequest === void 0) { + throw new RequiredError("ThoughtSpotRestApi", "shareMetadata", "shareMetadataRequest"); + } + const localVarPath = "/api/rest/2.0/security/metadata/share"; + const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.25.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.25.0"); + const contentType = ObjectSerializer.getPreferredMediaType([ + "application/json" + ]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = ObjectSerializer.stringify( + ObjectSerializer.serialize(shareMetadataRequest, "ShareMetadataRequest", ""), + contentType + ); + requestContext.setBody(serializedBody); + let authMethod; + authMethod = _config.authMethods["bearerAuth"]; + if (authMethod == null ? void 0 : authMethod.applySecurityAuthentication) { + yield authMethod == null ? void 0 : authMethod.applySecurityAuthentication(requestContext); + } + const defaultAuth = ((_a = _options == null ? void 0 : _options.authMethods) == null ? void 0 : _a.default) || ((_c = (_b = this.configuration) == null ? void 0 : _b.authMethods) == null ? void 0 : _c.default); + if (defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication) { + yield defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication(requestContext); + } + return requestContext; + }); + } + /** + * Version: 10.4.0.cl or later Processes a natural language query against a specified data model and returns a single AI-generated answer without requiring a conversation session. Requires `CAN_USE_SPOTTER` privilege and at least view access to the metadata object specified in the request. #### Usage guidelines The request must include: - `query`: a natural language question (e.g., \"What were total sales last quarter?\") - `metadata_identifier`: the unique ID of the data source to query against If the request is successful, the API returns a response message containing: - `session_identifier`: the unique ID of the generated response - `generation_number`: the generation number of the response - `message_type`: the type of the response (e.g., `TSAnswer`) - `visualization_type`: the generated visualization type (`Chart`, `Table`, or `Undefined`) - `tokens` / `display_tokens`: the search tokens and user-friendly display tokens for the response #### Error responses | Code | Description | |------|-----------------------------------------------------------------------------------------------------------------------------------------| | 401 | Unauthorized — authentication token is missing, expired, or invalid. | | 403 | Forbidden — the authenticated user does not have `CAN_USE_SPOTTER` privilege or lacks view permission on the specified metadata object. | > ###### Note: > * This endpoint is currently in Beta. Breaking changes may be introduced before the endpoint is made Generally Available. > * This endpoint requires Spotter - please contact ThoughtSpot support to enable Spotter on your cluster. + * @param singleAnswerRequest + */ + singleAnswer(singleAnswerRequest, _options) { + return __async(this, null, function* () { + var _a, _b, _c; + let _config = _options || this.configuration; + if (singleAnswerRequest === null || singleAnswerRequest === void 0) { + throw new RequiredError("ThoughtSpotRestApi", "singleAnswer", "singleAnswerRequest"); + } + const localVarPath = "/api/rest/2.0/ai/answer/create"; + const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.25.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.25.0"); + const contentType = ObjectSerializer.getPreferredMediaType([ + "application/json" + ]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = ObjectSerializer.stringify( + ObjectSerializer.serialize(singleAnswerRequest, "SingleAnswerRequest", ""), + contentType + ); + requestContext.setBody(serializedBody); + let authMethod; + authMethod = _config.authMethods["bearerAuth"]; + if (authMethod == null ? void 0 : authMethod.applySecurityAuthentication) { + yield authMethod == null ? void 0 : authMethod.applySecurityAuthentication(requestContext); + } + const defaultAuth = ((_a = _options == null ? void 0 : _options.authMethods) == null ? void 0 : _a.default) || ((_c = (_b = this.configuration) == null ? void 0 : _b.authMethods) == null ? void 0 : _c.default); + if (defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication) { + yield defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication(requestContext); + } + return requestContext; + }); + } + /** + * Stops an in-progress agent conversation response. Version: 26.6.0.cl or later Version: 26.6.0.cl or later Stops an in-progress agent response for the specified conversation. Use this endpoint to cancel a response that is actively being generated — for example, when the user navigates away, reformulates their question, or no longer needs the current result. Requires `CAN_USE_SPOTTER` privilege and access to the specified conversation. #### Usage guidelines The request must include: - `conversation_identifier` *(path parameter)*: the unique ID of the conversation whose active response should be stopped, as returned by `createAgentConversation` A successful request returns an empty `204 No Content` response. If there is no active response in progress at the time of the call, the request is still treated as successful. After stopping a response, the conversation session remains active. You can continue sending messages using `sendAgentConversationMessage` or `sendAgentConversationMessageStreaming`. #### Example request ```bash POST /api/rest/2.0/ai/agent/conversation/{conversation_identifier}/stop-response ``` #### Typical usage scenario This endpoint is useful when integrating Spotter into a chat UI where users can cancel a long-running query. For example: 1. User sends a message via `sendAgentConversationMessageStreaming`. 2. User clicks a \"Stop generating\" button while the response is streaming. 3. Your client calls `stopConversation` with the active `conversation_identifier`. 4. The stream is terminated and the user can ask a new question. #### Error responses | Code | Description | |------|-------------| | 401 | Unauthorized — authentication token is missing, expired, or invalid. | | 403 | Forbidden — the authenticated user does not have `CAN_USE_SPOTTER` privilege or lacks access to the specified conversation. | > ###### Note: > > - Calling this endpoint when no response is in progress does not return an error. > - The conversation context is preserved after stopping — previous messages and answers remain accessible. > - Available from version 26.6.0.cl and later. > - This endpoint requires Spotter — please contact ThoughtSpot Support to enable Spotter on your cluster. > - This feature is available only for **Spotter 3** (`SPOTTER3`) version. + * @param conversationIdentifier Unique identifier of the conversation to stop. + */ + stopConversation(conversationIdentifier, _options) { + return __async(this, null, function* () { + var _a, _b, _c; + let _config = _options || this.configuration; + if (conversationIdentifier === null || conversationIdentifier === void 0) { + throw new RequiredError("ThoughtSpotRestApi", "stopConversation", "conversationIdentifier"); + } + const localVarPath = "/api/rest/2.0/ai/agent/conversation/{conversation_identifier}/stop-response".replace("{conversation_identifier}", encodeURIComponent(String(conversationIdentifier))); + const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.25.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.25.0"); + let authMethod; + authMethod = _config.authMethods["bearerAuth"]; + if (authMethod == null ? void 0 : authMethod.applySecurityAuthentication) { + yield authMethod == null ? void 0 : authMethod.applySecurityAuthentication(requestContext); + } + const defaultAuth = ((_a = _options == null ? void 0 : _options.authMethods) == null ? void 0 : _a.default) || ((_c = (_b = this.configuration) == null ? void 0 : _b.authMethods) == null ? void 0 : _c.default); + if (defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication) { + yield defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication(requestContext); + } + return requestContext; + }); + } + /** + * Version: 26.5.0.cl or later Synchronizes connection metadata attributes from your Cloud Data Warehouse (CDW) with ThoughtSpot. Requires the `DATAMANAGEMENT` (**Can manage data**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` (**Can manage data models**) privilege is required. #### Usage guidelines To synchronize attributes from a CDW, specify the connection GUID or name in the `connection_identifier` path parameter and `sync_attributes` in the request body. Default attribute is `[\"DESCRIPTION\"]`. ##### Hierarchical schema * Connection: The connection object for the sync operation. * Tables: Tables for the sync operation. When no table is specified, all tables are synchronized. * Columns: If the table is specified, you can add the columns for the sync operation. If no columns are specified, all columns in the specified table are considered for the sync operation. To set the scope for the sync operation: * Connection-level: To sync all tables and columns, pass an empty request body, or only the attributes in the request body. * Table-level: To synchronize specific tables and their columns, specify the table identifiers in the `tables` array. * Column-level: To synchronize specific columns, specify the table identifier as the key and column identifiers as the value in the `tables` array. ``` { \"tables\": [ {\"table-guid-1\": [\"column-guid-1\", \"column-guid-2\"]}, \"table-guid-2\" ], \"sync_attributes\": [\"DESCRIPTION\"] } ``` ##### API response If the sync operation is successful, the API returns the following information: * Status of the sync operation. For example, `SUCCESS`, `PARTIAL_SUCCESS`, or `NO_UPDATE`. * Number of tables and columns that were updated. * Number of tables and columns with the sync failed status when the overall sync status is `PARTIAL_SUCCESS`. * Message text indicating the sync results. + * @param connectionIdentifier Unique ID or name of the connection. + * @param syncMetadataRequest + */ + syncMetadata(connectionIdentifier, syncMetadataRequest, _options) { + return __async(this, null, function* () { + var _a, _b, _c; + let _config = _options || this.configuration; + if (connectionIdentifier === null || connectionIdentifier === void 0) { + throw new RequiredError("ThoughtSpotRestApi", "syncMetadata", "connectionIdentifier"); + } + if (syncMetadataRequest === null || syncMetadataRequest === void 0) { + throw new RequiredError("ThoughtSpotRestApi", "syncMetadata", "syncMetadataRequest"); + } + const localVarPath = "/api/rest/2.0/connections/{connection_identifier}/resync-metadata".replace("{connection_identifier}", encodeURIComponent(String(connectionIdentifier))); + const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.25.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.25.0"); + const contentType = ObjectSerializer.getPreferredMediaType([ + "application/json" + ]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = ObjectSerializer.stringify( + ObjectSerializer.serialize(syncMetadataRequest, "SyncMetadataRequest", ""), + contentType + ); + requestContext.setBody(serializedBody); + let authMethod; + authMethod = _config.authMethods["bearerAuth"]; + if (authMethod == null ? void 0 : authMethod.applySecurityAuthentication) { + yield authMethod == null ? void 0 : authMethod.applySecurityAuthentication(requestContext); + } + const defaultAuth = ((_a = _options == null ? void 0 : _options.authMethods) == null ? void 0 : _a.default) || ((_c = (_b = this.configuration) == null ? void 0 : _b.authMethods) == null ? void 0 : _c.default); + if (defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication) { + yield defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication(requestContext); + } + return requestContext; + }); + } + /** + * Version: 9.0.0.cl or later Removes the tags applied to a Liveboard, Answer, Table, or Worksheet. Requires edit access to the metadata object. + * @param unassignTagRequest + */ + unassignTag(unassignTagRequest, _options) { + return __async(this, null, function* () { + var _a, _b, _c; + let _config = _options || this.configuration; + if (unassignTagRequest === null || unassignTagRequest === void 0) { + throw new RequiredError("ThoughtSpotRestApi", "unassignTag", "unassignTagRequest"); + } + const localVarPath = "/api/rest/2.0/tags/unassign"; + const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.25.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.25.0"); + const contentType = ObjectSerializer.getPreferredMediaType([ + "application/json" + ]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = ObjectSerializer.stringify( + ObjectSerializer.serialize(unassignTagRequest, "UnassignTagRequest", ""), + contentType + ); + requestContext.setBody(serializedBody); + let authMethod; + authMethod = _config.authMethods["bearerAuth"]; + if (authMethod == null ? void 0 : authMethod.applySecurityAuthentication) { + yield authMethod == null ? void 0 : authMethod.applySecurityAuthentication(requestContext); + } + const defaultAuth = ((_a = _options == null ? void 0 : _options.authMethods) == null ? void 0 : _a.default) || ((_c = (_b = this.configuration) == null ? void 0 : _b.authMethods) == null ? void 0 : _c.default); + if (defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication) { + yield defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication(requestContext); + } + return requestContext; + }); + } + /** + * Remove parameterization from fields in metadata objects. Version: 26.5.0.cl or later Allows removing parameterization from fields in metadata objects in ThoughtSpot. Requires appropriate permissions to modify the metadata object. The API endpoint allows unparameterizing the following types of metadata objects: * Logical Tables * Connections * Connection Configs For a Logical Table the field type must be `ATTRIBUTE` and field name can be one of: * databaseName * schemaName * tableName For a Connection or Connection Config, the field type is always `CONNECTION_PROPERTY`. In this case, field_name specifies the exact property of the Connection or Connection Config that needs to be unparameterized. For Connection Config, the only supported field name is: * impersonate_user + * @param unparameterizeMetadataRequest + */ + unparameterizeMetadata(unparameterizeMetadataRequest, _options) { + return __async(this, null, function* () { + var _a, _b, _c; + let _config = _options || this.configuration; + if (unparameterizeMetadataRequest === null || unparameterizeMetadataRequest === void 0) { + throw new RequiredError("ThoughtSpotRestApi", "unparameterizeMetadata", "unparameterizeMetadataRequest"); + } + const localVarPath = "/api/rest/2.0/metadata/unparameterize"; + const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.25.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.25.0"); + const contentType = ObjectSerializer.getPreferredMediaType([ + "application/json" + ]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = ObjectSerializer.stringify( + ObjectSerializer.serialize(unparameterizeMetadataRequest, "UnparameterizeMetadataRequest", ""), + contentType + ); + requestContext.setBody(serializedBody); + let authMethod; + authMethod = _config.authMethods["bearerAuth"]; + if (authMethod == null ? void 0 : authMethod.applySecurityAuthentication) { + yield authMethod == null ? void 0 : authMethod.applySecurityAuthentication(requestContext); + } + const defaultAuth = ((_a = _options == null ? void 0 : _options.authMethods) == null ? void 0 : _a.default) || ((_c = (_b = this.configuration) == null ? void 0 : _b.authMethods) == null ? void 0 : _c.default); + if (defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication) { + yield defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication(requestContext); + } + return requestContext; + }); + } + /** + * Version: 26.5.0.cl or later Allows unpublishing metadata objects from organizations in ThoughtSpot. Requires ADMINISTRATION role and TENANT scope. The API endpoint allows unpublishing the following types of metadata objects: * Liveboards * Answers * Logical Tables When unpublishing objects, you can: * Include dependencies by setting `include_dependencies` to true - this will unpublish all dependent objects if no other published object is using them * Force unpublish by setting `force` to true - this will break all dependent objects in the unpublished organizations + * @param unpublishMetadataRequest + */ + unpublishMetadata(unpublishMetadataRequest, _options) { + return __async(this, null, function* () { + var _a, _b, _c; + let _config = _options || this.configuration; + if (unpublishMetadataRequest === null || unpublishMetadataRequest === void 0) { + throw new RequiredError("ThoughtSpotRestApi", "unpublishMetadata", "unpublishMetadataRequest"); + } + const localVarPath = "/api/rest/2.0/security/metadata/unpublish"; + const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.25.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.25.0"); + const contentType = ObjectSerializer.getPreferredMediaType([ + "application/json" + ]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = ObjectSerializer.stringify( + ObjectSerializer.serialize(unpublishMetadataRequest, "UnpublishMetadataRequest", ""), + contentType + ); + requestContext.setBody(serializedBody); + let authMethod; + authMethod = _config.authMethods["bearerAuth"]; + if (authMethod == null ? void 0 : authMethod.applySecurityAuthentication) { + yield authMethod == null ? void 0 : authMethod.applySecurityAuthentication(requestContext); + } + const defaultAuth = ((_a = _options == null ? void 0 : _options.authMethods) == null ? void 0 : _a.default) || ((_c = (_b = this.configuration) == null ? void 0 : _b.authMethods) == null ? void 0 : _c.default); + if (defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication) { + yield defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication(requestContext); + } + return requestContext; + }); + } + /** + * Version: 10.12.0.cl or later Updates the properties of a [custom calendar](https://docs.thoughtspot.com/cloud/latest/connections-cust-cal). Requires `DATAMANAGEMENT` (**Can manage data**) or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your ThoughtSpot instance, the `CAN_MANAGE_CUSTOM_CALENDAR` (**Can manage custom calendars**) privilege is required. #### Usage guidelines You can update the properties of a calendar using one of the following methods: * `FROM_INPUT_PARAMS` to update the calendar properties with the values defined in the API request. * `FROM_EXISTING_TABLE` Creates a calendar from the parameters defined in the API request. To update a custom calendar, specify the calendar ID as a path parameter in the request URL and the following parameters in the request body: * Connection ID and Table name * Database and schema name attributes: For most Cloud Data Warehouse (CDW) connectors, both `database_name` and `schema_name` attributes are required. However, the attribute requirements are conditional and vary based on the connector type and its metadata structure. For example, for connectors such as Teradata, MySQL, SingleSore, Amazon Aurora MySQL, Amazon RDS MySQL, Oracle, and GCP_MYSQL, the `schema_name` is required, whereas the `database_name` attribute is not. Similarly, connectors such as ClickHouse require you to specify the `database_name` and the schema specification in such cases is optional. The API allows you to modify the calendar type, month offset value, start and end date, starting day of the week, and prefixes assigned to the year and quarter labels. #### Examples Update a custom calendar using an existing Table in ThoughtSpot: ``` { \"update_method\": \"FROM_EXISTING_TABLE\", \"table_reference\": { \"connection_identifier\": \"Connection1\", \"database_name\": \"db1\", \"table_name\": \"custom_calendar_2025\", \"schame_name\": \"schemaVar\" } } ``` Update a custom calendar with the attributes defined in the API request: ``` { \"update_method\": \"FROM_INPUT_PARAMS\", \"table_reference\": { \"connection_identifier\": \"Connection1\", \"database_name\": \"db1\", \"table_name\": \"custom_calendar_2025\", \"schame_name\": \"schemaVar\" }, \"month_offset\": \"August\", \"start_day_of_week\": \"Monday\", \"start_date\": \"08/01/2025\", \"end_date\": \"07/31/2026\" } ``` + * @param calendarIdentifier Unique Id or name of the calendar. + * @param updateCalendarRequest + */ + updateCalendar(calendarIdentifier, updateCalendarRequest, _options) { + return __async(this, null, function* () { + var _a, _b, _c; + let _config = _options || this.configuration; + if (calendarIdentifier === null || calendarIdentifier === void 0) { + throw new RequiredError("ThoughtSpotRestApi", "updateCalendar", "calendarIdentifier"); + } + if (updateCalendarRequest === null || updateCalendarRequest === void 0) { + throw new RequiredError("ThoughtSpotRestApi", "updateCalendar", "updateCalendarRequest"); + } + const localVarPath = "/api/rest/2.0/calendars/{calendar_identifier}/update".replace("{calendar_identifier}", encodeURIComponent(String(calendarIdentifier))); + const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.25.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.25.0"); + const contentType = ObjectSerializer.getPreferredMediaType([ + "application/json" + ]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = ObjectSerializer.stringify( + ObjectSerializer.serialize(updateCalendarRequest, "UpdateCalendarRequest", ""), + contentType + ); + requestContext.setBody(serializedBody); + let authMethod; + authMethod = _config.authMethods["bearerAuth"]; + if (authMethod == null ? void 0 : authMethod.applySecurityAuthentication) { + yield authMethod == null ? void 0 : authMethod.applySecurityAuthentication(requestContext); + } + const defaultAuth = ((_a = _options == null ? void 0 : _options.authMethods) == null ? void 0 : _a.default) || ((_c = (_b = this.configuration) == null ? void 0 : _b.authMethods) == null ? void 0 : _c.default); + if (defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication) { + yield defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication(requestContext); + } + return requestContext; + }); + } + /** + * Version: 26.4.0.cl or later Updates an existing collection in ThoughtSpot. #### Supported operations This API endpoint lets you perform the following operations: * Update collection name and description * Change visibility settings * Add metadata objects to the collection (operation: ADD) * Remove metadata objects from the collection (operation: REMOVE) * Replace all metadata objects in the collection (operation: REPLACE) #### Operation types * **ADD**: Adds the specified metadata objects to the existing collection without removing current items * **REMOVE**: Removes only the specified metadata objects from the collection * **REPLACE**: Replaces all existing metadata objects with the specified items (default behavior) + * @param collectionIdentifier Unique GUID of the collection. Note: Collection names cannot be used as identifiers since duplicate names are allowed. + * @param updateCollectionRequest + */ + updateCollection(collectionIdentifier, updateCollectionRequest, _options) { + return __async(this, null, function* () { + var _a, _b, _c; + let _config = _options || this.configuration; + if (collectionIdentifier === null || collectionIdentifier === void 0) { + throw new RequiredError("ThoughtSpotRestApi", "updateCollection", "collectionIdentifier"); + } + if (updateCollectionRequest === null || updateCollectionRequest === void 0) { + throw new RequiredError("ThoughtSpotRestApi", "updateCollection", "updateCollectionRequest"); + } + const localVarPath = "/api/rest/2.0/collections/{collection_identifier}/update".replace("{collection_identifier}", encodeURIComponent(String(collectionIdentifier))); + const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.25.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.25.0"); + const contentType = ObjectSerializer.getPreferredMediaType([ + "application/json" + ]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = ObjectSerializer.stringify( + ObjectSerializer.serialize(updateCollectionRequest, "UpdateCollectionRequest", ""), + contentType + ); + requestContext.setBody(serializedBody); + let authMethod; + authMethod = _config.authMethods["bearerAuth"]; + if (authMethod == null ? void 0 : authMethod.applySecurityAuthentication) { + yield authMethod == null ? void 0 : authMethod.applySecurityAuthentication(requestContext); + } + const defaultAuth = ((_a = _options == null ? void 0 : _options.authMethods) == null ? void 0 : _a.default) || ((_c = (_b = this.configuration) == null ? void 0 : _b.authMethods) == null ? void 0 : _c.default); + if (defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication) { + yield defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication(requestContext); + } + return requestContext; + }); + } + /** + * Version: 10.12.0.cl or later Creates, updates, or deletes column security rules for specified tables. This API endpoint allows you to create, update, or delete column-level security rules on columns of a table. The operation follows an \"all or none\" policy: if defining security rules for any of the provided columns fails, the entire operation will be rolled back, and no rules will be created. #### Usage guidelines - Provide table identifier using either `identifier` (GUID or name) or `obj_identifier` (object ID) - Use `clear_csr: true` to remove all column security rules from the table - For each column, specify the security rule using `column_security_rules` array - Use `is_unsecured: true` to mark a specific column as unprotected - Use `group_access` operations to manage group associations: - `ADD`: Add groups to the column\'s access list - `REMOVE`: Remove groups from the column\'s access list - `REPLACE`: Replace all existing groups with the specified groups #### Required permissions - `ADMINISTRATION` - Can administer ThoughtSpot - `DATAMANAGEMENT` - Can manage data (if RBAC is disabled) - `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` - Can manage worksheet views and tables (if RBAC is enabled) #### Example request ```json { \"identifier\": \"table-guid\", \"obj_identifier\": \"table-object-id\", \"clear_csr\": false, \"column_security_rules\": [ { \"column_identifier\": \"col id or col name\", \"is_unsecured\": false, \"group_access\": [ { \"operation\": \"ADD\", \"group_identifiers\": [\"hr_group_id\", \"hr_group_name\", \"finance_group_id\"] } ] }, { \"column_identifier\": \"col id or col name\", \"is_unsecured\": true }, { \"column_identifier\": \"col id or col name\", \"is_unsecured\": false, \"group_access\": [ { \"operation\": \"REPLACE\", \"group_identifiers\": [\"management_group_id\", \"management_group_name\"] } ] } ] } ``` #### Request Body Schema - `identifier` (string, optional): GUID or name of the table for which we want to create column security rules - `obj_identifier` (string, optional): The object ID of the table - `clear_csr` (boolean, optional): If true, then all the secured columns will be marked as unprotected, and all the group associations will be removed - `column_security_rules` (array of objects, required): An array where each object defines the security rule for a specific column Each column security rule object contains: - `column_identifier` (string, required): Column identifier (col_id or name) - `is_unsecured` (boolean, optional): If true, the column will be marked as unprotected and all groups associated with it will be removed - `group_access` (array of objects, optional): Array of group operation objects Each group operation object contains: - `operation` (string, required): Operation type - ADD, REMOVE, or REPLACE - `group_identifiers` (array of strings, required): Array of group identifiers (name or GUID) on which the operation will be performed #### Response This API does not return any response body. A successful operation returns HTTP 200 status code. #### Operation Types - **ADD**: Adds the specified groups to the column\'s access list - **REMOVE**: Removes the specified groups from the column\'s access list - **REPLACE**: Replaces all existing groups with the specified groups + * @param updateColumnSecurityRulesRequest + */ + updateColumnSecurityRules(updateColumnSecurityRulesRequest, _options) { + return __async(this, null, function* () { + var _a, _b, _c; + let _config = _options || this.configuration; + if (updateColumnSecurityRulesRequest === null || updateColumnSecurityRulesRequest === void 0) { + throw new RequiredError("ThoughtSpotRestApi", "updateColumnSecurityRules", "updateColumnSecurityRulesRequest"); + } + const localVarPath = "/api/rest/2.0/security/column/rules/update"; + const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.25.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.25.0"); + const contentType = ObjectSerializer.getPreferredMediaType([ + "application/json" + ]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = ObjectSerializer.stringify( + ObjectSerializer.serialize(updateColumnSecurityRulesRequest, "UpdateColumnSecurityRulesRequest", ""), + contentType + ); + requestContext.setBody(serializedBody); + let authMethod; + authMethod = _config.authMethods["bearerAuth"]; + if (authMethod == null ? void 0 : authMethod.applySecurityAuthentication) { + yield authMethod == null ? void 0 : authMethod.applySecurityAuthentication(requestContext); + } + const defaultAuth = ((_a = _options == null ? void 0 : _options.authMethods) == null ? void 0 : _a.default) || ((_c = (_b = this.configuration) == null ? void 0 : _b.authMethods) == null ? void 0 : _c.default); + if (defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication) { + yield defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication(requestContext); + } + return requestContext; + }); + } + /** + * Version: 9.2.0.cl or later Updates Git repository configuration settings. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance on your instance, the `CAN_SETUP_VERSION_CONTROL` (**Can set up version control**) privilege. + * @param updateConfigRequest + */ + updateConfig(updateConfigRequest, _options) { + return __async(this, null, function* () { + var _a, _b, _c; + let _config = _options || this.configuration; + if (updateConfigRequest === null || updateConfigRequest === void 0) { + throw new RequiredError("ThoughtSpotRestApi", "updateConfig", "updateConfigRequest"); + } + const localVarPath = "/api/rest/2.0/vcs/git/config/update"; + const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.25.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.25.0"); + const contentType = ObjectSerializer.getPreferredMediaType([ + "application/json" + ]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = ObjectSerializer.stringify( + ObjectSerializer.serialize(updateConfigRequest, "UpdateConfigRequest", ""), + contentType + ); + requestContext.setBody(serializedBody); + let authMethod; + authMethod = _config.authMethods["bearerAuth"]; + if (authMethod == null ? void 0 : authMethod.applySecurityAuthentication) { + yield authMethod == null ? void 0 : authMethod.applySecurityAuthentication(requestContext); + } + const defaultAuth = ((_a = _options == null ? void 0 : _options.authMethods) == null ? void 0 : _a.default) || ((_c = (_b = this.configuration) == null ? void 0 : _b.authMethods) == null ? void 0 : _c.default); + if (defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication) { + yield defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication(requestContext); + } + return requestContext; + }); + } + /** + * Version: 9.2.0.cl or later **Important**: This endpoint is deprecated and will be removed from ThoughtSpot in September 2025. ThoughtSpot strongly recommends using the [Update connection V2](#/http/api-endpoints/connections/update-connection-v2) endpoint to update your connection objects. #### Usage guidelines Updates a connection object. Requires `DATAMANAGEMENT` (**Can manage data**) and edit permissions to the connection object, or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) privilege is required. To update a connection object, pass these parameters in your API request: 1. GUID of the connection object. 2. If you are updating tables or database schema of a connection object: a. Add the updated JSON map of metadata with database, schema, and tables in `data_warehouse_config`. b. Set `validate` to `true`. 3. If you are updating a configuration attribute, connection name, or description, you can set `validate` to `false`. + * @param updateConnectionRequest + */ + updateConnection(updateConnectionRequest, _options) { + return __async(this, null, function* () { + var _a, _b, _c; + let _config = _options || this.configuration; + if (updateConnectionRequest === null || updateConnectionRequest === void 0) { + throw new RequiredError("ThoughtSpotRestApi", "updateConnection", "updateConnectionRequest"); + } + const localVarPath = "/api/rest/2.0/connection/update"; + const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.25.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.25.0"); + const contentType = ObjectSerializer.getPreferredMediaType([ + "application/json" + ]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = ObjectSerializer.stringify( + ObjectSerializer.serialize(updateConnectionRequest, "UpdateConnectionRequest", ""), + contentType + ); + requestContext.setBody(serializedBody); + let authMethod; + authMethod = _config.authMethods["bearerAuth"]; + if (authMethod == null ? void 0 : authMethod.applySecurityAuthentication) { + yield authMethod == null ? void 0 : authMethod.applySecurityAuthentication(requestContext); + } + const defaultAuth = ((_a = _options == null ? void 0 : _options.authMethods) == null ? void 0 : _a.default) || ((_c = (_b = this.configuration) == null ? void 0 : _b.authMethods) == null ? void 0 : _c.default); + if (defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication) { + yield defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication(requestContext); + } + return requestContext; + }); + } + /** + * Version: 10.12.0.cl or later Updates a connection configuration object. Requires `DATAMANAGEMENT` (**Can manage data**) and edit permissions to the connection object, or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) privilege is required. #### Supported operations This API endpoint lets you perform the following operations in a single API request: * Edit the name or description of the configuration * Edit the configuration properties * Edit the `policy_type` * Edit the type of authentication * Enable or disable a configuration #### Parameterized Connection Support For parameterized oauth based connections, only the `same_as_parent` and `policy_process_options` attributes are allowed. These attributes are not applicable to connections that are not parameterized. **NOTE**: When updating a configuration where `disabled` is `true`, you must reset `disabled` to `true` in your update request payload. If not explicitly set again, the API will default `disabled` to `false`. + * @param configurationIdentifier Unique ID or name of the configuration. + * @param updateConnectionConfigurationRequest + */ + updateConnectionConfiguration(configurationIdentifier, updateConnectionConfigurationRequest, _options) { + return __async(this, null, function* () { + var _a, _b, _c; + let _config = _options || this.configuration; + if (configurationIdentifier === null || configurationIdentifier === void 0) { + throw new RequiredError("ThoughtSpotRestApi", "updateConnectionConfiguration", "configurationIdentifier"); + } + if (updateConnectionConfigurationRequest === null || updateConnectionConfigurationRequest === void 0) { + throw new RequiredError("ThoughtSpotRestApi", "updateConnectionConfiguration", "updateConnectionConfigurationRequest"); + } + const localVarPath = "/api/rest/2.0/connection-configurations/{configuration_identifier}/update".replace("{configuration_identifier}", encodeURIComponent(String(configurationIdentifier))); + const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.25.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.25.0"); + const contentType = ObjectSerializer.getPreferredMediaType([ + "application/json" + ]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = ObjectSerializer.stringify( + ObjectSerializer.serialize(updateConnectionConfigurationRequest, "UpdateConnectionConfigurationRequest", ""), + contentType + ); + requestContext.setBody(serializedBody); + let authMethod; + authMethod = _config.authMethods["bearerAuth"]; + if (authMethod == null ? void 0 : authMethod.applySecurityAuthentication) { + yield authMethod == null ? void 0 : authMethod.applySecurityAuthentication(requestContext); + } + const defaultAuth = ((_a = _options == null ? void 0 : _options.authMethods) == null ? void 0 : _a.default) || ((_c = (_b = this.configuration) == null ? void 0 : _b.authMethods) == null ? void 0 : _c.default); + if (defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication) { + yield defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication(requestContext); + } + return requestContext; + }); + } + /** + * Version: 26.6.0.cl or later Activates or deactivates a connection. A deactivated connection cannot be used for queries or operations until it is activated again. Requires `DATAMANAGEMENT` (**Can manage data**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) privilege is required. Only the connection owner or an administrator can perform this operation. #### Usage guidelines To update the status of a connection, specify the connection GUID or name in the `connection_identifier` path parameter and the desired `status` in the request body. - **ACTIVATED**: Enables the connection. Queries and operations can resume on an activated connection. - **DEACTIVATED**: Disables the connection. It does not remove the connection metadata, but only makes the connection unavailable for queries and operations. You can reactivate a deactivated connection by setting \"status\": \"ACTIVATED\". + * @param connectionIdentifier Unique ID or name of the connection. + * @param updateConnectionStatusRequest + */ + updateConnectionStatus(connectionIdentifier, updateConnectionStatusRequest, _options) { + return __async(this, null, function* () { + var _a, _b, _c; + let _config = _options || this.configuration; + if (connectionIdentifier === null || connectionIdentifier === void 0) { + throw new RequiredError("ThoughtSpotRestApi", "updateConnectionStatus", "connectionIdentifier"); + } + if (updateConnectionStatusRequest === null || updateConnectionStatusRequest === void 0) { + throw new RequiredError("ThoughtSpotRestApi", "updateConnectionStatus", "updateConnectionStatusRequest"); + } + const localVarPath = "/api/rest/2.0/connections/{connection_identifier}/status".replace("{connection_identifier}", encodeURIComponent(String(connectionIdentifier))); + const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.25.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.25.0"); + const contentType = ObjectSerializer.getPreferredMediaType([ + "application/json" + ]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = ObjectSerializer.stringify( + ObjectSerializer.serialize(updateConnectionStatusRequest, "UpdateConnectionStatusRequest", ""), + contentType + ); + requestContext.setBody(serializedBody); + let authMethod; + authMethod = _config.authMethods["bearerAuth"]; + if (authMethod == null ? void 0 : authMethod.applySecurityAuthentication) { + yield authMethod == null ? void 0 : authMethod.applySecurityAuthentication(requestContext); + } + const defaultAuth = ((_a = _options == null ? void 0 : _options.authMethods) == null ? void 0 : _a.default) || ((_c = (_b = this.configuration) == null ? void 0 : _b.authMethods) == null ? void 0 : _c.default); + if (defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication) { + yield defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication(requestContext); + } + return requestContext; + }); + } + /** + * Version: 10.4.0.cl or later Updates a connection object. Requires `DATAMANAGEMENT` (**Can manage data**) and edit permissions to the connection object, or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) privilege is required. To update a connection object, pass these parameters in your API request: 1. GUID of the connection object. 2. If you are updating tables or database schema of a connection object: a. Add the updated JSON map of metadata with database, schema, and tables in `data_warehouse_config`. b. Set `validate` to `true`. **NOTE:** If the `authentication_type` is anything other than SERVICE_ACCOUNT, you must explicitly provide the authenticationType property in the payload. If you do not specify authenticationType, the API will default to SERVICE_ACCOUNT as the authentication type. * A JSON map of configuration attributes, database details, and table properties in `data_warehouse_config` as shown in the following example: * This is an example of updating a single table in a empty connection: ``` { \"authenticationType\": \"SERVICE_ACCOUNT\", \"externalDatabases\": [ { \"name\": \"DEVELOPMENT\", \"isAutoCreated\": false, \"schemas\": [ { \"name\": \"TS_dataset\", \"tables\": [ { \"name\": \"DEMORENAME\", \"type\": \"TABLE\", \"description\": \"\", \"selected\": true, \"linked\": true, \"gid\": 0, \"datasetId\": \"-1\", \"subType\": \"\", \"reportId\": \"\", \"viewId\": \"\", \"columns\": [ { \"name\": \"Col1\", \"type\": \"VARCHAR\", \"canImport\": true, \"selected\": true, \"description\": \"\", \"isLinkedActive\": true, \"isAggregate\": false }, { \"name\": \"Col2\", \"type\": \"VARCHAR\", \"canImport\": true, \"selected\": true, \"description\": \"\", \"isLinkedActive\": true, \"isAggregate\": false }, { \"name\": \"Col3\", \"type\": \"VARCHAR\", \"canImport\": true, \"selected\": true, \"description\": \"\", \"isLinkedActive\": true, \"isAggregate\": false }, { \"name\": \"Col312\", \"type\": \"VARCHAR\", \"canImport\": true, \"selected\": true, \"description\": \"\", \"isLinkedActive\": true, \"isAggregate\": false }, { \"name\": \"Col4\", \"type\": \"VARCHAR\", \"canImport\": true, \"selected\": true, \"description\": \"\", \"isLinkedActive\": true, \"isAggregate\": false } ], \"relationships\": [] } ] } ] } ], \"configuration\": { \"password\": \"\", \"database\": \"DEVELOPMENT\", \"role\": \"DEV\", \"accountName\": \"thoughtspot_partner\", \"warehouse\": \"DEMO_WH\", \"user\": \"DEV_USER\" } } ``` * This is an example of updating a single table in an existing connection with tables: ``` { \"authenticationType\": \"SERVICE_ACCOUNT\", \"externalDatabases\": [ { \"name\": \"DEVELOPMENT\", \"isAutoCreated\": false, \"schemas\": [ { \"name\": \"TS_dataset\", \"tables\": [ { \"name\": \"CUSTOMER\", \"type\": \"TABLE\", \"description\": \"\", \"selected\": true, \"linked\": true, \"gid\": 0, \"datasetId\": \"-1\", \"subType\": \"\", \"reportId\": \"\", \"viewId\": \"\", \"columns\": [], \"relationships\": [] }, { \"name\": \"tpch5k_falcon_default_schema_users\", \"type\": \"TABLE\", \"description\": \"\", \"selected\": true, \"linked\": true, \"gid\": 0, \"datasetId\": \"-1\", \"subType\": \"\", \"reportId\": \"\", \"viewId\": \"\", \"columns\": [ { \"name\": \"user_id\", \"type\": \"INT64\", \"canImport\": true, \"selected\": true, \"description\": \"\", \"isLinkedActive\": true, \"isAggregate\": false }, { \"name\": \"product_id\", \"type\": \"INT64\", \"canImport\": true, \"selected\": true, \"description\": \"\", \"isLinkedActive\": true, \"isAggregate\": false }, { \"name\": \"user_cost\", \"type\": \"INT64\", \"canImport\": true, \"selected\": true, \"description\": \"\", \"isLinkedActive\": true, \"isAggregate\": false } ], \"relationships\": [] } ] } ] } ], \"configuration\": { \"password\": \"\", \"database\": \"DEVELOPMENT\", \"role\": \"DEV\", \"accountName\": \"thoughtspot_partner\", \"warehouse\": \"DEMO_WH\", \"user\": \"DEV_USER\" } } ``` 3. If you are updating a configuration attribute, connection name, or description, you can set `validate` to `false`. **NOTE:** If the `authentication_type` is anything other than SERVICE_ACCOUNT, you must explicitly provide the authenticationType property in the payload. If you do not specify authenticationType, the API will default to SERVICE_ACCOUNT as the authentication type. * A JSON map of configuration attributes in `data_warehouse_config`. The following example shows the configuration attributes for a Snowflake connection: ``` { \"configuration\":{ \"accountName\":\"thoughtspot_partner\", \"user\":\"tsadmin\", \"password\":\"TestConn123\", \"role\":\"sysadmin\", \"warehouse\":\"MEDIUM_WH\" }, \"externalDatabases\":[ ] } ``` + * @param connectionIdentifier Unique ID or name of the connection. + * @param updateConnectionV2Request + */ + updateConnectionV2(connectionIdentifier, updateConnectionV2Request, _options) { + return __async(this, null, function* () { + var _a, _b, _c; + let _config = _options || this.configuration; + if (connectionIdentifier === null || connectionIdentifier === void 0) { + throw new RequiredError("ThoughtSpotRestApi", "updateConnectionV2", "connectionIdentifier"); + } + if (updateConnectionV2Request === null || updateConnectionV2Request === void 0) { + throw new RequiredError("ThoughtSpotRestApi", "updateConnectionV2", "updateConnectionV2Request"); + } + const localVarPath = "/api/rest/2.0/connections/{connection_identifier}/update".replace("{connection_identifier}", encodeURIComponent(String(connectionIdentifier))); + const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.25.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.25.0"); + const contentType = ObjectSerializer.getPreferredMediaType([ + "application/json" + ]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = ObjectSerializer.stringify( + ObjectSerializer.serialize(updateConnectionV2Request, "UpdateConnectionV2Request", ""), + contentType + ); + requestContext.setBody(serializedBody); + let authMethod; + authMethod = _config.authMethods["bearerAuth"]; + if (authMethod == null ? void 0 : authMethod.applySecurityAuthentication) { + yield authMethod == null ? void 0 : authMethod.applySecurityAuthentication(requestContext); + } + const defaultAuth = ((_a = _options == null ? void 0 : _options.authMethods) == null ? void 0 : _a.default) || ((_c = (_b = this.configuration) == null ? void 0 : _b.authMethods) == null ? void 0 : _c.default); + if (defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication) { + yield defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication(requestContext); + } + return requestContext; + }); + } + /** + * Version: 9.6.0.cl or later Updates a custom action. Requires `DEVELOPER` (**Has Developer privilege**) or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `DEVELOPER` (**Has developer privilege**) privilege is required. #### Usage Guidelines The API allows you to modify the following properties: * Name of the custom action * Action availability to groups * Association to metadata objects * Authentication settings for a URL-based action For more information, see [Custom actions](https://developers.thoughtspot.com/docs/custom-action-intro). + * @param customActionIdentifier Unique ID or name of the custom action. + * @param updateCustomActionRequest + */ + updateCustomAction(customActionIdentifier, updateCustomActionRequest, _options) { + return __async(this, null, function* () { + var _a, _b, _c; + let _config = _options || this.configuration; + if (customActionIdentifier === null || customActionIdentifier === void 0) { + throw new RequiredError("ThoughtSpotRestApi", "updateCustomAction", "customActionIdentifier"); + } + if (updateCustomActionRequest === null || updateCustomActionRequest === void 0) { + throw new RequiredError("ThoughtSpotRestApi", "updateCustomAction", "updateCustomActionRequest"); + } + const localVarPath = "/api/rest/2.0/customization/custom-actions/{custom_action_identifier}/update".replace("{custom_action_identifier}", encodeURIComponent(String(customActionIdentifier))); + const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.25.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.25.0"); + const contentType = ObjectSerializer.getPreferredMediaType([ + "application/json" + ]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = ObjectSerializer.stringify( + ObjectSerializer.serialize(updateCustomActionRequest, "UpdateCustomActionRequest", ""), + contentType + ); + requestContext.setBody(serializedBody); + let authMethod; + authMethod = _config.authMethods["bearerAuth"]; + if (authMethod == null ? void 0 : authMethod.applySecurityAuthentication) { + yield authMethod == null ? void 0 : authMethod.applySecurityAuthentication(requestContext); + } + const defaultAuth = ((_a = _options == null ? void 0 : _options.authMethods) == null ? void 0 : _a.default) || ((_c = (_b = this.configuration) == null ? void 0 : _b.authMethods) == null ? void 0 : _c.default); + if (defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication) { + yield defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication(requestContext); + } + return requestContext; + }); + } + /** + * Version: 9.9.0.cl or later Updates a DBT connection object. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege or `DATAMANAGEMENT` (**Can manage data ThoughtSpot**) privilege, along with an existing DBT connection. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the following data control privileges may be required: - `CAN_MANAGE_CUSTOM_CALENDAR`(**Can manage custom calendars**) - `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) - `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` (**Can manage data models**) #### About update DBT connection You can modify DBT connection object properties such as embrace connection name, embrace database name, import type, account identifier, access token, project identifier and environment (or) embrace connection, embrace database name, import type, file_content settings. + * @param dbtConnectionIdentifier Unique ID of the DBT Connection. + * @param connectionName Name of the connection. + * @param databaseName Name of the Database. + * @param importType Mention type of Import + * @param accessToken Access token is mandatory when Import_Type is DBT_CLOUD. + * @param dbtUrl DBT URL is mandatory when Import_Type is DBT_CLOUD. + * @param accountId Account ID is mandatory when Import_Type is DBT_CLOUD + * @param projectId Project ID is mandatory when Import_Type is DBT_CLOUD + * @param dbtEnvId DBT Environment ID\\\" + * @param projectName Name of the project + * @param fileContent Upload DBT Manifest and Catalog artifact files as a ZIP file. This field is Mandatory when Import Type is \\\'ZIP_FILE\\\' + */ + updateDbtConnection(dbtConnectionIdentifier, connectionName, databaseName, importType, accessToken, dbtUrl, accountId, projectId, dbtEnvId, projectName, fileContent, _options) { + return __async(this, null, function* () { + var _a, _b, _c; + let _config = _options || this.configuration; + if (dbtConnectionIdentifier === null || dbtConnectionIdentifier === void 0) { + throw new RequiredError("ThoughtSpotRestApi", "updateDbtConnection", "dbtConnectionIdentifier"); + } + const localVarPath = "/api/rest/2.0/dbt/update-dbt-connection"; + const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.25.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.25.0"); + const useForm = canConsumeForm([ + "multipart/form-data" + ]); + let localVarFormParams; + if (useForm) { + localVarFormParams = new FormData(); + } else { + localVarFormParams = new URLSearchParams(); + } + if (dbtConnectionIdentifier !== void 0) { + localVarFormParams.append("dbt_connection_identifier", dbtConnectionIdentifier); + } + if (connectionName !== void 0) { + localVarFormParams.append("connection_name", connectionName); + } + if (databaseName !== void 0) { + localVarFormParams.append("database_name", databaseName); + } + if (importType !== void 0) { + localVarFormParams.append("import_type", importType); + } + if (accessToken !== void 0) { + localVarFormParams.append("access_token", accessToken); + } + if (dbtUrl !== void 0) { + localVarFormParams.append("dbt_url", dbtUrl); + } + if (accountId !== void 0) { + localVarFormParams.append("account_id", accountId); + } + if (projectId !== void 0) { + localVarFormParams.append("project_id", projectId); + } + if (dbtEnvId !== void 0) { + localVarFormParams.append("dbt_env_id", dbtEnvId); + } + if (projectName !== void 0) { + localVarFormParams.append("project_name", projectName); + } + if (fileContent !== void 0) { + if (localVarFormParams instanceof FormData) { + localVarFormParams.append("file_content", fileContent, fileContent.name); + } + } + requestContext.setBody(localVarFormParams); + if (!useForm) { + const contentType = ObjectSerializer.getPreferredMediaType([ + "multipart/form-data" + ]); + requestContext.setHeaderParam("Content-Type", contentType); + } + let authMethod; + authMethod = _config.authMethods["bearerAuth"]; + if (authMethod == null ? void 0 : authMethod.applySecurityAuthentication) { + yield authMethod == null ? void 0 : authMethod.applySecurityAuthentication(requestContext); + } + const defaultAuth = ((_a = _options == null ? void 0 : _options.authMethods) == null ? void 0 : _a.default) || ((_c = (_b = this.configuration) == null ? void 0 : _b.authMethods) == null ? void 0 : _c.default); + if (defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication) { + yield defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication(requestContext); + } + return requestContext; + }); + } + /** + * Version: 10.12.0.cl or later Updates a customization configuration for the notification email. #### Pre-requisites Requires `DEVELOPER` (**has developer privilege**) or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `DEVELOPER` (**Has developer privilege**) privilege is required. **NOTE**:This endpoint in currently in beta. Contact ThoughtSpot support to enable this on your instance. #### Usage guidelines To update a custom configuration pass these parameters in your API request: - A JSON map of configuration attributes `template_properties`. The following example shows a sample set of customization configuration: ``` { { \"cta_button_bg_color\": \"#444DEA\", \"cta_text_font_color\": \"#FFFFFF\", \"primary_bg_color\": \"#D3DEF0\", \"logo_url\": \"https://storage.pardot.com/710713/1642089901EbkRibJq/TS_fullworkmark_darkmode.png\", \"font_family\": \"\", \"product_name\": \"ThoughtSpot\", \"footer_address\": \"444 Castro St, Suite 1000 Mountain View, CA 94041\", \"footer_phone\": \"(800) 508-7008\", \"replacement_value_for_liveboard\": \"Dashboard\", \"replacement_value_for_answer\": \"Chart\", \"replacement_value_for_spot_iq\": \"AI Insights\", \"hide_footer_phone\": false, \"hide_footer_address\": false, \"hide_product_name\": false, \"hide_manage_notification\": false, \"hide_mobile_app_nudge\": false, \"hide_privacy_policy\": false, \"hide_ts_vocabulary_definitions\": false, \"hide_error_message\": false, \"hide_unsubscribe_link\": false, \"hide_notification_status\": false, \"hide_modify_alert\": false, \"company_website_url\": \"https://your-website.com/\", \"company_privacy_policy_url\" : \"https://link-to-privacy-policy.com/\", \"contact_support_url\": \"https://link-to-contact-support.com/\", \"hide_contact_support_url\": false, \"hide_logo_url\" : false } } ``` + * @param updateEmailCustomizationRequest + */ + updateEmailCustomization(updateEmailCustomizationRequest, _options) { + return __async(this, null, function* () { + var _a, _b, _c; + let _config = _options || this.configuration; + if (updateEmailCustomizationRequest === null || updateEmailCustomizationRequest === void 0) { + throw new RequiredError("ThoughtSpotRestApi", "updateEmailCustomization", "updateEmailCustomizationRequest"); + } + const localVarPath = "/api/rest/2.0/customization/email/update"; + const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.25.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.25.0"); + const contentType = ObjectSerializer.getPreferredMediaType([ + "application/json" + ]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = ObjectSerializer.stringify( + ObjectSerializer.serialize(updateEmailCustomizationRequest, "UpdateEmailCustomizationRequest", ""), + contentType + ); + requestContext.setBody(serializedBody); + let authMethod; + authMethod = _config.authMethods["bearerAuth"]; + if (authMethod == null ? void 0 : authMethod.applySecurityAuthentication) { + yield authMethod == null ? void 0 : authMethod.applySecurityAuthentication(requestContext); + } + const defaultAuth = ((_a = _options == null ? void 0 : _options.authMethods) == null ? void 0 : _a.default) || ((_c = (_b = this.configuration) == null ? void 0 : _b.authMethods) == null ? void 0 : _c.default); + if (defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication) { + yield defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication(requestContext); + } + return requestContext; + }); + } + /** + * Update header attributes for a given list of header objects. Version: 10.6.0.cl or later ## Prerequisites - **Privileges Required:** - `DATAMANAGEMENT` (Can manage data) or `ADMINISTRATION` (Can administer ThoughtSpot). - **Additional Privileges (if RBAC is enabled):** - `ORG_ADMINISTRATION` (Can manage orgs). --- ## Usage Guidelines ### Parameters 1. **headers_update** - **Description:** List of header objects with their attributes to be updated. Each object contains a list of attributes to be updated in the header. - **Usage:** - You must provide either `identifier` or `obj_identifier`, but not both. Both fields cannot be empty. - When `org_identifier` is set to `-1`, only the `identifier` value is accepted; `obj_identifier` is not allowed. 2. **org_identifier** - **Description:** GUID (Globally Unique Identifier) or name of the organization. - **Usage:** - Leaving this field empty assumes that the changes should be applied to the current organization - Provide `org_guid` or `org_name` to uniquely identify the organization where changes need to be applied. . - Provide `-1` if changes have to be applied across all the org. --- ## Note Currently, this API is enabled only for updating the `obj_identifier` attribute. Only `text` will be allowed in attribute\'s value. ## Best Practices 1. **Backup Before Conversion:** Always export metadata as a backup before initiating the update process --- ## Examples ### Only `identifier` is given ```json { \"headers_update\": [ { \"identifier\": \"guid_1\", \"obj_identifier\": \"\", \"type\": \"LOGICAL_COLUMN\", \"attributes\": [ { \"name\": \"obj_id\", \"value\": \"custom_object_id\" } ] } ], \"org_identifier\": \"orgGuid\" } ``` ### Only `obj_identifier` is given ```json { \"headers_update\": [ { \"obj_identifier\": \"custom_object_id\", \"type\": \"ANSWER\", \"attributes\": [ { \"name\": \"obj_id\", \"value\": \"custom_object_id\" } ] } ], \"org_identifier\": \"orgName\" } ``` ### Executing update for all org `-1` ```json { \"headers_update\": [ { \"identifier\": \"guid_1\", \"type\": \"ANSWER\", \"attributes\": [ { \"name\": \"obj_id\", \"value\": \"custom_object_id\" } ] } ], \"org_identifier\": -1 } ``` ### Optional `type` is not provided ```json { \"headers_update\": [ { \"identifier\": \"guid_1\", \"attributes\": [ { \"name\": \"obj_id\", \"value\": \"custom_object_id\" } ] } ], \"org_identifier\": -1 } ``` + * @param updateMetadataHeaderRequest + */ + updateMetadataHeader(updateMetadataHeaderRequest, _options) { + return __async(this, null, function* () { + var _a, _b, _c; + let _config = _options || this.configuration; + if (updateMetadataHeaderRequest === null || updateMetadataHeaderRequest === void 0) { + throw new RequiredError("ThoughtSpotRestApi", "updateMetadataHeader", "updateMetadataHeaderRequest"); + } + const localVarPath = "/api/rest/2.0/metadata/headers/update"; + const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.25.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.25.0"); + const contentType = ObjectSerializer.getPreferredMediaType([ + "application/json" + ]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = ObjectSerializer.stringify( + ObjectSerializer.serialize(updateMetadataHeaderRequest, "UpdateMetadataHeaderRequest", ""), + contentType + ); + requestContext.setBody(serializedBody); + let authMethod; + authMethod = _config.authMethods["bearerAuth"]; + if (authMethod == null ? void 0 : authMethod.applySecurityAuthentication) { + yield authMethod == null ? void 0 : authMethod.applySecurityAuthentication(requestContext); + } + const defaultAuth = ((_a = _options == null ? void 0 : _options.authMethods) == null ? void 0 : _a.default) || ((_c = (_b = this.configuration) == null ? void 0 : _b.authMethods) == null ? void 0 : _c.default); + if (defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication) { + yield defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication(requestContext); + } + return requestContext; + }); + } + /** + * Update object IDs for given metadata objects. Version: 10.8.0.cl or later ## Prerequisites - **Privileges Required:** - `DATAMANAGEMENT` (Can manage data) or `ADMINISTRATION` (Can administer ThoughtSpot). - **Additional Privileges (if RBAC is enabled):** - `ORG_ADMINISTRATION` (Can manage orgs). --- ## Usage Guidelines ### Parameters 1. **metadata** - **Description:** List of metadata objects to update their object IDs. - **Usage:** - Use either `current_obj_id` alone OR use `metadata_identifier` with `type` (when needed). - When using `metadata_identifier`, the `type` field is required if using a name instead of a GUID. - The `new_obj_id` field is always required. --- ## Note This API is specifically designed for updating object IDs of metadata objects. It internally uses the header update mechanism to perform the changes. ## Best Practices 1. **Backup Before Update:** Always export metadata as a backup before initiating the update process. 2. **Validation:** - When using `current_obj_id`, ensure it matches the existing object ID exactly. - When using `metadata_identifier` with a name, ensure the `type` is specified correctly. - Verify that the `new_obj_id` follows your naming conventions and is unique within your system. --- ## Examples ### Using current_obj_id ```json { \"metadata\": [ { \"current_obj_id\": \"existing_object_id\", \"new_obj_id\": \"new_object_id\" } ] } ``` ### Using metadata_identifier with GUID ```json { \"metadata\": [ { \"metadata_identifier\": \"01234567-89ab-cdef-0123-456789abcdef\", \"new_obj_id\": \"new_object_id\" } ] } ``` ### Using metadata_identifier with name and type ```json { \"metadata\": [ { \"metadata_identifier\": \"My Answer\", \"type\": \"ANSWER\", \"new_obj_id\": \"new_object_id\" } ] } ``` ### Multiple objects update ```json { \"metadata\": [ { \"current_obj_id\": \"existing_object_id_1\", \"new_obj_id\": \"new_object_id_1\" }, { \"metadata_identifier\": \"My Worksheet\", \"type\": \"LOGICAL_TABLE\", \"new_obj_id\": \"new_object_id_2\" } ] } ``` + * @param updateMetadataObjIdRequest + */ + updateMetadataObjId(updateMetadataObjIdRequest, _options) { + return __async(this, null, function* () { + var _a, _b, _c; + let _config = _options || this.configuration; + if (updateMetadataObjIdRequest === null || updateMetadataObjIdRequest === void 0) { + throw new RequiredError("ThoughtSpotRestApi", "updateMetadataObjId", "updateMetadataObjIdRequest"); + } + const localVarPath = "/api/rest/2.0/metadata/update-obj-id"; + const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.25.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.25.0"); + const contentType = ObjectSerializer.getPreferredMediaType([ + "application/json" + ]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = ObjectSerializer.stringify( + ObjectSerializer.serialize(updateMetadataObjIdRequest, "UpdateMetadataObjIdRequest", ""), + contentType + ); + requestContext.setBody(serializedBody); + let authMethod; + authMethod = _config.authMethods["bearerAuth"]; + if (authMethod == null ? void 0 : authMethod.applySecurityAuthentication) { + yield authMethod == null ? void 0 : authMethod.applySecurityAuthentication(requestContext); + } + const defaultAuth = ((_a = _options == null ? void 0 : _options.authMethods) == null ? void 0 : _a.default) || ((_c = (_b = this.configuration) == null ? void 0 : _b.authMethods) == null ? void 0 : _c.default); + if (defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication) { + yield defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication(requestContext); + } + return requestContext; + }); + } + /** + * Version: 9.0.0.cl or later Updates an Org object. You can modify Org properties such as name, description, and user associations. Requires cluster administration (**Can administer Org**) privileges. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `ORG_ADMINISTRATION` (**Can manage Orgs**) privilege is required. + * @param orgIdentifier ID or name of the Org + * @param updateOrgRequest + */ + updateOrg(orgIdentifier, updateOrgRequest, _options) { + return __async(this, null, function* () { + var _a, _b, _c; + let _config = _options || this.configuration; + if (orgIdentifier === null || orgIdentifier === void 0) { + throw new RequiredError("ThoughtSpotRestApi", "updateOrg", "orgIdentifier"); + } + if (updateOrgRequest === null || updateOrgRequest === void 0) { + throw new RequiredError("ThoughtSpotRestApi", "updateOrg", "updateOrgRequest"); + } + const localVarPath = "/api/rest/2.0/orgs/{org_identifier}/update".replace("{org_identifier}", encodeURIComponent(String(orgIdentifier))); + const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.25.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.25.0"); + const contentType = ObjectSerializer.getPreferredMediaType([ + "application/json" + ]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = ObjectSerializer.stringify( + ObjectSerializer.serialize(updateOrgRequest, "UpdateOrgRequest", ""), + contentType + ); + requestContext.setBody(serializedBody); + let authMethod; + authMethod = _config.authMethods["bearerAuth"]; + if (authMethod == null ? void 0 : authMethod.applySecurityAuthentication) { + yield authMethod == null ? void 0 : authMethod.applySecurityAuthentication(requestContext); + } + const defaultAuth = ((_a = _options == null ? void 0 : _options.authMethods) == null ? void 0 : _a.default) || ((_c = (_b = this.configuration) == null ? void 0 : _b.authMethods) == null ? void 0 : _c.default); + if (defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication) { + yield defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication(requestContext); + } + return requestContext; + }); + } + /** + * Version: 9.5.0.cl or later Updates the properties of a Role object. Available only if [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance. To update a Role, the `ROLE_ADMINISTRATION` (**Can manage roles**) privilege is required. + * @param roleIdentifier Unique ID or name of the Role. + * @param updateRoleRequest + */ + updateRole(roleIdentifier, updateRoleRequest, _options) { + return __async(this, null, function* () { + var _a, _b, _c; + let _config = _options || this.configuration; + if (roleIdentifier === null || roleIdentifier === void 0) { + throw new RequiredError("ThoughtSpotRestApi", "updateRole", "roleIdentifier"); + } + if (updateRoleRequest === null || updateRoleRequest === void 0) { + throw new RequiredError("ThoughtSpotRestApi", "updateRole", "updateRoleRequest"); + } + const localVarPath = "/api/rest/2.0/roles/{role_identifier}/update".replace("{role_identifier}", encodeURIComponent(String(roleIdentifier))); + const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.25.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.25.0"); + const contentType = ObjectSerializer.getPreferredMediaType([ + "application/json" + ]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = ObjectSerializer.stringify( + ObjectSerializer.serialize(updateRoleRequest, "UpdateRoleRequest", ""), + contentType + ); + requestContext.setBody(serializedBody); + let authMethod; + authMethod = _config.authMethods["bearerAuth"]; + if (authMethod == null ? void 0 : authMethod.applySecurityAuthentication) { + yield authMethod == null ? void 0 : authMethod.applySecurityAuthentication(requestContext); + } + const defaultAuth = ((_a = _options == null ? void 0 : _options.authMethods) == null ? void 0 : _a.default) || ((_c = (_b = this.configuration) == null ? void 0 : _b.authMethods) == null ? void 0 : _c.default); + if (defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication) { + yield defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication(requestContext); + } + return requestContext; + }); + } + /** + * Update schedule. Version: 9.4.0.cl or later Updates a scheduled Liveboard job. Requires at least edit access to Liveboards. To update a schedule on behalf of another user, you need `ADMINISTRATION` (**Can administer Org**) or `JOBSCHEDULING` (**Can schedule for others**) privilege and edit access to the Liveboard. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `JOBSCHEDULING` (**Can schedule for others**) privilege is required. The API endpoint allows you to pause a scheduled job, change the status of a paused job. You can also edit the recipients list, frequency of the job, format of the file to send to the recipients in email notifications, PDF options, and time zone setting. + * @param scheduleIdentifier Unique ID or name of the schedule. + * @param updateScheduleRequest + */ + updateSchedule(scheduleIdentifier, updateScheduleRequest, _options) { + return __async(this, null, function* () { + var _a, _b, _c; + let _config = _options || this.configuration; + if (scheduleIdentifier === null || scheduleIdentifier === void 0) { + throw new RequiredError("ThoughtSpotRestApi", "updateSchedule", "scheduleIdentifier"); + } + if (updateScheduleRequest === null || updateScheduleRequest === void 0) { + throw new RequiredError("ThoughtSpotRestApi", "updateSchedule", "updateScheduleRequest"); + } + const localVarPath = "/api/rest/2.0/schedules/{schedule_identifier}/update".replace("{schedule_identifier}", encodeURIComponent(String(scheduleIdentifier))); + const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.25.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.25.0"); + const contentType = ObjectSerializer.getPreferredMediaType([ + "application/json" + ]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = ObjectSerializer.stringify( + ObjectSerializer.serialize(updateScheduleRequest, "UpdateScheduleRequest", ""), + contentType + ); + requestContext.setBody(serializedBody); + let authMethod; + authMethod = _config.authMethods["bearerAuth"]; + if (authMethod == null ? void 0 : authMethod.applySecurityAuthentication) { + yield authMethod == null ? void 0 : authMethod.applySecurityAuthentication(requestContext); + } + const defaultAuth = ((_a = _options == null ? void 0 : _options.authMethods) == null ? void 0 : _a.default) || ((_c = (_b = this.configuration) == null ? void 0 : _b.authMethods) == null ? void 0 : _c.default); + if (defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication) { + yield defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication(requestContext); + } + return requestContext; + }); + } + /** + * Version: 9.2.0.cl or later Updates the current configuration of the cluster. You must send the configuration data in JSON format. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privileges. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `APPLICATION_ADMINISTRATION` (**Can manage application settings**) privilege is required. + * @param updateSystemConfigRequest + */ + updateSystemConfig(updateSystemConfigRequest, _options) { + return __async(this, null, function* () { + var _a, _b, _c; + let _config = _options || this.configuration; + if (updateSystemConfigRequest === null || updateSystemConfigRequest === void 0) { + throw new RequiredError("ThoughtSpotRestApi", "updateSystemConfig", "updateSystemConfigRequest"); + } + const localVarPath = "/api/rest/2.0/system/config-update"; + const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.25.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.25.0"); + const contentType = ObjectSerializer.getPreferredMediaType([ + "application/json" + ]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = ObjectSerializer.stringify( + ObjectSerializer.serialize(updateSystemConfigRequest, "UpdateSystemConfigRequest", ""), + contentType + ); + requestContext.setBody(serializedBody); + let authMethod; + authMethod = _config.authMethods["bearerAuth"]; + if (authMethod == null ? void 0 : authMethod.applySecurityAuthentication) { + yield authMethod == null ? void 0 : authMethod.applySecurityAuthentication(requestContext); + } + const defaultAuth = ((_a = _options == null ? void 0 : _options.authMethods) == null ? void 0 : _a.default) || ((_c = (_b = this.configuration) == null ? void 0 : _b.authMethods) == null ? void 0 : _c.default); + if (defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication) { + yield defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication(requestContext); + } + return requestContext; + }); + } + /** + * Version: 9.0.0.cl or later Updates a tag object. You can modify the `name` and `color` properties of a tag object. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `TAGMANAGEMENT` (**Can manage tags**) privilege is required to create, edit, and delete tags. + * @param tagIdentifier Name or Id of the tag. + * @param updateTagRequest + */ + updateTag(tagIdentifier, updateTagRequest, _options) { + return __async(this, null, function* () { + var _a, _b, _c; + let _config = _options || this.configuration; + if (tagIdentifier === null || tagIdentifier === void 0) { + throw new RequiredError("ThoughtSpotRestApi", "updateTag", "tagIdentifier"); + } + if (updateTagRequest === null || updateTagRequest === void 0) { + throw new RequiredError("ThoughtSpotRestApi", "updateTag", "updateTagRequest"); + } + const localVarPath = "/api/rest/2.0/tags/{tag_identifier}/update".replace("{tag_identifier}", encodeURIComponent(String(tagIdentifier))); + const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.25.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.25.0"); + const contentType = ObjectSerializer.getPreferredMediaType([ + "application/json" + ]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = ObjectSerializer.stringify( + ObjectSerializer.serialize(updateTagRequest, "UpdateTagRequest", ""), + contentType + ); + requestContext.setBody(serializedBody); + let authMethod; + authMethod = _config.authMethods["bearerAuth"]; + if (authMethod == null ? void 0 : authMethod.applySecurityAuthentication) { + yield authMethod == null ? void 0 : authMethod.applySecurityAuthentication(requestContext); + } + const defaultAuth = ((_a = _options == null ? void 0 : _options.authMethods) == null ? void 0 : _a.default) || ((_c = (_b = this.configuration) == null ? void 0 : _b.authMethods) == null ? void 0 : _c.default); + if (defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication) { + yield defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication(requestContext); + } + return requestContext; + }); + } + /** + * Version: 9.0.0.cl or later Updates the properties of a user object. You can modify user properties such as username, email, and share notification settings. You can also assign new groups and Orgs, remove the user from a group or Org, reset password, and modify user preferences. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `USER_ADMINISTRATION` (**Can manage users**) privilege is required. + * @param userIdentifier GUID / name of the user + * @param updateUserRequest + */ + updateUser(userIdentifier, updateUserRequest, _options) { + return __async(this, null, function* () { + var _a, _b, _c; + let _config = _options || this.configuration; + if (userIdentifier === null || userIdentifier === void 0) { + throw new RequiredError("ThoughtSpotRestApi", "updateUser", "userIdentifier"); + } + if (updateUserRequest === null || updateUserRequest === void 0) { + throw new RequiredError("ThoughtSpotRestApi", "updateUser", "updateUserRequest"); + } + const localVarPath = "/api/rest/2.0/users/{user_identifier}/update".replace("{user_identifier}", encodeURIComponent(String(userIdentifier))); + const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.25.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.25.0"); + const contentType = ObjectSerializer.getPreferredMediaType([ + "application/json" + ]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = ObjectSerializer.stringify( + ObjectSerializer.serialize(updateUserRequest, "UpdateUserRequest", ""), + contentType + ); + requestContext.setBody(serializedBody); + let authMethod; + authMethod = _config.authMethods["bearerAuth"]; + if (authMethod == null ? void 0 : authMethod.applySecurityAuthentication) { + yield authMethod == null ? void 0 : authMethod.applySecurityAuthentication(requestContext); + } + const defaultAuth = ((_a = _options == null ? void 0 : _options.authMethods) == null ? void 0 : _a.default) || ((_c = (_b = this.configuration) == null ? void 0 : _b.authMethods) == null ? void 0 : _c.default); + if (defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication) { + yield defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication(requestContext); + } + return requestContext; + }); + } + /** + * Version: 9.0.0.cl or later Updates the properties of a group object in ThoughtSpot. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `GROUP_ADMINISTRATION` (**Can manage groups**) privilege is required. #### Supported operations This API endpoint lets you perform the following operations in a single API request: * Edit [privileges](https://developers.thoughtspot.com/docs/?pageid=api-user-management#group-privileges) * Add or remove users * Change sharing visibility settings * Add or remove sub-groups * Assign a default Liveboard or update the existing settings + * @param groupIdentifier GUID or name of the group. + * @param updateUserGroupRequest + */ + updateUserGroup(groupIdentifier, updateUserGroupRequest, _options) { + return __async(this, null, function* () { + var _a, _b, _c; + let _config = _options || this.configuration; + if (groupIdentifier === null || groupIdentifier === void 0) { + throw new RequiredError("ThoughtSpotRestApi", "updateUserGroup", "groupIdentifier"); + } + if (updateUserGroupRequest === null || updateUserGroupRequest === void 0) { + throw new RequiredError("ThoughtSpotRestApi", "updateUserGroup", "updateUserGroupRequest"); + } + const localVarPath = "/api/rest/2.0/groups/{group_identifier}/update".replace("{group_identifier}", encodeURIComponent(String(groupIdentifier))); + const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.25.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.25.0"); + const contentType = ObjectSerializer.getPreferredMediaType([ + "application/json" + ]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = ObjectSerializer.stringify( + ObjectSerializer.serialize(updateUserGroupRequest, "UpdateUserGroupRequest", ""), + contentType + ); + requestContext.setBody(serializedBody); + let authMethod; + authMethod = _config.authMethods["bearerAuth"]; + if (authMethod == null ? void 0 : authMethod.applySecurityAuthentication) { + yield authMethod == null ? void 0 : authMethod.applySecurityAuthentication(requestContext); + } + const defaultAuth = ((_a = _options == null ? void 0 : _options.authMethods) == null ? void 0 : _a.default) || ((_c = (_b = this.configuration) == null ? void 0 : _b.authMethods) == null ? void 0 : _c.default); + if (defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication) { + yield defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication(requestContext); + } + return requestContext; + }); + } + /** + * Update a variable\'s name Version: 26.4.0.cl or later Allows updating a variable\'s name in ThoughtSpot. Requires ADMINISTRATION role and TENANT scope. The CAN_MANAGE_VARIABLES permission allows you to manage Formula Variables in the current organization scope. The API endpoint allows updating: * The variable name + * @param identifier Unique id or name of the variable to update. + * @param updateVariableRequest + */ + updateVariable(identifier, updateVariableRequest, _options) { + return __async(this, null, function* () { + var _a, _b, _c; + let _config = _options || this.configuration; + if (identifier === null || identifier === void 0) { + throw new RequiredError("ThoughtSpotRestApi", "updateVariable", "identifier"); + } + if (updateVariableRequest === null || updateVariableRequest === void 0) { + throw new RequiredError("ThoughtSpotRestApi", "updateVariable", "updateVariableRequest"); + } + const localVarPath = "/api/rest/2.0/template/variables/{identifier}/update".replace("{identifier}", encodeURIComponent(String(identifier))); + const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.25.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.25.0"); + const contentType = ObjectSerializer.getPreferredMediaType([ + "application/json" + ]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = ObjectSerializer.stringify( + ObjectSerializer.serialize(updateVariableRequest, "UpdateVariableRequest", ""), + contentType + ); + requestContext.setBody(serializedBody); + let authMethod; + authMethod = _config.authMethods["bearerAuth"]; + if (authMethod == null ? void 0 : authMethod.applySecurityAuthentication) { + yield authMethod == null ? void 0 : authMethod.applySecurityAuthentication(requestContext); + } + const defaultAuth = ((_a = _options == null ? void 0 : _options.authMethods) == null ? void 0 : _a.default) || ((_c = (_b = this.configuration) == null ? void 0 : _b.authMethods) == null ? void 0 : _c.default); + if (defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication) { + yield defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication(requestContext); + } + return requestContext; + }); + } + /** + * Update values for multiple variables Version: 10.14.0.cl or later **Note:** This API endpoint is deprecated and will be removed from ThoughtSpot in a future release. Use [POST /api/rest/2.0/template/variables/{identifier}/update-values](/api/rest/2.0/template/variables/%7Bidentifier%7D/update-values) instead. Allows updating values for multiple variables in ThoughtSpot. Requires ADMINISTRATION role. The CAN_MANAGE_VARIABLES permission allows you to manage Formula Variables in the current organization scope. The API endpoint allows: * Adding new values to variables * Replacing existing values * Deleting values from variables When updating variable values, you need to specify: * The variable identifiers * The values to add/replace/remove for each variable * The operation to perform (ADD, REPLACE, REMOVE, RESET) Behaviour based on operation type: * ADD - Adds values to the variable if this is a list type variable, else same as replace. * REPLACE - Replaces all values of a given set of constraints with the current set of values. * REMOVE - Removes any values which match the set of conditions of the variables if this is a list type variable, else clears value. * RESET - Removes all constrains for a given variable, scope is ignored + * @param updateVariableValuesRequest + */ + updateVariableValues(updateVariableValuesRequest, _options) { + return __async(this, null, function* () { + var _a, _b, _c; + let _config = _options || this.configuration; + if (updateVariableValuesRequest === null || updateVariableValuesRequest === void 0) { + throw new RequiredError("ThoughtSpotRestApi", "updateVariableValues", "updateVariableValuesRequest"); + } + const localVarPath = "/api/rest/2.0/template/variables/update-values"; + const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.25.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.25.0"); + const contentType = ObjectSerializer.getPreferredMediaType([ + "application/json" + ]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = ObjectSerializer.stringify( + ObjectSerializer.serialize(updateVariableValuesRequest, "UpdateVariableValuesRequest", ""), + contentType + ); + requestContext.setBody(serializedBody); + let authMethod; + authMethod = _config.authMethods["bearerAuth"]; + if (authMethod == null ? void 0 : authMethod.applySecurityAuthentication) { + yield authMethod == null ? void 0 : authMethod.applySecurityAuthentication(requestContext); + } + const defaultAuth = ((_a = _options == null ? void 0 : _options.authMethods) == null ? void 0 : _a.default) || ((_c = (_b = this.configuration) == null ? void 0 : _b.authMethods) == null ? void 0 : _c.default); + if (defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication) { + yield defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication(requestContext); + } + return requestContext; + }); + } + /** + * Version: 10.14.0.cl or later Updates an existing webhook configuration by its unique id or name. Only the provided fields will be updated. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) or `DEVELOPER` (**Has developer privilege**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, users with `CAN_MANAGE_WEBHOOKS` (**Can manage webhooks**) privilege are also authorized to perform this action. + * @param webhookIdentifier Unique ID or name of the webhook configuration. + * @param updateWebhookConfigurationRequest + */ + updateWebhookConfiguration(webhookIdentifier, updateWebhookConfigurationRequest, _options) { + return __async(this, null, function* () { + var _a, _b, _c; + let _config = _options || this.configuration; + if (webhookIdentifier === null || webhookIdentifier === void 0) { + throw new RequiredError("ThoughtSpotRestApi", "updateWebhookConfiguration", "webhookIdentifier"); + } + if (updateWebhookConfigurationRequest === null || updateWebhookConfigurationRequest === void 0) { + throw new RequiredError("ThoughtSpotRestApi", "updateWebhookConfiguration", "updateWebhookConfigurationRequest"); + } + const localVarPath = "/api/rest/2.0/webhooks/{webhook_identifier}/update".replace("{webhook_identifier}", encodeURIComponent(String(webhookIdentifier))); + const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.25.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.25.0"); + const contentType = ObjectSerializer.getPreferredMediaType([ + "application/json" + ]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = ObjectSerializer.stringify( + ObjectSerializer.serialize(updateWebhookConfigurationRequest, "UpdateWebhookConfigurationRequest", ""), + contentType + ); + requestContext.setBody(serializedBody); + let authMethod; + authMethod = _config.authMethods["bearerAuth"]; + if (authMethod == null ? void 0 : authMethod.applySecurityAuthentication) { + yield authMethod == null ? void 0 : authMethod.applySecurityAuthentication(requestContext); + } + const defaultAuth = ((_a = _options == null ? void 0 : _options.authMethods) == null ? void 0 : _a.default) || ((_c = (_b = this.configuration) == null ? void 0 : _b.authMethods) == null ? void 0 : _c.default); + if (defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication) { + yield defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication(requestContext); + } + return requestContext; + }); + } + /** + * Version: 26.4.0.cl or later Validates a communication channel configuration to ensure it is properly set up and can receive events. - Use `channel_type` to specify the type of communication channel to validate (e.g., WEBHOOK). - Use `channel_identifier` to provide the unique identifier or name for the communication channel. - Use `event_type` to specify the event type to validate for this channel. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) or `DEVELOPER` (**Has developer privilege**) privilege. For webhook channels, users with `CAN_MANAGE_WEBHOOKS` (**Can manage webhooks**) privilege are also authorized to perform this action. + * @param validateCommunicationChannelRequest + */ + validateCommunicationChannel(validateCommunicationChannelRequest, _options) { + return __async(this, null, function* () { + var _a, _b, _c; + let _config = _options || this.configuration; + if (validateCommunicationChannelRequest === null || validateCommunicationChannelRequest === void 0) { + throw new RequiredError("ThoughtSpotRestApi", "validateCommunicationChannel", "validateCommunicationChannelRequest"); + } + const localVarPath = "/api/rest/2.0/system/communication-channels/validate"; + const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.25.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.25.0"); + const contentType = ObjectSerializer.getPreferredMediaType([ + "application/json" + ]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = ObjectSerializer.stringify( + ObjectSerializer.serialize(validateCommunicationChannelRequest, "ValidateCommunicationChannelRequest", ""), + contentType + ); + requestContext.setBody(serializedBody); + let authMethod; + authMethod = _config.authMethods["bearerAuth"]; + if (authMethod == null ? void 0 : authMethod.applySecurityAuthentication) { + yield authMethod == null ? void 0 : authMethod.applySecurityAuthentication(requestContext); + } + const defaultAuth = ((_a = _options == null ? void 0 : _options.authMethods) == null ? void 0 : _a.default) || ((_c = (_b = this.configuration) == null ? void 0 : _b.authMethods) == null ? void 0 : _c.default); + if (defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication) { + yield defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication(requestContext); + } + return requestContext; + }); + } + /** + * Version: 10.10.0.cl or later Validates the email customization configuration if any set for the ThoughtSpot system. #### Pre-requisites Requires `DEVELOPER` (**has developer privilege**) or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `DEVELOPER` (**Has developer privilege**) privilege is required. **NOTE**:This endpoint in currently in beta. Contact ThoughtSpot support to enable this on your instance. + */ + validateEmailCustomization(_options) { + return __async(this, null, function* () { + var _a, _b, _c; + let _config = _options || this.configuration; + const localVarPath = "/api/rest/2.0/customization/email/validate"; + const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.25.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.25.0"); + let authMethod; + authMethod = _config.authMethods["bearerAuth"]; + if (authMethod == null ? void 0 : authMethod.applySecurityAuthentication) { + yield authMethod == null ? void 0 : authMethod.applySecurityAuthentication(requestContext); + } + const defaultAuth = ((_a = _options == null ? void 0 : _options.authMethods) == null ? void 0 : _a.default) || ((_c = (_b = this.configuration) == null ? void 0 : _b.authMethods) == null ? void 0 : _c.default); + if (defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication) { + yield defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication(requestContext); + } + return requestContext; + }); + } + /** + * Version: 9.2.0.cl or later Validates the content of your source branch against the objects in your destination environment. Before merging content from your source branch to the destination branch, run this API operation from your destination environment and ensure that the changes from the source branch function in the destination environment. Requires `DATAMANAGEMENT` (**Can manage data**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance on your instance, the `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` (**Can manage data models**) privilege and edit access to the metadata objects. + * @param validateMergeRequest + */ + validateMerge(validateMergeRequest, _options) { + return __async(this, null, function* () { + var _a, _b, _c; + let _config = _options || this.configuration; + if (validateMergeRequest === null || validateMergeRequest === void 0) { + throw new RequiredError("ThoughtSpotRestApi", "validateMerge", "validateMergeRequest"); + } + const localVarPath = "/api/rest/2.0/vcs/git/branches/validate"; + const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.25.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.25.0"); + const contentType = ObjectSerializer.getPreferredMediaType([ + "application/json" + ]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = ObjectSerializer.stringify( + ObjectSerializer.serialize(validateMergeRequest, "ValidateMergeRequest", ""), + contentType + ); + requestContext.setBody(serializedBody); + let authMethod; + authMethod = _config.authMethods["bearerAuth"]; + if (authMethod == null ? void 0 : authMethod.applySecurityAuthentication) { + yield authMethod == null ? void 0 : authMethod.applySecurityAuthentication(requestContext); + } + const defaultAuth = ((_a = _options == null ? void 0 : _options.authMethods) == null ? void 0 : _a.default) || ((_c = (_b = this.configuration) == null ? void 0 : _b.authMethods) == null ? void 0 : _c.default); + if (defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication) { + yield defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication(requestContext); + } + return requestContext; + }); + } + /** + * Version: 9.12.0.cl or later Validates the authentication token specified in the API request. If your token is not valid, [Get a new token](#/http/api-endpoints/authentication/get-full-access-token). + * @param validateTokenRequest + */ + validateToken(validateTokenRequest, _options) { + return __async(this, null, function* () { + var _a, _b, _c; + let _config = _options || this.configuration; + if (validateTokenRequest === null || validateTokenRequest === void 0) { + throw new RequiredError("ThoughtSpotRestApi", "validateToken", "validateTokenRequest"); + } + const localVarPath = "/api/rest/2.0/auth/token/validate"; + const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.25.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.25.0"); + const contentType = ObjectSerializer.getPreferredMediaType([ + "application/json" + ]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = ObjectSerializer.stringify( + ObjectSerializer.serialize(validateTokenRequest, "ValidateTokenRequest", ""), + contentType + ); + requestContext.setBody(serializedBody); + let authMethod; + authMethod = _config.authMethods["bearerAuth"]; + if (authMethod == null ? void 0 : authMethod.applySecurityAuthentication) { + yield authMethod == null ? void 0 : authMethod.applySecurityAuthentication(requestContext); + } + const defaultAuth = ((_a = _options == null ? void 0 : _options.authMethods) == null ? void 0 : _a.default) || ((_c = (_b = this.configuration) == null ? void 0 : _b.authMethods) == null ? void 0 : _c.default); + if (defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication) { + yield defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication(requestContext); + } + return requestContext; + }); + } +}; +var ThoughtSpotRestApiResponseProcessor = class { + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to activateUser + * @throws ApiException if the response code was not in [200, 299] + */ + activateUser(response) { + return __async(this, null, function* () { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("200", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "User", + "" + ); + return body; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Invalid request.", body, response.headers); + } + if (isCodeInRange("401", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unexpected error", body, response.headers); + } + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "User", + "" + ); + return body; + } + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", yield response.getBodyAsAny(), response.headers); + }); + } + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to assignChangeAuthor + * @throws ApiException if the response code was not in [200, 299] + */ + assignChangeAuthor(response) { + return __async(this, null, function* () { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("204", response.httpStatusCode)) { + return; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Invalid request.", body, response.headers); + } + if (isCodeInRange("401", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unexpected error", body, response.headers); + } + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "void", + "" + ); + return body; + } + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", yield response.getBodyAsAny(), response.headers); + }); + } + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to assignTag + * @throws ApiException if the response code was not in [200, 299] + */ + assignTag(response) { + return __async(this, null, function* () { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("204", response.httpStatusCode)) { + return; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Invalid request.", body, response.headers); + } + if (isCodeInRange("401", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unexpected error", body, response.headers); + } + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "void", + "" + ); + return body; + } + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", yield response.getBodyAsAny(), response.headers); + }); + } + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to changeUserPassword + * @throws ApiException if the response code was not in [200, 299] + */ + changeUserPassword(response) { + return __async(this, null, function* () { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("204", response.httpStatusCode)) { + return; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Invalid request.", body, response.headers); + } + if (isCodeInRange("401", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unexpected error", body, response.headers); + } + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "void", + "" + ); + return body; + } + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", yield response.getBodyAsAny(), response.headers); + }); + } + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to commitBranch + * @throws ApiException if the response code was not in [200, 299] + */ + commitBranch(response) { + return __async(this, null, function* () { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("200", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "CommitResponse", + "" + ); + return body; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Invalid request.", body, response.headers); + } + if (isCodeInRange("401", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unexpected error", body, response.headers); + } + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "CommitResponse", + "" + ); + return body; + } + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", yield response.getBodyAsAny(), response.headers); + }); + } + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to configureAuthSettings + * @throws ApiException if the response code was not in [200, 299] + */ + configureAuthSettings(response) { + return __async(this, null, function* () { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("204", response.httpStatusCode)) { + return; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Invalid request.", body, response.headers); + } + if (isCodeInRange("401", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unexpected error", body, response.headers); + } + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "void", + "" + ); + return body; + } + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", yield response.getBodyAsAny(), response.headers); + }); + } + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to configureCommunicationChannelPreferences + * @throws ApiException if the response code was not in [200, 299] + */ + configureCommunicationChannelPreferences(response) { + return __async(this, null, function* () { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("204", response.httpStatusCode)) { + return; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Invalid request.", body, response.headers); + } + if (isCodeInRange("401", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unexpected error", body, response.headers); + } + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "void", + "" + ); + return body; + } + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", yield response.getBodyAsAny(), response.headers); + }); + } + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to configureSecuritySettings + * @throws ApiException if the response code was not in [200, 299] + */ + configureSecuritySettings(response) { + return __async(this, null, function* () { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("204", response.httpStatusCode)) { + return; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Invalid request.", body, response.headers); + } + if (isCodeInRange("401", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unexpected error", body, response.headers); + } + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "void", + "" + ); + return body; + } + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", yield response.getBodyAsAny(), response.headers); + }); + } + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to connectionConfigurationSearch + * @throws ApiException if the response code was not in [200, 299] + */ + connectionConfigurationSearch(response) { + return __async(this, null, function* () { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("200", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "Array", + "" + ); + return body; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Invalid request.", body, response.headers); + } + if (isCodeInRange("401", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unexpected error", body, response.headers); + } + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "Array", + "" + ); + return body; + } + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", yield response.getBodyAsAny(), response.headers); + }); + } + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to convertWorksheetToModel + * @throws ApiException if the response code was not in [200, 299] + */ + convertWorksheetToModel(response) { + return __async(this, null, function* () { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("200", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ResponseWorksheetToModelConversion", + "" + ); + return body; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Invalid request.", body, response.headers); + } + if (isCodeInRange("401", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unexpected error", body, response.headers); + } + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ResponseWorksheetToModelConversion", + "" + ); + return body; + } + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", yield response.getBodyAsAny(), response.headers); + }); + } + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to copyObject + * @throws ApiException if the response code was not in [200, 299] + */ + copyObject(response) { + return __async(this, null, function* () { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("200", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ResponseCopyObject", + "" + ); + return body; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Invalid request.", body, response.headers); + } + if (isCodeInRange("401", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } + if (isCodeInRange("404", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Object not found", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unexpected error", body, response.headers); + } + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ResponseCopyObject", + "" + ); + return body; + } + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", yield response.getBodyAsAny(), response.headers); + }); + } + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to createAgentConversation + * @throws ApiException if the response code was not in [200, 299] + */ + createAgentConversation(response) { + return __async(this, null, function* () { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("200", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "AgentConversation", + "" + ); + return body; + } + if (isCodeInRange("201", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "AgentConversation", + "" + ); + return body; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Operation failed", body, response.headers); + } + if (isCodeInRange("401", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Operation failed", body, response.headers); + } + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "AgentConversation", + "" + ); + return body; + } + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", yield response.getBodyAsAny(), response.headers); + }); + } + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to createCalendar + * @throws ApiException if the response code was not in [200, 299] + */ + createCalendar(response) { + return __async(this, null, function* () { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("200", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "CalendarResponse", + "" + ); + return body; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Invalid request.", body, response.headers); + } + if (isCodeInRange("401", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unexpected error", body, response.headers); + } + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "CalendarResponse", + "" + ); + return body; + } + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", yield response.getBodyAsAny(), response.headers); + }); + } + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to createCollection + * @throws ApiException if the response code was not in [200, 299] + */ + createCollection(response) { + return __async(this, null, function* () { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("200", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "Collection", + "" + ); + return body; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Invalid request.", body, response.headers); + } + if (isCodeInRange("401", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unexpected error", body, response.headers); + } + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "Collection", + "" + ); + return body; + } + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", yield response.getBodyAsAny(), response.headers); + }); + } + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to createConfig + * @throws ApiException if the response code was not in [200, 299] + */ + createConfig(response) { + return __async(this, null, function* () { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("200", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "RepoConfigObject", + "" + ); + return body; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Invalid request.", body, response.headers); + } + if (isCodeInRange("401", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unexpected error", body, response.headers); + } + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "RepoConfigObject", + "" + ); + return body; + } + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", yield response.getBodyAsAny(), response.headers); + }); + } + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to createConnection + * @throws ApiException if the response code was not in [200, 299] + */ + createConnection(response) { + return __async(this, null, function* () { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("200", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "CreateConnectionResponse", + "" + ); + return body; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Invalid request.", body, response.headers); + } + if (isCodeInRange("401", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unexpected error", body, response.headers); + } + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "CreateConnectionResponse", + "" + ); + return body; + } + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", yield response.getBodyAsAny(), response.headers); + }); + } + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to createConnectionConfiguration + * @throws ApiException if the response code was not in [200, 299] + */ + createConnectionConfiguration(response) { + return __async(this, null, function* () { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("200", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ConnectionConfigurationResponse", + "" + ); + return body; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Invalid request.", body, response.headers); + } + if (isCodeInRange("401", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unexpected error", body, response.headers); + } + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ConnectionConfigurationResponse", + "" + ); + return body; + } + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", yield response.getBodyAsAny(), response.headers); + }); + } + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to createConversation + * @throws ApiException if the response code was not in [200, 299] + */ + createConversation(response) { + return __async(this, null, function* () { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("200", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "Conversation", + "" + ); + return body; + } + if (isCodeInRange("201", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "Conversation", + "" + ); + return body; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Operation failed", body, response.headers); + } + if (isCodeInRange("401", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Operation failed", body, response.headers); + } + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "Conversation", + "" + ); + return body; + } + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", yield response.getBodyAsAny(), response.headers); + }); + } + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to createCustomAction + * @throws ApiException if the response code was not in [200, 299] + */ + createCustomAction(response) { + return __async(this, null, function* () { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("200", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ResponseCustomAction", + "" + ); + return body; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Invalid request.", body, response.headers); + } + if (isCodeInRange("401", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unexpected error", body, response.headers); + } + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ResponseCustomAction", + "" + ); + return body; + } + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", yield response.getBodyAsAny(), response.headers); + }); + } + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to createEmailCustomization + * @throws ApiException if the response code was not in [200, 299] + */ + createEmailCustomization(response) { + return __async(this, null, function* () { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("200", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "CreateEmailCustomizationResponse", + "" + ); + return body; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Invalid request.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unexpected error", body, response.headers); + } + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "CreateEmailCustomizationResponse", + "" + ); + return body; + } + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", yield response.getBodyAsAny(), response.headers); + }); + } + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to createOrg + * @throws ApiException if the response code was not in [200, 299] + */ + createOrg(response) { + return __async(this, null, function* () { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("200", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "OrgResponse", + "" + ); + return body; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Invalid request.", body, response.headers); + } + if (isCodeInRange("401", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unexpected error", body, response.headers); + } + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "OrgResponse", + "" + ); + return body; + } + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", yield response.getBodyAsAny(), response.headers); + }); + } + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to createRole + * @throws ApiException if the response code was not in [200, 299] + */ + createRole(response) { + return __async(this, null, function* () { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("200", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "RoleResponse", + "" + ); + return body; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Invalid parameters.", body, response.headers); + } + if (isCodeInRange("401", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Internal error", body, response.headers); + } + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "RoleResponse", + "" + ); + return body; + } + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", yield response.getBodyAsAny(), response.headers); + }); + } + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to createSchedule + * @throws ApiException if the response code was not in [200, 299] + */ + createSchedule(response) { + return __async(this, null, function* () { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("200", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ResponseSchedule", + "" + ); + return body; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Invalid request.", body, response.headers); + } + if (isCodeInRange("401", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unexpected error", body, response.headers); + } + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ResponseSchedule", + "" + ); + return body; + } + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", yield response.getBodyAsAny(), response.headers); + }); + } + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to createTag + * @throws ApiException if the response code was not in [200, 299] + */ + createTag(response) { + return __async(this, null, function* () { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("200", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "Tag", + "" + ); + return body; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Invalid request.", body, response.headers); + } + if (isCodeInRange("401", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unexpected error", body, response.headers); + } + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "Tag", + "" + ); + return body; + } + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", yield response.getBodyAsAny(), response.headers); + }); + } + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to createUser + * @throws ApiException if the response code was not in [200, 299] + */ + createUser(response) { + return __async(this, null, function* () { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("200", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "User", + "" + ); + return body; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Invalid request.", body, response.headers); + } + if (isCodeInRange("401", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unexpected error", body, response.headers); + } + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "User", + "" + ); + return body; + } + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", yield response.getBodyAsAny(), response.headers); + }); + } + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to createUserGroup + * @throws ApiException if the response code was not in [200, 299] + */ + createUserGroup(response) { + return __async(this, null, function* () { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("200", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "UserGroupResponse", + "" + ); + return body; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Invalid request.", body, response.headers); + } + if (isCodeInRange("401", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unexpected error", body, response.headers); + } + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "UserGroupResponse", + "" + ); + return body; + } + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", yield response.getBodyAsAny(), response.headers); + }); + } + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to createVariable + * @throws ApiException if the response code was not in [200, 299] + */ + createVariable(response) { + return __async(this, null, function* () { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("200", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "Variable", + "" + ); + return body; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Invalid request.", body, response.headers); + } + if (isCodeInRange("401", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unexpected error", body, response.headers); + } + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "Variable", + "" + ); + return body; + } + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", yield response.getBodyAsAny(), response.headers); + }); + } + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to createWebhookConfiguration + * @throws ApiException if the response code was not in [200, 299] + */ + createWebhookConfiguration(response) { + return __async(this, null, function* () { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("200", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "WebhookResponse", + "" + ); + return body; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Invalid request.", body, response.headers); + } + if (isCodeInRange("401", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unexpected error", body, response.headers); + } + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "WebhookResponse", + "" + ); + return body; + } + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", yield response.getBodyAsAny(), response.headers); + }); + } + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to dbtConnection + * @throws ApiException if the response code was not in [200, 299] + */ + dbtConnection(response) { + return __async(this, null, function* () { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("200", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "any", + "" + ); + return body; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Invalid request.", body, response.headers); + } + if (isCodeInRange("401", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unexpected error", body, response.headers); + } + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "any", + "" + ); + return body; + } + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", yield response.getBodyAsAny(), response.headers); + }); + } + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to dbtGenerateSyncTml + * @throws ApiException if the response code was not in [200, 299] + */ + dbtGenerateSyncTml(response) { + return __async(this, null, function* () { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("200", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "any", + "" + ); + return body; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Invalid request.", body, response.headers); + } + if (isCodeInRange("401", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unexpected error", body, response.headers); + } + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "any", + "" + ); + return body; + } + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", yield response.getBodyAsAny(), response.headers); + }); + } + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to dbtGenerateTml + * @throws ApiException if the response code was not in [200, 299] + */ + dbtGenerateTml(response) { + return __async(this, null, function* () { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("200", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "any", + "" + ); + return body; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Invalid request.", body, response.headers); + } + if (isCodeInRange("401", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unexpected error", body, response.headers); + } + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "any", + "" + ); + return body; + } + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", yield response.getBodyAsAny(), response.headers); + }); + } + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to dbtSearch + * @throws ApiException if the response code was not in [200, 299] + */ + dbtSearch(response) { + return __async(this, null, function* () { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("200", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "Array", + "" + ); + return body; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Invalid request.", body, response.headers); + } + if (isCodeInRange("401", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unexpected error", body, response.headers); + } + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "Array", + "" + ); + return body; + } + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", yield response.getBodyAsAny(), response.headers); + }); + } + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to deactivateUser + * @throws ApiException if the response code was not in [200, 299] + */ + deactivateUser(response) { + return __async(this, null, function* () { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("200", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ResponseActivationURL", + "" + ); + return body; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Invalid request.", body, response.headers); + } + if (isCodeInRange("401", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unexpected error", body, response.headers); + } + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ResponseActivationURL", + "" + ); + return body; + } + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", yield response.getBodyAsAny(), response.headers); + }); + } + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to deleteCalendar + * @throws ApiException if the response code was not in [200, 299] + */ + deleteCalendar(response) { + return __async(this, null, function* () { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("204", response.httpStatusCode)) { + return; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Invalid request.", body, response.headers); + } + if (isCodeInRange("401", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unexpected error", body, response.headers); + } + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "void", + "" + ); + return body; + } + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", yield response.getBodyAsAny(), response.headers); + }); + } + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to deleteCollection + * @throws ApiException if the response code was not in [200, 299] + */ + deleteCollection(response) { + return __async(this, null, function* () { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("200", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "CollectionDeleteResponse", + "" + ); + return body; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Invalid request.", body, response.headers); + } + if (isCodeInRange("401", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } + if (isCodeInRange("404", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Resource not found.", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unexpected error", body, response.headers); + } + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "CollectionDeleteResponse", + "" + ); + return body; + } + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", yield response.getBodyAsAny(), response.headers); + }); + } + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to deleteConfig + * @throws ApiException if the response code was not in [200, 299] + */ + deleteConfig(response) { + return __async(this, null, function* () { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("204", response.httpStatusCode)) { + return; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Invalid request.", body, response.headers); + } + if (isCodeInRange("401", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unexpected error", body, response.headers); + } + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "void", + "" + ); + return body; + } + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", yield response.getBodyAsAny(), response.headers); + }); + } + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to deleteConnection + * @throws ApiException if the response code was not in [200, 299] + */ + deleteConnection(response) { + return __async(this, null, function* () { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("204", response.httpStatusCode)) { + return; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Invalid request.", body, response.headers); + } + if (isCodeInRange("401", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unexpected error", body, response.headers); + } + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "void", + "" + ); + return body; + } + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", yield response.getBodyAsAny(), response.headers); + }); + } + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to deleteConnectionConfiguration + * @throws ApiException if the response code was not in [200, 299] + */ + deleteConnectionConfiguration(response) { + return __async(this, null, function* () { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("204", response.httpStatusCode)) { + return; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Invalid request.", body, response.headers); + } + if (isCodeInRange("401", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unexpected error", body, response.headers); + } + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "void", + "" + ); + return body; + } + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", yield response.getBodyAsAny(), response.headers); + }); + } + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to deleteConnectionV2 + * @throws ApiException if the response code was not in [200, 299] + */ + deleteConnectionV2(response) { + return __async(this, null, function* () { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("204", response.httpStatusCode)) { + return; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Invalid request.", body, response.headers); + } + if (isCodeInRange("401", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unexpected error", body, response.headers); + } + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "void", + "" + ); + return body; + } + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", yield response.getBodyAsAny(), response.headers); + }); + } + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to deleteCustomAction + * @throws ApiException if the response code was not in [200, 299] + */ + deleteCustomAction(response) { + return __async(this, null, function* () { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("204", response.httpStatusCode)) { + return; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Invalid request.", body, response.headers); + } + if (isCodeInRange("401", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unexpected error", body, response.headers); + } + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "void", + "" + ); + return body; + } + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", yield response.getBodyAsAny(), response.headers); + }); + } + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to deleteDbtConnection + * @throws ApiException if the response code was not in [200, 299] + */ + deleteDbtConnection(response) { + return __async(this, null, function* () { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("204", response.httpStatusCode)) { + return; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Invalid request.", body, response.headers); + } + if (isCodeInRange("401", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unexpected error", body, response.headers); + } + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "void", + "" + ); + return body; + } + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", yield response.getBodyAsAny(), response.headers); + }); + } + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to deleteEmailCustomization + * @throws ApiException if the response code was not in [200, 299] + */ + deleteEmailCustomization(response) { + return __async(this, null, function* () { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("204", response.httpStatusCode)) { + return; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Invalid request.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unexpected error", body, response.headers); + } + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "void", + "" + ); + return body; + } + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", yield response.getBodyAsAny(), response.headers); + }); + } + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to deleteMetadata + * @throws ApiException if the response code was not in [200, 299] + */ + deleteMetadata(response) { + return __async(this, null, function* () { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("204", response.httpStatusCode)) { + return; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Invalid request.", body, response.headers); + } + if (isCodeInRange("401", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unexpected error", body, response.headers); + } + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "void", + "" + ); + return body; + } + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", yield response.getBodyAsAny(), response.headers); + }); + } + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to deleteOrg + * @throws ApiException if the response code was not in [200, 299] + */ + deleteOrg(response) { + return __async(this, null, function* () { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("204", response.httpStatusCode)) { + return; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Invalid request.", body, response.headers); + } + if (isCodeInRange("401", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unexpected error", body, response.headers); + } + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "void", + "" + ); + return body; + } + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", yield response.getBodyAsAny(), response.headers); + }); + } + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to deleteOrgEmailCustomization + * @throws ApiException if the response code was not in [200, 299] + */ + deleteOrgEmailCustomization(response) { + return __async(this, null, function* () { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("204", response.httpStatusCode)) { + return; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Invalid request.", body, response.headers); + } + if (isCodeInRange("401", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unexpected error", body, response.headers); + } + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "void", + "" + ); + return body; + } + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", yield response.getBodyAsAny(), response.headers); + }); + } + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to deleteRole + * @throws ApiException if the response code was not in [200, 299] + */ + deleteRole(response) { + return __async(this, null, function* () { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("204", response.httpStatusCode)) { + return; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Invalid request.", body, response.headers); + } + if (isCodeInRange("401", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Internal error", body, response.headers); + } + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "void", + "" + ); + return body; + } + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", yield response.getBodyAsAny(), response.headers); + }); + } + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to deleteSchedule + * @throws ApiException if the response code was not in [200, 299] + */ + deleteSchedule(response) { + return __async(this, null, function* () { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("204", response.httpStatusCode)) { + return; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Invalid request.", body, response.headers); + } + if (isCodeInRange("401", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unexpected error", body, response.headers); + } + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "void", + "" + ); + return body; + } + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", yield response.getBodyAsAny(), response.headers); + }); + } + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to deleteTag + * @throws ApiException if the response code was not in [200, 299] + */ + deleteTag(response) { + return __async(this, null, function* () { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("204", response.httpStatusCode)) { + return; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Invalid request.", body, response.headers); + } + if (isCodeInRange("401", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unexpected error", body, response.headers); + } + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "void", + "" + ); + return body; + } + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", yield response.getBodyAsAny(), response.headers); + }); + } + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to deleteUser + * @throws ApiException if the response code was not in [200, 299] + */ + deleteUser(response) { + return __async(this, null, function* () { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("204", response.httpStatusCode)) { + return; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Invalid request.", body, response.headers); + } + if (isCodeInRange("401", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unexpected error", body, response.headers); + } + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "void", + "" + ); + return body; + } + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", yield response.getBodyAsAny(), response.headers); + }); + } + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to deleteUserGroup + * @throws ApiException if the response code was not in [200, 299] + */ + deleteUserGroup(response) { + return __async(this, null, function* () { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("204", response.httpStatusCode)) { + return; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Invalid request.", body, response.headers); + } + if (isCodeInRange("401", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unexpected error", body, response.headers); + } + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "void", + "" + ); + return body; + } + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", yield response.getBodyAsAny(), response.headers); + }); + } + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to deleteVariable + * @throws ApiException if the response code was not in [200, 299] + */ + deleteVariable(response) { + return __async(this, null, function* () { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("204", response.httpStatusCode)) { + return; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Invalid request.", body, response.headers); + } + if (isCodeInRange("401", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unexpected error", body, response.headers); + } + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "void", + "" + ); + return body; + } + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", yield response.getBodyAsAny(), response.headers); + }); + } + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to deleteVariables + * @throws ApiException if the response code was not in [200, 299] + */ + deleteVariables(response) { + return __async(this, null, function* () { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("204", response.httpStatusCode)) { + return; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Invalid request.", body, response.headers); + } + if (isCodeInRange("401", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unexpected error", body, response.headers); + } + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "void", + "" + ); + return body; + } + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", yield response.getBodyAsAny(), response.headers); + }); + } + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to deleteWebhookConfigurations + * @throws ApiException if the response code was not in [200, 299] + */ + deleteWebhookConfigurations(response) { + return __async(this, null, function* () { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("200", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "WebhookDeleteResponse", + "" + ); + return body; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Invalid request.", body, response.headers); + } + if (isCodeInRange("401", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unexpected error", body, response.headers); + } + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "WebhookDeleteResponse", + "" + ); + return body; + } + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", yield response.getBodyAsAny(), response.headers); + }); + } + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to deployCommit + * @throws ApiException if the response code was not in [200, 299] + */ + deployCommit(response) { + return __async(this, null, function* () { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("200", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "Array", + "" + ); + return body; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Invalid request.", body, response.headers); + } + if (isCodeInRange("401", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unexpected error", body, response.headers); + } + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "Array", + "" + ); + return body; + } + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", yield response.getBodyAsAny(), response.headers); + }); + } + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to downloadConnectionMetadataChanges + * @throws ApiException if the response code was not in [200, 299] + */ + downloadConnectionMetadataChanges(response) { + return __async(this, null, function* () { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("200", response.httpStatusCode)) { + const body = yield response.getBodyAsFile(); + return body; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "binary" + ); + throw new ApiException(response.httpStatusCode, "Invalid request.", body, response.headers); + } + if (isCodeInRange("401", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "binary" + ); + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "binary" + ); + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "binary" + ); + throw new ApiException(response.httpStatusCode, "Unexpected error", body, response.headers); + } + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "HttpFile", + "binary" + ); + return body; + } + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", yield response.getBodyAsAny(), response.headers); + }); + } + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to exportAnswerReport + * @throws ApiException if the response code was not in [200, 299] + */ + exportAnswerReport(response) { + return __async(this, null, function* () { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("200", response.httpStatusCode)) { + const body = yield response.getBodyAsFile(); + return body; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "binary" + ); + throw new ApiException(response.httpStatusCode, "Invalid request.", body, response.headers); + } + if (isCodeInRange("401", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "binary" + ); + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "binary" + ); + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "binary" + ); + throw new ApiException(response.httpStatusCode, "Unexpected error", body, response.headers); + } + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "HttpFile", + "binary" + ); + return body; + } + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", yield response.getBodyAsAny(), response.headers); + }); + } + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to exportLiveboardReport + * @throws ApiException if the response code was not in [200, 299] + */ + exportLiveboardReport(response) { + return __async(this, null, function* () { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("200", response.httpStatusCode)) { + const body = yield response.getBodyAsFile(); + return body; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "binary" + ); + throw new ApiException(response.httpStatusCode, "Invalid request.", body, response.headers); + } + if (isCodeInRange("401", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "binary" + ); + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "binary" + ); + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "binary" + ); + throw new ApiException(response.httpStatusCode, "Unexpected error", body, response.headers); + } + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "HttpFile", + "binary" + ); + return body; + } + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", yield response.getBodyAsAny(), response.headers); + }); + } + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to exportMetadataTML + * @throws ApiException if the response code was not in [200, 299] + */ + exportMetadataTML(response) { + return __async(this, null, function* () { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("200", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "Array", + "" + ); + return body; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Invalid request.", body, response.headers); + } + if (isCodeInRange("401", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unexpected error", body, response.headers); + } + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "Array", + "" + ); + return body; + } + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", yield response.getBodyAsAny(), response.headers); + }); + } + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to exportMetadataTMLBatched + * @throws ApiException if the response code was not in [200, 299] + */ + exportMetadataTMLBatched(response) { + return __async(this, null, function* () { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("200", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "any", + "" + ); + return body; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Invalid request.", body, response.headers); + } + if (isCodeInRange("401", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unexpected error", body, response.headers); + } + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "any", + "" + ); + return body; + } + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", yield response.getBodyAsAny(), response.headers); + }); + } + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to fetchAnswerData + * @throws ApiException if the response code was not in [200, 299] + */ + fetchAnswerData(response) { + return __async(this, null, function* () { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("200", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "AnswerDataResponse", + "" + ); + return body; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Invalid request.", body, response.headers); + } + if (isCodeInRange("401", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unexpected error", body, response.headers); + } + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "AnswerDataResponse", + "" + ); + return body; + } + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", yield response.getBodyAsAny(), response.headers); + }); + } + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to fetchAnswerSqlQuery + * @throws ApiException if the response code was not in [200, 299] + */ + fetchAnswerSqlQuery(response) { + return __async(this, null, function* () { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("200", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "SqlQueryResponse", + "" + ); + return body; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Invalid request.", body, response.headers); + } + if (isCodeInRange("401", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unexpected error", body, response.headers); + } + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "SqlQueryResponse", + "" + ); + return body; + } + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", yield response.getBodyAsAny(), response.headers); + }); + } + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to fetchAsyncImportTaskStatus + * @throws ApiException if the response code was not in [200, 299] + */ + fetchAsyncImportTaskStatus(response) { + return __async(this, null, function* () { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("200", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "GetAsyncImportStatusResponse", + "" + ); + return body; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Invalid request.", body, response.headers); + } + if (isCodeInRange("401", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unexpected error", body, response.headers); + } + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "GetAsyncImportStatusResponse", + "" + ); + return body; + } + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", yield response.getBodyAsAny(), response.headers); + }); + } + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to fetchColumnSecurityRules + * @throws ApiException if the response code was not in [200, 299] + */ + fetchColumnSecurityRules(response) { + return __async(this, null, function* () { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("200", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "Array", + "" + ); + return body; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Bad request - Table not found or invalid parameters", body, response.headers); + } + if (isCodeInRange("401", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Forbidden - User doesn't have permission to access security rules for this table", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Internal server error", body, response.headers); + } + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "Array", + "" + ); + return body; + } + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", yield response.getBodyAsAny(), response.headers); + }); + } + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to fetchConnectionDiffStatus + * @throws ApiException if the response code was not in [200, 299] + */ + fetchConnectionDiffStatus(response) { + return __async(this, null, function* () { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("200", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "FetchConnectionDiffStatusResponse", + "" + ); + return body; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Invalid request.", body, response.headers); + } + if (isCodeInRange("401", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unexpected error", body, response.headers); + } + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "FetchConnectionDiffStatusResponse", + "" + ); + return body; + } + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", yield response.getBodyAsAny(), response.headers); + }); + } + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to fetchLiveboardData + * @throws ApiException if the response code was not in [200, 299] + */ + fetchLiveboardData(response) { + return __async(this, null, function* () { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("200", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "LiveboardDataResponse", + "" + ); + return body; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Invalid request.", body, response.headers); + } + if (isCodeInRange("401", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unexpected error", body, response.headers); + } + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "LiveboardDataResponse", + "" + ); + return body; + } + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", yield response.getBodyAsAny(), response.headers); + }); + } + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to fetchLiveboardSqlQuery + * @throws ApiException if the response code was not in [200, 299] + */ + fetchLiveboardSqlQuery(response) { + return __async(this, null, function* () { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("200", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "SqlQueryResponse", + "" + ); + return body; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Invalid request.", body, response.headers); + } + if (isCodeInRange("401", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unexpected error", body, response.headers); + } + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "SqlQueryResponse", + "" + ); + return body; + } + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", yield response.getBodyAsAny(), response.headers); + }); + } + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to fetchLogs + * @throws ApiException if the response code was not in [200, 299] + */ + fetchLogs(response) { + return __async(this, null, function* () { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("200", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "Array", + "" + ); + return body; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Invalid request.", body, response.headers); + } + if (isCodeInRange("401", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unexpected error", body, response.headers); + } + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "Array", + "" + ); + return body; + } + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", yield response.getBodyAsAny(), response.headers); + }); + } + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to fetchObjectPrivileges + * @throws ApiException if the response code was not in [200, 299] + */ + fetchObjectPrivileges(response) { + return __async(this, null, function* () { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("200", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ObjectPrivilegesOfMetadataResponse", + "" + ); + return body; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Invalid request.", body, response.headers); + } + if (isCodeInRange("401", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unexpected error", body, response.headers); + } + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ObjectPrivilegesOfMetadataResponse", + "" + ); + return body; + } + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", yield response.getBodyAsAny(), response.headers); + }); + } + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to fetchPermissionsOfPrincipals + * @throws ApiException if the response code was not in [200, 299] + */ + fetchPermissionsOfPrincipals(response) { + return __async(this, null, function* () { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("200", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "PermissionOfPrincipalsResponse", + "" + ); + return body; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Invalid request.", body, response.headers); + } + if (isCodeInRange("401", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unexpected error", body, response.headers); + } + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "PermissionOfPrincipalsResponse", + "" + ); + return body; + } + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", yield response.getBodyAsAny(), response.headers); + }); + } + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to fetchPermissionsOnMetadata + * @throws ApiException if the response code was not in [200, 299] + */ + fetchPermissionsOnMetadata(response) { + return __async(this, null, function* () { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("200", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "PermissionOfMetadataResponse", + "" + ); + return body; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Invalid request.", body, response.headers); + } + if (isCodeInRange("401", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unexpected error", body, response.headers); + } + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "PermissionOfMetadataResponse", + "" + ); + return body; + } + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", yield response.getBodyAsAny(), response.headers); + }); + } + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to forceLogoutUsers + * @throws ApiException if the response code was not in [200, 299] + */ + forceLogoutUsers(response) { + return __async(this, null, function* () { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("204", response.httpStatusCode)) { + return; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Invalid request.", body, response.headers); + } + if (isCodeInRange("401", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unexpected error", body, response.headers); + } + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "void", + "" + ); + return body; + } + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", yield response.getBodyAsAny(), response.headers); + }); + } + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to generateCSV + * @throws ApiException if the response code was not in [200, 299] + */ + generateCSV(response) { + return __async(this, null, function* () { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("200", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "any", + "" + ); + return body; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Invalid request.", body, response.headers); + } + if (isCodeInRange("401", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unexpected error", body, response.headers); + } + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "any", + "" + ); + return body; + } + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", yield response.getBodyAsAny(), response.headers); + }); + } + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to getCurrentUserInfo + * @throws ApiException if the response code was not in [200, 299] + */ + getCurrentUserInfo(response) { + return __async(this, null, function* () { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("200", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "User", + "" + ); + return body; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Invalid request.", body, response.headers); + } + if (isCodeInRange("401", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unexpected error", body, response.headers); + } + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "User", + "" + ); + return body; + } + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", yield response.getBodyAsAny(), response.headers); + }); + } + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to getCurrentUserToken + * @throws ApiException if the response code was not in [200, 299] + */ + getCurrentUserToken(response) { + return __async(this, null, function* () { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("200", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "GetTokenResponse", + "" + ); + return body; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Invalid request.", body, response.headers); + } + if (isCodeInRange("401", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unexpected error", body, response.headers); + } + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "GetTokenResponse", + "" + ); + return body; + } + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", yield response.getBodyAsAny(), response.headers); + }); + } + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to getCustomAccessToken + * @throws ApiException if the response code was not in [200, 299] + */ + getCustomAccessToken(response) { + return __async(this, null, function* () { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("200", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "AccessToken", + "" + ); + return body; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Invalid request. This could be due to missing or incorrect parameters.", body, response.headers); + } + if (isCodeInRange("401", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unauthorized access. The request could not be authenticated.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Forbidden access. The user does not have permission to access this resource.", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "An unexpected error occurred on the server.", body, response.headers); + } + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "AccessToken", + "" + ); + return body; + } + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", yield response.getBodyAsAny(), response.headers); + }); + } + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to getDataSourceSuggestions + * @throws ApiException if the response code was not in [200, 299] + */ + getDataSourceSuggestions(response) { + return __async(this, null, function* () { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("200", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "EurekaDataSourceSuggestionResponse", + "" + ); + return body; + } + if (isCodeInRange("201", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "EurekaDataSourceSuggestionResponse", + "" + ); + return body; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Operation failed", body, response.headers); + } + if (isCodeInRange("401", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Operation failed", body, response.headers); + } + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "EurekaDataSourceSuggestionResponse", + "" + ); + return body; + } + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", yield response.getBodyAsAny(), response.headers); + }); + } + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to getFullAccessToken + * @throws ApiException if the response code was not in [200, 299] + */ + getFullAccessToken(response) { + return __async(this, null, function* () { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("200", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "Token", + "" + ); + return body; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Invalid request.", body, response.headers); + } + if (isCodeInRange("401", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unexpected error", body, response.headers); + } + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "Token", + "" + ); + return body; + } + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", yield response.getBodyAsAny(), response.headers); + }); + } + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to getNLInstructions + * @throws ApiException if the response code was not in [200, 299] + */ + getNLInstructions(response) { + return __async(this, null, function* () { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("200", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "EurekaGetNLInstructionsResponse", + "" + ); + return body; + } + if (isCodeInRange("201", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "EurekaGetNLInstructionsResponse", + "" + ); + return body; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Operation failed", body, response.headers); + } + if (isCodeInRange("401", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Operation failed", body, response.headers); + } + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "EurekaGetNLInstructionsResponse", + "" + ); + return body; + } + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", yield response.getBodyAsAny(), response.headers); + }); + } + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to getObjectAccessToken + * @throws ApiException if the response code was not in [200, 299] + */ + getObjectAccessToken(response) { + return __async(this, null, function* () { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("200", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "Token", + "" + ); + return body; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Invalid request.", body, response.headers); + } + if (isCodeInRange("401", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unexpected error", body, response.headers); + } + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "Token", + "" + ); + return body; + } + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", yield response.getBodyAsAny(), response.headers); + }); + } + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to getRelevantQuestions + * @throws ApiException if the response code was not in [200, 299] + */ + getRelevantQuestions(response) { + return __async(this, null, function* () { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("200", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "EurekaGetRelevantQuestionsResponse", + "" + ); + return body; + } + if (isCodeInRange("201", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "EurekaGetRelevantQuestionsResponse", + "" + ); + return body; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Operation failed", body, response.headers); + } + if (isCodeInRange("401", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Operation failed", body, response.headers); + } + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "EurekaGetRelevantQuestionsResponse", + "" + ); + return body; + } + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", yield response.getBodyAsAny(), response.headers); + }); + } + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to getSystemConfig + * @throws ApiException if the response code was not in [200, 299] + */ + getSystemConfig(response) { + return __async(this, null, function* () { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("200", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "SystemConfig", + "" + ); + return body; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Invalid request.", body, response.headers); + } + if (isCodeInRange("401", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unexpected error", body, response.headers); + } + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "SystemConfig", + "" + ); + return body; + } + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", yield response.getBodyAsAny(), response.headers); + }); + } + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to getSystemInformation + * @throws ApiException if the response code was not in [200, 299] + */ + getSystemInformation(response) { + return __async(this, null, function* () { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("200", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "SystemInfo", + "" + ); + return body; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Invalid request.", body, response.headers); + } + if (isCodeInRange("401", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unexpected error", body, response.headers); + } + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "SystemInfo", + "" + ); + return body; + } + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", yield response.getBodyAsAny(), response.headers); + }); + } + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to getSystemOverrideInfo + * @throws ApiException if the response code was not in [200, 299] + */ + getSystemOverrideInfo(response) { + return __async(this, null, function* () { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("200", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "SystemOverrideInfo", + "" + ); + return body; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Invalid request.", body, response.headers); + } + if (isCodeInRange("401", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unexpected error", body, response.headers); + } + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "SystemOverrideInfo", + "" + ); + return body; + } + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", yield response.getBodyAsAny(), response.headers); + }); + } + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to importMetadataTML + * @throws ApiException if the response code was not in [200, 299] + */ + importMetadataTML(response) { + return __async(this, null, function* () { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("200", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "Array", + "" + ); + return body; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Invalid request.", body, response.headers); + } + if (isCodeInRange("401", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unexpected error", body, response.headers); + } + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "Array", + "" + ); + return body; + } + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", yield response.getBodyAsAny(), response.headers); + }); + } + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to importMetadataTMLAsync + * @throws ApiException if the response code was not in [200, 299] + */ + importMetadataTMLAsync(response) { + return __async(this, null, function* () { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("200", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ImportEPackAsyncTaskStatus", + "" + ); + return body; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Invalid request.", body, response.headers); + } + if (isCodeInRange("401", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unexpected error", body, response.headers); + } + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ImportEPackAsyncTaskStatus", + "" + ); + return body; + } + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", yield response.getBodyAsAny(), response.headers); + }); + } + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to importUserGroups + * @throws ApiException if the response code was not in [200, 299] + */ + importUserGroups(response) { + return __async(this, null, function* () { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("200", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ImportUserGroupsResponse", + "" + ); + return body; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Invalid request.", body, response.headers); + } + if (isCodeInRange("401", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unexpected error", body, response.headers); + } + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ImportUserGroupsResponse", + "" + ); + return body; + } + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", yield response.getBodyAsAny(), response.headers); + }); + } + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to importUsers + * @throws ApiException if the response code was not in [200, 299] + */ + importUsers(response) { + return __async(this, null, function* () { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("200", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ImportUsersResponse", + "" + ); + return body; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Invalid request.", body, response.headers); + } + if (isCodeInRange("401", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unexpected error", body, response.headers); + } + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ImportUsersResponse", + "" + ); + return body; + } + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", yield response.getBodyAsAny(), response.headers); + }); + } + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to login + * @throws ApiException if the response code was not in [200, 299] + */ + login(response) { + return __async(this, null, function* () { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("204", response.httpStatusCode)) { + return; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Invalid request.", body, response.headers); + } + if (isCodeInRange("401", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unexpected error", body, response.headers); + } + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "void", + "" + ); + return body; + } + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", yield response.getBodyAsAny(), response.headers); + }); + } + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to logout + * @throws ApiException if the response code was not in [200, 299] + */ + logout(response) { + return __async(this, null, function* () { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("204", response.httpStatusCode)) { + return; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Invalid request.", body, response.headers); + } + if (isCodeInRange("401", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unexpected error", body, response.headers); + } + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "void", + "" + ); + return body; + } + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", yield response.getBodyAsAny(), response.headers); + }); + } + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to manageObjectPrivilege + * @throws ApiException if the response code was not in [200, 299] + */ + manageObjectPrivilege(response) { + return __async(this, null, function* () { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("204", response.httpStatusCode)) { + return; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Invalid request", body, response.headers); + } + if (isCodeInRange("401", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unauthorized access", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Forbidden access", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unexpected error", body, response.headers); + } + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "void", + "" + ); + return body; + } + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", yield response.getBodyAsAny(), response.headers); + }); + } + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to parameterizeMetadata + * @throws ApiException if the response code was not in [200, 299] + */ + parameterizeMetadata(response) { + return __async(this, null, function* () { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("204", response.httpStatusCode)) { + return; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Invalid request.", body, response.headers); + } + if (isCodeInRange("401", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unexpected error", body, response.headers); + } + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "void", + "" + ); + return body; + } + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", yield response.getBodyAsAny(), response.headers); + }); + } + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to parameterizeMetadataFields + * @throws ApiException if the response code was not in [200, 299] + */ + parameterizeMetadataFields(response) { + return __async(this, null, function* () { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("204", response.httpStatusCode)) { + return; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Invalid request.", body, response.headers); + } + if (isCodeInRange("401", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unexpected error", body, response.headers); + } + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "void", + "" + ); + return body; + } + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", yield response.getBodyAsAny(), response.headers); + }); + } + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to publishMetadata + * @throws ApiException if the response code was not in [200, 299] + */ + publishMetadata(response) { + return __async(this, null, function* () { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("204", response.httpStatusCode)) { + return; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Invalid request.", body, response.headers); + } + if (isCodeInRange("401", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unexpected error", body, response.headers); + } + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "void", + "" + ); + return body; + } + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", yield response.getBodyAsAny(), response.headers); + }); + } + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to putVariableValues + * @throws ApiException if the response code was not in [200, 299] + */ + putVariableValues(response) { + return __async(this, null, function* () { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("204", response.httpStatusCode)) { + return; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Invalid request.", body, response.headers); + } + if (isCodeInRange("401", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unexpected error", body, response.headers); + } + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "void", + "" + ); + return body; + } + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", yield response.getBodyAsAny(), response.headers); + }); + } + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to queryGetDecomposedQuery + * @throws ApiException if the response code was not in [200, 299] + */ + queryGetDecomposedQuery(response) { + return __async(this, null, function* () { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("200", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "EurekaDecomposeQueryResponse", + "" + ); + return body; + } + if (isCodeInRange("201", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "EurekaDecomposeQueryResponse", + "" + ); + return body; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Operation failed", body, response.headers); + } + if (isCodeInRange("401", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Operation failed", body, response.headers); + } + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "EurekaDecomposeQueryResponse", + "" + ); + return body; + } + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", yield response.getBodyAsAny(), response.headers); + }); + } + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to resetUserPassword + * @throws ApiException if the response code was not in [200, 299] + */ + resetUserPassword(response) { + return __async(this, null, function* () { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("204", response.httpStatusCode)) { + return; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Invalid request.", body, response.headers); + } + if (isCodeInRange("401", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unexpected error", body, response.headers); + } + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "void", + "" + ); + return body; + } + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", yield response.getBodyAsAny(), response.headers); + }); + } + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to revertCommit + * @throws ApiException if the response code was not in [200, 299] + */ + revertCommit(response) { + return __async(this, null, function* () { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("200", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "RevertResponse", + "" + ); + return body; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Invalid request.", body, response.headers); + } + if (isCodeInRange("401", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unexpected error", body, response.headers); + } + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "RevertResponse", + "" + ); + return body; + } + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", yield response.getBodyAsAny(), response.headers); + }); + } + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to revokeRefreshTokens + * @throws ApiException if the response code was not in [200, 299] + */ + revokeRefreshTokens(response) { + return __async(this, null, function* () { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("200", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "RevokeRefreshTokensResponse", + "" + ); + return body; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Invalid request.", body, response.headers); + } + if (isCodeInRange("401", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } + if (isCodeInRange("404", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Object not found", body, response.headers); + } + if (isCodeInRange("409", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Conflict", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unexpected error", body, response.headers); + } + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "RevokeRefreshTokensResponse", + "" + ); + return body; + } + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", yield response.getBodyAsAny(), response.headers); + }); + } + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to revokeToken + * @throws ApiException if the response code was not in [200, 299] + */ + revokeToken(response) { + return __async(this, null, function* () { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("204", response.httpStatusCode)) { + return; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Invalid request.", body, response.headers); + } + if (isCodeInRange("401", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unexpected error", body, response.headers); + } + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "void", + "" + ); + return body; + } + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", yield response.getBodyAsAny(), response.headers); + }); + } + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to searchAuthSettings + * @throws ApiException if the response code was not in [200, 299] + */ + searchAuthSettings(response) { + return __async(this, null, function* () { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("200", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "SearchAuthSettingsResponse", + "" + ); + return body; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Invalid request.", body, response.headers); + } + if (isCodeInRange("401", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unexpected error", body, response.headers); + } + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "SearchAuthSettingsResponse", + "" + ); + return body; + } + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", yield response.getBodyAsAny(), response.headers); + }); + } + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to searchCalendars + * @throws ApiException if the response code was not in [200, 299] + */ + searchCalendars(response) { + return __async(this, null, function* () { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("200", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "Array", + "" + ); + return body; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Invalid request.", body, response.headers); + } + if (isCodeInRange("401", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unexpected error", body, response.headers); + } + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "Array", + "" + ); + return body; + } + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", yield response.getBodyAsAny(), response.headers); + }); + } + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to searchChannelHistory + * @throws ApiException if the response code was not in [200, 299] + */ + searchChannelHistory(response) { + return __async(this, null, function* () { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("200", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "SearchChannelHistoryResponse", + "" + ); + return body; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Invalid request.", body, response.headers); + } + if (isCodeInRange("401", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unexpected error", body, response.headers); + } + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "SearchChannelHistoryResponse", + "" + ); + return body; + } + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", yield response.getBodyAsAny(), response.headers); + }); + } + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to searchCollections + * @throws ApiException if the response code was not in [200, 299] + */ + searchCollections(response) { + return __async(this, null, function* () { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("200", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "CollectionSearchResponse", + "" + ); + return body; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Invalid request.", body, response.headers); + } + if (isCodeInRange("401", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unexpected error", body, response.headers); + } + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "CollectionSearchResponse", + "" + ); + return body; + } + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", yield response.getBodyAsAny(), response.headers); + }); + } + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to searchCommits + * @throws ApiException if the response code was not in [200, 299] + */ + searchCommits(response) { + return __async(this, null, function* () { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("200", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "Array", + "" + ); + return body; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Invalid request.", body, response.headers); + } + if (isCodeInRange("401", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unexpected error", body, response.headers); + } + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "Array", + "" + ); + return body; + } + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", yield response.getBodyAsAny(), response.headers); + }); + } + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to searchCommunicationChannelPreferences + * @throws ApiException if the response code was not in [200, 299] + */ + searchCommunicationChannelPreferences(response) { + return __async(this, null, function* () { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("200", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "CommunicationChannelPreferencesResponse", + "" + ); + return body; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Invalid request.", body, response.headers); + } + if (isCodeInRange("401", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unexpected error", body, response.headers); + } + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "CommunicationChannelPreferencesResponse", + "" + ); + return body; + } + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", yield response.getBodyAsAny(), response.headers); + }); + } + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to searchConfig + * @throws ApiException if the response code was not in [200, 299] + */ + searchConfig(response) { + return __async(this, null, function* () { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("200", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "Array", + "" + ); + return body; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Invalid request.", body, response.headers); + } + if (isCodeInRange("401", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unexpected error", body, response.headers); + } + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "Array", + "" + ); + return body; + } + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", yield response.getBodyAsAny(), response.headers); + }); + } + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to searchConnection + * @throws ApiException if the response code was not in [200, 299] + */ + searchConnection(response) { + return __async(this, null, function* () { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("200", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "Array", + "" + ); + return body; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Invalid request.", body, response.headers); + } + if (isCodeInRange("401", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unexpected error", body, response.headers); + } + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "Array", + "" + ); + return body; + } + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", yield response.getBodyAsAny(), response.headers); + }); + } + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to searchCustomActions + * @throws ApiException if the response code was not in [200, 299] + */ + searchCustomActions(response) { + return __async(this, null, function* () { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("200", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "Array", + "" + ); + return body; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Invalid request.", body, response.headers); + } + if (isCodeInRange("401", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unexpected error", body, response.headers); + } + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "Array", + "" + ); + return body; + } + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", yield response.getBodyAsAny(), response.headers); + }); + } + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to searchData + * @throws ApiException if the response code was not in [200, 299] + */ + searchData(response) { + return __async(this, null, function* () { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("200", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "SearchDataResponse", + "" + ); + return body; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Invalid request.", body, response.headers); + } + if (isCodeInRange("401", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unexpected error", body, response.headers); + } + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "SearchDataResponse", + "" + ); + return body; + } + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", yield response.getBodyAsAny(), response.headers); + }); + } + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to searchEmailCustomization + * @throws ApiException if the response code was not in [200, 299] + */ + searchEmailCustomization(response) { + return __async(this, null, function* () { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("200", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "Array", + "" + ); + return body; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Invalid request.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unexpected error", body, response.headers); + } + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "Array", + "" + ); + return body; + } + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", yield response.getBodyAsAny(), response.headers); + }); + } + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to searchMetadata + * @throws ApiException if the response code was not in [200, 299] + */ + searchMetadata(response) { + return __async(this, null, function* () { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("200", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "Array", + "" + ); + return body; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Invalid request.", body, response.headers); + } + if (isCodeInRange("401", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unexpected error", body, response.headers); + } + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "Array", + "" + ); + return body; + } + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", yield response.getBodyAsAny(), response.headers); + }); + } + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to searchOrgs + * @throws ApiException if the response code was not in [200, 299] + */ + searchOrgs(response) { + return __async(this, null, function* () { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("200", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "Array", + "" + ); + return body; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Invalid request.", body, response.headers); + } + if (isCodeInRange("401", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unexpected error", body, response.headers); + } + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "Array", + "" + ); + return body; + } + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", yield response.getBodyAsAny(), response.headers); + }); + } + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to searchRoles + * @throws ApiException if the response code was not in [200, 299] + */ + searchRoles(response) { + return __async(this, null, function* () { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("200", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "Array", + "" + ); + return body; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Invalid request.", body, response.headers); + } + if (isCodeInRange("401", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Internal error", body, response.headers); + } + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "Array", + "" + ); + return body; + } + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", yield response.getBodyAsAny(), response.headers); + }); + } + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to searchSchedules + * @throws ApiException if the response code was not in [200, 299] + */ + searchSchedules(response) { + return __async(this, null, function* () { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("200", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "Array", + "" + ); + return body; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Invalid request.", body, response.headers); + } + if (isCodeInRange("401", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unexpected error", body, response.headers); + } + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "Array", + "" + ); + return body; + } + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", yield response.getBodyAsAny(), response.headers); + }); + } + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to searchSecuritySettings + * @throws ApiException if the response code was not in [200, 299] + */ + searchSecuritySettings(response) { + return __async(this, null, function* () { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("200", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "SecuritySettingsResponse", + "" + ); + return body; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Invalid request.", body, response.headers); + } + if (isCodeInRange("401", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unexpected error", body, response.headers); + } + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "SecuritySettingsResponse", + "" + ); + return body; + } + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", yield response.getBodyAsAny(), response.headers); + }); + } + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to searchTags + * @throws ApiException if the response code was not in [200, 299] + */ + searchTags(response) { + return __async(this, null, function* () { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("200", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "Array", + "" + ); + return body; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Invalid request.", body, response.headers); + } + if (isCodeInRange("401", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unexpected error", body, response.headers); + } + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "Array", + "" + ); + return body; + } + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", yield response.getBodyAsAny(), response.headers); + }); + } + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to searchUserGroups + * @throws ApiException if the response code was not in [200, 299] + */ + searchUserGroups(response) { + return __async(this, null, function* () { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("200", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "Array", + "" + ); + return body; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Invalid request.", body, response.headers); + } + if (isCodeInRange("401", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unexpected error", body, response.headers); + } + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "Array", + "" + ); + return body; + } + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", yield response.getBodyAsAny(), response.headers); + }); + } + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to searchUsers + * @throws ApiException if the response code was not in [200, 299] + */ + searchUsers(response) { + return __async(this, null, function* () { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("200", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "Array", + "" + ); + return body; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Invalid request.", body, response.headers); + } + if (isCodeInRange("401", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unexpected error", body, response.headers); + } + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "Array", + "" + ); + return body; + } + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", yield response.getBodyAsAny(), response.headers); + }); + } + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to searchVariables + * @throws ApiException if the response code was not in [200, 299] + */ + searchVariables(response) { + return __async(this, null, function* () { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("200", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "Array", + "" + ); + return body; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Invalid request.", body, response.headers); + } + if (isCodeInRange("401", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unexpected error", body, response.headers); + } + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "Array", + "" + ); + return body; + } + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", yield response.getBodyAsAny(), response.headers); + }); + } + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to searchWebhookConfigurations + * @throws ApiException if the response code was not in [200, 299] + */ + searchWebhookConfigurations(response) { + return __async(this, null, function* () { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("200", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "WebhookSearchResponse", + "" + ); + return body; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Invalid request.", body, response.headers); + } + if (isCodeInRange("401", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unexpected error", body, response.headers); + } + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "WebhookSearchResponse", + "" + ); + return body; + } + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", yield response.getBodyAsAny(), response.headers); + }); + } + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to sendAgentConversationMessage + * @throws ApiException if the response code was not in [200, 299] + */ + sendAgentConversationMessage(response) { + return __async(this, null, function* () { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("200", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "any", + "" + ); + return body; + } + if (isCodeInRange("201", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "any", + "" + ); + return body; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Operation failed", body, response.headers); + } + if (isCodeInRange("401", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Operation failed", body, response.headers); + } + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "any", + "" + ); + return body; + } + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", yield response.getBodyAsAny(), response.headers); + }); + } + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to sendAgentConversationMessageStreaming + * @throws ApiException if the response code was not in [200, 299] + */ + sendAgentConversationMessageStreaming(response) { + return __async(this, null, function* () { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("200", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "SendAgentMessageResponse", + "" + ); + return body; + } + if (isCodeInRange("201", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "SendAgentMessageResponse", + "" + ); + return body; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Operation failed", body, response.headers); + } + if (isCodeInRange("401", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Operation failed", body, response.headers); + } + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "SendAgentMessageResponse", + "" + ); + return body; + } + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", yield response.getBodyAsAny(), response.headers); + }); + } + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to sendAgentMessage + * @throws ApiException if the response code was not in [200, 299] + */ + sendAgentMessage(response) { + return __async(this, null, function* () { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("200", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "any", + "" + ); + return body; + } + if (isCodeInRange("201", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "any", + "" + ); + return body; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Operation failed", body, response.headers); + } + if (isCodeInRange("401", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Operation failed", body, response.headers); + } + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "any", + "" + ); + return body; + } + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", yield response.getBodyAsAny(), response.headers); + }); + } + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to sendAgentMessageStreaming + * @throws ApiException if the response code was not in [200, 299] + */ + sendAgentMessageStreaming(response) { + return __async(this, null, function* () { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("200", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "SendAgentMessageResponse", + "" + ); + return body; + } + if (isCodeInRange("201", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "SendAgentMessageResponse", + "" + ); + return body; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Operation failed", body, response.headers); + } + if (isCodeInRange("401", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Operation failed", body, response.headers); + } + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "SendAgentMessageResponse", + "" + ); + return body; + } + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", yield response.getBodyAsAny(), response.headers); + }); + } + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to sendMessage + * @throws ApiException if the response code was not in [200, 299] + */ + sendMessage(response) { + return __async(this, null, function* () { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("200", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "Array", + "" + ); + return body; + } + if (isCodeInRange("201", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "Array", + "" + ); + return body; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Operation failed", body, response.headers); + } + if (isCodeInRange("401", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Operation failed", body, response.headers); + } + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "Array", + "" + ); + return body; + } + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", yield response.getBodyAsAny(), response.headers); + }); + } + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to setNLInstructions + * @throws ApiException if the response code was not in [200, 299] + */ + setNLInstructions(response) { + return __async(this, null, function* () { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("200", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "EurekaSetNLInstructionsResponse", + "" + ); + return body; + } + if (isCodeInRange("201", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "EurekaSetNLInstructionsResponse", + "" + ); + return body; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Operation failed", body, response.headers); + } + if (isCodeInRange("401", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Operation failed", body, response.headers); + } + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "EurekaSetNLInstructionsResponse", + "" + ); + return body; + } + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", yield response.getBodyAsAny(), response.headers); + }); + } + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to shareMetadata + * @throws ApiException if the response code was not in [200, 299] + */ + shareMetadata(response) { + return __async(this, null, function* () { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("204", response.httpStatusCode)) { + return; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Invalid request.", body, response.headers); + } + if (isCodeInRange("401", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unexpected error", body, response.headers); + } + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "void", + "" + ); + return body; + } + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", yield response.getBodyAsAny(), response.headers); + }); + } + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to singleAnswer + * @throws ApiException if the response code was not in [200, 299] + */ + singleAnswer(response) { + return __async(this, null, function* () { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("200", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ResponseMessage", + "" + ); + return body; + } + if (isCodeInRange("201", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ResponseMessage", + "" + ); + return body; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Operation failed", body, response.headers); + } + if (isCodeInRange("401", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Operation failed", body, response.headers); + } + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ResponseMessage", + "" + ); + return body; + } + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", yield response.getBodyAsAny(), response.headers); + }); + } + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to stopConversation + * @throws ApiException if the response code was not in [200, 299] + */ + stopConversation(response) { + return __async(this, null, function* () { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("204", response.httpStatusCode)) { + return; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Operation failed", body, response.headers); + } + if (isCodeInRange("401", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Operation failed", body, response.headers); + } + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "void", + "" + ); + return body; + } + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", yield response.getBodyAsAny(), response.headers); + }); + } + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to syncMetadata + * @throws ApiException if the response code was not in [200, 299] + */ + syncMetadata(response) { + return __async(this, null, function* () { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("200", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "SyncMetadataResponse", + "" + ); + return body; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Invalid request parameters or hierarchy.", body, response.headers); + } + if (isCodeInRange("401", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } + if (isCodeInRange("404", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Connection, table, or column not found.", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unexpected error", body, response.headers); + } + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "SyncMetadataResponse", + "" + ); + return body; + } + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", yield response.getBodyAsAny(), response.headers); + }); + } + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to unassignTag + * @throws ApiException if the response code was not in [200, 299] + */ + unassignTag(response) { + return __async(this, null, function* () { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("204", response.httpStatusCode)) { + return; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Invalid request.", body, response.headers); + } + if (isCodeInRange("401", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unexpected error", body, response.headers); + } + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "void", + "" + ); + return body; + } + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", yield response.getBodyAsAny(), response.headers); + }); + } + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to unparameterizeMetadata + * @throws ApiException if the response code was not in [200, 299] + */ + unparameterizeMetadata(response) { + return __async(this, null, function* () { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("204", response.httpStatusCode)) { + return; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Invalid request.", body, response.headers); + } + if (isCodeInRange("401", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unexpected error", body, response.headers); + } + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "void", + "" + ); + return body; + } + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", yield response.getBodyAsAny(), response.headers); + }); + } + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to unpublishMetadata + * @throws ApiException if the response code was not in [200, 299] + */ + unpublishMetadata(response) { + return __async(this, null, function* () { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("204", response.httpStatusCode)) { + return; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Invalid request.", body, response.headers); + } + if (isCodeInRange("401", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unexpected error", body, response.headers); + } + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "void", + "" + ); + return body; + } + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", yield response.getBodyAsAny(), response.headers); + }); + } + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to updateCalendar + * @throws ApiException if the response code was not in [200, 299] + */ + updateCalendar(response) { + return __async(this, null, function* () { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("204", response.httpStatusCode)) { + return; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Invalid request.", body, response.headers); + } + if (isCodeInRange("401", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unexpected error", body, response.headers); + } + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "void", + "" + ); + return body; + } + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", yield response.getBodyAsAny(), response.headers); + }); + } + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to updateCollection + * @throws ApiException if the response code was not in [200, 299] + */ + updateCollection(response) { + return __async(this, null, function* () { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("204", response.httpStatusCode)) { + return; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Invalid request.", body, response.headers); + } + if (isCodeInRange("401", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } + if (isCodeInRange("404", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Resource not found.", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unexpected error", body, response.headers); + } + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "void", + "" + ); + return body; + } + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", yield response.getBodyAsAny(), response.headers); + }); + } + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to updateColumnSecurityRules + * @throws ApiException if the response code was not in [200, 299] + */ + updateColumnSecurityRules(response) { + return __async(this, null, function* () { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("204", response.httpStatusCode)) { + return; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Bad request - Invalid parameters or table not found", body, response.headers); + } + if (isCodeInRange("401", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Forbidden - User doesn't have permission to modify security rules for this table", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Internal server error", body, response.headers); + } + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "void", + "" + ); + return body; + } + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", yield response.getBodyAsAny(), response.headers); + }); + } + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to updateConfig + * @throws ApiException if the response code was not in [200, 299] + */ + updateConfig(response) { + return __async(this, null, function* () { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("200", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "RepoConfigObject", + "" + ); + return body; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Invalid request.", body, response.headers); + } + if (isCodeInRange("401", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unexpected error", body, response.headers); + } + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "RepoConfigObject", + "" + ); + return body; + } + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", yield response.getBodyAsAny(), response.headers); + }); + } + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to updateConnection + * @throws ApiException if the response code was not in [200, 299] + */ + updateConnection(response) { + return __async(this, null, function* () { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("204", response.httpStatusCode)) { + return; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Invalid request.", body, response.headers); + } + if (isCodeInRange("401", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unexpected error", body, response.headers); + } + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "void", + "" + ); + return body; + } + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", yield response.getBodyAsAny(), response.headers); + }); + } + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to updateConnectionConfiguration + * @throws ApiException if the response code was not in [200, 299] + */ + updateConnectionConfiguration(response) { + return __async(this, null, function* () { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("204", response.httpStatusCode)) { + return; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Invalid request.", body, response.headers); + } + if (isCodeInRange("401", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unexpected error", body, response.headers); + } + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "void", + "" + ); + return body; + } + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", yield response.getBodyAsAny(), response.headers); + }); + } + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to updateConnectionStatus + * @throws ApiException if the response code was not in [200, 299] + */ + updateConnectionStatus(response) { + return __async(this, null, function* () { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("204", response.httpStatusCode)) { + return; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Invalid request.", body, response.headers); + } + if (isCodeInRange("401", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } + if (isCodeInRange("404", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Object not found", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unexpected error", body, response.headers); + } + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "void", + "" + ); + return body; + } + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", yield response.getBodyAsAny(), response.headers); + }); + } + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to updateConnectionV2 + * @throws ApiException if the response code was not in [200, 299] + */ + updateConnectionV2(response) { + return __async(this, null, function* () { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("204", response.httpStatusCode)) { + return; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Invalid request.", body, response.headers); + } + if (isCodeInRange("401", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unexpected error", body, response.headers); + } + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "void", + "" + ); + return body; + } + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", yield response.getBodyAsAny(), response.headers); + }); + } + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to updateCustomAction + * @throws ApiException if the response code was not in [200, 299] + */ + updateCustomAction(response) { + return __async(this, null, function* () { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("204", response.httpStatusCode)) { + return; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Invalid request.", body, response.headers); + } + if (isCodeInRange("401", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unexpected error", body, response.headers); + } + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "void", + "" + ); + return body; + } + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", yield response.getBodyAsAny(), response.headers); + }); + } + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to updateDbtConnection + * @throws ApiException if the response code was not in [200, 299] + */ + updateDbtConnection(response) { + return __async(this, null, function* () { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("200", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "any", + "" + ); + return body; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Invalid request.", body, response.headers); + } + if (isCodeInRange("401", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unexpected error", body, response.headers); + } + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "any", + "" + ); + return body; + } + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", yield response.getBodyAsAny(), response.headers); + }); + } + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to updateEmailCustomization + * @throws ApiException if the response code was not in [200, 299] + */ + updateEmailCustomization(response) { + return __async(this, null, function* () { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("204", response.httpStatusCode)) { + return; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Invalid request.", body, response.headers); + } + if (isCodeInRange("401", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unexpected error", body, response.headers); + } + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "void", + "" + ); + return body; + } + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", yield response.getBodyAsAny(), response.headers); + }); + } + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to updateMetadataHeader + * @throws ApiException if the response code was not in [200, 299] + */ + updateMetadataHeader(response) { + return __async(this, null, function* () { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("204", response.httpStatusCode)) { + return; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Invalid request.", body, response.headers); + } + if (isCodeInRange("401", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unexpected error", body, response.headers); + } + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "void", + "" + ); + return body; + } + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", yield response.getBodyAsAny(), response.headers); + }); + } + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to updateMetadataObjId + * @throws ApiException if the response code was not in [200, 299] + */ + updateMetadataObjId(response) { + return __async(this, null, function* () { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("204", response.httpStatusCode)) { + return; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Invalid request.", body, response.headers); + } + if (isCodeInRange("401", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unexpected error", body, response.headers); + } + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "void", + "" + ); + return body; + } + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", yield response.getBodyAsAny(), response.headers); + }); + } + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to updateOrg + * @throws ApiException if the response code was not in [200, 299] + */ + updateOrg(response) { + return __async(this, null, function* () { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("204", response.httpStatusCode)) { + return; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Invalid request.", body, response.headers); + } + if (isCodeInRange("401", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unexpected error", body, response.headers); + } + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "void", + "" + ); + return body; + } + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", yield response.getBodyAsAny(), response.headers); + }); + } + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to updateRole + * @throws ApiException if the response code was not in [200, 299] + */ + updateRole(response) { + return __async(this, null, function* () { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("200", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "RoleResponse", + "" + ); + return body; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Invalid request.", body, response.headers); + } + if (isCodeInRange("401", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unexpected error", body, response.headers); + } + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "RoleResponse", + "" + ); + return body; + } + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", yield response.getBodyAsAny(), response.headers); + }); + } + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to updateSchedule + * @throws ApiException if the response code was not in [200, 299] + */ + updateSchedule(response) { + return __async(this, null, function* () { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("204", response.httpStatusCode)) { + return; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Invalid request.", body, response.headers); + } + if (isCodeInRange("401", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unexpected error", body, response.headers); + } + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "void", + "" + ); + return body; + } + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", yield response.getBodyAsAny(), response.headers); + }); + } + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to updateSystemConfig + * @throws ApiException if the response code was not in [200, 299] + */ + updateSystemConfig(response) { + return __async(this, null, function* () { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("204", response.httpStatusCode)) { + return; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Invalid request.", body, response.headers); + } + if (isCodeInRange("401", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unexpected error", body, response.headers); + } + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "void", + "" + ); + return body; + } + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", yield response.getBodyAsAny(), response.headers); + }); + } + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to updateTag + * @throws ApiException if the response code was not in [200, 299] + */ + updateTag(response) { + return __async(this, null, function* () { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("204", response.httpStatusCode)) { + return; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Invalid request.", body, response.headers); + } + if (isCodeInRange("401", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unexpected error", body, response.headers); + } + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "void", + "" + ); + return body; + } + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", yield response.getBodyAsAny(), response.headers); + }); + } + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to updateUser + * @throws ApiException if the response code was not in [200, 299] + */ + updateUser(response) { + return __async(this, null, function* () { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("204", response.httpStatusCode)) { + return; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Invalid request.", body, response.headers); + } + if (isCodeInRange("401", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unexpected error", body, response.headers); + } + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "void", + "" + ); + return body; + } + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", yield response.getBodyAsAny(), response.headers); + }); + } + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to updateUserGroup + * @throws ApiException if the response code was not in [200, 299] + */ + updateUserGroup(response) { + return __async(this, null, function* () { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("204", response.httpStatusCode)) { + return; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Invalid request.", body, response.headers); + } + if (isCodeInRange("401", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unexpected error", body, response.headers); + } + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "void", + "" + ); + return body; + } + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", yield response.getBodyAsAny(), response.headers); + }); + } + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to updateVariable + * @throws ApiException if the response code was not in [200, 299] + */ + updateVariable(response) { + return __async(this, null, function* () { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("204", response.httpStatusCode)) { + return; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Invalid request.", body, response.headers); + } + if (isCodeInRange("401", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unexpected error", body, response.headers); + } + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "void", + "" + ); + return body; + } + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", yield response.getBodyAsAny(), response.headers); + }); + } + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to updateVariableValues + * @throws ApiException if the response code was not in [200, 299] + */ + updateVariableValues(response) { + return __async(this, null, function* () { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("204", response.httpStatusCode)) { + return; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Invalid request.", body, response.headers); + } + if (isCodeInRange("401", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unexpected error", body, response.headers); + } + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "void", + "" + ); + return body; + } + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", yield response.getBodyAsAny(), response.headers); + }); + } + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to updateWebhookConfiguration + * @throws ApiException if the response code was not in [200, 299] + */ + updateWebhookConfiguration(response) { + return __async(this, null, function* () { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("204", response.httpStatusCode)) { + return; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Invalid request.", body, response.headers); + } + if (isCodeInRange("401", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unexpected error", body, response.headers); + } + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "void", + "" + ); + return body; + } + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", yield response.getBodyAsAny(), response.headers); + }); + } + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to validateCommunicationChannel + * @throws ApiException if the response code was not in [200, 299] + */ + validateCommunicationChannel(response) { + return __async(this, null, function* () { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("200", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "CommunicationChannelValidateResponse", + "" + ); + return body; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Invalid request.", body, response.headers); + } + if (isCodeInRange("401", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unexpected error", body, response.headers); + } + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "CommunicationChannelValidateResponse", + "" + ); + return body; + } + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", yield response.getBodyAsAny(), response.headers); + }); + } + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to validateEmailCustomization + * @throws ApiException if the response code was not in [200, 299] + */ + validateEmailCustomization(response) { + return __async(this, null, function* () { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("204", response.httpStatusCode)) { + return; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Invalid request.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unexpected error", body, response.headers); + } + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "void", + "" + ); + return body; + } + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", yield response.getBodyAsAny(), response.headers); + }); + } + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to validateMerge + * @throws ApiException if the response code was not in [200, 299] + */ + validateMerge(response) { + return __async(this, null, function* () { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("200", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "Array", + "" + ); + return body; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Invalid request.", body, response.headers); + } + if (isCodeInRange("401", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unexpected error", body, response.headers); + } + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "Array", + "" + ); + return body; + } + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", yield response.getBodyAsAny(), response.headers); + }); + } + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to validateToken + * @throws ApiException if the response code was not in [200, 299] + */ + validateToken(response) { + return __async(this, null, function* () { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("200", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "TokenValidationResponse", + "" + ); + return body; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Invalid request.", body, response.headers); + } + if (isCodeInRange("401", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unexpected error", body, response.headers); + } + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "TokenValidationResponse", + "" + ); + return body; + } + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", yield response.getBodyAsAny(), response.headers); + }); + } +}; + +// apis/UsersApi.ts +var UsersApiRequestFactory = class extends BaseAPIRequestFactory { + /** + * Version: 9.7.0.cl or later Activates a deactivated user account. Requires `ADMINISTRATION` (**Can administer Thoughtspot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `USER_ADMINISTRATION` (**Can manage users**) privilege is required. To activate an inactive user account, the API request body must include the following information: - Username or the GUID of the user account. - Auth token generated for the deactivated user. The auth token is sent in the API response when a user is deactivated. - Password for the user account. + * @param activateUserRequest + */ + activateUser(activateUserRequest, _options) { + return __async(this, null, function* () { + var _a, _b, _c; + let _config = _options || this.configuration; + if (activateUserRequest === null || activateUserRequest === void 0) { + throw new RequiredError("UsersApi", "activateUser", "activateUserRequest"); + } + const localVarPath = "/api/rest/2.0/users/activate"; + const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.25.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.25.0"); + const contentType = ObjectSerializer.getPreferredMediaType([ + "application/json" + ]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = ObjectSerializer.stringify( + ObjectSerializer.serialize(activateUserRequest, "ActivateUserRequest", ""), + contentType + ); + requestContext.setBody(serializedBody); + let authMethod; + authMethod = _config.authMethods["bearerAuth"]; + if (authMethod == null ? void 0 : authMethod.applySecurityAuthentication) { + yield authMethod == null ? void 0 : authMethod.applySecurityAuthentication(requestContext); + } + const defaultAuth = ((_a = _options == null ? void 0 : _options.authMethods) == null ? void 0 : _a.default) || ((_c = (_b = this.configuration) == null ? void 0 : _b.authMethods) == null ? void 0 : _c.default); + if (defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication) { + yield defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication(requestContext); + } + return requestContext; + }); + } + /** + * Version: 9.0.0.cl or later Updates the current password of the user. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `USER_ADMINISTRATION` (**Can manage users**) privilege is required. + * @param changeUserPasswordRequest + */ + changeUserPassword(changeUserPasswordRequest, _options) { + return __async(this, null, function* () { + var _a, _b, _c; + let _config = _options || this.configuration; + if (changeUserPasswordRequest === null || changeUserPasswordRequest === void 0) { + throw new RequiredError("UsersApi", "changeUserPassword", "changeUserPasswordRequest"); + } + const localVarPath = "/api/rest/2.0/users/change-password"; + const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.25.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.25.0"); + const contentType = ObjectSerializer.getPreferredMediaType([ + "application/json" + ]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = ObjectSerializer.stringify( + ObjectSerializer.serialize(changeUserPasswordRequest, "ChangeUserPasswordRequest", ""), + contentType + ); + requestContext.setBody(serializedBody); + let authMethod; + authMethod = _config.authMethods["bearerAuth"]; + if (authMethod == null ? void 0 : authMethod.applySecurityAuthentication) { + yield authMethod == null ? void 0 : authMethod.applySecurityAuthentication(requestContext); + } + const defaultAuth = ((_a = _options == null ? void 0 : _options.authMethods) == null ? void 0 : _a.default) || ((_c = (_b = this.configuration) == null ? void 0 : _b.authMethods) == null ? void 0 : _c.default); + if (defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication) { + yield defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication(requestContext); + } + return requestContext; + }); + } + /** + * Version: 9.0.0.cl or later Creates a user in ThoughtSpot. The API endpoint allows you to configure several user properties such as email address, account status, share notification preferences, and sharing visibility. You can provision the user to [groups](https://docs.thoughtspot.com/cloud/latest/groups-privileges) and [Orgs](https://docs.thoughtspot.com/cloud/latest/orgs-overview). You can also add Liveboard, Answer, and Worksheet objects to the user’s favorites list, assign a default Liveboard for the user, and set user preferences. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `USER_ADMINISTRATION` (**Can manage users**) privilege is required. + * @param createUserRequest + */ + createUser(createUserRequest, _options) { + return __async(this, null, function* () { + var _a, _b, _c; + let _config = _options || this.configuration; + if (createUserRequest === null || createUserRequest === void 0) { + throw new RequiredError("UsersApi", "createUser", "createUserRequest"); + } + const localVarPath = "/api/rest/2.0/users/create"; + const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.25.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.25.0"); + const contentType = ObjectSerializer.getPreferredMediaType([ + "application/json" + ]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = ObjectSerializer.stringify( + ObjectSerializer.serialize(createUserRequest, "CreateUserRequest", ""), + contentType + ); + requestContext.setBody(serializedBody); + let authMethod; + authMethod = _config.authMethods["bearerAuth"]; + if (authMethod == null ? void 0 : authMethod.applySecurityAuthentication) { + yield authMethod == null ? void 0 : authMethod.applySecurityAuthentication(requestContext); + } + const defaultAuth = ((_a = _options == null ? void 0 : _options.authMethods) == null ? void 0 : _a.default) || ((_c = (_b = this.configuration) == null ? void 0 : _b.authMethods) == null ? void 0 : _c.default); + if (defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication) { + yield defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication(requestContext); + } + return requestContext; + }); + } + /** + * Version: 9.7.0.cl or later Deactivates a user account. Requires `ADMINISTRATION` (**Can administer Thoughtspot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `USER_ADMINISTRATION` (**Can manage users**) privilege is required. To deactivate a user account, the API request body must include the following information: - Username or the GUID of the user account - Base URL of the ThoughtSpot instance If the API request is successful, ThoughtSpot returns the activation URL in the response. The activation URL is valid for 14 days and can be used to re-activate the account and reset the password of the deactivated account. + * @param deactivateUserRequest + */ + deactivateUser(deactivateUserRequest, _options) { + return __async(this, null, function* () { + var _a, _b, _c; + let _config = _options || this.configuration; + if (deactivateUserRequest === null || deactivateUserRequest === void 0) { + throw new RequiredError("UsersApi", "deactivateUser", "deactivateUserRequest"); + } + const localVarPath = "/api/rest/2.0/users/deactivate"; + const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.25.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.25.0"); + const contentType = ObjectSerializer.getPreferredMediaType([ + "application/json" + ]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = ObjectSerializer.stringify( + ObjectSerializer.serialize(deactivateUserRequest, "DeactivateUserRequest", ""), + contentType + ); + requestContext.setBody(serializedBody); + let authMethod; + authMethod = _config.authMethods["bearerAuth"]; + if (authMethod == null ? void 0 : authMethod.applySecurityAuthentication) { + yield authMethod == null ? void 0 : authMethod.applySecurityAuthentication(requestContext); + } + const defaultAuth = ((_a = _options == null ? void 0 : _options.authMethods) == null ? void 0 : _a.default) || ((_c = (_b = this.configuration) == null ? void 0 : _b.authMethods) == null ? void 0 : _c.default); + if (defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication) { + yield defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication(requestContext); + } + return requestContext; + }); + } + /** + * Version: 9.0.0.cl or later Deletes a user from the ThoughtSpot system. If you want to remove a user from a specific Org but not from ThoughtSpot, update the group and Org mapping properties of the user object via a POST API call to the [/api/rest/2.0/users/{user_identifier}/update](#/http/api-endpoints/users/update-user) endpoint. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `USER_ADMINISTRATION` (**Can manage users**) privilege is required. + * @param userIdentifier GUID / name of the user + */ + deleteUser(userIdentifier, _options) { + return __async(this, null, function* () { + var _a, _b, _c; + let _config = _options || this.configuration; + if (userIdentifier === null || userIdentifier === void 0) { + throw new RequiredError("UsersApi", "deleteUser", "userIdentifier"); + } + const localVarPath = "/api/rest/2.0/users/{user_identifier}/delete".replace("{user_identifier}", encodeURIComponent(String(userIdentifier))); + const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.25.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.25.0"); + let authMethod; + authMethod = _config.authMethods["bearerAuth"]; + if (authMethod == null ? void 0 : authMethod.applySecurityAuthentication) { + yield authMethod == null ? void 0 : authMethod.applySecurityAuthentication(requestContext); + } + const defaultAuth = ((_a = _options == null ? void 0 : _options.authMethods) == null ? void 0 : _a.default) || ((_c = (_b = this.configuration) == null ? void 0 : _b.authMethods) == null ? void 0 : _c.default); + if (defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication) { + yield defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication(requestContext); + } + return requestContext; + }); + } + /** + * Version: 9.0.0.cl or later Enforces logout on current user sessions. Use this API with caution as it may invalidate active user sessions and force users to re-login. Make sure you specify the usernames or GUIDs. If you pass null values in the API call, all user sessions on your cluster become invalid, and the users are forced to re-login. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `USER_ADMINISTRATION` (**Can manage users**) privilege is required. + * @param forceLogoutUsersRequest + */ + forceLogoutUsers(forceLogoutUsersRequest, _options) { + return __async(this, null, function* () { + var _a, _b, _c; + let _config = _options || this.configuration; + if (forceLogoutUsersRequest === null || forceLogoutUsersRequest === void 0) { + throw new RequiredError("UsersApi", "forceLogoutUsers", "forceLogoutUsersRequest"); + } + const localVarPath = "/api/rest/2.0/users/force-logout"; + const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.25.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.25.0"); + const contentType = ObjectSerializer.getPreferredMediaType([ + "application/json" + ]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = ObjectSerializer.stringify( + ObjectSerializer.serialize(forceLogoutUsersRequest, "ForceLogoutUsersRequest", ""), + contentType + ); + requestContext.setBody(serializedBody); + let authMethod; + authMethod = _config.authMethods["bearerAuth"]; + if (authMethod == null ? void 0 : authMethod.applySecurityAuthentication) { + yield authMethod == null ? void 0 : authMethod.applySecurityAuthentication(requestContext); + } + const defaultAuth = ((_a = _options == null ? void 0 : _options.authMethods) == null ? void 0 : _a.default) || ((_c = (_b = this.configuration) == null ? void 0 : _b.authMethods) == null ? void 0 : _c.default); + if (defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication) { + yield defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication(requestContext); + } + return requestContext; + }); + } + /** + * Version: 9.0.0.cl or later Imports user data from external databases into ThoughtSpot. During the user import operation: * If the specified users are not available in ThoughtSpot, the users are created and assigned a default password. Defining a `default_password` in the API request is optional. * If `delete_unspecified_users` is set to `true`, the users not specified in the API request, excluding the `tsadmin`, `guest`, `system` and `su` users, are deleted. * If the specified user objects are already available in ThoughtSpot, the object properties are updated and synchronized as per the input data in the API request. A successful API call returns the object that represents the changes made in the ThoughtSpot system. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `USER_ADMINISTRATION` (**Can manage users**) privilege is required. + * @param importUsersRequest + */ + importUsers(importUsersRequest, _options) { + return __async(this, null, function* () { + var _a, _b, _c; + let _config = _options || this.configuration; + if (importUsersRequest === null || importUsersRequest === void 0) { + throw new RequiredError("UsersApi", "importUsers", "importUsersRequest"); + } + const localVarPath = "/api/rest/2.0/users/import"; + const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.25.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.25.0"); + const contentType = ObjectSerializer.getPreferredMediaType([ + "application/json" + ]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = ObjectSerializer.stringify( + ObjectSerializer.serialize(importUsersRequest, "ImportUsersRequest", ""), + contentType + ); + requestContext.setBody(serializedBody); + let authMethod; + authMethod = _config.authMethods["bearerAuth"]; + if (authMethod == null ? void 0 : authMethod.applySecurityAuthentication) { + yield authMethod == null ? void 0 : authMethod.applySecurityAuthentication(requestContext); + } + const defaultAuth = ((_a = _options == null ? void 0 : _options.authMethods) == null ? void 0 : _a.default) || ((_c = (_b = this.configuration) == null ? void 0 : _b.authMethods) == null ? void 0 : _c.default); + if (defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication) { + yield defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication(requestContext); + } + return requestContext; + }); + } + /** + * Version: 9.0.0.cl or later Resets the password of a user account. Administrators can reset password on behalf of a user. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `USER_ADMINISTRATION` (**Can manage users**) privilege is required. + * @param resetUserPasswordRequest + */ + resetUserPassword(resetUserPasswordRequest, _options) { + return __async(this, null, function* () { + var _a, _b, _c; + let _config = _options || this.configuration; + if (resetUserPasswordRequest === null || resetUserPasswordRequest === void 0) { + throw new RequiredError("UsersApi", "resetUserPassword", "resetUserPasswordRequest"); + } + const localVarPath = "/api/rest/2.0/users/reset-password"; + const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.25.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.25.0"); + const contentType = ObjectSerializer.getPreferredMediaType([ + "application/json" + ]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = ObjectSerializer.stringify( + ObjectSerializer.serialize(resetUserPasswordRequest, "ResetUserPasswordRequest", ""), + contentType + ); + requestContext.setBody(serializedBody); + let authMethod; + authMethod = _config.authMethods["bearerAuth"]; + if (authMethod == null ? void 0 : authMethod.applySecurityAuthentication) { + yield authMethod == null ? void 0 : authMethod.applySecurityAuthentication(requestContext); + } + const defaultAuth = ((_a = _options == null ? void 0 : _options.authMethods) == null ? void 0 : _a.default) || ((_c = (_b = this.configuration) == null ? void 0 : _b.authMethods) == null ? void 0 : _c.default); + if (defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication) { + yield defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication(requestContext); + } + return requestContext; + }); + } + /** + * Version: 9.0.0.cl or later Gets a list of users available on the ThoughtSpot system. To get details of a specific user, specify the user GUID or name. You can also filter the API response based on groups, Org ID, user visibility, account status, user type, and user preference settings and favorites. Available to all users. Users with `ADMINISTRATION` (**Can administer ThoughtSpot**) privileges can view all users properties. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `USER_ADMINISTRATION` (**Can manage users**) privilege is required. **NOTE**: If the API returns an empty list, consider increasing the value of the `record_size` parameter. To search across all available users, set `record_size` to `-1`. + * @param searchUsersRequest + */ + searchUsers(searchUsersRequest, _options) { + return __async(this, null, function* () { + var _a, _b, _c; + let _config = _options || this.configuration; + if (searchUsersRequest === null || searchUsersRequest === void 0) { + throw new RequiredError("UsersApi", "searchUsers", "searchUsersRequest"); + } + const localVarPath = "/api/rest/2.0/users/search"; + const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.25.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.25.0"); + const contentType = ObjectSerializer.getPreferredMediaType([ + "application/json" + ]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = ObjectSerializer.stringify( + ObjectSerializer.serialize(searchUsersRequest, "SearchUsersRequest", ""), + contentType + ); + requestContext.setBody(serializedBody); + let authMethod; + authMethod = _config.authMethods["bearerAuth"]; + if (authMethod == null ? void 0 : authMethod.applySecurityAuthentication) { + yield authMethod == null ? void 0 : authMethod.applySecurityAuthentication(requestContext); + } + const defaultAuth = ((_a = _options == null ? void 0 : _options.authMethods) == null ? void 0 : _a.default) || ((_c = (_b = this.configuration) == null ? void 0 : _b.authMethods) == null ? void 0 : _c.default); + if (defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication) { + yield defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication(requestContext); + } + return requestContext; + }); + } + /** + * Version: 9.0.0.cl or later Updates the properties of a user object. You can modify user properties such as username, email, and share notification settings. You can also assign new groups and Orgs, remove the user from a group or Org, reset password, and modify user preferences. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `USER_ADMINISTRATION` (**Can manage users**) privilege is required. + * @param userIdentifier GUID / name of the user + * @param updateUserRequest + */ + updateUser(userIdentifier, updateUserRequest, _options) { + return __async(this, null, function* () { + var _a, _b, _c; + let _config = _options || this.configuration; + if (userIdentifier === null || userIdentifier === void 0) { + throw new RequiredError("UsersApi", "updateUser", "userIdentifier"); + } + if (updateUserRequest === null || updateUserRequest === void 0) { + throw new RequiredError("UsersApi", "updateUser", "updateUserRequest"); + } + const localVarPath = "/api/rest/2.0/users/{user_identifier}/update".replace("{user_identifier}", encodeURIComponent(String(userIdentifier))); + const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.25.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.25.0"); + const contentType = ObjectSerializer.getPreferredMediaType([ + "application/json" + ]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = ObjectSerializer.stringify( + ObjectSerializer.serialize(updateUserRequest, "UpdateUserRequest", ""), + contentType + ); + requestContext.setBody(serializedBody); + let authMethod; + authMethod = _config.authMethods["bearerAuth"]; + if (authMethod == null ? void 0 : authMethod.applySecurityAuthentication) { + yield authMethod == null ? void 0 : authMethod.applySecurityAuthentication(requestContext); + } + const defaultAuth = ((_a = _options == null ? void 0 : _options.authMethods) == null ? void 0 : _a.default) || ((_c = (_b = this.configuration) == null ? void 0 : _b.authMethods) == null ? void 0 : _c.default); + if (defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication) { + yield defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication(requestContext); + } + return requestContext; + }); + } +}; +var UsersApiResponseProcessor = class { + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to activateUser + * @throws ApiException if the response code was not in [200, 299] + */ + activateUser(response) { + return __async(this, null, function* () { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("200", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "User", + "" + ); + return body; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Invalid request.", body, response.headers); + } + if (isCodeInRange("401", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unexpected error", body, response.headers); + } + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "User", + "" + ); + return body; + } + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", yield response.getBodyAsAny(), response.headers); + }); + } + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to changeUserPassword + * @throws ApiException if the response code was not in [200, 299] + */ + changeUserPassword(response) { + return __async(this, null, function* () { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("204", response.httpStatusCode)) { + return; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Invalid request.", body, response.headers); + } + if (isCodeInRange("401", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unexpected error", body, response.headers); + } + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "void", + "" + ); + return body; + } + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", yield response.getBodyAsAny(), response.headers); + }); + } + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to createUser + * @throws ApiException if the response code was not in [200, 299] + */ + createUser(response) { + return __async(this, null, function* () { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("200", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "User", + "" + ); + return body; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Invalid request.", body, response.headers); + } + if (isCodeInRange("401", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unexpected error", body, response.headers); + } + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "User", + "" + ); + return body; + } + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", yield response.getBodyAsAny(), response.headers); + }); + } + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to deactivateUser + * @throws ApiException if the response code was not in [200, 299] + */ + deactivateUser(response) { + return __async(this, null, function* () { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("200", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ResponseActivationURL", + "" + ); + return body; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Invalid request.", body, response.headers); + } + if (isCodeInRange("401", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unexpected error", body, response.headers); + } + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ResponseActivationURL", + "" + ); + return body; + } + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", yield response.getBodyAsAny(), response.headers); + }); + } + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to deleteUser + * @throws ApiException if the response code was not in [200, 299] + */ + deleteUser(response) { + return __async(this, null, function* () { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("204", response.httpStatusCode)) { + return; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Invalid request.", body, response.headers); + } + if (isCodeInRange("401", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unexpected error", body, response.headers); + } + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "void", + "" + ); + return body; + } + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", yield response.getBodyAsAny(), response.headers); + }); + } + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to forceLogoutUsers + * @throws ApiException if the response code was not in [200, 299] + */ + forceLogoutUsers(response) { + return __async(this, null, function* () { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("204", response.httpStatusCode)) { + return; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Invalid request.", body, response.headers); + } + if (isCodeInRange("401", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unexpected error", body, response.headers); + } + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "void", + "" + ); + return body; + } + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", yield response.getBodyAsAny(), response.headers); + }); + } + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to importUsers + * @throws ApiException if the response code was not in [200, 299] + */ + importUsers(response) { + return __async(this, null, function* () { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("200", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ImportUsersResponse", + "" + ); + return body; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Invalid request.", body, response.headers); + } + if (isCodeInRange("401", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unexpected error", body, response.headers); + } + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ImportUsersResponse", + "" + ); + return body; + } + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", yield response.getBodyAsAny(), response.headers); + }); + } + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to resetUserPassword + * @throws ApiException if the response code was not in [200, 299] + */ + resetUserPassword(response) { + return __async(this, null, function* () { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("204", response.httpStatusCode)) { + return; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Invalid request.", body, response.headers); + } + if (isCodeInRange("401", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unexpected error", body, response.headers); + } + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "void", + "" + ); + return body; + } + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", yield response.getBodyAsAny(), response.headers); + }); + } + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to searchUsers + * @throws ApiException if the response code was not in [200, 299] + */ + searchUsers(response) { + return __async(this, null, function* () { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("200", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "Array", + "" + ); + return body; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Invalid request.", body, response.headers); + } + if (isCodeInRange("401", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unexpected error", body, response.headers); + } + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "Array", + "" + ); + return body; + } + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", yield response.getBodyAsAny(), response.headers); + }); + } + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to updateUser + * @throws ApiException if the response code was not in [200, 299] + */ + updateUser(response) { + return __async(this, null, function* () { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("204", response.httpStatusCode)) { + return; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Invalid request.", body, response.headers); + } + if (isCodeInRange("401", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unexpected error", body, response.headers); + } + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "void", + "" + ); + return body; + } + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", yield response.getBodyAsAny(), response.headers); + }); + } +}; + +// apis/VariableApi.ts +var VariableApiRequestFactory = class extends BaseAPIRequestFactory { + /** + * Create a variable which can be used for parameterizing metadata objects Version: 26.4.0.cl or later Allows creating a variable which can be used for parameterizing metadata objects in ThoughtSpot. Requires ADMINISTRATION role and TENANT scope. The CAN_MANAGE_VARIABLES permission allows you to manage Formula Variables in the current organization scope. The API endpoint supports the following types of variables: * CONNECTION_PROPERTY - For connection properties * TABLE_MAPPING - For table mappings * CONNECTION_PROPERTY_PER_PRINCIPAL - For connection properties per principal. In order to use this please contact support to enable this. * FORMULA_VARIABLE - For Formula variables, introduced in 10.15.0.cl When creating a variable, you need to specify: * The variable type * A unique name for the variable * Whether the variable contains sensitive values (defaults to false) * The data type of the variable, only specify for formula variables (defaults to null) The operation will fail if: * The user lacks required permissions * The variable name already exists * The variable type is invalid + * @param createVariableRequest + */ + createVariable(createVariableRequest, _options) { + return __async(this, null, function* () { + var _a, _b, _c; + let _config = _options || this.configuration; + if (createVariableRequest === null || createVariableRequest === void 0) { + throw new RequiredError("VariableApi", "createVariable", "createVariableRequest"); + } + const localVarPath = "/api/rest/2.0/template/variables/create"; + const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.25.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.25.0"); + const contentType = ObjectSerializer.getPreferredMediaType([ + "application/json" + ]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = ObjectSerializer.stringify( + ObjectSerializer.serialize(createVariableRequest, "CreateVariableRequest", ""), + contentType + ); + requestContext.setBody(serializedBody); + let authMethod; + authMethod = _config.authMethods["bearerAuth"]; + if (authMethod == null ? void 0 : authMethod.applySecurityAuthentication) { + yield authMethod == null ? void 0 : authMethod.applySecurityAuthentication(requestContext); + } + const defaultAuth = ((_a = _options == null ? void 0 : _options.authMethods) == null ? void 0 : _a.default) || ((_c = (_b = this.configuration) == null ? void 0 : _b.authMethods) == null ? void 0 : _c.default); + if (defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication) { + yield defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication(requestContext); + } + return requestContext; + }); + } + /** + * Delete a variable Version: 10.14.0.cl or later **Note:** This API endpoint is deprecated and will be removed from ThoughtSpot in a future release. Use [POST /api/rest/2.0/template/variables/delete](/api/rest/2.0/template/variables/delete) instead. Allows deleting a variable from ThoughtSpot. Requires ADMINISTRATION role and TENANT scope. The CAN_MANAGE_VARIABLES permission allows you to manage Formula Variables in the current organization scope. The API endpoint requires: * The variable identifier (ID or name) The operation will fail if: * The user lacks required permissions * The variable doesn\'t exist * The variable is being used by other objects + * @param identifier Unique id or name of the variable + */ + deleteVariable(identifier, _options) { + return __async(this, null, function* () { + var _a, _b, _c; + let _config = _options || this.configuration; + if (identifier === null || identifier === void 0) { + throw new RequiredError("VariableApi", "deleteVariable", "identifier"); + } + const localVarPath = "/api/rest/2.0/template/variables/{identifier}/delete".replace("{identifier}", encodeURIComponent(String(identifier))); + const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.25.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.25.0"); + let authMethod; + authMethod = _config.authMethods["bearerAuth"]; + if (authMethod == null ? void 0 : authMethod.applySecurityAuthentication) { + yield authMethod == null ? void 0 : authMethod.applySecurityAuthentication(requestContext); + } + const defaultAuth = ((_a = _options == null ? void 0 : _options.authMethods) == null ? void 0 : _a.default) || ((_c = (_b = this.configuration) == null ? void 0 : _b.authMethods) == null ? void 0 : _c.default); + if (defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication) { + yield defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication(requestContext); + } + return requestContext; + }); + } + /** + * Delete variable(s) Version: 26.4.0.cl or later Allows deleting multiple variables from ThoughtSpot. Requires ADMINISTRATION role and TENANT scope. The CAN_MANAGE_VARIABLES permission allows you to manage Formula Variables in the current organization scope. The API endpoint requires: * The variable identifiers (IDs or names) The operation will fail if: * The user lacks required permissions * Any of the variables don\'t exist * Any of the variables are being used by other objects + * @param deleteVariablesRequest + */ + deleteVariables(deleteVariablesRequest, _options) { + return __async(this, null, function* () { + var _a, _b, _c; + let _config = _options || this.configuration; + if (deleteVariablesRequest === null || deleteVariablesRequest === void 0) { + throw new RequiredError("VariableApi", "deleteVariables", "deleteVariablesRequest"); + } + const localVarPath = "/api/rest/2.0/template/variables/delete"; + const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.25.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.25.0"); + const contentType = ObjectSerializer.getPreferredMediaType([ + "application/json" + ]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = ObjectSerializer.stringify( + ObjectSerializer.serialize(deleteVariablesRequest, "DeleteVariablesRequest", ""), + contentType + ); + requestContext.setBody(serializedBody); + let authMethod; + authMethod = _config.authMethods["bearerAuth"]; + if (authMethod == null ? void 0 : authMethod.applySecurityAuthentication) { + yield authMethod == null ? void 0 : authMethod.applySecurityAuthentication(requestContext); + } + const defaultAuth = ((_a = _options == null ? void 0 : _options.authMethods) == null ? void 0 : _a.default) || ((_c = (_b = this.configuration) == null ? void 0 : _b.authMethods) == null ? void 0 : _c.default); + if (defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication) { + yield defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication(requestContext); + } + return requestContext; + }); + } + /** + * Update values for a variable Version: 26.4.0.cl or later Allows updating values for a specific variable in ThoughtSpot. Requires ADMINISTRATION role. The CAN_MANAGE_VARIABLES permission allows you to manage Formula Variables in the current organization scope. The API endpoint allows: * Adding new values to the variable * Replacing existing values * Deleting values from the variable * Resetting all values When updating variable values, you need to specify: * The variable identifier (ID or name) * The values to add/replace/remove * The operation to perform (ADD, REPLACE, REMOVE, RESET) Behaviour based on operation type: * ADD - Adds values to the variable if this is a list type variable, else same as replace. * REPLACE - Replaces all values of a given set of constraints with the current set of values. * REMOVE - Removes any values which match the set of conditions of the variables if this is a list type variable, else clears value. * RESET - Removes all constraints for the given variable, scope is ignored + * @param identifier Unique ID or name of the variable + * @param putVariableValuesRequest + */ + putVariableValues(identifier, putVariableValuesRequest, _options) { + return __async(this, null, function* () { + var _a, _b, _c; + let _config = _options || this.configuration; + if (identifier === null || identifier === void 0) { + throw new RequiredError("VariableApi", "putVariableValues", "identifier"); + } + if (putVariableValuesRequest === null || putVariableValuesRequest === void 0) { + throw new RequiredError("VariableApi", "putVariableValues", "putVariableValuesRequest"); + } + const localVarPath = "/api/rest/2.0/template/variables/{identifier}/update-values".replace("{identifier}", encodeURIComponent(String(identifier))); + const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.25.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.25.0"); + const contentType = ObjectSerializer.getPreferredMediaType([ + "application/json" + ]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = ObjectSerializer.stringify( + ObjectSerializer.serialize(putVariableValuesRequest, "PutVariableValuesRequest", ""), + contentType + ); + requestContext.setBody(serializedBody); + let authMethod; + authMethod = _config.authMethods["bearerAuth"]; + if (authMethod == null ? void 0 : authMethod.applySecurityAuthentication) { + yield authMethod == null ? void 0 : authMethod.applySecurityAuthentication(requestContext); + } + const defaultAuth = ((_a = _options == null ? void 0 : _options.authMethods) == null ? void 0 : _a.default) || ((_c = (_b = this.configuration) == null ? void 0 : _b.authMethods) == null ? void 0 : _c.default); + if (defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication) { + yield defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication(requestContext); + } + return requestContext; + }); + } + /** + * Search variables Version: 26.4.0.cl or later Allows searching for variables in ThoughtSpot. Requires ADMINISTRATION role. The CAN_MANAGE_VARIABLES permission allows you to manage Formula Variables in the current organization scope. The API endpoint supports searching variables by: * Variable identifier (ID or name) * Variable type * Name pattern (case-insensitive, supports % for wildcard) The search results can be formatted in three ways: * METADATA - Returns only variable metadata (default) * METADATA_AND_VALUES - Returns variable metadata and values The values can be filtered by scope: * org_identifier * principal_identifier * model_identifier + * @param searchVariablesRequest + */ + searchVariables(searchVariablesRequest, _options) { + return __async(this, null, function* () { + var _a, _b, _c; + let _config = _options || this.configuration; + if (searchVariablesRequest === null || searchVariablesRequest === void 0) { + throw new RequiredError("VariableApi", "searchVariables", "searchVariablesRequest"); + } + const localVarPath = "/api/rest/2.0/template/variables/search"; + const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.25.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.25.0"); + const contentType = ObjectSerializer.getPreferredMediaType([ + "application/json" + ]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = ObjectSerializer.stringify( + ObjectSerializer.serialize(searchVariablesRequest, "SearchVariablesRequest", ""), + contentType + ); + requestContext.setBody(serializedBody); + let authMethod; + authMethod = _config.authMethods["bearerAuth"]; + if (authMethod == null ? void 0 : authMethod.applySecurityAuthentication) { + yield authMethod == null ? void 0 : authMethod.applySecurityAuthentication(requestContext); + } + const defaultAuth = ((_a = _options == null ? void 0 : _options.authMethods) == null ? void 0 : _a.default) || ((_c = (_b = this.configuration) == null ? void 0 : _b.authMethods) == null ? void 0 : _c.default); + if (defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication) { + yield defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication(requestContext); + } + return requestContext; + }); + } + /** + * Update a variable\'s name Version: 26.4.0.cl or later Allows updating a variable\'s name in ThoughtSpot. Requires ADMINISTRATION role and TENANT scope. The CAN_MANAGE_VARIABLES permission allows you to manage Formula Variables in the current organization scope. The API endpoint allows updating: * The variable name + * @param identifier Unique id or name of the variable to update. + * @param updateVariableRequest + */ + updateVariable(identifier, updateVariableRequest, _options) { + return __async(this, null, function* () { + var _a, _b, _c; + let _config = _options || this.configuration; + if (identifier === null || identifier === void 0) { + throw new RequiredError("VariableApi", "updateVariable", "identifier"); + } + if (updateVariableRequest === null || updateVariableRequest === void 0) { + throw new RequiredError("VariableApi", "updateVariable", "updateVariableRequest"); + } + const localVarPath = "/api/rest/2.0/template/variables/{identifier}/update".replace("{identifier}", encodeURIComponent(String(identifier))); + const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.25.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.25.0"); + const contentType = ObjectSerializer.getPreferredMediaType([ + "application/json" + ]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = ObjectSerializer.stringify( + ObjectSerializer.serialize(updateVariableRequest, "UpdateVariableRequest", ""), + contentType + ); + requestContext.setBody(serializedBody); + let authMethod; + authMethod = _config.authMethods["bearerAuth"]; + if (authMethod == null ? void 0 : authMethod.applySecurityAuthentication) { + yield authMethod == null ? void 0 : authMethod.applySecurityAuthentication(requestContext); + } + const defaultAuth = ((_a = _options == null ? void 0 : _options.authMethods) == null ? void 0 : _a.default) || ((_c = (_b = this.configuration) == null ? void 0 : _b.authMethods) == null ? void 0 : _c.default); + if (defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication) { + yield defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication(requestContext); + } + return requestContext; + }); + } + /** + * Update values for multiple variables Version: 10.14.0.cl or later **Note:** This API endpoint is deprecated and will be removed from ThoughtSpot in a future release. Use [POST /api/rest/2.0/template/variables/{identifier}/update-values](/api/rest/2.0/template/variables/%7Bidentifier%7D/update-values) instead. Allows updating values for multiple variables in ThoughtSpot. Requires ADMINISTRATION role. The CAN_MANAGE_VARIABLES permission allows you to manage Formula Variables in the current organization scope. The API endpoint allows: * Adding new values to variables * Replacing existing values * Deleting values from variables When updating variable values, you need to specify: * The variable identifiers * The values to add/replace/remove for each variable * The operation to perform (ADD, REPLACE, REMOVE, RESET) Behaviour based on operation type: * ADD - Adds values to the variable if this is a list type variable, else same as replace. * REPLACE - Replaces all values of a given set of constraints with the current set of values. * REMOVE - Removes any values which match the set of conditions of the variables if this is a list type variable, else clears value. * RESET - Removes all constrains for a given variable, scope is ignored + * @param updateVariableValuesRequest + */ + updateVariableValues(updateVariableValuesRequest, _options) { + return __async(this, null, function* () { + var _a, _b, _c; + let _config = _options || this.configuration; + if (updateVariableValuesRequest === null || updateVariableValuesRequest === void 0) { + throw new RequiredError("VariableApi", "updateVariableValues", "updateVariableValuesRequest"); + } + const localVarPath = "/api/rest/2.0/template/variables/update-values"; + const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.25.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.25.0"); + const contentType = ObjectSerializer.getPreferredMediaType([ + "application/json" + ]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = ObjectSerializer.stringify( + ObjectSerializer.serialize(updateVariableValuesRequest, "UpdateVariableValuesRequest", ""), + contentType + ); + requestContext.setBody(serializedBody); + let authMethod; + authMethod = _config.authMethods["bearerAuth"]; + if (authMethod == null ? void 0 : authMethod.applySecurityAuthentication) { + yield authMethod == null ? void 0 : authMethod.applySecurityAuthentication(requestContext); + } + const defaultAuth = ((_a = _options == null ? void 0 : _options.authMethods) == null ? void 0 : _a.default) || ((_c = (_b = this.configuration) == null ? void 0 : _b.authMethods) == null ? void 0 : _c.default); + if (defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication) { + yield defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication(requestContext); + } + return requestContext; + }); + } +}; +var VariableApiResponseProcessor = class { + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to createVariable + * @throws ApiException if the response code was not in [200, 299] + */ + createVariable(response) { + return __async(this, null, function* () { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("200", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "Variable", + "" + ); + return body; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Invalid request.", body, response.headers); + } + if (isCodeInRange("401", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unexpected error", body, response.headers); + } + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "Variable", + "" + ); + return body; + } + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", yield response.getBodyAsAny(), response.headers); + }); + } + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to deleteVariable + * @throws ApiException if the response code was not in [200, 299] + */ + deleteVariable(response) { + return __async(this, null, function* () { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("204", response.httpStatusCode)) { + return; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Invalid request.", body, response.headers); + } + if (isCodeInRange("401", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unexpected error", body, response.headers); + } + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "void", + "" + ); + return body; + } + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", yield response.getBodyAsAny(), response.headers); + }); + } + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to deleteVariables + * @throws ApiException if the response code was not in [200, 299] + */ + deleteVariables(response) { + return __async(this, null, function* () { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("204", response.httpStatusCode)) { + return; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Invalid request.", body, response.headers); + } + if (isCodeInRange("401", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unexpected error", body, response.headers); + } + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "void", + "" + ); + return body; + } + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", yield response.getBodyAsAny(), response.headers); + }); + } + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to putVariableValues + * @throws ApiException if the response code was not in [200, 299] + */ + putVariableValues(response) { + return __async(this, null, function* () { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("204", response.httpStatusCode)) { + return; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Invalid request.", body, response.headers); + } + if (isCodeInRange("401", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unexpected error", body, response.headers); + } + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "void", + "" + ); + return body; + } + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", yield response.getBodyAsAny(), response.headers); + }); + } + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to searchVariables + * @throws ApiException if the response code was not in [200, 299] + */ + searchVariables(response) { + return __async(this, null, function* () { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("200", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "Array", + "" + ); + return body; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Invalid request.", body, response.headers); + } + if (isCodeInRange("401", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unexpected error", body, response.headers); + } + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "Array", + "" + ); + return body; + } + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", yield response.getBodyAsAny(), response.headers); + }); + } + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to updateVariable + * @throws ApiException if the response code was not in [200, 299] + */ + updateVariable(response) { + return __async(this, null, function* () { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("204", response.httpStatusCode)) { + return; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Invalid request.", body, response.headers); + } + if (isCodeInRange("401", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unexpected error", body, response.headers); + } + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "void", + "" + ); + return body; + } + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", yield response.getBodyAsAny(), response.headers); + }); + } + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to updateVariableValues + * @throws ApiException if the response code was not in [200, 299] + */ + updateVariableValues(response) { + return __async(this, null, function* () { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("204", response.httpStatusCode)) { + return; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Invalid request.", body, response.headers); + } + if (isCodeInRange("401", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unexpected error", body, response.headers); + } + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "void", + "" + ); + return body; + } + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", yield response.getBodyAsAny(), response.headers); + }); + } +}; + +// apis/VersionControlApi.ts +var VersionControlApiRequestFactory = class extends BaseAPIRequestFactory { + /** + * Version: 9.2.0.cl or later Commits TML files of metadata objects to the Git branch configured on your instance. Requires at least edit access to objects used in the commit operation. Before using this endpoint to push your commits: * Enable Git integration on your instance. * Make sure the Git repository and branch details are configured on your instance. For more information, see [Git integration documentation](https://developers.thoughtspot.com/docs/git-integration). + * @param commitBranchRequest + */ + commitBranch(commitBranchRequest, _options) { + return __async(this, null, function* () { + var _a, _b, _c; + let _config = _options || this.configuration; + if (commitBranchRequest === null || commitBranchRequest === void 0) { + throw new RequiredError("VersionControlApi", "commitBranch", "commitBranchRequest"); + } + const localVarPath = "/api/rest/2.0/vcs/git/branches/commit"; + const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.25.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.25.0"); + const contentType = ObjectSerializer.getPreferredMediaType([ + "application/json" + ]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = ObjectSerializer.stringify( + ObjectSerializer.serialize(commitBranchRequest, "CommitBranchRequest", ""), + contentType + ); + requestContext.setBody(serializedBody); + let authMethod; + authMethod = _config.authMethods["bearerAuth"]; + if (authMethod == null ? void 0 : authMethod.applySecurityAuthentication) { + yield authMethod == null ? void 0 : authMethod.applySecurityAuthentication(requestContext); + } + const defaultAuth = ((_a = _options == null ? void 0 : _options.authMethods) == null ? void 0 : _a.default) || ((_c = (_b = this.configuration) == null ? void 0 : _b.authMethods) == null ? void 0 : _c.default); + if (defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication) { + yield defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication(requestContext); + } + return requestContext; + }); + } + /** + * Version: 9.2.0.cl or later Allows you to connect a ThoughtSpot instance to a Git repository. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance on your instance, the `CAN_SETUP_VERSION_CONTROL` (**Can set up version control**) privilege. You can use this API endpoint to connect your ThoughtSpot development and production environments to the development and production branches of a Git repository. Before using this endpoint to connect your ThoughtSpot instance to a Git repository, check the following prerequisites: * You have a Git repository. If you are using GitHub, make sure you have a valid account and an access token to connect ThoughtSpot to GitHub. For information about generating a token, see [GitHub Documentation](https://docs.github.com/en/authentication/keeping-your-account-and-data-secure/managing-your-personal-access-tokens). * Your access token has `repo` scope that grants full access to public and private repositories. * Your Git repository has a branch that can be configured as a default branch in ThoughtSpot. For more information, see [Git integration documentation](https://developers.thoughtspot.com/docs/?pageid=git-integration). **Note**: ThoughtSpot supports only GitHub / itHub Enterprise for CI/CD. + * @param createConfigRequest + */ + createConfig(createConfigRequest, _options) { + return __async(this, null, function* () { + var _a, _b, _c; + let _config = _options || this.configuration; + if (createConfigRequest === null || createConfigRequest === void 0) { + throw new RequiredError("VersionControlApi", "createConfig", "createConfigRequest"); + } + const localVarPath = "/api/rest/2.0/vcs/git/config/create"; + const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.25.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.25.0"); + const contentType = ObjectSerializer.getPreferredMediaType([ + "application/json" + ]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = ObjectSerializer.stringify( + ObjectSerializer.serialize(createConfigRequest, "CreateConfigRequest", ""), + contentType + ); + requestContext.setBody(serializedBody); + let authMethod; + authMethod = _config.authMethods["bearerAuth"]; + if (authMethod == null ? void 0 : authMethod.applySecurityAuthentication) { + yield authMethod == null ? void 0 : authMethod.applySecurityAuthentication(requestContext); + } + const defaultAuth = ((_a = _options == null ? void 0 : _options.authMethods) == null ? void 0 : _a.default) || ((_c = (_b = this.configuration) == null ? void 0 : _b.authMethods) == null ? void 0 : _c.default); + if (defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication) { + yield defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication(requestContext); + } + return requestContext; + }); + } + /** + * Version: 9.2.0.cl or later Deletes Git repository configuration from your ThoughtSpot instance. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance on your instance, the `CAN_SETUP_VERSION_CONTROL` (**Can set up version control**) privilege. + * @param deleteConfigRequest + */ + deleteConfig(deleteConfigRequest, _options) { + return __async(this, null, function* () { + var _a, _b, _c; + let _config = _options || this.configuration; + if (deleteConfigRequest === null || deleteConfigRequest === void 0) { + throw new RequiredError("VersionControlApi", "deleteConfig", "deleteConfigRequest"); + } + const localVarPath = "/api/rest/2.0/vcs/git/config/delete"; + const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.25.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.25.0"); + const contentType = ObjectSerializer.getPreferredMediaType([ + "application/json" + ]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = ObjectSerializer.stringify( + ObjectSerializer.serialize(deleteConfigRequest, "DeleteConfigRequest", ""), + contentType + ); + requestContext.setBody(serializedBody); + let authMethod; + authMethod = _config.authMethods["bearerAuth"]; + if (authMethod == null ? void 0 : authMethod.applySecurityAuthentication) { + yield authMethod == null ? void 0 : authMethod.applySecurityAuthentication(requestContext); + } + const defaultAuth = ((_a = _options == null ? void 0 : _options.authMethods) == null ? void 0 : _a.default) || ((_c = (_b = this.configuration) == null ? void 0 : _b.authMethods) == null ? void 0 : _c.default); + if (defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication) { + yield defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication(requestContext); + } + return requestContext; + }); + } + /** + * Version: 9.2.0.cl or later Allows you to deploy a commit and publish TML content to your ThoughtSpot instance. Requires at least edit access to the objects used in the deploy operation. The API deploys the head of the branch unless a `commit_id` is specified in the API request. If the branch name is not defined in the request, the default branch is considered for deploying commits. For more information, see [Git integration documentation](https://developers.thoughtspot.com/docs/git-integration). + * @param deployCommitRequest + */ + deployCommit(deployCommitRequest, _options) { + return __async(this, null, function* () { + var _a, _b, _c; + let _config = _options || this.configuration; + if (deployCommitRequest === null || deployCommitRequest === void 0) { + throw new RequiredError("VersionControlApi", "deployCommit", "deployCommitRequest"); + } + const localVarPath = "/api/rest/2.0/vcs/git/commits/deploy"; + const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.25.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.25.0"); + const contentType = ObjectSerializer.getPreferredMediaType([ + "application/json" + ]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = ObjectSerializer.stringify( + ObjectSerializer.serialize(deployCommitRequest, "DeployCommitRequest", ""), + contentType + ); + requestContext.setBody(serializedBody); + let authMethod; + authMethod = _config.authMethods["bearerAuth"]; + if (authMethod == null ? void 0 : authMethod.applySecurityAuthentication) { + yield authMethod == null ? void 0 : authMethod.applySecurityAuthentication(requestContext); + } + const defaultAuth = ((_a = _options == null ? void 0 : _options.authMethods) == null ? void 0 : _a.default) || ((_c = (_b = this.configuration) == null ? void 0 : _b.authMethods) == null ? void 0 : _c.default); + if (defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication) { + yield defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication(requestContext); + } + return requestContext; + }); + } + /** + * Version: 9.2.0.cl or later Reverts TML objects to a previous commit specified in the API request. Requires at least edit access to objects. In the API request, specify the `commit_id`. If the branch name is not specified in the request, the API will consider the default branch configured on your instance. By default, the API reverts all objects. If the revert operation fails for one of the objects provided in the commit, the API returns an error and does not revert any object. For more information, see [Git integration documentation](https://developers.thoughtspot.com/docs/git-integration). + * @param commitId Commit id to which the object should be reverted + * @param revertCommitRequest + */ + revertCommit(commitId, revertCommitRequest, _options) { + return __async(this, null, function* () { + var _a, _b, _c; + let _config = _options || this.configuration; + if (commitId === null || commitId === void 0) { + throw new RequiredError("VersionControlApi", "revertCommit", "commitId"); + } + if (revertCommitRequest === null || revertCommitRequest === void 0) { + throw new RequiredError("VersionControlApi", "revertCommit", "revertCommitRequest"); + } + const localVarPath = "/api/rest/2.0/vcs/git/commits/{commit_id}/revert".replace("{commit_id}", encodeURIComponent(String(commitId))); + const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.25.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.25.0"); + const contentType = ObjectSerializer.getPreferredMediaType([ + "application/json" + ]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = ObjectSerializer.stringify( + ObjectSerializer.serialize(revertCommitRequest, "RevertCommitRequest", ""), + contentType + ); + requestContext.setBody(serializedBody); + let authMethod; + authMethod = _config.authMethods["bearerAuth"]; + if (authMethod == null ? void 0 : authMethod.applySecurityAuthentication) { + yield authMethod == null ? void 0 : authMethod.applySecurityAuthentication(requestContext); + } + const defaultAuth = ((_a = _options == null ? void 0 : _options.authMethods) == null ? void 0 : _a.default) || ((_c = (_b = this.configuration) == null ? void 0 : _b.authMethods) == null ? void 0 : _c.default); + if (defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication) { + yield defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication(requestContext); + } + return requestContext; + }); + } + /** + * Version: 9.2.0.cl or later Gets a list of commits for a given metadata object. Requires `DATAMANAGEMENT` (**Can manage data**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance on your instance, the `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` (**Can manage data models**) privilege and edit access to the metadata objects. + * @param searchCommitsRequest + */ + searchCommits(searchCommitsRequest, _options) { + return __async(this, null, function* () { + var _a, _b, _c; + let _config = _options || this.configuration; + if (searchCommitsRequest === null || searchCommitsRequest === void 0) { + throw new RequiredError("VersionControlApi", "searchCommits", "searchCommitsRequest"); + } + const localVarPath = "/api/rest/2.0/vcs/git/commits/search"; + const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.25.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.25.0"); + const contentType = ObjectSerializer.getPreferredMediaType([ + "application/json" + ]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = ObjectSerializer.stringify( + ObjectSerializer.serialize(searchCommitsRequest, "SearchCommitsRequest", ""), + contentType + ); + requestContext.setBody(serializedBody); + let authMethod; + authMethod = _config.authMethods["bearerAuth"]; + if (authMethod == null ? void 0 : authMethod.applySecurityAuthentication) { + yield authMethod == null ? void 0 : authMethod.applySecurityAuthentication(requestContext); + } + const defaultAuth = ((_a = _options == null ? void 0 : _options.authMethods) == null ? void 0 : _a.default) || ((_c = (_b = this.configuration) == null ? void 0 : _b.authMethods) == null ? void 0 : _c.default); + if (defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication) { + yield defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication(requestContext); + } + return requestContext; + }); + } + /** + * Version: 9.2.0.cl or later Gets Git repository connections configured on the ThoughtSpot instance. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance on your instance, the `CAN_SETUP_VERSION_CONTROL` (**Can set up version control**) privilege. + * @param searchConfigRequest + */ + searchConfig(searchConfigRequest, _options) { + return __async(this, null, function* () { + var _a, _b, _c; + let _config = _options || this.configuration; + if (searchConfigRequest === null || searchConfigRequest === void 0) { + throw new RequiredError("VersionControlApi", "searchConfig", "searchConfigRequest"); + } + const localVarPath = "/api/rest/2.0/vcs/git/config/search"; + const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.25.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.25.0"); + const contentType = ObjectSerializer.getPreferredMediaType([ + "application/json" + ]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = ObjectSerializer.stringify( + ObjectSerializer.serialize(searchConfigRequest, "SearchConfigRequest", ""), + contentType + ); + requestContext.setBody(serializedBody); + let authMethod; + authMethod = _config.authMethods["bearerAuth"]; + if (authMethod == null ? void 0 : authMethod.applySecurityAuthentication) { + yield authMethod == null ? void 0 : authMethod.applySecurityAuthentication(requestContext); + } + const defaultAuth = ((_a = _options == null ? void 0 : _options.authMethods) == null ? void 0 : _a.default) || ((_c = (_b = this.configuration) == null ? void 0 : _b.authMethods) == null ? void 0 : _c.default); + if (defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication) { + yield defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication(requestContext); + } + return requestContext; + }); + } + /** + * Version: 9.2.0.cl or later Updates Git repository configuration settings. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance on your instance, the `CAN_SETUP_VERSION_CONTROL` (**Can set up version control**) privilege. + * @param updateConfigRequest + */ + updateConfig(updateConfigRequest, _options) { + return __async(this, null, function* () { + var _a, _b, _c; + let _config = _options || this.configuration; + if (updateConfigRequest === null || updateConfigRequest === void 0) { + throw new RequiredError("VersionControlApi", "updateConfig", "updateConfigRequest"); + } + const localVarPath = "/api/rest/2.0/vcs/git/config/update"; + const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.25.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.25.0"); + const contentType = ObjectSerializer.getPreferredMediaType([ + "application/json" + ]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = ObjectSerializer.stringify( + ObjectSerializer.serialize(updateConfigRequest, "UpdateConfigRequest", ""), + contentType + ); + requestContext.setBody(serializedBody); + let authMethod; + authMethod = _config.authMethods["bearerAuth"]; + if (authMethod == null ? void 0 : authMethod.applySecurityAuthentication) { + yield authMethod == null ? void 0 : authMethod.applySecurityAuthentication(requestContext); + } + const defaultAuth = ((_a = _options == null ? void 0 : _options.authMethods) == null ? void 0 : _a.default) || ((_c = (_b = this.configuration) == null ? void 0 : _b.authMethods) == null ? void 0 : _c.default); + if (defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication) { + yield defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication(requestContext); + } + return requestContext; + }); + } + /** + * Version: 9.2.0.cl or later Validates the content of your source branch against the objects in your destination environment. Before merging content from your source branch to the destination branch, run this API operation from your destination environment and ensure that the changes from the source branch function in the destination environment. Requires `DATAMANAGEMENT` (**Can manage data**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance on your instance, the `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` (**Can manage data models**) privilege and edit access to the metadata objects. + * @param validateMergeRequest + */ + validateMerge(validateMergeRequest, _options) { + return __async(this, null, function* () { + var _a, _b, _c; + let _config = _options || this.configuration; + if (validateMergeRequest === null || validateMergeRequest === void 0) { + throw new RequiredError("VersionControlApi", "validateMerge", "validateMergeRequest"); + } + const localVarPath = "/api/rest/2.0/vcs/git/branches/validate"; + const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.25.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.25.0"); + const contentType = ObjectSerializer.getPreferredMediaType([ + "application/json" + ]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = ObjectSerializer.stringify( + ObjectSerializer.serialize(validateMergeRequest, "ValidateMergeRequest", ""), + contentType + ); + requestContext.setBody(serializedBody); + let authMethod; + authMethod = _config.authMethods["bearerAuth"]; + if (authMethod == null ? void 0 : authMethod.applySecurityAuthentication) { + yield authMethod == null ? void 0 : authMethod.applySecurityAuthentication(requestContext); + } + const defaultAuth = ((_a = _options == null ? void 0 : _options.authMethods) == null ? void 0 : _a.default) || ((_c = (_b = this.configuration) == null ? void 0 : _b.authMethods) == null ? void 0 : _c.default); + if (defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication) { + yield defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication(requestContext); + } + return requestContext; + }); + } +}; +var VersionControlApiResponseProcessor = class { + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to commitBranch + * @throws ApiException if the response code was not in [200, 299] + */ + commitBranch(response) { + return __async(this, null, function* () { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("200", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "CommitResponse", + "" + ); + return body; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Invalid request.", body, response.headers); + } + if (isCodeInRange("401", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unexpected error", body, response.headers); + } + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "CommitResponse", + "" + ); + return body; + } + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", yield response.getBodyAsAny(), response.headers); + }); + } + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to createConfig + * @throws ApiException if the response code was not in [200, 299] + */ + createConfig(response) { + return __async(this, null, function* () { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("200", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "RepoConfigObject", + "" + ); + return body; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Invalid request.", body, response.headers); + } + if (isCodeInRange("401", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unexpected error", body, response.headers); + } + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "RepoConfigObject", + "" + ); + return body; + } + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", yield response.getBodyAsAny(), response.headers); + }); + } + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to deleteConfig + * @throws ApiException if the response code was not in [200, 299] + */ + deleteConfig(response) { + return __async(this, null, function* () { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("204", response.httpStatusCode)) { + return; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Invalid request.", body, response.headers); + } + if (isCodeInRange("401", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unexpected error", body, response.headers); + } + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "void", + "" + ); + return body; + } + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", yield response.getBodyAsAny(), response.headers); + }); + } + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to deployCommit + * @throws ApiException if the response code was not in [200, 299] + */ + deployCommit(response) { + return __async(this, null, function* () { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("200", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "Array", + "" + ); + return body; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Invalid request.", body, response.headers); + } + if (isCodeInRange("401", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unexpected error", body, response.headers); + } + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "Array", + "" + ); + return body; + } + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", yield response.getBodyAsAny(), response.headers); + }); + } + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to revertCommit + * @throws ApiException if the response code was not in [200, 299] + */ + revertCommit(response) { + return __async(this, null, function* () { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("200", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "RevertResponse", + "" + ); + return body; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Invalid request.", body, response.headers); + } + if (isCodeInRange("401", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unexpected error", body, response.headers); + } + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "RevertResponse", + "" + ); + return body; + } + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", yield response.getBodyAsAny(), response.headers); + }); + } + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to searchCommits + * @throws ApiException if the response code was not in [200, 299] + */ + searchCommits(response) { + return __async(this, null, function* () { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("200", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "Array", + "" + ); + return body; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Invalid request.", body, response.headers); + } + if (isCodeInRange("401", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unexpected error", body, response.headers); + } + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "Array", + "" + ); + return body; + } + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", yield response.getBodyAsAny(), response.headers); + }); + } + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to searchConfig + * @throws ApiException if the response code was not in [200, 299] + */ + searchConfig(response) { + return __async(this, null, function* () { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("200", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "Array", + "" + ); + return body; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Invalid request.", body, response.headers); + } + if (isCodeInRange("401", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unexpected error", body, response.headers); + } + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "Array", + "" + ); + return body; + } + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", yield response.getBodyAsAny(), response.headers); + }); + } + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to updateConfig + * @throws ApiException if the response code was not in [200, 299] + */ + updateConfig(response) { + return __async(this, null, function* () { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("200", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "RepoConfigObject", + "" + ); + return body; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Invalid request.", body, response.headers); + } + if (isCodeInRange("401", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unexpected error", body, response.headers); + } + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "RepoConfigObject", + "" + ); + return body; + } + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", yield response.getBodyAsAny(), response.headers); + }); + } + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to validateMerge + * @throws ApiException if the response code was not in [200, 299] + */ + validateMerge(response) { + return __async(this, null, function* () { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("200", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "Array", + "" + ); + return body; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Invalid request.", body, response.headers); + } + if (isCodeInRange("401", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unexpected error", body, response.headers); + } + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "Array", + "" + ); + return body; + } + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", yield response.getBodyAsAny(), response.headers); + }); + } +}; + +// apis/WebhooksApi.ts +var WebhooksApiRequestFactory = class extends BaseAPIRequestFactory { + /** + * Version: 10.14.0.cl or later Creates a new webhook configuration to receive notifications for specified events. The webhook will be triggered when the configured events occur in the system. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) or `DEVELOPER` (**Has developer privilege**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, users with `CAN_MANAGE_WEBHOOKS` (**Can manage webhooks**) privilege are also authorized to perform this action. + * @param createWebhookConfigurationRequest + */ + createWebhookConfiguration(createWebhookConfigurationRequest, _options) { + return __async(this, null, function* () { + var _a, _b, _c; + let _config = _options || this.configuration; + if (createWebhookConfigurationRequest === null || createWebhookConfigurationRequest === void 0) { + throw new RequiredError("WebhooksApi", "createWebhookConfiguration", "createWebhookConfigurationRequest"); + } + const localVarPath = "/api/rest/2.0/webhooks/create"; + const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.25.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.25.0"); + const contentType = ObjectSerializer.getPreferredMediaType([ + "application/json" + ]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = ObjectSerializer.stringify( + ObjectSerializer.serialize(createWebhookConfigurationRequest, "CreateWebhookConfigurationRequest", ""), + contentType + ); + requestContext.setBody(serializedBody); + let authMethod; + authMethod = _config.authMethods["bearerAuth"]; + if (authMethod == null ? void 0 : authMethod.applySecurityAuthentication) { + yield authMethod == null ? void 0 : authMethod.applySecurityAuthentication(requestContext); + } + const defaultAuth = ((_a = _options == null ? void 0 : _options.authMethods) == null ? void 0 : _a.default) || ((_c = (_b = this.configuration) == null ? void 0 : _b.authMethods) == null ? void 0 : _c.default); + if (defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication) { + yield defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication(requestContext); + } + return requestContext; + }); + } + /** + * Version: 10.14.0.cl or later Deletes one or more webhook configurations by their unique id or name. Returns status of each deletion operation, including successfully deleted webhooks and any failures with error details. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) or `DEVELOPER` (**Has developer privilege**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, users with `CAN_MANAGE_WEBHOOKS` (**Can manage webhooks**) privilege are also authorized to perform this action. + * @param deleteWebhookConfigurationsRequest + */ + deleteWebhookConfigurations(deleteWebhookConfigurationsRequest, _options) { + return __async(this, null, function* () { + var _a, _b, _c; + let _config = _options || this.configuration; + if (deleteWebhookConfigurationsRequest === null || deleteWebhookConfigurationsRequest === void 0) { + throw new RequiredError("WebhooksApi", "deleteWebhookConfigurations", "deleteWebhookConfigurationsRequest"); + } + const localVarPath = "/api/rest/2.0/webhooks/delete"; + const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.25.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.25.0"); + const contentType = ObjectSerializer.getPreferredMediaType([ + "application/json" + ]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = ObjectSerializer.stringify( + ObjectSerializer.serialize(deleteWebhookConfigurationsRequest, "DeleteWebhookConfigurationsRequest", ""), + contentType + ); + requestContext.setBody(serializedBody); + let authMethod; + authMethod = _config.authMethods["bearerAuth"]; + if (authMethod == null ? void 0 : authMethod.applySecurityAuthentication) { + yield authMethod == null ? void 0 : authMethod.applySecurityAuthentication(requestContext); + } + const defaultAuth = ((_a = _options == null ? void 0 : _options.authMethods) == null ? void 0 : _a.default) || ((_c = (_b = this.configuration) == null ? void 0 : _b.authMethods) == null ? void 0 : _c.default); + if (defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication) { + yield defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication(requestContext); + } + return requestContext; + }); + } + /** + * Version: 10.14.0.cl or later Searches for webhook configurations based on various criteria such as Org, webhook identifier, event type, with support for pagination and sorting. Returns matching webhook configurations with their complete details. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) or `DEVELOPER` (**Has developer privilege**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, users with `CAN_MANAGE_WEBHOOKS` (**Can manage webhooks**) privilege are also authorized to perform this action. + * @param searchWebhookConfigurationsRequest + */ + searchWebhookConfigurations(searchWebhookConfigurationsRequest, _options) { + return __async(this, null, function* () { + var _a, _b, _c; + let _config = _options || this.configuration; + if (searchWebhookConfigurationsRequest === null || searchWebhookConfigurationsRequest === void 0) { + throw new RequiredError("WebhooksApi", "searchWebhookConfigurations", "searchWebhookConfigurationsRequest"); + } + const localVarPath = "/api/rest/2.0/webhooks/search"; + const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.25.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.25.0"); + const contentType = ObjectSerializer.getPreferredMediaType([ + "application/json" + ]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = ObjectSerializer.stringify( + ObjectSerializer.serialize(searchWebhookConfigurationsRequest, "SearchWebhookConfigurationsRequest", ""), + contentType + ); + requestContext.setBody(serializedBody); + let authMethod; + authMethod = _config.authMethods["bearerAuth"]; + if (authMethod == null ? void 0 : authMethod.applySecurityAuthentication) { + yield authMethod == null ? void 0 : authMethod.applySecurityAuthentication(requestContext); + } + const defaultAuth = ((_a = _options == null ? void 0 : _options.authMethods) == null ? void 0 : _a.default) || ((_c = (_b = this.configuration) == null ? void 0 : _b.authMethods) == null ? void 0 : _c.default); + if (defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication) { + yield defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication(requestContext); + } + return requestContext; + }); + } + /** + * Version: 10.14.0.cl or later Updates an existing webhook configuration by its unique id or name. Only the provided fields will be updated. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) or `DEVELOPER` (**Has developer privilege**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, users with `CAN_MANAGE_WEBHOOKS` (**Can manage webhooks**) privilege are also authorized to perform this action. + * @param webhookIdentifier Unique ID or name of the webhook configuration. + * @param updateWebhookConfigurationRequest + */ + updateWebhookConfiguration(webhookIdentifier, updateWebhookConfigurationRequest, _options) { + return __async(this, null, function* () { + var _a, _b, _c; + let _config = _options || this.configuration; + if (webhookIdentifier === null || webhookIdentifier === void 0) { + throw new RequiredError("WebhooksApi", "updateWebhookConfiguration", "webhookIdentifier"); + } + if (updateWebhookConfigurationRequest === null || updateWebhookConfigurationRequest === void 0) { + throw new RequiredError("WebhooksApi", "updateWebhookConfiguration", "updateWebhookConfigurationRequest"); + } + const localVarPath = "/api/rest/2.0/webhooks/{webhook_identifier}/update".replace("{webhook_identifier}", encodeURIComponent(String(webhookIdentifier))); + const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.25.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.25.0"); + const contentType = ObjectSerializer.getPreferredMediaType([ + "application/json" + ]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = ObjectSerializer.stringify( + ObjectSerializer.serialize(updateWebhookConfigurationRequest, "UpdateWebhookConfigurationRequest", ""), + contentType + ); + requestContext.setBody(serializedBody); + let authMethod; + authMethod = _config.authMethods["bearerAuth"]; + if (authMethod == null ? void 0 : authMethod.applySecurityAuthentication) { + yield authMethod == null ? void 0 : authMethod.applySecurityAuthentication(requestContext); + } + const defaultAuth = ((_a = _options == null ? void 0 : _options.authMethods) == null ? void 0 : _a.default) || ((_c = (_b = this.configuration) == null ? void 0 : _b.authMethods) == null ? void 0 : _c.default); + if (defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication) { + yield defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication(requestContext); + } + return requestContext; + }); + } +}; +var WebhooksApiResponseProcessor = class { + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to createWebhookConfiguration + * @throws ApiException if the response code was not in [200, 299] + */ + createWebhookConfiguration(response) { + return __async(this, null, function* () { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("200", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "WebhookResponse", + "" + ); + return body; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Invalid request.", body, response.headers); + } + if (isCodeInRange("401", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unexpected error", body, response.headers); + } + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "WebhookResponse", + "" + ); + return body; + } + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", yield response.getBodyAsAny(), response.headers); + }); + } + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to deleteWebhookConfigurations + * @throws ApiException if the response code was not in [200, 299] + */ + deleteWebhookConfigurations(response) { + return __async(this, null, function* () { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("200", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "WebhookDeleteResponse", + "" + ); + return body; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Invalid request.", body, response.headers); + } + if (isCodeInRange("401", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unexpected error", body, response.headers); + } + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "WebhookDeleteResponse", + "" + ); + return body; + } + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", yield response.getBodyAsAny(), response.headers); + }); + } + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to searchWebhookConfigurations + * @throws ApiException if the response code was not in [200, 299] + */ + searchWebhookConfigurations(response) { + return __async(this, null, function* () { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("200", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "WebhookSearchResponse", + "" + ); + return body; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Invalid request.", body, response.headers); + } + if (isCodeInRange("401", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unexpected error", body, response.headers); + } + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "WebhookSearchResponse", + "" + ); + return body; + } + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", yield response.getBodyAsAny(), response.headers); + }); + } + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to updateWebhookConfiguration + * @throws ApiException if the response code was not in [200, 299] + */ + updateWebhookConfiguration(response) { + return __async(this, null, function* () { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("204", response.httpStatusCode)) { + return; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Invalid request.", body, response.headers); + } + if (isCodeInRange("401", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unexpected error", body, response.headers); + } + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "void", + "" + ); + return body; + } + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", yield response.getBodyAsAny(), response.headers); + }); + } +}; + +// types/ObservableAPI.ts +var ObservableAIApi = class { + constructor(configuration, requestFactory, responseProcessor) { + this.configuration = configuration; + this.requestFactory = requestFactory || new AIApiRequestFactory(configuration); + this.responseProcessor = responseProcessor || new AIApiResponseProcessor(); + } + /** + * Version: 26.2.0.cl or later Creates a new Spotter agent conversation based on the provided context and settings. The endpoint was in Beta from 26.2.0.cl through 26.4.0.cl. Requires `CAN_USE_SPOTTER` privilege and at least view access to the metadata object specified in the request. #### Usage guidelines The request must include the `metadata_context` parameter to define the conversation context. The context type can be one of: - `DATA_SOURCE` *(available from 26.5.0.cl)*: targets a specific data source. Provide `data_source_identifier` in `data_source_context` for a single data source, or `data_source_identifiers` for multi-data-source context. The deprecated `guid` field is accepted for backwards compatibility. - `AUTO_MODE` *(available from 26.5.0.cl)*: automatically discovers and selects the most relevant datasets for the user\'s queries. > **Note for callers on versions 26.2.0.cl – 26.4.0.cl (Beta):** use the lowercase `data_source` enum value with the `guid` field instead of the above. Example: `{ \"type\": \"data_source\", \"data_source_context\": { \"guid\": \"\" } }`. The `conversation_settings` parameter controls which Spotter capabilities are enabled for the conversation: - `enable_contextual_change_analysis` (default: `true`, **deprecated from 26.2.0.cl**) — always enabled in Spotter 3; setting this to `false` has no effect on versions >= 26.2.0.cl - `enable_natural_language_answer_generation` (default: `true`, **deprecated from 26.2.0.cl**) — always enabled in Spotter 3; setting this to `false` has no effect on versions >= 26.2.0.cl - `enable_reasoning` (default: `true`, **deprecated from 26.2.0.cl**) — always enabled in Spotter 3; setting this to `false` has no effect on versions >= 26.2.0.cl - `enable_save_chat` (default: `false`, *available from 26.5.0.cl*) — enables saving the conversation for later retrieval via conversation history If the request is successful, the response includes a unique `conversation_identifier` that must be passed to `sendAgentConversationMessage` or `sendAgentConversationMessageStreaming` to send messages within this conversation. The response also includes `conversation_id` with the same value for backwards compatibility; use `conversation_identifier` for new integrations. #### Example request ```json { \"metadata_context\": { \"type\": \"DATA_SOURCE\", \"data_source_context\": { \"data_source_identifier\": \"a1b2c3d4-e5f6-7890-abcd-ef1234567890\" } }, \"conversation_settings\": {} } ``` #### Error responses | Code | Description | | ---- | --------------------------------------------------------------------------------------------------------------------------------------- | | 401 | Unauthorized — authentication token is missing, expired, or invalid. | | 403 | Forbidden — the authenticated user does not have `CAN_USE_SPOTTER` privilege or lacks view permission on the specified metadata object. | > ###### Note: > > - This endpoint was in Beta from 26.2.0.cl through 26.4.0.cl and is Generally Available from version 26.5.0.cl. > - This endpoint requires Spotter - please contact ThoughtSpot support to enable Spotter on your cluster. + * @param createAgentConversationRequest + */ + createAgentConversation(createAgentConversationRequest, _options) { + const requestContextPromise = this.requestFactory.createAgentConversation(createAgentConversationRequest, _options); + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx) => middleware.pre(ctx))); + } + return middlewarePreObservable.pipe(mergeMap((ctx) => this.configuration.httpApi.send(ctx))).pipe(mergeMap((response) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp) => this.responseProcessor.createAgentConversation(rsp))); + })); + } + /** + * Version: 10.4.0.cl or later Creates a new conversation session tied to a specific data model for AI-driven natural language querying. Requires `CAN_USE_SPOTTER` privilege and at least view access to the metadata object specified in the request. #### Usage guidelines The request must include: - `metadata_identifier`: the unique ID of the data source that provides context for the conversation Optionally, you can provide: - `tokens`: a token string to set initial context for the conversation (e.g., `\"[sales],[item type],[state]\"`) If the request is successful, ThoughtSpot returns a unique `conversation_identifier` that must be passed to `sendMessage` to continue the conversation. #### Error responses | Code | Description | |------|-------------| | 401 | Unauthorized — authentication token is missing, expired, or invalid. | | 403 | Forbidden — the authenticated user does not have `CAN_USE_SPOTTER` privilege or lacks view permission on the specified metadata object. | > ###### Note: > * This endpoint is currently in Beta. Breaking changes may be introduced before the endpoint is made Generally Available. > * This endpoint requires Spotter - please contact ThoughtSpot support to enable Spotter on your cluster. + * @param createConversationRequest + */ + createConversation(createConversationRequest, _options) { + const requestContextPromise = this.requestFactory.createConversation(createConversationRequest, _options); + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx) => middleware.pre(ctx))); + } + return middlewarePreObservable.pipe(mergeMap((ctx) => this.configuration.httpApi.send(ctx))).pipe(mergeMap((response) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp) => this.responseProcessor.createConversation(rsp))); + })); + } + /** + * Version: 10.15.0.cl or later Suggests the most relevant data sources for a given natural language query, ranked by confidence with LLM-generated reasoning. Requires `CAN_USE_SPOTTER` privilege and at least view-level access to the underlying metadata entities referenced in the response. #### Usage guidelines The request must include: - `query`: the natural language question to find relevant data sources for If the request is successful, the API returns a ranked list of suggested data sources, each containing: - `confidence`: a float score indicating the model\'s confidence in the relevance of the suggestion - `details`: metadata about the data source - `data_source_identifier`: the unique ID of the data source - `data_source_name`: the display name of the data source - `description`: a description of the data source - `reasoning`: LLM-generated rationale explaining why the data source was recommended #### Error responses | Code | Description | |------|--------------------------------------------------------------------------------------------------------------------------------------------| | 401 | Unauthorized — authentication token is missing, expired, or invalid. | | 403 | Forbidden — the authenticated user does not have `CAN_USE_SPOTTER` privilege or lacks view permission on the underlying metadata entities. | > ###### Note: > * This endpoint is currently in Beta. Breaking changes may be introduced before it is made Generally Available. > * This endpoint requires Spotter — please contact ThoughtSpot Support to enable Spotter on your cluster. + * @param getDataSourceSuggestionsRequest + */ + getDataSourceSuggestions(getDataSourceSuggestionsRequest, _options) { + const requestContextPromise = this.requestFactory.getDataSourceSuggestions(getDataSourceSuggestionsRequest, _options); + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx) => middleware.pre(ctx))); + } + return middlewarePreObservable.pipe(mergeMap((ctx) => this.configuration.httpApi.send(ctx))).pipe(mergeMap((response) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp) => this.responseProcessor.getDataSourceSuggestions(rsp))); + })); + } + /** + * Version: 10.15.0.cl or later Retrieves existing natural language (NL) instructions configured for a specific data model. These instructions guide the AI system in understanding data context and generating more accurate responses. Requires `CAN_USE_SPOTTER` privilege, at least view access on the data model, and a bearer token corresponding to the org where the data model exists. #### Usage guidelines The request must include: - `data_source_identifier`: the unique ID of the data model to retrieve instructions for If the request is successful, the API returns: - `nl_instructions_info`: an array of instruction objects, each containing: - `instructions`: the configured text instructions for AI processing - `scope`: the scope of the instruction — currently only `GLOBAL` is supported #### Instructions scope - **GLOBAL**: Instructions that apply globally across the system on the given data-model (currently only global instructions are supported) #### Error responses | Code | Description | |------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| | 401 | Unauthorized — authentication token is missing, expired, or invalid. | | 403 | Forbidden — the authenticated user does not have `CAN_USE_SPOTTER` privilege, lacks view access on the data model, or the bearer token does not correspond to the org where the data model exists. | > ###### Note: > > - To use this API, the user needs at least view access on the data model, and must use the bearer token corresponding to the org where the data model exists. > - This endpoint is currently in Beta. Breaking changes may be introduced before the endpoint is made Generally Available. > - Available from version 10.15.0.cl and later. > - This endpoint requires Spotter — please contact ThoughtSpot Support to enable Spotter on your cluster. > - Use this API to review currently configured instructions before modifying them with `setNLInstructions`. + * @param getNLInstructionsRequest + */ + getNLInstructions(getNLInstructionsRequest, _options) { + const requestContextPromise = this.requestFactory.getNLInstructions(getNLInstructionsRequest, _options); + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx) => middleware.pre(ctx))); + } + return middlewarePreObservable.pipe(mergeMap((ctx) => this.configuration.httpApi.send(ctx))).pipe(mergeMap((response) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp) => this.responseProcessor.getNLInstructions(rsp))); + })); + } + /** + * Version: 10.13.0.cl or later Breaks down a natural language query into a series of smaller analytical sub-questions, each mapped to a relevant data source. Requires `CAN_USE_SPOTTER` privilege and at least view-level access to the referenced metadata objects. #### Usage guidelines The request must include: - `query`: the natural language question to decompose into analytical sub-questions - `metadata_context`: at least one of the following context identifiers to guide question generation: - `conversation_identifier` — an existing conversation session ID - `answer_identifiers` — a list of Answer GUIDs - `liveboard_identifiers` — a list of Liveboard GUIDs - `data_source_identifiers` — a list of data source GUIDs Optional parameters for refining the output: - `ai_context`: additional context to improve response quality - `content` — supplementary text or CSV data as string input - `instructions` — custom text instructions for the AI system - `limit_relevant_questions`: maximum number of questions to return (default: `5`) - `bypass_cache`: if `true`, forces fresh computation instead of returning cached results If the request is successful, the API returns a list of relevant analytical questions, each containing: - `query`: the generated sub-question - `data_source_identifier`: the unique ID of the data source the question targets - `data_source_name`: the display name of the corresponding data source #### Error responses | Code | Description | |------|---------------------------------------------------------------------------------------------------------------------------------------| | 401 | Unauthorized — authentication token is missing, expired, or invalid. | | 403 | Forbidden — the authenticated user does not have `CAN_USE_SPOTTER` privilege or lacks view access to the referenced metadata objects. | > ###### Note: > * This endpoint is currently in Beta. Breaking changes may be introduced before the endpoint is made Generally Available. > * This endpoint requires Spotter - please contact ThoughtSpot support to enable Spotter on your cluster. + * @param getRelevantQuestionsRequest + */ + getRelevantQuestions(getRelevantQuestionsRequest, _options) { + const requestContextPromise = this.requestFactory.getRelevantQuestions(getRelevantQuestionsRequest, _options); + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx) => middleware.pre(ctx))); + } + return middlewarePreObservable.pipe(mergeMap((ctx) => this.configuration.httpApi.send(ctx))).pipe(mergeMap((response) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp) => this.responseProcessor.getRelevantQuestions(rsp))); + })); + } + /** + * Version: 10.7.0.cl or later **Deprecated** — Use `getRelevantQuestions` instead (available from 10.13.0.cl). Breaks down a topical or goal-oriented natural language question into smaller, actionable analytical sub-questions, each mapped to a relevant data source for independent execution. Requires `CAN_USE_SPOTTER` privilege and at least view-level access to the referenced metadata objects. #### Usage guidelines The request accepts the following parameters: - `nlsRequest`: contains the user `query` to decompose, along with optional `instructions` and `bypassCache` flag - `worksheetIds`: list of data source identifiers to scope the decomposition - `answerIds`: list of Answer GUIDs whose data guides the response - `liveboardIds`: list of Liveboard GUIDs whose data guides the response - `conversationId`: an existing conversation session ID for context continuity - `content`: supplementary text or CSV data to improve response quality - `maxDecomposedQueries`: maximum number of sub-questions to return (default: `5`) If the request is successful, the API returns a `decomposedQueryResponse` containing a list of `decomposedQueries`, each with: - `query`: the generated analytical sub-question - `worksheetId`: the unique ID of the data source the question targets - `worksheetName`: the display name of the corresponding data source #### Error responses | Code | Description | |------|---------------------------------------------------------------------------------------------------------------------------------------| | 401 | Unauthorized — authentication token is missing, expired, or invalid. | | 403 | Forbidden — the authenticated user does not have `CAN_USE_SPOTTER` privilege or lacks view access to the referenced metadata objects. | > ###### Note: > * This endpoint is deprecated since 10.13.0.cl. Use `getRelevantQuestions` for new integrations. > * This endpoint is currently in Beta. Breaking changes may be introduced before the endpoint is made Generally Available. > * This endpoint requires Spotter — please contact ThoughtSpot support to enable Spotter on your cluster. + * @param queryGetDecomposedQueryRequest + */ + queryGetDecomposedQuery(queryGetDecomposedQueryRequest, _options) { + const requestContextPromise = this.requestFactory.queryGetDecomposedQuery(queryGetDecomposedQueryRequest, _options); + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx) => middleware.pre(ctx))); + } + return middlewarePreObservable.pipe(mergeMap((ctx) => this.configuration.httpApi.send(ctx))).pipe(mergeMap((response) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp) => this.responseProcessor.queryGetDecomposedQuery(rsp))); + })); + } + /** + * Version: 26.5.0.cl or later Sends natural language messages to an existing Spotter agent conversation and returns the complete response synchronously. Requires `CAN_USE_SPOTTER` privilege and access to the metadata object associated with the conversation. The user must have access to the conversation session referenced by `conversation_identifier`. A conversation must first be created using the `createAgentConversation` API. #### Usage guidelines The request must include: - `conversation_identifier`: the unique session ID returned by `createAgentConversation`, used for context continuity and message tracking - `messages`: an array of one or more text messages to send to the agent The API returns an array of response objects, each containing: - `type`: the kind of response — `text`, `answer`, or `error` - `message`: the main content of the response - `metadata`: additional information depending on the message type (e.g., answer metadata includes analytics and visualization details) #### Error responses | Code | Description | |------|----------------------------------------------------------------------------------------------------------------------------------| | 401 | Unauthorized — authentication token is missing, expired, or invalid. | | 403 | Forbidden — the authenticated user does not have `CAN_USE_SPOTTER` privilege or lacks permission on the referenced conversation. | > ###### Note: > > - This endpoint is Generally Available from version 26.5.0.cl. > - This endpoint requires Spotter - please contact ThoughtSpot support to enable Spotter on your cluster. > - For real-time streamed responses, use `sendAgentConversationMessageStreaming` instead. + * @param conversationIdentifier Unique identifier for the conversation (used to track context) + * @param sendAgentConversationMessageRequest + */ + sendAgentConversationMessage(conversationIdentifier, sendAgentConversationMessageRequest, _options) { + const requestContextPromise = this.requestFactory.sendAgentConversationMessage(conversationIdentifier, sendAgentConversationMessageRequest, _options); + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx) => middleware.pre(ctx))); + } + return middlewarePreObservable.pipe(mergeMap((ctx) => this.configuration.httpApi.send(ctx))).pipe(mergeMap((response) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp) => this.responseProcessor.sendAgentConversationMessage(rsp))); + })); + } + /** + * Version: 26.5.0.cl or later Sends one or more natural language messages to an existing Spotter agent conversation and returns the response as a real-time Server-Sent Events stream. Requires `CAN_USE_SPOTTER` privilege and access to the metadata object associated with the conversation. The user must have access to the conversation session referenced by `conversation_identifier`. A conversation must first be created using the `createAgentConversation` API. #### Usage guidelines The request must include: - `conversation_identifier`: the unique session ID returned by `createAgentConversation`, used for context continuity and message tracking - `messages`: an array of one or more text messages to send to the agent If the request is valid, the API returns a Server-Sent Events (SSE) stream. Each line has the form `data: [{\"type\": \"...\", ...}]` — a JSON array of event objects. Event types include: - `ack`: confirms receipt of the request (`node_id`) - `conv_title`: conversation title (`title`, `conv_id`) - `notification`: status updates on operations (`group_id`, `metadata`, `code` — e.g. `TOOL_CALL_NOTIFICATION`, `nls_start`, `FINAL_RESPONSE_NOTIFICATION`) - `text-chunk`: incremental content chunks (`id`, `group_id`, `metadata` with `format` and `type` such as `thinking` or `text`, `content`) - `text`: full text block with same structure as `text-chunk` - `answer`: structured answer with metadata (`id`, `group_id`, `metadata` with `sage_query`, `session_id`, `title`, etc., `title`) - `error`: if a failure occurs #### Error responses | Code | Description | | ---- | -------------------------------------------------------------------------------------------------------------------------------- | | 401 | Unauthorized — authentication token is missing, expired, or invalid. | | 403 | Forbidden — the authenticated user does not have `CAN_USE_SPOTTER` privilege or lacks permission on the referenced conversation. | > ###### Note: > > - This endpoint is Generally Available from version 26.5.0.cl. > - This endpoint requires Spotter - please contact ThoughtSpot support to enable Spotter on your cluster. > - The streaming protocol uses Server-Sent Events (SSE). > - For the complete response in a single payload, use `sendAgentConversationMessage` instead. + * @param conversationIdentifier Unique identifier for the conversation (used to track context) + * @param sendAgentConversationMessageStreamingRequest + */ + sendAgentConversationMessageStreaming(conversationIdentifier, sendAgentConversationMessageStreamingRequest, _options) { + const requestContextPromise = this.requestFactory.sendAgentConversationMessageStreaming(conversationIdentifier, sendAgentConversationMessageStreamingRequest, _options); + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx) => middleware.pre(ctx))); + } + return middlewarePreObservable.pipe(mergeMap((ctx) => this.configuration.httpApi.send(ctx))).pipe(mergeMap((response) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp) => this.responseProcessor.sendAgentConversationMessageStreaming(rsp))); + })); + } + /** + * Version: 26.2.0.cl or later **Deprecated** — Use `sendAgentConversationMessage` instead. Send natural language messages to an existing Spotter agent conversation and returns the complete response synchronously. Requires `CAN_USE_SPOTTER` privilege and access to the metadata object associated with the conversation. The user must have access to the conversation session referenced by `conversation_identifier`. A conversation must first be created using the `createAgentConversation` API. #### Usage guidelines The request must include: - `conversation_identifier`: the unique session ID returned by `createAgentConversation`, used for context continuity and message tracking - `messages`: an array of one or more text messages to send to the agent The API returns an array of response objects, each containing: - `type`: the kind of response — `text`, `answer`, or `error` - `message`: the main content of the response - `metadata`: additional information depending on the message type (e.g., answer metadata includes analytics and visualization details) #### Error responses | Code | Description | |------|----------------------------------------------------------------------------------------------------------------------------------| | 401 | Unauthorized — authentication token is missing, expired, or invalid. | | 403 | Forbidden — the authenticated user does not have `CAN_USE_SPOTTER` privilege or lacks permission on the referenced conversation. | > ###### Note: > > - This endpoint is deprecated. Use `sendAgentConversationMessage` for new integrations. > - This endpoint is currently in Beta. Breaking changes may be introduced before the endpoint is made Generally Available. > - This endpoint requires Spotter - please contact ThoughtSpot support to enable Spotter on your cluster. + * @param conversationIdentifier Unique identifier for the conversation (used to track context) + * @param sendAgentMessageRequest + */ + sendAgentMessage(conversationIdentifier, sendAgentMessageRequest, _options) { + const requestContextPromise = this.requestFactory.sendAgentMessage(conversationIdentifier, sendAgentMessageRequest, _options); + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx) => middleware.pre(ctx))); + } + return middlewarePreObservable.pipe(mergeMap((ctx) => this.configuration.httpApi.send(ctx))).pipe(mergeMap((response) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp) => this.responseProcessor.sendAgentMessage(rsp))); + })); + } + /** + * Version: 26.2.0.cl or later **Deprecated** — Use `sendAgentConversationMessageStreaming` instead. Sends one or more natural language messages to an existing Spotter agent conversation and returns the response as a real-time Server-Sent Events stream. Requires `CAN_USE_SPOTTER` privilege and access to the metadata object associated with the conversation. The user must have access to the conversation session referenced by `conversation_identifier`. A conversation must first be created using the `createAgentConversation` API. #### Usage guidelines The request must include: - `conversation_identifier`: the unique session ID returned by `createAgentConversation`, used for context continuity and message tracking - `messages`: an array of one or more text messages to send to the agent If the request is valid, the API returns a Server-Sent Events (SSE) stream. Each line has the form `data: [{\"type\": \"...\", ...}]` — a JSON array of event objects. Event types include: - `ack`: confirms receipt of the request (`node_id`) - `conv_title`: conversation title (`title`, `conv_id`) - `notification`: status updates on operations (`group_id`, `metadata`, `code` — e.g. `TOOL_CALL_NOTIFICATION`, `nls_start`, `FINAL_RESPONSE_NOTIFICATION`) - `text-chunk`: incremental content chunks (`id`, `group_id`, `metadata` with `format` and `type` such as `thinking` or `text`, `content`) - `text`: full text block with same structure as `text-chunk` - `answer`: structured answer with metadata (`id`, `group_id`, `metadata` with `sage_query`, `session_id`, `title`, etc., `title`) - `error`: if a failure occurs #### Error responses | Code | Description | |------|----------------------------------------------------------------------------------------------------------------------------------| | 401 | Unauthorized — authentication token is missing, expired, or invalid. | | 403 | Forbidden — the authenticated user does not have `CAN_USE_SPOTTER` privilege or lacks permission on the referenced conversation. | > ###### Note: > > - This endpoint is deprecated. Use `sendAgentConversationMessageStreaming` for new integrations. > - This endpoint is currently in Beta. Breaking changes may be introduced before the endpoint is made Generally Available. > - This endpoint requires Spotter - please contact ThoughtSpot support to enable Spotter on your cluster. > - The streaming protocol uses Server-Sent Events (SSE). + * @param sendAgentMessageStreamingRequest + */ + sendAgentMessageStreaming(sendAgentMessageStreamingRequest, _options) { + const requestContextPromise = this.requestFactory.sendAgentMessageStreaming(sendAgentMessageStreamingRequest, _options); + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx) => middleware.pre(ctx))); + } + return middlewarePreObservable.pipe(mergeMap((ctx) => this.configuration.httpApi.send(ctx))).pipe(mergeMap((response) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp) => this.responseProcessor.sendAgentMessageStreaming(rsp))); + })); + } + /** + * Version: 10.4.0.cl or later Sends a follow-up message to an existing conversation within the context of a data model. Requires `CAN_USE_SPOTTER` privilege and at least view access to the metadata object specified in the request. A conversation must first be created using the `createConversation` API. #### Usage guidelines The request must include: - `conversation_identifier`: the unique session ID returned by `createConversation` - `metadata_identifier`: the unique ID of the data source used for the conversation - `message`: a natural language string with the follow-up question If the request is successful, the API returns an array of response messages, each containing: - `session_identifier`: the unique ID of the generated response - `generation_number`: the generation number of the response - `message_type`: the type of the response (e.g., `TSAnswer`) - `visualization_type`: the generated visualization type (`Chart`, `Table`, or `Undefined`) - `tokens` / `display_tokens`: the search tokens and user-friendly display tokens for the response #### Error responses | Code | Description | |------|-----------------------------------------------------------------------------------------------------------------------------------------| | 401 | Unauthorized — authentication token is missing, expired, or invalid. | | 403 | Forbidden — the authenticated user does not have `CAN_USE_SPOTTER` privilege or lacks view permission on the specified metadata object. | > ###### Note: > * This endpoint is currently in Beta. Breaking changes may be introduced before the endpoint is made Generally Available. > * This endpoint requires Spotter - please contact ThoughtSpot support to enable Spotter on your cluster. + * @param conversationIdentifier Unique identifier of the conversation. + * @param sendMessageRequest + */ + sendMessage(conversationIdentifier, sendMessageRequest, _options) { + const requestContextPromise = this.requestFactory.sendMessage(conversationIdentifier, sendMessageRequest, _options); + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx) => middleware.pre(ctx))); + } + return middlewarePreObservable.pipe(mergeMap((ctx) => this.configuration.httpApi.send(ctx))).pipe(mergeMap((response) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp) => this.responseProcessor.sendMessage(rsp))); + })); + } + /** + * Version: 10.15.0.cl or later This API allows users to set natural language (NL) instructions for a specific data-model to improve AI-generated answers and query processing. These instructions help guide the AI system to better understand the data context and provide more accurate responses. Requires `CAN_USE_SPOTTER` privilege, either edit access or `SPOTTER_COACHING_PRIVILEGE` on the data model, and a bearer token corresponding to the org where the data model exists. #### Usage guidelines To set NL instructions for a data-model, the request must include: - `data_source_identifier`: The unique ID of the data-model for which to set NL instructions - `nl_instructions_info`: An array of instruction objects, each containing: - `instructions`: Array of text instructions for the LLM - `scope`: The scope of the instruction (`GLOBAL`). Currently only `GLOBAL` is supported. It can be extended to data-model-user scope in future. #### Instructions scope - **GLOBAL**: instructions that apply to all users querying this data model If the request is successful, the API returns: - `success`: a boolean indicating whether the operation completed successfully #### Error responses | Code | Description | |------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| | 401 | Unauthorized — authentication token is missing, expired, or invalid. | | 403 | Forbidden — the authenticated user does not have `CAN_USE_SPOTTER` privilege, lacks edit access or `SPOTTER_COACHING_PRIVILEGE` on the data model, or the bearer token does not correspond to the org where the data model exists. | > ###### Note: > > - To use this API, the user needs either edit access or `SPOTTER_COACHING_PRIVILEGE` on the data model, and must use the bearer token corresponding to the org where the data model exists. > - This endpoint is currently in Beta. Breaking changes may be introduced before the endpoint is made Generally Available. > - Available from version 10.15.0.cl and later. > - This endpoint requires Spotter — please contact ThoughtSpot Support to enable Spotter on your cluster. > - Instructions help improve the accuracy and relevance of AI-generated responses for the specified data-model. + * @param setNLInstructionsRequest + */ + setNLInstructions(setNLInstructionsRequest, _options) { + const requestContextPromise = this.requestFactory.setNLInstructions(setNLInstructionsRequest, _options); + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx) => middleware.pre(ctx))); + } + return middlewarePreObservable.pipe(mergeMap((ctx) => this.configuration.httpApi.send(ctx))).pipe(mergeMap((response) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp) => this.responseProcessor.setNLInstructions(rsp))); + })); + } + /** + * Version: 10.4.0.cl or later Processes a natural language query against a specified data model and returns a single AI-generated answer without requiring a conversation session. Requires `CAN_USE_SPOTTER` privilege and at least view access to the metadata object specified in the request. #### Usage guidelines The request must include: - `query`: a natural language question (e.g., \"What were total sales last quarter?\") - `metadata_identifier`: the unique ID of the data source to query against If the request is successful, the API returns a response message containing: - `session_identifier`: the unique ID of the generated response - `generation_number`: the generation number of the response - `message_type`: the type of the response (e.g., `TSAnswer`) - `visualization_type`: the generated visualization type (`Chart`, `Table`, or `Undefined`) - `tokens` / `display_tokens`: the search tokens and user-friendly display tokens for the response #### Error responses | Code | Description | |------|-----------------------------------------------------------------------------------------------------------------------------------------| | 401 | Unauthorized — authentication token is missing, expired, or invalid. | | 403 | Forbidden — the authenticated user does not have `CAN_USE_SPOTTER` privilege or lacks view permission on the specified metadata object. | > ###### Note: > * This endpoint is currently in Beta. Breaking changes may be introduced before the endpoint is made Generally Available. > * This endpoint requires Spotter - please contact ThoughtSpot support to enable Spotter on your cluster. + * @param singleAnswerRequest + */ + singleAnswer(singleAnswerRequest, _options) { + const requestContextPromise = this.requestFactory.singleAnswer(singleAnswerRequest, _options); + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx) => middleware.pre(ctx))); + } + return middlewarePreObservable.pipe(mergeMap((ctx) => this.configuration.httpApi.send(ctx))).pipe(mergeMap((response) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp) => this.responseProcessor.singleAnswer(rsp))); + })); + } + /** + * Stops an in-progress agent conversation response. Version: 26.6.0.cl or later Version: 26.6.0.cl or later Stops an in-progress agent response for the specified conversation. Use this endpoint to cancel a response that is actively being generated — for example, when the user navigates away, reformulates their question, or no longer needs the current result. Requires `CAN_USE_SPOTTER` privilege and access to the specified conversation. #### Usage guidelines The request must include: - `conversation_identifier` *(path parameter)*: the unique ID of the conversation whose active response should be stopped, as returned by `createAgentConversation` A successful request returns an empty `204 No Content` response. If there is no active response in progress at the time of the call, the request is still treated as successful. After stopping a response, the conversation session remains active. You can continue sending messages using `sendAgentConversationMessage` or `sendAgentConversationMessageStreaming`. #### Example request ```bash POST /api/rest/2.0/ai/agent/conversation/{conversation_identifier}/stop-response ``` #### Typical usage scenario This endpoint is useful when integrating Spotter into a chat UI where users can cancel a long-running query. For example: 1. User sends a message via `sendAgentConversationMessageStreaming`. 2. User clicks a \"Stop generating\" button while the response is streaming. 3. Your client calls `stopConversation` with the active `conversation_identifier`. 4. The stream is terminated and the user can ask a new question. #### Error responses | Code | Description | |------|-------------| | 401 | Unauthorized — authentication token is missing, expired, or invalid. | | 403 | Forbidden — the authenticated user does not have `CAN_USE_SPOTTER` privilege or lacks access to the specified conversation. | > ###### Note: > > - Calling this endpoint when no response is in progress does not return an error. > - The conversation context is preserved after stopping — previous messages and answers remain accessible. > - Available from version 26.6.0.cl and later. > - This endpoint requires Spotter — please contact ThoughtSpot Support to enable Spotter on your cluster. > - This feature is available only for **Spotter 3** (`SPOTTER3`) version. + * @param conversationIdentifier Unique identifier of the conversation to stop. + */ + stopConversation(conversationIdentifier, _options) { + const requestContextPromise = this.requestFactory.stopConversation(conversationIdentifier, _options); + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx) => middleware.pre(ctx))); + } + return middlewarePreObservable.pipe(mergeMap((ctx) => this.configuration.httpApi.send(ctx))).pipe(mergeMap((response) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp) => this.responseProcessor.stopConversation(rsp))); + })); + } +}; +var ObservableAuthenticationApi = class { + constructor(configuration, requestFactory, responseProcessor) { + this.configuration = configuration; + this.requestFactory = requestFactory || new AuthenticationApiRequestFactory(configuration); + this.responseProcessor = responseProcessor || new AuthenticationApiResponseProcessor(); + } + /** + * Version: 26.6.0.cl or later Enables or disables authentication at cluster or org level for the specified auth type. Currently supports `TRUSTED_AUTH`. #### Required privileges Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) or `CONTROL_TRUSTED_AUTH` (**Can Enable or Disable Trusted Authentication**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled, the `CONTROL_TRUSTED_AUTH` privilege is required. #### Usage guidelines Use `cluster_preferences` to enable or disable authentication at the cluster level. Cluster-level settings can only be configured from the Primary Org. - `ENABLED` — Generates a new access token if one does not exist. An existing token is preserved. - `DISABLED` — Revokes the existing cluster-level access token. Use `org_preferences` to enable or disable authentication for one or more Orgs. Each entry must include an `org_identifier` (unique ID or name) and an `auth_status`. Org-level configuration requires the per-Org authentication feature to be enabled on your instance. - `ENABLED` — Generates a new org-level access token if one does not exist. - `DISABLED` — Revokes the existing org-level access token for that Org. Both `cluster_preferences` and `org_preferences` are optional. Omitting a field leaves the corresponding settings unchanged. If both are omitted, the API returns `204 No Content` without making any changes. **Note**: Cluster-level and org-level settings are independent of each other. Enabling or disabling one does not affect the other. + * @param configureAuthSettingsRequest + */ + configureAuthSettings(configureAuthSettingsRequest, _options) { + const requestContextPromise = this.requestFactory.configureAuthSettings(configureAuthSettingsRequest, _options); + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx) => middleware.pre(ctx))); + } + return middlewarePreObservable.pipe(mergeMap((ctx) => this.configuration.httpApi.send(ctx))).pipe(mergeMap((response) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp) => this.responseProcessor.configureAuthSettings(rsp))); + })); + } + /** + * Version: 9.0.0.cl or later Retrieves details of the current user session for the token provided in the request header. Any ThoughtSpot user can access this endpoint and send an API request. The data returned in the API response varies according to user\'s privilege and object access permissions. **NOTE**: In ThoughtSpot, users with cluster administration privileges can access all Orgs by default. However, unless the administrator is explicitly added to an Org, the Orgs list in the session information returned by the API will include only the Primary Org. To include other Orgs in the API response, you must explicitly add the administrator to each Org in the Admin settings page in the UI or via user REST API. + */ + getCurrentUserInfo(_options) { + const requestContextPromise = this.requestFactory.getCurrentUserInfo(_options); + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx) => middleware.pre(ctx))); + } + return middlewarePreObservable.pipe(mergeMap((ctx) => this.configuration.httpApi.send(ctx))).pipe(mergeMap((response) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp) => this.responseProcessor.getCurrentUserInfo(rsp))); + })); + } + /** + * Version: 9.4.0.cl or later Retrieves details of the current session token for the bearer token provided in the request header. This API endpoint does not create a new token. Instead, it returns details about the token, including the token string, creation time, expiration time, and the associated user. Use this endpoint to introspect your current session token, debug authentication issues, or when a frontend application needs session token details. Any ThoughtSpot user with a valid bearer token can access this endpoint and send an API request + */ + getCurrentUserToken(_options) { + const requestContextPromise = this.requestFactory.getCurrentUserToken(_options); + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx) => middleware.pre(ctx))); + } + return middlewarePreObservable.pipe(mergeMap((ctx) => this.configuration.httpApi.send(ctx))).pipe(mergeMap((response) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp) => this.responseProcessor.getCurrentUserToken(rsp))); + })); + } + /** + * Version: 10.4.0.cl or later Creates an authentication token that provides values for the formula variables in the Row Level Security (RLS) rules for a given user. Recommended for use cases that require Attribute-based access control (ABAC) via RLS. #### Required privileges To add a new user and assign privileges during auto-creation, the `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege is required. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled, the `CONTROL_TRUSTED_AUTH` (**Can Enable or Disable Trusted Authentication**) privilege and edit access to the data source are required. To configure formula variables for all Orgs on your instance or the Primary Org, cluster administration privileges are required. Org administrators can configure formula variables for their respective Orgs. If Role-Based Access Control (RBAC) is enabled, users with the `CAN_MANAGE_VARIABLES` (**Can manage variables**) role privilege can also create and manage variables for their Org context. #### Usage guidelines You can generate a token by providing a `username` and `password`, or by using a `secret_key`. To generate a `secret_key`, the administrator must enable [Trusted authentication](https://developers.thoughtspot.com/docs/trusted-auth-secret-key) in the **Develop** > **Customizations** > **Security Settings** page. **Note**: * When both `password` and `secret_key` are included in the API request, `password` takes precedence. * If [Multi-Factor Authentication (MFA)](https://docs.thoughtspot.com/cloud/latest/authentication-local-mfa) is enabled on your instance, the API login request with `username` and `password` returns an error. You can switch to token-based authentication with `secret_key` or contact ThoughtSpot Support for assistance. The token obtained from ThoughtSpot is valid for 5 minutes by default. You can configure the token expiration time as required. #### ABAC via RLS To implement ABAC via RLS and assign security entitlements to users during session creation, generate a token with custom variable values. The values set in the authentication token are applied to the formula variables referenced in RLS rules at the table level, which determines the data each user can access based on their entitlements. The variable values can be configured to persist for a specific set of Models in user sessions initiated with the token, allowing different RLS rules to be set for different data models. Once defined, the rules are added to the user\'s `variable_values` object, after which all sessions will use the persisted values. For more information, see [ABAC via tokens Documentation](https://developers.thoughtspot.com/docs/abac-via-rls-variables). ##### Formula variables Before defining variable values, ensure the variables are created and available on your instance. To create a formula variable, you can use the **Create variable** (`/api/rest/2.0/template/variables/create`) REST API endpoint, with the variable `type` set as `Formula_Variable` in the API request. The API doesn\'t support `\"persist_option\": \"RESET\"` and `\"persist_option\": \"NONE\"` when `variable_values` are defined in the request. If you are using `variable_values` for token generation, you must use other supported persist options such as `APPEND` or `REPLACE`. If you want to use `RESET` or `NONE`, do not pass any `variable_values`. In such cases, `variable_values` will remain unaffected. #### Supported objects The supported object type is `LOGICAL_TABLE`. When using `object_id` with `variable_values`, models are supported. #### Just-in-time provisioning For [just-in-time user creation and provisioning](https://developers.thoughtspot.com/docs/just-in-time-provisioning), specify the following attributes in the API request: * `auto_create` * `username` * `display_name` * `email` * `groups` Set `auto_create` to `true` if the username does not exist in ThoughtSpot. If the username already exists in ThoughtSpot and `auto_create` is set to `true`, user properties such as display name, email, Org and group entitlements will not be updated with new values. Setting `auto_create` to `true` does not create formula variables. Hence, this setting will not be applicable to `variable_values`. #### Important point to note All options in the token creation APIs that define user access to data in ThoughtSpot will take effect during token creation, not when the token is used for authentication. For example, `auto_create:true` will create the user when the authentication token is created. Persist options such as `APPEND` and `REPLACE` will persist `variable_values` on the user profile when the token is created. + * @param getCustomAccessTokenRequest + */ + getCustomAccessToken(getCustomAccessTokenRequest, _options) { + const requestContextPromise = this.requestFactory.getCustomAccessToken(getCustomAccessTokenRequest, _options); + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx) => middleware.pre(ctx))); + } + return middlewarePreObservable.pipe(mergeMap((ctx) => this.configuration.httpApi.send(ctx))).pipe(mergeMap((response) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp) => this.responseProcessor.getCustomAccessToken(rsp))); + })); + } + /** + * Version: 9.0.0.cl or later Generates an authentication token for creating a full session in ThoughtSpot for a given user. Recommended for use cases that do not require Attribute-based access control (ABAC) via Row Level Security (RLS). #### Usage guidelines You can generate a token for a user by providing a `username` and `password`, or by using the `secret_key` generated for your instance. To generate a `secret_key`, the administrator must enable [Trusted authentication](https://developers.thoughtspot.com/docs/trusted-auth-secret-key) in the **Develop** > **Customizations** > **Security Settings** page. **Note**: * When both `password` and `secret_key` are included in the API request, `password` takes precedence. * If [Multi-Factor Authentication (MFA)](https://docs.thoughtspot.com/cloud/latest/authentication-local-mfa) is enabled on your instance, the API login request with `username` and `password` returns an error. You can switch to token-based authentication with `secret_key` or contact ThoughtSpot Support for assistance. The token obtained from ThoughtSpot is valid for 5 minutes by default. You can configure the token expiration time as required. #### Just-in-time provisioning For [just-in-time user creation and provisioning](https://developers.thoughtspot.com/docs/just-in-time-provisioning), specify the following attributes in the API request: * `auto_create` * `username` * `display_name` * `email` * `group_identifiers` Set `auto_create` to `true` if the username does not exist in ThoughtSpot. If the user already exists in ThoughtSpot and `auto_create` is set to `true`, user properties such as display name, email and group assignment will be updated. To add a new user and assign privileges during auto-creation, the `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege is required. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled, the `CONTROL_TRUSTED_AUTH` (**Can Enable or Disable Trusted Authentication**) privilege is required. #### Important point to note All options in the token creation APIs that define user access to data in ThoughtSpot will take effect during token creation, not when the token is used for authentication. For example, `auto_create:true` will create the user when the authentication token is created. + * @param getFullAccessTokenRequest + */ + getFullAccessToken(getFullAccessTokenRequest, _options) { + const requestContextPromise = this.requestFactory.getFullAccessToken(getFullAccessTokenRequest, _options); + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx) => middleware.pre(ctx))); + } + return middlewarePreObservable.pipe(mergeMap((ctx) => this.configuration.httpApi.send(ctx))).pipe(mergeMap((response) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp) => this.responseProcessor.getFullAccessToken(rsp))); + })); + } + /** + * Version: 9.0.0.cl or later Generates an authentication token that provides access to a specific metadata object. This object list is intersected with the list of objects the user is allowed to access via group membership. For more information, see [Object security](https://docs.thoughtspot.com/cloud/latest/security-data-object#object_security). #### Usage guidelines You can generate a token for a user by providing a `username` and `password`, or by using the `secret_key` generated for your instance. To generate a `secret_key`, the administrator must enable [Trusted authentication](https://developers.thoughtspot.com/docs/trusted-auth-secret-key) in the **Develop** > **Customizations** > **Security Settings** page. **Note**: * When both `password` and `secret_key` are included in the API request, `password` takes precedence. * If [Multi-Factor Authentication (MFA)](https://docs.thoughtspot.com/cloud/latest/authentication-local-mfa) is enabled on your instance, the API login request with `username` and `password` returns an error. You can switch to token-based authentication with `secret_key` or contact ThoughtSpot Support for assistance. The token obtained from ThoughtSpot is valid for 5 minutes by default. You can configure the token expiration time as required. #### Just-in-time provisioning For [just-in-time user creation and provisioning](https://developers.thoughtspot.com/docs/just-in-time-provisioning), specify the following attributes in the API request: * `auto_create` * `username` * `display_name` * `email` * `group_identifiers` Set `auto_create` to `true` if the user is not available in ThoughtSpot. If the user already exists in ThoughtSpot and the `auto_create` parameter is set to `true`, user properties such as display name, email, and group assignment will be updated. To add a new user and assign privileges, the `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege is required. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled, the `CONTROL_TRUSTED_AUTH`(**Can Enable or Disable Trusted Authentication**) privilege is required. #### Important point to note All options in the token creation APIs that define user access to data in ThoughtSpot will take effect during token creation, not when the token is used for authentication. For example, `auto_create:true` will create the user when the authentication token is created. + * @param getObjectAccessTokenRequest + */ + getObjectAccessToken(getObjectAccessTokenRequest, _options) { + const requestContextPromise = this.requestFactory.getObjectAccessToken(getObjectAccessTokenRequest, _options); + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx) => middleware.pre(ctx))); + } + return middlewarePreObservable.pipe(mergeMap((ctx) => this.configuration.httpApi.send(ctx))).pipe(mergeMap((response) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp) => this.responseProcessor.getObjectAccessToken(rsp))); + })); + } + /** + * Version: 9.0.0.cl or later Creates a login session for a ThoughtSpot user with Basic authentication. In Basic authentication method, REST clients log in to ThoughtSpot using `username` and `password` attributes. On a multi-tenant cluster with Orgs, users can pass the ID of the Org in the API request to log in to a specific Org context. **Note**: If Multi-Factor Authentication (MFA) is enabled on your instance, the API login request with basic authentication (`username` and `password` ) returns an error. Contact ThoughtSpot Support for assistance. A successful login returns a session cookie that can be used in your subsequent API requests. + * @param loginRequest + */ + login(loginRequest, _options) { + const requestContextPromise = this.requestFactory.login(loginRequest, _options); + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx) => middleware.pre(ctx))); + } + return middlewarePreObservable.pipe(mergeMap((ctx) => this.configuration.httpApi.send(ctx))).pipe(mergeMap((response) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp) => this.responseProcessor.login(rsp))); + })); + } + /** + * Version: 9.0.0.cl or later Logs out a user from their current session. + */ + logout(_options) { + const requestContextPromise = this.requestFactory.logout(_options); + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx) => middleware.pre(ctx))); + } + return middlewarePreObservable.pipe(mergeMap((ctx) => this.configuration.httpApi.send(ctx))).pipe(mergeMap((response) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp) => this.responseProcessor.logout(rsp))); + })); + } + /** + * Version: 9.0.0.cl or later Revokes the authentication token issued for current user session. The token of your current session expires when you make a call to the `/api/rest/2.0/auth/token/revoke` endpoint. the users will not be able to access ThoughtSpot objects until a new token is obtained. To restart your session, request for a new token from ThoughtSpot. See [Get Full Access Token](#/http/api-endpoints/authentication/get-full-access-token). + * @param revokeTokenRequest + */ + revokeToken(revokeTokenRequest, _options) { + const requestContextPromise = this.requestFactory.revokeToken(revokeTokenRequest, _options); + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx) => middleware.pre(ctx))); + } + return middlewarePreObservable.pipe(mergeMap((ctx) => this.configuration.httpApi.send(ctx))).pipe(mergeMap((response) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp) => this.responseProcessor.revokeToken(rsp))); + })); + } + /** + * Version: 26.6.0.cl or later Returns the authentication configuration for the specified auth type at cluster and org level. Currently supports `TRUSTED_AUTH`. #### Required privileges Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) or `CONTROL_TRUSTED_AUTH` (**Can Enable or Disable Trusted Authentication**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled, the `CONTROL_TRUSTED_AUTH` privilege is required. #### Usage guidelines Use `scope` to control which level of settings are returned: - `CLUSTER` — Returns cluster-level authentication status and access tokens. Accessible only from the Primary Org. - `ORG` — Returns org-level authentication status and access tokens for the current Org. Requires the per-Org authentication feature to be enabled on your instance. - If `scope` is omitted, both cluster and org-level settings are returned based on the caller\'s org context and feature availability. The `access_tokens` array in `cluster_preferences` or `org_preferences` is omitted when no token is configured at that level. **Note**: Access tokens returned in the response are sensitive credentials. Treat them with the same care as passwords. + * @param searchAuthSettingsRequest + */ + searchAuthSettings(searchAuthSettingsRequest, _options) { + const requestContextPromise = this.requestFactory.searchAuthSettings(searchAuthSettingsRequest, _options); + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx) => middleware.pre(ctx))); + } + return middlewarePreObservable.pipe(mergeMap((ctx) => this.configuration.httpApi.send(ctx))).pipe(mergeMap((response) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp) => this.responseProcessor.searchAuthSettings(rsp))); + })); + } + /** + * Version: 9.12.0.cl or later Validates the authentication token specified in the API request. If your token is not valid, [Get a new token](#/http/api-endpoints/authentication/get-full-access-token). + * @param validateTokenRequest + */ + validateToken(validateTokenRequest, _options) { + const requestContextPromise = this.requestFactory.validateToken(validateTokenRequest, _options); + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx) => middleware.pre(ctx))); + } + return middlewarePreObservable.pipe(mergeMap((ctx) => this.configuration.httpApi.send(ctx))).pipe(mergeMap((response) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp) => this.responseProcessor.validateToken(rsp))); + })); + } +}; +var ObservableCollectionsApi = class { + constructor(configuration, requestFactory, responseProcessor) { + this.configuration = configuration; + this.requestFactory = requestFactory || new CollectionsApiRequestFactory(configuration); + this.responseProcessor = responseProcessor || new CollectionsApiResponseProcessor(); + } + /** + * Version: 26.4.0.cl or later Creates a new collection in ThoughtSpot. Collections allow you to organize and group related metadata objects such as Liveboards, Answers, worksheets, and other data objects. You can also create nested collections (sub-collections) to build a hierarchical structure. #### Supported operations The API endpoint lets you perform the following operations: * Create a new collection * Add metadata objects (Liveboards, Answers, Logical Tables) to the collection * Create nested collections by adding sub-collections + * @param createCollectionRequest + */ + createCollection(createCollectionRequest, _options) { + const requestContextPromise = this.requestFactory.createCollection(createCollectionRequest, _options); + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx) => middleware.pre(ctx))); + } + return middlewarePreObservable.pipe(mergeMap((ctx) => this.configuration.httpApi.send(ctx))).pipe(mergeMap((response) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp) => this.responseProcessor.createCollection(rsp))); + })); + } + /** + * Version: 26.4.0.cl or later Deletes one or more collections from ThoughtSpot. #### Delete options * **delete_children**: When set to `true`, deletes the child objects (metadata items) within the collection that the user has access to. Objects that the user does not have permission to delete will be skipped. * **dry_run**: When set to `true`, performs a preview of the deletion operation without actually deleting anything. The response shows what would be deleted, allowing you to review before committing the deletion. #### Response The response includes: * **metadata_deleted**: List of metadata objects that were successfully deleted * **metadata_skipped**: List of metadata objects that were skipped due to lack of permissions or other constraints + * @param deleteCollectionRequest + */ + deleteCollection(deleteCollectionRequest, _options) { + const requestContextPromise = this.requestFactory.deleteCollection(deleteCollectionRequest, _options); + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx) => middleware.pre(ctx))); + } + return middlewarePreObservable.pipe(mergeMap((ctx) => this.configuration.httpApi.send(ctx))).pipe(mergeMap((response) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp) => this.responseProcessor.deleteCollection(rsp))); + })); + } + /** + * Version: 26.4.0.cl or later Gets a list of collections available in ThoughtSpot. To get details of a specific collection, specify the collection GUID or name. You can also filter the API response based on the collection name pattern, author, and other criteria. #### Search options * **name_pattern**: Use \'%\' as a wildcard character to match collection names * **collection_identifiers**: Search for specific collections by their GUIDs or names * **include_metadata**: When set to `true`, includes the metadata objects within each collection in the response **NOTE**: If the API returns an empty list, consider increasing the value of the `record_size` parameter. To search across all available collections, set `record_size` to `-1`. + * @param searchCollectionsRequest + */ + searchCollections(searchCollectionsRequest, _options) { + const requestContextPromise = this.requestFactory.searchCollections(searchCollectionsRequest, _options); + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx) => middleware.pre(ctx))); + } + return middlewarePreObservable.pipe(mergeMap((ctx) => this.configuration.httpApi.send(ctx))).pipe(mergeMap((response) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp) => this.responseProcessor.searchCollections(rsp))); + })); + } + /** + * Version: 26.4.0.cl or later Updates an existing collection in ThoughtSpot. #### Supported operations This API endpoint lets you perform the following operations: * Update collection name and description * Change visibility settings * Add metadata objects to the collection (operation: ADD) * Remove metadata objects from the collection (operation: REMOVE) * Replace all metadata objects in the collection (operation: REPLACE) #### Operation types * **ADD**: Adds the specified metadata objects to the existing collection without removing current items * **REMOVE**: Removes only the specified metadata objects from the collection * **REPLACE**: Replaces all existing metadata objects with the specified items (default behavior) + * @param collectionIdentifier Unique GUID of the collection. Note: Collection names cannot be used as identifiers since duplicate names are allowed. + * @param updateCollectionRequest + */ + updateCollection(collectionIdentifier, updateCollectionRequest, _options) { + const requestContextPromise = this.requestFactory.updateCollection(collectionIdentifier, updateCollectionRequest, _options); + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx) => middleware.pre(ctx))); + } + return middlewarePreObservable.pipe(mergeMap((ctx) => this.configuration.httpApi.send(ctx))).pipe(mergeMap((response) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp) => this.responseProcessor.updateCollection(rsp))); + })); + } +}; +var ObservableConnectionConfigurationsApi = class { + constructor(configuration, requestFactory, responseProcessor) { + this.configuration = configuration; + this.requestFactory = requestFactory || new ConnectionConfigurationsApiRequestFactory(configuration); + this.responseProcessor = responseProcessor || new ConnectionConfigurationsApiResponseProcessor(); + } + /** + * Version: 10.12.0.cl or later Gets connection configuration objects. Requires `DATAMANAGEMENT` (**Can manage data**) and edit permissions to the connection object, or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) privilege is required. #### Usage guidelines * To get a list of all configurations available in the ThoughtSpot system, send the API request with only the connection name or GUID in the request body. * To fetch details of a configuration object, specify the configuration object name or GUID. + * @param connectionConfigurationSearchRequest + */ + connectionConfigurationSearch(connectionConfigurationSearchRequest, _options) { + const requestContextPromise = this.requestFactory.connectionConfigurationSearch(connectionConfigurationSearchRequest, _options); + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx) => middleware.pre(ctx))); + } + return middlewarePreObservable.pipe(mergeMap((ctx) => this.configuration.httpApi.send(ctx))).pipe(mergeMap((response) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp) => this.responseProcessor.connectionConfigurationSearch(rsp))); + })); + } + /** + * Version: 10.12.0.cl or later Creates an additional configuration to an existing connection to a data warehouse. Requires `DATAMANAGEMENT` (**Can manage data**) or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) privilege is required. #### Usage guidelines * A JSON map of configuration attributes in `configuration`. The following example shows the configuration attributes: ``` { \"user\":\"DEV_USER\", \"password\":\"TestConn123\", \"role\":\"DEV\", \"warehouse\":\"DEV_WH\" } ``` * If the `policy_type` is `PRINCIPALS`, then `policy_principals` is a required field. * If the `policy_type` is `PROCESSES`, then `policy_processes` is a required field. * If the `policy_type` is `NO_POLICY`, then `policy_principals` and `policy_processes` are not required fields. #### Parameterized Connection Support For parameterized connections that use OAuth authentication, only the same_as_parent and policy_process_options attributes are allowed in the API request. These attributes are not applicable to connections that are not parameterized. + * @param createConnectionConfigurationRequest + */ + createConnectionConfiguration(createConnectionConfigurationRequest, _options) { + const requestContextPromise = this.requestFactory.createConnectionConfiguration(createConnectionConfigurationRequest, _options); + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx) => middleware.pre(ctx))); + } + return middlewarePreObservable.pipe(mergeMap((ctx) => this.configuration.httpApi.send(ctx))).pipe(mergeMap((response) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp) => this.responseProcessor.createConnectionConfiguration(rsp))); + })); + } + /** + * Version: 10.12.0.cl or later Deletes connection configuration objects. Requires `DATAMANAGEMENT` (**Can manage data**) and edit permissions to the connection object, or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) privilege is required. + * @param deleteConnectionConfigurationRequest + */ + deleteConnectionConfiguration(deleteConnectionConfigurationRequest, _options) { + const requestContextPromise = this.requestFactory.deleteConnectionConfiguration(deleteConnectionConfigurationRequest, _options); + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx) => middleware.pre(ctx))); + } + return middlewarePreObservable.pipe(mergeMap((ctx) => this.configuration.httpApi.send(ctx))).pipe(mergeMap((response) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp) => this.responseProcessor.deleteConnectionConfiguration(rsp))); + })); + } + /** + * Version: 10.12.0.cl or later Updates a connection configuration object. Requires `DATAMANAGEMENT` (**Can manage data**) and edit permissions to the connection object, or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) privilege is required. #### Supported operations This API endpoint lets you perform the following operations in a single API request: * Edit the name or description of the configuration * Edit the configuration properties * Edit the `policy_type` * Edit the type of authentication * Enable or disable a configuration #### Parameterized Connection Support For parameterized oauth based connections, only the `same_as_parent` and `policy_process_options` attributes are allowed. These attributes are not applicable to connections that are not parameterized. **NOTE**: When updating a configuration where `disabled` is `true`, you must reset `disabled` to `true` in your update request payload. If not explicitly set again, the API will default `disabled` to `false`. + * @param configurationIdentifier Unique ID or name of the configuration. + * @param updateConnectionConfigurationRequest + */ + updateConnectionConfiguration(configurationIdentifier, updateConnectionConfigurationRequest, _options) { + const requestContextPromise = this.requestFactory.updateConnectionConfiguration(configurationIdentifier, updateConnectionConfigurationRequest, _options); + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx) => middleware.pre(ctx))); + } + return middlewarePreObservable.pipe(mergeMap((ctx) => this.configuration.httpApi.send(ctx))).pipe(mergeMap((response) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp) => this.responseProcessor.updateConnectionConfiguration(rsp))); + })); + } +}; +var ObservableConnectionsApi = class { + constructor(configuration, requestFactory, responseProcessor) { + this.configuration = configuration; + this.requestFactory = requestFactory || new ConnectionsApiRequestFactory(configuration); + this.responseProcessor = responseProcessor || new ConnectionsApiResponseProcessor(); + } + /** + * Version: 9.2.0.cl or later Creates a connection to a data warehouse for live query services. Requires `DATAMANAGEMENT` (**Can manage data**) or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) privilege is required. #### Create a connection without tables To create a connection without tables: 1. Pass these parameters in your API request. * Name of the connection. * Type of the data warehouse to connect to. * A JSON map of configuration attributes in `data_warehouse_config`. The following example shows the configuration attributes for a SnowFlake connection: ``` { \"configuration\":{ \"accountName\":\"thoughtspot_partner\", \"user\":\"tsadmin\", \"password\":\"TestConn123\", \"role\":\"sysadmin\", \"warehouse\":\"MEDIUM_WH\" }, \"authenticationType\": \"SERVICE_ACCOUNT\", \"externalDatabases\":[ ] } ``` 2. Set `validate` to `false`. **NOTE:** If the `authentication_type` is anything other than SERVICE_ACCOUNT, you must explicitly provide the authenticationType property in the payload. If you do not specify authenticationType, the API will default to SERVICE_ACCOUNT as the authentication type. #### Create a connection with tables If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) and `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` (**Can manage data models**) privilege is required. To create a connection with tables: 1. Pass these parameters in your API request. * Name of the connection. * Type of the data warehouse to connect to. * A JSON map of configuration attributes, database details, and table properties in `data_warehouse_config` as shown in the following example: ``` { \"configuration\":{ \"accountName\":\"thoughtspot_partner\", \"user\":\"tsadmin\", \"password\":\"TestConn123\", \"role\":\"sysadmin\", \"warehouse\":\"MEDIUM_WH\" }, \"authenticationType\": \"SERVICE_ACCOUNT\", \"externalDatabases\":[ { \"name\":\"AllDatatypes\", \"isAutoCreated\":false, \"schemas\":[ { \"name\":\"alldatatypes\", \"tables\":[ { \"name\":\"allDatatypes\", \"type\":\"TABLE\", \"description\":\"\", \"selected\":true, \"linked\":true, \"columns\":[ { \"name\":\"CNUMBER\", \"type\":\"INT64\", \"canImport\":true, \"selected\":true, \"isLinkedActive\":true, \"isImported\":false, \"tableName\":\"allDatatypes\", \"schemaName\":\"alldatatypes\", \"dbName\":\"AllDatatypes\" }, { \"name\":\"CDECIMAL\", \"type\":\"INT64\", \"canImport\":true, \"selected\":true, \"isLinkedActive\":true, \"isImported\":false, \"tableName\":\"allDatatypes\", \"schemaName\":\"alldatatypes\", \"dbName\":\"AllDatatypes\" } ] } ] } ] } ] } ``` 2. Set `validate` to `true`. **NOTE:** If the `authentication_type` is anything other than SERVICE_ACCOUNT, you must explicitly provide the authenticationType property in the payload. If you do not specify authenticationType, the API will default to SERVICE_ACCOUNT as the authentication type. + * @param createConnectionRequest + */ + createConnection(createConnectionRequest, _options) { + const requestContextPromise = this.requestFactory.createConnection(createConnectionRequest, _options); + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx) => middleware.pre(ctx))); + } + return middlewarePreObservable.pipe(mergeMap((ctx) => this.configuration.httpApi.send(ctx))).pipe(mergeMap((response) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp) => this.responseProcessor.createConnection(rsp))); + })); + } + /** + * Version: 9.2.0.cl or later **Important**: This endpoint is deprecated and will be removed from ThoughtSpot in September 2025. ThoughtSpot strongly recommends using the [Delete Connection V2](#/http/api-endpoints/connections/delete-connection-v2) endpoint to delete your connection objects. #### Usage guidelines Deletes a connection object. Requires `DATAMANAGEMENT` (**Can manage data**) and edit permissions to the connection object, or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) privilege is required. **Note**: If a connection has dependent objects, make sure you remove its associations before the delete operation. + * @param deleteConnectionRequest + */ + deleteConnection(deleteConnectionRequest, _options) { + const requestContextPromise = this.requestFactory.deleteConnection(deleteConnectionRequest, _options); + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx) => middleware.pre(ctx))); + } + return middlewarePreObservable.pipe(mergeMap((ctx) => this.configuration.httpApi.send(ctx))).pipe(mergeMap((response) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp) => this.responseProcessor.deleteConnection(rsp))); + })); + } + /** + * Version: 10.4.0.cl or later Deletes a connection object. **Note**: If a connection has dependent objects, make sure you remove its associations before the delete operation. Requires `DATAMANAGEMENT` (**Can manage data**) and edit permissions to the connection object, or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) privilege is required. + * @param connectionIdentifier Unique ID or name of the connection. + */ + deleteConnectionV2(connectionIdentifier, _options) { + const requestContextPromise = this.requestFactory.deleteConnectionV2(connectionIdentifier, _options); + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx) => middleware.pre(ctx))); + } + return middlewarePreObservable.pipe(mergeMap((ctx) => this.configuration.httpApi.send(ctx))).pipe(mergeMap((response) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp) => this.responseProcessor.deleteConnectionV2(rsp))); + })); + } + /** + * Version: 9.9.0.cl or later Exports the difference in connection metadata between CDW and ThoughtSpot Requires `DATAMANAGEMENT` (**Can manage data**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the following Data control privileges may be required: - `CAN_MANAGE_CUSTOM_CALENDAR`(**Can manage custom calendars**) - `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) - `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` (**Can manage data models**) To download the connection metadata difference between ThoughtSpot and CDW, pass the connection GUID as `connection_identifier` in the API request. + * @param connectionIdentifier GUID of the connection + */ + downloadConnectionMetadataChanges(connectionIdentifier, _options) { + const requestContextPromise = this.requestFactory.downloadConnectionMetadataChanges(connectionIdentifier, _options); + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx) => middleware.pre(ctx))); + } + return middlewarePreObservable.pipe(mergeMap((ctx) => this.configuration.httpApi.send(ctx))).pipe(mergeMap((response) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp) => this.responseProcessor.downloadConnectionMetadataChanges(rsp))); + })); + } + /** + * Version: 9.9.0.cl or later Validates the difference in connection metadata between CDW and ThoughtSpot. Requires `DATAMANAGEMENT` (**Can manage data**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the following Data control privileges may be required: - `CAN_MANAGE_CUSTOM_CALENDAR`(**Can manage custom calendars**) - `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) - `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` (**Can manage data models**) Returns a boolean indicating whether there is any difference between the connection metadata at ThoughtSpot and CDW. To get the connection metadata difference status, pass the connection GUID as `connection_identifier` in the API request. + * @param connectionIdentifier GUID of the connection + */ + fetchConnectionDiffStatus(connectionIdentifier, _options) { + const requestContextPromise = this.requestFactory.fetchConnectionDiffStatus(connectionIdentifier, _options); + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx) => middleware.pre(ctx))); + } + return middlewarePreObservable.pipe(mergeMap((ctx) => this.configuration.httpApi.send(ctx))).pipe(mergeMap((response) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp) => this.responseProcessor.fetchConnectionDiffStatus(rsp))); + })); + } + /** + * Version: 26.2.0.cl or later Revokes OAuth refresh tokens for users who no longer require access to a data warehouse connection. When a token is revoked, the affected user\'s session for that connection is terminated, and they must re-authenticate to regain access. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) or `DATAMANAGEMENT` (**Can manage data**) privileges. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on the ThoughtSpot instance, users with `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) privilege can also make API requests to revoke tokens for connection users. #### Usage guidelines You can specify different combinations of identifiers to control which refresh tokens are revoked. - **connection_identifier**: Revokes refresh tokens for all users of the connection, except the connection author. - **connection_identifier** and **user_identifiers**: Revokes refresh tokens only for the users specified in the request. If the name or ID of the connection author is included in the request, their token will also be revoked. - **connection_identifier** and **configuration_identifiers**: Revokes refresh tokens for all users on the specified configurations, except the configuration author. - **connection_identifier**, **configuration_identifiers**, and **user_identifiers**: Revokes refresh tokens for the specified users on the specified configurations. - **connection_identifier** and **org_identifiers**: Revokes refresh tokens for the specified Orgs. Applicable only for published connections. - **connection_identifier**, **org_identifiers**, and **user_identifiers**: Revokes refresh tokens for the specified users in the specified Orgs. Applicable only for published connections. **NOTE**: The `org_identifiers` parameter is only applicable for published connections. Using this parameter for unpublished connections will result in an error. Ensure that the connections are published before making the API request. + * @param connectionIdentifier Unique ID or name of the connection whose refresh tokens need to be revoked. All the users associated with the connection will have their refresh tokens revoked except the author. + * @param revokeRefreshTokensRequest + */ + revokeRefreshTokens(connectionIdentifier, revokeRefreshTokensRequest, _options) { + const requestContextPromise = this.requestFactory.revokeRefreshTokens(connectionIdentifier, revokeRefreshTokensRequest, _options); + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx) => middleware.pre(ctx))); + } + return middlewarePreObservable.pipe(mergeMap((ctx) => this.configuration.httpApi.send(ctx))).pipe(mergeMap((response) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp) => this.responseProcessor.revokeRefreshTokens(rsp))); + })); + } + /** + * Version: 9.2.0.cl or later Gets connection objects. Requires `DATAMANAGEMENT` (**Can manage data**) or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) privilege is required. - To get a list of all connections available in the ThoughtSpot system, send the API request without any attributes in the request body. - To get the connection objects for a specific type of data warehouse, specify the type in `data_warehouse_types`. - To fetch details of a connection object, specify the connection object GUID or name. The `name_pattern` attribute allows passing partial text with `%` for a wildcard match. - To get details of the database, schemas, tables, or columns from a data connection object, specify `data_warehouse_object_type`. - To get a specific database, schema, table, or column from a connection object, define the object type in `data_warehouse_object_type` and object properties in the `data_warehouse_objects` array. For example, to search for a column, you must pass the database, schema, and table names in the API request. Note that in the following example, object properties are set in a hierarchical order (`database` > `schema` > `table` > `column`). ``` { \"connections\": [ { \"identifier\": \"b9d1f2ef-fa65-4a4b-994e-30fa2d57b0c2\", \"data_warehouse_objects\": [ { \"database\": \"NEBULADEV\", \"schema\": \"INFORMATION_SCHEMA\", \"table\": \"APPLICABLE_ROLES\", \"column\": \"ROLE_NAME\" } ] } ], \"data_warehouse_object_type\": \"COLUMN\" } ``` - To fetch data by `configuration`, specify `data_warehouse_object_type`. For example, to fetch columns from the `DEVELOPMENT` database, specify the `data_warehouse_object_type` as `DATABASE` and define the `configuration` string as `{\"database\":\"DEVELOPMENT\"}`. To get column data for a specific table, specify the table, for example,`{\"database\":\"RETAILAPPAREL\",\"table\":\"PIPES\"}`. - To query connections by `authentication_type`, specify `data_warehouse_object_type`. Supported values for `authentication_type` are: - `SERVICE_ACCOUNT`: For connections that require service account credentials to authenticate to the Cloud Data Warehouse and fetch data. - `OAUTH`: For connections that require OAuth credentials to authenticate to the Cloud Data Warehouse and fetch data. Teradata, Oracle, and Presto Cloud Data Warehouses do not support the OAuth authentication type. - `IAM`: For connections that have the IAM OAuth set up. This authentication type is supported on Amazon Redshift connections only. - `EXTOAUTH`: For connections that have External OAuth set up. ThoughtSpot supports external [OAuth with Microsoft Azure Active Directory (AD)](https://docs.thoughtspot.com/cloud/latest/ connections-snowflake-azure-ad-oauth) and [Okta for Snowflake data connections](https://docs.thoughtspot.com/cloud/latest/connections-snowflake-okta-oauth). - `KEY_PAIR`: For connections that require Key Pair account credentials to authenticate to the Cloud Data Warehouse and fetch data. This authentication type is supported on Snowflake connections only. - `OAUTH_WITH_PKCE`: For connections that require OAuth with PKCE account credentials to authenticate to the Cloud Data Warehouse and fetch data. This authentication type is supported on Snowflake, Starburst, Databricks, Denodo connections only. - `EXTOAUTH_WITH_PKCE`: For connections that require External OAuth With PKCE account credentials to authenticate to the Cloud Data Warehouse and fetch data. This authentication type is supported on Snowflake connections only. - `OAUTH_WITH_PEZ`: For connections that require OAuth With PEZ account credentials to authenticate to the Cloud Data Warehouse and fetch data. This authentication type is supported on Amazon Redshift connections only. - `OAUTH_WITH_SERVICE_PRINCIPAL`: For connections that require OAuth With Service Principal account credentials to authenticate to the Cloud Data Warehouse and fetch data. This authentication type is supported on Databricks connections only. - `PERSONAL_ACCESS_TOKEN`: For connections that require Personal Access Token account credentials to authenticate to the Cloud Data Warehouse and fetch data. This authentication type is supported on Databricks connections only. - `OAUTH_CLIENT_CREDENTIALS`: For connections that require OAuth Client Credentials to authenticate to the Cloud Data Warehouse and fetch data. This authentication type is supported on Snowflake connections only. - To include more details about connection objects in the API response, set `include_details` to `true`. - You can also sort the output by field names and filter connections by tags. **NOTE**: When filtering connection records by parameters other than `data_warehouse_types` or `tag_identifiers`, ensure that you set `record_size` to `-1` and `record_offset` to `0` for precise results. + * @param searchConnectionRequest + */ + searchConnection(searchConnectionRequest, _options) { + const requestContextPromise = this.requestFactory.searchConnection(searchConnectionRequest, _options); + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx) => middleware.pre(ctx))); + } + return middlewarePreObservable.pipe(mergeMap((ctx) => this.configuration.httpApi.send(ctx))).pipe(mergeMap((response) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp) => this.responseProcessor.searchConnection(rsp))); + })); + } + /** + * Version: 26.5.0.cl or later Synchronizes connection metadata attributes from your Cloud Data Warehouse (CDW) with ThoughtSpot. Requires the `DATAMANAGEMENT` (**Can manage data**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` (**Can manage data models**) privilege is required. #### Usage guidelines To synchronize attributes from a CDW, specify the connection GUID or name in the `connection_identifier` path parameter and `sync_attributes` in the request body. Default attribute is `[\"DESCRIPTION\"]`. ##### Hierarchical schema * Connection: The connection object for the sync operation. * Tables: Tables for the sync operation. When no table is specified, all tables are synchronized. * Columns: If the table is specified, you can add the columns for the sync operation. If no columns are specified, all columns in the specified table are considered for the sync operation. To set the scope for the sync operation: * Connection-level: To sync all tables and columns, pass an empty request body, or only the attributes in the request body. * Table-level: To synchronize specific tables and their columns, specify the table identifiers in the `tables` array. * Column-level: To synchronize specific columns, specify the table identifier as the key and column identifiers as the value in the `tables` array. ``` { \"tables\": [ {\"table-guid-1\": [\"column-guid-1\", \"column-guid-2\"]}, \"table-guid-2\" ], \"sync_attributes\": [\"DESCRIPTION\"] } ``` ##### API response If the sync operation is successful, the API returns the following information: * Status of the sync operation. For example, `SUCCESS`, `PARTIAL_SUCCESS`, or `NO_UPDATE`. * Number of tables and columns that were updated. * Number of tables and columns with the sync failed status when the overall sync status is `PARTIAL_SUCCESS`. * Message text indicating the sync results. + * @param connectionIdentifier Unique ID or name of the connection. + * @param syncMetadataRequest + */ + syncMetadata(connectionIdentifier, syncMetadataRequest, _options) { + const requestContextPromise = this.requestFactory.syncMetadata(connectionIdentifier, syncMetadataRequest, _options); + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx) => middleware.pre(ctx))); + } + return middlewarePreObservable.pipe(mergeMap((ctx) => this.configuration.httpApi.send(ctx))).pipe(mergeMap((response) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp) => this.responseProcessor.syncMetadata(rsp))); + })); + } + /** + * Version: 9.2.0.cl or later **Important**: This endpoint is deprecated and will be removed from ThoughtSpot in September 2025. ThoughtSpot strongly recommends using the [Update connection V2](#/http/api-endpoints/connections/update-connection-v2) endpoint to update your connection objects. #### Usage guidelines Updates a connection object. Requires `DATAMANAGEMENT` (**Can manage data**) and edit permissions to the connection object, or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) privilege is required. To update a connection object, pass these parameters in your API request: 1. GUID of the connection object. 2. If you are updating tables or database schema of a connection object: a. Add the updated JSON map of metadata with database, schema, and tables in `data_warehouse_config`. b. Set `validate` to `true`. 3. If you are updating a configuration attribute, connection name, or description, you can set `validate` to `false`. + * @param updateConnectionRequest + */ + updateConnection(updateConnectionRequest, _options) { + const requestContextPromise = this.requestFactory.updateConnection(updateConnectionRequest, _options); + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx) => middleware.pre(ctx))); + } + return middlewarePreObservable.pipe(mergeMap((ctx) => this.configuration.httpApi.send(ctx))).pipe(mergeMap((response) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp) => this.responseProcessor.updateConnection(rsp))); + })); + } + /** + * Version: 26.6.0.cl or later Activates or deactivates a connection. A deactivated connection cannot be used for queries or operations until it is activated again. Requires `DATAMANAGEMENT` (**Can manage data**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) privilege is required. Only the connection owner or an administrator can perform this operation. #### Usage guidelines To update the status of a connection, specify the connection GUID or name in the `connection_identifier` path parameter and the desired `status` in the request body. - **ACTIVATED**: Enables the connection. Queries and operations can resume on an activated connection. - **DEACTIVATED**: Disables the connection. It does not remove the connection metadata, but only makes the connection unavailable for queries and operations. You can reactivate a deactivated connection by setting \"status\": \"ACTIVATED\". + * @param connectionIdentifier Unique ID or name of the connection. + * @param updateConnectionStatusRequest + */ + updateConnectionStatus(connectionIdentifier, updateConnectionStatusRequest, _options) { + const requestContextPromise = this.requestFactory.updateConnectionStatus(connectionIdentifier, updateConnectionStatusRequest, _options); + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx) => middleware.pre(ctx))); + } + return middlewarePreObservable.pipe(mergeMap((ctx) => this.configuration.httpApi.send(ctx))).pipe(mergeMap((response) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp) => this.responseProcessor.updateConnectionStatus(rsp))); + })); + } + /** + * Version: 10.4.0.cl or later Updates a connection object. Requires `DATAMANAGEMENT` (**Can manage data**) and edit permissions to the connection object, or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) privilege is required. To update a connection object, pass these parameters in your API request: 1. GUID of the connection object. 2. If you are updating tables or database schema of a connection object: a. Add the updated JSON map of metadata with database, schema, and tables in `data_warehouse_config`. b. Set `validate` to `true`. **NOTE:** If the `authentication_type` is anything other than SERVICE_ACCOUNT, you must explicitly provide the authenticationType property in the payload. If you do not specify authenticationType, the API will default to SERVICE_ACCOUNT as the authentication type. * A JSON map of configuration attributes, database details, and table properties in `data_warehouse_config` as shown in the following example: * This is an example of updating a single table in a empty connection: ``` { \"authenticationType\": \"SERVICE_ACCOUNT\", \"externalDatabases\": [ { \"name\": \"DEVELOPMENT\", \"isAutoCreated\": false, \"schemas\": [ { \"name\": \"TS_dataset\", \"tables\": [ { \"name\": \"DEMORENAME\", \"type\": \"TABLE\", \"description\": \"\", \"selected\": true, \"linked\": true, \"gid\": 0, \"datasetId\": \"-1\", \"subType\": \"\", \"reportId\": \"\", \"viewId\": \"\", \"columns\": [ { \"name\": \"Col1\", \"type\": \"VARCHAR\", \"canImport\": true, \"selected\": true, \"description\": \"\", \"isLinkedActive\": true, \"isAggregate\": false }, { \"name\": \"Col2\", \"type\": \"VARCHAR\", \"canImport\": true, \"selected\": true, \"description\": \"\", \"isLinkedActive\": true, \"isAggregate\": false }, { \"name\": \"Col3\", \"type\": \"VARCHAR\", \"canImport\": true, \"selected\": true, \"description\": \"\", \"isLinkedActive\": true, \"isAggregate\": false }, { \"name\": \"Col312\", \"type\": \"VARCHAR\", \"canImport\": true, \"selected\": true, \"description\": \"\", \"isLinkedActive\": true, \"isAggregate\": false }, { \"name\": \"Col4\", \"type\": \"VARCHAR\", \"canImport\": true, \"selected\": true, \"description\": \"\", \"isLinkedActive\": true, \"isAggregate\": false } ], \"relationships\": [] } ] } ] } ], \"configuration\": { \"password\": \"\", \"database\": \"DEVELOPMENT\", \"role\": \"DEV\", \"accountName\": \"thoughtspot_partner\", \"warehouse\": \"DEMO_WH\", \"user\": \"DEV_USER\" } } ``` * This is an example of updating a single table in an existing connection with tables: ``` { \"authenticationType\": \"SERVICE_ACCOUNT\", \"externalDatabases\": [ { \"name\": \"DEVELOPMENT\", \"isAutoCreated\": false, \"schemas\": [ { \"name\": \"TS_dataset\", \"tables\": [ { \"name\": \"CUSTOMER\", \"type\": \"TABLE\", \"description\": \"\", \"selected\": true, \"linked\": true, \"gid\": 0, \"datasetId\": \"-1\", \"subType\": \"\", \"reportId\": \"\", \"viewId\": \"\", \"columns\": [], \"relationships\": [] }, { \"name\": \"tpch5k_falcon_default_schema_users\", \"type\": \"TABLE\", \"description\": \"\", \"selected\": true, \"linked\": true, \"gid\": 0, \"datasetId\": \"-1\", \"subType\": \"\", \"reportId\": \"\", \"viewId\": \"\", \"columns\": [ { \"name\": \"user_id\", \"type\": \"INT64\", \"canImport\": true, \"selected\": true, \"description\": \"\", \"isLinkedActive\": true, \"isAggregate\": false }, { \"name\": \"product_id\", \"type\": \"INT64\", \"canImport\": true, \"selected\": true, \"description\": \"\", \"isLinkedActive\": true, \"isAggregate\": false }, { \"name\": \"user_cost\", \"type\": \"INT64\", \"canImport\": true, \"selected\": true, \"description\": \"\", \"isLinkedActive\": true, \"isAggregate\": false } ], \"relationships\": [] } ] } ] } ], \"configuration\": { \"password\": \"\", \"database\": \"DEVELOPMENT\", \"role\": \"DEV\", \"accountName\": \"thoughtspot_partner\", \"warehouse\": \"DEMO_WH\", \"user\": \"DEV_USER\" } } ``` 3. If you are updating a configuration attribute, connection name, or description, you can set `validate` to `false`. **NOTE:** If the `authentication_type` is anything other than SERVICE_ACCOUNT, you must explicitly provide the authenticationType property in the payload. If you do not specify authenticationType, the API will default to SERVICE_ACCOUNT as the authentication type. * A JSON map of configuration attributes in `data_warehouse_config`. The following example shows the configuration attributes for a Snowflake connection: ``` { \"configuration\":{ \"accountName\":\"thoughtspot_partner\", \"user\":\"tsadmin\", \"password\":\"TestConn123\", \"role\":\"sysadmin\", \"warehouse\":\"MEDIUM_WH\" }, \"externalDatabases\":[ ] } ``` + * @param connectionIdentifier Unique ID or name of the connection. + * @param updateConnectionV2Request + */ + updateConnectionV2(connectionIdentifier, updateConnectionV2Request, _options) { + const requestContextPromise = this.requestFactory.updateConnectionV2(connectionIdentifier, updateConnectionV2Request, _options); + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx) => middleware.pre(ctx))); + } + return middlewarePreObservable.pipe(mergeMap((ctx) => this.configuration.httpApi.send(ctx))).pipe(mergeMap((response) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp) => this.responseProcessor.updateConnectionV2(rsp))); + })); + } +}; +var ObservableCustomActionApi = class { + constructor(configuration, requestFactory, responseProcessor) { + this.configuration = configuration; + this.requestFactory = requestFactory || new CustomActionApiRequestFactory(configuration); + this.responseProcessor = responseProcessor || new CustomActionApiResponseProcessor(); + } + /** + * Version: 9.6.0.cl or later Creates a custom action that appears as a menu action on a saved Answer or Liveboard visualization. Requires `DEVELOPER` (**Has Developer privilege**) or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `DEVELOPER` (**Has developer privilege**) privilege is required. #### Usage Guidelines The API lets you create the following types of custom actions: * URL-based action Allows pushing data to an external URL. * Callback action Triggers a callback to the host application and initiates a response payload on an embedded ThoughtSpot instance. By default, custom actions are visible to only administrator or developer users. To make a custom action available to other users, and specify the groups in `group_identifiers`. By default, the custom action is set as a _global_ action on all visualizations and saved Answers. To assign a custom action to specific Liveboard visualization, saved Answer, or Worksheet, set `visibility` to `false` in `default_action_config` property and specify the GUID or name of the object in `associate_metadata`. For more information, see [Custom actions](https://developers.thoughtspot.com/docs/custom-action-intro). + * @param createCustomActionRequest + */ + createCustomAction(createCustomActionRequest, _options) { + const requestContextPromise = this.requestFactory.createCustomAction(createCustomActionRequest, _options); + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx) => middleware.pre(ctx))); + } + return middlewarePreObservable.pipe(mergeMap((ctx) => this.configuration.httpApi.send(ctx))).pipe(mergeMap((response) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp) => this.responseProcessor.createCustomAction(rsp))); + })); + } + /** + * Version: 9.6.0.cl or later Removes the custom action specified in the API request. Requires `DEVELOPER` (**Has Developer privilege**) or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `DEVELOPER` (**Has developer privilege**) privilege is required. + * @param customActionIdentifier Unique ID or name of the custom action. + */ + deleteCustomAction(customActionIdentifier, _options) { + const requestContextPromise = this.requestFactory.deleteCustomAction(customActionIdentifier, _options); + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx) => middleware.pre(ctx))); + } + return middlewarePreObservable.pipe(mergeMap((ctx) => this.configuration.httpApi.send(ctx))).pipe(mergeMap((response) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp) => this.responseProcessor.deleteCustomAction(rsp))); + })); + } + /** + * Version: 9.6.0.cl or later Gets custom actions configured on the cluster. Requires `DEVELOPER` (**Has Developer privilege**) or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `DEVELOPER` (**Has developer privilege**) privilege is required. + * @param searchCustomActionsRequest + */ + searchCustomActions(searchCustomActionsRequest, _options) { + const requestContextPromise = this.requestFactory.searchCustomActions(searchCustomActionsRequest, _options); + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx) => middleware.pre(ctx))); + } + return middlewarePreObservable.pipe(mergeMap((ctx) => this.configuration.httpApi.send(ctx))).pipe(mergeMap((response) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp) => this.responseProcessor.searchCustomActions(rsp))); + })); + } + /** + * Version: 9.6.0.cl or later Updates a custom action. Requires `DEVELOPER` (**Has Developer privilege**) or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `DEVELOPER` (**Has developer privilege**) privilege is required. #### Usage Guidelines The API allows you to modify the following properties: * Name of the custom action * Action availability to groups * Association to metadata objects * Authentication settings for a URL-based action For more information, see [Custom actions](https://developers.thoughtspot.com/docs/custom-action-intro). + * @param customActionIdentifier Unique ID or name of the custom action. + * @param updateCustomActionRequest + */ + updateCustomAction(customActionIdentifier, updateCustomActionRequest, _options) { + const requestContextPromise = this.requestFactory.updateCustomAction(customActionIdentifier, updateCustomActionRequest, _options); + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx) => middleware.pre(ctx))); + } + return middlewarePreObservable.pipe(mergeMap((ctx) => this.configuration.httpApi.send(ctx))).pipe(mergeMap((response) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp) => this.responseProcessor.updateCustomAction(rsp))); + })); + } +}; +var ObservableCustomCalendarsApi = class { + constructor(configuration, requestFactory, responseProcessor) { + this.configuration = configuration; + this.requestFactory = requestFactory || new CustomCalendarsApiRequestFactory(configuration); + this.responseProcessor = responseProcessor || new CustomCalendarsApiResponseProcessor(); + } + /** + * Version: 10.12.0.cl or later Creates a new [custom calendar](https://docs.thoughtspot.com/cloud/latest/connections-cust-cal). Requires `DATAMANAGEMENT` (**Can manage data**) or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your ThoughtSpot instance, the `CAN_MANAGE_CUSTOM_CALENDAR` (**Can manage custom calendars**) privilege is required. #### Usage guidelines You can create a custom calendar from scratch or an existing Table in ThoughtSpot. For both methods of calendar creation, the following parameters are required: * Name of the custom calendar. * Calendar creation method. To create a calendar from an existing table, specify the method: - `FROM_EXISTING_TABLE` - Creates calendar from the table reference provided in the API request. - `FROM_INPUT_PARAMS` - Creates a calendar from the parameters defined in the API request. * Connection ID and Table name * Database and schema name attributes: For most Cloud Data Warehouse (CDW) connectors, both `database_name` and `schema_name` attributes are required. However, the attribute requirements are conditional and vary based on the connector type and its metadata structure. For example, for connectors such as Teradata, MySQL, SingleSore, Amazon Aurora MySQL, Amazon RDS MySQL, Oracle, and GCP_MYSQL, the `schema_name` is required, whereas the `database_name` attribute is not. Similarly, connectors such as ClickHouse require you to specify the `database_name` and the schema specification in such cases is optional. **NOTE**: If you are creating a calendar from an existing table, ensure that the referenced table matches the required DDL for custom calendars. If the schema does not match, the API returns an error. ##### Calendar type The API allows you to create the following types of calendars: * `MONTH_OFFSET`. The default calendar type. A `MONTH_OFFSET` calendar is offset by a few months from the standard calendar months (January to December) and the year begins with the month defined in the request. For example, if the `month_offset` value is set as `April`, the calendar year begins in April. * `4-4-5`. Each quarter in the calendar will include two 4-week months followed by one 5-week month. * `4-5-4`. Each quarter in the calendar will include two 4-week months with a 5-week month between. * `5-4-4`. Each quarter begins with a 5-week month, followed by two 4-week months. To start and end the calendar on a specific date, specify the dates in the `MM/DD/YYYY` format. For `MONTH_OFFSET` calendars, ensure that the `start_date` matches the month specified in the `month_offset` attribute. You can also set the starting day of the week and customize the prefixes for year and quarter labels. #### Examples To create a calendar from an existing table: ``` { \"name\": \"MyCustomCalendar1\", \"table_reference\": { \"connection_identifier\": \"4db8ea22-2ff4-4224-b05a-26674717e468\", \"table_name\": \"MyCalendarTable\", \"database_name\": \"RETAILAPPAREL\", \"schema_name\": \"PUBLIC\" }, \"creation_method\": \"FROM_EXISTING_TABLE\", } ``` To create a calendar from scratch: ``` { \"name\": \"MyCustomCalendar1\", \"table_reference\": { \"connection_identifier\": \"4db8ea22-2ff4-4224-b05a-26674717e468\", \"table_name\": \"MyCalendarTable\", \"database_name\": \"RETAILAPPAREL\", \"schema_name\": \"PUBLIC\" }, \"creation_method\": \"FROM_INPUT_PARAMS\", \"calendar_type\": \"MONTH_OFFSET\", \"month_offset\": \"April\", \"start_day_of_week\": \"Monday\", \"quarter_name_prefix\": \"Q\", \"year_name_prefix\": \"FY\", \"start_date\": \"04/01/2025\", \"end_date\": \"04/31/2025\" } ``` + * @param createCalendarRequest + */ + createCalendar(createCalendarRequest, _options) { + const requestContextPromise = this.requestFactory.createCalendar(createCalendarRequest, _options); + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx) => middleware.pre(ctx))); + } + return middlewarePreObservable.pipe(mergeMap((ctx) => this.configuration.httpApi.send(ctx))).pipe(mergeMap((response) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp) => this.responseProcessor.createCalendar(rsp))); + })); + } + /** + * Version: 10.12.0.cl or later Deletes a [custom calendar](https://docs.thoughtspot.com/cloud/latest/connections-cust-cal). Requires `DATAMANAGEMENT` (**Can manage data**) or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your ThoughtSpot instance, the `CAN_MANAGE_CUSTOM_CALENDAR` (**Can manage custom calendars**) privilege is required. #### Usage guidelines To delete a custom calendar, specify the calendar ID as a path parameter in the request URL. + * @param calendarIdentifier Unique ID or name of the Calendar. + */ + deleteCalendar(calendarIdentifier, _options) { + const requestContextPromise = this.requestFactory.deleteCalendar(calendarIdentifier, _options); + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx) => middleware.pre(ctx))); + } + return middlewarePreObservable.pipe(mergeMap((ctx) => this.configuration.httpApi.send(ctx))).pipe(mergeMap((response) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp) => this.responseProcessor.deleteCalendar(rsp))); + })); + } + /** + * Version: 10.12.0.cl or later Exports a [custom calendar](https://docs.thoughtspot.com/cloud/latest/connections-cust-cal) in the CSV format. Requires `DATAMANAGEMENT` (**Can manage data**) or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your ThoughtSpot instance, the `CAN_MANAGE_CUSTOM_CALENDAR` (**Can manage custom calendars**) privilege is required. #### Usage guidelines Use this API to download a custom calendar in the CSV file format. In your API request, specify the following parameters. * Start and end date of the calendar. For \"month offset\" calendars, the start date must match the month defined in the `month_offset` attribute. You can also specify optional parameters such as the starting day of the week and prefixes for the quarter and year labels. + * @param generateCSVRequest + */ + generateCSV(generateCSVRequest, _options) { + const requestContextPromise = this.requestFactory.generateCSV(generateCSVRequest, _options); + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx) => middleware.pre(ctx))); + } + return middlewarePreObservable.pipe(mergeMap((ctx) => this.configuration.httpApi.send(ctx))).pipe(mergeMap((response) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp) => this.responseProcessor.generateCSV(rsp))); + })); + } + /** + * Version: 10.12.0.cl or later Gets a list of [custom calendars](https://docs.thoughtspot.com/cloud/latest/connections-cust-cal). Requires `DATAMANAGEMENT` (**Can manage data**) or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your ThoughtSpot instance, the `CAN_MANAGE_CUSTOM_CALENDAR` (**Can manage custom calendars**) privilege is required. #### Usage guidelines By default, the API returns a list of custom calendars for all connection objects. To retrieve custom calendar details for a particular connection, specify the connection ID. You can also use other search parameters such as `name_pattern` and `sort_options` as search filters. The `name_pattern` parameter filters and returns only those objects that match the specified pattern. Use `%` as a wildcard for pattern matching. + * @param searchCalendarsRequest + */ + searchCalendars(searchCalendarsRequest, _options) { + const requestContextPromise = this.requestFactory.searchCalendars(searchCalendarsRequest, _options); + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx) => middleware.pre(ctx))); + } + return middlewarePreObservable.pipe(mergeMap((ctx) => this.configuration.httpApi.send(ctx))).pipe(mergeMap((response) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp) => this.responseProcessor.searchCalendars(rsp))); + })); + } + /** + * Version: 10.12.0.cl or later Updates the properties of a [custom calendar](https://docs.thoughtspot.com/cloud/latest/connections-cust-cal). Requires `DATAMANAGEMENT` (**Can manage data**) or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your ThoughtSpot instance, the `CAN_MANAGE_CUSTOM_CALENDAR` (**Can manage custom calendars**) privilege is required. #### Usage guidelines You can update the properties of a calendar using one of the following methods: * `FROM_INPUT_PARAMS` to update the calendar properties with the values defined in the API request. * `FROM_EXISTING_TABLE` Creates a calendar from the parameters defined in the API request. To update a custom calendar, specify the calendar ID as a path parameter in the request URL and the following parameters in the request body: * Connection ID and Table name * Database and schema name attributes: For most Cloud Data Warehouse (CDW) connectors, both `database_name` and `schema_name` attributes are required. However, the attribute requirements are conditional and vary based on the connector type and its metadata structure. For example, for connectors such as Teradata, MySQL, SingleSore, Amazon Aurora MySQL, Amazon RDS MySQL, Oracle, and GCP_MYSQL, the `schema_name` is required, whereas the `database_name` attribute is not. Similarly, connectors such as ClickHouse require you to specify the `database_name` and the schema specification in such cases is optional. The API allows you to modify the calendar type, month offset value, start and end date, starting day of the week, and prefixes assigned to the year and quarter labels. #### Examples Update a custom calendar using an existing Table in ThoughtSpot: ``` { \"update_method\": \"FROM_EXISTING_TABLE\", \"table_reference\": { \"connection_identifier\": \"Connection1\", \"database_name\": \"db1\", \"table_name\": \"custom_calendar_2025\", \"schame_name\": \"schemaVar\" } } ``` Update a custom calendar with the attributes defined in the API request: ``` { \"update_method\": \"FROM_INPUT_PARAMS\", \"table_reference\": { \"connection_identifier\": \"Connection1\", \"database_name\": \"db1\", \"table_name\": \"custom_calendar_2025\", \"schame_name\": \"schemaVar\" }, \"month_offset\": \"August\", \"start_day_of_week\": \"Monday\", \"start_date\": \"08/01/2025\", \"end_date\": \"07/31/2026\" } ``` + * @param calendarIdentifier Unique Id or name of the calendar. + * @param updateCalendarRequest + */ + updateCalendar(calendarIdentifier, updateCalendarRequest, _options) { + const requestContextPromise = this.requestFactory.updateCalendar(calendarIdentifier, updateCalendarRequest, _options); + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx) => middleware.pre(ctx))); + } + return middlewarePreObservable.pipe(mergeMap((ctx) => this.configuration.httpApi.send(ctx))).pipe(mergeMap((response) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp) => this.responseProcessor.updateCalendar(rsp))); + })); + } +}; +var ObservableDBTApi = class { + constructor(configuration, requestFactory, responseProcessor) { + this.configuration = configuration; + this.requestFactory = requestFactory || new DBTApiRequestFactory(configuration); + this.responseProcessor = responseProcessor || new DBTApiResponseProcessor(); + } + /** + * Version: 9.9.0.cl or later Creates a DBT connection object in ThoughtSpot. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege or `DATAMANAGEMENT` (**Can manage data**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the following Data control privileges may be required: - `CAN_MANAGE_CUSTOM_CALENDAR`(**Can manage custom calendars**) - `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) - `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` (**Can manage data models**) #### About create DBT connection DBT connection in ThoughtSpot is used by the user to define DBT credentials for cloud . The API needs embrace connection, embrace database name, DBT url, import type, DBT account identifier, DBT project identifier, DBT access token and environment details (or) embrace connection, embrace database name, import type, file_content to create a connection object. To know more about DBT, see ThoughtSpot Product Documentation. + * @param connectionName Name of the connection. + * @param databaseName Name of the Database. + * @param importType Mention type of Import + * @param accessToken Access token is mandatory when Import_Type is DBT_CLOUD. + * @param dbtUrl DBT URL is mandatory when Import_Type is DBT_CLOUD. + * @param accountId Account ID is mandatory when Import_Type is DBT_CLOUD + * @param projectId Project ID is mandatory when Import_Type is DBT_CLOUD + * @param dbtEnvId DBT Environment ID\\\" + * @param projectName Name of the project + * @param fileContent Upload DBT Manifest and Catalog artifact files as a ZIP file. This field is Mandatory when Import Type is \\\'ZIP_FILE\\\' + */ + dbtConnection(connectionName, databaseName, importType, accessToken, dbtUrl, accountId, projectId, dbtEnvId, projectName, fileContent, _options) { + const requestContextPromise = this.requestFactory.dbtConnection(connectionName, databaseName, importType, accessToken, dbtUrl, accountId, projectId, dbtEnvId, projectName, fileContent, _options); + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx) => middleware.pre(ctx))); + } + return middlewarePreObservable.pipe(mergeMap((ctx) => this.configuration.httpApi.send(ctx))).pipe(mergeMap((response) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp) => this.responseProcessor.dbtConnection(rsp))); + })); + } + /** + * Version: 9.9.0.cl or later Resynchronize the existing list of models, tables, worksheet tml’s and import them to Thoughtspot based on the DBT connection object. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege or `DATAMANAGEMENT` (**Can manage data**) privilege, along with an existing DBT connection. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the following data control privileges may be required: - `CAN_MANAGE_CUSTOM_CALENDAR`(**Can manage custom calendars**) - `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) - `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` (**Can manage data models**) + * @param dbtConnectionIdentifier Unique ID of the DBT connection. + * @param fileContent Upload DBT Manifest and Catalog artifact files as a ZIP file. This field is mandatory if the connection was created with import_type ‘ZIP_FILE’ + */ + dbtGenerateSyncTml(dbtConnectionIdentifier, fileContent, _options) { + const requestContextPromise = this.requestFactory.dbtGenerateSyncTml(dbtConnectionIdentifier, fileContent, _options); + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx) => middleware.pre(ctx))); + } + return middlewarePreObservable.pipe(mergeMap((ctx) => this.configuration.httpApi.send(ctx))).pipe(mergeMap((response) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp) => this.responseProcessor.dbtGenerateSyncTml(rsp))); + })); + } + /** + * Version: 9.9.0.cl or later Generate required table and worksheet and import them. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege or `DATAMANAGEMENT` (**Can manage data**) privilege, along with an existing DBT connection. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the following data control privileges may be required: - `CAN_MANAGE_CUSTOM_CALENDAR`(**Can manage custom calendars**) - `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) - `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` (**Can manage data models**) #### About generate TML Models and Worksheets to be imported can be selected by the user as part of the API. + * @param dbtConnectionIdentifier Unique ID of the DBT connection. + * @param modelTables List of Models and their respective Tables Example: \\\'[{\\\"model_name\\\": \\\"model_name\\\", \\\"tables\\\": [\\\"table_name\\\"]}]\\\' + * @param importWorksheets Mention the worksheet tmls to import + * @param worksheets List of worksheets is mandatory when import_Worksheets is type SELECTED Example: [\\\"worksheet_name\\\"] + * @param fileContent Upload DBT Manifest and Catalog artifact files as a ZIP file. This field is mandatory if the connection was created with import_type ‘ZIP_FILE’ + */ + dbtGenerateTml(dbtConnectionIdentifier, modelTables, importWorksheets, worksheets, fileContent, _options) { + const requestContextPromise = this.requestFactory.dbtGenerateTml(dbtConnectionIdentifier, modelTables, importWorksheets, worksheets, fileContent, _options); + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx) => middleware.pre(ctx))); + } + return middlewarePreObservable.pipe(mergeMap((ctx) => this.configuration.httpApi.send(ctx))).pipe(mergeMap((response) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp) => this.responseProcessor.dbtGenerateTml(rsp))); + })); + } + /** + * Version: 9.9.0.cl or later Gets a list of DBT connection objects by user and organization, available on the ThoughtSpot system. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege or `DATAMANAGEMENT` (**Can manage data**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the following Data control privileges may be required: - `CAN_MANAGE_CUSTOM_CALENDAR`(**Can manage custom calendars**) - `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) - `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` (**Can manage data models**) #### About search DBT connection To get details of a specific DBT connection identifier, database connection identifier, database connection name, database name, project name, project identifier, environment identifier , import type and author. + */ + dbtSearch(_options) { + const requestContextPromise = this.requestFactory.dbtSearch(_options); + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx) => middleware.pre(ctx))); + } + return middlewarePreObservable.pipe(mergeMap((ctx) => this.configuration.httpApi.send(ctx))).pipe(mergeMap((response) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp) => this.responseProcessor.dbtSearch(rsp))); + })); + } + /** + * Version: 9.9.0.cl or later Removes the specified DBT connection object from the ThoughtSpot system. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) or `DATAMANAGEMENT` (**Can manage data ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the following Data control privileges may be required: - `CAN_MANAGE_CUSTOM_CALENDAR`(**Can manage custom calendars**) - `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) - `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` (**Can manage data models**) + * @param dbtConnectionIdentifier Unique ID of the DBT Connection. + */ + deleteDbtConnection(dbtConnectionIdentifier, _options) { + const requestContextPromise = this.requestFactory.deleteDbtConnection(dbtConnectionIdentifier, _options); + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx) => middleware.pre(ctx))); + } + return middlewarePreObservable.pipe(mergeMap((ctx) => this.configuration.httpApi.send(ctx))).pipe(mergeMap((response) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp) => this.responseProcessor.deleteDbtConnection(rsp))); + })); + } + /** + * Version: 9.9.0.cl or later Updates a DBT connection object. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege or `DATAMANAGEMENT` (**Can manage data ThoughtSpot**) privilege, along with an existing DBT connection. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the following data control privileges may be required: - `CAN_MANAGE_CUSTOM_CALENDAR`(**Can manage custom calendars**) - `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) - `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` (**Can manage data models**) #### About update DBT connection You can modify DBT connection object properties such as embrace connection name, embrace database name, import type, account identifier, access token, project identifier and environment (or) embrace connection, embrace database name, import type, file_content settings. + * @param dbtConnectionIdentifier Unique ID of the DBT Connection. + * @param connectionName Name of the connection. + * @param databaseName Name of the Database. + * @param importType Mention type of Import + * @param accessToken Access token is mandatory when Import_Type is DBT_CLOUD. + * @param dbtUrl DBT URL is mandatory when Import_Type is DBT_CLOUD. + * @param accountId Account ID is mandatory when Import_Type is DBT_CLOUD + * @param projectId Project ID is mandatory when Import_Type is DBT_CLOUD + * @param dbtEnvId DBT Environment ID\\\" + * @param projectName Name of the project + * @param fileContent Upload DBT Manifest and Catalog artifact files as a ZIP file. This field is Mandatory when Import Type is \\\'ZIP_FILE\\\' + */ + updateDbtConnection(dbtConnectionIdentifier, connectionName, databaseName, importType, accessToken, dbtUrl, accountId, projectId, dbtEnvId, projectName, fileContent, _options) { + const requestContextPromise = this.requestFactory.updateDbtConnection(dbtConnectionIdentifier, connectionName, databaseName, importType, accessToken, dbtUrl, accountId, projectId, dbtEnvId, projectName, fileContent, _options); + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx) => middleware.pre(ctx))); + } + return middlewarePreObservable.pipe(mergeMap((ctx) => this.configuration.httpApi.send(ctx))).pipe(mergeMap((response) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp) => this.responseProcessor.updateDbtConnection(rsp))); + })); + } +}; +var ObservableDataApi = class { + constructor(configuration, requestFactory, responseProcessor) { + this.configuration = configuration; + this.requestFactory = requestFactory || new DataApiRequestFactory(configuration); + this.responseProcessor = responseProcessor || new DataApiResponseProcessor(); + } + /** + * Version: 9.0.0.cl or later Fetches data from a saved Answer. Requires at least view access to the saved Answer. The `record_size` attribute determines the number of records to retrieve in an API call. For more information about pagination, record size, and maximum row limit, see [Pagination and record size settings](https://developers.thoughtspot.com/docs/fetch-data-and-report-apis#_pagination_settings_for_data_and_report_apis). + * @param fetchAnswerDataRequest + */ + fetchAnswerData(fetchAnswerDataRequest, _options) { + const requestContextPromise = this.requestFactory.fetchAnswerData(fetchAnswerDataRequest, _options); + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx) => middleware.pre(ctx))); + } + return middlewarePreObservable.pipe(mergeMap((ctx) => this.configuration.httpApi.send(ctx))).pipe(mergeMap((response) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp) => this.responseProcessor.fetchAnswerData(rsp))); + })); + } + /** + * Version: 9.0.0.cl or later Gets data from a Liveboard object and its visualization. Requires at least view access to the Liveboard. #### Usage guidelines In the request body, specify the GUID or name of the Liveboard. To get data for specific visualizations, add the GUIDs or names of the visualizations in the API request. To include unsaved changes in the report, pass the `transient_pinboard_content` script generated from the `getExportRequestForCurrentPinboard` method in the Visual Embed SDK. Upon successful execution, the API returns the report with unsaved changes. If the new Liveboard experience mode, the transient content includes ad hoc changes to visualizations such as sorting, toggling of legends, and data drill down. For more information, and see [Liveboard data API](https://developers.thoughtspot.com/docs/fetch-data-and-report-apis#_fetch_liveboard_data_api). + * @param fetchLiveboardDataRequest + */ + fetchLiveboardData(fetchLiveboardDataRequest, _options) { + const requestContextPromise = this.requestFactory.fetchLiveboardData(fetchLiveboardDataRequest, _options); + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx) => middleware.pre(ctx))); + } + return middlewarePreObservable.pipe(mergeMap((ctx) => this.configuration.httpApi.send(ctx))).pipe(mergeMap((response) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp) => this.responseProcessor.fetchLiveboardData(rsp))); + })); + } + /** + * Version: 9.0.0.cl or later Generates an Answer from a given data source. Requires at least view access to the data source object (Worksheet or View). #### Usage guidelines To search data, specify the data source GUID in `logical_table_identifier`. The data source can be a Worksheet, View, Table, or SQL view. Pass search tokens in the `query_string` attribute in the API request as shown in the following example: ``` { \"query_string\": \"[sales] by [store]\", \"logical_table_identifier\": \"cd252e5c-b552-49a8-821d-3eadaa049cca\", } ``` For more information about the `query_string` format and data source attribute, see [Search data API](https://developers.thoughtspot.com/docs/fetch-data-and-report-apis#_search_data_api). The `record_size` attribute determines the number of records to retrieve in an API call. For more information about pagination, record size, and maximum row limit, see [Pagination and record size settings](https://developers.thoughtspot.com/docs/fetch-data-and-report-apis#_pagination_settings_for_data_and_report_api). + * @param searchDataRequest + */ + searchData(searchDataRequest, _options) { + const requestContextPromise = this.requestFactory.searchData(searchDataRequest, _options); + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx) => middleware.pre(ctx))); + } + return middlewarePreObservable.pipe(mergeMap((ctx) => this.configuration.httpApi.send(ctx))).pipe(mergeMap((response) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp) => this.responseProcessor.searchData(rsp))); + })); + } +}; +var ObservableEmailCustomizationApi = class { + constructor(configuration, requestFactory, responseProcessor) { + this.configuration = configuration; + this.requestFactory = requestFactory || new EmailCustomizationApiRequestFactory(configuration); + this.responseProcessor = responseProcessor || new EmailCustomizationApiResponseProcessor(); + } + /** + * Version: 10.10.0.cl or later Creates a customization configuration for the notification email. #### Pre-requisites Requires `DEVELOPER` (**has developer privilege**) or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `DEVELOPER` (**Has developer privilege**) privilege is required. **NOTE**:This endpoint in currently in beta. Contact ThoughtSpot support to enable this on your instance. #### Usage guidelines To create a custom configuration pass these parameters in your API request: - A JSON map of configuration attributes `template_properties`. The following example shows a sample set of customization configuration: ``` { { \"cta_button_bg_color\": \"#444DEA\", \"cta_text_font_color\": \"#FFFFFF\", \"primary_bg_color\": \"#D3DEF0\", \"logo_url\": \"https://storage.pardot.com/710713/1642089901EbkRibJq/TS_fullworkmark_darkmode.png\", \"font_family\": \"\", \"product_name\": \"ThoughtSpot\", \"footer_address\": \"444 Castro St, Suite 1000 Mountain View, CA 94041\", \"footer_phone\": \"(800) 508-7008\", \"replacement_value_for_liveboard\": \"Dashboard\", \"replacement_value_for_answer\": \"Chart\", \"replacement_value_for_spot_iq\": \"AI Insights\", \"hide_footer_phone\": false, \"hide_footer_address\": false, \"hide_product_name\": false, \"hide_manage_notification\": false, \"hide_mobile_app_nudge\": false, \"hide_privacy_policy\": false, \"hide_ts_vocabulary_definitions\": false, \"hide_error_message\": false, \"hide_unsubscribe_link\": false, \"hide_notification_status\": false, \"hide_modify_alert\": false, \"company_website_url\": \"https://your-website.com/\", \"company_privacy_policy_url\" : \"https://link-to-privacy-policy.com/\", \"contact_support_url\": \"https://link-to-contact-support.com/\", \"hide_contact_support_url\": false, \"hide_logo_url\" : false } } ``` + * @param createEmailCustomizationRequest + */ + createEmailCustomization(createEmailCustomizationRequest, _options) { + const requestContextPromise = this.requestFactory.createEmailCustomization(createEmailCustomizationRequest, _options); + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx) => middleware.pre(ctx))); + } + return middlewarePreObservable.pipe(mergeMap((ctx) => this.configuration.httpApi.send(ctx))).pipe(mergeMap((response) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp) => this.responseProcessor.createEmailCustomization(rsp))); + })); + } + /** + * Version: 10.10.0.cl or later Deletes the configuration for the email customization. #### Pre-requisites Requires `DEVELOPER` (**has developer privilege**) or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `DEVELOPER` (**Has developer privilege**) privilege is required. **NOTE**:This endpoint in currently in beta. Contact ThoughtSpot support to enable this on your instance. #### Usage guidelines - Call the search API endpoint to get the `template_identifier` from the response. - Use that `template_identifier` as a parameter in this API request. + * @param templateIdentifier Unique ID or name of the email customization. + */ + deleteEmailCustomization(templateIdentifier, _options) { + const requestContextPromise = this.requestFactory.deleteEmailCustomization(templateIdentifier, _options); + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx) => middleware.pre(ctx))); + } + return middlewarePreObservable.pipe(mergeMap((ctx) => this.configuration.httpApi.send(ctx))).pipe(mergeMap((response) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp) => this.responseProcessor.deleteEmailCustomization(rsp))); + })); + } + /** + * Version: 10.12.0.cl or later Deletes the configuration for the email customization. #### Pre-requisites Requires `DEVELOPER` (**has developer privilege**) or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `DEVELOPER` (**Has developer privilege**) privilege is required. **NOTE**:This endpoint in currently in beta. Contact ThoughtSpot support to enable this on your instance. #### Usage guidelines - Call the search API endpoint to get the `org_identifier` from the response. - Use that `org_identifier` as a parameter in this API request. + * @param deleteOrgEmailCustomizationRequest + */ + deleteOrgEmailCustomization(deleteOrgEmailCustomizationRequest, _options) { + const requestContextPromise = this.requestFactory.deleteOrgEmailCustomization(deleteOrgEmailCustomizationRequest, _options); + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx) => middleware.pre(ctx))); + } + return middlewarePreObservable.pipe(mergeMap((ctx) => this.configuration.httpApi.send(ctx))).pipe(mergeMap((response) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp) => this.responseProcessor.deleteOrgEmailCustomization(rsp))); + })); + } + /** + * Version: 10.10.0.cl or later Search the email customization configuration if any set for the ThoughtSpot system. #### Pre-requisites Requires `DEVELOPER` (**has developer privilege**) or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `DEVELOPER` (**Has developer privilege**) privilege is required. **NOTE**:This endpoint in currently in beta. Contact ThoughtSpot support to enable this on your instance. + * @param searchEmailCustomizationRequest + */ + searchEmailCustomization(searchEmailCustomizationRequest, _options) { + const requestContextPromise = this.requestFactory.searchEmailCustomization(searchEmailCustomizationRequest, _options); + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx) => middleware.pre(ctx))); + } + return middlewarePreObservable.pipe(mergeMap((ctx) => this.configuration.httpApi.send(ctx))).pipe(mergeMap((response) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp) => this.responseProcessor.searchEmailCustomization(rsp))); + })); + } + /** + * Version: 10.12.0.cl or later Updates a customization configuration for the notification email. #### Pre-requisites Requires `DEVELOPER` (**has developer privilege**) or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `DEVELOPER` (**Has developer privilege**) privilege is required. **NOTE**:This endpoint in currently in beta. Contact ThoughtSpot support to enable this on your instance. #### Usage guidelines To update a custom configuration pass these parameters in your API request: - A JSON map of configuration attributes `template_properties`. The following example shows a sample set of customization configuration: ``` { { \"cta_button_bg_color\": \"#444DEA\", \"cta_text_font_color\": \"#FFFFFF\", \"primary_bg_color\": \"#D3DEF0\", \"logo_url\": \"https://storage.pardot.com/710713/1642089901EbkRibJq/TS_fullworkmark_darkmode.png\", \"font_family\": \"\", \"product_name\": \"ThoughtSpot\", \"footer_address\": \"444 Castro St, Suite 1000 Mountain View, CA 94041\", \"footer_phone\": \"(800) 508-7008\", \"replacement_value_for_liveboard\": \"Dashboard\", \"replacement_value_for_answer\": \"Chart\", \"replacement_value_for_spot_iq\": \"AI Insights\", \"hide_footer_phone\": false, \"hide_footer_address\": false, \"hide_product_name\": false, \"hide_manage_notification\": false, \"hide_mobile_app_nudge\": false, \"hide_privacy_policy\": false, \"hide_ts_vocabulary_definitions\": false, \"hide_error_message\": false, \"hide_unsubscribe_link\": false, \"hide_notification_status\": false, \"hide_modify_alert\": false, \"company_website_url\": \"https://your-website.com/\", \"company_privacy_policy_url\" : \"https://link-to-privacy-policy.com/\", \"contact_support_url\": \"https://link-to-contact-support.com/\", \"hide_contact_support_url\": false, \"hide_logo_url\" : false } } ``` + * @param updateEmailCustomizationRequest + */ + updateEmailCustomization(updateEmailCustomizationRequest, _options) { + const requestContextPromise = this.requestFactory.updateEmailCustomization(updateEmailCustomizationRequest, _options); + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx) => middleware.pre(ctx))); + } + return middlewarePreObservable.pipe(mergeMap((ctx) => this.configuration.httpApi.send(ctx))).pipe(mergeMap((response) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp) => this.responseProcessor.updateEmailCustomization(rsp))); + })); + } + /** + * Version: 10.10.0.cl or later Validates the email customization configuration if any set for the ThoughtSpot system. #### Pre-requisites Requires `DEVELOPER` (**has developer privilege**) or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `DEVELOPER` (**Has developer privilege**) privilege is required. **NOTE**:This endpoint in currently in beta. Contact ThoughtSpot support to enable this on your instance. + */ + validateEmailCustomization(_options) { + const requestContextPromise = this.requestFactory.validateEmailCustomization(_options); + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx) => middleware.pre(ctx))); + } + return middlewarePreObservable.pipe(mergeMap((ctx) => this.configuration.httpApi.send(ctx))).pipe(mergeMap((response) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp) => this.responseProcessor.validateEmailCustomization(rsp))); + })); + } +}; +var ObservableGroupsApi = class { + constructor(configuration, requestFactory, responseProcessor) { + this.configuration = configuration; + this.requestFactory = requestFactory || new GroupsApiRequestFactory(configuration); + this.responseProcessor = responseProcessor || new GroupsApiResponseProcessor(); + } + /** + * Version: 9.0.0.cl or later Creates a group object in ThoughtSpot. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `GROUP_ADMINISTRATION` (**Can manage groups**) privilege is required. #### About groups Groups in ThoughtSpot are used by the administrators to define privileges and organize users based on their roles and access requirements. To know more about groups and privileges, see [ThoughtSpot Product Documentation](https://docs.thoughtspot.com/cloud/latest/groups-privileges). #### Supported operations The API endpoint lets you perform the following operations: * Assign privileges * Add users * Define sharing visibility * Add sub-groups * Assign a default Liveboard + * @param createUserGroupRequest + */ + createUserGroup(createUserGroupRequest, _options) { + const requestContextPromise = this.requestFactory.createUserGroup(createUserGroupRequest, _options); + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx) => middleware.pre(ctx))); + } + return middlewarePreObservable.pipe(mergeMap((ctx) => this.configuration.httpApi.send(ctx))).pipe(mergeMap((response) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp) => this.responseProcessor.createUserGroup(rsp))); + })); + } + /** + * Version: 9.0.0.cl or later Removes the specified group object from the ThoughtSpot system. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `GROUP_ADMINISTRATION` (**Can manage groups**) privilege is required. + * @param groupIdentifier GUID or name of the group. + */ + deleteUserGroup(groupIdentifier, _options) { + const requestContextPromise = this.requestFactory.deleteUserGroup(groupIdentifier, _options); + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx) => middleware.pre(ctx))); + } + return middlewarePreObservable.pipe(mergeMap((ctx) => this.configuration.httpApi.send(ctx))).pipe(mergeMap((response) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp) => this.responseProcessor.deleteUserGroup(rsp))); + })); + } + /** + * Version: 9.0.0.cl or later Imports group objects from external databases into ThoughtSpot. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `GROUP_ADMINISTRATION` (**Can manage groups**) privilege is required. During the import operation: * If the specified group is not available in ThoughtSpot, it will be added to ThoughtSpot. * If `delete_unspecified_groups` is set to `true`, the groups not specified in the API request, excluding administrator and system user groups, are deleted. * If the specified groups are already available in ThoughtSpot, the object properties of these groups are modified and synchronized as per the input data in the API request. A successful API call returns the object that represents the changes made in the ThoughtSpot system. + * @param importUserGroupsRequest + */ + importUserGroups(importUserGroupsRequest, _options) { + const requestContextPromise = this.requestFactory.importUserGroups(importUserGroupsRequest, _options); + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx) => middleware.pre(ctx))); + } + return middlewarePreObservable.pipe(mergeMap((ctx) => this.configuration.httpApi.send(ctx))).pipe(mergeMap((response) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp) => this.responseProcessor.importUserGroups(rsp))); + })); + } + /** + * Version: 9.0.0.cl or later Gets a list of user group objects from the ThoughtSpot system. To get details of a specific user group, specify the user group GUID or name. You can also filter the API response based on User ID, Org ID, Role ID, type of group, sharing visibility, privileges assigned to the group, and the Liveboard IDs assigned to the users in the group. Available to all users. Users with `ADMINISTRATION` (**Can administer ThoughtSpot**) privileges can view all users properties. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `GROUP_ADMINISTRATION` (**Can manage groups**) privilege is required. **NOTE**: If you do not get precise results, try setting `record_size` to `-1` and `record_offset` to `0`. + * @param searchUserGroupsRequest + */ + searchUserGroups(searchUserGroupsRequest, _options) { + const requestContextPromise = this.requestFactory.searchUserGroups(searchUserGroupsRequest, _options); + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx) => middleware.pre(ctx))); + } + return middlewarePreObservable.pipe(mergeMap((ctx) => this.configuration.httpApi.send(ctx))).pipe(mergeMap((response) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp) => this.responseProcessor.searchUserGroups(rsp))); + })); + } + /** + * Version: 9.0.0.cl or later Updates the properties of a group object in ThoughtSpot. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `GROUP_ADMINISTRATION` (**Can manage groups**) privilege is required. #### Supported operations This API endpoint lets you perform the following operations in a single API request: * Edit [privileges](https://developers.thoughtspot.com/docs/?pageid=api-user-management#group-privileges) * Add or remove users * Change sharing visibility settings * Add or remove sub-groups * Assign a default Liveboard or update the existing settings + * @param groupIdentifier GUID or name of the group. + * @param updateUserGroupRequest + */ + updateUserGroup(groupIdentifier, updateUserGroupRequest, _options) { + const requestContextPromise = this.requestFactory.updateUserGroup(groupIdentifier, updateUserGroupRequest, _options); + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx) => middleware.pre(ctx))); + } + return middlewarePreObservable.pipe(mergeMap((ctx) => this.configuration.httpApi.send(ctx))).pipe(mergeMap((response) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp) => this.responseProcessor.updateUserGroup(rsp))); + })); + } +}; +var ObservableJobsApi = class { + constructor(configuration, requestFactory, responseProcessor) { + this.configuration = configuration; + this.requestFactory = requestFactory || new JobsApiRequestFactory(configuration); + this.responseProcessor = responseProcessor || new JobsApiResponseProcessor(); + } + /** + * Version: 26.4.0.cl or later Searches delivery history for communication channels such as webhooks. Returns channel-level delivery status for each job execution record. Use this to monitor channel health and delivery success rates across events. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) or `DEVELOPER` (**Has developer privilege**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, users with `CAN_MANAGE_WEBHOOKS` (**Can manage webhooks**) privilege are also authorized to perform this action. **NOTE**: When `channel_type` is `WEBHOOK`, the following constraints apply: - `job_ids`, `channel_identifiers`, and `events` each accept at most one element. - When `job_ids` is provided, it is used as the sole lookup key and other filter fields are ignored. - When `job_ids` is not provided, `channel_identifiers` and `events` are both required, each containing exactly one element. - Records older than the configured retention period are not returned. - Use `start_epoch_time_in_millis` and/or `end_epoch_time_in_millis` to narrow results to a specific time window. + * @param searchChannelHistoryRequest + */ + searchChannelHistory(searchChannelHistoryRequest, _options) { + const requestContextPromise = this.requestFactory.searchChannelHistory(searchChannelHistoryRequest, _options); + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx) => middleware.pre(ctx))); + } + return middlewarePreObservable.pipe(mergeMap((ctx) => this.configuration.httpApi.send(ctx))).pipe(mergeMap((response) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp) => this.responseProcessor.searchChannelHistory(rsp))); + })); + } +}; +var ObservableLogApi = class { + constructor(configuration, requestFactory, responseProcessor) { + this.configuration = configuration; + this.requestFactory = requestFactory || new LogApiRequestFactory(configuration); + this.responseProcessor = responseProcessor || new LogApiResponseProcessor(); + } + /** + * Version: 9.0.0.cl or later Fetches security audit logs. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the [Admin Control](https://developers.thoughtspot.com/docs/rbac#_admin_control) privileges are required. #### Usage guidelines By default, the API retrieves logs for the last 24 hours. You can set a custom duration in EPOCH time. Make sure the log duration specified in your API request doesn’t exceed 24 hours. If you must fetch logs for a longer time range, modify the duration and make multiple sequential API requests. Upon successful execution, the API returns logs with the following information: * timestamp of the event * event ID * event type * name and GUID of the user * IP address of ThoughtSpot instance For more information see [Audit logs Documentation](https://developers.thoughtspot.com/docs/audit-logs). + * @param fetchLogsRequest + */ + fetchLogs(fetchLogsRequest, _options) { + const requestContextPromise = this.requestFactory.fetchLogs(fetchLogsRequest, _options); + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx) => middleware.pre(ctx))); + } + return middlewarePreObservable.pipe(mergeMap((ctx) => this.configuration.httpApi.send(ctx))).pipe(mergeMap((response) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp) => this.responseProcessor.fetchLogs(rsp))); + })); + } +}; +var ObservableMetadataApi = class { + constructor(configuration, requestFactory, responseProcessor) { + this.configuration = configuration; + this.requestFactory = requestFactory || new MetadataApiRequestFactory(configuration); + this.responseProcessor = responseProcessor || new MetadataApiResponseProcessor(); + } + /** + * Convert worksheets to models Version: 10.6.0.cl or later ## Prerequisites - **Privileges Required:** - `DATAMANAGEMENT` (Can manage data) or `ADMINISTRATION` (Can administer ThoughtSpot). - **Additional Privileges (if RBAC is enabled):** - `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` (Can manage data models). --- ## Usage Guidelines ### Parameters 1. **worksheet_ids** - **Description:** A comma-separated list of GUIDs (Globally Unique Identifiers) specifying the Worksheets to be converted. - **Usage:** - Used only when `convert_all` is set to `false`. - Leave empty or omit when `convert_all` is set to `true`. 2. **exclude_worksheet_ids** - **Description:** A comma-separated list of GUIDs specifying Worksheets to be excluded from conversion. - **Usage:** - Useful when `convert_all` is set to `true` and specific Worksheets should not be converted. 3. **convert_all** - **Description:** Sets the scope of conversion. - **Options:** - `true`: Converts all Worksheets in the system, except those specified in `exclude_worksheet_ids`. - `false`: Converts only the Worksheets listed in `worksheet_ids`. 4. **apply_changes** - **Description:** Specifies whether to apply changes directly to ThoughtSpot or to generate a preview before applying any changes.Used for validation of conversion. - **Options:** - `true`: Applies conversion changes directly to ThoughtSpot. - `false`: Generates only a preview of the changes and does not apply any changes to ThoughtSpot --- ## Best Practices 1. **Backup Before Conversion:** Always export metadata as a backup before initiating the conversion process 2. **Partial Conversion for Testing:** Test the conversion process by setting `convert_all` to `false` and specifying a small number of `worksheet_ids`. 3. **Verify Dependencies:** Check for dependent objects, such as Tables and Connections, to avoid invalid references. 4. **Review Changes:** Use `apply_changes: false` to preview the impact of the conversion before applying changes. --- ## Examples ### Convert Specific Worksheets ```json { \"worksheet_ids\": [\"guid1\", \"guid2\", \"guid3\"], \"exclude_worksheet_ids\": [], \"convert_all\": false, \"apply_changes\": true } ``` ### Convert All Accessible Worksheets ```json { \"worksheet_ids\": [], \"exclude_worksheet_ids\": [], \"convert_all\": true, \"apply_changes\": true } ``` ### Exclude Specific Worksheets While Converting All Accessible Worksheets ```json { \"worksheet_ids\": [], \"exclude_worksheet_ids\": [\"abc\"], \"convert_all\": true, \"apply_changes\": true } ``` + * @param convertWorksheetToModelRequest + */ + convertWorksheetToModel(convertWorksheetToModelRequest, _options) { + const requestContextPromise = this.requestFactory.convertWorksheetToModel(convertWorksheetToModelRequest, _options); + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx) => middleware.pre(ctx))); + } + return middlewarePreObservable.pipe(mergeMap((ctx) => this.configuration.httpApi.send(ctx))).pipe(mergeMap((response) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp) => this.responseProcessor.convertWorksheetToModel(rsp))); + })); + } + /** + * Makes a copy of an Answer or Liveboard Version: 10.3.0.cl or later Creates a copy of a metadata object. Requires at least view access to the metadata object being copied. Upon successful execution, the API creates a copy of the metadata object specified in the API request and returns the ID of the new object. + * @param copyObjectRequest + */ + copyObject(copyObjectRequest, _options) { + const requestContextPromise = this.requestFactory.copyObject(copyObjectRequest, _options); + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx) => middleware.pre(ctx))); + } + return middlewarePreObservable.pipe(mergeMap((ctx) => this.configuration.httpApi.send(ctx))).pipe(mergeMap((response) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp) => this.responseProcessor.copyObject(rsp))); + })); + } + /** + * Version: 9.0.0.cl or later Removes the specified metadata object from the ThoughtSpot system. Requires edit access to the metadata object. + * @param deleteMetadataRequest + */ + deleteMetadata(deleteMetadataRequest, _options) { + const requestContextPromise = this.requestFactory.deleteMetadata(deleteMetadataRequest, _options); + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx) => middleware.pre(ctx))); + } + return middlewarePreObservable.pipe(mergeMap((ctx) => this.configuration.httpApi.send(ctx))).pipe(mergeMap((response) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp) => this.responseProcessor.deleteMetadata(rsp))); + })); + } + /** + * Version: 9.0.0.cl or later Exports the [TML](https://docs.thoughtspot.com/cloud/latest/tml) representation of metadata objects in JSON or YAML format. Requires `DATADOWNLOADING` (**Can download Data**) and at least view access to the metadata object. #### Usage guidelines * You can export one or several objects by passing metadata object GUIDs in the `metadata` array. * When exporting TML content for a Liveboard or Answer object, you can set `export_associated` to `true` to retrieve TML content for underlying Worksheets, Tables, or Views, including the GUID of each object within the headers. When `export_associated` is set to `true`, consider retrieving one metadata object at a time. * Set `export_fqns` to `true` to add FQNs of the referenced objects in the TML content. For example, if you send an API request to retrieve TML for a Liveboard and its associated objects, the API returns the TML content with FQNs of the referenced Worksheet. Exporting TML with FQNs is useful if ThoughtSpot has multiple objects with the same name and you want to eliminate ambiguity when importing TML files into ThoughtSpot. It eliminates the need for adding FQNs of the referenced objects manually during the import operation. * To export only the TML of feedbacks associated with an object, set the GUID of the object as `identifier`, and set the `type` as `FEEDBACK` in the `metadata` array. * To export the TML of an object along with the feedbacks associated with it, set the GUID of the object as `identifier`, set the `type` as `LOGIAL_TABLE` in the `metadata` array, and set `export_with_associated_feedbacks` in `export_options` to true. For more information, see [TML Documentation](https://developers.thoughtspot.com/docs/tml#_export_a_tml). For more information on feedbacks, see [Feedback Documentation](https://docs.thoughtspot.com/cloud/latest/sage-feedback). + * @param exportMetadataTMLRequest + */ + exportMetadataTML(exportMetadataTMLRequest, _options) { + const requestContextPromise = this.requestFactory.exportMetadataTML(exportMetadataTMLRequest, _options); + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx) => middleware.pre(ctx))); + } + return middlewarePreObservable.pipe(mergeMap((ctx) => this.configuration.httpApi.send(ctx))).pipe(mergeMap((response) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp) => this.responseProcessor.exportMetadataTML(rsp))); + })); + } + /** + * Version: 10.1.0.cl or later Exports the [TML](https://docs.thoughtspot.com/cloud/latest/tml) representation of metadata objects in JSON or YAML format. ### **Permissions Required** Requires `DATAMANAGEMENT` (**Can manage data**) and `USERMANAGEMENT` (**Can manage users**) privileges. #### **Usage Guidelines** This API is only applicable for `USER`, `GROUP`, and `ROLES` metadata types. - `batch_offset` Indicates the starting position within the complete dataset from which the API should begin returning objects. Useful for paginating results efficiently. - `batch_size` Specifies the number of objects or items to retrieve in a single request. Helps control response size for better performance. - `edoc_format` Defines the format of the TML content. The exported metadata can be in JSON or YAML format. - `export_dependent` Specifies whether to include dependent metadata objects in the export. Ensures related objects are also retrieved if needed. - `all_orgs_override` Indicates whether the export operation applies across all organizations. Useful for multi-tenant environments where cross-org exports are required. + * @param exportMetadataTMLBatchedRequest + */ + exportMetadataTMLBatched(exportMetadataTMLBatchedRequest, _options) { + const requestContextPromise = this.requestFactory.exportMetadataTMLBatched(exportMetadataTMLBatchedRequest, _options); + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx) => middleware.pre(ctx))); + } + return middlewarePreObservable.pipe(mergeMap((ctx) => this.configuration.httpApi.send(ctx))).pipe(mergeMap((response) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp) => this.responseProcessor.exportMetadataTMLBatched(rsp))); + })); + } + /** + * Version: 9.0.0.cl or later Fetches the underlying SQL query data for an Answer object. Requires at least view access to the Answer object. Upon successful execution, the API returns the SQL queries for the specified object as shown in this example: ``` { \"metadata_id\":\"8fbe44a8-46ad-4b16-8d39-184b2fada490\", \"metadata_name\":\"Total sales\", \"metadata_type\":\"ANSWER\", \"sql_queries\":[ { \"metadata_id\":\"8fbe44a8-46ad-4b16-8d39-184b2fada490\", \"metadata_name\":\"Total sales -test\", \"sql_query\":\"SELECT \\n \\\"ta_1\\\".\\\"REGION\\\" \\\"ca_1\\\", \\n \\\"ta_2\\\".\\\"PRODUCTNAME\\\" \\\"ca_2\\\", \\n \\\"ta_1\\\".\\\"STORENAME\\\" \\\"ca_3\\\", \\n CASE\\n WHEN sum(\\\"ta_3\\\".\\\"SALES\\\") IS NOT NULL THEN sum(\\\"ta_3\\\".\\\"SALES\\\")\\n ELSE 0\\n END \\\"ca_4\\\", \\n CASE\\n WHEN sum(\\\"ta_3\\\".\\\"QUANTITYPURCHASED\\\") IS NOT NULL THEN sum(\\\"ta_3\\\".\\\"QUANTITYPURCHASED\\\")\\n ELSE 0\\n END \\\"ca_5\\\"\\nFROM \\\"RETAILAPPAREL\\\".\\\"PUBLIC\\\".\\\"FACT_RETAPP_SALES\\\" \\\"ta_3\\\"\\n JOIN \\\"RETAILAPPAREL\\\".\\\"PUBLIC\\\".\\\"DIM_RETAPP_STORES\\\" \\\"ta_1\\\"\\n ON \\\"ta_3\\\".\\\"STOREID\\\" = \\\"ta_1\\\".\\\"STOREID\\\"\\n JOIN \\\"RETAILAPPAREL\\\".\\\"PUBLIC\\\".\\\"DIM_RETAPP_PRODUCTS\\\" \\\"ta_2\\\"\\n ON \\\"ta_3\\\".\\\"PRODUCTID\\\" = \\\"ta_2\\\".\\\"PRODUCTID\\\"\\nGROUP BY \\n \\\"ca_1\\\", \\n \\\"ca_2\\\", \\n \\\"ca_3\\\"\\n\" } ] } ``` + * @param fetchAnswerSqlQueryRequest + */ + fetchAnswerSqlQuery(fetchAnswerSqlQueryRequest, _options) { + const requestContextPromise = this.requestFactory.fetchAnswerSqlQuery(fetchAnswerSqlQueryRequest, _options); + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx) => middleware.pre(ctx))); + } + return middlewarePreObservable.pipe(mergeMap((ctx) => this.configuration.httpApi.send(ctx))).pipe(mergeMap((response) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp) => this.responseProcessor.fetchAnswerSqlQuery(rsp))); + })); + } + /** + * Version: 10.4.0.cl or later Gets information about the status of the TML async import task scheduled using the `/api/rest/2.0/metadata/tml/async/import` API call. To fetch the task details, specify the ID of the TML async import task. Requires access to the task ID. The API allows users who initiated the asynchronous TML import via `/api/rest/2.0/metadata/tml/async/import` to view the status of their tasks. Users with administration privilege can view the status of all import tasks initiated by the users in their Org. #### Usage guidelines See [TML API Documentation](https://developers.thoughtspot.com/docs/tml#_fetch_status_of_the_tml_import_task) for usage guidelines. + * @param fetchAsyncImportTaskStatusRequest + */ + fetchAsyncImportTaskStatus(fetchAsyncImportTaskStatusRequest, _options) { + const requestContextPromise = this.requestFactory.fetchAsyncImportTaskStatus(fetchAsyncImportTaskStatusRequest, _options); + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx) => middleware.pre(ctx))); + } + return middlewarePreObservable.pipe(mergeMap((ctx) => this.configuration.httpApi.send(ctx))).pipe(mergeMap((response) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp) => this.responseProcessor.fetchAsyncImportTaskStatus(rsp))); + })); + } + /** + * Version: 9.0.0.cl or later Fetches the underlying SQL query data for a Liveboard object and its visualizations. Requires at least view access to the Liveboard object. To get SQL query data for a Liveboard, specify the GUID of the Liveboard. Optionally, you can add an array of visualization GUIDs to retrieve the SQL query data for visualizations in the Liveboard. Upon successful execution, the API returns the SQL queries for the specified object as shown in this example: ``` { \"metadata_id\": \"fa68ae91-7588-4136-bacd-d71fb12dda69\", \"metadata_name\": \"Total Sales\", \"metadata_type\": \"LIVEBOARD\", \"sql_queries\": [ { \"metadata_id\": \"b3b6d2b9-089a-490c-8e16-b144650b7843\", \"metadata_name\": \"Total quantity purchased, Total sales by region\", \"sql_query\": \"SELECT \\n \\\"ta_1\\\".\\\"REGION\\\" \\\"ca_1\\\", \\n CASE\\n WHEN sum(\\\"ta_2\\\".\\\"QUANTITYPURCHASED\\\") IS NOT NULL THEN sum(\\\"ta_2\\\".\\\"QUANTITYPURCHASED\\\")\\n ELSE 0\\n END \\\"ca_2\\\", \\n CASE\\n WHEN sum(\\\"ta_2\\\".\\\"SALES\\\") IS NOT NULL THEN sum(\\\"ta_2\\\".\\\"SALES\\\")\\n ELSE 0\\n END \\\"ca_3\\\"\\nFROM \\\"RETAILAPPAREL\\\".\\\"PUBLIC\\\".\\\"FACT_RETAPP_SALES\\\" \\\"ta_2\\\"\\n JOIN \\\"RETAILAPPAREL\\\".\\\"PUBLIC\\\".\\\"DIM_RETAPP_STORES\\\" \\\"ta_1\\\"\\n ON \\\"ta_2\\\".\\\"STOREID\\\" = \\\"ta_1\\\".\\\"STOREID\\\"\\nGROUP BY \\\"ca_1\\\"\" } ] } ``` + * @param fetchLiveboardSqlQueryRequest + */ + fetchLiveboardSqlQuery(fetchLiveboardSqlQueryRequest, _options) { + const requestContextPromise = this.requestFactory.fetchLiveboardSqlQuery(fetchLiveboardSqlQueryRequest, _options); + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx) => middleware.pre(ctx))); + } + return middlewarePreObservable.pipe(mergeMap((ctx) => this.configuration.httpApi.send(ctx))).pipe(mergeMap((response) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp) => this.responseProcessor.fetchLiveboardSqlQuery(rsp))); + })); + } + /** + * Version: 9.0.0.cl or later Imports [TML](https://docs.thoughtspot.com/cloud/latest/tml) files into ThoughtSpot. Requires `DATAMANAGEMENT` (**Can manage data**) or `ADMINISTRATION` (**Can administer ThoughtsSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the following Data control privileges may be required: - `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) - `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` (**Can manage data models**) #### Usage guidelines * Import all related objects in a single TML Import API call. For example, Tables that use the same Connection object and Worksheets connected to these Tables. * Include the `fqn` property to distinguish objects that have the same name. For example, if you have multiple Connections or Worksheets with the same name on ThoughtSpot and the Connection or Worksheet referenced in your TML file does not have a unique name to distinguish, it may result in invalid object references. Adding `fqn` helps ThoughtSpot differentiate a Table from another with the same name. We recommend [exporting TML with FQNs](#/http/api-endpoints/metadata/export-metadata-tml) and using these during the import operation. * You can upload multiple TML files at a time. If you import a Worksheet along with Liveboards, Answers, and other dependent objects in a single API call, the imported objects will be immediately available for use. When you import only a Worksheet object, it may take some time for the Worksheet to become available in the ThoughtSpot system. Please wait for a few minutes, and then proceed to create an Answer and Liveboard from the newly imported Worksheet. For more information, see [TML Documentation](https://developers.thoughtspot.com/docs/tml#_import_a_tml). + * @param importMetadataTMLRequest + */ + importMetadataTML(importMetadataTMLRequest, _options) { + const requestContextPromise = this.requestFactory.importMetadataTML(importMetadataTMLRequest, _options); + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx) => middleware.pre(ctx))); + } + return middlewarePreObservable.pipe(mergeMap((ctx) => this.configuration.httpApi.send(ctx))).pipe(mergeMap((response) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp) => this.responseProcessor.importMetadataTML(rsp))); + })); + } + /** + * Version: 10.4.0.cl or later Schedules a task to import [TML](https://docs.thoughtspot.com/cloud/latest/tml) files into ThoughtSpot. You can use this API endpoint to process TML objects asynchronously when importing TMLs of large and complex metadata objects into ThoughtSpot. Unlike the synchronous import TML operation, the API processes TML data in the background and returns a task ID, which can be used to check the status of the import task via `/api/rest/2.0/metadata/tml/async/status` API endpoint. Requires `DATAMANAGEMENT` (**Can manage data**) or `ADMINISTRATION` (**Can administer ThoughtsSpot**) privilege, and edit access to the TML objects. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the following Data control privileges may be required: - `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) - `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` (**Can manage data models**) #### Usage guidelines See [Async TML API Documentation](https://developers.thoughtspot.com/docs/tml#_import_tml_objects_asynchronously) for usage guidelines. + * @param importMetadataTMLAsyncRequest + */ + importMetadataTMLAsync(importMetadataTMLAsyncRequest, _options) { + const requestContextPromise = this.requestFactory.importMetadataTMLAsync(importMetadataTMLAsyncRequest, _options); + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx) => middleware.pre(ctx))); + } + return middlewarePreObservable.pipe(mergeMap((ctx) => this.configuration.httpApi.send(ctx))).pipe(mergeMap((response) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp) => this.responseProcessor.importMetadataTMLAsync(rsp))); + })); + } + /** + * Parameterize fields in metadata objects. Version: 10.9.0.cl or later **Note:** This API endpoint is deprecated and will be removed from ThoughtSpot in a future release. Use [POST /api/rest/2.0/metadata/parameterize-fields](/api/rest/2.0/metadata/parameterize-fields) instead. Allows parameterizing fields in metadata objects in ThoughtSpot. Requires appropriate permissions to modify the metadata object. The API endpoint allows parameterizing the following types of metadata objects: * Logical Tables * Connections * Connection Configs For a Logical Table the field type must be `ATTRIBUTE` and field name can be one of: * databaseName * schemaName * tableName For a Connection or Connection Config, the field type is always `CONNECTION_PROPERTY`. In this case, field_name specifies the exact property of the Connection or Connection Config that needs to be parameterized. For Connection Config, the only supported field name is: * impersonate_user + * @param parameterizeMetadataRequest + */ + parameterizeMetadata(parameterizeMetadataRequest, _options) { + const requestContextPromise = this.requestFactory.parameterizeMetadata(parameterizeMetadataRequest, _options); + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx) => middleware.pre(ctx))); + } + return middlewarePreObservable.pipe(mergeMap((ctx) => this.configuration.httpApi.send(ctx))).pipe(mergeMap((response) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp) => this.responseProcessor.parameterizeMetadata(rsp))); + })); + } + /** + * Parameterize multiple fields of metadata objects. For example [schemaName, databaseName] for LOGICAL_TABLE. Version: 26.5.0.cl or later Allows parameterizing multiple fields of metadata objects in ThoughtSpot. For example, you can parameterize [schemaName, databaseName] for LOGICAL_TABLE. Requires appropriate permissions to modify the metadata object. The API endpoint allows parameterizing the following types of metadata objects: * Logical Tables * Connections * Connection Configs For a Logical Table, the field type must be `ATTRIBUTE` and field names can include: * databaseName * schemaName * tableName For a Connection or Connection Config, the field type is always `CONNECTION_PROPERTY`. In this case, field_names specifies the exact properties of the Connection or Connection Config that need to be parameterized. For Connection Config, supported field names include: * impersonate_user You can parameterize multiple fields at once by providing an array of field names. + * @param parameterizeMetadataFieldsRequest + */ + parameterizeMetadataFields(parameterizeMetadataFieldsRequest, _options) { + const requestContextPromise = this.requestFactory.parameterizeMetadataFields(parameterizeMetadataFieldsRequest, _options); + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx) => middleware.pre(ctx))); + } + return middlewarePreObservable.pipe(mergeMap((ctx) => this.configuration.httpApi.send(ctx))).pipe(mergeMap((response) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp) => this.responseProcessor.parameterizeMetadataFields(rsp))); + })); + } + /** + * Version: 9.0.0.cl or later Gets a list of metadata objects available on the ThoughtSpot system. This API endpoint is available to all users who have view access to the object. Users with `ADMINISTRATION` (**Can administer ThoughtSpot**) privileges can view data for all metadata objects, including users and groups. #### Usage guidelines - To get all metadata objects, send the API request without any attributes. - To get metadata objects of a specific type, set the `type` attribute. For example, to fetch a Worksheet, set the type as `LOGICAL_TABLE`. - To filter metadata objects within type `LOGICAL_TABLE`, set the `subtypes` attribute. For example, to fetch a Worksheet, set the type as `LOGICAL_TABLE` & subtypes as `[WORKSHEET]`. - To get a specific metadata object, specify the GUID. - To customize your search and filter the API response, you can use several parameters. You can search for objects created or modified by specific users, by tags applied to the objects, or by using the include parameters like `include_auto_created_objects`, `include_dependent_objects`, `include_headers`, `include_incomplete_objects`, and so on. You can also define sorting options to sort the data retrieved in the API response. - To get discoverable objects when linientmodel is enabled you can use `include_discoverable_objects` as true else false. Default value is true. - For liveboard metadata type, to get the newer format, set the `liveboard_response_format` as V2. Default value is V1. - To retrieve only objects that are published, set the `include_only_published_objects` as true. Default value is false. **NOTE**: The following parameters support pagination of metadata records: - `tag_identifiers` - `type` - `subtypes` - `created_by_user_identifiers` - `modified_by_user_identifiers` - `owned_by_user_identifiers` - `exclude_objects` - `include_auto_created_objects` - `favorite_object_options` - `include_only_published_objects` If you are using other parameters to search metadata, set `record_size` to `-1` and `record_offset` to `0`. + * @param searchMetadataRequest + */ + searchMetadata(searchMetadataRequest, _options) { + const requestContextPromise = this.requestFactory.searchMetadata(searchMetadataRequest, _options); + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx) => middleware.pre(ctx))); + } + return middlewarePreObservable.pipe(mergeMap((ctx) => this.configuration.httpApi.send(ctx))).pipe(mergeMap((response) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp) => this.responseProcessor.searchMetadata(rsp))); + })); + } + /** + * Remove parameterization from fields in metadata objects. Version: 26.5.0.cl or later Allows removing parameterization from fields in metadata objects in ThoughtSpot. Requires appropriate permissions to modify the metadata object. The API endpoint allows unparameterizing the following types of metadata objects: * Logical Tables * Connections * Connection Configs For a Logical Table the field type must be `ATTRIBUTE` and field name can be one of: * databaseName * schemaName * tableName For a Connection or Connection Config, the field type is always `CONNECTION_PROPERTY`. In this case, field_name specifies the exact property of the Connection or Connection Config that needs to be unparameterized. For Connection Config, the only supported field name is: * impersonate_user + * @param unparameterizeMetadataRequest + */ + unparameterizeMetadata(unparameterizeMetadataRequest, _options) { + const requestContextPromise = this.requestFactory.unparameterizeMetadata(unparameterizeMetadataRequest, _options); + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx) => middleware.pre(ctx))); + } + return middlewarePreObservable.pipe(mergeMap((ctx) => this.configuration.httpApi.send(ctx))).pipe(mergeMap((response) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp) => this.responseProcessor.unparameterizeMetadata(rsp))); + })); + } + /** + * Update header attributes for a given list of header objects. Version: 10.6.0.cl or later ## Prerequisites - **Privileges Required:** - `DATAMANAGEMENT` (Can manage data) or `ADMINISTRATION` (Can administer ThoughtSpot). - **Additional Privileges (if RBAC is enabled):** - `ORG_ADMINISTRATION` (Can manage orgs). --- ## Usage Guidelines ### Parameters 1. **headers_update** - **Description:** List of header objects with their attributes to be updated. Each object contains a list of attributes to be updated in the header. - **Usage:** - You must provide either `identifier` or `obj_identifier`, but not both. Both fields cannot be empty. - When `org_identifier` is set to `-1`, only the `identifier` value is accepted; `obj_identifier` is not allowed. 2. **org_identifier** - **Description:** GUID (Globally Unique Identifier) or name of the organization. - **Usage:** - Leaving this field empty assumes that the changes should be applied to the current organization - Provide `org_guid` or `org_name` to uniquely identify the organization where changes need to be applied. . - Provide `-1` if changes have to be applied across all the org. --- ## Note Currently, this API is enabled only for updating the `obj_identifier` attribute. Only `text` will be allowed in attribute\'s value. ## Best Practices 1. **Backup Before Conversion:** Always export metadata as a backup before initiating the update process --- ## Examples ### Only `identifier` is given ```json { \"headers_update\": [ { \"identifier\": \"guid_1\", \"obj_identifier\": \"\", \"type\": \"LOGICAL_COLUMN\", \"attributes\": [ { \"name\": \"obj_id\", \"value\": \"custom_object_id\" } ] } ], \"org_identifier\": \"orgGuid\" } ``` ### Only `obj_identifier` is given ```json { \"headers_update\": [ { \"obj_identifier\": \"custom_object_id\", \"type\": \"ANSWER\", \"attributes\": [ { \"name\": \"obj_id\", \"value\": \"custom_object_id\" } ] } ], \"org_identifier\": \"orgName\" } ``` ### Executing update for all org `-1` ```json { \"headers_update\": [ { \"identifier\": \"guid_1\", \"type\": \"ANSWER\", \"attributes\": [ { \"name\": \"obj_id\", \"value\": \"custom_object_id\" } ] } ], \"org_identifier\": -1 } ``` ### Optional `type` is not provided ```json { \"headers_update\": [ { \"identifier\": \"guid_1\", \"attributes\": [ { \"name\": \"obj_id\", \"value\": \"custom_object_id\" } ] } ], \"org_identifier\": -1 } ``` + * @param updateMetadataHeaderRequest + */ + updateMetadataHeader(updateMetadataHeaderRequest, _options) { + const requestContextPromise = this.requestFactory.updateMetadataHeader(updateMetadataHeaderRequest, _options); + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx) => middleware.pre(ctx))); + } + return middlewarePreObservable.pipe(mergeMap((ctx) => this.configuration.httpApi.send(ctx))).pipe(mergeMap((response) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp) => this.responseProcessor.updateMetadataHeader(rsp))); + })); + } + /** + * Update object IDs for given metadata objects. Version: 10.8.0.cl or later ## Prerequisites - **Privileges Required:** - `DATAMANAGEMENT` (Can manage data) or `ADMINISTRATION` (Can administer ThoughtSpot). - **Additional Privileges (if RBAC is enabled):** - `ORG_ADMINISTRATION` (Can manage orgs). --- ## Usage Guidelines ### Parameters 1. **metadata** - **Description:** List of metadata objects to update their object IDs. - **Usage:** - Use either `current_obj_id` alone OR use `metadata_identifier` with `type` (when needed). - When using `metadata_identifier`, the `type` field is required if using a name instead of a GUID. - The `new_obj_id` field is always required. --- ## Note This API is specifically designed for updating object IDs of metadata objects. It internally uses the header update mechanism to perform the changes. ## Best Practices 1. **Backup Before Update:** Always export metadata as a backup before initiating the update process. 2. **Validation:** - When using `current_obj_id`, ensure it matches the existing object ID exactly. - When using `metadata_identifier` with a name, ensure the `type` is specified correctly. - Verify that the `new_obj_id` follows your naming conventions and is unique within your system. --- ## Examples ### Using current_obj_id ```json { \"metadata\": [ { \"current_obj_id\": \"existing_object_id\", \"new_obj_id\": \"new_object_id\" } ] } ``` ### Using metadata_identifier with GUID ```json { \"metadata\": [ { \"metadata_identifier\": \"01234567-89ab-cdef-0123-456789abcdef\", \"new_obj_id\": \"new_object_id\" } ] } ``` ### Using metadata_identifier with name and type ```json { \"metadata\": [ { \"metadata_identifier\": \"My Answer\", \"type\": \"ANSWER\", \"new_obj_id\": \"new_object_id\" } ] } ``` ### Multiple objects update ```json { \"metadata\": [ { \"current_obj_id\": \"existing_object_id_1\", \"new_obj_id\": \"new_object_id_1\" }, { \"metadata_identifier\": \"My Worksheet\", \"type\": \"LOGICAL_TABLE\", \"new_obj_id\": \"new_object_id_2\" } ] } ``` + * @param updateMetadataObjIdRequest + */ + updateMetadataObjId(updateMetadataObjIdRequest, _options) { + const requestContextPromise = this.requestFactory.updateMetadataObjId(updateMetadataObjIdRequest, _options); + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx) => middleware.pre(ctx))); + } + return middlewarePreObservable.pipe(mergeMap((ctx) => this.configuration.httpApi.send(ctx))).pipe(mergeMap((response) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp) => this.responseProcessor.updateMetadataObjId(rsp))); + })); + } +}; +var ObservableOrgsApi = class { + constructor(configuration, requestFactory, responseProcessor) { + this.configuration = configuration; + this.requestFactory = requestFactory || new OrgsApiRequestFactory(configuration); + this.responseProcessor = responseProcessor || new OrgsApiResponseProcessor(); + } + /** + * Version: 9.0.0.cl or later Creates an Org object. To use this API, the [Orgs](https://docs.thoughtspot.com/cloud/latest/orgs-overview) feature must be enabled in your cluster. Requires cluster administration (**Can administer Org**) privileges. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `ORG_ADMINISTRATION` (**Can manage Orgs**) privilege is required. + * @param createOrgRequest + */ + createOrg(createOrgRequest, _options) { + const requestContextPromise = this.requestFactory.createOrg(createOrgRequest, _options); + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx) => middleware.pre(ctx))); + } + return middlewarePreObservable.pipe(mergeMap((ctx) => this.configuration.httpApi.send(ctx))).pipe(mergeMap((response) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp) => this.responseProcessor.createOrg(rsp))); + })); + } + /** + * Version: 9.0.0.cl or later Deletes an Org object from the ThoughtSpot system. Requires cluster administration (**Can administer Org**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `ORG_ADMINISTRATION` (**Can manage Orgs**) privilege is required. When you delete an Org, all its users and objects created in that Org context are removed. However, if the users in the deleted Org also exists in other Orgs, they are removed only from the deleted Org. + * @param orgIdentifier ID or name of the Org + */ + deleteOrg(orgIdentifier, _options) { + const requestContextPromise = this.requestFactory.deleteOrg(orgIdentifier, _options); + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx) => middleware.pre(ctx))); + } + return middlewarePreObservable.pipe(mergeMap((ctx) => this.configuration.httpApi.send(ctx))).pipe(mergeMap((response) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp) => this.responseProcessor.deleteOrg(rsp))); + })); + } + /** + * Version: 9.0.0.cl or later Gets a list of Orgs configured on the ThoughtSpot system. To get details of a specific Org, specify the Org ID or name. You can also pass parameters such as status, visibility, and user identifiers to get a specific list of Orgs. Requires cluster administration (**Can administer Org**) privileges. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `ORG_ADMINISTRATION` (**Can manage Orgs**) privilege is required. + * @param searchOrgsRequest + */ + searchOrgs(searchOrgsRequest, _options) { + const requestContextPromise = this.requestFactory.searchOrgs(searchOrgsRequest, _options); + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx) => middleware.pre(ctx))); + } + return middlewarePreObservable.pipe(mergeMap((ctx) => this.configuration.httpApi.send(ctx))).pipe(mergeMap((response) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp) => this.responseProcessor.searchOrgs(rsp))); + })); + } + /** + * Version: 9.0.0.cl or later Updates an Org object. You can modify Org properties such as name, description, and user associations. Requires cluster administration (**Can administer Org**) privileges. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `ORG_ADMINISTRATION` (**Can manage Orgs**) privilege is required. + * @param orgIdentifier ID or name of the Org + * @param updateOrgRequest + */ + updateOrg(orgIdentifier, updateOrgRequest, _options) { + const requestContextPromise = this.requestFactory.updateOrg(orgIdentifier, updateOrgRequest, _options); + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx) => middleware.pre(ctx))); + } + return middlewarePreObservable.pipe(mergeMap((ctx) => this.configuration.httpApi.send(ctx))).pipe(mergeMap((response) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp) => this.responseProcessor.updateOrg(rsp))); + })); + } +}; +var ObservableReportsApi = class { + constructor(configuration, requestFactory, responseProcessor) { + this.configuration = configuration; + this.requestFactory = requestFactory || new ReportsApiRequestFactory(configuration); + this.responseProcessor = responseProcessor || new ReportsApiResponseProcessor(); + } + /** + * Version: 9.0.0.cl or later Exports an Answer in the given file format. You can download the Answer data as a PDF, PNG, CSV, or XLSX file. Requires at least view access to the Answer. #### Usage guidelines In the request body, specify the GUID or name of the Answer and set `file_format`. The default file format is CSV. Use the `type` parameter to specify whether the Answer being exported is a saved Answer (`SAVED`) or a pinned Answer on a Liveboard (`PINNED`). Defaults to `SAVED`. When using `PINNED`, the `metadata_identifier` must be the container id. **NOTE**: * The downloadable file returned in API response file is extensionless. Please rename the downloaded file by typing in the relevant extension. * HTML rendering is not supported for PDF exports of Answers with tables. Optionally, you can define [runtime overrides](https://developers.thoughtspot.com/docs/fetch-data-and-report-apis#_runtime_overrides) to apply to the Answer data. + * @param exportAnswerReportRequest + */ + exportAnswerReport(exportAnswerReportRequest, _options) { + const requestContextPromise = this.requestFactory.exportAnswerReport(exportAnswerReportRequest, _options); + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx) => middleware.pre(ctx))); + } + return middlewarePreObservable.pipe(mergeMap((ctx) => this.configuration.httpApi.send(ctx))).pipe(mergeMap((response) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp) => this.responseProcessor.exportAnswerReport(rsp))); + })); + } + /** + * Version: 9.0.0.cl or later Exports a Liveboard and its visualizations in PDF, PNG, CSV, or XLSX file format. The default `file_format` is CSV. Requires at least view access to the Liveboard. #### Usage guidelines In the request body, specify the GUID or name of the Liveboard. To generate a Liveboard report with specific visualizations, add GUIDs or names of the visualizations. **NOTE**: * The downloadable file returned in API response file is extensionless. Please rename the downloaded file by typing in the relevant extension. * Optionally, you can define [runtime overrides](https://developers.thoughtspot.com/docs/fetch-data-and-report-apis#_runtime_overrides) to apply to the Answer data. * To include unsaved changes in the report, pass the `transient_pinboard_content` script generated from the `getExportRequestForCurrentPinboard` method in the Visual Embed SDK. Upon successful execution, the API returns the report with unsaved changes, including ad hoc changes to visualizations. For more information, see [Liveboard Report API](https://developers.thoughtspot.com/docs/fetch-data-and-report-apis#_liveboard_report_api). * Starting with ThoughtSpot Cloud 10.9.0.cl release, the Liveboard can be exported in the PNG format in the resolution of your choice. To enable this on your instance, contact ThoughtSpot support. When this feature is enabled, the options `include_cover_page`,`include_filter_page` within the `png_options` will not be available for PNG exports. * Starting with the ThoughtSpot Cloud 26.2.0.cl release, * Liveboards can be exported in CSV format. * All visualizations within a Liveboard can be exported as individual CSV files. * When exporting multiple visualizations or the entire Liveboard, the system returns the report as a compressed ZIP file containing the separate CSV files for each visualization. * Liveboards can also be exported in XLSX format. * All selected visualizations are consolidated into a single Excel workbook (.xlsx), with each visualization placed in its own worksheet (tab). * XLSX exports are limited to a maximum of 255 worksheets (tabs) per workbook. + * @param exportLiveboardReportRequest + */ + exportLiveboardReport(exportLiveboardReportRequest, _options) { + const requestContextPromise = this.requestFactory.exportLiveboardReport(exportLiveboardReportRequest, _options); + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx) => middleware.pre(ctx))); + } + return middlewarePreObservable.pipe(mergeMap((ctx) => this.configuration.httpApi.send(ctx))).pipe(mergeMap((response) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp) => this.responseProcessor.exportLiveboardReport(rsp))); + })); + } +}; +var ObservableRolesApi = class { + constructor(configuration, requestFactory, responseProcessor) { + this.configuration = configuration; + this.requestFactory = requestFactory || new RolesApiRequestFactory(configuration); + this.responseProcessor = responseProcessor || new RolesApiResponseProcessor(); + } + /** + * Version: 9.5.0.cl or later Creates a Role object in ThoughtSpot. Available only if [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance. To create a Role, the `ROLE_ADMINISTRATION` (**Can manage roles**) privilege is required. + * @param createRoleRequest + */ + createRole(createRoleRequest, _options) { + const requestContextPromise = this.requestFactory.createRole(createRoleRequest, _options); + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx) => middleware.pre(ctx))); + } + return middlewarePreObservable.pipe(mergeMap((ctx) => this.configuration.httpApi.send(ctx))).pipe(mergeMap((response) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp) => this.responseProcessor.createRole(rsp))); + })); + } + /** + * Version: 9.5.0.cl or later Deletes a Role object from the ThoughtSpot system. Available only if [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance. To delete a Role, the `ROLE_ADMINISTRATION` (**Can manage roles**) privilege is required. + * @param roleIdentifier Unique ID or name of the Role. ReadOnly roles cannot be deleted. + */ + deleteRole(roleIdentifier, _options) { + const requestContextPromise = this.requestFactory.deleteRole(roleIdentifier, _options); + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx) => middleware.pre(ctx))); + } + return middlewarePreObservable.pipe(mergeMap((ctx) => this.configuration.httpApi.send(ctx))).pipe(mergeMap((response) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp) => this.responseProcessor.deleteRole(rsp))); + })); + } + /** + * Version: 9.5.0.cl or later Gets a list of Role objects from the ThoughtSpot system. Available if [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance. To search for Roles, the `ROLE_ADMINISTRATION` (**Can manage roles**) privilege is required. To get details of a specific Role object, specify the GUID or name. You can also filter the API response based on user group and Org identifiers, privileges assigned to the Role, and deprecation status. + * @param searchRolesRequest + */ + searchRoles(searchRolesRequest, _options) { + const requestContextPromise = this.requestFactory.searchRoles(searchRolesRequest, _options); + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx) => middleware.pre(ctx))); + } + return middlewarePreObservable.pipe(mergeMap((ctx) => this.configuration.httpApi.send(ctx))).pipe(mergeMap((response) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp) => this.responseProcessor.searchRoles(rsp))); + })); + } + /** + * Version: 9.5.0.cl or later Updates the properties of a Role object. Available only if [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance. To update a Role, the `ROLE_ADMINISTRATION` (**Can manage roles**) privilege is required. + * @param roleIdentifier Unique ID or name of the Role. + * @param updateRoleRequest + */ + updateRole(roleIdentifier, updateRoleRequest, _options) { + const requestContextPromise = this.requestFactory.updateRole(roleIdentifier, updateRoleRequest, _options); + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx) => middleware.pre(ctx))); + } + return middlewarePreObservable.pipe(mergeMap((ctx) => this.configuration.httpApi.send(ctx))).pipe(mergeMap((response) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp) => this.responseProcessor.updateRole(rsp))); + })); + } +}; +var ObservableSchedulesApi = class { + constructor(configuration, requestFactory, responseProcessor) { + this.configuration = configuration; + this.requestFactory = requestFactory || new SchedulesApiRequestFactory(configuration); + this.responseProcessor = responseProcessor || new SchedulesApiResponseProcessor(); + } + /** + * Create schedule. Version: 9.4.0.cl or later Creates a Liveboard schedule job. Requires at least edit access to Liveboards. To create a schedule on behalf of another user, you need `ADMINISTRATION` (**Can administer Org**) or `JOBSCHEDULING` (**Can schedule for others**) privilege and edit access to the Liveboard. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `JOBSCHEDULING` (**Can schedule for others**) privilege is required. #### Usage guidelines * The description text is mandatory. The description text appears as **Description: ** in the Liveboard schedule email notifications. * For Liveboards with both charts and tables, schedule creation is only supported in PDF and XLS formats. Schedules created in CSV formats for such Liveboards will fail to run. If `PDF` is set as the `file_format`, enable `pdf_options` to get the correct attachment. Not doing so may cause the attachment to be rendered empty. * To include only specific visualizations, specify the visualization GUIDs in the `visualization_identifiers` array. * You can schedule a Liveboard job to run periodically by setting frequency parameters. You can set the schedule to run daily, weekly, monthly or every n minutes or hours. The scheduled job can also be configured to run at a specific time of the day or on specific days of the week or month. Please ensure that when setting the schedule frequency for _minute of the object_, only values that are multiples of 5 are included. * If the `frequency` parameters are defined, you can set the time zone to a value that matches your server\'s time zone. For example, `US/Central`, `Etc/UTC`, `CET`. The default time zone is `America/Los_Angeles`. For more information about Liveboard jobs, see [ThoughtSpot Product Documentation](https://docs.thoughtspot.com/cloud/latest/liveboard-schedule). + * @param createScheduleRequest + */ + createSchedule(createScheduleRequest, _options) { + const requestContextPromise = this.requestFactory.createSchedule(createScheduleRequest, _options); + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx) => middleware.pre(ctx))); + } + return middlewarePreObservable.pipe(mergeMap((ctx) => this.configuration.httpApi.send(ctx))).pipe(mergeMap((response) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp) => this.responseProcessor.createSchedule(rsp))); + })); + } + /** + * Deletes a scheduled job. Version: 9.4.0.cl or later Deletes a scheduled Liveboard job. Requires at least edit access to Liveboard or `ADMINISTRATION` (**Can administer Org**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `JOBSCHEDULING` (**Can schedule for others**) privilege is required. + * @param scheduleIdentifier Unique ID or name of the scheduled job. + */ + deleteSchedule(scheduleIdentifier, _options) { + const requestContextPromise = this.requestFactory.deleteSchedule(scheduleIdentifier, _options); + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx) => middleware.pre(ctx))); + } + return middlewarePreObservable.pipe(mergeMap((ctx) => this.configuration.httpApi.send(ctx))).pipe(mergeMap((response) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp) => this.responseProcessor.deleteSchedule(rsp))); + })); + } + /** + * Search Schedules Version: 9.4.0.cl or later Gets a list of scheduled jobs configured for a Liveboard. To get details of a specific scheduled job, specify the name or GUID of the scheduled job. Requires at least view access to Liveboards. **NOTE**: When filtering schedules by parameters other than `metadata`, set `record_size` to `-1` and `record_offset` to `0` for accurate results. + * @param searchSchedulesRequest + */ + searchSchedules(searchSchedulesRequest, _options) { + const requestContextPromise = this.requestFactory.searchSchedules(searchSchedulesRequest, _options); + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx) => middleware.pre(ctx))); + } + return middlewarePreObservable.pipe(mergeMap((ctx) => this.configuration.httpApi.send(ctx))).pipe(mergeMap((response) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp) => this.responseProcessor.searchSchedules(rsp))); + })); + } + /** + * Update schedule. Version: 9.4.0.cl or later Updates a scheduled Liveboard job. Requires at least edit access to Liveboards. To update a schedule on behalf of another user, you need `ADMINISTRATION` (**Can administer Org**) or `JOBSCHEDULING` (**Can schedule for others**) privilege and edit access to the Liveboard. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `JOBSCHEDULING` (**Can schedule for others**) privilege is required. The API endpoint allows you to pause a scheduled job, change the status of a paused job. You can also edit the recipients list, frequency of the job, format of the file to send to the recipients in email notifications, PDF options, and time zone setting. + * @param scheduleIdentifier Unique ID or name of the schedule. + * @param updateScheduleRequest + */ + updateSchedule(scheduleIdentifier, updateScheduleRequest, _options) { + const requestContextPromise = this.requestFactory.updateSchedule(scheduleIdentifier, updateScheduleRequest, _options); + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx) => middleware.pre(ctx))); + } + return middlewarePreObservable.pipe(mergeMap((ctx) => this.configuration.httpApi.send(ctx))).pipe(mergeMap((response) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp) => this.responseProcessor.updateSchedule(rsp))); + })); + } +}; +var ObservableSecurityApi = class { + constructor(configuration, requestFactory, responseProcessor) { + this.configuration = configuration; + this.requestFactory = requestFactory || new SecurityApiRequestFactory(configuration); + this.responseProcessor = responseProcessor || new SecurityApiResponseProcessor(); + } + /** + * Version: 9.0.0.cl or later Transfers the ownership of one or several objects from one user to another. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `USER_ADMINISTRATION` (**Can manage users**) privilege and edit access to the objects are required. + * @param assignChangeAuthorRequest + */ + assignChangeAuthor(assignChangeAuthorRequest, _options) { + const requestContextPromise = this.requestFactory.assignChangeAuthor(assignChangeAuthorRequest, _options); + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx) => middleware.pre(ctx))); + } + return middlewarePreObservable.pipe(mergeMap((ctx) => this.configuration.httpApi.send(ctx))).pipe(mergeMap((response) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp) => this.responseProcessor.assignChangeAuthor(rsp))); + })); + } + /** + * Version: 10.12.0.cl or later Fetches column security rules for specified tables. This API endpoint retrieves column-level security rules configured for tables. It returns information about which columns are secured and which groups have access to those columns. #### Usage guidelines - Provide an array of table identifiers using either `identifier` (GUID or name) or `obj_identifier` (object ID) - At least one of `identifier` or `obj_identifier` must be provided for each table - The API returns column security rules for all specified tables - Users must have appropriate permissions to access security rules for the specified tables #### Required permissions - `ADMINISTRATION` - Can administer ThoughtSpot - `DATAMANAGEMENT` - Can manage data - `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` - Can manage worksheet views and tables #### Example request ```json { \"tables\": [ { \"identifier\": \"table-guid\", \"obj_identifier\": \"table-object-id\" } ] } ``` #### Response format The API returns an array of `ColumnSecurityRuleResponse` objects wrapped in a `data` field. Each `ColumnSecurityRuleResponse` object contains: - Table information (GUID and object ID) - Array of column security rules with column details, group access, and source table information #### Example response ```json { \"data\": [ { \"guid\": \"table-guid\", \"objId\": \"table-object-id\", \"columnSecurityRules\": [ { \"column\": { \"id\": \"col_123\", \"name\": \"Salary\" }, \"groups\": [ { \"id\": \"group_1\", \"name\": \"HR Department\" } ], \"sourceTableDetails\": { \"id\": \"source-table-guid\", \"name\": \"Employee_Data\" } } ] } ] } ``` + * @param fetchColumnSecurityRulesRequest + */ + fetchColumnSecurityRules(fetchColumnSecurityRulesRequest, _options) { + const requestContextPromise = this.requestFactory.fetchColumnSecurityRules(fetchColumnSecurityRulesRequest, _options); + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx) => middleware.pre(ctx))); + } + return middlewarePreObservable.pipe(mergeMap((ctx) => this.configuration.httpApi.send(ctx))).pipe(mergeMap((response) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp) => this.responseProcessor.fetchColumnSecurityRules(rsp))); + })); + } + /** + * Version: 26.3.0.cl or later This API fetches the object privileges present for the given list of principals (user or group), on the given set of objects. It supports pagination, which can be enabled and configured using the request parameters. It provides users access to certain features based on privilege based access control. #### Usage guidelines - Specify the `type` (`USER` or `USER_GROUP`) and `identifier` (either GUID or name) of the principals for which you want to retrieve object privilege information in the `principals` array. - Specify the `type` (`LOGICAL_TABLE`) and `identifier` (either GUID or name) of the metadata objects for which you want to retrieve object privilege information in the `metadata` array. Only `LOGICAL_TABLE` metadata type is supported for now. It may be extended for other metadata types in future. - To control the offset from where principals have to be fetched, use `record_offset`. When `record_offset` is 0, information is fetched from the beginning. - To control the number of principals to be fetched, use `record_size`. Default `record_size` is 20. - Ensure `record_offset` for a subsequent request is one more than the value of `record_size` of the previous request. - Ensure using correct Authorization Bearer Token corresponding to specific user & org. #### Example request ```json { \"principals\": [ { \"type\": \"type-1\", \"identifier\": \"principal-guid-or-name-1\" }, { \"type\": \"type-2\", \"identifier\": \"principal-guid-or-name-2\" } ], \"metadata\": [ { \"type\": \"metadata-type-1\", \"identifier\": \"metadata-guid-or-name-1\" }, { \"type\": \"metadata-type-2\", \"identifier\": \"metadata-guid-or-name-2\" } ], \"record_offset\": 0, \"record_size\": 20 } ``` #### Response format The API returns an array of `metadata_object_privileges` objects wrapped in JSON. Each `metadata_object_privileges` object contains: - Metadata information (GUID, name and type) - Array of `principal_object_privilege_info`. - Each `principal_object_privilege_info` contains: - Principal type. All principals of this type are listed as described below. - Array of `principal_object_privileges`. - Each `principal_object_privileges` contains: - Principal information (GUID, name, subtype) - List of applied object level privileges. #### Example response ```json { \"metadata_object_privileges\": [ { \"metadata_id\": \"metadata-guid-1\", \"metadata_name\": \"metadata-name-1\", \"metadata_type\": \"metadata-type-1\", \"principal_object_privilege_info\": [ { \"principal_type\": \"principal-type-1\", \"principal_object_privileges\": [ { \"principal_id\": \"principal-guid-1\", \"principal_name\": \"principal-name-1\", \"principal_sub_type\": \"principal-sub-type-1\", \"object_privileges\": \"[object-privilege-1, object-privilege-2]\" }, { \"principal_id\": \"principal-guid-2\", \"principal_name\": \"principal-name-2\", \"principal_sub_type\": \"principal-sub-type-2\", \"object_privileges\": \"[object-privilege-1, object-privilege-2]\" } ] }, { \"principal_type\": \"principal-type-2\", \"principal_object_privileges\": [ { \"principal_id\": \"principal-guid-3\", \"principal_name\": \"principal-guid-4\", \"principal_sub_type\": \"principal-sub-type-4\", \"object_privileges\": \"[object-privilege-1]\" } ] } ] }, { \"metadata_id\": \"metadata-guid-2\", \"metadata_name\": \"metadata-name-2\", \"metadata_type\": \"metadata-type-2\", \"principal_object_privilege_info\": [ { \"principal_type\": \"principal-type-1\", \"principal_object_privileges\": [ { \"principal_id\": \"principal-guid-1\", \"principal_name\": \"principal-name-1\", \"principal_sub_type\": \"principal-sub-type-1\", \"object_privileges\": \"[object-privilege-3, object-privilege-4]\" }, { \"principal_id\": \"principal-guid-2\", \"principal_name\": \"principal-name-2\", \"principal_sub_type\": \"principal-sub-type-2\", \"object_privileges\": \"[object-privilege-4]\" } ] } ] } ] } ``` + * @param fetchObjectPrivilegesRequest + */ + fetchObjectPrivileges(fetchObjectPrivilegesRequest, _options) { + const requestContextPromise = this.requestFactory.fetchObjectPrivileges(fetchObjectPrivilegesRequest, _options); + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx) => middleware.pre(ctx))); + } + return middlewarePreObservable.pipe(mergeMap((ctx) => this.configuration.httpApi.send(ctx))).pipe(mergeMap((response) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp) => this.responseProcessor.fetchObjectPrivileges(rsp))); + })); + } + /** + * Version: 9.0.0.cl or later Fetches object permission details for a given principal object such as a user and group. Requires view access to the metadata object. #### Usage guidelines * To get a list of all metadata objects that a user or group can access, specify the `type` and GUID or name of the principal. * To get permission details for a specific object, add the `type` and GUID or name of the metadata object to your API request. Upon successful execution, the API returns a list of metadata objects and permission details for each object. + * @param fetchPermissionsOfPrincipalsRequest + */ + fetchPermissionsOfPrincipals(fetchPermissionsOfPrincipalsRequest, _options) { + const requestContextPromise = this.requestFactory.fetchPermissionsOfPrincipals(fetchPermissionsOfPrincipalsRequest, _options); + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx) => middleware.pre(ctx))); + } + return middlewarePreObservable.pipe(mergeMap((ctx) => this.configuration.httpApi.send(ctx))).pipe(mergeMap((response) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp) => this.responseProcessor.fetchPermissionsOfPrincipals(rsp))); + })); + } + /** + * Version: 9.0.0.cl or later Fetches permission details for a given metadata object. Requires view access to the metadata object. #### Usage guidelines * To fetch a list of users and groups for a metadata object, specify `type` and GUID or name of the metadata object. * To get permission details for a specific user or group, add `type` and GUID or name of the principal object to your API request. Upon successful execution, the API returns permission details and principal information for the object specified in the API request. + * @param fetchPermissionsOnMetadataRequest + */ + fetchPermissionsOnMetadata(fetchPermissionsOnMetadataRequest, _options) { + const requestContextPromise = this.requestFactory.fetchPermissionsOnMetadata(fetchPermissionsOnMetadataRequest, _options); + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx) => middleware.pre(ctx))); + } + return middlewarePreObservable.pipe(mergeMap((ctx) => this.configuration.httpApi.send(ctx))).pipe(mergeMap((response) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp) => this.responseProcessor.fetchPermissionsOnMetadata(rsp))); + })); + } + /** + * Version: 26.3.0.cl or later This API allows the addition or deletion of object level privileges for a set of users and groups, on a set of metadata objects. It provides users to access certain features based on privilege based access control. #### Usage guidelines - Specify the `operation`. The supported operations are: `ADD`, `REMOVE`. - Specify the type of the objects on which the object privileges are being provided in `metadata_type`. Only `LOGICAL_TABLE` metadata type is supported for now. It may be extended for other metadata types in future. - Specify the list of object privilege types in the `object_privilege_types` array. The supported object privilege types are: `SPOTTER_COACHING_PRIVILEGE`. - Specify the identifiers (either GUID or name) for the metadata objects in the `metadata_identifiers` array. - Specify the `type` (`USER` or `USER_GROUP`) and `identifier` (either GUID or name) of the principals to which you want to apply the given operation and given object privileges in the `principals` array. - Ensure using correct Authorization Bearer Token corresponding to specific user & org. #### Example request ```json { \"operation\": \"operation-type\", \"metadata_type\": \"metadata-type\", \"object_privilege_types\": [\"privilege-type-1\", \"privilege-type-2\"], \"metadata_identifiers\": [\"metadata-guid-or-name-1\", \"metadata-guid-or-name-1\"], \"principals\": [ { \"type\": \"type-1\", \"identifier\": \"principal-guid-or-name-1\" }, { \"type\": \"type-2\", \"identifier\": \"principal-guid-or-name-2\" } ] } ``` > ###### Note: > * Only admin users, users with edit access and users with coaching privilege on a given data-model can add or remove principals related to SPOTTER_COACHING_PRIVILEGE + * @param manageObjectPrivilegeRequest + */ + manageObjectPrivilege(manageObjectPrivilegeRequest, _options) { + const requestContextPromise = this.requestFactory.manageObjectPrivilege(manageObjectPrivilegeRequest, _options); + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx) => middleware.pre(ctx))); + } + return middlewarePreObservable.pipe(mergeMap((ctx) => this.configuration.httpApi.send(ctx))).pipe(mergeMap((response) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp) => this.responseProcessor.manageObjectPrivilege(rsp))); + })); + } + /** + * Version: 26.5.0.cl or later Allows publishing metadata objects across organizations in ThoughtSpot. Requires ADMINISTRATION role and TENANT scope. The API endpoint allows publishing the following types of metadata objects: * Liveboards * Answers * Logical Tables This API will essentially share the objects along with it\'s dependencies to the org admins of the orgs to which it is being published. + * @param publishMetadataRequest + */ + publishMetadata(publishMetadataRequest, _options) { + const requestContextPromise = this.requestFactory.publishMetadata(publishMetadataRequest, _options); + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx) => middleware.pre(ctx))); + } + return middlewarePreObservable.pipe(mergeMap((ctx) => this.configuration.httpApi.send(ctx))).pipe(mergeMap((response) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp) => this.responseProcessor.publishMetadata(rsp))); + })); + } + /** + * Version: 9.0.0.cl or later Allows sharing one or several metadata objects with users and groups in ThoughtSpot. Requires edit access to the metadata object. #### Supported metadata objects: * Liveboards * Visualizations * Answers * Models * Views * Connections * Collections #### Object permissions You can provide `READ_ONLY` or `MODIFY` access when sharing an object with another user or group. The `READ_ONLY` permission grants view access to the shared object, whereas `MODIFY` provides edit access. To prevent a user or group from accessing the shared object, specify the GUID or name of the principal and set `shareMode` to `NO_ACCESS`. #### Sharing a visualization * Sharing a visualization implicitly shares the entire Liveboard with the recipient. * Object permissions set for a shared visualization also apply to the Liveboard unless overridden by another API request or via UI. * If email notifications for object sharing are enabled, a notification with a link to the shared visualization will be sent to the recipient’s email address. Although this link opens the shared visualization, recipients can also access other visualizations in the Liveboard. #### Sharing a collection Collections support **dual permissions** that provide fine-grained control: * **Collection permissions** (`share_mode`) - controls access to the collection itself (view, edit, delete the collection) * **Content permissions** (`content_share_mode`) - controls access to objects within the collection (view, edit objects inside) **Default Behavior:** - If only `share_mode` is specified, the content permissions default to `READ_ONLY` (except when `share_mode` is `NO_ACCESS`, then content also gets `NO_ACCESS`) - To give users edit access to collection contents, explicitly set `content_share_mode: \"MODIFY\"` ## Examples The following JSON examples can be copy-pasted as request bodies for the REST v2 API endpoint: ```bash POST /callosum/v1/v2/security/metadata/share Content-Type: application/x-www-form-urlencoded ``` ### Basic collection sharing Share a collection with read-only access: ```json { \"metadata_type\": \"COLLECTION\", \"metadata_identifiers\": [\"Sales Reports Collection\"], \"permissions\": [{ \"principal\": { \"type\": \"USER\", \"identifier\": \"alice@company.com\" }, \"share_mode\": \"READ_ONLY\" }], \"notification\": { \"message\": \"I\'ve shared the Sales Reports collection with you\", \"notify_on_share\": true } } ``` ### Collection sharing with dual permissions Share a collection with different permissions for the collection vs. its contents: ```json { \"metadata_type\": \"COLLECTION\", \"metadata_identifiers\": [\"Marketing Analytics\"], \"permissions\": [{ \"principal\": { \"type\": \"USER\", \"identifier\": \"bob@company.com\" }, \"share_mode\": \"MODIFY\", \"content_share_mode\": \"READ_ONLY\" }, { \"principal\": { \"type\": \"USER_GROUP\", \"identifier\": \"Marketing Team\" }, \"share_mode\": \"READ_ONLY\", \"content_share_mode\": \"READ_ONLY\" }], \"notification\": { \"emails\": [\"bob@company.com\"], \"message\": \"You can edit the collection but content is read-only\", \"enable_custom_url\": false, \"notify_on_share\": true }, \"has_lenient_discoverability\": false } ``` ### Multiple collections sharing Share multiple collections with different users: ```json { \"metadata\": [ { \"type\": \"COLLECTION\", \"identifier\": \"Q4 Reports\" }, { \"type\": \"COLLECTION\", \"identifier\": \"Executive Dashboard Collection\" } ], \"permissions\": [{ \"principal\": { \"type\": \"USER_GROUP\", \"identifier\": \"Executives\" }, \"share_mode\": \"MODIFY\" }, { \"principal\": { \"type\": \"USER\", \"identifier\": \"manager@company.com\" }, \"share_mode\": \"READ_ONLY\", \"content_share_mode\": \"MODIFY\" }], \"notification\": { \"message\": \"Sharing quarterly collections with leadership team\", \"notify_on_share\": true } } ``` ### Remove collection access Remove access to a collection by setting share_mode to NO_ACCESS: ```json { \"metadata_type\": \"COLLECTION\", \"metadata_identifiers\": [\"Confidential Reports\"], \"permissions\": [{ \"principal\": { \"type\": \"USER\", \"identifier\": \"former-employee@company.com\" }, \"share_mode\": \"NO_ACCESS\" }], \"notification\": { \"notify_on_share\": false } } ``` ### Collection Permission Scenarios **Scenario 1: Collection Admin** - `share_mode: MODIFY` + `content_share_mode: MODIFY` = Full control over collection and its contents **Scenario 2: Collection Curator** - `share_mode: MODIFY` + `content_share_mode: READ_ONLY` = Can manage collection structure but not edit contents **Scenario 3: Content Editor** - `share_mode: READ_ONLY` + `content_share_mode: MODIFY` = Can edit objects within collection but can\'t change collection itself **Scenario 4: Viewer** - `share_mode: READ_ONLY` + `content_share_mode: READ_ONLY` = View-only access to collection and contents + * @param shareMetadataRequest + */ + shareMetadata(shareMetadataRequest, _options) { + const requestContextPromise = this.requestFactory.shareMetadata(shareMetadataRequest, _options); + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx) => middleware.pre(ctx))); + } + return middlewarePreObservable.pipe(mergeMap((ctx) => this.configuration.httpApi.send(ctx))).pipe(mergeMap((response) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp) => this.responseProcessor.shareMetadata(rsp))); + })); + } + /** + * Version: 26.5.0.cl or later Allows unpublishing metadata objects from organizations in ThoughtSpot. Requires ADMINISTRATION role and TENANT scope. The API endpoint allows unpublishing the following types of metadata objects: * Liveboards * Answers * Logical Tables When unpublishing objects, you can: * Include dependencies by setting `include_dependencies` to true - this will unpublish all dependent objects if no other published object is using them * Force unpublish by setting `force` to true - this will break all dependent objects in the unpublished organizations + * @param unpublishMetadataRequest + */ + unpublishMetadata(unpublishMetadataRequest, _options) { + const requestContextPromise = this.requestFactory.unpublishMetadata(unpublishMetadataRequest, _options); + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx) => middleware.pre(ctx))); + } + return middlewarePreObservable.pipe(mergeMap((ctx) => this.configuration.httpApi.send(ctx))).pipe(mergeMap((response) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp) => this.responseProcessor.unpublishMetadata(rsp))); + })); + } + /** + * Version: 10.12.0.cl or later Creates, updates, or deletes column security rules for specified tables. This API endpoint allows you to create, update, or delete column-level security rules on columns of a table. The operation follows an \"all or none\" policy: if defining security rules for any of the provided columns fails, the entire operation will be rolled back, and no rules will be created. #### Usage guidelines - Provide table identifier using either `identifier` (GUID or name) or `obj_identifier` (object ID) - Use `clear_csr: true` to remove all column security rules from the table - For each column, specify the security rule using `column_security_rules` array - Use `is_unsecured: true` to mark a specific column as unprotected - Use `group_access` operations to manage group associations: - `ADD`: Add groups to the column\'s access list - `REMOVE`: Remove groups from the column\'s access list - `REPLACE`: Replace all existing groups with the specified groups #### Required permissions - `ADMINISTRATION` - Can administer ThoughtSpot - `DATAMANAGEMENT` - Can manage data (if RBAC is disabled) - `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` - Can manage worksheet views and tables (if RBAC is enabled) #### Example request ```json { \"identifier\": \"table-guid\", \"obj_identifier\": \"table-object-id\", \"clear_csr\": false, \"column_security_rules\": [ { \"column_identifier\": \"col id or col name\", \"is_unsecured\": false, \"group_access\": [ { \"operation\": \"ADD\", \"group_identifiers\": [\"hr_group_id\", \"hr_group_name\", \"finance_group_id\"] } ] }, { \"column_identifier\": \"col id or col name\", \"is_unsecured\": true }, { \"column_identifier\": \"col id or col name\", \"is_unsecured\": false, \"group_access\": [ { \"operation\": \"REPLACE\", \"group_identifiers\": [\"management_group_id\", \"management_group_name\"] } ] } ] } ``` #### Request Body Schema - `identifier` (string, optional): GUID or name of the table for which we want to create column security rules - `obj_identifier` (string, optional): The object ID of the table - `clear_csr` (boolean, optional): If true, then all the secured columns will be marked as unprotected, and all the group associations will be removed - `column_security_rules` (array of objects, required): An array where each object defines the security rule for a specific column Each column security rule object contains: - `column_identifier` (string, required): Column identifier (col_id or name) - `is_unsecured` (boolean, optional): If true, the column will be marked as unprotected and all groups associated with it will be removed - `group_access` (array of objects, optional): Array of group operation objects Each group operation object contains: - `operation` (string, required): Operation type - ADD, REMOVE, or REPLACE - `group_identifiers` (array of strings, required): Array of group identifiers (name or GUID) on which the operation will be performed #### Response This API does not return any response body. A successful operation returns HTTP 200 status code. #### Operation Types - **ADD**: Adds the specified groups to the column\'s access list - **REMOVE**: Removes the specified groups from the column\'s access list - **REPLACE**: Replaces all existing groups with the specified groups + * @param updateColumnSecurityRulesRequest + */ + updateColumnSecurityRules(updateColumnSecurityRulesRequest, _options) { + const requestContextPromise = this.requestFactory.updateColumnSecurityRules(updateColumnSecurityRulesRequest, _options); + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx) => middleware.pre(ctx))); + } + return middlewarePreObservable.pipe(mergeMap((ctx) => this.configuration.httpApi.send(ctx))).pipe(mergeMap((response) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp) => this.responseProcessor.updateColumnSecurityRules(rsp))); + })); + } +}; +var ObservableSystemApi = class { + constructor(configuration, requestFactory, responseProcessor) { + this.configuration = configuration; + this.requestFactory = requestFactory || new SystemApiRequestFactory(configuration); + this.responseProcessor = responseProcessor || new SystemApiResponseProcessor(); + } + /** + * Version: 10.14.0.cl or later Configure communication channel preferences. - Use `cluster_preferences` to update the default preferences for your ThoughtSpot application instance. - If your instance has [Orgs](https://docs.thoughtspot.com/cloud/latest/orgs-overview), use `org_preferences` to specify Org-specific preferences that override the defaults. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) or `DEVELOPER` (**Has developer privilege**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, users with `APPLICATION_ADMINISTRATION` (**Can manage application settings**) privilege are also authorized to perform this action. + * @param configureCommunicationChannelPreferencesRequest + */ + configureCommunicationChannelPreferences(configureCommunicationChannelPreferencesRequest, _options) { + const requestContextPromise = this.requestFactory.configureCommunicationChannelPreferences(configureCommunicationChannelPreferencesRequest, _options); + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx) => middleware.pre(ctx))); + } + return middlewarePreObservable.pipe(mergeMap((ctx) => this.configuration.httpApi.send(ctx))).pipe(mergeMap((response) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp) => this.responseProcessor.configureCommunicationChannelPreferences(rsp))); + })); + } + /** + * Version: 26.2.0.cl or later Configure security settings for your ThoughtSpot application instance. - Use `cluster_preferences` to update cluster-level security settings including CORS whitelisted URLs, CSP settings, SAML redirect URLs, partitioned cookies, and non-embed access configuration. - Use `org_preferences` to configure Org-specific security settings. If your instance has [Orgs](https://docs.thoughtspot.com/cloud/latest/orgs-overview), this allows configuring CORS and non-embed access settings specific to the Org. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) or `DEVELOPER` (**Has developer privilege**) privilege. Cluster-level SAML and script-src settings require `ADMINISTRATION` privilege. See [Security Settings](https://developers.thoughtspot.com/docs/security-settings) for more details. + * @param configureSecuritySettingsRequest + */ + configureSecuritySettings(configureSecuritySettingsRequest, _options) { + const requestContextPromise = this.requestFactory.configureSecuritySettings(configureSecuritySettingsRequest, _options); + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx) => middleware.pre(ctx))); + } + return middlewarePreObservable.pipe(mergeMap((ctx) => this.configuration.httpApi.send(ctx))).pipe(mergeMap((response) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp) => this.responseProcessor.configureSecuritySettings(rsp))); + })); + } + /** + * Version: 9.0.0.cl or later Retrieves the current configuration details of the cluster. If the request is successful, the API returns a list configuration settings applied on the cluster. Requires `ADMINISTRATION`(**Can administer ThoughtSpot**) privilege to view these complete configuration settings of the cluster. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `SYSTEM_INFO_ADMINISTRATION` (**Can view system activities**) privilege is required. This API does not require any parameters to be passed in the request. + */ + getSystemConfig(_options) { + const requestContextPromise = this.requestFactory.getSystemConfig(_options); + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx) => middleware.pre(ctx))); + } + return middlewarePreObservable.pipe(mergeMap((ctx) => this.configuration.httpApi.send(ctx))).pipe(mergeMap((response) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp) => this.responseProcessor.getSystemConfig(rsp))); + })); + } + /** + * Version: 9.0.0.cl or later Gets system information such as the release version, locale, time zone, deployment environment, date format, and date time format of the cluster. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privileges. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `SYSTEM_INFO_ADMINISTRATION` (**Can view system activities**) privilege is required. This API does not require any parameters to be passed in the request. + */ + getSystemInformation(_options) { + const requestContextPromise = this.requestFactory.getSystemInformation(_options); + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx) => middleware.pre(ctx))); + } + return middlewarePreObservable.pipe(mergeMap((ctx) => this.configuration.httpApi.send(ctx))).pipe(mergeMap((response) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp) => this.responseProcessor.getSystemInformation(rsp))); + })); + } + /** + * Version: 9.2.0.cl or later Gets a list of configuration overrides applied on the cluster. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `APPLICATION_ADMINISTRATION` (**Can manage application settings**) privilege is required. This API does not require any parameters to be passed in the request. + */ + getSystemOverrideInfo(_options) { + const requestContextPromise = this.requestFactory.getSystemOverrideInfo(_options); + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx) => middleware.pre(ctx))); + } + return middlewarePreObservable.pipe(mergeMap((ctx) => this.configuration.httpApi.send(ctx))).pipe(mergeMap((response) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp) => this.responseProcessor.getSystemOverrideInfo(rsp))); + })); + } + /** + * Version: 10.14.0.cl or later Fetch communication channel preferences. - Use `cluster_preferences` to fetch the default preferences for your ThoughtSpot application instance. - If your instance has [Orgs](https://docs.thoughtspot.com/cloud/latest/orgs-overview), use `org_preferences` to fetch any Org-specific preferences that override the defaults. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) or `DEVELOPER` (**Has developer privilege**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, users with `APPLICATION_ADMINISTRATION` (**Can manage application settings**) privilege are also authorized to perform this action. + * @param searchCommunicationChannelPreferencesRequest + */ + searchCommunicationChannelPreferences(searchCommunicationChannelPreferencesRequest, _options) { + const requestContextPromise = this.requestFactory.searchCommunicationChannelPreferences(searchCommunicationChannelPreferencesRequest, _options); + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx) => middleware.pre(ctx))); + } + return middlewarePreObservable.pipe(mergeMap((ctx) => this.configuration.httpApi.send(ctx))).pipe(mergeMap((response) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp) => this.responseProcessor.searchCommunicationChannelPreferences(rsp))); + })); + } + /** + * Version: 26.2.0.cl or later Fetch security settings for your ThoughtSpot application instance. - Use `scope: CLUSTER` to retrieve cluster-level security settings, including CORS and CSP allowlists, SAML redirect URLs, and settings that control access to non-embedded pages. - Use `scope: ORG` to retrieve Org-level security settings. If your instance has [Orgs](https://docs.thoughtspot.com/cloud/latest/orgs-overview), this returns CORS and non-embed access settings specific to the Org. - If `scope` is not specified, returns both cluster and Org-specific settings based on user privileges. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) or `DEVELOPER` (**Has developer privilege**) privilege. See [Security Settings](https://developers.thoughtspot.com/docs/security-settings) for more details. + * @param searchSecuritySettingsRequest + */ + searchSecuritySettings(searchSecuritySettingsRequest, _options) { + const requestContextPromise = this.requestFactory.searchSecuritySettings(searchSecuritySettingsRequest, _options); + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx) => middleware.pre(ctx))); + } + return middlewarePreObservable.pipe(mergeMap((ctx) => this.configuration.httpApi.send(ctx))).pipe(mergeMap((response) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp) => this.responseProcessor.searchSecuritySettings(rsp))); + })); + } + /** + * Version: 9.2.0.cl or later Updates the current configuration of the cluster. You must send the configuration data in JSON format. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privileges. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `APPLICATION_ADMINISTRATION` (**Can manage application settings**) privilege is required. + * @param updateSystemConfigRequest + */ + updateSystemConfig(updateSystemConfigRequest, _options) { + const requestContextPromise = this.requestFactory.updateSystemConfig(updateSystemConfigRequest, _options); + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx) => middleware.pre(ctx))); + } + return middlewarePreObservable.pipe(mergeMap((ctx) => this.configuration.httpApi.send(ctx))).pipe(mergeMap((response) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp) => this.responseProcessor.updateSystemConfig(rsp))); + })); + } + /** + * Version: 26.4.0.cl or later Validates a communication channel configuration to ensure it is properly set up and can receive events. - Use `channel_type` to specify the type of communication channel to validate (e.g., WEBHOOK). - Use `channel_identifier` to provide the unique identifier or name for the communication channel. - Use `event_type` to specify the event type to validate for this channel. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) or `DEVELOPER` (**Has developer privilege**) privilege. For webhook channels, users with `CAN_MANAGE_WEBHOOKS` (**Can manage webhooks**) privilege are also authorized to perform this action. + * @param validateCommunicationChannelRequest + */ + validateCommunicationChannel(validateCommunicationChannelRequest, _options) { + const requestContextPromise = this.requestFactory.validateCommunicationChannel(validateCommunicationChannelRequest, _options); + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx) => middleware.pre(ctx))); + } + return middlewarePreObservable.pipe(mergeMap((ctx) => this.configuration.httpApi.send(ctx))).pipe(mergeMap((response) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp) => this.responseProcessor.validateCommunicationChannel(rsp))); + })); + } +}; +var ObservableTagsApi = class { + constructor(configuration, requestFactory, responseProcessor) { + this.configuration = configuration; + this.requestFactory = requestFactory || new TagsApiRequestFactory(configuration); + this.responseProcessor = responseProcessor || new TagsApiResponseProcessor(); + } + /** + * Version: 9.0.0.cl or later Assigns tags to Liveboards, Answers, Tables, and Worksheets. Requires edit access to the metadata object. + * @param assignTagRequest + */ + assignTag(assignTagRequest, _options) { + const requestContextPromise = this.requestFactory.assignTag(assignTagRequest, _options); + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx) => middleware.pre(ctx))); + } + return middlewarePreObservable.pipe(mergeMap((ctx) => this.configuration.httpApi.send(ctx))).pipe(mergeMap((response) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp) => this.responseProcessor.assignTag(rsp))); + })); + } + /** + * Version: 9.0.0.cl or later Creates a tag object. Tags are labels that identify a metadata object. For example, you can create a tag to designate subject areas, such as sales, HR, marketing, and finance. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `TAGMANAGEMENT` (**Can manage tags**) privilege is required to create, edit, and delete tags. + * @param createTagRequest + */ + createTag(createTagRequest, _options) { + const requestContextPromise = this.requestFactory.createTag(createTagRequest, _options); + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx) => middleware.pre(ctx))); + } + return middlewarePreObservable.pipe(mergeMap((ctx) => this.configuration.httpApi.send(ctx))).pipe(mergeMap((response) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp) => this.responseProcessor.createTag(rsp))); + })); + } + /** + * Version: 9.0.0.cl or later Deletes a tag object from the ThoughtSpot system Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `TAGMANAGEMENT` (**Can manage tags**) privilege is required to create, edit, and delete tags. + * @param tagIdentifier Tag identifier Tag name or Tag id. + */ + deleteTag(tagIdentifier, _options) { + const requestContextPromise = this.requestFactory.deleteTag(tagIdentifier, _options); + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx) => middleware.pre(ctx))); + } + return middlewarePreObservable.pipe(mergeMap((ctx) => this.configuration.httpApi.send(ctx))).pipe(mergeMap((response) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp) => this.responseProcessor.deleteTag(rsp))); + })); + } + /** + * Version: 9.0.0.cl or later Gets a list of tag objects available on the ThoughtSpot system. To get details of a specific tag object, specify the GUID or name. Any authenticated user can search for tag objects. + * @param searchTagsRequest + */ + searchTags(searchTagsRequest, _options) { + const requestContextPromise = this.requestFactory.searchTags(searchTagsRequest, _options); + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx) => middleware.pre(ctx))); + } + return middlewarePreObservable.pipe(mergeMap((ctx) => this.configuration.httpApi.send(ctx))).pipe(mergeMap((response) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp) => this.responseProcessor.searchTags(rsp))); + })); + } + /** + * Version: 9.0.0.cl or later Removes the tags applied to a Liveboard, Answer, Table, or Worksheet. Requires edit access to the metadata object. + * @param unassignTagRequest + */ + unassignTag(unassignTagRequest, _options) { + const requestContextPromise = this.requestFactory.unassignTag(unassignTagRequest, _options); + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx) => middleware.pre(ctx))); + } + return middlewarePreObservable.pipe(mergeMap((ctx) => this.configuration.httpApi.send(ctx))).pipe(mergeMap((response) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp) => this.responseProcessor.unassignTag(rsp))); + })); + } + /** + * Version: 9.0.0.cl or later Updates a tag object. You can modify the `name` and `color` properties of a tag object. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `TAGMANAGEMENT` (**Can manage tags**) privilege is required to create, edit, and delete tags. + * @param tagIdentifier Name or Id of the tag. + * @param updateTagRequest + */ + updateTag(tagIdentifier, updateTagRequest, _options) { + const requestContextPromise = this.requestFactory.updateTag(tagIdentifier, updateTagRequest, _options); + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx) => middleware.pre(ctx))); + } + return middlewarePreObservable.pipe(mergeMap((ctx) => this.configuration.httpApi.send(ctx))).pipe(mergeMap((response) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp) => this.responseProcessor.updateTag(rsp))); + })); + } +}; +var ObservableThoughtSpotRestApi = class { + constructor(configuration, requestFactory, responseProcessor) { + this.configuration = configuration; + this.requestFactory = requestFactory || new ThoughtSpotRestApiRequestFactory(configuration); + this.responseProcessor = responseProcessor || new ThoughtSpotRestApiResponseProcessor(); + } + /** + * Version: 9.7.0.cl or later Activates a deactivated user account. Requires `ADMINISTRATION` (**Can administer Thoughtspot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `USER_ADMINISTRATION` (**Can manage users**) privilege is required. To activate an inactive user account, the API request body must include the following information: - Username or the GUID of the user account. - Auth token generated for the deactivated user. The auth token is sent in the API response when a user is deactivated. - Password for the user account. + * @param activateUserRequest + */ + activateUser(activateUserRequest, _options) { + const requestContextPromise = this.requestFactory.activateUser(activateUserRequest, _options); + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx) => middleware.pre(ctx))); + } + return middlewarePreObservable.pipe(mergeMap((ctx) => this.configuration.httpApi.send(ctx))).pipe(mergeMap((response) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp) => this.responseProcessor.activateUser(rsp))); + })); + } + /** + * Version: 9.0.0.cl or later Transfers the ownership of one or several objects from one user to another. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `USER_ADMINISTRATION` (**Can manage users**) privilege and edit access to the objects are required. + * @param assignChangeAuthorRequest + */ + assignChangeAuthor(assignChangeAuthorRequest, _options) { + const requestContextPromise = this.requestFactory.assignChangeAuthor(assignChangeAuthorRequest, _options); + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx) => middleware.pre(ctx))); + } + return middlewarePreObservable.pipe(mergeMap((ctx) => this.configuration.httpApi.send(ctx))).pipe(mergeMap((response) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp) => this.responseProcessor.assignChangeAuthor(rsp))); + })); + } + /** + * Version: 9.0.0.cl or later Assigns tags to Liveboards, Answers, Tables, and Worksheets. Requires edit access to the metadata object. + * @param assignTagRequest + */ + assignTag(assignTagRequest, _options) { + const requestContextPromise = this.requestFactory.assignTag(assignTagRequest, _options); + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx) => middleware.pre(ctx))); + } + return middlewarePreObservable.pipe(mergeMap((ctx) => this.configuration.httpApi.send(ctx))).pipe(mergeMap((response) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp) => this.responseProcessor.assignTag(rsp))); + })); + } + /** + * Version: 9.0.0.cl or later Updates the current password of the user. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `USER_ADMINISTRATION` (**Can manage users**) privilege is required. + * @param changeUserPasswordRequest + */ + changeUserPassword(changeUserPasswordRequest, _options) { + const requestContextPromise = this.requestFactory.changeUserPassword(changeUserPasswordRequest, _options); + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx) => middleware.pre(ctx))); + } + return middlewarePreObservable.pipe(mergeMap((ctx) => this.configuration.httpApi.send(ctx))).pipe(mergeMap((response) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp) => this.responseProcessor.changeUserPassword(rsp))); + })); + } + /** + * Version: 9.2.0.cl or later Commits TML files of metadata objects to the Git branch configured on your instance. Requires at least edit access to objects used in the commit operation. Before using this endpoint to push your commits: * Enable Git integration on your instance. * Make sure the Git repository and branch details are configured on your instance. For more information, see [Git integration documentation](https://developers.thoughtspot.com/docs/git-integration). + * @param commitBranchRequest + */ + commitBranch(commitBranchRequest, _options) { + const requestContextPromise = this.requestFactory.commitBranch(commitBranchRequest, _options); + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx) => middleware.pre(ctx))); + } + return middlewarePreObservable.pipe(mergeMap((ctx) => this.configuration.httpApi.send(ctx))).pipe(mergeMap((response) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp) => this.responseProcessor.commitBranch(rsp))); + })); + } + /** + * Version: 26.6.0.cl or later Enables or disables authentication at cluster or org level for the specified auth type. Currently supports `TRUSTED_AUTH`. #### Required privileges Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) or `CONTROL_TRUSTED_AUTH` (**Can Enable or Disable Trusted Authentication**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled, the `CONTROL_TRUSTED_AUTH` privilege is required. #### Usage guidelines Use `cluster_preferences` to enable or disable authentication at the cluster level. Cluster-level settings can only be configured from the Primary Org. - `ENABLED` — Generates a new access token if one does not exist. An existing token is preserved. - `DISABLED` — Revokes the existing cluster-level access token. Use `org_preferences` to enable or disable authentication for one or more Orgs. Each entry must include an `org_identifier` (unique ID or name) and an `auth_status`. Org-level configuration requires the per-Org authentication feature to be enabled on your instance. - `ENABLED` — Generates a new org-level access token if one does not exist. - `DISABLED` — Revokes the existing org-level access token for that Org. Both `cluster_preferences` and `org_preferences` are optional. Omitting a field leaves the corresponding settings unchanged. If both are omitted, the API returns `204 No Content` without making any changes. **Note**: Cluster-level and org-level settings are independent of each other. Enabling or disabling one does not affect the other. + * @param configureAuthSettingsRequest + */ + configureAuthSettings(configureAuthSettingsRequest, _options) { + const requestContextPromise = this.requestFactory.configureAuthSettings(configureAuthSettingsRequest, _options); + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx) => middleware.pre(ctx))); + } + return middlewarePreObservable.pipe(mergeMap((ctx) => this.configuration.httpApi.send(ctx))).pipe(mergeMap((response) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp) => this.responseProcessor.configureAuthSettings(rsp))); + })); + } + /** + * Version: 10.14.0.cl or later Configure communication channel preferences. - Use `cluster_preferences` to update the default preferences for your ThoughtSpot application instance. - If your instance has [Orgs](https://docs.thoughtspot.com/cloud/latest/orgs-overview), use `org_preferences` to specify Org-specific preferences that override the defaults. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) or `DEVELOPER` (**Has developer privilege**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, users with `APPLICATION_ADMINISTRATION` (**Can manage application settings**) privilege are also authorized to perform this action. + * @param configureCommunicationChannelPreferencesRequest + */ + configureCommunicationChannelPreferences(configureCommunicationChannelPreferencesRequest, _options) { + const requestContextPromise = this.requestFactory.configureCommunicationChannelPreferences(configureCommunicationChannelPreferencesRequest, _options); + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx) => middleware.pre(ctx))); + } + return middlewarePreObservable.pipe(mergeMap((ctx) => this.configuration.httpApi.send(ctx))).pipe(mergeMap((response) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp) => this.responseProcessor.configureCommunicationChannelPreferences(rsp))); + })); + } + /** + * Version: 26.2.0.cl or later Configure security settings for your ThoughtSpot application instance. - Use `cluster_preferences` to update cluster-level security settings including CORS whitelisted URLs, CSP settings, SAML redirect URLs, partitioned cookies, and non-embed access configuration. - Use `org_preferences` to configure Org-specific security settings. If your instance has [Orgs](https://docs.thoughtspot.com/cloud/latest/orgs-overview), this allows configuring CORS and non-embed access settings specific to the Org. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) or `DEVELOPER` (**Has developer privilege**) privilege. Cluster-level SAML and script-src settings require `ADMINISTRATION` privilege. See [Security Settings](https://developers.thoughtspot.com/docs/security-settings) for more details. + * @param configureSecuritySettingsRequest + */ + configureSecuritySettings(configureSecuritySettingsRequest, _options) { + const requestContextPromise = this.requestFactory.configureSecuritySettings(configureSecuritySettingsRequest, _options); + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx) => middleware.pre(ctx))); + } + return middlewarePreObservable.pipe(mergeMap((ctx) => this.configuration.httpApi.send(ctx))).pipe(mergeMap((response) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp) => this.responseProcessor.configureSecuritySettings(rsp))); + })); + } + /** + * Version: 10.12.0.cl or later Gets connection configuration objects. Requires `DATAMANAGEMENT` (**Can manage data**) and edit permissions to the connection object, or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) privilege is required. #### Usage guidelines * To get a list of all configurations available in the ThoughtSpot system, send the API request with only the connection name or GUID in the request body. * To fetch details of a configuration object, specify the configuration object name or GUID. + * @param connectionConfigurationSearchRequest + */ + connectionConfigurationSearch(connectionConfigurationSearchRequest, _options) { + const requestContextPromise = this.requestFactory.connectionConfigurationSearch(connectionConfigurationSearchRequest, _options); + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx) => middleware.pre(ctx))); + } + return middlewarePreObservable.pipe(mergeMap((ctx) => this.configuration.httpApi.send(ctx))).pipe(mergeMap((response) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp) => this.responseProcessor.connectionConfigurationSearch(rsp))); + })); + } + /** + * Convert worksheets to models Version: 10.6.0.cl or later ## Prerequisites - **Privileges Required:** - `DATAMANAGEMENT` (Can manage data) or `ADMINISTRATION` (Can administer ThoughtSpot). - **Additional Privileges (if RBAC is enabled):** - `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` (Can manage data models). --- ## Usage Guidelines ### Parameters 1. **worksheet_ids** - **Description:** A comma-separated list of GUIDs (Globally Unique Identifiers) specifying the Worksheets to be converted. - **Usage:** - Used only when `convert_all` is set to `false`. - Leave empty or omit when `convert_all` is set to `true`. 2. **exclude_worksheet_ids** - **Description:** A comma-separated list of GUIDs specifying Worksheets to be excluded from conversion. - **Usage:** - Useful when `convert_all` is set to `true` and specific Worksheets should not be converted. 3. **convert_all** - **Description:** Sets the scope of conversion. - **Options:** - `true`: Converts all Worksheets in the system, except those specified in `exclude_worksheet_ids`. - `false`: Converts only the Worksheets listed in `worksheet_ids`. 4. **apply_changes** - **Description:** Specifies whether to apply changes directly to ThoughtSpot or to generate a preview before applying any changes.Used for validation of conversion. - **Options:** - `true`: Applies conversion changes directly to ThoughtSpot. - `false`: Generates only a preview of the changes and does not apply any changes to ThoughtSpot --- ## Best Practices 1. **Backup Before Conversion:** Always export metadata as a backup before initiating the conversion process 2. **Partial Conversion for Testing:** Test the conversion process by setting `convert_all` to `false` and specifying a small number of `worksheet_ids`. 3. **Verify Dependencies:** Check for dependent objects, such as Tables and Connections, to avoid invalid references. 4. **Review Changes:** Use `apply_changes: false` to preview the impact of the conversion before applying changes. --- ## Examples ### Convert Specific Worksheets ```json { \"worksheet_ids\": [\"guid1\", \"guid2\", \"guid3\"], \"exclude_worksheet_ids\": [], \"convert_all\": false, \"apply_changes\": true } ``` ### Convert All Accessible Worksheets ```json { \"worksheet_ids\": [], \"exclude_worksheet_ids\": [], \"convert_all\": true, \"apply_changes\": true } ``` ### Exclude Specific Worksheets While Converting All Accessible Worksheets ```json { \"worksheet_ids\": [], \"exclude_worksheet_ids\": [\"abc\"], \"convert_all\": true, \"apply_changes\": true } ``` + * @param convertWorksheetToModelRequest + */ + convertWorksheetToModel(convertWorksheetToModelRequest, _options) { + const requestContextPromise = this.requestFactory.convertWorksheetToModel(convertWorksheetToModelRequest, _options); + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx) => middleware.pre(ctx))); + } + return middlewarePreObservable.pipe(mergeMap((ctx) => this.configuration.httpApi.send(ctx))).pipe(mergeMap((response) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp) => this.responseProcessor.convertWorksheetToModel(rsp))); + })); + } + /** + * Makes a copy of an Answer or Liveboard Version: 10.3.0.cl or later Creates a copy of a metadata object. Requires at least view access to the metadata object being copied. Upon successful execution, the API creates a copy of the metadata object specified in the API request and returns the ID of the new object. + * @param copyObjectRequest + */ + copyObject(copyObjectRequest, _options) { + const requestContextPromise = this.requestFactory.copyObject(copyObjectRequest, _options); + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx) => middleware.pre(ctx))); + } + return middlewarePreObservable.pipe(mergeMap((ctx) => this.configuration.httpApi.send(ctx))).pipe(mergeMap((response) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp) => this.responseProcessor.copyObject(rsp))); + })); + } + /** + * Version: 26.2.0.cl or later Creates a new Spotter agent conversation based on the provided context and settings. The endpoint was in Beta from 26.2.0.cl through 26.4.0.cl. Requires `CAN_USE_SPOTTER` privilege and at least view access to the metadata object specified in the request. #### Usage guidelines The request must include the `metadata_context` parameter to define the conversation context. The context type can be one of: - `DATA_SOURCE` *(available from 26.5.0.cl)*: targets a specific data source. Provide `data_source_identifier` in `data_source_context` for a single data source, or `data_source_identifiers` for multi-data-source context. The deprecated `guid` field is accepted for backwards compatibility. - `AUTO_MODE` *(available from 26.5.0.cl)*: automatically discovers and selects the most relevant datasets for the user\'s queries. > **Note for callers on versions 26.2.0.cl – 26.4.0.cl (Beta):** use the lowercase `data_source` enum value with the `guid` field instead of the above. Example: `{ \"type\": \"data_source\", \"data_source_context\": { \"guid\": \"\" } }`. The `conversation_settings` parameter controls which Spotter capabilities are enabled for the conversation: - `enable_contextual_change_analysis` (default: `true`, **deprecated from 26.2.0.cl**) — always enabled in Spotter 3; setting this to `false` has no effect on versions >= 26.2.0.cl - `enable_natural_language_answer_generation` (default: `true`, **deprecated from 26.2.0.cl**) — always enabled in Spotter 3; setting this to `false` has no effect on versions >= 26.2.0.cl - `enable_reasoning` (default: `true`, **deprecated from 26.2.0.cl**) — always enabled in Spotter 3; setting this to `false` has no effect on versions >= 26.2.0.cl - `enable_save_chat` (default: `false`, *available from 26.5.0.cl*) — enables saving the conversation for later retrieval via conversation history If the request is successful, the response includes a unique `conversation_identifier` that must be passed to `sendAgentConversationMessage` or `sendAgentConversationMessageStreaming` to send messages within this conversation. The response also includes `conversation_id` with the same value for backwards compatibility; use `conversation_identifier` for new integrations. #### Example request ```json { \"metadata_context\": { \"type\": \"DATA_SOURCE\", \"data_source_context\": { \"data_source_identifier\": \"a1b2c3d4-e5f6-7890-abcd-ef1234567890\" } }, \"conversation_settings\": {} } ``` #### Error responses | Code | Description | | ---- | --------------------------------------------------------------------------------------------------------------------------------------- | | 401 | Unauthorized — authentication token is missing, expired, or invalid. | | 403 | Forbidden — the authenticated user does not have `CAN_USE_SPOTTER` privilege or lacks view permission on the specified metadata object. | > ###### Note: > > - This endpoint was in Beta from 26.2.0.cl through 26.4.0.cl and is Generally Available from version 26.5.0.cl. > - This endpoint requires Spotter - please contact ThoughtSpot support to enable Spotter on your cluster. + * @param createAgentConversationRequest + */ + createAgentConversation(createAgentConversationRequest, _options) { + const requestContextPromise = this.requestFactory.createAgentConversation(createAgentConversationRequest, _options); + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx) => middleware.pre(ctx))); + } + return middlewarePreObservable.pipe(mergeMap((ctx) => this.configuration.httpApi.send(ctx))).pipe(mergeMap((response) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp) => this.responseProcessor.createAgentConversation(rsp))); + })); + } + /** + * Version: 10.12.0.cl or later Creates a new [custom calendar](https://docs.thoughtspot.com/cloud/latest/connections-cust-cal). Requires `DATAMANAGEMENT` (**Can manage data**) or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your ThoughtSpot instance, the `CAN_MANAGE_CUSTOM_CALENDAR` (**Can manage custom calendars**) privilege is required. #### Usage guidelines You can create a custom calendar from scratch or an existing Table in ThoughtSpot. For both methods of calendar creation, the following parameters are required: * Name of the custom calendar. * Calendar creation method. To create a calendar from an existing table, specify the method: - `FROM_EXISTING_TABLE` - Creates calendar from the table reference provided in the API request. - `FROM_INPUT_PARAMS` - Creates a calendar from the parameters defined in the API request. * Connection ID and Table name * Database and schema name attributes: For most Cloud Data Warehouse (CDW) connectors, both `database_name` and `schema_name` attributes are required. However, the attribute requirements are conditional and vary based on the connector type and its metadata structure. For example, for connectors such as Teradata, MySQL, SingleSore, Amazon Aurora MySQL, Amazon RDS MySQL, Oracle, and GCP_MYSQL, the `schema_name` is required, whereas the `database_name` attribute is not. Similarly, connectors such as ClickHouse require you to specify the `database_name` and the schema specification in such cases is optional. **NOTE**: If you are creating a calendar from an existing table, ensure that the referenced table matches the required DDL for custom calendars. If the schema does not match, the API returns an error. ##### Calendar type The API allows you to create the following types of calendars: * `MONTH_OFFSET`. The default calendar type. A `MONTH_OFFSET` calendar is offset by a few months from the standard calendar months (January to December) and the year begins with the month defined in the request. For example, if the `month_offset` value is set as `April`, the calendar year begins in April. * `4-4-5`. Each quarter in the calendar will include two 4-week months followed by one 5-week month. * `4-5-4`. Each quarter in the calendar will include two 4-week months with a 5-week month between. * `5-4-4`. Each quarter begins with a 5-week month, followed by two 4-week months. To start and end the calendar on a specific date, specify the dates in the `MM/DD/YYYY` format. For `MONTH_OFFSET` calendars, ensure that the `start_date` matches the month specified in the `month_offset` attribute. You can also set the starting day of the week and customize the prefixes for year and quarter labels. #### Examples To create a calendar from an existing table: ``` { \"name\": \"MyCustomCalendar1\", \"table_reference\": { \"connection_identifier\": \"4db8ea22-2ff4-4224-b05a-26674717e468\", \"table_name\": \"MyCalendarTable\", \"database_name\": \"RETAILAPPAREL\", \"schema_name\": \"PUBLIC\" }, \"creation_method\": \"FROM_EXISTING_TABLE\", } ``` To create a calendar from scratch: ``` { \"name\": \"MyCustomCalendar1\", \"table_reference\": { \"connection_identifier\": \"4db8ea22-2ff4-4224-b05a-26674717e468\", \"table_name\": \"MyCalendarTable\", \"database_name\": \"RETAILAPPAREL\", \"schema_name\": \"PUBLIC\" }, \"creation_method\": \"FROM_INPUT_PARAMS\", \"calendar_type\": \"MONTH_OFFSET\", \"month_offset\": \"April\", \"start_day_of_week\": \"Monday\", \"quarter_name_prefix\": \"Q\", \"year_name_prefix\": \"FY\", \"start_date\": \"04/01/2025\", \"end_date\": \"04/31/2025\" } ``` + * @param createCalendarRequest + */ + createCalendar(createCalendarRequest, _options) { + const requestContextPromise = this.requestFactory.createCalendar(createCalendarRequest, _options); + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx) => middleware.pre(ctx))); + } + return middlewarePreObservable.pipe(mergeMap((ctx) => this.configuration.httpApi.send(ctx))).pipe(mergeMap((response) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp) => this.responseProcessor.createCalendar(rsp))); + })); + } + /** + * Version: 26.4.0.cl or later Creates a new collection in ThoughtSpot. Collections allow you to organize and group related metadata objects such as Liveboards, Answers, worksheets, and other data objects. You can also create nested collections (sub-collections) to build a hierarchical structure. #### Supported operations The API endpoint lets you perform the following operations: * Create a new collection * Add metadata objects (Liveboards, Answers, Logical Tables) to the collection * Create nested collections by adding sub-collections + * @param createCollectionRequest + */ + createCollection(createCollectionRequest, _options) { + const requestContextPromise = this.requestFactory.createCollection(createCollectionRequest, _options); + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx) => middleware.pre(ctx))); + } + return middlewarePreObservable.pipe(mergeMap((ctx) => this.configuration.httpApi.send(ctx))).pipe(mergeMap((response) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp) => this.responseProcessor.createCollection(rsp))); + })); + } + /** + * Version: 9.2.0.cl or later Allows you to connect a ThoughtSpot instance to a Git repository. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance on your instance, the `CAN_SETUP_VERSION_CONTROL` (**Can set up version control**) privilege. You can use this API endpoint to connect your ThoughtSpot development and production environments to the development and production branches of a Git repository. Before using this endpoint to connect your ThoughtSpot instance to a Git repository, check the following prerequisites: * You have a Git repository. If you are using GitHub, make sure you have a valid account and an access token to connect ThoughtSpot to GitHub. For information about generating a token, see [GitHub Documentation](https://docs.github.com/en/authentication/keeping-your-account-and-data-secure/managing-your-personal-access-tokens). * Your access token has `repo` scope that grants full access to public and private repositories. * Your Git repository has a branch that can be configured as a default branch in ThoughtSpot. For more information, see [Git integration documentation](https://developers.thoughtspot.com/docs/?pageid=git-integration). **Note**: ThoughtSpot supports only GitHub / itHub Enterprise for CI/CD. + * @param createConfigRequest + */ + createConfig(createConfigRequest, _options) { + const requestContextPromise = this.requestFactory.createConfig(createConfigRequest, _options); + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx) => middleware.pre(ctx))); + } + return middlewarePreObservable.pipe(mergeMap((ctx) => this.configuration.httpApi.send(ctx))).pipe(mergeMap((response) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp) => this.responseProcessor.createConfig(rsp))); + })); + } + /** + * Version: 9.2.0.cl or later Creates a connection to a data warehouse for live query services. Requires `DATAMANAGEMENT` (**Can manage data**) or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) privilege is required. #### Create a connection without tables To create a connection without tables: 1. Pass these parameters in your API request. * Name of the connection. * Type of the data warehouse to connect to. * A JSON map of configuration attributes in `data_warehouse_config`. The following example shows the configuration attributes for a SnowFlake connection: ``` { \"configuration\":{ \"accountName\":\"thoughtspot_partner\", \"user\":\"tsadmin\", \"password\":\"TestConn123\", \"role\":\"sysadmin\", \"warehouse\":\"MEDIUM_WH\" }, \"authenticationType\": \"SERVICE_ACCOUNT\", \"externalDatabases\":[ ] } ``` 2. Set `validate` to `false`. **NOTE:** If the `authentication_type` is anything other than SERVICE_ACCOUNT, you must explicitly provide the authenticationType property in the payload. If you do not specify authenticationType, the API will default to SERVICE_ACCOUNT as the authentication type. #### Create a connection with tables If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) and `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` (**Can manage data models**) privilege is required. To create a connection with tables: 1. Pass these parameters in your API request. * Name of the connection. * Type of the data warehouse to connect to. * A JSON map of configuration attributes, database details, and table properties in `data_warehouse_config` as shown in the following example: ``` { \"configuration\":{ \"accountName\":\"thoughtspot_partner\", \"user\":\"tsadmin\", \"password\":\"TestConn123\", \"role\":\"sysadmin\", \"warehouse\":\"MEDIUM_WH\" }, \"authenticationType\": \"SERVICE_ACCOUNT\", \"externalDatabases\":[ { \"name\":\"AllDatatypes\", \"isAutoCreated\":false, \"schemas\":[ { \"name\":\"alldatatypes\", \"tables\":[ { \"name\":\"allDatatypes\", \"type\":\"TABLE\", \"description\":\"\", \"selected\":true, \"linked\":true, \"columns\":[ { \"name\":\"CNUMBER\", \"type\":\"INT64\", \"canImport\":true, \"selected\":true, \"isLinkedActive\":true, \"isImported\":false, \"tableName\":\"allDatatypes\", \"schemaName\":\"alldatatypes\", \"dbName\":\"AllDatatypes\" }, { \"name\":\"CDECIMAL\", \"type\":\"INT64\", \"canImport\":true, \"selected\":true, \"isLinkedActive\":true, \"isImported\":false, \"tableName\":\"allDatatypes\", \"schemaName\":\"alldatatypes\", \"dbName\":\"AllDatatypes\" } ] } ] } ] } ] } ``` 2. Set `validate` to `true`. **NOTE:** If the `authentication_type` is anything other than SERVICE_ACCOUNT, you must explicitly provide the authenticationType property in the payload. If you do not specify authenticationType, the API will default to SERVICE_ACCOUNT as the authentication type. + * @param createConnectionRequest + */ + createConnection(createConnectionRequest, _options) { + const requestContextPromise = this.requestFactory.createConnection(createConnectionRequest, _options); + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx) => middleware.pre(ctx))); + } + return middlewarePreObservable.pipe(mergeMap((ctx) => this.configuration.httpApi.send(ctx))).pipe(mergeMap((response) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp) => this.responseProcessor.createConnection(rsp))); + })); + } + /** + * Version: 10.12.0.cl or later Creates an additional configuration to an existing connection to a data warehouse. Requires `DATAMANAGEMENT` (**Can manage data**) or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) privilege is required. #### Usage guidelines * A JSON map of configuration attributes in `configuration`. The following example shows the configuration attributes: ``` { \"user\":\"DEV_USER\", \"password\":\"TestConn123\", \"role\":\"DEV\", \"warehouse\":\"DEV_WH\" } ``` * If the `policy_type` is `PRINCIPALS`, then `policy_principals` is a required field. * If the `policy_type` is `PROCESSES`, then `policy_processes` is a required field. * If the `policy_type` is `NO_POLICY`, then `policy_principals` and `policy_processes` are not required fields. #### Parameterized Connection Support For parameterized connections that use OAuth authentication, only the same_as_parent and policy_process_options attributes are allowed in the API request. These attributes are not applicable to connections that are not parameterized. + * @param createConnectionConfigurationRequest + */ + createConnectionConfiguration(createConnectionConfigurationRequest, _options) { + const requestContextPromise = this.requestFactory.createConnectionConfiguration(createConnectionConfigurationRequest, _options); + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx) => middleware.pre(ctx))); + } + return middlewarePreObservable.pipe(mergeMap((ctx) => this.configuration.httpApi.send(ctx))).pipe(mergeMap((response) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp) => this.responseProcessor.createConnectionConfiguration(rsp))); + })); + } + /** + * Version: 10.4.0.cl or later Creates a new conversation session tied to a specific data model for AI-driven natural language querying. Requires `CAN_USE_SPOTTER` privilege and at least view access to the metadata object specified in the request. #### Usage guidelines The request must include: - `metadata_identifier`: the unique ID of the data source that provides context for the conversation Optionally, you can provide: - `tokens`: a token string to set initial context for the conversation (e.g., `\"[sales],[item type],[state]\"`) If the request is successful, ThoughtSpot returns a unique `conversation_identifier` that must be passed to `sendMessage` to continue the conversation. #### Error responses | Code | Description | |------|-------------| | 401 | Unauthorized — authentication token is missing, expired, or invalid. | | 403 | Forbidden — the authenticated user does not have `CAN_USE_SPOTTER` privilege or lacks view permission on the specified metadata object. | > ###### Note: > * This endpoint is currently in Beta. Breaking changes may be introduced before the endpoint is made Generally Available. > * This endpoint requires Spotter - please contact ThoughtSpot support to enable Spotter on your cluster. + * @param createConversationRequest + */ + createConversation(createConversationRequest, _options) { + const requestContextPromise = this.requestFactory.createConversation(createConversationRequest, _options); + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx) => middleware.pre(ctx))); + } + return middlewarePreObservable.pipe(mergeMap((ctx) => this.configuration.httpApi.send(ctx))).pipe(mergeMap((response) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp) => this.responseProcessor.createConversation(rsp))); + })); + } + /** + * Version: 9.6.0.cl or later Creates a custom action that appears as a menu action on a saved Answer or Liveboard visualization. Requires `DEVELOPER` (**Has Developer privilege**) or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `DEVELOPER` (**Has developer privilege**) privilege is required. #### Usage Guidelines The API lets you create the following types of custom actions: * URL-based action Allows pushing data to an external URL. * Callback action Triggers a callback to the host application and initiates a response payload on an embedded ThoughtSpot instance. By default, custom actions are visible to only administrator or developer users. To make a custom action available to other users, and specify the groups in `group_identifiers`. By default, the custom action is set as a _global_ action on all visualizations and saved Answers. To assign a custom action to specific Liveboard visualization, saved Answer, or Worksheet, set `visibility` to `false` in `default_action_config` property and specify the GUID or name of the object in `associate_metadata`. For more information, see [Custom actions](https://developers.thoughtspot.com/docs/custom-action-intro). + * @param createCustomActionRequest + */ + createCustomAction(createCustomActionRequest, _options) { + const requestContextPromise = this.requestFactory.createCustomAction(createCustomActionRequest, _options); + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx) => middleware.pre(ctx))); + } + return middlewarePreObservable.pipe(mergeMap((ctx) => this.configuration.httpApi.send(ctx))).pipe(mergeMap((response) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp) => this.responseProcessor.createCustomAction(rsp))); + })); + } + /** + * Version: 10.10.0.cl or later Creates a customization configuration for the notification email. #### Pre-requisites Requires `DEVELOPER` (**has developer privilege**) or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `DEVELOPER` (**Has developer privilege**) privilege is required. **NOTE**:This endpoint in currently in beta. Contact ThoughtSpot support to enable this on your instance. #### Usage guidelines To create a custom configuration pass these parameters in your API request: - A JSON map of configuration attributes `template_properties`. The following example shows a sample set of customization configuration: ``` { { \"cta_button_bg_color\": \"#444DEA\", \"cta_text_font_color\": \"#FFFFFF\", \"primary_bg_color\": \"#D3DEF0\", \"logo_url\": \"https://storage.pardot.com/710713/1642089901EbkRibJq/TS_fullworkmark_darkmode.png\", \"font_family\": \"\", \"product_name\": \"ThoughtSpot\", \"footer_address\": \"444 Castro St, Suite 1000 Mountain View, CA 94041\", \"footer_phone\": \"(800) 508-7008\", \"replacement_value_for_liveboard\": \"Dashboard\", \"replacement_value_for_answer\": \"Chart\", \"replacement_value_for_spot_iq\": \"AI Insights\", \"hide_footer_phone\": false, \"hide_footer_address\": false, \"hide_product_name\": false, \"hide_manage_notification\": false, \"hide_mobile_app_nudge\": false, \"hide_privacy_policy\": false, \"hide_ts_vocabulary_definitions\": false, \"hide_error_message\": false, \"hide_unsubscribe_link\": false, \"hide_notification_status\": false, \"hide_modify_alert\": false, \"company_website_url\": \"https://your-website.com/\", \"company_privacy_policy_url\" : \"https://link-to-privacy-policy.com/\", \"contact_support_url\": \"https://link-to-contact-support.com/\", \"hide_contact_support_url\": false, \"hide_logo_url\" : false } } ``` + * @param createEmailCustomizationRequest + */ + createEmailCustomization(createEmailCustomizationRequest, _options) { + const requestContextPromise = this.requestFactory.createEmailCustomization(createEmailCustomizationRequest, _options); + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx) => middleware.pre(ctx))); + } + return middlewarePreObservable.pipe(mergeMap((ctx) => this.configuration.httpApi.send(ctx))).pipe(mergeMap((response) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp) => this.responseProcessor.createEmailCustomization(rsp))); + })); + } + /** + * Version: 9.0.0.cl or later Creates an Org object. To use this API, the [Orgs](https://docs.thoughtspot.com/cloud/latest/orgs-overview) feature must be enabled in your cluster. Requires cluster administration (**Can administer Org**) privileges. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `ORG_ADMINISTRATION` (**Can manage Orgs**) privilege is required. + * @param createOrgRequest + */ + createOrg(createOrgRequest, _options) { + const requestContextPromise = this.requestFactory.createOrg(createOrgRequest, _options); + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx) => middleware.pre(ctx))); + } + return middlewarePreObservable.pipe(mergeMap((ctx) => this.configuration.httpApi.send(ctx))).pipe(mergeMap((response) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp) => this.responseProcessor.createOrg(rsp))); + })); + } + /** + * Version: 9.5.0.cl or later Creates a Role object in ThoughtSpot. Available only if [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance. To create a Role, the `ROLE_ADMINISTRATION` (**Can manage roles**) privilege is required. + * @param createRoleRequest + */ + createRole(createRoleRequest, _options) { + const requestContextPromise = this.requestFactory.createRole(createRoleRequest, _options); + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx) => middleware.pre(ctx))); + } + return middlewarePreObservable.pipe(mergeMap((ctx) => this.configuration.httpApi.send(ctx))).pipe(mergeMap((response) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp) => this.responseProcessor.createRole(rsp))); + })); + } + /** + * Create schedule. Version: 9.4.0.cl or later Creates a Liveboard schedule job. Requires at least edit access to Liveboards. To create a schedule on behalf of another user, you need `ADMINISTRATION` (**Can administer Org**) or `JOBSCHEDULING` (**Can schedule for others**) privilege and edit access to the Liveboard. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `JOBSCHEDULING` (**Can schedule for others**) privilege is required. #### Usage guidelines * The description text is mandatory. The description text appears as **Description: ** in the Liveboard schedule email notifications. * For Liveboards with both charts and tables, schedule creation is only supported in PDF and XLS formats. Schedules created in CSV formats for such Liveboards will fail to run. If `PDF` is set as the `file_format`, enable `pdf_options` to get the correct attachment. Not doing so may cause the attachment to be rendered empty. * To include only specific visualizations, specify the visualization GUIDs in the `visualization_identifiers` array. * You can schedule a Liveboard job to run periodically by setting frequency parameters. You can set the schedule to run daily, weekly, monthly or every n minutes or hours. The scheduled job can also be configured to run at a specific time of the day or on specific days of the week or month. Please ensure that when setting the schedule frequency for _minute of the object_, only values that are multiples of 5 are included. * If the `frequency` parameters are defined, you can set the time zone to a value that matches your server\'s time zone. For example, `US/Central`, `Etc/UTC`, `CET`. The default time zone is `America/Los_Angeles`. For more information about Liveboard jobs, see [ThoughtSpot Product Documentation](https://docs.thoughtspot.com/cloud/latest/liveboard-schedule). + * @param createScheduleRequest + */ + createSchedule(createScheduleRequest, _options) { + const requestContextPromise = this.requestFactory.createSchedule(createScheduleRequest, _options); + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx) => middleware.pre(ctx))); + } + return middlewarePreObservable.pipe(mergeMap((ctx) => this.configuration.httpApi.send(ctx))).pipe(mergeMap((response) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp) => this.responseProcessor.createSchedule(rsp))); + })); + } + /** + * Version: 9.0.0.cl or later Creates a tag object. Tags are labels that identify a metadata object. For example, you can create a tag to designate subject areas, such as sales, HR, marketing, and finance. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `TAGMANAGEMENT` (**Can manage tags**) privilege is required to create, edit, and delete tags. + * @param createTagRequest + */ + createTag(createTagRequest, _options) { + const requestContextPromise = this.requestFactory.createTag(createTagRequest, _options); + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx) => middleware.pre(ctx))); + } + return middlewarePreObservable.pipe(mergeMap((ctx) => this.configuration.httpApi.send(ctx))).pipe(mergeMap((response) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp) => this.responseProcessor.createTag(rsp))); + })); + } + /** + * Version: 9.0.0.cl or later Creates a user in ThoughtSpot. The API endpoint allows you to configure several user properties such as email address, account status, share notification preferences, and sharing visibility. You can provision the user to [groups](https://docs.thoughtspot.com/cloud/latest/groups-privileges) and [Orgs](https://docs.thoughtspot.com/cloud/latest/orgs-overview). You can also add Liveboard, Answer, and Worksheet objects to the user’s favorites list, assign a default Liveboard for the user, and set user preferences. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `USER_ADMINISTRATION` (**Can manage users**) privilege is required. + * @param createUserRequest + */ + createUser(createUserRequest, _options) { + const requestContextPromise = this.requestFactory.createUser(createUserRequest, _options); + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx) => middleware.pre(ctx))); + } + return middlewarePreObservable.pipe(mergeMap((ctx) => this.configuration.httpApi.send(ctx))).pipe(mergeMap((response) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp) => this.responseProcessor.createUser(rsp))); + })); + } + /** + * Version: 9.0.0.cl or later Creates a group object in ThoughtSpot. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `GROUP_ADMINISTRATION` (**Can manage groups**) privilege is required. #### About groups Groups in ThoughtSpot are used by the administrators to define privileges and organize users based on their roles and access requirements. To know more about groups and privileges, see [ThoughtSpot Product Documentation](https://docs.thoughtspot.com/cloud/latest/groups-privileges). #### Supported operations The API endpoint lets you perform the following operations: * Assign privileges * Add users * Define sharing visibility * Add sub-groups * Assign a default Liveboard + * @param createUserGroupRequest + */ + createUserGroup(createUserGroupRequest, _options) { + const requestContextPromise = this.requestFactory.createUserGroup(createUserGroupRequest, _options); + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx) => middleware.pre(ctx))); + } + return middlewarePreObservable.pipe(mergeMap((ctx) => this.configuration.httpApi.send(ctx))).pipe(mergeMap((response) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp) => this.responseProcessor.createUserGroup(rsp))); + })); + } + /** + * Create a variable which can be used for parameterizing metadata objects Version: 26.4.0.cl or later Allows creating a variable which can be used for parameterizing metadata objects in ThoughtSpot. Requires ADMINISTRATION role and TENANT scope. The CAN_MANAGE_VARIABLES permission allows you to manage Formula Variables in the current organization scope. The API endpoint supports the following types of variables: * CONNECTION_PROPERTY - For connection properties * TABLE_MAPPING - For table mappings * CONNECTION_PROPERTY_PER_PRINCIPAL - For connection properties per principal. In order to use this please contact support to enable this. * FORMULA_VARIABLE - For Formula variables, introduced in 10.15.0.cl When creating a variable, you need to specify: * The variable type * A unique name for the variable * Whether the variable contains sensitive values (defaults to false) * The data type of the variable, only specify for formula variables (defaults to null) The operation will fail if: * The user lacks required permissions * The variable name already exists * The variable type is invalid + * @param createVariableRequest + */ + createVariable(createVariableRequest, _options) { + const requestContextPromise = this.requestFactory.createVariable(createVariableRequest, _options); + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx) => middleware.pre(ctx))); + } + return middlewarePreObservable.pipe(mergeMap((ctx) => this.configuration.httpApi.send(ctx))).pipe(mergeMap((response) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp) => this.responseProcessor.createVariable(rsp))); + })); + } + /** + * Version: 10.14.0.cl or later Creates a new webhook configuration to receive notifications for specified events. The webhook will be triggered when the configured events occur in the system. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) or `DEVELOPER` (**Has developer privilege**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, users with `CAN_MANAGE_WEBHOOKS` (**Can manage webhooks**) privilege are also authorized to perform this action. + * @param createWebhookConfigurationRequest + */ + createWebhookConfiguration(createWebhookConfigurationRequest, _options) { + const requestContextPromise = this.requestFactory.createWebhookConfiguration(createWebhookConfigurationRequest, _options); + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx) => middleware.pre(ctx))); + } + return middlewarePreObservable.pipe(mergeMap((ctx) => this.configuration.httpApi.send(ctx))).pipe(mergeMap((response) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp) => this.responseProcessor.createWebhookConfiguration(rsp))); + })); + } + /** + * Version: 9.9.0.cl or later Creates a DBT connection object in ThoughtSpot. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege or `DATAMANAGEMENT` (**Can manage data**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the following Data control privileges may be required: - `CAN_MANAGE_CUSTOM_CALENDAR`(**Can manage custom calendars**) - `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) - `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` (**Can manage data models**) #### About create DBT connection DBT connection in ThoughtSpot is used by the user to define DBT credentials for cloud . The API needs embrace connection, embrace database name, DBT url, import type, DBT account identifier, DBT project identifier, DBT access token and environment details (or) embrace connection, embrace database name, import type, file_content to create a connection object. To know more about DBT, see ThoughtSpot Product Documentation. + * @param connectionName Name of the connection. + * @param databaseName Name of the Database. + * @param importType Mention type of Import + * @param accessToken Access token is mandatory when Import_Type is DBT_CLOUD. + * @param dbtUrl DBT URL is mandatory when Import_Type is DBT_CLOUD. + * @param accountId Account ID is mandatory when Import_Type is DBT_CLOUD + * @param projectId Project ID is mandatory when Import_Type is DBT_CLOUD + * @param dbtEnvId DBT Environment ID\\\" + * @param projectName Name of the project + * @param fileContent Upload DBT Manifest and Catalog artifact files as a ZIP file. This field is Mandatory when Import Type is \\\'ZIP_FILE\\\' + */ + dbtConnection(connectionName, databaseName, importType, accessToken, dbtUrl, accountId, projectId, dbtEnvId, projectName, fileContent, _options) { + const requestContextPromise = this.requestFactory.dbtConnection(connectionName, databaseName, importType, accessToken, dbtUrl, accountId, projectId, dbtEnvId, projectName, fileContent, _options); + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx) => middleware.pre(ctx))); + } + return middlewarePreObservable.pipe(mergeMap((ctx) => this.configuration.httpApi.send(ctx))).pipe(mergeMap((response) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp) => this.responseProcessor.dbtConnection(rsp))); + })); + } + /** + * Version: 9.9.0.cl or later Resynchronize the existing list of models, tables, worksheet tml’s and import them to Thoughtspot based on the DBT connection object. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege or `DATAMANAGEMENT` (**Can manage data**) privilege, along with an existing DBT connection. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the following data control privileges may be required: - `CAN_MANAGE_CUSTOM_CALENDAR`(**Can manage custom calendars**) - `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) - `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` (**Can manage data models**) + * @param dbtConnectionIdentifier Unique ID of the DBT connection. + * @param fileContent Upload DBT Manifest and Catalog artifact files as a ZIP file. This field is mandatory if the connection was created with import_type ‘ZIP_FILE’ + */ + dbtGenerateSyncTml(dbtConnectionIdentifier, fileContent, _options) { + const requestContextPromise = this.requestFactory.dbtGenerateSyncTml(dbtConnectionIdentifier, fileContent, _options); + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx) => middleware.pre(ctx))); + } + return middlewarePreObservable.pipe(mergeMap((ctx) => this.configuration.httpApi.send(ctx))).pipe(mergeMap((response) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp) => this.responseProcessor.dbtGenerateSyncTml(rsp))); + })); + } + /** + * Version: 9.9.0.cl or later Generate required table and worksheet and import them. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege or `DATAMANAGEMENT` (**Can manage data**) privilege, along with an existing DBT connection. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the following data control privileges may be required: - `CAN_MANAGE_CUSTOM_CALENDAR`(**Can manage custom calendars**) - `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) - `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` (**Can manage data models**) #### About generate TML Models and Worksheets to be imported can be selected by the user as part of the API. + * @param dbtConnectionIdentifier Unique ID of the DBT connection. + * @param modelTables List of Models and their respective Tables Example: \\\'[{\\\"model_name\\\": \\\"model_name\\\", \\\"tables\\\": [\\\"table_name\\\"]}]\\\' + * @param importWorksheets Mention the worksheet tmls to import + * @param worksheets List of worksheets is mandatory when import_Worksheets is type SELECTED Example: [\\\"worksheet_name\\\"] + * @param fileContent Upload DBT Manifest and Catalog artifact files as a ZIP file. This field is mandatory if the connection was created with import_type ‘ZIP_FILE’ + */ + dbtGenerateTml(dbtConnectionIdentifier, modelTables, importWorksheets, worksheets, fileContent, _options) { + const requestContextPromise = this.requestFactory.dbtGenerateTml(dbtConnectionIdentifier, modelTables, importWorksheets, worksheets, fileContent, _options); + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx) => middleware.pre(ctx))); + } + return middlewarePreObservable.pipe(mergeMap((ctx) => this.configuration.httpApi.send(ctx))).pipe(mergeMap((response) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp) => this.responseProcessor.dbtGenerateTml(rsp))); + })); + } + /** + * Version: 9.9.0.cl or later Gets a list of DBT connection objects by user and organization, available on the ThoughtSpot system. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege or `DATAMANAGEMENT` (**Can manage data**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the following Data control privileges may be required: - `CAN_MANAGE_CUSTOM_CALENDAR`(**Can manage custom calendars**) - `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) - `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` (**Can manage data models**) #### About search DBT connection To get details of a specific DBT connection identifier, database connection identifier, database connection name, database name, project name, project identifier, environment identifier , import type and author. + */ + dbtSearch(_options) { + const requestContextPromise = this.requestFactory.dbtSearch(_options); + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx) => middleware.pre(ctx))); + } + return middlewarePreObservable.pipe(mergeMap((ctx) => this.configuration.httpApi.send(ctx))).pipe(mergeMap((response) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp) => this.responseProcessor.dbtSearch(rsp))); + })); + } + /** + * Version: 9.7.0.cl or later Deactivates a user account. Requires `ADMINISTRATION` (**Can administer Thoughtspot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `USER_ADMINISTRATION` (**Can manage users**) privilege is required. To deactivate a user account, the API request body must include the following information: - Username or the GUID of the user account - Base URL of the ThoughtSpot instance If the API request is successful, ThoughtSpot returns the activation URL in the response. The activation URL is valid for 14 days and can be used to re-activate the account and reset the password of the deactivated account. + * @param deactivateUserRequest + */ + deactivateUser(deactivateUserRequest, _options) { + const requestContextPromise = this.requestFactory.deactivateUser(deactivateUserRequest, _options); + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx) => middleware.pre(ctx))); + } + return middlewarePreObservable.pipe(mergeMap((ctx) => this.configuration.httpApi.send(ctx))).pipe(mergeMap((response) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp) => this.responseProcessor.deactivateUser(rsp))); + })); + } + /** + * Version: 10.12.0.cl or later Deletes a [custom calendar](https://docs.thoughtspot.com/cloud/latest/connections-cust-cal). Requires `DATAMANAGEMENT` (**Can manage data**) or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your ThoughtSpot instance, the `CAN_MANAGE_CUSTOM_CALENDAR` (**Can manage custom calendars**) privilege is required. #### Usage guidelines To delete a custom calendar, specify the calendar ID as a path parameter in the request URL. + * @param calendarIdentifier Unique ID or name of the Calendar. + */ + deleteCalendar(calendarIdentifier, _options) { + const requestContextPromise = this.requestFactory.deleteCalendar(calendarIdentifier, _options); + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx) => middleware.pre(ctx))); + } + return middlewarePreObservable.pipe(mergeMap((ctx) => this.configuration.httpApi.send(ctx))).pipe(mergeMap((response) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp) => this.responseProcessor.deleteCalendar(rsp))); + })); + } + /** + * Version: 26.4.0.cl or later Deletes one or more collections from ThoughtSpot. #### Delete options * **delete_children**: When set to `true`, deletes the child objects (metadata items) within the collection that the user has access to. Objects that the user does not have permission to delete will be skipped. * **dry_run**: When set to `true`, performs a preview of the deletion operation without actually deleting anything. The response shows what would be deleted, allowing you to review before committing the deletion. #### Response The response includes: * **metadata_deleted**: List of metadata objects that were successfully deleted * **metadata_skipped**: List of metadata objects that were skipped due to lack of permissions or other constraints + * @param deleteCollectionRequest + */ + deleteCollection(deleteCollectionRequest, _options) { + const requestContextPromise = this.requestFactory.deleteCollection(deleteCollectionRequest, _options); + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx) => middleware.pre(ctx))); + } + return middlewarePreObservable.pipe(mergeMap((ctx) => this.configuration.httpApi.send(ctx))).pipe(mergeMap((response) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp) => this.responseProcessor.deleteCollection(rsp))); + })); + } + /** + * Version: 9.2.0.cl or later Deletes Git repository configuration from your ThoughtSpot instance. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance on your instance, the `CAN_SETUP_VERSION_CONTROL` (**Can set up version control**) privilege. + * @param deleteConfigRequest + */ + deleteConfig(deleteConfigRequest, _options) { + const requestContextPromise = this.requestFactory.deleteConfig(deleteConfigRequest, _options); + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx) => middleware.pre(ctx))); + } + return middlewarePreObservable.pipe(mergeMap((ctx) => this.configuration.httpApi.send(ctx))).pipe(mergeMap((response) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp) => this.responseProcessor.deleteConfig(rsp))); + })); + } + /** + * Version: 9.2.0.cl or later **Important**: This endpoint is deprecated and will be removed from ThoughtSpot in September 2025. ThoughtSpot strongly recommends using the [Delete Connection V2](#/http/api-endpoints/connections/delete-connection-v2) endpoint to delete your connection objects. #### Usage guidelines Deletes a connection object. Requires `DATAMANAGEMENT` (**Can manage data**) and edit permissions to the connection object, or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) privilege is required. **Note**: If a connection has dependent objects, make sure you remove its associations before the delete operation. + * @param deleteConnectionRequest + */ + deleteConnection(deleteConnectionRequest, _options) { + const requestContextPromise = this.requestFactory.deleteConnection(deleteConnectionRequest, _options); + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx) => middleware.pre(ctx))); + } + return middlewarePreObservable.pipe(mergeMap((ctx) => this.configuration.httpApi.send(ctx))).pipe(mergeMap((response) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp) => this.responseProcessor.deleteConnection(rsp))); + })); + } + /** + * Version: 10.12.0.cl or later Deletes connection configuration objects. Requires `DATAMANAGEMENT` (**Can manage data**) and edit permissions to the connection object, or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) privilege is required. + * @param deleteConnectionConfigurationRequest + */ + deleteConnectionConfiguration(deleteConnectionConfigurationRequest, _options) { + const requestContextPromise = this.requestFactory.deleteConnectionConfiguration(deleteConnectionConfigurationRequest, _options); + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx) => middleware.pre(ctx))); + } + return middlewarePreObservable.pipe(mergeMap((ctx) => this.configuration.httpApi.send(ctx))).pipe(mergeMap((response) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp) => this.responseProcessor.deleteConnectionConfiguration(rsp))); + })); + } + /** + * Version: 10.4.0.cl or later Deletes a connection object. **Note**: If a connection has dependent objects, make sure you remove its associations before the delete operation. Requires `DATAMANAGEMENT` (**Can manage data**) and edit permissions to the connection object, or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) privilege is required. + * @param connectionIdentifier Unique ID or name of the connection. + */ + deleteConnectionV2(connectionIdentifier, _options) { + const requestContextPromise = this.requestFactory.deleteConnectionV2(connectionIdentifier, _options); + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx) => middleware.pre(ctx))); + } + return middlewarePreObservable.pipe(mergeMap((ctx) => this.configuration.httpApi.send(ctx))).pipe(mergeMap((response) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp) => this.responseProcessor.deleteConnectionV2(rsp))); + })); + } + /** + * Version: 9.6.0.cl or later Removes the custom action specified in the API request. Requires `DEVELOPER` (**Has Developer privilege**) or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `DEVELOPER` (**Has developer privilege**) privilege is required. + * @param customActionIdentifier Unique ID or name of the custom action. + */ + deleteCustomAction(customActionIdentifier, _options) { + const requestContextPromise = this.requestFactory.deleteCustomAction(customActionIdentifier, _options); + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx) => middleware.pre(ctx))); + } + return middlewarePreObservable.pipe(mergeMap((ctx) => this.configuration.httpApi.send(ctx))).pipe(mergeMap((response) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp) => this.responseProcessor.deleteCustomAction(rsp))); + })); + } + /** + * Version: 9.9.0.cl or later Removes the specified DBT connection object from the ThoughtSpot system. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) or `DATAMANAGEMENT` (**Can manage data ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the following Data control privileges may be required: - `CAN_MANAGE_CUSTOM_CALENDAR`(**Can manage custom calendars**) - `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) - `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` (**Can manage data models**) + * @param dbtConnectionIdentifier Unique ID of the DBT Connection. + */ + deleteDbtConnection(dbtConnectionIdentifier, _options) { + const requestContextPromise = this.requestFactory.deleteDbtConnection(dbtConnectionIdentifier, _options); + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx) => middleware.pre(ctx))); + } + return middlewarePreObservable.pipe(mergeMap((ctx) => this.configuration.httpApi.send(ctx))).pipe(mergeMap((response) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp) => this.responseProcessor.deleteDbtConnection(rsp))); + })); + } + /** + * Version: 10.10.0.cl or later Deletes the configuration for the email customization. #### Pre-requisites Requires `DEVELOPER` (**has developer privilege**) or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `DEVELOPER` (**Has developer privilege**) privilege is required. **NOTE**:This endpoint in currently in beta. Contact ThoughtSpot support to enable this on your instance. #### Usage guidelines - Call the search API endpoint to get the `template_identifier` from the response. - Use that `template_identifier` as a parameter in this API request. + * @param templateIdentifier Unique ID or name of the email customization. + */ + deleteEmailCustomization(templateIdentifier, _options) { + const requestContextPromise = this.requestFactory.deleteEmailCustomization(templateIdentifier, _options); + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx) => middleware.pre(ctx))); + } + return middlewarePreObservable.pipe(mergeMap((ctx) => this.configuration.httpApi.send(ctx))).pipe(mergeMap((response) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp) => this.responseProcessor.deleteEmailCustomization(rsp))); + })); + } + /** + * Version: 9.0.0.cl or later Removes the specified metadata object from the ThoughtSpot system. Requires edit access to the metadata object. + * @param deleteMetadataRequest + */ + deleteMetadata(deleteMetadataRequest, _options) { + const requestContextPromise = this.requestFactory.deleteMetadata(deleteMetadataRequest, _options); + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx) => middleware.pre(ctx))); + } + return middlewarePreObservable.pipe(mergeMap((ctx) => this.configuration.httpApi.send(ctx))).pipe(mergeMap((response) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp) => this.responseProcessor.deleteMetadata(rsp))); + })); + } + /** + * Version: 9.0.0.cl or later Deletes an Org object from the ThoughtSpot system. Requires cluster administration (**Can administer Org**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `ORG_ADMINISTRATION` (**Can manage Orgs**) privilege is required. When you delete an Org, all its users and objects created in that Org context are removed. However, if the users in the deleted Org also exists in other Orgs, they are removed only from the deleted Org. + * @param orgIdentifier ID or name of the Org + */ + deleteOrg(orgIdentifier, _options) { + const requestContextPromise = this.requestFactory.deleteOrg(orgIdentifier, _options); + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx) => middleware.pre(ctx))); + } + return middlewarePreObservable.pipe(mergeMap((ctx) => this.configuration.httpApi.send(ctx))).pipe(mergeMap((response) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp) => this.responseProcessor.deleteOrg(rsp))); + })); + } + /** + * Version: 10.12.0.cl or later Deletes the configuration for the email customization. #### Pre-requisites Requires `DEVELOPER` (**has developer privilege**) or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `DEVELOPER` (**Has developer privilege**) privilege is required. **NOTE**:This endpoint in currently in beta. Contact ThoughtSpot support to enable this on your instance. #### Usage guidelines - Call the search API endpoint to get the `org_identifier` from the response. - Use that `org_identifier` as a parameter in this API request. + * @param deleteOrgEmailCustomizationRequest + */ + deleteOrgEmailCustomization(deleteOrgEmailCustomizationRequest, _options) { + const requestContextPromise = this.requestFactory.deleteOrgEmailCustomization(deleteOrgEmailCustomizationRequest, _options); + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx) => middleware.pre(ctx))); + } + return middlewarePreObservable.pipe(mergeMap((ctx) => this.configuration.httpApi.send(ctx))).pipe(mergeMap((response) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp) => this.responseProcessor.deleteOrgEmailCustomization(rsp))); + })); + } + /** + * Version: 9.5.0.cl or later Deletes a Role object from the ThoughtSpot system. Available only if [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance. To delete a Role, the `ROLE_ADMINISTRATION` (**Can manage roles**) privilege is required. + * @param roleIdentifier Unique ID or name of the Role. ReadOnly roles cannot be deleted. + */ + deleteRole(roleIdentifier, _options) { + const requestContextPromise = this.requestFactory.deleteRole(roleIdentifier, _options); + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx) => middleware.pre(ctx))); + } + return middlewarePreObservable.pipe(mergeMap((ctx) => this.configuration.httpApi.send(ctx))).pipe(mergeMap((response) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp) => this.responseProcessor.deleteRole(rsp))); + })); + } + /** + * Deletes a scheduled job. Version: 9.4.0.cl or later Deletes a scheduled Liveboard job. Requires at least edit access to Liveboard or `ADMINISTRATION` (**Can administer Org**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `JOBSCHEDULING` (**Can schedule for others**) privilege is required. + * @param scheduleIdentifier Unique ID or name of the scheduled job. + */ + deleteSchedule(scheduleIdentifier, _options) { + const requestContextPromise = this.requestFactory.deleteSchedule(scheduleIdentifier, _options); + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx) => middleware.pre(ctx))); + } + return middlewarePreObservable.pipe(mergeMap((ctx) => this.configuration.httpApi.send(ctx))).pipe(mergeMap((response) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp) => this.responseProcessor.deleteSchedule(rsp))); + })); + } + /** + * Version: 9.0.0.cl or later Deletes a tag object from the ThoughtSpot system Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `TAGMANAGEMENT` (**Can manage tags**) privilege is required to create, edit, and delete tags. + * @param tagIdentifier Tag identifier Tag name or Tag id. + */ + deleteTag(tagIdentifier, _options) { + const requestContextPromise = this.requestFactory.deleteTag(tagIdentifier, _options); + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx) => middleware.pre(ctx))); + } + return middlewarePreObservable.pipe(mergeMap((ctx) => this.configuration.httpApi.send(ctx))).pipe(mergeMap((response) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp) => this.responseProcessor.deleteTag(rsp))); + })); + } + /** + * Version: 9.0.0.cl or later Deletes a user from the ThoughtSpot system. If you want to remove a user from a specific Org but not from ThoughtSpot, update the group and Org mapping properties of the user object via a POST API call to the [/api/rest/2.0/users/{user_identifier}/update](#/http/api-endpoints/users/update-user) endpoint. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `USER_ADMINISTRATION` (**Can manage users**) privilege is required. + * @param userIdentifier GUID / name of the user + */ + deleteUser(userIdentifier, _options) { + const requestContextPromise = this.requestFactory.deleteUser(userIdentifier, _options); + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx) => middleware.pre(ctx))); + } + return middlewarePreObservable.pipe(mergeMap((ctx) => this.configuration.httpApi.send(ctx))).pipe(mergeMap((response) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp) => this.responseProcessor.deleteUser(rsp))); + })); + } + /** + * Version: 9.0.0.cl or later Removes the specified group object from the ThoughtSpot system. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `GROUP_ADMINISTRATION` (**Can manage groups**) privilege is required. + * @param groupIdentifier GUID or name of the group. + */ + deleteUserGroup(groupIdentifier, _options) { + const requestContextPromise = this.requestFactory.deleteUserGroup(groupIdentifier, _options); + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx) => middleware.pre(ctx))); + } + return middlewarePreObservable.pipe(mergeMap((ctx) => this.configuration.httpApi.send(ctx))).pipe(mergeMap((response) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp) => this.responseProcessor.deleteUserGroup(rsp))); + })); + } + /** + * Delete a variable Version: 10.14.0.cl or later **Note:** This API endpoint is deprecated and will be removed from ThoughtSpot in a future release. Use [POST /api/rest/2.0/template/variables/delete](/api/rest/2.0/template/variables/delete) instead. Allows deleting a variable from ThoughtSpot. Requires ADMINISTRATION role and TENANT scope. The CAN_MANAGE_VARIABLES permission allows you to manage Formula Variables in the current organization scope. The API endpoint requires: * The variable identifier (ID or name) The operation will fail if: * The user lacks required permissions * The variable doesn\'t exist * The variable is being used by other objects + * @param identifier Unique id or name of the variable + */ + deleteVariable(identifier, _options) { + const requestContextPromise = this.requestFactory.deleteVariable(identifier, _options); + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx) => middleware.pre(ctx))); + } + return middlewarePreObservable.pipe(mergeMap((ctx) => this.configuration.httpApi.send(ctx))).pipe(mergeMap((response) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp) => this.responseProcessor.deleteVariable(rsp))); + })); + } + /** + * Delete variable(s) Version: 26.4.0.cl or later Allows deleting multiple variables from ThoughtSpot. Requires ADMINISTRATION role and TENANT scope. The CAN_MANAGE_VARIABLES permission allows you to manage Formula Variables in the current organization scope. The API endpoint requires: * The variable identifiers (IDs or names) The operation will fail if: * The user lacks required permissions * Any of the variables don\'t exist * Any of the variables are being used by other objects + * @param deleteVariablesRequest + */ + deleteVariables(deleteVariablesRequest, _options) { + const requestContextPromise = this.requestFactory.deleteVariables(deleteVariablesRequest, _options); + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx) => middleware.pre(ctx))); + } + return middlewarePreObservable.pipe(mergeMap((ctx) => this.configuration.httpApi.send(ctx))).pipe(mergeMap((response) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp) => this.responseProcessor.deleteVariables(rsp))); + })); + } + /** + * Version: 10.14.0.cl or later Deletes one or more webhook configurations by their unique id or name. Returns status of each deletion operation, including successfully deleted webhooks and any failures with error details. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) or `DEVELOPER` (**Has developer privilege**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, users with `CAN_MANAGE_WEBHOOKS` (**Can manage webhooks**) privilege are also authorized to perform this action. + * @param deleteWebhookConfigurationsRequest + */ + deleteWebhookConfigurations(deleteWebhookConfigurationsRequest, _options) { + const requestContextPromise = this.requestFactory.deleteWebhookConfigurations(deleteWebhookConfigurationsRequest, _options); + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx) => middleware.pre(ctx))); + } + return middlewarePreObservable.pipe(mergeMap((ctx) => this.configuration.httpApi.send(ctx))).pipe(mergeMap((response) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp) => this.responseProcessor.deleteWebhookConfigurations(rsp))); + })); + } + /** + * Version: 9.2.0.cl or later Allows you to deploy a commit and publish TML content to your ThoughtSpot instance. Requires at least edit access to the objects used in the deploy operation. The API deploys the head of the branch unless a `commit_id` is specified in the API request. If the branch name is not defined in the request, the default branch is considered for deploying commits. For more information, see [Git integration documentation](https://developers.thoughtspot.com/docs/git-integration). + * @param deployCommitRequest + */ + deployCommit(deployCommitRequest, _options) { + const requestContextPromise = this.requestFactory.deployCommit(deployCommitRequest, _options); + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx) => middleware.pre(ctx))); + } + return middlewarePreObservable.pipe(mergeMap((ctx) => this.configuration.httpApi.send(ctx))).pipe(mergeMap((response) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp) => this.responseProcessor.deployCommit(rsp))); + })); + } + /** + * Version: 9.9.0.cl or later Exports the difference in connection metadata between CDW and ThoughtSpot Requires `DATAMANAGEMENT` (**Can manage data**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the following Data control privileges may be required: - `CAN_MANAGE_CUSTOM_CALENDAR`(**Can manage custom calendars**) - `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) - `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` (**Can manage data models**) To download the connection metadata difference between ThoughtSpot and CDW, pass the connection GUID as `connection_identifier` in the API request. + * @param connectionIdentifier GUID of the connection + */ + downloadConnectionMetadataChanges(connectionIdentifier, _options) { + const requestContextPromise = this.requestFactory.downloadConnectionMetadataChanges(connectionIdentifier, _options); + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx) => middleware.pre(ctx))); + } + return middlewarePreObservable.pipe(mergeMap((ctx) => this.configuration.httpApi.send(ctx))).pipe(mergeMap((response) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp) => this.responseProcessor.downloadConnectionMetadataChanges(rsp))); + })); + } + /** + * Version: 9.0.0.cl or later Exports an Answer in the given file format. You can download the Answer data as a PDF, PNG, CSV, or XLSX file. Requires at least view access to the Answer. #### Usage guidelines In the request body, specify the GUID or name of the Answer and set `file_format`. The default file format is CSV. Use the `type` parameter to specify whether the Answer being exported is a saved Answer (`SAVED`) or a pinned Answer on a Liveboard (`PINNED`). Defaults to `SAVED`. When using `PINNED`, the `metadata_identifier` must be the container id. **NOTE**: * The downloadable file returned in API response file is extensionless. Please rename the downloaded file by typing in the relevant extension. * HTML rendering is not supported for PDF exports of Answers with tables. Optionally, you can define [runtime overrides](https://developers.thoughtspot.com/docs/fetch-data-and-report-apis#_runtime_overrides) to apply to the Answer data. + * @param exportAnswerReportRequest + */ + exportAnswerReport(exportAnswerReportRequest, _options) { + const requestContextPromise = this.requestFactory.exportAnswerReport(exportAnswerReportRequest, _options); + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx) => middleware.pre(ctx))); + } + return middlewarePreObservable.pipe(mergeMap((ctx) => this.configuration.httpApi.send(ctx))).pipe(mergeMap((response) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp) => this.responseProcessor.exportAnswerReport(rsp))); + })); + } + /** + * Version: 9.0.0.cl or later Exports a Liveboard and its visualizations in PDF, PNG, CSV, or XLSX file format. The default `file_format` is CSV. Requires at least view access to the Liveboard. #### Usage guidelines In the request body, specify the GUID or name of the Liveboard. To generate a Liveboard report with specific visualizations, add GUIDs or names of the visualizations. **NOTE**: * The downloadable file returned in API response file is extensionless. Please rename the downloaded file by typing in the relevant extension. * Optionally, you can define [runtime overrides](https://developers.thoughtspot.com/docs/fetch-data-and-report-apis#_runtime_overrides) to apply to the Answer data. * To include unsaved changes in the report, pass the `transient_pinboard_content` script generated from the `getExportRequestForCurrentPinboard` method in the Visual Embed SDK. Upon successful execution, the API returns the report with unsaved changes, including ad hoc changes to visualizations. For more information, see [Liveboard Report API](https://developers.thoughtspot.com/docs/fetch-data-and-report-apis#_liveboard_report_api). * Starting with ThoughtSpot Cloud 10.9.0.cl release, the Liveboard can be exported in the PNG format in the resolution of your choice. To enable this on your instance, contact ThoughtSpot support. When this feature is enabled, the options `include_cover_page`,`include_filter_page` within the `png_options` will not be available for PNG exports. * Starting with the ThoughtSpot Cloud 26.2.0.cl release, * Liveboards can be exported in CSV format. * All visualizations within a Liveboard can be exported as individual CSV files. * When exporting multiple visualizations or the entire Liveboard, the system returns the report as a compressed ZIP file containing the separate CSV files for each visualization. * Liveboards can also be exported in XLSX format. * All selected visualizations are consolidated into a single Excel workbook (.xlsx), with each visualization placed in its own worksheet (tab). * XLSX exports are limited to a maximum of 255 worksheets (tabs) per workbook. + * @param exportLiveboardReportRequest + */ + exportLiveboardReport(exportLiveboardReportRequest, _options) { + const requestContextPromise = this.requestFactory.exportLiveboardReport(exportLiveboardReportRequest, _options); + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx) => middleware.pre(ctx))); + } + return middlewarePreObservable.pipe(mergeMap((ctx) => this.configuration.httpApi.send(ctx))).pipe(mergeMap((response) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp) => this.responseProcessor.exportLiveboardReport(rsp))); + })); + } + /** + * Version: 9.0.0.cl or later Exports the [TML](https://docs.thoughtspot.com/cloud/latest/tml) representation of metadata objects in JSON or YAML format. Requires `DATADOWNLOADING` (**Can download Data**) and at least view access to the metadata object. #### Usage guidelines * You can export one or several objects by passing metadata object GUIDs in the `metadata` array. * When exporting TML content for a Liveboard or Answer object, you can set `export_associated` to `true` to retrieve TML content for underlying Worksheets, Tables, or Views, including the GUID of each object within the headers. When `export_associated` is set to `true`, consider retrieving one metadata object at a time. * Set `export_fqns` to `true` to add FQNs of the referenced objects in the TML content. For example, if you send an API request to retrieve TML for a Liveboard and its associated objects, the API returns the TML content with FQNs of the referenced Worksheet. Exporting TML with FQNs is useful if ThoughtSpot has multiple objects with the same name and you want to eliminate ambiguity when importing TML files into ThoughtSpot. It eliminates the need for adding FQNs of the referenced objects manually during the import operation. * To export only the TML of feedbacks associated with an object, set the GUID of the object as `identifier`, and set the `type` as `FEEDBACK` in the `metadata` array. * To export the TML of an object along with the feedbacks associated with it, set the GUID of the object as `identifier`, set the `type` as `LOGIAL_TABLE` in the `metadata` array, and set `export_with_associated_feedbacks` in `export_options` to true. For more information, see [TML Documentation](https://developers.thoughtspot.com/docs/tml#_export_a_tml). For more information on feedbacks, see [Feedback Documentation](https://docs.thoughtspot.com/cloud/latest/sage-feedback). + * @param exportMetadataTMLRequest + */ + exportMetadataTML(exportMetadataTMLRequest, _options) { + const requestContextPromise = this.requestFactory.exportMetadataTML(exportMetadataTMLRequest, _options); + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx) => middleware.pre(ctx))); + } + return middlewarePreObservable.pipe(mergeMap((ctx) => this.configuration.httpApi.send(ctx))).pipe(mergeMap((response) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp) => this.responseProcessor.exportMetadataTML(rsp))); + })); + } + /** + * Version: 10.1.0.cl or later Exports the [TML](https://docs.thoughtspot.com/cloud/latest/tml) representation of metadata objects in JSON or YAML format. ### **Permissions Required** Requires `DATAMANAGEMENT` (**Can manage data**) and `USERMANAGEMENT` (**Can manage users**) privileges. #### **Usage Guidelines** This API is only applicable for `USER`, `GROUP`, and `ROLES` metadata types. - `batch_offset` Indicates the starting position within the complete dataset from which the API should begin returning objects. Useful for paginating results efficiently. - `batch_size` Specifies the number of objects or items to retrieve in a single request. Helps control response size for better performance. - `edoc_format` Defines the format of the TML content. The exported metadata can be in JSON or YAML format. - `export_dependent` Specifies whether to include dependent metadata objects in the export. Ensures related objects are also retrieved if needed. - `all_orgs_override` Indicates whether the export operation applies across all organizations. Useful for multi-tenant environments where cross-org exports are required. + * @param exportMetadataTMLBatchedRequest + */ + exportMetadataTMLBatched(exportMetadataTMLBatchedRequest, _options) { + const requestContextPromise = this.requestFactory.exportMetadataTMLBatched(exportMetadataTMLBatchedRequest, _options); + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx) => middleware.pre(ctx))); + } + return middlewarePreObservable.pipe(mergeMap((ctx) => this.configuration.httpApi.send(ctx))).pipe(mergeMap((response) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp) => this.responseProcessor.exportMetadataTMLBatched(rsp))); + })); + } + /** + * Version: 9.0.0.cl or later Fetches data from a saved Answer. Requires at least view access to the saved Answer. The `record_size` attribute determines the number of records to retrieve in an API call. For more information about pagination, record size, and maximum row limit, see [Pagination and record size settings](https://developers.thoughtspot.com/docs/fetch-data-and-report-apis#_pagination_settings_for_data_and_report_apis). + * @param fetchAnswerDataRequest + */ + fetchAnswerData(fetchAnswerDataRequest, _options) { + const requestContextPromise = this.requestFactory.fetchAnswerData(fetchAnswerDataRequest, _options); + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx) => middleware.pre(ctx))); + } + return middlewarePreObservable.pipe(mergeMap((ctx) => this.configuration.httpApi.send(ctx))).pipe(mergeMap((response) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp) => this.responseProcessor.fetchAnswerData(rsp))); + })); + } + /** + * Version: 9.0.0.cl or later Fetches the underlying SQL query data for an Answer object. Requires at least view access to the Answer object. Upon successful execution, the API returns the SQL queries for the specified object as shown in this example: ``` { \"metadata_id\":\"8fbe44a8-46ad-4b16-8d39-184b2fada490\", \"metadata_name\":\"Total sales\", \"metadata_type\":\"ANSWER\", \"sql_queries\":[ { \"metadata_id\":\"8fbe44a8-46ad-4b16-8d39-184b2fada490\", \"metadata_name\":\"Total sales -test\", \"sql_query\":\"SELECT \\n \\\"ta_1\\\".\\\"REGION\\\" \\\"ca_1\\\", \\n \\\"ta_2\\\".\\\"PRODUCTNAME\\\" \\\"ca_2\\\", \\n \\\"ta_1\\\".\\\"STORENAME\\\" \\\"ca_3\\\", \\n CASE\\n WHEN sum(\\\"ta_3\\\".\\\"SALES\\\") IS NOT NULL THEN sum(\\\"ta_3\\\".\\\"SALES\\\")\\n ELSE 0\\n END \\\"ca_4\\\", \\n CASE\\n WHEN sum(\\\"ta_3\\\".\\\"QUANTITYPURCHASED\\\") IS NOT NULL THEN sum(\\\"ta_3\\\".\\\"QUANTITYPURCHASED\\\")\\n ELSE 0\\n END \\\"ca_5\\\"\\nFROM \\\"RETAILAPPAREL\\\".\\\"PUBLIC\\\".\\\"FACT_RETAPP_SALES\\\" \\\"ta_3\\\"\\n JOIN \\\"RETAILAPPAREL\\\".\\\"PUBLIC\\\".\\\"DIM_RETAPP_STORES\\\" \\\"ta_1\\\"\\n ON \\\"ta_3\\\".\\\"STOREID\\\" = \\\"ta_1\\\".\\\"STOREID\\\"\\n JOIN \\\"RETAILAPPAREL\\\".\\\"PUBLIC\\\".\\\"DIM_RETAPP_PRODUCTS\\\" \\\"ta_2\\\"\\n ON \\\"ta_3\\\".\\\"PRODUCTID\\\" = \\\"ta_2\\\".\\\"PRODUCTID\\\"\\nGROUP BY \\n \\\"ca_1\\\", \\n \\\"ca_2\\\", \\n \\\"ca_3\\\"\\n\" } ] } ``` + * @param fetchAnswerSqlQueryRequest + */ + fetchAnswerSqlQuery(fetchAnswerSqlQueryRequest, _options) { + const requestContextPromise = this.requestFactory.fetchAnswerSqlQuery(fetchAnswerSqlQueryRequest, _options); + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx) => middleware.pre(ctx))); + } + return middlewarePreObservable.pipe(mergeMap((ctx) => this.configuration.httpApi.send(ctx))).pipe(mergeMap((response) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp) => this.responseProcessor.fetchAnswerSqlQuery(rsp))); + })); + } + /** + * Version: 10.4.0.cl or later Gets information about the status of the TML async import task scheduled using the `/api/rest/2.0/metadata/tml/async/import` API call. To fetch the task details, specify the ID of the TML async import task. Requires access to the task ID. The API allows users who initiated the asynchronous TML import via `/api/rest/2.0/metadata/tml/async/import` to view the status of their tasks. Users with administration privilege can view the status of all import tasks initiated by the users in their Org. #### Usage guidelines See [TML API Documentation](https://developers.thoughtspot.com/docs/tml#_fetch_status_of_the_tml_import_task) for usage guidelines. + * @param fetchAsyncImportTaskStatusRequest + */ + fetchAsyncImportTaskStatus(fetchAsyncImportTaskStatusRequest, _options) { + const requestContextPromise = this.requestFactory.fetchAsyncImportTaskStatus(fetchAsyncImportTaskStatusRequest, _options); + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx) => middleware.pre(ctx))); + } + return middlewarePreObservable.pipe(mergeMap((ctx) => this.configuration.httpApi.send(ctx))).pipe(mergeMap((response) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp) => this.responseProcessor.fetchAsyncImportTaskStatus(rsp))); + })); + } + /** + * Version: 10.12.0.cl or later Fetches column security rules for specified tables. This API endpoint retrieves column-level security rules configured for tables. It returns information about which columns are secured and which groups have access to those columns. #### Usage guidelines - Provide an array of table identifiers using either `identifier` (GUID or name) or `obj_identifier` (object ID) - At least one of `identifier` or `obj_identifier` must be provided for each table - The API returns column security rules for all specified tables - Users must have appropriate permissions to access security rules for the specified tables #### Required permissions - `ADMINISTRATION` - Can administer ThoughtSpot - `DATAMANAGEMENT` - Can manage data - `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` - Can manage worksheet views and tables #### Example request ```json { \"tables\": [ { \"identifier\": \"table-guid\", \"obj_identifier\": \"table-object-id\" } ] } ``` #### Response format The API returns an array of `ColumnSecurityRuleResponse` objects wrapped in a `data` field. Each `ColumnSecurityRuleResponse` object contains: - Table information (GUID and object ID) - Array of column security rules with column details, group access, and source table information #### Example response ```json { \"data\": [ { \"guid\": \"table-guid\", \"objId\": \"table-object-id\", \"columnSecurityRules\": [ { \"column\": { \"id\": \"col_123\", \"name\": \"Salary\" }, \"groups\": [ { \"id\": \"group_1\", \"name\": \"HR Department\" } ], \"sourceTableDetails\": { \"id\": \"source-table-guid\", \"name\": \"Employee_Data\" } } ] } ] } ``` + * @param fetchColumnSecurityRulesRequest + */ + fetchColumnSecurityRules(fetchColumnSecurityRulesRequest, _options) { + const requestContextPromise = this.requestFactory.fetchColumnSecurityRules(fetchColumnSecurityRulesRequest, _options); + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx) => middleware.pre(ctx))); + } + return middlewarePreObservable.pipe(mergeMap((ctx) => this.configuration.httpApi.send(ctx))).pipe(mergeMap((response) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp) => this.responseProcessor.fetchColumnSecurityRules(rsp))); + })); + } + /** + * Version: 9.9.0.cl or later Validates the difference in connection metadata between CDW and ThoughtSpot. Requires `DATAMANAGEMENT` (**Can manage data**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the following Data control privileges may be required: - `CAN_MANAGE_CUSTOM_CALENDAR`(**Can manage custom calendars**) - `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) - `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` (**Can manage data models**) Returns a boolean indicating whether there is any difference between the connection metadata at ThoughtSpot and CDW. To get the connection metadata difference status, pass the connection GUID as `connection_identifier` in the API request. + * @param connectionIdentifier GUID of the connection + */ + fetchConnectionDiffStatus(connectionIdentifier, _options) { + const requestContextPromise = this.requestFactory.fetchConnectionDiffStatus(connectionIdentifier, _options); + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx) => middleware.pre(ctx))); + } + return middlewarePreObservable.pipe(mergeMap((ctx) => this.configuration.httpApi.send(ctx))).pipe(mergeMap((response) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp) => this.responseProcessor.fetchConnectionDiffStatus(rsp))); + })); + } + /** + * Version: 9.0.0.cl or later Gets data from a Liveboard object and its visualization. Requires at least view access to the Liveboard. #### Usage guidelines In the request body, specify the GUID or name of the Liveboard. To get data for specific visualizations, add the GUIDs or names of the visualizations in the API request. To include unsaved changes in the report, pass the `transient_pinboard_content` script generated from the `getExportRequestForCurrentPinboard` method in the Visual Embed SDK. Upon successful execution, the API returns the report with unsaved changes. If the new Liveboard experience mode, the transient content includes ad hoc changes to visualizations such as sorting, toggling of legends, and data drill down. For more information, and see [Liveboard data API](https://developers.thoughtspot.com/docs/fetch-data-and-report-apis#_fetch_liveboard_data_api). + * @param fetchLiveboardDataRequest + */ + fetchLiveboardData(fetchLiveboardDataRequest, _options) { + const requestContextPromise = this.requestFactory.fetchLiveboardData(fetchLiveboardDataRequest, _options); + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx) => middleware.pre(ctx))); + } + return middlewarePreObservable.pipe(mergeMap((ctx) => this.configuration.httpApi.send(ctx))).pipe(mergeMap((response) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp) => this.responseProcessor.fetchLiveboardData(rsp))); + })); + } + /** + * Version: 9.0.0.cl or later Fetches the underlying SQL query data for a Liveboard object and its visualizations. Requires at least view access to the Liveboard object. To get SQL query data for a Liveboard, specify the GUID of the Liveboard. Optionally, you can add an array of visualization GUIDs to retrieve the SQL query data for visualizations in the Liveboard. Upon successful execution, the API returns the SQL queries for the specified object as shown in this example: ``` { \"metadata_id\": \"fa68ae91-7588-4136-bacd-d71fb12dda69\", \"metadata_name\": \"Total Sales\", \"metadata_type\": \"LIVEBOARD\", \"sql_queries\": [ { \"metadata_id\": \"b3b6d2b9-089a-490c-8e16-b144650b7843\", \"metadata_name\": \"Total quantity purchased, Total sales by region\", \"sql_query\": \"SELECT \\n \\\"ta_1\\\".\\\"REGION\\\" \\\"ca_1\\\", \\n CASE\\n WHEN sum(\\\"ta_2\\\".\\\"QUANTITYPURCHASED\\\") IS NOT NULL THEN sum(\\\"ta_2\\\".\\\"QUANTITYPURCHASED\\\")\\n ELSE 0\\n END \\\"ca_2\\\", \\n CASE\\n WHEN sum(\\\"ta_2\\\".\\\"SALES\\\") IS NOT NULL THEN sum(\\\"ta_2\\\".\\\"SALES\\\")\\n ELSE 0\\n END \\\"ca_3\\\"\\nFROM \\\"RETAILAPPAREL\\\".\\\"PUBLIC\\\".\\\"FACT_RETAPP_SALES\\\" \\\"ta_2\\\"\\n JOIN \\\"RETAILAPPAREL\\\".\\\"PUBLIC\\\".\\\"DIM_RETAPP_STORES\\\" \\\"ta_1\\\"\\n ON \\\"ta_2\\\".\\\"STOREID\\\" = \\\"ta_1\\\".\\\"STOREID\\\"\\nGROUP BY \\\"ca_1\\\"\" } ] } ``` + * @param fetchLiveboardSqlQueryRequest + */ + fetchLiveboardSqlQuery(fetchLiveboardSqlQueryRequest, _options) { + const requestContextPromise = this.requestFactory.fetchLiveboardSqlQuery(fetchLiveboardSqlQueryRequest, _options); + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx) => middleware.pre(ctx))); + } + return middlewarePreObservable.pipe(mergeMap((ctx) => this.configuration.httpApi.send(ctx))).pipe(mergeMap((response) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp) => this.responseProcessor.fetchLiveboardSqlQuery(rsp))); + })); + } + /** + * Version: 9.0.0.cl or later Fetches security audit logs. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the [Admin Control](https://developers.thoughtspot.com/docs/rbac#_admin_control) privileges are required. #### Usage guidelines By default, the API retrieves logs for the last 24 hours. You can set a custom duration in EPOCH time. Make sure the log duration specified in your API request doesn’t exceed 24 hours. If you must fetch logs for a longer time range, modify the duration and make multiple sequential API requests. Upon successful execution, the API returns logs with the following information: * timestamp of the event * event ID * event type * name and GUID of the user * IP address of ThoughtSpot instance For more information see [Audit logs Documentation](https://developers.thoughtspot.com/docs/audit-logs). + * @param fetchLogsRequest + */ + fetchLogs(fetchLogsRequest, _options) { + const requestContextPromise = this.requestFactory.fetchLogs(fetchLogsRequest, _options); + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx) => middleware.pre(ctx))); + } + return middlewarePreObservable.pipe(mergeMap((ctx) => this.configuration.httpApi.send(ctx))).pipe(mergeMap((response) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp) => this.responseProcessor.fetchLogs(rsp))); + })); + } + /** + * Version: 26.3.0.cl or later This API fetches the object privileges present for the given list of principals (user or group), on the given set of objects. It supports pagination, which can be enabled and configured using the request parameters. It provides users access to certain features based on privilege based access control. #### Usage guidelines - Specify the `type` (`USER` or `USER_GROUP`) and `identifier` (either GUID or name) of the principals for which you want to retrieve object privilege information in the `principals` array. - Specify the `type` (`LOGICAL_TABLE`) and `identifier` (either GUID or name) of the metadata objects for which you want to retrieve object privilege information in the `metadata` array. Only `LOGICAL_TABLE` metadata type is supported for now. It may be extended for other metadata types in future. - To control the offset from where principals have to be fetched, use `record_offset`. When `record_offset` is 0, information is fetched from the beginning. - To control the number of principals to be fetched, use `record_size`. Default `record_size` is 20. - Ensure `record_offset` for a subsequent request is one more than the value of `record_size` of the previous request. - Ensure using correct Authorization Bearer Token corresponding to specific user & org. #### Example request ```json { \"principals\": [ { \"type\": \"type-1\", \"identifier\": \"principal-guid-or-name-1\" }, { \"type\": \"type-2\", \"identifier\": \"principal-guid-or-name-2\" } ], \"metadata\": [ { \"type\": \"metadata-type-1\", \"identifier\": \"metadata-guid-or-name-1\" }, { \"type\": \"metadata-type-2\", \"identifier\": \"metadata-guid-or-name-2\" } ], \"record_offset\": 0, \"record_size\": 20 } ``` #### Response format The API returns an array of `metadata_object_privileges` objects wrapped in JSON. Each `metadata_object_privileges` object contains: - Metadata information (GUID, name and type) - Array of `principal_object_privilege_info`. - Each `principal_object_privilege_info` contains: - Principal type. All principals of this type are listed as described below. - Array of `principal_object_privileges`. - Each `principal_object_privileges` contains: - Principal information (GUID, name, subtype) - List of applied object level privileges. #### Example response ```json { \"metadata_object_privileges\": [ { \"metadata_id\": \"metadata-guid-1\", \"metadata_name\": \"metadata-name-1\", \"metadata_type\": \"metadata-type-1\", \"principal_object_privilege_info\": [ { \"principal_type\": \"principal-type-1\", \"principal_object_privileges\": [ { \"principal_id\": \"principal-guid-1\", \"principal_name\": \"principal-name-1\", \"principal_sub_type\": \"principal-sub-type-1\", \"object_privileges\": \"[object-privilege-1, object-privilege-2]\" }, { \"principal_id\": \"principal-guid-2\", \"principal_name\": \"principal-name-2\", \"principal_sub_type\": \"principal-sub-type-2\", \"object_privileges\": \"[object-privilege-1, object-privilege-2]\" } ] }, { \"principal_type\": \"principal-type-2\", \"principal_object_privileges\": [ { \"principal_id\": \"principal-guid-3\", \"principal_name\": \"principal-guid-4\", \"principal_sub_type\": \"principal-sub-type-4\", \"object_privileges\": \"[object-privilege-1]\" } ] } ] }, { \"metadata_id\": \"metadata-guid-2\", \"metadata_name\": \"metadata-name-2\", \"metadata_type\": \"metadata-type-2\", \"principal_object_privilege_info\": [ { \"principal_type\": \"principal-type-1\", \"principal_object_privileges\": [ { \"principal_id\": \"principal-guid-1\", \"principal_name\": \"principal-name-1\", \"principal_sub_type\": \"principal-sub-type-1\", \"object_privileges\": \"[object-privilege-3, object-privilege-4]\" }, { \"principal_id\": \"principal-guid-2\", \"principal_name\": \"principal-name-2\", \"principal_sub_type\": \"principal-sub-type-2\", \"object_privileges\": \"[object-privilege-4]\" } ] } ] } ] } ``` + * @param fetchObjectPrivilegesRequest + */ + fetchObjectPrivileges(fetchObjectPrivilegesRequest, _options) { + const requestContextPromise = this.requestFactory.fetchObjectPrivileges(fetchObjectPrivilegesRequest, _options); + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx) => middleware.pre(ctx))); + } + return middlewarePreObservable.pipe(mergeMap((ctx) => this.configuration.httpApi.send(ctx))).pipe(mergeMap((response) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp) => this.responseProcessor.fetchObjectPrivileges(rsp))); + })); + } + /** + * Version: 9.0.0.cl or later Fetches object permission details for a given principal object such as a user and group. Requires view access to the metadata object. #### Usage guidelines * To get a list of all metadata objects that a user or group can access, specify the `type` and GUID or name of the principal. * To get permission details for a specific object, add the `type` and GUID or name of the metadata object to your API request. Upon successful execution, the API returns a list of metadata objects and permission details for each object. + * @param fetchPermissionsOfPrincipalsRequest + */ + fetchPermissionsOfPrincipals(fetchPermissionsOfPrincipalsRequest, _options) { + const requestContextPromise = this.requestFactory.fetchPermissionsOfPrincipals(fetchPermissionsOfPrincipalsRequest, _options); + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx) => middleware.pre(ctx))); + } + return middlewarePreObservable.pipe(mergeMap((ctx) => this.configuration.httpApi.send(ctx))).pipe(mergeMap((response) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp) => this.responseProcessor.fetchPermissionsOfPrincipals(rsp))); + })); + } + /** + * Version: 9.0.0.cl or later Fetches permission details for a given metadata object. Requires view access to the metadata object. #### Usage guidelines * To fetch a list of users and groups for a metadata object, specify `type` and GUID or name of the metadata object. * To get permission details for a specific user or group, add `type` and GUID or name of the principal object to your API request. Upon successful execution, the API returns permission details and principal information for the object specified in the API request. + * @param fetchPermissionsOnMetadataRequest + */ + fetchPermissionsOnMetadata(fetchPermissionsOnMetadataRequest, _options) { + const requestContextPromise = this.requestFactory.fetchPermissionsOnMetadata(fetchPermissionsOnMetadataRequest, _options); + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx) => middleware.pre(ctx))); + } + return middlewarePreObservable.pipe(mergeMap((ctx) => this.configuration.httpApi.send(ctx))).pipe(mergeMap((response) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp) => this.responseProcessor.fetchPermissionsOnMetadata(rsp))); + })); + } + /** + * Version: 9.0.0.cl or later Enforces logout on current user sessions. Use this API with caution as it may invalidate active user sessions and force users to re-login. Make sure you specify the usernames or GUIDs. If you pass null values in the API call, all user sessions on your cluster become invalid, and the users are forced to re-login. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `USER_ADMINISTRATION` (**Can manage users**) privilege is required. + * @param forceLogoutUsersRequest + */ + forceLogoutUsers(forceLogoutUsersRequest, _options) { + const requestContextPromise = this.requestFactory.forceLogoutUsers(forceLogoutUsersRequest, _options); + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx) => middleware.pre(ctx))); + } + return middlewarePreObservable.pipe(mergeMap((ctx) => this.configuration.httpApi.send(ctx))).pipe(mergeMap((response) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp) => this.responseProcessor.forceLogoutUsers(rsp))); + })); + } + /** + * Version: 10.12.0.cl or later Exports a [custom calendar](https://docs.thoughtspot.com/cloud/latest/connections-cust-cal) in the CSV format. Requires `DATAMANAGEMENT` (**Can manage data**) or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your ThoughtSpot instance, the `CAN_MANAGE_CUSTOM_CALENDAR` (**Can manage custom calendars**) privilege is required. #### Usage guidelines Use this API to download a custom calendar in the CSV file format. In your API request, specify the following parameters. * Start and end date of the calendar. For \"month offset\" calendars, the start date must match the month defined in the `month_offset` attribute. You can also specify optional parameters such as the starting day of the week and prefixes for the quarter and year labels. + * @param generateCSVRequest + */ + generateCSV(generateCSVRequest, _options) { + const requestContextPromise = this.requestFactory.generateCSV(generateCSVRequest, _options); + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx) => middleware.pre(ctx))); + } + return middlewarePreObservable.pipe(mergeMap((ctx) => this.configuration.httpApi.send(ctx))).pipe(mergeMap((response) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp) => this.responseProcessor.generateCSV(rsp))); + })); + } + /** + * Version: 9.0.0.cl or later Retrieves details of the current user session for the token provided in the request header. Any ThoughtSpot user can access this endpoint and send an API request. The data returned in the API response varies according to user\'s privilege and object access permissions. **NOTE**: In ThoughtSpot, users with cluster administration privileges can access all Orgs by default. However, unless the administrator is explicitly added to an Org, the Orgs list in the session information returned by the API will include only the Primary Org. To include other Orgs in the API response, you must explicitly add the administrator to each Org in the Admin settings page in the UI or via user REST API. + */ + getCurrentUserInfo(_options) { + const requestContextPromise = this.requestFactory.getCurrentUserInfo(_options); + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx) => middleware.pre(ctx))); + } + return middlewarePreObservable.pipe(mergeMap((ctx) => this.configuration.httpApi.send(ctx))).pipe(mergeMap((response) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp) => this.responseProcessor.getCurrentUserInfo(rsp))); + })); + } + /** + * Version: 9.4.0.cl or later Retrieves details of the current session token for the bearer token provided in the request header. This API endpoint does not create a new token. Instead, it returns details about the token, including the token string, creation time, expiration time, and the associated user. Use this endpoint to introspect your current session token, debug authentication issues, or when a frontend application needs session token details. Any ThoughtSpot user with a valid bearer token can access this endpoint and send an API request + */ + getCurrentUserToken(_options) { + const requestContextPromise = this.requestFactory.getCurrentUserToken(_options); + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx) => middleware.pre(ctx))); + } + return middlewarePreObservable.pipe(mergeMap((ctx) => this.configuration.httpApi.send(ctx))).pipe(mergeMap((response) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp) => this.responseProcessor.getCurrentUserToken(rsp))); + })); + } + /** + * Version: 10.4.0.cl or later Creates an authentication token that provides values for the formula variables in the Row Level Security (RLS) rules for a given user. Recommended for use cases that require Attribute-based access control (ABAC) via RLS. #### Required privileges To add a new user and assign privileges during auto-creation, the `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege is required. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled, the `CONTROL_TRUSTED_AUTH` (**Can Enable or Disable Trusted Authentication**) privilege and edit access to the data source are required. To configure formula variables for all Orgs on your instance or the Primary Org, cluster administration privileges are required. Org administrators can configure formula variables for their respective Orgs. If Role-Based Access Control (RBAC) is enabled, users with the `CAN_MANAGE_VARIABLES` (**Can manage variables**) role privilege can also create and manage variables for their Org context. #### Usage guidelines You can generate a token by providing a `username` and `password`, or by using a `secret_key`. To generate a `secret_key`, the administrator must enable [Trusted authentication](https://developers.thoughtspot.com/docs/trusted-auth-secret-key) in the **Develop** > **Customizations** > **Security Settings** page. **Note**: * When both `password` and `secret_key` are included in the API request, `password` takes precedence. * If [Multi-Factor Authentication (MFA)](https://docs.thoughtspot.com/cloud/latest/authentication-local-mfa) is enabled on your instance, the API login request with `username` and `password` returns an error. You can switch to token-based authentication with `secret_key` or contact ThoughtSpot Support for assistance. The token obtained from ThoughtSpot is valid for 5 minutes by default. You can configure the token expiration time as required. #### ABAC via RLS To implement ABAC via RLS and assign security entitlements to users during session creation, generate a token with custom variable values. The values set in the authentication token are applied to the formula variables referenced in RLS rules at the table level, which determines the data each user can access based on their entitlements. The variable values can be configured to persist for a specific set of Models in user sessions initiated with the token, allowing different RLS rules to be set for different data models. Once defined, the rules are added to the user\'s `variable_values` object, after which all sessions will use the persisted values. For more information, see [ABAC via tokens Documentation](https://developers.thoughtspot.com/docs/abac-via-rls-variables). ##### Formula variables Before defining variable values, ensure the variables are created and available on your instance. To create a formula variable, you can use the **Create variable** (`/api/rest/2.0/template/variables/create`) REST API endpoint, with the variable `type` set as `Formula_Variable` in the API request. The API doesn\'t support `\"persist_option\": \"RESET\"` and `\"persist_option\": \"NONE\"` when `variable_values` are defined in the request. If you are using `variable_values` for token generation, you must use other supported persist options such as `APPEND` or `REPLACE`. If you want to use `RESET` or `NONE`, do not pass any `variable_values`. In such cases, `variable_values` will remain unaffected. #### Supported objects The supported object type is `LOGICAL_TABLE`. When using `object_id` with `variable_values`, models are supported. #### Just-in-time provisioning For [just-in-time user creation and provisioning](https://developers.thoughtspot.com/docs/just-in-time-provisioning), specify the following attributes in the API request: * `auto_create` * `username` * `display_name` * `email` * `groups` Set `auto_create` to `true` if the username does not exist in ThoughtSpot. If the username already exists in ThoughtSpot and `auto_create` is set to `true`, user properties such as display name, email, Org and group entitlements will not be updated with new values. Setting `auto_create` to `true` does not create formula variables. Hence, this setting will not be applicable to `variable_values`. #### Important point to note All options in the token creation APIs that define user access to data in ThoughtSpot will take effect during token creation, not when the token is used for authentication. For example, `auto_create:true` will create the user when the authentication token is created. Persist options such as `APPEND` and `REPLACE` will persist `variable_values` on the user profile when the token is created. + * @param getCustomAccessTokenRequest + */ + getCustomAccessToken(getCustomAccessTokenRequest, _options) { + const requestContextPromise = this.requestFactory.getCustomAccessToken(getCustomAccessTokenRequest, _options); + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx) => middleware.pre(ctx))); + } + return middlewarePreObservable.pipe(mergeMap((ctx) => this.configuration.httpApi.send(ctx))).pipe(mergeMap((response) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp) => this.responseProcessor.getCustomAccessToken(rsp))); + })); + } + /** + * Version: 10.15.0.cl or later Suggests the most relevant data sources for a given natural language query, ranked by confidence with LLM-generated reasoning. Requires `CAN_USE_SPOTTER` privilege and at least view-level access to the underlying metadata entities referenced in the response. #### Usage guidelines The request must include: - `query`: the natural language question to find relevant data sources for If the request is successful, the API returns a ranked list of suggested data sources, each containing: - `confidence`: a float score indicating the model\'s confidence in the relevance of the suggestion - `details`: metadata about the data source - `data_source_identifier`: the unique ID of the data source - `data_source_name`: the display name of the data source - `description`: a description of the data source - `reasoning`: LLM-generated rationale explaining why the data source was recommended #### Error responses | Code | Description | |------|--------------------------------------------------------------------------------------------------------------------------------------------| | 401 | Unauthorized — authentication token is missing, expired, or invalid. | | 403 | Forbidden — the authenticated user does not have `CAN_USE_SPOTTER` privilege or lacks view permission on the underlying metadata entities. | > ###### Note: > * This endpoint is currently in Beta. Breaking changes may be introduced before it is made Generally Available. > * This endpoint requires Spotter — please contact ThoughtSpot Support to enable Spotter on your cluster. + * @param getDataSourceSuggestionsRequest + */ + getDataSourceSuggestions(getDataSourceSuggestionsRequest, _options) { + const requestContextPromise = this.requestFactory.getDataSourceSuggestions(getDataSourceSuggestionsRequest, _options); + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx) => middleware.pre(ctx))); + } + return middlewarePreObservable.pipe(mergeMap((ctx) => this.configuration.httpApi.send(ctx))).pipe(mergeMap((response) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp) => this.responseProcessor.getDataSourceSuggestions(rsp))); + })); + } + /** + * Version: 9.0.0.cl or later Generates an authentication token for creating a full session in ThoughtSpot for a given user. Recommended for use cases that do not require Attribute-based access control (ABAC) via Row Level Security (RLS). #### Usage guidelines You can generate a token for a user by providing a `username` and `password`, or by using the `secret_key` generated for your instance. To generate a `secret_key`, the administrator must enable [Trusted authentication](https://developers.thoughtspot.com/docs/trusted-auth-secret-key) in the **Develop** > **Customizations** > **Security Settings** page. **Note**: * When both `password` and `secret_key` are included in the API request, `password` takes precedence. * If [Multi-Factor Authentication (MFA)](https://docs.thoughtspot.com/cloud/latest/authentication-local-mfa) is enabled on your instance, the API login request with `username` and `password` returns an error. You can switch to token-based authentication with `secret_key` or contact ThoughtSpot Support for assistance. The token obtained from ThoughtSpot is valid for 5 minutes by default. You can configure the token expiration time as required. #### Just-in-time provisioning For [just-in-time user creation and provisioning](https://developers.thoughtspot.com/docs/just-in-time-provisioning), specify the following attributes in the API request: * `auto_create` * `username` * `display_name` * `email` * `group_identifiers` Set `auto_create` to `true` if the username does not exist in ThoughtSpot. If the user already exists in ThoughtSpot and `auto_create` is set to `true`, user properties such as display name, email and group assignment will be updated. To add a new user and assign privileges during auto-creation, the `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege is required. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled, the `CONTROL_TRUSTED_AUTH` (**Can Enable or Disable Trusted Authentication**) privilege is required. #### Important point to note All options in the token creation APIs that define user access to data in ThoughtSpot will take effect during token creation, not when the token is used for authentication. For example, `auto_create:true` will create the user when the authentication token is created. + * @param getFullAccessTokenRequest + */ + getFullAccessToken(getFullAccessTokenRequest, _options) { + const requestContextPromise = this.requestFactory.getFullAccessToken(getFullAccessTokenRequest, _options); + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx) => middleware.pre(ctx))); + } + return middlewarePreObservable.pipe(mergeMap((ctx) => this.configuration.httpApi.send(ctx))).pipe(mergeMap((response) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp) => this.responseProcessor.getFullAccessToken(rsp))); + })); + } + /** + * Version: 10.15.0.cl or later Retrieves existing natural language (NL) instructions configured for a specific data model. These instructions guide the AI system in understanding data context and generating more accurate responses. Requires `CAN_USE_SPOTTER` privilege, at least view access on the data model, and a bearer token corresponding to the org where the data model exists. #### Usage guidelines The request must include: - `data_source_identifier`: the unique ID of the data model to retrieve instructions for If the request is successful, the API returns: - `nl_instructions_info`: an array of instruction objects, each containing: - `instructions`: the configured text instructions for AI processing - `scope`: the scope of the instruction — currently only `GLOBAL` is supported #### Instructions scope - **GLOBAL**: Instructions that apply globally across the system on the given data-model (currently only global instructions are supported) #### Error responses | Code | Description | |------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| | 401 | Unauthorized — authentication token is missing, expired, or invalid. | | 403 | Forbidden — the authenticated user does not have `CAN_USE_SPOTTER` privilege, lacks view access on the data model, or the bearer token does not correspond to the org where the data model exists. | > ###### Note: > > - To use this API, the user needs at least view access on the data model, and must use the bearer token corresponding to the org where the data model exists. > - This endpoint is currently in Beta. Breaking changes may be introduced before the endpoint is made Generally Available. > - Available from version 10.15.0.cl and later. > - This endpoint requires Spotter — please contact ThoughtSpot Support to enable Spotter on your cluster. > - Use this API to review currently configured instructions before modifying them with `setNLInstructions`. + * @param getNLInstructionsRequest + */ + getNLInstructions(getNLInstructionsRequest, _options) { + const requestContextPromise = this.requestFactory.getNLInstructions(getNLInstructionsRequest, _options); + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx) => middleware.pre(ctx))); + } + return middlewarePreObservable.pipe(mergeMap((ctx) => this.configuration.httpApi.send(ctx))).pipe(mergeMap((response) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp) => this.responseProcessor.getNLInstructions(rsp))); + })); + } + /** + * Version: 9.0.0.cl or later Generates an authentication token that provides access to a specific metadata object. This object list is intersected with the list of objects the user is allowed to access via group membership. For more information, see [Object security](https://docs.thoughtspot.com/cloud/latest/security-data-object#object_security). #### Usage guidelines You can generate a token for a user by providing a `username` and `password`, or by using the `secret_key` generated for your instance. To generate a `secret_key`, the administrator must enable [Trusted authentication](https://developers.thoughtspot.com/docs/trusted-auth-secret-key) in the **Develop** > **Customizations** > **Security Settings** page. **Note**: * When both `password` and `secret_key` are included in the API request, `password` takes precedence. * If [Multi-Factor Authentication (MFA)](https://docs.thoughtspot.com/cloud/latest/authentication-local-mfa) is enabled on your instance, the API login request with `username` and `password` returns an error. You can switch to token-based authentication with `secret_key` or contact ThoughtSpot Support for assistance. The token obtained from ThoughtSpot is valid for 5 minutes by default. You can configure the token expiration time as required. #### Just-in-time provisioning For [just-in-time user creation and provisioning](https://developers.thoughtspot.com/docs/just-in-time-provisioning), specify the following attributes in the API request: * `auto_create` * `username` * `display_name` * `email` * `group_identifiers` Set `auto_create` to `true` if the user is not available in ThoughtSpot. If the user already exists in ThoughtSpot and the `auto_create` parameter is set to `true`, user properties such as display name, email, and group assignment will be updated. To add a new user and assign privileges, the `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege is required. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled, the `CONTROL_TRUSTED_AUTH`(**Can Enable or Disable Trusted Authentication**) privilege is required. #### Important point to note All options in the token creation APIs that define user access to data in ThoughtSpot will take effect during token creation, not when the token is used for authentication. For example, `auto_create:true` will create the user when the authentication token is created. + * @param getObjectAccessTokenRequest + */ + getObjectAccessToken(getObjectAccessTokenRequest, _options) { + const requestContextPromise = this.requestFactory.getObjectAccessToken(getObjectAccessTokenRequest, _options); + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx) => middleware.pre(ctx))); + } + return middlewarePreObservable.pipe(mergeMap((ctx) => this.configuration.httpApi.send(ctx))).pipe(mergeMap((response) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp) => this.responseProcessor.getObjectAccessToken(rsp))); + })); + } + /** + * Version: 10.13.0.cl or later Breaks down a natural language query into a series of smaller analytical sub-questions, each mapped to a relevant data source. Requires `CAN_USE_SPOTTER` privilege and at least view-level access to the referenced metadata objects. #### Usage guidelines The request must include: - `query`: the natural language question to decompose into analytical sub-questions - `metadata_context`: at least one of the following context identifiers to guide question generation: - `conversation_identifier` — an existing conversation session ID - `answer_identifiers` — a list of Answer GUIDs - `liveboard_identifiers` — a list of Liveboard GUIDs - `data_source_identifiers` — a list of data source GUIDs Optional parameters for refining the output: - `ai_context`: additional context to improve response quality - `content` — supplementary text or CSV data as string input - `instructions` — custom text instructions for the AI system - `limit_relevant_questions`: maximum number of questions to return (default: `5`) - `bypass_cache`: if `true`, forces fresh computation instead of returning cached results If the request is successful, the API returns a list of relevant analytical questions, each containing: - `query`: the generated sub-question - `data_source_identifier`: the unique ID of the data source the question targets - `data_source_name`: the display name of the corresponding data source #### Error responses | Code | Description | |------|---------------------------------------------------------------------------------------------------------------------------------------| | 401 | Unauthorized — authentication token is missing, expired, or invalid. | | 403 | Forbidden — the authenticated user does not have `CAN_USE_SPOTTER` privilege or lacks view access to the referenced metadata objects. | > ###### Note: > * This endpoint is currently in Beta. Breaking changes may be introduced before the endpoint is made Generally Available. > * This endpoint requires Spotter - please contact ThoughtSpot support to enable Spotter on your cluster. + * @param getRelevantQuestionsRequest + */ + getRelevantQuestions(getRelevantQuestionsRequest, _options) { + const requestContextPromise = this.requestFactory.getRelevantQuestions(getRelevantQuestionsRequest, _options); + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx) => middleware.pre(ctx))); + } + return middlewarePreObservable.pipe(mergeMap((ctx) => this.configuration.httpApi.send(ctx))).pipe(mergeMap((response) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp) => this.responseProcessor.getRelevantQuestions(rsp))); + })); + } + /** + * Version: 9.0.0.cl or later Retrieves the current configuration details of the cluster. If the request is successful, the API returns a list configuration settings applied on the cluster. Requires `ADMINISTRATION`(**Can administer ThoughtSpot**) privilege to view these complete configuration settings of the cluster. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `SYSTEM_INFO_ADMINISTRATION` (**Can view system activities**) privilege is required. This API does not require any parameters to be passed in the request. + */ + getSystemConfig(_options) { + const requestContextPromise = this.requestFactory.getSystemConfig(_options); + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx) => middleware.pre(ctx))); + } + return middlewarePreObservable.pipe(mergeMap((ctx) => this.configuration.httpApi.send(ctx))).pipe(mergeMap((response) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp) => this.responseProcessor.getSystemConfig(rsp))); + })); + } + /** + * Version: 9.0.0.cl or later Gets system information such as the release version, locale, time zone, deployment environment, date format, and date time format of the cluster. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privileges. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `SYSTEM_INFO_ADMINISTRATION` (**Can view system activities**) privilege is required. This API does not require any parameters to be passed in the request. + */ + getSystemInformation(_options) { + const requestContextPromise = this.requestFactory.getSystemInformation(_options); + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx) => middleware.pre(ctx))); + } + return middlewarePreObservable.pipe(mergeMap((ctx) => this.configuration.httpApi.send(ctx))).pipe(mergeMap((response) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp) => this.responseProcessor.getSystemInformation(rsp))); + })); + } + /** + * Version: 9.2.0.cl or later Gets a list of configuration overrides applied on the cluster. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `APPLICATION_ADMINISTRATION` (**Can manage application settings**) privilege is required. This API does not require any parameters to be passed in the request. + */ + getSystemOverrideInfo(_options) { + const requestContextPromise = this.requestFactory.getSystemOverrideInfo(_options); + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx) => middleware.pre(ctx))); + } + return middlewarePreObservable.pipe(mergeMap((ctx) => this.configuration.httpApi.send(ctx))).pipe(mergeMap((response) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp) => this.responseProcessor.getSystemOverrideInfo(rsp))); + })); + } + /** + * Version: 9.0.0.cl or later Imports [TML](https://docs.thoughtspot.com/cloud/latest/tml) files into ThoughtSpot. Requires `DATAMANAGEMENT` (**Can manage data**) or `ADMINISTRATION` (**Can administer ThoughtsSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the following Data control privileges may be required: - `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) - `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` (**Can manage data models**) #### Usage guidelines * Import all related objects in a single TML Import API call. For example, Tables that use the same Connection object and Worksheets connected to these Tables. * Include the `fqn` property to distinguish objects that have the same name. For example, if you have multiple Connections or Worksheets with the same name on ThoughtSpot and the Connection or Worksheet referenced in your TML file does not have a unique name to distinguish, it may result in invalid object references. Adding `fqn` helps ThoughtSpot differentiate a Table from another with the same name. We recommend [exporting TML with FQNs](#/http/api-endpoints/metadata/export-metadata-tml) and using these during the import operation. * You can upload multiple TML files at a time. If you import a Worksheet along with Liveboards, Answers, and other dependent objects in a single API call, the imported objects will be immediately available for use. When you import only a Worksheet object, it may take some time for the Worksheet to become available in the ThoughtSpot system. Please wait for a few minutes, and then proceed to create an Answer and Liveboard from the newly imported Worksheet. For more information, see [TML Documentation](https://developers.thoughtspot.com/docs/tml#_import_a_tml). + * @param importMetadataTMLRequest + */ + importMetadataTML(importMetadataTMLRequest, _options) { + const requestContextPromise = this.requestFactory.importMetadataTML(importMetadataTMLRequest, _options); + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx) => middleware.pre(ctx))); + } + return middlewarePreObservable.pipe(mergeMap((ctx) => this.configuration.httpApi.send(ctx))).pipe(mergeMap((response) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp) => this.responseProcessor.importMetadataTML(rsp))); + })); + } + /** + * Version: 10.4.0.cl or later Schedules a task to import [TML](https://docs.thoughtspot.com/cloud/latest/tml) files into ThoughtSpot. You can use this API endpoint to process TML objects asynchronously when importing TMLs of large and complex metadata objects into ThoughtSpot. Unlike the synchronous import TML operation, the API processes TML data in the background and returns a task ID, which can be used to check the status of the import task via `/api/rest/2.0/metadata/tml/async/status` API endpoint. Requires `DATAMANAGEMENT` (**Can manage data**) or `ADMINISTRATION` (**Can administer ThoughtsSpot**) privilege, and edit access to the TML objects. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the following Data control privileges may be required: - `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) - `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` (**Can manage data models**) #### Usage guidelines See [Async TML API Documentation](https://developers.thoughtspot.com/docs/tml#_import_tml_objects_asynchronously) for usage guidelines. + * @param importMetadataTMLAsyncRequest + */ + importMetadataTMLAsync(importMetadataTMLAsyncRequest, _options) { + const requestContextPromise = this.requestFactory.importMetadataTMLAsync(importMetadataTMLAsyncRequest, _options); + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx) => middleware.pre(ctx))); + } + return middlewarePreObservable.pipe(mergeMap((ctx) => this.configuration.httpApi.send(ctx))).pipe(mergeMap((response) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp) => this.responseProcessor.importMetadataTMLAsync(rsp))); + })); + } + /** + * Version: 9.0.0.cl or later Imports group objects from external databases into ThoughtSpot. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `GROUP_ADMINISTRATION` (**Can manage groups**) privilege is required. During the import operation: * If the specified group is not available in ThoughtSpot, it will be added to ThoughtSpot. * If `delete_unspecified_groups` is set to `true`, the groups not specified in the API request, excluding administrator and system user groups, are deleted. * If the specified groups are already available in ThoughtSpot, the object properties of these groups are modified and synchronized as per the input data in the API request. A successful API call returns the object that represents the changes made in the ThoughtSpot system. + * @param importUserGroupsRequest + */ + importUserGroups(importUserGroupsRequest, _options) { + const requestContextPromise = this.requestFactory.importUserGroups(importUserGroupsRequest, _options); + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx) => middleware.pre(ctx))); + } + return middlewarePreObservable.pipe(mergeMap((ctx) => this.configuration.httpApi.send(ctx))).pipe(mergeMap((response) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp) => this.responseProcessor.importUserGroups(rsp))); + })); + } + /** + * Version: 9.0.0.cl or later Imports user data from external databases into ThoughtSpot. During the user import operation: * If the specified users are not available in ThoughtSpot, the users are created and assigned a default password. Defining a `default_password` in the API request is optional. * If `delete_unspecified_users` is set to `true`, the users not specified in the API request, excluding the `tsadmin`, `guest`, `system` and `su` users, are deleted. * If the specified user objects are already available in ThoughtSpot, the object properties are updated and synchronized as per the input data in the API request. A successful API call returns the object that represents the changes made in the ThoughtSpot system. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `USER_ADMINISTRATION` (**Can manage users**) privilege is required. + * @param importUsersRequest + */ + importUsers(importUsersRequest, _options) { + const requestContextPromise = this.requestFactory.importUsers(importUsersRequest, _options); + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx) => middleware.pre(ctx))); + } + return middlewarePreObservable.pipe(mergeMap((ctx) => this.configuration.httpApi.send(ctx))).pipe(mergeMap((response) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp) => this.responseProcessor.importUsers(rsp))); + })); + } + /** + * Version: 9.0.0.cl or later Creates a login session for a ThoughtSpot user with Basic authentication. In Basic authentication method, REST clients log in to ThoughtSpot using `username` and `password` attributes. On a multi-tenant cluster with Orgs, users can pass the ID of the Org in the API request to log in to a specific Org context. **Note**: If Multi-Factor Authentication (MFA) is enabled on your instance, the API login request with basic authentication (`username` and `password` ) returns an error. Contact ThoughtSpot Support for assistance. A successful login returns a session cookie that can be used in your subsequent API requests. + * @param loginRequest + */ + login(loginRequest, _options) { + const requestContextPromise = this.requestFactory.login(loginRequest, _options); + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx) => middleware.pre(ctx))); + } + return middlewarePreObservable.pipe(mergeMap((ctx) => this.configuration.httpApi.send(ctx))).pipe(mergeMap((response) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp) => this.responseProcessor.login(rsp))); + })); + } + /** + * Version: 9.0.0.cl or later Logs out a user from their current session. + */ + logout(_options) { + const requestContextPromise = this.requestFactory.logout(_options); + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx) => middleware.pre(ctx))); + } + return middlewarePreObservable.pipe(mergeMap((ctx) => this.configuration.httpApi.send(ctx))).pipe(mergeMap((response) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp) => this.responseProcessor.logout(rsp))); + })); + } + /** + * Version: 26.3.0.cl or later This API allows the addition or deletion of object level privileges for a set of users and groups, on a set of metadata objects. It provides users to access certain features based on privilege based access control. #### Usage guidelines - Specify the `operation`. The supported operations are: `ADD`, `REMOVE`. - Specify the type of the objects on which the object privileges are being provided in `metadata_type`. Only `LOGICAL_TABLE` metadata type is supported for now. It may be extended for other metadata types in future. - Specify the list of object privilege types in the `object_privilege_types` array. The supported object privilege types are: `SPOTTER_COACHING_PRIVILEGE`. - Specify the identifiers (either GUID or name) for the metadata objects in the `metadata_identifiers` array. - Specify the `type` (`USER` or `USER_GROUP`) and `identifier` (either GUID or name) of the principals to which you want to apply the given operation and given object privileges in the `principals` array. - Ensure using correct Authorization Bearer Token corresponding to specific user & org. #### Example request ```json { \"operation\": \"operation-type\", \"metadata_type\": \"metadata-type\", \"object_privilege_types\": [\"privilege-type-1\", \"privilege-type-2\"], \"metadata_identifiers\": [\"metadata-guid-or-name-1\", \"metadata-guid-or-name-1\"], \"principals\": [ { \"type\": \"type-1\", \"identifier\": \"principal-guid-or-name-1\" }, { \"type\": \"type-2\", \"identifier\": \"principal-guid-or-name-2\" } ] } ``` > ###### Note: > * Only admin users, users with edit access and users with coaching privilege on a given data-model can add or remove principals related to SPOTTER_COACHING_PRIVILEGE + * @param manageObjectPrivilegeRequest + */ + manageObjectPrivilege(manageObjectPrivilegeRequest, _options) { + const requestContextPromise = this.requestFactory.manageObjectPrivilege(manageObjectPrivilegeRequest, _options); + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx) => middleware.pre(ctx))); + } + return middlewarePreObservable.pipe(mergeMap((ctx) => this.configuration.httpApi.send(ctx))).pipe(mergeMap((response) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp) => this.responseProcessor.manageObjectPrivilege(rsp))); + })); + } + /** + * Parameterize fields in metadata objects. Version: 10.9.0.cl or later **Note:** This API endpoint is deprecated and will be removed from ThoughtSpot in a future release. Use [POST /api/rest/2.0/metadata/parameterize-fields](/api/rest/2.0/metadata/parameterize-fields) instead. Allows parameterizing fields in metadata objects in ThoughtSpot. Requires appropriate permissions to modify the metadata object. The API endpoint allows parameterizing the following types of metadata objects: * Logical Tables * Connections * Connection Configs For a Logical Table the field type must be `ATTRIBUTE` and field name can be one of: * databaseName * schemaName * tableName For a Connection or Connection Config, the field type is always `CONNECTION_PROPERTY`. In this case, field_name specifies the exact property of the Connection or Connection Config that needs to be parameterized. For Connection Config, the only supported field name is: * impersonate_user + * @param parameterizeMetadataRequest + */ + parameterizeMetadata(parameterizeMetadataRequest, _options) { + const requestContextPromise = this.requestFactory.parameterizeMetadata(parameterizeMetadataRequest, _options); + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx) => middleware.pre(ctx))); + } + return middlewarePreObservable.pipe(mergeMap((ctx) => this.configuration.httpApi.send(ctx))).pipe(mergeMap((response) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp) => this.responseProcessor.parameterizeMetadata(rsp))); + })); + } + /** + * Parameterize multiple fields of metadata objects. For example [schemaName, databaseName] for LOGICAL_TABLE. Version: 26.5.0.cl or later Allows parameterizing multiple fields of metadata objects in ThoughtSpot. For example, you can parameterize [schemaName, databaseName] for LOGICAL_TABLE. Requires appropriate permissions to modify the metadata object. The API endpoint allows parameterizing the following types of metadata objects: * Logical Tables * Connections * Connection Configs For a Logical Table, the field type must be `ATTRIBUTE` and field names can include: * databaseName * schemaName * tableName For a Connection or Connection Config, the field type is always `CONNECTION_PROPERTY`. In this case, field_names specifies the exact properties of the Connection or Connection Config that need to be parameterized. For Connection Config, supported field names include: * impersonate_user You can parameterize multiple fields at once by providing an array of field names. + * @param parameterizeMetadataFieldsRequest + */ + parameterizeMetadataFields(parameterizeMetadataFieldsRequest, _options) { + const requestContextPromise = this.requestFactory.parameterizeMetadataFields(parameterizeMetadataFieldsRequest, _options); + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx) => middleware.pre(ctx))); + } + return middlewarePreObservable.pipe(mergeMap((ctx) => this.configuration.httpApi.send(ctx))).pipe(mergeMap((response) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp) => this.responseProcessor.parameterizeMetadataFields(rsp))); + })); + } + /** + * Version: 26.5.0.cl or later Allows publishing metadata objects across organizations in ThoughtSpot. Requires ADMINISTRATION role and TENANT scope. The API endpoint allows publishing the following types of metadata objects: * Liveboards * Answers * Logical Tables This API will essentially share the objects along with it\'s dependencies to the org admins of the orgs to which it is being published. + * @param publishMetadataRequest + */ + publishMetadata(publishMetadataRequest, _options) { + const requestContextPromise = this.requestFactory.publishMetadata(publishMetadataRequest, _options); + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx) => middleware.pre(ctx))); + } + return middlewarePreObservable.pipe(mergeMap((ctx) => this.configuration.httpApi.send(ctx))).pipe(mergeMap((response) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp) => this.responseProcessor.publishMetadata(rsp))); + })); + } + /** + * Update values for a variable Version: 26.4.0.cl or later Allows updating values for a specific variable in ThoughtSpot. Requires ADMINISTRATION role. The CAN_MANAGE_VARIABLES permission allows you to manage Formula Variables in the current organization scope. The API endpoint allows: * Adding new values to the variable * Replacing existing values * Deleting values from the variable * Resetting all values When updating variable values, you need to specify: * The variable identifier (ID or name) * The values to add/replace/remove * The operation to perform (ADD, REPLACE, REMOVE, RESET) Behaviour based on operation type: * ADD - Adds values to the variable if this is a list type variable, else same as replace. * REPLACE - Replaces all values of a given set of constraints with the current set of values. * REMOVE - Removes any values which match the set of conditions of the variables if this is a list type variable, else clears value. * RESET - Removes all constraints for the given variable, scope is ignored + * @param identifier Unique ID or name of the variable + * @param putVariableValuesRequest + */ + putVariableValues(identifier, putVariableValuesRequest, _options) { + const requestContextPromise = this.requestFactory.putVariableValues(identifier, putVariableValuesRequest, _options); + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx) => middleware.pre(ctx))); + } + return middlewarePreObservable.pipe(mergeMap((ctx) => this.configuration.httpApi.send(ctx))).pipe(mergeMap((response) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp) => this.responseProcessor.putVariableValues(rsp))); + })); + } + /** + * Version: 10.7.0.cl or later **Deprecated** — Use `getRelevantQuestions` instead (available from 10.13.0.cl). Breaks down a topical or goal-oriented natural language question into smaller, actionable analytical sub-questions, each mapped to a relevant data source for independent execution. Requires `CAN_USE_SPOTTER` privilege and at least view-level access to the referenced metadata objects. #### Usage guidelines The request accepts the following parameters: - `nlsRequest`: contains the user `query` to decompose, along with optional `instructions` and `bypassCache` flag - `worksheetIds`: list of data source identifiers to scope the decomposition - `answerIds`: list of Answer GUIDs whose data guides the response - `liveboardIds`: list of Liveboard GUIDs whose data guides the response - `conversationId`: an existing conversation session ID for context continuity - `content`: supplementary text or CSV data to improve response quality - `maxDecomposedQueries`: maximum number of sub-questions to return (default: `5`) If the request is successful, the API returns a `decomposedQueryResponse` containing a list of `decomposedQueries`, each with: - `query`: the generated analytical sub-question - `worksheetId`: the unique ID of the data source the question targets - `worksheetName`: the display name of the corresponding data source #### Error responses | Code | Description | |------|---------------------------------------------------------------------------------------------------------------------------------------| | 401 | Unauthorized — authentication token is missing, expired, or invalid. | | 403 | Forbidden — the authenticated user does not have `CAN_USE_SPOTTER` privilege or lacks view access to the referenced metadata objects. | > ###### Note: > * This endpoint is deprecated since 10.13.0.cl. Use `getRelevantQuestions` for new integrations. > * This endpoint is currently in Beta. Breaking changes may be introduced before the endpoint is made Generally Available. > * This endpoint requires Spotter — please contact ThoughtSpot support to enable Spotter on your cluster. + * @param queryGetDecomposedQueryRequest + */ + queryGetDecomposedQuery(queryGetDecomposedQueryRequest, _options) { + const requestContextPromise = this.requestFactory.queryGetDecomposedQuery(queryGetDecomposedQueryRequest, _options); + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx) => middleware.pre(ctx))); + } + return middlewarePreObservable.pipe(mergeMap((ctx) => this.configuration.httpApi.send(ctx))).pipe(mergeMap((response) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp) => this.responseProcessor.queryGetDecomposedQuery(rsp))); + })); + } + /** + * Version: 9.0.0.cl or later Resets the password of a user account. Administrators can reset password on behalf of a user. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `USER_ADMINISTRATION` (**Can manage users**) privilege is required. + * @param resetUserPasswordRequest + */ + resetUserPassword(resetUserPasswordRequest, _options) { + const requestContextPromise = this.requestFactory.resetUserPassword(resetUserPasswordRequest, _options); + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx) => middleware.pre(ctx))); + } + return middlewarePreObservable.pipe(mergeMap((ctx) => this.configuration.httpApi.send(ctx))).pipe(mergeMap((response) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp) => this.responseProcessor.resetUserPassword(rsp))); + })); + } + /** + * Version: 9.2.0.cl or later Reverts TML objects to a previous commit specified in the API request. Requires at least edit access to objects. In the API request, specify the `commit_id`. If the branch name is not specified in the request, the API will consider the default branch configured on your instance. By default, the API reverts all objects. If the revert operation fails for one of the objects provided in the commit, the API returns an error and does not revert any object. For more information, see [Git integration documentation](https://developers.thoughtspot.com/docs/git-integration). + * @param commitId Commit id to which the object should be reverted + * @param revertCommitRequest + */ + revertCommit(commitId, revertCommitRequest, _options) { + const requestContextPromise = this.requestFactory.revertCommit(commitId, revertCommitRequest, _options); + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx) => middleware.pre(ctx))); + } + return middlewarePreObservable.pipe(mergeMap((ctx) => this.configuration.httpApi.send(ctx))).pipe(mergeMap((response) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp) => this.responseProcessor.revertCommit(rsp))); + })); + } + /** + * Version: 26.2.0.cl or later Revokes OAuth refresh tokens for users who no longer require access to a data warehouse connection. When a token is revoked, the affected user\'s session for that connection is terminated, and they must re-authenticate to regain access. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) or `DATAMANAGEMENT` (**Can manage data**) privileges. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on the ThoughtSpot instance, users with `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) privilege can also make API requests to revoke tokens for connection users. #### Usage guidelines You can specify different combinations of identifiers to control which refresh tokens are revoked. - **connection_identifier**: Revokes refresh tokens for all users of the connection, except the connection author. - **connection_identifier** and **user_identifiers**: Revokes refresh tokens only for the users specified in the request. If the name or ID of the connection author is included in the request, their token will also be revoked. - **connection_identifier** and **configuration_identifiers**: Revokes refresh tokens for all users on the specified configurations, except the configuration author. - **connection_identifier**, **configuration_identifiers**, and **user_identifiers**: Revokes refresh tokens for the specified users on the specified configurations. - **connection_identifier** and **org_identifiers**: Revokes refresh tokens for the specified Orgs. Applicable only for published connections. - **connection_identifier**, **org_identifiers**, and **user_identifiers**: Revokes refresh tokens for the specified users in the specified Orgs. Applicable only for published connections. **NOTE**: The `org_identifiers` parameter is only applicable for published connections. Using this parameter for unpublished connections will result in an error. Ensure that the connections are published before making the API request. + * @param connectionIdentifier Unique ID or name of the connection whose refresh tokens need to be revoked. All the users associated with the connection will have their refresh tokens revoked except the author. + * @param revokeRefreshTokensRequest + */ + revokeRefreshTokens(connectionIdentifier, revokeRefreshTokensRequest, _options) { + const requestContextPromise = this.requestFactory.revokeRefreshTokens(connectionIdentifier, revokeRefreshTokensRequest, _options); + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx) => middleware.pre(ctx))); + } + return middlewarePreObservable.pipe(mergeMap((ctx) => this.configuration.httpApi.send(ctx))).pipe(mergeMap((response) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp) => this.responseProcessor.revokeRefreshTokens(rsp))); + })); + } + /** + * Version: 9.0.0.cl or later Revokes the authentication token issued for current user session. The token of your current session expires when you make a call to the `/api/rest/2.0/auth/token/revoke` endpoint. the users will not be able to access ThoughtSpot objects until a new token is obtained. To restart your session, request for a new token from ThoughtSpot. See [Get Full Access Token](#/http/api-endpoints/authentication/get-full-access-token). + * @param revokeTokenRequest + */ + revokeToken(revokeTokenRequest, _options) { + const requestContextPromise = this.requestFactory.revokeToken(revokeTokenRequest, _options); + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx) => middleware.pre(ctx))); + } + return middlewarePreObservable.pipe(mergeMap((ctx) => this.configuration.httpApi.send(ctx))).pipe(mergeMap((response) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp) => this.responseProcessor.revokeToken(rsp))); + })); + } + /** + * Version: 26.6.0.cl or later Returns the authentication configuration for the specified auth type at cluster and org level. Currently supports `TRUSTED_AUTH`. #### Required privileges Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) or `CONTROL_TRUSTED_AUTH` (**Can Enable or Disable Trusted Authentication**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled, the `CONTROL_TRUSTED_AUTH` privilege is required. #### Usage guidelines Use `scope` to control which level of settings are returned: - `CLUSTER` — Returns cluster-level authentication status and access tokens. Accessible only from the Primary Org. - `ORG` — Returns org-level authentication status and access tokens for the current Org. Requires the per-Org authentication feature to be enabled on your instance. - If `scope` is omitted, both cluster and org-level settings are returned based on the caller\'s org context and feature availability. The `access_tokens` array in `cluster_preferences` or `org_preferences` is omitted when no token is configured at that level. **Note**: Access tokens returned in the response are sensitive credentials. Treat them with the same care as passwords. + * @param searchAuthSettingsRequest + */ + searchAuthSettings(searchAuthSettingsRequest, _options) { + const requestContextPromise = this.requestFactory.searchAuthSettings(searchAuthSettingsRequest, _options); + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx) => middleware.pre(ctx))); + } + return middlewarePreObservable.pipe(mergeMap((ctx) => this.configuration.httpApi.send(ctx))).pipe(mergeMap((response) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp) => this.responseProcessor.searchAuthSettings(rsp))); + })); + } + /** + * Version: 10.12.0.cl or later Gets a list of [custom calendars](https://docs.thoughtspot.com/cloud/latest/connections-cust-cal). Requires `DATAMANAGEMENT` (**Can manage data**) or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your ThoughtSpot instance, the `CAN_MANAGE_CUSTOM_CALENDAR` (**Can manage custom calendars**) privilege is required. #### Usage guidelines By default, the API returns a list of custom calendars for all connection objects. To retrieve custom calendar details for a particular connection, specify the connection ID. You can also use other search parameters such as `name_pattern` and `sort_options` as search filters. The `name_pattern` parameter filters and returns only those objects that match the specified pattern. Use `%` as a wildcard for pattern matching. + * @param searchCalendarsRequest + */ + searchCalendars(searchCalendarsRequest, _options) { + const requestContextPromise = this.requestFactory.searchCalendars(searchCalendarsRequest, _options); + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx) => middleware.pre(ctx))); + } + return middlewarePreObservable.pipe(mergeMap((ctx) => this.configuration.httpApi.send(ctx))).pipe(mergeMap((response) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp) => this.responseProcessor.searchCalendars(rsp))); + })); + } + /** + * Version: 26.4.0.cl or later Searches delivery history for communication channels such as webhooks. Returns channel-level delivery status for each job execution record. Use this to monitor channel health and delivery success rates across events. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) or `DEVELOPER` (**Has developer privilege**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, users with `CAN_MANAGE_WEBHOOKS` (**Can manage webhooks**) privilege are also authorized to perform this action. **NOTE**: When `channel_type` is `WEBHOOK`, the following constraints apply: - `job_ids`, `channel_identifiers`, and `events` each accept at most one element. - When `job_ids` is provided, it is used as the sole lookup key and other filter fields are ignored. - When `job_ids` is not provided, `channel_identifiers` and `events` are both required, each containing exactly one element. - Records older than the configured retention period are not returned. - Use `start_epoch_time_in_millis` and/or `end_epoch_time_in_millis` to narrow results to a specific time window. + * @param searchChannelHistoryRequest + */ + searchChannelHistory(searchChannelHistoryRequest, _options) { + const requestContextPromise = this.requestFactory.searchChannelHistory(searchChannelHistoryRequest, _options); + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx) => middleware.pre(ctx))); + } + return middlewarePreObservable.pipe(mergeMap((ctx) => this.configuration.httpApi.send(ctx))).pipe(mergeMap((response) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp) => this.responseProcessor.searchChannelHistory(rsp))); + })); + } + /** + * Version: 26.4.0.cl or later Gets a list of collections available in ThoughtSpot. To get details of a specific collection, specify the collection GUID or name. You can also filter the API response based on the collection name pattern, author, and other criteria. #### Search options * **name_pattern**: Use \'%\' as a wildcard character to match collection names * **collection_identifiers**: Search for specific collections by their GUIDs or names * **include_metadata**: When set to `true`, includes the metadata objects within each collection in the response **NOTE**: If the API returns an empty list, consider increasing the value of the `record_size` parameter. To search across all available collections, set `record_size` to `-1`. + * @param searchCollectionsRequest + */ + searchCollections(searchCollectionsRequest, _options) { + const requestContextPromise = this.requestFactory.searchCollections(searchCollectionsRequest, _options); + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx) => middleware.pre(ctx))); + } + return middlewarePreObservable.pipe(mergeMap((ctx) => this.configuration.httpApi.send(ctx))).pipe(mergeMap((response) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp) => this.responseProcessor.searchCollections(rsp))); + })); + } + /** + * Version: 9.2.0.cl or later Gets a list of commits for a given metadata object. Requires `DATAMANAGEMENT` (**Can manage data**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance on your instance, the `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` (**Can manage data models**) privilege and edit access to the metadata objects. + * @param searchCommitsRequest + */ + searchCommits(searchCommitsRequest, _options) { + const requestContextPromise = this.requestFactory.searchCommits(searchCommitsRequest, _options); + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx) => middleware.pre(ctx))); + } + return middlewarePreObservable.pipe(mergeMap((ctx) => this.configuration.httpApi.send(ctx))).pipe(mergeMap((response) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp) => this.responseProcessor.searchCommits(rsp))); + })); + } + /** + * Version: 10.14.0.cl or later Fetch communication channel preferences. - Use `cluster_preferences` to fetch the default preferences for your ThoughtSpot application instance. - If your instance has [Orgs](https://docs.thoughtspot.com/cloud/latest/orgs-overview), use `org_preferences` to fetch any Org-specific preferences that override the defaults. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) or `DEVELOPER` (**Has developer privilege**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, users with `APPLICATION_ADMINISTRATION` (**Can manage application settings**) privilege are also authorized to perform this action. + * @param searchCommunicationChannelPreferencesRequest + */ + searchCommunicationChannelPreferences(searchCommunicationChannelPreferencesRequest, _options) { + const requestContextPromise = this.requestFactory.searchCommunicationChannelPreferences(searchCommunicationChannelPreferencesRequest, _options); + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx) => middleware.pre(ctx))); + } + return middlewarePreObservable.pipe(mergeMap((ctx) => this.configuration.httpApi.send(ctx))).pipe(mergeMap((response) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp) => this.responseProcessor.searchCommunicationChannelPreferences(rsp))); + })); + } + /** + * Version: 9.2.0.cl or later Gets Git repository connections configured on the ThoughtSpot instance. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance on your instance, the `CAN_SETUP_VERSION_CONTROL` (**Can set up version control**) privilege. + * @param searchConfigRequest + */ + searchConfig(searchConfigRequest, _options) { + const requestContextPromise = this.requestFactory.searchConfig(searchConfigRequest, _options); + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx) => middleware.pre(ctx))); + } + return middlewarePreObservable.pipe(mergeMap((ctx) => this.configuration.httpApi.send(ctx))).pipe(mergeMap((response) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp) => this.responseProcessor.searchConfig(rsp))); + })); + } + /** + * Version: 9.2.0.cl or later Gets connection objects. Requires `DATAMANAGEMENT` (**Can manage data**) or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) privilege is required. - To get a list of all connections available in the ThoughtSpot system, send the API request without any attributes in the request body. - To get the connection objects for a specific type of data warehouse, specify the type in `data_warehouse_types`. - To fetch details of a connection object, specify the connection object GUID or name. The `name_pattern` attribute allows passing partial text with `%` for a wildcard match. - To get details of the database, schemas, tables, or columns from a data connection object, specify `data_warehouse_object_type`. - To get a specific database, schema, table, or column from a connection object, define the object type in `data_warehouse_object_type` and object properties in the `data_warehouse_objects` array. For example, to search for a column, you must pass the database, schema, and table names in the API request. Note that in the following example, object properties are set in a hierarchical order (`database` > `schema` > `table` > `column`). ``` { \"connections\": [ { \"identifier\": \"b9d1f2ef-fa65-4a4b-994e-30fa2d57b0c2\", \"data_warehouse_objects\": [ { \"database\": \"NEBULADEV\", \"schema\": \"INFORMATION_SCHEMA\", \"table\": \"APPLICABLE_ROLES\", \"column\": \"ROLE_NAME\" } ] } ], \"data_warehouse_object_type\": \"COLUMN\" } ``` - To fetch data by `configuration`, specify `data_warehouse_object_type`. For example, to fetch columns from the `DEVELOPMENT` database, specify the `data_warehouse_object_type` as `DATABASE` and define the `configuration` string as `{\"database\":\"DEVELOPMENT\"}`. To get column data for a specific table, specify the table, for example,`{\"database\":\"RETAILAPPAREL\",\"table\":\"PIPES\"}`. - To query connections by `authentication_type`, specify `data_warehouse_object_type`. Supported values for `authentication_type` are: - `SERVICE_ACCOUNT`: For connections that require service account credentials to authenticate to the Cloud Data Warehouse and fetch data. - `OAUTH`: For connections that require OAuth credentials to authenticate to the Cloud Data Warehouse and fetch data. Teradata, Oracle, and Presto Cloud Data Warehouses do not support the OAuth authentication type. - `IAM`: For connections that have the IAM OAuth set up. This authentication type is supported on Amazon Redshift connections only. - `EXTOAUTH`: For connections that have External OAuth set up. ThoughtSpot supports external [OAuth with Microsoft Azure Active Directory (AD)](https://docs.thoughtspot.com/cloud/latest/ connections-snowflake-azure-ad-oauth) and [Okta for Snowflake data connections](https://docs.thoughtspot.com/cloud/latest/connections-snowflake-okta-oauth). - `KEY_PAIR`: For connections that require Key Pair account credentials to authenticate to the Cloud Data Warehouse and fetch data. This authentication type is supported on Snowflake connections only. - `OAUTH_WITH_PKCE`: For connections that require OAuth with PKCE account credentials to authenticate to the Cloud Data Warehouse and fetch data. This authentication type is supported on Snowflake, Starburst, Databricks, Denodo connections only. - `EXTOAUTH_WITH_PKCE`: For connections that require External OAuth With PKCE account credentials to authenticate to the Cloud Data Warehouse and fetch data. This authentication type is supported on Snowflake connections only. - `OAUTH_WITH_PEZ`: For connections that require OAuth With PEZ account credentials to authenticate to the Cloud Data Warehouse and fetch data. This authentication type is supported on Amazon Redshift connections only. - `OAUTH_WITH_SERVICE_PRINCIPAL`: For connections that require OAuth With Service Principal account credentials to authenticate to the Cloud Data Warehouse and fetch data. This authentication type is supported on Databricks connections only. - `PERSONAL_ACCESS_TOKEN`: For connections that require Personal Access Token account credentials to authenticate to the Cloud Data Warehouse and fetch data. This authentication type is supported on Databricks connections only. - `OAUTH_CLIENT_CREDENTIALS`: For connections that require OAuth Client Credentials to authenticate to the Cloud Data Warehouse and fetch data. This authentication type is supported on Snowflake connections only. - To include more details about connection objects in the API response, set `include_details` to `true`. - You can also sort the output by field names and filter connections by tags. **NOTE**: When filtering connection records by parameters other than `data_warehouse_types` or `tag_identifiers`, ensure that you set `record_size` to `-1` and `record_offset` to `0` for precise results. + * @param searchConnectionRequest + */ + searchConnection(searchConnectionRequest, _options) { + const requestContextPromise = this.requestFactory.searchConnection(searchConnectionRequest, _options); + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx) => middleware.pre(ctx))); + } + return middlewarePreObservable.pipe(mergeMap((ctx) => this.configuration.httpApi.send(ctx))).pipe(mergeMap((response) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp) => this.responseProcessor.searchConnection(rsp))); + })); + } + /** + * Version: 9.6.0.cl or later Gets custom actions configured on the cluster. Requires `DEVELOPER` (**Has Developer privilege**) or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `DEVELOPER` (**Has developer privilege**) privilege is required. + * @param searchCustomActionsRequest + */ + searchCustomActions(searchCustomActionsRequest, _options) { + const requestContextPromise = this.requestFactory.searchCustomActions(searchCustomActionsRequest, _options); + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx) => middleware.pre(ctx))); + } + return middlewarePreObservable.pipe(mergeMap((ctx) => this.configuration.httpApi.send(ctx))).pipe(mergeMap((response) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp) => this.responseProcessor.searchCustomActions(rsp))); + })); + } + /** + * Version: 9.0.0.cl or later Generates an Answer from a given data source. Requires at least view access to the data source object (Worksheet or View). #### Usage guidelines To search data, specify the data source GUID in `logical_table_identifier`. The data source can be a Worksheet, View, Table, or SQL view. Pass search tokens in the `query_string` attribute in the API request as shown in the following example: ``` { \"query_string\": \"[sales] by [store]\", \"logical_table_identifier\": \"cd252e5c-b552-49a8-821d-3eadaa049cca\", } ``` For more information about the `query_string` format and data source attribute, see [Search data API](https://developers.thoughtspot.com/docs/fetch-data-and-report-apis#_search_data_api). The `record_size` attribute determines the number of records to retrieve in an API call. For more information about pagination, record size, and maximum row limit, see [Pagination and record size settings](https://developers.thoughtspot.com/docs/fetch-data-and-report-apis#_pagination_settings_for_data_and_report_api). + * @param searchDataRequest + */ + searchData(searchDataRequest, _options) { + const requestContextPromise = this.requestFactory.searchData(searchDataRequest, _options); + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx) => middleware.pre(ctx))); + } + return middlewarePreObservable.pipe(mergeMap((ctx) => this.configuration.httpApi.send(ctx))).pipe(mergeMap((response) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp) => this.responseProcessor.searchData(rsp))); + })); + } + /** + * Version: 10.10.0.cl or later Search the email customization configuration if any set for the ThoughtSpot system. #### Pre-requisites Requires `DEVELOPER` (**has developer privilege**) or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `DEVELOPER` (**Has developer privilege**) privilege is required. **NOTE**:This endpoint in currently in beta. Contact ThoughtSpot support to enable this on your instance. + * @param searchEmailCustomizationRequest + */ + searchEmailCustomization(searchEmailCustomizationRequest, _options) { + const requestContextPromise = this.requestFactory.searchEmailCustomization(searchEmailCustomizationRequest, _options); + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx) => middleware.pre(ctx))); + } + return middlewarePreObservable.pipe(mergeMap((ctx) => this.configuration.httpApi.send(ctx))).pipe(mergeMap((response) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp) => this.responseProcessor.searchEmailCustomization(rsp))); + })); + } + /** + * Version: 9.0.0.cl or later Gets a list of metadata objects available on the ThoughtSpot system. This API endpoint is available to all users who have view access to the object. Users with `ADMINISTRATION` (**Can administer ThoughtSpot**) privileges can view data for all metadata objects, including users and groups. #### Usage guidelines - To get all metadata objects, send the API request without any attributes. - To get metadata objects of a specific type, set the `type` attribute. For example, to fetch a Worksheet, set the type as `LOGICAL_TABLE`. - To filter metadata objects within type `LOGICAL_TABLE`, set the `subtypes` attribute. For example, to fetch a Worksheet, set the type as `LOGICAL_TABLE` & subtypes as `[WORKSHEET]`. - To get a specific metadata object, specify the GUID. - To customize your search and filter the API response, you can use several parameters. You can search for objects created or modified by specific users, by tags applied to the objects, or by using the include parameters like `include_auto_created_objects`, `include_dependent_objects`, `include_headers`, `include_incomplete_objects`, and so on. You can also define sorting options to sort the data retrieved in the API response. - To get discoverable objects when linientmodel is enabled you can use `include_discoverable_objects` as true else false. Default value is true. - For liveboard metadata type, to get the newer format, set the `liveboard_response_format` as V2. Default value is V1. - To retrieve only objects that are published, set the `include_only_published_objects` as true. Default value is false. **NOTE**: The following parameters support pagination of metadata records: - `tag_identifiers` - `type` - `subtypes` - `created_by_user_identifiers` - `modified_by_user_identifiers` - `owned_by_user_identifiers` - `exclude_objects` - `include_auto_created_objects` - `favorite_object_options` - `include_only_published_objects` If you are using other parameters to search metadata, set `record_size` to `-1` and `record_offset` to `0`. + * @param searchMetadataRequest + */ + searchMetadata(searchMetadataRequest, _options) { + const requestContextPromise = this.requestFactory.searchMetadata(searchMetadataRequest, _options); + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx) => middleware.pre(ctx))); + } + return middlewarePreObservable.pipe(mergeMap((ctx) => this.configuration.httpApi.send(ctx))).pipe(mergeMap((response) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp) => this.responseProcessor.searchMetadata(rsp))); + })); + } + /** + * Version: 9.0.0.cl or later Gets a list of Orgs configured on the ThoughtSpot system. To get details of a specific Org, specify the Org ID or name. You can also pass parameters such as status, visibility, and user identifiers to get a specific list of Orgs. Requires cluster administration (**Can administer Org**) privileges. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `ORG_ADMINISTRATION` (**Can manage Orgs**) privilege is required. + * @param searchOrgsRequest + */ + searchOrgs(searchOrgsRequest, _options) { + const requestContextPromise = this.requestFactory.searchOrgs(searchOrgsRequest, _options); + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx) => middleware.pre(ctx))); + } + return middlewarePreObservable.pipe(mergeMap((ctx) => this.configuration.httpApi.send(ctx))).pipe(mergeMap((response) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp) => this.responseProcessor.searchOrgs(rsp))); + })); + } + /** + * Version: 9.5.0.cl or later Gets a list of Role objects from the ThoughtSpot system. Available if [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance. To search for Roles, the `ROLE_ADMINISTRATION` (**Can manage roles**) privilege is required. To get details of a specific Role object, specify the GUID or name. You can also filter the API response based on user group and Org identifiers, privileges assigned to the Role, and deprecation status. + * @param searchRolesRequest + */ + searchRoles(searchRolesRequest, _options) { + const requestContextPromise = this.requestFactory.searchRoles(searchRolesRequest, _options); + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx) => middleware.pre(ctx))); + } + return middlewarePreObservable.pipe(mergeMap((ctx) => this.configuration.httpApi.send(ctx))).pipe(mergeMap((response) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp) => this.responseProcessor.searchRoles(rsp))); + })); + } + /** + * Search Schedules Version: 9.4.0.cl or later Gets a list of scheduled jobs configured for a Liveboard. To get details of a specific scheduled job, specify the name or GUID of the scheduled job. Requires at least view access to Liveboards. **NOTE**: When filtering schedules by parameters other than `metadata`, set `record_size` to `-1` and `record_offset` to `0` for accurate results. + * @param searchSchedulesRequest + */ + searchSchedules(searchSchedulesRequest, _options) { + const requestContextPromise = this.requestFactory.searchSchedules(searchSchedulesRequest, _options); + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx) => middleware.pre(ctx))); + } + return middlewarePreObservable.pipe(mergeMap((ctx) => this.configuration.httpApi.send(ctx))).pipe(mergeMap((response) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp) => this.responseProcessor.searchSchedules(rsp))); + })); + } + /** + * Version: 26.2.0.cl or later Fetch security settings for your ThoughtSpot application instance. - Use `scope: CLUSTER` to retrieve cluster-level security settings, including CORS and CSP allowlists, SAML redirect URLs, and settings that control access to non-embedded pages. - Use `scope: ORG` to retrieve Org-level security settings. If your instance has [Orgs](https://docs.thoughtspot.com/cloud/latest/orgs-overview), this returns CORS and non-embed access settings specific to the Org. - If `scope` is not specified, returns both cluster and Org-specific settings based on user privileges. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) or `DEVELOPER` (**Has developer privilege**) privilege. See [Security Settings](https://developers.thoughtspot.com/docs/security-settings) for more details. + * @param searchSecuritySettingsRequest + */ + searchSecuritySettings(searchSecuritySettingsRequest, _options) { + const requestContextPromise = this.requestFactory.searchSecuritySettings(searchSecuritySettingsRequest, _options); + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx) => middleware.pre(ctx))); + } + return middlewarePreObservable.pipe(mergeMap((ctx) => this.configuration.httpApi.send(ctx))).pipe(mergeMap((response) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp) => this.responseProcessor.searchSecuritySettings(rsp))); + })); + } + /** + * Version: 9.0.0.cl or later Gets a list of tag objects available on the ThoughtSpot system. To get details of a specific tag object, specify the GUID or name. Any authenticated user can search for tag objects. + * @param searchTagsRequest + */ + searchTags(searchTagsRequest, _options) { + const requestContextPromise = this.requestFactory.searchTags(searchTagsRequest, _options); + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx) => middleware.pre(ctx))); + } + return middlewarePreObservable.pipe(mergeMap((ctx) => this.configuration.httpApi.send(ctx))).pipe(mergeMap((response) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp) => this.responseProcessor.searchTags(rsp))); + })); + } + /** + * Version: 9.0.0.cl or later Gets a list of user group objects from the ThoughtSpot system. To get details of a specific user group, specify the user group GUID or name. You can also filter the API response based on User ID, Org ID, Role ID, type of group, sharing visibility, privileges assigned to the group, and the Liveboard IDs assigned to the users in the group. Available to all users. Users with `ADMINISTRATION` (**Can administer ThoughtSpot**) privileges can view all users properties. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `GROUP_ADMINISTRATION` (**Can manage groups**) privilege is required. **NOTE**: If you do not get precise results, try setting `record_size` to `-1` and `record_offset` to `0`. + * @param searchUserGroupsRequest + */ + searchUserGroups(searchUserGroupsRequest, _options) { + const requestContextPromise = this.requestFactory.searchUserGroups(searchUserGroupsRequest, _options); + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx) => middleware.pre(ctx))); + } + return middlewarePreObservable.pipe(mergeMap((ctx) => this.configuration.httpApi.send(ctx))).pipe(mergeMap((response) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp) => this.responseProcessor.searchUserGroups(rsp))); + })); + } + /** + * Version: 9.0.0.cl or later Gets a list of users available on the ThoughtSpot system. To get details of a specific user, specify the user GUID or name. You can also filter the API response based on groups, Org ID, user visibility, account status, user type, and user preference settings and favorites. Available to all users. Users with `ADMINISTRATION` (**Can administer ThoughtSpot**) privileges can view all users properties. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `USER_ADMINISTRATION` (**Can manage users**) privilege is required. **NOTE**: If the API returns an empty list, consider increasing the value of the `record_size` parameter. To search across all available users, set `record_size` to `-1`. + * @param searchUsersRequest + */ + searchUsers(searchUsersRequest, _options) { + const requestContextPromise = this.requestFactory.searchUsers(searchUsersRequest, _options); + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx) => middleware.pre(ctx))); + } + return middlewarePreObservable.pipe(mergeMap((ctx) => this.configuration.httpApi.send(ctx))).pipe(mergeMap((response) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp) => this.responseProcessor.searchUsers(rsp))); + })); + } + /** + * Search variables Version: 26.4.0.cl or later Allows searching for variables in ThoughtSpot. Requires ADMINISTRATION role. The CAN_MANAGE_VARIABLES permission allows you to manage Formula Variables in the current organization scope. The API endpoint supports searching variables by: * Variable identifier (ID or name) * Variable type * Name pattern (case-insensitive, supports % for wildcard) The search results can be formatted in three ways: * METADATA - Returns only variable metadata (default) * METADATA_AND_VALUES - Returns variable metadata and values The values can be filtered by scope: * org_identifier * principal_identifier * model_identifier + * @param searchVariablesRequest + */ + searchVariables(searchVariablesRequest, _options) { + const requestContextPromise = this.requestFactory.searchVariables(searchVariablesRequest, _options); + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx) => middleware.pre(ctx))); + } + return middlewarePreObservable.pipe(mergeMap((ctx) => this.configuration.httpApi.send(ctx))).pipe(mergeMap((response) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp) => this.responseProcessor.searchVariables(rsp))); + })); + } + /** + * Version: 10.14.0.cl or later Searches for webhook configurations based on various criteria such as Org, webhook identifier, event type, with support for pagination and sorting. Returns matching webhook configurations with their complete details. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) or `DEVELOPER` (**Has developer privilege**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, users with `CAN_MANAGE_WEBHOOKS` (**Can manage webhooks**) privilege are also authorized to perform this action. + * @param searchWebhookConfigurationsRequest + */ + searchWebhookConfigurations(searchWebhookConfigurationsRequest, _options) { + const requestContextPromise = this.requestFactory.searchWebhookConfigurations(searchWebhookConfigurationsRequest, _options); + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx) => middleware.pre(ctx))); + } + return middlewarePreObservable.pipe(mergeMap((ctx) => this.configuration.httpApi.send(ctx))).pipe(mergeMap((response) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp) => this.responseProcessor.searchWebhookConfigurations(rsp))); + })); + } + /** + * Version: 26.5.0.cl or later Sends natural language messages to an existing Spotter agent conversation and returns the complete response synchronously. Requires `CAN_USE_SPOTTER` privilege and access to the metadata object associated with the conversation. The user must have access to the conversation session referenced by `conversation_identifier`. A conversation must first be created using the `createAgentConversation` API. #### Usage guidelines The request must include: - `conversation_identifier`: the unique session ID returned by `createAgentConversation`, used for context continuity and message tracking - `messages`: an array of one or more text messages to send to the agent The API returns an array of response objects, each containing: - `type`: the kind of response — `text`, `answer`, or `error` - `message`: the main content of the response - `metadata`: additional information depending on the message type (e.g., answer metadata includes analytics and visualization details) #### Error responses | Code | Description | |------|----------------------------------------------------------------------------------------------------------------------------------| | 401 | Unauthorized — authentication token is missing, expired, or invalid. | | 403 | Forbidden — the authenticated user does not have `CAN_USE_SPOTTER` privilege or lacks permission on the referenced conversation. | > ###### Note: > > - This endpoint is Generally Available from version 26.5.0.cl. > - This endpoint requires Spotter - please contact ThoughtSpot support to enable Spotter on your cluster. > - For real-time streamed responses, use `sendAgentConversationMessageStreaming` instead. + * @param conversationIdentifier Unique identifier for the conversation (used to track context) + * @param sendAgentConversationMessageRequest + */ + sendAgentConversationMessage(conversationIdentifier, sendAgentConversationMessageRequest, _options) { + const requestContextPromise = this.requestFactory.sendAgentConversationMessage(conversationIdentifier, sendAgentConversationMessageRequest, _options); + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx) => middleware.pre(ctx))); + } + return middlewarePreObservable.pipe(mergeMap((ctx) => this.configuration.httpApi.send(ctx))).pipe(mergeMap((response) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp) => this.responseProcessor.sendAgentConversationMessage(rsp))); + })); + } + /** + * Version: 26.5.0.cl or later Sends one or more natural language messages to an existing Spotter agent conversation and returns the response as a real-time Server-Sent Events stream. Requires `CAN_USE_SPOTTER` privilege and access to the metadata object associated with the conversation. The user must have access to the conversation session referenced by `conversation_identifier`. A conversation must first be created using the `createAgentConversation` API. #### Usage guidelines The request must include: - `conversation_identifier`: the unique session ID returned by `createAgentConversation`, used for context continuity and message tracking - `messages`: an array of one or more text messages to send to the agent If the request is valid, the API returns a Server-Sent Events (SSE) stream. Each line has the form `data: [{\"type\": \"...\", ...}]` — a JSON array of event objects. Event types include: - `ack`: confirms receipt of the request (`node_id`) - `conv_title`: conversation title (`title`, `conv_id`) - `notification`: status updates on operations (`group_id`, `metadata`, `code` — e.g. `TOOL_CALL_NOTIFICATION`, `nls_start`, `FINAL_RESPONSE_NOTIFICATION`) - `text-chunk`: incremental content chunks (`id`, `group_id`, `metadata` with `format` and `type` such as `thinking` or `text`, `content`) - `text`: full text block with same structure as `text-chunk` - `answer`: structured answer with metadata (`id`, `group_id`, `metadata` with `sage_query`, `session_id`, `title`, etc., `title`) - `error`: if a failure occurs #### Error responses | Code | Description | | ---- | -------------------------------------------------------------------------------------------------------------------------------- | | 401 | Unauthorized — authentication token is missing, expired, or invalid. | | 403 | Forbidden — the authenticated user does not have `CAN_USE_SPOTTER` privilege or lacks permission on the referenced conversation. | > ###### Note: > > - This endpoint is Generally Available from version 26.5.0.cl. > - This endpoint requires Spotter - please contact ThoughtSpot support to enable Spotter on your cluster. > - The streaming protocol uses Server-Sent Events (SSE). > - For the complete response in a single payload, use `sendAgentConversationMessage` instead. + * @param conversationIdentifier Unique identifier for the conversation (used to track context) + * @param sendAgentConversationMessageStreamingRequest + */ + sendAgentConversationMessageStreaming(conversationIdentifier, sendAgentConversationMessageStreamingRequest, _options) { + const requestContextPromise = this.requestFactory.sendAgentConversationMessageStreaming(conversationIdentifier, sendAgentConversationMessageStreamingRequest, _options); + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx) => middleware.pre(ctx))); + } + return middlewarePreObservable.pipe(mergeMap((ctx) => this.configuration.httpApi.send(ctx))).pipe(mergeMap((response) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp) => this.responseProcessor.sendAgentConversationMessageStreaming(rsp))); + })); + } + /** + * Version: 26.2.0.cl or later **Deprecated** — Use `sendAgentConversationMessage` instead. Send natural language messages to an existing Spotter agent conversation and returns the complete response synchronously. Requires `CAN_USE_SPOTTER` privilege and access to the metadata object associated with the conversation. The user must have access to the conversation session referenced by `conversation_identifier`. A conversation must first be created using the `createAgentConversation` API. #### Usage guidelines The request must include: - `conversation_identifier`: the unique session ID returned by `createAgentConversation`, used for context continuity and message tracking - `messages`: an array of one or more text messages to send to the agent The API returns an array of response objects, each containing: - `type`: the kind of response — `text`, `answer`, or `error` - `message`: the main content of the response - `metadata`: additional information depending on the message type (e.g., answer metadata includes analytics and visualization details) #### Error responses | Code | Description | |------|----------------------------------------------------------------------------------------------------------------------------------| | 401 | Unauthorized — authentication token is missing, expired, or invalid. | | 403 | Forbidden — the authenticated user does not have `CAN_USE_SPOTTER` privilege or lacks permission on the referenced conversation. | > ###### Note: > > - This endpoint is deprecated. Use `sendAgentConversationMessage` for new integrations. > - This endpoint is currently in Beta. Breaking changes may be introduced before the endpoint is made Generally Available. > - This endpoint requires Spotter - please contact ThoughtSpot support to enable Spotter on your cluster. + * @param conversationIdentifier Unique identifier for the conversation (used to track context) + * @param sendAgentMessageRequest + */ + sendAgentMessage(conversationIdentifier, sendAgentMessageRequest, _options) { + const requestContextPromise = this.requestFactory.sendAgentMessage(conversationIdentifier, sendAgentMessageRequest, _options); + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx) => middleware.pre(ctx))); + } + return middlewarePreObservable.pipe(mergeMap((ctx) => this.configuration.httpApi.send(ctx))).pipe(mergeMap((response) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp) => this.responseProcessor.sendAgentMessage(rsp))); + })); + } + /** + * Version: 26.2.0.cl or later **Deprecated** — Use `sendAgentConversationMessageStreaming` instead. Sends one or more natural language messages to an existing Spotter agent conversation and returns the response as a real-time Server-Sent Events stream. Requires `CAN_USE_SPOTTER` privilege and access to the metadata object associated with the conversation. The user must have access to the conversation session referenced by `conversation_identifier`. A conversation must first be created using the `createAgentConversation` API. #### Usage guidelines The request must include: - `conversation_identifier`: the unique session ID returned by `createAgentConversation`, used for context continuity and message tracking - `messages`: an array of one or more text messages to send to the agent If the request is valid, the API returns a Server-Sent Events (SSE) stream. Each line has the form `data: [{\"type\": \"...\", ...}]` — a JSON array of event objects. Event types include: - `ack`: confirms receipt of the request (`node_id`) - `conv_title`: conversation title (`title`, `conv_id`) - `notification`: status updates on operations (`group_id`, `metadata`, `code` — e.g. `TOOL_CALL_NOTIFICATION`, `nls_start`, `FINAL_RESPONSE_NOTIFICATION`) - `text-chunk`: incremental content chunks (`id`, `group_id`, `metadata` with `format` and `type` such as `thinking` or `text`, `content`) - `text`: full text block with same structure as `text-chunk` - `answer`: structured answer with metadata (`id`, `group_id`, `metadata` with `sage_query`, `session_id`, `title`, etc., `title`) - `error`: if a failure occurs #### Error responses | Code | Description | |------|----------------------------------------------------------------------------------------------------------------------------------| | 401 | Unauthorized — authentication token is missing, expired, or invalid. | | 403 | Forbidden — the authenticated user does not have `CAN_USE_SPOTTER` privilege or lacks permission on the referenced conversation. | > ###### Note: > > - This endpoint is deprecated. Use `sendAgentConversationMessageStreaming` for new integrations. > - This endpoint is currently in Beta. Breaking changes may be introduced before the endpoint is made Generally Available. > - This endpoint requires Spotter - please contact ThoughtSpot support to enable Spotter on your cluster. > - The streaming protocol uses Server-Sent Events (SSE). + * @param sendAgentMessageStreamingRequest + */ + sendAgentMessageStreaming(sendAgentMessageStreamingRequest, _options) { + const requestContextPromise = this.requestFactory.sendAgentMessageStreaming(sendAgentMessageStreamingRequest, _options); + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx) => middleware.pre(ctx))); + } + return middlewarePreObservable.pipe(mergeMap((ctx) => this.configuration.httpApi.send(ctx))).pipe(mergeMap((response) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp) => this.responseProcessor.sendAgentMessageStreaming(rsp))); + })); + } + /** + * Version: 10.4.0.cl or later Sends a follow-up message to an existing conversation within the context of a data model. Requires `CAN_USE_SPOTTER` privilege and at least view access to the metadata object specified in the request. A conversation must first be created using the `createConversation` API. #### Usage guidelines The request must include: - `conversation_identifier`: the unique session ID returned by `createConversation` - `metadata_identifier`: the unique ID of the data source used for the conversation - `message`: a natural language string with the follow-up question If the request is successful, the API returns an array of response messages, each containing: - `session_identifier`: the unique ID of the generated response - `generation_number`: the generation number of the response - `message_type`: the type of the response (e.g., `TSAnswer`) - `visualization_type`: the generated visualization type (`Chart`, `Table`, or `Undefined`) - `tokens` / `display_tokens`: the search tokens and user-friendly display tokens for the response #### Error responses | Code | Description | |------|-----------------------------------------------------------------------------------------------------------------------------------------| | 401 | Unauthorized — authentication token is missing, expired, or invalid. | | 403 | Forbidden — the authenticated user does not have `CAN_USE_SPOTTER` privilege or lacks view permission on the specified metadata object. | > ###### Note: > * This endpoint is currently in Beta. Breaking changes may be introduced before the endpoint is made Generally Available. > * This endpoint requires Spotter - please contact ThoughtSpot support to enable Spotter on your cluster. + * @param conversationIdentifier Unique identifier of the conversation. + * @param sendMessageRequest + */ + sendMessage(conversationIdentifier, sendMessageRequest, _options) { + const requestContextPromise = this.requestFactory.sendMessage(conversationIdentifier, sendMessageRequest, _options); + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx) => middleware.pre(ctx))); + } + return middlewarePreObservable.pipe(mergeMap((ctx) => this.configuration.httpApi.send(ctx))).pipe(mergeMap((response) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp) => this.responseProcessor.sendMessage(rsp))); + })); + } + /** + * Version: 10.15.0.cl or later This API allows users to set natural language (NL) instructions for a specific data-model to improve AI-generated answers and query processing. These instructions help guide the AI system to better understand the data context and provide more accurate responses. Requires `CAN_USE_SPOTTER` privilege, either edit access or `SPOTTER_COACHING_PRIVILEGE` on the data model, and a bearer token corresponding to the org where the data model exists. #### Usage guidelines To set NL instructions for a data-model, the request must include: - `data_source_identifier`: The unique ID of the data-model for which to set NL instructions - `nl_instructions_info`: An array of instruction objects, each containing: - `instructions`: Array of text instructions for the LLM - `scope`: The scope of the instruction (`GLOBAL`). Currently only `GLOBAL` is supported. It can be extended to data-model-user scope in future. #### Instructions scope - **GLOBAL**: instructions that apply to all users querying this data model If the request is successful, the API returns: - `success`: a boolean indicating whether the operation completed successfully #### Error responses | Code | Description | |------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| | 401 | Unauthorized — authentication token is missing, expired, or invalid. | | 403 | Forbidden — the authenticated user does not have `CAN_USE_SPOTTER` privilege, lacks edit access or `SPOTTER_COACHING_PRIVILEGE` on the data model, or the bearer token does not correspond to the org where the data model exists. | > ###### Note: > > - To use this API, the user needs either edit access or `SPOTTER_COACHING_PRIVILEGE` on the data model, and must use the bearer token corresponding to the org where the data model exists. > - This endpoint is currently in Beta. Breaking changes may be introduced before the endpoint is made Generally Available. > - Available from version 10.15.0.cl and later. > - This endpoint requires Spotter — please contact ThoughtSpot Support to enable Spotter on your cluster. > - Instructions help improve the accuracy and relevance of AI-generated responses for the specified data-model. + * @param setNLInstructionsRequest + */ + setNLInstructions(setNLInstructionsRequest, _options) { + const requestContextPromise = this.requestFactory.setNLInstructions(setNLInstructionsRequest, _options); + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx) => middleware.pre(ctx))); + } + return middlewarePreObservable.pipe(mergeMap((ctx) => this.configuration.httpApi.send(ctx))).pipe(mergeMap((response) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp) => this.responseProcessor.setNLInstructions(rsp))); + })); + } + /** + * Version: 9.0.0.cl or later Allows sharing one or several metadata objects with users and groups in ThoughtSpot. Requires edit access to the metadata object. #### Supported metadata objects: * Liveboards * Visualizations * Answers * Models * Views * Connections * Collections #### Object permissions You can provide `READ_ONLY` or `MODIFY` access when sharing an object with another user or group. The `READ_ONLY` permission grants view access to the shared object, whereas `MODIFY` provides edit access. To prevent a user or group from accessing the shared object, specify the GUID or name of the principal and set `shareMode` to `NO_ACCESS`. #### Sharing a visualization * Sharing a visualization implicitly shares the entire Liveboard with the recipient. * Object permissions set for a shared visualization also apply to the Liveboard unless overridden by another API request or via UI. * If email notifications for object sharing are enabled, a notification with a link to the shared visualization will be sent to the recipient’s email address. Although this link opens the shared visualization, recipients can also access other visualizations in the Liveboard. #### Sharing a collection Collections support **dual permissions** that provide fine-grained control: * **Collection permissions** (`share_mode`) - controls access to the collection itself (view, edit, delete the collection) * **Content permissions** (`content_share_mode`) - controls access to objects within the collection (view, edit objects inside) **Default Behavior:** - If only `share_mode` is specified, the content permissions default to `READ_ONLY` (except when `share_mode` is `NO_ACCESS`, then content also gets `NO_ACCESS`) - To give users edit access to collection contents, explicitly set `content_share_mode: \"MODIFY\"` ## Examples The following JSON examples can be copy-pasted as request bodies for the REST v2 API endpoint: ```bash POST /callosum/v1/v2/security/metadata/share Content-Type: application/x-www-form-urlencoded ``` ### Basic collection sharing Share a collection with read-only access: ```json { \"metadata_type\": \"COLLECTION\", \"metadata_identifiers\": [\"Sales Reports Collection\"], \"permissions\": [{ \"principal\": { \"type\": \"USER\", \"identifier\": \"alice@company.com\" }, \"share_mode\": \"READ_ONLY\" }], \"notification\": { \"message\": \"I\'ve shared the Sales Reports collection with you\", \"notify_on_share\": true } } ``` ### Collection sharing with dual permissions Share a collection with different permissions for the collection vs. its contents: ```json { \"metadata_type\": \"COLLECTION\", \"metadata_identifiers\": [\"Marketing Analytics\"], \"permissions\": [{ \"principal\": { \"type\": \"USER\", \"identifier\": \"bob@company.com\" }, \"share_mode\": \"MODIFY\", \"content_share_mode\": \"READ_ONLY\" }, { \"principal\": { \"type\": \"USER_GROUP\", \"identifier\": \"Marketing Team\" }, \"share_mode\": \"READ_ONLY\", \"content_share_mode\": \"READ_ONLY\" }], \"notification\": { \"emails\": [\"bob@company.com\"], \"message\": \"You can edit the collection but content is read-only\", \"enable_custom_url\": false, \"notify_on_share\": true }, \"has_lenient_discoverability\": false } ``` ### Multiple collections sharing Share multiple collections with different users: ```json { \"metadata\": [ { \"type\": \"COLLECTION\", \"identifier\": \"Q4 Reports\" }, { \"type\": \"COLLECTION\", \"identifier\": \"Executive Dashboard Collection\" } ], \"permissions\": [{ \"principal\": { \"type\": \"USER_GROUP\", \"identifier\": \"Executives\" }, \"share_mode\": \"MODIFY\" }, { \"principal\": { \"type\": \"USER\", \"identifier\": \"manager@company.com\" }, \"share_mode\": \"READ_ONLY\", \"content_share_mode\": \"MODIFY\" }], \"notification\": { \"message\": \"Sharing quarterly collections with leadership team\", \"notify_on_share\": true } } ``` ### Remove collection access Remove access to a collection by setting share_mode to NO_ACCESS: ```json { \"metadata_type\": \"COLLECTION\", \"metadata_identifiers\": [\"Confidential Reports\"], \"permissions\": [{ \"principal\": { \"type\": \"USER\", \"identifier\": \"former-employee@company.com\" }, \"share_mode\": \"NO_ACCESS\" }], \"notification\": { \"notify_on_share\": false } } ``` ### Collection Permission Scenarios **Scenario 1: Collection Admin** - `share_mode: MODIFY` + `content_share_mode: MODIFY` = Full control over collection and its contents **Scenario 2: Collection Curator** - `share_mode: MODIFY` + `content_share_mode: READ_ONLY` = Can manage collection structure but not edit contents **Scenario 3: Content Editor** - `share_mode: READ_ONLY` + `content_share_mode: MODIFY` = Can edit objects within collection but can\'t change collection itself **Scenario 4: Viewer** - `share_mode: READ_ONLY` + `content_share_mode: READ_ONLY` = View-only access to collection and contents + * @param shareMetadataRequest + */ + shareMetadata(shareMetadataRequest, _options) { + const requestContextPromise = this.requestFactory.shareMetadata(shareMetadataRequest, _options); + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx) => middleware.pre(ctx))); + } + return middlewarePreObservable.pipe(mergeMap((ctx) => this.configuration.httpApi.send(ctx))).pipe(mergeMap((response) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp) => this.responseProcessor.shareMetadata(rsp))); + })); + } + /** + * Version: 10.4.0.cl or later Processes a natural language query against a specified data model and returns a single AI-generated answer without requiring a conversation session. Requires `CAN_USE_SPOTTER` privilege and at least view access to the metadata object specified in the request. #### Usage guidelines The request must include: - `query`: a natural language question (e.g., \"What were total sales last quarter?\") - `metadata_identifier`: the unique ID of the data source to query against If the request is successful, the API returns a response message containing: - `session_identifier`: the unique ID of the generated response - `generation_number`: the generation number of the response - `message_type`: the type of the response (e.g., `TSAnswer`) - `visualization_type`: the generated visualization type (`Chart`, `Table`, or `Undefined`) - `tokens` / `display_tokens`: the search tokens and user-friendly display tokens for the response #### Error responses | Code | Description | |------|-----------------------------------------------------------------------------------------------------------------------------------------| | 401 | Unauthorized — authentication token is missing, expired, or invalid. | | 403 | Forbidden — the authenticated user does not have `CAN_USE_SPOTTER` privilege or lacks view permission on the specified metadata object. | > ###### Note: > * This endpoint is currently in Beta. Breaking changes may be introduced before the endpoint is made Generally Available. > * This endpoint requires Spotter - please contact ThoughtSpot support to enable Spotter on your cluster. + * @param singleAnswerRequest + */ + singleAnswer(singleAnswerRequest, _options) { + const requestContextPromise = this.requestFactory.singleAnswer(singleAnswerRequest, _options); + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx) => middleware.pre(ctx))); + } + return middlewarePreObservable.pipe(mergeMap((ctx) => this.configuration.httpApi.send(ctx))).pipe(mergeMap((response) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp) => this.responseProcessor.singleAnswer(rsp))); + })); + } + /** + * Stops an in-progress agent conversation response. Version: 26.6.0.cl or later Version: 26.6.0.cl or later Stops an in-progress agent response for the specified conversation. Use this endpoint to cancel a response that is actively being generated — for example, when the user navigates away, reformulates their question, or no longer needs the current result. Requires `CAN_USE_SPOTTER` privilege and access to the specified conversation. #### Usage guidelines The request must include: - `conversation_identifier` *(path parameter)*: the unique ID of the conversation whose active response should be stopped, as returned by `createAgentConversation` A successful request returns an empty `204 No Content` response. If there is no active response in progress at the time of the call, the request is still treated as successful. After stopping a response, the conversation session remains active. You can continue sending messages using `sendAgentConversationMessage` or `sendAgentConversationMessageStreaming`. #### Example request ```bash POST /api/rest/2.0/ai/agent/conversation/{conversation_identifier}/stop-response ``` #### Typical usage scenario This endpoint is useful when integrating Spotter into a chat UI where users can cancel a long-running query. For example: 1. User sends a message via `sendAgentConversationMessageStreaming`. 2. User clicks a \"Stop generating\" button while the response is streaming. 3. Your client calls `stopConversation` with the active `conversation_identifier`. 4. The stream is terminated and the user can ask a new question. #### Error responses | Code | Description | |------|-------------| | 401 | Unauthorized — authentication token is missing, expired, or invalid. | | 403 | Forbidden — the authenticated user does not have `CAN_USE_SPOTTER` privilege or lacks access to the specified conversation. | > ###### Note: > > - Calling this endpoint when no response is in progress does not return an error. > - The conversation context is preserved after stopping — previous messages and answers remain accessible. > - Available from version 26.6.0.cl and later. > - This endpoint requires Spotter — please contact ThoughtSpot Support to enable Spotter on your cluster. > - This feature is available only for **Spotter 3** (`SPOTTER3`) version. + * @param conversationIdentifier Unique identifier of the conversation to stop. + */ + stopConversation(conversationIdentifier, _options) { + const requestContextPromise = this.requestFactory.stopConversation(conversationIdentifier, _options); + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx) => middleware.pre(ctx))); + } + return middlewarePreObservable.pipe(mergeMap((ctx) => this.configuration.httpApi.send(ctx))).pipe(mergeMap((response) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp) => this.responseProcessor.stopConversation(rsp))); + })); + } + /** + * Version: 26.5.0.cl or later Synchronizes connection metadata attributes from your Cloud Data Warehouse (CDW) with ThoughtSpot. Requires the `DATAMANAGEMENT` (**Can manage data**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` (**Can manage data models**) privilege is required. #### Usage guidelines To synchronize attributes from a CDW, specify the connection GUID or name in the `connection_identifier` path parameter and `sync_attributes` in the request body. Default attribute is `[\"DESCRIPTION\"]`. ##### Hierarchical schema * Connection: The connection object for the sync operation. * Tables: Tables for the sync operation. When no table is specified, all tables are synchronized. * Columns: If the table is specified, you can add the columns for the sync operation. If no columns are specified, all columns in the specified table are considered for the sync operation. To set the scope for the sync operation: * Connection-level: To sync all tables and columns, pass an empty request body, or only the attributes in the request body. * Table-level: To synchronize specific tables and their columns, specify the table identifiers in the `tables` array. * Column-level: To synchronize specific columns, specify the table identifier as the key and column identifiers as the value in the `tables` array. ``` { \"tables\": [ {\"table-guid-1\": [\"column-guid-1\", \"column-guid-2\"]}, \"table-guid-2\" ], \"sync_attributes\": [\"DESCRIPTION\"] } ``` ##### API response If the sync operation is successful, the API returns the following information: * Status of the sync operation. For example, `SUCCESS`, `PARTIAL_SUCCESS`, or `NO_UPDATE`. * Number of tables and columns that were updated. * Number of tables and columns with the sync failed status when the overall sync status is `PARTIAL_SUCCESS`. * Message text indicating the sync results. + * @param connectionIdentifier Unique ID or name of the connection. + * @param syncMetadataRequest + */ + syncMetadata(connectionIdentifier, syncMetadataRequest, _options) { + const requestContextPromise = this.requestFactory.syncMetadata(connectionIdentifier, syncMetadataRequest, _options); + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx) => middleware.pre(ctx))); + } + return middlewarePreObservable.pipe(mergeMap((ctx) => this.configuration.httpApi.send(ctx))).pipe(mergeMap((response) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp) => this.responseProcessor.syncMetadata(rsp))); + })); + } + /** + * Version: 9.0.0.cl or later Removes the tags applied to a Liveboard, Answer, Table, or Worksheet. Requires edit access to the metadata object. + * @param unassignTagRequest + */ + unassignTag(unassignTagRequest, _options) { + const requestContextPromise = this.requestFactory.unassignTag(unassignTagRequest, _options); + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx) => middleware.pre(ctx))); + } + return middlewarePreObservable.pipe(mergeMap((ctx) => this.configuration.httpApi.send(ctx))).pipe(mergeMap((response) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp) => this.responseProcessor.unassignTag(rsp))); + })); + } + /** + * Remove parameterization from fields in metadata objects. Version: 26.5.0.cl or later Allows removing parameterization from fields in metadata objects in ThoughtSpot. Requires appropriate permissions to modify the metadata object. The API endpoint allows unparameterizing the following types of metadata objects: * Logical Tables * Connections * Connection Configs For a Logical Table the field type must be `ATTRIBUTE` and field name can be one of: * databaseName * schemaName * tableName For a Connection or Connection Config, the field type is always `CONNECTION_PROPERTY`. In this case, field_name specifies the exact property of the Connection or Connection Config that needs to be unparameterized. For Connection Config, the only supported field name is: * impersonate_user + * @param unparameterizeMetadataRequest + */ + unparameterizeMetadata(unparameterizeMetadataRequest, _options) { + const requestContextPromise = this.requestFactory.unparameterizeMetadata(unparameterizeMetadataRequest, _options); + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx) => middleware.pre(ctx))); + } + return middlewarePreObservable.pipe(mergeMap((ctx) => this.configuration.httpApi.send(ctx))).pipe(mergeMap((response) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp) => this.responseProcessor.unparameterizeMetadata(rsp))); + })); + } + /** + * Version: 26.5.0.cl or later Allows unpublishing metadata objects from organizations in ThoughtSpot. Requires ADMINISTRATION role and TENANT scope. The API endpoint allows unpublishing the following types of metadata objects: * Liveboards * Answers * Logical Tables When unpublishing objects, you can: * Include dependencies by setting `include_dependencies` to true - this will unpublish all dependent objects if no other published object is using them * Force unpublish by setting `force` to true - this will break all dependent objects in the unpublished organizations + * @param unpublishMetadataRequest + */ + unpublishMetadata(unpublishMetadataRequest, _options) { + const requestContextPromise = this.requestFactory.unpublishMetadata(unpublishMetadataRequest, _options); + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx) => middleware.pre(ctx))); + } + return middlewarePreObservable.pipe(mergeMap((ctx) => this.configuration.httpApi.send(ctx))).pipe(mergeMap((response) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp) => this.responseProcessor.unpublishMetadata(rsp))); + })); + } + /** + * Version: 10.12.0.cl or later Updates the properties of a [custom calendar](https://docs.thoughtspot.com/cloud/latest/connections-cust-cal). Requires `DATAMANAGEMENT` (**Can manage data**) or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your ThoughtSpot instance, the `CAN_MANAGE_CUSTOM_CALENDAR` (**Can manage custom calendars**) privilege is required. #### Usage guidelines You can update the properties of a calendar using one of the following methods: * `FROM_INPUT_PARAMS` to update the calendar properties with the values defined in the API request. * `FROM_EXISTING_TABLE` Creates a calendar from the parameters defined in the API request. To update a custom calendar, specify the calendar ID as a path parameter in the request URL and the following parameters in the request body: * Connection ID and Table name * Database and schema name attributes: For most Cloud Data Warehouse (CDW) connectors, both `database_name` and `schema_name` attributes are required. However, the attribute requirements are conditional and vary based on the connector type and its metadata structure. For example, for connectors such as Teradata, MySQL, SingleSore, Amazon Aurora MySQL, Amazon RDS MySQL, Oracle, and GCP_MYSQL, the `schema_name` is required, whereas the `database_name` attribute is not. Similarly, connectors such as ClickHouse require you to specify the `database_name` and the schema specification in such cases is optional. The API allows you to modify the calendar type, month offset value, start and end date, starting day of the week, and prefixes assigned to the year and quarter labels. #### Examples Update a custom calendar using an existing Table in ThoughtSpot: ``` { \"update_method\": \"FROM_EXISTING_TABLE\", \"table_reference\": { \"connection_identifier\": \"Connection1\", \"database_name\": \"db1\", \"table_name\": \"custom_calendar_2025\", \"schame_name\": \"schemaVar\" } } ``` Update a custom calendar with the attributes defined in the API request: ``` { \"update_method\": \"FROM_INPUT_PARAMS\", \"table_reference\": { \"connection_identifier\": \"Connection1\", \"database_name\": \"db1\", \"table_name\": \"custom_calendar_2025\", \"schame_name\": \"schemaVar\" }, \"month_offset\": \"August\", \"start_day_of_week\": \"Monday\", \"start_date\": \"08/01/2025\", \"end_date\": \"07/31/2026\" } ``` + * @param calendarIdentifier Unique Id or name of the calendar. + * @param updateCalendarRequest + */ + updateCalendar(calendarIdentifier, updateCalendarRequest, _options) { + const requestContextPromise = this.requestFactory.updateCalendar(calendarIdentifier, updateCalendarRequest, _options); + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx) => middleware.pre(ctx))); + } + return middlewarePreObservable.pipe(mergeMap((ctx) => this.configuration.httpApi.send(ctx))).pipe(mergeMap((response) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp) => this.responseProcessor.updateCalendar(rsp))); + })); + } + /** + * Version: 26.4.0.cl or later Updates an existing collection in ThoughtSpot. #### Supported operations This API endpoint lets you perform the following operations: * Update collection name and description * Change visibility settings * Add metadata objects to the collection (operation: ADD) * Remove metadata objects from the collection (operation: REMOVE) * Replace all metadata objects in the collection (operation: REPLACE) #### Operation types * **ADD**: Adds the specified metadata objects to the existing collection without removing current items * **REMOVE**: Removes only the specified metadata objects from the collection * **REPLACE**: Replaces all existing metadata objects with the specified items (default behavior) + * @param collectionIdentifier Unique GUID of the collection. Note: Collection names cannot be used as identifiers since duplicate names are allowed. + * @param updateCollectionRequest + */ + updateCollection(collectionIdentifier, updateCollectionRequest, _options) { + const requestContextPromise = this.requestFactory.updateCollection(collectionIdentifier, updateCollectionRequest, _options); + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx) => middleware.pre(ctx))); + } + return middlewarePreObservable.pipe(mergeMap((ctx) => this.configuration.httpApi.send(ctx))).pipe(mergeMap((response) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp) => this.responseProcessor.updateCollection(rsp))); + })); + } + /** + * Version: 10.12.0.cl or later Creates, updates, or deletes column security rules for specified tables. This API endpoint allows you to create, update, or delete column-level security rules on columns of a table. The operation follows an \"all or none\" policy: if defining security rules for any of the provided columns fails, the entire operation will be rolled back, and no rules will be created. #### Usage guidelines - Provide table identifier using either `identifier` (GUID or name) or `obj_identifier` (object ID) - Use `clear_csr: true` to remove all column security rules from the table - For each column, specify the security rule using `column_security_rules` array - Use `is_unsecured: true` to mark a specific column as unprotected - Use `group_access` operations to manage group associations: - `ADD`: Add groups to the column\'s access list - `REMOVE`: Remove groups from the column\'s access list - `REPLACE`: Replace all existing groups with the specified groups #### Required permissions - `ADMINISTRATION` - Can administer ThoughtSpot - `DATAMANAGEMENT` - Can manage data (if RBAC is disabled) - `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` - Can manage worksheet views and tables (if RBAC is enabled) #### Example request ```json { \"identifier\": \"table-guid\", \"obj_identifier\": \"table-object-id\", \"clear_csr\": false, \"column_security_rules\": [ { \"column_identifier\": \"col id or col name\", \"is_unsecured\": false, \"group_access\": [ { \"operation\": \"ADD\", \"group_identifiers\": [\"hr_group_id\", \"hr_group_name\", \"finance_group_id\"] } ] }, { \"column_identifier\": \"col id or col name\", \"is_unsecured\": true }, { \"column_identifier\": \"col id or col name\", \"is_unsecured\": false, \"group_access\": [ { \"operation\": \"REPLACE\", \"group_identifiers\": [\"management_group_id\", \"management_group_name\"] } ] } ] } ``` #### Request Body Schema - `identifier` (string, optional): GUID or name of the table for which we want to create column security rules - `obj_identifier` (string, optional): The object ID of the table - `clear_csr` (boolean, optional): If true, then all the secured columns will be marked as unprotected, and all the group associations will be removed - `column_security_rules` (array of objects, required): An array where each object defines the security rule for a specific column Each column security rule object contains: - `column_identifier` (string, required): Column identifier (col_id or name) - `is_unsecured` (boolean, optional): If true, the column will be marked as unprotected and all groups associated with it will be removed - `group_access` (array of objects, optional): Array of group operation objects Each group operation object contains: - `operation` (string, required): Operation type - ADD, REMOVE, or REPLACE - `group_identifiers` (array of strings, required): Array of group identifiers (name or GUID) on which the operation will be performed #### Response This API does not return any response body. A successful operation returns HTTP 200 status code. #### Operation Types - **ADD**: Adds the specified groups to the column\'s access list - **REMOVE**: Removes the specified groups from the column\'s access list - **REPLACE**: Replaces all existing groups with the specified groups + * @param updateColumnSecurityRulesRequest + */ + updateColumnSecurityRules(updateColumnSecurityRulesRequest, _options) { + const requestContextPromise = this.requestFactory.updateColumnSecurityRules(updateColumnSecurityRulesRequest, _options); + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx) => middleware.pre(ctx))); + } + return middlewarePreObservable.pipe(mergeMap((ctx) => this.configuration.httpApi.send(ctx))).pipe(mergeMap((response) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp) => this.responseProcessor.updateColumnSecurityRules(rsp))); + })); + } + /** + * Version: 9.2.0.cl or later Updates Git repository configuration settings. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance on your instance, the `CAN_SETUP_VERSION_CONTROL` (**Can set up version control**) privilege. + * @param updateConfigRequest + */ + updateConfig(updateConfigRequest, _options) { + const requestContextPromise = this.requestFactory.updateConfig(updateConfigRequest, _options); + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx) => middleware.pre(ctx))); + } + return middlewarePreObservable.pipe(mergeMap((ctx) => this.configuration.httpApi.send(ctx))).pipe(mergeMap((response) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp) => this.responseProcessor.updateConfig(rsp))); + })); + } + /** + * Version: 9.2.0.cl or later **Important**: This endpoint is deprecated and will be removed from ThoughtSpot in September 2025. ThoughtSpot strongly recommends using the [Update connection V2](#/http/api-endpoints/connections/update-connection-v2) endpoint to update your connection objects. #### Usage guidelines Updates a connection object. Requires `DATAMANAGEMENT` (**Can manage data**) and edit permissions to the connection object, or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) privilege is required. To update a connection object, pass these parameters in your API request: 1. GUID of the connection object. 2. If you are updating tables or database schema of a connection object: a. Add the updated JSON map of metadata with database, schema, and tables in `data_warehouse_config`. b. Set `validate` to `true`. 3. If you are updating a configuration attribute, connection name, or description, you can set `validate` to `false`. + * @param updateConnectionRequest + */ + updateConnection(updateConnectionRequest, _options) { + const requestContextPromise = this.requestFactory.updateConnection(updateConnectionRequest, _options); + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx) => middleware.pre(ctx))); + } + return middlewarePreObservable.pipe(mergeMap((ctx) => this.configuration.httpApi.send(ctx))).pipe(mergeMap((response) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp) => this.responseProcessor.updateConnection(rsp))); + })); + } + /** + * Version: 10.12.0.cl or later Updates a connection configuration object. Requires `DATAMANAGEMENT` (**Can manage data**) and edit permissions to the connection object, or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) privilege is required. #### Supported operations This API endpoint lets you perform the following operations in a single API request: * Edit the name or description of the configuration * Edit the configuration properties * Edit the `policy_type` * Edit the type of authentication * Enable or disable a configuration #### Parameterized Connection Support For parameterized oauth based connections, only the `same_as_parent` and `policy_process_options` attributes are allowed. These attributes are not applicable to connections that are not parameterized. **NOTE**: When updating a configuration where `disabled` is `true`, you must reset `disabled` to `true` in your update request payload. If not explicitly set again, the API will default `disabled` to `false`. + * @param configurationIdentifier Unique ID or name of the configuration. + * @param updateConnectionConfigurationRequest + */ + updateConnectionConfiguration(configurationIdentifier, updateConnectionConfigurationRequest, _options) { + const requestContextPromise = this.requestFactory.updateConnectionConfiguration(configurationIdentifier, updateConnectionConfigurationRequest, _options); + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx) => middleware.pre(ctx))); + } + return middlewarePreObservable.pipe(mergeMap((ctx) => this.configuration.httpApi.send(ctx))).pipe(mergeMap((response) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp) => this.responseProcessor.updateConnectionConfiguration(rsp))); + })); + } + /** + * Version: 26.6.0.cl or later Activates or deactivates a connection. A deactivated connection cannot be used for queries or operations until it is activated again. Requires `DATAMANAGEMENT` (**Can manage data**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) privilege is required. Only the connection owner or an administrator can perform this operation. #### Usage guidelines To update the status of a connection, specify the connection GUID or name in the `connection_identifier` path parameter and the desired `status` in the request body. - **ACTIVATED**: Enables the connection. Queries and operations can resume on an activated connection. - **DEACTIVATED**: Disables the connection. It does not remove the connection metadata, but only makes the connection unavailable for queries and operations. You can reactivate a deactivated connection by setting \"status\": \"ACTIVATED\". + * @param connectionIdentifier Unique ID or name of the connection. + * @param updateConnectionStatusRequest + */ + updateConnectionStatus(connectionIdentifier, updateConnectionStatusRequest, _options) { + const requestContextPromise = this.requestFactory.updateConnectionStatus(connectionIdentifier, updateConnectionStatusRequest, _options); + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx) => middleware.pre(ctx))); + } + return middlewarePreObservable.pipe(mergeMap((ctx) => this.configuration.httpApi.send(ctx))).pipe(mergeMap((response) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp) => this.responseProcessor.updateConnectionStatus(rsp))); + })); + } + /** + * Version: 10.4.0.cl or later Updates a connection object. Requires `DATAMANAGEMENT` (**Can manage data**) and edit permissions to the connection object, or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) privilege is required. To update a connection object, pass these parameters in your API request: 1. GUID of the connection object. 2. If you are updating tables or database schema of a connection object: a. Add the updated JSON map of metadata with database, schema, and tables in `data_warehouse_config`. b. Set `validate` to `true`. **NOTE:** If the `authentication_type` is anything other than SERVICE_ACCOUNT, you must explicitly provide the authenticationType property in the payload. If you do not specify authenticationType, the API will default to SERVICE_ACCOUNT as the authentication type. * A JSON map of configuration attributes, database details, and table properties in `data_warehouse_config` as shown in the following example: * This is an example of updating a single table in a empty connection: ``` { \"authenticationType\": \"SERVICE_ACCOUNT\", \"externalDatabases\": [ { \"name\": \"DEVELOPMENT\", \"isAutoCreated\": false, \"schemas\": [ { \"name\": \"TS_dataset\", \"tables\": [ { \"name\": \"DEMORENAME\", \"type\": \"TABLE\", \"description\": \"\", \"selected\": true, \"linked\": true, \"gid\": 0, \"datasetId\": \"-1\", \"subType\": \"\", \"reportId\": \"\", \"viewId\": \"\", \"columns\": [ { \"name\": \"Col1\", \"type\": \"VARCHAR\", \"canImport\": true, \"selected\": true, \"description\": \"\", \"isLinkedActive\": true, \"isAggregate\": false }, { \"name\": \"Col2\", \"type\": \"VARCHAR\", \"canImport\": true, \"selected\": true, \"description\": \"\", \"isLinkedActive\": true, \"isAggregate\": false }, { \"name\": \"Col3\", \"type\": \"VARCHAR\", \"canImport\": true, \"selected\": true, \"description\": \"\", \"isLinkedActive\": true, \"isAggregate\": false }, { \"name\": \"Col312\", \"type\": \"VARCHAR\", \"canImport\": true, \"selected\": true, \"description\": \"\", \"isLinkedActive\": true, \"isAggregate\": false }, { \"name\": \"Col4\", \"type\": \"VARCHAR\", \"canImport\": true, \"selected\": true, \"description\": \"\", \"isLinkedActive\": true, \"isAggregate\": false } ], \"relationships\": [] } ] } ] } ], \"configuration\": { \"password\": \"\", \"database\": \"DEVELOPMENT\", \"role\": \"DEV\", \"accountName\": \"thoughtspot_partner\", \"warehouse\": \"DEMO_WH\", \"user\": \"DEV_USER\" } } ``` * This is an example of updating a single table in an existing connection with tables: ``` { \"authenticationType\": \"SERVICE_ACCOUNT\", \"externalDatabases\": [ { \"name\": \"DEVELOPMENT\", \"isAutoCreated\": false, \"schemas\": [ { \"name\": \"TS_dataset\", \"tables\": [ { \"name\": \"CUSTOMER\", \"type\": \"TABLE\", \"description\": \"\", \"selected\": true, \"linked\": true, \"gid\": 0, \"datasetId\": \"-1\", \"subType\": \"\", \"reportId\": \"\", \"viewId\": \"\", \"columns\": [], \"relationships\": [] }, { \"name\": \"tpch5k_falcon_default_schema_users\", \"type\": \"TABLE\", \"description\": \"\", \"selected\": true, \"linked\": true, \"gid\": 0, \"datasetId\": \"-1\", \"subType\": \"\", \"reportId\": \"\", \"viewId\": \"\", \"columns\": [ { \"name\": \"user_id\", \"type\": \"INT64\", \"canImport\": true, \"selected\": true, \"description\": \"\", \"isLinkedActive\": true, \"isAggregate\": false }, { \"name\": \"product_id\", \"type\": \"INT64\", \"canImport\": true, \"selected\": true, \"description\": \"\", \"isLinkedActive\": true, \"isAggregate\": false }, { \"name\": \"user_cost\", \"type\": \"INT64\", \"canImport\": true, \"selected\": true, \"description\": \"\", \"isLinkedActive\": true, \"isAggregate\": false } ], \"relationships\": [] } ] } ] } ], \"configuration\": { \"password\": \"\", \"database\": \"DEVELOPMENT\", \"role\": \"DEV\", \"accountName\": \"thoughtspot_partner\", \"warehouse\": \"DEMO_WH\", \"user\": \"DEV_USER\" } } ``` 3. If you are updating a configuration attribute, connection name, or description, you can set `validate` to `false`. **NOTE:** If the `authentication_type` is anything other than SERVICE_ACCOUNT, you must explicitly provide the authenticationType property in the payload. If you do not specify authenticationType, the API will default to SERVICE_ACCOUNT as the authentication type. * A JSON map of configuration attributes in `data_warehouse_config`. The following example shows the configuration attributes for a Snowflake connection: ``` { \"configuration\":{ \"accountName\":\"thoughtspot_partner\", \"user\":\"tsadmin\", \"password\":\"TestConn123\", \"role\":\"sysadmin\", \"warehouse\":\"MEDIUM_WH\" }, \"externalDatabases\":[ ] } ``` + * @param connectionIdentifier Unique ID or name of the connection. + * @param updateConnectionV2Request + */ + updateConnectionV2(connectionIdentifier, updateConnectionV2Request, _options) { + const requestContextPromise = this.requestFactory.updateConnectionV2(connectionIdentifier, updateConnectionV2Request, _options); + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx) => middleware.pre(ctx))); + } + return middlewarePreObservable.pipe(mergeMap((ctx) => this.configuration.httpApi.send(ctx))).pipe(mergeMap((response) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp) => this.responseProcessor.updateConnectionV2(rsp))); + })); + } + /** + * Version: 9.6.0.cl or later Updates a custom action. Requires `DEVELOPER` (**Has Developer privilege**) or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `DEVELOPER` (**Has developer privilege**) privilege is required. #### Usage Guidelines The API allows you to modify the following properties: * Name of the custom action * Action availability to groups * Association to metadata objects * Authentication settings for a URL-based action For more information, see [Custom actions](https://developers.thoughtspot.com/docs/custom-action-intro). + * @param customActionIdentifier Unique ID or name of the custom action. + * @param updateCustomActionRequest + */ + updateCustomAction(customActionIdentifier, updateCustomActionRequest, _options) { + const requestContextPromise = this.requestFactory.updateCustomAction(customActionIdentifier, updateCustomActionRequest, _options); + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx) => middleware.pre(ctx))); + } + return middlewarePreObservable.pipe(mergeMap((ctx) => this.configuration.httpApi.send(ctx))).pipe(mergeMap((response) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp) => this.responseProcessor.updateCustomAction(rsp))); + })); + } + /** + * Version: 9.9.0.cl or later Updates a DBT connection object. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege or `DATAMANAGEMENT` (**Can manage data ThoughtSpot**) privilege, along with an existing DBT connection. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the following data control privileges may be required: - `CAN_MANAGE_CUSTOM_CALENDAR`(**Can manage custom calendars**) - `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) - `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` (**Can manage data models**) #### About update DBT connection You can modify DBT connection object properties such as embrace connection name, embrace database name, import type, account identifier, access token, project identifier and environment (or) embrace connection, embrace database name, import type, file_content settings. + * @param dbtConnectionIdentifier Unique ID of the DBT Connection. + * @param connectionName Name of the connection. + * @param databaseName Name of the Database. + * @param importType Mention type of Import + * @param accessToken Access token is mandatory when Import_Type is DBT_CLOUD. + * @param dbtUrl DBT URL is mandatory when Import_Type is DBT_CLOUD. + * @param accountId Account ID is mandatory when Import_Type is DBT_CLOUD + * @param projectId Project ID is mandatory when Import_Type is DBT_CLOUD + * @param dbtEnvId DBT Environment ID\\\" + * @param projectName Name of the project + * @param fileContent Upload DBT Manifest and Catalog artifact files as a ZIP file. This field is Mandatory when Import Type is \\\'ZIP_FILE\\\' + */ + updateDbtConnection(dbtConnectionIdentifier, connectionName, databaseName, importType, accessToken, dbtUrl, accountId, projectId, dbtEnvId, projectName, fileContent, _options) { + const requestContextPromise = this.requestFactory.updateDbtConnection(dbtConnectionIdentifier, connectionName, databaseName, importType, accessToken, dbtUrl, accountId, projectId, dbtEnvId, projectName, fileContent, _options); + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx) => middleware.pre(ctx))); + } + return middlewarePreObservable.pipe(mergeMap((ctx) => this.configuration.httpApi.send(ctx))).pipe(mergeMap((response) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp) => this.responseProcessor.updateDbtConnection(rsp))); + })); + } + /** + * Version: 10.12.0.cl or later Updates a customization configuration for the notification email. #### Pre-requisites Requires `DEVELOPER` (**has developer privilege**) or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `DEVELOPER` (**Has developer privilege**) privilege is required. **NOTE**:This endpoint in currently in beta. Contact ThoughtSpot support to enable this on your instance. #### Usage guidelines To update a custom configuration pass these parameters in your API request: - A JSON map of configuration attributes `template_properties`. The following example shows a sample set of customization configuration: ``` { { \"cta_button_bg_color\": \"#444DEA\", \"cta_text_font_color\": \"#FFFFFF\", \"primary_bg_color\": \"#D3DEF0\", \"logo_url\": \"https://storage.pardot.com/710713/1642089901EbkRibJq/TS_fullworkmark_darkmode.png\", \"font_family\": \"\", \"product_name\": \"ThoughtSpot\", \"footer_address\": \"444 Castro St, Suite 1000 Mountain View, CA 94041\", \"footer_phone\": \"(800) 508-7008\", \"replacement_value_for_liveboard\": \"Dashboard\", \"replacement_value_for_answer\": \"Chart\", \"replacement_value_for_spot_iq\": \"AI Insights\", \"hide_footer_phone\": false, \"hide_footer_address\": false, \"hide_product_name\": false, \"hide_manage_notification\": false, \"hide_mobile_app_nudge\": false, \"hide_privacy_policy\": false, \"hide_ts_vocabulary_definitions\": false, \"hide_error_message\": false, \"hide_unsubscribe_link\": false, \"hide_notification_status\": false, \"hide_modify_alert\": false, \"company_website_url\": \"https://your-website.com/\", \"company_privacy_policy_url\" : \"https://link-to-privacy-policy.com/\", \"contact_support_url\": \"https://link-to-contact-support.com/\", \"hide_contact_support_url\": false, \"hide_logo_url\" : false } } ``` + * @param updateEmailCustomizationRequest + */ + updateEmailCustomization(updateEmailCustomizationRequest, _options) { + const requestContextPromise = this.requestFactory.updateEmailCustomization(updateEmailCustomizationRequest, _options); + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx) => middleware.pre(ctx))); + } + return middlewarePreObservable.pipe(mergeMap((ctx) => this.configuration.httpApi.send(ctx))).pipe(mergeMap((response) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp) => this.responseProcessor.updateEmailCustomization(rsp))); + })); + } + /** + * Update header attributes for a given list of header objects. Version: 10.6.0.cl or later ## Prerequisites - **Privileges Required:** - `DATAMANAGEMENT` (Can manage data) or `ADMINISTRATION` (Can administer ThoughtSpot). - **Additional Privileges (if RBAC is enabled):** - `ORG_ADMINISTRATION` (Can manage orgs). --- ## Usage Guidelines ### Parameters 1. **headers_update** - **Description:** List of header objects with their attributes to be updated. Each object contains a list of attributes to be updated in the header. - **Usage:** - You must provide either `identifier` or `obj_identifier`, but not both. Both fields cannot be empty. - When `org_identifier` is set to `-1`, only the `identifier` value is accepted; `obj_identifier` is not allowed. 2. **org_identifier** - **Description:** GUID (Globally Unique Identifier) or name of the organization. - **Usage:** - Leaving this field empty assumes that the changes should be applied to the current organization - Provide `org_guid` or `org_name` to uniquely identify the organization where changes need to be applied. . - Provide `-1` if changes have to be applied across all the org. --- ## Note Currently, this API is enabled only for updating the `obj_identifier` attribute. Only `text` will be allowed in attribute\'s value. ## Best Practices 1. **Backup Before Conversion:** Always export metadata as a backup before initiating the update process --- ## Examples ### Only `identifier` is given ```json { \"headers_update\": [ { \"identifier\": \"guid_1\", \"obj_identifier\": \"\", \"type\": \"LOGICAL_COLUMN\", \"attributes\": [ { \"name\": \"obj_id\", \"value\": \"custom_object_id\" } ] } ], \"org_identifier\": \"orgGuid\" } ``` ### Only `obj_identifier` is given ```json { \"headers_update\": [ { \"obj_identifier\": \"custom_object_id\", \"type\": \"ANSWER\", \"attributes\": [ { \"name\": \"obj_id\", \"value\": \"custom_object_id\" } ] } ], \"org_identifier\": \"orgName\" } ``` ### Executing update for all org `-1` ```json { \"headers_update\": [ { \"identifier\": \"guid_1\", \"type\": \"ANSWER\", \"attributes\": [ { \"name\": \"obj_id\", \"value\": \"custom_object_id\" } ] } ], \"org_identifier\": -1 } ``` ### Optional `type` is not provided ```json { \"headers_update\": [ { \"identifier\": \"guid_1\", \"attributes\": [ { \"name\": \"obj_id\", \"value\": \"custom_object_id\" } ] } ], \"org_identifier\": -1 } ``` + * @param updateMetadataHeaderRequest + */ + updateMetadataHeader(updateMetadataHeaderRequest, _options) { + const requestContextPromise = this.requestFactory.updateMetadataHeader(updateMetadataHeaderRequest, _options); + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx) => middleware.pre(ctx))); + } + return middlewarePreObservable.pipe(mergeMap((ctx) => this.configuration.httpApi.send(ctx))).pipe(mergeMap((response) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp) => this.responseProcessor.updateMetadataHeader(rsp))); + })); + } + /** + * Update object IDs for given metadata objects. Version: 10.8.0.cl or later ## Prerequisites - **Privileges Required:** - `DATAMANAGEMENT` (Can manage data) or `ADMINISTRATION` (Can administer ThoughtSpot). - **Additional Privileges (if RBAC is enabled):** - `ORG_ADMINISTRATION` (Can manage orgs). --- ## Usage Guidelines ### Parameters 1. **metadata** - **Description:** List of metadata objects to update their object IDs. - **Usage:** - Use either `current_obj_id` alone OR use `metadata_identifier` with `type` (when needed). - When using `metadata_identifier`, the `type` field is required if using a name instead of a GUID. - The `new_obj_id` field is always required. --- ## Note This API is specifically designed for updating object IDs of metadata objects. It internally uses the header update mechanism to perform the changes. ## Best Practices 1. **Backup Before Update:** Always export metadata as a backup before initiating the update process. 2. **Validation:** - When using `current_obj_id`, ensure it matches the existing object ID exactly. - When using `metadata_identifier` with a name, ensure the `type` is specified correctly. - Verify that the `new_obj_id` follows your naming conventions and is unique within your system. --- ## Examples ### Using current_obj_id ```json { \"metadata\": [ { \"current_obj_id\": \"existing_object_id\", \"new_obj_id\": \"new_object_id\" } ] } ``` ### Using metadata_identifier with GUID ```json { \"metadata\": [ { \"metadata_identifier\": \"01234567-89ab-cdef-0123-456789abcdef\", \"new_obj_id\": \"new_object_id\" } ] } ``` ### Using metadata_identifier with name and type ```json { \"metadata\": [ { \"metadata_identifier\": \"My Answer\", \"type\": \"ANSWER\", \"new_obj_id\": \"new_object_id\" } ] } ``` ### Multiple objects update ```json { \"metadata\": [ { \"current_obj_id\": \"existing_object_id_1\", \"new_obj_id\": \"new_object_id_1\" }, { \"metadata_identifier\": \"My Worksheet\", \"type\": \"LOGICAL_TABLE\", \"new_obj_id\": \"new_object_id_2\" } ] } ``` + * @param updateMetadataObjIdRequest + */ + updateMetadataObjId(updateMetadataObjIdRequest, _options) { + const requestContextPromise = this.requestFactory.updateMetadataObjId(updateMetadataObjIdRequest, _options); + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx) => middleware.pre(ctx))); + } + return middlewarePreObservable.pipe(mergeMap((ctx) => this.configuration.httpApi.send(ctx))).pipe(mergeMap((response) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp) => this.responseProcessor.updateMetadataObjId(rsp))); + })); + } + /** + * Version: 9.0.0.cl or later Updates an Org object. You can modify Org properties such as name, description, and user associations. Requires cluster administration (**Can administer Org**) privileges. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `ORG_ADMINISTRATION` (**Can manage Orgs**) privilege is required. + * @param orgIdentifier ID or name of the Org + * @param updateOrgRequest + */ + updateOrg(orgIdentifier, updateOrgRequest, _options) { + const requestContextPromise = this.requestFactory.updateOrg(orgIdentifier, updateOrgRequest, _options); + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx) => middleware.pre(ctx))); + } + return middlewarePreObservable.pipe(mergeMap((ctx) => this.configuration.httpApi.send(ctx))).pipe(mergeMap((response) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp) => this.responseProcessor.updateOrg(rsp))); + })); + } + /** + * Version: 9.5.0.cl or later Updates the properties of a Role object. Available only if [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance. To update a Role, the `ROLE_ADMINISTRATION` (**Can manage roles**) privilege is required. + * @param roleIdentifier Unique ID or name of the Role. + * @param updateRoleRequest + */ + updateRole(roleIdentifier, updateRoleRequest, _options) { + const requestContextPromise = this.requestFactory.updateRole(roleIdentifier, updateRoleRequest, _options); + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx) => middleware.pre(ctx))); + } + return middlewarePreObservable.pipe(mergeMap((ctx) => this.configuration.httpApi.send(ctx))).pipe(mergeMap((response) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp) => this.responseProcessor.updateRole(rsp))); + })); + } + /** + * Update schedule. Version: 9.4.0.cl or later Updates a scheduled Liveboard job. Requires at least edit access to Liveboards. To update a schedule on behalf of another user, you need `ADMINISTRATION` (**Can administer Org**) or `JOBSCHEDULING` (**Can schedule for others**) privilege and edit access to the Liveboard. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `JOBSCHEDULING` (**Can schedule for others**) privilege is required. The API endpoint allows you to pause a scheduled job, change the status of a paused job. You can also edit the recipients list, frequency of the job, format of the file to send to the recipients in email notifications, PDF options, and time zone setting. + * @param scheduleIdentifier Unique ID or name of the schedule. + * @param updateScheduleRequest + */ + updateSchedule(scheduleIdentifier, updateScheduleRequest, _options) { + const requestContextPromise = this.requestFactory.updateSchedule(scheduleIdentifier, updateScheduleRequest, _options); + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx) => middleware.pre(ctx))); + } + return middlewarePreObservable.pipe(mergeMap((ctx) => this.configuration.httpApi.send(ctx))).pipe(mergeMap((response) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp) => this.responseProcessor.updateSchedule(rsp))); + })); + } + /** + * Version: 9.2.0.cl or later Updates the current configuration of the cluster. You must send the configuration data in JSON format. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privileges. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `APPLICATION_ADMINISTRATION` (**Can manage application settings**) privilege is required. + * @param updateSystemConfigRequest + */ + updateSystemConfig(updateSystemConfigRequest, _options) { + const requestContextPromise = this.requestFactory.updateSystemConfig(updateSystemConfigRequest, _options); + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx) => middleware.pre(ctx))); + } + return middlewarePreObservable.pipe(mergeMap((ctx) => this.configuration.httpApi.send(ctx))).pipe(mergeMap((response) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp) => this.responseProcessor.updateSystemConfig(rsp))); + })); + } + /** + * Version: 9.0.0.cl or later Updates a tag object. You can modify the `name` and `color` properties of a tag object. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `TAGMANAGEMENT` (**Can manage tags**) privilege is required to create, edit, and delete tags. + * @param tagIdentifier Name or Id of the tag. + * @param updateTagRequest + */ + updateTag(tagIdentifier, updateTagRequest, _options) { + const requestContextPromise = this.requestFactory.updateTag(tagIdentifier, updateTagRequest, _options); + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx) => middleware.pre(ctx))); + } + return middlewarePreObservable.pipe(mergeMap((ctx) => this.configuration.httpApi.send(ctx))).pipe(mergeMap((response) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp) => this.responseProcessor.updateTag(rsp))); + })); + } + /** + * Version: 9.0.0.cl or later Updates the properties of a user object. You can modify user properties such as username, email, and share notification settings. You can also assign new groups and Orgs, remove the user from a group or Org, reset password, and modify user preferences. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `USER_ADMINISTRATION` (**Can manage users**) privilege is required. + * @param userIdentifier GUID / name of the user + * @param updateUserRequest + */ + updateUser(userIdentifier, updateUserRequest, _options) { + const requestContextPromise = this.requestFactory.updateUser(userIdentifier, updateUserRequest, _options); + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx) => middleware.pre(ctx))); + } + return middlewarePreObservable.pipe(mergeMap((ctx) => this.configuration.httpApi.send(ctx))).pipe(mergeMap((response) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp) => this.responseProcessor.updateUser(rsp))); + })); + } + /** + * Version: 9.0.0.cl or later Updates the properties of a group object in ThoughtSpot. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `GROUP_ADMINISTRATION` (**Can manage groups**) privilege is required. #### Supported operations This API endpoint lets you perform the following operations in a single API request: * Edit [privileges](https://developers.thoughtspot.com/docs/?pageid=api-user-management#group-privileges) * Add or remove users * Change sharing visibility settings * Add or remove sub-groups * Assign a default Liveboard or update the existing settings + * @param groupIdentifier GUID or name of the group. + * @param updateUserGroupRequest + */ + updateUserGroup(groupIdentifier, updateUserGroupRequest, _options) { + const requestContextPromise = this.requestFactory.updateUserGroup(groupIdentifier, updateUserGroupRequest, _options); + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx) => middleware.pre(ctx))); + } + return middlewarePreObservable.pipe(mergeMap((ctx) => this.configuration.httpApi.send(ctx))).pipe(mergeMap((response) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp) => this.responseProcessor.updateUserGroup(rsp))); + })); + } + /** + * Update a variable\'s name Version: 26.4.0.cl or later Allows updating a variable\'s name in ThoughtSpot. Requires ADMINISTRATION role and TENANT scope. The CAN_MANAGE_VARIABLES permission allows you to manage Formula Variables in the current organization scope. The API endpoint allows updating: * The variable name + * @param identifier Unique id or name of the variable to update. + * @param updateVariableRequest + */ + updateVariable(identifier, updateVariableRequest, _options) { + const requestContextPromise = this.requestFactory.updateVariable(identifier, updateVariableRequest, _options); + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx) => middleware.pre(ctx))); + } + return middlewarePreObservable.pipe(mergeMap((ctx) => this.configuration.httpApi.send(ctx))).pipe(mergeMap((response) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp) => this.responseProcessor.updateVariable(rsp))); + })); + } + /** + * Update values for multiple variables Version: 10.14.0.cl or later **Note:** This API endpoint is deprecated and will be removed from ThoughtSpot in a future release. Use [POST /api/rest/2.0/template/variables/{identifier}/update-values](/api/rest/2.0/template/variables/%7Bidentifier%7D/update-values) instead. Allows updating values for multiple variables in ThoughtSpot. Requires ADMINISTRATION role. The CAN_MANAGE_VARIABLES permission allows you to manage Formula Variables in the current organization scope. The API endpoint allows: * Adding new values to variables * Replacing existing values * Deleting values from variables When updating variable values, you need to specify: * The variable identifiers * The values to add/replace/remove for each variable * The operation to perform (ADD, REPLACE, REMOVE, RESET) Behaviour based on operation type: * ADD - Adds values to the variable if this is a list type variable, else same as replace. * REPLACE - Replaces all values of a given set of constraints with the current set of values. * REMOVE - Removes any values which match the set of conditions of the variables if this is a list type variable, else clears value. * RESET - Removes all constrains for a given variable, scope is ignored + * @param updateVariableValuesRequest + */ + updateVariableValues(updateVariableValuesRequest, _options) { + const requestContextPromise = this.requestFactory.updateVariableValues(updateVariableValuesRequest, _options); + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx) => middleware.pre(ctx))); + } + return middlewarePreObservable.pipe(mergeMap((ctx) => this.configuration.httpApi.send(ctx))).pipe(mergeMap((response) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp) => this.responseProcessor.updateVariableValues(rsp))); + })); + } + /** + * Version: 10.14.0.cl or later Updates an existing webhook configuration by its unique id or name. Only the provided fields will be updated. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) or `DEVELOPER` (**Has developer privilege**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, users with `CAN_MANAGE_WEBHOOKS` (**Can manage webhooks**) privilege are also authorized to perform this action. + * @param webhookIdentifier Unique ID or name of the webhook configuration. + * @param updateWebhookConfigurationRequest + */ + updateWebhookConfiguration(webhookIdentifier, updateWebhookConfigurationRequest, _options) { + const requestContextPromise = this.requestFactory.updateWebhookConfiguration(webhookIdentifier, updateWebhookConfigurationRequest, _options); + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx) => middleware.pre(ctx))); + } + return middlewarePreObservable.pipe(mergeMap((ctx) => this.configuration.httpApi.send(ctx))).pipe(mergeMap((response) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp) => this.responseProcessor.updateWebhookConfiguration(rsp))); + })); + } + /** + * Version: 26.4.0.cl or later Validates a communication channel configuration to ensure it is properly set up and can receive events. - Use `channel_type` to specify the type of communication channel to validate (e.g., WEBHOOK). - Use `channel_identifier` to provide the unique identifier or name for the communication channel. - Use `event_type` to specify the event type to validate for this channel. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) or `DEVELOPER` (**Has developer privilege**) privilege. For webhook channels, users with `CAN_MANAGE_WEBHOOKS` (**Can manage webhooks**) privilege are also authorized to perform this action. + * @param validateCommunicationChannelRequest + */ + validateCommunicationChannel(validateCommunicationChannelRequest, _options) { + const requestContextPromise = this.requestFactory.validateCommunicationChannel(validateCommunicationChannelRequest, _options); + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx) => middleware.pre(ctx))); + } + return middlewarePreObservable.pipe(mergeMap((ctx) => this.configuration.httpApi.send(ctx))).pipe(mergeMap((response) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp) => this.responseProcessor.validateCommunicationChannel(rsp))); + })); + } + /** + * Version: 10.10.0.cl or later Validates the email customization configuration if any set for the ThoughtSpot system. #### Pre-requisites Requires `DEVELOPER` (**has developer privilege**) or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `DEVELOPER` (**Has developer privilege**) privilege is required. **NOTE**:This endpoint in currently in beta. Contact ThoughtSpot support to enable this on your instance. + */ + validateEmailCustomization(_options) { + const requestContextPromise = this.requestFactory.validateEmailCustomization(_options); + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx) => middleware.pre(ctx))); + } + return middlewarePreObservable.pipe(mergeMap((ctx) => this.configuration.httpApi.send(ctx))).pipe(mergeMap((response) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp) => this.responseProcessor.validateEmailCustomization(rsp))); + })); + } + /** + * Version: 9.2.0.cl or later Validates the content of your source branch against the objects in your destination environment. Before merging content from your source branch to the destination branch, run this API operation from your destination environment and ensure that the changes from the source branch function in the destination environment. Requires `DATAMANAGEMENT` (**Can manage data**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance on your instance, the `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` (**Can manage data models**) privilege and edit access to the metadata objects. + * @param validateMergeRequest + */ + validateMerge(validateMergeRequest, _options) { + const requestContextPromise = this.requestFactory.validateMerge(validateMergeRequest, _options); + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx) => middleware.pre(ctx))); + } + return middlewarePreObservable.pipe(mergeMap((ctx) => this.configuration.httpApi.send(ctx))).pipe(mergeMap((response) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp) => this.responseProcessor.validateMerge(rsp))); + })); + } + /** + * Version: 9.12.0.cl or later Validates the authentication token specified in the API request. If your token is not valid, [Get a new token](#/http/api-endpoints/authentication/get-full-access-token). + * @param validateTokenRequest + */ + validateToken(validateTokenRequest, _options) { + const requestContextPromise = this.requestFactory.validateToken(validateTokenRequest, _options); + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx) => middleware.pre(ctx))); + } + return middlewarePreObservable.pipe(mergeMap((ctx) => this.configuration.httpApi.send(ctx))).pipe(mergeMap((response) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp) => this.responseProcessor.validateToken(rsp))); + })); + } +}; +var ObservableUsersApi = class { + constructor(configuration, requestFactory, responseProcessor) { + this.configuration = configuration; + this.requestFactory = requestFactory || new UsersApiRequestFactory(configuration); + this.responseProcessor = responseProcessor || new UsersApiResponseProcessor(); + } + /** + * Version: 9.7.0.cl or later Activates a deactivated user account. Requires `ADMINISTRATION` (**Can administer Thoughtspot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `USER_ADMINISTRATION` (**Can manage users**) privilege is required. To activate an inactive user account, the API request body must include the following information: - Username or the GUID of the user account. - Auth token generated for the deactivated user. The auth token is sent in the API response when a user is deactivated. - Password for the user account. + * @param activateUserRequest + */ + activateUser(activateUserRequest, _options) { + const requestContextPromise = this.requestFactory.activateUser(activateUserRequest, _options); + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx) => middleware.pre(ctx))); + } + return middlewarePreObservable.pipe(mergeMap((ctx) => this.configuration.httpApi.send(ctx))).pipe(mergeMap((response) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp) => this.responseProcessor.activateUser(rsp))); + })); + } + /** + * Version: 9.0.0.cl or later Updates the current password of the user. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `USER_ADMINISTRATION` (**Can manage users**) privilege is required. + * @param changeUserPasswordRequest + */ + changeUserPassword(changeUserPasswordRequest, _options) { + const requestContextPromise = this.requestFactory.changeUserPassword(changeUserPasswordRequest, _options); + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx) => middleware.pre(ctx))); + } + return middlewarePreObservable.pipe(mergeMap((ctx) => this.configuration.httpApi.send(ctx))).pipe(mergeMap((response) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp) => this.responseProcessor.changeUserPassword(rsp))); + })); + } + /** + * Version: 9.0.0.cl or later Creates a user in ThoughtSpot. The API endpoint allows you to configure several user properties such as email address, account status, share notification preferences, and sharing visibility. You can provision the user to [groups](https://docs.thoughtspot.com/cloud/latest/groups-privileges) and [Orgs](https://docs.thoughtspot.com/cloud/latest/orgs-overview). You can also add Liveboard, Answer, and Worksheet objects to the user’s favorites list, assign a default Liveboard for the user, and set user preferences. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `USER_ADMINISTRATION` (**Can manage users**) privilege is required. + * @param createUserRequest + */ + createUser(createUserRequest, _options) { + const requestContextPromise = this.requestFactory.createUser(createUserRequest, _options); + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx) => middleware.pre(ctx))); + } + return middlewarePreObservable.pipe(mergeMap((ctx) => this.configuration.httpApi.send(ctx))).pipe(mergeMap((response) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp) => this.responseProcessor.createUser(rsp))); + })); + } + /** + * Version: 9.7.0.cl or later Deactivates a user account. Requires `ADMINISTRATION` (**Can administer Thoughtspot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `USER_ADMINISTRATION` (**Can manage users**) privilege is required. To deactivate a user account, the API request body must include the following information: - Username or the GUID of the user account - Base URL of the ThoughtSpot instance If the API request is successful, ThoughtSpot returns the activation URL in the response. The activation URL is valid for 14 days and can be used to re-activate the account and reset the password of the deactivated account. + * @param deactivateUserRequest + */ + deactivateUser(deactivateUserRequest, _options) { + const requestContextPromise = this.requestFactory.deactivateUser(deactivateUserRequest, _options); + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx) => middleware.pre(ctx))); + } + return middlewarePreObservable.pipe(mergeMap((ctx) => this.configuration.httpApi.send(ctx))).pipe(mergeMap((response) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp) => this.responseProcessor.deactivateUser(rsp))); + })); + } + /** + * Version: 9.0.0.cl or later Deletes a user from the ThoughtSpot system. If you want to remove a user from a specific Org but not from ThoughtSpot, update the group and Org mapping properties of the user object via a POST API call to the [/api/rest/2.0/users/{user_identifier}/update](#/http/api-endpoints/users/update-user) endpoint. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `USER_ADMINISTRATION` (**Can manage users**) privilege is required. + * @param userIdentifier GUID / name of the user + */ + deleteUser(userIdentifier, _options) { + const requestContextPromise = this.requestFactory.deleteUser(userIdentifier, _options); + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx) => middleware.pre(ctx))); + } + return middlewarePreObservable.pipe(mergeMap((ctx) => this.configuration.httpApi.send(ctx))).pipe(mergeMap((response) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp) => this.responseProcessor.deleteUser(rsp))); + })); + } + /** + * Version: 9.0.0.cl or later Enforces logout on current user sessions. Use this API with caution as it may invalidate active user sessions and force users to re-login. Make sure you specify the usernames or GUIDs. If you pass null values in the API call, all user sessions on your cluster become invalid, and the users are forced to re-login. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `USER_ADMINISTRATION` (**Can manage users**) privilege is required. + * @param forceLogoutUsersRequest + */ + forceLogoutUsers(forceLogoutUsersRequest, _options) { + const requestContextPromise = this.requestFactory.forceLogoutUsers(forceLogoutUsersRequest, _options); + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx) => middleware.pre(ctx))); + } + return middlewarePreObservable.pipe(mergeMap((ctx) => this.configuration.httpApi.send(ctx))).pipe(mergeMap((response) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp) => this.responseProcessor.forceLogoutUsers(rsp))); + })); + } + /** + * Version: 9.0.0.cl or later Imports user data from external databases into ThoughtSpot. During the user import operation: * If the specified users are not available in ThoughtSpot, the users are created and assigned a default password. Defining a `default_password` in the API request is optional. * If `delete_unspecified_users` is set to `true`, the users not specified in the API request, excluding the `tsadmin`, `guest`, `system` and `su` users, are deleted. * If the specified user objects are already available in ThoughtSpot, the object properties are updated and synchronized as per the input data in the API request. A successful API call returns the object that represents the changes made in the ThoughtSpot system. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `USER_ADMINISTRATION` (**Can manage users**) privilege is required. + * @param importUsersRequest + */ + importUsers(importUsersRequest, _options) { + const requestContextPromise = this.requestFactory.importUsers(importUsersRequest, _options); + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx) => middleware.pre(ctx))); + } + return middlewarePreObservable.pipe(mergeMap((ctx) => this.configuration.httpApi.send(ctx))).pipe(mergeMap((response) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp) => this.responseProcessor.importUsers(rsp))); + })); + } + /** + * Version: 9.0.0.cl or later Resets the password of a user account. Administrators can reset password on behalf of a user. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `USER_ADMINISTRATION` (**Can manage users**) privilege is required. + * @param resetUserPasswordRequest + */ + resetUserPassword(resetUserPasswordRequest, _options) { + const requestContextPromise = this.requestFactory.resetUserPassword(resetUserPasswordRequest, _options); + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx) => middleware.pre(ctx))); + } + return middlewarePreObservable.pipe(mergeMap((ctx) => this.configuration.httpApi.send(ctx))).pipe(mergeMap((response) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp) => this.responseProcessor.resetUserPassword(rsp))); + })); + } + /** + * Version: 9.0.0.cl or later Gets a list of users available on the ThoughtSpot system. To get details of a specific user, specify the user GUID or name. You can also filter the API response based on groups, Org ID, user visibility, account status, user type, and user preference settings and favorites. Available to all users. Users with `ADMINISTRATION` (**Can administer ThoughtSpot**) privileges can view all users properties. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `USER_ADMINISTRATION` (**Can manage users**) privilege is required. **NOTE**: If the API returns an empty list, consider increasing the value of the `record_size` parameter. To search across all available users, set `record_size` to `-1`. + * @param searchUsersRequest + */ + searchUsers(searchUsersRequest, _options) { + const requestContextPromise = this.requestFactory.searchUsers(searchUsersRequest, _options); + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx) => middleware.pre(ctx))); + } + return middlewarePreObservable.pipe(mergeMap((ctx) => this.configuration.httpApi.send(ctx))).pipe(mergeMap((response) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp) => this.responseProcessor.searchUsers(rsp))); + })); + } + /** + * Version: 9.0.0.cl or later Updates the properties of a user object. You can modify user properties such as username, email, and share notification settings. You can also assign new groups and Orgs, remove the user from a group or Org, reset password, and modify user preferences. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `USER_ADMINISTRATION` (**Can manage users**) privilege is required. + * @param userIdentifier GUID / name of the user + * @param updateUserRequest + */ + updateUser(userIdentifier, updateUserRequest, _options) { + const requestContextPromise = this.requestFactory.updateUser(userIdentifier, updateUserRequest, _options); + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx) => middleware.pre(ctx))); + } + return middlewarePreObservable.pipe(mergeMap((ctx) => this.configuration.httpApi.send(ctx))).pipe(mergeMap((response) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp) => this.responseProcessor.updateUser(rsp))); + })); + } +}; +var ObservableVariableApi = class { + constructor(configuration, requestFactory, responseProcessor) { + this.configuration = configuration; + this.requestFactory = requestFactory || new VariableApiRequestFactory(configuration); + this.responseProcessor = responseProcessor || new VariableApiResponseProcessor(); + } + /** + * Create a variable which can be used for parameterizing metadata objects Version: 26.4.0.cl or later Allows creating a variable which can be used for parameterizing metadata objects in ThoughtSpot. Requires ADMINISTRATION role and TENANT scope. The CAN_MANAGE_VARIABLES permission allows you to manage Formula Variables in the current organization scope. The API endpoint supports the following types of variables: * CONNECTION_PROPERTY - For connection properties * TABLE_MAPPING - For table mappings * CONNECTION_PROPERTY_PER_PRINCIPAL - For connection properties per principal. In order to use this please contact support to enable this. * FORMULA_VARIABLE - For Formula variables, introduced in 10.15.0.cl When creating a variable, you need to specify: * The variable type * A unique name for the variable * Whether the variable contains sensitive values (defaults to false) * The data type of the variable, only specify for formula variables (defaults to null) The operation will fail if: * The user lacks required permissions * The variable name already exists * The variable type is invalid + * @param createVariableRequest + */ + createVariable(createVariableRequest, _options) { + const requestContextPromise = this.requestFactory.createVariable(createVariableRequest, _options); + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx) => middleware.pre(ctx))); + } + return middlewarePreObservable.pipe(mergeMap((ctx) => this.configuration.httpApi.send(ctx))).pipe(mergeMap((response) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp) => this.responseProcessor.createVariable(rsp))); + })); + } + /** + * Delete a variable Version: 10.14.0.cl or later **Note:** This API endpoint is deprecated and will be removed from ThoughtSpot in a future release. Use [POST /api/rest/2.0/template/variables/delete](/api/rest/2.0/template/variables/delete) instead. Allows deleting a variable from ThoughtSpot. Requires ADMINISTRATION role and TENANT scope. The CAN_MANAGE_VARIABLES permission allows you to manage Formula Variables in the current organization scope. The API endpoint requires: * The variable identifier (ID or name) The operation will fail if: * The user lacks required permissions * The variable doesn\'t exist * The variable is being used by other objects + * @param identifier Unique id or name of the variable + */ + deleteVariable(identifier, _options) { + const requestContextPromise = this.requestFactory.deleteVariable(identifier, _options); + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx) => middleware.pre(ctx))); + } + return middlewarePreObservable.pipe(mergeMap((ctx) => this.configuration.httpApi.send(ctx))).pipe(mergeMap((response) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp) => this.responseProcessor.deleteVariable(rsp))); + })); + } + /** + * Delete variable(s) Version: 26.4.0.cl or later Allows deleting multiple variables from ThoughtSpot. Requires ADMINISTRATION role and TENANT scope. The CAN_MANAGE_VARIABLES permission allows you to manage Formula Variables in the current organization scope. The API endpoint requires: * The variable identifiers (IDs or names) The operation will fail if: * The user lacks required permissions * Any of the variables don\'t exist * Any of the variables are being used by other objects + * @param deleteVariablesRequest + */ + deleteVariables(deleteVariablesRequest, _options) { + const requestContextPromise = this.requestFactory.deleteVariables(deleteVariablesRequest, _options); + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx) => middleware.pre(ctx))); + } + return middlewarePreObservable.pipe(mergeMap((ctx) => this.configuration.httpApi.send(ctx))).pipe(mergeMap((response) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp) => this.responseProcessor.deleteVariables(rsp))); + })); + } + /** + * Update values for a variable Version: 26.4.0.cl or later Allows updating values for a specific variable in ThoughtSpot. Requires ADMINISTRATION role. The CAN_MANAGE_VARIABLES permission allows you to manage Formula Variables in the current organization scope. The API endpoint allows: * Adding new values to the variable * Replacing existing values * Deleting values from the variable * Resetting all values When updating variable values, you need to specify: * The variable identifier (ID or name) * The values to add/replace/remove * The operation to perform (ADD, REPLACE, REMOVE, RESET) Behaviour based on operation type: * ADD - Adds values to the variable if this is a list type variable, else same as replace. * REPLACE - Replaces all values of a given set of constraints with the current set of values. * REMOVE - Removes any values which match the set of conditions of the variables if this is a list type variable, else clears value. * RESET - Removes all constraints for the given variable, scope is ignored + * @param identifier Unique ID or name of the variable + * @param putVariableValuesRequest + */ + putVariableValues(identifier, putVariableValuesRequest, _options) { + const requestContextPromise = this.requestFactory.putVariableValues(identifier, putVariableValuesRequest, _options); + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx) => middleware.pre(ctx))); + } + return middlewarePreObservable.pipe(mergeMap((ctx) => this.configuration.httpApi.send(ctx))).pipe(mergeMap((response) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp) => this.responseProcessor.putVariableValues(rsp))); + })); + } + /** + * Search variables Version: 26.4.0.cl or later Allows searching for variables in ThoughtSpot. Requires ADMINISTRATION role. The CAN_MANAGE_VARIABLES permission allows you to manage Formula Variables in the current organization scope. The API endpoint supports searching variables by: * Variable identifier (ID or name) * Variable type * Name pattern (case-insensitive, supports % for wildcard) The search results can be formatted in three ways: * METADATA - Returns only variable metadata (default) * METADATA_AND_VALUES - Returns variable metadata and values The values can be filtered by scope: * org_identifier * principal_identifier * model_identifier + * @param searchVariablesRequest + */ + searchVariables(searchVariablesRequest, _options) { + const requestContextPromise = this.requestFactory.searchVariables(searchVariablesRequest, _options); + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx) => middleware.pre(ctx))); + } + return middlewarePreObservable.pipe(mergeMap((ctx) => this.configuration.httpApi.send(ctx))).pipe(mergeMap((response) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp) => this.responseProcessor.searchVariables(rsp))); + })); + } + /** + * Update a variable\'s name Version: 26.4.0.cl or later Allows updating a variable\'s name in ThoughtSpot. Requires ADMINISTRATION role and TENANT scope. The CAN_MANAGE_VARIABLES permission allows you to manage Formula Variables in the current organization scope. The API endpoint allows updating: * The variable name + * @param identifier Unique id or name of the variable to update. + * @param updateVariableRequest + */ + updateVariable(identifier, updateVariableRequest, _options) { + const requestContextPromise = this.requestFactory.updateVariable(identifier, updateVariableRequest, _options); + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx) => middleware.pre(ctx))); + } + return middlewarePreObservable.pipe(mergeMap((ctx) => this.configuration.httpApi.send(ctx))).pipe(mergeMap((response) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp) => this.responseProcessor.updateVariable(rsp))); + })); + } + /** + * Update values for multiple variables Version: 10.14.0.cl or later **Note:** This API endpoint is deprecated and will be removed from ThoughtSpot in a future release. Use [POST /api/rest/2.0/template/variables/{identifier}/update-values](/api/rest/2.0/template/variables/%7Bidentifier%7D/update-values) instead. Allows updating values for multiple variables in ThoughtSpot. Requires ADMINISTRATION role. The CAN_MANAGE_VARIABLES permission allows you to manage Formula Variables in the current organization scope. The API endpoint allows: * Adding new values to variables * Replacing existing values * Deleting values from variables When updating variable values, you need to specify: * The variable identifiers * The values to add/replace/remove for each variable * The operation to perform (ADD, REPLACE, REMOVE, RESET) Behaviour based on operation type: * ADD - Adds values to the variable if this is a list type variable, else same as replace. * REPLACE - Replaces all values of a given set of constraints with the current set of values. * REMOVE - Removes any values which match the set of conditions of the variables if this is a list type variable, else clears value. * RESET - Removes all constrains for a given variable, scope is ignored + * @param updateVariableValuesRequest + */ + updateVariableValues(updateVariableValuesRequest, _options) { + const requestContextPromise = this.requestFactory.updateVariableValues(updateVariableValuesRequest, _options); + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx) => middleware.pre(ctx))); + } + return middlewarePreObservable.pipe(mergeMap((ctx) => this.configuration.httpApi.send(ctx))).pipe(mergeMap((response) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp) => this.responseProcessor.updateVariableValues(rsp))); + })); + } +}; +var ObservableVersionControlApi = class { + constructor(configuration, requestFactory, responseProcessor) { + this.configuration = configuration; + this.requestFactory = requestFactory || new VersionControlApiRequestFactory(configuration); + this.responseProcessor = responseProcessor || new VersionControlApiResponseProcessor(); + } + /** + * Version: 9.2.0.cl or later Commits TML files of metadata objects to the Git branch configured on your instance. Requires at least edit access to objects used in the commit operation. Before using this endpoint to push your commits: * Enable Git integration on your instance. * Make sure the Git repository and branch details are configured on your instance. For more information, see [Git integration documentation](https://developers.thoughtspot.com/docs/git-integration). + * @param commitBranchRequest + */ + commitBranch(commitBranchRequest, _options) { + const requestContextPromise = this.requestFactory.commitBranch(commitBranchRequest, _options); + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx) => middleware.pre(ctx))); + } + return middlewarePreObservable.pipe(mergeMap((ctx) => this.configuration.httpApi.send(ctx))).pipe(mergeMap((response) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp) => this.responseProcessor.commitBranch(rsp))); + })); + } + /** + * Version: 9.2.0.cl or later Allows you to connect a ThoughtSpot instance to a Git repository. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance on your instance, the `CAN_SETUP_VERSION_CONTROL` (**Can set up version control**) privilege. You can use this API endpoint to connect your ThoughtSpot development and production environments to the development and production branches of a Git repository. Before using this endpoint to connect your ThoughtSpot instance to a Git repository, check the following prerequisites: * You have a Git repository. If you are using GitHub, make sure you have a valid account and an access token to connect ThoughtSpot to GitHub. For information about generating a token, see [GitHub Documentation](https://docs.github.com/en/authentication/keeping-your-account-and-data-secure/managing-your-personal-access-tokens). * Your access token has `repo` scope that grants full access to public and private repositories. * Your Git repository has a branch that can be configured as a default branch in ThoughtSpot. For more information, see [Git integration documentation](https://developers.thoughtspot.com/docs/?pageid=git-integration). **Note**: ThoughtSpot supports only GitHub / itHub Enterprise for CI/CD. + * @param createConfigRequest + */ + createConfig(createConfigRequest, _options) { + const requestContextPromise = this.requestFactory.createConfig(createConfigRequest, _options); + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx) => middleware.pre(ctx))); + } + return middlewarePreObservable.pipe(mergeMap((ctx) => this.configuration.httpApi.send(ctx))).pipe(mergeMap((response) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp) => this.responseProcessor.createConfig(rsp))); + })); + } + /** + * Version: 9.2.0.cl or later Deletes Git repository configuration from your ThoughtSpot instance. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance on your instance, the `CAN_SETUP_VERSION_CONTROL` (**Can set up version control**) privilege. + * @param deleteConfigRequest + */ + deleteConfig(deleteConfigRequest, _options) { + const requestContextPromise = this.requestFactory.deleteConfig(deleteConfigRequest, _options); + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx) => middleware.pre(ctx))); + } + return middlewarePreObservable.pipe(mergeMap((ctx) => this.configuration.httpApi.send(ctx))).pipe(mergeMap((response) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp) => this.responseProcessor.deleteConfig(rsp))); + })); + } + /** + * Version: 9.2.0.cl or later Allows you to deploy a commit and publish TML content to your ThoughtSpot instance. Requires at least edit access to the objects used in the deploy operation. The API deploys the head of the branch unless a `commit_id` is specified in the API request. If the branch name is not defined in the request, the default branch is considered for deploying commits. For more information, see [Git integration documentation](https://developers.thoughtspot.com/docs/git-integration). + * @param deployCommitRequest + */ + deployCommit(deployCommitRequest, _options) { + const requestContextPromise = this.requestFactory.deployCommit(deployCommitRequest, _options); + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx) => middleware.pre(ctx))); + } + return middlewarePreObservable.pipe(mergeMap((ctx) => this.configuration.httpApi.send(ctx))).pipe(mergeMap((response) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp) => this.responseProcessor.deployCommit(rsp))); + })); + } + /** + * Version: 9.2.0.cl or later Reverts TML objects to a previous commit specified in the API request. Requires at least edit access to objects. In the API request, specify the `commit_id`. If the branch name is not specified in the request, the API will consider the default branch configured on your instance. By default, the API reverts all objects. If the revert operation fails for one of the objects provided in the commit, the API returns an error and does not revert any object. For more information, see [Git integration documentation](https://developers.thoughtspot.com/docs/git-integration). + * @param commitId Commit id to which the object should be reverted + * @param revertCommitRequest + */ + revertCommit(commitId, revertCommitRequest, _options) { + const requestContextPromise = this.requestFactory.revertCommit(commitId, revertCommitRequest, _options); + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx) => middleware.pre(ctx))); + } + return middlewarePreObservable.pipe(mergeMap((ctx) => this.configuration.httpApi.send(ctx))).pipe(mergeMap((response) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp) => this.responseProcessor.revertCommit(rsp))); + })); + } + /** + * Version: 9.2.0.cl or later Gets a list of commits for a given metadata object. Requires `DATAMANAGEMENT` (**Can manage data**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance on your instance, the `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` (**Can manage data models**) privilege and edit access to the metadata objects. + * @param searchCommitsRequest + */ + searchCommits(searchCommitsRequest, _options) { + const requestContextPromise = this.requestFactory.searchCommits(searchCommitsRequest, _options); + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx) => middleware.pre(ctx))); + } + return middlewarePreObservable.pipe(mergeMap((ctx) => this.configuration.httpApi.send(ctx))).pipe(mergeMap((response) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp) => this.responseProcessor.searchCommits(rsp))); + })); + } + /** + * Version: 9.2.0.cl or later Gets Git repository connections configured on the ThoughtSpot instance. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance on your instance, the `CAN_SETUP_VERSION_CONTROL` (**Can set up version control**) privilege. + * @param searchConfigRequest + */ + searchConfig(searchConfigRequest, _options) { + const requestContextPromise = this.requestFactory.searchConfig(searchConfigRequest, _options); + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx) => middleware.pre(ctx))); + } + return middlewarePreObservable.pipe(mergeMap((ctx) => this.configuration.httpApi.send(ctx))).pipe(mergeMap((response) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp) => this.responseProcessor.searchConfig(rsp))); + })); + } + /** + * Version: 9.2.0.cl or later Updates Git repository configuration settings. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance on your instance, the `CAN_SETUP_VERSION_CONTROL` (**Can set up version control**) privilege. + * @param updateConfigRequest + */ + updateConfig(updateConfigRequest, _options) { + const requestContextPromise = this.requestFactory.updateConfig(updateConfigRequest, _options); + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx) => middleware.pre(ctx))); + } + return middlewarePreObservable.pipe(mergeMap((ctx) => this.configuration.httpApi.send(ctx))).pipe(mergeMap((response) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp) => this.responseProcessor.updateConfig(rsp))); + })); + } + /** + * Version: 9.2.0.cl or later Validates the content of your source branch against the objects in your destination environment. Before merging content from your source branch to the destination branch, run this API operation from your destination environment and ensure that the changes from the source branch function in the destination environment. Requires `DATAMANAGEMENT` (**Can manage data**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance on your instance, the `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` (**Can manage data models**) privilege and edit access to the metadata objects. + * @param validateMergeRequest + */ + validateMerge(validateMergeRequest, _options) { + const requestContextPromise = this.requestFactory.validateMerge(validateMergeRequest, _options); + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx) => middleware.pre(ctx))); + } + return middlewarePreObservable.pipe(mergeMap((ctx) => this.configuration.httpApi.send(ctx))).pipe(mergeMap((response) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp) => this.responseProcessor.validateMerge(rsp))); + })); + } +}; +var ObservableWebhooksApi = class { + constructor(configuration, requestFactory, responseProcessor) { + this.configuration = configuration; + this.requestFactory = requestFactory || new WebhooksApiRequestFactory(configuration); + this.responseProcessor = responseProcessor || new WebhooksApiResponseProcessor(); + } + /** + * Version: 10.14.0.cl or later Creates a new webhook configuration to receive notifications for specified events. The webhook will be triggered when the configured events occur in the system. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) or `DEVELOPER` (**Has developer privilege**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, users with `CAN_MANAGE_WEBHOOKS` (**Can manage webhooks**) privilege are also authorized to perform this action. + * @param createWebhookConfigurationRequest + */ + createWebhookConfiguration(createWebhookConfigurationRequest, _options) { + const requestContextPromise = this.requestFactory.createWebhookConfiguration(createWebhookConfigurationRequest, _options); + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx) => middleware.pre(ctx))); + } + return middlewarePreObservable.pipe(mergeMap((ctx) => this.configuration.httpApi.send(ctx))).pipe(mergeMap((response) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp) => this.responseProcessor.createWebhookConfiguration(rsp))); + })); + } + /** + * Version: 10.14.0.cl or later Deletes one or more webhook configurations by their unique id or name. Returns status of each deletion operation, including successfully deleted webhooks and any failures with error details. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) or `DEVELOPER` (**Has developer privilege**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, users with `CAN_MANAGE_WEBHOOKS` (**Can manage webhooks**) privilege are also authorized to perform this action. + * @param deleteWebhookConfigurationsRequest + */ + deleteWebhookConfigurations(deleteWebhookConfigurationsRequest, _options) { + const requestContextPromise = this.requestFactory.deleteWebhookConfigurations(deleteWebhookConfigurationsRequest, _options); + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx) => middleware.pre(ctx))); + } + return middlewarePreObservable.pipe(mergeMap((ctx) => this.configuration.httpApi.send(ctx))).pipe(mergeMap((response) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp) => this.responseProcessor.deleteWebhookConfigurations(rsp))); + })); + } + /** + * Version: 10.14.0.cl or later Searches for webhook configurations based on various criteria such as Org, webhook identifier, event type, with support for pagination and sorting. Returns matching webhook configurations with their complete details. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) or `DEVELOPER` (**Has developer privilege**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, users with `CAN_MANAGE_WEBHOOKS` (**Can manage webhooks**) privilege are also authorized to perform this action. + * @param searchWebhookConfigurationsRequest + */ + searchWebhookConfigurations(searchWebhookConfigurationsRequest, _options) { + const requestContextPromise = this.requestFactory.searchWebhookConfigurations(searchWebhookConfigurationsRequest, _options); + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx) => middleware.pre(ctx))); + } + return middlewarePreObservable.pipe(mergeMap((ctx) => this.configuration.httpApi.send(ctx))).pipe(mergeMap((response) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp) => this.responseProcessor.searchWebhookConfigurations(rsp))); + })); + } + /** + * Version: 10.14.0.cl or later Updates an existing webhook configuration by its unique id or name. Only the provided fields will be updated. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) or `DEVELOPER` (**Has developer privilege**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, users with `CAN_MANAGE_WEBHOOKS` (**Can manage webhooks**) privilege are also authorized to perform this action. + * @param webhookIdentifier Unique ID or name of the webhook configuration. + * @param updateWebhookConfigurationRequest + */ + updateWebhookConfiguration(webhookIdentifier, updateWebhookConfigurationRequest, _options) { + const requestContextPromise = this.requestFactory.updateWebhookConfiguration(webhookIdentifier, updateWebhookConfigurationRequest, _options); + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx) => middleware.pre(ctx))); + } + return middlewarePreObservable.pipe(mergeMap((ctx) => this.configuration.httpApi.send(ctx))).pipe(mergeMap((response) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp) => this.responseProcessor.updateWebhookConfiguration(rsp))); + })); + } +}; + +// types/PromiseAPI.ts +var PromiseAIApi = class { + constructor(configuration, requestFactory, responseProcessor) { + this.api = new ObservableAIApi(configuration, requestFactory, responseProcessor); + } + /** + * Version: 26.2.0.cl or later Creates a new Spotter agent conversation based on the provided context and settings. The endpoint was in Beta from 26.2.0.cl through 26.4.0.cl. Requires `CAN_USE_SPOTTER` privilege and at least view access to the metadata object specified in the request. #### Usage guidelines The request must include the `metadata_context` parameter to define the conversation context. The context type can be one of: - `DATA_SOURCE` *(available from 26.5.0.cl)*: targets a specific data source. Provide `data_source_identifier` in `data_source_context` for a single data source, or `data_source_identifiers` for multi-data-source context. The deprecated `guid` field is accepted for backwards compatibility. - `AUTO_MODE` *(available from 26.5.0.cl)*: automatically discovers and selects the most relevant datasets for the user\'s queries. > **Note for callers on versions 26.2.0.cl – 26.4.0.cl (Beta):** use the lowercase `data_source` enum value with the `guid` field instead of the above. Example: `{ \"type\": \"data_source\", \"data_source_context\": { \"guid\": \"\" } }`. The `conversation_settings` parameter controls which Spotter capabilities are enabled for the conversation: - `enable_contextual_change_analysis` (default: `true`, **deprecated from 26.2.0.cl**) — always enabled in Spotter 3; setting this to `false` has no effect on versions >= 26.2.0.cl - `enable_natural_language_answer_generation` (default: `true`, **deprecated from 26.2.0.cl**) — always enabled in Spotter 3; setting this to `false` has no effect on versions >= 26.2.0.cl - `enable_reasoning` (default: `true`, **deprecated from 26.2.0.cl**) — always enabled in Spotter 3; setting this to `false` has no effect on versions >= 26.2.0.cl - `enable_save_chat` (default: `false`, *available from 26.5.0.cl*) — enables saving the conversation for later retrieval via conversation history If the request is successful, the response includes a unique `conversation_identifier` that must be passed to `sendAgentConversationMessage` or `sendAgentConversationMessageStreaming` to send messages within this conversation. The response also includes `conversation_id` with the same value for backwards compatibility; use `conversation_identifier` for new integrations. #### Example request ```json { \"metadata_context\": { \"type\": \"DATA_SOURCE\", \"data_source_context\": { \"data_source_identifier\": \"a1b2c3d4-e5f6-7890-abcd-ef1234567890\" } }, \"conversation_settings\": {} } ``` #### Error responses | Code | Description | | ---- | --------------------------------------------------------------------------------------------------------------------------------------- | | 401 | Unauthorized — authentication token is missing, expired, or invalid. | | 403 | Forbidden — the authenticated user does not have `CAN_USE_SPOTTER` privilege or lacks view permission on the specified metadata object. | > ###### Note: > > - This endpoint was in Beta from 26.2.0.cl through 26.4.0.cl and is Generally Available from version 26.5.0.cl. > - This endpoint requires Spotter - please contact ThoughtSpot support to enable Spotter on your cluster. + * @param createAgentConversationRequest + */ + createAgentConversation(createAgentConversationRequest, _options) { + const result = this.api.createAgentConversation(createAgentConversationRequest, _options); + return result.toPromise(); + } + /** + * Version: 10.4.0.cl or later Creates a new conversation session tied to a specific data model for AI-driven natural language querying. Requires `CAN_USE_SPOTTER` privilege and at least view access to the metadata object specified in the request. #### Usage guidelines The request must include: - `metadata_identifier`: the unique ID of the data source that provides context for the conversation Optionally, you can provide: - `tokens`: a token string to set initial context for the conversation (e.g., `\"[sales],[item type],[state]\"`) If the request is successful, ThoughtSpot returns a unique `conversation_identifier` that must be passed to `sendMessage` to continue the conversation. #### Error responses | Code | Description | |------|-------------| | 401 | Unauthorized — authentication token is missing, expired, or invalid. | | 403 | Forbidden — the authenticated user does not have `CAN_USE_SPOTTER` privilege or lacks view permission on the specified metadata object. | > ###### Note: > * This endpoint is currently in Beta. Breaking changes may be introduced before the endpoint is made Generally Available. > * This endpoint requires Spotter - please contact ThoughtSpot support to enable Spotter on your cluster. + * @param createConversationRequest + */ + createConversation(createConversationRequest, _options) { + const result = this.api.createConversation(createConversationRequest, _options); + return result.toPromise(); + } + /** + * Version: 10.15.0.cl or later Suggests the most relevant data sources for a given natural language query, ranked by confidence with LLM-generated reasoning. Requires `CAN_USE_SPOTTER` privilege and at least view-level access to the underlying metadata entities referenced in the response. #### Usage guidelines The request must include: - `query`: the natural language question to find relevant data sources for If the request is successful, the API returns a ranked list of suggested data sources, each containing: - `confidence`: a float score indicating the model\'s confidence in the relevance of the suggestion - `details`: metadata about the data source - `data_source_identifier`: the unique ID of the data source - `data_source_name`: the display name of the data source - `description`: a description of the data source - `reasoning`: LLM-generated rationale explaining why the data source was recommended #### Error responses | Code | Description | |------|--------------------------------------------------------------------------------------------------------------------------------------------| | 401 | Unauthorized — authentication token is missing, expired, or invalid. | | 403 | Forbidden — the authenticated user does not have `CAN_USE_SPOTTER` privilege or lacks view permission on the underlying metadata entities. | > ###### Note: > * This endpoint is currently in Beta. Breaking changes may be introduced before it is made Generally Available. > * This endpoint requires Spotter — please contact ThoughtSpot Support to enable Spotter on your cluster. + * @param getDataSourceSuggestionsRequest + */ + getDataSourceSuggestions(getDataSourceSuggestionsRequest, _options) { + const result = this.api.getDataSourceSuggestions(getDataSourceSuggestionsRequest, _options); + return result.toPromise(); + } + /** + * Version: 10.15.0.cl or later Retrieves existing natural language (NL) instructions configured for a specific data model. These instructions guide the AI system in understanding data context and generating more accurate responses. Requires `CAN_USE_SPOTTER` privilege, at least view access on the data model, and a bearer token corresponding to the org where the data model exists. #### Usage guidelines The request must include: - `data_source_identifier`: the unique ID of the data model to retrieve instructions for If the request is successful, the API returns: - `nl_instructions_info`: an array of instruction objects, each containing: - `instructions`: the configured text instructions for AI processing - `scope`: the scope of the instruction — currently only `GLOBAL` is supported #### Instructions scope - **GLOBAL**: Instructions that apply globally across the system on the given data-model (currently only global instructions are supported) #### Error responses | Code | Description | |------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| | 401 | Unauthorized — authentication token is missing, expired, or invalid. | | 403 | Forbidden — the authenticated user does not have `CAN_USE_SPOTTER` privilege, lacks view access on the data model, or the bearer token does not correspond to the org where the data model exists. | > ###### Note: > > - To use this API, the user needs at least view access on the data model, and must use the bearer token corresponding to the org where the data model exists. > - This endpoint is currently in Beta. Breaking changes may be introduced before the endpoint is made Generally Available. > - Available from version 10.15.0.cl and later. > - This endpoint requires Spotter — please contact ThoughtSpot Support to enable Spotter on your cluster. > - Use this API to review currently configured instructions before modifying them with `setNLInstructions`. + * @param getNLInstructionsRequest + */ + getNLInstructions(getNLInstructionsRequest, _options) { + const result = this.api.getNLInstructions(getNLInstructionsRequest, _options); + return result.toPromise(); + } + /** + * Version: 10.13.0.cl or later Breaks down a natural language query into a series of smaller analytical sub-questions, each mapped to a relevant data source. Requires `CAN_USE_SPOTTER` privilege and at least view-level access to the referenced metadata objects. #### Usage guidelines The request must include: - `query`: the natural language question to decompose into analytical sub-questions - `metadata_context`: at least one of the following context identifiers to guide question generation: - `conversation_identifier` — an existing conversation session ID - `answer_identifiers` — a list of Answer GUIDs - `liveboard_identifiers` — a list of Liveboard GUIDs - `data_source_identifiers` — a list of data source GUIDs Optional parameters for refining the output: - `ai_context`: additional context to improve response quality - `content` — supplementary text or CSV data as string input - `instructions` — custom text instructions for the AI system - `limit_relevant_questions`: maximum number of questions to return (default: `5`) - `bypass_cache`: if `true`, forces fresh computation instead of returning cached results If the request is successful, the API returns a list of relevant analytical questions, each containing: - `query`: the generated sub-question - `data_source_identifier`: the unique ID of the data source the question targets - `data_source_name`: the display name of the corresponding data source #### Error responses | Code | Description | |------|---------------------------------------------------------------------------------------------------------------------------------------| | 401 | Unauthorized — authentication token is missing, expired, or invalid. | | 403 | Forbidden — the authenticated user does not have `CAN_USE_SPOTTER` privilege or lacks view access to the referenced metadata objects. | > ###### Note: > * This endpoint is currently in Beta. Breaking changes may be introduced before the endpoint is made Generally Available. > * This endpoint requires Spotter - please contact ThoughtSpot support to enable Spotter on your cluster. + * @param getRelevantQuestionsRequest + */ + getRelevantQuestions(getRelevantQuestionsRequest, _options) { + const result = this.api.getRelevantQuestions(getRelevantQuestionsRequest, _options); + return result.toPromise(); + } + /** + * Version: 10.7.0.cl or later **Deprecated** — Use `getRelevantQuestions` instead (available from 10.13.0.cl). Breaks down a topical or goal-oriented natural language question into smaller, actionable analytical sub-questions, each mapped to a relevant data source for independent execution. Requires `CAN_USE_SPOTTER` privilege and at least view-level access to the referenced metadata objects. #### Usage guidelines The request accepts the following parameters: - `nlsRequest`: contains the user `query` to decompose, along with optional `instructions` and `bypassCache` flag - `worksheetIds`: list of data source identifiers to scope the decomposition - `answerIds`: list of Answer GUIDs whose data guides the response - `liveboardIds`: list of Liveboard GUIDs whose data guides the response - `conversationId`: an existing conversation session ID for context continuity - `content`: supplementary text or CSV data to improve response quality - `maxDecomposedQueries`: maximum number of sub-questions to return (default: `5`) If the request is successful, the API returns a `decomposedQueryResponse` containing a list of `decomposedQueries`, each with: - `query`: the generated analytical sub-question - `worksheetId`: the unique ID of the data source the question targets - `worksheetName`: the display name of the corresponding data source #### Error responses | Code | Description | |------|---------------------------------------------------------------------------------------------------------------------------------------| | 401 | Unauthorized — authentication token is missing, expired, or invalid. | | 403 | Forbidden — the authenticated user does not have `CAN_USE_SPOTTER` privilege or lacks view access to the referenced metadata objects. | > ###### Note: > * This endpoint is deprecated since 10.13.0.cl. Use `getRelevantQuestions` for new integrations. > * This endpoint is currently in Beta. Breaking changes may be introduced before the endpoint is made Generally Available. > * This endpoint requires Spotter — please contact ThoughtSpot support to enable Spotter on your cluster. + * @param queryGetDecomposedQueryRequest + */ + queryGetDecomposedQuery(queryGetDecomposedQueryRequest, _options) { + const result = this.api.queryGetDecomposedQuery(queryGetDecomposedQueryRequest, _options); + return result.toPromise(); + } + /** + * Version: 26.5.0.cl or later Sends natural language messages to an existing Spotter agent conversation and returns the complete response synchronously. Requires `CAN_USE_SPOTTER` privilege and access to the metadata object associated with the conversation. The user must have access to the conversation session referenced by `conversation_identifier`. A conversation must first be created using the `createAgentConversation` API. #### Usage guidelines The request must include: - `conversation_identifier`: the unique session ID returned by `createAgentConversation`, used for context continuity and message tracking - `messages`: an array of one or more text messages to send to the agent The API returns an array of response objects, each containing: - `type`: the kind of response — `text`, `answer`, or `error` - `message`: the main content of the response - `metadata`: additional information depending on the message type (e.g., answer metadata includes analytics and visualization details) #### Error responses | Code | Description | |------|----------------------------------------------------------------------------------------------------------------------------------| | 401 | Unauthorized — authentication token is missing, expired, or invalid. | | 403 | Forbidden — the authenticated user does not have `CAN_USE_SPOTTER` privilege or lacks permission on the referenced conversation. | > ###### Note: > > - This endpoint is Generally Available from version 26.5.0.cl. > - This endpoint requires Spotter - please contact ThoughtSpot support to enable Spotter on your cluster. > - For real-time streamed responses, use `sendAgentConversationMessageStreaming` instead. + * @param conversationIdentifier Unique identifier for the conversation (used to track context) + * @param sendAgentConversationMessageRequest + */ + sendAgentConversationMessage(conversationIdentifier, sendAgentConversationMessageRequest, _options) { + const result = this.api.sendAgentConversationMessage(conversationIdentifier, sendAgentConversationMessageRequest, _options); + return result.toPromise(); + } + /** + * Version: 26.5.0.cl or later Sends one or more natural language messages to an existing Spotter agent conversation and returns the response as a real-time Server-Sent Events stream. Requires `CAN_USE_SPOTTER` privilege and access to the metadata object associated with the conversation. The user must have access to the conversation session referenced by `conversation_identifier`. A conversation must first be created using the `createAgentConversation` API. #### Usage guidelines The request must include: - `conversation_identifier`: the unique session ID returned by `createAgentConversation`, used for context continuity and message tracking - `messages`: an array of one or more text messages to send to the agent If the request is valid, the API returns a Server-Sent Events (SSE) stream. Each line has the form `data: [{\"type\": \"...\", ...}]` — a JSON array of event objects. Event types include: - `ack`: confirms receipt of the request (`node_id`) - `conv_title`: conversation title (`title`, `conv_id`) - `notification`: status updates on operations (`group_id`, `metadata`, `code` — e.g. `TOOL_CALL_NOTIFICATION`, `nls_start`, `FINAL_RESPONSE_NOTIFICATION`) - `text-chunk`: incremental content chunks (`id`, `group_id`, `metadata` with `format` and `type` such as `thinking` or `text`, `content`) - `text`: full text block with same structure as `text-chunk` - `answer`: structured answer with metadata (`id`, `group_id`, `metadata` with `sage_query`, `session_id`, `title`, etc., `title`) - `error`: if a failure occurs #### Error responses | Code | Description | | ---- | -------------------------------------------------------------------------------------------------------------------------------- | | 401 | Unauthorized — authentication token is missing, expired, or invalid. | | 403 | Forbidden — the authenticated user does not have `CAN_USE_SPOTTER` privilege or lacks permission on the referenced conversation. | > ###### Note: > > - This endpoint is Generally Available from version 26.5.0.cl. > - This endpoint requires Spotter - please contact ThoughtSpot support to enable Spotter on your cluster. > - The streaming protocol uses Server-Sent Events (SSE). > - For the complete response in a single payload, use `sendAgentConversationMessage` instead. + * @param conversationIdentifier Unique identifier for the conversation (used to track context) + * @param sendAgentConversationMessageStreamingRequest + */ + sendAgentConversationMessageStreaming(conversationIdentifier, sendAgentConversationMessageStreamingRequest, _options) { + const result = this.api.sendAgentConversationMessageStreaming(conversationIdentifier, sendAgentConversationMessageStreamingRequest, _options); + return result.toPromise(); + } + /** + * Version: 26.2.0.cl or later **Deprecated** — Use `sendAgentConversationMessage` instead. Send natural language messages to an existing Spotter agent conversation and returns the complete response synchronously. Requires `CAN_USE_SPOTTER` privilege and access to the metadata object associated with the conversation. The user must have access to the conversation session referenced by `conversation_identifier`. A conversation must first be created using the `createAgentConversation` API. #### Usage guidelines The request must include: - `conversation_identifier`: the unique session ID returned by `createAgentConversation`, used for context continuity and message tracking - `messages`: an array of one or more text messages to send to the agent The API returns an array of response objects, each containing: - `type`: the kind of response — `text`, `answer`, or `error` - `message`: the main content of the response - `metadata`: additional information depending on the message type (e.g., answer metadata includes analytics and visualization details) #### Error responses | Code | Description | |------|----------------------------------------------------------------------------------------------------------------------------------| | 401 | Unauthorized — authentication token is missing, expired, or invalid. | | 403 | Forbidden — the authenticated user does not have `CAN_USE_SPOTTER` privilege or lacks permission on the referenced conversation. | > ###### Note: > > - This endpoint is deprecated. Use `sendAgentConversationMessage` for new integrations. > - This endpoint is currently in Beta. Breaking changes may be introduced before the endpoint is made Generally Available. > - This endpoint requires Spotter - please contact ThoughtSpot support to enable Spotter on your cluster. + * @param conversationIdentifier Unique identifier for the conversation (used to track context) + * @param sendAgentMessageRequest + */ + sendAgentMessage(conversationIdentifier, sendAgentMessageRequest, _options) { + const result = this.api.sendAgentMessage(conversationIdentifier, sendAgentMessageRequest, _options); + return result.toPromise(); + } + /** + * Version: 26.2.0.cl or later **Deprecated** — Use `sendAgentConversationMessageStreaming` instead. Sends one or more natural language messages to an existing Spotter agent conversation and returns the response as a real-time Server-Sent Events stream. Requires `CAN_USE_SPOTTER` privilege and access to the metadata object associated with the conversation. The user must have access to the conversation session referenced by `conversation_identifier`. A conversation must first be created using the `createAgentConversation` API. #### Usage guidelines The request must include: - `conversation_identifier`: the unique session ID returned by `createAgentConversation`, used for context continuity and message tracking - `messages`: an array of one or more text messages to send to the agent If the request is valid, the API returns a Server-Sent Events (SSE) stream. Each line has the form `data: [{\"type\": \"...\", ...}]` — a JSON array of event objects. Event types include: - `ack`: confirms receipt of the request (`node_id`) - `conv_title`: conversation title (`title`, `conv_id`) - `notification`: status updates on operations (`group_id`, `metadata`, `code` — e.g. `TOOL_CALL_NOTIFICATION`, `nls_start`, `FINAL_RESPONSE_NOTIFICATION`) - `text-chunk`: incremental content chunks (`id`, `group_id`, `metadata` with `format` and `type` such as `thinking` or `text`, `content`) - `text`: full text block with same structure as `text-chunk` - `answer`: structured answer with metadata (`id`, `group_id`, `metadata` with `sage_query`, `session_id`, `title`, etc., `title`) - `error`: if a failure occurs #### Error responses | Code | Description | |------|----------------------------------------------------------------------------------------------------------------------------------| | 401 | Unauthorized — authentication token is missing, expired, or invalid. | | 403 | Forbidden — the authenticated user does not have `CAN_USE_SPOTTER` privilege or lacks permission on the referenced conversation. | > ###### Note: > > - This endpoint is deprecated. Use `sendAgentConversationMessageStreaming` for new integrations. > - This endpoint is currently in Beta. Breaking changes may be introduced before the endpoint is made Generally Available. > - This endpoint requires Spotter - please contact ThoughtSpot support to enable Spotter on your cluster. > - The streaming protocol uses Server-Sent Events (SSE). + * @param sendAgentMessageStreamingRequest + */ + sendAgentMessageStreaming(sendAgentMessageStreamingRequest, _options) { + const result = this.api.sendAgentMessageStreaming(sendAgentMessageStreamingRequest, _options); + return result.toPromise(); + } + /** + * Version: 10.4.0.cl or later Sends a follow-up message to an existing conversation within the context of a data model. Requires `CAN_USE_SPOTTER` privilege and at least view access to the metadata object specified in the request. A conversation must first be created using the `createConversation` API. #### Usage guidelines The request must include: - `conversation_identifier`: the unique session ID returned by `createConversation` - `metadata_identifier`: the unique ID of the data source used for the conversation - `message`: a natural language string with the follow-up question If the request is successful, the API returns an array of response messages, each containing: - `session_identifier`: the unique ID of the generated response - `generation_number`: the generation number of the response - `message_type`: the type of the response (e.g., `TSAnswer`) - `visualization_type`: the generated visualization type (`Chart`, `Table`, or `Undefined`) - `tokens` / `display_tokens`: the search tokens and user-friendly display tokens for the response #### Error responses | Code | Description | |------|-----------------------------------------------------------------------------------------------------------------------------------------| | 401 | Unauthorized — authentication token is missing, expired, or invalid. | | 403 | Forbidden — the authenticated user does not have `CAN_USE_SPOTTER` privilege or lacks view permission on the specified metadata object. | > ###### Note: > * This endpoint is currently in Beta. Breaking changes may be introduced before the endpoint is made Generally Available. > * This endpoint requires Spotter - please contact ThoughtSpot support to enable Spotter on your cluster. + * @param conversationIdentifier Unique identifier of the conversation. + * @param sendMessageRequest + */ + sendMessage(conversationIdentifier, sendMessageRequest, _options) { + const result = this.api.sendMessage(conversationIdentifier, sendMessageRequest, _options); + return result.toPromise(); + } + /** + * Version: 10.15.0.cl or later This API allows users to set natural language (NL) instructions for a specific data-model to improve AI-generated answers and query processing. These instructions help guide the AI system to better understand the data context and provide more accurate responses. Requires `CAN_USE_SPOTTER` privilege, either edit access or `SPOTTER_COACHING_PRIVILEGE` on the data model, and a bearer token corresponding to the org where the data model exists. #### Usage guidelines To set NL instructions for a data-model, the request must include: - `data_source_identifier`: The unique ID of the data-model for which to set NL instructions - `nl_instructions_info`: An array of instruction objects, each containing: - `instructions`: Array of text instructions for the LLM - `scope`: The scope of the instruction (`GLOBAL`). Currently only `GLOBAL` is supported. It can be extended to data-model-user scope in future. #### Instructions scope - **GLOBAL**: instructions that apply to all users querying this data model If the request is successful, the API returns: - `success`: a boolean indicating whether the operation completed successfully #### Error responses | Code | Description | |------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| | 401 | Unauthorized — authentication token is missing, expired, or invalid. | | 403 | Forbidden — the authenticated user does not have `CAN_USE_SPOTTER` privilege, lacks edit access or `SPOTTER_COACHING_PRIVILEGE` on the data model, or the bearer token does not correspond to the org where the data model exists. | > ###### Note: > > - To use this API, the user needs either edit access or `SPOTTER_COACHING_PRIVILEGE` on the data model, and must use the bearer token corresponding to the org where the data model exists. > - This endpoint is currently in Beta. Breaking changes may be introduced before the endpoint is made Generally Available. > - Available from version 10.15.0.cl and later. > - This endpoint requires Spotter — please contact ThoughtSpot Support to enable Spotter on your cluster. > - Instructions help improve the accuracy and relevance of AI-generated responses for the specified data-model. + * @param setNLInstructionsRequest + */ + setNLInstructions(setNLInstructionsRequest, _options) { + const result = this.api.setNLInstructions(setNLInstructionsRequest, _options); + return result.toPromise(); + } + /** + * Version: 10.4.0.cl or later Processes a natural language query against a specified data model and returns a single AI-generated answer without requiring a conversation session. Requires `CAN_USE_SPOTTER` privilege and at least view access to the metadata object specified in the request. #### Usage guidelines The request must include: - `query`: a natural language question (e.g., \"What were total sales last quarter?\") - `metadata_identifier`: the unique ID of the data source to query against If the request is successful, the API returns a response message containing: - `session_identifier`: the unique ID of the generated response - `generation_number`: the generation number of the response - `message_type`: the type of the response (e.g., `TSAnswer`) - `visualization_type`: the generated visualization type (`Chart`, `Table`, or `Undefined`) - `tokens` / `display_tokens`: the search tokens and user-friendly display tokens for the response #### Error responses | Code | Description | |------|-----------------------------------------------------------------------------------------------------------------------------------------| | 401 | Unauthorized — authentication token is missing, expired, or invalid. | | 403 | Forbidden — the authenticated user does not have `CAN_USE_SPOTTER` privilege or lacks view permission on the specified metadata object. | > ###### Note: > * This endpoint is currently in Beta. Breaking changes may be introduced before the endpoint is made Generally Available. > * This endpoint requires Spotter - please contact ThoughtSpot support to enable Spotter on your cluster. + * @param singleAnswerRequest + */ + singleAnswer(singleAnswerRequest, _options) { + const result = this.api.singleAnswer(singleAnswerRequest, _options); + return result.toPromise(); + } + /** + * Stops an in-progress agent conversation response. Version: 26.6.0.cl or later Version: 26.6.0.cl or later Stops an in-progress agent response for the specified conversation. Use this endpoint to cancel a response that is actively being generated — for example, when the user navigates away, reformulates their question, or no longer needs the current result. Requires `CAN_USE_SPOTTER` privilege and access to the specified conversation. #### Usage guidelines The request must include: - `conversation_identifier` *(path parameter)*: the unique ID of the conversation whose active response should be stopped, as returned by `createAgentConversation` A successful request returns an empty `204 No Content` response. If there is no active response in progress at the time of the call, the request is still treated as successful. After stopping a response, the conversation session remains active. You can continue sending messages using `sendAgentConversationMessage` or `sendAgentConversationMessageStreaming`. #### Example request ```bash POST /api/rest/2.0/ai/agent/conversation/{conversation_identifier}/stop-response ``` #### Typical usage scenario This endpoint is useful when integrating Spotter into a chat UI where users can cancel a long-running query. For example: 1. User sends a message via `sendAgentConversationMessageStreaming`. 2. User clicks a \"Stop generating\" button while the response is streaming. 3. Your client calls `stopConversation` with the active `conversation_identifier`. 4. The stream is terminated and the user can ask a new question. #### Error responses | Code | Description | |------|-------------| | 401 | Unauthorized — authentication token is missing, expired, or invalid. | | 403 | Forbidden — the authenticated user does not have `CAN_USE_SPOTTER` privilege or lacks access to the specified conversation. | > ###### Note: > > - Calling this endpoint when no response is in progress does not return an error. > - The conversation context is preserved after stopping — previous messages and answers remain accessible. > - Available from version 26.6.0.cl and later. > - This endpoint requires Spotter — please contact ThoughtSpot Support to enable Spotter on your cluster. > - This feature is available only for **Spotter 3** (`SPOTTER3`) version. + * @param conversationIdentifier Unique identifier of the conversation to stop. + */ + stopConversation(conversationIdentifier, _options) { + const result = this.api.stopConversation(conversationIdentifier, _options); + return result.toPromise(); + } +}; +var PromiseAuthenticationApi = class { + constructor(configuration, requestFactory, responseProcessor) { + this.api = new ObservableAuthenticationApi(configuration, requestFactory, responseProcessor); + } + /** + * Version: 26.6.0.cl or later Enables or disables authentication at cluster or org level for the specified auth type. Currently supports `TRUSTED_AUTH`. #### Required privileges Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) or `CONTROL_TRUSTED_AUTH` (**Can Enable or Disable Trusted Authentication**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled, the `CONTROL_TRUSTED_AUTH` privilege is required. #### Usage guidelines Use `cluster_preferences` to enable or disable authentication at the cluster level. Cluster-level settings can only be configured from the Primary Org. - `ENABLED` — Generates a new access token if one does not exist. An existing token is preserved. - `DISABLED` — Revokes the existing cluster-level access token. Use `org_preferences` to enable or disable authentication for one or more Orgs. Each entry must include an `org_identifier` (unique ID or name) and an `auth_status`. Org-level configuration requires the per-Org authentication feature to be enabled on your instance. - `ENABLED` — Generates a new org-level access token if one does not exist. - `DISABLED` — Revokes the existing org-level access token for that Org. Both `cluster_preferences` and `org_preferences` are optional. Omitting a field leaves the corresponding settings unchanged. If both are omitted, the API returns `204 No Content` without making any changes. **Note**: Cluster-level and org-level settings are independent of each other. Enabling or disabling one does not affect the other. + * @param configureAuthSettingsRequest + */ + configureAuthSettings(configureAuthSettingsRequest, _options) { + const result = this.api.configureAuthSettings(configureAuthSettingsRequest, _options); + return result.toPromise(); + } + /** + * Version: 9.0.0.cl or later Retrieves details of the current user session for the token provided in the request header. Any ThoughtSpot user can access this endpoint and send an API request. The data returned in the API response varies according to user\'s privilege and object access permissions. **NOTE**: In ThoughtSpot, users with cluster administration privileges can access all Orgs by default. However, unless the administrator is explicitly added to an Org, the Orgs list in the session information returned by the API will include only the Primary Org. To include other Orgs in the API response, you must explicitly add the administrator to each Org in the Admin settings page in the UI or via user REST API. + */ + getCurrentUserInfo(_options) { + const result = this.api.getCurrentUserInfo(_options); + return result.toPromise(); + } + /** + * Version: 9.4.0.cl or later Retrieves details of the current session token for the bearer token provided in the request header. This API endpoint does not create a new token. Instead, it returns details about the token, including the token string, creation time, expiration time, and the associated user. Use this endpoint to introspect your current session token, debug authentication issues, or when a frontend application needs session token details. Any ThoughtSpot user with a valid bearer token can access this endpoint and send an API request + */ + getCurrentUserToken(_options) { + const result = this.api.getCurrentUserToken(_options); + return result.toPromise(); + } + /** + * Version: 10.4.0.cl or later Creates an authentication token that provides values for the formula variables in the Row Level Security (RLS) rules for a given user. Recommended for use cases that require Attribute-based access control (ABAC) via RLS. #### Required privileges To add a new user and assign privileges during auto-creation, the `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege is required. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled, the `CONTROL_TRUSTED_AUTH` (**Can Enable or Disable Trusted Authentication**) privilege and edit access to the data source are required. To configure formula variables for all Orgs on your instance or the Primary Org, cluster administration privileges are required. Org administrators can configure formula variables for their respective Orgs. If Role-Based Access Control (RBAC) is enabled, users with the `CAN_MANAGE_VARIABLES` (**Can manage variables**) role privilege can also create and manage variables for their Org context. #### Usage guidelines You can generate a token by providing a `username` and `password`, or by using a `secret_key`. To generate a `secret_key`, the administrator must enable [Trusted authentication](https://developers.thoughtspot.com/docs/trusted-auth-secret-key) in the **Develop** > **Customizations** > **Security Settings** page. **Note**: * When both `password` and `secret_key` are included in the API request, `password` takes precedence. * If [Multi-Factor Authentication (MFA)](https://docs.thoughtspot.com/cloud/latest/authentication-local-mfa) is enabled on your instance, the API login request with `username` and `password` returns an error. You can switch to token-based authentication with `secret_key` or contact ThoughtSpot Support for assistance. The token obtained from ThoughtSpot is valid for 5 minutes by default. You can configure the token expiration time as required. #### ABAC via RLS To implement ABAC via RLS and assign security entitlements to users during session creation, generate a token with custom variable values. The values set in the authentication token are applied to the formula variables referenced in RLS rules at the table level, which determines the data each user can access based on their entitlements. The variable values can be configured to persist for a specific set of Models in user sessions initiated with the token, allowing different RLS rules to be set for different data models. Once defined, the rules are added to the user\'s `variable_values` object, after which all sessions will use the persisted values. For more information, see [ABAC via tokens Documentation](https://developers.thoughtspot.com/docs/abac-via-rls-variables). ##### Formula variables Before defining variable values, ensure the variables are created and available on your instance. To create a formula variable, you can use the **Create variable** (`/api/rest/2.0/template/variables/create`) REST API endpoint, with the variable `type` set as `Formula_Variable` in the API request. The API doesn\'t support `\"persist_option\": \"RESET\"` and `\"persist_option\": \"NONE\"` when `variable_values` are defined in the request. If you are using `variable_values` for token generation, you must use other supported persist options such as `APPEND` or `REPLACE`. If you want to use `RESET` or `NONE`, do not pass any `variable_values`. In such cases, `variable_values` will remain unaffected. #### Supported objects The supported object type is `LOGICAL_TABLE`. When using `object_id` with `variable_values`, models are supported. #### Just-in-time provisioning For [just-in-time user creation and provisioning](https://developers.thoughtspot.com/docs/just-in-time-provisioning), specify the following attributes in the API request: * `auto_create` * `username` * `display_name` * `email` * `groups` Set `auto_create` to `true` if the username does not exist in ThoughtSpot. If the username already exists in ThoughtSpot and `auto_create` is set to `true`, user properties such as display name, email, Org and group entitlements will not be updated with new values. Setting `auto_create` to `true` does not create formula variables. Hence, this setting will not be applicable to `variable_values`. #### Important point to note All options in the token creation APIs that define user access to data in ThoughtSpot will take effect during token creation, not when the token is used for authentication. For example, `auto_create:true` will create the user when the authentication token is created. Persist options such as `APPEND` and `REPLACE` will persist `variable_values` on the user profile when the token is created. + * @param getCustomAccessTokenRequest + */ + getCustomAccessToken(getCustomAccessTokenRequest, _options) { + const result = this.api.getCustomAccessToken(getCustomAccessTokenRequest, _options); + return result.toPromise(); + } + /** + * Version: 9.0.0.cl or later Generates an authentication token for creating a full session in ThoughtSpot for a given user. Recommended for use cases that do not require Attribute-based access control (ABAC) via Row Level Security (RLS). #### Usage guidelines You can generate a token for a user by providing a `username` and `password`, or by using the `secret_key` generated for your instance. To generate a `secret_key`, the administrator must enable [Trusted authentication](https://developers.thoughtspot.com/docs/trusted-auth-secret-key) in the **Develop** > **Customizations** > **Security Settings** page. **Note**: * When both `password` and `secret_key` are included in the API request, `password` takes precedence. * If [Multi-Factor Authentication (MFA)](https://docs.thoughtspot.com/cloud/latest/authentication-local-mfa) is enabled on your instance, the API login request with `username` and `password` returns an error. You can switch to token-based authentication with `secret_key` or contact ThoughtSpot Support for assistance. The token obtained from ThoughtSpot is valid for 5 minutes by default. You can configure the token expiration time as required. #### Just-in-time provisioning For [just-in-time user creation and provisioning](https://developers.thoughtspot.com/docs/just-in-time-provisioning), specify the following attributes in the API request: * `auto_create` * `username` * `display_name` * `email` * `group_identifiers` Set `auto_create` to `true` if the username does not exist in ThoughtSpot. If the user already exists in ThoughtSpot and `auto_create` is set to `true`, user properties such as display name, email and group assignment will be updated. To add a new user and assign privileges during auto-creation, the `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege is required. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled, the `CONTROL_TRUSTED_AUTH` (**Can Enable or Disable Trusted Authentication**) privilege is required. #### Important point to note All options in the token creation APIs that define user access to data in ThoughtSpot will take effect during token creation, not when the token is used for authentication. For example, `auto_create:true` will create the user when the authentication token is created. + * @param getFullAccessTokenRequest + */ + getFullAccessToken(getFullAccessTokenRequest, _options) { + const result = this.api.getFullAccessToken(getFullAccessTokenRequest, _options); + return result.toPromise(); + } + /** + * Version: 9.0.0.cl or later Generates an authentication token that provides access to a specific metadata object. This object list is intersected with the list of objects the user is allowed to access via group membership. For more information, see [Object security](https://docs.thoughtspot.com/cloud/latest/security-data-object#object_security). #### Usage guidelines You can generate a token for a user by providing a `username` and `password`, or by using the `secret_key` generated for your instance. To generate a `secret_key`, the administrator must enable [Trusted authentication](https://developers.thoughtspot.com/docs/trusted-auth-secret-key) in the **Develop** > **Customizations** > **Security Settings** page. **Note**: * When both `password` and `secret_key` are included in the API request, `password` takes precedence. * If [Multi-Factor Authentication (MFA)](https://docs.thoughtspot.com/cloud/latest/authentication-local-mfa) is enabled on your instance, the API login request with `username` and `password` returns an error. You can switch to token-based authentication with `secret_key` or contact ThoughtSpot Support for assistance. The token obtained from ThoughtSpot is valid for 5 minutes by default. You can configure the token expiration time as required. #### Just-in-time provisioning For [just-in-time user creation and provisioning](https://developers.thoughtspot.com/docs/just-in-time-provisioning), specify the following attributes in the API request: * `auto_create` * `username` * `display_name` * `email` * `group_identifiers` Set `auto_create` to `true` if the user is not available in ThoughtSpot. If the user already exists in ThoughtSpot and the `auto_create` parameter is set to `true`, user properties such as display name, email, and group assignment will be updated. To add a new user and assign privileges, the `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege is required. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled, the `CONTROL_TRUSTED_AUTH`(**Can Enable or Disable Trusted Authentication**) privilege is required. #### Important point to note All options in the token creation APIs that define user access to data in ThoughtSpot will take effect during token creation, not when the token is used for authentication. For example, `auto_create:true` will create the user when the authentication token is created. + * @param getObjectAccessTokenRequest + */ + getObjectAccessToken(getObjectAccessTokenRequest, _options) { + const result = this.api.getObjectAccessToken(getObjectAccessTokenRequest, _options); + return result.toPromise(); + } + /** + * Version: 9.0.0.cl or later Creates a login session for a ThoughtSpot user with Basic authentication. In Basic authentication method, REST clients log in to ThoughtSpot using `username` and `password` attributes. On a multi-tenant cluster with Orgs, users can pass the ID of the Org in the API request to log in to a specific Org context. **Note**: If Multi-Factor Authentication (MFA) is enabled on your instance, the API login request with basic authentication (`username` and `password` ) returns an error. Contact ThoughtSpot Support for assistance. A successful login returns a session cookie that can be used in your subsequent API requests. + * @param loginRequest + */ + login(loginRequest, _options) { + const result = this.api.login(loginRequest, _options); + return result.toPromise(); + } + /** + * Version: 9.0.0.cl or later Logs out a user from their current session. + */ + logout(_options) { + const result = this.api.logout(_options); + return result.toPromise(); + } + /** + * Version: 9.0.0.cl or later Revokes the authentication token issued for current user session. The token of your current session expires when you make a call to the `/api/rest/2.0/auth/token/revoke` endpoint. the users will not be able to access ThoughtSpot objects until a new token is obtained. To restart your session, request for a new token from ThoughtSpot. See [Get Full Access Token](#/http/api-endpoints/authentication/get-full-access-token). + * @param revokeTokenRequest + */ + revokeToken(revokeTokenRequest, _options) { + const result = this.api.revokeToken(revokeTokenRequest, _options); + return result.toPromise(); + } + /** + * Version: 26.6.0.cl or later Returns the authentication configuration for the specified auth type at cluster and org level. Currently supports `TRUSTED_AUTH`. #### Required privileges Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) or `CONTROL_TRUSTED_AUTH` (**Can Enable or Disable Trusted Authentication**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled, the `CONTROL_TRUSTED_AUTH` privilege is required. #### Usage guidelines Use `scope` to control which level of settings are returned: - `CLUSTER` — Returns cluster-level authentication status and access tokens. Accessible only from the Primary Org. - `ORG` — Returns org-level authentication status and access tokens for the current Org. Requires the per-Org authentication feature to be enabled on your instance. - If `scope` is omitted, both cluster and org-level settings are returned based on the caller\'s org context and feature availability. The `access_tokens` array in `cluster_preferences` or `org_preferences` is omitted when no token is configured at that level. **Note**: Access tokens returned in the response are sensitive credentials. Treat them with the same care as passwords. + * @param searchAuthSettingsRequest + */ + searchAuthSettings(searchAuthSettingsRequest, _options) { + const result = this.api.searchAuthSettings(searchAuthSettingsRequest, _options); + return result.toPromise(); + } + /** + * Version: 9.12.0.cl or later Validates the authentication token specified in the API request. If your token is not valid, [Get a new token](#/http/api-endpoints/authentication/get-full-access-token). + * @param validateTokenRequest + */ + validateToken(validateTokenRequest, _options) { + const result = this.api.validateToken(validateTokenRequest, _options); + return result.toPromise(); + } +}; +var PromiseCollectionsApi = class { + constructor(configuration, requestFactory, responseProcessor) { + this.api = new ObservableCollectionsApi(configuration, requestFactory, responseProcessor); + } + /** + * Version: 26.4.0.cl or later Creates a new collection in ThoughtSpot. Collections allow you to organize and group related metadata objects such as Liveboards, Answers, worksheets, and other data objects. You can also create nested collections (sub-collections) to build a hierarchical structure. #### Supported operations The API endpoint lets you perform the following operations: * Create a new collection * Add metadata objects (Liveboards, Answers, Logical Tables) to the collection * Create nested collections by adding sub-collections + * @param createCollectionRequest + */ + createCollection(createCollectionRequest, _options) { + const result = this.api.createCollection(createCollectionRequest, _options); + return result.toPromise(); + } + /** + * Version: 26.4.0.cl or later Deletes one or more collections from ThoughtSpot. #### Delete options * **delete_children**: When set to `true`, deletes the child objects (metadata items) within the collection that the user has access to. Objects that the user does not have permission to delete will be skipped. * **dry_run**: When set to `true`, performs a preview of the deletion operation without actually deleting anything. The response shows what would be deleted, allowing you to review before committing the deletion. #### Response The response includes: * **metadata_deleted**: List of metadata objects that were successfully deleted * **metadata_skipped**: List of metadata objects that were skipped due to lack of permissions or other constraints + * @param deleteCollectionRequest + */ + deleteCollection(deleteCollectionRequest, _options) { + const result = this.api.deleteCollection(deleteCollectionRequest, _options); + return result.toPromise(); + } + /** + * Version: 26.4.0.cl or later Gets a list of collections available in ThoughtSpot. To get details of a specific collection, specify the collection GUID or name. You can also filter the API response based on the collection name pattern, author, and other criteria. #### Search options * **name_pattern**: Use \'%\' as a wildcard character to match collection names * **collection_identifiers**: Search for specific collections by their GUIDs or names * **include_metadata**: When set to `true`, includes the metadata objects within each collection in the response **NOTE**: If the API returns an empty list, consider increasing the value of the `record_size` parameter. To search across all available collections, set `record_size` to `-1`. + * @param searchCollectionsRequest + */ + searchCollections(searchCollectionsRequest, _options) { + const result = this.api.searchCollections(searchCollectionsRequest, _options); + return result.toPromise(); + } + /** + * Version: 26.4.0.cl or later Updates an existing collection in ThoughtSpot. #### Supported operations This API endpoint lets you perform the following operations: * Update collection name and description * Change visibility settings * Add metadata objects to the collection (operation: ADD) * Remove metadata objects from the collection (operation: REMOVE) * Replace all metadata objects in the collection (operation: REPLACE) #### Operation types * **ADD**: Adds the specified metadata objects to the existing collection without removing current items * **REMOVE**: Removes only the specified metadata objects from the collection * **REPLACE**: Replaces all existing metadata objects with the specified items (default behavior) + * @param collectionIdentifier Unique GUID of the collection. Note: Collection names cannot be used as identifiers since duplicate names are allowed. + * @param updateCollectionRequest + */ + updateCollection(collectionIdentifier, updateCollectionRequest, _options) { + const result = this.api.updateCollection(collectionIdentifier, updateCollectionRequest, _options); + return result.toPromise(); + } +}; +var PromiseConnectionConfigurationsApi = class { + constructor(configuration, requestFactory, responseProcessor) { + this.api = new ObservableConnectionConfigurationsApi(configuration, requestFactory, responseProcessor); + } + /** + * Version: 10.12.0.cl or later Gets connection configuration objects. Requires `DATAMANAGEMENT` (**Can manage data**) and edit permissions to the connection object, or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) privilege is required. #### Usage guidelines * To get a list of all configurations available in the ThoughtSpot system, send the API request with only the connection name or GUID in the request body. * To fetch details of a configuration object, specify the configuration object name or GUID. + * @param connectionConfigurationSearchRequest + */ + connectionConfigurationSearch(connectionConfigurationSearchRequest, _options) { + const result = this.api.connectionConfigurationSearch(connectionConfigurationSearchRequest, _options); + return result.toPromise(); + } + /** + * Version: 10.12.0.cl or later Creates an additional configuration to an existing connection to a data warehouse. Requires `DATAMANAGEMENT` (**Can manage data**) or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) privilege is required. #### Usage guidelines * A JSON map of configuration attributes in `configuration`. The following example shows the configuration attributes: ``` { \"user\":\"DEV_USER\", \"password\":\"TestConn123\", \"role\":\"DEV\", \"warehouse\":\"DEV_WH\" } ``` * If the `policy_type` is `PRINCIPALS`, then `policy_principals` is a required field. * If the `policy_type` is `PROCESSES`, then `policy_processes` is a required field. * If the `policy_type` is `NO_POLICY`, then `policy_principals` and `policy_processes` are not required fields. #### Parameterized Connection Support For parameterized connections that use OAuth authentication, only the same_as_parent and policy_process_options attributes are allowed in the API request. These attributes are not applicable to connections that are not parameterized. + * @param createConnectionConfigurationRequest + */ + createConnectionConfiguration(createConnectionConfigurationRequest, _options) { + const result = this.api.createConnectionConfiguration(createConnectionConfigurationRequest, _options); + return result.toPromise(); + } + /** + * Version: 10.12.0.cl or later Deletes connection configuration objects. Requires `DATAMANAGEMENT` (**Can manage data**) and edit permissions to the connection object, or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) privilege is required. + * @param deleteConnectionConfigurationRequest + */ + deleteConnectionConfiguration(deleteConnectionConfigurationRequest, _options) { + const result = this.api.deleteConnectionConfiguration(deleteConnectionConfigurationRequest, _options); + return result.toPromise(); + } + /** + * Version: 10.12.0.cl or later Updates a connection configuration object. Requires `DATAMANAGEMENT` (**Can manage data**) and edit permissions to the connection object, or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) privilege is required. #### Supported operations This API endpoint lets you perform the following operations in a single API request: * Edit the name or description of the configuration * Edit the configuration properties * Edit the `policy_type` * Edit the type of authentication * Enable or disable a configuration #### Parameterized Connection Support For parameterized oauth based connections, only the `same_as_parent` and `policy_process_options` attributes are allowed. These attributes are not applicable to connections that are not parameterized. **NOTE**: When updating a configuration where `disabled` is `true`, you must reset `disabled` to `true` in your update request payload. If not explicitly set again, the API will default `disabled` to `false`. + * @param configurationIdentifier Unique ID or name of the configuration. + * @param updateConnectionConfigurationRequest + */ + updateConnectionConfiguration(configurationIdentifier, updateConnectionConfigurationRequest, _options) { + const result = this.api.updateConnectionConfiguration(configurationIdentifier, updateConnectionConfigurationRequest, _options); + return result.toPromise(); + } +}; +var PromiseConnectionsApi = class { + constructor(configuration, requestFactory, responseProcessor) { + this.api = new ObservableConnectionsApi(configuration, requestFactory, responseProcessor); + } + /** + * Version: 9.2.0.cl or later Creates a connection to a data warehouse for live query services. Requires `DATAMANAGEMENT` (**Can manage data**) or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) privilege is required. #### Create a connection without tables To create a connection without tables: 1. Pass these parameters in your API request. * Name of the connection. * Type of the data warehouse to connect to. * A JSON map of configuration attributes in `data_warehouse_config`. The following example shows the configuration attributes for a SnowFlake connection: ``` { \"configuration\":{ \"accountName\":\"thoughtspot_partner\", \"user\":\"tsadmin\", \"password\":\"TestConn123\", \"role\":\"sysadmin\", \"warehouse\":\"MEDIUM_WH\" }, \"authenticationType\": \"SERVICE_ACCOUNT\", \"externalDatabases\":[ ] } ``` 2. Set `validate` to `false`. **NOTE:** If the `authentication_type` is anything other than SERVICE_ACCOUNT, you must explicitly provide the authenticationType property in the payload. If you do not specify authenticationType, the API will default to SERVICE_ACCOUNT as the authentication type. #### Create a connection with tables If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) and `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` (**Can manage data models**) privilege is required. To create a connection with tables: 1. Pass these parameters in your API request. * Name of the connection. * Type of the data warehouse to connect to. * A JSON map of configuration attributes, database details, and table properties in `data_warehouse_config` as shown in the following example: ``` { \"configuration\":{ \"accountName\":\"thoughtspot_partner\", \"user\":\"tsadmin\", \"password\":\"TestConn123\", \"role\":\"sysadmin\", \"warehouse\":\"MEDIUM_WH\" }, \"authenticationType\": \"SERVICE_ACCOUNT\", \"externalDatabases\":[ { \"name\":\"AllDatatypes\", \"isAutoCreated\":false, \"schemas\":[ { \"name\":\"alldatatypes\", \"tables\":[ { \"name\":\"allDatatypes\", \"type\":\"TABLE\", \"description\":\"\", \"selected\":true, \"linked\":true, \"columns\":[ { \"name\":\"CNUMBER\", \"type\":\"INT64\", \"canImport\":true, \"selected\":true, \"isLinkedActive\":true, \"isImported\":false, \"tableName\":\"allDatatypes\", \"schemaName\":\"alldatatypes\", \"dbName\":\"AllDatatypes\" }, { \"name\":\"CDECIMAL\", \"type\":\"INT64\", \"canImport\":true, \"selected\":true, \"isLinkedActive\":true, \"isImported\":false, \"tableName\":\"allDatatypes\", \"schemaName\":\"alldatatypes\", \"dbName\":\"AllDatatypes\" } ] } ] } ] } ] } ``` 2. Set `validate` to `true`. **NOTE:** If the `authentication_type` is anything other than SERVICE_ACCOUNT, you must explicitly provide the authenticationType property in the payload. If you do not specify authenticationType, the API will default to SERVICE_ACCOUNT as the authentication type. + * @param createConnectionRequest + */ + createConnection(createConnectionRequest, _options) { + const result = this.api.createConnection(createConnectionRequest, _options); + return result.toPromise(); + } + /** + * Version: 9.2.0.cl or later **Important**: This endpoint is deprecated and will be removed from ThoughtSpot in September 2025. ThoughtSpot strongly recommends using the [Delete Connection V2](#/http/api-endpoints/connections/delete-connection-v2) endpoint to delete your connection objects. #### Usage guidelines Deletes a connection object. Requires `DATAMANAGEMENT` (**Can manage data**) and edit permissions to the connection object, or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) privilege is required. **Note**: If a connection has dependent objects, make sure you remove its associations before the delete operation. + * @param deleteConnectionRequest + */ + deleteConnection(deleteConnectionRequest, _options) { + const result = this.api.deleteConnection(deleteConnectionRequest, _options); + return result.toPromise(); + } + /** + * Version: 10.4.0.cl or later Deletes a connection object. **Note**: If a connection has dependent objects, make sure you remove its associations before the delete operation. Requires `DATAMANAGEMENT` (**Can manage data**) and edit permissions to the connection object, or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) privilege is required. + * @param connectionIdentifier Unique ID or name of the connection. + */ + deleteConnectionV2(connectionIdentifier, _options) { + const result = this.api.deleteConnectionV2(connectionIdentifier, _options); + return result.toPromise(); + } + /** + * Version: 9.9.0.cl or later Exports the difference in connection metadata between CDW and ThoughtSpot Requires `DATAMANAGEMENT` (**Can manage data**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the following Data control privileges may be required: - `CAN_MANAGE_CUSTOM_CALENDAR`(**Can manage custom calendars**) - `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) - `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` (**Can manage data models**) To download the connection metadata difference between ThoughtSpot and CDW, pass the connection GUID as `connection_identifier` in the API request. + * @param connectionIdentifier GUID of the connection + */ + downloadConnectionMetadataChanges(connectionIdentifier, _options) { + const result = this.api.downloadConnectionMetadataChanges(connectionIdentifier, _options); + return result.toPromise(); + } + /** + * Version: 9.9.0.cl or later Validates the difference in connection metadata between CDW and ThoughtSpot. Requires `DATAMANAGEMENT` (**Can manage data**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the following Data control privileges may be required: - `CAN_MANAGE_CUSTOM_CALENDAR`(**Can manage custom calendars**) - `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) - `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` (**Can manage data models**) Returns a boolean indicating whether there is any difference between the connection metadata at ThoughtSpot and CDW. To get the connection metadata difference status, pass the connection GUID as `connection_identifier` in the API request. + * @param connectionIdentifier GUID of the connection + */ + fetchConnectionDiffStatus(connectionIdentifier, _options) { + const result = this.api.fetchConnectionDiffStatus(connectionIdentifier, _options); + return result.toPromise(); + } + /** + * Version: 26.2.0.cl or later Revokes OAuth refresh tokens for users who no longer require access to a data warehouse connection. When a token is revoked, the affected user\'s session for that connection is terminated, and they must re-authenticate to regain access. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) or `DATAMANAGEMENT` (**Can manage data**) privileges. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on the ThoughtSpot instance, users with `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) privilege can also make API requests to revoke tokens for connection users. #### Usage guidelines You can specify different combinations of identifiers to control which refresh tokens are revoked. - **connection_identifier**: Revokes refresh tokens for all users of the connection, except the connection author. - **connection_identifier** and **user_identifiers**: Revokes refresh tokens only for the users specified in the request. If the name or ID of the connection author is included in the request, their token will also be revoked. - **connection_identifier** and **configuration_identifiers**: Revokes refresh tokens for all users on the specified configurations, except the configuration author. - **connection_identifier**, **configuration_identifiers**, and **user_identifiers**: Revokes refresh tokens for the specified users on the specified configurations. - **connection_identifier** and **org_identifiers**: Revokes refresh tokens for the specified Orgs. Applicable only for published connections. - **connection_identifier**, **org_identifiers**, and **user_identifiers**: Revokes refresh tokens for the specified users in the specified Orgs. Applicable only for published connections. **NOTE**: The `org_identifiers` parameter is only applicable for published connections. Using this parameter for unpublished connections will result in an error. Ensure that the connections are published before making the API request. + * @param connectionIdentifier Unique ID or name of the connection whose refresh tokens need to be revoked. All the users associated with the connection will have their refresh tokens revoked except the author. + * @param revokeRefreshTokensRequest + */ + revokeRefreshTokens(connectionIdentifier, revokeRefreshTokensRequest, _options) { + const result = this.api.revokeRefreshTokens(connectionIdentifier, revokeRefreshTokensRequest, _options); + return result.toPromise(); + } + /** + * Version: 9.2.0.cl or later Gets connection objects. Requires `DATAMANAGEMENT` (**Can manage data**) or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) privilege is required. - To get a list of all connections available in the ThoughtSpot system, send the API request without any attributes in the request body. - To get the connection objects for a specific type of data warehouse, specify the type in `data_warehouse_types`. - To fetch details of a connection object, specify the connection object GUID or name. The `name_pattern` attribute allows passing partial text with `%` for a wildcard match. - To get details of the database, schemas, tables, or columns from a data connection object, specify `data_warehouse_object_type`. - To get a specific database, schema, table, or column from a connection object, define the object type in `data_warehouse_object_type` and object properties in the `data_warehouse_objects` array. For example, to search for a column, you must pass the database, schema, and table names in the API request. Note that in the following example, object properties are set in a hierarchical order (`database` > `schema` > `table` > `column`). ``` { \"connections\": [ { \"identifier\": \"b9d1f2ef-fa65-4a4b-994e-30fa2d57b0c2\", \"data_warehouse_objects\": [ { \"database\": \"NEBULADEV\", \"schema\": \"INFORMATION_SCHEMA\", \"table\": \"APPLICABLE_ROLES\", \"column\": \"ROLE_NAME\" } ] } ], \"data_warehouse_object_type\": \"COLUMN\" } ``` - To fetch data by `configuration`, specify `data_warehouse_object_type`. For example, to fetch columns from the `DEVELOPMENT` database, specify the `data_warehouse_object_type` as `DATABASE` and define the `configuration` string as `{\"database\":\"DEVELOPMENT\"}`. To get column data for a specific table, specify the table, for example,`{\"database\":\"RETAILAPPAREL\",\"table\":\"PIPES\"}`. - To query connections by `authentication_type`, specify `data_warehouse_object_type`. Supported values for `authentication_type` are: - `SERVICE_ACCOUNT`: For connections that require service account credentials to authenticate to the Cloud Data Warehouse and fetch data. - `OAUTH`: For connections that require OAuth credentials to authenticate to the Cloud Data Warehouse and fetch data. Teradata, Oracle, and Presto Cloud Data Warehouses do not support the OAuth authentication type. - `IAM`: For connections that have the IAM OAuth set up. This authentication type is supported on Amazon Redshift connections only. - `EXTOAUTH`: For connections that have External OAuth set up. ThoughtSpot supports external [OAuth with Microsoft Azure Active Directory (AD)](https://docs.thoughtspot.com/cloud/latest/ connections-snowflake-azure-ad-oauth) and [Okta for Snowflake data connections](https://docs.thoughtspot.com/cloud/latest/connections-snowflake-okta-oauth). - `KEY_PAIR`: For connections that require Key Pair account credentials to authenticate to the Cloud Data Warehouse and fetch data. This authentication type is supported on Snowflake connections only. - `OAUTH_WITH_PKCE`: For connections that require OAuth with PKCE account credentials to authenticate to the Cloud Data Warehouse and fetch data. This authentication type is supported on Snowflake, Starburst, Databricks, Denodo connections only. - `EXTOAUTH_WITH_PKCE`: For connections that require External OAuth With PKCE account credentials to authenticate to the Cloud Data Warehouse and fetch data. This authentication type is supported on Snowflake connections only. - `OAUTH_WITH_PEZ`: For connections that require OAuth With PEZ account credentials to authenticate to the Cloud Data Warehouse and fetch data. This authentication type is supported on Amazon Redshift connections only. - `OAUTH_WITH_SERVICE_PRINCIPAL`: For connections that require OAuth With Service Principal account credentials to authenticate to the Cloud Data Warehouse and fetch data. This authentication type is supported on Databricks connections only. - `PERSONAL_ACCESS_TOKEN`: For connections that require Personal Access Token account credentials to authenticate to the Cloud Data Warehouse and fetch data. This authentication type is supported on Databricks connections only. - `OAUTH_CLIENT_CREDENTIALS`: For connections that require OAuth Client Credentials to authenticate to the Cloud Data Warehouse and fetch data. This authentication type is supported on Snowflake connections only. - To include more details about connection objects in the API response, set `include_details` to `true`. - You can also sort the output by field names and filter connections by tags. **NOTE**: When filtering connection records by parameters other than `data_warehouse_types` or `tag_identifiers`, ensure that you set `record_size` to `-1` and `record_offset` to `0` for precise results. + * @param searchConnectionRequest + */ + searchConnection(searchConnectionRequest, _options) { + const result = this.api.searchConnection(searchConnectionRequest, _options); + return result.toPromise(); + } + /** + * Version: 26.5.0.cl or later Synchronizes connection metadata attributes from your Cloud Data Warehouse (CDW) with ThoughtSpot. Requires the `DATAMANAGEMENT` (**Can manage data**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` (**Can manage data models**) privilege is required. #### Usage guidelines To synchronize attributes from a CDW, specify the connection GUID or name in the `connection_identifier` path parameter and `sync_attributes` in the request body. Default attribute is `[\"DESCRIPTION\"]`. ##### Hierarchical schema * Connection: The connection object for the sync operation. * Tables: Tables for the sync operation. When no table is specified, all tables are synchronized. * Columns: If the table is specified, you can add the columns for the sync operation. If no columns are specified, all columns in the specified table are considered for the sync operation. To set the scope for the sync operation: * Connection-level: To sync all tables and columns, pass an empty request body, or only the attributes in the request body. * Table-level: To synchronize specific tables and their columns, specify the table identifiers in the `tables` array. * Column-level: To synchronize specific columns, specify the table identifier as the key and column identifiers as the value in the `tables` array. ``` { \"tables\": [ {\"table-guid-1\": [\"column-guid-1\", \"column-guid-2\"]}, \"table-guid-2\" ], \"sync_attributes\": [\"DESCRIPTION\"] } ``` ##### API response If the sync operation is successful, the API returns the following information: * Status of the sync operation. For example, `SUCCESS`, `PARTIAL_SUCCESS`, or `NO_UPDATE`. * Number of tables and columns that were updated. * Number of tables and columns with the sync failed status when the overall sync status is `PARTIAL_SUCCESS`. * Message text indicating the sync results. + * @param connectionIdentifier Unique ID or name of the connection. + * @param syncMetadataRequest + */ + syncMetadata(connectionIdentifier, syncMetadataRequest, _options) { + const result = this.api.syncMetadata(connectionIdentifier, syncMetadataRequest, _options); + return result.toPromise(); + } + /** + * Version: 9.2.0.cl or later **Important**: This endpoint is deprecated and will be removed from ThoughtSpot in September 2025. ThoughtSpot strongly recommends using the [Update connection V2](#/http/api-endpoints/connections/update-connection-v2) endpoint to update your connection objects. #### Usage guidelines Updates a connection object. Requires `DATAMANAGEMENT` (**Can manage data**) and edit permissions to the connection object, or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) privilege is required. To update a connection object, pass these parameters in your API request: 1. GUID of the connection object. 2. If you are updating tables or database schema of a connection object: a. Add the updated JSON map of metadata with database, schema, and tables in `data_warehouse_config`. b. Set `validate` to `true`. 3. If you are updating a configuration attribute, connection name, or description, you can set `validate` to `false`. + * @param updateConnectionRequest + */ + updateConnection(updateConnectionRequest, _options) { + const result = this.api.updateConnection(updateConnectionRequest, _options); + return result.toPromise(); + } + /** + * Version: 26.6.0.cl or later Activates or deactivates a connection. A deactivated connection cannot be used for queries or operations until it is activated again. Requires `DATAMANAGEMENT` (**Can manage data**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) privilege is required. Only the connection owner or an administrator can perform this operation. #### Usage guidelines To update the status of a connection, specify the connection GUID or name in the `connection_identifier` path parameter and the desired `status` in the request body. - **ACTIVATED**: Enables the connection. Queries and operations can resume on an activated connection. - **DEACTIVATED**: Disables the connection. It does not remove the connection metadata, but only makes the connection unavailable for queries and operations. You can reactivate a deactivated connection by setting \"status\": \"ACTIVATED\". + * @param connectionIdentifier Unique ID or name of the connection. + * @param updateConnectionStatusRequest + */ + updateConnectionStatus(connectionIdentifier, updateConnectionStatusRequest, _options) { + const result = this.api.updateConnectionStatus(connectionIdentifier, updateConnectionStatusRequest, _options); + return result.toPromise(); + } + /** + * Version: 10.4.0.cl or later Updates a connection object. Requires `DATAMANAGEMENT` (**Can manage data**) and edit permissions to the connection object, or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) privilege is required. To update a connection object, pass these parameters in your API request: 1. GUID of the connection object. 2. If you are updating tables or database schema of a connection object: a. Add the updated JSON map of metadata with database, schema, and tables in `data_warehouse_config`. b. Set `validate` to `true`. **NOTE:** If the `authentication_type` is anything other than SERVICE_ACCOUNT, you must explicitly provide the authenticationType property in the payload. If you do not specify authenticationType, the API will default to SERVICE_ACCOUNT as the authentication type. * A JSON map of configuration attributes, database details, and table properties in `data_warehouse_config` as shown in the following example: * This is an example of updating a single table in a empty connection: ``` { \"authenticationType\": \"SERVICE_ACCOUNT\", \"externalDatabases\": [ { \"name\": \"DEVELOPMENT\", \"isAutoCreated\": false, \"schemas\": [ { \"name\": \"TS_dataset\", \"tables\": [ { \"name\": \"DEMORENAME\", \"type\": \"TABLE\", \"description\": \"\", \"selected\": true, \"linked\": true, \"gid\": 0, \"datasetId\": \"-1\", \"subType\": \"\", \"reportId\": \"\", \"viewId\": \"\", \"columns\": [ { \"name\": \"Col1\", \"type\": \"VARCHAR\", \"canImport\": true, \"selected\": true, \"description\": \"\", \"isLinkedActive\": true, \"isAggregate\": false }, { \"name\": \"Col2\", \"type\": \"VARCHAR\", \"canImport\": true, \"selected\": true, \"description\": \"\", \"isLinkedActive\": true, \"isAggregate\": false }, { \"name\": \"Col3\", \"type\": \"VARCHAR\", \"canImport\": true, \"selected\": true, \"description\": \"\", \"isLinkedActive\": true, \"isAggregate\": false }, { \"name\": \"Col312\", \"type\": \"VARCHAR\", \"canImport\": true, \"selected\": true, \"description\": \"\", \"isLinkedActive\": true, \"isAggregate\": false }, { \"name\": \"Col4\", \"type\": \"VARCHAR\", \"canImport\": true, \"selected\": true, \"description\": \"\", \"isLinkedActive\": true, \"isAggregate\": false } ], \"relationships\": [] } ] } ] } ], \"configuration\": { \"password\": \"\", \"database\": \"DEVELOPMENT\", \"role\": \"DEV\", \"accountName\": \"thoughtspot_partner\", \"warehouse\": \"DEMO_WH\", \"user\": \"DEV_USER\" } } ``` * This is an example of updating a single table in an existing connection with tables: ``` { \"authenticationType\": \"SERVICE_ACCOUNT\", \"externalDatabases\": [ { \"name\": \"DEVELOPMENT\", \"isAutoCreated\": false, \"schemas\": [ { \"name\": \"TS_dataset\", \"tables\": [ { \"name\": \"CUSTOMER\", \"type\": \"TABLE\", \"description\": \"\", \"selected\": true, \"linked\": true, \"gid\": 0, \"datasetId\": \"-1\", \"subType\": \"\", \"reportId\": \"\", \"viewId\": \"\", \"columns\": [], \"relationships\": [] }, { \"name\": \"tpch5k_falcon_default_schema_users\", \"type\": \"TABLE\", \"description\": \"\", \"selected\": true, \"linked\": true, \"gid\": 0, \"datasetId\": \"-1\", \"subType\": \"\", \"reportId\": \"\", \"viewId\": \"\", \"columns\": [ { \"name\": \"user_id\", \"type\": \"INT64\", \"canImport\": true, \"selected\": true, \"description\": \"\", \"isLinkedActive\": true, \"isAggregate\": false }, { \"name\": \"product_id\", \"type\": \"INT64\", \"canImport\": true, \"selected\": true, \"description\": \"\", \"isLinkedActive\": true, \"isAggregate\": false }, { \"name\": \"user_cost\", \"type\": \"INT64\", \"canImport\": true, \"selected\": true, \"description\": \"\", \"isLinkedActive\": true, \"isAggregate\": false } ], \"relationships\": [] } ] } ] } ], \"configuration\": { \"password\": \"\", \"database\": \"DEVELOPMENT\", \"role\": \"DEV\", \"accountName\": \"thoughtspot_partner\", \"warehouse\": \"DEMO_WH\", \"user\": \"DEV_USER\" } } ``` 3. If you are updating a configuration attribute, connection name, or description, you can set `validate` to `false`. **NOTE:** If the `authentication_type` is anything other than SERVICE_ACCOUNT, you must explicitly provide the authenticationType property in the payload. If you do not specify authenticationType, the API will default to SERVICE_ACCOUNT as the authentication type. * A JSON map of configuration attributes in `data_warehouse_config`. The following example shows the configuration attributes for a Snowflake connection: ``` { \"configuration\":{ \"accountName\":\"thoughtspot_partner\", \"user\":\"tsadmin\", \"password\":\"TestConn123\", \"role\":\"sysadmin\", \"warehouse\":\"MEDIUM_WH\" }, \"externalDatabases\":[ ] } ``` + * @param connectionIdentifier Unique ID or name of the connection. + * @param updateConnectionV2Request + */ + updateConnectionV2(connectionIdentifier, updateConnectionV2Request, _options) { + const result = this.api.updateConnectionV2(connectionIdentifier, updateConnectionV2Request, _options); + return result.toPromise(); + } +}; +var PromiseCustomActionApi = class { + constructor(configuration, requestFactory, responseProcessor) { + this.api = new ObservableCustomActionApi(configuration, requestFactory, responseProcessor); + } + /** + * Version: 9.6.0.cl or later Creates a custom action that appears as a menu action on a saved Answer or Liveboard visualization. Requires `DEVELOPER` (**Has Developer privilege**) or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `DEVELOPER` (**Has developer privilege**) privilege is required. #### Usage Guidelines The API lets you create the following types of custom actions: * URL-based action Allows pushing data to an external URL. * Callback action Triggers a callback to the host application and initiates a response payload on an embedded ThoughtSpot instance. By default, custom actions are visible to only administrator or developer users. To make a custom action available to other users, and specify the groups in `group_identifiers`. By default, the custom action is set as a _global_ action on all visualizations and saved Answers. To assign a custom action to specific Liveboard visualization, saved Answer, or Worksheet, set `visibility` to `false` in `default_action_config` property and specify the GUID or name of the object in `associate_metadata`. For more information, see [Custom actions](https://developers.thoughtspot.com/docs/custom-action-intro). + * @param createCustomActionRequest + */ + createCustomAction(createCustomActionRequest, _options) { + const result = this.api.createCustomAction(createCustomActionRequest, _options); + return result.toPromise(); + } + /** + * Version: 9.6.0.cl or later Removes the custom action specified in the API request. Requires `DEVELOPER` (**Has Developer privilege**) or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `DEVELOPER` (**Has developer privilege**) privilege is required. + * @param customActionIdentifier Unique ID or name of the custom action. + */ + deleteCustomAction(customActionIdentifier, _options) { + const result = this.api.deleteCustomAction(customActionIdentifier, _options); + return result.toPromise(); + } + /** + * Version: 9.6.0.cl or later Gets custom actions configured on the cluster. Requires `DEVELOPER` (**Has Developer privilege**) or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `DEVELOPER` (**Has developer privilege**) privilege is required. + * @param searchCustomActionsRequest + */ + searchCustomActions(searchCustomActionsRequest, _options) { + const result = this.api.searchCustomActions(searchCustomActionsRequest, _options); + return result.toPromise(); + } + /** + * Version: 9.6.0.cl or later Updates a custom action. Requires `DEVELOPER` (**Has Developer privilege**) or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `DEVELOPER` (**Has developer privilege**) privilege is required. #### Usage Guidelines The API allows you to modify the following properties: * Name of the custom action * Action availability to groups * Association to metadata objects * Authentication settings for a URL-based action For more information, see [Custom actions](https://developers.thoughtspot.com/docs/custom-action-intro). + * @param customActionIdentifier Unique ID or name of the custom action. + * @param updateCustomActionRequest + */ + updateCustomAction(customActionIdentifier, updateCustomActionRequest, _options) { + const result = this.api.updateCustomAction(customActionIdentifier, updateCustomActionRequest, _options); + return result.toPromise(); + } +}; +var PromiseCustomCalendarsApi = class { + constructor(configuration, requestFactory, responseProcessor) { + this.api = new ObservableCustomCalendarsApi(configuration, requestFactory, responseProcessor); + } + /** + * Version: 10.12.0.cl or later Creates a new [custom calendar](https://docs.thoughtspot.com/cloud/latest/connections-cust-cal). Requires `DATAMANAGEMENT` (**Can manage data**) or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your ThoughtSpot instance, the `CAN_MANAGE_CUSTOM_CALENDAR` (**Can manage custom calendars**) privilege is required. #### Usage guidelines You can create a custom calendar from scratch or an existing Table in ThoughtSpot. For both methods of calendar creation, the following parameters are required: * Name of the custom calendar. * Calendar creation method. To create a calendar from an existing table, specify the method: - `FROM_EXISTING_TABLE` - Creates calendar from the table reference provided in the API request. - `FROM_INPUT_PARAMS` - Creates a calendar from the parameters defined in the API request. * Connection ID and Table name * Database and schema name attributes: For most Cloud Data Warehouse (CDW) connectors, both `database_name` and `schema_name` attributes are required. However, the attribute requirements are conditional and vary based on the connector type and its metadata structure. For example, for connectors such as Teradata, MySQL, SingleSore, Amazon Aurora MySQL, Amazon RDS MySQL, Oracle, and GCP_MYSQL, the `schema_name` is required, whereas the `database_name` attribute is not. Similarly, connectors such as ClickHouse require you to specify the `database_name` and the schema specification in such cases is optional. **NOTE**: If you are creating a calendar from an existing table, ensure that the referenced table matches the required DDL for custom calendars. If the schema does not match, the API returns an error. ##### Calendar type The API allows you to create the following types of calendars: * `MONTH_OFFSET`. The default calendar type. A `MONTH_OFFSET` calendar is offset by a few months from the standard calendar months (January to December) and the year begins with the month defined in the request. For example, if the `month_offset` value is set as `April`, the calendar year begins in April. * `4-4-5`. Each quarter in the calendar will include two 4-week months followed by one 5-week month. * `4-5-4`. Each quarter in the calendar will include two 4-week months with a 5-week month between. * `5-4-4`. Each quarter begins with a 5-week month, followed by two 4-week months. To start and end the calendar on a specific date, specify the dates in the `MM/DD/YYYY` format. For `MONTH_OFFSET` calendars, ensure that the `start_date` matches the month specified in the `month_offset` attribute. You can also set the starting day of the week and customize the prefixes for year and quarter labels. #### Examples To create a calendar from an existing table: ``` { \"name\": \"MyCustomCalendar1\", \"table_reference\": { \"connection_identifier\": \"4db8ea22-2ff4-4224-b05a-26674717e468\", \"table_name\": \"MyCalendarTable\", \"database_name\": \"RETAILAPPAREL\", \"schema_name\": \"PUBLIC\" }, \"creation_method\": \"FROM_EXISTING_TABLE\", } ``` To create a calendar from scratch: ``` { \"name\": \"MyCustomCalendar1\", \"table_reference\": { \"connection_identifier\": \"4db8ea22-2ff4-4224-b05a-26674717e468\", \"table_name\": \"MyCalendarTable\", \"database_name\": \"RETAILAPPAREL\", \"schema_name\": \"PUBLIC\" }, \"creation_method\": \"FROM_INPUT_PARAMS\", \"calendar_type\": \"MONTH_OFFSET\", \"month_offset\": \"April\", \"start_day_of_week\": \"Monday\", \"quarter_name_prefix\": \"Q\", \"year_name_prefix\": \"FY\", \"start_date\": \"04/01/2025\", \"end_date\": \"04/31/2025\" } ``` + * @param createCalendarRequest + */ + createCalendar(createCalendarRequest, _options) { + const result = this.api.createCalendar(createCalendarRequest, _options); + return result.toPromise(); + } + /** + * Version: 10.12.0.cl or later Deletes a [custom calendar](https://docs.thoughtspot.com/cloud/latest/connections-cust-cal). Requires `DATAMANAGEMENT` (**Can manage data**) or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your ThoughtSpot instance, the `CAN_MANAGE_CUSTOM_CALENDAR` (**Can manage custom calendars**) privilege is required. #### Usage guidelines To delete a custom calendar, specify the calendar ID as a path parameter in the request URL. + * @param calendarIdentifier Unique ID or name of the Calendar. + */ + deleteCalendar(calendarIdentifier, _options) { + const result = this.api.deleteCalendar(calendarIdentifier, _options); + return result.toPromise(); + } + /** + * Version: 10.12.0.cl or later Exports a [custom calendar](https://docs.thoughtspot.com/cloud/latest/connections-cust-cal) in the CSV format. Requires `DATAMANAGEMENT` (**Can manage data**) or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your ThoughtSpot instance, the `CAN_MANAGE_CUSTOM_CALENDAR` (**Can manage custom calendars**) privilege is required. #### Usage guidelines Use this API to download a custom calendar in the CSV file format. In your API request, specify the following parameters. * Start and end date of the calendar. For \"month offset\" calendars, the start date must match the month defined in the `month_offset` attribute. You can also specify optional parameters such as the starting day of the week and prefixes for the quarter and year labels. + * @param generateCSVRequest + */ + generateCSV(generateCSVRequest, _options) { + const result = this.api.generateCSV(generateCSVRequest, _options); + return result.toPromise(); + } + /** + * Version: 10.12.0.cl or later Gets a list of [custom calendars](https://docs.thoughtspot.com/cloud/latest/connections-cust-cal). Requires `DATAMANAGEMENT` (**Can manage data**) or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your ThoughtSpot instance, the `CAN_MANAGE_CUSTOM_CALENDAR` (**Can manage custom calendars**) privilege is required. #### Usage guidelines By default, the API returns a list of custom calendars for all connection objects. To retrieve custom calendar details for a particular connection, specify the connection ID. You can also use other search parameters such as `name_pattern` and `sort_options` as search filters. The `name_pattern` parameter filters and returns only those objects that match the specified pattern. Use `%` as a wildcard for pattern matching. + * @param searchCalendarsRequest + */ + searchCalendars(searchCalendarsRequest, _options) { + const result = this.api.searchCalendars(searchCalendarsRequest, _options); + return result.toPromise(); + } + /** + * Version: 10.12.0.cl or later Updates the properties of a [custom calendar](https://docs.thoughtspot.com/cloud/latest/connections-cust-cal). Requires `DATAMANAGEMENT` (**Can manage data**) or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your ThoughtSpot instance, the `CAN_MANAGE_CUSTOM_CALENDAR` (**Can manage custom calendars**) privilege is required. #### Usage guidelines You can update the properties of a calendar using one of the following methods: * `FROM_INPUT_PARAMS` to update the calendar properties with the values defined in the API request. * `FROM_EXISTING_TABLE` Creates a calendar from the parameters defined in the API request. To update a custom calendar, specify the calendar ID as a path parameter in the request URL and the following parameters in the request body: * Connection ID and Table name * Database and schema name attributes: For most Cloud Data Warehouse (CDW) connectors, both `database_name` and `schema_name` attributes are required. However, the attribute requirements are conditional and vary based on the connector type and its metadata structure. For example, for connectors such as Teradata, MySQL, SingleSore, Amazon Aurora MySQL, Amazon RDS MySQL, Oracle, and GCP_MYSQL, the `schema_name` is required, whereas the `database_name` attribute is not. Similarly, connectors such as ClickHouse require you to specify the `database_name` and the schema specification in such cases is optional. The API allows you to modify the calendar type, month offset value, start and end date, starting day of the week, and prefixes assigned to the year and quarter labels. #### Examples Update a custom calendar using an existing Table in ThoughtSpot: ``` { \"update_method\": \"FROM_EXISTING_TABLE\", \"table_reference\": { \"connection_identifier\": \"Connection1\", \"database_name\": \"db1\", \"table_name\": \"custom_calendar_2025\", \"schame_name\": \"schemaVar\" } } ``` Update a custom calendar with the attributes defined in the API request: ``` { \"update_method\": \"FROM_INPUT_PARAMS\", \"table_reference\": { \"connection_identifier\": \"Connection1\", \"database_name\": \"db1\", \"table_name\": \"custom_calendar_2025\", \"schame_name\": \"schemaVar\" }, \"month_offset\": \"August\", \"start_day_of_week\": \"Monday\", \"start_date\": \"08/01/2025\", \"end_date\": \"07/31/2026\" } ``` + * @param calendarIdentifier Unique Id or name of the calendar. + * @param updateCalendarRequest + */ + updateCalendar(calendarIdentifier, updateCalendarRequest, _options) { + const result = this.api.updateCalendar(calendarIdentifier, updateCalendarRequest, _options); + return result.toPromise(); + } +}; +var PromiseDBTApi = class { + constructor(configuration, requestFactory, responseProcessor) { + this.api = new ObservableDBTApi(configuration, requestFactory, responseProcessor); + } + /** + * Version: 9.9.0.cl or later Creates a DBT connection object in ThoughtSpot. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege or `DATAMANAGEMENT` (**Can manage data**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the following Data control privileges may be required: - `CAN_MANAGE_CUSTOM_CALENDAR`(**Can manage custom calendars**) - `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) - `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` (**Can manage data models**) #### About create DBT connection DBT connection in ThoughtSpot is used by the user to define DBT credentials for cloud . The API needs embrace connection, embrace database name, DBT url, import type, DBT account identifier, DBT project identifier, DBT access token and environment details (or) embrace connection, embrace database name, import type, file_content to create a connection object. To know more about DBT, see ThoughtSpot Product Documentation. + * @param connectionName Name of the connection. + * @param databaseName Name of the Database. + * @param importType Mention type of Import + * @param accessToken Access token is mandatory when Import_Type is DBT_CLOUD. + * @param dbtUrl DBT URL is mandatory when Import_Type is DBT_CLOUD. + * @param accountId Account ID is mandatory when Import_Type is DBT_CLOUD + * @param projectId Project ID is mandatory when Import_Type is DBT_CLOUD + * @param dbtEnvId DBT Environment ID\\\" + * @param projectName Name of the project + * @param fileContent Upload DBT Manifest and Catalog artifact files as a ZIP file. This field is Mandatory when Import Type is \\\'ZIP_FILE\\\' + */ + dbtConnection(connectionName, databaseName, importType, accessToken, dbtUrl, accountId, projectId, dbtEnvId, projectName, fileContent, _options) { + const result = this.api.dbtConnection(connectionName, databaseName, importType, accessToken, dbtUrl, accountId, projectId, dbtEnvId, projectName, fileContent, _options); + return result.toPromise(); + } + /** + * Version: 9.9.0.cl or later Resynchronize the existing list of models, tables, worksheet tml’s and import them to Thoughtspot based on the DBT connection object. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege or `DATAMANAGEMENT` (**Can manage data**) privilege, along with an existing DBT connection. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the following data control privileges may be required: - `CAN_MANAGE_CUSTOM_CALENDAR`(**Can manage custom calendars**) - `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) - `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` (**Can manage data models**) + * @param dbtConnectionIdentifier Unique ID of the DBT connection. + * @param fileContent Upload DBT Manifest and Catalog artifact files as a ZIP file. This field is mandatory if the connection was created with import_type ‘ZIP_FILE’ + */ + dbtGenerateSyncTml(dbtConnectionIdentifier, fileContent, _options) { + const result = this.api.dbtGenerateSyncTml(dbtConnectionIdentifier, fileContent, _options); + return result.toPromise(); + } + /** + * Version: 9.9.0.cl or later Generate required table and worksheet and import them. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege or `DATAMANAGEMENT` (**Can manage data**) privilege, along with an existing DBT connection. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the following data control privileges may be required: - `CAN_MANAGE_CUSTOM_CALENDAR`(**Can manage custom calendars**) - `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) - `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` (**Can manage data models**) #### About generate TML Models and Worksheets to be imported can be selected by the user as part of the API. + * @param dbtConnectionIdentifier Unique ID of the DBT connection. + * @param modelTables List of Models and their respective Tables Example: \\\'[{\\\"model_name\\\": \\\"model_name\\\", \\\"tables\\\": [\\\"table_name\\\"]}]\\\' + * @param importWorksheets Mention the worksheet tmls to import + * @param worksheets List of worksheets is mandatory when import_Worksheets is type SELECTED Example: [\\\"worksheet_name\\\"] + * @param fileContent Upload DBT Manifest and Catalog artifact files as a ZIP file. This field is mandatory if the connection was created with import_type ‘ZIP_FILE’ + */ + dbtGenerateTml(dbtConnectionIdentifier, modelTables, importWorksheets, worksheets, fileContent, _options) { + const result = this.api.dbtGenerateTml(dbtConnectionIdentifier, modelTables, importWorksheets, worksheets, fileContent, _options); + return result.toPromise(); + } + /** + * Version: 9.9.0.cl or later Gets a list of DBT connection objects by user and organization, available on the ThoughtSpot system. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege or `DATAMANAGEMENT` (**Can manage data**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the following Data control privileges may be required: - `CAN_MANAGE_CUSTOM_CALENDAR`(**Can manage custom calendars**) - `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) - `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` (**Can manage data models**) #### About search DBT connection To get details of a specific DBT connection identifier, database connection identifier, database connection name, database name, project name, project identifier, environment identifier , import type and author. + */ + dbtSearch(_options) { + const result = this.api.dbtSearch(_options); + return result.toPromise(); + } + /** + * Version: 9.9.0.cl or later Removes the specified DBT connection object from the ThoughtSpot system. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) or `DATAMANAGEMENT` (**Can manage data ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the following Data control privileges may be required: - `CAN_MANAGE_CUSTOM_CALENDAR`(**Can manage custom calendars**) - `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) - `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` (**Can manage data models**) + * @param dbtConnectionIdentifier Unique ID of the DBT Connection. + */ + deleteDbtConnection(dbtConnectionIdentifier, _options) { + const result = this.api.deleteDbtConnection(dbtConnectionIdentifier, _options); + return result.toPromise(); + } + /** + * Version: 9.9.0.cl or later Updates a DBT connection object. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege or `DATAMANAGEMENT` (**Can manage data ThoughtSpot**) privilege, along with an existing DBT connection. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the following data control privileges may be required: - `CAN_MANAGE_CUSTOM_CALENDAR`(**Can manage custom calendars**) - `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) - `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` (**Can manage data models**) #### About update DBT connection You can modify DBT connection object properties such as embrace connection name, embrace database name, import type, account identifier, access token, project identifier and environment (or) embrace connection, embrace database name, import type, file_content settings. + * @param dbtConnectionIdentifier Unique ID of the DBT Connection. + * @param connectionName Name of the connection. + * @param databaseName Name of the Database. + * @param importType Mention type of Import + * @param accessToken Access token is mandatory when Import_Type is DBT_CLOUD. + * @param dbtUrl DBT URL is mandatory when Import_Type is DBT_CLOUD. + * @param accountId Account ID is mandatory when Import_Type is DBT_CLOUD + * @param projectId Project ID is mandatory when Import_Type is DBT_CLOUD + * @param dbtEnvId DBT Environment ID\\\" + * @param projectName Name of the project + * @param fileContent Upload DBT Manifest and Catalog artifact files as a ZIP file. This field is Mandatory when Import Type is \\\'ZIP_FILE\\\' + */ + updateDbtConnection(dbtConnectionIdentifier, connectionName, databaseName, importType, accessToken, dbtUrl, accountId, projectId, dbtEnvId, projectName, fileContent, _options) { + const result = this.api.updateDbtConnection(dbtConnectionIdentifier, connectionName, databaseName, importType, accessToken, dbtUrl, accountId, projectId, dbtEnvId, projectName, fileContent, _options); + return result.toPromise(); + } +}; +var PromiseDataApi = class { + constructor(configuration, requestFactory, responseProcessor) { + this.api = new ObservableDataApi(configuration, requestFactory, responseProcessor); + } + /** + * Version: 9.0.0.cl or later Fetches data from a saved Answer. Requires at least view access to the saved Answer. The `record_size` attribute determines the number of records to retrieve in an API call. For more information about pagination, record size, and maximum row limit, see [Pagination and record size settings](https://developers.thoughtspot.com/docs/fetch-data-and-report-apis#_pagination_settings_for_data_and_report_apis). + * @param fetchAnswerDataRequest + */ + fetchAnswerData(fetchAnswerDataRequest, _options) { + const result = this.api.fetchAnswerData(fetchAnswerDataRequest, _options); + return result.toPromise(); + } + /** + * Version: 9.0.0.cl or later Gets data from a Liveboard object and its visualization. Requires at least view access to the Liveboard. #### Usage guidelines In the request body, specify the GUID or name of the Liveboard. To get data for specific visualizations, add the GUIDs or names of the visualizations in the API request. To include unsaved changes in the report, pass the `transient_pinboard_content` script generated from the `getExportRequestForCurrentPinboard` method in the Visual Embed SDK. Upon successful execution, the API returns the report with unsaved changes. If the new Liveboard experience mode, the transient content includes ad hoc changes to visualizations such as sorting, toggling of legends, and data drill down. For more information, and see [Liveboard data API](https://developers.thoughtspot.com/docs/fetch-data-and-report-apis#_fetch_liveboard_data_api). + * @param fetchLiveboardDataRequest + */ + fetchLiveboardData(fetchLiveboardDataRequest, _options) { + const result = this.api.fetchLiveboardData(fetchLiveboardDataRequest, _options); + return result.toPromise(); + } + /** + * Version: 9.0.0.cl or later Generates an Answer from a given data source. Requires at least view access to the data source object (Worksheet or View). #### Usage guidelines To search data, specify the data source GUID in `logical_table_identifier`. The data source can be a Worksheet, View, Table, or SQL view. Pass search tokens in the `query_string` attribute in the API request as shown in the following example: ``` { \"query_string\": \"[sales] by [store]\", \"logical_table_identifier\": \"cd252e5c-b552-49a8-821d-3eadaa049cca\", } ``` For more information about the `query_string` format and data source attribute, see [Search data API](https://developers.thoughtspot.com/docs/fetch-data-and-report-apis#_search_data_api). The `record_size` attribute determines the number of records to retrieve in an API call. For more information about pagination, record size, and maximum row limit, see [Pagination and record size settings](https://developers.thoughtspot.com/docs/fetch-data-and-report-apis#_pagination_settings_for_data_and_report_api). + * @param searchDataRequest + */ + searchData(searchDataRequest, _options) { + const result = this.api.searchData(searchDataRequest, _options); + return result.toPromise(); + } +}; +var PromiseEmailCustomizationApi = class { + constructor(configuration, requestFactory, responseProcessor) { + this.api = new ObservableEmailCustomizationApi(configuration, requestFactory, responseProcessor); + } + /** + * Version: 10.10.0.cl or later Creates a customization configuration for the notification email. #### Pre-requisites Requires `DEVELOPER` (**has developer privilege**) or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `DEVELOPER` (**Has developer privilege**) privilege is required. **NOTE**:This endpoint in currently in beta. Contact ThoughtSpot support to enable this on your instance. #### Usage guidelines To create a custom configuration pass these parameters in your API request: - A JSON map of configuration attributes `template_properties`. The following example shows a sample set of customization configuration: ``` { { \"cta_button_bg_color\": \"#444DEA\", \"cta_text_font_color\": \"#FFFFFF\", \"primary_bg_color\": \"#D3DEF0\", \"logo_url\": \"https://storage.pardot.com/710713/1642089901EbkRibJq/TS_fullworkmark_darkmode.png\", \"font_family\": \"\", \"product_name\": \"ThoughtSpot\", \"footer_address\": \"444 Castro St, Suite 1000 Mountain View, CA 94041\", \"footer_phone\": \"(800) 508-7008\", \"replacement_value_for_liveboard\": \"Dashboard\", \"replacement_value_for_answer\": \"Chart\", \"replacement_value_for_spot_iq\": \"AI Insights\", \"hide_footer_phone\": false, \"hide_footer_address\": false, \"hide_product_name\": false, \"hide_manage_notification\": false, \"hide_mobile_app_nudge\": false, \"hide_privacy_policy\": false, \"hide_ts_vocabulary_definitions\": false, \"hide_error_message\": false, \"hide_unsubscribe_link\": false, \"hide_notification_status\": false, \"hide_modify_alert\": false, \"company_website_url\": \"https://your-website.com/\", \"company_privacy_policy_url\" : \"https://link-to-privacy-policy.com/\", \"contact_support_url\": \"https://link-to-contact-support.com/\", \"hide_contact_support_url\": false, \"hide_logo_url\" : false } } ``` + * @param createEmailCustomizationRequest + */ + createEmailCustomization(createEmailCustomizationRequest, _options) { + const result = this.api.createEmailCustomization(createEmailCustomizationRequest, _options); + return result.toPromise(); + } + /** + * Version: 10.10.0.cl or later Deletes the configuration for the email customization. #### Pre-requisites Requires `DEVELOPER` (**has developer privilege**) or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `DEVELOPER` (**Has developer privilege**) privilege is required. **NOTE**:This endpoint in currently in beta. Contact ThoughtSpot support to enable this on your instance. #### Usage guidelines - Call the search API endpoint to get the `template_identifier` from the response. - Use that `template_identifier` as a parameter in this API request. + * @param templateIdentifier Unique ID or name of the email customization. + */ + deleteEmailCustomization(templateIdentifier, _options) { + const result = this.api.deleteEmailCustomization(templateIdentifier, _options); + return result.toPromise(); + } + /** + * Version: 10.12.0.cl or later Deletes the configuration for the email customization. #### Pre-requisites Requires `DEVELOPER` (**has developer privilege**) or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `DEVELOPER` (**Has developer privilege**) privilege is required. **NOTE**:This endpoint in currently in beta. Contact ThoughtSpot support to enable this on your instance. #### Usage guidelines - Call the search API endpoint to get the `org_identifier` from the response. - Use that `org_identifier` as a parameter in this API request. + * @param deleteOrgEmailCustomizationRequest + */ + deleteOrgEmailCustomization(deleteOrgEmailCustomizationRequest, _options) { + const result = this.api.deleteOrgEmailCustomization(deleteOrgEmailCustomizationRequest, _options); + return result.toPromise(); + } + /** + * Version: 10.10.0.cl or later Search the email customization configuration if any set for the ThoughtSpot system. #### Pre-requisites Requires `DEVELOPER` (**has developer privilege**) or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `DEVELOPER` (**Has developer privilege**) privilege is required. **NOTE**:This endpoint in currently in beta. Contact ThoughtSpot support to enable this on your instance. + * @param searchEmailCustomizationRequest + */ + searchEmailCustomization(searchEmailCustomizationRequest, _options) { + const result = this.api.searchEmailCustomization(searchEmailCustomizationRequest, _options); + return result.toPromise(); + } + /** + * Version: 10.12.0.cl or later Updates a customization configuration for the notification email. #### Pre-requisites Requires `DEVELOPER` (**has developer privilege**) or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `DEVELOPER` (**Has developer privilege**) privilege is required. **NOTE**:This endpoint in currently in beta. Contact ThoughtSpot support to enable this on your instance. #### Usage guidelines To update a custom configuration pass these parameters in your API request: - A JSON map of configuration attributes `template_properties`. The following example shows a sample set of customization configuration: ``` { { \"cta_button_bg_color\": \"#444DEA\", \"cta_text_font_color\": \"#FFFFFF\", \"primary_bg_color\": \"#D3DEF0\", \"logo_url\": \"https://storage.pardot.com/710713/1642089901EbkRibJq/TS_fullworkmark_darkmode.png\", \"font_family\": \"\", \"product_name\": \"ThoughtSpot\", \"footer_address\": \"444 Castro St, Suite 1000 Mountain View, CA 94041\", \"footer_phone\": \"(800) 508-7008\", \"replacement_value_for_liveboard\": \"Dashboard\", \"replacement_value_for_answer\": \"Chart\", \"replacement_value_for_spot_iq\": \"AI Insights\", \"hide_footer_phone\": false, \"hide_footer_address\": false, \"hide_product_name\": false, \"hide_manage_notification\": false, \"hide_mobile_app_nudge\": false, \"hide_privacy_policy\": false, \"hide_ts_vocabulary_definitions\": false, \"hide_error_message\": false, \"hide_unsubscribe_link\": false, \"hide_notification_status\": false, \"hide_modify_alert\": false, \"company_website_url\": \"https://your-website.com/\", \"company_privacy_policy_url\" : \"https://link-to-privacy-policy.com/\", \"contact_support_url\": \"https://link-to-contact-support.com/\", \"hide_contact_support_url\": false, \"hide_logo_url\" : false } } ``` + * @param updateEmailCustomizationRequest + */ + updateEmailCustomization(updateEmailCustomizationRequest, _options) { + const result = this.api.updateEmailCustomization(updateEmailCustomizationRequest, _options); + return result.toPromise(); + } + /** + * Version: 10.10.0.cl or later Validates the email customization configuration if any set for the ThoughtSpot system. #### Pre-requisites Requires `DEVELOPER` (**has developer privilege**) or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `DEVELOPER` (**Has developer privilege**) privilege is required. **NOTE**:This endpoint in currently in beta. Contact ThoughtSpot support to enable this on your instance. + */ + validateEmailCustomization(_options) { + const result = this.api.validateEmailCustomization(_options); + return result.toPromise(); + } +}; +var PromiseGroupsApi = class { + constructor(configuration, requestFactory, responseProcessor) { + this.api = new ObservableGroupsApi(configuration, requestFactory, responseProcessor); + } + /** + * Version: 9.0.0.cl or later Creates a group object in ThoughtSpot. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `GROUP_ADMINISTRATION` (**Can manage groups**) privilege is required. #### About groups Groups in ThoughtSpot are used by the administrators to define privileges and organize users based on their roles and access requirements. To know more about groups and privileges, see [ThoughtSpot Product Documentation](https://docs.thoughtspot.com/cloud/latest/groups-privileges). #### Supported operations The API endpoint lets you perform the following operations: * Assign privileges * Add users * Define sharing visibility * Add sub-groups * Assign a default Liveboard + * @param createUserGroupRequest + */ + createUserGroup(createUserGroupRequest, _options) { + const result = this.api.createUserGroup(createUserGroupRequest, _options); + return result.toPromise(); + } + /** + * Version: 9.0.0.cl or later Removes the specified group object from the ThoughtSpot system. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `GROUP_ADMINISTRATION` (**Can manage groups**) privilege is required. + * @param groupIdentifier GUID or name of the group. + */ + deleteUserGroup(groupIdentifier, _options) { + const result = this.api.deleteUserGroup(groupIdentifier, _options); + return result.toPromise(); + } + /** + * Version: 9.0.0.cl or later Imports group objects from external databases into ThoughtSpot. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `GROUP_ADMINISTRATION` (**Can manage groups**) privilege is required. During the import operation: * If the specified group is not available in ThoughtSpot, it will be added to ThoughtSpot. * If `delete_unspecified_groups` is set to `true`, the groups not specified in the API request, excluding administrator and system user groups, are deleted. * If the specified groups are already available in ThoughtSpot, the object properties of these groups are modified and synchronized as per the input data in the API request. A successful API call returns the object that represents the changes made in the ThoughtSpot system. + * @param importUserGroupsRequest + */ + importUserGroups(importUserGroupsRequest, _options) { + const result = this.api.importUserGroups(importUserGroupsRequest, _options); + return result.toPromise(); + } + /** + * Version: 9.0.0.cl or later Gets a list of user group objects from the ThoughtSpot system. To get details of a specific user group, specify the user group GUID or name. You can also filter the API response based on User ID, Org ID, Role ID, type of group, sharing visibility, privileges assigned to the group, and the Liveboard IDs assigned to the users in the group. Available to all users. Users with `ADMINISTRATION` (**Can administer ThoughtSpot**) privileges can view all users properties. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `GROUP_ADMINISTRATION` (**Can manage groups**) privilege is required. **NOTE**: If you do not get precise results, try setting `record_size` to `-1` and `record_offset` to `0`. + * @param searchUserGroupsRequest + */ + searchUserGroups(searchUserGroupsRequest, _options) { + const result = this.api.searchUserGroups(searchUserGroupsRequest, _options); + return result.toPromise(); + } + /** + * Version: 9.0.0.cl or later Updates the properties of a group object in ThoughtSpot. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `GROUP_ADMINISTRATION` (**Can manage groups**) privilege is required. #### Supported operations This API endpoint lets you perform the following operations in a single API request: * Edit [privileges](https://developers.thoughtspot.com/docs/?pageid=api-user-management#group-privileges) * Add or remove users * Change sharing visibility settings * Add or remove sub-groups * Assign a default Liveboard or update the existing settings + * @param groupIdentifier GUID or name of the group. + * @param updateUserGroupRequest + */ + updateUserGroup(groupIdentifier, updateUserGroupRequest, _options) { + const result = this.api.updateUserGroup(groupIdentifier, updateUserGroupRequest, _options); + return result.toPromise(); + } +}; +var PromiseJobsApi = class { + constructor(configuration, requestFactory, responseProcessor) { + this.api = new ObservableJobsApi(configuration, requestFactory, responseProcessor); + } + /** + * Version: 26.4.0.cl or later Searches delivery history for communication channels such as webhooks. Returns channel-level delivery status for each job execution record. Use this to monitor channel health and delivery success rates across events. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) or `DEVELOPER` (**Has developer privilege**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, users with `CAN_MANAGE_WEBHOOKS` (**Can manage webhooks**) privilege are also authorized to perform this action. **NOTE**: When `channel_type` is `WEBHOOK`, the following constraints apply: - `job_ids`, `channel_identifiers`, and `events` each accept at most one element. - When `job_ids` is provided, it is used as the sole lookup key and other filter fields are ignored. - When `job_ids` is not provided, `channel_identifiers` and `events` are both required, each containing exactly one element. - Records older than the configured retention period are not returned. - Use `start_epoch_time_in_millis` and/or `end_epoch_time_in_millis` to narrow results to a specific time window. + * @param searchChannelHistoryRequest + */ + searchChannelHistory(searchChannelHistoryRequest, _options) { + const result = this.api.searchChannelHistory(searchChannelHistoryRequest, _options); + return result.toPromise(); + } +}; +var PromiseLogApi = class { + constructor(configuration, requestFactory, responseProcessor) { + this.api = new ObservableLogApi(configuration, requestFactory, responseProcessor); + } + /** + * Version: 9.0.0.cl or later Fetches security audit logs. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the [Admin Control](https://developers.thoughtspot.com/docs/rbac#_admin_control) privileges are required. #### Usage guidelines By default, the API retrieves logs for the last 24 hours. You can set a custom duration in EPOCH time. Make sure the log duration specified in your API request doesn’t exceed 24 hours. If you must fetch logs for a longer time range, modify the duration and make multiple sequential API requests. Upon successful execution, the API returns logs with the following information: * timestamp of the event * event ID * event type * name and GUID of the user * IP address of ThoughtSpot instance For more information see [Audit logs Documentation](https://developers.thoughtspot.com/docs/audit-logs). + * @param fetchLogsRequest + */ + fetchLogs(fetchLogsRequest, _options) { + const result = this.api.fetchLogs(fetchLogsRequest, _options); + return result.toPromise(); + } +}; +var PromiseMetadataApi = class { + constructor(configuration, requestFactory, responseProcessor) { + this.api = new ObservableMetadataApi(configuration, requestFactory, responseProcessor); + } + /** + * Convert worksheets to models Version: 10.6.0.cl or later ## Prerequisites - **Privileges Required:** - `DATAMANAGEMENT` (Can manage data) or `ADMINISTRATION` (Can administer ThoughtSpot). - **Additional Privileges (if RBAC is enabled):** - `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` (Can manage data models). --- ## Usage Guidelines ### Parameters 1. **worksheet_ids** - **Description:** A comma-separated list of GUIDs (Globally Unique Identifiers) specifying the Worksheets to be converted. - **Usage:** - Used only when `convert_all` is set to `false`. - Leave empty or omit when `convert_all` is set to `true`. 2. **exclude_worksheet_ids** - **Description:** A comma-separated list of GUIDs specifying Worksheets to be excluded from conversion. - **Usage:** - Useful when `convert_all` is set to `true` and specific Worksheets should not be converted. 3. **convert_all** - **Description:** Sets the scope of conversion. - **Options:** - `true`: Converts all Worksheets in the system, except those specified in `exclude_worksheet_ids`. - `false`: Converts only the Worksheets listed in `worksheet_ids`. 4. **apply_changes** - **Description:** Specifies whether to apply changes directly to ThoughtSpot or to generate a preview before applying any changes.Used for validation of conversion. - **Options:** - `true`: Applies conversion changes directly to ThoughtSpot. - `false`: Generates only a preview of the changes and does not apply any changes to ThoughtSpot --- ## Best Practices 1. **Backup Before Conversion:** Always export metadata as a backup before initiating the conversion process 2. **Partial Conversion for Testing:** Test the conversion process by setting `convert_all` to `false` and specifying a small number of `worksheet_ids`. 3. **Verify Dependencies:** Check for dependent objects, such as Tables and Connections, to avoid invalid references. 4. **Review Changes:** Use `apply_changes: false` to preview the impact of the conversion before applying changes. --- ## Examples ### Convert Specific Worksheets ```json { \"worksheet_ids\": [\"guid1\", \"guid2\", \"guid3\"], \"exclude_worksheet_ids\": [], \"convert_all\": false, \"apply_changes\": true } ``` ### Convert All Accessible Worksheets ```json { \"worksheet_ids\": [], \"exclude_worksheet_ids\": [], \"convert_all\": true, \"apply_changes\": true } ``` ### Exclude Specific Worksheets While Converting All Accessible Worksheets ```json { \"worksheet_ids\": [], \"exclude_worksheet_ids\": [\"abc\"], \"convert_all\": true, \"apply_changes\": true } ``` + * @param convertWorksheetToModelRequest + */ + convertWorksheetToModel(convertWorksheetToModelRequest, _options) { + const result = this.api.convertWorksheetToModel(convertWorksheetToModelRequest, _options); + return result.toPromise(); + } + /** + * Makes a copy of an Answer or Liveboard Version: 10.3.0.cl or later Creates a copy of a metadata object. Requires at least view access to the metadata object being copied. Upon successful execution, the API creates a copy of the metadata object specified in the API request and returns the ID of the new object. + * @param copyObjectRequest + */ + copyObject(copyObjectRequest, _options) { + const result = this.api.copyObject(copyObjectRequest, _options); + return result.toPromise(); + } + /** + * Version: 9.0.0.cl or later Removes the specified metadata object from the ThoughtSpot system. Requires edit access to the metadata object. + * @param deleteMetadataRequest + */ + deleteMetadata(deleteMetadataRequest, _options) { + const result = this.api.deleteMetadata(deleteMetadataRequest, _options); + return result.toPromise(); + } + /** + * Version: 9.0.0.cl or later Exports the [TML](https://docs.thoughtspot.com/cloud/latest/tml) representation of metadata objects in JSON or YAML format. Requires `DATADOWNLOADING` (**Can download Data**) and at least view access to the metadata object. #### Usage guidelines * You can export one or several objects by passing metadata object GUIDs in the `metadata` array. * When exporting TML content for a Liveboard or Answer object, you can set `export_associated` to `true` to retrieve TML content for underlying Worksheets, Tables, or Views, including the GUID of each object within the headers. When `export_associated` is set to `true`, consider retrieving one metadata object at a time. * Set `export_fqns` to `true` to add FQNs of the referenced objects in the TML content. For example, if you send an API request to retrieve TML for a Liveboard and its associated objects, the API returns the TML content with FQNs of the referenced Worksheet. Exporting TML with FQNs is useful if ThoughtSpot has multiple objects with the same name and you want to eliminate ambiguity when importing TML files into ThoughtSpot. It eliminates the need for adding FQNs of the referenced objects manually during the import operation. * To export only the TML of feedbacks associated with an object, set the GUID of the object as `identifier`, and set the `type` as `FEEDBACK` in the `metadata` array. * To export the TML of an object along with the feedbacks associated with it, set the GUID of the object as `identifier`, set the `type` as `LOGIAL_TABLE` in the `metadata` array, and set `export_with_associated_feedbacks` in `export_options` to true. For more information, see [TML Documentation](https://developers.thoughtspot.com/docs/tml#_export_a_tml). For more information on feedbacks, see [Feedback Documentation](https://docs.thoughtspot.com/cloud/latest/sage-feedback). + * @param exportMetadataTMLRequest + */ + exportMetadataTML(exportMetadataTMLRequest, _options) { + const result = this.api.exportMetadataTML(exportMetadataTMLRequest, _options); + return result.toPromise(); + } + /** + * Version: 10.1.0.cl or later Exports the [TML](https://docs.thoughtspot.com/cloud/latest/tml) representation of metadata objects in JSON or YAML format. ### **Permissions Required** Requires `DATAMANAGEMENT` (**Can manage data**) and `USERMANAGEMENT` (**Can manage users**) privileges. #### **Usage Guidelines** This API is only applicable for `USER`, `GROUP`, and `ROLES` metadata types. - `batch_offset` Indicates the starting position within the complete dataset from which the API should begin returning objects. Useful for paginating results efficiently. - `batch_size` Specifies the number of objects or items to retrieve in a single request. Helps control response size for better performance. - `edoc_format` Defines the format of the TML content. The exported metadata can be in JSON or YAML format. - `export_dependent` Specifies whether to include dependent metadata objects in the export. Ensures related objects are also retrieved if needed. - `all_orgs_override` Indicates whether the export operation applies across all organizations. Useful for multi-tenant environments where cross-org exports are required. + * @param exportMetadataTMLBatchedRequest + */ + exportMetadataTMLBatched(exportMetadataTMLBatchedRequest, _options) { + const result = this.api.exportMetadataTMLBatched(exportMetadataTMLBatchedRequest, _options); + return result.toPromise(); + } + /** + * Version: 9.0.0.cl or later Fetches the underlying SQL query data for an Answer object. Requires at least view access to the Answer object. Upon successful execution, the API returns the SQL queries for the specified object as shown in this example: ``` { \"metadata_id\":\"8fbe44a8-46ad-4b16-8d39-184b2fada490\", \"metadata_name\":\"Total sales\", \"metadata_type\":\"ANSWER\", \"sql_queries\":[ { \"metadata_id\":\"8fbe44a8-46ad-4b16-8d39-184b2fada490\", \"metadata_name\":\"Total sales -test\", \"sql_query\":\"SELECT \\n \\\"ta_1\\\".\\\"REGION\\\" \\\"ca_1\\\", \\n \\\"ta_2\\\".\\\"PRODUCTNAME\\\" \\\"ca_2\\\", \\n \\\"ta_1\\\".\\\"STORENAME\\\" \\\"ca_3\\\", \\n CASE\\n WHEN sum(\\\"ta_3\\\".\\\"SALES\\\") IS NOT NULL THEN sum(\\\"ta_3\\\".\\\"SALES\\\")\\n ELSE 0\\n END \\\"ca_4\\\", \\n CASE\\n WHEN sum(\\\"ta_3\\\".\\\"QUANTITYPURCHASED\\\") IS NOT NULL THEN sum(\\\"ta_3\\\".\\\"QUANTITYPURCHASED\\\")\\n ELSE 0\\n END \\\"ca_5\\\"\\nFROM \\\"RETAILAPPAREL\\\".\\\"PUBLIC\\\".\\\"FACT_RETAPP_SALES\\\" \\\"ta_3\\\"\\n JOIN \\\"RETAILAPPAREL\\\".\\\"PUBLIC\\\".\\\"DIM_RETAPP_STORES\\\" \\\"ta_1\\\"\\n ON \\\"ta_3\\\".\\\"STOREID\\\" = \\\"ta_1\\\".\\\"STOREID\\\"\\n JOIN \\\"RETAILAPPAREL\\\".\\\"PUBLIC\\\".\\\"DIM_RETAPP_PRODUCTS\\\" \\\"ta_2\\\"\\n ON \\\"ta_3\\\".\\\"PRODUCTID\\\" = \\\"ta_2\\\".\\\"PRODUCTID\\\"\\nGROUP BY \\n \\\"ca_1\\\", \\n \\\"ca_2\\\", \\n \\\"ca_3\\\"\\n\" } ] } ``` + * @param fetchAnswerSqlQueryRequest + */ + fetchAnswerSqlQuery(fetchAnswerSqlQueryRequest, _options) { + const result = this.api.fetchAnswerSqlQuery(fetchAnswerSqlQueryRequest, _options); + return result.toPromise(); + } + /** + * Version: 10.4.0.cl or later Gets information about the status of the TML async import task scheduled using the `/api/rest/2.0/metadata/tml/async/import` API call. To fetch the task details, specify the ID of the TML async import task. Requires access to the task ID. The API allows users who initiated the asynchronous TML import via `/api/rest/2.0/metadata/tml/async/import` to view the status of their tasks. Users with administration privilege can view the status of all import tasks initiated by the users in their Org. #### Usage guidelines See [TML API Documentation](https://developers.thoughtspot.com/docs/tml#_fetch_status_of_the_tml_import_task) for usage guidelines. + * @param fetchAsyncImportTaskStatusRequest + */ + fetchAsyncImportTaskStatus(fetchAsyncImportTaskStatusRequest, _options) { + const result = this.api.fetchAsyncImportTaskStatus(fetchAsyncImportTaskStatusRequest, _options); + return result.toPromise(); + } + /** + * Version: 9.0.0.cl or later Fetches the underlying SQL query data for a Liveboard object and its visualizations. Requires at least view access to the Liveboard object. To get SQL query data for a Liveboard, specify the GUID of the Liveboard. Optionally, you can add an array of visualization GUIDs to retrieve the SQL query data for visualizations in the Liveboard. Upon successful execution, the API returns the SQL queries for the specified object as shown in this example: ``` { \"metadata_id\": \"fa68ae91-7588-4136-bacd-d71fb12dda69\", \"metadata_name\": \"Total Sales\", \"metadata_type\": \"LIVEBOARD\", \"sql_queries\": [ { \"metadata_id\": \"b3b6d2b9-089a-490c-8e16-b144650b7843\", \"metadata_name\": \"Total quantity purchased, Total sales by region\", \"sql_query\": \"SELECT \\n \\\"ta_1\\\".\\\"REGION\\\" \\\"ca_1\\\", \\n CASE\\n WHEN sum(\\\"ta_2\\\".\\\"QUANTITYPURCHASED\\\") IS NOT NULL THEN sum(\\\"ta_2\\\".\\\"QUANTITYPURCHASED\\\")\\n ELSE 0\\n END \\\"ca_2\\\", \\n CASE\\n WHEN sum(\\\"ta_2\\\".\\\"SALES\\\") IS NOT NULL THEN sum(\\\"ta_2\\\".\\\"SALES\\\")\\n ELSE 0\\n END \\\"ca_3\\\"\\nFROM \\\"RETAILAPPAREL\\\".\\\"PUBLIC\\\".\\\"FACT_RETAPP_SALES\\\" \\\"ta_2\\\"\\n JOIN \\\"RETAILAPPAREL\\\".\\\"PUBLIC\\\".\\\"DIM_RETAPP_STORES\\\" \\\"ta_1\\\"\\n ON \\\"ta_2\\\".\\\"STOREID\\\" = \\\"ta_1\\\".\\\"STOREID\\\"\\nGROUP BY \\\"ca_1\\\"\" } ] } ``` + * @param fetchLiveboardSqlQueryRequest + */ + fetchLiveboardSqlQuery(fetchLiveboardSqlQueryRequest, _options) { + const result = this.api.fetchLiveboardSqlQuery(fetchLiveboardSqlQueryRequest, _options); + return result.toPromise(); + } + /** + * Version: 9.0.0.cl or later Imports [TML](https://docs.thoughtspot.com/cloud/latest/tml) files into ThoughtSpot. Requires `DATAMANAGEMENT` (**Can manage data**) or `ADMINISTRATION` (**Can administer ThoughtsSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the following Data control privileges may be required: - `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) - `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` (**Can manage data models**) #### Usage guidelines * Import all related objects in a single TML Import API call. For example, Tables that use the same Connection object and Worksheets connected to these Tables. * Include the `fqn` property to distinguish objects that have the same name. For example, if you have multiple Connections or Worksheets with the same name on ThoughtSpot and the Connection or Worksheet referenced in your TML file does not have a unique name to distinguish, it may result in invalid object references. Adding `fqn` helps ThoughtSpot differentiate a Table from another with the same name. We recommend [exporting TML with FQNs](#/http/api-endpoints/metadata/export-metadata-tml) and using these during the import operation. * You can upload multiple TML files at a time. If you import a Worksheet along with Liveboards, Answers, and other dependent objects in a single API call, the imported objects will be immediately available for use. When you import only a Worksheet object, it may take some time for the Worksheet to become available in the ThoughtSpot system. Please wait for a few minutes, and then proceed to create an Answer and Liveboard from the newly imported Worksheet. For more information, see [TML Documentation](https://developers.thoughtspot.com/docs/tml#_import_a_tml). + * @param importMetadataTMLRequest + */ + importMetadataTML(importMetadataTMLRequest, _options) { + const result = this.api.importMetadataTML(importMetadataTMLRequest, _options); + return result.toPromise(); + } + /** + * Version: 10.4.0.cl or later Schedules a task to import [TML](https://docs.thoughtspot.com/cloud/latest/tml) files into ThoughtSpot. You can use this API endpoint to process TML objects asynchronously when importing TMLs of large and complex metadata objects into ThoughtSpot. Unlike the synchronous import TML operation, the API processes TML data in the background and returns a task ID, which can be used to check the status of the import task via `/api/rest/2.0/metadata/tml/async/status` API endpoint. Requires `DATAMANAGEMENT` (**Can manage data**) or `ADMINISTRATION` (**Can administer ThoughtsSpot**) privilege, and edit access to the TML objects. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the following Data control privileges may be required: - `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) - `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` (**Can manage data models**) #### Usage guidelines See [Async TML API Documentation](https://developers.thoughtspot.com/docs/tml#_import_tml_objects_asynchronously) for usage guidelines. + * @param importMetadataTMLAsyncRequest + */ + importMetadataTMLAsync(importMetadataTMLAsyncRequest, _options) { + const result = this.api.importMetadataTMLAsync(importMetadataTMLAsyncRequest, _options); + return result.toPromise(); + } + /** + * Parameterize fields in metadata objects. Version: 10.9.0.cl or later **Note:** This API endpoint is deprecated and will be removed from ThoughtSpot in a future release. Use [POST /api/rest/2.0/metadata/parameterize-fields](/api/rest/2.0/metadata/parameterize-fields) instead. Allows parameterizing fields in metadata objects in ThoughtSpot. Requires appropriate permissions to modify the metadata object. The API endpoint allows parameterizing the following types of metadata objects: * Logical Tables * Connections * Connection Configs For a Logical Table the field type must be `ATTRIBUTE` and field name can be one of: * databaseName * schemaName * tableName For a Connection or Connection Config, the field type is always `CONNECTION_PROPERTY`. In this case, field_name specifies the exact property of the Connection or Connection Config that needs to be parameterized. For Connection Config, the only supported field name is: * impersonate_user + * @param parameterizeMetadataRequest + */ + parameterizeMetadata(parameterizeMetadataRequest, _options) { + const result = this.api.parameterizeMetadata(parameterizeMetadataRequest, _options); + return result.toPromise(); + } + /** + * Parameterize multiple fields of metadata objects. For example [schemaName, databaseName] for LOGICAL_TABLE. Version: 26.5.0.cl or later Allows parameterizing multiple fields of metadata objects in ThoughtSpot. For example, you can parameterize [schemaName, databaseName] for LOGICAL_TABLE. Requires appropriate permissions to modify the metadata object. The API endpoint allows parameterizing the following types of metadata objects: * Logical Tables * Connections * Connection Configs For a Logical Table, the field type must be `ATTRIBUTE` and field names can include: * databaseName * schemaName * tableName For a Connection or Connection Config, the field type is always `CONNECTION_PROPERTY`. In this case, field_names specifies the exact properties of the Connection or Connection Config that need to be parameterized. For Connection Config, supported field names include: * impersonate_user You can parameterize multiple fields at once by providing an array of field names. + * @param parameterizeMetadataFieldsRequest + */ + parameterizeMetadataFields(parameterizeMetadataFieldsRequest, _options) { + const result = this.api.parameterizeMetadataFields(parameterizeMetadataFieldsRequest, _options); + return result.toPromise(); + } + /** + * Version: 9.0.0.cl or later Gets a list of metadata objects available on the ThoughtSpot system. This API endpoint is available to all users who have view access to the object. Users with `ADMINISTRATION` (**Can administer ThoughtSpot**) privileges can view data for all metadata objects, including users and groups. #### Usage guidelines - To get all metadata objects, send the API request without any attributes. - To get metadata objects of a specific type, set the `type` attribute. For example, to fetch a Worksheet, set the type as `LOGICAL_TABLE`. - To filter metadata objects within type `LOGICAL_TABLE`, set the `subtypes` attribute. For example, to fetch a Worksheet, set the type as `LOGICAL_TABLE` & subtypes as `[WORKSHEET]`. - To get a specific metadata object, specify the GUID. - To customize your search and filter the API response, you can use several parameters. You can search for objects created or modified by specific users, by tags applied to the objects, or by using the include parameters like `include_auto_created_objects`, `include_dependent_objects`, `include_headers`, `include_incomplete_objects`, and so on. You can also define sorting options to sort the data retrieved in the API response. - To get discoverable objects when linientmodel is enabled you can use `include_discoverable_objects` as true else false. Default value is true. - For liveboard metadata type, to get the newer format, set the `liveboard_response_format` as V2. Default value is V1. - To retrieve only objects that are published, set the `include_only_published_objects` as true. Default value is false. **NOTE**: The following parameters support pagination of metadata records: - `tag_identifiers` - `type` - `subtypes` - `created_by_user_identifiers` - `modified_by_user_identifiers` - `owned_by_user_identifiers` - `exclude_objects` - `include_auto_created_objects` - `favorite_object_options` - `include_only_published_objects` If you are using other parameters to search metadata, set `record_size` to `-1` and `record_offset` to `0`. + * @param searchMetadataRequest + */ + searchMetadata(searchMetadataRequest, _options) { + const result = this.api.searchMetadata(searchMetadataRequest, _options); + return result.toPromise(); + } + /** + * Remove parameterization from fields in metadata objects. Version: 26.5.0.cl or later Allows removing parameterization from fields in metadata objects in ThoughtSpot. Requires appropriate permissions to modify the metadata object. The API endpoint allows unparameterizing the following types of metadata objects: * Logical Tables * Connections * Connection Configs For a Logical Table the field type must be `ATTRIBUTE` and field name can be one of: * databaseName * schemaName * tableName For a Connection or Connection Config, the field type is always `CONNECTION_PROPERTY`. In this case, field_name specifies the exact property of the Connection or Connection Config that needs to be unparameterized. For Connection Config, the only supported field name is: * impersonate_user + * @param unparameterizeMetadataRequest + */ + unparameterizeMetadata(unparameterizeMetadataRequest, _options) { + const result = this.api.unparameterizeMetadata(unparameterizeMetadataRequest, _options); + return result.toPromise(); + } + /** + * Update header attributes for a given list of header objects. Version: 10.6.0.cl or later ## Prerequisites - **Privileges Required:** - `DATAMANAGEMENT` (Can manage data) or `ADMINISTRATION` (Can administer ThoughtSpot). - **Additional Privileges (if RBAC is enabled):** - `ORG_ADMINISTRATION` (Can manage orgs). --- ## Usage Guidelines ### Parameters 1. **headers_update** - **Description:** List of header objects with their attributes to be updated. Each object contains a list of attributes to be updated in the header. - **Usage:** - You must provide either `identifier` or `obj_identifier`, but not both. Both fields cannot be empty. - When `org_identifier` is set to `-1`, only the `identifier` value is accepted; `obj_identifier` is not allowed. 2. **org_identifier** - **Description:** GUID (Globally Unique Identifier) or name of the organization. - **Usage:** - Leaving this field empty assumes that the changes should be applied to the current organization - Provide `org_guid` or `org_name` to uniquely identify the organization where changes need to be applied. . - Provide `-1` if changes have to be applied across all the org. --- ## Note Currently, this API is enabled only for updating the `obj_identifier` attribute. Only `text` will be allowed in attribute\'s value. ## Best Practices 1. **Backup Before Conversion:** Always export metadata as a backup before initiating the update process --- ## Examples ### Only `identifier` is given ```json { \"headers_update\": [ { \"identifier\": \"guid_1\", \"obj_identifier\": \"\", \"type\": \"LOGICAL_COLUMN\", \"attributes\": [ { \"name\": \"obj_id\", \"value\": \"custom_object_id\" } ] } ], \"org_identifier\": \"orgGuid\" } ``` ### Only `obj_identifier` is given ```json { \"headers_update\": [ { \"obj_identifier\": \"custom_object_id\", \"type\": \"ANSWER\", \"attributes\": [ { \"name\": \"obj_id\", \"value\": \"custom_object_id\" } ] } ], \"org_identifier\": \"orgName\" } ``` ### Executing update for all org `-1` ```json { \"headers_update\": [ { \"identifier\": \"guid_1\", \"type\": \"ANSWER\", \"attributes\": [ { \"name\": \"obj_id\", \"value\": \"custom_object_id\" } ] } ], \"org_identifier\": -1 } ``` ### Optional `type` is not provided ```json { \"headers_update\": [ { \"identifier\": \"guid_1\", \"attributes\": [ { \"name\": \"obj_id\", \"value\": \"custom_object_id\" } ] } ], \"org_identifier\": -1 } ``` + * @param updateMetadataHeaderRequest + */ + updateMetadataHeader(updateMetadataHeaderRequest, _options) { + const result = this.api.updateMetadataHeader(updateMetadataHeaderRequest, _options); + return result.toPromise(); + } + /** + * Update object IDs for given metadata objects. Version: 10.8.0.cl or later ## Prerequisites - **Privileges Required:** - `DATAMANAGEMENT` (Can manage data) or `ADMINISTRATION` (Can administer ThoughtSpot). - **Additional Privileges (if RBAC is enabled):** - `ORG_ADMINISTRATION` (Can manage orgs). --- ## Usage Guidelines ### Parameters 1. **metadata** - **Description:** List of metadata objects to update their object IDs. - **Usage:** - Use either `current_obj_id` alone OR use `metadata_identifier` with `type` (when needed). - When using `metadata_identifier`, the `type` field is required if using a name instead of a GUID. - The `new_obj_id` field is always required. --- ## Note This API is specifically designed for updating object IDs of metadata objects. It internally uses the header update mechanism to perform the changes. ## Best Practices 1. **Backup Before Update:** Always export metadata as a backup before initiating the update process. 2. **Validation:** - When using `current_obj_id`, ensure it matches the existing object ID exactly. - When using `metadata_identifier` with a name, ensure the `type` is specified correctly. - Verify that the `new_obj_id` follows your naming conventions and is unique within your system. --- ## Examples ### Using current_obj_id ```json { \"metadata\": [ { \"current_obj_id\": \"existing_object_id\", \"new_obj_id\": \"new_object_id\" } ] } ``` ### Using metadata_identifier with GUID ```json { \"metadata\": [ { \"metadata_identifier\": \"01234567-89ab-cdef-0123-456789abcdef\", \"new_obj_id\": \"new_object_id\" } ] } ``` ### Using metadata_identifier with name and type ```json { \"metadata\": [ { \"metadata_identifier\": \"My Answer\", \"type\": \"ANSWER\", \"new_obj_id\": \"new_object_id\" } ] } ``` ### Multiple objects update ```json { \"metadata\": [ { \"current_obj_id\": \"existing_object_id_1\", \"new_obj_id\": \"new_object_id_1\" }, { \"metadata_identifier\": \"My Worksheet\", \"type\": \"LOGICAL_TABLE\", \"new_obj_id\": \"new_object_id_2\" } ] } ``` + * @param updateMetadataObjIdRequest + */ + updateMetadataObjId(updateMetadataObjIdRequest, _options) { + const result = this.api.updateMetadataObjId(updateMetadataObjIdRequest, _options); + return result.toPromise(); + } +}; +var PromiseOrgsApi = class { + constructor(configuration, requestFactory, responseProcessor) { + this.api = new ObservableOrgsApi(configuration, requestFactory, responseProcessor); + } + /** + * Version: 9.0.0.cl or later Creates an Org object. To use this API, the [Orgs](https://docs.thoughtspot.com/cloud/latest/orgs-overview) feature must be enabled in your cluster. Requires cluster administration (**Can administer Org**) privileges. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `ORG_ADMINISTRATION` (**Can manage Orgs**) privilege is required. + * @param createOrgRequest + */ + createOrg(createOrgRequest, _options) { + const result = this.api.createOrg(createOrgRequest, _options); + return result.toPromise(); + } + /** + * Version: 9.0.0.cl or later Deletes an Org object from the ThoughtSpot system. Requires cluster administration (**Can administer Org**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `ORG_ADMINISTRATION` (**Can manage Orgs**) privilege is required. When you delete an Org, all its users and objects created in that Org context are removed. However, if the users in the deleted Org also exists in other Orgs, they are removed only from the deleted Org. + * @param orgIdentifier ID or name of the Org + */ + deleteOrg(orgIdentifier, _options) { + const result = this.api.deleteOrg(orgIdentifier, _options); + return result.toPromise(); + } + /** + * Version: 9.0.0.cl or later Gets a list of Orgs configured on the ThoughtSpot system. To get details of a specific Org, specify the Org ID or name. You can also pass parameters such as status, visibility, and user identifiers to get a specific list of Orgs. Requires cluster administration (**Can administer Org**) privileges. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `ORG_ADMINISTRATION` (**Can manage Orgs**) privilege is required. + * @param searchOrgsRequest + */ + searchOrgs(searchOrgsRequest, _options) { + const result = this.api.searchOrgs(searchOrgsRequest, _options); + return result.toPromise(); + } + /** + * Version: 9.0.0.cl or later Updates an Org object. You can modify Org properties such as name, description, and user associations. Requires cluster administration (**Can administer Org**) privileges. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `ORG_ADMINISTRATION` (**Can manage Orgs**) privilege is required. + * @param orgIdentifier ID or name of the Org + * @param updateOrgRequest + */ + updateOrg(orgIdentifier, updateOrgRequest, _options) { + const result = this.api.updateOrg(orgIdentifier, updateOrgRequest, _options); + return result.toPromise(); + } +}; +var PromiseReportsApi = class { + constructor(configuration, requestFactory, responseProcessor) { + this.api = new ObservableReportsApi(configuration, requestFactory, responseProcessor); + } + /** + * Version: 9.0.0.cl or later Exports an Answer in the given file format. You can download the Answer data as a PDF, PNG, CSV, or XLSX file. Requires at least view access to the Answer. #### Usage guidelines In the request body, specify the GUID or name of the Answer and set `file_format`. The default file format is CSV. Use the `type` parameter to specify whether the Answer being exported is a saved Answer (`SAVED`) or a pinned Answer on a Liveboard (`PINNED`). Defaults to `SAVED`. When using `PINNED`, the `metadata_identifier` must be the container id. **NOTE**: * The downloadable file returned in API response file is extensionless. Please rename the downloaded file by typing in the relevant extension. * HTML rendering is not supported for PDF exports of Answers with tables. Optionally, you can define [runtime overrides](https://developers.thoughtspot.com/docs/fetch-data-and-report-apis#_runtime_overrides) to apply to the Answer data. + * @param exportAnswerReportRequest + */ + exportAnswerReport(exportAnswerReportRequest, _options) { + const result = this.api.exportAnswerReport(exportAnswerReportRequest, _options); + return result.toPromise(); + } + /** + * Version: 9.0.0.cl or later Exports a Liveboard and its visualizations in PDF, PNG, CSV, or XLSX file format. The default `file_format` is CSV. Requires at least view access to the Liveboard. #### Usage guidelines In the request body, specify the GUID or name of the Liveboard. To generate a Liveboard report with specific visualizations, add GUIDs or names of the visualizations. **NOTE**: * The downloadable file returned in API response file is extensionless. Please rename the downloaded file by typing in the relevant extension. * Optionally, you can define [runtime overrides](https://developers.thoughtspot.com/docs/fetch-data-and-report-apis#_runtime_overrides) to apply to the Answer data. * To include unsaved changes in the report, pass the `transient_pinboard_content` script generated from the `getExportRequestForCurrentPinboard` method in the Visual Embed SDK. Upon successful execution, the API returns the report with unsaved changes, including ad hoc changes to visualizations. For more information, see [Liveboard Report API](https://developers.thoughtspot.com/docs/fetch-data-and-report-apis#_liveboard_report_api). * Starting with ThoughtSpot Cloud 10.9.0.cl release, the Liveboard can be exported in the PNG format in the resolution of your choice. To enable this on your instance, contact ThoughtSpot support. When this feature is enabled, the options `include_cover_page`,`include_filter_page` within the `png_options` will not be available for PNG exports. * Starting with the ThoughtSpot Cloud 26.2.0.cl release, * Liveboards can be exported in CSV format. * All visualizations within a Liveboard can be exported as individual CSV files. * When exporting multiple visualizations or the entire Liveboard, the system returns the report as a compressed ZIP file containing the separate CSV files for each visualization. * Liveboards can also be exported in XLSX format. * All selected visualizations are consolidated into a single Excel workbook (.xlsx), with each visualization placed in its own worksheet (tab). * XLSX exports are limited to a maximum of 255 worksheets (tabs) per workbook. + * @param exportLiveboardReportRequest + */ + exportLiveboardReport(exportLiveboardReportRequest, _options) { + const result = this.api.exportLiveboardReport(exportLiveboardReportRequest, _options); + return result.toPromise(); + } +}; +var PromiseRolesApi = class { + constructor(configuration, requestFactory, responseProcessor) { + this.api = new ObservableRolesApi(configuration, requestFactory, responseProcessor); + } + /** + * Version: 9.5.0.cl or later Creates a Role object in ThoughtSpot. Available only if [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance. To create a Role, the `ROLE_ADMINISTRATION` (**Can manage roles**) privilege is required. + * @param createRoleRequest + */ + createRole(createRoleRequest, _options) { + const result = this.api.createRole(createRoleRequest, _options); + return result.toPromise(); + } + /** + * Version: 9.5.0.cl or later Deletes a Role object from the ThoughtSpot system. Available only if [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance. To delete a Role, the `ROLE_ADMINISTRATION` (**Can manage roles**) privilege is required. + * @param roleIdentifier Unique ID or name of the Role. ReadOnly roles cannot be deleted. + */ + deleteRole(roleIdentifier, _options) { + const result = this.api.deleteRole(roleIdentifier, _options); + return result.toPromise(); + } + /** + * Version: 9.5.0.cl or later Gets a list of Role objects from the ThoughtSpot system. Available if [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance. To search for Roles, the `ROLE_ADMINISTRATION` (**Can manage roles**) privilege is required. To get details of a specific Role object, specify the GUID or name. You can also filter the API response based on user group and Org identifiers, privileges assigned to the Role, and deprecation status. + * @param searchRolesRequest + */ + searchRoles(searchRolesRequest, _options) { + const result = this.api.searchRoles(searchRolesRequest, _options); + return result.toPromise(); + } + /** + * Version: 9.5.0.cl or later Updates the properties of a Role object. Available only if [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance. To update a Role, the `ROLE_ADMINISTRATION` (**Can manage roles**) privilege is required. + * @param roleIdentifier Unique ID or name of the Role. + * @param updateRoleRequest + */ + updateRole(roleIdentifier, updateRoleRequest, _options) { + const result = this.api.updateRole(roleIdentifier, updateRoleRequest, _options); + return result.toPromise(); + } +}; +var PromiseSchedulesApi = class { + constructor(configuration, requestFactory, responseProcessor) { + this.api = new ObservableSchedulesApi(configuration, requestFactory, responseProcessor); + } + /** + * Create schedule. Version: 9.4.0.cl or later Creates a Liveboard schedule job. Requires at least edit access to Liveboards. To create a schedule on behalf of another user, you need `ADMINISTRATION` (**Can administer Org**) or `JOBSCHEDULING` (**Can schedule for others**) privilege and edit access to the Liveboard. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `JOBSCHEDULING` (**Can schedule for others**) privilege is required. #### Usage guidelines * The description text is mandatory. The description text appears as **Description: ** in the Liveboard schedule email notifications. * For Liveboards with both charts and tables, schedule creation is only supported in PDF and XLS formats. Schedules created in CSV formats for such Liveboards will fail to run. If `PDF` is set as the `file_format`, enable `pdf_options` to get the correct attachment. Not doing so may cause the attachment to be rendered empty. * To include only specific visualizations, specify the visualization GUIDs in the `visualization_identifiers` array. * You can schedule a Liveboard job to run periodically by setting frequency parameters. You can set the schedule to run daily, weekly, monthly or every n minutes or hours. The scheduled job can also be configured to run at a specific time of the day or on specific days of the week or month. Please ensure that when setting the schedule frequency for _minute of the object_, only values that are multiples of 5 are included. * If the `frequency` parameters are defined, you can set the time zone to a value that matches your server\'s time zone. For example, `US/Central`, `Etc/UTC`, `CET`. The default time zone is `America/Los_Angeles`. For more information about Liveboard jobs, see [ThoughtSpot Product Documentation](https://docs.thoughtspot.com/cloud/latest/liveboard-schedule). + * @param createScheduleRequest + */ + createSchedule(createScheduleRequest, _options) { + const result = this.api.createSchedule(createScheduleRequest, _options); + return result.toPromise(); + } + /** + * Deletes a scheduled job. Version: 9.4.0.cl or later Deletes a scheduled Liveboard job. Requires at least edit access to Liveboard or `ADMINISTRATION` (**Can administer Org**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `JOBSCHEDULING` (**Can schedule for others**) privilege is required. + * @param scheduleIdentifier Unique ID or name of the scheduled job. + */ + deleteSchedule(scheduleIdentifier, _options) { + const result = this.api.deleteSchedule(scheduleIdentifier, _options); + return result.toPromise(); + } + /** + * Search Schedules Version: 9.4.0.cl or later Gets a list of scheduled jobs configured for a Liveboard. To get details of a specific scheduled job, specify the name or GUID of the scheduled job. Requires at least view access to Liveboards. **NOTE**: When filtering schedules by parameters other than `metadata`, set `record_size` to `-1` and `record_offset` to `0` for accurate results. + * @param searchSchedulesRequest + */ + searchSchedules(searchSchedulesRequest, _options) { + const result = this.api.searchSchedules(searchSchedulesRequest, _options); + return result.toPromise(); + } + /** + * Update schedule. Version: 9.4.0.cl or later Updates a scheduled Liveboard job. Requires at least edit access to Liveboards. To update a schedule on behalf of another user, you need `ADMINISTRATION` (**Can administer Org**) or `JOBSCHEDULING` (**Can schedule for others**) privilege and edit access to the Liveboard. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `JOBSCHEDULING` (**Can schedule for others**) privilege is required. The API endpoint allows you to pause a scheduled job, change the status of a paused job. You can also edit the recipients list, frequency of the job, format of the file to send to the recipients in email notifications, PDF options, and time zone setting. + * @param scheduleIdentifier Unique ID or name of the schedule. + * @param updateScheduleRequest + */ + updateSchedule(scheduleIdentifier, updateScheduleRequest, _options) { + const result = this.api.updateSchedule(scheduleIdentifier, updateScheduleRequest, _options); + return result.toPromise(); + } +}; +var PromiseSecurityApi = class { + constructor(configuration, requestFactory, responseProcessor) { + this.api = new ObservableSecurityApi(configuration, requestFactory, responseProcessor); + } + /** + * Version: 9.0.0.cl or later Transfers the ownership of one or several objects from one user to another. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `USER_ADMINISTRATION` (**Can manage users**) privilege and edit access to the objects are required. + * @param assignChangeAuthorRequest + */ + assignChangeAuthor(assignChangeAuthorRequest, _options) { + const result = this.api.assignChangeAuthor(assignChangeAuthorRequest, _options); + return result.toPromise(); + } + /** + * Version: 10.12.0.cl or later Fetches column security rules for specified tables. This API endpoint retrieves column-level security rules configured for tables. It returns information about which columns are secured and which groups have access to those columns. #### Usage guidelines - Provide an array of table identifiers using either `identifier` (GUID or name) or `obj_identifier` (object ID) - At least one of `identifier` or `obj_identifier` must be provided for each table - The API returns column security rules for all specified tables - Users must have appropriate permissions to access security rules for the specified tables #### Required permissions - `ADMINISTRATION` - Can administer ThoughtSpot - `DATAMANAGEMENT` - Can manage data - `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` - Can manage worksheet views and tables #### Example request ```json { \"tables\": [ { \"identifier\": \"table-guid\", \"obj_identifier\": \"table-object-id\" } ] } ``` #### Response format The API returns an array of `ColumnSecurityRuleResponse` objects wrapped in a `data` field. Each `ColumnSecurityRuleResponse` object contains: - Table information (GUID and object ID) - Array of column security rules with column details, group access, and source table information #### Example response ```json { \"data\": [ { \"guid\": \"table-guid\", \"objId\": \"table-object-id\", \"columnSecurityRules\": [ { \"column\": { \"id\": \"col_123\", \"name\": \"Salary\" }, \"groups\": [ { \"id\": \"group_1\", \"name\": \"HR Department\" } ], \"sourceTableDetails\": { \"id\": \"source-table-guid\", \"name\": \"Employee_Data\" } } ] } ] } ``` + * @param fetchColumnSecurityRulesRequest + */ + fetchColumnSecurityRules(fetchColumnSecurityRulesRequest, _options) { + const result = this.api.fetchColumnSecurityRules(fetchColumnSecurityRulesRequest, _options); + return result.toPromise(); + } + /** + * Version: 26.3.0.cl or later This API fetches the object privileges present for the given list of principals (user or group), on the given set of objects. It supports pagination, which can be enabled and configured using the request parameters. It provides users access to certain features based on privilege based access control. #### Usage guidelines - Specify the `type` (`USER` or `USER_GROUP`) and `identifier` (either GUID or name) of the principals for which you want to retrieve object privilege information in the `principals` array. - Specify the `type` (`LOGICAL_TABLE`) and `identifier` (either GUID or name) of the metadata objects for which you want to retrieve object privilege information in the `metadata` array. Only `LOGICAL_TABLE` metadata type is supported for now. It may be extended for other metadata types in future. - To control the offset from where principals have to be fetched, use `record_offset`. When `record_offset` is 0, information is fetched from the beginning. - To control the number of principals to be fetched, use `record_size`. Default `record_size` is 20. - Ensure `record_offset` for a subsequent request is one more than the value of `record_size` of the previous request. - Ensure using correct Authorization Bearer Token corresponding to specific user & org. #### Example request ```json { \"principals\": [ { \"type\": \"type-1\", \"identifier\": \"principal-guid-or-name-1\" }, { \"type\": \"type-2\", \"identifier\": \"principal-guid-or-name-2\" } ], \"metadata\": [ { \"type\": \"metadata-type-1\", \"identifier\": \"metadata-guid-or-name-1\" }, { \"type\": \"metadata-type-2\", \"identifier\": \"metadata-guid-or-name-2\" } ], \"record_offset\": 0, \"record_size\": 20 } ``` #### Response format The API returns an array of `metadata_object_privileges` objects wrapped in JSON. Each `metadata_object_privileges` object contains: - Metadata information (GUID, name and type) - Array of `principal_object_privilege_info`. - Each `principal_object_privilege_info` contains: - Principal type. All principals of this type are listed as described below. - Array of `principal_object_privileges`. - Each `principal_object_privileges` contains: - Principal information (GUID, name, subtype) - List of applied object level privileges. #### Example response ```json { \"metadata_object_privileges\": [ { \"metadata_id\": \"metadata-guid-1\", \"metadata_name\": \"metadata-name-1\", \"metadata_type\": \"metadata-type-1\", \"principal_object_privilege_info\": [ { \"principal_type\": \"principal-type-1\", \"principal_object_privileges\": [ { \"principal_id\": \"principal-guid-1\", \"principal_name\": \"principal-name-1\", \"principal_sub_type\": \"principal-sub-type-1\", \"object_privileges\": \"[object-privilege-1, object-privilege-2]\" }, { \"principal_id\": \"principal-guid-2\", \"principal_name\": \"principal-name-2\", \"principal_sub_type\": \"principal-sub-type-2\", \"object_privileges\": \"[object-privilege-1, object-privilege-2]\" } ] }, { \"principal_type\": \"principal-type-2\", \"principal_object_privileges\": [ { \"principal_id\": \"principal-guid-3\", \"principal_name\": \"principal-guid-4\", \"principal_sub_type\": \"principal-sub-type-4\", \"object_privileges\": \"[object-privilege-1]\" } ] } ] }, { \"metadata_id\": \"metadata-guid-2\", \"metadata_name\": \"metadata-name-2\", \"metadata_type\": \"metadata-type-2\", \"principal_object_privilege_info\": [ { \"principal_type\": \"principal-type-1\", \"principal_object_privileges\": [ { \"principal_id\": \"principal-guid-1\", \"principal_name\": \"principal-name-1\", \"principal_sub_type\": \"principal-sub-type-1\", \"object_privileges\": \"[object-privilege-3, object-privilege-4]\" }, { \"principal_id\": \"principal-guid-2\", \"principal_name\": \"principal-name-2\", \"principal_sub_type\": \"principal-sub-type-2\", \"object_privileges\": \"[object-privilege-4]\" } ] } ] } ] } ``` + * @param fetchObjectPrivilegesRequest + */ + fetchObjectPrivileges(fetchObjectPrivilegesRequest, _options) { + const result = this.api.fetchObjectPrivileges(fetchObjectPrivilegesRequest, _options); + return result.toPromise(); + } + /** + * Version: 9.0.0.cl or later Fetches object permission details for a given principal object such as a user and group. Requires view access to the metadata object. #### Usage guidelines * To get a list of all metadata objects that a user or group can access, specify the `type` and GUID or name of the principal. * To get permission details for a specific object, add the `type` and GUID or name of the metadata object to your API request. Upon successful execution, the API returns a list of metadata objects and permission details for each object. + * @param fetchPermissionsOfPrincipalsRequest + */ + fetchPermissionsOfPrincipals(fetchPermissionsOfPrincipalsRequest, _options) { + const result = this.api.fetchPermissionsOfPrincipals(fetchPermissionsOfPrincipalsRequest, _options); + return result.toPromise(); + } + /** + * Version: 9.0.0.cl or later Fetches permission details for a given metadata object. Requires view access to the metadata object. #### Usage guidelines * To fetch a list of users and groups for a metadata object, specify `type` and GUID or name of the metadata object. * To get permission details for a specific user or group, add `type` and GUID or name of the principal object to your API request. Upon successful execution, the API returns permission details and principal information for the object specified in the API request. + * @param fetchPermissionsOnMetadataRequest + */ + fetchPermissionsOnMetadata(fetchPermissionsOnMetadataRequest, _options) { + const result = this.api.fetchPermissionsOnMetadata(fetchPermissionsOnMetadataRequest, _options); + return result.toPromise(); + } + /** + * Version: 26.3.0.cl or later This API allows the addition or deletion of object level privileges for a set of users and groups, on a set of metadata objects. It provides users to access certain features based on privilege based access control. #### Usage guidelines - Specify the `operation`. The supported operations are: `ADD`, `REMOVE`. - Specify the type of the objects on which the object privileges are being provided in `metadata_type`. Only `LOGICAL_TABLE` metadata type is supported for now. It may be extended for other metadata types in future. - Specify the list of object privilege types in the `object_privilege_types` array. The supported object privilege types are: `SPOTTER_COACHING_PRIVILEGE`. - Specify the identifiers (either GUID or name) for the metadata objects in the `metadata_identifiers` array. - Specify the `type` (`USER` or `USER_GROUP`) and `identifier` (either GUID or name) of the principals to which you want to apply the given operation and given object privileges in the `principals` array. - Ensure using correct Authorization Bearer Token corresponding to specific user & org. #### Example request ```json { \"operation\": \"operation-type\", \"metadata_type\": \"metadata-type\", \"object_privilege_types\": [\"privilege-type-1\", \"privilege-type-2\"], \"metadata_identifiers\": [\"metadata-guid-or-name-1\", \"metadata-guid-or-name-1\"], \"principals\": [ { \"type\": \"type-1\", \"identifier\": \"principal-guid-or-name-1\" }, { \"type\": \"type-2\", \"identifier\": \"principal-guid-or-name-2\" } ] } ``` > ###### Note: > * Only admin users, users with edit access and users with coaching privilege on a given data-model can add or remove principals related to SPOTTER_COACHING_PRIVILEGE + * @param manageObjectPrivilegeRequest + */ + manageObjectPrivilege(manageObjectPrivilegeRequest, _options) { + const result = this.api.manageObjectPrivilege(manageObjectPrivilegeRequest, _options); + return result.toPromise(); + } + /** + * Version: 26.5.0.cl or later Allows publishing metadata objects across organizations in ThoughtSpot. Requires ADMINISTRATION role and TENANT scope. The API endpoint allows publishing the following types of metadata objects: * Liveboards * Answers * Logical Tables This API will essentially share the objects along with it\'s dependencies to the org admins of the orgs to which it is being published. + * @param publishMetadataRequest + */ + publishMetadata(publishMetadataRequest, _options) { + const result = this.api.publishMetadata(publishMetadataRequest, _options); + return result.toPromise(); + } + /** + * Version: 9.0.0.cl or later Allows sharing one or several metadata objects with users and groups in ThoughtSpot. Requires edit access to the metadata object. #### Supported metadata objects: * Liveboards * Visualizations * Answers * Models * Views * Connections * Collections #### Object permissions You can provide `READ_ONLY` or `MODIFY` access when sharing an object with another user or group. The `READ_ONLY` permission grants view access to the shared object, whereas `MODIFY` provides edit access. To prevent a user or group from accessing the shared object, specify the GUID or name of the principal and set `shareMode` to `NO_ACCESS`. #### Sharing a visualization * Sharing a visualization implicitly shares the entire Liveboard with the recipient. * Object permissions set for a shared visualization also apply to the Liveboard unless overridden by another API request or via UI. * If email notifications for object sharing are enabled, a notification with a link to the shared visualization will be sent to the recipient’s email address. Although this link opens the shared visualization, recipients can also access other visualizations in the Liveboard. #### Sharing a collection Collections support **dual permissions** that provide fine-grained control: * **Collection permissions** (`share_mode`) - controls access to the collection itself (view, edit, delete the collection) * **Content permissions** (`content_share_mode`) - controls access to objects within the collection (view, edit objects inside) **Default Behavior:** - If only `share_mode` is specified, the content permissions default to `READ_ONLY` (except when `share_mode` is `NO_ACCESS`, then content also gets `NO_ACCESS`) - To give users edit access to collection contents, explicitly set `content_share_mode: \"MODIFY\"` ## Examples The following JSON examples can be copy-pasted as request bodies for the REST v2 API endpoint: ```bash POST /callosum/v1/v2/security/metadata/share Content-Type: application/x-www-form-urlencoded ``` ### Basic collection sharing Share a collection with read-only access: ```json { \"metadata_type\": \"COLLECTION\", \"metadata_identifiers\": [\"Sales Reports Collection\"], \"permissions\": [{ \"principal\": { \"type\": \"USER\", \"identifier\": \"alice@company.com\" }, \"share_mode\": \"READ_ONLY\" }], \"notification\": { \"message\": \"I\'ve shared the Sales Reports collection with you\", \"notify_on_share\": true } } ``` ### Collection sharing with dual permissions Share a collection with different permissions for the collection vs. its contents: ```json { \"metadata_type\": \"COLLECTION\", \"metadata_identifiers\": [\"Marketing Analytics\"], \"permissions\": [{ \"principal\": { \"type\": \"USER\", \"identifier\": \"bob@company.com\" }, \"share_mode\": \"MODIFY\", \"content_share_mode\": \"READ_ONLY\" }, { \"principal\": { \"type\": \"USER_GROUP\", \"identifier\": \"Marketing Team\" }, \"share_mode\": \"READ_ONLY\", \"content_share_mode\": \"READ_ONLY\" }], \"notification\": { \"emails\": [\"bob@company.com\"], \"message\": \"You can edit the collection but content is read-only\", \"enable_custom_url\": false, \"notify_on_share\": true }, \"has_lenient_discoverability\": false } ``` ### Multiple collections sharing Share multiple collections with different users: ```json { \"metadata\": [ { \"type\": \"COLLECTION\", \"identifier\": \"Q4 Reports\" }, { \"type\": \"COLLECTION\", \"identifier\": \"Executive Dashboard Collection\" } ], \"permissions\": [{ \"principal\": { \"type\": \"USER_GROUP\", \"identifier\": \"Executives\" }, \"share_mode\": \"MODIFY\" }, { \"principal\": { \"type\": \"USER\", \"identifier\": \"manager@company.com\" }, \"share_mode\": \"READ_ONLY\", \"content_share_mode\": \"MODIFY\" }], \"notification\": { \"message\": \"Sharing quarterly collections with leadership team\", \"notify_on_share\": true } } ``` ### Remove collection access Remove access to a collection by setting share_mode to NO_ACCESS: ```json { \"metadata_type\": \"COLLECTION\", \"metadata_identifiers\": [\"Confidential Reports\"], \"permissions\": [{ \"principal\": { \"type\": \"USER\", \"identifier\": \"former-employee@company.com\" }, \"share_mode\": \"NO_ACCESS\" }], \"notification\": { \"notify_on_share\": false } } ``` ### Collection Permission Scenarios **Scenario 1: Collection Admin** - `share_mode: MODIFY` + `content_share_mode: MODIFY` = Full control over collection and its contents **Scenario 2: Collection Curator** - `share_mode: MODIFY` + `content_share_mode: READ_ONLY` = Can manage collection structure but not edit contents **Scenario 3: Content Editor** - `share_mode: READ_ONLY` + `content_share_mode: MODIFY` = Can edit objects within collection but can\'t change collection itself **Scenario 4: Viewer** - `share_mode: READ_ONLY` + `content_share_mode: READ_ONLY` = View-only access to collection and contents + * @param shareMetadataRequest + */ + shareMetadata(shareMetadataRequest, _options) { + const result = this.api.shareMetadata(shareMetadataRequest, _options); + return result.toPromise(); + } + /** + * Version: 26.5.0.cl or later Allows unpublishing metadata objects from organizations in ThoughtSpot. Requires ADMINISTRATION role and TENANT scope. The API endpoint allows unpublishing the following types of metadata objects: * Liveboards * Answers * Logical Tables When unpublishing objects, you can: * Include dependencies by setting `include_dependencies` to true - this will unpublish all dependent objects if no other published object is using them * Force unpublish by setting `force` to true - this will break all dependent objects in the unpublished organizations + * @param unpublishMetadataRequest + */ + unpublishMetadata(unpublishMetadataRequest, _options) { + const result = this.api.unpublishMetadata(unpublishMetadataRequest, _options); + return result.toPromise(); + } + /** + * Version: 10.12.0.cl or later Creates, updates, or deletes column security rules for specified tables. This API endpoint allows you to create, update, or delete column-level security rules on columns of a table. The operation follows an \"all or none\" policy: if defining security rules for any of the provided columns fails, the entire operation will be rolled back, and no rules will be created. #### Usage guidelines - Provide table identifier using either `identifier` (GUID or name) or `obj_identifier` (object ID) - Use `clear_csr: true` to remove all column security rules from the table - For each column, specify the security rule using `column_security_rules` array - Use `is_unsecured: true` to mark a specific column as unprotected - Use `group_access` operations to manage group associations: - `ADD`: Add groups to the column\'s access list - `REMOVE`: Remove groups from the column\'s access list - `REPLACE`: Replace all existing groups with the specified groups #### Required permissions - `ADMINISTRATION` - Can administer ThoughtSpot - `DATAMANAGEMENT` - Can manage data (if RBAC is disabled) - `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` - Can manage worksheet views and tables (if RBAC is enabled) #### Example request ```json { \"identifier\": \"table-guid\", \"obj_identifier\": \"table-object-id\", \"clear_csr\": false, \"column_security_rules\": [ { \"column_identifier\": \"col id or col name\", \"is_unsecured\": false, \"group_access\": [ { \"operation\": \"ADD\", \"group_identifiers\": [\"hr_group_id\", \"hr_group_name\", \"finance_group_id\"] } ] }, { \"column_identifier\": \"col id or col name\", \"is_unsecured\": true }, { \"column_identifier\": \"col id or col name\", \"is_unsecured\": false, \"group_access\": [ { \"operation\": \"REPLACE\", \"group_identifiers\": [\"management_group_id\", \"management_group_name\"] } ] } ] } ``` #### Request Body Schema - `identifier` (string, optional): GUID or name of the table for which we want to create column security rules - `obj_identifier` (string, optional): The object ID of the table - `clear_csr` (boolean, optional): If true, then all the secured columns will be marked as unprotected, and all the group associations will be removed - `column_security_rules` (array of objects, required): An array where each object defines the security rule for a specific column Each column security rule object contains: - `column_identifier` (string, required): Column identifier (col_id or name) - `is_unsecured` (boolean, optional): If true, the column will be marked as unprotected and all groups associated with it will be removed - `group_access` (array of objects, optional): Array of group operation objects Each group operation object contains: - `operation` (string, required): Operation type - ADD, REMOVE, or REPLACE - `group_identifiers` (array of strings, required): Array of group identifiers (name or GUID) on which the operation will be performed #### Response This API does not return any response body. A successful operation returns HTTP 200 status code. #### Operation Types - **ADD**: Adds the specified groups to the column\'s access list - **REMOVE**: Removes the specified groups from the column\'s access list - **REPLACE**: Replaces all existing groups with the specified groups + * @param updateColumnSecurityRulesRequest + */ + updateColumnSecurityRules(updateColumnSecurityRulesRequest, _options) { + const result = this.api.updateColumnSecurityRules(updateColumnSecurityRulesRequest, _options); + return result.toPromise(); + } +}; +var PromiseSystemApi = class { + constructor(configuration, requestFactory, responseProcessor) { + this.api = new ObservableSystemApi(configuration, requestFactory, responseProcessor); + } + /** + * Version: 10.14.0.cl or later Configure communication channel preferences. - Use `cluster_preferences` to update the default preferences for your ThoughtSpot application instance. - If your instance has [Orgs](https://docs.thoughtspot.com/cloud/latest/orgs-overview), use `org_preferences` to specify Org-specific preferences that override the defaults. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) or `DEVELOPER` (**Has developer privilege**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, users with `APPLICATION_ADMINISTRATION` (**Can manage application settings**) privilege are also authorized to perform this action. + * @param configureCommunicationChannelPreferencesRequest + */ + configureCommunicationChannelPreferences(configureCommunicationChannelPreferencesRequest, _options) { + const result = this.api.configureCommunicationChannelPreferences(configureCommunicationChannelPreferencesRequest, _options); + return result.toPromise(); + } + /** + * Version: 26.2.0.cl or later Configure security settings for your ThoughtSpot application instance. - Use `cluster_preferences` to update cluster-level security settings including CORS whitelisted URLs, CSP settings, SAML redirect URLs, partitioned cookies, and non-embed access configuration. - Use `org_preferences` to configure Org-specific security settings. If your instance has [Orgs](https://docs.thoughtspot.com/cloud/latest/orgs-overview), this allows configuring CORS and non-embed access settings specific to the Org. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) or `DEVELOPER` (**Has developer privilege**) privilege. Cluster-level SAML and script-src settings require `ADMINISTRATION` privilege. See [Security Settings](https://developers.thoughtspot.com/docs/security-settings) for more details. + * @param configureSecuritySettingsRequest + */ + configureSecuritySettings(configureSecuritySettingsRequest, _options) { + const result = this.api.configureSecuritySettings(configureSecuritySettingsRequest, _options); + return result.toPromise(); + } + /** + * Version: 9.0.0.cl or later Retrieves the current configuration details of the cluster. If the request is successful, the API returns a list configuration settings applied on the cluster. Requires `ADMINISTRATION`(**Can administer ThoughtSpot**) privilege to view these complete configuration settings of the cluster. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `SYSTEM_INFO_ADMINISTRATION` (**Can view system activities**) privilege is required. This API does not require any parameters to be passed in the request. + */ + getSystemConfig(_options) { + const result = this.api.getSystemConfig(_options); + return result.toPromise(); + } + /** + * Version: 9.0.0.cl or later Gets system information such as the release version, locale, time zone, deployment environment, date format, and date time format of the cluster. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privileges. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `SYSTEM_INFO_ADMINISTRATION` (**Can view system activities**) privilege is required. This API does not require any parameters to be passed in the request. + */ + getSystemInformation(_options) { + const result = this.api.getSystemInformation(_options); + return result.toPromise(); + } + /** + * Version: 9.2.0.cl or later Gets a list of configuration overrides applied on the cluster. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `APPLICATION_ADMINISTRATION` (**Can manage application settings**) privilege is required. This API does not require any parameters to be passed in the request. + */ + getSystemOverrideInfo(_options) { + const result = this.api.getSystemOverrideInfo(_options); + return result.toPromise(); + } + /** + * Version: 10.14.0.cl or later Fetch communication channel preferences. - Use `cluster_preferences` to fetch the default preferences for your ThoughtSpot application instance. - If your instance has [Orgs](https://docs.thoughtspot.com/cloud/latest/orgs-overview), use `org_preferences` to fetch any Org-specific preferences that override the defaults. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) or `DEVELOPER` (**Has developer privilege**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, users with `APPLICATION_ADMINISTRATION` (**Can manage application settings**) privilege are also authorized to perform this action. + * @param searchCommunicationChannelPreferencesRequest + */ + searchCommunicationChannelPreferences(searchCommunicationChannelPreferencesRequest, _options) { + const result = this.api.searchCommunicationChannelPreferences(searchCommunicationChannelPreferencesRequest, _options); + return result.toPromise(); + } + /** + * Version: 26.2.0.cl or later Fetch security settings for your ThoughtSpot application instance. - Use `scope: CLUSTER` to retrieve cluster-level security settings, including CORS and CSP allowlists, SAML redirect URLs, and settings that control access to non-embedded pages. - Use `scope: ORG` to retrieve Org-level security settings. If your instance has [Orgs](https://docs.thoughtspot.com/cloud/latest/orgs-overview), this returns CORS and non-embed access settings specific to the Org. - If `scope` is not specified, returns both cluster and Org-specific settings based on user privileges. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) or `DEVELOPER` (**Has developer privilege**) privilege. See [Security Settings](https://developers.thoughtspot.com/docs/security-settings) for more details. + * @param searchSecuritySettingsRequest + */ + searchSecuritySettings(searchSecuritySettingsRequest, _options) { + const result = this.api.searchSecuritySettings(searchSecuritySettingsRequest, _options); + return result.toPromise(); + } + /** + * Version: 9.2.0.cl or later Updates the current configuration of the cluster. You must send the configuration data in JSON format. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privileges. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `APPLICATION_ADMINISTRATION` (**Can manage application settings**) privilege is required. + * @param updateSystemConfigRequest + */ + updateSystemConfig(updateSystemConfigRequest, _options) { + const result = this.api.updateSystemConfig(updateSystemConfigRequest, _options); + return result.toPromise(); + } + /** + * Version: 26.4.0.cl or later Validates a communication channel configuration to ensure it is properly set up and can receive events. - Use `channel_type` to specify the type of communication channel to validate (e.g., WEBHOOK). - Use `channel_identifier` to provide the unique identifier or name for the communication channel. - Use `event_type` to specify the event type to validate for this channel. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) or `DEVELOPER` (**Has developer privilege**) privilege. For webhook channels, users with `CAN_MANAGE_WEBHOOKS` (**Can manage webhooks**) privilege are also authorized to perform this action. + * @param validateCommunicationChannelRequest + */ + validateCommunicationChannel(validateCommunicationChannelRequest, _options) { + const result = this.api.validateCommunicationChannel(validateCommunicationChannelRequest, _options); + return result.toPromise(); + } +}; +var PromiseTagsApi = class { + constructor(configuration, requestFactory, responseProcessor) { + this.api = new ObservableTagsApi(configuration, requestFactory, responseProcessor); + } + /** + * Version: 9.0.0.cl or later Assigns tags to Liveboards, Answers, Tables, and Worksheets. Requires edit access to the metadata object. + * @param assignTagRequest + */ + assignTag(assignTagRequest, _options) { + const result = this.api.assignTag(assignTagRequest, _options); + return result.toPromise(); + } + /** + * Version: 9.0.0.cl or later Creates a tag object. Tags are labels that identify a metadata object. For example, you can create a tag to designate subject areas, such as sales, HR, marketing, and finance. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `TAGMANAGEMENT` (**Can manage tags**) privilege is required to create, edit, and delete tags. + * @param createTagRequest + */ + createTag(createTagRequest, _options) { + const result = this.api.createTag(createTagRequest, _options); + return result.toPromise(); + } + /** + * Version: 9.0.0.cl or later Deletes a tag object from the ThoughtSpot system Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `TAGMANAGEMENT` (**Can manage tags**) privilege is required to create, edit, and delete tags. + * @param tagIdentifier Tag identifier Tag name or Tag id. + */ + deleteTag(tagIdentifier, _options) { + const result = this.api.deleteTag(tagIdentifier, _options); + return result.toPromise(); + } + /** + * Version: 9.0.0.cl or later Gets a list of tag objects available on the ThoughtSpot system. To get details of a specific tag object, specify the GUID or name. Any authenticated user can search for tag objects. + * @param searchTagsRequest + */ + searchTags(searchTagsRequest, _options) { + const result = this.api.searchTags(searchTagsRequest, _options); + return result.toPromise(); + } + /** + * Version: 9.0.0.cl or later Removes the tags applied to a Liveboard, Answer, Table, or Worksheet. Requires edit access to the metadata object. + * @param unassignTagRequest + */ + unassignTag(unassignTagRequest, _options) { + const result = this.api.unassignTag(unassignTagRequest, _options); + return result.toPromise(); + } + /** + * Version: 9.0.0.cl or later Updates a tag object. You can modify the `name` and `color` properties of a tag object. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `TAGMANAGEMENT` (**Can manage tags**) privilege is required to create, edit, and delete tags. + * @param tagIdentifier Name or Id of the tag. + * @param updateTagRequest + */ + updateTag(tagIdentifier, updateTagRequest, _options) { + const result = this.api.updateTag(tagIdentifier, updateTagRequest, _options); + return result.toPromise(); + } +}; +var PromiseThoughtSpotRestApi = class { + constructor(configuration, requestFactory, responseProcessor) { + this.api = new ObservableThoughtSpotRestApi(configuration, requestFactory, responseProcessor); + } + /** + * Version: 9.7.0.cl or later Activates a deactivated user account. Requires `ADMINISTRATION` (**Can administer Thoughtspot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `USER_ADMINISTRATION` (**Can manage users**) privilege is required. To activate an inactive user account, the API request body must include the following information: - Username or the GUID of the user account. - Auth token generated for the deactivated user. The auth token is sent in the API response when a user is deactivated. - Password for the user account. + * @param activateUserRequest + */ + activateUser(activateUserRequest, _options) { + const result = this.api.activateUser(activateUserRequest, _options); + return result.toPromise(); + } + /** + * Version: 9.0.0.cl or later Transfers the ownership of one or several objects from one user to another. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `USER_ADMINISTRATION` (**Can manage users**) privilege and edit access to the objects are required. + * @param assignChangeAuthorRequest + */ + assignChangeAuthor(assignChangeAuthorRequest, _options) { + const result = this.api.assignChangeAuthor(assignChangeAuthorRequest, _options); + return result.toPromise(); + } + /** + * Version: 9.0.0.cl or later Assigns tags to Liveboards, Answers, Tables, and Worksheets. Requires edit access to the metadata object. + * @param assignTagRequest + */ + assignTag(assignTagRequest, _options) { + const result = this.api.assignTag(assignTagRequest, _options); + return result.toPromise(); + } + /** + * Version: 9.0.0.cl or later Updates the current password of the user. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `USER_ADMINISTRATION` (**Can manage users**) privilege is required. + * @param changeUserPasswordRequest + */ + changeUserPassword(changeUserPasswordRequest, _options) { + const result = this.api.changeUserPassword(changeUserPasswordRequest, _options); + return result.toPromise(); + } + /** + * Version: 9.2.0.cl or later Commits TML files of metadata objects to the Git branch configured on your instance. Requires at least edit access to objects used in the commit operation. Before using this endpoint to push your commits: * Enable Git integration on your instance. * Make sure the Git repository and branch details are configured on your instance. For more information, see [Git integration documentation](https://developers.thoughtspot.com/docs/git-integration). + * @param commitBranchRequest + */ + commitBranch(commitBranchRequest, _options) { + const result = this.api.commitBranch(commitBranchRequest, _options); + return result.toPromise(); + } + /** + * Version: 26.6.0.cl or later Enables or disables authentication at cluster or org level for the specified auth type. Currently supports `TRUSTED_AUTH`. #### Required privileges Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) or `CONTROL_TRUSTED_AUTH` (**Can Enable or Disable Trusted Authentication**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled, the `CONTROL_TRUSTED_AUTH` privilege is required. #### Usage guidelines Use `cluster_preferences` to enable or disable authentication at the cluster level. Cluster-level settings can only be configured from the Primary Org. - `ENABLED` — Generates a new access token if one does not exist. An existing token is preserved. - `DISABLED` — Revokes the existing cluster-level access token. Use `org_preferences` to enable or disable authentication for one or more Orgs. Each entry must include an `org_identifier` (unique ID or name) and an `auth_status`. Org-level configuration requires the per-Org authentication feature to be enabled on your instance. - `ENABLED` — Generates a new org-level access token if one does not exist. - `DISABLED` — Revokes the existing org-level access token for that Org. Both `cluster_preferences` and `org_preferences` are optional. Omitting a field leaves the corresponding settings unchanged. If both are omitted, the API returns `204 No Content` without making any changes. **Note**: Cluster-level and org-level settings are independent of each other. Enabling or disabling one does not affect the other. + * @param configureAuthSettingsRequest + */ + configureAuthSettings(configureAuthSettingsRequest, _options) { + const result = this.api.configureAuthSettings(configureAuthSettingsRequest, _options); + return result.toPromise(); + } + /** + * Version: 10.14.0.cl or later Configure communication channel preferences. - Use `cluster_preferences` to update the default preferences for your ThoughtSpot application instance. - If your instance has [Orgs](https://docs.thoughtspot.com/cloud/latest/orgs-overview), use `org_preferences` to specify Org-specific preferences that override the defaults. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) or `DEVELOPER` (**Has developer privilege**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, users with `APPLICATION_ADMINISTRATION` (**Can manage application settings**) privilege are also authorized to perform this action. + * @param configureCommunicationChannelPreferencesRequest + */ + configureCommunicationChannelPreferences(configureCommunicationChannelPreferencesRequest, _options) { + const result = this.api.configureCommunicationChannelPreferences(configureCommunicationChannelPreferencesRequest, _options); + return result.toPromise(); + } + /** + * Version: 26.2.0.cl or later Configure security settings for your ThoughtSpot application instance. - Use `cluster_preferences` to update cluster-level security settings including CORS whitelisted URLs, CSP settings, SAML redirect URLs, partitioned cookies, and non-embed access configuration. - Use `org_preferences` to configure Org-specific security settings. If your instance has [Orgs](https://docs.thoughtspot.com/cloud/latest/orgs-overview), this allows configuring CORS and non-embed access settings specific to the Org. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) or `DEVELOPER` (**Has developer privilege**) privilege. Cluster-level SAML and script-src settings require `ADMINISTRATION` privilege. See [Security Settings](https://developers.thoughtspot.com/docs/security-settings) for more details. + * @param configureSecuritySettingsRequest + */ + configureSecuritySettings(configureSecuritySettingsRequest, _options) { + const result = this.api.configureSecuritySettings(configureSecuritySettingsRequest, _options); + return result.toPromise(); + } + /** + * Version: 10.12.0.cl or later Gets connection configuration objects. Requires `DATAMANAGEMENT` (**Can manage data**) and edit permissions to the connection object, or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) privilege is required. #### Usage guidelines * To get a list of all configurations available in the ThoughtSpot system, send the API request with only the connection name or GUID in the request body. * To fetch details of a configuration object, specify the configuration object name or GUID. + * @param connectionConfigurationSearchRequest + */ + connectionConfigurationSearch(connectionConfigurationSearchRequest, _options) { + const result = this.api.connectionConfigurationSearch(connectionConfigurationSearchRequest, _options); + return result.toPromise(); + } + /** + * Convert worksheets to models Version: 10.6.0.cl or later ## Prerequisites - **Privileges Required:** - `DATAMANAGEMENT` (Can manage data) or `ADMINISTRATION` (Can administer ThoughtSpot). - **Additional Privileges (if RBAC is enabled):** - `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` (Can manage data models). --- ## Usage Guidelines ### Parameters 1. **worksheet_ids** - **Description:** A comma-separated list of GUIDs (Globally Unique Identifiers) specifying the Worksheets to be converted. - **Usage:** - Used only when `convert_all` is set to `false`. - Leave empty or omit when `convert_all` is set to `true`. 2. **exclude_worksheet_ids** - **Description:** A comma-separated list of GUIDs specifying Worksheets to be excluded from conversion. - **Usage:** - Useful when `convert_all` is set to `true` and specific Worksheets should not be converted. 3. **convert_all** - **Description:** Sets the scope of conversion. - **Options:** - `true`: Converts all Worksheets in the system, except those specified in `exclude_worksheet_ids`. - `false`: Converts only the Worksheets listed in `worksheet_ids`. 4. **apply_changes** - **Description:** Specifies whether to apply changes directly to ThoughtSpot or to generate a preview before applying any changes.Used for validation of conversion. - **Options:** - `true`: Applies conversion changes directly to ThoughtSpot. - `false`: Generates only a preview of the changes and does not apply any changes to ThoughtSpot --- ## Best Practices 1. **Backup Before Conversion:** Always export metadata as a backup before initiating the conversion process 2. **Partial Conversion for Testing:** Test the conversion process by setting `convert_all` to `false` and specifying a small number of `worksheet_ids`. 3. **Verify Dependencies:** Check for dependent objects, such as Tables and Connections, to avoid invalid references. 4. **Review Changes:** Use `apply_changes: false` to preview the impact of the conversion before applying changes. --- ## Examples ### Convert Specific Worksheets ```json { \"worksheet_ids\": [\"guid1\", \"guid2\", \"guid3\"], \"exclude_worksheet_ids\": [], \"convert_all\": false, \"apply_changes\": true } ``` ### Convert All Accessible Worksheets ```json { \"worksheet_ids\": [], \"exclude_worksheet_ids\": [], \"convert_all\": true, \"apply_changes\": true } ``` ### Exclude Specific Worksheets While Converting All Accessible Worksheets ```json { \"worksheet_ids\": [], \"exclude_worksheet_ids\": [\"abc\"], \"convert_all\": true, \"apply_changes\": true } ``` + * @param convertWorksheetToModelRequest + */ + convertWorksheetToModel(convertWorksheetToModelRequest, _options) { + const result = this.api.convertWorksheetToModel(convertWorksheetToModelRequest, _options); + return result.toPromise(); + } + /** + * Makes a copy of an Answer or Liveboard Version: 10.3.0.cl or later Creates a copy of a metadata object. Requires at least view access to the metadata object being copied. Upon successful execution, the API creates a copy of the metadata object specified in the API request and returns the ID of the new object. + * @param copyObjectRequest + */ + copyObject(copyObjectRequest, _options) { + const result = this.api.copyObject(copyObjectRequest, _options); + return result.toPromise(); + } + /** + * Version: 26.2.0.cl or later Creates a new Spotter agent conversation based on the provided context and settings. The endpoint was in Beta from 26.2.0.cl through 26.4.0.cl. Requires `CAN_USE_SPOTTER` privilege and at least view access to the metadata object specified in the request. #### Usage guidelines The request must include the `metadata_context` parameter to define the conversation context. The context type can be one of: - `DATA_SOURCE` *(available from 26.5.0.cl)*: targets a specific data source. Provide `data_source_identifier` in `data_source_context` for a single data source, or `data_source_identifiers` for multi-data-source context. The deprecated `guid` field is accepted for backwards compatibility. - `AUTO_MODE` *(available from 26.5.0.cl)*: automatically discovers and selects the most relevant datasets for the user\'s queries. > **Note for callers on versions 26.2.0.cl – 26.4.0.cl (Beta):** use the lowercase `data_source` enum value with the `guid` field instead of the above. Example: `{ \"type\": \"data_source\", \"data_source_context\": { \"guid\": \"\" } }`. The `conversation_settings` parameter controls which Spotter capabilities are enabled for the conversation: - `enable_contextual_change_analysis` (default: `true`, **deprecated from 26.2.0.cl**) — always enabled in Spotter 3; setting this to `false` has no effect on versions >= 26.2.0.cl - `enable_natural_language_answer_generation` (default: `true`, **deprecated from 26.2.0.cl**) — always enabled in Spotter 3; setting this to `false` has no effect on versions >= 26.2.0.cl - `enable_reasoning` (default: `true`, **deprecated from 26.2.0.cl**) — always enabled in Spotter 3; setting this to `false` has no effect on versions >= 26.2.0.cl - `enable_save_chat` (default: `false`, *available from 26.5.0.cl*) — enables saving the conversation for later retrieval via conversation history If the request is successful, the response includes a unique `conversation_identifier` that must be passed to `sendAgentConversationMessage` or `sendAgentConversationMessageStreaming` to send messages within this conversation. The response also includes `conversation_id` with the same value for backwards compatibility; use `conversation_identifier` for new integrations. #### Example request ```json { \"metadata_context\": { \"type\": \"DATA_SOURCE\", \"data_source_context\": { \"data_source_identifier\": \"a1b2c3d4-e5f6-7890-abcd-ef1234567890\" } }, \"conversation_settings\": {} } ``` #### Error responses | Code | Description | | ---- | --------------------------------------------------------------------------------------------------------------------------------------- | | 401 | Unauthorized — authentication token is missing, expired, or invalid. | | 403 | Forbidden — the authenticated user does not have `CAN_USE_SPOTTER` privilege or lacks view permission on the specified metadata object. | > ###### Note: > > - This endpoint was in Beta from 26.2.0.cl through 26.4.0.cl and is Generally Available from version 26.5.0.cl. > - This endpoint requires Spotter - please contact ThoughtSpot support to enable Spotter on your cluster. + * @param createAgentConversationRequest + */ + createAgentConversation(createAgentConversationRequest, _options) { + const result = this.api.createAgentConversation(createAgentConversationRequest, _options); + return result.toPromise(); + } + /** + * Version: 10.12.0.cl or later Creates a new [custom calendar](https://docs.thoughtspot.com/cloud/latest/connections-cust-cal). Requires `DATAMANAGEMENT` (**Can manage data**) or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your ThoughtSpot instance, the `CAN_MANAGE_CUSTOM_CALENDAR` (**Can manage custom calendars**) privilege is required. #### Usage guidelines You can create a custom calendar from scratch or an existing Table in ThoughtSpot. For both methods of calendar creation, the following parameters are required: * Name of the custom calendar. * Calendar creation method. To create a calendar from an existing table, specify the method: - `FROM_EXISTING_TABLE` - Creates calendar from the table reference provided in the API request. - `FROM_INPUT_PARAMS` - Creates a calendar from the parameters defined in the API request. * Connection ID and Table name * Database and schema name attributes: For most Cloud Data Warehouse (CDW) connectors, both `database_name` and `schema_name` attributes are required. However, the attribute requirements are conditional and vary based on the connector type and its metadata structure. For example, for connectors such as Teradata, MySQL, SingleSore, Amazon Aurora MySQL, Amazon RDS MySQL, Oracle, and GCP_MYSQL, the `schema_name` is required, whereas the `database_name` attribute is not. Similarly, connectors such as ClickHouse require you to specify the `database_name` and the schema specification in such cases is optional. **NOTE**: If you are creating a calendar from an existing table, ensure that the referenced table matches the required DDL for custom calendars. If the schema does not match, the API returns an error. ##### Calendar type The API allows you to create the following types of calendars: * `MONTH_OFFSET`. The default calendar type. A `MONTH_OFFSET` calendar is offset by a few months from the standard calendar months (January to December) and the year begins with the month defined in the request. For example, if the `month_offset` value is set as `April`, the calendar year begins in April. * `4-4-5`. Each quarter in the calendar will include two 4-week months followed by one 5-week month. * `4-5-4`. Each quarter in the calendar will include two 4-week months with a 5-week month between. * `5-4-4`. Each quarter begins with a 5-week month, followed by two 4-week months. To start and end the calendar on a specific date, specify the dates in the `MM/DD/YYYY` format. For `MONTH_OFFSET` calendars, ensure that the `start_date` matches the month specified in the `month_offset` attribute. You can also set the starting day of the week and customize the prefixes for year and quarter labels. #### Examples To create a calendar from an existing table: ``` { \"name\": \"MyCustomCalendar1\", \"table_reference\": { \"connection_identifier\": \"4db8ea22-2ff4-4224-b05a-26674717e468\", \"table_name\": \"MyCalendarTable\", \"database_name\": \"RETAILAPPAREL\", \"schema_name\": \"PUBLIC\" }, \"creation_method\": \"FROM_EXISTING_TABLE\", } ``` To create a calendar from scratch: ``` { \"name\": \"MyCustomCalendar1\", \"table_reference\": { \"connection_identifier\": \"4db8ea22-2ff4-4224-b05a-26674717e468\", \"table_name\": \"MyCalendarTable\", \"database_name\": \"RETAILAPPAREL\", \"schema_name\": \"PUBLIC\" }, \"creation_method\": \"FROM_INPUT_PARAMS\", \"calendar_type\": \"MONTH_OFFSET\", \"month_offset\": \"April\", \"start_day_of_week\": \"Monday\", \"quarter_name_prefix\": \"Q\", \"year_name_prefix\": \"FY\", \"start_date\": \"04/01/2025\", \"end_date\": \"04/31/2025\" } ``` + * @param createCalendarRequest + */ + createCalendar(createCalendarRequest, _options) { + const result = this.api.createCalendar(createCalendarRequest, _options); + return result.toPromise(); + } + /** + * Version: 26.4.0.cl or later Creates a new collection in ThoughtSpot. Collections allow you to organize and group related metadata objects such as Liveboards, Answers, worksheets, and other data objects. You can also create nested collections (sub-collections) to build a hierarchical structure. #### Supported operations The API endpoint lets you perform the following operations: * Create a new collection * Add metadata objects (Liveboards, Answers, Logical Tables) to the collection * Create nested collections by adding sub-collections + * @param createCollectionRequest + */ + createCollection(createCollectionRequest, _options) { + const result = this.api.createCollection(createCollectionRequest, _options); + return result.toPromise(); + } + /** + * Version: 9.2.0.cl or later Allows you to connect a ThoughtSpot instance to a Git repository. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance on your instance, the `CAN_SETUP_VERSION_CONTROL` (**Can set up version control**) privilege. You can use this API endpoint to connect your ThoughtSpot development and production environments to the development and production branches of a Git repository. Before using this endpoint to connect your ThoughtSpot instance to a Git repository, check the following prerequisites: * You have a Git repository. If you are using GitHub, make sure you have a valid account and an access token to connect ThoughtSpot to GitHub. For information about generating a token, see [GitHub Documentation](https://docs.github.com/en/authentication/keeping-your-account-and-data-secure/managing-your-personal-access-tokens). * Your access token has `repo` scope that grants full access to public and private repositories. * Your Git repository has a branch that can be configured as a default branch in ThoughtSpot. For more information, see [Git integration documentation](https://developers.thoughtspot.com/docs/?pageid=git-integration). **Note**: ThoughtSpot supports only GitHub / itHub Enterprise for CI/CD. + * @param createConfigRequest + */ + createConfig(createConfigRequest, _options) { + const result = this.api.createConfig(createConfigRequest, _options); + return result.toPromise(); + } + /** + * Version: 9.2.0.cl or later Creates a connection to a data warehouse for live query services. Requires `DATAMANAGEMENT` (**Can manage data**) or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) privilege is required. #### Create a connection without tables To create a connection without tables: 1. Pass these parameters in your API request. * Name of the connection. * Type of the data warehouse to connect to. * A JSON map of configuration attributes in `data_warehouse_config`. The following example shows the configuration attributes for a SnowFlake connection: ``` { \"configuration\":{ \"accountName\":\"thoughtspot_partner\", \"user\":\"tsadmin\", \"password\":\"TestConn123\", \"role\":\"sysadmin\", \"warehouse\":\"MEDIUM_WH\" }, \"authenticationType\": \"SERVICE_ACCOUNT\", \"externalDatabases\":[ ] } ``` 2. Set `validate` to `false`. **NOTE:** If the `authentication_type` is anything other than SERVICE_ACCOUNT, you must explicitly provide the authenticationType property in the payload. If you do not specify authenticationType, the API will default to SERVICE_ACCOUNT as the authentication type. #### Create a connection with tables If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) and `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` (**Can manage data models**) privilege is required. To create a connection with tables: 1. Pass these parameters in your API request. * Name of the connection. * Type of the data warehouse to connect to. * A JSON map of configuration attributes, database details, and table properties in `data_warehouse_config` as shown in the following example: ``` { \"configuration\":{ \"accountName\":\"thoughtspot_partner\", \"user\":\"tsadmin\", \"password\":\"TestConn123\", \"role\":\"sysadmin\", \"warehouse\":\"MEDIUM_WH\" }, \"authenticationType\": \"SERVICE_ACCOUNT\", \"externalDatabases\":[ { \"name\":\"AllDatatypes\", \"isAutoCreated\":false, \"schemas\":[ { \"name\":\"alldatatypes\", \"tables\":[ { \"name\":\"allDatatypes\", \"type\":\"TABLE\", \"description\":\"\", \"selected\":true, \"linked\":true, \"columns\":[ { \"name\":\"CNUMBER\", \"type\":\"INT64\", \"canImport\":true, \"selected\":true, \"isLinkedActive\":true, \"isImported\":false, \"tableName\":\"allDatatypes\", \"schemaName\":\"alldatatypes\", \"dbName\":\"AllDatatypes\" }, { \"name\":\"CDECIMAL\", \"type\":\"INT64\", \"canImport\":true, \"selected\":true, \"isLinkedActive\":true, \"isImported\":false, \"tableName\":\"allDatatypes\", \"schemaName\":\"alldatatypes\", \"dbName\":\"AllDatatypes\" } ] } ] } ] } ] } ``` 2. Set `validate` to `true`. **NOTE:** If the `authentication_type` is anything other than SERVICE_ACCOUNT, you must explicitly provide the authenticationType property in the payload. If you do not specify authenticationType, the API will default to SERVICE_ACCOUNT as the authentication type. + * @param createConnectionRequest + */ + createConnection(createConnectionRequest, _options) { + const result = this.api.createConnection(createConnectionRequest, _options); + return result.toPromise(); + } + /** + * Version: 10.12.0.cl or later Creates an additional configuration to an existing connection to a data warehouse. Requires `DATAMANAGEMENT` (**Can manage data**) or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) privilege is required. #### Usage guidelines * A JSON map of configuration attributes in `configuration`. The following example shows the configuration attributes: ``` { \"user\":\"DEV_USER\", \"password\":\"TestConn123\", \"role\":\"DEV\", \"warehouse\":\"DEV_WH\" } ``` * If the `policy_type` is `PRINCIPALS`, then `policy_principals` is a required field. * If the `policy_type` is `PROCESSES`, then `policy_processes` is a required field. * If the `policy_type` is `NO_POLICY`, then `policy_principals` and `policy_processes` are not required fields. #### Parameterized Connection Support For parameterized connections that use OAuth authentication, only the same_as_parent and policy_process_options attributes are allowed in the API request. These attributes are not applicable to connections that are not parameterized. + * @param createConnectionConfigurationRequest + */ + createConnectionConfiguration(createConnectionConfigurationRequest, _options) { + const result = this.api.createConnectionConfiguration(createConnectionConfigurationRequest, _options); + return result.toPromise(); + } + /** + * Version: 10.4.0.cl or later Creates a new conversation session tied to a specific data model for AI-driven natural language querying. Requires `CAN_USE_SPOTTER` privilege and at least view access to the metadata object specified in the request. #### Usage guidelines The request must include: - `metadata_identifier`: the unique ID of the data source that provides context for the conversation Optionally, you can provide: - `tokens`: a token string to set initial context for the conversation (e.g., `\"[sales],[item type],[state]\"`) If the request is successful, ThoughtSpot returns a unique `conversation_identifier` that must be passed to `sendMessage` to continue the conversation. #### Error responses | Code | Description | |------|-------------| | 401 | Unauthorized — authentication token is missing, expired, or invalid. | | 403 | Forbidden — the authenticated user does not have `CAN_USE_SPOTTER` privilege or lacks view permission on the specified metadata object. | > ###### Note: > * This endpoint is currently in Beta. Breaking changes may be introduced before the endpoint is made Generally Available. > * This endpoint requires Spotter - please contact ThoughtSpot support to enable Spotter on your cluster. + * @param createConversationRequest + */ + createConversation(createConversationRequest, _options) { + const result = this.api.createConversation(createConversationRequest, _options); + return result.toPromise(); + } + /** + * Version: 9.6.0.cl or later Creates a custom action that appears as a menu action on a saved Answer or Liveboard visualization. Requires `DEVELOPER` (**Has Developer privilege**) or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `DEVELOPER` (**Has developer privilege**) privilege is required. #### Usage Guidelines The API lets you create the following types of custom actions: * URL-based action Allows pushing data to an external URL. * Callback action Triggers a callback to the host application and initiates a response payload on an embedded ThoughtSpot instance. By default, custom actions are visible to only administrator or developer users. To make a custom action available to other users, and specify the groups in `group_identifiers`. By default, the custom action is set as a _global_ action on all visualizations and saved Answers. To assign a custom action to specific Liveboard visualization, saved Answer, or Worksheet, set `visibility` to `false` in `default_action_config` property and specify the GUID or name of the object in `associate_metadata`. For more information, see [Custom actions](https://developers.thoughtspot.com/docs/custom-action-intro). + * @param createCustomActionRequest + */ + createCustomAction(createCustomActionRequest, _options) { + const result = this.api.createCustomAction(createCustomActionRequest, _options); + return result.toPromise(); + } + /** + * Version: 10.10.0.cl or later Creates a customization configuration for the notification email. #### Pre-requisites Requires `DEVELOPER` (**has developer privilege**) or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `DEVELOPER` (**Has developer privilege**) privilege is required. **NOTE**:This endpoint in currently in beta. Contact ThoughtSpot support to enable this on your instance. #### Usage guidelines To create a custom configuration pass these parameters in your API request: - A JSON map of configuration attributes `template_properties`. The following example shows a sample set of customization configuration: ``` { { \"cta_button_bg_color\": \"#444DEA\", \"cta_text_font_color\": \"#FFFFFF\", \"primary_bg_color\": \"#D3DEF0\", \"logo_url\": \"https://storage.pardot.com/710713/1642089901EbkRibJq/TS_fullworkmark_darkmode.png\", \"font_family\": \"\", \"product_name\": \"ThoughtSpot\", \"footer_address\": \"444 Castro St, Suite 1000 Mountain View, CA 94041\", \"footer_phone\": \"(800) 508-7008\", \"replacement_value_for_liveboard\": \"Dashboard\", \"replacement_value_for_answer\": \"Chart\", \"replacement_value_for_spot_iq\": \"AI Insights\", \"hide_footer_phone\": false, \"hide_footer_address\": false, \"hide_product_name\": false, \"hide_manage_notification\": false, \"hide_mobile_app_nudge\": false, \"hide_privacy_policy\": false, \"hide_ts_vocabulary_definitions\": false, \"hide_error_message\": false, \"hide_unsubscribe_link\": false, \"hide_notification_status\": false, \"hide_modify_alert\": false, \"company_website_url\": \"https://your-website.com/\", \"company_privacy_policy_url\" : \"https://link-to-privacy-policy.com/\", \"contact_support_url\": \"https://link-to-contact-support.com/\", \"hide_contact_support_url\": false, \"hide_logo_url\" : false } } ``` + * @param createEmailCustomizationRequest + */ + createEmailCustomization(createEmailCustomizationRequest, _options) { + const result = this.api.createEmailCustomization(createEmailCustomizationRequest, _options); + return result.toPromise(); + } + /** + * Version: 9.0.0.cl or later Creates an Org object. To use this API, the [Orgs](https://docs.thoughtspot.com/cloud/latest/orgs-overview) feature must be enabled in your cluster. Requires cluster administration (**Can administer Org**) privileges. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `ORG_ADMINISTRATION` (**Can manage Orgs**) privilege is required. + * @param createOrgRequest + */ + createOrg(createOrgRequest, _options) { + const result = this.api.createOrg(createOrgRequest, _options); + return result.toPromise(); + } + /** + * Version: 9.5.0.cl or later Creates a Role object in ThoughtSpot. Available only if [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance. To create a Role, the `ROLE_ADMINISTRATION` (**Can manage roles**) privilege is required. + * @param createRoleRequest + */ + createRole(createRoleRequest, _options) { + const result = this.api.createRole(createRoleRequest, _options); + return result.toPromise(); + } + /** + * Create schedule. Version: 9.4.0.cl or later Creates a Liveboard schedule job. Requires at least edit access to Liveboards. To create a schedule on behalf of another user, you need `ADMINISTRATION` (**Can administer Org**) or `JOBSCHEDULING` (**Can schedule for others**) privilege and edit access to the Liveboard. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `JOBSCHEDULING` (**Can schedule for others**) privilege is required. #### Usage guidelines * The description text is mandatory. The description text appears as **Description: ** in the Liveboard schedule email notifications. * For Liveboards with both charts and tables, schedule creation is only supported in PDF and XLS formats. Schedules created in CSV formats for such Liveboards will fail to run. If `PDF` is set as the `file_format`, enable `pdf_options` to get the correct attachment. Not doing so may cause the attachment to be rendered empty. * To include only specific visualizations, specify the visualization GUIDs in the `visualization_identifiers` array. * You can schedule a Liveboard job to run periodically by setting frequency parameters. You can set the schedule to run daily, weekly, monthly or every n minutes or hours. The scheduled job can also be configured to run at a specific time of the day or on specific days of the week or month. Please ensure that when setting the schedule frequency for _minute of the object_, only values that are multiples of 5 are included. * If the `frequency` parameters are defined, you can set the time zone to a value that matches your server\'s time zone. For example, `US/Central`, `Etc/UTC`, `CET`. The default time zone is `America/Los_Angeles`. For more information about Liveboard jobs, see [ThoughtSpot Product Documentation](https://docs.thoughtspot.com/cloud/latest/liveboard-schedule). + * @param createScheduleRequest + */ + createSchedule(createScheduleRequest, _options) { + const result = this.api.createSchedule(createScheduleRequest, _options); + return result.toPromise(); + } + /** + * Version: 9.0.0.cl or later Creates a tag object. Tags are labels that identify a metadata object. For example, you can create a tag to designate subject areas, such as sales, HR, marketing, and finance. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `TAGMANAGEMENT` (**Can manage tags**) privilege is required to create, edit, and delete tags. + * @param createTagRequest + */ + createTag(createTagRequest, _options) { + const result = this.api.createTag(createTagRequest, _options); + return result.toPromise(); + } + /** + * Version: 9.0.0.cl or later Creates a user in ThoughtSpot. The API endpoint allows you to configure several user properties such as email address, account status, share notification preferences, and sharing visibility. You can provision the user to [groups](https://docs.thoughtspot.com/cloud/latest/groups-privileges) and [Orgs](https://docs.thoughtspot.com/cloud/latest/orgs-overview). You can also add Liveboard, Answer, and Worksheet objects to the user’s favorites list, assign a default Liveboard for the user, and set user preferences. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `USER_ADMINISTRATION` (**Can manage users**) privilege is required. + * @param createUserRequest + */ + createUser(createUserRequest, _options) { + const result = this.api.createUser(createUserRequest, _options); + return result.toPromise(); + } + /** + * Version: 9.0.0.cl or later Creates a group object in ThoughtSpot. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `GROUP_ADMINISTRATION` (**Can manage groups**) privilege is required. #### About groups Groups in ThoughtSpot are used by the administrators to define privileges and organize users based on their roles and access requirements. To know more about groups and privileges, see [ThoughtSpot Product Documentation](https://docs.thoughtspot.com/cloud/latest/groups-privileges). #### Supported operations The API endpoint lets you perform the following operations: * Assign privileges * Add users * Define sharing visibility * Add sub-groups * Assign a default Liveboard + * @param createUserGroupRequest + */ + createUserGroup(createUserGroupRequest, _options) { + const result = this.api.createUserGroup(createUserGroupRequest, _options); + return result.toPromise(); + } + /** + * Create a variable which can be used for parameterizing metadata objects Version: 26.4.0.cl or later Allows creating a variable which can be used for parameterizing metadata objects in ThoughtSpot. Requires ADMINISTRATION role and TENANT scope. The CAN_MANAGE_VARIABLES permission allows you to manage Formula Variables in the current organization scope. The API endpoint supports the following types of variables: * CONNECTION_PROPERTY - For connection properties * TABLE_MAPPING - For table mappings * CONNECTION_PROPERTY_PER_PRINCIPAL - For connection properties per principal. In order to use this please contact support to enable this. * FORMULA_VARIABLE - For Formula variables, introduced in 10.15.0.cl When creating a variable, you need to specify: * The variable type * A unique name for the variable * Whether the variable contains sensitive values (defaults to false) * The data type of the variable, only specify for formula variables (defaults to null) The operation will fail if: * The user lacks required permissions * The variable name already exists * The variable type is invalid + * @param createVariableRequest + */ + createVariable(createVariableRequest, _options) { + const result = this.api.createVariable(createVariableRequest, _options); + return result.toPromise(); + } + /** + * Version: 10.14.0.cl or later Creates a new webhook configuration to receive notifications for specified events. The webhook will be triggered when the configured events occur in the system. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) or `DEVELOPER` (**Has developer privilege**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, users with `CAN_MANAGE_WEBHOOKS` (**Can manage webhooks**) privilege are also authorized to perform this action. + * @param createWebhookConfigurationRequest + */ + createWebhookConfiguration(createWebhookConfigurationRequest, _options) { + const result = this.api.createWebhookConfiguration(createWebhookConfigurationRequest, _options); + return result.toPromise(); + } + /** + * Version: 9.9.0.cl or later Creates a DBT connection object in ThoughtSpot. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege or `DATAMANAGEMENT` (**Can manage data**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the following Data control privileges may be required: - `CAN_MANAGE_CUSTOM_CALENDAR`(**Can manage custom calendars**) - `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) - `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` (**Can manage data models**) #### About create DBT connection DBT connection in ThoughtSpot is used by the user to define DBT credentials for cloud . The API needs embrace connection, embrace database name, DBT url, import type, DBT account identifier, DBT project identifier, DBT access token and environment details (or) embrace connection, embrace database name, import type, file_content to create a connection object. To know more about DBT, see ThoughtSpot Product Documentation. + * @param connectionName Name of the connection. + * @param databaseName Name of the Database. + * @param importType Mention type of Import + * @param accessToken Access token is mandatory when Import_Type is DBT_CLOUD. + * @param dbtUrl DBT URL is mandatory when Import_Type is DBT_CLOUD. + * @param accountId Account ID is mandatory when Import_Type is DBT_CLOUD + * @param projectId Project ID is mandatory when Import_Type is DBT_CLOUD + * @param dbtEnvId DBT Environment ID\\\" + * @param projectName Name of the project + * @param fileContent Upload DBT Manifest and Catalog artifact files as a ZIP file. This field is Mandatory when Import Type is \\\'ZIP_FILE\\\' + */ + dbtConnection(connectionName, databaseName, importType, accessToken, dbtUrl, accountId, projectId, dbtEnvId, projectName, fileContent, _options) { + const result = this.api.dbtConnection(connectionName, databaseName, importType, accessToken, dbtUrl, accountId, projectId, dbtEnvId, projectName, fileContent, _options); + return result.toPromise(); + } + /** + * Version: 9.9.0.cl or later Resynchronize the existing list of models, tables, worksheet tml’s and import them to Thoughtspot based on the DBT connection object. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege or `DATAMANAGEMENT` (**Can manage data**) privilege, along with an existing DBT connection. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the following data control privileges may be required: - `CAN_MANAGE_CUSTOM_CALENDAR`(**Can manage custom calendars**) - `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) - `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` (**Can manage data models**) + * @param dbtConnectionIdentifier Unique ID of the DBT connection. + * @param fileContent Upload DBT Manifest and Catalog artifact files as a ZIP file. This field is mandatory if the connection was created with import_type ‘ZIP_FILE’ + */ + dbtGenerateSyncTml(dbtConnectionIdentifier, fileContent, _options) { + const result = this.api.dbtGenerateSyncTml(dbtConnectionIdentifier, fileContent, _options); + return result.toPromise(); + } + /** + * Version: 9.9.0.cl or later Generate required table and worksheet and import them. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege or `DATAMANAGEMENT` (**Can manage data**) privilege, along with an existing DBT connection. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the following data control privileges may be required: - `CAN_MANAGE_CUSTOM_CALENDAR`(**Can manage custom calendars**) - `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) - `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` (**Can manage data models**) #### About generate TML Models and Worksheets to be imported can be selected by the user as part of the API. + * @param dbtConnectionIdentifier Unique ID of the DBT connection. + * @param modelTables List of Models and their respective Tables Example: \\\'[{\\\"model_name\\\": \\\"model_name\\\", \\\"tables\\\": [\\\"table_name\\\"]}]\\\' + * @param importWorksheets Mention the worksheet tmls to import + * @param worksheets List of worksheets is mandatory when import_Worksheets is type SELECTED Example: [\\\"worksheet_name\\\"] + * @param fileContent Upload DBT Manifest and Catalog artifact files as a ZIP file. This field is mandatory if the connection was created with import_type ‘ZIP_FILE’ + */ + dbtGenerateTml(dbtConnectionIdentifier, modelTables, importWorksheets, worksheets, fileContent, _options) { + const result = this.api.dbtGenerateTml(dbtConnectionIdentifier, modelTables, importWorksheets, worksheets, fileContent, _options); + return result.toPromise(); + } + /** + * Version: 9.9.0.cl or later Gets a list of DBT connection objects by user and organization, available on the ThoughtSpot system. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege or `DATAMANAGEMENT` (**Can manage data**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the following Data control privileges may be required: - `CAN_MANAGE_CUSTOM_CALENDAR`(**Can manage custom calendars**) - `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) - `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` (**Can manage data models**) #### About search DBT connection To get details of a specific DBT connection identifier, database connection identifier, database connection name, database name, project name, project identifier, environment identifier , import type and author. + */ + dbtSearch(_options) { + const result = this.api.dbtSearch(_options); + return result.toPromise(); + } + /** + * Version: 9.7.0.cl or later Deactivates a user account. Requires `ADMINISTRATION` (**Can administer Thoughtspot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `USER_ADMINISTRATION` (**Can manage users**) privilege is required. To deactivate a user account, the API request body must include the following information: - Username or the GUID of the user account - Base URL of the ThoughtSpot instance If the API request is successful, ThoughtSpot returns the activation URL in the response. The activation URL is valid for 14 days and can be used to re-activate the account and reset the password of the deactivated account. + * @param deactivateUserRequest + */ + deactivateUser(deactivateUserRequest, _options) { + const result = this.api.deactivateUser(deactivateUserRequest, _options); + return result.toPromise(); + } + /** + * Version: 10.12.0.cl or later Deletes a [custom calendar](https://docs.thoughtspot.com/cloud/latest/connections-cust-cal). Requires `DATAMANAGEMENT` (**Can manage data**) or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your ThoughtSpot instance, the `CAN_MANAGE_CUSTOM_CALENDAR` (**Can manage custom calendars**) privilege is required. #### Usage guidelines To delete a custom calendar, specify the calendar ID as a path parameter in the request URL. + * @param calendarIdentifier Unique ID or name of the Calendar. + */ + deleteCalendar(calendarIdentifier, _options) { + const result = this.api.deleteCalendar(calendarIdentifier, _options); + return result.toPromise(); + } + /** + * Version: 26.4.0.cl or later Deletes one or more collections from ThoughtSpot. #### Delete options * **delete_children**: When set to `true`, deletes the child objects (metadata items) within the collection that the user has access to. Objects that the user does not have permission to delete will be skipped. * **dry_run**: When set to `true`, performs a preview of the deletion operation without actually deleting anything. The response shows what would be deleted, allowing you to review before committing the deletion. #### Response The response includes: * **metadata_deleted**: List of metadata objects that were successfully deleted * **metadata_skipped**: List of metadata objects that were skipped due to lack of permissions or other constraints + * @param deleteCollectionRequest + */ + deleteCollection(deleteCollectionRequest, _options) { + const result = this.api.deleteCollection(deleteCollectionRequest, _options); + return result.toPromise(); + } + /** + * Version: 9.2.0.cl or later Deletes Git repository configuration from your ThoughtSpot instance. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance on your instance, the `CAN_SETUP_VERSION_CONTROL` (**Can set up version control**) privilege. + * @param deleteConfigRequest + */ + deleteConfig(deleteConfigRequest, _options) { + const result = this.api.deleteConfig(deleteConfigRequest, _options); + return result.toPromise(); + } + /** + * Version: 9.2.0.cl or later **Important**: This endpoint is deprecated and will be removed from ThoughtSpot in September 2025. ThoughtSpot strongly recommends using the [Delete Connection V2](#/http/api-endpoints/connections/delete-connection-v2) endpoint to delete your connection objects. #### Usage guidelines Deletes a connection object. Requires `DATAMANAGEMENT` (**Can manage data**) and edit permissions to the connection object, or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) privilege is required. **Note**: If a connection has dependent objects, make sure you remove its associations before the delete operation. + * @param deleteConnectionRequest + */ + deleteConnection(deleteConnectionRequest, _options) { + const result = this.api.deleteConnection(deleteConnectionRequest, _options); + return result.toPromise(); + } + /** + * Version: 10.12.0.cl or later Deletes connection configuration objects. Requires `DATAMANAGEMENT` (**Can manage data**) and edit permissions to the connection object, or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) privilege is required. + * @param deleteConnectionConfigurationRequest + */ + deleteConnectionConfiguration(deleteConnectionConfigurationRequest, _options) { + const result = this.api.deleteConnectionConfiguration(deleteConnectionConfigurationRequest, _options); + return result.toPromise(); + } + /** + * Version: 10.4.0.cl or later Deletes a connection object. **Note**: If a connection has dependent objects, make sure you remove its associations before the delete operation. Requires `DATAMANAGEMENT` (**Can manage data**) and edit permissions to the connection object, or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) privilege is required. + * @param connectionIdentifier Unique ID or name of the connection. + */ + deleteConnectionV2(connectionIdentifier, _options) { + const result = this.api.deleteConnectionV2(connectionIdentifier, _options); + return result.toPromise(); + } + /** + * Version: 9.6.0.cl or later Removes the custom action specified in the API request. Requires `DEVELOPER` (**Has Developer privilege**) or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `DEVELOPER` (**Has developer privilege**) privilege is required. + * @param customActionIdentifier Unique ID or name of the custom action. + */ + deleteCustomAction(customActionIdentifier, _options) { + const result = this.api.deleteCustomAction(customActionIdentifier, _options); + return result.toPromise(); + } + /** + * Version: 9.9.0.cl or later Removes the specified DBT connection object from the ThoughtSpot system. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) or `DATAMANAGEMENT` (**Can manage data ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the following Data control privileges may be required: - `CAN_MANAGE_CUSTOM_CALENDAR`(**Can manage custom calendars**) - `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) - `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` (**Can manage data models**) + * @param dbtConnectionIdentifier Unique ID of the DBT Connection. + */ + deleteDbtConnection(dbtConnectionIdentifier, _options) { + const result = this.api.deleteDbtConnection(dbtConnectionIdentifier, _options); + return result.toPromise(); + } + /** + * Version: 10.10.0.cl or later Deletes the configuration for the email customization. #### Pre-requisites Requires `DEVELOPER` (**has developer privilege**) or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `DEVELOPER` (**Has developer privilege**) privilege is required. **NOTE**:This endpoint in currently in beta. Contact ThoughtSpot support to enable this on your instance. #### Usage guidelines - Call the search API endpoint to get the `template_identifier` from the response. - Use that `template_identifier` as a parameter in this API request. + * @param templateIdentifier Unique ID or name of the email customization. + */ + deleteEmailCustomization(templateIdentifier, _options) { + const result = this.api.deleteEmailCustomization(templateIdentifier, _options); + return result.toPromise(); + } + /** + * Version: 9.0.0.cl or later Removes the specified metadata object from the ThoughtSpot system. Requires edit access to the metadata object. + * @param deleteMetadataRequest + */ + deleteMetadata(deleteMetadataRequest, _options) { + const result = this.api.deleteMetadata(deleteMetadataRequest, _options); + return result.toPromise(); + } + /** + * Version: 9.0.0.cl or later Deletes an Org object from the ThoughtSpot system. Requires cluster administration (**Can administer Org**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `ORG_ADMINISTRATION` (**Can manage Orgs**) privilege is required. When you delete an Org, all its users and objects created in that Org context are removed. However, if the users in the deleted Org also exists in other Orgs, they are removed only from the deleted Org. + * @param orgIdentifier ID or name of the Org + */ + deleteOrg(orgIdentifier, _options) { + const result = this.api.deleteOrg(orgIdentifier, _options); + return result.toPromise(); + } + /** + * Version: 10.12.0.cl or later Deletes the configuration for the email customization. #### Pre-requisites Requires `DEVELOPER` (**has developer privilege**) or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `DEVELOPER` (**Has developer privilege**) privilege is required. **NOTE**:This endpoint in currently in beta. Contact ThoughtSpot support to enable this on your instance. #### Usage guidelines - Call the search API endpoint to get the `org_identifier` from the response. - Use that `org_identifier` as a parameter in this API request. + * @param deleteOrgEmailCustomizationRequest + */ + deleteOrgEmailCustomization(deleteOrgEmailCustomizationRequest, _options) { + const result = this.api.deleteOrgEmailCustomization(deleteOrgEmailCustomizationRequest, _options); + return result.toPromise(); + } + /** + * Version: 9.5.0.cl or later Deletes a Role object from the ThoughtSpot system. Available only if [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance. To delete a Role, the `ROLE_ADMINISTRATION` (**Can manage roles**) privilege is required. + * @param roleIdentifier Unique ID or name of the Role. ReadOnly roles cannot be deleted. + */ + deleteRole(roleIdentifier, _options) { + const result = this.api.deleteRole(roleIdentifier, _options); + return result.toPromise(); + } + /** + * Deletes a scheduled job. Version: 9.4.0.cl or later Deletes a scheduled Liveboard job. Requires at least edit access to Liveboard or `ADMINISTRATION` (**Can administer Org**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `JOBSCHEDULING` (**Can schedule for others**) privilege is required. + * @param scheduleIdentifier Unique ID or name of the scheduled job. + */ + deleteSchedule(scheduleIdentifier, _options) { + const result = this.api.deleteSchedule(scheduleIdentifier, _options); + return result.toPromise(); + } + /** + * Version: 9.0.0.cl or later Deletes a tag object from the ThoughtSpot system Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `TAGMANAGEMENT` (**Can manage tags**) privilege is required to create, edit, and delete tags. + * @param tagIdentifier Tag identifier Tag name or Tag id. + */ + deleteTag(tagIdentifier, _options) { + const result = this.api.deleteTag(tagIdentifier, _options); + return result.toPromise(); + } + /** + * Version: 9.0.0.cl or later Deletes a user from the ThoughtSpot system. If you want to remove a user from a specific Org but not from ThoughtSpot, update the group and Org mapping properties of the user object via a POST API call to the [/api/rest/2.0/users/{user_identifier}/update](#/http/api-endpoints/users/update-user) endpoint. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `USER_ADMINISTRATION` (**Can manage users**) privilege is required. + * @param userIdentifier GUID / name of the user + */ + deleteUser(userIdentifier, _options) { + const result = this.api.deleteUser(userIdentifier, _options); + return result.toPromise(); + } + /** + * Version: 9.0.0.cl or later Removes the specified group object from the ThoughtSpot system. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `GROUP_ADMINISTRATION` (**Can manage groups**) privilege is required. + * @param groupIdentifier GUID or name of the group. + */ + deleteUserGroup(groupIdentifier, _options) { + const result = this.api.deleteUserGroup(groupIdentifier, _options); + return result.toPromise(); + } + /** + * Delete a variable Version: 10.14.0.cl or later **Note:** This API endpoint is deprecated and will be removed from ThoughtSpot in a future release. Use [POST /api/rest/2.0/template/variables/delete](/api/rest/2.0/template/variables/delete) instead. Allows deleting a variable from ThoughtSpot. Requires ADMINISTRATION role and TENANT scope. The CAN_MANAGE_VARIABLES permission allows you to manage Formula Variables in the current organization scope. The API endpoint requires: * The variable identifier (ID or name) The operation will fail if: * The user lacks required permissions * The variable doesn\'t exist * The variable is being used by other objects + * @param identifier Unique id or name of the variable + */ + deleteVariable(identifier, _options) { + const result = this.api.deleteVariable(identifier, _options); + return result.toPromise(); + } + /** + * Delete variable(s) Version: 26.4.0.cl or later Allows deleting multiple variables from ThoughtSpot. Requires ADMINISTRATION role and TENANT scope. The CAN_MANAGE_VARIABLES permission allows you to manage Formula Variables in the current organization scope. The API endpoint requires: * The variable identifiers (IDs or names) The operation will fail if: * The user lacks required permissions * Any of the variables don\'t exist * Any of the variables are being used by other objects + * @param deleteVariablesRequest + */ + deleteVariables(deleteVariablesRequest, _options) { + const result = this.api.deleteVariables(deleteVariablesRequest, _options); + return result.toPromise(); + } + /** + * Version: 10.14.0.cl or later Deletes one or more webhook configurations by their unique id or name. Returns status of each deletion operation, including successfully deleted webhooks and any failures with error details. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) or `DEVELOPER` (**Has developer privilege**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, users with `CAN_MANAGE_WEBHOOKS` (**Can manage webhooks**) privilege are also authorized to perform this action. + * @param deleteWebhookConfigurationsRequest + */ + deleteWebhookConfigurations(deleteWebhookConfigurationsRequest, _options) { + const result = this.api.deleteWebhookConfigurations(deleteWebhookConfigurationsRequest, _options); + return result.toPromise(); + } + /** + * Version: 9.2.0.cl or later Allows you to deploy a commit and publish TML content to your ThoughtSpot instance. Requires at least edit access to the objects used in the deploy operation. The API deploys the head of the branch unless a `commit_id` is specified in the API request. If the branch name is not defined in the request, the default branch is considered for deploying commits. For more information, see [Git integration documentation](https://developers.thoughtspot.com/docs/git-integration). + * @param deployCommitRequest + */ + deployCommit(deployCommitRequest, _options) { + const result = this.api.deployCommit(deployCommitRequest, _options); + return result.toPromise(); + } + /** + * Version: 9.9.0.cl or later Exports the difference in connection metadata between CDW and ThoughtSpot Requires `DATAMANAGEMENT` (**Can manage data**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the following Data control privileges may be required: - `CAN_MANAGE_CUSTOM_CALENDAR`(**Can manage custom calendars**) - `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) - `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` (**Can manage data models**) To download the connection metadata difference between ThoughtSpot and CDW, pass the connection GUID as `connection_identifier` in the API request. + * @param connectionIdentifier GUID of the connection + */ + downloadConnectionMetadataChanges(connectionIdentifier, _options) { + const result = this.api.downloadConnectionMetadataChanges(connectionIdentifier, _options); + return result.toPromise(); + } + /** + * Version: 9.0.0.cl or later Exports an Answer in the given file format. You can download the Answer data as a PDF, PNG, CSV, or XLSX file. Requires at least view access to the Answer. #### Usage guidelines In the request body, specify the GUID or name of the Answer and set `file_format`. The default file format is CSV. Use the `type` parameter to specify whether the Answer being exported is a saved Answer (`SAVED`) or a pinned Answer on a Liveboard (`PINNED`). Defaults to `SAVED`. When using `PINNED`, the `metadata_identifier` must be the container id. **NOTE**: * The downloadable file returned in API response file is extensionless. Please rename the downloaded file by typing in the relevant extension. * HTML rendering is not supported for PDF exports of Answers with tables. Optionally, you can define [runtime overrides](https://developers.thoughtspot.com/docs/fetch-data-and-report-apis#_runtime_overrides) to apply to the Answer data. + * @param exportAnswerReportRequest + */ + exportAnswerReport(exportAnswerReportRequest, _options) { + const result = this.api.exportAnswerReport(exportAnswerReportRequest, _options); + return result.toPromise(); + } + /** + * Version: 9.0.0.cl or later Exports a Liveboard and its visualizations in PDF, PNG, CSV, or XLSX file format. The default `file_format` is CSV. Requires at least view access to the Liveboard. #### Usage guidelines In the request body, specify the GUID or name of the Liveboard. To generate a Liveboard report with specific visualizations, add GUIDs or names of the visualizations. **NOTE**: * The downloadable file returned in API response file is extensionless. Please rename the downloaded file by typing in the relevant extension. * Optionally, you can define [runtime overrides](https://developers.thoughtspot.com/docs/fetch-data-and-report-apis#_runtime_overrides) to apply to the Answer data. * To include unsaved changes in the report, pass the `transient_pinboard_content` script generated from the `getExportRequestForCurrentPinboard` method in the Visual Embed SDK. Upon successful execution, the API returns the report with unsaved changes, including ad hoc changes to visualizations. For more information, see [Liveboard Report API](https://developers.thoughtspot.com/docs/fetch-data-and-report-apis#_liveboard_report_api). * Starting with ThoughtSpot Cloud 10.9.0.cl release, the Liveboard can be exported in the PNG format in the resolution of your choice. To enable this on your instance, contact ThoughtSpot support. When this feature is enabled, the options `include_cover_page`,`include_filter_page` within the `png_options` will not be available for PNG exports. * Starting with the ThoughtSpot Cloud 26.2.0.cl release, * Liveboards can be exported in CSV format. * All visualizations within a Liveboard can be exported as individual CSV files. * When exporting multiple visualizations or the entire Liveboard, the system returns the report as a compressed ZIP file containing the separate CSV files for each visualization. * Liveboards can also be exported in XLSX format. * All selected visualizations are consolidated into a single Excel workbook (.xlsx), with each visualization placed in its own worksheet (tab). * XLSX exports are limited to a maximum of 255 worksheets (tabs) per workbook. + * @param exportLiveboardReportRequest + */ + exportLiveboardReport(exportLiveboardReportRequest, _options) { + const result = this.api.exportLiveboardReport(exportLiveboardReportRequest, _options); + return result.toPromise(); + } + /** + * Version: 9.0.0.cl or later Exports the [TML](https://docs.thoughtspot.com/cloud/latest/tml) representation of metadata objects in JSON or YAML format. Requires `DATADOWNLOADING` (**Can download Data**) and at least view access to the metadata object. #### Usage guidelines * You can export one or several objects by passing metadata object GUIDs in the `metadata` array. * When exporting TML content for a Liveboard or Answer object, you can set `export_associated` to `true` to retrieve TML content for underlying Worksheets, Tables, or Views, including the GUID of each object within the headers. When `export_associated` is set to `true`, consider retrieving one metadata object at a time. * Set `export_fqns` to `true` to add FQNs of the referenced objects in the TML content. For example, if you send an API request to retrieve TML for a Liveboard and its associated objects, the API returns the TML content with FQNs of the referenced Worksheet. Exporting TML with FQNs is useful if ThoughtSpot has multiple objects with the same name and you want to eliminate ambiguity when importing TML files into ThoughtSpot. It eliminates the need for adding FQNs of the referenced objects manually during the import operation. * To export only the TML of feedbacks associated with an object, set the GUID of the object as `identifier`, and set the `type` as `FEEDBACK` in the `metadata` array. * To export the TML of an object along with the feedbacks associated with it, set the GUID of the object as `identifier`, set the `type` as `LOGIAL_TABLE` in the `metadata` array, and set `export_with_associated_feedbacks` in `export_options` to true. For more information, see [TML Documentation](https://developers.thoughtspot.com/docs/tml#_export_a_tml). For more information on feedbacks, see [Feedback Documentation](https://docs.thoughtspot.com/cloud/latest/sage-feedback). + * @param exportMetadataTMLRequest + */ + exportMetadataTML(exportMetadataTMLRequest, _options) { + const result = this.api.exportMetadataTML(exportMetadataTMLRequest, _options); + return result.toPromise(); + } + /** + * Version: 10.1.0.cl or later Exports the [TML](https://docs.thoughtspot.com/cloud/latest/tml) representation of metadata objects in JSON or YAML format. ### **Permissions Required** Requires `DATAMANAGEMENT` (**Can manage data**) and `USERMANAGEMENT` (**Can manage users**) privileges. #### **Usage Guidelines** This API is only applicable for `USER`, `GROUP`, and `ROLES` metadata types. - `batch_offset` Indicates the starting position within the complete dataset from which the API should begin returning objects. Useful for paginating results efficiently. - `batch_size` Specifies the number of objects or items to retrieve in a single request. Helps control response size for better performance. - `edoc_format` Defines the format of the TML content. The exported metadata can be in JSON or YAML format. - `export_dependent` Specifies whether to include dependent metadata objects in the export. Ensures related objects are also retrieved if needed. - `all_orgs_override` Indicates whether the export operation applies across all organizations. Useful for multi-tenant environments where cross-org exports are required. + * @param exportMetadataTMLBatchedRequest + */ + exportMetadataTMLBatched(exportMetadataTMLBatchedRequest, _options) { + const result = this.api.exportMetadataTMLBatched(exportMetadataTMLBatchedRequest, _options); + return result.toPromise(); + } + /** + * Version: 9.0.0.cl or later Fetches data from a saved Answer. Requires at least view access to the saved Answer. The `record_size` attribute determines the number of records to retrieve in an API call. For more information about pagination, record size, and maximum row limit, see [Pagination and record size settings](https://developers.thoughtspot.com/docs/fetch-data-and-report-apis#_pagination_settings_for_data_and_report_apis). + * @param fetchAnswerDataRequest + */ + fetchAnswerData(fetchAnswerDataRequest, _options) { + const result = this.api.fetchAnswerData(fetchAnswerDataRequest, _options); + return result.toPromise(); + } + /** + * Version: 9.0.0.cl or later Fetches the underlying SQL query data for an Answer object. Requires at least view access to the Answer object. Upon successful execution, the API returns the SQL queries for the specified object as shown in this example: ``` { \"metadata_id\":\"8fbe44a8-46ad-4b16-8d39-184b2fada490\", \"metadata_name\":\"Total sales\", \"metadata_type\":\"ANSWER\", \"sql_queries\":[ { \"metadata_id\":\"8fbe44a8-46ad-4b16-8d39-184b2fada490\", \"metadata_name\":\"Total sales -test\", \"sql_query\":\"SELECT \\n \\\"ta_1\\\".\\\"REGION\\\" \\\"ca_1\\\", \\n \\\"ta_2\\\".\\\"PRODUCTNAME\\\" \\\"ca_2\\\", \\n \\\"ta_1\\\".\\\"STORENAME\\\" \\\"ca_3\\\", \\n CASE\\n WHEN sum(\\\"ta_3\\\".\\\"SALES\\\") IS NOT NULL THEN sum(\\\"ta_3\\\".\\\"SALES\\\")\\n ELSE 0\\n END \\\"ca_4\\\", \\n CASE\\n WHEN sum(\\\"ta_3\\\".\\\"QUANTITYPURCHASED\\\") IS NOT NULL THEN sum(\\\"ta_3\\\".\\\"QUANTITYPURCHASED\\\")\\n ELSE 0\\n END \\\"ca_5\\\"\\nFROM \\\"RETAILAPPAREL\\\".\\\"PUBLIC\\\".\\\"FACT_RETAPP_SALES\\\" \\\"ta_3\\\"\\n JOIN \\\"RETAILAPPAREL\\\".\\\"PUBLIC\\\".\\\"DIM_RETAPP_STORES\\\" \\\"ta_1\\\"\\n ON \\\"ta_3\\\".\\\"STOREID\\\" = \\\"ta_1\\\".\\\"STOREID\\\"\\n JOIN \\\"RETAILAPPAREL\\\".\\\"PUBLIC\\\".\\\"DIM_RETAPP_PRODUCTS\\\" \\\"ta_2\\\"\\n ON \\\"ta_3\\\".\\\"PRODUCTID\\\" = \\\"ta_2\\\".\\\"PRODUCTID\\\"\\nGROUP BY \\n \\\"ca_1\\\", \\n \\\"ca_2\\\", \\n \\\"ca_3\\\"\\n\" } ] } ``` + * @param fetchAnswerSqlQueryRequest + */ + fetchAnswerSqlQuery(fetchAnswerSqlQueryRequest, _options) { + const result = this.api.fetchAnswerSqlQuery(fetchAnswerSqlQueryRequest, _options); + return result.toPromise(); + } + /** + * Version: 10.4.0.cl or later Gets information about the status of the TML async import task scheduled using the `/api/rest/2.0/metadata/tml/async/import` API call. To fetch the task details, specify the ID of the TML async import task. Requires access to the task ID. The API allows users who initiated the asynchronous TML import via `/api/rest/2.0/metadata/tml/async/import` to view the status of their tasks. Users with administration privilege can view the status of all import tasks initiated by the users in their Org. #### Usage guidelines See [TML API Documentation](https://developers.thoughtspot.com/docs/tml#_fetch_status_of_the_tml_import_task) for usage guidelines. + * @param fetchAsyncImportTaskStatusRequest + */ + fetchAsyncImportTaskStatus(fetchAsyncImportTaskStatusRequest, _options) { + const result = this.api.fetchAsyncImportTaskStatus(fetchAsyncImportTaskStatusRequest, _options); + return result.toPromise(); + } + /** + * Version: 10.12.0.cl or later Fetches column security rules for specified tables. This API endpoint retrieves column-level security rules configured for tables. It returns information about which columns are secured and which groups have access to those columns. #### Usage guidelines - Provide an array of table identifiers using either `identifier` (GUID or name) or `obj_identifier` (object ID) - At least one of `identifier` or `obj_identifier` must be provided for each table - The API returns column security rules for all specified tables - Users must have appropriate permissions to access security rules for the specified tables #### Required permissions - `ADMINISTRATION` - Can administer ThoughtSpot - `DATAMANAGEMENT` - Can manage data - `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` - Can manage worksheet views and tables #### Example request ```json { \"tables\": [ { \"identifier\": \"table-guid\", \"obj_identifier\": \"table-object-id\" } ] } ``` #### Response format The API returns an array of `ColumnSecurityRuleResponse` objects wrapped in a `data` field. Each `ColumnSecurityRuleResponse` object contains: - Table information (GUID and object ID) - Array of column security rules with column details, group access, and source table information #### Example response ```json { \"data\": [ { \"guid\": \"table-guid\", \"objId\": \"table-object-id\", \"columnSecurityRules\": [ { \"column\": { \"id\": \"col_123\", \"name\": \"Salary\" }, \"groups\": [ { \"id\": \"group_1\", \"name\": \"HR Department\" } ], \"sourceTableDetails\": { \"id\": \"source-table-guid\", \"name\": \"Employee_Data\" } } ] } ] } ``` + * @param fetchColumnSecurityRulesRequest + */ + fetchColumnSecurityRules(fetchColumnSecurityRulesRequest, _options) { + const result = this.api.fetchColumnSecurityRules(fetchColumnSecurityRulesRequest, _options); + return result.toPromise(); + } + /** + * Version: 9.9.0.cl or later Validates the difference in connection metadata between CDW and ThoughtSpot. Requires `DATAMANAGEMENT` (**Can manage data**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the following Data control privileges may be required: - `CAN_MANAGE_CUSTOM_CALENDAR`(**Can manage custom calendars**) - `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) - `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` (**Can manage data models**) Returns a boolean indicating whether there is any difference between the connection metadata at ThoughtSpot and CDW. To get the connection metadata difference status, pass the connection GUID as `connection_identifier` in the API request. + * @param connectionIdentifier GUID of the connection + */ + fetchConnectionDiffStatus(connectionIdentifier, _options) { + const result = this.api.fetchConnectionDiffStatus(connectionIdentifier, _options); + return result.toPromise(); + } + /** + * Version: 9.0.0.cl or later Gets data from a Liveboard object and its visualization. Requires at least view access to the Liveboard. #### Usage guidelines In the request body, specify the GUID or name of the Liveboard. To get data for specific visualizations, add the GUIDs or names of the visualizations in the API request. To include unsaved changes in the report, pass the `transient_pinboard_content` script generated from the `getExportRequestForCurrentPinboard` method in the Visual Embed SDK. Upon successful execution, the API returns the report with unsaved changes. If the new Liveboard experience mode, the transient content includes ad hoc changes to visualizations such as sorting, toggling of legends, and data drill down. For more information, and see [Liveboard data API](https://developers.thoughtspot.com/docs/fetch-data-and-report-apis#_fetch_liveboard_data_api). + * @param fetchLiveboardDataRequest + */ + fetchLiveboardData(fetchLiveboardDataRequest, _options) { + const result = this.api.fetchLiveboardData(fetchLiveboardDataRequest, _options); + return result.toPromise(); + } + /** + * Version: 9.0.0.cl or later Fetches the underlying SQL query data for a Liveboard object and its visualizations. Requires at least view access to the Liveboard object. To get SQL query data for a Liveboard, specify the GUID of the Liveboard. Optionally, you can add an array of visualization GUIDs to retrieve the SQL query data for visualizations in the Liveboard. Upon successful execution, the API returns the SQL queries for the specified object as shown in this example: ``` { \"metadata_id\": \"fa68ae91-7588-4136-bacd-d71fb12dda69\", \"metadata_name\": \"Total Sales\", \"metadata_type\": \"LIVEBOARD\", \"sql_queries\": [ { \"metadata_id\": \"b3b6d2b9-089a-490c-8e16-b144650b7843\", \"metadata_name\": \"Total quantity purchased, Total sales by region\", \"sql_query\": \"SELECT \\n \\\"ta_1\\\".\\\"REGION\\\" \\\"ca_1\\\", \\n CASE\\n WHEN sum(\\\"ta_2\\\".\\\"QUANTITYPURCHASED\\\") IS NOT NULL THEN sum(\\\"ta_2\\\".\\\"QUANTITYPURCHASED\\\")\\n ELSE 0\\n END \\\"ca_2\\\", \\n CASE\\n WHEN sum(\\\"ta_2\\\".\\\"SALES\\\") IS NOT NULL THEN sum(\\\"ta_2\\\".\\\"SALES\\\")\\n ELSE 0\\n END \\\"ca_3\\\"\\nFROM \\\"RETAILAPPAREL\\\".\\\"PUBLIC\\\".\\\"FACT_RETAPP_SALES\\\" \\\"ta_2\\\"\\n JOIN \\\"RETAILAPPAREL\\\".\\\"PUBLIC\\\".\\\"DIM_RETAPP_STORES\\\" \\\"ta_1\\\"\\n ON \\\"ta_2\\\".\\\"STOREID\\\" = \\\"ta_1\\\".\\\"STOREID\\\"\\nGROUP BY \\\"ca_1\\\"\" } ] } ``` + * @param fetchLiveboardSqlQueryRequest + */ + fetchLiveboardSqlQuery(fetchLiveboardSqlQueryRequest, _options) { + const result = this.api.fetchLiveboardSqlQuery(fetchLiveboardSqlQueryRequest, _options); + return result.toPromise(); + } + /** + * Version: 9.0.0.cl or later Fetches security audit logs. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the [Admin Control](https://developers.thoughtspot.com/docs/rbac#_admin_control) privileges are required. #### Usage guidelines By default, the API retrieves logs for the last 24 hours. You can set a custom duration in EPOCH time. Make sure the log duration specified in your API request doesn’t exceed 24 hours. If you must fetch logs for a longer time range, modify the duration and make multiple sequential API requests. Upon successful execution, the API returns logs with the following information: * timestamp of the event * event ID * event type * name and GUID of the user * IP address of ThoughtSpot instance For more information see [Audit logs Documentation](https://developers.thoughtspot.com/docs/audit-logs). + * @param fetchLogsRequest + */ + fetchLogs(fetchLogsRequest, _options) { + const result = this.api.fetchLogs(fetchLogsRequest, _options); + return result.toPromise(); + } + /** + * Version: 26.3.0.cl or later This API fetches the object privileges present for the given list of principals (user or group), on the given set of objects. It supports pagination, which can be enabled and configured using the request parameters. It provides users access to certain features based on privilege based access control. #### Usage guidelines - Specify the `type` (`USER` or `USER_GROUP`) and `identifier` (either GUID or name) of the principals for which you want to retrieve object privilege information in the `principals` array. - Specify the `type` (`LOGICAL_TABLE`) and `identifier` (either GUID or name) of the metadata objects for which you want to retrieve object privilege information in the `metadata` array. Only `LOGICAL_TABLE` metadata type is supported for now. It may be extended for other metadata types in future. - To control the offset from where principals have to be fetched, use `record_offset`. When `record_offset` is 0, information is fetched from the beginning. - To control the number of principals to be fetched, use `record_size`. Default `record_size` is 20. - Ensure `record_offset` for a subsequent request is one more than the value of `record_size` of the previous request. - Ensure using correct Authorization Bearer Token corresponding to specific user & org. #### Example request ```json { \"principals\": [ { \"type\": \"type-1\", \"identifier\": \"principal-guid-or-name-1\" }, { \"type\": \"type-2\", \"identifier\": \"principal-guid-or-name-2\" } ], \"metadata\": [ { \"type\": \"metadata-type-1\", \"identifier\": \"metadata-guid-or-name-1\" }, { \"type\": \"metadata-type-2\", \"identifier\": \"metadata-guid-or-name-2\" } ], \"record_offset\": 0, \"record_size\": 20 } ``` #### Response format The API returns an array of `metadata_object_privileges` objects wrapped in JSON. Each `metadata_object_privileges` object contains: - Metadata information (GUID, name and type) - Array of `principal_object_privilege_info`. - Each `principal_object_privilege_info` contains: - Principal type. All principals of this type are listed as described below. - Array of `principal_object_privileges`. - Each `principal_object_privileges` contains: - Principal information (GUID, name, subtype) - List of applied object level privileges. #### Example response ```json { \"metadata_object_privileges\": [ { \"metadata_id\": \"metadata-guid-1\", \"metadata_name\": \"metadata-name-1\", \"metadata_type\": \"metadata-type-1\", \"principal_object_privilege_info\": [ { \"principal_type\": \"principal-type-1\", \"principal_object_privileges\": [ { \"principal_id\": \"principal-guid-1\", \"principal_name\": \"principal-name-1\", \"principal_sub_type\": \"principal-sub-type-1\", \"object_privileges\": \"[object-privilege-1, object-privilege-2]\" }, { \"principal_id\": \"principal-guid-2\", \"principal_name\": \"principal-name-2\", \"principal_sub_type\": \"principal-sub-type-2\", \"object_privileges\": \"[object-privilege-1, object-privilege-2]\" } ] }, { \"principal_type\": \"principal-type-2\", \"principal_object_privileges\": [ { \"principal_id\": \"principal-guid-3\", \"principal_name\": \"principal-guid-4\", \"principal_sub_type\": \"principal-sub-type-4\", \"object_privileges\": \"[object-privilege-1]\" } ] } ] }, { \"metadata_id\": \"metadata-guid-2\", \"metadata_name\": \"metadata-name-2\", \"metadata_type\": \"metadata-type-2\", \"principal_object_privilege_info\": [ { \"principal_type\": \"principal-type-1\", \"principal_object_privileges\": [ { \"principal_id\": \"principal-guid-1\", \"principal_name\": \"principal-name-1\", \"principal_sub_type\": \"principal-sub-type-1\", \"object_privileges\": \"[object-privilege-3, object-privilege-4]\" }, { \"principal_id\": \"principal-guid-2\", \"principal_name\": \"principal-name-2\", \"principal_sub_type\": \"principal-sub-type-2\", \"object_privileges\": \"[object-privilege-4]\" } ] } ] } ] } ``` + * @param fetchObjectPrivilegesRequest + */ + fetchObjectPrivileges(fetchObjectPrivilegesRequest, _options) { + const result = this.api.fetchObjectPrivileges(fetchObjectPrivilegesRequest, _options); + return result.toPromise(); + } + /** + * Version: 9.0.0.cl or later Fetches object permission details for a given principal object such as a user and group. Requires view access to the metadata object. #### Usage guidelines * To get a list of all metadata objects that a user or group can access, specify the `type` and GUID or name of the principal. * To get permission details for a specific object, add the `type` and GUID or name of the metadata object to your API request. Upon successful execution, the API returns a list of metadata objects and permission details for each object. + * @param fetchPermissionsOfPrincipalsRequest + */ + fetchPermissionsOfPrincipals(fetchPermissionsOfPrincipalsRequest, _options) { + const result = this.api.fetchPermissionsOfPrincipals(fetchPermissionsOfPrincipalsRequest, _options); + return result.toPromise(); + } + /** + * Version: 9.0.0.cl or later Fetches permission details for a given metadata object. Requires view access to the metadata object. #### Usage guidelines * To fetch a list of users and groups for a metadata object, specify `type` and GUID or name of the metadata object. * To get permission details for a specific user or group, add `type` and GUID or name of the principal object to your API request. Upon successful execution, the API returns permission details and principal information for the object specified in the API request. + * @param fetchPermissionsOnMetadataRequest + */ + fetchPermissionsOnMetadata(fetchPermissionsOnMetadataRequest, _options) { + const result = this.api.fetchPermissionsOnMetadata(fetchPermissionsOnMetadataRequest, _options); + return result.toPromise(); + } + /** + * Version: 9.0.0.cl or later Enforces logout on current user sessions. Use this API with caution as it may invalidate active user sessions and force users to re-login. Make sure you specify the usernames or GUIDs. If you pass null values in the API call, all user sessions on your cluster become invalid, and the users are forced to re-login. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `USER_ADMINISTRATION` (**Can manage users**) privilege is required. + * @param forceLogoutUsersRequest + */ + forceLogoutUsers(forceLogoutUsersRequest, _options) { + const result = this.api.forceLogoutUsers(forceLogoutUsersRequest, _options); + return result.toPromise(); + } + /** + * Version: 10.12.0.cl or later Exports a [custom calendar](https://docs.thoughtspot.com/cloud/latest/connections-cust-cal) in the CSV format. Requires `DATAMANAGEMENT` (**Can manage data**) or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your ThoughtSpot instance, the `CAN_MANAGE_CUSTOM_CALENDAR` (**Can manage custom calendars**) privilege is required. #### Usage guidelines Use this API to download a custom calendar in the CSV file format. In your API request, specify the following parameters. * Start and end date of the calendar. For \"month offset\" calendars, the start date must match the month defined in the `month_offset` attribute. You can also specify optional parameters such as the starting day of the week and prefixes for the quarter and year labels. + * @param generateCSVRequest + */ + generateCSV(generateCSVRequest, _options) { + const result = this.api.generateCSV(generateCSVRequest, _options); + return result.toPromise(); + } + /** + * Version: 9.0.0.cl or later Retrieves details of the current user session for the token provided in the request header. Any ThoughtSpot user can access this endpoint and send an API request. The data returned in the API response varies according to user\'s privilege and object access permissions. **NOTE**: In ThoughtSpot, users with cluster administration privileges can access all Orgs by default. However, unless the administrator is explicitly added to an Org, the Orgs list in the session information returned by the API will include only the Primary Org. To include other Orgs in the API response, you must explicitly add the administrator to each Org in the Admin settings page in the UI or via user REST API. + */ + getCurrentUserInfo(_options) { + const result = this.api.getCurrentUserInfo(_options); + return result.toPromise(); + } + /** + * Version: 9.4.0.cl or later Retrieves details of the current session token for the bearer token provided in the request header. This API endpoint does not create a new token. Instead, it returns details about the token, including the token string, creation time, expiration time, and the associated user. Use this endpoint to introspect your current session token, debug authentication issues, or when a frontend application needs session token details. Any ThoughtSpot user with a valid bearer token can access this endpoint and send an API request + */ + getCurrentUserToken(_options) { + const result = this.api.getCurrentUserToken(_options); + return result.toPromise(); + } + /** + * Version: 10.4.0.cl or later Creates an authentication token that provides values for the formula variables in the Row Level Security (RLS) rules for a given user. Recommended for use cases that require Attribute-based access control (ABAC) via RLS. #### Required privileges To add a new user and assign privileges during auto-creation, the `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege is required. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled, the `CONTROL_TRUSTED_AUTH` (**Can Enable or Disable Trusted Authentication**) privilege and edit access to the data source are required. To configure formula variables for all Orgs on your instance or the Primary Org, cluster administration privileges are required. Org administrators can configure formula variables for their respective Orgs. If Role-Based Access Control (RBAC) is enabled, users with the `CAN_MANAGE_VARIABLES` (**Can manage variables**) role privilege can also create and manage variables for their Org context. #### Usage guidelines You can generate a token by providing a `username` and `password`, or by using a `secret_key`. To generate a `secret_key`, the administrator must enable [Trusted authentication](https://developers.thoughtspot.com/docs/trusted-auth-secret-key) in the **Develop** > **Customizations** > **Security Settings** page. **Note**: * When both `password` and `secret_key` are included in the API request, `password` takes precedence. * If [Multi-Factor Authentication (MFA)](https://docs.thoughtspot.com/cloud/latest/authentication-local-mfa) is enabled on your instance, the API login request with `username` and `password` returns an error. You can switch to token-based authentication with `secret_key` or contact ThoughtSpot Support for assistance. The token obtained from ThoughtSpot is valid for 5 minutes by default. You can configure the token expiration time as required. #### ABAC via RLS To implement ABAC via RLS and assign security entitlements to users during session creation, generate a token with custom variable values. The values set in the authentication token are applied to the formula variables referenced in RLS rules at the table level, which determines the data each user can access based on their entitlements. The variable values can be configured to persist for a specific set of Models in user sessions initiated with the token, allowing different RLS rules to be set for different data models. Once defined, the rules are added to the user\'s `variable_values` object, after which all sessions will use the persisted values. For more information, see [ABAC via tokens Documentation](https://developers.thoughtspot.com/docs/abac-via-rls-variables). ##### Formula variables Before defining variable values, ensure the variables are created and available on your instance. To create a formula variable, you can use the **Create variable** (`/api/rest/2.0/template/variables/create`) REST API endpoint, with the variable `type` set as `Formula_Variable` in the API request. The API doesn\'t support `\"persist_option\": \"RESET\"` and `\"persist_option\": \"NONE\"` when `variable_values` are defined in the request. If you are using `variable_values` for token generation, you must use other supported persist options such as `APPEND` or `REPLACE`. If you want to use `RESET` or `NONE`, do not pass any `variable_values`. In such cases, `variable_values` will remain unaffected. #### Supported objects The supported object type is `LOGICAL_TABLE`. When using `object_id` with `variable_values`, models are supported. #### Just-in-time provisioning For [just-in-time user creation and provisioning](https://developers.thoughtspot.com/docs/just-in-time-provisioning), specify the following attributes in the API request: * `auto_create` * `username` * `display_name` * `email` * `groups` Set `auto_create` to `true` if the username does not exist in ThoughtSpot. If the username already exists in ThoughtSpot and `auto_create` is set to `true`, user properties such as display name, email, Org and group entitlements will not be updated with new values. Setting `auto_create` to `true` does not create formula variables. Hence, this setting will not be applicable to `variable_values`. #### Important point to note All options in the token creation APIs that define user access to data in ThoughtSpot will take effect during token creation, not when the token is used for authentication. For example, `auto_create:true` will create the user when the authentication token is created. Persist options such as `APPEND` and `REPLACE` will persist `variable_values` on the user profile when the token is created. + * @param getCustomAccessTokenRequest + */ + getCustomAccessToken(getCustomAccessTokenRequest, _options) { + const result = this.api.getCustomAccessToken(getCustomAccessTokenRequest, _options); + return result.toPromise(); + } + /** + * Version: 10.15.0.cl or later Suggests the most relevant data sources for a given natural language query, ranked by confidence with LLM-generated reasoning. Requires `CAN_USE_SPOTTER` privilege and at least view-level access to the underlying metadata entities referenced in the response. #### Usage guidelines The request must include: - `query`: the natural language question to find relevant data sources for If the request is successful, the API returns a ranked list of suggested data sources, each containing: - `confidence`: a float score indicating the model\'s confidence in the relevance of the suggestion - `details`: metadata about the data source - `data_source_identifier`: the unique ID of the data source - `data_source_name`: the display name of the data source - `description`: a description of the data source - `reasoning`: LLM-generated rationale explaining why the data source was recommended #### Error responses | Code | Description | |------|--------------------------------------------------------------------------------------------------------------------------------------------| | 401 | Unauthorized — authentication token is missing, expired, or invalid. | | 403 | Forbidden — the authenticated user does not have `CAN_USE_SPOTTER` privilege or lacks view permission on the underlying metadata entities. | > ###### Note: > * This endpoint is currently in Beta. Breaking changes may be introduced before it is made Generally Available. > * This endpoint requires Spotter — please contact ThoughtSpot Support to enable Spotter on your cluster. + * @param getDataSourceSuggestionsRequest + */ + getDataSourceSuggestions(getDataSourceSuggestionsRequest, _options) { + const result = this.api.getDataSourceSuggestions(getDataSourceSuggestionsRequest, _options); + return result.toPromise(); + } + /** + * Version: 9.0.0.cl or later Generates an authentication token for creating a full session in ThoughtSpot for a given user. Recommended for use cases that do not require Attribute-based access control (ABAC) via Row Level Security (RLS). #### Usage guidelines You can generate a token for a user by providing a `username` and `password`, or by using the `secret_key` generated for your instance. To generate a `secret_key`, the administrator must enable [Trusted authentication](https://developers.thoughtspot.com/docs/trusted-auth-secret-key) in the **Develop** > **Customizations** > **Security Settings** page. **Note**: * When both `password` and `secret_key` are included in the API request, `password` takes precedence. * If [Multi-Factor Authentication (MFA)](https://docs.thoughtspot.com/cloud/latest/authentication-local-mfa) is enabled on your instance, the API login request with `username` and `password` returns an error. You can switch to token-based authentication with `secret_key` or contact ThoughtSpot Support for assistance. The token obtained from ThoughtSpot is valid for 5 minutes by default. You can configure the token expiration time as required. #### Just-in-time provisioning For [just-in-time user creation and provisioning](https://developers.thoughtspot.com/docs/just-in-time-provisioning), specify the following attributes in the API request: * `auto_create` * `username` * `display_name` * `email` * `group_identifiers` Set `auto_create` to `true` if the username does not exist in ThoughtSpot. If the user already exists in ThoughtSpot and `auto_create` is set to `true`, user properties such as display name, email and group assignment will be updated. To add a new user and assign privileges during auto-creation, the `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege is required. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled, the `CONTROL_TRUSTED_AUTH` (**Can Enable or Disable Trusted Authentication**) privilege is required. #### Important point to note All options in the token creation APIs that define user access to data in ThoughtSpot will take effect during token creation, not when the token is used for authentication. For example, `auto_create:true` will create the user when the authentication token is created. + * @param getFullAccessTokenRequest + */ + getFullAccessToken(getFullAccessTokenRequest, _options) { + const result = this.api.getFullAccessToken(getFullAccessTokenRequest, _options); + return result.toPromise(); + } + /** + * Version: 10.15.0.cl or later Retrieves existing natural language (NL) instructions configured for a specific data model. These instructions guide the AI system in understanding data context and generating more accurate responses. Requires `CAN_USE_SPOTTER` privilege, at least view access on the data model, and a bearer token corresponding to the org where the data model exists. #### Usage guidelines The request must include: - `data_source_identifier`: the unique ID of the data model to retrieve instructions for If the request is successful, the API returns: - `nl_instructions_info`: an array of instruction objects, each containing: - `instructions`: the configured text instructions for AI processing - `scope`: the scope of the instruction — currently only `GLOBAL` is supported #### Instructions scope - **GLOBAL**: Instructions that apply globally across the system on the given data-model (currently only global instructions are supported) #### Error responses | Code | Description | |------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| | 401 | Unauthorized — authentication token is missing, expired, or invalid. | | 403 | Forbidden — the authenticated user does not have `CAN_USE_SPOTTER` privilege, lacks view access on the data model, or the bearer token does not correspond to the org where the data model exists. | > ###### Note: > > - To use this API, the user needs at least view access on the data model, and must use the bearer token corresponding to the org where the data model exists. > - This endpoint is currently in Beta. Breaking changes may be introduced before the endpoint is made Generally Available. > - Available from version 10.15.0.cl and later. > - This endpoint requires Spotter — please contact ThoughtSpot Support to enable Spotter on your cluster. > - Use this API to review currently configured instructions before modifying them with `setNLInstructions`. + * @param getNLInstructionsRequest + */ + getNLInstructions(getNLInstructionsRequest, _options) { + const result = this.api.getNLInstructions(getNLInstructionsRequest, _options); + return result.toPromise(); + } + /** + * Version: 9.0.0.cl or later Generates an authentication token that provides access to a specific metadata object. This object list is intersected with the list of objects the user is allowed to access via group membership. For more information, see [Object security](https://docs.thoughtspot.com/cloud/latest/security-data-object#object_security). #### Usage guidelines You can generate a token for a user by providing a `username` and `password`, or by using the `secret_key` generated for your instance. To generate a `secret_key`, the administrator must enable [Trusted authentication](https://developers.thoughtspot.com/docs/trusted-auth-secret-key) in the **Develop** > **Customizations** > **Security Settings** page. **Note**: * When both `password` and `secret_key` are included in the API request, `password` takes precedence. * If [Multi-Factor Authentication (MFA)](https://docs.thoughtspot.com/cloud/latest/authentication-local-mfa) is enabled on your instance, the API login request with `username` and `password` returns an error. You can switch to token-based authentication with `secret_key` or contact ThoughtSpot Support for assistance. The token obtained from ThoughtSpot is valid for 5 minutes by default. You can configure the token expiration time as required. #### Just-in-time provisioning For [just-in-time user creation and provisioning](https://developers.thoughtspot.com/docs/just-in-time-provisioning), specify the following attributes in the API request: * `auto_create` * `username` * `display_name` * `email` * `group_identifiers` Set `auto_create` to `true` if the user is not available in ThoughtSpot. If the user already exists in ThoughtSpot and the `auto_create` parameter is set to `true`, user properties such as display name, email, and group assignment will be updated. To add a new user and assign privileges, the `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege is required. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled, the `CONTROL_TRUSTED_AUTH`(**Can Enable or Disable Trusted Authentication**) privilege is required. #### Important point to note All options in the token creation APIs that define user access to data in ThoughtSpot will take effect during token creation, not when the token is used for authentication. For example, `auto_create:true` will create the user when the authentication token is created. + * @param getObjectAccessTokenRequest + */ + getObjectAccessToken(getObjectAccessTokenRequest, _options) { + const result = this.api.getObjectAccessToken(getObjectAccessTokenRequest, _options); + return result.toPromise(); + } + /** + * Version: 10.13.0.cl or later Breaks down a natural language query into a series of smaller analytical sub-questions, each mapped to a relevant data source. Requires `CAN_USE_SPOTTER` privilege and at least view-level access to the referenced metadata objects. #### Usage guidelines The request must include: - `query`: the natural language question to decompose into analytical sub-questions - `metadata_context`: at least one of the following context identifiers to guide question generation: - `conversation_identifier` — an existing conversation session ID - `answer_identifiers` — a list of Answer GUIDs - `liveboard_identifiers` — a list of Liveboard GUIDs - `data_source_identifiers` — a list of data source GUIDs Optional parameters for refining the output: - `ai_context`: additional context to improve response quality - `content` — supplementary text or CSV data as string input - `instructions` — custom text instructions for the AI system - `limit_relevant_questions`: maximum number of questions to return (default: `5`) - `bypass_cache`: if `true`, forces fresh computation instead of returning cached results If the request is successful, the API returns a list of relevant analytical questions, each containing: - `query`: the generated sub-question - `data_source_identifier`: the unique ID of the data source the question targets - `data_source_name`: the display name of the corresponding data source #### Error responses | Code | Description | |------|---------------------------------------------------------------------------------------------------------------------------------------| | 401 | Unauthorized — authentication token is missing, expired, or invalid. | | 403 | Forbidden — the authenticated user does not have `CAN_USE_SPOTTER` privilege or lacks view access to the referenced metadata objects. | > ###### Note: > * This endpoint is currently in Beta. Breaking changes may be introduced before the endpoint is made Generally Available. > * This endpoint requires Spotter - please contact ThoughtSpot support to enable Spotter on your cluster. + * @param getRelevantQuestionsRequest + */ + getRelevantQuestions(getRelevantQuestionsRequest, _options) { + const result = this.api.getRelevantQuestions(getRelevantQuestionsRequest, _options); + return result.toPromise(); + } + /** + * Version: 9.0.0.cl or later Retrieves the current configuration details of the cluster. If the request is successful, the API returns a list configuration settings applied on the cluster. Requires `ADMINISTRATION`(**Can administer ThoughtSpot**) privilege to view these complete configuration settings of the cluster. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `SYSTEM_INFO_ADMINISTRATION` (**Can view system activities**) privilege is required. This API does not require any parameters to be passed in the request. + */ + getSystemConfig(_options) { + const result = this.api.getSystemConfig(_options); + return result.toPromise(); + } + /** + * Version: 9.0.0.cl or later Gets system information such as the release version, locale, time zone, deployment environment, date format, and date time format of the cluster. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privileges. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `SYSTEM_INFO_ADMINISTRATION` (**Can view system activities**) privilege is required. This API does not require any parameters to be passed in the request. + */ + getSystemInformation(_options) { + const result = this.api.getSystemInformation(_options); + return result.toPromise(); + } + /** + * Version: 9.2.0.cl or later Gets a list of configuration overrides applied on the cluster. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `APPLICATION_ADMINISTRATION` (**Can manage application settings**) privilege is required. This API does not require any parameters to be passed in the request. + */ + getSystemOverrideInfo(_options) { + const result = this.api.getSystemOverrideInfo(_options); + return result.toPromise(); + } + /** + * Version: 9.0.0.cl or later Imports [TML](https://docs.thoughtspot.com/cloud/latest/tml) files into ThoughtSpot. Requires `DATAMANAGEMENT` (**Can manage data**) or `ADMINISTRATION` (**Can administer ThoughtsSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the following Data control privileges may be required: - `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) - `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` (**Can manage data models**) #### Usage guidelines * Import all related objects in a single TML Import API call. For example, Tables that use the same Connection object and Worksheets connected to these Tables. * Include the `fqn` property to distinguish objects that have the same name. For example, if you have multiple Connections or Worksheets with the same name on ThoughtSpot and the Connection or Worksheet referenced in your TML file does not have a unique name to distinguish, it may result in invalid object references. Adding `fqn` helps ThoughtSpot differentiate a Table from another with the same name. We recommend [exporting TML with FQNs](#/http/api-endpoints/metadata/export-metadata-tml) and using these during the import operation. * You can upload multiple TML files at a time. If you import a Worksheet along with Liveboards, Answers, and other dependent objects in a single API call, the imported objects will be immediately available for use. When you import only a Worksheet object, it may take some time for the Worksheet to become available in the ThoughtSpot system. Please wait for a few minutes, and then proceed to create an Answer and Liveboard from the newly imported Worksheet. For more information, see [TML Documentation](https://developers.thoughtspot.com/docs/tml#_import_a_tml). + * @param importMetadataTMLRequest + */ + importMetadataTML(importMetadataTMLRequest, _options) { + const result = this.api.importMetadataTML(importMetadataTMLRequest, _options); + return result.toPromise(); + } + /** + * Version: 10.4.0.cl or later Schedules a task to import [TML](https://docs.thoughtspot.com/cloud/latest/tml) files into ThoughtSpot. You can use this API endpoint to process TML objects asynchronously when importing TMLs of large and complex metadata objects into ThoughtSpot. Unlike the synchronous import TML operation, the API processes TML data in the background and returns a task ID, which can be used to check the status of the import task via `/api/rest/2.0/metadata/tml/async/status` API endpoint. Requires `DATAMANAGEMENT` (**Can manage data**) or `ADMINISTRATION` (**Can administer ThoughtsSpot**) privilege, and edit access to the TML objects. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the following Data control privileges may be required: - `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) - `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` (**Can manage data models**) #### Usage guidelines See [Async TML API Documentation](https://developers.thoughtspot.com/docs/tml#_import_tml_objects_asynchronously) for usage guidelines. + * @param importMetadataTMLAsyncRequest + */ + importMetadataTMLAsync(importMetadataTMLAsyncRequest, _options) { + const result = this.api.importMetadataTMLAsync(importMetadataTMLAsyncRequest, _options); + return result.toPromise(); + } + /** + * Version: 9.0.0.cl or later Imports group objects from external databases into ThoughtSpot. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `GROUP_ADMINISTRATION` (**Can manage groups**) privilege is required. During the import operation: * If the specified group is not available in ThoughtSpot, it will be added to ThoughtSpot. * If `delete_unspecified_groups` is set to `true`, the groups not specified in the API request, excluding administrator and system user groups, are deleted. * If the specified groups are already available in ThoughtSpot, the object properties of these groups are modified and synchronized as per the input data in the API request. A successful API call returns the object that represents the changes made in the ThoughtSpot system. + * @param importUserGroupsRequest + */ + importUserGroups(importUserGroupsRequest, _options) { + const result = this.api.importUserGroups(importUserGroupsRequest, _options); + return result.toPromise(); + } + /** + * Version: 9.0.0.cl or later Imports user data from external databases into ThoughtSpot. During the user import operation: * If the specified users are not available in ThoughtSpot, the users are created and assigned a default password. Defining a `default_password` in the API request is optional. * If `delete_unspecified_users` is set to `true`, the users not specified in the API request, excluding the `tsadmin`, `guest`, `system` and `su` users, are deleted. * If the specified user objects are already available in ThoughtSpot, the object properties are updated and synchronized as per the input data in the API request. A successful API call returns the object that represents the changes made in the ThoughtSpot system. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `USER_ADMINISTRATION` (**Can manage users**) privilege is required. + * @param importUsersRequest + */ + importUsers(importUsersRequest, _options) { + const result = this.api.importUsers(importUsersRequest, _options); + return result.toPromise(); + } + /** + * Version: 9.0.0.cl or later Creates a login session for a ThoughtSpot user with Basic authentication. In Basic authentication method, REST clients log in to ThoughtSpot using `username` and `password` attributes. On a multi-tenant cluster with Orgs, users can pass the ID of the Org in the API request to log in to a specific Org context. **Note**: If Multi-Factor Authentication (MFA) is enabled on your instance, the API login request with basic authentication (`username` and `password` ) returns an error. Contact ThoughtSpot Support for assistance. A successful login returns a session cookie that can be used in your subsequent API requests. + * @param loginRequest + */ + login(loginRequest, _options) { + const result = this.api.login(loginRequest, _options); + return result.toPromise(); + } + /** + * Version: 9.0.0.cl or later Logs out a user from their current session. + */ + logout(_options) { + const result = this.api.logout(_options); + return result.toPromise(); + } + /** + * Version: 26.3.0.cl or later This API allows the addition or deletion of object level privileges for a set of users and groups, on a set of metadata objects. It provides users to access certain features based on privilege based access control. #### Usage guidelines - Specify the `operation`. The supported operations are: `ADD`, `REMOVE`. - Specify the type of the objects on which the object privileges are being provided in `metadata_type`. Only `LOGICAL_TABLE` metadata type is supported for now. It may be extended for other metadata types in future. - Specify the list of object privilege types in the `object_privilege_types` array. The supported object privilege types are: `SPOTTER_COACHING_PRIVILEGE`. - Specify the identifiers (either GUID or name) for the metadata objects in the `metadata_identifiers` array. - Specify the `type` (`USER` or `USER_GROUP`) and `identifier` (either GUID or name) of the principals to which you want to apply the given operation and given object privileges in the `principals` array. - Ensure using correct Authorization Bearer Token corresponding to specific user & org. #### Example request ```json { \"operation\": \"operation-type\", \"metadata_type\": \"metadata-type\", \"object_privilege_types\": [\"privilege-type-1\", \"privilege-type-2\"], \"metadata_identifiers\": [\"metadata-guid-or-name-1\", \"metadata-guid-or-name-1\"], \"principals\": [ { \"type\": \"type-1\", \"identifier\": \"principal-guid-or-name-1\" }, { \"type\": \"type-2\", \"identifier\": \"principal-guid-or-name-2\" } ] } ``` > ###### Note: > * Only admin users, users with edit access and users with coaching privilege on a given data-model can add or remove principals related to SPOTTER_COACHING_PRIVILEGE + * @param manageObjectPrivilegeRequest + */ + manageObjectPrivilege(manageObjectPrivilegeRequest, _options) { + const result = this.api.manageObjectPrivilege(manageObjectPrivilegeRequest, _options); + return result.toPromise(); + } + /** + * Parameterize fields in metadata objects. Version: 10.9.0.cl or later **Note:** This API endpoint is deprecated and will be removed from ThoughtSpot in a future release. Use [POST /api/rest/2.0/metadata/parameterize-fields](/api/rest/2.0/metadata/parameterize-fields) instead. Allows parameterizing fields in metadata objects in ThoughtSpot. Requires appropriate permissions to modify the metadata object. The API endpoint allows parameterizing the following types of metadata objects: * Logical Tables * Connections * Connection Configs For a Logical Table the field type must be `ATTRIBUTE` and field name can be one of: * databaseName * schemaName * tableName For a Connection or Connection Config, the field type is always `CONNECTION_PROPERTY`. In this case, field_name specifies the exact property of the Connection or Connection Config that needs to be parameterized. For Connection Config, the only supported field name is: * impersonate_user + * @param parameterizeMetadataRequest + */ + parameterizeMetadata(parameterizeMetadataRequest, _options) { + const result = this.api.parameterizeMetadata(parameterizeMetadataRequest, _options); + return result.toPromise(); + } + /** + * Parameterize multiple fields of metadata objects. For example [schemaName, databaseName] for LOGICAL_TABLE. Version: 26.5.0.cl or later Allows parameterizing multiple fields of metadata objects in ThoughtSpot. For example, you can parameterize [schemaName, databaseName] for LOGICAL_TABLE. Requires appropriate permissions to modify the metadata object. The API endpoint allows parameterizing the following types of metadata objects: * Logical Tables * Connections * Connection Configs For a Logical Table, the field type must be `ATTRIBUTE` and field names can include: * databaseName * schemaName * tableName For a Connection or Connection Config, the field type is always `CONNECTION_PROPERTY`. In this case, field_names specifies the exact properties of the Connection or Connection Config that need to be parameterized. For Connection Config, supported field names include: * impersonate_user You can parameterize multiple fields at once by providing an array of field names. + * @param parameterizeMetadataFieldsRequest + */ + parameterizeMetadataFields(parameterizeMetadataFieldsRequest, _options) { + const result = this.api.parameterizeMetadataFields(parameterizeMetadataFieldsRequest, _options); + return result.toPromise(); + } + /** + * Version: 26.5.0.cl or later Allows publishing metadata objects across organizations in ThoughtSpot. Requires ADMINISTRATION role and TENANT scope. The API endpoint allows publishing the following types of metadata objects: * Liveboards * Answers * Logical Tables This API will essentially share the objects along with it\'s dependencies to the org admins of the orgs to which it is being published. + * @param publishMetadataRequest + */ + publishMetadata(publishMetadataRequest, _options) { + const result = this.api.publishMetadata(publishMetadataRequest, _options); + return result.toPromise(); + } + /** + * Update values for a variable Version: 26.4.0.cl or later Allows updating values for a specific variable in ThoughtSpot. Requires ADMINISTRATION role. The CAN_MANAGE_VARIABLES permission allows you to manage Formula Variables in the current organization scope. The API endpoint allows: * Adding new values to the variable * Replacing existing values * Deleting values from the variable * Resetting all values When updating variable values, you need to specify: * The variable identifier (ID or name) * The values to add/replace/remove * The operation to perform (ADD, REPLACE, REMOVE, RESET) Behaviour based on operation type: * ADD - Adds values to the variable if this is a list type variable, else same as replace. * REPLACE - Replaces all values of a given set of constraints with the current set of values. * REMOVE - Removes any values which match the set of conditions of the variables if this is a list type variable, else clears value. * RESET - Removes all constraints for the given variable, scope is ignored + * @param identifier Unique ID or name of the variable + * @param putVariableValuesRequest + */ + putVariableValues(identifier, putVariableValuesRequest, _options) { + const result = this.api.putVariableValues(identifier, putVariableValuesRequest, _options); + return result.toPromise(); + } + /** + * Version: 10.7.0.cl or later **Deprecated** — Use `getRelevantQuestions` instead (available from 10.13.0.cl). Breaks down a topical or goal-oriented natural language question into smaller, actionable analytical sub-questions, each mapped to a relevant data source for independent execution. Requires `CAN_USE_SPOTTER` privilege and at least view-level access to the referenced metadata objects. #### Usage guidelines The request accepts the following parameters: - `nlsRequest`: contains the user `query` to decompose, along with optional `instructions` and `bypassCache` flag - `worksheetIds`: list of data source identifiers to scope the decomposition - `answerIds`: list of Answer GUIDs whose data guides the response - `liveboardIds`: list of Liveboard GUIDs whose data guides the response - `conversationId`: an existing conversation session ID for context continuity - `content`: supplementary text or CSV data to improve response quality - `maxDecomposedQueries`: maximum number of sub-questions to return (default: `5`) If the request is successful, the API returns a `decomposedQueryResponse` containing a list of `decomposedQueries`, each with: - `query`: the generated analytical sub-question - `worksheetId`: the unique ID of the data source the question targets - `worksheetName`: the display name of the corresponding data source #### Error responses | Code | Description | |------|---------------------------------------------------------------------------------------------------------------------------------------| | 401 | Unauthorized — authentication token is missing, expired, or invalid. | | 403 | Forbidden — the authenticated user does not have `CAN_USE_SPOTTER` privilege or lacks view access to the referenced metadata objects. | > ###### Note: > * This endpoint is deprecated since 10.13.0.cl. Use `getRelevantQuestions` for new integrations. > * This endpoint is currently in Beta. Breaking changes may be introduced before the endpoint is made Generally Available. > * This endpoint requires Spotter — please contact ThoughtSpot support to enable Spotter on your cluster. + * @param queryGetDecomposedQueryRequest + */ + queryGetDecomposedQuery(queryGetDecomposedQueryRequest, _options) { + const result = this.api.queryGetDecomposedQuery(queryGetDecomposedQueryRequest, _options); + return result.toPromise(); + } + /** + * Version: 9.0.0.cl or later Resets the password of a user account. Administrators can reset password on behalf of a user. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `USER_ADMINISTRATION` (**Can manage users**) privilege is required. + * @param resetUserPasswordRequest + */ + resetUserPassword(resetUserPasswordRequest, _options) { + const result = this.api.resetUserPassword(resetUserPasswordRequest, _options); + return result.toPromise(); + } + /** + * Version: 9.2.0.cl or later Reverts TML objects to a previous commit specified in the API request. Requires at least edit access to objects. In the API request, specify the `commit_id`. If the branch name is not specified in the request, the API will consider the default branch configured on your instance. By default, the API reverts all objects. If the revert operation fails for one of the objects provided in the commit, the API returns an error and does not revert any object. For more information, see [Git integration documentation](https://developers.thoughtspot.com/docs/git-integration). + * @param commitId Commit id to which the object should be reverted + * @param revertCommitRequest + */ + revertCommit(commitId, revertCommitRequest, _options) { + const result = this.api.revertCommit(commitId, revertCommitRequest, _options); + return result.toPromise(); + } + /** + * Version: 26.2.0.cl or later Revokes OAuth refresh tokens for users who no longer require access to a data warehouse connection. When a token is revoked, the affected user\'s session for that connection is terminated, and they must re-authenticate to regain access. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) or `DATAMANAGEMENT` (**Can manage data**) privileges. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on the ThoughtSpot instance, users with `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) privilege can also make API requests to revoke tokens for connection users. #### Usage guidelines You can specify different combinations of identifiers to control which refresh tokens are revoked. - **connection_identifier**: Revokes refresh tokens for all users of the connection, except the connection author. - **connection_identifier** and **user_identifiers**: Revokes refresh tokens only for the users specified in the request. If the name or ID of the connection author is included in the request, their token will also be revoked. - **connection_identifier** and **configuration_identifiers**: Revokes refresh tokens for all users on the specified configurations, except the configuration author. - **connection_identifier**, **configuration_identifiers**, and **user_identifiers**: Revokes refresh tokens for the specified users on the specified configurations. - **connection_identifier** and **org_identifiers**: Revokes refresh tokens for the specified Orgs. Applicable only for published connections. - **connection_identifier**, **org_identifiers**, and **user_identifiers**: Revokes refresh tokens for the specified users in the specified Orgs. Applicable only for published connections. **NOTE**: The `org_identifiers` parameter is only applicable for published connections. Using this parameter for unpublished connections will result in an error. Ensure that the connections are published before making the API request. + * @param connectionIdentifier Unique ID or name of the connection whose refresh tokens need to be revoked. All the users associated with the connection will have their refresh tokens revoked except the author. + * @param revokeRefreshTokensRequest + */ + revokeRefreshTokens(connectionIdentifier, revokeRefreshTokensRequest, _options) { + const result = this.api.revokeRefreshTokens(connectionIdentifier, revokeRefreshTokensRequest, _options); + return result.toPromise(); + } + /** + * Version: 9.0.0.cl or later Revokes the authentication token issued for current user session. The token of your current session expires when you make a call to the `/api/rest/2.0/auth/token/revoke` endpoint. the users will not be able to access ThoughtSpot objects until a new token is obtained. To restart your session, request for a new token from ThoughtSpot. See [Get Full Access Token](#/http/api-endpoints/authentication/get-full-access-token). + * @param revokeTokenRequest + */ + revokeToken(revokeTokenRequest, _options) { + const result = this.api.revokeToken(revokeTokenRequest, _options); + return result.toPromise(); + } + /** + * Version: 26.6.0.cl or later Returns the authentication configuration for the specified auth type at cluster and org level. Currently supports `TRUSTED_AUTH`. #### Required privileges Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) or `CONTROL_TRUSTED_AUTH` (**Can Enable or Disable Trusted Authentication**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled, the `CONTROL_TRUSTED_AUTH` privilege is required. #### Usage guidelines Use `scope` to control which level of settings are returned: - `CLUSTER` — Returns cluster-level authentication status and access tokens. Accessible only from the Primary Org. - `ORG` — Returns org-level authentication status and access tokens for the current Org. Requires the per-Org authentication feature to be enabled on your instance. - If `scope` is omitted, both cluster and org-level settings are returned based on the caller\'s org context and feature availability. The `access_tokens` array in `cluster_preferences` or `org_preferences` is omitted when no token is configured at that level. **Note**: Access tokens returned in the response are sensitive credentials. Treat them with the same care as passwords. + * @param searchAuthSettingsRequest + */ + searchAuthSettings(searchAuthSettingsRequest, _options) { + const result = this.api.searchAuthSettings(searchAuthSettingsRequest, _options); + return result.toPromise(); + } + /** + * Version: 10.12.0.cl or later Gets a list of [custom calendars](https://docs.thoughtspot.com/cloud/latest/connections-cust-cal). Requires `DATAMANAGEMENT` (**Can manage data**) or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your ThoughtSpot instance, the `CAN_MANAGE_CUSTOM_CALENDAR` (**Can manage custom calendars**) privilege is required. #### Usage guidelines By default, the API returns a list of custom calendars for all connection objects. To retrieve custom calendar details for a particular connection, specify the connection ID. You can also use other search parameters such as `name_pattern` and `sort_options` as search filters. The `name_pattern` parameter filters and returns only those objects that match the specified pattern. Use `%` as a wildcard for pattern matching. + * @param searchCalendarsRequest + */ + searchCalendars(searchCalendarsRequest, _options) { + const result = this.api.searchCalendars(searchCalendarsRequest, _options); + return result.toPromise(); + } + /** + * Version: 26.4.0.cl or later Searches delivery history for communication channels such as webhooks. Returns channel-level delivery status for each job execution record. Use this to monitor channel health and delivery success rates across events. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) or `DEVELOPER` (**Has developer privilege**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, users with `CAN_MANAGE_WEBHOOKS` (**Can manage webhooks**) privilege are also authorized to perform this action. **NOTE**: When `channel_type` is `WEBHOOK`, the following constraints apply: - `job_ids`, `channel_identifiers`, and `events` each accept at most one element. - When `job_ids` is provided, it is used as the sole lookup key and other filter fields are ignored. - When `job_ids` is not provided, `channel_identifiers` and `events` are both required, each containing exactly one element. - Records older than the configured retention period are not returned. - Use `start_epoch_time_in_millis` and/or `end_epoch_time_in_millis` to narrow results to a specific time window. + * @param searchChannelHistoryRequest + */ + searchChannelHistory(searchChannelHistoryRequest, _options) { + const result = this.api.searchChannelHistory(searchChannelHistoryRequest, _options); + return result.toPromise(); + } + /** + * Version: 26.4.0.cl or later Gets a list of collections available in ThoughtSpot. To get details of a specific collection, specify the collection GUID or name. You can also filter the API response based on the collection name pattern, author, and other criteria. #### Search options * **name_pattern**: Use \'%\' as a wildcard character to match collection names * **collection_identifiers**: Search for specific collections by their GUIDs or names * **include_metadata**: When set to `true`, includes the metadata objects within each collection in the response **NOTE**: If the API returns an empty list, consider increasing the value of the `record_size` parameter. To search across all available collections, set `record_size` to `-1`. + * @param searchCollectionsRequest + */ + searchCollections(searchCollectionsRequest, _options) { + const result = this.api.searchCollections(searchCollectionsRequest, _options); + return result.toPromise(); + } + /** + * Version: 9.2.0.cl or later Gets a list of commits for a given metadata object. Requires `DATAMANAGEMENT` (**Can manage data**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance on your instance, the `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` (**Can manage data models**) privilege and edit access to the metadata objects. + * @param searchCommitsRequest + */ + searchCommits(searchCommitsRequest, _options) { + const result = this.api.searchCommits(searchCommitsRequest, _options); + return result.toPromise(); + } + /** + * Version: 10.14.0.cl or later Fetch communication channel preferences. - Use `cluster_preferences` to fetch the default preferences for your ThoughtSpot application instance. - If your instance has [Orgs](https://docs.thoughtspot.com/cloud/latest/orgs-overview), use `org_preferences` to fetch any Org-specific preferences that override the defaults. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) or `DEVELOPER` (**Has developer privilege**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, users with `APPLICATION_ADMINISTRATION` (**Can manage application settings**) privilege are also authorized to perform this action. + * @param searchCommunicationChannelPreferencesRequest + */ + searchCommunicationChannelPreferences(searchCommunicationChannelPreferencesRequest, _options) { + const result = this.api.searchCommunicationChannelPreferences(searchCommunicationChannelPreferencesRequest, _options); + return result.toPromise(); + } + /** + * Version: 9.2.0.cl or later Gets Git repository connections configured on the ThoughtSpot instance. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance on your instance, the `CAN_SETUP_VERSION_CONTROL` (**Can set up version control**) privilege. + * @param searchConfigRequest + */ + searchConfig(searchConfigRequest, _options) { + const result = this.api.searchConfig(searchConfigRequest, _options); + return result.toPromise(); + } + /** + * Version: 9.2.0.cl or later Gets connection objects. Requires `DATAMANAGEMENT` (**Can manage data**) or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) privilege is required. - To get a list of all connections available in the ThoughtSpot system, send the API request without any attributes in the request body. - To get the connection objects for a specific type of data warehouse, specify the type in `data_warehouse_types`. - To fetch details of a connection object, specify the connection object GUID or name. The `name_pattern` attribute allows passing partial text with `%` for a wildcard match. - To get details of the database, schemas, tables, or columns from a data connection object, specify `data_warehouse_object_type`. - To get a specific database, schema, table, or column from a connection object, define the object type in `data_warehouse_object_type` and object properties in the `data_warehouse_objects` array. For example, to search for a column, you must pass the database, schema, and table names in the API request. Note that in the following example, object properties are set in a hierarchical order (`database` > `schema` > `table` > `column`). ``` { \"connections\": [ { \"identifier\": \"b9d1f2ef-fa65-4a4b-994e-30fa2d57b0c2\", \"data_warehouse_objects\": [ { \"database\": \"NEBULADEV\", \"schema\": \"INFORMATION_SCHEMA\", \"table\": \"APPLICABLE_ROLES\", \"column\": \"ROLE_NAME\" } ] } ], \"data_warehouse_object_type\": \"COLUMN\" } ``` - To fetch data by `configuration`, specify `data_warehouse_object_type`. For example, to fetch columns from the `DEVELOPMENT` database, specify the `data_warehouse_object_type` as `DATABASE` and define the `configuration` string as `{\"database\":\"DEVELOPMENT\"}`. To get column data for a specific table, specify the table, for example,`{\"database\":\"RETAILAPPAREL\",\"table\":\"PIPES\"}`. - To query connections by `authentication_type`, specify `data_warehouse_object_type`. Supported values for `authentication_type` are: - `SERVICE_ACCOUNT`: For connections that require service account credentials to authenticate to the Cloud Data Warehouse and fetch data. - `OAUTH`: For connections that require OAuth credentials to authenticate to the Cloud Data Warehouse and fetch data. Teradata, Oracle, and Presto Cloud Data Warehouses do not support the OAuth authentication type. - `IAM`: For connections that have the IAM OAuth set up. This authentication type is supported on Amazon Redshift connections only. - `EXTOAUTH`: For connections that have External OAuth set up. ThoughtSpot supports external [OAuth with Microsoft Azure Active Directory (AD)](https://docs.thoughtspot.com/cloud/latest/ connections-snowflake-azure-ad-oauth) and [Okta for Snowflake data connections](https://docs.thoughtspot.com/cloud/latest/connections-snowflake-okta-oauth). - `KEY_PAIR`: For connections that require Key Pair account credentials to authenticate to the Cloud Data Warehouse and fetch data. This authentication type is supported on Snowflake connections only. - `OAUTH_WITH_PKCE`: For connections that require OAuth with PKCE account credentials to authenticate to the Cloud Data Warehouse and fetch data. This authentication type is supported on Snowflake, Starburst, Databricks, Denodo connections only. - `EXTOAUTH_WITH_PKCE`: For connections that require External OAuth With PKCE account credentials to authenticate to the Cloud Data Warehouse and fetch data. This authentication type is supported on Snowflake connections only. - `OAUTH_WITH_PEZ`: For connections that require OAuth With PEZ account credentials to authenticate to the Cloud Data Warehouse and fetch data. This authentication type is supported on Amazon Redshift connections only. - `OAUTH_WITH_SERVICE_PRINCIPAL`: For connections that require OAuth With Service Principal account credentials to authenticate to the Cloud Data Warehouse and fetch data. This authentication type is supported on Databricks connections only. - `PERSONAL_ACCESS_TOKEN`: For connections that require Personal Access Token account credentials to authenticate to the Cloud Data Warehouse and fetch data. This authentication type is supported on Databricks connections only. - `OAUTH_CLIENT_CREDENTIALS`: For connections that require OAuth Client Credentials to authenticate to the Cloud Data Warehouse and fetch data. This authentication type is supported on Snowflake connections only. - To include more details about connection objects in the API response, set `include_details` to `true`. - You can also sort the output by field names and filter connections by tags. **NOTE**: When filtering connection records by parameters other than `data_warehouse_types` or `tag_identifiers`, ensure that you set `record_size` to `-1` and `record_offset` to `0` for precise results. + * @param searchConnectionRequest + */ + searchConnection(searchConnectionRequest, _options) { + const result = this.api.searchConnection(searchConnectionRequest, _options); + return result.toPromise(); + } + /** + * Version: 9.6.0.cl or later Gets custom actions configured on the cluster. Requires `DEVELOPER` (**Has Developer privilege**) or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `DEVELOPER` (**Has developer privilege**) privilege is required. + * @param searchCustomActionsRequest + */ + searchCustomActions(searchCustomActionsRequest, _options) { + const result = this.api.searchCustomActions(searchCustomActionsRequest, _options); + return result.toPromise(); + } + /** + * Version: 9.0.0.cl or later Generates an Answer from a given data source. Requires at least view access to the data source object (Worksheet or View). #### Usage guidelines To search data, specify the data source GUID in `logical_table_identifier`. The data source can be a Worksheet, View, Table, or SQL view. Pass search tokens in the `query_string` attribute in the API request as shown in the following example: ``` { \"query_string\": \"[sales] by [store]\", \"logical_table_identifier\": \"cd252e5c-b552-49a8-821d-3eadaa049cca\", } ``` For more information about the `query_string` format and data source attribute, see [Search data API](https://developers.thoughtspot.com/docs/fetch-data-and-report-apis#_search_data_api). The `record_size` attribute determines the number of records to retrieve in an API call. For more information about pagination, record size, and maximum row limit, see [Pagination and record size settings](https://developers.thoughtspot.com/docs/fetch-data-and-report-apis#_pagination_settings_for_data_and_report_api). + * @param searchDataRequest + */ + searchData(searchDataRequest, _options) { + const result = this.api.searchData(searchDataRequest, _options); + return result.toPromise(); + } + /** + * Version: 10.10.0.cl or later Search the email customization configuration if any set for the ThoughtSpot system. #### Pre-requisites Requires `DEVELOPER` (**has developer privilege**) or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `DEVELOPER` (**Has developer privilege**) privilege is required. **NOTE**:This endpoint in currently in beta. Contact ThoughtSpot support to enable this on your instance. + * @param searchEmailCustomizationRequest + */ + searchEmailCustomization(searchEmailCustomizationRequest, _options) { + const result = this.api.searchEmailCustomization(searchEmailCustomizationRequest, _options); + return result.toPromise(); + } + /** + * Version: 9.0.0.cl or later Gets a list of metadata objects available on the ThoughtSpot system. This API endpoint is available to all users who have view access to the object. Users with `ADMINISTRATION` (**Can administer ThoughtSpot**) privileges can view data for all metadata objects, including users and groups. #### Usage guidelines - To get all metadata objects, send the API request without any attributes. - To get metadata objects of a specific type, set the `type` attribute. For example, to fetch a Worksheet, set the type as `LOGICAL_TABLE`. - To filter metadata objects within type `LOGICAL_TABLE`, set the `subtypes` attribute. For example, to fetch a Worksheet, set the type as `LOGICAL_TABLE` & subtypes as `[WORKSHEET]`. - To get a specific metadata object, specify the GUID. - To customize your search and filter the API response, you can use several parameters. You can search for objects created or modified by specific users, by tags applied to the objects, or by using the include parameters like `include_auto_created_objects`, `include_dependent_objects`, `include_headers`, `include_incomplete_objects`, and so on. You can also define sorting options to sort the data retrieved in the API response. - To get discoverable objects when linientmodel is enabled you can use `include_discoverable_objects` as true else false. Default value is true. - For liveboard metadata type, to get the newer format, set the `liveboard_response_format` as V2. Default value is V1. - To retrieve only objects that are published, set the `include_only_published_objects` as true. Default value is false. **NOTE**: The following parameters support pagination of metadata records: - `tag_identifiers` - `type` - `subtypes` - `created_by_user_identifiers` - `modified_by_user_identifiers` - `owned_by_user_identifiers` - `exclude_objects` - `include_auto_created_objects` - `favorite_object_options` - `include_only_published_objects` If you are using other parameters to search metadata, set `record_size` to `-1` and `record_offset` to `0`. + * @param searchMetadataRequest + */ + searchMetadata(searchMetadataRequest, _options) { + const result = this.api.searchMetadata(searchMetadataRequest, _options); + return result.toPromise(); + } + /** + * Version: 9.0.0.cl or later Gets a list of Orgs configured on the ThoughtSpot system. To get details of a specific Org, specify the Org ID or name. You can also pass parameters such as status, visibility, and user identifiers to get a specific list of Orgs. Requires cluster administration (**Can administer Org**) privileges. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `ORG_ADMINISTRATION` (**Can manage Orgs**) privilege is required. + * @param searchOrgsRequest + */ + searchOrgs(searchOrgsRequest, _options) { + const result = this.api.searchOrgs(searchOrgsRequest, _options); + return result.toPromise(); + } + /** + * Version: 9.5.0.cl or later Gets a list of Role objects from the ThoughtSpot system. Available if [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance. To search for Roles, the `ROLE_ADMINISTRATION` (**Can manage roles**) privilege is required. To get details of a specific Role object, specify the GUID or name. You can also filter the API response based on user group and Org identifiers, privileges assigned to the Role, and deprecation status. + * @param searchRolesRequest + */ + searchRoles(searchRolesRequest, _options) { + const result = this.api.searchRoles(searchRolesRequest, _options); + return result.toPromise(); + } + /** + * Search Schedules Version: 9.4.0.cl or later Gets a list of scheduled jobs configured for a Liveboard. To get details of a specific scheduled job, specify the name or GUID of the scheduled job. Requires at least view access to Liveboards. **NOTE**: When filtering schedules by parameters other than `metadata`, set `record_size` to `-1` and `record_offset` to `0` for accurate results. + * @param searchSchedulesRequest + */ + searchSchedules(searchSchedulesRequest, _options) { + const result = this.api.searchSchedules(searchSchedulesRequest, _options); + return result.toPromise(); + } + /** + * Version: 26.2.0.cl or later Fetch security settings for your ThoughtSpot application instance. - Use `scope: CLUSTER` to retrieve cluster-level security settings, including CORS and CSP allowlists, SAML redirect URLs, and settings that control access to non-embedded pages. - Use `scope: ORG` to retrieve Org-level security settings. If your instance has [Orgs](https://docs.thoughtspot.com/cloud/latest/orgs-overview), this returns CORS and non-embed access settings specific to the Org. - If `scope` is not specified, returns both cluster and Org-specific settings based on user privileges. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) or `DEVELOPER` (**Has developer privilege**) privilege. See [Security Settings](https://developers.thoughtspot.com/docs/security-settings) for more details. + * @param searchSecuritySettingsRequest + */ + searchSecuritySettings(searchSecuritySettingsRequest, _options) { + const result = this.api.searchSecuritySettings(searchSecuritySettingsRequest, _options); + return result.toPromise(); + } + /** + * Version: 9.0.0.cl or later Gets a list of tag objects available on the ThoughtSpot system. To get details of a specific tag object, specify the GUID or name. Any authenticated user can search for tag objects. + * @param searchTagsRequest + */ + searchTags(searchTagsRequest, _options) { + const result = this.api.searchTags(searchTagsRequest, _options); + return result.toPromise(); + } + /** + * Version: 9.0.0.cl or later Gets a list of user group objects from the ThoughtSpot system. To get details of a specific user group, specify the user group GUID or name. You can also filter the API response based on User ID, Org ID, Role ID, type of group, sharing visibility, privileges assigned to the group, and the Liveboard IDs assigned to the users in the group. Available to all users. Users with `ADMINISTRATION` (**Can administer ThoughtSpot**) privileges can view all users properties. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `GROUP_ADMINISTRATION` (**Can manage groups**) privilege is required. **NOTE**: If you do not get precise results, try setting `record_size` to `-1` and `record_offset` to `0`. + * @param searchUserGroupsRequest + */ + searchUserGroups(searchUserGroupsRequest, _options) { + const result = this.api.searchUserGroups(searchUserGroupsRequest, _options); + return result.toPromise(); + } + /** + * Version: 9.0.0.cl or later Gets a list of users available on the ThoughtSpot system. To get details of a specific user, specify the user GUID or name. You can also filter the API response based on groups, Org ID, user visibility, account status, user type, and user preference settings and favorites. Available to all users. Users with `ADMINISTRATION` (**Can administer ThoughtSpot**) privileges can view all users properties. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `USER_ADMINISTRATION` (**Can manage users**) privilege is required. **NOTE**: If the API returns an empty list, consider increasing the value of the `record_size` parameter. To search across all available users, set `record_size` to `-1`. + * @param searchUsersRequest + */ + searchUsers(searchUsersRequest, _options) { + const result = this.api.searchUsers(searchUsersRequest, _options); + return result.toPromise(); + } + /** + * Search variables Version: 26.4.0.cl or later Allows searching for variables in ThoughtSpot. Requires ADMINISTRATION role. The CAN_MANAGE_VARIABLES permission allows you to manage Formula Variables in the current organization scope. The API endpoint supports searching variables by: * Variable identifier (ID or name) * Variable type * Name pattern (case-insensitive, supports % for wildcard) The search results can be formatted in three ways: * METADATA - Returns only variable metadata (default) * METADATA_AND_VALUES - Returns variable metadata and values The values can be filtered by scope: * org_identifier * principal_identifier * model_identifier + * @param searchVariablesRequest + */ + searchVariables(searchVariablesRequest, _options) { + const result = this.api.searchVariables(searchVariablesRequest, _options); + return result.toPromise(); + } + /** + * Version: 10.14.0.cl or later Searches for webhook configurations based on various criteria such as Org, webhook identifier, event type, with support for pagination and sorting. Returns matching webhook configurations with their complete details. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) or `DEVELOPER` (**Has developer privilege**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, users with `CAN_MANAGE_WEBHOOKS` (**Can manage webhooks**) privilege are also authorized to perform this action. + * @param searchWebhookConfigurationsRequest + */ + searchWebhookConfigurations(searchWebhookConfigurationsRequest, _options) { + const result = this.api.searchWebhookConfigurations(searchWebhookConfigurationsRequest, _options); + return result.toPromise(); + } + /** + * Version: 26.5.0.cl or later Sends natural language messages to an existing Spotter agent conversation and returns the complete response synchronously. Requires `CAN_USE_SPOTTER` privilege and access to the metadata object associated with the conversation. The user must have access to the conversation session referenced by `conversation_identifier`. A conversation must first be created using the `createAgentConversation` API. #### Usage guidelines The request must include: - `conversation_identifier`: the unique session ID returned by `createAgentConversation`, used for context continuity and message tracking - `messages`: an array of one or more text messages to send to the agent The API returns an array of response objects, each containing: - `type`: the kind of response — `text`, `answer`, or `error` - `message`: the main content of the response - `metadata`: additional information depending on the message type (e.g., answer metadata includes analytics and visualization details) #### Error responses | Code | Description | |------|----------------------------------------------------------------------------------------------------------------------------------| | 401 | Unauthorized — authentication token is missing, expired, or invalid. | | 403 | Forbidden — the authenticated user does not have `CAN_USE_SPOTTER` privilege or lacks permission on the referenced conversation. | > ###### Note: > > - This endpoint is Generally Available from version 26.5.0.cl. > - This endpoint requires Spotter - please contact ThoughtSpot support to enable Spotter on your cluster. > - For real-time streamed responses, use `sendAgentConversationMessageStreaming` instead. + * @param conversationIdentifier Unique identifier for the conversation (used to track context) + * @param sendAgentConversationMessageRequest + */ + sendAgentConversationMessage(conversationIdentifier, sendAgentConversationMessageRequest, _options) { + const result = this.api.sendAgentConversationMessage(conversationIdentifier, sendAgentConversationMessageRequest, _options); + return result.toPromise(); + } + /** + * Version: 26.5.0.cl or later Sends one or more natural language messages to an existing Spotter agent conversation and returns the response as a real-time Server-Sent Events stream. Requires `CAN_USE_SPOTTER` privilege and access to the metadata object associated with the conversation. The user must have access to the conversation session referenced by `conversation_identifier`. A conversation must first be created using the `createAgentConversation` API. #### Usage guidelines The request must include: - `conversation_identifier`: the unique session ID returned by `createAgentConversation`, used for context continuity and message tracking - `messages`: an array of one or more text messages to send to the agent If the request is valid, the API returns a Server-Sent Events (SSE) stream. Each line has the form `data: [{\"type\": \"...\", ...}]` — a JSON array of event objects. Event types include: - `ack`: confirms receipt of the request (`node_id`) - `conv_title`: conversation title (`title`, `conv_id`) - `notification`: status updates on operations (`group_id`, `metadata`, `code` — e.g. `TOOL_CALL_NOTIFICATION`, `nls_start`, `FINAL_RESPONSE_NOTIFICATION`) - `text-chunk`: incremental content chunks (`id`, `group_id`, `metadata` with `format` and `type` such as `thinking` or `text`, `content`) - `text`: full text block with same structure as `text-chunk` - `answer`: structured answer with metadata (`id`, `group_id`, `metadata` with `sage_query`, `session_id`, `title`, etc., `title`) - `error`: if a failure occurs #### Error responses | Code | Description | | ---- | -------------------------------------------------------------------------------------------------------------------------------- | | 401 | Unauthorized — authentication token is missing, expired, or invalid. | | 403 | Forbidden — the authenticated user does not have `CAN_USE_SPOTTER` privilege or lacks permission on the referenced conversation. | > ###### Note: > > - This endpoint is Generally Available from version 26.5.0.cl. > - This endpoint requires Spotter - please contact ThoughtSpot support to enable Spotter on your cluster. > - The streaming protocol uses Server-Sent Events (SSE). > - For the complete response in a single payload, use `sendAgentConversationMessage` instead. + * @param conversationIdentifier Unique identifier for the conversation (used to track context) + * @param sendAgentConversationMessageStreamingRequest + */ + sendAgentConversationMessageStreaming(conversationIdentifier, sendAgentConversationMessageStreamingRequest, _options) { + const result = this.api.sendAgentConversationMessageStreaming(conversationIdentifier, sendAgentConversationMessageStreamingRequest, _options); + return result.toPromise(); + } + /** + * Version: 26.2.0.cl or later **Deprecated** — Use `sendAgentConversationMessage` instead. Send natural language messages to an existing Spotter agent conversation and returns the complete response synchronously. Requires `CAN_USE_SPOTTER` privilege and access to the metadata object associated with the conversation. The user must have access to the conversation session referenced by `conversation_identifier`. A conversation must first be created using the `createAgentConversation` API. #### Usage guidelines The request must include: - `conversation_identifier`: the unique session ID returned by `createAgentConversation`, used for context continuity and message tracking - `messages`: an array of one or more text messages to send to the agent The API returns an array of response objects, each containing: - `type`: the kind of response — `text`, `answer`, or `error` - `message`: the main content of the response - `metadata`: additional information depending on the message type (e.g., answer metadata includes analytics and visualization details) #### Error responses | Code | Description | |------|----------------------------------------------------------------------------------------------------------------------------------| | 401 | Unauthorized — authentication token is missing, expired, or invalid. | | 403 | Forbidden — the authenticated user does not have `CAN_USE_SPOTTER` privilege or lacks permission on the referenced conversation. | > ###### Note: > > - This endpoint is deprecated. Use `sendAgentConversationMessage` for new integrations. > - This endpoint is currently in Beta. Breaking changes may be introduced before the endpoint is made Generally Available. > - This endpoint requires Spotter - please contact ThoughtSpot support to enable Spotter on your cluster. + * @param conversationIdentifier Unique identifier for the conversation (used to track context) + * @param sendAgentMessageRequest + */ + sendAgentMessage(conversationIdentifier, sendAgentMessageRequest, _options) { + const result = this.api.sendAgentMessage(conversationIdentifier, sendAgentMessageRequest, _options); + return result.toPromise(); + } + /** + * Version: 26.2.0.cl or later **Deprecated** — Use `sendAgentConversationMessageStreaming` instead. Sends one or more natural language messages to an existing Spotter agent conversation and returns the response as a real-time Server-Sent Events stream. Requires `CAN_USE_SPOTTER` privilege and access to the metadata object associated with the conversation. The user must have access to the conversation session referenced by `conversation_identifier`. A conversation must first be created using the `createAgentConversation` API. #### Usage guidelines The request must include: - `conversation_identifier`: the unique session ID returned by `createAgentConversation`, used for context continuity and message tracking - `messages`: an array of one or more text messages to send to the agent If the request is valid, the API returns a Server-Sent Events (SSE) stream. Each line has the form `data: [{\"type\": \"...\", ...}]` — a JSON array of event objects. Event types include: - `ack`: confirms receipt of the request (`node_id`) - `conv_title`: conversation title (`title`, `conv_id`) - `notification`: status updates on operations (`group_id`, `metadata`, `code` — e.g. `TOOL_CALL_NOTIFICATION`, `nls_start`, `FINAL_RESPONSE_NOTIFICATION`) - `text-chunk`: incremental content chunks (`id`, `group_id`, `metadata` with `format` and `type` such as `thinking` or `text`, `content`) - `text`: full text block with same structure as `text-chunk` - `answer`: structured answer with metadata (`id`, `group_id`, `metadata` with `sage_query`, `session_id`, `title`, etc., `title`) - `error`: if a failure occurs #### Error responses | Code | Description | |------|----------------------------------------------------------------------------------------------------------------------------------| | 401 | Unauthorized — authentication token is missing, expired, or invalid. | | 403 | Forbidden — the authenticated user does not have `CAN_USE_SPOTTER` privilege or lacks permission on the referenced conversation. | > ###### Note: > > - This endpoint is deprecated. Use `sendAgentConversationMessageStreaming` for new integrations. > - This endpoint is currently in Beta. Breaking changes may be introduced before the endpoint is made Generally Available. > - This endpoint requires Spotter - please contact ThoughtSpot support to enable Spotter on your cluster. > - The streaming protocol uses Server-Sent Events (SSE). + * @param sendAgentMessageStreamingRequest + */ + sendAgentMessageStreaming(sendAgentMessageStreamingRequest, _options) { + const result = this.api.sendAgentMessageStreaming(sendAgentMessageStreamingRequest, _options); + return result.toPromise(); + } + /** + * Version: 10.4.0.cl or later Sends a follow-up message to an existing conversation within the context of a data model. Requires `CAN_USE_SPOTTER` privilege and at least view access to the metadata object specified in the request. A conversation must first be created using the `createConversation` API. #### Usage guidelines The request must include: - `conversation_identifier`: the unique session ID returned by `createConversation` - `metadata_identifier`: the unique ID of the data source used for the conversation - `message`: a natural language string with the follow-up question If the request is successful, the API returns an array of response messages, each containing: - `session_identifier`: the unique ID of the generated response - `generation_number`: the generation number of the response - `message_type`: the type of the response (e.g., `TSAnswer`) - `visualization_type`: the generated visualization type (`Chart`, `Table`, or `Undefined`) - `tokens` / `display_tokens`: the search tokens and user-friendly display tokens for the response #### Error responses | Code | Description | |------|-----------------------------------------------------------------------------------------------------------------------------------------| | 401 | Unauthorized — authentication token is missing, expired, or invalid. | | 403 | Forbidden — the authenticated user does not have `CAN_USE_SPOTTER` privilege or lacks view permission on the specified metadata object. | > ###### Note: > * This endpoint is currently in Beta. Breaking changes may be introduced before the endpoint is made Generally Available. > * This endpoint requires Spotter - please contact ThoughtSpot support to enable Spotter on your cluster. + * @param conversationIdentifier Unique identifier of the conversation. + * @param sendMessageRequest + */ + sendMessage(conversationIdentifier, sendMessageRequest, _options) { + const result = this.api.sendMessage(conversationIdentifier, sendMessageRequest, _options); + return result.toPromise(); + } + /** + * Version: 10.15.0.cl or later This API allows users to set natural language (NL) instructions for a specific data-model to improve AI-generated answers and query processing. These instructions help guide the AI system to better understand the data context and provide more accurate responses. Requires `CAN_USE_SPOTTER` privilege, either edit access or `SPOTTER_COACHING_PRIVILEGE` on the data model, and a bearer token corresponding to the org where the data model exists. #### Usage guidelines To set NL instructions for a data-model, the request must include: - `data_source_identifier`: The unique ID of the data-model for which to set NL instructions - `nl_instructions_info`: An array of instruction objects, each containing: - `instructions`: Array of text instructions for the LLM - `scope`: The scope of the instruction (`GLOBAL`). Currently only `GLOBAL` is supported. It can be extended to data-model-user scope in future. #### Instructions scope - **GLOBAL**: instructions that apply to all users querying this data model If the request is successful, the API returns: - `success`: a boolean indicating whether the operation completed successfully #### Error responses | Code | Description | |------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| | 401 | Unauthorized — authentication token is missing, expired, or invalid. | | 403 | Forbidden — the authenticated user does not have `CAN_USE_SPOTTER` privilege, lacks edit access or `SPOTTER_COACHING_PRIVILEGE` on the data model, or the bearer token does not correspond to the org where the data model exists. | > ###### Note: > > - To use this API, the user needs either edit access or `SPOTTER_COACHING_PRIVILEGE` on the data model, and must use the bearer token corresponding to the org where the data model exists. > - This endpoint is currently in Beta. Breaking changes may be introduced before the endpoint is made Generally Available. > - Available from version 10.15.0.cl and later. > - This endpoint requires Spotter — please contact ThoughtSpot Support to enable Spotter on your cluster. > - Instructions help improve the accuracy and relevance of AI-generated responses for the specified data-model. + * @param setNLInstructionsRequest + */ + setNLInstructions(setNLInstructionsRequest, _options) { + const result = this.api.setNLInstructions(setNLInstructionsRequest, _options); + return result.toPromise(); + } + /** + * Version: 9.0.0.cl or later Allows sharing one or several metadata objects with users and groups in ThoughtSpot. Requires edit access to the metadata object. #### Supported metadata objects: * Liveboards * Visualizations * Answers * Models * Views * Connections * Collections #### Object permissions You can provide `READ_ONLY` or `MODIFY` access when sharing an object with another user or group. The `READ_ONLY` permission grants view access to the shared object, whereas `MODIFY` provides edit access. To prevent a user or group from accessing the shared object, specify the GUID or name of the principal and set `shareMode` to `NO_ACCESS`. #### Sharing a visualization * Sharing a visualization implicitly shares the entire Liveboard with the recipient. * Object permissions set for a shared visualization also apply to the Liveboard unless overridden by another API request or via UI. * If email notifications for object sharing are enabled, a notification with a link to the shared visualization will be sent to the recipient’s email address. Although this link opens the shared visualization, recipients can also access other visualizations in the Liveboard. #### Sharing a collection Collections support **dual permissions** that provide fine-grained control: * **Collection permissions** (`share_mode`) - controls access to the collection itself (view, edit, delete the collection) * **Content permissions** (`content_share_mode`) - controls access to objects within the collection (view, edit objects inside) **Default Behavior:** - If only `share_mode` is specified, the content permissions default to `READ_ONLY` (except when `share_mode` is `NO_ACCESS`, then content also gets `NO_ACCESS`) - To give users edit access to collection contents, explicitly set `content_share_mode: \"MODIFY\"` ## Examples The following JSON examples can be copy-pasted as request bodies for the REST v2 API endpoint: ```bash POST /callosum/v1/v2/security/metadata/share Content-Type: application/x-www-form-urlencoded ``` ### Basic collection sharing Share a collection with read-only access: ```json { \"metadata_type\": \"COLLECTION\", \"metadata_identifiers\": [\"Sales Reports Collection\"], \"permissions\": [{ \"principal\": { \"type\": \"USER\", \"identifier\": \"alice@company.com\" }, \"share_mode\": \"READ_ONLY\" }], \"notification\": { \"message\": \"I\'ve shared the Sales Reports collection with you\", \"notify_on_share\": true } } ``` ### Collection sharing with dual permissions Share a collection with different permissions for the collection vs. its contents: ```json { \"metadata_type\": \"COLLECTION\", \"metadata_identifiers\": [\"Marketing Analytics\"], \"permissions\": [{ \"principal\": { \"type\": \"USER\", \"identifier\": \"bob@company.com\" }, \"share_mode\": \"MODIFY\", \"content_share_mode\": \"READ_ONLY\" }, { \"principal\": { \"type\": \"USER_GROUP\", \"identifier\": \"Marketing Team\" }, \"share_mode\": \"READ_ONLY\", \"content_share_mode\": \"READ_ONLY\" }], \"notification\": { \"emails\": [\"bob@company.com\"], \"message\": \"You can edit the collection but content is read-only\", \"enable_custom_url\": false, \"notify_on_share\": true }, \"has_lenient_discoverability\": false } ``` ### Multiple collections sharing Share multiple collections with different users: ```json { \"metadata\": [ { \"type\": \"COLLECTION\", \"identifier\": \"Q4 Reports\" }, { \"type\": \"COLLECTION\", \"identifier\": \"Executive Dashboard Collection\" } ], \"permissions\": [{ \"principal\": { \"type\": \"USER_GROUP\", \"identifier\": \"Executives\" }, \"share_mode\": \"MODIFY\" }, { \"principal\": { \"type\": \"USER\", \"identifier\": \"manager@company.com\" }, \"share_mode\": \"READ_ONLY\", \"content_share_mode\": \"MODIFY\" }], \"notification\": { \"message\": \"Sharing quarterly collections with leadership team\", \"notify_on_share\": true } } ``` ### Remove collection access Remove access to a collection by setting share_mode to NO_ACCESS: ```json { \"metadata_type\": \"COLLECTION\", \"metadata_identifiers\": [\"Confidential Reports\"], \"permissions\": [{ \"principal\": { \"type\": \"USER\", \"identifier\": \"former-employee@company.com\" }, \"share_mode\": \"NO_ACCESS\" }], \"notification\": { \"notify_on_share\": false } } ``` ### Collection Permission Scenarios **Scenario 1: Collection Admin** - `share_mode: MODIFY` + `content_share_mode: MODIFY` = Full control over collection and its contents **Scenario 2: Collection Curator** - `share_mode: MODIFY` + `content_share_mode: READ_ONLY` = Can manage collection structure but not edit contents **Scenario 3: Content Editor** - `share_mode: READ_ONLY` + `content_share_mode: MODIFY` = Can edit objects within collection but can\'t change collection itself **Scenario 4: Viewer** - `share_mode: READ_ONLY` + `content_share_mode: READ_ONLY` = View-only access to collection and contents + * @param shareMetadataRequest + */ + shareMetadata(shareMetadataRequest, _options) { + const result = this.api.shareMetadata(shareMetadataRequest, _options); + return result.toPromise(); + } + /** + * Version: 10.4.0.cl or later Processes a natural language query against a specified data model and returns a single AI-generated answer without requiring a conversation session. Requires `CAN_USE_SPOTTER` privilege and at least view access to the metadata object specified in the request. #### Usage guidelines The request must include: - `query`: a natural language question (e.g., \"What were total sales last quarter?\") - `metadata_identifier`: the unique ID of the data source to query against If the request is successful, the API returns a response message containing: - `session_identifier`: the unique ID of the generated response - `generation_number`: the generation number of the response - `message_type`: the type of the response (e.g., `TSAnswer`) - `visualization_type`: the generated visualization type (`Chart`, `Table`, or `Undefined`) - `tokens` / `display_tokens`: the search tokens and user-friendly display tokens for the response #### Error responses | Code | Description | |------|-----------------------------------------------------------------------------------------------------------------------------------------| | 401 | Unauthorized — authentication token is missing, expired, or invalid. | | 403 | Forbidden — the authenticated user does not have `CAN_USE_SPOTTER` privilege or lacks view permission on the specified metadata object. | > ###### Note: > * This endpoint is currently in Beta. Breaking changes may be introduced before the endpoint is made Generally Available. > * This endpoint requires Spotter - please contact ThoughtSpot support to enable Spotter on your cluster. + * @param singleAnswerRequest + */ + singleAnswer(singleAnswerRequest, _options) { + const result = this.api.singleAnswer(singleAnswerRequest, _options); + return result.toPromise(); + } + /** + * Stops an in-progress agent conversation response. Version: 26.6.0.cl or later Version: 26.6.0.cl or later Stops an in-progress agent response for the specified conversation. Use this endpoint to cancel a response that is actively being generated — for example, when the user navigates away, reformulates their question, or no longer needs the current result. Requires `CAN_USE_SPOTTER` privilege and access to the specified conversation. #### Usage guidelines The request must include: - `conversation_identifier` *(path parameter)*: the unique ID of the conversation whose active response should be stopped, as returned by `createAgentConversation` A successful request returns an empty `204 No Content` response. If there is no active response in progress at the time of the call, the request is still treated as successful. After stopping a response, the conversation session remains active. You can continue sending messages using `sendAgentConversationMessage` or `sendAgentConversationMessageStreaming`. #### Example request ```bash POST /api/rest/2.0/ai/agent/conversation/{conversation_identifier}/stop-response ``` #### Typical usage scenario This endpoint is useful when integrating Spotter into a chat UI where users can cancel a long-running query. For example: 1. User sends a message via `sendAgentConversationMessageStreaming`. 2. User clicks a \"Stop generating\" button while the response is streaming. 3. Your client calls `stopConversation` with the active `conversation_identifier`. 4. The stream is terminated and the user can ask a new question. #### Error responses | Code | Description | |------|-------------| | 401 | Unauthorized — authentication token is missing, expired, or invalid. | | 403 | Forbidden — the authenticated user does not have `CAN_USE_SPOTTER` privilege or lacks access to the specified conversation. | > ###### Note: > > - Calling this endpoint when no response is in progress does not return an error. > - The conversation context is preserved after stopping — previous messages and answers remain accessible. > - Available from version 26.6.0.cl and later. > - This endpoint requires Spotter — please contact ThoughtSpot Support to enable Spotter on your cluster. > - This feature is available only for **Spotter 3** (`SPOTTER3`) version. + * @param conversationIdentifier Unique identifier of the conversation to stop. + */ + stopConversation(conversationIdentifier, _options) { + const result = this.api.stopConversation(conversationIdentifier, _options); + return result.toPromise(); + } + /** + * Version: 26.5.0.cl or later Synchronizes connection metadata attributes from your Cloud Data Warehouse (CDW) with ThoughtSpot. Requires the `DATAMANAGEMENT` (**Can manage data**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` (**Can manage data models**) privilege is required. #### Usage guidelines To synchronize attributes from a CDW, specify the connection GUID or name in the `connection_identifier` path parameter and `sync_attributes` in the request body. Default attribute is `[\"DESCRIPTION\"]`. ##### Hierarchical schema * Connection: The connection object for the sync operation. * Tables: Tables for the sync operation. When no table is specified, all tables are synchronized. * Columns: If the table is specified, you can add the columns for the sync operation. If no columns are specified, all columns in the specified table are considered for the sync operation. To set the scope for the sync operation: * Connection-level: To sync all tables and columns, pass an empty request body, or only the attributes in the request body. * Table-level: To synchronize specific tables and their columns, specify the table identifiers in the `tables` array. * Column-level: To synchronize specific columns, specify the table identifier as the key and column identifiers as the value in the `tables` array. ``` { \"tables\": [ {\"table-guid-1\": [\"column-guid-1\", \"column-guid-2\"]}, \"table-guid-2\" ], \"sync_attributes\": [\"DESCRIPTION\"] } ``` ##### API response If the sync operation is successful, the API returns the following information: * Status of the sync operation. For example, `SUCCESS`, `PARTIAL_SUCCESS`, or `NO_UPDATE`. * Number of tables and columns that were updated. * Number of tables and columns with the sync failed status when the overall sync status is `PARTIAL_SUCCESS`. * Message text indicating the sync results. + * @param connectionIdentifier Unique ID or name of the connection. + * @param syncMetadataRequest + */ + syncMetadata(connectionIdentifier, syncMetadataRequest, _options) { + const result = this.api.syncMetadata(connectionIdentifier, syncMetadataRequest, _options); + return result.toPromise(); + } + /** + * Version: 9.0.0.cl or later Removes the tags applied to a Liveboard, Answer, Table, or Worksheet. Requires edit access to the metadata object. + * @param unassignTagRequest + */ + unassignTag(unassignTagRequest, _options) { + const result = this.api.unassignTag(unassignTagRequest, _options); + return result.toPromise(); + } + /** + * Remove parameterization from fields in metadata objects. Version: 26.5.0.cl or later Allows removing parameterization from fields in metadata objects in ThoughtSpot. Requires appropriate permissions to modify the metadata object. The API endpoint allows unparameterizing the following types of metadata objects: * Logical Tables * Connections * Connection Configs For a Logical Table the field type must be `ATTRIBUTE` and field name can be one of: * databaseName * schemaName * tableName For a Connection or Connection Config, the field type is always `CONNECTION_PROPERTY`. In this case, field_name specifies the exact property of the Connection or Connection Config that needs to be unparameterized. For Connection Config, the only supported field name is: * impersonate_user + * @param unparameterizeMetadataRequest + */ + unparameterizeMetadata(unparameterizeMetadataRequest, _options) { + const result = this.api.unparameterizeMetadata(unparameterizeMetadataRequest, _options); + return result.toPromise(); + } + /** + * Version: 26.5.0.cl or later Allows unpublishing metadata objects from organizations in ThoughtSpot. Requires ADMINISTRATION role and TENANT scope. The API endpoint allows unpublishing the following types of metadata objects: * Liveboards * Answers * Logical Tables When unpublishing objects, you can: * Include dependencies by setting `include_dependencies` to true - this will unpublish all dependent objects if no other published object is using them * Force unpublish by setting `force` to true - this will break all dependent objects in the unpublished organizations + * @param unpublishMetadataRequest + */ + unpublishMetadata(unpublishMetadataRequest, _options) { + const result = this.api.unpublishMetadata(unpublishMetadataRequest, _options); + return result.toPromise(); + } + /** + * Version: 10.12.0.cl or later Updates the properties of a [custom calendar](https://docs.thoughtspot.com/cloud/latest/connections-cust-cal). Requires `DATAMANAGEMENT` (**Can manage data**) or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your ThoughtSpot instance, the `CAN_MANAGE_CUSTOM_CALENDAR` (**Can manage custom calendars**) privilege is required. #### Usage guidelines You can update the properties of a calendar using one of the following methods: * `FROM_INPUT_PARAMS` to update the calendar properties with the values defined in the API request. * `FROM_EXISTING_TABLE` Creates a calendar from the parameters defined in the API request. To update a custom calendar, specify the calendar ID as a path parameter in the request URL and the following parameters in the request body: * Connection ID and Table name * Database and schema name attributes: For most Cloud Data Warehouse (CDW) connectors, both `database_name` and `schema_name` attributes are required. However, the attribute requirements are conditional and vary based on the connector type and its metadata structure. For example, for connectors such as Teradata, MySQL, SingleSore, Amazon Aurora MySQL, Amazon RDS MySQL, Oracle, and GCP_MYSQL, the `schema_name` is required, whereas the `database_name` attribute is not. Similarly, connectors such as ClickHouse require you to specify the `database_name` and the schema specification in such cases is optional. The API allows you to modify the calendar type, month offset value, start and end date, starting day of the week, and prefixes assigned to the year and quarter labels. #### Examples Update a custom calendar using an existing Table in ThoughtSpot: ``` { \"update_method\": \"FROM_EXISTING_TABLE\", \"table_reference\": { \"connection_identifier\": \"Connection1\", \"database_name\": \"db1\", \"table_name\": \"custom_calendar_2025\", \"schame_name\": \"schemaVar\" } } ``` Update a custom calendar with the attributes defined in the API request: ``` { \"update_method\": \"FROM_INPUT_PARAMS\", \"table_reference\": { \"connection_identifier\": \"Connection1\", \"database_name\": \"db1\", \"table_name\": \"custom_calendar_2025\", \"schame_name\": \"schemaVar\" }, \"month_offset\": \"August\", \"start_day_of_week\": \"Monday\", \"start_date\": \"08/01/2025\", \"end_date\": \"07/31/2026\" } ``` + * @param calendarIdentifier Unique Id or name of the calendar. + * @param updateCalendarRequest + */ + updateCalendar(calendarIdentifier, updateCalendarRequest, _options) { + const result = this.api.updateCalendar(calendarIdentifier, updateCalendarRequest, _options); + return result.toPromise(); + } + /** + * Version: 26.4.0.cl or later Updates an existing collection in ThoughtSpot. #### Supported operations This API endpoint lets you perform the following operations: * Update collection name and description * Change visibility settings * Add metadata objects to the collection (operation: ADD) * Remove metadata objects from the collection (operation: REMOVE) * Replace all metadata objects in the collection (operation: REPLACE) #### Operation types * **ADD**: Adds the specified metadata objects to the existing collection without removing current items * **REMOVE**: Removes only the specified metadata objects from the collection * **REPLACE**: Replaces all existing metadata objects with the specified items (default behavior) + * @param collectionIdentifier Unique GUID of the collection. Note: Collection names cannot be used as identifiers since duplicate names are allowed. + * @param updateCollectionRequest + */ + updateCollection(collectionIdentifier, updateCollectionRequest, _options) { + const result = this.api.updateCollection(collectionIdentifier, updateCollectionRequest, _options); + return result.toPromise(); + } + /** + * Version: 10.12.0.cl or later Creates, updates, or deletes column security rules for specified tables. This API endpoint allows you to create, update, or delete column-level security rules on columns of a table. The operation follows an \"all or none\" policy: if defining security rules for any of the provided columns fails, the entire operation will be rolled back, and no rules will be created. #### Usage guidelines - Provide table identifier using either `identifier` (GUID or name) or `obj_identifier` (object ID) - Use `clear_csr: true` to remove all column security rules from the table - For each column, specify the security rule using `column_security_rules` array - Use `is_unsecured: true` to mark a specific column as unprotected - Use `group_access` operations to manage group associations: - `ADD`: Add groups to the column\'s access list - `REMOVE`: Remove groups from the column\'s access list - `REPLACE`: Replace all existing groups with the specified groups #### Required permissions - `ADMINISTRATION` - Can administer ThoughtSpot - `DATAMANAGEMENT` - Can manage data (if RBAC is disabled) - `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` - Can manage worksheet views and tables (if RBAC is enabled) #### Example request ```json { \"identifier\": \"table-guid\", \"obj_identifier\": \"table-object-id\", \"clear_csr\": false, \"column_security_rules\": [ { \"column_identifier\": \"col id or col name\", \"is_unsecured\": false, \"group_access\": [ { \"operation\": \"ADD\", \"group_identifiers\": [\"hr_group_id\", \"hr_group_name\", \"finance_group_id\"] } ] }, { \"column_identifier\": \"col id or col name\", \"is_unsecured\": true }, { \"column_identifier\": \"col id or col name\", \"is_unsecured\": false, \"group_access\": [ { \"operation\": \"REPLACE\", \"group_identifiers\": [\"management_group_id\", \"management_group_name\"] } ] } ] } ``` #### Request Body Schema - `identifier` (string, optional): GUID or name of the table for which we want to create column security rules - `obj_identifier` (string, optional): The object ID of the table - `clear_csr` (boolean, optional): If true, then all the secured columns will be marked as unprotected, and all the group associations will be removed - `column_security_rules` (array of objects, required): An array where each object defines the security rule for a specific column Each column security rule object contains: - `column_identifier` (string, required): Column identifier (col_id or name) - `is_unsecured` (boolean, optional): If true, the column will be marked as unprotected and all groups associated with it will be removed - `group_access` (array of objects, optional): Array of group operation objects Each group operation object contains: - `operation` (string, required): Operation type - ADD, REMOVE, or REPLACE - `group_identifiers` (array of strings, required): Array of group identifiers (name or GUID) on which the operation will be performed #### Response This API does not return any response body. A successful operation returns HTTP 200 status code. #### Operation Types - **ADD**: Adds the specified groups to the column\'s access list - **REMOVE**: Removes the specified groups from the column\'s access list - **REPLACE**: Replaces all existing groups with the specified groups + * @param updateColumnSecurityRulesRequest + */ + updateColumnSecurityRules(updateColumnSecurityRulesRequest, _options) { + const result = this.api.updateColumnSecurityRules(updateColumnSecurityRulesRequest, _options); + return result.toPromise(); + } + /** + * Version: 9.2.0.cl or later Updates Git repository configuration settings. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance on your instance, the `CAN_SETUP_VERSION_CONTROL` (**Can set up version control**) privilege. + * @param updateConfigRequest + */ + updateConfig(updateConfigRequest, _options) { + const result = this.api.updateConfig(updateConfigRequest, _options); + return result.toPromise(); + } + /** + * Version: 9.2.0.cl or later **Important**: This endpoint is deprecated and will be removed from ThoughtSpot in September 2025. ThoughtSpot strongly recommends using the [Update connection V2](#/http/api-endpoints/connections/update-connection-v2) endpoint to update your connection objects. #### Usage guidelines Updates a connection object. Requires `DATAMANAGEMENT` (**Can manage data**) and edit permissions to the connection object, or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) privilege is required. To update a connection object, pass these parameters in your API request: 1. GUID of the connection object. 2. If you are updating tables or database schema of a connection object: a. Add the updated JSON map of metadata with database, schema, and tables in `data_warehouse_config`. b. Set `validate` to `true`. 3. If you are updating a configuration attribute, connection name, or description, you can set `validate` to `false`. + * @param updateConnectionRequest + */ + updateConnection(updateConnectionRequest, _options) { + const result = this.api.updateConnection(updateConnectionRequest, _options); + return result.toPromise(); + } + /** + * Version: 10.12.0.cl or later Updates a connection configuration object. Requires `DATAMANAGEMENT` (**Can manage data**) and edit permissions to the connection object, or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) privilege is required. #### Supported operations This API endpoint lets you perform the following operations in a single API request: * Edit the name or description of the configuration * Edit the configuration properties * Edit the `policy_type` * Edit the type of authentication * Enable or disable a configuration #### Parameterized Connection Support For parameterized oauth based connections, only the `same_as_parent` and `policy_process_options` attributes are allowed. These attributes are not applicable to connections that are not parameterized. **NOTE**: When updating a configuration where `disabled` is `true`, you must reset `disabled` to `true` in your update request payload. If not explicitly set again, the API will default `disabled` to `false`. + * @param configurationIdentifier Unique ID or name of the configuration. + * @param updateConnectionConfigurationRequest + */ + updateConnectionConfiguration(configurationIdentifier, updateConnectionConfigurationRequest, _options) { + const result = this.api.updateConnectionConfiguration(configurationIdentifier, updateConnectionConfigurationRequest, _options); + return result.toPromise(); + } + /** + * Version: 26.6.0.cl or later Activates or deactivates a connection. A deactivated connection cannot be used for queries or operations until it is activated again. Requires `DATAMANAGEMENT` (**Can manage data**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) privilege is required. Only the connection owner or an administrator can perform this operation. #### Usage guidelines To update the status of a connection, specify the connection GUID or name in the `connection_identifier` path parameter and the desired `status` in the request body. - **ACTIVATED**: Enables the connection. Queries and operations can resume on an activated connection. - **DEACTIVATED**: Disables the connection. It does not remove the connection metadata, but only makes the connection unavailable for queries and operations. You can reactivate a deactivated connection by setting \"status\": \"ACTIVATED\". + * @param connectionIdentifier Unique ID or name of the connection. + * @param updateConnectionStatusRequest + */ + updateConnectionStatus(connectionIdentifier, updateConnectionStatusRequest, _options) { + const result = this.api.updateConnectionStatus(connectionIdentifier, updateConnectionStatusRequest, _options); + return result.toPromise(); + } + /** + * Version: 10.4.0.cl or later Updates a connection object. Requires `DATAMANAGEMENT` (**Can manage data**) and edit permissions to the connection object, or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) privilege is required. To update a connection object, pass these parameters in your API request: 1. GUID of the connection object. 2. If you are updating tables or database schema of a connection object: a. Add the updated JSON map of metadata with database, schema, and tables in `data_warehouse_config`. b. Set `validate` to `true`. **NOTE:** If the `authentication_type` is anything other than SERVICE_ACCOUNT, you must explicitly provide the authenticationType property in the payload. If you do not specify authenticationType, the API will default to SERVICE_ACCOUNT as the authentication type. * A JSON map of configuration attributes, database details, and table properties in `data_warehouse_config` as shown in the following example: * This is an example of updating a single table in a empty connection: ``` { \"authenticationType\": \"SERVICE_ACCOUNT\", \"externalDatabases\": [ { \"name\": \"DEVELOPMENT\", \"isAutoCreated\": false, \"schemas\": [ { \"name\": \"TS_dataset\", \"tables\": [ { \"name\": \"DEMORENAME\", \"type\": \"TABLE\", \"description\": \"\", \"selected\": true, \"linked\": true, \"gid\": 0, \"datasetId\": \"-1\", \"subType\": \"\", \"reportId\": \"\", \"viewId\": \"\", \"columns\": [ { \"name\": \"Col1\", \"type\": \"VARCHAR\", \"canImport\": true, \"selected\": true, \"description\": \"\", \"isLinkedActive\": true, \"isAggregate\": false }, { \"name\": \"Col2\", \"type\": \"VARCHAR\", \"canImport\": true, \"selected\": true, \"description\": \"\", \"isLinkedActive\": true, \"isAggregate\": false }, { \"name\": \"Col3\", \"type\": \"VARCHAR\", \"canImport\": true, \"selected\": true, \"description\": \"\", \"isLinkedActive\": true, \"isAggregate\": false }, { \"name\": \"Col312\", \"type\": \"VARCHAR\", \"canImport\": true, \"selected\": true, \"description\": \"\", \"isLinkedActive\": true, \"isAggregate\": false }, { \"name\": \"Col4\", \"type\": \"VARCHAR\", \"canImport\": true, \"selected\": true, \"description\": \"\", \"isLinkedActive\": true, \"isAggregate\": false } ], \"relationships\": [] } ] } ] } ], \"configuration\": { \"password\": \"\", \"database\": \"DEVELOPMENT\", \"role\": \"DEV\", \"accountName\": \"thoughtspot_partner\", \"warehouse\": \"DEMO_WH\", \"user\": \"DEV_USER\" } } ``` * This is an example of updating a single table in an existing connection with tables: ``` { \"authenticationType\": \"SERVICE_ACCOUNT\", \"externalDatabases\": [ { \"name\": \"DEVELOPMENT\", \"isAutoCreated\": false, \"schemas\": [ { \"name\": \"TS_dataset\", \"tables\": [ { \"name\": \"CUSTOMER\", \"type\": \"TABLE\", \"description\": \"\", \"selected\": true, \"linked\": true, \"gid\": 0, \"datasetId\": \"-1\", \"subType\": \"\", \"reportId\": \"\", \"viewId\": \"\", \"columns\": [], \"relationships\": [] }, { \"name\": \"tpch5k_falcon_default_schema_users\", \"type\": \"TABLE\", \"description\": \"\", \"selected\": true, \"linked\": true, \"gid\": 0, \"datasetId\": \"-1\", \"subType\": \"\", \"reportId\": \"\", \"viewId\": \"\", \"columns\": [ { \"name\": \"user_id\", \"type\": \"INT64\", \"canImport\": true, \"selected\": true, \"description\": \"\", \"isLinkedActive\": true, \"isAggregate\": false }, { \"name\": \"product_id\", \"type\": \"INT64\", \"canImport\": true, \"selected\": true, \"description\": \"\", \"isLinkedActive\": true, \"isAggregate\": false }, { \"name\": \"user_cost\", \"type\": \"INT64\", \"canImport\": true, \"selected\": true, \"description\": \"\", \"isLinkedActive\": true, \"isAggregate\": false } ], \"relationships\": [] } ] } ] } ], \"configuration\": { \"password\": \"\", \"database\": \"DEVELOPMENT\", \"role\": \"DEV\", \"accountName\": \"thoughtspot_partner\", \"warehouse\": \"DEMO_WH\", \"user\": \"DEV_USER\" } } ``` 3. If you are updating a configuration attribute, connection name, or description, you can set `validate` to `false`. **NOTE:** If the `authentication_type` is anything other than SERVICE_ACCOUNT, you must explicitly provide the authenticationType property in the payload. If you do not specify authenticationType, the API will default to SERVICE_ACCOUNT as the authentication type. * A JSON map of configuration attributes in `data_warehouse_config`. The following example shows the configuration attributes for a Snowflake connection: ``` { \"configuration\":{ \"accountName\":\"thoughtspot_partner\", \"user\":\"tsadmin\", \"password\":\"TestConn123\", \"role\":\"sysadmin\", \"warehouse\":\"MEDIUM_WH\" }, \"externalDatabases\":[ ] } ``` + * @param connectionIdentifier Unique ID or name of the connection. + * @param updateConnectionV2Request + */ + updateConnectionV2(connectionIdentifier, updateConnectionV2Request, _options) { + const result = this.api.updateConnectionV2(connectionIdentifier, updateConnectionV2Request, _options); + return result.toPromise(); + } + /** + * Version: 9.6.0.cl or later Updates a custom action. Requires `DEVELOPER` (**Has Developer privilege**) or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `DEVELOPER` (**Has developer privilege**) privilege is required. #### Usage Guidelines The API allows you to modify the following properties: * Name of the custom action * Action availability to groups * Association to metadata objects * Authentication settings for a URL-based action For more information, see [Custom actions](https://developers.thoughtspot.com/docs/custom-action-intro). + * @param customActionIdentifier Unique ID or name of the custom action. + * @param updateCustomActionRequest + */ + updateCustomAction(customActionIdentifier, updateCustomActionRequest, _options) { + const result = this.api.updateCustomAction(customActionIdentifier, updateCustomActionRequest, _options); + return result.toPromise(); + } + /** + * Version: 9.9.0.cl or later Updates a DBT connection object. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege or `DATAMANAGEMENT` (**Can manage data ThoughtSpot**) privilege, along with an existing DBT connection. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the following data control privileges may be required: - `CAN_MANAGE_CUSTOM_CALENDAR`(**Can manage custom calendars**) - `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) - `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` (**Can manage data models**) #### About update DBT connection You can modify DBT connection object properties such as embrace connection name, embrace database name, import type, account identifier, access token, project identifier and environment (or) embrace connection, embrace database name, import type, file_content settings. + * @param dbtConnectionIdentifier Unique ID of the DBT Connection. + * @param connectionName Name of the connection. + * @param databaseName Name of the Database. + * @param importType Mention type of Import + * @param accessToken Access token is mandatory when Import_Type is DBT_CLOUD. + * @param dbtUrl DBT URL is mandatory when Import_Type is DBT_CLOUD. + * @param accountId Account ID is mandatory when Import_Type is DBT_CLOUD + * @param projectId Project ID is mandatory when Import_Type is DBT_CLOUD + * @param dbtEnvId DBT Environment ID\\\" + * @param projectName Name of the project + * @param fileContent Upload DBT Manifest and Catalog artifact files as a ZIP file. This field is Mandatory when Import Type is \\\'ZIP_FILE\\\' + */ + updateDbtConnection(dbtConnectionIdentifier, connectionName, databaseName, importType, accessToken, dbtUrl, accountId, projectId, dbtEnvId, projectName, fileContent, _options) { + const result = this.api.updateDbtConnection(dbtConnectionIdentifier, connectionName, databaseName, importType, accessToken, dbtUrl, accountId, projectId, dbtEnvId, projectName, fileContent, _options); + return result.toPromise(); + } + /** + * Version: 10.12.0.cl or later Updates a customization configuration for the notification email. #### Pre-requisites Requires `DEVELOPER` (**has developer privilege**) or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `DEVELOPER` (**Has developer privilege**) privilege is required. **NOTE**:This endpoint in currently in beta. Contact ThoughtSpot support to enable this on your instance. #### Usage guidelines To update a custom configuration pass these parameters in your API request: - A JSON map of configuration attributes `template_properties`. The following example shows a sample set of customization configuration: ``` { { \"cta_button_bg_color\": \"#444DEA\", \"cta_text_font_color\": \"#FFFFFF\", \"primary_bg_color\": \"#D3DEF0\", \"logo_url\": \"https://storage.pardot.com/710713/1642089901EbkRibJq/TS_fullworkmark_darkmode.png\", \"font_family\": \"\", \"product_name\": \"ThoughtSpot\", \"footer_address\": \"444 Castro St, Suite 1000 Mountain View, CA 94041\", \"footer_phone\": \"(800) 508-7008\", \"replacement_value_for_liveboard\": \"Dashboard\", \"replacement_value_for_answer\": \"Chart\", \"replacement_value_for_spot_iq\": \"AI Insights\", \"hide_footer_phone\": false, \"hide_footer_address\": false, \"hide_product_name\": false, \"hide_manage_notification\": false, \"hide_mobile_app_nudge\": false, \"hide_privacy_policy\": false, \"hide_ts_vocabulary_definitions\": false, \"hide_error_message\": false, \"hide_unsubscribe_link\": false, \"hide_notification_status\": false, \"hide_modify_alert\": false, \"company_website_url\": \"https://your-website.com/\", \"company_privacy_policy_url\" : \"https://link-to-privacy-policy.com/\", \"contact_support_url\": \"https://link-to-contact-support.com/\", \"hide_contact_support_url\": false, \"hide_logo_url\" : false } } ``` + * @param updateEmailCustomizationRequest + */ + updateEmailCustomization(updateEmailCustomizationRequest, _options) { + const result = this.api.updateEmailCustomization(updateEmailCustomizationRequest, _options); + return result.toPromise(); + } + /** + * Update header attributes for a given list of header objects. Version: 10.6.0.cl or later ## Prerequisites - **Privileges Required:** - `DATAMANAGEMENT` (Can manage data) or `ADMINISTRATION` (Can administer ThoughtSpot). - **Additional Privileges (if RBAC is enabled):** - `ORG_ADMINISTRATION` (Can manage orgs). --- ## Usage Guidelines ### Parameters 1. **headers_update** - **Description:** List of header objects with their attributes to be updated. Each object contains a list of attributes to be updated in the header. - **Usage:** - You must provide either `identifier` or `obj_identifier`, but not both. Both fields cannot be empty. - When `org_identifier` is set to `-1`, only the `identifier` value is accepted; `obj_identifier` is not allowed. 2. **org_identifier** - **Description:** GUID (Globally Unique Identifier) or name of the organization. - **Usage:** - Leaving this field empty assumes that the changes should be applied to the current organization - Provide `org_guid` or `org_name` to uniquely identify the organization where changes need to be applied. . - Provide `-1` if changes have to be applied across all the org. --- ## Note Currently, this API is enabled only for updating the `obj_identifier` attribute. Only `text` will be allowed in attribute\'s value. ## Best Practices 1. **Backup Before Conversion:** Always export metadata as a backup before initiating the update process --- ## Examples ### Only `identifier` is given ```json { \"headers_update\": [ { \"identifier\": \"guid_1\", \"obj_identifier\": \"\", \"type\": \"LOGICAL_COLUMN\", \"attributes\": [ { \"name\": \"obj_id\", \"value\": \"custom_object_id\" } ] } ], \"org_identifier\": \"orgGuid\" } ``` ### Only `obj_identifier` is given ```json { \"headers_update\": [ { \"obj_identifier\": \"custom_object_id\", \"type\": \"ANSWER\", \"attributes\": [ { \"name\": \"obj_id\", \"value\": \"custom_object_id\" } ] } ], \"org_identifier\": \"orgName\" } ``` ### Executing update for all org `-1` ```json { \"headers_update\": [ { \"identifier\": \"guid_1\", \"type\": \"ANSWER\", \"attributes\": [ { \"name\": \"obj_id\", \"value\": \"custom_object_id\" } ] } ], \"org_identifier\": -1 } ``` ### Optional `type` is not provided ```json { \"headers_update\": [ { \"identifier\": \"guid_1\", \"attributes\": [ { \"name\": \"obj_id\", \"value\": \"custom_object_id\" } ] } ], \"org_identifier\": -1 } ``` + * @param updateMetadataHeaderRequest + */ + updateMetadataHeader(updateMetadataHeaderRequest, _options) { + const result = this.api.updateMetadataHeader(updateMetadataHeaderRequest, _options); + return result.toPromise(); + } + /** + * Update object IDs for given metadata objects. Version: 10.8.0.cl or later ## Prerequisites - **Privileges Required:** - `DATAMANAGEMENT` (Can manage data) or `ADMINISTRATION` (Can administer ThoughtSpot). - **Additional Privileges (if RBAC is enabled):** - `ORG_ADMINISTRATION` (Can manage orgs). --- ## Usage Guidelines ### Parameters 1. **metadata** - **Description:** List of metadata objects to update their object IDs. - **Usage:** - Use either `current_obj_id` alone OR use `metadata_identifier` with `type` (when needed). - When using `metadata_identifier`, the `type` field is required if using a name instead of a GUID. - The `new_obj_id` field is always required. --- ## Note This API is specifically designed for updating object IDs of metadata objects. It internally uses the header update mechanism to perform the changes. ## Best Practices 1. **Backup Before Update:** Always export metadata as a backup before initiating the update process. 2. **Validation:** - When using `current_obj_id`, ensure it matches the existing object ID exactly. - When using `metadata_identifier` with a name, ensure the `type` is specified correctly. - Verify that the `new_obj_id` follows your naming conventions and is unique within your system. --- ## Examples ### Using current_obj_id ```json { \"metadata\": [ { \"current_obj_id\": \"existing_object_id\", \"new_obj_id\": \"new_object_id\" } ] } ``` ### Using metadata_identifier with GUID ```json { \"metadata\": [ { \"metadata_identifier\": \"01234567-89ab-cdef-0123-456789abcdef\", \"new_obj_id\": \"new_object_id\" } ] } ``` ### Using metadata_identifier with name and type ```json { \"metadata\": [ { \"metadata_identifier\": \"My Answer\", \"type\": \"ANSWER\", \"new_obj_id\": \"new_object_id\" } ] } ``` ### Multiple objects update ```json { \"metadata\": [ { \"current_obj_id\": \"existing_object_id_1\", \"new_obj_id\": \"new_object_id_1\" }, { \"metadata_identifier\": \"My Worksheet\", \"type\": \"LOGICAL_TABLE\", \"new_obj_id\": \"new_object_id_2\" } ] } ``` + * @param updateMetadataObjIdRequest + */ + updateMetadataObjId(updateMetadataObjIdRequest, _options) { + const result = this.api.updateMetadataObjId(updateMetadataObjIdRequest, _options); + return result.toPromise(); + } + /** + * Version: 9.0.0.cl or later Updates an Org object. You can modify Org properties such as name, description, and user associations. Requires cluster administration (**Can administer Org**) privileges. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `ORG_ADMINISTRATION` (**Can manage Orgs**) privilege is required. + * @param orgIdentifier ID or name of the Org + * @param updateOrgRequest + */ + updateOrg(orgIdentifier, updateOrgRequest, _options) { + const result = this.api.updateOrg(orgIdentifier, updateOrgRequest, _options); + return result.toPromise(); + } + /** + * Version: 9.5.0.cl or later Updates the properties of a Role object. Available only if [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance. To update a Role, the `ROLE_ADMINISTRATION` (**Can manage roles**) privilege is required. + * @param roleIdentifier Unique ID or name of the Role. + * @param updateRoleRequest + */ + updateRole(roleIdentifier, updateRoleRequest, _options) { + const result = this.api.updateRole(roleIdentifier, updateRoleRequest, _options); + return result.toPromise(); + } + /** + * Update schedule. Version: 9.4.0.cl or later Updates a scheduled Liveboard job. Requires at least edit access to Liveboards. To update a schedule on behalf of another user, you need `ADMINISTRATION` (**Can administer Org**) or `JOBSCHEDULING` (**Can schedule for others**) privilege and edit access to the Liveboard. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `JOBSCHEDULING` (**Can schedule for others**) privilege is required. The API endpoint allows you to pause a scheduled job, change the status of a paused job. You can also edit the recipients list, frequency of the job, format of the file to send to the recipients in email notifications, PDF options, and time zone setting. + * @param scheduleIdentifier Unique ID or name of the schedule. + * @param updateScheduleRequest + */ + updateSchedule(scheduleIdentifier, updateScheduleRequest, _options) { + const result = this.api.updateSchedule(scheduleIdentifier, updateScheduleRequest, _options); + return result.toPromise(); + } + /** + * Version: 9.2.0.cl or later Updates the current configuration of the cluster. You must send the configuration data in JSON format. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privileges. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `APPLICATION_ADMINISTRATION` (**Can manage application settings**) privilege is required. + * @param updateSystemConfigRequest + */ + updateSystemConfig(updateSystemConfigRequest, _options) { + const result = this.api.updateSystemConfig(updateSystemConfigRequest, _options); + return result.toPromise(); + } + /** + * Version: 9.0.0.cl or later Updates a tag object. You can modify the `name` and `color` properties of a tag object. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `TAGMANAGEMENT` (**Can manage tags**) privilege is required to create, edit, and delete tags. + * @param tagIdentifier Name or Id of the tag. + * @param updateTagRequest + */ + updateTag(tagIdentifier, updateTagRequest, _options) { + const result = this.api.updateTag(tagIdentifier, updateTagRequest, _options); + return result.toPromise(); + } + /** + * Version: 9.0.0.cl or later Updates the properties of a user object. You can modify user properties such as username, email, and share notification settings. You can also assign new groups and Orgs, remove the user from a group or Org, reset password, and modify user preferences. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `USER_ADMINISTRATION` (**Can manage users**) privilege is required. + * @param userIdentifier GUID / name of the user + * @param updateUserRequest + */ + updateUser(userIdentifier, updateUserRequest, _options) { + const result = this.api.updateUser(userIdentifier, updateUserRequest, _options); + return result.toPromise(); + } + /** + * Version: 9.0.0.cl or later Updates the properties of a group object in ThoughtSpot. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `GROUP_ADMINISTRATION` (**Can manage groups**) privilege is required. #### Supported operations This API endpoint lets you perform the following operations in a single API request: * Edit [privileges](https://developers.thoughtspot.com/docs/?pageid=api-user-management#group-privileges) * Add or remove users * Change sharing visibility settings * Add or remove sub-groups * Assign a default Liveboard or update the existing settings + * @param groupIdentifier GUID or name of the group. + * @param updateUserGroupRequest + */ + updateUserGroup(groupIdentifier, updateUserGroupRequest, _options) { + const result = this.api.updateUserGroup(groupIdentifier, updateUserGroupRequest, _options); + return result.toPromise(); + } + /** + * Update a variable\'s name Version: 26.4.0.cl or later Allows updating a variable\'s name in ThoughtSpot. Requires ADMINISTRATION role and TENANT scope. The CAN_MANAGE_VARIABLES permission allows you to manage Formula Variables in the current organization scope. The API endpoint allows updating: * The variable name + * @param identifier Unique id or name of the variable to update. + * @param updateVariableRequest + */ + updateVariable(identifier, updateVariableRequest, _options) { + const result = this.api.updateVariable(identifier, updateVariableRequest, _options); + return result.toPromise(); + } + /** + * Update values for multiple variables Version: 10.14.0.cl or later **Note:** This API endpoint is deprecated and will be removed from ThoughtSpot in a future release. Use [POST /api/rest/2.0/template/variables/{identifier}/update-values](/api/rest/2.0/template/variables/%7Bidentifier%7D/update-values) instead. Allows updating values for multiple variables in ThoughtSpot. Requires ADMINISTRATION role. The CAN_MANAGE_VARIABLES permission allows you to manage Formula Variables in the current organization scope. The API endpoint allows: * Adding new values to variables * Replacing existing values * Deleting values from variables When updating variable values, you need to specify: * The variable identifiers * The values to add/replace/remove for each variable * The operation to perform (ADD, REPLACE, REMOVE, RESET) Behaviour based on operation type: * ADD - Adds values to the variable if this is a list type variable, else same as replace. * REPLACE - Replaces all values of a given set of constraints with the current set of values. * REMOVE - Removes any values which match the set of conditions of the variables if this is a list type variable, else clears value. * RESET - Removes all constrains for a given variable, scope is ignored + * @param updateVariableValuesRequest + */ + updateVariableValues(updateVariableValuesRequest, _options) { + const result = this.api.updateVariableValues(updateVariableValuesRequest, _options); + return result.toPromise(); + } + /** + * Version: 10.14.0.cl or later Updates an existing webhook configuration by its unique id or name. Only the provided fields will be updated. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) or `DEVELOPER` (**Has developer privilege**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, users with `CAN_MANAGE_WEBHOOKS` (**Can manage webhooks**) privilege are also authorized to perform this action. + * @param webhookIdentifier Unique ID or name of the webhook configuration. + * @param updateWebhookConfigurationRequest + */ + updateWebhookConfiguration(webhookIdentifier, updateWebhookConfigurationRequest, _options) { + const result = this.api.updateWebhookConfiguration(webhookIdentifier, updateWebhookConfigurationRequest, _options); + return result.toPromise(); + } + /** + * Version: 26.4.0.cl or later Validates a communication channel configuration to ensure it is properly set up and can receive events. - Use `channel_type` to specify the type of communication channel to validate (e.g., WEBHOOK). - Use `channel_identifier` to provide the unique identifier or name for the communication channel. - Use `event_type` to specify the event type to validate for this channel. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) or `DEVELOPER` (**Has developer privilege**) privilege. For webhook channels, users with `CAN_MANAGE_WEBHOOKS` (**Can manage webhooks**) privilege are also authorized to perform this action. + * @param validateCommunicationChannelRequest + */ + validateCommunicationChannel(validateCommunicationChannelRequest, _options) { + const result = this.api.validateCommunicationChannel(validateCommunicationChannelRequest, _options); + return result.toPromise(); + } + /** + * Version: 10.10.0.cl or later Validates the email customization configuration if any set for the ThoughtSpot system. #### Pre-requisites Requires `DEVELOPER` (**has developer privilege**) or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `DEVELOPER` (**Has developer privilege**) privilege is required. **NOTE**:This endpoint in currently in beta. Contact ThoughtSpot support to enable this on your instance. + */ + validateEmailCustomization(_options) { + const result = this.api.validateEmailCustomization(_options); + return result.toPromise(); + } + /** + * Version: 9.2.0.cl or later Validates the content of your source branch against the objects in your destination environment. Before merging content from your source branch to the destination branch, run this API operation from your destination environment and ensure that the changes from the source branch function in the destination environment. Requires `DATAMANAGEMENT` (**Can manage data**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance on your instance, the `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` (**Can manage data models**) privilege and edit access to the metadata objects. + * @param validateMergeRequest + */ + validateMerge(validateMergeRequest, _options) { + const result = this.api.validateMerge(validateMergeRequest, _options); + return result.toPromise(); + } + /** + * Version: 9.12.0.cl or later Validates the authentication token specified in the API request. If your token is not valid, [Get a new token](#/http/api-endpoints/authentication/get-full-access-token). + * @param validateTokenRequest + */ + validateToken(validateTokenRequest, _options) { + const result = this.api.validateToken(validateTokenRequest, _options); + return result.toPromise(); + } +}; +var PromiseUsersApi = class { + constructor(configuration, requestFactory, responseProcessor) { + this.api = new ObservableUsersApi(configuration, requestFactory, responseProcessor); + } + /** + * Version: 9.7.0.cl or later Activates a deactivated user account. Requires `ADMINISTRATION` (**Can administer Thoughtspot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `USER_ADMINISTRATION` (**Can manage users**) privilege is required. To activate an inactive user account, the API request body must include the following information: - Username or the GUID of the user account. - Auth token generated for the deactivated user. The auth token is sent in the API response when a user is deactivated. - Password for the user account. + * @param activateUserRequest + */ + activateUser(activateUserRequest, _options) { + const result = this.api.activateUser(activateUserRequest, _options); + return result.toPromise(); + } + /** + * Version: 9.0.0.cl or later Updates the current password of the user. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `USER_ADMINISTRATION` (**Can manage users**) privilege is required. + * @param changeUserPasswordRequest + */ + changeUserPassword(changeUserPasswordRequest, _options) { + const result = this.api.changeUserPassword(changeUserPasswordRequest, _options); + return result.toPromise(); + } + /** + * Version: 9.0.0.cl or later Creates a user in ThoughtSpot. The API endpoint allows you to configure several user properties such as email address, account status, share notification preferences, and sharing visibility. You can provision the user to [groups](https://docs.thoughtspot.com/cloud/latest/groups-privileges) and [Orgs](https://docs.thoughtspot.com/cloud/latest/orgs-overview). You can also add Liveboard, Answer, and Worksheet objects to the user’s favorites list, assign a default Liveboard for the user, and set user preferences. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `USER_ADMINISTRATION` (**Can manage users**) privilege is required. + * @param createUserRequest + */ + createUser(createUserRequest, _options) { + const result = this.api.createUser(createUserRequest, _options); + return result.toPromise(); + } + /** + * Version: 9.7.0.cl or later Deactivates a user account. Requires `ADMINISTRATION` (**Can administer Thoughtspot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `USER_ADMINISTRATION` (**Can manage users**) privilege is required. To deactivate a user account, the API request body must include the following information: - Username or the GUID of the user account - Base URL of the ThoughtSpot instance If the API request is successful, ThoughtSpot returns the activation URL in the response. The activation URL is valid for 14 days and can be used to re-activate the account and reset the password of the deactivated account. + * @param deactivateUserRequest + */ + deactivateUser(deactivateUserRequest, _options) { + const result = this.api.deactivateUser(deactivateUserRequest, _options); + return result.toPromise(); + } + /** + * Version: 9.0.0.cl or later Deletes a user from the ThoughtSpot system. If you want to remove a user from a specific Org but not from ThoughtSpot, update the group and Org mapping properties of the user object via a POST API call to the [/api/rest/2.0/users/{user_identifier}/update](#/http/api-endpoints/users/update-user) endpoint. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `USER_ADMINISTRATION` (**Can manage users**) privilege is required. + * @param userIdentifier GUID / name of the user + */ + deleteUser(userIdentifier, _options) { + const result = this.api.deleteUser(userIdentifier, _options); + return result.toPromise(); + } + /** + * Version: 9.0.0.cl or later Enforces logout on current user sessions. Use this API with caution as it may invalidate active user sessions and force users to re-login. Make sure you specify the usernames or GUIDs. If you pass null values in the API call, all user sessions on your cluster become invalid, and the users are forced to re-login. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `USER_ADMINISTRATION` (**Can manage users**) privilege is required. + * @param forceLogoutUsersRequest + */ + forceLogoutUsers(forceLogoutUsersRequest, _options) { + const result = this.api.forceLogoutUsers(forceLogoutUsersRequest, _options); + return result.toPromise(); + } + /** + * Version: 9.0.0.cl or later Imports user data from external databases into ThoughtSpot. During the user import operation: * If the specified users are not available in ThoughtSpot, the users are created and assigned a default password. Defining a `default_password` in the API request is optional. * If `delete_unspecified_users` is set to `true`, the users not specified in the API request, excluding the `tsadmin`, `guest`, `system` and `su` users, are deleted. * If the specified user objects are already available in ThoughtSpot, the object properties are updated and synchronized as per the input data in the API request. A successful API call returns the object that represents the changes made in the ThoughtSpot system. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `USER_ADMINISTRATION` (**Can manage users**) privilege is required. + * @param importUsersRequest + */ + importUsers(importUsersRequest, _options) { + const result = this.api.importUsers(importUsersRequest, _options); + return result.toPromise(); + } + /** + * Version: 9.0.0.cl or later Resets the password of a user account. Administrators can reset password on behalf of a user. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `USER_ADMINISTRATION` (**Can manage users**) privilege is required. + * @param resetUserPasswordRequest + */ + resetUserPassword(resetUserPasswordRequest, _options) { + const result = this.api.resetUserPassword(resetUserPasswordRequest, _options); + return result.toPromise(); + } + /** + * Version: 9.0.0.cl or later Gets a list of users available on the ThoughtSpot system. To get details of a specific user, specify the user GUID or name. You can also filter the API response based on groups, Org ID, user visibility, account status, user type, and user preference settings and favorites. Available to all users. Users with `ADMINISTRATION` (**Can administer ThoughtSpot**) privileges can view all users properties. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `USER_ADMINISTRATION` (**Can manage users**) privilege is required. **NOTE**: If the API returns an empty list, consider increasing the value of the `record_size` parameter. To search across all available users, set `record_size` to `-1`. + * @param searchUsersRequest + */ + searchUsers(searchUsersRequest, _options) { + const result = this.api.searchUsers(searchUsersRequest, _options); + return result.toPromise(); + } + /** + * Version: 9.0.0.cl or later Updates the properties of a user object. You can modify user properties such as username, email, and share notification settings. You can also assign new groups and Orgs, remove the user from a group or Org, reset password, and modify user preferences. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `USER_ADMINISTRATION` (**Can manage users**) privilege is required. + * @param userIdentifier GUID / name of the user + * @param updateUserRequest + */ + updateUser(userIdentifier, updateUserRequest, _options) { + const result = this.api.updateUser(userIdentifier, updateUserRequest, _options); + return result.toPromise(); + } +}; +var PromiseVariableApi = class { + constructor(configuration, requestFactory, responseProcessor) { + this.api = new ObservableVariableApi(configuration, requestFactory, responseProcessor); + } + /** + * Create a variable which can be used for parameterizing metadata objects Version: 26.4.0.cl or later Allows creating a variable which can be used for parameterizing metadata objects in ThoughtSpot. Requires ADMINISTRATION role and TENANT scope. The CAN_MANAGE_VARIABLES permission allows you to manage Formula Variables in the current organization scope. The API endpoint supports the following types of variables: * CONNECTION_PROPERTY - For connection properties * TABLE_MAPPING - For table mappings * CONNECTION_PROPERTY_PER_PRINCIPAL - For connection properties per principal. In order to use this please contact support to enable this. * FORMULA_VARIABLE - For Formula variables, introduced in 10.15.0.cl When creating a variable, you need to specify: * The variable type * A unique name for the variable * Whether the variable contains sensitive values (defaults to false) * The data type of the variable, only specify for formula variables (defaults to null) The operation will fail if: * The user lacks required permissions * The variable name already exists * The variable type is invalid + * @param createVariableRequest + */ + createVariable(createVariableRequest, _options) { + const result = this.api.createVariable(createVariableRequest, _options); + return result.toPromise(); + } + /** + * Delete a variable Version: 10.14.0.cl or later **Note:** This API endpoint is deprecated and will be removed from ThoughtSpot in a future release. Use [POST /api/rest/2.0/template/variables/delete](/api/rest/2.0/template/variables/delete) instead. Allows deleting a variable from ThoughtSpot. Requires ADMINISTRATION role and TENANT scope. The CAN_MANAGE_VARIABLES permission allows you to manage Formula Variables in the current organization scope. The API endpoint requires: * The variable identifier (ID or name) The operation will fail if: * The user lacks required permissions * The variable doesn\'t exist * The variable is being used by other objects + * @param identifier Unique id or name of the variable + */ + deleteVariable(identifier, _options) { + const result = this.api.deleteVariable(identifier, _options); + return result.toPromise(); + } + /** + * Delete variable(s) Version: 26.4.0.cl or later Allows deleting multiple variables from ThoughtSpot. Requires ADMINISTRATION role and TENANT scope. The CAN_MANAGE_VARIABLES permission allows you to manage Formula Variables in the current organization scope. The API endpoint requires: * The variable identifiers (IDs or names) The operation will fail if: * The user lacks required permissions * Any of the variables don\'t exist * Any of the variables are being used by other objects + * @param deleteVariablesRequest + */ + deleteVariables(deleteVariablesRequest, _options) { + const result = this.api.deleteVariables(deleteVariablesRequest, _options); + return result.toPromise(); + } + /** + * Update values for a variable Version: 26.4.0.cl or later Allows updating values for a specific variable in ThoughtSpot. Requires ADMINISTRATION role. The CAN_MANAGE_VARIABLES permission allows you to manage Formula Variables in the current organization scope. The API endpoint allows: * Adding new values to the variable * Replacing existing values * Deleting values from the variable * Resetting all values When updating variable values, you need to specify: * The variable identifier (ID or name) * The values to add/replace/remove * The operation to perform (ADD, REPLACE, REMOVE, RESET) Behaviour based on operation type: * ADD - Adds values to the variable if this is a list type variable, else same as replace. * REPLACE - Replaces all values of a given set of constraints with the current set of values. * REMOVE - Removes any values which match the set of conditions of the variables if this is a list type variable, else clears value. * RESET - Removes all constraints for the given variable, scope is ignored + * @param identifier Unique ID or name of the variable + * @param putVariableValuesRequest + */ + putVariableValues(identifier, putVariableValuesRequest, _options) { + const result = this.api.putVariableValues(identifier, putVariableValuesRequest, _options); + return result.toPromise(); + } + /** + * Search variables Version: 26.4.0.cl or later Allows searching for variables in ThoughtSpot. Requires ADMINISTRATION role. The CAN_MANAGE_VARIABLES permission allows you to manage Formula Variables in the current organization scope. The API endpoint supports searching variables by: * Variable identifier (ID or name) * Variable type * Name pattern (case-insensitive, supports % for wildcard) The search results can be formatted in three ways: * METADATA - Returns only variable metadata (default) * METADATA_AND_VALUES - Returns variable metadata and values The values can be filtered by scope: * org_identifier * principal_identifier * model_identifier + * @param searchVariablesRequest + */ + searchVariables(searchVariablesRequest, _options) { + const result = this.api.searchVariables(searchVariablesRequest, _options); + return result.toPromise(); + } + /** + * Update a variable\'s name Version: 26.4.0.cl or later Allows updating a variable\'s name in ThoughtSpot. Requires ADMINISTRATION role and TENANT scope. The CAN_MANAGE_VARIABLES permission allows you to manage Formula Variables in the current organization scope. The API endpoint allows updating: * The variable name + * @param identifier Unique id or name of the variable to update. + * @param updateVariableRequest + */ + updateVariable(identifier, updateVariableRequest, _options) { + const result = this.api.updateVariable(identifier, updateVariableRequest, _options); + return result.toPromise(); + } + /** + * Update values for multiple variables Version: 10.14.0.cl or later **Note:** This API endpoint is deprecated and will be removed from ThoughtSpot in a future release. Use [POST /api/rest/2.0/template/variables/{identifier}/update-values](/api/rest/2.0/template/variables/%7Bidentifier%7D/update-values) instead. Allows updating values for multiple variables in ThoughtSpot. Requires ADMINISTRATION role. The CAN_MANAGE_VARIABLES permission allows you to manage Formula Variables in the current organization scope. The API endpoint allows: * Adding new values to variables * Replacing existing values * Deleting values from variables When updating variable values, you need to specify: * The variable identifiers * The values to add/replace/remove for each variable * The operation to perform (ADD, REPLACE, REMOVE, RESET) Behaviour based on operation type: * ADD - Adds values to the variable if this is a list type variable, else same as replace. * REPLACE - Replaces all values of a given set of constraints with the current set of values. * REMOVE - Removes any values which match the set of conditions of the variables if this is a list type variable, else clears value. * RESET - Removes all constrains for a given variable, scope is ignored + * @param updateVariableValuesRequest + */ + updateVariableValues(updateVariableValuesRequest, _options) { + const result = this.api.updateVariableValues(updateVariableValuesRequest, _options); + return result.toPromise(); + } +}; +var PromiseVersionControlApi = class { + constructor(configuration, requestFactory, responseProcessor) { + this.api = new ObservableVersionControlApi(configuration, requestFactory, responseProcessor); + } + /** + * Version: 9.2.0.cl or later Commits TML files of metadata objects to the Git branch configured on your instance. Requires at least edit access to objects used in the commit operation. Before using this endpoint to push your commits: * Enable Git integration on your instance. * Make sure the Git repository and branch details are configured on your instance. For more information, see [Git integration documentation](https://developers.thoughtspot.com/docs/git-integration). + * @param commitBranchRequest + */ + commitBranch(commitBranchRequest, _options) { + const result = this.api.commitBranch(commitBranchRequest, _options); + return result.toPromise(); + } + /** + * Version: 9.2.0.cl or later Allows you to connect a ThoughtSpot instance to a Git repository. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance on your instance, the `CAN_SETUP_VERSION_CONTROL` (**Can set up version control**) privilege. You can use this API endpoint to connect your ThoughtSpot development and production environments to the development and production branches of a Git repository. Before using this endpoint to connect your ThoughtSpot instance to a Git repository, check the following prerequisites: * You have a Git repository. If you are using GitHub, make sure you have a valid account and an access token to connect ThoughtSpot to GitHub. For information about generating a token, see [GitHub Documentation](https://docs.github.com/en/authentication/keeping-your-account-and-data-secure/managing-your-personal-access-tokens). * Your access token has `repo` scope that grants full access to public and private repositories. * Your Git repository has a branch that can be configured as a default branch in ThoughtSpot. For more information, see [Git integration documentation](https://developers.thoughtspot.com/docs/?pageid=git-integration). **Note**: ThoughtSpot supports only GitHub / itHub Enterprise for CI/CD. + * @param createConfigRequest + */ + createConfig(createConfigRequest, _options) { + const result = this.api.createConfig(createConfigRequest, _options); + return result.toPromise(); + } + /** + * Version: 9.2.0.cl or later Deletes Git repository configuration from your ThoughtSpot instance. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance on your instance, the `CAN_SETUP_VERSION_CONTROL` (**Can set up version control**) privilege. + * @param deleteConfigRequest + */ + deleteConfig(deleteConfigRequest, _options) { + const result = this.api.deleteConfig(deleteConfigRequest, _options); + return result.toPromise(); + } + /** + * Version: 9.2.0.cl or later Allows you to deploy a commit and publish TML content to your ThoughtSpot instance. Requires at least edit access to the objects used in the deploy operation. The API deploys the head of the branch unless a `commit_id` is specified in the API request. If the branch name is not defined in the request, the default branch is considered for deploying commits. For more information, see [Git integration documentation](https://developers.thoughtspot.com/docs/git-integration). + * @param deployCommitRequest + */ + deployCommit(deployCommitRequest, _options) { + const result = this.api.deployCommit(deployCommitRequest, _options); + return result.toPromise(); + } + /** + * Version: 9.2.0.cl or later Reverts TML objects to a previous commit specified in the API request. Requires at least edit access to objects. In the API request, specify the `commit_id`. If the branch name is not specified in the request, the API will consider the default branch configured on your instance. By default, the API reverts all objects. If the revert operation fails for one of the objects provided in the commit, the API returns an error and does not revert any object. For more information, see [Git integration documentation](https://developers.thoughtspot.com/docs/git-integration). + * @param commitId Commit id to which the object should be reverted + * @param revertCommitRequest + */ + revertCommit(commitId, revertCommitRequest, _options) { + const result = this.api.revertCommit(commitId, revertCommitRequest, _options); + return result.toPromise(); + } + /** + * Version: 9.2.0.cl or later Gets a list of commits for a given metadata object. Requires `DATAMANAGEMENT` (**Can manage data**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance on your instance, the `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` (**Can manage data models**) privilege and edit access to the metadata objects. + * @param searchCommitsRequest + */ + searchCommits(searchCommitsRequest, _options) { + const result = this.api.searchCommits(searchCommitsRequest, _options); + return result.toPromise(); + } + /** + * Version: 9.2.0.cl or later Gets Git repository connections configured on the ThoughtSpot instance. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance on your instance, the `CAN_SETUP_VERSION_CONTROL` (**Can set up version control**) privilege. + * @param searchConfigRequest + */ + searchConfig(searchConfigRequest, _options) { + const result = this.api.searchConfig(searchConfigRequest, _options); + return result.toPromise(); + } + /** + * Version: 9.2.0.cl or later Updates Git repository configuration settings. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance on your instance, the `CAN_SETUP_VERSION_CONTROL` (**Can set up version control**) privilege. + * @param updateConfigRequest + */ + updateConfig(updateConfigRequest, _options) { + const result = this.api.updateConfig(updateConfigRequest, _options); + return result.toPromise(); + } + /** + * Version: 9.2.0.cl or later Validates the content of your source branch against the objects in your destination environment. Before merging content from your source branch to the destination branch, run this API operation from your destination environment and ensure that the changes from the source branch function in the destination environment. Requires `DATAMANAGEMENT` (**Can manage data**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance on your instance, the `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` (**Can manage data models**) privilege and edit access to the metadata objects. + * @param validateMergeRequest + */ + validateMerge(validateMergeRequest, _options) { + const result = this.api.validateMerge(validateMergeRequest, _options); + return result.toPromise(); + } +}; +var PromiseWebhooksApi = class { + constructor(configuration, requestFactory, responseProcessor) { + this.api = new ObservableWebhooksApi(configuration, requestFactory, responseProcessor); + } + /** + * Version: 10.14.0.cl or later Creates a new webhook configuration to receive notifications for specified events. The webhook will be triggered when the configured events occur in the system. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) or `DEVELOPER` (**Has developer privilege**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, users with `CAN_MANAGE_WEBHOOKS` (**Can manage webhooks**) privilege are also authorized to perform this action. + * @param createWebhookConfigurationRequest + */ + createWebhookConfiguration(createWebhookConfigurationRequest, _options) { + const result = this.api.createWebhookConfiguration(createWebhookConfigurationRequest, _options); + return result.toPromise(); + } + /** + * Version: 10.14.0.cl or later Deletes one or more webhook configurations by their unique id or name. Returns status of each deletion operation, including successfully deleted webhooks and any failures with error details. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) or `DEVELOPER` (**Has developer privilege**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, users with `CAN_MANAGE_WEBHOOKS` (**Can manage webhooks**) privilege are also authorized to perform this action. + * @param deleteWebhookConfigurationsRequest + */ + deleteWebhookConfigurations(deleteWebhookConfigurationsRequest, _options) { + const result = this.api.deleteWebhookConfigurations(deleteWebhookConfigurationsRequest, _options); + return result.toPromise(); + } + /** + * Version: 10.14.0.cl or later Searches for webhook configurations based on various criteria such as Org, webhook identifier, event type, with support for pagination and sorting. Returns matching webhook configurations with their complete details. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) or `DEVELOPER` (**Has developer privilege**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, users with `CAN_MANAGE_WEBHOOKS` (**Can manage webhooks**) privilege are also authorized to perform this action. + * @param searchWebhookConfigurationsRequest + */ + searchWebhookConfigurations(searchWebhookConfigurationsRequest, _options) { + const result = this.api.searchWebhookConfigurations(searchWebhookConfigurationsRequest, _options); + return result.toPromise(); + } + /** + * Version: 10.14.0.cl or later Updates an existing webhook configuration by its unique id or name. Only the provided fields will be updated. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) or `DEVELOPER` (**Has developer privilege**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, users with `CAN_MANAGE_WEBHOOKS` (**Can manage webhooks**) privilege are also authorized to perform this action. + * @param webhookIdentifier Unique ID or name of the webhook configuration. + * @param updateWebhookConfigurationRequest + */ + updateWebhookConfiguration(webhookIdentifier, updateWebhookConfigurationRequest, _options) { + const result = this.api.updateWebhookConfiguration(webhookIdentifier, updateWebhookConfigurationRequest, _options); + return result.toPromise(); + } +}; + +// utils/config.ts +var createAdditionalHeadersMiddleware = (additionalHeaders) => { + return { + /** + * Pre-request middleware to add custom headers to every API call + * @param requestContext - The request context to modify + */ + pre: (requestContext) => { + Object.entries(additionalHeaders).forEach(([headerName, headerValue]) => { + requestContext.setHeaderParam(headerName, headerValue); + }); + return Promise.resolve(requestContext); + }, + /** + * Post-request middleware for response processing + * @param responseContext - The response context + */ + post: (responseContext) => Promise.resolve(responseContext) + }; +}; +var createBearerAuthenticationConfig = (thoughtSpotHost, paramOrTokenProvider, options) => { + const serverConfig = new ServerConfiguration( + thoughtSpotHost, + {} + ); + const additionalHeaders = options == null ? void 0 : options.additionalHeaders; + let middleware = []; + if (additionalHeaders && Object.keys(additionalHeaders).length > 0) { + middleware.push(createAdditionalHeadersMiddleware(additionalHeaders)); + } + const config = createConfiguration({ + baseServer: serverConfig, + promiseMiddleware: middleware + }); + const authApiClient = new PromiseAuthenticationApi(config); + let configTokenProvider; + if (paramOrTokenProvider.hasOwnProperty("username")) { + configTokenProvider = { + getToken: () => __async(void 0, null, function* () { + const token = (yield authApiClient.getFullAccessToken(paramOrTokenProvider)).token; + return token; + }) + }; + } else if (typeof paramOrTokenProvider === "function") { + configTokenProvider = { + getToken: paramOrTokenProvider + }; + } else { + throw new Error("Pass a proper GetFullAccessTokenRequest or a function which returns a token"); + } + const authConfig = { + bearerAuth: { + tokenProvider: configTokenProvider + } + }; + const globalConfig = createConfiguration({ + authMethods: authConfig, + baseServer: serverConfig, + promiseMiddleware: middleware + }); + return globalConfig; +}; +var createBasicConfig = (thoughtSpotHost, options) => { + const thoughtSpotServer = new ServerConfiguration(thoughtSpotHost, {}); + const additionalHeaders = options == null ? void 0 : options.additionalHeaders; + let middleware = []; + if (additionalHeaders && Object.keys(additionalHeaders).length > 0) { + middleware.push(createAdditionalHeadersMiddleware(additionalHeaders)); + } + const basicClientConfig = createConfiguration({ + baseServer: thoughtSpotServer, + promiseMiddleware: middleware + }); + return basicClientConfig; +}; +// Annotate the CommonJS export names for ESM import in node: +0 && (module.exports = { + AIApi, + AIContext, + APIKey, + APIKeyInput, + AccessToken, + ActionConfig, + ActionConfigInput, + ActionConfigInputCreate, + ActionDetails, + ActionDetailsInput, + ActionDetailsInputCreate, + ActivateUserRequest, + AgentConversation, + AnswerContent, + AnswerDataResponse, + AnswerPngOptionsInput, + ApiException, + AssignChangeAuthorRequest, + AssignTagRequest, + AssociateMetadataInput, + AssociateMetadataInputCreate, + AuthClusterPreferences, + AuthClusterPreferencesInput, + AuthOrgInfo, + AuthOrgPreference, + AuthOrgPreferenceInput, + AuthSettingsAccessToken, + Authentication, + AuthenticationApi, + AuthenticationInput, + Author, + AuthorMetadataTypeInput, + AuthorType, + AwsS3Config, + AwsS3ConfigInput, + BasicAuth, + BasicAuthInput, + BearerAuthAuthentication, + CALLBACK, + CALLBACKInput, + CALLBACKInputMandatory, + CalendarResponse, + ChangeUserPasswordRequest, + ChannelHistoryEventInfo, + ChannelHistoryEventInput, + ChannelHistoryJob, + ChannelValidationAwsS3Info, + ChannelValidationDetail, + ClusterNonEmbedAccess, + ClusterNonEmbedAccessInput, + Collection, + CollectionDeleteResponse, + CollectionDeleteTypeIdentifiers, + CollectionEntityIdentifier, + CollectionMetadataInput, + CollectionMetadataItem, + CollectionSearchResponse, + CollectionsApi, + Column, + ColumnSecurityRule, + ColumnSecurityRuleColumn, + ColumnSecurityRuleGroup, + ColumnSecurityRuleGroupOperation, + ColumnSecurityRuleResponse, + ColumnSecurityRuleSourceTable, + ColumnSecurityRuleTableInput, + ColumnSecurityRuleUpdate, + CommitBranchRequest, + CommitFileType, + CommitHistoryResponse, + CommitResponse, + CommiterType, + CommunicationChannelPreferencesResponse, + CommunicationChannelValidateResponse, + ConfigureAuthSettingsRequest, + ConfigureAuthSettingsRequestClusterPreferences, + ConfigureCommunicationChannelPreferencesRequest, + ConfigureSecuritySettingsRequest, + ConfigureSecuritySettingsRequestClusterPreferences, + ConnectionConfigurationResponse, + ConnectionConfigurationSearchRequest, + ConnectionConfigurationsApi, + ConnectionInput, + ConnectionsApi, + ContextPayloadV2Input, + Conversation, + ConversationSettingsInput, + ConvertWorksheetToModelRequest, + CopyObjectRequest, + CreateAgentConversationRequest, + CreateAgentConversationRequestConversationSettings, + CreateAgentConversationRequestMetadataContext, + CreateCalendarRequest, + CreateCalendarRequestTableReference, + CreateCollectionRequest, + CreateConfigRequest, + CreateConnectionConfigurationRequest, + CreateConnectionConfigurationRequestPolicyProcessOptions, + CreateConnectionRequest, + CreateConnectionResponse, + CreateConversationRequest, + CreateCustomActionRequest, + CreateCustomActionRequestActionDetails, + CreateCustomActionRequestDefaultActionConfig, + CreateEmailCustomizationRequest, + CreateEmailCustomizationRequestTemplateProperties, + CreateEmailCustomizationResponse, + CreateOrgRequest, + CreateRoleRequest, + CreateScheduleRequest, + CreateScheduleRequestFrequency, + CreateScheduleRequestLiveboardOptions, + CreateScheduleRequestPdfOptions, + CreateScheduleRequestRecipientDetails, + CreateTagRequest, + CreateUserGroupRequest, + CreateUserRequest, + CreateVariableRequest, + CreateWebhookConfigurationRequest, + CreateWebhookConfigurationRequestAuthentication, + CreateWebhookConfigurationRequestSignatureVerification, + CreateWebhookConfigurationRequestStorageDestination, + CronExpression, + CronExpressionInput, + CspSettings, + CspSettingsInput, + CustomActionApi, + CustomActionMetadataTypeInput, + CustomCalendarsApi, + DBTApi, + DataApi, + DataSource, + DataSourceContextInput, + DataWarehouseObjectInput, + DataWarehouseObjects, + Database, + DbtSearchResponse, + DeactivateUserRequest, + DefaultActionConfig, + DefaultActionConfigInput, + DefaultActionConfigInputCreate, + DefaultActionConfigSearchInput, + DeleteCollectionRequest, + DeleteConfigRequest, + DeleteConnectionConfigurationRequest, + DeleteConnectionRequest, + DeleteMetadataRequest, + DeleteMetadataTypeInput, + DeleteOrgEmailCustomizationRequest, + DeleteVariablesRequest, + DeleteWebhookConfigurationsRequest, + DeployCommitRequest, + DeployResponse, + EmailCustomizationApi, + EntityHeader, + ErrorResponse, + EurekaDataSourceSuggestionResponse, + EurekaDecomposeQueryResponse, + EurekaGetNLInstructionsResponse, + EurekaGetRelevantQuestionsResponse, + EurekaLLMDecomposeQueryResponse, + EurekaLLMSuggestedQuery, + EurekaRelevantQuestion, + EurekaSetNLInstructionsResponse, + EventChannelConfig, + EventChannelConfigInput, + ExcludeMetadataListItemInput, + ExportAnswerReportRequest, + ExportAnswerReportRequestPngOptions, + ExportAnswerReportRequestRegionalSettings, + ExportLiveboardReportRequest, + ExportLiveboardReportRequestPdfOptions, + ExportLiveboardReportRequestPngOptions, + ExportMetadataTMLBatchedRequest, + ExportMetadataTMLRequest, + ExportMetadataTMLRequestExportOptions, + ExportMetadataTypeInput, + ExportOptions, + ExternalTableInput, + FavoriteMetadataInput, + FavoriteMetadataItem, + FavoriteObjectOptionsInput, + FetchAnswerDataRequest, + FetchAnswerSqlQueryRequest, + FetchAsyncImportTaskStatusRequest, + FetchColumnSecurityRulesRequest, + FetchConnectionDiffStatusResponse, + FetchLiveboardDataRequest, + FetchLiveboardSqlQueryRequest, + FetchLogsRequest, + FetchObjectPrivilegesRequest, + FetchPermissionsOfPrincipalsRequest, + FetchPermissionsOnMetadataRequest, + FilterRules, + ForceLogoutUsersRequest, + Frequency, + FrequencyInput, + GenerateCSVRequest, + GenericInfo, + GetAsyncImportStatusResponse, + GetCustomAccessTokenRequest, + GetDataSourceSuggestionsRequest, + GetFullAccessTokenRequest, + GetFullAccessTokenRequestUserParameters, + GetNLInstructionsRequest, + GetObjectAccessTokenRequest, + GetRelevantQuestionsRequest, + GetRelevantQuestionsRequestAiContext, + GetRelevantQuestionsRequestMetadataContext, + GetTokenResponse, + GroupInfo, + GroupObject, + GroupsApi, + GroupsImportListInput, + HeaderAttributeInput, + HeaderUpdateInput, + HttpException, + HttpMethod, + ImportEPackAsyncTaskStatus, + ImportMetadataTMLAsyncRequest, + ImportMetadataTMLRequest, + ImportUser, + ImportUserGroupsRequest, + ImportUserGroupsResponse, + ImportUserType, + ImportUsersRequest, + ImportUsersResponse, + InputEurekaNLSRequest, + IsomorphicFetchHttpLibrary, + JWTMetadataObject, + JWTParameter, + JWTUserOptions, + JWTUserOptionsFull, + JobRecipient, + JobsApi, + LiveboardContent, + LiveboardDataResponse, + LiveboardOptions, + LiveboardOptionsInput, + LogApi, + LogResponse, + LoginRequest, + ManageObjectPrivilegeRequest, + MetadataApi, + MetadataAssociationItem, + MetadataContext, + MetadataInput, + MetadataListItemInput, + MetadataObject, + MetadataResponse, + MetadataSearchResponse, + MetadataSearchSortOptions, + ModelTableList, + NLInstructionsInfo, + NLInstructionsInfoInput, + ObjectIDAndName, + ObjectPrivilegesMetadataInput, + ObjectPrivilegesOfMetadataResponse, + Org, + OrgChannelConfigInput, + OrgChannelConfigResponse, + OrgDetails, + OrgInfo, + OrgNonEmbedAccess, + OrgNonEmbedAccessInput, + OrgPreferenceSearchCriteriaInput, + OrgResponse, + OrgType, + OrgsApi, + ParameterValues, + ParameterizeMetadataFieldsRequest, + ParameterizeMetadataRequest, + ParametersListItem, + ParametersListItemInput, + PdfOptions, + PdfOptionsInput, + PermissionInput, + PermissionOfMetadataResponse, + PermissionOfPrincipalsResponse, + PermissionsMetadataTypeInput, + PngOptionsInput, + PolicyProcessOptions, + PolicyProcessOptionsInput, + PrincipalsInput, + PrincipalsListItem, + PrincipalsListItemInput, + PublishMetadataListItem, + PublishMetadataRequest, + PutVariableValuesRequest, + QueryGetDecomposedQueryRequest, + QueryGetDecomposedQueryRequestNlsRequest, + RecipientDetails, + RecipientDetailsInput, + RegionalSettingsInput, + RepoConfigObject, + ReportsApi, + RequestContext, + RequiredError, + ResetUserPasswordRequest, + ResponseActivationURL, + ResponseContext, + ResponseCopyObject, + ResponseCustomAction, + ResponseFailedEntities, + ResponseFailedEntity, + ResponseIncompleteEntities, + ResponseIncompleteEntity, + ResponseMessage, + ResponsePostUpgradeFailedEntities, + ResponsePostUpgradeFailedEntity, + ResponseSchedule, + ResponseScheduleRun, + ResponseSuccessfulEntities, + ResponseSuccessfulEntity, + ResponseWorksheetToModelConversion, + RevertCommitRequest, + RevertResponse, + RevertedMetadata, + RevokeRefreshTokensRequest, + RevokeRefreshTokensResponse, + RevokeTokenRequest, + RiseGQLArgWrapper, + RiseSetter, + Role, + RoleResponse, + RolesApi, + RuntimeFilter, + RuntimeFilters, + RuntimeParamOverride, + RuntimeParameters, + RuntimeSort, + RuntimeSorts, + ScheduleHistoryRunsOptionsInput, + SchedulesApi, + SchedulesPdfOptionsInput, + SchemaObject, + Scope, + ScriptSrcUrls, + ScriptSrcUrlsInput, + SearchAuthSettingsRequest, + SearchAuthSettingsResponse, + SearchCalendarsRequest, + SearchCalendarsRequestSortOptions, + SearchChannelHistoryRequest, + SearchChannelHistoryResponse, + SearchCollectionsRequest, + SearchCollectionsRequestSortOptions, + SearchCommitsRequest, + SearchCommunicationChannelPreferencesRequest, + SearchConfigRequest, + SearchConnectionRequest, + SearchConnectionRequestSortOptions, + SearchConnectionResponse, + SearchCustomActionsRequest, + SearchCustomActionsRequestDefaultActionConfig, + SearchDataRequest, + SearchDataResponse, + SearchEmailCustomizationRequest, + SearchMetadataRequest, + SearchMetadataRequestFavoriteObjectOptions, + SearchMetadataRequestSortOptions, + SearchOrgsRequest, + SearchRoleResponse, + SearchRolesRequest, + SearchSchedulesRequest, + SearchSchedulesRequestHistoryRunsOptions, + SearchSchedulesRequestSortOptions, + SearchSecuritySettingsRequest, + SearchTagsRequest, + SearchUserGroupsRequest, + SearchUserGroupsRequestSortOptions, + SearchUsersRequest, + SearchVariablesRequest, + SearchWebhookConfigurationsRequest, + SearchWebhookConfigurationsRequestSortOptions, + SecurityApi, + SecuritySettingsClusterPreferences, + SecuritySettingsClusterPreferencesInput, + SecuritySettingsOrgDetails, + SecuritySettingsOrgPreferences, + SecuritySettingsOrgPreferencesInput, + SecuritySettingsResponse, + SelfDecodingBody, + SendAgentConversationMessageRequest, + SendAgentConversationMessageStreamingRequest, + SendAgentMessageRequest, + SendAgentMessageResponse, + SendAgentMessageStreamingRequest, + SendMessageRequest, + ServerConfiguration, + SetNLInstructionsRequest, + ShareMetadataRequest, + ShareMetadataTypeInput, + SharePermissionsInput, + SingleAnswerRequest, + SortOption, + SortOptionInput, + SortOptions, + SortingOptions, + SqlQuery, + SqlQueryResponse, + StorageConfig, + StorageConfigInput, + StorageDestination, + StorageDestinationInput, + SyncMetadataRequest, + SyncMetadataResponse, + SystemApi, + SystemConfig, + SystemInfo, + SystemOverrideInfo, + Table, + Tag, + TagMetadataTypeInput, + TagsApi, + TemplatePropertiesInputCreate, + ThoughtSpotRestApi, + Token, + TokenAccessScopeObject, + TokenValidationResponse, + URL, + URLInput, + URLInputMandatory, + UnassignTagRequest, + UnparameterizeMetadataRequest, + UnpublishMetadataRequest, + UpdateCalendarRequest, + UpdateCalendarRequestTableReference, + UpdateCollectionRequest, + UpdateColumnSecurityRulesRequest, + UpdateConfigRequest, + UpdateConnectionConfigurationRequest, + UpdateConnectionRequest, + UpdateConnectionStatusRequest, + UpdateConnectionV2Request, + UpdateCustomActionRequest, + UpdateCustomActionRequestActionDetails, + UpdateCustomActionRequestDefaultActionConfig, + UpdateEmailCustomizationRequest, + UpdateMetadataHeaderRequest, + UpdateMetadataObjIdRequest, + UpdateObjIdInput, + UpdateOrgRequest, + UpdateRoleRequest, + UpdateScheduleRequest, + UpdateScheduleRequestFrequency, + UpdateScheduleRequestLiveboardOptions, + UpdateScheduleRequestPdfOptions, + UpdateScheduleRequestRecipientDetails, + UpdateSystemConfigRequest, + UpdateTagRequest, + UpdateUserGroupRequest, + UpdateUserRequest, + UpdateVariableRequest, + UpdateVariableValuesRequest, + UpdateWebhookConfigurationRequest, + User, + UserGroup, + UserGroupResponse, + UserInfo, + UserObject, + UserParameterOptions, + UserPrincipal, + UsersApi, + ValidateCommunicationChannelRequest, + ValidateMergeRequest, + ValidateTokenRequest, + ValueScopeInput, + Variable, + VariableApi, + VariableDetailInput, + VariableOrgInfo, + VariablePutAssignmentInput, + VariableUpdateAssignmentInput, + VariableUpdateScopeInput, + VariableValue, + VariableValues, + VersionControlApi, + WebhookAuthApiKey, + WebhookAuthApiKeyInput, + WebhookAuthBasicAuth, + WebhookAuthBasicAuthInput, + WebhookAuthOAuth2, + WebhookAuthOAuth2Input, + WebhookAuthentication, + WebhookAuthenticationInput, + WebhookDeleteFailure, + WebhookDeleteResponse, + WebhookKeyValuePair, + WebhookKeyValuePairInput, + WebhookOrg, + WebhookPagination, + WebhookResponse, + WebhookSearchResponse, + WebhookSignatureVerification, + WebhookSignatureVerificationInput, + WebhookSortOptionsInput, + WebhookUser, + WebhooksApi, + configureAuthMethods, + createBasicConfig, + createBearerAuthenticationConfig, + createConfiguration, + server1, + servers, + wrapHttpLibrary +}); diff --git a/sdks/typescript/dist/index.d.cts b/sdks/typescript/dist/index.d.cts new file mode 100644 index 000000000..e8883f81f --- /dev/null +++ b/sdks/typescript/dist/index.d.cts @@ -0,0 +1,27511 @@ +declare class Observable { + private promise; + constructor(promise: Promise); + toPromise(): Promise; + pipe(callback: (value: T) => S | Promise): Observable; +} + +declare class IsomorphicFetchHttpLibrary implements HttpLibrary { + send(request: RequestContext): Observable; +} + +/** + * Represents an HTTP method. + */ +declare enum HttpMethod { + GET = "GET", + HEAD = "HEAD", + POST = "POST", + PUT = "PUT", + DELETE = "DELETE", + CONNECT = "CONNECT", + OPTIONS = "OPTIONS", + TRACE = "TRACE", + PATCH = "PATCH" +} +/** + * Represents an HTTP file which will be transferred from or to a server. + */ +type HttpFile = Blob & { + readonly name: string; +}; +declare class HttpException extends Error { + constructor(msg: string); +} +/** + * Represents the body of an outgoing HTTP request. + */ +type RequestBody = undefined | string | FormData | URLSearchParams; +/** + * Represents an HTTP request context + */ +declare class RequestContext { + private httpMethod; + private headers; + private body; + private url; + /** + * Creates the request context using a http method and request resource url + * + * @param url url of the requested resource + * @param httpMethod http method + */ + constructor(url: string, httpMethod: HttpMethod); + getUrl(): string; + /** + * Replaces the url set in the constructor with this url. + * + */ + setUrl(url: string): void; + /** + * Sets the body of the http request either as a string or FormData + * + * Note that setting a body on a HTTP GET, HEAD, DELETE, CONNECT or TRACE + * request is discouraged. + * https://httpwg.org/http-core/draft-ietf-httpbis-semantics-latest.html#rfc.section.7.3.1 + * + * @param body the body of the request + */ + setBody(body: RequestBody): void; + getHttpMethod(): HttpMethod; + getHeaders(): { + [key: string]: string; + }; + getBody(): RequestBody; + setQueryParam(name: string, value: string): void; + /** + * Sets a cookie with the name and value. NO check for duplicate cookies is performed + * + */ + addCookie(name: string, value: string): void; + setHeaderParam(key: string, value: string): void; +} +interface ResponseBody { + text(): Promise; + binary(): Promise; +} +/** + * Helper class to generate a `ResponseBody` from binary data + */ +declare class SelfDecodingBody implements ResponseBody { + private dataSource; + constructor(dataSource: Promise); + binary(): Promise; + text(): Promise; +} +declare class ResponseContext { + httpStatusCode: number; + headers: { + [key: string]: string; + }; + body: ResponseBody; + constructor(httpStatusCode: number, headers: { + [key: string]: string; + }, body: ResponseBody); + /** + * Parse header value in the form `value; param1="value1"` + * + * E.g. for Content-Type or Content-Disposition + * Parameter names are converted to lower case + * The first parameter is returned with the key `""` + */ + getParsedHeader(headerName: string): { + [parameter: string]: string; + }; + getBodyAsFile(): Promise; + /** + * Use a heuristic to get a body of unknown data structure. + * Return as string if possible, otherwise as binary. + */ + getBodyAsAny(): Promise; +} +interface HttpLibrary { + send(request: RequestContext): Observable; +} +interface PromiseHttpLibrary { + send(request: RequestContext): Promise; +} +declare function wrapHttpLibrary(promiseHttpLibrary: PromiseHttpLibrary): HttpLibrary; + +/** + * Interface authentication schemes. + */ +interface SecurityAuthentication { + getName(): string; + /** + * Applies the authentication scheme to the request context + * + * @params context the request context which should use this authentication scheme + */ + applySecurityAuthentication(context: RequestContext): void | Promise; +} +interface TokenProvider { + getToken(): Promise | string; +} +/** + * Applies http authentication to the request context. + */ +declare class BearerAuthAuthentication implements SecurityAuthentication { + private tokenProvider; + /** + * Configures the http authentication with the required details. + * + * @param tokenProvider service that can provide the up-to-date token when needed + */ + constructor(tokenProvider: TokenProvider); + getName(): string; + applySecurityAuthentication(context: RequestContext): Promise; +} +type AuthMethods = { + "default"?: SecurityAuthentication; + "bearerAuth"?: SecurityAuthentication; +}; +type ApiKeyConfiguration = string; +type HttpBasicConfiguration = { + "username": string; + "password": string; +}; +type HttpBearerConfiguration = { + tokenProvider: TokenProvider; +}; +type OAuth2Configuration = { + accessToken: string; +}; +type AuthMethodsConfiguration = { + "default"?: SecurityAuthentication; + "bearerAuth"?: HttpBearerConfiguration; +}; +/** + * Creates the authentication methods from a swagger description. + * + */ +declare function configureAuthMethods(config: AuthMethodsConfiguration | undefined): AuthMethods; + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +declare class AIContext { + /** + * User specific text instructions sent to AI system for processing the query. + */ + 'instructions'?: Array | null; + /** + * User provided content like text data, csv data as a string message to provide context & potentially improve the quality of the response. + */ + 'content'?: Array | null; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +/** +* With API key auth, you send a key-value pair to the API either in the request headers or query parameters. +*/ +declare class APIKey { + /** + * Enter your key name + */ + 'key'?: string | null; + /** + * Enter you key value + */ + 'value'?: string | null; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +/** +* With API key auth, you send a key-value pair to the API either in the request headers or query parameters. +*/ +declare class APIKeyInput { + /** + * Enter your key name + */ + 'key'?: string | null; + /** + * Enter you key value + */ + 'value'?: string | null; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +declare class OrgInfo { + /** + * Id. + */ + 'id': number; + /** + * Name. + */ + 'name'?: string | null; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +declare class UserInfo { + /** + * Id. + */ + 'id': string; + /** + * Name. + */ + 'name'?: string | null; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +declare class AccessToken { + /** + * GUID of the auth token. + */ + 'id'?: string | null; + /** + * Bearer auth token. + */ + 'token': string; + 'org': OrgInfo; + 'user': UserInfo; + /** + * Token creation time in milliseconds. + */ + 'creation_time_in_millis': number; + /** + * Token expiration time in milliseconds. + */ + 'expiration_time_in_millis': number; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +/** +* Specify that the association is enabled for the metadata object +*/ +declare class ActionConfig { + /** + * Position of the Custom action on the Metadata object. Earlier naming convention: context. + */ + 'position'?: string | null; + /** + * Visibility of the metadata association with custom action. Earlier naming convention: enabled + */ + 'visibility'?: boolean | null; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +/** +* Specify that the association is enabled for the metadata object Default +*/ +declare class ActionConfigInput { + /** + * Position of the Custom action on the Metadata object. Earlier naming convention: context. + */ + 'position'?: ActionConfigInputPositionEnum | null; + /** + * Visibility of the metadata association with custom action. Earlier naming convention: enabled + */ + 'visibility'?: boolean | null; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} +type ActionConfigInputPositionEnum = "MENU" | "PRIMARY" | "CONTEXT_MENU"; + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +/** +* Specify that the association is enabled for the metadata object Default +*/ +declare class ActionConfigInputCreate { + /** + * Position of the Custom action on the Metadata object. Earlier naming convention: context. + */ + 'position'?: ActionConfigInputCreatePositionEnum | null; + /** + * Visibility of the metadata association with custom action. Earlier naming convention: enabled + */ + 'visibility'?: boolean | null; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} +type ActionConfigInputCreatePositionEnum = "MENU" | "PRIMARY" | "CONTEXT_MENU"; + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +/** +* CALLBACK Custom Action Type +*/ +declare class CALLBACK { + /** + * Reference name of the SDK. By default, the value will be set to action name. + */ + 'reference'?: string | null; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +/** +* Basic Auth: Basic authentication involves sending a verified username and password with your request. +*/ +declare class BasicAuth { + /** + * Password for the basic authentication + */ + 'password'?: string | null; + /** + * Username for the basic authentication + */ + 'username'?: string | null; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +/** +* Authorization type for the custom action. +*/ +declare class Authentication { + 'API_Key'?: APIKey; + 'Basic_Auth'?: BasicAuth; + /** + * Bearer tokens enable requests to authenticate using an access key. + */ + 'Bearer_Token'?: string | null; + /** + * No authorization. If your request doesn\'t require authorization. + */ + 'No_Auth'?: string | null; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +declare class ParametersListItem { + /** + * Key for the url query parameter + */ + 'key'?: string | null; + /** + * Value for the url query parameter + */ + 'value'?: string | null; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +/** +* URL Custom Action Type +*/ +declare class URL { + 'authentication'?: Authentication; + /** + * Query parameters for url. + */ + 'parameters'?: Array | null; + /** + * Request Url for the Custom action. + */ + 'url': string; + /** + * Reference name of the SDK. By default, the value will be set to action name. + */ + 'reference'?: string | null; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +/** +* Type and Configuration for Custom Actions +*/ +declare class ActionDetails { + 'CALLBACK'?: CALLBACK; + 'URL'?: URL; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +/** +* CALLBACK Custom Action Type +*/ +declare class CALLBACKInput { + /** + * Reference name. By default, the value will be set to action name. + */ + 'reference'?: string | null; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +/** +* Basic Auth: Basic authentication involves sending a verified username and password with your request. +*/ +declare class BasicAuthInput { + /** + * Password for the basic authentication + */ + 'password'?: string | null; + /** + * Username for the basic authentication + */ + 'username'?: string | null; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +/** +* Authorization type for the custom action. +*/ +declare class AuthenticationInput { + 'API_Key'?: APIKeyInput; + 'Basic_Auth'?: BasicAuthInput; + /** + * Bearer tokens enable requests to authenticate using an access key. + */ + 'Bearer_Token'?: string | null; + /** + * No authorization. If your request doesn\'t require authorization. + */ + 'No_Auth'?: string | null; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +declare class ParametersListItemInput { + /** + * Key for the url query parameter + */ + 'key'?: string | null; + /** + * Value for the url query parameter + */ + 'value'?: string | null; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +/** +* URL Custom Action Type +*/ +declare class URLInput { + 'authentication'?: AuthenticationInput; + /** + * Query parameters for url. + */ + 'parameters'?: Array | null; + /** + * Request Url for the Custom action. + */ + 'url'?: string | null; + /** + * Reference name. By default the value will be set to action name + */ + 'reference'?: string | null; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +/** +* Action details includes `Type` and configuration details of Custom Actions. Either Callback or URL is required. +*/ +declare class ActionDetailsInput { + 'CALLBACK'?: CALLBACKInput; + 'URL'?: URLInput; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +/** +* CALLBACK Custom Action Type +*/ +declare class CALLBACKInputMandatory { + /** + * Reference name. By default, the value will be set to action name. + */ + 'reference'?: string | null; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +/** +* URL Custom Action Type +*/ +declare class URLInputMandatory { + 'authentication'?: AuthenticationInput; + /** + * Query parameters for url. + */ + 'parameters'?: Array | null; + /** + * Request Url for the Custom action. + */ + 'url': string; + /** + * Reference name. By default the value will be set to action name + */ + 'reference'?: string | null; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +/** +* Action details includes Type and Configuration for Custom Actions, either Callback or URL is required. When both callback and url are provided, callback would be considered +*/ +declare class ActionDetailsInputCreate { + 'CALLBACK'?: CALLBACKInputMandatory; + 'URL'?: URLInputMandatory; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +declare class ActivateUserRequest { + /** + * Unique ID or name of the user. + */ + 'user_identifier': string; + /** + * Auth token for the user. + */ + 'auth_token': string; + /** + * New password for the user to access the account. + */ + 'password': string; + /** + * Properties of the user. + */ + 'properties'?: string; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +declare class AgentConversation { + /** + * Unique identifier of the conversation. + */ + 'conversation_id': string; + /** + * Unique identifier of the conversation. Version: 26.5.0.cl or later + */ + 'conversation_identifier': string; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +declare class AnswerContent { + /** + * Total available data row count. + */ + 'available_data_row_count': number; + /** + * Name of the columns. + */ + 'column_names': Array; + /** + * Rows of data set. + */ + 'data_rows': Array; + /** + * The starting record number from where the records should be included. + */ + 'record_offset': number; + /** + * The number of records that should be included. + */ + 'record_size': number; + /** + * Total returned data row count. + */ + 'returned_data_row_count': number; + /** + * Sampling ratio (0 to 1). If the query was sampled, it is the ratio of keys returned in the data set to the total number of keys expected in the query. If the value is 1.0, this means that the complete result is returned. + */ + 'sampling_ratio': number; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +/** +* Response format associated with fetch data api +*/ +declare class AnswerDataResponse { + /** + * The unique identifier of the object + */ + 'metadata_id': string; + /** + * Name of the metadata object + */ + 'metadata_name': string; + /** + * Data content of metadata objects + */ + 'contents': Array; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +declare class AnswerPngOptionsInput { + /** + * Desired width of the answer image in pixels. Ex. 1920 for Full HD image Version: 26.6.0.cl or later + */ + 'x_resolution'?: number | null; + /** + * Desired height of the answer image in pixels. Ex. 1080 for Full HD image Version: 26.6.0.cl or later + */ + 'y_resolution'?: number | null; + /** + * The scale of the image in percentage. Ex. 100 for 100% scale. Version: 26.6.0.cl or later + */ + 'scaling'?: number | null; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +/** +* MetadataType InputType used in Author API\'s +*/ +declare class AuthorMetadataTypeInput { + /** + * Type of metadata. Required if the name of the object is set as the identifier. This attribute is optional when the object GUID is specified as the identifier. + */ + 'type'?: AuthorMetadataTypeInputTypeEnum | null; + /** + * Unique ID or name of the metadata object. + */ + 'identifier': string; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} +type AuthorMetadataTypeInputTypeEnum = "LIVEBOARD" | "ANSWER" | "LOGICAL_TABLE" | "CONNECTION"; + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +declare class AssignChangeAuthorRequest { + /** + * GUID or name of the metadata object. + */ + 'metadata': Array; + /** + * GUID or name of the user who you want to assign as the author. + */ + 'user_identifier': string; + /** + * GUID or name of the current author. When defined, the metadata objects authored by the specified owner are filtered for the API operation. + */ + 'current_owner_identifier'?: string; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +declare class TagMetadataTypeInput { + /** + * Type of metadata. Required if the name of the object is set as the identifier. This attribute is optional when the object GUID is specified as the identifier. 1. LIVEBOARD 2. ANSWERS 3. LOGICAL_TABLE for any data object such as table, worksheet or view. 4. LOGICAL_COLUMN for a column of any data object such as tables, worksheets or views. + */ + 'type'?: TagMetadataTypeInputTypeEnum | null; + /** + * Unique ID or name of the metadata. + */ + 'identifier': string; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} +type TagMetadataTypeInputTypeEnum = "LIVEBOARD" | "ANSWER" | "LOGICAL_TABLE" | "LOGICAL_COLUMN" | "CONNECTION" | "COLLECTION"; + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +declare class AssignTagRequest { + /** + * Metadata objects. + */ + 'metadata': Array; + /** + * GUID or name of the tag. + */ + 'tag_identifiers': Array; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +declare class AssociateMetadataInput { + 'action_config'?: ActionConfigInput; + /** + * Unique ID or name of the metadata. + */ + 'identifier'?: string | null; + /** + * Type of metadata. Required if the name of the object is set as the identifier. This attribute is optional when the object GUID is specified as the identifier. + */ + 'type'?: AssociateMetadataInputTypeEnum | null; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} +type AssociateMetadataInputTypeEnum = "VISUALIZATION" | "ANSWER" | "WORKSHEET"; + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +declare class AssociateMetadataInputCreate { + 'action_config'?: ActionConfigInputCreate; + /** + * Unique ID or name of the metadata. + */ + 'identifier': string; + /** + * Type of metadata. Required if the name of the object is set as the identifier. This attribute is optional when the object GUID is specified as the identifier. + */ + 'type'?: AssociateMetadataInputCreateTypeEnum | null; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} +type AssociateMetadataInputCreateTypeEnum = "VISUALIZATION" | "ANSWER" | "WORKSHEET"; + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +/** +* An auth settings access token. +*/ +declare class AuthSettingsAccessToken { + /** + * The plaintext token key value. + */ + 'key': string; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +/** +* Cluster-level authentication preferences. +*/ +declare class AuthClusterPreferences { + /** + * Whether authentication is enabled or disabled at the cluster level. + */ + 'auth_status'?: AuthClusterPreferencesAuthStatusEnum | null; + /** + * Cluster-level access tokens. Absent when no token is configured. + */ + 'access_tokens'?: Array | null; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} +type AuthClusterPreferencesAuthStatusEnum = "ENABLED" | "DISABLED"; + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +/** +* Input for cluster-level auth configuration. +*/ +declare class AuthClusterPreferencesInput { + /** + * Enable or disable authentication at the cluster level. When enabled, a new token is generated if one does not exist. When disabled, the existing token is revoked. + */ + 'auth_status'?: AuthClusterPreferencesInputAuthStatusEnum | null; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} +type AuthClusterPreferencesInputAuthStatusEnum = "ENABLED" | "DISABLED"; + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +/** +* Org identifier returned in auth settings search results. +*/ +declare class AuthOrgInfo { + /** + * Unique identifier of the org. + */ + 'id': number; + /** + * Name of the org. + */ + 'name'?: string | null; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +/** +* Org-level authentication preferences for a single org. +*/ +declare class AuthOrgPreference { + 'org'?: AuthOrgInfo; + /** + * Whether authentication is enabled or disabled for this org. + */ + 'auth_status'?: AuthOrgPreferenceAuthStatusEnum | null; + /** + * Org-level access tokens. Absent when no token is configured or the feature flag is off. + */ + 'access_tokens'?: Array | null; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} +type AuthOrgPreferenceAuthStatusEnum = "ENABLED" | "DISABLED"; + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +/** +* Input for org-level auth configuration. +*/ +declare class AuthOrgPreferenceInput { + /** + * Unique ID or name of the org to configure. + */ + 'org_identifier': string; + /** + * Enable or disable authentication for this org. When enabled, a new token is generated if one does not exist. When disabled, the existing token is revoked. + */ + 'auth_status'?: AuthOrgPreferenceInputAuthStatusEnum | null; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} +type AuthOrgPreferenceInputAuthStatusEnum = "ENABLED" | "DISABLED"; + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +/** +* Author of the schedule. +*/ +declare class Author { + /** + * The unique identifier of the object. + */ + 'id': string; + /** + * Name of the object. + */ + 'name': string; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +declare class AuthorType { + /** + * Email id of the committer + */ + 'email'?: string | null; + /** + * Username of the committer + */ + 'username'?: string | null; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +/** +* AWS S3 storage configuration details. +*/ +declare class AwsS3Config { + /** + * Name of the S3 bucket where webhook payloads are stored. + */ + 'bucket_name': string; + /** + * AWS region where the S3 bucket is located. + */ + 'region': string; + /** + * ARN of the IAM role used for S3 access. + */ + 'role_arn': string; + /** + * External ID for secure cross-account role assumption. + */ + 'external_id'?: string | null; + /** + * Path prefix for organizing objects within the bucket. + */ + 'path_prefix'?: string | null; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +/** +* Input type for AWS S3 storage configuration. +*/ +declare class AwsS3ConfigInput { + /** + * Name of the S3 bucket where webhook payloads will be stored. Example: \"my-webhook-files\" + */ + 'bucket_name': string; + /** + * AWS region where the S3 bucket is located. Example: \"us-west-2\" + */ + 'region': string; + /** + * ARN of the IAM role to assume for S3 access. Example: \"arn:aws:iam::123456789012:role/ThoughtSpotDeliveryRole\" + */ + 'role_arn': string; + /** + * External ID for secure cross-account role assumption. Example: \"ts-webhook-a1b2c3d4-7890\" + */ + 'external_id'?: string | null; + /** + * Optional path prefix for organizing objects within the bucket. Example: \"thoughtspot-webhooks/\" + */ + 'path_prefix'?: string | null; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +declare class CalendarResponse { + /** + * Name of the calendar + */ + 'calendar_name'?: string | null; + /** + * Name of the connection + */ + 'connection_name'?: string | null; + /** + * Type of data warehouse + */ + 'data_warehouse_type'?: string | null; + /** + * Last modification time in milliseconds + */ + 'modification_time_in_millis'?: string | null; + /** + * Name of the author who created the calendar + */ + 'author_name'?: string | null; + /** + * Unique ID of the connection + */ + 'connection_id'?: string | null; + /** + * Unique ID of the calendar + */ + 'calendar_id'?: string | null; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +declare class ChangeUserPasswordRequest { + /** + * Current password of the user. + */ + 'current_password': string; + /** + * New password for the user. + */ + 'new_password': string; + /** + * GUID or name of the user. + */ + 'user_identifier': string; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +/** +* Event metadata for the triggering event associated with a job. +*/ +declare class ChannelHistoryEventInfo { + /** + * Type of the event. + */ + 'type': ChannelHistoryEventInfoTypeEnum; + /** + * Unique ID of the event. + */ + 'id': string; + /** + * Name of the event. + */ + 'name'?: string | null; + /** + * Unique run ID for this event execution. + */ + 'run_id'?: string | null; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} +type ChannelHistoryEventInfoTypeEnum = "LIVEBOARD_SCHEDULE"; + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +/** +* Event specification for channel history search. +*/ +declare class ChannelHistoryEventInput { + /** + * Type of the event. + */ + 'type': ChannelHistoryEventInputTypeEnum; + /** + * Unique ID or name of the event. + */ + 'identifier'?: string | null; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} +type ChannelHistoryEventInputTypeEnum = "LIVEBOARD_SCHEDULE"; + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +/** +* A recipient (user, group, or external) for a job execution. +*/ +declare class JobRecipient { + /** + * Type of the recipient. + */ + 'type': JobRecipientTypeEnum; + /** + * Unique ID of the recipient. + */ + 'id'?: string | null; + /** + * Name of the recipient. + */ + 'name'?: string | null; + /** + * Email of the recipient. + */ + 'email'?: string | null; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} +type JobRecipientTypeEnum = "USER" | "EXTERNAL"; + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +/** +* A single job execution record for a channel. +*/ +declare class ChannelHistoryJob { + /** + * Unique identifier for this job. + */ + 'id': string; + /** + * Delivery status of this job. + */ + 'status': ChannelHistoryJobStatusEnum; + /** + * Timestamp when this job was created (epoch milliseconds). + */ + 'creation_time_in_millis': number; + 'event'?: ChannelHistoryEventInfo; + /** + * The users, groups or external recipients for this job. + */ + 'recipients'?: Array | null; + /** + * Additional delivery details such as HTTP response code or error message. + */ + 'detail'?: string | null; + /** + * Number of attempts made. 1 indicates first attempt. + */ + 'try_count'?: number | null; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} +type ChannelHistoryJobStatusEnum = "PENDING" | "RETRY" | "SUCCESS" | "FAILED"; + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +/** +* AWS S3 storage information returned from a validation step. +*/ +declare class ChannelValidationAwsS3Info { + /** + * Name of the S3 bucket. + */ + 'bucket_name'?: string | null; + /** + * Name of the uploaded file. + */ + 'file_name'?: string | null; + /** + * Key of the object in S3 storage. + */ + 'object_key'?: string | null; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +/** +* Validation detail result for a sub-step. +*/ +declare class ChannelValidationDetail { + /** + * The validation step that was performed. + */ + 'validation_step': ChannelValidationDetailValidationStepEnum; + /** + * Status of this validation step. + */ + 'status': ChannelValidationDetailStatusEnum; + /** + * HTTP status code returned by the channel (if applicable). + */ + 'http_status'?: number | null; + /** + * Error message from the channel or validation process. + */ + 'error_message'?: string | null; + 'aws_s3_info'?: ChannelValidationAwsS3Info; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} +type ChannelValidationDetailValidationStepEnum = "HTTP_CONNECTION_CHECK" | "STORAGE_FILE_UPLOAD_CHECK"; +type ChannelValidationDetailStatusEnum = "SUCCESS" | "FAILED"; + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +/** +* Group information for non-embed access. +*/ +declare class GroupInfo { + /** + * Unique identifier of the group. + */ + 'id'?: string | null; + /** + * Name of the group. + */ + 'name'?: string | null; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +/** +* Cluster-level non-embed access configuration. +*/ +declare class ClusterNonEmbedAccess { + /** + * Block full application access for non-embedded usage. + */ + 'block_full_app_access'?: boolean | null; + /** + * Groups that have non-embed full app access. Only applicable when orgs feature is disabled. Use org_preferences when org feature is enabled. + */ + 'groups_with_access'?: Array | null; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +/** +* Input for cluster-level non-embed access configuration. +*/ +declare class ClusterNonEmbedAccessInput { + /** + * Block full application access for non-embedded usage. + */ + 'block_full_app_access'?: boolean | null; + /** + * Group identifiers that are allowed non-embed full app access. Can only be set when orgs feature is disabled and block_full_app_access is true. + */ + 'groups_identifiers_with_access'?: Array | null; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +/** +* Entity identifier with name. +*/ +declare class CollectionEntityIdentifier { + /** + * Unique identifier of the entity. + */ + 'identifier'?: string | null; + /** + * Name of the entity. + */ + 'name'?: string | null; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +/** +* Metadata item in a collection response. +*/ +declare class CollectionMetadataItem { + /** + * Type of the metadata object. + */ + 'type'?: string | null; + /** + * List of identifiers for this metadata type. + */ + 'identifiers'?: Array | null; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +/** +* Response object for a collection. +*/ +declare class Collection { + /** + * Unique identifier of the collection. + */ + 'id': string; + /** + * Name of the collection. + */ + 'name': string; + /** + * Description of the collection. + */ + 'description'?: string | null; + /** + * Metadata objects in the collection. + */ + 'metadata'?: Array | null; + /** + * Creation timestamp in milliseconds. + */ + 'created_at'?: string | null; + /** + * Last updated timestamp in milliseconds. + */ + 'updated_at'?: string | null; + /** + * Name of the author who created the collection. + */ + 'author_name'?: string | null; + /** + * Unique identifier of the author. + */ + 'author_id'?: string | null; + 'org'?: CollectionEntityIdentifier; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +declare class GenericInfo { + 'id'?: string | null; + 'name'?: string | null; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +/** +* Group of metadata objects identified by type. +*/ +declare class CollectionDeleteTypeIdentifiers { + /** + * Type of the metadata object (e.g., Collection, Worksheet, Table). + */ + 'type'?: string | null; + /** + * List of metadata identifiers belonging to the given type. + */ + 'identifiers'?: Array | null; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +/** +* Response object for delete collection operation. +*/ +declare class CollectionDeleteResponse { + /** + * List of metadata objects that were successfully deleted. + */ + 'metadata_deleted'?: Array | null; + /** + * List of metadata objects that were skipped during deletion. Objects may be skipped due to lack of permissions, dependencies, or other constraints. + */ + 'metadata_skipped'?: Array | null; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +/** +* Input type for metadata to be added to a collection. +*/ +declare class CollectionMetadataInput { + /** + * Type of metadata object. + */ + 'type': CollectionMetadataInputTypeEnum; + /** + * List of unique IDs or names of metadata objects. + */ + 'identifiers': Array; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} +type CollectionMetadataInputTypeEnum = "LIVEBOARD" | "ANSWER" | "LOGICAL_TABLE" | "COLLECTION"; + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +/** +* Response object for search collections operation. +*/ +declare class CollectionSearchResponse { + /** + * List of collections matching the search criteria. + */ + 'collections': Array; + /** + * The starting record number from where the records are included. + */ + 'record_offset'?: number | null; + /** + * The number of records returned. + */ + 'record_size'?: number | null; + /** + * Indicates if this is the last batch of results. + */ + 'is_last_batch'?: boolean | null; + /** + * Total count of records returned. + */ + 'count'?: number | null; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +declare class Column { + /** + * Name of the column + */ + 'name': string; + /** + * Data type of the column + */ + 'data_type': string; + /** + * Determines if the column schema is an aggregate + */ + 'is_aggregate'?: string | null; + /** + * Determines if the column schema can be imported + */ + 'can_import'?: boolean | null; + /** + * Determines if the table is selected + */ + 'selected'?: boolean | null; + /** + * Determines if the table is linked + */ + 'is_linked_active'?: boolean | null; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +declare class ColumnSecurityRuleColumn { + /** + * The unique identifier of the column + */ + 'id': string; + /** + * The name of the column + */ + 'name': string; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +declare class ColumnSecurityRuleGroup { + /** + * The unique identifier of the group + */ + 'id': string; + /** + * The name of the group + */ + 'name': string; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +declare class ColumnSecurityRuleSourceTable { + /** + * The unique identifier of the source table + */ + 'id': string; + /** + * The name of the source table + */ + 'name': string; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +declare class ColumnSecurityRule { + 'column': ColumnSecurityRuleColumn; + /** + * Array of groups that have access to this column + */ + 'groups'?: Array | null; + 'source_table_details'?: ColumnSecurityRuleSourceTable; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +declare class ColumnSecurityRuleGroupOperation { + /** + * Type of operation to be performed on the groups + */ + 'operation': ColumnSecurityRuleGroupOperationOperationEnum; + /** + * Array of group identifiers (name or GUID) on which the operation will be performed + */ + 'group_identifiers': Array; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} +type ColumnSecurityRuleGroupOperationOperationEnum = "ADD" | "REMOVE" | "REPLACE"; + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +declare class ColumnSecurityRuleResponse { + /** + * GUID of the table for which the column security rules are fetched + */ + 'table_guid'?: string | null; + /** + * Object ID of the table for which the column security rules are fetched + */ + 'obj_id'?: string | null; + /** + * Array containing column security rule objects + */ + 'column_security_rules'?: Array | null; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +declare class ColumnSecurityRuleTableInput { + /** + * Name or GUID of the table + */ + 'identifier'?: string | null; + /** + * Object ID of the table + */ + 'obj_identifier'?: string | null; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +declare class ColumnSecurityRuleUpdate { + /** + * Column identifier (col_id or name) + */ + 'column_identifier': string; + /** + * If true, the column will be marked as unprotected and all groups associated with it will be removed + */ + 'is_unsecured'?: boolean | null; + /** + * Array of group operation objects that specifies the actions for groups to be associated with a column + */ + 'group_access'?: Array | null; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +declare class MetadataObject { + /** + * Unique ID or name of the metadata + */ + 'identifier': string; + /** + * Type of metadata. Required if the name of the object is set as the identifier. This attribute is optional when the object GUID is specified as the identifier. + */ + 'type'?: MetadataObjectTypeEnum | null; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} +type MetadataObjectTypeEnum = "LIVEBOARD" | "ANSWER" | "LOGICAL_TABLE" | "CUSTOM_ACTION"; + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +declare class CommitBranchRequest { + /** + * Metadata objects. + */ + 'metadata': Array; + /** + * Delete the tml files from version control repo if it does not exist in the ThoughSpot instance + */ + 'delete_aware'?: boolean | null; + /** + * Name of the remote branch where object should be pushed Note: If no branch_name is specified, then the commit_branch_name will be considered. + */ + 'branch_name'?: string; + /** + * Comment to be added to the commit + */ + 'comment': string; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +declare class CommitFileType { + /** + * Name of the file deployed + */ + 'file_name': string; + /** + * Indicates the status of deployment for the file + */ + 'status_code': string; + /** + * Any error or warning with the deployment + */ + 'status_message'?: string | null; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +declare class CommiterType { + /** + * Email id of the committer + */ + 'email'?: string | null; + /** + * Username of the committer + */ + 'username'?: string | null; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +declare class CommitHistoryResponse { + 'committer': CommiterType; + 'author': AuthorType; + /** + * Comments associated with the commit + */ + 'comment': string; + /** + * Time at which the changes were committed. + */ + 'commit_time': string; + /** + * SHA id associated with the commit + */ + 'commit_id': string; + /** + * Branch where changes were committed + */ + 'branch': string; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +declare class CommitResponse { + 'committer'?: CommiterType; + 'author'?: AuthorType; + /** + * Comments associated with the commit + */ + 'comment'?: string | null; + /** + * Time at which the changes were committed. + */ + 'commit_time'?: string | null; + /** + * SHA id associated with the commit + */ + 'commit_id'?: string | null; + /** + * Branch where changes were committed + */ + 'branch'?: string | null; + /** + * Files that were pushed as part of this commit + */ + 'committed_files'?: Array | null; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +declare class EventChannelConfig { + /** + * Type of event for which communication channels are configured + */ + 'event_type': EventChannelConfigEventTypeEnum; + /** + * Communication channels enabled for this event type. Empty array indicates no channels are enabled. + */ + 'channels': Array; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} +type EventChannelConfigEventTypeEnum = "LIVEBOARD_SCHEDULE"; +type EventChannelConfigChannelsEnum = "EMAIL" | "WEBHOOK"; + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +declare class OrgDetails { + /** + * Unique id of the org + */ + 'id': string; + /** + * Name of the org + */ + 'name': string; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +declare class OrgChannelConfigResponse { + 'org': OrgDetails; + /** + * Event-specific communication channel configurations for this org + */ + 'preferences': Array; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +declare class CommunicationChannelPreferencesResponse { + /** + * Cluster-level default configurations. + */ + 'cluster_preferences'?: Array | null; + /** + * Org-specific configurations. + */ + 'org_preferences'?: Array | null; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +/** +* Response containing validation results for communication channel configuration. +*/ +declare class CommunicationChannelValidateResponse { + /** + * Type of communication channel that was validated. + */ + 'channel_type': CommunicationChannelValidateResponseChannelTypeEnum; + /** + * ID of the communication channel (e.g., webhook_id). + */ + 'channel_id': string; + /** + * Name of the communication channel (e.g., webhook name). + */ + 'channel_name'?: string | null; + /** + * Event type that was validated. + */ + 'event_type': CommunicationChannelValidateResponseEventTypeEnum; + /** + * Unique Job Id of the validation. + */ + 'job_id': string; + /** + * Overall result of the validation. + */ + 'result_code': CommunicationChannelValidateResponseResultCodeEnum; + /** + * Detailed results of various validation sub-steps. + */ + 'details'?: Array | null; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} +type CommunicationChannelValidateResponseChannelTypeEnum = "WEBHOOK"; +type CommunicationChannelValidateResponseEventTypeEnum = "LIVEBOARD_SCHEDULE"; +type CommunicationChannelValidateResponseResultCodeEnum = "SUCCESS" | "FAILED" | "PARTIAL_SUCCESS"; + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +/** +* Cluster-level authentication preferences. Omit to leave the existing cluster setting unchanged. +*/ +declare class ConfigureAuthSettingsRequestClusterPreferences { + /** + * Enable or disable authentication at the cluster level. When enabled, a new token is generated if one does not exist. When disabled, the existing token is revoked. + */ + 'auth_status'?: ConfigureAuthSettingsRequestClusterPreferencesAuthStatusEnum | null; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} +type ConfigureAuthSettingsRequestClusterPreferencesAuthStatusEnum = "ENABLED" | "DISABLED"; + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +declare class ConfigureAuthSettingsRequest { + /** + * Type of authentication mechanism to configure. Currently supports TRUSTED_AUTH. + */ + 'auth_type': ConfigureAuthSettingsRequestAuthTypeEnum; + 'cluster_preferences'?: ConfigureAuthSettingsRequestClusterPreferences; + /** + * Org-level authentication preferences. Each entry identifies an org and the desired status. Omit to leave existing org settings unchanged. + */ + 'org_preferences'?: Array; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} +type ConfigureAuthSettingsRequestAuthTypeEnum = "TRUSTED_AUTH"; + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +declare class EventChannelConfigInput { + /** + * Type of event for which communication channels are configured + */ + 'event_type': EventChannelConfigInputEventTypeEnum; + /** + * Communication channels enabled for this event type. Empty array disables all channels for this event. + */ + 'channels': Array; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} +type EventChannelConfigInputEventTypeEnum = "LIVEBOARD_SCHEDULE"; +type EventChannelConfigInputChannelsEnum = "EMAIL" | "WEBHOOK"; + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +declare class OrgChannelConfigInput { + /** + * Unique identifier or name of the org + */ + 'org_identifier': string; + /** + * Operation to perform. REPLACE: Update preferences (default). RESET: Remove org-specific configurations, causing fallback to cluster-level preferences. + */ + 'operation'?: OrgChannelConfigInputOperationEnum | null; + /** + * Event-specific configurations. Required for REPLACE operation. + */ + 'preferences'?: Array | null; + /** + * Event types to reset. Required for RESET operation. Org-specific configurations for these events will be removed, causing fallback to cluster-level preferences. + */ + 'reset_events'?: Array | null; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} +type OrgChannelConfigInputOperationEnum = "REPLACE" | "RESET"; +type OrgChannelConfigInputResetEventsEnum = "LIVEBOARD_SCHEDULE"; + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +declare class ConfigureCommunicationChannelPreferencesRequest { + /** + * Cluster-level default configurations. + */ + 'cluster_preferences'?: Array; + /** + * Org-specific configurations. + */ + 'org_preferences'?: Array; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +/** +* Input for script-src CSP settings. +*/ +declare class ScriptSrcUrlsInput { + /** + * Whether script-src customization is enabled. + */ + 'enabled'?: boolean | null; + /** + * Allowed URLs for script-src directive. Can only be set if enabled is true. + */ + 'urls'?: Array | null; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +/** +* Input for CSP (Content Security Policy) settings. +*/ +declare class CspSettingsInput { + /** + * Allowed URLs for connect-src directive. + */ + 'connect_src_urls'?: Array | null; + /** + * Allowed URLs for font-src directive. + */ + 'font_src_urls'?: Array | null; + /** + * Allowed hosts for visual embed (frame-ancestors directive). + */ + 'visual_embed_hosts'?: Array | null; + /** + * Allowed URLs for frame-src directive. + */ + 'iframe_src_urls'?: Array | null; + /** + * Allowed URLs for img-src directive. + */ + 'img_src_urls'?: Array | null; + 'script_src_urls'?: ScriptSrcUrlsInput; + /** + * Allowed URLs for style-src directive. + */ + 'style_src_urls'?: Array | null; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +/** +* Cluster-level security preferences. +*/ +declare class ConfigureSecuritySettingsRequestClusterPreferences { + /** + * Support embedded access when third-party cookies are blocked. + */ + 'enable_partitioned_cookies'?: boolean | null; + /** + * Allowed origins for CORS. + */ + 'cors_whitelisted_urls'?: Array | null; + 'csp_settings'?: CspSettingsInput; + /** + * Allowed redirect hosts for SAML login. + */ + 'saml_redirect_urls'?: Array | null; + 'non_embed_access'?: ClusterNonEmbedAccessInput; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +/** +* Input for org-level non-embed access configuration. +*/ +declare class OrgNonEmbedAccessInput { + /** + * Block full application access for non-embedded usage. + */ + 'block_full_app_access'?: boolean | null; + /** + * Group identifiers that are allowed non-embed full app access. Can only be set if block_full_app_access is true. + */ + 'groups_identifiers_with_access'?: Array | null; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +/** +* Input for org-level security preferences configuration. Note: cross-org operations are not supported currently. +*/ +declare class SecuritySettingsOrgPreferencesInput { + /** + * Unique identifier or name of the org + */ + 'org_identifier': string; + /** + * Allowed origins for CORS for this org. + */ + 'cors_whitelisted_urls'?: Array | null; + 'non_embed_access'?: OrgNonEmbedAccessInput; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +declare class ConfigureSecuritySettingsRequest { + 'cluster_preferences'?: ConfigureSecuritySettingsRequestClusterPreferences; + /** + * Org-level security preferences for the current org. + */ + 'org_preferences'?: Array; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +declare class PolicyProcessOptions { + 'impersonate_user'?: string | null; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +declare class UserPrincipal { + 'id'?: string | null; + 'name'?: string | null; + 'type'?: string | null; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +declare class ConnectionConfigurationResponse { + 'configuration_identifier'?: string | null; + 'name'?: string | null; + 'description'?: string | null; + 'configuration'?: any | null; + 'policy_principals'?: Array | null; + 'policy_processes'?: Array | null; + 'disabled'?: boolean | null; + 'data_warehouse_type'?: ConnectionConfigurationResponseDataWarehouseTypeEnum | null; + 'policy_type'?: ConnectionConfigurationResponsePolicyTypeEnum | null; + 'same_as_parent'?: boolean | null; + 'policy_process_options'?: PolicyProcessOptions; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} +type ConnectionConfigurationResponsePolicyProcessesEnum = "SAGE_INDEXING" | "ROW_COUNT_STATS"; +type ConnectionConfigurationResponseDataWarehouseTypeEnum = "SNOWFLAKE" | "AMAZON_REDSHIFT" | "GOOGLE_BIGQUERY" | "AZURE_SYNAPSE" | "TERADATA" | "SAP_HANA" | "STARBURST" | "ORACLE_ADW" | "DATABRICKS" | "DENODO" | "DREMIO" | "TRINO" | "PRESTO" | "POSTGRES" | "SQLSERVER" | "MYSQL" | "GENERIC_JDBC" | "AMAZON_RDS_POSTGRESQL" | "AMAZON_AURORA_POSTGRESQL" | "AMAZON_RDS_MYSQL" | "AMAZON_AURORA_MYSQL" | "LOOKER" | "AMAZON_ATHENA" | "SINGLESTORE" | "GCP_SQLSERVER" | "GCP_ALLOYDB_POSTGRESQL" | "GCP_POSTGRESQL" | "GCP_MYSQL" | "MODE" | "GOOGLE_SHEETS" | "FALCON" | "FALCON_ONPREM" | "CLICKHOUSE" | "IOMETE"; +type ConnectionConfigurationResponsePolicyTypeEnum = "NO_POLICY" | "PRINCIPALS" | "PROCESSES"; + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +declare class ConnectionConfigurationSearchRequest { + /** + * Unique ID or name of the connection. + */ + 'connection_identifier': string; + /** + * Unique ID or name of the configuration. + */ + 'configuration_identifier'?: string; + /** + * Type of policy. + */ + 'policy_type'?: ConnectionConfigurationSearchRequestPolicyTypeEnum; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} +type ConnectionConfigurationSearchRequestPolicyTypeEnum = "NO_POLICY" | "PRINCIPALS" | "PROCESSES"; + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +declare class DataWarehouseObjectInput { + /** + * Name of the database. + */ + 'database'?: string | null; + /** + * Name of the schema within the database. + */ + 'schema'?: string | null; + /** + * Name of the table within the schema. + */ + 'table'?: string | null; + /** + * Name of the column within the table. + */ + 'column'?: string | null; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +declare class ConnectionInput { + /** + * Unique ID or name of the connection. + */ + 'identifier'?: string | null; + /** + * A pattern to match case-insensitive name of the connection object. User `%` for a wildcard match. + */ + 'name_pattern'?: string | null; + /** + * Filter options for databases, schemas, tables and columns. + */ + 'data_warehouse_objects'?: Array | null; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +declare class DataSourceContextInput { + /** + * Unique identifier of the data source. Required when context type is DATA_SOURCE and `data_source_identifiers` is not provided. At least one of `data_source_identifier` or `data_source_identifiers` must be supplied for DATA_SOURCE context; omit only when context type is AUTO_MODE. Version: 26.5.0.cl or later + */ + 'data_source_identifier'?: string | null; + /** + * Unique identifiers of data sources for multi-data-source context. Required when context type is DATA_SOURCE and `data_source_identifier` is not provided. Version: 26.5.0.cl or later + */ + 'data_source_identifiers'?: Array | null; + /** + * Deprecated. Use `data_source_identifier` instead. Previously required when neither `data_source_identifier` nor `data_source_identifiers` was provided for DATA_SOURCE context. Version: 26.2.0.cl or later + */ + 'guid'?: string | null; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +declare class ContextPayloadV2Input { + /** + * Type of the context. + */ + 'type'?: ContextPayloadV2InputTypeEnum | null; + 'data_source_context'?: DataSourceContextInput; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} +type ContextPayloadV2InputTypeEnum = "data_source" | "DATA_SOURCE" | "AUTO_MODE"; + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +declare class Conversation { + /** + * Unique identifier of the conversation. + */ + 'conversation_identifier': string; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +declare class ConversationSettingsInput { + /** + * Enable contextual change analysis. Default changed from `false` to `true` in 26.2.0.cl. Ignored on versions >= 26.2.0.cl where it is always enabled. Version: 10.4.0.cl or later + */ + 'enable_contextual_change_analysis'?: boolean | null; + /** + * Enable natural language to answer generation. Default changed from `false` to `true` in 26.2.0.cl. Ignored on versions >= 26.2.0.cl where it is always enabled. Version: 10.4.0.cl or later + */ + 'enable_natural_language_answer_generation'?: boolean | null; + /** + * Enable reasoning. Default changed from `false` to `true` in 26.2.0.cl. Ignored on versions >= 26.2.0.cl where it is always enabled. Version: 10.4.0.cl or later + */ + 'enable_reasoning'?: boolean | null; + /** + * Enable save conversation. When `true`, the conversation is persisted and can be retrieved later via conversation history. Version: 26.5.0.cl or later + */ + 'enable_save_chat'?: boolean | null; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +declare class ConvertWorksheetToModelRequest { + /** + * List of Worksheet IDs. + */ + 'worksheet_ids'?: Array; + /** + * List of Worksheet IDs to be excluded. + */ + 'exclude_worksheet_ids'?: Array; + /** + * Indicates whether all the worksheet needs to be converted to models. + */ + 'convert_all'?: boolean | null; + /** + * Indicates whether the changes should be applied to database. + */ + 'apply_changes'?: boolean | null; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +declare class CopyObjectRequest { + /** + * Description of the new object + */ + 'description'?: string; + /** + * GUID of metadata object to be copied (answer id or liveboard id) + */ + 'identifier': string; + /** + * Type of metadata object + */ + 'type'?: CopyObjectRequestTypeEnum; + /** + * Title of the new object + */ + 'title'?: string; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} +type CopyObjectRequestTypeEnum = "LIVEBOARD" | "ANSWER"; + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +/** +* Conversation settings. +*/ +declare class CreateAgentConversationRequestConversationSettings { + /** + * Enable contextual change analysis. Default changed from `false` to `true` in 26.2.0.cl. Ignored on versions >= 26.2.0.cl where it is always enabled. Version: 10.4.0.cl or later + */ + 'enable_contextual_change_analysis'?: boolean | null; + /** + * Enable natural language to answer generation. Default changed from `false` to `true` in 26.2.0.cl. Ignored on versions >= 26.2.0.cl where it is always enabled. Version: 10.4.0.cl or later + */ + 'enable_natural_language_answer_generation'?: boolean | null; + /** + * Enable reasoning. Default changed from `false` to `true` in 26.2.0.cl. Ignored on versions >= 26.2.0.cl where it is always enabled. Version: 10.4.0.cl or later + */ + 'enable_reasoning'?: boolean | null; + /** + * Enable save conversation. When `true`, the conversation is persisted and can be retrieved later via conversation history. Version: 26.5.0.cl or later + */ + 'enable_save_chat'?: boolean | null; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +/** +* Context for the conversation. +*/ +declare class CreateAgentConversationRequestMetadataContext { + /** + * Type of the context. + */ + 'type'?: CreateAgentConversationRequestMetadataContextTypeEnum | null; + 'data_source_context'?: DataSourceContextInput; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} +type CreateAgentConversationRequestMetadataContextTypeEnum = "data_source" | "DATA_SOURCE" | "AUTO_MODE"; + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +declare class CreateAgentConversationRequest { + 'metadata_context': CreateAgentConversationRequestMetadataContext; + 'conversation_settings': CreateAgentConversationRequestConversationSettings; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +/** +* Table reference containing connection identifier and table details in this format: `{\"connection_identifier\":\"conn1\", \"database_name\":\"db1\", \"schema_name\":\"sc1\", \"table_name\":\"tb1\"}`. The given table will be created if `creation_method` is set as `FROM_INPUT_PARAMS`. +*/ +declare class CreateCalendarRequestTableReference { + /** + * Unique ID or name of the connection. + */ + 'connection_identifier': string; + /** + * Name of the database. + */ + 'database_name'?: string | null; + /** + * Name of the schema. + */ + 'schema_name'?: string | null; + /** + * Name of the table. Table names may be case-sensitive depending on the database system. + */ + 'table_name': string; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +declare class CreateCalendarRequest { + /** + * Name of the custom calendar. + */ + 'name': string; + /** + * Type of create operation. + */ + 'creation_method': CreateCalendarRequestCreationMethodEnum; + 'table_reference': CreateCalendarRequestTableReference; + /** + * Start date for the calendar in `MM/dd/yyyy` format. This parameter is mandatory if `creation_method` is set as `FROM_INPUT_PARAMS`. + */ + 'start_date'?: string; + /** + * End date for the calendar in `MM/dd/yyyy` format. This parameter is mandatory if `creation_method` is set as `FROM_INPUT_PARAMS`. + */ + 'end_date'?: string; + /** + * Type of the calendar. + */ + 'calendar_type'?: CreateCalendarRequestCalendarTypeEnum; + /** + * Specify the month in which the fiscal or custom calendar year should start. For example, if you set `month_offset` to \"April\", the custom calendar will treat \"April\" as the first month of the year, and the related attributes such as quarters and start date will be based on this offset. The default value is `January`, which represents the standard calendar year (January to December). + */ + 'month_offset'?: CreateCalendarRequestMonthOffsetEnum; + /** + * Specify the starting day of the week. + */ + 'start_day_of_week'?: CreateCalendarRequestStartDayOfWeekEnum; + /** + * Prefix to add before the quarter. + */ + 'quarter_name_prefix'?: string; + /** + * Prefix to add before the year. + */ + 'year_name_prefix'?: string; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} +type CreateCalendarRequestCreationMethodEnum = "FROM_INPUT_PARAMS" | "FROM_EXISTING_TABLE"; +type CreateCalendarRequestCalendarTypeEnum = "MONTH_OFFSET" | "FOUR_FOUR_FIVE" | "FOUR_FIVE_FOUR" | "FIVE_FOUR_FOUR"; +type CreateCalendarRequestMonthOffsetEnum = "January" | "February" | "March" | "April" | "May" | "June" | "July" | "August" | "September" | "October" | "November" | "December"; +type CreateCalendarRequestStartDayOfWeekEnum = "Sunday" | "Monday" | "Tuesday" | "Wednesday" | "Thursday" | "Friday" | "Saturday"; + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +declare class CreateCollectionRequest { + /** + * Name of the collection. + */ + 'name': string; + /** + * Description of the collection. + */ + 'description'?: string; + /** + * Metadata objects to add to the collection. + */ + 'metadata'?: Array; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +declare class CreateConfigRequest { + /** + * URL for connecting to remote repository + */ + 'repository_url': string; + /** + * Username to authenticate connection to remote repository + */ + 'username': string; + /** + * Access token corresponding to the user to authenticate connection to remote repository + */ + 'access_token': string; + /** + * Applicable when Orgs is enabled in the cluster List of Org ids or name. Provide value -1 for cluster level. Example : [\"OrgID1-or-Name1\", \"OrgID2-or-Name2\"] Note: If no value is specified, then the configurations will be returned for all orgs the user has access to Version: 9.5.0.cl or later + */ + 'org_identifier'?: string; + /** + * List the remote branches to configure. Example:[development, production] + */ + 'branch_names'?: Array; + /** + * Name of the remote branch where objects from this Thoughtspot instance will be versioned. Version: 9.7.0.cl or later + */ + 'commit_branch_name'?: string; + /** + * Maintain mapping of guid for the deployment to an instance Version: 9.4.0.cl or later + */ + 'enable_guid_mapping'?: boolean | null; + /** + * Name of the branch where the configuration files related to operations between Thoughtspot and version control repo should be maintained. Note: If no branch name is specified, then by default, ts_config_files branch is considered. Ensure this branch exists before configuration. Version: 9.7.0.cl or later + */ + 'configuration_branch_name'?: string; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +/** +* This attribute is only applicable to parameterized connections. Ensure that the policy is set to Processes to allow the configuration to be used exclusively for system processes. Version: 26.2.0.cl or later +*/ +declare class CreateConnectionConfigurationRequestPolicyProcessOptions { + 'impersonate_user'?: string | null; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +declare class CreateConnectionConfigurationRequest { + /** + * Unique name for the configuration. + */ + 'name': string; + /** + * Description of the configuration. + */ + 'description'?: string; + /** + * Unique ID or name of the connection. + */ + 'connection_identifier': string; + /** + * Specifies whether the connection configuration should inherit all properties and authentication type from its parent connection. This attribute is only applicable to parameterized connections. When set to true, the configuration uses only the connection properties and authentication type inherited from the parent. Version: 26.2.0.cl or later + */ + 'same_as_parent'?: boolean | null; + 'policy_process_options'?: CreateConnectionConfigurationRequestPolicyProcessOptions; + /** + * Type of authentication used for the connection. + */ + 'authentication_type'?: CreateConnectionConfigurationRequestAuthenticationTypeEnum; + /** + * Configuration properties in JSON. + */ + 'configuration': any; + /** + * Type of policy. + */ + 'policy_type'?: CreateConnectionConfigurationRequestPolicyTypeEnum; + /** + * Unique ID or name of the User and User Groups. + */ + 'policy_principals'?: Array; + /** + * Action that the query performed on the data warehouse, such as SAGE_INDEXING and ROW_COUNT_STATS. + */ + 'policy_processes'?: Array; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} +type CreateConnectionConfigurationRequestAuthenticationTypeEnum = "SERVICE_ACCOUNT" | "KEY_PAIR" | "PERSONAL_ACCESS_TOKEN" | "OAUTH_WITH_SERVICE_PRINCIPAL" | "OAUTH_CLIENT_CREDENTIALS"; +type CreateConnectionConfigurationRequestPolicyTypeEnum = "NO_POLICY" | "PRINCIPALS" | "PROCESSES"; +type CreateConnectionConfigurationRequestPolicyProcessesEnum = "SAGE_INDEXING" | "ROW_COUNT_STATS"; + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +declare class CreateConnectionRequest { + /** + * Unique name for the connection. + */ + 'name': string; + /** + * Description of the connection. + */ + 'description'?: string; + /** + * Type of the data warehouse. + */ + 'data_warehouse_type': CreateConnectionRequestDataWarehouseTypeEnum; + /** + * Connection configuration attributes in JSON format. To create a connection with tables, include table attributes. See the documentation above for sample JSON. + */ + 'data_warehouse_config': any; + /** + * Validates the connection metadata if tables are included. If you are creating a connection without tables, specify `false`. + */ + 'validate'?: boolean | null; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} +type CreateConnectionRequestDataWarehouseTypeEnum = "SNOWFLAKE" | "AMAZON_REDSHIFT" | "GOOGLE_BIGQUERY" | "AZURE_SYNAPSE" | "TERADATA" | "SAP_HANA" | "STARBURST" | "ORACLE_ADW" | "DATABRICKS" | "DENODO" | "DREMIO" | "TRINO" | "PRESTO" | "POSTGRES" | "SQLSERVER" | "MYSQL" | "GENERIC_JDBC" | "AMAZON_RDS_POSTGRESQL" | "AMAZON_AURORA_POSTGRESQL" | "AMAZON_RDS_MYSQL" | "AMAZON_AURORA_MYSQL" | "LOOKER" | "AMAZON_ATHENA" | "SINGLESTORE" | "GCP_SQLSERVER" | "GCP_ALLOYDB_POSTGRESQL" | "GCP_POSTGRESQL" | "GCP_MYSQL" | "MODE" | "GOOGLE_SHEETS" | "FALCON" | "FALCON_ONPREM" | "CLICKHOUSE" | "IOMETE"; + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +declare class CreateConnectionResponse { + /** + * ID of the connection created. + */ + 'id': string; + /** + * Name of the connection. + */ + 'name': string; + /** + * Type of data warehouse. + */ + 'data_warehouse_type': CreateConnectionResponseDataWarehouseTypeEnum; + /** + * Details of the connection. + */ + 'details'?: any | null; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} +type CreateConnectionResponseDataWarehouseTypeEnum = "SNOWFLAKE" | "AMAZON_REDSHIFT" | "GOOGLE_BIGQUERY" | "AZURE_SYNAPSE" | "TERADATA" | "SAP_HANA" | "STARBURST" | "ORACLE_ADW" | "DATABRICKS" | "DENODO" | "DREMIO" | "TRINO" | "PRESTO" | "POSTGRES" | "SQLSERVER" | "MYSQL" | "GENERIC_JDBC" | "AMAZON_RDS_POSTGRESQL" | "AMAZON_AURORA_POSTGRESQL" | "AMAZON_RDS_MYSQL" | "AMAZON_AURORA_MYSQL" | "LOOKER" | "AMAZON_ATHENA" | "SINGLESTORE" | "GCP_SQLSERVER" | "GCP_ALLOYDB_POSTGRESQL" | "GCP_POSTGRESQL" | "GCP_MYSQL" | "MODE" | "GOOGLE_SHEETS" | "FALCON" | "FALCON_ONPREM" | "CLICKHOUSE" | "IOMETE"; + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +declare class CreateConversationRequest { + /** + * ID of the metadata object, such as a Worksheet or Model, to use as a data source for the conversation. + */ + 'metadata_identifier': string; + /** + * Token string to set the context for the conversation. For example,`[sales],[item type],[state]`. + */ + 'tokens'?: string; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +/** +* Action details includes `Type` and Configuration data for Custom Actions, either Callback or URL is required. +*/ +declare class CreateCustomActionRequestActionDetails { + 'CALLBACK'?: CALLBACKInputMandatory; + 'URL'?: URLInputMandatory; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +/** +* Default Custom action configuration. This includes if the custom action is available on all visualizations. By default, a custom action is added to all visualizations and Answers. +*/ +declare class CreateCustomActionRequestDefaultActionConfig { + /** + * Custom action is available on all visualizations. Earlier naming convention: LOCAL/GLOBAL. TRUE signifies GLOBAL for backward compatibility. Default: true + */ + 'visibility'?: boolean | null; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +declare class CreateCustomActionRequest { + /** + * Name of the custom action. The custom action name must be unique. + */ + 'name': string; + 'action_details': CreateCustomActionRequestActionDetails; + /** + * Metadata objects to which the custom action needs to be associated. + */ + 'associate_metadata'?: Array; + 'default_action_config'?: CreateCustomActionRequestDefaultActionConfig; + /** + * Unique ID or name of the groups that can view and access the custom action. + */ + 'group_identifiers'?: Array; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +/** +* Email customization configuration as key value pair +*/ +declare class CreateEmailCustomizationRequestTemplateProperties { + /** + * Background color for call-to-action button in hex format + */ + 'cta_button_bg_color'?: string | null; + /** + * Text color for call-to-action button in hex format + */ + 'cta_text_font_color'?: string | null; + /** + * Primary background color in hex format + */ + 'primary_bg_color'?: string | null; + /** + * Home page URL (HTTP/HTTPS only) + */ + 'home_url'?: string | null; + /** + * Logo image URL (HTTP/HTTPS only) + */ + 'logo_url'?: string | null; + /** + * Font family for email content (e.g., Arial, sans-serif) + */ + 'font_family'?: string | null; + /** + * Product name to display + */ + 'product_name'?: string | null; + /** + * Footer address text + */ + 'footer_address'?: string | null; + /** + * Footer phone number + */ + 'footer_phone'?: string | null; + /** + * Replacement value for Liveboard + */ + 'replacement_value_for_liveboard'?: string | null; + /** + * Replacement value for Answer + */ + 'replacement_value_for_answer'?: string | null; + /** + * Replacement value for SpotIQ + */ + 'replacement_value_for_spot_iq'?: string | null; + /** + * Whether to hide footer address + */ + 'hide_footer_address'?: boolean | null; + /** + * Whether to hide footer phone number + */ + 'hide_footer_phone'?: boolean | null; + /** + * Whether to hide manage notification link + */ + 'hide_manage_notification'?: boolean | null; + /** + * Whether to hide mobile app nudge + */ + 'hide_mobile_app_nudge'?: boolean | null; + /** + * Whether to hide privacy policy link + */ + 'hide_privacy_policy'?: boolean | null; + /** + * Whether to hide product name + */ + 'hide_product_name'?: boolean | null; + /** + * Whether to hide ThoughtSpot vocabulary definitions + */ + 'hide_ts_vocabulary_definitions'?: boolean | null; + /** + * Whether to hide notification status + */ + 'hide_notification_status'?: boolean | null; + /** + * Whether to hide error message + */ + 'hide_error_message'?: boolean | null; + /** + * Whether to hide unsubscribe link + */ + 'hide_unsubscribe_link'?: boolean | null; + /** + * Whether to hide modify alert + */ + 'hide_modify_alert'?: boolean | null; + /** + * Company privacy policy URL (HTTP/HTTPS only) + */ + 'company_privacy_policy_url'?: string | null; + /** + * Company website URL (HTTP/HTTPS only) + */ + 'company_website_url'?: string | null; + /** + * Contact support url (HTTP/HTTPS only). Version: 26.2.0.cl or later + */ + 'contact_support_url'?: string | null; + /** + * Whether to hide contact support url. Version: 26.2.0.cl or later + */ + 'hide_contact_support_url'?: boolean | null; + /** + * Whether to hide logo Version: 26.4.0.cl or later + */ + 'hide_logo_url'?: boolean | null; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +declare class CreateEmailCustomizationRequest { + 'template_properties': CreateEmailCustomizationRequestTemplateProperties; + /** + * Unique ID or name of org Version: 10.12.0.cl or later + */ + 'org_identifier'?: string; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +declare class OrgType { + 'name'?: string | null; + 'id'?: number | null; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +declare class CreateEmailCustomizationResponse { + /** + * Tenant ID + */ + 'tenant_id': string; + 'org': OrgType; + /** + * Email customization name. + */ + 'name': string; + /** + * Customization configuration for the email + */ + 'template_properties': any; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +declare class CreateOrgRequest { + /** + * Name of the Org. + */ + 'name': string; + /** + * Description of the Org. + */ + 'description'?: string; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +declare class CreateRoleRequest { + /** + * Unique name of the Role. + */ + 'name': string; + /** + * Description of the Role. + */ + 'description'?: string; + /** + * Privileges granted to the Role. See [Documentation](https://developers.thoughtspot.com/docs/rbac#_role_categories_and_privileges)for supported roles privileges. + */ + 'privileges'?: Array; + /** + *
Version: 10.5.0.cl or later
Indicates whether the role is read only. A readonly role can neither be updated nor deleted. + */ + 'read_only'?: boolean | null; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} +type CreateRoleRequestPrivilegesEnum = "USERDATAUPLOADING" | "DATADOWNLOADING" | "DATAMANAGEMENT" | "SHAREWITHALL" | "JOBSCHEDULING" | "A3ANALYSIS" | "BYPASSRLS" | "DISABLE_PINBOARD_CREATION" | "DEVELOPER" | "APPLICATION_ADMINISTRATION" | "USER_ADMINISTRATION" | "GROUP_ADMINISTRATION" | "SYSTEM_INFO_ADMINISTRATION" | "SYNCMANAGEMENT" | "ORG_ADMINISTRATION" | "ROLE_ADMINISTRATION" | "AUTHENTICATION_ADMINISTRATION" | "BILLING_INFO_ADMINISTRATION" | "CONTROL_TRUSTED_AUTH" | "TAGMANAGEMENT" | "LIVEBOARD_VERIFIER" | "CAN_MANAGE_CUSTOM_CALENDAR" | "CAN_CREATE_OR_EDIT_CONNECTIONS" | "CAN_MANAGE_WORKSHEET_VIEWS_TABLES" | "CAN_MANAGE_VERSION_CONTROL" | "THIRDPARTY_ANALYSIS" | "CAN_CREATE_CATALOG" | "ALLOW_NON_EMBED_FULL_APP_ACCESS" | "CAN_ACCESS_ANALYST_STUDIO" | "CAN_MANAGE_ANALYST_STUDIO" | "PREVIEW_DOCUMENT_SEARCH" | "CAN_MANAGE_VARIABLES" | "CAN_MODIFY_FOLDERS" | "CAN_VIEW_FOLDERS" | "CAN_MANAGE_AGENTSPOT" | "CAN_ACCESS_AGENTSPOT" | "CAN_SETUP_VERSION_CONTROL" | "PREVIEW_THOUGHTSPOT_SAGE" | "CAN_MANAGE_WEBHOOKS" | "CAN_DOWNLOAD_VISUALS" | "CAN_DOWNLOAD_DETAILED_DATA" | "CAN_USE_SPOTTER"; + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +/** +* Schedule selected cron expression. +*/ +declare class CronExpressionInput { + /** + * Day of month of the object. + */ + 'day_of_month': string; + /** + * Day of Week of the object. + */ + 'day_of_week': string; + /** + * Hour of the object. + */ + 'hour': string; + /** + * Minute of the object. + */ + 'minute': string; + /** + * Month of the object. + */ + 'month': string; + /** + * Second of the object. + */ + 'second': string; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +/** +* Frequency settings for the scheduled job. +*/ +declare class CreateScheduleRequestFrequency { + 'cron_expression': CronExpressionInput; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +/** +* Options to specify details of Liveboard. +*/ +declare class CreateScheduleRequestLiveboardOptions { + /** + * Unique ID or name of visualizations. + */ + 'visualization_identifiers': Array; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +/** +* PDF layout and orientation settings. Applicable only if the `file_format` is specified as `PDF`. +*/ +declare class CreateScheduleRequestPdfOptions { + /** + * Indicates whether to include complete Liveboard. + */ + 'complete_liveboard'?: boolean | null; + /** + * Indicates whether to include cover page with the Liveboard title. + */ + 'include_cover_page'?: boolean | null; + /** + * Indicates whether to include customized wide logo in the footer if available. + */ + 'include_custom_logo'?: boolean | null; + /** + * Indicates whether to include a page with all applied filters. + */ + 'include_filter_page'?: boolean | null; + /** + * Indicates whether to include page number in the footer of each page + */ + 'include_page_number'?: boolean | null; + /** + * Text to include in the footer of each page. + */ + 'page_footer_text'?: string | null; + /** + * Page orientation of the PDF. + */ + 'page_orientation'?: string | null; + /** + * Page size. + */ + 'page_size'?: CreateScheduleRequestPdfOptionsPageSizeEnum | null; + /** + * Indicates whether to include only first page of the tables. + */ + 'truncate_table'?: boolean | null; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} +type CreateScheduleRequestPdfOptionsPageSizeEnum = "A4" | "TAB_BASED"; + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +declare class PrincipalsListItemInput { + /** + * Unique ID or name of the user or group. + */ + 'identifier': string; + /** + * Principal type. + */ + 'type': string; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +/** +* Recipients of the scheduled job notifications. Add the GUID or name of the ThoughtSpot users or groups as recipients in the `principals` array. If a recipient is not a ThoughtSpot user, specify email address. +*/ +declare class CreateScheduleRequestRecipientDetails { + /** + * Emails of the recipients. + */ + 'emails'?: Array | null; + /** + * User or groups to be set as recipients of the schedule notifications. + */ + 'principals'?: Array | null; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +declare class CreateScheduleRequest { + /** + * Name of the scheduled job. + */ + 'name': string; + /** + * Description of the job. + */ + 'description': string; + /** + * Type of the metadata object. + */ + 'metadata_type': CreateScheduleRequestMetadataTypeEnum; + /** + * Unique ID or name of the metadata object. + */ + 'metadata_identifier': string; + /** + * Export file format. + */ + 'file_format'?: CreateScheduleRequestFileFormatEnum; + 'liveboard_options'?: CreateScheduleRequestLiveboardOptions; + 'pdf_options'?: CreateScheduleRequestPdfOptions; + /** + * Time zone + */ + 'time_zone': CreateScheduleRequestTimeZoneEnum; + 'frequency'?: CreateScheduleRequestFrequency; + 'recipient_details': CreateScheduleRequestRecipientDetails; + /** + * Personalised view id of the liveboard to be scheduled. + */ + 'personalised_view_id'?: string; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} +type CreateScheduleRequestMetadataTypeEnum = "LIVEBOARD"; +type CreateScheduleRequestFileFormatEnum = "CSV" | "PDF" | "XLSX"; +type CreateScheduleRequestTimeZoneEnum = "Africa/Abidjan" | "Africa/Accra" | "Africa/Addis_Ababa" | "Africa/Algiers" | "Africa/Asmara" | "Africa/Asmera" | "Africa/Bamako" | "Africa/Bangui" | "Africa/Banjul" | "Africa/Bissau" | "Africa/Blantyre" | "Africa/Brazzaville" | "Africa/Bujumbura" | "Africa/Cairo" | "Africa/Casablanca" | "Africa/Ceuta" | "Africa/Conakry" | "Africa/Dakar" | "Africa/Dar_es_Salaam" | "Africa/Djibouti" | "Africa/Douala" | "Africa/El_Aaiun" | "Africa/Freetown" | "Africa/Gaborone" | "Africa/Harare" | "Africa/Johannesburg" | "Africa/Juba" | "Africa/Kampala" | "Africa/Khartoum" | "Africa/Kigali" | "Africa/Kinshasa" | "Africa/Lagos" | "Africa/Libreville" | "Africa/Lome" | "Africa/Luanda" | "Africa/Lubumbashi" | "Africa/Lusaka" | "Africa/Malabo" | "Africa/Maputo" | "Africa/Maseru" | "Africa/Mbabane" | "Africa/Mogadishu" | "Africa/Monrovia" | "Africa/Nairobi" | "Africa/Ndjamena" | "Africa/Niamey" | "Africa/Nouakchott" | "Africa/Ouagadougou" | "Africa/Porto-Novo" | "Africa/Sao_Tome" | "Africa/Timbuktu" | "Africa/Tripoli" | "Africa/Tunis" | "Africa/Windhoek" | "America/Adak" | "America/Anchorage" | "America/Anguilla" | "America/Antigua" | "America/Araguaina" | "America/Argentina/Buenos_Aires" | "America/Argentina/Catamarca" | "America/Argentina/ComodRivadavia" | "America/Argentina/Cordoba" | "America/Argentina/Jujuy" | "America/Argentina/La_Rioja" | "America/Argentina/Mendoza" | "America/Argentina/Rio_Gallegos" | "America/Argentina/Salta" | "America/Argentina/San_Juan" | "America/Argentina/San_Luis" | "America/Argentina/Tucuman" | "America/Argentina/Ushuaia" | "America/Aruba" | "America/Asuncion" | "America/Atikokan" | "America/Atka" | "America/Bahia" | "America/Bahia_Banderas" | "America/Barbados" | "America/Belem" | "America/Belize" | "America/Blanc-Sablon" | "America/Boa_Vista" | "America/Bogota" | "America/Boise" | "America/Buenos_Aires" | "America/Cambridge_Bay" | "America/Campo_Grande" | "America/Cancun" | "America/Caracas" | "America/Catamarca" | "America/Cayenne" | "America/Cayman" | "America/Chicago" | "America/Chihuahua" | "America/Coral_Harbour" | "America/Cordoba" | "America/Costa_Rica" | "America/Creston" | "America/Cuiaba" | "America/Curacao" | "America/Danmarkshavn" | "America/Dawson" | "America/Dawson_Creek" | "America/Denver" | "America/Detroit" | "America/Dominica" | "America/Edmonton" | "America/Eirunepe" | "America/El_Salvador" | "America/Ensenada" | "America/Fort_Nelson" | "America/Fort_Wayne" | "America/Fortaleza" | "America/Glace_Bay" | "America/Godthab" | "America/Goose_Bay" | "America/Grand_Turk" | "America/Grenada" | "America/Guadeloupe" | "America/Guatemala" | "America/Guayaquil" | "America/Guyana" | "America/Halifax" | "America/Havana" | "America/Hermosillo" | "America/Indiana/Indianapolis" | "America/Indiana/Knox" | "America/Indiana/Marengo" | "America/Indiana/Petersburg" | "America/Indiana/Tell_City" | "America/Indiana/Vevay" | "America/Indiana/Vincennes" | "America/Indiana/Winamac" | "America/Indianapolis" | "America/Inuvik" | "America/Iqaluit" | "America/Jamaica" | "America/Jujuy" | "America/Juneau" | "America/Kentucky/Louisville" | "America/Kentucky/Monticello" | "America/Knox_IN" | "America/Kralendijk" | "America/La_Paz" | "America/Lima" | "America/Los_Angeles" | "America/Louisville" | "America/Lower_Princes" | "America/Maceio" | "America/Managua" | "America/Manaus" | "America/Marigot" | "America/Martinique" | "America/Matamoros" | "America/Mazatlan" | "America/Mendoza" | "America/Menominee" | "America/Merida" | "America/Metlakatla" | "America/Mexico_City" | "America/Miquelon" | "America/Moncton" | "America/Monterrey" | "America/Montevideo" | "America/Montreal" | "America/Montserrat" | "America/Nassau" | "America/New_York" | "America/Nipigon" | "America/Nome" | "America/Noronha" | "America/North_Dakota/Beulah" | "America/North_Dakota/Center" | "America/North_Dakota/New_Salem" | "America/Nuuk" | "America/Ojinaga" | "America/Panama" | "America/Pangnirtung" | "America/Paramaribo" | "America/Phoenix" | "America/Port-au-Prince" | "America/Port_of_Spain" | "America/Porto_Acre" | "America/Porto_Velho" | "America/Puerto_Rico" | "America/Punta_Arenas" | "America/Rainy_River" | "America/Rankin_Inlet" | "America/Recife" | "America/Regina" | "America/Resolute" | "America/Rio_Branco" | "America/Rosario" | "America/Santa_Isabel" | "America/Santarem" | "America/Santiago" | "America/Santo_Domingo" | "America/Sao_Paulo" | "America/Scoresbysund" | "America/Shiprock" | "America/Sitka" | "America/St_Barthelemy" | "America/St_Johns" | "America/St_Kitts" | "America/St_Lucia" | "America/St_Thomas" | "America/St_Vincent" | "America/Swift_Current" | "America/Tegucigalpa" | "America/Thule" | "America/Thunder_Bay" | "America/Tijuana" | "America/Toronto" | "America/Tortola" | "America/Vancouver" | "America/Virgin" | "America/Whitehorse" | "America/Winnipeg" | "America/Yakutat" | "America/Yellowknife" | "Antarctica/Casey" | "Antarctica/Davis" | "Antarctica/DumontDUrville" | "Antarctica/Macquarie" | "Antarctica/Mawson" | "Antarctica/McMurdo" | "Antarctica/Palmer" | "Antarctica/Rothera" | "Antarctica/South_Pole" | "Antarctica/Syowa" | "Antarctica/Troll" | "Antarctica/Vostok" | "Arctic/Longyearbyen" | "Asia/Aden" | "Asia/Almaty" | "Asia/Amman" | "Asia/Anadyr" | "Asia/Aqtau" | "Asia/Aqtobe" | "Asia/Ashgabat" | "Asia/Ashkhabad" | "Asia/Atyrau" | "Asia/Baghdad" | "Asia/Bahrain" | "Asia/Baku" | "Asia/Bangkok" | "Asia/Barnaul" | "Asia/Beirut" | "Asia/Bishkek" | "Asia/Brunei" | "Asia/Calcutta" | "Asia/Chita" | "Asia/Choibalsan" | "Asia/Chongqing" | "Asia/Chungking" | "Asia/Colombo" | "Asia/Dacca" | "Asia/Damascus" | "Asia/Dhaka" | "Asia/Dili" | "Asia/Dubai" | "Asia/Dushanbe" | "Asia/Famagusta" | "Asia/Gaza" | "Asia/Harbin" | "Asia/Hebron" | "Asia/Ho_Chi_Minh" | "Asia/Hong_Kong" | "Asia/Hovd" | "Asia/Irkutsk" | "Asia/Istanbul" | "Asia/Jakarta" | "Asia/Jayapura" | "Asia/Jerusalem" | "Asia/Kabul" | "Asia/Kamchatka" | "Asia/Karachi" | "Asia/Kashgar" | "Asia/Kathmandu" | "Asia/Katmandu" | "Asia/Khandyga" | "Asia/Kolkata" | "Asia/Krasnoyarsk" | "Asia/Kuala_Lumpur" | "Asia/Kuching" | "Asia/Kuwait" | "Asia/Macao" | "Asia/Macau" | "Asia/Magadan" | "Asia/Makassar" | "Asia/Manila" | "Asia/Muscat" | "Asia/Nicosia" | "Asia/Novokuznetsk" | "Asia/Novosibirsk" | "Asia/Omsk" | "Asia/Oral" | "Asia/Phnom_Penh" | "Asia/Pontianak" | "Asia/Pyongyang" | "Asia/Qatar" | "Asia/Qostanay" | "Asia/Qyzylorda" | "Asia/Rangoon" | "Asia/Riyadh" | "Asia/Saigon" | "Asia/Sakhalin" | "Asia/Samarkand" | "Asia/Seoul" | "Asia/Shanghai" | "Asia/Singapore" | "Asia/Srednekolymsk" | "Asia/Taipei" | "Asia/Tashkent" | "Asia/Tbilisi" | "Asia/Tehran" | "Asia/Tel_Aviv" | "Asia/Thimbu" | "Asia/Thimphu" | "Asia/Tokyo" | "Asia/Tomsk" | "Asia/Ujung_Pandang" | "Asia/Ulaanbaatar" | "Asia/Ulan_Bator" | "Asia/Urumqi" | "Asia/Ust-Nera" | "Asia/Vientiane" | "Asia/Vladivostok" | "Asia/Yakutsk" | "Asia/Yangon" | "Asia/Yekaterinburg" | "Asia/Yerevan" | "Atlantic/Azores" | "Atlantic/Bermuda" | "Atlantic/Canary" | "Atlantic/Cape_Verde" | "Atlantic/Faeroe" | "Atlantic/Faroe" | "Atlantic/Jan_Mayen" | "Atlantic/Madeira" | "Atlantic/Reykjavik" | "Atlantic/South_Georgia" | "Atlantic/St_Helena" | "Atlantic/Stanley" | "Australia/ACT" | "Australia/Adelaide" | "Australia/Brisbane" | "Australia/Broken_Hill" | "Australia/Canberra" | "Australia/Currie" | "Australia/Darwin" | "Australia/Eucla" | "Australia/Hobart" | "Australia/LHI" | "Australia/Lindeman" | "Australia/Lord_Howe" | "Australia/Melbourne" | "Australia/NSW" | "Australia/North" | "Australia/Perth" | "Australia/Queensland" | "Australia/South" | "Australia/Sydney" | "Australia/Tasmania" | "Australia/Victoria" | "Australia/West" | "Australia/Yancowinna" | "Brazil/Acre" | "Brazil/DeNoronha" | "Brazil/East" | "Brazil/West" | "CET" | "CST6CDT" | "Canada/Atlantic" | "Canada/Central" | "Canada/Eastern" | "Canada/Mountain" | "Canada/Newfoundland" | "Canada/Pacific" | "Canada/Saskatchewan" | "Canada/Yukon" | "Chile/Continental" | "Chile/EasterIsland" | "Cuba" | "EET" | "EST5EDT" | "Egypt" | "Eire" | "Etc/GMT" | "Etc/GMT+0" | "Etc/GMT+1" | "Etc/GMT+10" | "Etc/GMT+11" | "Etc/GMT+12" | "Etc/GMT+2" | "Etc/GMT+3" | "Etc/GMT+4" | "Etc/GMT+5" | "Etc/GMT+6" | "Etc/GMT+7" | "Etc/GMT+8" | "Etc/GMT+9" | "Etc/GMT-0" | "Etc/GMT-1" | "Etc/GMT-10" | "Etc/GMT-11" | "Etc/GMT-12" | "Etc/GMT-13" | "Etc/GMT-14" | "Etc/GMT-2" | "Etc/GMT-3" | "Etc/GMT-4" | "Etc/GMT-5" | "Etc/GMT-6" | "Etc/GMT-7" | "Etc/GMT-8" | "Etc/GMT-9" | "Etc/GMT0" | "Etc/Greenwich" | "Etc/UCT" | "Etc/UTC" | "Etc/Universal" | "Etc/Zulu" | "Europe/Amsterdam" | "Europe/Andorra" | "Europe/Astrakhan" | "Europe/Athens" | "Europe/Belfast" | "Europe/Belgrade" | "Europe/Berlin" | "Europe/Bratislava" | "Europe/Brussels" | "Europe/Bucharest" | "Europe/Budapest" | "Europe/Busingen" | "Europe/Chisinau" | "Europe/Copenhagen" | "Europe/Dublin" | "Europe/Gibraltar" | "Europe/Guernsey" | "Europe/Helsinki" | "Europe/Isle_of_Man" | "Europe/Istanbul" | "Europe/Jersey" | "Europe/Kaliningrad" | "Europe/Kiev" | "Europe/Kirov" | "Europe/Kyiv" | "Europe/Lisbon" | "Europe/Ljubljana" | "Europe/London" | "Europe/Luxembourg" | "Europe/Madrid" | "Europe/Malta" | "Europe/Mariehamn" | "Europe/Minsk" | "Europe/Monaco" | "Europe/Moscow" | "Europe/Nicosia" | "Europe/Oslo" | "Europe/Paris" | "Europe/Podgorica" | "Europe/Prague" | "Europe/Riga" | "Europe/Rome" | "Europe/Samara" | "Europe/San_Marino" | "Europe/Sarajevo" | "Europe/Saratov" | "Europe/Simferopol" | "Europe/Skopje" | "Europe/Sofia" | "Europe/Stockholm" | "Europe/Tallinn" | "Europe/Tirane" | "Europe/Tiraspol" | "Europe/Ulyanovsk" | "Europe/Uzhgorod" | "Europe/Vaduz" | "Europe/Vatican" | "Europe/Vienna" | "Europe/Vilnius" | "Europe/Volgograd" | "Europe/Warsaw" | "Europe/Zagreb" | "Europe/Zaporozhye" | "Europe/Zurich" | "GB" | "GB-Eire" | "GMT" | "GMT0" | "Greenwich" | "Hongkong" | "Iceland" | "Indian/Antananarivo" | "Indian/Chagos" | "Indian/Christmas" | "Indian/Cocos" | "Indian/Comoro" | "Indian/Kerguelen" | "Indian/Mahe" | "Indian/Maldives" | "Indian/Mauritius" | "Indian/Mayotte" | "Indian/Reunion" | "Iran" | "Israel" | "Jamaica" | "Japan" | "Kwajalein" | "Libya" | "MET" | "MST7MDT" | "Mexico/BajaNorte" | "Mexico/BajaSur" | "Mexico/General" | "NZ" | "NZ-CHAT" | "Navajo" | "PRC" | "PST8PDT" | "Pacific/Apia" | "Pacific/Auckland" | "Pacific/Bougainville" | "Pacific/Chatham" | "Pacific/Chuuk" | "Pacific/Easter" | "Pacific/Efate" | "Pacific/Enderbury" | "Pacific/Fakaofo" | "Pacific/Fiji" | "Pacific/Funafuti" | "Pacific/Galapagos" | "Pacific/Gambier" | "Pacific/Guadalcanal" | "Pacific/Guam" | "Pacific/Honolulu" | "Pacific/Johnston" | "Pacific/Kanton" | "Pacific/Kiritimati" | "Pacific/Kosrae" | "Pacific/Kwajalein" | "Pacific/Majuro" | "Pacific/Marquesas" | "Pacific/Midway" | "Pacific/Nauru" | "Pacific/Niue" | "Pacific/Norfolk" | "Pacific/Noumea" | "Pacific/Pago_Pago" | "Pacific/Palau" | "Pacific/Pitcairn" | "Pacific/Pohnpei" | "Pacific/Ponape" | "Pacific/Port_Moresby" | "Pacific/Rarotonga" | "Pacific/Saipan" | "Pacific/Samoa" | "Pacific/Tahiti" | "Pacific/Tarawa" | "Pacific/Tongatapu" | "Pacific/Truk" | "Pacific/Wake" | "Pacific/Wallis" | "Pacific/Yap" | "Poland" | "Portugal" | "ROK" | "Singapore" | "SystemV/AST4" | "SystemV/AST4ADT" | "SystemV/CST6" | "SystemV/CST6CDT" | "SystemV/EST5" | "SystemV/EST5EDT" | "SystemV/HST10" | "SystemV/MST7" | "SystemV/MST7MDT" | "SystemV/PST8" | "SystemV/PST8PDT" | "SystemV/YST9" | "SystemV/YST9YDT" | "Turkey" | "UCT" | "US/Alaska" | "US/Aleutian" | "US/Arizona" | "US/Central" | "US/East-Indiana" | "US/Eastern" | "US/Hawaii" | "US/Indiana-Starke" | "US/Michigan" | "US/Mountain" | "US/Pacific" | "US/Samoa" | "UTC" | "Universal" | "W-SU" | "WET" | "Zulu" | "EST" | "HST" | "MST" | "ACT" | "AET" | "AGT" | "ART" | "AST" | "BET" | "BST" | "CAT" | "CNT" | "CST" | "CTT" | "EAT" | "ECT" | "IET" | "IST" | "JST" | "MIT" | "NET" | "NST" | "PLT" | "PNT" | "PRT" | "PST" | "SST" | "VST"; + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +declare class CreateTagRequest { + /** + * Name of the tag. + */ + 'name': string; + /** + * Hex color code to be assigned to the tag. For example, #ff78a9. + */ + 'color'?: string; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +declare class CreateUserGroupRequest { + /** + * Name of the group. The group name must be unique. + */ + 'name': string; + /** + * Display name for the group. + */ + 'display_name': string; + /** + * GUID of the Liveboards to assign as default Liveboards to the users in the group. + */ + 'default_liveboard_identifiers'?: Array; + /** + * Description of the group + */ + 'description'?: string; + /** + * Privileges to assign to the group + */ + 'privileges'?: Array; + /** + * GUID or name of the sub groups. A subgroup is a group assigned to a parent group. + */ + 'sub_group_identifiers'?: Array; + /** + * Group type. + */ + 'type'?: CreateUserGroupRequestTypeEnum; + /** + * GUID or name of the users to assign to the group. + */ + 'user_identifiers'?: Array; + /** + * Visibility of the group. To make a group visible to other users and groups, set the visibility to SHAREABLE. + */ + 'visibility'?: CreateUserGroupRequestVisibilityEnum; + /** + * Role identifiers of the roles that should be assigned to the group. + */ + 'role_identifiers'?: Array; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} +type CreateUserGroupRequestPrivilegesEnum = "ADMINISTRATION" | "AUTHORING" | "USERDATAUPLOADING" | "DATADOWNLOADING" | "USERMANAGEMENT" | "DATAMANAGEMENT" | "SHAREWITHALL" | "JOBSCHEDULING" | "A3ANALYSIS" | "EXPERIMENTALFEATUREPRIVILEGE" | "BYPASSRLS" | "RANALYSIS" | "DEVELOPER" | "USER_ADMINISTRATION" | "GROUP_ADMINISTRATION" | "SYNCMANAGEMENT" | "CAN_CREATE_CATALOG" | "DISABLE_PINBOARD_CREATION" | "LIVEBOARD_VERIFIER" | "PREVIEW_THOUGHTSPOT_SAGE" | "CAN_MANAGE_VERSION_CONTROL" | "THIRDPARTY_ANALYSIS" | "ALLOW_NON_EMBED_FULL_APP_ACCESS" | "CAN_ACCESS_ANALYST_STUDIO" | "CAN_MANAGE_ANALYST_STUDIO" | "CAN_MODIFY_FOLDERS" | "CAN_MANAGE_VARIABLES" | "CAN_VIEW_FOLDERS" | "CAN_MANAGE_AGENTSPOT" | "CAN_ACCESS_AGENTSPOT" | "PREVIEW_DOCUMENT_SEARCH" | "CAN_SETUP_VERSION_CONTROL" | "CAN_DOWNLOAD_VISUALS" | "CAN_DOWNLOAD_DETAILED_DATA" | "CAN_USE_SPOTTER"; +type CreateUserGroupRequestTypeEnum = "LOCAL_GROUP" | "LDAP_GROUP" | "TEAM_GROUP" | "TENANT_GROUP"; +type CreateUserGroupRequestVisibilityEnum = "SHARABLE" | "NON_SHARABLE"; + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +declare class FavoriteMetadataInput { + /** + * Unique ID or name of the metadata object. + */ + 'identifier'?: string | null; + /** + * Type of metadata object. Required if the name of the object is set as the identifier. This attribute is optional when the object GUID is specified as the identifier. + */ + 'type'?: FavoriteMetadataInputTypeEnum | null; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} +type FavoriteMetadataInputTypeEnum = "LIVEBOARD" | "ANSWER"; + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +declare class CreateUserRequest { + /** + * Name of the user. The username string must be unique. + */ + 'name': string; + /** + * A unique display name string for the user account, usually their first and last name + */ + 'display_name': string; + /** + * Password for the user account. For IAMv2 users, you must set this password if you do not want to trigger an activation email. + */ + 'password'?: string; + /** + * Email of the user account + */ + 'email': string; + /** + * Type of the account. + */ + 'account_type'?: CreateUserRequestAccountTypeEnum; + /** + * Current status of the user account. The `SUSPENDED` user state indicates a transitional state applicable to IAMv2 users only. + */ + 'account_status'?: CreateUserRequestAccountStatusEnum; + /** + * List of Org IDs to which the user belongs. + */ + 'org_identifiers'?: Array; + /** + * GUIDs or names of the groups to which the newly created user belongs. + */ + 'group_identifiers'?: Array; + /** + * Visibility of the users. When set to SHARABLE, the user is visible to other users and groups when they try to share an object. + */ + 'visibility'?: CreateUserRequestVisibilityEnum; + /** + * User preference for receiving email notifications when another ThoughtSpot user shares a metadata object such as Answer, Liveboard, or Worksheet. + */ + 'notify_on_share'?: boolean | null; + /** + * The user preference for revisiting the onboarding experience. + */ + 'show_onboarding_experience'?: boolean | null; + /** + * flag to get the on-boarding experience is completed or not. + */ + 'onboarding_experience_completed'?: boolean | null; + /** + * GUID of the Liveboard to set a default Liveboard for the user. ThoughtSpot displays this Liveboard on the Home page when the user logs in. + */ + 'home_liveboard_identifier'?: string; + /** + * Metadata objects to add to the user\'s favorites list. + */ + 'favorite_metadata'?: Array; + /** + * Locale for the user. When setting this value, do not set use_browser_language to true, otherwise the browser\'s language setting will take precedence and the preferred_locale value will be ignored. + */ + 'preferred_locale'?: CreateUserRequestPreferredLocaleEnum; + /** + * Flag to indicate whether to use the browser locale for the user in the UI. When set to true, the preferred_locale value is unset and the browser\'s language setting takes precedence. Version: 26.3.0.cl or later + */ + 'use_browser_language'?: boolean | null; + /** + * Properties for the user + */ + 'extended_properties'?: any; + /** + * Preferences for the user + */ + 'extended_preferences'?: any; + /** + * Flag to indicate whether welcome email should be sent to user. This parameter is applied only on clusters on which IAM is disabled. + */ + 'trigger_welcome_email'?: boolean | null; + /** + * Flag to indicate whether activation email should be sent to the user. Default value for IAMv2 users is set to true. Users must either set this to false, or enter a valid password if they do not want to trigger an activation email. + */ + 'trigger_activation_email'?: boolean | null; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} +type CreateUserRequestAccountTypeEnum = "LOCAL_USER" | "LDAP_USER" | "SAML_USER" | "OIDC_USER" | "REMOTE_USER"; +type CreateUserRequestAccountStatusEnum = "ACTIVE" | "INACTIVE" | "EXPIRED" | "LOCKED" | "PENDING" | "SUSPENDED"; +type CreateUserRequestVisibilityEnum = "SHARABLE" | "NON_SHARABLE"; +type CreateUserRequestPreferredLocaleEnum = "en-CA" | "en-GB" | "en-US" | "de-DE" | "ja-JP" | "zh-CN" | "pt-BR" | "fr-FR" | "fr-CA" | "es-US" | "da-DK" | "es-ES" | "fi-FI" | "sv-SE" | "nb-NO" | "pt-PT" | "nl-NL" | "it-IT" | "ru-RU" | "en-IN" | "de-CH" | "en-NZ" | "es-MX" | "en-AU" | "zh-Hant" | "ko-KR" | "en-DE"; + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +declare class CreateVariableRequest { + /** + * Type of variable + */ + 'type': CreateVariableRequestTypeEnum; + /** + * Name of the variable. This is unique across the cluster. + */ + 'name': string; + /** + * If the variable contains sensitive values like passwords + */ + 'is_sensitive'?: boolean | null; + /** + * Variable Data Type, only for formula_variable type, leave empty for others Version: 10.15.0.cl or later + */ + 'data_type'?: CreateVariableRequestDataTypeEnum; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} +type CreateVariableRequestTypeEnum = "CONNECTION_PROPERTY" | "TABLE_MAPPING" | "CONNECTION_PROPERTY_PER_PRINCIPAL" | "FORMULA_VARIABLE"; +type CreateVariableRequestDataTypeEnum = "VARCHAR" | "INT32" | "INT64" | "DOUBLE" | "DATE" | "DATE_TIME"; + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +declare class WebhookAuthApiKeyInput { + /** + * The header or query parameter name for the API key. + */ + 'key': string; + /** + * The API key value. + */ + 'value': string; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +declare class WebhookAuthBasicAuthInput { + /** + * Username for basic authentication. + */ + 'username': string; + /** + * Password for basic authentication. + */ + 'password': string; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +declare class WebhookAuthOAuth2Input { + /** + * OAuth2 authorization server URL. + */ + 'authorization_url': string; + /** + * OAuth2 client identifier. + */ + 'client_id': string; + /** + * OAuth2 client secret key. + */ + 'client_secret': string; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +/** +* Authorization configuration for the webhook. +*/ +declare class CreateWebhookConfigurationRequestAuthentication { + 'API_KEY'?: WebhookAuthApiKeyInput; + 'BASIC_AUTH'?: WebhookAuthBasicAuthInput; + /** + * Bearer token authentication configuration. + */ + 'BEARER_TOKEN'?: string | null; + 'OAUTH2'?: WebhookAuthOAuth2Input; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +/** +* Configuration for webhook signature verification. +*/ +declare class CreateWebhookConfigurationRequestSignatureVerification { + /** + * Signature verification method type. + */ + 'type': CreateWebhookConfigurationRequestSignatureVerificationTypeEnum; + /** + * HTTP header where the signature is sent. + */ + 'header': string; + /** + * Hash algorithm used for signature verification. + */ + 'algorithm': CreateWebhookConfigurationRequestSignatureVerificationAlgorithmEnum; + /** + * Shared secret used for HMAC signature generation. + */ + 'secret': string; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} +type CreateWebhookConfigurationRequestSignatureVerificationTypeEnum = "HMAC_SHA256"; +type CreateWebhookConfigurationRequestSignatureVerificationAlgorithmEnum = "SHA256"; + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +/** +* Input type for storage configuration. +*/ +declare class StorageConfigInput { + 'aws_s3_config'?: AwsS3ConfigInput; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +/** +* Configuration for storage destination. Example: {\"storage_type\": \"AWS_S3\", \"storage_config\": {\"aws_s3_config\": {\"bucket_name\": \"my-webhook-files\", \"region\": \"us-west-2\", \"role_arn\": \"arn:aws:iam::123456789012:role/ThoughtSpotDeliveryRole\", \"external_id\": \"ts-webhook-a1b2c3d4-7890\", \"path_prefix\": \"thoughtspot-webhooks/\"}}} Version: 26.3.0.cl or later +*/ +declare class CreateWebhookConfigurationRequestStorageDestination { + /** + * Type of storage destination. Example: \"AWS_S3\" + */ + 'storage_type': CreateWebhookConfigurationRequestStorageDestinationStorageTypeEnum; + 'storage_config': StorageConfigInput; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} +type CreateWebhookConfigurationRequestStorageDestinationStorageTypeEnum = "AWS_S3"; + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +/** +* Key-value pair input for additional webhook headers. +*/ +declare class WebhookKeyValuePairInput { + /** + * Header name. + */ + 'key': string; + /** + * Header value. + */ + 'value': string; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +declare class CreateWebhookConfigurationRequest { + /** + * Name of the webhook configuration. + */ + 'name': string; + /** + * Description of the webhook configuration. + */ + 'description'?: string; + /** + * The webhook endpoint URL. + */ + 'url': string; + /** + * Additional URL parameters as key-value pairs. + */ + 'url_params'?: any; + /** + * List of events to subscribe to. + */ + 'events': Array; + 'authentication'?: CreateWebhookConfigurationRequestAuthentication; + 'signature_verification'?: CreateWebhookConfigurationRequestSignatureVerification; + 'storage_destination'?: CreateWebhookConfigurationRequestStorageDestination; + /** + * Additional headers as an array of key-value pairs. Example: [{\"key\": \"X-Custom-Header\", \"value\": \"custom_value\"}] Version: 26.4.0.cl or later + */ + 'additional_headers'?: Array; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} +type CreateWebhookConfigurationRequestEventsEnum = "LIVEBOARD_SCHEDULE"; + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +/** +* Schedule selected cron expression. +*/ +declare class CronExpression { + /** + * Day of month of the object. + */ + 'day_of_month': string; + /** + * Day of Week of the object. + */ + 'day_of_week': string; + /** + * Hour of the object. + */ + 'hour': string; + /** + * Minute of the object. + */ + 'minute': string; + /** + * Month of the object. + */ + 'month': string; + /** + * Second of the object. + */ + 'second': string; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +/** +* Script-src CSP settings. +*/ +declare class ScriptSrcUrls { + /** + * Whether script-src customization is enabled. + */ + 'enabled'?: boolean | null; + /** + * Allowed URLs for script-src directive. Can only be set if enabled is true. + */ + 'urls'?: Array | null; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +/** +* CSP (Content Security Policy) settings. +*/ +declare class CspSettings { + /** + * Allowed URLs for connect-src directive. + */ + 'connect_src_urls'?: Array | null; + /** + * Allowed URLs for font-src directive. + */ + 'font_src_urls'?: Array | null; + /** + * Allowed hosts for visual embed (frame-ancestors directive). + */ + 'visual_embed_hosts'?: Array | null; + /** + * Allowed URLs for frame-src directive. + */ + 'iframe_src_urls'?: Array | null; + /** + * Allowed URLs for img-src directive. + */ + 'img_src_urls'?: Array | null; + 'script_src_urls'?: ScriptSrcUrls; + /** + * Allowed URLs for style-src directive. + */ + 'style_src_urls'?: Array | null; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +/** +* MetadataType InputType used in Custom Action API\'s +*/ +declare class CustomActionMetadataTypeInput { + /** + * Type of metadata object. Required if the name of the object is set as the identifier. This attribute is optional when the object GUID is specified as the identifier. + */ + 'type'?: CustomActionMetadataTypeInputTypeEnum | null; + /** + * Unique ID or name of the metadata object. + */ + 'identifier': string; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} +type CustomActionMetadataTypeInputTypeEnum = "VISUALIZATION" | "ANSWER" | "WORKSHEET"; + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +declare class EntityHeader { + /** + * Description of the data source. + */ + 'description'?: string | null; + /** + * Display name of the data source. + */ + 'data_source_name'?: string | null; + /** + * Unique identifier of the data source. + */ + 'data_source_identifier'?: string | null; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +declare class DataSource { + /** + * Confidence score for the data source suggestion. + */ + 'confidence'?: number | null; + 'details'?: EntityHeader; + /** + * LLM reasoning for the data source. + */ + 'reasoning'?: string | null; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +declare class Table { + /** + * Name of the table. + */ + 'name': string; + /** + * Columns of the table. + */ + 'columns'?: Array | null; + /** + * Type of table. Either view or table + */ + 'type'?: string | null; + /** + * Description of the table + */ + 'description'?: string | null; + /** + * Determines if the table is selected + */ + 'selected'?: boolean | null; + /** + * Determines if the table is linked + */ + 'linked'?: boolean | null; + /** + * List of relationships for the table + */ + 'relationships'?: Array | null; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +declare class SchemaObject { + /** + * Name of the schema. + */ + 'name': string; + /** + * Tables in the schema. + */ + 'tables'?: Array
| null; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +declare class Database { + /** + * Name of the database. + */ + 'name': string; + /** + * Schemas of the database. + */ + 'schemas'?: Array | null; + /** + * Determines if the object is auto created. + */ + 'auto_created'?: boolean | null; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +declare class DataWarehouseObjects { + /** + * Databases of the connection. + */ + 'databases': Array; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +declare class DbtSearchResponse { + 'dbt_connection_identifier'?: string | null; + 'project_name'?: string | null; + 'connection_id'?: string | null; + 'connection_name'?: string | null; + 'cdw_database'?: string | null; + 'import_type'?: string | null; + 'author_name'?: string | null; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +declare class DeactivateUserRequest { + /** + * Unique ID or name of the user. + */ + 'user_identifier': string; + /** + * Base url of the cluster. + */ + 'base_url': string; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +/** +* Default Custom action configuration. This includes the custom action\'s visibility across all visualizations and Answers. By default, a custom action is added to all visualizations and Answers. +*/ +declare class DefaultActionConfig { + /** + * Custom action is available on all visualizations. Earlier , the naming convention: LOCAL/GLOBAL. TRUE signifies GLOBAL for backward compatibility. + */ + 'visibility'?: boolean | null; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +/** +* Default Custom action configuration. This includes the custom action\'s visibility across all visualizations and Answers. By default, a custom action is added to all visualizations and Answers. +*/ +declare class DefaultActionConfigInput { + /** + * Custom action is available on all visualizations. Earlier naming convention: LOCAL/GLOBAL. TRUE signifies GLOBAL for backward compatibility. + */ + 'visibility'?: boolean | null; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +/** +* Default Custom action configuration. This includes the custom action\'s visibility across all visualizations and Answers. By default, a custom action is added to all visualizations and Answers. +*/ +declare class DefaultActionConfigInputCreate { + /** + * Custom action is available on all visualizations. Earlier naming convention: LOCAL/GLOBAL. TRUE signifies GLOBAL for backward compatibility. Default: true + */ + 'visibility'?: boolean | null; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +/** +* Default Custom action configuration. This includes the custom action\'s visibility across all visualizations and Answers. By default, a custom action is added to all visualizations and Answers. +*/ +declare class DefaultActionConfigSearchInput { + /** + * Custom action is available on all visualizations. Earlier naming convention: LOCAL/GLOBAL. TRUE signifies GLOBAL for backward compatibility. + */ + 'visibility'?: boolean | null; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +declare class DeleteCollectionRequest { + /** + * Unique GUIDs of collections to delete. Note: Collection names cannot be used as identifiers since duplicate names are allowed. + */ + 'collection_identifiers': Array; + /** + * Flag to delete child objects of the collection that the user has access to. + */ + 'delete_children'?: boolean | null; + /** + * Preview deletion without actually deleting. When set to true, returns what would be deleted without performing the actual deletion. + */ + 'dry_run'?: boolean | null; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +declare class DeleteConfigRequest { + /** + * Applicable when Orgs is enabled in the cluster Indicator to consider cluster level or org level config. Set it to false to delete configuration from current org. If set to true, then the configuration at cluster level and orgs that inherited the configuration from cluster level will be deleted. Version: 9.5.0.cl or later + */ + 'cluster_level'?: boolean | null; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +declare class DeleteConnectionConfigurationRequest { + /** + * Unique ID or name of the configuration. + */ + 'configuration_identifier': string; + /** + * Unique ID or name of the connection. + */ + 'connection_identifier': string; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +declare class DeleteConnectionRequest { + /** + * Unique ID or name of the connection. + */ + 'connection_identifier': string; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +/** +* MetadataType InputType used in Delete MetadataType API +*/ +declare class DeleteMetadataTypeInput { + /** + * Type of metadata. Required if the name of the object is set as the identifier. This attribute is optional when the object GUID is specified as the identifier. + */ + 'type'?: DeleteMetadataTypeInputTypeEnum | null; + /** + * Unique ID or name of the metadata object. + */ + 'identifier': string; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} +type DeleteMetadataTypeInputTypeEnum = "LIVEBOARD" | "ANSWER" | "LOGICAL_TABLE" | "LOGICAL_COLUMN" | "LOGICAL_RELATIONSHIP"; + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +declare class DeleteMetadataRequest { + /** + * Metadata objects. + */ + 'metadata': Array; + /** + * Indicates whether to delete disabled metadata objects. + */ + 'delete_disabled_objects'?: boolean | null; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +declare class DeleteOrgEmailCustomizationRequest { + /** + * Unique identifier of the organization. + */ + 'org_identifiers'?: Array; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +declare class DeleteVariablesRequest { + /** + * Unique id(s) or name(s) of the variable(s) to delete + */ + 'identifiers': Array; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +declare class DeleteWebhookConfigurationsRequest { + /** + * List of webhook identifiers to delete. + */ + 'webhook_identifiers': Array; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +declare class DeployCommitRequest { + /** + * Commit_id against which the files should be picked to deploy. Note: If no commit_id is specified, then the head of the branch is considered. + */ + 'commit_id'?: string; + /** + * Name of the remote branch where changes should be picked + */ + 'branch_name': string; + /** + * Indicates if all files or only modified file at specified commit point should be considered + */ + 'deploy_type'?: DeployCommitRequestDeployTypeEnum; + /** + * Define the policy to follow while importing TML in the ThoughtSpot environment. Use “ALL_OR_NONE” to cancel the deployment of all ThoughtSpot objects if at least one of them fails to import. Use “Partial” to import ThoughtSpot objects that validate successfully even if other objects in the same deploy operations fail to import. + */ + 'deploy_policy'?: DeployCommitRequestDeployPolicyEnum; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} +type DeployCommitRequestDeployTypeEnum = "FULL" | "DELTA"; +type DeployCommitRequestDeployPolicyEnum = "ALL_OR_NONE" | "PARTIAL" | "VALIDATE_ONLY"; + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +declare class DeployResponse { + /** + * Name of the file deployed + */ + 'file_name'?: string | null; + /** + * Name of the metadata object + */ + 'metadata_name'?: string | null; + /** + * Type of the metadata object + */ + 'metadata_type'?: string | null; + /** + * Indicates the status of deployment for the file + */ + 'status_code'?: string | null; + /** + * Any error or warning with the deployment + */ + 'status_message'?: string | null; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +declare class ErrorResponse { + 'error'?: any | null; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +declare class EurekaDataSourceSuggestionResponse { + /** + * List of data sources suggested. + */ + 'data_sources'?: Array | null; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +declare class EurekaLLMSuggestedQuery { + /** + * NL query that can be run using spotter aka natural language search to get an AI generated answer. + */ + 'query'?: string | null; + /** + * Unique identifier of the worksheet on which this query can be run on. + */ + 'worksheetId'?: string | null; + /** + * Display name of the worksheet on which this query can be run on. + */ + 'worksheetName'?: string | null; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +declare class EurekaLLMDecomposeQueryResponse { + /** + * List of analytical questions that can be run on their respective worksheet/data sources. + */ + 'decomposedQueries'?: Array | null; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +declare class EurekaDecomposeQueryResponse { + 'decomposedQueryResponse'?: EurekaLLMDecomposeQueryResponse; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +declare class NLInstructionsInfo { + /** + * User instructions for natural language processing. + */ + 'instructions': Array; + /** + * Scope of the instruction. + */ + 'scope': NLInstructionsInfoScopeEnum; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} +type NLInstructionsInfoScopeEnum = "GLOBAL"; + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +declare class EurekaGetNLInstructionsResponse { + /** + * List of NL instructions with their scopes. + */ + 'nl_instructions_info': Array; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +declare class EurekaRelevantQuestion { + /** + * NL query that can be run using spotter aka natural language search to get an AI generated answer. + */ + 'query'?: string | null; + /** + * Unique identifier of the data source on which this query can be run on. + */ + 'data_source_identifier'?: string | null; + /** + * Display name of the data source on which this query can be run on. + */ + 'data_source_name'?: string | null; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +declare class EurekaGetRelevantQuestionsResponse { + /** + * List of relevant questions that can be run on their respective data sources. + */ + 'relevant_questions'?: Array | null; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +declare class EurekaSetNLInstructionsResponse { + /** + * Success status of the operation. + */ + 'success': boolean; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +declare class ExcludeMetadataListItemInput { + /** + * Unique ID or name of the metadata. + */ + 'identifier': string; + /** + * Type of metadata. Required if the name of the object is set as identifier. This attribute is optional when the object GUID is specified as identifier. 1. Liveboard 2. Answers 3. LOGICAL_TABLE for any data object such as table, worksheet or view 4. LOGICAL_COLUMN for a column of any data object such as table, worksheet or view 5. CONNECTION for connection objects 6. TAG for tag objects 7. USER for user objects 8. USER_GROUP for group objects 9. LOGICAL_RELATIONSHIP for table or worksheet joins. A join combines from one or several data object by using matching values. 10. INSIGHT_SPEC for SpotIQ objects + */ + 'type': ExcludeMetadataListItemInputTypeEnum; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} +type ExcludeMetadataListItemInputTypeEnum = "LIVEBOARD" | "ANSWER" | "LOGICAL_TABLE" | "LOGICAL_COLUMN" | "CONNECTION" | "TAG" | "USER" | "USER_GROUP" | "LOGICAL_RELATIONSHIP" | "INSIGHT_SPEC"; + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +/** +* Options for PNG export. Version: 26.6.0.cl or later +*/ +declare class ExportAnswerReportRequestPngOptions { + /** + * Desired width of the answer image in pixels. Ex. 1920 for Full HD image Version: 26.6.0.cl or later + */ + 'x_resolution'?: number | null; + /** + * Desired height of the answer image in pixels. Ex. 1080 for Full HD image Version: 26.6.0.cl or later + */ + 'y_resolution'?: number | null; + /** + * The scale of the image in percentage. Ex. 100 for 100% scale. Version: 26.6.0.cl or later + */ + 'scaling'?: number | null; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +/** +* Options for specific region specific overrides to support date/number/string/currency formatting. +*/ +declare class ExportAnswerReportRequestRegionalSettings { + /** + * ISO code to be appended with currency values. + */ + 'currency_format'?: ExportAnswerReportRequestRegionalSettingsCurrencyFormatEnum | null; + /** + * Indicates the locale to be used for all formattings. + */ + 'user_locale'?: ExportAnswerReportRequestRegionalSettingsUserLocaleEnum | null; + /** + * Indicates the locale to be used for number formatting. + */ + 'number_format_locale'?: ExportAnswerReportRequestRegionalSettingsNumberFormatLocaleEnum | null; + /** + * Indicates the locale to be used for date formatting. + */ + 'date_format_locale'?: ExportAnswerReportRequestRegionalSettingsDateFormatLocaleEnum | null; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} +type ExportAnswerReportRequestRegionalSettingsCurrencyFormatEnum = "ADP" | "AED" | "AFN" | "ALL" | "AMD" | "ANG" | "AOA" | "ARA" | "ARS" | "ATS" | "AUD" | "AWG" | "AZN" | "BAM" | "BBD" | "BDT" | "BEF" | "BGL" | "BGM" | "BGN" | "BHD" | "BIF" | "BMD" | "BND" | "BOB" | "BOP" | "BOV" | "BRL" | "BSD" | "BTN" | "BUK" | "BWP" | "BYN" | "BZD" | "CAD" | "CDF" | "CHE" | "CHF" | "CHW" | "CLE" | "CLP" | "CNX" | "CNY" | "COP" | "COU" | "CRC" | "CSK" | "CUC" | "CUP" | "CVE" | "CYP" | "CZK" | "DDM" | "DEM" | "DJF" | "DKK" | "DOP" | "DZD" | "ECS" | "ECV" | "EEK" | "EGP" | "ERN" | "ESP" | "ETB" | "EUR" | "FIM" | "FJD" | "FKP" | "FRF" | "GBP" | "GEK" | "GEL" | "GHS" | "GIP" | "GMD" | "GNF" | "GNS" | "GQE" | "GRD" | "GTQ" | "GWE" | "GWP" | "GYD" | "HKD" | "HNL" | "HRD" | "HRK" | "HTG" | "HUF" | "IDR" | "IEP" | "ILP" | "ILS" | "INR" | "IQD" | "IRR" | "ISK" | "ITL" | "JMD" | "JOD" | "JPY" | "KES" | "KGS" | "KHR" | "KMF" | "KPW" | "KRW" | "KWD" | "KYD" | "KZT" | "LAK" | "LBP" | "LKR" | "LRD" | "LSL" | "LTL" | "LTT" | "LUC" | "LUF" | "LUL" | "LVL" | "LVR" | "LYD" | "MAD" | "MAF" | "MCF" | "MDC" | "MDL" | "MGA" | "MGF" | "MKD" | "MLF" | "MMK" | "MNT" | "MOP" | "MRU" | "MTL" | "MTP" | "MUR" | "MVR" | "MWK" | "MXN" | "MXV" | "MYR" | "MZE" | "MZN" | "NAD" | "NGN" | "NIO" | "NLG" | "NOK" | "NPR" | "NZD" | "OMR" | "PAB" | "PEI" | "PEN" | "PGK" | "PHP" | "PKR" | "PLN" | "PTE" | "PYG" | "QAR" | "RHD" | "RON" | "RSD" | "RUB" | "RWF" | "SAR" | "SBD" | "SCR" | "SDG" | "SEK" | "SGD" | "SHP" | "SIT" | "SKK" | "SLL" | "SOS" | "SRD" | "SRG" | "SSP" | "STN" | "SUR" | "SVC" | "SYP" | "SZL" | "THB" | "TJR" | "TJS" | "TMT" | "TND" | "TOP" | "TPE" | "TRY" | "TTD" | "TWD" | "TZS" | "UAH" | "UAK" | "UGX" | "USD" | "UYU" | "UYW" | "UZS" | "VES" | "VND" | "VUV" | "WST" | "XAF" | "XAG" | "XAU" | "XBA" | "XBB" | "XCD" | "XDR" | "XEU" | "XFO" | "XFU" | "XOF" | "XPD" | "XPF" | "XPT" | "XRE" | "XSU" | "XTS" | "XUA" | "XXX" | "YDD" | "YER" | "ZAR" | "ZMW"; +type ExportAnswerReportRequestRegionalSettingsUserLocaleEnum = "en-CA" | "en-GB" | "en-US" | "de-DE" | "ja-JP" | "zh-CN" | "pt-BR" | "fr-FR" | "fr-CA" | "es-US" | "da-DK" | "es-ES" | "fi-FI" | "sv-SE" | "nb-NO" | "pt-PT" | "nl-NL" | "it-IT" | "ru-RU" | "en-IN" | "de-CH" | "en-NZ" | "es-MX" | "en-AU" | "zh-Hant" | "ko-KR" | "en-DE"; +type ExportAnswerReportRequestRegionalSettingsNumberFormatLocaleEnum = "en-CA" | "en-GB" | "en-US" | "de-DE" | "ja-JP" | "zh-CN" | "pt-BR" | "fr-FR" | "fr-CA" | "es-US" | "da-DK" | "es-ES" | "fi-FI" | "sv-SE" | "nb-NO" | "pt-PT" | "nl-NL" | "it-IT" | "ru-RU" | "en-IN" | "de-CH" | "en-NZ" | "es-MX" | "en-AU" | "zh-Hant" | "ko-KR" | "en-DE"; +type ExportAnswerReportRequestRegionalSettingsDateFormatLocaleEnum = "en-CA" | "en-GB" | "en-US" | "de-DE" | "ja-JP" | "zh-CN" | "pt-BR" | "fr-FR" | "fr-CA" | "es-US" | "da-DK" | "es-ES" | "fi-FI" | "sv-SE" | "nb-NO" | "pt-PT" | "nl-NL" | "it-IT" | "ru-RU" | "en-IN" | "de-CH" | "en-NZ" | "es-MX" | "en-AU" | "zh-Hant" | "ko-KR" | "en-DE"; + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +declare class ExportAnswerReportRequest { + /** + * Unique ID or name of the metadata object. + */ + 'metadata_identifier'?: string; + /** + * Unique ID of the answer session. + */ + 'session_identifier'?: string; + /** + * Generation number of the answer session. + */ + 'generation_number'?: number; + /** + * Export file format. + */ + 'file_format'?: ExportAnswerReportRequestFileFormatEnum; + /** + * JSON string representing runtime filter. { col1:region, op1: EQ, val1: northeast } + */ + 'runtime_filter'?: any; + /** + * JSON string representing runtime sort. { sortCol1: region, asc1 :true, sortCol2 : date } + */ + 'runtime_sort'?: any; + /** + * JSON object for setting values of parameters in runtime. + */ + 'runtime_param_override'?: any; + 'regional_settings'?: ExportAnswerReportRequestRegionalSettings; + 'png_options'?: ExportAnswerReportRequestPngOptions; + /** + * GUID or name of the personalised view of the Answer object. Version: 26.6.0.cl or later + */ + 'personalised_view_identifier'?: string; + /** + * Type of the answer being exported. Version: 26.6.0.cl or later + */ + 'type'?: ExportAnswerReportRequestTypeEnum; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} +type ExportAnswerReportRequestFileFormatEnum = "CSV" | "PDF" | "XLSX" | "PNG"; +type ExportAnswerReportRequestTypeEnum = "SAVED" | "PINNED"; + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +/** +* Options for PDF export. +*/ +declare class ExportLiveboardReportRequestPdfOptions { + /** + * Size of PDF page. `A4` generates a paginated A4 PDF. `CONTINUOUS` generates a continuous PDF that matches the Liveboard layout. Each Liveboard tab has its own page of variable length. Defaults to `A4` if not specified. Version: 26.5.0.cl or later + */ + 'page_size'?: ExportLiveboardReportRequestPdfOptionsPageSizeEnum | null; + /** + * Zoom level percentage for the PDF. Only applicable when `page_size` is `CONTINUOUS`. Acceptable values are integers in the range [45, 175]. Defaults to 100 if not specified. Version: 26.5.0.cl or later + */ + 'zoom_level'?: number | null; + /** + * Indicates whether to include the cover page with the Liveboard title. + */ + 'include_cover_page'?: boolean | null; + /** + * Indicates whether to include customized wide logo in the footer if available. + */ + 'include_custom_logo'?: boolean | null; + /** + * Indicates whether to include a page with all applied filters. For `CONTINUOUS` page_size, this parameter indicates whether to include the filter header. + */ + 'include_filter_page'?: boolean | null; + /** + * Indicates whether to include page number in the footer of each page. + */ + 'include_page_number'?: boolean | null; + /** + * Page orientation of the PDF. + */ + 'page_orientation'?: ExportLiveboardReportRequestPdfOptionsPageOrientationEnum | null; + /** + * Indicates whether to include only the first page of the tables. + */ + 'truncate_table'?: boolean | null; + /** + * Text to include in the footer of each page. + */ + 'page_footer_text'?: string | null; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} +type ExportLiveboardReportRequestPdfOptionsPageSizeEnum = "A4" | "CONTINUOUS"; +type ExportLiveboardReportRequestPdfOptionsPageOrientationEnum = "PORTRAIT" | "LANDSCAPE"; + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +/** +* Options for PNG export. +*/ +declare class ExportLiveboardReportRequestPngOptions { + /** + * Indicates whether to include the cover page with the Liveboard title. + */ + 'include_cover_page'?: boolean | null; + /** + * Indicates whether to include a page with all applied filters. + */ + 'include_filter_page'?: boolean | null; + /** + * Indicates personalised view of the Liveboard in case of png + */ + 'personalised_view_id'?: string | null; + /** + * Desired width of the Liveboard image in pixels. Ex. 1920 for Full HD image Version: 10.9.0.cl or later + */ + 'image_resolution'?: number | null; + /** + * The scale of the image in percentage. Ex. 100 for 100% scale. Version: 10.9.0.cl or later + */ + 'image_scale'?: number | null; + /** + * Indicates whether to include the header of the liveboard. Version: 10.9.0.cl or later + */ + 'include_header'?: boolean | null; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +declare class ExportLiveboardReportRequest { + /** + * GUID or name of the Liveboard object. + */ + 'metadata_identifier': string; + /** + * GUID or name of the tab of the Liveboard object. Version: 10.9.0.cl or later + */ + 'tab_identifiers'?: Array; + /** + * GUID or name of the personalised view of the Liveboard object. Version: 10.9.0.cl or later + */ + 'personalised_view_identifier'?: string; + /** + * GUID or name of visualizations on the Liveboard. If this parameter is not defined, the API returns a report with all visualizations saved on a Liveboard. + */ + 'visualization_identifiers'?: Array; + /** + * Transient content of the Liveboard. + */ + 'transient_content'?: string; + /** + * Export file format. + */ + 'file_format'?: ExportLiveboardReportRequestFileFormatEnum; + /** + * JSON object with representing filter condition to apply filters at runtime. For example, {\"col1\": \"region\", \"op1\": \"EQ\", \"val1\": \"northeast\" }. You can add multiple keys by incrementing the number at the end, for example, col2, op2, val2. For more information, see [API Documentation](https://developers.thoughtspot.com/docs/fetch-data-and-report-apis#_runtime_filters). + */ + 'runtime_filter'?: any; + /** + * Applied to the liveboard and overrides any filters already applied on the same columns in liveboard. Following example illustrate different kinds of filters: { \"override_filters\": [ { \"column_name\": \"Color\", \"generic_filter\": { \"op\": \"IN\", \"values\": [ \"almond\", \"turquoise\" ] }, \"negate\": false }, { \"column_name\": \"Commit Date\", \"date_filter\": { \"datePeriod\": \"HOUR\", \"number\": 3, \"type\": \"LAST_N_PERIOD\", \"op\": \"EQ\" } }, { \"column_name\": \"Sales\", \"generic_filter\": { \"op\": \"BW_INC\", \"values\": [ \"100000\", \"70000\" ] }, \"negate\": true } ] } + */ + 'override_filters'?: any; + /** + * JSON string representing runtime sort. For example, {\"sortCol1\": \"region\", \"asc1\" : true}. For more information, see [API Documentation](https://developers.thoughtspot.com/docs/fetch-data-and-report-apis#_runtime_sort). + */ + 'runtime_sort'?: any; + 'pdf_options'?: ExportLiveboardReportRequestPdfOptions; + 'png_options'?: ExportLiveboardReportRequestPngOptions; + /** + * JSON object for setting values of parameters at runtime. For example, {\"param1\": \"Double List Param\", \"paramVal1\": 0.5}. You can add multiple keys by incrementing the number at the end, for example, param2, paramVal2. For more information, see [API Documentation](https://developers.thoughtspot.com/docs/fetch-data-and-report-apis#_runtime_parameters). + */ + 'runtime_param_override'?: any; + 'regional_settings'?: ExportAnswerReportRequestRegionalSettings; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} +type ExportLiveboardReportRequestFileFormatEnum = "PDF" | "PNG" | "CSV" | "XLSX"; + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +declare class ExportMetadataTMLBatchedRequest { + /** + * Type of metadata object to export, can be one of USER | ROLE | USER_GROUP + */ + 'metadata_type': ExportMetadataTMLBatchedRequestMetadataTypeEnum; + /** + * Indicates the position within the complete set from where the API should begin returning objects. + */ + 'batch_offset'?: number; + /** + * Determines the number of objects or items to be retrieved in a single request. + */ + 'batch_size'?: number; + /** + * TML EDOC content format. + */ + 'edoc_format'?: ExportMetadataTMLBatchedRequestEdocFormatEnum; + /** + * Indicates whether to export dependent metadata objects of specified metadata objects. + */ + 'export_dependent'?: boolean | null; + /** + * Indicates whether to export is happening from all orgs context. + */ + 'all_orgs_override'?: boolean | null; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} +type ExportMetadataTMLBatchedRequestMetadataTypeEnum = "USER" | "USER_GROUP" | "ROLE"; +type ExportMetadataTMLBatchedRequestEdocFormatEnum = "JSON" | "YAML"; + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +/** +* Flags to specify additional options for export. Version: 10.6.0.cl or later +*/ +declare class ExportMetadataTMLRequestExportOptions { + /** + * Boolean Flag to export Object ID of referenced object. This flag will work only after the Object ID feature has been enabled. Please contact support to enable the feature. + */ + 'include_obj_id_ref'?: boolean | null; + /** + * Boolean flag to export guid of the object. This flag will work only after the Object ID feature has been enabled. Please contact support to enable the feature. + */ + 'include_guid'?: boolean | null; + /** + * Boolean flag to export Object ID of the object. This flag will work only after the Object ID feature has been enabled. Please contact support to enable the feature. + */ + 'include_obj_id'?: boolean | null; + /** + * Boolean flag indicating whether to export associated feedbacks of the object. This will only be respected when the object can have feedbacks. Version: 10.7.0.cl or later + */ + 'export_with_associated_feedbacks'?: boolean | null; + /** + * Boolean flag indicating whether to export column security rules of the object. This will only be respected when the object can have column security rules and export_associated is true. Version: 10.12.0.cl or later + */ + 'export_column_security_rules'?: boolean | null; + /** + * Boolean flag indicating whether to export column aliases of the model. This will only be respected when the object can have column aliases. Version: 10.13.0.cl or later + */ + 'export_with_column_aliases'?: boolean | null; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +/** +* MetadataType InputType used in Export MetadataType API +*/ +declare class ExportMetadataTypeInput { + /** + * Type of metadata. Required if the name of the object is set as the identifier. This attribute is optional when the object GUID is specified as the identifier. + */ + 'type'?: ExportMetadataTypeInputTypeEnum | null; + /** + * Unique ID or name of the metadata object. Not required if the metadata type is ANSWER when session_id and generation_number is set. + */ + 'identifier'?: string | null; + /** + * Unique ID of the Answer session. Required if the metadata type is ANSWER and identifier is not set. + */ + 'session_identifier'?: string | null; + /** + * Generation Number of the Answer session. Required if the metadata type is ANSWER and identifier is not set. + */ + 'generation_number'?: number | null; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} +type ExportMetadataTypeInputTypeEnum = "LIVEBOARD" | "ANSWER" | "LOGICAL_TABLE" | "CONNECTION" | "CUSTOM_ACTION" | "USER" | "USER_GROUP" | "ROLE" | "FEEDBACK"; + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +declare class ExportMetadataTMLRequest { + /** + * Metadata objects. + */ + 'metadata': Array; + /** + * Indicates whether to export associated metadata objects of specified metadata objects. + */ + 'export_associated'?: boolean | null; + /** + * Adds FQNs of the referenced objects. For example, if you are exporting a Liveboard and its associated objects, the API returns the Liveboard TML data with the FQNs of the referenced worksheet. If the exported TML data includes FQNs, you don\'t need to manually add FQNs of the referenced objects during TML import. + */ + 'export_fqn'?: boolean | null; + /** + * TML EDOC content format. **Note: exporting in YAML format currently requires manual formatting of the output. For more details on the workaround, please click [here](https://developers.thoughtspot.com/docs/known-issues#_version_9_12_0_cl)** + */ + 'edoc_format'?: ExportMetadataTMLRequestEdocFormatEnum; + /** + * Indicates whether to export worksheet TML in DEFAULT or V1 or V2 version. + */ + 'export_schema_version'?: ExportMetadataTMLRequestExportSchemaVersionEnum; + /** + * Indicates whether to export table while exporting connection. + */ + 'export_dependent'?: boolean | null; + /** + * Indicates whether to export connection as dependent while exporting table/worksheet/answer/liveboard. This will only be active when export_associated is true. + */ + 'export_connection_as_dependent'?: boolean | null; + /** + * Indicates whether to export is happening from all orgs context. + */ + 'all_orgs_override'?: boolean | null; + 'export_options'?: ExportMetadataTMLRequestExportOptions; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} +type ExportMetadataTMLRequestEdocFormatEnum = "JSON" | "YAML"; +type ExportMetadataTMLRequestExportSchemaVersionEnum = "DEFAULT" | "V1" | "V2"; + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +/** +* Flags to specify additional options for export. This will only be active when UserDefinedId in TML is enabled. +*/ +declare class ExportOptions { + /** + * Boolean Flag to export Object ID of referenced object. This flag will work only after the Object ID feature has been enabled. Please contact support to enable the feature. + */ + 'include_obj_id_ref'?: boolean | null; + /** + * Boolean flag to export guid of the object. This flag will work only after the Object ID feature has been enabled. Please contact support to enable the feature. + */ + 'include_guid'?: boolean | null; + /** + * Boolean flag to export Object ID of the object. This flag will work only after the Object ID feature has been enabled. Please contact support to enable the feature. + */ + 'include_obj_id'?: boolean | null; + /** + * Boolean flag indicating whether to export associated feedbacks of the object. This will only be respected when the object can have feedbacks. Version: 10.7.0.cl or later + */ + 'export_with_associated_feedbacks'?: boolean | null; + /** + * Boolean flag indicating whether to export column security rules of the object. This will only be respected when the object can have column security rules and export_associated is true. Version: 10.12.0.cl or later + */ + 'export_column_security_rules'?: boolean | null; + /** + * Boolean flag indicating whether to export column aliases of the model. This will only be respected when the object can have column aliases. Version: 10.13.0.cl or later + */ + 'export_with_column_aliases'?: boolean | null; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +declare class ExternalTableInput { + /** + * Unique ID or name of the connection. + */ + 'connection_identifier': string; + /** + * Name of the database. + */ + 'database_name'?: string | null; + /** + * Name of the schema. + */ + 'schema_name'?: string | null; + /** + * Name of the table. Table names may be case-sensitive depending on the database system. + */ + 'table_name': string; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +declare class FavoriteMetadataItem { + /** + * Unique ID of the metadata object. + */ + 'id': string; + /** + * name of the metadata object. + */ + 'name': string; + /** + * Type of metadata object. Required if the name of the object is set as the identifier. This attribute is optional when the object GUID is specified as the identifier. + */ + 'type': FavoriteMetadataItemTypeEnum; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} +type FavoriteMetadataItemTypeEnum = "LIVEBOARD" | "ANSWER" | "LOGICAL_TABLE" | "LOGICAL_COLUMN" | "CONNECTION" | "TAG" | "USER" | "USER_GROUP" | "LOGICAL_RELATIONSHIP"; + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +/** +* Favorite object options. +*/ +declare class FavoriteObjectOptionsInput { + /** + * Includes objects marked as favorite for the specified users. + */ + 'include'?: boolean | null; + /** + * Unique ID or name of the users. If not specified, the favorite objects of current logged in user are returned. + */ + 'user_identifiers'?: Array | null; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +declare class FetchAnswerDataRequest { + /** + * GUID or name of the Answer. + */ + 'metadata_identifier': string; + /** + * JSON output in compact or full format. The FULL option is available in 9.12.5.cl or later. + */ + 'data_format'?: FetchAnswerDataRequestDataFormatEnum; + /** + * The starting record number from where the records should be included. + */ + 'record_offset'?: number; + /** + * The number of records to include in a batch. + */ + 'record_size'?: number; + /** + * JSON object with representing filter condition to apply filters at runtime. For example, {\"col1\": \"item type\", \"op1\": \"EQ\", \"val1\": \"Bags\"} . You can add multiple keys by incrementing the number at the end, for example, col2, op2, val2, and col3, op3, val3. For more information, see [API Documentation](https://developers.thoughtspot.com/docs/fetch-data-and-report-apis#_runtime_filters). + */ + 'runtime_filter'?: any; + /** + * JSON object representing columns to sort data at runtime. For example, {\"sortCol1\": \"sales\", \"asc1\": true} . You can add multiple keys by incrementing the number at the end, for example, sortCol1, asc2. For more information, see [API Documentation](https://developers.thoughtspot.com/docs/fetch-data-and-report-apis#_runtime_sort). + */ + 'runtime_sort'?: any; + /** + * JSON object for setting values of parameters at runtime. For example, {\"param1\": \"Double List Param\", \"paramVal1\": 0.5}. You can add multiple keys by incrementing the number at the end, for example, param2, paramVal2. For more information, see [API Documentation](https://developers.thoughtspot.com/docs/fetch-data-and-report-apis#_runtime_parameters). + */ + 'runtime_param_override'?: any; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} +type FetchAnswerDataRequestDataFormatEnum = "FULL" | "COMPACT"; + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +declare class FetchAnswerSqlQueryRequest { + /** + * ID or name of an Answer. + */ + 'metadata_identifier': string; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +declare class FetchAsyncImportTaskStatusRequest { + /** + * List of task IDs to fetch status for. + */ + 'task_ids'?: Array; + /** + * List of task statuses to filter on. Valid values: [IN_QUEUE, IN_PROGRESS, COMPLETED, FAILED] + */ + 'task_status'?: Array; + /** + * Author GUID or name of async import tasks to filter on. + */ + 'author_identifier'?: string; + /** + * The offset point, starting from where the task status should be included in the response. + */ + 'record_offset'?: number; + /** + * The number of task statuses that should be included in the response starting from offset position. + */ + 'record_size'?: number; + /** + * Boolean flag to specify whether to include import response in the task status objects. + */ + 'include_import_response'?: boolean | null; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} +type FetchAsyncImportTaskStatusRequestTaskStatusEnum = "COMPLETED" | "IN_QUEUE" | "IN_PROGRESS" | "FAILED"; + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +declare class FetchColumnSecurityRulesRequest { + /** + * Array of table identifier objects for which to fetch column security rules + */ + 'tables': Array; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +declare class FetchConnectionDiffStatusResponse { + /** + * Status of the connection diff. + */ + 'status'?: boolean | null; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +declare class FetchLiveboardDataRequest { + /** + * GUID or name of the Liveboard. + */ + 'metadata_identifier': string; + /** + * GUIDs or names of the visualizations on the Liveboard. + */ + 'visualization_identifiers'?: Array; + /** + * Transient content of the Liveboard. + */ + 'transient_content'?: string; + /** + * JSON output in compact or full format. The FULL option is available in 9.12.5.cl or later. + */ + 'data_format'?: FetchLiveboardDataRequestDataFormatEnum; + /** + * The starting record number from where the records should be included. + */ + 'record_offset'?: number; + /** + * The number of records to include in a batch. + */ + 'record_size'?: number; + /** + * JSON object with representing filter condition to apply filters at runtime. For example, {\"col1\": \"item type\", \"op1\": \"EQ\", \"val1\": \"Bags\"} . You can add multiple keys by incrementing the number at the end, for example, col2, op2, val2, and col3, op3, val3. For more information, see [API Documentation](https://developers.thoughtspot.com/docs/fetch-data-and-report-apis#_runtime_filters). + */ + 'runtime_filter'?: any; + /** + * JSON object representing columns to sort data at runtime. For example, {\"sortCol1\": \"sales\", \"asc1\": true} . You can add multiple keys by incrementing the number at the end, for example, sortCol1, asc2. For more information, see [API Documentation](https://developers.thoughtspot.com/docs/fetch-data-and-report-apis#_runtime_sort). + */ + 'runtime_sort'?: any; + /** + * JSON object for setting values of parameters at runtime. For example, {\"param1\": \"Double List Param\", \"paramVal1\": 0.5}. You can add multiple keys by incrementing the number at the end, for example, param2, paramVal2. For more information, see [API Documentation](https://developers.thoughtspot.com/docs/fetch-data-and-report-apis#_runtime_parameters). + */ + 'runtime_param_override'?: any; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} +type FetchLiveboardDataRequestDataFormatEnum = "FULL" | "COMPACT"; + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +declare class FetchLiveboardSqlQueryRequest { + /** + * ID or name of the Liveboard. + */ + 'metadata_identifier': string; + /** + * Unique ID or name of visualizations. + */ + 'visualization_identifiers'?: Array; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +declare class FetchLogsRequest { + /** + * Name of the log type + */ + 'log_type': FetchLogsRequestLogTypeEnum; + /** + * Start time in EPOCH format + */ + 'start_epoch_time_in_millis'?: number; + /** + * End time in EPOCH format + */ + 'end_epoch_time_in_millis'?: number; + /** + * Fetch all the logs. This is available from 9.10.5.cl + */ + 'get_all_logs'?: boolean | null; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} +type FetchLogsRequestLogTypeEnum = "SECURITY_AUDIT"; + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +declare class ObjectPrivilegesMetadataInput { + /** + * Type of metadata object. Required if the name of the object is set as the identifier. This attribute is optional when the object GUID is specified as the identifier. + */ + 'type'?: ObjectPrivilegesMetadataInputTypeEnum | null; + /** + * Unique ID or name of the metadata object. + */ + 'identifier': string; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} +type ObjectPrivilegesMetadataInputTypeEnum = "LOGICAL_TABLE"; + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +declare class PrincipalsInput { + /** + * Unique ID or name of the principal object such as a user or group. + */ + 'identifier': string; + /** + * Principal type. + */ + 'type'?: PrincipalsInputTypeEnum | null; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} +type PrincipalsInputTypeEnum = "USER" | "USER_GROUP"; + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +declare class FetchObjectPrivilegesRequest { + /** + * Metadata objects for which you want to fetch object privileges. For now only LOGICAL_TABLE is supported. It may be extended to other metadata types in the future. + */ + 'metadata': Array; + /** + * User or group objects for which you want to fetch object privileges. If not specified, the API returns all users and groups that have object privileges on the specified metadata objects. + */ + 'principals'?: Array; + /** + * The starting record number from where the records should be included for each metadata type. + */ + 'record_offset'?: number; + /** + * The number of records that should be included for each metadata type. + */ + 'record_size'?: number; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +/** +* MetadataType InputType used in Permission API\'s +*/ +declare class PermissionsMetadataTypeInput { + /** + * Type of metadata object. Required if the name of the object is set as the identifier. This attribute is optional when the object GUID is specified as the identifier. + */ + 'type'?: PermissionsMetadataTypeInputTypeEnum | null; + /** + * Unique ID or name of the metadata object. + */ + 'identifier': string; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} +type PermissionsMetadataTypeInputTypeEnum = "LIVEBOARD" | "ANSWER" | "LOGICAL_TABLE" | "LOGICAL_COLUMN" | "CONNECTION" | "COLLECTION"; + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +declare class FetchPermissionsOfPrincipalsRequest { + /** + * GUID or name of the user or group. + */ + 'principals': Array; + /** + * Metadata objects for which you want to fetch permission details. If not specified, the API returns permission details for all metadata objects that the specified users and groups can access. + */ + 'metadata'?: Array; + /** + * The starting record number from where the records should be included for each metadata type. + */ + 'record_offset'?: number; + /** + * The number of records that should be included for each metadata type. + */ + 'record_size'?: number; + /** + * When no metadata objects input is passed, metadata objects of this type are fetched. + */ + 'default_metadata_type'?: FetchPermissionsOfPrincipalsRequestDefaultMetadataTypeEnum; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} +type FetchPermissionsOfPrincipalsRequestDefaultMetadataTypeEnum = "ALL" | "LIVEBOARD" | "ANSWER" | "LOGICAL_TABLE" | "LOGICAL_COLUMN" | "CONNECTION" | "COLLECTION"; + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +declare class FetchPermissionsOnMetadataRequest { + /** + * GUID or name of the metadata object. + */ + 'metadata': Array; + /** + * User or group objects for which you want to fetch permissions. If not specified, the API returns all users and groups that can access the specified metadata objects. + */ + 'principals'?: Array; + /** + * Indicates whether to fetch permissions of dependent metadata objects. + */ + 'include_dependent_objects'?: boolean | null; + /** + * The starting record number from where the records should be included for each metadata type. + */ + 'record_offset'?: number; + /** + * The number of records that should be included for each metadata type. + */ + 'record_size'?: number; + /** + *
Version: 10.3.0.cl or later
Specifies the type of permission. Valid values are: EFFECTIVE - If the user permission to the metadata objects is granted by the privileges assigned to the groups to which they belong. DEFINED - If a user or user group received access to metadata objects via object sharing by another user. + */ + 'permission_type'?: string; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +/** +* Filter Rules to be applied on Objects. +*/ +declare class FilterRules { + /** + * The name of the column to apply the filter on. + */ + 'column_name': string; + /** + * The operator to use for filtering. Example: EQ (equals), GT(greater than), etc. + */ + 'operator': FilterRulesOperatorEnum; + /** + * The values to filter on. To get all records, use TS_WILDCARD_ALL as values. + */ + 'values': Array; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} +type FilterRulesOperatorEnum = "EQ" | "NE" | "LT" | "LE" | "GT" | "GE" | "IN" | "BW" | "CONTAINS" | "BEGINS_WITH" | "ENDS_WITH" | "BW_INC" | "BW_INC_MIN" | "BW_INC_MAX" | "LIKE" | "NOT_IN"; + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +declare class ForceLogoutUsersRequest { + /** + * GUID or name of the users for force logging out their sessions. + */ + 'user_identifiers'?: Array; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +/** +* Configuration of schedule with cron expression +*/ +declare class Frequency { + 'cron_expression': CronExpression; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +/** +* Configuration of schedule with cron expression +*/ +declare class FrequencyInput { + 'cron_expression': CronExpressionInput; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +declare class GenerateCSVRequest { + /** + * Start date for the calendar in `MM/dd/yyyy` format. + */ + 'start_date': string; + /** + * End date for the calendar in `MM/dd/yyyy` format. + */ + 'end_date': string; + /** + * Type of the calendar. + */ + 'calendar_type'?: GenerateCSVRequestCalendarTypeEnum; + /** + * Month offset to start calendar from `January`. + */ + 'month_offset'?: GenerateCSVRequestMonthOffsetEnum; + /** + * Specify the starting day of the week. + */ + 'start_day_of_week'?: GenerateCSVRequestStartDayOfWeekEnum; + /** + * Prefix to add before the quarter. + */ + 'quarter_name_prefix'?: string; + /** + * Prefix to add before the year. + */ + 'year_name_prefix'?: string; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} +type GenerateCSVRequestCalendarTypeEnum = "MONTH_OFFSET" | "FOUR_FOUR_FIVE" | "FOUR_FIVE_FOUR" | "FIVE_FOUR_FOUR"; +type GenerateCSVRequestMonthOffsetEnum = "January" | "February" | "March" | "April" | "May" | "June" | "July" | "August" | "September" | "October" | "November" | "December"; +type GenerateCSVRequestStartDayOfWeekEnum = "Sunday" | "Monday" | "Tuesday" | "Wednesday" | "Thursday" | "Friday" | "Saturday"; + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +declare class ImportEPackAsyncTaskStatus { + /** + * GUID of tenant from which the task is initiated. + */ + 'tenant_id'?: string | null; + /** + * Organisation ID of the user who initiated the task. + */ + 'org_id'?: number | null; + /** + * Unique identifier for the task. + */ + 'task_id'?: string | null; + /** + * Name of the task. + */ + 'task_name'?: string | null; + /** + * Response of imported objects so far. + */ + 'import_response'?: any | null; + /** + * Current status of the task. + */ + 'task_status'?: ImportEPackAsyncTaskStatusTaskStatusEnum | null; + /** + * ID of the user who initiated the task. + */ + 'author_id'?: string | null; + /** + * Policy used for the import task. + */ + 'import_policy'?: ImportEPackAsyncTaskStatusImportPolicyEnum | null; + /** + * Time when the task was created (in ms since epoch). + */ + 'created_at'?: number | null; + /** + * Time when the task started (in ms since epoch). + */ + 'in_progress_at'?: number | null; + /** + * Time when the task was completed (in ms since epoch). + */ + 'completed_at'?: number | null; + /** + * Total number of objects to process. + */ + 'total_object_count'?: number | null; + /** + * Number of objects processed so far. + */ + 'object_processed_count'?: number | null; + /** + * Last time the task status was updated (in ms since epoch). + */ + 'modified_at'?: number | null; + /** + * Display name of the user who initiated the task. + */ + 'author_display_name'?: string | null; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} +type ImportEPackAsyncTaskStatusTaskStatusEnum = "COMPLETED" | "IN_QUEUE" | "IN_PROGRESS" | "FAILED"; +type ImportEPackAsyncTaskStatusImportPolicyEnum = "PARTIAL" | "ALL_OR_NONE" | "VALIDATE_ONLY" | "PARTIAL_OBJECT"; + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +declare class GetAsyncImportStatusResponse { + /** + * List of task statuses. + */ + 'status_list'?: Array | null; + /** + * Indicates whether there are more task statuses to fetch. + */ + 'last_batch'?: boolean | null; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +/** +* Groups objects. +*/ +declare class GroupObject { + 'identifier'?: string | null; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +/** +* Filter Rules to be applied on Objects. +*/ +declare class ParameterValues { + /** + * The name of the column to apply the filter on. + */ + 'name': string; + /** + * The values to filter on. Only single value is supported currently. + */ + 'values': Array; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +/** +* Objects on which the filter rules and parameters values should be applied to +*/ +declare class TokenAccessScopeObject { + /** + * Type of object. Required if the name of the object is set as the identifier. This attribute is optional when the object GUID is specified as the identifier. Specify the object type as `LOGICAL_TABLE`. + */ + 'type'?: TokenAccessScopeObjectTypeEnum | null; + /** + * Unique name/id of the object. + */ + 'identifier': string; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} +type TokenAccessScopeObjectTypeEnum = "LOGICAL_TABLE"; + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +/** +* Variable values. +*/ +declare class VariableValues { + /** + * The name of the existing formula variable. + */ + 'name': string; + /** + * The values to filter on. + */ + 'values': Array; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +declare class GetCustomAccessTokenRequest { + /** + * Username of the ThoughtSpot user. The username is stored in the `name` attribute of the user object. + */ + 'username': string; + /** + * Password of the user account + */ + 'password'?: string; + /** + * The secret key string provided by the ThoughtSpot application server. ThoughtSpot generates a secret key when Trusted authentication is enabled. + */ + 'secret_key'?: string; + /** + * Token validity duration in seconds + */ + 'validity_time_in_sec'?: number; + /** + * ID or name of the Org context to log in to. If the Org ID or name is not specified but a secret key is provided, the user will be logged into the Org associated with the secret key. If neither the Org ID/name nor the secret key is provided, the user will be logged into the Org context from their previous login session. + */ + 'org_identifier'?: string; + /** + * Indicates whether the specified attributes should be persisted or not. RESET and NONE are not applicable if you are setting variable_values. + */ + 'persist_option': GetCustomAccessTokenRequestPersistOptionEnum; + /** + * Filter rules. + */ + 'filter_rules'?: Array; + /** + * Allows developers to assign parameter values for existing parameters to a user at login. Note: Using parameter values for row level security use cases will ultimately be deprecated. Developers can still pass data security values via the Custom Access token via the variable_values field and create RLS rules based on custom variables. Please refer to the [ABAC via RLS documentation](https://developers.thoughtspot.com/docs/abac-user-parameters) for more details. + */ + 'parameter_values'?: Array; + /** + * List of variable values where `name` references an existing formula variable and `values` is any value from the corresponding column. Version: 10.14.0.cl or later + */ + 'variable_values'?: Array; + /** + * Objects on which the parameter and variable values should be applied to + */ + 'objects'?: Array; + /** + * (just-in-time (JIT) provisioning)Email address of the user. Specify this attribute when creating a new user. + */ + 'email'?: string; + /** + * (just-in-time (JIT) provisioning) Indicates display name of the user. Specify this attribute when creating a new user. + */ + 'display_name'?: string; + /** + * (just-in-time (JIT) provisioning) ID or name of the groups to which the newly created user belongs. Specify this attribute when creating a new user. + */ + 'groups'?: Array; + /** + * Creates a new user if the specified username does not exist in ThoughtSpot. To provision a user just-in-time (JIT), set this attribute to true. Note: For JIT provisioning of a user, the secret_key is required. New formula variables won\'t be created. Version: 10.5.0.cl or later + */ + 'auto_create'?: boolean | null; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} +type GetCustomAccessTokenRequestPersistOptionEnum = "REPLACE" | "APPEND" | "NONE" | "RESET"; + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +declare class GetDataSourceSuggestionsRequest { + /** + * User query used to suggest data sources. + */ + 'query': string; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +/** +* Objects to apply the User_Object. +*/ +declare class UserObject { + /** + * Type of object. Required if the name of the object is set as the identifier. This attribute is optional when the object GUID is specified as the identifier. Specify the object type as `LOGICAL_TABLE`. + */ + 'type'?: UserObjectTypeEnum | null; + /** + * Unique name/id of the object. + */ + 'identifier': string; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} +type UserObjectTypeEnum = "LOGICAL_TABLE"; + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +/** +* Objects to apply the Runtime_Filters. +*/ +declare class RuntimeFilters { + /** + * The column name to apply filter. + */ + 'column_name': string; + /** + * Value of the filters. + */ + 'values': Array; + /** + * Operator value. Example: EQ + */ + 'operator': RuntimeFiltersOperatorEnum; + /** + * Flag to persist the runtime filters. Version: 9.12.0.cl or later + */ + 'persist'?: boolean | null; + /** + * Object to apply the runtime filter. + */ + 'objects'?: Array | null; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} +type RuntimeFiltersOperatorEnum = "EQ" | "NE" | "LT" | "LE" | "GT" | "GE" | "IN" | "BW" | "CONTAINS" | "BEGINS_WITH" | "ENDS_WITH" | "BW_INC" | "BW_INC_MIN" | "BW_INC_MAX" | "LIKE" | "NOT_IN"; + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +/** +* Objects to apply the Runtime_Parameters. +*/ +declare class RuntimeParameters { + /** + * The name of the parameter. + */ + 'name': string; + /** + * The array of values. + */ + 'values': Array; + /** + * Flag to persist the parameters. Version: 9.12.0.cl or later + */ + 'persist'?: boolean | null; + /** + * Object to apply the runtime parameter. + */ + 'objects'?: Array | null; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +/** +* Objects to apply the Runtime_Sorts. +*/ +declare class RuntimeSorts { + /** + * The column name to apply filter. + */ + 'column_name'?: string | null; + /** + * Order for the sort. + */ + 'order'?: RuntimeSortsOrderEnum | null; + /** + * Flag to persist the runtime sorts. Version: 9.12.0.cl or later + */ + 'persist'?: boolean | null; + /** + * Object to apply the runtime sort. + */ + 'objects'?: Array | null; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} +type RuntimeSortsOrderEnum = "ASC" | "DESC"; + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +/** +*
Deprecated: 10.4.0.cl and later
Define attributes such as Runtime filters and Runtime parameters to send security entitlements to a user session. For more information, see [Documentation](https://developers.thoughtspot.com/docs/abac-user-parameters). +*/ +declare class GetFullAccessTokenRequestUserParameters { + 'objects'?: Array | null; + /** + * Objects to apply the User_Runtime_Filters. Examples to set the `runtime_filters` : ```json { \"column_name\": \"Color\", \"operator\": \"EQ\", \"values\": [\"red\"], \"persist\": false } ``` + */ + 'runtime_filters'?: Array | null; + /** + * Objects to apply the User_Runtime_Sorts. Examples to set the `runtime_sorts` : ```json { \"column_name\": \"Color\", \"order\": \"ASC\", \"persist\": false } ``` + */ + 'runtime_sorts'?: Array | null; + /** + * Objects to apply the Runtime_Parameters. Examples to set the `parameters` : ```json { \"name\": \"Color\", \"values\": [\"Blue\"], \"persist\": false } ``` + */ + 'parameters'?: Array | null; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +declare class GetFullAccessTokenRequest { + /** + * Username of the ThoughtSpot user. The username is stored in the `name` attribute of the user object. + */ + 'username': string; + /** + * Password of the user account + */ + 'password'?: string; + /** + * The secret key string provided by the ThoughtSpot application server. ThoughtSpot generates a secret key when Trusted authentication is enabled. + */ + 'secret_key'?: string; + /** + * Token validity duration in seconds + */ + 'validity_time_in_sec'?: number; + /** + * ID of the Org context to log in to. If the Org ID is not specified and secret key is provided then user will be logged into the org corresponding to the secret key, and if secret key is not provided then user will be logged in to the Org context of their previous login session. + */ + 'org_id'?: number; + /** + * Email address of the user. Specify this attribute when creating a new user (just-in-time (JIT) provisioning). + */ + 'email'?: string; + /** + * Indicates display name of the user. Use this parameter to provision a user just-in-time (JIT). + */ + 'display_name'?: string; + /** + * Creates a new user if the specified username does not already exist in ThoughtSpot. To provision a user just-in-time (JIT), set this attribute to true. Note: For JIT provisioning of a user, the secret_key is required. + */ + 'auto_create'?: boolean | null; + /** + * ID or name of the groups to which the newly created user belongs. Use this parameter to provision a user just-in-time (JIT). + */ + 'group_identifiers'?: Array; + 'user_parameters'?: GetFullAccessTokenRequestUserParameters; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +declare class GetNLInstructionsRequest { + /** + * Unique ID or name of the data-model for which to retrieve NL instructions. + */ + 'data_source_identifier': string; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +declare class GetObjectAccessTokenRequest { + /** + * Username of the ThoughtSpot user. The username is stored in the `name` attribute of the user object. + */ + 'username': string; + /** + * GUID of the ThoughtSpot metadata object that the user can access. The bearer will only have access to the object specified in the API request. + */ + 'object_id'?: string; + /** + * Password of the user account + */ + 'password'?: string; + /** + * The secret key string provided by the ThoughtSpot application server. ThoughtSpot generates a secret key when Trusted authentication is enabled. + */ + 'secret_key'?: string; + /** + * Token validity duration in seconds + */ + 'validity_time_in_sec'?: number; + /** + * ID of the Org context to log in to. If the Org ID is not specified and secret key is provided then user will be logged into the org corresponding to the secret key, and if secret key is not provided then user will be logged in to the Org context of their previous login session. + */ + 'org_id'?: number; + /** + * Email address of the user. Specify this attribute when creating a new user (just-in-time (JIT) provisioning). + */ + 'email'?: string; + /** + * Display name of the user. Specify this attribute when creating a new user (just-in-time (JIT) provisioning). + */ + 'display_name'?: string; + /** + * Creates a new user if the specified username does not exist in ThoughtSpot. To provision a user just-in-time (JIT), set this attribute to true. Note: For JIT provisioning of a user, the secret_key is required. + */ + 'auto_create'?: boolean | null; + /** + * Unique ID or name of the groups to which you want to assign the new user. You can specify this attribute to dynamically assign privileges during just-in-time (JIT) provisioning. + */ + 'group_identifiers'?: Array; + 'user_parameters'?: GetFullAccessTokenRequestUserParameters; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +/** +* Additional context to guide the response. +*/ +declare class GetRelevantQuestionsRequestAiContext { + /** + * User specific text instructions sent to AI system for processing the query. + */ + 'instructions'?: Array | null; + /** + * User provided content like text data, csv data as a string message to provide context & potentially improve the quality of the response. + */ + 'content'?: Array | null; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +/** +* metadata for the query to enable generation of relevant sub-questions; at least one context identifier is required. +*/ +declare class GetRelevantQuestionsRequestMetadataContext { + /** + * List of data_source_identifiers to provide context for breaking down user query into analytical queries that can be run on them. + */ + 'data_source_identifiers'?: Array | null; + /** + * List of answer unique identifiers (GUIDs) whose data will be used to guide the response. + */ + 'answer_identifiers'?: Array | null; + /** + * Unique identifier to denote current conversation. + */ + 'conversation_identifier'?: string | null; + /** + * List of liveboard unique identifiers (GUIDs) whose data will be used to guide the response. + */ + 'liveboard_identifiers'?: Array | null; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +declare class GetRelevantQuestionsRequest { + 'metadata_context': GetRelevantQuestionsRequestMetadataContext; + /** + * Maximum number of relevant questions that is allowed in the response, default = 5. + */ + 'limit_relevant_questions'?: number; + /** + * If true, results are not returned from cache & calculated every time. + */ + 'bypass_cache'?: boolean | null; + /** + * A user query that requires breaking down into smaller, more manageable analytical questions to facilitate better understanding and analysis. + */ + 'query': string; + 'ai_context'?: GetRelevantQuestionsRequestAiContext; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +declare class GetTokenResponse { + /** + * Bearer auth token. + */ + 'token': string; + /** + * Token creation time in milliseconds. + */ + 'creation_time_in_millis': number; + /** + * Token expiration time in milliseconds. + */ + 'expiration_time_in_millis': number; + /** + * Username to whom the token is issued. + */ + 'valid_for_user_id': string; + /** + * Unique identifier of the user to whom the token is issued. + */ + 'valid_for_username': string; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +declare class GroupsImportListInput { + /** + * Unique display name of the group. + */ + 'display_name': string; + /** + * Unique ID or name of the group. + */ + 'group_identifier': string; + /** + * Unique ID of Liveboards that will be assigned as default Liveboards to the users in the group. + */ + 'default_liveboard_identifiers'?: Array | null; + /** + * Description of the group. + */ + 'description'?: string | null; + /** + * Privileges that will be assigned to the group. + */ + 'privileges'?: Array | null; + /** + * Unique ID or name of the sub-groups to add to the group. + */ + 'sub_group_identifiers'?: Array | null; + /** + * Type of the group. + */ + 'type'?: GroupsImportListInputTypeEnum | null; + /** + * Unique ID or name of the users to assign to the group. + */ + 'user_identifiers'?: Array | null; + /** + * Visibility of the group. The SHARABLE makes a group visible to other users and groups, and thus allows them to share objects. + */ + 'visibility'?: GroupsImportListInputVisibilityEnum | null; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} +type GroupsImportListInputPrivilegesEnum = "ADMINISTRATION" | "AUTHORING" | "USERDATAUPLOADING" | "DATADOWNLOADING" | "USERMANAGEMENT" | "DATAMANAGEMENT" | "SHAREWITHALL" | "JOBSCHEDULING" | "A3ANALYSIS" | "EXPERIMENTALFEATUREPRIVILEGE" | "BYPASSRLS" | "RANALYSIS" | "DEVELOPER" | "USER_ADMINISTRATION" | "GROUP_ADMINISTRATION" | "SYNCMANAGEMENT" | "CAN_CREATE_CATALOG" | "DISABLE_PINBOARD_CREATION" | "LIVEBOARD_VERIFIER" | "PREVIEW_THOUGHTSPOT_SAGE" | "CAN_MANAGE_VERSION_CONTROL" | "THIRDPARTY_ANALYSIS" | "ALLOW_NON_EMBED_FULL_APP_ACCESS" | "CAN_ACCESS_ANALYST_STUDIO" | "CAN_MANAGE_ANALYST_STUDIO" | "CAN_MODIFY_FOLDERS" | "CAN_MANAGE_VARIABLES" | "CAN_VIEW_FOLDERS" | "CAN_MANAGE_AGENTSPOT" | "CAN_ACCESS_AGENTSPOT" | "PREVIEW_DOCUMENT_SEARCH" | "CAN_SETUP_VERSION_CONTROL" | "CAN_DOWNLOAD_VISUALS" | "CAN_DOWNLOAD_DETAILED_DATA" | "CAN_USE_SPOTTER"; +type GroupsImportListInputTypeEnum = "LOCAL_GROUP" | "LDAP_GROUP" | "TEAM_GROUP" | "TENANT_GROUP"; +type GroupsImportListInputVisibilityEnum = "SHARABLE" | "NON_SHARABLE"; + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +/** +* Attribute to update in a header. +*/ +declare class HeaderAttributeInput { + /** + * Attribute name to be updated. + */ + 'name': string; + /** + * Attribute\'s new value. + */ + 'value': string; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +/** +* Favorite object options. +*/ +declare class HeaderUpdateInput { + /** + * Unique ID of a specified type to identify the header. + */ + 'identifier'?: string | null; + /** + * Custom object identifier to uniquely identify header. + */ + 'obj_identifier'?: string | null; + /** + * Optional type of the header object. + */ + 'type'?: HeaderUpdateInputTypeEnum | null; + /** + * List of attributes to update + */ + 'attributes': Array; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} +type HeaderUpdateInputTypeEnum = "ANSWER" | "LOGICAL_TABLE" | "LOGICAL_COLUMN" | "LIVEBOARD" | "ACTION_OBJECT" | "DATA_SOURCE" | "USER" | "USER_GROUP"; + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +declare class ImportMetadataTMLAsyncRequest { + /** + * Details of TML objects. + */ + 'metadata_tmls': Array; + /** + * If selected, creates TML objects with new GUIDs. + */ + 'create_new'?: boolean | null; + /** + * If import is happening from all orgs context. + */ + 'all_orgs_override'?: boolean | null; + /** + *
Version: 10.5.0.cl or later
Policy to be followed while importing the TML. Valid values are [PARTIAL_OBJECT, PARTIAL, VALIDATE_ONLY, ALL_OR_NONE] + */ + 'import_policy'?: ImportMetadataTMLAsyncRequestImportPolicyEnum; + /** + *
Version: 10.6.0.cl or later
Boolean Flag to skip TML diff check before processing object TMLs. + */ + 'skip_diff_check'?: boolean | null; + /** + *
Version: 10.5.0.cl or later
Boolean to indicate if the large metadata validation should be enabled. + */ + 'enable_large_metadata_validation'?: boolean | null; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} +type ImportMetadataTMLAsyncRequestImportPolicyEnum = "PARTIAL" | "ALL_OR_NONE" | "VALIDATE_ONLY" | "PARTIAL_OBJECT"; + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +declare class ImportMetadataTMLRequest { + /** + * Details of TML objects. **Note: importing TML in YAML format, when coming directly from our Playground, is currently requires manual formatting. For more details on the workaround, please click [here](https://developers.thoughtspot.com/docs/known-issues#_version_9_12_0_cl)** + */ + 'metadata_tmls': Array; + /** + * Specifies the import policy for the TML import. + */ + 'import_policy'?: ImportMetadataTMLRequestImportPolicyEnum; + /** + * If selected, creates TML objects with new GUIDs. + */ + 'create_new'?: boolean | null; + /** + * If import is happening from all orgs context. + */ + 'all_orgs_override'?: boolean | null; + /** + *
Version: 10.6.0.cl or later
Boolean Flag to skip TML diff check before processing object TMLs. + */ + 'skip_diff_check'?: boolean | null; + /** + *
Version: 10.5.0.cl or later
Boolean to indicate if the large metadata validation should be enabled. + */ + 'enable_large_metadata_validation'?: boolean | null; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} +type ImportMetadataTMLRequestImportPolicyEnum = "PARTIAL" | "ALL_OR_NONE" | "VALIDATE_ONLY" | "PARTIAL_OBJECT"; + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +declare class ImportUser { + /** + * Unique ID or name of the user. + */ + 'user_identifier': string; + /** + * Display name of the user. + */ + 'display_name': string; + /** + * Password of the user. + */ + 'password'?: string | null; + /** + * Type of the user account. + */ + 'account_type'?: ImportUserAccountTypeEnum | null; + /** + * Status of the user account. + */ + 'account_status'?: ImportUserAccountStatusEnum | null; + /** + * Email address of the user. + */ + 'email'?: string | null; + /** + * ID or name of the Orgs to which the user belongs. + */ + 'org_identifiers'?: Array | null; + /** + * ID or name of the groups to which the user belongs. + */ + 'group_identifiers'?: Array | null; + /** + * Visibility of the users. The SHARABLE property makes a user visible to other users and group, who can share objects with the user. + */ + 'visibility'?: ImportUserVisibilityEnum | null; + /** + * Notify user when other users or groups share metadata objects + */ + 'notify_on_share'?: boolean | null; + /** + * Show or hide the new user onboarding walkthroughs + */ + 'show_onboarding_experience'?: boolean | null; + /** + * Revisit the new user onboarding walkthroughs + */ + 'onboarding_experience_completed'?: boolean | null; + /** + * Unique ID or name of the default Liveboard assigned to the user. + */ + 'home_liveboard_identifier'?: string | null; + /** + * Metadata objects to add to the user\'s favorites list. + */ + 'favorite_metadata'?: Array | null; + /** + * Locale for the user. When setting this value, do not set use_browser_language to true, otherwise the browser\'s language setting will take precedence and the preferred_locale value will be ignored. + */ + 'preferred_locale'?: ImportUserPreferredLocaleEnum | null; + /** + * Flag to indicate whether to use the browser locale for the user in the UI. When set to true, the preferred_locale value is unset and the browser\'s language setting takes precedence. Version: 26.3.0.cl or later + */ + 'use_browser_language'?: boolean | null; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} +type ImportUserAccountTypeEnum = "LOCAL_USER" | "LDAP_USER" | "SAML_USER" | "OIDC_USER" | "REMOTE_USER"; +type ImportUserAccountStatusEnum = "ACTIVE" | "INACTIVE" | "EXPIRED" | "LOCKED" | "PENDING" | "SUSPENDED"; +type ImportUserVisibilityEnum = "SHARABLE" | "NON_SHARABLE"; +type ImportUserPreferredLocaleEnum = "en-CA" | "en-GB" | "en-US" | "de-DE" | "ja-JP" | "zh-CN" | "pt-BR" | "fr-FR" | "fr-CA" | "es-US" | "da-DK" | "es-ES" | "fi-FI" | "sv-SE" | "nb-NO" | "pt-PT" | "nl-NL" | "it-IT" | "ru-RU" | "en-IN" | "de-CH" | "en-NZ" | "es-MX" | "en-AU" | "zh-Hant" | "ko-KR" | "en-DE"; + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +declare class ImportUserGroupsRequest { + /** + * Details of groups which are to be imported + */ + 'groups'?: Array; + /** + * If set to true, removes groups that are not specified in the API request. + */ + 'delete_unspecified_groups'?: boolean | null; + /** + * If true, the API performs a test operation and returns user IDs whose data will be edited after the import. + */ + 'dry_run'?: boolean | null; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +declare class UserGroup { + 'id'?: string | null; + 'name'?: string | null; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +declare class ImportUserGroupsResponse { + /** + * The groups which are added into the system. + */ + 'groups_added': Array; + /** + * The groups which are deleted from the system. + */ + 'groups_deleted': Array; + /** + * The groups which are updated in the system. + */ + 'groups_updated': Array; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +declare class ImportUserType { + /** + * Unique identifier of the user. + */ + 'id'?: string | null; + /** + * Name of the user. + */ + 'name': string; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +declare class ImportUsersRequest { + /** + * List of users needs to be imported. + */ + 'users': Array; + /** + * The default password to assign to users if they do not have a password assigned in ThoughtSpot. + */ + 'default_password'?: string; + /** + * If true, the API performs a test operation and returns user IDs whose data will be edited after the import. + */ + 'dry_run'?: boolean | null; + /** + * If set to true, removes the users that are not specified in the API request. + */ + 'delete_unspecified_users'?: boolean | null; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +declare class ImportUsersResponse { + 'users_added'?: Array | null; + 'users_updated'?: Array | null; + 'users_deleted'?: Array | null; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +declare class InputEurekaNLSRequest { + /** + * Cluster version like 10.4.0.cl, 10.5.0.cl, so on. + */ + 'agentVersion'?: number | null; + /** + * If true, results are not returned from cache & calculated every time. Can incur high costs & latency. + */ + 'bypassCache'?: boolean | null; + /** + * User specific instructions for processing the @query. + */ + 'instructions'?: Array | null; + /** + * User query which is a topical/goal oriented question that needs to be broken down into smaller simple analytical questions. + */ + 'query'?: string | null; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +/** +* Metadata objects. +*/ +declare class JWTMetadataObject { + 'identifier'?: string | null; + 'type'?: JWTMetadataObjectTypeEnum | null; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} +type JWTMetadataObjectTypeEnum = "LOGICAL_TABLE"; + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +/** +* List of runtime parameters need to set during the session. +*/ +declare class JWTParameter { + /** + * Runtime filter parameter type in JWT. + */ + 'runtime_filter'?: any | null; + /** + * Runtime sort parameter type in JWT. + */ + 'runtime_sort'?: any | null; + /** + * Runtime param override type in JWT. + */ + 'runtime_param_override'?: any | null; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +/** +* JWT user options to create a JWT token given the payload. *Deprecated in 9.12.0.cl. Use user_parameters instead.* +*/ +declare class JWTUserOptions { + 'parameters'?: Array; + 'metadata'?: Array | null; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +/** +* JWT user options to create a JWT token given the payload. *Deprecated in 9.12.0.cl. Use user_parameters instead.* +*/ +declare class JWTUserOptionsFull { + 'parameters'?: Array | null; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +declare class LiveboardContent { + /** + * Total available data row count. + */ + 'available_data_row_count': number; + /** + * Name of the columns. + */ + 'column_names': Array; + /** + * Rows of data set. + */ + 'data_rows': Array; + /** + * The starting record number from where the records should be included. + */ + 'record_offset': number; + /** + * The number of records that should be included. + */ + 'record_size': number; + /** + * Total returned data row count. + */ + 'returned_data_row_count': number; + /** + * Sampling ratio (0 to 1). If the query was sampled, it is the ratio of keys returned in the data set to the total number of keys expected in the query. If the value is 1.0, this means that the complete result is returned. + */ + 'sampling_ratio': number; + /** + * Unique ID of the visualization. + */ + 'visualization_id'?: string | null; + /** + * Name of the visualization. + */ + 'visualization_name'?: string | null; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +declare class LiveboardDataResponse { + /** + * The unique identifier of the object + */ + 'metadata_id': string; + /** + * Name of the metadata object + */ + 'metadata_name': string; + /** + * Data content of metadata objects + */ + 'contents': Array; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +/** +* Options to specify details of Liveboard. +*/ +declare class LiveboardOptions { + /** + * Unique ID or name of visualizations. + */ + 'visualization_identifiers': Array; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +/** +* Options to specify details of Liveboard. +*/ +declare class LiveboardOptionsInput { + /** + * Unique ID or name of visualizations. + */ + 'visualization_identifiers': Array; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +declare class LogResponse { + /** + * Date timestamp of the log entry + */ + 'date': string; + /** + * Log data + */ + 'log': string; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +declare class LoginRequest { + /** + * Username of the ThoughtSpot user + */ + 'username'?: string; + /** + * Password of the user account + */ + 'password'?: string; + /** + * ID of the Org context to log in to. If Org ID is not specified, the user will be logged in to the Org context of their previous login session. + */ + 'org_identifier'?: string; + /** + * A flag to remember the user session. When set to true, a session cookie is created and used in subsequent API requests. + */ + 'remember_me'?: boolean | null; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +declare class ManageObjectPrivilegeRequest { + /** + * Operation to perform to manage object privileges. Available operations are: `ADD`, `REMOVE`. + */ + 'operation': ManageObjectPrivilegeRequestOperationEnum; + /** + * Type of metadata objects on which you want to perform the operation. For now only LOGICAL_TABLE is supported. It may be extended to other metadata types in the future. + */ + 'metadata_type': ManageObjectPrivilegeRequestMetadataTypeEnum; + /** + * List of object privilege types on which you want to perform the operation. + */ + 'object_privilege_types': Array; + /** + * List of metadata identifiers (GUID or name) on which you want to perform the operation. + */ + 'metadata_identifiers': Array; + /** + * User or group objects (GUID or name) to which you want to apply the given operation and given object privileges. + */ + 'principals': Array; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} +type ManageObjectPrivilegeRequestOperationEnum = "ADD" | "REMOVE"; +type ManageObjectPrivilegeRequestMetadataTypeEnum = "LOGICAL_TABLE"; +type ManageObjectPrivilegeRequestObjectPrivilegeTypesEnum = "SPOTTER_COACHING_PRIVILEGE"; + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +declare class MetadataAssociationItem { + 'action_config': ActionConfig; + /** + * Unique ID or name of the metadata. + */ + 'identifier': string; + /** + * Type of metadata. Required if the name of the object is set as the identifier. This attribute is optional when the object GUID is specified as the identifier. + */ + 'type': string; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +declare class MetadataContext { + /** + * List of data_source_identifiers to provide context for breaking down user query into analytical queries that can be run on them. + */ + 'data_source_identifiers'?: Array | null; + /** + * List of answer unique identifiers (GUIDs) whose data will be used to guide the response. + */ + 'answer_identifiers'?: Array | null; + /** + * Unique identifier to denote current conversation. + */ + 'conversation_identifier'?: string | null; + /** + * List of liveboard unique identifiers (GUIDs) whose data will be used to guide the response. + */ + 'liveboard_identifiers'?: Array | null; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +declare class MetadataInput { + 'identifier'?: string | null; + 'type'?: MetadataInputTypeEnum | null; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} +type MetadataInputTypeEnum = "LIVEBOARD"; + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +declare class MetadataListItemInput { + /** + * Unique ID or name of the metadata. + */ + 'identifier'?: string | null; + /** + * CustomObjectId of the metadata. + */ + 'obj_identifier'?: string | null; + /** + * A pattern to match the case-insensitive name of the metadata object. User % for a wildcard match. + */ + 'name_pattern'?: string | null; + /** + * Type of metadata. Required if the name of the object is set as identifier. This attribute is optional when the object GUID is specified as identifier. 1. Liveboard 2. Answers 3. LOGICAL_TABLE for any data object such as table, worksheet or view. 4. LOGICAL_COLUMN for a column of any data object such as table, worksheet or view. 5. CONNECTION for creating or modify data connections. 6. TAG for tag objects. 7. USER for user objects. 8. USER_GROUP for group objects. 9. LOGICAL_RELATIONSHIP for table or worksheet joins. A join combines from one or several data object by using matching values 10. INSIGHT_SPEC for SpotIQ objects + */ + 'type'?: MetadataListItemInputTypeEnum | null; + /** + * List of subtype of metadata. Applies for LOGICAL_TABLE type with the following valid values. 1. ONE_TO_ONE_LOGICAL 2. WORKSHEET 3. PRIVATE_WORKSHEET. 4. USER_DEFINED. 5. AGGR_WORKSHEET. 6. SQL_VIEW Version: 10.11.0.cl or later + */ + 'subtypes'?: Array | null; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} +type MetadataListItemInputTypeEnum = "LIVEBOARD" | "ANSWER" | "LOGICAL_TABLE" | "LOGICAL_COLUMN" | "CONNECTION" | "TAG" | "USER" | "USER_GROUP" | "LOGICAL_RELATIONSHIP" | "INSIGHT_SPEC"; +type MetadataListItemInputSubtypesEnum = "ONE_TO_ONE_LOGICAL" | "WORKSHEET" | "PRIVATE_WORKSHEET" | "USER_DEFINED" | "AGGR_WORKSHEET" | "SQL_VIEW"; + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +declare class MetadataResponse { + 'name'?: string | null; + 'id': string; + 'type': MetadataResponseTypeEnum; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} +type MetadataResponseTypeEnum = "LIVEBOARD"; + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +/** +* Metadata Search Response Object. +*/ +declare class MetadataSearchResponse { + /** + * Unique identifier of the metadata. + */ + 'metadata_id'?: string | null; + /** + * Name of the metadata. + */ + 'metadata_name'?: string | null; + /** + * Type of the metadata. + */ + 'metadata_type': MetadataSearchResponseMetadataTypeEnum; + /** + * Custom identifier of the metadata. (Available from 10.8.0.cl onwards) + */ + 'metadata_obj_id'?: string | null; + /** + * Details of dependent objects of the metadata objects. + */ + 'dependent_objects'?: any | null; + /** + * Details of incomplete information of the metadata objects if any. + */ + 'incomplete_objects'?: Array | null; + /** + * Complete details of the metadata objects. + */ + 'metadata_detail'?: any | null; + /** + * Header information of the metadata objects. + */ + 'metadata_header'?: any | null; + /** + * Visualization header information of the metadata objects. + */ + 'visualization_headers'?: Array | null; + /** + * Stats of the metadata object. Includes views, favorites, last_accessed. + */ + 'stats'?: any | null; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} +type MetadataSearchResponseMetadataTypeEnum = "LIVEBOARD" | "ANSWER" | "LOGICAL_TABLE" | "LOGICAL_COLUMN" | "CONNECTION" | "TAG" | "USER" | "USER_GROUP" | "LOGICAL_RELATIONSHIP" | "INSIGHT_SPEC"; + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +/** +* Sort options. +*/ +declare class MetadataSearchSortOptions { + /** + * Name of the field to apply the sort on. + */ + 'field_name'?: MetadataSearchSortOptionsFieldNameEnum | null; + /** + * Sort order : ASC(Ascending) or DESC(Descending). + */ + 'order'?: MetadataSearchSortOptionsOrderEnum | null; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} +type MetadataSearchSortOptionsFieldNameEnum = "NAME" | "DISPLAY_NAME" | "AUTHOR" | "CREATED" | "MODIFIED" | "VIEWS" | "FAVORITES" | "LAST_ACCESSED"; +type MetadataSearchSortOptionsOrderEnum = "ASC" | "DESC"; + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +declare class ModelTableList { + /** + * Name of the Model. + */ + 'model_name': string; + /** + * Model directory path, this is optional param and required if there are duplicate models with the same name. + */ + 'model_path'?: string | null; + /** + * List of Tables. + */ + 'tables': Array; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +declare class NLInstructionsInfoInput { + /** + * User instructions for natural language processing. + */ + 'instructions': Array; + /** + * Scope of the instruction (USER or GLOBAL). Defaults to GLOBAL. + */ + 'scope': NLInstructionsInfoInputScopeEnum; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} +type NLInstructionsInfoInputScopeEnum = "GLOBAL"; + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +/** +* The object representation with ID and Name. +*/ +declare class ObjectIDAndName { + /** + * The unique identifier of the object. + */ + 'id'?: string | null; + /** + * Name of the object. + */ + 'name'?: string | null; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +declare class ObjectPrivilegesOfMetadataResponse { + 'metadata_object_privileges'?: any | null; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +/** +* The current Org context of the user. +*/ +declare class Org { + /** + * The ID of the object. + */ + 'id': number; + /** + * Name of the object. + */ + 'name': string; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +/** +* Org-level non-embed access configuration. +*/ +declare class OrgNonEmbedAccess { + /** + * Block full application access for non-embedded usage. + */ + 'block_full_app_access'?: boolean | null; + /** + * Groups that have non-embed full app access. + */ + 'groups_with_access'?: Array | null; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +declare class OrgPreferenceSearchCriteriaInput { + /** + * Unique identifier or name of the org + */ + 'org_identifier': string; + /** + * Event types to search for. If not provided, all event types for this org are returned. + */ + 'event_types'?: Array | null; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} +type OrgPreferenceSearchCriteriaInputEventTypesEnum = "LIVEBOARD_SCHEDULE"; + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +declare class OrgResponse { + /** + * Unique identifier of the Org. + */ + 'id'?: number | null; + /** + * Name of the Org. + */ + 'name'?: string | null; + /** + * Status of the Org. + */ + 'status'?: OrgResponseStatusEnum | null; + /** + * Description of the Org. + */ + 'description'?: string | null; + /** + * Visibility of the Org. + */ + 'visibility'?: OrgResponseVisibilityEnum | null; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} +type OrgResponseStatusEnum = "ACTIVE" | "IN_ACTIVE"; +type OrgResponseVisibilityEnum = "SHOW" | "HIDDEN"; + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +declare class ParameterizeMetadataFieldsRequest { + /** + * Type of metadata object to parameterize. + */ + 'metadata_type'?: ParameterizeMetadataFieldsRequestMetadataTypeEnum; + /** + * Unique ID or name of the metadata object to parameterize. + */ + 'metadata_identifier': string; + /** + * Type of field in the metadata to parameterize. + */ + 'field_type': ParameterizeMetadataFieldsRequestFieldTypeEnum; + /** + * JSON array of field names to parameterize. Example: [schemaName, databaseName, tableName] + */ + 'field_names': Array; + /** + * Unique ID or name of the variable to use for parameterization of these fields. + */ + 'variable_identifier': string; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} +type ParameterizeMetadataFieldsRequestMetadataTypeEnum = "LOGICAL_TABLE" | "CONNECTION" | "CONNECTION_CONFIG"; +type ParameterizeMetadataFieldsRequestFieldTypeEnum = "ATTRIBUTE" | "CONNECTION_PROPERTY"; + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +declare class ParameterizeMetadataRequest { + /** + * Type of metadata object to parameterize. + */ + 'metadata_type'?: ParameterizeMetadataRequestMetadataTypeEnum; + /** + * Unique ID or name of the metadata object to parameterize. + */ + 'metadata_identifier': string; + /** + * Type of field in the metadata to parameterize. + */ + 'field_type': ParameterizeMetadataRequestFieldTypeEnum; + /** + * Name of the field which needs to be parameterized. + */ + 'field_name': string; + /** + * Unique ID or name of the variable to use for parameterization + */ + 'variable_identifier': string; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} +type ParameterizeMetadataRequestMetadataTypeEnum = "LOGICAL_TABLE" | "CONNECTION" | "CONNECTION_CONFIG"; +type ParameterizeMetadataRequestFieldTypeEnum = "ATTRIBUTE" | "CONNECTION_PROPERTY"; + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +/** +* Options for PDF export. +*/ +declare class PdfOptions { + /** + * Indicates whether to include complete Liveboard. + */ + 'complete_liveboard'?: boolean | null; + /** + * Indicates whether to include cover page with the Liveboard title. + */ + 'include_cover_page'?: boolean | null; + /** + * Indicates whether to include customized wide logo in the footer if available. + */ + 'include_custom_logo'?: boolean | null; + /** + * Indicates whether to include a page with all applied filters. + */ + 'include_filter_page'?: boolean | null; + /** + * Indicates whether to include page number in the footer of each page + */ + 'include_page_number'?: boolean | null; + /** + * Text to include in the footer of each page. + */ + 'page_footer_text'?: string | null; + /** + * Page orientation of the PDF. + */ + 'page_orientation'?: string | null; + /** + * Page size. + */ + 'page_size'?: PdfOptionsPageSizeEnum | null; + /** + * Indicates whether to include only first page of the tables. + */ + 'truncate_table'?: boolean | null; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} +type PdfOptionsPageSizeEnum = "A4" | "TAB_BASED"; + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +declare class PdfOptionsInput { + /** + * Size of PDF page. `A4` generates a paginated A4 PDF. `CONTINUOUS` generates a continuous PDF that matches the Liveboard layout. Each Liveboard tab has its own page of variable length. Defaults to `A4` if not specified. Version: 26.5.0.cl or later + */ + 'page_size'?: PdfOptionsInputPageSizeEnum | null; + /** + * Zoom level percentage for the PDF. Only applicable when `page_size` is `CONTINUOUS`. Acceptable values are integers in the range [45, 175]. Defaults to 100 if not specified. Version: 26.5.0.cl or later + */ + 'zoom_level'?: number | null; + /** + * Indicates whether to include the cover page with the Liveboard title. + */ + 'include_cover_page'?: boolean | null; + /** + * Indicates whether to include customized wide logo in the footer if available. + */ + 'include_custom_logo'?: boolean | null; + /** + * Indicates whether to include a page with all applied filters. For `CONTINUOUS` page_size, this parameter indicates whether to include the filter header. + */ + 'include_filter_page'?: boolean | null; + /** + * Indicates whether to include page number in the footer of each page. + */ + 'include_page_number'?: boolean | null; + /** + * Page orientation of the PDF. + */ + 'page_orientation'?: PdfOptionsInputPageOrientationEnum | null; + /** + * Indicates whether to include only the first page of the tables. + */ + 'truncate_table'?: boolean | null; + /** + * Text to include in the footer of each page. + */ + 'page_footer_text'?: string | null; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} +type PdfOptionsInputPageSizeEnum = "A4" | "CONTINUOUS"; +type PdfOptionsInputPageOrientationEnum = "PORTRAIT" | "LANDSCAPE"; + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +/** +* Details of users or groups. +*/ +declare class PermissionInput { + 'principal': PrincipalsInput; + /** + * Object share mode. + */ + 'share_mode': PermissionInputShareModeEnum; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} +type PermissionInputShareModeEnum = "READ_ONLY" | "MODIFY" | "NO_ACCESS"; + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +declare class PermissionOfMetadataResponse { + 'metadata_permission_details'?: any | null; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +declare class PermissionOfPrincipalsResponse { + 'principal_permission_details'?: any | null; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +declare class PngOptionsInput { + /** + * Indicates whether to include the cover page with the Liveboard title. + */ + 'include_cover_page'?: boolean | null; + /** + * Indicates whether to include a page with all applied filters. + */ + 'include_filter_page'?: boolean | null; + /** + * Indicates personalised view of the Liveboard in case of png + */ + 'personalised_view_id'?: string | null; + /** + * Desired width of the Liveboard image in pixels. Ex. 1920 for Full HD image Version: 10.9.0.cl or later + */ + 'image_resolution'?: number | null; + /** + * The scale of the image in percentage. Ex. 100 for 100% scale. Version: 10.9.0.cl or later + */ + 'image_scale'?: number | null; + /** + * Indicates whether to include the header of the liveboard. Version: 10.9.0.cl or later + */ + 'include_header'?: boolean | null; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +declare class PolicyProcessOptionsInput { + 'impersonate_user'?: string | null; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +declare class PrincipalsListItem { + /** + * Unique ID or name of the user or group. + */ + 'identifier': string; + /** + * Principal type. Valid values are + */ + 'type': string; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +declare class PublishMetadataListItem { + /** + * Unique ID or name of the metadata. + */ + 'identifier': string; + /** + * Type of metadata. Required if identifier is name. + */ + 'type'?: PublishMetadataListItemTypeEnum | null; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} +type PublishMetadataListItemTypeEnum = "LIVEBOARD" | "ANSWER" | "LOGICAL_TABLE"; + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +declare class PublishMetadataRequest { + /** + * Metadata objects to be published. + */ + 'metadata': Array; + /** + * Unique ID or name of orgs to which metadata objects should be published. + */ + 'org_identifiers': Array; + /** + * Skip validations of objects to be published. + */ + 'skip_validation'?: boolean | null; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +/** +* Input for variable value put operations +*/ +declare class VariablePutAssignmentInput { + /** + * Values of the variable + */ + 'assigned_values': Array; + /** + * The unique name of the org + */ + 'org_identifier'?: string | null; + /** + * Principal type + */ + 'principal_type'?: VariablePutAssignmentInputPrincipalTypeEnum | null; + /** + * Unique ID or name of the principal + */ + 'principal_identifier'?: string | null; + /** + * Unique ID of the model + */ + 'model_identifier'?: string | null; + /** + * Priority level + */ + 'priority'?: number | null; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} +type VariablePutAssignmentInputPrincipalTypeEnum = "USER" | "USER_GROUP"; + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +declare class PutVariableValuesRequest { + /** + * Operation to perform + */ + 'operation'?: PutVariableValuesRequestOperationEnum; + /** + * Variable assignments + */ + 'variable_assignment': Array; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} +type PutVariableValuesRequestOperationEnum = "ADD" | "REMOVE" | "REPLACE" | "RESET"; + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +/** +* NLSRequest object containing user query & instructions. +*/ +declare class QueryGetDecomposedQueryRequestNlsRequest { + /** + * Cluster version like 10.4.0.cl, 10.5.0.cl, so on. + */ + 'agentVersion'?: number | null; + /** + * If true, results are not returned from cache & calculated every time. Can incur high costs & latency. + */ + 'bypassCache'?: boolean | null; + /** + * User specific instructions for processing the @query. + */ + 'instructions'?: Array | null; + /** + * User query which is a topical/goal oriented question that needs to be broken down into smaller simple analytical questions. + */ + 'query'?: string | null; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +declare class QueryGetDecomposedQueryRequest { + /** + * List of answer unique identifiers (GUIDs) whose data will be used to guide the response. + */ + 'answerIds'?: Array; + /** + * User provided content like text data, csv data as a string message to provide context & potentially improve the quality of the response. + */ + 'content'?: Array; + /** + * Unique identifier to denote current conversation. + */ + 'conversationId'?: string; + /** + * List of liveboard unique identifiers (GUIDs) whose data will be used to guide the response. + */ + 'liveboardIds'?: Array; + /** + * Maximum number of decomposed queries that is allowed in the response, default = 5. + */ + 'maxDecomposedQueries'?: number; + 'nlsRequest'?: QueryGetDecomposedQueryRequestNlsRequest; + /** + * List of worksheetIds to provide context for decomposing user query into analytical queries that can be run on them. + */ + 'worksheetIds'?: Array; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +/** +* Recipient configuration which includes email address, ID or name of the users and groups. +*/ +declare class RecipientDetails { + /** + * Emails of the recipients. Specify email address if the recipient is not a ThoughtSpot user. + */ + 'emails'?: Array | null; + /** + * List of user or groups to subscribe for the scheduled job notifications. + */ + 'principals'?: Array | null; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +/** +* Recipients of the scheduled job notification. +*/ +declare class RecipientDetailsInput { + /** + * Emails of the recipients. + */ + 'emails'?: Array | null; + /** + * User or groups to be set as recipients of the schedule notifications. + */ + 'principals'?: Array | null; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +declare class RegionalSettingsInput { + /** + * ISO code to be appended with currency values. + */ + 'currency_format'?: RegionalSettingsInputCurrencyFormatEnum | null; + /** + * Indicates the locale to be used for all formattings. + */ + 'user_locale'?: RegionalSettingsInputUserLocaleEnum | null; + /** + * Indicates the locale to be used for number formatting. + */ + 'number_format_locale'?: RegionalSettingsInputNumberFormatLocaleEnum | null; + /** + * Indicates the locale to be used for date formatting. + */ + 'date_format_locale'?: RegionalSettingsInputDateFormatLocaleEnum | null; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} +type RegionalSettingsInputCurrencyFormatEnum = "ADP" | "AED" | "AFN" | "ALL" | "AMD" | "ANG" | "AOA" | "ARA" | "ARS" | "ATS" | "AUD" | "AWG" | "AZN" | "BAM" | "BBD" | "BDT" | "BEF" | "BGL" | "BGM" | "BGN" | "BHD" | "BIF" | "BMD" | "BND" | "BOB" | "BOP" | "BOV" | "BRL" | "BSD" | "BTN" | "BUK" | "BWP" | "BYN" | "BZD" | "CAD" | "CDF" | "CHE" | "CHF" | "CHW" | "CLE" | "CLP" | "CNX" | "CNY" | "COP" | "COU" | "CRC" | "CSK" | "CUC" | "CUP" | "CVE" | "CYP" | "CZK" | "DDM" | "DEM" | "DJF" | "DKK" | "DOP" | "DZD" | "ECS" | "ECV" | "EEK" | "EGP" | "ERN" | "ESP" | "ETB" | "EUR" | "FIM" | "FJD" | "FKP" | "FRF" | "GBP" | "GEK" | "GEL" | "GHS" | "GIP" | "GMD" | "GNF" | "GNS" | "GQE" | "GRD" | "GTQ" | "GWE" | "GWP" | "GYD" | "HKD" | "HNL" | "HRD" | "HRK" | "HTG" | "HUF" | "IDR" | "IEP" | "ILP" | "ILS" | "INR" | "IQD" | "IRR" | "ISK" | "ITL" | "JMD" | "JOD" | "JPY" | "KES" | "KGS" | "KHR" | "KMF" | "KPW" | "KRW" | "KWD" | "KYD" | "KZT" | "LAK" | "LBP" | "LKR" | "LRD" | "LSL" | "LTL" | "LTT" | "LUC" | "LUF" | "LUL" | "LVL" | "LVR" | "LYD" | "MAD" | "MAF" | "MCF" | "MDC" | "MDL" | "MGA" | "MGF" | "MKD" | "MLF" | "MMK" | "MNT" | "MOP" | "MRU" | "MTL" | "MTP" | "MUR" | "MVR" | "MWK" | "MXN" | "MXV" | "MYR" | "MZE" | "MZN" | "NAD" | "NGN" | "NIO" | "NLG" | "NOK" | "NPR" | "NZD" | "OMR" | "PAB" | "PEI" | "PEN" | "PGK" | "PHP" | "PKR" | "PLN" | "PTE" | "PYG" | "QAR" | "RHD" | "RON" | "RSD" | "RUB" | "RWF" | "SAR" | "SBD" | "SCR" | "SDG" | "SEK" | "SGD" | "SHP" | "SIT" | "SKK" | "SLL" | "SOS" | "SRD" | "SRG" | "SSP" | "STN" | "SUR" | "SVC" | "SYP" | "SZL" | "THB" | "TJR" | "TJS" | "TMT" | "TND" | "TOP" | "TPE" | "TRY" | "TTD" | "TWD" | "TZS" | "UAH" | "UAK" | "UGX" | "USD" | "UYU" | "UYW" | "UZS" | "VES" | "VND" | "VUV" | "WST" | "XAF" | "XAG" | "XAU" | "XBA" | "XBB" | "XCD" | "XDR" | "XEU" | "XFO" | "XFU" | "XOF" | "XPD" | "XPF" | "XPT" | "XRE" | "XSU" | "XTS" | "XUA" | "XXX" | "YDD" | "YER" | "ZAR" | "ZMW"; +type RegionalSettingsInputUserLocaleEnum = "en-CA" | "en-GB" | "en-US" | "de-DE" | "ja-JP" | "zh-CN" | "pt-BR" | "fr-FR" | "fr-CA" | "es-US" | "da-DK" | "es-ES" | "fi-FI" | "sv-SE" | "nb-NO" | "pt-PT" | "nl-NL" | "it-IT" | "ru-RU" | "en-IN" | "de-CH" | "en-NZ" | "es-MX" | "en-AU" | "zh-Hant" | "ko-KR" | "en-DE"; +type RegionalSettingsInputNumberFormatLocaleEnum = "en-CA" | "en-GB" | "en-US" | "de-DE" | "ja-JP" | "zh-CN" | "pt-BR" | "fr-FR" | "fr-CA" | "es-US" | "da-DK" | "es-ES" | "fi-FI" | "sv-SE" | "nb-NO" | "pt-PT" | "nl-NL" | "it-IT" | "ru-RU" | "en-IN" | "de-CH" | "en-NZ" | "es-MX" | "en-AU" | "zh-Hant" | "ko-KR" | "en-DE"; +type RegionalSettingsInputDateFormatLocaleEnum = "en-CA" | "en-GB" | "en-US" | "de-DE" | "ja-JP" | "zh-CN" | "pt-BR" | "fr-FR" | "fr-CA" | "es-US" | "da-DK" | "es-ES" | "fi-FI" | "sv-SE" | "nb-NO" | "pt-PT" | "nl-NL" | "it-IT" | "ru-RU" | "en-IN" | "de-CH" | "en-NZ" | "es-MX" | "en-AU" | "zh-Hant" | "ko-KR" | "en-DE"; + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +declare class RepoConfigObject { + /** + * Remote repository URL configured + */ + 'repository_url'?: string | null; + /** + * Username to authenticate connection to the version control system + */ + 'username'?: string | null; + /** + * Name of the remote branch where objects from this Thoughtspot instance will be versioned. + */ + 'commit_branch_name'?: string | null; + /** + * Branches that have been pulled in local repository + */ + 'branches'?: Array | null; + /** + * Maintain mapping of guid for the deployment to an instance + */ + 'enable_guid_mapping'?: boolean | null; + /** + * Name of the branch where the configuration files related to operations between Thoughtspot and version control repo should be maintained. + */ + 'configuration_branch_name'?: string | null; + 'org'?: Org; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +declare class ResetUserPasswordRequest { + /** + * New password for the user. + */ + 'new_password': string; + /** + * GUID or name of the user. + */ + 'user_identifier': string; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +/** +* The object representation with activation link. +*/ +declare class ResponseActivationURL { + /** + * Activation link to activate the user. + */ + 'activation_link'?: string | null; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +declare class ResponseCopyObject { + /** + * The unique identifier of the object. + */ + 'metadata_id'?: string | null; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +/** +* Custom action details +*/ +declare class ResponseCustomAction { + 'action_details': ActionDetails; + 'default_action_config': DefaultActionConfig; + /** + * Unique Id of the custom action. + */ + 'id': string; + /** + * Metadata objects to assign the the custom action to. + */ + 'metadata_association'?: Array | null; + /** + * Unique name of the custom action. + */ + 'name': string; + /** + * Unique ID or name of the User groups which are associated with the custom action. + */ + 'user_groups'?: Array | null; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +/** +* Unique ID of the failed worksheet. +*/ +declare class ResponseFailedEntity { + 'id': string; + /** + * Name of the worksheet that failed to convert. + */ + 'name': string; + /** + * Error details related to the failed conversion. + */ + 'error': string; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +/** +* Wrapper for the failed entities, as they are inside a \'data\' field in the response. +*/ +declare class ResponseFailedEntities { + 'data': Array; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +/** +* Unique ID of the incomplete worksheet. +*/ +declare class ResponseIncompleteEntity { + 'id': string; + /** + * Name of the incomplete worksheet. + */ + 'name': string; + /** + * Error details related to the incomplete conversion. + */ + 'error': string; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +/** +* Wrapper for the incomplete entities, as they are inside a \'data\' field in the response. +*/ +declare class ResponseIncompleteEntities { + 'data': Array; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +declare class ResponseMessage { + /** + * Unique identifier of the generated response. + */ + 'session_identifier'?: string | null; + /** + * Generate number of the response. + */ + 'generation_number'?: number | null; + /** + * Type of the generated response. + */ + 'message_type': ResponseMessageMessageTypeEnum; + /** + * Generated visualization type. + */ + 'visualization_type'?: ResponseMessageVisualizationTypeEnum | null; + /** + * Tokens for the response. + */ + 'tokens'?: string | null; + /** + * User friendly tokens for the response. + */ + 'display_tokens'?: string | null; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} +type ResponseMessageMessageTypeEnum = "TSAnswer"; +type ResponseMessageVisualizationTypeEnum = "Chart" | "Table" | "Undefined"; + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +/** +* Unique ID of the worksheet that failed post-upgrade. +*/ +declare class ResponsePostUpgradeFailedEntity { + 'id': string; + /** + * Name of the worksheet that failed post-upgrade. + */ + 'name': string; + /** + * Error details related to the post-upgrade failure. + */ + 'error': string; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +/** +* Wrapper for the post-upgrade failed entities, as they are inside a \'data\' field in the response. +*/ +declare class ResponsePostUpgradeFailedEntities { + 'data': Array; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +/** +* Schedule run response object +*/ +declare class ResponseScheduleRun { + /** + * GUID of the scheduled job. + */ + 'id': string; + /** + * Schedule run start time in milliseconds. + */ + 'start_time_in_millis': number; + /** + * Schedule run end time in milliseconds. + */ + 'end_time_in_millis': number; + /** + * Status of the schedule run. + */ + 'status': string; + /** + * Message details related to the schedule run. + */ + 'detail'?: string | null; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +declare class ResponseSchedule { + 'author': Author; + /** + * Schedule creation time in milliseconds. + */ + 'creation_time_in_millis': any; + /** + * Description of the job. + */ + 'description'?: string | null; + /** + * Export file format. + */ + 'file_format': string; + 'frequency': Frequency; + /** + * GUID of the scheduled job. + */ + 'id': string; + 'liveboard_options'?: LiveboardOptions; + 'metadata': MetadataResponse; + /** + * Name of the scheduled job. + */ + 'name': string; + 'pdf_options'?: PdfOptions; + 'recipient_details': RecipientDetails; + /** + * Status of the job + */ + 'status'?: string | null; + /** + * Time zone + */ + 'time_zone': string; + /** + * Schedule runs history records. + */ + 'history_runs'?: Array | null; + /** + * Personalised view id of the liveboard to be scheduled. + */ + 'personalised_view_id'?: string | null; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +/** +* Unique ID of the worksheet. +*/ +declare class ResponseSuccessfulEntity { + 'id': string; + /** + * Name of the worksheet. + */ + 'name': string; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +/** +* Wrapper for the successful entities, as they are inside a \'data\' field in the response. +*/ +declare class ResponseSuccessfulEntities { + 'data': Array; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +/** +* Name of the conversion process, which involves converting worksheets to models. +*/ +declare class ResponseWorksheetToModelConversion { + 'name': string; + /** + * The number of worksheets successfully converted to models. + */ + 'success_count': number; + /** + * The number of worksheets that failed to convert. + */ + 'failure_count': number; + /** + * The number of worksheets that were incomplete during the conversion process. + */ + 'incomplete_count': number; + /** + * The number of worksheets that failed after an upgrade during the conversion process. + */ + 'post_upgrade_failed_count': number; + /** + * The total time taken to complete the conversion process in milliseconds. + */ + 'total_time_in_millis': number; + 'successful_entities': ResponseSuccessfulEntities; + 'failed_entities': ResponseFailedEntities; + 'incomplete_entities': ResponseIncompleteEntities; + 'post_upgrade_failed_entities': ResponsePostUpgradeFailedEntities; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +declare class RevertCommitRequest { + /** + * Metadata objects. + */ + 'metadata'?: Array; + /** + * Name of the branch where the reverted version should be committed Note: If no branch_name is specified, then the commit_branch_name will be considered. + */ + 'branch_name'?: string; + /** + * Policy to apply when reverting a commit. Valid values: [ALL_OR_NONE, PARTIAL] + */ + 'revert_policy'?: RevertCommitRequestRevertPolicyEnum; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} +type RevertCommitRequestRevertPolicyEnum = "ALL_OR_NONE" | "PARTIAL"; + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +declare class RevertedMetadata { + /** + * Name of the file deployed + */ + 'file_name': string; + /** + * Name of the metadata object + */ + 'metadata_name': string; + /** + * Type of the metadata object + */ + 'metadata_type': string; + /** + * Indicates the status of deployment for the file + */ + 'status_code': string; + /** + * Any error or warning with the deployment + */ + 'status_message': string; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +declare class RevertResponse { + 'committer'?: CommiterType; + 'author'?: AuthorType; + /** + * Comments associated with the commit + */ + 'comment'?: string | null; + /** + * Time at which the changes were committed. + */ + 'commit_time'?: string | null; + /** + * SHA id associated with the commit + */ + 'commit_id'?: string | null; + /** + * Branch where changes were committed + */ + 'branch'?: string | null; + /** + * Files that were pushed as part of this commit + */ + 'committed_files'?: Array | null; + /** + * Metadata of reverted file of this commit + */ + 'reverted_metadata'?: Array | null; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +declare class RevokeRefreshTokensRequest { + /** + * Unique ID or name of the configuration. When provided, the refresh tokens of the users associated with the connection configuration will be revoked. + */ + 'configuration_identifiers'?: Array; + /** + * Unique ID or name of the users. When provided, the refresh tokens of the specified users will be revoked. If the request includes the user ID or name of the connection author, their token will also be revoked. + */ + 'user_identifiers'?: Array; + /** + * Unique ID or name of the Org. When provided, the refresh tokens of all users associated with the published connection in the Org will be revoked. This parameter is valid only for published connections. Using it with unpublished connections will result in an error. + */ + 'org_identifiers'?: Array; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +declare class RevokeRefreshTokensResponse { + /** + * Result message describing the outcome of the refresh token revocation operation. + */ + 'data': string; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +declare class RevokeTokenRequest { + 'user_identifier'?: string; + 'token'?: string; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +declare class RiseGQLArgWrapper { + 'name': string; + 'type': string; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +declare class RiseSetter { + 'field': string; + 'path': string; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +declare class Role { + /** + * id of the role + */ + 'id'?: string | null; + /** + * name of the role + */ + 'name'?: string | null; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +declare class RoleResponse { + /** + * Unique Id of the role. + */ + 'id': string; + /** + * Name of the role + */ + 'name': string; + /** + * Description of the role + */ + 'description': string; + /** + * number of groups assigned with this role + */ + 'groups_assigned_count'?: number | null; + /** + * Orgs in which role exists. + */ + 'orgs'?: Array | null; + /** + * Details of groups assigned with this role + */ + 'groups'?: Array | null; + /** + * Privileges granted to the role. + */ + 'privileges': Array; + /** + * Permission details of the Role + */ + 'permission'?: RoleResponsePermissionEnum | null; + /** + * Unique identifier of author of the role. + */ + 'author_id'?: string | null; + /** + * Unique identifier of modifier of the role. + */ + 'modifier_id'?: string | null; + /** + * Creation time of the role in milliseconds. + */ + 'creation_time_in_millis'?: any | null; + /** + * Last modified time of the role in milliseconds. + */ + 'modification_time_in_millis'?: any | null; + /** + * Indicates whether the role is deleted. + */ + 'deleted'?: boolean | null; + /** + * Indicates whether the role is deprecated. + */ + 'deprecated'?: boolean | null; + /** + * Indicates whether the role is external. + */ + 'external'?: boolean | null; + /** + * Indicates whether the role is hidden. + */ + 'hidden'?: boolean | null; + /** + * Indicates whether the role is shared via connection + */ + 'shared_via_connection'?: boolean | null; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} +type RoleResponsePrivilegesEnum = "USERDATAUPLOADING" | "DATADOWNLOADING" | "DATAMANAGEMENT" | "SHAREWITHALL" | "JOBSCHEDULING" | "A3ANALYSIS" | "BYPASSRLS" | "DISABLE_PINBOARD_CREATION" | "DEVELOPER" | "APPLICATION_ADMINISTRATION" | "USER_ADMINISTRATION" | "GROUP_ADMINISTRATION" | "SYSTEM_INFO_ADMINISTRATION" | "SYNCMANAGEMENT" | "ORG_ADMINISTRATION" | "ROLE_ADMINISTRATION" | "AUTHENTICATION_ADMINISTRATION" | "BILLING_INFO_ADMINISTRATION" | "CONTROL_TRUSTED_AUTH" | "TAGMANAGEMENT" | "LIVEBOARD_VERIFIER" | "CAN_MANAGE_CUSTOM_CALENDAR" | "CAN_CREATE_OR_EDIT_CONNECTIONS" | "CAN_MANAGE_WORKSHEET_VIEWS_TABLES" | "CAN_MANAGE_VERSION_CONTROL" | "THIRDPARTY_ANALYSIS" | "CAN_CREATE_CATALOG" | "ALLOW_NON_EMBED_FULL_APP_ACCESS" | "CAN_ACCESS_ANALYST_STUDIO" | "CAN_MANAGE_ANALYST_STUDIO" | "PREVIEW_DOCUMENT_SEARCH" | "CAN_MANAGE_VARIABLES" | "CAN_MODIFY_FOLDERS" | "CAN_VIEW_FOLDERS" | "CAN_MANAGE_AGENTSPOT" | "CAN_ACCESS_AGENTSPOT" | "CAN_SETUP_VERSION_CONTROL" | "PREVIEW_THOUGHTSPOT_SAGE" | "CAN_MANAGE_WEBHOOKS" | "CAN_DOWNLOAD_VISUALS" | "CAN_DOWNLOAD_DETAILED_DATA" | "CAN_USE_SPOTTER"; +type RoleResponsePermissionEnum = "READ_ONLY" | "MODIFY" | "NO_ACCESS"; + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +/** +* List of runtime parameters need to set during the session. +*/ +declare class RuntimeFilter { + /** + * Runtime filter parameter type in JWT. + */ + 'runtime_filter'?: any; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +/** +* List of runtime parameters need to set during the session. +*/ +declare class RuntimeParamOverride { + /** + * Runtime param override type in JWT. + */ + 'runtime_param_override'?: any; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +/** +* List of runtime parameters need to set during the session. +*/ +declare class RuntimeSort { + /** + * Runtime sort parameter type in JWT. + */ + 'runtime_sort'?: any; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +declare class ScheduleHistoryRunsOptionsInput { + /** + * Indicates whether to fetch history runs for the scheduled notification. + */ + 'include_history_runs'?: boolean | null; + /** + * Indicates the max number of records that can be fetched as past runs of any scheduled job. + */ + 'record_size'?: number | null; + /** + * Indicates the starting record number from where history runs records should be fetched. + */ + 'record_offset'?: number | null; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +/** +* Options for PDF export. +*/ +declare class SchedulesPdfOptionsInput { + /** + * Indicates whether to include complete Liveboard. + */ + 'complete_liveboard'?: boolean | null; + /** + * Indicates whether to include cover page with the Liveboard title. + */ + 'include_cover_page'?: boolean | null; + /** + * Indicates whether to include customized wide logo in the footer if available. + */ + 'include_custom_logo'?: boolean | null; + /** + * Indicates whether to include a page with all applied filters. + */ + 'include_filter_page'?: boolean | null; + /** + * Indicates whether to include page number in the footer of each page + */ + 'include_page_number'?: boolean | null; + /** + * Text to include in the footer of each page. + */ + 'page_footer_text'?: string | null; + /** + * Page orientation of the PDF. + */ + 'page_orientation'?: string | null; + /** + * Page size. + */ + 'page_size'?: SchedulesPdfOptionsInputPageSizeEnum | null; + /** + * Indicates whether to include only first page of the tables. + */ + 'truncate_table'?: boolean | null; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} +type SchedulesPdfOptionsInputPageSizeEnum = "A4" | "TAB_BASED"; + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +declare class Scope { + /** + * Object access scope type. + */ + 'access_type': string; + /** + * Unique identifier of the metadata. + */ + 'org_id'?: number | null; + /** + * Unique identifier of the Org. + */ + 'metadata_id'?: string | null; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +declare class SearchAuthSettingsRequest { + /** + * Type of authentication mechanism to retrieve settings for. Currently supports TRUSTED_AUTH. + */ + 'auth_type': SearchAuthSettingsRequestAuthTypeEnum; + /** + * Scope of auth settings to retrieve. When absent, both cluster and org settings are returned (subject to caller privileges). Set to CLUSTER to retrieve only cluster-level settings, or ORG to retrieve only org-level settings. + */ + 'scope'?: SearchAuthSettingsRequestScopeEnum; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} +type SearchAuthSettingsRequestAuthTypeEnum = "TRUSTED_AUTH"; +type SearchAuthSettingsRequestScopeEnum = "CLUSTER" | "ORG"; + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +/** +* Response for searchAuthSettings. Contains auth type and cluster/org-level preferences. +*/ +declare class SearchAuthSettingsResponse { + /** + * Type of authentication mechanism returned. + */ + 'auth_type'?: SearchAuthSettingsResponseAuthTypeEnum | null; + 'cluster_preferences'?: AuthClusterPreferences; + /** + * Org-level authentication configurations. Present when org scope was requested and per-org auth feature is enabled. + */ + 'org_preferences'?: Array | null; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} +type SearchAuthSettingsResponseAuthTypeEnum = "TRUSTED_AUTH"; + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +/** +* Sort options. +*/ +declare class SearchCalendarsRequestSortOptions { + /** + * Name of the field to apply the sort on. + */ + 'field_name'?: SearchCalendarsRequestSortOptionsFieldNameEnum | null; + /** + * Sort order : ASC(Ascending) or DESC(Descending). + */ + 'order'?: SearchCalendarsRequestSortOptionsOrderEnum | null; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} +type SearchCalendarsRequestSortOptionsFieldNameEnum = "DEFAULT" | "NAME" | "DISPLAY_NAME" | "AUTHOR" | "CREATED" | "MODIFIED"; +type SearchCalendarsRequestSortOptionsOrderEnum = "ASC" | "DESC"; + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +declare class SearchCalendarsRequest { + /** + * Unique ID or name of the connection. + */ + 'connection_identifier'?: string; + /** + * Pattern to match for calendar names (use \'%\' for wildcard match). + */ + 'name_pattern'?: string; + /** + * The starting record number from where the records should be included. + */ + 'record_offset'?: number; + /** + * The number of records that should be included. + */ + 'record_size'?: number; + 'sort_options'?: SearchCalendarsRequestSortOptions; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +declare class SearchChannelHistoryRequest { + /** + * Type of communication channel to search history for. + */ + 'channel_type': SearchChannelHistoryRequestChannelTypeEnum; + /** + * List of job execution record IDs to retrieve. + */ + 'job_ids'?: Array; + /** + * List of channel IDs or names to filter by. + */ + 'channel_identifiers'?: Array; + /** + * Filter by channel delivery status. + */ + 'channel_status'?: SearchChannelHistoryRequestChannelStatusEnum; + /** + * Filter by events that triggered the channel. + */ + 'events'?: Array; + /** + * Filter records created on or after this time (epoch milliseconds). + */ + 'start_epoch_time_in_millis'?: number; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} +type SearchChannelHistoryRequestChannelTypeEnum = "WEBHOOK"; +type SearchChannelHistoryRequestChannelStatusEnum = "PENDING" | "RETRY" | "SUCCESS" | "FAILED"; + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +/** +* Response wrapper for channel delivery history. +*/ +declare class SearchChannelHistoryResponse { + /** + * List of job execution records. + */ + 'jobs': Array; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +/** +* Sort options. +*/ +declare class SearchCollectionsRequestSortOptions { + /** + * Name of the field to apply the sort on. + */ + 'field_name'?: SearchCollectionsRequestSortOptionsFieldNameEnum | null; + /** + * Sort order : ASC(Ascending) or DESC(Descending). + */ + 'order'?: SearchCollectionsRequestSortOptionsOrderEnum | null; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} +type SearchCollectionsRequestSortOptionsFieldNameEnum = "NAME" | "DISPLAY_NAME" | "AUTHOR" | "CREATED" | "MODIFIED"; +type SearchCollectionsRequestSortOptionsOrderEnum = "ASC" | "DESC"; + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +declare class SearchCollectionsRequest { + /** + * A pattern to match case-insensitive name of the Collection object. Use \'%\' for wildcard match. + */ + 'name_pattern'?: string; + /** + * The starting record number from where the records should be included. + */ + 'record_offset'?: number; + /** + * The number of records that should be included. -1 implies no pagination. + */ + 'record_size'?: number; + /** + * Unique GUIDs of collections to search. Note: Collection names cannot be used as identifiers since duplicate names are allowed. + */ + 'collection_identifiers'?: Array; + /** + * Filter collections by author. Provide unique IDs or names of users who created the collections. + */ + 'created_by_user_identifiers'?: Array; + /** + * Include collection metadata items in the response. + */ + 'include_metadata'?: boolean | null; + 'sort_options'?: SearchCollectionsRequestSortOptions; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +declare class SearchCommitsRequest { + /** + * Unique ID or name of the metadata. + */ + 'metadata_identifier': string; + /** + * Type of metadata. + */ + 'metadata_type'?: SearchCommitsRequestMetadataTypeEnum; + /** + * Name of the branch from which commit history needs to be displayed. Note: If no branch_name is specified, then commits will be returned for the default branch for this configuration. + */ + 'branch_name'?: string; + /** + * Record offset point in the commit history to display the response. Note: If no record offset is specified, the beginning of the record will be considered. + */ + 'record_offset'?: number; + /** + * Number of history records from record offset point to be displayed in the response. Note: If no record size is specified, then all the records will be considered. + */ + 'record_size'?: number; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} +type SearchCommitsRequestMetadataTypeEnum = "LIVEBOARD" | "ANSWER" | "LOGICAL_TABLE" | "CUSTOM_ACTION"; + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +declare class SearchCommunicationChannelPreferencesRequest { + /** + * Event types to search for in cluster-level preferences. + */ + 'cluster_preferences'?: Array; + /** + * Org-specific search criteria. + */ + 'org_preferences'?: Array; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} +type SearchCommunicationChannelPreferencesRequestClusterPreferencesEnum = "LIVEBOARD_SCHEDULE"; + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +declare class SearchConfigRequest { + /** + * Applicable when Orgs is enabled in the cluster List of Org ids or name. Provide value -1 for cluster level. Example : [\"OrgID1-or-Name1\", \"OrgID2-or-Name2\"] Note: If no value is specified, then the configurations will be returned for all orgs the user has access to Version: 9.5.0.cl or later + */ + 'org_identifiers'?: Array; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +/** +* Sort options. +*/ +declare class SearchConnectionRequestSortOptions { + /** + * Name of the field to apply the sort on. + */ + 'field_name'?: SearchConnectionRequestSortOptionsFieldNameEnum | null; + /** + * Sort order : ASC(Ascending) or DESC(Descending). + */ + 'order'?: SearchConnectionRequestSortOptionsOrderEnum | null; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} +type SearchConnectionRequestSortOptionsFieldNameEnum = "NAME" | "DISPLAY_NAME" | "AUTHOR" | "CREATED" | "MODIFIED" | "LAST_ACCESSED" | "SYNCED" | "VIEWS" | "USER_STATE" | "ROW_COUNT"; +type SearchConnectionRequestSortOptionsOrderEnum = "ASC" | "DESC"; + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +declare class SearchConnectionRequest { + /** + * List of connections and name pattern + */ + 'connections'?: Array; + /** + * Array of types of data warehouse defined for the connection. + */ + 'data_warehouse_types'?: Array; + /** + * The starting record number from where the records should be included. + */ + 'record_offset'?: number; + /** + * The number of records that should be included. + */ + 'record_size'?: number; + /** + * Unique ID or name of tags. + */ + 'tag_identifiers'?: Array; + /** + * Data warehouse object type. + */ + 'data_warehouse_object_type'?: SearchConnectionRequestDataWarehouseObjectTypeEnum; + 'sort_options'?: SearchConnectionRequestSortOptions; + /** + * Indicates whether to include complete details of the connection objects. + */ + 'include_details'?: boolean | null; + /** + * Configuration values. If empty we are fetching configuration from datasource based on given connection id. If required you can provide config details to fetch specific details. Example input: {}, {\"warehouse\":\"SMALL_WH\",\"database\":\"DEVELOPMENT\"}. This is only applicable when data_warehouse_object_type is selected. + */ + 'configuration'?: any; + /** + * List of authentication types to fetch data_ware_house_objects from external Data warehouse. This is only applicable when data_warehouse_object_type is selected. + */ + 'authentication_type'?: SearchConnectionRequestAuthenticationTypeEnum; + /** + *
Version: 10.9.0.cl or later
Indicates whether to show resolved parameterised values. + */ + 'show_resolved_parameters'?: boolean | null; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} +type SearchConnectionRequestDataWarehouseTypesEnum = "SNOWFLAKE" | "AMAZON_REDSHIFT" | "GOOGLE_BIGQUERY" | "AZURE_SYNAPSE" | "TERADATA" | "SAP_HANA" | "STARBURST" | "ORACLE_ADW" | "DATABRICKS" | "DENODO" | "DREMIO" | "TRINO" | "PRESTO" | "POSTGRES" | "SQLSERVER" | "MYSQL" | "GENERIC_JDBC" | "AMAZON_RDS_POSTGRESQL" | "AMAZON_AURORA_POSTGRESQL" | "AMAZON_RDS_MYSQL" | "AMAZON_AURORA_MYSQL" | "LOOKER" | "AMAZON_ATHENA" | "SINGLESTORE" | "GCP_SQLSERVER" | "GCP_ALLOYDB_POSTGRESQL" | "GCP_POSTGRESQL" | "GCP_MYSQL" | "MODE" | "GOOGLE_SHEETS" | "FALCON" | "FALCON_ONPREM" | "CLICKHOUSE" | "IOMETE"; +type SearchConnectionRequestDataWarehouseObjectTypeEnum = "DATABASE" | "SCHEMA" | "TABLE" | "COLUMN"; +type SearchConnectionRequestAuthenticationTypeEnum = "SERVICE_ACCOUNT" | "OAUTH" | "IAM" | "EXTOAUTH" | "OAUTH_WITH_SERVICE_PRINCIPAL" | "PERSONAL_ACCESS_TOKEN" | "KEY_PAIR" | "OAUTH_WITH_PKCE" | "EXTOAUTH_WITH_PKCE" | "OAUTH_WITH_PEZ" | "OAUTH_CLIENT_CREDENTIALS"; + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +declare class SearchConnectionResponse { + /** + * Unique ID of the connection. + */ + 'id': string; + /** + * Name of the connection. + */ + 'name': string; + /** + * Description of the connection. + */ + 'description'?: string | null; + /** + * Type of data warehouse. + */ + 'data_warehouse_type': SearchConnectionResponseDataWarehouseTypeEnum; + 'data_warehouse_objects'?: DataWarehouseObjects; + /** + * Details of the connection. + */ + 'details'?: any | null; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} +type SearchConnectionResponseDataWarehouseTypeEnum = "SNOWFLAKE" | "AMAZON_REDSHIFT" | "GOOGLE_BIGQUERY" | "AZURE_SYNAPSE" | "TERADATA" | "SAP_HANA" | "STARBURST" | "ORACLE_ADW" | "DATABRICKS" | "DENODO" | "DREMIO" | "TRINO" | "PRESTO" | "POSTGRES" | "SQLSERVER" | "MYSQL" | "GENERIC_JDBC" | "AMAZON_RDS_POSTGRESQL" | "AMAZON_AURORA_POSTGRESQL" | "AMAZON_RDS_MYSQL" | "AMAZON_AURORA_MYSQL" | "LOOKER" | "AMAZON_ATHENA" | "SINGLESTORE" | "GCP_SQLSERVER" | "GCP_ALLOYDB_POSTGRESQL" | "GCP_POSTGRESQL" | "GCP_MYSQL" | "MODE" | "GOOGLE_SHEETS" | "FALCON" | "FALCON_ONPREM" | "CLICKHOUSE" | "IOMETE"; + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +/** +* Default Custom action configuration. This includes if the custom action is available on all visualizations. By default, a custom action is added to all visualizations and Answers. +*/ +declare class SearchCustomActionsRequestDefaultActionConfig { + /** + * Custom action is available on all visualizations. Earlier naming convention: LOCAL/GLOBAL. TRUE signifies GLOBAL for backward compatibility. + */ + 'visibility'?: boolean | null; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +declare class SearchCustomActionsRequest { + /** + * Name or ID of the custom action. + */ + 'custom_action_identifier'?: string; + /** + * A pattern to match case-insensitive name of the custom-action object. + */ + 'name_pattern'?: string; + 'default_action_config'?: SearchCustomActionsRequestDefaultActionConfig; + /** + * When set to true, returns the associated groups for a custom action. + */ + 'include_group_associations'?: boolean | null; + /** + * When set to true, returns the associated metadata for a custom action. + */ + 'include_metadata_associations'?: boolean | null; + /** + * Search with a given metadata identifier. + */ + 'metadata'?: Array; + /** + * Filter the action objects based on type + */ + 'type'?: SearchCustomActionsRequestTypeEnum; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} +type SearchCustomActionsRequestTypeEnum = "CALLBACK" | "URL"; + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +declare class SearchDataRequest { + /** + * Query string with search tokens. For example, [Sales][Region]. See [API Documentation](https://developers.thoughtspot.com/docs/fetch-data-and-report-apis#_search_data_api) + */ + 'query_string': string; + /** + * GUID of the data source object, such as a Worksheet, View, or Table. You can find the GUID of a data object from the UI or via API. See [API Documentation](https://developers.thoughtspot.com/docs/fetch-data-and-report-apis#_search_query) for more details. + */ + 'logical_table_identifier': string; + /** + * JSON output in compact or full format. The FULL option is available in 9.12.5.cl or later. + */ + 'data_format'?: SearchDataRequestDataFormatEnum; + /** + * The starting record number from where the records should be included. + */ + 'record_offset'?: number; + /** + * The number of records to include in a batch. + */ + 'record_size'?: number; + /** + * JSON object with representing filter condition to apply filters at runtime. For example, {\"col1\": \"item type\", \"op1\": \"EQ\", \"val1\": \"Bags\"} . You can add multiple keys by incrementing the number at the end, for example, col2, op2, val2, and col3, op3, val3. For more information, see [API Documentation](https://developers.thoughtspot.com/docs/fetch-data-and-report-apis#_runtime_filters). + */ + 'runtime_filter'?: any; + /** + * JSON object representing columns to sort data at runtime. For example, {\"sortCol1\": \"sales\", \"asc1\": true} . You can add multiple keys by incrementing the number at the end, for example, sortCol1, asc2. For more information, see [API Documentation](https://developers.thoughtspot.com/docs/fetch-data-and-report-apis#_runtime_sort). + */ + 'runtime_sort'?: any; + /** + * JSON object for setting values of parameters at runtime. For example, {\"param1\": \"Double List Param\", \"paramVal1\": 0.5}. You can add multiple keys by incrementing the number at the end, for example, param2, paramVal2. For more information, see [API Documentation](https://developers.thoughtspot.com/docs/fetch-data-and-report-apis#_runtime_parameters). + */ + 'runtime_param_override'?: any; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} +type SearchDataRequestDataFormatEnum = "FULL" | "COMPACT"; + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +/** +* Response format associated with the search data API. +*/ +declare class SearchDataResponse { + /** + * Data content of metadata objects + */ + 'contents': Array; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +declare class SearchEmailCustomizationRequest { + /** + * Unique ID or name of org Version: 10.12.0.cl or later + */ + 'org_identifiers'?: Array; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +/** +* Options to sort the API response by objects set as favorites for the logged-in user or the users specified in the API request. +*/ +declare class SearchMetadataRequestFavoriteObjectOptions { + /** + * Includes objects marked as favorite for the specified users. + */ + 'include'?: boolean | null; + /** + * Unique ID or name of the users. If not specified, the favorite objects of current logged in user are returned. + */ + 'user_identifiers'?: Array | null; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +/** +* Sort options to filter metadata details. +*/ +declare class SearchMetadataRequestSortOptions { + /** + * Name of the field to apply the sort on. + */ + 'field_name'?: SearchMetadataRequestSortOptionsFieldNameEnum | null; + /** + * Sort order : ASC(Ascending) or DESC(Descending). + */ + 'order'?: SearchMetadataRequestSortOptionsOrderEnum | null; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} +type SearchMetadataRequestSortOptionsFieldNameEnum = "NAME" | "DISPLAY_NAME" | "AUTHOR" | "CREATED" | "MODIFIED" | "VIEWS" | "FAVORITES" | "LAST_ACCESSED"; +type SearchMetadataRequestSortOptionsOrderEnum = "ASC" | "DESC"; + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +declare class SearchMetadataRequest { + /** + * Metadata objects such as Liveboards, Answers, and Worksheets. + */ + 'metadata'?: Array; + /** + * Object permission details to search by. + */ + 'permissions'?: Array; + /** + * GUID or name of user who created the metadata object. + */ + 'created_by_user_identifiers'?: Array; + /** + * Version of the dependent table of the metadata objects like Worksheets. + */ + 'dependent_object_version'?: SearchMetadataRequestDependentObjectVersionEnum; + /** + * List of metadata objects to exclude from search. + */ + 'exclude_objects'?: Array; + 'favorite_object_options'?: SearchMetadataRequestFavoriteObjectOptions; + /** + * Includes system-generated metadata objects. + */ + 'include_auto_created_objects'?: boolean | null; + /** + * Includes dependents of the metadata object specified in the API request. For example, a worksheet can consist of dependent objects such as Liveboards or Answers. + */ + 'include_dependent_objects'?: boolean | null; + /** + * The maximum number of dependents to include per metadata object. + */ + 'dependent_objects_record_size'?: number; + /** + * Includes complete details of the metadata objects. + */ + 'include_details'?: boolean | null; + /** + * When set to true and include_details is also true, includes personalised views in the metadata_detail for LIVEBOARD objects. + */ + 'include_personalised_views'?: boolean | null; + /** + * Includes headers of the metadata objects. + */ + 'include_headers'?: boolean | null; + /** + * Includes details of the hidden objects, such as a column in a worksheet or a table. + */ + 'include_hidden_objects'?: boolean | null; + /** + * Includes objects with incomplete metadata. + */ + 'include_incomplete_objects'?: boolean | null; + /** + * Includes visualization headers of the specified Liveboard object. + */ + 'include_visualization_headers'?: boolean | null; + /** + * If search assistance lessons are configured on a worksheet, the API returns the search assist data for Worksheet objects. + */ + 'include_worksheet_search_assist_data'?: boolean | null; + /** + * Includes ID or names of the users who modified the metadata object. + */ + 'modified_by_user_identifiers'?: Array; + /** + * The starting record number from where the records should be included. + */ + 'record_offset'?: number; + /** + * The number of records that should be included. It is recommended to use a smaller `record_size` when fetching dependent objects or any of the additional metadata detail options. + */ + 'record_size'?: number; + 'sort_options'?: SearchMetadataRequestSortOptions; + /** + * Tags to filter metadata objects by + */ + 'tag_identifiers'?: Array; + /** + * Indicates whether to include stats of the metadata objects. + */ + 'include_stats'?: boolean | null; + /** + *
Version: 10.7.0.cl or later
Boolean to indicate whether to include discoverable metadata objects. + */ + 'include_discoverable_objects'?: boolean | null; + /** + *
Version: 10.9.0.cl or later
Indicates whether to show resolved parameterised values. + */ + 'show_resolved_parameters'?: boolean | null; + /** + * Indicates the model version of Liveboard to be attached in metadata detail. + */ + 'liveboard_response_version'?: SearchMetadataRequestLiveboardResponseVersionEnum; + /** + *
Version: 10.11.0.cl or later
If only published objects should be returned + */ + 'include_only_published_objects'?: boolean | null; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} +type SearchMetadataRequestDependentObjectVersionEnum = "V1" | "V2"; +type SearchMetadataRequestLiveboardResponseVersionEnum = "V1" | "V2"; + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +declare class SearchOrgsRequest { + /** + * ID or name of the Org + */ + 'org_identifier'?: string; + /** + * Description of the Org + */ + 'description'?: string; + /** + * Visibility of the Org + */ + 'visibility'?: SearchOrgsRequestVisibilityEnum; + /** + * Status of the Org + */ + 'status'?: SearchOrgsRequestStatusEnum; + /** + * GUIDs or names of the users for which you want to retrieve the Orgs data + */ + 'user_identifiers'?: Array; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} +type SearchOrgsRequestVisibilityEnum = "SHOW" | "HIDDEN"; +type SearchOrgsRequestStatusEnum = "ACTIVE" | "IN_ACTIVE"; + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +/** +* Response for search role api should handle hidden privileges as well. +*/ +declare class SearchRoleResponse { + /** + * Unique Id of the role. + */ + 'id': string; + /** + * Name of the role + */ + 'name': string; + /** + * Description of the role + */ + 'description': string; + /** + * number of groups assigned with this role + */ + 'groups_assigned_count'?: number | null; + /** + * Orgs in which role exists. + */ + 'orgs'?: Array | null; + /** + * Details of groups assigned with this role + */ + 'groups'?: Array | null; + /** + * Privileges granted to the role. + */ + 'privileges': Array; + /** + * Permission details of the Role + */ + 'permission'?: SearchRoleResponsePermissionEnum | null; + /** + * Unique identifier of author of the role. + */ + 'author_id'?: string | null; + /** + * Unique identifier of modifier of the role. + */ + 'modifier_id'?: string | null; + /** + * Creation time of the role in milliseconds. + */ + 'creation_time_in_millis'?: any | null; + /** + * Last modified time of the role in milliseconds. + */ + 'modification_time_in_millis'?: any | null; + /** + * Indicates whether the role is deleted. + */ + 'deleted'?: boolean | null; + /** + * Indicates whether the role is deprecated. + */ + 'deprecated'?: boolean | null; + /** + * Indicates whether the role is external. + */ + 'external'?: boolean | null; + /** + * Indicates whether the role is hidden. + */ + 'hidden'?: boolean | null; + /** + * Indicates whether the role is shared via connection + */ + 'shared_via_connection'?: boolean | null; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} +type SearchRoleResponsePrivilegesEnum = "UNKNOWN" | "ADMINISTRATION" | "AUTHORING" | "USERDATAUPLOADING" | "DATADOWNLOADING" | "USERMANAGEMENT" | "SECURITYMANAGEMENT" | "LOGICALMODELING" | "DATAMANAGEMENT" | "TAGMANAGEMENT" | "SHAREWITHALL" | "SYSTEMMANAGEMENT" | "JOBSCHEDULING" | "A3ANALYSIS" | "EXPERIMENTALFEATUREPRIVILEGE" | "BYPASSRLS" | "RANALYSIS" | "DISABLE_PINBOARD_CREATION" | "DEVELOPER" | "APPLICATION_ADMINISTRATION" | "USER_ADMINISTRATION" | "GROUP_ADMINISTRATION" | "BACKUP_ADMINISTRATION" | "SYSTEM_INFO_ADMINISTRATION" | "ENABLESPOTAPPCREATION" | "SYNCMANAGEMENT" | "ORG_ADMINISTRATION" | "ROLE_ADMINISTRATION" | "AUTHENTICATION_ADMINISTRATION" | "BILLING_INFO_ADMINISTRATION" | "PREVIEW_THOUGHTSPOT_SAGE" | "LIVEBOARD_VERIFIER" | "CAN_MANAGE_CUSTOM_CALENDAR" | "CAN_CREATE_OR_EDIT_CONNECTIONS" | "CAN_CONFIGURE_CONNECTIONS" | "CAN_MANAGE_WORKSHEET_VIEWS_TABLES" | "CAN_MANAGE_VERSION_CONTROL" | "THIRDPARTY_ANALYSIS" | "CONTROL_TRUSTED_AUTH" | "CAN_CREATE_CATALOG" | "ALLOW_NON_EMBED_FULL_APP_ACCESS" | "CAN_ACCESS_ANALYST_STUDIO" | "CAN_MANAGE_ANALYST_STUDIO" | "CAN_VIEW_FOLDERS" | "CAN_MODIDY_FOLDERS" | "CAN_MANAGE_VARIABLES" | "CAN_MANAGE_AGENTSPOT" | "CAN_ACCESS_AGENTSPOT" | "PREVIEW_DOCUMENT_SEARCH" | "CAN_SETUP_VERSION_CONTROL" | "CAN_MANAGE_WEBHOOKS" | "CAN_DOWNLOAD_VISUALS" | "CAN_DOWNLOAD_DETAILED_DATA" | "CAN_USE_SPOTTER"; +type SearchRoleResponsePermissionEnum = "READ_ONLY" | "MODIFY" | "NO_ACCESS"; + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +declare class SearchRolesRequest { + /** + * unique ID or name of the Roles + */ + 'role_identifiers'?: Array; + /** + * Unique Id or name of the Organisation + */ + 'org_identifiers'?: Array; + /** + * Unique Id or name of the User Group + */ + 'group_identifiers'?: Array; + /** + * Privileges assigned to the Role. See [Documentation](https://developers.thoughtspot.com/docs/rbac#_role_categories_and_privileges)for supported roles privileges. + */ + 'privileges'?: Array; + /** + * Indicates whether the Role is deprecated. + */ + 'deprecated'?: boolean | null; + /** + * Indicates whether the Role is external + */ + 'external'?: boolean | null; + /** + * Indicates whether the Role is shared via connection + */ + 'shared_via_connection'?: boolean | null; + /** + * Permission details of the Role + */ + 'permissions'?: Array; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} +type SearchRolesRequestPrivilegesEnum = "UNKNOWN" | "ADMINISTRATION" | "AUTHORING" | "USERDATAUPLOADING" | "DATADOWNLOADING" | "USERMANAGEMENT" | "SECURITYMANAGEMENT" | "LOGICALMODELING" | "DATAMANAGEMENT" | "TAGMANAGEMENT" | "SHAREWITHALL" | "SYSTEMMANAGEMENT" | "JOBSCHEDULING" | "A3ANALYSIS" | "EXPERIMENTALFEATUREPRIVILEGE" | "BYPASSRLS" | "RANALYSIS" | "DISABLE_PINBOARD_CREATION" | "DEVELOPER" | "APPLICATION_ADMINISTRATION" | "USER_ADMINISTRATION" | "GROUP_ADMINISTRATION" | "BACKUP_ADMINISTRATION" | "SYSTEM_INFO_ADMINISTRATION" | "ENABLESPOTAPPCREATION" | "SYNCMANAGEMENT" | "ORG_ADMINISTRATION" | "ROLE_ADMINISTRATION" | "AUTHENTICATION_ADMINISTRATION" | "BILLING_INFO_ADMINISTRATION" | "PREVIEW_THOUGHTSPOT_SAGE" | "LIVEBOARD_VERIFIER" | "CAN_MANAGE_CUSTOM_CALENDAR" | "CAN_CREATE_OR_EDIT_CONNECTIONS" | "CAN_CONFIGURE_CONNECTIONS" | "CAN_MANAGE_WORKSHEET_VIEWS_TABLES" | "CAN_MANAGE_VERSION_CONTROL" | "THIRDPARTY_ANALYSIS" | "CONTROL_TRUSTED_AUTH" | "CAN_CREATE_CATALOG" | "ALLOW_NON_EMBED_FULL_APP_ACCESS" | "CAN_ACCESS_ANALYST_STUDIO" | "CAN_MANAGE_ANALYST_STUDIO" | "CAN_VIEW_FOLDERS" | "CAN_MODIDY_FOLDERS" | "CAN_MANAGE_VARIABLES" | "CAN_MANAGE_AGENTSPOT" | "CAN_ACCESS_AGENTSPOT" | "PREVIEW_DOCUMENT_SEARCH" | "CAN_SETUP_VERSION_CONTROL" | "CAN_MANAGE_WEBHOOKS" | "CAN_DOWNLOAD_VISUALS" | "CAN_DOWNLOAD_DETAILED_DATA" | "CAN_USE_SPOTTER"; +type SearchRolesRequestPermissionsEnum = "READ_ONLY" | "MODIFY" | "NO_ACCESS"; + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +/** +* Options while fetching history runs for the schedule. +*/ +declare class SearchSchedulesRequestHistoryRunsOptions { + /** + * Indicates whether to fetch history runs for the scheduled notification. + */ + 'include_history_runs'?: boolean | null; + /** + * Indicates the max number of records that can be fetched as past runs of any scheduled job. + */ + 'record_size'?: number | null; + /** + * Indicates the starting record number from where history runs records should be fetched. + */ + 'record_offset'?: number | null; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +/** +* Sort options. +*/ +declare class SearchSchedulesRequestSortOptions { + /** + * Name of the field to apply the sort on. + */ + 'field_name'?: string | null; + /** + * Sort order : ASC(Ascending) or DESC(Descending). + */ + 'order'?: string | null; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +declare class SearchSchedulesRequest { + /** + * Metadata objects associated with the scheduled jobs. + */ + 'metadata'?: Array; + /** + * The starting record number from where the records should be included. + */ + 'record_offset'?: number; + /** + * The number of records that should be included. + */ + 'record_size'?: number; + 'sort_options'?: SearchSchedulesRequestSortOptions; + 'history_runs_options'?: SearchSchedulesRequestHistoryRunsOptions; + /** + * unique ID or name of the Schedule + */ + 'schedule_identifiers'?: Array; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +declare class SearchSecuritySettingsRequest { + /** + * Scope of security settings to retrieve. CLUSTER returns cluster-level settings, ORG returns org-level settings for the current org. If not specified, returns both cluster and org settings based on user privileges. + */ + 'scope'?: SearchSecuritySettingsRequestScopeEnum; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} +type SearchSecuritySettingsRequestScopeEnum = "CLUSTER" | "ORG"; + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +declare class SearchTagsRequest { + /** + * Name or Id of the tag. + */ + 'tag_identifier'?: string; + /** + * A pattern to match case-insensitive name of the Tag object. + */ + 'name_pattern'?: string; + /** + * Color of the tag. + */ + 'color'?: string; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +/** +* Sort options to filter group details. +*/ +declare class SearchUserGroupsRequestSortOptions { + /** + * Name of the field to apply the sort on. + */ + 'field_name'?: SearchUserGroupsRequestSortOptionsFieldNameEnum | null; + /** + * Sort order : ASC(Ascending) or DESC(Descending). + */ + 'order'?: SearchUserGroupsRequestSortOptionsOrderEnum | null; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} +type SearchUserGroupsRequestSortOptionsFieldNameEnum = "NAME" | "DISPLAY_NAME" | "AUTHOR" | "CREATED" | "MODIFIED"; +type SearchUserGroupsRequestSortOptionsOrderEnum = "ASC" | "DESC"; + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +declare class SearchUserGroupsRequest { + /** + * GUID of Liveboards that are assigned as default Liveboards to the users in the group. + */ + 'default_liveboard_identifiers'?: Array; + /** + * Description of the group + */ + 'description'?: string; + /** + * Display name of the group + */ + 'display_name'?: string; + /** + * A pattern to match case-insensitive name of the Group object. + */ + 'name_pattern'?: string; + /** + * GUID or name of the group + */ + 'group_identifier'?: string; + /** + * ID or name of the Org to which the group belongs + */ + 'org_identifiers'?: Array; + /** + * Privileges assigned to the group. + */ + 'privileges'?: Array; + /** + * GUID or name of the sub groups. A subgroup is a group assigned to a parent group. + */ + 'sub_group_identifiers'?: Array; + /** + * Group type. + */ + 'type'?: SearchUserGroupsRequestTypeEnum; + /** + * GUID or name of the users assigned to the group. + */ + 'user_identifiers'?: Array; + /** + * Visibility of the group. To make a group visible to other users and groups, set the visibility to SHAREABLE. + */ + 'visibility'?: SearchUserGroupsRequestVisibilityEnum; + /** + * Filter groups with a list of Roles assigned to a group + */ + 'role_identifiers'?: Array; + /** + * The starting record number from where the records should be included. + */ + 'record_offset'?: number; + /** + * The number of records that should be included. + */ + 'record_size'?: number; + 'sort_options'?: SearchUserGroupsRequestSortOptions; + /** + *
Version: 10.10.0.cl or later
Define Parameter to consider if the users should be included in group search response. + */ + 'include_users'?: boolean | null; + /** + *
Version: 10.10.0.cl or later
Define Parameter to consider if the sub groups should be included in group search response. + */ + 'include_sub_groups'?: boolean | null; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} +type SearchUserGroupsRequestPrivilegesEnum = "ADMINISTRATION" | "AUTHORING" | "USERDATAUPLOADING" | "DATADOWNLOADING" | "USERMANAGEMENT" | "DATAMANAGEMENT" | "SHAREWITHALL" | "JOBSCHEDULING" | "A3ANALYSIS" | "EXPERIMENTALFEATUREPRIVILEGE" | "BYPASSRLS" | "RANALYSIS" | "DEVELOPER" | "USER_ADMINISTRATION" | "GROUP_ADMINISTRATION" | "SYNCMANAGEMENT" | "CAN_CREATE_CATALOG" | "DISABLE_PINBOARD_CREATION" | "LIVEBOARD_VERIFIER" | "PREVIEW_THOUGHTSPOT_SAGE" | "APPLICATION_ADMINISTRATION" | "SYSTEM_INFO_ADMINISTRATION" | "ORG_ADMINISTRATION" | "ROLE_ADMINISTRATION" | "AUTHENTICATION_ADMINISTRATION" | "BILLING_INFO_ADMINISTRATION" | "CAN_MANAGE_CUSTOM_CALENDAR" | "CAN_CREATE_OR_EDIT_CONNECTIONS" | "CAN_MANAGE_WORKSHEET_VIEWS_TABLES" | "CAN_MANAGE_VERSION_CONTROL" | "THIRDPARTY_ANALYSIS" | "ALLOW_NON_EMBED_FULL_APP_ACCESS" | "CAN_ACCESS_ANALYST_STUDIO" | "CAN_MANAGE_ANALYST_STUDIO" | "PREVIEW_DOCUMENT_SEARCH" | "CAN_MODIFY_FOLDERS" | "CAN_MANAGE_VARIABLES" | "CAN_VIEW_FOLDERS" | "CAN_MANAGE_AGENTSPOT" | "CAN_ACCESS_AGENTSPOT" | "CAN_SETUP_VERSION_CONTROL" | "CAN_MANAGE_WEBHOOKS" | "CAN_DOWNLOAD_VISUALS" | "CAN_DOWNLOAD_DETAILED_DATA" | "CAN_USE_SPOTTER"; +type SearchUserGroupsRequestTypeEnum = "LOCAL_GROUP" | "LDAP_GROUP" | "TEAM_GROUP" | "TENANT_GROUP"; +type SearchUserGroupsRequestVisibilityEnum = "SHARABLE" | "NON_SHARABLE"; + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +declare class SearchUsersRequest { + /** + * GUID / name of the user to search + */ + 'user_identifier'?: string; + /** + * A unique display name string for the user account, usually their first and last name + */ + 'display_name'?: string; + /** + * A pattern to match case-insensitive name of the User object. + */ + 'name_pattern'?: string; + /** + * Visibility of the user + */ + 'visibility'?: SearchUsersRequestVisibilityEnum; + /** + * Email of the user account + */ + 'email'?: string; + /** + * GUID or name of the group to which the user belongs + */ + 'group_identifiers'?: Array; + /** + * Privileges assigned to the user + */ + 'privileges'?: Array; + /** + * Type of the account + */ + 'account_type'?: SearchUsersRequestAccountTypeEnum; + /** + * Current status of the user account. + */ + 'account_status'?: SearchUsersRequestAccountStatusEnum; + /** + * User preference for receiving email notifications when another ThoughtSpot user shares a metadata object such as Answer, Liveboard, or Worksheet. + */ + 'notify_on_share'?: boolean | null; + /** + * The user preference for revisiting the onboarding experience + */ + 'show_onboarding_experience'?: boolean | null; + /** + * Indicates if the user has completed the onboarding walkthrough + */ + 'onboarding_experience_completed'?: boolean | null; + /** + * IDs or names of the Orgs to which the user belongs + */ + 'org_identifiers'?: Array; + /** + * Unique ID or name of the user\'s home Liveboard. + */ + 'home_liveboard_identifier'?: string; + /** + * Metadata objects which are assigned as favorites of the user. + */ + 'favorite_metadata'?: Array; + /** + * The starting record number from where the records should be included. + */ + 'record_offset'?: number; + /** + * The number of records that should be included. + */ + 'record_size'?: number; + 'sort_options'?: SearchCollectionsRequestSortOptions; + /** + * Filters by the role assigned to the user. + */ + 'role_identifiers'?: Array; + /** + * Indicates if the user\'s favorite objects should be displayed. + */ + 'include_favorite_metadata'?: boolean | null; + /** + * Indicates if the user\'s formula variable values should be included in the response. + */ + 'include_variable_values'?: boolean | null; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} +type SearchUsersRequestVisibilityEnum = "SHARABLE" | "NON_SHARABLE"; +type SearchUsersRequestPrivilegesEnum = "ADMINISTRATION" | "AUTHORING" | "USERDATAUPLOADING" | "DATADOWNLOADING" | "USERMANAGEMENT" | "DATAMANAGEMENT" | "SHAREWITHALL" | "JOBSCHEDULING" | "A3ANALYSIS" | "EXPERIMENTALFEATUREPRIVILEGE" | "BYPASSRLS" | "RANALYSIS" | "DEVELOPER" | "USER_ADMINISTRATION" | "GROUP_ADMINISTRATION" | "SYNCMANAGEMENT" | "CAN_CREATE_CATALOG" | "DISABLE_PINBOARD_CREATION" | "LIVEBOARD_VERIFIER" | "PREVIEW_THOUGHTSPOT_SAGE" | "APPLICATION_ADMINISTRATION" | "SYSTEM_INFO_ADMINISTRATION" | "ORG_ADMINISTRATION" | "ROLE_ADMINISTRATION" | "AUTHENTICATION_ADMINISTRATION" | "BILLING_INFO_ADMINISTRATION" | "CAN_MANAGE_CUSTOM_CALENDAR" | "CAN_CREATE_OR_EDIT_CONNECTIONS" | "CAN_MANAGE_WORKSHEET_VIEWS_TABLES" | "CAN_MANAGE_VERSION_CONTROL" | "THIRDPARTY_ANALYSIS" | "ALLOW_NON_EMBED_FULL_APP_ACCESS" | "CAN_ACCESS_ANALYST_STUDIO" | "CAN_MANAGE_ANALYST_STUDIO" | "PREVIEW_DOCUMENT_SEARCH" | "CAN_MODIFY_FOLDERS" | "CAN_MANAGE_VARIABLES" | "CAN_VIEW_FOLDERS" | "CAN_MANAGE_AGENTSPOT" | "CAN_ACCESS_AGENTSPOT" | "CAN_SETUP_VERSION_CONTROL" | "CAN_MANAGE_WEBHOOKS" | "CAN_DOWNLOAD_VISUALS" | "CAN_DOWNLOAD_DETAILED_DATA" | "CAN_USE_SPOTTER"; +type SearchUsersRequestAccountTypeEnum = "LOCAL_USER" | "LDAP_USER" | "SAML_USER" | "OIDC_USER" | "REMOTE_USER"; +type SearchUsersRequestAccountStatusEnum = "ACTIVE" | "INACTIVE" | "EXPIRED" | "LOCKED" | "PENDING" | "SUSPENDED"; + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +/** +* Input for filtering variable values by scope in search operations +*/ +declare class ValueScopeInput { + /** + * The unique name of the org + */ + 'org_identifier'?: string | null; + /** + * Type of principal to filter by. Use USER to filter values assigned to specific users, or USER_GROUP to filter values assigned to groups. + */ + 'principal_type'?: ValueScopeInputPrincipalTypeEnum | null; + /** + * Unique ID or name of the principal + */ + 'principal_identifier'?: string | null; + /** + * Unique ID or name of the model to filter by. Applicable only for FORMULA_VARIABLE type. + */ + 'model_identifier'?: string | null; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} +type ValueScopeInputPrincipalTypeEnum = "USER" | "USER_GROUP"; + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +/** +* Input for variable details in search +*/ +declare class VariableDetailInput { + /** + * Unique ID or name of the variable + */ + 'identifier'?: string | null; + /** + * Type of variable + */ + 'type'?: VariableDetailInputTypeEnum | null; + /** + * A pattern to match case-insensitive name of the variable. User % for a wildcard match + */ + 'name_pattern'?: string | null; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} +type VariableDetailInputTypeEnum = "CONNECTION_PROPERTY" | "TABLE_MAPPING" | "CONNECTION_PROPERTY_PER_PRINCIPAL" | "FORMULA_VARIABLE" | "USER_PROPERTY"; + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +declare class SearchVariablesRequest { + /** + * Variable details + */ + 'variable_details'?: Array; + /** + * Array of scope filters + */ + 'value_scope'?: Array; + /** + * The starting record number from where the records should be included + */ + 'record_offset'?: number; + /** + * The number of records that should be included + */ + 'record_size'?: number; + /** + * Format in which we want the output + */ + 'response_content'?: SearchVariablesRequestResponseContentEnum; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} +type SearchVariablesRequestResponseContentEnum = "METADATA" | "METADATA_AND_VALUES"; + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +/** +* Sort option includes sort field and sort order. +*/ +declare class SearchWebhookConfigurationsRequestSortOptions { + /** + * Name of the field to apply the sort on. + */ + 'field_name'?: SearchWebhookConfigurationsRequestSortOptionsFieldNameEnum | null; + /** + * Sort order: ASC (Ascending) or DESC (Descending). + */ + 'order'?: SearchWebhookConfigurationsRequestSortOptionsOrderEnum | null; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} +type SearchWebhookConfigurationsRequestSortOptionsFieldNameEnum = "CREATED" | "MODIFIED" | "NAME"; +type SearchWebhookConfigurationsRequestSortOptionsOrderEnum = "ASC" | "DESC"; + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +declare class SearchWebhookConfigurationsRequest { + /** + * Unique ID or name of the org. + */ + 'org_identifier'?: string; + /** + * Unique ID or name of the webhook. + */ + 'webhook_identifier'?: string; + /** + * Type of webhook event to filter by. + */ + 'event_type'?: SearchWebhookConfigurationsRequestEventTypeEnum; + /** + * The offset point, starting from where the webhooks should be included in the response. + */ + 'record_offset'?: number; + /** + * The number of webhooks that should be included in the response starting from offset position. + */ + 'record_size'?: number; + 'sort_options'?: SearchWebhookConfigurationsRequestSortOptions; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} +type SearchWebhookConfigurationsRequestEventTypeEnum = "LIVEBOARD_SCHEDULE"; + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +/** +* Cluster-level security preferences. +*/ +declare class SecuritySettingsClusterPreferences { + /** + * Support embedded access when third-party cookies are blocked. + */ + 'enable_partitioned_cookies'?: boolean | null; + /** + * Allowed origins for CORS. + */ + 'cors_whitelisted_urls'?: Array | null; + 'csp_settings'?: CspSettings; + /** + * Allowed redirect hosts for SAML login. + */ + 'saml_redirect_urls'?: Array | null; + 'non_embed_access'?: ClusterNonEmbedAccess; + /** + * Trusted authentication status at the cluster level. Version: 26.6.0.cl or later + */ + 'trusted_auth_status'?: SecuritySettingsClusterPreferencesTrustedAuthStatusEnum | null; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} +type SecuritySettingsClusterPreferencesTrustedAuthStatusEnum = "ENABLED" | "DISABLED"; + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +/** +* Input for cluster-level security preferences configuration. +*/ +declare class SecuritySettingsClusterPreferencesInput { + /** + * Support embedded access when third-party cookies are blocked. + */ + 'enable_partitioned_cookies'?: boolean | null; + /** + * Allowed origins for CORS. + */ + 'cors_whitelisted_urls'?: Array | null; + 'csp_settings'?: CspSettingsInput; + /** + * Allowed redirect hosts for SAML login. + */ + 'saml_redirect_urls'?: Array | null; + 'non_embed_access'?: ClusterNonEmbedAccessInput; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +/** +* Org details for security settings. +*/ +declare class SecuritySettingsOrgDetails { + /** + * Unique identifier of the org. + */ + 'id'?: number | null; + /** + * Name of the org. + */ + 'name'?: string | null; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +/** +* Org-level security preferences. +*/ +declare class SecuritySettingsOrgPreferences { + 'org'?: SecuritySettingsOrgDetails; + /** + * Allowed origins for CORS for this org. + */ + 'cors_whitelisted_urls'?: Array | null; + 'non_embed_access'?: OrgNonEmbedAccess; + /** + * Trusted authentication status for this org. Version: 26.6.0.cl or later + */ + 'trusted_auth_status'?: SecuritySettingsOrgPreferencesTrustedAuthStatusEnum | null; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} +type SecuritySettingsOrgPreferencesTrustedAuthStatusEnum = "ENABLED" | "DISABLED"; + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +/** +* Response type for security settings search. +*/ +declare class SecuritySettingsResponse { + 'cluster_preferences'?: SecuritySettingsClusterPreferences; + /** + * Org-level security preferences. + */ + 'org_preferences'?: Array | null; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +declare class SendAgentConversationMessageRequest { + /** + * messages to be sent to the agent + */ + 'messages': Array; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +declare class SendAgentConversationMessageStreamingRequest { + /** + * messages to be sent to the agent + */ + 'messages': Array; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +declare class SendAgentMessageRequest { + /** + * messages to be sent to the agent + */ + 'messages': Array; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +declare class SendAgentMessageResponse { + /** + * Indicates whether the agent response was received and processed successfully. + */ + 'success': boolean; + /** + * Optional message providing additional context about the operation outcome. + */ + 'message'?: string | null; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +declare class SendAgentMessageStreamingRequest { + /** + * Unique identifier for the conversation (used to track context) + */ + 'conversation_identifier': string; + /** + * messages to be sent to the agent + */ + 'messages': Array; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +declare class SendMessageRequest { + /** + * ID of the metadata object, such as a Worksheet or Model, to use as a data source for the conversation. + */ + 'metadata_identifier': string; + /** + * A message string with the follow-up question to continue the conversation. + */ + 'message': string; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +declare class SetNLInstructionsRequest { + /** + * Unique ID or name of the data-model for which to set NL instructions. + */ + 'data_source_identifier': string; + /** + * List of NL instructions to set for the data-model. + */ + 'nl_instructions_info': Array; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +declare class ShareMetadataTypeInput { + /** + * Type of metadata. Type of metadata. Required if the name of the object is set as the identifier. This attribute is optional when the object GUID is specified as the identifier. + */ + 'type'?: ShareMetadataTypeInputTypeEnum | null; + /** + * Unique ID or name of the metadata object. + */ + 'identifier': string; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} +type ShareMetadataTypeInputTypeEnum = "LIVEBOARD" | "ANSWER" | "LOGICAL_TABLE" | "LOGICAL_COLUMN" | "CONNECTION" | "COLLECTION"; + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +declare class SharePermissionsInput { + 'principal': PrincipalsInput; + /** + * Type of access to the shared object + */ + 'share_mode': SharePermissionsInputShareModeEnum; + /** + * Content share mode for collections. Controls access to objects within the collection. Only applicable when sharing COLLECTION metadata type. + */ + 'content_share_mode'?: SharePermissionsInputContentShareModeEnum | null; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} +type SharePermissionsInputShareModeEnum = "READ_ONLY" | "MODIFY" | "NO_ACCESS"; +type SharePermissionsInputContentShareModeEnum = "READ_ONLY" | "MODIFY"; + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +declare class ShareMetadataRequest { + /** + * Type of metadata. Required if identifier in metadata_identifies is a name. 1. Liveboard 2. Answers 3. LOGICAL_TABLE for any data object such as table, worksheet or view. 4. LOGICAL_COLUMN 5. Connection 6. Collection + */ + 'metadata_type'?: ShareMetadataRequestMetadataTypeEnum; + /** + * Unique ID or name of metadata objects. Note: All the names should belong to same metadata_type + */ + 'metadata_identifiers'?: Array; + /** + * Metadata details for sharing objects. + */ + 'metadata'?: Array; + /** + * Permission details for sharing the objects. + */ + 'permissions': Array; + /** + * Options to specify details of Liveboard. First Liveboard encountered in payload is considered to be the corresponding Liveboard. + */ + 'visualization_identifiers'?: Array; + /** + * Email IDs to which notifications will be sent. + */ + 'emails'?: Array; + /** + * Message to be included in notification. + */ + 'message': string; + /** + * Sends object URLs in the customized format in email notifications. + */ + 'enable_custom_url'?: boolean | null; + /** + * Flag to notify user when any object is shared. + */ + 'notify_on_share'?: boolean | null; + /** + * Flag to make the object discoverable. + */ + 'has_lenient_discoverability'?: boolean | null; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} +type ShareMetadataRequestMetadataTypeEnum = "LIVEBOARD" | "ANSWER" | "LOGICAL_TABLE" | "LOGICAL_COLUMN" | "CONNECTION" | "COLLECTION"; + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +declare class SingleAnswerRequest { + /** + * A natural language query string to generate the Answer. + */ + 'query': string; + /** + * ID of the metadata object, such as a Worksheet or Model, to use as a data source for the query. + */ + 'metadata_identifier': string; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +declare class SortOption { + /** + * Name of the field to apply the sort on. + */ + 'field_name'?: SortOptionFieldNameEnum | null; + /** + * Sort order : ASC(Ascending) or DESC(Descending). + */ + 'order'?: SortOptionOrderEnum | null; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} +type SortOptionFieldNameEnum = "DEFAULT" | "NAME" | "DISPLAY_NAME" | "AUTHOR" | "CREATED" | "MODIFIED"; +type SortOptionOrderEnum = "ASC" | "DESC"; + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +declare class SortOptionInput { + /** + * Name of the field to apply the sort on. + */ + 'field_name'?: SortOptionInputFieldNameEnum | null; + /** + * Sort order : ASC(Ascending) or DESC(Descending). + */ + 'order'?: SortOptionInputOrderEnum | null; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} +type SortOptionInputFieldNameEnum = "NAME" | "DISPLAY_NAME" | "AUTHOR" | "CREATED" | "MODIFIED" | "LAST_ACCESSED" | "SYNCED" | "VIEWS" | "USER_STATE" | "ROW_COUNT"; +type SortOptionInputOrderEnum = "ASC" | "DESC"; + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +/** +* Sort options. +*/ +declare class SortOptions { + /** + * Name of the field to apply the sort on. + */ + 'field_name'?: SortOptionsFieldNameEnum | null; + /** + * Sort order : ASC(Ascending) or DESC(Descending). + */ + 'order'?: SortOptionsOrderEnum | null; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} +type SortOptionsFieldNameEnum = "NAME" | "DISPLAY_NAME" | "AUTHOR" | "CREATED" | "MODIFIED"; +type SortOptionsOrderEnum = "ASC" | "DESC"; + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +/** +* Sort options. +*/ +declare class SortingOptions { + /** + * Name of the field to apply the sort on. + */ + 'field_name'?: string | null; + /** + * Sort order : ASC(Ascending) or DESC(Descending). + */ + 'order'?: string | null; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +/** +* Response format associated with fetch SQL query api +*/ +declare class SqlQuery { + /** + * Unique identifier of the metadata. + */ + 'metadata_id': string; + /** + * Name of the metadata. + */ + 'metadata_name': string; + /** + * SQL query of a metadata object. + */ + 'sql_query': string; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +declare class SqlQueryResponse { + /** + * Unique identifier of the metadata. + */ + 'metadata_id': string; + /** + * Name of the metadata. + */ + 'metadata_name': string; + /** + * Type of the metadata. + */ + 'metadata_type': SqlQueryResponseMetadataTypeEnum; + /** + * SQL query details of metadata objects. + */ + 'sql_queries': Array; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} +type SqlQueryResponseMetadataTypeEnum = "LIVEBOARD" | "ANSWER" | "LOGICAL_TABLE" | "LOGICAL_COLUMN" | "CONNECTION" | "TAG" | "USER" | "USER_GROUP" | "LOGICAL_RELATIONSHIP"; + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +/** +* Storage configuration containing provider-specific settings. +*/ +declare class StorageConfig { + 'aws_s3_config'?: AwsS3Config; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +/** +* Storage destination configuration for webhook payload delivery. +*/ +declare class StorageDestination { + /** + * Type of storage destination (e.g., AWS_S3). + */ + 'storage_type': StorageDestinationStorageTypeEnum; + 'storage_config': StorageConfig; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} +type StorageDestinationStorageTypeEnum = "AWS_S3"; + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +/** +* Input type for storage destination configuration. +*/ +declare class StorageDestinationInput { + /** + * Type of storage destination. Example: \"AWS_S3\" + */ + 'storage_type': StorageDestinationInputStorageTypeEnum; + 'storage_config': StorageConfigInput; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} +type StorageDestinationInputStorageTypeEnum = "AWS_S3"; + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +declare class SyncMetadataRequest { + /** + * Array of tables to sync. Each element can be: - String: Table identifier (GUID or name) to sync all columns for that table. - Object: {tableId: [columnIds]} to sync specific columns. If not provided, syncs all tables in the connection. + */ + 'tables'?: any; + /** + * List of sync_attributes to sync from CDW. The default value is DESCRIPTION. + */ + 'sync_attributes'?: Array; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} +type SyncMetadataRequestSyncAttributesEnum = "DESCRIPTION"; + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +/** +* Response from sync metadata operation. +*/ +declare class SyncMetadataResponse { + /** + * Overall status of the sync operation. + */ + 'status'?: SyncMetadataResponseStatusEnum | null; + /** + * Number of tables with metadata updates. + */ + 'tables_updated'?: number | null; + /** + * Number of columns with metadata updates. + */ + 'columns_updated'?: number | null; + /** + * Number of tables that failed to sync (for PARTIAL_SUCCESS). + */ + 'tables_failed'?: number | null; + /** + * Number of columns that failed to sync (for PARTIAL_SUCCESS). + */ + 'columns_failed'?: number | null; + /** + * Message describing the result. + */ + 'message'?: string | null; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} +type SyncMetadataResponseStatusEnum = "SUCCESS" | "PARTIAL_SUCCESS" | "NO_UPDATE"; + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +declare class SystemConfig { + 'onboarding_content_url'?: string | null; + 'saml_enabled'?: boolean | null; + 'okta_enabled'?: boolean | null; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +declare class SystemInfo { + /** + * The unique identifier of the object + */ + 'id'?: string | null; + /** + * Name of the cluster. + */ + 'name'?: string | null; + /** + * The release version of the cluster. + */ + 'release_version'?: string | null; + /** + * The timezone of the cluster. + */ + 'time_zone'?: string | null; + /** + * The default locale of the cluster. + */ + 'locale'?: string | null; + /** + * The default date format representation of the cluster. + */ + 'date_format'?: string | null; + /** + * The API version of the cluster. + */ + 'api_version'?: string | null; + /** + * The deployment type of the cluster. + */ + 'type'?: string | null; + /** + * The deployed environment of the cluster. + */ + 'environment'?: string | null; + /** + * The license applied to the cluster. + */ + 'license'?: string | null; + /** + * The default date time format representation of the cluster. + */ + 'date_time_format'?: string | null; + /** + * The default time format representation of the cluster. + */ + 'time_format'?: string | null; + /** + * The unique identifier of system user. + */ + 'system_user_id'?: string | null; + /** + * The unique identifier of super user. + */ + 'super_user_id'?: string | null; + /** + * The unique identifier of hidden object. + */ + 'hidden_object_id'?: string | null; + /** + * The unique identifier of system group. + */ + 'system_group_id'?: string | null; + /** + * The unique identifier of tsadmin user. + */ + 'tsadmin_user_id'?: string | null; + /** + * The unique identifier of admin group. + */ + 'admin_group_id'?: string | null; + /** + * The unique identifier of all tables connection. + */ + 'all_tables_connection_id'?: string | null; + /** + * The unique identifier of ALL group. + */ + 'all_user_group_id'?: string | null; + /** + * The supported accept language by the cluster. + */ + 'accept_language'?: string | null; + /** + * The count of users of ALL group. + */ + 'all_user_group_member_user_count'?: number | null; + /** + * The version number of logical model of the cluster. + */ + 'logical_model_version'?: number | null; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +declare class SystemOverrideInfo { + 'config_override_info'?: any | null; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +declare class Tag { + 'name': string; + 'id': string; + 'color'?: string | null; + 'deleted'?: boolean | null; + 'hidden'?: boolean | null; + 'external'?: boolean | null; + 'deprecated'?: boolean | null; + 'creation_time_in_millis'?: number | null; + 'modification_time_in_millis'?: number | null; + 'author_id'?: string | null; + 'modifier_id'?: string | null; + 'owner_id'?: string | null; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +/** +* Email customization configuration properties +*/ +declare class TemplatePropertiesInputCreate { + /** + * Background color for call-to-action button in hex format + */ + 'cta_button_bg_color'?: string | null; + /** + * Text color for call-to-action button in hex format + */ + 'cta_text_font_color'?: string | null; + /** + * Primary background color in hex format + */ + 'primary_bg_color'?: string | null; + /** + * Home page URL (HTTP/HTTPS only) + */ + 'home_url'?: string | null; + /** + * Logo image URL (HTTP/HTTPS only) + */ + 'logo_url'?: string | null; + /** + * Font family for email content (e.g., Arial, sans-serif) + */ + 'font_family'?: string | null; + /** + * Product name to display + */ + 'product_name'?: string | null; + /** + * Footer address text + */ + 'footer_address'?: string | null; + /** + * Footer phone number + */ + 'footer_phone'?: string | null; + /** + * Replacement value for Liveboard + */ + 'replacement_value_for_liveboard'?: string | null; + /** + * Replacement value for Answer + */ + 'replacement_value_for_answer'?: string | null; + /** + * Replacement value for SpotIQ + */ + 'replacement_value_for_spot_iq'?: string | null; + /** + * Whether to hide footer address + */ + 'hide_footer_address'?: boolean | null; + /** + * Whether to hide footer phone number + */ + 'hide_footer_phone'?: boolean | null; + /** + * Whether to hide manage notification link + */ + 'hide_manage_notification'?: boolean | null; + /** + * Whether to hide mobile app nudge + */ + 'hide_mobile_app_nudge'?: boolean | null; + /** + * Whether to hide privacy policy link + */ + 'hide_privacy_policy'?: boolean | null; + /** + * Whether to hide product name + */ + 'hide_product_name'?: boolean | null; + /** + * Whether to hide ThoughtSpot vocabulary definitions + */ + 'hide_ts_vocabulary_definitions'?: boolean | null; + /** + * Whether to hide notification status + */ + 'hide_notification_status'?: boolean | null; + /** + * Whether to hide error message + */ + 'hide_error_message'?: boolean | null; + /** + * Whether to hide unsubscribe link + */ + 'hide_unsubscribe_link'?: boolean | null; + /** + * Whether to hide modify alert + */ + 'hide_modify_alert'?: boolean | null; + /** + * Company privacy policy URL (HTTP/HTTPS only) + */ + 'company_privacy_policy_url'?: string | null; + /** + * Company website URL (HTTP/HTTPS only) + */ + 'company_website_url'?: string | null; + /** + * Contact support url (HTTP/HTTPS only). Version: 26.2.0.cl or later + */ + 'contact_support_url'?: string | null; + /** + * Whether to hide contact support url. Version: 26.2.0.cl or later + */ + 'hide_contact_support_url'?: boolean | null; + /** + * Whether to hide logo Version: 26.4.0.cl or later + */ + 'hide_logo_url'?: boolean | null; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +declare class Token { + /** + * Bearer auth token. + */ + 'token': string; + /** + * Token creation time in milliseconds. + */ + 'creation_time_in_millis': number; + /** + * Token expiration time in milliseconds. + */ + 'expiration_time_in_millis': number; + 'scope': Scope; + /** + * Username to whom the token is issued. + */ + 'valid_for_user_id': string; + /** + * Unique identifier of the user to whom the token is issued. + */ + 'valid_for_username': string; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +declare class TokenValidationResponse { + /** + * Token creation time in milliseconds. + */ + 'creation_time_in_millis': number; + /** + * Token expiration time in milliseconds. + */ + 'expiration_time_in_millis': number; + 'scope': Scope; + /** + * Username to whom the token is issued. + */ + 'valid_for_user_id': string; + /** + * Type of token. + */ + 'token_type': string; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +declare class UnassignTagRequest { + /** + * Metadata objects. + */ + 'metadata': Array; + /** + * GUID or name of the tag. + */ + 'tag_identifiers': Array; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +declare class UnparameterizeMetadataRequest { + /** + * Type of metadata object to unparameterize. + */ + 'metadata_type'?: UnparameterizeMetadataRequestMetadataTypeEnum; + /** + * Unique ID or name of the metadata object to unparameterize. + */ + 'metadata_identifier': string; + /** + * Type of field in the metadata to unparameterize. + */ + 'field_type': UnparameterizeMetadataRequestFieldTypeEnum; + /** + * Name of the field which needs to be unparameterized. + */ + 'field_name': string; + /** + * The value to use in place of the variable for the field + */ + 'value': string; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} +type UnparameterizeMetadataRequestMetadataTypeEnum = "LOGICAL_TABLE" | "CONNECTION" | "CONNECTION_CONFIG"; +type UnparameterizeMetadataRequestFieldTypeEnum = "ATTRIBUTE" | "CONNECTION_PROPERTY"; + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +declare class UnpublishMetadataRequest { + /** + * Force unpublishes the object. This will break all the dependent objects in the unpublished orgs. + */ + 'force'?: boolean | null; + /** + * Should we unpublish all the dependencies for the objects specified. The dependencies will be unpublished if no other published object is using it. + */ + 'include_dependencies': boolean; + /** + * Metadata objects. + */ + 'metadata': Array; + /** + * Unique ID or name of orgs. + */ + 'org_identifiers': Array; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +/** +* Table reference containing connection identifier and table details in this format: `{\"connection_identifier\":\"conn1\", \"database_name\":\"db1\", \"schema_name\":\"sc1\", \"table_name\":\"tb1\"}`. +*/ +declare class UpdateCalendarRequestTableReference { + /** + * Unique ID or name of the connection. + */ + 'connection_identifier': string; + /** + * Name of the database. + */ + 'database_name'?: string | null; + /** + * Name of the schema. + */ + 'schema_name'?: string | null; + /** + * Name of the table. Table names may be case-sensitive depending on the database system. + */ + 'table_name': string; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +declare class UpdateCalendarRequest { + /** + * Type of update operation. + */ + 'update_method'?: UpdateCalendarRequestUpdateMethodEnum; + 'table_reference': UpdateCalendarRequestTableReference; + /** + * Start date for the calendar in `MM/dd/yyyy` format. This parameter is mandatory if `update_method` is set as `FROM_INPUT_PARAMS`. + */ + 'start_date'?: string; + /** + * End date for the calendar in `MM/dd/yyyy` format. This parameter is mandatory if `update_method` is set as `FROM_INPUT_PARAMS`. + */ + 'end_date'?: string; + /** + * Type of the calendar. + */ + 'calendar_type'?: UpdateCalendarRequestCalendarTypeEnum; + /** + * Specify the month in which the fiscal or custom calendar year should start. For example, if you set `month_offset` to \"April\", the custom calendar will treat \"April\" as the first month of the year, and the related attributes such as quarters and start date will be based on this offset. The default value is `January`, which represents the standard calendar year (January to December). + */ + 'month_offset'?: UpdateCalendarRequestMonthOffsetEnum; + /** + * Specify the starting day of the week + */ + 'start_day_of_week'?: UpdateCalendarRequestStartDayOfWeekEnum; + /** + * Prefix to add before the quarter. + */ + 'quarter_name_prefix'?: string; + /** + * Prefix to add before the year. + */ + 'year_name_prefix'?: string; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} +type UpdateCalendarRequestUpdateMethodEnum = "FROM_INPUT_PARAMS" | "FROM_EXISTING_TABLE"; +type UpdateCalendarRequestCalendarTypeEnum = "MONTH_OFFSET" | "FOUR_FOUR_FIVE" | "FOUR_FIVE_FOUR" | "FIVE_FOUR_FOUR"; +type UpdateCalendarRequestMonthOffsetEnum = "January" | "February" | "March" | "April" | "May" | "June" | "July" | "August" | "September" | "October" | "November" | "December"; +type UpdateCalendarRequestStartDayOfWeekEnum = "Sunday" | "Monday" | "Tuesday" | "Wednesday" | "Thursday" | "Friday" | "Saturday"; + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +declare class UpdateCollectionRequest { + /** + * Name of the collection. + */ + 'name'?: string; + /** + * Description of the collection. + */ + 'description'?: string; + /** + * Metadata objects to add, remove, or replace in the collection. + */ + 'metadata'?: Array; + /** + * Type of update operation. Default operation type is REPLACE. + */ + 'operation'?: UpdateCollectionRequestOperationEnum; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} +type UpdateCollectionRequestOperationEnum = "ADD" | "REMOVE" | "REPLACE"; + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +declare class UpdateColumnSecurityRulesRequest { + /** + * GUID or name of the table for which we want to create column security rules + */ + 'identifier'?: string; + /** + * The object ID of the table + */ + 'obj_identifier'?: string; + /** + * If true, then all the secured columns will be marked as unprotected, and all the group associations will be removed + */ + 'clear_csr'?: boolean | null; + /** + * Array where each object defines the security rule for a specific column + */ + 'column_security_rules': Array; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +declare class UpdateConfigRequest { + /** + * Username to authenticate connection to version control system + */ + 'username'?: string; + /** + * Access token corresponding to the user to authenticate connection to version control system + */ + 'access_token'?: string; + /** + * Applicable when Orgs is enabled in the cluster List of Org ids or name. Provide value -1 for cluster level. Example : [\"OrgID1-or-Name1\", \"OrgID2-or-Name2\"] Note: If no value is specified, then the configurations will be returned for all orgs the user has access to Version: 9.5.0.cl or later + */ + 'org_identifier'?: string; + /** + * List the remote branches to configure. Example:[development, production] + */ + 'branch_names'?: Array; + /** + * Name of the remote branch where objects from this Thoughtspot instance will be versioned. Version: 9.7.0.cl or later + */ + 'commit_branch_name'?: string; + /** + * Maintain mapping of guid for the deployment to an instance Version: 9.4.0.cl or later + */ + 'enable_guid_mapping'?: boolean | null; + /** + * Name of the branch where the configuration files related to operations between Thoughtspot and version control repo should be maintained. Version: 9.7.0.cl or later + */ + 'configuration_branch_name'?: string; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +declare class UpdateConnectionConfigurationRequest { + /** + * Unique ID or name of the connection. + */ + 'connection_identifier': string; + /** + * Name of the configuration to update. + */ + 'name'?: string; + /** + * Description of the configuration. + */ + 'description'?: string; + /** + * Specifies whether the connection configuration should inherit all properties and authentication type from its parent connection. This attribute is only applicable to parameterized connections. When set to true, the configuration uses only the connection properties and authentication type inherited from the parent. Version: 26.2.0.cl or later + */ + 'same_as_parent'?: boolean | null; + 'policy_process_options'?: CreateConnectionConfigurationRequestPolicyProcessOptions; + /** + * Type of authentication. + */ + 'authentication_type'?: UpdateConnectionConfigurationRequestAuthenticationTypeEnum; + /** + * Configuration properties in JSON. + */ + 'configuration'?: any; + /** + * Type of policy. + */ + 'policy_type'?: UpdateConnectionConfigurationRequestPolicyTypeEnum; + /** + * Unique ID or name of the User and User Groups. + */ + 'policy_principals'?: Array; + /** + * Action that the query performed on the data warehouse, such as SAGE_INDEXING and ROW_COUNT_STATS. + */ + 'policy_processes'?: Array; + /** + * Indicates whether the configuration enable/disable. + */ + 'disable'?: boolean | null; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} +type UpdateConnectionConfigurationRequestAuthenticationTypeEnum = "SERVICE_ACCOUNT" | "OAUTH" | "OAUTH_WITH_SERVICE_PRINCIPAL" | "EXTOAUTH" | "KEY_PAIR" | "EXTOAUTH_WITH_PKCE" | "OAUTH_WITH_PKCE" | "PERSONAL_ACCESS_TOKEN" | "OAUTH_CLIENT_CREDENTIALS"; +type UpdateConnectionConfigurationRequestPolicyTypeEnum = "NO_POLICY" | "PRINCIPALS" | "PROCESSES"; +type UpdateConnectionConfigurationRequestPolicyProcessesEnum = "SAGE_INDEXING" | "ROW_COUNT_STATS"; + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +declare class UpdateConnectionRequest { + /** + * Unique ID or name of the connection. + */ + 'connection_identifier': string; + /** + * Updated name of the connection. + */ + 'name'?: string; + /** + * Updated description of the connection. + */ + 'description'?: string; + /** + * Configuration of the data warehouse in JSON. + */ + 'data_warehouse_config'?: any; + /** + * Indicates whether to validate the connection details. + */ + 'validate'?: boolean | null; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +declare class UpdateConnectionStatusRequest { + /** + * Status to set for the connection. Use ACTIVATED to enable the connection or DEACTIVATED to disable it. + */ + 'status'?: UpdateConnectionStatusRequestStatusEnum; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} +type UpdateConnectionStatusRequestStatusEnum = "ACTIVATED" | "DEACTIVATED"; + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +declare class UpdateConnectionV2Request { + /** + * Updated name of the connection. + */ + 'name'?: string; + /** + * Updated description of the connection. + */ + 'description'?: string; + /** + * Configuration of the data warehouse in JSON. + */ + 'data_warehouse_config'?: any; + /** + * Indicates whether to validate the connection details. + */ + 'validate'?: boolean | null; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +/** +* Action details includes `Type` and Configuration for Custom Actions, either Callback or URL is required. +*/ +declare class UpdateCustomActionRequestActionDetails { + 'CALLBACK'?: CALLBACKInput; + 'URL'?: URLInput; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +/** +* Default Custom action configuration. This includes if the custom action available on visualizations and Answers. By default, a custom action is added to all visualizations and Answers. +*/ +declare class UpdateCustomActionRequestDefaultActionConfig { + /** + * Custom action is available on all visualizations. Earlier naming convention: LOCAL/GLOBAL. TRUE signifies GLOBAL for backward compatibility. + */ + 'visibility'?: boolean | null; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +declare class UpdateCustomActionRequest { + 'action_details'?: UpdateCustomActionRequestActionDetails; + /** + * Metadata objects to which the custom action needs to be associated. + */ + 'associate_metadata'?: Array; + 'default_action_config'?: UpdateCustomActionRequestDefaultActionConfig; + /** + * Unique ID or name of the groups that can view and access the custom action. + */ + 'group_identifiers'?: Array; + /** + * Name of the custom action. The custom action name must be unique. + */ + 'name'?: string; + /** + * Type of update operation. Default operation type is ADD + */ + 'operation'?: UpdateCustomActionRequestOperationEnum; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} +type UpdateCustomActionRequestOperationEnum = "ADD" | "REMOVE"; + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +declare class UpdateEmailCustomizationRequest { + 'template_properties': CreateEmailCustomizationRequestTemplateProperties; + /** + * Unique ID or name of org + */ + 'org_identifier'?: string; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +declare class UpdateMetadataHeaderRequest { + /** + * List of header objects to update. + */ + 'headers_update': Array; + /** + * Unique ID or name of the organization. + */ + 'org_identifier'?: string; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +/** +* Input for updating object ID of a metadata object. +*/ +declare class UpdateObjIdInput { + /** + * GUID or name of the metadata object. + */ + 'metadata_identifier'?: string | null; + /** + * Type of metadata. Required if metadata_identifier is name of the object. + */ + 'type'?: UpdateObjIdInputTypeEnum | null; + /** + * Current object ID value. + */ + 'current_obj_id'?: string | null; + /** + * New object ID value to set. + */ + 'new_obj_id': string; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} +type UpdateObjIdInputTypeEnum = "ANSWER" | "LOGICAL_TABLE" | "LOGICAL_COLUMN" | "LIVEBOARD" | "ACTION_OBJECT" | "DATA_SOURCE" | "USER" | "USER_GROUP"; + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +declare class UpdateMetadataObjIdRequest { + /** + * List of metadata objects to update their object IDs. + */ + 'metadata': Array; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +declare class UpdateOrgRequest { + /** + * Name of the Org + */ + 'name'?: string; + /** + * Description of the Org + */ + 'description'?: string; + /** + * Add Users to an Org + */ + 'user_identifiers'?: Array; + /** + * Add Default Groups to an Org + */ + 'group_identifiers'?: Array; + /** + * Type of update operation. Default operation type is ADD + */ + 'operation'?: UpdateOrgRequestOperationEnum; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} +type UpdateOrgRequestOperationEnum = "ADD" | "REMOVE" | "REPLACE"; + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +declare class UpdateRoleRequest { + /** + * Name of the Role. + */ + 'name': string; + /** + * Description of the Role. + */ + 'description'?: string; + /** + * Privileges granted to the role. See [Documentation](https://developers.thoughtspot.com/docs/rbac#_role_categories_and_privileges)for supported roles privileges. + */ + 'privileges'?: Array; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} +type UpdateRoleRequestPrivilegesEnum = "USERDATAUPLOADING" | "DATADOWNLOADING" | "DATAMANAGEMENT" | "SHAREWITHALL" | "JOBSCHEDULING" | "A3ANALYSIS" | "BYPASSRLS" | "DISABLE_PINBOARD_CREATION" | "DEVELOPER" | "APPLICATION_ADMINISTRATION" | "USER_ADMINISTRATION" | "GROUP_ADMINISTRATION" | "SYSTEM_INFO_ADMINISTRATION" | "SYNCMANAGEMENT" | "ORG_ADMINISTRATION" | "ROLE_ADMINISTRATION" | "AUTHENTICATION_ADMINISTRATION" | "BILLING_INFO_ADMINISTRATION" | "CONTROL_TRUSTED_AUTH" | "TAGMANAGEMENT" | "LIVEBOARD_VERIFIER" | "CAN_MANAGE_CUSTOM_CALENDAR" | "CAN_CREATE_OR_EDIT_CONNECTIONS" | "CAN_MANAGE_WORKSHEET_VIEWS_TABLES" | "CAN_MANAGE_VERSION_CONTROL" | "THIRDPARTY_ANALYSIS" | "CAN_CREATE_CATALOG" | "CAN_ACCESS_ANALYST_STUDIO" | "CAN_MANAGE_ANALYST_STUDIO" | "CAN_MODIFY_FOLDERS" | "CAN_MANAGE_VARIABLES" | "CAN_VIEW_FOLDERS" | "CAN_MANAGE_AGENTSPOT" | "CAN_ACCESS_AGENTSPOT" | "PREVIEW_DOCUMENT_SEARCH" | "PREVIEW_THOUGHTSPOT_SAGE" | "CAN_MANAGE_WEBHOOKS" | "CAN_DOWNLOAD_VISUALS" | "CAN_DOWNLOAD_DETAILED_DATA" | "CAN_USE_SPOTTER"; + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +/** +* Frequency of the scheduled job run. +*/ +declare class UpdateScheduleRequestFrequency { + 'cron_expression': CronExpressionInput; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +/** +* Options to specify the details of a Liveboard. +*/ +declare class UpdateScheduleRequestLiveboardOptions { + /** + * Unique ID or name of visualizations. + */ + 'visualization_identifiers': Array; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +/** +* Options for PDF export. +*/ +declare class UpdateScheduleRequestPdfOptions { + /** + * Indicates whether to include complete Liveboard. + */ + 'complete_liveboard'?: boolean | null; + /** + * Indicates whether to include cover page with the Liveboard title. + */ + 'include_cover_page'?: boolean | null; + /** + * Indicates whether to include customized wide logo in the footer if available. + */ + 'include_custom_logo'?: boolean | null; + /** + * Indicates whether to include a page with all applied filters. + */ + 'include_filter_page'?: boolean | null; + /** + * Indicates whether to include page number in the footer of each page + */ + 'include_page_number'?: boolean | null; + /** + * Text to include in the footer of each page. + */ + 'page_footer_text'?: string | null; + /** + * Page orientation of the PDF. + */ + 'page_orientation'?: string | null; + /** + * Page size. + */ + 'page_size'?: UpdateScheduleRequestPdfOptionsPageSizeEnum | null; + /** + * Indicates whether to include only first page of the tables. + */ + 'truncate_table'?: boolean | null; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} +type UpdateScheduleRequestPdfOptionsPageSizeEnum = "A4" | "TAB_BASED"; + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +/** +* Recipients of the scheduled job notifications. You can add the ID or name of the ThoughtSpot users or groups as recipients in the `principals` array. If a recipient is not a ThoughtSpot user, specify email address. +*/ +declare class UpdateScheduleRequestRecipientDetails { + /** + * Emails of the recipients. + */ + 'emails'?: Array | null; + /** + * User or groups to be set as recipients of the schedule notifications. + */ + 'principals'?: Array | null; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +declare class UpdateScheduleRequest { + /** + * Name of the scheduled job. + */ + 'name'?: string; + /** + * Description of the scheduled job. + */ + 'description'?: string; + /** + * Type of metadata object. + */ + 'metadata_type'?: UpdateScheduleRequestMetadataTypeEnum; + /** + * Unique ID or name of the metadata object. + */ + 'metadata_identifier'?: string; + /** + * Export file format. + */ + 'file_format'?: UpdateScheduleRequestFileFormatEnum; + 'liveboard_options'?: UpdateScheduleRequestLiveboardOptions; + 'pdf_options'?: UpdateScheduleRequestPdfOptions; + /** + * Time zone + */ + 'time_zone'?: UpdateScheduleRequestTimeZoneEnum; + 'frequency'?: UpdateScheduleRequestFrequency; + 'recipient_details'?: UpdateScheduleRequestRecipientDetails; + /** + * Status of the schedule + */ + 'status'?: UpdateScheduleRequestStatusEnum; + /** + * Personalised view id of the liveboard to be scheduled. + */ + 'personalised_view_id'?: string; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} +type UpdateScheduleRequestMetadataTypeEnum = "LIVEBOARD"; +type UpdateScheduleRequestFileFormatEnum = "CSV" | "PDF" | "XLSX"; +type UpdateScheduleRequestTimeZoneEnum = "Africa/Abidjan" | "Africa/Accra" | "Africa/Addis_Ababa" | "Africa/Algiers" | "Africa/Asmara" | "Africa/Asmera" | "Africa/Bamako" | "Africa/Bangui" | "Africa/Banjul" | "Africa/Bissau" | "Africa/Blantyre" | "Africa/Brazzaville" | "Africa/Bujumbura" | "Africa/Cairo" | "Africa/Casablanca" | "Africa/Ceuta" | "Africa/Conakry" | "Africa/Dakar" | "Africa/Dar_es_Salaam" | "Africa/Djibouti" | "Africa/Douala" | "Africa/El_Aaiun" | "Africa/Freetown" | "Africa/Gaborone" | "Africa/Harare" | "Africa/Johannesburg" | "Africa/Juba" | "Africa/Kampala" | "Africa/Khartoum" | "Africa/Kigali" | "Africa/Kinshasa" | "Africa/Lagos" | "Africa/Libreville" | "Africa/Lome" | "Africa/Luanda" | "Africa/Lubumbashi" | "Africa/Lusaka" | "Africa/Malabo" | "Africa/Maputo" | "Africa/Maseru" | "Africa/Mbabane" | "Africa/Mogadishu" | "Africa/Monrovia" | "Africa/Nairobi" | "Africa/Ndjamena" | "Africa/Niamey" | "Africa/Nouakchott" | "Africa/Ouagadougou" | "Africa/Porto-Novo" | "Africa/Sao_Tome" | "Africa/Timbuktu" | "Africa/Tripoli" | "Africa/Tunis" | "Africa/Windhoek" | "America/Adak" | "America/Anchorage" | "America/Anguilla" | "America/Antigua" | "America/Araguaina" | "America/Argentina/Buenos_Aires" | "America/Argentina/Catamarca" | "America/Argentina/ComodRivadavia" | "America/Argentina/Cordoba" | "America/Argentina/Jujuy" | "America/Argentina/La_Rioja" | "America/Argentina/Mendoza" | "America/Argentina/Rio_Gallegos" | "America/Argentina/Salta" | "America/Argentina/San_Juan" | "America/Argentina/San_Luis" | "America/Argentina/Tucuman" | "America/Argentina/Ushuaia" | "America/Aruba" | "America/Asuncion" | "America/Atikokan" | "America/Atka" | "America/Bahia" | "America/Bahia_Banderas" | "America/Barbados" | "America/Belem" | "America/Belize" | "America/Blanc-Sablon" | "America/Boa_Vista" | "America/Bogota" | "America/Boise" | "America/Buenos_Aires" | "America/Cambridge_Bay" | "America/Campo_Grande" | "America/Cancun" | "America/Caracas" | "America/Catamarca" | "America/Cayenne" | "America/Cayman" | "America/Chicago" | "America/Chihuahua" | "America/Coral_Harbour" | "America/Cordoba" | "America/Costa_Rica" | "America/Creston" | "America/Cuiaba" | "America/Curacao" | "America/Danmarkshavn" | "America/Dawson" | "America/Dawson_Creek" | "America/Denver" | "America/Detroit" | "America/Dominica" | "America/Edmonton" | "America/Eirunepe" | "America/El_Salvador" | "America/Ensenada" | "America/Fort_Nelson" | "America/Fort_Wayne" | "America/Fortaleza" | "America/Glace_Bay" | "America/Godthab" | "America/Goose_Bay" | "America/Grand_Turk" | "America/Grenada" | "America/Guadeloupe" | "America/Guatemala" | "America/Guayaquil" | "America/Guyana" | "America/Halifax" | "America/Havana" | "America/Hermosillo" | "America/Indiana/Indianapolis" | "America/Indiana/Knox" | "America/Indiana/Marengo" | "America/Indiana/Petersburg" | "America/Indiana/Tell_City" | "America/Indiana/Vevay" | "America/Indiana/Vincennes" | "America/Indiana/Winamac" | "America/Indianapolis" | "America/Inuvik" | "America/Iqaluit" | "America/Jamaica" | "America/Jujuy" | "America/Juneau" | "America/Kentucky/Louisville" | "America/Kentucky/Monticello" | "America/Knox_IN" | "America/Kralendijk" | "America/La_Paz" | "America/Lima" | "America/Los_Angeles" | "America/Louisville" | "America/Lower_Princes" | "America/Maceio" | "America/Managua" | "America/Manaus" | "America/Marigot" | "America/Martinique" | "America/Matamoros" | "America/Mazatlan" | "America/Mendoza" | "America/Menominee" | "America/Merida" | "America/Metlakatla" | "America/Mexico_City" | "America/Miquelon" | "America/Moncton" | "America/Monterrey" | "America/Montevideo" | "America/Montreal" | "America/Montserrat" | "America/Nassau" | "America/New_York" | "America/Nipigon" | "America/Nome" | "America/Noronha" | "America/North_Dakota/Beulah" | "America/North_Dakota/Center" | "America/North_Dakota/New_Salem" | "America/Nuuk" | "America/Ojinaga" | "America/Panama" | "America/Pangnirtung" | "America/Paramaribo" | "America/Phoenix" | "America/Port-au-Prince" | "America/Port_of_Spain" | "America/Porto_Acre" | "America/Porto_Velho" | "America/Puerto_Rico" | "America/Punta_Arenas" | "America/Rainy_River" | "America/Rankin_Inlet" | "America/Recife" | "America/Regina" | "America/Resolute" | "America/Rio_Branco" | "America/Rosario" | "America/Santa_Isabel" | "America/Santarem" | "America/Santiago" | "America/Santo_Domingo" | "America/Sao_Paulo" | "America/Scoresbysund" | "America/Shiprock" | "America/Sitka" | "America/St_Barthelemy" | "America/St_Johns" | "America/St_Kitts" | "America/St_Lucia" | "America/St_Thomas" | "America/St_Vincent" | "America/Swift_Current" | "America/Tegucigalpa" | "America/Thule" | "America/Thunder_Bay" | "America/Tijuana" | "America/Toronto" | "America/Tortola" | "America/Vancouver" | "America/Virgin" | "America/Whitehorse" | "America/Winnipeg" | "America/Yakutat" | "America/Yellowknife" | "Antarctica/Casey" | "Antarctica/Davis" | "Antarctica/DumontDUrville" | "Antarctica/Macquarie" | "Antarctica/Mawson" | "Antarctica/McMurdo" | "Antarctica/Palmer" | "Antarctica/Rothera" | "Antarctica/South_Pole" | "Antarctica/Syowa" | "Antarctica/Troll" | "Antarctica/Vostok" | "Arctic/Longyearbyen" | "Asia/Aden" | "Asia/Almaty" | "Asia/Amman" | "Asia/Anadyr" | "Asia/Aqtau" | "Asia/Aqtobe" | "Asia/Ashgabat" | "Asia/Ashkhabad" | "Asia/Atyrau" | "Asia/Baghdad" | "Asia/Bahrain" | "Asia/Baku" | "Asia/Bangkok" | "Asia/Barnaul" | "Asia/Beirut" | "Asia/Bishkek" | "Asia/Brunei" | "Asia/Calcutta" | "Asia/Chita" | "Asia/Choibalsan" | "Asia/Chongqing" | "Asia/Chungking" | "Asia/Colombo" | "Asia/Dacca" | "Asia/Damascus" | "Asia/Dhaka" | "Asia/Dili" | "Asia/Dubai" | "Asia/Dushanbe" | "Asia/Famagusta" | "Asia/Gaza" | "Asia/Harbin" | "Asia/Hebron" | "Asia/Ho_Chi_Minh" | "Asia/Hong_Kong" | "Asia/Hovd" | "Asia/Irkutsk" | "Asia/Istanbul" | "Asia/Jakarta" | "Asia/Jayapura" | "Asia/Jerusalem" | "Asia/Kabul" | "Asia/Kamchatka" | "Asia/Karachi" | "Asia/Kashgar" | "Asia/Kathmandu" | "Asia/Katmandu" | "Asia/Khandyga" | "Asia/Kolkata" | "Asia/Krasnoyarsk" | "Asia/Kuala_Lumpur" | "Asia/Kuching" | "Asia/Kuwait" | "Asia/Macao" | "Asia/Macau" | "Asia/Magadan" | "Asia/Makassar" | "Asia/Manila" | "Asia/Muscat" | "Asia/Nicosia" | "Asia/Novokuznetsk" | "Asia/Novosibirsk" | "Asia/Omsk" | "Asia/Oral" | "Asia/Phnom_Penh" | "Asia/Pontianak" | "Asia/Pyongyang" | "Asia/Qatar" | "Asia/Qostanay" | "Asia/Qyzylorda" | "Asia/Rangoon" | "Asia/Riyadh" | "Asia/Saigon" | "Asia/Sakhalin" | "Asia/Samarkand" | "Asia/Seoul" | "Asia/Shanghai" | "Asia/Singapore" | "Asia/Srednekolymsk" | "Asia/Taipei" | "Asia/Tashkent" | "Asia/Tbilisi" | "Asia/Tehran" | "Asia/Tel_Aviv" | "Asia/Thimbu" | "Asia/Thimphu" | "Asia/Tokyo" | "Asia/Tomsk" | "Asia/Ujung_Pandang" | "Asia/Ulaanbaatar" | "Asia/Ulan_Bator" | "Asia/Urumqi" | "Asia/Ust-Nera" | "Asia/Vientiane" | "Asia/Vladivostok" | "Asia/Yakutsk" | "Asia/Yangon" | "Asia/Yekaterinburg" | "Asia/Yerevan" | "Atlantic/Azores" | "Atlantic/Bermuda" | "Atlantic/Canary" | "Atlantic/Cape_Verde" | "Atlantic/Faeroe" | "Atlantic/Faroe" | "Atlantic/Jan_Mayen" | "Atlantic/Madeira" | "Atlantic/Reykjavik" | "Atlantic/South_Georgia" | "Atlantic/St_Helena" | "Atlantic/Stanley" | "Australia/ACT" | "Australia/Adelaide" | "Australia/Brisbane" | "Australia/Broken_Hill" | "Australia/Canberra" | "Australia/Currie" | "Australia/Darwin" | "Australia/Eucla" | "Australia/Hobart" | "Australia/LHI" | "Australia/Lindeman" | "Australia/Lord_Howe" | "Australia/Melbourne" | "Australia/NSW" | "Australia/North" | "Australia/Perth" | "Australia/Queensland" | "Australia/South" | "Australia/Sydney" | "Australia/Tasmania" | "Australia/Victoria" | "Australia/West" | "Australia/Yancowinna" | "Brazil/Acre" | "Brazil/DeNoronha" | "Brazil/East" | "Brazil/West" | "CET" | "CST6CDT" | "Canada/Atlantic" | "Canada/Central" | "Canada/Eastern" | "Canada/Mountain" | "Canada/Newfoundland" | "Canada/Pacific" | "Canada/Saskatchewan" | "Canada/Yukon" | "Chile/Continental" | "Chile/EasterIsland" | "Cuba" | "EET" | "EST5EDT" | "Egypt" | "Eire" | "Etc/GMT" | "Etc/GMT+0" | "Etc/GMT+1" | "Etc/GMT+10" | "Etc/GMT+11" | "Etc/GMT+12" | "Etc/GMT+2" | "Etc/GMT+3" | "Etc/GMT+4" | "Etc/GMT+5" | "Etc/GMT+6" | "Etc/GMT+7" | "Etc/GMT+8" | "Etc/GMT+9" | "Etc/GMT-0" | "Etc/GMT-1" | "Etc/GMT-10" | "Etc/GMT-11" | "Etc/GMT-12" | "Etc/GMT-13" | "Etc/GMT-14" | "Etc/GMT-2" | "Etc/GMT-3" | "Etc/GMT-4" | "Etc/GMT-5" | "Etc/GMT-6" | "Etc/GMT-7" | "Etc/GMT-8" | "Etc/GMT-9" | "Etc/GMT0" | "Etc/Greenwich" | "Etc/UCT" | "Etc/UTC" | "Etc/Universal" | "Etc/Zulu" | "Europe/Amsterdam" | "Europe/Andorra" | "Europe/Astrakhan" | "Europe/Athens" | "Europe/Belfast" | "Europe/Belgrade" | "Europe/Berlin" | "Europe/Bratislava" | "Europe/Brussels" | "Europe/Bucharest" | "Europe/Budapest" | "Europe/Busingen" | "Europe/Chisinau" | "Europe/Copenhagen" | "Europe/Dublin" | "Europe/Gibraltar" | "Europe/Guernsey" | "Europe/Helsinki" | "Europe/Isle_of_Man" | "Europe/Istanbul" | "Europe/Jersey" | "Europe/Kaliningrad" | "Europe/Kiev" | "Europe/Kirov" | "Europe/Kyiv" | "Europe/Lisbon" | "Europe/Ljubljana" | "Europe/London" | "Europe/Luxembourg" | "Europe/Madrid" | "Europe/Malta" | "Europe/Mariehamn" | "Europe/Minsk" | "Europe/Monaco" | "Europe/Moscow" | "Europe/Nicosia" | "Europe/Oslo" | "Europe/Paris" | "Europe/Podgorica" | "Europe/Prague" | "Europe/Riga" | "Europe/Rome" | "Europe/Samara" | "Europe/San_Marino" | "Europe/Sarajevo" | "Europe/Saratov" | "Europe/Simferopol" | "Europe/Skopje" | "Europe/Sofia" | "Europe/Stockholm" | "Europe/Tallinn" | "Europe/Tirane" | "Europe/Tiraspol" | "Europe/Ulyanovsk" | "Europe/Uzhgorod" | "Europe/Vaduz" | "Europe/Vatican" | "Europe/Vienna" | "Europe/Vilnius" | "Europe/Volgograd" | "Europe/Warsaw" | "Europe/Zagreb" | "Europe/Zaporozhye" | "Europe/Zurich" | "GB" | "GB-Eire" | "GMT" | "GMT0" | "Greenwich" | "Hongkong" | "Iceland" | "Indian/Antananarivo" | "Indian/Chagos" | "Indian/Christmas" | "Indian/Cocos" | "Indian/Comoro" | "Indian/Kerguelen" | "Indian/Mahe" | "Indian/Maldives" | "Indian/Mauritius" | "Indian/Mayotte" | "Indian/Reunion" | "Iran" | "Israel" | "Jamaica" | "Japan" | "Kwajalein" | "Libya" | "MET" | "MST7MDT" | "Mexico/BajaNorte" | "Mexico/BajaSur" | "Mexico/General" | "NZ" | "NZ-CHAT" | "Navajo" | "PRC" | "PST8PDT" | "Pacific/Apia" | "Pacific/Auckland" | "Pacific/Bougainville" | "Pacific/Chatham" | "Pacific/Chuuk" | "Pacific/Easter" | "Pacific/Efate" | "Pacific/Enderbury" | "Pacific/Fakaofo" | "Pacific/Fiji" | "Pacific/Funafuti" | "Pacific/Galapagos" | "Pacific/Gambier" | "Pacific/Guadalcanal" | "Pacific/Guam" | "Pacific/Honolulu" | "Pacific/Johnston" | "Pacific/Kanton" | "Pacific/Kiritimati" | "Pacific/Kosrae" | "Pacific/Kwajalein" | "Pacific/Majuro" | "Pacific/Marquesas" | "Pacific/Midway" | "Pacific/Nauru" | "Pacific/Niue" | "Pacific/Norfolk" | "Pacific/Noumea" | "Pacific/Pago_Pago" | "Pacific/Palau" | "Pacific/Pitcairn" | "Pacific/Pohnpei" | "Pacific/Ponape" | "Pacific/Port_Moresby" | "Pacific/Rarotonga" | "Pacific/Saipan" | "Pacific/Samoa" | "Pacific/Tahiti" | "Pacific/Tarawa" | "Pacific/Tongatapu" | "Pacific/Truk" | "Pacific/Wake" | "Pacific/Wallis" | "Pacific/Yap" | "Poland" | "Portugal" | "ROK" | "Singapore" | "SystemV/AST4" | "SystemV/AST4ADT" | "SystemV/CST6" | "SystemV/CST6CDT" | "SystemV/EST5" | "SystemV/EST5EDT" | "SystemV/HST10" | "SystemV/MST7" | "SystemV/MST7MDT" | "SystemV/PST8" | "SystemV/PST8PDT" | "SystemV/YST9" | "SystemV/YST9YDT" | "Turkey" | "UCT" | "US/Alaska" | "US/Aleutian" | "US/Arizona" | "US/Central" | "US/East-Indiana" | "US/Eastern" | "US/Hawaii" | "US/Indiana-Starke" | "US/Michigan" | "US/Mountain" | "US/Pacific" | "US/Samoa" | "UTC" | "Universal" | "W-SU" | "WET" | "Zulu" | "EST" | "HST" | "MST" | "ACT" | "AET" | "AGT" | "ART" | "AST" | "BET" | "BST" | "CAT" | "CNT" | "CST" | "CTT" | "EAT" | "ECT" | "IET" | "IST" | "JST" | "MIT" | "NET" | "NST" | "PLT" | "PNT" | "PRT" | "PST" | "SST" | "VST"; +type UpdateScheduleRequestStatusEnum = "ACTIVE" | "PAUSE"; + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +declare class UpdateSystemConfigRequest { + /** + * Configuration JSON with the key-value pair of configuration attributes to be updated. + */ + 'configuration': any; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +declare class UpdateTagRequest { + /** + * Name of the tag. + */ + 'name'?: string; + /** + * Hex color code to be assigned to the tag. For example, #ff78a9. + */ + 'color'?: string; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +declare class UpdateUserGroupRequest { + /** + * Name of the group to modify. + */ + 'name'?: string; + /** + * ID of the Liveboards to be assigned as default Liveboards to the users in the group. + */ + 'default_liveboard_identifiers'?: Array; + /** + * Description for the group. + */ + 'description'?: string; + /** + * Display name of the group. + */ + 'display_name'?: string; + /** + * Privileges to assign to the group. + */ + 'privileges'?: Array; + /** + * GUID or name of the sub groups. A subgroup is a group assigned to a parent group. + */ + 'sub_group_identifiers'?: Array; + /** + * Type of the group + */ + 'type'?: UpdateUserGroupRequestTypeEnum; + /** + * GUID or name of the users to assign to the group. + */ + 'user_identifiers'?: Array; + /** + * Visibility of the group. To make a group visible to other users and groups, set the visibility to SHAREABLE. + */ + 'visibility'?: UpdateUserGroupRequestVisibilityEnum; + /** + * Role identifiers of the Roles that should be assigned to the group. + */ + 'role_identifiers'?: Array; + /** + * Type of update operation. Default operation type is REPLACE + */ + 'operation'?: UpdateUserGroupRequestOperationEnum; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} +type UpdateUserGroupRequestPrivilegesEnum = "ADMINISTRATION" | "AUTHORING" | "USERDATAUPLOADING" | "DATADOWNLOADING" | "USERMANAGEMENT" | "DATAMANAGEMENT" | "SHAREWITHALL" | "JOBSCHEDULING" | "A3ANALYSIS" | "EXPERIMENTALFEATUREPRIVILEGE" | "BYPASSRLS" | "RANALYSIS" | "DEVELOPER" | "USER_ADMINISTRATION" | "GROUP_ADMINISTRATION" | "SYNCMANAGEMENT" | "CAN_CREATE_CATALOG" | "DISABLE_PINBOARD_CREATION" | "LIVEBOARD_VERIFIER" | "PREVIEW_THOUGHTSPOT_SAGE" | "CAN_MANAGE_VERSION_CONTROL" | "THIRDPARTY_ANALYSIS" | "ALLOW_NON_EMBED_FULL_APP_ACCESS" | "CAN_ACCESS_ANALYST_STUDIO" | "CAN_MANAGE_ANALYST_STUDIO" | "CAN_MODIFY_FOLDERS" | "CAN_MANAGE_VARIABLES" | "CAN_VIEW_FOLDERS" | "CAN_MANAGE_AGENTSPOT" | "CAN_ACCESS_AGENTSPOT" | "PREVIEW_DOCUMENT_SEARCH" | "CAN_SETUP_VERSION_CONTROL" | "CAN_DOWNLOAD_VISUALS" | "CAN_DOWNLOAD_DETAILED_DATA" | "CAN_USE_SPOTTER"; +type UpdateUserGroupRequestTypeEnum = "LOCAL_GROUP" | "LDAP_GROUP" | "TEAM_GROUP" | "TENANT_GROUP"; +type UpdateUserGroupRequestVisibilityEnum = "SHARABLE" | "NON_SHARABLE"; +type UpdateUserGroupRequestOperationEnum = "ADD" | "REMOVE" | "REPLACE"; + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +declare class UpdateUserRequest { + /** + * Name of the user. The username string must be unique. + */ + 'name'?: string; + /** + * A unique display name string for the user account, usually their first and last name + */ + 'display_name'?: string; + /** + * Visibility of the users. When set to SHARABLE, the user is visible to other users and groups when they try to share an object. + */ + 'visibility'?: UpdateUserRequestVisibilityEnum; + /** + * Email of the user account + */ + 'email'?: string; + /** + * Current status of the user account. The `SUSPENDED` user state indicates a transitional state applicable to IAMv2 users only. + */ + 'account_status'?: UpdateUserRequestAccountStatusEnum; + /** + * User preference for receiving email notifications when another ThoughtSpot user shares a metadata object such as Answer, Liveboard, or Worksheet. + */ + 'notify_on_share'?: boolean | null; + /** + * The user preference for revisiting the onboarding experience. + */ + 'show_onboarding_experience'?: boolean | null; + /** + * Indicates if the user has completed the onboarding and allows turning off the onboarding walkthrough. + */ + 'onboarding_experience_completed'?: boolean | null; + /** + * Type of the account. + */ + 'account_type'?: UpdateUserRequestAccountTypeEnum; + /** + * GUIDs or names of the groups. + */ + 'group_identifiers'?: Array; + /** + * GUID of the Liveboard to set a default Liveboard for the user. ThoughtSpot displays this Liveboard on the Home page when the user logs in. + */ + 'home_liveboard_identifier'?: string; + /** + * Metadata objects to add to the user\'s favorites list. + */ + 'favorite_metadata'?: Array; + /** + * IDs of the Orgs. + */ + 'org_identifiers'?: Array; + /** + * Type of update operation. Default operation type is REPLACE + */ + 'operation'?: UpdateUserRequestOperationEnum; + /** + * Locale for the user. When setting this value, do not set use_browser_language to true, otherwise the browser\'s language setting will take precedence and the preferred_locale value will be ignored. + */ + 'preferred_locale'?: UpdateUserRequestPreferredLocaleEnum; + /** + * Flag to indicate whether to use the browser locale for the user in the UI. When set to true, the preferred_locale value is unset and the browser\'s language setting takes precedence. Version: 26.3.0.cl or later + */ + 'use_browser_language'?: boolean | null; + /** + * Properties for the user + */ + 'extended_properties'?: any; + /** + * Preferences for the user + */ + 'extended_preferences'?: any; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} +type UpdateUserRequestVisibilityEnum = "SHARABLE" | "NON_SHARABLE"; +type UpdateUserRequestAccountStatusEnum = "ACTIVE" | "INACTIVE" | "EXPIRED" | "LOCKED" | "PENDING" | "SUSPENDED"; +type UpdateUserRequestAccountTypeEnum = "LOCAL_USER" | "LDAP_USER" | "SAML_USER" | "OIDC_USER" | "REMOTE_USER"; +type UpdateUserRequestOperationEnum = "ADD" | "REMOVE" | "REPLACE"; +type UpdateUserRequestPreferredLocaleEnum = "en-CA" | "en-GB" | "en-US" | "de-DE" | "ja-JP" | "zh-CN" | "pt-BR" | "fr-FR" | "fr-CA" | "es-US" | "da-DK" | "es-ES" | "fi-FI" | "sv-SE" | "nb-NO" | "pt-PT" | "nl-NL" | "it-IT" | "ru-RU" | "en-IN" | "de-CH" | "en-NZ" | "es-MX" | "en-AU" | "zh-Hant" | "ko-KR" | "en-DE"; + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +declare class UpdateVariableRequest { + /** + * New name of the variable. + */ + 'name': string; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +/** +* Input for variable value update in batch operations +*/ +declare class VariableUpdateAssignmentInput { + /** + * ID or Name of the variable + */ + 'variable_identifier': string; + /** + * Values of the variable + */ + 'variable_values': Array; + /** + * Operation to perform + */ + 'operation': VariableUpdateAssignmentInputOperationEnum; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} +type VariableUpdateAssignmentInputOperationEnum = "ADD" | "REMOVE" | "REPLACE" | "RESET"; + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +/** +* Input for defining the scope of variable value assignments in batch update operations +*/ +declare class VariableUpdateScopeInput { + /** + * The unique name of the org + */ + 'org_identifier': string; + /** + * Type of principal to which the variable value applies. Use USER to assign values to a specific user, or USER_GROUP to assign values to a group. + */ + 'principal_type'?: VariableUpdateScopeInputPrincipalTypeEnum | null; + /** + * Unique ID or name of the principal + */ + 'principal_identifier'?: string | null; + /** + * Unique ID or name of the model. Required for FORMULA_VARIABLE type to scope the variable value to a specific worksheet. + */ + 'model_identifier'?: string | null; + /** + * The priority level for this scope assignment, used for conflict resolution when multiple values match. Higher priority values (larger numbers) take precedence. + */ + 'priority'?: number | null; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} +type VariableUpdateScopeInputPrincipalTypeEnum = "USER" | "USER_GROUP"; + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +declare class UpdateVariableValuesRequest { + /** + * Array of variable assignment objects specifying the variable identifier, values to assign, and the operation type (ADD, REMOVE, REPLACE, or RESET) to perform on each variable. + */ + 'variable_assignment': Array; + /** + * Array of scope objects defining where the variable values apply, including organization context, optional principal constraints (user or group), model reference for formula variables, and priority for conflict resolution. + */ + 'variable_value_scope': Array; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +declare class UpdateWebhookConfigurationRequest { + /** + * Name of the webhook configuration. + */ + 'name'?: string; + /** + * Description of the webhook configuration. + */ + 'description'?: string; + /** + * The webhook endpoint URL. + */ + 'url'?: string; + /** + * Additional URL parameters as key-value pairs. + */ + 'url_params'?: any; + /** + * List of events to subscribe to. + */ + 'events'?: Array; + 'authentication'?: CreateWebhookConfigurationRequestAuthentication; + 'signature_verification'?: CreateWebhookConfigurationRequestSignatureVerification; + 'storage_destination'?: CreateWebhookConfigurationRequestStorageDestination; + /** + * Additional headers as an array of key-value pairs. Example: [{\"key\": \"X-Custom-Header\", \"value\": \"custom_value\"}] Version: 26.4.0.cl or later + */ + 'additional_headers'?: Array; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} +type UpdateWebhookConfigurationRequestEventsEnum = "LIVEBOARD_SCHEDULE"; + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +declare class User { + /** + * Unique identifier of the user. + */ + 'id': string; + /** + * Name of the user. + */ + 'name': string; + /** + * Display name of the user. + */ + 'display_name': string; + /** + * Visibility of the users. The `SHARABLE` property makes a user visible to other users and group, who can share objects with the user. + */ + 'visibility': UserVisibilityEnum; + /** + * Unique identifier of author of the user. + */ + 'author_id'?: string | null; + /** + * Defines whether the user can change their password. + */ + 'can_change_password'?: boolean | null; + /** + * Defines whether the response has complete detail of the user. + */ + 'complete_detail'?: boolean | null; + /** + * Creation time of the user in milliseconds. + */ + 'creation_time_in_millis'?: number | null; + 'current_org'?: Org; + /** + * Indicates whether the user is deleted. + */ + 'deleted'?: boolean | null; + /** + * Indicates whether the user is deprecated. + */ + 'deprecated'?: boolean | null; + /** + * Type of the user account. + */ + 'account_type'?: UserAccountTypeEnum | null; + /** + * Status of the user account. + */ + 'account_status'?: UserAccountStatusEnum | null; + /** + * Email of the user. + */ + 'email'?: string | null; + /** + * Expiration time of the user in milliseconds. + */ + 'expiration_time_in_millis'?: number | null; + /** + * Indicates whether the user is external. + */ + 'external'?: boolean | null; + /** + * Metadata objects to add to the users\' favorites list. + */ + 'favorite_metadata'?: Array | null; + /** + * Timestamp of the first login session of the user in milliseconds. + */ + 'first_login_time_in_millis'?: number | null; + /** + * Group mask of the user. + */ + 'group_mask'?: number | null; + /** + * Indicates whether the user is hidden. + */ + 'hidden'?: boolean | null; + 'home_liveboard'?: ObjectIDAndName; + /** + * Incomplete details of user if any present. + */ + 'incomplete_details'?: any | null; + /** + * Indicates whether it is first login of the user. + */ + 'is_first_login'?: boolean | null; + /** + * Last modified time of the user in milliseconds. + */ + 'modification_time_in_millis'?: number | null; + /** + * Unique identifier of modifier of the user. + */ + 'modifier_id'?: string | null; + /** + * User preference for receiving email notifications on shared Answers or Liveboard. + */ + 'notify_on_share'?: boolean | null; + /** + * The user preference for turning off the onboarding experience. + */ + 'onboarding_experience_completed'?: boolean | null; + /** + * Orgs to which the user belongs. + */ + 'orgs'?: Array | null; + /** + * Unique identifier of owner of the user. + */ + 'owner_id'?: string | null; + /** + * Parent type of the user. + */ + 'parent_type'?: UserParentTypeEnum | null; + /** + * Privileges which are assigned to the user. + */ + 'privileges'?: Array | null; + /** + * User\'s preference to revisit the new user onboarding experience. + */ + 'show_onboarding_experience'?: boolean | null; + /** + * Indicates whether the user is a super user. + */ + 'super_user'?: boolean | null; + /** + * Indicates whether the user is a system user. + */ + 'system_user'?: boolean | null; + /** + * Tags associated with the user. + */ + 'tags'?: Array | null; + /** + * Unique identifier of tenant of the user. + */ + 'tenant_id'?: string | null; + /** + * Groups to which the user is assigned. + */ + 'user_groups'?: Array | null; + /** + * Inherited User Groups which the user is part of. + */ + 'user_inherited_groups'?: Array | null; + /** + * Indicates whether welcome email is sent for the user. + */ + 'welcome_email_sent'?: boolean | null; + /** + * Privileges which are assigned to the user with org. + */ + 'org_privileges'?: any | null; + /** + * Locale for the user. + */ + 'preferred_locale'?: string | null; + /** + * Flag to indicate whether to use the browser locale for the user in the UI. When set to true, the preferred_locale value is unset and the browser\'s language setting takes precedence. Version: 26.3.0.cl or later + */ + 'use_browser_language'?: boolean | null; + /** + * Properties for the user + */ + 'extended_properties'?: any | null; + /** + * Preferences for the user + */ + 'extended_preferences'?: any | null; + /** + * User Parameters which are specified for the user via JWToken + */ + 'user_parameters'?: any | null; + /** + * Access Control Properties which are specified for the user via JWToken + */ + 'access_control_properties'?: any | null; + /** + * Formula Variables which are specified for the user via JWToken + */ + 'variable_values'?: any | null; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} +type UserVisibilityEnum = "SHARABLE" | "NON_SHARABLE"; +type UserAccountTypeEnum = "LOCAL_USER" | "LDAP_USER" | "SAML_USER" | "OIDC_USER" | "REMOTE_USER"; +type UserAccountStatusEnum = "ACTIVE" | "INACTIVE" | "EXPIRED" | "LOCKED" | "PENDING" | "SUSPENDED"; +type UserParentTypeEnum = "USER" | "GROUP"; + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +declare class UserGroupResponse { + /** + * The unique identifier of the object + */ + 'author_id'?: string | null; + /** + * Indicates whether the response has complete detail of the group. + */ + 'complete_detail'?: boolean | null; + /** + * Content details of the group + */ + 'content'?: any | null; + /** + * Creation time of the group in milliseconds + */ + 'creation_time_in_millis'?: number | null; + /** + * Liveboards that are assigned as default Liveboards to the group. + */ + 'default_liveboards'?: Array | null; + /** + * Indicates whether the group is deleted + */ + 'deleted'?: boolean | null; + /** + * Indicates whether the group is deprecated + */ + 'deprecated'?: boolean | null; + /** + * Description of the group + */ + 'description'?: string | null; + /** + * Display name of the group. + */ + 'display_name': string; + /** + * Indicates whether the group is external + */ + 'external'?: boolean | null; + /** + * Generation number of the group + */ + 'generation_number'?: number | null; + /** + * Indicates whether the group is hidden + */ + 'hidden'?: boolean | null; + /** + * The unique identifier of the object + */ + 'id': string; + /** + * Index number of the group + */ + 'index'?: number | null; + /** + * Index version number of the group + */ + 'index_version'?: number | null; + /** + * Metadata version number of the group + */ + 'metadata_version'?: number | null; + /** + * Last modified time of the group in milliseconds. + */ + 'modification_time_in_millis'?: number | null; + /** + * The unique identifier of the object + */ + 'modifier_id'?: string | null; + /** + * Name of the group. + */ + 'name': string; + /** + * Orgs in which group exists. + */ + 'orgs'?: Array | null; + /** + * The unique identifier of the object + */ + 'owner_id'?: string | null; + /** + * Parent type of the group. + */ + 'parent_type'?: UserGroupResponseParentTypeEnum | null; + /** + * Privileges which are assigned to the group + */ + 'privileges'?: Array | null; + /** + * Groups who are part of the group + */ + 'sub_groups'?: Array | null; + /** + * Indicates whether the group is a system group. + */ + 'system_group'?: boolean | null; + /** + * Tags associated with the group. + */ + 'tags'?: Array | null; + /** + * Type of the group. + */ + 'type'?: UserGroupResponseTypeEnum | null; + /** + * Users who are part of the group. + */ + 'users'?: Array | null; + /** + * Visibility of the group. The SHARABLE makes a group visible to other users and groups, and thus allows them to share objects. + */ + 'visibility': UserGroupResponseVisibilityEnum; + /** + * List of roles assgined to the user + */ + 'roles'?: Array | null; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} +type UserGroupResponseParentTypeEnum = "USER" | "GROUP"; +type UserGroupResponseTypeEnum = "LOCAL_GROUP" | "LDAP_GROUP" | "TEAM_GROUP" | "TENANT_GROUP"; +type UserGroupResponseVisibilityEnum = "SHARABLE" | "NON_SHARABLE"; + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +/** +* Define attributes such as Runtime filters and Runtime parameters to send security entitlements to a user session. For more information, see [Documentation](https://developers.thoughtspot.com/docs/abac-user-parameters). +*/ +declare class UserParameterOptions { + 'objects'?: Array | null; + /** + * Objects to apply the User_Runtime_Filters. Examples to set the `runtime_filters` : ```json { \"column_name\": \"Color\", \"operator\": \"EQ\", \"values\": [\"red\"], \"persist\": false } ``` + */ + 'runtime_filters'?: Array | null; + /** + * Objects to apply the User_Runtime_Sorts. Examples to set the `runtime_sorts` : ```json { \"column_name\": \"Color\", \"order\": \"ASC\", \"persist\": false } ``` + */ + 'runtime_sorts'?: Array | null; + /** + * Objects to apply the Runtime_Parameters. Examples to set the `parameters` : ```json { \"name\": \"Color\", \"values\": [\"Blue\"], \"persist\": false } ``` + */ + 'parameters'?: Array | null; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +declare class ValidateCommunicationChannelRequest { + /** + * Type of communication channel to validate (e.g., WEBHOOK). + */ + 'channel_type': ValidateCommunicationChannelRequestChannelTypeEnum; + /** + * Unique identifier or name for the communication channel. + */ + 'channel_identifier': string; + /** + * Event type to validate for this channel. + */ + 'event_type': ValidateCommunicationChannelRequestEventTypeEnum; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} +type ValidateCommunicationChannelRequestChannelTypeEnum = "WEBHOOK"; +type ValidateCommunicationChannelRequestEventTypeEnum = "LIVEBOARD_SCHEDULE"; + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +declare class ValidateMergeRequest { + /** + * Name of the branch from which changes need to be picked for validation + */ + 'source_branch_name': string; + /** + * Name of the branch where files will be merged + */ + 'target_branch_name': string; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +declare class ValidateTokenRequest { + 'token': string; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +declare class VariableOrgInfo { + /** + * ID of the Org. + */ + 'id': number; + /** + * Name of the Org. + */ + 'name': string; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +declare class VariableValue { + /** + * The value of the variable + */ + 'value'?: string | null; + /** + * The value of the variable if it is a list type + */ + 'value_list'?: Array | null; + /** + * The unique name of the org + */ + 'org_identifier': string; + /** + * Type of principal to which this value applies. Use USER to assign the value to a specific user, or USER_GROUP to assign it to a group. + */ + 'principal_type'?: VariableValuePrincipalTypeEnum | null; + /** + * Unique ID or name of the principal + */ + 'principal_identifier'?: string | null; + /** + * Unique ID of the model Version: 26.3.0.cl or later + */ + 'model_identifier'?: string | null; + /** + * The priority assigned to this value. If there are 2 matching values, the one with the higher priority will be picked. + */ + 'priority'?: number | null; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} +type VariableValuePrincipalTypeEnum = "USER" | "USER_GROUP"; + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +/** +* Variable object +*/ +declare class Variable { + /** + * Unique identifier of the variable + */ + 'id': string; + /** + * Name of the variable + */ + 'name': string; + /** + * Type of the variable + */ + 'variable_type'?: VariableVariableTypeEnum | null; + /** + * If the variable is sensitive + */ + 'sensitive'?: boolean | null; + /** + * Values of the variable + */ + 'values'?: Array | null; + 'org'?: VariableOrgInfo; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} +type VariableVariableTypeEnum = "CONNECTION_PROPERTY" | "TABLE_MAPPING" | "CONNECTION_PROPERTY_PER_PRINCIPAL" | "FORMULA_VARIABLE" | "USER_PROPERTY"; + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +declare class WebhookAuthApiKey { + /** + * The header or query parameter name for the API key. + */ + 'key': string; + /** + * The API key value. + */ + 'value': string; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +declare class WebhookAuthBasicAuth { + /** + * Username for basic authentication. + */ + 'username': string; + /** + * Password for basic authentication. + */ + 'password': string; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +declare class WebhookAuthOAuth2 { + /** + * OAuth2 authorization server URL. + */ + 'authorization_url': string; + /** + * OAuth2 client identifier. + */ + 'client_id': string; + /** + * OAuth2 client secret key. + */ + 'client_secret': string; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +declare class WebhookAuthentication { + 'API_KEY'?: WebhookAuthApiKey; + 'BASIC_AUTH'?: WebhookAuthBasicAuth; + /** + * Redacted Bearer token authentication configuration. + */ + 'BEARER_TOKEN'?: string | null; + 'OAUTH2'?: WebhookAuthOAuth2; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +declare class WebhookAuthenticationInput { + 'API_KEY'?: WebhookAuthApiKeyInput; + 'BASIC_AUTH'?: WebhookAuthBasicAuthInput; + /** + * Bearer token authentication configuration. + */ + 'BEARER_TOKEN'?: string | null; + 'OAUTH2'?: WebhookAuthOAuth2Input; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +declare class WebhookDeleteFailure { + /** + * Unique identifier of the webhook that failed to delete. + */ + 'id': string; + /** + * Name of the webhook that failed to delete. + */ + 'name': string; + /** + * Error message describing why the deletion failed. + */ + 'error': string; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +/** +* Key-value pair for additional webhook headers. +*/ +declare class WebhookKeyValuePair { + /** + * Header name. + */ + 'key': string; + /** + * Header value. + */ + 'value': string; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +declare class WebhookOrg { + /** + * Unique identifier of the org. + */ + 'id': string; + /** + * Name of the org. + */ + 'name': string; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +declare class WebhookSignatureVerification { + /** + * Signature verification method type. + */ + 'type': WebhookSignatureVerificationTypeEnum; + /** + * HTTP header where the signature is sent. + */ + 'header': string; + /** + * Hash algorithm used for signature verification. + */ + 'algorithm': WebhookSignatureVerificationAlgorithmEnum; + /** + * Shared secret used for HMAC signature generation. + */ + 'secret': string; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} +type WebhookSignatureVerificationTypeEnum = "HMAC_SHA256"; +type WebhookSignatureVerificationAlgorithmEnum = "SHA256"; + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +declare class WebhookUser { + /** + * Unique identifier of the user. + */ + 'id': string; + /** + * Name of the user. + */ + 'name': string; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +declare class WebhookResponse { + /** + * Unique identifier of the webhook configuration. + */ + 'id': string; + /** + * Name of the webhook configuration. + */ + 'name': string; + /** + * Description of the webhook configuration. + */ + 'description'?: string | null; + 'org'?: WebhookOrg; + /** + * The webhook endpoint URL. + */ + 'url': string; + /** + * Additional URL parameters as key-value pairs. + */ + 'url_params'?: any | null; + /** + * List of events this webhook subscribes to. + */ + 'events': Array; + 'authentication'?: WebhookAuthentication; + 'signature_verification'?: WebhookSignatureVerification; + /** + * Additional headers as an array of key-value pairs. Version: 26.4.0.cl or later + */ + 'additional_headers'?: Array | null; + /** + * Creation time of the webhook configuration in milliseconds. + */ + 'creation_time_in_millis': number; + /** + * Last modified time of the webhook configuration in milliseconds. + */ + 'modification_time_in_millis': number; + 'created_by'?: WebhookUser; + 'last_modified_by'?: WebhookUser; + 'storage_destination'?: StorageDestination; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} +type WebhookResponseEventsEnum = "LIVEBOARD_SCHEDULE"; + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +declare class WebhookDeleteResponse { + /** + * Number of webhooks successfully deleted. + */ + 'deleted_count': number; + /** + * Number of webhooks that failed to delete. + */ + 'failed_count': number; + /** + * List of successfully deleted webhooks. + */ + 'deleted_webhooks': Array; + /** + * List of webhooks that failed to delete with error details. + */ + 'failed_webhooks': Array; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +declare class WebhookPagination { + /** + * The starting record number from where the records are included. + */ + 'record_offset': number; + /** + * The number of records included in the response. + */ + 'record_size': number; + /** + * Total number of webhook configurations available. + */ + 'total_count': number; + /** + * Indicates whether more records are available beyond the current response. + */ + 'has_more': boolean; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +declare class WebhookSearchResponse { + /** + * List of webhook configurations matching the search criteria. + */ + 'webhooks': Array; + 'pagination': WebhookPagination; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +declare class WebhookSignatureVerificationInput { + /** + * Signature verification method type. + */ + 'type': WebhookSignatureVerificationInputTypeEnum; + /** + * HTTP header where the signature is sent. + */ + 'header': string; + /** + * Hash algorithm used for signature verification. + */ + 'algorithm': WebhookSignatureVerificationInputAlgorithmEnum; + /** + * Shared secret used for HMAC signature generation. + */ + 'secret': string; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} +type WebhookSignatureVerificationInputTypeEnum = "HMAC_SHA256"; +type WebhookSignatureVerificationInputAlgorithmEnum = "SHA256"; + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +declare class WebhookSortOptionsInput { + /** + * Name of the field to apply the sort on. + */ + 'field_name'?: WebhookSortOptionsInputFieldNameEnum | null; + /** + * Sort order: ASC (Ascending) or DESC (Descending). + */ + 'order'?: WebhookSortOptionsInputOrderEnum | null; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} +type WebhookSortOptionsInputFieldNameEnum = "CREATED" | "MODIFIED" | "NAME"; +type WebhookSortOptionsInputOrderEnum = "ASC" | "DESC"; + +/** + * Defines the contract for a middleware intercepting requests before + * they are sent (but after the RequestContext was created) + * and before the ResponseContext is unwrapped. + * + */ +interface Middleware { + /** + * Modifies the request before the request is sent. + * + * @param context RequestContext of a request which is about to be sent to the server + * @returns an observable of the updated request context + * + */ + pre(context: RequestContext): Observable; + /** + * Modifies the returned response before it is deserialized. + * + * @param context ResponseContext of a sent request + * @returns an observable of the modified response context + */ + post(context: ResponseContext): Observable; +} +/** + * Defines the contract for a middleware intercepting requests before + * they are sent (but after the RequestContext was created) + * and before the ResponseContext is unwrapped. + * + */ +interface PromiseMiddleware { + /** + * Modifies the request before the request is sent. + * + * @param context RequestContext of a request which is about to be sent to the server + * @returns an observable of the updated request context + * + */ + pre(context: RequestContext): Promise; + /** + * Modifies the returned response before it is deserialized. + * + * @param context ResponseContext of a sent request + * @returns an observable of the modified response context + */ + post(context: ResponseContext): Promise; +} + +interface BaseServerConfiguration { + makeRequestContext(endpoint: string, httpMethod: HttpMethod): RequestContext; +} +/** + * + * Represents the configuration of a server including its + * url template and variable configuration based on the url. + * + */ +declare class ServerConfiguration implements BaseServerConfiguration { + private url; + private variableConfiguration; + constructor(url: string, variableConfiguration: T); + /** + * Sets the value of the variables of this server. Variables are included in + * the `url` of this ServerConfiguration in the form `{variableName}` + * + * @param variableConfiguration a partial variable configuration for the + * variables contained in the url + */ + setVariables(variableConfiguration: Partial): void; + getConfiguration(): T; + private getUrl; + /** + * Creates a new request context for this server using the url with variables + * replaced with their respective values and the endpoint of the request appended. + * + * @param endpoint the endpoint to be queried on the server + * @param httpMethod httpMethod to be used + * + */ + makeRequestContext(endpoint: string, httpMethod: HttpMethod): RequestContext; +} +declare const server1: ServerConfiguration<{ + "base-url": string; +}>; +declare const servers: ServerConfiguration<{ + "base-url": string; +}>[]; + +interface Configuration { + readonly baseServer: BaseServerConfiguration; + readonly httpApi: HttpLibrary; + readonly middleware: Middleware[]; + readonly authMethods: AuthMethods; +} +/** + * Interface with which a configuration object can be configured. + */ +interface ConfigurationParameters { + /** + * Default server to use - a list of available servers (according to the + * OpenAPI yaml definition) is included in the `servers` const in `./servers`. You can also + * create your own server with the `ServerConfiguration` class from the same + * file. + */ + baseServer?: BaseServerConfiguration; + /** + * HTTP library to use e.g. IsomorphicFetch. This can usually be skipped as + * all generators come with a default library. + * If available, additional libraries can be imported from `./http/*` + */ + httpApi?: HttpLibrary; + /** + * The middlewares which will be applied to requests and responses. You can + * add any number of middleware components to modify requests before they + * are sent or before they are deserialized by implementing the `Middleware` + * interface defined in `./middleware` + */ + middleware?: Middleware[]; + /** + * Configures middleware functions that return promises instead of + * Observables (which are used by `middleware`). Otherwise allows for the + * same functionality as `middleware`, i.e., modifying requests before they + * are sent and before they are deserialized. + */ + promiseMiddleware?: PromiseMiddleware[]; + /** + * Configuration for the available authentication methods (e.g., api keys) + * according to the OpenAPI yaml definition. For the definition, please refer to + * `./auth/auth` + */ + authMethods?: AuthMethodsConfiguration; +} +/** + * Provide your `ConfigurationParameters` to this function to get a `Configuration` + * object that can be used to configure your APIs (in the constructor or + * for each request individually). + * + * If a property is not included in conf, a default is used: + * - baseServer: server1 + * - httpApi: IsomorphicFetchHttpLibrary + * - middleware: [] + * - promiseMiddleware: [] + * - authMethods: {} + * + * @param conf partial configuration + */ +declare function createConfiguration(conf?: ConfigurationParameters): Configuration; + +/** + * Represents an error caused by an api call i.e. it has attributes for a HTTP status code + * and the returned body object. + * + * Example + * API returns a ErrorMessageObject whenever HTTP status code is not in [200, 299] + * => ApiException(404, someErrorMessageObject) + * + */ +declare class ApiException extends Error { + code: number; + body: T; + headers: { + [key: string]: string; + }; + constructor(code: number, message: string, body: T, headers: { + [key: string]: string; + }); +} + +/** + * + * @export + * @class BaseAPI + */ +declare class BaseAPIRequestFactory { + protected configuration: Configuration; + constructor(configuration: Configuration); +} +/** + * + * @export + * @class RequiredError + * @extends {Error} + */ +declare class RequiredError extends Error { + api: string; + method: string; + field: string; + name: "RequiredError"; + constructor(api: string, method: string, field: string); +} + +/** + * no description + */ +declare class AIApiRequestFactory extends BaseAPIRequestFactory { + /** + * Version: 26.2.0.cl or later Creates a new Spotter agent conversation based on the provided context and settings. The endpoint was in Beta from 26.2.0.cl through 26.4.0.cl. Requires `CAN_USE_SPOTTER` privilege and at least view access to the metadata object specified in the request. #### Usage guidelines The request must include the `metadata_context` parameter to define the conversation context. The context type can be one of: - `DATA_SOURCE` *(available from 26.5.0.cl)*: targets a specific data source. Provide `data_source_identifier` in `data_source_context` for a single data source, or `data_source_identifiers` for multi-data-source context. The deprecated `guid` field is accepted for backwards compatibility. - `AUTO_MODE` *(available from 26.5.0.cl)*: automatically discovers and selects the most relevant datasets for the user\'s queries. > **Note for callers on versions 26.2.0.cl – 26.4.0.cl (Beta):** use the lowercase `data_source` enum value with the `guid` field instead of the above. Example: `{ \"type\": \"data_source\", \"data_source_context\": { \"guid\": \"\" } }`. The `conversation_settings` parameter controls which Spotter capabilities are enabled for the conversation: - `enable_contextual_change_analysis` (default: `true`, **deprecated from 26.2.0.cl**) — always enabled in Spotter 3; setting this to `false` has no effect on versions >= 26.2.0.cl - `enable_natural_language_answer_generation` (default: `true`, **deprecated from 26.2.0.cl**) — always enabled in Spotter 3; setting this to `false` has no effect on versions >= 26.2.0.cl - `enable_reasoning` (default: `true`, **deprecated from 26.2.0.cl**) — always enabled in Spotter 3; setting this to `false` has no effect on versions >= 26.2.0.cl - `enable_save_chat` (default: `false`, *available from 26.5.0.cl*) — enables saving the conversation for later retrieval via conversation history If the request is successful, the response includes a unique `conversation_identifier` that must be passed to `sendAgentConversationMessage` or `sendAgentConversationMessageStreaming` to send messages within this conversation. The response also includes `conversation_id` with the same value for backwards compatibility; use `conversation_identifier` for new integrations. #### Example request ```json { \"metadata_context\": { \"type\": \"DATA_SOURCE\", \"data_source_context\": { \"data_source_identifier\": \"a1b2c3d4-e5f6-7890-abcd-ef1234567890\" } }, \"conversation_settings\": {} } ``` #### Error responses | Code | Description | | ---- | --------------------------------------------------------------------------------------------------------------------------------------- | | 401 | Unauthorized — authentication token is missing, expired, or invalid. | | 403 | Forbidden — the authenticated user does not have `CAN_USE_SPOTTER` privilege or lacks view permission on the specified metadata object. | > ###### Note: > > - This endpoint was in Beta from 26.2.0.cl through 26.4.0.cl and is Generally Available from version 26.5.0.cl. > - This endpoint requires Spotter - please contact ThoughtSpot support to enable Spotter on your cluster. + * @param createAgentConversationRequest + */ + createAgentConversation(createAgentConversationRequest: CreateAgentConversationRequest, _options?: Configuration): Promise; + /** + * Version: 10.4.0.cl or later Creates a new conversation session tied to a specific data model for AI-driven natural language querying. Requires `CAN_USE_SPOTTER` privilege and at least view access to the metadata object specified in the request. #### Usage guidelines The request must include: - `metadata_identifier`: the unique ID of the data source that provides context for the conversation Optionally, you can provide: - `tokens`: a token string to set initial context for the conversation (e.g., `\"[sales],[item type],[state]\"`) If the request is successful, ThoughtSpot returns a unique `conversation_identifier` that must be passed to `sendMessage` to continue the conversation. #### Error responses | Code | Description | |------|-------------| | 401 | Unauthorized — authentication token is missing, expired, or invalid. | | 403 | Forbidden — the authenticated user does not have `CAN_USE_SPOTTER` privilege or lacks view permission on the specified metadata object. | > ###### Note: > * This endpoint is currently in Beta. Breaking changes may be introduced before the endpoint is made Generally Available. > * This endpoint requires Spotter - please contact ThoughtSpot support to enable Spotter on your cluster. + * @param createConversationRequest + */ + createConversation(createConversationRequest: CreateConversationRequest, _options?: Configuration): Promise; + /** + * Version: 10.15.0.cl or later Suggests the most relevant data sources for a given natural language query, ranked by confidence with LLM-generated reasoning. Requires `CAN_USE_SPOTTER` privilege and at least view-level access to the underlying metadata entities referenced in the response. #### Usage guidelines The request must include: - `query`: the natural language question to find relevant data sources for If the request is successful, the API returns a ranked list of suggested data sources, each containing: - `confidence`: a float score indicating the model\'s confidence in the relevance of the suggestion - `details`: metadata about the data source - `data_source_identifier`: the unique ID of the data source - `data_source_name`: the display name of the data source - `description`: a description of the data source - `reasoning`: LLM-generated rationale explaining why the data source was recommended #### Error responses | Code | Description | |------|--------------------------------------------------------------------------------------------------------------------------------------------| | 401 | Unauthorized — authentication token is missing, expired, or invalid. | | 403 | Forbidden — the authenticated user does not have `CAN_USE_SPOTTER` privilege or lacks view permission on the underlying metadata entities. | > ###### Note: > * This endpoint is currently in Beta. Breaking changes may be introduced before it is made Generally Available. > * This endpoint requires Spotter — please contact ThoughtSpot Support to enable Spotter on your cluster. + * @param getDataSourceSuggestionsRequest + */ + getDataSourceSuggestions(getDataSourceSuggestionsRequest: GetDataSourceSuggestionsRequest, _options?: Configuration): Promise; + /** + * Version: 10.15.0.cl or later Retrieves existing natural language (NL) instructions configured for a specific data model. These instructions guide the AI system in understanding data context and generating more accurate responses. Requires `CAN_USE_SPOTTER` privilege, at least view access on the data model, and a bearer token corresponding to the org where the data model exists. #### Usage guidelines The request must include: - `data_source_identifier`: the unique ID of the data model to retrieve instructions for If the request is successful, the API returns: - `nl_instructions_info`: an array of instruction objects, each containing: - `instructions`: the configured text instructions for AI processing - `scope`: the scope of the instruction — currently only `GLOBAL` is supported #### Instructions scope - **GLOBAL**: Instructions that apply globally across the system on the given data-model (currently only global instructions are supported) #### Error responses | Code | Description | |------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| | 401 | Unauthorized — authentication token is missing, expired, or invalid. | | 403 | Forbidden — the authenticated user does not have `CAN_USE_SPOTTER` privilege, lacks view access on the data model, or the bearer token does not correspond to the org where the data model exists. | > ###### Note: > > - To use this API, the user needs at least view access on the data model, and must use the bearer token corresponding to the org where the data model exists. > - This endpoint is currently in Beta. Breaking changes may be introduced before the endpoint is made Generally Available. > - Available from version 10.15.0.cl and later. > - This endpoint requires Spotter — please contact ThoughtSpot Support to enable Spotter on your cluster. > - Use this API to review currently configured instructions before modifying them with `setNLInstructions`. + * @param getNLInstructionsRequest + */ + getNLInstructions(getNLInstructionsRequest: GetNLInstructionsRequest, _options?: Configuration): Promise; + /** + * Version: 10.13.0.cl or later Breaks down a natural language query into a series of smaller analytical sub-questions, each mapped to a relevant data source. Requires `CAN_USE_SPOTTER` privilege and at least view-level access to the referenced metadata objects. #### Usage guidelines The request must include: - `query`: the natural language question to decompose into analytical sub-questions - `metadata_context`: at least one of the following context identifiers to guide question generation: - `conversation_identifier` — an existing conversation session ID - `answer_identifiers` — a list of Answer GUIDs - `liveboard_identifiers` — a list of Liveboard GUIDs - `data_source_identifiers` — a list of data source GUIDs Optional parameters for refining the output: - `ai_context`: additional context to improve response quality - `content` — supplementary text or CSV data as string input - `instructions` — custom text instructions for the AI system - `limit_relevant_questions`: maximum number of questions to return (default: `5`) - `bypass_cache`: if `true`, forces fresh computation instead of returning cached results If the request is successful, the API returns a list of relevant analytical questions, each containing: - `query`: the generated sub-question - `data_source_identifier`: the unique ID of the data source the question targets - `data_source_name`: the display name of the corresponding data source #### Error responses | Code | Description | |------|---------------------------------------------------------------------------------------------------------------------------------------| | 401 | Unauthorized — authentication token is missing, expired, or invalid. | | 403 | Forbidden — the authenticated user does not have `CAN_USE_SPOTTER` privilege or lacks view access to the referenced metadata objects. | > ###### Note: > * This endpoint is currently in Beta. Breaking changes may be introduced before the endpoint is made Generally Available. > * This endpoint requires Spotter - please contact ThoughtSpot support to enable Spotter on your cluster. + * @param getRelevantQuestionsRequest + */ + getRelevantQuestions(getRelevantQuestionsRequest: GetRelevantQuestionsRequest, _options?: Configuration): Promise; + /** + * Version: 10.7.0.cl or later **Deprecated** — Use `getRelevantQuestions` instead (available from 10.13.0.cl). Breaks down a topical or goal-oriented natural language question into smaller, actionable analytical sub-questions, each mapped to a relevant data source for independent execution. Requires `CAN_USE_SPOTTER` privilege and at least view-level access to the referenced metadata objects. #### Usage guidelines The request accepts the following parameters: - `nlsRequest`: contains the user `query` to decompose, along with optional `instructions` and `bypassCache` flag - `worksheetIds`: list of data source identifiers to scope the decomposition - `answerIds`: list of Answer GUIDs whose data guides the response - `liveboardIds`: list of Liveboard GUIDs whose data guides the response - `conversationId`: an existing conversation session ID for context continuity - `content`: supplementary text or CSV data to improve response quality - `maxDecomposedQueries`: maximum number of sub-questions to return (default: `5`) If the request is successful, the API returns a `decomposedQueryResponse` containing a list of `decomposedQueries`, each with: - `query`: the generated analytical sub-question - `worksheetId`: the unique ID of the data source the question targets - `worksheetName`: the display name of the corresponding data source #### Error responses | Code | Description | |------|---------------------------------------------------------------------------------------------------------------------------------------| | 401 | Unauthorized — authentication token is missing, expired, or invalid. | | 403 | Forbidden — the authenticated user does not have `CAN_USE_SPOTTER` privilege or lacks view access to the referenced metadata objects. | > ###### Note: > * This endpoint is deprecated since 10.13.0.cl. Use `getRelevantQuestions` for new integrations. > * This endpoint is currently in Beta. Breaking changes may be introduced before the endpoint is made Generally Available. > * This endpoint requires Spotter — please contact ThoughtSpot support to enable Spotter on your cluster. + * @param queryGetDecomposedQueryRequest + */ + queryGetDecomposedQuery(queryGetDecomposedQueryRequest: QueryGetDecomposedQueryRequest, _options?: Configuration): Promise; + /** + * Version: 26.5.0.cl or later Sends natural language messages to an existing Spotter agent conversation and returns the complete response synchronously. Requires `CAN_USE_SPOTTER` privilege and access to the metadata object associated with the conversation. The user must have access to the conversation session referenced by `conversation_identifier`. A conversation must first be created using the `createAgentConversation` API. #### Usage guidelines The request must include: - `conversation_identifier`: the unique session ID returned by `createAgentConversation`, used for context continuity and message tracking - `messages`: an array of one or more text messages to send to the agent The API returns an array of response objects, each containing: - `type`: the kind of response — `text`, `answer`, or `error` - `message`: the main content of the response - `metadata`: additional information depending on the message type (e.g., answer metadata includes analytics and visualization details) #### Error responses | Code | Description | |------|----------------------------------------------------------------------------------------------------------------------------------| | 401 | Unauthorized — authentication token is missing, expired, or invalid. | | 403 | Forbidden — the authenticated user does not have `CAN_USE_SPOTTER` privilege or lacks permission on the referenced conversation. | > ###### Note: > > - This endpoint is Generally Available from version 26.5.0.cl. > - This endpoint requires Spotter - please contact ThoughtSpot support to enable Spotter on your cluster. > - For real-time streamed responses, use `sendAgentConversationMessageStreaming` instead. + * @param conversationIdentifier Unique identifier for the conversation (used to track context) + * @param sendAgentConversationMessageRequest + */ + sendAgentConversationMessage(conversationIdentifier: string, sendAgentConversationMessageRequest: SendAgentConversationMessageRequest, _options?: Configuration): Promise; + /** + * Version: 26.5.0.cl or later Sends one or more natural language messages to an existing Spotter agent conversation and returns the response as a real-time Server-Sent Events stream. Requires `CAN_USE_SPOTTER` privilege and access to the metadata object associated with the conversation. The user must have access to the conversation session referenced by `conversation_identifier`. A conversation must first be created using the `createAgentConversation` API. #### Usage guidelines The request must include: - `conversation_identifier`: the unique session ID returned by `createAgentConversation`, used for context continuity and message tracking - `messages`: an array of one or more text messages to send to the agent If the request is valid, the API returns a Server-Sent Events (SSE) stream. Each line has the form `data: [{\"type\": \"...\", ...}]` — a JSON array of event objects. Event types include: - `ack`: confirms receipt of the request (`node_id`) - `conv_title`: conversation title (`title`, `conv_id`) - `notification`: status updates on operations (`group_id`, `metadata`, `code` — e.g. `TOOL_CALL_NOTIFICATION`, `nls_start`, `FINAL_RESPONSE_NOTIFICATION`) - `text-chunk`: incremental content chunks (`id`, `group_id`, `metadata` with `format` and `type` such as `thinking` or `text`, `content`) - `text`: full text block with same structure as `text-chunk` - `answer`: structured answer with metadata (`id`, `group_id`, `metadata` with `sage_query`, `session_id`, `title`, etc., `title`) - `error`: if a failure occurs #### Error responses | Code | Description | | ---- | -------------------------------------------------------------------------------------------------------------------------------- | | 401 | Unauthorized — authentication token is missing, expired, or invalid. | | 403 | Forbidden — the authenticated user does not have `CAN_USE_SPOTTER` privilege or lacks permission on the referenced conversation. | > ###### Note: > > - This endpoint is Generally Available from version 26.5.0.cl. > - This endpoint requires Spotter - please contact ThoughtSpot support to enable Spotter on your cluster. > - The streaming protocol uses Server-Sent Events (SSE). > - For the complete response in a single payload, use `sendAgentConversationMessage` instead. + * @param conversationIdentifier Unique identifier for the conversation (used to track context) + * @param sendAgentConversationMessageStreamingRequest + */ + sendAgentConversationMessageStreaming(conversationIdentifier: string, sendAgentConversationMessageStreamingRequest: SendAgentConversationMessageStreamingRequest, _options?: Configuration): Promise; + /** + * Version: 26.2.0.cl or later **Deprecated** — Use `sendAgentConversationMessage` instead. Send natural language messages to an existing Spotter agent conversation and returns the complete response synchronously. Requires `CAN_USE_SPOTTER` privilege and access to the metadata object associated with the conversation. The user must have access to the conversation session referenced by `conversation_identifier`. A conversation must first be created using the `createAgentConversation` API. #### Usage guidelines The request must include: - `conversation_identifier`: the unique session ID returned by `createAgentConversation`, used for context continuity and message tracking - `messages`: an array of one or more text messages to send to the agent The API returns an array of response objects, each containing: - `type`: the kind of response — `text`, `answer`, or `error` - `message`: the main content of the response - `metadata`: additional information depending on the message type (e.g., answer metadata includes analytics and visualization details) #### Error responses | Code | Description | |------|----------------------------------------------------------------------------------------------------------------------------------| | 401 | Unauthorized — authentication token is missing, expired, or invalid. | | 403 | Forbidden — the authenticated user does not have `CAN_USE_SPOTTER` privilege or lacks permission on the referenced conversation. | > ###### Note: > > - This endpoint is deprecated. Use `sendAgentConversationMessage` for new integrations. > - This endpoint is currently in Beta. Breaking changes may be introduced before the endpoint is made Generally Available. > - This endpoint requires Spotter - please contact ThoughtSpot support to enable Spotter on your cluster. + * @param conversationIdentifier Unique identifier for the conversation (used to track context) + * @param sendAgentMessageRequest + */ + sendAgentMessage(conversationIdentifier: string, sendAgentMessageRequest: SendAgentMessageRequest, _options?: Configuration): Promise; + /** + * Version: 26.2.0.cl or later **Deprecated** — Use `sendAgentConversationMessageStreaming` instead. Sends one or more natural language messages to an existing Spotter agent conversation and returns the response as a real-time Server-Sent Events stream. Requires `CAN_USE_SPOTTER` privilege and access to the metadata object associated with the conversation. The user must have access to the conversation session referenced by `conversation_identifier`. A conversation must first be created using the `createAgentConversation` API. #### Usage guidelines The request must include: - `conversation_identifier`: the unique session ID returned by `createAgentConversation`, used for context continuity and message tracking - `messages`: an array of one or more text messages to send to the agent If the request is valid, the API returns a Server-Sent Events (SSE) stream. Each line has the form `data: [{\"type\": \"...\", ...}]` — a JSON array of event objects. Event types include: - `ack`: confirms receipt of the request (`node_id`) - `conv_title`: conversation title (`title`, `conv_id`) - `notification`: status updates on operations (`group_id`, `metadata`, `code` — e.g. `TOOL_CALL_NOTIFICATION`, `nls_start`, `FINAL_RESPONSE_NOTIFICATION`) - `text-chunk`: incremental content chunks (`id`, `group_id`, `metadata` with `format` and `type` such as `thinking` or `text`, `content`) - `text`: full text block with same structure as `text-chunk` - `answer`: structured answer with metadata (`id`, `group_id`, `metadata` with `sage_query`, `session_id`, `title`, etc., `title`) - `error`: if a failure occurs #### Error responses | Code | Description | |------|----------------------------------------------------------------------------------------------------------------------------------| | 401 | Unauthorized — authentication token is missing, expired, or invalid. | | 403 | Forbidden — the authenticated user does not have `CAN_USE_SPOTTER` privilege or lacks permission on the referenced conversation. | > ###### Note: > > - This endpoint is deprecated. Use `sendAgentConversationMessageStreaming` for new integrations. > - This endpoint is currently in Beta. Breaking changes may be introduced before the endpoint is made Generally Available. > - This endpoint requires Spotter - please contact ThoughtSpot support to enable Spotter on your cluster. > - The streaming protocol uses Server-Sent Events (SSE). + * @param sendAgentMessageStreamingRequest + */ + sendAgentMessageStreaming(sendAgentMessageStreamingRequest: SendAgentMessageStreamingRequest, _options?: Configuration): Promise; + /** + * Version: 10.4.0.cl or later Sends a follow-up message to an existing conversation within the context of a data model. Requires `CAN_USE_SPOTTER` privilege and at least view access to the metadata object specified in the request. A conversation must first be created using the `createConversation` API. #### Usage guidelines The request must include: - `conversation_identifier`: the unique session ID returned by `createConversation` - `metadata_identifier`: the unique ID of the data source used for the conversation - `message`: a natural language string with the follow-up question If the request is successful, the API returns an array of response messages, each containing: - `session_identifier`: the unique ID of the generated response - `generation_number`: the generation number of the response - `message_type`: the type of the response (e.g., `TSAnswer`) - `visualization_type`: the generated visualization type (`Chart`, `Table`, or `Undefined`) - `tokens` / `display_tokens`: the search tokens and user-friendly display tokens for the response #### Error responses | Code | Description | |------|-----------------------------------------------------------------------------------------------------------------------------------------| | 401 | Unauthorized — authentication token is missing, expired, or invalid. | | 403 | Forbidden — the authenticated user does not have `CAN_USE_SPOTTER` privilege or lacks view permission on the specified metadata object. | > ###### Note: > * This endpoint is currently in Beta. Breaking changes may be introduced before the endpoint is made Generally Available. > * This endpoint requires Spotter - please contact ThoughtSpot support to enable Spotter on your cluster. + * @param conversationIdentifier Unique identifier of the conversation. + * @param sendMessageRequest + */ + sendMessage(conversationIdentifier: string, sendMessageRequest: SendMessageRequest, _options?: Configuration): Promise; + /** + * Version: 10.15.0.cl or later This API allows users to set natural language (NL) instructions for a specific data-model to improve AI-generated answers and query processing. These instructions help guide the AI system to better understand the data context and provide more accurate responses. Requires `CAN_USE_SPOTTER` privilege, either edit access or `SPOTTER_COACHING_PRIVILEGE` on the data model, and a bearer token corresponding to the org where the data model exists. #### Usage guidelines To set NL instructions for a data-model, the request must include: - `data_source_identifier`: The unique ID of the data-model for which to set NL instructions - `nl_instructions_info`: An array of instruction objects, each containing: - `instructions`: Array of text instructions for the LLM - `scope`: The scope of the instruction (`GLOBAL`). Currently only `GLOBAL` is supported. It can be extended to data-model-user scope in future. #### Instructions scope - **GLOBAL**: instructions that apply to all users querying this data model If the request is successful, the API returns: - `success`: a boolean indicating whether the operation completed successfully #### Error responses | Code | Description | |------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| | 401 | Unauthorized — authentication token is missing, expired, or invalid. | | 403 | Forbidden — the authenticated user does not have `CAN_USE_SPOTTER` privilege, lacks edit access or `SPOTTER_COACHING_PRIVILEGE` on the data model, or the bearer token does not correspond to the org where the data model exists. | > ###### Note: > > - To use this API, the user needs either edit access or `SPOTTER_COACHING_PRIVILEGE` on the data model, and must use the bearer token corresponding to the org where the data model exists. > - This endpoint is currently in Beta. Breaking changes may be introduced before the endpoint is made Generally Available. > - Available from version 10.15.0.cl and later. > - This endpoint requires Spotter — please contact ThoughtSpot Support to enable Spotter on your cluster. > - Instructions help improve the accuracy and relevance of AI-generated responses for the specified data-model. + * @param setNLInstructionsRequest + */ + setNLInstructions(setNLInstructionsRequest: SetNLInstructionsRequest, _options?: Configuration): Promise; + /** + * Version: 10.4.0.cl or later Processes a natural language query against a specified data model and returns a single AI-generated answer without requiring a conversation session. Requires `CAN_USE_SPOTTER` privilege and at least view access to the metadata object specified in the request. #### Usage guidelines The request must include: - `query`: a natural language question (e.g., \"What were total sales last quarter?\") - `metadata_identifier`: the unique ID of the data source to query against If the request is successful, the API returns a response message containing: - `session_identifier`: the unique ID of the generated response - `generation_number`: the generation number of the response - `message_type`: the type of the response (e.g., `TSAnswer`) - `visualization_type`: the generated visualization type (`Chart`, `Table`, or `Undefined`) - `tokens` / `display_tokens`: the search tokens and user-friendly display tokens for the response #### Error responses | Code | Description | |------|-----------------------------------------------------------------------------------------------------------------------------------------| | 401 | Unauthorized — authentication token is missing, expired, or invalid. | | 403 | Forbidden — the authenticated user does not have `CAN_USE_SPOTTER` privilege or lacks view permission on the specified metadata object. | > ###### Note: > * This endpoint is currently in Beta. Breaking changes may be introduced before the endpoint is made Generally Available. > * This endpoint requires Spotter - please contact ThoughtSpot support to enable Spotter on your cluster. + * @param singleAnswerRequest + */ + singleAnswer(singleAnswerRequest: SingleAnswerRequest, _options?: Configuration): Promise; + /** + * Stops an in-progress agent conversation response. Version: 26.6.0.cl or later Version: 26.6.0.cl or later Stops an in-progress agent response for the specified conversation. Use this endpoint to cancel a response that is actively being generated — for example, when the user navigates away, reformulates their question, or no longer needs the current result. Requires `CAN_USE_SPOTTER` privilege and access to the specified conversation. #### Usage guidelines The request must include: - `conversation_identifier` *(path parameter)*: the unique ID of the conversation whose active response should be stopped, as returned by `createAgentConversation` A successful request returns an empty `204 No Content` response. If there is no active response in progress at the time of the call, the request is still treated as successful. After stopping a response, the conversation session remains active. You can continue sending messages using `sendAgentConversationMessage` or `sendAgentConversationMessageStreaming`. #### Example request ```bash POST /api/rest/2.0/ai/agent/conversation/{conversation_identifier}/stop-response ``` #### Typical usage scenario This endpoint is useful when integrating Spotter into a chat UI where users can cancel a long-running query. For example: 1. User sends a message via `sendAgentConversationMessageStreaming`. 2. User clicks a \"Stop generating\" button while the response is streaming. 3. Your client calls `stopConversation` with the active `conversation_identifier`. 4. The stream is terminated and the user can ask a new question. #### Error responses | Code | Description | |------|-------------| | 401 | Unauthorized — authentication token is missing, expired, or invalid. | | 403 | Forbidden — the authenticated user does not have `CAN_USE_SPOTTER` privilege or lacks access to the specified conversation. | > ###### Note: > > - Calling this endpoint when no response is in progress does not return an error. > - The conversation context is preserved after stopping — previous messages and answers remain accessible. > - Available from version 26.6.0.cl and later. > - This endpoint requires Spotter — please contact ThoughtSpot Support to enable Spotter on your cluster. > - This feature is available only for **Spotter 3** (`SPOTTER3`) version. + * @param conversationIdentifier Unique identifier of the conversation to stop. + */ + stopConversation(conversationIdentifier: string, _options?: Configuration): Promise; +} +declare class AIApiResponseProcessor { + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to createAgentConversation + * @throws ApiException if the response code was not in [200, 299] + */ + createAgentConversation(response: ResponseContext): Promise; + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to createConversation + * @throws ApiException if the response code was not in [200, 299] + */ + createConversation(response: ResponseContext): Promise; + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to getDataSourceSuggestions + * @throws ApiException if the response code was not in [200, 299] + */ + getDataSourceSuggestions(response: ResponseContext): Promise; + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to getNLInstructions + * @throws ApiException if the response code was not in [200, 299] + */ + getNLInstructions(response: ResponseContext): Promise; + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to getRelevantQuestions + * @throws ApiException if the response code was not in [200, 299] + */ + getRelevantQuestions(response: ResponseContext): Promise; + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to queryGetDecomposedQuery + * @throws ApiException if the response code was not in [200, 299] + */ + queryGetDecomposedQuery(response: ResponseContext): Promise; + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to sendAgentConversationMessage + * @throws ApiException if the response code was not in [200, 299] + */ + sendAgentConversationMessage(response: ResponseContext): Promise; + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to sendAgentConversationMessageStreaming + * @throws ApiException if the response code was not in [200, 299] + */ + sendAgentConversationMessageStreaming(response: ResponseContext): Promise; + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to sendAgentMessage + * @throws ApiException if the response code was not in [200, 299] + */ + sendAgentMessage(response: ResponseContext): Promise; + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to sendAgentMessageStreaming + * @throws ApiException if the response code was not in [200, 299] + */ + sendAgentMessageStreaming(response: ResponseContext): Promise; + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to sendMessage + * @throws ApiException if the response code was not in [200, 299] + */ + sendMessage(response: ResponseContext): Promise>; + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to setNLInstructions + * @throws ApiException if the response code was not in [200, 299] + */ + setNLInstructions(response: ResponseContext): Promise; + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to singleAnswer + * @throws ApiException if the response code was not in [200, 299] + */ + singleAnswer(response: ResponseContext): Promise; + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to stopConversation + * @throws ApiException if the response code was not in [200, 299] + */ + stopConversation(response: ResponseContext): Promise; +} + +/** + * no description + */ +declare class AuthenticationApiRequestFactory extends BaseAPIRequestFactory { + /** + * Version: 26.6.0.cl or later Enables or disables authentication at cluster or org level for the specified auth type. Currently supports `TRUSTED_AUTH`. #### Required privileges Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) or `CONTROL_TRUSTED_AUTH` (**Can Enable or Disable Trusted Authentication**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled, the `CONTROL_TRUSTED_AUTH` privilege is required. #### Usage guidelines Use `cluster_preferences` to enable or disable authentication at the cluster level. Cluster-level settings can only be configured from the Primary Org. - `ENABLED` — Generates a new access token if one does not exist. An existing token is preserved. - `DISABLED` — Revokes the existing cluster-level access token. Use `org_preferences` to enable or disable authentication for one or more Orgs. Each entry must include an `org_identifier` (unique ID or name) and an `auth_status`. Org-level configuration requires the per-Org authentication feature to be enabled on your instance. - `ENABLED` — Generates a new org-level access token if one does not exist. - `DISABLED` — Revokes the existing org-level access token for that Org. Both `cluster_preferences` and `org_preferences` are optional. Omitting a field leaves the corresponding settings unchanged. If both are omitted, the API returns `204 No Content` without making any changes. **Note**: Cluster-level and org-level settings are independent of each other. Enabling or disabling one does not affect the other. + * @param configureAuthSettingsRequest + */ + configureAuthSettings(configureAuthSettingsRequest: ConfigureAuthSettingsRequest, _options?: Configuration): Promise; + /** + * Version: 9.0.0.cl or later Retrieves details of the current user session for the token provided in the request header. Any ThoughtSpot user can access this endpoint and send an API request. The data returned in the API response varies according to user\'s privilege and object access permissions. **NOTE**: In ThoughtSpot, users with cluster administration privileges can access all Orgs by default. However, unless the administrator is explicitly added to an Org, the Orgs list in the session information returned by the API will include only the Primary Org. To include other Orgs in the API response, you must explicitly add the administrator to each Org in the Admin settings page in the UI or via user REST API. + */ + getCurrentUserInfo(_options?: Configuration): Promise; + /** + * Version: 9.4.0.cl or later Retrieves details of the current session token for the bearer token provided in the request header. This API endpoint does not create a new token. Instead, it returns details about the token, including the token string, creation time, expiration time, and the associated user. Use this endpoint to introspect your current session token, debug authentication issues, or when a frontend application needs session token details. Any ThoughtSpot user with a valid bearer token can access this endpoint and send an API request + */ + getCurrentUserToken(_options?: Configuration): Promise; + /** + * Version: 10.4.0.cl or later Creates an authentication token that provides values for the formula variables in the Row Level Security (RLS) rules for a given user. Recommended for use cases that require Attribute-based access control (ABAC) via RLS. #### Required privileges To add a new user and assign privileges during auto-creation, the `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege is required. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled, the `CONTROL_TRUSTED_AUTH` (**Can Enable or Disable Trusted Authentication**) privilege and edit access to the data source are required. To configure formula variables for all Orgs on your instance or the Primary Org, cluster administration privileges are required. Org administrators can configure formula variables for their respective Orgs. If Role-Based Access Control (RBAC) is enabled, users with the `CAN_MANAGE_VARIABLES` (**Can manage variables**) role privilege can also create and manage variables for their Org context. #### Usage guidelines You can generate a token by providing a `username` and `password`, or by using a `secret_key`. To generate a `secret_key`, the administrator must enable [Trusted authentication](https://developers.thoughtspot.com/docs/trusted-auth-secret-key) in the **Develop** > **Customizations** > **Security Settings** page. **Note**: * When both `password` and `secret_key` are included in the API request, `password` takes precedence. * If [Multi-Factor Authentication (MFA)](https://docs.thoughtspot.com/cloud/latest/authentication-local-mfa) is enabled on your instance, the API login request with `username` and `password` returns an error. You can switch to token-based authentication with `secret_key` or contact ThoughtSpot Support for assistance. The token obtained from ThoughtSpot is valid for 5 minutes by default. You can configure the token expiration time as required. #### ABAC via RLS To implement ABAC via RLS and assign security entitlements to users during session creation, generate a token with custom variable values. The values set in the authentication token are applied to the formula variables referenced in RLS rules at the table level, which determines the data each user can access based on their entitlements. The variable values can be configured to persist for a specific set of Models in user sessions initiated with the token, allowing different RLS rules to be set for different data models. Once defined, the rules are added to the user\'s `variable_values` object, after which all sessions will use the persisted values. For more information, see [ABAC via tokens Documentation](https://developers.thoughtspot.com/docs/abac-via-rls-variables). ##### Formula variables Before defining variable values, ensure the variables are created and available on your instance. To create a formula variable, you can use the **Create variable** (`/api/rest/2.0/template/variables/create`) REST API endpoint, with the variable `type` set as `Formula_Variable` in the API request. The API doesn\'t support `\"persist_option\": \"RESET\"` and `\"persist_option\": \"NONE\"` when `variable_values` are defined in the request. If you are using `variable_values` for token generation, you must use other supported persist options such as `APPEND` or `REPLACE`. If you want to use `RESET` or `NONE`, do not pass any `variable_values`. In such cases, `variable_values` will remain unaffected. #### Supported objects The supported object type is `LOGICAL_TABLE`. When using `object_id` with `variable_values`, models are supported. #### Just-in-time provisioning For [just-in-time user creation and provisioning](https://developers.thoughtspot.com/docs/just-in-time-provisioning), specify the following attributes in the API request: * `auto_create` * `username` * `display_name` * `email` * `groups` Set `auto_create` to `true` if the username does not exist in ThoughtSpot. If the username already exists in ThoughtSpot and `auto_create` is set to `true`, user properties such as display name, email, Org and group entitlements will not be updated with new values. Setting `auto_create` to `true` does not create formula variables. Hence, this setting will not be applicable to `variable_values`. #### Important point to note All options in the token creation APIs that define user access to data in ThoughtSpot will take effect during token creation, not when the token is used for authentication. For example, `auto_create:true` will create the user when the authentication token is created. Persist options such as `APPEND` and `REPLACE` will persist `variable_values` on the user profile when the token is created. + * @param getCustomAccessTokenRequest + */ + getCustomAccessToken(getCustomAccessTokenRequest: GetCustomAccessTokenRequest, _options?: Configuration): Promise; + /** + * Version: 9.0.0.cl or later Generates an authentication token for creating a full session in ThoughtSpot for a given user. Recommended for use cases that do not require Attribute-based access control (ABAC) via Row Level Security (RLS). #### Usage guidelines You can generate a token for a user by providing a `username` and `password`, or by using the `secret_key` generated for your instance. To generate a `secret_key`, the administrator must enable [Trusted authentication](https://developers.thoughtspot.com/docs/trusted-auth-secret-key) in the **Develop** > **Customizations** > **Security Settings** page. **Note**: * When both `password` and `secret_key` are included in the API request, `password` takes precedence. * If [Multi-Factor Authentication (MFA)](https://docs.thoughtspot.com/cloud/latest/authentication-local-mfa) is enabled on your instance, the API login request with `username` and `password` returns an error. You can switch to token-based authentication with `secret_key` or contact ThoughtSpot Support for assistance. The token obtained from ThoughtSpot is valid for 5 minutes by default. You can configure the token expiration time as required. #### Just-in-time provisioning For [just-in-time user creation and provisioning](https://developers.thoughtspot.com/docs/just-in-time-provisioning), specify the following attributes in the API request: * `auto_create` * `username` * `display_name` * `email` * `group_identifiers` Set `auto_create` to `true` if the username does not exist in ThoughtSpot. If the user already exists in ThoughtSpot and `auto_create` is set to `true`, user properties such as display name, email and group assignment will be updated. To add a new user and assign privileges during auto-creation, the `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege is required. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled, the `CONTROL_TRUSTED_AUTH` (**Can Enable or Disable Trusted Authentication**) privilege is required. #### Important point to note All options in the token creation APIs that define user access to data in ThoughtSpot will take effect during token creation, not when the token is used for authentication. For example, `auto_create:true` will create the user when the authentication token is created. + * @param getFullAccessTokenRequest + */ + getFullAccessToken(getFullAccessTokenRequest: GetFullAccessTokenRequest, _options?: Configuration): Promise; + /** + * Version: 9.0.0.cl or later Generates an authentication token that provides access to a specific metadata object. This object list is intersected with the list of objects the user is allowed to access via group membership. For more information, see [Object security](https://docs.thoughtspot.com/cloud/latest/security-data-object#object_security). #### Usage guidelines You can generate a token for a user by providing a `username` and `password`, or by using the `secret_key` generated for your instance. To generate a `secret_key`, the administrator must enable [Trusted authentication](https://developers.thoughtspot.com/docs/trusted-auth-secret-key) in the **Develop** > **Customizations** > **Security Settings** page. **Note**: * When both `password` and `secret_key` are included in the API request, `password` takes precedence. * If [Multi-Factor Authentication (MFA)](https://docs.thoughtspot.com/cloud/latest/authentication-local-mfa) is enabled on your instance, the API login request with `username` and `password` returns an error. You can switch to token-based authentication with `secret_key` or contact ThoughtSpot Support for assistance. The token obtained from ThoughtSpot is valid for 5 minutes by default. You can configure the token expiration time as required. #### Just-in-time provisioning For [just-in-time user creation and provisioning](https://developers.thoughtspot.com/docs/just-in-time-provisioning), specify the following attributes in the API request: * `auto_create` * `username` * `display_name` * `email` * `group_identifiers` Set `auto_create` to `true` if the user is not available in ThoughtSpot. If the user already exists in ThoughtSpot and the `auto_create` parameter is set to `true`, user properties such as display name, email, and group assignment will be updated. To add a new user and assign privileges, the `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege is required. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled, the `CONTROL_TRUSTED_AUTH`(**Can Enable or Disable Trusted Authentication**) privilege is required. #### Important point to note All options in the token creation APIs that define user access to data in ThoughtSpot will take effect during token creation, not when the token is used for authentication. For example, `auto_create:true` will create the user when the authentication token is created. + * @param getObjectAccessTokenRequest + */ + getObjectAccessToken(getObjectAccessTokenRequest: GetObjectAccessTokenRequest, _options?: Configuration): Promise; + /** + * Version: 9.0.0.cl or later Creates a login session for a ThoughtSpot user with Basic authentication. In Basic authentication method, REST clients log in to ThoughtSpot using `username` and `password` attributes. On a multi-tenant cluster with Orgs, users can pass the ID of the Org in the API request to log in to a specific Org context. **Note**: If Multi-Factor Authentication (MFA) is enabled on your instance, the API login request with basic authentication (`username` and `password` ) returns an error. Contact ThoughtSpot Support for assistance. A successful login returns a session cookie that can be used in your subsequent API requests. + * @param loginRequest + */ + login(loginRequest: LoginRequest, _options?: Configuration): Promise; + /** + * Version: 9.0.0.cl or later Logs out a user from their current session. + */ + logout(_options?: Configuration): Promise; + /** + * Version: 9.0.0.cl or later Revokes the authentication token issued for current user session. The token of your current session expires when you make a call to the `/api/rest/2.0/auth/token/revoke` endpoint. the users will not be able to access ThoughtSpot objects until a new token is obtained. To restart your session, request for a new token from ThoughtSpot. See [Get Full Access Token](#/http/api-endpoints/authentication/get-full-access-token). + * @param revokeTokenRequest + */ + revokeToken(revokeTokenRequest: RevokeTokenRequest, _options?: Configuration): Promise; + /** + * Version: 26.6.0.cl or later Returns the authentication configuration for the specified auth type at cluster and org level. Currently supports `TRUSTED_AUTH`. #### Required privileges Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) or `CONTROL_TRUSTED_AUTH` (**Can Enable or Disable Trusted Authentication**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled, the `CONTROL_TRUSTED_AUTH` privilege is required. #### Usage guidelines Use `scope` to control which level of settings are returned: - `CLUSTER` — Returns cluster-level authentication status and access tokens. Accessible only from the Primary Org. - `ORG` — Returns org-level authentication status and access tokens for the current Org. Requires the per-Org authentication feature to be enabled on your instance. - If `scope` is omitted, both cluster and org-level settings are returned based on the caller\'s org context and feature availability. The `access_tokens` array in `cluster_preferences` or `org_preferences` is omitted when no token is configured at that level. **Note**: Access tokens returned in the response are sensitive credentials. Treat them with the same care as passwords. + * @param searchAuthSettingsRequest + */ + searchAuthSettings(searchAuthSettingsRequest: SearchAuthSettingsRequest, _options?: Configuration): Promise; + /** + * Version: 9.12.0.cl or later Validates the authentication token specified in the API request. If your token is not valid, [Get a new token](#/http/api-endpoints/authentication/get-full-access-token). + * @param validateTokenRequest + */ + validateToken(validateTokenRequest: ValidateTokenRequest, _options?: Configuration): Promise; +} +declare class AuthenticationApiResponseProcessor { + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to configureAuthSettings + * @throws ApiException if the response code was not in [200, 299] + */ + configureAuthSettings(response: ResponseContext): Promise; + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to getCurrentUserInfo + * @throws ApiException if the response code was not in [200, 299] + */ + getCurrentUserInfo(response: ResponseContext): Promise; + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to getCurrentUserToken + * @throws ApiException if the response code was not in [200, 299] + */ + getCurrentUserToken(response: ResponseContext): Promise; + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to getCustomAccessToken + * @throws ApiException if the response code was not in [200, 299] + */ + getCustomAccessToken(response: ResponseContext): Promise; + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to getFullAccessToken + * @throws ApiException if the response code was not in [200, 299] + */ + getFullAccessToken(response: ResponseContext): Promise; + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to getObjectAccessToken + * @throws ApiException if the response code was not in [200, 299] + */ + getObjectAccessToken(response: ResponseContext): Promise; + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to login + * @throws ApiException if the response code was not in [200, 299] + */ + login(response: ResponseContext): Promise; + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to logout + * @throws ApiException if the response code was not in [200, 299] + */ + logout(response: ResponseContext): Promise; + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to revokeToken + * @throws ApiException if the response code was not in [200, 299] + */ + revokeToken(response: ResponseContext): Promise; + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to searchAuthSettings + * @throws ApiException if the response code was not in [200, 299] + */ + searchAuthSettings(response: ResponseContext): Promise; + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to validateToken + * @throws ApiException if the response code was not in [200, 299] + */ + validateToken(response: ResponseContext): Promise; +} + +/** + * no description + */ +declare class CollectionsApiRequestFactory extends BaseAPIRequestFactory { + /** + * Version: 26.4.0.cl or later Creates a new collection in ThoughtSpot. Collections allow you to organize and group related metadata objects such as Liveboards, Answers, worksheets, and other data objects. You can also create nested collections (sub-collections) to build a hierarchical structure. #### Supported operations The API endpoint lets you perform the following operations: * Create a new collection * Add metadata objects (Liveboards, Answers, Logical Tables) to the collection * Create nested collections by adding sub-collections + * @param createCollectionRequest + */ + createCollection(createCollectionRequest: CreateCollectionRequest, _options?: Configuration): Promise; + /** + * Version: 26.4.0.cl or later Deletes one or more collections from ThoughtSpot. #### Delete options * **delete_children**: When set to `true`, deletes the child objects (metadata items) within the collection that the user has access to. Objects that the user does not have permission to delete will be skipped. * **dry_run**: When set to `true`, performs a preview of the deletion operation without actually deleting anything. The response shows what would be deleted, allowing you to review before committing the deletion. #### Response The response includes: * **metadata_deleted**: List of metadata objects that were successfully deleted * **metadata_skipped**: List of metadata objects that were skipped due to lack of permissions or other constraints + * @param deleteCollectionRequest + */ + deleteCollection(deleteCollectionRequest: DeleteCollectionRequest, _options?: Configuration): Promise; + /** + * Version: 26.4.0.cl or later Gets a list of collections available in ThoughtSpot. To get details of a specific collection, specify the collection GUID or name. You can also filter the API response based on the collection name pattern, author, and other criteria. #### Search options * **name_pattern**: Use \'%\' as a wildcard character to match collection names * **collection_identifiers**: Search for specific collections by their GUIDs or names * **include_metadata**: When set to `true`, includes the metadata objects within each collection in the response **NOTE**: If the API returns an empty list, consider increasing the value of the `record_size` parameter. To search across all available collections, set `record_size` to `-1`. + * @param searchCollectionsRequest + */ + searchCollections(searchCollectionsRequest: SearchCollectionsRequest, _options?: Configuration): Promise; + /** + * Version: 26.4.0.cl or later Updates an existing collection in ThoughtSpot. #### Supported operations This API endpoint lets you perform the following operations: * Update collection name and description * Change visibility settings * Add metadata objects to the collection (operation: ADD) * Remove metadata objects from the collection (operation: REMOVE) * Replace all metadata objects in the collection (operation: REPLACE) #### Operation types * **ADD**: Adds the specified metadata objects to the existing collection without removing current items * **REMOVE**: Removes only the specified metadata objects from the collection * **REPLACE**: Replaces all existing metadata objects with the specified items (default behavior) + * @param collectionIdentifier Unique GUID of the collection. Note: Collection names cannot be used as identifiers since duplicate names are allowed. + * @param updateCollectionRequest + */ + updateCollection(collectionIdentifier: string, updateCollectionRequest: UpdateCollectionRequest, _options?: Configuration): Promise; +} +declare class CollectionsApiResponseProcessor { + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to createCollection + * @throws ApiException if the response code was not in [200, 299] + */ + createCollection(response: ResponseContext): Promise; + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to deleteCollection + * @throws ApiException if the response code was not in [200, 299] + */ + deleteCollection(response: ResponseContext): Promise; + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to searchCollections + * @throws ApiException if the response code was not in [200, 299] + */ + searchCollections(response: ResponseContext): Promise; + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to updateCollection + * @throws ApiException if the response code was not in [200, 299] + */ + updateCollection(response: ResponseContext): Promise; +} + +/** + * no description + */ +declare class ConnectionConfigurationsApiRequestFactory extends BaseAPIRequestFactory { + /** + * Version: 10.12.0.cl or later Gets connection configuration objects. Requires `DATAMANAGEMENT` (**Can manage data**) and edit permissions to the connection object, or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) privilege is required. #### Usage guidelines * To get a list of all configurations available in the ThoughtSpot system, send the API request with only the connection name or GUID in the request body. * To fetch details of a configuration object, specify the configuration object name or GUID. + * @param connectionConfigurationSearchRequest + */ + connectionConfigurationSearch(connectionConfigurationSearchRequest: ConnectionConfigurationSearchRequest, _options?: Configuration): Promise; + /** + * Version: 10.12.0.cl or later Creates an additional configuration to an existing connection to a data warehouse. Requires `DATAMANAGEMENT` (**Can manage data**) or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) privilege is required. #### Usage guidelines * A JSON map of configuration attributes in `configuration`. The following example shows the configuration attributes: ``` { \"user\":\"DEV_USER\", \"password\":\"TestConn123\", \"role\":\"DEV\", \"warehouse\":\"DEV_WH\" } ``` * If the `policy_type` is `PRINCIPALS`, then `policy_principals` is a required field. * If the `policy_type` is `PROCESSES`, then `policy_processes` is a required field. * If the `policy_type` is `NO_POLICY`, then `policy_principals` and `policy_processes` are not required fields. #### Parameterized Connection Support For parameterized connections that use OAuth authentication, only the same_as_parent and policy_process_options attributes are allowed in the API request. These attributes are not applicable to connections that are not parameterized. + * @param createConnectionConfigurationRequest + */ + createConnectionConfiguration(createConnectionConfigurationRequest: CreateConnectionConfigurationRequest, _options?: Configuration): Promise; + /** + * Version: 10.12.0.cl or later Deletes connection configuration objects. Requires `DATAMANAGEMENT` (**Can manage data**) and edit permissions to the connection object, or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) privilege is required. + * @param deleteConnectionConfigurationRequest + */ + deleteConnectionConfiguration(deleteConnectionConfigurationRequest: DeleteConnectionConfigurationRequest, _options?: Configuration): Promise; + /** + * Version: 10.12.0.cl or later Updates a connection configuration object. Requires `DATAMANAGEMENT` (**Can manage data**) and edit permissions to the connection object, or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) privilege is required. #### Supported operations This API endpoint lets you perform the following operations in a single API request: * Edit the name or description of the configuration * Edit the configuration properties * Edit the `policy_type` * Edit the type of authentication * Enable or disable a configuration #### Parameterized Connection Support For parameterized oauth based connections, only the `same_as_parent` and `policy_process_options` attributes are allowed. These attributes are not applicable to connections that are not parameterized. **NOTE**: When updating a configuration where `disabled` is `true`, you must reset `disabled` to `true` in your update request payload. If not explicitly set again, the API will default `disabled` to `false`. + * @param configurationIdentifier Unique ID or name of the configuration. + * @param updateConnectionConfigurationRequest + */ + updateConnectionConfiguration(configurationIdentifier: string, updateConnectionConfigurationRequest: UpdateConnectionConfigurationRequest, _options?: Configuration): Promise; +} +declare class ConnectionConfigurationsApiResponseProcessor { + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to connectionConfigurationSearch + * @throws ApiException if the response code was not in [200, 299] + */ + connectionConfigurationSearch(response: ResponseContext): Promise>; + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to createConnectionConfiguration + * @throws ApiException if the response code was not in [200, 299] + */ + createConnectionConfiguration(response: ResponseContext): Promise; + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to deleteConnectionConfiguration + * @throws ApiException if the response code was not in [200, 299] + */ + deleteConnectionConfiguration(response: ResponseContext): Promise; + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to updateConnectionConfiguration + * @throws ApiException if the response code was not in [200, 299] + */ + updateConnectionConfiguration(response: ResponseContext): Promise; +} + +/** + * no description + */ +declare class ConnectionsApiRequestFactory extends BaseAPIRequestFactory { + /** + * Version: 9.2.0.cl or later Creates a connection to a data warehouse for live query services. Requires `DATAMANAGEMENT` (**Can manage data**) or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) privilege is required. #### Create a connection without tables To create a connection without tables: 1. Pass these parameters in your API request. * Name of the connection. * Type of the data warehouse to connect to. * A JSON map of configuration attributes in `data_warehouse_config`. The following example shows the configuration attributes for a SnowFlake connection: ``` { \"configuration\":{ \"accountName\":\"thoughtspot_partner\", \"user\":\"tsadmin\", \"password\":\"TestConn123\", \"role\":\"sysadmin\", \"warehouse\":\"MEDIUM_WH\" }, \"authenticationType\": \"SERVICE_ACCOUNT\", \"externalDatabases\":[ ] } ``` 2. Set `validate` to `false`. **NOTE:** If the `authentication_type` is anything other than SERVICE_ACCOUNT, you must explicitly provide the authenticationType property in the payload. If you do not specify authenticationType, the API will default to SERVICE_ACCOUNT as the authentication type. #### Create a connection with tables If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) and `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` (**Can manage data models**) privilege is required. To create a connection with tables: 1. Pass these parameters in your API request. * Name of the connection. * Type of the data warehouse to connect to. * A JSON map of configuration attributes, database details, and table properties in `data_warehouse_config` as shown in the following example: ``` { \"configuration\":{ \"accountName\":\"thoughtspot_partner\", \"user\":\"tsadmin\", \"password\":\"TestConn123\", \"role\":\"sysadmin\", \"warehouse\":\"MEDIUM_WH\" }, \"authenticationType\": \"SERVICE_ACCOUNT\", \"externalDatabases\":[ { \"name\":\"AllDatatypes\", \"isAutoCreated\":false, \"schemas\":[ { \"name\":\"alldatatypes\", \"tables\":[ { \"name\":\"allDatatypes\", \"type\":\"TABLE\", \"description\":\"\", \"selected\":true, \"linked\":true, \"columns\":[ { \"name\":\"CNUMBER\", \"type\":\"INT64\", \"canImport\":true, \"selected\":true, \"isLinkedActive\":true, \"isImported\":false, \"tableName\":\"allDatatypes\", \"schemaName\":\"alldatatypes\", \"dbName\":\"AllDatatypes\" }, { \"name\":\"CDECIMAL\", \"type\":\"INT64\", \"canImport\":true, \"selected\":true, \"isLinkedActive\":true, \"isImported\":false, \"tableName\":\"allDatatypes\", \"schemaName\":\"alldatatypes\", \"dbName\":\"AllDatatypes\" } ] } ] } ] } ] } ``` 2. Set `validate` to `true`. **NOTE:** If the `authentication_type` is anything other than SERVICE_ACCOUNT, you must explicitly provide the authenticationType property in the payload. If you do not specify authenticationType, the API will default to SERVICE_ACCOUNT as the authentication type. + * @param createConnectionRequest + */ + createConnection(createConnectionRequest: CreateConnectionRequest, _options?: Configuration): Promise; + /** + * Version: 9.2.0.cl or later **Important**: This endpoint is deprecated and will be removed from ThoughtSpot in September 2025. ThoughtSpot strongly recommends using the [Delete Connection V2](#/http/api-endpoints/connections/delete-connection-v2) endpoint to delete your connection objects. #### Usage guidelines Deletes a connection object. Requires `DATAMANAGEMENT` (**Can manage data**) and edit permissions to the connection object, or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) privilege is required. **Note**: If a connection has dependent objects, make sure you remove its associations before the delete operation. + * @param deleteConnectionRequest + */ + deleteConnection(deleteConnectionRequest: DeleteConnectionRequest, _options?: Configuration): Promise; + /** + * Version: 10.4.0.cl or later Deletes a connection object. **Note**: If a connection has dependent objects, make sure you remove its associations before the delete operation. Requires `DATAMANAGEMENT` (**Can manage data**) and edit permissions to the connection object, or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) privilege is required. + * @param connectionIdentifier Unique ID or name of the connection. + */ + deleteConnectionV2(connectionIdentifier: string, _options?: Configuration): Promise; + /** + * Version: 9.9.0.cl or later Exports the difference in connection metadata between CDW and ThoughtSpot Requires `DATAMANAGEMENT` (**Can manage data**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the following Data control privileges may be required: - `CAN_MANAGE_CUSTOM_CALENDAR`(**Can manage custom calendars**) - `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) - `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` (**Can manage data models**) To download the connection metadata difference between ThoughtSpot and CDW, pass the connection GUID as `connection_identifier` in the API request. + * @param connectionIdentifier GUID of the connection + */ + downloadConnectionMetadataChanges(connectionIdentifier: string, _options?: Configuration): Promise; + /** + * Version: 9.9.0.cl or later Validates the difference in connection metadata between CDW and ThoughtSpot. Requires `DATAMANAGEMENT` (**Can manage data**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the following Data control privileges may be required: - `CAN_MANAGE_CUSTOM_CALENDAR`(**Can manage custom calendars**) - `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) - `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` (**Can manage data models**) Returns a boolean indicating whether there is any difference between the connection metadata at ThoughtSpot and CDW. To get the connection metadata difference status, pass the connection GUID as `connection_identifier` in the API request. + * @param connectionIdentifier GUID of the connection + */ + fetchConnectionDiffStatus(connectionIdentifier: string, _options?: Configuration): Promise; + /** + * Version: 26.2.0.cl or later Revokes OAuth refresh tokens for users who no longer require access to a data warehouse connection. When a token is revoked, the affected user\'s session for that connection is terminated, and they must re-authenticate to regain access. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) or `DATAMANAGEMENT` (**Can manage data**) privileges. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on the ThoughtSpot instance, users with `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) privilege can also make API requests to revoke tokens for connection users. #### Usage guidelines You can specify different combinations of identifiers to control which refresh tokens are revoked. - **connection_identifier**: Revokes refresh tokens for all users of the connection, except the connection author. - **connection_identifier** and **user_identifiers**: Revokes refresh tokens only for the users specified in the request. If the name or ID of the connection author is included in the request, their token will also be revoked. - **connection_identifier** and **configuration_identifiers**: Revokes refresh tokens for all users on the specified configurations, except the configuration author. - **connection_identifier**, **configuration_identifiers**, and **user_identifiers**: Revokes refresh tokens for the specified users on the specified configurations. - **connection_identifier** and **org_identifiers**: Revokes refresh tokens for the specified Orgs. Applicable only for published connections. - **connection_identifier**, **org_identifiers**, and **user_identifiers**: Revokes refresh tokens for the specified users in the specified Orgs. Applicable only for published connections. **NOTE**: The `org_identifiers` parameter is only applicable for published connections. Using this parameter for unpublished connections will result in an error. Ensure that the connections are published before making the API request. + * @param connectionIdentifier Unique ID or name of the connection whose refresh tokens need to be revoked. All the users associated with the connection will have their refresh tokens revoked except the author. + * @param revokeRefreshTokensRequest + */ + revokeRefreshTokens(connectionIdentifier: string, revokeRefreshTokensRequest: RevokeRefreshTokensRequest, _options?: Configuration): Promise; + /** + * Version: 9.2.0.cl or later Gets connection objects. Requires `DATAMANAGEMENT` (**Can manage data**) or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) privilege is required. - To get a list of all connections available in the ThoughtSpot system, send the API request without any attributes in the request body. - To get the connection objects for a specific type of data warehouse, specify the type in `data_warehouse_types`. - To fetch details of a connection object, specify the connection object GUID or name. The `name_pattern` attribute allows passing partial text with `%` for a wildcard match. - To get details of the database, schemas, tables, or columns from a data connection object, specify `data_warehouse_object_type`. - To get a specific database, schema, table, or column from a connection object, define the object type in `data_warehouse_object_type` and object properties in the `data_warehouse_objects` array. For example, to search for a column, you must pass the database, schema, and table names in the API request. Note that in the following example, object properties are set in a hierarchical order (`database` > `schema` > `table` > `column`). ``` { \"connections\": [ { \"identifier\": \"b9d1f2ef-fa65-4a4b-994e-30fa2d57b0c2\", \"data_warehouse_objects\": [ { \"database\": \"NEBULADEV\", \"schema\": \"INFORMATION_SCHEMA\", \"table\": \"APPLICABLE_ROLES\", \"column\": \"ROLE_NAME\" } ] } ], \"data_warehouse_object_type\": \"COLUMN\" } ``` - To fetch data by `configuration`, specify `data_warehouse_object_type`. For example, to fetch columns from the `DEVELOPMENT` database, specify the `data_warehouse_object_type` as `DATABASE` and define the `configuration` string as `{\"database\":\"DEVELOPMENT\"}`. To get column data for a specific table, specify the table, for example,`{\"database\":\"RETAILAPPAREL\",\"table\":\"PIPES\"}`. - To query connections by `authentication_type`, specify `data_warehouse_object_type`. Supported values for `authentication_type` are: - `SERVICE_ACCOUNT`: For connections that require service account credentials to authenticate to the Cloud Data Warehouse and fetch data. - `OAUTH`: For connections that require OAuth credentials to authenticate to the Cloud Data Warehouse and fetch data. Teradata, Oracle, and Presto Cloud Data Warehouses do not support the OAuth authentication type. - `IAM`: For connections that have the IAM OAuth set up. This authentication type is supported on Amazon Redshift connections only. - `EXTOAUTH`: For connections that have External OAuth set up. ThoughtSpot supports external [OAuth with Microsoft Azure Active Directory (AD)](https://docs.thoughtspot.com/cloud/latest/ connections-snowflake-azure-ad-oauth) and [Okta for Snowflake data connections](https://docs.thoughtspot.com/cloud/latest/connections-snowflake-okta-oauth). - `KEY_PAIR`: For connections that require Key Pair account credentials to authenticate to the Cloud Data Warehouse and fetch data. This authentication type is supported on Snowflake connections only. - `OAUTH_WITH_PKCE`: For connections that require OAuth with PKCE account credentials to authenticate to the Cloud Data Warehouse and fetch data. This authentication type is supported on Snowflake, Starburst, Databricks, Denodo connections only. - `EXTOAUTH_WITH_PKCE`: For connections that require External OAuth With PKCE account credentials to authenticate to the Cloud Data Warehouse and fetch data. This authentication type is supported on Snowflake connections only. - `OAUTH_WITH_PEZ`: For connections that require OAuth With PEZ account credentials to authenticate to the Cloud Data Warehouse and fetch data. This authentication type is supported on Amazon Redshift connections only. - `OAUTH_WITH_SERVICE_PRINCIPAL`: For connections that require OAuth With Service Principal account credentials to authenticate to the Cloud Data Warehouse and fetch data. This authentication type is supported on Databricks connections only. - `PERSONAL_ACCESS_TOKEN`: For connections that require Personal Access Token account credentials to authenticate to the Cloud Data Warehouse and fetch data. This authentication type is supported on Databricks connections only. - `OAUTH_CLIENT_CREDENTIALS`: For connections that require OAuth Client Credentials to authenticate to the Cloud Data Warehouse and fetch data. This authentication type is supported on Snowflake connections only. - To include more details about connection objects in the API response, set `include_details` to `true`. - You can also sort the output by field names and filter connections by tags. **NOTE**: When filtering connection records by parameters other than `data_warehouse_types` or `tag_identifiers`, ensure that you set `record_size` to `-1` and `record_offset` to `0` for precise results. + * @param searchConnectionRequest + */ + searchConnection(searchConnectionRequest: SearchConnectionRequest, _options?: Configuration): Promise; + /** + * Version: 26.5.0.cl or later Synchronizes connection metadata attributes from your Cloud Data Warehouse (CDW) with ThoughtSpot. Requires the `DATAMANAGEMENT` (**Can manage data**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` (**Can manage data models**) privilege is required. #### Usage guidelines To synchronize attributes from a CDW, specify the connection GUID or name in the `connection_identifier` path parameter and `sync_attributes` in the request body. Default attribute is `[\"DESCRIPTION\"]`. ##### Hierarchical schema * Connection: The connection object for the sync operation. * Tables: Tables for the sync operation. When no table is specified, all tables are synchronized. * Columns: If the table is specified, you can add the columns for the sync operation. If no columns are specified, all columns in the specified table are considered for the sync operation. To set the scope for the sync operation: * Connection-level: To sync all tables and columns, pass an empty request body, or only the attributes in the request body. * Table-level: To synchronize specific tables and their columns, specify the table identifiers in the `tables` array. * Column-level: To synchronize specific columns, specify the table identifier as the key and column identifiers as the value in the `tables` array. ``` { \"tables\": [ {\"table-guid-1\": [\"column-guid-1\", \"column-guid-2\"]}, \"table-guid-2\" ], \"sync_attributes\": [\"DESCRIPTION\"] } ``` ##### API response If the sync operation is successful, the API returns the following information: * Status of the sync operation. For example, `SUCCESS`, `PARTIAL_SUCCESS`, or `NO_UPDATE`. * Number of tables and columns that were updated. * Number of tables and columns with the sync failed status when the overall sync status is `PARTIAL_SUCCESS`. * Message text indicating the sync results. + * @param connectionIdentifier Unique ID or name of the connection. + * @param syncMetadataRequest + */ + syncMetadata(connectionIdentifier: string, syncMetadataRequest: SyncMetadataRequest, _options?: Configuration): Promise; + /** + * Version: 9.2.0.cl or later **Important**: This endpoint is deprecated and will be removed from ThoughtSpot in September 2025. ThoughtSpot strongly recommends using the [Update connection V2](#/http/api-endpoints/connections/update-connection-v2) endpoint to update your connection objects. #### Usage guidelines Updates a connection object. Requires `DATAMANAGEMENT` (**Can manage data**) and edit permissions to the connection object, or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) privilege is required. To update a connection object, pass these parameters in your API request: 1. GUID of the connection object. 2. If you are updating tables or database schema of a connection object: a. Add the updated JSON map of metadata with database, schema, and tables in `data_warehouse_config`. b. Set `validate` to `true`. 3. If you are updating a configuration attribute, connection name, or description, you can set `validate` to `false`. + * @param updateConnectionRequest + */ + updateConnection(updateConnectionRequest: UpdateConnectionRequest, _options?: Configuration): Promise; + /** + * Version: 26.6.0.cl or later Activates or deactivates a connection. A deactivated connection cannot be used for queries or operations until it is activated again. Requires `DATAMANAGEMENT` (**Can manage data**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) privilege is required. Only the connection owner or an administrator can perform this operation. #### Usage guidelines To update the status of a connection, specify the connection GUID or name in the `connection_identifier` path parameter and the desired `status` in the request body. - **ACTIVATED**: Enables the connection. Queries and operations can resume on an activated connection. - **DEACTIVATED**: Disables the connection. It does not remove the connection metadata, but only makes the connection unavailable for queries and operations. You can reactivate a deactivated connection by setting \"status\": \"ACTIVATED\". + * @param connectionIdentifier Unique ID or name of the connection. + * @param updateConnectionStatusRequest + */ + updateConnectionStatus(connectionIdentifier: string, updateConnectionStatusRequest: UpdateConnectionStatusRequest, _options?: Configuration): Promise; + /** + * Version: 10.4.0.cl or later Updates a connection object. Requires `DATAMANAGEMENT` (**Can manage data**) and edit permissions to the connection object, or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) privilege is required. To update a connection object, pass these parameters in your API request: 1. GUID of the connection object. 2. If you are updating tables or database schema of a connection object: a. Add the updated JSON map of metadata with database, schema, and tables in `data_warehouse_config`. b. Set `validate` to `true`. **NOTE:** If the `authentication_type` is anything other than SERVICE_ACCOUNT, you must explicitly provide the authenticationType property in the payload. If you do not specify authenticationType, the API will default to SERVICE_ACCOUNT as the authentication type. * A JSON map of configuration attributes, database details, and table properties in `data_warehouse_config` as shown in the following example: * This is an example of updating a single table in a empty connection: ``` { \"authenticationType\": \"SERVICE_ACCOUNT\", \"externalDatabases\": [ { \"name\": \"DEVELOPMENT\", \"isAutoCreated\": false, \"schemas\": [ { \"name\": \"TS_dataset\", \"tables\": [ { \"name\": \"DEMORENAME\", \"type\": \"TABLE\", \"description\": \"\", \"selected\": true, \"linked\": true, \"gid\": 0, \"datasetId\": \"-1\", \"subType\": \"\", \"reportId\": \"\", \"viewId\": \"\", \"columns\": [ { \"name\": \"Col1\", \"type\": \"VARCHAR\", \"canImport\": true, \"selected\": true, \"description\": \"\", \"isLinkedActive\": true, \"isAggregate\": false }, { \"name\": \"Col2\", \"type\": \"VARCHAR\", \"canImport\": true, \"selected\": true, \"description\": \"\", \"isLinkedActive\": true, \"isAggregate\": false }, { \"name\": \"Col3\", \"type\": \"VARCHAR\", \"canImport\": true, \"selected\": true, \"description\": \"\", \"isLinkedActive\": true, \"isAggregate\": false }, { \"name\": \"Col312\", \"type\": \"VARCHAR\", \"canImport\": true, \"selected\": true, \"description\": \"\", \"isLinkedActive\": true, \"isAggregate\": false }, { \"name\": \"Col4\", \"type\": \"VARCHAR\", \"canImport\": true, \"selected\": true, \"description\": \"\", \"isLinkedActive\": true, \"isAggregate\": false } ], \"relationships\": [] } ] } ] } ], \"configuration\": { \"password\": \"\", \"database\": \"DEVELOPMENT\", \"role\": \"DEV\", \"accountName\": \"thoughtspot_partner\", \"warehouse\": \"DEMO_WH\", \"user\": \"DEV_USER\" } } ``` * This is an example of updating a single table in an existing connection with tables: ``` { \"authenticationType\": \"SERVICE_ACCOUNT\", \"externalDatabases\": [ { \"name\": \"DEVELOPMENT\", \"isAutoCreated\": false, \"schemas\": [ { \"name\": \"TS_dataset\", \"tables\": [ { \"name\": \"CUSTOMER\", \"type\": \"TABLE\", \"description\": \"\", \"selected\": true, \"linked\": true, \"gid\": 0, \"datasetId\": \"-1\", \"subType\": \"\", \"reportId\": \"\", \"viewId\": \"\", \"columns\": [], \"relationships\": [] }, { \"name\": \"tpch5k_falcon_default_schema_users\", \"type\": \"TABLE\", \"description\": \"\", \"selected\": true, \"linked\": true, \"gid\": 0, \"datasetId\": \"-1\", \"subType\": \"\", \"reportId\": \"\", \"viewId\": \"\", \"columns\": [ { \"name\": \"user_id\", \"type\": \"INT64\", \"canImport\": true, \"selected\": true, \"description\": \"\", \"isLinkedActive\": true, \"isAggregate\": false }, { \"name\": \"product_id\", \"type\": \"INT64\", \"canImport\": true, \"selected\": true, \"description\": \"\", \"isLinkedActive\": true, \"isAggregate\": false }, { \"name\": \"user_cost\", \"type\": \"INT64\", \"canImport\": true, \"selected\": true, \"description\": \"\", \"isLinkedActive\": true, \"isAggregate\": false } ], \"relationships\": [] } ] } ] } ], \"configuration\": { \"password\": \"\", \"database\": \"DEVELOPMENT\", \"role\": \"DEV\", \"accountName\": \"thoughtspot_partner\", \"warehouse\": \"DEMO_WH\", \"user\": \"DEV_USER\" } } ``` 3. If you are updating a configuration attribute, connection name, or description, you can set `validate` to `false`. **NOTE:** If the `authentication_type` is anything other than SERVICE_ACCOUNT, you must explicitly provide the authenticationType property in the payload. If you do not specify authenticationType, the API will default to SERVICE_ACCOUNT as the authentication type. * A JSON map of configuration attributes in `data_warehouse_config`. The following example shows the configuration attributes for a Snowflake connection: ``` { \"configuration\":{ \"accountName\":\"thoughtspot_partner\", \"user\":\"tsadmin\", \"password\":\"TestConn123\", \"role\":\"sysadmin\", \"warehouse\":\"MEDIUM_WH\" }, \"externalDatabases\":[ ] } ``` + * @param connectionIdentifier Unique ID or name of the connection. + * @param updateConnectionV2Request + */ + updateConnectionV2(connectionIdentifier: string, updateConnectionV2Request: UpdateConnectionV2Request, _options?: Configuration): Promise; +} +declare class ConnectionsApiResponseProcessor { + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to createConnection + * @throws ApiException if the response code was not in [200, 299] + */ + createConnection(response: ResponseContext): Promise; + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to deleteConnection + * @throws ApiException if the response code was not in [200, 299] + */ + deleteConnection(response: ResponseContext): Promise; + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to deleteConnectionV2 + * @throws ApiException if the response code was not in [200, 299] + */ + deleteConnectionV2(response: ResponseContext): Promise; + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to downloadConnectionMetadataChanges + * @throws ApiException if the response code was not in [200, 299] + */ + downloadConnectionMetadataChanges(response: ResponseContext): Promise; + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to fetchConnectionDiffStatus + * @throws ApiException if the response code was not in [200, 299] + */ + fetchConnectionDiffStatus(response: ResponseContext): Promise; + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to revokeRefreshTokens + * @throws ApiException if the response code was not in [200, 299] + */ + revokeRefreshTokens(response: ResponseContext): Promise; + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to searchConnection + * @throws ApiException if the response code was not in [200, 299] + */ + searchConnection(response: ResponseContext): Promise>; + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to syncMetadata + * @throws ApiException if the response code was not in [200, 299] + */ + syncMetadata(response: ResponseContext): Promise; + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to updateConnection + * @throws ApiException if the response code was not in [200, 299] + */ + updateConnection(response: ResponseContext): Promise; + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to updateConnectionStatus + * @throws ApiException if the response code was not in [200, 299] + */ + updateConnectionStatus(response: ResponseContext): Promise; + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to updateConnectionV2 + * @throws ApiException if the response code was not in [200, 299] + */ + updateConnectionV2(response: ResponseContext): Promise; +} + +/** + * no description + */ +declare class CustomActionApiRequestFactory extends BaseAPIRequestFactory { + /** + * Version: 9.6.0.cl or later Creates a custom action that appears as a menu action on a saved Answer or Liveboard visualization. Requires `DEVELOPER` (**Has Developer privilege**) or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `DEVELOPER` (**Has developer privilege**) privilege is required. #### Usage Guidelines The API lets you create the following types of custom actions: * URL-based action Allows pushing data to an external URL. * Callback action Triggers a callback to the host application and initiates a response payload on an embedded ThoughtSpot instance. By default, custom actions are visible to only administrator or developer users. To make a custom action available to other users, and specify the groups in `group_identifiers`. By default, the custom action is set as a _global_ action on all visualizations and saved Answers. To assign a custom action to specific Liveboard visualization, saved Answer, or Worksheet, set `visibility` to `false` in `default_action_config` property and specify the GUID or name of the object in `associate_metadata`. For more information, see [Custom actions](https://developers.thoughtspot.com/docs/custom-action-intro). + * @param createCustomActionRequest + */ + createCustomAction(createCustomActionRequest: CreateCustomActionRequest, _options?: Configuration): Promise; + /** + * Version: 9.6.0.cl or later Removes the custom action specified in the API request. Requires `DEVELOPER` (**Has Developer privilege**) or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `DEVELOPER` (**Has developer privilege**) privilege is required. + * @param customActionIdentifier Unique ID or name of the custom action. + */ + deleteCustomAction(customActionIdentifier: string, _options?: Configuration): Promise; + /** + * Version: 9.6.0.cl or later Gets custom actions configured on the cluster. Requires `DEVELOPER` (**Has Developer privilege**) or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `DEVELOPER` (**Has developer privilege**) privilege is required. + * @param searchCustomActionsRequest + */ + searchCustomActions(searchCustomActionsRequest: SearchCustomActionsRequest, _options?: Configuration): Promise; + /** + * Version: 9.6.0.cl or later Updates a custom action. Requires `DEVELOPER` (**Has Developer privilege**) or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `DEVELOPER` (**Has developer privilege**) privilege is required. #### Usage Guidelines The API allows you to modify the following properties: * Name of the custom action * Action availability to groups * Association to metadata objects * Authentication settings for a URL-based action For more information, see [Custom actions](https://developers.thoughtspot.com/docs/custom-action-intro). + * @param customActionIdentifier Unique ID or name of the custom action. + * @param updateCustomActionRequest + */ + updateCustomAction(customActionIdentifier: string, updateCustomActionRequest: UpdateCustomActionRequest, _options?: Configuration): Promise; +} +declare class CustomActionApiResponseProcessor { + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to createCustomAction + * @throws ApiException if the response code was not in [200, 299] + */ + createCustomAction(response: ResponseContext): Promise; + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to deleteCustomAction + * @throws ApiException if the response code was not in [200, 299] + */ + deleteCustomAction(response: ResponseContext): Promise; + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to searchCustomActions + * @throws ApiException if the response code was not in [200, 299] + */ + searchCustomActions(response: ResponseContext): Promise>; + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to updateCustomAction + * @throws ApiException if the response code was not in [200, 299] + */ + updateCustomAction(response: ResponseContext): Promise; +} + +/** + * no description + */ +declare class CustomCalendarsApiRequestFactory extends BaseAPIRequestFactory { + /** + * Version: 10.12.0.cl or later Creates a new [custom calendar](https://docs.thoughtspot.com/cloud/latest/connections-cust-cal). Requires `DATAMANAGEMENT` (**Can manage data**) or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your ThoughtSpot instance, the `CAN_MANAGE_CUSTOM_CALENDAR` (**Can manage custom calendars**) privilege is required. #### Usage guidelines You can create a custom calendar from scratch or an existing Table in ThoughtSpot. For both methods of calendar creation, the following parameters are required: * Name of the custom calendar. * Calendar creation method. To create a calendar from an existing table, specify the method: - `FROM_EXISTING_TABLE` - Creates calendar from the table reference provided in the API request. - `FROM_INPUT_PARAMS` - Creates a calendar from the parameters defined in the API request. * Connection ID and Table name * Database and schema name attributes: For most Cloud Data Warehouse (CDW) connectors, both `database_name` and `schema_name` attributes are required. However, the attribute requirements are conditional and vary based on the connector type and its metadata structure. For example, for connectors such as Teradata, MySQL, SingleSore, Amazon Aurora MySQL, Amazon RDS MySQL, Oracle, and GCP_MYSQL, the `schema_name` is required, whereas the `database_name` attribute is not. Similarly, connectors such as ClickHouse require you to specify the `database_name` and the schema specification in such cases is optional. **NOTE**: If you are creating a calendar from an existing table, ensure that the referenced table matches the required DDL for custom calendars. If the schema does not match, the API returns an error. ##### Calendar type The API allows you to create the following types of calendars: * `MONTH_OFFSET`. The default calendar type. A `MONTH_OFFSET` calendar is offset by a few months from the standard calendar months (January to December) and the year begins with the month defined in the request. For example, if the `month_offset` value is set as `April`, the calendar year begins in April. * `4-4-5`. Each quarter in the calendar will include two 4-week months followed by one 5-week month. * `4-5-4`. Each quarter in the calendar will include two 4-week months with a 5-week month between. * `5-4-4`. Each quarter begins with a 5-week month, followed by two 4-week months. To start and end the calendar on a specific date, specify the dates in the `MM/DD/YYYY` format. For `MONTH_OFFSET` calendars, ensure that the `start_date` matches the month specified in the `month_offset` attribute. You can also set the starting day of the week and customize the prefixes for year and quarter labels. #### Examples To create a calendar from an existing table: ``` { \"name\": \"MyCustomCalendar1\", \"table_reference\": { \"connection_identifier\": \"4db8ea22-2ff4-4224-b05a-26674717e468\", \"table_name\": \"MyCalendarTable\", \"database_name\": \"RETAILAPPAREL\", \"schema_name\": \"PUBLIC\" }, \"creation_method\": \"FROM_EXISTING_TABLE\", } ``` To create a calendar from scratch: ``` { \"name\": \"MyCustomCalendar1\", \"table_reference\": { \"connection_identifier\": \"4db8ea22-2ff4-4224-b05a-26674717e468\", \"table_name\": \"MyCalendarTable\", \"database_name\": \"RETAILAPPAREL\", \"schema_name\": \"PUBLIC\" }, \"creation_method\": \"FROM_INPUT_PARAMS\", \"calendar_type\": \"MONTH_OFFSET\", \"month_offset\": \"April\", \"start_day_of_week\": \"Monday\", \"quarter_name_prefix\": \"Q\", \"year_name_prefix\": \"FY\", \"start_date\": \"04/01/2025\", \"end_date\": \"04/31/2025\" } ``` + * @param createCalendarRequest + */ + createCalendar(createCalendarRequest: CreateCalendarRequest, _options?: Configuration): Promise; + /** + * Version: 10.12.0.cl or later Deletes a [custom calendar](https://docs.thoughtspot.com/cloud/latest/connections-cust-cal). Requires `DATAMANAGEMENT` (**Can manage data**) or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your ThoughtSpot instance, the `CAN_MANAGE_CUSTOM_CALENDAR` (**Can manage custom calendars**) privilege is required. #### Usage guidelines To delete a custom calendar, specify the calendar ID as a path parameter in the request URL. + * @param calendarIdentifier Unique ID or name of the Calendar. + */ + deleteCalendar(calendarIdentifier: string, _options?: Configuration): Promise; + /** + * Version: 10.12.0.cl or later Exports a [custom calendar](https://docs.thoughtspot.com/cloud/latest/connections-cust-cal) in the CSV format. Requires `DATAMANAGEMENT` (**Can manage data**) or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your ThoughtSpot instance, the `CAN_MANAGE_CUSTOM_CALENDAR` (**Can manage custom calendars**) privilege is required. #### Usage guidelines Use this API to download a custom calendar in the CSV file format. In your API request, specify the following parameters. * Start and end date of the calendar. For \"month offset\" calendars, the start date must match the month defined in the `month_offset` attribute. You can also specify optional parameters such as the starting day of the week and prefixes for the quarter and year labels. + * @param generateCSVRequest + */ + generateCSV(generateCSVRequest: GenerateCSVRequest, _options?: Configuration): Promise; + /** + * Version: 10.12.0.cl or later Gets a list of [custom calendars](https://docs.thoughtspot.com/cloud/latest/connections-cust-cal). Requires `DATAMANAGEMENT` (**Can manage data**) or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your ThoughtSpot instance, the `CAN_MANAGE_CUSTOM_CALENDAR` (**Can manage custom calendars**) privilege is required. #### Usage guidelines By default, the API returns a list of custom calendars for all connection objects. To retrieve custom calendar details for a particular connection, specify the connection ID. You can also use other search parameters such as `name_pattern` and `sort_options` as search filters. The `name_pattern` parameter filters and returns only those objects that match the specified pattern. Use `%` as a wildcard for pattern matching. + * @param searchCalendarsRequest + */ + searchCalendars(searchCalendarsRequest: SearchCalendarsRequest, _options?: Configuration): Promise; + /** + * Version: 10.12.0.cl or later Updates the properties of a [custom calendar](https://docs.thoughtspot.com/cloud/latest/connections-cust-cal). Requires `DATAMANAGEMENT` (**Can manage data**) or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your ThoughtSpot instance, the `CAN_MANAGE_CUSTOM_CALENDAR` (**Can manage custom calendars**) privilege is required. #### Usage guidelines You can update the properties of a calendar using one of the following methods: * `FROM_INPUT_PARAMS` to update the calendar properties with the values defined in the API request. * `FROM_EXISTING_TABLE` Creates a calendar from the parameters defined in the API request. To update a custom calendar, specify the calendar ID as a path parameter in the request URL and the following parameters in the request body: * Connection ID and Table name * Database and schema name attributes: For most Cloud Data Warehouse (CDW) connectors, both `database_name` and `schema_name` attributes are required. However, the attribute requirements are conditional and vary based on the connector type and its metadata structure. For example, for connectors such as Teradata, MySQL, SingleSore, Amazon Aurora MySQL, Amazon RDS MySQL, Oracle, and GCP_MYSQL, the `schema_name` is required, whereas the `database_name` attribute is not. Similarly, connectors such as ClickHouse require you to specify the `database_name` and the schema specification in such cases is optional. The API allows you to modify the calendar type, month offset value, start and end date, starting day of the week, and prefixes assigned to the year and quarter labels. #### Examples Update a custom calendar using an existing Table in ThoughtSpot: ``` { \"update_method\": \"FROM_EXISTING_TABLE\", \"table_reference\": { \"connection_identifier\": \"Connection1\", \"database_name\": \"db1\", \"table_name\": \"custom_calendar_2025\", \"schame_name\": \"schemaVar\" } } ``` Update a custom calendar with the attributes defined in the API request: ``` { \"update_method\": \"FROM_INPUT_PARAMS\", \"table_reference\": { \"connection_identifier\": \"Connection1\", \"database_name\": \"db1\", \"table_name\": \"custom_calendar_2025\", \"schame_name\": \"schemaVar\" }, \"month_offset\": \"August\", \"start_day_of_week\": \"Monday\", \"start_date\": \"08/01/2025\", \"end_date\": \"07/31/2026\" } ``` + * @param calendarIdentifier Unique Id or name of the calendar. + * @param updateCalendarRequest + */ + updateCalendar(calendarIdentifier: string, updateCalendarRequest: UpdateCalendarRequest, _options?: Configuration): Promise; +} +declare class CustomCalendarsApiResponseProcessor { + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to createCalendar + * @throws ApiException if the response code was not in [200, 299] + */ + createCalendar(response: ResponseContext): Promise; + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to deleteCalendar + * @throws ApiException if the response code was not in [200, 299] + */ + deleteCalendar(response: ResponseContext): Promise; + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to generateCSV + * @throws ApiException if the response code was not in [200, 299] + */ + generateCSV(response: ResponseContext): Promise; + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to searchCalendars + * @throws ApiException if the response code was not in [200, 299] + */ + searchCalendars(response: ResponseContext): Promise>; + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to updateCalendar + * @throws ApiException if the response code was not in [200, 299] + */ + updateCalendar(response: ResponseContext): Promise; +} + +/** + * no description + */ +declare class DBTApiRequestFactory extends BaseAPIRequestFactory { + /** + * Version: 9.9.0.cl or later Creates a DBT connection object in ThoughtSpot. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege or `DATAMANAGEMENT` (**Can manage data**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the following Data control privileges may be required: - `CAN_MANAGE_CUSTOM_CALENDAR`(**Can manage custom calendars**) - `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) - `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` (**Can manage data models**) #### About create DBT connection DBT connection in ThoughtSpot is used by the user to define DBT credentials for cloud . The API needs embrace connection, embrace database name, DBT url, import type, DBT account identifier, DBT project identifier, DBT access token and environment details (or) embrace connection, embrace database name, import type, file_content to create a connection object. To know more about DBT, see ThoughtSpot Product Documentation. + * @param connectionName Name of the connection. + * @param databaseName Name of the Database. + * @param importType Mention type of Import + * @param accessToken Access token is mandatory when Import_Type is DBT_CLOUD. + * @param dbtUrl DBT URL is mandatory when Import_Type is DBT_CLOUD. + * @param accountId Account ID is mandatory when Import_Type is DBT_CLOUD + * @param projectId Project ID is mandatory when Import_Type is DBT_CLOUD + * @param dbtEnvId DBT Environment ID\\\" + * @param projectName Name of the project + * @param fileContent Upload DBT Manifest and Catalog artifact files as a ZIP file. This field is Mandatory when Import Type is \\\'ZIP_FILE\\\' + */ + dbtConnection(connectionName: string, databaseName: string, importType?: string, accessToken?: string, dbtUrl?: string, accountId?: string, projectId?: string, dbtEnvId?: string, projectName?: string, fileContent?: HttpFile, _options?: Configuration): Promise; + /** + * Version: 9.9.0.cl or later Resynchronize the existing list of models, tables, worksheet tml’s and import them to Thoughtspot based on the DBT connection object. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege or `DATAMANAGEMENT` (**Can manage data**) privilege, along with an existing DBT connection. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the following data control privileges may be required: - `CAN_MANAGE_CUSTOM_CALENDAR`(**Can manage custom calendars**) - `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) - `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` (**Can manage data models**) + * @param dbtConnectionIdentifier Unique ID of the DBT connection. + * @param fileContent Upload DBT Manifest and Catalog artifact files as a ZIP file. This field is mandatory if the connection was created with import_type ‘ZIP_FILE’ + */ + dbtGenerateSyncTml(dbtConnectionIdentifier: string, fileContent?: HttpFile, _options?: Configuration): Promise; + /** + * Version: 9.9.0.cl or later Generate required table and worksheet and import them. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege or `DATAMANAGEMENT` (**Can manage data**) privilege, along with an existing DBT connection. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the following data control privileges may be required: - `CAN_MANAGE_CUSTOM_CALENDAR`(**Can manage custom calendars**) - `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) - `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` (**Can manage data models**) #### About generate TML Models and Worksheets to be imported can be selected by the user as part of the API. + * @param dbtConnectionIdentifier Unique ID of the DBT connection. + * @param modelTables List of Models and their respective Tables Example: \\\'[{\\\"model_name\\\": \\\"model_name\\\", \\\"tables\\\": [\\\"table_name\\\"]}]\\\' + * @param importWorksheets Mention the worksheet tmls to import + * @param worksheets List of worksheets is mandatory when import_Worksheets is type SELECTED Example: [\\\"worksheet_name\\\"] + * @param fileContent Upload DBT Manifest and Catalog artifact files as a ZIP file. This field is mandatory if the connection was created with import_type ‘ZIP_FILE’ + */ + dbtGenerateTml(dbtConnectionIdentifier: string, modelTables: string, importWorksheets: string, worksheets?: string, fileContent?: HttpFile, _options?: Configuration): Promise; + /** + * Version: 9.9.0.cl or later Gets a list of DBT connection objects by user and organization, available on the ThoughtSpot system. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege or `DATAMANAGEMENT` (**Can manage data**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the following Data control privileges may be required: - `CAN_MANAGE_CUSTOM_CALENDAR`(**Can manage custom calendars**) - `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) - `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` (**Can manage data models**) #### About search DBT connection To get details of a specific DBT connection identifier, database connection identifier, database connection name, database name, project name, project identifier, environment identifier , import type and author. + */ + dbtSearch(_options?: Configuration): Promise; + /** + * Version: 9.9.0.cl or later Removes the specified DBT connection object from the ThoughtSpot system. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) or `DATAMANAGEMENT` (**Can manage data ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the following Data control privileges may be required: - `CAN_MANAGE_CUSTOM_CALENDAR`(**Can manage custom calendars**) - `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) - `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` (**Can manage data models**) + * @param dbtConnectionIdentifier Unique ID of the DBT Connection. + */ + deleteDbtConnection(dbtConnectionIdentifier: string, _options?: Configuration): Promise; + /** + * Version: 9.9.0.cl or later Updates a DBT connection object. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege or `DATAMANAGEMENT` (**Can manage data ThoughtSpot**) privilege, along with an existing DBT connection. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the following data control privileges may be required: - `CAN_MANAGE_CUSTOM_CALENDAR`(**Can manage custom calendars**) - `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) - `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` (**Can manage data models**) #### About update DBT connection You can modify DBT connection object properties such as embrace connection name, embrace database name, import type, account identifier, access token, project identifier and environment (or) embrace connection, embrace database name, import type, file_content settings. + * @param dbtConnectionIdentifier Unique ID of the DBT Connection. + * @param connectionName Name of the connection. + * @param databaseName Name of the Database. + * @param importType Mention type of Import + * @param accessToken Access token is mandatory when Import_Type is DBT_CLOUD. + * @param dbtUrl DBT URL is mandatory when Import_Type is DBT_CLOUD. + * @param accountId Account ID is mandatory when Import_Type is DBT_CLOUD + * @param projectId Project ID is mandatory when Import_Type is DBT_CLOUD + * @param dbtEnvId DBT Environment ID\\\" + * @param projectName Name of the project + * @param fileContent Upload DBT Manifest and Catalog artifact files as a ZIP file. This field is Mandatory when Import Type is \\\'ZIP_FILE\\\' + */ + updateDbtConnection(dbtConnectionIdentifier: string, connectionName?: string, databaseName?: string, importType?: string, accessToken?: string, dbtUrl?: string, accountId?: string, projectId?: string, dbtEnvId?: string, projectName?: string, fileContent?: HttpFile, _options?: Configuration): Promise; +} +declare class DBTApiResponseProcessor { + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to dbtConnection + * @throws ApiException if the response code was not in [200, 299] + */ + dbtConnection(response: ResponseContext): Promise; + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to dbtGenerateSyncTml + * @throws ApiException if the response code was not in [200, 299] + */ + dbtGenerateSyncTml(response: ResponseContext): Promise; + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to dbtGenerateTml + * @throws ApiException if the response code was not in [200, 299] + */ + dbtGenerateTml(response: ResponseContext): Promise; + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to dbtSearch + * @throws ApiException if the response code was not in [200, 299] + */ + dbtSearch(response: ResponseContext): Promise>; + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to deleteDbtConnection + * @throws ApiException if the response code was not in [200, 299] + */ + deleteDbtConnection(response: ResponseContext): Promise; + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to updateDbtConnection + * @throws ApiException if the response code was not in [200, 299] + */ + updateDbtConnection(response: ResponseContext): Promise; +} + +/** + * no description + */ +declare class DataApiRequestFactory extends BaseAPIRequestFactory { + /** + * Version: 9.0.0.cl or later Fetches data from a saved Answer. Requires at least view access to the saved Answer. The `record_size` attribute determines the number of records to retrieve in an API call. For more information about pagination, record size, and maximum row limit, see [Pagination and record size settings](https://developers.thoughtspot.com/docs/fetch-data-and-report-apis#_pagination_settings_for_data_and_report_apis). + * @param fetchAnswerDataRequest + */ + fetchAnswerData(fetchAnswerDataRequest: FetchAnswerDataRequest, _options?: Configuration): Promise; + /** + * Version: 9.0.0.cl or later Gets data from a Liveboard object and its visualization. Requires at least view access to the Liveboard. #### Usage guidelines In the request body, specify the GUID or name of the Liveboard. To get data for specific visualizations, add the GUIDs or names of the visualizations in the API request. To include unsaved changes in the report, pass the `transient_pinboard_content` script generated from the `getExportRequestForCurrentPinboard` method in the Visual Embed SDK. Upon successful execution, the API returns the report with unsaved changes. If the new Liveboard experience mode, the transient content includes ad hoc changes to visualizations such as sorting, toggling of legends, and data drill down. For more information, and see [Liveboard data API](https://developers.thoughtspot.com/docs/fetch-data-and-report-apis#_fetch_liveboard_data_api). + * @param fetchLiveboardDataRequest + */ + fetchLiveboardData(fetchLiveboardDataRequest: FetchLiveboardDataRequest, _options?: Configuration): Promise; + /** + * Version: 9.0.0.cl or later Generates an Answer from a given data source. Requires at least view access to the data source object (Worksheet or View). #### Usage guidelines To search data, specify the data source GUID in `logical_table_identifier`. The data source can be a Worksheet, View, Table, or SQL view. Pass search tokens in the `query_string` attribute in the API request as shown in the following example: ``` { \"query_string\": \"[sales] by [store]\", \"logical_table_identifier\": \"cd252e5c-b552-49a8-821d-3eadaa049cca\", } ``` For more information about the `query_string` format and data source attribute, see [Search data API](https://developers.thoughtspot.com/docs/fetch-data-and-report-apis#_search_data_api). The `record_size` attribute determines the number of records to retrieve in an API call. For more information about pagination, record size, and maximum row limit, see [Pagination and record size settings](https://developers.thoughtspot.com/docs/fetch-data-and-report-apis#_pagination_settings_for_data_and_report_api). + * @param searchDataRequest + */ + searchData(searchDataRequest: SearchDataRequest, _options?: Configuration): Promise; +} +declare class DataApiResponseProcessor { + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to fetchAnswerData + * @throws ApiException if the response code was not in [200, 299] + */ + fetchAnswerData(response: ResponseContext): Promise; + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to fetchLiveboardData + * @throws ApiException if the response code was not in [200, 299] + */ + fetchLiveboardData(response: ResponseContext): Promise; + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to searchData + * @throws ApiException if the response code was not in [200, 299] + */ + searchData(response: ResponseContext): Promise; +} + +/** + * no description + */ +declare class EmailCustomizationApiRequestFactory extends BaseAPIRequestFactory { + /** + * Version: 10.10.0.cl or later Creates a customization configuration for the notification email. #### Pre-requisites Requires `DEVELOPER` (**has developer privilege**) or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `DEVELOPER` (**Has developer privilege**) privilege is required. **NOTE**:This endpoint in currently in beta. Contact ThoughtSpot support to enable this on your instance. #### Usage guidelines To create a custom configuration pass these parameters in your API request: - A JSON map of configuration attributes `template_properties`. The following example shows a sample set of customization configuration: ``` { { \"cta_button_bg_color\": \"#444DEA\", \"cta_text_font_color\": \"#FFFFFF\", \"primary_bg_color\": \"#D3DEF0\", \"logo_url\": \"https://storage.pardot.com/710713/1642089901EbkRibJq/TS_fullworkmark_darkmode.png\", \"font_family\": \"\", \"product_name\": \"ThoughtSpot\", \"footer_address\": \"444 Castro St, Suite 1000 Mountain View, CA 94041\", \"footer_phone\": \"(800) 508-7008\", \"replacement_value_for_liveboard\": \"Dashboard\", \"replacement_value_for_answer\": \"Chart\", \"replacement_value_for_spot_iq\": \"AI Insights\", \"hide_footer_phone\": false, \"hide_footer_address\": false, \"hide_product_name\": false, \"hide_manage_notification\": false, \"hide_mobile_app_nudge\": false, \"hide_privacy_policy\": false, \"hide_ts_vocabulary_definitions\": false, \"hide_error_message\": false, \"hide_unsubscribe_link\": false, \"hide_notification_status\": false, \"hide_modify_alert\": false, \"company_website_url\": \"https://your-website.com/\", \"company_privacy_policy_url\" : \"https://link-to-privacy-policy.com/\", \"contact_support_url\": \"https://link-to-contact-support.com/\", \"hide_contact_support_url\": false, \"hide_logo_url\" : false } } ``` + * @param createEmailCustomizationRequest + */ + createEmailCustomization(createEmailCustomizationRequest: CreateEmailCustomizationRequest, _options?: Configuration): Promise; + /** + * Version: 10.10.0.cl or later Deletes the configuration for the email customization. #### Pre-requisites Requires `DEVELOPER` (**has developer privilege**) or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `DEVELOPER` (**Has developer privilege**) privilege is required. **NOTE**:This endpoint in currently in beta. Contact ThoughtSpot support to enable this on your instance. #### Usage guidelines - Call the search API endpoint to get the `template_identifier` from the response. - Use that `template_identifier` as a parameter in this API request. + * @param templateIdentifier Unique ID or name of the email customization. + */ + deleteEmailCustomization(templateIdentifier: string, _options?: Configuration): Promise; + /** + * Version: 10.12.0.cl or later Deletes the configuration for the email customization. #### Pre-requisites Requires `DEVELOPER` (**has developer privilege**) or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `DEVELOPER` (**Has developer privilege**) privilege is required. **NOTE**:This endpoint in currently in beta. Contact ThoughtSpot support to enable this on your instance. #### Usage guidelines - Call the search API endpoint to get the `org_identifier` from the response. - Use that `org_identifier` as a parameter in this API request. + * @param deleteOrgEmailCustomizationRequest + */ + deleteOrgEmailCustomization(deleteOrgEmailCustomizationRequest: DeleteOrgEmailCustomizationRequest, _options?: Configuration): Promise; + /** + * Version: 10.10.0.cl or later Search the email customization configuration if any set for the ThoughtSpot system. #### Pre-requisites Requires `DEVELOPER` (**has developer privilege**) or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `DEVELOPER` (**Has developer privilege**) privilege is required. **NOTE**:This endpoint in currently in beta. Contact ThoughtSpot support to enable this on your instance. + * @param searchEmailCustomizationRequest + */ + searchEmailCustomization(searchEmailCustomizationRequest: SearchEmailCustomizationRequest, _options?: Configuration): Promise; + /** + * Version: 10.12.0.cl or later Updates a customization configuration for the notification email. #### Pre-requisites Requires `DEVELOPER` (**has developer privilege**) or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `DEVELOPER` (**Has developer privilege**) privilege is required. **NOTE**:This endpoint in currently in beta. Contact ThoughtSpot support to enable this on your instance. #### Usage guidelines To update a custom configuration pass these parameters in your API request: - A JSON map of configuration attributes `template_properties`. The following example shows a sample set of customization configuration: ``` { { \"cta_button_bg_color\": \"#444DEA\", \"cta_text_font_color\": \"#FFFFFF\", \"primary_bg_color\": \"#D3DEF0\", \"logo_url\": \"https://storage.pardot.com/710713/1642089901EbkRibJq/TS_fullworkmark_darkmode.png\", \"font_family\": \"\", \"product_name\": \"ThoughtSpot\", \"footer_address\": \"444 Castro St, Suite 1000 Mountain View, CA 94041\", \"footer_phone\": \"(800) 508-7008\", \"replacement_value_for_liveboard\": \"Dashboard\", \"replacement_value_for_answer\": \"Chart\", \"replacement_value_for_spot_iq\": \"AI Insights\", \"hide_footer_phone\": false, \"hide_footer_address\": false, \"hide_product_name\": false, \"hide_manage_notification\": false, \"hide_mobile_app_nudge\": false, \"hide_privacy_policy\": false, \"hide_ts_vocabulary_definitions\": false, \"hide_error_message\": false, \"hide_unsubscribe_link\": false, \"hide_notification_status\": false, \"hide_modify_alert\": false, \"company_website_url\": \"https://your-website.com/\", \"company_privacy_policy_url\" : \"https://link-to-privacy-policy.com/\", \"contact_support_url\": \"https://link-to-contact-support.com/\", \"hide_contact_support_url\": false, \"hide_logo_url\" : false } } ``` + * @param updateEmailCustomizationRequest + */ + updateEmailCustomization(updateEmailCustomizationRequest: UpdateEmailCustomizationRequest, _options?: Configuration): Promise; + /** + * Version: 10.10.0.cl or later Validates the email customization configuration if any set for the ThoughtSpot system. #### Pre-requisites Requires `DEVELOPER` (**has developer privilege**) or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `DEVELOPER` (**Has developer privilege**) privilege is required. **NOTE**:This endpoint in currently in beta. Contact ThoughtSpot support to enable this on your instance. + */ + validateEmailCustomization(_options?: Configuration): Promise; +} +declare class EmailCustomizationApiResponseProcessor { + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to createEmailCustomization + * @throws ApiException if the response code was not in [200, 299] + */ + createEmailCustomization(response: ResponseContext): Promise; + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to deleteEmailCustomization + * @throws ApiException if the response code was not in [200, 299] + */ + deleteEmailCustomization(response: ResponseContext): Promise; + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to deleteOrgEmailCustomization + * @throws ApiException if the response code was not in [200, 299] + */ + deleteOrgEmailCustomization(response: ResponseContext): Promise; + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to searchEmailCustomization + * @throws ApiException if the response code was not in [200, 299] + */ + searchEmailCustomization(response: ResponseContext): Promise>; + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to updateEmailCustomization + * @throws ApiException if the response code was not in [200, 299] + */ + updateEmailCustomization(response: ResponseContext): Promise; + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to validateEmailCustomization + * @throws ApiException if the response code was not in [200, 299] + */ + validateEmailCustomization(response: ResponseContext): Promise; +} + +/** + * no description + */ +declare class GroupsApiRequestFactory extends BaseAPIRequestFactory { + /** + * Version: 9.0.0.cl or later Creates a group object in ThoughtSpot. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `GROUP_ADMINISTRATION` (**Can manage groups**) privilege is required. #### About groups Groups in ThoughtSpot are used by the administrators to define privileges and organize users based on their roles and access requirements. To know more about groups and privileges, see [ThoughtSpot Product Documentation](https://docs.thoughtspot.com/cloud/latest/groups-privileges). #### Supported operations The API endpoint lets you perform the following operations: * Assign privileges * Add users * Define sharing visibility * Add sub-groups * Assign a default Liveboard + * @param createUserGroupRequest + */ + createUserGroup(createUserGroupRequest: CreateUserGroupRequest, _options?: Configuration): Promise; + /** + * Version: 9.0.0.cl or later Removes the specified group object from the ThoughtSpot system. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `GROUP_ADMINISTRATION` (**Can manage groups**) privilege is required. + * @param groupIdentifier GUID or name of the group. + */ + deleteUserGroup(groupIdentifier: string, _options?: Configuration): Promise; + /** + * Version: 9.0.0.cl or later Imports group objects from external databases into ThoughtSpot. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `GROUP_ADMINISTRATION` (**Can manage groups**) privilege is required. During the import operation: * If the specified group is not available in ThoughtSpot, it will be added to ThoughtSpot. * If `delete_unspecified_groups` is set to `true`, the groups not specified in the API request, excluding administrator and system user groups, are deleted. * If the specified groups are already available in ThoughtSpot, the object properties of these groups are modified and synchronized as per the input data in the API request. A successful API call returns the object that represents the changes made in the ThoughtSpot system. + * @param importUserGroupsRequest + */ + importUserGroups(importUserGroupsRequest: ImportUserGroupsRequest, _options?: Configuration): Promise; + /** + * Version: 9.0.0.cl or later Gets a list of user group objects from the ThoughtSpot system. To get details of a specific user group, specify the user group GUID or name. You can also filter the API response based on User ID, Org ID, Role ID, type of group, sharing visibility, privileges assigned to the group, and the Liveboard IDs assigned to the users in the group. Available to all users. Users with `ADMINISTRATION` (**Can administer ThoughtSpot**) privileges can view all users properties. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `GROUP_ADMINISTRATION` (**Can manage groups**) privilege is required. **NOTE**: If you do not get precise results, try setting `record_size` to `-1` and `record_offset` to `0`. + * @param searchUserGroupsRequest + */ + searchUserGroups(searchUserGroupsRequest: SearchUserGroupsRequest, _options?: Configuration): Promise; + /** + * Version: 9.0.0.cl or later Updates the properties of a group object in ThoughtSpot. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `GROUP_ADMINISTRATION` (**Can manage groups**) privilege is required. #### Supported operations This API endpoint lets you perform the following operations in a single API request: * Edit [privileges](https://developers.thoughtspot.com/docs/?pageid=api-user-management#group-privileges) * Add or remove users * Change sharing visibility settings * Add or remove sub-groups * Assign a default Liveboard or update the existing settings + * @param groupIdentifier GUID or name of the group. + * @param updateUserGroupRequest + */ + updateUserGroup(groupIdentifier: string, updateUserGroupRequest: UpdateUserGroupRequest, _options?: Configuration): Promise; +} +declare class GroupsApiResponseProcessor { + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to createUserGroup + * @throws ApiException if the response code was not in [200, 299] + */ + createUserGroup(response: ResponseContext): Promise; + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to deleteUserGroup + * @throws ApiException if the response code was not in [200, 299] + */ + deleteUserGroup(response: ResponseContext): Promise; + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to importUserGroups + * @throws ApiException if the response code was not in [200, 299] + */ + importUserGroups(response: ResponseContext): Promise; + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to searchUserGroups + * @throws ApiException if the response code was not in [200, 299] + */ + searchUserGroups(response: ResponseContext): Promise>; + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to updateUserGroup + * @throws ApiException if the response code was not in [200, 299] + */ + updateUserGroup(response: ResponseContext): Promise; +} + +/** + * no description + */ +declare class JobsApiRequestFactory extends BaseAPIRequestFactory { + /** + * Version: 26.4.0.cl or later Searches delivery history for communication channels such as webhooks. Returns channel-level delivery status for each job execution record. Use this to monitor channel health and delivery success rates across events. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) or `DEVELOPER` (**Has developer privilege**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, users with `CAN_MANAGE_WEBHOOKS` (**Can manage webhooks**) privilege are also authorized to perform this action. **NOTE**: When `channel_type` is `WEBHOOK`, the following constraints apply: - `job_ids`, `channel_identifiers`, and `events` each accept at most one element. - When `job_ids` is provided, it is used as the sole lookup key and other filter fields are ignored. - When `job_ids` is not provided, `channel_identifiers` and `events` are both required, each containing exactly one element. - Records older than the configured retention period are not returned. - Use `start_epoch_time_in_millis` and/or `end_epoch_time_in_millis` to narrow results to a specific time window. + * @param searchChannelHistoryRequest + */ + searchChannelHistory(searchChannelHistoryRequest: SearchChannelHistoryRequest, _options?: Configuration): Promise; +} +declare class JobsApiResponseProcessor { + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to searchChannelHistory + * @throws ApiException if the response code was not in [200, 299] + */ + searchChannelHistory(response: ResponseContext): Promise; +} + +/** + * no description + */ +declare class LogApiRequestFactory extends BaseAPIRequestFactory { + /** + * Version: 9.0.0.cl or later Fetches security audit logs. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the [Admin Control](https://developers.thoughtspot.com/docs/rbac#_admin_control) privileges are required. #### Usage guidelines By default, the API retrieves logs for the last 24 hours. You can set a custom duration in EPOCH time. Make sure the log duration specified in your API request doesn’t exceed 24 hours. If you must fetch logs for a longer time range, modify the duration and make multiple sequential API requests. Upon successful execution, the API returns logs with the following information: * timestamp of the event * event ID * event type * name and GUID of the user * IP address of ThoughtSpot instance For more information see [Audit logs Documentation](https://developers.thoughtspot.com/docs/audit-logs). + * @param fetchLogsRequest + */ + fetchLogs(fetchLogsRequest: FetchLogsRequest, _options?: Configuration): Promise; +} +declare class LogApiResponseProcessor { + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to fetchLogs + * @throws ApiException if the response code was not in [200, 299] + */ + fetchLogs(response: ResponseContext): Promise>; +} + +/** + * no description + */ +declare class MetadataApiRequestFactory extends BaseAPIRequestFactory { + /** + * Convert worksheets to models Version: 10.6.0.cl or later ## Prerequisites - **Privileges Required:** - `DATAMANAGEMENT` (Can manage data) or `ADMINISTRATION` (Can administer ThoughtSpot). - **Additional Privileges (if RBAC is enabled):** - `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` (Can manage data models). --- ## Usage Guidelines ### Parameters 1. **worksheet_ids** - **Description:** A comma-separated list of GUIDs (Globally Unique Identifiers) specifying the Worksheets to be converted. - **Usage:** - Used only when `convert_all` is set to `false`. - Leave empty or omit when `convert_all` is set to `true`. 2. **exclude_worksheet_ids** - **Description:** A comma-separated list of GUIDs specifying Worksheets to be excluded from conversion. - **Usage:** - Useful when `convert_all` is set to `true` and specific Worksheets should not be converted. 3. **convert_all** - **Description:** Sets the scope of conversion. - **Options:** - `true`: Converts all Worksheets in the system, except those specified in `exclude_worksheet_ids`. - `false`: Converts only the Worksheets listed in `worksheet_ids`. 4. **apply_changes** - **Description:** Specifies whether to apply changes directly to ThoughtSpot or to generate a preview before applying any changes.Used for validation of conversion. - **Options:** - `true`: Applies conversion changes directly to ThoughtSpot. - `false`: Generates only a preview of the changes and does not apply any changes to ThoughtSpot --- ## Best Practices 1. **Backup Before Conversion:** Always export metadata as a backup before initiating the conversion process 2. **Partial Conversion for Testing:** Test the conversion process by setting `convert_all` to `false` and specifying a small number of `worksheet_ids`. 3. **Verify Dependencies:** Check for dependent objects, such as Tables and Connections, to avoid invalid references. 4. **Review Changes:** Use `apply_changes: false` to preview the impact of the conversion before applying changes. --- ## Examples ### Convert Specific Worksheets ```json { \"worksheet_ids\": [\"guid1\", \"guid2\", \"guid3\"], \"exclude_worksheet_ids\": [], \"convert_all\": false, \"apply_changes\": true } ``` ### Convert All Accessible Worksheets ```json { \"worksheet_ids\": [], \"exclude_worksheet_ids\": [], \"convert_all\": true, \"apply_changes\": true } ``` ### Exclude Specific Worksheets While Converting All Accessible Worksheets ```json { \"worksheet_ids\": [], \"exclude_worksheet_ids\": [\"abc\"], \"convert_all\": true, \"apply_changes\": true } ``` + * @param convertWorksheetToModelRequest + */ + convertWorksheetToModel(convertWorksheetToModelRequest: ConvertWorksheetToModelRequest, _options?: Configuration): Promise; + /** + * Makes a copy of an Answer or Liveboard Version: 10.3.0.cl or later Creates a copy of a metadata object. Requires at least view access to the metadata object being copied. Upon successful execution, the API creates a copy of the metadata object specified in the API request and returns the ID of the new object. + * @param copyObjectRequest + */ + copyObject(copyObjectRequest: CopyObjectRequest, _options?: Configuration): Promise; + /** + * Version: 9.0.0.cl or later Removes the specified metadata object from the ThoughtSpot system. Requires edit access to the metadata object. + * @param deleteMetadataRequest + */ + deleteMetadata(deleteMetadataRequest: DeleteMetadataRequest, _options?: Configuration): Promise; + /** + * Version: 9.0.0.cl or later Exports the [TML](https://docs.thoughtspot.com/cloud/latest/tml) representation of metadata objects in JSON or YAML format. Requires `DATADOWNLOADING` (**Can download Data**) and at least view access to the metadata object. #### Usage guidelines * You can export one or several objects by passing metadata object GUIDs in the `metadata` array. * When exporting TML content for a Liveboard or Answer object, you can set `export_associated` to `true` to retrieve TML content for underlying Worksheets, Tables, or Views, including the GUID of each object within the headers. When `export_associated` is set to `true`, consider retrieving one metadata object at a time. * Set `export_fqns` to `true` to add FQNs of the referenced objects in the TML content. For example, if you send an API request to retrieve TML for a Liveboard and its associated objects, the API returns the TML content with FQNs of the referenced Worksheet. Exporting TML with FQNs is useful if ThoughtSpot has multiple objects with the same name and you want to eliminate ambiguity when importing TML files into ThoughtSpot. It eliminates the need for adding FQNs of the referenced objects manually during the import operation. * To export only the TML of feedbacks associated with an object, set the GUID of the object as `identifier`, and set the `type` as `FEEDBACK` in the `metadata` array. * To export the TML of an object along with the feedbacks associated with it, set the GUID of the object as `identifier`, set the `type` as `LOGIAL_TABLE` in the `metadata` array, and set `export_with_associated_feedbacks` in `export_options` to true. For more information, see [TML Documentation](https://developers.thoughtspot.com/docs/tml#_export_a_tml). For more information on feedbacks, see [Feedback Documentation](https://docs.thoughtspot.com/cloud/latest/sage-feedback). + * @param exportMetadataTMLRequest + */ + exportMetadataTML(exportMetadataTMLRequest: ExportMetadataTMLRequest, _options?: Configuration): Promise; + /** + * Version: 10.1.0.cl or later Exports the [TML](https://docs.thoughtspot.com/cloud/latest/tml) representation of metadata objects in JSON or YAML format. ### **Permissions Required** Requires `DATAMANAGEMENT` (**Can manage data**) and `USERMANAGEMENT` (**Can manage users**) privileges. #### **Usage Guidelines** This API is only applicable for `USER`, `GROUP`, and `ROLES` metadata types. - `batch_offset` Indicates the starting position within the complete dataset from which the API should begin returning objects. Useful for paginating results efficiently. - `batch_size` Specifies the number of objects or items to retrieve in a single request. Helps control response size for better performance. - `edoc_format` Defines the format of the TML content. The exported metadata can be in JSON or YAML format. - `export_dependent` Specifies whether to include dependent metadata objects in the export. Ensures related objects are also retrieved if needed. - `all_orgs_override` Indicates whether the export operation applies across all organizations. Useful for multi-tenant environments where cross-org exports are required. + * @param exportMetadataTMLBatchedRequest + */ + exportMetadataTMLBatched(exportMetadataTMLBatchedRequest: ExportMetadataTMLBatchedRequest, _options?: Configuration): Promise; + /** + * Version: 9.0.0.cl or later Fetches the underlying SQL query data for an Answer object. Requires at least view access to the Answer object. Upon successful execution, the API returns the SQL queries for the specified object as shown in this example: ``` { \"metadata_id\":\"8fbe44a8-46ad-4b16-8d39-184b2fada490\", \"metadata_name\":\"Total sales\", \"metadata_type\":\"ANSWER\", \"sql_queries\":[ { \"metadata_id\":\"8fbe44a8-46ad-4b16-8d39-184b2fada490\", \"metadata_name\":\"Total sales -test\", \"sql_query\":\"SELECT \\n \\\"ta_1\\\".\\\"REGION\\\" \\\"ca_1\\\", \\n \\\"ta_2\\\".\\\"PRODUCTNAME\\\" \\\"ca_2\\\", \\n \\\"ta_1\\\".\\\"STORENAME\\\" \\\"ca_3\\\", \\n CASE\\n WHEN sum(\\\"ta_3\\\".\\\"SALES\\\") IS NOT NULL THEN sum(\\\"ta_3\\\".\\\"SALES\\\")\\n ELSE 0\\n END \\\"ca_4\\\", \\n CASE\\n WHEN sum(\\\"ta_3\\\".\\\"QUANTITYPURCHASED\\\") IS NOT NULL THEN sum(\\\"ta_3\\\".\\\"QUANTITYPURCHASED\\\")\\n ELSE 0\\n END \\\"ca_5\\\"\\nFROM \\\"RETAILAPPAREL\\\".\\\"PUBLIC\\\".\\\"FACT_RETAPP_SALES\\\" \\\"ta_3\\\"\\n JOIN \\\"RETAILAPPAREL\\\".\\\"PUBLIC\\\".\\\"DIM_RETAPP_STORES\\\" \\\"ta_1\\\"\\n ON \\\"ta_3\\\".\\\"STOREID\\\" = \\\"ta_1\\\".\\\"STOREID\\\"\\n JOIN \\\"RETAILAPPAREL\\\".\\\"PUBLIC\\\".\\\"DIM_RETAPP_PRODUCTS\\\" \\\"ta_2\\\"\\n ON \\\"ta_3\\\".\\\"PRODUCTID\\\" = \\\"ta_2\\\".\\\"PRODUCTID\\\"\\nGROUP BY \\n \\\"ca_1\\\", \\n \\\"ca_2\\\", \\n \\\"ca_3\\\"\\n\" } ] } ``` + * @param fetchAnswerSqlQueryRequest + */ + fetchAnswerSqlQuery(fetchAnswerSqlQueryRequest: FetchAnswerSqlQueryRequest, _options?: Configuration): Promise; + /** + * Version: 10.4.0.cl or later Gets information about the status of the TML async import task scheduled using the `/api/rest/2.0/metadata/tml/async/import` API call. To fetch the task details, specify the ID of the TML async import task. Requires access to the task ID. The API allows users who initiated the asynchronous TML import via `/api/rest/2.0/metadata/tml/async/import` to view the status of their tasks. Users with administration privilege can view the status of all import tasks initiated by the users in their Org. #### Usage guidelines See [TML API Documentation](https://developers.thoughtspot.com/docs/tml#_fetch_status_of_the_tml_import_task) for usage guidelines. + * @param fetchAsyncImportTaskStatusRequest + */ + fetchAsyncImportTaskStatus(fetchAsyncImportTaskStatusRequest: FetchAsyncImportTaskStatusRequest, _options?: Configuration): Promise; + /** + * Version: 9.0.0.cl or later Fetches the underlying SQL query data for a Liveboard object and its visualizations. Requires at least view access to the Liveboard object. To get SQL query data for a Liveboard, specify the GUID of the Liveboard. Optionally, you can add an array of visualization GUIDs to retrieve the SQL query data for visualizations in the Liveboard. Upon successful execution, the API returns the SQL queries for the specified object as shown in this example: ``` { \"metadata_id\": \"fa68ae91-7588-4136-bacd-d71fb12dda69\", \"metadata_name\": \"Total Sales\", \"metadata_type\": \"LIVEBOARD\", \"sql_queries\": [ { \"metadata_id\": \"b3b6d2b9-089a-490c-8e16-b144650b7843\", \"metadata_name\": \"Total quantity purchased, Total sales by region\", \"sql_query\": \"SELECT \\n \\\"ta_1\\\".\\\"REGION\\\" \\\"ca_1\\\", \\n CASE\\n WHEN sum(\\\"ta_2\\\".\\\"QUANTITYPURCHASED\\\") IS NOT NULL THEN sum(\\\"ta_2\\\".\\\"QUANTITYPURCHASED\\\")\\n ELSE 0\\n END \\\"ca_2\\\", \\n CASE\\n WHEN sum(\\\"ta_2\\\".\\\"SALES\\\") IS NOT NULL THEN sum(\\\"ta_2\\\".\\\"SALES\\\")\\n ELSE 0\\n END \\\"ca_3\\\"\\nFROM \\\"RETAILAPPAREL\\\".\\\"PUBLIC\\\".\\\"FACT_RETAPP_SALES\\\" \\\"ta_2\\\"\\n JOIN \\\"RETAILAPPAREL\\\".\\\"PUBLIC\\\".\\\"DIM_RETAPP_STORES\\\" \\\"ta_1\\\"\\n ON \\\"ta_2\\\".\\\"STOREID\\\" = \\\"ta_1\\\".\\\"STOREID\\\"\\nGROUP BY \\\"ca_1\\\"\" } ] } ``` + * @param fetchLiveboardSqlQueryRequest + */ + fetchLiveboardSqlQuery(fetchLiveboardSqlQueryRequest: FetchLiveboardSqlQueryRequest, _options?: Configuration): Promise; + /** + * Version: 9.0.0.cl or later Imports [TML](https://docs.thoughtspot.com/cloud/latest/tml) files into ThoughtSpot. Requires `DATAMANAGEMENT` (**Can manage data**) or `ADMINISTRATION` (**Can administer ThoughtsSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the following Data control privileges may be required: - `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) - `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` (**Can manage data models**) #### Usage guidelines * Import all related objects in a single TML Import API call. For example, Tables that use the same Connection object and Worksheets connected to these Tables. * Include the `fqn` property to distinguish objects that have the same name. For example, if you have multiple Connections or Worksheets with the same name on ThoughtSpot and the Connection or Worksheet referenced in your TML file does not have a unique name to distinguish, it may result in invalid object references. Adding `fqn` helps ThoughtSpot differentiate a Table from another with the same name. We recommend [exporting TML with FQNs](#/http/api-endpoints/metadata/export-metadata-tml) and using these during the import operation. * You can upload multiple TML files at a time. If you import a Worksheet along with Liveboards, Answers, and other dependent objects in a single API call, the imported objects will be immediately available for use. When you import only a Worksheet object, it may take some time for the Worksheet to become available in the ThoughtSpot system. Please wait for a few minutes, and then proceed to create an Answer and Liveboard from the newly imported Worksheet. For more information, see [TML Documentation](https://developers.thoughtspot.com/docs/tml#_import_a_tml). + * @param importMetadataTMLRequest + */ + importMetadataTML(importMetadataTMLRequest: ImportMetadataTMLRequest, _options?: Configuration): Promise; + /** + * Version: 10.4.0.cl or later Schedules a task to import [TML](https://docs.thoughtspot.com/cloud/latest/tml) files into ThoughtSpot. You can use this API endpoint to process TML objects asynchronously when importing TMLs of large and complex metadata objects into ThoughtSpot. Unlike the synchronous import TML operation, the API processes TML data in the background and returns a task ID, which can be used to check the status of the import task via `/api/rest/2.0/metadata/tml/async/status` API endpoint. Requires `DATAMANAGEMENT` (**Can manage data**) or `ADMINISTRATION` (**Can administer ThoughtsSpot**) privilege, and edit access to the TML objects. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the following Data control privileges may be required: - `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) - `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` (**Can manage data models**) #### Usage guidelines See [Async TML API Documentation](https://developers.thoughtspot.com/docs/tml#_import_tml_objects_asynchronously) for usage guidelines. + * @param importMetadataTMLAsyncRequest + */ + importMetadataTMLAsync(importMetadataTMLAsyncRequest: ImportMetadataTMLAsyncRequest, _options?: Configuration): Promise; + /** + * Parameterize fields in metadata objects. Version: 10.9.0.cl or later **Note:** This API endpoint is deprecated and will be removed from ThoughtSpot in a future release. Use [POST /api/rest/2.0/metadata/parameterize-fields](/api/rest/2.0/metadata/parameterize-fields) instead. Allows parameterizing fields in metadata objects in ThoughtSpot. Requires appropriate permissions to modify the metadata object. The API endpoint allows parameterizing the following types of metadata objects: * Logical Tables * Connections * Connection Configs For a Logical Table the field type must be `ATTRIBUTE` and field name can be one of: * databaseName * schemaName * tableName For a Connection or Connection Config, the field type is always `CONNECTION_PROPERTY`. In this case, field_name specifies the exact property of the Connection or Connection Config that needs to be parameterized. For Connection Config, the only supported field name is: * impersonate_user + * @param parameterizeMetadataRequest + */ + parameterizeMetadata(parameterizeMetadataRequest: ParameterizeMetadataRequest, _options?: Configuration): Promise; + /** + * Parameterize multiple fields of metadata objects. For example [schemaName, databaseName] for LOGICAL_TABLE. Version: 26.5.0.cl or later Allows parameterizing multiple fields of metadata objects in ThoughtSpot. For example, you can parameterize [schemaName, databaseName] for LOGICAL_TABLE. Requires appropriate permissions to modify the metadata object. The API endpoint allows parameterizing the following types of metadata objects: * Logical Tables * Connections * Connection Configs For a Logical Table, the field type must be `ATTRIBUTE` and field names can include: * databaseName * schemaName * tableName For a Connection or Connection Config, the field type is always `CONNECTION_PROPERTY`. In this case, field_names specifies the exact properties of the Connection or Connection Config that need to be parameterized. For Connection Config, supported field names include: * impersonate_user You can parameterize multiple fields at once by providing an array of field names. + * @param parameterizeMetadataFieldsRequest + */ + parameterizeMetadataFields(parameterizeMetadataFieldsRequest: ParameterizeMetadataFieldsRequest, _options?: Configuration): Promise; + /** + * Version: 9.0.0.cl or later Gets a list of metadata objects available on the ThoughtSpot system. This API endpoint is available to all users who have view access to the object. Users with `ADMINISTRATION` (**Can administer ThoughtSpot**) privileges can view data for all metadata objects, including users and groups. #### Usage guidelines - To get all metadata objects, send the API request without any attributes. - To get metadata objects of a specific type, set the `type` attribute. For example, to fetch a Worksheet, set the type as `LOGICAL_TABLE`. - To filter metadata objects within type `LOGICAL_TABLE`, set the `subtypes` attribute. For example, to fetch a Worksheet, set the type as `LOGICAL_TABLE` & subtypes as `[WORKSHEET]`. - To get a specific metadata object, specify the GUID. - To customize your search and filter the API response, you can use several parameters. You can search for objects created or modified by specific users, by tags applied to the objects, or by using the include parameters like `include_auto_created_objects`, `include_dependent_objects`, `include_headers`, `include_incomplete_objects`, and so on. You can also define sorting options to sort the data retrieved in the API response. - To get discoverable objects when linientmodel is enabled you can use `include_discoverable_objects` as true else false. Default value is true. - For liveboard metadata type, to get the newer format, set the `liveboard_response_format` as V2. Default value is V1. - To retrieve only objects that are published, set the `include_only_published_objects` as true. Default value is false. **NOTE**: The following parameters support pagination of metadata records: - `tag_identifiers` - `type` - `subtypes` - `created_by_user_identifiers` - `modified_by_user_identifiers` - `owned_by_user_identifiers` - `exclude_objects` - `include_auto_created_objects` - `favorite_object_options` - `include_only_published_objects` If you are using other parameters to search metadata, set `record_size` to `-1` and `record_offset` to `0`. + * @param searchMetadataRequest + */ + searchMetadata(searchMetadataRequest: SearchMetadataRequest, _options?: Configuration): Promise; + /** + * Remove parameterization from fields in metadata objects. Version: 26.5.0.cl or later Allows removing parameterization from fields in metadata objects in ThoughtSpot. Requires appropriate permissions to modify the metadata object. The API endpoint allows unparameterizing the following types of metadata objects: * Logical Tables * Connections * Connection Configs For a Logical Table the field type must be `ATTRIBUTE` and field name can be one of: * databaseName * schemaName * tableName For a Connection or Connection Config, the field type is always `CONNECTION_PROPERTY`. In this case, field_name specifies the exact property of the Connection or Connection Config that needs to be unparameterized. For Connection Config, the only supported field name is: * impersonate_user + * @param unparameterizeMetadataRequest + */ + unparameterizeMetadata(unparameterizeMetadataRequest: UnparameterizeMetadataRequest, _options?: Configuration): Promise; + /** + * Update header attributes for a given list of header objects. Version: 10.6.0.cl or later ## Prerequisites - **Privileges Required:** - `DATAMANAGEMENT` (Can manage data) or `ADMINISTRATION` (Can administer ThoughtSpot). - **Additional Privileges (if RBAC is enabled):** - `ORG_ADMINISTRATION` (Can manage orgs). --- ## Usage Guidelines ### Parameters 1. **headers_update** - **Description:** List of header objects with their attributes to be updated. Each object contains a list of attributes to be updated in the header. - **Usage:** - You must provide either `identifier` or `obj_identifier`, but not both. Both fields cannot be empty. - When `org_identifier` is set to `-1`, only the `identifier` value is accepted; `obj_identifier` is not allowed. 2. **org_identifier** - **Description:** GUID (Globally Unique Identifier) or name of the organization. - **Usage:** - Leaving this field empty assumes that the changes should be applied to the current organization - Provide `org_guid` or `org_name` to uniquely identify the organization where changes need to be applied. . - Provide `-1` if changes have to be applied across all the org. --- ## Note Currently, this API is enabled only for updating the `obj_identifier` attribute. Only `text` will be allowed in attribute\'s value. ## Best Practices 1. **Backup Before Conversion:** Always export metadata as a backup before initiating the update process --- ## Examples ### Only `identifier` is given ```json { \"headers_update\": [ { \"identifier\": \"guid_1\", \"obj_identifier\": \"\", \"type\": \"LOGICAL_COLUMN\", \"attributes\": [ { \"name\": \"obj_id\", \"value\": \"custom_object_id\" } ] } ], \"org_identifier\": \"orgGuid\" } ``` ### Only `obj_identifier` is given ```json { \"headers_update\": [ { \"obj_identifier\": \"custom_object_id\", \"type\": \"ANSWER\", \"attributes\": [ { \"name\": \"obj_id\", \"value\": \"custom_object_id\" } ] } ], \"org_identifier\": \"orgName\" } ``` ### Executing update for all org `-1` ```json { \"headers_update\": [ { \"identifier\": \"guid_1\", \"type\": \"ANSWER\", \"attributes\": [ { \"name\": \"obj_id\", \"value\": \"custom_object_id\" } ] } ], \"org_identifier\": -1 } ``` ### Optional `type` is not provided ```json { \"headers_update\": [ { \"identifier\": \"guid_1\", \"attributes\": [ { \"name\": \"obj_id\", \"value\": \"custom_object_id\" } ] } ], \"org_identifier\": -1 } ``` + * @param updateMetadataHeaderRequest + */ + updateMetadataHeader(updateMetadataHeaderRequest: UpdateMetadataHeaderRequest, _options?: Configuration): Promise; + /** + * Update object IDs for given metadata objects. Version: 10.8.0.cl or later ## Prerequisites - **Privileges Required:** - `DATAMANAGEMENT` (Can manage data) or `ADMINISTRATION` (Can administer ThoughtSpot). - **Additional Privileges (if RBAC is enabled):** - `ORG_ADMINISTRATION` (Can manage orgs). --- ## Usage Guidelines ### Parameters 1. **metadata** - **Description:** List of metadata objects to update their object IDs. - **Usage:** - Use either `current_obj_id` alone OR use `metadata_identifier` with `type` (when needed). - When using `metadata_identifier`, the `type` field is required if using a name instead of a GUID. - The `new_obj_id` field is always required. --- ## Note This API is specifically designed for updating object IDs of metadata objects. It internally uses the header update mechanism to perform the changes. ## Best Practices 1. **Backup Before Update:** Always export metadata as a backup before initiating the update process. 2. **Validation:** - When using `current_obj_id`, ensure it matches the existing object ID exactly. - When using `metadata_identifier` with a name, ensure the `type` is specified correctly. - Verify that the `new_obj_id` follows your naming conventions and is unique within your system. --- ## Examples ### Using current_obj_id ```json { \"metadata\": [ { \"current_obj_id\": \"existing_object_id\", \"new_obj_id\": \"new_object_id\" } ] } ``` ### Using metadata_identifier with GUID ```json { \"metadata\": [ { \"metadata_identifier\": \"01234567-89ab-cdef-0123-456789abcdef\", \"new_obj_id\": \"new_object_id\" } ] } ``` ### Using metadata_identifier with name and type ```json { \"metadata\": [ { \"metadata_identifier\": \"My Answer\", \"type\": \"ANSWER\", \"new_obj_id\": \"new_object_id\" } ] } ``` ### Multiple objects update ```json { \"metadata\": [ { \"current_obj_id\": \"existing_object_id_1\", \"new_obj_id\": \"new_object_id_1\" }, { \"metadata_identifier\": \"My Worksheet\", \"type\": \"LOGICAL_TABLE\", \"new_obj_id\": \"new_object_id_2\" } ] } ``` + * @param updateMetadataObjIdRequest + */ + updateMetadataObjId(updateMetadataObjIdRequest: UpdateMetadataObjIdRequest, _options?: Configuration): Promise; +} +declare class MetadataApiResponseProcessor { + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to convertWorksheetToModel + * @throws ApiException if the response code was not in [200, 299] + */ + convertWorksheetToModel(response: ResponseContext): Promise; + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to copyObject + * @throws ApiException if the response code was not in [200, 299] + */ + copyObject(response: ResponseContext): Promise; + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to deleteMetadata + * @throws ApiException if the response code was not in [200, 299] + */ + deleteMetadata(response: ResponseContext): Promise; + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to exportMetadataTML + * @throws ApiException if the response code was not in [200, 299] + */ + exportMetadataTML(response: ResponseContext): Promise>; + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to exportMetadataTMLBatched + * @throws ApiException if the response code was not in [200, 299] + */ + exportMetadataTMLBatched(response: ResponseContext): Promise; + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to fetchAnswerSqlQuery + * @throws ApiException if the response code was not in [200, 299] + */ + fetchAnswerSqlQuery(response: ResponseContext): Promise; + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to fetchAsyncImportTaskStatus + * @throws ApiException if the response code was not in [200, 299] + */ + fetchAsyncImportTaskStatus(response: ResponseContext): Promise; + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to fetchLiveboardSqlQuery + * @throws ApiException if the response code was not in [200, 299] + */ + fetchLiveboardSqlQuery(response: ResponseContext): Promise; + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to importMetadataTML + * @throws ApiException if the response code was not in [200, 299] + */ + importMetadataTML(response: ResponseContext): Promise>; + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to importMetadataTMLAsync + * @throws ApiException if the response code was not in [200, 299] + */ + importMetadataTMLAsync(response: ResponseContext): Promise; + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to parameterizeMetadata + * @throws ApiException if the response code was not in [200, 299] + */ + parameterizeMetadata(response: ResponseContext): Promise; + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to parameterizeMetadataFields + * @throws ApiException if the response code was not in [200, 299] + */ + parameterizeMetadataFields(response: ResponseContext): Promise; + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to searchMetadata + * @throws ApiException if the response code was not in [200, 299] + */ + searchMetadata(response: ResponseContext): Promise>; + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to unparameterizeMetadata + * @throws ApiException if the response code was not in [200, 299] + */ + unparameterizeMetadata(response: ResponseContext): Promise; + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to updateMetadataHeader + * @throws ApiException if the response code was not in [200, 299] + */ + updateMetadataHeader(response: ResponseContext): Promise; + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to updateMetadataObjId + * @throws ApiException if the response code was not in [200, 299] + */ + updateMetadataObjId(response: ResponseContext): Promise; +} + +/** + * no description + */ +declare class OrgsApiRequestFactory extends BaseAPIRequestFactory { + /** + * Version: 9.0.0.cl or later Creates an Org object. To use this API, the [Orgs](https://docs.thoughtspot.com/cloud/latest/orgs-overview) feature must be enabled in your cluster. Requires cluster administration (**Can administer Org**) privileges. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `ORG_ADMINISTRATION` (**Can manage Orgs**) privilege is required. + * @param createOrgRequest + */ + createOrg(createOrgRequest: CreateOrgRequest, _options?: Configuration): Promise; + /** + * Version: 9.0.0.cl or later Deletes an Org object from the ThoughtSpot system. Requires cluster administration (**Can administer Org**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `ORG_ADMINISTRATION` (**Can manage Orgs**) privilege is required. When you delete an Org, all its users and objects created in that Org context are removed. However, if the users in the deleted Org also exists in other Orgs, they are removed only from the deleted Org. + * @param orgIdentifier ID or name of the Org + */ + deleteOrg(orgIdentifier: string, _options?: Configuration): Promise; + /** + * Version: 9.0.0.cl or later Gets a list of Orgs configured on the ThoughtSpot system. To get details of a specific Org, specify the Org ID or name. You can also pass parameters such as status, visibility, and user identifiers to get a specific list of Orgs. Requires cluster administration (**Can administer Org**) privileges. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `ORG_ADMINISTRATION` (**Can manage Orgs**) privilege is required. + * @param searchOrgsRequest + */ + searchOrgs(searchOrgsRequest: SearchOrgsRequest, _options?: Configuration): Promise; + /** + * Version: 9.0.0.cl or later Updates an Org object. You can modify Org properties such as name, description, and user associations. Requires cluster administration (**Can administer Org**) privileges. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `ORG_ADMINISTRATION` (**Can manage Orgs**) privilege is required. + * @param orgIdentifier ID or name of the Org + * @param updateOrgRequest + */ + updateOrg(orgIdentifier: string, updateOrgRequest: UpdateOrgRequest, _options?: Configuration): Promise; +} +declare class OrgsApiResponseProcessor { + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to createOrg + * @throws ApiException if the response code was not in [200, 299] + */ + createOrg(response: ResponseContext): Promise; + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to deleteOrg + * @throws ApiException if the response code was not in [200, 299] + */ + deleteOrg(response: ResponseContext): Promise; + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to searchOrgs + * @throws ApiException if the response code was not in [200, 299] + */ + searchOrgs(response: ResponseContext): Promise>; + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to updateOrg + * @throws ApiException if the response code was not in [200, 299] + */ + updateOrg(response: ResponseContext): Promise; +} + +/** + * no description + */ +declare class ReportsApiRequestFactory extends BaseAPIRequestFactory { + /** + * Version: 9.0.0.cl or later Exports an Answer in the given file format. You can download the Answer data as a PDF, PNG, CSV, or XLSX file. Requires at least view access to the Answer. #### Usage guidelines In the request body, specify the GUID or name of the Answer and set `file_format`. The default file format is CSV. Use the `type` parameter to specify whether the Answer being exported is a saved Answer (`SAVED`) or a pinned Answer on a Liveboard (`PINNED`). Defaults to `SAVED`. When using `PINNED`, the `metadata_identifier` must be the container id. **NOTE**: * The downloadable file returned in API response file is extensionless. Please rename the downloaded file by typing in the relevant extension. * HTML rendering is not supported for PDF exports of Answers with tables. Optionally, you can define [runtime overrides](https://developers.thoughtspot.com/docs/fetch-data-and-report-apis#_runtime_overrides) to apply to the Answer data. + * @param exportAnswerReportRequest + */ + exportAnswerReport(exportAnswerReportRequest: ExportAnswerReportRequest, _options?: Configuration): Promise; + /** + * Version: 9.0.0.cl or later Exports a Liveboard and its visualizations in PDF, PNG, CSV, or XLSX file format. The default `file_format` is CSV. Requires at least view access to the Liveboard. #### Usage guidelines In the request body, specify the GUID or name of the Liveboard. To generate a Liveboard report with specific visualizations, add GUIDs or names of the visualizations. **NOTE**: * The downloadable file returned in API response file is extensionless. Please rename the downloaded file by typing in the relevant extension. * Optionally, you can define [runtime overrides](https://developers.thoughtspot.com/docs/fetch-data-and-report-apis#_runtime_overrides) to apply to the Answer data. * To include unsaved changes in the report, pass the `transient_pinboard_content` script generated from the `getExportRequestForCurrentPinboard` method in the Visual Embed SDK. Upon successful execution, the API returns the report with unsaved changes, including ad hoc changes to visualizations. For more information, see [Liveboard Report API](https://developers.thoughtspot.com/docs/fetch-data-and-report-apis#_liveboard_report_api). * Starting with ThoughtSpot Cloud 10.9.0.cl release, the Liveboard can be exported in the PNG format in the resolution of your choice. To enable this on your instance, contact ThoughtSpot support. When this feature is enabled, the options `include_cover_page`,`include_filter_page` within the `png_options` will not be available for PNG exports. * Starting with the ThoughtSpot Cloud 26.2.0.cl release, * Liveboards can be exported in CSV format. * All visualizations within a Liveboard can be exported as individual CSV files. * When exporting multiple visualizations or the entire Liveboard, the system returns the report as a compressed ZIP file containing the separate CSV files for each visualization. * Liveboards can also be exported in XLSX format. * All selected visualizations are consolidated into a single Excel workbook (.xlsx), with each visualization placed in its own worksheet (tab). * XLSX exports are limited to a maximum of 255 worksheets (tabs) per workbook. + * @param exportLiveboardReportRequest + */ + exportLiveboardReport(exportLiveboardReportRequest: ExportLiveboardReportRequest, _options?: Configuration): Promise; +} +declare class ReportsApiResponseProcessor { + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to exportAnswerReport + * @throws ApiException if the response code was not in [200, 299] + */ + exportAnswerReport(response: ResponseContext): Promise; + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to exportLiveboardReport + * @throws ApiException if the response code was not in [200, 299] + */ + exportLiveboardReport(response: ResponseContext): Promise; +} + +/** + * no description + */ +declare class RolesApiRequestFactory extends BaseAPIRequestFactory { + /** + * Version: 9.5.0.cl or later Creates a Role object in ThoughtSpot. Available only if [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance. To create a Role, the `ROLE_ADMINISTRATION` (**Can manage roles**) privilege is required. + * @param createRoleRequest + */ + createRole(createRoleRequest: CreateRoleRequest, _options?: Configuration): Promise; + /** + * Version: 9.5.0.cl or later Deletes a Role object from the ThoughtSpot system. Available only if [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance. To delete a Role, the `ROLE_ADMINISTRATION` (**Can manage roles**) privilege is required. + * @param roleIdentifier Unique ID or name of the Role. ReadOnly roles cannot be deleted. + */ + deleteRole(roleIdentifier: string, _options?: Configuration): Promise; + /** + * Version: 9.5.0.cl or later Gets a list of Role objects from the ThoughtSpot system. Available if [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance. To search for Roles, the `ROLE_ADMINISTRATION` (**Can manage roles**) privilege is required. To get details of a specific Role object, specify the GUID or name. You can also filter the API response based on user group and Org identifiers, privileges assigned to the Role, and deprecation status. + * @param searchRolesRequest + */ + searchRoles(searchRolesRequest: SearchRolesRequest, _options?: Configuration): Promise; + /** + * Version: 9.5.0.cl or later Updates the properties of a Role object. Available only if [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance. To update a Role, the `ROLE_ADMINISTRATION` (**Can manage roles**) privilege is required. + * @param roleIdentifier Unique ID or name of the Role. + * @param updateRoleRequest + */ + updateRole(roleIdentifier: string, updateRoleRequest: UpdateRoleRequest, _options?: Configuration): Promise; +} +declare class RolesApiResponseProcessor { + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to createRole + * @throws ApiException if the response code was not in [200, 299] + */ + createRole(response: ResponseContext): Promise; + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to deleteRole + * @throws ApiException if the response code was not in [200, 299] + */ + deleteRole(response: ResponseContext): Promise; + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to searchRoles + * @throws ApiException if the response code was not in [200, 299] + */ + searchRoles(response: ResponseContext): Promise>; + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to updateRole + * @throws ApiException if the response code was not in [200, 299] + */ + updateRole(response: ResponseContext): Promise; +} + +/** + * no description + */ +declare class SchedulesApiRequestFactory extends BaseAPIRequestFactory { + /** + * Create schedule. Version: 9.4.0.cl or later Creates a Liveboard schedule job. Requires at least edit access to Liveboards. To create a schedule on behalf of another user, you need `ADMINISTRATION` (**Can administer Org**) or `JOBSCHEDULING` (**Can schedule for others**) privilege and edit access to the Liveboard. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `JOBSCHEDULING` (**Can schedule for others**) privilege is required. #### Usage guidelines * The description text is mandatory. The description text appears as **Description: ** in the Liveboard schedule email notifications. * For Liveboards with both charts and tables, schedule creation is only supported in PDF and XLS formats. Schedules created in CSV formats for such Liveboards will fail to run. If `PDF` is set as the `file_format`, enable `pdf_options` to get the correct attachment. Not doing so may cause the attachment to be rendered empty. * To include only specific visualizations, specify the visualization GUIDs in the `visualization_identifiers` array. * You can schedule a Liveboard job to run periodically by setting frequency parameters. You can set the schedule to run daily, weekly, monthly or every n minutes or hours. The scheduled job can also be configured to run at a specific time of the day or on specific days of the week or month. Please ensure that when setting the schedule frequency for _minute of the object_, only values that are multiples of 5 are included. * If the `frequency` parameters are defined, you can set the time zone to a value that matches your server\'s time zone. For example, `US/Central`, `Etc/UTC`, `CET`. The default time zone is `America/Los_Angeles`. For more information about Liveboard jobs, see [ThoughtSpot Product Documentation](https://docs.thoughtspot.com/cloud/latest/liveboard-schedule). + * @param createScheduleRequest + */ + createSchedule(createScheduleRequest: CreateScheduleRequest, _options?: Configuration): Promise; + /** + * Deletes a scheduled job. Version: 9.4.0.cl or later Deletes a scheduled Liveboard job. Requires at least edit access to Liveboard or `ADMINISTRATION` (**Can administer Org**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `JOBSCHEDULING` (**Can schedule for others**) privilege is required. + * @param scheduleIdentifier Unique ID or name of the scheduled job. + */ + deleteSchedule(scheduleIdentifier: string, _options?: Configuration): Promise; + /** + * Search Schedules Version: 9.4.0.cl or later Gets a list of scheduled jobs configured for a Liveboard. To get details of a specific scheduled job, specify the name or GUID of the scheduled job. Requires at least view access to Liveboards. **NOTE**: When filtering schedules by parameters other than `metadata`, set `record_size` to `-1` and `record_offset` to `0` for accurate results. + * @param searchSchedulesRequest + */ + searchSchedules(searchSchedulesRequest: SearchSchedulesRequest, _options?: Configuration): Promise; + /** + * Update schedule. Version: 9.4.0.cl or later Updates a scheduled Liveboard job. Requires at least edit access to Liveboards. To update a schedule on behalf of another user, you need `ADMINISTRATION` (**Can administer Org**) or `JOBSCHEDULING` (**Can schedule for others**) privilege and edit access to the Liveboard. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `JOBSCHEDULING` (**Can schedule for others**) privilege is required. The API endpoint allows you to pause a scheduled job, change the status of a paused job. You can also edit the recipients list, frequency of the job, format of the file to send to the recipients in email notifications, PDF options, and time zone setting. + * @param scheduleIdentifier Unique ID or name of the schedule. + * @param updateScheduleRequest + */ + updateSchedule(scheduleIdentifier: string, updateScheduleRequest: UpdateScheduleRequest, _options?: Configuration): Promise; +} +declare class SchedulesApiResponseProcessor { + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to createSchedule + * @throws ApiException if the response code was not in [200, 299] + */ + createSchedule(response: ResponseContext): Promise; + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to deleteSchedule + * @throws ApiException if the response code was not in [200, 299] + */ + deleteSchedule(response: ResponseContext): Promise; + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to searchSchedules + * @throws ApiException if the response code was not in [200, 299] + */ + searchSchedules(response: ResponseContext): Promise>; + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to updateSchedule + * @throws ApiException if the response code was not in [200, 299] + */ + updateSchedule(response: ResponseContext): Promise; +} + +/** + * no description + */ +declare class SecurityApiRequestFactory extends BaseAPIRequestFactory { + /** + * Version: 9.0.0.cl or later Transfers the ownership of one or several objects from one user to another. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `USER_ADMINISTRATION` (**Can manage users**) privilege and edit access to the objects are required. + * @param assignChangeAuthorRequest + */ + assignChangeAuthor(assignChangeAuthorRequest: AssignChangeAuthorRequest, _options?: Configuration): Promise; + /** + * Version: 10.12.0.cl or later Fetches column security rules for specified tables. This API endpoint retrieves column-level security rules configured for tables. It returns information about which columns are secured and which groups have access to those columns. #### Usage guidelines - Provide an array of table identifiers using either `identifier` (GUID or name) or `obj_identifier` (object ID) - At least one of `identifier` or `obj_identifier` must be provided for each table - The API returns column security rules for all specified tables - Users must have appropriate permissions to access security rules for the specified tables #### Required permissions - `ADMINISTRATION` - Can administer ThoughtSpot - `DATAMANAGEMENT` - Can manage data - `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` - Can manage worksheet views and tables #### Example request ```json { \"tables\": [ { \"identifier\": \"table-guid\", \"obj_identifier\": \"table-object-id\" } ] } ``` #### Response format The API returns an array of `ColumnSecurityRuleResponse` objects wrapped in a `data` field. Each `ColumnSecurityRuleResponse` object contains: - Table information (GUID and object ID) - Array of column security rules with column details, group access, and source table information #### Example response ```json { \"data\": [ { \"guid\": \"table-guid\", \"objId\": \"table-object-id\", \"columnSecurityRules\": [ { \"column\": { \"id\": \"col_123\", \"name\": \"Salary\" }, \"groups\": [ { \"id\": \"group_1\", \"name\": \"HR Department\" } ], \"sourceTableDetails\": { \"id\": \"source-table-guid\", \"name\": \"Employee_Data\" } } ] } ] } ``` + * @param fetchColumnSecurityRulesRequest + */ + fetchColumnSecurityRules(fetchColumnSecurityRulesRequest: FetchColumnSecurityRulesRequest, _options?: Configuration): Promise; + /** + * Version: 26.3.0.cl or later This API fetches the object privileges present for the given list of principals (user or group), on the given set of objects. It supports pagination, which can be enabled and configured using the request parameters. It provides users access to certain features based on privilege based access control. #### Usage guidelines - Specify the `type` (`USER` or `USER_GROUP`) and `identifier` (either GUID or name) of the principals for which you want to retrieve object privilege information in the `principals` array. - Specify the `type` (`LOGICAL_TABLE`) and `identifier` (either GUID or name) of the metadata objects for which you want to retrieve object privilege information in the `metadata` array. Only `LOGICAL_TABLE` metadata type is supported for now. It may be extended for other metadata types in future. - To control the offset from where principals have to be fetched, use `record_offset`. When `record_offset` is 0, information is fetched from the beginning. - To control the number of principals to be fetched, use `record_size`. Default `record_size` is 20. - Ensure `record_offset` for a subsequent request is one more than the value of `record_size` of the previous request. - Ensure using correct Authorization Bearer Token corresponding to specific user & org. #### Example request ```json { \"principals\": [ { \"type\": \"type-1\", \"identifier\": \"principal-guid-or-name-1\" }, { \"type\": \"type-2\", \"identifier\": \"principal-guid-or-name-2\" } ], \"metadata\": [ { \"type\": \"metadata-type-1\", \"identifier\": \"metadata-guid-or-name-1\" }, { \"type\": \"metadata-type-2\", \"identifier\": \"metadata-guid-or-name-2\" } ], \"record_offset\": 0, \"record_size\": 20 } ``` #### Response format The API returns an array of `metadata_object_privileges` objects wrapped in JSON. Each `metadata_object_privileges` object contains: - Metadata information (GUID, name and type) - Array of `principal_object_privilege_info`. - Each `principal_object_privilege_info` contains: - Principal type. All principals of this type are listed as described below. - Array of `principal_object_privileges`. - Each `principal_object_privileges` contains: - Principal information (GUID, name, subtype) - List of applied object level privileges. #### Example response ```json { \"metadata_object_privileges\": [ { \"metadata_id\": \"metadata-guid-1\", \"metadata_name\": \"metadata-name-1\", \"metadata_type\": \"metadata-type-1\", \"principal_object_privilege_info\": [ { \"principal_type\": \"principal-type-1\", \"principal_object_privileges\": [ { \"principal_id\": \"principal-guid-1\", \"principal_name\": \"principal-name-1\", \"principal_sub_type\": \"principal-sub-type-1\", \"object_privileges\": \"[object-privilege-1, object-privilege-2]\" }, { \"principal_id\": \"principal-guid-2\", \"principal_name\": \"principal-name-2\", \"principal_sub_type\": \"principal-sub-type-2\", \"object_privileges\": \"[object-privilege-1, object-privilege-2]\" } ] }, { \"principal_type\": \"principal-type-2\", \"principal_object_privileges\": [ { \"principal_id\": \"principal-guid-3\", \"principal_name\": \"principal-guid-4\", \"principal_sub_type\": \"principal-sub-type-4\", \"object_privileges\": \"[object-privilege-1]\" } ] } ] }, { \"metadata_id\": \"metadata-guid-2\", \"metadata_name\": \"metadata-name-2\", \"metadata_type\": \"metadata-type-2\", \"principal_object_privilege_info\": [ { \"principal_type\": \"principal-type-1\", \"principal_object_privileges\": [ { \"principal_id\": \"principal-guid-1\", \"principal_name\": \"principal-name-1\", \"principal_sub_type\": \"principal-sub-type-1\", \"object_privileges\": \"[object-privilege-3, object-privilege-4]\" }, { \"principal_id\": \"principal-guid-2\", \"principal_name\": \"principal-name-2\", \"principal_sub_type\": \"principal-sub-type-2\", \"object_privileges\": \"[object-privilege-4]\" } ] } ] } ] } ``` + * @param fetchObjectPrivilegesRequest + */ + fetchObjectPrivileges(fetchObjectPrivilegesRequest: FetchObjectPrivilegesRequest, _options?: Configuration): Promise; + /** + * Version: 9.0.0.cl or later Fetches object permission details for a given principal object such as a user and group. Requires view access to the metadata object. #### Usage guidelines * To get a list of all metadata objects that a user or group can access, specify the `type` and GUID or name of the principal. * To get permission details for a specific object, add the `type` and GUID or name of the metadata object to your API request. Upon successful execution, the API returns a list of metadata objects and permission details for each object. + * @param fetchPermissionsOfPrincipalsRequest + */ + fetchPermissionsOfPrincipals(fetchPermissionsOfPrincipalsRequest: FetchPermissionsOfPrincipalsRequest, _options?: Configuration): Promise; + /** + * Version: 9.0.0.cl or later Fetches permission details for a given metadata object. Requires view access to the metadata object. #### Usage guidelines * To fetch a list of users and groups for a metadata object, specify `type` and GUID or name of the metadata object. * To get permission details for a specific user or group, add `type` and GUID or name of the principal object to your API request. Upon successful execution, the API returns permission details and principal information for the object specified in the API request. + * @param fetchPermissionsOnMetadataRequest + */ + fetchPermissionsOnMetadata(fetchPermissionsOnMetadataRequest: FetchPermissionsOnMetadataRequest, _options?: Configuration): Promise; + /** + * Version: 26.3.0.cl or later This API allows the addition or deletion of object level privileges for a set of users and groups, on a set of metadata objects. It provides users to access certain features based on privilege based access control. #### Usage guidelines - Specify the `operation`. The supported operations are: `ADD`, `REMOVE`. - Specify the type of the objects on which the object privileges are being provided in `metadata_type`. Only `LOGICAL_TABLE` metadata type is supported for now. It may be extended for other metadata types in future. - Specify the list of object privilege types in the `object_privilege_types` array. The supported object privilege types are: `SPOTTER_COACHING_PRIVILEGE`. - Specify the identifiers (either GUID or name) for the metadata objects in the `metadata_identifiers` array. - Specify the `type` (`USER` or `USER_GROUP`) and `identifier` (either GUID or name) of the principals to which you want to apply the given operation and given object privileges in the `principals` array. - Ensure using correct Authorization Bearer Token corresponding to specific user & org. #### Example request ```json { \"operation\": \"operation-type\", \"metadata_type\": \"metadata-type\", \"object_privilege_types\": [\"privilege-type-1\", \"privilege-type-2\"], \"metadata_identifiers\": [\"metadata-guid-or-name-1\", \"metadata-guid-or-name-1\"], \"principals\": [ { \"type\": \"type-1\", \"identifier\": \"principal-guid-or-name-1\" }, { \"type\": \"type-2\", \"identifier\": \"principal-guid-or-name-2\" } ] } ``` > ###### Note: > * Only admin users, users with edit access and users with coaching privilege on a given data-model can add or remove principals related to SPOTTER_COACHING_PRIVILEGE + * @param manageObjectPrivilegeRequest + */ + manageObjectPrivilege(manageObjectPrivilegeRequest: ManageObjectPrivilegeRequest, _options?: Configuration): Promise; + /** + * Version: 26.5.0.cl or later Allows publishing metadata objects across organizations in ThoughtSpot. Requires ADMINISTRATION role and TENANT scope. The API endpoint allows publishing the following types of metadata objects: * Liveboards * Answers * Logical Tables This API will essentially share the objects along with it\'s dependencies to the org admins of the orgs to which it is being published. + * @param publishMetadataRequest + */ + publishMetadata(publishMetadataRequest: PublishMetadataRequest, _options?: Configuration): Promise; + /** + * Version: 9.0.0.cl or later Allows sharing one or several metadata objects with users and groups in ThoughtSpot. Requires edit access to the metadata object. #### Supported metadata objects: * Liveboards * Visualizations * Answers * Models * Views * Connections * Collections #### Object permissions You can provide `READ_ONLY` or `MODIFY` access when sharing an object with another user or group. The `READ_ONLY` permission grants view access to the shared object, whereas `MODIFY` provides edit access. To prevent a user or group from accessing the shared object, specify the GUID or name of the principal and set `shareMode` to `NO_ACCESS`. #### Sharing a visualization * Sharing a visualization implicitly shares the entire Liveboard with the recipient. * Object permissions set for a shared visualization also apply to the Liveboard unless overridden by another API request or via UI. * If email notifications for object sharing are enabled, a notification with a link to the shared visualization will be sent to the recipient’s email address. Although this link opens the shared visualization, recipients can also access other visualizations in the Liveboard. #### Sharing a collection Collections support **dual permissions** that provide fine-grained control: * **Collection permissions** (`share_mode`) - controls access to the collection itself (view, edit, delete the collection) * **Content permissions** (`content_share_mode`) - controls access to objects within the collection (view, edit objects inside) **Default Behavior:** - If only `share_mode` is specified, the content permissions default to `READ_ONLY` (except when `share_mode` is `NO_ACCESS`, then content also gets `NO_ACCESS`) - To give users edit access to collection contents, explicitly set `content_share_mode: \"MODIFY\"` ## Examples The following JSON examples can be copy-pasted as request bodies for the REST v2 API endpoint: ```bash POST /callosum/v1/v2/security/metadata/share Content-Type: application/x-www-form-urlencoded ``` ### Basic collection sharing Share a collection with read-only access: ```json { \"metadata_type\": \"COLLECTION\", \"metadata_identifiers\": [\"Sales Reports Collection\"], \"permissions\": [{ \"principal\": { \"type\": \"USER\", \"identifier\": \"alice@company.com\" }, \"share_mode\": \"READ_ONLY\" }], \"notification\": { \"message\": \"I\'ve shared the Sales Reports collection with you\", \"notify_on_share\": true } } ``` ### Collection sharing with dual permissions Share a collection with different permissions for the collection vs. its contents: ```json { \"metadata_type\": \"COLLECTION\", \"metadata_identifiers\": [\"Marketing Analytics\"], \"permissions\": [{ \"principal\": { \"type\": \"USER\", \"identifier\": \"bob@company.com\" }, \"share_mode\": \"MODIFY\", \"content_share_mode\": \"READ_ONLY\" }, { \"principal\": { \"type\": \"USER_GROUP\", \"identifier\": \"Marketing Team\" }, \"share_mode\": \"READ_ONLY\", \"content_share_mode\": \"READ_ONLY\" }], \"notification\": { \"emails\": [\"bob@company.com\"], \"message\": \"You can edit the collection but content is read-only\", \"enable_custom_url\": false, \"notify_on_share\": true }, \"has_lenient_discoverability\": false } ``` ### Multiple collections sharing Share multiple collections with different users: ```json { \"metadata\": [ { \"type\": \"COLLECTION\", \"identifier\": \"Q4 Reports\" }, { \"type\": \"COLLECTION\", \"identifier\": \"Executive Dashboard Collection\" } ], \"permissions\": [{ \"principal\": { \"type\": \"USER_GROUP\", \"identifier\": \"Executives\" }, \"share_mode\": \"MODIFY\" }, { \"principal\": { \"type\": \"USER\", \"identifier\": \"manager@company.com\" }, \"share_mode\": \"READ_ONLY\", \"content_share_mode\": \"MODIFY\" }], \"notification\": { \"message\": \"Sharing quarterly collections with leadership team\", \"notify_on_share\": true } } ``` ### Remove collection access Remove access to a collection by setting share_mode to NO_ACCESS: ```json { \"metadata_type\": \"COLLECTION\", \"metadata_identifiers\": [\"Confidential Reports\"], \"permissions\": [{ \"principal\": { \"type\": \"USER\", \"identifier\": \"former-employee@company.com\" }, \"share_mode\": \"NO_ACCESS\" }], \"notification\": { \"notify_on_share\": false } } ``` ### Collection Permission Scenarios **Scenario 1: Collection Admin** - `share_mode: MODIFY` + `content_share_mode: MODIFY` = Full control over collection and its contents **Scenario 2: Collection Curator** - `share_mode: MODIFY` + `content_share_mode: READ_ONLY` = Can manage collection structure but not edit contents **Scenario 3: Content Editor** - `share_mode: READ_ONLY` + `content_share_mode: MODIFY` = Can edit objects within collection but can\'t change collection itself **Scenario 4: Viewer** - `share_mode: READ_ONLY` + `content_share_mode: READ_ONLY` = View-only access to collection and contents + * @param shareMetadataRequest + */ + shareMetadata(shareMetadataRequest: ShareMetadataRequest, _options?: Configuration): Promise; + /** + * Version: 26.5.0.cl or later Allows unpublishing metadata objects from organizations in ThoughtSpot. Requires ADMINISTRATION role and TENANT scope. The API endpoint allows unpublishing the following types of metadata objects: * Liveboards * Answers * Logical Tables When unpublishing objects, you can: * Include dependencies by setting `include_dependencies` to true - this will unpublish all dependent objects if no other published object is using them * Force unpublish by setting `force` to true - this will break all dependent objects in the unpublished organizations + * @param unpublishMetadataRequest + */ + unpublishMetadata(unpublishMetadataRequest: UnpublishMetadataRequest, _options?: Configuration): Promise; + /** + * Version: 10.12.0.cl or later Creates, updates, or deletes column security rules for specified tables. This API endpoint allows you to create, update, or delete column-level security rules on columns of a table. The operation follows an \"all or none\" policy: if defining security rules for any of the provided columns fails, the entire operation will be rolled back, and no rules will be created. #### Usage guidelines - Provide table identifier using either `identifier` (GUID or name) or `obj_identifier` (object ID) - Use `clear_csr: true` to remove all column security rules from the table - For each column, specify the security rule using `column_security_rules` array - Use `is_unsecured: true` to mark a specific column as unprotected - Use `group_access` operations to manage group associations: - `ADD`: Add groups to the column\'s access list - `REMOVE`: Remove groups from the column\'s access list - `REPLACE`: Replace all existing groups with the specified groups #### Required permissions - `ADMINISTRATION` - Can administer ThoughtSpot - `DATAMANAGEMENT` - Can manage data (if RBAC is disabled) - `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` - Can manage worksheet views and tables (if RBAC is enabled) #### Example request ```json { \"identifier\": \"table-guid\", \"obj_identifier\": \"table-object-id\", \"clear_csr\": false, \"column_security_rules\": [ { \"column_identifier\": \"col id or col name\", \"is_unsecured\": false, \"group_access\": [ { \"operation\": \"ADD\", \"group_identifiers\": [\"hr_group_id\", \"hr_group_name\", \"finance_group_id\"] } ] }, { \"column_identifier\": \"col id or col name\", \"is_unsecured\": true }, { \"column_identifier\": \"col id or col name\", \"is_unsecured\": false, \"group_access\": [ { \"operation\": \"REPLACE\", \"group_identifiers\": [\"management_group_id\", \"management_group_name\"] } ] } ] } ``` #### Request Body Schema - `identifier` (string, optional): GUID or name of the table for which we want to create column security rules - `obj_identifier` (string, optional): The object ID of the table - `clear_csr` (boolean, optional): If true, then all the secured columns will be marked as unprotected, and all the group associations will be removed - `column_security_rules` (array of objects, required): An array where each object defines the security rule for a specific column Each column security rule object contains: - `column_identifier` (string, required): Column identifier (col_id or name) - `is_unsecured` (boolean, optional): If true, the column will be marked as unprotected and all groups associated with it will be removed - `group_access` (array of objects, optional): Array of group operation objects Each group operation object contains: - `operation` (string, required): Operation type - ADD, REMOVE, or REPLACE - `group_identifiers` (array of strings, required): Array of group identifiers (name or GUID) on which the operation will be performed #### Response This API does not return any response body. A successful operation returns HTTP 200 status code. #### Operation Types - **ADD**: Adds the specified groups to the column\'s access list - **REMOVE**: Removes the specified groups from the column\'s access list - **REPLACE**: Replaces all existing groups with the specified groups + * @param updateColumnSecurityRulesRequest + */ + updateColumnSecurityRules(updateColumnSecurityRulesRequest: UpdateColumnSecurityRulesRequest, _options?: Configuration): Promise; +} +declare class SecurityApiResponseProcessor { + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to assignChangeAuthor + * @throws ApiException if the response code was not in [200, 299] + */ + assignChangeAuthor(response: ResponseContext): Promise; + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to fetchColumnSecurityRules + * @throws ApiException if the response code was not in [200, 299] + */ + fetchColumnSecurityRules(response: ResponseContext): Promise>; + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to fetchObjectPrivileges + * @throws ApiException if the response code was not in [200, 299] + */ + fetchObjectPrivileges(response: ResponseContext): Promise; + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to fetchPermissionsOfPrincipals + * @throws ApiException if the response code was not in [200, 299] + */ + fetchPermissionsOfPrincipals(response: ResponseContext): Promise; + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to fetchPermissionsOnMetadata + * @throws ApiException if the response code was not in [200, 299] + */ + fetchPermissionsOnMetadata(response: ResponseContext): Promise; + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to manageObjectPrivilege + * @throws ApiException if the response code was not in [200, 299] + */ + manageObjectPrivilege(response: ResponseContext): Promise; + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to publishMetadata + * @throws ApiException if the response code was not in [200, 299] + */ + publishMetadata(response: ResponseContext): Promise; + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to shareMetadata + * @throws ApiException if the response code was not in [200, 299] + */ + shareMetadata(response: ResponseContext): Promise; + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to unpublishMetadata + * @throws ApiException if the response code was not in [200, 299] + */ + unpublishMetadata(response: ResponseContext): Promise; + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to updateColumnSecurityRules + * @throws ApiException if the response code was not in [200, 299] + */ + updateColumnSecurityRules(response: ResponseContext): Promise; +} + +/** + * no description + */ +declare class SystemApiRequestFactory extends BaseAPIRequestFactory { + /** + * Version: 10.14.0.cl or later Configure communication channel preferences. - Use `cluster_preferences` to update the default preferences for your ThoughtSpot application instance. - If your instance has [Orgs](https://docs.thoughtspot.com/cloud/latest/orgs-overview), use `org_preferences` to specify Org-specific preferences that override the defaults. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) or `DEVELOPER` (**Has developer privilege**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, users with `APPLICATION_ADMINISTRATION` (**Can manage application settings**) privilege are also authorized to perform this action. + * @param configureCommunicationChannelPreferencesRequest + */ + configureCommunicationChannelPreferences(configureCommunicationChannelPreferencesRequest: ConfigureCommunicationChannelPreferencesRequest, _options?: Configuration): Promise; + /** + * Version: 26.2.0.cl or later Configure security settings for your ThoughtSpot application instance. - Use `cluster_preferences` to update cluster-level security settings including CORS whitelisted URLs, CSP settings, SAML redirect URLs, partitioned cookies, and non-embed access configuration. - Use `org_preferences` to configure Org-specific security settings. If your instance has [Orgs](https://docs.thoughtspot.com/cloud/latest/orgs-overview), this allows configuring CORS and non-embed access settings specific to the Org. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) or `DEVELOPER` (**Has developer privilege**) privilege. Cluster-level SAML and script-src settings require `ADMINISTRATION` privilege. See [Security Settings](https://developers.thoughtspot.com/docs/security-settings) for more details. + * @param configureSecuritySettingsRequest + */ + configureSecuritySettings(configureSecuritySettingsRequest: ConfigureSecuritySettingsRequest, _options?: Configuration): Promise; + /** + * Version: 9.0.0.cl or later Retrieves the current configuration details of the cluster. If the request is successful, the API returns a list configuration settings applied on the cluster. Requires `ADMINISTRATION`(**Can administer ThoughtSpot**) privilege to view these complete configuration settings of the cluster. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `SYSTEM_INFO_ADMINISTRATION` (**Can view system activities**) privilege is required. This API does not require any parameters to be passed in the request. + */ + getSystemConfig(_options?: Configuration): Promise; + /** + * Version: 9.0.0.cl or later Gets system information such as the release version, locale, time zone, deployment environment, date format, and date time format of the cluster. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privileges. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `SYSTEM_INFO_ADMINISTRATION` (**Can view system activities**) privilege is required. This API does not require any parameters to be passed in the request. + */ + getSystemInformation(_options?: Configuration): Promise; + /** + * Version: 9.2.0.cl or later Gets a list of configuration overrides applied on the cluster. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `APPLICATION_ADMINISTRATION` (**Can manage application settings**) privilege is required. This API does not require any parameters to be passed in the request. + */ + getSystemOverrideInfo(_options?: Configuration): Promise; + /** + * Version: 10.14.0.cl or later Fetch communication channel preferences. - Use `cluster_preferences` to fetch the default preferences for your ThoughtSpot application instance. - If your instance has [Orgs](https://docs.thoughtspot.com/cloud/latest/orgs-overview), use `org_preferences` to fetch any Org-specific preferences that override the defaults. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) or `DEVELOPER` (**Has developer privilege**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, users with `APPLICATION_ADMINISTRATION` (**Can manage application settings**) privilege are also authorized to perform this action. + * @param searchCommunicationChannelPreferencesRequest + */ + searchCommunicationChannelPreferences(searchCommunicationChannelPreferencesRequest: SearchCommunicationChannelPreferencesRequest, _options?: Configuration): Promise; + /** + * Version: 26.2.0.cl or later Fetch security settings for your ThoughtSpot application instance. - Use `scope: CLUSTER` to retrieve cluster-level security settings, including CORS and CSP allowlists, SAML redirect URLs, and settings that control access to non-embedded pages. - Use `scope: ORG` to retrieve Org-level security settings. If your instance has [Orgs](https://docs.thoughtspot.com/cloud/latest/orgs-overview), this returns CORS and non-embed access settings specific to the Org. - If `scope` is not specified, returns both cluster and Org-specific settings based on user privileges. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) or `DEVELOPER` (**Has developer privilege**) privilege. See [Security Settings](https://developers.thoughtspot.com/docs/security-settings) for more details. + * @param searchSecuritySettingsRequest + */ + searchSecuritySettings(searchSecuritySettingsRequest: SearchSecuritySettingsRequest, _options?: Configuration): Promise; + /** + * Version: 9.2.0.cl or later Updates the current configuration of the cluster. You must send the configuration data in JSON format. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privileges. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `APPLICATION_ADMINISTRATION` (**Can manage application settings**) privilege is required. + * @param updateSystemConfigRequest + */ + updateSystemConfig(updateSystemConfigRequest: UpdateSystemConfigRequest, _options?: Configuration): Promise; + /** + * Version: 26.4.0.cl or later Validates a communication channel configuration to ensure it is properly set up and can receive events. - Use `channel_type` to specify the type of communication channel to validate (e.g., WEBHOOK). - Use `channel_identifier` to provide the unique identifier or name for the communication channel. - Use `event_type` to specify the event type to validate for this channel. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) or `DEVELOPER` (**Has developer privilege**) privilege. For webhook channels, users with `CAN_MANAGE_WEBHOOKS` (**Can manage webhooks**) privilege are also authorized to perform this action. + * @param validateCommunicationChannelRequest + */ + validateCommunicationChannel(validateCommunicationChannelRequest: ValidateCommunicationChannelRequest, _options?: Configuration): Promise; +} +declare class SystemApiResponseProcessor { + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to configureCommunicationChannelPreferences + * @throws ApiException if the response code was not in [200, 299] + */ + configureCommunicationChannelPreferences(response: ResponseContext): Promise; + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to configureSecuritySettings + * @throws ApiException if the response code was not in [200, 299] + */ + configureSecuritySettings(response: ResponseContext): Promise; + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to getSystemConfig + * @throws ApiException if the response code was not in [200, 299] + */ + getSystemConfig(response: ResponseContext): Promise; + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to getSystemInformation + * @throws ApiException if the response code was not in [200, 299] + */ + getSystemInformation(response: ResponseContext): Promise; + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to getSystemOverrideInfo + * @throws ApiException if the response code was not in [200, 299] + */ + getSystemOverrideInfo(response: ResponseContext): Promise; + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to searchCommunicationChannelPreferences + * @throws ApiException if the response code was not in [200, 299] + */ + searchCommunicationChannelPreferences(response: ResponseContext): Promise; + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to searchSecuritySettings + * @throws ApiException if the response code was not in [200, 299] + */ + searchSecuritySettings(response: ResponseContext): Promise; + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to updateSystemConfig + * @throws ApiException if the response code was not in [200, 299] + */ + updateSystemConfig(response: ResponseContext): Promise; + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to validateCommunicationChannel + * @throws ApiException if the response code was not in [200, 299] + */ + validateCommunicationChannel(response: ResponseContext): Promise; +} + +/** + * no description + */ +declare class TagsApiRequestFactory extends BaseAPIRequestFactory { + /** + * Version: 9.0.0.cl or later Assigns tags to Liveboards, Answers, Tables, and Worksheets. Requires edit access to the metadata object. + * @param assignTagRequest + */ + assignTag(assignTagRequest: AssignTagRequest, _options?: Configuration): Promise; + /** + * Version: 9.0.0.cl or later Creates a tag object. Tags are labels that identify a metadata object. For example, you can create a tag to designate subject areas, such as sales, HR, marketing, and finance. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `TAGMANAGEMENT` (**Can manage tags**) privilege is required to create, edit, and delete tags. + * @param createTagRequest + */ + createTag(createTagRequest: CreateTagRequest, _options?: Configuration): Promise; + /** + * Version: 9.0.0.cl or later Deletes a tag object from the ThoughtSpot system Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `TAGMANAGEMENT` (**Can manage tags**) privilege is required to create, edit, and delete tags. + * @param tagIdentifier Tag identifier Tag name or Tag id. + */ + deleteTag(tagIdentifier: string, _options?: Configuration): Promise; + /** + * Version: 9.0.0.cl or later Gets a list of tag objects available on the ThoughtSpot system. To get details of a specific tag object, specify the GUID or name. Any authenticated user can search for tag objects. + * @param searchTagsRequest + */ + searchTags(searchTagsRequest: SearchTagsRequest, _options?: Configuration): Promise; + /** + * Version: 9.0.0.cl or later Removes the tags applied to a Liveboard, Answer, Table, or Worksheet. Requires edit access to the metadata object. + * @param unassignTagRequest + */ + unassignTag(unassignTagRequest: UnassignTagRequest, _options?: Configuration): Promise; + /** + * Version: 9.0.0.cl or later Updates a tag object. You can modify the `name` and `color` properties of a tag object. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `TAGMANAGEMENT` (**Can manage tags**) privilege is required to create, edit, and delete tags. + * @param tagIdentifier Name or Id of the tag. + * @param updateTagRequest + */ + updateTag(tagIdentifier: string, updateTagRequest: UpdateTagRequest, _options?: Configuration): Promise; +} +declare class TagsApiResponseProcessor { + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to assignTag + * @throws ApiException if the response code was not in [200, 299] + */ + assignTag(response: ResponseContext): Promise; + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to createTag + * @throws ApiException if the response code was not in [200, 299] + */ + createTag(response: ResponseContext): Promise; + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to deleteTag + * @throws ApiException if the response code was not in [200, 299] + */ + deleteTag(response: ResponseContext): Promise; + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to searchTags + * @throws ApiException if the response code was not in [200, 299] + */ + searchTags(response: ResponseContext): Promise>; + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to unassignTag + * @throws ApiException if the response code was not in [200, 299] + */ + unassignTag(response: ResponseContext): Promise; + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to updateTag + * @throws ApiException if the response code was not in [200, 299] + */ + updateTag(response: ResponseContext): Promise; +} + +/** + * no description + */ +declare class ThoughtSpotRestApiRequestFactory extends BaseAPIRequestFactory { + /** + * Version: 9.7.0.cl or later Activates a deactivated user account. Requires `ADMINISTRATION` (**Can administer Thoughtspot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `USER_ADMINISTRATION` (**Can manage users**) privilege is required. To activate an inactive user account, the API request body must include the following information: - Username or the GUID of the user account. - Auth token generated for the deactivated user. The auth token is sent in the API response when a user is deactivated. - Password for the user account. + * @param activateUserRequest + */ + activateUser(activateUserRequest: ActivateUserRequest, _options?: Configuration): Promise; + /** + * Version: 9.0.0.cl or later Transfers the ownership of one or several objects from one user to another. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `USER_ADMINISTRATION` (**Can manage users**) privilege and edit access to the objects are required. + * @param assignChangeAuthorRequest + */ + assignChangeAuthor(assignChangeAuthorRequest: AssignChangeAuthorRequest, _options?: Configuration): Promise; + /** + * Version: 9.0.0.cl or later Assigns tags to Liveboards, Answers, Tables, and Worksheets. Requires edit access to the metadata object. + * @param assignTagRequest + */ + assignTag(assignTagRequest: AssignTagRequest, _options?: Configuration): Promise; + /** + * Version: 9.0.0.cl or later Updates the current password of the user. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `USER_ADMINISTRATION` (**Can manage users**) privilege is required. + * @param changeUserPasswordRequest + */ + changeUserPassword(changeUserPasswordRequest: ChangeUserPasswordRequest, _options?: Configuration): Promise; + /** + * Version: 9.2.0.cl or later Commits TML files of metadata objects to the Git branch configured on your instance. Requires at least edit access to objects used in the commit operation. Before using this endpoint to push your commits: * Enable Git integration on your instance. * Make sure the Git repository and branch details are configured on your instance. For more information, see [Git integration documentation](https://developers.thoughtspot.com/docs/git-integration). + * @param commitBranchRequest + */ + commitBranch(commitBranchRequest: CommitBranchRequest, _options?: Configuration): Promise; + /** + * Version: 26.6.0.cl or later Enables or disables authentication at cluster or org level for the specified auth type. Currently supports `TRUSTED_AUTH`. #### Required privileges Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) or `CONTROL_TRUSTED_AUTH` (**Can Enable or Disable Trusted Authentication**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled, the `CONTROL_TRUSTED_AUTH` privilege is required. #### Usage guidelines Use `cluster_preferences` to enable or disable authentication at the cluster level. Cluster-level settings can only be configured from the Primary Org. - `ENABLED` — Generates a new access token if one does not exist. An existing token is preserved. - `DISABLED` — Revokes the existing cluster-level access token. Use `org_preferences` to enable or disable authentication for one or more Orgs. Each entry must include an `org_identifier` (unique ID or name) and an `auth_status`. Org-level configuration requires the per-Org authentication feature to be enabled on your instance. - `ENABLED` — Generates a new org-level access token if one does not exist. - `DISABLED` — Revokes the existing org-level access token for that Org. Both `cluster_preferences` and `org_preferences` are optional. Omitting a field leaves the corresponding settings unchanged. If both are omitted, the API returns `204 No Content` without making any changes. **Note**: Cluster-level and org-level settings are independent of each other. Enabling or disabling one does not affect the other. + * @param configureAuthSettingsRequest + */ + configureAuthSettings(configureAuthSettingsRequest: ConfigureAuthSettingsRequest, _options?: Configuration): Promise; + /** + * Version: 10.14.0.cl or later Configure communication channel preferences. - Use `cluster_preferences` to update the default preferences for your ThoughtSpot application instance. - If your instance has [Orgs](https://docs.thoughtspot.com/cloud/latest/orgs-overview), use `org_preferences` to specify Org-specific preferences that override the defaults. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) or `DEVELOPER` (**Has developer privilege**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, users with `APPLICATION_ADMINISTRATION` (**Can manage application settings**) privilege are also authorized to perform this action. + * @param configureCommunicationChannelPreferencesRequest + */ + configureCommunicationChannelPreferences(configureCommunicationChannelPreferencesRequest: ConfigureCommunicationChannelPreferencesRequest, _options?: Configuration): Promise; + /** + * Version: 26.2.0.cl or later Configure security settings for your ThoughtSpot application instance. - Use `cluster_preferences` to update cluster-level security settings including CORS whitelisted URLs, CSP settings, SAML redirect URLs, partitioned cookies, and non-embed access configuration. - Use `org_preferences` to configure Org-specific security settings. If your instance has [Orgs](https://docs.thoughtspot.com/cloud/latest/orgs-overview), this allows configuring CORS and non-embed access settings specific to the Org. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) or `DEVELOPER` (**Has developer privilege**) privilege. Cluster-level SAML and script-src settings require `ADMINISTRATION` privilege. See [Security Settings](https://developers.thoughtspot.com/docs/security-settings) for more details. + * @param configureSecuritySettingsRequest + */ + configureSecuritySettings(configureSecuritySettingsRequest: ConfigureSecuritySettingsRequest, _options?: Configuration): Promise; + /** + * Version: 10.12.0.cl or later Gets connection configuration objects. Requires `DATAMANAGEMENT` (**Can manage data**) and edit permissions to the connection object, or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) privilege is required. #### Usage guidelines * To get a list of all configurations available in the ThoughtSpot system, send the API request with only the connection name or GUID in the request body. * To fetch details of a configuration object, specify the configuration object name or GUID. + * @param connectionConfigurationSearchRequest + */ + connectionConfigurationSearch(connectionConfigurationSearchRequest: ConnectionConfigurationSearchRequest, _options?: Configuration): Promise; + /** + * Convert worksheets to models Version: 10.6.0.cl or later ## Prerequisites - **Privileges Required:** - `DATAMANAGEMENT` (Can manage data) or `ADMINISTRATION` (Can administer ThoughtSpot). - **Additional Privileges (if RBAC is enabled):** - `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` (Can manage data models). --- ## Usage Guidelines ### Parameters 1. **worksheet_ids** - **Description:** A comma-separated list of GUIDs (Globally Unique Identifiers) specifying the Worksheets to be converted. - **Usage:** - Used only when `convert_all` is set to `false`. - Leave empty or omit when `convert_all` is set to `true`. 2. **exclude_worksheet_ids** - **Description:** A comma-separated list of GUIDs specifying Worksheets to be excluded from conversion. - **Usage:** - Useful when `convert_all` is set to `true` and specific Worksheets should not be converted. 3. **convert_all** - **Description:** Sets the scope of conversion. - **Options:** - `true`: Converts all Worksheets in the system, except those specified in `exclude_worksheet_ids`. - `false`: Converts only the Worksheets listed in `worksheet_ids`. 4. **apply_changes** - **Description:** Specifies whether to apply changes directly to ThoughtSpot or to generate a preview before applying any changes.Used for validation of conversion. - **Options:** - `true`: Applies conversion changes directly to ThoughtSpot. - `false`: Generates only a preview of the changes and does not apply any changes to ThoughtSpot --- ## Best Practices 1. **Backup Before Conversion:** Always export metadata as a backup before initiating the conversion process 2. **Partial Conversion for Testing:** Test the conversion process by setting `convert_all` to `false` and specifying a small number of `worksheet_ids`. 3. **Verify Dependencies:** Check for dependent objects, such as Tables and Connections, to avoid invalid references. 4. **Review Changes:** Use `apply_changes: false` to preview the impact of the conversion before applying changes. --- ## Examples ### Convert Specific Worksheets ```json { \"worksheet_ids\": [\"guid1\", \"guid2\", \"guid3\"], \"exclude_worksheet_ids\": [], \"convert_all\": false, \"apply_changes\": true } ``` ### Convert All Accessible Worksheets ```json { \"worksheet_ids\": [], \"exclude_worksheet_ids\": [], \"convert_all\": true, \"apply_changes\": true } ``` ### Exclude Specific Worksheets While Converting All Accessible Worksheets ```json { \"worksheet_ids\": [], \"exclude_worksheet_ids\": [\"abc\"], \"convert_all\": true, \"apply_changes\": true } ``` + * @param convertWorksheetToModelRequest + */ + convertWorksheetToModel(convertWorksheetToModelRequest: ConvertWorksheetToModelRequest, _options?: Configuration): Promise; + /** + * Makes a copy of an Answer or Liveboard Version: 10.3.0.cl or later Creates a copy of a metadata object. Requires at least view access to the metadata object being copied. Upon successful execution, the API creates a copy of the metadata object specified in the API request and returns the ID of the new object. + * @param copyObjectRequest + */ + copyObject(copyObjectRequest: CopyObjectRequest, _options?: Configuration): Promise; + /** + * Version: 26.2.0.cl or later Creates a new Spotter agent conversation based on the provided context and settings. The endpoint was in Beta from 26.2.0.cl through 26.4.0.cl. Requires `CAN_USE_SPOTTER` privilege and at least view access to the metadata object specified in the request. #### Usage guidelines The request must include the `metadata_context` parameter to define the conversation context. The context type can be one of: - `DATA_SOURCE` *(available from 26.5.0.cl)*: targets a specific data source. Provide `data_source_identifier` in `data_source_context` for a single data source, or `data_source_identifiers` for multi-data-source context. The deprecated `guid` field is accepted for backwards compatibility. - `AUTO_MODE` *(available from 26.5.0.cl)*: automatically discovers and selects the most relevant datasets for the user\'s queries. > **Note for callers on versions 26.2.0.cl – 26.4.0.cl (Beta):** use the lowercase `data_source` enum value with the `guid` field instead of the above. Example: `{ \"type\": \"data_source\", \"data_source_context\": { \"guid\": \"\" } }`. The `conversation_settings` parameter controls which Spotter capabilities are enabled for the conversation: - `enable_contextual_change_analysis` (default: `true`, **deprecated from 26.2.0.cl**) — always enabled in Spotter 3; setting this to `false` has no effect on versions >= 26.2.0.cl - `enable_natural_language_answer_generation` (default: `true`, **deprecated from 26.2.0.cl**) — always enabled in Spotter 3; setting this to `false` has no effect on versions >= 26.2.0.cl - `enable_reasoning` (default: `true`, **deprecated from 26.2.0.cl**) — always enabled in Spotter 3; setting this to `false` has no effect on versions >= 26.2.0.cl - `enable_save_chat` (default: `false`, *available from 26.5.0.cl*) — enables saving the conversation for later retrieval via conversation history If the request is successful, the response includes a unique `conversation_identifier` that must be passed to `sendAgentConversationMessage` or `sendAgentConversationMessageStreaming` to send messages within this conversation. The response also includes `conversation_id` with the same value for backwards compatibility; use `conversation_identifier` for new integrations. #### Example request ```json { \"metadata_context\": { \"type\": \"DATA_SOURCE\", \"data_source_context\": { \"data_source_identifier\": \"a1b2c3d4-e5f6-7890-abcd-ef1234567890\" } }, \"conversation_settings\": {} } ``` #### Error responses | Code | Description | | ---- | --------------------------------------------------------------------------------------------------------------------------------------- | | 401 | Unauthorized — authentication token is missing, expired, or invalid. | | 403 | Forbidden — the authenticated user does not have `CAN_USE_SPOTTER` privilege or lacks view permission on the specified metadata object. | > ###### Note: > > - This endpoint was in Beta from 26.2.0.cl through 26.4.0.cl and is Generally Available from version 26.5.0.cl. > - This endpoint requires Spotter - please contact ThoughtSpot support to enable Spotter on your cluster. + * @param createAgentConversationRequest + */ + createAgentConversation(createAgentConversationRequest: CreateAgentConversationRequest, _options?: Configuration): Promise; + /** + * Version: 10.12.0.cl or later Creates a new [custom calendar](https://docs.thoughtspot.com/cloud/latest/connections-cust-cal). Requires `DATAMANAGEMENT` (**Can manage data**) or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your ThoughtSpot instance, the `CAN_MANAGE_CUSTOM_CALENDAR` (**Can manage custom calendars**) privilege is required. #### Usage guidelines You can create a custom calendar from scratch or an existing Table in ThoughtSpot. For both methods of calendar creation, the following parameters are required: * Name of the custom calendar. * Calendar creation method. To create a calendar from an existing table, specify the method: - `FROM_EXISTING_TABLE` - Creates calendar from the table reference provided in the API request. - `FROM_INPUT_PARAMS` - Creates a calendar from the parameters defined in the API request. * Connection ID and Table name * Database and schema name attributes: For most Cloud Data Warehouse (CDW) connectors, both `database_name` and `schema_name` attributes are required. However, the attribute requirements are conditional and vary based on the connector type and its metadata structure. For example, for connectors such as Teradata, MySQL, SingleSore, Amazon Aurora MySQL, Amazon RDS MySQL, Oracle, and GCP_MYSQL, the `schema_name` is required, whereas the `database_name` attribute is not. Similarly, connectors such as ClickHouse require you to specify the `database_name` and the schema specification in such cases is optional. **NOTE**: If you are creating a calendar from an existing table, ensure that the referenced table matches the required DDL for custom calendars. If the schema does not match, the API returns an error. ##### Calendar type The API allows you to create the following types of calendars: * `MONTH_OFFSET`. The default calendar type. A `MONTH_OFFSET` calendar is offset by a few months from the standard calendar months (January to December) and the year begins with the month defined in the request. For example, if the `month_offset` value is set as `April`, the calendar year begins in April. * `4-4-5`. Each quarter in the calendar will include two 4-week months followed by one 5-week month. * `4-5-4`. Each quarter in the calendar will include two 4-week months with a 5-week month between. * `5-4-4`. Each quarter begins with a 5-week month, followed by two 4-week months. To start and end the calendar on a specific date, specify the dates in the `MM/DD/YYYY` format. For `MONTH_OFFSET` calendars, ensure that the `start_date` matches the month specified in the `month_offset` attribute. You can also set the starting day of the week and customize the prefixes for year and quarter labels. #### Examples To create a calendar from an existing table: ``` { \"name\": \"MyCustomCalendar1\", \"table_reference\": { \"connection_identifier\": \"4db8ea22-2ff4-4224-b05a-26674717e468\", \"table_name\": \"MyCalendarTable\", \"database_name\": \"RETAILAPPAREL\", \"schema_name\": \"PUBLIC\" }, \"creation_method\": \"FROM_EXISTING_TABLE\", } ``` To create a calendar from scratch: ``` { \"name\": \"MyCustomCalendar1\", \"table_reference\": { \"connection_identifier\": \"4db8ea22-2ff4-4224-b05a-26674717e468\", \"table_name\": \"MyCalendarTable\", \"database_name\": \"RETAILAPPAREL\", \"schema_name\": \"PUBLIC\" }, \"creation_method\": \"FROM_INPUT_PARAMS\", \"calendar_type\": \"MONTH_OFFSET\", \"month_offset\": \"April\", \"start_day_of_week\": \"Monday\", \"quarter_name_prefix\": \"Q\", \"year_name_prefix\": \"FY\", \"start_date\": \"04/01/2025\", \"end_date\": \"04/31/2025\" } ``` + * @param createCalendarRequest + */ + createCalendar(createCalendarRequest: CreateCalendarRequest, _options?: Configuration): Promise; + /** + * Version: 26.4.0.cl or later Creates a new collection in ThoughtSpot. Collections allow you to organize and group related metadata objects such as Liveboards, Answers, worksheets, and other data objects. You can also create nested collections (sub-collections) to build a hierarchical structure. #### Supported operations The API endpoint lets you perform the following operations: * Create a new collection * Add metadata objects (Liveboards, Answers, Logical Tables) to the collection * Create nested collections by adding sub-collections + * @param createCollectionRequest + */ + createCollection(createCollectionRequest: CreateCollectionRequest, _options?: Configuration): Promise; + /** + * Version: 9.2.0.cl or later Allows you to connect a ThoughtSpot instance to a Git repository. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance on your instance, the `CAN_SETUP_VERSION_CONTROL` (**Can set up version control**) privilege. You can use this API endpoint to connect your ThoughtSpot development and production environments to the development and production branches of a Git repository. Before using this endpoint to connect your ThoughtSpot instance to a Git repository, check the following prerequisites: * You have a Git repository. If you are using GitHub, make sure you have a valid account and an access token to connect ThoughtSpot to GitHub. For information about generating a token, see [GitHub Documentation](https://docs.github.com/en/authentication/keeping-your-account-and-data-secure/managing-your-personal-access-tokens). * Your access token has `repo` scope that grants full access to public and private repositories. * Your Git repository has a branch that can be configured as a default branch in ThoughtSpot. For more information, see [Git integration documentation](https://developers.thoughtspot.com/docs/?pageid=git-integration). **Note**: ThoughtSpot supports only GitHub / itHub Enterprise for CI/CD. + * @param createConfigRequest + */ + createConfig(createConfigRequest: CreateConfigRequest, _options?: Configuration): Promise; + /** + * Version: 9.2.0.cl or later Creates a connection to a data warehouse for live query services. Requires `DATAMANAGEMENT` (**Can manage data**) or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) privilege is required. #### Create a connection without tables To create a connection without tables: 1. Pass these parameters in your API request. * Name of the connection. * Type of the data warehouse to connect to. * A JSON map of configuration attributes in `data_warehouse_config`. The following example shows the configuration attributes for a SnowFlake connection: ``` { \"configuration\":{ \"accountName\":\"thoughtspot_partner\", \"user\":\"tsadmin\", \"password\":\"TestConn123\", \"role\":\"sysadmin\", \"warehouse\":\"MEDIUM_WH\" }, \"authenticationType\": \"SERVICE_ACCOUNT\", \"externalDatabases\":[ ] } ``` 2. Set `validate` to `false`. **NOTE:** If the `authentication_type` is anything other than SERVICE_ACCOUNT, you must explicitly provide the authenticationType property in the payload. If you do not specify authenticationType, the API will default to SERVICE_ACCOUNT as the authentication type. #### Create a connection with tables If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) and `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` (**Can manage data models**) privilege is required. To create a connection with tables: 1. Pass these parameters in your API request. * Name of the connection. * Type of the data warehouse to connect to. * A JSON map of configuration attributes, database details, and table properties in `data_warehouse_config` as shown in the following example: ``` { \"configuration\":{ \"accountName\":\"thoughtspot_partner\", \"user\":\"tsadmin\", \"password\":\"TestConn123\", \"role\":\"sysadmin\", \"warehouse\":\"MEDIUM_WH\" }, \"authenticationType\": \"SERVICE_ACCOUNT\", \"externalDatabases\":[ { \"name\":\"AllDatatypes\", \"isAutoCreated\":false, \"schemas\":[ { \"name\":\"alldatatypes\", \"tables\":[ { \"name\":\"allDatatypes\", \"type\":\"TABLE\", \"description\":\"\", \"selected\":true, \"linked\":true, \"columns\":[ { \"name\":\"CNUMBER\", \"type\":\"INT64\", \"canImport\":true, \"selected\":true, \"isLinkedActive\":true, \"isImported\":false, \"tableName\":\"allDatatypes\", \"schemaName\":\"alldatatypes\", \"dbName\":\"AllDatatypes\" }, { \"name\":\"CDECIMAL\", \"type\":\"INT64\", \"canImport\":true, \"selected\":true, \"isLinkedActive\":true, \"isImported\":false, \"tableName\":\"allDatatypes\", \"schemaName\":\"alldatatypes\", \"dbName\":\"AllDatatypes\" } ] } ] } ] } ] } ``` 2. Set `validate` to `true`. **NOTE:** If the `authentication_type` is anything other than SERVICE_ACCOUNT, you must explicitly provide the authenticationType property in the payload. If you do not specify authenticationType, the API will default to SERVICE_ACCOUNT as the authentication type. + * @param createConnectionRequest + */ + createConnection(createConnectionRequest: CreateConnectionRequest, _options?: Configuration): Promise; + /** + * Version: 10.12.0.cl or later Creates an additional configuration to an existing connection to a data warehouse. Requires `DATAMANAGEMENT` (**Can manage data**) or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) privilege is required. #### Usage guidelines * A JSON map of configuration attributes in `configuration`. The following example shows the configuration attributes: ``` { \"user\":\"DEV_USER\", \"password\":\"TestConn123\", \"role\":\"DEV\", \"warehouse\":\"DEV_WH\" } ``` * If the `policy_type` is `PRINCIPALS`, then `policy_principals` is a required field. * If the `policy_type` is `PROCESSES`, then `policy_processes` is a required field. * If the `policy_type` is `NO_POLICY`, then `policy_principals` and `policy_processes` are not required fields. #### Parameterized Connection Support For parameterized connections that use OAuth authentication, only the same_as_parent and policy_process_options attributes are allowed in the API request. These attributes are not applicable to connections that are not parameterized. + * @param createConnectionConfigurationRequest + */ + createConnectionConfiguration(createConnectionConfigurationRequest: CreateConnectionConfigurationRequest, _options?: Configuration): Promise; + /** + * Version: 10.4.0.cl or later Creates a new conversation session tied to a specific data model for AI-driven natural language querying. Requires `CAN_USE_SPOTTER` privilege and at least view access to the metadata object specified in the request. #### Usage guidelines The request must include: - `metadata_identifier`: the unique ID of the data source that provides context for the conversation Optionally, you can provide: - `tokens`: a token string to set initial context for the conversation (e.g., `\"[sales],[item type],[state]\"`) If the request is successful, ThoughtSpot returns a unique `conversation_identifier` that must be passed to `sendMessage` to continue the conversation. #### Error responses | Code | Description | |------|-------------| | 401 | Unauthorized — authentication token is missing, expired, or invalid. | | 403 | Forbidden — the authenticated user does not have `CAN_USE_SPOTTER` privilege or lacks view permission on the specified metadata object. | > ###### Note: > * This endpoint is currently in Beta. Breaking changes may be introduced before the endpoint is made Generally Available. > * This endpoint requires Spotter - please contact ThoughtSpot support to enable Spotter on your cluster. + * @param createConversationRequest + */ + createConversation(createConversationRequest: CreateConversationRequest, _options?: Configuration): Promise; + /** + * Version: 9.6.0.cl or later Creates a custom action that appears as a menu action on a saved Answer or Liveboard visualization. Requires `DEVELOPER` (**Has Developer privilege**) or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `DEVELOPER` (**Has developer privilege**) privilege is required. #### Usage Guidelines The API lets you create the following types of custom actions: * URL-based action Allows pushing data to an external URL. * Callback action Triggers a callback to the host application and initiates a response payload on an embedded ThoughtSpot instance. By default, custom actions are visible to only administrator or developer users. To make a custom action available to other users, and specify the groups in `group_identifiers`. By default, the custom action is set as a _global_ action on all visualizations and saved Answers. To assign a custom action to specific Liveboard visualization, saved Answer, or Worksheet, set `visibility` to `false` in `default_action_config` property and specify the GUID or name of the object in `associate_metadata`. For more information, see [Custom actions](https://developers.thoughtspot.com/docs/custom-action-intro). + * @param createCustomActionRequest + */ + createCustomAction(createCustomActionRequest: CreateCustomActionRequest, _options?: Configuration): Promise; + /** + * Version: 10.10.0.cl or later Creates a customization configuration for the notification email. #### Pre-requisites Requires `DEVELOPER` (**has developer privilege**) or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `DEVELOPER` (**Has developer privilege**) privilege is required. **NOTE**:This endpoint in currently in beta. Contact ThoughtSpot support to enable this on your instance. #### Usage guidelines To create a custom configuration pass these parameters in your API request: - A JSON map of configuration attributes `template_properties`. The following example shows a sample set of customization configuration: ``` { { \"cta_button_bg_color\": \"#444DEA\", \"cta_text_font_color\": \"#FFFFFF\", \"primary_bg_color\": \"#D3DEF0\", \"logo_url\": \"https://storage.pardot.com/710713/1642089901EbkRibJq/TS_fullworkmark_darkmode.png\", \"font_family\": \"\", \"product_name\": \"ThoughtSpot\", \"footer_address\": \"444 Castro St, Suite 1000 Mountain View, CA 94041\", \"footer_phone\": \"(800) 508-7008\", \"replacement_value_for_liveboard\": \"Dashboard\", \"replacement_value_for_answer\": \"Chart\", \"replacement_value_for_spot_iq\": \"AI Insights\", \"hide_footer_phone\": false, \"hide_footer_address\": false, \"hide_product_name\": false, \"hide_manage_notification\": false, \"hide_mobile_app_nudge\": false, \"hide_privacy_policy\": false, \"hide_ts_vocabulary_definitions\": false, \"hide_error_message\": false, \"hide_unsubscribe_link\": false, \"hide_notification_status\": false, \"hide_modify_alert\": false, \"company_website_url\": \"https://your-website.com/\", \"company_privacy_policy_url\" : \"https://link-to-privacy-policy.com/\", \"contact_support_url\": \"https://link-to-contact-support.com/\", \"hide_contact_support_url\": false, \"hide_logo_url\" : false } } ``` + * @param createEmailCustomizationRequest + */ + createEmailCustomization(createEmailCustomizationRequest: CreateEmailCustomizationRequest, _options?: Configuration): Promise; + /** + * Version: 9.0.0.cl or later Creates an Org object. To use this API, the [Orgs](https://docs.thoughtspot.com/cloud/latest/orgs-overview) feature must be enabled in your cluster. Requires cluster administration (**Can administer Org**) privileges. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `ORG_ADMINISTRATION` (**Can manage Orgs**) privilege is required. + * @param createOrgRequest + */ + createOrg(createOrgRequest: CreateOrgRequest, _options?: Configuration): Promise; + /** + * Version: 9.5.0.cl or later Creates a Role object in ThoughtSpot. Available only if [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance. To create a Role, the `ROLE_ADMINISTRATION` (**Can manage roles**) privilege is required. + * @param createRoleRequest + */ + createRole(createRoleRequest: CreateRoleRequest, _options?: Configuration): Promise; + /** + * Create schedule. Version: 9.4.0.cl or later Creates a Liveboard schedule job. Requires at least edit access to Liveboards. To create a schedule on behalf of another user, you need `ADMINISTRATION` (**Can administer Org**) or `JOBSCHEDULING` (**Can schedule for others**) privilege and edit access to the Liveboard. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `JOBSCHEDULING` (**Can schedule for others**) privilege is required. #### Usage guidelines * The description text is mandatory. The description text appears as **Description: ** in the Liveboard schedule email notifications. * For Liveboards with both charts and tables, schedule creation is only supported in PDF and XLS formats. Schedules created in CSV formats for such Liveboards will fail to run. If `PDF` is set as the `file_format`, enable `pdf_options` to get the correct attachment. Not doing so may cause the attachment to be rendered empty. * To include only specific visualizations, specify the visualization GUIDs in the `visualization_identifiers` array. * You can schedule a Liveboard job to run periodically by setting frequency parameters. You can set the schedule to run daily, weekly, monthly or every n minutes or hours. The scheduled job can also be configured to run at a specific time of the day or on specific days of the week or month. Please ensure that when setting the schedule frequency for _minute of the object_, only values that are multiples of 5 are included. * If the `frequency` parameters are defined, you can set the time zone to a value that matches your server\'s time zone. For example, `US/Central`, `Etc/UTC`, `CET`. The default time zone is `America/Los_Angeles`. For more information about Liveboard jobs, see [ThoughtSpot Product Documentation](https://docs.thoughtspot.com/cloud/latest/liveboard-schedule). + * @param createScheduleRequest + */ + createSchedule(createScheduleRequest: CreateScheduleRequest, _options?: Configuration): Promise; + /** + * Version: 9.0.0.cl or later Creates a tag object. Tags are labels that identify a metadata object. For example, you can create a tag to designate subject areas, such as sales, HR, marketing, and finance. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `TAGMANAGEMENT` (**Can manage tags**) privilege is required to create, edit, and delete tags. + * @param createTagRequest + */ + createTag(createTagRequest: CreateTagRequest, _options?: Configuration): Promise; + /** + * Version: 9.0.0.cl or later Creates a user in ThoughtSpot. The API endpoint allows you to configure several user properties such as email address, account status, share notification preferences, and sharing visibility. You can provision the user to [groups](https://docs.thoughtspot.com/cloud/latest/groups-privileges) and [Orgs](https://docs.thoughtspot.com/cloud/latest/orgs-overview). You can also add Liveboard, Answer, and Worksheet objects to the user’s favorites list, assign a default Liveboard for the user, and set user preferences. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `USER_ADMINISTRATION` (**Can manage users**) privilege is required. + * @param createUserRequest + */ + createUser(createUserRequest: CreateUserRequest, _options?: Configuration): Promise; + /** + * Version: 9.0.0.cl or later Creates a group object in ThoughtSpot. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `GROUP_ADMINISTRATION` (**Can manage groups**) privilege is required. #### About groups Groups in ThoughtSpot are used by the administrators to define privileges and organize users based on their roles and access requirements. To know more about groups and privileges, see [ThoughtSpot Product Documentation](https://docs.thoughtspot.com/cloud/latest/groups-privileges). #### Supported operations The API endpoint lets you perform the following operations: * Assign privileges * Add users * Define sharing visibility * Add sub-groups * Assign a default Liveboard + * @param createUserGroupRequest + */ + createUserGroup(createUserGroupRequest: CreateUserGroupRequest, _options?: Configuration): Promise; + /** + * Create a variable which can be used for parameterizing metadata objects Version: 26.4.0.cl or later Allows creating a variable which can be used for parameterizing metadata objects in ThoughtSpot. Requires ADMINISTRATION role and TENANT scope. The CAN_MANAGE_VARIABLES permission allows you to manage Formula Variables in the current organization scope. The API endpoint supports the following types of variables: * CONNECTION_PROPERTY - For connection properties * TABLE_MAPPING - For table mappings * CONNECTION_PROPERTY_PER_PRINCIPAL - For connection properties per principal. In order to use this please contact support to enable this. * FORMULA_VARIABLE - For Formula variables, introduced in 10.15.0.cl When creating a variable, you need to specify: * The variable type * A unique name for the variable * Whether the variable contains sensitive values (defaults to false) * The data type of the variable, only specify for formula variables (defaults to null) The operation will fail if: * The user lacks required permissions * The variable name already exists * The variable type is invalid + * @param createVariableRequest + */ + createVariable(createVariableRequest: CreateVariableRequest, _options?: Configuration): Promise; + /** + * Version: 10.14.0.cl or later Creates a new webhook configuration to receive notifications for specified events. The webhook will be triggered when the configured events occur in the system. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) or `DEVELOPER` (**Has developer privilege**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, users with `CAN_MANAGE_WEBHOOKS` (**Can manage webhooks**) privilege are also authorized to perform this action. + * @param createWebhookConfigurationRequest + */ + createWebhookConfiguration(createWebhookConfigurationRequest: CreateWebhookConfigurationRequest, _options?: Configuration): Promise; + /** + * Version: 9.9.0.cl or later Creates a DBT connection object in ThoughtSpot. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege or `DATAMANAGEMENT` (**Can manage data**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the following Data control privileges may be required: - `CAN_MANAGE_CUSTOM_CALENDAR`(**Can manage custom calendars**) - `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) - `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` (**Can manage data models**) #### About create DBT connection DBT connection in ThoughtSpot is used by the user to define DBT credentials for cloud . The API needs embrace connection, embrace database name, DBT url, import type, DBT account identifier, DBT project identifier, DBT access token and environment details (or) embrace connection, embrace database name, import type, file_content to create a connection object. To know more about DBT, see ThoughtSpot Product Documentation. + * @param connectionName Name of the connection. + * @param databaseName Name of the Database. + * @param importType Mention type of Import + * @param accessToken Access token is mandatory when Import_Type is DBT_CLOUD. + * @param dbtUrl DBT URL is mandatory when Import_Type is DBT_CLOUD. + * @param accountId Account ID is mandatory when Import_Type is DBT_CLOUD + * @param projectId Project ID is mandatory when Import_Type is DBT_CLOUD + * @param dbtEnvId DBT Environment ID\\\" + * @param projectName Name of the project + * @param fileContent Upload DBT Manifest and Catalog artifact files as a ZIP file. This field is Mandatory when Import Type is \\\'ZIP_FILE\\\' + */ + dbtConnection(connectionName: string, databaseName: string, importType?: string, accessToken?: string, dbtUrl?: string, accountId?: string, projectId?: string, dbtEnvId?: string, projectName?: string, fileContent?: HttpFile, _options?: Configuration): Promise; + /** + * Version: 9.9.0.cl or later Resynchronize the existing list of models, tables, worksheet tml’s and import them to Thoughtspot based on the DBT connection object. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege or `DATAMANAGEMENT` (**Can manage data**) privilege, along with an existing DBT connection. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the following data control privileges may be required: - `CAN_MANAGE_CUSTOM_CALENDAR`(**Can manage custom calendars**) - `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) - `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` (**Can manage data models**) + * @param dbtConnectionIdentifier Unique ID of the DBT connection. + * @param fileContent Upload DBT Manifest and Catalog artifact files as a ZIP file. This field is mandatory if the connection was created with import_type ‘ZIP_FILE’ + */ + dbtGenerateSyncTml(dbtConnectionIdentifier: string, fileContent?: HttpFile, _options?: Configuration): Promise; + /** + * Version: 9.9.0.cl or later Generate required table and worksheet and import them. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege or `DATAMANAGEMENT` (**Can manage data**) privilege, along with an existing DBT connection. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the following data control privileges may be required: - `CAN_MANAGE_CUSTOM_CALENDAR`(**Can manage custom calendars**) - `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) - `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` (**Can manage data models**) #### About generate TML Models and Worksheets to be imported can be selected by the user as part of the API. + * @param dbtConnectionIdentifier Unique ID of the DBT connection. + * @param modelTables List of Models and their respective Tables Example: \\\'[{\\\"model_name\\\": \\\"model_name\\\", \\\"tables\\\": [\\\"table_name\\\"]}]\\\' + * @param importWorksheets Mention the worksheet tmls to import + * @param worksheets List of worksheets is mandatory when import_Worksheets is type SELECTED Example: [\\\"worksheet_name\\\"] + * @param fileContent Upload DBT Manifest and Catalog artifact files as a ZIP file. This field is mandatory if the connection was created with import_type ‘ZIP_FILE’ + */ + dbtGenerateTml(dbtConnectionIdentifier: string, modelTables: string, importWorksheets: string, worksheets?: string, fileContent?: HttpFile, _options?: Configuration): Promise; + /** + * Version: 9.9.0.cl or later Gets a list of DBT connection objects by user and organization, available on the ThoughtSpot system. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege or `DATAMANAGEMENT` (**Can manage data**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the following Data control privileges may be required: - `CAN_MANAGE_CUSTOM_CALENDAR`(**Can manage custom calendars**) - `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) - `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` (**Can manage data models**) #### About search DBT connection To get details of a specific DBT connection identifier, database connection identifier, database connection name, database name, project name, project identifier, environment identifier , import type and author. + */ + dbtSearch(_options?: Configuration): Promise; + /** + * Version: 9.7.0.cl or later Deactivates a user account. Requires `ADMINISTRATION` (**Can administer Thoughtspot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `USER_ADMINISTRATION` (**Can manage users**) privilege is required. To deactivate a user account, the API request body must include the following information: - Username or the GUID of the user account - Base URL of the ThoughtSpot instance If the API request is successful, ThoughtSpot returns the activation URL in the response. The activation URL is valid for 14 days and can be used to re-activate the account and reset the password of the deactivated account. + * @param deactivateUserRequest + */ + deactivateUser(deactivateUserRequest: DeactivateUserRequest, _options?: Configuration): Promise; + /** + * Version: 10.12.0.cl or later Deletes a [custom calendar](https://docs.thoughtspot.com/cloud/latest/connections-cust-cal). Requires `DATAMANAGEMENT` (**Can manage data**) or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your ThoughtSpot instance, the `CAN_MANAGE_CUSTOM_CALENDAR` (**Can manage custom calendars**) privilege is required. #### Usage guidelines To delete a custom calendar, specify the calendar ID as a path parameter in the request URL. + * @param calendarIdentifier Unique ID or name of the Calendar. + */ + deleteCalendar(calendarIdentifier: string, _options?: Configuration): Promise; + /** + * Version: 26.4.0.cl or later Deletes one or more collections from ThoughtSpot. #### Delete options * **delete_children**: When set to `true`, deletes the child objects (metadata items) within the collection that the user has access to. Objects that the user does not have permission to delete will be skipped. * **dry_run**: When set to `true`, performs a preview of the deletion operation without actually deleting anything. The response shows what would be deleted, allowing you to review before committing the deletion. #### Response The response includes: * **metadata_deleted**: List of metadata objects that were successfully deleted * **metadata_skipped**: List of metadata objects that were skipped due to lack of permissions or other constraints + * @param deleteCollectionRequest + */ + deleteCollection(deleteCollectionRequest: DeleteCollectionRequest, _options?: Configuration): Promise; + /** + * Version: 9.2.0.cl or later Deletes Git repository configuration from your ThoughtSpot instance. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance on your instance, the `CAN_SETUP_VERSION_CONTROL` (**Can set up version control**) privilege. + * @param deleteConfigRequest + */ + deleteConfig(deleteConfigRequest: DeleteConfigRequest, _options?: Configuration): Promise; + /** + * Version: 9.2.0.cl or later **Important**: This endpoint is deprecated and will be removed from ThoughtSpot in September 2025. ThoughtSpot strongly recommends using the [Delete Connection V2](#/http/api-endpoints/connections/delete-connection-v2) endpoint to delete your connection objects. #### Usage guidelines Deletes a connection object. Requires `DATAMANAGEMENT` (**Can manage data**) and edit permissions to the connection object, or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) privilege is required. **Note**: If a connection has dependent objects, make sure you remove its associations before the delete operation. + * @param deleteConnectionRequest + */ + deleteConnection(deleteConnectionRequest: DeleteConnectionRequest, _options?: Configuration): Promise; + /** + * Version: 10.12.0.cl or later Deletes connection configuration objects. Requires `DATAMANAGEMENT` (**Can manage data**) and edit permissions to the connection object, or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) privilege is required. + * @param deleteConnectionConfigurationRequest + */ + deleteConnectionConfiguration(deleteConnectionConfigurationRequest: DeleteConnectionConfigurationRequest, _options?: Configuration): Promise; + /** + * Version: 10.4.0.cl or later Deletes a connection object. **Note**: If a connection has dependent objects, make sure you remove its associations before the delete operation. Requires `DATAMANAGEMENT` (**Can manage data**) and edit permissions to the connection object, or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) privilege is required. + * @param connectionIdentifier Unique ID or name of the connection. + */ + deleteConnectionV2(connectionIdentifier: string, _options?: Configuration): Promise; + /** + * Version: 9.6.0.cl or later Removes the custom action specified in the API request. Requires `DEVELOPER` (**Has Developer privilege**) or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `DEVELOPER` (**Has developer privilege**) privilege is required. + * @param customActionIdentifier Unique ID or name of the custom action. + */ + deleteCustomAction(customActionIdentifier: string, _options?: Configuration): Promise; + /** + * Version: 9.9.0.cl or later Removes the specified DBT connection object from the ThoughtSpot system. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) or `DATAMANAGEMENT` (**Can manage data ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the following Data control privileges may be required: - `CAN_MANAGE_CUSTOM_CALENDAR`(**Can manage custom calendars**) - `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) - `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` (**Can manage data models**) + * @param dbtConnectionIdentifier Unique ID of the DBT Connection. + */ + deleteDbtConnection(dbtConnectionIdentifier: string, _options?: Configuration): Promise; + /** + * Version: 10.10.0.cl or later Deletes the configuration for the email customization. #### Pre-requisites Requires `DEVELOPER` (**has developer privilege**) or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `DEVELOPER` (**Has developer privilege**) privilege is required. **NOTE**:This endpoint in currently in beta. Contact ThoughtSpot support to enable this on your instance. #### Usage guidelines - Call the search API endpoint to get the `template_identifier` from the response. - Use that `template_identifier` as a parameter in this API request. + * @param templateIdentifier Unique ID or name of the email customization. + */ + deleteEmailCustomization(templateIdentifier: string, _options?: Configuration): Promise; + /** + * Version: 9.0.0.cl or later Removes the specified metadata object from the ThoughtSpot system. Requires edit access to the metadata object. + * @param deleteMetadataRequest + */ + deleteMetadata(deleteMetadataRequest: DeleteMetadataRequest, _options?: Configuration): Promise; + /** + * Version: 9.0.0.cl or later Deletes an Org object from the ThoughtSpot system. Requires cluster administration (**Can administer Org**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `ORG_ADMINISTRATION` (**Can manage Orgs**) privilege is required. When you delete an Org, all its users and objects created in that Org context are removed. However, if the users in the deleted Org also exists in other Orgs, they are removed only from the deleted Org. + * @param orgIdentifier ID or name of the Org + */ + deleteOrg(orgIdentifier: string, _options?: Configuration): Promise; + /** + * Version: 10.12.0.cl or later Deletes the configuration for the email customization. #### Pre-requisites Requires `DEVELOPER` (**has developer privilege**) or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `DEVELOPER` (**Has developer privilege**) privilege is required. **NOTE**:This endpoint in currently in beta. Contact ThoughtSpot support to enable this on your instance. #### Usage guidelines - Call the search API endpoint to get the `org_identifier` from the response. - Use that `org_identifier` as a parameter in this API request. + * @param deleteOrgEmailCustomizationRequest + */ + deleteOrgEmailCustomization(deleteOrgEmailCustomizationRequest: DeleteOrgEmailCustomizationRequest, _options?: Configuration): Promise; + /** + * Version: 9.5.0.cl or later Deletes a Role object from the ThoughtSpot system. Available only if [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance. To delete a Role, the `ROLE_ADMINISTRATION` (**Can manage roles**) privilege is required. + * @param roleIdentifier Unique ID or name of the Role. ReadOnly roles cannot be deleted. + */ + deleteRole(roleIdentifier: string, _options?: Configuration): Promise; + /** + * Deletes a scheduled job. Version: 9.4.0.cl or later Deletes a scheduled Liveboard job. Requires at least edit access to Liveboard or `ADMINISTRATION` (**Can administer Org**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `JOBSCHEDULING` (**Can schedule for others**) privilege is required. + * @param scheduleIdentifier Unique ID or name of the scheduled job. + */ + deleteSchedule(scheduleIdentifier: string, _options?: Configuration): Promise; + /** + * Version: 9.0.0.cl or later Deletes a tag object from the ThoughtSpot system Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `TAGMANAGEMENT` (**Can manage tags**) privilege is required to create, edit, and delete tags. + * @param tagIdentifier Tag identifier Tag name or Tag id. + */ + deleteTag(tagIdentifier: string, _options?: Configuration): Promise; + /** + * Version: 9.0.0.cl or later Deletes a user from the ThoughtSpot system. If you want to remove a user from a specific Org but not from ThoughtSpot, update the group and Org mapping properties of the user object via a POST API call to the [/api/rest/2.0/users/{user_identifier}/update](#/http/api-endpoints/users/update-user) endpoint. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `USER_ADMINISTRATION` (**Can manage users**) privilege is required. + * @param userIdentifier GUID / name of the user + */ + deleteUser(userIdentifier: string, _options?: Configuration): Promise; + /** + * Version: 9.0.0.cl or later Removes the specified group object from the ThoughtSpot system. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `GROUP_ADMINISTRATION` (**Can manage groups**) privilege is required. + * @param groupIdentifier GUID or name of the group. + */ + deleteUserGroup(groupIdentifier: string, _options?: Configuration): Promise; + /** + * Delete a variable Version: 10.14.0.cl or later **Note:** This API endpoint is deprecated and will be removed from ThoughtSpot in a future release. Use [POST /api/rest/2.0/template/variables/delete](/api/rest/2.0/template/variables/delete) instead. Allows deleting a variable from ThoughtSpot. Requires ADMINISTRATION role and TENANT scope. The CAN_MANAGE_VARIABLES permission allows you to manage Formula Variables in the current organization scope. The API endpoint requires: * The variable identifier (ID or name) The operation will fail if: * The user lacks required permissions * The variable doesn\'t exist * The variable is being used by other objects + * @param identifier Unique id or name of the variable + */ + deleteVariable(identifier: string, _options?: Configuration): Promise; + /** + * Delete variable(s) Version: 26.4.0.cl or later Allows deleting multiple variables from ThoughtSpot. Requires ADMINISTRATION role and TENANT scope. The CAN_MANAGE_VARIABLES permission allows you to manage Formula Variables in the current organization scope. The API endpoint requires: * The variable identifiers (IDs or names) The operation will fail if: * The user lacks required permissions * Any of the variables don\'t exist * Any of the variables are being used by other objects + * @param deleteVariablesRequest + */ + deleteVariables(deleteVariablesRequest: DeleteVariablesRequest, _options?: Configuration): Promise; + /** + * Version: 10.14.0.cl or later Deletes one or more webhook configurations by their unique id or name. Returns status of each deletion operation, including successfully deleted webhooks and any failures with error details. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) or `DEVELOPER` (**Has developer privilege**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, users with `CAN_MANAGE_WEBHOOKS` (**Can manage webhooks**) privilege are also authorized to perform this action. + * @param deleteWebhookConfigurationsRequest + */ + deleteWebhookConfigurations(deleteWebhookConfigurationsRequest: DeleteWebhookConfigurationsRequest, _options?: Configuration): Promise; + /** + * Version: 9.2.0.cl or later Allows you to deploy a commit and publish TML content to your ThoughtSpot instance. Requires at least edit access to the objects used in the deploy operation. The API deploys the head of the branch unless a `commit_id` is specified in the API request. If the branch name is not defined in the request, the default branch is considered for deploying commits. For more information, see [Git integration documentation](https://developers.thoughtspot.com/docs/git-integration). + * @param deployCommitRequest + */ + deployCommit(deployCommitRequest: DeployCommitRequest, _options?: Configuration): Promise; + /** + * Version: 9.9.0.cl or later Exports the difference in connection metadata between CDW and ThoughtSpot Requires `DATAMANAGEMENT` (**Can manage data**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the following Data control privileges may be required: - `CAN_MANAGE_CUSTOM_CALENDAR`(**Can manage custom calendars**) - `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) - `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` (**Can manage data models**) To download the connection metadata difference between ThoughtSpot and CDW, pass the connection GUID as `connection_identifier` in the API request. + * @param connectionIdentifier GUID of the connection + */ + downloadConnectionMetadataChanges(connectionIdentifier: string, _options?: Configuration): Promise; + /** + * Version: 9.0.0.cl or later Exports an Answer in the given file format. You can download the Answer data as a PDF, PNG, CSV, or XLSX file. Requires at least view access to the Answer. #### Usage guidelines In the request body, specify the GUID or name of the Answer and set `file_format`. The default file format is CSV. Use the `type` parameter to specify whether the Answer being exported is a saved Answer (`SAVED`) or a pinned Answer on a Liveboard (`PINNED`). Defaults to `SAVED`. When using `PINNED`, the `metadata_identifier` must be the container id. **NOTE**: * The downloadable file returned in API response file is extensionless. Please rename the downloaded file by typing in the relevant extension. * HTML rendering is not supported for PDF exports of Answers with tables. Optionally, you can define [runtime overrides](https://developers.thoughtspot.com/docs/fetch-data-and-report-apis#_runtime_overrides) to apply to the Answer data. + * @param exportAnswerReportRequest + */ + exportAnswerReport(exportAnswerReportRequest: ExportAnswerReportRequest, _options?: Configuration): Promise; + /** + * Version: 9.0.0.cl or later Exports a Liveboard and its visualizations in PDF, PNG, CSV, or XLSX file format. The default `file_format` is CSV. Requires at least view access to the Liveboard. #### Usage guidelines In the request body, specify the GUID or name of the Liveboard. To generate a Liveboard report with specific visualizations, add GUIDs or names of the visualizations. **NOTE**: * The downloadable file returned in API response file is extensionless. Please rename the downloaded file by typing in the relevant extension. * Optionally, you can define [runtime overrides](https://developers.thoughtspot.com/docs/fetch-data-and-report-apis#_runtime_overrides) to apply to the Answer data. * To include unsaved changes in the report, pass the `transient_pinboard_content` script generated from the `getExportRequestForCurrentPinboard` method in the Visual Embed SDK. Upon successful execution, the API returns the report with unsaved changes, including ad hoc changes to visualizations. For more information, see [Liveboard Report API](https://developers.thoughtspot.com/docs/fetch-data-and-report-apis#_liveboard_report_api). * Starting with ThoughtSpot Cloud 10.9.0.cl release, the Liveboard can be exported in the PNG format in the resolution of your choice. To enable this on your instance, contact ThoughtSpot support. When this feature is enabled, the options `include_cover_page`,`include_filter_page` within the `png_options` will not be available for PNG exports. * Starting with the ThoughtSpot Cloud 26.2.0.cl release, * Liveboards can be exported in CSV format. * All visualizations within a Liveboard can be exported as individual CSV files. * When exporting multiple visualizations or the entire Liveboard, the system returns the report as a compressed ZIP file containing the separate CSV files for each visualization. * Liveboards can also be exported in XLSX format. * All selected visualizations are consolidated into a single Excel workbook (.xlsx), with each visualization placed in its own worksheet (tab). * XLSX exports are limited to a maximum of 255 worksheets (tabs) per workbook. + * @param exportLiveboardReportRequest + */ + exportLiveboardReport(exportLiveboardReportRequest: ExportLiveboardReportRequest, _options?: Configuration): Promise; + /** + * Version: 9.0.0.cl or later Exports the [TML](https://docs.thoughtspot.com/cloud/latest/tml) representation of metadata objects in JSON or YAML format. Requires `DATADOWNLOADING` (**Can download Data**) and at least view access to the metadata object. #### Usage guidelines * You can export one or several objects by passing metadata object GUIDs in the `metadata` array. * When exporting TML content for a Liveboard or Answer object, you can set `export_associated` to `true` to retrieve TML content for underlying Worksheets, Tables, or Views, including the GUID of each object within the headers. When `export_associated` is set to `true`, consider retrieving one metadata object at a time. * Set `export_fqns` to `true` to add FQNs of the referenced objects in the TML content. For example, if you send an API request to retrieve TML for a Liveboard and its associated objects, the API returns the TML content with FQNs of the referenced Worksheet. Exporting TML with FQNs is useful if ThoughtSpot has multiple objects with the same name and you want to eliminate ambiguity when importing TML files into ThoughtSpot. It eliminates the need for adding FQNs of the referenced objects manually during the import operation. * To export only the TML of feedbacks associated with an object, set the GUID of the object as `identifier`, and set the `type` as `FEEDBACK` in the `metadata` array. * To export the TML of an object along with the feedbacks associated with it, set the GUID of the object as `identifier`, set the `type` as `LOGIAL_TABLE` in the `metadata` array, and set `export_with_associated_feedbacks` in `export_options` to true. For more information, see [TML Documentation](https://developers.thoughtspot.com/docs/tml#_export_a_tml). For more information on feedbacks, see [Feedback Documentation](https://docs.thoughtspot.com/cloud/latest/sage-feedback). + * @param exportMetadataTMLRequest + */ + exportMetadataTML(exportMetadataTMLRequest: ExportMetadataTMLRequest, _options?: Configuration): Promise; + /** + * Version: 10.1.0.cl or later Exports the [TML](https://docs.thoughtspot.com/cloud/latest/tml) representation of metadata objects in JSON or YAML format. ### **Permissions Required** Requires `DATAMANAGEMENT` (**Can manage data**) and `USERMANAGEMENT` (**Can manage users**) privileges. #### **Usage Guidelines** This API is only applicable for `USER`, `GROUP`, and `ROLES` metadata types. - `batch_offset` Indicates the starting position within the complete dataset from which the API should begin returning objects. Useful for paginating results efficiently. - `batch_size` Specifies the number of objects or items to retrieve in a single request. Helps control response size for better performance. - `edoc_format` Defines the format of the TML content. The exported metadata can be in JSON or YAML format. - `export_dependent` Specifies whether to include dependent metadata objects in the export. Ensures related objects are also retrieved if needed. - `all_orgs_override` Indicates whether the export operation applies across all organizations. Useful for multi-tenant environments where cross-org exports are required. + * @param exportMetadataTMLBatchedRequest + */ + exportMetadataTMLBatched(exportMetadataTMLBatchedRequest: ExportMetadataTMLBatchedRequest, _options?: Configuration): Promise; + /** + * Version: 9.0.0.cl or later Fetches data from a saved Answer. Requires at least view access to the saved Answer. The `record_size` attribute determines the number of records to retrieve in an API call. For more information about pagination, record size, and maximum row limit, see [Pagination and record size settings](https://developers.thoughtspot.com/docs/fetch-data-and-report-apis#_pagination_settings_for_data_and_report_apis). + * @param fetchAnswerDataRequest + */ + fetchAnswerData(fetchAnswerDataRequest: FetchAnswerDataRequest, _options?: Configuration): Promise; + /** + * Version: 9.0.0.cl or later Fetches the underlying SQL query data for an Answer object. Requires at least view access to the Answer object. Upon successful execution, the API returns the SQL queries for the specified object as shown in this example: ``` { \"metadata_id\":\"8fbe44a8-46ad-4b16-8d39-184b2fada490\", \"metadata_name\":\"Total sales\", \"metadata_type\":\"ANSWER\", \"sql_queries\":[ { \"metadata_id\":\"8fbe44a8-46ad-4b16-8d39-184b2fada490\", \"metadata_name\":\"Total sales -test\", \"sql_query\":\"SELECT \\n \\\"ta_1\\\".\\\"REGION\\\" \\\"ca_1\\\", \\n \\\"ta_2\\\".\\\"PRODUCTNAME\\\" \\\"ca_2\\\", \\n \\\"ta_1\\\".\\\"STORENAME\\\" \\\"ca_3\\\", \\n CASE\\n WHEN sum(\\\"ta_3\\\".\\\"SALES\\\") IS NOT NULL THEN sum(\\\"ta_3\\\".\\\"SALES\\\")\\n ELSE 0\\n END \\\"ca_4\\\", \\n CASE\\n WHEN sum(\\\"ta_3\\\".\\\"QUANTITYPURCHASED\\\") IS NOT NULL THEN sum(\\\"ta_3\\\".\\\"QUANTITYPURCHASED\\\")\\n ELSE 0\\n END \\\"ca_5\\\"\\nFROM \\\"RETAILAPPAREL\\\".\\\"PUBLIC\\\".\\\"FACT_RETAPP_SALES\\\" \\\"ta_3\\\"\\n JOIN \\\"RETAILAPPAREL\\\".\\\"PUBLIC\\\".\\\"DIM_RETAPP_STORES\\\" \\\"ta_1\\\"\\n ON \\\"ta_3\\\".\\\"STOREID\\\" = \\\"ta_1\\\".\\\"STOREID\\\"\\n JOIN \\\"RETAILAPPAREL\\\".\\\"PUBLIC\\\".\\\"DIM_RETAPP_PRODUCTS\\\" \\\"ta_2\\\"\\n ON \\\"ta_3\\\".\\\"PRODUCTID\\\" = \\\"ta_2\\\".\\\"PRODUCTID\\\"\\nGROUP BY \\n \\\"ca_1\\\", \\n \\\"ca_2\\\", \\n \\\"ca_3\\\"\\n\" } ] } ``` + * @param fetchAnswerSqlQueryRequest + */ + fetchAnswerSqlQuery(fetchAnswerSqlQueryRequest: FetchAnswerSqlQueryRequest, _options?: Configuration): Promise; + /** + * Version: 10.4.0.cl or later Gets information about the status of the TML async import task scheduled using the `/api/rest/2.0/metadata/tml/async/import` API call. To fetch the task details, specify the ID of the TML async import task. Requires access to the task ID. The API allows users who initiated the asynchronous TML import via `/api/rest/2.0/metadata/tml/async/import` to view the status of their tasks. Users with administration privilege can view the status of all import tasks initiated by the users in their Org. #### Usage guidelines See [TML API Documentation](https://developers.thoughtspot.com/docs/tml#_fetch_status_of_the_tml_import_task) for usage guidelines. + * @param fetchAsyncImportTaskStatusRequest + */ + fetchAsyncImportTaskStatus(fetchAsyncImportTaskStatusRequest: FetchAsyncImportTaskStatusRequest, _options?: Configuration): Promise; + /** + * Version: 10.12.0.cl or later Fetches column security rules for specified tables. This API endpoint retrieves column-level security rules configured for tables. It returns information about which columns are secured and which groups have access to those columns. #### Usage guidelines - Provide an array of table identifiers using either `identifier` (GUID or name) or `obj_identifier` (object ID) - At least one of `identifier` or `obj_identifier` must be provided for each table - The API returns column security rules for all specified tables - Users must have appropriate permissions to access security rules for the specified tables #### Required permissions - `ADMINISTRATION` - Can administer ThoughtSpot - `DATAMANAGEMENT` - Can manage data - `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` - Can manage worksheet views and tables #### Example request ```json { \"tables\": [ { \"identifier\": \"table-guid\", \"obj_identifier\": \"table-object-id\" } ] } ``` #### Response format The API returns an array of `ColumnSecurityRuleResponse` objects wrapped in a `data` field. Each `ColumnSecurityRuleResponse` object contains: - Table information (GUID and object ID) - Array of column security rules with column details, group access, and source table information #### Example response ```json { \"data\": [ { \"guid\": \"table-guid\", \"objId\": \"table-object-id\", \"columnSecurityRules\": [ { \"column\": { \"id\": \"col_123\", \"name\": \"Salary\" }, \"groups\": [ { \"id\": \"group_1\", \"name\": \"HR Department\" } ], \"sourceTableDetails\": { \"id\": \"source-table-guid\", \"name\": \"Employee_Data\" } } ] } ] } ``` + * @param fetchColumnSecurityRulesRequest + */ + fetchColumnSecurityRules(fetchColumnSecurityRulesRequest: FetchColumnSecurityRulesRequest, _options?: Configuration): Promise; + /** + * Version: 9.9.0.cl or later Validates the difference in connection metadata between CDW and ThoughtSpot. Requires `DATAMANAGEMENT` (**Can manage data**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the following Data control privileges may be required: - `CAN_MANAGE_CUSTOM_CALENDAR`(**Can manage custom calendars**) - `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) - `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` (**Can manage data models**) Returns a boolean indicating whether there is any difference between the connection metadata at ThoughtSpot and CDW. To get the connection metadata difference status, pass the connection GUID as `connection_identifier` in the API request. + * @param connectionIdentifier GUID of the connection + */ + fetchConnectionDiffStatus(connectionIdentifier: string, _options?: Configuration): Promise; + /** + * Version: 9.0.0.cl or later Gets data from a Liveboard object and its visualization. Requires at least view access to the Liveboard. #### Usage guidelines In the request body, specify the GUID or name of the Liveboard. To get data for specific visualizations, add the GUIDs or names of the visualizations in the API request. To include unsaved changes in the report, pass the `transient_pinboard_content` script generated from the `getExportRequestForCurrentPinboard` method in the Visual Embed SDK. Upon successful execution, the API returns the report with unsaved changes. If the new Liveboard experience mode, the transient content includes ad hoc changes to visualizations such as sorting, toggling of legends, and data drill down. For more information, and see [Liveboard data API](https://developers.thoughtspot.com/docs/fetch-data-and-report-apis#_fetch_liveboard_data_api). + * @param fetchLiveboardDataRequest + */ + fetchLiveboardData(fetchLiveboardDataRequest: FetchLiveboardDataRequest, _options?: Configuration): Promise; + /** + * Version: 9.0.0.cl or later Fetches the underlying SQL query data for a Liveboard object and its visualizations. Requires at least view access to the Liveboard object. To get SQL query data for a Liveboard, specify the GUID of the Liveboard. Optionally, you can add an array of visualization GUIDs to retrieve the SQL query data for visualizations in the Liveboard. Upon successful execution, the API returns the SQL queries for the specified object as shown in this example: ``` { \"metadata_id\": \"fa68ae91-7588-4136-bacd-d71fb12dda69\", \"metadata_name\": \"Total Sales\", \"metadata_type\": \"LIVEBOARD\", \"sql_queries\": [ { \"metadata_id\": \"b3b6d2b9-089a-490c-8e16-b144650b7843\", \"metadata_name\": \"Total quantity purchased, Total sales by region\", \"sql_query\": \"SELECT \\n \\\"ta_1\\\".\\\"REGION\\\" \\\"ca_1\\\", \\n CASE\\n WHEN sum(\\\"ta_2\\\".\\\"QUANTITYPURCHASED\\\") IS NOT NULL THEN sum(\\\"ta_2\\\".\\\"QUANTITYPURCHASED\\\")\\n ELSE 0\\n END \\\"ca_2\\\", \\n CASE\\n WHEN sum(\\\"ta_2\\\".\\\"SALES\\\") IS NOT NULL THEN sum(\\\"ta_2\\\".\\\"SALES\\\")\\n ELSE 0\\n END \\\"ca_3\\\"\\nFROM \\\"RETAILAPPAREL\\\".\\\"PUBLIC\\\".\\\"FACT_RETAPP_SALES\\\" \\\"ta_2\\\"\\n JOIN \\\"RETAILAPPAREL\\\".\\\"PUBLIC\\\".\\\"DIM_RETAPP_STORES\\\" \\\"ta_1\\\"\\n ON \\\"ta_2\\\".\\\"STOREID\\\" = \\\"ta_1\\\".\\\"STOREID\\\"\\nGROUP BY \\\"ca_1\\\"\" } ] } ``` + * @param fetchLiveboardSqlQueryRequest + */ + fetchLiveboardSqlQuery(fetchLiveboardSqlQueryRequest: FetchLiveboardSqlQueryRequest, _options?: Configuration): Promise; + /** + * Version: 9.0.0.cl or later Fetches security audit logs. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the [Admin Control](https://developers.thoughtspot.com/docs/rbac#_admin_control) privileges are required. #### Usage guidelines By default, the API retrieves logs for the last 24 hours. You can set a custom duration in EPOCH time. Make sure the log duration specified in your API request doesn’t exceed 24 hours. If you must fetch logs for a longer time range, modify the duration and make multiple sequential API requests. Upon successful execution, the API returns logs with the following information: * timestamp of the event * event ID * event type * name and GUID of the user * IP address of ThoughtSpot instance For more information see [Audit logs Documentation](https://developers.thoughtspot.com/docs/audit-logs). + * @param fetchLogsRequest + */ + fetchLogs(fetchLogsRequest: FetchLogsRequest, _options?: Configuration): Promise; + /** + * Version: 26.3.0.cl or later This API fetches the object privileges present for the given list of principals (user or group), on the given set of objects. It supports pagination, which can be enabled and configured using the request parameters. It provides users access to certain features based on privilege based access control. #### Usage guidelines - Specify the `type` (`USER` or `USER_GROUP`) and `identifier` (either GUID or name) of the principals for which you want to retrieve object privilege information in the `principals` array. - Specify the `type` (`LOGICAL_TABLE`) and `identifier` (either GUID or name) of the metadata objects for which you want to retrieve object privilege information in the `metadata` array. Only `LOGICAL_TABLE` metadata type is supported for now. It may be extended for other metadata types in future. - To control the offset from where principals have to be fetched, use `record_offset`. When `record_offset` is 0, information is fetched from the beginning. - To control the number of principals to be fetched, use `record_size`. Default `record_size` is 20. - Ensure `record_offset` for a subsequent request is one more than the value of `record_size` of the previous request. - Ensure using correct Authorization Bearer Token corresponding to specific user & org. #### Example request ```json { \"principals\": [ { \"type\": \"type-1\", \"identifier\": \"principal-guid-or-name-1\" }, { \"type\": \"type-2\", \"identifier\": \"principal-guid-or-name-2\" } ], \"metadata\": [ { \"type\": \"metadata-type-1\", \"identifier\": \"metadata-guid-or-name-1\" }, { \"type\": \"metadata-type-2\", \"identifier\": \"metadata-guid-or-name-2\" } ], \"record_offset\": 0, \"record_size\": 20 } ``` #### Response format The API returns an array of `metadata_object_privileges` objects wrapped in JSON. Each `metadata_object_privileges` object contains: - Metadata information (GUID, name and type) - Array of `principal_object_privilege_info`. - Each `principal_object_privilege_info` contains: - Principal type. All principals of this type are listed as described below. - Array of `principal_object_privileges`. - Each `principal_object_privileges` contains: - Principal information (GUID, name, subtype) - List of applied object level privileges. #### Example response ```json { \"metadata_object_privileges\": [ { \"metadata_id\": \"metadata-guid-1\", \"metadata_name\": \"metadata-name-1\", \"metadata_type\": \"metadata-type-1\", \"principal_object_privilege_info\": [ { \"principal_type\": \"principal-type-1\", \"principal_object_privileges\": [ { \"principal_id\": \"principal-guid-1\", \"principal_name\": \"principal-name-1\", \"principal_sub_type\": \"principal-sub-type-1\", \"object_privileges\": \"[object-privilege-1, object-privilege-2]\" }, { \"principal_id\": \"principal-guid-2\", \"principal_name\": \"principal-name-2\", \"principal_sub_type\": \"principal-sub-type-2\", \"object_privileges\": \"[object-privilege-1, object-privilege-2]\" } ] }, { \"principal_type\": \"principal-type-2\", \"principal_object_privileges\": [ { \"principal_id\": \"principal-guid-3\", \"principal_name\": \"principal-guid-4\", \"principal_sub_type\": \"principal-sub-type-4\", \"object_privileges\": \"[object-privilege-1]\" } ] } ] }, { \"metadata_id\": \"metadata-guid-2\", \"metadata_name\": \"metadata-name-2\", \"metadata_type\": \"metadata-type-2\", \"principal_object_privilege_info\": [ { \"principal_type\": \"principal-type-1\", \"principal_object_privileges\": [ { \"principal_id\": \"principal-guid-1\", \"principal_name\": \"principal-name-1\", \"principal_sub_type\": \"principal-sub-type-1\", \"object_privileges\": \"[object-privilege-3, object-privilege-4]\" }, { \"principal_id\": \"principal-guid-2\", \"principal_name\": \"principal-name-2\", \"principal_sub_type\": \"principal-sub-type-2\", \"object_privileges\": \"[object-privilege-4]\" } ] } ] } ] } ``` + * @param fetchObjectPrivilegesRequest + */ + fetchObjectPrivileges(fetchObjectPrivilegesRequest: FetchObjectPrivilegesRequest, _options?: Configuration): Promise; + /** + * Version: 9.0.0.cl or later Fetches object permission details for a given principal object such as a user and group. Requires view access to the metadata object. #### Usage guidelines * To get a list of all metadata objects that a user or group can access, specify the `type` and GUID or name of the principal. * To get permission details for a specific object, add the `type` and GUID or name of the metadata object to your API request. Upon successful execution, the API returns a list of metadata objects and permission details for each object. + * @param fetchPermissionsOfPrincipalsRequest + */ + fetchPermissionsOfPrincipals(fetchPermissionsOfPrincipalsRequest: FetchPermissionsOfPrincipalsRequest, _options?: Configuration): Promise; + /** + * Version: 9.0.0.cl or later Fetches permission details for a given metadata object. Requires view access to the metadata object. #### Usage guidelines * To fetch a list of users and groups for a metadata object, specify `type` and GUID or name of the metadata object. * To get permission details for a specific user or group, add `type` and GUID or name of the principal object to your API request. Upon successful execution, the API returns permission details and principal information for the object specified in the API request. + * @param fetchPermissionsOnMetadataRequest + */ + fetchPermissionsOnMetadata(fetchPermissionsOnMetadataRequest: FetchPermissionsOnMetadataRequest, _options?: Configuration): Promise; + /** + * Version: 9.0.0.cl or later Enforces logout on current user sessions. Use this API with caution as it may invalidate active user sessions and force users to re-login. Make sure you specify the usernames or GUIDs. If you pass null values in the API call, all user sessions on your cluster become invalid, and the users are forced to re-login. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `USER_ADMINISTRATION` (**Can manage users**) privilege is required. + * @param forceLogoutUsersRequest + */ + forceLogoutUsers(forceLogoutUsersRequest: ForceLogoutUsersRequest, _options?: Configuration): Promise; + /** + * Version: 10.12.0.cl or later Exports a [custom calendar](https://docs.thoughtspot.com/cloud/latest/connections-cust-cal) in the CSV format. Requires `DATAMANAGEMENT` (**Can manage data**) or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your ThoughtSpot instance, the `CAN_MANAGE_CUSTOM_CALENDAR` (**Can manage custom calendars**) privilege is required. #### Usage guidelines Use this API to download a custom calendar in the CSV file format. In your API request, specify the following parameters. * Start and end date of the calendar. For \"month offset\" calendars, the start date must match the month defined in the `month_offset` attribute. You can also specify optional parameters such as the starting day of the week and prefixes for the quarter and year labels. + * @param generateCSVRequest + */ + generateCSV(generateCSVRequest: GenerateCSVRequest, _options?: Configuration): Promise; + /** + * Version: 9.0.0.cl or later Retrieves details of the current user session for the token provided in the request header. Any ThoughtSpot user can access this endpoint and send an API request. The data returned in the API response varies according to user\'s privilege and object access permissions. **NOTE**: In ThoughtSpot, users with cluster administration privileges can access all Orgs by default. However, unless the administrator is explicitly added to an Org, the Orgs list in the session information returned by the API will include only the Primary Org. To include other Orgs in the API response, you must explicitly add the administrator to each Org in the Admin settings page in the UI or via user REST API. + */ + getCurrentUserInfo(_options?: Configuration): Promise; + /** + * Version: 9.4.0.cl or later Retrieves details of the current session token for the bearer token provided in the request header. This API endpoint does not create a new token. Instead, it returns details about the token, including the token string, creation time, expiration time, and the associated user. Use this endpoint to introspect your current session token, debug authentication issues, or when a frontend application needs session token details. Any ThoughtSpot user with a valid bearer token can access this endpoint and send an API request + */ + getCurrentUserToken(_options?: Configuration): Promise; + /** + * Version: 10.4.0.cl or later Creates an authentication token that provides values for the formula variables in the Row Level Security (RLS) rules for a given user. Recommended for use cases that require Attribute-based access control (ABAC) via RLS. #### Required privileges To add a new user and assign privileges during auto-creation, the `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege is required. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled, the `CONTROL_TRUSTED_AUTH` (**Can Enable or Disable Trusted Authentication**) privilege and edit access to the data source are required. To configure formula variables for all Orgs on your instance or the Primary Org, cluster administration privileges are required. Org administrators can configure formula variables for their respective Orgs. If Role-Based Access Control (RBAC) is enabled, users with the `CAN_MANAGE_VARIABLES` (**Can manage variables**) role privilege can also create and manage variables for their Org context. #### Usage guidelines You can generate a token by providing a `username` and `password`, or by using a `secret_key`. To generate a `secret_key`, the administrator must enable [Trusted authentication](https://developers.thoughtspot.com/docs/trusted-auth-secret-key) in the **Develop** > **Customizations** > **Security Settings** page. **Note**: * When both `password` and `secret_key` are included in the API request, `password` takes precedence. * If [Multi-Factor Authentication (MFA)](https://docs.thoughtspot.com/cloud/latest/authentication-local-mfa) is enabled on your instance, the API login request with `username` and `password` returns an error. You can switch to token-based authentication with `secret_key` or contact ThoughtSpot Support for assistance. The token obtained from ThoughtSpot is valid for 5 minutes by default. You can configure the token expiration time as required. #### ABAC via RLS To implement ABAC via RLS and assign security entitlements to users during session creation, generate a token with custom variable values. The values set in the authentication token are applied to the formula variables referenced in RLS rules at the table level, which determines the data each user can access based on their entitlements. The variable values can be configured to persist for a specific set of Models in user sessions initiated with the token, allowing different RLS rules to be set for different data models. Once defined, the rules are added to the user\'s `variable_values` object, after which all sessions will use the persisted values. For more information, see [ABAC via tokens Documentation](https://developers.thoughtspot.com/docs/abac-via-rls-variables). ##### Formula variables Before defining variable values, ensure the variables are created and available on your instance. To create a formula variable, you can use the **Create variable** (`/api/rest/2.0/template/variables/create`) REST API endpoint, with the variable `type` set as `Formula_Variable` in the API request. The API doesn\'t support `\"persist_option\": \"RESET\"` and `\"persist_option\": \"NONE\"` when `variable_values` are defined in the request. If you are using `variable_values` for token generation, you must use other supported persist options such as `APPEND` or `REPLACE`. If you want to use `RESET` or `NONE`, do not pass any `variable_values`. In such cases, `variable_values` will remain unaffected. #### Supported objects The supported object type is `LOGICAL_TABLE`. When using `object_id` with `variable_values`, models are supported. #### Just-in-time provisioning For [just-in-time user creation and provisioning](https://developers.thoughtspot.com/docs/just-in-time-provisioning), specify the following attributes in the API request: * `auto_create` * `username` * `display_name` * `email` * `groups` Set `auto_create` to `true` if the username does not exist in ThoughtSpot. If the username already exists in ThoughtSpot and `auto_create` is set to `true`, user properties such as display name, email, Org and group entitlements will not be updated with new values. Setting `auto_create` to `true` does not create formula variables. Hence, this setting will not be applicable to `variable_values`. #### Important point to note All options in the token creation APIs that define user access to data in ThoughtSpot will take effect during token creation, not when the token is used for authentication. For example, `auto_create:true` will create the user when the authentication token is created. Persist options such as `APPEND` and `REPLACE` will persist `variable_values` on the user profile when the token is created. + * @param getCustomAccessTokenRequest + */ + getCustomAccessToken(getCustomAccessTokenRequest: GetCustomAccessTokenRequest, _options?: Configuration): Promise; + /** + * Version: 10.15.0.cl or later Suggests the most relevant data sources for a given natural language query, ranked by confidence with LLM-generated reasoning. Requires `CAN_USE_SPOTTER` privilege and at least view-level access to the underlying metadata entities referenced in the response. #### Usage guidelines The request must include: - `query`: the natural language question to find relevant data sources for If the request is successful, the API returns a ranked list of suggested data sources, each containing: - `confidence`: a float score indicating the model\'s confidence in the relevance of the suggestion - `details`: metadata about the data source - `data_source_identifier`: the unique ID of the data source - `data_source_name`: the display name of the data source - `description`: a description of the data source - `reasoning`: LLM-generated rationale explaining why the data source was recommended #### Error responses | Code | Description | |------|--------------------------------------------------------------------------------------------------------------------------------------------| | 401 | Unauthorized — authentication token is missing, expired, or invalid. | | 403 | Forbidden — the authenticated user does not have `CAN_USE_SPOTTER` privilege or lacks view permission on the underlying metadata entities. | > ###### Note: > * This endpoint is currently in Beta. Breaking changes may be introduced before it is made Generally Available. > * This endpoint requires Spotter — please contact ThoughtSpot Support to enable Spotter on your cluster. + * @param getDataSourceSuggestionsRequest + */ + getDataSourceSuggestions(getDataSourceSuggestionsRequest: GetDataSourceSuggestionsRequest, _options?: Configuration): Promise; + /** + * Version: 9.0.0.cl or later Generates an authentication token for creating a full session in ThoughtSpot for a given user. Recommended for use cases that do not require Attribute-based access control (ABAC) via Row Level Security (RLS). #### Usage guidelines You can generate a token for a user by providing a `username` and `password`, or by using the `secret_key` generated for your instance. To generate a `secret_key`, the administrator must enable [Trusted authentication](https://developers.thoughtspot.com/docs/trusted-auth-secret-key) in the **Develop** > **Customizations** > **Security Settings** page. **Note**: * When both `password` and `secret_key` are included in the API request, `password` takes precedence. * If [Multi-Factor Authentication (MFA)](https://docs.thoughtspot.com/cloud/latest/authentication-local-mfa) is enabled on your instance, the API login request with `username` and `password` returns an error. You can switch to token-based authentication with `secret_key` or contact ThoughtSpot Support for assistance. The token obtained from ThoughtSpot is valid for 5 minutes by default. You can configure the token expiration time as required. #### Just-in-time provisioning For [just-in-time user creation and provisioning](https://developers.thoughtspot.com/docs/just-in-time-provisioning), specify the following attributes in the API request: * `auto_create` * `username` * `display_name` * `email` * `group_identifiers` Set `auto_create` to `true` if the username does not exist in ThoughtSpot. If the user already exists in ThoughtSpot and `auto_create` is set to `true`, user properties such as display name, email and group assignment will be updated. To add a new user and assign privileges during auto-creation, the `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege is required. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled, the `CONTROL_TRUSTED_AUTH` (**Can Enable or Disable Trusted Authentication**) privilege is required. #### Important point to note All options in the token creation APIs that define user access to data in ThoughtSpot will take effect during token creation, not when the token is used for authentication. For example, `auto_create:true` will create the user when the authentication token is created. + * @param getFullAccessTokenRequest + */ + getFullAccessToken(getFullAccessTokenRequest: GetFullAccessTokenRequest, _options?: Configuration): Promise; + /** + * Version: 10.15.0.cl or later Retrieves existing natural language (NL) instructions configured for a specific data model. These instructions guide the AI system in understanding data context and generating more accurate responses. Requires `CAN_USE_SPOTTER` privilege, at least view access on the data model, and a bearer token corresponding to the org where the data model exists. #### Usage guidelines The request must include: - `data_source_identifier`: the unique ID of the data model to retrieve instructions for If the request is successful, the API returns: - `nl_instructions_info`: an array of instruction objects, each containing: - `instructions`: the configured text instructions for AI processing - `scope`: the scope of the instruction — currently only `GLOBAL` is supported #### Instructions scope - **GLOBAL**: Instructions that apply globally across the system on the given data-model (currently only global instructions are supported) #### Error responses | Code | Description | |------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| | 401 | Unauthorized — authentication token is missing, expired, or invalid. | | 403 | Forbidden — the authenticated user does not have `CAN_USE_SPOTTER` privilege, lacks view access on the data model, or the bearer token does not correspond to the org where the data model exists. | > ###### Note: > > - To use this API, the user needs at least view access on the data model, and must use the bearer token corresponding to the org where the data model exists. > - This endpoint is currently in Beta. Breaking changes may be introduced before the endpoint is made Generally Available. > - Available from version 10.15.0.cl and later. > - This endpoint requires Spotter — please contact ThoughtSpot Support to enable Spotter on your cluster. > - Use this API to review currently configured instructions before modifying them with `setNLInstructions`. + * @param getNLInstructionsRequest + */ + getNLInstructions(getNLInstructionsRequest: GetNLInstructionsRequest, _options?: Configuration): Promise; + /** + * Version: 9.0.0.cl or later Generates an authentication token that provides access to a specific metadata object. This object list is intersected with the list of objects the user is allowed to access via group membership. For more information, see [Object security](https://docs.thoughtspot.com/cloud/latest/security-data-object#object_security). #### Usage guidelines You can generate a token for a user by providing a `username` and `password`, or by using the `secret_key` generated for your instance. To generate a `secret_key`, the administrator must enable [Trusted authentication](https://developers.thoughtspot.com/docs/trusted-auth-secret-key) in the **Develop** > **Customizations** > **Security Settings** page. **Note**: * When both `password` and `secret_key` are included in the API request, `password` takes precedence. * If [Multi-Factor Authentication (MFA)](https://docs.thoughtspot.com/cloud/latest/authentication-local-mfa) is enabled on your instance, the API login request with `username` and `password` returns an error. You can switch to token-based authentication with `secret_key` or contact ThoughtSpot Support for assistance. The token obtained from ThoughtSpot is valid for 5 minutes by default. You can configure the token expiration time as required. #### Just-in-time provisioning For [just-in-time user creation and provisioning](https://developers.thoughtspot.com/docs/just-in-time-provisioning), specify the following attributes in the API request: * `auto_create` * `username` * `display_name` * `email` * `group_identifiers` Set `auto_create` to `true` if the user is not available in ThoughtSpot. If the user already exists in ThoughtSpot and the `auto_create` parameter is set to `true`, user properties such as display name, email, and group assignment will be updated. To add a new user and assign privileges, the `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege is required. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled, the `CONTROL_TRUSTED_AUTH`(**Can Enable or Disable Trusted Authentication**) privilege is required. #### Important point to note All options in the token creation APIs that define user access to data in ThoughtSpot will take effect during token creation, not when the token is used for authentication. For example, `auto_create:true` will create the user when the authentication token is created. + * @param getObjectAccessTokenRequest + */ + getObjectAccessToken(getObjectAccessTokenRequest: GetObjectAccessTokenRequest, _options?: Configuration): Promise; + /** + * Version: 10.13.0.cl or later Breaks down a natural language query into a series of smaller analytical sub-questions, each mapped to a relevant data source. Requires `CAN_USE_SPOTTER` privilege and at least view-level access to the referenced metadata objects. #### Usage guidelines The request must include: - `query`: the natural language question to decompose into analytical sub-questions - `metadata_context`: at least one of the following context identifiers to guide question generation: - `conversation_identifier` — an existing conversation session ID - `answer_identifiers` — a list of Answer GUIDs - `liveboard_identifiers` — a list of Liveboard GUIDs - `data_source_identifiers` — a list of data source GUIDs Optional parameters for refining the output: - `ai_context`: additional context to improve response quality - `content` — supplementary text or CSV data as string input - `instructions` — custom text instructions for the AI system - `limit_relevant_questions`: maximum number of questions to return (default: `5`) - `bypass_cache`: if `true`, forces fresh computation instead of returning cached results If the request is successful, the API returns a list of relevant analytical questions, each containing: - `query`: the generated sub-question - `data_source_identifier`: the unique ID of the data source the question targets - `data_source_name`: the display name of the corresponding data source #### Error responses | Code | Description | |------|---------------------------------------------------------------------------------------------------------------------------------------| | 401 | Unauthorized — authentication token is missing, expired, or invalid. | | 403 | Forbidden — the authenticated user does not have `CAN_USE_SPOTTER` privilege or lacks view access to the referenced metadata objects. | > ###### Note: > * This endpoint is currently in Beta. Breaking changes may be introduced before the endpoint is made Generally Available. > * This endpoint requires Spotter - please contact ThoughtSpot support to enable Spotter on your cluster. + * @param getRelevantQuestionsRequest + */ + getRelevantQuestions(getRelevantQuestionsRequest: GetRelevantQuestionsRequest, _options?: Configuration): Promise; + /** + * Version: 9.0.0.cl or later Retrieves the current configuration details of the cluster. If the request is successful, the API returns a list configuration settings applied on the cluster. Requires `ADMINISTRATION`(**Can administer ThoughtSpot**) privilege to view these complete configuration settings of the cluster. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `SYSTEM_INFO_ADMINISTRATION` (**Can view system activities**) privilege is required. This API does not require any parameters to be passed in the request. + */ + getSystemConfig(_options?: Configuration): Promise; + /** + * Version: 9.0.0.cl or later Gets system information such as the release version, locale, time zone, deployment environment, date format, and date time format of the cluster. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privileges. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `SYSTEM_INFO_ADMINISTRATION` (**Can view system activities**) privilege is required. This API does not require any parameters to be passed in the request. + */ + getSystemInformation(_options?: Configuration): Promise; + /** + * Version: 9.2.0.cl or later Gets a list of configuration overrides applied on the cluster. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `APPLICATION_ADMINISTRATION` (**Can manage application settings**) privilege is required. This API does not require any parameters to be passed in the request. + */ + getSystemOverrideInfo(_options?: Configuration): Promise; + /** + * Version: 9.0.0.cl or later Imports [TML](https://docs.thoughtspot.com/cloud/latest/tml) files into ThoughtSpot. Requires `DATAMANAGEMENT` (**Can manage data**) or `ADMINISTRATION` (**Can administer ThoughtsSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the following Data control privileges may be required: - `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) - `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` (**Can manage data models**) #### Usage guidelines * Import all related objects in a single TML Import API call. For example, Tables that use the same Connection object and Worksheets connected to these Tables. * Include the `fqn` property to distinguish objects that have the same name. For example, if you have multiple Connections or Worksheets with the same name on ThoughtSpot and the Connection or Worksheet referenced in your TML file does not have a unique name to distinguish, it may result in invalid object references. Adding `fqn` helps ThoughtSpot differentiate a Table from another with the same name. We recommend [exporting TML with FQNs](#/http/api-endpoints/metadata/export-metadata-tml) and using these during the import operation. * You can upload multiple TML files at a time. If you import a Worksheet along with Liveboards, Answers, and other dependent objects in a single API call, the imported objects will be immediately available for use. When you import only a Worksheet object, it may take some time for the Worksheet to become available in the ThoughtSpot system. Please wait for a few minutes, and then proceed to create an Answer and Liveboard from the newly imported Worksheet. For more information, see [TML Documentation](https://developers.thoughtspot.com/docs/tml#_import_a_tml). + * @param importMetadataTMLRequest + */ + importMetadataTML(importMetadataTMLRequest: ImportMetadataTMLRequest, _options?: Configuration): Promise; + /** + * Version: 10.4.0.cl or later Schedules a task to import [TML](https://docs.thoughtspot.com/cloud/latest/tml) files into ThoughtSpot. You can use this API endpoint to process TML objects asynchronously when importing TMLs of large and complex metadata objects into ThoughtSpot. Unlike the synchronous import TML operation, the API processes TML data in the background and returns a task ID, which can be used to check the status of the import task via `/api/rest/2.0/metadata/tml/async/status` API endpoint. Requires `DATAMANAGEMENT` (**Can manage data**) or `ADMINISTRATION` (**Can administer ThoughtsSpot**) privilege, and edit access to the TML objects. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the following Data control privileges may be required: - `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) - `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` (**Can manage data models**) #### Usage guidelines See [Async TML API Documentation](https://developers.thoughtspot.com/docs/tml#_import_tml_objects_asynchronously) for usage guidelines. + * @param importMetadataTMLAsyncRequest + */ + importMetadataTMLAsync(importMetadataTMLAsyncRequest: ImportMetadataTMLAsyncRequest, _options?: Configuration): Promise; + /** + * Version: 9.0.0.cl or later Imports group objects from external databases into ThoughtSpot. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `GROUP_ADMINISTRATION` (**Can manage groups**) privilege is required. During the import operation: * If the specified group is not available in ThoughtSpot, it will be added to ThoughtSpot. * If `delete_unspecified_groups` is set to `true`, the groups not specified in the API request, excluding administrator and system user groups, are deleted. * If the specified groups are already available in ThoughtSpot, the object properties of these groups are modified and synchronized as per the input data in the API request. A successful API call returns the object that represents the changes made in the ThoughtSpot system. + * @param importUserGroupsRequest + */ + importUserGroups(importUserGroupsRequest: ImportUserGroupsRequest, _options?: Configuration): Promise; + /** + * Version: 9.0.0.cl or later Imports user data from external databases into ThoughtSpot. During the user import operation: * If the specified users are not available in ThoughtSpot, the users are created and assigned a default password. Defining a `default_password` in the API request is optional. * If `delete_unspecified_users` is set to `true`, the users not specified in the API request, excluding the `tsadmin`, `guest`, `system` and `su` users, are deleted. * If the specified user objects are already available in ThoughtSpot, the object properties are updated and synchronized as per the input data in the API request. A successful API call returns the object that represents the changes made in the ThoughtSpot system. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `USER_ADMINISTRATION` (**Can manage users**) privilege is required. + * @param importUsersRequest + */ + importUsers(importUsersRequest: ImportUsersRequest, _options?: Configuration): Promise; + /** + * Version: 9.0.0.cl or later Creates a login session for a ThoughtSpot user with Basic authentication. In Basic authentication method, REST clients log in to ThoughtSpot using `username` and `password` attributes. On a multi-tenant cluster with Orgs, users can pass the ID of the Org in the API request to log in to a specific Org context. **Note**: If Multi-Factor Authentication (MFA) is enabled on your instance, the API login request with basic authentication (`username` and `password` ) returns an error. Contact ThoughtSpot Support for assistance. A successful login returns a session cookie that can be used in your subsequent API requests. + * @param loginRequest + */ + login(loginRequest: LoginRequest, _options?: Configuration): Promise; + /** + * Version: 9.0.0.cl or later Logs out a user from their current session. + */ + logout(_options?: Configuration): Promise; + /** + * Version: 26.3.0.cl or later This API allows the addition or deletion of object level privileges for a set of users and groups, on a set of metadata objects. It provides users to access certain features based on privilege based access control. #### Usage guidelines - Specify the `operation`. The supported operations are: `ADD`, `REMOVE`. - Specify the type of the objects on which the object privileges are being provided in `metadata_type`. Only `LOGICAL_TABLE` metadata type is supported for now. It may be extended for other metadata types in future. - Specify the list of object privilege types in the `object_privilege_types` array. The supported object privilege types are: `SPOTTER_COACHING_PRIVILEGE`. - Specify the identifiers (either GUID or name) for the metadata objects in the `metadata_identifiers` array. - Specify the `type` (`USER` or `USER_GROUP`) and `identifier` (either GUID or name) of the principals to which you want to apply the given operation and given object privileges in the `principals` array. - Ensure using correct Authorization Bearer Token corresponding to specific user & org. #### Example request ```json { \"operation\": \"operation-type\", \"metadata_type\": \"metadata-type\", \"object_privilege_types\": [\"privilege-type-1\", \"privilege-type-2\"], \"metadata_identifiers\": [\"metadata-guid-or-name-1\", \"metadata-guid-or-name-1\"], \"principals\": [ { \"type\": \"type-1\", \"identifier\": \"principal-guid-or-name-1\" }, { \"type\": \"type-2\", \"identifier\": \"principal-guid-or-name-2\" } ] } ``` > ###### Note: > * Only admin users, users with edit access and users with coaching privilege on a given data-model can add or remove principals related to SPOTTER_COACHING_PRIVILEGE + * @param manageObjectPrivilegeRequest + */ + manageObjectPrivilege(manageObjectPrivilegeRequest: ManageObjectPrivilegeRequest, _options?: Configuration): Promise; + /** + * Parameterize fields in metadata objects. Version: 10.9.0.cl or later **Note:** This API endpoint is deprecated and will be removed from ThoughtSpot in a future release. Use [POST /api/rest/2.0/metadata/parameterize-fields](/api/rest/2.0/metadata/parameterize-fields) instead. Allows parameterizing fields in metadata objects in ThoughtSpot. Requires appropriate permissions to modify the metadata object. The API endpoint allows parameterizing the following types of metadata objects: * Logical Tables * Connections * Connection Configs For a Logical Table the field type must be `ATTRIBUTE` and field name can be one of: * databaseName * schemaName * tableName For a Connection or Connection Config, the field type is always `CONNECTION_PROPERTY`. In this case, field_name specifies the exact property of the Connection or Connection Config that needs to be parameterized. For Connection Config, the only supported field name is: * impersonate_user + * @param parameterizeMetadataRequest + */ + parameterizeMetadata(parameterizeMetadataRequest: ParameterizeMetadataRequest, _options?: Configuration): Promise; + /** + * Parameterize multiple fields of metadata objects. For example [schemaName, databaseName] for LOGICAL_TABLE. Version: 26.5.0.cl or later Allows parameterizing multiple fields of metadata objects in ThoughtSpot. For example, you can parameterize [schemaName, databaseName] for LOGICAL_TABLE. Requires appropriate permissions to modify the metadata object. The API endpoint allows parameterizing the following types of metadata objects: * Logical Tables * Connections * Connection Configs For a Logical Table, the field type must be `ATTRIBUTE` and field names can include: * databaseName * schemaName * tableName For a Connection or Connection Config, the field type is always `CONNECTION_PROPERTY`. In this case, field_names specifies the exact properties of the Connection or Connection Config that need to be parameterized. For Connection Config, supported field names include: * impersonate_user You can parameterize multiple fields at once by providing an array of field names. + * @param parameterizeMetadataFieldsRequest + */ + parameterizeMetadataFields(parameterizeMetadataFieldsRequest: ParameterizeMetadataFieldsRequest, _options?: Configuration): Promise; + /** + * Version: 26.5.0.cl or later Allows publishing metadata objects across organizations in ThoughtSpot. Requires ADMINISTRATION role and TENANT scope. The API endpoint allows publishing the following types of metadata objects: * Liveboards * Answers * Logical Tables This API will essentially share the objects along with it\'s dependencies to the org admins of the orgs to which it is being published. + * @param publishMetadataRequest + */ + publishMetadata(publishMetadataRequest: PublishMetadataRequest, _options?: Configuration): Promise; + /** + * Update values for a variable Version: 26.4.0.cl or later Allows updating values for a specific variable in ThoughtSpot. Requires ADMINISTRATION role. The CAN_MANAGE_VARIABLES permission allows you to manage Formula Variables in the current organization scope. The API endpoint allows: * Adding new values to the variable * Replacing existing values * Deleting values from the variable * Resetting all values When updating variable values, you need to specify: * The variable identifier (ID or name) * The values to add/replace/remove * The operation to perform (ADD, REPLACE, REMOVE, RESET) Behaviour based on operation type: * ADD - Adds values to the variable if this is a list type variable, else same as replace. * REPLACE - Replaces all values of a given set of constraints with the current set of values. * REMOVE - Removes any values which match the set of conditions of the variables if this is a list type variable, else clears value. * RESET - Removes all constraints for the given variable, scope is ignored + * @param identifier Unique ID or name of the variable + * @param putVariableValuesRequest + */ + putVariableValues(identifier: string, putVariableValuesRequest: PutVariableValuesRequest, _options?: Configuration): Promise; + /** + * Version: 10.7.0.cl or later **Deprecated** — Use `getRelevantQuestions` instead (available from 10.13.0.cl). Breaks down a topical or goal-oriented natural language question into smaller, actionable analytical sub-questions, each mapped to a relevant data source for independent execution. Requires `CAN_USE_SPOTTER` privilege and at least view-level access to the referenced metadata objects. #### Usage guidelines The request accepts the following parameters: - `nlsRequest`: contains the user `query` to decompose, along with optional `instructions` and `bypassCache` flag - `worksheetIds`: list of data source identifiers to scope the decomposition - `answerIds`: list of Answer GUIDs whose data guides the response - `liveboardIds`: list of Liveboard GUIDs whose data guides the response - `conversationId`: an existing conversation session ID for context continuity - `content`: supplementary text or CSV data to improve response quality - `maxDecomposedQueries`: maximum number of sub-questions to return (default: `5`) If the request is successful, the API returns a `decomposedQueryResponse` containing a list of `decomposedQueries`, each with: - `query`: the generated analytical sub-question - `worksheetId`: the unique ID of the data source the question targets - `worksheetName`: the display name of the corresponding data source #### Error responses | Code | Description | |------|---------------------------------------------------------------------------------------------------------------------------------------| | 401 | Unauthorized — authentication token is missing, expired, or invalid. | | 403 | Forbidden — the authenticated user does not have `CAN_USE_SPOTTER` privilege or lacks view access to the referenced metadata objects. | > ###### Note: > * This endpoint is deprecated since 10.13.0.cl. Use `getRelevantQuestions` for new integrations. > * This endpoint is currently in Beta. Breaking changes may be introduced before the endpoint is made Generally Available. > * This endpoint requires Spotter — please contact ThoughtSpot support to enable Spotter on your cluster. + * @param queryGetDecomposedQueryRequest + */ + queryGetDecomposedQuery(queryGetDecomposedQueryRequest: QueryGetDecomposedQueryRequest, _options?: Configuration): Promise; + /** + * Version: 9.0.0.cl or later Resets the password of a user account. Administrators can reset password on behalf of a user. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `USER_ADMINISTRATION` (**Can manage users**) privilege is required. + * @param resetUserPasswordRequest + */ + resetUserPassword(resetUserPasswordRequest: ResetUserPasswordRequest, _options?: Configuration): Promise; + /** + * Version: 9.2.0.cl or later Reverts TML objects to a previous commit specified in the API request. Requires at least edit access to objects. In the API request, specify the `commit_id`. If the branch name is not specified in the request, the API will consider the default branch configured on your instance. By default, the API reverts all objects. If the revert operation fails for one of the objects provided in the commit, the API returns an error and does not revert any object. For more information, see [Git integration documentation](https://developers.thoughtspot.com/docs/git-integration). + * @param commitId Commit id to which the object should be reverted + * @param revertCommitRequest + */ + revertCommit(commitId: string, revertCommitRequest: RevertCommitRequest, _options?: Configuration): Promise; + /** + * Version: 26.2.0.cl or later Revokes OAuth refresh tokens for users who no longer require access to a data warehouse connection. When a token is revoked, the affected user\'s session for that connection is terminated, and they must re-authenticate to regain access. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) or `DATAMANAGEMENT` (**Can manage data**) privileges. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on the ThoughtSpot instance, users with `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) privilege can also make API requests to revoke tokens for connection users. #### Usage guidelines You can specify different combinations of identifiers to control which refresh tokens are revoked. - **connection_identifier**: Revokes refresh tokens for all users of the connection, except the connection author. - **connection_identifier** and **user_identifiers**: Revokes refresh tokens only for the users specified in the request. If the name or ID of the connection author is included in the request, their token will also be revoked. - **connection_identifier** and **configuration_identifiers**: Revokes refresh tokens for all users on the specified configurations, except the configuration author. - **connection_identifier**, **configuration_identifiers**, and **user_identifiers**: Revokes refresh tokens for the specified users on the specified configurations. - **connection_identifier** and **org_identifiers**: Revokes refresh tokens for the specified Orgs. Applicable only for published connections. - **connection_identifier**, **org_identifiers**, and **user_identifiers**: Revokes refresh tokens for the specified users in the specified Orgs. Applicable only for published connections. **NOTE**: The `org_identifiers` parameter is only applicable for published connections. Using this parameter for unpublished connections will result in an error. Ensure that the connections are published before making the API request. + * @param connectionIdentifier Unique ID or name of the connection whose refresh tokens need to be revoked. All the users associated with the connection will have their refresh tokens revoked except the author. + * @param revokeRefreshTokensRequest + */ + revokeRefreshTokens(connectionIdentifier: string, revokeRefreshTokensRequest: RevokeRefreshTokensRequest, _options?: Configuration): Promise; + /** + * Version: 9.0.0.cl or later Revokes the authentication token issued for current user session. The token of your current session expires when you make a call to the `/api/rest/2.0/auth/token/revoke` endpoint. the users will not be able to access ThoughtSpot objects until a new token is obtained. To restart your session, request for a new token from ThoughtSpot. See [Get Full Access Token](#/http/api-endpoints/authentication/get-full-access-token). + * @param revokeTokenRequest + */ + revokeToken(revokeTokenRequest: RevokeTokenRequest, _options?: Configuration): Promise; + /** + * Version: 26.6.0.cl or later Returns the authentication configuration for the specified auth type at cluster and org level. Currently supports `TRUSTED_AUTH`. #### Required privileges Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) or `CONTROL_TRUSTED_AUTH` (**Can Enable or Disable Trusted Authentication**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled, the `CONTROL_TRUSTED_AUTH` privilege is required. #### Usage guidelines Use `scope` to control which level of settings are returned: - `CLUSTER` — Returns cluster-level authentication status and access tokens. Accessible only from the Primary Org. - `ORG` — Returns org-level authentication status and access tokens for the current Org. Requires the per-Org authentication feature to be enabled on your instance. - If `scope` is omitted, both cluster and org-level settings are returned based on the caller\'s org context and feature availability. The `access_tokens` array in `cluster_preferences` or `org_preferences` is omitted when no token is configured at that level. **Note**: Access tokens returned in the response are sensitive credentials. Treat them with the same care as passwords. + * @param searchAuthSettingsRequest + */ + searchAuthSettings(searchAuthSettingsRequest: SearchAuthSettingsRequest, _options?: Configuration): Promise; + /** + * Version: 10.12.0.cl or later Gets a list of [custom calendars](https://docs.thoughtspot.com/cloud/latest/connections-cust-cal). Requires `DATAMANAGEMENT` (**Can manage data**) or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your ThoughtSpot instance, the `CAN_MANAGE_CUSTOM_CALENDAR` (**Can manage custom calendars**) privilege is required. #### Usage guidelines By default, the API returns a list of custom calendars for all connection objects. To retrieve custom calendar details for a particular connection, specify the connection ID. You can also use other search parameters such as `name_pattern` and `sort_options` as search filters. The `name_pattern` parameter filters and returns only those objects that match the specified pattern. Use `%` as a wildcard for pattern matching. + * @param searchCalendarsRequest + */ + searchCalendars(searchCalendarsRequest: SearchCalendarsRequest, _options?: Configuration): Promise; + /** + * Version: 26.4.0.cl or later Searches delivery history for communication channels such as webhooks. Returns channel-level delivery status for each job execution record. Use this to monitor channel health and delivery success rates across events. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) or `DEVELOPER` (**Has developer privilege**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, users with `CAN_MANAGE_WEBHOOKS` (**Can manage webhooks**) privilege are also authorized to perform this action. **NOTE**: When `channel_type` is `WEBHOOK`, the following constraints apply: - `job_ids`, `channel_identifiers`, and `events` each accept at most one element. - When `job_ids` is provided, it is used as the sole lookup key and other filter fields are ignored. - When `job_ids` is not provided, `channel_identifiers` and `events` are both required, each containing exactly one element. - Records older than the configured retention period are not returned. - Use `start_epoch_time_in_millis` and/or `end_epoch_time_in_millis` to narrow results to a specific time window. + * @param searchChannelHistoryRequest + */ + searchChannelHistory(searchChannelHistoryRequest: SearchChannelHistoryRequest, _options?: Configuration): Promise; + /** + * Version: 26.4.0.cl or later Gets a list of collections available in ThoughtSpot. To get details of a specific collection, specify the collection GUID or name. You can also filter the API response based on the collection name pattern, author, and other criteria. #### Search options * **name_pattern**: Use \'%\' as a wildcard character to match collection names * **collection_identifiers**: Search for specific collections by their GUIDs or names * **include_metadata**: When set to `true`, includes the metadata objects within each collection in the response **NOTE**: If the API returns an empty list, consider increasing the value of the `record_size` parameter. To search across all available collections, set `record_size` to `-1`. + * @param searchCollectionsRequest + */ + searchCollections(searchCollectionsRequest: SearchCollectionsRequest, _options?: Configuration): Promise; + /** + * Version: 9.2.0.cl or later Gets a list of commits for a given metadata object. Requires `DATAMANAGEMENT` (**Can manage data**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance on your instance, the `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` (**Can manage data models**) privilege and edit access to the metadata objects. + * @param searchCommitsRequest + */ + searchCommits(searchCommitsRequest: SearchCommitsRequest, _options?: Configuration): Promise; + /** + * Version: 10.14.0.cl or later Fetch communication channel preferences. - Use `cluster_preferences` to fetch the default preferences for your ThoughtSpot application instance. - If your instance has [Orgs](https://docs.thoughtspot.com/cloud/latest/orgs-overview), use `org_preferences` to fetch any Org-specific preferences that override the defaults. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) or `DEVELOPER` (**Has developer privilege**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, users with `APPLICATION_ADMINISTRATION` (**Can manage application settings**) privilege are also authorized to perform this action. + * @param searchCommunicationChannelPreferencesRequest + */ + searchCommunicationChannelPreferences(searchCommunicationChannelPreferencesRequest: SearchCommunicationChannelPreferencesRequest, _options?: Configuration): Promise; + /** + * Version: 9.2.0.cl or later Gets Git repository connections configured on the ThoughtSpot instance. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance on your instance, the `CAN_SETUP_VERSION_CONTROL` (**Can set up version control**) privilege. + * @param searchConfigRequest + */ + searchConfig(searchConfigRequest: SearchConfigRequest, _options?: Configuration): Promise; + /** + * Version: 9.2.0.cl or later Gets connection objects. Requires `DATAMANAGEMENT` (**Can manage data**) or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) privilege is required. - To get a list of all connections available in the ThoughtSpot system, send the API request without any attributes in the request body. - To get the connection objects for a specific type of data warehouse, specify the type in `data_warehouse_types`. - To fetch details of a connection object, specify the connection object GUID or name. The `name_pattern` attribute allows passing partial text with `%` for a wildcard match. - To get details of the database, schemas, tables, or columns from a data connection object, specify `data_warehouse_object_type`. - To get a specific database, schema, table, or column from a connection object, define the object type in `data_warehouse_object_type` and object properties in the `data_warehouse_objects` array. For example, to search for a column, you must pass the database, schema, and table names in the API request. Note that in the following example, object properties are set in a hierarchical order (`database` > `schema` > `table` > `column`). ``` { \"connections\": [ { \"identifier\": \"b9d1f2ef-fa65-4a4b-994e-30fa2d57b0c2\", \"data_warehouse_objects\": [ { \"database\": \"NEBULADEV\", \"schema\": \"INFORMATION_SCHEMA\", \"table\": \"APPLICABLE_ROLES\", \"column\": \"ROLE_NAME\" } ] } ], \"data_warehouse_object_type\": \"COLUMN\" } ``` - To fetch data by `configuration`, specify `data_warehouse_object_type`. For example, to fetch columns from the `DEVELOPMENT` database, specify the `data_warehouse_object_type` as `DATABASE` and define the `configuration` string as `{\"database\":\"DEVELOPMENT\"}`. To get column data for a specific table, specify the table, for example,`{\"database\":\"RETAILAPPAREL\",\"table\":\"PIPES\"}`. - To query connections by `authentication_type`, specify `data_warehouse_object_type`. Supported values for `authentication_type` are: - `SERVICE_ACCOUNT`: For connections that require service account credentials to authenticate to the Cloud Data Warehouse and fetch data. - `OAUTH`: For connections that require OAuth credentials to authenticate to the Cloud Data Warehouse and fetch data. Teradata, Oracle, and Presto Cloud Data Warehouses do not support the OAuth authentication type. - `IAM`: For connections that have the IAM OAuth set up. This authentication type is supported on Amazon Redshift connections only. - `EXTOAUTH`: For connections that have External OAuth set up. ThoughtSpot supports external [OAuth with Microsoft Azure Active Directory (AD)](https://docs.thoughtspot.com/cloud/latest/ connections-snowflake-azure-ad-oauth) and [Okta for Snowflake data connections](https://docs.thoughtspot.com/cloud/latest/connections-snowflake-okta-oauth). - `KEY_PAIR`: For connections that require Key Pair account credentials to authenticate to the Cloud Data Warehouse and fetch data. This authentication type is supported on Snowflake connections only. - `OAUTH_WITH_PKCE`: For connections that require OAuth with PKCE account credentials to authenticate to the Cloud Data Warehouse and fetch data. This authentication type is supported on Snowflake, Starburst, Databricks, Denodo connections only. - `EXTOAUTH_WITH_PKCE`: For connections that require External OAuth With PKCE account credentials to authenticate to the Cloud Data Warehouse and fetch data. This authentication type is supported on Snowflake connections only. - `OAUTH_WITH_PEZ`: For connections that require OAuth With PEZ account credentials to authenticate to the Cloud Data Warehouse and fetch data. This authentication type is supported on Amazon Redshift connections only. - `OAUTH_WITH_SERVICE_PRINCIPAL`: For connections that require OAuth With Service Principal account credentials to authenticate to the Cloud Data Warehouse and fetch data. This authentication type is supported on Databricks connections only. - `PERSONAL_ACCESS_TOKEN`: For connections that require Personal Access Token account credentials to authenticate to the Cloud Data Warehouse and fetch data. This authentication type is supported on Databricks connections only. - `OAUTH_CLIENT_CREDENTIALS`: For connections that require OAuth Client Credentials to authenticate to the Cloud Data Warehouse and fetch data. This authentication type is supported on Snowflake connections only. - To include more details about connection objects in the API response, set `include_details` to `true`. - You can also sort the output by field names and filter connections by tags. **NOTE**: When filtering connection records by parameters other than `data_warehouse_types` or `tag_identifiers`, ensure that you set `record_size` to `-1` and `record_offset` to `0` for precise results. + * @param searchConnectionRequest + */ + searchConnection(searchConnectionRequest: SearchConnectionRequest, _options?: Configuration): Promise; + /** + * Version: 9.6.0.cl or later Gets custom actions configured on the cluster. Requires `DEVELOPER` (**Has Developer privilege**) or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `DEVELOPER` (**Has developer privilege**) privilege is required. + * @param searchCustomActionsRequest + */ + searchCustomActions(searchCustomActionsRequest: SearchCustomActionsRequest, _options?: Configuration): Promise; + /** + * Version: 9.0.0.cl or later Generates an Answer from a given data source. Requires at least view access to the data source object (Worksheet or View). #### Usage guidelines To search data, specify the data source GUID in `logical_table_identifier`. The data source can be a Worksheet, View, Table, or SQL view. Pass search tokens in the `query_string` attribute in the API request as shown in the following example: ``` { \"query_string\": \"[sales] by [store]\", \"logical_table_identifier\": \"cd252e5c-b552-49a8-821d-3eadaa049cca\", } ``` For more information about the `query_string` format and data source attribute, see [Search data API](https://developers.thoughtspot.com/docs/fetch-data-and-report-apis#_search_data_api). The `record_size` attribute determines the number of records to retrieve in an API call. For more information about pagination, record size, and maximum row limit, see [Pagination and record size settings](https://developers.thoughtspot.com/docs/fetch-data-and-report-apis#_pagination_settings_for_data_and_report_api). + * @param searchDataRequest + */ + searchData(searchDataRequest: SearchDataRequest, _options?: Configuration): Promise; + /** + * Version: 10.10.0.cl or later Search the email customization configuration if any set for the ThoughtSpot system. #### Pre-requisites Requires `DEVELOPER` (**has developer privilege**) or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `DEVELOPER` (**Has developer privilege**) privilege is required. **NOTE**:This endpoint in currently in beta. Contact ThoughtSpot support to enable this on your instance. + * @param searchEmailCustomizationRequest + */ + searchEmailCustomization(searchEmailCustomizationRequest: SearchEmailCustomizationRequest, _options?: Configuration): Promise; + /** + * Version: 9.0.0.cl or later Gets a list of metadata objects available on the ThoughtSpot system. This API endpoint is available to all users who have view access to the object. Users with `ADMINISTRATION` (**Can administer ThoughtSpot**) privileges can view data for all metadata objects, including users and groups. #### Usage guidelines - To get all metadata objects, send the API request without any attributes. - To get metadata objects of a specific type, set the `type` attribute. For example, to fetch a Worksheet, set the type as `LOGICAL_TABLE`. - To filter metadata objects within type `LOGICAL_TABLE`, set the `subtypes` attribute. For example, to fetch a Worksheet, set the type as `LOGICAL_TABLE` & subtypes as `[WORKSHEET]`. - To get a specific metadata object, specify the GUID. - To customize your search and filter the API response, you can use several parameters. You can search for objects created or modified by specific users, by tags applied to the objects, or by using the include parameters like `include_auto_created_objects`, `include_dependent_objects`, `include_headers`, `include_incomplete_objects`, and so on. You can also define sorting options to sort the data retrieved in the API response. - To get discoverable objects when linientmodel is enabled you can use `include_discoverable_objects` as true else false. Default value is true. - For liveboard metadata type, to get the newer format, set the `liveboard_response_format` as V2. Default value is V1. - To retrieve only objects that are published, set the `include_only_published_objects` as true. Default value is false. **NOTE**: The following parameters support pagination of metadata records: - `tag_identifiers` - `type` - `subtypes` - `created_by_user_identifiers` - `modified_by_user_identifiers` - `owned_by_user_identifiers` - `exclude_objects` - `include_auto_created_objects` - `favorite_object_options` - `include_only_published_objects` If you are using other parameters to search metadata, set `record_size` to `-1` and `record_offset` to `0`. + * @param searchMetadataRequest + */ + searchMetadata(searchMetadataRequest: SearchMetadataRequest, _options?: Configuration): Promise; + /** + * Version: 9.0.0.cl or later Gets a list of Orgs configured on the ThoughtSpot system. To get details of a specific Org, specify the Org ID or name. You can also pass parameters such as status, visibility, and user identifiers to get a specific list of Orgs. Requires cluster administration (**Can administer Org**) privileges. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `ORG_ADMINISTRATION` (**Can manage Orgs**) privilege is required. + * @param searchOrgsRequest + */ + searchOrgs(searchOrgsRequest: SearchOrgsRequest, _options?: Configuration): Promise; + /** + * Version: 9.5.0.cl or later Gets a list of Role objects from the ThoughtSpot system. Available if [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance. To search for Roles, the `ROLE_ADMINISTRATION` (**Can manage roles**) privilege is required. To get details of a specific Role object, specify the GUID or name. You can also filter the API response based on user group and Org identifiers, privileges assigned to the Role, and deprecation status. + * @param searchRolesRequest + */ + searchRoles(searchRolesRequest: SearchRolesRequest, _options?: Configuration): Promise; + /** + * Search Schedules Version: 9.4.0.cl or later Gets a list of scheduled jobs configured for a Liveboard. To get details of a specific scheduled job, specify the name or GUID of the scheduled job. Requires at least view access to Liveboards. **NOTE**: When filtering schedules by parameters other than `metadata`, set `record_size` to `-1` and `record_offset` to `0` for accurate results. + * @param searchSchedulesRequest + */ + searchSchedules(searchSchedulesRequest: SearchSchedulesRequest, _options?: Configuration): Promise; + /** + * Version: 26.2.0.cl or later Fetch security settings for your ThoughtSpot application instance. - Use `scope: CLUSTER` to retrieve cluster-level security settings, including CORS and CSP allowlists, SAML redirect URLs, and settings that control access to non-embedded pages. - Use `scope: ORG` to retrieve Org-level security settings. If your instance has [Orgs](https://docs.thoughtspot.com/cloud/latest/orgs-overview), this returns CORS and non-embed access settings specific to the Org. - If `scope` is not specified, returns both cluster and Org-specific settings based on user privileges. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) or `DEVELOPER` (**Has developer privilege**) privilege. See [Security Settings](https://developers.thoughtspot.com/docs/security-settings) for more details. + * @param searchSecuritySettingsRequest + */ + searchSecuritySettings(searchSecuritySettingsRequest: SearchSecuritySettingsRequest, _options?: Configuration): Promise; + /** + * Version: 9.0.0.cl or later Gets a list of tag objects available on the ThoughtSpot system. To get details of a specific tag object, specify the GUID or name. Any authenticated user can search for tag objects. + * @param searchTagsRequest + */ + searchTags(searchTagsRequest: SearchTagsRequest, _options?: Configuration): Promise; + /** + * Version: 9.0.0.cl or later Gets a list of user group objects from the ThoughtSpot system. To get details of a specific user group, specify the user group GUID or name. You can also filter the API response based on User ID, Org ID, Role ID, type of group, sharing visibility, privileges assigned to the group, and the Liveboard IDs assigned to the users in the group. Available to all users. Users with `ADMINISTRATION` (**Can administer ThoughtSpot**) privileges can view all users properties. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `GROUP_ADMINISTRATION` (**Can manage groups**) privilege is required. **NOTE**: If you do not get precise results, try setting `record_size` to `-1` and `record_offset` to `0`. + * @param searchUserGroupsRequest + */ + searchUserGroups(searchUserGroupsRequest: SearchUserGroupsRequest, _options?: Configuration): Promise; + /** + * Version: 9.0.0.cl or later Gets a list of users available on the ThoughtSpot system. To get details of a specific user, specify the user GUID or name. You can also filter the API response based on groups, Org ID, user visibility, account status, user type, and user preference settings and favorites. Available to all users. Users with `ADMINISTRATION` (**Can administer ThoughtSpot**) privileges can view all users properties. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `USER_ADMINISTRATION` (**Can manage users**) privilege is required. **NOTE**: If the API returns an empty list, consider increasing the value of the `record_size` parameter. To search across all available users, set `record_size` to `-1`. + * @param searchUsersRequest + */ + searchUsers(searchUsersRequest: SearchUsersRequest, _options?: Configuration): Promise; + /** + * Search variables Version: 26.4.0.cl or later Allows searching for variables in ThoughtSpot. Requires ADMINISTRATION role. The CAN_MANAGE_VARIABLES permission allows you to manage Formula Variables in the current organization scope. The API endpoint supports searching variables by: * Variable identifier (ID or name) * Variable type * Name pattern (case-insensitive, supports % for wildcard) The search results can be formatted in three ways: * METADATA - Returns only variable metadata (default) * METADATA_AND_VALUES - Returns variable metadata and values The values can be filtered by scope: * org_identifier * principal_identifier * model_identifier + * @param searchVariablesRequest + */ + searchVariables(searchVariablesRequest: SearchVariablesRequest, _options?: Configuration): Promise; + /** + * Version: 10.14.0.cl or later Searches for webhook configurations based on various criteria such as Org, webhook identifier, event type, with support for pagination and sorting. Returns matching webhook configurations with their complete details. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) or `DEVELOPER` (**Has developer privilege**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, users with `CAN_MANAGE_WEBHOOKS` (**Can manage webhooks**) privilege are also authorized to perform this action. + * @param searchWebhookConfigurationsRequest + */ + searchWebhookConfigurations(searchWebhookConfigurationsRequest: SearchWebhookConfigurationsRequest, _options?: Configuration): Promise; + /** + * Version: 26.5.0.cl or later Sends natural language messages to an existing Spotter agent conversation and returns the complete response synchronously. Requires `CAN_USE_SPOTTER` privilege and access to the metadata object associated with the conversation. The user must have access to the conversation session referenced by `conversation_identifier`. A conversation must first be created using the `createAgentConversation` API. #### Usage guidelines The request must include: - `conversation_identifier`: the unique session ID returned by `createAgentConversation`, used for context continuity and message tracking - `messages`: an array of one or more text messages to send to the agent The API returns an array of response objects, each containing: - `type`: the kind of response — `text`, `answer`, or `error` - `message`: the main content of the response - `metadata`: additional information depending on the message type (e.g., answer metadata includes analytics and visualization details) #### Error responses | Code | Description | |------|----------------------------------------------------------------------------------------------------------------------------------| | 401 | Unauthorized — authentication token is missing, expired, or invalid. | | 403 | Forbidden — the authenticated user does not have `CAN_USE_SPOTTER` privilege or lacks permission on the referenced conversation. | > ###### Note: > > - This endpoint is Generally Available from version 26.5.0.cl. > - This endpoint requires Spotter - please contact ThoughtSpot support to enable Spotter on your cluster. > - For real-time streamed responses, use `sendAgentConversationMessageStreaming` instead. + * @param conversationIdentifier Unique identifier for the conversation (used to track context) + * @param sendAgentConversationMessageRequest + */ + sendAgentConversationMessage(conversationIdentifier: string, sendAgentConversationMessageRequest: SendAgentConversationMessageRequest, _options?: Configuration): Promise; + /** + * Version: 26.5.0.cl or later Sends one or more natural language messages to an existing Spotter agent conversation and returns the response as a real-time Server-Sent Events stream. Requires `CAN_USE_SPOTTER` privilege and access to the metadata object associated with the conversation. The user must have access to the conversation session referenced by `conversation_identifier`. A conversation must first be created using the `createAgentConversation` API. #### Usage guidelines The request must include: - `conversation_identifier`: the unique session ID returned by `createAgentConversation`, used for context continuity and message tracking - `messages`: an array of one or more text messages to send to the agent If the request is valid, the API returns a Server-Sent Events (SSE) stream. Each line has the form `data: [{\"type\": \"...\", ...}]` — a JSON array of event objects. Event types include: - `ack`: confirms receipt of the request (`node_id`) - `conv_title`: conversation title (`title`, `conv_id`) - `notification`: status updates on operations (`group_id`, `metadata`, `code` — e.g. `TOOL_CALL_NOTIFICATION`, `nls_start`, `FINAL_RESPONSE_NOTIFICATION`) - `text-chunk`: incremental content chunks (`id`, `group_id`, `metadata` with `format` and `type` such as `thinking` or `text`, `content`) - `text`: full text block with same structure as `text-chunk` - `answer`: structured answer with metadata (`id`, `group_id`, `metadata` with `sage_query`, `session_id`, `title`, etc., `title`) - `error`: if a failure occurs #### Error responses | Code | Description | | ---- | -------------------------------------------------------------------------------------------------------------------------------- | | 401 | Unauthorized — authentication token is missing, expired, or invalid. | | 403 | Forbidden — the authenticated user does not have `CAN_USE_SPOTTER` privilege or lacks permission on the referenced conversation. | > ###### Note: > > - This endpoint is Generally Available from version 26.5.0.cl. > - This endpoint requires Spotter - please contact ThoughtSpot support to enable Spotter on your cluster. > - The streaming protocol uses Server-Sent Events (SSE). > - For the complete response in a single payload, use `sendAgentConversationMessage` instead. + * @param conversationIdentifier Unique identifier for the conversation (used to track context) + * @param sendAgentConversationMessageStreamingRequest + */ + sendAgentConversationMessageStreaming(conversationIdentifier: string, sendAgentConversationMessageStreamingRequest: SendAgentConversationMessageStreamingRequest, _options?: Configuration): Promise; + /** + * Version: 26.2.0.cl or later **Deprecated** — Use `sendAgentConversationMessage` instead. Send natural language messages to an existing Spotter agent conversation and returns the complete response synchronously. Requires `CAN_USE_SPOTTER` privilege and access to the metadata object associated with the conversation. The user must have access to the conversation session referenced by `conversation_identifier`. A conversation must first be created using the `createAgentConversation` API. #### Usage guidelines The request must include: - `conversation_identifier`: the unique session ID returned by `createAgentConversation`, used for context continuity and message tracking - `messages`: an array of one or more text messages to send to the agent The API returns an array of response objects, each containing: - `type`: the kind of response — `text`, `answer`, or `error` - `message`: the main content of the response - `metadata`: additional information depending on the message type (e.g., answer metadata includes analytics and visualization details) #### Error responses | Code | Description | |------|----------------------------------------------------------------------------------------------------------------------------------| | 401 | Unauthorized — authentication token is missing, expired, or invalid. | | 403 | Forbidden — the authenticated user does not have `CAN_USE_SPOTTER` privilege or lacks permission on the referenced conversation. | > ###### Note: > > - This endpoint is deprecated. Use `sendAgentConversationMessage` for new integrations. > - This endpoint is currently in Beta. Breaking changes may be introduced before the endpoint is made Generally Available. > - This endpoint requires Spotter - please contact ThoughtSpot support to enable Spotter on your cluster. + * @param conversationIdentifier Unique identifier for the conversation (used to track context) + * @param sendAgentMessageRequest + */ + sendAgentMessage(conversationIdentifier: string, sendAgentMessageRequest: SendAgentMessageRequest, _options?: Configuration): Promise; + /** + * Version: 26.2.0.cl or later **Deprecated** — Use `sendAgentConversationMessageStreaming` instead. Sends one or more natural language messages to an existing Spotter agent conversation and returns the response as a real-time Server-Sent Events stream. Requires `CAN_USE_SPOTTER` privilege and access to the metadata object associated with the conversation. The user must have access to the conversation session referenced by `conversation_identifier`. A conversation must first be created using the `createAgentConversation` API. #### Usage guidelines The request must include: - `conversation_identifier`: the unique session ID returned by `createAgentConversation`, used for context continuity and message tracking - `messages`: an array of one or more text messages to send to the agent If the request is valid, the API returns a Server-Sent Events (SSE) stream. Each line has the form `data: [{\"type\": \"...\", ...}]` — a JSON array of event objects. Event types include: - `ack`: confirms receipt of the request (`node_id`) - `conv_title`: conversation title (`title`, `conv_id`) - `notification`: status updates on operations (`group_id`, `metadata`, `code` — e.g. `TOOL_CALL_NOTIFICATION`, `nls_start`, `FINAL_RESPONSE_NOTIFICATION`) - `text-chunk`: incremental content chunks (`id`, `group_id`, `metadata` with `format` and `type` such as `thinking` or `text`, `content`) - `text`: full text block with same structure as `text-chunk` - `answer`: structured answer with metadata (`id`, `group_id`, `metadata` with `sage_query`, `session_id`, `title`, etc., `title`) - `error`: if a failure occurs #### Error responses | Code | Description | |------|----------------------------------------------------------------------------------------------------------------------------------| | 401 | Unauthorized — authentication token is missing, expired, or invalid. | | 403 | Forbidden — the authenticated user does not have `CAN_USE_SPOTTER` privilege or lacks permission on the referenced conversation. | > ###### Note: > > - This endpoint is deprecated. Use `sendAgentConversationMessageStreaming` for new integrations. > - This endpoint is currently in Beta. Breaking changes may be introduced before the endpoint is made Generally Available. > - This endpoint requires Spotter - please contact ThoughtSpot support to enable Spotter on your cluster. > - The streaming protocol uses Server-Sent Events (SSE). + * @param sendAgentMessageStreamingRequest + */ + sendAgentMessageStreaming(sendAgentMessageStreamingRequest: SendAgentMessageStreamingRequest, _options?: Configuration): Promise; + /** + * Version: 10.4.0.cl or later Sends a follow-up message to an existing conversation within the context of a data model. Requires `CAN_USE_SPOTTER` privilege and at least view access to the metadata object specified in the request. A conversation must first be created using the `createConversation` API. #### Usage guidelines The request must include: - `conversation_identifier`: the unique session ID returned by `createConversation` - `metadata_identifier`: the unique ID of the data source used for the conversation - `message`: a natural language string with the follow-up question If the request is successful, the API returns an array of response messages, each containing: - `session_identifier`: the unique ID of the generated response - `generation_number`: the generation number of the response - `message_type`: the type of the response (e.g., `TSAnswer`) - `visualization_type`: the generated visualization type (`Chart`, `Table`, or `Undefined`) - `tokens` / `display_tokens`: the search tokens and user-friendly display tokens for the response #### Error responses | Code | Description | |------|-----------------------------------------------------------------------------------------------------------------------------------------| | 401 | Unauthorized — authentication token is missing, expired, or invalid. | | 403 | Forbidden — the authenticated user does not have `CAN_USE_SPOTTER` privilege or lacks view permission on the specified metadata object. | > ###### Note: > * This endpoint is currently in Beta. Breaking changes may be introduced before the endpoint is made Generally Available. > * This endpoint requires Spotter - please contact ThoughtSpot support to enable Spotter on your cluster. + * @param conversationIdentifier Unique identifier of the conversation. + * @param sendMessageRequest + */ + sendMessage(conversationIdentifier: string, sendMessageRequest: SendMessageRequest, _options?: Configuration): Promise; + /** + * Version: 10.15.0.cl or later This API allows users to set natural language (NL) instructions for a specific data-model to improve AI-generated answers and query processing. These instructions help guide the AI system to better understand the data context and provide more accurate responses. Requires `CAN_USE_SPOTTER` privilege, either edit access or `SPOTTER_COACHING_PRIVILEGE` on the data model, and a bearer token corresponding to the org where the data model exists. #### Usage guidelines To set NL instructions for a data-model, the request must include: - `data_source_identifier`: The unique ID of the data-model for which to set NL instructions - `nl_instructions_info`: An array of instruction objects, each containing: - `instructions`: Array of text instructions for the LLM - `scope`: The scope of the instruction (`GLOBAL`). Currently only `GLOBAL` is supported. It can be extended to data-model-user scope in future. #### Instructions scope - **GLOBAL**: instructions that apply to all users querying this data model If the request is successful, the API returns: - `success`: a boolean indicating whether the operation completed successfully #### Error responses | Code | Description | |------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| | 401 | Unauthorized — authentication token is missing, expired, or invalid. | | 403 | Forbidden — the authenticated user does not have `CAN_USE_SPOTTER` privilege, lacks edit access or `SPOTTER_COACHING_PRIVILEGE` on the data model, or the bearer token does not correspond to the org where the data model exists. | > ###### Note: > > - To use this API, the user needs either edit access or `SPOTTER_COACHING_PRIVILEGE` on the data model, and must use the bearer token corresponding to the org where the data model exists. > - This endpoint is currently in Beta. Breaking changes may be introduced before the endpoint is made Generally Available. > - Available from version 10.15.0.cl and later. > - This endpoint requires Spotter — please contact ThoughtSpot Support to enable Spotter on your cluster. > - Instructions help improve the accuracy and relevance of AI-generated responses for the specified data-model. + * @param setNLInstructionsRequest + */ + setNLInstructions(setNLInstructionsRequest: SetNLInstructionsRequest, _options?: Configuration): Promise; + /** + * Version: 9.0.0.cl or later Allows sharing one or several metadata objects with users and groups in ThoughtSpot. Requires edit access to the metadata object. #### Supported metadata objects: * Liveboards * Visualizations * Answers * Models * Views * Connections * Collections #### Object permissions You can provide `READ_ONLY` or `MODIFY` access when sharing an object with another user or group. The `READ_ONLY` permission grants view access to the shared object, whereas `MODIFY` provides edit access. To prevent a user or group from accessing the shared object, specify the GUID or name of the principal and set `shareMode` to `NO_ACCESS`. #### Sharing a visualization * Sharing a visualization implicitly shares the entire Liveboard with the recipient. * Object permissions set for a shared visualization also apply to the Liveboard unless overridden by another API request or via UI. * If email notifications for object sharing are enabled, a notification with a link to the shared visualization will be sent to the recipient’s email address. Although this link opens the shared visualization, recipients can also access other visualizations in the Liveboard. #### Sharing a collection Collections support **dual permissions** that provide fine-grained control: * **Collection permissions** (`share_mode`) - controls access to the collection itself (view, edit, delete the collection) * **Content permissions** (`content_share_mode`) - controls access to objects within the collection (view, edit objects inside) **Default Behavior:** - If only `share_mode` is specified, the content permissions default to `READ_ONLY` (except when `share_mode` is `NO_ACCESS`, then content also gets `NO_ACCESS`) - To give users edit access to collection contents, explicitly set `content_share_mode: \"MODIFY\"` ## Examples The following JSON examples can be copy-pasted as request bodies for the REST v2 API endpoint: ```bash POST /callosum/v1/v2/security/metadata/share Content-Type: application/x-www-form-urlencoded ``` ### Basic collection sharing Share a collection with read-only access: ```json { \"metadata_type\": \"COLLECTION\", \"metadata_identifiers\": [\"Sales Reports Collection\"], \"permissions\": [{ \"principal\": { \"type\": \"USER\", \"identifier\": \"alice@company.com\" }, \"share_mode\": \"READ_ONLY\" }], \"notification\": { \"message\": \"I\'ve shared the Sales Reports collection with you\", \"notify_on_share\": true } } ``` ### Collection sharing with dual permissions Share a collection with different permissions for the collection vs. its contents: ```json { \"metadata_type\": \"COLLECTION\", \"metadata_identifiers\": [\"Marketing Analytics\"], \"permissions\": [{ \"principal\": { \"type\": \"USER\", \"identifier\": \"bob@company.com\" }, \"share_mode\": \"MODIFY\", \"content_share_mode\": \"READ_ONLY\" }, { \"principal\": { \"type\": \"USER_GROUP\", \"identifier\": \"Marketing Team\" }, \"share_mode\": \"READ_ONLY\", \"content_share_mode\": \"READ_ONLY\" }], \"notification\": { \"emails\": [\"bob@company.com\"], \"message\": \"You can edit the collection but content is read-only\", \"enable_custom_url\": false, \"notify_on_share\": true }, \"has_lenient_discoverability\": false } ``` ### Multiple collections sharing Share multiple collections with different users: ```json { \"metadata\": [ { \"type\": \"COLLECTION\", \"identifier\": \"Q4 Reports\" }, { \"type\": \"COLLECTION\", \"identifier\": \"Executive Dashboard Collection\" } ], \"permissions\": [{ \"principal\": { \"type\": \"USER_GROUP\", \"identifier\": \"Executives\" }, \"share_mode\": \"MODIFY\" }, { \"principal\": { \"type\": \"USER\", \"identifier\": \"manager@company.com\" }, \"share_mode\": \"READ_ONLY\", \"content_share_mode\": \"MODIFY\" }], \"notification\": { \"message\": \"Sharing quarterly collections with leadership team\", \"notify_on_share\": true } } ``` ### Remove collection access Remove access to a collection by setting share_mode to NO_ACCESS: ```json { \"metadata_type\": \"COLLECTION\", \"metadata_identifiers\": [\"Confidential Reports\"], \"permissions\": [{ \"principal\": { \"type\": \"USER\", \"identifier\": \"former-employee@company.com\" }, \"share_mode\": \"NO_ACCESS\" }], \"notification\": { \"notify_on_share\": false } } ``` ### Collection Permission Scenarios **Scenario 1: Collection Admin** - `share_mode: MODIFY` + `content_share_mode: MODIFY` = Full control over collection and its contents **Scenario 2: Collection Curator** - `share_mode: MODIFY` + `content_share_mode: READ_ONLY` = Can manage collection structure but not edit contents **Scenario 3: Content Editor** - `share_mode: READ_ONLY` + `content_share_mode: MODIFY` = Can edit objects within collection but can\'t change collection itself **Scenario 4: Viewer** - `share_mode: READ_ONLY` + `content_share_mode: READ_ONLY` = View-only access to collection and contents + * @param shareMetadataRequest + */ + shareMetadata(shareMetadataRequest: ShareMetadataRequest, _options?: Configuration): Promise; + /** + * Version: 10.4.0.cl or later Processes a natural language query against a specified data model and returns a single AI-generated answer without requiring a conversation session. Requires `CAN_USE_SPOTTER` privilege and at least view access to the metadata object specified in the request. #### Usage guidelines The request must include: - `query`: a natural language question (e.g., \"What were total sales last quarter?\") - `metadata_identifier`: the unique ID of the data source to query against If the request is successful, the API returns a response message containing: - `session_identifier`: the unique ID of the generated response - `generation_number`: the generation number of the response - `message_type`: the type of the response (e.g., `TSAnswer`) - `visualization_type`: the generated visualization type (`Chart`, `Table`, or `Undefined`) - `tokens` / `display_tokens`: the search tokens and user-friendly display tokens for the response #### Error responses | Code | Description | |------|-----------------------------------------------------------------------------------------------------------------------------------------| | 401 | Unauthorized — authentication token is missing, expired, or invalid. | | 403 | Forbidden — the authenticated user does not have `CAN_USE_SPOTTER` privilege or lacks view permission on the specified metadata object. | > ###### Note: > * This endpoint is currently in Beta. Breaking changes may be introduced before the endpoint is made Generally Available. > * This endpoint requires Spotter - please contact ThoughtSpot support to enable Spotter on your cluster. + * @param singleAnswerRequest + */ + singleAnswer(singleAnswerRequest: SingleAnswerRequest, _options?: Configuration): Promise; + /** + * Stops an in-progress agent conversation response. Version: 26.6.0.cl or later Version: 26.6.0.cl or later Stops an in-progress agent response for the specified conversation. Use this endpoint to cancel a response that is actively being generated — for example, when the user navigates away, reformulates their question, or no longer needs the current result. Requires `CAN_USE_SPOTTER` privilege and access to the specified conversation. #### Usage guidelines The request must include: - `conversation_identifier` *(path parameter)*: the unique ID of the conversation whose active response should be stopped, as returned by `createAgentConversation` A successful request returns an empty `204 No Content` response. If there is no active response in progress at the time of the call, the request is still treated as successful. After stopping a response, the conversation session remains active. You can continue sending messages using `sendAgentConversationMessage` or `sendAgentConversationMessageStreaming`. #### Example request ```bash POST /api/rest/2.0/ai/agent/conversation/{conversation_identifier}/stop-response ``` #### Typical usage scenario This endpoint is useful when integrating Spotter into a chat UI where users can cancel a long-running query. For example: 1. User sends a message via `sendAgentConversationMessageStreaming`. 2. User clicks a \"Stop generating\" button while the response is streaming. 3. Your client calls `stopConversation` with the active `conversation_identifier`. 4. The stream is terminated and the user can ask a new question. #### Error responses | Code | Description | |------|-------------| | 401 | Unauthorized — authentication token is missing, expired, or invalid. | | 403 | Forbidden — the authenticated user does not have `CAN_USE_SPOTTER` privilege or lacks access to the specified conversation. | > ###### Note: > > - Calling this endpoint when no response is in progress does not return an error. > - The conversation context is preserved after stopping — previous messages and answers remain accessible. > - Available from version 26.6.0.cl and later. > - This endpoint requires Spotter — please contact ThoughtSpot Support to enable Spotter on your cluster. > - This feature is available only for **Spotter 3** (`SPOTTER3`) version. + * @param conversationIdentifier Unique identifier of the conversation to stop. + */ + stopConversation(conversationIdentifier: string, _options?: Configuration): Promise; + /** + * Version: 26.5.0.cl or later Synchronizes connection metadata attributes from your Cloud Data Warehouse (CDW) with ThoughtSpot. Requires the `DATAMANAGEMENT` (**Can manage data**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` (**Can manage data models**) privilege is required. #### Usage guidelines To synchronize attributes from a CDW, specify the connection GUID or name in the `connection_identifier` path parameter and `sync_attributes` in the request body. Default attribute is `[\"DESCRIPTION\"]`. ##### Hierarchical schema * Connection: The connection object for the sync operation. * Tables: Tables for the sync operation. When no table is specified, all tables are synchronized. * Columns: If the table is specified, you can add the columns for the sync operation. If no columns are specified, all columns in the specified table are considered for the sync operation. To set the scope for the sync operation: * Connection-level: To sync all tables and columns, pass an empty request body, or only the attributes in the request body. * Table-level: To synchronize specific tables and their columns, specify the table identifiers in the `tables` array. * Column-level: To synchronize specific columns, specify the table identifier as the key and column identifiers as the value in the `tables` array. ``` { \"tables\": [ {\"table-guid-1\": [\"column-guid-1\", \"column-guid-2\"]}, \"table-guid-2\" ], \"sync_attributes\": [\"DESCRIPTION\"] } ``` ##### API response If the sync operation is successful, the API returns the following information: * Status of the sync operation. For example, `SUCCESS`, `PARTIAL_SUCCESS`, or `NO_UPDATE`. * Number of tables and columns that were updated. * Number of tables and columns with the sync failed status when the overall sync status is `PARTIAL_SUCCESS`. * Message text indicating the sync results. + * @param connectionIdentifier Unique ID or name of the connection. + * @param syncMetadataRequest + */ + syncMetadata(connectionIdentifier: string, syncMetadataRequest: SyncMetadataRequest, _options?: Configuration): Promise; + /** + * Version: 9.0.0.cl or later Removes the tags applied to a Liveboard, Answer, Table, or Worksheet. Requires edit access to the metadata object. + * @param unassignTagRequest + */ + unassignTag(unassignTagRequest: UnassignTagRequest, _options?: Configuration): Promise; + /** + * Remove parameterization from fields in metadata objects. Version: 26.5.0.cl or later Allows removing parameterization from fields in metadata objects in ThoughtSpot. Requires appropriate permissions to modify the metadata object. The API endpoint allows unparameterizing the following types of metadata objects: * Logical Tables * Connections * Connection Configs For a Logical Table the field type must be `ATTRIBUTE` and field name can be one of: * databaseName * schemaName * tableName For a Connection or Connection Config, the field type is always `CONNECTION_PROPERTY`. In this case, field_name specifies the exact property of the Connection or Connection Config that needs to be unparameterized. For Connection Config, the only supported field name is: * impersonate_user + * @param unparameterizeMetadataRequest + */ + unparameterizeMetadata(unparameterizeMetadataRequest: UnparameterizeMetadataRequest, _options?: Configuration): Promise; + /** + * Version: 26.5.0.cl or later Allows unpublishing metadata objects from organizations in ThoughtSpot. Requires ADMINISTRATION role and TENANT scope. The API endpoint allows unpublishing the following types of metadata objects: * Liveboards * Answers * Logical Tables When unpublishing objects, you can: * Include dependencies by setting `include_dependencies` to true - this will unpublish all dependent objects if no other published object is using them * Force unpublish by setting `force` to true - this will break all dependent objects in the unpublished organizations + * @param unpublishMetadataRequest + */ + unpublishMetadata(unpublishMetadataRequest: UnpublishMetadataRequest, _options?: Configuration): Promise; + /** + * Version: 10.12.0.cl or later Updates the properties of a [custom calendar](https://docs.thoughtspot.com/cloud/latest/connections-cust-cal). Requires `DATAMANAGEMENT` (**Can manage data**) or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your ThoughtSpot instance, the `CAN_MANAGE_CUSTOM_CALENDAR` (**Can manage custom calendars**) privilege is required. #### Usage guidelines You can update the properties of a calendar using one of the following methods: * `FROM_INPUT_PARAMS` to update the calendar properties with the values defined in the API request. * `FROM_EXISTING_TABLE` Creates a calendar from the parameters defined in the API request. To update a custom calendar, specify the calendar ID as a path parameter in the request URL and the following parameters in the request body: * Connection ID and Table name * Database and schema name attributes: For most Cloud Data Warehouse (CDW) connectors, both `database_name` and `schema_name` attributes are required. However, the attribute requirements are conditional and vary based on the connector type and its metadata structure. For example, for connectors such as Teradata, MySQL, SingleSore, Amazon Aurora MySQL, Amazon RDS MySQL, Oracle, and GCP_MYSQL, the `schema_name` is required, whereas the `database_name` attribute is not. Similarly, connectors such as ClickHouse require you to specify the `database_name` and the schema specification in such cases is optional. The API allows you to modify the calendar type, month offset value, start and end date, starting day of the week, and prefixes assigned to the year and quarter labels. #### Examples Update a custom calendar using an existing Table in ThoughtSpot: ``` { \"update_method\": \"FROM_EXISTING_TABLE\", \"table_reference\": { \"connection_identifier\": \"Connection1\", \"database_name\": \"db1\", \"table_name\": \"custom_calendar_2025\", \"schame_name\": \"schemaVar\" } } ``` Update a custom calendar with the attributes defined in the API request: ``` { \"update_method\": \"FROM_INPUT_PARAMS\", \"table_reference\": { \"connection_identifier\": \"Connection1\", \"database_name\": \"db1\", \"table_name\": \"custom_calendar_2025\", \"schame_name\": \"schemaVar\" }, \"month_offset\": \"August\", \"start_day_of_week\": \"Monday\", \"start_date\": \"08/01/2025\", \"end_date\": \"07/31/2026\" } ``` + * @param calendarIdentifier Unique Id or name of the calendar. + * @param updateCalendarRequest + */ + updateCalendar(calendarIdentifier: string, updateCalendarRequest: UpdateCalendarRequest, _options?: Configuration): Promise; + /** + * Version: 26.4.0.cl or later Updates an existing collection in ThoughtSpot. #### Supported operations This API endpoint lets you perform the following operations: * Update collection name and description * Change visibility settings * Add metadata objects to the collection (operation: ADD) * Remove metadata objects from the collection (operation: REMOVE) * Replace all metadata objects in the collection (operation: REPLACE) #### Operation types * **ADD**: Adds the specified metadata objects to the existing collection without removing current items * **REMOVE**: Removes only the specified metadata objects from the collection * **REPLACE**: Replaces all existing metadata objects with the specified items (default behavior) + * @param collectionIdentifier Unique GUID of the collection. Note: Collection names cannot be used as identifiers since duplicate names are allowed. + * @param updateCollectionRequest + */ + updateCollection(collectionIdentifier: string, updateCollectionRequest: UpdateCollectionRequest, _options?: Configuration): Promise; + /** + * Version: 10.12.0.cl or later Creates, updates, or deletes column security rules for specified tables. This API endpoint allows you to create, update, or delete column-level security rules on columns of a table. The operation follows an \"all or none\" policy: if defining security rules for any of the provided columns fails, the entire operation will be rolled back, and no rules will be created. #### Usage guidelines - Provide table identifier using either `identifier` (GUID or name) or `obj_identifier` (object ID) - Use `clear_csr: true` to remove all column security rules from the table - For each column, specify the security rule using `column_security_rules` array - Use `is_unsecured: true` to mark a specific column as unprotected - Use `group_access` operations to manage group associations: - `ADD`: Add groups to the column\'s access list - `REMOVE`: Remove groups from the column\'s access list - `REPLACE`: Replace all existing groups with the specified groups #### Required permissions - `ADMINISTRATION` - Can administer ThoughtSpot - `DATAMANAGEMENT` - Can manage data (if RBAC is disabled) - `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` - Can manage worksheet views and tables (if RBAC is enabled) #### Example request ```json { \"identifier\": \"table-guid\", \"obj_identifier\": \"table-object-id\", \"clear_csr\": false, \"column_security_rules\": [ { \"column_identifier\": \"col id or col name\", \"is_unsecured\": false, \"group_access\": [ { \"operation\": \"ADD\", \"group_identifiers\": [\"hr_group_id\", \"hr_group_name\", \"finance_group_id\"] } ] }, { \"column_identifier\": \"col id or col name\", \"is_unsecured\": true }, { \"column_identifier\": \"col id or col name\", \"is_unsecured\": false, \"group_access\": [ { \"operation\": \"REPLACE\", \"group_identifiers\": [\"management_group_id\", \"management_group_name\"] } ] } ] } ``` #### Request Body Schema - `identifier` (string, optional): GUID or name of the table for which we want to create column security rules - `obj_identifier` (string, optional): The object ID of the table - `clear_csr` (boolean, optional): If true, then all the secured columns will be marked as unprotected, and all the group associations will be removed - `column_security_rules` (array of objects, required): An array where each object defines the security rule for a specific column Each column security rule object contains: - `column_identifier` (string, required): Column identifier (col_id or name) - `is_unsecured` (boolean, optional): If true, the column will be marked as unprotected and all groups associated with it will be removed - `group_access` (array of objects, optional): Array of group operation objects Each group operation object contains: - `operation` (string, required): Operation type - ADD, REMOVE, or REPLACE - `group_identifiers` (array of strings, required): Array of group identifiers (name or GUID) on which the operation will be performed #### Response This API does not return any response body. A successful operation returns HTTP 200 status code. #### Operation Types - **ADD**: Adds the specified groups to the column\'s access list - **REMOVE**: Removes the specified groups from the column\'s access list - **REPLACE**: Replaces all existing groups with the specified groups + * @param updateColumnSecurityRulesRequest + */ + updateColumnSecurityRules(updateColumnSecurityRulesRequest: UpdateColumnSecurityRulesRequest, _options?: Configuration): Promise; + /** + * Version: 9.2.0.cl or later Updates Git repository configuration settings. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance on your instance, the `CAN_SETUP_VERSION_CONTROL` (**Can set up version control**) privilege. + * @param updateConfigRequest + */ + updateConfig(updateConfigRequest: UpdateConfigRequest, _options?: Configuration): Promise; + /** + * Version: 9.2.0.cl or later **Important**: This endpoint is deprecated and will be removed from ThoughtSpot in September 2025. ThoughtSpot strongly recommends using the [Update connection V2](#/http/api-endpoints/connections/update-connection-v2) endpoint to update your connection objects. #### Usage guidelines Updates a connection object. Requires `DATAMANAGEMENT` (**Can manage data**) and edit permissions to the connection object, or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) privilege is required. To update a connection object, pass these parameters in your API request: 1. GUID of the connection object. 2. If you are updating tables or database schema of a connection object: a. Add the updated JSON map of metadata with database, schema, and tables in `data_warehouse_config`. b. Set `validate` to `true`. 3. If you are updating a configuration attribute, connection name, or description, you can set `validate` to `false`. + * @param updateConnectionRequest + */ + updateConnection(updateConnectionRequest: UpdateConnectionRequest, _options?: Configuration): Promise; + /** + * Version: 10.12.0.cl or later Updates a connection configuration object. Requires `DATAMANAGEMENT` (**Can manage data**) and edit permissions to the connection object, or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) privilege is required. #### Supported operations This API endpoint lets you perform the following operations in a single API request: * Edit the name or description of the configuration * Edit the configuration properties * Edit the `policy_type` * Edit the type of authentication * Enable or disable a configuration #### Parameterized Connection Support For parameterized oauth based connections, only the `same_as_parent` and `policy_process_options` attributes are allowed. These attributes are not applicable to connections that are not parameterized. **NOTE**: When updating a configuration where `disabled` is `true`, you must reset `disabled` to `true` in your update request payload. If not explicitly set again, the API will default `disabled` to `false`. + * @param configurationIdentifier Unique ID or name of the configuration. + * @param updateConnectionConfigurationRequest + */ + updateConnectionConfiguration(configurationIdentifier: string, updateConnectionConfigurationRequest: UpdateConnectionConfigurationRequest, _options?: Configuration): Promise; + /** + * Version: 26.6.0.cl or later Activates or deactivates a connection. A deactivated connection cannot be used for queries or operations until it is activated again. Requires `DATAMANAGEMENT` (**Can manage data**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) privilege is required. Only the connection owner or an administrator can perform this operation. #### Usage guidelines To update the status of a connection, specify the connection GUID or name in the `connection_identifier` path parameter and the desired `status` in the request body. - **ACTIVATED**: Enables the connection. Queries and operations can resume on an activated connection. - **DEACTIVATED**: Disables the connection. It does not remove the connection metadata, but only makes the connection unavailable for queries and operations. You can reactivate a deactivated connection by setting \"status\": \"ACTIVATED\". + * @param connectionIdentifier Unique ID or name of the connection. + * @param updateConnectionStatusRequest + */ + updateConnectionStatus(connectionIdentifier: string, updateConnectionStatusRequest: UpdateConnectionStatusRequest, _options?: Configuration): Promise; + /** + * Version: 10.4.0.cl or later Updates a connection object. Requires `DATAMANAGEMENT` (**Can manage data**) and edit permissions to the connection object, or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) privilege is required. To update a connection object, pass these parameters in your API request: 1. GUID of the connection object. 2. If you are updating tables or database schema of a connection object: a. Add the updated JSON map of metadata with database, schema, and tables in `data_warehouse_config`. b. Set `validate` to `true`. **NOTE:** If the `authentication_type` is anything other than SERVICE_ACCOUNT, you must explicitly provide the authenticationType property in the payload. If you do not specify authenticationType, the API will default to SERVICE_ACCOUNT as the authentication type. * A JSON map of configuration attributes, database details, and table properties in `data_warehouse_config` as shown in the following example: * This is an example of updating a single table in a empty connection: ``` { \"authenticationType\": \"SERVICE_ACCOUNT\", \"externalDatabases\": [ { \"name\": \"DEVELOPMENT\", \"isAutoCreated\": false, \"schemas\": [ { \"name\": \"TS_dataset\", \"tables\": [ { \"name\": \"DEMORENAME\", \"type\": \"TABLE\", \"description\": \"\", \"selected\": true, \"linked\": true, \"gid\": 0, \"datasetId\": \"-1\", \"subType\": \"\", \"reportId\": \"\", \"viewId\": \"\", \"columns\": [ { \"name\": \"Col1\", \"type\": \"VARCHAR\", \"canImport\": true, \"selected\": true, \"description\": \"\", \"isLinkedActive\": true, \"isAggregate\": false }, { \"name\": \"Col2\", \"type\": \"VARCHAR\", \"canImport\": true, \"selected\": true, \"description\": \"\", \"isLinkedActive\": true, \"isAggregate\": false }, { \"name\": \"Col3\", \"type\": \"VARCHAR\", \"canImport\": true, \"selected\": true, \"description\": \"\", \"isLinkedActive\": true, \"isAggregate\": false }, { \"name\": \"Col312\", \"type\": \"VARCHAR\", \"canImport\": true, \"selected\": true, \"description\": \"\", \"isLinkedActive\": true, \"isAggregate\": false }, { \"name\": \"Col4\", \"type\": \"VARCHAR\", \"canImport\": true, \"selected\": true, \"description\": \"\", \"isLinkedActive\": true, \"isAggregate\": false } ], \"relationships\": [] } ] } ] } ], \"configuration\": { \"password\": \"\", \"database\": \"DEVELOPMENT\", \"role\": \"DEV\", \"accountName\": \"thoughtspot_partner\", \"warehouse\": \"DEMO_WH\", \"user\": \"DEV_USER\" } } ``` * This is an example of updating a single table in an existing connection with tables: ``` { \"authenticationType\": \"SERVICE_ACCOUNT\", \"externalDatabases\": [ { \"name\": \"DEVELOPMENT\", \"isAutoCreated\": false, \"schemas\": [ { \"name\": \"TS_dataset\", \"tables\": [ { \"name\": \"CUSTOMER\", \"type\": \"TABLE\", \"description\": \"\", \"selected\": true, \"linked\": true, \"gid\": 0, \"datasetId\": \"-1\", \"subType\": \"\", \"reportId\": \"\", \"viewId\": \"\", \"columns\": [], \"relationships\": [] }, { \"name\": \"tpch5k_falcon_default_schema_users\", \"type\": \"TABLE\", \"description\": \"\", \"selected\": true, \"linked\": true, \"gid\": 0, \"datasetId\": \"-1\", \"subType\": \"\", \"reportId\": \"\", \"viewId\": \"\", \"columns\": [ { \"name\": \"user_id\", \"type\": \"INT64\", \"canImport\": true, \"selected\": true, \"description\": \"\", \"isLinkedActive\": true, \"isAggregate\": false }, { \"name\": \"product_id\", \"type\": \"INT64\", \"canImport\": true, \"selected\": true, \"description\": \"\", \"isLinkedActive\": true, \"isAggregate\": false }, { \"name\": \"user_cost\", \"type\": \"INT64\", \"canImport\": true, \"selected\": true, \"description\": \"\", \"isLinkedActive\": true, \"isAggregate\": false } ], \"relationships\": [] } ] } ] } ], \"configuration\": { \"password\": \"\", \"database\": \"DEVELOPMENT\", \"role\": \"DEV\", \"accountName\": \"thoughtspot_partner\", \"warehouse\": \"DEMO_WH\", \"user\": \"DEV_USER\" } } ``` 3. If you are updating a configuration attribute, connection name, or description, you can set `validate` to `false`. **NOTE:** If the `authentication_type` is anything other than SERVICE_ACCOUNT, you must explicitly provide the authenticationType property in the payload. If you do not specify authenticationType, the API will default to SERVICE_ACCOUNT as the authentication type. * A JSON map of configuration attributes in `data_warehouse_config`. The following example shows the configuration attributes for a Snowflake connection: ``` { \"configuration\":{ \"accountName\":\"thoughtspot_partner\", \"user\":\"tsadmin\", \"password\":\"TestConn123\", \"role\":\"sysadmin\", \"warehouse\":\"MEDIUM_WH\" }, \"externalDatabases\":[ ] } ``` + * @param connectionIdentifier Unique ID or name of the connection. + * @param updateConnectionV2Request + */ + updateConnectionV2(connectionIdentifier: string, updateConnectionV2Request: UpdateConnectionV2Request, _options?: Configuration): Promise; + /** + * Version: 9.6.0.cl or later Updates a custom action. Requires `DEVELOPER` (**Has Developer privilege**) or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `DEVELOPER` (**Has developer privilege**) privilege is required. #### Usage Guidelines The API allows you to modify the following properties: * Name of the custom action * Action availability to groups * Association to metadata objects * Authentication settings for a URL-based action For more information, see [Custom actions](https://developers.thoughtspot.com/docs/custom-action-intro). + * @param customActionIdentifier Unique ID or name of the custom action. + * @param updateCustomActionRequest + */ + updateCustomAction(customActionIdentifier: string, updateCustomActionRequest: UpdateCustomActionRequest, _options?: Configuration): Promise; + /** + * Version: 9.9.0.cl or later Updates a DBT connection object. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege or `DATAMANAGEMENT` (**Can manage data ThoughtSpot**) privilege, along with an existing DBT connection. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the following data control privileges may be required: - `CAN_MANAGE_CUSTOM_CALENDAR`(**Can manage custom calendars**) - `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) - `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` (**Can manage data models**) #### About update DBT connection You can modify DBT connection object properties such as embrace connection name, embrace database name, import type, account identifier, access token, project identifier and environment (or) embrace connection, embrace database name, import type, file_content settings. + * @param dbtConnectionIdentifier Unique ID of the DBT Connection. + * @param connectionName Name of the connection. + * @param databaseName Name of the Database. + * @param importType Mention type of Import + * @param accessToken Access token is mandatory when Import_Type is DBT_CLOUD. + * @param dbtUrl DBT URL is mandatory when Import_Type is DBT_CLOUD. + * @param accountId Account ID is mandatory when Import_Type is DBT_CLOUD + * @param projectId Project ID is mandatory when Import_Type is DBT_CLOUD + * @param dbtEnvId DBT Environment ID\\\" + * @param projectName Name of the project + * @param fileContent Upload DBT Manifest and Catalog artifact files as a ZIP file. This field is Mandatory when Import Type is \\\'ZIP_FILE\\\' + */ + updateDbtConnection(dbtConnectionIdentifier: string, connectionName?: string, databaseName?: string, importType?: string, accessToken?: string, dbtUrl?: string, accountId?: string, projectId?: string, dbtEnvId?: string, projectName?: string, fileContent?: HttpFile, _options?: Configuration): Promise; + /** + * Version: 10.12.0.cl or later Updates a customization configuration for the notification email. #### Pre-requisites Requires `DEVELOPER` (**has developer privilege**) or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `DEVELOPER` (**Has developer privilege**) privilege is required. **NOTE**:This endpoint in currently in beta. Contact ThoughtSpot support to enable this on your instance. #### Usage guidelines To update a custom configuration pass these parameters in your API request: - A JSON map of configuration attributes `template_properties`. The following example shows a sample set of customization configuration: ``` { { \"cta_button_bg_color\": \"#444DEA\", \"cta_text_font_color\": \"#FFFFFF\", \"primary_bg_color\": \"#D3DEF0\", \"logo_url\": \"https://storage.pardot.com/710713/1642089901EbkRibJq/TS_fullworkmark_darkmode.png\", \"font_family\": \"\", \"product_name\": \"ThoughtSpot\", \"footer_address\": \"444 Castro St, Suite 1000 Mountain View, CA 94041\", \"footer_phone\": \"(800) 508-7008\", \"replacement_value_for_liveboard\": \"Dashboard\", \"replacement_value_for_answer\": \"Chart\", \"replacement_value_for_spot_iq\": \"AI Insights\", \"hide_footer_phone\": false, \"hide_footer_address\": false, \"hide_product_name\": false, \"hide_manage_notification\": false, \"hide_mobile_app_nudge\": false, \"hide_privacy_policy\": false, \"hide_ts_vocabulary_definitions\": false, \"hide_error_message\": false, \"hide_unsubscribe_link\": false, \"hide_notification_status\": false, \"hide_modify_alert\": false, \"company_website_url\": \"https://your-website.com/\", \"company_privacy_policy_url\" : \"https://link-to-privacy-policy.com/\", \"contact_support_url\": \"https://link-to-contact-support.com/\", \"hide_contact_support_url\": false, \"hide_logo_url\" : false } } ``` + * @param updateEmailCustomizationRequest + */ + updateEmailCustomization(updateEmailCustomizationRequest: UpdateEmailCustomizationRequest, _options?: Configuration): Promise; + /** + * Update header attributes for a given list of header objects. Version: 10.6.0.cl or later ## Prerequisites - **Privileges Required:** - `DATAMANAGEMENT` (Can manage data) or `ADMINISTRATION` (Can administer ThoughtSpot). - **Additional Privileges (if RBAC is enabled):** - `ORG_ADMINISTRATION` (Can manage orgs). --- ## Usage Guidelines ### Parameters 1. **headers_update** - **Description:** List of header objects with their attributes to be updated. Each object contains a list of attributes to be updated in the header. - **Usage:** - You must provide either `identifier` or `obj_identifier`, but not both. Both fields cannot be empty. - When `org_identifier` is set to `-1`, only the `identifier` value is accepted; `obj_identifier` is not allowed. 2. **org_identifier** - **Description:** GUID (Globally Unique Identifier) or name of the organization. - **Usage:** - Leaving this field empty assumes that the changes should be applied to the current organization - Provide `org_guid` or `org_name` to uniquely identify the organization where changes need to be applied. . - Provide `-1` if changes have to be applied across all the org. --- ## Note Currently, this API is enabled only for updating the `obj_identifier` attribute. Only `text` will be allowed in attribute\'s value. ## Best Practices 1. **Backup Before Conversion:** Always export metadata as a backup before initiating the update process --- ## Examples ### Only `identifier` is given ```json { \"headers_update\": [ { \"identifier\": \"guid_1\", \"obj_identifier\": \"\", \"type\": \"LOGICAL_COLUMN\", \"attributes\": [ { \"name\": \"obj_id\", \"value\": \"custom_object_id\" } ] } ], \"org_identifier\": \"orgGuid\" } ``` ### Only `obj_identifier` is given ```json { \"headers_update\": [ { \"obj_identifier\": \"custom_object_id\", \"type\": \"ANSWER\", \"attributes\": [ { \"name\": \"obj_id\", \"value\": \"custom_object_id\" } ] } ], \"org_identifier\": \"orgName\" } ``` ### Executing update for all org `-1` ```json { \"headers_update\": [ { \"identifier\": \"guid_1\", \"type\": \"ANSWER\", \"attributes\": [ { \"name\": \"obj_id\", \"value\": \"custom_object_id\" } ] } ], \"org_identifier\": -1 } ``` ### Optional `type` is not provided ```json { \"headers_update\": [ { \"identifier\": \"guid_1\", \"attributes\": [ { \"name\": \"obj_id\", \"value\": \"custom_object_id\" } ] } ], \"org_identifier\": -1 } ``` + * @param updateMetadataHeaderRequest + */ + updateMetadataHeader(updateMetadataHeaderRequest: UpdateMetadataHeaderRequest, _options?: Configuration): Promise; + /** + * Update object IDs for given metadata objects. Version: 10.8.0.cl or later ## Prerequisites - **Privileges Required:** - `DATAMANAGEMENT` (Can manage data) or `ADMINISTRATION` (Can administer ThoughtSpot). - **Additional Privileges (if RBAC is enabled):** - `ORG_ADMINISTRATION` (Can manage orgs). --- ## Usage Guidelines ### Parameters 1. **metadata** - **Description:** List of metadata objects to update their object IDs. - **Usage:** - Use either `current_obj_id` alone OR use `metadata_identifier` with `type` (when needed). - When using `metadata_identifier`, the `type` field is required if using a name instead of a GUID. - The `new_obj_id` field is always required. --- ## Note This API is specifically designed for updating object IDs of metadata objects. It internally uses the header update mechanism to perform the changes. ## Best Practices 1. **Backup Before Update:** Always export metadata as a backup before initiating the update process. 2. **Validation:** - When using `current_obj_id`, ensure it matches the existing object ID exactly. - When using `metadata_identifier` with a name, ensure the `type` is specified correctly. - Verify that the `new_obj_id` follows your naming conventions and is unique within your system. --- ## Examples ### Using current_obj_id ```json { \"metadata\": [ { \"current_obj_id\": \"existing_object_id\", \"new_obj_id\": \"new_object_id\" } ] } ``` ### Using metadata_identifier with GUID ```json { \"metadata\": [ { \"metadata_identifier\": \"01234567-89ab-cdef-0123-456789abcdef\", \"new_obj_id\": \"new_object_id\" } ] } ``` ### Using metadata_identifier with name and type ```json { \"metadata\": [ { \"metadata_identifier\": \"My Answer\", \"type\": \"ANSWER\", \"new_obj_id\": \"new_object_id\" } ] } ``` ### Multiple objects update ```json { \"metadata\": [ { \"current_obj_id\": \"existing_object_id_1\", \"new_obj_id\": \"new_object_id_1\" }, { \"metadata_identifier\": \"My Worksheet\", \"type\": \"LOGICAL_TABLE\", \"new_obj_id\": \"new_object_id_2\" } ] } ``` + * @param updateMetadataObjIdRequest + */ + updateMetadataObjId(updateMetadataObjIdRequest: UpdateMetadataObjIdRequest, _options?: Configuration): Promise; + /** + * Version: 9.0.0.cl or later Updates an Org object. You can modify Org properties such as name, description, and user associations. Requires cluster administration (**Can administer Org**) privileges. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `ORG_ADMINISTRATION` (**Can manage Orgs**) privilege is required. + * @param orgIdentifier ID or name of the Org + * @param updateOrgRequest + */ + updateOrg(orgIdentifier: string, updateOrgRequest: UpdateOrgRequest, _options?: Configuration): Promise; + /** + * Version: 9.5.0.cl or later Updates the properties of a Role object. Available only if [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance. To update a Role, the `ROLE_ADMINISTRATION` (**Can manage roles**) privilege is required. + * @param roleIdentifier Unique ID or name of the Role. + * @param updateRoleRequest + */ + updateRole(roleIdentifier: string, updateRoleRequest: UpdateRoleRequest, _options?: Configuration): Promise; + /** + * Update schedule. Version: 9.4.0.cl or later Updates a scheduled Liveboard job. Requires at least edit access to Liveboards. To update a schedule on behalf of another user, you need `ADMINISTRATION` (**Can administer Org**) or `JOBSCHEDULING` (**Can schedule for others**) privilege and edit access to the Liveboard. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `JOBSCHEDULING` (**Can schedule for others**) privilege is required. The API endpoint allows you to pause a scheduled job, change the status of a paused job. You can also edit the recipients list, frequency of the job, format of the file to send to the recipients in email notifications, PDF options, and time zone setting. + * @param scheduleIdentifier Unique ID or name of the schedule. + * @param updateScheduleRequest + */ + updateSchedule(scheduleIdentifier: string, updateScheduleRequest: UpdateScheduleRequest, _options?: Configuration): Promise; + /** + * Version: 9.2.0.cl or later Updates the current configuration of the cluster. You must send the configuration data in JSON format. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privileges. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `APPLICATION_ADMINISTRATION` (**Can manage application settings**) privilege is required. + * @param updateSystemConfigRequest + */ + updateSystemConfig(updateSystemConfigRequest: UpdateSystemConfigRequest, _options?: Configuration): Promise; + /** + * Version: 9.0.0.cl or later Updates a tag object. You can modify the `name` and `color` properties of a tag object. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `TAGMANAGEMENT` (**Can manage tags**) privilege is required to create, edit, and delete tags. + * @param tagIdentifier Name or Id of the tag. + * @param updateTagRequest + */ + updateTag(tagIdentifier: string, updateTagRequest: UpdateTagRequest, _options?: Configuration): Promise; + /** + * Version: 9.0.0.cl or later Updates the properties of a user object. You can modify user properties such as username, email, and share notification settings. You can also assign new groups and Orgs, remove the user from a group or Org, reset password, and modify user preferences. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `USER_ADMINISTRATION` (**Can manage users**) privilege is required. + * @param userIdentifier GUID / name of the user + * @param updateUserRequest + */ + updateUser(userIdentifier: string, updateUserRequest: UpdateUserRequest, _options?: Configuration): Promise; + /** + * Version: 9.0.0.cl or later Updates the properties of a group object in ThoughtSpot. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `GROUP_ADMINISTRATION` (**Can manage groups**) privilege is required. #### Supported operations This API endpoint lets you perform the following operations in a single API request: * Edit [privileges](https://developers.thoughtspot.com/docs/?pageid=api-user-management#group-privileges) * Add or remove users * Change sharing visibility settings * Add or remove sub-groups * Assign a default Liveboard or update the existing settings + * @param groupIdentifier GUID or name of the group. + * @param updateUserGroupRequest + */ + updateUserGroup(groupIdentifier: string, updateUserGroupRequest: UpdateUserGroupRequest, _options?: Configuration): Promise; + /** + * Update a variable\'s name Version: 26.4.0.cl or later Allows updating a variable\'s name in ThoughtSpot. Requires ADMINISTRATION role and TENANT scope. The CAN_MANAGE_VARIABLES permission allows you to manage Formula Variables in the current organization scope. The API endpoint allows updating: * The variable name + * @param identifier Unique id or name of the variable to update. + * @param updateVariableRequest + */ + updateVariable(identifier: string, updateVariableRequest: UpdateVariableRequest, _options?: Configuration): Promise; + /** + * Update values for multiple variables Version: 10.14.0.cl or later **Note:** This API endpoint is deprecated and will be removed from ThoughtSpot in a future release. Use [POST /api/rest/2.0/template/variables/{identifier}/update-values](/api/rest/2.0/template/variables/%7Bidentifier%7D/update-values) instead. Allows updating values for multiple variables in ThoughtSpot. Requires ADMINISTRATION role. The CAN_MANAGE_VARIABLES permission allows you to manage Formula Variables in the current organization scope. The API endpoint allows: * Adding new values to variables * Replacing existing values * Deleting values from variables When updating variable values, you need to specify: * The variable identifiers * The values to add/replace/remove for each variable * The operation to perform (ADD, REPLACE, REMOVE, RESET) Behaviour based on operation type: * ADD - Adds values to the variable if this is a list type variable, else same as replace. * REPLACE - Replaces all values of a given set of constraints with the current set of values. * REMOVE - Removes any values which match the set of conditions of the variables if this is a list type variable, else clears value. * RESET - Removes all constrains for a given variable, scope is ignored + * @param updateVariableValuesRequest + */ + updateVariableValues(updateVariableValuesRequest: UpdateVariableValuesRequest, _options?: Configuration): Promise; + /** + * Version: 10.14.0.cl or later Updates an existing webhook configuration by its unique id or name. Only the provided fields will be updated. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) or `DEVELOPER` (**Has developer privilege**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, users with `CAN_MANAGE_WEBHOOKS` (**Can manage webhooks**) privilege are also authorized to perform this action. + * @param webhookIdentifier Unique ID or name of the webhook configuration. + * @param updateWebhookConfigurationRequest + */ + updateWebhookConfiguration(webhookIdentifier: string, updateWebhookConfigurationRequest: UpdateWebhookConfigurationRequest, _options?: Configuration): Promise; + /** + * Version: 26.4.0.cl or later Validates a communication channel configuration to ensure it is properly set up and can receive events. - Use `channel_type` to specify the type of communication channel to validate (e.g., WEBHOOK). - Use `channel_identifier` to provide the unique identifier or name for the communication channel. - Use `event_type` to specify the event type to validate for this channel. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) or `DEVELOPER` (**Has developer privilege**) privilege. For webhook channels, users with `CAN_MANAGE_WEBHOOKS` (**Can manage webhooks**) privilege are also authorized to perform this action. + * @param validateCommunicationChannelRequest + */ + validateCommunicationChannel(validateCommunicationChannelRequest: ValidateCommunicationChannelRequest, _options?: Configuration): Promise; + /** + * Version: 10.10.0.cl or later Validates the email customization configuration if any set for the ThoughtSpot system. #### Pre-requisites Requires `DEVELOPER` (**has developer privilege**) or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `DEVELOPER` (**Has developer privilege**) privilege is required. **NOTE**:This endpoint in currently in beta. Contact ThoughtSpot support to enable this on your instance. + */ + validateEmailCustomization(_options?: Configuration): Promise; + /** + * Version: 9.2.0.cl or later Validates the content of your source branch against the objects in your destination environment. Before merging content from your source branch to the destination branch, run this API operation from your destination environment and ensure that the changes from the source branch function in the destination environment. Requires `DATAMANAGEMENT` (**Can manage data**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance on your instance, the `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` (**Can manage data models**) privilege and edit access to the metadata objects. + * @param validateMergeRequest + */ + validateMerge(validateMergeRequest: ValidateMergeRequest, _options?: Configuration): Promise; + /** + * Version: 9.12.0.cl or later Validates the authentication token specified in the API request. If your token is not valid, [Get a new token](#/http/api-endpoints/authentication/get-full-access-token). + * @param validateTokenRequest + */ + validateToken(validateTokenRequest: ValidateTokenRequest, _options?: Configuration): Promise; +} +declare class ThoughtSpotRestApiResponseProcessor { + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to activateUser + * @throws ApiException if the response code was not in [200, 299] + */ + activateUser(response: ResponseContext): Promise; + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to assignChangeAuthor + * @throws ApiException if the response code was not in [200, 299] + */ + assignChangeAuthor(response: ResponseContext): Promise; + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to assignTag + * @throws ApiException if the response code was not in [200, 299] + */ + assignTag(response: ResponseContext): Promise; + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to changeUserPassword + * @throws ApiException if the response code was not in [200, 299] + */ + changeUserPassword(response: ResponseContext): Promise; + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to commitBranch + * @throws ApiException if the response code was not in [200, 299] + */ + commitBranch(response: ResponseContext): Promise; + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to configureAuthSettings + * @throws ApiException if the response code was not in [200, 299] + */ + configureAuthSettings(response: ResponseContext): Promise; + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to configureCommunicationChannelPreferences + * @throws ApiException if the response code was not in [200, 299] + */ + configureCommunicationChannelPreferences(response: ResponseContext): Promise; + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to configureSecuritySettings + * @throws ApiException if the response code was not in [200, 299] + */ + configureSecuritySettings(response: ResponseContext): Promise; + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to connectionConfigurationSearch + * @throws ApiException if the response code was not in [200, 299] + */ + connectionConfigurationSearch(response: ResponseContext): Promise>; + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to convertWorksheetToModel + * @throws ApiException if the response code was not in [200, 299] + */ + convertWorksheetToModel(response: ResponseContext): Promise; + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to copyObject + * @throws ApiException if the response code was not in [200, 299] + */ + copyObject(response: ResponseContext): Promise; + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to createAgentConversation + * @throws ApiException if the response code was not in [200, 299] + */ + createAgentConversation(response: ResponseContext): Promise; + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to createCalendar + * @throws ApiException if the response code was not in [200, 299] + */ + createCalendar(response: ResponseContext): Promise; + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to createCollection + * @throws ApiException if the response code was not in [200, 299] + */ + createCollection(response: ResponseContext): Promise; + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to createConfig + * @throws ApiException if the response code was not in [200, 299] + */ + createConfig(response: ResponseContext): Promise; + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to createConnection + * @throws ApiException if the response code was not in [200, 299] + */ + createConnection(response: ResponseContext): Promise; + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to createConnectionConfiguration + * @throws ApiException if the response code was not in [200, 299] + */ + createConnectionConfiguration(response: ResponseContext): Promise; + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to createConversation + * @throws ApiException if the response code was not in [200, 299] + */ + createConversation(response: ResponseContext): Promise; + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to createCustomAction + * @throws ApiException if the response code was not in [200, 299] + */ + createCustomAction(response: ResponseContext): Promise; + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to createEmailCustomization + * @throws ApiException if the response code was not in [200, 299] + */ + createEmailCustomization(response: ResponseContext): Promise; + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to createOrg + * @throws ApiException if the response code was not in [200, 299] + */ + createOrg(response: ResponseContext): Promise; + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to createRole + * @throws ApiException if the response code was not in [200, 299] + */ + createRole(response: ResponseContext): Promise; + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to createSchedule + * @throws ApiException if the response code was not in [200, 299] + */ + createSchedule(response: ResponseContext): Promise; + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to createTag + * @throws ApiException if the response code was not in [200, 299] + */ + createTag(response: ResponseContext): Promise; + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to createUser + * @throws ApiException if the response code was not in [200, 299] + */ + createUser(response: ResponseContext): Promise; + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to createUserGroup + * @throws ApiException if the response code was not in [200, 299] + */ + createUserGroup(response: ResponseContext): Promise; + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to createVariable + * @throws ApiException if the response code was not in [200, 299] + */ + createVariable(response: ResponseContext): Promise; + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to createWebhookConfiguration + * @throws ApiException if the response code was not in [200, 299] + */ + createWebhookConfiguration(response: ResponseContext): Promise; + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to dbtConnection + * @throws ApiException if the response code was not in [200, 299] + */ + dbtConnection(response: ResponseContext): Promise; + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to dbtGenerateSyncTml + * @throws ApiException if the response code was not in [200, 299] + */ + dbtGenerateSyncTml(response: ResponseContext): Promise; + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to dbtGenerateTml + * @throws ApiException if the response code was not in [200, 299] + */ + dbtGenerateTml(response: ResponseContext): Promise; + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to dbtSearch + * @throws ApiException if the response code was not in [200, 299] + */ + dbtSearch(response: ResponseContext): Promise>; + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to deactivateUser + * @throws ApiException if the response code was not in [200, 299] + */ + deactivateUser(response: ResponseContext): Promise; + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to deleteCalendar + * @throws ApiException if the response code was not in [200, 299] + */ + deleteCalendar(response: ResponseContext): Promise; + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to deleteCollection + * @throws ApiException if the response code was not in [200, 299] + */ + deleteCollection(response: ResponseContext): Promise; + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to deleteConfig + * @throws ApiException if the response code was not in [200, 299] + */ + deleteConfig(response: ResponseContext): Promise; + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to deleteConnection + * @throws ApiException if the response code was not in [200, 299] + */ + deleteConnection(response: ResponseContext): Promise; + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to deleteConnectionConfiguration + * @throws ApiException if the response code was not in [200, 299] + */ + deleteConnectionConfiguration(response: ResponseContext): Promise; + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to deleteConnectionV2 + * @throws ApiException if the response code was not in [200, 299] + */ + deleteConnectionV2(response: ResponseContext): Promise; + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to deleteCustomAction + * @throws ApiException if the response code was not in [200, 299] + */ + deleteCustomAction(response: ResponseContext): Promise; + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to deleteDbtConnection + * @throws ApiException if the response code was not in [200, 299] + */ + deleteDbtConnection(response: ResponseContext): Promise; + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to deleteEmailCustomization + * @throws ApiException if the response code was not in [200, 299] + */ + deleteEmailCustomization(response: ResponseContext): Promise; + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to deleteMetadata + * @throws ApiException if the response code was not in [200, 299] + */ + deleteMetadata(response: ResponseContext): Promise; + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to deleteOrg + * @throws ApiException if the response code was not in [200, 299] + */ + deleteOrg(response: ResponseContext): Promise; + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to deleteOrgEmailCustomization + * @throws ApiException if the response code was not in [200, 299] + */ + deleteOrgEmailCustomization(response: ResponseContext): Promise; + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to deleteRole + * @throws ApiException if the response code was not in [200, 299] + */ + deleteRole(response: ResponseContext): Promise; + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to deleteSchedule + * @throws ApiException if the response code was not in [200, 299] + */ + deleteSchedule(response: ResponseContext): Promise; + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to deleteTag + * @throws ApiException if the response code was not in [200, 299] + */ + deleteTag(response: ResponseContext): Promise; + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to deleteUser + * @throws ApiException if the response code was not in [200, 299] + */ + deleteUser(response: ResponseContext): Promise; + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to deleteUserGroup + * @throws ApiException if the response code was not in [200, 299] + */ + deleteUserGroup(response: ResponseContext): Promise; + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to deleteVariable + * @throws ApiException if the response code was not in [200, 299] + */ + deleteVariable(response: ResponseContext): Promise; + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to deleteVariables + * @throws ApiException if the response code was not in [200, 299] + */ + deleteVariables(response: ResponseContext): Promise; + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to deleteWebhookConfigurations + * @throws ApiException if the response code was not in [200, 299] + */ + deleteWebhookConfigurations(response: ResponseContext): Promise; + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to deployCommit + * @throws ApiException if the response code was not in [200, 299] + */ + deployCommit(response: ResponseContext): Promise>; + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to downloadConnectionMetadataChanges + * @throws ApiException if the response code was not in [200, 299] + */ + downloadConnectionMetadataChanges(response: ResponseContext): Promise; + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to exportAnswerReport + * @throws ApiException if the response code was not in [200, 299] + */ + exportAnswerReport(response: ResponseContext): Promise; + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to exportLiveboardReport + * @throws ApiException if the response code was not in [200, 299] + */ + exportLiveboardReport(response: ResponseContext): Promise; + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to exportMetadataTML + * @throws ApiException if the response code was not in [200, 299] + */ + exportMetadataTML(response: ResponseContext): Promise>; + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to exportMetadataTMLBatched + * @throws ApiException if the response code was not in [200, 299] + */ + exportMetadataTMLBatched(response: ResponseContext): Promise; + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to fetchAnswerData + * @throws ApiException if the response code was not in [200, 299] + */ + fetchAnswerData(response: ResponseContext): Promise; + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to fetchAnswerSqlQuery + * @throws ApiException if the response code was not in [200, 299] + */ + fetchAnswerSqlQuery(response: ResponseContext): Promise; + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to fetchAsyncImportTaskStatus + * @throws ApiException if the response code was not in [200, 299] + */ + fetchAsyncImportTaskStatus(response: ResponseContext): Promise; + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to fetchColumnSecurityRules + * @throws ApiException if the response code was not in [200, 299] + */ + fetchColumnSecurityRules(response: ResponseContext): Promise>; + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to fetchConnectionDiffStatus + * @throws ApiException if the response code was not in [200, 299] + */ + fetchConnectionDiffStatus(response: ResponseContext): Promise; + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to fetchLiveboardData + * @throws ApiException if the response code was not in [200, 299] + */ + fetchLiveboardData(response: ResponseContext): Promise; + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to fetchLiveboardSqlQuery + * @throws ApiException if the response code was not in [200, 299] + */ + fetchLiveboardSqlQuery(response: ResponseContext): Promise; + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to fetchLogs + * @throws ApiException if the response code was not in [200, 299] + */ + fetchLogs(response: ResponseContext): Promise>; + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to fetchObjectPrivileges + * @throws ApiException if the response code was not in [200, 299] + */ + fetchObjectPrivileges(response: ResponseContext): Promise; + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to fetchPermissionsOfPrincipals + * @throws ApiException if the response code was not in [200, 299] + */ + fetchPermissionsOfPrincipals(response: ResponseContext): Promise; + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to fetchPermissionsOnMetadata + * @throws ApiException if the response code was not in [200, 299] + */ + fetchPermissionsOnMetadata(response: ResponseContext): Promise; + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to forceLogoutUsers + * @throws ApiException if the response code was not in [200, 299] + */ + forceLogoutUsers(response: ResponseContext): Promise; + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to generateCSV + * @throws ApiException if the response code was not in [200, 299] + */ + generateCSV(response: ResponseContext): Promise; + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to getCurrentUserInfo + * @throws ApiException if the response code was not in [200, 299] + */ + getCurrentUserInfo(response: ResponseContext): Promise; + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to getCurrentUserToken + * @throws ApiException if the response code was not in [200, 299] + */ + getCurrentUserToken(response: ResponseContext): Promise; + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to getCustomAccessToken + * @throws ApiException if the response code was not in [200, 299] + */ + getCustomAccessToken(response: ResponseContext): Promise; + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to getDataSourceSuggestions + * @throws ApiException if the response code was not in [200, 299] + */ + getDataSourceSuggestions(response: ResponseContext): Promise; + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to getFullAccessToken + * @throws ApiException if the response code was not in [200, 299] + */ + getFullAccessToken(response: ResponseContext): Promise; + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to getNLInstructions + * @throws ApiException if the response code was not in [200, 299] + */ + getNLInstructions(response: ResponseContext): Promise; + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to getObjectAccessToken + * @throws ApiException if the response code was not in [200, 299] + */ + getObjectAccessToken(response: ResponseContext): Promise; + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to getRelevantQuestions + * @throws ApiException if the response code was not in [200, 299] + */ + getRelevantQuestions(response: ResponseContext): Promise; + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to getSystemConfig + * @throws ApiException if the response code was not in [200, 299] + */ + getSystemConfig(response: ResponseContext): Promise; + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to getSystemInformation + * @throws ApiException if the response code was not in [200, 299] + */ + getSystemInformation(response: ResponseContext): Promise; + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to getSystemOverrideInfo + * @throws ApiException if the response code was not in [200, 299] + */ + getSystemOverrideInfo(response: ResponseContext): Promise; + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to importMetadataTML + * @throws ApiException if the response code was not in [200, 299] + */ + importMetadataTML(response: ResponseContext): Promise>; + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to importMetadataTMLAsync + * @throws ApiException if the response code was not in [200, 299] + */ + importMetadataTMLAsync(response: ResponseContext): Promise; + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to importUserGroups + * @throws ApiException if the response code was not in [200, 299] + */ + importUserGroups(response: ResponseContext): Promise; + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to importUsers + * @throws ApiException if the response code was not in [200, 299] + */ + importUsers(response: ResponseContext): Promise; + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to login + * @throws ApiException if the response code was not in [200, 299] + */ + login(response: ResponseContext): Promise; + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to logout + * @throws ApiException if the response code was not in [200, 299] + */ + logout(response: ResponseContext): Promise; + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to manageObjectPrivilege + * @throws ApiException if the response code was not in [200, 299] + */ + manageObjectPrivilege(response: ResponseContext): Promise; + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to parameterizeMetadata + * @throws ApiException if the response code was not in [200, 299] + */ + parameterizeMetadata(response: ResponseContext): Promise; + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to parameterizeMetadataFields + * @throws ApiException if the response code was not in [200, 299] + */ + parameterizeMetadataFields(response: ResponseContext): Promise; + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to publishMetadata + * @throws ApiException if the response code was not in [200, 299] + */ + publishMetadata(response: ResponseContext): Promise; + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to putVariableValues + * @throws ApiException if the response code was not in [200, 299] + */ + putVariableValues(response: ResponseContext): Promise; + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to queryGetDecomposedQuery + * @throws ApiException if the response code was not in [200, 299] + */ + queryGetDecomposedQuery(response: ResponseContext): Promise; + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to resetUserPassword + * @throws ApiException if the response code was not in [200, 299] + */ + resetUserPassword(response: ResponseContext): Promise; + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to revertCommit + * @throws ApiException if the response code was not in [200, 299] + */ + revertCommit(response: ResponseContext): Promise; + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to revokeRefreshTokens + * @throws ApiException if the response code was not in [200, 299] + */ + revokeRefreshTokens(response: ResponseContext): Promise; + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to revokeToken + * @throws ApiException if the response code was not in [200, 299] + */ + revokeToken(response: ResponseContext): Promise; + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to searchAuthSettings + * @throws ApiException if the response code was not in [200, 299] + */ + searchAuthSettings(response: ResponseContext): Promise; + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to searchCalendars + * @throws ApiException if the response code was not in [200, 299] + */ + searchCalendars(response: ResponseContext): Promise>; + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to searchChannelHistory + * @throws ApiException if the response code was not in [200, 299] + */ + searchChannelHistory(response: ResponseContext): Promise; + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to searchCollections + * @throws ApiException if the response code was not in [200, 299] + */ + searchCollections(response: ResponseContext): Promise; + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to searchCommits + * @throws ApiException if the response code was not in [200, 299] + */ + searchCommits(response: ResponseContext): Promise>; + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to searchCommunicationChannelPreferences + * @throws ApiException if the response code was not in [200, 299] + */ + searchCommunicationChannelPreferences(response: ResponseContext): Promise; + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to searchConfig + * @throws ApiException if the response code was not in [200, 299] + */ + searchConfig(response: ResponseContext): Promise>; + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to searchConnection + * @throws ApiException if the response code was not in [200, 299] + */ + searchConnection(response: ResponseContext): Promise>; + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to searchCustomActions + * @throws ApiException if the response code was not in [200, 299] + */ + searchCustomActions(response: ResponseContext): Promise>; + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to searchData + * @throws ApiException if the response code was not in [200, 299] + */ + searchData(response: ResponseContext): Promise; + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to searchEmailCustomization + * @throws ApiException if the response code was not in [200, 299] + */ + searchEmailCustomization(response: ResponseContext): Promise>; + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to searchMetadata + * @throws ApiException if the response code was not in [200, 299] + */ + searchMetadata(response: ResponseContext): Promise>; + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to searchOrgs + * @throws ApiException if the response code was not in [200, 299] + */ + searchOrgs(response: ResponseContext): Promise>; + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to searchRoles + * @throws ApiException if the response code was not in [200, 299] + */ + searchRoles(response: ResponseContext): Promise>; + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to searchSchedules + * @throws ApiException if the response code was not in [200, 299] + */ + searchSchedules(response: ResponseContext): Promise>; + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to searchSecuritySettings + * @throws ApiException if the response code was not in [200, 299] + */ + searchSecuritySettings(response: ResponseContext): Promise; + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to searchTags + * @throws ApiException if the response code was not in [200, 299] + */ + searchTags(response: ResponseContext): Promise>; + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to searchUserGroups + * @throws ApiException if the response code was not in [200, 299] + */ + searchUserGroups(response: ResponseContext): Promise>; + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to searchUsers + * @throws ApiException if the response code was not in [200, 299] + */ + searchUsers(response: ResponseContext): Promise>; + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to searchVariables + * @throws ApiException if the response code was not in [200, 299] + */ + searchVariables(response: ResponseContext): Promise>; + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to searchWebhookConfigurations + * @throws ApiException if the response code was not in [200, 299] + */ + searchWebhookConfigurations(response: ResponseContext): Promise; + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to sendAgentConversationMessage + * @throws ApiException if the response code was not in [200, 299] + */ + sendAgentConversationMessage(response: ResponseContext): Promise; + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to sendAgentConversationMessageStreaming + * @throws ApiException if the response code was not in [200, 299] + */ + sendAgentConversationMessageStreaming(response: ResponseContext): Promise; + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to sendAgentMessage + * @throws ApiException if the response code was not in [200, 299] + */ + sendAgentMessage(response: ResponseContext): Promise; + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to sendAgentMessageStreaming + * @throws ApiException if the response code was not in [200, 299] + */ + sendAgentMessageStreaming(response: ResponseContext): Promise; + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to sendMessage + * @throws ApiException if the response code was not in [200, 299] + */ + sendMessage(response: ResponseContext): Promise>; + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to setNLInstructions + * @throws ApiException if the response code was not in [200, 299] + */ + setNLInstructions(response: ResponseContext): Promise; + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to shareMetadata + * @throws ApiException if the response code was not in [200, 299] + */ + shareMetadata(response: ResponseContext): Promise; + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to singleAnswer + * @throws ApiException if the response code was not in [200, 299] + */ + singleAnswer(response: ResponseContext): Promise; + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to stopConversation + * @throws ApiException if the response code was not in [200, 299] + */ + stopConversation(response: ResponseContext): Promise; + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to syncMetadata + * @throws ApiException if the response code was not in [200, 299] + */ + syncMetadata(response: ResponseContext): Promise; + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to unassignTag + * @throws ApiException if the response code was not in [200, 299] + */ + unassignTag(response: ResponseContext): Promise; + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to unparameterizeMetadata + * @throws ApiException if the response code was not in [200, 299] + */ + unparameterizeMetadata(response: ResponseContext): Promise; + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to unpublishMetadata + * @throws ApiException if the response code was not in [200, 299] + */ + unpublishMetadata(response: ResponseContext): Promise; + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to updateCalendar + * @throws ApiException if the response code was not in [200, 299] + */ + updateCalendar(response: ResponseContext): Promise; + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to updateCollection + * @throws ApiException if the response code was not in [200, 299] + */ + updateCollection(response: ResponseContext): Promise; + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to updateColumnSecurityRules + * @throws ApiException if the response code was not in [200, 299] + */ + updateColumnSecurityRules(response: ResponseContext): Promise; + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to updateConfig + * @throws ApiException if the response code was not in [200, 299] + */ + updateConfig(response: ResponseContext): Promise; + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to updateConnection + * @throws ApiException if the response code was not in [200, 299] + */ + updateConnection(response: ResponseContext): Promise; + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to updateConnectionConfiguration + * @throws ApiException if the response code was not in [200, 299] + */ + updateConnectionConfiguration(response: ResponseContext): Promise; + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to updateConnectionStatus + * @throws ApiException if the response code was not in [200, 299] + */ + updateConnectionStatus(response: ResponseContext): Promise; + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to updateConnectionV2 + * @throws ApiException if the response code was not in [200, 299] + */ + updateConnectionV2(response: ResponseContext): Promise; + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to updateCustomAction + * @throws ApiException if the response code was not in [200, 299] + */ + updateCustomAction(response: ResponseContext): Promise; + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to updateDbtConnection + * @throws ApiException if the response code was not in [200, 299] + */ + updateDbtConnection(response: ResponseContext): Promise; + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to updateEmailCustomization + * @throws ApiException if the response code was not in [200, 299] + */ + updateEmailCustomization(response: ResponseContext): Promise; + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to updateMetadataHeader + * @throws ApiException if the response code was not in [200, 299] + */ + updateMetadataHeader(response: ResponseContext): Promise; + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to updateMetadataObjId + * @throws ApiException if the response code was not in [200, 299] + */ + updateMetadataObjId(response: ResponseContext): Promise; + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to updateOrg + * @throws ApiException if the response code was not in [200, 299] + */ + updateOrg(response: ResponseContext): Promise; + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to updateRole + * @throws ApiException if the response code was not in [200, 299] + */ + updateRole(response: ResponseContext): Promise; + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to updateSchedule + * @throws ApiException if the response code was not in [200, 299] + */ + updateSchedule(response: ResponseContext): Promise; + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to updateSystemConfig + * @throws ApiException if the response code was not in [200, 299] + */ + updateSystemConfig(response: ResponseContext): Promise; + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to updateTag + * @throws ApiException if the response code was not in [200, 299] + */ + updateTag(response: ResponseContext): Promise; + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to updateUser + * @throws ApiException if the response code was not in [200, 299] + */ + updateUser(response: ResponseContext): Promise; + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to updateUserGroup + * @throws ApiException if the response code was not in [200, 299] + */ + updateUserGroup(response: ResponseContext): Promise; + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to updateVariable + * @throws ApiException if the response code was not in [200, 299] + */ + updateVariable(response: ResponseContext): Promise; + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to updateVariableValues + * @throws ApiException if the response code was not in [200, 299] + */ + updateVariableValues(response: ResponseContext): Promise; + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to updateWebhookConfiguration + * @throws ApiException if the response code was not in [200, 299] + */ + updateWebhookConfiguration(response: ResponseContext): Promise; + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to validateCommunicationChannel + * @throws ApiException if the response code was not in [200, 299] + */ + validateCommunicationChannel(response: ResponseContext): Promise; + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to validateEmailCustomization + * @throws ApiException if the response code was not in [200, 299] + */ + validateEmailCustomization(response: ResponseContext): Promise; + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to validateMerge + * @throws ApiException if the response code was not in [200, 299] + */ + validateMerge(response: ResponseContext): Promise>; + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to validateToken + * @throws ApiException if the response code was not in [200, 299] + */ + validateToken(response: ResponseContext): Promise; +} + +/** + * no description + */ +declare class UsersApiRequestFactory extends BaseAPIRequestFactory { + /** + * Version: 9.7.0.cl or later Activates a deactivated user account. Requires `ADMINISTRATION` (**Can administer Thoughtspot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `USER_ADMINISTRATION` (**Can manage users**) privilege is required. To activate an inactive user account, the API request body must include the following information: - Username or the GUID of the user account. - Auth token generated for the deactivated user. The auth token is sent in the API response when a user is deactivated. - Password for the user account. + * @param activateUserRequest + */ + activateUser(activateUserRequest: ActivateUserRequest, _options?: Configuration): Promise; + /** + * Version: 9.0.0.cl or later Updates the current password of the user. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `USER_ADMINISTRATION` (**Can manage users**) privilege is required. + * @param changeUserPasswordRequest + */ + changeUserPassword(changeUserPasswordRequest: ChangeUserPasswordRequest, _options?: Configuration): Promise; + /** + * Version: 9.0.0.cl or later Creates a user in ThoughtSpot. The API endpoint allows you to configure several user properties such as email address, account status, share notification preferences, and sharing visibility. You can provision the user to [groups](https://docs.thoughtspot.com/cloud/latest/groups-privileges) and [Orgs](https://docs.thoughtspot.com/cloud/latest/orgs-overview). You can also add Liveboard, Answer, and Worksheet objects to the user’s favorites list, assign a default Liveboard for the user, and set user preferences. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `USER_ADMINISTRATION` (**Can manage users**) privilege is required. + * @param createUserRequest + */ + createUser(createUserRequest: CreateUserRequest, _options?: Configuration): Promise; + /** + * Version: 9.7.0.cl or later Deactivates a user account. Requires `ADMINISTRATION` (**Can administer Thoughtspot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `USER_ADMINISTRATION` (**Can manage users**) privilege is required. To deactivate a user account, the API request body must include the following information: - Username or the GUID of the user account - Base URL of the ThoughtSpot instance If the API request is successful, ThoughtSpot returns the activation URL in the response. The activation URL is valid for 14 days and can be used to re-activate the account and reset the password of the deactivated account. + * @param deactivateUserRequest + */ + deactivateUser(deactivateUserRequest: DeactivateUserRequest, _options?: Configuration): Promise; + /** + * Version: 9.0.0.cl or later Deletes a user from the ThoughtSpot system. If you want to remove a user from a specific Org but not from ThoughtSpot, update the group and Org mapping properties of the user object via a POST API call to the [/api/rest/2.0/users/{user_identifier}/update](#/http/api-endpoints/users/update-user) endpoint. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `USER_ADMINISTRATION` (**Can manage users**) privilege is required. + * @param userIdentifier GUID / name of the user + */ + deleteUser(userIdentifier: string, _options?: Configuration): Promise; + /** + * Version: 9.0.0.cl or later Enforces logout on current user sessions. Use this API with caution as it may invalidate active user sessions and force users to re-login. Make sure you specify the usernames or GUIDs. If you pass null values in the API call, all user sessions on your cluster become invalid, and the users are forced to re-login. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `USER_ADMINISTRATION` (**Can manage users**) privilege is required. + * @param forceLogoutUsersRequest + */ + forceLogoutUsers(forceLogoutUsersRequest: ForceLogoutUsersRequest, _options?: Configuration): Promise; + /** + * Version: 9.0.0.cl or later Imports user data from external databases into ThoughtSpot. During the user import operation: * If the specified users are not available in ThoughtSpot, the users are created and assigned a default password. Defining a `default_password` in the API request is optional. * If `delete_unspecified_users` is set to `true`, the users not specified in the API request, excluding the `tsadmin`, `guest`, `system` and `su` users, are deleted. * If the specified user objects are already available in ThoughtSpot, the object properties are updated and synchronized as per the input data in the API request. A successful API call returns the object that represents the changes made in the ThoughtSpot system. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `USER_ADMINISTRATION` (**Can manage users**) privilege is required. + * @param importUsersRequest + */ + importUsers(importUsersRequest: ImportUsersRequest, _options?: Configuration): Promise; + /** + * Version: 9.0.0.cl or later Resets the password of a user account. Administrators can reset password on behalf of a user. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `USER_ADMINISTRATION` (**Can manage users**) privilege is required. + * @param resetUserPasswordRequest + */ + resetUserPassword(resetUserPasswordRequest: ResetUserPasswordRequest, _options?: Configuration): Promise; + /** + * Version: 9.0.0.cl or later Gets a list of users available on the ThoughtSpot system. To get details of a specific user, specify the user GUID or name. You can also filter the API response based on groups, Org ID, user visibility, account status, user type, and user preference settings and favorites. Available to all users. Users with `ADMINISTRATION` (**Can administer ThoughtSpot**) privileges can view all users properties. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `USER_ADMINISTRATION` (**Can manage users**) privilege is required. **NOTE**: If the API returns an empty list, consider increasing the value of the `record_size` parameter. To search across all available users, set `record_size` to `-1`. + * @param searchUsersRequest + */ + searchUsers(searchUsersRequest: SearchUsersRequest, _options?: Configuration): Promise; + /** + * Version: 9.0.0.cl or later Updates the properties of a user object. You can modify user properties such as username, email, and share notification settings. You can also assign new groups and Orgs, remove the user from a group or Org, reset password, and modify user preferences. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `USER_ADMINISTRATION` (**Can manage users**) privilege is required. + * @param userIdentifier GUID / name of the user + * @param updateUserRequest + */ + updateUser(userIdentifier: string, updateUserRequest: UpdateUserRequest, _options?: Configuration): Promise; +} +declare class UsersApiResponseProcessor { + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to activateUser + * @throws ApiException if the response code was not in [200, 299] + */ + activateUser(response: ResponseContext): Promise; + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to changeUserPassword + * @throws ApiException if the response code was not in [200, 299] + */ + changeUserPassword(response: ResponseContext): Promise; + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to createUser + * @throws ApiException if the response code was not in [200, 299] + */ + createUser(response: ResponseContext): Promise; + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to deactivateUser + * @throws ApiException if the response code was not in [200, 299] + */ + deactivateUser(response: ResponseContext): Promise; + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to deleteUser + * @throws ApiException if the response code was not in [200, 299] + */ + deleteUser(response: ResponseContext): Promise; + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to forceLogoutUsers + * @throws ApiException if the response code was not in [200, 299] + */ + forceLogoutUsers(response: ResponseContext): Promise; + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to importUsers + * @throws ApiException if the response code was not in [200, 299] + */ + importUsers(response: ResponseContext): Promise; + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to resetUserPassword + * @throws ApiException if the response code was not in [200, 299] + */ + resetUserPassword(response: ResponseContext): Promise; + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to searchUsers + * @throws ApiException if the response code was not in [200, 299] + */ + searchUsers(response: ResponseContext): Promise>; + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to updateUser + * @throws ApiException if the response code was not in [200, 299] + */ + updateUser(response: ResponseContext): Promise; +} + +/** + * no description + */ +declare class VariableApiRequestFactory extends BaseAPIRequestFactory { + /** + * Create a variable which can be used for parameterizing metadata objects Version: 26.4.0.cl or later Allows creating a variable which can be used for parameterizing metadata objects in ThoughtSpot. Requires ADMINISTRATION role and TENANT scope. The CAN_MANAGE_VARIABLES permission allows you to manage Formula Variables in the current organization scope. The API endpoint supports the following types of variables: * CONNECTION_PROPERTY - For connection properties * TABLE_MAPPING - For table mappings * CONNECTION_PROPERTY_PER_PRINCIPAL - For connection properties per principal. In order to use this please contact support to enable this. * FORMULA_VARIABLE - For Formula variables, introduced in 10.15.0.cl When creating a variable, you need to specify: * The variable type * A unique name for the variable * Whether the variable contains sensitive values (defaults to false) * The data type of the variable, only specify for formula variables (defaults to null) The operation will fail if: * The user lacks required permissions * The variable name already exists * The variable type is invalid + * @param createVariableRequest + */ + createVariable(createVariableRequest: CreateVariableRequest, _options?: Configuration): Promise; + /** + * Delete a variable Version: 10.14.0.cl or later **Note:** This API endpoint is deprecated and will be removed from ThoughtSpot in a future release. Use [POST /api/rest/2.0/template/variables/delete](/api/rest/2.0/template/variables/delete) instead. Allows deleting a variable from ThoughtSpot. Requires ADMINISTRATION role and TENANT scope. The CAN_MANAGE_VARIABLES permission allows you to manage Formula Variables in the current organization scope. The API endpoint requires: * The variable identifier (ID or name) The operation will fail if: * The user lacks required permissions * The variable doesn\'t exist * The variable is being used by other objects + * @param identifier Unique id or name of the variable + */ + deleteVariable(identifier: string, _options?: Configuration): Promise; + /** + * Delete variable(s) Version: 26.4.0.cl or later Allows deleting multiple variables from ThoughtSpot. Requires ADMINISTRATION role and TENANT scope. The CAN_MANAGE_VARIABLES permission allows you to manage Formula Variables in the current organization scope. The API endpoint requires: * The variable identifiers (IDs or names) The operation will fail if: * The user lacks required permissions * Any of the variables don\'t exist * Any of the variables are being used by other objects + * @param deleteVariablesRequest + */ + deleteVariables(deleteVariablesRequest: DeleteVariablesRequest, _options?: Configuration): Promise; + /** + * Update values for a variable Version: 26.4.0.cl or later Allows updating values for a specific variable in ThoughtSpot. Requires ADMINISTRATION role. The CAN_MANAGE_VARIABLES permission allows you to manage Formula Variables in the current organization scope. The API endpoint allows: * Adding new values to the variable * Replacing existing values * Deleting values from the variable * Resetting all values When updating variable values, you need to specify: * The variable identifier (ID or name) * The values to add/replace/remove * The operation to perform (ADD, REPLACE, REMOVE, RESET) Behaviour based on operation type: * ADD - Adds values to the variable if this is a list type variable, else same as replace. * REPLACE - Replaces all values of a given set of constraints with the current set of values. * REMOVE - Removes any values which match the set of conditions of the variables if this is a list type variable, else clears value. * RESET - Removes all constraints for the given variable, scope is ignored + * @param identifier Unique ID or name of the variable + * @param putVariableValuesRequest + */ + putVariableValues(identifier: string, putVariableValuesRequest: PutVariableValuesRequest, _options?: Configuration): Promise; + /** + * Search variables Version: 26.4.0.cl or later Allows searching for variables in ThoughtSpot. Requires ADMINISTRATION role. The CAN_MANAGE_VARIABLES permission allows you to manage Formula Variables in the current organization scope. The API endpoint supports searching variables by: * Variable identifier (ID or name) * Variable type * Name pattern (case-insensitive, supports % for wildcard) The search results can be formatted in three ways: * METADATA - Returns only variable metadata (default) * METADATA_AND_VALUES - Returns variable metadata and values The values can be filtered by scope: * org_identifier * principal_identifier * model_identifier + * @param searchVariablesRequest + */ + searchVariables(searchVariablesRequest: SearchVariablesRequest, _options?: Configuration): Promise; + /** + * Update a variable\'s name Version: 26.4.0.cl or later Allows updating a variable\'s name in ThoughtSpot. Requires ADMINISTRATION role and TENANT scope. The CAN_MANAGE_VARIABLES permission allows you to manage Formula Variables in the current organization scope. The API endpoint allows updating: * The variable name + * @param identifier Unique id or name of the variable to update. + * @param updateVariableRequest + */ + updateVariable(identifier: string, updateVariableRequest: UpdateVariableRequest, _options?: Configuration): Promise; + /** + * Update values for multiple variables Version: 10.14.0.cl or later **Note:** This API endpoint is deprecated and will be removed from ThoughtSpot in a future release. Use [POST /api/rest/2.0/template/variables/{identifier}/update-values](/api/rest/2.0/template/variables/%7Bidentifier%7D/update-values) instead. Allows updating values for multiple variables in ThoughtSpot. Requires ADMINISTRATION role. The CAN_MANAGE_VARIABLES permission allows you to manage Formula Variables in the current organization scope. The API endpoint allows: * Adding new values to variables * Replacing existing values * Deleting values from variables When updating variable values, you need to specify: * The variable identifiers * The values to add/replace/remove for each variable * The operation to perform (ADD, REPLACE, REMOVE, RESET) Behaviour based on operation type: * ADD - Adds values to the variable if this is a list type variable, else same as replace. * REPLACE - Replaces all values of a given set of constraints with the current set of values. * REMOVE - Removes any values which match the set of conditions of the variables if this is a list type variable, else clears value. * RESET - Removes all constrains for a given variable, scope is ignored + * @param updateVariableValuesRequest + */ + updateVariableValues(updateVariableValuesRequest: UpdateVariableValuesRequest, _options?: Configuration): Promise; +} +declare class VariableApiResponseProcessor { + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to createVariable + * @throws ApiException if the response code was not in [200, 299] + */ + createVariable(response: ResponseContext): Promise; + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to deleteVariable + * @throws ApiException if the response code was not in [200, 299] + */ + deleteVariable(response: ResponseContext): Promise; + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to deleteVariables + * @throws ApiException if the response code was not in [200, 299] + */ + deleteVariables(response: ResponseContext): Promise; + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to putVariableValues + * @throws ApiException if the response code was not in [200, 299] + */ + putVariableValues(response: ResponseContext): Promise; + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to searchVariables + * @throws ApiException if the response code was not in [200, 299] + */ + searchVariables(response: ResponseContext): Promise>; + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to updateVariable + * @throws ApiException if the response code was not in [200, 299] + */ + updateVariable(response: ResponseContext): Promise; + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to updateVariableValues + * @throws ApiException if the response code was not in [200, 299] + */ + updateVariableValues(response: ResponseContext): Promise; +} + +/** + * no description + */ +declare class VersionControlApiRequestFactory extends BaseAPIRequestFactory { + /** + * Version: 9.2.0.cl or later Commits TML files of metadata objects to the Git branch configured on your instance. Requires at least edit access to objects used in the commit operation. Before using this endpoint to push your commits: * Enable Git integration on your instance. * Make sure the Git repository and branch details are configured on your instance. For more information, see [Git integration documentation](https://developers.thoughtspot.com/docs/git-integration). + * @param commitBranchRequest + */ + commitBranch(commitBranchRequest: CommitBranchRequest, _options?: Configuration): Promise; + /** + * Version: 9.2.0.cl or later Allows you to connect a ThoughtSpot instance to a Git repository. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance on your instance, the `CAN_SETUP_VERSION_CONTROL` (**Can set up version control**) privilege. You can use this API endpoint to connect your ThoughtSpot development and production environments to the development and production branches of a Git repository. Before using this endpoint to connect your ThoughtSpot instance to a Git repository, check the following prerequisites: * You have a Git repository. If you are using GitHub, make sure you have a valid account and an access token to connect ThoughtSpot to GitHub. For information about generating a token, see [GitHub Documentation](https://docs.github.com/en/authentication/keeping-your-account-and-data-secure/managing-your-personal-access-tokens). * Your access token has `repo` scope that grants full access to public and private repositories. * Your Git repository has a branch that can be configured as a default branch in ThoughtSpot. For more information, see [Git integration documentation](https://developers.thoughtspot.com/docs/?pageid=git-integration). **Note**: ThoughtSpot supports only GitHub / itHub Enterprise for CI/CD. + * @param createConfigRequest + */ + createConfig(createConfigRequest: CreateConfigRequest, _options?: Configuration): Promise; + /** + * Version: 9.2.0.cl or later Deletes Git repository configuration from your ThoughtSpot instance. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance on your instance, the `CAN_SETUP_VERSION_CONTROL` (**Can set up version control**) privilege. + * @param deleteConfigRequest + */ + deleteConfig(deleteConfigRequest: DeleteConfigRequest, _options?: Configuration): Promise; + /** + * Version: 9.2.0.cl or later Allows you to deploy a commit and publish TML content to your ThoughtSpot instance. Requires at least edit access to the objects used in the deploy operation. The API deploys the head of the branch unless a `commit_id` is specified in the API request. If the branch name is not defined in the request, the default branch is considered for deploying commits. For more information, see [Git integration documentation](https://developers.thoughtspot.com/docs/git-integration). + * @param deployCommitRequest + */ + deployCommit(deployCommitRequest: DeployCommitRequest, _options?: Configuration): Promise; + /** + * Version: 9.2.0.cl or later Reverts TML objects to a previous commit specified in the API request. Requires at least edit access to objects. In the API request, specify the `commit_id`. If the branch name is not specified in the request, the API will consider the default branch configured on your instance. By default, the API reverts all objects. If the revert operation fails for one of the objects provided in the commit, the API returns an error and does not revert any object. For more information, see [Git integration documentation](https://developers.thoughtspot.com/docs/git-integration). + * @param commitId Commit id to which the object should be reverted + * @param revertCommitRequest + */ + revertCommit(commitId: string, revertCommitRequest: RevertCommitRequest, _options?: Configuration): Promise; + /** + * Version: 9.2.0.cl or later Gets a list of commits for a given metadata object. Requires `DATAMANAGEMENT` (**Can manage data**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance on your instance, the `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` (**Can manage data models**) privilege and edit access to the metadata objects. + * @param searchCommitsRequest + */ + searchCommits(searchCommitsRequest: SearchCommitsRequest, _options?: Configuration): Promise; + /** + * Version: 9.2.0.cl or later Gets Git repository connections configured on the ThoughtSpot instance. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance on your instance, the `CAN_SETUP_VERSION_CONTROL` (**Can set up version control**) privilege. + * @param searchConfigRequest + */ + searchConfig(searchConfigRequest: SearchConfigRequest, _options?: Configuration): Promise; + /** + * Version: 9.2.0.cl or later Updates Git repository configuration settings. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance on your instance, the `CAN_SETUP_VERSION_CONTROL` (**Can set up version control**) privilege. + * @param updateConfigRequest + */ + updateConfig(updateConfigRequest: UpdateConfigRequest, _options?: Configuration): Promise; + /** + * Version: 9.2.0.cl or later Validates the content of your source branch against the objects in your destination environment. Before merging content from your source branch to the destination branch, run this API operation from your destination environment and ensure that the changes from the source branch function in the destination environment. Requires `DATAMANAGEMENT` (**Can manage data**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance on your instance, the `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` (**Can manage data models**) privilege and edit access to the metadata objects. + * @param validateMergeRequest + */ + validateMerge(validateMergeRequest: ValidateMergeRequest, _options?: Configuration): Promise; +} +declare class VersionControlApiResponseProcessor { + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to commitBranch + * @throws ApiException if the response code was not in [200, 299] + */ + commitBranch(response: ResponseContext): Promise; + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to createConfig + * @throws ApiException if the response code was not in [200, 299] + */ + createConfig(response: ResponseContext): Promise; + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to deleteConfig + * @throws ApiException if the response code was not in [200, 299] + */ + deleteConfig(response: ResponseContext): Promise; + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to deployCommit + * @throws ApiException if the response code was not in [200, 299] + */ + deployCommit(response: ResponseContext): Promise>; + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to revertCommit + * @throws ApiException if the response code was not in [200, 299] + */ + revertCommit(response: ResponseContext): Promise; + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to searchCommits + * @throws ApiException if the response code was not in [200, 299] + */ + searchCommits(response: ResponseContext): Promise>; + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to searchConfig + * @throws ApiException if the response code was not in [200, 299] + */ + searchConfig(response: ResponseContext): Promise>; + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to updateConfig + * @throws ApiException if the response code was not in [200, 299] + */ + updateConfig(response: ResponseContext): Promise; + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to validateMerge + * @throws ApiException if the response code was not in [200, 299] + */ + validateMerge(response: ResponseContext): Promise>; +} + +/** + * no description + */ +declare class WebhooksApiRequestFactory extends BaseAPIRequestFactory { + /** + * Version: 10.14.0.cl or later Creates a new webhook configuration to receive notifications for specified events. The webhook will be triggered when the configured events occur in the system. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) or `DEVELOPER` (**Has developer privilege**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, users with `CAN_MANAGE_WEBHOOKS` (**Can manage webhooks**) privilege are also authorized to perform this action. + * @param createWebhookConfigurationRequest + */ + createWebhookConfiguration(createWebhookConfigurationRequest: CreateWebhookConfigurationRequest, _options?: Configuration): Promise; + /** + * Version: 10.14.0.cl or later Deletes one or more webhook configurations by their unique id or name. Returns status of each deletion operation, including successfully deleted webhooks and any failures with error details. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) or `DEVELOPER` (**Has developer privilege**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, users with `CAN_MANAGE_WEBHOOKS` (**Can manage webhooks**) privilege are also authorized to perform this action. + * @param deleteWebhookConfigurationsRequest + */ + deleteWebhookConfigurations(deleteWebhookConfigurationsRequest: DeleteWebhookConfigurationsRequest, _options?: Configuration): Promise; + /** + * Version: 10.14.0.cl or later Searches for webhook configurations based on various criteria such as Org, webhook identifier, event type, with support for pagination and sorting. Returns matching webhook configurations with their complete details. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) or `DEVELOPER` (**Has developer privilege**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, users with `CAN_MANAGE_WEBHOOKS` (**Can manage webhooks**) privilege are also authorized to perform this action. + * @param searchWebhookConfigurationsRequest + */ + searchWebhookConfigurations(searchWebhookConfigurationsRequest: SearchWebhookConfigurationsRequest, _options?: Configuration): Promise; + /** + * Version: 10.14.0.cl or later Updates an existing webhook configuration by its unique id or name. Only the provided fields will be updated. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) or `DEVELOPER` (**Has developer privilege**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, users with `CAN_MANAGE_WEBHOOKS` (**Can manage webhooks**) privilege are also authorized to perform this action. + * @param webhookIdentifier Unique ID or name of the webhook configuration. + * @param updateWebhookConfigurationRequest + */ + updateWebhookConfiguration(webhookIdentifier: string, updateWebhookConfigurationRequest: UpdateWebhookConfigurationRequest, _options?: Configuration): Promise; +} +declare class WebhooksApiResponseProcessor { + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to createWebhookConfiguration + * @throws ApiException if the response code was not in [200, 299] + */ + createWebhookConfiguration(response: ResponseContext): Promise; + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to deleteWebhookConfigurations + * @throws ApiException if the response code was not in [200, 299] + */ + deleteWebhookConfigurations(response: ResponseContext): Promise; + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to searchWebhookConfigurations + * @throws ApiException if the response code was not in [200, 299] + */ + searchWebhookConfigurations(response: ResponseContext): Promise; + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to updateWebhookConfiguration + * @throws ApiException if the response code was not in [200, 299] + */ + updateWebhookConfiguration(response: ResponseContext): Promise; +} + +declare class PromiseAIApi { + private api; + constructor(configuration: Configuration, requestFactory?: AIApiRequestFactory, responseProcessor?: AIApiResponseProcessor); + /** + * Version: 26.2.0.cl or later Creates a new Spotter agent conversation based on the provided context and settings. The endpoint was in Beta from 26.2.0.cl through 26.4.0.cl. Requires `CAN_USE_SPOTTER` privilege and at least view access to the metadata object specified in the request. #### Usage guidelines The request must include the `metadata_context` parameter to define the conversation context. The context type can be one of: - `DATA_SOURCE` *(available from 26.5.0.cl)*: targets a specific data source. Provide `data_source_identifier` in `data_source_context` for a single data source, or `data_source_identifiers` for multi-data-source context. The deprecated `guid` field is accepted for backwards compatibility. - `AUTO_MODE` *(available from 26.5.0.cl)*: automatically discovers and selects the most relevant datasets for the user\'s queries. > **Note for callers on versions 26.2.0.cl – 26.4.0.cl (Beta):** use the lowercase `data_source` enum value with the `guid` field instead of the above. Example: `{ \"type\": \"data_source\", \"data_source_context\": { \"guid\": \"\" } }`. The `conversation_settings` parameter controls which Spotter capabilities are enabled for the conversation: - `enable_contextual_change_analysis` (default: `true`, **deprecated from 26.2.0.cl**) — always enabled in Spotter 3; setting this to `false` has no effect on versions >= 26.2.0.cl - `enable_natural_language_answer_generation` (default: `true`, **deprecated from 26.2.0.cl**) — always enabled in Spotter 3; setting this to `false` has no effect on versions >= 26.2.0.cl - `enable_reasoning` (default: `true`, **deprecated from 26.2.0.cl**) — always enabled in Spotter 3; setting this to `false` has no effect on versions >= 26.2.0.cl - `enable_save_chat` (default: `false`, *available from 26.5.0.cl*) — enables saving the conversation for later retrieval via conversation history If the request is successful, the response includes a unique `conversation_identifier` that must be passed to `sendAgentConversationMessage` or `sendAgentConversationMessageStreaming` to send messages within this conversation. The response also includes `conversation_id` with the same value for backwards compatibility; use `conversation_identifier` for new integrations. #### Example request ```json { \"metadata_context\": { \"type\": \"DATA_SOURCE\", \"data_source_context\": { \"data_source_identifier\": \"a1b2c3d4-e5f6-7890-abcd-ef1234567890\" } }, \"conversation_settings\": {} } ``` #### Error responses | Code | Description | | ---- | --------------------------------------------------------------------------------------------------------------------------------------- | | 401 | Unauthorized — authentication token is missing, expired, or invalid. | | 403 | Forbidden — the authenticated user does not have `CAN_USE_SPOTTER` privilege or lacks view permission on the specified metadata object. | > ###### Note: > > - This endpoint was in Beta from 26.2.0.cl through 26.4.0.cl and is Generally Available from version 26.5.0.cl. > - This endpoint requires Spotter - please contact ThoughtSpot support to enable Spotter on your cluster. + * @param createAgentConversationRequest + */ + createAgentConversation(createAgentConversationRequest: CreateAgentConversationRequest, _options?: Configuration): Promise; + /** + * Version: 10.4.0.cl or later Creates a new conversation session tied to a specific data model for AI-driven natural language querying. Requires `CAN_USE_SPOTTER` privilege and at least view access to the metadata object specified in the request. #### Usage guidelines The request must include: - `metadata_identifier`: the unique ID of the data source that provides context for the conversation Optionally, you can provide: - `tokens`: a token string to set initial context for the conversation (e.g., `\"[sales],[item type],[state]\"`) If the request is successful, ThoughtSpot returns a unique `conversation_identifier` that must be passed to `sendMessage` to continue the conversation. #### Error responses | Code | Description | |------|-------------| | 401 | Unauthorized — authentication token is missing, expired, or invalid. | | 403 | Forbidden — the authenticated user does not have `CAN_USE_SPOTTER` privilege or lacks view permission on the specified metadata object. | > ###### Note: > * This endpoint is currently in Beta. Breaking changes may be introduced before the endpoint is made Generally Available. > * This endpoint requires Spotter - please contact ThoughtSpot support to enable Spotter on your cluster. + * @param createConversationRequest + */ + createConversation(createConversationRequest: CreateConversationRequest, _options?: Configuration): Promise; + /** + * Version: 10.15.0.cl or later Suggests the most relevant data sources for a given natural language query, ranked by confidence with LLM-generated reasoning. Requires `CAN_USE_SPOTTER` privilege and at least view-level access to the underlying metadata entities referenced in the response. #### Usage guidelines The request must include: - `query`: the natural language question to find relevant data sources for If the request is successful, the API returns a ranked list of suggested data sources, each containing: - `confidence`: a float score indicating the model\'s confidence in the relevance of the suggestion - `details`: metadata about the data source - `data_source_identifier`: the unique ID of the data source - `data_source_name`: the display name of the data source - `description`: a description of the data source - `reasoning`: LLM-generated rationale explaining why the data source was recommended #### Error responses | Code | Description | |------|--------------------------------------------------------------------------------------------------------------------------------------------| | 401 | Unauthorized — authentication token is missing, expired, or invalid. | | 403 | Forbidden — the authenticated user does not have `CAN_USE_SPOTTER` privilege or lacks view permission on the underlying metadata entities. | > ###### Note: > * This endpoint is currently in Beta. Breaking changes may be introduced before it is made Generally Available. > * This endpoint requires Spotter — please contact ThoughtSpot Support to enable Spotter on your cluster. + * @param getDataSourceSuggestionsRequest + */ + getDataSourceSuggestions(getDataSourceSuggestionsRequest: GetDataSourceSuggestionsRequest, _options?: Configuration): Promise; + /** + * Version: 10.15.0.cl or later Retrieves existing natural language (NL) instructions configured for a specific data model. These instructions guide the AI system in understanding data context and generating more accurate responses. Requires `CAN_USE_SPOTTER` privilege, at least view access on the data model, and a bearer token corresponding to the org where the data model exists. #### Usage guidelines The request must include: - `data_source_identifier`: the unique ID of the data model to retrieve instructions for If the request is successful, the API returns: - `nl_instructions_info`: an array of instruction objects, each containing: - `instructions`: the configured text instructions for AI processing - `scope`: the scope of the instruction — currently only `GLOBAL` is supported #### Instructions scope - **GLOBAL**: Instructions that apply globally across the system on the given data-model (currently only global instructions are supported) #### Error responses | Code | Description | |------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| | 401 | Unauthorized — authentication token is missing, expired, or invalid. | | 403 | Forbidden — the authenticated user does not have `CAN_USE_SPOTTER` privilege, lacks view access on the data model, or the bearer token does not correspond to the org where the data model exists. | > ###### Note: > > - To use this API, the user needs at least view access on the data model, and must use the bearer token corresponding to the org where the data model exists. > - This endpoint is currently in Beta. Breaking changes may be introduced before the endpoint is made Generally Available. > - Available from version 10.15.0.cl and later. > - This endpoint requires Spotter — please contact ThoughtSpot Support to enable Spotter on your cluster. > - Use this API to review currently configured instructions before modifying them with `setNLInstructions`. + * @param getNLInstructionsRequest + */ + getNLInstructions(getNLInstructionsRequest: GetNLInstructionsRequest, _options?: Configuration): Promise; + /** + * Version: 10.13.0.cl or later Breaks down a natural language query into a series of smaller analytical sub-questions, each mapped to a relevant data source. Requires `CAN_USE_SPOTTER` privilege and at least view-level access to the referenced metadata objects. #### Usage guidelines The request must include: - `query`: the natural language question to decompose into analytical sub-questions - `metadata_context`: at least one of the following context identifiers to guide question generation: - `conversation_identifier` — an existing conversation session ID - `answer_identifiers` — a list of Answer GUIDs - `liveboard_identifiers` — a list of Liveboard GUIDs - `data_source_identifiers` — a list of data source GUIDs Optional parameters for refining the output: - `ai_context`: additional context to improve response quality - `content` — supplementary text or CSV data as string input - `instructions` — custom text instructions for the AI system - `limit_relevant_questions`: maximum number of questions to return (default: `5`) - `bypass_cache`: if `true`, forces fresh computation instead of returning cached results If the request is successful, the API returns a list of relevant analytical questions, each containing: - `query`: the generated sub-question - `data_source_identifier`: the unique ID of the data source the question targets - `data_source_name`: the display name of the corresponding data source #### Error responses | Code | Description | |------|---------------------------------------------------------------------------------------------------------------------------------------| | 401 | Unauthorized — authentication token is missing, expired, or invalid. | | 403 | Forbidden — the authenticated user does not have `CAN_USE_SPOTTER` privilege or lacks view access to the referenced metadata objects. | > ###### Note: > * This endpoint is currently in Beta. Breaking changes may be introduced before the endpoint is made Generally Available. > * This endpoint requires Spotter - please contact ThoughtSpot support to enable Spotter on your cluster. + * @param getRelevantQuestionsRequest + */ + getRelevantQuestions(getRelevantQuestionsRequest: GetRelevantQuestionsRequest, _options?: Configuration): Promise; + /** + * Version: 10.7.0.cl or later **Deprecated** — Use `getRelevantQuestions` instead (available from 10.13.0.cl). Breaks down a topical or goal-oriented natural language question into smaller, actionable analytical sub-questions, each mapped to a relevant data source for independent execution. Requires `CAN_USE_SPOTTER` privilege and at least view-level access to the referenced metadata objects. #### Usage guidelines The request accepts the following parameters: - `nlsRequest`: contains the user `query` to decompose, along with optional `instructions` and `bypassCache` flag - `worksheetIds`: list of data source identifiers to scope the decomposition - `answerIds`: list of Answer GUIDs whose data guides the response - `liveboardIds`: list of Liveboard GUIDs whose data guides the response - `conversationId`: an existing conversation session ID for context continuity - `content`: supplementary text or CSV data to improve response quality - `maxDecomposedQueries`: maximum number of sub-questions to return (default: `5`) If the request is successful, the API returns a `decomposedQueryResponse` containing a list of `decomposedQueries`, each with: - `query`: the generated analytical sub-question - `worksheetId`: the unique ID of the data source the question targets - `worksheetName`: the display name of the corresponding data source #### Error responses | Code | Description | |------|---------------------------------------------------------------------------------------------------------------------------------------| | 401 | Unauthorized — authentication token is missing, expired, or invalid. | | 403 | Forbidden — the authenticated user does not have `CAN_USE_SPOTTER` privilege or lacks view access to the referenced metadata objects. | > ###### Note: > * This endpoint is deprecated since 10.13.0.cl. Use `getRelevantQuestions` for new integrations. > * This endpoint is currently in Beta. Breaking changes may be introduced before the endpoint is made Generally Available. > * This endpoint requires Spotter — please contact ThoughtSpot support to enable Spotter on your cluster. + * @param queryGetDecomposedQueryRequest + */ + queryGetDecomposedQuery(queryGetDecomposedQueryRequest: QueryGetDecomposedQueryRequest, _options?: Configuration): Promise; + /** + * Version: 26.5.0.cl or later Sends natural language messages to an existing Spotter agent conversation and returns the complete response synchronously. Requires `CAN_USE_SPOTTER` privilege and access to the metadata object associated with the conversation. The user must have access to the conversation session referenced by `conversation_identifier`. A conversation must first be created using the `createAgentConversation` API. #### Usage guidelines The request must include: - `conversation_identifier`: the unique session ID returned by `createAgentConversation`, used for context continuity and message tracking - `messages`: an array of one or more text messages to send to the agent The API returns an array of response objects, each containing: - `type`: the kind of response — `text`, `answer`, or `error` - `message`: the main content of the response - `metadata`: additional information depending on the message type (e.g., answer metadata includes analytics and visualization details) #### Error responses | Code | Description | |------|----------------------------------------------------------------------------------------------------------------------------------| | 401 | Unauthorized — authentication token is missing, expired, or invalid. | | 403 | Forbidden — the authenticated user does not have `CAN_USE_SPOTTER` privilege or lacks permission on the referenced conversation. | > ###### Note: > > - This endpoint is Generally Available from version 26.5.0.cl. > - This endpoint requires Spotter - please contact ThoughtSpot support to enable Spotter on your cluster. > - For real-time streamed responses, use `sendAgentConversationMessageStreaming` instead. + * @param conversationIdentifier Unique identifier for the conversation (used to track context) + * @param sendAgentConversationMessageRequest + */ + sendAgentConversationMessage(conversationIdentifier: string, sendAgentConversationMessageRequest: SendAgentConversationMessageRequest, _options?: Configuration): Promise; + /** + * Version: 26.5.0.cl or later Sends one or more natural language messages to an existing Spotter agent conversation and returns the response as a real-time Server-Sent Events stream. Requires `CAN_USE_SPOTTER` privilege and access to the metadata object associated with the conversation. The user must have access to the conversation session referenced by `conversation_identifier`. A conversation must first be created using the `createAgentConversation` API. #### Usage guidelines The request must include: - `conversation_identifier`: the unique session ID returned by `createAgentConversation`, used for context continuity and message tracking - `messages`: an array of one or more text messages to send to the agent If the request is valid, the API returns a Server-Sent Events (SSE) stream. Each line has the form `data: [{\"type\": \"...\", ...}]` — a JSON array of event objects. Event types include: - `ack`: confirms receipt of the request (`node_id`) - `conv_title`: conversation title (`title`, `conv_id`) - `notification`: status updates on operations (`group_id`, `metadata`, `code` — e.g. `TOOL_CALL_NOTIFICATION`, `nls_start`, `FINAL_RESPONSE_NOTIFICATION`) - `text-chunk`: incremental content chunks (`id`, `group_id`, `metadata` with `format` and `type` such as `thinking` or `text`, `content`) - `text`: full text block with same structure as `text-chunk` - `answer`: structured answer with metadata (`id`, `group_id`, `metadata` with `sage_query`, `session_id`, `title`, etc., `title`) - `error`: if a failure occurs #### Error responses | Code | Description | | ---- | -------------------------------------------------------------------------------------------------------------------------------- | | 401 | Unauthorized — authentication token is missing, expired, or invalid. | | 403 | Forbidden — the authenticated user does not have `CAN_USE_SPOTTER` privilege or lacks permission on the referenced conversation. | > ###### Note: > > - This endpoint is Generally Available from version 26.5.0.cl. > - This endpoint requires Spotter - please contact ThoughtSpot support to enable Spotter on your cluster. > - The streaming protocol uses Server-Sent Events (SSE). > - For the complete response in a single payload, use `sendAgentConversationMessage` instead. + * @param conversationIdentifier Unique identifier for the conversation (used to track context) + * @param sendAgentConversationMessageStreamingRequest + */ + sendAgentConversationMessageStreaming(conversationIdentifier: string, sendAgentConversationMessageStreamingRequest: SendAgentConversationMessageStreamingRequest, _options?: Configuration): Promise; + /** + * Version: 26.2.0.cl or later **Deprecated** — Use `sendAgentConversationMessage` instead. Send natural language messages to an existing Spotter agent conversation and returns the complete response synchronously. Requires `CAN_USE_SPOTTER` privilege and access to the metadata object associated with the conversation. The user must have access to the conversation session referenced by `conversation_identifier`. A conversation must first be created using the `createAgentConversation` API. #### Usage guidelines The request must include: - `conversation_identifier`: the unique session ID returned by `createAgentConversation`, used for context continuity and message tracking - `messages`: an array of one or more text messages to send to the agent The API returns an array of response objects, each containing: - `type`: the kind of response — `text`, `answer`, or `error` - `message`: the main content of the response - `metadata`: additional information depending on the message type (e.g., answer metadata includes analytics and visualization details) #### Error responses | Code | Description | |------|----------------------------------------------------------------------------------------------------------------------------------| | 401 | Unauthorized — authentication token is missing, expired, or invalid. | | 403 | Forbidden — the authenticated user does not have `CAN_USE_SPOTTER` privilege or lacks permission on the referenced conversation. | > ###### Note: > > - This endpoint is deprecated. Use `sendAgentConversationMessage` for new integrations. > - This endpoint is currently in Beta. Breaking changes may be introduced before the endpoint is made Generally Available. > - This endpoint requires Spotter - please contact ThoughtSpot support to enable Spotter on your cluster. + * @param conversationIdentifier Unique identifier for the conversation (used to track context) + * @param sendAgentMessageRequest + */ + sendAgentMessage(conversationIdentifier: string, sendAgentMessageRequest: SendAgentMessageRequest, _options?: Configuration): Promise; + /** + * Version: 26.2.0.cl or later **Deprecated** — Use `sendAgentConversationMessageStreaming` instead. Sends one or more natural language messages to an existing Spotter agent conversation and returns the response as a real-time Server-Sent Events stream. Requires `CAN_USE_SPOTTER` privilege and access to the metadata object associated with the conversation. The user must have access to the conversation session referenced by `conversation_identifier`. A conversation must first be created using the `createAgentConversation` API. #### Usage guidelines The request must include: - `conversation_identifier`: the unique session ID returned by `createAgentConversation`, used for context continuity and message tracking - `messages`: an array of one or more text messages to send to the agent If the request is valid, the API returns a Server-Sent Events (SSE) stream. Each line has the form `data: [{\"type\": \"...\", ...}]` — a JSON array of event objects. Event types include: - `ack`: confirms receipt of the request (`node_id`) - `conv_title`: conversation title (`title`, `conv_id`) - `notification`: status updates on operations (`group_id`, `metadata`, `code` — e.g. `TOOL_CALL_NOTIFICATION`, `nls_start`, `FINAL_RESPONSE_NOTIFICATION`) - `text-chunk`: incremental content chunks (`id`, `group_id`, `metadata` with `format` and `type` such as `thinking` or `text`, `content`) - `text`: full text block with same structure as `text-chunk` - `answer`: structured answer with metadata (`id`, `group_id`, `metadata` with `sage_query`, `session_id`, `title`, etc., `title`) - `error`: if a failure occurs #### Error responses | Code | Description | |------|----------------------------------------------------------------------------------------------------------------------------------| | 401 | Unauthorized — authentication token is missing, expired, or invalid. | | 403 | Forbidden — the authenticated user does not have `CAN_USE_SPOTTER` privilege or lacks permission on the referenced conversation. | > ###### Note: > > - This endpoint is deprecated. Use `sendAgentConversationMessageStreaming` for new integrations. > - This endpoint is currently in Beta. Breaking changes may be introduced before the endpoint is made Generally Available. > - This endpoint requires Spotter - please contact ThoughtSpot support to enable Spotter on your cluster. > - The streaming protocol uses Server-Sent Events (SSE). + * @param sendAgentMessageStreamingRequest + */ + sendAgentMessageStreaming(sendAgentMessageStreamingRequest: SendAgentMessageStreamingRequest, _options?: Configuration): Promise; + /** + * Version: 10.4.0.cl or later Sends a follow-up message to an existing conversation within the context of a data model. Requires `CAN_USE_SPOTTER` privilege and at least view access to the metadata object specified in the request. A conversation must first be created using the `createConversation` API. #### Usage guidelines The request must include: - `conversation_identifier`: the unique session ID returned by `createConversation` - `metadata_identifier`: the unique ID of the data source used for the conversation - `message`: a natural language string with the follow-up question If the request is successful, the API returns an array of response messages, each containing: - `session_identifier`: the unique ID of the generated response - `generation_number`: the generation number of the response - `message_type`: the type of the response (e.g., `TSAnswer`) - `visualization_type`: the generated visualization type (`Chart`, `Table`, or `Undefined`) - `tokens` / `display_tokens`: the search tokens and user-friendly display tokens for the response #### Error responses | Code | Description | |------|-----------------------------------------------------------------------------------------------------------------------------------------| | 401 | Unauthorized — authentication token is missing, expired, or invalid. | | 403 | Forbidden — the authenticated user does not have `CAN_USE_SPOTTER` privilege or lacks view permission on the specified metadata object. | > ###### Note: > * This endpoint is currently in Beta. Breaking changes may be introduced before the endpoint is made Generally Available. > * This endpoint requires Spotter - please contact ThoughtSpot support to enable Spotter on your cluster. + * @param conversationIdentifier Unique identifier of the conversation. + * @param sendMessageRequest + */ + sendMessage(conversationIdentifier: string, sendMessageRequest: SendMessageRequest, _options?: Configuration): Promise>; + /** + * Version: 10.15.0.cl or later This API allows users to set natural language (NL) instructions for a specific data-model to improve AI-generated answers and query processing. These instructions help guide the AI system to better understand the data context and provide more accurate responses. Requires `CAN_USE_SPOTTER` privilege, either edit access or `SPOTTER_COACHING_PRIVILEGE` on the data model, and a bearer token corresponding to the org where the data model exists. #### Usage guidelines To set NL instructions for a data-model, the request must include: - `data_source_identifier`: The unique ID of the data-model for which to set NL instructions - `nl_instructions_info`: An array of instruction objects, each containing: - `instructions`: Array of text instructions for the LLM - `scope`: The scope of the instruction (`GLOBAL`). Currently only `GLOBAL` is supported. It can be extended to data-model-user scope in future. #### Instructions scope - **GLOBAL**: instructions that apply to all users querying this data model If the request is successful, the API returns: - `success`: a boolean indicating whether the operation completed successfully #### Error responses | Code | Description | |------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| | 401 | Unauthorized — authentication token is missing, expired, or invalid. | | 403 | Forbidden — the authenticated user does not have `CAN_USE_SPOTTER` privilege, lacks edit access or `SPOTTER_COACHING_PRIVILEGE` on the data model, or the bearer token does not correspond to the org where the data model exists. | > ###### Note: > > - To use this API, the user needs either edit access or `SPOTTER_COACHING_PRIVILEGE` on the data model, and must use the bearer token corresponding to the org where the data model exists. > - This endpoint is currently in Beta. Breaking changes may be introduced before the endpoint is made Generally Available. > - Available from version 10.15.0.cl and later. > - This endpoint requires Spotter — please contact ThoughtSpot Support to enable Spotter on your cluster. > - Instructions help improve the accuracy and relevance of AI-generated responses for the specified data-model. + * @param setNLInstructionsRequest + */ + setNLInstructions(setNLInstructionsRequest: SetNLInstructionsRequest, _options?: Configuration): Promise; + /** + * Version: 10.4.0.cl or later Processes a natural language query against a specified data model and returns a single AI-generated answer without requiring a conversation session. Requires `CAN_USE_SPOTTER` privilege and at least view access to the metadata object specified in the request. #### Usage guidelines The request must include: - `query`: a natural language question (e.g., \"What were total sales last quarter?\") - `metadata_identifier`: the unique ID of the data source to query against If the request is successful, the API returns a response message containing: - `session_identifier`: the unique ID of the generated response - `generation_number`: the generation number of the response - `message_type`: the type of the response (e.g., `TSAnswer`) - `visualization_type`: the generated visualization type (`Chart`, `Table`, or `Undefined`) - `tokens` / `display_tokens`: the search tokens and user-friendly display tokens for the response #### Error responses | Code | Description | |------|-----------------------------------------------------------------------------------------------------------------------------------------| | 401 | Unauthorized — authentication token is missing, expired, or invalid. | | 403 | Forbidden — the authenticated user does not have `CAN_USE_SPOTTER` privilege or lacks view permission on the specified metadata object. | > ###### Note: > * This endpoint is currently in Beta. Breaking changes may be introduced before the endpoint is made Generally Available. > * This endpoint requires Spotter - please contact ThoughtSpot support to enable Spotter on your cluster. + * @param singleAnswerRequest + */ + singleAnswer(singleAnswerRequest: SingleAnswerRequest, _options?: Configuration): Promise; + /** + * Stops an in-progress agent conversation response. Version: 26.6.0.cl or later Version: 26.6.0.cl or later Stops an in-progress agent response for the specified conversation. Use this endpoint to cancel a response that is actively being generated — for example, when the user navigates away, reformulates their question, or no longer needs the current result. Requires `CAN_USE_SPOTTER` privilege and access to the specified conversation. #### Usage guidelines The request must include: - `conversation_identifier` *(path parameter)*: the unique ID of the conversation whose active response should be stopped, as returned by `createAgentConversation` A successful request returns an empty `204 No Content` response. If there is no active response in progress at the time of the call, the request is still treated as successful. After stopping a response, the conversation session remains active. You can continue sending messages using `sendAgentConversationMessage` or `sendAgentConversationMessageStreaming`. #### Example request ```bash POST /api/rest/2.0/ai/agent/conversation/{conversation_identifier}/stop-response ``` #### Typical usage scenario This endpoint is useful when integrating Spotter into a chat UI where users can cancel a long-running query. For example: 1. User sends a message via `sendAgentConversationMessageStreaming`. 2. User clicks a \"Stop generating\" button while the response is streaming. 3. Your client calls `stopConversation` with the active `conversation_identifier`. 4. The stream is terminated and the user can ask a new question. #### Error responses | Code | Description | |------|-------------| | 401 | Unauthorized — authentication token is missing, expired, or invalid. | | 403 | Forbidden — the authenticated user does not have `CAN_USE_SPOTTER` privilege or lacks access to the specified conversation. | > ###### Note: > > - Calling this endpoint when no response is in progress does not return an error. > - The conversation context is preserved after stopping — previous messages and answers remain accessible. > - Available from version 26.6.0.cl and later. > - This endpoint requires Spotter — please contact ThoughtSpot Support to enable Spotter on your cluster. > - This feature is available only for **Spotter 3** (`SPOTTER3`) version. + * @param conversationIdentifier Unique identifier of the conversation to stop. + */ + stopConversation(conversationIdentifier: string, _options?: Configuration): Promise; +} + +declare class PromiseAuthenticationApi { + private api; + constructor(configuration: Configuration, requestFactory?: AuthenticationApiRequestFactory, responseProcessor?: AuthenticationApiResponseProcessor); + /** + * Version: 26.6.0.cl or later Enables or disables authentication at cluster or org level for the specified auth type. Currently supports `TRUSTED_AUTH`. #### Required privileges Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) or `CONTROL_TRUSTED_AUTH` (**Can Enable or Disable Trusted Authentication**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled, the `CONTROL_TRUSTED_AUTH` privilege is required. #### Usage guidelines Use `cluster_preferences` to enable or disable authentication at the cluster level. Cluster-level settings can only be configured from the Primary Org. - `ENABLED` — Generates a new access token if one does not exist. An existing token is preserved. - `DISABLED` — Revokes the existing cluster-level access token. Use `org_preferences` to enable or disable authentication for one or more Orgs. Each entry must include an `org_identifier` (unique ID or name) and an `auth_status`. Org-level configuration requires the per-Org authentication feature to be enabled on your instance. - `ENABLED` — Generates a new org-level access token if one does not exist. - `DISABLED` — Revokes the existing org-level access token for that Org. Both `cluster_preferences` and `org_preferences` are optional. Omitting a field leaves the corresponding settings unchanged. If both are omitted, the API returns `204 No Content` without making any changes. **Note**: Cluster-level and org-level settings are independent of each other. Enabling or disabling one does not affect the other. + * @param configureAuthSettingsRequest + */ + configureAuthSettings(configureAuthSettingsRequest: ConfigureAuthSettingsRequest, _options?: Configuration): Promise; + /** + * Version: 9.0.0.cl or later Retrieves details of the current user session for the token provided in the request header. Any ThoughtSpot user can access this endpoint and send an API request. The data returned in the API response varies according to user\'s privilege and object access permissions. **NOTE**: In ThoughtSpot, users with cluster administration privileges can access all Orgs by default. However, unless the administrator is explicitly added to an Org, the Orgs list in the session information returned by the API will include only the Primary Org. To include other Orgs in the API response, you must explicitly add the administrator to each Org in the Admin settings page in the UI or via user REST API. + */ + getCurrentUserInfo(_options?: Configuration): Promise; + /** + * Version: 9.4.0.cl or later Retrieves details of the current session token for the bearer token provided in the request header. This API endpoint does not create a new token. Instead, it returns details about the token, including the token string, creation time, expiration time, and the associated user. Use this endpoint to introspect your current session token, debug authentication issues, or when a frontend application needs session token details. Any ThoughtSpot user with a valid bearer token can access this endpoint and send an API request + */ + getCurrentUserToken(_options?: Configuration): Promise; + /** + * Version: 10.4.0.cl or later Creates an authentication token that provides values for the formula variables in the Row Level Security (RLS) rules for a given user. Recommended for use cases that require Attribute-based access control (ABAC) via RLS. #### Required privileges To add a new user and assign privileges during auto-creation, the `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege is required. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled, the `CONTROL_TRUSTED_AUTH` (**Can Enable or Disable Trusted Authentication**) privilege and edit access to the data source are required. To configure formula variables for all Orgs on your instance or the Primary Org, cluster administration privileges are required. Org administrators can configure formula variables for their respective Orgs. If Role-Based Access Control (RBAC) is enabled, users with the `CAN_MANAGE_VARIABLES` (**Can manage variables**) role privilege can also create and manage variables for their Org context. #### Usage guidelines You can generate a token by providing a `username` and `password`, or by using a `secret_key`. To generate a `secret_key`, the administrator must enable [Trusted authentication](https://developers.thoughtspot.com/docs/trusted-auth-secret-key) in the **Develop** > **Customizations** > **Security Settings** page. **Note**: * When both `password` and `secret_key` are included in the API request, `password` takes precedence. * If [Multi-Factor Authentication (MFA)](https://docs.thoughtspot.com/cloud/latest/authentication-local-mfa) is enabled on your instance, the API login request with `username` and `password` returns an error. You can switch to token-based authentication with `secret_key` or contact ThoughtSpot Support for assistance. The token obtained from ThoughtSpot is valid for 5 minutes by default. You can configure the token expiration time as required. #### ABAC via RLS To implement ABAC via RLS and assign security entitlements to users during session creation, generate a token with custom variable values. The values set in the authentication token are applied to the formula variables referenced in RLS rules at the table level, which determines the data each user can access based on their entitlements. The variable values can be configured to persist for a specific set of Models in user sessions initiated with the token, allowing different RLS rules to be set for different data models. Once defined, the rules are added to the user\'s `variable_values` object, after which all sessions will use the persisted values. For more information, see [ABAC via tokens Documentation](https://developers.thoughtspot.com/docs/abac-via-rls-variables). ##### Formula variables Before defining variable values, ensure the variables are created and available on your instance. To create a formula variable, you can use the **Create variable** (`/api/rest/2.0/template/variables/create`) REST API endpoint, with the variable `type` set as `Formula_Variable` in the API request. The API doesn\'t support `\"persist_option\": \"RESET\"` and `\"persist_option\": \"NONE\"` when `variable_values` are defined in the request. If you are using `variable_values` for token generation, you must use other supported persist options such as `APPEND` or `REPLACE`. If you want to use `RESET` or `NONE`, do not pass any `variable_values`. In such cases, `variable_values` will remain unaffected. #### Supported objects The supported object type is `LOGICAL_TABLE`. When using `object_id` with `variable_values`, models are supported. #### Just-in-time provisioning For [just-in-time user creation and provisioning](https://developers.thoughtspot.com/docs/just-in-time-provisioning), specify the following attributes in the API request: * `auto_create` * `username` * `display_name` * `email` * `groups` Set `auto_create` to `true` if the username does not exist in ThoughtSpot. If the username already exists in ThoughtSpot and `auto_create` is set to `true`, user properties such as display name, email, Org and group entitlements will not be updated with new values. Setting `auto_create` to `true` does not create formula variables. Hence, this setting will not be applicable to `variable_values`. #### Important point to note All options in the token creation APIs that define user access to data in ThoughtSpot will take effect during token creation, not when the token is used for authentication. For example, `auto_create:true` will create the user when the authentication token is created. Persist options such as `APPEND` and `REPLACE` will persist `variable_values` on the user profile when the token is created. + * @param getCustomAccessTokenRequest + */ + getCustomAccessToken(getCustomAccessTokenRequest: GetCustomAccessTokenRequest, _options?: Configuration): Promise; + /** + * Version: 9.0.0.cl or later Generates an authentication token for creating a full session in ThoughtSpot for a given user. Recommended for use cases that do not require Attribute-based access control (ABAC) via Row Level Security (RLS). #### Usage guidelines You can generate a token for a user by providing a `username` and `password`, or by using the `secret_key` generated for your instance. To generate a `secret_key`, the administrator must enable [Trusted authentication](https://developers.thoughtspot.com/docs/trusted-auth-secret-key) in the **Develop** > **Customizations** > **Security Settings** page. **Note**: * When both `password` and `secret_key` are included in the API request, `password` takes precedence. * If [Multi-Factor Authentication (MFA)](https://docs.thoughtspot.com/cloud/latest/authentication-local-mfa) is enabled on your instance, the API login request with `username` and `password` returns an error. You can switch to token-based authentication with `secret_key` or contact ThoughtSpot Support for assistance. The token obtained from ThoughtSpot is valid for 5 minutes by default. You can configure the token expiration time as required. #### Just-in-time provisioning For [just-in-time user creation and provisioning](https://developers.thoughtspot.com/docs/just-in-time-provisioning), specify the following attributes in the API request: * `auto_create` * `username` * `display_name` * `email` * `group_identifiers` Set `auto_create` to `true` if the username does not exist in ThoughtSpot. If the user already exists in ThoughtSpot and `auto_create` is set to `true`, user properties such as display name, email and group assignment will be updated. To add a new user and assign privileges during auto-creation, the `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege is required. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled, the `CONTROL_TRUSTED_AUTH` (**Can Enable or Disable Trusted Authentication**) privilege is required. #### Important point to note All options in the token creation APIs that define user access to data in ThoughtSpot will take effect during token creation, not when the token is used for authentication. For example, `auto_create:true` will create the user when the authentication token is created. + * @param getFullAccessTokenRequest + */ + getFullAccessToken(getFullAccessTokenRequest: GetFullAccessTokenRequest, _options?: Configuration): Promise; + /** + * Version: 9.0.0.cl or later Generates an authentication token that provides access to a specific metadata object. This object list is intersected with the list of objects the user is allowed to access via group membership. For more information, see [Object security](https://docs.thoughtspot.com/cloud/latest/security-data-object#object_security). #### Usage guidelines You can generate a token for a user by providing a `username` and `password`, or by using the `secret_key` generated for your instance. To generate a `secret_key`, the administrator must enable [Trusted authentication](https://developers.thoughtspot.com/docs/trusted-auth-secret-key) in the **Develop** > **Customizations** > **Security Settings** page. **Note**: * When both `password` and `secret_key` are included in the API request, `password` takes precedence. * If [Multi-Factor Authentication (MFA)](https://docs.thoughtspot.com/cloud/latest/authentication-local-mfa) is enabled on your instance, the API login request with `username` and `password` returns an error. You can switch to token-based authentication with `secret_key` or contact ThoughtSpot Support for assistance. The token obtained from ThoughtSpot is valid for 5 minutes by default. You can configure the token expiration time as required. #### Just-in-time provisioning For [just-in-time user creation and provisioning](https://developers.thoughtspot.com/docs/just-in-time-provisioning), specify the following attributes in the API request: * `auto_create` * `username` * `display_name` * `email` * `group_identifiers` Set `auto_create` to `true` if the user is not available in ThoughtSpot. If the user already exists in ThoughtSpot and the `auto_create` parameter is set to `true`, user properties such as display name, email, and group assignment will be updated. To add a new user and assign privileges, the `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege is required. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled, the `CONTROL_TRUSTED_AUTH`(**Can Enable or Disable Trusted Authentication**) privilege is required. #### Important point to note All options in the token creation APIs that define user access to data in ThoughtSpot will take effect during token creation, not when the token is used for authentication. For example, `auto_create:true` will create the user when the authentication token is created. + * @param getObjectAccessTokenRequest + */ + getObjectAccessToken(getObjectAccessTokenRequest: GetObjectAccessTokenRequest, _options?: Configuration): Promise; + /** + * Version: 9.0.0.cl or later Creates a login session for a ThoughtSpot user with Basic authentication. In Basic authentication method, REST clients log in to ThoughtSpot using `username` and `password` attributes. On a multi-tenant cluster with Orgs, users can pass the ID of the Org in the API request to log in to a specific Org context. **Note**: If Multi-Factor Authentication (MFA) is enabled on your instance, the API login request with basic authentication (`username` and `password` ) returns an error. Contact ThoughtSpot Support for assistance. A successful login returns a session cookie that can be used in your subsequent API requests. + * @param loginRequest + */ + login(loginRequest: LoginRequest, _options?: Configuration): Promise; + /** + * Version: 9.0.0.cl or later Logs out a user from their current session. + */ + logout(_options?: Configuration): Promise; + /** + * Version: 9.0.0.cl or later Revokes the authentication token issued for current user session. The token of your current session expires when you make a call to the `/api/rest/2.0/auth/token/revoke` endpoint. the users will not be able to access ThoughtSpot objects until a new token is obtained. To restart your session, request for a new token from ThoughtSpot. See [Get Full Access Token](#/http/api-endpoints/authentication/get-full-access-token). + * @param revokeTokenRequest + */ + revokeToken(revokeTokenRequest: RevokeTokenRequest, _options?: Configuration): Promise; + /** + * Version: 26.6.0.cl or later Returns the authentication configuration for the specified auth type at cluster and org level. Currently supports `TRUSTED_AUTH`. #### Required privileges Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) or `CONTROL_TRUSTED_AUTH` (**Can Enable or Disable Trusted Authentication**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled, the `CONTROL_TRUSTED_AUTH` privilege is required. #### Usage guidelines Use `scope` to control which level of settings are returned: - `CLUSTER` — Returns cluster-level authentication status and access tokens. Accessible only from the Primary Org. - `ORG` — Returns org-level authentication status and access tokens for the current Org. Requires the per-Org authentication feature to be enabled on your instance. - If `scope` is omitted, both cluster and org-level settings are returned based on the caller\'s org context and feature availability. The `access_tokens` array in `cluster_preferences` or `org_preferences` is omitted when no token is configured at that level. **Note**: Access tokens returned in the response are sensitive credentials. Treat them with the same care as passwords. + * @param searchAuthSettingsRequest + */ + searchAuthSettings(searchAuthSettingsRequest: SearchAuthSettingsRequest, _options?: Configuration): Promise; + /** + * Version: 9.12.0.cl or later Validates the authentication token specified in the API request. If your token is not valid, [Get a new token](#/http/api-endpoints/authentication/get-full-access-token). + * @param validateTokenRequest + */ + validateToken(validateTokenRequest: ValidateTokenRequest, _options?: Configuration): Promise; +} + +declare class PromiseCollectionsApi { + private api; + constructor(configuration: Configuration, requestFactory?: CollectionsApiRequestFactory, responseProcessor?: CollectionsApiResponseProcessor); + /** + * Version: 26.4.0.cl or later Creates a new collection in ThoughtSpot. Collections allow you to organize and group related metadata objects such as Liveboards, Answers, worksheets, and other data objects. You can also create nested collections (sub-collections) to build a hierarchical structure. #### Supported operations The API endpoint lets you perform the following operations: * Create a new collection * Add metadata objects (Liveboards, Answers, Logical Tables) to the collection * Create nested collections by adding sub-collections + * @param createCollectionRequest + */ + createCollection(createCollectionRequest: CreateCollectionRequest, _options?: Configuration): Promise; + /** + * Version: 26.4.0.cl or later Deletes one or more collections from ThoughtSpot. #### Delete options * **delete_children**: When set to `true`, deletes the child objects (metadata items) within the collection that the user has access to. Objects that the user does not have permission to delete will be skipped. * **dry_run**: When set to `true`, performs a preview of the deletion operation without actually deleting anything. The response shows what would be deleted, allowing you to review before committing the deletion. #### Response The response includes: * **metadata_deleted**: List of metadata objects that were successfully deleted * **metadata_skipped**: List of metadata objects that were skipped due to lack of permissions or other constraints + * @param deleteCollectionRequest + */ + deleteCollection(deleteCollectionRequest: DeleteCollectionRequest, _options?: Configuration): Promise; + /** + * Version: 26.4.0.cl or later Gets a list of collections available in ThoughtSpot. To get details of a specific collection, specify the collection GUID or name. You can also filter the API response based on the collection name pattern, author, and other criteria. #### Search options * **name_pattern**: Use \'%\' as a wildcard character to match collection names * **collection_identifiers**: Search for specific collections by their GUIDs or names * **include_metadata**: When set to `true`, includes the metadata objects within each collection in the response **NOTE**: If the API returns an empty list, consider increasing the value of the `record_size` parameter. To search across all available collections, set `record_size` to `-1`. + * @param searchCollectionsRequest + */ + searchCollections(searchCollectionsRequest: SearchCollectionsRequest, _options?: Configuration): Promise; + /** + * Version: 26.4.0.cl or later Updates an existing collection in ThoughtSpot. #### Supported operations This API endpoint lets you perform the following operations: * Update collection name and description * Change visibility settings * Add metadata objects to the collection (operation: ADD) * Remove metadata objects from the collection (operation: REMOVE) * Replace all metadata objects in the collection (operation: REPLACE) #### Operation types * **ADD**: Adds the specified metadata objects to the existing collection without removing current items * **REMOVE**: Removes only the specified metadata objects from the collection * **REPLACE**: Replaces all existing metadata objects with the specified items (default behavior) + * @param collectionIdentifier Unique GUID of the collection. Note: Collection names cannot be used as identifiers since duplicate names are allowed. + * @param updateCollectionRequest + */ + updateCollection(collectionIdentifier: string, updateCollectionRequest: UpdateCollectionRequest, _options?: Configuration): Promise; +} + +declare class PromiseConnectionConfigurationsApi { + private api; + constructor(configuration: Configuration, requestFactory?: ConnectionConfigurationsApiRequestFactory, responseProcessor?: ConnectionConfigurationsApiResponseProcessor); + /** + * Version: 10.12.0.cl or later Gets connection configuration objects. Requires `DATAMANAGEMENT` (**Can manage data**) and edit permissions to the connection object, or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) privilege is required. #### Usage guidelines * To get a list of all configurations available in the ThoughtSpot system, send the API request with only the connection name or GUID in the request body. * To fetch details of a configuration object, specify the configuration object name or GUID. + * @param connectionConfigurationSearchRequest + */ + connectionConfigurationSearch(connectionConfigurationSearchRequest: ConnectionConfigurationSearchRequest, _options?: Configuration): Promise>; + /** + * Version: 10.12.0.cl or later Creates an additional configuration to an existing connection to a data warehouse. Requires `DATAMANAGEMENT` (**Can manage data**) or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) privilege is required. #### Usage guidelines * A JSON map of configuration attributes in `configuration`. The following example shows the configuration attributes: ``` { \"user\":\"DEV_USER\", \"password\":\"TestConn123\", \"role\":\"DEV\", \"warehouse\":\"DEV_WH\" } ``` * If the `policy_type` is `PRINCIPALS`, then `policy_principals` is a required field. * If the `policy_type` is `PROCESSES`, then `policy_processes` is a required field. * If the `policy_type` is `NO_POLICY`, then `policy_principals` and `policy_processes` are not required fields. #### Parameterized Connection Support For parameterized connections that use OAuth authentication, only the same_as_parent and policy_process_options attributes are allowed in the API request. These attributes are not applicable to connections that are not parameterized. + * @param createConnectionConfigurationRequest + */ + createConnectionConfiguration(createConnectionConfigurationRequest: CreateConnectionConfigurationRequest, _options?: Configuration): Promise; + /** + * Version: 10.12.0.cl or later Deletes connection configuration objects. Requires `DATAMANAGEMENT` (**Can manage data**) and edit permissions to the connection object, or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) privilege is required. + * @param deleteConnectionConfigurationRequest + */ + deleteConnectionConfiguration(deleteConnectionConfigurationRequest: DeleteConnectionConfigurationRequest, _options?: Configuration): Promise; + /** + * Version: 10.12.0.cl or later Updates a connection configuration object. Requires `DATAMANAGEMENT` (**Can manage data**) and edit permissions to the connection object, or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) privilege is required. #### Supported operations This API endpoint lets you perform the following operations in a single API request: * Edit the name or description of the configuration * Edit the configuration properties * Edit the `policy_type` * Edit the type of authentication * Enable or disable a configuration #### Parameterized Connection Support For parameterized oauth based connections, only the `same_as_parent` and `policy_process_options` attributes are allowed. These attributes are not applicable to connections that are not parameterized. **NOTE**: When updating a configuration where `disabled` is `true`, you must reset `disabled` to `true` in your update request payload. If not explicitly set again, the API will default `disabled` to `false`. + * @param configurationIdentifier Unique ID or name of the configuration. + * @param updateConnectionConfigurationRequest + */ + updateConnectionConfiguration(configurationIdentifier: string, updateConnectionConfigurationRequest: UpdateConnectionConfigurationRequest, _options?: Configuration): Promise; +} + +declare class PromiseConnectionsApi { + private api; + constructor(configuration: Configuration, requestFactory?: ConnectionsApiRequestFactory, responseProcessor?: ConnectionsApiResponseProcessor); + /** + * Version: 9.2.0.cl or later Creates a connection to a data warehouse for live query services. Requires `DATAMANAGEMENT` (**Can manage data**) or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) privilege is required. #### Create a connection without tables To create a connection without tables: 1. Pass these parameters in your API request. * Name of the connection. * Type of the data warehouse to connect to. * A JSON map of configuration attributes in `data_warehouse_config`. The following example shows the configuration attributes for a SnowFlake connection: ``` { \"configuration\":{ \"accountName\":\"thoughtspot_partner\", \"user\":\"tsadmin\", \"password\":\"TestConn123\", \"role\":\"sysadmin\", \"warehouse\":\"MEDIUM_WH\" }, \"authenticationType\": \"SERVICE_ACCOUNT\", \"externalDatabases\":[ ] } ``` 2. Set `validate` to `false`. **NOTE:** If the `authentication_type` is anything other than SERVICE_ACCOUNT, you must explicitly provide the authenticationType property in the payload. If you do not specify authenticationType, the API will default to SERVICE_ACCOUNT as the authentication type. #### Create a connection with tables If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) and `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` (**Can manage data models**) privilege is required. To create a connection with tables: 1. Pass these parameters in your API request. * Name of the connection. * Type of the data warehouse to connect to. * A JSON map of configuration attributes, database details, and table properties in `data_warehouse_config` as shown in the following example: ``` { \"configuration\":{ \"accountName\":\"thoughtspot_partner\", \"user\":\"tsadmin\", \"password\":\"TestConn123\", \"role\":\"sysadmin\", \"warehouse\":\"MEDIUM_WH\" }, \"authenticationType\": \"SERVICE_ACCOUNT\", \"externalDatabases\":[ { \"name\":\"AllDatatypes\", \"isAutoCreated\":false, \"schemas\":[ { \"name\":\"alldatatypes\", \"tables\":[ { \"name\":\"allDatatypes\", \"type\":\"TABLE\", \"description\":\"\", \"selected\":true, \"linked\":true, \"columns\":[ { \"name\":\"CNUMBER\", \"type\":\"INT64\", \"canImport\":true, \"selected\":true, \"isLinkedActive\":true, \"isImported\":false, \"tableName\":\"allDatatypes\", \"schemaName\":\"alldatatypes\", \"dbName\":\"AllDatatypes\" }, { \"name\":\"CDECIMAL\", \"type\":\"INT64\", \"canImport\":true, \"selected\":true, \"isLinkedActive\":true, \"isImported\":false, \"tableName\":\"allDatatypes\", \"schemaName\":\"alldatatypes\", \"dbName\":\"AllDatatypes\" } ] } ] } ] } ] } ``` 2. Set `validate` to `true`. **NOTE:** If the `authentication_type` is anything other than SERVICE_ACCOUNT, you must explicitly provide the authenticationType property in the payload. If you do not specify authenticationType, the API will default to SERVICE_ACCOUNT as the authentication type. + * @param createConnectionRequest + */ + createConnection(createConnectionRequest: CreateConnectionRequest, _options?: Configuration): Promise; + /** + * Version: 9.2.0.cl or later **Important**: This endpoint is deprecated and will be removed from ThoughtSpot in September 2025. ThoughtSpot strongly recommends using the [Delete Connection V2](#/http/api-endpoints/connections/delete-connection-v2) endpoint to delete your connection objects. #### Usage guidelines Deletes a connection object. Requires `DATAMANAGEMENT` (**Can manage data**) and edit permissions to the connection object, or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) privilege is required. **Note**: If a connection has dependent objects, make sure you remove its associations before the delete operation. + * @param deleteConnectionRequest + */ + deleteConnection(deleteConnectionRequest: DeleteConnectionRequest, _options?: Configuration): Promise; + /** + * Version: 10.4.0.cl or later Deletes a connection object. **Note**: If a connection has dependent objects, make sure you remove its associations before the delete operation. Requires `DATAMANAGEMENT` (**Can manage data**) and edit permissions to the connection object, or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) privilege is required. + * @param connectionIdentifier Unique ID or name of the connection. + */ + deleteConnectionV2(connectionIdentifier: string, _options?: Configuration): Promise; + /** + * Version: 9.9.0.cl or later Exports the difference in connection metadata between CDW and ThoughtSpot Requires `DATAMANAGEMENT` (**Can manage data**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the following Data control privileges may be required: - `CAN_MANAGE_CUSTOM_CALENDAR`(**Can manage custom calendars**) - `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) - `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` (**Can manage data models**) To download the connection metadata difference between ThoughtSpot and CDW, pass the connection GUID as `connection_identifier` in the API request. + * @param connectionIdentifier GUID of the connection + */ + downloadConnectionMetadataChanges(connectionIdentifier: string, _options?: Configuration): Promise; + /** + * Version: 9.9.0.cl or later Validates the difference in connection metadata between CDW and ThoughtSpot. Requires `DATAMANAGEMENT` (**Can manage data**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the following Data control privileges may be required: - `CAN_MANAGE_CUSTOM_CALENDAR`(**Can manage custom calendars**) - `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) - `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` (**Can manage data models**) Returns a boolean indicating whether there is any difference between the connection metadata at ThoughtSpot and CDW. To get the connection metadata difference status, pass the connection GUID as `connection_identifier` in the API request. + * @param connectionIdentifier GUID of the connection + */ + fetchConnectionDiffStatus(connectionIdentifier: string, _options?: Configuration): Promise; + /** + * Version: 26.2.0.cl or later Revokes OAuth refresh tokens for users who no longer require access to a data warehouse connection. When a token is revoked, the affected user\'s session for that connection is terminated, and they must re-authenticate to regain access. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) or `DATAMANAGEMENT` (**Can manage data**) privileges. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on the ThoughtSpot instance, users with `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) privilege can also make API requests to revoke tokens for connection users. #### Usage guidelines You can specify different combinations of identifiers to control which refresh tokens are revoked. - **connection_identifier**: Revokes refresh tokens for all users of the connection, except the connection author. - **connection_identifier** and **user_identifiers**: Revokes refresh tokens only for the users specified in the request. If the name or ID of the connection author is included in the request, their token will also be revoked. - **connection_identifier** and **configuration_identifiers**: Revokes refresh tokens for all users on the specified configurations, except the configuration author. - **connection_identifier**, **configuration_identifiers**, and **user_identifiers**: Revokes refresh tokens for the specified users on the specified configurations. - **connection_identifier** and **org_identifiers**: Revokes refresh tokens for the specified Orgs. Applicable only for published connections. - **connection_identifier**, **org_identifiers**, and **user_identifiers**: Revokes refresh tokens for the specified users in the specified Orgs. Applicable only for published connections. **NOTE**: The `org_identifiers` parameter is only applicable for published connections. Using this parameter for unpublished connections will result in an error. Ensure that the connections are published before making the API request. + * @param connectionIdentifier Unique ID or name of the connection whose refresh tokens need to be revoked. All the users associated with the connection will have their refresh tokens revoked except the author. + * @param revokeRefreshTokensRequest + */ + revokeRefreshTokens(connectionIdentifier: string, revokeRefreshTokensRequest: RevokeRefreshTokensRequest, _options?: Configuration): Promise; + /** + * Version: 9.2.0.cl or later Gets connection objects. Requires `DATAMANAGEMENT` (**Can manage data**) or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) privilege is required. - To get a list of all connections available in the ThoughtSpot system, send the API request without any attributes in the request body. - To get the connection objects for a specific type of data warehouse, specify the type in `data_warehouse_types`. - To fetch details of a connection object, specify the connection object GUID or name. The `name_pattern` attribute allows passing partial text with `%` for a wildcard match. - To get details of the database, schemas, tables, or columns from a data connection object, specify `data_warehouse_object_type`. - To get a specific database, schema, table, or column from a connection object, define the object type in `data_warehouse_object_type` and object properties in the `data_warehouse_objects` array. For example, to search for a column, you must pass the database, schema, and table names in the API request. Note that in the following example, object properties are set in a hierarchical order (`database` > `schema` > `table` > `column`). ``` { \"connections\": [ { \"identifier\": \"b9d1f2ef-fa65-4a4b-994e-30fa2d57b0c2\", \"data_warehouse_objects\": [ { \"database\": \"NEBULADEV\", \"schema\": \"INFORMATION_SCHEMA\", \"table\": \"APPLICABLE_ROLES\", \"column\": \"ROLE_NAME\" } ] } ], \"data_warehouse_object_type\": \"COLUMN\" } ``` - To fetch data by `configuration`, specify `data_warehouse_object_type`. For example, to fetch columns from the `DEVELOPMENT` database, specify the `data_warehouse_object_type` as `DATABASE` and define the `configuration` string as `{\"database\":\"DEVELOPMENT\"}`. To get column data for a specific table, specify the table, for example,`{\"database\":\"RETAILAPPAREL\",\"table\":\"PIPES\"}`. - To query connections by `authentication_type`, specify `data_warehouse_object_type`. Supported values for `authentication_type` are: - `SERVICE_ACCOUNT`: For connections that require service account credentials to authenticate to the Cloud Data Warehouse and fetch data. - `OAUTH`: For connections that require OAuth credentials to authenticate to the Cloud Data Warehouse and fetch data. Teradata, Oracle, and Presto Cloud Data Warehouses do not support the OAuth authentication type. - `IAM`: For connections that have the IAM OAuth set up. This authentication type is supported on Amazon Redshift connections only. - `EXTOAUTH`: For connections that have External OAuth set up. ThoughtSpot supports external [OAuth with Microsoft Azure Active Directory (AD)](https://docs.thoughtspot.com/cloud/latest/ connections-snowflake-azure-ad-oauth) and [Okta for Snowflake data connections](https://docs.thoughtspot.com/cloud/latest/connections-snowflake-okta-oauth). - `KEY_PAIR`: For connections that require Key Pair account credentials to authenticate to the Cloud Data Warehouse and fetch data. This authentication type is supported on Snowflake connections only. - `OAUTH_WITH_PKCE`: For connections that require OAuth with PKCE account credentials to authenticate to the Cloud Data Warehouse and fetch data. This authentication type is supported on Snowflake, Starburst, Databricks, Denodo connections only. - `EXTOAUTH_WITH_PKCE`: For connections that require External OAuth With PKCE account credentials to authenticate to the Cloud Data Warehouse and fetch data. This authentication type is supported on Snowflake connections only. - `OAUTH_WITH_PEZ`: For connections that require OAuth With PEZ account credentials to authenticate to the Cloud Data Warehouse and fetch data. This authentication type is supported on Amazon Redshift connections only. - `OAUTH_WITH_SERVICE_PRINCIPAL`: For connections that require OAuth With Service Principal account credentials to authenticate to the Cloud Data Warehouse and fetch data. This authentication type is supported on Databricks connections only. - `PERSONAL_ACCESS_TOKEN`: For connections that require Personal Access Token account credentials to authenticate to the Cloud Data Warehouse and fetch data. This authentication type is supported on Databricks connections only. - `OAUTH_CLIENT_CREDENTIALS`: For connections that require OAuth Client Credentials to authenticate to the Cloud Data Warehouse and fetch data. This authentication type is supported on Snowflake connections only. - To include more details about connection objects in the API response, set `include_details` to `true`. - You can also sort the output by field names and filter connections by tags. **NOTE**: When filtering connection records by parameters other than `data_warehouse_types` or `tag_identifiers`, ensure that you set `record_size` to `-1` and `record_offset` to `0` for precise results. + * @param searchConnectionRequest + */ + searchConnection(searchConnectionRequest: SearchConnectionRequest, _options?: Configuration): Promise>; + /** + * Version: 26.5.0.cl or later Synchronizes connection metadata attributes from your Cloud Data Warehouse (CDW) with ThoughtSpot. Requires the `DATAMANAGEMENT` (**Can manage data**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` (**Can manage data models**) privilege is required. #### Usage guidelines To synchronize attributes from a CDW, specify the connection GUID or name in the `connection_identifier` path parameter and `sync_attributes` in the request body. Default attribute is `[\"DESCRIPTION\"]`. ##### Hierarchical schema * Connection: The connection object for the sync operation. * Tables: Tables for the sync operation. When no table is specified, all tables are synchronized. * Columns: If the table is specified, you can add the columns for the sync operation. If no columns are specified, all columns in the specified table are considered for the sync operation. To set the scope for the sync operation: * Connection-level: To sync all tables and columns, pass an empty request body, or only the attributes in the request body. * Table-level: To synchronize specific tables and their columns, specify the table identifiers in the `tables` array. * Column-level: To synchronize specific columns, specify the table identifier as the key and column identifiers as the value in the `tables` array. ``` { \"tables\": [ {\"table-guid-1\": [\"column-guid-1\", \"column-guid-2\"]}, \"table-guid-2\" ], \"sync_attributes\": [\"DESCRIPTION\"] } ``` ##### API response If the sync operation is successful, the API returns the following information: * Status of the sync operation. For example, `SUCCESS`, `PARTIAL_SUCCESS`, or `NO_UPDATE`. * Number of tables and columns that were updated. * Number of tables and columns with the sync failed status when the overall sync status is `PARTIAL_SUCCESS`. * Message text indicating the sync results. + * @param connectionIdentifier Unique ID or name of the connection. + * @param syncMetadataRequest + */ + syncMetadata(connectionIdentifier: string, syncMetadataRequest: SyncMetadataRequest, _options?: Configuration): Promise; + /** + * Version: 9.2.0.cl or later **Important**: This endpoint is deprecated and will be removed from ThoughtSpot in September 2025. ThoughtSpot strongly recommends using the [Update connection V2](#/http/api-endpoints/connections/update-connection-v2) endpoint to update your connection objects. #### Usage guidelines Updates a connection object. Requires `DATAMANAGEMENT` (**Can manage data**) and edit permissions to the connection object, or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) privilege is required. To update a connection object, pass these parameters in your API request: 1. GUID of the connection object. 2. If you are updating tables or database schema of a connection object: a. Add the updated JSON map of metadata with database, schema, and tables in `data_warehouse_config`. b. Set `validate` to `true`. 3. If you are updating a configuration attribute, connection name, or description, you can set `validate` to `false`. + * @param updateConnectionRequest + */ + updateConnection(updateConnectionRequest: UpdateConnectionRequest, _options?: Configuration): Promise; + /** + * Version: 26.6.0.cl or later Activates or deactivates a connection. A deactivated connection cannot be used for queries or operations until it is activated again. Requires `DATAMANAGEMENT` (**Can manage data**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) privilege is required. Only the connection owner or an administrator can perform this operation. #### Usage guidelines To update the status of a connection, specify the connection GUID or name in the `connection_identifier` path parameter and the desired `status` in the request body. - **ACTIVATED**: Enables the connection. Queries and operations can resume on an activated connection. - **DEACTIVATED**: Disables the connection. It does not remove the connection metadata, but only makes the connection unavailable for queries and operations. You can reactivate a deactivated connection by setting \"status\": \"ACTIVATED\". + * @param connectionIdentifier Unique ID or name of the connection. + * @param updateConnectionStatusRequest + */ + updateConnectionStatus(connectionIdentifier: string, updateConnectionStatusRequest: UpdateConnectionStatusRequest, _options?: Configuration): Promise; + /** + * Version: 10.4.0.cl or later Updates a connection object. Requires `DATAMANAGEMENT` (**Can manage data**) and edit permissions to the connection object, or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) privilege is required. To update a connection object, pass these parameters in your API request: 1. GUID of the connection object. 2. If you are updating tables or database schema of a connection object: a. Add the updated JSON map of metadata with database, schema, and tables in `data_warehouse_config`. b. Set `validate` to `true`. **NOTE:** If the `authentication_type` is anything other than SERVICE_ACCOUNT, you must explicitly provide the authenticationType property in the payload. If you do not specify authenticationType, the API will default to SERVICE_ACCOUNT as the authentication type. * A JSON map of configuration attributes, database details, and table properties in `data_warehouse_config` as shown in the following example: * This is an example of updating a single table in a empty connection: ``` { \"authenticationType\": \"SERVICE_ACCOUNT\", \"externalDatabases\": [ { \"name\": \"DEVELOPMENT\", \"isAutoCreated\": false, \"schemas\": [ { \"name\": \"TS_dataset\", \"tables\": [ { \"name\": \"DEMORENAME\", \"type\": \"TABLE\", \"description\": \"\", \"selected\": true, \"linked\": true, \"gid\": 0, \"datasetId\": \"-1\", \"subType\": \"\", \"reportId\": \"\", \"viewId\": \"\", \"columns\": [ { \"name\": \"Col1\", \"type\": \"VARCHAR\", \"canImport\": true, \"selected\": true, \"description\": \"\", \"isLinkedActive\": true, \"isAggregate\": false }, { \"name\": \"Col2\", \"type\": \"VARCHAR\", \"canImport\": true, \"selected\": true, \"description\": \"\", \"isLinkedActive\": true, \"isAggregate\": false }, { \"name\": \"Col3\", \"type\": \"VARCHAR\", \"canImport\": true, \"selected\": true, \"description\": \"\", \"isLinkedActive\": true, \"isAggregate\": false }, { \"name\": \"Col312\", \"type\": \"VARCHAR\", \"canImport\": true, \"selected\": true, \"description\": \"\", \"isLinkedActive\": true, \"isAggregate\": false }, { \"name\": \"Col4\", \"type\": \"VARCHAR\", \"canImport\": true, \"selected\": true, \"description\": \"\", \"isLinkedActive\": true, \"isAggregate\": false } ], \"relationships\": [] } ] } ] } ], \"configuration\": { \"password\": \"\", \"database\": \"DEVELOPMENT\", \"role\": \"DEV\", \"accountName\": \"thoughtspot_partner\", \"warehouse\": \"DEMO_WH\", \"user\": \"DEV_USER\" } } ``` * This is an example of updating a single table in an existing connection with tables: ``` { \"authenticationType\": \"SERVICE_ACCOUNT\", \"externalDatabases\": [ { \"name\": \"DEVELOPMENT\", \"isAutoCreated\": false, \"schemas\": [ { \"name\": \"TS_dataset\", \"tables\": [ { \"name\": \"CUSTOMER\", \"type\": \"TABLE\", \"description\": \"\", \"selected\": true, \"linked\": true, \"gid\": 0, \"datasetId\": \"-1\", \"subType\": \"\", \"reportId\": \"\", \"viewId\": \"\", \"columns\": [], \"relationships\": [] }, { \"name\": \"tpch5k_falcon_default_schema_users\", \"type\": \"TABLE\", \"description\": \"\", \"selected\": true, \"linked\": true, \"gid\": 0, \"datasetId\": \"-1\", \"subType\": \"\", \"reportId\": \"\", \"viewId\": \"\", \"columns\": [ { \"name\": \"user_id\", \"type\": \"INT64\", \"canImport\": true, \"selected\": true, \"description\": \"\", \"isLinkedActive\": true, \"isAggregate\": false }, { \"name\": \"product_id\", \"type\": \"INT64\", \"canImport\": true, \"selected\": true, \"description\": \"\", \"isLinkedActive\": true, \"isAggregate\": false }, { \"name\": \"user_cost\", \"type\": \"INT64\", \"canImport\": true, \"selected\": true, \"description\": \"\", \"isLinkedActive\": true, \"isAggregate\": false } ], \"relationships\": [] } ] } ] } ], \"configuration\": { \"password\": \"\", \"database\": \"DEVELOPMENT\", \"role\": \"DEV\", \"accountName\": \"thoughtspot_partner\", \"warehouse\": \"DEMO_WH\", \"user\": \"DEV_USER\" } } ``` 3. If you are updating a configuration attribute, connection name, or description, you can set `validate` to `false`. **NOTE:** If the `authentication_type` is anything other than SERVICE_ACCOUNT, you must explicitly provide the authenticationType property in the payload. If you do not specify authenticationType, the API will default to SERVICE_ACCOUNT as the authentication type. * A JSON map of configuration attributes in `data_warehouse_config`. The following example shows the configuration attributes for a Snowflake connection: ``` { \"configuration\":{ \"accountName\":\"thoughtspot_partner\", \"user\":\"tsadmin\", \"password\":\"TestConn123\", \"role\":\"sysadmin\", \"warehouse\":\"MEDIUM_WH\" }, \"externalDatabases\":[ ] } ``` + * @param connectionIdentifier Unique ID or name of the connection. + * @param updateConnectionV2Request + */ + updateConnectionV2(connectionIdentifier: string, updateConnectionV2Request: UpdateConnectionV2Request, _options?: Configuration): Promise; +} + +declare class PromiseCustomActionApi { + private api; + constructor(configuration: Configuration, requestFactory?: CustomActionApiRequestFactory, responseProcessor?: CustomActionApiResponseProcessor); + /** + * Version: 9.6.0.cl or later Creates a custom action that appears as a menu action on a saved Answer or Liveboard visualization. Requires `DEVELOPER` (**Has Developer privilege**) or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `DEVELOPER` (**Has developer privilege**) privilege is required. #### Usage Guidelines The API lets you create the following types of custom actions: * URL-based action Allows pushing data to an external URL. * Callback action Triggers a callback to the host application and initiates a response payload on an embedded ThoughtSpot instance. By default, custom actions are visible to only administrator or developer users. To make a custom action available to other users, and specify the groups in `group_identifiers`. By default, the custom action is set as a _global_ action on all visualizations and saved Answers. To assign a custom action to specific Liveboard visualization, saved Answer, or Worksheet, set `visibility` to `false` in `default_action_config` property and specify the GUID or name of the object in `associate_metadata`. For more information, see [Custom actions](https://developers.thoughtspot.com/docs/custom-action-intro). + * @param createCustomActionRequest + */ + createCustomAction(createCustomActionRequest: CreateCustomActionRequest, _options?: Configuration): Promise; + /** + * Version: 9.6.0.cl or later Removes the custom action specified in the API request. Requires `DEVELOPER` (**Has Developer privilege**) or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `DEVELOPER` (**Has developer privilege**) privilege is required. + * @param customActionIdentifier Unique ID or name of the custom action. + */ + deleteCustomAction(customActionIdentifier: string, _options?: Configuration): Promise; + /** + * Version: 9.6.0.cl or later Gets custom actions configured on the cluster. Requires `DEVELOPER` (**Has Developer privilege**) or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `DEVELOPER` (**Has developer privilege**) privilege is required. + * @param searchCustomActionsRequest + */ + searchCustomActions(searchCustomActionsRequest: SearchCustomActionsRequest, _options?: Configuration): Promise>; + /** + * Version: 9.6.0.cl or later Updates a custom action. Requires `DEVELOPER` (**Has Developer privilege**) or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `DEVELOPER` (**Has developer privilege**) privilege is required. #### Usage Guidelines The API allows you to modify the following properties: * Name of the custom action * Action availability to groups * Association to metadata objects * Authentication settings for a URL-based action For more information, see [Custom actions](https://developers.thoughtspot.com/docs/custom-action-intro). + * @param customActionIdentifier Unique ID or name of the custom action. + * @param updateCustomActionRequest + */ + updateCustomAction(customActionIdentifier: string, updateCustomActionRequest: UpdateCustomActionRequest, _options?: Configuration): Promise; +} + +declare class PromiseCustomCalendarsApi { + private api; + constructor(configuration: Configuration, requestFactory?: CustomCalendarsApiRequestFactory, responseProcessor?: CustomCalendarsApiResponseProcessor); + /** + * Version: 10.12.0.cl or later Creates a new [custom calendar](https://docs.thoughtspot.com/cloud/latest/connections-cust-cal). Requires `DATAMANAGEMENT` (**Can manage data**) or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your ThoughtSpot instance, the `CAN_MANAGE_CUSTOM_CALENDAR` (**Can manage custom calendars**) privilege is required. #### Usage guidelines You can create a custom calendar from scratch or an existing Table in ThoughtSpot. For both methods of calendar creation, the following parameters are required: * Name of the custom calendar. * Calendar creation method. To create a calendar from an existing table, specify the method: - `FROM_EXISTING_TABLE` - Creates calendar from the table reference provided in the API request. - `FROM_INPUT_PARAMS` - Creates a calendar from the parameters defined in the API request. * Connection ID and Table name * Database and schema name attributes: For most Cloud Data Warehouse (CDW) connectors, both `database_name` and `schema_name` attributes are required. However, the attribute requirements are conditional and vary based on the connector type and its metadata structure. For example, for connectors such as Teradata, MySQL, SingleSore, Amazon Aurora MySQL, Amazon RDS MySQL, Oracle, and GCP_MYSQL, the `schema_name` is required, whereas the `database_name` attribute is not. Similarly, connectors such as ClickHouse require you to specify the `database_name` and the schema specification in such cases is optional. **NOTE**: If you are creating a calendar from an existing table, ensure that the referenced table matches the required DDL for custom calendars. If the schema does not match, the API returns an error. ##### Calendar type The API allows you to create the following types of calendars: * `MONTH_OFFSET`. The default calendar type. A `MONTH_OFFSET` calendar is offset by a few months from the standard calendar months (January to December) and the year begins with the month defined in the request. For example, if the `month_offset` value is set as `April`, the calendar year begins in April. * `4-4-5`. Each quarter in the calendar will include two 4-week months followed by one 5-week month. * `4-5-4`. Each quarter in the calendar will include two 4-week months with a 5-week month between. * `5-4-4`. Each quarter begins with a 5-week month, followed by two 4-week months. To start and end the calendar on a specific date, specify the dates in the `MM/DD/YYYY` format. For `MONTH_OFFSET` calendars, ensure that the `start_date` matches the month specified in the `month_offset` attribute. You can also set the starting day of the week and customize the prefixes for year and quarter labels. #### Examples To create a calendar from an existing table: ``` { \"name\": \"MyCustomCalendar1\", \"table_reference\": { \"connection_identifier\": \"4db8ea22-2ff4-4224-b05a-26674717e468\", \"table_name\": \"MyCalendarTable\", \"database_name\": \"RETAILAPPAREL\", \"schema_name\": \"PUBLIC\" }, \"creation_method\": \"FROM_EXISTING_TABLE\", } ``` To create a calendar from scratch: ``` { \"name\": \"MyCustomCalendar1\", \"table_reference\": { \"connection_identifier\": \"4db8ea22-2ff4-4224-b05a-26674717e468\", \"table_name\": \"MyCalendarTable\", \"database_name\": \"RETAILAPPAREL\", \"schema_name\": \"PUBLIC\" }, \"creation_method\": \"FROM_INPUT_PARAMS\", \"calendar_type\": \"MONTH_OFFSET\", \"month_offset\": \"April\", \"start_day_of_week\": \"Monday\", \"quarter_name_prefix\": \"Q\", \"year_name_prefix\": \"FY\", \"start_date\": \"04/01/2025\", \"end_date\": \"04/31/2025\" } ``` + * @param createCalendarRequest + */ + createCalendar(createCalendarRequest: CreateCalendarRequest, _options?: Configuration): Promise; + /** + * Version: 10.12.0.cl or later Deletes a [custom calendar](https://docs.thoughtspot.com/cloud/latest/connections-cust-cal). Requires `DATAMANAGEMENT` (**Can manage data**) or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your ThoughtSpot instance, the `CAN_MANAGE_CUSTOM_CALENDAR` (**Can manage custom calendars**) privilege is required. #### Usage guidelines To delete a custom calendar, specify the calendar ID as a path parameter in the request URL. + * @param calendarIdentifier Unique ID or name of the Calendar. + */ + deleteCalendar(calendarIdentifier: string, _options?: Configuration): Promise; + /** + * Version: 10.12.0.cl or later Exports a [custom calendar](https://docs.thoughtspot.com/cloud/latest/connections-cust-cal) in the CSV format. Requires `DATAMANAGEMENT` (**Can manage data**) or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your ThoughtSpot instance, the `CAN_MANAGE_CUSTOM_CALENDAR` (**Can manage custom calendars**) privilege is required. #### Usage guidelines Use this API to download a custom calendar in the CSV file format. In your API request, specify the following parameters. * Start and end date of the calendar. For \"month offset\" calendars, the start date must match the month defined in the `month_offset` attribute. You can also specify optional parameters such as the starting day of the week and prefixes for the quarter and year labels. + * @param generateCSVRequest + */ + generateCSV(generateCSVRequest: GenerateCSVRequest, _options?: Configuration): Promise; + /** + * Version: 10.12.0.cl or later Gets a list of [custom calendars](https://docs.thoughtspot.com/cloud/latest/connections-cust-cal). Requires `DATAMANAGEMENT` (**Can manage data**) or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your ThoughtSpot instance, the `CAN_MANAGE_CUSTOM_CALENDAR` (**Can manage custom calendars**) privilege is required. #### Usage guidelines By default, the API returns a list of custom calendars for all connection objects. To retrieve custom calendar details for a particular connection, specify the connection ID. You can also use other search parameters such as `name_pattern` and `sort_options` as search filters. The `name_pattern` parameter filters and returns only those objects that match the specified pattern. Use `%` as a wildcard for pattern matching. + * @param searchCalendarsRequest + */ + searchCalendars(searchCalendarsRequest: SearchCalendarsRequest, _options?: Configuration): Promise>; + /** + * Version: 10.12.0.cl or later Updates the properties of a [custom calendar](https://docs.thoughtspot.com/cloud/latest/connections-cust-cal). Requires `DATAMANAGEMENT` (**Can manage data**) or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your ThoughtSpot instance, the `CAN_MANAGE_CUSTOM_CALENDAR` (**Can manage custom calendars**) privilege is required. #### Usage guidelines You can update the properties of a calendar using one of the following methods: * `FROM_INPUT_PARAMS` to update the calendar properties with the values defined in the API request. * `FROM_EXISTING_TABLE` Creates a calendar from the parameters defined in the API request. To update a custom calendar, specify the calendar ID as a path parameter in the request URL and the following parameters in the request body: * Connection ID and Table name * Database and schema name attributes: For most Cloud Data Warehouse (CDW) connectors, both `database_name` and `schema_name` attributes are required. However, the attribute requirements are conditional and vary based on the connector type and its metadata structure. For example, for connectors such as Teradata, MySQL, SingleSore, Amazon Aurora MySQL, Amazon RDS MySQL, Oracle, and GCP_MYSQL, the `schema_name` is required, whereas the `database_name` attribute is not. Similarly, connectors such as ClickHouse require you to specify the `database_name` and the schema specification in such cases is optional. The API allows you to modify the calendar type, month offset value, start and end date, starting day of the week, and prefixes assigned to the year and quarter labels. #### Examples Update a custom calendar using an existing Table in ThoughtSpot: ``` { \"update_method\": \"FROM_EXISTING_TABLE\", \"table_reference\": { \"connection_identifier\": \"Connection1\", \"database_name\": \"db1\", \"table_name\": \"custom_calendar_2025\", \"schame_name\": \"schemaVar\" } } ``` Update a custom calendar with the attributes defined in the API request: ``` { \"update_method\": \"FROM_INPUT_PARAMS\", \"table_reference\": { \"connection_identifier\": \"Connection1\", \"database_name\": \"db1\", \"table_name\": \"custom_calendar_2025\", \"schame_name\": \"schemaVar\" }, \"month_offset\": \"August\", \"start_day_of_week\": \"Monday\", \"start_date\": \"08/01/2025\", \"end_date\": \"07/31/2026\" } ``` + * @param calendarIdentifier Unique Id or name of the calendar. + * @param updateCalendarRequest + */ + updateCalendar(calendarIdentifier: string, updateCalendarRequest: UpdateCalendarRequest, _options?: Configuration): Promise; +} + +declare class PromiseDBTApi { + private api; + constructor(configuration: Configuration, requestFactory?: DBTApiRequestFactory, responseProcessor?: DBTApiResponseProcessor); + /** + * Version: 9.9.0.cl or later Creates a DBT connection object in ThoughtSpot. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege or `DATAMANAGEMENT` (**Can manage data**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the following Data control privileges may be required: - `CAN_MANAGE_CUSTOM_CALENDAR`(**Can manage custom calendars**) - `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) - `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` (**Can manage data models**) #### About create DBT connection DBT connection in ThoughtSpot is used by the user to define DBT credentials for cloud . The API needs embrace connection, embrace database name, DBT url, import type, DBT account identifier, DBT project identifier, DBT access token and environment details (or) embrace connection, embrace database name, import type, file_content to create a connection object. To know more about DBT, see ThoughtSpot Product Documentation. + * @param connectionName Name of the connection. + * @param databaseName Name of the Database. + * @param importType Mention type of Import + * @param accessToken Access token is mandatory when Import_Type is DBT_CLOUD. + * @param dbtUrl DBT URL is mandatory when Import_Type is DBT_CLOUD. + * @param accountId Account ID is mandatory when Import_Type is DBT_CLOUD + * @param projectId Project ID is mandatory when Import_Type is DBT_CLOUD + * @param dbtEnvId DBT Environment ID\\\" + * @param projectName Name of the project + * @param fileContent Upload DBT Manifest and Catalog artifact files as a ZIP file. This field is Mandatory when Import Type is \\\'ZIP_FILE\\\' + */ + dbtConnection(connectionName: string, databaseName: string, importType?: string, accessToken?: string, dbtUrl?: string, accountId?: string, projectId?: string, dbtEnvId?: string, projectName?: string, fileContent?: HttpFile, _options?: Configuration): Promise; + /** + * Version: 9.9.0.cl or later Resynchronize the existing list of models, tables, worksheet tml’s and import them to Thoughtspot based on the DBT connection object. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege or `DATAMANAGEMENT` (**Can manage data**) privilege, along with an existing DBT connection. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the following data control privileges may be required: - `CAN_MANAGE_CUSTOM_CALENDAR`(**Can manage custom calendars**) - `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) - `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` (**Can manage data models**) + * @param dbtConnectionIdentifier Unique ID of the DBT connection. + * @param fileContent Upload DBT Manifest and Catalog artifact files as a ZIP file. This field is mandatory if the connection was created with import_type ‘ZIP_FILE’ + */ + dbtGenerateSyncTml(dbtConnectionIdentifier: string, fileContent?: HttpFile, _options?: Configuration): Promise; + /** + * Version: 9.9.0.cl or later Generate required table and worksheet and import them. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege or `DATAMANAGEMENT` (**Can manage data**) privilege, along with an existing DBT connection. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the following data control privileges may be required: - `CAN_MANAGE_CUSTOM_CALENDAR`(**Can manage custom calendars**) - `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) - `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` (**Can manage data models**) #### About generate TML Models and Worksheets to be imported can be selected by the user as part of the API. + * @param dbtConnectionIdentifier Unique ID of the DBT connection. + * @param modelTables List of Models and their respective Tables Example: \\\'[{\\\"model_name\\\": \\\"model_name\\\", \\\"tables\\\": [\\\"table_name\\\"]}]\\\' + * @param importWorksheets Mention the worksheet tmls to import + * @param worksheets List of worksheets is mandatory when import_Worksheets is type SELECTED Example: [\\\"worksheet_name\\\"] + * @param fileContent Upload DBT Manifest and Catalog artifact files as a ZIP file. This field is mandatory if the connection was created with import_type ‘ZIP_FILE’ + */ + dbtGenerateTml(dbtConnectionIdentifier: string, modelTables: string, importWorksheets: string, worksheets?: string, fileContent?: HttpFile, _options?: Configuration): Promise; + /** + * Version: 9.9.0.cl or later Gets a list of DBT connection objects by user and organization, available on the ThoughtSpot system. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege or `DATAMANAGEMENT` (**Can manage data**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the following Data control privileges may be required: - `CAN_MANAGE_CUSTOM_CALENDAR`(**Can manage custom calendars**) - `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) - `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` (**Can manage data models**) #### About search DBT connection To get details of a specific DBT connection identifier, database connection identifier, database connection name, database name, project name, project identifier, environment identifier , import type and author. + */ + dbtSearch(_options?: Configuration): Promise>; + /** + * Version: 9.9.0.cl or later Removes the specified DBT connection object from the ThoughtSpot system. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) or `DATAMANAGEMENT` (**Can manage data ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the following Data control privileges may be required: - `CAN_MANAGE_CUSTOM_CALENDAR`(**Can manage custom calendars**) - `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) - `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` (**Can manage data models**) + * @param dbtConnectionIdentifier Unique ID of the DBT Connection. + */ + deleteDbtConnection(dbtConnectionIdentifier: string, _options?: Configuration): Promise; + /** + * Version: 9.9.0.cl or later Updates a DBT connection object. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege or `DATAMANAGEMENT` (**Can manage data ThoughtSpot**) privilege, along with an existing DBT connection. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the following data control privileges may be required: - `CAN_MANAGE_CUSTOM_CALENDAR`(**Can manage custom calendars**) - `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) - `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` (**Can manage data models**) #### About update DBT connection You can modify DBT connection object properties such as embrace connection name, embrace database name, import type, account identifier, access token, project identifier and environment (or) embrace connection, embrace database name, import type, file_content settings. + * @param dbtConnectionIdentifier Unique ID of the DBT Connection. + * @param connectionName Name of the connection. + * @param databaseName Name of the Database. + * @param importType Mention type of Import + * @param accessToken Access token is mandatory when Import_Type is DBT_CLOUD. + * @param dbtUrl DBT URL is mandatory when Import_Type is DBT_CLOUD. + * @param accountId Account ID is mandatory when Import_Type is DBT_CLOUD + * @param projectId Project ID is mandatory when Import_Type is DBT_CLOUD + * @param dbtEnvId DBT Environment ID\\\" + * @param projectName Name of the project + * @param fileContent Upload DBT Manifest and Catalog artifact files as a ZIP file. This field is Mandatory when Import Type is \\\'ZIP_FILE\\\' + */ + updateDbtConnection(dbtConnectionIdentifier: string, connectionName?: string, databaseName?: string, importType?: string, accessToken?: string, dbtUrl?: string, accountId?: string, projectId?: string, dbtEnvId?: string, projectName?: string, fileContent?: HttpFile, _options?: Configuration): Promise; +} + +declare class PromiseDataApi { + private api; + constructor(configuration: Configuration, requestFactory?: DataApiRequestFactory, responseProcessor?: DataApiResponseProcessor); + /** + * Version: 9.0.0.cl or later Fetches data from a saved Answer. Requires at least view access to the saved Answer. The `record_size` attribute determines the number of records to retrieve in an API call. For more information about pagination, record size, and maximum row limit, see [Pagination and record size settings](https://developers.thoughtspot.com/docs/fetch-data-and-report-apis#_pagination_settings_for_data_and_report_apis). + * @param fetchAnswerDataRequest + */ + fetchAnswerData(fetchAnswerDataRequest: FetchAnswerDataRequest, _options?: Configuration): Promise; + /** + * Version: 9.0.0.cl or later Gets data from a Liveboard object and its visualization. Requires at least view access to the Liveboard. #### Usage guidelines In the request body, specify the GUID or name of the Liveboard. To get data for specific visualizations, add the GUIDs or names of the visualizations in the API request. To include unsaved changes in the report, pass the `transient_pinboard_content` script generated from the `getExportRequestForCurrentPinboard` method in the Visual Embed SDK. Upon successful execution, the API returns the report with unsaved changes. If the new Liveboard experience mode, the transient content includes ad hoc changes to visualizations such as sorting, toggling of legends, and data drill down. For more information, and see [Liveboard data API](https://developers.thoughtspot.com/docs/fetch-data-and-report-apis#_fetch_liveboard_data_api). + * @param fetchLiveboardDataRequest + */ + fetchLiveboardData(fetchLiveboardDataRequest: FetchLiveboardDataRequest, _options?: Configuration): Promise; + /** + * Version: 9.0.0.cl or later Generates an Answer from a given data source. Requires at least view access to the data source object (Worksheet or View). #### Usage guidelines To search data, specify the data source GUID in `logical_table_identifier`. The data source can be a Worksheet, View, Table, or SQL view. Pass search tokens in the `query_string` attribute in the API request as shown in the following example: ``` { \"query_string\": \"[sales] by [store]\", \"logical_table_identifier\": \"cd252e5c-b552-49a8-821d-3eadaa049cca\", } ``` For more information about the `query_string` format and data source attribute, see [Search data API](https://developers.thoughtspot.com/docs/fetch-data-and-report-apis#_search_data_api). The `record_size` attribute determines the number of records to retrieve in an API call. For more information about pagination, record size, and maximum row limit, see [Pagination and record size settings](https://developers.thoughtspot.com/docs/fetch-data-and-report-apis#_pagination_settings_for_data_and_report_api). + * @param searchDataRequest + */ + searchData(searchDataRequest: SearchDataRequest, _options?: Configuration): Promise; +} + +declare class PromiseEmailCustomizationApi { + private api; + constructor(configuration: Configuration, requestFactory?: EmailCustomizationApiRequestFactory, responseProcessor?: EmailCustomizationApiResponseProcessor); + /** + * Version: 10.10.0.cl or later Creates a customization configuration for the notification email. #### Pre-requisites Requires `DEVELOPER` (**has developer privilege**) or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `DEVELOPER` (**Has developer privilege**) privilege is required. **NOTE**:This endpoint in currently in beta. Contact ThoughtSpot support to enable this on your instance. #### Usage guidelines To create a custom configuration pass these parameters in your API request: - A JSON map of configuration attributes `template_properties`. The following example shows a sample set of customization configuration: ``` { { \"cta_button_bg_color\": \"#444DEA\", \"cta_text_font_color\": \"#FFFFFF\", \"primary_bg_color\": \"#D3DEF0\", \"logo_url\": \"https://storage.pardot.com/710713/1642089901EbkRibJq/TS_fullworkmark_darkmode.png\", \"font_family\": \"\", \"product_name\": \"ThoughtSpot\", \"footer_address\": \"444 Castro St, Suite 1000 Mountain View, CA 94041\", \"footer_phone\": \"(800) 508-7008\", \"replacement_value_for_liveboard\": \"Dashboard\", \"replacement_value_for_answer\": \"Chart\", \"replacement_value_for_spot_iq\": \"AI Insights\", \"hide_footer_phone\": false, \"hide_footer_address\": false, \"hide_product_name\": false, \"hide_manage_notification\": false, \"hide_mobile_app_nudge\": false, \"hide_privacy_policy\": false, \"hide_ts_vocabulary_definitions\": false, \"hide_error_message\": false, \"hide_unsubscribe_link\": false, \"hide_notification_status\": false, \"hide_modify_alert\": false, \"company_website_url\": \"https://your-website.com/\", \"company_privacy_policy_url\" : \"https://link-to-privacy-policy.com/\", \"contact_support_url\": \"https://link-to-contact-support.com/\", \"hide_contact_support_url\": false, \"hide_logo_url\" : false } } ``` + * @param createEmailCustomizationRequest + */ + createEmailCustomization(createEmailCustomizationRequest: CreateEmailCustomizationRequest, _options?: Configuration): Promise; + /** + * Version: 10.10.0.cl or later Deletes the configuration for the email customization. #### Pre-requisites Requires `DEVELOPER` (**has developer privilege**) or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `DEVELOPER` (**Has developer privilege**) privilege is required. **NOTE**:This endpoint in currently in beta. Contact ThoughtSpot support to enable this on your instance. #### Usage guidelines - Call the search API endpoint to get the `template_identifier` from the response. - Use that `template_identifier` as a parameter in this API request. + * @param templateIdentifier Unique ID or name of the email customization. + */ + deleteEmailCustomization(templateIdentifier: string, _options?: Configuration): Promise; + /** + * Version: 10.12.0.cl or later Deletes the configuration for the email customization. #### Pre-requisites Requires `DEVELOPER` (**has developer privilege**) or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `DEVELOPER` (**Has developer privilege**) privilege is required. **NOTE**:This endpoint in currently in beta. Contact ThoughtSpot support to enable this on your instance. #### Usage guidelines - Call the search API endpoint to get the `org_identifier` from the response. - Use that `org_identifier` as a parameter in this API request. + * @param deleteOrgEmailCustomizationRequest + */ + deleteOrgEmailCustomization(deleteOrgEmailCustomizationRequest: DeleteOrgEmailCustomizationRequest, _options?: Configuration): Promise; + /** + * Version: 10.10.0.cl or later Search the email customization configuration if any set for the ThoughtSpot system. #### Pre-requisites Requires `DEVELOPER` (**has developer privilege**) or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `DEVELOPER` (**Has developer privilege**) privilege is required. **NOTE**:This endpoint in currently in beta. Contact ThoughtSpot support to enable this on your instance. + * @param searchEmailCustomizationRequest + */ + searchEmailCustomization(searchEmailCustomizationRequest: SearchEmailCustomizationRequest, _options?: Configuration): Promise>; + /** + * Version: 10.12.0.cl or later Updates a customization configuration for the notification email. #### Pre-requisites Requires `DEVELOPER` (**has developer privilege**) or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `DEVELOPER` (**Has developer privilege**) privilege is required. **NOTE**:This endpoint in currently in beta. Contact ThoughtSpot support to enable this on your instance. #### Usage guidelines To update a custom configuration pass these parameters in your API request: - A JSON map of configuration attributes `template_properties`. The following example shows a sample set of customization configuration: ``` { { \"cta_button_bg_color\": \"#444DEA\", \"cta_text_font_color\": \"#FFFFFF\", \"primary_bg_color\": \"#D3DEF0\", \"logo_url\": \"https://storage.pardot.com/710713/1642089901EbkRibJq/TS_fullworkmark_darkmode.png\", \"font_family\": \"\", \"product_name\": \"ThoughtSpot\", \"footer_address\": \"444 Castro St, Suite 1000 Mountain View, CA 94041\", \"footer_phone\": \"(800) 508-7008\", \"replacement_value_for_liveboard\": \"Dashboard\", \"replacement_value_for_answer\": \"Chart\", \"replacement_value_for_spot_iq\": \"AI Insights\", \"hide_footer_phone\": false, \"hide_footer_address\": false, \"hide_product_name\": false, \"hide_manage_notification\": false, \"hide_mobile_app_nudge\": false, \"hide_privacy_policy\": false, \"hide_ts_vocabulary_definitions\": false, \"hide_error_message\": false, \"hide_unsubscribe_link\": false, \"hide_notification_status\": false, \"hide_modify_alert\": false, \"company_website_url\": \"https://your-website.com/\", \"company_privacy_policy_url\" : \"https://link-to-privacy-policy.com/\", \"contact_support_url\": \"https://link-to-contact-support.com/\", \"hide_contact_support_url\": false, \"hide_logo_url\" : false } } ``` + * @param updateEmailCustomizationRequest + */ + updateEmailCustomization(updateEmailCustomizationRequest: UpdateEmailCustomizationRequest, _options?: Configuration): Promise; + /** + * Version: 10.10.0.cl or later Validates the email customization configuration if any set for the ThoughtSpot system. #### Pre-requisites Requires `DEVELOPER` (**has developer privilege**) or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `DEVELOPER` (**Has developer privilege**) privilege is required. **NOTE**:This endpoint in currently in beta. Contact ThoughtSpot support to enable this on your instance. + */ + validateEmailCustomization(_options?: Configuration): Promise; +} + +declare class PromiseGroupsApi { + private api; + constructor(configuration: Configuration, requestFactory?: GroupsApiRequestFactory, responseProcessor?: GroupsApiResponseProcessor); + /** + * Version: 9.0.0.cl or later Creates a group object in ThoughtSpot. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `GROUP_ADMINISTRATION` (**Can manage groups**) privilege is required. #### About groups Groups in ThoughtSpot are used by the administrators to define privileges and organize users based on their roles and access requirements. To know more about groups and privileges, see [ThoughtSpot Product Documentation](https://docs.thoughtspot.com/cloud/latest/groups-privileges). #### Supported operations The API endpoint lets you perform the following operations: * Assign privileges * Add users * Define sharing visibility * Add sub-groups * Assign a default Liveboard + * @param createUserGroupRequest + */ + createUserGroup(createUserGroupRequest: CreateUserGroupRequest, _options?: Configuration): Promise; + /** + * Version: 9.0.0.cl or later Removes the specified group object from the ThoughtSpot system. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `GROUP_ADMINISTRATION` (**Can manage groups**) privilege is required. + * @param groupIdentifier GUID or name of the group. + */ + deleteUserGroup(groupIdentifier: string, _options?: Configuration): Promise; + /** + * Version: 9.0.0.cl or later Imports group objects from external databases into ThoughtSpot. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `GROUP_ADMINISTRATION` (**Can manage groups**) privilege is required. During the import operation: * If the specified group is not available in ThoughtSpot, it will be added to ThoughtSpot. * If `delete_unspecified_groups` is set to `true`, the groups not specified in the API request, excluding administrator and system user groups, are deleted. * If the specified groups are already available in ThoughtSpot, the object properties of these groups are modified and synchronized as per the input data in the API request. A successful API call returns the object that represents the changes made in the ThoughtSpot system. + * @param importUserGroupsRequest + */ + importUserGroups(importUserGroupsRequest: ImportUserGroupsRequest, _options?: Configuration): Promise; + /** + * Version: 9.0.0.cl or later Gets a list of user group objects from the ThoughtSpot system. To get details of a specific user group, specify the user group GUID or name. You can also filter the API response based on User ID, Org ID, Role ID, type of group, sharing visibility, privileges assigned to the group, and the Liveboard IDs assigned to the users in the group. Available to all users. Users with `ADMINISTRATION` (**Can administer ThoughtSpot**) privileges can view all users properties. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `GROUP_ADMINISTRATION` (**Can manage groups**) privilege is required. **NOTE**: If you do not get precise results, try setting `record_size` to `-1` and `record_offset` to `0`. + * @param searchUserGroupsRequest + */ + searchUserGroups(searchUserGroupsRequest: SearchUserGroupsRequest, _options?: Configuration): Promise>; + /** + * Version: 9.0.0.cl or later Updates the properties of a group object in ThoughtSpot. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `GROUP_ADMINISTRATION` (**Can manage groups**) privilege is required. #### Supported operations This API endpoint lets you perform the following operations in a single API request: * Edit [privileges](https://developers.thoughtspot.com/docs/?pageid=api-user-management#group-privileges) * Add or remove users * Change sharing visibility settings * Add or remove sub-groups * Assign a default Liveboard or update the existing settings + * @param groupIdentifier GUID or name of the group. + * @param updateUserGroupRequest + */ + updateUserGroup(groupIdentifier: string, updateUserGroupRequest: UpdateUserGroupRequest, _options?: Configuration): Promise; +} + +declare class PromiseJobsApi { + private api; + constructor(configuration: Configuration, requestFactory?: JobsApiRequestFactory, responseProcessor?: JobsApiResponseProcessor); + /** + * Version: 26.4.0.cl or later Searches delivery history for communication channels such as webhooks. Returns channel-level delivery status for each job execution record. Use this to monitor channel health and delivery success rates across events. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) or `DEVELOPER` (**Has developer privilege**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, users with `CAN_MANAGE_WEBHOOKS` (**Can manage webhooks**) privilege are also authorized to perform this action. **NOTE**: When `channel_type` is `WEBHOOK`, the following constraints apply: - `job_ids`, `channel_identifiers`, and `events` each accept at most one element. - When `job_ids` is provided, it is used as the sole lookup key and other filter fields are ignored. - When `job_ids` is not provided, `channel_identifiers` and `events` are both required, each containing exactly one element. - Records older than the configured retention period are not returned. - Use `start_epoch_time_in_millis` and/or `end_epoch_time_in_millis` to narrow results to a specific time window. + * @param searchChannelHistoryRequest + */ + searchChannelHistory(searchChannelHistoryRequest: SearchChannelHistoryRequest, _options?: Configuration): Promise; +} + +declare class PromiseLogApi { + private api; + constructor(configuration: Configuration, requestFactory?: LogApiRequestFactory, responseProcessor?: LogApiResponseProcessor); + /** + * Version: 9.0.0.cl or later Fetches security audit logs. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the [Admin Control](https://developers.thoughtspot.com/docs/rbac#_admin_control) privileges are required. #### Usage guidelines By default, the API retrieves logs for the last 24 hours. You can set a custom duration in EPOCH time. Make sure the log duration specified in your API request doesn’t exceed 24 hours. If you must fetch logs for a longer time range, modify the duration and make multiple sequential API requests. Upon successful execution, the API returns logs with the following information: * timestamp of the event * event ID * event type * name and GUID of the user * IP address of ThoughtSpot instance For more information see [Audit logs Documentation](https://developers.thoughtspot.com/docs/audit-logs). + * @param fetchLogsRequest + */ + fetchLogs(fetchLogsRequest: FetchLogsRequest, _options?: Configuration): Promise>; +} + +declare class PromiseMetadataApi { + private api; + constructor(configuration: Configuration, requestFactory?: MetadataApiRequestFactory, responseProcessor?: MetadataApiResponseProcessor); + /** + * Convert worksheets to models Version: 10.6.0.cl or later ## Prerequisites - **Privileges Required:** - `DATAMANAGEMENT` (Can manage data) or `ADMINISTRATION` (Can administer ThoughtSpot). - **Additional Privileges (if RBAC is enabled):** - `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` (Can manage data models). --- ## Usage Guidelines ### Parameters 1. **worksheet_ids** - **Description:** A comma-separated list of GUIDs (Globally Unique Identifiers) specifying the Worksheets to be converted. - **Usage:** - Used only when `convert_all` is set to `false`. - Leave empty or omit when `convert_all` is set to `true`. 2. **exclude_worksheet_ids** - **Description:** A comma-separated list of GUIDs specifying Worksheets to be excluded from conversion. - **Usage:** - Useful when `convert_all` is set to `true` and specific Worksheets should not be converted. 3. **convert_all** - **Description:** Sets the scope of conversion. - **Options:** - `true`: Converts all Worksheets in the system, except those specified in `exclude_worksheet_ids`. - `false`: Converts only the Worksheets listed in `worksheet_ids`. 4. **apply_changes** - **Description:** Specifies whether to apply changes directly to ThoughtSpot or to generate a preview before applying any changes.Used for validation of conversion. - **Options:** - `true`: Applies conversion changes directly to ThoughtSpot. - `false`: Generates only a preview of the changes and does not apply any changes to ThoughtSpot --- ## Best Practices 1. **Backup Before Conversion:** Always export metadata as a backup before initiating the conversion process 2. **Partial Conversion for Testing:** Test the conversion process by setting `convert_all` to `false` and specifying a small number of `worksheet_ids`. 3. **Verify Dependencies:** Check for dependent objects, such as Tables and Connections, to avoid invalid references. 4. **Review Changes:** Use `apply_changes: false` to preview the impact of the conversion before applying changes. --- ## Examples ### Convert Specific Worksheets ```json { \"worksheet_ids\": [\"guid1\", \"guid2\", \"guid3\"], \"exclude_worksheet_ids\": [], \"convert_all\": false, \"apply_changes\": true } ``` ### Convert All Accessible Worksheets ```json { \"worksheet_ids\": [], \"exclude_worksheet_ids\": [], \"convert_all\": true, \"apply_changes\": true } ``` ### Exclude Specific Worksheets While Converting All Accessible Worksheets ```json { \"worksheet_ids\": [], \"exclude_worksheet_ids\": [\"abc\"], \"convert_all\": true, \"apply_changes\": true } ``` + * @param convertWorksheetToModelRequest + */ + convertWorksheetToModel(convertWorksheetToModelRequest: ConvertWorksheetToModelRequest, _options?: Configuration): Promise; + /** + * Makes a copy of an Answer or Liveboard Version: 10.3.0.cl or later Creates a copy of a metadata object. Requires at least view access to the metadata object being copied. Upon successful execution, the API creates a copy of the metadata object specified in the API request and returns the ID of the new object. + * @param copyObjectRequest + */ + copyObject(copyObjectRequest: CopyObjectRequest, _options?: Configuration): Promise; + /** + * Version: 9.0.0.cl or later Removes the specified metadata object from the ThoughtSpot system. Requires edit access to the metadata object. + * @param deleteMetadataRequest + */ + deleteMetadata(deleteMetadataRequest: DeleteMetadataRequest, _options?: Configuration): Promise; + /** + * Version: 9.0.0.cl or later Exports the [TML](https://docs.thoughtspot.com/cloud/latest/tml) representation of metadata objects in JSON or YAML format. Requires `DATADOWNLOADING` (**Can download Data**) and at least view access to the metadata object. #### Usage guidelines * You can export one or several objects by passing metadata object GUIDs in the `metadata` array. * When exporting TML content for a Liveboard or Answer object, you can set `export_associated` to `true` to retrieve TML content for underlying Worksheets, Tables, or Views, including the GUID of each object within the headers. When `export_associated` is set to `true`, consider retrieving one metadata object at a time. * Set `export_fqns` to `true` to add FQNs of the referenced objects in the TML content. For example, if you send an API request to retrieve TML for a Liveboard and its associated objects, the API returns the TML content with FQNs of the referenced Worksheet. Exporting TML with FQNs is useful if ThoughtSpot has multiple objects with the same name and you want to eliminate ambiguity when importing TML files into ThoughtSpot. It eliminates the need for adding FQNs of the referenced objects manually during the import operation. * To export only the TML of feedbacks associated with an object, set the GUID of the object as `identifier`, and set the `type` as `FEEDBACK` in the `metadata` array. * To export the TML of an object along with the feedbacks associated with it, set the GUID of the object as `identifier`, set the `type` as `LOGIAL_TABLE` in the `metadata` array, and set `export_with_associated_feedbacks` in `export_options` to true. For more information, see [TML Documentation](https://developers.thoughtspot.com/docs/tml#_export_a_tml). For more information on feedbacks, see [Feedback Documentation](https://docs.thoughtspot.com/cloud/latest/sage-feedback). + * @param exportMetadataTMLRequest + */ + exportMetadataTML(exportMetadataTMLRequest: ExportMetadataTMLRequest, _options?: Configuration): Promise>; + /** + * Version: 10.1.0.cl or later Exports the [TML](https://docs.thoughtspot.com/cloud/latest/tml) representation of metadata objects in JSON or YAML format. ### **Permissions Required** Requires `DATAMANAGEMENT` (**Can manage data**) and `USERMANAGEMENT` (**Can manage users**) privileges. #### **Usage Guidelines** This API is only applicable for `USER`, `GROUP`, and `ROLES` metadata types. - `batch_offset` Indicates the starting position within the complete dataset from which the API should begin returning objects. Useful for paginating results efficiently. - `batch_size` Specifies the number of objects or items to retrieve in a single request. Helps control response size for better performance. - `edoc_format` Defines the format of the TML content. The exported metadata can be in JSON or YAML format. - `export_dependent` Specifies whether to include dependent metadata objects in the export. Ensures related objects are also retrieved if needed. - `all_orgs_override` Indicates whether the export operation applies across all organizations. Useful for multi-tenant environments where cross-org exports are required. + * @param exportMetadataTMLBatchedRequest + */ + exportMetadataTMLBatched(exportMetadataTMLBatchedRequest: ExportMetadataTMLBatchedRequest, _options?: Configuration): Promise; + /** + * Version: 9.0.0.cl or later Fetches the underlying SQL query data for an Answer object. Requires at least view access to the Answer object. Upon successful execution, the API returns the SQL queries for the specified object as shown in this example: ``` { \"metadata_id\":\"8fbe44a8-46ad-4b16-8d39-184b2fada490\", \"metadata_name\":\"Total sales\", \"metadata_type\":\"ANSWER\", \"sql_queries\":[ { \"metadata_id\":\"8fbe44a8-46ad-4b16-8d39-184b2fada490\", \"metadata_name\":\"Total sales -test\", \"sql_query\":\"SELECT \\n \\\"ta_1\\\".\\\"REGION\\\" \\\"ca_1\\\", \\n \\\"ta_2\\\".\\\"PRODUCTNAME\\\" \\\"ca_2\\\", \\n \\\"ta_1\\\".\\\"STORENAME\\\" \\\"ca_3\\\", \\n CASE\\n WHEN sum(\\\"ta_3\\\".\\\"SALES\\\") IS NOT NULL THEN sum(\\\"ta_3\\\".\\\"SALES\\\")\\n ELSE 0\\n END \\\"ca_4\\\", \\n CASE\\n WHEN sum(\\\"ta_3\\\".\\\"QUANTITYPURCHASED\\\") IS NOT NULL THEN sum(\\\"ta_3\\\".\\\"QUANTITYPURCHASED\\\")\\n ELSE 0\\n END \\\"ca_5\\\"\\nFROM \\\"RETAILAPPAREL\\\".\\\"PUBLIC\\\".\\\"FACT_RETAPP_SALES\\\" \\\"ta_3\\\"\\n JOIN \\\"RETAILAPPAREL\\\".\\\"PUBLIC\\\".\\\"DIM_RETAPP_STORES\\\" \\\"ta_1\\\"\\n ON \\\"ta_3\\\".\\\"STOREID\\\" = \\\"ta_1\\\".\\\"STOREID\\\"\\n JOIN \\\"RETAILAPPAREL\\\".\\\"PUBLIC\\\".\\\"DIM_RETAPP_PRODUCTS\\\" \\\"ta_2\\\"\\n ON \\\"ta_3\\\".\\\"PRODUCTID\\\" = \\\"ta_2\\\".\\\"PRODUCTID\\\"\\nGROUP BY \\n \\\"ca_1\\\", \\n \\\"ca_2\\\", \\n \\\"ca_3\\\"\\n\" } ] } ``` + * @param fetchAnswerSqlQueryRequest + */ + fetchAnswerSqlQuery(fetchAnswerSqlQueryRequest: FetchAnswerSqlQueryRequest, _options?: Configuration): Promise; + /** + * Version: 10.4.0.cl or later Gets information about the status of the TML async import task scheduled using the `/api/rest/2.0/metadata/tml/async/import` API call. To fetch the task details, specify the ID of the TML async import task. Requires access to the task ID. The API allows users who initiated the asynchronous TML import via `/api/rest/2.0/metadata/tml/async/import` to view the status of their tasks. Users with administration privilege can view the status of all import tasks initiated by the users in their Org. #### Usage guidelines See [TML API Documentation](https://developers.thoughtspot.com/docs/tml#_fetch_status_of_the_tml_import_task) for usage guidelines. + * @param fetchAsyncImportTaskStatusRequest + */ + fetchAsyncImportTaskStatus(fetchAsyncImportTaskStatusRequest: FetchAsyncImportTaskStatusRequest, _options?: Configuration): Promise; + /** + * Version: 9.0.0.cl or later Fetches the underlying SQL query data for a Liveboard object and its visualizations. Requires at least view access to the Liveboard object. To get SQL query data for a Liveboard, specify the GUID of the Liveboard. Optionally, you can add an array of visualization GUIDs to retrieve the SQL query data for visualizations in the Liveboard. Upon successful execution, the API returns the SQL queries for the specified object as shown in this example: ``` { \"metadata_id\": \"fa68ae91-7588-4136-bacd-d71fb12dda69\", \"metadata_name\": \"Total Sales\", \"metadata_type\": \"LIVEBOARD\", \"sql_queries\": [ { \"metadata_id\": \"b3b6d2b9-089a-490c-8e16-b144650b7843\", \"metadata_name\": \"Total quantity purchased, Total sales by region\", \"sql_query\": \"SELECT \\n \\\"ta_1\\\".\\\"REGION\\\" \\\"ca_1\\\", \\n CASE\\n WHEN sum(\\\"ta_2\\\".\\\"QUANTITYPURCHASED\\\") IS NOT NULL THEN sum(\\\"ta_2\\\".\\\"QUANTITYPURCHASED\\\")\\n ELSE 0\\n END \\\"ca_2\\\", \\n CASE\\n WHEN sum(\\\"ta_2\\\".\\\"SALES\\\") IS NOT NULL THEN sum(\\\"ta_2\\\".\\\"SALES\\\")\\n ELSE 0\\n END \\\"ca_3\\\"\\nFROM \\\"RETAILAPPAREL\\\".\\\"PUBLIC\\\".\\\"FACT_RETAPP_SALES\\\" \\\"ta_2\\\"\\n JOIN \\\"RETAILAPPAREL\\\".\\\"PUBLIC\\\".\\\"DIM_RETAPP_STORES\\\" \\\"ta_1\\\"\\n ON \\\"ta_2\\\".\\\"STOREID\\\" = \\\"ta_1\\\".\\\"STOREID\\\"\\nGROUP BY \\\"ca_1\\\"\" } ] } ``` + * @param fetchLiveboardSqlQueryRequest + */ + fetchLiveboardSqlQuery(fetchLiveboardSqlQueryRequest: FetchLiveboardSqlQueryRequest, _options?: Configuration): Promise; + /** + * Version: 9.0.0.cl or later Imports [TML](https://docs.thoughtspot.com/cloud/latest/tml) files into ThoughtSpot. Requires `DATAMANAGEMENT` (**Can manage data**) or `ADMINISTRATION` (**Can administer ThoughtsSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the following Data control privileges may be required: - `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) - `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` (**Can manage data models**) #### Usage guidelines * Import all related objects in a single TML Import API call. For example, Tables that use the same Connection object and Worksheets connected to these Tables. * Include the `fqn` property to distinguish objects that have the same name. For example, if you have multiple Connections or Worksheets with the same name on ThoughtSpot and the Connection or Worksheet referenced in your TML file does not have a unique name to distinguish, it may result in invalid object references. Adding `fqn` helps ThoughtSpot differentiate a Table from another with the same name. We recommend [exporting TML with FQNs](#/http/api-endpoints/metadata/export-metadata-tml) and using these during the import operation. * You can upload multiple TML files at a time. If you import a Worksheet along with Liveboards, Answers, and other dependent objects in a single API call, the imported objects will be immediately available for use. When you import only a Worksheet object, it may take some time for the Worksheet to become available in the ThoughtSpot system. Please wait for a few minutes, and then proceed to create an Answer and Liveboard from the newly imported Worksheet. For more information, see [TML Documentation](https://developers.thoughtspot.com/docs/tml#_import_a_tml). + * @param importMetadataTMLRequest + */ + importMetadataTML(importMetadataTMLRequest: ImportMetadataTMLRequest, _options?: Configuration): Promise>; + /** + * Version: 10.4.0.cl or later Schedules a task to import [TML](https://docs.thoughtspot.com/cloud/latest/tml) files into ThoughtSpot. You can use this API endpoint to process TML objects asynchronously when importing TMLs of large and complex metadata objects into ThoughtSpot. Unlike the synchronous import TML operation, the API processes TML data in the background and returns a task ID, which can be used to check the status of the import task via `/api/rest/2.0/metadata/tml/async/status` API endpoint. Requires `DATAMANAGEMENT` (**Can manage data**) or `ADMINISTRATION` (**Can administer ThoughtsSpot**) privilege, and edit access to the TML objects. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the following Data control privileges may be required: - `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) - `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` (**Can manage data models**) #### Usage guidelines See [Async TML API Documentation](https://developers.thoughtspot.com/docs/tml#_import_tml_objects_asynchronously) for usage guidelines. + * @param importMetadataTMLAsyncRequest + */ + importMetadataTMLAsync(importMetadataTMLAsyncRequest: ImportMetadataTMLAsyncRequest, _options?: Configuration): Promise; + /** + * Parameterize fields in metadata objects. Version: 10.9.0.cl or later **Note:** This API endpoint is deprecated and will be removed from ThoughtSpot in a future release. Use [POST /api/rest/2.0/metadata/parameterize-fields](/api/rest/2.0/metadata/parameterize-fields) instead. Allows parameterizing fields in metadata objects in ThoughtSpot. Requires appropriate permissions to modify the metadata object. The API endpoint allows parameterizing the following types of metadata objects: * Logical Tables * Connections * Connection Configs For a Logical Table the field type must be `ATTRIBUTE` and field name can be one of: * databaseName * schemaName * tableName For a Connection or Connection Config, the field type is always `CONNECTION_PROPERTY`. In this case, field_name specifies the exact property of the Connection or Connection Config that needs to be parameterized. For Connection Config, the only supported field name is: * impersonate_user + * @param parameterizeMetadataRequest + */ + parameterizeMetadata(parameterizeMetadataRequest: ParameterizeMetadataRequest, _options?: Configuration): Promise; + /** + * Parameterize multiple fields of metadata objects. For example [schemaName, databaseName] for LOGICAL_TABLE. Version: 26.5.0.cl or later Allows parameterizing multiple fields of metadata objects in ThoughtSpot. For example, you can parameterize [schemaName, databaseName] for LOGICAL_TABLE. Requires appropriate permissions to modify the metadata object. The API endpoint allows parameterizing the following types of metadata objects: * Logical Tables * Connections * Connection Configs For a Logical Table, the field type must be `ATTRIBUTE` and field names can include: * databaseName * schemaName * tableName For a Connection or Connection Config, the field type is always `CONNECTION_PROPERTY`. In this case, field_names specifies the exact properties of the Connection or Connection Config that need to be parameterized. For Connection Config, supported field names include: * impersonate_user You can parameterize multiple fields at once by providing an array of field names. + * @param parameterizeMetadataFieldsRequest + */ + parameterizeMetadataFields(parameterizeMetadataFieldsRequest: ParameterizeMetadataFieldsRequest, _options?: Configuration): Promise; + /** + * Version: 9.0.0.cl or later Gets a list of metadata objects available on the ThoughtSpot system. This API endpoint is available to all users who have view access to the object. Users with `ADMINISTRATION` (**Can administer ThoughtSpot**) privileges can view data for all metadata objects, including users and groups. #### Usage guidelines - To get all metadata objects, send the API request without any attributes. - To get metadata objects of a specific type, set the `type` attribute. For example, to fetch a Worksheet, set the type as `LOGICAL_TABLE`. - To filter metadata objects within type `LOGICAL_TABLE`, set the `subtypes` attribute. For example, to fetch a Worksheet, set the type as `LOGICAL_TABLE` & subtypes as `[WORKSHEET]`. - To get a specific metadata object, specify the GUID. - To customize your search and filter the API response, you can use several parameters. You can search for objects created or modified by specific users, by tags applied to the objects, or by using the include parameters like `include_auto_created_objects`, `include_dependent_objects`, `include_headers`, `include_incomplete_objects`, and so on. You can also define sorting options to sort the data retrieved in the API response. - To get discoverable objects when linientmodel is enabled you can use `include_discoverable_objects` as true else false. Default value is true. - For liveboard metadata type, to get the newer format, set the `liveboard_response_format` as V2. Default value is V1. - To retrieve only objects that are published, set the `include_only_published_objects` as true. Default value is false. **NOTE**: The following parameters support pagination of metadata records: - `tag_identifiers` - `type` - `subtypes` - `created_by_user_identifiers` - `modified_by_user_identifiers` - `owned_by_user_identifiers` - `exclude_objects` - `include_auto_created_objects` - `favorite_object_options` - `include_only_published_objects` If you are using other parameters to search metadata, set `record_size` to `-1` and `record_offset` to `0`. + * @param searchMetadataRequest + */ + searchMetadata(searchMetadataRequest: SearchMetadataRequest, _options?: Configuration): Promise>; + /** + * Remove parameterization from fields in metadata objects. Version: 26.5.0.cl or later Allows removing parameterization from fields in metadata objects in ThoughtSpot. Requires appropriate permissions to modify the metadata object. The API endpoint allows unparameterizing the following types of metadata objects: * Logical Tables * Connections * Connection Configs For a Logical Table the field type must be `ATTRIBUTE` and field name can be one of: * databaseName * schemaName * tableName For a Connection or Connection Config, the field type is always `CONNECTION_PROPERTY`. In this case, field_name specifies the exact property of the Connection or Connection Config that needs to be unparameterized. For Connection Config, the only supported field name is: * impersonate_user + * @param unparameterizeMetadataRequest + */ + unparameterizeMetadata(unparameterizeMetadataRequest: UnparameterizeMetadataRequest, _options?: Configuration): Promise; + /** + * Update header attributes for a given list of header objects. Version: 10.6.0.cl or later ## Prerequisites - **Privileges Required:** - `DATAMANAGEMENT` (Can manage data) or `ADMINISTRATION` (Can administer ThoughtSpot). - **Additional Privileges (if RBAC is enabled):** - `ORG_ADMINISTRATION` (Can manage orgs). --- ## Usage Guidelines ### Parameters 1. **headers_update** - **Description:** List of header objects with their attributes to be updated. Each object contains a list of attributes to be updated in the header. - **Usage:** - You must provide either `identifier` or `obj_identifier`, but not both. Both fields cannot be empty. - When `org_identifier` is set to `-1`, only the `identifier` value is accepted; `obj_identifier` is not allowed. 2. **org_identifier** - **Description:** GUID (Globally Unique Identifier) or name of the organization. - **Usage:** - Leaving this field empty assumes that the changes should be applied to the current organization - Provide `org_guid` or `org_name` to uniquely identify the organization where changes need to be applied. . - Provide `-1` if changes have to be applied across all the org. --- ## Note Currently, this API is enabled only for updating the `obj_identifier` attribute. Only `text` will be allowed in attribute\'s value. ## Best Practices 1. **Backup Before Conversion:** Always export metadata as a backup before initiating the update process --- ## Examples ### Only `identifier` is given ```json { \"headers_update\": [ { \"identifier\": \"guid_1\", \"obj_identifier\": \"\", \"type\": \"LOGICAL_COLUMN\", \"attributes\": [ { \"name\": \"obj_id\", \"value\": \"custom_object_id\" } ] } ], \"org_identifier\": \"orgGuid\" } ``` ### Only `obj_identifier` is given ```json { \"headers_update\": [ { \"obj_identifier\": \"custom_object_id\", \"type\": \"ANSWER\", \"attributes\": [ { \"name\": \"obj_id\", \"value\": \"custom_object_id\" } ] } ], \"org_identifier\": \"orgName\" } ``` ### Executing update for all org `-1` ```json { \"headers_update\": [ { \"identifier\": \"guid_1\", \"type\": \"ANSWER\", \"attributes\": [ { \"name\": \"obj_id\", \"value\": \"custom_object_id\" } ] } ], \"org_identifier\": -1 } ``` ### Optional `type` is not provided ```json { \"headers_update\": [ { \"identifier\": \"guid_1\", \"attributes\": [ { \"name\": \"obj_id\", \"value\": \"custom_object_id\" } ] } ], \"org_identifier\": -1 } ``` + * @param updateMetadataHeaderRequest + */ + updateMetadataHeader(updateMetadataHeaderRequest: UpdateMetadataHeaderRequest, _options?: Configuration): Promise; + /** + * Update object IDs for given metadata objects. Version: 10.8.0.cl or later ## Prerequisites - **Privileges Required:** - `DATAMANAGEMENT` (Can manage data) or `ADMINISTRATION` (Can administer ThoughtSpot). - **Additional Privileges (if RBAC is enabled):** - `ORG_ADMINISTRATION` (Can manage orgs). --- ## Usage Guidelines ### Parameters 1. **metadata** - **Description:** List of metadata objects to update their object IDs. - **Usage:** - Use either `current_obj_id` alone OR use `metadata_identifier` with `type` (when needed). - When using `metadata_identifier`, the `type` field is required if using a name instead of a GUID. - The `new_obj_id` field is always required. --- ## Note This API is specifically designed for updating object IDs of metadata objects. It internally uses the header update mechanism to perform the changes. ## Best Practices 1. **Backup Before Update:** Always export metadata as a backup before initiating the update process. 2. **Validation:** - When using `current_obj_id`, ensure it matches the existing object ID exactly. - When using `metadata_identifier` with a name, ensure the `type` is specified correctly. - Verify that the `new_obj_id` follows your naming conventions and is unique within your system. --- ## Examples ### Using current_obj_id ```json { \"metadata\": [ { \"current_obj_id\": \"existing_object_id\", \"new_obj_id\": \"new_object_id\" } ] } ``` ### Using metadata_identifier with GUID ```json { \"metadata\": [ { \"metadata_identifier\": \"01234567-89ab-cdef-0123-456789abcdef\", \"new_obj_id\": \"new_object_id\" } ] } ``` ### Using metadata_identifier with name and type ```json { \"metadata\": [ { \"metadata_identifier\": \"My Answer\", \"type\": \"ANSWER\", \"new_obj_id\": \"new_object_id\" } ] } ``` ### Multiple objects update ```json { \"metadata\": [ { \"current_obj_id\": \"existing_object_id_1\", \"new_obj_id\": \"new_object_id_1\" }, { \"metadata_identifier\": \"My Worksheet\", \"type\": \"LOGICAL_TABLE\", \"new_obj_id\": \"new_object_id_2\" } ] } ``` + * @param updateMetadataObjIdRequest + */ + updateMetadataObjId(updateMetadataObjIdRequest: UpdateMetadataObjIdRequest, _options?: Configuration): Promise; +} + +declare class PromiseOrgsApi { + private api; + constructor(configuration: Configuration, requestFactory?: OrgsApiRequestFactory, responseProcessor?: OrgsApiResponseProcessor); + /** + * Version: 9.0.0.cl or later Creates an Org object. To use this API, the [Orgs](https://docs.thoughtspot.com/cloud/latest/orgs-overview) feature must be enabled in your cluster. Requires cluster administration (**Can administer Org**) privileges. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `ORG_ADMINISTRATION` (**Can manage Orgs**) privilege is required. + * @param createOrgRequest + */ + createOrg(createOrgRequest: CreateOrgRequest, _options?: Configuration): Promise; + /** + * Version: 9.0.0.cl or later Deletes an Org object from the ThoughtSpot system. Requires cluster administration (**Can administer Org**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `ORG_ADMINISTRATION` (**Can manage Orgs**) privilege is required. When you delete an Org, all its users and objects created in that Org context are removed. However, if the users in the deleted Org also exists in other Orgs, they are removed only from the deleted Org. + * @param orgIdentifier ID or name of the Org + */ + deleteOrg(orgIdentifier: string, _options?: Configuration): Promise; + /** + * Version: 9.0.0.cl or later Gets a list of Orgs configured on the ThoughtSpot system. To get details of a specific Org, specify the Org ID or name. You can also pass parameters such as status, visibility, and user identifiers to get a specific list of Orgs. Requires cluster administration (**Can administer Org**) privileges. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `ORG_ADMINISTRATION` (**Can manage Orgs**) privilege is required. + * @param searchOrgsRequest + */ + searchOrgs(searchOrgsRequest: SearchOrgsRequest, _options?: Configuration): Promise>; + /** + * Version: 9.0.0.cl or later Updates an Org object. You can modify Org properties such as name, description, and user associations. Requires cluster administration (**Can administer Org**) privileges. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `ORG_ADMINISTRATION` (**Can manage Orgs**) privilege is required. + * @param orgIdentifier ID or name of the Org + * @param updateOrgRequest + */ + updateOrg(orgIdentifier: string, updateOrgRequest: UpdateOrgRequest, _options?: Configuration): Promise; +} + +declare class PromiseReportsApi { + private api; + constructor(configuration: Configuration, requestFactory?: ReportsApiRequestFactory, responseProcessor?: ReportsApiResponseProcessor); + /** + * Version: 9.0.0.cl or later Exports an Answer in the given file format. You can download the Answer data as a PDF, PNG, CSV, or XLSX file. Requires at least view access to the Answer. #### Usage guidelines In the request body, specify the GUID or name of the Answer and set `file_format`. The default file format is CSV. Use the `type` parameter to specify whether the Answer being exported is a saved Answer (`SAVED`) or a pinned Answer on a Liveboard (`PINNED`). Defaults to `SAVED`. When using `PINNED`, the `metadata_identifier` must be the container id. **NOTE**: * The downloadable file returned in API response file is extensionless. Please rename the downloaded file by typing in the relevant extension. * HTML rendering is not supported for PDF exports of Answers with tables. Optionally, you can define [runtime overrides](https://developers.thoughtspot.com/docs/fetch-data-and-report-apis#_runtime_overrides) to apply to the Answer data. + * @param exportAnswerReportRequest + */ + exportAnswerReport(exportAnswerReportRequest: ExportAnswerReportRequest, _options?: Configuration): Promise; + /** + * Version: 9.0.0.cl or later Exports a Liveboard and its visualizations in PDF, PNG, CSV, or XLSX file format. The default `file_format` is CSV. Requires at least view access to the Liveboard. #### Usage guidelines In the request body, specify the GUID or name of the Liveboard. To generate a Liveboard report with specific visualizations, add GUIDs or names of the visualizations. **NOTE**: * The downloadable file returned in API response file is extensionless. Please rename the downloaded file by typing in the relevant extension. * Optionally, you can define [runtime overrides](https://developers.thoughtspot.com/docs/fetch-data-and-report-apis#_runtime_overrides) to apply to the Answer data. * To include unsaved changes in the report, pass the `transient_pinboard_content` script generated from the `getExportRequestForCurrentPinboard` method in the Visual Embed SDK. Upon successful execution, the API returns the report with unsaved changes, including ad hoc changes to visualizations. For more information, see [Liveboard Report API](https://developers.thoughtspot.com/docs/fetch-data-and-report-apis#_liveboard_report_api). * Starting with ThoughtSpot Cloud 10.9.0.cl release, the Liveboard can be exported in the PNG format in the resolution of your choice. To enable this on your instance, contact ThoughtSpot support. When this feature is enabled, the options `include_cover_page`,`include_filter_page` within the `png_options` will not be available for PNG exports. * Starting with the ThoughtSpot Cloud 26.2.0.cl release, * Liveboards can be exported in CSV format. * All visualizations within a Liveboard can be exported as individual CSV files. * When exporting multiple visualizations or the entire Liveboard, the system returns the report as a compressed ZIP file containing the separate CSV files for each visualization. * Liveboards can also be exported in XLSX format. * All selected visualizations are consolidated into a single Excel workbook (.xlsx), with each visualization placed in its own worksheet (tab). * XLSX exports are limited to a maximum of 255 worksheets (tabs) per workbook. + * @param exportLiveboardReportRequest + */ + exportLiveboardReport(exportLiveboardReportRequest: ExportLiveboardReportRequest, _options?: Configuration): Promise; +} + +declare class PromiseRolesApi { + private api; + constructor(configuration: Configuration, requestFactory?: RolesApiRequestFactory, responseProcessor?: RolesApiResponseProcessor); + /** + * Version: 9.5.0.cl or later Creates a Role object in ThoughtSpot. Available only if [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance. To create a Role, the `ROLE_ADMINISTRATION` (**Can manage roles**) privilege is required. + * @param createRoleRequest + */ + createRole(createRoleRequest: CreateRoleRequest, _options?: Configuration): Promise; + /** + * Version: 9.5.0.cl or later Deletes a Role object from the ThoughtSpot system. Available only if [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance. To delete a Role, the `ROLE_ADMINISTRATION` (**Can manage roles**) privilege is required. + * @param roleIdentifier Unique ID or name of the Role. ReadOnly roles cannot be deleted. + */ + deleteRole(roleIdentifier: string, _options?: Configuration): Promise; + /** + * Version: 9.5.0.cl or later Gets a list of Role objects from the ThoughtSpot system. Available if [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance. To search for Roles, the `ROLE_ADMINISTRATION` (**Can manage roles**) privilege is required. To get details of a specific Role object, specify the GUID or name. You can also filter the API response based on user group and Org identifiers, privileges assigned to the Role, and deprecation status. + * @param searchRolesRequest + */ + searchRoles(searchRolesRequest: SearchRolesRequest, _options?: Configuration): Promise>; + /** + * Version: 9.5.0.cl or later Updates the properties of a Role object. Available only if [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance. To update a Role, the `ROLE_ADMINISTRATION` (**Can manage roles**) privilege is required. + * @param roleIdentifier Unique ID or name of the Role. + * @param updateRoleRequest + */ + updateRole(roleIdentifier: string, updateRoleRequest: UpdateRoleRequest, _options?: Configuration): Promise; +} + +declare class PromiseSchedulesApi { + private api; + constructor(configuration: Configuration, requestFactory?: SchedulesApiRequestFactory, responseProcessor?: SchedulesApiResponseProcessor); + /** + * Create schedule. Version: 9.4.0.cl or later Creates a Liveboard schedule job. Requires at least edit access to Liveboards. To create a schedule on behalf of another user, you need `ADMINISTRATION` (**Can administer Org**) or `JOBSCHEDULING` (**Can schedule for others**) privilege and edit access to the Liveboard. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `JOBSCHEDULING` (**Can schedule for others**) privilege is required. #### Usage guidelines * The description text is mandatory. The description text appears as **Description: ** in the Liveboard schedule email notifications. * For Liveboards with both charts and tables, schedule creation is only supported in PDF and XLS formats. Schedules created in CSV formats for such Liveboards will fail to run. If `PDF` is set as the `file_format`, enable `pdf_options` to get the correct attachment. Not doing so may cause the attachment to be rendered empty. * To include only specific visualizations, specify the visualization GUIDs in the `visualization_identifiers` array. * You can schedule a Liveboard job to run periodically by setting frequency parameters. You can set the schedule to run daily, weekly, monthly or every n minutes or hours. The scheduled job can also be configured to run at a specific time of the day or on specific days of the week or month. Please ensure that when setting the schedule frequency for _minute of the object_, only values that are multiples of 5 are included. * If the `frequency` parameters are defined, you can set the time zone to a value that matches your server\'s time zone. For example, `US/Central`, `Etc/UTC`, `CET`. The default time zone is `America/Los_Angeles`. For more information about Liveboard jobs, see [ThoughtSpot Product Documentation](https://docs.thoughtspot.com/cloud/latest/liveboard-schedule). + * @param createScheduleRequest + */ + createSchedule(createScheduleRequest: CreateScheduleRequest, _options?: Configuration): Promise; + /** + * Deletes a scheduled job. Version: 9.4.0.cl or later Deletes a scheduled Liveboard job. Requires at least edit access to Liveboard or `ADMINISTRATION` (**Can administer Org**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `JOBSCHEDULING` (**Can schedule for others**) privilege is required. + * @param scheduleIdentifier Unique ID or name of the scheduled job. + */ + deleteSchedule(scheduleIdentifier: string, _options?: Configuration): Promise; + /** + * Search Schedules Version: 9.4.0.cl or later Gets a list of scheduled jobs configured for a Liveboard. To get details of a specific scheduled job, specify the name or GUID of the scheduled job. Requires at least view access to Liveboards. **NOTE**: When filtering schedules by parameters other than `metadata`, set `record_size` to `-1` and `record_offset` to `0` for accurate results. + * @param searchSchedulesRequest + */ + searchSchedules(searchSchedulesRequest: SearchSchedulesRequest, _options?: Configuration): Promise>; + /** + * Update schedule. Version: 9.4.0.cl or later Updates a scheduled Liveboard job. Requires at least edit access to Liveboards. To update a schedule on behalf of another user, you need `ADMINISTRATION` (**Can administer Org**) or `JOBSCHEDULING` (**Can schedule for others**) privilege and edit access to the Liveboard. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `JOBSCHEDULING` (**Can schedule for others**) privilege is required. The API endpoint allows you to pause a scheduled job, change the status of a paused job. You can also edit the recipients list, frequency of the job, format of the file to send to the recipients in email notifications, PDF options, and time zone setting. + * @param scheduleIdentifier Unique ID or name of the schedule. + * @param updateScheduleRequest + */ + updateSchedule(scheduleIdentifier: string, updateScheduleRequest: UpdateScheduleRequest, _options?: Configuration): Promise; +} + +declare class PromiseSecurityApi { + private api; + constructor(configuration: Configuration, requestFactory?: SecurityApiRequestFactory, responseProcessor?: SecurityApiResponseProcessor); + /** + * Version: 9.0.0.cl or later Transfers the ownership of one or several objects from one user to another. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `USER_ADMINISTRATION` (**Can manage users**) privilege and edit access to the objects are required. + * @param assignChangeAuthorRequest + */ + assignChangeAuthor(assignChangeAuthorRequest: AssignChangeAuthorRequest, _options?: Configuration): Promise; + /** + * Version: 10.12.0.cl or later Fetches column security rules for specified tables. This API endpoint retrieves column-level security rules configured for tables. It returns information about which columns are secured and which groups have access to those columns. #### Usage guidelines - Provide an array of table identifiers using either `identifier` (GUID or name) or `obj_identifier` (object ID) - At least one of `identifier` or `obj_identifier` must be provided for each table - The API returns column security rules for all specified tables - Users must have appropriate permissions to access security rules for the specified tables #### Required permissions - `ADMINISTRATION` - Can administer ThoughtSpot - `DATAMANAGEMENT` - Can manage data - `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` - Can manage worksheet views and tables #### Example request ```json { \"tables\": [ { \"identifier\": \"table-guid\", \"obj_identifier\": \"table-object-id\" } ] } ``` #### Response format The API returns an array of `ColumnSecurityRuleResponse` objects wrapped in a `data` field. Each `ColumnSecurityRuleResponse` object contains: - Table information (GUID and object ID) - Array of column security rules with column details, group access, and source table information #### Example response ```json { \"data\": [ { \"guid\": \"table-guid\", \"objId\": \"table-object-id\", \"columnSecurityRules\": [ { \"column\": { \"id\": \"col_123\", \"name\": \"Salary\" }, \"groups\": [ { \"id\": \"group_1\", \"name\": \"HR Department\" } ], \"sourceTableDetails\": { \"id\": \"source-table-guid\", \"name\": \"Employee_Data\" } } ] } ] } ``` + * @param fetchColumnSecurityRulesRequest + */ + fetchColumnSecurityRules(fetchColumnSecurityRulesRequest: FetchColumnSecurityRulesRequest, _options?: Configuration): Promise>; + /** + * Version: 26.3.0.cl or later This API fetches the object privileges present for the given list of principals (user or group), on the given set of objects. It supports pagination, which can be enabled and configured using the request parameters. It provides users access to certain features based on privilege based access control. #### Usage guidelines - Specify the `type` (`USER` or `USER_GROUP`) and `identifier` (either GUID or name) of the principals for which you want to retrieve object privilege information in the `principals` array. - Specify the `type` (`LOGICAL_TABLE`) and `identifier` (either GUID or name) of the metadata objects for which you want to retrieve object privilege information in the `metadata` array. Only `LOGICAL_TABLE` metadata type is supported for now. It may be extended for other metadata types in future. - To control the offset from where principals have to be fetched, use `record_offset`. When `record_offset` is 0, information is fetched from the beginning. - To control the number of principals to be fetched, use `record_size`. Default `record_size` is 20. - Ensure `record_offset` for a subsequent request is one more than the value of `record_size` of the previous request. - Ensure using correct Authorization Bearer Token corresponding to specific user & org. #### Example request ```json { \"principals\": [ { \"type\": \"type-1\", \"identifier\": \"principal-guid-or-name-1\" }, { \"type\": \"type-2\", \"identifier\": \"principal-guid-or-name-2\" } ], \"metadata\": [ { \"type\": \"metadata-type-1\", \"identifier\": \"metadata-guid-or-name-1\" }, { \"type\": \"metadata-type-2\", \"identifier\": \"metadata-guid-or-name-2\" } ], \"record_offset\": 0, \"record_size\": 20 } ``` #### Response format The API returns an array of `metadata_object_privileges` objects wrapped in JSON. Each `metadata_object_privileges` object contains: - Metadata information (GUID, name and type) - Array of `principal_object_privilege_info`. - Each `principal_object_privilege_info` contains: - Principal type. All principals of this type are listed as described below. - Array of `principal_object_privileges`. - Each `principal_object_privileges` contains: - Principal information (GUID, name, subtype) - List of applied object level privileges. #### Example response ```json { \"metadata_object_privileges\": [ { \"metadata_id\": \"metadata-guid-1\", \"metadata_name\": \"metadata-name-1\", \"metadata_type\": \"metadata-type-1\", \"principal_object_privilege_info\": [ { \"principal_type\": \"principal-type-1\", \"principal_object_privileges\": [ { \"principal_id\": \"principal-guid-1\", \"principal_name\": \"principal-name-1\", \"principal_sub_type\": \"principal-sub-type-1\", \"object_privileges\": \"[object-privilege-1, object-privilege-2]\" }, { \"principal_id\": \"principal-guid-2\", \"principal_name\": \"principal-name-2\", \"principal_sub_type\": \"principal-sub-type-2\", \"object_privileges\": \"[object-privilege-1, object-privilege-2]\" } ] }, { \"principal_type\": \"principal-type-2\", \"principal_object_privileges\": [ { \"principal_id\": \"principal-guid-3\", \"principal_name\": \"principal-guid-4\", \"principal_sub_type\": \"principal-sub-type-4\", \"object_privileges\": \"[object-privilege-1]\" } ] } ] }, { \"metadata_id\": \"metadata-guid-2\", \"metadata_name\": \"metadata-name-2\", \"metadata_type\": \"metadata-type-2\", \"principal_object_privilege_info\": [ { \"principal_type\": \"principal-type-1\", \"principal_object_privileges\": [ { \"principal_id\": \"principal-guid-1\", \"principal_name\": \"principal-name-1\", \"principal_sub_type\": \"principal-sub-type-1\", \"object_privileges\": \"[object-privilege-3, object-privilege-4]\" }, { \"principal_id\": \"principal-guid-2\", \"principal_name\": \"principal-name-2\", \"principal_sub_type\": \"principal-sub-type-2\", \"object_privileges\": \"[object-privilege-4]\" } ] } ] } ] } ``` + * @param fetchObjectPrivilegesRequest + */ + fetchObjectPrivileges(fetchObjectPrivilegesRequest: FetchObjectPrivilegesRequest, _options?: Configuration): Promise; + /** + * Version: 9.0.0.cl or later Fetches object permission details for a given principal object such as a user and group. Requires view access to the metadata object. #### Usage guidelines * To get a list of all metadata objects that a user or group can access, specify the `type` and GUID or name of the principal. * To get permission details for a specific object, add the `type` and GUID or name of the metadata object to your API request. Upon successful execution, the API returns a list of metadata objects and permission details for each object. + * @param fetchPermissionsOfPrincipalsRequest + */ + fetchPermissionsOfPrincipals(fetchPermissionsOfPrincipalsRequest: FetchPermissionsOfPrincipalsRequest, _options?: Configuration): Promise; + /** + * Version: 9.0.0.cl or later Fetches permission details for a given metadata object. Requires view access to the metadata object. #### Usage guidelines * To fetch a list of users and groups for a metadata object, specify `type` and GUID or name of the metadata object. * To get permission details for a specific user or group, add `type` and GUID or name of the principal object to your API request. Upon successful execution, the API returns permission details and principal information for the object specified in the API request. + * @param fetchPermissionsOnMetadataRequest + */ + fetchPermissionsOnMetadata(fetchPermissionsOnMetadataRequest: FetchPermissionsOnMetadataRequest, _options?: Configuration): Promise; + /** + * Version: 26.3.0.cl or later This API allows the addition or deletion of object level privileges for a set of users and groups, on a set of metadata objects. It provides users to access certain features based on privilege based access control. #### Usage guidelines - Specify the `operation`. The supported operations are: `ADD`, `REMOVE`. - Specify the type of the objects on which the object privileges are being provided in `metadata_type`. Only `LOGICAL_TABLE` metadata type is supported for now. It may be extended for other metadata types in future. - Specify the list of object privilege types in the `object_privilege_types` array. The supported object privilege types are: `SPOTTER_COACHING_PRIVILEGE`. - Specify the identifiers (either GUID or name) for the metadata objects in the `metadata_identifiers` array. - Specify the `type` (`USER` or `USER_GROUP`) and `identifier` (either GUID or name) of the principals to which you want to apply the given operation and given object privileges in the `principals` array. - Ensure using correct Authorization Bearer Token corresponding to specific user & org. #### Example request ```json { \"operation\": \"operation-type\", \"metadata_type\": \"metadata-type\", \"object_privilege_types\": [\"privilege-type-1\", \"privilege-type-2\"], \"metadata_identifiers\": [\"metadata-guid-or-name-1\", \"metadata-guid-or-name-1\"], \"principals\": [ { \"type\": \"type-1\", \"identifier\": \"principal-guid-or-name-1\" }, { \"type\": \"type-2\", \"identifier\": \"principal-guid-or-name-2\" } ] } ``` > ###### Note: > * Only admin users, users with edit access and users with coaching privilege on a given data-model can add or remove principals related to SPOTTER_COACHING_PRIVILEGE + * @param manageObjectPrivilegeRequest + */ + manageObjectPrivilege(manageObjectPrivilegeRequest: ManageObjectPrivilegeRequest, _options?: Configuration): Promise; + /** + * Version: 26.5.0.cl or later Allows publishing metadata objects across organizations in ThoughtSpot. Requires ADMINISTRATION role and TENANT scope. The API endpoint allows publishing the following types of metadata objects: * Liveboards * Answers * Logical Tables This API will essentially share the objects along with it\'s dependencies to the org admins of the orgs to which it is being published. + * @param publishMetadataRequest + */ + publishMetadata(publishMetadataRequest: PublishMetadataRequest, _options?: Configuration): Promise; + /** + * Version: 9.0.0.cl or later Allows sharing one or several metadata objects with users and groups in ThoughtSpot. Requires edit access to the metadata object. #### Supported metadata objects: * Liveboards * Visualizations * Answers * Models * Views * Connections * Collections #### Object permissions You can provide `READ_ONLY` or `MODIFY` access when sharing an object with another user or group. The `READ_ONLY` permission grants view access to the shared object, whereas `MODIFY` provides edit access. To prevent a user or group from accessing the shared object, specify the GUID or name of the principal and set `shareMode` to `NO_ACCESS`. #### Sharing a visualization * Sharing a visualization implicitly shares the entire Liveboard with the recipient. * Object permissions set for a shared visualization also apply to the Liveboard unless overridden by another API request or via UI. * If email notifications for object sharing are enabled, a notification with a link to the shared visualization will be sent to the recipient’s email address. Although this link opens the shared visualization, recipients can also access other visualizations in the Liveboard. #### Sharing a collection Collections support **dual permissions** that provide fine-grained control: * **Collection permissions** (`share_mode`) - controls access to the collection itself (view, edit, delete the collection) * **Content permissions** (`content_share_mode`) - controls access to objects within the collection (view, edit objects inside) **Default Behavior:** - If only `share_mode` is specified, the content permissions default to `READ_ONLY` (except when `share_mode` is `NO_ACCESS`, then content also gets `NO_ACCESS`) - To give users edit access to collection contents, explicitly set `content_share_mode: \"MODIFY\"` ## Examples The following JSON examples can be copy-pasted as request bodies for the REST v2 API endpoint: ```bash POST /callosum/v1/v2/security/metadata/share Content-Type: application/x-www-form-urlencoded ``` ### Basic collection sharing Share a collection with read-only access: ```json { \"metadata_type\": \"COLLECTION\", \"metadata_identifiers\": [\"Sales Reports Collection\"], \"permissions\": [{ \"principal\": { \"type\": \"USER\", \"identifier\": \"alice@company.com\" }, \"share_mode\": \"READ_ONLY\" }], \"notification\": { \"message\": \"I\'ve shared the Sales Reports collection with you\", \"notify_on_share\": true } } ``` ### Collection sharing with dual permissions Share a collection with different permissions for the collection vs. its contents: ```json { \"metadata_type\": \"COLLECTION\", \"metadata_identifiers\": [\"Marketing Analytics\"], \"permissions\": [{ \"principal\": { \"type\": \"USER\", \"identifier\": \"bob@company.com\" }, \"share_mode\": \"MODIFY\", \"content_share_mode\": \"READ_ONLY\" }, { \"principal\": { \"type\": \"USER_GROUP\", \"identifier\": \"Marketing Team\" }, \"share_mode\": \"READ_ONLY\", \"content_share_mode\": \"READ_ONLY\" }], \"notification\": { \"emails\": [\"bob@company.com\"], \"message\": \"You can edit the collection but content is read-only\", \"enable_custom_url\": false, \"notify_on_share\": true }, \"has_lenient_discoverability\": false } ``` ### Multiple collections sharing Share multiple collections with different users: ```json { \"metadata\": [ { \"type\": \"COLLECTION\", \"identifier\": \"Q4 Reports\" }, { \"type\": \"COLLECTION\", \"identifier\": \"Executive Dashboard Collection\" } ], \"permissions\": [{ \"principal\": { \"type\": \"USER_GROUP\", \"identifier\": \"Executives\" }, \"share_mode\": \"MODIFY\" }, { \"principal\": { \"type\": \"USER\", \"identifier\": \"manager@company.com\" }, \"share_mode\": \"READ_ONLY\", \"content_share_mode\": \"MODIFY\" }], \"notification\": { \"message\": \"Sharing quarterly collections with leadership team\", \"notify_on_share\": true } } ``` ### Remove collection access Remove access to a collection by setting share_mode to NO_ACCESS: ```json { \"metadata_type\": \"COLLECTION\", \"metadata_identifiers\": [\"Confidential Reports\"], \"permissions\": [{ \"principal\": { \"type\": \"USER\", \"identifier\": \"former-employee@company.com\" }, \"share_mode\": \"NO_ACCESS\" }], \"notification\": { \"notify_on_share\": false } } ``` ### Collection Permission Scenarios **Scenario 1: Collection Admin** - `share_mode: MODIFY` + `content_share_mode: MODIFY` = Full control over collection and its contents **Scenario 2: Collection Curator** - `share_mode: MODIFY` + `content_share_mode: READ_ONLY` = Can manage collection structure but not edit contents **Scenario 3: Content Editor** - `share_mode: READ_ONLY` + `content_share_mode: MODIFY` = Can edit objects within collection but can\'t change collection itself **Scenario 4: Viewer** - `share_mode: READ_ONLY` + `content_share_mode: READ_ONLY` = View-only access to collection and contents + * @param shareMetadataRequest + */ + shareMetadata(shareMetadataRequest: ShareMetadataRequest, _options?: Configuration): Promise; + /** + * Version: 26.5.0.cl or later Allows unpublishing metadata objects from organizations in ThoughtSpot. Requires ADMINISTRATION role and TENANT scope. The API endpoint allows unpublishing the following types of metadata objects: * Liveboards * Answers * Logical Tables When unpublishing objects, you can: * Include dependencies by setting `include_dependencies` to true - this will unpublish all dependent objects if no other published object is using them * Force unpublish by setting `force` to true - this will break all dependent objects in the unpublished organizations + * @param unpublishMetadataRequest + */ + unpublishMetadata(unpublishMetadataRequest: UnpublishMetadataRequest, _options?: Configuration): Promise; + /** + * Version: 10.12.0.cl or later Creates, updates, or deletes column security rules for specified tables. This API endpoint allows you to create, update, or delete column-level security rules on columns of a table. The operation follows an \"all or none\" policy: if defining security rules for any of the provided columns fails, the entire operation will be rolled back, and no rules will be created. #### Usage guidelines - Provide table identifier using either `identifier` (GUID or name) or `obj_identifier` (object ID) - Use `clear_csr: true` to remove all column security rules from the table - For each column, specify the security rule using `column_security_rules` array - Use `is_unsecured: true` to mark a specific column as unprotected - Use `group_access` operations to manage group associations: - `ADD`: Add groups to the column\'s access list - `REMOVE`: Remove groups from the column\'s access list - `REPLACE`: Replace all existing groups with the specified groups #### Required permissions - `ADMINISTRATION` - Can administer ThoughtSpot - `DATAMANAGEMENT` - Can manage data (if RBAC is disabled) - `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` - Can manage worksheet views and tables (if RBAC is enabled) #### Example request ```json { \"identifier\": \"table-guid\", \"obj_identifier\": \"table-object-id\", \"clear_csr\": false, \"column_security_rules\": [ { \"column_identifier\": \"col id or col name\", \"is_unsecured\": false, \"group_access\": [ { \"operation\": \"ADD\", \"group_identifiers\": [\"hr_group_id\", \"hr_group_name\", \"finance_group_id\"] } ] }, { \"column_identifier\": \"col id or col name\", \"is_unsecured\": true }, { \"column_identifier\": \"col id or col name\", \"is_unsecured\": false, \"group_access\": [ { \"operation\": \"REPLACE\", \"group_identifiers\": [\"management_group_id\", \"management_group_name\"] } ] } ] } ``` #### Request Body Schema - `identifier` (string, optional): GUID or name of the table for which we want to create column security rules - `obj_identifier` (string, optional): The object ID of the table - `clear_csr` (boolean, optional): If true, then all the secured columns will be marked as unprotected, and all the group associations will be removed - `column_security_rules` (array of objects, required): An array where each object defines the security rule for a specific column Each column security rule object contains: - `column_identifier` (string, required): Column identifier (col_id or name) - `is_unsecured` (boolean, optional): If true, the column will be marked as unprotected and all groups associated with it will be removed - `group_access` (array of objects, optional): Array of group operation objects Each group operation object contains: - `operation` (string, required): Operation type - ADD, REMOVE, or REPLACE - `group_identifiers` (array of strings, required): Array of group identifiers (name or GUID) on which the operation will be performed #### Response This API does not return any response body. A successful operation returns HTTP 200 status code. #### Operation Types - **ADD**: Adds the specified groups to the column\'s access list - **REMOVE**: Removes the specified groups from the column\'s access list - **REPLACE**: Replaces all existing groups with the specified groups + * @param updateColumnSecurityRulesRequest + */ + updateColumnSecurityRules(updateColumnSecurityRulesRequest: UpdateColumnSecurityRulesRequest, _options?: Configuration): Promise; +} + +declare class PromiseSystemApi { + private api; + constructor(configuration: Configuration, requestFactory?: SystemApiRequestFactory, responseProcessor?: SystemApiResponseProcessor); + /** + * Version: 10.14.0.cl or later Configure communication channel preferences. - Use `cluster_preferences` to update the default preferences for your ThoughtSpot application instance. - If your instance has [Orgs](https://docs.thoughtspot.com/cloud/latest/orgs-overview), use `org_preferences` to specify Org-specific preferences that override the defaults. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) or `DEVELOPER` (**Has developer privilege**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, users with `APPLICATION_ADMINISTRATION` (**Can manage application settings**) privilege are also authorized to perform this action. + * @param configureCommunicationChannelPreferencesRequest + */ + configureCommunicationChannelPreferences(configureCommunicationChannelPreferencesRequest: ConfigureCommunicationChannelPreferencesRequest, _options?: Configuration): Promise; + /** + * Version: 26.2.0.cl or later Configure security settings for your ThoughtSpot application instance. - Use `cluster_preferences` to update cluster-level security settings including CORS whitelisted URLs, CSP settings, SAML redirect URLs, partitioned cookies, and non-embed access configuration. - Use `org_preferences` to configure Org-specific security settings. If your instance has [Orgs](https://docs.thoughtspot.com/cloud/latest/orgs-overview), this allows configuring CORS and non-embed access settings specific to the Org. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) or `DEVELOPER` (**Has developer privilege**) privilege. Cluster-level SAML and script-src settings require `ADMINISTRATION` privilege. See [Security Settings](https://developers.thoughtspot.com/docs/security-settings) for more details. + * @param configureSecuritySettingsRequest + */ + configureSecuritySettings(configureSecuritySettingsRequest: ConfigureSecuritySettingsRequest, _options?: Configuration): Promise; + /** + * Version: 9.0.0.cl or later Retrieves the current configuration details of the cluster. If the request is successful, the API returns a list configuration settings applied on the cluster. Requires `ADMINISTRATION`(**Can administer ThoughtSpot**) privilege to view these complete configuration settings of the cluster. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `SYSTEM_INFO_ADMINISTRATION` (**Can view system activities**) privilege is required. This API does not require any parameters to be passed in the request. + */ + getSystemConfig(_options?: Configuration): Promise; + /** + * Version: 9.0.0.cl or later Gets system information such as the release version, locale, time zone, deployment environment, date format, and date time format of the cluster. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privileges. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `SYSTEM_INFO_ADMINISTRATION` (**Can view system activities**) privilege is required. This API does not require any parameters to be passed in the request. + */ + getSystemInformation(_options?: Configuration): Promise; + /** + * Version: 9.2.0.cl or later Gets a list of configuration overrides applied on the cluster. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `APPLICATION_ADMINISTRATION` (**Can manage application settings**) privilege is required. This API does not require any parameters to be passed in the request. + */ + getSystemOverrideInfo(_options?: Configuration): Promise; + /** + * Version: 10.14.0.cl or later Fetch communication channel preferences. - Use `cluster_preferences` to fetch the default preferences for your ThoughtSpot application instance. - If your instance has [Orgs](https://docs.thoughtspot.com/cloud/latest/orgs-overview), use `org_preferences` to fetch any Org-specific preferences that override the defaults. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) or `DEVELOPER` (**Has developer privilege**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, users with `APPLICATION_ADMINISTRATION` (**Can manage application settings**) privilege are also authorized to perform this action. + * @param searchCommunicationChannelPreferencesRequest + */ + searchCommunicationChannelPreferences(searchCommunicationChannelPreferencesRequest: SearchCommunicationChannelPreferencesRequest, _options?: Configuration): Promise; + /** + * Version: 26.2.0.cl or later Fetch security settings for your ThoughtSpot application instance. - Use `scope: CLUSTER` to retrieve cluster-level security settings, including CORS and CSP allowlists, SAML redirect URLs, and settings that control access to non-embedded pages. - Use `scope: ORG` to retrieve Org-level security settings. If your instance has [Orgs](https://docs.thoughtspot.com/cloud/latest/orgs-overview), this returns CORS and non-embed access settings specific to the Org. - If `scope` is not specified, returns both cluster and Org-specific settings based on user privileges. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) or `DEVELOPER` (**Has developer privilege**) privilege. See [Security Settings](https://developers.thoughtspot.com/docs/security-settings) for more details. + * @param searchSecuritySettingsRequest + */ + searchSecuritySettings(searchSecuritySettingsRequest: SearchSecuritySettingsRequest, _options?: Configuration): Promise; + /** + * Version: 9.2.0.cl or later Updates the current configuration of the cluster. You must send the configuration data in JSON format. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privileges. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `APPLICATION_ADMINISTRATION` (**Can manage application settings**) privilege is required. + * @param updateSystemConfigRequest + */ + updateSystemConfig(updateSystemConfigRequest: UpdateSystemConfigRequest, _options?: Configuration): Promise; + /** + * Version: 26.4.0.cl or later Validates a communication channel configuration to ensure it is properly set up and can receive events. - Use `channel_type` to specify the type of communication channel to validate (e.g., WEBHOOK). - Use `channel_identifier` to provide the unique identifier or name for the communication channel. - Use `event_type` to specify the event type to validate for this channel. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) or `DEVELOPER` (**Has developer privilege**) privilege. For webhook channels, users with `CAN_MANAGE_WEBHOOKS` (**Can manage webhooks**) privilege are also authorized to perform this action. + * @param validateCommunicationChannelRequest + */ + validateCommunicationChannel(validateCommunicationChannelRequest: ValidateCommunicationChannelRequest, _options?: Configuration): Promise; +} + +declare class PromiseTagsApi { + private api; + constructor(configuration: Configuration, requestFactory?: TagsApiRequestFactory, responseProcessor?: TagsApiResponseProcessor); + /** + * Version: 9.0.0.cl or later Assigns tags to Liveboards, Answers, Tables, and Worksheets. Requires edit access to the metadata object. + * @param assignTagRequest + */ + assignTag(assignTagRequest: AssignTagRequest, _options?: Configuration): Promise; + /** + * Version: 9.0.0.cl or later Creates a tag object. Tags are labels that identify a metadata object. For example, you can create a tag to designate subject areas, such as sales, HR, marketing, and finance. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `TAGMANAGEMENT` (**Can manage tags**) privilege is required to create, edit, and delete tags. + * @param createTagRequest + */ + createTag(createTagRequest: CreateTagRequest, _options?: Configuration): Promise; + /** + * Version: 9.0.0.cl or later Deletes a tag object from the ThoughtSpot system Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `TAGMANAGEMENT` (**Can manage tags**) privilege is required to create, edit, and delete tags. + * @param tagIdentifier Tag identifier Tag name or Tag id. + */ + deleteTag(tagIdentifier: string, _options?: Configuration): Promise; + /** + * Version: 9.0.0.cl or later Gets a list of tag objects available on the ThoughtSpot system. To get details of a specific tag object, specify the GUID or name. Any authenticated user can search for tag objects. + * @param searchTagsRequest + */ + searchTags(searchTagsRequest: SearchTagsRequest, _options?: Configuration): Promise>; + /** + * Version: 9.0.0.cl or later Removes the tags applied to a Liveboard, Answer, Table, or Worksheet. Requires edit access to the metadata object. + * @param unassignTagRequest + */ + unassignTag(unassignTagRequest: UnassignTagRequest, _options?: Configuration): Promise; + /** + * Version: 9.0.0.cl or later Updates a tag object. You can modify the `name` and `color` properties of a tag object. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `TAGMANAGEMENT` (**Can manage tags**) privilege is required to create, edit, and delete tags. + * @param tagIdentifier Name or Id of the tag. + * @param updateTagRequest + */ + updateTag(tagIdentifier: string, updateTagRequest: UpdateTagRequest, _options?: Configuration): Promise; +} + +declare class PromiseThoughtSpotRestApi { + private api; + constructor(configuration: Configuration, requestFactory?: ThoughtSpotRestApiRequestFactory, responseProcessor?: ThoughtSpotRestApiResponseProcessor); + /** + * Version: 9.7.0.cl or later Activates a deactivated user account. Requires `ADMINISTRATION` (**Can administer Thoughtspot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `USER_ADMINISTRATION` (**Can manage users**) privilege is required. To activate an inactive user account, the API request body must include the following information: - Username or the GUID of the user account. - Auth token generated for the deactivated user. The auth token is sent in the API response when a user is deactivated. - Password for the user account. + * @param activateUserRequest + */ + activateUser(activateUserRequest: ActivateUserRequest, _options?: Configuration): Promise; + /** + * Version: 9.0.0.cl or later Transfers the ownership of one or several objects from one user to another. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `USER_ADMINISTRATION` (**Can manage users**) privilege and edit access to the objects are required. + * @param assignChangeAuthorRequest + */ + assignChangeAuthor(assignChangeAuthorRequest: AssignChangeAuthorRequest, _options?: Configuration): Promise; + /** + * Version: 9.0.0.cl or later Assigns tags to Liveboards, Answers, Tables, and Worksheets. Requires edit access to the metadata object. + * @param assignTagRequest + */ + assignTag(assignTagRequest: AssignTagRequest, _options?: Configuration): Promise; + /** + * Version: 9.0.0.cl or later Updates the current password of the user. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `USER_ADMINISTRATION` (**Can manage users**) privilege is required. + * @param changeUserPasswordRequest + */ + changeUserPassword(changeUserPasswordRequest: ChangeUserPasswordRequest, _options?: Configuration): Promise; + /** + * Version: 9.2.0.cl or later Commits TML files of metadata objects to the Git branch configured on your instance. Requires at least edit access to objects used in the commit operation. Before using this endpoint to push your commits: * Enable Git integration on your instance. * Make sure the Git repository and branch details are configured on your instance. For more information, see [Git integration documentation](https://developers.thoughtspot.com/docs/git-integration). + * @param commitBranchRequest + */ + commitBranch(commitBranchRequest: CommitBranchRequest, _options?: Configuration): Promise; + /** + * Version: 26.6.0.cl or later Enables or disables authentication at cluster or org level for the specified auth type. Currently supports `TRUSTED_AUTH`. #### Required privileges Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) or `CONTROL_TRUSTED_AUTH` (**Can Enable or Disable Trusted Authentication**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled, the `CONTROL_TRUSTED_AUTH` privilege is required. #### Usage guidelines Use `cluster_preferences` to enable or disable authentication at the cluster level. Cluster-level settings can only be configured from the Primary Org. - `ENABLED` — Generates a new access token if one does not exist. An existing token is preserved. - `DISABLED` — Revokes the existing cluster-level access token. Use `org_preferences` to enable or disable authentication for one or more Orgs. Each entry must include an `org_identifier` (unique ID or name) and an `auth_status`. Org-level configuration requires the per-Org authentication feature to be enabled on your instance. - `ENABLED` — Generates a new org-level access token if one does not exist. - `DISABLED` — Revokes the existing org-level access token for that Org. Both `cluster_preferences` and `org_preferences` are optional. Omitting a field leaves the corresponding settings unchanged. If both are omitted, the API returns `204 No Content` without making any changes. **Note**: Cluster-level and org-level settings are independent of each other. Enabling or disabling one does not affect the other. + * @param configureAuthSettingsRequest + */ + configureAuthSettings(configureAuthSettingsRequest: ConfigureAuthSettingsRequest, _options?: Configuration): Promise; + /** + * Version: 10.14.0.cl or later Configure communication channel preferences. - Use `cluster_preferences` to update the default preferences for your ThoughtSpot application instance. - If your instance has [Orgs](https://docs.thoughtspot.com/cloud/latest/orgs-overview), use `org_preferences` to specify Org-specific preferences that override the defaults. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) or `DEVELOPER` (**Has developer privilege**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, users with `APPLICATION_ADMINISTRATION` (**Can manage application settings**) privilege are also authorized to perform this action. + * @param configureCommunicationChannelPreferencesRequest + */ + configureCommunicationChannelPreferences(configureCommunicationChannelPreferencesRequest: ConfigureCommunicationChannelPreferencesRequest, _options?: Configuration): Promise; + /** + * Version: 26.2.0.cl or later Configure security settings for your ThoughtSpot application instance. - Use `cluster_preferences` to update cluster-level security settings including CORS whitelisted URLs, CSP settings, SAML redirect URLs, partitioned cookies, and non-embed access configuration. - Use `org_preferences` to configure Org-specific security settings. If your instance has [Orgs](https://docs.thoughtspot.com/cloud/latest/orgs-overview), this allows configuring CORS and non-embed access settings specific to the Org. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) or `DEVELOPER` (**Has developer privilege**) privilege. Cluster-level SAML and script-src settings require `ADMINISTRATION` privilege. See [Security Settings](https://developers.thoughtspot.com/docs/security-settings) for more details. + * @param configureSecuritySettingsRequest + */ + configureSecuritySettings(configureSecuritySettingsRequest: ConfigureSecuritySettingsRequest, _options?: Configuration): Promise; + /** + * Version: 10.12.0.cl or later Gets connection configuration objects. Requires `DATAMANAGEMENT` (**Can manage data**) and edit permissions to the connection object, or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) privilege is required. #### Usage guidelines * To get a list of all configurations available in the ThoughtSpot system, send the API request with only the connection name or GUID in the request body. * To fetch details of a configuration object, specify the configuration object name or GUID. + * @param connectionConfigurationSearchRequest + */ + connectionConfigurationSearch(connectionConfigurationSearchRequest: ConnectionConfigurationSearchRequest, _options?: Configuration): Promise>; + /** + * Convert worksheets to models Version: 10.6.0.cl or later ## Prerequisites - **Privileges Required:** - `DATAMANAGEMENT` (Can manage data) or `ADMINISTRATION` (Can administer ThoughtSpot). - **Additional Privileges (if RBAC is enabled):** - `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` (Can manage data models). --- ## Usage Guidelines ### Parameters 1. **worksheet_ids** - **Description:** A comma-separated list of GUIDs (Globally Unique Identifiers) specifying the Worksheets to be converted. - **Usage:** - Used only when `convert_all` is set to `false`. - Leave empty or omit when `convert_all` is set to `true`. 2. **exclude_worksheet_ids** - **Description:** A comma-separated list of GUIDs specifying Worksheets to be excluded from conversion. - **Usage:** - Useful when `convert_all` is set to `true` and specific Worksheets should not be converted. 3. **convert_all** - **Description:** Sets the scope of conversion. - **Options:** - `true`: Converts all Worksheets in the system, except those specified in `exclude_worksheet_ids`. - `false`: Converts only the Worksheets listed in `worksheet_ids`. 4. **apply_changes** - **Description:** Specifies whether to apply changes directly to ThoughtSpot or to generate a preview before applying any changes.Used for validation of conversion. - **Options:** - `true`: Applies conversion changes directly to ThoughtSpot. - `false`: Generates only a preview of the changes and does not apply any changes to ThoughtSpot --- ## Best Practices 1. **Backup Before Conversion:** Always export metadata as a backup before initiating the conversion process 2. **Partial Conversion for Testing:** Test the conversion process by setting `convert_all` to `false` and specifying a small number of `worksheet_ids`. 3. **Verify Dependencies:** Check for dependent objects, such as Tables and Connections, to avoid invalid references. 4. **Review Changes:** Use `apply_changes: false` to preview the impact of the conversion before applying changes. --- ## Examples ### Convert Specific Worksheets ```json { \"worksheet_ids\": [\"guid1\", \"guid2\", \"guid3\"], \"exclude_worksheet_ids\": [], \"convert_all\": false, \"apply_changes\": true } ``` ### Convert All Accessible Worksheets ```json { \"worksheet_ids\": [], \"exclude_worksheet_ids\": [], \"convert_all\": true, \"apply_changes\": true } ``` ### Exclude Specific Worksheets While Converting All Accessible Worksheets ```json { \"worksheet_ids\": [], \"exclude_worksheet_ids\": [\"abc\"], \"convert_all\": true, \"apply_changes\": true } ``` + * @param convertWorksheetToModelRequest + */ + convertWorksheetToModel(convertWorksheetToModelRequest: ConvertWorksheetToModelRequest, _options?: Configuration): Promise; + /** + * Makes a copy of an Answer or Liveboard Version: 10.3.0.cl or later Creates a copy of a metadata object. Requires at least view access to the metadata object being copied. Upon successful execution, the API creates a copy of the metadata object specified in the API request and returns the ID of the new object. + * @param copyObjectRequest + */ + copyObject(copyObjectRequest: CopyObjectRequest, _options?: Configuration): Promise; + /** + * Version: 26.2.0.cl or later Creates a new Spotter agent conversation based on the provided context and settings. The endpoint was in Beta from 26.2.0.cl through 26.4.0.cl. Requires `CAN_USE_SPOTTER` privilege and at least view access to the metadata object specified in the request. #### Usage guidelines The request must include the `metadata_context` parameter to define the conversation context. The context type can be one of: - `DATA_SOURCE` *(available from 26.5.0.cl)*: targets a specific data source. Provide `data_source_identifier` in `data_source_context` for a single data source, or `data_source_identifiers` for multi-data-source context. The deprecated `guid` field is accepted for backwards compatibility. - `AUTO_MODE` *(available from 26.5.0.cl)*: automatically discovers and selects the most relevant datasets for the user\'s queries. > **Note for callers on versions 26.2.0.cl – 26.4.0.cl (Beta):** use the lowercase `data_source` enum value with the `guid` field instead of the above. Example: `{ \"type\": \"data_source\", \"data_source_context\": { \"guid\": \"\" } }`. The `conversation_settings` parameter controls which Spotter capabilities are enabled for the conversation: - `enable_contextual_change_analysis` (default: `true`, **deprecated from 26.2.0.cl**) — always enabled in Spotter 3; setting this to `false` has no effect on versions >= 26.2.0.cl - `enable_natural_language_answer_generation` (default: `true`, **deprecated from 26.2.0.cl**) — always enabled in Spotter 3; setting this to `false` has no effect on versions >= 26.2.0.cl - `enable_reasoning` (default: `true`, **deprecated from 26.2.0.cl**) — always enabled in Spotter 3; setting this to `false` has no effect on versions >= 26.2.0.cl - `enable_save_chat` (default: `false`, *available from 26.5.0.cl*) — enables saving the conversation for later retrieval via conversation history If the request is successful, the response includes a unique `conversation_identifier` that must be passed to `sendAgentConversationMessage` or `sendAgentConversationMessageStreaming` to send messages within this conversation. The response also includes `conversation_id` with the same value for backwards compatibility; use `conversation_identifier` for new integrations. #### Example request ```json { \"metadata_context\": { \"type\": \"DATA_SOURCE\", \"data_source_context\": { \"data_source_identifier\": \"a1b2c3d4-e5f6-7890-abcd-ef1234567890\" } }, \"conversation_settings\": {} } ``` #### Error responses | Code | Description | | ---- | --------------------------------------------------------------------------------------------------------------------------------------- | | 401 | Unauthorized — authentication token is missing, expired, or invalid. | | 403 | Forbidden — the authenticated user does not have `CAN_USE_SPOTTER` privilege or lacks view permission on the specified metadata object. | > ###### Note: > > - This endpoint was in Beta from 26.2.0.cl through 26.4.0.cl and is Generally Available from version 26.5.0.cl. > - This endpoint requires Spotter - please contact ThoughtSpot support to enable Spotter on your cluster. + * @param createAgentConversationRequest + */ + createAgentConversation(createAgentConversationRequest: CreateAgentConversationRequest, _options?: Configuration): Promise; + /** + * Version: 10.12.0.cl or later Creates a new [custom calendar](https://docs.thoughtspot.com/cloud/latest/connections-cust-cal). Requires `DATAMANAGEMENT` (**Can manage data**) or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your ThoughtSpot instance, the `CAN_MANAGE_CUSTOM_CALENDAR` (**Can manage custom calendars**) privilege is required. #### Usage guidelines You can create a custom calendar from scratch or an existing Table in ThoughtSpot. For both methods of calendar creation, the following parameters are required: * Name of the custom calendar. * Calendar creation method. To create a calendar from an existing table, specify the method: - `FROM_EXISTING_TABLE` - Creates calendar from the table reference provided in the API request. - `FROM_INPUT_PARAMS` - Creates a calendar from the parameters defined in the API request. * Connection ID and Table name * Database and schema name attributes: For most Cloud Data Warehouse (CDW) connectors, both `database_name` and `schema_name` attributes are required. However, the attribute requirements are conditional and vary based on the connector type and its metadata structure. For example, for connectors such as Teradata, MySQL, SingleSore, Amazon Aurora MySQL, Amazon RDS MySQL, Oracle, and GCP_MYSQL, the `schema_name` is required, whereas the `database_name` attribute is not. Similarly, connectors such as ClickHouse require you to specify the `database_name` and the schema specification in such cases is optional. **NOTE**: If you are creating a calendar from an existing table, ensure that the referenced table matches the required DDL for custom calendars. If the schema does not match, the API returns an error. ##### Calendar type The API allows you to create the following types of calendars: * `MONTH_OFFSET`. The default calendar type. A `MONTH_OFFSET` calendar is offset by a few months from the standard calendar months (January to December) and the year begins with the month defined in the request. For example, if the `month_offset` value is set as `April`, the calendar year begins in April. * `4-4-5`. Each quarter in the calendar will include two 4-week months followed by one 5-week month. * `4-5-4`. Each quarter in the calendar will include two 4-week months with a 5-week month between. * `5-4-4`. Each quarter begins with a 5-week month, followed by two 4-week months. To start and end the calendar on a specific date, specify the dates in the `MM/DD/YYYY` format. For `MONTH_OFFSET` calendars, ensure that the `start_date` matches the month specified in the `month_offset` attribute. You can also set the starting day of the week and customize the prefixes for year and quarter labels. #### Examples To create a calendar from an existing table: ``` { \"name\": \"MyCustomCalendar1\", \"table_reference\": { \"connection_identifier\": \"4db8ea22-2ff4-4224-b05a-26674717e468\", \"table_name\": \"MyCalendarTable\", \"database_name\": \"RETAILAPPAREL\", \"schema_name\": \"PUBLIC\" }, \"creation_method\": \"FROM_EXISTING_TABLE\", } ``` To create a calendar from scratch: ``` { \"name\": \"MyCustomCalendar1\", \"table_reference\": { \"connection_identifier\": \"4db8ea22-2ff4-4224-b05a-26674717e468\", \"table_name\": \"MyCalendarTable\", \"database_name\": \"RETAILAPPAREL\", \"schema_name\": \"PUBLIC\" }, \"creation_method\": \"FROM_INPUT_PARAMS\", \"calendar_type\": \"MONTH_OFFSET\", \"month_offset\": \"April\", \"start_day_of_week\": \"Monday\", \"quarter_name_prefix\": \"Q\", \"year_name_prefix\": \"FY\", \"start_date\": \"04/01/2025\", \"end_date\": \"04/31/2025\" } ``` + * @param createCalendarRequest + */ + createCalendar(createCalendarRequest: CreateCalendarRequest, _options?: Configuration): Promise; + /** + * Version: 26.4.0.cl or later Creates a new collection in ThoughtSpot. Collections allow you to organize and group related metadata objects such as Liveboards, Answers, worksheets, and other data objects. You can also create nested collections (sub-collections) to build a hierarchical structure. #### Supported operations The API endpoint lets you perform the following operations: * Create a new collection * Add metadata objects (Liveboards, Answers, Logical Tables) to the collection * Create nested collections by adding sub-collections + * @param createCollectionRequest + */ + createCollection(createCollectionRequest: CreateCollectionRequest, _options?: Configuration): Promise; + /** + * Version: 9.2.0.cl or later Allows you to connect a ThoughtSpot instance to a Git repository. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance on your instance, the `CAN_SETUP_VERSION_CONTROL` (**Can set up version control**) privilege. You can use this API endpoint to connect your ThoughtSpot development and production environments to the development and production branches of a Git repository. Before using this endpoint to connect your ThoughtSpot instance to a Git repository, check the following prerequisites: * You have a Git repository. If you are using GitHub, make sure you have a valid account and an access token to connect ThoughtSpot to GitHub. For information about generating a token, see [GitHub Documentation](https://docs.github.com/en/authentication/keeping-your-account-and-data-secure/managing-your-personal-access-tokens). * Your access token has `repo` scope that grants full access to public and private repositories. * Your Git repository has a branch that can be configured as a default branch in ThoughtSpot. For more information, see [Git integration documentation](https://developers.thoughtspot.com/docs/?pageid=git-integration). **Note**: ThoughtSpot supports only GitHub / itHub Enterprise for CI/CD. + * @param createConfigRequest + */ + createConfig(createConfigRequest: CreateConfigRequest, _options?: Configuration): Promise; + /** + * Version: 9.2.0.cl or later Creates a connection to a data warehouse for live query services. Requires `DATAMANAGEMENT` (**Can manage data**) or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) privilege is required. #### Create a connection without tables To create a connection without tables: 1. Pass these parameters in your API request. * Name of the connection. * Type of the data warehouse to connect to. * A JSON map of configuration attributes in `data_warehouse_config`. The following example shows the configuration attributes for a SnowFlake connection: ``` { \"configuration\":{ \"accountName\":\"thoughtspot_partner\", \"user\":\"tsadmin\", \"password\":\"TestConn123\", \"role\":\"sysadmin\", \"warehouse\":\"MEDIUM_WH\" }, \"authenticationType\": \"SERVICE_ACCOUNT\", \"externalDatabases\":[ ] } ``` 2. Set `validate` to `false`. **NOTE:** If the `authentication_type` is anything other than SERVICE_ACCOUNT, you must explicitly provide the authenticationType property in the payload. If you do not specify authenticationType, the API will default to SERVICE_ACCOUNT as the authentication type. #### Create a connection with tables If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) and `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` (**Can manage data models**) privilege is required. To create a connection with tables: 1. Pass these parameters in your API request. * Name of the connection. * Type of the data warehouse to connect to. * A JSON map of configuration attributes, database details, and table properties in `data_warehouse_config` as shown in the following example: ``` { \"configuration\":{ \"accountName\":\"thoughtspot_partner\", \"user\":\"tsadmin\", \"password\":\"TestConn123\", \"role\":\"sysadmin\", \"warehouse\":\"MEDIUM_WH\" }, \"authenticationType\": \"SERVICE_ACCOUNT\", \"externalDatabases\":[ { \"name\":\"AllDatatypes\", \"isAutoCreated\":false, \"schemas\":[ { \"name\":\"alldatatypes\", \"tables\":[ { \"name\":\"allDatatypes\", \"type\":\"TABLE\", \"description\":\"\", \"selected\":true, \"linked\":true, \"columns\":[ { \"name\":\"CNUMBER\", \"type\":\"INT64\", \"canImport\":true, \"selected\":true, \"isLinkedActive\":true, \"isImported\":false, \"tableName\":\"allDatatypes\", \"schemaName\":\"alldatatypes\", \"dbName\":\"AllDatatypes\" }, { \"name\":\"CDECIMAL\", \"type\":\"INT64\", \"canImport\":true, \"selected\":true, \"isLinkedActive\":true, \"isImported\":false, \"tableName\":\"allDatatypes\", \"schemaName\":\"alldatatypes\", \"dbName\":\"AllDatatypes\" } ] } ] } ] } ] } ``` 2. Set `validate` to `true`. **NOTE:** If the `authentication_type` is anything other than SERVICE_ACCOUNT, you must explicitly provide the authenticationType property in the payload. If you do not specify authenticationType, the API will default to SERVICE_ACCOUNT as the authentication type. + * @param createConnectionRequest + */ + createConnection(createConnectionRequest: CreateConnectionRequest, _options?: Configuration): Promise; + /** + * Version: 10.12.0.cl or later Creates an additional configuration to an existing connection to a data warehouse. Requires `DATAMANAGEMENT` (**Can manage data**) or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) privilege is required. #### Usage guidelines * A JSON map of configuration attributes in `configuration`. The following example shows the configuration attributes: ``` { \"user\":\"DEV_USER\", \"password\":\"TestConn123\", \"role\":\"DEV\", \"warehouse\":\"DEV_WH\" } ``` * If the `policy_type` is `PRINCIPALS`, then `policy_principals` is a required field. * If the `policy_type` is `PROCESSES`, then `policy_processes` is a required field. * If the `policy_type` is `NO_POLICY`, then `policy_principals` and `policy_processes` are not required fields. #### Parameterized Connection Support For parameterized connections that use OAuth authentication, only the same_as_parent and policy_process_options attributes are allowed in the API request. These attributes are not applicable to connections that are not parameterized. + * @param createConnectionConfigurationRequest + */ + createConnectionConfiguration(createConnectionConfigurationRequest: CreateConnectionConfigurationRequest, _options?: Configuration): Promise; + /** + * Version: 10.4.0.cl or later Creates a new conversation session tied to a specific data model for AI-driven natural language querying. Requires `CAN_USE_SPOTTER` privilege and at least view access to the metadata object specified in the request. #### Usage guidelines The request must include: - `metadata_identifier`: the unique ID of the data source that provides context for the conversation Optionally, you can provide: - `tokens`: a token string to set initial context for the conversation (e.g., `\"[sales],[item type],[state]\"`) If the request is successful, ThoughtSpot returns a unique `conversation_identifier` that must be passed to `sendMessage` to continue the conversation. #### Error responses | Code | Description | |------|-------------| | 401 | Unauthorized — authentication token is missing, expired, or invalid. | | 403 | Forbidden — the authenticated user does not have `CAN_USE_SPOTTER` privilege or lacks view permission on the specified metadata object. | > ###### Note: > * This endpoint is currently in Beta. Breaking changes may be introduced before the endpoint is made Generally Available. > * This endpoint requires Spotter - please contact ThoughtSpot support to enable Spotter on your cluster. + * @param createConversationRequest + */ + createConversation(createConversationRequest: CreateConversationRequest, _options?: Configuration): Promise; + /** + * Version: 9.6.0.cl or later Creates a custom action that appears as a menu action on a saved Answer or Liveboard visualization. Requires `DEVELOPER` (**Has Developer privilege**) or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `DEVELOPER` (**Has developer privilege**) privilege is required. #### Usage Guidelines The API lets you create the following types of custom actions: * URL-based action Allows pushing data to an external URL. * Callback action Triggers a callback to the host application and initiates a response payload on an embedded ThoughtSpot instance. By default, custom actions are visible to only administrator or developer users. To make a custom action available to other users, and specify the groups in `group_identifiers`. By default, the custom action is set as a _global_ action on all visualizations and saved Answers. To assign a custom action to specific Liveboard visualization, saved Answer, or Worksheet, set `visibility` to `false` in `default_action_config` property and specify the GUID or name of the object in `associate_metadata`. For more information, see [Custom actions](https://developers.thoughtspot.com/docs/custom-action-intro). + * @param createCustomActionRequest + */ + createCustomAction(createCustomActionRequest: CreateCustomActionRequest, _options?: Configuration): Promise; + /** + * Version: 10.10.0.cl or later Creates a customization configuration for the notification email. #### Pre-requisites Requires `DEVELOPER` (**has developer privilege**) or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `DEVELOPER` (**Has developer privilege**) privilege is required. **NOTE**:This endpoint in currently in beta. Contact ThoughtSpot support to enable this on your instance. #### Usage guidelines To create a custom configuration pass these parameters in your API request: - A JSON map of configuration attributes `template_properties`. The following example shows a sample set of customization configuration: ``` { { \"cta_button_bg_color\": \"#444DEA\", \"cta_text_font_color\": \"#FFFFFF\", \"primary_bg_color\": \"#D3DEF0\", \"logo_url\": \"https://storage.pardot.com/710713/1642089901EbkRibJq/TS_fullworkmark_darkmode.png\", \"font_family\": \"\", \"product_name\": \"ThoughtSpot\", \"footer_address\": \"444 Castro St, Suite 1000 Mountain View, CA 94041\", \"footer_phone\": \"(800) 508-7008\", \"replacement_value_for_liveboard\": \"Dashboard\", \"replacement_value_for_answer\": \"Chart\", \"replacement_value_for_spot_iq\": \"AI Insights\", \"hide_footer_phone\": false, \"hide_footer_address\": false, \"hide_product_name\": false, \"hide_manage_notification\": false, \"hide_mobile_app_nudge\": false, \"hide_privacy_policy\": false, \"hide_ts_vocabulary_definitions\": false, \"hide_error_message\": false, \"hide_unsubscribe_link\": false, \"hide_notification_status\": false, \"hide_modify_alert\": false, \"company_website_url\": \"https://your-website.com/\", \"company_privacy_policy_url\" : \"https://link-to-privacy-policy.com/\", \"contact_support_url\": \"https://link-to-contact-support.com/\", \"hide_contact_support_url\": false, \"hide_logo_url\" : false } } ``` + * @param createEmailCustomizationRequest + */ + createEmailCustomization(createEmailCustomizationRequest: CreateEmailCustomizationRequest, _options?: Configuration): Promise; + /** + * Version: 9.0.0.cl or later Creates an Org object. To use this API, the [Orgs](https://docs.thoughtspot.com/cloud/latest/orgs-overview) feature must be enabled in your cluster. Requires cluster administration (**Can administer Org**) privileges. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `ORG_ADMINISTRATION` (**Can manage Orgs**) privilege is required. + * @param createOrgRequest + */ + createOrg(createOrgRequest: CreateOrgRequest, _options?: Configuration): Promise; + /** + * Version: 9.5.0.cl or later Creates a Role object in ThoughtSpot. Available only if [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance. To create a Role, the `ROLE_ADMINISTRATION` (**Can manage roles**) privilege is required. + * @param createRoleRequest + */ + createRole(createRoleRequest: CreateRoleRequest, _options?: Configuration): Promise; + /** + * Create schedule. Version: 9.4.0.cl or later Creates a Liveboard schedule job. Requires at least edit access to Liveboards. To create a schedule on behalf of another user, you need `ADMINISTRATION` (**Can administer Org**) or `JOBSCHEDULING` (**Can schedule for others**) privilege and edit access to the Liveboard. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `JOBSCHEDULING` (**Can schedule for others**) privilege is required. #### Usage guidelines * The description text is mandatory. The description text appears as **Description: ** in the Liveboard schedule email notifications. * For Liveboards with both charts and tables, schedule creation is only supported in PDF and XLS formats. Schedules created in CSV formats for such Liveboards will fail to run. If `PDF` is set as the `file_format`, enable `pdf_options` to get the correct attachment. Not doing so may cause the attachment to be rendered empty. * To include only specific visualizations, specify the visualization GUIDs in the `visualization_identifiers` array. * You can schedule a Liveboard job to run periodically by setting frequency parameters. You can set the schedule to run daily, weekly, monthly or every n minutes or hours. The scheduled job can also be configured to run at a specific time of the day or on specific days of the week or month. Please ensure that when setting the schedule frequency for _minute of the object_, only values that are multiples of 5 are included. * If the `frequency` parameters are defined, you can set the time zone to a value that matches your server\'s time zone. For example, `US/Central`, `Etc/UTC`, `CET`. The default time zone is `America/Los_Angeles`. For more information about Liveboard jobs, see [ThoughtSpot Product Documentation](https://docs.thoughtspot.com/cloud/latest/liveboard-schedule). + * @param createScheduleRequest + */ + createSchedule(createScheduleRequest: CreateScheduleRequest, _options?: Configuration): Promise; + /** + * Version: 9.0.0.cl or later Creates a tag object. Tags are labels that identify a metadata object. For example, you can create a tag to designate subject areas, such as sales, HR, marketing, and finance. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `TAGMANAGEMENT` (**Can manage tags**) privilege is required to create, edit, and delete tags. + * @param createTagRequest + */ + createTag(createTagRequest: CreateTagRequest, _options?: Configuration): Promise; + /** + * Version: 9.0.0.cl or later Creates a user in ThoughtSpot. The API endpoint allows you to configure several user properties such as email address, account status, share notification preferences, and sharing visibility. You can provision the user to [groups](https://docs.thoughtspot.com/cloud/latest/groups-privileges) and [Orgs](https://docs.thoughtspot.com/cloud/latest/orgs-overview). You can also add Liveboard, Answer, and Worksheet objects to the user’s favorites list, assign a default Liveboard for the user, and set user preferences. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `USER_ADMINISTRATION` (**Can manage users**) privilege is required. + * @param createUserRequest + */ + createUser(createUserRequest: CreateUserRequest, _options?: Configuration): Promise; + /** + * Version: 9.0.0.cl or later Creates a group object in ThoughtSpot. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `GROUP_ADMINISTRATION` (**Can manage groups**) privilege is required. #### About groups Groups in ThoughtSpot are used by the administrators to define privileges and organize users based on their roles and access requirements. To know more about groups and privileges, see [ThoughtSpot Product Documentation](https://docs.thoughtspot.com/cloud/latest/groups-privileges). #### Supported operations The API endpoint lets you perform the following operations: * Assign privileges * Add users * Define sharing visibility * Add sub-groups * Assign a default Liveboard + * @param createUserGroupRequest + */ + createUserGroup(createUserGroupRequest: CreateUserGroupRequest, _options?: Configuration): Promise; + /** + * Create a variable which can be used for parameterizing metadata objects Version: 26.4.0.cl or later Allows creating a variable which can be used for parameterizing metadata objects in ThoughtSpot. Requires ADMINISTRATION role and TENANT scope. The CAN_MANAGE_VARIABLES permission allows you to manage Formula Variables in the current organization scope. The API endpoint supports the following types of variables: * CONNECTION_PROPERTY - For connection properties * TABLE_MAPPING - For table mappings * CONNECTION_PROPERTY_PER_PRINCIPAL - For connection properties per principal. In order to use this please contact support to enable this. * FORMULA_VARIABLE - For Formula variables, introduced in 10.15.0.cl When creating a variable, you need to specify: * The variable type * A unique name for the variable * Whether the variable contains sensitive values (defaults to false) * The data type of the variable, only specify for formula variables (defaults to null) The operation will fail if: * The user lacks required permissions * The variable name already exists * The variable type is invalid + * @param createVariableRequest + */ + createVariable(createVariableRequest: CreateVariableRequest, _options?: Configuration): Promise; + /** + * Version: 10.14.0.cl or later Creates a new webhook configuration to receive notifications for specified events. The webhook will be triggered when the configured events occur in the system. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) or `DEVELOPER` (**Has developer privilege**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, users with `CAN_MANAGE_WEBHOOKS` (**Can manage webhooks**) privilege are also authorized to perform this action. + * @param createWebhookConfigurationRequest + */ + createWebhookConfiguration(createWebhookConfigurationRequest: CreateWebhookConfigurationRequest, _options?: Configuration): Promise; + /** + * Version: 9.9.0.cl or later Creates a DBT connection object in ThoughtSpot. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege or `DATAMANAGEMENT` (**Can manage data**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the following Data control privileges may be required: - `CAN_MANAGE_CUSTOM_CALENDAR`(**Can manage custom calendars**) - `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) - `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` (**Can manage data models**) #### About create DBT connection DBT connection in ThoughtSpot is used by the user to define DBT credentials for cloud . The API needs embrace connection, embrace database name, DBT url, import type, DBT account identifier, DBT project identifier, DBT access token and environment details (or) embrace connection, embrace database name, import type, file_content to create a connection object. To know more about DBT, see ThoughtSpot Product Documentation. + * @param connectionName Name of the connection. + * @param databaseName Name of the Database. + * @param importType Mention type of Import + * @param accessToken Access token is mandatory when Import_Type is DBT_CLOUD. + * @param dbtUrl DBT URL is mandatory when Import_Type is DBT_CLOUD. + * @param accountId Account ID is mandatory when Import_Type is DBT_CLOUD + * @param projectId Project ID is mandatory when Import_Type is DBT_CLOUD + * @param dbtEnvId DBT Environment ID\\\" + * @param projectName Name of the project + * @param fileContent Upload DBT Manifest and Catalog artifact files as a ZIP file. This field is Mandatory when Import Type is \\\'ZIP_FILE\\\' + */ + dbtConnection(connectionName: string, databaseName: string, importType?: string, accessToken?: string, dbtUrl?: string, accountId?: string, projectId?: string, dbtEnvId?: string, projectName?: string, fileContent?: HttpFile, _options?: Configuration): Promise; + /** + * Version: 9.9.0.cl or later Resynchronize the existing list of models, tables, worksheet tml’s and import them to Thoughtspot based on the DBT connection object. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege or `DATAMANAGEMENT` (**Can manage data**) privilege, along with an existing DBT connection. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the following data control privileges may be required: - `CAN_MANAGE_CUSTOM_CALENDAR`(**Can manage custom calendars**) - `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) - `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` (**Can manage data models**) + * @param dbtConnectionIdentifier Unique ID of the DBT connection. + * @param fileContent Upload DBT Manifest and Catalog artifact files as a ZIP file. This field is mandatory if the connection was created with import_type ‘ZIP_FILE’ + */ + dbtGenerateSyncTml(dbtConnectionIdentifier: string, fileContent?: HttpFile, _options?: Configuration): Promise; + /** + * Version: 9.9.0.cl or later Generate required table and worksheet and import them. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege or `DATAMANAGEMENT` (**Can manage data**) privilege, along with an existing DBT connection. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the following data control privileges may be required: - `CAN_MANAGE_CUSTOM_CALENDAR`(**Can manage custom calendars**) - `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) - `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` (**Can manage data models**) #### About generate TML Models and Worksheets to be imported can be selected by the user as part of the API. + * @param dbtConnectionIdentifier Unique ID of the DBT connection. + * @param modelTables List of Models and their respective Tables Example: \\\'[{\\\"model_name\\\": \\\"model_name\\\", \\\"tables\\\": [\\\"table_name\\\"]}]\\\' + * @param importWorksheets Mention the worksheet tmls to import + * @param worksheets List of worksheets is mandatory when import_Worksheets is type SELECTED Example: [\\\"worksheet_name\\\"] + * @param fileContent Upload DBT Manifest and Catalog artifact files as a ZIP file. This field is mandatory if the connection was created with import_type ‘ZIP_FILE’ + */ + dbtGenerateTml(dbtConnectionIdentifier: string, modelTables: string, importWorksheets: string, worksheets?: string, fileContent?: HttpFile, _options?: Configuration): Promise; + /** + * Version: 9.9.0.cl or later Gets a list of DBT connection objects by user and organization, available on the ThoughtSpot system. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege or `DATAMANAGEMENT` (**Can manage data**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the following Data control privileges may be required: - `CAN_MANAGE_CUSTOM_CALENDAR`(**Can manage custom calendars**) - `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) - `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` (**Can manage data models**) #### About search DBT connection To get details of a specific DBT connection identifier, database connection identifier, database connection name, database name, project name, project identifier, environment identifier , import type and author. + */ + dbtSearch(_options?: Configuration): Promise>; + /** + * Version: 9.7.0.cl or later Deactivates a user account. Requires `ADMINISTRATION` (**Can administer Thoughtspot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `USER_ADMINISTRATION` (**Can manage users**) privilege is required. To deactivate a user account, the API request body must include the following information: - Username or the GUID of the user account - Base URL of the ThoughtSpot instance If the API request is successful, ThoughtSpot returns the activation URL in the response. The activation URL is valid for 14 days and can be used to re-activate the account and reset the password of the deactivated account. + * @param deactivateUserRequest + */ + deactivateUser(deactivateUserRequest: DeactivateUserRequest, _options?: Configuration): Promise; + /** + * Version: 10.12.0.cl or later Deletes a [custom calendar](https://docs.thoughtspot.com/cloud/latest/connections-cust-cal). Requires `DATAMANAGEMENT` (**Can manage data**) or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your ThoughtSpot instance, the `CAN_MANAGE_CUSTOM_CALENDAR` (**Can manage custom calendars**) privilege is required. #### Usage guidelines To delete a custom calendar, specify the calendar ID as a path parameter in the request URL. + * @param calendarIdentifier Unique ID or name of the Calendar. + */ + deleteCalendar(calendarIdentifier: string, _options?: Configuration): Promise; + /** + * Version: 26.4.0.cl or later Deletes one or more collections from ThoughtSpot. #### Delete options * **delete_children**: When set to `true`, deletes the child objects (metadata items) within the collection that the user has access to. Objects that the user does not have permission to delete will be skipped. * **dry_run**: When set to `true`, performs a preview of the deletion operation without actually deleting anything. The response shows what would be deleted, allowing you to review before committing the deletion. #### Response The response includes: * **metadata_deleted**: List of metadata objects that were successfully deleted * **metadata_skipped**: List of metadata objects that were skipped due to lack of permissions or other constraints + * @param deleteCollectionRequest + */ + deleteCollection(deleteCollectionRequest: DeleteCollectionRequest, _options?: Configuration): Promise; + /** + * Version: 9.2.0.cl or later Deletes Git repository configuration from your ThoughtSpot instance. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance on your instance, the `CAN_SETUP_VERSION_CONTROL` (**Can set up version control**) privilege. + * @param deleteConfigRequest + */ + deleteConfig(deleteConfigRequest: DeleteConfigRequest, _options?: Configuration): Promise; + /** + * Version: 9.2.0.cl or later **Important**: This endpoint is deprecated and will be removed from ThoughtSpot in September 2025. ThoughtSpot strongly recommends using the [Delete Connection V2](#/http/api-endpoints/connections/delete-connection-v2) endpoint to delete your connection objects. #### Usage guidelines Deletes a connection object. Requires `DATAMANAGEMENT` (**Can manage data**) and edit permissions to the connection object, or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) privilege is required. **Note**: If a connection has dependent objects, make sure you remove its associations before the delete operation. + * @param deleteConnectionRequest + */ + deleteConnection(deleteConnectionRequest: DeleteConnectionRequest, _options?: Configuration): Promise; + /** + * Version: 10.12.0.cl or later Deletes connection configuration objects. Requires `DATAMANAGEMENT` (**Can manage data**) and edit permissions to the connection object, or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) privilege is required. + * @param deleteConnectionConfigurationRequest + */ + deleteConnectionConfiguration(deleteConnectionConfigurationRequest: DeleteConnectionConfigurationRequest, _options?: Configuration): Promise; + /** + * Version: 10.4.0.cl or later Deletes a connection object. **Note**: If a connection has dependent objects, make sure you remove its associations before the delete operation. Requires `DATAMANAGEMENT` (**Can manage data**) and edit permissions to the connection object, or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) privilege is required. + * @param connectionIdentifier Unique ID or name of the connection. + */ + deleteConnectionV2(connectionIdentifier: string, _options?: Configuration): Promise; + /** + * Version: 9.6.0.cl or later Removes the custom action specified in the API request. Requires `DEVELOPER` (**Has Developer privilege**) or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `DEVELOPER` (**Has developer privilege**) privilege is required. + * @param customActionIdentifier Unique ID or name of the custom action. + */ + deleteCustomAction(customActionIdentifier: string, _options?: Configuration): Promise; + /** + * Version: 9.9.0.cl or later Removes the specified DBT connection object from the ThoughtSpot system. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) or `DATAMANAGEMENT` (**Can manage data ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the following Data control privileges may be required: - `CAN_MANAGE_CUSTOM_CALENDAR`(**Can manage custom calendars**) - `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) - `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` (**Can manage data models**) + * @param dbtConnectionIdentifier Unique ID of the DBT Connection. + */ + deleteDbtConnection(dbtConnectionIdentifier: string, _options?: Configuration): Promise; + /** + * Version: 10.10.0.cl or later Deletes the configuration for the email customization. #### Pre-requisites Requires `DEVELOPER` (**has developer privilege**) or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `DEVELOPER` (**Has developer privilege**) privilege is required. **NOTE**:This endpoint in currently in beta. Contact ThoughtSpot support to enable this on your instance. #### Usage guidelines - Call the search API endpoint to get the `template_identifier` from the response. - Use that `template_identifier` as a parameter in this API request. + * @param templateIdentifier Unique ID or name of the email customization. + */ + deleteEmailCustomization(templateIdentifier: string, _options?: Configuration): Promise; + /** + * Version: 9.0.0.cl or later Removes the specified metadata object from the ThoughtSpot system. Requires edit access to the metadata object. + * @param deleteMetadataRequest + */ + deleteMetadata(deleteMetadataRequest: DeleteMetadataRequest, _options?: Configuration): Promise; + /** + * Version: 9.0.0.cl or later Deletes an Org object from the ThoughtSpot system. Requires cluster administration (**Can administer Org**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `ORG_ADMINISTRATION` (**Can manage Orgs**) privilege is required. When you delete an Org, all its users and objects created in that Org context are removed. However, if the users in the deleted Org also exists in other Orgs, they are removed only from the deleted Org. + * @param orgIdentifier ID or name of the Org + */ + deleteOrg(orgIdentifier: string, _options?: Configuration): Promise; + /** + * Version: 10.12.0.cl or later Deletes the configuration for the email customization. #### Pre-requisites Requires `DEVELOPER` (**has developer privilege**) or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `DEVELOPER` (**Has developer privilege**) privilege is required. **NOTE**:This endpoint in currently in beta. Contact ThoughtSpot support to enable this on your instance. #### Usage guidelines - Call the search API endpoint to get the `org_identifier` from the response. - Use that `org_identifier` as a parameter in this API request. + * @param deleteOrgEmailCustomizationRequest + */ + deleteOrgEmailCustomization(deleteOrgEmailCustomizationRequest: DeleteOrgEmailCustomizationRequest, _options?: Configuration): Promise; + /** + * Version: 9.5.0.cl or later Deletes a Role object from the ThoughtSpot system. Available only if [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance. To delete a Role, the `ROLE_ADMINISTRATION` (**Can manage roles**) privilege is required. + * @param roleIdentifier Unique ID or name of the Role. ReadOnly roles cannot be deleted. + */ + deleteRole(roleIdentifier: string, _options?: Configuration): Promise; + /** + * Deletes a scheduled job. Version: 9.4.0.cl or later Deletes a scheduled Liveboard job. Requires at least edit access to Liveboard or `ADMINISTRATION` (**Can administer Org**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `JOBSCHEDULING` (**Can schedule for others**) privilege is required. + * @param scheduleIdentifier Unique ID or name of the scheduled job. + */ + deleteSchedule(scheduleIdentifier: string, _options?: Configuration): Promise; + /** + * Version: 9.0.0.cl or later Deletes a tag object from the ThoughtSpot system Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `TAGMANAGEMENT` (**Can manage tags**) privilege is required to create, edit, and delete tags. + * @param tagIdentifier Tag identifier Tag name or Tag id. + */ + deleteTag(tagIdentifier: string, _options?: Configuration): Promise; + /** + * Version: 9.0.0.cl or later Deletes a user from the ThoughtSpot system. If you want to remove a user from a specific Org but not from ThoughtSpot, update the group and Org mapping properties of the user object via a POST API call to the [/api/rest/2.0/users/{user_identifier}/update](#/http/api-endpoints/users/update-user) endpoint. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `USER_ADMINISTRATION` (**Can manage users**) privilege is required. + * @param userIdentifier GUID / name of the user + */ + deleteUser(userIdentifier: string, _options?: Configuration): Promise; + /** + * Version: 9.0.0.cl or later Removes the specified group object from the ThoughtSpot system. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `GROUP_ADMINISTRATION` (**Can manage groups**) privilege is required. + * @param groupIdentifier GUID or name of the group. + */ + deleteUserGroup(groupIdentifier: string, _options?: Configuration): Promise; + /** + * Delete a variable Version: 10.14.0.cl or later **Note:** This API endpoint is deprecated and will be removed from ThoughtSpot in a future release. Use [POST /api/rest/2.0/template/variables/delete](/api/rest/2.0/template/variables/delete) instead. Allows deleting a variable from ThoughtSpot. Requires ADMINISTRATION role and TENANT scope. The CAN_MANAGE_VARIABLES permission allows you to manage Formula Variables in the current organization scope. The API endpoint requires: * The variable identifier (ID or name) The operation will fail if: * The user lacks required permissions * The variable doesn\'t exist * The variable is being used by other objects + * @param identifier Unique id or name of the variable + */ + deleteVariable(identifier: string, _options?: Configuration): Promise; + /** + * Delete variable(s) Version: 26.4.0.cl or later Allows deleting multiple variables from ThoughtSpot. Requires ADMINISTRATION role and TENANT scope. The CAN_MANAGE_VARIABLES permission allows you to manage Formula Variables in the current organization scope. The API endpoint requires: * The variable identifiers (IDs or names) The operation will fail if: * The user lacks required permissions * Any of the variables don\'t exist * Any of the variables are being used by other objects + * @param deleteVariablesRequest + */ + deleteVariables(deleteVariablesRequest: DeleteVariablesRequest, _options?: Configuration): Promise; + /** + * Version: 10.14.0.cl or later Deletes one or more webhook configurations by their unique id or name. Returns status of each deletion operation, including successfully deleted webhooks and any failures with error details. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) or `DEVELOPER` (**Has developer privilege**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, users with `CAN_MANAGE_WEBHOOKS` (**Can manage webhooks**) privilege are also authorized to perform this action. + * @param deleteWebhookConfigurationsRequest + */ + deleteWebhookConfigurations(deleteWebhookConfigurationsRequest: DeleteWebhookConfigurationsRequest, _options?: Configuration): Promise; + /** + * Version: 9.2.0.cl or later Allows you to deploy a commit and publish TML content to your ThoughtSpot instance. Requires at least edit access to the objects used in the deploy operation. The API deploys the head of the branch unless a `commit_id` is specified in the API request. If the branch name is not defined in the request, the default branch is considered for deploying commits. For more information, see [Git integration documentation](https://developers.thoughtspot.com/docs/git-integration). + * @param deployCommitRequest + */ + deployCommit(deployCommitRequest: DeployCommitRequest, _options?: Configuration): Promise>; + /** + * Version: 9.9.0.cl or later Exports the difference in connection metadata between CDW and ThoughtSpot Requires `DATAMANAGEMENT` (**Can manage data**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the following Data control privileges may be required: - `CAN_MANAGE_CUSTOM_CALENDAR`(**Can manage custom calendars**) - `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) - `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` (**Can manage data models**) To download the connection metadata difference between ThoughtSpot and CDW, pass the connection GUID as `connection_identifier` in the API request. + * @param connectionIdentifier GUID of the connection + */ + downloadConnectionMetadataChanges(connectionIdentifier: string, _options?: Configuration): Promise; + /** + * Version: 9.0.0.cl or later Exports an Answer in the given file format. You can download the Answer data as a PDF, PNG, CSV, or XLSX file. Requires at least view access to the Answer. #### Usage guidelines In the request body, specify the GUID or name of the Answer and set `file_format`. The default file format is CSV. Use the `type` parameter to specify whether the Answer being exported is a saved Answer (`SAVED`) or a pinned Answer on a Liveboard (`PINNED`). Defaults to `SAVED`. When using `PINNED`, the `metadata_identifier` must be the container id. **NOTE**: * The downloadable file returned in API response file is extensionless. Please rename the downloaded file by typing in the relevant extension. * HTML rendering is not supported for PDF exports of Answers with tables. Optionally, you can define [runtime overrides](https://developers.thoughtspot.com/docs/fetch-data-and-report-apis#_runtime_overrides) to apply to the Answer data. + * @param exportAnswerReportRequest + */ + exportAnswerReport(exportAnswerReportRequest: ExportAnswerReportRequest, _options?: Configuration): Promise; + /** + * Version: 9.0.0.cl or later Exports a Liveboard and its visualizations in PDF, PNG, CSV, or XLSX file format. The default `file_format` is CSV. Requires at least view access to the Liveboard. #### Usage guidelines In the request body, specify the GUID or name of the Liveboard. To generate a Liveboard report with specific visualizations, add GUIDs or names of the visualizations. **NOTE**: * The downloadable file returned in API response file is extensionless. Please rename the downloaded file by typing in the relevant extension. * Optionally, you can define [runtime overrides](https://developers.thoughtspot.com/docs/fetch-data-and-report-apis#_runtime_overrides) to apply to the Answer data. * To include unsaved changes in the report, pass the `transient_pinboard_content` script generated from the `getExportRequestForCurrentPinboard` method in the Visual Embed SDK. Upon successful execution, the API returns the report with unsaved changes, including ad hoc changes to visualizations. For more information, see [Liveboard Report API](https://developers.thoughtspot.com/docs/fetch-data-and-report-apis#_liveboard_report_api). * Starting with ThoughtSpot Cloud 10.9.0.cl release, the Liveboard can be exported in the PNG format in the resolution of your choice. To enable this on your instance, contact ThoughtSpot support. When this feature is enabled, the options `include_cover_page`,`include_filter_page` within the `png_options` will not be available for PNG exports. * Starting with the ThoughtSpot Cloud 26.2.0.cl release, * Liveboards can be exported in CSV format. * All visualizations within a Liveboard can be exported as individual CSV files. * When exporting multiple visualizations or the entire Liveboard, the system returns the report as a compressed ZIP file containing the separate CSV files for each visualization. * Liveboards can also be exported in XLSX format. * All selected visualizations are consolidated into a single Excel workbook (.xlsx), with each visualization placed in its own worksheet (tab). * XLSX exports are limited to a maximum of 255 worksheets (tabs) per workbook. + * @param exportLiveboardReportRequest + */ + exportLiveboardReport(exportLiveboardReportRequest: ExportLiveboardReportRequest, _options?: Configuration): Promise; + /** + * Version: 9.0.0.cl or later Exports the [TML](https://docs.thoughtspot.com/cloud/latest/tml) representation of metadata objects in JSON or YAML format. Requires `DATADOWNLOADING` (**Can download Data**) and at least view access to the metadata object. #### Usage guidelines * You can export one or several objects by passing metadata object GUIDs in the `metadata` array. * When exporting TML content for a Liveboard or Answer object, you can set `export_associated` to `true` to retrieve TML content for underlying Worksheets, Tables, or Views, including the GUID of each object within the headers. When `export_associated` is set to `true`, consider retrieving one metadata object at a time. * Set `export_fqns` to `true` to add FQNs of the referenced objects in the TML content. For example, if you send an API request to retrieve TML for a Liveboard and its associated objects, the API returns the TML content with FQNs of the referenced Worksheet. Exporting TML with FQNs is useful if ThoughtSpot has multiple objects with the same name and you want to eliminate ambiguity when importing TML files into ThoughtSpot. It eliminates the need for adding FQNs of the referenced objects manually during the import operation. * To export only the TML of feedbacks associated with an object, set the GUID of the object as `identifier`, and set the `type` as `FEEDBACK` in the `metadata` array. * To export the TML of an object along with the feedbacks associated with it, set the GUID of the object as `identifier`, set the `type` as `LOGIAL_TABLE` in the `metadata` array, and set `export_with_associated_feedbacks` in `export_options` to true. For more information, see [TML Documentation](https://developers.thoughtspot.com/docs/tml#_export_a_tml). For more information on feedbacks, see [Feedback Documentation](https://docs.thoughtspot.com/cloud/latest/sage-feedback). + * @param exportMetadataTMLRequest + */ + exportMetadataTML(exportMetadataTMLRequest: ExportMetadataTMLRequest, _options?: Configuration): Promise>; + /** + * Version: 10.1.0.cl or later Exports the [TML](https://docs.thoughtspot.com/cloud/latest/tml) representation of metadata objects in JSON or YAML format. ### **Permissions Required** Requires `DATAMANAGEMENT` (**Can manage data**) and `USERMANAGEMENT` (**Can manage users**) privileges. #### **Usage Guidelines** This API is only applicable for `USER`, `GROUP`, and `ROLES` metadata types. - `batch_offset` Indicates the starting position within the complete dataset from which the API should begin returning objects. Useful for paginating results efficiently. - `batch_size` Specifies the number of objects or items to retrieve in a single request. Helps control response size for better performance. - `edoc_format` Defines the format of the TML content. The exported metadata can be in JSON or YAML format. - `export_dependent` Specifies whether to include dependent metadata objects in the export. Ensures related objects are also retrieved if needed. - `all_orgs_override` Indicates whether the export operation applies across all organizations. Useful for multi-tenant environments where cross-org exports are required. + * @param exportMetadataTMLBatchedRequest + */ + exportMetadataTMLBatched(exportMetadataTMLBatchedRequest: ExportMetadataTMLBatchedRequest, _options?: Configuration): Promise; + /** + * Version: 9.0.0.cl or later Fetches data from a saved Answer. Requires at least view access to the saved Answer. The `record_size` attribute determines the number of records to retrieve in an API call. For more information about pagination, record size, and maximum row limit, see [Pagination and record size settings](https://developers.thoughtspot.com/docs/fetch-data-and-report-apis#_pagination_settings_for_data_and_report_apis). + * @param fetchAnswerDataRequest + */ + fetchAnswerData(fetchAnswerDataRequest: FetchAnswerDataRequest, _options?: Configuration): Promise; + /** + * Version: 9.0.0.cl or later Fetches the underlying SQL query data for an Answer object. Requires at least view access to the Answer object. Upon successful execution, the API returns the SQL queries for the specified object as shown in this example: ``` { \"metadata_id\":\"8fbe44a8-46ad-4b16-8d39-184b2fada490\", \"metadata_name\":\"Total sales\", \"metadata_type\":\"ANSWER\", \"sql_queries\":[ { \"metadata_id\":\"8fbe44a8-46ad-4b16-8d39-184b2fada490\", \"metadata_name\":\"Total sales -test\", \"sql_query\":\"SELECT \\n \\\"ta_1\\\".\\\"REGION\\\" \\\"ca_1\\\", \\n \\\"ta_2\\\".\\\"PRODUCTNAME\\\" \\\"ca_2\\\", \\n \\\"ta_1\\\".\\\"STORENAME\\\" \\\"ca_3\\\", \\n CASE\\n WHEN sum(\\\"ta_3\\\".\\\"SALES\\\") IS NOT NULL THEN sum(\\\"ta_3\\\".\\\"SALES\\\")\\n ELSE 0\\n END \\\"ca_4\\\", \\n CASE\\n WHEN sum(\\\"ta_3\\\".\\\"QUANTITYPURCHASED\\\") IS NOT NULL THEN sum(\\\"ta_3\\\".\\\"QUANTITYPURCHASED\\\")\\n ELSE 0\\n END \\\"ca_5\\\"\\nFROM \\\"RETAILAPPAREL\\\".\\\"PUBLIC\\\".\\\"FACT_RETAPP_SALES\\\" \\\"ta_3\\\"\\n JOIN \\\"RETAILAPPAREL\\\".\\\"PUBLIC\\\".\\\"DIM_RETAPP_STORES\\\" \\\"ta_1\\\"\\n ON \\\"ta_3\\\".\\\"STOREID\\\" = \\\"ta_1\\\".\\\"STOREID\\\"\\n JOIN \\\"RETAILAPPAREL\\\".\\\"PUBLIC\\\".\\\"DIM_RETAPP_PRODUCTS\\\" \\\"ta_2\\\"\\n ON \\\"ta_3\\\".\\\"PRODUCTID\\\" = \\\"ta_2\\\".\\\"PRODUCTID\\\"\\nGROUP BY \\n \\\"ca_1\\\", \\n \\\"ca_2\\\", \\n \\\"ca_3\\\"\\n\" } ] } ``` + * @param fetchAnswerSqlQueryRequest + */ + fetchAnswerSqlQuery(fetchAnswerSqlQueryRequest: FetchAnswerSqlQueryRequest, _options?: Configuration): Promise; + /** + * Version: 10.4.0.cl or later Gets information about the status of the TML async import task scheduled using the `/api/rest/2.0/metadata/tml/async/import` API call. To fetch the task details, specify the ID of the TML async import task. Requires access to the task ID. The API allows users who initiated the asynchronous TML import via `/api/rest/2.0/metadata/tml/async/import` to view the status of their tasks. Users with administration privilege can view the status of all import tasks initiated by the users in their Org. #### Usage guidelines See [TML API Documentation](https://developers.thoughtspot.com/docs/tml#_fetch_status_of_the_tml_import_task) for usage guidelines. + * @param fetchAsyncImportTaskStatusRequest + */ + fetchAsyncImportTaskStatus(fetchAsyncImportTaskStatusRequest: FetchAsyncImportTaskStatusRequest, _options?: Configuration): Promise; + /** + * Version: 10.12.0.cl or later Fetches column security rules for specified tables. This API endpoint retrieves column-level security rules configured for tables. It returns information about which columns are secured and which groups have access to those columns. #### Usage guidelines - Provide an array of table identifiers using either `identifier` (GUID or name) or `obj_identifier` (object ID) - At least one of `identifier` or `obj_identifier` must be provided for each table - The API returns column security rules for all specified tables - Users must have appropriate permissions to access security rules for the specified tables #### Required permissions - `ADMINISTRATION` - Can administer ThoughtSpot - `DATAMANAGEMENT` - Can manage data - `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` - Can manage worksheet views and tables #### Example request ```json { \"tables\": [ { \"identifier\": \"table-guid\", \"obj_identifier\": \"table-object-id\" } ] } ``` #### Response format The API returns an array of `ColumnSecurityRuleResponse` objects wrapped in a `data` field. Each `ColumnSecurityRuleResponse` object contains: - Table information (GUID and object ID) - Array of column security rules with column details, group access, and source table information #### Example response ```json { \"data\": [ { \"guid\": \"table-guid\", \"objId\": \"table-object-id\", \"columnSecurityRules\": [ { \"column\": { \"id\": \"col_123\", \"name\": \"Salary\" }, \"groups\": [ { \"id\": \"group_1\", \"name\": \"HR Department\" } ], \"sourceTableDetails\": { \"id\": \"source-table-guid\", \"name\": \"Employee_Data\" } } ] } ] } ``` + * @param fetchColumnSecurityRulesRequest + */ + fetchColumnSecurityRules(fetchColumnSecurityRulesRequest: FetchColumnSecurityRulesRequest, _options?: Configuration): Promise>; + /** + * Version: 9.9.0.cl or later Validates the difference in connection metadata between CDW and ThoughtSpot. Requires `DATAMANAGEMENT` (**Can manage data**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the following Data control privileges may be required: - `CAN_MANAGE_CUSTOM_CALENDAR`(**Can manage custom calendars**) - `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) - `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` (**Can manage data models**) Returns a boolean indicating whether there is any difference between the connection metadata at ThoughtSpot and CDW. To get the connection metadata difference status, pass the connection GUID as `connection_identifier` in the API request. + * @param connectionIdentifier GUID of the connection + */ + fetchConnectionDiffStatus(connectionIdentifier: string, _options?: Configuration): Promise; + /** + * Version: 9.0.0.cl or later Gets data from a Liveboard object and its visualization. Requires at least view access to the Liveboard. #### Usage guidelines In the request body, specify the GUID or name of the Liveboard. To get data for specific visualizations, add the GUIDs or names of the visualizations in the API request. To include unsaved changes in the report, pass the `transient_pinboard_content` script generated from the `getExportRequestForCurrentPinboard` method in the Visual Embed SDK. Upon successful execution, the API returns the report with unsaved changes. If the new Liveboard experience mode, the transient content includes ad hoc changes to visualizations such as sorting, toggling of legends, and data drill down. For more information, and see [Liveboard data API](https://developers.thoughtspot.com/docs/fetch-data-and-report-apis#_fetch_liveboard_data_api). + * @param fetchLiveboardDataRequest + */ + fetchLiveboardData(fetchLiveboardDataRequest: FetchLiveboardDataRequest, _options?: Configuration): Promise; + /** + * Version: 9.0.0.cl or later Fetches the underlying SQL query data for a Liveboard object and its visualizations. Requires at least view access to the Liveboard object. To get SQL query data for a Liveboard, specify the GUID of the Liveboard. Optionally, you can add an array of visualization GUIDs to retrieve the SQL query data for visualizations in the Liveboard. Upon successful execution, the API returns the SQL queries for the specified object as shown in this example: ``` { \"metadata_id\": \"fa68ae91-7588-4136-bacd-d71fb12dda69\", \"metadata_name\": \"Total Sales\", \"metadata_type\": \"LIVEBOARD\", \"sql_queries\": [ { \"metadata_id\": \"b3b6d2b9-089a-490c-8e16-b144650b7843\", \"metadata_name\": \"Total quantity purchased, Total sales by region\", \"sql_query\": \"SELECT \\n \\\"ta_1\\\".\\\"REGION\\\" \\\"ca_1\\\", \\n CASE\\n WHEN sum(\\\"ta_2\\\".\\\"QUANTITYPURCHASED\\\") IS NOT NULL THEN sum(\\\"ta_2\\\".\\\"QUANTITYPURCHASED\\\")\\n ELSE 0\\n END \\\"ca_2\\\", \\n CASE\\n WHEN sum(\\\"ta_2\\\".\\\"SALES\\\") IS NOT NULL THEN sum(\\\"ta_2\\\".\\\"SALES\\\")\\n ELSE 0\\n END \\\"ca_3\\\"\\nFROM \\\"RETAILAPPAREL\\\".\\\"PUBLIC\\\".\\\"FACT_RETAPP_SALES\\\" \\\"ta_2\\\"\\n JOIN \\\"RETAILAPPAREL\\\".\\\"PUBLIC\\\".\\\"DIM_RETAPP_STORES\\\" \\\"ta_1\\\"\\n ON \\\"ta_2\\\".\\\"STOREID\\\" = \\\"ta_1\\\".\\\"STOREID\\\"\\nGROUP BY \\\"ca_1\\\"\" } ] } ``` + * @param fetchLiveboardSqlQueryRequest + */ + fetchLiveboardSqlQuery(fetchLiveboardSqlQueryRequest: FetchLiveboardSqlQueryRequest, _options?: Configuration): Promise; + /** + * Version: 9.0.0.cl or later Fetches security audit logs. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the [Admin Control](https://developers.thoughtspot.com/docs/rbac#_admin_control) privileges are required. #### Usage guidelines By default, the API retrieves logs for the last 24 hours. You can set a custom duration in EPOCH time. Make sure the log duration specified in your API request doesn’t exceed 24 hours. If you must fetch logs for a longer time range, modify the duration and make multiple sequential API requests. Upon successful execution, the API returns logs with the following information: * timestamp of the event * event ID * event type * name and GUID of the user * IP address of ThoughtSpot instance For more information see [Audit logs Documentation](https://developers.thoughtspot.com/docs/audit-logs). + * @param fetchLogsRequest + */ + fetchLogs(fetchLogsRequest: FetchLogsRequest, _options?: Configuration): Promise>; + /** + * Version: 26.3.0.cl or later This API fetches the object privileges present for the given list of principals (user or group), on the given set of objects. It supports pagination, which can be enabled and configured using the request parameters. It provides users access to certain features based on privilege based access control. #### Usage guidelines - Specify the `type` (`USER` or `USER_GROUP`) and `identifier` (either GUID or name) of the principals for which you want to retrieve object privilege information in the `principals` array. - Specify the `type` (`LOGICAL_TABLE`) and `identifier` (either GUID or name) of the metadata objects for which you want to retrieve object privilege information in the `metadata` array. Only `LOGICAL_TABLE` metadata type is supported for now. It may be extended for other metadata types in future. - To control the offset from where principals have to be fetched, use `record_offset`. When `record_offset` is 0, information is fetched from the beginning. - To control the number of principals to be fetched, use `record_size`. Default `record_size` is 20. - Ensure `record_offset` for a subsequent request is one more than the value of `record_size` of the previous request. - Ensure using correct Authorization Bearer Token corresponding to specific user & org. #### Example request ```json { \"principals\": [ { \"type\": \"type-1\", \"identifier\": \"principal-guid-or-name-1\" }, { \"type\": \"type-2\", \"identifier\": \"principal-guid-or-name-2\" } ], \"metadata\": [ { \"type\": \"metadata-type-1\", \"identifier\": \"metadata-guid-or-name-1\" }, { \"type\": \"metadata-type-2\", \"identifier\": \"metadata-guid-or-name-2\" } ], \"record_offset\": 0, \"record_size\": 20 } ``` #### Response format The API returns an array of `metadata_object_privileges` objects wrapped in JSON. Each `metadata_object_privileges` object contains: - Metadata information (GUID, name and type) - Array of `principal_object_privilege_info`. - Each `principal_object_privilege_info` contains: - Principal type. All principals of this type are listed as described below. - Array of `principal_object_privileges`. - Each `principal_object_privileges` contains: - Principal information (GUID, name, subtype) - List of applied object level privileges. #### Example response ```json { \"metadata_object_privileges\": [ { \"metadata_id\": \"metadata-guid-1\", \"metadata_name\": \"metadata-name-1\", \"metadata_type\": \"metadata-type-1\", \"principal_object_privilege_info\": [ { \"principal_type\": \"principal-type-1\", \"principal_object_privileges\": [ { \"principal_id\": \"principal-guid-1\", \"principal_name\": \"principal-name-1\", \"principal_sub_type\": \"principal-sub-type-1\", \"object_privileges\": \"[object-privilege-1, object-privilege-2]\" }, { \"principal_id\": \"principal-guid-2\", \"principal_name\": \"principal-name-2\", \"principal_sub_type\": \"principal-sub-type-2\", \"object_privileges\": \"[object-privilege-1, object-privilege-2]\" } ] }, { \"principal_type\": \"principal-type-2\", \"principal_object_privileges\": [ { \"principal_id\": \"principal-guid-3\", \"principal_name\": \"principal-guid-4\", \"principal_sub_type\": \"principal-sub-type-4\", \"object_privileges\": \"[object-privilege-1]\" } ] } ] }, { \"metadata_id\": \"metadata-guid-2\", \"metadata_name\": \"metadata-name-2\", \"metadata_type\": \"metadata-type-2\", \"principal_object_privilege_info\": [ { \"principal_type\": \"principal-type-1\", \"principal_object_privileges\": [ { \"principal_id\": \"principal-guid-1\", \"principal_name\": \"principal-name-1\", \"principal_sub_type\": \"principal-sub-type-1\", \"object_privileges\": \"[object-privilege-3, object-privilege-4]\" }, { \"principal_id\": \"principal-guid-2\", \"principal_name\": \"principal-name-2\", \"principal_sub_type\": \"principal-sub-type-2\", \"object_privileges\": \"[object-privilege-4]\" } ] } ] } ] } ``` + * @param fetchObjectPrivilegesRequest + */ + fetchObjectPrivileges(fetchObjectPrivilegesRequest: FetchObjectPrivilegesRequest, _options?: Configuration): Promise; + /** + * Version: 9.0.0.cl or later Fetches object permission details for a given principal object such as a user and group. Requires view access to the metadata object. #### Usage guidelines * To get a list of all metadata objects that a user or group can access, specify the `type` and GUID or name of the principal. * To get permission details for a specific object, add the `type` and GUID or name of the metadata object to your API request. Upon successful execution, the API returns a list of metadata objects and permission details for each object. + * @param fetchPermissionsOfPrincipalsRequest + */ + fetchPermissionsOfPrincipals(fetchPermissionsOfPrincipalsRequest: FetchPermissionsOfPrincipalsRequest, _options?: Configuration): Promise; + /** + * Version: 9.0.0.cl or later Fetches permission details for a given metadata object. Requires view access to the metadata object. #### Usage guidelines * To fetch a list of users and groups for a metadata object, specify `type` and GUID or name of the metadata object. * To get permission details for a specific user or group, add `type` and GUID or name of the principal object to your API request. Upon successful execution, the API returns permission details and principal information for the object specified in the API request. + * @param fetchPermissionsOnMetadataRequest + */ + fetchPermissionsOnMetadata(fetchPermissionsOnMetadataRequest: FetchPermissionsOnMetadataRequest, _options?: Configuration): Promise; + /** + * Version: 9.0.0.cl or later Enforces logout on current user sessions. Use this API with caution as it may invalidate active user sessions and force users to re-login. Make sure you specify the usernames or GUIDs. If you pass null values in the API call, all user sessions on your cluster become invalid, and the users are forced to re-login. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `USER_ADMINISTRATION` (**Can manage users**) privilege is required. + * @param forceLogoutUsersRequest + */ + forceLogoutUsers(forceLogoutUsersRequest: ForceLogoutUsersRequest, _options?: Configuration): Promise; + /** + * Version: 10.12.0.cl or later Exports a [custom calendar](https://docs.thoughtspot.com/cloud/latest/connections-cust-cal) in the CSV format. Requires `DATAMANAGEMENT` (**Can manage data**) or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your ThoughtSpot instance, the `CAN_MANAGE_CUSTOM_CALENDAR` (**Can manage custom calendars**) privilege is required. #### Usage guidelines Use this API to download a custom calendar in the CSV file format. In your API request, specify the following parameters. * Start and end date of the calendar. For \"month offset\" calendars, the start date must match the month defined in the `month_offset` attribute. You can also specify optional parameters such as the starting day of the week and prefixes for the quarter and year labels. + * @param generateCSVRequest + */ + generateCSV(generateCSVRequest: GenerateCSVRequest, _options?: Configuration): Promise; + /** + * Version: 9.0.0.cl or later Retrieves details of the current user session for the token provided in the request header. Any ThoughtSpot user can access this endpoint and send an API request. The data returned in the API response varies according to user\'s privilege and object access permissions. **NOTE**: In ThoughtSpot, users with cluster administration privileges can access all Orgs by default. However, unless the administrator is explicitly added to an Org, the Orgs list in the session information returned by the API will include only the Primary Org. To include other Orgs in the API response, you must explicitly add the administrator to each Org in the Admin settings page in the UI or via user REST API. + */ + getCurrentUserInfo(_options?: Configuration): Promise; + /** + * Version: 9.4.0.cl or later Retrieves details of the current session token for the bearer token provided in the request header. This API endpoint does not create a new token. Instead, it returns details about the token, including the token string, creation time, expiration time, and the associated user. Use this endpoint to introspect your current session token, debug authentication issues, or when a frontend application needs session token details. Any ThoughtSpot user with a valid bearer token can access this endpoint and send an API request + */ + getCurrentUserToken(_options?: Configuration): Promise; + /** + * Version: 10.4.0.cl or later Creates an authentication token that provides values for the formula variables in the Row Level Security (RLS) rules for a given user. Recommended for use cases that require Attribute-based access control (ABAC) via RLS. #### Required privileges To add a new user and assign privileges during auto-creation, the `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege is required. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled, the `CONTROL_TRUSTED_AUTH` (**Can Enable or Disable Trusted Authentication**) privilege and edit access to the data source are required. To configure formula variables for all Orgs on your instance or the Primary Org, cluster administration privileges are required. Org administrators can configure formula variables for their respective Orgs. If Role-Based Access Control (RBAC) is enabled, users with the `CAN_MANAGE_VARIABLES` (**Can manage variables**) role privilege can also create and manage variables for their Org context. #### Usage guidelines You can generate a token by providing a `username` and `password`, or by using a `secret_key`. To generate a `secret_key`, the administrator must enable [Trusted authentication](https://developers.thoughtspot.com/docs/trusted-auth-secret-key) in the **Develop** > **Customizations** > **Security Settings** page. **Note**: * When both `password` and `secret_key` are included in the API request, `password` takes precedence. * If [Multi-Factor Authentication (MFA)](https://docs.thoughtspot.com/cloud/latest/authentication-local-mfa) is enabled on your instance, the API login request with `username` and `password` returns an error. You can switch to token-based authentication with `secret_key` or contact ThoughtSpot Support for assistance. The token obtained from ThoughtSpot is valid for 5 minutes by default. You can configure the token expiration time as required. #### ABAC via RLS To implement ABAC via RLS and assign security entitlements to users during session creation, generate a token with custom variable values. The values set in the authentication token are applied to the formula variables referenced in RLS rules at the table level, which determines the data each user can access based on their entitlements. The variable values can be configured to persist for a specific set of Models in user sessions initiated with the token, allowing different RLS rules to be set for different data models. Once defined, the rules are added to the user\'s `variable_values` object, after which all sessions will use the persisted values. For more information, see [ABAC via tokens Documentation](https://developers.thoughtspot.com/docs/abac-via-rls-variables). ##### Formula variables Before defining variable values, ensure the variables are created and available on your instance. To create a formula variable, you can use the **Create variable** (`/api/rest/2.0/template/variables/create`) REST API endpoint, with the variable `type` set as `Formula_Variable` in the API request. The API doesn\'t support `\"persist_option\": \"RESET\"` and `\"persist_option\": \"NONE\"` when `variable_values` are defined in the request. If you are using `variable_values` for token generation, you must use other supported persist options such as `APPEND` or `REPLACE`. If you want to use `RESET` or `NONE`, do not pass any `variable_values`. In such cases, `variable_values` will remain unaffected. #### Supported objects The supported object type is `LOGICAL_TABLE`. When using `object_id` with `variable_values`, models are supported. #### Just-in-time provisioning For [just-in-time user creation and provisioning](https://developers.thoughtspot.com/docs/just-in-time-provisioning), specify the following attributes in the API request: * `auto_create` * `username` * `display_name` * `email` * `groups` Set `auto_create` to `true` if the username does not exist in ThoughtSpot. If the username already exists in ThoughtSpot and `auto_create` is set to `true`, user properties such as display name, email, Org and group entitlements will not be updated with new values. Setting `auto_create` to `true` does not create formula variables. Hence, this setting will not be applicable to `variable_values`. #### Important point to note All options in the token creation APIs that define user access to data in ThoughtSpot will take effect during token creation, not when the token is used for authentication. For example, `auto_create:true` will create the user when the authentication token is created. Persist options such as `APPEND` and `REPLACE` will persist `variable_values` on the user profile when the token is created. + * @param getCustomAccessTokenRequest + */ + getCustomAccessToken(getCustomAccessTokenRequest: GetCustomAccessTokenRequest, _options?: Configuration): Promise; + /** + * Version: 10.15.0.cl or later Suggests the most relevant data sources for a given natural language query, ranked by confidence with LLM-generated reasoning. Requires `CAN_USE_SPOTTER` privilege and at least view-level access to the underlying metadata entities referenced in the response. #### Usage guidelines The request must include: - `query`: the natural language question to find relevant data sources for If the request is successful, the API returns a ranked list of suggested data sources, each containing: - `confidence`: a float score indicating the model\'s confidence in the relevance of the suggestion - `details`: metadata about the data source - `data_source_identifier`: the unique ID of the data source - `data_source_name`: the display name of the data source - `description`: a description of the data source - `reasoning`: LLM-generated rationale explaining why the data source was recommended #### Error responses | Code | Description | |------|--------------------------------------------------------------------------------------------------------------------------------------------| | 401 | Unauthorized — authentication token is missing, expired, or invalid. | | 403 | Forbidden — the authenticated user does not have `CAN_USE_SPOTTER` privilege or lacks view permission on the underlying metadata entities. | > ###### Note: > * This endpoint is currently in Beta. Breaking changes may be introduced before it is made Generally Available. > * This endpoint requires Spotter — please contact ThoughtSpot Support to enable Spotter on your cluster. + * @param getDataSourceSuggestionsRequest + */ + getDataSourceSuggestions(getDataSourceSuggestionsRequest: GetDataSourceSuggestionsRequest, _options?: Configuration): Promise; + /** + * Version: 9.0.0.cl or later Generates an authentication token for creating a full session in ThoughtSpot for a given user. Recommended for use cases that do not require Attribute-based access control (ABAC) via Row Level Security (RLS). #### Usage guidelines You can generate a token for a user by providing a `username` and `password`, or by using the `secret_key` generated for your instance. To generate a `secret_key`, the administrator must enable [Trusted authentication](https://developers.thoughtspot.com/docs/trusted-auth-secret-key) in the **Develop** > **Customizations** > **Security Settings** page. **Note**: * When both `password` and `secret_key` are included in the API request, `password` takes precedence. * If [Multi-Factor Authentication (MFA)](https://docs.thoughtspot.com/cloud/latest/authentication-local-mfa) is enabled on your instance, the API login request with `username` and `password` returns an error. You can switch to token-based authentication with `secret_key` or contact ThoughtSpot Support for assistance. The token obtained from ThoughtSpot is valid for 5 minutes by default. You can configure the token expiration time as required. #### Just-in-time provisioning For [just-in-time user creation and provisioning](https://developers.thoughtspot.com/docs/just-in-time-provisioning), specify the following attributes in the API request: * `auto_create` * `username` * `display_name` * `email` * `group_identifiers` Set `auto_create` to `true` if the username does not exist in ThoughtSpot. If the user already exists in ThoughtSpot and `auto_create` is set to `true`, user properties such as display name, email and group assignment will be updated. To add a new user and assign privileges during auto-creation, the `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege is required. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled, the `CONTROL_TRUSTED_AUTH` (**Can Enable or Disable Trusted Authentication**) privilege is required. #### Important point to note All options in the token creation APIs that define user access to data in ThoughtSpot will take effect during token creation, not when the token is used for authentication. For example, `auto_create:true` will create the user when the authentication token is created. + * @param getFullAccessTokenRequest + */ + getFullAccessToken(getFullAccessTokenRequest: GetFullAccessTokenRequest, _options?: Configuration): Promise; + /** + * Version: 10.15.0.cl or later Retrieves existing natural language (NL) instructions configured for a specific data model. These instructions guide the AI system in understanding data context and generating more accurate responses. Requires `CAN_USE_SPOTTER` privilege, at least view access on the data model, and a bearer token corresponding to the org where the data model exists. #### Usage guidelines The request must include: - `data_source_identifier`: the unique ID of the data model to retrieve instructions for If the request is successful, the API returns: - `nl_instructions_info`: an array of instruction objects, each containing: - `instructions`: the configured text instructions for AI processing - `scope`: the scope of the instruction — currently only `GLOBAL` is supported #### Instructions scope - **GLOBAL**: Instructions that apply globally across the system on the given data-model (currently only global instructions are supported) #### Error responses | Code | Description | |------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| | 401 | Unauthorized — authentication token is missing, expired, or invalid. | | 403 | Forbidden — the authenticated user does not have `CAN_USE_SPOTTER` privilege, lacks view access on the data model, or the bearer token does not correspond to the org where the data model exists. | > ###### Note: > > - To use this API, the user needs at least view access on the data model, and must use the bearer token corresponding to the org where the data model exists. > - This endpoint is currently in Beta. Breaking changes may be introduced before the endpoint is made Generally Available. > - Available from version 10.15.0.cl and later. > - This endpoint requires Spotter — please contact ThoughtSpot Support to enable Spotter on your cluster. > - Use this API to review currently configured instructions before modifying them with `setNLInstructions`. + * @param getNLInstructionsRequest + */ + getNLInstructions(getNLInstructionsRequest: GetNLInstructionsRequest, _options?: Configuration): Promise; + /** + * Version: 9.0.0.cl or later Generates an authentication token that provides access to a specific metadata object. This object list is intersected with the list of objects the user is allowed to access via group membership. For more information, see [Object security](https://docs.thoughtspot.com/cloud/latest/security-data-object#object_security). #### Usage guidelines You can generate a token for a user by providing a `username` and `password`, or by using the `secret_key` generated for your instance. To generate a `secret_key`, the administrator must enable [Trusted authentication](https://developers.thoughtspot.com/docs/trusted-auth-secret-key) in the **Develop** > **Customizations** > **Security Settings** page. **Note**: * When both `password` and `secret_key` are included in the API request, `password` takes precedence. * If [Multi-Factor Authentication (MFA)](https://docs.thoughtspot.com/cloud/latest/authentication-local-mfa) is enabled on your instance, the API login request with `username` and `password` returns an error. You can switch to token-based authentication with `secret_key` or contact ThoughtSpot Support for assistance. The token obtained from ThoughtSpot is valid for 5 minutes by default. You can configure the token expiration time as required. #### Just-in-time provisioning For [just-in-time user creation and provisioning](https://developers.thoughtspot.com/docs/just-in-time-provisioning), specify the following attributes in the API request: * `auto_create` * `username` * `display_name` * `email` * `group_identifiers` Set `auto_create` to `true` if the user is not available in ThoughtSpot. If the user already exists in ThoughtSpot and the `auto_create` parameter is set to `true`, user properties such as display name, email, and group assignment will be updated. To add a new user and assign privileges, the `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege is required. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled, the `CONTROL_TRUSTED_AUTH`(**Can Enable or Disable Trusted Authentication**) privilege is required. #### Important point to note All options in the token creation APIs that define user access to data in ThoughtSpot will take effect during token creation, not when the token is used for authentication. For example, `auto_create:true` will create the user when the authentication token is created. + * @param getObjectAccessTokenRequest + */ + getObjectAccessToken(getObjectAccessTokenRequest: GetObjectAccessTokenRequest, _options?: Configuration): Promise; + /** + * Version: 10.13.0.cl or later Breaks down a natural language query into a series of smaller analytical sub-questions, each mapped to a relevant data source. Requires `CAN_USE_SPOTTER` privilege and at least view-level access to the referenced metadata objects. #### Usage guidelines The request must include: - `query`: the natural language question to decompose into analytical sub-questions - `metadata_context`: at least one of the following context identifiers to guide question generation: - `conversation_identifier` — an existing conversation session ID - `answer_identifiers` — a list of Answer GUIDs - `liveboard_identifiers` — a list of Liveboard GUIDs - `data_source_identifiers` — a list of data source GUIDs Optional parameters for refining the output: - `ai_context`: additional context to improve response quality - `content` — supplementary text or CSV data as string input - `instructions` — custom text instructions for the AI system - `limit_relevant_questions`: maximum number of questions to return (default: `5`) - `bypass_cache`: if `true`, forces fresh computation instead of returning cached results If the request is successful, the API returns a list of relevant analytical questions, each containing: - `query`: the generated sub-question - `data_source_identifier`: the unique ID of the data source the question targets - `data_source_name`: the display name of the corresponding data source #### Error responses | Code | Description | |------|---------------------------------------------------------------------------------------------------------------------------------------| | 401 | Unauthorized — authentication token is missing, expired, or invalid. | | 403 | Forbidden — the authenticated user does not have `CAN_USE_SPOTTER` privilege or lacks view access to the referenced metadata objects. | > ###### Note: > * This endpoint is currently in Beta. Breaking changes may be introduced before the endpoint is made Generally Available. > * This endpoint requires Spotter - please contact ThoughtSpot support to enable Spotter on your cluster. + * @param getRelevantQuestionsRequest + */ + getRelevantQuestions(getRelevantQuestionsRequest: GetRelevantQuestionsRequest, _options?: Configuration): Promise; + /** + * Version: 9.0.0.cl or later Retrieves the current configuration details of the cluster. If the request is successful, the API returns a list configuration settings applied on the cluster. Requires `ADMINISTRATION`(**Can administer ThoughtSpot**) privilege to view these complete configuration settings of the cluster. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `SYSTEM_INFO_ADMINISTRATION` (**Can view system activities**) privilege is required. This API does not require any parameters to be passed in the request. + */ + getSystemConfig(_options?: Configuration): Promise; + /** + * Version: 9.0.0.cl or later Gets system information such as the release version, locale, time zone, deployment environment, date format, and date time format of the cluster. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privileges. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `SYSTEM_INFO_ADMINISTRATION` (**Can view system activities**) privilege is required. This API does not require any parameters to be passed in the request. + */ + getSystemInformation(_options?: Configuration): Promise; + /** + * Version: 9.2.0.cl or later Gets a list of configuration overrides applied on the cluster. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `APPLICATION_ADMINISTRATION` (**Can manage application settings**) privilege is required. This API does not require any parameters to be passed in the request. + */ + getSystemOverrideInfo(_options?: Configuration): Promise; + /** + * Version: 9.0.0.cl or later Imports [TML](https://docs.thoughtspot.com/cloud/latest/tml) files into ThoughtSpot. Requires `DATAMANAGEMENT` (**Can manage data**) or `ADMINISTRATION` (**Can administer ThoughtsSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the following Data control privileges may be required: - `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) - `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` (**Can manage data models**) #### Usage guidelines * Import all related objects in a single TML Import API call. For example, Tables that use the same Connection object and Worksheets connected to these Tables. * Include the `fqn` property to distinguish objects that have the same name. For example, if you have multiple Connections or Worksheets with the same name on ThoughtSpot and the Connection or Worksheet referenced in your TML file does not have a unique name to distinguish, it may result in invalid object references. Adding `fqn` helps ThoughtSpot differentiate a Table from another with the same name. We recommend [exporting TML with FQNs](#/http/api-endpoints/metadata/export-metadata-tml) and using these during the import operation. * You can upload multiple TML files at a time. If you import a Worksheet along with Liveboards, Answers, and other dependent objects in a single API call, the imported objects will be immediately available for use. When you import only a Worksheet object, it may take some time for the Worksheet to become available in the ThoughtSpot system. Please wait for a few minutes, and then proceed to create an Answer and Liveboard from the newly imported Worksheet. For more information, see [TML Documentation](https://developers.thoughtspot.com/docs/tml#_import_a_tml). + * @param importMetadataTMLRequest + */ + importMetadataTML(importMetadataTMLRequest: ImportMetadataTMLRequest, _options?: Configuration): Promise>; + /** + * Version: 10.4.0.cl or later Schedules a task to import [TML](https://docs.thoughtspot.com/cloud/latest/tml) files into ThoughtSpot. You can use this API endpoint to process TML objects asynchronously when importing TMLs of large and complex metadata objects into ThoughtSpot. Unlike the synchronous import TML operation, the API processes TML data in the background and returns a task ID, which can be used to check the status of the import task via `/api/rest/2.0/metadata/tml/async/status` API endpoint. Requires `DATAMANAGEMENT` (**Can manage data**) or `ADMINISTRATION` (**Can administer ThoughtsSpot**) privilege, and edit access to the TML objects. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the following Data control privileges may be required: - `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) - `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` (**Can manage data models**) #### Usage guidelines See [Async TML API Documentation](https://developers.thoughtspot.com/docs/tml#_import_tml_objects_asynchronously) for usage guidelines. + * @param importMetadataTMLAsyncRequest + */ + importMetadataTMLAsync(importMetadataTMLAsyncRequest: ImportMetadataTMLAsyncRequest, _options?: Configuration): Promise; + /** + * Version: 9.0.0.cl or later Imports group objects from external databases into ThoughtSpot. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `GROUP_ADMINISTRATION` (**Can manage groups**) privilege is required. During the import operation: * If the specified group is not available in ThoughtSpot, it will be added to ThoughtSpot. * If `delete_unspecified_groups` is set to `true`, the groups not specified in the API request, excluding administrator and system user groups, are deleted. * If the specified groups are already available in ThoughtSpot, the object properties of these groups are modified and synchronized as per the input data in the API request. A successful API call returns the object that represents the changes made in the ThoughtSpot system. + * @param importUserGroupsRequest + */ + importUserGroups(importUserGroupsRequest: ImportUserGroupsRequest, _options?: Configuration): Promise; + /** + * Version: 9.0.0.cl or later Imports user data from external databases into ThoughtSpot. During the user import operation: * If the specified users are not available in ThoughtSpot, the users are created and assigned a default password. Defining a `default_password` in the API request is optional. * If `delete_unspecified_users` is set to `true`, the users not specified in the API request, excluding the `tsadmin`, `guest`, `system` and `su` users, are deleted. * If the specified user objects are already available in ThoughtSpot, the object properties are updated and synchronized as per the input data in the API request. A successful API call returns the object that represents the changes made in the ThoughtSpot system. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `USER_ADMINISTRATION` (**Can manage users**) privilege is required. + * @param importUsersRequest + */ + importUsers(importUsersRequest: ImportUsersRequest, _options?: Configuration): Promise; + /** + * Version: 9.0.0.cl or later Creates a login session for a ThoughtSpot user with Basic authentication. In Basic authentication method, REST clients log in to ThoughtSpot using `username` and `password` attributes. On a multi-tenant cluster with Orgs, users can pass the ID of the Org in the API request to log in to a specific Org context. **Note**: If Multi-Factor Authentication (MFA) is enabled on your instance, the API login request with basic authentication (`username` and `password` ) returns an error. Contact ThoughtSpot Support for assistance. A successful login returns a session cookie that can be used in your subsequent API requests. + * @param loginRequest + */ + login(loginRequest: LoginRequest, _options?: Configuration): Promise; + /** + * Version: 9.0.0.cl or later Logs out a user from their current session. + */ + logout(_options?: Configuration): Promise; + /** + * Version: 26.3.0.cl or later This API allows the addition or deletion of object level privileges for a set of users and groups, on a set of metadata objects. It provides users to access certain features based on privilege based access control. #### Usage guidelines - Specify the `operation`. The supported operations are: `ADD`, `REMOVE`. - Specify the type of the objects on which the object privileges are being provided in `metadata_type`. Only `LOGICAL_TABLE` metadata type is supported for now. It may be extended for other metadata types in future. - Specify the list of object privilege types in the `object_privilege_types` array. The supported object privilege types are: `SPOTTER_COACHING_PRIVILEGE`. - Specify the identifiers (either GUID or name) for the metadata objects in the `metadata_identifiers` array. - Specify the `type` (`USER` or `USER_GROUP`) and `identifier` (either GUID or name) of the principals to which you want to apply the given operation and given object privileges in the `principals` array. - Ensure using correct Authorization Bearer Token corresponding to specific user & org. #### Example request ```json { \"operation\": \"operation-type\", \"metadata_type\": \"metadata-type\", \"object_privilege_types\": [\"privilege-type-1\", \"privilege-type-2\"], \"metadata_identifiers\": [\"metadata-guid-or-name-1\", \"metadata-guid-or-name-1\"], \"principals\": [ { \"type\": \"type-1\", \"identifier\": \"principal-guid-or-name-1\" }, { \"type\": \"type-2\", \"identifier\": \"principal-guid-or-name-2\" } ] } ``` > ###### Note: > * Only admin users, users with edit access and users with coaching privilege on a given data-model can add or remove principals related to SPOTTER_COACHING_PRIVILEGE + * @param manageObjectPrivilegeRequest + */ + manageObjectPrivilege(manageObjectPrivilegeRequest: ManageObjectPrivilegeRequest, _options?: Configuration): Promise; + /** + * Parameterize fields in metadata objects. Version: 10.9.0.cl or later **Note:** This API endpoint is deprecated and will be removed from ThoughtSpot in a future release. Use [POST /api/rest/2.0/metadata/parameterize-fields](/api/rest/2.0/metadata/parameterize-fields) instead. Allows parameterizing fields in metadata objects in ThoughtSpot. Requires appropriate permissions to modify the metadata object. The API endpoint allows parameterizing the following types of metadata objects: * Logical Tables * Connections * Connection Configs For a Logical Table the field type must be `ATTRIBUTE` and field name can be one of: * databaseName * schemaName * tableName For a Connection or Connection Config, the field type is always `CONNECTION_PROPERTY`. In this case, field_name specifies the exact property of the Connection or Connection Config that needs to be parameterized. For Connection Config, the only supported field name is: * impersonate_user + * @param parameterizeMetadataRequest + */ + parameterizeMetadata(parameterizeMetadataRequest: ParameterizeMetadataRequest, _options?: Configuration): Promise; + /** + * Parameterize multiple fields of metadata objects. For example [schemaName, databaseName] for LOGICAL_TABLE. Version: 26.5.0.cl or later Allows parameterizing multiple fields of metadata objects in ThoughtSpot. For example, you can parameterize [schemaName, databaseName] for LOGICAL_TABLE. Requires appropriate permissions to modify the metadata object. The API endpoint allows parameterizing the following types of metadata objects: * Logical Tables * Connections * Connection Configs For a Logical Table, the field type must be `ATTRIBUTE` and field names can include: * databaseName * schemaName * tableName For a Connection or Connection Config, the field type is always `CONNECTION_PROPERTY`. In this case, field_names specifies the exact properties of the Connection or Connection Config that need to be parameterized. For Connection Config, supported field names include: * impersonate_user You can parameterize multiple fields at once by providing an array of field names. + * @param parameterizeMetadataFieldsRequest + */ + parameterizeMetadataFields(parameterizeMetadataFieldsRequest: ParameterizeMetadataFieldsRequest, _options?: Configuration): Promise; + /** + * Version: 26.5.0.cl or later Allows publishing metadata objects across organizations in ThoughtSpot. Requires ADMINISTRATION role and TENANT scope. The API endpoint allows publishing the following types of metadata objects: * Liveboards * Answers * Logical Tables This API will essentially share the objects along with it\'s dependencies to the org admins of the orgs to which it is being published. + * @param publishMetadataRequest + */ + publishMetadata(publishMetadataRequest: PublishMetadataRequest, _options?: Configuration): Promise; + /** + * Update values for a variable Version: 26.4.0.cl or later Allows updating values for a specific variable in ThoughtSpot. Requires ADMINISTRATION role. The CAN_MANAGE_VARIABLES permission allows you to manage Formula Variables in the current organization scope. The API endpoint allows: * Adding new values to the variable * Replacing existing values * Deleting values from the variable * Resetting all values When updating variable values, you need to specify: * The variable identifier (ID or name) * The values to add/replace/remove * The operation to perform (ADD, REPLACE, REMOVE, RESET) Behaviour based on operation type: * ADD - Adds values to the variable if this is a list type variable, else same as replace. * REPLACE - Replaces all values of a given set of constraints with the current set of values. * REMOVE - Removes any values which match the set of conditions of the variables if this is a list type variable, else clears value. * RESET - Removes all constraints for the given variable, scope is ignored + * @param identifier Unique ID or name of the variable + * @param putVariableValuesRequest + */ + putVariableValues(identifier: string, putVariableValuesRequest: PutVariableValuesRequest, _options?: Configuration): Promise; + /** + * Version: 10.7.0.cl or later **Deprecated** — Use `getRelevantQuestions` instead (available from 10.13.0.cl). Breaks down a topical or goal-oriented natural language question into smaller, actionable analytical sub-questions, each mapped to a relevant data source for independent execution. Requires `CAN_USE_SPOTTER` privilege and at least view-level access to the referenced metadata objects. #### Usage guidelines The request accepts the following parameters: - `nlsRequest`: contains the user `query` to decompose, along with optional `instructions` and `bypassCache` flag - `worksheetIds`: list of data source identifiers to scope the decomposition - `answerIds`: list of Answer GUIDs whose data guides the response - `liveboardIds`: list of Liveboard GUIDs whose data guides the response - `conversationId`: an existing conversation session ID for context continuity - `content`: supplementary text or CSV data to improve response quality - `maxDecomposedQueries`: maximum number of sub-questions to return (default: `5`) If the request is successful, the API returns a `decomposedQueryResponse` containing a list of `decomposedQueries`, each with: - `query`: the generated analytical sub-question - `worksheetId`: the unique ID of the data source the question targets - `worksheetName`: the display name of the corresponding data source #### Error responses | Code | Description | |------|---------------------------------------------------------------------------------------------------------------------------------------| | 401 | Unauthorized — authentication token is missing, expired, or invalid. | | 403 | Forbidden — the authenticated user does not have `CAN_USE_SPOTTER` privilege or lacks view access to the referenced metadata objects. | > ###### Note: > * This endpoint is deprecated since 10.13.0.cl. Use `getRelevantQuestions` for new integrations. > * This endpoint is currently in Beta. Breaking changes may be introduced before the endpoint is made Generally Available. > * This endpoint requires Spotter — please contact ThoughtSpot support to enable Spotter on your cluster. + * @param queryGetDecomposedQueryRequest + */ + queryGetDecomposedQuery(queryGetDecomposedQueryRequest: QueryGetDecomposedQueryRequest, _options?: Configuration): Promise; + /** + * Version: 9.0.0.cl or later Resets the password of a user account. Administrators can reset password on behalf of a user. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `USER_ADMINISTRATION` (**Can manage users**) privilege is required. + * @param resetUserPasswordRequest + */ + resetUserPassword(resetUserPasswordRequest: ResetUserPasswordRequest, _options?: Configuration): Promise; + /** + * Version: 9.2.0.cl or later Reverts TML objects to a previous commit specified in the API request. Requires at least edit access to objects. In the API request, specify the `commit_id`. If the branch name is not specified in the request, the API will consider the default branch configured on your instance. By default, the API reverts all objects. If the revert operation fails for one of the objects provided in the commit, the API returns an error and does not revert any object. For more information, see [Git integration documentation](https://developers.thoughtspot.com/docs/git-integration). + * @param commitId Commit id to which the object should be reverted + * @param revertCommitRequest + */ + revertCommit(commitId: string, revertCommitRequest: RevertCommitRequest, _options?: Configuration): Promise; + /** + * Version: 26.2.0.cl or later Revokes OAuth refresh tokens for users who no longer require access to a data warehouse connection. When a token is revoked, the affected user\'s session for that connection is terminated, and they must re-authenticate to regain access. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) or `DATAMANAGEMENT` (**Can manage data**) privileges. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on the ThoughtSpot instance, users with `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) privilege can also make API requests to revoke tokens for connection users. #### Usage guidelines You can specify different combinations of identifiers to control which refresh tokens are revoked. - **connection_identifier**: Revokes refresh tokens for all users of the connection, except the connection author. - **connection_identifier** and **user_identifiers**: Revokes refresh tokens only for the users specified in the request. If the name or ID of the connection author is included in the request, their token will also be revoked. - **connection_identifier** and **configuration_identifiers**: Revokes refresh tokens for all users on the specified configurations, except the configuration author. - **connection_identifier**, **configuration_identifiers**, and **user_identifiers**: Revokes refresh tokens for the specified users on the specified configurations. - **connection_identifier** and **org_identifiers**: Revokes refresh tokens for the specified Orgs. Applicable only for published connections. - **connection_identifier**, **org_identifiers**, and **user_identifiers**: Revokes refresh tokens for the specified users in the specified Orgs. Applicable only for published connections. **NOTE**: The `org_identifiers` parameter is only applicable for published connections. Using this parameter for unpublished connections will result in an error. Ensure that the connections are published before making the API request. + * @param connectionIdentifier Unique ID or name of the connection whose refresh tokens need to be revoked. All the users associated with the connection will have their refresh tokens revoked except the author. + * @param revokeRefreshTokensRequest + */ + revokeRefreshTokens(connectionIdentifier: string, revokeRefreshTokensRequest: RevokeRefreshTokensRequest, _options?: Configuration): Promise; + /** + * Version: 9.0.0.cl or later Revokes the authentication token issued for current user session. The token of your current session expires when you make a call to the `/api/rest/2.0/auth/token/revoke` endpoint. the users will not be able to access ThoughtSpot objects until a new token is obtained. To restart your session, request for a new token from ThoughtSpot. See [Get Full Access Token](#/http/api-endpoints/authentication/get-full-access-token). + * @param revokeTokenRequest + */ + revokeToken(revokeTokenRequest: RevokeTokenRequest, _options?: Configuration): Promise; + /** + * Version: 26.6.0.cl or later Returns the authentication configuration for the specified auth type at cluster and org level. Currently supports `TRUSTED_AUTH`. #### Required privileges Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) or `CONTROL_TRUSTED_AUTH` (**Can Enable or Disable Trusted Authentication**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled, the `CONTROL_TRUSTED_AUTH` privilege is required. #### Usage guidelines Use `scope` to control which level of settings are returned: - `CLUSTER` — Returns cluster-level authentication status and access tokens. Accessible only from the Primary Org. - `ORG` — Returns org-level authentication status and access tokens for the current Org. Requires the per-Org authentication feature to be enabled on your instance. - If `scope` is omitted, both cluster and org-level settings are returned based on the caller\'s org context and feature availability. The `access_tokens` array in `cluster_preferences` or `org_preferences` is omitted when no token is configured at that level. **Note**: Access tokens returned in the response are sensitive credentials. Treat them with the same care as passwords. + * @param searchAuthSettingsRequest + */ + searchAuthSettings(searchAuthSettingsRequest: SearchAuthSettingsRequest, _options?: Configuration): Promise; + /** + * Version: 10.12.0.cl or later Gets a list of [custom calendars](https://docs.thoughtspot.com/cloud/latest/connections-cust-cal). Requires `DATAMANAGEMENT` (**Can manage data**) or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your ThoughtSpot instance, the `CAN_MANAGE_CUSTOM_CALENDAR` (**Can manage custom calendars**) privilege is required. #### Usage guidelines By default, the API returns a list of custom calendars for all connection objects. To retrieve custom calendar details for a particular connection, specify the connection ID. You can also use other search parameters such as `name_pattern` and `sort_options` as search filters. The `name_pattern` parameter filters and returns only those objects that match the specified pattern. Use `%` as a wildcard for pattern matching. + * @param searchCalendarsRequest + */ + searchCalendars(searchCalendarsRequest: SearchCalendarsRequest, _options?: Configuration): Promise>; + /** + * Version: 26.4.0.cl or later Searches delivery history for communication channels such as webhooks. Returns channel-level delivery status for each job execution record. Use this to monitor channel health and delivery success rates across events. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) or `DEVELOPER` (**Has developer privilege**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, users with `CAN_MANAGE_WEBHOOKS` (**Can manage webhooks**) privilege are also authorized to perform this action. **NOTE**: When `channel_type` is `WEBHOOK`, the following constraints apply: - `job_ids`, `channel_identifiers`, and `events` each accept at most one element. - When `job_ids` is provided, it is used as the sole lookup key and other filter fields are ignored. - When `job_ids` is not provided, `channel_identifiers` and `events` are both required, each containing exactly one element. - Records older than the configured retention period are not returned. - Use `start_epoch_time_in_millis` and/or `end_epoch_time_in_millis` to narrow results to a specific time window. + * @param searchChannelHistoryRequest + */ + searchChannelHistory(searchChannelHistoryRequest: SearchChannelHistoryRequest, _options?: Configuration): Promise; + /** + * Version: 26.4.0.cl or later Gets a list of collections available in ThoughtSpot. To get details of a specific collection, specify the collection GUID or name. You can also filter the API response based on the collection name pattern, author, and other criteria. #### Search options * **name_pattern**: Use \'%\' as a wildcard character to match collection names * **collection_identifiers**: Search for specific collections by their GUIDs or names * **include_metadata**: When set to `true`, includes the metadata objects within each collection in the response **NOTE**: If the API returns an empty list, consider increasing the value of the `record_size` parameter. To search across all available collections, set `record_size` to `-1`. + * @param searchCollectionsRequest + */ + searchCollections(searchCollectionsRequest: SearchCollectionsRequest, _options?: Configuration): Promise; + /** + * Version: 9.2.0.cl or later Gets a list of commits for a given metadata object. Requires `DATAMANAGEMENT` (**Can manage data**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance on your instance, the `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` (**Can manage data models**) privilege and edit access to the metadata objects. + * @param searchCommitsRequest + */ + searchCommits(searchCommitsRequest: SearchCommitsRequest, _options?: Configuration): Promise>; + /** + * Version: 10.14.0.cl or later Fetch communication channel preferences. - Use `cluster_preferences` to fetch the default preferences for your ThoughtSpot application instance. - If your instance has [Orgs](https://docs.thoughtspot.com/cloud/latest/orgs-overview), use `org_preferences` to fetch any Org-specific preferences that override the defaults. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) or `DEVELOPER` (**Has developer privilege**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, users with `APPLICATION_ADMINISTRATION` (**Can manage application settings**) privilege are also authorized to perform this action. + * @param searchCommunicationChannelPreferencesRequest + */ + searchCommunicationChannelPreferences(searchCommunicationChannelPreferencesRequest: SearchCommunicationChannelPreferencesRequest, _options?: Configuration): Promise; + /** + * Version: 9.2.0.cl or later Gets Git repository connections configured on the ThoughtSpot instance. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance on your instance, the `CAN_SETUP_VERSION_CONTROL` (**Can set up version control**) privilege. + * @param searchConfigRequest + */ + searchConfig(searchConfigRequest: SearchConfigRequest, _options?: Configuration): Promise>; + /** + * Version: 9.2.0.cl or later Gets connection objects. Requires `DATAMANAGEMENT` (**Can manage data**) or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) privilege is required. - To get a list of all connections available in the ThoughtSpot system, send the API request without any attributes in the request body. - To get the connection objects for a specific type of data warehouse, specify the type in `data_warehouse_types`. - To fetch details of a connection object, specify the connection object GUID or name. The `name_pattern` attribute allows passing partial text with `%` for a wildcard match. - To get details of the database, schemas, tables, or columns from a data connection object, specify `data_warehouse_object_type`. - To get a specific database, schema, table, or column from a connection object, define the object type in `data_warehouse_object_type` and object properties in the `data_warehouse_objects` array. For example, to search for a column, you must pass the database, schema, and table names in the API request. Note that in the following example, object properties are set in a hierarchical order (`database` > `schema` > `table` > `column`). ``` { \"connections\": [ { \"identifier\": \"b9d1f2ef-fa65-4a4b-994e-30fa2d57b0c2\", \"data_warehouse_objects\": [ { \"database\": \"NEBULADEV\", \"schema\": \"INFORMATION_SCHEMA\", \"table\": \"APPLICABLE_ROLES\", \"column\": \"ROLE_NAME\" } ] } ], \"data_warehouse_object_type\": \"COLUMN\" } ``` - To fetch data by `configuration`, specify `data_warehouse_object_type`. For example, to fetch columns from the `DEVELOPMENT` database, specify the `data_warehouse_object_type` as `DATABASE` and define the `configuration` string as `{\"database\":\"DEVELOPMENT\"}`. To get column data for a specific table, specify the table, for example,`{\"database\":\"RETAILAPPAREL\",\"table\":\"PIPES\"}`. - To query connections by `authentication_type`, specify `data_warehouse_object_type`. Supported values for `authentication_type` are: - `SERVICE_ACCOUNT`: For connections that require service account credentials to authenticate to the Cloud Data Warehouse and fetch data. - `OAUTH`: For connections that require OAuth credentials to authenticate to the Cloud Data Warehouse and fetch data. Teradata, Oracle, and Presto Cloud Data Warehouses do not support the OAuth authentication type. - `IAM`: For connections that have the IAM OAuth set up. This authentication type is supported on Amazon Redshift connections only. - `EXTOAUTH`: For connections that have External OAuth set up. ThoughtSpot supports external [OAuth with Microsoft Azure Active Directory (AD)](https://docs.thoughtspot.com/cloud/latest/ connections-snowflake-azure-ad-oauth) and [Okta for Snowflake data connections](https://docs.thoughtspot.com/cloud/latest/connections-snowflake-okta-oauth). - `KEY_PAIR`: For connections that require Key Pair account credentials to authenticate to the Cloud Data Warehouse and fetch data. This authentication type is supported on Snowflake connections only. - `OAUTH_WITH_PKCE`: For connections that require OAuth with PKCE account credentials to authenticate to the Cloud Data Warehouse and fetch data. This authentication type is supported on Snowflake, Starburst, Databricks, Denodo connections only. - `EXTOAUTH_WITH_PKCE`: For connections that require External OAuth With PKCE account credentials to authenticate to the Cloud Data Warehouse and fetch data. This authentication type is supported on Snowflake connections only. - `OAUTH_WITH_PEZ`: For connections that require OAuth With PEZ account credentials to authenticate to the Cloud Data Warehouse and fetch data. This authentication type is supported on Amazon Redshift connections only. - `OAUTH_WITH_SERVICE_PRINCIPAL`: For connections that require OAuth With Service Principal account credentials to authenticate to the Cloud Data Warehouse and fetch data. This authentication type is supported on Databricks connections only. - `PERSONAL_ACCESS_TOKEN`: For connections that require Personal Access Token account credentials to authenticate to the Cloud Data Warehouse and fetch data. This authentication type is supported on Databricks connections only. - `OAUTH_CLIENT_CREDENTIALS`: For connections that require OAuth Client Credentials to authenticate to the Cloud Data Warehouse and fetch data. This authentication type is supported on Snowflake connections only. - To include more details about connection objects in the API response, set `include_details` to `true`. - You can also sort the output by field names and filter connections by tags. **NOTE**: When filtering connection records by parameters other than `data_warehouse_types` or `tag_identifiers`, ensure that you set `record_size` to `-1` and `record_offset` to `0` for precise results. + * @param searchConnectionRequest + */ + searchConnection(searchConnectionRequest: SearchConnectionRequest, _options?: Configuration): Promise>; + /** + * Version: 9.6.0.cl or later Gets custom actions configured on the cluster. Requires `DEVELOPER` (**Has Developer privilege**) or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `DEVELOPER` (**Has developer privilege**) privilege is required. + * @param searchCustomActionsRequest + */ + searchCustomActions(searchCustomActionsRequest: SearchCustomActionsRequest, _options?: Configuration): Promise>; + /** + * Version: 9.0.0.cl or later Generates an Answer from a given data source. Requires at least view access to the data source object (Worksheet or View). #### Usage guidelines To search data, specify the data source GUID in `logical_table_identifier`. The data source can be a Worksheet, View, Table, or SQL view. Pass search tokens in the `query_string` attribute in the API request as shown in the following example: ``` { \"query_string\": \"[sales] by [store]\", \"logical_table_identifier\": \"cd252e5c-b552-49a8-821d-3eadaa049cca\", } ``` For more information about the `query_string` format and data source attribute, see [Search data API](https://developers.thoughtspot.com/docs/fetch-data-and-report-apis#_search_data_api). The `record_size` attribute determines the number of records to retrieve in an API call. For more information about pagination, record size, and maximum row limit, see [Pagination and record size settings](https://developers.thoughtspot.com/docs/fetch-data-and-report-apis#_pagination_settings_for_data_and_report_api). + * @param searchDataRequest + */ + searchData(searchDataRequest: SearchDataRequest, _options?: Configuration): Promise; + /** + * Version: 10.10.0.cl or later Search the email customization configuration if any set for the ThoughtSpot system. #### Pre-requisites Requires `DEVELOPER` (**has developer privilege**) or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `DEVELOPER` (**Has developer privilege**) privilege is required. **NOTE**:This endpoint in currently in beta. Contact ThoughtSpot support to enable this on your instance. + * @param searchEmailCustomizationRequest + */ + searchEmailCustomization(searchEmailCustomizationRequest: SearchEmailCustomizationRequest, _options?: Configuration): Promise>; + /** + * Version: 9.0.0.cl or later Gets a list of metadata objects available on the ThoughtSpot system. This API endpoint is available to all users who have view access to the object. Users with `ADMINISTRATION` (**Can administer ThoughtSpot**) privileges can view data for all metadata objects, including users and groups. #### Usage guidelines - To get all metadata objects, send the API request without any attributes. - To get metadata objects of a specific type, set the `type` attribute. For example, to fetch a Worksheet, set the type as `LOGICAL_TABLE`. - To filter metadata objects within type `LOGICAL_TABLE`, set the `subtypes` attribute. For example, to fetch a Worksheet, set the type as `LOGICAL_TABLE` & subtypes as `[WORKSHEET]`. - To get a specific metadata object, specify the GUID. - To customize your search and filter the API response, you can use several parameters. You can search for objects created or modified by specific users, by tags applied to the objects, or by using the include parameters like `include_auto_created_objects`, `include_dependent_objects`, `include_headers`, `include_incomplete_objects`, and so on. You can also define sorting options to sort the data retrieved in the API response. - To get discoverable objects when linientmodel is enabled you can use `include_discoverable_objects` as true else false. Default value is true. - For liveboard metadata type, to get the newer format, set the `liveboard_response_format` as V2. Default value is V1. - To retrieve only objects that are published, set the `include_only_published_objects` as true. Default value is false. **NOTE**: The following parameters support pagination of metadata records: - `tag_identifiers` - `type` - `subtypes` - `created_by_user_identifiers` - `modified_by_user_identifiers` - `owned_by_user_identifiers` - `exclude_objects` - `include_auto_created_objects` - `favorite_object_options` - `include_only_published_objects` If you are using other parameters to search metadata, set `record_size` to `-1` and `record_offset` to `0`. + * @param searchMetadataRequest + */ + searchMetadata(searchMetadataRequest: SearchMetadataRequest, _options?: Configuration): Promise>; + /** + * Version: 9.0.0.cl or later Gets a list of Orgs configured on the ThoughtSpot system. To get details of a specific Org, specify the Org ID or name. You can also pass parameters such as status, visibility, and user identifiers to get a specific list of Orgs. Requires cluster administration (**Can administer Org**) privileges. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `ORG_ADMINISTRATION` (**Can manage Orgs**) privilege is required. + * @param searchOrgsRequest + */ + searchOrgs(searchOrgsRequest: SearchOrgsRequest, _options?: Configuration): Promise>; + /** + * Version: 9.5.0.cl or later Gets a list of Role objects from the ThoughtSpot system. Available if [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance. To search for Roles, the `ROLE_ADMINISTRATION` (**Can manage roles**) privilege is required. To get details of a specific Role object, specify the GUID or name. You can also filter the API response based on user group and Org identifiers, privileges assigned to the Role, and deprecation status. + * @param searchRolesRequest + */ + searchRoles(searchRolesRequest: SearchRolesRequest, _options?: Configuration): Promise>; + /** + * Search Schedules Version: 9.4.0.cl or later Gets a list of scheduled jobs configured for a Liveboard. To get details of a specific scheduled job, specify the name or GUID of the scheduled job. Requires at least view access to Liveboards. **NOTE**: When filtering schedules by parameters other than `metadata`, set `record_size` to `-1` and `record_offset` to `0` for accurate results. + * @param searchSchedulesRequest + */ + searchSchedules(searchSchedulesRequest: SearchSchedulesRequest, _options?: Configuration): Promise>; + /** + * Version: 26.2.0.cl or later Fetch security settings for your ThoughtSpot application instance. - Use `scope: CLUSTER` to retrieve cluster-level security settings, including CORS and CSP allowlists, SAML redirect URLs, and settings that control access to non-embedded pages. - Use `scope: ORG` to retrieve Org-level security settings. If your instance has [Orgs](https://docs.thoughtspot.com/cloud/latest/orgs-overview), this returns CORS and non-embed access settings specific to the Org. - If `scope` is not specified, returns both cluster and Org-specific settings based on user privileges. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) or `DEVELOPER` (**Has developer privilege**) privilege. See [Security Settings](https://developers.thoughtspot.com/docs/security-settings) for more details. + * @param searchSecuritySettingsRequest + */ + searchSecuritySettings(searchSecuritySettingsRequest: SearchSecuritySettingsRequest, _options?: Configuration): Promise; + /** + * Version: 9.0.0.cl or later Gets a list of tag objects available on the ThoughtSpot system. To get details of a specific tag object, specify the GUID or name. Any authenticated user can search for tag objects. + * @param searchTagsRequest + */ + searchTags(searchTagsRequest: SearchTagsRequest, _options?: Configuration): Promise>; + /** + * Version: 9.0.0.cl or later Gets a list of user group objects from the ThoughtSpot system. To get details of a specific user group, specify the user group GUID or name. You can also filter the API response based on User ID, Org ID, Role ID, type of group, sharing visibility, privileges assigned to the group, and the Liveboard IDs assigned to the users in the group. Available to all users. Users with `ADMINISTRATION` (**Can administer ThoughtSpot**) privileges can view all users properties. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `GROUP_ADMINISTRATION` (**Can manage groups**) privilege is required. **NOTE**: If you do not get precise results, try setting `record_size` to `-1` and `record_offset` to `0`. + * @param searchUserGroupsRequest + */ + searchUserGroups(searchUserGroupsRequest: SearchUserGroupsRequest, _options?: Configuration): Promise>; + /** + * Version: 9.0.0.cl or later Gets a list of users available on the ThoughtSpot system. To get details of a specific user, specify the user GUID or name. You can also filter the API response based on groups, Org ID, user visibility, account status, user type, and user preference settings and favorites. Available to all users. Users with `ADMINISTRATION` (**Can administer ThoughtSpot**) privileges can view all users properties. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `USER_ADMINISTRATION` (**Can manage users**) privilege is required. **NOTE**: If the API returns an empty list, consider increasing the value of the `record_size` parameter. To search across all available users, set `record_size` to `-1`. + * @param searchUsersRequest + */ + searchUsers(searchUsersRequest: SearchUsersRequest, _options?: Configuration): Promise>; + /** + * Search variables Version: 26.4.0.cl or later Allows searching for variables in ThoughtSpot. Requires ADMINISTRATION role. The CAN_MANAGE_VARIABLES permission allows you to manage Formula Variables in the current organization scope. The API endpoint supports searching variables by: * Variable identifier (ID or name) * Variable type * Name pattern (case-insensitive, supports % for wildcard) The search results can be formatted in three ways: * METADATA - Returns only variable metadata (default) * METADATA_AND_VALUES - Returns variable metadata and values The values can be filtered by scope: * org_identifier * principal_identifier * model_identifier + * @param searchVariablesRequest + */ + searchVariables(searchVariablesRequest: SearchVariablesRequest, _options?: Configuration): Promise>; + /** + * Version: 10.14.0.cl or later Searches for webhook configurations based on various criteria such as Org, webhook identifier, event type, with support for pagination and sorting. Returns matching webhook configurations with their complete details. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) or `DEVELOPER` (**Has developer privilege**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, users with `CAN_MANAGE_WEBHOOKS` (**Can manage webhooks**) privilege are also authorized to perform this action. + * @param searchWebhookConfigurationsRequest + */ + searchWebhookConfigurations(searchWebhookConfigurationsRequest: SearchWebhookConfigurationsRequest, _options?: Configuration): Promise; + /** + * Version: 26.5.0.cl or later Sends natural language messages to an existing Spotter agent conversation and returns the complete response synchronously. Requires `CAN_USE_SPOTTER` privilege and access to the metadata object associated with the conversation. The user must have access to the conversation session referenced by `conversation_identifier`. A conversation must first be created using the `createAgentConversation` API. #### Usage guidelines The request must include: - `conversation_identifier`: the unique session ID returned by `createAgentConversation`, used for context continuity and message tracking - `messages`: an array of one or more text messages to send to the agent The API returns an array of response objects, each containing: - `type`: the kind of response — `text`, `answer`, or `error` - `message`: the main content of the response - `metadata`: additional information depending on the message type (e.g., answer metadata includes analytics and visualization details) #### Error responses | Code | Description | |------|----------------------------------------------------------------------------------------------------------------------------------| | 401 | Unauthorized — authentication token is missing, expired, or invalid. | | 403 | Forbidden — the authenticated user does not have `CAN_USE_SPOTTER` privilege or lacks permission on the referenced conversation. | > ###### Note: > > - This endpoint is Generally Available from version 26.5.0.cl. > - This endpoint requires Spotter - please contact ThoughtSpot support to enable Spotter on your cluster. > - For real-time streamed responses, use `sendAgentConversationMessageStreaming` instead. + * @param conversationIdentifier Unique identifier for the conversation (used to track context) + * @param sendAgentConversationMessageRequest + */ + sendAgentConversationMessage(conversationIdentifier: string, sendAgentConversationMessageRequest: SendAgentConversationMessageRequest, _options?: Configuration): Promise; + /** + * Version: 26.5.0.cl or later Sends one or more natural language messages to an existing Spotter agent conversation and returns the response as a real-time Server-Sent Events stream. Requires `CAN_USE_SPOTTER` privilege and access to the metadata object associated with the conversation. The user must have access to the conversation session referenced by `conversation_identifier`. A conversation must first be created using the `createAgentConversation` API. #### Usage guidelines The request must include: - `conversation_identifier`: the unique session ID returned by `createAgentConversation`, used for context continuity and message tracking - `messages`: an array of one or more text messages to send to the agent If the request is valid, the API returns a Server-Sent Events (SSE) stream. Each line has the form `data: [{\"type\": \"...\", ...}]` — a JSON array of event objects. Event types include: - `ack`: confirms receipt of the request (`node_id`) - `conv_title`: conversation title (`title`, `conv_id`) - `notification`: status updates on operations (`group_id`, `metadata`, `code` — e.g. `TOOL_CALL_NOTIFICATION`, `nls_start`, `FINAL_RESPONSE_NOTIFICATION`) - `text-chunk`: incremental content chunks (`id`, `group_id`, `metadata` with `format` and `type` such as `thinking` or `text`, `content`) - `text`: full text block with same structure as `text-chunk` - `answer`: structured answer with metadata (`id`, `group_id`, `metadata` with `sage_query`, `session_id`, `title`, etc., `title`) - `error`: if a failure occurs #### Error responses | Code | Description | | ---- | -------------------------------------------------------------------------------------------------------------------------------- | | 401 | Unauthorized — authentication token is missing, expired, or invalid. | | 403 | Forbidden — the authenticated user does not have `CAN_USE_SPOTTER` privilege or lacks permission on the referenced conversation. | > ###### Note: > > - This endpoint is Generally Available from version 26.5.0.cl. > - This endpoint requires Spotter - please contact ThoughtSpot support to enable Spotter on your cluster. > - The streaming protocol uses Server-Sent Events (SSE). > - For the complete response in a single payload, use `sendAgentConversationMessage` instead. + * @param conversationIdentifier Unique identifier for the conversation (used to track context) + * @param sendAgentConversationMessageStreamingRequest + */ + sendAgentConversationMessageStreaming(conversationIdentifier: string, sendAgentConversationMessageStreamingRequest: SendAgentConversationMessageStreamingRequest, _options?: Configuration): Promise; + /** + * Version: 26.2.0.cl or later **Deprecated** — Use `sendAgentConversationMessage` instead. Send natural language messages to an existing Spotter agent conversation and returns the complete response synchronously. Requires `CAN_USE_SPOTTER` privilege and access to the metadata object associated with the conversation. The user must have access to the conversation session referenced by `conversation_identifier`. A conversation must first be created using the `createAgentConversation` API. #### Usage guidelines The request must include: - `conversation_identifier`: the unique session ID returned by `createAgentConversation`, used for context continuity and message tracking - `messages`: an array of one or more text messages to send to the agent The API returns an array of response objects, each containing: - `type`: the kind of response — `text`, `answer`, or `error` - `message`: the main content of the response - `metadata`: additional information depending on the message type (e.g., answer metadata includes analytics and visualization details) #### Error responses | Code | Description | |------|----------------------------------------------------------------------------------------------------------------------------------| | 401 | Unauthorized — authentication token is missing, expired, or invalid. | | 403 | Forbidden — the authenticated user does not have `CAN_USE_SPOTTER` privilege or lacks permission on the referenced conversation. | > ###### Note: > > - This endpoint is deprecated. Use `sendAgentConversationMessage` for new integrations. > - This endpoint is currently in Beta. Breaking changes may be introduced before the endpoint is made Generally Available. > - This endpoint requires Spotter - please contact ThoughtSpot support to enable Spotter on your cluster. + * @param conversationIdentifier Unique identifier for the conversation (used to track context) + * @param sendAgentMessageRequest + */ + sendAgentMessage(conversationIdentifier: string, sendAgentMessageRequest: SendAgentMessageRequest, _options?: Configuration): Promise; + /** + * Version: 26.2.0.cl or later **Deprecated** — Use `sendAgentConversationMessageStreaming` instead. Sends one or more natural language messages to an existing Spotter agent conversation and returns the response as a real-time Server-Sent Events stream. Requires `CAN_USE_SPOTTER` privilege and access to the metadata object associated with the conversation. The user must have access to the conversation session referenced by `conversation_identifier`. A conversation must first be created using the `createAgentConversation` API. #### Usage guidelines The request must include: - `conversation_identifier`: the unique session ID returned by `createAgentConversation`, used for context continuity and message tracking - `messages`: an array of one or more text messages to send to the agent If the request is valid, the API returns a Server-Sent Events (SSE) stream. Each line has the form `data: [{\"type\": \"...\", ...}]` — a JSON array of event objects. Event types include: - `ack`: confirms receipt of the request (`node_id`) - `conv_title`: conversation title (`title`, `conv_id`) - `notification`: status updates on operations (`group_id`, `metadata`, `code` — e.g. `TOOL_CALL_NOTIFICATION`, `nls_start`, `FINAL_RESPONSE_NOTIFICATION`) - `text-chunk`: incremental content chunks (`id`, `group_id`, `metadata` with `format` and `type` such as `thinking` or `text`, `content`) - `text`: full text block with same structure as `text-chunk` - `answer`: structured answer with metadata (`id`, `group_id`, `metadata` with `sage_query`, `session_id`, `title`, etc., `title`) - `error`: if a failure occurs #### Error responses | Code | Description | |------|----------------------------------------------------------------------------------------------------------------------------------| | 401 | Unauthorized — authentication token is missing, expired, or invalid. | | 403 | Forbidden — the authenticated user does not have `CAN_USE_SPOTTER` privilege or lacks permission on the referenced conversation. | > ###### Note: > > - This endpoint is deprecated. Use `sendAgentConversationMessageStreaming` for new integrations. > - This endpoint is currently in Beta. Breaking changes may be introduced before the endpoint is made Generally Available. > - This endpoint requires Spotter - please contact ThoughtSpot support to enable Spotter on your cluster. > - The streaming protocol uses Server-Sent Events (SSE). + * @param sendAgentMessageStreamingRequest + */ + sendAgentMessageStreaming(sendAgentMessageStreamingRequest: SendAgentMessageStreamingRequest, _options?: Configuration): Promise; + /** + * Version: 10.4.0.cl or later Sends a follow-up message to an existing conversation within the context of a data model. Requires `CAN_USE_SPOTTER` privilege and at least view access to the metadata object specified in the request. A conversation must first be created using the `createConversation` API. #### Usage guidelines The request must include: - `conversation_identifier`: the unique session ID returned by `createConversation` - `metadata_identifier`: the unique ID of the data source used for the conversation - `message`: a natural language string with the follow-up question If the request is successful, the API returns an array of response messages, each containing: - `session_identifier`: the unique ID of the generated response - `generation_number`: the generation number of the response - `message_type`: the type of the response (e.g., `TSAnswer`) - `visualization_type`: the generated visualization type (`Chart`, `Table`, or `Undefined`) - `tokens` / `display_tokens`: the search tokens and user-friendly display tokens for the response #### Error responses | Code | Description | |------|-----------------------------------------------------------------------------------------------------------------------------------------| | 401 | Unauthorized — authentication token is missing, expired, or invalid. | | 403 | Forbidden — the authenticated user does not have `CAN_USE_SPOTTER` privilege or lacks view permission on the specified metadata object. | > ###### Note: > * This endpoint is currently in Beta. Breaking changes may be introduced before the endpoint is made Generally Available. > * This endpoint requires Spotter - please contact ThoughtSpot support to enable Spotter on your cluster. + * @param conversationIdentifier Unique identifier of the conversation. + * @param sendMessageRequest + */ + sendMessage(conversationIdentifier: string, sendMessageRequest: SendMessageRequest, _options?: Configuration): Promise>; + /** + * Version: 10.15.0.cl or later This API allows users to set natural language (NL) instructions for a specific data-model to improve AI-generated answers and query processing. These instructions help guide the AI system to better understand the data context and provide more accurate responses. Requires `CAN_USE_SPOTTER` privilege, either edit access or `SPOTTER_COACHING_PRIVILEGE` on the data model, and a bearer token corresponding to the org where the data model exists. #### Usage guidelines To set NL instructions for a data-model, the request must include: - `data_source_identifier`: The unique ID of the data-model for which to set NL instructions - `nl_instructions_info`: An array of instruction objects, each containing: - `instructions`: Array of text instructions for the LLM - `scope`: The scope of the instruction (`GLOBAL`). Currently only `GLOBAL` is supported. It can be extended to data-model-user scope in future. #### Instructions scope - **GLOBAL**: instructions that apply to all users querying this data model If the request is successful, the API returns: - `success`: a boolean indicating whether the operation completed successfully #### Error responses | Code | Description | |------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| | 401 | Unauthorized — authentication token is missing, expired, or invalid. | | 403 | Forbidden — the authenticated user does not have `CAN_USE_SPOTTER` privilege, lacks edit access or `SPOTTER_COACHING_PRIVILEGE` on the data model, or the bearer token does not correspond to the org where the data model exists. | > ###### Note: > > - To use this API, the user needs either edit access or `SPOTTER_COACHING_PRIVILEGE` on the data model, and must use the bearer token corresponding to the org where the data model exists. > - This endpoint is currently in Beta. Breaking changes may be introduced before the endpoint is made Generally Available. > - Available from version 10.15.0.cl and later. > - This endpoint requires Spotter — please contact ThoughtSpot Support to enable Spotter on your cluster. > - Instructions help improve the accuracy and relevance of AI-generated responses for the specified data-model. + * @param setNLInstructionsRequest + */ + setNLInstructions(setNLInstructionsRequest: SetNLInstructionsRequest, _options?: Configuration): Promise; + /** + * Version: 9.0.0.cl or later Allows sharing one or several metadata objects with users and groups in ThoughtSpot. Requires edit access to the metadata object. #### Supported metadata objects: * Liveboards * Visualizations * Answers * Models * Views * Connections * Collections #### Object permissions You can provide `READ_ONLY` or `MODIFY` access when sharing an object with another user or group. The `READ_ONLY` permission grants view access to the shared object, whereas `MODIFY` provides edit access. To prevent a user or group from accessing the shared object, specify the GUID or name of the principal and set `shareMode` to `NO_ACCESS`. #### Sharing a visualization * Sharing a visualization implicitly shares the entire Liveboard with the recipient. * Object permissions set for a shared visualization also apply to the Liveboard unless overridden by another API request or via UI. * If email notifications for object sharing are enabled, a notification with a link to the shared visualization will be sent to the recipient’s email address. Although this link opens the shared visualization, recipients can also access other visualizations in the Liveboard. #### Sharing a collection Collections support **dual permissions** that provide fine-grained control: * **Collection permissions** (`share_mode`) - controls access to the collection itself (view, edit, delete the collection) * **Content permissions** (`content_share_mode`) - controls access to objects within the collection (view, edit objects inside) **Default Behavior:** - If only `share_mode` is specified, the content permissions default to `READ_ONLY` (except when `share_mode` is `NO_ACCESS`, then content also gets `NO_ACCESS`) - To give users edit access to collection contents, explicitly set `content_share_mode: \"MODIFY\"` ## Examples The following JSON examples can be copy-pasted as request bodies for the REST v2 API endpoint: ```bash POST /callosum/v1/v2/security/metadata/share Content-Type: application/x-www-form-urlencoded ``` ### Basic collection sharing Share a collection with read-only access: ```json { \"metadata_type\": \"COLLECTION\", \"metadata_identifiers\": [\"Sales Reports Collection\"], \"permissions\": [{ \"principal\": { \"type\": \"USER\", \"identifier\": \"alice@company.com\" }, \"share_mode\": \"READ_ONLY\" }], \"notification\": { \"message\": \"I\'ve shared the Sales Reports collection with you\", \"notify_on_share\": true } } ``` ### Collection sharing with dual permissions Share a collection with different permissions for the collection vs. its contents: ```json { \"metadata_type\": \"COLLECTION\", \"metadata_identifiers\": [\"Marketing Analytics\"], \"permissions\": [{ \"principal\": { \"type\": \"USER\", \"identifier\": \"bob@company.com\" }, \"share_mode\": \"MODIFY\", \"content_share_mode\": \"READ_ONLY\" }, { \"principal\": { \"type\": \"USER_GROUP\", \"identifier\": \"Marketing Team\" }, \"share_mode\": \"READ_ONLY\", \"content_share_mode\": \"READ_ONLY\" }], \"notification\": { \"emails\": [\"bob@company.com\"], \"message\": \"You can edit the collection but content is read-only\", \"enable_custom_url\": false, \"notify_on_share\": true }, \"has_lenient_discoverability\": false } ``` ### Multiple collections sharing Share multiple collections with different users: ```json { \"metadata\": [ { \"type\": \"COLLECTION\", \"identifier\": \"Q4 Reports\" }, { \"type\": \"COLLECTION\", \"identifier\": \"Executive Dashboard Collection\" } ], \"permissions\": [{ \"principal\": { \"type\": \"USER_GROUP\", \"identifier\": \"Executives\" }, \"share_mode\": \"MODIFY\" }, { \"principal\": { \"type\": \"USER\", \"identifier\": \"manager@company.com\" }, \"share_mode\": \"READ_ONLY\", \"content_share_mode\": \"MODIFY\" }], \"notification\": { \"message\": \"Sharing quarterly collections with leadership team\", \"notify_on_share\": true } } ``` ### Remove collection access Remove access to a collection by setting share_mode to NO_ACCESS: ```json { \"metadata_type\": \"COLLECTION\", \"metadata_identifiers\": [\"Confidential Reports\"], \"permissions\": [{ \"principal\": { \"type\": \"USER\", \"identifier\": \"former-employee@company.com\" }, \"share_mode\": \"NO_ACCESS\" }], \"notification\": { \"notify_on_share\": false } } ``` ### Collection Permission Scenarios **Scenario 1: Collection Admin** - `share_mode: MODIFY` + `content_share_mode: MODIFY` = Full control over collection and its contents **Scenario 2: Collection Curator** - `share_mode: MODIFY` + `content_share_mode: READ_ONLY` = Can manage collection structure but not edit contents **Scenario 3: Content Editor** - `share_mode: READ_ONLY` + `content_share_mode: MODIFY` = Can edit objects within collection but can\'t change collection itself **Scenario 4: Viewer** - `share_mode: READ_ONLY` + `content_share_mode: READ_ONLY` = View-only access to collection and contents + * @param shareMetadataRequest + */ + shareMetadata(shareMetadataRequest: ShareMetadataRequest, _options?: Configuration): Promise; + /** + * Version: 10.4.0.cl or later Processes a natural language query against a specified data model and returns a single AI-generated answer without requiring a conversation session. Requires `CAN_USE_SPOTTER` privilege and at least view access to the metadata object specified in the request. #### Usage guidelines The request must include: - `query`: a natural language question (e.g., \"What were total sales last quarter?\") - `metadata_identifier`: the unique ID of the data source to query against If the request is successful, the API returns a response message containing: - `session_identifier`: the unique ID of the generated response - `generation_number`: the generation number of the response - `message_type`: the type of the response (e.g., `TSAnswer`) - `visualization_type`: the generated visualization type (`Chart`, `Table`, or `Undefined`) - `tokens` / `display_tokens`: the search tokens and user-friendly display tokens for the response #### Error responses | Code | Description | |------|-----------------------------------------------------------------------------------------------------------------------------------------| | 401 | Unauthorized — authentication token is missing, expired, or invalid. | | 403 | Forbidden — the authenticated user does not have `CAN_USE_SPOTTER` privilege or lacks view permission on the specified metadata object. | > ###### Note: > * This endpoint is currently in Beta. Breaking changes may be introduced before the endpoint is made Generally Available. > * This endpoint requires Spotter - please contact ThoughtSpot support to enable Spotter on your cluster. + * @param singleAnswerRequest + */ + singleAnswer(singleAnswerRequest: SingleAnswerRequest, _options?: Configuration): Promise; + /** + * Stops an in-progress agent conversation response. Version: 26.6.0.cl or later Version: 26.6.0.cl or later Stops an in-progress agent response for the specified conversation. Use this endpoint to cancel a response that is actively being generated — for example, when the user navigates away, reformulates their question, or no longer needs the current result. Requires `CAN_USE_SPOTTER` privilege and access to the specified conversation. #### Usage guidelines The request must include: - `conversation_identifier` *(path parameter)*: the unique ID of the conversation whose active response should be stopped, as returned by `createAgentConversation` A successful request returns an empty `204 No Content` response. If there is no active response in progress at the time of the call, the request is still treated as successful. After stopping a response, the conversation session remains active. You can continue sending messages using `sendAgentConversationMessage` or `sendAgentConversationMessageStreaming`. #### Example request ```bash POST /api/rest/2.0/ai/agent/conversation/{conversation_identifier}/stop-response ``` #### Typical usage scenario This endpoint is useful when integrating Spotter into a chat UI where users can cancel a long-running query. For example: 1. User sends a message via `sendAgentConversationMessageStreaming`. 2. User clicks a \"Stop generating\" button while the response is streaming. 3. Your client calls `stopConversation` with the active `conversation_identifier`. 4. The stream is terminated and the user can ask a new question. #### Error responses | Code | Description | |------|-------------| | 401 | Unauthorized — authentication token is missing, expired, or invalid. | | 403 | Forbidden — the authenticated user does not have `CAN_USE_SPOTTER` privilege or lacks access to the specified conversation. | > ###### Note: > > - Calling this endpoint when no response is in progress does not return an error. > - The conversation context is preserved after stopping — previous messages and answers remain accessible. > - Available from version 26.6.0.cl and later. > - This endpoint requires Spotter — please contact ThoughtSpot Support to enable Spotter on your cluster. > - This feature is available only for **Spotter 3** (`SPOTTER3`) version. + * @param conversationIdentifier Unique identifier of the conversation to stop. + */ + stopConversation(conversationIdentifier: string, _options?: Configuration): Promise; + /** + * Version: 26.5.0.cl or later Synchronizes connection metadata attributes from your Cloud Data Warehouse (CDW) with ThoughtSpot. Requires the `DATAMANAGEMENT` (**Can manage data**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` (**Can manage data models**) privilege is required. #### Usage guidelines To synchronize attributes from a CDW, specify the connection GUID or name in the `connection_identifier` path parameter and `sync_attributes` in the request body. Default attribute is `[\"DESCRIPTION\"]`. ##### Hierarchical schema * Connection: The connection object for the sync operation. * Tables: Tables for the sync operation. When no table is specified, all tables are synchronized. * Columns: If the table is specified, you can add the columns for the sync operation. If no columns are specified, all columns in the specified table are considered for the sync operation. To set the scope for the sync operation: * Connection-level: To sync all tables and columns, pass an empty request body, or only the attributes in the request body. * Table-level: To synchronize specific tables and their columns, specify the table identifiers in the `tables` array. * Column-level: To synchronize specific columns, specify the table identifier as the key and column identifiers as the value in the `tables` array. ``` { \"tables\": [ {\"table-guid-1\": [\"column-guid-1\", \"column-guid-2\"]}, \"table-guid-2\" ], \"sync_attributes\": [\"DESCRIPTION\"] } ``` ##### API response If the sync operation is successful, the API returns the following information: * Status of the sync operation. For example, `SUCCESS`, `PARTIAL_SUCCESS`, or `NO_UPDATE`. * Number of tables and columns that were updated. * Number of tables and columns with the sync failed status when the overall sync status is `PARTIAL_SUCCESS`. * Message text indicating the sync results. + * @param connectionIdentifier Unique ID or name of the connection. + * @param syncMetadataRequest + */ + syncMetadata(connectionIdentifier: string, syncMetadataRequest: SyncMetadataRequest, _options?: Configuration): Promise; + /** + * Version: 9.0.0.cl or later Removes the tags applied to a Liveboard, Answer, Table, or Worksheet. Requires edit access to the metadata object. + * @param unassignTagRequest + */ + unassignTag(unassignTagRequest: UnassignTagRequest, _options?: Configuration): Promise; + /** + * Remove parameterization from fields in metadata objects. Version: 26.5.0.cl or later Allows removing parameterization from fields in metadata objects in ThoughtSpot. Requires appropriate permissions to modify the metadata object. The API endpoint allows unparameterizing the following types of metadata objects: * Logical Tables * Connections * Connection Configs For a Logical Table the field type must be `ATTRIBUTE` and field name can be one of: * databaseName * schemaName * tableName For a Connection or Connection Config, the field type is always `CONNECTION_PROPERTY`. In this case, field_name specifies the exact property of the Connection or Connection Config that needs to be unparameterized. For Connection Config, the only supported field name is: * impersonate_user + * @param unparameterizeMetadataRequest + */ + unparameterizeMetadata(unparameterizeMetadataRequest: UnparameterizeMetadataRequest, _options?: Configuration): Promise; + /** + * Version: 26.5.0.cl or later Allows unpublishing metadata objects from organizations in ThoughtSpot. Requires ADMINISTRATION role and TENANT scope. The API endpoint allows unpublishing the following types of metadata objects: * Liveboards * Answers * Logical Tables When unpublishing objects, you can: * Include dependencies by setting `include_dependencies` to true - this will unpublish all dependent objects if no other published object is using them * Force unpublish by setting `force` to true - this will break all dependent objects in the unpublished organizations + * @param unpublishMetadataRequest + */ + unpublishMetadata(unpublishMetadataRequest: UnpublishMetadataRequest, _options?: Configuration): Promise; + /** + * Version: 10.12.0.cl or later Updates the properties of a [custom calendar](https://docs.thoughtspot.com/cloud/latest/connections-cust-cal). Requires `DATAMANAGEMENT` (**Can manage data**) or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your ThoughtSpot instance, the `CAN_MANAGE_CUSTOM_CALENDAR` (**Can manage custom calendars**) privilege is required. #### Usage guidelines You can update the properties of a calendar using one of the following methods: * `FROM_INPUT_PARAMS` to update the calendar properties with the values defined in the API request. * `FROM_EXISTING_TABLE` Creates a calendar from the parameters defined in the API request. To update a custom calendar, specify the calendar ID as a path parameter in the request URL and the following parameters in the request body: * Connection ID and Table name * Database and schema name attributes: For most Cloud Data Warehouse (CDW) connectors, both `database_name` and `schema_name` attributes are required. However, the attribute requirements are conditional and vary based on the connector type and its metadata structure. For example, for connectors such as Teradata, MySQL, SingleSore, Amazon Aurora MySQL, Amazon RDS MySQL, Oracle, and GCP_MYSQL, the `schema_name` is required, whereas the `database_name` attribute is not. Similarly, connectors such as ClickHouse require you to specify the `database_name` and the schema specification in such cases is optional. The API allows you to modify the calendar type, month offset value, start and end date, starting day of the week, and prefixes assigned to the year and quarter labels. #### Examples Update a custom calendar using an existing Table in ThoughtSpot: ``` { \"update_method\": \"FROM_EXISTING_TABLE\", \"table_reference\": { \"connection_identifier\": \"Connection1\", \"database_name\": \"db1\", \"table_name\": \"custom_calendar_2025\", \"schame_name\": \"schemaVar\" } } ``` Update a custom calendar with the attributes defined in the API request: ``` { \"update_method\": \"FROM_INPUT_PARAMS\", \"table_reference\": { \"connection_identifier\": \"Connection1\", \"database_name\": \"db1\", \"table_name\": \"custom_calendar_2025\", \"schame_name\": \"schemaVar\" }, \"month_offset\": \"August\", \"start_day_of_week\": \"Monday\", \"start_date\": \"08/01/2025\", \"end_date\": \"07/31/2026\" } ``` + * @param calendarIdentifier Unique Id or name of the calendar. + * @param updateCalendarRequest + */ + updateCalendar(calendarIdentifier: string, updateCalendarRequest: UpdateCalendarRequest, _options?: Configuration): Promise; + /** + * Version: 26.4.0.cl or later Updates an existing collection in ThoughtSpot. #### Supported operations This API endpoint lets you perform the following operations: * Update collection name and description * Change visibility settings * Add metadata objects to the collection (operation: ADD) * Remove metadata objects from the collection (operation: REMOVE) * Replace all metadata objects in the collection (operation: REPLACE) #### Operation types * **ADD**: Adds the specified metadata objects to the existing collection without removing current items * **REMOVE**: Removes only the specified metadata objects from the collection * **REPLACE**: Replaces all existing metadata objects with the specified items (default behavior) + * @param collectionIdentifier Unique GUID of the collection. Note: Collection names cannot be used as identifiers since duplicate names are allowed. + * @param updateCollectionRequest + */ + updateCollection(collectionIdentifier: string, updateCollectionRequest: UpdateCollectionRequest, _options?: Configuration): Promise; + /** + * Version: 10.12.0.cl or later Creates, updates, or deletes column security rules for specified tables. This API endpoint allows you to create, update, or delete column-level security rules on columns of a table. The operation follows an \"all or none\" policy: if defining security rules for any of the provided columns fails, the entire operation will be rolled back, and no rules will be created. #### Usage guidelines - Provide table identifier using either `identifier` (GUID or name) or `obj_identifier` (object ID) - Use `clear_csr: true` to remove all column security rules from the table - For each column, specify the security rule using `column_security_rules` array - Use `is_unsecured: true` to mark a specific column as unprotected - Use `group_access` operations to manage group associations: - `ADD`: Add groups to the column\'s access list - `REMOVE`: Remove groups from the column\'s access list - `REPLACE`: Replace all existing groups with the specified groups #### Required permissions - `ADMINISTRATION` - Can administer ThoughtSpot - `DATAMANAGEMENT` - Can manage data (if RBAC is disabled) - `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` - Can manage worksheet views and tables (if RBAC is enabled) #### Example request ```json { \"identifier\": \"table-guid\", \"obj_identifier\": \"table-object-id\", \"clear_csr\": false, \"column_security_rules\": [ { \"column_identifier\": \"col id or col name\", \"is_unsecured\": false, \"group_access\": [ { \"operation\": \"ADD\", \"group_identifiers\": [\"hr_group_id\", \"hr_group_name\", \"finance_group_id\"] } ] }, { \"column_identifier\": \"col id or col name\", \"is_unsecured\": true }, { \"column_identifier\": \"col id or col name\", \"is_unsecured\": false, \"group_access\": [ { \"operation\": \"REPLACE\", \"group_identifiers\": [\"management_group_id\", \"management_group_name\"] } ] } ] } ``` #### Request Body Schema - `identifier` (string, optional): GUID or name of the table for which we want to create column security rules - `obj_identifier` (string, optional): The object ID of the table - `clear_csr` (boolean, optional): If true, then all the secured columns will be marked as unprotected, and all the group associations will be removed - `column_security_rules` (array of objects, required): An array where each object defines the security rule for a specific column Each column security rule object contains: - `column_identifier` (string, required): Column identifier (col_id or name) - `is_unsecured` (boolean, optional): If true, the column will be marked as unprotected and all groups associated with it will be removed - `group_access` (array of objects, optional): Array of group operation objects Each group operation object contains: - `operation` (string, required): Operation type - ADD, REMOVE, or REPLACE - `group_identifiers` (array of strings, required): Array of group identifiers (name or GUID) on which the operation will be performed #### Response This API does not return any response body. A successful operation returns HTTP 200 status code. #### Operation Types - **ADD**: Adds the specified groups to the column\'s access list - **REMOVE**: Removes the specified groups from the column\'s access list - **REPLACE**: Replaces all existing groups with the specified groups + * @param updateColumnSecurityRulesRequest + */ + updateColumnSecurityRules(updateColumnSecurityRulesRequest: UpdateColumnSecurityRulesRequest, _options?: Configuration): Promise; + /** + * Version: 9.2.0.cl or later Updates Git repository configuration settings. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance on your instance, the `CAN_SETUP_VERSION_CONTROL` (**Can set up version control**) privilege. + * @param updateConfigRequest + */ + updateConfig(updateConfigRequest: UpdateConfigRequest, _options?: Configuration): Promise; + /** + * Version: 9.2.0.cl or later **Important**: This endpoint is deprecated and will be removed from ThoughtSpot in September 2025. ThoughtSpot strongly recommends using the [Update connection V2](#/http/api-endpoints/connections/update-connection-v2) endpoint to update your connection objects. #### Usage guidelines Updates a connection object. Requires `DATAMANAGEMENT` (**Can manage data**) and edit permissions to the connection object, or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) privilege is required. To update a connection object, pass these parameters in your API request: 1. GUID of the connection object. 2. If you are updating tables or database schema of a connection object: a. Add the updated JSON map of metadata with database, schema, and tables in `data_warehouse_config`. b. Set `validate` to `true`. 3. If you are updating a configuration attribute, connection name, or description, you can set `validate` to `false`. + * @param updateConnectionRequest + */ + updateConnection(updateConnectionRequest: UpdateConnectionRequest, _options?: Configuration): Promise; + /** + * Version: 10.12.0.cl or later Updates a connection configuration object. Requires `DATAMANAGEMENT` (**Can manage data**) and edit permissions to the connection object, or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) privilege is required. #### Supported operations This API endpoint lets you perform the following operations in a single API request: * Edit the name or description of the configuration * Edit the configuration properties * Edit the `policy_type` * Edit the type of authentication * Enable or disable a configuration #### Parameterized Connection Support For parameterized oauth based connections, only the `same_as_parent` and `policy_process_options` attributes are allowed. These attributes are not applicable to connections that are not parameterized. **NOTE**: When updating a configuration where `disabled` is `true`, you must reset `disabled` to `true` in your update request payload. If not explicitly set again, the API will default `disabled` to `false`. + * @param configurationIdentifier Unique ID or name of the configuration. + * @param updateConnectionConfigurationRequest + */ + updateConnectionConfiguration(configurationIdentifier: string, updateConnectionConfigurationRequest: UpdateConnectionConfigurationRequest, _options?: Configuration): Promise; + /** + * Version: 26.6.0.cl or later Activates or deactivates a connection. A deactivated connection cannot be used for queries or operations until it is activated again. Requires `DATAMANAGEMENT` (**Can manage data**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) privilege is required. Only the connection owner or an administrator can perform this operation. #### Usage guidelines To update the status of a connection, specify the connection GUID or name in the `connection_identifier` path parameter and the desired `status` in the request body. - **ACTIVATED**: Enables the connection. Queries and operations can resume on an activated connection. - **DEACTIVATED**: Disables the connection. It does not remove the connection metadata, but only makes the connection unavailable for queries and operations. You can reactivate a deactivated connection by setting \"status\": \"ACTIVATED\". + * @param connectionIdentifier Unique ID or name of the connection. + * @param updateConnectionStatusRequest + */ + updateConnectionStatus(connectionIdentifier: string, updateConnectionStatusRequest: UpdateConnectionStatusRequest, _options?: Configuration): Promise; + /** + * Version: 10.4.0.cl or later Updates a connection object. Requires `DATAMANAGEMENT` (**Can manage data**) and edit permissions to the connection object, or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) privilege is required. To update a connection object, pass these parameters in your API request: 1. GUID of the connection object. 2. If you are updating tables or database schema of a connection object: a. Add the updated JSON map of metadata with database, schema, and tables in `data_warehouse_config`. b. Set `validate` to `true`. **NOTE:** If the `authentication_type` is anything other than SERVICE_ACCOUNT, you must explicitly provide the authenticationType property in the payload. If you do not specify authenticationType, the API will default to SERVICE_ACCOUNT as the authentication type. * A JSON map of configuration attributes, database details, and table properties in `data_warehouse_config` as shown in the following example: * This is an example of updating a single table in a empty connection: ``` { \"authenticationType\": \"SERVICE_ACCOUNT\", \"externalDatabases\": [ { \"name\": \"DEVELOPMENT\", \"isAutoCreated\": false, \"schemas\": [ { \"name\": \"TS_dataset\", \"tables\": [ { \"name\": \"DEMORENAME\", \"type\": \"TABLE\", \"description\": \"\", \"selected\": true, \"linked\": true, \"gid\": 0, \"datasetId\": \"-1\", \"subType\": \"\", \"reportId\": \"\", \"viewId\": \"\", \"columns\": [ { \"name\": \"Col1\", \"type\": \"VARCHAR\", \"canImport\": true, \"selected\": true, \"description\": \"\", \"isLinkedActive\": true, \"isAggregate\": false }, { \"name\": \"Col2\", \"type\": \"VARCHAR\", \"canImport\": true, \"selected\": true, \"description\": \"\", \"isLinkedActive\": true, \"isAggregate\": false }, { \"name\": \"Col3\", \"type\": \"VARCHAR\", \"canImport\": true, \"selected\": true, \"description\": \"\", \"isLinkedActive\": true, \"isAggregate\": false }, { \"name\": \"Col312\", \"type\": \"VARCHAR\", \"canImport\": true, \"selected\": true, \"description\": \"\", \"isLinkedActive\": true, \"isAggregate\": false }, { \"name\": \"Col4\", \"type\": \"VARCHAR\", \"canImport\": true, \"selected\": true, \"description\": \"\", \"isLinkedActive\": true, \"isAggregate\": false } ], \"relationships\": [] } ] } ] } ], \"configuration\": { \"password\": \"\", \"database\": \"DEVELOPMENT\", \"role\": \"DEV\", \"accountName\": \"thoughtspot_partner\", \"warehouse\": \"DEMO_WH\", \"user\": \"DEV_USER\" } } ``` * This is an example of updating a single table in an existing connection with tables: ``` { \"authenticationType\": \"SERVICE_ACCOUNT\", \"externalDatabases\": [ { \"name\": \"DEVELOPMENT\", \"isAutoCreated\": false, \"schemas\": [ { \"name\": \"TS_dataset\", \"tables\": [ { \"name\": \"CUSTOMER\", \"type\": \"TABLE\", \"description\": \"\", \"selected\": true, \"linked\": true, \"gid\": 0, \"datasetId\": \"-1\", \"subType\": \"\", \"reportId\": \"\", \"viewId\": \"\", \"columns\": [], \"relationships\": [] }, { \"name\": \"tpch5k_falcon_default_schema_users\", \"type\": \"TABLE\", \"description\": \"\", \"selected\": true, \"linked\": true, \"gid\": 0, \"datasetId\": \"-1\", \"subType\": \"\", \"reportId\": \"\", \"viewId\": \"\", \"columns\": [ { \"name\": \"user_id\", \"type\": \"INT64\", \"canImport\": true, \"selected\": true, \"description\": \"\", \"isLinkedActive\": true, \"isAggregate\": false }, { \"name\": \"product_id\", \"type\": \"INT64\", \"canImport\": true, \"selected\": true, \"description\": \"\", \"isLinkedActive\": true, \"isAggregate\": false }, { \"name\": \"user_cost\", \"type\": \"INT64\", \"canImport\": true, \"selected\": true, \"description\": \"\", \"isLinkedActive\": true, \"isAggregate\": false } ], \"relationships\": [] } ] } ] } ], \"configuration\": { \"password\": \"\", \"database\": \"DEVELOPMENT\", \"role\": \"DEV\", \"accountName\": \"thoughtspot_partner\", \"warehouse\": \"DEMO_WH\", \"user\": \"DEV_USER\" } } ``` 3. If you are updating a configuration attribute, connection name, or description, you can set `validate` to `false`. **NOTE:** If the `authentication_type` is anything other than SERVICE_ACCOUNT, you must explicitly provide the authenticationType property in the payload. If you do not specify authenticationType, the API will default to SERVICE_ACCOUNT as the authentication type. * A JSON map of configuration attributes in `data_warehouse_config`. The following example shows the configuration attributes for a Snowflake connection: ``` { \"configuration\":{ \"accountName\":\"thoughtspot_partner\", \"user\":\"tsadmin\", \"password\":\"TestConn123\", \"role\":\"sysadmin\", \"warehouse\":\"MEDIUM_WH\" }, \"externalDatabases\":[ ] } ``` + * @param connectionIdentifier Unique ID or name of the connection. + * @param updateConnectionV2Request + */ + updateConnectionV2(connectionIdentifier: string, updateConnectionV2Request: UpdateConnectionV2Request, _options?: Configuration): Promise; + /** + * Version: 9.6.0.cl or later Updates a custom action. Requires `DEVELOPER` (**Has Developer privilege**) or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `DEVELOPER` (**Has developer privilege**) privilege is required. #### Usage Guidelines The API allows you to modify the following properties: * Name of the custom action * Action availability to groups * Association to metadata objects * Authentication settings for a URL-based action For more information, see [Custom actions](https://developers.thoughtspot.com/docs/custom-action-intro). + * @param customActionIdentifier Unique ID or name of the custom action. + * @param updateCustomActionRequest + */ + updateCustomAction(customActionIdentifier: string, updateCustomActionRequest: UpdateCustomActionRequest, _options?: Configuration): Promise; + /** + * Version: 9.9.0.cl or later Updates a DBT connection object. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege or `DATAMANAGEMENT` (**Can manage data ThoughtSpot**) privilege, along with an existing DBT connection. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the following data control privileges may be required: - `CAN_MANAGE_CUSTOM_CALENDAR`(**Can manage custom calendars**) - `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) - `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` (**Can manage data models**) #### About update DBT connection You can modify DBT connection object properties such as embrace connection name, embrace database name, import type, account identifier, access token, project identifier and environment (or) embrace connection, embrace database name, import type, file_content settings. + * @param dbtConnectionIdentifier Unique ID of the DBT Connection. + * @param connectionName Name of the connection. + * @param databaseName Name of the Database. + * @param importType Mention type of Import + * @param accessToken Access token is mandatory when Import_Type is DBT_CLOUD. + * @param dbtUrl DBT URL is mandatory when Import_Type is DBT_CLOUD. + * @param accountId Account ID is mandatory when Import_Type is DBT_CLOUD + * @param projectId Project ID is mandatory when Import_Type is DBT_CLOUD + * @param dbtEnvId DBT Environment ID\\\" + * @param projectName Name of the project + * @param fileContent Upload DBT Manifest and Catalog artifact files as a ZIP file. This field is Mandatory when Import Type is \\\'ZIP_FILE\\\' + */ + updateDbtConnection(dbtConnectionIdentifier: string, connectionName?: string, databaseName?: string, importType?: string, accessToken?: string, dbtUrl?: string, accountId?: string, projectId?: string, dbtEnvId?: string, projectName?: string, fileContent?: HttpFile, _options?: Configuration): Promise; + /** + * Version: 10.12.0.cl or later Updates a customization configuration for the notification email. #### Pre-requisites Requires `DEVELOPER` (**has developer privilege**) or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `DEVELOPER` (**Has developer privilege**) privilege is required. **NOTE**:This endpoint in currently in beta. Contact ThoughtSpot support to enable this on your instance. #### Usage guidelines To update a custom configuration pass these parameters in your API request: - A JSON map of configuration attributes `template_properties`. The following example shows a sample set of customization configuration: ``` { { \"cta_button_bg_color\": \"#444DEA\", \"cta_text_font_color\": \"#FFFFFF\", \"primary_bg_color\": \"#D3DEF0\", \"logo_url\": \"https://storage.pardot.com/710713/1642089901EbkRibJq/TS_fullworkmark_darkmode.png\", \"font_family\": \"\", \"product_name\": \"ThoughtSpot\", \"footer_address\": \"444 Castro St, Suite 1000 Mountain View, CA 94041\", \"footer_phone\": \"(800) 508-7008\", \"replacement_value_for_liveboard\": \"Dashboard\", \"replacement_value_for_answer\": \"Chart\", \"replacement_value_for_spot_iq\": \"AI Insights\", \"hide_footer_phone\": false, \"hide_footer_address\": false, \"hide_product_name\": false, \"hide_manage_notification\": false, \"hide_mobile_app_nudge\": false, \"hide_privacy_policy\": false, \"hide_ts_vocabulary_definitions\": false, \"hide_error_message\": false, \"hide_unsubscribe_link\": false, \"hide_notification_status\": false, \"hide_modify_alert\": false, \"company_website_url\": \"https://your-website.com/\", \"company_privacy_policy_url\" : \"https://link-to-privacy-policy.com/\", \"contact_support_url\": \"https://link-to-contact-support.com/\", \"hide_contact_support_url\": false, \"hide_logo_url\" : false } } ``` + * @param updateEmailCustomizationRequest + */ + updateEmailCustomization(updateEmailCustomizationRequest: UpdateEmailCustomizationRequest, _options?: Configuration): Promise; + /** + * Update header attributes for a given list of header objects. Version: 10.6.0.cl or later ## Prerequisites - **Privileges Required:** - `DATAMANAGEMENT` (Can manage data) or `ADMINISTRATION` (Can administer ThoughtSpot). - **Additional Privileges (if RBAC is enabled):** - `ORG_ADMINISTRATION` (Can manage orgs). --- ## Usage Guidelines ### Parameters 1. **headers_update** - **Description:** List of header objects with their attributes to be updated. Each object contains a list of attributes to be updated in the header. - **Usage:** - You must provide either `identifier` or `obj_identifier`, but not both. Both fields cannot be empty. - When `org_identifier` is set to `-1`, only the `identifier` value is accepted; `obj_identifier` is not allowed. 2. **org_identifier** - **Description:** GUID (Globally Unique Identifier) or name of the organization. - **Usage:** - Leaving this field empty assumes that the changes should be applied to the current organization - Provide `org_guid` or `org_name` to uniquely identify the organization where changes need to be applied. . - Provide `-1` if changes have to be applied across all the org. --- ## Note Currently, this API is enabled only for updating the `obj_identifier` attribute. Only `text` will be allowed in attribute\'s value. ## Best Practices 1. **Backup Before Conversion:** Always export metadata as a backup before initiating the update process --- ## Examples ### Only `identifier` is given ```json { \"headers_update\": [ { \"identifier\": \"guid_1\", \"obj_identifier\": \"\", \"type\": \"LOGICAL_COLUMN\", \"attributes\": [ { \"name\": \"obj_id\", \"value\": \"custom_object_id\" } ] } ], \"org_identifier\": \"orgGuid\" } ``` ### Only `obj_identifier` is given ```json { \"headers_update\": [ { \"obj_identifier\": \"custom_object_id\", \"type\": \"ANSWER\", \"attributes\": [ { \"name\": \"obj_id\", \"value\": \"custom_object_id\" } ] } ], \"org_identifier\": \"orgName\" } ``` ### Executing update for all org `-1` ```json { \"headers_update\": [ { \"identifier\": \"guid_1\", \"type\": \"ANSWER\", \"attributes\": [ { \"name\": \"obj_id\", \"value\": \"custom_object_id\" } ] } ], \"org_identifier\": -1 } ``` ### Optional `type` is not provided ```json { \"headers_update\": [ { \"identifier\": \"guid_1\", \"attributes\": [ { \"name\": \"obj_id\", \"value\": \"custom_object_id\" } ] } ], \"org_identifier\": -1 } ``` + * @param updateMetadataHeaderRequest + */ + updateMetadataHeader(updateMetadataHeaderRequest: UpdateMetadataHeaderRequest, _options?: Configuration): Promise; + /** + * Update object IDs for given metadata objects. Version: 10.8.0.cl or later ## Prerequisites - **Privileges Required:** - `DATAMANAGEMENT` (Can manage data) or `ADMINISTRATION` (Can administer ThoughtSpot). - **Additional Privileges (if RBAC is enabled):** - `ORG_ADMINISTRATION` (Can manage orgs). --- ## Usage Guidelines ### Parameters 1. **metadata** - **Description:** List of metadata objects to update their object IDs. - **Usage:** - Use either `current_obj_id` alone OR use `metadata_identifier` with `type` (when needed). - When using `metadata_identifier`, the `type` field is required if using a name instead of a GUID. - The `new_obj_id` field is always required. --- ## Note This API is specifically designed for updating object IDs of metadata objects. It internally uses the header update mechanism to perform the changes. ## Best Practices 1. **Backup Before Update:** Always export metadata as a backup before initiating the update process. 2. **Validation:** - When using `current_obj_id`, ensure it matches the existing object ID exactly. - When using `metadata_identifier` with a name, ensure the `type` is specified correctly. - Verify that the `new_obj_id` follows your naming conventions and is unique within your system. --- ## Examples ### Using current_obj_id ```json { \"metadata\": [ { \"current_obj_id\": \"existing_object_id\", \"new_obj_id\": \"new_object_id\" } ] } ``` ### Using metadata_identifier with GUID ```json { \"metadata\": [ { \"metadata_identifier\": \"01234567-89ab-cdef-0123-456789abcdef\", \"new_obj_id\": \"new_object_id\" } ] } ``` ### Using metadata_identifier with name and type ```json { \"metadata\": [ { \"metadata_identifier\": \"My Answer\", \"type\": \"ANSWER\", \"new_obj_id\": \"new_object_id\" } ] } ``` ### Multiple objects update ```json { \"metadata\": [ { \"current_obj_id\": \"existing_object_id_1\", \"new_obj_id\": \"new_object_id_1\" }, { \"metadata_identifier\": \"My Worksheet\", \"type\": \"LOGICAL_TABLE\", \"new_obj_id\": \"new_object_id_2\" } ] } ``` + * @param updateMetadataObjIdRequest + */ + updateMetadataObjId(updateMetadataObjIdRequest: UpdateMetadataObjIdRequest, _options?: Configuration): Promise; + /** + * Version: 9.0.0.cl or later Updates an Org object. You can modify Org properties such as name, description, and user associations. Requires cluster administration (**Can administer Org**) privileges. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `ORG_ADMINISTRATION` (**Can manage Orgs**) privilege is required. + * @param orgIdentifier ID or name of the Org + * @param updateOrgRequest + */ + updateOrg(orgIdentifier: string, updateOrgRequest: UpdateOrgRequest, _options?: Configuration): Promise; + /** + * Version: 9.5.0.cl or later Updates the properties of a Role object. Available only if [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance. To update a Role, the `ROLE_ADMINISTRATION` (**Can manage roles**) privilege is required. + * @param roleIdentifier Unique ID or name of the Role. + * @param updateRoleRequest + */ + updateRole(roleIdentifier: string, updateRoleRequest: UpdateRoleRequest, _options?: Configuration): Promise; + /** + * Update schedule. Version: 9.4.0.cl or later Updates a scheduled Liveboard job. Requires at least edit access to Liveboards. To update a schedule on behalf of another user, you need `ADMINISTRATION` (**Can administer Org**) or `JOBSCHEDULING` (**Can schedule for others**) privilege and edit access to the Liveboard. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `JOBSCHEDULING` (**Can schedule for others**) privilege is required. The API endpoint allows you to pause a scheduled job, change the status of a paused job. You can also edit the recipients list, frequency of the job, format of the file to send to the recipients in email notifications, PDF options, and time zone setting. + * @param scheduleIdentifier Unique ID or name of the schedule. + * @param updateScheduleRequest + */ + updateSchedule(scheduleIdentifier: string, updateScheduleRequest: UpdateScheduleRequest, _options?: Configuration): Promise; + /** + * Version: 9.2.0.cl or later Updates the current configuration of the cluster. You must send the configuration data in JSON format. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privileges. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `APPLICATION_ADMINISTRATION` (**Can manage application settings**) privilege is required. + * @param updateSystemConfigRequest + */ + updateSystemConfig(updateSystemConfigRequest: UpdateSystemConfigRequest, _options?: Configuration): Promise; + /** + * Version: 9.0.0.cl or later Updates a tag object. You can modify the `name` and `color` properties of a tag object. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `TAGMANAGEMENT` (**Can manage tags**) privilege is required to create, edit, and delete tags. + * @param tagIdentifier Name or Id of the tag. + * @param updateTagRequest + */ + updateTag(tagIdentifier: string, updateTagRequest: UpdateTagRequest, _options?: Configuration): Promise; + /** + * Version: 9.0.0.cl or later Updates the properties of a user object. You can modify user properties such as username, email, and share notification settings. You can also assign new groups and Orgs, remove the user from a group or Org, reset password, and modify user preferences. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `USER_ADMINISTRATION` (**Can manage users**) privilege is required. + * @param userIdentifier GUID / name of the user + * @param updateUserRequest + */ + updateUser(userIdentifier: string, updateUserRequest: UpdateUserRequest, _options?: Configuration): Promise; + /** + * Version: 9.0.0.cl or later Updates the properties of a group object in ThoughtSpot. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `GROUP_ADMINISTRATION` (**Can manage groups**) privilege is required. #### Supported operations This API endpoint lets you perform the following operations in a single API request: * Edit [privileges](https://developers.thoughtspot.com/docs/?pageid=api-user-management#group-privileges) * Add or remove users * Change sharing visibility settings * Add or remove sub-groups * Assign a default Liveboard or update the existing settings + * @param groupIdentifier GUID or name of the group. + * @param updateUserGroupRequest + */ + updateUserGroup(groupIdentifier: string, updateUserGroupRequest: UpdateUserGroupRequest, _options?: Configuration): Promise; + /** + * Update a variable\'s name Version: 26.4.0.cl or later Allows updating a variable\'s name in ThoughtSpot. Requires ADMINISTRATION role and TENANT scope. The CAN_MANAGE_VARIABLES permission allows you to manage Formula Variables in the current organization scope. The API endpoint allows updating: * The variable name + * @param identifier Unique id or name of the variable to update. + * @param updateVariableRequest + */ + updateVariable(identifier: string, updateVariableRequest: UpdateVariableRequest, _options?: Configuration): Promise; + /** + * Update values for multiple variables Version: 10.14.0.cl or later **Note:** This API endpoint is deprecated and will be removed from ThoughtSpot in a future release. Use [POST /api/rest/2.0/template/variables/{identifier}/update-values](/api/rest/2.0/template/variables/%7Bidentifier%7D/update-values) instead. Allows updating values for multiple variables in ThoughtSpot. Requires ADMINISTRATION role. The CAN_MANAGE_VARIABLES permission allows you to manage Formula Variables in the current organization scope. The API endpoint allows: * Adding new values to variables * Replacing existing values * Deleting values from variables When updating variable values, you need to specify: * The variable identifiers * The values to add/replace/remove for each variable * The operation to perform (ADD, REPLACE, REMOVE, RESET) Behaviour based on operation type: * ADD - Adds values to the variable if this is a list type variable, else same as replace. * REPLACE - Replaces all values of a given set of constraints with the current set of values. * REMOVE - Removes any values which match the set of conditions of the variables if this is a list type variable, else clears value. * RESET - Removes all constrains for a given variable, scope is ignored + * @param updateVariableValuesRequest + */ + updateVariableValues(updateVariableValuesRequest: UpdateVariableValuesRequest, _options?: Configuration): Promise; + /** + * Version: 10.14.0.cl or later Updates an existing webhook configuration by its unique id or name. Only the provided fields will be updated. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) or `DEVELOPER` (**Has developer privilege**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, users with `CAN_MANAGE_WEBHOOKS` (**Can manage webhooks**) privilege are also authorized to perform this action. + * @param webhookIdentifier Unique ID or name of the webhook configuration. + * @param updateWebhookConfigurationRequest + */ + updateWebhookConfiguration(webhookIdentifier: string, updateWebhookConfigurationRequest: UpdateWebhookConfigurationRequest, _options?: Configuration): Promise; + /** + * Version: 26.4.0.cl or later Validates a communication channel configuration to ensure it is properly set up and can receive events. - Use `channel_type` to specify the type of communication channel to validate (e.g., WEBHOOK). - Use `channel_identifier` to provide the unique identifier or name for the communication channel. - Use `event_type` to specify the event type to validate for this channel. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) or `DEVELOPER` (**Has developer privilege**) privilege. For webhook channels, users with `CAN_MANAGE_WEBHOOKS` (**Can manage webhooks**) privilege are also authorized to perform this action. + * @param validateCommunicationChannelRequest + */ + validateCommunicationChannel(validateCommunicationChannelRequest: ValidateCommunicationChannelRequest, _options?: Configuration): Promise; + /** + * Version: 10.10.0.cl or later Validates the email customization configuration if any set for the ThoughtSpot system. #### Pre-requisites Requires `DEVELOPER` (**has developer privilege**) or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `DEVELOPER` (**Has developer privilege**) privilege is required. **NOTE**:This endpoint in currently in beta. Contact ThoughtSpot support to enable this on your instance. + */ + validateEmailCustomization(_options?: Configuration): Promise; + /** + * Version: 9.2.0.cl or later Validates the content of your source branch against the objects in your destination environment. Before merging content from your source branch to the destination branch, run this API operation from your destination environment and ensure that the changes from the source branch function in the destination environment. Requires `DATAMANAGEMENT` (**Can manage data**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance on your instance, the `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` (**Can manage data models**) privilege and edit access to the metadata objects. + * @param validateMergeRequest + */ + validateMerge(validateMergeRequest: ValidateMergeRequest, _options?: Configuration): Promise>; + /** + * Version: 9.12.0.cl or later Validates the authentication token specified in the API request. If your token is not valid, [Get a new token](#/http/api-endpoints/authentication/get-full-access-token). + * @param validateTokenRequest + */ + validateToken(validateTokenRequest: ValidateTokenRequest, _options?: Configuration): Promise; +} + +declare class PromiseUsersApi { + private api; + constructor(configuration: Configuration, requestFactory?: UsersApiRequestFactory, responseProcessor?: UsersApiResponseProcessor); + /** + * Version: 9.7.0.cl or later Activates a deactivated user account. Requires `ADMINISTRATION` (**Can administer Thoughtspot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `USER_ADMINISTRATION` (**Can manage users**) privilege is required. To activate an inactive user account, the API request body must include the following information: - Username or the GUID of the user account. - Auth token generated for the deactivated user. The auth token is sent in the API response when a user is deactivated. - Password for the user account. + * @param activateUserRequest + */ + activateUser(activateUserRequest: ActivateUserRequest, _options?: Configuration): Promise; + /** + * Version: 9.0.0.cl or later Updates the current password of the user. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `USER_ADMINISTRATION` (**Can manage users**) privilege is required. + * @param changeUserPasswordRequest + */ + changeUserPassword(changeUserPasswordRequest: ChangeUserPasswordRequest, _options?: Configuration): Promise; + /** + * Version: 9.0.0.cl or later Creates a user in ThoughtSpot. The API endpoint allows you to configure several user properties such as email address, account status, share notification preferences, and sharing visibility. You can provision the user to [groups](https://docs.thoughtspot.com/cloud/latest/groups-privileges) and [Orgs](https://docs.thoughtspot.com/cloud/latest/orgs-overview). You can also add Liveboard, Answer, and Worksheet objects to the user’s favorites list, assign a default Liveboard for the user, and set user preferences. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `USER_ADMINISTRATION` (**Can manage users**) privilege is required. + * @param createUserRequest + */ + createUser(createUserRequest: CreateUserRequest, _options?: Configuration): Promise; + /** + * Version: 9.7.0.cl or later Deactivates a user account. Requires `ADMINISTRATION` (**Can administer Thoughtspot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `USER_ADMINISTRATION` (**Can manage users**) privilege is required. To deactivate a user account, the API request body must include the following information: - Username or the GUID of the user account - Base URL of the ThoughtSpot instance If the API request is successful, ThoughtSpot returns the activation URL in the response. The activation URL is valid for 14 days and can be used to re-activate the account and reset the password of the deactivated account. + * @param deactivateUserRequest + */ + deactivateUser(deactivateUserRequest: DeactivateUserRequest, _options?: Configuration): Promise; + /** + * Version: 9.0.0.cl or later Deletes a user from the ThoughtSpot system. If you want to remove a user from a specific Org but not from ThoughtSpot, update the group and Org mapping properties of the user object via a POST API call to the [/api/rest/2.0/users/{user_identifier}/update](#/http/api-endpoints/users/update-user) endpoint. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `USER_ADMINISTRATION` (**Can manage users**) privilege is required. + * @param userIdentifier GUID / name of the user + */ + deleteUser(userIdentifier: string, _options?: Configuration): Promise; + /** + * Version: 9.0.0.cl or later Enforces logout on current user sessions. Use this API with caution as it may invalidate active user sessions and force users to re-login. Make sure you specify the usernames or GUIDs. If you pass null values in the API call, all user sessions on your cluster become invalid, and the users are forced to re-login. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `USER_ADMINISTRATION` (**Can manage users**) privilege is required. + * @param forceLogoutUsersRequest + */ + forceLogoutUsers(forceLogoutUsersRequest: ForceLogoutUsersRequest, _options?: Configuration): Promise; + /** + * Version: 9.0.0.cl or later Imports user data from external databases into ThoughtSpot. During the user import operation: * If the specified users are not available in ThoughtSpot, the users are created and assigned a default password. Defining a `default_password` in the API request is optional. * If `delete_unspecified_users` is set to `true`, the users not specified in the API request, excluding the `tsadmin`, `guest`, `system` and `su` users, are deleted. * If the specified user objects are already available in ThoughtSpot, the object properties are updated and synchronized as per the input data in the API request. A successful API call returns the object that represents the changes made in the ThoughtSpot system. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `USER_ADMINISTRATION` (**Can manage users**) privilege is required. + * @param importUsersRequest + */ + importUsers(importUsersRequest: ImportUsersRequest, _options?: Configuration): Promise; + /** + * Version: 9.0.0.cl or later Resets the password of a user account. Administrators can reset password on behalf of a user. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `USER_ADMINISTRATION` (**Can manage users**) privilege is required. + * @param resetUserPasswordRequest + */ + resetUserPassword(resetUserPasswordRequest: ResetUserPasswordRequest, _options?: Configuration): Promise; + /** + * Version: 9.0.0.cl or later Gets a list of users available on the ThoughtSpot system. To get details of a specific user, specify the user GUID or name. You can also filter the API response based on groups, Org ID, user visibility, account status, user type, and user preference settings and favorites. Available to all users. Users with `ADMINISTRATION` (**Can administer ThoughtSpot**) privileges can view all users properties. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `USER_ADMINISTRATION` (**Can manage users**) privilege is required. **NOTE**: If the API returns an empty list, consider increasing the value of the `record_size` parameter. To search across all available users, set `record_size` to `-1`. + * @param searchUsersRequest + */ + searchUsers(searchUsersRequest: SearchUsersRequest, _options?: Configuration): Promise>; + /** + * Version: 9.0.0.cl or later Updates the properties of a user object. You can modify user properties such as username, email, and share notification settings. You can also assign new groups and Orgs, remove the user from a group or Org, reset password, and modify user preferences. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `USER_ADMINISTRATION` (**Can manage users**) privilege is required. + * @param userIdentifier GUID / name of the user + * @param updateUserRequest + */ + updateUser(userIdentifier: string, updateUserRequest: UpdateUserRequest, _options?: Configuration): Promise; +} + +declare class PromiseVariableApi { + private api; + constructor(configuration: Configuration, requestFactory?: VariableApiRequestFactory, responseProcessor?: VariableApiResponseProcessor); + /** + * Create a variable which can be used for parameterizing metadata objects Version: 26.4.0.cl or later Allows creating a variable which can be used for parameterizing metadata objects in ThoughtSpot. Requires ADMINISTRATION role and TENANT scope. The CAN_MANAGE_VARIABLES permission allows you to manage Formula Variables in the current organization scope. The API endpoint supports the following types of variables: * CONNECTION_PROPERTY - For connection properties * TABLE_MAPPING - For table mappings * CONNECTION_PROPERTY_PER_PRINCIPAL - For connection properties per principal. In order to use this please contact support to enable this. * FORMULA_VARIABLE - For Formula variables, introduced in 10.15.0.cl When creating a variable, you need to specify: * The variable type * A unique name for the variable * Whether the variable contains sensitive values (defaults to false) * The data type of the variable, only specify for formula variables (defaults to null) The operation will fail if: * The user lacks required permissions * The variable name already exists * The variable type is invalid + * @param createVariableRequest + */ + createVariable(createVariableRequest: CreateVariableRequest, _options?: Configuration): Promise; + /** + * Delete a variable Version: 10.14.0.cl or later **Note:** This API endpoint is deprecated and will be removed from ThoughtSpot in a future release. Use [POST /api/rest/2.0/template/variables/delete](/api/rest/2.0/template/variables/delete) instead. Allows deleting a variable from ThoughtSpot. Requires ADMINISTRATION role and TENANT scope. The CAN_MANAGE_VARIABLES permission allows you to manage Formula Variables in the current organization scope. The API endpoint requires: * The variable identifier (ID or name) The operation will fail if: * The user lacks required permissions * The variable doesn\'t exist * The variable is being used by other objects + * @param identifier Unique id or name of the variable + */ + deleteVariable(identifier: string, _options?: Configuration): Promise; + /** + * Delete variable(s) Version: 26.4.0.cl or later Allows deleting multiple variables from ThoughtSpot. Requires ADMINISTRATION role and TENANT scope. The CAN_MANAGE_VARIABLES permission allows you to manage Formula Variables in the current organization scope. The API endpoint requires: * The variable identifiers (IDs or names) The operation will fail if: * The user lacks required permissions * Any of the variables don\'t exist * Any of the variables are being used by other objects + * @param deleteVariablesRequest + */ + deleteVariables(deleteVariablesRequest: DeleteVariablesRequest, _options?: Configuration): Promise; + /** + * Update values for a variable Version: 26.4.0.cl or later Allows updating values for a specific variable in ThoughtSpot. Requires ADMINISTRATION role. The CAN_MANAGE_VARIABLES permission allows you to manage Formula Variables in the current organization scope. The API endpoint allows: * Adding new values to the variable * Replacing existing values * Deleting values from the variable * Resetting all values When updating variable values, you need to specify: * The variable identifier (ID or name) * The values to add/replace/remove * The operation to perform (ADD, REPLACE, REMOVE, RESET) Behaviour based on operation type: * ADD - Adds values to the variable if this is a list type variable, else same as replace. * REPLACE - Replaces all values of a given set of constraints with the current set of values. * REMOVE - Removes any values which match the set of conditions of the variables if this is a list type variable, else clears value. * RESET - Removes all constraints for the given variable, scope is ignored + * @param identifier Unique ID or name of the variable + * @param putVariableValuesRequest + */ + putVariableValues(identifier: string, putVariableValuesRequest: PutVariableValuesRequest, _options?: Configuration): Promise; + /** + * Search variables Version: 26.4.0.cl or later Allows searching for variables in ThoughtSpot. Requires ADMINISTRATION role. The CAN_MANAGE_VARIABLES permission allows you to manage Formula Variables in the current organization scope. The API endpoint supports searching variables by: * Variable identifier (ID or name) * Variable type * Name pattern (case-insensitive, supports % for wildcard) The search results can be formatted in three ways: * METADATA - Returns only variable metadata (default) * METADATA_AND_VALUES - Returns variable metadata and values The values can be filtered by scope: * org_identifier * principal_identifier * model_identifier + * @param searchVariablesRequest + */ + searchVariables(searchVariablesRequest: SearchVariablesRequest, _options?: Configuration): Promise>; + /** + * Update a variable\'s name Version: 26.4.0.cl or later Allows updating a variable\'s name in ThoughtSpot. Requires ADMINISTRATION role and TENANT scope. The CAN_MANAGE_VARIABLES permission allows you to manage Formula Variables in the current organization scope. The API endpoint allows updating: * The variable name + * @param identifier Unique id or name of the variable to update. + * @param updateVariableRequest + */ + updateVariable(identifier: string, updateVariableRequest: UpdateVariableRequest, _options?: Configuration): Promise; + /** + * Update values for multiple variables Version: 10.14.0.cl or later **Note:** This API endpoint is deprecated and will be removed from ThoughtSpot in a future release. Use [POST /api/rest/2.0/template/variables/{identifier}/update-values](/api/rest/2.0/template/variables/%7Bidentifier%7D/update-values) instead. Allows updating values for multiple variables in ThoughtSpot. Requires ADMINISTRATION role. The CAN_MANAGE_VARIABLES permission allows you to manage Formula Variables in the current organization scope. The API endpoint allows: * Adding new values to variables * Replacing existing values * Deleting values from variables When updating variable values, you need to specify: * The variable identifiers * The values to add/replace/remove for each variable * The operation to perform (ADD, REPLACE, REMOVE, RESET) Behaviour based on operation type: * ADD - Adds values to the variable if this is a list type variable, else same as replace. * REPLACE - Replaces all values of a given set of constraints with the current set of values. * REMOVE - Removes any values which match the set of conditions of the variables if this is a list type variable, else clears value. * RESET - Removes all constrains for a given variable, scope is ignored + * @param updateVariableValuesRequest + */ + updateVariableValues(updateVariableValuesRequest: UpdateVariableValuesRequest, _options?: Configuration): Promise; +} + +declare class PromiseVersionControlApi { + private api; + constructor(configuration: Configuration, requestFactory?: VersionControlApiRequestFactory, responseProcessor?: VersionControlApiResponseProcessor); + /** + * Version: 9.2.0.cl or later Commits TML files of metadata objects to the Git branch configured on your instance. Requires at least edit access to objects used in the commit operation. Before using this endpoint to push your commits: * Enable Git integration on your instance. * Make sure the Git repository and branch details are configured on your instance. For more information, see [Git integration documentation](https://developers.thoughtspot.com/docs/git-integration). + * @param commitBranchRequest + */ + commitBranch(commitBranchRequest: CommitBranchRequest, _options?: Configuration): Promise; + /** + * Version: 9.2.0.cl or later Allows you to connect a ThoughtSpot instance to a Git repository. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance on your instance, the `CAN_SETUP_VERSION_CONTROL` (**Can set up version control**) privilege. You can use this API endpoint to connect your ThoughtSpot development and production environments to the development and production branches of a Git repository. Before using this endpoint to connect your ThoughtSpot instance to a Git repository, check the following prerequisites: * You have a Git repository. If you are using GitHub, make sure you have a valid account and an access token to connect ThoughtSpot to GitHub. For information about generating a token, see [GitHub Documentation](https://docs.github.com/en/authentication/keeping-your-account-and-data-secure/managing-your-personal-access-tokens). * Your access token has `repo` scope that grants full access to public and private repositories. * Your Git repository has a branch that can be configured as a default branch in ThoughtSpot. For more information, see [Git integration documentation](https://developers.thoughtspot.com/docs/?pageid=git-integration). **Note**: ThoughtSpot supports only GitHub / itHub Enterprise for CI/CD. + * @param createConfigRequest + */ + createConfig(createConfigRequest: CreateConfigRequest, _options?: Configuration): Promise; + /** + * Version: 9.2.0.cl or later Deletes Git repository configuration from your ThoughtSpot instance. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance on your instance, the `CAN_SETUP_VERSION_CONTROL` (**Can set up version control**) privilege. + * @param deleteConfigRequest + */ + deleteConfig(deleteConfigRequest: DeleteConfigRequest, _options?: Configuration): Promise; + /** + * Version: 9.2.0.cl or later Allows you to deploy a commit and publish TML content to your ThoughtSpot instance. Requires at least edit access to the objects used in the deploy operation. The API deploys the head of the branch unless a `commit_id` is specified in the API request. If the branch name is not defined in the request, the default branch is considered for deploying commits. For more information, see [Git integration documentation](https://developers.thoughtspot.com/docs/git-integration). + * @param deployCommitRequest + */ + deployCommit(deployCommitRequest: DeployCommitRequest, _options?: Configuration): Promise>; + /** + * Version: 9.2.0.cl or later Reverts TML objects to a previous commit specified in the API request. Requires at least edit access to objects. In the API request, specify the `commit_id`. If the branch name is not specified in the request, the API will consider the default branch configured on your instance. By default, the API reverts all objects. If the revert operation fails for one of the objects provided in the commit, the API returns an error and does not revert any object. For more information, see [Git integration documentation](https://developers.thoughtspot.com/docs/git-integration). + * @param commitId Commit id to which the object should be reverted + * @param revertCommitRequest + */ + revertCommit(commitId: string, revertCommitRequest: RevertCommitRequest, _options?: Configuration): Promise; + /** + * Version: 9.2.0.cl or later Gets a list of commits for a given metadata object. Requires `DATAMANAGEMENT` (**Can manage data**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance on your instance, the `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` (**Can manage data models**) privilege and edit access to the metadata objects. + * @param searchCommitsRequest + */ + searchCommits(searchCommitsRequest: SearchCommitsRequest, _options?: Configuration): Promise>; + /** + * Version: 9.2.0.cl or later Gets Git repository connections configured on the ThoughtSpot instance. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance on your instance, the `CAN_SETUP_VERSION_CONTROL` (**Can set up version control**) privilege. + * @param searchConfigRequest + */ + searchConfig(searchConfigRequest: SearchConfigRequest, _options?: Configuration): Promise>; + /** + * Version: 9.2.0.cl or later Updates Git repository configuration settings. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance on your instance, the `CAN_SETUP_VERSION_CONTROL` (**Can set up version control**) privilege. + * @param updateConfigRequest + */ + updateConfig(updateConfigRequest: UpdateConfigRequest, _options?: Configuration): Promise; + /** + * Version: 9.2.0.cl or later Validates the content of your source branch against the objects in your destination environment. Before merging content from your source branch to the destination branch, run this API operation from your destination environment and ensure that the changes from the source branch function in the destination environment. Requires `DATAMANAGEMENT` (**Can manage data**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance on your instance, the `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` (**Can manage data models**) privilege and edit access to the metadata objects. + * @param validateMergeRequest + */ + validateMerge(validateMergeRequest: ValidateMergeRequest, _options?: Configuration): Promise>; +} + +declare class PromiseWebhooksApi { + private api; + constructor(configuration: Configuration, requestFactory?: WebhooksApiRequestFactory, responseProcessor?: WebhooksApiResponseProcessor); + /** + * Version: 10.14.0.cl or later Creates a new webhook configuration to receive notifications for specified events. The webhook will be triggered when the configured events occur in the system. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) or `DEVELOPER` (**Has developer privilege**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, users with `CAN_MANAGE_WEBHOOKS` (**Can manage webhooks**) privilege are also authorized to perform this action. + * @param createWebhookConfigurationRequest + */ + createWebhookConfiguration(createWebhookConfigurationRequest: CreateWebhookConfigurationRequest, _options?: Configuration): Promise; + /** + * Version: 10.14.0.cl or later Deletes one or more webhook configurations by their unique id or name. Returns status of each deletion operation, including successfully deleted webhooks and any failures with error details. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) or `DEVELOPER` (**Has developer privilege**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, users with `CAN_MANAGE_WEBHOOKS` (**Can manage webhooks**) privilege are also authorized to perform this action. + * @param deleteWebhookConfigurationsRequest + */ + deleteWebhookConfigurations(deleteWebhookConfigurationsRequest: DeleteWebhookConfigurationsRequest, _options?: Configuration): Promise; + /** + * Version: 10.14.0.cl or later Searches for webhook configurations based on various criteria such as Org, webhook identifier, event type, with support for pagination and sorting. Returns matching webhook configurations with their complete details. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) or `DEVELOPER` (**Has developer privilege**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, users with `CAN_MANAGE_WEBHOOKS` (**Can manage webhooks**) privilege are also authorized to perform this action. + * @param searchWebhookConfigurationsRequest + */ + searchWebhookConfigurations(searchWebhookConfigurationsRequest: SearchWebhookConfigurationsRequest, _options?: Configuration): Promise; + /** + * Version: 10.14.0.cl or later Updates an existing webhook configuration by its unique id or name. Only the provided fields will be updated. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) or `DEVELOPER` (**Has developer privilege**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, users with `CAN_MANAGE_WEBHOOKS` (**Can manage webhooks**) privilege are also authorized to perform this action. + * @param webhookIdentifier Unique ID or name of the webhook configuration. + * @param updateWebhookConfigurationRequest + */ + updateWebhookConfiguration(webhookIdentifier: string, updateWebhookConfigurationRequest: UpdateWebhookConfigurationRequest, _options?: Configuration): Promise; +} + +/** + * Options for additional configuration settings + */ +interface ConfigurationOptions { + /** + * Additional headers to be included in every request + * @example + * ```typescript + * { + * additionalHeaders: { + * "Accept-Language": "en-US", + * } + * } + * ``` + */ + additionalHeaders?: Record; +} +/** + * creates a bearer authentication configuration using params or a token provider + * @param thoughtSpotHost thoughtSpotHost URL + * @param paramOrTokenProvider either a GetFullAccessTokenRequest or a TokenProvider , + * Pass a GetFullAccessTokenRequest which contains the object body required to get a full access token , or + * function which returns a promise of a string which is the full access token + * @param options - Optional configuration for custom headers and other settings + * @returns Configuration object ready for authenticated API calls + * @example + * ```typescript + * const configWithTokenProvider = createBearerAuthenticationConfig( + * "CLUSTER_SERVER_URL", + * YOUR_TOKEN_PROVIDER, + * { + * additionalHeaders: { + * "Accept-Language": "en-US", + * } + * } + * ); + */ +declare const createBearerAuthenticationConfig: (thoughtSpotHost: string, paramOrTokenProvider: GetFullAccessTokenRequest | (() => Promise), options?: ConfigurationOptions) => Configuration; +/** + * creates a basic configuration using params which does not require authentication + * @param thoughtSpotHost : the base url of the server + * @param options - Optional configuration for additional headers and other settings + * @returns Basic client configuration for unauthenticated API calls + */ +declare const createBasicConfig: (thoughtSpotHost: string, options?: ConfigurationOptions) => Configuration; + +export { PromiseAIApi as AIApi, AIContext, APIKey, APIKeyInput, AccessToken, ActionConfig, ActionConfigInput, ActionConfigInputCreate, ActionConfigInputCreatePositionEnum, ActionConfigInputPositionEnum, ActionDetails, ActionDetailsInput, ActionDetailsInputCreate, ActivateUserRequest, AgentConversation, AnswerContent, AnswerDataResponse, AnswerPngOptionsInput, ApiException, ApiKeyConfiguration, AssignChangeAuthorRequest, AssignTagRequest, AssociateMetadataInput, AssociateMetadataInputCreate, AssociateMetadataInputCreateTypeEnum, AssociateMetadataInputTypeEnum, AuthClusterPreferences, AuthClusterPreferencesAuthStatusEnum, AuthClusterPreferencesInput, AuthClusterPreferencesInputAuthStatusEnum, AuthMethods, AuthMethodsConfiguration, AuthOrgInfo, AuthOrgPreference, AuthOrgPreferenceAuthStatusEnum, AuthOrgPreferenceInput, AuthOrgPreferenceInputAuthStatusEnum, AuthSettingsAccessToken, Authentication, PromiseAuthenticationApi as AuthenticationApi, AuthenticationInput, Author, AuthorMetadataTypeInput, AuthorMetadataTypeInputTypeEnum, AuthorType, AwsS3Config, AwsS3ConfigInput, BaseServerConfiguration, BasicAuth, BasicAuthInput, BearerAuthAuthentication, CALLBACK, CALLBACKInput, CALLBACKInputMandatory, CalendarResponse, ChangeUserPasswordRequest, ChannelHistoryEventInfo, ChannelHistoryEventInfoTypeEnum, ChannelHistoryEventInput, ChannelHistoryEventInputTypeEnum, ChannelHistoryJob, ChannelHistoryJobStatusEnum, ChannelValidationAwsS3Info, ChannelValidationDetail, ChannelValidationDetailStatusEnum, ChannelValidationDetailValidationStepEnum, ClusterNonEmbedAccess, ClusterNonEmbedAccessInput, Collection, CollectionDeleteResponse, CollectionDeleteTypeIdentifiers, CollectionEntityIdentifier, CollectionMetadataInput, CollectionMetadataInputTypeEnum, CollectionMetadataItem, CollectionSearchResponse, PromiseCollectionsApi as CollectionsApi, Column, ColumnSecurityRule, ColumnSecurityRuleColumn, ColumnSecurityRuleGroup, ColumnSecurityRuleGroupOperation, ColumnSecurityRuleGroupOperationOperationEnum, ColumnSecurityRuleResponse, ColumnSecurityRuleSourceTable, ColumnSecurityRuleTableInput, ColumnSecurityRuleUpdate, CommitBranchRequest, CommitFileType, CommitHistoryResponse, CommitResponse, CommiterType, CommunicationChannelPreferencesResponse, CommunicationChannelValidateResponse, CommunicationChannelValidateResponseChannelTypeEnum, CommunicationChannelValidateResponseEventTypeEnum, CommunicationChannelValidateResponseResultCodeEnum, Configuration, ConfigureAuthSettingsRequest, ConfigureAuthSettingsRequestAuthTypeEnum, ConfigureAuthSettingsRequestClusterPreferences, ConfigureAuthSettingsRequestClusterPreferencesAuthStatusEnum, ConfigureCommunicationChannelPreferencesRequest, ConfigureSecuritySettingsRequest, ConfigureSecuritySettingsRequestClusterPreferences, ConnectionConfigurationResponse, ConnectionConfigurationResponseDataWarehouseTypeEnum, ConnectionConfigurationResponsePolicyProcessesEnum, ConnectionConfigurationResponsePolicyTypeEnum, ConnectionConfigurationSearchRequest, ConnectionConfigurationSearchRequestPolicyTypeEnum, PromiseConnectionConfigurationsApi as ConnectionConfigurationsApi, ConnectionInput, PromiseConnectionsApi as ConnectionsApi, ContextPayloadV2Input, ContextPayloadV2InputTypeEnum, Conversation, ConversationSettingsInput, ConvertWorksheetToModelRequest, CopyObjectRequest, CopyObjectRequestTypeEnum, CreateAgentConversationRequest, CreateAgentConversationRequestConversationSettings, CreateAgentConversationRequestMetadataContext, CreateAgentConversationRequestMetadataContextTypeEnum, CreateCalendarRequest, CreateCalendarRequestCalendarTypeEnum, CreateCalendarRequestCreationMethodEnum, CreateCalendarRequestMonthOffsetEnum, CreateCalendarRequestStartDayOfWeekEnum, CreateCalendarRequestTableReference, CreateCollectionRequest, CreateConfigRequest, CreateConnectionConfigurationRequest, CreateConnectionConfigurationRequestAuthenticationTypeEnum, CreateConnectionConfigurationRequestPolicyProcessOptions, CreateConnectionConfigurationRequestPolicyProcessesEnum, CreateConnectionConfigurationRequestPolicyTypeEnum, CreateConnectionRequest, CreateConnectionRequestDataWarehouseTypeEnum, CreateConnectionResponse, CreateConnectionResponseDataWarehouseTypeEnum, CreateConversationRequest, CreateCustomActionRequest, CreateCustomActionRequestActionDetails, CreateCustomActionRequestDefaultActionConfig, CreateEmailCustomizationRequest, CreateEmailCustomizationRequestTemplateProperties, CreateEmailCustomizationResponse, CreateOrgRequest, CreateRoleRequest, CreateRoleRequestPrivilegesEnum, CreateScheduleRequest, CreateScheduleRequestFileFormatEnum, CreateScheduleRequestFrequency, CreateScheduleRequestLiveboardOptions, CreateScheduleRequestMetadataTypeEnum, CreateScheduleRequestPdfOptions, CreateScheduleRequestPdfOptionsPageSizeEnum, CreateScheduleRequestRecipientDetails, CreateScheduleRequestTimeZoneEnum, CreateTagRequest, CreateUserGroupRequest, CreateUserGroupRequestPrivilegesEnum, CreateUserGroupRequestTypeEnum, CreateUserGroupRequestVisibilityEnum, CreateUserRequest, CreateUserRequestAccountStatusEnum, CreateUserRequestAccountTypeEnum, CreateUserRequestPreferredLocaleEnum, CreateUserRequestVisibilityEnum, CreateVariableRequest, CreateVariableRequestDataTypeEnum, CreateVariableRequestTypeEnum, CreateWebhookConfigurationRequest, CreateWebhookConfigurationRequestAuthentication, CreateWebhookConfigurationRequestEventsEnum, CreateWebhookConfigurationRequestSignatureVerification, CreateWebhookConfigurationRequestSignatureVerificationAlgorithmEnum, CreateWebhookConfigurationRequestSignatureVerificationTypeEnum, CreateWebhookConfigurationRequestStorageDestination, CreateWebhookConfigurationRequestStorageDestinationStorageTypeEnum, CronExpression, CronExpressionInput, CspSettings, CspSettingsInput, PromiseCustomActionApi as CustomActionApi, CustomActionMetadataTypeInput, CustomActionMetadataTypeInputTypeEnum, PromiseCustomCalendarsApi as CustomCalendarsApi, PromiseDBTApi as DBTApi, PromiseDataApi as DataApi, DataSource, DataSourceContextInput, DataWarehouseObjectInput, DataWarehouseObjects, Database, DbtSearchResponse, DeactivateUserRequest, DefaultActionConfig, DefaultActionConfigInput, DefaultActionConfigInputCreate, DefaultActionConfigSearchInput, DeleteCollectionRequest, DeleteConfigRequest, DeleteConnectionConfigurationRequest, DeleteConnectionRequest, DeleteMetadataRequest, DeleteMetadataTypeInput, DeleteMetadataTypeInputTypeEnum, DeleteOrgEmailCustomizationRequest, DeleteVariablesRequest, DeleteWebhookConfigurationsRequest, DeployCommitRequest, DeployCommitRequestDeployPolicyEnum, DeployCommitRequestDeployTypeEnum, DeployResponse, PromiseEmailCustomizationApi as EmailCustomizationApi, EntityHeader, ErrorResponse, EurekaDataSourceSuggestionResponse, EurekaDecomposeQueryResponse, EurekaGetNLInstructionsResponse, EurekaGetRelevantQuestionsResponse, EurekaLLMDecomposeQueryResponse, EurekaLLMSuggestedQuery, EurekaRelevantQuestion, EurekaSetNLInstructionsResponse, EventChannelConfig, EventChannelConfigChannelsEnum, EventChannelConfigEventTypeEnum, EventChannelConfigInput, EventChannelConfigInputChannelsEnum, EventChannelConfigInputEventTypeEnum, ExcludeMetadataListItemInput, ExcludeMetadataListItemInputTypeEnum, ExportAnswerReportRequest, ExportAnswerReportRequestFileFormatEnum, ExportAnswerReportRequestPngOptions, ExportAnswerReportRequestRegionalSettings, ExportAnswerReportRequestRegionalSettingsCurrencyFormatEnum, ExportAnswerReportRequestRegionalSettingsDateFormatLocaleEnum, ExportAnswerReportRequestRegionalSettingsNumberFormatLocaleEnum, ExportAnswerReportRequestRegionalSettingsUserLocaleEnum, ExportAnswerReportRequestTypeEnum, ExportLiveboardReportRequest, ExportLiveboardReportRequestFileFormatEnum, ExportLiveboardReportRequestPdfOptions, ExportLiveboardReportRequestPdfOptionsPageOrientationEnum, ExportLiveboardReportRequestPdfOptionsPageSizeEnum, ExportLiveboardReportRequestPngOptions, ExportMetadataTMLBatchedRequest, ExportMetadataTMLBatchedRequestEdocFormatEnum, ExportMetadataTMLBatchedRequestMetadataTypeEnum, ExportMetadataTMLRequest, ExportMetadataTMLRequestEdocFormatEnum, ExportMetadataTMLRequestExportOptions, ExportMetadataTMLRequestExportSchemaVersionEnum, ExportMetadataTypeInput, ExportMetadataTypeInputTypeEnum, ExportOptions, ExternalTableInput, FavoriteMetadataInput, FavoriteMetadataInputTypeEnum, FavoriteMetadataItem, FavoriteMetadataItemTypeEnum, FavoriteObjectOptionsInput, FetchAnswerDataRequest, FetchAnswerDataRequestDataFormatEnum, FetchAnswerSqlQueryRequest, FetchAsyncImportTaskStatusRequest, FetchAsyncImportTaskStatusRequestTaskStatusEnum, FetchColumnSecurityRulesRequest, FetchConnectionDiffStatusResponse, FetchLiveboardDataRequest, FetchLiveboardDataRequestDataFormatEnum, FetchLiveboardSqlQueryRequest, FetchLogsRequest, FetchLogsRequestLogTypeEnum, FetchObjectPrivilegesRequest, FetchPermissionsOfPrincipalsRequest, FetchPermissionsOfPrincipalsRequestDefaultMetadataTypeEnum, FetchPermissionsOnMetadataRequest, FilterRules, FilterRulesOperatorEnum, ForceLogoutUsersRequest, Frequency, FrequencyInput, GenerateCSVRequest, GenerateCSVRequestCalendarTypeEnum, GenerateCSVRequestMonthOffsetEnum, GenerateCSVRequestStartDayOfWeekEnum, GenericInfo, GetAsyncImportStatusResponse, GetCustomAccessTokenRequest, GetCustomAccessTokenRequestPersistOptionEnum, GetDataSourceSuggestionsRequest, GetFullAccessTokenRequest, GetFullAccessTokenRequestUserParameters, GetNLInstructionsRequest, GetObjectAccessTokenRequest, GetRelevantQuestionsRequest, GetRelevantQuestionsRequestAiContext, GetRelevantQuestionsRequestMetadataContext, GetTokenResponse, GroupInfo, GroupObject, PromiseGroupsApi as GroupsApi, GroupsImportListInput, GroupsImportListInputPrivilegesEnum, GroupsImportListInputTypeEnum, GroupsImportListInputVisibilityEnum, HeaderAttributeInput, HeaderUpdateInput, HeaderUpdateInputTypeEnum, HttpBasicConfiguration, HttpBearerConfiguration, HttpException, HttpFile, HttpLibrary, HttpMethod, ImportEPackAsyncTaskStatus, ImportEPackAsyncTaskStatusImportPolicyEnum, ImportEPackAsyncTaskStatusTaskStatusEnum, ImportMetadataTMLAsyncRequest, ImportMetadataTMLAsyncRequestImportPolicyEnum, ImportMetadataTMLRequest, ImportMetadataTMLRequestImportPolicyEnum, ImportUser, ImportUserAccountStatusEnum, ImportUserAccountTypeEnum, ImportUserGroupsRequest, ImportUserGroupsResponse, ImportUserPreferredLocaleEnum, ImportUserType, ImportUserVisibilityEnum, ImportUsersRequest, ImportUsersResponse, InputEurekaNLSRequest, IsomorphicFetchHttpLibrary, JWTMetadataObject, JWTMetadataObjectTypeEnum, JWTParameter, JWTUserOptions, JWTUserOptionsFull, JobRecipient, JobRecipientTypeEnum, PromiseJobsApi as JobsApi, LiveboardContent, LiveboardDataResponse, LiveboardOptions, LiveboardOptionsInput, PromiseLogApi as LogApi, LogResponse, LoginRequest, ManageObjectPrivilegeRequest, ManageObjectPrivilegeRequestMetadataTypeEnum, ManageObjectPrivilegeRequestObjectPrivilegeTypesEnum, ManageObjectPrivilegeRequestOperationEnum, PromiseMetadataApi as MetadataApi, MetadataAssociationItem, MetadataContext, MetadataInput, MetadataInputTypeEnum, MetadataListItemInput, MetadataListItemInputSubtypesEnum, MetadataListItemInputTypeEnum, MetadataObject, MetadataObjectTypeEnum, MetadataResponse, MetadataResponseTypeEnum, MetadataSearchResponse, MetadataSearchResponseMetadataTypeEnum, MetadataSearchSortOptions, MetadataSearchSortOptionsFieldNameEnum, MetadataSearchSortOptionsOrderEnum, PromiseMiddleware as Middleware, ModelTableList, NLInstructionsInfo, NLInstructionsInfoInput, NLInstructionsInfoInputScopeEnum, NLInstructionsInfoScopeEnum, OAuth2Configuration, ObjectIDAndName, ObjectPrivilegesMetadataInput, ObjectPrivilegesMetadataInputTypeEnum, ObjectPrivilegesOfMetadataResponse, Org, OrgChannelConfigInput, OrgChannelConfigInputOperationEnum, OrgChannelConfigInputResetEventsEnum, OrgChannelConfigResponse, OrgDetails, OrgInfo, OrgNonEmbedAccess, OrgNonEmbedAccessInput, OrgPreferenceSearchCriteriaInput, OrgPreferenceSearchCriteriaInputEventTypesEnum, OrgResponse, OrgResponseStatusEnum, OrgResponseVisibilityEnum, OrgType, PromiseOrgsApi as OrgsApi, ParameterValues, ParameterizeMetadataFieldsRequest, ParameterizeMetadataFieldsRequestFieldTypeEnum, ParameterizeMetadataFieldsRequestMetadataTypeEnum, ParameterizeMetadataRequest, ParameterizeMetadataRequestFieldTypeEnum, ParameterizeMetadataRequestMetadataTypeEnum, ParametersListItem, ParametersListItemInput, PdfOptions, PdfOptionsInput, PdfOptionsInputPageOrientationEnum, PdfOptionsInputPageSizeEnum, PdfOptionsPageSizeEnum, PermissionInput, PermissionInputShareModeEnum, PermissionOfMetadataResponse, PermissionOfPrincipalsResponse, PermissionsMetadataTypeInput, PermissionsMetadataTypeInputTypeEnum, PngOptionsInput, PolicyProcessOptions, PolicyProcessOptionsInput, PrincipalsInput, PrincipalsInputTypeEnum, PrincipalsListItem, PrincipalsListItemInput, PromiseHttpLibrary, PublishMetadataListItem, PublishMetadataListItemTypeEnum, PublishMetadataRequest, PutVariableValuesRequest, PutVariableValuesRequestOperationEnum, QueryGetDecomposedQueryRequest, QueryGetDecomposedQueryRequestNlsRequest, RecipientDetails, RecipientDetailsInput, RegionalSettingsInput, RegionalSettingsInputCurrencyFormatEnum, RegionalSettingsInputDateFormatLocaleEnum, RegionalSettingsInputNumberFormatLocaleEnum, RegionalSettingsInputUserLocaleEnum, RepoConfigObject, PromiseReportsApi as ReportsApi, RequestBody, RequestContext, RequiredError, ResetUserPasswordRequest, ResponseActivationURL, ResponseBody, ResponseContext, ResponseCopyObject, ResponseCustomAction, ResponseFailedEntities, ResponseFailedEntity, ResponseIncompleteEntities, ResponseIncompleteEntity, ResponseMessage, ResponseMessageMessageTypeEnum, ResponseMessageVisualizationTypeEnum, ResponsePostUpgradeFailedEntities, ResponsePostUpgradeFailedEntity, ResponseSchedule, ResponseScheduleRun, ResponseSuccessfulEntities, ResponseSuccessfulEntity, ResponseWorksheetToModelConversion, RevertCommitRequest, RevertCommitRequestRevertPolicyEnum, RevertResponse, RevertedMetadata, RevokeRefreshTokensRequest, RevokeRefreshTokensResponse, RevokeTokenRequest, RiseGQLArgWrapper, RiseSetter, Role, RoleResponse, RoleResponsePermissionEnum, RoleResponsePrivilegesEnum, PromiseRolesApi as RolesApi, RuntimeFilter, RuntimeFilters, RuntimeFiltersOperatorEnum, RuntimeParamOverride, RuntimeParameters, RuntimeSort, RuntimeSorts, RuntimeSortsOrderEnum, ScheduleHistoryRunsOptionsInput, PromiseSchedulesApi as SchedulesApi, SchedulesPdfOptionsInput, SchedulesPdfOptionsInputPageSizeEnum, SchemaObject, Scope, ScriptSrcUrls, ScriptSrcUrlsInput, SearchAuthSettingsRequest, SearchAuthSettingsRequestAuthTypeEnum, SearchAuthSettingsRequestScopeEnum, SearchAuthSettingsResponse, SearchAuthSettingsResponseAuthTypeEnum, SearchCalendarsRequest, SearchCalendarsRequestSortOptions, SearchCalendarsRequestSortOptionsFieldNameEnum, SearchCalendarsRequestSortOptionsOrderEnum, SearchChannelHistoryRequest, SearchChannelHistoryRequestChannelStatusEnum, SearchChannelHistoryRequestChannelTypeEnum, SearchChannelHistoryResponse, SearchCollectionsRequest, SearchCollectionsRequestSortOptions, SearchCollectionsRequestSortOptionsFieldNameEnum, SearchCollectionsRequestSortOptionsOrderEnum, SearchCommitsRequest, SearchCommitsRequestMetadataTypeEnum, SearchCommunicationChannelPreferencesRequest, SearchCommunicationChannelPreferencesRequestClusterPreferencesEnum, SearchConfigRequest, SearchConnectionRequest, SearchConnectionRequestAuthenticationTypeEnum, SearchConnectionRequestDataWarehouseObjectTypeEnum, SearchConnectionRequestDataWarehouseTypesEnum, SearchConnectionRequestSortOptions, SearchConnectionRequestSortOptionsFieldNameEnum, SearchConnectionRequestSortOptionsOrderEnum, SearchConnectionResponse, SearchConnectionResponseDataWarehouseTypeEnum, SearchCustomActionsRequest, SearchCustomActionsRequestDefaultActionConfig, SearchCustomActionsRequestTypeEnum, SearchDataRequest, SearchDataRequestDataFormatEnum, SearchDataResponse, SearchEmailCustomizationRequest, SearchMetadataRequest, SearchMetadataRequestDependentObjectVersionEnum, SearchMetadataRequestFavoriteObjectOptions, SearchMetadataRequestLiveboardResponseVersionEnum, SearchMetadataRequestSortOptions, SearchMetadataRequestSortOptionsFieldNameEnum, SearchMetadataRequestSortOptionsOrderEnum, SearchOrgsRequest, SearchOrgsRequestStatusEnum, SearchOrgsRequestVisibilityEnum, SearchRoleResponse, SearchRoleResponsePermissionEnum, SearchRoleResponsePrivilegesEnum, SearchRolesRequest, SearchRolesRequestPermissionsEnum, SearchRolesRequestPrivilegesEnum, SearchSchedulesRequest, SearchSchedulesRequestHistoryRunsOptions, SearchSchedulesRequestSortOptions, SearchSecuritySettingsRequest, SearchSecuritySettingsRequestScopeEnum, SearchTagsRequest, SearchUserGroupsRequest, SearchUserGroupsRequestPrivilegesEnum, SearchUserGroupsRequestSortOptions, SearchUserGroupsRequestSortOptionsFieldNameEnum, SearchUserGroupsRequestSortOptionsOrderEnum, SearchUserGroupsRequestTypeEnum, SearchUserGroupsRequestVisibilityEnum, SearchUsersRequest, SearchUsersRequestAccountStatusEnum, SearchUsersRequestAccountTypeEnum, SearchUsersRequestPrivilegesEnum, SearchUsersRequestVisibilityEnum, SearchVariablesRequest, SearchVariablesRequestResponseContentEnum, SearchWebhookConfigurationsRequest, SearchWebhookConfigurationsRequestEventTypeEnum, SearchWebhookConfigurationsRequestSortOptions, SearchWebhookConfigurationsRequestSortOptionsFieldNameEnum, SearchWebhookConfigurationsRequestSortOptionsOrderEnum, PromiseSecurityApi as SecurityApi, SecurityAuthentication, SecuritySettingsClusterPreferences, SecuritySettingsClusterPreferencesInput, SecuritySettingsClusterPreferencesTrustedAuthStatusEnum, SecuritySettingsOrgDetails, SecuritySettingsOrgPreferences, SecuritySettingsOrgPreferencesInput, SecuritySettingsOrgPreferencesTrustedAuthStatusEnum, SecuritySettingsResponse, SelfDecodingBody, SendAgentConversationMessageRequest, SendAgentConversationMessageStreamingRequest, SendAgentMessageRequest, SendAgentMessageResponse, SendAgentMessageStreamingRequest, SendMessageRequest, ServerConfiguration, SetNLInstructionsRequest, ShareMetadataRequest, ShareMetadataRequestMetadataTypeEnum, ShareMetadataTypeInput, ShareMetadataTypeInputTypeEnum, SharePermissionsInput, SharePermissionsInputContentShareModeEnum, SharePermissionsInputShareModeEnum, SingleAnswerRequest, SortOption, SortOptionFieldNameEnum, SortOptionInput, SortOptionInputFieldNameEnum, SortOptionInputOrderEnum, SortOptionOrderEnum, SortOptions, SortOptionsFieldNameEnum, SortOptionsOrderEnum, SortingOptions, SqlQuery, SqlQueryResponse, SqlQueryResponseMetadataTypeEnum, StorageConfig, StorageConfigInput, StorageDestination, StorageDestinationInput, StorageDestinationInputStorageTypeEnum, StorageDestinationStorageTypeEnum, SyncMetadataRequest, SyncMetadataRequestSyncAttributesEnum, SyncMetadataResponse, SyncMetadataResponseStatusEnum, PromiseSystemApi as SystemApi, SystemConfig, SystemInfo, SystemOverrideInfo, Table, Tag, TagMetadataTypeInput, TagMetadataTypeInputTypeEnum, PromiseTagsApi as TagsApi, TemplatePropertiesInputCreate, PromiseThoughtSpotRestApi as ThoughtSpotRestApi, Token, TokenAccessScopeObject, TokenAccessScopeObjectTypeEnum, TokenProvider, TokenValidationResponse, URL, URLInput, URLInputMandatory, UnassignTagRequest, UnparameterizeMetadataRequest, UnparameterizeMetadataRequestFieldTypeEnum, UnparameterizeMetadataRequestMetadataTypeEnum, UnpublishMetadataRequest, UpdateCalendarRequest, UpdateCalendarRequestCalendarTypeEnum, UpdateCalendarRequestMonthOffsetEnum, UpdateCalendarRequestStartDayOfWeekEnum, UpdateCalendarRequestTableReference, UpdateCalendarRequestUpdateMethodEnum, UpdateCollectionRequest, UpdateCollectionRequestOperationEnum, UpdateColumnSecurityRulesRequest, UpdateConfigRequest, UpdateConnectionConfigurationRequest, UpdateConnectionConfigurationRequestAuthenticationTypeEnum, UpdateConnectionConfigurationRequestPolicyProcessesEnum, UpdateConnectionConfigurationRequestPolicyTypeEnum, UpdateConnectionRequest, UpdateConnectionStatusRequest, UpdateConnectionStatusRequestStatusEnum, UpdateConnectionV2Request, UpdateCustomActionRequest, UpdateCustomActionRequestActionDetails, UpdateCustomActionRequestDefaultActionConfig, UpdateCustomActionRequestOperationEnum, UpdateEmailCustomizationRequest, UpdateMetadataHeaderRequest, UpdateMetadataObjIdRequest, UpdateObjIdInput, UpdateObjIdInputTypeEnum, UpdateOrgRequest, UpdateOrgRequestOperationEnum, UpdateRoleRequest, UpdateRoleRequestPrivilegesEnum, UpdateScheduleRequest, UpdateScheduleRequestFileFormatEnum, UpdateScheduleRequestFrequency, UpdateScheduleRequestLiveboardOptions, UpdateScheduleRequestMetadataTypeEnum, UpdateScheduleRequestPdfOptions, UpdateScheduleRequestPdfOptionsPageSizeEnum, UpdateScheduleRequestRecipientDetails, UpdateScheduleRequestStatusEnum, UpdateScheduleRequestTimeZoneEnum, UpdateSystemConfigRequest, UpdateTagRequest, UpdateUserGroupRequest, UpdateUserGroupRequestOperationEnum, UpdateUserGroupRequestPrivilegesEnum, UpdateUserGroupRequestTypeEnum, UpdateUserGroupRequestVisibilityEnum, UpdateUserRequest, UpdateUserRequestAccountStatusEnum, UpdateUserRequestAccountTypeEnum, UpdateUserRequestOperationEnum, UpdateUserRequestPreferredLocaleEnum, UpdateUserRequestVisibilityEnum, UpdateVariableRequest, UpdateVariableValuesRequest, UpdateWebhookConfigurationRequest, UpdateWebhookConfigurationRequestEventsEnum, User, UserAccountStatusEnum, UserAccountTypeEnum, UserGroup, UserGroupResponse, UserGroupResponseParentTypeEnum, UserGroupResponseTypeEnum, UserGroupResponseVisibilityEnum, UserInfo, UserObject, UserObjectTypeEnum, UserParameterOptions, UserParentTypeEnum, UserPrincipal, UserVisibilityEnum, PromiseUsersApi as UsersApi, ValidateCommunicationChannelRequest, ValidateCommunicationChannelRequestChannelTypeEnum, ValidateCommunicationChannelRequestEventTypeEnum, ValidateMergeRequest, ValidateTokenRequest, ValueScopeInput, ValueScopeInputPrincipalTypeEnum, Variable, PromiseVariableApi as VariableApi, VariableDetailInput, VariableDetailInputTypeEnum, VariableOrgInfo, VariablePutAssignmentInput, VariablePutAssignmentInputPrincipalTypeEnum, VariableUpdateAssignmentInput, VariableUpdateAssignmentInputOperationEnum, VariableUpdateScopeInput, VariableUpdateScopeInputPrincipalTypeEnum, VariableValue, VariableValuePrincipalTypeEnum, VariableValues, VariableVariableTypeEnum, PromiseVersionControlApi as VersionControlApi, WebhookAuthApiKey, WebhookAuthApiKeyInput, WebhookAuthBasicAuth, WebhookAuthBasicAuthInput, WebhookAuthOAuth2, WebhookAuthOAuth2Input, WebhookAuthentication, WebhookAuthenticationInput, WebhookDeleteFailure, WebhookDeleteResponse, WebhookKeyValuePair, WebhookKeyValuePairInput, WebhookOrg, WebhookPagination, WebhookResponse, WebhookResponseEventsEnum, WebhookSearchResponse, WebhookSignatureVerification, WebhookSignatureVerificationAlgorithmEnum, WebhookSignatureVerificationInput, WebhookSignatureVerificationInputAlgorithmEnum, WebhookSignatureVerificationInputTypeEnum, WebhookSignatureVerificationTypeEnum, WebhookSortOptionsInput, WebhookSortOptionsInputFieldNameEnum, WebhookSortOptionsInputOrderEnum, WebhookUser, PromiseWebhooksApi as WebhooksApi, configureAuthMethods, createBasicConfig, createBearerAuthenticationConfig, createConfiguration, server1, servers, wrapHttpLibrary }; diff --git a/sdks/typescript/dist/index.d.ts b/sdks/typescript/dist/index.d.ts new file mode 100644 index 000000000..e8883f81f --- /dev/null +++ b/sdks/typescript/dist/index.d.ts @@ -0,0 +1,27511 @@ +declare class Observable { + private promise; + constructor(promise: Promise); + toPromise(): Promise; + pipe(callback: (value: T) => S | Promise): Observable; +} + +declare class IsomorphicFetchHttpLibrary implements HttpLibrary { + send(request: RequestContext): Observable; +} + +/** + * Represents an HTTP method. + */ +declare enum HttpMethod { + GET = "GET", + HEAD = "HEAD", + POST = "POST", + PUT = "PUT", + DELETE = "DELETE", + CONNECT = "CONNECT", + OPTIONS = "OPTIONS", + TRACE = "TRACE", + PATCH = "PATCH" +} +/** + * Represents an HTTP file which will be transferred from or to a server. + */ +type HttpFile = Blob & { + readonly name: string; +}; +declare class HttpException extends Error { + constructor(msg: string); +} +/** + * Represents the body of an outgoing HTTP request. + */ +type RequestBody = undefined | string | FormData | URLSearchParams; +/** + * Represents an HTTP request context + */ +declare class RequestContext { + private httpMethod; + private headers; + private body; + private url; + /** + * Creates the request context using a http method and request resource url + * + * @param url url of the requested resource + * @param httpMethod http method + */ + constructor(url: string, httpMethod: HttpMethod); + getUrl(): string; + /** + * Replaces the url set in the constructor with this url. + * + */ + setUrl(url: string): void; + /** + * Sets the body of the http request either as a string or FormData + * + * Note that setting a body on a HTTP GET, HEAD, DELETE, CONNECT or TRACE + * request is discouraged. + * https://httpwg.org/http-core/draft-ietf-httpbis-semantics-latest.html#rfc.section.7.3.1 + * + * @param body the body of the request + */ + setBody(body: RequestBody): void; + getHttpMethod(): HttpMethod; + getHeaders(): { + [key: string]: string; + }; + getBody(): RequestBody; + setQueryParam(name: string, value: string): void; + /** + * Sets a cookie with the name and value. NO check for duplicate cookies is performed + * + */ + addCookie(name: string, value: string): void; + setHeaderParam(key: string, value: string): void; +} +interface ResponseBody { + text(): Promise; + binary(): Promise; +} +/** + * Helper class to generate a `ResponseBody` from binary data + */ +declare class SelfDecodingBody implements ResponseBody { + private dataSource; + constructor(dataSource: Promise); + binary(): Promise; + text(): Promise; +} +declare class ResponseContext { + httpStatusCode: number; + headers: { + [key: string]: string; + }; + body: ResponseBody; + constructor(httpStatusCode: number, headers: { + [key: string]: string; + }, body: ResponseBody); + /** + * Parse header value in the form `value; param1="value1"` + * + * E.g. for Content-Type or Content-Disposition + * Parameter names are converted to lower case + * The first parameter is returned with the key `""` + */ + getParsedHeader(headerName: string): { + [parameter: string]: string; + }; + getBodyAsFile(): Promise; + /** + * Use a heuristic to get a body of unknown data structure. + * Return as string if possible, otherwise as binary. + */ + getBodyAsAny(): Promise; +} +interface HttpLibrary { + send(request: RequestContext): Observable; +} +interface PromiseHttpLibrary { + send(request: RequestContext): Promise; +} +declare function wrapHttpLibrary(promiseHttpLibrary: PromiseHttpLibrary): HttpLibrary; + +/** + * Interface authentication schemes. + */ +interface SecurityAuthentication { + getName(): string; + /** + * Applies the authentication scheme to the request context + * + * @params context the request context which should use this authentication scheme + */ + applySecurityAuthentication(context: RequestContext): void | Promise; +} +interface TokenProvider { + getToken(): Promise | string; +} +/** + * Applies http authentication to the request context. + */ +declare class BearerAuthAuthentication implements SecurityAuthentication { + private tokenProvider; + /** + * Configures the http authentication with the required details. + * + * @param tokenProvider service that can provide the up-to-date token when needed + */ + constructor(tokenProvider: TokenProvider); + getName(): string; + applySecurityAuthentication(context: RequestContext): Promise; +} +type AuthMethods = { + "default"?: SecurityAuthentication; + "bearerAuth"?: SecurityAuthentication; +}; +type ApiKeyConfiguration = string; +type HttpBasicConfiguration = { + "username": string; + "password": string; +}; +type HttpBearerConfiguration = { + tokenProvider: TokenProvider; +}; +type OAuth2Configuration = { + accessToken: string; +}; +type AuthMethodsConfiguration = { + "default"?: SecurityAuthentication; + "bearerAuth"?: HttpBearerConfiguration; +}; +/** + * Creates the authentication methods from a swagger description. + * + */ +declare function configureAuthMethods(config: AuthMethodsConfiguration | undefined): AuthMethods; + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +declare class AIContext { + /** + * User specific text instructions sent to AI system for processing the query. + */ + 'instructions'?: Array | null; + /** + * User provided content like text data, csv data as a string message to provide context & potentially improve the quality of the response. + */ + 'content'?: Array | null; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +/** +* With API key auth, you send a key-value pair to the API either in the request headers or query parameters. +*/ +declare class APIKey { + /** + * Enter your key name + */ + 'key'?: string | null; + /** + * Enter you key value + */ + 'value'?: string | null; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +/** +* With API key auth, you send a key-value pair to the API either in the request headers or query parameters. +*/ +declare class APIKeyInput { + /** + * Enter your key name + */ + 'key'?: string | null; + /** + * Enter you key value + */ + 'value'?: string | null; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +declare class OrgInfo { + /** + * Id. + */ + 'id': number; + /** + * Name. + */ + 'name'?: string | null; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +declare class UserInfo { + /** + * Id. + */ + 'id': string; + /** + * Name. + */ + 'name'?: string | null; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +declare class AccessToken { + /** + * GUID of the auth token. + */ + 'id'?: string | null; + /** + * Bearer auth token. + */ + 'token': string; + 'org': OrgInfo; + 'user': UserInfo; + /** + * Token creation time in milliseconds. + */ + 'creation_time_in_millis': number; + /** + * Token expiration time in milliseconds. + */ + 'expiration_time_in_millis': number; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +/** +* Specify that the association is enabled for the metadata object +*/ +declare class ActionConfig { + /** + * Position of the Custom action on the Metadata object. Earlier naming convention: context. + */ + 'position'?: string | null; + /** + * Visibility of the metadata association with custom action. Earlier naming convention: enabled + */ + 'visibility'?: boolean | null; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +/** +* Specify that the association is enabled for the metadata object Default +*/ +declare class ActionConfigInput { + /** + * Position of the Custom action on the Metadata object. Earlier naming convention: context. + */ + 'position'?: ActionConfigInputPositionEnum | null; + /** + * Visibility of the metadata association with custom action. Earlier naming convention: enabled + */ + 'visibility'?: boolean | null; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} +type ActionConfigInputPositionEnum = "MENU" | "PRIMARY" | "CONTEXT_MENU"; + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +/** +* Specify that the association is enabled for the metadata object Default +*/ +declare class ActionConfigInputCreate { + /** + * Position of the Custom action on the Metadata object. Earlier naming convention: context. + */ + 'position'?: ActionConfigInputCreatePositionEnum | null; + /** + * Visibility of the metadata association with custom action. Earlier naming convention: enabled + */ + 'visibility'?: boolean | null; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} +type ActionConfigInputCreatePositionEnum = "MENU" | "PRIMARY" | "CONTEXT_MENU"; + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +/** +* CALLBACK Custom Action Type +*/ +declare class CALLBACK { + /** + * Reference name of the SDK. By default, the value will be set to action name. + */ + 'reference'?: string | null; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +/** +* Basic Auth: Basic authentication involves sending a verified username and password with your request. +*/ +declare class BasicAuth { + /** + * Password for the basic authentication + */ + 'password'?: string | null; + /** + * Username for the basic authentication + */ + 'username'?: string | null; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +/** +* Authorization type for the custom action. +*/ +declare class Authentication { + 'API_Key'?: APIKey; + 'Basic_Auth'?: BasicAuth; + /** + * Bearer tokens enable requests to authenticate using an access key. + */ + 'Bearer_Token'?: string | null; + /** + * No authorization. If your request doesn\'t require authorization. + */ + 'No_Auth'?: string | null; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +declare class ParametersListItem { + /** + * Key for the url query parameter + */ + 'key'?: string | null; + /** + * Value for the url query parameter + */ + 'value'?: string | null; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +/** +* URL Custom Action Type +*/ +declare class URL { + 'authentication'?: Authentication; + /** + * Query parameters for url. + */ + 'parameters'?: Array | null; + /** + * Request Url for the Custom action. + */ + 'url': string; + /** + * Reference name of the SDK. By default, the value will be set to action name. + */ + 'reference'?: string | null; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +/** +* Type and Configuration for Custom Actions +*/ +declare class ActionDetails { + 'CALLBACK'?: CALLBACK; + 'URL'?: URL; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +/** +* CALLBACK Custom Action Type +*/ +declare class CALLBACKInput { + /** + * Reference name. By default, the value will be set to action name. + */ + 'reference'?: string | null; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +/** +* Basic Auth: Basic authentication involves sending a verified username and password with your request. +*/ +declare class BasicAuthInput { + /** + * Password for the basic authentication + */ + 'password'?: string | null; + /** + * Username for the basic authentication + */ + 'username'?: string | null; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +/** +* Authorization type for the custom action. +*/ +declare class AuthenticationInput { + 'API_Key'?: APIKeyInput; + 'Basic_Auth'?: BasicAuthInput; + /** + * Bearer tokens enable requests to authenticate using an access key. + */ + 'Bearer_Token'?: string | null; + /** + * No authorization. If your request doesn\'t require authorization. + */ + 'No_Auth'?: string | null; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +declare class ParametersListItemInput { + /** + * Key for the url query parameter + */ + 'key'?: string | null; + /** + * Value for the url query parameter + */ + 'value'?: string | null; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +/** +* URL Custom Action Type +*/ +declare class URLInput { + 'authentication'?: AuthenticationInput; + /** + * Query parameters for url. + */ + 'parameters'?: Array | null; + /** + * Request Url for the Custom action. + */ + 'url'?: string | null; + /** + * Reference name. By default the value will be set to action name + */ + 'reference'?: string | null; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +/** +* Action details includes `Type` and configuration details of Custom Actions. Either Callback or URL is required. +*/ +declare class ActionDetailsInput { + 'CALLBACK'?: CALLBACKInput; + 'URL'?: URLInput; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +/** +* CALLBACK Custom Action Type +*/ +declare class CALLBACKInputMandatory { + /** + * Reference name. By default, the value will be set to action name. + */ + 'reference'?: string | null; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +/** +* URL Custom Action Type +*/ +declare class URLInputMandatory { + 'authentication'?: AuthenticationInput; + /** + * Query parameters for url. + */ + 'parameters'?: Array | null; + /** + * Request Url for the Custom action. + */ + 'url': string; + /** + * Reference name. By default the value will be set to action name + */ + 'reference'?: string | null; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +/** +* Action details includes Type and Configuration for Custom Actions, either Callback or URL is required. When both callback and url are provided, callback would be considered +*/ +declare class ActionDetailsInputCreate { + 'CALLBACK'?: CALLBACKInputMandatory; + 'URL'?: URLInputMandatory; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +declare class ActivateUserRequest { + /** + * Unique ID or name of the user. + */ + 'user_identifier': string; + /** + * Auth token for the user. + */ + 'auth_token': string; + /** + * New password for the user to access the account. + */ + 'password': string; + /** + * Properties of the user. + */ + 'properties'?: string; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +declare class AgentConversation { + /** + * Unique identifier of the conversation. + */ + 'conversation_id': string; + /** + * Unique identifier of the conversation. Version: 26.5.0.cl or later + */ + 'conversation_identifier': string; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +declare class AnswerContent { + /** + * Total available data row count. + */ + 'available_data_row_count': number; + /** + * Name of the columns. + */ + 'column_names': Array; + /** + * Rows of data set. + */ + 'data_rows': Array; + /** + * The starting record number from where the records should be included. + */ + 'record_offset': number; + /** + * The number of records that should be included. + */ + 'record_size': number; + /** + * Total returned data row count. + */ + 'returned_data_row_count': number; + /** + * Sampling ratio (0 to 1). If the query was sampled, it is the ratio of keys returned in the data set to the total number of keys expected in the query. If the value is 1.0, this means that the complete result is returned. + */ + 'sampling_ratio': number; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +/** +* Response format associated with fetch data api +*/ +declare class AnswerDataResponse { + /** + * The unique identifier of the object + */ + 'metadata_id': string; + /** + * Name of the metadata object + */ + 'metadata_name': string; + /** + * Data content of metadata objects + */ + 'contents': Array; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +declare class AnswerPngOptionsInput { + /** + * Desired width of the answer image in pixels. Ex. 1920 for Full HD image Version: 26.6.0.cl or later + */ + 'x_resolution'?: number | null; + /** + * Desired height of the answer image in pixels. Ex. 1080 for Full HD image Version: 26.6.0.cl or later + */ + 'y_resolution'?: number | null; + /** + * The scale of the image in percentage. Ex. 100 for 100% scale. Version: 26.6.0.cl or later + */ + 'scaling'?: number | null; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +/** +* MetadataType InputType used in Author API\'s +*/ +declare class AuthorMetadataTypeInput { + /** + * Type of metadata. Required if the name of the object is set as the identifier. This attribute is optional when the object GUID is specified as the identifier. + */ + 'type'?: AuthorMetadataTypeInputTypeEnum | null; + /** + * Unique ID or name of the metadata object. + */ + 'identifier': string; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} +type AuthorMetadataTypeInputTypeEnum = "LIVEBOARD" | "ANSWER" | "LOGICAL_TABLE" | "CONNECTION"; + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +declare class AssignChangeAuthorRequest { + /** + * GUID or name of the metadata object. + */ + 'metadata': Array; + /** + * GUID or name of the user who you want to assign as the author. + */ + 'user_identifier': string; + /** + * GUID or name of the current author. When defined, the metadata objects authored by the specified owner are filtered for the API operation. + */ + 'current_owner_identifier'?: string; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +declare class TagMetadataTypeInput { + /** + * Type of metadata. Required if the name of the object is set as the identifier. This attribute is optional when the object GUID is specified as the identifier. 1. LIVEBOARD 2. ANSWERS 3. LOGICAL_TABLE for any data object such as table, worksheet or view. 4. LOGICAL_COLUMN for a column of any data object such as tables, worksheets or views. + */ + 'type'?: TagMetadataTypeInputTypeEnum | null; + /** + * Unique ID or name of the metadata. + */ + 'identifier': string; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} +type TagMetadataTypeInputTypeEnum = "LIVEBOARD" | "ANSWER" | "LOGICAL_TABLE" | "LOGICAL_COLUMN" | "CONNECTION" | "COLLECTION"; + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +declare class AssignTagRequest { + /** + * Metadata objects. + */ + 'metadata': Array; + /** + * GUID or name of the tag. + */ + 'tag_identifiers': Array; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +declare class AssociateMetadataInput { + 'action_config'?: ActionConfigInput; + /** + * Unique ID or name of the metadata. + */ + 'identifier'?: string | null; + /** + * Type of metadata. Required if the name of the object is set as the identifier. This attribute is optional when the object GUID is specified as the identifier. + */ + 'type'?: AssociateMetadataInputTypeEnum | null; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} +type AssociateMetadataInputTypeEnum = "VISUALIZATION" | "ANSWER" | "WORKSHEET"; + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +declare class AssociateMetadataInputCreate { + 'action_config'?: ActionConfigInputCreate; + /** + * Unique ID or name of the metadata. + */ + 'identifier': string; + /** + * Type of metadata. Required if the name of the object is set as the identifier. This attribute is optional when the object GUID is specified as the identifier. + */ + 'type'?: AssociateMetadataInputCreateTypeEnum | null; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} +type AssociateMetadataInputCreateTypeEnum = "VISUALIZATION" | "ANSWER" | "WORKSHEET"; + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +/** +* An auth settings access token. +*/ +declare class AuthSettingsAccessToken { + /** + * The plaintext token key value. + */ + 'key': string; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +/** +* Cluster-level authentication preferences. +*/ +declare class AuthClusterPreferences { + /** + * Whether authentication is enabled or disabled at the cluster level. + */ + 'auth_status'?: AuthClusterPreferencesAuthStatusEnum | null; + /** + * Cluster-level access tokens. Absent when no token is configured. + */ + 'access_tokens'?: Array | null; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} +type AuthClusterPreferencesAuthStatusEnum = "ENABLED" | "DISABLED"; + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +/** +* Input for cluster-level auth configuration. +*/ +declare class AuthClusterPreferencesInput { + /** + * Enable or disable authentication at the cluster level. When enabled, a new token is generated if one does not exist. When disabled, the existing token is revoked. + */ + 'auth_status'?: AuthClusterPreferencesInputAuthStatusEnum | null; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} +type AuthClusterPreferencesInputAuthStatusEnum = "ENABLED" | "DISABLED"; + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +/** +* Org identifier returned in auth settings search results. +*/ +declare class AuthOrgInfo { + /** + * Unique identifier of the org. + */ + 'id': number; + /** + * Name of the org. + */ + 'name'?: string | null; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +/** +* Org-level authentication preferences for a single org. +*/ +declare class AuthOrgPreference { + 'org'?: AuthOrgInfo; + /** + * Whether authentication is enabled or disabled for this org. + */ + 'auth_status'?: AuthOrgPreferenceAuthStatusEnum | null; + /** + * Org-level access tokens. Absent when no token is configured or the feature flag is off. + */ + 'access_tokens'?: Array | null; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} +type AuthOrgPreferenceAuthStatusEnum = "ENABLED" | "DISABLED"; + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +/** +* Input for org-level auth configuration. +*/ +declare class AuthOrgPreferenceInput { + /** + * Unique ID or name of the org to configure. + */ + 'org_identifier': string; + /** + * Enable or disable authentication for this org. When enabled, a new token is generated if one does not exist. When disabled, the existing token is revoked. + */ + 'auth_status'?: AuthOrgPreferenceInputAuthStatusEnum | null; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} +type AuthOrgPreferenceInputAuthStatusEnum = "ENABLED" | "DISABLED"; + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +/** +* Author of the schedule. +*/ +declare class Author { + /** + * The unique identifier of the object. + */ + 'id': string; + /** + * Name of the object. + */ + 'name': string; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +declare class AuthorType { + /** + * Email id of the committer + */ + 'email'?: string | null; + /** + * Username of the committer + */ + 'username'?: string | null; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +/** +* AWS S3 storage configuration details. +*/ +declare class AwsS3Config { + /** + * Name of the S3 bucket where webhook payloads are stored. + */ + 'bucket_name': string; + /** + * AWS region where the S3 bucket is located. + */ + 'region': string; + /** + * ARN of the IAM role used for S3 access. + */ + 'role_arn': string; + /** + * External ID for secure cross-account role assumption. + */ + 'external_id'?: string | null; + /** + * Path prefix for organizing objects within the bucket. + */ + 'path_prefix'?: string | null; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +/** +* Input type for AWS S3 storage configuration. +*/ +declare class AwsS3ConfigInput { + /** + * Name of the S3 bucket where webhook payloads will be stored. Example: \"my-webhook-files\" + */ + 'bucket_name': string; + /** + * AWS region where the S3 bucket is located. Example: \"us-west-2\" + */ + 'region': string; + /** + * ARN of the IAM role to assume for S3 access. Example: \"arn:aws:iam::123456789012:role/ThoughtSpotDeliveryRole\" + */ + 'role_arn': string; + /** + * External ID for secure cross-account role assumption. Example: \"ts-webhook-a1b2c3d4-7890\" + */ + 'external_id'?: string | null; + /** + * Optional path prefix for organizing objects within the bucket. Example: \"thoughtspot-webhooks/\" + */ + 'path_prefix'?: string | null; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +declare class CalendarResponse { + /** + * Name of the calendar + */ + 'calendar_name'?: string | null; + /** + * Name of the connection + */ + 'connection_name'?: string | null; + /** + * Type of data warehouse + */ + 'data_warehouse_type'?: string | null; + /** + * Last modification time in milliseconds + */ + 'modification_time_in_millis'?: string | null; + /** + * Name of the author who created the calendar + */ + 'author_name'?: string | null; + /** + * Unique ID of the connection + */ + 'connection_id'?: string | null; + /** + * Unique ID of the calendar + */ + 'calendar_id'?: string | null; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +declare class ChangeUserPasswordRequest { + /** + * Current password of the user. + */ + 'current_password': string; + /** + * New password for the user. + */ + 'new_password': string; + /** + * GUID or name of the user. + */ + 'user_identifier': string; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +/** +* Event metadata for the triggering event associated with a job. +*/ +declare class ChannelHistoryEventInfo { + /** + * Type of the event. + */ + 'type': ChannelHistoryEventInfoTypeEnum; + /** + * Unique ID of the event. + */ + 'id': string; + /** + * Name of the event. + */ + 'name'?: string | null; + /** + * Unique run ID for this event execution. + */ + 'run_id'?: string | null; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} +type ChannelHistoryEventInfoTypeEnum = "LIVEBOARD_SCHEDULE"; + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +/** +* Event specification for channel history search. +*/ +declare class ChannelHistoryEventInput { + /** + * Type of the event. + */ + 'type': ChannelHistoryEventInputTypeEnum; + /** + * Unique ID or name of the event. + */ + 'identifier'?: string | null; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} +type ChannelHistoryEventInputTypeEnum = "LIVEBOARD_SCHEDULE"; + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +/** +* A recipient (user, group, or external) for a job execution. +*/ +declare class JobRecipient { + /** + * Type of the recipient. + */ + 'type': JobRecipientTypeEnum; + /** + * Unique ID of the recipient. + */ + 'id'?: string | null; + /** + * Name of the recipient. + */ + 'name'?: string | null; + /** + * Email of the recipient. + */ + 'email'?: string | null; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} +type JobRecipientTypeEnum = "USER" | "EXTERNAL"; + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +/** +* A single job execution record for a channel. +*/ +declare class ChannelHistoryJob { + /** + * Unique identifier for this job. + */ + 'id': string; + /** + * Delivery status of this job. + */ + 'status': ChannelHistoryJobStatusEnum; + /** + * Timestamp when this job was created (epoch milliseconds). + */ + 'creation_time_in_millis': number; + 'event'?: ChannelHistoryEventInfo; + /** + * The users, groups or external recipients for this job. + */ + 'recipients'?: Array | null; + /** + * Additional delivery details such as HTTP response code or error message. + */ + 'detail'?: string | null; + /** + * Number of attempts made. 1 indicates first attempt. + */ + 'try_count'?: number | null; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} +type ChannelHistoryJobStatusEnum = "PENDING" | "RETRY" | "SUCCESS" | "FAILED"; + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +/** +* AWS S3 storage information returned from a validation step. +*/ +declare class ChannelValidationAwsS3Info { + /** + * Name of the S3 bucket. + */ + 'bucket_name'?: string | null; + /** + * Name of the uploaded file. + */ + 'file_name'?: string | null; + /** + * Key of the object in S3 storage. + */ + 'object_key'?: string | null; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +/** +* Validation detail result for a sub-step. +*/ +declare class ChannelValidationDetail { + /** + * The validation step that was performed. + */ + 'validation_step': ChannelValidationDetailValidationStepEnum; + /** + * Status of this validation step. + */ + 'status': ChannelValidationDetailStatusEnum; + /** + * HTTP status code returned by the channel (if applicable). + */ + 'http_status'?: number | null; + /** + * Error message from the channel or validation process. + */ + 'error_message'?: string | null; + 'aws_s3_info'?: ChannelValidationAwsS3Info; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} +type ChannelValidationDetailValidationStepEnum = "HTTP_CONNECTION_CHECK" | "STORAGE_FILE_UPLOAD_CHECK"; +type ChannelValidationDetailStatusEnum = "SUCCESS" | "FAILED"; + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +/** +* Group information for non-embed access. +*/ +declare class GroupInfo { + /** + * Unique identifier of the group. + */ + 'id'?: string | null; + /** + * Name of the group. + */ + 'name'?: string | null; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +/** +* Cluster-level non-embed access configuration. +*/ +declare class ClusterNonEmbedAccess { + /** + * Block full application access for non-embedded usage. + */ + 'block_full_app_access'?: boolean | null; + /** + * Groups that have non-embed full app access. Only applicable when orgs feature is disabled. Use org_preferences when org feature is enabled. + */ + 'groups_with_access'?: Array | null; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +/** +* Input for cluster-level non-embed access configuration. +*/ +declare class ClusterNonEmbedAccessInput { + /** + * Block full application access for non-embedded usage. + */ + 'block_full_app_access'?: boolean | null; + /** + * Group identifiers that are allowed non-embed full app access. Can only be set when orgs feature is disabled and block_full_app_access is true. + */ + 'groups_identifiers_with_access'?: Array | null; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +/** +* Entity identifier with name. +*/ +declare class CollectionEntityIdentifier { + /** + * Unique identifier of the entity. + */ + 'identifier'?: string | null; + /** + * Name of the entity. + */ + 'name'?: string | null; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +/** +* Metadata item in a collection response. +*/ +declare class CollectionMetadataItem { + /** + * Type of the metadata object. + */ + 'type'?: string | null; + /** + * List of identifiers for this metadata type. + */ + 'identifiers'?: Array | null; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +/** +* Response object for a collection. +*/ +declare class Collection { + /** + * Unique identifier of the collection. + */ + 'id': string; + /** + * Name of the collection. + */ + 'name': string; + /** + * Description of the collection. + */ + 'description'?: string | null; + /** + * Metadata objects in the collection. + */ + 'metadata'?: Array | null; + /** + * Creation timestamp in milliseconds. + */ + 'created_at'?: string | null; + /** + * Last updated timestamp in milliseconds. + */ + 'updated_at'?: string | null; + /** + * Name of the author who created the collection. + */ + 'author_name'?: string | null; + /** + * Unique identifier of the author. + */ + 'author_id'?: string | null; + 'org'?: CollectionEntityIdentifier; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +declare class GenericInfo { + 'id'?: string | null; + 'name'?: string | null; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +/** +* Group of metadata objects identified by type. +*/ +declare class CollectionDeleteTypeIdentifiers { + /** + * Type of the metadata object (e.g., Collection, Worksheet, Table). + */ + 'type'?: string | null; + /** + * List of metadata identifiers belonging to the given type. + */ + 'identifiers'?: Array | null; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +/** +* Response object for delete collection operation. +*/ +declare class CollectionDeleteResponse { + /** + * List of metadata objects that were successfully deleted. + */ + 'metadata_deleted'?: Array | null; + /** + * List of metadata objects that were skipped during deletion. Objects may be skipped due to lack of permissions, dependencies, or other constraints. + */ + 'metadata_skipped'?: Array | null; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +/** +* Input type for metadata to be added to a collection. +*/ +declare class CollectionMetadataInput { + /** + * Type of metadata object. + */ + 'type': CollectionMetadataInputTypeEnum; + /** + * List of unique IDs or names of metadata objects. + */ + 'identifiers': Array; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} +type CollectionMetadataInputTypeEnum = "LIVEBOARD" | "ANSWER" | "LOGICAL_TABLE" | "COLLECTION"; + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +/** +* Response object for search collections operation. +*/ +declare class CollectionSearchResponse { + /** + * List of collections matching the search criteria. + */ + 'collections': Array; + /** + * The starting record number from where the records are included. + */ + 'record_offset'?: number | null; + /** + * The number of records returned. + */ + 'record_size'?: number | null; + /** + * Indicates if this is the last batch of results. + */ + 'is_last_batch'?: boolean | null; + /** + * Total count of records returned. + */ + 'count'?: number | null; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +declare class Column { + /** + * Name of the column + */ + 'name': string; + /** + * Data type of the column + */ + 'data_type': string; + /** + * Determines if the column schema is an aggregate + */ + 'is_aggregate'?: string | null; + /** + * Determines if the column schema can be imported + */ + 'can_import'?: boolean | null; + /** + * Determines if the table is selected + */ + 'selected'?: boolean | null; + /** + * Determines if the table is linked + */ + 'is_linked_active'?: boolean | null; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +declare class ColumnSecurityRuleColumn { + /** + * The unique identifier of the column + */ + 'id': string; + /** + * The name of the column + */ + 'name': string; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +declare class ColumnSecurityRuleGroup { + /** + * The unique identifier of the group + */ + 'id': string; + /** + * The name of the group + */ + 'name': string; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +declare class ColumnSecurityRuleSourceTable { + /** + * The unique identifier of the source table + */ + 'id': string; + /** + * The name of the source table + */ + 'name': string; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +declare class ColumnSecurityRule { + 'column': ColumnSecurityRuleColumn; + /** + * Array of groups that have access to this column + */ + 'groups'?: Array | null; + 'source_table_details'?: ColumnSecurityRuleSourceTable; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +declare class ColumnSecurityRuleGroupOperation { + /** + * Type of operation to be performed on the groups + */ + 'operation': ColumnSecurityRuleGroupOperationOperationEnum; + /** + * Array of group identifiers (name or GUID) on which the operation will be performed + */ + 'group_identifiers': Array; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} +type ColumnSecurityRuleGroupOperationOperationEnum = "ADD" | "REMOVE" | "REPLACE"; + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +declare class ColumnSecurityRuleResponse { + /** + * GUID of the table for which the column security rules are fetched + */ + 'table_guid'?: string | null; + /** + * Object ID of the table for which the column security rules are fetched + */ + 'obj_id'?: string | null; + /** + * Array containing column security rule objects + */ + 'column_security_rules'?: Array | null; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +declare class ColumnSecurityRuleTableInput { + /** + * Name or GUID of the table + */ + 'identifier'?: string | null; + /** + * Object ID of the table + */ + 'obj_identifier'?: string | null; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +declare class ColumnSecurityRuleUpdate { + /** + * Column identifier (col_id or name) + */ + 'column_identifier': string; + /** + * If true, the column will be marked as unprotected and all groups associated with it will be removed + */ + 'is_unsecured'?: boolean | null; + /** + * Array of group operation objects that specifies the actions for groups to be associated with a column + */ + 'group_access'?: Array | null; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +declare class MetadataObject { + /** + * Unique ID or name of the metadata + */ + 'identifier': string; + /** + * Type of metadata. Required if the name of the object is set as the identifier. This attribute is optional when the object GUID is specified as the identifier. + */ + 'type'?: MetadataObjectTypeEnum | null; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} +type MetadataObjectTypeEnum = "LIVEBOARD" | "ANSWER" | "LOGICAL_TABLE" | "CUSTOM_ACTION"; + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +declare class CommitBranchRequest { + /** + * Metadata objects. + */ + 'metadata': Array; + /** + * Delete the tml files from version control repo if it does not exist in the ThoughSpot instance + */ + 'delete_aware'?: boolean | null; + /** + * Name of the remote branch where object should be pushed Note: If no branch_name is specified, then the commit_branch_name will be considered. + */ + 'branch_name'?: string; + /** + * Comment to be added to the commit + */ + 'comment': string; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +declare class CommitFileType { + /** + * Name of the file deployed + */ + 'file_name': string; + /** + * Indicates the status of deployment for the file + */ + 'status_code': string; + /** + * Any error or warning with the deployment + */ + 'status_message'?: string | null; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +declare class CommiterType { + /** + * Email id of the committer + */ + 'email'?: string | null; + /** + * Username of the committer + */ + 'username'?: string | null; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +declare class CommitHistoryResponse { + 'committer': CommiterType; + 'author': AuthorType; + /** + * Comments associated with the commit + */ + 'comment': string; + /** + * Time at which the changes were committed. + */ + 'commit_time': string; + /** + * SHA id associated with the commit + */ + 'commit_id': string; + /** + * Branch where changes were committed + */ + 'branch': string; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +declare class CommitResponse { + 'committer'?: CommiterType; + 'author'?: AuthorType; + /** + * Comments associated with the commit + */ + 'comment'?: string | null; + /** + * Time at which the changes were committed. + */ + 'commit_time'?: string | null; + /** + * SHA id associated with the commit + */ + 'commit_id'?: string | null; + /** + * Branch where changes were committed + */ + 'branch'?: string | null; + /** + * Files that were pushed as part of this commit + */ + 'committed_files'?: Array | null; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +declare class EventChannelConfig { + /** + * Type of event for which communication channels are configured + */ + 'event_type': EventChannelConfigEventTypeEnum; + /** + * Communication channels enabled for this event type. Empty array indicates no channels are enabled. + */ + 'channels': Array; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} +type EventChannelConfigEventTypeEnum = "LIVEBOARD_SCHEDULE"; +type EventChannelConfigChannelsEnum = "EMAIL" | "WEBHOOK"; + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +declare class OrgDetails { + /** + * Unique id of the org + */ + 'id': string; + /** + * Name of the org + */ + 'name': string; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +declare class OrgChannelConfigResponse { + 'org': OrgDetails; + /** + * Event-specific communication channel configurations for this org + */ + 'preferences': Array; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +declare class CommunicationChannelPreferencesResponse { + /** + * Cluster-level default configurations. + */ + 'cluster_preferences'?: Array | null; + /** + * Org-specific configurations. + */ + 'org_preferences'?: Array | null; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +/** +* Response containing validation results for communication channel configuration. +*/ +declare class CommunicationChannelValidateResponse { + /** + * Type of communication channel that was validated. + */ + 'channel_type': CommunicationChannelValidateResponseChannelTypeEnum; + /** + * ID of the communication channel (e.g., webhook_id). + */ + 'channel_id': string; + /** + * Name of the communication channel (e.g., webhook name). + */ + 'channel_name'?: string | null; + /** + * Event type that was validated. + */ + 'event_type': CommunicationChannelValidateResponseEventTypeEnum; + /** + * Unique Job Id of the validation. + */ + 'job_id': string; + /** + * Overall result of the validation. + */ + 'result_code': CommunicationChannelValidateResponseResultCodeEnum; + /** + * Detailed results of various validation sub-steps. + */ + 'details'?: Array | null; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} +type CommunicationChannelValidateResponseChannelTypeEnum = "WEBHOOK"; +type CommunicationChannelValidateResponseEventTypeEnum = "LIVEBOARD_SCHEDULE"; +type CommunicationChannelValidateResponseResultCodeEnum = "SUCCESS" | "FAILED" | "PARTIAL_SUCCESS"; + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +/** +* Cluster-level authentication preferences. Omit to leave the existing cluster setting unchanged. +*/ +declare class ConfigureAuthSettingsRequestClusterPreferences { + /** + * Enable or disable authentication at the cluster level. When enabled, a new token is generated if one does not exist. When disabled, the existing token is revoked. + */ + 'auth_status'?: ConfigureAuthSettingsRequestClusterPreferencesAuthStatusEnum | null; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} +type ConfigureAuthSettingsRequestClusterPreferencesAuthStatusEnum = "ENABLED" | "DISABLED"; + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +declare class ConfigureAuthSettingsRequest { + /** + * Type of authentication mechanism to configure. Currently supports TRUSTED_AUTH. + */ + 'auth_type': ConfigureAuthSettingsRequestAuthTypeEnum; + 'cluster_preferences'?: ConfigureAuthSettingsRequestClusterPreferences; + /** + * Org-level authentication preferences. Each entry identifies an org and the desired status. Omit to leave existing org settings unchanged. + */ + 'org_preferences'?: Array; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} +type ConfigureAuthSettingsRequestAuthTypeEnum = "TRUSTED_AUTH"; + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +declare class EventChannelConfigInput { + /** + * Type of event for which communication channels are configured + */ + 'event_type': EventChannelConfigInputEventTypeEnum; + /** + * Communication channels enabled for this event type. Empty array disables all channels for this event. + */ + 'channels': Array; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} +type EventChannelConfigInputEventTypeEnum = "LIVEBOARD_SCHEDULE"; +type EventChannelConfigInputChannelsEnum = "EMAIL" | "WEBHOOK"; + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +declare class OrgChannelConfigInput { + /** + * Unique identifier or name of the org + */ + 'org_identifier': string; + /** + * Operation to perform. REPLACE: Update preferences (default). RESET: Remove org-specific configurations, causing fallback to cluster-level preferences. + */ + 'operation'?: OrgChannelConfigInputOperationEnum | null; + /** + * Event-specific configurations. Required for REPLACE operation. + */ + 'preferences'?: Array | null; + /** + * Event types to reset. Required for RESET operation. Org-specific configurations for these events will be removed, causing fallback to cluster-level preferences. + */ + 'reset_events'?: Array | null; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} +type OrgChannelConfigInputOperationEnum = "REPLACE" | "RESET"; +type OrgChannelConfigInputResetEventsEnum = "LIVEBOARD_SCHEDULE"; + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +declare class ConfigureCommunicationChannelPreferencesRequest { + /** + * Cluster-level default configurations. + */ + 'cluster_preferences'?: Array; + /** + * Org-specific configurations. + */ + 'org_preferences'?: Array; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +/** +* Input for script-src CSP settings. +*/ +declare class ScriptSrcUrlsInput { + /** + * Whether script-src customization is enabled. + */ + 'enabled'?: boolean | null; + /** + * Allowed URLs for script-src directive. Can only be set if enabled is true. + */ + 'urls'?: Array | null; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +/** +* Input for CSP (Content Security Policy) settings. +*/ +declare class CspSettingsInput { + /** + * Allowed URLs for connect-src directive. + */ + 'connect_src_urls'?: Array | null; + /** + * Allowed URLs for font-src directive. + */ + 'font_src_urls'?: Array | null; + /** + * Allowed hosts for visual embed (frame-ancestors directive). + */ + 'visual_embed_hosts'?: Array | null; + /** + * Allowed URLs for frame-src directive. + */ + 'iframe_src_urls'?: Array | null; + /** + * Allowed URLs for img-src directive. + */ + 'img_src_urls'?: Array | null; + 'script_src_urls'?: ScriptSrcUrlsInput; + /** + * Allowed URLs for style-src directive. + */ + 'style_src_urls'?: Array | null; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +/** +* Cluster-level security preferences. +*/ +declare class ConfigureSecuritySettingsRequestClusterPreferences { + /** + * Support embedded access when third-party cookies are blocked. + */ + 'enable_partitioned_cookies'?: boolean | null; + /** + * Allowed origins for CORS. + */ + 'cors_whitelisted_urls'?: Array | null; + 'csp_settings'?: CspSettingsInput; + /** + * Allowed redirect hosts for SAML login. + */ + 'saml_redirect_urls'?: Array | null; + 'non_embed_access'?: ClusterNonEmbedAccessInput; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +/** +* Input for org-level non-embed access configuration. +*/ +declare class OrgNonEmbedAccessInput { + /** + * Block full application access for non-embedded usage. + */ + 'block_full_app_access'?: boolean | null; + /** + * Group identifiers that are allowed non-embed full app access. Can only be set if block_full_app_access is true. + */ + 'groups_identifiers_with_access'?: Array | null; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +/** +* Input for org-level security preferences configuration. Note: cross-org operations are not supported currently. +*/ +declare class SecuritySettingsOrgPreferencesInput { + /** + * Unique identifier or name of the org + */ + 'org_identifier': string; + /** + * Allowed origins for CORS for this org. + */ + 'cors_whitelisted_urls'?: Array | null; + 'non_embed_access'?: OrgNonEmbedAccessInput; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +declare class ConfigureSecuritySettingsRequest { + 'cluster_preferences'?: ConfigureSecuritySettingsRequestClusterPreferences; + /** + * Org-level security preferences for the current org. + */ + 'org_preferences'?: Array; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +declare class PolicyProcessOptions { + 'impersonate_user'?: string | null; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +declare class UserPrincipal { + 'id'?: string | null; + 'name'?: string | null; + 'type'?: string | null; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +declare class ConnectionConfigurationResponse { + 'configuration_identifier'?: string | null; + 'name'?: string | null; + 'description'?: string | null; + 'configuration'?: any | null; + 'policy_principals'?: Array | null; + 'policy_processes'?: Array | null; + 'disabled'?: boolean | null; + 'data_warehouse_type'?: ConnectionConfigurationResponseDataWarehouseTypeEnum | null; + 'policy_type'?: ConnectionConfigurationResponsePolicyTypeEnum | null; + 'same_as_parent'?: boolean | null; + 'policy_process_options'?: PolicyProcessOptions; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} +type ConnectionConfigurationResponsePolicyProcessesEnum = "SAGE_INDEXING" | "ROW_COUNT_STATS"; +type ConnectionConfigurationResponseDataWarehouseTypeEnum = "SNOWFLAKE" | "AMAZON_REDSHIFT" | "GOOGLE_BIGQUERY" | "AZURE_SYNAPSE" | "TERADATA" | "SAP_HANA" | "STARBURST" | "ORACLE_ADW" | "DATABRICKS" | "DENODO" | "DREMIO" | "TRINO" | "PRESTO" | "POSTGRES" | "SQLSERVER" | "MYSQL" | "GENERIC_JDBC" | "AMAZON_RDS_POSTGRESQL" | "AMAZON_AURORA_POSTGRESQL" | "AMAZON_RDS_MYSQL" | "AMAZON_AURORA_MYSQL" | "LOOKER" | "AMAZON_ATHENA" | "SINGLESTORE" | "GCP_SQLSERVER" | "GCP_ALLOYDB_POSTGRESQL" | "GCP_POSTGRESQL" | "GCP_MYSQL" | "MODE" | "GOOGLE_SHEETS" | "FALCON" | "FALCON_ONPREM" | "CLICKHOUSE" | "IOMETE"; +type ConnectionConfigurationResponsePolicyTypeEnum = "NO_POLICY" | "PRINCIPALS" | "PROCESSES"; + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +declare class ConnectionConfigurationSearchRequest { + /** + * Unique ID or name of the connection. + */ + 'connection_identifier': string; + /** + * Unique ID or name of the configuration. + */ + 'configuration_identifier'?: string; + /** + * Type of policy. + */ + 'policy_type'?: ConnectionConfigurationSearchRequestPolicyTypeEnum; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} +type ConnectionConfigurationSearchRequestPolicyTypeEnum = "NO_POLICY" | "PRINCIPALS" | "PROCESSES"; + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +declare class DataWarehouseObjectInput { + /** + * Name of the database. + */ + 'database'?: string | null; + /** + * Name of the schema within the database. + */ + 'schema'?: string | null; + /** + * Name of the table within the schema. + */ + 'table'?: string | null; + /** + * Name of the column within the table. + */ + 'column'?: string | null; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +declare class ConnectionInput { + /** + * Unique ID or name of the connection. + */ + 'identifier'?: string | null; + /** + * A pattern to match case-insensitive name of the connection object. User `%` for a wildcard match. + */ + 'name_pattern'?: string | null; + /** + * Filter options for databases, schemas, tables and columns. + */ + 'data_warehouse_objects'?: Array | null; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +declare class DataSourceContextInput { + /** + * Unique identifier of the data source. Required when context type is DATA_SOURCE and `data_source_identifiers` is not provided. At least one of `data_source_identifier` or `data_source_identifiers` must be supplied for DATA_SOURCE context; omit only when context type is AUTO_MODE. Version: 26.5.0.cl or later + */ + 'data_source_identifier'?: string | null; + /** + * Unique identifiers of data sources for multi-data-source context. Required when context type is DATA_SOURCE and `data_source_identifier` is not provided. Version: 26.5.0.cl or later + */ + 'data_source_identifiers'?: Array | null; + /** + * Deprecated. Use `data_source_identifier` instead. Previously required when neither `data_source_identifier` nor `data_source_identifiers` was provided for DATA_SOURCE context. Version: 26.2.0.cl or later + */ + 'guid'?: string | null; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +declare class ContextPayloadV2Input { + /** + * Type of the context. + */ + 'type'?: ContextPayloadV2InputTypeEnum | null; + 'data_source_context'?: DataSourceContextInput; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} +type ContextPayloadV2InputTypeEnum = "data_source" | "DATA_SOURCE" | "AUTO_MODE"; + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +declare class Conversation { + /** + * Unique identifier of the conversation. + */ + 'conversation_identifier': string; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +declare class ConversationSettingsInput { + /** + * Enable contextual change analysis. Default changed from `false` to `true` in 26.2.0.cl. Ignored on versions >= 26.2.0.cl where it is always enabled. Version: 10.4.0.cl or later + */ + 'enable_contextual_change_analysis'?: boolean | null; + /** + * Enable natural language to answer generation. Default changed from `false` to `true` in 26.2.0.cl. Ignored on versions >= 26.2.0.cl where it is always enabled. Version: 10.4.0.cl or later + */ + 'enable_natural_language_answer_generation'?: boolean | null; + /** + * Enable reasoning. Default changed from `false` to `true` in 26.2.0.cl. Ignored on versions >= 26.2.0.cl where it is always enabled. Version: 10.4.0.cl or later + */ + 'enable_reasoning'?: boolean | null; + /** + * Enable save conversation. When `true`, the conversation is persisted and can be retrieved later via conversation history. Version: 26.5.0.cl or later + */ + 'enable_save_chat'?: boolean | null; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +declare class ConvertWorksheetToModelRequest { + /** + * List of Worksheet IDs. + */ + 'worksheet_ids'?: Array; + /** + * List of Worksheet IDs to be excluded. + */ + 'exclude_worksheet_ids'?: Array; + /** + * Indicates whether all the worksheet needs to be converted to models. + */ + 'convert_all'?: boolean | null; + /** + * Indicates whether the changes should be applied to database. + */ + 'apply_changes'?: boolean | null; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +declare class CopyObjectRequest { + /** + * Description of the new object + */ + 'description'?: string; + /** + * GUID of metadata object to be copied (answer id or liveboard id) + */ + 'identifier': string; + /** + * Type of metadata object + */ + 'type'?: CopyObjectRequestTypeEnum; + /** + * Title of the new object + */ + 'title'?: string; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} +type CopyObjectRequestTypeEnum = "LIVEBOARD" | "ANSWER"; + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +/** +* Conversation settings. +*/ +declare class CreateAgentConversationRequestConversationSettings { + /** + * Enable contextual change analysis. Default changed from `false` to `true` in 26.2.0.cl. Ignored on versions >= 26.2.0.cl where it is always enabled. Version: 10.4.0.cl or later + */ + 'enable_contextual_change_analysis'?: boolean | null; + /** + * Enable natural language to answer generation. Default changed from `false` to `true` in 26.2.0.cl. Ignored on versions >= 26.2.0.cl where it is always enabled. Version: 10.4.0.cl or later + */ + 'enable_natural_language_answer_generation'?: boolean | null; + /** + * Enable reasoning. Default changed from `false` to `true` in 26.2.0.cl. Ignored on versions >= 26.2.0.cl where it is always enabled. Version: 10.4.0.cl or later + */ + 'enable_reasoning'?: boolean | null; + /** + * Enable save conversation. When `true`, the conversation is persisted and can be retrieved later via conversation history. Version: 26.5.0.cl or later + */ + 'enable_save_chat'?: boolean | null; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +/** +* Context for the conversation. +*/ +declare class CreateAgentConversationRequestMetadataContext { + /** + * Type of the context. + */ + 'type'?: CreateAgentConversationRequestMetadataContextTypeEnum | null; + 'data_source_context'?: DataSourceContextInput; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} +type CreateAgentConversationRequestMetadataContextTypeEnum = "data_source" | "DATA_SOURCE" | "AUTO_MODE"; + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +declare class CreateAgentConversationRequest { + 'metadata_context': CreateAgentConversationRequestMetadataContext; + 'conversation_settings': CreateAgentConversationRequestConversationSettings; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +/** +* Table reference containing connection identifier and table details in this format: `{\"connection_identifier\":\"conn1\", \"database_name\":\"db1\", \"schema_name\":\"sc1\", \"table_name\":\"tb1\"}`. The given table will be created if `creation_method` is set as `FROM_INPUT_PARAMS`. +*/ +declare class CreateCalendarRequestTableReference { + /** + * Unique ID or name of the connection. + */ + 'connection_identifier': string; + /** + * Name of the database. + */ + 'database_name'?: string | null; + /** + * Name of the schema. + */ + 'schema_name'?: string | null; + /** + * Name of the table. Table names may be case-sensitive depending on the database system. + */ + 'table_name': string; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +declare class CreateCalendarRequest { + /** + * Name of the custom calendar. + */ + 'name': string; + /** + * Type of create operation. + */ + 'creation_method': CreateCalendarRequestCreationMethodEnum; + 'table_reference': CreateCalendarRequestTableReference; + /** + * Start date for the calendar in `MM/dd/yyyy` format. This parameter is mandatory if `creation_method` is set as `FROM_INPUT_PARAMS`. + */ + 'start_date'?: string; + /** + * End date for the calendar in `MM/dd/yyyy` format. This parameter is mandatory if `creation_method` is set as `FROM_INPUT_PARAMS`. + */ + 'end_date'?: string; + /** + * Type of the calendar. + */ + 'calendar_type'?: CreateCalendarRequestCalendarTypeEnum; + /** + * Specify the month in which the fiscal or custom calendar year should start. For example, if you set `month_offset` to \"April\", the custom calendar will treat \"April\" as the first month of the year, and the related attributes such as quarters and start date will be based on this offset. The default value is `January`, which represents the standard calendar year (January to December). + */ + 'month_offset'?: CreateCalendarRequestMonthOffsetEnum; + /** + * Specify the starting day of the week. + */ + 'start_day_of_week'?: CreateCalendarRequestStartDayOfWeekEnum; + /** + * Prefix to add before the quarter. + */ + 'quarter_name_prefix'?: string; + /** + * Prefix to add before the year. + */ + 'year_name_prefix'?: string; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} +type CreateCalendarRequestCreationMethodEnum = "FROM_INPUT_PARAMS" | "FROM_EXISTING_TABLE"; +type CreateCalendarRequestCalendarTypeEnum = "MONTH_OFFSET" | "FOUR_FOUR_FIVE" | "FOUR_FIVE_FOUR" | "FIVE_FOUR_FOUR"; +type CreateCalendarRequestMonthOffsetEnum = "January" | "February" | "March" | "April" | "May" | "June" | "July" | "August" | "September" | "October" | "November" | "December"; +type CreateCalendarRequestStartDayOfWeekEnum = "Sunday" | "Monday" | "Tuesday" | "Wednesday" | "Thursday" | "Friday" | "Saturday"; + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +declare class CreateCollectionRequest { + /** + * Name of the collection. + */ + 'name': string; + /** + * Description of the collection. + */ + 'description'?: string; + /** + * Metadata objects to add to the collection. + */ + 'metadata'?: Array; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +declare class CreateConfigRequest { + /** + * URL for connecting to remote repository + */ + 'repository_url': string; + /** + * Username to authenticate connection to remote repository + */ + 'username': string; + /** + * Access token corresponding to the user to authenticate connection to remote repository + */ + 'access_token': string; + /** + * Applicable when Orgs is enabled in the cluster List of Org ids or name. Provide value -1 for cluster level. Example : [\"OrgID1-or-Name1\", \"OrgID2-or-Name2\"] Note: If no value is specified, then the configurations will be returned for all orgs the user has access to Version: 9.5.0.cl or later + */ + 'org_identifier'?: string; + /** + * List the remote branches to configure. Example:[development, production] + */ + 'branch_names'?: Array; + /** + * Name of the remote branch where objects from this Thoughtspot instance will be versioned. Version: 9.7.0.cl or later + */ + 'commit_branch_name'?: string; + /** + * Maintain mapping of guid for the deployment to an instance Version: 9.4.0.cl or later + */ + 'enable_guid_mapping'?: boolean | null; + /** + * Name of the branch where the configuration files related to operations between Thoughtspot and version control repo should be maintained. Note: If no branch name is specified, then by default, ts_config_files branch is considered. Ensure this branch exists before configuration. Version: 9.7.0.cl or later + */ + 'configuration_branch_name'?: string; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +/** +* This attribute is only applicable to parameterized connections. Ensure that the policy is set to Processes to allow the configuration to be used exclusively for system processes. Version: 26.2.0.cl or later +*/ +declare class CreateConnectionConfigurationRequestPolicyProcessOptions { + 'impersonate_user'?: string | null; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +declare class CreateConnectionConfigurationRequest { + /** + * Unique name for the configuration. + */ + 'name': string; + /** + * Description of the configuration. + */ + 'description'?: string; + /** + * Unique ID or name of the connection. + */ + 'connection_identifier': string; + /** + * Specifies whether the connection configuration should inherit all properties and authentication type from its parent connection. This attribute is only applicable to parameterized connections. When set to true, the configuration uses only the connection properties and authentication type inherited from the parent. Version: 26.2.0.cl or later + */ + 'same_as_parent'?: boolean | null; + 'policy_process_options'?: CreateConnectionConfigurationRequestPolicyProcessOptions; + /** + * Type of authentication used for the connection. + */ + 'authentication_type'?: CreateConnectionConfigurationRequestAuthenticationTypeEnum; + /** + * Configuration properties in JSON. + */ + 'configuration': any; + /** + * Type of policy. + */ + 'policy_type'?: CreateConnectionConfigurationRequestPolicyTypeEnum; + /** + * Unique ID or name of the User and User Groups. + */ + 'policy_principals'?: Array; + /** + * Action that the query performed on the data warehouse, such as SAGE_INDEXING and ROW_COUNT_STATS. + */ + 'policy_processes'?: Array; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} +type CreateConnectionConfigurationRequestAuthenticationTypeEnum = "SERVICE_ACCOUNT" | "KEY_PAIR" | "PERSONAL_ACCESS_TOKEN" | "OAUTH_WITH_SERVICE_PRINCIPAL" | "OAUTH_CLIENT_CREDENTIALS"; +type CreateConnectionConfigurationRequestPolicyTypeEnum = "NO_POLICY" | "PRINCIPALS" | "PROCESSES"; +type CreateConnectionConfigurationRequestPolicyProcessesEnum = "SAGE_INDEXING" | "ROW_COUNT_STATS"; + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +declare class CreateConnectionRequest { + /** + * Unique name for the connection. + */ + 'name': string; + /** + * Description of the connection. + */ + 'description'?: string; + /** + * Type of the data warehouse. + */ + 'data_warehouse_type': CreateConnectionRequestDataWarehouseTypeEnum; + /** + * Connection configuration attributes in JSON format. To create a connection with tables, include table attributes. See the documentation above for sample JSON. + */ + 'data_warehouse_config': any; + /** + * Validates the connection metadata if tables are included. If you are creating a connection without tables, specify `false`. + */ + 'validate'?: boolean | null; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} +type CreateConnectionRequestDataWarehouseTypeEnum = "SNOWFLAKE" | "AMAZON_REDSHIFT" | "GOOGLE_BIGQUERY" | "AZURE_SYNAPSE" | "TERADATA" | "SAP_HANA" | "STARBURST" | "ORACLE_ADW" | "DATABRICKS" | "DENODO" | "DREMIO" | "TRINO" | "PRESTO" | "POSTGRES" | "SQLSERVER" | "MYSQL" | "GENERIC_JDBC" | "AMAZON_RDS_POSTGRESQL" | "AMAZON_AURORA_POSTGRESQL" | "AMAZON_RDS_MYSQL" | "AMAZON_AURORA_MYSQL" | "LOOKER" | "AMAZON_ATHENA" | "SINGLESTORE" | "GCP_SQLSERVER" | "GCP_ALLOYDB_POSTGRESQL" | "GCP_POSTGRESQL" | "GCP_MYSQL" | "MODE" | "GOOGLE_SHEETS" | "FALCON" | "FALCON_ONPREM" | "CLICKHOUSE" | "IOMETE"; + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +declare class CreateConnectionResponse { + /** + * ID of the connection created. + */ + 'id': string; + /** + * Name of the connection. + */ + 'name': string; + /** + * Type of data warehouse. + */ + 'data_warehouse_type': CreateConnectionResponseDataWarehouseTypeEnum; + /** + * Details of the connection. + */ + 'details'?: any | null; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} +type CreateConnectionResponseDataWarehouseTypeEnum = "SNOWFLAKE" | "AMAZON_REDSHIFT" | "GOOGLE_BIGQUERY" | "AZURE_SYNAPSE" | "TERADATA" | "SAP_HANA" | "STARBURST" | "ORACLE_ADW" | "DATABRICKS" | "DENODO" | "DREMIO" | "TRINO" | "PRESTO" | "POSTGRES" | "SQLSERVER" | "MYSQL" | "GENERIC_JDBC" | "AMAZON_RDS_POSTGRESQL" | "AMAZON_AURORA_POSTGRESQL" | "AMAZON_RDS_MYSQL" | "AMAZON_AURORA_MYSQL" | "LOOKER" | "AMAZON_ATHENA" | "SINGLESTORE" | "GCP_SQLSERVER" | "GCP_ALLOYDB_POSTGRESQL" | "GCP_POSTGRESQL" | "GCP_MYSQL" | "MODE" | "GOOGLE_SHEETS" | "FALCON" | "FALCON_ONPREM" | "CLICKHOUSE" | "IOMETE"; + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +declare class CreateConversationRequest { + /** + * ID of the metadata object, such as a Worksheet or Model, to use as a data source for the conversation. + */ + 'metadata_identifier': string; + /** + * Token string to set the context for the conversation. For example,`[sales],[item type],[state]`. + */ + 'tokens'?: string; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +/** +* Action details includes `Type` and Configuration data for Custom Actions, either Callback or URL is required. +*/ +declare class CreateCustomActionRequestActionDetails { + 'CALLBACK'?: CALLBACKInputMandatory; + 'URL'?: URLInputMandatory; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +/** +* Default Custom action configuration. This includes if the custom action is available on all visualizations. By default, a custom action is added to all visualizations and Answers. +*/ +declare class CreateCustomActionRequestDefaultActionConfig { + /** + * Custom action is available on all visualizations. Earlier naming convention: LOCAL/GLOBAL. TRUE signifies GLOBAL for backward compatibility. Default: true + */ + 'visibility'?: boolean | null; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +declare class CreateCustomActionRequest { + /** + * Name of the custom action. The custom action name must be unique. + */ + 'name': string; + 'action_details': CreateCustomActionRequestActionDetails; + /** + * Metadata objects to which the custom action needs to be associated. + */ + 'associate_metadata'?: Array; + 'default_action_config'?: CreateCustomActionRequestDefaultActionConfig; + /** + * Unique ID or name of the groups that can view and access the custom action. + */ + 'group_identifiers'?: Array; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +/** +* Email customization configuration as key value pair +*/ +declare class CreateEmailCustomizationRequestTemplateProperties { + /** + * Background color for call-to-action button in hex format + */ + 'cta_button_bg_color'?: string | null; + /** + * Text color for call-to-action button in hex format + */ + 'cta_text_font_color'?: string | null; + /** + * Primary background color in hex format + */ + 'primary_bg_color'?: string | null; + /** + * Home page URL (HTTP/HTTPS only) + */ + 'home_url'?: string | null; + /** + * Logo image URL (HTTP/HTTPS only) + */ + 'logo_url'?: string | null; + /** + * Font family for email content (e.g., Arial, sans-serif) + */ + 'font_family'?: string | null; + /** + * Product name to display + */ + 'product_name'?: string | null; + /** + * Footer address text + */ + 'footer_address'?: string | null; + /** + * Footer phone number + */ + 'footer_phone'?: string | null; + /** + * Replacement value for Liveboard + */ + 'replacement_value_for_liveboard'?: string | null; + /** + * Replacement value for Answer + */ + 'replacement_value_for_answer'?: string | null; + /** + * Replacement value for SpotIQ + */ + 'replacement_value_for_spot_iq'?: string | null; + /** + * Whether to hide footer address + */ + 'hide_footer_address'?: boolean | null; + /** + * Whether to hide footer phone number + */ + 'hide_footer_phone'?: boolean | null; + /** + * Whether to hide manage notification link + */ + 'hide_manage_notification'?: boolean | null; + /** + * Whether to hide mobile app nudge + */ + 'hide_mobile_app_nudge'?: boolean | null; + /** + * Whether to hide privacy policy link + */ + 'hide_privacy_policy'?: boolean | null; + /** + * Whether to hide product name + */ + 'hide_product_name'?: boolean | null; + /** + * Whether to hide ThoughtSpot vocabulary definitions + */ + 'hide_ts_vocabulary_definitions'?: boolean | null; + /** + * Whether to hide notification status + */ + 'hide_notification_status'?: boolean | null; + /** + * Whether to hide error message + */ + 'hide_error_message'?: boolean | null; + /** + * Whether to hide unsubscribe link + */ + 'hide_unsubscribe_link'?: boolean | null; + /** + * Whether to hide modify alert + */ + 'hide_modify_alert'?: boolean | null; + /** + * Company privacy policy URL (HTTP/HTTPS only) + */ + 'company_privacy_policy_url'?: string | null; + /** + * Company website URL (HTTP/HTTPS only) + */ + 'company_website_url'?: string | null; + /** + * Contact support url (HTTP/HTTPS only). Version: 26.2.0.cl or later + */ + 'contact_support_url'?: string | null; + /** + * Whether to hide contact support url. Version: 26.2.0.cl or later + */ + 'hide_contact_support_url'?: boolean | null; + /** + * Whether to hide logo Version: 26.4.0.cl or later + */ + 'hide_logo_url'?: boolean | null; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +declare class CreateEmailCustomizationRequest { + 'template_properties': CreateEmailCustomizationRequestTemplateProperties; + /** + * Unique ID or name of org Version: 10.12.0.cl or later + */ + 'org_identifier'?: string; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +declare class OrgType { + 'name'?: string | null; + 'id'?: number | null; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +declare class CreateEmailCustomizationResponse { + /** + * Tenant ID + */ + 'tenant_id': string; + 'org': OrgType; + /** + * Email customization name. + */ + 'name': string; + /** + * Customization configuration for the email + */ + 'template_properties': any; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +declare class CreateOrgRequest { + /** + * Name of the Org. + */ + 'name': string; + /** + * Description of the Org. + */ + 'description'?: string; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +declare class CreateRoleRequest { + /** + * Unique name of the Role. + */ + 'name': string; + /** + * Description of the Role. + */ + 'description'?: string; + /** + * Privileges granted to the Role. See [Documentation](https://developers.thoughtspot.com/docs/rbac#_role_categories_and_privileges)for supported roles privileges. + */ + 'privileges'?: Array; + /** + *
Version: 10.5.0.cl or later
Indicates whether the role is read only. A readonly role can neither be updated nor deleted. + */ + 'read_only'?: boolean | null; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} +type CreateRoleRequestPrivilegesEnum = "USERDATAUPLOADING" | "DATADOWNLOADING" | "DATAMANAGEMENT" | "SHAREWITHALL" | "JOBSCHEDULING" | "A3ANALYSIS" | "BYPASSRLS" | "DISABLE_PINBOARD_CREATION" | "DEVELOPER" | "APPLICATION_ADMINISTRATION" | "USER_ADMINISTRATION" | "GROUP_ADMINISTRATION" | "SYSTEM_INFO_ADMINISTRATION" | "SYNCMANAGEMENT" | "ORG_ADMINISTRATION" | "ROLE_ADMINISTRATION" | "AUTHENTICATION_ADMINISTRATION" | "BILLING_INFO_ADMINISTRATION" | "CONTROL_TRUSTED_AUTH" | "TAGMANAGEMENT" | "LIVEBOARD_VERIFIER" | "CAN_MANAGE_CUSTOM_CALENDAR" | "CAN_CREATE_OR_EDIT_CONNECTIONS" | "CAN_MANAGE_WORKSHEET_VIEWS_TABLES" | "CAN_MANAGE_VERSION_CONTROL" | "THIRDPARTY_ANALYSIS" | "CAN_CREATE_CATALOG" | "ALLOW_NON_EMBED_FULL_APP_ACCESS" | "CAN_ACCESS_ANALYST_STUDIO" | "CAN_MANAGE_ANALYST_STUDIO" | "PREVIEW_DOCUMENT_SEARCH" | "CAN_MANAGE_VARIABLES" | "CAN_MODIFY_FOLDERS" | "CAN_VIEW_FOLDERS" | "CAN_MANAGE_AGENTSPOT" | "CAN_ACCESS_AGENTSPOT" | "CAN_SETUP_VERSION_CONTROL" | "PREVIEW_THOUGHTSPOT_SAGE" | "CAN_MANAGE_WEBHOOKS" | "CAN_DOWNLOAD_VISUALS" | "CAN_DOWNLOAD_DETAILED_DATA" | "CAN_USE_SPOTTER"; + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +/** +* Schedule selected cron expression. +*/ +declare class CronExpressionInput { + /** + * Day of month of the object. + */ + 'day_of_month': string; + /** + * Day of Week of the object. + */ + 'day_of_week': string; + /** + * Hour of the object. + */ + 'hour': string; + /** + * Minute of the object. + */ + 'minute': string; + /** + * Month of the object. + */ + 'month': string; + /** + * Second of the object. + */ + 'second': string; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +/** +* Frequency settings for the scheduled job. +*/ +declare class CreateScheduleRequestFrequency { + 'cron_expression': CronExpressionInput; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +/** +* Options to specify details of Liveboard. +*/ +declare class CreateScheduleRequestLiveboardOptions { + /** + * Unique ID or name of visualizations. + */ + 'visualization_identifiers': Array; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +/** +* PDF layout and orientation settings. Applicable only if the `file_format` is specified as `PDF`. +*/ +declare class CreateScheduleRequestPdfOptions { + /** + * Indicates whether to include complete Liveboard. + */ + 'complete_liveboard'?: boolean | null; + /** + * Indicates whether to include cover page with the Liveboard title. + */ + 'include_cover_page'?: boolean | null; + /** + * Indicates whether to include customized wide logo in the footer if available. + */ + 'include_custom_logo'?: boolean | null; + /** + * Indicates whether to include a page with all applied filters. + */ + 'include_filter_page'?: boolean | null; + /** + * Indicates whether to include page number in the footer of each page + */ + 'include_page_number'?: boolean | null; + /** + * Text to include in the footer of each page. + */ + 'page_footer_text'?: string | null; + /** + * Page orientation of the PDF. + */ + 'page_orientation'?: string | null; + /** + * Page size. + */ + 'page_size'?: CreateScheduleRequestPdfOptionsPageSizeEnum | null; + /** + * Indicates whether to include only first page of the tables. + */ + 'truncate_table'?: boolean | null; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} +type CreateScheduleRequestPdfOptionsPageSizeEnum = "A4" | "TAB_BASED"; + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +declare class PrincipalsListItemInput { + /** + * Unique ID or name of the user or group. + */ + 'identifier': string; + /** + * Principal type. + */ + 'type': string; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +/** +* Recipients of the scheduled job notifications. Add the GUID or name of the ThoughtSpot users or groups as recipients in the `principals` array. If a recipient is not a ThoughtSpot user, specify email address. +*/ +declare class CreateScheduleRequestRecipientDetails { + /** + * Emails of the recipients. + */ + 'emails'?: Array | null; + /** + * User or groups to be set as recipients of the schedule notifications. + */ + 'principals'?: Array | null; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +declare class CreateScheduleRequest { + /** + * Name of the scheduled job. + */ + 'name': string; + /** + * Description of the job. + */ + 'description': string; + /** + * Type of the metadata object. + */ + 'metadata_type': CreateScheduleRequestMetadataTypeEnum; + /** + * Unique ID or name of the metadata object. + */ + 'metadata_identifier': string; + /** + * Export file format. + */ + 'file_format'?: CreateScheduleRequestFileFormatEnum; + 'liveboard_options'?: CreateScheduleRequestLiveboardOptions; + 'pdf_options'?: CreateScheduleRequestPdfOptions; + /** + * Time zone + */ + 'time_zone': CreateScheduleRequestTimeZoneEnum; + 'frequency'?: CreateScheduleRequestFrequency; + 'recipient_details': CreateScheduleRequestRecipientDetails; + /** + * Personalised view id of the liveboard to be scheduled. + */ + 'personalised_view_id'?: string; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} +type CreateScheduleRequestMetadataTypeEnum = "LIVEBOARD"; +type CreateScheduleRequestFileFormatEnum = "CSV" | "PDF" | "XLSX"; +type CreateScheduleRequestTimeZoneEnum = "Africa/Abidjan" | "Africa/Accra" | "Africa/Addis_Ababa" | "Africa/Algiers" | "Africa/Asmara" | "Africa/Asmera" | "Africa/Bamako" | "Africa/Bangui" | "Africa/Banjul" | "Africa/Bissau" | "Africa/Blantyre" | "Africa/Brazzaville" | "Africa/Bujumbura" | "Africa/Cairo" | "Africa/Casablanca" | "Africa/Ceuta" | "Africa/Conakry" | "Africa/Dakar" | "Africa/Dar_es_Salaam" | "Africa/Djibouti" | "Africa/Douala" | "Africa/El_Aaiun" | "Africa/Freetown" | "Africa/Gaborone" | "Africa/Harare" | "Africa/Johannesburg" | "Africa/Juba" | "Africa/Kampala" | "Africa/Khartoum" | "Africa/Kigali" | "Africa/Kinshasa" | "Africa/Lagos" | "Africa/Libreville" | "Africa/Lome" | "Africa/Luanda" | "Africa/Lubumbashi" | "Africa/Lusaka" | "Africa/Malabo" | "Africa/Maputo" | "Africa/Maseru" | "Africa/Mbabane" | "Africa/Mogadishu" | "Africa/Monrovia" | "Africa/Nairobi" | "Africa/Ndjamena" | "Africa/Niamey" | "Africa/Nouakchott" | "Africa/Ouagadougou" | "Africa/Porto-Novo" | "Africa/Sao_Tome" | "Africa/Timbuktu" | "Africa/Tripoli" | "Africa/Tunis" | "Africa/Windhoek" | "America/Adak" | "America/Anchorage" | "America/Anguilla" | "America/Antigua" | "America/Araguaina" | "America/Argentina/Buenos_Aires" | "America/Argentina/Catamarca" | "America/Argentina/ComodRivadavia" | "America/Argentina/Cordoba" | "America/Argentina/Jujuy" | "America/Argentina/La_Rioja" | "America/Argentina/Mendoza" | "America/Argentina/Rio_Gallegos" | "America/Argentina/Salta" | "America/Argentina/San_Juan" | "America/Argentina/San_Luis" | "America/Argentina/Tucuman" | "America/Argentina/Ushuaia" | "America/Aruba" | "America/Asuncion" | "America/Atikokan" | "America/Atka" | "America/Bahia" | "America/Bahia_Banderas" | "America/Barbados" | "America/Belem" | "America/Belize" | "America/Blanc-Sablon" | "America/Boa_Vista" | "America/Bogota" | "America/Boise" | "America/Buenos_Aires" | "America/Cambridge_Bay" | "America/Campo_Grande" | "America/Cancun" | "America/Caracas" | "America/Catamarca" | "America/Cayenne" | "America/Cayman" | "America/Chicago" | "America/Chihuahua" | "America/Coral_Harbour" | "America/Cordoba" | "America/Costa_Rica" | "America/Creston" | "America/Cuiaba" | "America/Curacao" | "America/Danmarkshavn" | "America/Dawson" | "America/Dawson_Creek" | "America/Denver" | "America/Detroit" | "America/Dominica" | "America/Edmonton" | "America/Eirunepe" | "America/El_Salvador" | "America/Ensenada" | "America/Fort_Nelson" | "America/Fort_Wayne" | "America/Fortaleza" | "America/Glace_Bay" | "America/Godthab" | "America/Goose_Bay" | "America/Grand_Turk" | "America/Grenada" | "America/Guadeloupe" | "America/Guatemala" | "America/Guayaquil" | "America/Guyana" | "America/Halifax" | "America/Havana" | "America/Hermosillo" | "America/Indiana/Indianapolis" | "America/Indiana/Knox" | "America/Indiana/Marengo" | "America/Indiana/Petersburg" | "America/Indiana/Tell_City" | "America/Indiana/Vevay" | "America/Indiana/Vincennes" | "America/Indiana/Winamac" | "America/Indianapolis" | "America/Inuvik" | "America/Iqaluit" | "America/Jamaica" | "America/Jujuy" | "America/Juneau" | "America/Kentucky/Louisville" | "America/Kentucky/Monticello" | "America/Knox_IN" | "America/Kralendijk" | "America/La_Paz" | "America/Lima" | "America/Los_Angeles" | "America/Louisville" | "America/Lower_Princes" | "America/Maceio" | "America/Managua" | "America/Manaus" | "America/Marigot" | "America/Martinique" | "America/Matamoros" | "America/Mazatlan" | "America/Mendoza" | "America/Menominee" | "America/Merida" | "America/Metlakatla" | "America/Mexico_City" | "America/Miquelon" | "America/Moncton" | "America/Monterrey" | "America/Montevideo" | "America/Montreal" | "America/Montserrat" | "America/Nassau" | "America/New_York" | "America/Nipigon" | "America/Nome" | "America/Noronha" | "America/North_Dakota/Beulah" | "America/North_Dakota/Center" | "America/North_Dakota/New_Salem" | "America/Nuuk" | "America/Ojinaga" | "America/Panama" | "America/Pangnirtung" | "America/Paramaribo" | "America/Phoenix" | "America/Port-au-Prince" | "America/Port_of_Spain" | "America/Porto_Acre" | "America/Porto_Velho" | "America/Puerto_Rico" | "America/Punta_Arenas" | "America/Rainy_River" | "America/Rankin_Inlet" | "America/Recife" | "America/Regina" | "America/Resolute" | "America/Rio_Branco" | "America/Rosario" | "America/Santa_Isabel" | "America/Santarem" | "America/Santiago" | "America/Santo_Domingo" | "America/Sao_Paulo" | "America/Scoresbysund" | "America/Shiprock" | "America/Sitka" | "America/St_Barthelemy" | "America/St_Johns" | "America/St_Kitts" | "America/St_Lucia" | "America/St_Thomas" | "America/St_Vincent" | "America/Swift_Current" | "America/Tegucigalpa" | "America/Thule" | "America/Thunder_Bay" | "America/Tijuana" | "America/Toronto" | "America/Tortola" | "America/Vancouver" | "America/Virgin" | "America/Whitehorse" | "America/Winnipeg" | "America/Yakutat" | "America/Yellowknife" | "Antarctica/Casey" | "Antarctica/Davis" | "Antarctica/DumontDUrville" | "Antarctica/Macquarie" | "Antarctica/Mawson" | "Antarctica/McMurdo" | "Antarctica/Palmer" | "Antarctica/Rothera" | "Antarctica/South_Pole" | "Antarctica/Syowa" | "Antarctica/Troll" | "Antarctica/Vostok" | "Arctic/Longyearbyen" | "Asia/Aden" | "Asia/Almaty" | "Asia/Amman" | "Asia/Anadyr" | "Asia/Aqtau" | "Asia/Aqtobe" | "Asia/Ashgabat" | "Asia/Ashkhabad" | "Asia/Atyrau" | "Asia/Baghdad" | "Asia/Bahrain" | "Asia/Baku" | "Asia/Bangkok" | "Asia/Barnaul" | "Asia/Beirut" | "Asia/Bishkek" | "Asia/Brunei" | "Asia/Calcutta" | "Asia/Chita" | "Asia/Choibalsan" | "Asia/Chongqing" | "Asia/Chungking" | "Asia/Colombo" | "Asia/Dacca" | "Asia/Damascus" | "Asia/Dhaka" | "Asia/Dili" | "Asia/Dubai" | "Asia/Dushanbe" | "Asia/Famagusta" | "Asia/Gaza" | "Asia/Harbin" | "Asia/Hebron" | "Asia/Ho_Chi_Minh" | "Asia/Hong_Kong" | "Asia/Hovd" | "Asia/Irkutsk" | "Asia/Istanbul" | "Asia/Jakarta" | "Asia/Jayapura" | "Asia/Jerusalem" | "Asia/Kabul" | "Asia/Kamchatka" | "Asia/Karachi" | "Asia/Kashgar" | "Asia/Kathmandu" | "Asia/Katmandu" | "Asia/Khandyga" | "Asia/Kolkata" | "Asia/Krasnoyarsk" | "Asia/Kuala_Lumpur" | "Asia/Kuching" | "Asia/Kuwait" | "Asia/Macao" | "Asia/Macau" | "Asia/Magadan" | "Asia/Makassar" | "Asia/Manila" | "Asia/Muscat" | "Asia/Nicosia" | "Asia/Novokuznetsk" | "Asia/Novosibirsk" | "Asia/Omsk" | "Asia/Oral" | "Asia/Phnom_Penh" | "Asia/Pontianak" | "Asia/Pyongyang" | "Asia/Qatar" | "Asia/Qostanay" | "Asia/Qyzylorda" | "Asia/Rangoon" | "Asia/Riyadh" | "Asia/Saigon" | "Asia/Sakhalin" | "Asia/Samarkand" | "Asia/Seoul" | "Asia/Shanghai" | "Asia/Singapore" | "Asia/Srednekolymsk" | "Asia/Taipei" | "Asia/Tashkent" | "Asia/Tbilisi" | "Asia/Tehran" | "Asia/Tel_Aviv" | "Asia/Thimbu" | "Asia/Thimphu" | "Asia/Tokyo" | "Asia/Tomsk" | "Asia/Ujung_Pandang" | "Asia/Ulaanbaatar" | "Asia/Ulan_Bator" | "Asia/Urumqi" | "Asia/Ust-Nera" | "Asia/Vientiane" | "Asia/Vladivostok" | "Asia/Yakutsk" | "Asia/Yangon" | "Asia/Yekaterinburg" | "Asia/Yerevan" | "Atlantic/Azores" | "Atlantic/Bermuda" | "Atlantic/Canary" | "Atlantic/Cape_Verde" | "Atlantic/Faeroe" | "Atlantic/Faroe" | "Atlantic/Jan_Mayen" | "Atlantic/Madeira" | "Atlantic/Reykjavik" | "Atlantic/South_Georgia" | "Atlantic/St_Helena" | "Atlantic/Stanley" | "Australia/ACT" | "Australia/Adelaide" | "Australia/Brisbane" | "Australia/Broken_Hill" | "Australia/Canberra" | "Australia/Currie" | "Australia/Darwin" | "Australia/Eucla" | "Australia/Hobart" | "Australia/LHI" | "Australia/Lindeman" | "Australia/Lord_Howe" | "Australia/Melbourne" | "Australia/NSW" | "Australia/North" | "Australia/Perth" | "Australia/Queensland" | "Australia/South" | "Australia/Sydney" | "Australia/Tasmania" | "Australia/Victoria" | "Australia/West" | "Australia/Yancowinna" | "Brazil/Acre" | "Brazil/DeNoronha" | "Brazil/East" | "Brazil/West" | "CET" | "CST6CDT" | "Canada/Atlantic" | "Canada/Central" | "Canada/Eastern" | "Canada/Mountain" | "Canada/Newfoundland" | "Canada/Pacific" | "Canada/Saskatchewan" | "Canada/Yukon" | "Chile/Continental" | "Chile/EasterIsland" | "Cuba" | "EET" | "EST5EDT" | "Egypt" | "Eire" | "Etc/GMT" | "Etc/GMT+0" | "Etc/GMT+1" | "Etc/GMT+10" | "Etc/GMT+11" | "Etc/GMT+12" | "Etc/GMT+2" | "Etc/GMT+3" | "Etc/GMT+4" | "Etc/GMT+5" | "Etc/GMT+6" | "Etc/GMT+7" | "Etc/GMT+8" | "Etc/GMT+9" | "Etc/GMT-0" | "Etc/GMT-1" | "Etc/GMT-10" | "Etc/GMT-11" | "Etc/GMT-12" | "Etc/GMT-13" | "Etc/GMT-14" | "Etc/GMT-2" | "Etc/GMT-3" | "Etc/GMT-4" | "Etc/GMT-5" | "Etc/GMT-6" | "Etc/GMT-7" | "Etc/GMT-8" | "Etc/GMT-9" | "Etc/GMT0" | "Etc/Greenwich" | "Etc/UCT" | "Etc/UTC" | "Etc/Universal" | "Etc/Zulu" | "Europe/Amsterdam" | "Europe/Andorra" | "Europe/Astrakhan" | "Europe/Athens" | "Europe/Belfast" | "Europe/Belgrade" | "Europe/Berlin" | "Europe/Bratislava" | "Europe/Brussels" | "Europe/Bucharest" | "Europe/Budapest" | "Europe/Busingen" | "Europe/Chisinau" | "Europe/Copenhagen" | "Europe/Dublin" | "Europe/Gibraltar" | "Europe/Guernsey" | "Europe/Helsinki" | "Europe/Isle_of_Man" | "Europe/Istanbul" | "Europe/Jersey" | "Europe/Kaliningrad" | "Europe/Kiev" | "Europe/Kirov" | "Europe/Kyiv" | "Europe/Lisbon" | "Europe/Ljubljana" | "Europe/London" | "Europe/Luxembourg" | "Europe/Madrid" | "Europe/Malta" | "Europe/Mariehamn" | "Europe/Minsk" | "Europe/Monaco" | "Europe/Moscow" | "Europe/Nicosia" | "Europe/Oslo" | "Europe/Paris" | "Europe/Podgorica" | "Europe/Prague" | "Europe/Riga" | "Europe/Rome" | "Europe/Samara" | "Europe/San_Marino" | "Europe/Sarajevo" | "Europe/Saratov" | "Europe/Simferopol" | "Europe/Skopje" | "Europe/Sofia" | "Europe/Stockholm" | "Europe/Tallinn" | "Europe/Tirane" | "Europe/Tiraspol" | "Europe/Ulyanovsk" | "Europe/Uzhgorod" | "Europe/Vaduz" | "Europe/Vatican" | "Europe/Vienna" | "Europe/Vilnius" | "Europe/Volgograd" | "Europe/Warsaw" | "Europe/Zagreb" | "Europe/Zaporozhye" | "Europe/Zurich" | "GB" | "GB-Eire" | "GMT" | "GMT0" | "Greenwich" | "Hongkong" | "Iceland" | "Indian/Antananarivo" | "Indian/Chagos" | "Indian/Christmas" | "Indian/Cocos" | "Indian/Comoro" | "Indian/Kerguelen" | "Indian/Mahe" | "Indian/Maldives" | "Indian/Mauritius" | "Indian/Mayotte" | "Indian/Reunion" | "Iran" | "Israel" | "Jamaica" | "Japan" | "Kwajalein" | "Libya" | "MET" | "MST7MDT" | "Mexico/BajaNorte" | "Mexico/BajaSur" | "Mexico/General" | "NZ" | "NZ-CHAT" | "Navajo" | "PRC" | "PST8PDT" | "Pacific/Apia" | "Pacific/Auckland" | "Pacific/Bougainville" | "Pacific/Chatham" | "Pacific/Chuuk" | "Pacific/Easter" | "Pacific/Efate" | "Pacific/Enderbury" | "Pacific/Fakaofo" | "Pacific/Fiji" | "Pacific/Funafuti" | "Pacific/Galapagos" | "Pacific/Gambier" | "Pacific/Guadalcanal" | "Pacific/Guam" | "Pacific/Honolulu" | "Pacific/Johnston" | "Pacific/Kanton" | "Pacific/Kiritimati" | "Pacific/Kosrae" | "Pacific/Kwajalein" | "Pacific/Majuro" | "Pacific/Marquesas" | "Pacific/Midway" | "Pacific/Nauru" | "Pacific/Niue" | "Pacific/Norfolk" | "Pacific/Noumea" | "Pacific/Pago_Pago" | "Pacific/Palau" | "Pacific/Pitcairn" | "Pacific/Pohnpei" | "Pacific/Ponape" | "Pacific/Port_Moresby" | "Pacific/Rarotonga" | "Pacific/Saipan" | "Pacific/Samoa" | "Pacific/Tahiti" | "Pacific/Tarawa" | "Pacific/Tongatapu" | "Pacific/Truk" | "Pacific/Wake" | "Pacific/Wallis" | "Pacific/Yap" | "Poland" | "Portugal" | "ROK" | "Singapore" | "SystemV/AST4" | "SystemV/AST4ADT" | "SystemV/CST6" | "SystemV/CST6CDT" | "SystemV/EST5" | "SystemV/EST5EDT" | "SystemV/HST10" | "SystemV/MST7" | "SystemV/MST7MDT" | "SystemV/PST8" | "SystemV/PST8PDT" | "SystemV/YST9" | "SystemV/YST9YDT" | "Turkey" | "UCT" | "US/Alaska" | "US/Aleutian" | "US/Arizona" | "US/Central" | "US/East-Indiana" | "US/Eastern" | "US/Hawaii" | "US/Indiana-Starke" | "US/Michigan" | "US/Mountain" | "US/Pacific" | "US/Samoa" | "UTC" | "Universal" | "W-SU" | "WET" | "Zulu" | "EST" | "HST" | "MST" | "ACT" | "AET" | "AGT" | "ART" | "AST" | "BET" | "BST" | "CAT" | "CNT" | "CST" | "CTT" | "EAT" | "ECT" | "IET" | "IST" | "JST" | "MIT" | "NET" | "NST" | "PLT" | "PNT" | "PRT" | "PST" | "SST" | "VST"; + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +declare class CreateTagRequest { + /** + * Name of the tag. + */ + 'name': string; + /** + * Hex color code to be assigned to the tag. For example, #ff78a9. + */ + 'color'?: string; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +declare class CreateUserGroupRequest { + /** + * Name of the group. The group name must be unique. + */ + 'name': string; + /** + * Display name for the group. + */ + 'display_name': string; + /** + * GUID of the Liveboards to assign as default Liveboards to the users in the group. + */ + 'default_liveboard_identifiers'?: Array; + /** + * Description of the group + */ + 'description'?: string; + /** + * Privileges to assign to the group + */ + 'privileges'?: Array; + /** + * GUID or name of the sub groups. A subgroup is a group assigned to a parent group. + */ + 'sub_group_identifiers'?: Array; + /** + * Group type. + */ + 'type'?: CreateUserGroupRequestTypeEnum; + /** + * GUID or name of the users to assign to the group. + */ + 'user_identifiers'?: Array; + /** + * Visibility of the group. To make a group visible to other users and groups, set the visibility to SHAREABLE. + */ + 'visibility'?: CreateUserGroupRequestVisibilityEnum; + /** + * Role identifiers of the roles that should be assigned to the group. + */ + 'role_identifiers'?: Array; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} +type CreateUserGroupRequestPrivilegesEnum = "ADMINISTRATION" | "AUTHORING" | "USERDATAUPLOADING" | "DATADOWNLOADING" | "USERMANAGEMENT" | "DATAMANAGEMENT" | "SHAREWITHALL" | "JOBSCHEDULING" | "A3ANALYSIS" | "EXPERIMENTALFEATUREPRIVILEGE" | "BYPASSRLS" | "RANALYSIS" | "DEVELOPER" | "USER_ADMINISTRATION" | "GROUP_ADMINISTRATION" | "SYNCMANAGEMENT" | "CAN_CREATE_CATALOG" | "DISABLE_PINBOARD_CREATION" | "LIVEBOARD_VERIFIER" | "PREVIEW_THOUGHTSPOT_SAGE" | "CAN_MANAGE_VERSION_CONTROL" | "THIRDPARTY_ANALYSIS" | "ALLOW_NON_EMBED_FULL_APP_ACCESS" | "CAN_ACCESS_ANALYST_STUDIO" | "CAN_MANAGE_ANALYST_STUDIO" | "CAN_MODIFY_FOLDERS" | "CAN_MANAGE_VARIABLES" | "CAN_VIEW_FOLDERS" | "CAN_MANAGE_AGENTSPOT" | "CAN_ACCESS_AGENTSPOT" | "PREVIEW_DOCUMENT_SEARCH" | "CAN_SETUP_VERSION_CONTROL" | "CAN_DOWNLOAD_VISUALS" | "CAN_DOWNLOAD_DETAILED_DATA" | "CAN_USE_SPOTTER"; +type CreateUserGroupRequestTypeEnum = "LOCAL_GROUP" | "LDAP_GROUP" | "TEAM_GROUP" | "TENANT_GROUP"; +type CreateUserGroupRequestVisibilityEnum = "SHARABLE" | "NON_SHARABLE"; + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +declare class FavoriteMetadataInput { + /** + * Unique ID or name of the metadata object. + */ + 'identifier'?: string | null; + /** + * Type of metadata object. Required if the name of the object is set as the identifier. This attribute is optional when the object GUID is specified as the identifier. + */ + 'type'?: FavoriteMetadataInputTypeEnum | null; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} +type FavoriteMetadataInputTypeEnum = "LIVEBOARD" | "ANSWER"; + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +declare class CreateUserRequest { + /** + * Name of the user. The username string must be unique. + */ + 'name': string; + /** + * A unique display name string for the user account, usually their first and last name + */ + 'display_name': string; + /** + * Password for the user account. For IAMv2 users, you must set this password if you do not want to trigger an activation email. + */ + 'password'?: string; + /** + * Email of the user account + */ + 'email': string; + /** + * Type of the account. + */ + 'account_type'?: CreateUserRequestAccountTypeEnum; + /** + * Current status of the user account. The `SUSPENDED` user state indicates a transitional state applicable to IAMv2 users only. + */ + 'account_status'?: CreateUserRequestAccountStatusEnum; + /** + * List of Org IDs to which the user belongs. + */ + 'org_identifiers'?: Array; + /** + * GUIDs or names of the groups to which the newly created user belongs. + */ + 'group_identifiers'?: Array; + /** + * Visibility of the users. When set to SHARABLE, the user is visible to other users and groups when they try to share an object. + */ + 'visibility'?: CreateUserRequestVisibilityEnum; + /** + * User preference for receiving email notifications when another ThoughtSpot user shares a metadata object such as Answer, Liveboard, or Worksheet. + */ + 'notify_on_share'?: boolean | null; + /** + * The user preference for revisiting the onboarding experience. + */ + 'show_onboarding_experience'?: boolean | null; + /** + * flag to get the on-boarding experience is completed or not. + */ + 'onboarding_experience_completed'?: boolean | null; + /** + * GUID of the Liveboard to set a default Liveboard for the user. ThoughtSpot displays this Liveboard on the Home page when the user logs in. + */ + 'home_liveboard_identifier'?: string; + /** + * Metadata objects to add to the user\'s favorites list. + */ + 'favorite_metadata'?: Array; + /** + * Locale for the user. When setting this value, do not set use_browser_language to true, otherwise the browser\'s language setting will take precedence and the preferred_locale value will be ignored. + */ + 'preferred_locale'?: CreateUserRequestPreferredLocaleEnum; + /** + * Flag to indicate whether to use the browser locale for the user in the UI. When set to true, the preferred_locale value is unset and the browser\'s language setting takes precedence. Version: 26.3.0.cl or later + */ + 'use_browser_language'?: boolean | null; + /** + * Properties for the user + */ + 'extended_properties'?: any; + /** + * Preferences for the user + */ + 'extended_preferences'?: any; + /** + * Flag to indicate whether welcome email should be sent to user. This parameter is applied only on clusters on which IAM is disabled. + */ + 'trigger_welcome_email'?: boolean | null; + /** + * Flag to indicate whether activation email should be sent to the user. Default value for IAMv2 users is set to true. Users must either set this to false, or enter a valid password if they do not want to trigger an activation email. + */ + 'trigger_activation_email'?: boolean | null; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} +type CreateUserRequestAccountTypeEnum = "LOCAL_USER" | "LDAP_USER" | "SAML_USER" | "OIDC_USER" | "REMOTE_USER"; +type CreateUserRequestAccountStatusEnum = "ACTIVE" | "INACTIVE" | "EXPIRED" | "LOCKED" | "PENDING" | "SUSPENDED"; +type CreateUserRequestVisibilityEnum = "SHARABLE" | "NON_SHARABLE"; +type CreateUserRequestPreferredLocaleEnum = "en-CA" | "en-GB" | "en-US" | "de-DE" | "ja-JP" | "zh-CN" | "pt-BR" | "fr-FR" | "fr-CA" | "es-US" | "da-DK" | "es-ES" | "fi-FI" | "sv-SE" | "nb-NO" | "pt-PT" | "nl-NL" | "it-IT" | "ru-RU" | "en-IN" | "de-CH" | "en-NZ" | "es-MX" | "en-AU" | "zh-Hant" | "ko-KR" | "en-DE"; + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +declare class CreateVariableRequest { + /** + * Type of variable + */ + 'type': CreateVariableRequestTypeEnum; + /** + * Name of the variable. This is unique across the cluster. + */ + 'name': string; + /** + * If the variable contains sensitive values like passwords + */ + 'is_sensitive'?: boolean | null; + /** + * Variable Data Type, only for formula_variable type, leave empty for others Version: 10.15.0.cl or later + */ + 'data_type'?: CreateVariableRequestDataTypeEnum; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} +type CreateVariableRequestTypeEnum = "CONNECTION_PROPERTY" | "TABLE_MAPPING" | "CONNECTION_PROPERTY_PER_PRINCIPAL" | "FORMULA_VARIABLE"; +type CreateVariableRequestDataTypeEnum = "VARCHAR" | "INT32" | "INT64" | "DOUBLE" | "DATE" | "DATE_TIME"; + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +declare class WebhookAuthApiKeyInput { + /** + * The header or query parameter name for the API key. + */ + 'key': string; + /** + * The API key value. + */ + 'value': string; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +declare class WebhookAuthBasicAuthInput { + /** + * Username for basic authentication. + */ + 'username': string; + /** + * Password for basic authentication. + */ + 'password': string; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +declare class WebhookAuthOAuth2Input { + /** + * OAuth2 authorization server URL. + */ + 'authorization_url': string; + /** + * OAuth2 client identifier. + */ + 'client_id': string; + /** + * OAuth2 client secret key. + */ + 'client_secret': string; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +/** +* Authorization configuration for the webhook. +*/ +declare class CreateWebhookConfigurationRequestAuthentication { + 'API_KEY'?: WebhookAuthApiKeyInput; + 'BASIC_AUTH'?: WebhookAuthBasicAuthInput; + /** + * Bearer token authentication configuration. + */ + 'BEARER_TOKEN'?: string | null; + 'OAUTH2'?: WebhookAuthOAuth2Input; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +/** +* Configuration for webhook signature verification. +*/ +declare class CreateWebhookConfigurationRequestSignatureVerification { + /** + * Signature verification method type. + */ + 'type': CreateWebhookConfigurationRequestSignatureVerificationTypeEnum; + /** + * HTTP header where the signature is sent. + */ + 'header': string; + /** + * Hash algorithm used for signature verification. + */ + 'algorithm': CreateWebhookConfigurationRequestSignatureVerificationAlgorithmEnum; + /** + * Shared secret used for HMAC signature generation. + */ + 'secret': string; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} +type CreateWebhookConfigurationRequestSignatureVerificationTypeEnum = "HMAC_SHA256"; +type CreateWebhookConfigurationRequestSignatureVerificationAlgorithmEnum = "SHA256"; + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +/** +* Input type for storage configuration. +*/ +declare class StorageConfigInput { + 'aws_s3_config'?: AwsS3ConfigInput; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +/** +* Configuration for storage destination. Example: {\"storage_type\": \"AWS_S3\", \"storage_config\": {\"aws_s3_config\": {\"bucket_name\": \"my-webhook-files\", \"region\": \"us-west-2\", \"role_arn\": \"arn:aws:iam::123456789012:role/ThoughtSpotDeliveryRole\", \"external_id\": \"ts-webhook-a1b2c3d4-7890\", \"path_prefix\": \"thoughtspot-webhooks/\"}}} Version: 26.3.0.cl or later +*/ +declare class CreateWebhookConfigurationRequestStorageDestination { + /** + * Type of storage destination. Example: \"AWS_S3\" + */ + 'storage_type': CreateWebhookConfigurationRequestStorageDestinationStorageTypeEnum; + 'storage_config': StorageConfigInput; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} +type CreateWebhookConfigurationRequestStorageDestinationStorageTypeEnum = "AWS_S3"; + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +/** +* Key-value pair input for additional webhook headers. +*/ +declare class WebhookKeyValuePairInput { + /** + * Header name. + */ + 'key': string; + /** + * Header value. + */ + 'value': string; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +declare class CreateWebhookConfigurationRequest { + /** + * Name of the webhook configuration. + */ + 'name': string; + /** + * Description of the webhook configuration. + */ + 'description'?: string; + /** + * The webhook endpoint URL. + */ + 'url': string; + /** + * Additional URL parameters as key-value pairs. + */ + 'url_params'?: any; + /** + * List of events to subscribe to. + */ + 'events': Array; + 'authentication'?: CreateWebhookConfigurationRequestAuthentication; + 'signature_verification'?: CreateWebhookConfigurationRequestSignatureVerification; + 'storage_destination'?: CreateWebhookConfigurationRequestStorageDestination; + /** + * Additional headers as an array of key-value pairs. Example: [{\"key\": \"X-Custom-Header\", \"value\": \"custom_value\"}] Version: 26.4.0.cl or later + */ + 'additional_headers'?: Array; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} +type CreateWebhookConfigurationRequestEventsEnum = "LIVEBOARD_SCHEDULE"; + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +/** +* Schedule selected cron expression. +*/ +declare class CronExpression { + /** + * Day of month of the object. + */ + 'day_of_month': string; + /** + * Day of Week of the object. + */ + 'day_of_week': string; + /** + * Hour of the object. + */ + 'hour': string; + /** + * Minute of the object. + */ + 'minute': string; + /** + * Month of the object. + */ + 'month': string; + /** + * Second of the object. + */ + 'second': string; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +/** +* Script-src CSP settings. +*/ +declare class ScriptSrcUrls { + /** + * Whether script-src customization is enabled. + */ + 'enabled'?: boolean | null; + /** + * Allowed URLs for script-src directive. Can only be set if enabled is true. + */ + 'urls'?: Array | null; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +/** +* CSP (Content Security Policy) settings. +*/ +declare class CspSettings { + /** + * Allowed URLs for connect-src directive. + */ + 'connect_src_urls'?: Array | null; + /** + * Allowed URLs for font-src directive. + */ + 'font_src_urls'?: Array | null; + /** + * Allowed hosts for visual embed (frame-ancestors directive). + */ + 'visual_embed_hosts'?: Array | null; + /** + * Allowed URLs for frame-src directive. + */ + 'iframe_src_urls'?: Array | null; + /** + * Allowed URLs for img-src directive. + */ + 'img_src_urls'?: Array | null; + 'script_src_urls'?: ScriptSrcUrls; + /** + * Allowed URLs for style-src directive. + */ + 'style_src_urls'?: Array | null; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +/** +* MetadataType InputType used in Custom Action API\'s +*/ +declare class CustomActionMetadataTypeInput { + /** + * Type of metadata object. Required if the name of the object is set as the identifier. This attribute is optional when the object GUID is specified as the identifier. + */ + 'type'?: CustomActionMetadataTypeInputTypeEnum | null; + /** + * Unique ID or name of the metadata object. + */ + 'identifier': string; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} +type CustomActionMetadataTypeInputTypeEnum = "VISUALIZATION" | "ANSWER" | "WORKSHEET"; + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +declare class EntityHeader { + /** + * Description of the data source. + */ + 'description'?: string | null; + /** + * Display name of the data source. + */ + 'data_source_name'?: string | null; + /** + * Unique identifier of the data source. + */ + 'data_source_identifier'?: string | null; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +declare class DataSource { + /** + * Confidence score for the data source suggestion. + */ + 'confidence'?: number | null; + 'details'?: EntityHeader; + /** + * LLM reasoning for the data source. + */ + 'reasoning'?: string | null; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +declare class Table { + /** + * Name of the table. + */ + 'name': string; + /** + * Columns of the table. + */ + 'columns'?: Array | null; + /** + * Type of table. Either view or table + */ + 'type'?: string | null; + /** + * Description of the table + */ + 'description'?: string | null; + /** + * Determines if the table is selected + */ + 'selected'?: boolean | null; + /** + * Determines if the table is linked + */ + 'linked'?: boolean | null; + /** + * List of relationships for the table + */ + 'relationships'?: Array | null; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +declare class SchemaObject { + /** + * Name of the schema. + */ + 'name': string; + /** + * Tables in the schema. + */ + 'tables'?: Array
| null; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +declare class Database { + /** + * Name of the database. + */ + 'name': string; + /** + * Schemas of the database. + */ + 'schemas'?: Array | null; + /** + * Determines if the object is auto created. + */ + 'auto_created'?: boolean | null; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +declare class DataWarehouseObjects { + /** + * Databases of the connection. + */ + 'databases': Array; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +declare class DbtSearchResponse { + 'dbt_connection_identifier'?: string | null; + 'project_name'?: string | null; + 'connection_id'?: string | null; + 'connection_name'?: string | null; + 'cdw_database'?: string | null; + 'import_type'?: string | null; + 'author_name'?: string | null; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +declare class DeactivateUserRequest { + /** + * Unique ID or name of the user. + */ + 'user_identifier': string; + /** + * Base url of the cluster. + */ + 'base_url': string; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +/** +* Default Custom action configuration. This includes the custom action\'s visibility across all visualizations and Answers. By default, a custom action is added to all visualizations and Answers. +*/ +declare class DefaultActionConfig { + /** + * Custom action is available on all visualizations. Earlier , the naming convention: LOCAL/GLOBAL. TRUE signifies GLOBAL for backward compatibility. + */ + 'visibility'?: boolean | null; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +/** +* Default Custom action configuration. This includes the custom action\'s visibility across all visualizations and Answers. By default, a custom action is added to all visualizations and Answers. +*/ +declare class DefaultActionConfigInput { + /** + * Custom action is available on all visualizations. Earlier naming convention: LOCAL/GLOBAL. TRUE signifies GLOBAL for backward compatibility. + */ + 'visibility'?: boolean | null; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +/** +* Default Custom action configuration. This includes the custom action\'s visibility across all visualizations and Answers. By default, a custom action is added to all visualizations and Answers. +*/ +declare class DefaultActionConfigInputCreate { + /** + * Custom action is available on all visualizations. Earlier naming convention: LOCAL/GLOBAL. TRUE signifies GLOBAL for backward compatibility. Default: true + */ + 'visibility'?: boolean | null; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +/** +* Default Custom action configuration. This includes the custom action\'s visibility across all visualizations and Answers. By default, a custom action is added to all visualizations and Answers. +*/ +declare class DefaultActionConfigSearchInput { + /** + * Custom action is available on all visualizations. Earlier naming convention: LOCAL/GLOBAL. TRUE signifies GLOBAL for backward compatibility. + */ + 'visibility'?: boolean | null; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +declare class DeleteCollectionRequest { + /** + * Unique GUIDs of collections to delete. Note: Collection names cannot be used as identifiers since duplicate names are allowed. + */ + 'collection_identifiers': Array; + /** + * Flag to delete child objects of the collection that the user has access to. + */ + 'delete_children'?: boolean | null; + /** + * Preview deletion without actually deleting. When set to true, returns what would be deleted without performing the actual deletion. + */ + 'dry_run'?: boolean | null; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +declare class DeleteConfigRequest { + /** + * Applicable when Orgs is enabled in the cluster Indicator to consider cluster level or org level config. Set it to false to delete configuration from current org. If set to true, then the configuration at cluster level and orgs that inherited the configuration from cluster level will be deleted. Version: 9.5.0.cl or later + */ + 'cluster_level'?: boolean | null; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +declare class DeleteConnectionConfigurationRequest { + /** + * Unique ID or name of the configuration. + */ + 'configuration_identifier': string; + /** + * Unique ID or name of the connection. + */ + 'connection_identifier': string; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +declare class DeleteConnectionRequest { + /** + * Unique ID or name of the connection. + */ + 'connection_identifier': string; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +/** +* MetadataType InputType used in Delete MetadataType API +*/ +declare class DeleteMetadataTypeInput { + /** + * Type of metadata. Required if the name of the object is set as the identifier. This attribute is optional when the object GUID is specified as the identifier. + */ + 'type'?: DeleteMetadataTypeInputTypeEnum | null; + /** + * Unique ID or name of the metadata object. + */ + 'identifier': string; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} +type DeleteMetadataTypeInputTypeEnum = "LIVEBOARD" | "ANSWER" | "LOGICAL_TABLE" | "LOGICAL_COLUMN" | "LOGICAL_RELATIONSHIP"; + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +declare class DeleteMetadataRequest { + /** + * Metadata objects. + */ + 'metadata': Array; + /** + * Indicates whether to delete disabled metadata objects. + */ + 'delete_disabled_objects'?: boolean | null; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +declare class DeleteOrgEmailCustomizationRequest { + /** + * Unique identifier of the organization. + */ + 'org_identifiers'?: Array; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +declare class DeleteVariablesRequest { + /** + * Unique id(s) or name(s) of the variable(s) to delete + */ + 'identifiers': Array; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +declare class DeleteWebhookConfigurationsRequest { + /** + * List of webhook identifiers to delete. + */ + 'webhook_identifiers': Array; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +declare class DeployCommitRequest { + /** + * Commit_id against which the files should be picked to deploy. Note: If no commit_id is specified, then the head of the branch is considered. + */ + 'commit_id'?: string; + /** + * Name of the remote branch where changes should be picked + */ + 'branch_name': string; + /** + * Indicates if all files or only modified file at specified commit point should be considered + */ + 'deploy_type'?: DeployCommitRequestDeployTypeEnum; + /** + * Define the policy to follow while importing TML in the ThoughtSpot environment. Use “ALL_OR_NONE” to cancel the deployment of all ThoughtSpot objects if at least one of them fails to import. Use “Partial” to import ThoughtSpot objects that validate successfully even if other objects in the same deploy operations fail to import. + */ + 'deploy_policy'?: DeployCommitRequestDeployPolicyEnum; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} +type DeployCommitRequestDeployTypeEnum = "FULL" | "DELTA"; +type DeployCommitRequestDeployPolicyEnum = "ALL_OR_NONE" | "PARTIAL" | "VALIDATE_ONLY"; + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +declare class DeployResponse { + /** + * Name of the file deployed + */ + 'file_name'?: string | null; + /** + * Name of the metadata object + */ + 'metadata_name'?: string | null; + /** + * Type of the metadata object + */ + 'metadata_type'?: string | null; + /** + * Indicates the status of deployment for the file + */ + 'status_code'?: string | null; + /** + * Any error or warning with the deployment + */ + 'status_message'?: string | null; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +declare class ErrorResponse { + 'error'?: any | null; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +declare class EurekaDataSourceSuggestionResponse { + /** + * List of data sources suggested. + */ + 'data_sources'?: Array | null; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +declare class EurekaLLMSuggestedQuery { + /** + * NL query that can be run using spotter aka natural language search to get an AI generated answer. + */ + 'query'?: string | null; + /** + * Unique identifier of the worksheet on which this query can be run on. + */ + 'worksheetId'?: string | null; + /** + * Display name of the worksheet on which this query can be run on. + */ + 'worksheetName'?: string | null; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +declare class EurekaLLMDecomposeQueryResponse { + /** + * List of analytical questions that can be run on their respective worksheet/data sources. + */ + 'decomposedQueries'?: Array | null; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +declare class EurekaDecomposeQueryResponse { + 'decomposedQueryResponse'?: EurekaLLMDecomposeQueryResponse; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +declare class NLInstructionsInfo { + /** + * User instructions for natural language processing. + */ + 'instructions': Array; + /** + * Scope of the instruction. + */ + 'scope': NLInstructionsInfoScopeEnum; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} +type NLInstructionsInfoScopeEnum = "GLOBAL"; + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +declare class EurekaGetNLInstructionsResponse { + /** + * List of NL instructions with their scopes. + */ + 'nl_instructions_info': Array; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +declare class EurekaRelevantQuestion { + /** + * NL query that can be run using spotter aka natural language search to get an AI generated answer. + */ + 'query'?: string | null; + /** + * Unique identifier of the data source on which this query can be run on. + */ + 'data_source_identifier'?: string | null; + /** + * Display name of the data source on which this query can be run on. + */ + 'data_source_name'?: string | null; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +declare class EurekaGetRelevantQuestionsResponse { + /** + * List of relevant questions that can be run on their respective data sources. + */ + 'relevant_questions'?: Array | null; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +declare class EurekaSetNLInstructionsResponse { + /** + * Success status of the operation. + */ + 'success': boolean; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +declare class ExcludeMetadataListItemInput { + /** + * Unique ID or name of the metadata. + */ + 'identifier': string; + /** + * Type of metadata. Required if the name of the object is set as identifier. This attribute is optional when the object GUID is specified as identifier. 1. Liveboard 2. Answers 3. LOGICAL_TABLE for any data object such as table, worksheet or view 4. LOGICAL_COLUMN for a column of any data object such as table, worksheet or view 5. CONNECTION for connection objects 6. TAG for tag objects 7. USER for user objects 8. USER_GROUP for group objects 9. LOGICAL_RELATIONSHIP for table or worksheet joins. A join combines from one or several data object by using matching values. 10. INSIGHT_SPEC for SpotIQ objects + */ + 'type': ExcludeMetadataListItemInputTypeEnum; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} +type ExcludeMetadataListItemInputTypeEnum = "LIVEBOARD" | "ANSWER" | "LOGICAL_TABLE" | "LOGICAL_COLUMN" | "CONNECTION" | "TAG" | "USER" | "USER_GROUP" | "LOGICAL_RELATIONSHIP" | "INSIGHT_SPEC"; + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +/** +* Options for PNG export. Version: 26.6.0.cl or later +*/ +declare class ExportAnswerReportRequestPngOptions { + /** + * Desired width of the answer image in pixels. Ex. 1920 for Full HD image Version: 26.6.0.cl or later + */ + 'x_resolution'?: number | null; + /** + * Desired height of the answer image in pixels. Ex. 1080 for Full HD image Version: 26.6.0.cl or later + */ + 'y_resolution'?: number | null; + /** + * The scale of the image in percentage. Ex. 100 for 100% scale. Version: 26.6.0.cl or later + */ + 'scaling'?: number | null; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +/** +* Options for specific region specific overrides to support date/number/string/currency formatting. +*/ +declare class ExportAnswerReportRequestRegionalSettings { + /** + * ISO code to be appended with currency values. + */ + 'currency_format'?: ExportAnswerReportRequestRegionalSettingsCurrencyFormatEnum | null; + /** + * Indicates the locale to be used for all formattings. + */ + 'user_locale'?: ExportAnswerReportRequestRegionalSettingsUserLocaleEnum | null; + /** + * Indicates the locale to be used for number formatting. + */ + 'number_format_locale'?: ExportAnswerReportRequestRegionalSettingsNumberFormatLocaleEnum | null; + /** + * Indicates the locale to be used for date formatting. + */ + 'date_format_locale'?: ExportAnswerReportRequestRegionalSettingsDateFormatLocaleEnum | null; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} +type ExportAnswerReportRequestRegionalSettingsCurrencyFormatEnum = "ADP" | "AED" | "AFN" | "ALL" | "AMD" | "ANG" | "AOA" | "ARA" | "ARS" | "ATS" | "AUD" | "AWG" | "AZN" | "BAM" | "BBD" | "BDT" | "BEF" | "BGL" | "BGM" | "BGN" | "BHD" | "BIF" | "BMD" | "BND" | "BOB" | "BOP" | "BOV" | "BRL" | "BSD" | "BTN" | "BUK" | "BWP" | "BYN" | "BZD" | "CAD" | "CDF" | "CHE" | "CHF" | "CHW" | "CLE" | "CLP" | "CNX" | "CNY" | "COP" | "COU" | "CRC" | "CSK" | "CUC" | "CUP" | "CVE" | "CYP" | "CZK" | "DDM" | "DEM" | "DJF" | "DKK" | "DOP" | "DZD" | "ECS" | "ECV" | "EEK" | "EGP" | "ERN" | "ESP" | "ETB" | "EUR" | "FIM" | "FJD" | "FKP" | "FRF" | "GBP" | "GEK" | "GEL" | "GHS" | "GIP" | "GMD" | "GNF" | "GNS" | "GQE" | "GRD" | "GTQ" | "GWE" | "GWP" | "GYD" | "HKD" | "HNL" | "HRD" | "HRK" | "HTG" | "HUF" | "IDR" | "IEP" | "ILP" | "ILS" | "INR" | "IQD" | "IRR" | "ISK" | "ITL" | "JMD" | "JOD" | "JPY" | "KES" | "KGS" | "KHR" | "KMF" | "KPW" | "KRW" | "KWD" | "KYD" | "KZT" | "LAK" | "LBP" | "LKR" | "LRD" | "LSL" | "LTL" | "LTT" | "LUC" | "LUF" | "LUL" | "LVL" | "LVR" | "LYD" | "MAD" | "MAF" | "MCF" | "MDC" | "MDL" | "MGA" | "MGF" | "MKD" | "MLF" | "MMK" | "MNT" | "MOP" | "MRU" | "MTL" | "MTP" | "MUR" | "MVR" | "MWK" | "MXN" | "MXV" | "MYR" | "MZE" | "MZN" | "NAD" | "NGN" | "NIO" | "NLG" | "NOK" | "NPR" | "NZD" | "OMR" | "PAB" | "PEI" | "PEN" | "PGK" | "PHP" | "PKR" | "PLN" | "PTE" | "PYG" | "QAR" | "RHD" | "RON" | "RSD" | "RUB" | "RWF" | "SAR" | "SBD" | "SCR" | "SDG" | "SEK" | "SGD" | "SHP" | "SIT" | "SKK" | "SLL" | "SOS" | "SRD" | "SRG" | "SSP" | "STN" | "SUR" | "SVC" | "SYP" | "SZL" | "THB" | "TJR" | "TJS" | "TMT" | "TND" | "TOP" | "TPE" | "TRY" | "TTD" | "TWD" | "TZS" | "UAH" | "UAK" | "UGX" | "USD" | "UYU" | "UYW" | "UZS" | "VES" | "VND" | "VUV" | "WST" | "XAF" | "XAG" | "XAU" | "XBA" | "XBB" | "XCD" | "XDR" | "XEU" | "XFO" | "XFU" | "XOF" | "XPD" | "XPF" | "XPT" | "XRE" | "XSU" | "XTS" | "XUA" | "XXX" | "YDD" | "YER" | "ZAR" | "ZMW"; +type ExportAnswerReportRequestRegionalSettingsUserLocaleEnum = "en-CA" | "en-GB" | "en-US" | "de-DE" | "ja-JP" | "zh-CN" | "pt-BR" | "fr-FR" | "fr-CA" | "es-US" | "da-DK" | "es-ES" | "fi-FI" | "sv-SE" | "nb-NO" | "pt-PT" | "nl-NL" | "it-IT" | "ru-RU" | "en-IN" | "de-CH" | "en-NZ" | "es-MX" | "en-AU" | "zh-Hant" | "ko-KR" | "en-DE"; +type ExportAnswerReportRequestRegionalSettingsNumberFormatLocaleEnum = "en-CA" | "en-GB" | "en-US" | "de-DE" | "ja-JP" | "zh-CN" | "pt-BR" | "fr-FR" | "fr-CA" | "es-US" | "da-DK" | "es-ES" | "fi-FI" | "sv-SE" | "nb-NO" | "pt-PT" | "nl-NL" | "it-IT" | "ru-RU" | "en-IN" | "de-CH" | "en-NZ" | "es-MX" | "en-AU" | "zh-Hant" | "ko-KR" | "en-DE"; +type ExportAnswerReportRequestRegionalSettingsDateFormatLocaleEnum = "en-CA" | "en-GB" | "en-US" | "de-DE" | "ja-JP" | "zh-CN" | "pt-BR" | "fr-FR" | "fr-CA" | "es-US" | "da-DK" | "es-ES" | "fi-FI" | "sv-SE" | "nb-NO" | "pt-PT" | "nl-NL" | "it-IT" | "ru-RU" | "en-IN" | "de-CH" | "en-NZ" | "es-MX" | "en-AU" | "zh-Hant" | "ko-KR" | "en-DE"; + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +declare class ExportAnswerReportRequest { + /** + * Unique ID or name of the metadata object. + */ + 'metadata_identifier'?: string; + /** + * Unique ID of the answer session. + */ + 'session_identifier'?: string; + /** + * Generation number of the answer session. + */ + 'generation_number'?: number; + /** + * Export file format. + */ + 'file_format'?: ExportAnswerReportRequestFileFormatEnum; + /** + * JSON string representing runtime filter. { col1:region, op1: EQ, val1: northeast } + */ + 'runtime_filter'?: any; + /** + * JSON string representing runtime sort. { sortCol1: region, asc1 :true, sortCol2 : date } + */ + 'runtime_sort'?: any; + /** + * JSON object for setting values of parameters in runtime. + */ + 'runtime_param_override'?: any; + 'regional_settings'?: ExportAnswerReportRequestRegionalSettings; + 'png_options'?: ExportAnswerReportRequestPngOptions; + /** + * GUID or name of the personalised view of the Answer object. Version: 26.6.0.cl or later + */ + 'personalised_view_identifier'?: string; + /** + * Type of the answer being exported. Version: 26.6.0.cl or later + */ + 'type'?: ExportAnswerReportRequestTypeEnum; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} +type ExportAnswerReportRequestFileFormatEnum = "CSV" | "PDF" | "XLSX" | "PNG"; +type ExportAnswerReportRequestTypeEnum = "SAVED" | "PINNED"; + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +/** +* Options for PDF export. +*/ +declare class ExportLiveboardReportRequestPdfOptions { + /** + * Size of PDF page. `A4` generates a paginated A4 PDF. `CONTINUOUS` generates a continuous PDF that matches the Liveboard layout. Each Liveboard tab has its own page of variable length. Defaults to `A4` if not specified. Version: 26.5.0.cl or later + */ + 'page_size'?: ExportLiveboardReportRequestPdfOptionsPageSizeEnum | null; + /** + * Zoom level percentage for the PDF. Only applicable when `page_size` is `CONTINUOUS`. Acceptable values are integers in the range [45, 175]. Defaults to 100 if not specified. Version: 26.5.0.cl or later + */ + 'zoom_level'?: number | null; + /** + * Indicates whether to include the cover page with the Liveboard title. + */ + 'include_cover_page'?: boolean | null; + /** + * Indicates whether to include customized wide logo in the footer if available. + */ + 'include_custom_logo'?: boolean | null; + /** + * Indicates whether to include a page with all applied filters. For `CONTINUOUS` page_size, this parameter indicates whether to include the filter header. + */ + 'include_filter_page'?: boolean | null; + /** + * Indicates whether to include page number in the footer of each page. + */ + 'include_page_number'?: boolean | null; + /** + * Page orientation of the PDF. + */ + 'page_orientation'?: ExportLiveboardReportRequestPdfOptionsPageOrientationEnum | null; + /** + * Indicates whether to include only the first page of the tables. + */ + 'truncate_table'?: boolean | null; + /** + * Text to include in the footer of each page. + */ + 'page_footer_text'?: string | null; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} +type ExportLiveboardReportRequestPdfOptionsPageSizeEnum = "A4" | "CONTINUOUS"; +type ExportLiveboardReportRequestPdfOptionsPageOrientationEnum = "PORTRAIT" | "LANDSCAPE"; + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +/** +* Options for PNG export. +*/ +declare class ExportLiveboardReportRequestPngOptions { + /** + * Indicates whether to include the cover page with the Liveboard title. + */ + 'include_cover_page'?: boolean | null; + /** + * Indicates whether to include a page with all applied filters. + */ + 'include_filter_page'?: boolean | null; + /** + * Indicates personalised view of the Liveboard in case of png + */ + 'personalised_view_id'?: string | null; + /** + * Desired width of the Liveboard image in pixels. Ex. 1920 for Full HD image Version: 10.9.0.cl or later + */ + 'image_resolution'?: number | null; + /** + * The scale of the image in percentage. Ex. 100 for 100% scale. Version: 10.9.0.cl or later + */ + 'image_scale'?: number | null; + /** + * Indicates whether to include the header of the liveboard. Version: 10.9.0.cl or later + */ + 'include_header'?: boolean | null; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +declare class ExportLiveboardReportRequest { + /** + * GUID or name of the Liveboard object. + */ + 'metadata_identifier': string; + /** + * GUID or name of the tab of the Liveboard object. Version: 10.9.0.cl or later + */ + 'tab_identifiers'?: Array; + /** + * GUID or name of the personalised view of the Liveboard object. Version: 10.9.0.cl or later + */ + 'personalised_view_identifier'?: string; + /** + * GUID or name of visualizations on the Liveboard. If this parameter is not defined, the API returns a report with all visualizations saved on a Liveboard. + */ + 'visualization_identifiers'?: Array; + /** + * Transient content of the Liveboard. + */ + 'transient_content'?: string; + /** + * Export file format. + */ + 'file_format'?: ExportLiveboardReportRequestFileFormatEnum; + /** + * JSON object with representing filter condition to apply filters at runtime. For example, {\"col1\": \"region\", \"op1\": \"EQ\", \"val1\": \"northeast\" }. You can add multiple keys by incrementing the number at the end, for example, col2, op2, val2. For more information, see [API Documentation](https://developers.thoughtspot.com/docs/fetch-data-and-report-apis#_runtime_filters). + */ + 'runtime_filter'?: any; + /** + * Applied to the liveboard and overrides any filters already applied on the same columns in liveboard. Following example illustrate different kinds of filters: { \"override_filters\": [ { \"column_name\": \"Color\", \"generic_filter\": { \"op\": \"IN\", \"values\": [ \"almond\", \"turquoise\" ] }, \"negate\": false }, { \"column_name\": \"Commit Date\", \"date_filter\": { \"datePeriod\": \"HOUR\", \"number\": 3, \"type\": \"LAST_N_PERIOD\", \"op\": \"EQ\" } }, { \"column_name\": \"Sales\", \"generic_filter\": { \"op\": \"BW_INC\", \"values\": [ \"100000\", \"70000\" ] }, \"negate\": true } ] } + */ + 'override_filters'?: any; + /** + * JSON string representing runtime sort. For example, {\"sortCol1\": \"region\", \"asc1\" : true}. For more information, see [API Documentation](https://developers.thoughtspot.com/docs/fetch-data-and-report-apis#_runtime_sort). + */ + 'runtime_sort'?: any; + 'pdf_options'?: ExportLiveboardReportRequestPdfOptions; + 'png_options'?: ExportLiveboardReportRequestPngOptions; + /** + * JSON object for setting values of parameters at runtime. For example, {\"param1\": \"Double List Param\", \"paramVal1\": 0.5}. You can add multiple keys by incrementing the number at the end, for example, param2, paramVal2. For more information, see [API Documentation](https://developers.thoughtspot.com/docs/fetch-data-and-report-apis#_runtime_parameters). + */ + 'runtime_param_override'?: any; + 'regional_settings'?: ExportAnswerReportRequestRegionalSettings; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} +type ExportLiveboardReportRequestFileFormatEnum = "PDF" | "PNG" | "CSV" | "XLSX"; + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +declare class ExportMetadataTMLBatchedRequest { + /** + * Type of metadata object to export, can be one of USER | ROLE | USER_GROUP + */ + 'metadata_type': ExportMetadataTMLBatchedRequestMetadataTypeEnum; + /** + * Indicates the position within the complete set from where the API should begin returning objects. + */ + 'batch_offset'?: number; + /** + * Determines the number of objects or items to be retrieved in a single request. + */ + 'batch_size'?: number; + /** + * TML EDOC content format. + */ + 'edoc_format'?: ExportMetadataTMLBatchedRequestEdocFormatEnum; + /** + * Indicates whether to export dependent metadata objects of specified metadata objects. + */ + 'export_dependent'?: boolean | null; + /** + * Indicates whether to export is happening from all orgs context. + */ + 'all_orgs_override'?: boolean | null; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} +type ExportMetadataTMLBatchedRequestMetadataTypeEnum = "USER" | "USER_GROUP" | "ROLE"; +type ExportMetadataTMLBatchedRequestEdocFormatEnum = "JSON" | "YAML"; + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +/** +* Flags to specify additional options for export. Version: 10.6.0.cl or later +*/ +declare class ExportMetadataTMLRequestExportOptions { + /** + * Boolean Flag to export Object ID of referenced object. This flag will work only after the Object ID feature has been enabled. Please contact support to enable the feature. + */ + 'include_obj_id_ref'?: boolean | null; + /** + * Boolean flag to export guid of the object. This flag will work only after the Object ID feature has been enabled. Please contact support to enable the feature. + */ + 'include_guid'?: boolean | null; + /** + * Boolean flag to export Object ID of the object. This flag will work only after the Object ID feature has been enabled. Please contact support to enable the feature. + */ + 'include_obj_id'?: boolean | null; + /** + * Boolean flag indicating whether to export associated feedbacks of the object. This will only be respected when the object can have feedbacks. Version: 10.7.0.cl or later + */ + 'export_with_associated_feedbacks'?: boolean | null; + /** + * Boolean flag indicating whether to export column security rules of the object. This will only be respected when the object can have column security rules and export_associated is true. Version: 10.12.0.cl or later + */ + 'export_column_security_rules'?: boolean | null; + /** + * Boolean flag indicating whether to export column aliases of the model. This will only be respected when the object can have column aliases. Version: 10.13.0.cl or later + */ + 'export_with_column_aliases'?: boolean | null; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +/** +* MetadataType InputType used in Export MetadataType API +*/ +declare class ExportMetadataTypeInput { + /** + * Type of metadata. Required if the name of the object is set as the identifier. This attribute is optional when the object GUID is specified as the identifier. + */ + 'type'?: ExportMetadataTypeInputTypeEnum | null; + /** + * Unique ID or name of the metadata object. Not required if the metadata type is ANSWER when session_id and generation_number is set. + */ + 'identifier'?: string | null; + /** + * Unique ID of the Answer session. Required if the metadata type is ANSWER and identifier is not set. + */ + 'session_identifier'?: string | null; + /** + * Generation Number of the Answer session. Required if the metadata type is ANSWER and identifier is not set. + */ + 'generation_number'?: number | null; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} +type ExportMetadataTypeInputTypeEnum = "LIVEBOARD" | "ANSWER" | "LOGICAL_TABLE" | "CONNECTION" | "CUSTOM_ACTION" | "USER" | "USER_GROUP" | "ROLE" | "FEEDBACK"; + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +declare class ExportMetadataTMLRequest { + /** + * Metadata objects. + */ + 'metadata': Array; + /** + * Indicates whether to export associated metadata objects of specified metadata objects. + */ + 'export_associated'?: boolean | null; + /** + * Adds FQNs of the referenced objects. For example, if you are exporting a Liveboard and its associated objects, the API returns the Liveboard TML data with the FQNs of the referenced worksheet. If the exported TML data includes FQNs, you don\'t need to manually add FQNs of the referenced objects during TML import. + */ + 'export_fqn'?: boolean | null; + /** + * TML EDOC content format. **Note: exporting in YAML format currently requires manual formatting of the output. For more details on the workaround, please click [here](https://developers.thoughtspot.com/docs/known-issues#_version_9_12_0_cl)** + */ + 'edoc_format'?: ExportMetadataTMLRequestEdocFormatEnum; + /** + * Indicates whether to export worksheet TML in DEFAULT or V1 or V2 version. + */ + 'export_schema_version'?: ExportMetadataTMLRequestExportSchemaVersionEnum; + /** + * Indicates whether to export table while exporting connection. + */ + 'export_dependent'?: boolean | null; + /** + * Indicates whether to export connection as dependent while exporting table/worksheet/answer/liveboard. This will only be active when export_associated is true. + */ + 'export_connection_as_dependent'?: boolean | null; + /** + * Indicates whether to export is happening from all orgs context. + */ + 'all_orgs_override'?: boolean | null; + 'export_options'?: ExportMetadataTMLRequestExportOptions; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} +type ExportMetadataTMLRequestEdocFormatEnum = "JSON" | "YAML"; +type ExportMetadataTMLRequestExportSchemaVersionEnum = "DEFAULT" | "V1" | "V2"; + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +/** +* Flags to specify additional options for export. This will only be active when UserDefinedId in TML is enabled. +*/ +declare class ExportOptions { + /** + * Boolean Flag to export Object ID of referenced object. This flag will work only after the Object ID feature has been enabled. Please contact support to enable the feature. + */ + 'include_obj_id_ref'?: boolean | null; + /** + * Boolean flag to export guid of the object. This flag will work only after the Object ID feature has been enabled. Please contact support to enable the feature. + */ + 'include_guid'?: boolean | null; + /** + * Boolean flag to export Object ID of the object. This flag will work only after the Object ID feature has been enabled. Please contact support to enable the feature. + */ + 'include_obj_id'?: boolean | null; + /** + * Boolean flag indicating whether to export associated feedbacks of the object. This will only be respected when the object can have feedbacks. Version: 10.7.0.cl or later + */ + 'export_with_associated_feedbacks'?: boolean | null; + /** + * Boolean flag indicating whether to export column security rules of the object. This will only be respected when the object can have column security rules and export_associated is true. Version: 10.12.0.cl or later + */ + 'export_column_security_rules'?: boolean | null; + /** + * Boolean flag indicating whether to export column aliases of the model. This will only be respected when the object can have column aliases. Version: 10.13.0.cl or later + */ + 'export_with_column_aliases'?: boolean | null; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +declare class ExternalTableInput { + /** + * Unique ID or name of the connection. + */ + 'connection_identifier': string; + /** + * Name of the database. + */ + 'database_name'?: string | null; + /** + * Name of the schema. + */ + 'schema_name'?: string | null; + /** + * Name of the table. Table names may be case-sensitive depending on the database system. + */ + 'table_name': string; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +declare class FavoriteMetadataItem { + /** + * Unique ID of the metadata object. + */ + 'id': string; + /** + * name of the metadata object. + */ + 'name': string; + /** + * Type of metadata object. Required if the name of the object is set as the identifier. This attribute is optional when the object GUID is specified as the identifier. + */ + 'type': FavoriteMetadataItemTypeEnum; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} +type FavoriteMetadataItemTypeEnum = "LIVEBOARD" | "ANSWER" | "LOGICAL_TABLE" | "LOGICAL_COLUMN" | "CONNECTION" | "TAG" | "USER" | "USER_GROUP" | "LOGICAL_RELATIONSHIP"; + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +/** +* Favorite object options. +*/ +declare class FavoriteObjectOptionsInput { + /** + * Includes objects marked as favorite for the specified users. + */ + 'include'?: boolean | null; + /** + * Unique ID or name of the users. If not specified, the favorite objects of current logged in user are returned. + */ + 'user_identifiers'?: Array | null; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +declare class FetchAnswerDataRequest { + /** + * GUID or name of the Answer. + */ + 'metadata_identifier': string; + /** + * JSON output in compact or full format. The FULL option is available in 9.12.5.cl or later. + */ + 'data_format'?: FetchAnswerDataRequestDataFormatEnum; + /** + * The starting record number from where the records should be included. + */ + 'record_offset'?: number; + /** + * The number of records to include in a batch. + */ + 'record_size'?: number; + /** + * JSON object with representing filter condition to apply filters at runtime. For example, {\"col1\": \"item type\", \"op1\": \"EQ\", \"val1\": \"Bags\"} . You can add multiple keys by incrementing the number at the end, for example, col2, op2, val2, and col3, op3, val3. For more information, see [API Documentation](https://developers.thoughtspot.com/docs/fetch-data-and-report-apis#_runtime_filters). + */ + 'runtime_filter'?: any; + /** + * JSON object representing columns to sort data at runtime. For example, {\"sortCol1\": \"sales\", \"asc1\": true} . You can add multiple keys by incrementing the number at the end, for example, sortCol1, asc2. For more information, see [API Documentation](https://developers.thoughtspot.com/docs/fetch-data-and-report-apis#_runtime_sort). + */ + 'runtime_sort'?: any; + /** + * JSON object for setting values of parameters at runtime. For example, {\"param1\": \"Double List Param\", \"paramVal1\": 0.5}. You can add multiple keys by incrementing the number at the end, for example, param2, paramVal2. For more information, see [API Documentation](https://developers.thoughtspot.com/docs/fetch-data-and-report-apis#_runtime_parameters). + */ + 'runtime_param_override'?: any; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} +type FetchAnswerDataRequestDataFormatEnum = "FULL" | "COMPACT"; + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +declare class FetchAnswerSqlQueryRequest { + /** + * ID or name of an Answer. + */ + 'metadata_identifier': string; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +declare class FetchAsyncImportTaskStatusRequest { + /** + * List of task IDs to fetch status for. + */ + 'task_ids'?: Array; + /** + * List of task statuses to filter on. Valid values: [IN_QUEUE, IN_PROGRESS, COMPLETED, FAILED] + */ + 'task_status'?: Array; + /** + * Author GUID or name of async import tasks to filter on. + */ + 'author_identifier'?: string; + /** + * The offset point, starting from where the task status should be included in the response. + */ + 'record_offset'?: number; + /** + * The number of task statuses that should be included in the response starting from offset position. + */ + 'record_size'?: number; + /** + * Boolean flag to specify whether to include import response in the task status objects. + */ + 'include_import_response'?: boolean | null; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} +type FetchAsyncImportTaskStatusRequestTaskStatusEnum = "COMPLETED" | "IN_QUEUE" | "IN_PROGRESS" | "FAILED"; + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +declare class FetchColumnSecurityRulesRequest { + /** + * Array of table identifier objects for which to fetch column security rules + */ + 'tables': Array; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +declare class FetchConnectionDiffStatusResponse { + /** + * Status of the connection diff. + */ + 'status'?: boolean | null; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +declare class FetchLiveboardDataRequest { + /** + * GUID or name of the Liveboard. + */ + 'metadata_identifier': string; + /** + * GUIDs or names of the visualizations on the Liveboard. + */ + 'visualization_identifiers'?: Array; + /** + * Transient content of the Liveboard. + */ + 'transient_content'?: string; + /** + * JSON output in compact or full format. The FULL option is available in 9.12.5.cl or later. + */ + 'data_format'?: FetchLiveboardDataRequestDataFormatEnum; + /** + * The starting record number from where the records should be included. + */ + 'record_offset'?: number; + /** + * The number of records to include in a batch. + */ + 'record_size'?: number; + /** + * JSON object with representing filter condition to apply filters at runtime. For example, {\"col1\": \"item type\", \"op1\": \"EQ\", \"val1\": \"Bags\"} . You can add multiple keys by incrementing the number at the end, for example, col2, op2, val2, and col3, op3, val3. For more information, see [API Documentation](https://developers.thoughtspot.com/docs/fetch-data-and-report-apis#_runtime_filters). + */ + 'runtime_filter'?: any; + /** + * JSON object representing columns to sort data at runtime. For example, {\"sortCol1\": \"sales\", \"asc1\": true} . You can add multiple keys by incrementing the number at the end, for example, sortCol1, asc2. For more information, see [API Documentation](https://developers.thoughtspot.com/docs/fetch-data-and-report-apis#_runtime_sort). + */ + 'runtime_sort'?: any; + /** + * JSON object for setting values of parameters at runtime. For example, {\"param1\": \"Double List Param\", \"paramVal1\": 0.5}. You can add multiple keys by incrementing the number at the end, for example, param2, paramVal2. For more information, see [API Documentation](https://developers.thoughtspot.com/docs/fetch-data-and-report-apis#_runtime_parameters). + */ + 'runtime_param_override'?: any; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} +type FetchLiveboardDataRequestDataFormatEnum = "FULL" | "COMPACT"; + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +declare class FetchLiveboardSqlQueryRequest { + /** + * ID or name of the Liveboard. + */ + 'metadata_identifier': string; + /** + * Unique ID or name of visualizations. + */ + 'visualization_identifiers'?: Array; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +declare class FetchLogsRequest { + /** + * Name of the log type + */ + 'log_type': FetchLogsRequestLogTypeEnum; + /** + * Start time in EPOCH format + */ + 'start_epoch_time_in_millis'?: number; + /** + * End time in EPOCH format + */ + 'end_epoch_time_in_millis'?: number; + /** + * Fetch all the logs. This is available from 9.10.5.cl + */ + 'get_all_logs'?: boolean | null; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} +type FetchLogsRequestLogTypeEnum = "SECURITY_AUDIT"; + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +declare class ObjectPrivilegesMetadataInput { + /** + * Type of metadata object. Required if the name of the object is set as the identifier. This attribute is optional when the object GUID is specified as the identifier. + */ + 'type'?: ObjectPrivilegesMetadataInputTypeEnum | null; + /** + * Unique ID or name of the metadata object. + */ + 'identifier': string; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} +type ObjectPrivilegesMetadataInputTypeEnum = "LOGICAL_TABLE"; + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +declare class PrincipalsInput { + /** + * Unique ID or name of the principal object such as a user or group. + */ + 'identifier': string; + /** + * Principal type. + */ + 'type'?: PrincipalsInputTypeEnum | null; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} +type PrincipalsInputTypeEnum = "USER" | "USER_GROUP"; + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +declare class FetchObjectPrivilegesRequest { + /** + * Metadata objects for which you want to fetch object privileges. For now only LOGICAL_TABLE is supported. It may be extended to other metadata types in the future. + */ + 'metadata': Array; + /** + * User or group objects for which you want to fetch object privileges. If not specified, the API returns all users and groups that have object privileges on the specified metadata objects. + */ + 'principals'?: Array; + /** + * The starting record number from where the records should be included for each metadata type. + */ + 'record_offset'?: number; + /** + * The number of records that should be included for each metadata type. + */ + 'record_size'?: number; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +/** +* MetadataType InputType used in Permission API\'s +*/ +declare class PermissionsMetadataTypeInput { + /** + * Type of metadata object. Required if the name of the object is set as the identifier. This attribute is optional when the object GUID is specified as the identifier. + */ + 'type'?: PermissionsMetadataTypeInputTypeEnum | null; + /** + * Unique ID or name of the metadata object. + */ + 'identifier': string; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} +type PermissionsMetadataTypeInputTypeEnum = "LIVEBOARD" | "ANSWER" | "LOGICAL_TABLE" | "LOGICAL_COLUMN" | "CONNECTION" | "COLLECTION"; + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +declare class FetchPermissionsOfPrincipalsRequest { + /** + * GUID or name of the user or group. + */ + 'principals': Array; + /** + * Metadata objects for which you want to fetch permission details. If not specified, the API returns permission details for all metadata objects that the specified users and groups can access. + */ + 'metadata'?: Array; + /** + * The starting record number from where the records should be included for each metadata type. + */ + 'record_offset'?: number; + /** + * The number of records that should be included for each metadata type. + */ + 'record_size'?: number; + /** + * When no metadata objects input is passed, metadata objects of this type are fetched. + */ + 'default_metadata_type'?: FetchPermissionsOfPrincipalsRequestDefaultMetadataTypeEnum; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} +type FetchPermissionsOfPrincipalsRequestDefaultMetadataTypeEnum = "ALL" | "LIVEBOARD" | "ANSWER" | "LOGICAL_TABLE" | "LOGICAL_COLUMN" | "CONNECTION" | "COLLECTION"; + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +declare class FetchPermissionsOnMetadataRequest { + /** + * GUID or name of the metadata object. + */ + 'metadata': Array; + /** + * User or group objects for which you want to fetch permissions. If not specified, the API returns all users and groups that can access the specified metadata objects. + */ + 'principals'?: Array; + /** + * Indicates whether to fetch permissions of dependent metadata objects. + */ + 'include_dependent_objects'?: boolean | null; + /** + * The starting record number from where the records should be included for each metadata type. + */ + 'record_offset'?: number; + /** + * The number of records that should be included for each metadata type. + */ + 'record_size'?: number; + /** + *
Version: 10.3.0.cl or later
Specifies the type of permission. Valid values are: EFFECTIVE - If the user permission to the metadata objects is granted by the privileges assigned to the groups to which they belong. DEFINED - If a user or user group received access to metadata objects via object sharing by another user. + */ + 'permission_type'?: string; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +/** +* Filter Rules to be applied on Objects. +*/ +declare class FilterRules { + /** + * The name of the column to apply the filter on. + */ + 'column_name': string; + /** + * The operator to use for filtering. Example: EQ (equals), GT(greater than), etc. + */ + 'operator': FilterRulesOperatorEnum; + /** + * The values to filter on. To get all records, use TS_WILDCARD_ALL as values. + */ + 'values': Array; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} +type FilterRulesOperatorEnum = "EQ" | "NE" | "LT" | "LE" | "GT" | "GE" | "IN" | "BW" | "CONTAINS" | "BEGINS_WITH" | "ENDS_WITH" | "BW_INC" | "BW_INC_MIN" | "BW_INC_MAX" | "LIKE" | "NOT_IN"; + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +declare class ForceLogoutUsersRequest { + /** + * GUID or name of the users for force logging out their sessions. + */ + 'user_identifiers'?: Array; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +/** +* Configuration of schedule with cron expression +*/ +declare class Frequency { + 'cron_expression': CronExpression; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +/** +* Configuration of schedule with cron expression +*/ +declare class FrequencyInput { + 'cron_expression': CronExpressionInput; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +declare class GenerateCSVRequest { + /** + * Start date for the calendar in `MM/dd/yyyy` format. + */ + 'start_date': string; + /** + * End date for the calendar in `MM/dd/yyyy` format. + */ + 'end_date': string; + /** + * Type of the calendar. + */ + 'calendar_type'?: GenerateCSVRequestCalendarTypeEnum; + /** + * Month offset to start calendar from `January`. + */ + 'month_offset'?: GenerateCSVRequestMonthOffsetEnum; + /** + * Specify the starting day of the week. + */ + 'start_day_of_week'?: GenerateCSVRequestStartDayOfWeekEnum; + /** + * Prefix to add before the quarter. + */ + 'quarter_name_prefix'?: string; + /** + * Prefix to add before the year. + */ + 'year_name_prefix'?: string; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} +type GenerateCSVRequestCalendarTypeEnum = "MONTH_OFFSET" | "FOUR_FOUR_FIVE" | "FOUR_FIVE_FOUR" | "FIVE_FOUR_FOUR"; +type GenerateCSVRequestMonthOffsetEnum = "January" | "February" | "March" | "April" | "May" | "June" | "July" | "August" | "September" | "October" | "November" | "December"; +type GenerateCSVRequestStartDayOfWeekEnum = "Sunday" | "Monday" | "Tuesday" | "Wednesday" | "Thursday" | "Friday" | "Saturday"; + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +declare class ImportEPackAsyncTaskStatus { + /** + * GUID of tenant from which the task is initiated. + */ + 'tenant_id'?: string | null; + /** + * Organisation ID of the user who initiated the task. + */ + 'org_id'?: number | null; + /** + * Unique identifier for the task. + */ + 'task_id'?: string | null; + /** + * Name of the task. + */ + 'task_name'?: string | null; + /** + * Response of imported objects so far. + */ + 'import_response'?: any | null; + /** + * Current status of the task. + */ + 'task_status'?: ImportEPackAsyncTaskStatusTaskStatusEnum | null; + /** + * ID of the user who initiated the task. + */ + 'author_id'?: string | null; + /** + * Policy used for the import task. + */ + 'import_policy'?: ImportEPackAsyncTaskStatusImportPolicyEnum | null; + /** + * Time when the task was created (in ms since epoch). + */ + 'created_at'?: number | null; + /** + * Time when the task started (in ms since epoch). + */ + 'in_progress_at'?: number | null; + /** + * Time when the task was completed (in ms since epoch). + */ + 'completed_at'?: number | null; + /** + * Total number of objects to process. + */ + 'total_object_count'?: number | null; + /** + * Number of objects processed so far. + */ + 'object_processed_count'?: number | null; + /** + * Last time the task status was updated (in ms since epoch). + */ + 'modified_at'?: number | null; + /** + * Display name of the user who initiated the task. + */ + 'author_display_name'?: string | null; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} +type ImportEPackAsyncTaskStatusTaskStatusEnum = "COMPLETED" | "IN_QUEUE" | "IN_PROGRESS" | "FAILED"; +type ImportEPackAsyncTaskStatusImportPolicyEnum = "PARTIAL" | "ALL_OR_NONE" | "VALIDATE_ONLY" | "PARTIAL_OBJECT"; + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +declare class GetAsyncImportStatusResponse { + /** + * List of task statuses. + */ + 'status_list'?: Array | null; + /** + * Indicates whether there are more task statuses to fetch. + */ + 'last_batch'?: boolean | null; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +/** +* Groups objects. +*/ +declare class GroupObject { + 'identifier'?: string | null; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +/** +* Filter Rules to be applied on Objects. +*/ +declare class ParameterValues { + /** + * The name of the column to apply the filter on. + */ + 'name': string; + /** + * The values to filter on. Only single value is supported currently. + */ + 'values': Array; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +/** +* Objects on which the filter rules and parameters values should be applied to +*/ +declare class TokenAccessScopeObject { + /** + * Type of object. Required if the name of the object is set as the identifier. This attribute is optional when the object GUID is specified as the identifier. Specify the object type as `LOGICAL_TABLE`. + */ + 'type'?: TokenAccessScopeObjectTypeEnum | null; + /** + * Unique name/id of the object. + */ + 'identifier': string; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} +type TokenAccessScopeObjectTypeEnum = "LOGICAL_TABLE"; + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +/** +* Variable values. +*/ +declare class VariableValues { + /** + * The name of the existing formula variable. + */ + 'name': string; + /** + * The values to filter on. + */ + 'values': Array; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +declare class GetCustomAccessTokenRequest { + /** + * Username of the ThoughtSpot user. The username is stored in the `name` attribute of the user object. + */ + 'username': string; + /** + * Password of the user account + */ + 'password'?: string; + /** + * The secret key string provided by the ThoughtSpot application server. ThoughtSpot generates a secret key when Trusted authentication is enabled. + */ + 'secret_key'?: string; + /** + * Token validity duration in seconds + */ + 'validity_time_in_sec'?: number; + /** + * ID or name of the Org context to log in to. If the Org ID or name is not specified but a secret key is provided, the user will be logged into the Org associated with the secret key. If neither the Org ID/name nor the secret key is provided, the user will be logged into the Org context from their previous login session. + */ + 'org_identifier'?: string; + /** + * Indicates whether the specified attributes should be persisted or not. RESET and NONE are not applicable if you are setting variable_values. + */ + 'persist_option': GetCustomAccessTokenRequestPersistOptionEnum; + /** + * Filter rules. + */ + 'filter_rules'?: Array; + /** + * Allows developers to assign parameter values for existing parameters to a user at login. Note: Using parameter values for row level security use cases will ultimately be deprecated. Developers can still pass data security values via the Custom Access token via the variable_values field and create RLS rules based on custom variables. Please refer to the [ABAC via RLS documentation](https://developers.thoughtspot.com/docs/abac-user-parameters) for more details. + */ + 'parameter_values'?: Array; + /** + * List of variable values where `name` references an existing formula variable and `values` is any value from the corresponding column. Version: 10.14.0.cl or later + */ + 'variable_values'?: Array; + /** + * Objects on which the parameter and variable values should be applied to + */ + 'objects'?: Array; + /** + * (just-in-time (JIT) provisioning)Email address of the user. Specify this attribute when creating a new user. + */ + 'email'?: string; + /** + * (just-in-time (JIT) provisioning) Indicates display name of the user. Specify this attribute when creating a new user. + */ + 'display_name'?: string; + /** + * (just-in-time (JIT) provisioning) ID or name of the groups to which the newly created user belongs. Specify this attribute when creating a new user. + */ + 'groups'?: Array; + /** + * Creates a new user if the specified username does not exist in ThoughtSpot. To provision a user just-in-time (JIT), set this attribute to true. Note: For JIT provisioning of a user, the secret_key is required. New formula variables won\'t be created. Version: 10.5.0.cl or later + */ + 'auto_create'?: boolean | null; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} +type GetCustomAccessTokenRequestPersistOptionEnum = "REPLACE" | "APPEND" | "NONE" | "RESET"; + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +declare class GetDataSourceSuggestionsRequest { + /** + * User query used to suggest data sources. + */ + 'query': string; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +/** +* Objects to apply the User_Object. +*/ +declare class UserObject { + /** + * Type of object. Required if the name of the object is set as the identifier. This attribute is optional when the object GUID is specified as the identifier. Specify the object type as `LOGICAL_TABLE`. + */ + 'type'?: UserObjectTypeEnum | null; + /** + * Unique name/id of the object. + */ + 'identifier': string; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} +type UserObjectTypeEnum = "LOGICAL_TABLE"; + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +/** +* Objects to apply the Runtime_Filters. +*/ +declare class RuntimeFilters { + /** + * The column name to apply filter. + */ + 'column_name': string; + /** + * Value of the filters. + */ + 'values': Array; + /** + * Operator value. Example: EQ + */ + 'operator': RuntimeFiltersOperatorEnum; + /** + * Flag to persist the runtime filters. Version: 9.12.0.cl or later + */ + 'persist'?: boolean | null; + /** + * Object to apply the runtime filter. + */ + 'objects'?: Array | null; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} +type RuntimeFiltersOperatorEnum = "EQ" | "NE" | "LT" | "LE" | "GT" | "GE" | "IN" | "BW" | "CONTAINS" | "BEGINS_WITH" | "ENDS_WITH" | "BW_INC" | "BW_INC_MIN" | "BW_INC_MAX" | "LIKE" | "NOT_IN"; + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +/** +* Objects to apply the Runtime_Parameters. +*/ +declare class RuntimeParameters { + /** + * The name of the parameter. + */ + 'name': string; + /** + * The array of values. + */ + 'values': Array; + /** + * Flag to persist the parameters. Version: 9.12.0.cl or later + */ + 'persist'?: boolean | null; + /** + * Object to apply the runtime parameter. + */ + 'objects'?: Array | null; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +/** +* Objects to apply the Runtime_Sorts. +*/ +declare class RuntimeSorts { + /** + * The column name to apply filter. + */ + 'column_name'?: string | null; + /** + * Order for the sort. + */ + 'order'?: RuntimeSortsOrderEnum | null; + /** + * Flag to persist the runtime sorts. Version: 9.12.0.cl or later + */ + 'persist'?: boolean | null; + /** + * Object to apply the runtime sort. + */ + 'objects'?: Array | null; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} +type RuntimeSortsOrderEnum = "ASC" | "DESC"; + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +/** +*
Deprecated: 10.4.0.cl and later
Define attributes such as Runtime filters and Runtime parameters to send security entitlements to a user session. For more information, see [Documentation](https://developers.thoughtspot.com/docs/abac-user-parameters). +*/ +declare class GetFullAccessTokenRequestUserParameters { + 'objects'?: Array | null; + /** + * Objects to apply the User_Runtime_Filters. Examples to set the `runtime_filters` : ```json { \"column_name\": \"Color\", \"operator\": \"EQ\", \"values\": [\"red\"], \"persist\": false } ``` + */ + 'runtime_filters'?: Array | null; + /** + * Objects to apply the User_Runtime_Sorts. Examples to set the `runtime_sorts` : ```json { \"column_name\": \"Color\", \"order\": \"ASC\", \"persist\": false } ``` + */ + 'runtime_sorts'?: Array | null; + /** + * Objects to apply the Runtime_Parameters. Examples to set the `parameters` : ```json { \"name\": \"Color\", \"values\": [\"Blue\"], \"persist\": false } ``` + */ + 'parameters'?: Array | null; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +declare class GetFullAccessTokenRequest { + /** + * Username of the ThoughtSpot user. The username is stored in the `name` attribute of the user object. + */ + 'username': string; + /** + * Password of the user account + */ + 'password'?: string; + /** + * The secret key string provided by the ThoughtSpot application server. ThoughtSpot generates a secret key when Trusted authentication is enabled. + */ + 'secret_key'?: string; + /** + * Token validity duration in seconds + */ + 'validity_time_in_sec'?: number; + /** + * ID of the Org context to log in to. If the Org ID is not specified and secret key is provided then user will be logged into the org corresponding to the secret key, and if secret key is not provided then user will be logged in to the Org context of their previous login session. + */ + 'org_id'?: number; + /** + * Email address of the user. Specify this attribute when creating a new user (just-in-time (JIT) provisioning). + */ + 'email'?: string; + /** + * Indicates display name of the user. Use this parameter to provision a user just-in-time (JIT). + */ + 'display_name'?: string; + /** + * Creates a new user if the specified username does not already exist in ThoughtSpot. To provision a user just-in-time (JIT), set this attribute to true. Note: For JIT provisioning of a user, the secret_key is required. + */ + 'auto_create'?: boolean | null; + /** + * ID or name of the groups to which the newly created user belongs. Use this parameter to provision a user just-in-time (JIT). + */ + 'group_identifiers'?: Array; + 'user_parameters'?: GetFullAccessTokenRequestUserParameters; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +declare class GetNLInstructionsRequest { + /** + * Unique ID or name of the data-model for which to retrieve NL instructions. + */ + 'data_source_identifier': string; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +declare class GetObjectAccessTokenRequest { + /** + * Username of the ThoughtSpot user. The username is stored in the `name` attribute of the user object. + */ + 'username': string; + /** + * GUID of the ThoughtSpot metadata object that the user can access. The bearer will only have access to the object specified in the API request. + */ + 'object_id'?: string; + /** + * Password of the user account + */ + 'password'?: string; + /** + * The secret key string provided by the ThoughtSpot application server. ThoughtSpot generates a secret key when Trusted authentication is enabled. + */ + 'secret_key'?: string; + /** + * Token validity duration in seconds + */ + 'validity_time_in_sec'?: number; + /** + * ID of the Org context to log in to. If the Org ID is not specified and secret key is provided then user will be logged into the org corresponding to the secret key, and if secret key is not provided then user will be logged in to the Org context of their previous login session. + */ + 'org_id'?: number; + /** + * Email address of the user. Specify this attribute when creating a new user (just-in-time (JIT) provisioning). + */ + 'email'?: string; + /** + * Display name of the user. Specify this attribute when creating a new user (just-in-time (JIT) provisioning). + */ + 'display_name'?: string; + /** + * Creates a new user if the specified username does not exist in ThoughtSpot. To provision a user just-in-time (JIT), set this attribute to true. Note: For JIT provisioning of a user, the secret_key is required. + */ + 'auto_create'?: boolean | null; + /** + * Unique ID or name of the groups to which you want to assign the new user. You can specify this attribute to dynamically assign privileges during just-in-time (JIT) provisioning. + */ + 'group_identifiers'?: Array; + 'user_parameters'?: GetFullAccessTokenRequestUserParameters; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +/** +* Additional context to guide the response. +*/ +declare class GetRelevantQuestionsRequestAiContext { + /** + * User specific text instructions sent to AI system for processing the query. + */ + 'instructions'?: Array | null; + /** + * User provided content like text data, csv data as a string message to provide context & potentially improve the quality of the response. + */ + 'content'?: Array | null; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +/** +* metadata for the query to enable generation of relevant sub-questions; at least one context identifier is required. +*/ +declare class GetRelevantQuestionsRequestMetadataContext { + /** + * List of data_source_identifiers to provide context for breaking down user query into analytical queries that can be run on them. + */ + 'data_source_identifiers'?: Array | null; + /** + * List of answer unique identifiers (GUIDs) whose data will be used to guide the response. + */ + 'answer_identifiers'?: Array | null; + /** + * Unique identifier to denote current conversation. + */ + 'conversation_identifier'?: string | null; + /** + * List of liveboard unique identifiers (GUIDs) whose data will be used to guide the response. + */ + 'liveboard_identifiers'?: Array | null; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +declare class GetRelevantQuestionsRequest { + 'metadata_context': GetRelevantQuestionsRequestMetadataContext; + /** + * Maximum number of relevant questions that is allowed in the response, default = 5. + */ + 'limit_relevant_questions'?: number; + /** + * If true, results are not returned from cache & calculated every time. + */ + 'bypass_cache'?: boolean | null; + /** + * A user query that requires breaking down into smaller, more manageable analytical questions to facilitate better understanding and analysis. + */ + 'query': string; + 'ai_context'?: GetRelevantQuestionsRequestAiContext; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +declare class GetTokenResponse { + /** + * Bearer auth token. + */ + 'token': string; + /** + * Token creation time in milliseconds. + */ + 'creation_time_in_millis': number; + /** + * Token expiration time in milliseconds. + */ + 'expiration_time_in_millis': number; + /** + * Username to whom the token is issued. + */ + 'valid_for_user_id': string; + /** + * Unique identifier of the user to whom the token is issued. + */ + 'valid_for_username': string; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +declare class GroupsImportListInput { + /** + * Unique display name of the group. + */ + 'display_name': string; + /** + * Unique ID or name of the group. + */ + 'group_identifier': string; + /** + * Unique ID of Liveboards that will be assigned as default Liveboards to the users in the group. + */ + 'default_liveboard_identifiers'?: Array | null; + /** + * Description of the group. + */ + 'description'?: string | null; + /** + * Privileges that will be assigned to the group. + */ + 'privileges'?: Array | null; + /** + * Unique ID or name of the sub-groups to add to the group. + */ + 'sub_group_identifiers'?: Array | null; + /** + * Type of the group. + */ + 'type'?: GroupsImportListInputTypeEnum | null; + /** + * Unique ID or name of the users to assign to the group. + */ + 'user_identifiers'?: Array | null; + /** + * Visibility of the group. The SHARABLE makes a group visible to other users and groups, and thus allows them to share objects. + */ + 'visibility'?: GroupsImportListInputVisibilityEnum | null; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} +type GroupsImportListInputPrivilegesEnum = "ADMINISTRATION" | "AUTHORING" | "USERDATAUPLOADING" | "DATADOWNLOADING" | "USERMANAGEMENT" | "DATAMANAGEMENT" | "SHAREWITHALL" | "JOBSCHEDULING" | "A3ANALYSIS" | "EXPERIMENTALFEATUREPRIVILEGE" | "BYPASSRLS" | "RANALYSIS" | "DEVELOPER" | "USER_ADMINISTRATION" | "GROUP_ADMINISTRATION" | "SYNCMANAGEMENT" | "CAN_CREATE_CATALOG" | "DISABLE_PINBOARD_CREATION" | "LIVEBOARD_VERIFIER" | "PREVIEW_THOUGHTSPOT_SAGE" | "CAN_MANAGE_VERSION_CONTROL" | "THIRDPARTY_ANALYSIS" | "ALLOW_NON_EMBED_FULL_APP_ACCESS" | "CAN_ACCESS_ANALYST_STUDIO" | "CAN_MANAGE_ANALYST_STUDIO" | "CAN_MODIFY_FOLDERS" | "CAN_MANAGE_VARIABLES" | "CAN_VIEW_FOLDERS" | "CAN_MANAGE_AGENTSPOT" | "CAN_ACCESS_AGENTSPOT" | "PREVIEW_DOCUMENT_SEARCH" | "CAN_SETUP_VERSION_CONTROL" | "CAN_DOWNLOAD_VISUALS" | "CAN_DOWNLOAD_DETAILED_DATA" | "CAN_USE_SPOTTER"; +type GroupsImportListInputTypeEnum = "LOCAL_GROUP" | "LDAP_GROUP" | "TEAM_GROUP" | "TENANT_GROUP"; +type GroupsImportListInputVisibilityEnum = "SHARABLE" | "NON_SHARABLE"; + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +/** +* Attribute to update in a header. +*/ +declare class HeaderAttributeInput { + /** + * Attribute name to be updated. + */ + 'name': string; + /** + * Attribute\'s new value. + */ + 'value': string; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +/** +* Favorite object options. +*/ +declare class HeaderUpdateInput { + /** + * Unique ID of a specified type to identify the header. + */ + 'identifier'?: string | null; + /** + * Custom object identifier to uniquely identify header. + */ + 'obj_identifier'?: string | null; + /** + * Optional type of the header object. + */ + 'type'?: HeaderUpdateInputTypeEnum | null; + /** + * List of attributes to update + */ + 'attributes': Array; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} +type HeaderUpdateInputTypeEnum = "ANSWER" | "LOGICAL_TABLE" | "LOGICAL_COLUMN" | "LIVEBOARD" | "ACTION_OBJECT" | "DATA_SOURCE" | "USER" | "USER_GROUP"; + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +declare class ImportMetadataTMLAsyncRequest { + /** + * Details of TML objects. + */ + 'metadata_tmls': Array; + /** + * If selected, creates TML objects with new GUIDs. + */ + 'create_new'?: boolean | null; + /** + * If import is happening from all orgs context. + */ + 'all_orgs_override'?: boolean | null; + /** + *
Version: 10.5.0.cl or later
Policy to be followed while importing the TML. Valid values are [PARTIAL_OBJECT, PARTIAL, VALIDATE_ONLY, ALL_OR_NONE] + */ + 'import_policy'?: ImportMetadataTMLAsyncRequestImportPolicyEnum; + /** + *
Version: 10.6.0.cl or later
Boolean Flag to skip TML diff check before processing object TMLs. + */ + 'skip_diff_check'?: boolean | null; + /** + *
Version: 10.5.0.cl or later
Boolean to indicate if the large metadata validation should be enabled. + */ + 'enable_large_metadata_validation'?: boolean | null; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} +type ImportMetadataTMLAsyncRequestImportPolicyEnum = "PARTIAL" | "ALL_OR_NONE" | "VALIDATE_ONLY" | "PARTIAL_OBJECT"; + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +declare class ImportMetadataTMLRequest { + /** + * Details of TML objects. **Note: importing TML in YAML format, when coming directly from our Playground, is currently requires manual formatting. For more details on the workaround, please click [here](https://developers.thoughtspot.com/docs/known-issues#_version_9_12_0_cl)** + */ + 'metadata_tmls': Array; + /** + * Specifies the import policy for the TML import. + */ + 'import_policy'?: ImportMetadataTMLRequestImportPolicyEnum; + /** + * If selected, creates TML objects with new GUIDs. + */ + 'create_new'?: boolean | null; + /** + * If import is happening from all orgs context. + */ + 'all_orgs_override'?: boolean | null; + /** + *
Version: 10.6.0.cl or later
Boolean Flag to skip TML diff check before processing object TMLs. + */ + 'skip_diff_check'?: boolean | null; + /** + *
Version: 10.5.0.cl or later
Boolean to indicate if the large metadata validation should be enabled. + */ + 'enable_large_metadata_validation'?: boolean | null; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} +type ImportMetadataTMLRequestImportPolicyEnum = "PARTIAL" | "ALL_OR_NONE" | "VALIDATE_ONLY" | "PARTIAL_OBJECT"; + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +declare class ImportUser { + /** + * Unique ID or name of the user. + */ + 'user_identifier': string; + /** + * Display name of the user. + */ + 'display_name': string; + /** + * Password of the user. + */ + 'password'?: string | null; + /** + * Type of the user account. + */ + 'account_type'?: ImportUserAccountTypeEnum | null; + /** + * Status of the user account. + */ + 'account_status'?: ImportUserAccountStatusEnum | null; + /** + * Email address of the user. + */ + 'email'?: string | null; + /** + * ID or name of the Orgs to which the user belongs. + */ + 'org_identifiers'?: Array | null; + /** + * ID or name of the groups to which the user belongs. + */ + 'group_identifiers'?: Array | null; + /** + * Visibility of the users. The SHARABLE property makes a user visible to other users and group, who can share objects with the user. + */ + 'visibility'?: ImportUserVisibilityEnum | null; + /** + * Notify user when other users or groups share metadata objects + */ + 'notify_on_share'?: boolean | null; + /** + * Show or hide the new user onboarding walkthroughs + */ + 'show_onboarding_experience'?: boolean | null; + /** + * Revisit the new user onboarding walkthroughs + */ + 'onboarding_experience_completed'?: boolean | null; + /** + * Unique ID or name of the default Liveboard assigned to the user. + */ + 'home_liveboard_identifier'?: string | null; + /** + * Metadata objects to add to the user\'s favorites list. + */ + 'favorite_metadata'?: Array | null; + /** + * Locale for the user. When setting this value, do not set use_browser_language to true, otherwise the browser\'s language setting will take precedence and the preferred_locale value will be ignored. + */ + 'preferred_locale'?: ImportUserPreferredLocaleEnum | null; + /** + * Flag to indicate whether to use the browser locale for the user in the UI. When set to true, the preferred_locale value is unset and the browser\'s language setting takes precedence. Version: 26.3.0.cl or later + */ + 'use_browser_language'?: boolean | null; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} +type ImportUserAccountTypeEnum = "LOCAL_USER" | "LDAP_USER" | "SAML_USER" | "OIDC_USER" | "REMOTE_USER"; +type ImportUserAccountStatusEnum = "ACTIVE" | "INACTIVE" | "EXPIRED" | "LOCKED" | "PENDING" | "SUSPENDED"; +type ImportUserVisibilityEnum = "SHARABLE" | "NON_SHARABLE"; +type ImportUserPreferredLocaleEnum = "en-CA" | "en-GB" | "en-US" | "de-DE" | "ja-JP" | "zh-CN" | "pt-BR" | "fr-FR" | "fr-CA" | "es-US" | "da-DK" | "es-ES" | "fi-FI" | "sv-SE" | "nb-NO" | "pt-PT" | "nl-NL" | "it-IT" | "ru-RU" | "en-IN" | "de-CH" | "en-NZ" | "es-MX" | "en-AU" | "zh-Hant" | "ko-KR" | "en-DE"; + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +declare class ImportUserGroupsRequest { + /** + * Details of groups which are to be imported + */ + 'groups'?: Array; + /** + * If set to true, removes groups that are not specified in the API request. + */ + 'delete_unspecified_groups'?: boolean | null; + /** + * If true, the API performs a test operation and returns user IDs whose data will be edited after the import. + */ + 'dry_run'?: boolean | null; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +declare class UserGroup { + 'id'?: string | null; + 'name'?: string | null; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +declare class ImportUserGroupsResponse { + /** + * The groups which are added into the system. + */ + 'groups_added': Array; + /** + * The groups which are deleted from the system. + */ + 'groups_deleted': Array; + /** + * The groups which are updated in the system. + */ + 'groups_updated': Array; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +declare class ImportUserType { + /** + * Unique identifier of the user. + */ + 'id'?: string | null; + /** + * Name of the user. + */ + 'name': string; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +declare class ImportUsersRequest { + /** + * List of users needs to be imported. + */ + 'users': Array; + /** + * The default password to assign to users if they do not have a password assigned in ThoughtSpot. + */ + 'default_password'?: string; + /** + * If true, the API performs a test operation and returns user IDs whose data will be edited after the import. + */ + 'dry_run'?: boolean | null; + /** + * If set to true, removes the users that are not specified in the API request. + */ + 'delete_unspecified_users'?: boolean | null; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +declare class ImportUsersResponse { + 'users_added'?: Array | null; + 'users_updated'?: Array | null; + 'users_deleted'?: Array | null; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +declare class InputEurekaNLSRequest { + /** + * Cluster version like 10.4.0.cl, 10.5.0.cl, so on. + */ + 'agentVersion'?: number | null; + /** + * If true, results are not returned from cache & calculated every time. Can incur high costs & latency. + */ + 'bypassCache'?: boolean | null; + /** + * User specific instructions for processing the @query. + */ + 'instructions'?: Array | null; + /** + * User query which is a topical/goal oriented question that needs to be broken down into smaller simple analytical questions. + */ + 'query'?: string | null; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +/** +* Metadata objects. +*/ +declare class JWTMetadataObject { + 'identifier'?: string | null; + 'type'?: JWTMetadataObjectTypeEnum | null; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} +type JWTMetadataObjectTypeEnum = "LOGICAL_TABLE"; + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +/** +* List of runtime parameters need to set during the session. +*/ +declare class JWTParameter { + /** + * Runtime filter parameter type in JWT. + */ + 'runtime_filter'?: any | null; + /** + * Runtime sort parameter type in JWT. + */ + 'runtime_sort'?: any | null; + /** + * Runtime param override type in JWT. + */ + 'runtime_param_override'?: any | null; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +/** +* JWT user options to create a JWT token given the payload. *Deprecated in 9.12.0.cl. Use user_parameters instead.* +*/ +declare class JWTUserOptions { + 'parameters'?: Array; + 'metadata'?: Array | null; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +/** +* JWT user options to create a JWT token given the payload. *Deprecated in 9.12.0.cl. Use user_parameters instead.* +*/ +declare class JWTUserOptionsFull { + 'parameters'?: Array | null; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +declare class LiveboardContent { + /** + * Total available data row count. + */ + 'available_data_row_count': number; + /** + * Name of the columns. + */ + 'column_names': Array; + /** + * Rows of data set. + */ + 'data_rows': Array; + /** + * The starting record number from where the records should be included. + */ + 'record_offset': number; + /** + * The number of records that should be included. + */ + 'record_size': number; + /** + * Total returned data row count. + */ + 'returned_data_row_count': number; + /** + * Sampling ratio (0 to 1). If the query was sampled, it is the ratio of keys returned in the data set to the total number of keys expected in the query. If the value is 1.0, this means that the complete result is returned. + */ + 'sampling_ratio': number; + /** + * Unique ID of the visualization. + */ + 'visualization_id'?: string | null; + /** + * Name of the visualization. + */ + 'visualization_name'?: string | null; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +declare class LiveboardDataResponse { + /** + * The unique identifier of the object + */ + 'metadata_id': string; + /** + * Name of the metadata object + */ + 'metadata_name': string; + /** + * Data content of metadata objects + */ + 'contents': Array; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +/** +* Options to specify details of Liveboard. +*/ +declare class LiveboardOptions { + /** + * Unique ID or name of visualizations. + */ + 'visualization_identifiers': Array; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +/** +* Options to specify details of Liveboard. +*/ +declare class LiveboardOptionsInput { + /** + * Unique ID or name of visualizations. + */ + 'visualization_identifiers': Array; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +declare class LogResponse { + /** + * Date timestamp of the log entry + */ + 'date': string; + /** + * Log data + */ + 'log': string; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +declare class LoginRequest { + /** + * Username of the ThoughtSpot user + */ + 'username'?: string; + /** + * Password of the user account + */ + 'password'?: string; + /** + * ID of the Org context to log in to. If Org ID is not specified, the user will be logged in to the Org context of their previous login session. + */ + 'org_identifier'?: string; + /** + * A flag to remember the user session. When set to true, a session cookie is created and used in subsequent API requests. + */ + 'remember_me'?: boolean | null; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +declare class ManageObjectPrivilegeRequest { + /** + * Operation to perform to manage object privileges. Available operations are: `ADD`, `REMOVE`. + */ + 'operation': ManageObjectPrivilegeRequestOperationEnum; + /** + * Type of metadata objects on which you want to perform the operation. For now only LOGICAL_TABLE is supported. It may be extended to other metadata types in the future. + */ + 'metadata_type': ManageObjectPrivilegeRequestMetadataTypeEnum; + /** + * List of object privilege types on which you want to perform the operation. + */ + 'object_privilege_types': Array; + /** + * List of metadata identifiers (GUID or name) on which you want to perform the operation. + */ + 'metadata_identifiers': Array; + /** + * User or group objects (GUID or name) to which you want to apply the given operation and given object privileges. + */ + 'principals': Array; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} +type ManageObjectPrivilegeRequestOperationEnum = "ADD" | "REMOVE"; +type ManageObjectPrivilegeRequestMetadataTypeEnum = "LOGICAL_TABLE"; +type ManageObjectPrivilegeRequestObjectPrivilegeTypesEnum = "SPOTTER_COACHING_PRIVILEGE"; + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +declare class MetadataAssociationItem { + 'action_config': ActionConfig; + /** + * Unique ID or name of the metadata. + */ + 'identifier': string; + /** + * Type of metadata. Required if the name of the object is set as the identifier. This attribute is optional when the object GUID is specified as the identifier. + */ + 'type': string; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +declare class MetadataContext { + /** + * List of data_source_identifiers to provide context for breaking down user query into analytical queries that can be run on them. + */ + 'data_source_identifiers'?: Array | null; + /** + * List of answer unique identifiers (GUIDs) whose data will be used to guide the response. + */ + 'answer_identifiers'?: Array | null; + /** + * Unique identifier to denote current conversation. + */ + 'conversation_identifier'?: string | null; + /** + * List of liveboard unique identifiers (GUIDs) whose data will be used to guide the response. + */ + 'liveboard_identifiers'?: Array | null; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +declare class MetadataInput { + 'identifier'?: string | null; + 'type'?: MetadataInputTypeEnum | null; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} +type MetadataInputTypeEnum = "LIVEBOARD"; + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +declare class MetadataListItemInput { + /** + * Unique ID or name of the metadata. + */ + 'identifier'?: string | null; + /** + * CustomObjectId of the metadata. + */ + 'obj_identifier'?: string | null; + /** + * A pattern to match the case-insensitive name of the metadata object. User % for a wildcard match. + */ + 'name_pattern'?: string | null; + /** + * Type of metadata. Required if the name of the object is set as identifier. This attribute is optional when the object GUID is specified as identifier. 1. Liveboard 2. Answers 3. LOGICAL_TABLE for any data object such as table, worksheet or view. 4. LOGICAL_COLUMN for a column of any data object such as table, worksheet or view. 5. CONNECTION for creating or modify data connections. 6. TAG for tag objects. 7. USER for user objects. 8. USER_GROUP for group objects. 9. LOGICAL_RELATIONSHIP for table or worksheet joins. A join combines from one or several data object by using matching values 10. INSIGHT_SPEC for SpotIQ objects + */ + 'type'?: MetadataListItemInputTypeEnum | null; + /** + * List of subtype of metadata. Applies for LOGICAL_TABLE type with the following valid values. 1. ONE_TO_ONE_LOGICAL 2. WORKSHEET 3. PRIVATE_WORKSHEET. 4. USER_DEFINED. 5. AGGR_WORKSHEET. 6. SQL_VIEW Version: 10.11.0.cl or later + */ + 'subtypes'?: Array | null; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} +type MetadataListItemInputTypeEnum = "LIVEBOARD" | "ANSWER" | "LOGICAL_TABLE" | "LOGICAL_COLUMN" | "CONNECTION" | "TAG" | "USER" | "USER_GROUP" | "LOGICAL_RELATIONSHIP" | "INSIGHT_SPEC"; +type MetadataListItemInputSubtypesEnum = "ONE_TO_ONE_LOGICAL" | "WORKSHEET" | "PRIVATE_WORKSHEET" | "USER_DEFINED" | "AGGR_WORKSHEET" | "SQL_VIEW"; + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +declare class MetadataResponse { + 'name'?: string | null; + 'id': string; + 'type': MetadataResponseTypeEnum; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} +type MetadataResponseTypeEnum = "LIVEBOARD"; + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +/** +* Metadata Search Response Object. +*/ +declare class MetadataSearchResponse { + /** + * Unique identifier of the metadata. + */ + 'metadata_id'?: string | null; + /** + * Name of the metadata. + */ + 'metadata_name'?: string | null; + /** + * Type of the metadata. + */ + 'metadata_type': MetadataSearchResponseMetadataTypeEnum; + /** + * Custom identifier of the metadata. (Available from 10.8.0.cl onwards) + */ + 'metadata_obj_id'?: string | null; + /** + * Details of dependent objects of the metadata objects. + */ + 'dependent_objects'?: any | null; + /** + * Details of incomplete information of the metadata objects if any. + */ + 'incomplete_objects'?: Array | null; + /** + * Complete details of the metadata objects. + */ + 'metadata_detail'?: any | null; + /** + * Header information of the metadata objects. + */ + 'metadata_header'?: any | null; + /** + * Visualization header information of the metadata objects. + */ + 'visualization_headers'?: Array | null; + /** + * Stats of the metadata object. Includes views, favorites, last_accessed. + */ + 'stats'?: any | null; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} +type MetadataSearchResponseMetadataTypeEnum = "LIVEBOARD" | "ANSWER" | "LOGICAL_TABLE" | "LOGICAL_COLUMN" | "CONNECTION" | "TAG" | "USER" | "USER_GROUP" | "LOGICAL_RELATIONSHIP" | "INSIGHT_SPEC"; + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +/** +* Sort options. +*/ +declare class MetadataSearchSortOptions { + /** + * Name of the field to apply the sort on. + */ + 'field_name'?: MetadataSearchSortOptionsFieldNameEnum | null; + /** + * Sort order : ASC(Ascending) or DESC(Descending). + */ + 'order'?: MetadataSearchSortOptionsOrderEnum | null; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} +type MetadataSearchSortOptionsFieldNameEnum = "NAME" | "DISPLAY_NAME" | "AUTHOR" | "CREATED" | "MODIFIED" | "VIEWS" | "FAVORITES" | "LAST_ACCESSED"; +type MetadataSearchSortOptionsOrderEnum = "ASC" | "DESC"; + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +declare class ModelTableList { + /** + * Name of the Model. + */ + 'model_name': string; + /** + * Model directory path, this is optional param and required if there are duplicate models with the same name. + */ + 'model_path'?: string | null; + /** + * List of Tables. + */ + 'tables': Array; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +declare class NLInstructionsInfoInput { + /** + * User instructions for natural language processing. + */ + 'instructions': Array; + /** + * Scope of the instruction (USER or GLOBAL). Defaults to GLOBAL. + */ + 'scope': NLInstructionsInfoInputScopeEnum; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} +type NLInstructionsInfoInputScopeEnum = "GLOBAL"; + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +/** +* The object representation with ID and Name. +*/ +declare class ObjectIDAndName { + /** + * The unique identifier of the object. + */ + 'id'?: string | null; + /** + * Name of the object. + */ + 'name'?: string | null; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +declare class ObjectPrivilegesOfMetadataResponse { + 'metadata_object_privileges'?: any | null; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +/** +* The current Org context of the user. +*/ +declare class Org { + /** + * The ID of the object. + */ + 'id': number; + /** + * Name of the object. + */ + 'name': string; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +/** +* Org-level non-embed access configuration. +*/ +declare class OrgNonEmbedAccess { + /** + * Block full application access for non-embedded usage. + */ + 'block_full_app_access'?: boolean | null; + /** + * Groups that have non-embed full app access. + */ + 'groups_with_access'?: Array | null; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +declare class OrgPreferenceSearchCriteriaInput { + /** + * Unique identifier or name of the org + */ + 'org_identifier': string; + /** + * Event types to search for. If not provided, all event types for this org are returned. + */ + 'event_types'?: Array | null; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} +type OrgPreferenceSearchCriteriaInputEventTypesEnum = "LIVEBOARD_SCHEDULE"; + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +declare class OrgResponse { + /** + * Unique identifier of the Org. + */ + 'id'?: number | null; + /** + * Name of the Org. + */ + 'name'?: string | null; + /** + * Status of the Org. + */ + 'status'?: OrgResponseStatusEnum | null; + /** + * Description of the Org. + */ + 'description'?: string | null; + /** + * Visibility of the Org. + */ + 'visibility'?: OrgResponseVisibilityEnum | null; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} +type OrgResponseStatusEnum = "ACTIVE" | "IN_ACTIVE"; +type OrgResponseVisibilityEnum = "SHOW" | "HIDDEN"; + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +declare class ParameterizeMetadataFieldsRequest { + /** + * Type of metadata object to parameterize. + */ + 'metadata_type'?: ParameterizeMetadataFieldsRequestMetadataTypeEnum; + /** + * Unique ID or name of the metadata object to parameterize. + */ + 'metadata_identifier': string; + /** + * Type of field in the metadata to parameterize. + */ + 'field_type': ParameterizeMetadataFieldsRequestFieldTypeEnum; + /** + * JSON array of field names to parameterize. Example: [schemaName, databaseName, tableName] + */ + 'field_names': Array; + /** + * Unique ID or name of the variable to use for parameterization of these fields. + */ + 'variable_identifier': string; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} +type ParameterizeMetadataFieldsRequestMetadataTypeEnum = "LOGICAL_TABLE" | "CONNECTION" | "CONNECTION_CONFIG"; +type ParameterizeMetadataFieldsRequestFieldTypeEnum = "ATTRIBUTE" | "CONNECTION_PROPERTY"; + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +declare class ParameterizeMetadataRequest { + /** + * Type of metadata object to parameterize. + */ + 'metadata_type'?: ParameterizeMetadataRequestMetadataTypeEnum; + /** + * Unique ID or name of the metadata object to parameterize. + */ + 'metadata_identifier': string; + /** + * Type of field in the metadata to parameterize. + */ + 'field_type': ParameterizeMetadataRequestFieldTypeEnum; + /** + * Name of the field which needs to be parameterized. + */ + 'field_name': string; + /** + * Unique ID or name of the variable to use for parameterization + */ + 'variable_identifier': string; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} +type ParameterizeMetadataRequestMetadataTypeEnum = "LOGICAL_TABLE" | "CONNECTION" | "CONNECTION_CONFIG"; +type ParameterizeMetadataRequestFieldTypeEnum = "ATTRIBUTE" | "CONNECTION_PROPERTY"; + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +/** +* Options for PDF export. +*/ +declare class PdfOptions { + /** + * Indicates whether to include complete Liveboard. + */ + 'complete_liveboard'?: boolean | null; + /** + * Indicates whether to include cover page with the Liveboard title. + */ + 'include_cover_page'?: boolean | null; + /** + * Indicates whether to include customized wide logo in the footer if available. + */ + 'include_custom_logo'?: boolean | null; + /** + * Indicates whether to include a page with all applied filters. + */ + 'include_filter_page'?: boolean | null; + /** + * Indicates whether to include page number in the footer of each page + */ + 'include_page_number'?: boolean | null; + /** + * Text to include in the footer of each page. + */ + 'page_footer_text'?: string | null; + /** + * Page orientation of the PDF. + */ + 'page_orientation'?: string | null; + /** + * Page size. + */ + 'page_size'?: PdfOptionsPageSizeEnum | null; + /** + * Indicates whether to include only first page of the tables. + */ + 'truncate_table'?: boolean | null; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} +type PdfOptionsPageSizeEnum = "A4" | "TAB_BASED"; + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +declare class PdfOptionsInput { + /** + * Size of PDF page. `A4` generates a paginated A4 PDF. `CONTINUOUS` generates a continuous PDF that matches the Liveboard layout. Each Liveboard tab has its own page of variable length. Defaults to `A4` if not specified. Version: 26.5.0.cl or later + */ + 'page_size'?: PdfOptionsInputPageSizeEnum | null; + /** + * Zoom level percentage for the PDF. Only applicable when `page_size` is `CONTINUOUS`. Acceptable values are integers in the range [45, 175]. Defaults to 100 if not specified. Version: 26.5.0.cl or later + */ + 'zoom_level'?: number | null; + /** + * Indicates whether to include the cover page with the Liveboard title. + */ + 'include_cover_page'?: boolean | null; + /** + * Indicates whether to include customized wide logo in the footer if available. + */ + 'include_custom_logo'?: boolean | null; + /** + * Indicates whether to include a page with all applied filters. For `CONTINUOUS` page_size, this parameter indicates whether to include the filter header. + */ + 'include_filter_page'?: boolean | null; + /** + * Indicates whether to include page number in the footer of each page. + */ + 'include_page_number'?: boolean | null; + /** + * Page orientation of the PDF. + */ + 'page_orientation'?: PdfOptionsInputPageOrientationEnum | null; + /** + * Indicates whether to include only the first page of the tables. + */ + 'truncate_table'?: boolean | null; + /** + * Text to include in the footer of each page. + */ + 'page_footer_text'?: string | null; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} +type PdfOptionsInputPageSizeEnum = "A4" | "CONTINUOUS"; +type PdfOptionsInputPageOrientationEnum = "PORTRAIT" | "LANDSCAPE"; + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +/** +* Details of users or groups. +*/ +declare class PermissionInput { + 'principal': PrincipalsInput; + /** + * Object share mode. + */ + 'share_mode': PermissionInputShareModeEnum; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} +type PermissionInputShareModeEnum = "READ_ONLY" | "MODIFY" | "NO_ACCESS"; + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +declare class PermissionOfMetadataResponse { + 'metadata_permission_details'?: any | null; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +declare class PermissionOfPrincipalsResponse { + 'principal_permission_details'?: any | null; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +declare class PngOptionsInput { + /** + * Indicates whether to include the cover page with the Liveboard title. + */ + 'include_cover_page'?: boolean | null; + /** + * Indicates whether to include a page with all applied filters. + */ + 'include_filter_page'?: boolean | null; + /** + * Indicates personalised view of the Liveboard in case of png + */ + 'personalised_view_id'?: string | null; + /** + * Desired width of the Liveboard image in pixels. Ex. 1920 for Full HD image Version: 10.9.0.cl or later + */ + 'image_resolution'?: number | null; + /** + * The scale of the image in percentage. Ex. 100 for 100% scale. Version: 10.9.0.cl or later + */ + 'image_scale'?: number | null; + /** + * Indicates whether to include the header of the liveboard. Version: 10.9.0.cl or later + */ + 'include_header'?: boolean | null; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +declare class PolicyProcessOptionsInput { + 'impersonate_user'?: string | null; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +declare class PrincipalsListItem { + /** + * Unique ID or name of the user or group. + */ + 'identifier': string; + /** + * Principal type. Valid values are + */ + 'type': string; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +declare class PublishMetadataListItem { + /** + * Unique ID or name of the metadata. + */ + 'identifier': string; + /** + * Type of metadata. Required if identifier is name. + */ + 'type'?: PublishMetadataListItemTypeEnum | null; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} +type PublishMetadataListItemTypeEnum = "LIVEBOARD" | "ANSWER" | "LOGICAL_TABLE"; + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +declare class PublishMetadataRequest { + /** + * Metadata objects to be published. + */ + 'metadata': Array; + /** + * Unique ID or name of orgs to which metadata objects should be published. + */ + 'org_identifiers': Array; + /** + * Skip validations of objects to be published. + */ + 'skip_validation'?: boolean | null; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +/** +* Input for variable value put operations +*/ +declare class VariablePutAssignmentInput { + /** + * Values of the variable + */ + 'assigned_values': Array; + /** + * The unique name of the org + */ + 'org_identifier'?: string | null; + /** + * Principal type + */ + 'principal_type'?: VariablePutAssignmentInputPrincipalTypeEnum | null; + /** + * Unique ID or name of the principal + */ + 'principal_identifier'?: string | null; + /** + * Unique ID of the model + */ + 'model_identifier'?: string | null; + /** + * Priority level + */ + 'priority'?: number | null; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} +type VariablePutAssignmentInputPrincipalTypeEnum = "USER" | "USER_GROUP"; + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +declare class PutVariableValuesRequest { + /** + * Operation to perform + */ + 'operation'?: PutVariableValuesRequestOperationEnum; + /** + * Variable assignments + */ + 'variable_assignment': Array; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} +type PutVariableValuesRequestOperationEnum = "ADD" | "REMOVE" | "REPLACE" | "RESET"; + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +/** +* NLSRequest object containing user query & instructions. +*/ +declare class QueryGetDecomposedQueryRequestNlsRequest { + /** + * Cluster version like 10.4.0.cl, 10.5.0.cl, so on. + */ + 'agentVersion'?: number | null; + /** + * If true, results are not returned from cache & calculated every time. Can incur high costs & latency. + */ + 'bypassCache'?: boolean | null; + /** + * User specific instructions for processing the @query. + */ + 'instructions'?: Array | null; + /** + * User query which is a topical/goal oriented question that needs to be broken down into smaller simple analytical questions. + */ + 'query'?: string | null; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +declare class QueryGetDecomposedQueryRequest { + /** + * List of answer unique identifiers (GUIDs) whose data will be used to guide the response. + */ + 'answerIds'?: Array; + /** + * User provided content like text data, csv data as a string message to provide context & potentially improve the quality of the response. + */ + 'content'?: Array; + /** + * Unique identifier to denote current conversation. + */ + 'conversationId'?: string; + /** + * List of liveboard unique identifiers (GUIDs) whose data will be used to guide the response. + */ + 'liveboardIds'?: Array; + /** + * Maximum number of decomposed queries that is allowed in the response, default = 5. + */ + 'maxDecomposedQueries'?: number; + 'nlsRequest'?: QueryGetDecomposedQueryRequestNlsRequest; + /** + * List of worksheetIds to provide context for decomposing user query into analytical queries that can be run on them. + */ + 'worksheetIds'?: Array; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +/** +* Recipient configuration which includes email address, ID or name of the users and groups. +*/ +declare class RecipientDetails { + /** + * Emails of the recipients. Specify email address if the recipient is not a ThoughtSpot user. + */ + 'emails'?: Array | null; + /** + * List of user or groups to subscribe for the scheduled job notifications. + */ + 'principals'?: Array | null; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +/** +* Recipients of the scheduled job notification. +*/ +declare class RecipientDetailsInput { + /** + * Emails of the recipients. + */ + 'emails'?: Array | null; + /** + * User or groups to be set as recipients of the schedule notifications. + */ + 'principals'?: Array | null; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +declare class RegionalSettingsInput { + /** + * ISO code to be appended with currency values. + */ + 'currency_format'?: RegionalSettingsInputCurrencyFormatEnum | null; + /** + * Indicates the locale to be used for all formattings. + */ + 'user_locale'?: RegionalSettingsInputUserLocaleEnum | null; + /** + * Indicates the locale to be used for number formatting. + */ + 'number_format_locale'?: RegionalSettingsInputNumberFormatLocaleEnum | null; + /** + * Indicates the locale to be used for date formatting. + */ + 'date_format_locale'?: RegionalSettingsInputDateFormatLocaleEnum | null; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} +type RegionalSettingsInputCurrencyFormatEnum = "ADP" | "AED" | "AFN" | "ALL" | "AMD" | "ANG" | "AOA" | "ARA" | "ARS" | "ATS" | "AUD" | "AWG" | "AZN" | "BAM" | "BBD" | "BDT" | "BEF" | "BGL" | "BGM" | "BGN" | "BHD" | "BIF" | "BMD" | "BND" | "BOB" | "BOP" | "BOV" | "BRL" | "BSD" | "BTN" | "BUK" | "BWP" | "BYN" | "BZD" | "CAD" | "CDF" | "CHE" | "CHF" | "CHW" | "CLE" | "CLP" | "CNX" | "CNY" | "COP" | "COU" | "CRC" | "CSK" | "CUC" | "CUP" | "CVE" | "CYP" | "CZK" | "DDM" | "DEM" | "DJF" | "DKK" | "DOP" | "DZD" | "ECS" | "ECV" | "EEK" | "EGP" | "ERN" | "ESP" | "ETB" | "EUR" | "FIM" | "FJD" | "FKP" | "FRF" | "GBP" | "GEK" | "GEL" | "GHS" | "GIP" | "GMD" | "GNF" | "GNS" | "GQE" | "GRD" | "GTQ" | "GWE" | "GWP" | "GYD" | "HKD" | "HNL" | "HRD" | "HRK" | "HTG" | "HUF" | "IDR" | "IEP" | "ILP" | "ILS" | "INR" | "IQD" | "IRR" | "ISK" | "ITL" | "JMD" | "JOD" | "JPY" | "KES" | "KGS" | "KHR" | "KMF" | "KPW" | "KRW" | "KWD" | "KYD" | "KZT" | "LAK" | "LBP" | "LKR" | "LRD" | "LSL" | "LTL" | "LTT" | "LUC" | "LUF" | "LUL" | "LVL" | "LVR" | "LYD" | "MAD" | "MAF" | "MCF" | "MDC" | "MDL" | "MGA" | "MGF" | "MKD" | "MLF" | "MMK" | "MNT" | "MOP" | "MRU" | "MTL" | "MTP" | "MUR" | "MVR" | "MWK" | "MXN" | "MXV" | "MYR" | "MZE" | "MZN" | "NAD" | "NGN" | "NIO" | "NLG" | "NOK" | "NPR" | "NZD" | "OMR" | "PAB" | "PEI" | "PEN" | "PGK" | "PHP" | "PKR" | "PLN" | "PTE" | "PYG" | "QAR" | "RHD" | "RON" | "RSD" | "RUB" | "RWF" | "SAR" | "SBD" | "SCR" | "SDG" | "SEK" | "SGD" | "SHP" | "SIT" | "SKK" | "SLL" | "SOS" | "SRD" | "SRG" | "SSP" | "STN" | "SUR" | "SVC" | "SYP" | "SZL" | "THB" | "TJR" | "TJS" | "TMT" | "TND" | "TOP" | "TPE" | "TRY" | "TTD" | "TWD" | "TZS" | "UAH" | "UAK" | "UGX" | "USD" | "UYU" | "UYW" | "UZS" | "VES" | "VND" | "VUV" | "WST" | "XAF" | "XAG" | "XAU" | "XBA" | "XBB" | "XCD" | "XDR" | "XEU" | "XFO" | "XFU" | "XOF" | "XPD" | "XPF" | "XPT" | "XRE" | "XSU" | "XTS" | "XUA" | "XXX" | "YDD" | "YER" | "ZAR" | "ZMW"; +type RegionalSettingsInputUserLocaleEnum = "en-CA" | "en-GB" | "en-US" | "de-DE" | "ja-JP" | "zh-CN" | "pt-BR" | "fr-FR" | "fr-CA" | "es-US" | "da-DK" | "es-ES" | "fi-FI" | "sv-SE" | "nb-NO" | "pt-PT" | "nl-NL" | "it-IT" | "ru-RU" | "en-IN" | "de-CH" | "en-NZ" | "es-MX" | "en-AU" | "zh-Hant" | "ko-KR" | "en-DE"; +type RegionalSettingsInputNumberFormatLocaleEnum = "en-CA" | "en-GB" | "en-US" | "de-DE" | "ja-JP" | "zh-CN" | "pt-BR" | "fr-FR" | "fr-CA" | "es-US" | "da-DK" | "es-ES" | "fi-FI" | "sv-SE" | "nb-NO" | "pt-PT" | "nl-NL" | "it-IT" | "ru-RU" | "en-IN" | "de-CH" | "en-NZ" | "es-MX" | "en-AU" | "zh-Hant" | "ko-KR" | "en-DE"; +type RegionalSettingsInputDateFormatLocaleEnum = "en-CA" | "en-GB" | "en-US" | "de-DE" | "ja-JP" | "zh-CN" | "pt-BR" | "fr-FR" | "fr-CA" | "es-US" | "da-DK" | "es-ES" | "fi-FI" | "sv-SE" | "nb-NO" | "pt-PT" | "nl-NL" | "it-IT" | "ru-RU" | "en-IN" | "de-CH" | "en-NZ" | "es-MX" | "en-AU" | "zh-Hant" | "ko-KR" | "en-DE"; + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +declare class RepoConfigObject { + /** + * Remote repository URL configured + */ + 'repository_url'?: string | null; + /** + * Username to authenticate connection to the version control system + */ + 'username'?: string | null; + /** + * Name of the remote branch where objects from this Thoughtspot instance will be versioned. + */ + 'commit_branch_name'?: string | null; + /** + * Branches that have been pulled in local repository + */ + 'branches'?: Array | null; + /** + * Maintain mapping of guid for the deployment to an instance + */ + 'enable_guid_mapping'?: boolean | null; + /** + * Name of the branch where the configuration files related to operations between Thoughtspot and version control repo should be maintained. + */ + 'configuration_branch_name'?: string | null; + 'org'?: Org; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +declare class ResetUserPasswordRequest { + /** + * New password for the user. + */ + 'new_password': string; + /** + * GUID or name of the user. + */ + 'user_identifier': string; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +/** +* The object representation with activation link. +*/ +declare class ResponseActivationURL { + /** + * Activation link to activate the user. + */ + 'activation_link'?: string | null; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +declare class ResponseCopyObject { + /** + * The unique identifier of the object. + */ + 'metadata_id'?: string | null; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +/** +* Custom action details +*/ +declare class ResponseCustomAction { + 'action_details': ActionDetails; + 'default_action_config': DefaultActionConfig; + /** + * Unique Id of the custom action. + */ + 'id': string; + /** + * Metadata objects to assign the the custom action to. + */ + 'metadata_association'?: Array | null; + /** + * Unique name of the custom action. + */ + 'name': string; + /** + * Unique ID or name of the User groups which are associated with the custom action. + */ + 'user_groups'?: Array | null; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +/** +* Unique ID of the failed worksheet. +*/ +declare class ResponseFailedEntity { + 'id': string; + /** + * Name of the worksheet that failed to convert. + */ + 'name': string; + /** + * Error details related to the failed conversion. + */ + 'error': string; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +/** +* Wrapper for the failed entities, as they are inside a \'data\' field in the response. +*/ +declare class ResponseFailedEntities { + 'data': Array; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +/** +* Unique ID of the incomplete worksheet. +*/ +declare class ResponseIncompleteEntity { + 'id': string; + /** + * Name of the incomplete worksheet. + */ + 'name': string; + /** + * Error details related to the incomplete conversion. + */ + 'error': string; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +/** +* Wrapper for the incomplete entities, as they are inside a \'data\' field in the response. +*/ +declare class ResponseIncompleteEntities { + 'data': Array; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +declare class ResponseMessage { + /** + * Unique identifier of the generated response. + */ + 'session_identifier'?: string | null; + /** + * Generate number of the response. + */ + 'generation_number'?: number | null; + /** + * Type of the generated response. + */ + 'message_type': ResponseMessageMessageTypeEnum; + /** + * Generated visualization type. + */ + 'visualization_type'?: ResponseMessageVisualizationTypeEnum | null; + /** + * Tokens for the response. + */ + 'tokens'?: string | null; + /** + * User friendly tokens for the response. + */ + 'display_tokens'?: string | null; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} +type ResponseMessageMessageTypeEnum = "TSAnswer"; +type ResponseMessageVisualizationTypeEnum = "Chart" | "Table" | "Undefined"; + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +/** +* Unique ID of the worksheet that failed post-upgrade. +*/ +declare class ResponsePostUpgradeFailedEntity { + 'id': string; + /** + * Name of the worksheet that failed post-upgrade. + */ + 'name': string; + /** + * Error details related to the post-upgrade failure. + */ + 'error': string; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +/** +* Wrapper for the post-upgrade failed entities, as they are inside a \'data\' field in the response. +*/ +declare class ResponsePostUpgradeFailedEntities { + 'data': Array; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +/** +* Schedule run response object +*/ +declare class ResponseScheduleRun { + /** + * GUID of the scheduled job. + */ + 'id': string; + /** + * Schedule run start time in milliseconds. + */ + 'start_time_in_millis': number; + /** + * Schedule run end time in milliseconds. + */ + 'end_time_in_millis': number; + /** + * Status of the schedule run. + */ + 'status': string; + /** + * Message details related to the schedule run. + */ + 'detail'?: string | null; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +declare class ResponseSchedule { + 'author': Author; + /** + * Schedule creation time in milliseconds. + */ + 'creation_time_in_millis': any; + /** + * Description of the job. + */ + 'description'?: string | null; + /** + * Export file format. + */ + 'file_format': string; + 'frequency': Frequency; + /** + * GUID of the scheduled job. + */ + 'id': string; + 'liveboard_options'?: LiveboardOptions; + 'metadata': MetadataResponse; + /** + * Name of the scheduled job. + */ + 'name': string; + 'pdf_options'?: PdfOptions; + 'recipient_details': RecipientDetails; + /** + * Status of the job + */ + 'status'?: string | null; + /** + * Time zone + */ + 'time_zone': string; + /** + * Schedule runs history records. + */ + 'history_runs'?: Array | null; + /** + * Personalised view id of the liveboard to be scheduled. + */ + 'personalised_view_id'?: string | null; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +/** +* Unique ID of the worksheet. +*/ +declare class ResponseSuccessfulEntity { + 'id': string; + /** + * Name of the worksheet. + */ + 'name': string; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +/** +* Wrapper for the successful entities, as they are inside a \'data\' field in the response. +*/ +declare class ResponseSuccessfulEntities { + 'data': Array; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +/** +* Name of the conversion process, which involves converting worksheets to models. +*/ +declare class ResponseWorksheetToModelConversion { + 'name': string; + /** + * The number of worksheets successfully converted to models. + */ + 'success_count': number; + /** + * The number of worksheets that failed to convert. + */ + 'failure_count': number; + /** + * The number of worksheets that were incomplete during the conversion process. + */ + 'incomplete_count': number; + /** + * The number of worksheets that failed after an upgrade during the conversion process. + */ + 'post_upgrade_failed_count': number; + /** + * The total time taken to complete the conversion process in milliseconds. + */ + 'total_time_in_millis': number; + 'successful_entities': ResponseSuccessfulEntities; + 'failed_entities': ResponseFailedEntities; + 'incomplete_entities': ResponseIncompleteEntities; + 'post_upgrade_failed_entities': ResponsePostUpgradeFailedEntities; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +declare class RevertCommitRequest { + /** + * Metadata objects. + */ + 'metadata'?: Array; + /** + * Name of the branch where the reverted version should be committed Note: If no branch_name is specified, then the commit_branch_name will be considered. + */ + 'branch_name'?: string; + /** + * Policy to apply when reverting a commit. Valid values: [ALL_OR_NONE, PARTIAL] + */ + 'revert_policy'?: RevertCommitRequestRevertPolicyEnum; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} +type RevertCommitRequestRevertPolicyEnum = "ALL_OR_NONE" | "PARTIAL"; + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +declare class RevertedMetadata { + /** + * Name of the file deployed + */ + 'file_name': string; + /** + * Name of the metadata object + */ + 'metadata_name': string; + /** + * Type of the metadata object + */ + 'metadata_type': string; + /** + * Indicates the status of deployment for the file + */ + 'status_code': string; + /** + * Any error or warning with the deployment + */ + 'status_message': string; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +declare class RevertResponse { + 'committer'?: CommiterType; + 'author'?: AuthorType; + /** + * Comments associated with the commit + */ + 'comment'?: string | null; + /** + * Time at which the changes were committed. + */ + 'commit_time'?: string | null; + /** + * SHA id associated with the commit + */ + 'commit_id'?: string | null; + /** + * Branch where changes were committed + */ + 'branch'?: string | null; + /** + * Files that were pushed as part of this commit + */ + 'committed_files'?: Array | null; + /** + * Metadata of reverted file of this commit + */ + 'reverted_metadata'?: Array | null; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +declare class RevokeRefreshTokensRequest { + /** + * Unique ID or name of the configuration. When provided, the refresh tokens of the users associated with the connection configuration will be revoked. + */ + 'configuration_identifiers'?: Array; + /** + * Unique ID or name of the users. When provided, the refresh tokens of the specified users will be revoked. If the request includes the user ID or name of the connection author, their token will also be revoked. + */ + 'user_identifiers'?: Array; + /** + * Unique ID or name of the Org. When provided, the refresh tokens of all users associated with the published connection in the Org will be revoked. This parameter is valid only for published connections. Using it with unpublished connections will result in an error. + */ + 'org_identifiers'?: Array; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +declare class RevokeRefreshTokensResponse { + /** + * Result message describing the outcome of the refresh token revocation operation. + */ + 'data': string; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +declare class RevokeTokenRequest { + 'user_identifier'?: string; + 'token'?: string; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +declare class RiseGQLArgWrapper { + 'name': string; + 'type': string; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +declare class RiseSetter { + 'field': string; + 'path': string; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +declare class Role { + /** + * id of the role + */ + 'id'?: string | null; + /** + * name of the role + */ + 'name'?: string | null; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +declare class RoleResponse { + /** + * Unique Id of the role. + */ + 'id': string; + /** + * Name of the role + */ + 'name': string; + /** + * Description of the role + */ + 'description': string; + /** + * number of groups assigned with this role + */ + 'groups_assigned_count'?: number | null; + /** + * Orgs in which role exists. + */ + 'orgs'?: Array | null; + /** + * Details of groups assigned with this role + */ + 'groups'?: Array | null; + /** + * Privileges granted to the role. + */ + 'privileges': Array; + /** + * Permission details of the Role + */ + 'permission'?: RoleResponsePermissionEnum | null; + /** + * Unique identifier of author of the role. + */ + 'author_id'?: string | null; + /** + * Unique identifier of modifier of the role. + */ + 'modifier_id'?: string | null; + /** + * Creation time of the role in milliseconds. + */ + 'creation_time_in_millis'?: any | null; + /** + * Last modified time of the role in milliseconds. + */ + 'modification_time_in_millis'?: any | null; + /** + * Indicates whether the role is deleted. + */ + 'deleted'?: boolean | null; + /** + * Indicates whether the role is deprecated. + */ + 'deprecated'?: boolean | null; + /** + * Indicates whether the role is external. + */ + 'external'?: boolean | null; + /** + * Indicates whether the role is hidden. + */ + 'hidden'?: boolean | null; + /** + * Indicates whether the role is shared via connection + */ + 'shared_via_connection'?: boolean | null; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} +type RoleResponsePrivilegesEnum = "USERDATAUPLOADING" | "DATADOWNLOADING" | "DATAMANAGEMENT" | "SHAREWITHALL" | "JOBSCHEDULING" | "A3ANALYSIS" | "BYPASSRLS" | "DISABLE_PINBOARD_CREATION" | "DEVELOPER" | "APPLICATION_ADMINISTRATION" | "USER_ADMINISTRATION" | "GROUP_ADMINISTRATION" | "SYSTEM_INFO_ADMINISTRATION" | "SYNCMANAGEMENT" | "ORG_ADMINISTRATION" | "ROLE_ADMINISTRATION" | "AUTHENTICATION_ADMINISTRATION" | "BILLING_INFO_ADMINISTRATION" | "CONTROL_TRUSTED_AUTH" | "TAGMANAGEMENT" | "LIVEBOARD_VERIFIER" | "CAN_MANAGE_CUSTOM_CALENDAR" | "CAN_CREATE_OR_EDIT_CONNECTIONS" | "CAN_MANAGE_WORKSHEET_VIEWS_TABLES" | "CAN_MANAGE_VERSION_CONTROL" | "THIRDPARTY_ANALYSIS" | "CAN_CREATE_CATALOG" | "ALLOW_NON_EMBED_FULL_APP_ACCESS" | "CAN_ACCESS_ANALYST_STUDIO" | "CAN_MANAGE_ANALYST_STUDIO" | "PREVIEW_DOCUMENT_SEARCH" | "CAN_MANAGE_VARIABLES" | "CAN_MODIFY_FOLDERS" | "CAN_VIEW_FOLDERS" | "CAN_MANAGE_AGENTSPOT" | "CAN_ACCESS_AGENTSPOT" | "CAN_SETUP_VERSION_CONTROL" | "PREVIEW_THOUGHTSPOT_SAGE" | "CAN_MANAGE_WEBHOOKS" | "CAN_DOWNLOAD_VISUALS" | "CAN_DOWNLOAD_DETAILED_DATA" | "CAN_USE_SPOTTER"; +type RoleResponsePermissionEnum = "READ_ONLY" | "MODIFY" | "NO_ACCESS"; + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +/** +* List of runtime parameters need to set during the session. +*/ +declare class RuntimeFilter { + /** + * Runtime filter parameter type in JWT. + */ + 'runtime_filter'?: any; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +/** +* List of runtime parameters need to set during the session. +*/ +declare class RuntimeParamOverride { + /** + * Runtime param override type in JWT. + */ + 'runtime_param_override'?: any; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +/** +* List of runtime parameters need to set during the session. +*/ +declare class RuntimeSort { + /** + * Runtime sort parameter type in JWT. + */ + 'runtime_sort'?: any; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +declare class ScheduleHistoryRunsOptionsInput { + /** + * Indicates whether to fetch history runs for the scheduled notification. + */ + 'include_history_runs'?: boolean | null; + /** + * Indicates the max number of records that can be fetched as past runs of any scheduled job. + */ + 'record_size'?: number | null; + /** + * Indicates the starting record number from where history runs records should be fetched. + */ + 'record_offset'?: number | null; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +/** +* Options for PDF export. +*/ +declare class SchedulesPdfOptionsInput { + /** + * Indicates whether to include complete Liveboard. + */ + 'complete_liveboard'?: boolean | null; + /** + * Indicates whether to include cover page with the Liveboard title. + */ + 'include_cover_page'?: boolean | null; + /** + * Indicates whether to include customized wide logo in the footer if available. + */ + 'include_custom_logo'?: boolean | null; + /** + * Indicates whether to include a page with all applied filters. + */ + 'include_filter_page'?: boolean | null; + /** + * Indicates whether to include page number in the footer of each page + */ + 'include_page_number'?: boolean | null; + /** + * Text to include in the footer of each page. + */ + 'page_footer_text'?: string | null; + /** + * Page orientation of the PDF. + */ + 'page_orientation'?: string | null; + /** + * Page size. + */ + 'page_size'?: SchedulesPdfOptionsInputPageSizeEnum | null; + /** + * Indicates whether to include only first page of the tables. + */ + 'truncate_table'?: boolean | null; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} +type SchedulesPdfOptionsInputPageSizeEnum = "A4" | "TAB_BASED"; + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +declare class Scope { + /** + * Object access scope type. + */ + 'access_type': string; + /** + * Unique identifier of the metadata. + */ + 'org_id'?: number | null; + /** + * Unique identifier of the Org. + */ + 'metadata_id'?: string | null; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +declare class SearchAuthSettingsRequest { + /** + * Type of authentication mechanism to retrieve settings for. Currently supports TRUSTED_AUTH. + */ + 'auth_type': SearchAuthSettingsRequestAuthTypeEnum; + /** + * Scope of auth settings to retrieve. When absent, both cluster and org settings are returned (subject to caller privileges). Set to CLUSTER to retrieve only cluster-level settings, or ORG to retrieve only org-level settings. + */ + 'scope'?: SearchAuthSettingsRequestScopeEnum; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} +type SearchAuthSettingsRequestAuthTypeEnum = "TRUSTED_AUTH"; +type SearchAuthSettingsRequestScopeEnum = "CLUSTER" | "ORG"; + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +/** +* Response for searchAuthSettings. Contains auth type and cluster/org-level preferences. +*/ +declare class SearchAuthSettingsResponse { + /** + * Type of authentication mechanism returned. + */ + 'auth_type'?: SearchAuthSettingsResponseAuthTypeEnum | null; + 'cluster_preferences'?: AuthClusterPreferences; + /** + * Org-level authentication configurations. Present when org scope was requested and per-org auth feature is enabled. + */ + 'org_preferences'?: Array | null; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} +type SearchAuthSettingsResponseAuthTypeEnum = "TRUSTED_AUTH"; + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +/** +* Sort options. +*/ +declare class SearchCalendarsRequestSortOptions { + /** + * Name of the field to apply the sort on. + */ + 'field_name'?: SearchCalendarsRequestSortOptionsFieldNameEnum | null; + /** + * Sort order : ASC(Ascending) or DESC(Descending). + */ + 'order'?: SearchCalendarsRequestSortOptionsOrderEnum | null; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} +type SearchCalendarsRequestSortOptionsFieldNameEnum = "DEFAULT" | "NAME" | "DISPLAY_NAME" | "AUTHOR" | "CREATED" | "MODIFIED"; +type SearchCalendarsRequestSortOptionsOrderEnum = "ASC" | "DESC"; + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +declare class SearchCalendarsRequest { + /** + * Unique ID or name of the connection. + */ + 'connection_identifier'?: string; + /** + * Pattern to match for calendar names (use \'%\' for wildcard match). + */ + 'name_pattern'?: string; + /** + * The starting record number from where the records should be included. + */ + 'record_offset'?: number; + /** + * The number of records that should be included. + */ + 'record_size'?: number; + 'sort_options'?: SearchCalendarsRequestSortOptions; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +declare class SearchChannelHistoryRequest { + /** + * Type of communication channel to search history for. + */ + 'channel_type': SearchChannelHistoryRequestChannelTypeEnum; + /** + * List of job execution record IDs to retrieve. + */ + 'job_ids'?: Array; + /** + * List of channel IDs or names to filter by. + */ + 'channel_identifiers'?: Array; + /** + * Filter by channel delivery status. + */ + 'channel_status'?: SearchChannelHistoryRequestChannelStatusEnum; + /** + * Filter by events that triggered the channel. + */ + 'events'?: Array; + /** + * Filter records created on or after this time (epoch milliseconds). + */ + 'start_epoch_time_in_millis'?: number; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} +type SearchChannelHistoryRequestChannelTypeEnum = "WEBHOOK"; +type SearchChannelHistoryRequestChannelStatusEnum = "PENDING" | "RETRY" | "SUCCESS" | "FAILED"; + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +/** +* Response wrapper for channel delivery history. +*/ +declare class SearchChannelHistoryResponse { + /** + * List of job execution records. + */ + 'jobs': Array; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +/** +* Sort options. +*/ +declare class SearchCollectionsRequestSortOptions { + /** + * Name of the field to apply the sort on. + */ + 'field_name'?: SearchCollectionsRequestSortOptionsFieldNameEnum | null; + /** + * Sort order : ASC(Ascending) or DESC(Descending). + */ + 'order'?: SearchCollectionsRequestSortOptionsOrderEnum | null; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} +type SearchCollectionsRequestSortOptionsFieldNameEnum = "NAME" | "DISPLAY_NAME" | "AUTHOR" | "CREATED" | "MODIFIED"; +type SearchCollectionsRequestSortOptionsOrderEnum = "ASC" | "DESC"; + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +declare class SearchCollectionsRequest { + /** + * A pattern to match case-insensitive name of the Collection object. Use \'%\' for wildcard match. + */ + 'name_pattern'?: string; + /** + * The starting record number from where the records should be included. + */ + 'record_offset'?: number; + /** + * The number of records that should be included. -1 implies no pagination. + */ + 'record_size'?: number; + /** + * Unique GUIDs of collections to search. Note: Collection names cannot be used as identifiers since duplicate names are allowed. + */ + 'collection_identifiers'?: Array; + /** + * Filter collections by author. Provide unique IDs or names of users who created the collections. + */ + 'created_by_user_identifiers'?: Array; + /** + * Include collection metadata items in the response. + */ + 'include_metadata'?: boolean | null; + 'sort_options'?: SearchCollectionsRequestSortOptions; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +declare class SearchCommitsRequest { + /** + * Unique ID or name of the metadata. + */ + 'metadata_identifier': string; + /** + * Type of metadata. + */ + 'metadata_type'?: SearchCommitsRequestMetadataTypeEnum; + /** + * Name of the branch from which commit history needs to be displayed. Note: If no branch_name is specified, then commits will be returned for the default branch for this configuration. + */ + 'branch_name'?: string; + /** + * Record offset point in the commit history to display the response. Note: If no record offset is specified, the beginning of the record will be considered. + */ + 'record_offset'?: number; + /** + * Number of history records from record offset point to be displayed in the response. Note: If no record size is specified, then all the records will be considered. + */ + 'record_size'?: number; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} +type SearchCommitsRequestMetadataTypeEnum = "LIVEBOARD" | "ANSWER" | "LOGICAL_TABLE" | "CUSTOM_ACTION"; + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +declare class SearchCommunicationChannelPreferencesRequest { + /** + * Event types to search for in cluster-level preferences. + */ + 'cluster_preferences'?: Array; + /** + * Org-specific search criteria. + */ + 'org_preferences'?: Array; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} +type SearchCommunicationChannelPreferencesRequestClusterPreferencesEnum = "LIVEBOARD_SCHEDULE"; + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +declare class SearchConfigRequest { + /** + * Applicable when Orgs is enabled in the cluster List of Org ids or name. Provide value -1 for cluster level. Example : [\"OrgID1-or-Name1\", \"OrgID2-or-Name2\"] Note: If no value is specified, then the configurations will be returned for all orgs the user has access to Version: 9.5.0.cl or later + */ + 'org_identifiers'?: Array; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +/** +* Sort options. +*/ +declare class SearchConnectionRequestSortOptions { + /** + * Name of the field to apply the sort on. + */ + 'field_name'?: SearchConnectionRequestSortOptionsFieldNameEnum | null; + /** + * Sort order : ASC(Ascending) or DESC(Descending). + */ + 'order'?: SearchConnectionRequestSortOptionsOrderEnum | null; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} +type SearchConnectionRequestSortOptionsFieldNameEnum = "NAME" | "DISPLAY_NAME" | "AUTHOR" | "CREATED" | "MODIFIED" | "LAST_ACCESSED" | "SYNCED" | "VIEWS" | "USER_STATE" | "ROW_COUNT"; +type SearchConnectionRequestSortOptionsOrderEnum = "ASC" | "DESC"; + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +declare class SearchConnectionRequest { + /** + * List of connections and name pattern + */ + 'connections'?: Array; + /** + * Array of types of data warehouse defined for the connection. + */ + 'data_warehouse_types'?: Array; + /** + * The starting record number from where the records should be included. + */ + 'record_offset'?: number; + /** + * The number of records that should be included. + */ + 'record_size'?: number; + /** + * Unique ID or name of tags. + */ + 'tag_identifiers'?: Array; + /** + * Data warehouse object type. + */ + 'data_warehouse_object_type'?: SearchConnectionRequestDataWarehouseObjectTypeEnum; + 'sort_options'?: SearchConnectionRequestSortOptions; + /** + * Indicates whether to include complete details of the connection objects. + */ + 'include_details'?: boolean | null; + /** + * Configuration values. If empty we are fetching configuration from datasource based on given connection id. If required you can provide config details to fetch specific details. Example input: {}, {\"warehouse\":\"SMALL_WH\",\"database\":\"DEVELOPMENT\"}. This is only applicable when data_warehouse_object_type is selected. + */ + 'configuration'?: any; + /** + * List of authentication types to fetch data_ware_house_objects from external Data warehouse. This is only applicable when data_warehouse_object_type is selected. + */ + 'authentication_type'?: SearchConnectionRequestAuthenticationTypeEnum; + /** + *
Version: 10.9.0.cl or later
Indicates whether to show resolved parameterised values. + */ + 'show_resolved_parameters'?: boolean | null; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} +type SearchConnectionRequestDataWarehouseTypesEnum = "SNOWFLAKE" | "AMAZON_REDSHIFT" | "GOOGLE_BIGQUERY" | "AZURE_SYNAPSE" | "TERADATA" | "SAP_HANA" | "STARBURST" | "ORACLE_ADW" | "DATABRICKS" | "DENODO" | "DREMIO" | "TRINO" | "PRESTO" | "POSTGRES" | "SQLSERVER" | "MYSQL" | "GENERIC_JDBC" | "AMAZON_RDS_POSTGRESQL" | "AMAZON_AURORA_POSTGRESQL" | "AMAZON_RDS_MYSQL" | "AMAZON_AURORA_MYSQL" | "LOOKER" | "AMAZON_ATHENA" | "SINGLESTORE" | "GCP_SQLSERVER" | "GCP_ALLOYDB_POSTGRESQL" | "GCP_POSTGRESQL" | "GCP_MYSQL" | "MODE" | "GOOGLE_SHEETS" | "FALCON" | "FALCON_ONPREM" | "CLICKHOUSE" | "IOMETE"; +type SearchConnectionRequestDataWarehouseObjectTypeEnum = "DATABASE" | "SCHEMA" | "TABLE" | "COLUMN"; +type SearchConnectionRequestAuthenticationTypeEnum = "SERVICE_ACCOUNT" | "OAUTH" | "IAM" | "EXTOAUTH" | "OAUTH_WITH_SERVICE_PRINCIPAL" | "PERSONAL_ACCESS_TOKEN" | "KEY_PAIR" | "OAUTH_WITH_PKCE" | "EXTOAUTH_WITH_PKCE" | "OAUTH_WITH_PEZ" | "OAUTH_CLIENT_CREDENTIALS"; + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +declare class SearchConnectionResponse { + /** + * Unique ID of the connection. + */ + 'id': string; + /** + * Name of the connection. + */ + 'name': string; + /** + * Description of the connection. + */ + 'description'?: string | null; + /** + * Type of data warehouse. + */ + 'data_warehouse_type': SearchConnectionResponseDataWarehouseTypeEnum; + 'data_warehouse_objects'?: DataWarehouseObjects; + /** + * Details of the connection. + */ + 'details'?: any | null; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} +type SearchConnectionResponseDataWarehouseTypeEnum = "SNOWFLAKE" | "AMAZON_REDSHIFT" | "GOOGLE_BIGQUERY" | "AZURE_SYNAPSE" | "TERADATA" | "SAP_HANA" | "STARBURST" | "ORACLE_ADW" | "DATABRICKS" | "DENODO" | "DREMIO" | "TRINO" | "PRESTO" | "POSTGRES" | "SQLSERVER" | "MYSQL" | "GENERIC_JDBC" | "AMAZON_RDS_POSTGRESQL" | "AMAZON_AURORA_POSTGRESQL" | "AMAZON_RDS_MYSQL" | "AMAZON_AURORA_MYSQL" | "LOOKER" | "AMAZON_ATHENA" | "SINGLESTORE" | "GCP_SQLSERVER" | "GCP_ALLOYDB_POSTGRESQL" | "GCP_POSTGRESQL" | "GCP_MYSQL" | "MODE" | "GOOGLE_SHEETS" | "FALCON" | "FALCON_ONPREM" | "CLICKHOUSE" | "IOMETE"; + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +/** +* Default Custom action configuration. This includes if the custom action is available on all visualizations. By default, a custom action is added to all visualizations and Answers. +*/ +declare class SearchCustomActionsRequestDefaultActionConfig { + /** + * Custom action is available on all visualizations. Earlier naming convention: LOCAL/GLOBAL. TRUE signifies GLOBAL for backward compatibility. + */ + 'visibility'?: boolean | null; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +declare class SearchCustomActionsRequest { + /** + * Name or ID of the custom action. + */ + 'custom_action_identifier'?: string; + /** + * A pattern to match case-insensitive name of the custom-action object. + */ + 'name_pattern'?: string; + 'default_action_config'?: SearchCustomActionsRequestDefaultActionConfig; + /** + * When set to true, returns the associated groups for a custom action. + */ + 'include_group_associations'?: boolean | null; + /** + * When set to true, returns the associated metadata for a custom action. + */ + 'include_metadata_associations'?: boolean | null; + /** + * Search with a given metadata identifier. + */ + 'metadata'?: Array; + /** + * Filter the action objects based on type + */ + 'type'?: SearchCustomActionsRequestTypeEnum; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} +type SearchCustomActionsRequestTypeEnum = "CALLBACK" | "URL"; + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +declare class SearchDataRequest { + /** + * Query string with search tokens. For example, [Sales][Region]. See [API Documentation](https://developers.thoughtspot.com/docs/fetch-data-and-report-apis#_search_data_api) + */ + 'query_string': string; + /** + * GUID of the data source object, such as a Worksheet, View, or Table. You can find the GUID of a data object from the UI or via API. See [API Documentation](https://developers.thoughtspot.com/docs/fetch-data-and-report-apis#_search_query) for more details. + */ + 'logical_table_identifier': string; + /** + * JSON output in compact or full format. The FULL option is available in 9.12.5.cl or later. + */ + 'data_format'?: SearchDataRequestDataFormatEnum; + /** + * The starting record number from where the records should be included. + */ + 'record_offset'?: number; + /** + * The number of records to include in a batch. + */ + 'record_size'?: number; + /** + * JSON object with representing filter condition to apply filters at runtime. For example, {\"col1\": \"item type\", \"op1\": \"EQ\", \"val1\": \"Bags\"} . You can add multiple keys by incrementing the number at the end, for example, col2, op2, val2, and col3, op3, val3. For more information, see [API Documentation](https://developers.thoughtspot.com/docs/fetch-data-and-report-apis#_runtime_filters). + */ + 'runtime_filter'?: any; + /** + * JSON object representing columns to sort data at runtime. For example, {\"sortCol1\": \"sales\", \"asc1\": true} . You can add multiple keys by incrementing the number at the end, for example, sortCol1, asc2. For more information, see [API Documentation](https://developers.thoughtspot.com/docs/fetch-data-and-report-apis#_runtime_sort). + */ + 'runtime_sort'?: any; + /** + * JSON object for setting values of parameters at runtime. For example, {\"param1\": \"Double List Param\", \"paramVal1\": 0.5}. You can add multiple keys by incrementing the number at the end, for example, param2, paramVal2. For more information, see [API Documentation](https://developers.thoughtspot.com/docs/fetch-data-and-report-apis#_runtime_parameters). + */ + 'runtime_param_override'?: any; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} +type SearchDataRequestDataFormatEnum = "FULL" | "COMPACT"; + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +/** +* Response format associated with the search data API. +*/ +declare class SearchDataResponse { + /** + * Data content of metadata objects + */ + 'contents': Array; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +declare class SearchEmailCustomizationRequest { + /** + * Unique ID or name of org Version: 10.12.0.cl or later + */ + 'org_identifiers'?: Array; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +/** +* Options to sort the API response by objects set as favorites for the logged-in user or the users specified in the API request. +*/ +declare class SearchMetadataRequestFavoriteObjectOptions { + /** + * Includes objects marked as favorite for the specified users. + */ + 'include'?: boolean | null; + /** + * Unique ID or name of the users. If not specified, the favorite objects of current logged in user are returned. + */ + 'user_identifiers'?: Array | null; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +/** +* Sort options to filter metadata details. +*/ +declare class SearchMetadataRequestSortOptions { + /** + * Name of the field to apply the sort on. + */ + 'field_name'?: SearchMetadataRequestSortOptionsFieldNameEnum | null; + /** + * Sort order : ASC(Ascending) or DESC(Descending). + */ + 'order'?: SearchMetadataRequestSortOptionsOrderEnum | null; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} +type SearchMetadataRequestSortOptionsFieldNameEnum = "NAME" | "DISPLAY_NAME" | "AUTHOR" | "CREATED" | "MODIFIED" | "VIEWS" | "FAVORITES" | "LAST_ACCESSED"; +type SearchMetadataRequestSortOptionsOrderEnum = "ASC" | "DESC"; + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +declare class SearchMetadataRequest { + /** + * Metadata objects such as Liveboards, Answers, and Worksheets. + */ + 'metadata'?: Array; + /** + * Object permission details to search by. + */ + 'permissions'?: Array; + /** + * GUID or name of user who created the metadata object. + */ + 'created_by_user_identifiers'?: Array; + /** + * Version of the dependent table of the metadata objects like Worksheets. + */ + 'dependent_object_version'?: SearchMetadataRequestDependentObjectVersionEnum; + /** + * List of metadata objects to exclude from search. + */ + 'exclude_objects'?: Array; + 'favorite_object_options'?: SearchMetadataRequestFavoriteObjectOptions; + /** + * Includes system-generated metadata objects. + */ + 'include_auto_created_objects'?: boolean | null; + /** + * Includes dependents of the metadata object specified in the API request. For example, a worksheet can consist of dependent objects such as Liveboards or Answers. + */ + 'include_dependent_objects'?: boolean | null; + /** + * The maximum number of dependents to include per metadata object. + */ + 'dependent_objects_record_size'?: number; + /** + * Includes complete details of the metadata objects. + */ + 'include_details'?: boolean | null; + /** + * When set to true and include_details is also true, includes personalised views in the metadata_detail for LIVEBOARD objects. + */ + 'include_personalised_views'?: boolean | null; + /** + * Includes headers of the metadata objects. + */ + 'include_headers'?: boolean | null; + /** + * Includes details of the hidden objects, such as a column in a worksheet or a table. + */ + 'include_hidden_objects'?: boolean | null; + /** + * Includes objects with incomplete metadata. + */ + 'include_incomplete_objects'?: boolean | null; + /** + * Includes visualization headers of the specified Liveboard object. + */ + 'include_visualization_headers'?: boolean | null; + /** + * If search assistance lessons are configured on a worksheet, the API returns the search assist data for Worksheet objects. + */ + 'include_worksheet_search_assist_data'?: boolean | null; + /** + * Includes ID or names of the users who modified the metadata object. + */ + 'modified_by_user_identifiers'?: Array; + /** + * The starting record number from where the records should be included. + */ + 'record_offset'?: number; + /** + * The number of records that should be included. It is recommended to use a smaller `record_size` when fetching dependent objects or any of the additional metadata detail options. + */ + 'record_size'?: number; + 'sort_options'?: SearchMetadataRequestSortOptions; + /** + * Tags to filter metadata objects by + */ + 'tag_identifiers'?: Array; + /** + * Indicates whether to include stats of the metadata objects. + */ + 'include_stats'?: boolean | null; + /** + *
Version: 10.7.0.cl or later
Boolean to indicate whether to include discoverable metadata objects. + */ + 'include_discoverable_objects'?: boolean | null; + /** + *
Version: 10.9.0.cl or later
Indicates whether to show resolved parameterised values. + */ + 'show_resolved_parameters'?: boolean | null; + /** + * Indicates the model version of Liveboard to be attached in metadata detail. + */ + 'liveboard_response_version'?: SearchMetadataRequestLiveboardResponseVersionEnum; + /** + *
Version: 10.11.0.cl or later
If only published objects should be returned + */ + 'include_only_published_objects'?: boolean | null; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} +type SearchMetadataRequestDependentObjectVersionEnum = "V1" | "V2"; +type SearchMetadataRequestLiveboardResponseVersionEnum = "V1" | "V2"; + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +declare class SearchOrgsRequest { + /** + * ID or name of the Org + */ + 'org_identifier'?: string; + /** + * Description of the Org + */ + 'description'?: string; + /** + * Visibility of the Org + */ + 'visibility'?: SearchOrgsRequestVisibilityEnum; + /** + * Status of the Org + */ + 'status'?: SearchOrgsRequestStatusEnum; + /** + * GUIDs or names of the users for which you want to retrieve the Orgs data + */ + 'user_identifiers'?: Array; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} +type SearchOrgsRequestVisibilityEnum = "SHOW" | "HIDDEN"; +type SearchOrgsRequestStatusEnum = "ACTIVE" | "IN_ACTIVE"; + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +/** +* Response for search role api should handle hidden privileges as well. +*/ +declare class SearchRoleResponse { + /** + * Unique Id of the role. + */ + 'id': string; + /** + * Name of the role + */ + 'name': string; + /** + * Description of the role + */ + 'description': string; + /** + * number of groups assigned with this role + */ + 'groups_assigned_count'?: number | null; + /** + * Orgs in which role exists. + */ + 'orgs'?: Array | null; + /** + * Details of groups assigned with this role + */ + 'groups'?: Array | null; + /** + * Privileges granted to the role. + */ + 'privileges': Array; + /** + * Permission details of the Role + */ + 'permission'?: SearchRoleResponsePermissionEnum | null; + /** + * Unique identifier of author of the role. + */ + 'author_id'?: string | null; + /** + * Unique identifier of modifier of the role. + */ + 'modifier_id'?: string | null; + /** + * Creation time of the role in milliseconds. + */ + 'creation_time_in_millis'?: any | null; + /** + * Last modified time of the role in milliseconds. + */ + 'modification_time_in_millis'?: any | null; + /** + * Indicates whether the role is deleted. + */ + 'deleted'?: boolean | null; + /** + * Indicates whether the role is deprecated. + */ + 'deprecated'?: boolean | null; + /** + * Indicates whether the role is external. + */ + 'external'?: boolean | null; + /** + * Indicates whether the role is hidden. + */ + 'hidden'?: boolean | null; + /** + * Indicates whether the role is shared via connection + */ + 'shared_via_connection'?: boolean | null; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} +type SearchRoleResponsePrivilegesEnum = "UNKNOWN" | "ADMINISTRATION" | "AUTHORING" | "USERDATAUPLOADING" | "DATADOWNLOADING" | "USERMANAGEMENT" | "SECURITYMANAGEMENT" | "LOGICALMODELING" | "DATAMANAGEMENT" | "TAGMANAGEMENT" | "SHAREWITHALL" | "SYSTEMMANAGEMENT" | "JOBSCHEDULING" | "A3ANALYSIS" | "EXPERIMENTALFEATUREPRIVILEGE" | "BYPASSRLS" | "RANALYSIS" | "DISABLE_PINBOARD_CREATION" | "DEVELOPER" | "APPLICATION_ADMINISTRATION" | "USER_ADMINISTRATION" | "GROUP_ADMINISTRATION" | "BACKUP_ADMINISTRATION" | "SYSTEM_INFO_ADMINISTRATION" | "ENABLESPOTAPPCREATION" | "SYNCMANAGEMENT" | "ORG_ADMINISTRATION" | "ROLE_ADMINISTRATION" | "AUTHENTICATION_ADMINISTRATION" | "BILLING_INFO_ADMINISTRATION" | "PREVIEW_THOUGHTSPOT_SAGE" | "LIVEBOARD_VERIFIER" | "CAN_MANAGE_CUSTOM_CALENDAR" | "CAN_CREATE_OR_EDIT_CONNECTIONS" | "CAN_CONFIGURE_CONNECTIONS" | "CAN_MANAGE_WORKSHEET_VIEWS_TABLES" | "CAN_MANAGE_VERSION_CONTROL" | "THIRDPARTY_ANALYSIS" | "CONTROL_TRUSTED_AUTH" | "CAN_CREATE_CATALOG" | "ALLOW_NON_EMBED_FULL_APP_ACCESS" | "CAN_ACCESS_ANALYST_STUDIO" | "CAN_MANAGE_ANALYST_STUDIO" | "CAN_VIEW_FOLDERS" | "CAN_MODIDY_FOLDERS" | "CAN_MANAGE_VARIABLES" | "CAN_MANAGE_AGENTSPOT" | "CAN_ACCESS_AGENTSPOT" | "PREVIEW_DOCUMENT_SEARCH" | "CAN_SETUP_VERSION_CONTROL" | "CAN_MANAGE_WEBHOOKS" | "CAN_DOWNLOAD_VISUALS" | "CAN_DOWNLOAD_DETAILED_DATA" | "CAN_USE_SPOTTER"; +type SearchRoleResponsePermissionEnum = "READ_ONLY" | "MODIFY" | "NO_ACCESS"; + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +declare class SearchRolesRequest { + /** + * unique ID or name of the Roles + */ + 'role_identifiers'?: Array; + /** + * Unique Id or name of the Organisation + */ + 'org_identifiers'?: Array; + /** + * Unique Id or name of the User Group + */ + 'group_identifiers'?: Array; + /** + * Privileges assigned to the Role. See [Documentation](https://developers.thoughtspot.com/docs/rbac#_role_categories_and_privileges)for supported roles privileges. + */ + 'privileges'?: Array; + /** + * Indicates whether the Role is deprecated. + */ + 'deprecated'?: boolean | null; + /** + * Indicates whether the Role is external + */ + 'external'?: boolean | null; + /** + * Indicates whether the Role is shared via connection + */ + 'shared_via_connection'?: boolean | null; + /** + * Permission details of the Role + */ + 'permissions'?: Array; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} +type SearchRolesRequestPrivilegesEnum = "UNKNOWN" | "ADMINISTRATION" | "AUTHORING" | "USERDATAUPLOADING" | "DATADOWNLOADING" | "USERMANAGEMENT" | "SECURITYMANAGEMENT" | "LOGICALMODELING" | "DATAMANAGEMENT" | "TAGMANAGEMENT" | "SHAREWITHALL" | "SYSTEMMANAGEMENT" | "JOBSCHEDULING" | "A3ANALYSIS" | "EXPERIMENTALFEATUREPRIVILEGE" | "BYPASSRLS" | "RANALYSIS" | "DISABLE_PINBOARD_CREATION" | "DEVELOPER" | "APPLICATION_ADMINISTRATION" | "USER_ADMINISTRATION" | "GROUP_ADMINISTRATION" | "BACKUP_ADMINISTRATION" | "SYSTEM_INFO_ADMINISTRATION" | "ENABLESPOTAPPCREATION" | "SYNCMANAGEMENT" | "ORG_ADMINISTRATION" | "ROLE_ADMINISTRATION" | "AUTHENTICATION_ADMINISTRATION" | "BILLING_INFO_ADMINISTRATION" | "PREVIEW_THOUGHTSPOT_SAGE" | "LIVEBOARD_VERIFIER" | "CAN_MANAGE_CUSTOM_CALENDAR" | "CAN_CREATE_OR_EDIT_CONNECTIONS" | "CAN_CONFIGURE_CONNECTIONS" | "CAN_MANAGE_WORKSHEET_VIEWS_TABLES" | "CAN_MANAGE_VERSION_CONTROL" | "THIRDPARTY_ANALYSIS" | "CONTROL_TRUSTED_AUTH" | "CAN_CREATE_CATALOG" | "ALLOW_NON_EMBED_FULL_APP_ACCESS" | "CAN_ACCESS_ANALYST_STUDIO" | "CAN_MANAGE_ANALYST_STUDIO" | "CAN_VIEW_FOLDERS" | "CAN_MODIDY_FOLDERS" | "CAN_MANAGE_VARIABLES" | "CAN_MANAGE_AGENTSPOT" | "CAN_ACCESS_AGENTSPOT" | "PREVIEW_DOCUMENT_SEARCH" | "CAN_SETUP_VERSION_CONTROL" | "CAN_MANAGE_WEBHOOKS" | "CAN_DOWNLOAD_VISUALS" | "CAN_DOWNLOAD_DETAILED_DATA" | "CAN_USE_SPOTTER"; +type SearchRolesRequestPermissionsEnum = "READ_ONLY" | "MODIFY" | "NO_ACCESS"; + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +/** +* Options while fetching history runs for the schedule. +*/ +declare class SearchSchedulesRequestHistoryRunsOptions { + /** + * Indicates whether to fetch history runs for the scheduled notification. + */ + 'include_history_runs'?: boolean | null; + /** + * Indicates the max number of records that can be fetched as past runs of any scheduled job. + */ + 'record_size'?: number | null; + /** + * Indicates the starting record number from where history runs records should be fetched. + */ + 'record_offset'?: number | null; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +/** +* Sort options. +*/ +declare class SearchSchedulesRequestSortOptions { + /** + * Name of the field to apply the sort on. + */ + 'field_name'?: string | null; + /** + * Sort order : ASC(Ascending) or DESC(Descending). + */ + 'order'?: string | null; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +declare class SearchSchedulesRequest { + /** + * Metadata objects associated with the scheduled jobs. + */ + 'metadata'?: Array; + /** + * The starting record number from where the records should be included. + */ + 'record_offset'?: number; + /** + * The number of records that should be included. + */ + 'record_size'?: number; + 'sort_options'?: SearchSchedulesRequestSortOptions; + 'history_runs_options'?: SearchSchedulesRequestHistoryRunsOptions; + /** + * unique ID or name of the Schedule + */ + 'schedule_identifiers'?: Array; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +declare class SearchSecuritySettingsRequest { + /** + * Scope of security settings to retrieve. CLUSTER returns cluster-level settings, ORG returns org-level settings for the current org. If not specified, returns both cluster and org settings based on user privileges. + */ + 'scope'?: SearchSecuritySettingsRequestScopeEnum; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} +type SearchSecuritySettingsRequestScopeEnum = "CLUSTER" | "ORG"; + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +declare class SearchTagsRequest { + /** + * Name or Id of the tag. + */ + 'tag_identifier'?: string; + /** + * A pattern to match case-insensitive name of the Tag object. + */ + 'name_pattern'?: string; + /** + * Color of the tag. + */ + 'color'?: string; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +/** +* Sort options to filter group details. +*/ +declare class SearchUserGroupsRequestSortOptions { + /** + * Name of the field to apply the sort on. + */ + 'field_name'?: SearchUserGroupsRequestSortOptionsFieldNameEnum | null; + /** + * Sort order : ASC(Ascending) or DESC(Descending). + */ + 'order'?: SearchUserGroupsRequestSortOptionsOrderEnum | null; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} +type SearchUserGroupsRequestSortOptionsFieldNameEnum = "NAME" | "DISPLAY_NAME" | "AUTHOR" | "CREATED" | "MODIFIED"; +type SearchUserGroupsRequestSortOptionsOrderEnum = "ASC" | "DESC"; + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +declare class SearchUserGroupsRequest { + /** + * GUID of Liveboards that are assigned as default Liveboards to the users in the group. + */ + 'default_liveboard_identifiers'?: Array; + /** + * Description of the group + */ + 'description'?: string; + /** + * Display name of the group + */ + 'display_name'?: string; + /** + * A pattern to match case-insensitive name of the Group object. + */ + 'name_pattern'?: string; + /** + * GUID or name of the group + */ + 'group_identifier'?: string; + /** + * ID or name of the Org to which the group belongs + */ + 'org_identifiers'?: Array; + /** + * Privileges assigned to the group. + */ + 'privileges'?: Array; + /** + * GUID or name of the sub groups. A subgroup is a group assigned to a parent group. + */ + 'sub_group_identifiers'?: Array; + /** + * Group type. + */ + 'type'?: SearchUserGroupsRequestTypeEnum; + /** + * GUID or name of the users assigned to the group. + */ + 'user_identifiers'?: Array; + /** + * Visibility of the group. To make a group visible to other users and groups, set the visibility to SHAREABLE. + */ + 'visibility'?: SearchUserGroupsRequestVisibilityEnum; + /** + * Filter groups with a list of Roles assigned to a group + */ + 'role_identifiers'?: Array; + /** + * The starting record number from where the records should be included. + */ + 'record_offset'?: number; + /** + * The number of records that should be included. + */ + 'record_size'?: number; + 'sort_options'?: SearchUserGroupsRequestSortOptions; + /** + *
Version: 10.10.0.cl or later
Define Parameter to consider if the users should be included in group search response. + */ + 'include_users'?: boolean | null; + /** + *
Version: 10.10.0.cl or later
Define Parameter to consider if the sub groups should be included in group search response. + */ + 'include_sub_groups'?: boolean | null; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} +type SearchUserGroupsRequestPrivilegesEnum = "ADMINISTRATION" | "AUTHORING" | "USERDATAUPLOADING" | "DATADOWNLOADING" | "USERMANAGEMENT" | "DATAMANAGEMENT" | "SHAREWITHALL" | "JOBSCHEDULING" | "A3ANALYSIS" | "EXPERIMENTALFEATUREPRIVILEGE" | "BYPASSRLS" | "RANALYSIS" | "DEVELOPER" | "USER_ADMINISTRATION" | "GROUP_ADMINISTRATION" | "SYNCMANAGEMENT" | "CAN_CREATE_CATALOG" | "DISABLE_PINBOARD_CREATION" | "LIVEBOARD_VERIFIER" | "PREVIEW_THOUGHTSPOT_SAGE" | "APPLICATION_ADMINISTRATION" | "SYSTEM_INFO_ADMINISTRATION" | "ORG_ADMINISTRATION" | "ROLE_ADMINISTRATION" | "AUTHENTICATION_ADMINISTRATION" | "BILLING_INFO_ADMINISTRATION" | "CAN_MANAGE_CUSTOM_CALENDAR" | "CAN_CREATE_OR_EDIT_CONNECTIONS" | "CAN_MANAGE_WORKSHEET_VIEWS_TABLES" | "CAN_MANAGE_VERSION_CONTROL" | "THIRDPARTY_ANALYSIS" | "ALLOW_NON_EMBED_FULL_APP_ACCESS" | "CAN_ACCESS_ANALYST_STUDIO" | "CAN_MANAGE_ANALYST_STUDIO" | "PREVIEW_DOCUMENT_SEARCH" | "CAN_MODIFY_FOLDERS" | "CAN_MANAGE_VARIABLES" | "CAN_VIEW_FOLDERS" | "CAN_MANAGE_AGENTSPOT" | "CAN_ACCESS_AGENTSPOT" | "CAN_SETUP_VERSION_CONTROL" | "CAN_MANAGE_WEBHOOKS" | "CAN_DOWNLOAD_VISUALS" | "CAN_DOWNLOAD_DETAILED_DATA" | "CAN_USE_SPOTTER"; +type SearchUserGroupsRequestTypeEnum = "LOCAL_GROUP" | "LDAP_GROUP" | "TEAM_GROUP" | "TENANT_GROUP"; +type SearchUserGroupsRequestVisibilityEnum = "SHARABLE" | "NON_SHARABLE"; + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +declare class SearchUsersRequest { + /** + * GUID / name of the user to search + */ + 'user_identifier'?: string; + /** + * A unique display name string for the user account, usually their first and last name + */ + 'display_name'?: string; + /** + * A pattern to match case-insensitive name of the User object. + */ + 'name_pattern'?: string; + /** + * Visibility of the user + */ + 'visibility'?: SearchUsersRequestVisibilityEnum; + /** + * Email of the user account + */ + 'email'?: string; + /** + * GUID or name of the group to which the user belongs + */ + 'group_identifiers'?: Array; + /** + * Privileges assigned to the user + */ + 'privileges'?: Array; + /** + * Type of the account + */ + 'account_type'?: SearchUsersRequestAccountTypeEnum; + /** + * Current status of the user account. + */ + 'account_status'?: SearchUsersRequestAccountStatusEnum; + /** + * User preference for receiving email notifications when another ThoughtSpot user shares a metadata object such as Answer, Liveboard, or Worksheet. + */ + 'notify_on_share'?: boolean | null; + /** + * The user preference for revisiting the onboarding experience + */ + 'show_onboarding_experience'?: boolean | null; + /** + * Indicates if the user has completed the onboarding walkthrough + */ + 'onboarding_experience_completed'?: boolean | null; + /** + * IDs or names of the Orgs to which the user belongs + */ + 'org_identifiers'?: Array; + /** + * Unique ID or name of the user\'s home Liveboard. + */ + 'home_liveboard_identifier'?: string; + /** + * Metadata objects which are assigned as favorites of the user. + */ + 'favorite_metadata'?: Array; + /** + * The starting record number from where the records should be included. + */ + 'record_offset'?: number; + /** + * The number of records that should be included. + */ + 'record_size'?: number; + 'sort_options'?: SearchCollectionsRequestSortOptions; + /** + * Filters by the role assigned to the user. + */ + 'role_identifiers'?: Array; + /** + * Indicates if the user\'s favorite objects should be displayed. + */ + 'include_favorite_metadata'?: boolean | null; + /** + * Indicates if the user\'s formula variable values should be included in the response. + */ + 'include_variable_values'?: boolean | null; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} +type SearchUsersRequestVisibilityEnum = "SHARABLE" | "NON_SHARABLE"; +type SearchUsersRequestPrivilegesEnum = "ADMINISTRATION" | "AUTHORING" | "USERDATAUPLOADING" | "DATADOWNLOADING" | "USERMANAGEMENT" | "DATAMANAGEMENT" | "SHAREWITHALL" | "JOBSCHEDULING" | "A3ANALYSIS" | "EXPERIMENTALFEATUREPRIVILEGE" | "BYPASSRLS" | "RANALYSIS" | "DEVELOPER" | "USER_ADMINISTRATION" | "GROUP_ADMINISTRATION" | "SYNCMANAGEMENT" | "CAN_CREATE_CATALOG" | "DISABLE_PINBOARD_CREATION" | "LIVEBOARD_VERIFIER" | "PREVIEW_THOUGHTSPOT_SAGE" | "APPLICATION_ADMINISTRATION" | "SYSTEM_INFO_ADMINISTRATION" | "ORG_ADMINISTRATION" | "ROLE_ADMINISTRATION" | "AUTHENTICATION_ADMINISTRATION" | "BILLING_INFO_ADMINISTRATION" | "CAN_MANAGE_CUSTOM_CALENDAR" | "CAN_CREATE_OR_EDIT_CONNECTIONS" | "CAN_MANAGE_WORKSHEET_VIEWS_TABLES" | "CAN_MANAGE_VERSION_CONTROL" | "THIRDPARTY_ANALYSIS" | "ALLOW_NON_EMBED_FULL_APP_ACCESS" | "CAN_ACCESS_ANALYST_STUDIO" | "CAN_MANAGE_ANALYST_STUDIO" | "PREVIEW_DOCUMENT_SEARCH" | "CAN_MODIFY_FOLDERS" | "CAN_MANAGE_VARIABLES" | "CAN_VIEW_FOLDERS" | "CAN_MANAGE_AGENTSPOT" | "CAN_ACCESS_AGENTSPOT" | "CAN_SETUP_VERSION_CONTROL" | "CAN_MANAGE_WEBHOOKS" | "CAN_DOWNLOAD_VISUALS" | "CAN_DOWNLOAD_DETAILED_DATA" | "CAN_USE_SPOTTER"; +type SearchUsersRequestAccountTypeEnum = "LOCAL_USER" | "LDAP_USER" | "SAML_USER" | "OIDC_USER" | "REMOTE_USER"; +type SearchUsersRequestAccountStatusEnum = "ACTIVE" | "INACTIVE" | "EXPIRED" | "LOCKED" | "PENDING" | "SUSPENDED"; + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +/** +* Input for filtering variable values by scope in search operations +*/ +declare class ValueScopeInput { + /** + * The unique name of the org + */ + 'org_identifier'?: string | null; + /** + * Type of principal to filter by. Use USER to filter values assigned to specific users, or USER_GROUP to filter values assigned to groups. + */ + 'principal_type'?: ValueScopeInputPrincipalTypeEnum | null; + /** + * Unique ID or name of the principal + */ + 'principal_identifier'?: string | null; + /** + * Unique ID or name of the model to filter by. Applicable only for FORMULA_VARIABLE type. + */ + 'model_identifier'?: string | null; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} +type ValueScopeInputPrincipalTypeEnum = "USER" | "USER_GROUP"; + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +/** +* Input for variable details in search +*/ +declare class VariableDetailInput { + /** + * Unique ID or name of the variable + */ + 'identifier'?: string | null; + /** + * Type of variable + */ + 'type'?: VariableDetailInputTypeEnum | null; + /** + * A pattern to match case-insensitive name of the variable. User % for a wildcard match + */ + 'name_pattern'?: string | null; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} +type VariableDetailInputTypeEnum = "CONNECTION_PROPERTY" | "TABLE_MAPPING" | "CONNECTION_PROPERTY_PER_PRINCIPAL" | "FORMULA_VARIABLE" | "USER_PROPERTY"; + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +declare class SearchVariablesRequest { + /** + * Variable details + */ + 'variable_details'?: Array; + /** + * Array of scope filters + */ + 'value_scope'?: Array; + /** + * The starting record number from where the records should be included + */ + 'record_offset'?: number; + /** + * The number of records that should be included + */ + 'record_size'?: number; + /** + * Format in which we want the output + */ + 'response_content'?: SearchVariablesRequestResponseContentEnum; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} +type SearchVariablesRequestResponseContentEnum = "METADATA" | "METADATA_AND_VALUES"; + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +/** +* Sort option includes sort field and sort order. +*/ +declare class SearchWebhookConfigurationsRequestSortOptions { + /** + * Name of the field to apply the sort on. + */ + 'field_name'?: SearchWebhookConfigurationsRequestSortOptionsFieldNameEnum | null; + /** + * Sort order: ASC (Ascending) or DESC (Descending). + */ + 'order'?: SearchWebhookConfigurationsRequestSortOptionsOrderEnum | null; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} +type SearchWebhookConfigurationsRequestSortOptionsFieldNameEnum = "CREATED" | "MODIFIED" | "NAME"; +type SearchWebhookConfigurationsRequestSortOptionsOrderEnum = "ASC" | "DESC"; + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +declare class SearchWebhookConfigurationsRequest { + /** + * Unique ID or name of the org. + */ + 'org_identifier'?: string; + /** + * Unique ID or name of the webhook. + */ + 'webhook_identifier'?: string; + /** + * Type of webhook event to filter by. + */ + 'event_type'?: SearchWebhookConfigurationsRequestEventTypeEnum; + /** + * The offset point, starting from where the webhooks should be included in the response. + */ + 'record_offset'?: number; + /** + * The number of webhooks that should be included in the response starting from offset position. + */ + 'record_size'?: number; + 'sort_options'?: SearchWebhookConfigurationsRequestSortOptions; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} +type SearchWebhookConfigurationsRequestEventTypeEnum = "LIVEBOARD_SCHEDULE"; + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +/** +* Cluster-level security preferences. +*/ +declare class SecuritySettingsClusterPreferences { + /** + * Support embedded access when third-party cookies are blocked. + */ + 'enable_partitioned_cookies'?: boolean | null; + /** + * Allowed origins for CORS. + */ + 'cors_whitelisted_urls'?: Array | null; + 'csp_settings'?: CspSettings; + /** + * Allowed redirect hosts for SAML login. + */ + 'saml_redirect_urls'?: Array | null; + 'non_embed_access'?: ClusterNonEmbedAccess; + /** + * Trusted authentication status at the cluster level. Version: 26.6.0.cl or later + */ + 'trusted_auth_status'?: SecuritySettingsClusterPreferencesTrustedAuthStatusEnum | null; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} +type SecuritySettingsClusterPreferencesTrustedAuthStatusEnum = "ENABLED" | "DISABLED"; + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +/** +* Input for cluster-level security preferences configuration. +*/ +declare class SecuritySettingsClusterPreferencesInput { + /** + * Support embedded access when third-party cookies are blocked. + */ + 'enable_partitioned_cookies'?: boolean | null; + /** + * Allowed origins for CORS. + */ + 'cors_whitelisted_urls'?: Array | null; + 'csp_settings'?: CspSettingsInput; + /** + * Allowed redirect hosts for SAML login. + */ + 'saml_redirect_urls'?: Array | null; + 'non_embed_access'?: ClusterNonEmbedAccessInput; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +/** +* Org details for security settings. +*/ +declare class SecuritySettingsOrgDetails { + /** + * Unique identifier of the org. + */ + 'id'?: number | null; + /** + * Name of the org. + */ + 'name'?: string | null; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +/** +* Org-level security preferences. +*/ +declare class SecuritySettingsOrgPreferences { + 'org'?: SecuritySettingsOrgDetails; + /** + * Allowed origins for CORS for this org. + */ + 'cors_whitelisted_urls'?: Array | null; + 'non_embed_access'?: OrgNonEmbedAccess; + /** + * Trusted authentication status for this org. Version: 26.6.0.cl or later + */ + 'trusted_auth_status'?: SecuritySettingsOrgPreferencesTrustedAuthStatusEnum | null; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} +type SecuritySettingsOrgPreferencesTrustedAuthStatusEnum = "ENABLED" | "DISABLED"; + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +/** +* Response type for security settings search. +*/ +declare class SecuritySettingsResponse { + 'cluster_preferences'?: SecuritySettingsClusterPreferences; + /** + * Org-level security preferences. + */ + 'org_preferences'?: Array | null; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +declare class SendAgentConversationMessageRequest { + /** + * messages to be sent to the agent + */ + 'messages': Array; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +declare class SendAgentConversationMessageStreamingRequest { + /** + * messages to be sent to the agent + */ + 'messages': Array; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +declare class SendAgentMessageRequest { + /** + * messages to be sent to the agent + */ + 'messages': Array; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +declare class SendAgentMessageResponse { + /** + * Indicates whether the agent response was received and processed successfully. + */ + 'success': boolean; + /** + * Optional message providing additional context about the operation outcome. + */ + 'message'?: string | null; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +declare class SendAgentMessageStreamingRequest { + /** + * Unique identifier for the conversation (used to track context) + */ + 'conversation_identifier': string; + /** + * messages to be sent to the agent + */ + 'messages': Array; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +declare class SendMessageRequest { + /** + * ID of the metadata object, such as a Worksheet or Model, to use as a data source for the conversation. + */ + 'metadata_identifier': string; + /** + * A message string with the follow-up question to continue the conversation. + */ + 'message': string; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +declare class SetNLInstructionsRequest { + /** + * Unique ID or name of the data-model for which to set NL instructions. + */ + 'data_source_identifier': string; + /** + * List of NL instructions to set for the data-model. + */ + 'nl_instructions_info': Array; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +declare class ShareMetadataTypeInput { + /** + * Type of metadata. Type of metadata. Required if the name of the object is set as the identifier. This attribute is optional when the object GUID is specified as the identifier. + */ + 'type'?: ShareMetadataTypeInputTypeEnum | null; + /** + * Unique ID or name of the metadata object. + */ + 'identifier': string; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} +type ShareMetadataTypeInputTypeEnum = "LIVEBOARD" | "ANSWER" | "LOGICAL_TABLE" | "LOGICAL_COLUMN" | "CONNECTION" | "COLLECTION"; + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +declare class SharePermissionsInput { + 'principal': PrincipalsInput; + /** + * Type of access to the shared object + */ + 'share_mode': SharePermissionsInputShareModeEnum; + /** + * Content share mode for collections. Controls access to objects within the collection. Only applicable when sharing COLLECTION metadata type. + */ + 'content_share_mode'?: SharePermissionsInputContentShareModeEnum | null; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} +type SharePermissionsInputShareModeEnum = "READ_ONLY" | "MODIFY" | "NO_ACCESS"; +type SharePermissionsInputContentShareModeEnum = "READ_ONLY" | "MODIFY"; + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +declare class ShareMetadataRequest { + /** + * Type of metadata. Required if identifier in metadata_identifies is a name. 1. Liveboard 2. Answers 3. LOGICAL_TABLE for any data object such as table, worksheet or view. 4. LOGICAL_COLUMN 5. Connection 6. Collection + */ + 'metadata_type'?: ShareMetadataRequestMetadataTypeEnum; + /** + * Unique ID or name of metadata objects. Note: All the names should belong to same metadata_type + */ + 'metadata_identifiers'?: Array; + /** + * Metadata details for sharing objects. + */ + 'metadata'?: Array; + /** + * Permission details for sharing the objects. + */ + 'permissions': Array; + /** + * Options to specify details of Liveboard. First Liveboard encountered in payload is considered to be the corresponding Liveboard. + */ + 'visualization_identifiers'?: Array; + /** + * Email IDs to which notifications will be sent. + */ + 'emails'?: Array; + /** + * Message to be included in notification. + */ + 'message': string; + /** + * Sends object URLs in the customized format in email notifications. + */ + 'enable_custom_url'?: boolean | null; + /** + * Flag to notify user when any object is shared. + */ + 'notify_on_share'?: boolean | null; + /** + * Flag to make the object discoverable. + */ + 'has_lenient_discoverability'?: boolean | null; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} +type ShareMetadataRequestMetadataTypeEnum = "LIVEBOARD" | "ANSWER" | "LOGICAL_TABLE" | "LOGICAL_COLUMN" | "CONNECTION" | "COLLECTION"; + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +declare class SingleAnswerRequest { + /** + * A natural language query string to generate the Answer. + */ + 'query': string; + /** + * ID of the metadata object, such as a Worksheet or Model, to use as a data source for the query. + */ + 'metadata_identifier': string; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +declare class SortOption { + /** + * Name of the field to apply the sort on. + */ + 'field_name'?: SortOptionFieldNameEnum | null; + /** + * Sort order : ASC(Ascending) or DESC(Descending). + */ + 'order'?: SortOptionOrderEnum | null; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} +type SortOptionFieldNameEnum = "DEFAULT" | "NAME" | "DISPLAY_NAME" | "AUTHOR" | "CREATED" | "MODIFIED"; +type SortOptionOrderEnum = "ASC" | "DESC"; + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +declare class SortOptionInput { + /** + * Name of the field to apply the sort on. + */ + 'field_name'?: SortOptionInputFieldNameEnum | null; + /** + * Sort order : ASC(Ascending) or DESC(Descending). + */ + 'order'?: SortOptionInputOrderEnum | null; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} +type SortOptionInputFieldNameEnum = "NAME" | "DISPLAY_NAME" | "AUTHOR" | "CREATED" | "MODIFIED" | "LAST_ACCESSED" | "SYNCED" | "VIEWS" | "USER_STATE" | "ROW_COUNT"; +type SortOptionInputOrderEnum = "ASC" | "DESC"; + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +/** +* Sort options. +*/ +declare class SortOptions { + /** + * Name of the field to apply the sort on. + */ + 'field_name'?: SortOptionsFieldNameEnum | null; + /** + * Sort order : ASC(Ascending) or DESC(Descending). + */ + 'order'?: SortOptionsOrderEnum | null; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} +type SortOptionsFieldNameEnum = "NAME" | "DISPLAY_NAME" | "AUTHOR" | "CREATED" | "MODIFIED"; +type SortOptionsOrderEnum = "ASC" | "DESC"; + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +/** +* Sort options. +*/ +declare class SortingOptions { + /** + * Name of the field to apply the sort on. + */ + 'field_name'?: string | null; + /** + * Sort order : ASC(Ascending) or DESC(Descending). + */ + 'order'?: string | null; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +/** +* Response format associated with fetch SQL query api +*/ +declare class SqlQuery { + /** + * Unique identifier of the metadata. + */ + 'metadata_id': string; + /** + * Name of the metadata. + */ + 'metadata_name': string; + /** + * SQL query of a metadata object. + */ + 'sql_query': string; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +declare class SqlQueryResponse { + /** + * Unique identifier of the metadata. + */ + 'metadata_id': string; + /** + * Name of the metadata. + */ + 'metadata_name': string; + /** + * Type of the metadata. + */ + 'metadata_type': SqlQueryResponseMetadataTypeEnum; + /** + * SQL query details of metadata objects. + */ + 'sql_queries': Array; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} +type SqlQueryResponseMetadataTypeEnum = "LIVEBOARD" | "ANSWER" | "LOGICAL_TABLE" | "LOGICAL_COLUMN" | "CONNECTION" | "TAG" | "USER" | "USER_GROUP" | "LOGICAL_RELATIONSHIP"; + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +/** +* Storage configuration containing provider-specific settings. +*/ +declare class StorageConfig { + 'aws_s3_config'?: AwsS3Config; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +/** +* Storage destination configuration for webhook payload delivery. +*/ +declare class StorageDestination { + /** + * Type of storage destination (e.g., AWS_S3). + */ + 'storage_type': StorageDestinationStorageTypeEnum; + 'storage_config': StorageConfig; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} +type StorageDestinationStorageTypeEnum = "AWS_S3"; + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +/** +* Input type for storage destination configuration. +*/ +declare class StorageDestinationInput { + /** + * Type of storage destination. Example: \"AWS_S3\" + */ + 'storage_type': StorageDestinationInputStorageTypeEnum; + 'storage_config': StorageConfigInput; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} +type StorageDestinationInputStorageTypeEnum = "AWS_S3"; + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +declare class SyncMetadataRequest { + /** + * Array of tables to sync. Each element can be: - String: Table identifier (GUID or name) to sync all columns for that table. - Object: {tableId: [columnIds]} to sync specific columns. If not provided, syncs all tables in the connection. + */ + 'tables'?: any; + /** + * List of sync_attributes to sync from CDW. The default value is DESCRIPTION. + */ + 'sync_attributes'?: Array; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} +type SyncMetadataRequestSyncAttributesEnum = "DESCRIPTION"; + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +/** +* Response from sync metadata operation. +*/ +declare class SyncMetadataResponse { + /** + * Overall status of the sync operation. + */ + 'status'?: SyncMetadataResponseStatusEnum | null; + /** + * Number of tables with metadata updates. + */ + 'tables_updated'?: number | null; + /** + * Number of columns with metadata updates. + */ + 'columns_updated'?: number | null; + /** + * Number of tables that failed to sync (for PARTIAL_SUCCESS). + */ + 'tables_failed'?: number | null; + /** + * Number of columns that failed to sync (for PARTIAL_SUCCESS). + */ + 'columns_failed'?: number | null; + /** + * Message describing the result. + */ + 'message'?: string | null; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} +type SyncMetadataResponseStatusEnum = "SUCCESS" | "PARTIAL_SUCCESS" | "NO_UPDATE"; + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +declare class SystemConfig { + 'onboarding_content_url'?: string | null; + 'saml_enabled'?: boolean | null; + 'okta_enabled'?: boolean | null; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +declare class SystemInfo { + /** + * The unique identifier of the object + */ + 'id'?: string | null; + /** + * Name of the cluster. + */ + 'name'?: string | null; + /** + * The release version of the cluster. + */ + 'release_version'?: string | null; + /** + * The timezone of the cluster. + */ + 'time_zone'?: string | null; + /** + * The default locale of the cluster. + */ + 'locale'?: string | null; + /** + * The default date format representation of the cluster. + */ + 'date_format'?: string | null; + /** + * The API version of the cluster. + */ + 'api_version'?: string | null; + /** + * The deployment type of the cluster. + */ + 'type'?: string | null; + /** + * The deployed environment of the cluster. + */ + 'environment'?: string | null; + /** + * The license applied to the cluster. + */ + 'license'?: string | null; + /** + * The default date time format representation of the cluster. + */ + 'date_time_format'?: string | null; + /** + * The default time format representation of the cluster. + */ + 'time_format'?: string | null; + /** + * The unique identifier of system user. + */ + 'system_user_id'?: string | null; + /** + * The unique identifier of super user. + */ + 'super_user_id'?: string | null; + /** + * The unique identifier of hidden object. + */ + 'hidden_object_id'?: string | null; + /** + * The unique identifier of system group. + */ + 'system_group_id'?: string | null; + /** + * The unique identifier of tsadmin user. + */ + 'tsadmin_user_id'?: string | null; + /** + * The unique identifier of admin group. + */ + 'admin_group_id'?: string | null; + /** + * The unique identifier of all tables connection. + */ + 'all_tables_connection_id'?: string | null; + /** + * The unique identifier of ALL group. + */ + 'all_user_group_id'?: string | null; + /** + * The supported accept language by the cluster. + */ + 'accept_language'?: string | null; + /** + * The count of users of ALL group. + */ + 'all_user_group_member_user_count'?: number | null; + /** + * The version number of logical model of the cluster. + */ + 'logical_model_version'?: number | null; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +declare class SystemOverrideInfo { + 'config_override_info'?: any | null; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +declare class Tag { + 'name': string; + 'id': string; + 'color'?: string | null; + 'deleted'?: boolean | null; + 'hidden'?: boolean | null; + 'external'?: boolean | null; + 'deprecated'?: boolean | null; + 'creation_time_in_millis'?: number | null; + 'modification_time_in_millis'?: number | null; + 'author_id'?: string | null; + 'modifier_id'?: string | null; + 'owner_id'?: string | null; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +/** +* Email customization configuration properties +*/ +declare class TemplatePropertiesInputCreate { + /** + * Background color for call-to-action button in hex format + */ + 'cta_button_bg_color'?: string | null; + /** + * Text color for call-to-action button in hex format + */ + 'cta_text_font_color'?: string | null; + /** + * Primary background color in hex format + */ + 'primary_bg_color'?: string | null; + /** + * Home page URL (HTTP/HTTPS only) + */ + 'home_url'?: string | null; + /** + * Logo image URL (HTTP/HTTPS only) + */ + 'logo_url'?: string | null; + /** + * Font family for email content (e.g., Arial, sans-serif) + */ + 'font_family'?: string | null; + /** + * Product name to display + */ + 'product_name'?: string | null; + /** + * Footer address text + */ + 'footer_address'?: string | null; + /** + * Footer phone number + */ + 'footer_phone'?: string | null; + /** + * Replacement value for Liveboard + */ + 'replacement_value_for_liveboard'?: string | null; + /** + * Replacement value for Answer + */ + 'replacement_value_for_answer'?: string | null; + /** + * Replacement value for SpotIQ + */ + 'replacement_value_for_spot_iq'?: string | null; + /** + * Whether to hide footer address + */ + 'hide_footer_address'?: boolean | null; + /** + * Whether to hide footer phone number + */ + 'hide_footer_phone'?: boolean | null; + /** + * Whether to hide manage notification link + */ + 'hide_manage_notification'?: boolean | null; + /** + * Whether to hide mobile app nudge + */ + 'hide_mobile_app_nudge'?: boolean | null; + /** + * Whether to hide privacy policy link + */ + 'hide_privacy_policy'?: boolean | null; + /** + * Whether to hide product name + */ + 'hide_product_name'?: boolean | null; + /** + * Whether to hide ThoughtSpot vocabulary definitions + */ + 'hide_ts_vocabulary_definitions'?: boolean | null; + /** + * Whether to hide notification status + */ + 'hide_notification_status'?: boolean | null; + /** + * Whether to hide error message + */ + 'hide_error_message'?: boolean | null; + /** + * Whether to hide unsubscribe link + */ + 'hide_unsubscribe_link'?: boolean | null; + /** + * Whether to hide modify alert + */ + 'hide_modify_alert'?: boolean | null; + /** + * Company privacy policy URL (HTTP/HTTPS only) + */ + 'company_privacy_policy_url'?: string | null; + /** + * Company website URL (HTTP/HTTPS only) + */ + 'company_website_url'?: string | null; + /** + * Contact support url (HTTP/HTTPS only). Version: 26.2.0.cl or later + */ + 'contact_support_url'?: string | null; + /** + * Whether to hide contact support url. Version: 26.2.0.cl or later + */ + 'hide_contact_support_url'?: boolean | null; + /** + * Whether to hide logo Version: 26.4.0.cl or later + */ + 'hide_logo_url'?: boolean | null; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +declare class Token { + /** + * Bearer auth token. + */ + 'token': string; + /** + * Token creation time in milliseconds. + */ + 'creation_time_in_millis': number; + /** + * Token expiration time in milliseconds. + */ + 'expiration_time_in_millis': number; + 'scope': Scope; + /** + * Username to whom the token is issued. + */ + 'valid_for_user_id': string; + /** + * Unique identifier of the user to whom the token is issued. + */ + 'valid_for_username': string; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +declare class TokenValidationResponse { + /** + * Token creation time in milliseconds. + */ + 'creation_time_in_millis': number; + /** + * Token expiration time in milliseconds. + */ + 'expiration_time_in_millis': number; + 'scope': Scope; + /** + * Username to whom the token is issued. + */ + 'valid_for_user_id': string; + /** + * Type of token. + */ + 'token_type': string; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +declare class UnassignTagRequest { + /** + * Metadata objects. + */ + 'metadata': Array; + /** + * GUID or name of the tag. + */ + 'tag_identifiers': Array; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +declare class UnparameterizeMetadataRequest { + /** + * Type of metadata object to unparameterize. + */ + 'metadata_type'?: UnparameterizeMetadataRequestMetadataTypeEnum; + /** + * Unique ID or name of the metadata object to unparameterize. + */ + 'metadata_identifier': string; + /** + * Type of field in the metadata to unparameterize. + */ + 'field_type': UnparameterizeMetadataRequestFieldTypeEnum; + /** + * Name of the field which needs to be unparameterized. + */ + 'field_name': string; + /** + * The value to use in place of the variable for the field + */ + 'value': string; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} +type UnparameterizeMetadataRequestMetadataTypeEnum = "LOGICAL_TABLE" | "CONNECTION" | "CONNECTION_CONFIG"; +type UnparameterizeMetadataRequestFieldTypeEnum = "ATTRIBUTE" | "CONNECTION_PROPERTY"; + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +declare class UnpublishMetadataRequest { + /** + * Force unpublishes the object. This will break all the dependent objects in the unpublished orgs. + */ + 'force'?: boolean | null; + /** + * Should we unpublish all the dependencies for the objects specified. The dependencies will be unpublished if no other published object is using it. + */ + 'include_dependencies': boolean; + /** + * Metadata objects. + */ + 'metadata': Array; + /** + * Unique ID or name of orgs. + */ + 'org_identifiers': Array; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +/** +* Table reference containing connection identifier and table details in this format: `{\"connection_identifier\":\"conn1\", \"database_name\":\"db1\", \"schema_name\":\"sc1\", \"table_name\":\"tb1\"}`. +*/ +declare class UpdateCalendarRequestTableReference { + /** + * Unique ID or name of the connection. + */ + 'connection_identifier': string; + /** + * Name of the database. + */ + 'database_name'?: string | null; + /** + * Name of the schema. + */ + 'schema_name'?: string | null; + /** + * Name of the table. Table names may be case-sensitive depending on the database system. + */ + 'table_name': string; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +declare class UpdateCalendarRequest { + /** + * Type of update operation. + */ + 'update_method'?: UpdateCalendarRequestUpdateMethodEnum; + 'table_reference': UpdateCalendarRequestTableReference; + /** + * Start date for the calendar in `MM/dd/yyyy` format. This parameter is mandatory if `update_method` is set as `FROM_INPUT_PARAMS`. + */ + 'start_date'?: string; + /** + * End date for the calendar in `MM/dd/yyyy` format. This parameter is mandatory if `update_method` is set as `FROM_INPUT_PARAMS`. + */ + 'end_date'?: string; + /** + * Type of the calendar. + */ + 'calendar_type'?: UpdateCalendarRequestCalendarTypeEnum; + /** + * Specify the month in which the fiscal or custom calendar year should start. For example, if you set `month_offset` to \"April\", the custom calendar will treat \"April\" as the first month of the year, and the related attributes such as quarters and start date will be based on this offset. The default value is `January`, which represents the standard calendar year (January to December). + */ + 'month_offset'?: UpdateCalendarRequestMonthOffsetEnum; + /** + * Specify the starting day of the week + */ + 'start_day_of_week'?: UpdateCalendarRequestStartDayOfWeekEnum; + /** + * Prefix to add before the quarter. + */ + 'quarter_name_prefix'?: string; + /** + * Prefix to add before the year. + */ + 'year_name_prefix'?: string; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} +type UpdateCalendarRequestUpdateMethodEnum = "FROM_INPUT_PARAMS" | "FROM_EXISTING_TABLE"; +type UpdateCalendarRequestCalendarTypeEnum = "MONTH_OFFSET" | "FOUR_FOUR_FIVE" | "FOUR_FIVE_FOUR" | "FIVE_FOUR_FOUR"; +type UpdateCalendarRequestMonthOffsetEnum = "January" | "February" | "March" | "April" | "May" | "June" | "July" | "August" | "September" | "October" | "November" | "December"; +type UpdateCalendarRequestStartDayOfWeekEnum = "Sunday" | "Monday" | "Tuesday" | "Wednesday" | "Thursday" | "Friday" | "Saturday"; + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +declare class UpdateCollectionRequest { + /** + * Name of the collection. + */ + 'name'?: string; + /** + * Description of the collection. + */ + 'description'?: string; + /** + * Metadata objects to add, remove, or replace in the collection. + */ + 'metadata'?: Array; + /** + * Type of update operation. Default operation type is REPLACE. + */ + 'operation'?: UpdateCollectionRequestOperationEnum; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} +type UpdateCollectionRequestOperationEnum = "ADD" | "REMOVE" | "REPLACE"; + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +declare class UpdateColumnSecurityRulesRequest { + /** + * GUID or name of the table for which we want to create column security rules + */ + 'identifier'?: string; + /** + * The object ID of the table + */ + 'obj_identifier'?: string; + /** + * If true, then all the secured columns will be marked as unprotected, and all the group associations will be removed + */ + 'clear_csr'?: boolean | null; + /** + * Array where each object defines the security rule for a specific column + */ + 'column_security_rules': Array; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +declare class UpdateConfigRequest { + /** + * Username to authenticate connection to version control system + */ + 'username'?: string; + /** + * Access token corresponding to the user to authenticate connection to version control system + */ + 'access_token'?: string; + /** + * Applicable when Orgs is enabled in the cluster List of Org ids or name. Provide value -1 for cluster level. Example : [\"OrgID1-or-Name1\", \"OrgID2-or-Name2\"] Note: If no value is specified, then the configurations will be returned for all orgs the user has access to Version: 9.5.0.cl or later + */ + 'org_identifier'?: string; + /** + * List the remote branches to configure. Example:[development, production] + */ + 'branch_names'?: Array; + /** + * Name of the remote branch where objects from this Thoughtspot instance will be versioned. Version: 9.7.0.cl or later + */ + 'commit_branch_name'?: string; + /** + * Maintain mapping of guid for the deployment to an instance Version: 9.4.0.cl or later + */ + 'enable_guid_mapping'?: boolean | null; + /** + * Name of the branch where the configuration files related to operations between Thoughtspot and version control repo should be maintained. Version: 9.7.0.cl or later + */ + 'configuration_branch_name'?: string; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +declare class UpdateConnectionConfigurationRequest { + /** + * Unique ID or name of the connection. + */ + 'connection_identifier': string; + /** + * Name of the configuration to update. + */ + 'name'?: string; + /** + * Description of the configuration. + */ + 'description'?: string; + /** + * Specifies whether the connection configuration should inherit all properties and authentication type from its parent connection. This attribute is only applicable to parameterized connections. When set to true, the configuration uses only the connection properties and authentication type inherited from the parent. Version: 26.2.0.cl or later + */ + 'same_as_parent'?: boolean | null; + 'policy_process_options'?: CreateConnectionConfigurationRequestPolicyProcessOptions; + /** + * Type of authentication. + */ + 'authentication_type'?: UpdateConnectionConfigurationRequestAuthenticationTypeEnum; + /** + * Configuration properties in JSON. + */ + 'configuration'?: any; + /** + * Type of policy. + */ + 'policy_type'?: UpdateConnectionConfigurationRequestPolicyTypeEnum; + /** + * Unique ID or name of the User and User Groups. + */ + 'policy_principals'?: Array; + /** + * Action that the query performed on the data warehouse, such as SAGE_INDEXING and ROW_COUNT_STATS. + */ + 'policy_processes'?: Array; + /** + * Indicates whether the configuration enable/disable. + */ + 'disable'?: boolean | null; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} +type UpdateConnectionConfigurationRequestAuthenticationTypeEnum = "SERVICE_ACCOUNT" | "OAUTH" | "OAUTH_WITH_SERVICE_PRINCIPAL" | "EXTOAUTH" | "KEY_PAIR" | "EXTOAUTH_WITH_PKCE" | "OAUTH_WITH_PKCE" | "PERSONAL_ACCESS_TOKEN" | "OAUTH_CLIENT_CREDENTIALS"; +type UpdateConnectionConfigurationRequestPolicyTypeEnum = "NO_POLICY" | "PRINCIPALS" | "PROCESSES"; +type UpdateConnectionConfigurationRequestPolicyProcessesEnum = "SAGE_INDEXING" | "ROW_COUNT_STATS"; + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +declare class UpdateConnectionRequest { + /** + * Unique ID or name of the connection. + */ + 'connection_identifier': string; + /** + * Updated name of the connection. + */ + 'name'?: string; + /** + * Updated description of the connection. + */ + 'description'?: string; + /** + * Configuration of the data warehouse in JSON. + */ + 'data_warehouse_config'?: any; + /** + * Indicates whether to validate the connection details. + */ + 'validate'?: boolean | null; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +declare class UpdateConnectionStatusRequest { + /** + * Status to set for the connection. Use ACTIVATED to enable the connection or DEACTIVATED to disable it. + */ + 'status'?: UpdateConnectionStatusRequestStatusEnum; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} +type UpdateConnectionStatusRequestStatusEnum = "ACTIVATED" | "DEACTIVATED"; + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +declare class UpdateConnectionV2Request { + /** + * Updated name of the connection. + */ + 'name'?: string; + /** + * Updated description of the connection. + */ + 'description'?: string; + /** + * Configuration of the data warehouse in JSON. + */ + 'data_warehouse_config'?: any; + /** + * Indicates whether to validate the connection details. + */ + 'validate'?: boolean | null; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +/** +* Action details includes `Type` and Configuration for Custom Actions, either Callback or URL is required. +*/ +declare class UpdateCustomActionRequestActionDetails { + 'CALLBACK'?: CALLBACKInput; + 'URL'?: URLInput; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +/** +* Default Custom action configuration. This includes if the custom action available on visualizations and Answers. By default, a custom action is added to all visualizations and Answers. +*/ +declare class UpdateCustomActionRequestDefaultActionConfig { + /** + * Custom action is available on all visualizations. Earlier naming convention: LOCAL/GLOBAL. TRUE signifies GLOBAL for backward compatibility. + */ + 'visibility'?: boolean | null; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +declare class UpdateCustomActionRequest { + 'action_details'?: UpdateCustomActionRequestActionDetails; + /** + * Metadata objects to which the custom action needs to be associated. + */ + 'associate_metadata'?: Array; + 'default_action_config'?: UpdateCustomActionRequestDefaultActionConfig; + /** + * Unique ID or name of the groups that can view and access the custom action. + */ + 'group_identifiers'?: Array; + /** + * Name of the custom action. The custom action name must be unique. + */ + 'name'?: string; + /** + * Type of update operation. Default operation type is ADD + */ + 'operation'?: UpdateCustomActionRequestOperationEnum; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} +type UpdateCustomActionRequestOperationEnum = "ADD" | "REMOVE"; + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +declare class UpdateEmailCustomizationRequest { + 'template_properties': CreateEmailCustomizationRequestTemplateProperties; + /** + * Unique ID or name of org + */ + 'org_identifier'?: string; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +declare class UpdateMetadataHeaderRequest { + /** + * List of header objects to update. + */ + 'headers_update': Array; + /** + * Unique ID or name of the organization. + */ + 'org_identifier'?: string; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +/** +* Input for updating object ID of a metadata object. +*/ +declare class UpdateObjIdInput { + /** + * GUID or name of the metadata object. + */ + 'metadata_identifier'?: string | null; + /** + * Type of metadata. Required if metadata_identifier is name of the object. + */ + 'type'?: UpdateObjIdInputTypeEnum | null; + /** + * Current object ID value. + */ + 'current_obj_id'?: string | null; + /** + * New object ID value to set. + */ + 'new_obj_id': string; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} +type UpdateObjIdInputTypeEnum = "ANSWER" | "LOGICAL_TABLE" | "LOGICAL_COLUMN" | "LIVEBOARD" | "ACTION_OBJECT" | "DATA_SOURCE" | "USER" | "USER_GROUP"; + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +declare class UpdateMetadataObjIdRequest { + /** + * List of metadata objects to update their object IDs. + */ + 'metadata': Array; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +declare class UpdateOrgRequest { + /** + * Name of the Org + */ + 'name'?: string; + /** + * Description of the Org + */ + 'description'?: string; + /** + * Add Users to an Org + */ + 'user_identifiers'?: Array; + /** + * Add Default Groups to an Org + */ + 'group_identifiers'?: Array; + /** + * Type of update operation. Default operation type is ADD + */ + 'operation'?: UpdateOrgRequestOperationEnum; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} +type UpdateOrgRequestOperationEnum = "ADD" | "REMOVE" | "REPLACE"; + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +declare class UpdateRoleRequest { + /** + * Name of the Role. + */ + 'name': string; + /** + * Description of the Role. + */ + 'description'?: string; + /** + * Privileges granted to the role. See [Documentation](https://developers.thoughtspot.com/docs/rbac#_role_categories_and_privileges)for supported roles privileges. + */ + 'privileges'?: Array; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} +type UpdateRoleRequestPrivilegesEnum = "USERDATAUPLOADING" | "DATADOWNLOADING" | "DATAMANAGEMENT" | "SHAREWITHALL" | "JOBSCHEDULING" | "A3ANALYSIS" | "BYPASSRLS" | "DISABLE_PINBOARD_CREATION" | "DEVELOPER" | "APPLICATION_ADMINISTRATION" | "USER_ADMINISTRATION" | "GROUP_ADMINISTRATION" | "SYSTEM_INFO_ADMINISTRATION" | "SYNCMANAGEMENT" | "ORG_ADMINISTRATION" | "ROLE_ADMINISTRATION" | "AUTHENTICATION_ADMINISTRATION" | "BILLING_INFO_ADMINISTRATION" | "CONTROL_TRUSTED_AUTH" | "TAGMANAGEMENT" | "LIVEBOARD_VERIFIER" | "CAN_MANAGE_CUSTOM_CALENDAR" | "CAN_CREATE_OR_EDIT_CONNECTIONS" | "CAN_MANAGE_WORKSHEET_VIEWS_TABLES" | "CAN_MANAGE_VERSION_CONTROL" | "THIRDPARTY_ANALYSIS" | "CAN_CREATE_CATALOG" | "CAN_ACCESS_ANALYST_STUDIO" | "CAN_MANAGE_ANALYST_STUDIO" | "CAN_MODIFY_FOLDERS" | "CAN_MANAGE_VARIABLES" | "CAN_VIEW_FOLDERS" | "CAN_MANAGE_AGENTSPOT" | "CAN_ACCESS_AGENTSPOT" | "PREVIEW_DOCUMENT_SEARCH" | "PREVIEW_THOUGHTSPOT_SAGE" | "CAN_MANAGE_WEBHOOKS" | "CAN_DOWNLOAD_VISUALS" | "CAN_DOWNLOAD_DETAILED_DATA" | "CAN_USE_SPOTTER"; + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +/** +* Frequency of the scheduled job run. +*/ +declare class UpdateScheduleRequestFrequency { + 'cron_expression': CronExpressionInput; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +/** +* Options to specify the details of a Liveboard. +*/ +declare class UpdateScheduleRequestLiveboardOptions { + /** + * Unique ID or name of visualizations. + */ + 'visualization_identifiers': Array; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +/** +* Options for PDF export. +*/ +declare class UpdateScheduleRequestPdfOptions { + /** + * Indicates whether to include complete Liveboard. + */ + 'complete_liveboard'?: boolean | null; + /** + * Indicates whether to include cover page with the Liveboard title. + */ + 'include_cover_page'?: boolean | null; + /** + * Indicates whether to include customized wide logo in the footer if available. + */ + 'include_custom_logo'?: boolean | null; + /** + * Indicates whether to include a page with all applied filters. + */ + 'include_filter_page'?: boolean | null; + /** + * Indicates whether to include page number in the footer of each page + */ + 'include_page_number'?: boolean | null; + /** + * Text to include in the footer of each page. + */ + 'page_footer_text'?: string | null; + /** + * Page orientation of the PDF. + */ + 'page_orientation'?: string | null; + /** + * Page size. + */ + 'page_size'?: UpdateScheduleRequestPdfOptionsPageSizeEnum | null; + /** + * Indicates whether to include only first page of the tables. + */ + 'truncate_table'?: boolean | null; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} +type UpdateScheduleRequestPdfOptionsPageSizeEnum = "A4" | "TAB_BASED"; + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +/** +* Recipients of the scheduled job notifications. You can add the ID or name of the ThoughtSpot users or groups as recipients in the `principals` array. If a recipient is not a ThoughtSpot user, specify email address. +*/ +declare class UpdateScheduleRequestRecipientDetails { + /** + * Emails of the recipients. + */ + 'emails'?: Array | null; + /** + * User or groups to be set as recipients of the schedule notifications. + */ + 'principals'?: Array | null; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +declare class UpdateScheduleRequest { + /** + * Name of the scheduled job. + */ + 'name'?: string; + /** + * Description of the scheduled job. + */ + 'description'?: string; + /** + * Type of metadata object. + */ + 'metadata_type'?: UpdateScheduleRequestMetadataTypeEnum; + /** + * Unique ID or name of the metadata object. + */ + 'metadata_identifier'?: string; + /** + * Export file format. + */ + 'file_format'?: UpdateScheduleRequestFileFormatEnum; + 'liveboard_options'?: UpdateScheduleRequestLiveboardOptions; + 'pdf_options'?: UpdateScheduleRequestPdfOptions; + /** + * Time zone + */ + 'time_zone'?: UpdateScheduleRequestTimeZoneEnum; + 'frequency'?: UpdateScheduleRequestFrequency; + 'recipient_details'?: UpdateScheduleRequestRecipientDetails; + /** + * Status of the schedule + */ + 'status'?: UpdateScheduleRequestStatusEnum; + /** + * Personalised view id of the liveboard to be scheduled. + */ + 'personalised_view_id'?: string; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} +type UpdateScheduleRequestMetadataTypeEnum = "LIVEBOARD"; +type UpdateScheduleRequestFileFormatEnum = "CSV" | "PDF" | "XLSX"; +type UpdateScheduleRequestTimeZoneEnum = "Africa/Abidjan" | "Africa/Accra" | "Africa/Addis_Ababa" | "Africa/Algiers" | "Africa/Asmara" | "Africa/Asmera" | "Africa/Bamako" | "Africa/Bangui" | "Africa/Banjul" | "Africa/Bissau" | "Africa/Blantyre" | "Africa/Brazzaville" | "Africa/Bujumbura" | "Africa/Cairo" | "Africa/Casablanca" | "Africa/Ceuta" | "Africa/Conakry" | "Africa/Dakar" | "Africa/Dar_es_Salaam" | "Africa/Djibouti" | "Africa/Douala" | "Africa/El_Aaiun" | "Africa/Freetown" | "Africa/Gaborone" | "Africa/Harare" | "Africa/Johannesburg" | "Africa/Juba" | "Africa/Kampala" | "Africa/Khartoum" | "Africa/Kigali" | "Africa/Kinshasa" | "Africa/Lagos" | "Africa/Libreville" | "Africa/Lome" | "Africa/Luanda" | "Africa/Lubumbashi" | "Africa/Lusaka" | "Africa/Malabo" | "Africa/Maputo" | "Africa/Maseru" | "Africa/Mbabane" | "Africa/Mogadishu" | "Africa/Monrovia" | "Africa/Nairobi" | "Africa/Ndjamena" | "Africa/Niamey" | "Africa/Nouakchott" | "Africa/Ouagadougou" | "Africa/Porto-Novo" | "Africa/Sao_Tome" | "Africa/Timbuktu" | "Africa/Tripoli" | "Africa/Tunis" | "Africa/Windhoek" | "America/Adak" | "America/Anchorage" | "America/Anguilla" | "America/Antigua" | "America/Araguaina" | "America/Argentina/Buenos_Aires" | "America/Argentina/Catamarca" | "America/Argentina/ComodRivadavia" | "America/Argentina/Cordoba" | "America/Argentina/Jujuy" | "America/Argentina/La_Rioja" | "America/Argentina/Mendoza" | "America/Argentina/Rio_Gallegos" | "America/Argentina/Salta" | "America/Argentina/San_Juan" | "America/Argentina/San_Luis" | "America/Argentina/Tucuman" | "America/Argentina/Ushuaia" | "America/Aruba" | "America/Asuncion" | "America/Atikokan" | "America/Atka" | "America/Bahia" | "America/Bahia_Banderas" | "America/Barbados" | "America/Belem" | "America/Belize" | "America/Blanc-Sablon" | "America/Boa_Vista" | "America/Bogota" | "America/Boise" | "America/Buenos_Aires" | "America/Cambridge_Bay" | "America/Campo_Grande" | "America/Cancun" | "America/Caracas" | "America/Catamarca" | "America/Cayenne" | "America/Cayman" | "America/Chicago" | "America/Chihuahua" | "America/Coral_Harbour" | "America/Cordoba" | "America/Costa_Rica" | "America/Creston" | "America/Cuiaba" | "America/Curacao" | "America/Danmarkshavn" | "America/Dawson" | "America/Dawson_Creek" | "America/Denver" | "America/Detroit" | "America/Dominica" | "America/Edmonton" | "America/Eirunepe" | "America/El_Salvador" | "America/Ensenada" | "America/Fort_Nelson" | "America/Fort_Wayne" | "America/Fortaleza" | "America/Glace_Bay" | "America/Godthab" | "America/Goose_Bay" | "America/Grand_Turk" | "America/Grenada" | "America/Guadeloupe" | "America/Guatemala" | "America/Guayaquil" | "America/Guyana" | "America/Halifax" | "America/Havana" | "America/Hermosillo" | "America/Indiana/Indianapolis" | "America/Indiana/Knox" | "America/Indiana/Marengo" | "America/Indiana/Petersburg" | "America/Indiana/Tell_City" | "America/Indiana/Vevay" | "America/Indiana/Vincennes" | "America/Indiana/Winamac" | "America/Indianapolis" | "America/Inuvik" | "America/Iqaluit" | "America/Jamaica" | "America/Jujuy" | "America/Juneau" | "America/Kentucky/Louisville" | "America/Kentucky/Monticello" | "America/Knox_IN" | "America/Kralendijk" | "America/La_Paz" | "America/Lima" | "America/Los_Angeles" | "America/Louisville" | "America/Lower_Princes" | "America/Maceio" | "America/Managua" | "America/Manaus" | "America/Marigot" | "America/Martinique" | "America/Matamoros" | "America/Mazatlan" | "America/Mendoza" | "America/Menominee" | "America/Merida" | "America/Metlakatla" | "America/Mexico_City" | "America/Miquelon" | "America/Moncton" | "America/Monterrey" | "America/Montevideo" | "America/Montreal" | "America/Montserrat" | "America/Nassau" | "America/New_York" | "America/Nipigon" | "America/Nome" | "America/Noronha" | "America/North_Dakota/Beulah" | "America/North_Dakota/Center" | "America/North_Dakota/New_Salem" | "America/Nuuk" | "America/Ojinaga" | "America/Panama" | "America/Pangnirtung" | "America/Paramaribo" | "America/Phoenix" | "America/Port-au-Prince" | "America/Port_of_Spain" | "America/Porto_Acre" | "America/Porto_Velho" | "America/Puerto_Rico" | "America/Punta_Arenas" | "America/Rainy_River" | "America/Rankin_Inlet" | "America/Recife" | "America/Regina" | "America/Resolute" | "America/Rio_Branco" | "America/Rosario" | "America/Santa_Isabel" | "America/Santarem" | "America/Santiago" | "America/Santo_Domingo" | "America/Sao_Paulo" | "America/Scoresbysund" | "America/Shiprock" | "America/Sitka" | "America/St_Barthelemy" | "America/St_Johns" | "America/St_Kitts" | "America/St_Lucia" | "America/St_Thomas" | "America/St_Vincent" | "America/Swift_Current" | "America/Tegucigalpa" | "America/Thule" | "America/Thunder_Bay" | "America/Tijuana" | "America/Toronto" | "America/Tortola" | "America/Vancouver" | "America/Virgin" | "America/Whitehorse" | "America/Winnipeg" | "America/Yakutat" | "America/Yellowknife" | "Antarctica/Casey" | "Antarctica/Davis" | "Antarctica/DumontDUrville" | "Antarctica/Macquarie" | "Antarctica/Mawson" | "Antarctica/McMurdo" | "Antarctica/Palmer" | "Antarctica/Rothera" | "Antarctica/South_Pole" | "Antarctica/Syowa" | "Antarctica/Troll" | "Antarctica/Vostok" | "Arctic/Longyearbyen" | "Asia/Aden" | "Asia/Almaty" | "Asia/Amman" | "Asia/Anadyr" | "Asia/Aqtau" | "Asia/Aqtobe" | "Asia/Ashgabat" | "Asia/Ashkhabad" | "Asia/Atyrau" | "Asia/Baghdad" | "Asia/Bahrain" | "Asia/Baku" | "Asia/Bangkok" | "Asia/Barnaul" | "Asia/Beirut" | "Asia/Bishkek" | "Asia/Brunei" | "Asia/Calcutta" | "Asia/Chita" | "Asia/Choibalsan" | "Asia/Chongqing" | "Asia/Chungking" | "Asia/Colombo" | "Asia/Dacca" | "Asia/Damascus" | "Asia/Dhaka" | "Asia/Dili" | "Asia/Dubai" | "Asia/Dushanbe" | "Asia/Famagusta" | "Asia/Gaza" | "Asia/Harbin" | "Asia/Hebron" | "Asia/Ho_Chi_Minh" | "Asia/Hong_Kong" | "Asia/Hovd" | "Asia/Irkutsk" | "Asia/Istanbul" | "Asia/Jakarta" | "Asia/Jayapura" | "Asia/Jerusalem" | "Asia/Kabul" | "Asia/Kamchatka" | "Asia/Karachi" | "Asia/Kashgar" | "Asia/Kathmandu" | "Asia/Katmandu" | "Asia/Khandyga" | "Asia/Kolkata" | "Asia/Krasnoyarsk" | "Asia/Kuala_Lumpur" | "Asia/Kuching" | "Asia/Kuwait" | "Asia/Macao" | "Asia/Macau" | "Asia/Magadan" | "Asia/Makassar" | "Asia/Manila" | "Asia/Muscat" | "Asia/Nicosia" | "Asia/Novokuznetsk" | "Asia/Novosibirsk" | "Asia/Omsk" | "Asia/Oral" | "Asia/Phnom_Penh" | "Asia/Pontianak" | "Asia/Pyongyang" | "Asia/Qatar" | "Asia/Qostanay" | "Asia/Qyzylorda" | "Asia/Rangoon" | "Asia/Riyadh" | "Asia/Saigon" | "Asia/Sakhalin" | "Asia/Samarkand" | "Asia/Seoul" | "Asia/Shanghai" | "Asia/Singapore" | "Asia/Srednekolymsk" | "Asia/Taipei" | "Asia/Tashkent" | "Asia/Tbilisi" | "Asia/Tehran" | "Asia/Tel_Aviv" | "Asia/Thimbu" | "Asia/Thimphu" | "Asia/Tokyo" | "Asia/Tomsk" | "Asia/Ujung_Pandang" | "Asia/Ulaanbaatar" | "Asia/Ulan_Bator" | "Asia/Urumqi" | "Asia/Ust-Nera" | "Asia/Vientiane" | "Asia/Vladivostok" | "Asia/Yakutsk" | "Asia/Yangon" | "Asia/Yekaterinburg" | "Asia/Yerevan" | "Atlantic/Azores" | "Atlantic/Bermuda" | "Atlantic/Canary" | "Atlantic/Cape_Verde" | "Atlantic/Faeroe" | "Atlantic/Faroe" | "Atlantic/Jan_Mayen" | "Atlantic/Madeira" | "Atlantic/Reykjavik" | "Atlantic/South_Georgia" | "Atlantic/St_Helena" | "Atlantic/Stanley" | "Australia/ACT" | "Australia/Adelaide" | "Australia/Brisbane" | "Australia/Broken_Hill" | "Australia/Canberra" | "Australia/Currie" | "Australia/Darwin" | "Australia/Eucla" | "Australia/Hobart" | "Australia/LHI" | "Australia/Lindeman" | "Australia/Lord_Howe" | "Australia/Melbourne" | "Australia/NSW" | "Australia/North" | "Australia/Perth" | "Australia/Queensland" | "Australia/South" | "Australia/Sydney" | "Australia/Tasmania" | "Australia/Victoria" | "Australia/West" | "Australia/Yancowinna" | "Brazil/Acre" | "Brazil/DeNoronha" | "Brazil/East" | "Brazil/West" | "CET" | "CST6CDT" | "Canada/Atlantic" | "Canada/Central" | "Canada/Eastern" | "Canada/Mountain" | "Canada/Newfoundland" | "Canada/Pacific" | "Canada/Saskatchewan" | "Canada/Yukon" | "Chile/Continental" | "Chile/EasterIsland" | "Cuba" | "EET" | "EST5EDT" | "Egypt" | "Eire" | "Etc/GMT" | "Etc/GMT+0" | "Etc/GMT+1" | "Etc/GMT+10" | "Etc/GMT+11" | "Etc/GMT+12" | "Etc/GMT+2" | "Etc/GMT+3" | "Etc/GMT+4" | "Etc/GMT+5" | "Etc/GMT+6" | "Etc/GMT+7" | "Etc/GMT+8" | "Etc/GMT+9" | "Etc/GMT-0" | "Etc/GMT-1" | "Etc/GMT-10" | "Etc/GMT-11" | "Etc/GMT-12" | "Etc/GMT-13" | "Etc/GMT-14" | "Etc/GMT-2" | "Etc/GMT-3" | "Etc/GMT-4" | "Etc/GMT-5" | "Etc/GMT-6" | "Etc/GMT-7" | "Etc/GMT-8" | "Etc/GMT-9" | "Etc/GMT0" | "Etc/Greenwich" | "Etc/UCT" | "Etc/UTC" | "Etc/Universal" | "Etc/Zulu" | "Europe/Amsterdam" | "Europe/Andorra" | "Europe/Astrakhan" | "Europe/Athens" | "Europe/Belfast" | "Europe/Belgrade" | "Europe/Berlin" | "Europe/Bratislava" | "Europe/Brussels" | "Europe/Bucharest" | "Europe/Budapest" | "Europe/Busingen" | "Europe/Chisinau" | "Europe/Copenhagen" | "Europe/Dublin" | "Europe/Gibraltar" | "Europe/Guernsey" | "Europe/Helsinki" | "Europe/Isle_of_Man" | "Europe/Istanbul" | "Europe/Jersey" | "Europe/Kaliningrad" | "Europe/Kiev" | "Europe/Kirov" | "Europe/Kyiv" | "Europe/Lisbon" | "Europe/Ljubljana" | "Europe/London" | "Europe/Luxembourg" | "Europe/Madrid" | "Europe/Malta" | "Europe/Mariehamn" | "Europe/Minsk" | "Europe/Monaco" | "Europe/Moscow" | "Europe/Nicosia" | "Europe/Oslo" | "Europe/Paris" | "Europe/Podgorica" | "Europe/Prague" | "Europe/Riga" | "Europe/Rome" | "Europe/Samara" | "Europe/San_Marino" | "Europe/Sarajevo" | "Europe/Saratov" | "Europe/Simferopol" | "Europe/Skopje" | "Europe/Sofia" | "Europe/Stockholm" | "Europe/Tallinn" | "Europe/Tirane" | "Europe/Tiraspol" | "Europe/Ulyanovsk" | "Europe/Uzhgorod" | "Europe/Vaduz" | "Europe/Vatican" | "Europe/Vienna" | "Europe/Vilnius" | "Europe/Volgograd" | "Europe/Warsaw" | "Europe/Zagreb" | "Europe/Zaporozhye" | "Europe/Zurich" | "GB" | "GB-Eire" | "GMT" | "GMT0" | "Greenwich" | "Hongkong" | "Iceland" | "Indian/Antananarivo" | "Indian/Chagos" | "Indian/Christmas" | "Indian/Cocos" | "Indian/Comoro" | "Indian/Kerguelen" | "Indian/Mahe" | "Indian/Maldives" | "Indian/Mauritius" | "Indian/Mayotte" | "Indian/Reunion" | "Iran" | "Israel" | "Jamaica" | "Japan" | "Kwajalein" | "Libya" | "MET" | "MST7MDT" | "Mexico/BajaNorte" | "Mexico/BajaSur" | "Mexico/General" | "NZ" | "NZ-CHAT" | "Navajo" | "PRC" | "PST8PDT" | "Pacific/Apia" | "Pacific/Auckland" | "Pacific/Bougainville" | "Pacific/Chatham" | "Pacific/Chuuk" | "Pacific/Easter" | "Pacific/Efate" | "Pacific/Enderbury" | "Pacific/Fakaofo" | "Pacific/Fiji" | "Pacific/Funafuti" | "Pacific/Galapagos" | "Pacific/Gambier" | "Pacific/Guadalcanal" | "Pacific/Guam" | "Pacific/Honolulu" | "Pacific/Johnston" | "Pacific/Kanton" | "Pacific/Kiritimati" | "Pacific/Kosrae" | "Pacific/Kwajalein" | "Pacific/Majuro" | "Pacific/Marquesas" | "Pacific/Midway" | "Pacific/Nauru" | "Pacific/Niue" | "Pacific/Norfolk" | "Pacific/Noumea" | "Pacific/Pago_Pago" | "Pacific/Palau" | "Pacific/Pitcairn" | "Pacific/Pohnpei" | "Pacific/Ponape" | "Pacific/Port_Moresby" | "Pacific/Rarotonga" | "Pacific/Saipan" | "Pacific/Samoa" | "Pacific/Tahiti" | "Pacific/Tarawa" | "Pacific/Tongatapu" | "Pacific/Truk" | "Pacific/Wake" | "Pacific/Wallis" | "Pacific/Yap" | "Poland" | "Portugal" | "ROK" | "Singapore" | "SystemV/AST4" | "SystemV/AST4ADT" | "SystemV/CST6" | "SystemV/CST6CDT" | "SystemV/EST5" | "SystemV/EST5EDT" | "SystemV/HST10" | "SystemV/MST7" | "SystemV/MST7MDT" | "SystemV/PST8" | "SystemV/PST8PDT" | "SystemV/YST9" | "SystemV/YST9YDT" | "Turkey" | "UCT" | "US/Alaska" | "US/Aleutian" | "US/Arizona" | "US/Central" | "US/East-Indiana" | "US/Eastern" | "US/Hawaii" | "US/Indiana-Starke" | "US/Michigan" | "US/Mountain" | "US/Pacific" | "US/Samoa" | "UTC" | "Universal" | "W-SU" | "WET" | "Zulu" | "EST" | "HST" | "MST" | "ACT" | "AET" | "AGT" | "ART" | "AST" | "BET" | "BST" | "CAT" | "CNT" | "CST" | "CTT" | "EAT" | "ECT" | "IET" | "IST" | "JST" | "MIT" | "NET" | "NST" | "PLT" | "PNT" | "PRT" | "PST" | "SST" | "VST"; +type UpdateScheduleRequestStatusEnum = "ACTIVE" | "PAUSE"; + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +declare class UpdateSystemConfigRequest { + /** + * Configuration JSON with the key-value pair of configuration attributes to be updated. + */ + 'configuration': any; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +declare class UpdateTagRequest { + /** + * Name of the tag. + */ + 'name'?: string; + /** + * Hex color code to be assigned to the tag. For example, #ff78a9. + */ + 'color'?: string; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +declare class UpdateUserGroupRequest { + /** + * Name of the group to modify. + */ + 'name'?: string; + /** + * ID of the Liveboards to be assigned as default Liveboards to the users in the group. + */ + 'default_liveboard_identifiers'?: Array; + /** + * Description for the group. + */ + 'description'?: string; + /** + * Display name of the group. + */ + 'display_name'?: string; + /** + * Privileges to assign to the group. + */ + 'privileges'?: Array; + /** + * GUID or name of the sub groups. A subgroup is a group assigned to a parent group. + */ + 'sub_group_identifiers'?: Array; + /** + * Type of the group + */ + 'type'?: UpdateUserGroupRequestTypeEnum; + /** + * GUID or name of the users to assign to the group. + */ + 'user_identifiers'?: Array; + /** + * Visibility of the group. To make a group visible to other users and groups, set the visibility to SHAREABLE. + */ + 'visibility'?: UpdateUserGroupRequestVisibilityEnum; + /** + * Role identifiers of the Roles that should be assigned to the group. + */ + 'role_identifiers'?: Array; + /** + * Type of update operation. Default operation type is REPLACE + */ + 'operation'?: UpdateUserGroupRequestOperationEnum; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} +type UpdateUserGroupRequestPrivilegesEnum = "ADMINISTRATION" | "AUTHORING" | "USERDATAUPLOADING" | "DATADOWNLOADING" | "USERMANAGEMENT" | "DATAMANAGEMENT" | "SHAREWITHALL" | "JOBSCHEDULING" | "A3ANALYSIS" | "EXPERIMENTALFEATUREPRIVILEGE" | "BYPASSRLS" | "RANALYSIS" | "DEVELOPER" | "USER_ADMINISTRATION" | "GROUP_ADMINISTRATION" | "SYNCMANAGEMENT" | "CAN_CREATE_CATALOG" | "DISABLE_PINBOARD_CREATION" | "LIVEBOARD_VERIFIER" | "PREVIEW_THOUGHTSPOT_SAGE" | "CAN_MANAGE_VERSION_CONTROL" | "THIRDPARTY_ANALYSIS" | "ALLOW_NON_EMBED_FULL_APP_ACCESS" | "CAN_ACCESS_ANALYST_STUDIO" | "CAN_MANAGE_ANALYST_STUDIO" | "CAN_MODIFY_FOLDERS" | "CAN_MANAGE_VARIABLES" | "CAN_VIEW_FOLDERS" | "CAN_MANAGE_AGENTSPOT" | "CAN_ACCESS_AGENTSPOT" | "PREVIEW_DOCUMENT_SEARCH" | "CAN_SETUP_VERSION_CONTROL" | "CAN_DOWNLOAD_VISUALS" | "CAN_DOWNLOAD_DETAILED_DATA" | "CAN_USE_SPOTTER"; +type UpdateUserGroupRequestTypeEnum = "LOCAL_GROUP" | "LDAP_GROUP" | "TEAM_GROUP" | "TENANT_GROUP"; +type UpdateUserGroupRequestVisibilityEnum = "SHARABLE" | "NON_SHARABLE"; +type UpdateUserGroupRequestOperationEnum = "ADD" | "REMOVE" | "REPLACE"; + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +declare class UpdateUserRequest { + /** + * Name of the user. The username string must be unique. + */ + 'name'?: string; + /** + * A unique display name string for the user account, usually their first and last name + */ + 'display_name'?: string; + /** + * Visibility of the users. When set to SHARABLE, the user is visible to other users and groups when they try to share an object. + */ + 'visibility'?: UpdateUserRequestVisibilityEnum; + /** + * Email of the user account + */ + 'email'?: string; + /** + * Current status of the user account. The `SUSPENDED` user state indicates a transitional state applicable to IAMv2 users only. + */ + 'account_status'?: UpdateUserRequestAccountStatusEnum; + /** + * User preference for receiving email notifications when another ThoughtSpot user shares a metadata object such as Answer, Liveboard, or Worksheet. + */ + 'notify_on_share'?: boolean | null; + /** + * The user preference for revisiting the onboarding experience. + */ + 'show_onboarding_experience'?: boolean | null; + /** + * Indicates if the user has completed the onboarding and allows turning off the onboarding walkthrough. + */ + 'onboarding_experience_completed'?: boolean | null; + /** + * Type of the account. + */ + 'account_type'?: UpdateUserRequestAccountTypeEnum; + /** + * GUIDs or names of the groups. + */ + 'group_identifiers'?: Array; + /** + * GUID of the Liveboard to set a default Liveboard for the user. ThoughtSpot displays this Liveboard on the Home page when the user logs in. + */ + 'home_liveboard_identifier'?: string; + /** + * Metadata objects to add to the user\'s favorites list. + */ + 'favorite_metadata'?: Array; + /** + * IDs of the Orgs. + */ + 'org_identifiers'?: Array; + /** + * Type of update operation. Default operation type is REPLACE + */ + 'operation'?: UpdateUserRequestOperationEnum; + /** + * Locale for the user. When setting this value, do not set use_browser_language to true, otherwise the browser\'s language setting will take precedence and the preferred_locale value will be ignored. + */ + 'preferred_locale'?: UpdateUserRequestPreferredLocaleEnum; + /** + * Flag to indicate whether to use the browser locale for the user in the UI. When set to true, the preferred_locale value is unset and the browser\'s language setting takes precedence. Version: 26.3.0.cl or later + */ + 'use_browser_language'?: boolean | null; + /** + * Properties for the user + */ + 'extended_properties'?: any; + /** + * Preferences for the user + */ + 'extended_preferences'?: any; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} +type UpdateUserRequestVisibilityEnum = "SHARABLE" | "NON_SHARABLE"; +type UpdateUserRequestAccountStatusEnum = "ACTIVE" | "INACTIVE" | "EXPIRED" | "LOCKED" | "PENDING" | "SUSPENDED"; +type UpdateUserRequestAccountTypeEnum = "LOCAL_USER" | "LDAP_USER" | "SAML_USER" | "OIDC_USER" | "REMOTE_USER"; +type UpdateUserRequestOperationEnum = "ADD" | "REMOVE" | "REPLACE"; +type UpdateUserRequestPreferredLocaleEnum = "en-CA" | "en-GB" | "en-US" | "de-DE" | "ja-JP" | "zh-CN" | "pt-BR" | "fr-FR" | "fr-CA" | "es-US" | "da-DK" | "es-ES" | "fi-FI" | "sv-SE" | "nb-NO" | "pt-PT" | "nl-NL" | "it-IT" | "ru-RU" | "en-IN" | "de-CH" | "en-NZ" | "es-MX" | "en-AU" | "zh-Hant" | "ko-KR" | "en-DE"; + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +declare class UpdateVariableRequest { + /** + * New name of the variable. + */ + 'name': string; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +/** +* Input for variable value update in batch operations +*/ +declare class VariableUpdateAssignmentInput { + /** + * ID or Name of the variable + */ + 'variable_identifier': string; + /** + * Values of the variable + */ + 'variable_values': Array; + /** + * Operation to perform + */ + 'operation': VariableUpdateAssignmentInputOperationEnum; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} +type VariableUpdateAssignmentInputOperationEnum = "ADD" | "REMOVE" | "REPLACE" | "RESET"; + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +/** +* Input for defining the scope of variable value assignments in batch update operations +*/ +declare class VariableUpdateScopeInput { + /** + * The unique name of the org + */ + 'org_identifier': string; + /** + * Type of principal to which the variable value applies. Use USER to assign values to a specific user, or USER_GROUP to assign values to a group. + */ + 'principal_type'?: VariableUpdateScopeInputPrincipalTypeEnum | null; + /** + * Unique ID or name of the principal + */ + 'principal_identifier'?: string | null; + /** + * Unique ID or name of the model. Required for FORMULA_VARIABLE type to scope the variable value to a specific worksheet. + */ + 'model_identifier'?: string | null; + /** + * The priority level for this scope assignment, used for conflict resolution when multiple values match. Higher priority values (larger numbers) take precedence. + */ + 'priority'?: number | null; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} +type VariableUpdateScopeInputPrincipalTypeEnum = "USER" | "USER_GROUP"; + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +declare class UpdateVariableValuesRequest { + /** + * Array of variable assignment objects specifying the variable identifier, values to assign, and the operation type (ADD, REMOVE, REPLACE, or RESET) to perform on each variable. + */ + 'variable_assignment': Array; + /** + * Array of scope objects defining where the variable values apply, including organization context, optional principal constraints (user or group), model reference for formula variables, and priority for conflict resolution. + */ + 'variable_value_scope': Array; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +declare class UpdateWebhookConfigurationRequest { + /** + * Name of the webhook configuration. + */ + 'name'?: string; + /** + * Description of the webhook configuration. + */ + 'description'?: string; + /** + * The webhook endpoint URL. + */ + 'url'?: string; + /** + * Additional URL parameters as key-value pairs. + */ + 'url_params'?: any; + /** + * List of events to subscribe to. + */ + 'events'?: Array; + 'authentication'?: CreateWebhookConfigurationRequestAuthentication; + 'signature_verification'?: CreateWebhookConfigurationRequestSignatureVerification; + 'storage_destination'?: CreateWebhookConfigurationRequestStorageDestination; + /** + * Additional headers as an array of key-value pairs. Example: [{\"key\": \"X-Custom-Header\", \"value\": \"custom_value\"}] Version: 26.4.0.cl or later + */ + 'additional_headers'?: Array; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} +type UpdateWebhookConfigurationRequestEventsEnum = "LIVEBOARD_SCHEDULE"; + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +declare class User { + /** + * Unique identifier of the user. + */ + 'id': string; + /** + * Name of the user. + */ + 'name': string; + /** + * Display name of the user. + */ + 'display_name': string; + /** + * Visibility of the users. The `SHARABLE` property makes a user visible to other users and group, who can share objects with the user. + */ + 'visibility': UserVisibilityEnum; + /** + * Unique identifier of author of the user. + */ + 'author_id'?: string | null; + /** + * Defines whether the user can change their password. + */ + 'can_change_password'?: boolean | null; + /** + * Defines whether the response has complete detail of the user. + */ + 'complete_detail'?: boolean | null; + /** + * Creation time of the user in milliseconds. + */ + 'creation_time_in_millis'?: number | null; + 'current_org'?: Org; + /** + * Indicates whether the user is deleted. + */ + 'deleted'?: boolean | null; + /** + * Indicates whether the user is deprecated. + */ + 'deprecated'?: boolean | null; + /** + * Type of the user account. + */ + 'account_type'?: UserAccountTypeEnum | null; + /** + * Status of the user account. + */ + 'account_status'?: UserAccountStatusEnum | null; + /** + * Email of the user. + */ + 'email'?: string | null; + /** + * Expiration time of the user in milliseconds. + */ + 'expiration_time_in_millis'?: number | null; + /** + * Indicates whether the user is external. + */ + 'external'?: boolean | null; + /** + * Metadata objects to add to the users\' favorites list. + */ + 'favorite_metadata'?: Array | null; + /** + * Timestamp of the first login session of the user in milliseconds. + */ + 'first_login_time_in_millis'?: number | null; + /** + * Group mask of the user. + */ + 'group_mask'?: number | null; + /** + * Indicates whether the user is hidden. + */ + 'hidden'?: boolean | null; + 'home_liveboard'?: ObjectIDAndName; + /** + * Incomplete details of user if any present. + */ + 'incomplete_details'?: any | null; + /** + * Indicates whether it is first login of the user. + */ + 'is_first_login'?: boolean | null; + /** + * Last modified time of the user in milliseconds. + */ + 'modification_time_in_millis'?: number | null; + /** + * Unique identifier of modifier of the user. + */ + 'modifier_id'?: string | null; + /** + * User preference for receiving email notifications on shared Answers or Liveboard. + */ + 'notify_on_share'?: boolean | null; + /** + * The user preference for turning off the onboarding experience. + */ + 'onboarding_experience_completed'?: boolean | null; + /** + * Orgs to which the user belongs. + */ + 'orgs'?: Array | null; + /** + * Unique identifier of owner of the user. + */ + 'owner_id'?: string | null; + /** + * Parent type of the user. + */ + 'parent_type'?: UserParentTypeEnum | null; + /** + * Privileges which are assigned to the user. + */ + 'privileges'?: Array | null; + /** + * User\'s preference to revisit the new user onboarding experience. + */ + 'show_onboarding_experience'?: boolean | null; + /** + * Indicates whether the user is a super user. + */ + 'super_user'?: boolean | null; + /** + * Indicates whether the user is a system user. + */ + 'system_user'?: boolean | null; + /** + * Tags associated with the user. + */ + 'tags'?: Array | null; + /** + * Unique identifier of tenant of the user. + */ + 'tenant_id'?: string | null; + /** + * Groups to which the user is assigned. + */ + 'user_groups'?: Array | null; + /** + * Inherited User Groups which the user is part of. + */ + 'user_inherited_groups'?: Array | null; + /** + * Indicates whether welcome email is sent for the user. + */ + 'welcome_email_sent'?: boolean | null; + /** + * Privileges which are assigned to the user with org. + */ + 'org_privileges'?: any | null; + /** + * Locale for the user. + */ + 'preferred_locale'?: string | null; + /** + * Flag to indicate whether to use the browser locale for the user in the UI. When set to true, the preferred_locale value is unset and the browser\'s language setting takes precedence. Version: 26.3.0.cl or later + */ + 'use_browser_language'?: boolean | null; + /** + * Properties for the user + */ + 'extended_properties'?: any | null; + /** + * Preferences for the user + */ + 'extended_preferences'?: any | null; + /** + * User Parameters which are specified for the user via JWToken + */ + 'user_parameters'?: any | null; + /** + * Access Control Properties which are specified for the user via JWToken + */ + 'access_control_properties'?: any | null; + /** + * Formula Variables which are specified for the user via JWToken + */ + 'variable_values'?: any | null; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} +type UserVisibilityEnum = "SHARABLE" | "NON_SHARABLE"; +type UserAccountTypeEnum = "LOCAL_USER" | "LDAP_USER" | "SAML_USER" | "OIDC_USER" | "REMOTE_USER"; +type UserAccountStatusEnum = "ACTIVE" | "INACTIVE" | "EXPIRED" | "LOCKED" | "PENDING" | "SUSPENDED"; +type UserParentTypeEnum = "USER" | "GROUP"; + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +declare class UserGroupResponse { + /** + * The unique identifier of the object + */ + 'author_id'?: string | null; + /** + * Indicates whether the response has complete detail of the group. + */ + 'complete_detail'?: boolean | null; + /** + * Content details of the group + */ + 'content'?: any | null; + /** + * Creation time of the group in milliseconds + */ + 'creation_time_in_millis'?: number | null; + /** + * Liveboards that are assigned as default Liveboards to the group. + */ + 'default_liveboards'?: Array | null; + /** + * Indicates whether the group is deleted + */ + 'deleted'?: boolean | null; + /** + * Indicates whether the group is deprecated + */ + 'deprecated'?: boolean | null; + /** + * Description of the group + */ + 'description'?: string | null; + /** + * Display name of the group. + */ + 'display_name': string; + /** + * Indicates whether the group is external + */ + 'external'?: boolean | null; + /** + * Generation number of the group + */ + 'generation_number'?: number | null; + /** + * Indicates whether the group is hidden + */ + 'hidden'?: boolean | null; + /** + * The unique identifier of the object + */ + 'id': string; + /** + * Index number of the group + */ + 'index'?: number | null; + /** + * Index version number of the group + */ + 'index_version'?: number | null; + /** + * Metadata version number of the group + */ + 'metadata_version'?: number | null; + /** + * Last modified time of the group in milliseconds. + */ + 'modification_time_in_millis'?: number | null; + /** + * The unique identifier of the object + */ + 'modifier_id'?: string | null; + /** + * Name of the group. + */ + 'name': string; + /** + * Orgs in which group exists. + */ + 'orgs'?: Array | null; + /** + * The unique identifier of the object + */ + 'owner_id'?: string | null; + /** + * Parent type of the group. + */ + 'parent_type'?: UserGroupResponseParentTypeEnum | null; + /** + * Privileges which are assigned to the group + */ + 'privileges'?: Array | null; + /** + * Groups who are part of the group + */ + 'sub_groups'?: Array | null; + /** + * Indicates whether the group is a system group. + */ + 'system_group'?: boolean | null; + /** + * Tags associated with the group. + */ + 'tags'?: Array | null; + /** + * Type of the group. + */ + 'type'?: UserGroupResponseTypeEnum | null; + /** + * Users who are part of the group. + */ + 'users'?: Array | null; + /** + * Visibility of the group. The SHARABLE makes a group visible to other users and groups, and thus allows them to share objects. + */ + 'visibility': UserGroupResponseVisibilityEnum; + /** + * List of roles assgined to the user + */ + 'roles'?: Array | null; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} +type UserGroupResponseParentTypeEnum = "USER" | "GROUP"; +type UserGroupResponseTypeEnum = "LOCAL_GROUP" | "LDAP_GROUP" | "TEAM_GROUP" | "TENANT_GROUP"; +type UserGroupResponseVisibilityEnum = "SHARABLE" | "NON_SHARABLE"; + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +/** +* Define attributes such as Runtime filters and Runtime parameters to send security entitlements to a user session. For more information, see [Documentation](https://developers.thoughtspot.com/docs/abac-user-parameters). +*/ +declare class UserParameterOptions { + 'objects'?: Array | null; + /** + * Objects to apply the User_Runtime_Filters. Examples to set the `runtime_filters` : ```json { \"column_name\": \"Color\", \"operator\": \"EQ\", \"values\": [\"red\"], \"persist\": false } ``` + */ + 'runtime_filters'?: Array | null; + /** + * Objects to apply the User_Runtime_Sorts. Examples to set the `runtime_sorts` : ```json { \"column_name\": \"Color\", \"order\": \"ASC\", \"persist\": false } ``` + */ + 'runtime_sorts'?: Array | null; + /** + * Objects to apply the Runtime_Parameters. Examples to set the `parameters` : ```json { \"name\": \"Color\", \"values\": [\"Blue\"], \"persist\": false } ``` + */ + 'parameters'?: Array | null; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +declare class ValidateCommunicationChannelRequest { + /** + * Type of communication channel to validate (e.g., WEBHOOK). + */ + 'channel_type': ValidateCommunicationChannelRequestChannelTypeEnum; + /** + * Unique identifier or name for the communication channel. + */ + 'channel_identifier': string; + /** + * Event type to validate for this channel. + */ + 'event_type': ValidateCommunicationChannelRequestEventTypeEnum; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} +type ValidateCommunicationChannelRequestChannelTypeEnum = "WEBHOOK"; +type ValidateCommunicationChannelRequestEventTypeEnum = "LIVEBOARD_SCHEDULE"; + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +declare class ValidateMergeRequest { + /** + * Name of the branch from which changes need to be picked for validation + */ + 'source_branch_name': string; + /** + * Name of the branch where files will be merged + */ + 'target_branch_name': string; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +declare class ValidateTokenRequest { + 'token': string; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +declare class VariableOrgInfo { + /** + * ID of the Org. + */ + 'id': number; + /** + * Name of the Org. + */ + 'name': string; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +declare class VariableValue { + /** + * The value of the variable + */ + 'value'?: string | null; + /** + * The value of the variable if it is a list type + */ + 'value_list'?: Array | null; + /** + * The unique name of the org + */ + 'org_identifier': string; + /** + * Type of principal to which this value applies. Use USER to assign the value to a specific user, or USER_GROUP to assign it to a group. + */ + 'principal_type'?: VariableValuePrincipalTypeEnum | null; + /** + * Unique ID or name of the principal + */ + 'principal_identifier'?: string | null; + /** + * Unique ID of the model Version: 26.3.0.cl or later + */ + 'model_identifier'?: string | null; + /** + * The priority assigned to this value. If there are 2 matching values, the one with the higher priority will be picked. + */ + 'priority'?: number | null; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} +type VariableValuePrincipalTypeEnum = "USER" | "USER_GROUP"; + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +/** +* Variable object +*/ +declare class Variable { + /** + * Unique identifier of the variable + */ + 'id': string; + /** + * Name of the variable + */ + 'name': string; + /** + * Type of the variable + */ + 'variable_type'?: VariableVariableTypeEnum | null; + /** + * If the variable is sensitive + */ + 'sensitive'?: boolean | null; + /** + * Values of the variable + */ + 'values'?: Array | null; + 'org'?: VariableOrgInfo; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} +type VariableVariableTypeEnum = "CONNECTION_PROPERTY" | "TABLE_MAPPING" | "CONNECTION_PROPERTY_PER_PRINCIPAL" | "FORMULA_VARIABLE" | "USER_PROPERTY"; + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +declare class WebhookAuthApiKey { + /** + * The header or query parameter name for the API key. + */ + 'key': string; + /** + * The API key value. + */ + 'value': string; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +declare class WebhookAuthBasicAuth { + /** + * Username for basic authentication. + */ + 'username': string; + /** + * Password for basic authentication. + */ + 'password': string; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +declare class WebhookAuthOAuth2 { + /** + * OAuth2 authorization server URL. + */ + 'authorization_url': string; + /** + * OAuth2 client identifier. + */ + 'client_id': string; + /** + * OAuth2 client secret key. + */ + 'client_secret': string; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +declare class WebhookAuthentication { + 'API_KEY'?: WebhookAuthApiKey; + 'BASIC_AUTH'?: WebhookAuthBasicAuth; + /** + * Redacted Bearer token authentication configuration. + */ + 'BEARER_TOKEN'?: string | null; + 'OAUTH2'?: WebhookAuthOAuth2; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +declare class WebhookAuthenticationInput { + 'API_KEY'?: WebhookAuthApiKeyInput; + 'BASIC_AUTH'?: WebhookAuthBasicAuthInput; + /** + * Bearer token authentication configuration. + */ + 'BEARER_TOKEN'?: string | null; + 'OAUTH2'?: WebhookAuthOAuth2Input; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +declare class WebhookDeleteFailure { + /** + * Unique identifier of the webhook that failed to delete. + */ + 'id': string; + /** + * Name of the webhook that failed to delete. + */ + 'name': string; + /** + * Error message describing why the deletion failed. + */ + 'error': string; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +/** +* Key-value pair for additional webhook headers. +*/ +declare class WebhookKeyValuePair { + /** + * Header name. + */ + 'key': string; + /** + * Header value. + */ + 'value': string; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +declare class WebhookOrg { + /** + * Unique identifier of the org. + */ + 'id': string; + /** + * Name of the org. + */ + 'name': string; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +declare class WebhookSignatureVerification { + /** + * Signature verification method type. + */ + 'type': WebhookSignatureVerificationTypeEnum; + /** + * HTTP header where the signature is sent. + */ + 'header': string; + /** + * Hash algorithm used for signature verification. + */ + 'algorithm': WebhookSignatureVerificationAlgorithmEnum; + /** + * Shared secret used for HMAC signature generation. + */ + 'secret': string; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} +type WebhookSignatureVerificationTypeEnum = "HMAC_SHA256"; +type WebhookSignatureVerificationAlgorithmEnum = "SHA256"; + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +declare class WebhookUser { + /** + * Unique identifier of the user. + */ + 'id': string; + /** + * Name of the user. + */ + 'name': string; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +declare class WebhookResponse { + /** + * Unique identifier of the webhook configuration. + */ + 'id': string; + /** + * Name of the webhook configuration. + */ + 'name': string; + /** + * Description of the webhook configuration. + */ + 'description'?: string | null; + 'org'?: WebhookOrg; + /** + * The webhook endpoint URL. + */ + 'url': string; + /** + * Additional URL parameters as key-value pairs. + */ + 'url_params'?: any | null; + /** + * List of events this webhook subscribes to. + */ + 'events': Array; + 'authentication'?: WebhookAuthentication; + 'signature_verification'?: WebhookSignatureVerification; + /** + * Additional headers as an array of key-value pairs. Version: 26.4.0.cl or later + */ + 'additional_headers'?: Array | null; + /** + * Creation time of the webhook configuration in milliseconds. + */ + 'creation_time_in_millis': number; + /** + * Last modified time of the webhook configuration in milliseconds. + */ + 'modification_time_in_millis': number; + 'created_by'?: WebhookUser; + 'last_modified_by'?: WebhookUser; + 'storage_destination'?: StorageDestination; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} +type WebhookResponseEventsEnum = "LIVEBOARD_SCHEDULE"; + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +declare class WebhookDeleteResponse { + /** + * Number of webhooks successfully deleted. + */ + 'deleted_count': number; + /** + * Number of webhooks that failed to delete. + */ + 'failed_count': number; + /** + * List of successfully deleted webhooks. + */ + 'deleted_webhooks': Array; + /** + * List of webhooks that failed to delete with error details. + */ + 'failed_webhooks': Array; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +declare class WebhookPagination { + /** + * The starting record number from where the records are included. + */ + 'record_offset': number; + /** + * The number of records included in the response. + */ + 'record_size': number; + /** + * Total number of webhook configurations available. + */ + 'total_count': number; + /** + * Indicates whether more records are available beyond the current response. + */ + 'has_more': boolean; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +declare class WebhookSearchResponse { + /** + * List of webhook configurations matching the search criteria. + */ + 'webhooks': Array; + 'pagination': WebhookPagination; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +declare class WebhookSignatureVerificationInput { + /** + * Signature verification method type. + */ + 'type': WebhookSignatureVerificationInputTypeEnum; + /** + * HTTP header where the signature is sent. + */ + 'header': string; + /** + * Hash algorithm used for signature verification. + */ + 'algorithm': WebhookSignatureVerificationInputAlgorithmEnum; + /** + * Shared secret used for HMAC signature generation. + */ + 'secret': string; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} +type WebhookSignatureVerificationInputTypeEnum = "HMAC_SHA256"; +type WebhookSignatureVerificationInputAlgorithmEnum = "SHA256"; + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +declare class WebhookSortOptionsInput { + /** + * Name of the field to apply the sort on. + */ + 'field_name'?: WebhookSortOptionsInputFieldNameEnum | null; + /** + * Sort order: ASC (Ascending) or DESC (Descending). + */ + 'order'?: WebhookSortOptionsInputOrderEnum | null; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} +type WebhookSortOptionsInputFieldNameEnum = "CREATED" | "MODIFIED" | "NAME"; +type WebhookSortOptionsInputOrderEnum = "ASC" | "DESC"; + +/** + * Defines the contract for a middleware intercepting requests before + * they are sent (but after the RequestContext was created) + * and before the ResponseContext is unwrapped. + * + */ +interface Middleware { + /** + * Modifies the request before the request is sent. + * + * @param context RequestContext of a request which is about to be sent to the server + * @returns an observable of the updated request context + * + */ + pre(context: RequestContext): Observable; + /** + * Modifies the returned response before it is deserialized. + * + * @param context ResponseContext of a sent request + * @returns an observable of the modified response context + */ + post(context: ResponseContext): Observable; +} +/** + * Defines the contract for a middleware intercepting requests before + * they are sent (but after the RequestContext was created) + * and before the ResponseContext is unwrapped. + * + */ +interface PromiseMiddleware { + /** + * Modifies the request before the request is sent. + * + * @param context RequestContext of a request which is about to be sent to the server + * @returns an observable of the updated request context + * + */ + pre(context: RequestContext): Promise; + /** + * Modifies the returned response before it is deserialized. + * + * @param context ResponseContext of a sent request + * @returns an observable of the modified response context + */ + post(context: ResponseContext): Promise; +} + +interface BaseServerConfiguration { + makeRequestContext(endpoint: string, httpMethod: HttpMethod): RequestContext; +} +/** + * + * Represents the configuration of a server including its + * url template and variable configuration based on the url. + * + */ +declare class ServerConfiguration implements BaseServerConfiguration { + private url; + private variableConfiguration; + constructor(url: string, variableConfiguration: T); + /** + * Sets the value of the variables of this server. Variables are included in + * the `url` of this ServerConfiguration in the form `{variableName}` + * + * @param variableConfiguration a partial variable configuration for the + * variables contained in the url + */ + setVariables(variableConfiguration: Partial): void; + getConfiguration(): T; + private getUrl; + /** + * Creates a new request context for this server using the url with variables + * replaced with their respective values and the endpoint of the request appended. + * + * @param endpoint the endpoint to be queried on the server + * @param httpMethod httpMethod to be used + * + */ + makeRequestContext(endpoint: string, httpMethod: HttpMethod): RequestContext; +} +declare const server1: ServerConfiguration<{ + "base-url": string; +}>; +declare const servers: ServerConfiguration<{ + "base-url": string; +}>[]; + +interface Configuration { + readonly baseServer: BaseServerConfiguration; + readonly httpApi: HttpLibrary; + readonly middleware: Middleware[]; + readonly authMethods: AuthMethods; +} +/** + * Interface with which a configuration object can be configured. + */ +interface ConfigurationParameters { + /** + * Default server to use - a list of available servers (according to the + * OpenAPI yaml definition) is included in the `servers` const in `./servers`. You can also + * create your own server with the `ServerConfiguration` class from the same + * file. + */ + baseServer?: BaseServerConfiguration; + /** + * HTTP library to use e.g. IsomorphicFetch. This can usually be skipped as + * all generators come with a default library. + * If available, additional libraries can be imported from `./http/*` + */ + httpApi?: HttpLibrary; + /** + * The middlewares which will be applied to requests and responses. You can + * add any number of middleware components to modify requests before they + * are sent or before they are deserialized by implementing the `Middleware` + * interface defined in `./middleware` + */ + middleware?: Middleware[]; + /** + * Configures middleware functions that return promises instead of + * Observables (which are used by `middleware`). Otherwise allows for the + * same functionality as `middleware`, i.e., modifying requests before they + * are sent and before they are deserialized. + */ + promiseMiddleware?: PromiseMiddleware[]; + /** + * Configuration for the available authentication methods (e.g., api keys) + * according to the OpenAPI yaml definition. For the definition, please refer to + * `./auth/auth` + */ + authMethods?: AuthMethodsConfiguration; +} +/** + * Provide your `ConfigurationParameters` to this function to get a `Configuration` + * object that can be used to configure your APIs (in the constructor or + * for each request individually). + * + * If a property is not included in conf, a default is used: + * - baseServer: server1 + * - httpApi: IsomorphicFetchHttpLibrary + * - middleware: [] + * - promiseMiddleware: [] + * - authMethods: {} + * + * @param conf partial configuration + */ +declare function createConfiguration(conf?: ConfigurationParameters): Configuration; + +/** + * Represents an error caused by an api call i.e. it has attributes for a HTTP status code + * and the returned body object. + * + * Example + * API returns a ErrorMessageObject whenever HTTP status code is not in [200, 299] + * => ApiException(404, someErrorMessageObject) + * + */ +declare class ApiException extends Error { + code: number; + body: T; + headers: { + [key: string]: string; + }; + constructor(code: number, message: string, body: T, headers: { + [key: string]: string; + }); +} + +/** + * + * @export + * @class BaseAPI + */ +declare class BaseAPIRequestFactory { + protected configuration: Configuration; + constructor(configuration: Configuration); +} +/** + * + * @export + * @class RequiredError + * @extends {Error} + */ +declare class RequiredError extends Error { + api: string; + method: string; + field: string; + name: "RequiredError"; + constructor(api: string, method: string, field: string); +} + +/** + * no description + */ +declare class AIApiRequestFactory extends BaseAPIRequestFactory { + /** + * Version: 26.2.0.cl or later Creates a new Spotter agent conversation based on the provided context and settings. The endpoint was in Beta from 26.2.0.cl through 26.4.0.cl. Requires `CAN_USE_SPOTTER` privilege and at least view access to the metadata object specified in the request. #### Usage guidelines The request must include the `metadata_context` parameter to define the conversation context. The context type can be one of: - `DATA_SOURCE` *(available from 26.5.0.cl)*: targets a specific data source. Provide `data_source_identifier` in `data_source_context` for a single data source, or `data_source_identifiers` for multi-data-source context. The deprecated `guid` field is accepted for backwards compatibility. - `AUTO_MODE` *(available from 26.5.0.cl)*: automatically discovers and selects the most relevant datasets for the user\'s queries. > **Note for callers on versions 26.2.0.cl – 26.4.0.cl (Beta):** use the lowercase `data_source` enum value with the `guid` field instead of the above. Example: `{ \"type\": \"data_source\", \"data_source_context\": { \"guid\": \"\" } }`. The `conversation_settings` parameter controls which Spotter capabilities are enabled for the conversation: - `enable_contextual_change_analysis` (default: `true`, **deprecated from 26.2.0.cl**) — always enabled in Spotter 3; setting this to `false` has no effect on versions >= 26.2.0.cl - `enable_natural_language_answer_generation` (default: `true`, **deprecated from 26.2.0.cl**) — always enabled in Spotter 3; setting this to `false` has no effect on versions >= 26.2.0.cl - `enable_reasoning` (default: `true`, **deprecated from 26.2.0.cl**) — always enabled in Spotter 3; setting this to `false` has no effect on versions >= 26.2.0.cl - `enable_save_chat` (default: `false`, *available from 26.5.0.cl*) — enables saving the conversation for later retrieval via conversation history If the request is successful, the response includes a unique `conversation_identifier` that must be passed to `sendAgentConversationMessage` or `sendAgentConversationMessageStreaming` to send messages within this conversation. The response also includes `conversation_id` with the same value for backwards compatibility; use `conversation_identifier` for new integrations. #### Example request ```json { \"metadata_context\": { \"type\": \"DATA_SOURCE\", \"data_source_context\": { \"data_source_identifier\": \"a1b2c3d4-e5f6-7890-abcd-ef1234567890\" } }, \"conversation_settings\": {} } ``` #### Error responses | Code | Description | | ---- | --------------------------------------------------------------------------------------------------------------------------------------- | | 401 | Unauthorized — authentication token is missing, expired, or invalid. | | 403 | Forbidden — the authenticated user does not have `CAN_USE_SPOTTER` privilege or lacks view permission on the specified metadata object. | > ###### Note: > > - This endpoint was in Beta from 26.2.0.cl through 26.4.0.cl and is Generally Available from version 26.5.0.cl. > - This endpoint requires Spotter - please contact ThoughtSpot support to enable Spotter on your cluster. + * @param createAgentConversationRequest + */ + createAgentConversation(createAgentConversationRequest: CreateAgentConversationRequest, _options?: Configuration): Promise; + /** + * Version: 10.4.0.cl or later Creates a new conversation session tied to a specific data model for AI-driven natural language querying. Requires `CAN_USE_SPOTTER` privilege and at least view access to the metadata object specified in the request. #### Usage guidelines The request must include: - `metadata_identifier`: the unique ID of the data source that provides context for the conversation Optionally, you can provide: - `tokens`: a token string to set initial context for the conversation (e.g., `\"[sales],[item type],[state]\"`) If the request is successful, ThoughtSpot returns a unique `conversation_identifier` that must be passed to `sendMessage` to continue the conversation. #### Error responses | Code | Description | |------|-------------| | 401 | Unauthorized — authentication token is missing, expired, or invalid. | | 403 | Forbidden — the authenticated user does not have `CAN_USE_SPOTTER` privilege or lacks view permission on the specified metadata object. | > ###### Note: > * This endpoint is currently in Beta. Breaking changes may be introduced before the endpoint is made Generally Available. > * This endpoint requires Spotter - please contact ThoughtSpot support to enable Spotter on your cluster. + * @param createConversationRequest + */ + createConversation(createConversationRequest: CreateConversationRequest, _options?: Configuration): Promise; + /** + * Version: 10.15.0.cl or later Suggests the most relevant data sources for a given natural language query, ranked by confidence with LLM-generated reasoning. Requires `CAN_USE_SPOTTER` privilege and at least view-level access to the underlying metadata entities referenced in the response. #### Usage guidelines The request must include: - `query`: the natural language question to find relevant data sources for If the request is successful, the API returns a ranked list of suggested data sources, each containing: - `confidence`: a float score indicating the model\'s confidence in the relevance of the suggestion - `details`: metadata about the data source - `data_source_identifier`: the unique ID of the data source - `data_source_name`: the display name of the data source - `description`: a description of the data source - `reasoning`: LLM-generated rationale explaining why the data source was recommended #### Error responses | Code | Description | |------|--------------------------------------------------------------------------------------------------------------------------------------------| | 401 | Unauthorized — authentication token is missing, expired, or invalid. | | 403 | Forbidden — the authenticated user does not have `CAN_USE_SPOTTER` privilege or lacks view permission on the underlying metadata entities. | > ###### Note: > * This endpoint is currently in Beta. Breaking changes may be introduced before it is made Generally Available. > * This endpoint requires Spotter — please contact ThoughtSpot Support to enable Spotter on your cluster. + * @param getDataSourceSuggestionsRequest + */ + getDataSourceSuggestions(getDataSourceSuggestionsRequest: GetDataSourceSuggestionsRequest, _options?: Configuration): Promise; + /** + * Version: 10.15.0.cl or later Retrieves existing natural language (NL) instructions configured for a specific data model. These instructions guide the AI system in understanding data context and generating more accurate responses. Requires `CAN_USE_SPOTTER` privilege, at least view access on the data model, and a bearer token corresponding to the org where the data model exists. #### Usage guidelines The request must include: - `data_source_identifier`: the unique ID of the data model to retrieve instructions for If the request is successful, the API returns: - `nl_instructions_info`: an array of instruction objects, each containing: - `instructions`: the configured text instructions for AI processing - `scope`: the scope of the instruction — currently only `GLOBAL` is supported #### Instructions scope - **GLOBAL**: Instructions that apply globally across the system on the given data-model (currently only global instructions are supported) #### Error responses | Code | Description | |------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| | 401 | Unauthorized — authentication token is missing, expired, or invalid. | | 403 | Forbidden — the authenticated user does not have `CAN_USE_SPOTTER` privilege, lacks view access on the data model, or the bearer token does not correspond to the org where the data model exists. | > ###### Note: > > - To use this API, the user needs at least view access on the data model, and must use the bearer token corresponding to the org where the data model exists. > - This endpoint is currently in Beta. Breaking changes may be introduced before the endpoint is made Generally Available. > - Available from version 10.15.0.cl and later. > - This endpoint requires Spotter — please contact ThoughtSpot Support to enable Spotter on your cluster. > - Use this API to review currently configured instructions before modifying them with `setNLInstructions`. + * @param getNLInstructionsRequest + */ + getNLInstructions(getNLInstructionsRequest: GetNLInstructionsRequest, _options?: Configuration): Promise; + /** + * Version: 10.13.0.cl or later Breaks down a natural language query into a series of smaller analytical sub-questions, each mapped to a relevant data source. Requires `CAN_USE_SPOTTER` privilege and at least view-level access to the referenced metadata objects. #### Usage guidelines The request must include: - `query`: the natural language question to decompose into analytical sub-questions - `metadata_context`: at least one of the following context identifiers to guide question generation: - `conversation_identifier` — an existing conversation session ID - `answer_identifiers` — a list of Answer GUIDs - `liveboard_identifiers` — a list of Liveboard GUIDs - `data_source_identifiers` — a list of data source GUIDs Optional parameters for refining the output: - `ai_context`: additional context to improve response quality - `content` — supplementary text or CSV data as string input - `instructions` — custom text instructions for the AI system - `limit_relevant_questions`: maximum number of questions to return (default: `5`) - `bypass_cache`: if `true`, forces fresh computation instead of returning cached results If the request is successful, the API returns a list of relevant analytical questions, each containing: - `query`: the generated sub-question - `data_source_identifier`: the unique ID of the data source the question targets - `data_source_name`: the display name of the corresponding data source #### Error responses | Code | Description | |------|---------------------------------------------------------------------------------------------------------------------------------------| | 401 | Unauthorized — authentication token is missing, expired, or invalid. | | 403 | Forbidden — the authenticated user does not have `CAN_USE_SPOTTER` privilege or lacks view access to the referenced metadata objects. | > ###### Note: > * This endpoint is currently in Beta. Breaking changes may be introduced before the endpoint is made Generally Available. > * This endpoint requires Spotter - please contact ThoughtSpot support to enable Spotter on your cluster. + * @param getRelevantQuestionsRequest + */ + getRelevantQuestions(getRelevantQuestionsRequest: GetRelevantQuestionsRequest, _options?: Configuration): Promise; + /** + * Version: 10.7.0.cl or later **Deprecated** — Use `getRelevantQuestions` instead (available from 10.13.0.cl). Breaks down a topical or goal-oriented natural language question into smaller, actionable analytical sub-questions, each mapped to a relevant data source for independent execution. Requires `CAN_USE_SPOTTER` privilege and at least view-level access to the referenced metadata objects. #### Usage guidelines The request accepts the following parameters: - `nlsRequest`: contains the user `query` to decompose, along with optional `instructions` and `bypassCache` flag - `worksheetIds`: list of data source identifiers to scope the decomposition - `answerIds`: list of Answer GUIDs whose data guides the response - `liveboardIds`: list of Liveboard GUIDs whose data guides the response - `conversationId`: an existing conversation session ID for context continuity - `content`: supplementary text or CSV data to improve response quality - `maxDecomposedQueries`: maximum number of sub-questions to return (default: `5`) If the request is successful, the API returns a `decomposedQueryResponse` containing a list of `decomposedQueries`, each with: - `query`: the generated analytical sub-question - `worksheetId`: the unique ID of the data source the question targets - `worksheetName`: the display name of the corresponding data source #### Error responses | Code | Description | |------|---------------------------------------------------------------------------------------------------------------------------------------| | 401 | Unauthorized — authentication token is missing, expired, or invalid. | | 403 | Forbidden — the authenticated user does not have `CAN_USE_SPOTTER` privilege or lacks view access to the referenced metadata objects. | > ###### Note: > * This endpoint is deprecated since 10.13.0.cl. Use `getRelevantQuestions` for new integrations. > * This endpoint is currently in Beta. Breaking changes may be introduced before the endpoint is made Generally Available. > * This endpoint requires Spotter — please contact ThoughtSpot support to enable Spotter on your cluster. + * @param queryGetDecomposedQueryRequest + */ + queryGetDecomposedQuery(queryGetDecomposedQueryRequest: QueryGetDecomposedQueryRequest, _options?: Configuration): Promise; + /** + * Version: 26.5.0.cl or later Sends natural language messages to an existing Spotter agent conversation and returns the complete response synchronously. Requires `CAN_USE_SPOTTER` privilege and access to the metadata object associated with the conversation. The user must have access to the conversation session referenced by `conversation_identifier`. A conversation must first be created using the `createAgentConversation` API. #### Usage guidelines The request must include: - `conversation_identifier`: the unique session ID returned by `createAgentConversation`, used for context continuity and message tracking - `messages`: an array of one or more text messages to send to the agent The API returns an array of response objects, each containing: - `type`: the kind of response — `text`, `answer`, or `error` - `message`: the main content of the response - `metadata`: additional information depending on the message type (e.g., answer metadata includes analytics and visualization details) #### Error responses | Code | Description | |------|----------------------------------------------------------------------------------------------------------------------------------| | 401 | Unauthorized — authentication token is missing, expired, or invalid. | | 403 | Forbidden — the authenticated user does not have `CAN_USE_SPOTTER` privilege or lacks permission on the referenced conversation. | > ###### Note: > > - This endpoint is Generally Available from version 26.5.0.cl. > - This endpoint requires Spotter - please contact ThoughtSpot support to enable Spotter on your cluster. > - For real-time streamed responses, use `sendAgentConversationMessageStreaming` instead. + * @param conversationIdentifier Unique identifier for the conversation (used to track context) + * @param sendAgentConversationMessageRequest + */ + sendAgentConversationMessage(conversationIdentifier: string, sendAgentConversationMessageRequest: SendAgentConversationMessageRequest, _options?: Configuration): Promise; + /** + * Version: 26.5.0.cl or later Sends one or more natural language messages to an existing Spotter agent conversation and returns the response as a real-time Server-Sent Events stream. Requires `CAN_USE_SPOTTER` privilege and access to the metadata object associated with the conversation. The user must have access to the conversation session referenced by `conversation_identifier`. A conversation must first be created using the `createAgentConversation` API. #### Usage guidelines The request must include: - `conversation_identifier`: the unique session ID returned by `createAgentConversation`, used for context continuity and message tracking - `messages`: an array of one or more text messages to send to the agent If the request is valid, the API returns a Server-Sent Events (SSE) stream. Each line has the form `data: [{\"type\": \"...\", ...}]` — a JSON array of event objects. Event types include: - `ack`: confirms receipt of the request (`node_id`) - `conv_title`: conversation title (`title`, `conv_id`) - `notification`: status updates on operations (`group_id`, `metadata`, `code` — e.g. `TOOL_CALL_NOTIFICATION`, `nls_start`, `FINAL_RESPONSE_NOTIFICATION`) - `text-chunk`: incremental content chunks (`id`, `group_id`, `metadata` with `format` and `type` such as `thinking` or `text`, `content`) - `text`: full text block with same structure as `text-chunk` - `answer`: structured answer with metadata (`id`, `group_id`, `metadata` with `sage_query`, `session_id`, `title`, etc., `title`) - `error`: if a failure occurs #### Error responses | Code | Description | | ---- | -------------------------------------------------------------------------------------------------------------------------------- | | 401 | Unauthorized — authentication token is missing, expired, or invalid. | | 403 | Forbidden — the authenticated user does not have `CAN_USE_SPOTTER` privilege or lacks permission on the referenced conversation. | > ###### Note: > > - This endpoint is Generally Available from version 26.5.0.cl. > - This endpoint requires Spotter - please contact ThoughtSpot support to enable Spotter on your cluster. > - The streaming protocol uses Server-Sent Events (SSE). > - For the complete response in a single payload, use `sendAgentConversationMessage` instead. + * @param conversationIdentifier Unique identifier for the conversation (used to track context) + * @param sendAgentConversationMessageStreamingRequest + */ + sendAgentConversationMessageStreaming(conversationIdentifier: string, sendAgentConversationMessageStreamingRequest: SendAgentConversationMessageStreamingRequest, _options?: Configuration): Promise; + /** + * Version: 26.2.0.cl or later **Deprecated** — Use `sendAgentConversationMessage` instead. Send natural language messages to an existing Spotter agent conversation and returns the complete response synchronously. Requires `CAN_USE_SPOTTER` privilege and access to the metadata object associated with the conversation. The user must have access to the conversation session referenced by `conversation_identifier`. A conversation must first be created using the `createAgentConversation` API. #### Usage guidelines The request must include: - `conversation_identifier`: the unique session ID returned by `createAgentConversation`, used for context continuity and message tracking - `messages`: an array of one or more text messages to send to the agent The API returns an array of response objects, each containing: - `type`: the kind of response — `text`, `answer`, or `error` - `message`: the main content of the response - `metadata`: additional information depending on the message type (e.g., answer metadata includes analytics and visualization details) #### Error responses | Code | Description | |------|----------------------------------------------------------------------------------------------------------------------------------| | 401 | Unauthorized — authentication token is missing, expired, or invalid. | | 403 | Forbidden — the authenticated user does not have `CAN_USE_SPOTTER` privilege or lacks permission on the referenced conversation. | > ###### Note: > > - This endpoint is deprecated. Use `sendAgentConversationMessage` for new integrations. > - This endpoint is currently in Beta. Breaking changes may be introduced before the endpoint is made Generally Available. > - This endpoint requires Spotter - please contact ThoughtSpot support to enable Spotter on your cluster. + * @param conversationIdentifier Unique identifier for the conversation (used to track context) + * @param sendAgentMessageRequest + */ + sendAgentMessage(conversationIdentifier: string, sendAgentMessageRequest: SendAgentMessageRequest, _options?: Configuration): Promise; + /** + * Version: 26.2.0.cl or later **Deprecated** — Use `sendAgentConversationMessageStreaming` instead. Sends one or more natural language messages to an existing Spotter agent conversation and returns the response as a real-time Server-Sent Events stream. Requires `CAN_USE_SPOTTER` privilege and access to the metadata object associated with the conversation. The user must have access to the conversation session referenced by `conversation_identifier`. A conversation must first be created using the `createAgentConversation` API. #### Usage guidelines The request must include: - `conversation_identifier`: the unique session ID returned by `createAgentConversation`, used for context continuity and message tracking - `messages`: an array of one or more text messages to send to the agent If the request is valid, the API returns a Server-Sent Events (SSE) stream. Each line has the form `data: [{\"type\": \"...\", ...}]` — a JSON array of event objects. Event types include: - `ack`: confirms receipt of the request (`node_id`) - `conv_title`: conversation title (`title`, `conv_id`) - `notification`: status updates on operations (`group_id`, `metadata`, `code` — e.g. `TOOL_CALL_NOTIFICATION`, `nls_start`, `FINAL_RESPONSE_NOTIFICATION`) - `text-chunk`: incremental content chunks (`id`, `group_id`, `metadata` with `format` and `type` such as `thinking` or `text`, `content`) - `text`: full text block with same structure as `text-chunk` - `answer`: structured answer with metadata (`id`, `group_id`, `metadata` with `sage_query`, `session_id`, `title`, etc., `title`) - `error`: if a failure occurs #### Error responses | Code | Description | |------|----------------------------------------------------------------------------------------------------------------------------------| | 401 | Unauthorized — authentication token is missing, expired, or invalid. | | 403 | Forbidden — the authenticated user does not have `CAN_USE_SPOTTER` privilege or lacks permission on the referenced conversation. | > ###### Note: > > - This endpoint is deprecated. Use `sendAgentConversationMessageStreaming` for new integrations. > - This endpoint is currently in Beta. Breaking changes may be introduced before the endpoint is made Generally Available. > - This endpoint requires Spotter - please contact ThoughtSpot support to enable Spotter on your cluster. > - The streaming protocol uses Server-Sent Events (SSE). + * @param sendAgentMessageStreamingRequest + */ + sendAgentMessageStreaming(sendAgentMessageStreamingRequest: SendAgentMessageStreamingRequest, _options?: Configuration): Promise; + /** + * Version: 10.4.0.cl or later Sends a follow-up message to an existing conversation within the context of a data model. Requires `CAN_USE_SPOTTER` privilege and at least view access to the metadata object specified in the request. A conversation must first be created using the `createConversation` API. #### Usage guidelines The request must include: - `conversation_identifier`: the unique session ID returned by `createConversation` - `metadata_identifier`: the unique ID of the data source used for the conversation - `message`: a natural language string with the follow-up question If the request is successful, the API returns an array of response messages, each containing: - `session_identifier`: the unique ID of the generated response - `generation_number`: the generation number of the response - `message_type`: the type of the response (e.g., `TSAnswer`) - `visualization_type`: the generated visualization type (`Chart`, `Table`, or `Undefined`) - `tokens` / `display_tokens`: the search tokens and user-friendly display tokens for the response #### Error responses | Code | Description | |------|-----------------------------------------------------------------------------------------------------------------------------------------| | 401 | Unauthorized — authentication token is missing, expired, or invalid. | | 403 | Forbidden — the authenticated user does not have `CAN_USE_SPOTTER` privilege or lacks view permission on the specified metadata object. | > ###### Note: > * This endpoint is currently in Beta. Breaking changes may be introduced before the endpoint is made Generally Available. > * This endpoint requires Spotter - please contact ThoughtSpot support to enable Spotter on your cluster. + * @param conversationIdentifier Unique identifier of the conversation. + * @param sendMessageRequest + */ + sendMessage(conversationIdentifier: string, sendMessageRequest: SendMessageRequest, _options?: Configuration): Promise; + /** + * Version: 10.15.0.cl or later This API allows users to set natural language (NL) instructions for a specific data-model to improve AI-generated answers and query processing. These instructions help guide the AI system to better understand the data context and provide more accurate responses. Requires `CAN_USE_SPOTTER` privilege, either edit access or `SPOTTER_COACHING_PRIVILEGE` on the data model, and a bearer token corresponding to the org where the data model exists. #### Usage guidelines To set NL instructions for a data-model, the request must include: - `data_source_identifier`: The unique ID of the data-model for which to set NL instructions - `nl_instructions_info`: An array of instruction objects, each containing: - `instructions`: Array of text instructions for the LLM - `scope`: The scope of the instruction (`GLOBAL`). Currently only `GLOBAL` is supported. It can be extended to data-model-user scope in future. #### Instructions scope - **GLOBAL**: instructions that apply to all users querying this data model If the request is successful, the API returns: - `success`: a boolean indicating whether the operation completed successfully #### Error responses | Code | Description | |------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| | 401 | Unauthorized — authentication token is missing, expired, or invalid. | | 403 | Forbidden — the authenticated user does not have `CAN_USE_SPOTTER` privilege, lacks edit access or `SPOTTER_COACHING_PRIVILEGE` on the data model, or the bearer token does not correspond to the org where the data model exists. | > ###### Note: > > - To use this API, the user needs either edit access or `SPOTTER_COACHING_PRIVILEGE` on the data model, and must use the bearer token corresponding to the org where the data model exists. > - This endpoint is currently in Beta. Breaking changes may be introduced before the endpoint is made Generally Available. > - Available from version 10.15.0.cl and later. > - This endpoint requires Spotter — please contact ThoughtSpot Support to enable Spotter on your cluster. > - Instructions help improve the accuracy and relevance of AI-generated responses for the specified data-model. + * @param setNLInstructionsRequest + */ + setNLInstructions(setNLInstructionsRequest: SetNLInstructionsRequest, _options?: Configuration): Promise; + /** + * Version: 10.4.0.cl or later Processes a natural language query against a specified data model and returns a single AI-generated answer without requiring a conversation session. Requires `CAN_USE_SPOTTER` privilege and at least view access to the metadata object specified in the request. #### Usage guidelines The request must include: - `query`: a natural language question (e.g., \"What were total sales last quarter?\") - `metadata_identifier`: the unique ID of the data source to query against If the request is successful, the API returns a response message containing: - `session_identifier`: the unique ID of the generated response - `generation_number`: the generation number of the response - `message_type`: the type of the response (e.g., `TSAnswer`) - `visualization_type`: the generated visualization type (`Chart`, `Table`, or `Undefined`) - `tokens` / `display_tokens`: the search tokens and user-friendly display tokens for the response #### Error responses | Code | Description | |------|-----------------------------------------------------------------------------------------------------------------------------------------| | 401 | Unauthorized — authentication token is missing, expired, or invalid. | | 403 | Forbidden — the authenticated user does not have `CAN_USE_SPOTTER` privilege or lacks view permission on the specified metadata object. | > ###### Note: > * This endpoint is currently in Beta. Breaking changes may be introduced before the endpoint is made Generally Available. > * This endpoint requires Spotter - please contact ThoughtSpot support to enable Spotter on your cluster. + * @param singleAnswerRequest + */ + singleAnswer(singleAnswerRequest: SingleAnswerRequest, _options?: Configuration): Promise; + /** + * Stops an in-progress agent conversation response. Version: 26.6.0.cl or later Version: 26.6.0.cl or later Stops an in-progress agent response for the specified conversation. Use this endpoint to cancel a response that is actively being generated — for example, when the user navigates away, reformulates their question, or no longer needs the current result. Requires `CAN_USE_SPOTTER` privilege and access to the specified conversation. #### Usage guidelines The request must include: - `conversation_identifier` *(path parameter)*: the unique ID of the conversation whose active response should be stopped, as returned by `createAgentConversation` A successful request returns an empty `204 No Content` response. If there is no active response in progress at the time of the call, the request is still treated as successful. After stopping a response, the conversation session remains active. You can continue sending messages using `sendAgentConversationMessage` or `sendAgentConversationMessageStreaming`. #### Example request ```bash POST /api/rest/2.0/ai/agent/conversation/{conversation_identifier}/stop-response ``` #### Typical usage scenario This endpoint is useful when integrating Spotter into a chat UI where users can cancel a long-running query. For example: 1. User sends a message via `sendAgentConversationMessageStreaming`. 2. User clicks a \"Stop generating\" button while the response is streaming. 3. Your client calls `stopConversation` with the active `conversation_identifier`. 4. The stream is terminated and the user can ask a new question. #### Error responses | Code | Description | |------|-------------| | 401 | Unauthorized — authentication token is missing, expired, or invalid. | | 403 | Forbidden — the authenticated user does not have `CAN_USE_SPOTTER` privilege or lacks access to the specified conversation. | > ###### Note: > > - Calling this endpoint when no response is in progress does not return an error. > - The conversation context is preserved after stopping — previous messages and answers remain accessible. > - Available from version 26.6.0.cl and later. > - This endpoint requires Spotter — please contact ThoughtSpot Support to enable Spotter on your cluster. > - This feature is available only for **Spotter 3** (`SPOTTER3`) version. + * @param conversationIdentifier Unique identifier of the conversation to stop. + */ + stopConversation(conversationIdentifier: string, _options?: Configuration): Promise; +} +declare class AIApiResponseProcessor { + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to createAgentConversation + * @throws ApiException if the response code was not in [200, 299] + */ + createAgentConversation(response: ResponseContext): Promise; + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to createConversation + * @throws ApiException if the response code was not in [200, 299] + */ + createConversation(response: ResponseContext): Promise; + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to getDataSourceSuggestions + * @throws ApiException if the response code was not in [200, 299] + */ + getDataSourceSuggestions(response: ResponseContext): Promise; + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to getNLInstructions + * @throws ApiException if the response code was not in [200, 299] + */ + getNLInstructions(response: ResponseContext): Promise; + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to getRelevantQuestions + * @throws ApiException if the response code was not in [200, 299] + */ + getRelevantQuestions(response: ResponseContext): Promise; + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to queryGetDecomposedQuery + * @throws ApiException if the response code was not in [200, 299] + */ + queryGetDecomposedQuery(response: ResponseContext): Promise; + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to sendAgentConversationMessage + * @throws ApiException if the response code was not in [200, 299] + */ + sendAgentConversationMessage(response: ResponseContext): Promise; + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to sendAgentConversationMessageStreaming + * @throws ApiException if the response code was not in [200, 299] + */ + sendAgentConversationMessageStreaming(response: ResponseContext): Promise; + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to sendAgentMessage + * @throws ApiException if the response code was not in [200, 299] + */ + sendAgentMessage(response: ResponseContext): Promise; + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to sendAgentMessageStreaming + * @throws ApiException if the response code was not in [200, 299] + */ + sendAgentMessageStreaming(response: ResponseContext): Promise; + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to sendMessage + * @throws ApiException if the response code was not in [200, 299] + */ + sendMessage(response: ResponseContext): Promise>; + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to setNLInstructions + * @throws ApiException if the response code was not in [200, 299] + */ + setNLInstructions(response: ResponseContext): Promise; + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to singleAnswer + * @throws ApiException if the response code was not in [200, 299] + */ + singleAnswer(response: ResponseContext): Promise; + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to stopConversation + * @throws ApiException if the response code was not in [200, 299] + */ + stopConversation(response: ResponseContext): Promise; +} + +/** + * no description + */ +declare class AuthenticationApiRequestFactory extends BaseAPIRequestFactory { + /** + * Version: 26.6.0.cl or later Enables or disables authentication at cluster or org level for the specified auth type. Currently supports `TRUSTED_AUTH`. #### Required privileges Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) or `CONTROL_TRUSTED_AUTH` (**Can Enable or Disable Trusted Authentication**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled, the `CONTROL_TRUSTED_AUTH` privilege is required. #### Usage guidelines Use `cluster_preferences` to enable or disable authentication at the cluster level. Cluster-level settings can only be configured from the Primary Org. - `ENABLED` — Generates a new access token if one does not exist. An existing token is preserved. - `DISABLED` — Revokes the existing cluster-level access token. Use `org_preferences` to enable or disable authentication for one or more Orgs. Each entry must include an `org_identifier` (unique ID or name) and an `auth_status`. Org-level configuration requires the per-Org authentication feature to be enabled on your instance. - `ENABLED` — Generates a new org-level access token if one does not exist. - `DISABLED` — Revokes the existing org-level access token for that Org. Both `cluster_preferences` and `org_preferences` are optional. Omitting a field leaves the corresponding settings unchanged. If both are omitted, the API returns `204 No Content` without making any changes. **Note**: Cluster-level and org-level settings are independent of each other. Enabling or disabling one does not affect the other. + * @param configureAuthSettingsRequest + */ + configureAuthSettings(configureAuthSettingsRequest: ConfigureAuthSettingsRequest, _options?: Configuration): Promise; + /** + * Version: 9.0.0.cl or later Retrieves details of the current user session for the token provided in the request header. Any ThoughtSpot user can access this endpoint and send an API request. The data returned in the API response varies according to user\'s privilege and object access permissions. **NOTE**: In ThoughtSpot, users with cluster administration privileges can access all Orgs by default. However, unless the administrator is explicitly added to an Org, the Orgs list in the session information returned by the API will include only the Primary Org. To include other Orgs in the API response, you must explicitly add the administrator to each Org in the Admin settings page in the UI or via user REST API. + */ + getCurrentUserInfo(_options?: Configuration): Promise; + /** + * Version: 9.4.0.cl or later Retrieves details of the current session token for the bearer token provided in the request header. This API endpoint does not create a new token. Instead, it returns details about the token, including the token string, creation time, expiration time, and the associated user. Use this endpoint to introspect your current session token, debug authentication issues, or when a frontend application needs session token details. Any ThoughtSpot user with a valid bearer token can access this endpoint and send an API request + */ + getCurrentUserToken(_options?: Configuration): Promise; + /** + * Version: 10.4.0.cl or later Creates an authentication token that provides values for the formula variables in the Row Level Security (RLS) rules for a given user. Recommended for use cases that require Attribute-based access control (ABAC) via RLS. #### Required privileges To add a new user and assign privileges during auto-creation, the `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege is required. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled, the `CONTROL_TRUSTED_AUTH` (**Can Enable or Disable Trusted Authentication**) privilege and edit access to the data source are required. To configure formula variables for all Orgs on your instance or the Primary Org, cluster administration privileges are required. Org administrators can configure formula variables for their respective Orgs. If Role-Based Access Control (RBAC) is enabled, users with the `CAN_MANAGE_VARIABLES` (**Can manage variables**) role privilege can also create and manage variables for their Org context. #### Usage guidelines You can generate a token by providing a `username` and `password`, or by using a `secret_key`. To generate a `secret_key`, the administrator must enable [Trusted authentication](https://developers.thoughtspot.com/docs/trusted-auth-secret-key) in the **Develop** > **Customizations** > **Security Settings** page. **Note**: * When both `password` and `secret_key` are included in the API request, `password` takes precedence. * If [Multi-Factor Authentication (MFA)](https://docs.thoughtspot.com/cloud/latest/authentication-local-mfa) is enabled on your instance, the API login request with `username` and `password` returns an error. You can switch to token-based authentication with `secret_key` or contact ThoughtSpot Support for assistance. The token obtained from ThoughtSpot is valid for 5 minutes by default. You can configure the token expiration time as required. #### ABAC via RLS To implement ABAC via RLS and assign security entitlements to users during session creation, generate a token with custom variable values. The values set in the authentication token are applied to the formula variables referenced in RLS rules at the table level, which determines the data each user can access based on their entitlements. The variable values can be configured to persist for a specific set of Models in user sessions initiated with the token, allowing different RLS rules to be set for different data models. Once defined, the rules are added to the user\'s `variable_values` object, after which all sessions will use the persisted values. For more information, see [ABAC via tokens Documentation](https://developers.thoughtspot.com/docs/abac-via-rls-variables). ##### Formula variables Before defining variable values, ensure the variables are created and available on your instance. To create a formula variable, you can use the **Create variable** (`/api/rest/2.0/template/variables/create`) REST API endpoint, with the variable `type` set as `Formula_Variable` in the API request. The API doesn\'t support `\"persist_option\": \"RESET\"` and `\"persist_option\": \"NONE\"` when `variable_values` are defined in the request. If you are using `variable_values` for token generation, you must use other supported persist options such as `APPEND` or `REPLACE`. If you want to use `RESET` or `NONE`, do not pass any `variable_values`. In such cases, `variable_values` will remain unaffected. #### Supported objects The supported object type is `LOGICAL_TABLE`. When using `object_id` with `variable_values`, models are supported. #### Just-in-time provisioning For [just-in-time user creation and provisioning](https://developers.thoughtspot.com/docs/just-in-time-provisioning), specify the following attributes in the API request: * `auto_create` * `username` * `display_name` * `email` * `groups` Set `auto_create` to `true` if the username does not exist in ThoughtSpot. If the username already exists in ThoughtSpot and `auto_create` is set to `true`, user properties such as display name, email, Org and group entitlements will not be updated with new values. Setting `auto_create` to `true` does not create formula variables. Hence, this setting will not be applicable to `variable_values`. #### Important point to note All options in the token creation APIs that define user access to data in ThoughtSpot will take effect during token creation, not when the token is used for authentication. For example, `auto_create:true` will create the user when the authentication token is created. Persist options such as `APPEND` and `REPLACE` will persist `variable_values` on the user profile when the token is created. + * @param getCustomAccessTokenRequest + */ + getCustomAccessToken(getCustomAccessTokenRequest: GetCustomAccessTokenRequest, _options?: Configuration): Promise; + /** + * Version: 9.0.0.cl or later Generates an authentication token for creating a full session in ThoughtSpot for a given user. Recommended for use cases that do not require Attribute-based access control (ABAC) via Row Level Security (RLS). #### Usage guidelines You can generate a token for a user by providing a `username` and `password`, or by using the `secret_key` generated for your instance. To generate a `secret_key`, the administrator must enable [Trusted authentication](https://developers.thoughtspot.com/docs/trusted-auth-secret-key) in the **Develop** > **Customizations** > **Security Settings** page. **Note**: * When both `password` and `secret_key` are included in the API request, `password` takes precedence. * If [Multi-Factor Authentication (MFA)](https://docs.thoughtspot.com/cloud/latest/authentication-local-mfa) is enabled on your instance, the API login request with `username` and `password` returns an error. You can switch to token-based authentication with `secret_key` or contact ThoughtSpot Support for assistance. The token obtained from ThoughtSpot is valid for 5 minutes by default. You can configure the token expiration time as required. #### Just-in-time provisioning For [just-in-time user creation and provisioning](https://developers.thoughtspot.com/docs/just-in-time-provisioning), specify the following attributes in the API request: * `auto_create` * `username` * `display_name` * `email` * `group_identifiers` Set `auto_create` to `true` if the username does not exist in ThoughtSpot. If the user already exists in ThoughtSpot and `auto_create` is set to `true`, user properties such as display name, email and group assignment will be updated. To add a new user and assign privileges during auto-creation, the `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege is required. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled, the `CONTROL_TRUSTED_AUTH` (**Can Enable or Disable Trusted Authentication**) privilege is required. #### Important point to note All options in the token creation APIs that define user access to data in ThoughtSpot will take effect during token creation, not when the token is used for authentication. For example, `auto_create:true` will create the user when the authentication token is created. + * @param getFullAccessTokenRequest + */ + getFullAccessToken(getFullAccessTokenRequest: GetFullAccessTokenRequest, _options?: Configuration): Promise; + /** + * Version: 9.0.0.cl or later Generates an authentication token that provides access to a specific metadata object. This object list is intersected with the list of objects the user is allowed to access via group membership. For more information, see [Object security](https://docs.thoughtspot.com/cloud/latest/security-data-object#object_security). #### Usage guidelines You can generate a token for a user by providing a `username` and `password`, or by using the `secret_key` generated for your instance. To generate a `secret_key`, the administrator must enable [Trusted authentication](https://developers.thoughtspot.com/docs/trusted-auth-secret-key) in the **Develop** > **Customizations** > **Security Settings** page. **Note**: * When both `password` and `secret_key` are included in the API request, `password` takes precedence. * If [Multi-Factor Authentication (MFA)](https://docs.thoughtspot.com/cloud/latest/authentication-local-mfa) is enabled on your instance, the API login request with `username` and `password` returns an error. You can switch to token-based authentication with `secret_key` or contact ThoughtSpot Support for assistance. The token obtained from ThoughtSpot is valid for 5 minutes by default. You can configure the token expiration time as required. #### Just-in-time provisioning For [just-in-time user creation and provisioning](https://developers.thoughtspot.com/docs/just-in-time-provisioning), specify the following attributes in the API request: * `auto_create` * `username` * `display_name` * `email` * `group_identifiers` Set `auto_create` to `true` if the user is not available in ThoughtSpot. If the user already exists in ThoughtSpot and the `auto_create` parameter is set to `true`, user properties such as display name, email, and group assignment will be updated. To add a new user and assign privileges, the `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege is required. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled, the `CONTROL_TRUSTED_AUTH`(**Can Enable or Disable Trusted Authentication**) privilege is required. #### Important point to note All options in the token creation APIs that define user access to data in ThoughtSpot will take effect during token creation, not when the token is used for authentication. For example, `auto_create:true` will create the user when the authentication token is created. + * @param getObjectAccessTokenRequest + */ + getObjectAccessToken(getObjectAccessTokenRequest: GetObjectAccessTokenRequest, _options?: Configuration): Promise; + /** + * Version: 9.0.0.cl or later Creates a login session for a ThoughtSpot user with Basic authentication. In Basic authentication method, REST clients log in to ThoughtSpot using `username` and `password` attributes. On a multi-tenant cluster with Orgs, users can pass the ID of the Org in the API request to log in to a specific Org context. **Note**: If Multi-Factor Authentication (MFA) is enabled on your instance, the API login request with basic authentication (`username` and `password` ) returns an error. Contact ThoughtSpot Support for assistance. A successful login returns a session cookie that can be used in your subsequent API requests. + * @param loginRequest + */ + login(loginRequest: LoginRequest, _options?: Configuration): Promise; + /** + * Version: 9.0.0.cl or later Logs out a user from their current session. + */ + logout(_options?: Configuration): Promise; + /** + * Version: 9.0.0.cl or later Revokes the authentication token issued for current user session. The token of your current session expires when you make a call to the `/api/rest/2.0/auth/token/revoke` endpoint. the users will not be able to access ThoughtSpot objects until a new token is obtained. To restart your session, request for a new token from ThoughtSpot. See [Get Full Access Token](#/http/api-endpoints/authentication/get-full-access-token). + * @param revokeTokenRequest + */ + revokeToken(revokeTokenRequest: RevokeTokenRequest, _options?: Configuration): Promise; + /** + * Version: 26.6.0.cl or later Returns the authentication configuration for the specified auth type at cluster and org level. Currently supports `TRUSTED_AUTH`. #### Required privileges Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) or `CONTROL_TRUSTED_AUTH` (**Can Enable or Disable Trusted Authentication**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled, the `CONTROL_TRUSTED_AUTH` privilege is required. #### Usage guidelines Use `scope` to control which level of settings are returned: - `CLUSTER` — Returns cluster-level authentication status and access tokens. Accessible only from the Primary Org. - `ORG` — Returns org-level authentication status and access tokens for the current Org. Requires the per-Org authentication feature to be enabled on your instance. - If `scope` is omitted, both cluster and org-level settings are returned based on the caller\'s org context and feature availability. The `access_tokens` array in `cluster_preferences` or `org_preferences` is omitted when no token is configured at that level. **Note**: Access tokens returned in the response are sensitive credentials. Treat them with the same care as passwords. + * @param searchAuthSettingsRequest + */ + searchAuthSettings(searchAuthSettingsRequest: SearchAuthSettingsRequest, _options?: Configuration): Promise; + /** + * Version: 9.12.0.cl or later Validates the authentication token specified in the API request. If your token is not valid, [Get a new token](#/http/api-endpoints/authentication/get-full-access-token). + * @param validateTokenRequest + */ + validateToken(validateTokenRequest: ValidateTokenRequest, _options?: Configuration): Promise; +} +declare class AuthenticationApiResponseProcessor { + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to configureAuthSettings + * @throws ApiException if the response code was not in [200, 299] + */ + configureAuthSettings(response: ResponseContext): Promise; + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to getCurrentUserInfo + * @throws ApiException if the response code was not in [200, 299] + */ + getCurrentUserInfo(response: ResponseContext): Promise; + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to getCurrentUserToken + * @throws ApiException if the response code was not in [200, 299] + */ + getCurrentUserToken(response: ResponseContext): Promise; + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to getCustomAccessToken + * @throws ApiException if the response code was not in [200, 299] + */ + getCustomAccessToken(response: ResponseContext): Promise; + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to getFullAccessToken + * @throws ApiException if the response code was not in [200, 299] + */ + getFullAccessToken(response: ResponseContext): Promise; + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to getObjectAccessToken + * @throws ApiException if the response code was not in [200, 299] + */ + getObjectAccessToken(response: ResponseContext): Promise; + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to login + * @throws ApiException if the response code was not in [200, 299] + */ + login(response: ResponseContext): Promise; + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to logout + * @throws ApiException if the response code was not in [200, 299] + */ + logout(response: ResponseContext): Promise; + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to revokeToken + * @throws ApiException if the response code was not in [200, 299] + */ + revokeToken(response: ResponseContext): Promise; + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to searchAuthSettings + * @throws ApiException if the response code was not in [200, 299] + */ + searchAuthSettings(response: ResponseContext): Promise; + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to validateToken + * @throws ApiException if the response code was not in [200, 299] + */ + validateToken(response: ResponseContext): Promise; +} + +/** + * no description + */ +declare class CollectionsApiRequestFactory extends BaseAPIRequestFactory { + /** + * Version: 26.4.0.cl or later Creates a new collection in ThoughtSpot. Collections allow you to organize and group related metadata objects such as Liveboards, Answers, worksheets, and other data objects. You can also create nested collections (sub-collections) to build a hierarchical structure. #### Supported operations The API endpoint lets you perform the following operations: * Create a new collection * Add metadata objects (Liveboards, Answers, Logical Tables) to the collection * Create nested collections by adding sub-collections + * @param createCollectionRequest + */ + createCollection(createCollectionRequest: CreateCollectionRequest, _options?: Configuration): Promise; + /** + * Version: 26.4.0.cl or later Deletes one or more collections from ThoughtSpot. #### Delete options * **delete_children**: When set to `true`, deletes the child objects (metadata items) within the collection that the user has access to. Objects that the user does not have permission to delete will be skipped. * **dry_run**: When set to `true`, performs a preview of the deletion operation without actually deleting anything. The response shows what would be deleted, allowing you to review before committing the deletion. #### Response The response includes: * **metadata_deleted**: List of metadata objects that were successfully deleted * **metadata_skipped**: List of metadata objects that were skipped due to lack of permissions or other constraints + * @param deleteCollectionRequest + */ + deleteCollection(deleteCollectionRequest: DeleteCollectionRequest, _options?: Configuration): Promise; + /** + * Version: 26.4.0.cl or later Gets a list of collections available in ThoughtSpot. To get details of a specific collection, specify the collection GUID or name. You can also filter the API response based on the collection name pattern, author, and other criteria. #### Search options * **name_pattern**: Use \'%\' as a wildcard character to match collection names * **collection_identifiers**: Search for specific collections by their GUIDs or names * **include_metadata**: When set to `true`, includes the metadata objects within each collection in the response **NOTE**: If the API returns an empty list, consider increasing the value of the `record_size` parameter. To search across all available collections, set `record_size` to `-1`. + * @param searchCollectionsRequest + */ + searchCollections(searchCollectionsRequest: SearchCollectionsRequest, _options?: Configuration): Promise; + /** + * Version: 26.4.0.cl or later Updates an existing collection in ThoughtSpot. #### Supported operations This API endpoint lets you perform the following operations: * Update collection name and description * Change visibility settings * Add metadata objects to the collection (operation: ADD) * Remove metadata objects from the collection (operation: REMOVE) * Replace all metadata objects in the collection (operation: REPLACE) #### Operation types * **ADD**: Adds the specified metadata objects to the existing collection without removing current items * **REMOVE**: Removes only the specified metadata objects from the collection * **REPLACE**: Replaces all existing metadata objects with the specified items (default behavior) + * @param collectionIdentifier Unique GUID of the collection. Note: Collection names cannot be used as identifiers since duplicate names are allowed. + * @param updateCollectionRequest + */ + updateCollection(collectionIdentifier: string, updateCollectionRequest: UpdateCollectionRequest, _options?: Configuration): Promise; +} +declare class CollectionsApiResponseProcessor { + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to createCollection + * @throws ApiException if the response code was not in [200, 299] + */ + createCollection(response: ResponseContext): Promise; + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to deleteCollection + * @throws ApiException if the response code was not in [200, 299] + */ + deleteCollection(response: ResponseContext): Promise; + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to searchCollections + * @throws ApiException if the response code was not in [200, 299] + */ + searchCollections(response: ResponseContext): Promise; + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to updateCollection + * @throws ApiException if the response code was not in [200, 299] + */ + updateCollection(response: ResponseContext): Promise; +} + +/** + * no description + */ +declare class ConnectionConfigurationsApiRequestFactory extends BaseAPIRequestFactory { + /** + * Version: 10.12.0.cl or later Gets connection configuration objects. Requires `DATAMANAGEMENT` (**Can manage data**) and edit permissions to the connection object, or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) privilege is required. #### Usage guidelines * To get a list of all configurations available in the ThoughtSpot system, send the API request with only the connection name or GUID in the request body. * To fetch details of a configuration object, specify the configuration object name or GUID. + * @param connectionConfigurationSearchRequest + */ + connectionConfigurationSearch(connectionConfigurationSearchRequest: ConnectionConfigurationSearchRequest, _options?: Configuration): Promise; + /** + * Version: 10.12.0.cl or later Creates an additional configuration to an existing connection to a data warehouse. Requires `DATAMANAGEMENT` (**Can manage data**) or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) privilege is required. #### Usage guidelines * A JSON map of configuration attributes in `configuration`. The following example shows the configuration attributes: ``` { \"user\":\"DEV_USER\", \"password\":\"TestConn123\", \"role\":\"DEV\", \"warehouse\":\"DEV_WH\" } ``` * If the `policy_type` is `PRINCIPALS`, then `policy_principals` is a required field. * If the `policy_type` is `PROCESSES`, then `policy_processes` is a required field. * If the `policy_type` is `NO_POLICY`, then `policy_principals` and `policy_processes` are not required fields. #### Parameterized Connection Support For parameterized connections that use OAuth authentication, only the same_as_parent and policy_process_options attributes are allowed in the API request. These attributes are not applicable to connections that are not parameterized. + * @param createConnectionConfigurationRequest + */ + createConnectionConfiguration(createConnectionConfigurationRequest: CreateConnectionConfigurationRequest, _options?: Configuration): Promise; + /** + * Version: 10.12.0.cl or later Deletes connection configuration objects. Requires `DATAMANAGEMENT` (**Can manage data**) and edit permissions to the connection object, or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) privilege is required. + * @param deleteConnectionConfigurationRequest + */ + deleteConnectionConfiguration(deleteConnectionConfigurationRequest: DeleteConnectionConfigurationRequest, _options?: Configuration): Promise; + /** + * Version: 10.12.0.cl or later Updates a connection configuration object. Requires `DATAMANAGEMENT` (**Can manage data**) and edit permissions to the connection object, or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) privilege is required. #### Supported operations This API endpoint lets you perform the following operations in a single API request: * Edit the name or description of the configuration * Edit the configuration properties * Edit the `policy_type` * Edit the type of authentication * Enable or disable a configuration #### Parameterized Connection Support For parameterized oauth based connections, only the `same_as_parent` and `policy_process_options` attributes are allowed. These attributes are not applicable to connections that are not parameterized. **NOTE**: When updating a configuration where `disabled` is `true`, you must reset `disabled` to `true` in your update request payload. If not explicitly set again, the API will default `disabled` to `false`. + * @param configurationIdentifier Unique ID or name of the configuration. + * @param updateConnectionConfigurationRequest + */ + updateConnectionConfiguration(configurationIdentifier: string, updateConnectionConfigurationRequest: UpdateConnectionConfigurationRequest, _options?: Configuration): Promise; +} +declare class ConnectionConfigurationsApiResponseProcessor { + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to connectionConfigurationSearch + * @throws ApiException if the response code was not in [200, 299] + */ + connectionConfigurationSearch(response: ResponseContext): Promise>; + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to createConnectionConfiguration + * @throws ApiException if the response code was not in [200, 299] + */ + createConnectionConfiguration(response: ResponseContext): Promise; + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to deleteConnectionConfiguration + * @throws ApiException if the response code was not in [200, 299] + */ + deleteConnectionConfiguration(response: ResponseContext): Promise; + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to updateConnectionConfiguration + * @throws ApiException if the response code was not in [200, 299] + */ + updateConnectionConfiguration(response: ResponseContext): Promise; +} + +/** + * no description + */ +declare class ConnectionsApiRequestFactory extends BaseAPIRequestFactory { + /** + * Version: 9.2.0.cl or later Creates a connection to a data warehouse for live query services. Requires `DATAMANAGEMENT` (**Can manage data**) or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) privilege is required. #### Create a connection without tables To create a connection without tables: 1. Pass these parameters in your API request. * Name of the connection. * Type of the data warehouse to connect to. * A JSON map of configuration attributes in `data_warehouse_config`. The following example shows the configuration attributes for a SnowFlake connection: ``` { \"configuration\":{ \"accountName\":\"thoughtspot_partner\", \"user\":\"tsadmin\", \"password\":\"TestConn123\", \"role\":\"sysadmin\", \"warehouse\":\"MEDIUM_WH\" }, \"authenticationType\": \"SERVICE_ACCOUNT\", \"externalDatabases\":[ ] } ``` 2. Set `validate` to `false`. **NOTE:** If the `authentication_type` is anything other than SERVICE_ACCOUNT, you must explicitly provide the authenticationType property in the payload. If you do not specify authenticationType, the API will default to SERVICE_ACCOUNT as the authentication type. #### Create a connection with tables If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) and `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` (**Can manage data models**) privilege is required. To create a connection with tables: 1. Pass these parameters in your API request. * Name of the connection. * Type of the data warehouse to connect to. * A JSON map of configuration attributes, database details, and table properties in `data_warehouse_config` as shown in the following example: ``` { \"configuration\":{ \"accountName\":\"thoughtspot_partner\", \"user\":\"tsadmin\", \"password\":\"TestConn123\", \"role\":\"sysadmin\", \"warehouse\":\"MEDIUM_WH\" }, \"authenticationType\": \"SERVICE_ACCOUNT\", \"externalDatabases\":[ { \"name\":\"AllDatatypes\", \"isAutoCreated\":false, \"schemas\":[ { \"name\":\"alldatatypes\", \"tables\":[ { \"name\":\"allDatatypes\", \"type\":\"TABLE\", \"description\":\"\", \"selected\":true, \"linked\":true, \"columns\":[ { \"name\":\"CNUMBER\", \"type\":\"INT64\", \"canImport\":true, \"selected\":true, \"isLinkedActive\":true, \"isImported\":false, \"tableName\":\"allDatatypes\", \"schemaName\":\"alldatatypes\", \"dbName\":\"AllDatatypes\" }, { \"name\":\"CDECIMAL\", \"type\":\"INT64\", \"canImport\":true, \"selected\":true, \"isLinkedActive\":true, \"isImported\":false, \"tableName\":\"allDatatypes\", \"schemaName\":\"alldatatypes\", \"dbName\":\"AllDatatypes\" } ] } ] } ] } ] } ``` 2. Set `validate` to `true`. **NOTE:** If the `authentication_type` is anything other than SERVICE_ACCOUNT, you must explicitly provide the authenticationType property in the payload. If you do not specify authenticationType, the API will default to SERVICE_ACCOUNT as the authentication type. + * @param createConnectionRequest + */ + createConnection(createConnectionRequest: CreateConnectionRequest, _options?: Configuration): Promise; + /** + * Version: 9.2.0.cl or later **Important**: This endpoint is deprecated and will be removed from ThoughtSpot in September 2025. ThoughtSpot strongly recommends using the [Delete Connection V2](#/http/api-endpoints/connections/delete-connection-v2) endpoint to delete your connection objects. #### Usage guidelines Deletes a connection object. Requires `DATAMANAGEMENT` (**Can manage data**) and edit permissions to the connection object, or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) privilege is required. **Note**: If a connection has dependent objects, make sure you remove its associations before the delete operation. + * @param deleteConnectionRequest + */ + deleteConnection(deleteConnectionRequest: DeleteConnectionRequest, _options?: Configuration): Promise; + /** + * Version: 10.4.0.cl or later Deletes a connection object. **Note**: If a connection has dependent objects, make sure you remove its associations before the delete operation. Requires `DATAMANAGEMENT` (**Can manage data**) and edit permissions to the connection object, or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) privilege is required. + * @param connectionIdentifier Unique ID or name of the connection. + */ + deleteConnectionV2(connectionIdentifier: string, _options?: Configuration): Promise; + /** + * Version: 9.9.0.cl or later Exports the difference in connection metadata between CDW and ThoughtSpot Requires `DATAMANAGEMENT` (**Can manage data**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the following Data control privileges may be required: - `CAN_MANAGE_CUSTOM_CALENDAR`(**Can manage custom calendars**) - `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) - `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` (**Can manage data models**) To download the connection metadata difference between ThoughtSpot and CDW, pass the connection GUID as `connection_identifier` in the API request. + * @param connectionIdentifier GUID of the connection + */ + downloadConnectionMetadataChanges(connectionIdentifier: string, _options?: Configuration): Promise; + /** + * Version: 9.9.0.cl or later Validates the difference in connection metadata between CDW and ThoughtSpot. Requires `DATAMANAGEMENT` (**Can manage data**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the following Data control privileges may be required: - `CAN_MANAGE_CUSTOM_CALENDAR`(**Can manage custom calendars**) - `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) - `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` (**Can manage data models**) Returns a boolean indicating whether there is any difference between the connection metadata at ThoughtSpot and CDW. To get the connection metadata difference status, pass the connection GUID as `connection_identifier` in the API request. + * @param connectionIdentifier GUID of the connection + */ + fetchConnectionDiffStatus(connectionIdentifier: string, _options?: Configuration): Promise; + /** + * Version: 26.2.0.cl or later Revokes OAuth refresh tokens for users who no longer require access to a data warehouse connection. When a token is revoked, the affected user\'s session for that connection is terminated, and they must re-authenticate to regain access. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) or `DATAMANAGEMENT` (**Can manage data**) privileges. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on the ThoughtSpot instance, users with `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) privilege can also make API requests to revoke tokens for connection users. #### Usage guidelines You can specify different combinations of identifiers to control which refresh tokens are revoked. - **connection_identifier**: Revokes refresh tokens for all users of the connection, except the connection author. - **connection_identifier** and **user_identifiers**: Revokes refresh tokens only for the users specified in the request. If the name or ID of the connection author is included in the request, their token will also be revoked. - **connection_identifier** and **configuration_identifiers**: Revokes refresh tokens for all users on the specified configurations, except the configuration author. - **connection_identifier**, **configuration_identifiers**, and **user_identifiers**: Revokes refresh tokens for the specified users on the specified configurations. - **connection_identifier** and **org_identifiers**: Revokes refresh tokens for the specified Orgs. Applicable only for published connections. - **connection_identifier**, **org_identifiers**, and **user_identifiers**: Revokes refresh tokens for the specified users in the specified Orgs. Applicable only for published connections. **NOTE**: The `org_identifiers` parameter is only applicable for published connections. Using this parameter for unpublished connections will result in an error. Ensure that the connections are published before making the API request. + * @param connectionIdentifier Unique ID or name of the connection whose refresh tokens need to be revoked. All the users associated with the connection will have their refresh tokens revoked except the author. + * @param revokeRefreshTokensRequest + */ + revokeRefreshTokens(connectionIdentifier: string, revokeRefreshTokensRequest: RevokeRefreshTokensRequest, _options?: Configuration): Promise; + /** + * Version: 9.2.0.cl or later Gets connection objects. Requires `DATAMANAGEMENT` (**Can manage data**) or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) privilege is required. - To get a list of all connections available in the ThoughtSpot system, send the API request without any attributes in the request body. - To get the connection objects for a specific type of data warehouse, specify the type in `data_warehouse_types`. - To fetch details of a connection object, specify the connection object GUID or name. The `name_pattern` attribute allows passing partial text with `%` for a wildcard match. - To get details of the database, schemas, tables, or columns from a data connection object, specify `data_warehouse_object_type`. - To get a specific database, schema, table, or column from a connection object, define the object type in `data_warehouse_object_type` and object properties in the `data_warehouse_objects` array. For example, to search for a column, you must pass the database, schema, and table names in the API request. Note that in the following example, object properties are set in a hierarchical order (`database` > `schema` > `table` > `column`). ``` { \"connections\": [ { \"identifier\": \"b9d1f2ef-fa65-4a4b-994e-30fa2d57b0c2\", \"data_warehouse_objects\": [ { \"database\": \"NEBULADEV\", \"schema\": \"INFORMATION_SCHEMA\", \"table\": \"APPLICABLE_ROLES\", \"column\": \"ROLE_NAME\" } ] } ], \"data_warehouse_object_type\": \"COLUMN\" } ``` - To fetch data by `configuration`, specify `data_warehouse_object_type`. For example, to fetch columns from the `DEVELOPMENT` database, specify the `data_warehouse_object_type` as `DATABASE` and define the `configuration` string as `{\"database\":\"DEVELOPMENT\"}`. To get column data for a specific table, specify the table, for example,`{\"database\":\"RETAILAPPAREL\",\"table\":\"PIPES\"}`. - To query connections by `authentication_type`, specify `data_warehouse_object_type`. Supported values for `authentication_type` are: - `SERVICE_ACCOUNT`: For connections that require service account credentials to authenticate to the Cloud Data Warehouse and fetch data. - `OAUTH`: For connections that require OAuth credentials to authenticate to the Cloud Data Warehouse and fetch data. Teradata, Oracle, and Presto Cloud Data Warehouses do not support the OAuth authentication type. - `IAM`: For connections that have the IAM OAuth set up. This authentication type is supported on Amazon Redshift connections only. - `EXTOAUTH`: For connections that have External OAuth set up. ThoughtSpot supports external [OAuth with Microsoft Azure Active Directory (AD)](https://docs.thoughtspot.com/cloud/latest/ connections-snowflake-azure-ad-oauth) and [Okta for Snowflake data connections](https://docs.thoughtspot.com/cloud/latest/connections-snowflake-okta-oauth). - `KEY_PAIR`: For connections that require Key Pair account credentials to authenticate to the Cloud Data Warehouse and fetch data. This authentication type is supported on Snowflake connections only. - `OAUTH_WITH_PKCE`: For connections that require OAuth with PKCE account credentials to authenticate to the Cloud Data Warehouse and fetch data. This authentication type is supported on Snowflake, Starburst, Databricks, Denodo connections only. - `EXTOAUTH_WITH_PKCE`: For connections that require External OAuth With PKCE account credentials to authenticate to the Cloud Data Warehouse and fetch data. This authentication type is supported on Snowflake connections only. - `OAUTH_WITH_PEZ`: For connections that require OAuth With PEZ account credentials to authenticate to the Cloud Data Warehouse and fetch data. This authentication type is supported on Amazon Redshift connections only. - `OAUTH_WITH_SERVICE_PRINCIPAL`: For connections that require OAuth With Service Principal account credentials to authenticate to the Cloud Data Warehouse and fetch data. This authentication type is supported on Databricks connections only. - `PERSONAL_ACCESS_TOKEN`: For connections that require Personal Access Token account credentials to authenticate to the Cloud Data Warehouse and fetch data. This authentication type is supported on Databricks connections only. - `OAUTH_CLIENT_CREDENTIALS`: For connections that require OAuth Client Credentials to authenticate to the Cloud Data Warehouse and fetch data. This authentication type is supported on Snowflake connections only. - To include more details about connection objects in the API response, set `include_details` to `true`. - You can also sort the output by field names and filter connections by tags. **NOTE**: When filtering connection records by parameters other than `data_warehouse_types` or `tag_identifiers`, ensure that you set `record_size` to `-1` and `record_offset` to `0` for precise results. + * @param searchConnectionRequest + */ + searchConnection(searchConnectionRequest: SearchConnectionRequest, _options?: Configuration): Promise; + /** + * Version: 26.5.0.cl or later Synchronizes connection metadata attributes from your Cloud Data Warehouse (CDW) with ThoughtSpot. Requires the `DATAMANAGEMENT` (**Can manage data**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` (**Can manage data models**) privilege is required. #### Usage guidelines To synchronize attributes from a CDW, specify the connection GUID or name in the `connection_identifier` path parameter and `sync_attributes` in the request body. Default attribute is `[\"DESCRIPTION\"]`. ##### Hierarchical schema * Connection: The connection object for the sync operation. * Tables: Tables for the sync operation. When no table is specified, all tables are synchronized. * Columns: If the table is specified, you can add the columns for the sync operation. If no columns are specified, all columns in the specified table are considered for the sync operation. To set the scope for the sync operation: * Connection-level: To sync all tables and columns, pass an empty request body, or only the attributes in the request body. * Table-level: To synchronize specific tables and their columns, specify the table identifiers in the `tables` array. * Column-level: To synchronize specific columns, specify the table identifier as the key and column identifiers as the value in the `tables` array. ``` { \"tables\": [ {\"table-guid-1\": [\"column-guid-1\", \"column-guid-2\"]}, \"table-guid-2\" ], \"sync_attributes\": [\"DESCRIPTION\"] } ``` ##### API response If the sync operation is successful, the API returns the following information: * Status of the sync operation. For example, `SUCCESS`, `PARTIAL_SUCCESS`, or `NO_UPDATE`. * Number of tables and columns that were updated. * Number of tables and columns with the sync failed status when the overall sync status is `PARTIAL_SUCCESS`. * Message text indicating the sync results. + * @param connectionIdentifier Unique ID or name of the connection. + * @param syncMetadataRequest + */ + syncMetadata(connectionIdentifier: string, syncMetadataRequest: SyncMetadataRequest, _options?: Configuration): Promise; + /** + * Version: 9.2.0.cl or later **Important**: This endpoint is deprecated and will be removed from ThoughtSpot in September 2025. ThoughtSpot strongly recommends using the [Update connection V2](#/http/api-endpoints/connections/update-connection-v2) endpoint to update your connection objects. #### Usage guidelines Updates a connection object. Requires `DATAMANAGEMENT` (**Can manage data**) and edit permissions to the connection object, or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) privilege is required. To update a connection object, pass these parameters in your API request: 1. GUID of the connection object. 2. If you are updating tables or database schema of a connection object: a. Add the updated JSON map of metadata with database, schema, and tables in `data_warehouse_config`. b. Set `validate` to `true`. 3. If you are updating a configuration attribute, connection name, or description, you can set `validate` to `false`. + * @param updateConnectionRequest + */ + updateConnection(updateConnectionRequest: UpdateConnectionRequest, _options?: Configuration): Promise; + /** + * Version: 26.6.0.cl or later Activates or deactivates a connection. A deactivated connection cannot be used for queries or operations until it is activated again. Requires `DATAMANAGEMENT` (**Can manage data**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) privilege is required. Only the connection owner or an administrator can perform this operation. #### Usage guidelines To update the status of a connection, specify the connection GUID or name in the `connection_identifier` path parameter and the desired `status` in the request body. - **ACTIVATED**: Enables the connection. Queries and operations can resume on an activated connection. - **DEACTIVATED**: Disables the connection. It does not remove the connection metadata, but only makes the connection unavailable for queries and operations. You can reactivate a deactivated connection by setting \"status\": \"ACTIVATED\". + * @param connectionIdentifier Unique ID or name of the connection. + * @param updateConnectionStatusRequest + */ + updateConnectionStatus(connectionIdentifier: string, updateConnectionStatusRequest: UpdateConnectionStatusRequest, _options?: Configuration): Promise; + /** + * Version: 10.4.0.cl or later Updates a connection object. Requires `DATAMANAGEMENT` (**Can manage data**) and edit permissions to the connection object, or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) privilege is required. To update a connection object, pass these parameters in your API request: 1. GUID of the connection object. 2. If you are updating tables or database schema of a connection object: a. Add the updated JSON map of metadata with database, schema, and tables in `data_warehouse_config`. b. Set `validate` to `true`. **NOTE:** If the `authentication_type` is anything other than SERVICE_ACCOUNT, you must explicitly provide the authenticationType property in the payload. If you do not specify authenticationType, the API will default to SERVICE_ACCOUNT as the authentication type. * A JSON map of configuration attributes, database details, and table properties in `data_warehouse_config` as shown in the following example: * This is an example of updating a single table in a empty connection: ``` { \"authenticationType\": \"SERVICE_ACCOUNT\", \"externalDatabases\": [ { \"name\": \"DEVELOPMENT\", \"isAutoCreated\": false, \"schemas\": [ { \"name\": \"TS_dataset\", \"tables\": [ { \"name\": \"DEMORENAME\", \"type\": \"TABLE\", \"description\": \"\", \"selected\": true, \"linked\": true, \"gid\": 0, \"datasetId\": \"-1\", \"subType\": \"\", \"reportId\": \"\", \"viewId\": \"\", \"columns\": [ { \"name\": \"Col1\", \"type\": \"VARCHAR\", \"canImport\": true, \"selected\": true, \"description\": \"\", \"isLinkedActive\": true, \"isAggregate\": false }, { \"name\": \"Col2\", \"type\": \"VARCHAR\", \"canImport\": true, \"selected\": true, \"description\": \"\", \"isLinkedActive\": true, \"isAggregate\": false }, { \"name\": \"Col3\", \"type\": \"VARCHAR\", \"canImport\": true, \"selected\": true, \"description\": \"\", \"isLinkedActive\": true, \"isAggregate\": false }, { \"name\": \"Col312\", \"type\": \"VARCHAR\", \"canImport\": true, \"selected\": true, \"description\": \"\", \"isLinkedActive\": true, \"isAggregate\": false }, { \"name\": \"Col4\", \"type\": \"VARCHAR\", \"canImport\": true, \"selected\": true, \"description\": \"\", \"isLinkedActive\": true, \"isAggregate\": false } ], \"relationships\": [] } ] } ] } ], \"configuration\": { \"password\": \"\", \"database\": \"DEVELOPMENT\", \"role\": \"DEV\", \"accountName\": \"thoughtspot_partner\", \"warehouse\": \"DEMO_WH\", \"user\": \"DEV_USER\" } } ``` * This is an example of updating a single table in an existing connection with tables: ``` { \"authenticationType\": \"SERVICE_ACCOUNT\", \"externalDatabases\": [ { \"name\": \"DEVELOPMENT\", \"isAutoCreated\": false, \"schemas\": [ { \"name\": \"TS_dataset\", \"tables\": [ { \"name\": \"CUSTOMER\", \"type\": \"TABLE\", \"description\": \"\", \"selected\": true, \"linked\": true, \"gid\": 0, \"datasetId\": \"-1\", \"subType\": \"\", \"reportId\": \"\", \"viewId\": \"\", \"columns\": [], \"relationships\": [] }, { \"name\": \"tpch5k_falcon_default_schema_users\", \"type\": \"TABLE\", \"description\": \"\", \"selected\": true, \"linked\": true, \"gid\": 0, \"datasetId\": \"-1\", \"subType\": \"\", \"reportId\": \"\", \"viewId\": \"\", \"columns\": [ { \"name\": \"user_id\", \"type\": \"INT64\", \"canImport\": true, \"selected\": true, \"description\": \"\", \"isLinkedActive\": true, \"isAggregate\": false }, { \"name\": \"product_id\", \"type\": \"INT64\", \"canImport\": true, \"selected\": true, \"description\": \"\", \"isLinkedActive\": true, \"isAggregate\": false }, { \"name\": \"user_cost\", \"type\": \"INT64\", \"canImport\": true, \"selected\": true, \"description\": \"\", \"isLinkedActive\": true, \"isAggregate\": false } ], \"relationships\": [] } ] } ] } ], \"configuration\": { \"password\": \"\", \"database\": \"DEVELOPMENT\", \"role\": \"DEV\", \"accountName\": \"thoughtspot_partner\", \"warehouse\": \"DEMO_WH\", \"user\": \"DEV_USER\" } } ``` 3. If you are updating a configuration attribute, connection name, or description, you can set `validate` to `false`. **NOTE:** If the `authentication_type` is anything other than SERVICE_ACCOUNT, you must explicitly provide the authenticationType property in the payload. If you do not specify authenticationType, the API will default to SERVICE_ACCOUNT as the authentication type. * A JSON map of configuration attributes in `data_warehouse_config`. The following example shows the configuration attributes for a Snowflake connection: ``` { \"configuration\":{ \"accountName\":\"thoughtspot_partner\", \"user\":\"tsadmin\", \"password\":\"TestConn123\", \"role\":\"sysadmin\", \"warehouse\":\"MEDIUM_WH\" }, \"externalDatabases\":[ ] } ``` + * @param connectionIdentifier Unique ID or name of the connection. + * @param updateConnectionV2Request + */ + updateConnectionV2(connectionIdentifier: string, updateConnectionV2Request: UpdateConnectionV2Request, _options?: Configuration): Promise; +} +declare class ConnectionsApiResponseProcessor { + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to createConnection + * @throws ApiException if the response code was not in [200, 299] + */ + createConnection(response: ResponseContext): Promise; + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to deleteConnection + * @throws ApiException if the response code was not in [200, 299] + */ + deleteConnection(response: ResponseContext): Promise; + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to deleteConnectionV2 + * @throws ApiException if the response code was not in [200, 299] + */ + deleteConnectionV2(response: ResponseContext): Promise; + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to downloadConnectionMetadataChanges + * @throws ApiException if the response code was not in [200, 299] + */ + downloadConnectionMetadataChanges(response: ResponseContext): Promise; + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to fetchConnectionDiffStatus + * @throws ApiException if the response code was not in [200, 299] + */ + fetchConnectionDiffStatus(response: ResponseContext): Promise; + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to revokeRefreshTokens + * @throws ApiException if the response code was not in [200, 299] + */ + revokeRefreshTokens(response: ResponseContext): Promise; + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to searchConnection + * @throws ApiException if the response code was not in [200, 299] + */ + searchConnection(response: ResponseContext): Promise>; + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to syncMetadata + * @throws ApiException if the response code was not in [200, 299] + */ + syncMetadata(response: ResponseContext): Promise; + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to updateConnection + * @throws ApiException if the response code was not in [200, 299] + */ + updateConnection(response: ResponseContext): Promise; + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to updateConnectionStatus + * @throws ApiException if the response code was not in [200, 299] + */ + updateConnectionStatus(response: ResponseContext): Promise; + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to updateConnectionV2 + * @throws ApiException if the response code was not in [200, 299] + */ + updateConnectionV2(response: ResponseContext): Promise; +} + +/** + * no description + */ +declare class CustomActionApiRequestFactory extends BaseAPIRequestFactory { + /** + * Version: 9.6.0.cl or later Creates a custom action that appears as a menu action on a saved Answer or Liveboard visualization. Requires `DEVELOPER` (**Has Developer privilege**) or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `DEVELOPER` (**Has developer privilege**) privilege is required. #### Usage Guidelines The API lets you create the following types of custom actions: * URL-based action Allows pushing data to an external URL. * Callback action Triggers a callback to the host application and initiates a response payload on an embedded ThoughtSpot instance. By default, custom actions are visible to only administrator or developer users. To make a custom action available to other users, and specify the groups in `group_identifiers`. By default, the custom action is set as a _global_ action on all visualizations and saved Answers. To assign a custom action to specific Liveboard visualization, saved Answer, or Worksheet, set `visibility` to `false` in `default_action_config` property and specify the GUID or name of the object in `associate_metadata`. For more information, see [Custom actions](https://developers.thoughtspot.com/docs/custom-action-intro). + * @param createCustomActionRequest + */ + createCustomAction(createCustomActionRequest: CreateCustomActionRequest, _options?: Configuration): Promise; + /** + * Version: 9.6.0.cl or later Removes the custom action specified in the API request. Requires `DEVELOPER` (**Has Developer privilege**) or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `DEVELOPER` (**Has developer privilege**) privilege is required. + * @param customActionIdentifier Unique ID or name of the custom action. + */ + deleteCustomAction(customActionIdentifier: string, _options?: Configuration): Promise; + /** + * Version: 9.6.0.cl or later Gets custom actions configured on the cluster. Requires `DEVELOPER` (**Has Developer privilege**) or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `DEVELOPER` (**Has developer privilege**) privilege is required. + * @param searchCustomActionsRequest + */ + searchCustomActions(searchCustomActionsRequest: SearchCustomActionsRequest, _options?: Configuration): Promise; + /** + * Version: 9.6.0.cl or later Updates a custom action. Requires `DEVELOPER` (**Has Developer privilege**) or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `DEVELOPER` (**Has developer privilege**) privilege is required. #### Usage Guidelines The API allows you to modify the following properties: * Name of the custom action * Action availability to groups * Association to metadata objects * Authentication settings for a URL-based action For more information, see [Custom actions](https://developers.thoughtspot.com/docs/custom-action-intro). + * @param customActionIdentifier Unique ID or name of the custom action. + * @param updateCustomActionRequest + */ + updateCustomAction(customActionIdentifier: string, updateCustomActionRequest: UpdateCustomActionRequest, _options?: Configuration): Promise; +} +declare class CustomActionApiResponseProcessor { + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to createCustomAction + * @throws ApiException if the response code was not in [200, 299] + */ + createCustomAction(response: ResponseContext): Promise; + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to deleteCustomAction + * @throws ApiException if the response code was not in [200, 299] + */ + deleteCustomAction(response: ResponseContext): Promise; + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to searchCustomActions + * @throws ApiException if the response code was not in [200, 299] + */ + searchCustomActions(response: ResponseContext): Promise>; + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to updateCustomAction + * @throws ApiException if the response code was not in [200, 299] + */ + updateCustomAction(response: ResponseContext): Promise; +} + +/** + * no description + */ +declare class CustomCalendarsApiRequestFactory extends BaseAPIRequestFactory { + /** + * Version: 10.12.0.cl or later Creates a new [custom calendar](https://docs.thoughtspot.com/cloud/latest/connections-cust-cal). Requires `DATAMANAGEMENT` (**Can manage data**) or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your ThoughtSpot instance, the `CAN_MANAGE_CUSTOM_CALENDAR` (**Can manage custom calendars**) privilege is required. #### Usage guidelines You can create a custom calendar from scratch or an existing Table in ThoughtSpot. For both methods of calendar creation, the following parameters are required: * Name of the custom calendar. * Calendar creation method. To create a calendar from an existing table, specify the method: - `FROM_EXISTING_TABLE` - Creates calendar from the table reference provided in the API request. - `FROM_INPUT_PARAMS` - Creates a calendar from the parameters defined in the API request. * Connection ID and Table name * Database and schema name attributes: For most Cloud Data Warehouse (CDW) connectors, both `database_name` and `schema_name` attributes are required. However, the attribute requirements are conditional and vary based on the connector type and its metadata structure. For example, for connectors such as Teradata, MySQL, SingleSore, Amazon Aurora MySQL, Amazon RDS MySQL, Oracle, and GCP_MYSQL, the `schema_name` is required, whereas the `database_name` attribute is not. Similarly, connectors such as ClickHouse require you to specify the `database_name` and the schema specification in such cases is optional. **NOTE**: If you are creating a calendar from an existing table, ensure that the referenced table matches the required DDL for custom calendars. If the schema does not match, the API returns an error. ##### Calendar type The API allows you to create the following types of calendars: * `MONTH_OFFSET`. The default calendar type. A `MONTH_OFFSET` calendar is offset by a few months from the standard calendar months (January to December) and the year begins with the month defined in the request. For example, if the `month_offset` value is set as `April`, the calendar year begins in April. * `4-4-5`. Each quarter in the calendar will include two 4-week months followed by one 5-week month. * `4-5-4`. Each quarter in the calendar will include two 4-week months with a 5-week month between. * `5-4-4`. Each quarter begins with a 5-week month, followed by two 4-week months. To start and end the calendar on a specific date, specify the dates in the `MM/DD/YYYY` format. For `MONTH_OFFSET` calendars, ensure that the `start_date` matches the month specified in the `month_offset` attribute. You can also set the starting day of the week and customize the prefixes for year and quarter labels. #### Examples To create a calendar from an existing table: ``` { \"name\": \"MyCustomCalendar1\", \"table_reference\": { \"connection_identifier\": \"4db8ea22-2ff4-4224-b05a-26674717e468\", \"table_name\": \"MyCalendarTable\", \"database_name\": \"RETAILAPPAREL\", \"schema_name\": \"PUBLIC\" }, \"creation_method\": \"FROM_EXISTING_TABLE\", } ``` To create a calendar from scratch: ``` { \"name\": \"MyCustomCalendar1\", \"table_reference\": { \"connection_identifier\": \"4db8ea22-2ff4-4224-b05a-26674717e468\", \"table_name\": \"MyCalendarTable\", \"database_name\": \"RETAILAPPAREL\", \"schema_name\": \"PUBLIC\" }, \"creation_method\": \"FROM_INPUT_PARAMS\", \"calendar_type\": \"MONTH_OFFSET\", \"month_offset\": \"April\", \"start_day_of_week\": \"Monday\", \"quarter_name_prefix\": \"Q\", \"year_name_prefix\": \"FY\", \"start_date\": \"04/01/2025\", \"end_date\": \"04/31/2025\" } ``` + * @param createCalendarRequest + */ + createCalendar(createCalendarRequest: CreateCalendarRequest, _options?: Configuration): Promise; + /** + * Version: 10.12.0.cl or later Deletes a [custom calendar](https://docs.thoughtspot.com/cloud/latest/connections-cust-cal). Requires `DATAMANAGEMENT` (**Can manage data**) or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your ThoughtSpot instance, the `CAN_MANAGE_CUSTOM_CALENDAR` (**Can manage custom calendars**) privilege is required. #### Usage guidelines To delete a custom calendar, specify the calendar ID as a path parameter in the request URL. + * @param calendarIdentifier Unique ID or name of the Calendar. + */ + deleteCalendar(calendarIdentifier: string, _options?: Configuration): Promise; + /** + * Version: 10.12.0.cl or later Exports a [custom calendar](https://docs.thoughtspot.com/cloud/latest/connections-cust-cal) in the CSV format. Requires `DATAMANAGEMENT` (**Can manage data**) or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your ThoughtSpot instance, the `CAN_MANAGE_CUSTOM_CALENDAR` (**Can manage custom calendars**) privilege is required. #### Usage guidelines Use this API to download a custom calendar in the CSV file format. In your API request, specify the following parameters. * Start and end date of the calendar. For \"month offset\" calendars, the start date must match the month defined in the `month_offset` attribute. You can also specify optional parameters such as the starting day of the week and prefixes for the quarter and year labels. + * @param generateCSVRequest + */ + generateCSV(generateCSVRequest: GenerateCSVRequest, _options?: Configuration): Promise; + /** + * Version: 10.12.0.cl or later Gets a list of [custom calendars](https://docs.thoughtspot.com/cloud/latest/connections-cust-cal). Requires `DATAMANAGEMENT` (**Can manage data**) or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your ThoughtSpot instance, the `CAN_MANAGE_CUSTOM_CALENDAR` (**Can manage custom calendars**) privilege is required. #### Usage guidelines By default, the API returns a list of custom calendars for all connection objects. To retrieve custom calendar details for a particular connection, specify the connection ID. You can also use other search parameters such as `name_pattern` and `sort_options` as search filters. The `name_pattern` parameter filters and returns only those objects that match the specified pattern. Use `%` as a wildcard for pattern matching. + * @param searchCalendarsRequest + */ + searchCalendars(searchCalendarsRequest: SearchCalendarsRequest, _options?: Configuration): Promise; + /** + * Version: 10.12.0.cl or later Updates the properties of a [custom calendar](https://docs.thoughtspot.com/cloud/latest/connections-cust-cal). Requires `DATAMANAGEMENT` (**Can manage data**) or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your ThoughtSpot instance, the `CAN_MANAGE_CUSTOM_CALENDAR` (**Can manage custom calendars**) privilege is required. #### Usage guidelines You can update the properties of a calendar using one of the following methods: * `FROM_INPUT_PARAMS` to update the calendar properties with the values defined in the API request. * `FROM_EXISTING_TABLE` Creates a calendar from the parameters defined in the API request. To update a custom calendar, specify the calendar ID as a path parameter in the request URL and the following parameters in the request body: * Connection ID and Table name * Database and schema name attributes: For most Cloud Data Warehouse (CDW) connectors, both `database_name` and `schema_name` attributes are required. However, the attribute requirements are conditional and vary based on the connector type and its metadata structure. For example, for connectors such as Teradata, MySQL, SingleSore, Amazon Aurora MySQL, Amazon RDS MySQL, Oracle, and GCP_MYSQL, the `schema_name` is required, whereas the `database_name` attribute is not. Similarly, connectors such as ClickHouse require you to specify the `database_name` and the schema specification in such cases is optional. The API allows you to modify the calendar type, month offset value, start and end date, starting day of the week, and prefixes assigned to the year and quarter labels. #### Examples Update a custom calendar using an existing Table in ThoughtSpot: ``` { \"update_method\": \"FROM_EXISTING_TABLE\", \"table_reference\": { \"connection_identifier\": \"Connection1\", \"database_name\": \"db1\", \"table_name\": \"custom_calendar_2025\", \"schame_name\": \"schemaVar\" } } ``` Update a custom calendar with the attributes defined in the API request: ``` { \"update_method\": \"FROM_INPUT_PARAMS\", \"table_reference\": { \"connection_identifier\": \"Connection1\", \"database_name\": \"db1\", \"table_name\": \"custom_calendar_2025\", \"schame_name\": \"schemaVar\" }, \"month_offset\": \"August\", \"start_day_of_week\": \"Monday\", \"start_date\": \"08/01/2025\", \"end_date\": \"07/31/2026\" } ``` + * @param calendarIdentifier Unique Id or name of the calendar. + * @param updateCalendarRequest + */ + updateCalendar(calendarIdentifier: string, updateCalendarRequest: UpdateCalendarRequest, _options?: Configuration): Promise; +} +declare class CustomCalendarsApiResponseProcessor { + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to createCalendar + * @throws ApiException if the response code was not in [200, 299] + */ + createCalendar(response: ResponseContext): Promise; + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to deleteCalendar + * @throws ApiException if the response code was not in [200, 299] + */ + deleteCalendar(response: ResponseContext): Promise; + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to generateCSV + * @throws ApiException if the response code was not in [200, 299] + */ + generateCSV(response: ResponseContext): Promise; + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to searchCalendars + * @throws ApiException if the response code was not in [200, 299] + */ + searchCalendars(response: ResponseContext): Promise>; + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to updateCalendar + * @throws ApiException if the response code was not in [200, 299] + */ + updateCalendar(response: ResponseContext): Promise; +} + +/** + * no description + */ +declare class DBTApiRequestFactory extends BaseAPIRequestFactory { + /** + * Version: 9.9.0.cl or later Creates a DBT connection object in ThoughtSpot. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege or `DATAMANAGEMENT` (**Can manage data**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the following Data control privileges may be required: - `CAN_MANAGE_CUSTOM_CALENDAR`(**Can manage custom calendars**) - `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) - `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` (**Can manage data models**) #### About create DBT connection DBT connection in ThoughtSpot is used by the user to define DBT credentials for cloud . The API needs embrace connection, embrace database name, DBT url, import type, DBT account identifier, DBT project identifier, DBT access token and environment details (or) embrace connection, embrace database name, import type, file_content to create a connection object. To know more about DBT, see ThoughtSpot Product Documentation. + * @param connectionName Name of the connection. + * @param databaseName Name of the Database. + * @param importType Mention type of Import + * @param accessToken Access token is mandatory when Import_Type is DBT_CLOUD. + * @param dbtUrl DBT URL is mandatory when Import_Type is DBT_CLOUD. + * @param accountId Account ID is mandatory when Import_Type is DBT_CLOUD + * @param projectId Project ID is mandatory when Import_Type is DBT_CLOUD + * @param dbtEnvId DBT Environment ID\\\" + * @param projectName Name of the project + * @param fileContent Upload DBT Manifest and Catalog artifact files as a ZIP file. This field is Mandatory when Import Type is \\\'ZIP_FILE\\\' + */ + dbtConnection(connectionName: string, databaseName: string, importType?: string, accessToken?: string, dbtUrl?: string, accountId?: string, projectId?: string, dbtEnvId?: string, projectName?: string, fileContent?: HttpFile, _options?: Configuration): Promise; + /** + * Version: 9.9.0.cl or later Resynchronize the existing list of models, tables, worksheet tml’s and import them to Thoughtspot based on the DBT connection object. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege or `DATAMANAGEMENT` (**Can manage data**) privilege, along with an existing DBT connection. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the following data control privileges may be required: - `CAN_MANAGE_CUSTOM_CALENDAR`(**Can manage custom calendars**) - `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) - `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` (**Can manage data models**) + * @param dbtConnectionIdentifier Unique ID of the DBT connection. + * @param fileContent Upload DBT Manifest and Catalog artifact files as a ZIP file. This field is mandatory if the connection was created with import_type ‘ZIP_FILE’ + */ + dbtGenerateSyncTml(dbtConnectionIdentifier: string, fileContent?: HttpFile, _options?: Configuration): Promise; + /** + * Version: 9.9.0.cl or later Generate required table and worksheet and import them. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege or `DATAMANAGEMENT` (**Can manage data**) privilege, along with an existing DBT connection. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the following data control privileges may be required: - `CAN_MANAGE_CUSTOM_CALENDAR`(**Can manage custom calendars**) - `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) - `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` (**Can manage data models**) #### About generate TML Models and Worksheets to be imported can be selected by the user as part of the API. + * @param dbtConnectionIdentifier Unique ID of the DBT connection. + * @param modelTables List of Models and their respective Tables Example: \\\'[{\\\"model_name\\\": \\\"model_name\\\", \\\"tables\\\": [\\\"table_name\\\"]}]\\\' + * @param importWorksheets Mention the worksheet tmls to import + * @param worksheets List of worksheets is mandatory when import_Worksheets is type SELECTED Example: [\\\"worksheet_name\\\"] + * @param fileContent Upload DBT Manifest and Catalog artifact files as a ZIP file. This field is mandatory if the connection was created with import_type ‘ZIP_FILE’ + */ + dbtGenerateTml(dbtConnectionIdentifier: string, modelTables: string, importWorksheets: string, worksheets?: string, fileContent?: HttpFile, _options?: Configuration): Promise; + /** + * Version: 9.9.0.cl or later Gets a list of DBT connection objects by user and organization, available on the ThoughtSpot system. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege or `DATAMANAGEMENT` (**Can manage data**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the following Data control privileges may be required: - `CAN_MANAGE_CUSTOM_CALENDAR`(**Can manage custom calendars**) - `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) - `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` (**Can manage data models**) #### About search DBT connection To get details of a specific DBT connection identifier, database connection identifier, database connection name, database name, project name, project identifier, environment identifier , import type and author. + */ + dbtSearch(_options?: Configuration): Promise; + /** + * Version: 9.9.0.cl or later Removes the specified DBT connection object from the ThoughtSpot system. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) or `DATAMANAGEMENT` (**Can manage data ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the following Data control privileges may be required: - `CAN_MANAGE_CUSTOM_CALENDAR`(**Can manage custom calendars**) - `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) - `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` (**Can manage data models**) + * @param dbtConnectionIdentifier Unique ID of the DBT Connection. + */ + deleteDbtConnection(dbtConnectionIdentifier: string, _options?: Configuration): Promise; + /** + * Version: 9.9.0.cl or later Updates a DBT connection object. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege or `DATAMANAGEMENT` (**Can manage data ThoughtSpot**) privilege, along with an existing DBT connection. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the following data control privileges may be required: - `CAN_MANAGE_CUSTOM_CALENDAR`(**Can manage custom calendars**) - `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) - `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` (**Can manage data models**) #### About update DBT connection You can modify DBT connection object properties such as embrace connection name, embrace database name, import type, account identifier, access token, project identifier and environment (or) embrace connection, embrace database name, import type, file_content settings. + * @param dbtConnectionIdentifier Unique ID of the DBT Connection. + * @param connectionName Name of the connection. + * @param databaseName Name of the Database. + * @param importType Mention type of Import + * @param accessToken Access token is mandatory when Import_Type is DBT_CLOUD. + * @param dbtUrl DBT URL is mandatory when Import_Type is DBT_CLOUD. + * @param accountId Account ID is mandatory when Import_Type is DBT_CLOUD + * @param projectId Project ID is mandatory when Import_Type is DBT_CLOUD + * @param dbtEnvId DBT Environment ID\\\" + * @param projectName Name of the project + * @param fileContent Upload DBT Manifest and Catalog artifact files as a ZIP file. This field is Mandatory when Import Type is \\\'ZIP_FILE\\\' + */ + updateDbtConnection(dbtConnectionIdentifier: string, connectionName?: string, databaseName?: string, importType?: string, accessToken?: string, dbtUrl?: string, accountId?: string, projectId?: string, dbtEnvId?: string, projectName?: string, fileContent?: HttpFile, _options?: Configuration): Promise; +} +declare class DBTApiResponseProcessor { + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to dbtConnection + * @throws ApiException if the response code was not in [200, 299] + */ + dbtConnection(response: ResponseContext): Promise; + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to dbtGenerateSyncTml + * @throws ApiException if the response code was not in [200, 299] + */ + dbtGenerateSyncTml(response: ResponseContext): Promise; + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to dbtGenerateTml + * @throws ApiException if the response code was not in [200, 299] + */ + dbtGenerateTml(response: ResponseContext): Promise; + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to dbtSearch + * @throws ApiException if the response code was not in [200, 299] + */ + dbtSearch(response: ResponseContext): Promise>; + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to deleteDbtConnection + * @throws ApiException if the response code was not in [200, 299] + */ + deleteDbtConnection(response: ResponseContext): Promise; + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to updateDbtConnection + * @throws ApiException if the response code was not in [200, 299] + */ + updateDbtConnection(response: ResponseContext): Promise; +} + +/** + * no description + */ +declare class DataApiRequestFactory extends BaseAPIRequestFactory { + /** + * Version: 9.0.0.cl or later Fetches data from a saved Answer. Requires at least view access to the saved Answer. The `record_size` attribute determines the number of records to retrieve in an API call. For more information about pagination, record size, and maximum row limit, see [Pagination and record size settings](https://developers.thoughtspot.com/docs/fetch-data-and-report-apis#_pagination_settings_for_data_and_report_apis). + * @param fetchAnswerDataRequest + */ + fetchAnswerData(fetchAnswerDataRequest: FetchAnswerDataRequest, _options?: Configuration): Promise; + /** + * Version: 9.0.0.cl or later Gets data from a Liveboard object and its visualization. Requires at least view access to the Liveboard. #### Usage guidelines In the request body, specify the GUID or name of the Liveboard. To get data for specific visualizations, add the GUIDs or names of the visualizations in the API request. To include unsaved changes in the report, pass the `transient_pinboard_content` script generated from the `getExportRequestForCurrentPinboard` method in the Visual Embed SDK. Upon successful execution, the API returns the report with unsaved changes. If the new Liveboard experience mode, the transient content includes ad hoc changes to visualizations such as sorting, toggling of legends, and data drill down. For more information, and see [Liveboard data API](https://developers.thoughtspot.com/docs/fetch-data-and-report-apis#_fetch_liveboard_data_api). + * @param fetchLiveboardDataRequest + */ + fetchLiveboardData(fetchLiveboardDataRequest: FetchLiveboardDataRequest, _options?: Configuration): Promise; + /** + * Version: 9.0.0.cl or later Generates an Answer from a given data source. Requires at least view access to the data source object (Worksheet or View). #### Usage guidelines To search data, specify the data source GUID in `logical_table_identifier`. The data source can be a Worksheet, View, Table, or SQL view. Pass search tokens in the `query_string` attribute in the API request as shown in the following example: ``` { \"query_string\": \"[sales] by [store]\", \"logical_table_identifier\": \"cd252e5c-b552-49a8-821d-3eadaa049cca\", } ``` For more information about the `query_string` format and data source attribute, see [Search data API](https://developers.thoughtspot.com/docs/fetch-data-and-report-apis#_search_data_api). The `record_size` attribute determines the number of records to retrieve in an API call. For more information about pagination, record size, and maximum row limit, see [Pagination and record size settings](https://developers.thoughtspot.com/docs/fetch-data-and-report-apis#_pagination_settings_for_data_and_report_api). + * @param searchDataRequest + */ + searchData(searchDataRequest: SearchDataRequest, _options?: Configuration): Promise; +} +declare class DataApiResponseProcessor { + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to fetchAnswerData + * @throws ApiException if the response code was not in [200, 299] + */ + fetchAnswerData(response: ResponseContext): Promise; + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to fetchLiveboardData + * @throws ApiException if the response code was not in [200, 299] + */ + fetchLiveboardData(response: ResponseContext): Promise; + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to searchData + * @throws ApiException if the response code was not in [200, 299] + */ + searchData(response: ResponseContext): Promise; +} + +/** + * no description + */ +declare class EmailCustomizationApiRequestFactory extends BaseAPIRequestFactory { + /** + * Version: 10.10.0.cl or later Creates a customization configuration for the notification email. #### Pre-requisites Requires `DEVELOPER` (**has developer privilege**) or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `DEVELOPER` (**Has developer privilege**) privilege is required. **NOTE**:This endpoint in currently in beta. Contact ThoughtSpot support to enable this on your instance. #### Usage guidelines To create a custom configuration pass these parameters in your API request: - A JSON map of configuration attributes `template_properties`. The following example shows a sample set of customization configuration: ``` { { \"cta_button_bg_color\": \"#444DEA\", \"cta_text_font_color\": \"#FFFFFF\", \"primary_bg_color\": \"#D3DEF0\", \"logo_url\": \"https://storage.pardot.com/710713/1642089901EbkRibJq/TS_fullworkmark_darkmode.png\", \"font_family\": \"\", \"product_name\": \"ThoughtSpot\", \"footer_address\": \"444 Castro St, Suite 1000 Mountain View, CA 94041\", \"footer_phone\": \"(800) 508-7008\", \"replacement_value_for_liveboard\": \"Dashboard\", \"replacement_value_for_answer\": \"Chart\", \"replacement_value_for_spot_iq\": \"AI Insights\", \"hide_footer_phone\": false, \"hide_footer_address\": false, \"hide_product_name\": false, \"hide_manage_notification\": false, \"hide_mobile_app_nudge\": false, \"hide_privacy_policy\": false, \"hide_ts_vocabulary_definitions\": false, \"hide_error_message\": false, \"hide_unsubscribe_link\": false, \"hide_notification_status\": false, \"hide_modify_alert\": false, \"company_website_url\": \"https://your-website.com/\", \"company_privacy_policy_url\" : \"https://link-to-privacy-policy.com/\", \"contact_support_url\": \"https://link-to-contact-support.com/\", \"hide_contact_support_url\": false, \"hide_logo_url\" : false } } ``` + * @param createEmailCustomizationRequest + */ + createEmailCustomization(createEmailCustomizationRequest: CreateEmailCustomizationRequest, _options?: Configuration): Promise; + /** + * Version: 10.10.0.cl or later Deletes the configuration for the email customization. #### Pre-requisites Requires `DEVELOPER` (**has developer privilege**) or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `DEVELOPER` (**Has developer privilege**) privilege is required. **NOTE**:This endpoint in currently in beta. Contact ThoughtSpot support to enable this on your instance. #### Usage guidelines - Call the search API endpoint to get the `template_identifier` from the response. - Use that `template_identifier` as a parameter in this API request. + * @param templateIdentifier Unique ID or name of the email customization. + */ + deleteEmailCustomization(templateIdentifier: string, _options?: Configuration): Promise; + /** + * Version: 10.12.0.cl or later Deletes the configuration for the email customization. #### Pre-requisites Requires `DEVELOPER` (**has developer privilege**) or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `DEVELOPER` (**Has developer privilege**) privilege is required. **NOTE**:This endpoint in currently in beta. Contact ThoughtSpot support to enable this on your instance. #### Usage guidelines - Call the search API endpoint to get the `org_identifier` from the response. - Use that `org_identifier` as a parameter in this API request. + * @param deleteOrgEmailCustomizationRequest + */ + deleteOrgEmailCustomization(deleteOrgEmailCustomizationRequest: DeleteOrgEmailCustomizationRequest, _options?: Configuration): Promise; + /** + * Version: 10.10.0.cl or later Search the email customization configuration if any set for the ThoughtSpot system. #### Pre-requisites Requires `DEVELOPER` (**has developer privilege**) or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `DEVELOPER` (**Has developer privilege**) privilege is required. **NOTE**:This endpoint in currently in beta. Contact ThoughtSpot support to enable this on your instance. + * @param searchEmailCustomizationRequest + */ + searchEmailCustomization(searchEmailCustomizationRequest: SearchEmailCustomizationRequest, _options?: Configuration): Promise; + /** + * Version: 10.12.0.cl or later Updates a customization configuration for the notification email. #### Pre-requisites Requires `DEVELOPER` (**has developer privilege**) or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `DEVELOPER` (**Has developer privilege**) privilege is required. **NOTE**:This endpoint in currently in beta. Contact ThoughtSpot support to enable this on your instance. #### Usage guidelines To update a custom configuration pass these parameters in your API request: - A JSON map of configuration attributes `template_properties`. The following example shows a sample set of customization configuration: ``` { { \"cta_button_bg_color\": \"#444DEA\", \"cta_text_font_color\": \"#FFFFFF\", \"primary_bg_color\": \"#D3DEF0\", \"logo_url\": \"https://storage.pardot.com/710713/1642089901EbkRibJq/TS_fullworkmark_darkmode.png\", \"font_family\": \"\", \"product_name\": \"ThoughtSpot\", \"footer_address\": \"444 Castro St, Suite 1000 Mountain View, CA 94041\", \"footer_phone\": \"(800) 508-7008\", \"replacement_value_for_liveboard\": \"Dashboard\", \"replacement_value_for_answer\": \"Chart\", \"replacement_value_for_spot_iq\": \"AI Insights\", \"hide_footer_phone\": false, \"hide_footer_address\": false, \"hide_product_name\": false, \"hide_manage_notification\": false, \"hide_mobile_app_nudge\": false, \"hide_privacy_policy\": false, \"hide_ts_vocabulary_definitions\": false, \"hide_error_message\": false, \"hide_unsubscribe_link\": false, \"hide_notification_status\": false, \"hide_modify_alert\": false, \"company_website_url\": \"https://your-website.com/\", \"company_privacy_policy_url\" : \"https://link-to-privacy-policy.com/\", \"contact_support_url\": \"https://link-to-contact-support.com/\", \"hide_contact_support_url\": false, \"hide_logo_url\" : false } } ``` + * @param updateEmailCustomizationRequest + */ + updateEmailCustomization(updateEmailCustomizationRequest: UpdateEmailCustomizationRequest, _options?: Configuration): Promise; + /** + * Version: 10.10.0.cl or later Validates the email customization configuration if any set for the ThoughtSpot system. #### Pre-requisites Requires `DEVELOPER` (**has developer privilege**) or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `DEVELOPER` (**Has developer privilege**) privilege is required. **NOTE**:This endpoint in currently in beta. Contact ThoughtSpot support to enable this on your instance. + */ + validateEmailCustomization(_options?: Configuration): Promise; +} +declare class EmailCustomizationApiResponseProcessor { + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to createEmailCustomization + * @throws ApiException if the response code was not in [200, 299] + */ + createEmailCustomization(response: ResponseContext): Promise; + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to deleteEmailCustomization + * @throws ApiException if the response code was not in [200, 299] + */ + deleteEmailCustomization(response: ResponseContext): Promise; + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to deleteOrgEmailCustomization + * @throws ApiException if the response code was not in [200, 299] + */ + deleteOrgEmailCustomization(response: ResponseContext): Promise; + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to searchEmailCustomization + * @throws ApiException if the response code was not in [200, 299] + */ + searchEmailCustomization(response: ResponseContext): Promise>; + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to updateEmailCustomization + * @throws ApiException if the response code was not in [200, 299] + */ + updateEmailCustomization(response: ResponseContext): Promise; + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to validateEmailCustomization + * @throws ApiException if the response code was not in [200, 299] + */ + validateEmailCustomization(response: ResponseContext): Promise; +} + +/** + * no description + */ +declare class GroupsApiRequestFactory extends BaseAPIRequestFactory { + /** + * Version: 9.0.0.cl or later Creates a group object in ThoughtSpot. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `GROUP_ADMINISTRATION` (**Can manage groups**) privilege is required. #### About groups Groups in ThoughtSpot are used by the administrators to define privileges and organize users based on their roles and access requirements. To know more about groups and privileges, see [ThoughtSpot Product Documentation](https://docs.thoughtspot.com/cloud/latest/groups-privileges). #### Supported operations The API endpoint lets you perform the following operations: * Assign privileges * Add users * Define sharing visibility * Add sub-groups * Assign a default Liveboard + * @param createUserGroupRequest + */ + createUserGroup(createUserGroupRequest: CreateUserGroupRequest, _options?: Configuration): Promise; + /** + * Version: 9.0.0.cl or later Removes the specified group object from the ThoughtSpot system. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `GROUP_ADMINISTRATION` (**Can manage groups**) privilege is required. + * @param groupIdentifier GUID or name of the group. + */ + deleteUserGroup(groupIdentifier: string, _options?: Configuration): Promise; + /** + * Version: 9.0.0.cl or later Imports group objects from external databases into ThoughtSpot. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `GROUP_ADMINISTRATION` (**Can manage groups**) privilege is required. During the import operation: * If the specified group is not available in ThoughtSpot, it will be added to ThoughtSpot. * If `delete_unspecified_groups` is set to `true`, the groups not specified in the API request, excluding administrator and system user groups, are deleted. * If the specified groups are already available in ThoughtSpot, the object properties of these groups are modified and synchronized as per the input data in the API request. A successful API call returns the object that represents the changes made in the ThoughtSpot system. + * @param importUserGroupsRequest + */ + importUserGroups(importUserGroupsRequest: ImportUserGroupsRequest, _options?: Configuration): Promise; + /** + * Version: 9.0.0.cl or later Gets a list of user group objects from the ThoughtSpot system. To get details of a specific user group, specify the user group GUID or name. You can also filter the API response based on User ID, Org ID, Role ID, type of group, sharing visibility, privileges assigned to the group, and the Liveboard IDs assigned to the users in the group. Available to all users. Users with `ADMINISTRATION` (**Can administer ThoughtSpot**) privileges can view all users properties. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `GROUP_ADMINISTRATION` (**Can manage groups**) privilege is required. **NOTE**: If you do not get precise results, try setting `record_size` to `-1` and `record_offset` to `0`. + * @param searchUserGroupsRequest + */ + searchUserGroups(searchUserGroupsRequest: SearchUserGroupsRequest, _options?: Configuration): Promise; + /** + * Version: 9.0.0.cl or later Updates the properties of a group object in ThoughtSpot. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `GROUP_ADMINISTRATION` (**Can manage groups**) privilege is required. #### Supported operations This API endpoint lets you perform the following operations in a single API request: * Edit [privileges](https://developers.thoughtspot.com/docs/?pageid=api-user-management#group-privileges) * Add or remove users * Change sharing visibility settings * Add or remove sub-groups * Assign a default Liveboard or update the existing settings + * @param groupIdentifier GUID or name of the group. + * @param updateUserGroupRequest + */ + updateUserGroup(groupIdentifier: string, updateUserGroupRequest: UpdateUserGroupRequest, _options?: Configuration): Promise; +} +declare class GroupsApiResponseProcessor { + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to createUserGroup + * @throws ApiException if the response code was not in [200, 299] + */ + createUserGroup(response: ResponseContext): Promise; + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to deleteUserGroup + * @throws ApiException if the response code was not in [200, 299] + */ + deleteUserGroup(response: ResponseContext): Promise; + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to importUserGroups + * @throws ApiException if the response code was not in [200, 299] + */ + importUserGroups(response: ResponseContext): Promise; + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to searchUserGroups + * @throws ApiException if the response code was not in [200, 299] + */ + searchUserGroups(response: ResponseContext): Promise>; + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to updateUserGroup + * @throws ApiException if the response code was not in [200, 299] + */ + updateUserGroup(response: ResponseContext): Promise; +} + +/** + * no description + */ +declare class JobsApiRequestFactory extends BaseAPIRequestFactory { + /** + * Version: 26.4.0.cl or later Searches delivery history for communication channels such as webhooks. Returns channel-level delivery status for each job execution record. Use this to monitor channel health and delivery success rates across events. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) or `DEVELOPER` (**Has developer privilege**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, users with `CAN_MANAGE_WEBHOOKS` (**Can manage webhooks**) privilege are also authorized to perform this action. **NOTE**: When `channel_type` is `WEBHOOK`, the following constraints apply: - `job_ids`, `channel_identifiers`, and `events` each accept at most one element. - When `job_ids` is provided, it is used as the sole lookup key and other filter fields are ignored. - When `job_ids` is not provided, `channel_identifiers` and `events` are both required, each containing exactly one element. - Records older than the configured retention period are not returned. - Use `start_epoch_time_in_millis` and/or `end_epoch_time_in_millis` to narrow results to a specific time window. + * @param searchChannelHistoryRequest + */ + searchChannelHistory(searchChannelHistoryRequest: SearchChannelHistoryRequest, _options?: Configuration): Promise; +} +declare class JobsApiResponseProcessor { + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to searchChannelHistory + * @throws ApiException if the response code was not in [200, 299] + */ + searchChannelHistory(response: ResponseContext): Promise; +} + +/** + * no description + */ +declare class LogApiRequestFactory extends BaseAPIRequestFactory { + /** + * Version: 9.0.0.cl or later Fetches security audit logs. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the [Admin Control](https://developers.thoughtspot.com/docs/rbac#_admin_control) privileges are required. #### Usage guidelines By default, the API retrieves logs for the last 24 hours. You can set a custom duration in EPOCH time. Make sure the log duration specified in your API request doesn’t exceed 24 hours. If you must fetch logs for a longer time range, modify the duration and make multiple sequential API requests. Upon successful execution, the API returns logs with the following information: * timestamp of the event * event ID * event type * name and GUID of the user * IP address of ThoughtSpot instance For more information see [Audit logs Documentation](https://developers.thoughtspot.com/docs/audit-logs). + * @param fetchLogsRequest + */ + fetchLogs(fetchLogsRequest: FetchLogsRequest, _options?: Configuration): Promise; +} +declare class LogApiResponseProcessor { + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to fetchLogs + * @throws ApiException if the response code was not in [200, 299] + */ + fetchLogs(response: ResponseContext): Promise>; +} + +/** + * no description + */ +declare class MetadataApiRequestFactory extends BaseAPIRequestFactory { + /** + * Convert worksheets to models Version: 10.6.0.cl or later ## Prerequisites - **Privileges Required:** - `DATAMANAGEMENT` (Can manage data) or `ADMINISTRATION` (Can administer ThoughtSpot). - **Additional Privileges (if RBAC is enabled):** - `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` (Can manage data models). --- ## Usage Guidelines ### Parameters 1. **worksheet_ids** - **Description:** A comma-separated list of GUIDs (Globally Unique Identifiers) specifying the Worksheets to be converted. - **Usage:** - Used only when `convert_all` is set to `false`. - Leave empty or omit when `convert_all` is set to `true`. 2. **exclude_worksheet_ids** - **Description:** A comma-separated list of GUIDs specifying Worksheets to be excluded from conversion. - **Usage:** - Useful when `convert_all` is set to `true` and specific Worksheets should not be converted. 3. **convert_all** - **Description:** Sets the scope of conversion. - **Options:** - `true`: Converts all Worksheets in the system, except those specified in `exclude_worksheet_ids`. - `false`: Converts only the Worksheets listed in `worksheet_ids`. 4. **apply_changes** - **Description:** Specifies whether to apply changes directly to ThoughtSpot or to generate a preview before applying any changes.Used for validation of conversion. - **Options:** - `true`: Applies conversion changes directly to ThoughtSpot. - `false`: Generates only a preview of the changes and does not apply any changes to ThoughtSpot --- ## Best Practices 1. **Backup Before Conversion:** Always export metadata as a backup before initiating the conversion process 2. **Partial Conversion for Testing:** Test the conversion process by setting `convert_all` to `false` and specifying a small number of `worksheet_ids`. 3. **Verify Dependencies:** Check for dependent objects, such as Tables and Connections, to avoid invalid references. 4. **Review Changes:** Use `apply_changes: false` to preview the impact of the conversion before applying changes. --- ## Examples ### Convert Specific Worksheets ```json { \"worksheet_ids\": [\"guid1\", \"guid2\", \"guid3\"], \"exclude_worksheet_ids\": [], \"convert_all\": false, \"apply_changes\": true } ``` ### Convert All Accessible Worksheets ```json { \"worksheet_ids\": [], \"exclude_worksheet_ids\": [], \"convert_all\": true, \"apply_changes\": true } ``` ### Exclude Specific Worksheets While Converting All Accessible Worksheets ```json { \"worksheet_ids\": [], \"exclude_worksheet_ids\": [\"abc\"], \"convert_all\": true, \"apply_changes\": true } ``` + * @param convertWorksheetToModelRequest + */ + convertWorksheetToModel(convertWorksheetToModelRequest: ConvertWorksheetToModelRequest, _options?: Configuration): Promise; + /** + * Makes a copy of an Answer or Liveboard Version: 10.3.0.cl or later Creates a copy of a metadata object. Requires at least view access to the metadata object being copied. Upon successful execution, the API creates a copy of the metadata object specified in the API request and returns the ID of the new object. + * @param copyObjectRequest + */ + copyObject(copyObjectRequest: CopyObjectRequest, _options?: Configuration): Promise; + /** + * Version: 9.0.0.cl or later Removes the specified metadata object from the ThoughtSpot system. Requires edit access to the metadata object. + * @param deleteMetadataRequest + */ + deleteMetadata(deleteMetadataRequest: DeleteMetadataRequest, _options?: Configuration): Promise; + /** + * Version: 9.0.0.cl or later Exports the [TML](https://docs.thoughtspot.com/cloud/latest/tml) representation of metadata objects in JSON or YAML format. Requires `DATADOWNLOADING` (**Can download Data**) and at least view access to the metadata object. #### Usage guidelines * You can export one or several objects by passing metadata object GUIDs in the `metadata` array. * When exporting TML content for a Liveboard or Answer object, you can set `export_associated` to `true` to retrieve TML content for underlying Worksheets, Tables, or Views, including the GUID of each object within the headers. When `export_associated` is set to `true`, consider retrieving one metadata object at a time. * Set `export_fqns` to `true` to add FQNs of the referenced objects in the TML content. For example, if you send an API request to retrieve TML for a Liveboard and its associated objects, the API returns the TML content with FQNs of the referenced Worksheet. Exporting TML with FQNs is useful if ThoughtSpot has multiple objects with the same name and you want to eliminate ambiguity when importing TML files into ThoughtSpot. It eliminates the need for adding FQNs of the referenced objects manually during the import operation. * To export only the TML of feedbacks associated with an object, set the GUID of the object as `identifier`, and set the `type` as `FEEDBACK` in the `metadata` array. * To export the TML of an object along with the feedbacks associated with it, set the GUID of the object as `identifier`, set the `type` as `LOGIAL_TABLE` in the `metadata` array, and set `export_with_associated_feedbacks` in `export_options` to true. For more information, see [TML Documentation](https://developers.thoughtspot.com/docs/tml#_export_a_tml). For more information on feedbacks, see [Feedback Documentation](https://docs.thoughtspot.com/cloud/latest/sage-feedback). + * @param exportMetadataTMLRequest + */ + exportMetadataTML(exportMetadataTMLRequest: ExportMetadataTMLRequest, _options?: Configuration): Promise; + /** + * Version: 10.1.0.cl or later Exports the [TML](https://docs.thoughtspot.com/cloud/latest/tml) representation of metadata objects in JSON or YAML format. ### **Permissions Required** Requires `DATAMANAGEMENT` (**Can manage data**) and `USERMANAGEMENT` (**Can manage users**) privileges. #### **Usage Guidelines** This API is only applicable for `USER`, `GROUP`, and `ROLES` metadata types. - `batch_offset` Indicates the starting position within the complete dataset from which the API should begin returning objects. Useful for paginating results efficiently. - `batch_size` Specifies the number of objects or items to retrieve in a single request. Helps control response size for better performance. - `edoc_format` Defines the format of the TML content. The exported metadata can be in JSON or YAML format. - `export_dependent` Specifies whether to include dependent metadata objects in the export. Ensures related objects are also retrieved if needed. - `all_orgs_override` Indicates whether the export operation applies across all organizations. Useful for multi-tenant environments where cross-org exports are required. + * @param exportMetadataTMLBatchedRequest + */ + exportMetadataTMLBatched(exportMetadataTMLBatchedRequest: ExportMetadataTMLBatchedRequest, _options?: Configuration): Promise; + /** + * Version: 9.0.0.cl or later Fetches the underlying SQL query data for an Answer object. Requires at least view access to the Answer object. Upon successful execution, the API returns the SQL queries for the specified object as shown in this example: ``` { \"metadata_id\":\"8fbe44a8-46ad-4b16-8d39-184b2fada490\", \"metadata_name\":\"Total sales\", \"metadata_type\":\"ANSWER\", \"sql_queries\":[ { \"metadata_id\":\"8fbe44a8-46ad-4b16-8d39-184b2fada490\", \"metadata_name\":\"Total sales -test\", \"sql_query\":\"SELECT \\n \\\"ta_1\\\".\\\"REGION\\\" \\\"ca_1\\\", \\n \\\"ta_2\\\".\\\"PRODUCTNAME\\\" \\\"ca_2\\\", \\n \\\"ta_1\\\".\\\"STORENAME\\\" \\\"ca_3\\\", \\n CASE\\n WHEN sum(\\\"ta_3\\\".\\\"SALES\\\") IS NOT NULL THEN sum(\\\"ta_3\\\".\\\"SALES\\\")\\n ELSE 0\\n END \\\"ca_4\\\", \\n CASE\\n WHEN sum(\\\"ta_3\\\".\\\"QUANTITYPURCHASED\\\") IS NOT NULL THEN sum(\\\"ta_3\\\".\\\"QUANTITYPURCHASED\\\")\\n ELSE 0\\n END \\\"ca_5\\\"\\nFROM \\\"RETAILAPPAREL\\\".\\\"PUBLIC\\\".\\\"FACT_RETAPP_SALES\\\" \\\"ta_3\\\"\\n JOIN \\\"RETAILAPPAREL\\\".\\\"PUBLIC\\\".\\\"DIM_RETAPP_STORES\\\" \\\"ta_1\\\"\\n ON \\\"ta_3\\\".\\\"STOREID\\\" = \\\"ta_1\\\".\\\"STOREID\\\"\\n JOIN \\\"RETAILAPPAREL\\\".\\\"PUBLIC\\\".\\\"DIM_RETAPP_PRODUCTS\\\" \\\"ta_2\\\"\\n ON \\\"ta_3\\\".\\\"PRODUCTID\\\" = \\\"ta_2\\\".\\\"PRODUCTID\\\"\\nGROUP BY \\n \\\"ca_1\\\", \\n \\\"ca_2\\\", \\n \\\"ca_3\\\"\\n\" } ] } ``` + * @param fetchAnswerSqlQueryRequest + */ + fetchAnswerSqlQuery(fetchAnswerSqlQueryRequest: FetchAnswerSqlQueryRequest, _options?: Configuration): Promise; + /** + * Version: 10.4.0.cl or later Gets information about the status of the TML async import task scheduled using the `/api/rest/2.0/metadata/tml/async/import` API call. To fetch the task details, specify the ID of the TML async import task. Requires access to the task ID. The API allows users who initiated the asynchronous TML import via `/api/rest/2.0/metadata/tml/async/import` to view the status of their tasks. Users with administration privilege can view the status of all import tasks initiated by the users in their Org. #### Usage guidelines See [TML API Documentation](https://developers.thoughtspot.com/docs/tml#_fetch_status_of_the_tml_import_task) for usage guidelines. + * @param fetchAsyncImportTaskStatusRequest + */ + fetchAsyncImportTaskStatus(fetchAsyncImportTaskStatusRequest: FetchAsyncImportTaskStatusRequest, _options?: Configuration): Promise; + /** + * Version: 9.0.0.cl or later Fetches the underlying SQL query data for a Liveboard object and its visualizations. Requires at least view access to the Liveboard object. To get SQL query data for a Liveboard, specify the GUID of the Liveboard. Optionally, you can add an array of visualization GUIDs to retrieve the SQL query data for visualizations in the Liveboard. Upon successful execution, the API returns the SQL queries for the specified object as shown in this example: ``` { \"metadata_id\": \"fa68ae91-7588-4136-bacd-d71fb12dda69\", \"metadata_name\": \"Total Sales\", \"metadata_type\": \"LIVEBOARD\", \"sql_queries\": [ { \"metadata_id\": \"b3b6d2b9-089a-490c-8e16-b144650b7843\", \"metadata_name\": \"Total quantity purchased, Total sales by region\", \"sql_query\": \"SELECT \\n \\\"ta_1\\\".\\\"REGION\\\" \\\"ca_1\\\", \\n CASE\\n WHEN sum(\\\"ta_2\\\".\\\"QUANTITYPURCHASED\\\") IS NOT NULL THEN sum(\\\"ta_2\\\".\\\"QUANTITYPURCHASED\\\")\\n ELSE 0\\n END \\\"ca_2\\\", \\n CASE\\n WHEN sum(\\\"ta_2\\\".\\\"SALES\\\") IS NOT NULL THEN sum(\\\"ta_2\\\".\\\"SALES\\\")\\n ELSE 0\\n END \\\"ca_3\\\"\\nFROM \\\"RETAILAPPAREL\\\".\\\"PUBLIC\\\".\\\"FACT_RETAPP_SALES\\\" \\\"ta_2\\\"\\n JOIN \\\"RETAILAPPAREL\\\".\\\"PUBLIC\\\".\\\"DIM_RETAPP_STORES\\\" \\\"ta_1\\\"\\n ON \\\"ta_2\\\".\\\"STOREID\\\" = \\\"ta_1\\\".\\\"STOREID\\\"\\nGROUP BY \\\"ca_1\\\"\" } ] } ``` + * @param fetchLiveboardSqlQueryRequest + */ + fetchLiveboardSqlQuery(fetchLiveboardSqlQueryRequest: FetchLiveboardSqlQueryRequest, _options?: Configuration): Promise; + /** + * Version: 9.0.0.cl or later Imports [TML](https://docs.thoughtspot.com/cloud/latest/tml) files into ThoughtSpot. Requires `DATAMANAGEMENT` (**Can manage data**) or `ADMINISTRATION` (**Can administer ThoughtsSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the following Data control privileges may be required: - `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) - `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` (**Can manage data models**) #### Usage guidelines * Import all related objects in a single TML Import API call. For example, Tables that use the same Connection object and Worksheets connected to these Tables. * Include the `fqn` property to distinguish objects that have the same name. For example, if you have multiple Connections or Worksheets with the same name on ThoughtSpot and the Connection or Worksheet referenced in your TML file does not have a unique name to distinguish, it may result in invalid object references. Adding `fqn` helps ThoughtSpot differentiate a Table from another with the same name. We recommend [exporting TML with FQNs](#/http/api-endpoints/metadata/export-metadata-tml) and using these during the import operation. * You can upload multiple TML files at a time. If you import a Worksheet along with Liveboards, Answers, and other dependent objects in a single API call, the imported objects will be immediately available for use. When you import only a Worksheet object, it may take some time for the Worksheet to become available in the ThoughtSpot system. Please wait for a few minutes, and then proceed to create an Answer and Liveboard from the newly imported Worksheet. For more information, see [TML Documentation](https://developers.thoughtspot.com/docs/tml#_import_a_tml). + * @param importMetadataTMLRequest + */ + importMetadataTML(importMetadataTMLRequest: ImportMetadataTMLRequest, _options?: Configuration): Promise; + /** + * Version: 10.4.0.cl or later Schedules a task to import [TML](https://docs.thoughtspot.com/cloud/latest/tml) files into ThoughtSpot. You can use this API endpoint to process TML objects asynchronously when importing TMLs of large and complex metadata objects into ThoughtSpot. Unlike the synchronous import TML operation, the API processes TML data in the background and returns a task ID, which can be used to check the status of the import task via `/api/rest/2.0/metadata/tml/async/status` API endpoint. Requires `DATAMANAGEMENT` (**Can manage data**) or `ADMINISTRATION` (**Can administer ThoughtsSpot**) privilege, and edit access to the TML objects. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the following Data control privileges may be required: - `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) - `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` (**Can manage data models**) #### Usage guidelines See [Async TML API Documentation](https://developers.thoughtspot.com/docs/tml#_import_tml_objects_asynchronously) for usage guidelines. + * @param importMetadataTMLAsyncRequest + */ + importMetadataTMLAsync(importMetadataTMLAsyncRequest: ImportMetadataTMLAsyncRequest, _options?: Configuration): Promise; + /** + * Parameterize fields in metadata objects. Version: 10.9.0.cl or later **Note:** This API endpoint is deprecated and will be removed from ThoughtSpot in a future release. Use [POST /api/rest/2.0/metadata/parameterize-fields](/api/rest/2.0/metadata/parameterize-fields) instead. Allows parameterizing fields in metadata objects in ThoughtSpot. Requires appropriate permissions to modify the metadata object. The API endpoint allows parameterizing the following types of metadata objects: * Logical Tables * Connections * Connection Configs For a Logical Table the field type must be `ATTRIBUTE` and field name can be one of: * databaseName * schemaName * tableName For a Connection or Connection Config, the field type is always `CONNECTION_PROPERTY`. In this case, field_name specifies the exact property of the Connection or Connection Config that needs to be parameterized. For Connection Config, the only supported field name is: * impersonate_user + * @param parameterizeMetadataRequest + */ + parameterizeMetadata(parameterizeMetadataRequest: ParameterizeMetadataRequest, _options?: Configuration): Promise; + /** + * Parameterize multiple fields of metadata objects. For example [schemaName, databaseName] for LOGICAL_TABLE. Version: 26.5.0.cl or later Allows parameterizing multiple fields of metadata objects in ThoughtSpot. For example, you can parameterize [schemaName, databaseName] for LOGICAL_TABLE. Requires appropriate permissions to modify the metadata object. The API endpoint allows parameterizing the following types of metadata objects: * Logical Tables * Connections * Connection Configs For a Logical Table, the field type must be `ATTRIBUTE` and field names can include: * databaseName * schemaName * tableName For a Connection or Connection Config, the field type is always `CONNECTION_PROPERTY`. In this case, field_names specifies the exact properties of the Connection or Connection Config that need to be parameterized. For Connection Config, supported field names include: * impersonate_user You can parameterize multiple fields at once by providing an array of field names. + * @param parameterizeMetadataFieldsRequest + */ + parameterizeMetadataFields(parameterizeMetadataFieldsRequest: ParameterizeMetadataFieldsRequest, _options?: Configuration): Promise; + /** + * Version: 9.0.0.cl or later Gets a list of metadata objects available on the ThoughtSpot system. This API endpoint is available to all users who have view access to the object. Users with `ADMINISTRATION` (**Can administer ThoughtSpot**) privileges can view data for all metadata objects, including users and groups. #### Usage guidelines - To get all metadata objects, send the API request without any attributes. - To get metadata objects of a specific type, set the `type` attribute. For example, to fetch a Worksheet, set the type as `LOGICAL_TABLE`. - To filter metadata objects within type `LOGICAL_TABLE`, set the `subtypes` attribute. For example, to fetch a Worksheet, set the type as `LOGICAL_TABLE` & subtypes as `[WORKSHEET]`. - To get a specific metadata object, specify the GUID. - To customize your search and filter the API response, you can use several parameters. You can search for objects created or modified by specific users, by tags applied to the objects, or by using the include parameters like `include_auto_created_objects`, `include_dependent_objects`, `include_headers`, `include_incomplete_objects`, and so on. You can also define sorting options to sort the data retrieved in the API response. - To get discoverable objects when linientmodel is enabled you can use `include_discoverable_objects` as true else false. Default value is true. - For liveboard metadata type, to get the newer format, set the `liveboard_response_format` as V2. Default value is V1. - To retrieve only objects that are published, set the `include_only_published_objects` as true. Default value is false. **NOTE**: The following parameters support pagination of metadata records: - `tag_identifiers` - `type` - `subtypes` - `created_by_user_identifiers` - `modified_by_user_identifiers` - `owned_by_user_identifiers` - `exclude_objects` - `include_auto_created_objects` - `favorite_object_options` - `include_only_published_objects` If you are using other parameters to search metadata, set `record_size` to `-1` and `record_offset` to `0`. + * @param searchMetadataRequest + */ + searchMetadata(searchMetadataRequest: SearchMetadataRequest, _options?: Configuration): Promise; + /** + * Remove parameterization from fields in metadata objects. Version: 26.5.0.cl or later Allows removing parameterization from fields in metadata objects in ThoughtSpot. Requires appropriate permissions to modify the metadata object. The API endpoint allows unparameterizing the following types of metadata objects: * Logical Tables * Connections * Connection Configs For a Logical Table the field type must be `ATTRIBUTE` and field name can be one of: * databaseName * schemaName * tableName For a Connection or Connection Config, the field type is always `CONNECTION_PROPERTY`. In this case, field_name specifies the exact property of the Connection or Connection Config that needs to be unparameterized. For Connection Config, the only supported field name is: * impersonate_user + * @param unparameterizeMetadataRequest + */ + unparameterizeMetadata(unparameterizeMetadataRequest: UnparameterizeMetadataRequest, _options?: Configuration): Promise; + /** + * Update header attributes for a given list of header objects. Version: 10.6.0.cl or later ## Prerequisites - **Privileges Required:** - `DATAMANAGEMENT` (Can manage data) or `ADMINISTRATION` (Can administer ThoughtSpot). - **Additional Privileges (if RBAC is enabled):** - `ORG_ADMINISTRATION` (Can manage orgs). --- ## Usage Guidelines ### Parameters 1. **headers_update** - **Description:** List of header objects with their attributes to be updated. Each object contains a list of attributes to be updated in the header. - **Usage:** - You must provide either `identifier` or `obj_identifier`, but not both. Both fields cannot be empty. - When `org_identifier` is set to `-1`, only the `identifier` value is accepted; `obj_identifier` is not allowed. 2. **org_identifier** - **Description:** GUID (Globally Unique Identifier) or name of the organization. - **Usage:** - Leaving this field empty assumes that the changes should be applied to the current organization - Provide `org_guid` or `org_name` to uniquely identify the organization where changes need to be applied. . - Provide `-1` if changes have to be applied across all the org. --- ## Note Currently, this API is enabled only for updating the `obj_identifier` attribute. Only `text` will be allowed in attribute\'s value. ## Best Practices 1. **Backup Before Conversion:** Always export metadata as a backup before initiating the update process --- ## Examples ### Only `identifier` is given ```json { \"headers_update\": [ { \"identifier\": \"guid_1\", \"obj_identifier\": \"\", \"type\": \"LOGICAL_COLUMN\", \"attributes\": [ { \"name\": \"obj_id\", \"value\": \"custom_object_id\" } ] } ], \"org_identifier\": \"orgGuid\" } ``` ### Only `obj_identifier` is given ```json { \"headers_update\": [ { \"obj_identifier\": \"custom_object_id\", \"type\": \"ANSWER\", \"attributes\": [ { \"name\": \"obj_id\", \"value\": \"custom_object_id\" } ] } ], \"org_identifier\": \"orgName\" } ``` ### Executing update for all org `-1` ```json { \"headers_update\": [ { \"identifier\": \"guid_1\", \"type\": \"ANSWER\", \"attributes\": [ { \"name\": \"obj_id\", \"value\": \"custom_object_id\" } ] } ], \"org_identifier\": -1 } ``` ### Optional `type` is not provided ```json { \"headers_update\": [ { \"identifier\": \"guid_1\", \"attributes\": [ { \"name\": \"obj_id\", \"value\": \"custom_object_id\" } ] } ], \"org_identifier\": -1 } ``` + * @param updateMetadataHeaderRequest + */ + updateMetadataHeader(updateMetadataHeaderRequest: UpdateMetadataHeaderRequest, _options?: Configuration): Promise; + /** + * Update object IDs for given metadata objects. Version: 10.8.0.cl or later ## Prerequisites - **Privileges Required:** - `DATAMANAGEMENT` (Can manage data) or `ADMINISTRATION` (Can administer ThoughtSpot). - **Additional Privileges (if RBAC is enabled):** - `ORG_ADMINISTRATION` (Can manage orgs). --- ## Usage Guidelines ### Parameters 1. **metadata** - **Description:** List of metadata objects to update their object IDs. - **Usage:** - Use either `current_obj_id` alone OR use `metadata_identifier` with `type` (when needed). - When using `metadata_identifier`, the `type` field is required if using a name instead of a GUID. - The `new_obj_id` field is always required. --- ## Note This API is specifically designed for updating object IDs of metadata objects. It internally uses the header update mechanism to perform the changes. ## Best Practices 1. **Backup Before Update:** Always export metadata as a backup before initiating the update process. 2. **Validation:** - When using `current_obj_id`, ensure it matches the existing object ID exactly. - When using `metadata_identifier` with a name, ensure the `type` is specified correctly. - Verify that the `new_obj_id` follows your naming conventions and is unique within your system. --- ## Examples ### Using current_obj_id ```json { \"metadata\": [ { \"current_obj_id\": \"existing_object_id\", \"new_obj_id\": \"new_object_id\" } ] } ``` ### Using metadata_identifier with GUID ```json { \"metadata\": [ { \"metadata_identifier\": \"01234567-89ab-cdef-0123-456789abcdef\", \"new_obj_id\": \"new_object_id\" } ] } ``` ### Using metadata_identifier with name and type ```json { \"metadata\": [ { \"metadata_identifier\": \"My Answer\", \"type\": \"ANSWER\", \"new_obj_id\": \"new_object_id\" } ] } ``` ### Multiple objects update ```json { \"metadata\": [ { \"current_obj_id\": \"existing_object_id_1\", \"new_obj_id\": \"new_object_id_1\" }, { \"metadata_identifier\": \"My Worksheet\", \"type\": \"LOGICAL_TABLE\", \"new_obj_id\": \"new_object_id_2\" } ] } ``` + * @param updateMetadataObjIdRequest + */ + updateMetadataObjId(updateMetadataObjIdRequest: UpdateMetadataObjIdRequest, _options?: Configuration): Promise; +} +declare class MetadataApiResponseProcessor { + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to convertWorksheetToModel + * @throws ApiException if the response code was not in [200, 299] + */ + convertWorksheetToModel(response: ResponseContext): Promise; + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to copyObject + * @throws ApiException if the response code was not in [200, 299] + */ + copyObject(response: ResponseContext): Promise; + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to deleteMetadata + * @throws ApiException if the response code was not in [200, 299] + */ + deleteMetadata(response: ResponseContext): Promise; + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to exportMetadataTML + * @throws ApiException if the response code was not in [200, 299] + */ + exportMetadataTML(response: ResponseContext): Promise>; + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to exportMetadataTMLBatched + * @throws ApiException if the response code was not in [200, 299] + */ + exportMetadataTMLBatched(response: ResponseContext): Promise; + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to fetchAnswerSqlQuery + * @throws ApiException if the response code was not in [200, 299] + */ + fetchAnswerSqlQuery(response: ResponseContext): Promise; + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to fetchAsyncImportTaskStatus + * @throws ApiException if the response code was not in [200, 299] + */ + fetchAsyncImportTaskStatus(response: ResponseContext): Promise; + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to fetchLiveboardSqlQuery + * @throws ApiException if the response code was not in [200, 299] + */ + fetchLiveboardSqlQuery(response: ResponseContext): Promise; + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to importMetadataTML + * @throws ApiException if the response code was not in [200, 299] + */ + importMetadataTML(response: ResponseContext): Promise>; + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to importMetadataTMLAsync + * @throws ApiException if the response code was not in [200, 299] + */ + importMetadataTMLAsync(response: ResponseContext): Promise; + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to parameterizeMetadata + * @throws ApiException if the response code was not in [200, 299] + */ + parameterizeMetadata(response: ResponseContext): Promise; + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to parameterizeMetadataFields + * @throws ApiException if the response code was not in [200, 299] + */ + parameterizeMetadataFields(response: ResponseContext): Promise; + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to searchMetadata + * @throws ApiException if the response code was not in [200, 299] + */ + searchMetadata(response: ResponseContext): Promise>; + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to unparameterizeMetadata + * @throws ApiException if the response code was not in [200, 299] + */ + unparameterizeMetadata(response: ResponseContext): Promise; + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to updateMetadataHeader + * @throws ApiException if the response code was not in [200, 299] + */ + updateMetadataHeader(response: ResponseContext): Promise; + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to updateMetadataObjId + * @throws ApiException if the response code was not in [200, 299] + */ + updateMetadataObjId(response: ResponseContext): Promise; +} + +/** + * no description + */ +declare class OrgsApiRequestFactory extends BaseAPIRequestFactory { + /** + * Version: 9.0.0.cl or later Creates an Org object. To use this API, the [Orgs](https://docs.thoughtspot.com/cloud/latest/orgs-overview) feature must be enabled in your cluster. Requires cluster administration (**Can administer Org**) privileges. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `ORG_ADMINISTRATION` (**Can manage Orgs**) privilege is required. + * @param createOrgRequest + */ + createOrg(createOrgRequest: CreateOrgRequest, _options?: Configuration): Promise; + /** + * Version: 9.0.0.cl or later Deletes an Org object from the ThoughtSpot system. Requires cluster administration (**Can administer Org**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `ORG_ADMINISTRATION` (**Can manage Orgs**) privilege is required. When you delete an Org, all its users and objects created in that Org context are removed. However, if the users in the deleted Org also exists in other Orgs, they are removed only from the deleted Org. + * @param orgIdentifier ID or name of the Org + */ + deleteOrg(orgIdentifier: string, _options?: Configuration): Promise; + /** + * Version: 9.0.0.cl or later Gets a list of Orgs configured on the ThoughtSpot system. To get details of a specific Org, specify the Org ID or name. You can also pass parameters such as status, visibility, and user identifiers to get a specific list of Orgs. Requires cluster administration (**Can administer Org**) privileges. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `ORG_ADMINISTRATION` (**Can manage Orgs**) privilege is required. + * @param searchOrgsRequest + */ + searchOrgs(searchOrgsRequest: SearchOrgsRequest, _options?: Configuration): Promise; + /** + * Version: 9.0.0.cl or later Updates an Org object. You can modify Org properties such as name, description, and user associations. Requires cluster administration (**Can administer Org**) privileges. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `ORG_ADMINISTRATION` (**Can manage Orgs**) privilege is required. + * @param orgIdentifier ID or name of the Org + * @param updateOrgRequest + */ + updateOrg(orgIdentifier: string, updateOrgRequest: UpdateOrgRequest, _options?: Configuration): Promise; +} +declare class OrgsApiResponseProcessor { + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to createOrg + * @throws ApiException if the response code was not in [200, 299] + */ + createOrg(response: ResponseContext): Promise; + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to deleteOrg + * @throws ApiException if the response code was not in [200, 299] + */ + deleteOrg(response: ResponseContext): Promise; + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to searchOrgs + * @throws ApiException if the response code was not in [200, 299] + */ + searchOrgs(response: ResponseContext): Promise>; + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to updateOrg + * @throws ApiException if the response code was not in [200, 299] + */ + updateOrg(response: ResponseContext): Promise; +} + +/** + * no description + */ +declare class ReportsApiRequestFactory extends BaseAPIRequestFactory { + /** + * Version: 9.0.0.cl or later Exports an Answer in the given file format. You can download the Answer data as a PDF, PNG, CSV, or XLSX file. Requires at least view access to the Answer. #### Usage guidelines In the request body, specify the GUID or name of the Answer and set `file_format`. The default file format is CSV. Use the `type` parameter to specify whether the Answer being exported is a saved Answer (`SAVED`) or a pinned Answer on a Liveboard (`PINNED`). Defaults to `SAVED`. When using `PINNED`, the `metadata_identifier` must be the container id. **NOTE**: * The downloadable file returned in API response file is extensionless. Please rename the downloaded file by typing in the relevant extension. * HTML rendering is not supported for PDF exports of Answers with tables. Optionally, you can define [runtime overrides](https://developers.thoughtspot.com/docs/fetch-data-and-report-apis#_runtime_overrides) to apply to the Answer data. + * @param exportAnswerReportRequest + */ + exportAnswerReport(exportAnswerReportRequest: ExportAnswerReportRequest, _options?: Configuration): Promise; + /** + * Version: 9.0.0.cl or later Exports a Liveboard and its visualizations in PDF, PNG, CSV, or XLSX file format. The default `file_format` is CSV. Requires at least view access to the Liveboard. #### Usage guidelines In the request body, specify the GUID or name of the Liveboard. To generate a Liveboard report with specific visualizations, add GUIDs or names of the visualizations. **NOTE**: * The downloadable file returned in API response file is extensionless. Please rename the downloaded file by typing in the relevant extension. * Optionally, you can define [runtime overrides](https://developers.thoughtspot.com/docs/fetch-data-and-report-apis#_runtime_overrides) to apply to the Answer data. * To include unsaved changes in the report, pass the `transient_pinboard_content` script generated from the `getExportRequestForCurrentPinboard` method in the Visual Embed SDK. Upon successful execution, the API returns the report with unsaved changes, including ad hoc changes to visualizations. For more information, see [Liveboard Report API](https://developers.thoughtspot.com/docs/fetch-data-and-report-apis#_liveboard_report_api). * Starting with ThoughtSpot Cloud 10.9.0.cl release, the Liveboard can be exported in the PNG format in the resolution of your choice. To enable this on your instance, contact ThoughtSpot support. When this feature is enabled, the options `include_cover_page`,`include_filter_page` within the `png_options` will not be available for PNG exports. * Starting with the ThoughtSpot Cloud 26.2.0.cl release, * Liveboards can be exported in CSV format. * All visualizations within a Liveboard can be exported as individual CSV files. * When exporting multiple visualizations or the entire Liveboard, the system returns the report as a compressed ZIP file containing the separate CSV files for each visualization. * Liveboards can also be exported in XLSX format. * All selected visualizations are consolidated into a single Excel workbook (.xlsx), with each visualization placed in its own worksheet (tab). * XLSX exports are limited to a maximum of 255 worksheets (tabs) per workbook. + * @param exportLiveboardReportRequest + */ + exportLiveboardReport(exportLiveboardReportRequest: ExportLiveboardReportRequest, _options?: Configuration): Promise; +} +declare class ReportsApiResponseProcessor { + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to exportAnswerReport + * @throws ApiException if the response code was not in [200, 299] + */ + exportAnswerReport(response: ResponseContext): Promise; + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to exportLiveboardReport + * @throws ApiException if the response code was not in [200, 299] + */ + exportLiveboardReport(response: ResponseContext): Promise; +} + +/** + * no description + */ +declare class RolesApiRequestFactory extends BaseAPIRequestFactory { + /** + * Version: 9.5.0.cl or later Creates a Role object in ThoughtSpot. Available only if [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance. To create a Role, the `ROLE_ADMINISTRATION` (**Can manage roles**) privilege is required. + * @param createRoleRequest + */ + createRole(createRoleRequest: CreateRoleRequest, _options?: Configuration): Promise; + /** + * Version: 9.5.0.cl or later Deletes a Role object from the ThoughtSpot system. Available only if [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance. To delete a Role, the `ROLE_ADMINISTRATION` (**Can manage roles**) privilege is required. + * @param roleIdentifier Unique ID or name of the Role. ReadOnly roles cannot be deleted. + */ + deleteRole(roleIdentifier: string, _options?: Configuration): Promise; + /** + * Version: 9.5.0.cl or later Gets a list of Role objects from the ThoughtSpot system. Available if [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance. To search for Roles, the `ROLE_ADMINISTRATION` (**Can manage roles**) privilege is required. To get details of a specific Role object, specify the GUID or name. You can also filter the API response based on user group and Org identifiers, privileges assigned to the Role, and deprecation status. + * @param searchRolesRequest + */ + searchRoles(searchRolesRequest: SearchRolesRequest, _options?: Configuration): Promise; + /** + * Version: 9.5.0.cl or later Updates the properties of a Role object. Available only if [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance. To update a Role, the `ROLE_ADMINISTRATION` (**Can manage roles**) privilege is required. + * @param roleIdentifier Unique ID or name of the Role. + * @param updateRoleRequest + */ + updateRole(roleIdentifier: string, updateRoleRequest: UpdateRoleRequest, _options?: Configuration): Promise; +} +declare class RolesApiResponseProcessor { + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to createRole + * @throws ApiException if the response code was not in [200, 299] + */ + createRole(response: ResponseContext): Promise; + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to deleteRole + * @throws ApiException if the response code was not in [200, 299] + */ + deleteRole(response: ResponseContext): Promise; + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to searchRoles + * @throws ApiException if the response code was not in [200, 299] + */ + searchRoles(response: ResponseContext): Promise>; + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to updateRole + * @throws ApiException if the response code was not in [200, 299] + */ + updateRole(response: ResponseContext): Promise; +} + +/** + * no description + */ +declare class SchedulesApiRequestFactory extends BaseAPIRequestFactory { + /** + * Create schedule. Version: 9.4.0.cl or later Creates a Liveboard schedule job. Requires at least edit access to Liveboards. To create a schedule on behalf of another user, you need `ADMINISTRATION` (**Can administer Org**) or `JOBSCHEDULING` (**Can schedule for others**) privilege and edit access to the Liveboard. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `JOBSCHEDULING` (**Can schedule for others**) privilege is required. #### Usage guidelines * The description text is mandatory. The description text appears as **Description: ** in the Liveboard schedule email notifications. * For Liveboards with both charts and tables, schedule creation is only supported in PDF and XLS formats. Schedules created in CSV formats for such Liveboards will fail to run. If `PDF` is set as the `file_format`, enable `pdf_options` to get the correct attachment. Not doing so may cause the attachment to be rendered empty. * To include only specific visualizations, specify the visualization GUIDs in the `visualization_identifiers` array. * You can schedule a Liveboard job to run periodically by setting frequency parameters. You can set the schedule to run daily, weekly, monthly or every n minutes or hours. The scheduled job can also be configured to run at a specific time of the day or on specific days of the week or month. Please ensure that when setting the schedule frequency for _minute of the object_, only values that are multiples of 5 are included. * If the `frequency` parameters are defined, you can set the time zone to a value that matches your server\'s time zone. For example, `US/Central`, `Etc/UTC`, `CET`. The default time zone is `America/Los_Angeles`. For more information about Liveboard jobs, see [ThoughtSpot Product Documentation](https://docs.thoughtspot.com/cloud/latest/liveboard-schedule). + * @param createScheduleRequest + */ + createSchedule(createScheduleRequest: CreateScheduleRequest, _options?: Configuration): Promise; + /** + * Deletes a scheduled job. Version: 9.4.0.cl or later Deletes a scheduled Liveboard job. Requires at least edit access to Liveboard or `ADMINISTRATION` (**Can administer Org**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `JOBSCHEDULING` (**Can schedule for others**) privilege is required. + * @param scheduleIdentifier Unique ID or name of the scheduled job. + */ + deleteSchedule(scheduleIdentifier: string, _options?: Configuration): Promise; + /** + * Search Schedules Version: 9.4.0.cl or later Gets a list of scheduled jobs configured for a Liveboard. To get details of a specific scheduled job, specify the name or GUID of the scheduled job. Requires at least view access to Liveboards. **NOTE**: When filtering schedules by parameters other than `metadata`, set `record_size` to `-1` and `record_offset` to `0` for accurate results. + * @param searchSchedulesRequest + */ + searchSchedules(searchSchedulesRequest: SearchSchedulesRequest, _options?: Configuration): Promise; + /** + * Update schedule. Version: 9.4.0.cl or later Updates a scheduled Liveboard job. Requires at least edit access to Liveboards. To update a schedule on behalf of another user, you need `ADMINISTRATION` (**Can administer Org**) or `JOBSCHEDULING` (**Can schedule for others**) privilege and edit access to the Liveboard. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `JOBSCHEDULING` (**Can schedule for others**) privilege is required. The API endpoint allows you to pause a scheduled job, change the status of a paused job. You can also edit the recipients list, frequency of the job, format of the file to send to the recipients in email notifications, PDF options, and time zone setting. + * @param scheduleIdentifier Unique ID or name of the schedule. + * @param updateScheduleRequest + */ + updateSchedule(scheduleIdentifier: string, updateScheduleRequest: UpdateScheduleRequest, _options?: Configuration): Promise; +} +declare class SchedulesApiResponseProcessor { + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to createSchedule + * @throws ApiException if the response code was not in [200, 299] + */ + createSchedule(response: ResponseContext): Promise; + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to deleteSchedule + * @throws ApiException if the response code was not in [200, 299] + */ + deleteSchedule(response: ResponseContext): Promise; + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to searchSchedules + * @throws ApiException if the response code was not in [200, 299] + */ + searchSchedules(response: ResponseContext): Promise>; + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to updateSchedule + * @throws ApiException if the response code was not in [200, 299] + */ + updateSchedule(response: ResponseContext): Promise; +} + +/** + * no description + */ +declare class SecurityApiRequestFactory extends BaseAPIRequestFactory { + /** + * Version: 9.0.0.cl or later Transfers the ownership of one or several objects from one user to another. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `USER_ADMINISTRATION` (**Can manage users**) privilege and edit access to the objects are required. + * @param assignChangeAuthorRequest + */ + assignChangeAuthor(assignChangeAuthorRequest: AssignChangeAuthorRequest, _options?: Configuration): Promise; + /** + * Version: 10.12.0.cl or later Fetches column security rules for specified tables. This API endpoint retrieves column-level security rules configured for tables. It returns information about which columns are secured and which groups have access to those columns. #### Usage guidelines - Provide an array of table identifiers using either `identifier` (GUID or name) or `obj_identifier` (object ID) - At least one of `identifier` or `obj_identifier` must be provided for each table - The API returns column security rules for all specified tables - Users must have appropriate permissions to access security rules for the specified tables #### Required permissions - `ADMINISTRATION` - Can administer ThoughtSpot - `DATAMANAGEMENT` - Can manage data - `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` - Can manage worksheet views and tables #### Example request ```json { \"tables\": [ { \"identifier\": \"table-guid\", \"obj_identifier\": \"table-object-id\" } ] } ``` #### Response format The API returns an array of `ColumnSecurityRuleResponse` objects wrapped in a `data` field. Each `ColumnSecurityRuleResponse` object contains: - Table information (GUID and object ID) - Array of column security rules with column details, group access, and source table information #### Example response ```json { \"data\": [ { \"guid\": \"table-guid\", \"objId\": \"table-object-id\", \"columnSecurityRules\": [ { \"column\": { \"id\": \"col_123\", \"name\": \"Salary\" }, \"groups\": [ { \"id\": \"group_1\", \"name\": \"HR Department\" } ], \"sourceTableDetails\": { \"id\": \"source-table-guid\", \"name\": \"Employee_Data\" } } ] } ] } ``` + * @param fetchColumnSecurityRulesRequest + */ + fetchColumnSecurityRules(fetchColumnSecurityRulesRequest: FetchColumnSecurityRulesRequest, _options?: Configuration): Promise; + /** + * Version: 26.3.0.cl or later This API fetches the object privileges present for the given list of principals (user or group), on the given set of objects. It supports pagination, which can be enabled and configured using the request parameters. It provides users access to certain features based on privilege based access control. #### Usage guidelines - Specify the `type` (`USER` or `USER_GROUP`) and `identifier` (either GUID or name) of the principals for which you want to retrieve object privilege information in the `principals` array. - Specify the `type` (`LOGICAL_TABLE`) and `identifier` (either GUID or name) of the metadata objects for which you want to retrieve object privilege information in the `metadata` array. Only `LOGICAL_TABLE` metadata type is supported for now. It may be extended for other metadata types in future. - To control the offset from where principals have to be fetched, use `record_offset`. When `record_offset` is 0, information is fetched from the beginning. - To control the number of principals to be fetched, use `record_size`. Default `record_size` is 20. - Ensure `record_offset` for a subsequent request is one more than the value of `record_size` of the previous request. - Ensure using correct Authorization Bearer Token corresponding to specific user & org. #### Example request ```json { \"principals\": [ { \"type\": \"type-1\", \"identifier\": \"principal-guid-or-name-1\" }, { \"type\": \"type-2\", \"identifier\": \"principal-guid-or-name-2\" } ], \"metadata\": [ { \"type\": \"metadata-type-1\", \"identifier\": \"metadata-guid-or-name-1\" }, { \"type\": \"metadata-type-2\", \"identifier\": \"metadata-guid-or-name-2\" } ], \"record_offset\": 0, \"record_size\": 20 } ``` #### Response format The API returns an array of `metadata_object_privileges` objects wrapped in JSON. Each `metadata_object_privileges` object contains: - Metadata information (GUID, name and type) - Array of `principal_object_privilege_info`. - Each `principal_object_privilege_info` contains: - Principal type. All principals of this type are listed as described below. - Array of `principal_object_privileges`. - Each `principal_object_privileges` contains: - Principal information (GUID, name, subtype) - List of applied object level privileges. #### Example response ```json { \"metadata_object_privileges\": [ { \"metadata_id\": \"metadata-guid-1\", \"metadata_name\": \"metadata-name-1\", \"metadata_type\": \"metadata-type-1\", \"principal_object_privilege_info\": [ { \"principal_type\": \"principal-type-1\", \"principal_object_privileges\": [ { \"principal_id\": \"principal-guid-1\", \"principal_name\": \"principal-name-1\", \"principal_sub_type\": \"principal-sub-type-1\", \"object_privileges\": \"[object-privilege-1, object-privilege-2]\" }, { \"principal_id\": \"principal-guid-2\", \"principal_name\": \"principal-name-2\", \"principal_sub_type\": \"principal-sub-type-2\", \"object_privileges\": \"[object-privilege-1, object-privilege-2]\" } ] }, { \"principal_type\": \"principal-type-2\", \"principal_object_privileges\": [ { \"principal_id\": \"principal-guid-3\", \"principal_name\": \"principal-guid-4\", \"principal_sub_type\": \"principal-sub-type-4\", \"object_privileges\": \"[object-privilege-1]\" } ] } ] }, { \"metadata_id\": \"metadata-guid-2\", \"metadata_name\": \"metadata-name-2\", \"metadata_type\": \"metadata-type-2\", \"principal_object_privilege_info\": [ { \"principal_type\": \"principal-type-1\", \"principal_object_privileges\": [ { \"principal_id\": \"principal-guid-1\", \"principal_name\": \"principal-name-1\", \"principal_sub_type\": \"principal-sub-type-1\", \"object_privileges\": \"[object-privilege-3, object-privilege-4]\" }, { \"principal_id\": \"principal-guid-2\", \"principal_name\": \"principal-name-2\", \"principal_sub_type\": \"principal-sub-type-2\", \"object_privileges\": \"[object-privilege-4]\" } ] } ] } ] } ``` + * @param fetchObjectPrivilegesRequest + */ + fetchObjectPrivileges(fetchObjectPrivilegesRequest: FetchObjectPrivilegesRequest, _options?: Configuration): Promise; + /** + * Version: 9.0.0.cl or later Fetches object permission details for a given principal object such as a user and group. Requires view access to the metadata object. #### Usage guidelines * To get a list of all metadata objects that a user or group can access, specify the `type` and GUID or name of the principal. * To get permission details for a specific object, add the `type` and GUID or name of the metadata object to your API request. Upon successful execution, the API returns a list of metadata objects and permission details for each object. + * @param fetchPermissionsOfPrincipalsRequest + */ + fetchPermissionsOfPrincipals(fetchPermissionsOfPrincipalsRequest: FetchPermissionsOfPrincipalsRequest, _options?: Configuration): Promise; + /** + * Version: 9.0.0.cl or later Fetches permission details for a given metadata object. Requires view access to the metadata object. #### Usage guidelines * To fetch a list of users and groups for a metadata object, specify `type` and GUID or name of the metadata object. * To get permission details for a specific user or group, add `type` and GUID or name of the principal object to your API request. Upon successful execution, the API returns permission details and principal information for the object specified in the API request. + * @param fetchPermissionsOnMetadataRequest + */ + fetchPermissionsOnMetadata(fetchPermissionsOnMetadataRequest: FetchPermissionsOnMetadataRequest, _options?: Configuration): Promise; + /** + * Version: 26.3.0.cl or later This API allows the addition or deletion of object level privileges for a set of users and groups, on a set of metadata objects. It provides users to access certain features based on privilege based access control. #### Usage guidelines - Specify the `operation`. The supported operations are: `ADD`, `REMOVE`. - Specify the type of the objects on which the object privileges are being provided in `metadata_type`. Only `LOGICAL_TABLE` metadata type is supported for now. It may be extended for other metadata types in future. - Specify the list of object privilege types in the `object_privilege_types` array. The supported object privilege types are: `SPOTTER_COACHING_PRIVILEGE`. - Specify the identifiers (either GUID or name) for the metadata objects in the `metadata_identifiers` array. - Specify the `type` (`USER` or `USER_GROUP`) and `identifier` (either GUID or name) of the principals to which you want to apply the given operation and given object privileges in the `principals` array. - Ensure using correct Authorization Bearer Token corresponding to specific user & org. #### Example request ```json { \"operation\": \"operation-type\", \"metadata_type\": \"metadata-type\", \"object_privilege_types\": [\"privilege-type-1\", \"privilege-type-2\"], \"metadata_identifiers\": [\"metadata-guid-or-name-1\", \"metadata-guid-or-name-1\"], \"principals\": [ { \"type\": \"type-1\", \"identifier\": \"principal-guid-or-name-1\" }, { \"type\": \"type-2\", \"identifier\": \"principal-guid-or-name-2\" } ] } ``` > ###### Note: > * Only admin users, users with edit access and users with coaching privilege on a given data-model can add or remove principals related to SPOTTER_COACHING_PRIVILEGE + * @param manageObjectPrivilegeRequest + */ + manageObjectPrivilege(manageObjectPrivilegeRequest: ManageObjectPrivilegeRequest, _options?: Configuration): Promise; + /** + * Version: 26.5.0.cl or later Allows publishing metadata objects across organizations in ThoughtSpot. Requires ADMINISTRATION role and TENANT scope. The API endpoint allows publishing the following types of metadata objects: * Liveboards * Answers * Logical Tables This API will essentially share the objects along with it\'s dependencies to the org admins of the orgs to which it is being published. + * @param publishMetadataRequest + */ + publishMetadata(publishMetadataRequest: PublishMetadataRequest, _options?: Configuration): Promise; + /** + * Version: 9.0.0.cl or later Allows sharing one or several metadata objects with users and groups in ThoughtSpot. Requires edit access to the metadata object. #### Supported metadata objects: * Liveboards * Visualizations * Answers * Models * Views * Connections * Collections #### Object permissions You can provide `READ_ONLY` or `MODIFY` access when sharing an object with another user or group. The `READ_ONLY` permission grants view access to the shared object, whereas `MODIFY` provides edit access. To prevent a user or group from accessing the shared object, specify the GUID or name of the principal and set `shareMode` to `NO_ACCESS`. #### Sharing a visualization * Sharing a visualization implicitly shares the entire Liveboard with the recipient. * Object permissions set for a shared visualization also apply to the Liveboard unless overridden by another API request or via UI. * If email notifications for object sharing are enabled, a notification with a link to the shared visualization will be sent to the recipient’s email address. Although this link opens the shared visualization, recipients can also access other visualizations in the Liveboard. #### Sharing a collection Collections support **dual permissions** that provide fine-grained control: * **Collection permissions** (`share_mode`) - controls access to the collection itself (view, edit, delete the collection) * **Content permissions** (`content_share_mode`) - controls access to objects within the collection (view, edit objects inside) **Default Behavior:** - If only `share_mode` is specified, the content permissions default to `READ_ONLY` (except when `share_mode` is `NO_ACCESS`, then content also gets `NO_ACCESS`) - To give users edit access to collection contents, explicitly set `content_share_mode: \"MODIFY\"` ## Examples The following JSON examples can be copy-pasted as request bodies for the REST v2 API endpoint: ```bash POST /callosum/v1/v2/security/metadata/share Content-Type: application/x-www-form-urlencoded ``` ### Basic collection sharing Share a collection with read-only access: ```json { \"metadata_type\": \"COLLECTION\", \"metadata_identifiers\": [\"Sales Reports Collection\"], \"permissions\": [{ \"principal\": { \"type\": \"USER\", \"identifier\": \"alice@company.com\" }, \"share_mode\": \"READ_ONLY\" }], \"notification\": { \"message\": \"I\'ve shared the Sales Reports collection with you\", \"notify_on_share\": true } } ``` ### Collection sharing with dual permissions Share a collection with different permissions for the collection vs. its contents: ```json { \"metadata_type\": \"COLLECTION\", \"metadata_identifiers\": [\"Marketing Analytics\"], \"permissions\": [{ \"principal\": { \"type\": \"USER\", \"identifier\": \"bob@company.com\" }, \"share_mode\": \"MODIFY\", \"content_share_mode\": \"READ_ONLY\" }, { \"principal\": { \"type\": \"USER_GROUP\", \"identifier\": \"Marketing Team\" }, \"share_mode\": \"READ_ONLY\", \"content_share_mode\": \"READ_ONLY\" }], \"notification\": { \"emails\": [\"bob@company.com\"], \"message\": \"You can edit the collection but content is read-only\", \"enable_custom_url\": false, \"notify_on_share\": true }, \"has_lenient_discoverability\": false } ``` ### Multiple collections sharing Share multiple collections with different users: ```json { \"metadata\": [ { \"type\": \"COLLECTION\", \"identifier\": \"Q4 Reports\" }, { \"type\": \"COLLECTION\", \"identifier\": \"Executive Dashboard Collection\" } ], \"permissions\": [{ \"principal\": { \"type\": \"USER_GROUP\", \"identifier\": \"Executives\" }, \"share_mode\": \"MODIFY\" }, { \"principal\": { \"type\": \"USER\", \"identifier\": \"manager@company.com\" }, \"share_mode\": \"READ_ONLY\", \"content_share_mode\": \"MODIFY\" }], \"notification\": { \"message\": \"Sharing quarterly collections with leadership team\", \"notify_on_share\": true } } ``` ### Remove collection access Remove access to a collection by setting share_mode to NO_ACCESS: ```json { \"metadata_type\": \"COLLECTION\", \"metadata_identifiers\": [\"Confidential Reports\"], \"permissions\": [{ \"principal\": { \"type\": \"USER\", \"identifier\": \"former-employee@company.com\" }, \"share_mode\": \"NO_ACCESS\" }], \"notification\": { \"notify_on_share\": false } } ``` ### Collection Permission Scenarios **Scenario 1: Collection Admin** - `share_mode: MODIFY` + `content_share_mode: MODIFY` = Full control over collection and its contents **Scenario 2: Collection Curator** - `share_mode: MODIFY` + `content_share_mode: READ_ONLY` = Can manage collection structure but not edit contents **Scenario 3: Content Editor** - `share_mode: READ_ONLY` + `content_share_mode: MODIFY` = Can edit objects within collection but can\'t change collection itself **Scenario 4: Viewer** - `share_mode: READ_ONLY` + `content_share_mode: READ_ONLY` = View-only access to collection and contents + * @param shareMetadataRequest + */ + shareMetadata(shareMetadataRequest: ShareMetadataRequest, _options?: Configuration): Promise; + /** + * Version: 26.5.0.cl or later Allows unpublishing metadata objects from organizations in ThoughtSpot. Requires ADMINISTRATION role and TENANT scope. The API endpoint allows unpublishing the following types of metadata objects: * Liveboards * Answers * Logical Tables When unpublishing objects, you can: * Include dependencies by setting `include_dependencies` to true - this will unpublish all dependent objects if no other published object is using them * Force unpublish by setting `force` to true - this will break all dependent objects in the unpublished organizations + * @param unpublishMetadataRequest + */ + unpublishMetadata(unpublishMetadataRequest: UnpublishMetadataRequest, _options?: Configuration): Promise; + /** + * Version: 10.12.0.cl or later Creates, updates, or deletes column security rules for specified tables. This API endpoint allows you to create, update, or delete column-level security rules on columns of a table. The operation follows an \"all or none\" policy: if defining security rules for any of the provided columns fails, the entire operation will be rolled back, and no rules will be created. #### Usage guidelines - Provide table identifier using either `identifier` (GUID or name) or `obj_identifier` (object ID) - Use `clear_csr: true` to remove all column security rules from the table - For each column, specify the security rule using `column_security_rules` array - Use `is_unsecured: true` to mark a specific column as unprotected - Use `group_access` operations to manage group associations: - `ADD`: Add groups to the column\'s access list - `REMOVE`: Remove groups from the column\'s access list - `REPLACE`: Replace all existing groups with the specified groups #### Required permissions - `ADMINISTRATION` - Can administer ThoughtSpot - `DATAMANAGEMENT` - Can manage data (if RBAC is disabled) - `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` - Can manage worksheet views and tables (if RBAC is enabled) #### Example request ```json { \"identifier\": \"table-guid\", \"obj_identifier\": \"table-object-id\", \"clear_csr\": false, \"column_security_rules\": [ { \"column_identifier\": \"col id or col name\", \"is_unsecured\": false, \"group_access\": [ { \"operation\": \"ADD\", \"group_identifiers\": [\"hr_group_id\", \"hr_group_name\", \"finance_group_id\"] } ] }, { \"column_identifier\": \"col id or col name\", \"is_unsecured\": true }, { \"column_identifier\": \"col id or col name\", \"is_unsecured\": false, \"group_access\": [ { \"operation\": \"REPLACE\", \"group_identifiers\": [\"management_group_id\", \"management_group_name\"] } ] } ] } ``` #### Request Body Schema - `identifier` (string, optional): GUID or name of the table for which we want to create column security rules - `obj_identifier` (string, optional): The object ID of the table - `clear_csr` (boolean, optional): If true, then all the secured columns will be marked as unprotected, and all the group associations will be removed - `column_security_rules` (array of objects, required): An array where each object defines the security rule for a specific column Each column security rule object contains: - `column_identifier` (string, required): Column identifier (col_id or name) - `is_unsecured` (boolean, optional): If true, the column will be marked as unprotected and all groups associated with it will be removed - `group_access` (array of objects, optional): Array of group operation objects Each group operation object contains: - `operation` (string, required): Operation type - ADD, REMOVE, or REPLACE - `group_identifiers` (array of strings, required): Array of group identifiers (name or GUID) on which the operation will be performed #### Response This API does not return any response body. A successful operation returns HTTP 200 status code. #### Operation Types - **ADD**: Adds the specified groups to the column\'s access list - **REMOVE**: Removes the specified groups from the column\'s access list - **REPLACE**: Replaces all existing groups with the specified groups + * @param updateColumnSecurityRulesRequest + */ + updateColumnSecurityRules(updateColumnSecurityRulesRequest: UpdateColumnSecurityRulesRequest, _options?: Configuration): Promise; +} +declare class SecurityApiResponseProcessor { + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to assignChangeAuthor + * @throws ApiException if the response code was not in [200, 299] + */ + assignChangeAuthor(response: ResponseContext): Promise; + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to fetchColumnSecurityRules + * @throws ApiException if the response code was not in [200, 299] + */ + fetchColumnSecurityRules(response: ResponseContext): Promise>; + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to fetchObjectPrivileges + * @throws ApiException if the response code was not in [200, 299] + */ + fetchObjectPrivileges(response: ResponseContext): Promise; + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to fetchPermissionsOfPrincipals + * @throws ApiException if the response code was not in [200, 299] + */ + fetchPermissionsOfPrincipals(response: ResponseContext): Promise; + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to fetchPermissionsOnMetadata + * @throws ApiException if the response code was not in [200, 299] + */ + fetchPermissionsOnMetadata(response: ResponseContext): Promise; + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to manageObjectPrivilege + * @throws ApiException if the response code was not in [200, 299] + */ + manageObjectPrivilege(response: ResponseContext): Promise; + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to publishMetadata + * @throws ApiException if the response code was not in [200, 299] + */ + publishMetadata(response: ResponseContext): Promise; + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to shareMetadata + * @throws ApiException if the response code was not in [200, 299] + */ + shareMetadata(response: ResponseContext): Promise; + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to unpublishMetadata + * @throws ApiException if the response code was not in [200, 299] + */ + unpublishMetadata(response: ResponseContext): Promise; + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to updateColumnSecurityRules + * @throws ApiException if the response code was not in [200, 299] + */ + updateColumnSecurityRules(response: ResponseContext): Promise; +} + +/** + * no description + */ +declare class SystemApiRequestFactory extends BaseAPIRequestFactory { + /** + * Version: 10.14.0.cl or later Configure communication channel preferences. - Use `cluster_preferences` to update the default preferences for your ThoughtSpot application instance. - If your instance has [Orgs](https://docs.thoughtspot.com/cloud/latest/orgs-overview), use `org_preferences` to specify Org-specific preferences that override the defaults. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) or `DEVELOPER` (**Has developer privilege**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, users with `APPLICATION_ADMINISTRATION` (**Can manage application settings**) privilege are also authorized to perform this action. + * @param configureCommunicationChannelPreferencesRequest + */ + configureCommunicationChannelPreferences(configureCommunicationChannelPreferencesRequest: ConfigureCommunicationChannelPreferencesRequest, _options?: Configuration): Promise; + /** + * Version: 26.2.0.cl or later Configure security settings for your ThoughtSpot application instance. - Use `cluster_preferences` to update cluster-level security settings including CORS whitelisted URLs, CSP settings, SAML redirect URLs, partitioned cookies, and non-embed access configuration. - Use `org_preferences` to configure Org-specific security settings. If your instance has [Orgs](https://docs.thoughtspot.com/cloud/latest/orgs-overview), this allows configuring CORS and non-embed access settings specific to the Org. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) or `DEVELOPER` (**Has developer privilege**) privilege. Cluster-level SAML and script-src settings require `ADMINISTRATION` privilege. See [Security Settings](https://developers.thoughtspot.com/docs/security-settings) for more details. + * @param configureSecuritySettingsRequest + */ + configureSecuritySettings(configureSecuritySettingsRequest: ConfigureSecuritySettingsRequest, _options?: Configuration): Promise; + /** + * Version: 9.0.0.cl or later Retrieves the current configuration details of the cluster. If the request is successful, the API returns a list configuration settings applied on the cluster. Requires `ADMINISTRATION`(**Can administer ThoughtSpot**) privilege to view these complete configuration settings of the cluster. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `SYSTEM_INFO_ADMINISTRATION` (**Can view system activities**) privilege is required. This API does not require any parameters to be passed in the request. + */ + getSystemConfig(_options?: Configuration): Promise; + /** + * Version: 9.0.0.cl or later Gets system information such as the release version, locale, time zone, deployment environment, date format, and date time format of the cluster. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privileges. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `SYSTEM_INFO_ADMINISTRATION` (**Can view system activities**) privilege is required. This API does not require any parameters to be passed in the request. + */ + getSystemInformation(_options?: Configuration): Promise; + /** + * Version: 9.2.0.cl or later Gets a list of configuration overrides applied on the cluster. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `APPLICATION_ADMINISTRATION` (**Can manage application settings**) privilege is required. This API does not require any parameters to be passed in the request. + */ + getSystemOverrideInfo(_options?: Configuration): Promise; + /** + * Version: 10.14.0.cl or later Fetch communication channel preferences. - Use `cluster_preferences` to fetch the default preferences for your ThoughtSpot application instance. - If your instance has [Orgs](https://docs.thoughtspot.com/cloud/latest/orgs-overview), use `org_preferences` to fetch any Org-specific preferences that override the defaults. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) or `DEVELOPER` (**Has developer privilege**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, users with `APPLICATION_ADMINISTRATION` (**Can manage application settings**) privilege are also authorized to perform this action. + * @param searchCommunicationChannelPreferencesRequest + */ + searchCommunicationChannelPreferences(searchCommunicationChannelPreferencesRequest: SearchCommunicationChannelPreferencesRequest, _options?: Configuration): Promise; + /** + * Version: 26.2.0.cl or later Fetch security settings for your ThoughtSpot application instance. - Use `scope: CLUSTER` to retrieve cluster-level security settings, including CORS and CSP allowlists, SAML redirect URLs, and settings that control access to non-embedded pages. - Use `scope: ORG` to retrieve Org-level security settings. If your instance has [Orgs](https://docs.thoughtspot.com/cloud/latest/orgs-overview), this returns CORS and non-embed access settings specific to the Org. - If `scope` is not specified, returns both cluster and Org-specific settings based on user privileges. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) or `DEVELOPER` (**Has developer privilege**) privilege. See [Security Settings](https://developers.thoughtspot.com/docs/security-settings) for more details. + * @param searchSecuritySettingsRequest + */ + searchSecuritySettings(searchSecuritySettingsRequest: SearchSecuritySettingsRequest, _options?: Configuration): Promise; + /** + * Version: 9.2.0.cl or later Updates the current configuration of the cluster. You must send the configuration data in JSON format. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privileges. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `APPLICATION_ADMINISTRATION` (**Can manage application settings**) privilege is required. + * @param updateSystemConfigRequest + */ + updateSystemConfig(updateSystemConfigRequest: UpdateSystemConfigRequest, _options?: Configuration): Promise; + /** + * Version: 26.4.0.cl or later Validates a communication channel configuration to ensure it is properly set up and can receive events. - Use `channel_type` to specify the type of communication channel to validate (e.g., WEBHOOK). - Use `channel_identifier` to provide the unique identifier or name for the communication channel. - Use `event_type` to specify the event type to validate for this channel. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) or `DEVELOPER` (**Has developer privilege**) privilege. For webhook channels, users with `CAN_MANAGE_WEBHOOKS` (**Can manage webhooks**) privilege are also authorized to perform this action. + * @param validateCommunicationChannelRequest + */ + validateCommunicationChannel(validateCommunicationChannelRequest: ValidateCommunicationChannelRequest, _options?: Configuration): Promise; +} +declare class SystemApiResponseProcessor { + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to configureCommunicationChannelPreferences + * @throws ApiException if the response code was not in [200, 299] + */ + configureCommunicationChannelPreferences(response: ResponseContext): Promise; + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to configureSecuritySettings + * @throws ApiException if the response code was not in [200, 299] + */ + configureSecuritySettings(response: ResponseContext): Promise; + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to getSystemConfig + * @throws ApiException if the response code was not in [200, 299] + */ + getSystemConfig(response: ResponseContext): Promise; + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to getSystemInformation + * @throws ApiException if the response code was not in [200, 299] + */ + getSystemInformation(response: ResponseContext): Promise; + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to getSystemOverrideInfo + * @throws ApiException if the response code was not in [200, 299] + */ + getSystemOverrideInfo(response: ResponseContext): Promise; + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to searchCommunicationChannelPreferences + * @throws ApiException if the response code was not in [200, 299] + */ + searchCommunicationChannelPreferences(response: ResponseContext): Promise; + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to searchSecuritySettings + * @throws ApiException if the response code was not in [200, 299] + */ + searchSecuritySettings(response: ResponseContext): Promise; + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to updateSystemConfig + * @throws ApiException if the response code was not in [200, 299] + */ + updateSystemConfig(response: ResponseContext): Promise; + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to validateCommunicationChannel + * @throws ApiException if the response code was not in [200, 299] + */ + validateCommunicationChannel(response: ResponseContext): Promise; +} + +/** + * no description + */ +declare class TagsApiRequestFactory extends BaseAPIRequestFactory { + /** + * Version: 9.0.0.cl or later Assigns tags to Liveboards, Answers, Tables, and Worksheets. Requires edit access to the metadata object. + * @param assignTagRequest + */ + assignTag(assignTagRequest: AssignTagRequest, _options?: Configuration): Promise; + /** + * Version: 9.0.0.cl or later Creates a tag object. Tags are labels that identify a metadata object. For example, you can create a tag to designate subject areas, such as sales, HR, marketing, and finance. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `TAGMANAGEMENT` (**Can manage tags**) privilege is required to create, edit, and delete tags. + * @param createTagRequest + */ + createTag(createTagRequest: CreateTagRequest, _options?: Configuration): Promise; + /** + * Version: 9.0.0.cl or later Deletes a tag object from the ThoughtSpot system Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `TAGMANAGEMENT` (**Can manage tags**) privilege is required to create, edit, and delete tags. + * @param tagIdentifier Tag identifier Tag name or Tag id. + */ + deleteTag(tagIdentifier: string, _options?: Configuration): Promise; + /** + * Version: 9.0.0.cl or later Gets a list of tag objects available on the ThoughtSpot system. To get details of a specific tag object, specify the GUID or name. Any authenticated user can search for tag objects. + * @param searchTagsRequest + */ + searchTags(searchTagsRequest: SearchTagsRequest, _options?: Configuration): Promise; + /** + * Version: 9.0.0.cl or later Removes the tags applied to a Liveboard, Answer, Table, or Worksheet. Requires edit access to the metadata object. + * @param unassignTagRequest + */ + unassignTag(unassignTagRequest: UnassignTagRequest, _options?: Configuration): Promise; + /** + * Version: 9.0.0.cl or later Updates a tag object. You can modify the `name` and `color` properties of a tag object. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `TAGMANAGEMENT` (**Can manage tags**) privilege is required to create, edit, and delete tags. + * @param tagIdentifier Name or Id of the tag. + * @param updateTagRequest + */ + updateTag(tagIdentifier: string, updateTagRequest: UpdateTagRequest, _options?: Configuration): Promise; +} +declare class TagsApiResponseProcessor { + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to assignTag + * @throws ApiException if the response code was not in [200, 299] + */ + assignTag(response: ResponseContext): Promise; + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to createTag + * @throws ApiException if the response code was not in [200, 299] + */ + createTag(response: ResponseContext): Promise; + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to deleteTag + * @throws ApiException if the response code was not in [200, 299] + */ + deleteTag(response: ResponseContext): Promise; + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to searchTags + * @throws ApiException if the response code was not in [200, 299] + */ + searchTags(response: ResponseContext): Promise>; + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to unassignTag + * @throws ApiException if the response code was not in [200, 299] + */ + unassignTag(response: ResponseContext): Promise; + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to updateTag + * @throws ApiException if the response code was not in [200, 299] + */ + updateTag(response: ResponseContext): Promise; +} + +/** + * no description + */ +declare class ThoughtSpotRestApiRequestFactory extends BaseAPIRequestFactory { + /** + * Version: 9.7.0.cl or later Activates a deactivated user account. Requires `ADMINISTRATION` (**Can administer Thoughtspot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `USER_ADMINISTRATION` (**Can manage users**) privilege is required. To activate an inactive user account, the API request body must include the following information: - Username or the GUID of the user account. - Auth token generated for the deactivated user. The auth token is sent in the API response when a user is deactivated. - Password for the user account. + * @param activateUserRequest + */ + activateUser(activateUserRequest: ActivateUserRequest, _options?: Configuration): Promise; + /** + * Version: 9.0.0.cl or later Transfers the ownership of one or several objects from one user to another. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `USER_ADMINISTRATION` (**Can manage users**) privilege and edit access to the objects are required. + * @param assignChangeAuthorRequest + */ + assignChangeAuthor(assignChangeAuthorRequest: AssignChangeAuthorRequest, _options?: Configuration): Promise; + /** + * Version: 9.0.0.cl or later Assigns tags to Liveboards, Answers, Tables, and Worksheets. Requires edit access to the metadata object. + * @param assignTagRequest + */ + assignTag(assignTagRequest: AssignTagRequest, _options?: Configuration): Promise; + /** + * Version: 9.0.0.cl or later Updates the current password of the user. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `USER_ADMINISTRATION` (**Can manage users**) privilege is required. + * @param changeUserPasswordRequest + */ + changeUserPassword(changeUserPasswordRequest: ChangeUserPasswordRequest, _options?: Configuration): Promise; + /** + * Version: 9.2.0.cl or later Commits TML files of metadata objects to the Git branch configured on your instance. Requires at least edit access to objects used in the commit operation. Before using this endpoint to push your commits: * Enable Git integration on your instance. * Make sure the Git repository and branch details are configured on your instance. For more information, see [Git integration documentation](https://developers.thoughtspot.com/docs/git-integration). + * @param commitBranchRequest + */ + commitBranch(commitBranchRequest: CommitBranchRequest, _options?: Configuration): Promise; + /** + * Version: 26.6.0.cl or later Enables or disables authentication at cluster or org level for the specified auth type. Currently supports `TRUSTED_AUTH`. #### Required privileges Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) or `CONTROL_TRUSTED_AUTH` (**Can Enable or Disable Trusted Authentication**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled, the `CONTROL_TRUSTED_AUTH` privilege is required. #### Usage guidelines Use `cluster_preferences` to enable or disable authentication at the cluster level. Cluster-level settings can only be configured from the Primary Org. - `ENABLED` — Generates a new access token if one does not exist. An existing token is preserved. - `DISABLED` — Revokes the existing cluster-level access token. Use `org_preferences` to enable or disable authentication for one or more Orgs. Each entry must include an `org_identifier` (unique ID or name) and an `auth_status`. Org-level configuration requires the per-Org authentication feature to be enabled on your instance. - `ENABLED` — Generates a new org-level access token if one does not exist. - `DISABLED` — Revokes the existing org-level access token for that Org. Both `cluster_preferences` and `org_preferences` are optional. Omitting a field leaves the corresponding settings unchanged. If both are omitted, the API returns `204 No Content` without making any changes. **Note**: Cluster-level and org-level settings are independent of each other. Enabling or disabling one does not affect the other. + * @param configureAuthSettingsRequest + */ + configureAuthSettings(configureAuthSettingsRequest: ConfigureAuthSettingsRequest, _options?: Configuration): Promise; + /** + * Version: 10.14.0.cl or later Configure communication channel preferences. - Use `cluster_preferences` to update the default preferences for your ThoughtSpot application instance. - If your instance has [Orgs](https://docs.thoughtspot.com/cloud/latest/orgs-overview), use `org_preferences` to specify Org-specific preferences that override the defaults. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) or `DEVELOPER` (**Has developer privilege**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, users with `APPLICATION_ADMINISTRATION` (**Can manage application settings**) privilege are also authorized to perform this action. + * @param configureCommunicationChannelPreferencesRequest + */ + configureCommunicationChannelPreferences(configureCommunicationChannelPreferencesRequest: ConfigureCommunicationChannelPreferencesRequest, _options?: Configuration): Promise; + /** + * Version: 26.2.0.cl or later Configure security settings for your ThoughtSpot application instance. - Use `cluster_preferences` to update cluster-level security settings including CORS whitelisted URLs, CSP settings, SAML redirect URLs, partitioned cookies, and non-embed access configuration. - Use `org_preferences` to configure Org-specific security settings. If your instance has [Orgs](https://docs.thoughtspot.com/cloud/latest/orgs-overview), this allows configuring CORS and non-embed access settings specific to the Org. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) or `DEVELOPER` (**Has developer privilege**) privilege. Cluster-level SAML and script-src settings require `ADMINISTRATION` privilege. See [Security Settings](https://developers.thoughtspot.com/docs/security-settings) for more details. + * @param configureSecuritySettingsRequest + */ + configureSecuritySettings(configureSecuritySettingsRequest: ConfigureSecuritySettingsRequest, _options?: Configuration): Promise; + /** + * Version: 10.12.0.cl or later Gets connection configuration objects. Requires `DATAMANAGEMENT` (**Can manage data**) and edit permissions to the connection object, or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) privilege is required. #### Usage guidelines * To get a list of all configurations available in the ThoughtSpot system, send the API request with only the connection name or GUID in the request body. * To fetch details of a configuration object, specify the configuration object name or GUID. + * @param connectionConfigurationSearchRequest + */ + connectionConfigurationSearch(connectionConfigurationSearchRequest: ConnectionConfigurationSearchRequest, _options?: Configuration): Promise; + /** + * Convert worksheets to models Version: 10.6.0.cl or later ## Prerequisites - **Privileges Required:** - `DATAMANAGEMENT` (Can manage data) or `ADMINISTRATION` (Can administer ThoughtSpot). - **Additional Privileges (if RBAC is enabled):** - `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` (Can manage data models). --- ## Usage Guidelines ### Parameters 1. **worksheet_ids** - **Description:** A comma-separated list of GUIDs (Globally Unique Identifiers) specifying the Worksheets to be converted. - **Usage:** - Used only when `convert_all` is set to `false`. - Leave empty or omit when `convert_all` is set to `true`. 2. **exclude_worksheet_ids** - **Description:** A comma-separated list of GUIDs specifying Worksheets to be excluded from conversion. - **Usage:** - Useful when `convert_all` is set to `true` and specific Worksheets should not be converted. 3. **convert_all** - **Description:** Sets the scope of conversion. - **Options:** - `true`: Converts all Worksheets in the system, except those specified in `exclude_worksheet_ids`. - `false`: Converts only the Worksheets listed in `worksheet_ids`. 4. **apply_changes** - **Description:** Specifies whether to apply changes directly to ThoughtSpot or to generate a preview before applying any changes.Used for validation of conversion. - **Options:** - `true`: Applies conversion changes directly to ThoughtSpot. - `false`: Generates only a preview of the changes and does not apply any changes to ThoughtSpot --- ## Best Practices 1. **Backup Before Conversion:** Always export metadata as a backup before initiating the conversion process 2. **Partial Conversion for Testing:** Test the conversion process by setting `convert_all` to `false` and specifying a small number of `worksheet_ids`. 3. **Verify Dependencies:** Check for dependent objects, such as Tables and Connections, to avoid invalid references. 4. **Review Changes:** Use `apply_changes: false` to preview the impact of the conversion before applying changes. --- ## Examples ### Convert Specific Worksheets ```json { \"worksheet_ids\": [\"guid1\", \"guid2\", \"guid3\"], \"exclude_worksheet_ids\": [], \"convert_all\": false, \"apply_changes\": true } ``` ### Convert All Accessible Worksheets ```json { \"worksheet_ids\": [], \"exclude_worksheet_ids\": [], \"convert_all\": true, \"apply_changes\": true } ``` ### Exclude Specific Worksheets While Converting All Accessible Worksheets ```json { \"worksheet_ids\": [], \"exclude_worksheet_ids\": [\"abc\"], \"convert_all\": true, \"apply_changes\": true } ``` + * @param convertWorksheetToModelRequest + */ + convertWorksheetToModel(convertWorksheetToModelRequest: ConvertWorksheetToModelRequest, _options?: Configuration): Promise; + /** + * Makes a copy of an Answer or Liveboard Version: 10.3.0.cl or later Creates a copy of a metadata object. Requires at least view access to the metadata object being copied. Upon successful execution, the API creates a copy of the metadata object specified in the API request and returns the ID of the new object. + * @param copyObjectRequest + */ + copyObject(copyObjectRequest: CopyObjectRequest, _options?: Configuration): Promise; + /** + * Version: 26.2.0.cl or later Creates a new Spotter agent conversation based on the provided context and settings. The endpoint was in Beta from 26.2.0.cl through 26.4.0.cl. Requires `CAN_USE_SPOTTER` privilege and at least view access to the metadata object specified in the request. #### Usage guidelines The request must include the `metadata_context` parameter to define the conversation context. The context type can be one of: - `DATA_SOURCE` *(available from 26.5.0.cl)*: targets a specific data source. Provide `data_source_identifier` in `data_source_context` for a single data source, or `data_source_identifiers` for multi-data-source context. The deprecated `guid` field is accepted for backwards compatibility. - `AUTO_MODE` *(available from 26.5.0.cl)*: automatically discovers and selects the most relevant datasets for the user\'s queries. > **Note for callers on versions 26.2.0.cl – 26.4.0.cl (Beta):** use the lowercase `data_source` enum value with the `guid` field instead of the above. Example: `{ \"type\": \"data_source\", \"data_source_context\": { \"guid\": \"\" } }`. The `conversation_settings` parameter controls which Spotter capabilities are enabled for the conversation: - `enable_contextual_change_analysis` (default: `true`, **deprecated from 26.2.0.cl**) — always enabled in Spotter 3; setting this to `false` has no effect on versions >= 26.2.0.cl - `enable_natural_language_answer_generation` (default: `true`, **deprecated from 26.2.0.cl**) — always enabled in Spotter 3; setting this to `false` has no effect on versions >= 26.2.0.cl - `enable_reasoning` (default: `true`, **deprecated from 26.2.0.cl**) — always enabled in Spotter 3; setting this to `false` has no effect on versions >= 26.2.0.cl - `enable_save_chat` (default: `false`, *available from 26.5.0.cl*) — enables saving the conversation for later retrieval via conversation history If the request is successful, the response includes a unique `conversation_identifier` that must be passed to `sendAgentConversationMessage` or `sendAgentConversationMessageStreaming` to send messages within this conversation. The response also includes `conversation_id` with the same value for backwards compatibility; use `conversation_identifier` for new integrations. #### Example request ```json { \"metadata_context\": { \"type\": \"DATA_SOURCE\", \"data_source_context\": { \"data_source_identifier\": \"a1b2c3d4-e5f6-7890-abcd-ef1234567890\" } }, \"conversation_settings\": {} } ``` #### Error responses | Code | Description | | ---- | --------------------------------------------------------------------------------------------------------------------------------------- | | 401 | Unauthorized — authentication token is missing, expired, or invalid. | | 403 | Forbidden — the authenticated user does not have `CAN_USE_SPOTTER` privilege or lacks view permission on the specified metadata object. | > ###### Note: > > - This endpoint was in Beta from 26.2.0.cl through 26.4.0.cl and is Generally Available from version 26.5.0.cl. > - This endpoint requires Spotter - please contact ThoughtSpot support to enable Spotter on your cluster. + * @param createAgentConversationRequest + */ + createAgentConversation(createAgentConversationRequest: CreateAgentConversationRequest, _options?: Configuration): Promise; + /** + * Version: 10.12.0.cl or later Creates a new [custom calendar](https://docs.thoughtspot.com/cloud/latest/connections-cust-cal). Requires `DATAMANAGEMENT` (**Can manage data**) or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your ThoughtSpot instance, the `CAN_MANAGE_CUSTOM_CALENDAR` (**Can manage custom calendars**) privilege is required. #### Usage guidelines You can create a custom calendar from scratch or an existing Table in ThoughtSpot. For both methods of calendar creation, the following parameters are required: * Name of the custom calendar. * Calendar creation method. To create a calendar from an existing table, specify the method: - `FROM_EXISTING_TABLE` - Creates calendar from the table reference provided in the API request. - `FROM_INPUT_PARAMS` - Creates a calendar from the parameters defined in the API request. * Connection ID and Table name * Database and schema name attributes: For most Cloud Data Warehouse (CDW) connectors, both `database_name` and `schema_name` attributes are required. However, the attribute requirements are conditional and vary based on the connector type and its metadata structure. For example, for connectors such as Teradata, MySQL, SingleSore, Amazon Aurora MySQL, Amazon RDS MySQL, Oracle, and GCP_MYSQL, the `schema_name` is required, whereas the `database_name` attribute is not. Similarly, connectors such as ClickHouse require you to specify the `database_name` and the schema specification in such cases is optional. **NOTE**: If you are creating a calendar from an existing table, ensure that the referenced table matches the required DDL for custom calendars. If the schema does not match, the API returns an error. ##### Calendar type The API allows you to create the following types of calendars: * `MONTH_OFFSET`. The default calendar type. A `MONTH_OFFSET` calendar is offset by a few months from the standard calendar months (January to December) and the year begins with the month defined in the request. For example, if the `month_offset` value is set as `April`, the calendar year begins in April. * `4-4-5`. Each quarter in the calendar will include two 4-week months followed by one 5-week month. * `4-5-4`. Each quarter in the calendar will include two 4-week months with a 5-week month between. * `5-4-4`. Each quarter begins with a 5-week month, followed by two 4-week months. To start and end the calendar on a specific date, specify the dates in the `MM/DD/YYYY` format. For `MONTH_OFFSET` calendars, ensure that the `start_date` matches the month specified in the `month_offset` attribute. You can also set the starting day of the week and customize the prefixes for year and quarter labels. #### Examples To create a calendar from an existing table: ``` { \"name\": \"MyCustomCalendar1\", \"table_reference\": { \"connection_identifier\": \"4db8ea22-2ff4-4224-b05a-26674717e468\", \"table_name\": \"MyCalendarTable\", \"database_name\": \"RETAILAPPAREL\", \"schema_name\": \"PUBLIC\" }, \"creation_method\": \"FROM_EXISTING_TABLE\", } ``` To create a calendar from scratch: ``` { \"name\": \"MyCustomCalendar1\", \"table_reference\": { \"connection_identifier\": \"4db8ea22-2ff4-4224-b05a-26674717e468\", \"table_name\": \"MyCalendarTable\", \"database_name\": \"RETAILAPPAREL\", \"schema_name\": \"PUBLIC\" }, \"creation_method\": \"FROM_INPUT_PARAMS\", \"calendar_type\": \"MONTH_OFFSET\", \"month_offset\": \"April\", \"start_day_of_week\": \"Monday\", \"quarter_name_prefix\": \"Q\", \"year_name_prefix\": \"FY\", \"start_date\": \"04/01/2025\", \"end_date\": \"04/31/2025\" } ``` + * @param createCalendarRequest + */ + createCalendar(createCalendarRequest: CreateCalendarRequest, _options?: Configuration): Promise; + /** + * Version: 26.4.0.cl or later Creates a new collection in ThoughtSpot. Collections allow you to organize and group related metadata objects such as Liveboards, Answers, worksheets, and other data objects. You can also create nested collections (sub-collections) to build a hierarchical structure. #### Supported operations The API endpoint lets you perform the following operations: * Create a new collection * Add metadata objects (Liveboards, Answers, Logical Tables) to the collection * Create nested collections by adding sub-collections + * @param createCollectionRequest + */ + createCollection(createCollectionRequest: CreateCollectionRequest, _options?: Configuration): Promise; + /** + * Version: 9.2.0.cl or later Allows you to connect a ThoughtSpot instance to a Git repository. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance on your instance, the `CAN_SETUP_VERSION_CONTROL` (**Can set up version control**) privilege. You can use this API endpoint to connect your ThoughtSpot development and production environments to the development and production branches of a Git repository. Before using this endpoint to connect your ThoughtSpot instance to a Git repository, check the following prerequisites: * You have a Git repository. If you are using GitHub, make sure you have a valid account and an access token to connect ThoughtSpot to GitHub. For information about generating a token, see [GitHub Documentation](https://docs.github.com/en/authentication/keeping-your-account-and-data-secure/managing-your-personal-access-tokens). * Your access token has `repo` scope that grants full access to public and private repositories. * Your Git repository has a branch that can be configured as a default branch in ThoughtSpot. For more information, see [Git integration documentation](https://developers.thoughtspot.com/docs/?pageid=git-integration). **Note**: ThoughtSpot supports only GitHub / itHub Enterprise for CI/CD. + * @param createConfigRequest + */ + createConfig(createConfigRequest: CreateConfigRequest, _options?: Configuration): Promise; + /** + * Version: 9.2.0.cl or later Creates a connection to a data warehouse for live query services. Requires `DATAMANAGEMENT` (**Can manage data**) or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) privilege is required. #### Create a connection without tables To create a connection without tables: 1. Pass these parameters in your API request. * Name of the connection. * Type of the data warehouse to connect to. * A JSON map of configuration attributes in `data_warehouse_config`. The following example shows the configuration attributes for a SnowFlake connection: ``` { \"configuration\":{ \"accountName\":\"thoughtspot_partner\", \"user\":\"tsadmin\", \"password\":\"TestConn123\", \"role\":\"sysadmin\", \"warehouse\":\"MEDIUM_WH\" }, \"authenticationType\": \"SERVICE_ACCOUNT\", \"externalDatabases\":[ ] } ``` 2. Set `validate` to `false`. **NOTE:** If the `authentication_type` is anything other than SERVICE_ACCOUNT, you must explicitly provide the authenticationType property in the payload. If you do not specify authenticationType, the API will default to SERVICE_ACCOUNT as the authentication type. #### Create a connection with tables If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) and `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` (**Can manage data models**) privilege is required. To create a connection with tables: 1. Pass these parameters in your API request. * Name of the connection. * Type of the data warehouse to connect to. * A JSON map of configuration attributes, database details, and table properties in `data_warehouse_config` as shown in the following example: ``` { \"configuration\":{ \"accountName\":\"thoughtspot_partner\", \"user\":\"tsadmin\", \"password\":\"TestConn123\", \"role\":\"sysadmin\", \"warehouse\":\"MEDIUM_WH\" }, \"authenticationType\": \"SERVICE_ACCOUNT\", \"externalDatabases\":[ { \"name\":\"AllDatatypes\", \"isAutoCreated\":false, \"schemas\":[ { \"name\":\"alldatatypes\", \"tables\":[ { \"name\":\"allDatatypes\", \"type\":\"TABLE\", \"description\":\"\", \"selected\":true, \"linked\":true, \"columns\":[ { \"name\":\"CNUMBER\", \"type\":\"INT64\", \"canImport\":true, \"selected\":true, \"isLinkedActive\":true, \"isImported\":false, \"tableName\":\"allDatatypes\", \"schemaName\":\"alldatatypes\", \"dbName\":\"AllDatatypes\" }, { \"name\":\"CDECIMAL\", \"type\":\"INT64\", \"canImport\":true, \"selected\":true, \"isLinkedActive\":true, \"isImported\":false, \"tableName\":\"allDatatypes\", \"schemaName\":\"alldatatypes\", \"dbName\":\"AllDatatypes\" } ] } ] } ] } ] } ``` 2. Set `validate` to `true`. **NOTE:** If the `authentication_type` is anything other than SERVICE_ACCOUNT, you must explicitly provide the authenticationType property in the payload. If you do not specify authenticationType, the API will default to SERVICE_ACCOUNT as the authentication type. + * @param createConnectionRequest + */ + createConnection(createConnectionRequest: CreateConnectionRequest, _options?: Configuration): Promise; + /** + * Version: 10.12.0.cl or later Creates an additional configuration to an existing connection to a data warehouse. Requires `DATAMANAGEMENT` (**Can manage data**) or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) privilege is required. #### Usage guidelines * A JSON map of configuration attributes in `configuration`. The following example shows the configuration attributes: ``` { \"user\":\"DEV_USER\", \"password\":\"TestConn123\", \"role\":\"DEV\", \"warehouse\":\"DEV_WH\" } ``` * If the `policy_type` is `PRINCIPALS`, then `policy_principals` is a required field. * If the `policy_type` is `PROCESSES`, then `policy_processes` is a required field. * If the `policy_type` is `NO_POLICY`, then `policy_principals` and `policy_processes` are not required fields. #### Parameterized Connection Support For parameterized connections that use OAuth authentication, only the same_as_parent and policy_process_options attributes are allowed in the API request. These attributes are not applicable to connections that are not parameterized. + * @param createConnectionConfigurationRequest + */ + createConnectionConfiguration(createConnectionConfigurationRequest: CreateConnectionConfigurationRequest, _options?: Configuration): Promise; + /** + * Version: 10.4.0.cl or later Creates a new conversation session tied to a specific data model for AI-driven natural language querying. Requires `CAN_USE_SPOTTER` privilege and at least view access to the metadata object specified in the request. #### Usage guidelines The request must include: - `metadata_identifier`: the unique ID of the data source that provides context for the conversation Optionally, you can provide: - `tokens`: a token string to set initial context for the conversation (e.g., `\"[sales],[item type],[state]\"`) If the request is successful, ThoughtSpot returns a unique `conversation_identifier` that must be passed to `sendMessage` to continue the conversation. #### Error responses | Code | Description | |------|-------------| | 401 | Unauthorized — authentication token is missing, expired, or invalid. | | 403 | Forbidden — the authenticated user does not have `CAN_USE_SPOTTER` privilege or lacks view permission on the specified metadata object. | > ###### Note: > * This endpoint is currently in Beta. Breaking changes may be introduced before the endpoint is made Generally Available. > * This endpoint requires Spotter - please contact ThoughtSpot support to enable Spotter on your cluster. + * @param createConversationRequest + */ + createConversation(createConversationRequest: CreateConversationRequest, _options?: Configuration): Promise; + /** + * Version: 9.6.0.cl or later Creates a custom action that appears as a menu action on a saved Answer or Liveboard visualization. Requires `DEVELOPER` (**Has Developer privilege**) or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `DEVELOPER` (**Has developer privilege**) privilege is required. #### Usage Guidelines The API lets you create the following types of custom actions: * URL-based action Allows pushing data to an external URL. * Callback action Triggers a callback to the host application and initiates a response payload on an embedded ThoughtSpot instance. By default, custom actions are visible to only administrator or developer users. To make a custom action available to other users, and specify the groups in `group_identifiers`. By default, the custom action is set as a _global_ action on all visualizations and saved Answers. To assign a custom action to specific Liveboard visualization, saved Answer, or Worksheet, set `visibility` to `false` in `default_action_config` property and specify the GUID or name of the object in `associate_metadata`. For more information, see [Custom actions](https://developers.thoughtspot.com/docs/custom-action-intro). + * @param createCustomActionRequest + */ + createCustomAction(createCustomActionRequest: CreateCustomActionRequest, _options?: Configuration): Promise; + /** + * Version: 10.10.0.cl or later Creates a customization configuration for the notification email. #### Pre-requisites Requires `DEVELOPER` (**has developer privilege**) or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `DEVELOPER` (**Has developer privilege**) privilege is required. **NOTE**:This endpoint in currently in beta. Contact ThoughtSpot support to enable this on your instance. #### Usage guidelines To create a custom configuration pass these parameters in your API request: - A JSON map of configuration attributes `template_properties`. The following example shows a sample set of customization configuration: ``` { { \"cta_button_bg_color\": \"#444DEA\", \"cta_text_font_color\": \"#FFFFFF\", \"primary_bg_color\": \"#D3DEF0\", \"logo_url\": \"https://storage.pardot.com/710713/1642089901EbkRibJq/TS_fullworkmark_darkmode.png\", \"font_family\": \"\", \"product_name\": \"ThoughtSpot\", \"footer_address\": \"444 Castro St, Suite 1000 Mountain View, CA 94041\", \"footer_phone\": \"(800) 508-7008\", \"replacement_value_for_liveboard\": \"Dashboard\", \"replacement_value_for_answer\": \"Chart\", \"replacement_value_for_spot_iq\": \"AI Insights\", \"hide_footer_phone\": false, \"hide_footer_address\": false, \"hide_product_name\": false, \"hide_manage_notification\": false, \"hide_mobile_app_nudge\": false, \"hide_privacy_policy\": false, \"hide_ts_vocabulary_definitions\": false, \"hide_error_message\": false, \"hide_unsubscribe_link\": false, \"hide_notification_status\": false, \"hide_modify_alert\": false, \"company_website_url\": \"https://your-website.com/\", \"company_privacy_policy_url\" : \"https://link-to-privacy-policy.com/\", \"contact_support_url\": \"https://link-to-contact-support.com/\", \"hide_contact_support_url\": false, \"hide_logo_url\" : false } } ``` + * @param createEmailCustomizationRequest + */ + createEmailCustomization(createEmailCustomizationRequest: CreateEmailCustomizationRequest, _options?: Configuration): Promise; + /** + * Version: 9.0.0.cl or later Creates an Org object. To use this API, the [Orgs](https://docs.thoughtspot.com/cloud/latest/orgs-overview) feature must be enabled in your cluster. Requires cluster administration (**Can administer Org**) privileges. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `ORG_ADMINISTRATION` (**Can manage Orgs**) privilege is required. + * @param createOrgRequest + */ + createOrg(createOrgRequest: CreateOrgRequest, _options?: Configuration): Promise; + /** + * Version: 9.5.0.cl or later Creates a Role object in ThoughtSpot. Available only if [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance. To create a Role, the `ROLE_ADMINISTRATION` (**Can manage roles**) privilege is required. + * @param createRoleRequest + */ + createRole(createRoleRequest: CreateRoleRequest, _options?: Configuration): Promise; + /** + * Create schedule. Version: 9.4.0.cl or later Creates a Liveboard schedule job. Requires at least edit access to Liveboards. To create a schedule on behalf of another user, you need `ADMINISTRATION` (**Can administer Org**) or `JOBSCHEDULING` (**Can schedule for others**) privilege and edit access to the Liveboard. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `JOBSCHEDULING` (**Can schedule for others**) privilege is required. #### Usage guidelines * The description text is mandatory. The description text appears as **Description: ** in the Liveboard schedule email notifications. * For Liveboards with both charts and tables, schedule creation is only supported in PDF and XLS formats. Schedules created in CSV formats for such Liveboards will fail to run. If `PDF` is set as the `file_format`, enable `pdf_options` to get the correct attachment. Not doing so may cause the attachment to be rendered empty. * To include only specific visualizations, specify the visualization GUIDs in the `visualization_identifiers` array. * You can schedule a Liveboard job to run periodically by setting frequency parameters. You can set the schedule to run daily, weekly, monthly or every n minutes or hours. The scheduled job can also be configured to run at a specific time of the day or on specific days of the week or month. Please ensure that when setting the schedule frequency for _minute of the object_, only values that are multiples of 5 are included. * If the `frequency` parameters are defined, you can set the time zone to a value that matches your server\'s time zone. For example, `US/Central`, `Etc/UTC`, `CET`. The default time zone is `America/Los_Angeles`. For more information about Liveboard jobs, see [ThoughtSpot Product Documentation](https://docs.thoughtspot.com/cloud/latest/liveboard-schedule). + * @param createScheduleRequest + */ + createSchedule(createScheduleRequest: CreateScheduleRequest, _options?: Configuration): Promise; + /** + * Version: 9.0.0.cl or later Creates a tag object. Tags are labels that identify a metadata object. For example, you can create a tag to designate subject areas, such as sales, HR, marketing, and finance. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `TAGMANAGEMENT` (**Can manage tags**) privilege is required to create, edit, and delete tags. + * @param createTagRequest + */ + createTag(createTagRequest: CreateTagRequest, _options?: Configuration): Promise; + /** + * Version: 9.0.0.cl or later Creates a user in ThoughtSpot. The API endpoint allows you to configure several user properties such as email address, account status, share notification preferences, and sharing visibility. You can provision the user to [groups](https://docs.thoughtspot.com/cloud/latest/groups-privileges) and [Orgs](https://docs.thoughtspot.com/cloud/latest/orgs-overview). You can also add Liveboard, Answer, and Worksheet objects to the user’s favorites list, assign a default Liveboard for the user, and set user preferences. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `USER_ADMINISTRATION` (**Can manage users**) privilege is required. + * @param createUserRequest + */ + createUser(createUserRequest: CreateUserRequest, _options?: Configuration): Promise; + /** + * Version: 9.0.0.cl or later Creates a group object in ThoughtSpot. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `GROUP_ADMINISTRATION` (**Can manage groups**) privilege is required. #### About groups Groups in ThoughtSpot are used by the administrators to define privileges and organize users based on their roles and access requirements. To know more about groups and privileges, see [ThoughtSpot Product Documentation](https://docs.thoughtspot.com/cloud/latest/groups-privileges). #### Supported operations The API endpoint lets you perform the following operations: * Assign privileges * Add users * Define sharing visibility * Add sub-groups * Assign a default Liveboard + * @param createUserGroupRequest + */ + createUserGroup(createUserGroupRequest: CreateUserGroupRequest, _options?: Configuration): Promise; + /** + * Create a variable which can be used for parameterizing metadata objects Version: 26.4.0.cl or later Allows creating a variable which can be used for parameterizing metadata objects in ThoughtSpot. Requires ADMINISTRATION role and TENANT scope. The CAN_MANAGE_VARIABLES permission allows you to manage Formula Variables in the current organization scope. The API endpoint supports the following types of variables: * CONNECTION_PROPERTY - For connection properties * TABLE_MAPPING - For table mappings * CONNECTION_PROPERTY_PER_PRINCIPAL - For connection properties per principal. In order to use this please contact support to enable this. * FORMULA_VARIABLE - For Formula variables, introduced in 10.15.0.cl When creating a variable, you need to specify: * The variable type * A unique name for the variable * Whether the variable contains sensitive values (defaults to false) * The data type of the variable, only specify for formula variables (defaults to null) The operation will fail if: * The user lacks required permissions * The variable name already exists * The variable type is invalid + * @param createVariableRequest + */ + createVariable(createVariableRequest: CreateVariableRequest, _options?: Configuration): Promise; + /** + * Version: 10.14.0.cl or later Creates a new webhook configuration to receive notifications for specified events. The webhook will be triggered when the configured events occur in the system. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) or `DEVELOPER` (**Has developer privilege**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, users with `CAN_MANAGE_WEBHOOKS` (**Can manage webhooks**) privilege are also authorized to perform this action. + * @param createWebhookConfigurationRequest + */ + createWebhookConfiguration(createWebhookConfigurationRequest: CreateWebhookConfigurationRequest, _options?: Configuration): Promise; + /** + * Version: 9.9.0.cl or later Creates a DBT connection object in ThoughtSpot. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege or `DATAMANAGEMENT` (**Can manage data**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the following Data control privileges may be required: - `CAN_MANAGE_CUSTOM_CALENDAR`(**Can manage custom calendars**) - `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) - `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` (**Can manage data models**) #### About create DBT connection DBT connection in ThoughtSpot is used by the user to define DBT credentials for cloud . The API needs embrace connection, embrace database name, DBT url, import type, DBT account identifier, DBT project identifier, DBT access token and environment details (or) embrace connection, embrace database name, import type, file_content to create a connection object. To know more about DBT, see ThoughtSpot Product Documentation. + * @param connectionName Name of the connection. + * @param databaseName Name of the Database. + * @param importType Mention type of Import + * @param accessToken Access token is mandatory when Import_Type is DBT_CLOUD. + * @param dbtUrl DBT URL is mandatory when Import_Type is DBT_CLOUD. + * @param accountId Account ID is mandatory when Import_Type is DBT_CLOUD + * @param projectId Project ID is mandatory when Import_Type is DBT_CLOUD + * @param dbtEnvId DBT Environment ID\\\" + * @param projectName Name of the project + * @param fileContent Upload DBT Manifest and Catalog artifact files as a ZIP file. This field is Mandatory when Import Type is \\\'ZIP_FILE\\\' + */ + dbtConnection(connectionName: string, databaseName: string, importType?: string, accessToken?: string, dbtUrl?: string, accountId?: string, projectId?: string, dbtEnvId?: string, projectName?: string, fileContent?: HttpFile, _options?: Configuration): Promise; + /** + * Version: 9.9.0.cl or later Resynchronize the existing list of models, tables, worksheet tml’s and import them to Thoughtspot based on the DBT connection object. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege or `DATAMANAGEMENT` (**Can manage data**) privilege, along with an existing DBT connection. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the following data control privileges may be required: - `CAN_MANAGE_CUSTOM_CALENDAR`(**Can manage custom calendars**) - `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) - `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` (**Can manage data models**) + * @param dbtConnectionIdentifier Unique ID of the DBT connection. + * @param fileContent Upload DBT Manifest and Catalog artifact files as a ZIP file. This field is mandatory if the connection was created with import_type ‘ZIP_FILE’ + */ + dbtGenerateSyncTml(dbtConnectionIdentifier: string, fileContent?: HttpFile, _options?: Configuration): Promise; + /** + * Version: 9.9.0.cl or later Generate required table and worksheet and import them. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege or `DATAMANAGEMENT` (**Can manage data**) privilege, along with an existing DBT connection. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the following data control privileges may be required: - `CAN_MANAGE_CUSTOM_CALENDAR`(**Can manage custom calendars**) - `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) - `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` (**Can manage data models**) #### About generate TML Models and Worksheets to be imported can be selected by the user as part of the API. + * @param dbtConnectionIdentifier Unique ID of the DBT connection. + * @param modelTables List of Models and their respective Tables Example: \\\'[{\\\"model_name\\\": \\\"model_name\\\", \\\"tables\\\": [\\\"table_name\\\"]}]\\\' + * @param importWorksheets Mention the worksheet tmls to import + * @param worksheets List of worksheets is mandatory when import_Worksheets is type SELECTED Example: [\\\"worksheet_name\\\"] + * @param fileContent Upload DBT Manifest and Catalog artifact files as a ZIP file. This field is mandatory if the connection was created with import_type ‘ZIP_FILE’ + */ + dbtGenerateTml(dbtConnectionIdentifier: string, modelTables: string, importWorksheets: string, worksheets?: string, fileContent?: HttpFile, _options?: Configuration): Promise; + /** + * Version: 9.9.0.cl or later Gets a list of DBT connection objects by user and organization, available on the ThoughtSpot system. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege or `DATAMANAGEMENT` (**Can manage data**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the following Data control privileges may be required: - `CAN_MANAGE_CUSTOM_CALENDAR`(**Can manage custom calendars**) - `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) - `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` (**Can manage data models**) #### About search DBT connection To get details of a specific DBT connection identifier, database connection identifier, database connection name, database name, project name, project identifier, environment identifier , import type and author. + */ + dbtSearch(_options?: Configuration): Promise; + /** + * Version: 9.7.0.cl or later Deactivates a user account. Requires `ADMINISTRATION` (**Can administer Thoughtspot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `USER_ADMINISTRATION` (**Can manage users**) privilege is required. To deactivate a user account, the API request body must include the following information: - Username or the GUID of the user account - Base URL of the ThoughtSpot instance If the API request is successful, ThoughtSpot returns the activation URL in the response. The activation URL is valid for 14 days and can be used to re-activate the account and reset the password of the deactivated account. + * @param deactivateUserRequest + */ + deactivateUser(deactivateUserRequest: DeactivateUserRequest, _options?: Configuration): Promise; + /** + * Version: 10.12.0.cl or later Deletes a [custom calendar](https://docs.thoughtspot.com/cloud/latest/connections-cust-cal). Requires `DATAMANAGEMENT` (**Can manage data**) or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your ThoughtSpot instance, the `CAN_MANAGE_CUSTOM_CALENDAR` (**Can manage custom calendars**) privilege is required. #### Usage guidelines To delete a custom calendar, specify the calendar ID as a path parameter in the request URL. + * @param calendarIdentifier Unique ID or name of the Calendar. + */ + deleteCalendar(calendarIdentifier: string, _options?: Configuration): Promise; + /** + * Version: 26.4.0.cl or later Deletes one or more collections from ThoughtSpot. #### Delete options * **delete_children**: When set to `true`, deletes the child objects (metadata items) within the collection that the user has access to. Objects that the user does not have permission to delete will be skipped. * **dry_run**: When set to `true`, performs a preview of the deletion operation without actually deleting anything. The response shows what would be deleted, allowing you to review before committing the deletion. #### Response The response includes: * **metadata_deleted**: List of metadata objects that were successfully deleted * **metadata_skipped**: List of metadata objects that were skipped due to lack of permissions or other constraints + * @param deleteCollectionRequest + */ + deleteCollection(deleteCollectionRequest: DeleteCollectionRequest, _options?: Configuration): Promise; + /** + * Version: 9.2.0.cl or later Deletes Git repository configuration from your ThoughtSpot instance. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance on your instance, the `CAN_SETUP_VERSION_CONTROL` (**Can set up version control**) privilege. + * @param deleteConfigRequest + */ + deleteConfig(deleteConfigRequest: DeleteConfigRequest, _options?: Configuration): Promise; + /** + * Version: 9.2.0.cl or later **Important**: This endpoint is deprecated and will be removed from ThoughtSpot in September 2025. ThoughtSpot strongly recommends using the [Delete Connection V2](#/http/api-endpoints/connections/delete-connection-v2) endpoint to delete your connection objects. #### Usage guidelines Deletes a connection object. Requires `DATAMANAGEMENT` (**Can manage data**) and edit permissions to the connection object, or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) privilege is required. **Note**: If a connection has dependent objects, make sure you remove its associations before the delete operation. + * @param deleteConnectionRequest + */ + deleteConnection(deleteConnectionRequest: DeleteConnectionRequest, _options?: Configuration): Promise; + /** + * Version: 10.12.0.cl or later Deletes connection configuration objects. Requires `DATAMANAGEMENT` (**Can manage data**) and edit permissions to the connection object, or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) privilege is required. + * @param deleteConnectionConfigurationRequest + */ + deleteConnectionConfiguration(deleteConnectionConfigurationRequest: DeleteConnectionConfigurationRequest, _options?: Configuration): Promise; + /** + * Version: 10.4.0.cl or later Deletes a connection object. **Note**: If a connection has dependent objects, make sure you remove its associations before the delete operation. Requires `DATAMANAGEMENT` (**Can manage data**) and edit permissions to the connection object, or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) privilege is required. + * @param connectionIdentifier Unique ID or name of the connection. + */ + deleteConnectionV2(connectionIdentifier: string, _options?: Configuration): Promise; + /** + * Version: 9.6.0.cl or later Removes the custom action specified in the API request. Requires `DEVELOPER` (**Has Developer privilege**) or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `DEVELOPER` (**Has developer privilege**) privilege is required. + * @param customActionIdentifier Unique ID or name of the custom action. + */ + deleteCustomAction(customActionIdentifier: string, _options?: Configuration): Promise; + /** + * Version: 9.9.0.cl or later Removes the specified DBT connection object from the ThoughtSpot system. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) or `DATAMANAGEMENT` (**Can manage data ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the following Data control privileges may be required: - `CAN_MANAGE_CUSTOM_CALENDAR`(**Can manage custom calendars**) - `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) - `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` (**Can manage data models**) + * @param dbtConnectionIdentifier Unique ID of the DBT Connection. + */ + deleteDbtConnection(dbtConnectionIdentifier: string, _options?: Configuration): Promise; + /** + * Version: 10.10.0.cl or later Deletes the configuration for the email customization. #### Pre-requisites Requires `DEVELOPER` (**has developer privilege**) or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `DEVELOPER` (**Has developer privilege**) privilege is required. **NOTE**:This endpoint in currently in beta. Contact ThoughtSpot support to enable this on your instance. #### Usage guidelines - Call the search API endpoint to get the `template_identifier` from the response. - Use that `template_identifier` as a parameter in this API request. + * @param templateIdentifier Unique ID or name of the email customization. + */ + deleteEmailCustomization(templateIdentifier: string, _options?: Configuration): Promise; + /** + * Version: 9.0.0.cl or later Removes the specified metadata object from the ThoughtSpot system. Requires edit access to the metadata object. + * @param deleteMetadataRequest + */ + deleteMetadata(deleteMetadataRequest: DeleteMetadataRequest, _options?: Configuration): Promise; + /** + * Version: 9.0.0.cl or later Deletes an Org object from the ThoughtSpot system. Requires cluster administration (**Can administer Org**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `ORG_ADMINISTRATION` (**Can manage Orgs**) privilege is required. When you delete an Org, all its users and objects created in that Org context are removed. However, if the users in the deleted Org also exists in other Orgs, they are removed only from the deleted Org. + * @param orgIdentifier ID or name of the Org + */ + deleteOrg(orgIdentifier: string, _options?: Configuration): Promise; + /** + * Version: 10.12.0.cl or later Deletes the configuration for the email customization. #### Pre-requisites Requires `DEVELOPER` (**has developer privilege**) or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `DEVELOPER` (**Has developer privilege**) privilege is required. **NOTE**:This endpoint in currently in beta. Contact ThoughtSpot support to enable this on your instance. #### Usage guidelines - Call the search API endpoint to get the `org_identifier` from the response. - Use that `org_identifier` as a parameter in this API request. + * @param deleteOrgEmailCustomizationRequest + */ + deleteOrgEmailCustomization(deleteOrgEmailCustomizationRequest: DeleteOrgEmailCustomizationRequest, _options?: Configuration): Promise; + /** + * Version: 9.5.0.cl or later Deletes a Role object from the ThoughtSpot system. Available only if [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance. To delete a Role, the `ROLE_ADMINISTRATION` (**Can manage roles**) privilege is required. + * @param roleIdentifier Unique ID or name of the Role. ReadOnly roles cannot be deleted. + */ + deleteRole(roleIdentifier: string, _options?: Configuration): Promise; + /** + * Deletes a scheduled job. Version: 9.4.0.cl or later Deletes a scheduled Liveboard job. Requires at least edit access to Liveboard or `ADMINISTRATION` (**Can administer Org**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `JOBSCHEDULING` (**Can schedule for others**) privilege is required. + * @param scheduleIdentifier Unique ID or name of the scheduled job. + */ + deleteSchedule(scheduleIdentifier: string, _options?: Configuration): Promise; + /** + * Version: 9.0.0.cl or later Deletes a tag object from the ThoughtSpot system Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `TAGMANAGEMENT` (**Can manage tags**) privilege is required to create, edit, and delete tags. + * @param tagIdentifier Tag identifier Tag name or Tag id. + */ + deleteTag(tagIdentifier: string, _options?: Configuration): Promise; + /** + * Version: 9.0.0.cl or later Deletes a user from the ThoughtSpot system. If you want to remove a user from a specific Org but not from ThoughtSpot, update the group and Org mapping properties of the user object via a POST API call to the [/api/rest/2.0/users/{user_identifier}/update](#/http/api-endpoints/users/update-user) endpoint. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `USER_ADMINISTRATION` (**Can manage users**) privilege is required. + * @param userIdentifier GUID / name of the user + */ + deleteUser(userIdentifier: string, _options?: Configuration): Promise; + /** + * Version: 9.0.0.cl or later Removes the specified group object from the ThoughtSpot system. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `GROUP_ADMINISTRATION` (**Can manage groups**) privilege is required. + * @param groupIdentifier GUID or name of the group. + */ + deleteUserGroup(groupIdentifier: string, _options?: Configuration): Promise; + /** + * Delete a variable Version: 10.14.0.cl or later **Note:** This API endpoint is deprecated and will be removed from ThoughtSpot in a future release. Use [POST /api/rest/2.0/template/variables/delete](/api/rest/2.0/template/variables/delete) instead. Allows deleting a variable from ThoughtSpot. Requires ADMINISTRATION role and TENANT scope. The CAN_MANAGE_VARIABLES permission allows you to manage Formula Variables in the current organization scope. The API endpoint requires: * The variable identifier (ID or name) The operation will fail if: * The user lacks required permissions * The variable doesn\'t exist * The variable is being used by other objects + * @param identifier Unique id or name of the variable + */ + deleteVariable(identifier: string, _options?: Configuration): Promise; + /** + * Delete variable(s) Version: 26.4.0.cl or later Allows deleting multiple variables from ThoughtSpot. Requires ADMINISTRATION role and TENANT scope. The CAN_MANAGE_VARIABLES permission allows you to manage Formula Variables in the current organization scope. The API endpoint requires: * The variable identifiers (IDs or names) The operation will fail if: * The user lacks required permissions * Any of the variables don\'t exist * Any of the variables are being used by other objects + * @param deleteVariablesRequest + */ + deleteVariables(deleteVariablesRequest: DeleteVariablesRequest, _options?: Configuration): Promise; + /** + * Version: 10.14.0.cl or later Deletes one or more webhook configurations by their unique id or name. Returns status of each deletion operation, including successfully deleted webhooks and any failures with error details. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) or `DEVELOPER` (**Has developer privilege**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, users with `CAN_MANAGE_WEBHOOKS` (**Can manage webhooks**) privilege are also authorized to perform this action. + * @param deleteWebhookConfigurationsRequest + */ + deleteWebhookConfigurations(deleteWebhookConfigurationsRequest: DeleteWebhookConfigurationsRequest, _options?: Configuration): Promise; + /** + * Version: 9.2.0.cl or later Allows you to deploy a commit and publish TML content to your ThoughtSpot instance. Requires at least edit access to the objects used in the deploy operation. The API deploys the head of the branch unless a `commit_id` is specified in the API request. If the branch name is not defined in the request, the default branch is considered for deploying commits. For more information, see [Git integration documentation](https://developers.thoughtspot.com/docs/git-integration). + * @param deployCommitRequest + */ + deployCommit(deployCommitRequest: DeployCommitRequest, _options?: Configuration): Promise; + /** + * Version: 9.9.0.cl or later Exports the difference in connection metadata between CDW and ThoughtSpot Requires `DATAMANAGEMENT` (**Can manage data**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the following Data control privileges may be required: - `CAN_MANAGE_CUSTOM_CALENDAR`(**Can manage custom calendars**) - `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) - `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` (**Can manage data models**) To download the connection metadata difference between ThoughtSpot and CDW, pass the connection GUID as `connection_identifier` in the API request. + * @param connectionIdentifier GUID of the connection + */ + downloadConnectionMetadataChanges(connectionIdentifier: string, _options?: Configuration): Promise; + /** + * Version: 9.0.0.cl or later Exports an Answer in the given file format. You can download the Answer data as a PDF, PNG, CSV, or XLSX file. Requires at least view access to the Answer. #### Usage guidelines In the request body, specify the GUID or name of the Answer and set `file_format`. The default file format is CSV. Use the `type` parameter to specify whether the Answer being exported is a saved Answer (`SAVED`) or a pinned Answer on a Liveboard (`PINNED`). Defaults to `SAVED`. When using `PINNED`, the `metadata_identifier` must be the container id. **NOTE**: * The downloadable file returned in API response file is extensionless. Please rename the downloaded file by typing in the relevant extension. * HTML rendering is not supported for PDF exports of Answers with tables. Optionally, you can define [runtime overrides](https://developers.thoughtspot.com/docs/fetch-data-and-report-apis#_runtime_overrides) to apply to the Answer data. + * @param exportAnswerReportRequest + */ + exportAnswerReport(exportAnswerReportRequest: ExportAnswerReportRequest, _options?: Configuration): Promise; + /** + * Version: 9.0.0.cl or later Exports a Liveboard and its visualizations in PDF, PNG, CSV, or XLSX file format. The default `file_format` is CSV. Requires at least view access to the Liveboard. #### Usage guidelines In the request body, specify the GUID or name of the Liveboard. To generate a Liveboard report with specific visualizations, add GUIDs or names of the visualizations. **NOTE**: * The downloadable file returned in API response file is extensionless. Please rename the downloaded file by typing in the relevant extension. * Optionally, you can define [runtime overrides](https://developers.thoughtspot.com/docs/fetch-data-and-report-apis#_runtime_overrides) to apply to the Answer data. * To include unsaved changes in the report, pass the `transient_pinboard_content` script generated from the `getExportRequestForCurrentPinboard` method in the Visual Embed SDK. Upon successful execution, the API returns the report with unsaved changes, including ad hoc changes to visualizations. For more information, see [Liveboard Report API](https://developers.thoughtspot.com/docs/fetch-data-and-report-apis#_liveboard_report_api). * Starting with ThoughtSpot Cloud 10.9.0.cl release, the Liveboard can be exported in the PNG format in the resolution of your choice. To enable this on your instance, contact ThoughtSpot support. When this feature is enabled, the options `include_cover_page`,`include_filter_page` within the `png_options` will not be available for PNG exports. * Starting with the ThoughtSpot Cloud 26.2.0.cl release, * Liveboards can be exported in CSV format. * All visualizations within a Liveboard can be exported as individual CSV files. * When exporting multiple visualizations or the entire Liveboard, the system returns the report as a compressed ZIP file containing the separate CSV files for each visualization. * Liveboards can also be exported in XLSX format. * All selected visualizations are consolidated into a single Excel workbook (.xlsx), with each visualization placed in its own worksheet (tab). * XLSX exports are limited to a maximum of 255 worksheets (tabs) per workbook. + * @param exportLiveboardReportRequest + */ + exportLiveboardReport(exportLiveboardReportRequest: ExportLiveboardReportRequest, _options?: Configuration): Promise; + /** + * Version: 9.0.0.cl or later Exports the [TML](https://docs.thoughtspot.com/cloud/latest/tml) representation of metadata objects in JSON or YAML format. Requires `DATADOWNLOADING` (**Can download Data**) and at least view access to the metadata object. #### Usage guidelines * You can export one or several objects by passing metadata object GUIDs in the `metadata` array. * When exporting TML content for a Liveboard or Answer object, you can set `export_associated` to `true` to retrieve TML content for underlying Worksheets, Tables, or Views, including the GUID of each object within the headers. When `export_associated` is set to `true`, consider retrieving one metadata object at a time. * Set `export_fqns` to `true` to add FQNs of the referenced objects in the TML content. For example, if you send an API request to retrieve TML for a Liveboard and its associated objects, the API returns the TML content with FQNs of the referenced Worksheet. Exporting TML with FQNs is useful if ThoughtSpot has multiple objects with the same name and you want to eliminate ambiguity when importing TML files into ThoughtSpot. It eliminates the need for adding FQNs of the referenced objects manually during the import operation. * To export only the TML of feedbacks associated with an object, set the GUID of the object as `identifier`, and set the `type` as `FEEDBACK` in the `metadata` array. * To export the TML of an object along with the feedbacks associated with it, set the GUID of the object as `identifier`, set the `type` as `LOGIAL_TABLE` in the `metadata` array, and set `export_with_associated_feedbacks` in `export_options` to true. For more information, see [TML Documentation](https://developers.thoughtspot.com/docs/tml#_export_a_tml). For more information on feedbacks, see [Feedback Documentation](https://docs.thoughtspot.com/cloud/latest/sage-feedback). + * @param exportMetadataTMLRequest + */ + exportMetadataTML(exportMetadataTMLRequest: ExportMetadataTMLRequest, _options?: Configuration): Promise; + /** + * Version: 10.1.0.cl or later Exports the [TML](https://docs.thoughtspot.com/cloud/latest/tml) representation of metadata objects in JSON or YAML format. ### **Permissions Required** Requires `DATAMANAGEMENT` (**Can manage data**) and `USERMANAGEMENT` (**Can manage users**) privileges. #### **Usage Guidelines** This API is only applicable for `USER`, `GROUP`, and `ROLES` metadata types. - `batch_offset` Indicates the starting position within the complete dataset from which the API should begin returning objects. Useful for paginating results efficiently. - `batch_size` Specifies the number of objects or items to retrieve in a single request. Helps control response size for better performance. - `edoc_format` Defines the format of the TML content. The exported metadata can be in JSON or YAML format. - `export_dependent` Specifies whether to include dependent metadata objects in the export. Ensures related objects are also retrieved if needed. - `all_orgs_override` Indicates whether the export operation applies across all organizations. Useful for multi-tenant environments where cross-org exports are required. + * @param exportMetadataTMLBatchedRequest + */ + exportMetadataTMLBatched(exportMetadataTMLBatchedRequest: ExportMetadataTMLBatchedRequest, _options?: Configuration): Promise; + /** + * Version: 9.0.0.cl or later Fetches data from a saved Answer. Requires at least view access to the saved Answer. The `record_size` attribute determines the number of records to retrieve in an API call. For more information about pagination, record size, and maximum row limit, see [Pagination and record size settings](https://developers.thoughtspot.com/docs/fetch-data-and-report-apis#_pagination_settings_for_data_and_report_apis). + * @param fetchAnswerDataRequest + */ + fetchAnswerData(fetchAnswerDataRequest: FetchAnswerDataRequest, _options?: Configuration): Promise; + /** + * Version: 9.0.0.cl or later Fetches the underlying SQL query data for an Answer object. Requires at least view access to the Answer object. Upon successful execution, the API returns the SQL queries for the specified object as shown in this example: ``` { \"metadata_id\":\"8fbe44a8-46ad-4b16-8d39-184b2fada490\", \"metadata_name\":\"Total sales\", \"metadata_type\":\"ANSWER\", \"sql_queries\":[ { \"metadata_id\":\"8fbe44a8-46ad-4b16-8d39-184b2fada490\", \"metadata_name\":\"Total sales -test\", \"sql_query\":\"SELECT \\n \\\"ta_1\\\".\\\"REGION\\\" \\\"ca_1\\\", \\n \\\"ta_2\\\".\\\"PRODUCTNAME\\\" \\\"ca_2\\\", \\n \\\"ta_1\\\".\\\"STORENAME\\\" \\\"ca_3\\\", \\n CASE\\n WHEN sum(\\\"ta_3\\\".\\\"SALES\\\") IS NOT NULL THEN sum(\\\"ta_3\\\".\\\"SALES\\\")\\n ELSE 0\\n END \\\"ca_4\\\", \\n CASE\\n WHEN sum(\\\"ta_3\\\".\\\"QUANTITYPURCHASED\\\") IS NOT NULL THEN sum(\\\"ta_3\\\".\\\"QUANTITYPURCHASED\\\")\\n ELSE 0\\n END \\\"ca_5\\\"\\nFROM \\\"RETAILAPPAREL\\\".\\\"PUBLIC\\\".\\\"FACT_RETAPP_SALES\\\" \\\"ta_3\\\"\\n JOIN \\\"RETAILAPPAREL\\\".\\\"PUBLIC\\\".\\\"DIM_RETAPP_STORES\\\" \\\"ta_1\\\"\\n ON \\\"ta_3\\\".\\\"STOREID\\\" = \\\"ta_1\\\".\\\"STOREID\\\"\\n JOIN \\\"RETAILAPPAREL\\\".\\\"PUBLIC\\\".\\\"DIM_RETAPP_PRODUCTS\\\" \\\"ta_2\\\"\\n ON \\\"ta_3\\\".\\\"PRODUCTID\\\" = \\\"ta_2\\\".\\\"PRODUCTID\\\"\\nGROUP BY \\n \\\"ca_1\\\", \\n \\\"ca_2\\\", \\n \\\"ca_3\\\"\\n\" } ] } ``` + * @param fetchAnswerSqlQueryRequest + */ + fetchAnswerSqlQuery(fetchAnswerSqlQueryRequest: FetchAnswerSqlQueryRequest, _options?: Configuration): Promise; + /** + * Version: 10.4.0.cl or later Gets information about the status of the TML async import task scheduled using the `/api/rest/2.0/metadata/tml/async/import` API call. To fetch the task details, specify the ID of the TML async import task. Requires access to the task ID. The API allows users who initiated the asynchronous TML import via `/api/rest/2.0/metadata/tml/async/import` to view the status of their tasks. Users with administration privilege can view the status of all import tasks initiated by the users in their Org. #### Usage guidelines See [TML API Documentation](https://developers.thoughtspot.com/docs/tml#_fetch_status_of_the_tml_import_task) for usage guidelines. + * @param fetchAsyncImportTaskStatusRequest + */ + fetchAsyncImportTaskStatus(fetchAsyncImportTaskStatusRequest: FetchAsyncImportTaskStatusRequest, _options?: Configuration): Promise; + /** + * Version: 10.12.0.cl or later Fetches column security rules for specified tables. This API endpoint retrieves column-level security rules configured for tables. It returns information about which columns are secured and which groups have access to those columns. #### Usage guidelines - Provide an array of table identifiers using either `identifier` (GUID or name) or `obj_identifier` (object ID) - At least one of `identifier` or `obj_identifier` must be provided for each table - The API returns column security rules for all specified tables - Users must have appropriate permissions to access security rules for the specified tables #### Required permissions - `ADMINISTRATION` - Can administer ThoughtSpot - `DATAMANAGEMENT` - Can manage data - `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` - Can manage worksheet views and tables #### Example request ```json { \"tables\": [ { \"identifier\": \"table-guid\", \"obj_identifier\": \"table-object-id\" } ] } ``` #### Response format The API returns an array of `ColumnSecurityRuleResponse` objects wrapped in a `data` field. Each `ColumnSecurityRuleResponse` object contains: - Table information (GUID and object ID) - Array of column security rules with column details, group access, and source table information #### Example response ```json { \"data\": [ { \"guid\": \"table-guid\", \"objId\": \"table-object-id\", \"columnSecurityRules\": [ { \"column\": { \"id\": \"col_123\", \"name\": \"Salary\" }, \"groups\": [ { \"id\": \"group_1\", \"name\": \"HR Department\" } ], \"sourceTableDetails\": { \"id\": \"source-table-guid\", \"name\": \"Employee_Data\" } } ] } ] } ``` + * @param fetchColumnSecurityRulesRequest + */ + fetchColumnSecurityRules(fetchColumnSecurityRulesRequest: FetchColumnSecurityRulesRequest, _options?: Configuration): Promise; + /** + * Version: 9.9.0.cl or later Validates the difference in connection metadata between CDW and ThoughtSpot. Requires `DATAMANAGEMENT` (**Can manage data**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the following Data control privileges may be required: - `CAN_MANAGE_CUSTOM_CALENDAR`(**Can manage custom calendars**) - `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) - `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` (**Can manage data models**) Returns a boolean indicating whether there is any difference between the connection metadata at ThoughtSpot and CDW. To get the connection metadata difference status, pass the connection GUID as `connection_identifier` in the API request. + * @param connectionIdentifier GUID of the connection + */ + fetchConnectionDiffStatus(connectionIdentifier: string, _options?: Configuration): Promise; + /** + * Version: 9.0.0.cl or later Gets data from a Liveboard object and its visualization. Requires at least view access to the Liveboard. #### Usage guidelines In the request body, specify the GUID or name of the Liveboard. To get data for specific visualizations, add the GUIDs or names of the visualizations in the API request. To include unsaved changes in the report, pass the `transient_pinboard_content` script generated from the `getExportRequestForCurrentPinboard` method in the Visual Embed SDK. Upon successful execution, the API returns the report with unsaved changes. If the new Liveboard experience mode, the transient content includes ad hoc changes to visualizations such as sorting, toggling of legends, and data drill down. For more information, and see [Liveboard data API](https://developers.thoughtspot.com/docs/fetch-data-and-report-apis#_fetch_liveboard_data_api). + * @param fetchLiveboardDataRequest + */ + fetchLiveboardData(fetchLiveboardDataRequest: FetchLiveboardDataRequest, _options?: Configuration): Promise; + /** + * Version: 9.0.0.cl or later Fetches the underlying SQL query data for a Liveboard object and its visualizations. Requires at least view access to the Liveboard object. To get SQL query data for a Liveboard, specify the GUID of the Liveboard. Optionally, you can add an array of visualization GUIDs to retrieve the SQL query data for visualizations in the Liveboard. Upon successful execution, the API returns the SQL queries for the specified object as shown in this example: ``` { \"metadata_id\": \"fa68ae91-7588-4136-bacd-d71fb12dda69\", \"metadata_name\": \"Total Sales\", \"metadata_type\": \"LIVEBOARD\", \"sql_queries\": [ { \"metadata_id\": \"b3b6d2b9-089a-490c-8e16-b144650b7843\", \"metadata_name\": \"Total quantity purchased, Total sales by region\", \"sql_query\": \"SELECT \\n \\\"ta_1\\\".\\\"REGION\\\" \\\"ca_1\\\", \\n CASE\\n WHEN sum(\\\"ta_2\\\".\\\"QUANTITYPURCHASED\\\") IS NOT NULL THEN sum(\\\"ta_2\\\".\\\"QUANTITYPURCHASED\\\")\\n ELSE 0\\n END \\\"ca_2\\\", \\n CASE\\n WHEN sum(\\\"ta_2\\\".\\\"SALES\\\") IS NOT NULL THEN sum(\\\"ta_2\\\".\\\"SALES\\\")\\n ELSE 0\\n END \\\"ca_3\\\"\\nFROM \\\"RETAILAPPAREL\\\".\\\"PUBLIC\\\".\\\"FACT_RETAPP_SALES\\\" \\\"ta_2\\\"\\n JOIN \\\"RETAILAPPAREL\\\".\\\"PUBLIC\\\".\\\"DIM_RETAPP_STORES\\\" \\\"ta_1\\\"\\n ON \\\"ta_2\\\".\\\"STOREID\\\" = \\\"ta_1\\\".\\\"STOREID\\\"\\nGROUP BY \\\"ca_1\\\"\" } ] } ``` + * @param fetchLiveboardSqlQueryRequest + */ + fetchLiveboardSqlQuery(fetchLiveboardSqlQueryRequest: FetchLiveboardSqlQueryRequest, _options?: Configuration): Promise; + /** + * Version: 9.0.0.cl or later Fetches security audit logs. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the [Admin Control](https://developers.thoughtspot.com/docs/rbac#_admin_control) privileges are required. #### Usage guidelines By default, the API retrieves logs for the last 24 hours. You can set a custom duration in EPOCH time. Make sure the log duration specified in your API request doesn’t exceed 24 hours. If you must fetch logs for a longer time range, modify the duration and make multiple sequential API requests. Upon successful execution, the API returns logs with the following information: * timestamp of the event * event ID * event type * name and GUID of the user * IP address of ThoughtSpot instance For more information see [Audit logs Documentation](https://developers.thoughtspot.com/docs/audit-logs). + * @param fetchLogsRequest + */ + fetchLogs(fetchLogsRequest: FetchLogsRequest, _options?: Configuration): Promise; + /** + * Version: 26.3.0.cl or later This API fetches the object privileges present for the given list of principals (user or group), on the given set of objects. It supports pagination, which can be enabled and configured using the request parameters. It provides users access to certain features based on privilege based access control. #### Usage guidelines - Specify the `type` (`USER` or `USER_GROUP`) and `identifier` (either GUID or name) of the principals for which you want to retrieve object privilege information in the `principals` array. - Specify the `type` (`LOGICAL_TABLE`) and `identifier` (either GUID or name) of the metadata objects for which you want to retrieve object privilege information in the `metadata` array. Only `LOGICAL_TABLE` metadata type is supported for now. It may be extended for other metadata types in future. - To control the offset from where principals have to be fetched, use `record_offset`. When `record_offset` is 0, information is fetched from the beginning. - To control the number of principals to be fetched, use `record_size`. Default `record_size` is 20. - Ensure `record_offset` for a subsequent request is one more than the value of `record_size` of the previous request. - Ensure using correct Authorization Bearer Token corresponding to specific user & org. #### Example request ```json { \"principals\": [ { \"type\": \"type-1\", \"identifier\": \"principal-guid-or-name-1\" }, { \"type\": \"type-2\", \"identifier\": \"principal-guid-or-name-2\" } ], \"metadata\": [ { \"type\": \"metadata-type-1\", \"identifier\": \"metadata-guid-or-name-1\" }, { \"type\": \"metadata-type-2\", \"identifier\": \"metadata-guid-or-name-2\" } ], \"record_offset\": 0, \"record_size\": 20 } ``` #### Response format The API returns an array of `metadata_object_privileges` objects wrapped in JSON. Each `metadata_object_privileges` object contains: - Metadata information (GUID, name and type) - Array of `principal_object_privilege_info`. - Each `principal_object_privilege_info` contains: - Principal type. All principals of this type are listed as described below. - Array of `principal_object_privileges`. - Each `principal_object_privileges` contains: - Principal information (GUID, name, subtype) - List of applied object level privileges. #### Example response ```json { \"metadata_object_privileges\": [ { \"metadata_id\": \"metadata-guid-1\", \"metadata_name\": \"metadata-name-1\", \"metadata_type\": \"metadata-type-1\", \"principal_object_privilege_info\": [ { \"principal_type\": \"principal-type-1\", \"principal_object_privileges\": [ { \"principal_id\": \"principal-guid-1\", \"principal_name\": \"principal-name-1\", \"principal_sub_type\": \"principal-sub-type-1\", \"object_privileges\": \"[object-privilege-1, object-privilege-2]\" }, { \"principal_id\": \"principal-guid-2\", \"principal_name\": \"principal-name-2\", \"principal_sub_type\": \"principal-sub-type-2\", \"object_privileges\": \"[object-privilege-1, object-privilege-2]\" } ] }, { \"principal_type\": \"principal-type-2\", \"principal_object_privileges\": [ { \"principal_id\": \"principal-guid-3\", \"principal_name\": \"principal-guid-4\", \"principal_sub_type\": \"principal-sub-type-4\", \"object_privileges\": \"[object-privilege-1]\" } ] } ] }, { \"metadata_id\": \"metadata-guid-2\", \"metadata_name\": \"metadata-name-2\", \"metadata_type\": \"metadata-type-2\", \"principal_object_privilege_info\": [ { \"principal_type\": \"principal-type-1\", \"principal_object_privileges\": [ { \"principal_id\": \"principal-guid-1\", \"principal_name\": \"principal-name-1\", \"principal_sub_type\": \"principal-sub-type-1\", \"object_privileges\": \"[object-privilege-3, object-privilege-4]\" }, { \"principal_id\": \"principal-guid-2\", \"principal_name\": \"principal-name-2\", \"principal_sub_type\": \"principal-sub-type-2\", \"object_privileges\": \"[object-privilege-4]\" } ] } ] } ] } ``` + * @param fetchObjectPrivilegesRequest + */ + fetchObjectPrivileges(fetchObjectPrivilegesRequest: FetchObjectPrivilegesRequest, _options?: Configuration): Promise; + /** + * Version: 9.0.0.cl or later Fetches object permission details for a given principal object such as a user and group. Requires view access to the metadata object. #### Usage guidelines * To get a list of all metadata objects that a user or group can access, specify the `type` and GUID or name of the principal. * To get permission details for a specific object, add the `type` and GUID or name of the metadata object to your API request. Upon successful execution, the API returns a list of metadata objects and permission details for each object. + * @param fetchPermissionsOfPrincipalsRequest + */ + fetchPermissionsOfPrincipals(fetchPermissionsOfPrincipalsRequest: FetchPermissionsOfPrincipalsRequest, _options?: Configuration): Promise; + /** + * Version: 9.0.0.cl or later Fetches permission details for a given metadata object. Requires view access to the metadata object. #### Usage guidelines * To fetch a list of users and groups for a metadata object, specify `type` and GUID or name of the metadata object. * To get permission details for a specific user or group, add `type` and GUID or name of the principal object to your API request. Upon successful execution, the API returns permission details and principal information for the object specified in the API request. + * @param fetchPermissionsOnMetadataRequest + */ + fetchPermissionsOnMetadata(fetchPermissionsOnMetadataRequest: FetchPermissionsOnMetadataRequest, _options?: Configuration): Promise; + /** + * Version: 9.0.0.cl or later Enforces logout on current user sessions. Use this API with caution as it may invalidate active user sessions and force users to re-login. Make sure you specify the usernames or GUIDs. If you pass null values in the API call, all user sessions on your cluster become invalid, and the users are forced to re-login. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `USER_ADMINISTRATION` (**Can manage users**) privilege is required. + * @param forceLogoutUsersRequest + */ + forceLogoutUsers(forceLogoutUsersRequest: ForceLogoutUsersRequest, _options?: Configuration): Promise; + /** + * Version: 10.12.0.cl or later Exports a [custom calendar](https://docs.thoughtspot.com/cloud/latest/connections-cust-cal) in the CSV format. Requires `DATAMANAGEMENT` (**Can manage data**) or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your ThoughtSpot instance, the `CAN_MANAGE_CUSTOM_CALENDAR` (**Can manage custom calendars**) privilege is required. #### Usage guidelines Use this API to download a custom calendar in the CSV file format. In your API request, specify the following parameters. * Start and end date of the calendar. For \"month offset\" calendars, the start date must match the month defined in the `month_offset` attribute. You can also specify optional parameters such as the starting day of the week and prefixes for the quarter and year labels. + * @param generateCSVRequest + */ + generateCSV(generateCSVRequest: GenerateCSVRequest, _options?: Configuration): Promise; + /** + * Version: 9.0.0.cl or later Retrieves details of the current user session for the token provided in the request header. Any ThoughtSpot user can access this endpoint and send an API request. The data returned in the API response varies according to user\'s privilege and object access permissions. **NOTE**: In ThoughtSpot, users with cluster administration privileges can access all Orgs by default. However, unless the administrator is explicitly added to an Org, the Orgs list in the session information returned by the API will include only the Primary Org. To include other Orgs in the API response, you must explicitly add the administrator to each Org in the Admin settings page in the UI or via user REST API. + */ + getCurrentUserInfo(_options?: Configuration): Promise; + /** + * Version: 9.4.0.cl or later Retrieves details of the current session token for the bearer token provided in the request header. This API endpoint does not create a new token. Instead, it returns details about the token, including the token string, creation time, expiration time, and the associated user. Use this endpoint to introspect your current session token, debug authentication issues, or when a frontend application needs session token details. Any ThoughtSpot user with a valid bearer token can access this endpoint and send an API request + */ + getCurrentUserToken(_options?: Configuration): Promise; + /** + * Version: 10.4.0.cl or later Creates an authentication token that provides values for the formula variables in the Row Level Security (RLS) rules for a given user. Recommended for use cases that require Attribute-based access control (ABAC) via RLS. #### Required privileges To add a new user and assign privileges during auto-creation, the `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege is required. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled, the `CONTROL_TRUSTED_AUTH` (**Can Enable or Disable Trusted Authentication**) privilege and edit access to the data source are required. To configure formula variables for all Orgs on your instance or the Primary Org, cluster administration privileges are required. Org administrators can configure formula variables for their respective Orgs. If Role-Based Access Control (RBAC) is enabled, users with the `CAN_MANAGE_VARIABLES` (**Can manage variables**) role privilege can also create and manage variables for their Org context. #### Usage guidelines You can generate a token by providing a `username` and `password`, or by using a `secret_key`. To generate a `secret_key`, the administrator must enable [Trusted authentication](https://developers.thoughtspot.com/docs/trusted-auth-secret-key) in the **Develop** > **Customizations** > **Security Settings** page. **Note**: * When both `password` and `secret_key` are included in the API request, `password` takes precedence. * If [Multi-Factor Authentication (MFA)](https://docs.thoughtspot.com/cloud/latest/authentication-local-mfa) is enabled on your instance, the API login request with `username` and `password` returns an error. You can switch to token-based authentication with `secret_key` or contact ThoughtSpot Support for assistance. The token obtained from ThoughtSpot is valid for 5 minutes by default. You can configure the token expiration time as required. #### ABAC via RLS To implement ABAC via RLS and assign security entitlements to users during session creation, generate a token with custom variable values. The values set in the authentication token are applied to the formula variables referenced in RLS rules at the table level, which determines the data each user can access based on their entitlements. The variable values can be configured to persist for a specific set of Models in user sessions initiated with the token, allowing different RLS rules to be set for different data models. Once defined, the rules are added to the user\'s `variable_values` object, after which all sessions will use the persisted values. For more information, see [ABAC via tokens Documentation](https://developers.thoughtspot.com/docs/abac-via-rls-variables). ##### Formula variables Before defining variable values, ensure the variables are created and available on your instance. To create a formula variable, you can use the **Create variable** (`/api/rest/2.0/template/variables/create`) REST API endpoint, with the variable `type` set as `Formula_Variable` in the API request. The API doesn\'t support `\"persist_option\": \"RESET\"` and `\"persist_option\": \"NONE\"` when `variable_values` are defined in the request. If you are using `variable_values` for token generation, you must use other supported persist options such as `APPEND` or `REPLACE`. If you want to use `RESET` or `NONE`, do not pass any `variable_values`. In such cases, `variable_values` will remain unaffected. #### Supported objects The supported object type is `LOGICAL_TABLE`. When using `object_id` with `variable_values`, models are supported. #### Just-in-time provisioning For [just-in-time user creation and provisioning](https://developers.thoughtspot.com/docs/just-in-time-provisioning), specify the following attributes in the API request: * `auto_create` * `username` * `display_name` * `email` * `groups` Set `auto_create` to `true` if the username does not exist in ThoughtSpot. If the username already exists in ThoughtSpot and `auto_create` is set to `true`, user properties such as display name, email, Org and group entitlements will not be updated with new values. Setting `auto_create` to `true` does not create formula variables. Hence, this setting will not be applicable to `variable_values`. #### Important point to note All options in the token creation APIs that define user access to data in ThoughtSpot will take effect during token creation, not when the token is used for authentication. For example, `auto_create:true` will create the user when the authentication token is created. Persist options such as `APPEND` and `REPLACE` will persist `variable_values` on the user profile when the token is created. + * @param getCustomAccessTokenRequest + */ + getCustomAccessToken(getCustomAccessTokenRequest: GetCustomAccessTokenRequest, _options?: Configuration): Promise; + /** + * Version: 10.15.0.cl or later Suggests the most relevant data sources for a given natural language query, ranked by confidence with LLM-generated reasoning. Requires `CAN_USE_SPOTTER` privilege and at least view-level access to the underlying metadata entities referenced in the response. #### Usage guidelines The request must include: - `query`: the natural language question to find relevant data sources for If the request is successful, the API returns a ranked list of suggested data sources, each containing: - `confidence`: a float score indicating the model\'s confidence in the relevance of the suggestion - `details`: metadata about the data source - `data_source_identifier`: the unique ID of the data source - `data_source_name`: the display name of the data source - `description`: a description of the data source - `reasoning`: LLM-generated rationale explaining why the data source was recommended #### Error responses | Code | Description | |------|--------------------------------------------------------------------------------------------------------------------------------------------| | 401 | Unauthorized — authentication token is missing, expired, or invalid. | | 403 | Forbidden — the authenticated user does not have `CAN_USE_SPOTTER` privilege or lacks view permission on the underlying metadata entities. | > ###### Note: > * This endpoint is currently in Beta. Breaking changes may be introduced before it is made Generally Available. > * This endpoint requires Spotter — please contact ThoughtSpot Support to enable Spotter on your cluster. + * @param getDataSourceSuggestionsRequest + */ + getDataSourceSuggestions(getDataSourceSuggestionsRequest: GetDataSourceSuggestionsRequest, _options?: Configuration): Promise; + /** + * Version: 9.0.0.cl or later Generates an authentication token for creating a full session in ThoughtSpot for a given user. Recommended for use cases that do not require Attribute-based access control (ABAC) via Row Level Security (RLS). #### Usage guidelines You can generate a token for a user by providing a `username` and `password`, or by using the `secret_key` generated for your instance. To generate a `secret_key`, the administrator must enable [Trusted authentication](https://developers.thoughtspot.com/docs/trusted-auth-secret-key) in the **Develop** > **Customizations** > **Security Settings** page. **Note**: * When both `password` and `secret_key` are included in the API request, `password` takes precedence. * If [Multi-Factor Authentication (MFA)](https://docs.thoughtspot.com/cloud/latest/authentication-local-mfa) is enabled on your instance, the API login request with `username` and `password` returns an error. You can switch to token-based authentication with `secret_key` or contact ThoughtSpot Support for assistance. The token obtained from ThoughtSpot is valid for 5 minutes by default. You can configure the token expiration time as required. #### Just-in-time provisioning For [just-in-time user creation and provisioning](https://developers.thoughtspot.com/docs/just-in-time-provisioning), specify the following attributes in the API request: * `auto_create` * `username` * `display_name` * `email` * `group_identifiers` Set `auto_create` to `true` if the username does not exist in ThoughtSpot. If the user already exists in ThoughtSpot and `auto_create` is set to `true`, user properties such as display name, email and group assignment will be updated. To add a new user and assign privileges during auto-creation, the `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege is required. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled, the `CONTROL_TRUSTED_AUTH` (**Can Enable or Disable Trusted Authentication**) privilege is required. #### Important point to note All options in the token creation APIs that define user access to data in ThoughtSpot will take effect during token creation, not when the token is used for authentication. For example, `auto_create:true` will create the user when the authentication token is created. + * @param getFullAccessTokenRequest + */ + getFullAccessToken(getFullAccessTokenRequest: GetFullAccessTokenRequest, _options?: Configuration): Promise; + /** + * Version: 10.15.0.cl or later Retrieves existing natural language (NL) instructions configured for a specific data model. These instructions guide the AI system in understanding data context and generating more accurate responses. Requires `CAN_USE_SPOTTER` privilege, at least view access on the data model, and a bearer token corresponding to the org where the data model exists. #### Usage guidelines The request must include: - `data_source_identifier`: the unique ID of the data model to retrieve instructions for If the request is successful, the API returns: - `nl_instructions_info`: an array of instruction objects, each containing: - `instructions`: the configured text instructions for AI processing - `scope`: the scope of the instruction — currently only `GLOBAL` is supported #### Instructions scope - **GLOBAL**: Instructions that apply globally across the system on the given data-model (currently only global instructions are supported) #### Error responses | Code | Description | |------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| | 401 | Unauthorized — authentication token is missing, expired, or invalid. | | 403 | Forbidden — the authenticated user does not have `CAN_USE_SPOTTER` privilege, lacks view access on the data model, or the bearer token does not correspond to the org where the data model exists. | > ###### Note: > > - To use this API, the user needs at least view access on the data model, and must use the bearer token corresponding to the org where the data model exists. > - This endpoint is currently in Beta. Breaking changes may be introduced before the endpoint is made Generally Available. > - Available from version 10.15.0.cl and later. > - This endpoint requires Spotter — please contact ThoughtSpot Support to enable Spotter on your cluster. > - Use this API to review currently configured instructions before modifying them with `setNLInstructions`. + * @param getNLInstructionsRequest + */ + getNLInstructions(getNLInstructionsRequest: GetNLInstructionsRequest, _options?: Configuration): Promise; + /** + * Version: 9.0.0.cl or later Generates an authentication token that provides access to a specific metadata object. This object list is intersected with the list of objects the user is allowed to access via group membership. For more information, see [Object security](https://docs.thoughtspot.com/cloud/latest/security-data-object#object_security). #### Usage guidelines You can generate a token for a user by providing a `username` and `password`, or by using the `secret_key` generated for your instance. To generate a `secret_key`, the administrator must enable [Trusted authentication](https://developers.thoughtspot.com/docs/trusted-auth-secret-key) in the **Develop** > **Customizations** > **Security Settings** page. **Note**: * When both `password` and `secret_key` are included in the API request, `password` takes precedence. * If [Multi-Factor Authentication (MFA)](https://docs.thoughtspot.com/cloud/latest/authentication-local-mfa) is enabled on your instance, the API login request with `username` and `password` returns an error. You can switch to token-based authentication with `secret_key` or contact ThoughtSpot Support for assistance. The token obtained from ThoughtSpot is valid for 5 minutes by default. You can configure the token expiration time as required. #### Just-in-time provisioning For [just-in-time user creation and provisioning](https://developers.thoughtspot.com/docs/just-in-time-provisioning), specify the following attributes in the API request: * `auto_create` * `username` * `display_name` * `email` * `group_identifiers` Set `auto_create` to `true` if the user is not available in ThoughtSpot. If the user already exists in ThoughtSpot and the `auto_create` parameter is set to `true`, user properties such as display name, email, and group assignment will be updated. To add a new user and assign privileges, the `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege is required. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled, the `CONTROL_TRUSTED_AUTH`(**Can Enable or Disable Trusted Authentication**) privilege is required. #### Important point to note All options in the token creation APIs that define user access to data in ThoughtSpot will take effect during token creation, not when the token is used for authentication. For example, `auto_create:true` will create the user when the authentication token is created. + * @param getObjectAccessTokenRequest + */ + getObjectAccessToken(getObjectAccessTokenRequest: GetObjectAccessTokenRequest, _options?: Configuration): Promise; + /** + * Version: 10.13.0.cl or later Breaks down a natural language query into a series of smaller analytical sub-questions, each mapped to a relevant data source. Requires `CAN_USE_SPOTTER` privilege and at least view-level access to the referenced metadata objects. #### Usage guidelines The request must include: - `query`: the natural language question to decompose into analytical sub-questions - `metadata_context`: at least one of the following context identifiers to guide question generation: - `conversation_identifier` — an existing conversation session ID - `answer_identifiers` — a list of Answer GUIDs - `liveboard_identifiers` — a list of Liveboard GUIDs - `data_source_identifiers` — a list of data source GUIDs Optional parameters for refining the output: - `ai_context`: additional context to improve response quality - `content` — supplementary text or CSV data as string input - `instructions` — custom text instructions for the AI system - `limit_relevant_questions`: maximum number of questions to return (default: `5`) - `bypass_cache`: if `true`, forces fresh computation instead of returning cached results If the request is successful, the API returns a list of relevant analytical questions, each containing: - `query`: the generated sub-question - `data_source_identifier`: the unique ID of the data source the question targets - `data_source_name`: the display name of the corresponding data source #### Error responses | Code | Description | |------|---------------------------------------------------------------------------------------------------------------------------------------| | 401 | Unauthorized — authentication token is missing, expired, or invalid. | | 403 | Forbidden — the authenticated user does not have `CAN_USE_SPOTTER` privilege or lacks view access to the referenced metadata objects. | > ###### Note: > * This endpoint is currently in Beta. Breaking changes may be introduced before the endpoint is made Generally Available. > * This endpoint requires Spotter - please contact ThoughtSpot support to enable Spotter on your cluster. + * @param getRelevantQuestionsRequest + */ + getRelevantQuestions(getRelevantQuestionsRequest: GetRelevantQuestionsRequest, _options?: Configuration): Promise; + /** + * Version: 9.0.0.cl or later Retrieves the current configuration details of the cluster. If the request is successful, the API returns a list configuration settings applied on the cluster. Requires `ADMINISTRATION`(**Can administer ThoughtSpot**) privilege to view these complete configuration settings of the cluster. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `SYSTEM_INFO_ADMINISTRATION` (**Can view system activities**) privilege is required. This API does not require any parameters to be passed in the request. + */ + getSystemConfig(_options?: Configuration): Promise; + /** + * Version: 9.0.0.cl or later Gets system information such as the release version, locale, time zone, deployment environment, date format, and date time format of the cluster. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privileges. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `SYSTEM_INFO_ADMINISTRATION` (**Can view system activities**) privilege is required. This API does not require any parameters to be passed in the request. + */ + getSystemInformation(_options?: Configuration): Promise; + /** + * Version: 9.2.0.cl or later Gets a list of configuration overrides applied on the cluster. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `APPLICATION_ADMINISTRATION` (**Can manage application settings**) privilege is required. This API does not require any parameters to be passed in the request. + */ + getSystemOverrideInfo(_options?: Configuration): Promise; + /** + * Version: 9.0.0.cl or later Imports [TML](https://docs.thoughtspot.com/cloud/latest/tml) files into ThoughtSpot. Requires `DATAMANAGEMENT` (**Can manage data**) or `ADMINISTRATION` (**Can administer ThoughtsSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the following Data control privileges may be required: - `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) - `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` (**Can manage data models**) #### Usage guidelines * Import all related objects in a single TML Import API call. For example, Tables that use the same Connection object and Worksheets connected to these Tables. * Include the `fqn` property to distinguish objects that have the same name. For example, if you have multiple Connections or Worksheets with the same name on ThoughtSpot and the Connection or Worksheet referenced in your TML file does not have a unique name to distinguish, it may result in invalid object references. Adding `fqn` helps ThoughtSpot differentiate a Table from another with the same name. We recommend [exporting TML with FQNs](#/http/api-endpoints/metadata/export-metadata-tml) and using these during the import operation. * You can upload multiple TML files at a time. If you import a Worksheet along with Liveboards, Answers, and other dependent objects in a single API call, the imported objects will be immediately available for use. When you import only a Worksheet object, it may take some time for the Worksheet to become available in the ThoughtSpot system. Please wait for a few minutes, and then proceed to create an Answer and Liveboard from the newly imported Worksheet. For more information, see [TML Documentation](https://developers.thoughtspot.com/docs/tml#_import_a_tml). + * @param importMetadataTMLRequest + */ + importMetadataTML(importMetadataTMLRequest: ImportMetadataTMLRequest, _options?: Configuration): Promise; + /** + * Version: 10.4.0.cl or later Schedules a task to import [TML](https://docs.thoughtspot.com/cloud/latest/tml) files into ThoughtSpot. You can use this API endpoint to process TML objects asynchronously when importing TMLs of large and complex metadata objects into ThoughtSpot. Unlike the synchronous import TML operation, the API processes TML data in the background and returns a task ID, which can be used to check the status of the import task via `/api/rest/2.0/metadata/tml/async/status` API endpoint. Requires `DATAMANAGEMENT` (**Can manage data**) or `ADMINISTRATION` (**Can administer ThoughtsSpot**) privilege, and edit access to the TML objects. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the following Data control privileges may be required: - `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) - `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` (**Can manage data models**) #### Usage guidelines See [Async TML API Documentation](https://developers.thoughtspot.com/docs/tml#_import_tml_objects_asynchronously) for usage guidelines. + * @param importMetadataTMLAsyncRequest + */ + importMetadataTMLAsync(importMetadataTMLAsyncRequest: ImportMetadataTMLAsyncRequest, _options?: Configuration): Promise; + /** + * Version: 9.0.0.cl or later Imports group objects from external databases into ThoughtSpot. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `GROUP_ADMINISTRATION` (**Can manage groups**) privilege is required. During the import operation: * If the specified group is not available in ThoughtSpot, it will be added to ThoughtSpot. * If `delete_unspecified_groups` is set to `true`, the groups not specified in the API request, excluding administrator and system user groups, are deleted. * If the specified groups are already available in ThoughtSpot, the object properties of these groups are modified and synchronized as per the input data in the API request. A successful API call returns the object that represents the changes made in the ThoughtSpot system. + * @param importUserGroupsRequest + */ + importUserGroups(importUserGroupsRequest: ImportUserGroupsRequest, _options?: Configuration): Promise; + /** + * Version: 9.0.0.cl or later Imports user data from external databases into ThoughtSpot. During the user import operation: * If the specified users are not available in ThoughtSpot, the users are created and assigned a default password. Defining a `default_password` in the API request is optional. * If `delete_unspecified_users` is set to `true`, the users not specified in the API request, excluding the `tsadmin`, `guest`, `system` and `su` users, are deleted. * If the specified user objects are already available in ThoughtSpot, the object properties are updated and synchronized as per the input data in the API request. A successful API call returns the object that represents the changes made in the ThoughtSpot system. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `USER_ADMINISTRATION` (**Can manage users**) privilege is required. + * @param importUsersRequest + */ + importUsers(importUsersRequest: ImportUsersRequest, _options?: Configuration): Promise; + /** + * Version: 9.0.0.cl or later Creates a login session for a ThoughtSpot user with Basic authentication. In Basic authentication method, REST clients log in to ThoughtSpot using `username` and `password` attributes. On a multi-tenant cluster with Orgs, users can pass the ID of the Org in the API request to log in to a specific Org context. **Note**: If Multi-Factor Authentication (MFA) is enabled on your instance, the API login request with basic authentication (`username` and `password` ) returns an error. Contact ThoughtSpot Support for assistance. A successful login returns a session cookie that can be used in your subsequent API requests. + * @param loginRequest + */ + login(loginRequest: LoginRequest, _options?: Configuration): Promise; + /** + * Version: 9.0.0.cl or later Logs out a user from their current session. + */ + logout(_options?: Configuration): Promise; + /** + * Version: 26.3.0.cl or later This API allows the addition or deletion of object level privileges for a set of users and groups, on a set of metadata objects. It provides users to access certain features based on privilege based access control. #### Usage guidelines - Specify the `operation`. The supported operations are: `ADD`, `REMOVE`. - Specify the type of the objects on which the object privileges are being provided in `metadata_type`. Only `LOGICAL_TABLE` metadata type is supported for now. It may be extended for other metadata types in future. - Specify the list of object privilege types in the `object_privilege_types` array. The supported object privilege types are: `SPOTTER_COACHING_PRIVILEGE`. - Specify the identifiers (either GUID or name) for the metadata objects in the `metadata_identifiers` array. - Specify the `type` (`USER` or `USER_GROUP`) and `identifier` (either GUID or name) of the principals to which you want to apply the given operation and given object privileges in the `principals` array. - Ensure using correct Authorization Bearer Token corresponding to specific user & org. #### Example request ```json { \"operation\": \"operation-type\", \"metadata_type\": \"metadata-type\", \"object_privilege_types\": [\"privilege-type-1\", \"privilege-type-2\"], \"metadata_identifiers\": [\"metadata-guid-or-name-1\", \"metadata-guid-or-name-1\"], \"principals\": [ { \"type\": \"type-1\", \"identifier\": \"principal-guid-or-name-1\" }, { \"type\": \"type-2\", \"identifier\": \"principal-guid-or-name-2\" } ] } ``` > ###### Note: > * Only admin users, users with edit access and users with coaching privilege on a given data-model can add or remove principals related to SPOTTER_COACHING_PRIVILEGE + * @param manageObjectPrivilegeRequest + */ + manageObjectPrivilege(manageObjectPrivilegeRequest: ManageObjectPrivilegeRequest, _options?: Configuration): Promise; + /** + * Parameterize fields in metadata objects. Version: 10.9.0.cl or later **Note:** This API endpoint is deprecated and will be removed from ThoughtSpot in a future release. Use [POST /api/rest/2.0/metadata/parameterize-fields](/api/rest/2.0/metadata/parameterize-fields) instead. Allows parameterizing fields in metadata objects in ThoughtSpot. Requires appropriate permissions to modify the metadata object. The API endpoint allows parameterizing the following types of metadata objects: * Logical Tables * Connections * Connection Configs For a Logical Table the field type must be `ATTRIBUTE` and field name can be one of: * databaseName * schemaName * tableName For a Connection or Connection Config, the field type is always `CONNECTION_PROPERTY`. In this case, field_name specifies the exact property of the Connection or Connection Config that needs to be parameterized. For Connection Config, the only supported field name is: * impersonate_user + * @param parameterizeMetadataRequest + */ + parameterizeMetadata(parameterizeMetadataRequest: ParameterizeMetadataRequest, _options?: Configuration): Promise; + /** + * Parameterize multiple fields of metadata objects. For example [schemaName, databaseName] for LOGICAL_TABLE. Version: 26.5.0.cl or later Allows parameterizing multiple fields of metadata objects in ThoughtSpot. For example, you can parameterize [schemaName, databaseName] for LOGICAL_TABLE. Requires appropriate permissions to modify the metadata object. The API endpoint allows parameterizing the following types of metadata objects: * Logical Tables * Connections * Connection Configs For a Logical Table, the field type must be `ATTRIBUTE` and field names can include: * databaseName * schemaName * tableName For a Connection or Connection Config, the field type is always `CONNECTION_PROPERTY`. In this case, field_names specifies the exact properties of the Connection or Connection Config that need to be parameterized. For Connection Config, supported field names include: * impersonate_user You can parameterize multiple fields at once by providing an array of field names. + * @param parameterizeMetadataFieldsRequest + */ + parameterizeMetadataFields(parameterizeMetadataFieldsRequest: ParameterizeMetadataFieldsRequest, _options?: Configuration): Promise; + /** + * Version: 26.5.0.cl or later Allows publishing metadata objects across organizations in ThoughtSpot. Requires ADMINISTRATION role and TENANT scope. The API endpoint allows publishing the following types of metadata objects: * Liveboards * Answers * Logical Tables This API will essentially share the objects along with it\'s dependencies to the org admins of the orgs to which it is being published. + * @param publishMetadataRequest + */ + publishMetadata(publishMetadataRequest: PublishMetadataRequest, _options?: Configuration): Promise; + /** + * Update values for a variable Version: 26.4.0.cl or later Allows updating values for a specific variable in ThoughtSpot. Requires ADMINISTRATION role. The CAN_MANAGE_VARIABLES permission allows you to manage Formula Variables in the current organization scope. The API endpoint allows: * Adding new values to the variable * Replacing existing values * Deleting values from the variable * Resetting all values When updating variable values, you need to specify: * The variable identifier (ID or name) * The values to add/replace/remove * The operation to perform (ADD, REPLACE, REMOVE, RESET) Behaviour based on operation type: * ADD - Adds values to the variable if this is a list type variable, else same as replace. * REPLACE - Replaces all values of a given set of constraints with the current set of values. * REMOVE - Removes any values which match the set of conditions of the variables if this is a list type variable, else clears value. * RESET - Removes all constraints for the given variable, scope is ignored + * @param identifier Unique ID or name of the variable + * @param putVariableValuesRequest + */ + putVariableValues(identifier: string, putVariableValuesRequest: PutVariableValuesRequest, _options?: Configuration): Promise; + /** + * Version: 10.7.0.cl or later **Deprecated** — Use `getRelevantQuestions` instead (available from 10.13.0.cl). Breaks down a topical or goal-oriented natural language question into smaller, actionable analytical sub-questions, each mapped to a relevant data source for independent execution. Requires `CAN_USE_SPOTTER` privilege and at least view-level access to the referenced metadata objects. #### Usage guidelines The request accepts the following parameters: - `nlsRequest`: contains the user `query` to decompose, along with optional `instructions` and `bypassCache` flag - `worksheetIds`: list of data source identifiers to scope the decomposition - `answerIds`: list of Answer GUIDs whose data guides the response - `liveboardIds`: list of Liveboard GUIDs whose data guides the response - `conversationId`: an existing conversation session ID for context continuity - `content`: supplementary text or CSV data to improve response quality - `maxDecomposedQueries`: maximum number of sub-questions to return (default: `5`) If the request is successful, the API returns a `decomposedQueryResponse` containing a list of `decomposedQueries`, each with: - `query`: the generated analytical sub-question - `worksheetId`: the unique ID of the data source the question targets - `worksheetName`: the display name of the corresponding data source #### Error responses | Code | Description | |------|---------------------------------------------------------------------------------------------------------------------------------------| | 401 | Unauthorized — authentication token is missing, expired, or invalid. | | 403 | Forbidden — the authenticated user does not have `CAN_USE_SPOTTER` privilege or lacks view access to the referenced metadata objects. | > ###### Note: > * This endpoint is deprecated since 10.13.0.cl. Use `getRelevantQuestions` for new integrations. > * This endpoint is currently in Beta. Breaking changes may be introduced before the endpoint is made Generally Available. > * This endpoint requires Spotter — please contact ThoughtSpot support to enable Spotter on your cluster. + * @param queryGetDecomposedQueryRequest + */ + queryGetDecomposedQuery(queryGetDecomposedQueryRequest: QueryGetDecomposedQueryRequest, _options?: Configuration): Promise; + /** + * Version: 9.0.0.cl or later Resets the password of a user account. Administrators can reset password on behalf of a user. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `USER_ADMINISTRATION` (**Can manage users**) privilege is required. + * @param resetUserPasswordRequest + */ + resetUserPassword(resetUserPasswordRequest: ResetUserPasswordRequest, _options?: Configuration): Promise; + /** + * Version: 9.2.0.cl or later Reverts TML objects to a previous commit specified in the API request. Requires at least edit access to objects. In the API request, specify the `commit_id`. If the branch name is not specified in the request, the API will consider the default branch configured on your instance. By default, the API reverts all objects. If the revert operation fails for one of the objects provided in the commit, the API returns an error and does not revert any object. For more information, see [Git integration documentation](https://developers.thoughtspot.com/docs/git-integration). + * @param commitId Commit id to which the object should be reverted + * @param revertCommitRequest + */ + revertCommit(commitId: string, revertCommitRequest: RevertCommitRequest, _options?: Configuration): Promise; + /** + * Version: 26.2.0.cl or later Revokes OAuth refresh tokens for users who no longer require access to a data warehouse connection. When a token is revoked, the affected user\'s session for that connection is terminated, and they must re-authenticate to regain access. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) or `DATAMANAGEMENT` (**Can manage data**) privileges. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on the ThoughtSpot instance, users with `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) privilege can also make API requests to revoke tokens for connection users. #### Usage guidelines You can specify different combinations of identifiers to control which refresh tokens are revoked. - **connection_identifier**: Revokes refresh tokens for all users of the connection, except the connection author. - **connection_identifier** and **user_identifiers**: Revokes refresh tokens only for the users specified in the request. If the name or ID of the connection author is included in the request, their token will also be revoked. - **connection_identifier** and **configuration_identifiers**: Revokes refresh tokens for all users on the specified configurations, except the configuration author. - **connection_identifier**, **configuration_identifiers**, and **user_identifiers**: Revokes refresh tokens for the specified users on the specified configurations. - **connection_identifier** and **org_identifiers**: Revokes refresh tokens for the specified Orgs. Applicable only for published connections. - **connection_identifier**, **org_identifiers**, and **user_identifiers**: Revokes refresh tokens for the specified users in the specified Orgs. Applicable only for published connections. **NOTE**: The `org_identifiers` parameter is only applicable for published connections. Using this parameter for unpublished connections will result in an error. Ensure that the connections are published before making the API request. + * @param connectionIdentifier Unique ID or name of the connection whose refresh tokens need to be revoked. All the users associated with the connection will have their refresh tokens revoked except the author. + * @param revokeRefreshTokensRequest + */ + revokeRefreshTokens(connectionIdentifier: string, revokeRefreshTokensRequest: RevokeRefreshTokensRequest, _options?: Configuration): Promise; + /** + * Version: 9.0.0.cl or later Revokes the authentication token issued for current user session. The token of your current session expires when you make a call to the `/api/rest/2.0/auth/token/revoke` endpoint. the users will not be able to access ThoughtSpot objects until a new token is obtained. To restart your session, request for a new token from ThoughtSpot. See [Get Full Access Token](#/http/api-endpoints/authentication/get-full-access-token). + * @param revokeTokenRequest + */ + revokeToken(revokeTokenRequest: RevokeTokenRequest, _options?: Configuration): Promise; + /** + * Version: 26.6.0.cl or later Returns the authentication configuration for the specified auth type at cluster and org level. Currently supports `TRUSTED_AUTH`. #### Required privileges Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) or `CONTROL_TRUSTED_AUTH` (**Can Enable or Disable Trusted Authentication**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled, the `CONTROL_TRUSTED_AUTH` privilege is required. #### Usage guidelines Use `scope` to control which level of settings are returned: - `CLUSTER` — Returns cluster-level authentication status and access tokens. Accessible only from the Primary Org. - `ORG` — Returns org-level authentication status and access tokens for the current Org. Requires the per-Org authentication feature to be enabled on your instance. - If `scope` is omitted, both cluster and org-level settings are returned based on the caller\'s org context and feature availability. The `access_tokens` array in `cluster_preferences` or `org_preferences` is omitted when no token is configured at that level. **Note**: Access tokens returned in the response are sensitive credentials. Treat them with the same care as passwords. + * @param searchAuthSettingsRequest + */ + searchAuthSettings(searchAuthSettingsRequest: SearchAuthSettingsRequest, _options?: Configuration): Promise; + /** + * Version: 10.12.0.cl or later Gets a list of [custom calendars](https://docs.thoughtspot.com/cloud/latest/connections-cust-cal). Requires `DATAMANAGEMENT` (**Can manage data**) or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your ThoughtSpot instance, the `CAN_MANAGE_CUSTOM_CALENDAR` (**Can manage custom calendars**) privilege is required. #### Usage guidelines By default, the API returns a list of custom calendars for all connection objects. To retrieve custom calendar details for a particular connection, specify the connection ID. You can also use other search parameters such as `name_pattern` and `sort_options` as search filters. The `name_pattern` parameter filters and returns only those objects that match the specified pattern. Use `%` as a wildcard for pattern matching. + * @param searchCalendarsRequest + */ + searchCalendars(searchCalendarsRequest: SearchCalendarsRequest, _options?: Configuration): Promise; + /** + * Version: 26.4.0.cl or later Searches delivery history for communication channels such as webhooks. Returns channel-level delivery status for each job execution record. Use this to monitor channel health and delivery success rates across events. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) or `DEVELOPER` (**Has developer privilege**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, users with `CAN_MANAGE_WEBHOOKS` (**Can manage webhooks**) privilege are also authorized to perform this action. **NOTE**: When `channel_type` is `WEBHOOK`, the following constraints apply: - `job_ids`, `channel_identifiers`, and `events` each accept at most one element. - When `job_ids` is provided, it is used as the sole lookup key and other filter fields are ignored. - When `job_ids` is not provided, `channel_identifiers` and `events` are both required, each containing exactly one element. - Records older than the configured retention period are not returned. - Use `start_epoch_time_in_millis` and/or `end_epoch_time_in_millis` to narrow results to a specific time window. + * @param searchChannelHistoryRequest + */ + searchChannelHistory(searchChannelHistoryRequest: SearchChannelHistoryRequest, _options?: Configuration): Promise; + /** + * Version: 26.4.0.cl or later Gets a list of collections available in ThoughtSpot. To get details of a specific collection, specify the collection GUID or name. You can also filter the API response based on the collection name pattern, author, and other criteria. #### Search options * **name_pattern**: Use \'%\' as a wildcard character to match collection names * **collection_identifiers**: Search for specific collections by their GUIDs or names * **include_metadata**: When set to `true`, includes the metadata objects within each collection in the response **NOTE**: If the API returns an empty list, consider increasing the value of the `record_size` parameter. To search across all available collections, set `record_size` to `-1`. + * @param searchCollectionsRequest + */ + searchCollections(searchCollectionsRequest: SearchCollectionsRequest, _options?: Configuration): Promise; + /** + * Version: 9.2.0.cl or later Gets a list of commits for a given metadata object. Requires `DATAMANAGEMENT` (**Can manage data**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance on your instance, the `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` (**Can manage data models**) privilege and edit access to the metadata objects. + * @param searchCommitsRequest + */ + searchCommits(searchCommitsRequest: SearchCommitsRequest, _options?: Configuration): Promise; + /** + * Version: 10.14.0.cl or later Fetch communication channel preferences. - Use `cluster_preferences` to fetch the default preferences for your ThoughtSpot application instance. - If your instance has [Orgs](https://docs.thoughtspot.com/cloud/latest/orgs-overview), use `org_preferences` to fetch any Org-specific preferences that override the defaults. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) or `DEVELOPER` (**Has developer privilege**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, users with `APPLICATION_ADMINISTRATION` (**Can manage application settings**) privilege are also authorized to perform this action. + * @param searchCommunicationChannelPreferencesRequest + */ + searchCommunicationChannelPreferences(searchCommunicationChannelPreferencesRequest: SearchCommunicationChannelPreferencesRequest, _options?: Configuration): Promise; + /** + * Version: 9.2.0.cl or later Gets Git repository connections configured on the ThoughtSpot instance. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance on your instance, the `CAN_SETUP_VERSION_CONTROL` (**Can set up version control**) privilege. + * @param searchConfigRequest + */ + searchConfig(searchConfigRequest: SearchConfigRequest, _options?: Configuration): Promise; + /** + * Version: 9.2.0.cl or later Gets connection objects. Requires `DATAMANAGEMENT` (**Can manage data**) or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) privilege is required. - To get a list of all connections available in the ThoughtSpot system, send the API request without any attributes in the request body. - To get the connection objects for a specific type of data warehouse, specify the type in `data_warehouse_types`. - To fetch details of a connection object, specify the connection object GUID or name. The `name_pattern` attribute allows passing partial text with `%` for a wildcard match. - To get details of the database, schemas, tables, or columns from a data connection object, specify `data_warehouse_object_type`. - To get a specific database, schema, table, or column from a connection object, define the object type in `data_warehouse_object_type` and object properties in the `data_warehouse_objects` array. For example, to search for a column, you must pass the database, schema, and table names in the API request. Note that in the following example, object properties are set in a hierarchical order (`database` > `schema` > `table` > `column`). ``` { \"connections\": [ { \"identifier\": \"b9d1f2ef-fa65-4a4b-994e-30fa2d57b0c2\", \"data_warehouse_objects\": [ { \"database\": \"NEBULADEV\", \"schema\": \"INFORMATION_SCHEMA\", \"table\": \"APPLICABLE_ROLES\", \"column\": \"ROLE_NAME\" } ] } ], \"data_warehouse_object_type\": \"COLUMN\" } ``` - To fetch data by `configuration`, specify `data_warehouse_object_type`. For example, to fetch columns from the `DEVELOPMENT` database, specify the `data_warehouse_object_type` as `DATABASE` and define the `configuration` string as `{\"database\":\"DEVELOPMENT\"}`. To get column data for a specific table, specify the table, for example,`{\"database\":\"RETAILAPPAREL\",\"table\":\"PIPES\"}`. - To query connections by `authentication_type`, specify `data_warehouse_object_type`. Supported values for `authentication_type` are: - `SERVICE_ACCOUNT`: For connections that require service account credentials to authenticate to the Cloud Data Warehouse and fetch data. - `OAUTH`: For connections that require OAuth credentials to authenticate to the Cloud Data Warehouse and fetch data. Teradata, Oracle, and Presto Cloud Data Warehouses do not support the OAuth authentication type. - `IAM`: For connections that have the IAM OAuth set up. This authentication type is supported on Amazon Redshift connections only. - `EXTOAUTH`: For connections that have External OAuth set up. ThoughtSpot supports external [OAuth with Microsoft Azure Active Directory (AD)](https://docs.thoughtspot.com/cloud/latest/ connections-snowflake-azure-ad-oauth) and [Okta for Snowflake data connections](https://docs.thoughtspot.com/cloud/latest/connections-snowflake-okta-oauth). - `KEY_PAIR`: For connections that require Key Pair account credentials to authenticate to the Cloud Data Warehouse and fetch data. This authentication type is supported on Snowflake connections only. - `OAUTH_WITH_PKCE`: For connections that require OAuth with PKCE account credentials to authenticate to the Cloud Data Warehouse and fetch data. This authentication type is supported on Snowflake, Starburst, Databricks, Denodo connections only. - `EXTOAUTH_WITH_PKCE`: For connections that require External OAuth With PKCE account credentials to authenticate to the Cloud Data Warehouse and fetch data. This authentication type is supported on Snowflake connections only. - `OAUTH_WITH_PEZ`: For connections that require OAuth With PEZ account credentials to authenticate to the Cloud Data Warehouse and fetch data. This authentication type is supported on Amazon Redshift connections only. - `OAUTH_WITH_SERVICE_PRINCIPAL`: For connections that require OAuth With Service Principal account credentials to authenticate to the Cloud Data Warehouse and fetch data. This authentication type is supported on Databricks connections only. - `PERSONAL_ACCESS_TOKEN`: For connections that require Personal Access Token account credentials to authenticate to the Cloud Data Warehouse and fetch data. This authentication type is supported on Databricks connections only. - `OAUTH_CLIENT_CREDENTIALS`: For connections that require OAuth Client Credentials to authenticate to the Cloud Data Warehouse and fetch data. This authentication type is supported on Snowflake connections only. - To include more details about connection objects in the API response, set `include_details` to `true`. - You can also sort the output by field names and filter connections by tags. **NOTE**: When filtering connection records by parameters other than `data_warehouse_types` or `tag_identifiers`, ensure that you set `record_size` to `-1` and `record_offset` to `0` for precise results. + * @param searchConnectionRequest + */ + searchConnection(searchConnectionRequest: SearchConnectionRequest, _options?: Configuration): Promise; + /** + * Version: 9.6.0.cl or later Gets custom actions configured on the cluster. Requires `DEVELOPER` (**Has Developer privilege**) or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `DEVELOPER` (**Has developer privilege**) privilege is required. + * @param searchCustomActionsRequest + */ + searchCustomActions(searchCustomActionsRequest: SearchCustomActionsRequest, _options?: Configuration): Promise; + /** + * Version: 9.0.0.cl or later Generates an Answer from a given data source. Requires at least view access to the data source object (Worksheet or View). #### Usage guidelines To search data, specify the data source GUID in `logical_table_identifier`. The data source can be a Worksheet, View, Table, or SQL view. Pass search tokens in the `query_string` attribute in the API request as shown in the following example: ``` { \"query_string\": \"[sales] by [store]\", \"logical_table_identifier\": \"cd252e5c-b552-49a8-821d-3eadaa049cca\", } ``` For more information about the `query_string` format and data source attribute, see [Search data API](https://developers.thoughtspot.com/docs/fetch-data-and-report-apis#_search_data_api). The `record_size` attribute determines the number of records to retrieve in an API call. For more information about pagination, record size, and maximum row limit, see [Pagination and record size settings](https://developers.thoughtspot.com/docs/fetch-data-and-report-apis#_pagination_settings_for_data_and_report_api). + * @param searchDataRequest + */ + searchData(searchDataRequest: SearchDataRequest, _options?: Configuration): Promise; + /** + * Version: 10.10.0.cl or later Search the email customization configuration if any set for the ThoughtSpot system. #### Pre-requisites Requires `DEVELOPER` (**has developer privilege**) or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `DEVELOPER` (**Has developer privilege**) privilege is required. **NOTE**:This endpoint in currently in beta. Contact ThoughtSpot support to enable this on your instance. + * @param searchEmailCustomizationRequest + */ + searchEmailCustomization(searchEmailCustomizationRequest: SearchEmailCustomizationRequest, _options?: Configuration): Promise; + /** + * Version: 9.0.0.cl or later Gets a list of metadata objects available on the ThoughtSpot system. This API endpoint is available to all users who have view access to the object. Users with `ADMINISTRATION` (**Can administer ThoughtSpot**) privileges can view data for all metadata objects, including users and groups. #### Usage guidelines - To get all metadata objects, send the API request without any attributes. - To get metadata objects of a specific type, set the `type` attribute. For example, to fetch a Worksheet, set the type as `LOGICAL_TABLE`. - To filter metadata objects within type `LOGICAL_TABLE`, set the `subtypes` attribute. For example, to fetch a Worksheet, set the type as `LOGICAL_TABLE` & subtypes as `[WORKSHEET]`. - To get a specific metadata object, specify the GUID. - To customize your search and filter the API response, you can use several parameters. You can search for objects created or modified by specific users, by tags applied to the objects, or by using the include parameters like `include_auto_created_objects`, `include_dependent_objects`, `include_headers`, `include_incomplete_objects`, and so on. You can also define sorting options to sort the data retrieved in the API response. - To get discoverable objects when linientmodel is enabled you can use `include_discoverable_objects` as true else false. Default value is true. - For liveboard metadata type, to get the newer format, set the `liveboard_response_format` as V2. Default value is V1. - To retrieve only objects that are published, set the `include_only_published_objects` as true. Default value is false. **NOTE**: The following parameters support pagination of metadata records: - `tag_identifiers` - `type` - `subtypes` - `created_by_user_identifiers` - `modified_by_user_identifiers` - `owned_by_user_identifiers` - `exclude_objects` - `include_auto_created_objects` - `favorite_object_options` - `include_only_published_objects` If you are using other parameters to search metadata, set `record_size` to `-1` and `record_offset` to `0`. + * @param searchMetadataRequest + */ + searchMetadata(searchMetadataRequest: SearchMetadataRequest, _options?: Configuration): Promise; + /** + * Version: 9.0.0.cl or later Gets a list of Orgs configured on the ThoughtSpot system. To get details of a specific Org, specify the Org ID or name. You can also pass parameters such as status, visibility, and user identifiers to get a specific list of Orgs. Requires cluster administration (**Can administer Org**) privileges. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `ORG_ADMINISTRATION` (**Can manage Orgs**) privilege is required. + * @param searchOrgsRequest + */ + searchOrgs(searchOrgsRequest: SearchOrgsRequest, _options?: Configuration): Promise; + /** + * Version: 9.5.0.cl or later Gets a list of Role objects from the ThoughtSpot system. Available if [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance. To search for Roles, the `ROLE_ADMINISTRATION` (**Can manage roles**) privilege is required. To get details of a specific Role object, specify the GUID or name. You can also filter the API response based on user group and Org identifiers, privileges assigned to the Role, and deprecation status. + * @param searchRolesRequest + */ + searchRoles(searchRolesRequest: SearchRolesRequest, _options?: Configuration): Promise; + /** + * Search Schedules Version: 9.4.0.cl or later Gets a list of scheduled jobs configured for a Liveboard. To get details of a specific scheduled job, specify the name or GUID of the scheduled job. Requires at least view access to Liveboards. **NOTE**: When filtering schedules by parameters other than `metadata`, set `record_size` to `-1` and `record_offset` to `0` for accurate results. + * @param searchSchedulesRequest + */ + searchSchedules(searchSchedulesRequest: SearchSchedulesRequest, _options?: Configuration): Promise; + /** + * Version: 26.2.0.cl or later Fetch security settings for your ThoughtSpot application instance. - Use `scope: CLUSTER` to retrieve cluster-level security settings, including CORS and CSP allowlists, SAML redirect URLs, and settings that control access to non-embedded pages. - Use `scope: ORG` to retrieve Org-level security settings. If your instance has [Orgs](https://docs.thoughtspot.com/cloud/latest/orgs-overview), this returns CORS and non-embed access settings specific to the Org. - If `scope` is not specified, returns both cluster and Org-specific settings based on user privileges. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) or `DEVELOPER` (**Has developer privilege**) privilege. See [Security Settings](https://developers.thoughtspot.com/docs/security-settings) for more details. + * @param searchSecuritySettingsRequest + */ + searchSecuritySettings(searchSecuritySettingsRequest: SearchSecuritySettingsRequest, _options?: Configuration): Promise; + /** + * Version: 9.0.0.cl or later Gets a list of tag objects available on the ThoughtSpot system. To get details of a specific tag object, specify the GUID or name. Any authenticated user can search for tag objects. + * @param searchTagsRequest + */ + searchTags(searchTagsRequest: SearchTagsRequest, _options?: Configuration): Promise; + /** + * Version: 9.0.0.cl or later Gets a list of user group objects from the ThoughtSpot system. To get details of a specific user group, specify the user group GUID or name. You can also filter the API response based on User ID, Org ID, Role ID, type of group, sharing visibility, privileges assigned to the group, and the Liveboard IDs assigned to the users in the group. Available to all users. Users with `ADMINISTRATION` (**Can administer ThoughtSpot**) privileges can view all users properties. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `GROUP_ADMINISTRATION` (**Can manage groups**) privilege is required. **NOTE**: If you do not get precise results, try setting `record_size` to `-1` and `record_offset` to `0`. + * @param searchUserGroupsRequest + */ + searchUserGroups(searchUserGroupsRequest: SearchUserGroupsRequest, _options?: Configuration): Promise; + /** + * Version: 9.0.0.cl or later Gets a list of users available on the ThoughtSpot system. To get details of a specific user, specify the user GUID or name. You can also filter the API response based on groups, Org ID, user visibility, account status, user type, and user preference settings and favorites. Available to all users. Users with `ADMINISTRATION` (**Can administer ThoughtSpot**) privileges can view all users properties. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `USER_ADMINISTRATION` (**Can manage users**) privilege is required. **NOTE**: If the API returns an empty list, consider increasing the value of the `record_size` parameter. To search across all available users, set `record_size` to `-1`. + * @param searchUsersRequest + */ + searchUsers(searchUsersRequest: SearchUsersRequest, _options?: Configuration): Promise; + /** + * Search variables Version: 26.4.0.cl or later Allows searching for variables in ThoughtSpot. Requires ADMINISTRATION role. The CAN_MANAGE_VARIABLES permission allows you to manage Formula Variables in the current organization scope. The API endpoint supports searching variables by: * Variable identifier (ID or name) * Variable type * Name pattern (case-insensitive, supports % for wildcard) The search results can be formatted in three ways: * METADATA - Returns only variable metadata (default) * METADATA_AND_VALUES - Returns variable metadata and values The values can be filtered by scope: * org_identifier * principal_identifier * model_identifier + * @param searchVariablesRequest + */ + searchVariables(searchVariablesRequest: SearchVariablesRequest, _options?: Configuration): Promise; + /** + * Version: 10.14.0.cl or later Searches for webhook configurations based on various criteria such as Org, webhook identifier, event type, with support for pagination and sorting. Returns matching webhook configurations with their complete details. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) or `DEVELOPER` (**Has developer privilege**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, users with `CAN_MANAGE_WEBHOOKS` (**Can manage webhooks**) privilege are also authorized to perform this action. + * @param searchWebhookConfigurationsRequest + */ + searchWebhookConfigurations(searchWebhookConfigurationsRequest: SearchWebhookConfigurationsRequest, _options?: Configuration): Promise; + /** + * Version: 26.5.0.cl or later Sends natural language messages to an existing Spotter agent conversation and returns the complete response synchronously. Requires `CAN_USE_SPOTTER` privilege and access to the metadata object associated with the conversation. The user must have access to the conversation session referenced by `conversation_identifier`. A conversation must first be created using the `createAgentConversation` API. #### Usage guidelines The request must include: - `conversation_identifier`: the unique session ID returned by `createAgentConversation`, used for context continuity and message tracking - `messages`: an array of one or more text messages to send to the agent The API returns an array of response objects, each containing: - `type`: the kind of response — `text`, `answer`, or `error` - `message`: the main content of the response - `metadata`: additional information depending on the message type (e.g., answer metadata includes analytics and visualization details) #### Error responses | Code | Description | |------|----------------------------------------------------------------------------------------------------------------------------------| | 401 | Unauthorized — authentication token is missing, expired, or invalid. | | 403 | Forbidden — the authenticated user does not have `CAN_USE_SPOTTER` privilege or lacks permission on the referenced conversation. | > ###### Note: > > - This endpoint is Generally Available from version 26.5.0.cl. > - This endpoint requires Spotter - please contact ThoughtSpot support to enable Spotter on your cluster. > - For real-time streamed responses, use `sendAgentConversationMessageStreaming` instead. + * @param conversationIdentifier Unique identifier for the conversation (used to track context) + * @param sendAgentConversationMessageRequest + */ + sendAgentConversationMessage(conversationIdentifier: string, sendAgentConversationMessageRequest: SendAgentConversationMessageRequest, _options?: Configuration): Promise; + /** + * Version: 26.5.0.cl or later Sends one or more natural language messages to an existing Spotter agent conversation and returns the response as a real-time Server-Sent Events stream. Requires `CAN_USE_SPOTTER` privilege and access to the metadata object associated with the conversation. The user must have access to the conversation session referenced by `conversation_identifier`. A conversation must first be created using the `createAgentConversation` API. #### Usage guidelines The request must include: - `conversation_identifier`: the unique session ID returned by `createAgentConversation`, used for context continuity and message tracking - `messages`: an array of one or more text messages to send to the agent If the request is valid, the API returns a Server-Sent Events (SSE) stream. Each line has the form `data: [{\"type\": \"...\", ...}]` — a JSON array of event objects. Event types include: - `ack`: confirms receipt of the request (`node_id`) - `conv_title`: conversation title (`title`, `conv_id`) - `notification`: status updates on operations (`group_id`, `metadata`, `code` — e.g. `TOOL_CALL_NOTIFICATION`, `nls_start`, `FINAL_RESPONSE_NOTIFICATION`) - `text-chunk`: incremental content chunks (`id`, `group_id`, `metadata` with `format` and `type` such as `thinking` or `text`, `content`) - `text`: full text block with same structure as `text-chunk` - `answer`: structured answer with metadata (`id`, `group_id`, `metadata` with `sage_query`, `session_id`, `title`, etc., `title`) - `error`: if a failure occurs #### Error responses | Code | Description | | ---- | -------------------------------------------------------------------------------------------------------------------------------- | | 401 | Unauthorized — authentication token is missing, expired, or invalid. | | 403 | Forbidden — the authenticated user does not have `CAN_USE_SPOTTER` privilege or lacks permission on the referenced conversation. | > ###### Note: > > - This endpoint is Generally Available from version 26.5.0.cl. > - This endpoint requires Spotter - please contact ThoughtSpot support to enable Spotter on your cluster. > - The streaming protocol uses Server-Sent Events (SSE). > - For the complete response in a single payload, use `sendAgentConversationMessage` instead. + * @param conversationIdentifier Unique identifier for the conversation (used to track context) + * @param sendAgentConversationMessageStreamingRequest + */ + sendAgentConversationMessageStreaming(conversationIdentifier: string, sendAgentConversationMessageStreamingRequest: SendAgentConversationMessageStreamingRequest, _options?: Configuration): Promise; + /** + * Version: 26.2.0.cl or later **Deprecated** — Use `sendAgentConversationMessage` instead. Send natural language messages to an existing Spotter agent conversation and returns the complete response synchronously. Requires `CAN_USE_SPOTTER` privilege and access to the metadata object associated with the conversation. The user must have access to the conversation session referenced by `conversation_identifier`. A conversation must first be created using the `createAgentConversation` API. #### Usage guidelines The request must include: - `conversation_identifier`: the unique session ID returned by `createAgentConversation`, used for context continuity and message tracking - `messages`: an array of one or more text messages to send to the agent The API returns an array of response objects, each containing: - `type`: the kind of response — `text`, `answer`, or `error` - `message`: the main content of the response - `metadata`: additional information depending on the message type (e.g., answer metadata includes analytics and visualization details) #### Error responses | Code | Description | |------|----------------------------------------------------------------------------------------------------------------------------------| | 401 | Unauthorized — authentication token is missing, expired, or invalid. | | 403 | Forbidden — the authenticated user does not have `CAN_USE_SPOTTER` privilege or lacks permission on the referenced conversation. | > ###### Note: > > - This endpoint is deprecated. Use `sendAgentConversationMessage` for new integrations. > - This endpoint is currently in Beta. Breaking changes may be introduced before the endpoint is made Generally Available. > - This endpoint requires Spotter - please contact ThoughtSpot support to enable Spotter on your cluster. + * @param conversationIdentifier Unique identifier for the conversation (used to track context) + * @param sendAgentMessageRequest + */ + sendAgentMessage(conversationIdentifier: string, sendAgentMessageRequest: SendAgentMessageRequest, _options?: Configuration): Promise; + /** + * Version: 26.2.0.cl or later **Deprecated** — Use `sendAgentConversationMessageStreaming` instead. Sends one or more natural language messages to an existing Spotter agent conversation and returns the response as a real-time Server-Sent Events stream. Requires `CAN_USE_SPOTTER` privilege and access to the metadata object associated with the conversation. The user must have access to the conversation session referenced by `conversation_identifier`. A conversation must first be created using the `createAgentConversation` API. #### Usage guidelines The request must include: - `conversation_identifier`: the unique session ID returned by `createAgentConversation`, used for context continuity and message tracking - `messages`: an array of one or more text messages to send to the agent If the request is valid, the API returns a Server-Sent Events (SSE) stream. Each line has the form `data: [{\"type\": \"...\", ...}]` — a JSON array of event objects. Event types include: - `ack`: confirms receipt of the request (`node_id`) - `conv_title`: conversation title (`title`, `conv_id`) - `notification`: status updates on operations (`group_id`, `metadata`, `code` — e.g. `TOOL_CALL_NOTIFICATION`, `nls_start`, `FINAL_RESPONSE_NOTIFICATION`) - `text-chunk`: incremental content chunks (`id`, `group_id`, `metadata` with `format` and `type` such as `thinking` or `text`, `content`) - `text`: full text block with same structure as `text-chunk` - `answer`: structured answer with metadata (`id`, `group_id`, `metadata` with `sage_query`, `session_id`, `title`, etc., `title`) - `error`: if a failure occurs #### Error responses | Code | Description | |------|----------------------------------------------------------------------------------------------------------------------------------| | 401 | Unauthorized — authentication token is missing, expired, or invalid. | | 403 | Forbidden — the authenticated user does not have `CAN_USE_SPOTTER` privilege or lacks permission on the referenced conversation. | > ###### Note: > > - This endpoint is deprecated. Use `sendAgentConversationMessageStreaming` for new integrations. > - This endpoint is currently in Beta. Breaking changes may be introduced before the endpoint is made Generally Available. > - This endpoint requires Spotter - please contact ThoughtSpot support to enable Spotter on your cluster. > - The streaming protocol uses Server-Sent Events (SSE). + * @param sendAgentMessageStreamingRequest + */ + sendAgentMessageStreaming(sendAgentMessageStreamingRequest: SendAgentMessageStreamingRequest, _options?: Configuration): Promise; + /** + * Version: 10.4.0.cl or later Sends a follow-up message to an existing conversation within the context of a data model. Requires `CAN_USE_SPOTTER` privilege and at least view access to the metadata object specified in the request. A conversation must first be created using the `createConversation` API. #### Usage guidelines The request must include: - `conversation_identifier`: the unique session ID returned by `createConversation` - `metadata_identifier`: the unique ID of the data source used for the conversation - `message`: a natural language string with the follow-up question If the request is successful, the API returns an array of response messages, each containing: - `session_identifier`: the unique ID of the generated response - `generation_number`: the generation number of the response - `message_type`: the type of the response (e.g., `TSAnswer`) - `visualization_type`: the generated visualization type (`Chart`, `Table`, or `Undefined`) - `tokens` / `display_tokens`: the search tokens and user-friendly display tokens for the response #### Error responses | Code | Description | |------|-----------------------------------------------------------------------------------------------------------------------------------------| | 401 | Unauthorized — authentication token is missing, expired, or invalid. | | 403 | Forbidden — the authenticated user does not have `CAN_USE_SPOTTER` privilege or lacks view permission on the specified metadata object. | > ###### Note: > * This endpoint is currently in Beta. Breaking changes may be introduced before the endpoint is made Generally Available. > * This endpoint requires Spotter - please contact ThoughtSpot support to enable Spotter on your cluster. + * @param conversationIdentifier Unique identifier of the conversation. + * @param sendMessageRequest + */ + sendMessage(conversationIdentifier: string, sendMessageRequest: SendMessageRequest, _options?: Configuration): Promise; + /** + * Version: 10.15.0.cl or later This API allows users to set natural language (NL) instructions for a specific data-model to improve AI-generated answers and query processing. These instructions help guide the AI system to better understand the data context and provide more accurate responses. Requires `CAN_USE_SPOTTER` privilege, either edit access or `SPOTTER_COACHING_PRIVILEGE` on the data model, and a bearer token corresponding to the org where the data model exists. #### Usage guidelines To set NL instructions for a data-model, the request must include: - `data_source_identifier`: The unique ID of the data-model for which to set NL instructions - `nl_instructions_info`: An array of instruction objects, each containing: - `instructions`: Array of text instructions for the LLM - `scope`: The scope of the instruction (`GLOBAL`). Currently only `GLOBAL` is supported. It can be extended to data-model-user scope in future. #### Instructions scope - **GLOBAL**: instructions that apply to all users querying this data model If the request is successful, the API returns: - `success`: a boolean indicating whether the operation completed successfully #### Error responses | Code | Description | |------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| | 401 | Unauthorized — authentication token is missing, expired, or invalid. | | 403 | Forbidden — the authenticated user does not have `CAN_USE_SPOTTER` privilege, lacks edit access or `SPOTTER_COACHING_PRIVILEGE` on the data model, or the bearer token does not correspond to the org where the data model exists. | > ###### Note: > > - To use this API, the user needs either edit access or `SPOTTER_COACHING_PRIVILEGE` on the data model, and must use the bearer token corresponding to the org where the data model exists. > - This endpoint is currently in Beta. Breaking changes may be introduced before the endpoint is made Generally Available. > - Available from version 10.15.0.cl and later. > - This endpoint requires Spotter — please contact ThoughtSpot Support to enable Spotter on your cluster. > - Instructions help improve the accuracy and relevance of AI-generated responses for the specified data-model. + * @param setNLInstructionsRequest + */ + setNLInstructions(setNLInstructionsRequest: SetNLInstructionsRequest, _options?: Configuration): Promise; + /** + * Version: 9.0.0.cl or later Allows sharing one or several metadata objects with users and groups in ThoughtSpot. Requires edit access to the metadata object. #### Supported metadata objects: * Liveboards * Visualizations * Answers * Models * Views * Connections * Collections #### Object permissions You can provide `READ_ONLY` or `MODIFY` access when sharing an object with another user or group. The `READ_ONLY` permission grants view access to the shared object, whereas `MODIFY` provides edit access. To prevent a user or group from accessing the shared object, specify the GUID or name of the principal and set `shareMode` to `NO_ACCESS`. #### Sharing a visualization * Sharing a visualization implicitly shares the entire Liveboard with the recipient. * Object permissions set for a shared visualization also apply to the Liveboard unless overridden by another API request or via UI. * If email notifications for object sharing are enabled, a notification with a link to the shared visualization will be sent to the recipient’s email address. Although this link opens the shared visualization, recipients can also access other visualizations in the Liveboard. #### Sharing a collection Collections support **dual permissions** that provide fine-grained control: * **Collection permissions** (`share_mode`) - controls access to the collection itself (view, edit, delete the collection) * **Content permissions** (`content_share_mode`) - controls access to objects within the collection (view, edit objects inside) **Default Behavior:** - If only `share_mode` is specified, the content permissions default to `READ_ONLY` (except when `share_mode` is `NO_ACCESS`, then content also gets `NO_ACCESS`) - To give users edit access to collection contents, explicitly set `content_share_mode: \"MODIFY\"` ## Examples The following JSON examples can be copy-pasted as request bodies for the REST v2 API endpoint: ```bash POST /callosum/v1/v2/security/metadata/share Content-Type: application/x-www-form-urlencoded ``` ### Basic collection sharing Share a collection with read-only access: ```json { \"metadata_type\": \"COLLECTION\", \"metadata_identifiers\": [\"Sales Reports Collection\"], \"permissions\": [{ \"principal\": { \"type\": \"USER\", \"identifier\": \"alice@company.com\" }, \"share_mode\": \"READ_ONLY\" }], \"notification\": { \"message\": \"I\'ve shared the Sales Reports collection with you\", \"notify_on_share\": true } } ``` ### Collection sharing with dual permissions Share a collection with different permissions for the collection vs. its contents: ```json { \"metadata_type\": \"COLLECTION\", \"metadata_identifiers\": [\"Marketing Analytics\"], \"permissions\": [{ \"principal\": { \"type\": \"USER\", \"identifier\": \"bob@company.com\" }, \"share_mode\": \"MODIFY\", \"content_share_mode\": \"READ_ONLY\" }, { \"principal\": { \"type\": \"USER_GROUP\", \"identifier\": \"Marketing Team\" }, \"share_mode\": \"READ_ONLY\", \"content_share_mode\": \"READ_ONLY\" }], \"notification\": { \"emails\": [\"bob@company.com\"], \"message\": \"You can edit the collection but content is read-only\", \"enable_custom_url\": false, \"notify_on_share\": true }, \"has_lenient_discoverability\": false } ``` ### Multiple collections sharing Share multiple collections with different users: ```json { \"metadata\": [ { \"type\": \"COLLECTION\", \"identifier\": \"Q4 Reports\" }, { \"type\": \"COLLECTION\", \"identifier\": \"Executive Dashboard Collection\" } ], \"permissions\": [{ \"principal\": { \"type\": \"USER_GROUP\", \"identifier\": \"Executives\" }, \"share_mode\": \"MODIFY\" }, { \"principal\": { \"type\": \"USER\", \"identifier\": \"manager@company.com\" }, \"share_mode\": \"READ_ONLY\", \"content_share_mode\": \"MODIFY\" }], \"notification\": { \"message\": \"Sharing quarterly collections with leadership team\", \"notify_on_share\": true } } ``` ### Remove collection access Remove access to a collection by setting share_mode to NO_ACCESS: ```json { \"metadata_type\": \"COLLECTION\", \"metadata_identifiers\": [\"Confidential Reports\"], \"permissions\": [{ \"principal\": { \"type\": \"USER\", \"identifier\": \"former-employee@company.com\" }, \"share_mode\": \"NO_ACCESS\" }], \"notification\": { \"notify_on_share\": false } } ``` ### Collection Permission Scenarios **Scenario 1: Collection Admin** - `share_mode: MODIFY` + `content_share_mode: MODIFY` = Full control over collection and its contents **Scenario 2: Collection Curator** - `share_mode: MODIFY` + `content_share_mode: READ_ONLY` = Can manage collection structure but not edit contents **Scenario 3: Content Editor** - `share_mode: READ_ONLY` + `content_share_mode: MODIFY` = Can edit objects within collection but can\'t change collection itself **Scenario 4: Viewer** - `share_mode: READ_ONLY` + `content_share_mode: READ_ONLY` = View-only access to collection and contents + * @param shareMetadataRequest + */ + shareMetadata(shareMetadataRequest: ShareMetadataRequest, _options?: Configuration): Promise; + /** + * Version: 10.4.0.cl or later Processes a natural language query against a specified data model and returns a single AI-generated answer without requiring a conversation session. Requires `CAN_USE_SPOTTER` privilege and at least view access to the metadata object specified in the request. #### Usage guidelines The request must include: - `query`: a natural language question (e.g., \"What were total sales last quarter?\") - `metadata_identifier`: the unique ID of the data source to query against If the request is successful, the API returns a response message containing: - `session_identifier`: the unique ID of the generated response - `generation_number`: the generation number of the response - `message_type`: the type of the response (e.g., `TSAnswer`) - `visualization_type`: the generated visualization type (`Chart`, `Table`, or `Undefined`) - `tokens` / `display_tokens`: the search tokens and user-friendly display tokens for the response #### Error responses | Code | Description | |------|-----------------------------------------------------------------------------------------------------------------------------------------| | 401 | Unauthorized — authentication token is missing, expired, or invalid. | | 403 | Forbidden — the authenticated user does not have `CAN_USE_SPOTTER` privilege or lacks view permission on the specified metadata object. | > ###### Note: > * This endpoint is currently in Beta. Breaking changes may be introduced before the endpoint is made Generally Available. > * This endpoint requires Spotter - please contact ThoughtSpot support to enable Spotter on your cluster. + * @param singleAnswerRequest + */ + singleAnswer(singleAnswerRequest: SingleAnswerRequest, _options?: Configuration): Promise; + /** + * Stops an in-progress agent conversation response. Version: 26.6.0.cl or later Version: 26.6.0.cl or later Stops an in-progress agent response for the specified conversation. Use this endpoint to cancel a response that is actively being generated — for example, when the user navigates away, reformulates their question, or no longer needs the current result. Requires `CAN_USE_SPOTTER` privilege and access to the specified conversation. #### Usage guidelines The request must include: - `conversation_identifier` *(path parameter)*: the unique ID of the conversation whose active response should be stopped, as returned by `createAgentConversation` A successful request returns an empty `204 No Content` response. If there is no active response in progress at the time of the call, the request is still treated as successful. After stopping a response, the conversation session remains active. You can continue sending messages using `sendAgentConversationMessage` or `sendAgentConversationMessageStreaming`. #### Example request ```bash POST /api/rest/2.0/ai/agent/conversation/{conversation_identifier}/stop-response ``` #### Typical usage scenario This endpoint is useful when integrating Spotter into a chat UI where users can cancel a long-running query. For example: 1. User sends a message via `sendAgentConversationMessageStreaming`. 2. User clicks a \"Stop generating\" button while the response is streaming. 3. Your client calls `stopConversation` with the active `conversation_identifier`. 4. The stream is terminated and the user can ask a new question. #### Error responses | Code | Description | |------|-------------| | 401 | Unauthorized — authentication token is missing, expired, or invalid. | | 403 | Forbidden — the authenticated user does not have `CAN_USE_SPOTTER` privilege or lacks access to the specified conversation. | > ###### Note: > > - Calling this endpoint when no response is in progress does not return an error. > - The conversation context is preserved after stopping — previous messages and answers remain accessible. > - Available from version 26.6.0.cl and later. > - This endpoint requires Spotter — please contact ThoughtSpot Support to enable Spotter on your cluster. > - This feature is available only for **Spotter 3** (`SPOTTER3`) version. + * @param conversationIdentifier Unique identifier of the conversation to stop. + */ + stopConversation(conversationIdentifier: string, _options?: Configuration): Promise; + /** + * Version: 26.5.0.cl or later Synchronizes connection metadata attributes from your Cloud Data Warehouse (CDW) with ThoughtSpot. Requires the `DATAMANAGEMENT` (**Can manage data**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` (**Can manage data models**) privilege is required. #### Usage guidelines To synchronize attributes from a CDW, specify the connection GUID or name in the `connection_identifier` path parameter and `sync_attributes` in the request body. Default attribute is `[\"DESCRIPTION\"]`. ##### Hierarchical schema * Connection: The connection object for the sync operation. * Tables: Tables for the sync operation. When no table is specified, all tables are synchronized. * Columns: If the table is specified, you can add the columns for the sync operation. If no columns are specified, all columns in the specified table are considered for the sync operation. To set the scope for the sync operation: * Connection-level: To sync all tables and columns, pass an empty request body, or only the attributes in the request body. * Table-level: To synchronize specific tables and their columns, specify the table identifiers in the `tables` array. * Column-level: To synchronize specific columns, specify the table identifier as the key and column identifiers as the value in the `tables` array. ``` { \"tables\": [ {\"table-guid-1\": [\"column-guid-1\", \"column-guid-2\"]}, \"table-guid-2\" ], \"sync_attributes\": [\"DESCRIPTION\"] } ``` ##### API response If the sync operation is successful, the API returns the following information: * Status of the sync operation. For example, `SUCCESS`, `PARTIAL_SUCCESS`, or `NO_UPDATE`. * Number of tables and columns that were updated. * Number of tables and columns with the sync failed status when the overall sync status is `PARTIAL_SUCCESS`. * Message text indicating the sync results. + * @param connectionIdentifier Unique ID or name of the connection. + * @param syncMetadataRequest + */ + syncMetadata(connectionIdentifier: string, syncMetadataRequest: SyncMetadataRequest, _options?: Configuration): Promise; + /** + * Version: 9.0.0.cl or later Removes the tags applied to a Liveboard, Answer, Table, or Worksheet. Requires edit access to the metadata object. + * @param unassignTagRequest + */ + unassignTag(unassignTagRequest: UnassignTagRequest, _options?: Configuration): Promise; + /** + * Remove parameterization from fields in metadata objects. Version: 26.5.0.cl or later Allows removing parameterization from fields in metadata objects in ThoughtSpot. Requires appropriate permissions to modify the metadata object. The API endpoint allows unparameterizing the following types of metadata objects: * Logical Tables * Connections * Connection Configs For a Logical Table the field type must be `ATTRIBUTE` and field name can be one of: * databaseName * schemaName * tableName For a Connection or Connection Config, the field type is always `CONNECTION_PROPERTY`. In this case, field_name specifies the exact property of the Connection or Connection Config that needs to be unparameterized. For Connection Config, the only supported field name is: * impersonate_user + * @param unparameterizeMetadataRequest + */ + unparameterizeMetadata(unparameterizeMetadataRequest: UnparameterizeMetadataRequest, _options?: Configuration): Promise; + /** + * Version: 26.5.0.cl or later Allows unpublishing metadata objects from organizations in ThoughtSpot. Requires ADMINISTRATION role and TENANT scope. The API endpoint allows unpublishing the following types of metadata objects: * Liveboards * Answers * Logical Tables When unpublishing objects, you can: * Include dependencies by setting `include_dependencies` to true - this will unpublish all dependent objects if no other published object is using them * Force unpublish by setting `force` to true - this will break all dependent objects in the unpublished organizations + * @param unpublishMetadataRequest + */ + unpublishMetadata(unpublishMetadataRequest: UnpublishMetadataRequest, _options?: Configuration): Promise; + /** + * Version: 10.12.0.cl or later Updates the properties of a [custom calendar](https://docs.thoughtspot.com/cloud/latest/connections-cust-cal). Requires `DATAMANAGEMENT` (**Can manage data**) or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your ThoughtSpot instance, the `CAN_MANAGE_CUSTOM_CALENDAR` (**Can manage custom calendars**) privilege is required. #### Usage guidelines You can update the properties of a calendar using one of the following methods: * `FROM_INPUT_PARAMS` to update the calendar properties with the values defined in the API request. * `FROM_EXISTING_TABLE` Creates a calendar from the parameters defined in the API request. To update a custom calendar, specify the calendar ID as a path parameter in the request URL and the following parameters in the request body: * Connection ID and Table name * Database and schema name attributes: For most Cloud Data Warehouse (CDW) connectors, both `database_name` and `schema_name` attributes are required. However, the attribute requirements are conditional and vary based on the connector type and its metadata structure. For example, for connectors such as Teradata, MySQL, SingleSore, Amazon Aurora MySQL, Amazon RDS MySQL, Oracle, and GCP_MYSQL, the `schema_name` is required, whereas the `database_name` attribute is not. Similarly, connectors such as ClickHouse require you to specify the `database_name` and the schema specification in such cases is optional. The API allows you to modify the calendar type, month offset value, start and end date, starting day of the week, and prefixes assigned to the year and quarter labels. #### Examples Update a custom calendar using an existing Table in ThoughtSpot: ``` { \"update_method\": \"FROM_EXISTING_TABLE\", \"table_reference\": { \"connection_identifier\": \"Connection1\", \"database_name\": \"db1\", \"table_name\": \"custom_calendar_2025\", \"schame_name\": \"schemaVar\" } } ``` Update a custom calendar with the attributes defined in the API request: ``` { \"update_method\": \"FROM_INPUT_PARAMS\", \"table_reference\": { \"connection_identifier\": \"Connection1\", \"database_name\": \"db1\", \"table_name\": \"custom_calendar_2025\", \"schame_name\": \"schemaVar\" }, \"month_offset\": \"August\", \"start_day_of_week\": \"Monday\", \"start_date\": \"08/01/2025\", \"end_date\": \"07/31/2026\" } ``` + * @param calendarIdentifier Unique Id or name of the calendar. + * @param updateCalendarRequest + */ + updateCalendar(calendarIdentifier: string, updateCalendarRequest: UpdateCalendarRequest, _options?: Configuration): Promise; + /** + * Version: 26.4.0.cl or later Updates an existing collection in ThoughtSpot. #### Supported operations This API endpoint lets you perform the following operations: * Update collection name and description * Change visibility settings * Add metadata objects to the collection (operation: ADD) * Remove metadata objects from the collection (operation: REMOVE) * Replace all metadata objects in the collection (operation: REPLACE) #### Operation types * **ADD**: Adds the specified metadata objects to the existing collection without removing current items * **REMOVE**: Removes only the specified metadata objects from the collection * **REPLACE**: Replaces all existing metadata objects with the specified items (default behavior) + * @param collectionIdentifier Unique GUID of the collection. Note: Collection names cannot be used as identifiers since duplicate names are allowed. + * @param updateCollectionRequest + */ + updateCollection(collectionIdentifier: string, updateCollectionRequest: UpdateCollectionRequest, _options?: Configuration): Promise; + /** + * Version: 10.12.0.cl or later Creates, updates, or deletes column security rules for specified tables. This API endpoint allows you to create, update, or delete column-level security rules on columns of a table. The operation follows an \"all or none\" policy: if defining security rules for any of the provided columns fails, the entire operation will be rolled back, and no rules will be created. #### Usage guidelines - Provide table identifier using either `identifier` (GUID or name) or `obj_identifier` (object ID) - Use `clear_csr: true` to remove all column security rules from the table - For each column, specify the security rule using `column_security_rules` array - Use `is_unsecured: true` to mark a specific column as unprotected - Use `group_access` operations to manage group associations: - `ADD`: Add groups to the column\'s access list - `REMOVE`: Remove groups from the column\'s access list - `REPLACE`: Replace all existing groups with the specified groups #### Required permissions - `ADMINISTRATION` - Can administer ThoughtSpot - `DATAMANAGEMENT` - Can manage data (if RBAC is disabled) - `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` - Can manage worksheet views and tables (if RBAC is enabled) #### Example request ```json { \"identifier\": \"table-guid\", \"obj_identifier\": \"table-object-id\", \"clear_csr\": false, \"column_security_rules\": [ { \"column_identifier\": \"col id or col name\", \"is_unsecured\": false, \"group_access\": [ { \"operation\": \"ADD\", \"group_identifiers\": [\"hr_group_id\", \"hr_group_name\", \"finance_group_id\"] } ] }, { \"column_identifier\": \"col id or col name\", \"is_unsecured\": true }, { \"column_identifier\": \"col id or col name\", \"is_unsecured\": false, \"group_access\": [ { \"operation\": \"REPLACE\", \"group_identifiers\": [\"management_group_id\", \"management_group_name\"] } ] } ] } ``` #### Request Body Schema - `identifier` (string, optional): GUID or name of the table for which we want to create column security rules - `obj_identifier` (string, optional): The object ID of the table - `clear_csr` (boolean, optional): If true, then all the secured columns will be marked as unprotected, and all the group associations will be removed - `column_security_rules` (array of objects, required): An array where each object defines the security rule for a specific column Each column security rule object contains: - `column_identifier` (string, required): Column identifier (col_id or name) - `is_unsecured` (boolean, optional): If true, the column will be marked as unprotected and all groups associated with it will be removed - `group_access` (array of objects, optional): Array of group operation objects Each group operation object contains: - `operation` (string, required): Operation type - ADD, REMOVE, or REPLACE - `group_identifiers` (array of strings, required): Array of group identifiers (name or GUID) on which the operation will be performed #### Response This API does not return any response body. A successful operation returns HTTP 200 status code. #### Operation Types - **ADD**: Adds the specified groups to the column\'s access list - **REMOVE**: Removes the specified groups from the column\'s access list - **REPLACE**: Replaces all existing groups with the specified groups + * @param updateColumnSecurityRulesRequest + */ + updateColumnSecurityRules(updateColumnSecurityRulesRequest: UpdateColumnSecurityRulesRequest, _options?: Configuration): Promise; + /** + * Version: 9.2.0.cl or later Updates Git repository configuration settings. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance on your instance, the `CAN_SETUP_VERSION_CONTROL` (**Can set up version control**) privilege. + * @param updateConfigRequest + */ + updateConfig(updateConfigRequest: UpdateConfigRequest, _options?: Configuration): Promise; + /** + * Version: 9.2.0.cl or later **Important**: This endpoint is deprecated and will be removed from ThoughtSpot in September 2025. ThoughtSpot strongly recommends using the [Update connection V2](#/http/api-endpoints/connections/update-connection-v2) endpoint to update your connection objects. #### Usage guidelines Updates a connection object. Requires `DATAMANAGEMENT` (**Can manage data**) and edit permissions to the connection object, or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) privilege is required. To update a connection object, pass these parameters in your API request: 1. GUID of the connection object. 2. If you are updating tables or database schema of a connection object: a. Add the updated JSON map of metadata with database, schema, and tables in `data_warehouse_config`. b. Set `validate` to `true`. 3. If you are updating a configuration attribute, connection name, or description, you can set `validate` to `false`. + * @param updateConnectionRequest + */ + updateConnection(updateConnectionRequest: UpdateConnectionRequest, _options?: Configuration): Promise; + /** + * Version: 10.12.0.cl or later Updates a connection configuration object. Requires `DATAMANAGEMENT` (**Can manage data**) and edit permissions to the connection object, or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) privilege is required. #### Supported operations This API endpoint lets you perform the following operations in a single API request: * Edit the name or description of the configuration * Edit the configuration properties * Edit the `policy_type` * Edit the type of authentication * Enable or disable a configuration #### Parameterized Connection Support For parameterized oauth based connections, only the `same_as_parent` and `policy_process_options` attributes are allowed. These attributes are not applicable to connections that are not parameterized. **NOTE**: When updating a configuration where `disabled` is `true`, you must reset `disabled` to `true` in your update request payload. If not explicitly set again, the API will default `disabled` to `false`. + * @param configurationIdentifier Unique ID or name of the configuration. + * @param updateConnectionConfigurationRequest + */ + updateConnectionConfiguration(configurationIdentifier: string, updateConnectionConfigurationRequest: UpdateConnectionConfigurationRequest, _options?: Configuration): Promise; + /** + * Version: 26.6.0.cl or later Activates or deactivates a connection. A deactivated connection cannot be used for queries or operations until it is activated again. Requires `DATAMANAGEMENT` (**Can manage data**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) privilege is required. Only the connection owner or an administrator can perform this operation. #### Usage guidelines To update the status of a connection, specify the connection GUID or name in the `connection_identifier` path parameter and the desired `status` in the request body. - **ACTIVATED**: Enables the connection. Queries and operations can resume on an activated connection. - **DEACTIVATED**: Disables the connection. It does not remove the connection metadata, but only makes the connection unavailable for queries and operations. You can reactivate a deactivated connection by setting \"status\": \"ACTIVATED\". + * @param connectionIdentifier Unique ID or name of the connection. + * @param updateConnectionStatusRequest + */ + updateConnectionStatus(connectionIdentifier: string, updateConnectionStatusRequest: UpdateConnectionStatusRequest, _options?: Configuration): Promise; + /** + * Version: 10.4.0.cl or later Updates a connection object. Requires `DATAMANAGEMENT` (**Can manage data**) and edit permissions to the connection object, or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) privilege is required. To update a connection object, pass these parameters in your API request: 1. GUID of the connection object. 2. If you are updating tables or database schema of a connection object: a. Add the updated JSON map of metadata with database, schema, and tables in `data_warehouse_config`. b. Set `validate` to `true`. **NOTE:** If the `authentication_type` is anything other than SERVICE_ACCOUNT, you must explicitly provide the authenticationType property in the payload. If you do not specify authenticationType, the API will default to SERVICE_ACCOUNT as the authentication type. * A JSON map of configuration attributes, database details, and table properties in `data_warehouse_config` as shown in the following example: * This is an example of updating a single table in a empty connection: ``` { \"authenticationType\": \"SERVICE_ACCOUNT\", \"externalDatabases\": [ { \"name\": \"DEVELOPMENT\", \"isAutoCreated\": false, \"schemas\": [ { \"name\": \"TS_dataset\", \"tables\": [ { \"name\": \"DEMORENAME\", \"type\": \"TABLE\", \"description\": \"\", \"selected\": true, \"linked\": true, \"gid\": 0, \"datasetId\": \"-1\", \"subType\": \"\", \"reportId\": \"\", \"viewId\": \"\", \"columns\": [ { \"name\": \"Col1\", \"type\": \"VARCHAR\", \"canImport\": true, \"selected\": true, \"description\": \"\", \"isLinkedActive\": true, \"isAggregate\": false }, { \"name\": \"Col2\", \"type\": \"VARCHAR\", \"canImport\": true, \"selected\": true, \"description\": \"\", \"isLinkedActive\": true, \"isAggregate\": false }, { \"name\": \"Col3\", \"type\": \"VARCHAR\", \"canImport\": true, \"selected\": true, \"description\": \"\", \"isLinkedActive\": true, \"isAggregate\": false }, { \"name\": \"Col312\", \"type\": \"VARCHAR\", \"canImport\": true, \"selected\": true, \"description\": \"\", \"isLinkedActive\": true, \"isAggregate\": false }, { \"name\": \"Col4\", \"type\": \"VARCHAR\", \"canImport\": true, \"selected\": true, \"description\": \"\", \"isLinkedActive\": true, \"isAggregate\": false } ], \"relationships\": [] } ] } ] } ], \"configuration\": { \"password\": \"\", \"database\": \"DEVELOPMENT\", \"role\": \"DEV\", \"accountName\": \"thoughtspot_partner\", \"warehouse\": \"DEMO_WH\", \"user\": \"DEV_USER\" } } ``` * This is an example of updating a single table in an existing connection with tables: ``` { \"authenticationType\": \"SERVICE_ACCOUNT\", \"externalDatabases\": [ { \"name\": \"DEVELOPMENT\", \"isAutoCreated\": false, \"schemas\": [ { \"name\": \"TS_dataset\", \"tables\": [ { \"name\": \"CUSTOMER\", \"type\": \"TABLE\", \"description\": \"\", \"selected\": true, \"linked\": true, \"gid\": 0, \"datasetId\": \"-1\", \"subType\": \"\", \"reportId\": \"\", \"viewId\": \"\", \"columns\": [], \"relationships\": [] }, { \"name\": \"tpch5k_falcon_default_schema_users\", \"type\": \"TABLE\", \"description\": \"\", \"selected\": true, \"linked\": true, \"gid\": 0, \"datasetId\": \"-1\", \"subType\": \"\", \"reportId\": \"\", \"viewId\": \"\", \"columns\": [ { \"name\": \"user_id\", \"type\": \"INT64\", \"canImport\": true, \"selected\": true, \"description\": \"\", \"isLinkedActive\": true, \"isAggregate\": false }, { \"name\": \"product_id\", \"type\": \"INT64\", \"canImport\": true, \"selected\": true, \"description\": \"\", \"isLinkedActive\": true, \"isAggregate\": false }, { \"name\": \"user_cost\", \"type\": \"INT64\", \"canImport\": true, \"selected\": true, \"description\": \"\", \"isLinkedActive\": true, \"isAggregate\": false } ], \"relationships\": [] } ] } ] } ], \"configuration\": { \"password\": \"\", \"database\": \"DEVELOPMENT\", \"role\": \"DEV\", \"accountName\": \"thoughtspot_partner\", \"warehouse\": \"DEMO_WH\", \"user\": \"DEV_USER\" } } ``` 3. If you are updating a configuration attribute, connection name, or description, you can set `validate` to `false`. **NOTE:** If the `authentication_type` is anything other than SERVICE_ACCOUNT, you must explicitly provide the authenticationType property in the payload. If you do not specify authenticationType, the API will default to SERVICE_ACCOUNT as the authentication type. * A JSON map of configuration attributes in `data_warehouse_config`. The following example shows the configuration attributes for a Snowflake connection: ``` { \"configuration\":{ \"accountName\":\"thoughtspot_partner\", \"user\":\"tsadmin\", \"password\":\"TestConn123\", \"role\":\"sysadmin\", \"warehouse\":\"MEDIUM_WH\" }, \"externalDatabases\":[ ] } ``` + * @param connectionIdentifier Unique ID or name of the connection. + * @param updateConnectionV2Request + */ + updateConnectionV2(connectionIdentifier: string, updateConnectionV2Request: UpdateConnectionV2Request, _options?: Configuration): Promise; + /** + * Version: 9.6.0.cl or later Updates a custom action. Requires `DEVELOPER` (**Has Developer privilege**) or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `DEVELOPER` (**Has developer privilege**) privilege is required. #### Usage Guidelines The API allows you to modify the following properties: * Name of the custom action * Action availability to groups * Association to metadata objects * Authentication settings for a URL-based action For more information, see [Custom actions](https://developers.thoughtspot.com/docs/custom-action-intro). + * @param customActionIdentifier Unique ID or name of the custom action. + * @param updateCustomActionRequest + */ + updateCustomAction(customActionIdentifier: string, updateCustomActionRequest: UpdateCustomActionRequest, _options?: Configuration): Promise; + /** + * Version: 9.9.0.cl or later Updates a DBT connection object. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege or `DATAMANAGEMENT` (**Can manage data ThoughtSpot**) privilege, along with an existing DBT connection. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the following data control privileges may be required: - `CAN_MANAGE_CUSTOM_CALENDAR`(**Can manage custom calendars**) - `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) - `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` (**Can manage data models**) #### About update DBT connection You can modify DBT connection object properties such as embrace connection name, embrace database name, import type, account identifier, access token, project identifier and environment (or) embrace connection, embrace database name, import type, file_content settings. + * @param dbtConnectionIdentifier Unique ID of the DBT Connection. + * @param connectionName Name of the connection. + * @param databaseName Name of the Database. + * @param importType Mention type of Import + * @param accessToken Access token is mandatory when Import_Type is DBT_CLOUD. + * @param dbtUrl DBT URL is mandatory when Import_Type is DBT_CLOUD. + * @param accountId Account ID is mandatory when Import_Type is DBT_CLOUD + * @param projectId Project ID is mandatory when Import_Type is DBT_CLOUD + * @param dbtEnvId DBT Environment ID\\\" + * @param projectName Name of the project + * @param fileContent Upload DBT Manifest and Catalog artifact files as a ZIP file. This field is Mandatory when Import Type is \\\'ZIP_FILE\\\' + */ + updateDbtConnection(dbtConnectionIdentifier: string, connectionName?: string, databaseName?: string, importType?: string, accessToken?: string, dbtUrl?: string, accountId?: string, projectId?: string, dbtEnvId?: string, projectName?: string, fileContent?: HttpFile, _options?: Configuration): Promise; + /** + * Version: 10.12.0.cl or later Updates a customization configuration for the notification email. #### Pre-requisites Requires `DEVELOPER` (**has developer privilege**) or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `DEVELOPER` (**Has developer privilege**) privilege is required. **NOTE**:This endpoint in currently in beta. Contact ThoughtSpot support to enable this on your instance. #### Usage guidelines To update a custom configuration pass these parameters in your API request: - A JSON map of configuration attributes `template_properties`. The following example shows a sample set of customization configuration: ``` { { \"cta_button_bg_color\": \"#444DEA\", \"cta_text_font_color\": \"#FFFFFF\", \"primary_bg_color\": \"#D3DEF0\", \"logo_url\": \"https://storage.pardot.com/710713/1642089901EbkRibJq/TS_fullworkmark_darkmode.png\", \"font_family\": \"\", \"product_name\": \"ThoughtSpot\", \"footer_address\": \"444 Castro St, Suite 1000 Mountain View, CA 94041\", \"footer_phone\": \"(800) 508-7008\", \"replacement_value_for_liveboard\": \"Dashboard\", \"replacement_value_for_answer\": \"Chart\", \"replacement_value_for_spot_iq\": \"AI Insights\", \"hide_footer_phone\": false, \"hide_footer_address\": false, \"hide_product_name\": false, \"hide_manage_notification\": false, \"hide_mobile_app_nudge\": false, \"hide_privacy_policy\": false, \"hide_ts_vocabulary_definitions\": false, \"hide_error_message\": false, \"hide_unsubscribe_link\": false, \"hide_notification_status\": false, \"hide_modify_alert\": false, \"company_website_url\": \"https://your-website.com/\", \"company_privacy_policy_url\" : \"https://link-to-privacy-policy.com/\", \"contact_support_url\": \"https://link-to-contact-support.com/\", \"hide_contact_support_url\": false, \"hide_logo_url\" : false } } ``` + * @param updateEmailCustomizationRequest + */ + updateEmailCustomization(updateEmailCustomizationRequest: UpdateEmailCustomizationRequest, _options?: Configuration): Promise; + /** + * Update header attributes for a given list of header objects. Version: 10.6.0.cl or later ## Prerequisites - **Privileges Required:** - `DATAMANAGEMENT` (Can manage data) or `ADMINISTRATION` (Can administer ThoughtSpot). - **Additional Privileges (if RBAC is enabled):** - `ORG_ADMINISTRATION` (Can manage orgs). --- ## Usage Guidelines ### Parameters 1. **headers_update** - **Description:** List of header objects with their attributes to be updated. Each object contains a list of attributes to be updated in the header. - **Usage:** - You must provide either `identifier` or `obj_identifier`, but not both. Both fields cannot be empty. - When `org_identifier` is set to `-1`, only the `identifier` value is accepted; `obj_identifier` is not allowed. 2. **org_identifier** - **Description:** GUID (Globally Unique Identifier) or name of the organization. - **Usage:** - Leaving this field empty assumes that the changes should be applied to the current organization - Provide `org_guid` or `org_name` to uniquely identify the organization where changes need to be applied. . - Provide `-1` if changes have to be applied across all the org. --- ## Note Currently, this API is enabled only for updating the `obj_identifier` attribute. Only `text` will be allowed in attribute\'s value. ## Best Practices 1. **Backup Before Conversion:** Always export metadata as a backup before initiating the update process --- ## Examples ### Only `identifier` is given ```json { \"headers_update\": [ { \"identifier\": \"guid_1\", \"obj_identifier\": \"\", \"type\": \"LOGICAL_COLUMN\", \"attributes\": [ { \"name\": \"obj_id\", \"value\": \"custom_object_id\" } ] } ], \"org_identifier\": \"orgGuid\" } ``` ### Only `obj_identifier` is given ```json { \"headers_update\": [ { \"obj_identifier\": \"custom_object_id\", \"type\": \"ANSWER\", \"attributes\": [ { \"name\": \"obj_id\", \"value\": \"custom_object_id\" } ] } ], \"org_identifier\": \"orgName\" } ``` ### Executing update for all org `-1` ```json { \"headers_update\": [ { \"identifier\": \"guid_1\", \"type\": \"ANSWER\", \"attributes\": [ { \"name\": \"obj_id\", \"value\": \"custom_object_id\" } ] } ], \"org_identifier\": -1 } ``` ### Optional `type` is not provided ```json { \"headers_update\": [ { \"identifier\": \"guid_1\", \"attributes\": [ { \"name\": \"obj_id\", \"value\": \"custom_object_id\" } ] } ], \"org_identifier\": -1 } ``` + * @param updateMetadataHeaderRequest + */ + updateMetadataHeader(updateMetadataHeaderRequest: UpdateMetadataHeaderRequest, _options?: Configuration): Promise; + /** + * Update object IDs for given metadata objects. Version: 10.8.0.cl or later ## Prerequisites - **Privileges Required:** - `DATAMANAGEMENT` (Can manage data) or `ADMINISTRATION` (Can administer ThoughtSpot). - **Additional Privileges (if RBAC is enabled):** - `ORG_ADMINISTRATION` (Can manage orgs). --- ## Usage Guidelines ### Parameters 1. **metadata** - **Description:** List of metadata objects to update their object IDs. - **Usage:** - Use either `current_obj_id` alone OR use `metadata_identifier` with `type` (when needed). - When using `metadata_identifier`, the `type` field is required if using a name instead of a GUID. - The `new_obj_id` field is always required. --- ## Note This API is specifically designed for updating object IDs of metadata objects. It internally uses the header update mechanism to perform the changes. ## Best Practices 1. **Backup Before Update:** Always export metadata as a backup before initiating the update process. 2. **Validation:** - When using `current_obj_id`, ensure it matches the existing object ID exactly. - When using `metadata_identifier` with a name, ensure the `type` is specified correctly. - Verify that the `new_obj_id` follows your naming conventions and is unique within your system. --- ## Examples ### Using current_obj_id ```json { \"metadata\": [ { \"current_obj_id\": \"existing_object_id\", \"new_obj_id\": \"new_object_id\" } ] } ``` ### Using metadata_identifier with GUID ```json { \"metadata\": [ { \"metadata_identifier\": \"01234567-89ab-cdef-0123-456789abcdef\", \"new_obj_id\": \"new_object_id\" } ] } ``` ### Using metadata_identifier with name and type ```json { \"metadata\": [ { \"metadata_identifier\": \"My Answer\", \"type\": \"ANSWER\", \"new_obj_id\": \"new_object_id\" } ] } ``` ### Multiple objects update ```json { \"metadata\": [ { \"current_obj_id\": \"existing_object_id_1\", \"new_obj_id\": \"new_object_id_1\" }, { \"metadata_identifier\": \"My Worksheet\", \"type\": \"LOGICAL_TABLE\", \"new_obj_id\": \"new_object_id_2\" } ] } ``` + * @param updateMetadataObjIdRequest + */ + updateMetadataObjId(updateMetadataObjIdRequest: UpdateMetadataObjIdRequest, _options?: Configuration): Promise; + /** + * Version: 9.0.0.cl or later Updates an Org object. You can modify Org properties such as name, description, and user associations. Requires cluster administration (**Can administer Org**) privileges. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `ORG_ADMINISTRATION` (**Can manage Orgs**) privilege is required. + * @param orgIdentifier ID or name of the Org + * @param updateOrgRequest + */ + updateOrg(orgIdentifier: string, updateOrgRequest: UpdateOrgRequest, _options?: Configuration): Promise; + /** + * Version: 9.5.0.cl or later Updates the properties of a Role object. Available only if [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance. To update a Role, the `ROLE_ADMINISTRATION` (**Can manage roles**) privilege is required. + * @param roleIdentifier Unique ID or name of the Role. + * @param updateRoleRequest + */ + updateRole(roleIdentifier: string, updateRoleRequest: UpdateRoleRequest, _options?: Configuration): Promise; + /** + * Update schedule. Version: 9.4.0.cl or later Updates a scheduled Liveboard job. Requires at least edit access to Liveboards. To update a schedule on behalf of another user, you need `ADMINISTRATION` (**Can administer Org**) or `JOBSCHEDULING` (**Can schedule for others**) privilege and edit access to the Liveboard. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `JOBSCHEDULING` (**Can schedule for others**) privilege is required. The API endpoint allows you to pause a scheduled job, change the status of a paused job. You can also edit the recipients list, frequency of the job, format of the file to send to the recipients in email notifications, PDF options, and time zone setting. + * @param scheduleIdentifier Unique ID or name of the schedule. + * @param updateScheduleRequest + */ + updateSchedule(scheduleIdentifier: string, updateScheduleRequest: UpdateScheduleRequest, _options?: Configuration): Promise; + /** + * Version: 9.2.0.cl or later Updates the current configuration of the cluster. You must send the configuration data in JSON format. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privileges. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `APPLICATION_ADMINISTRATION` (**Can manage application settings**) privilege is required. + * @param updateSystemConfigRequest + */ + updateSystemConfig(updateSystemConfigRequest: UpdateSystemConfigRequest, _options?: Configuration): Promise; + /** + * Version: 9.0.0.cl or later Updates a tag object. You can modify the `name` and `color` properties of a tag object. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `TAGMANAGEMENT` (**Can manage tags**) privilege is required to create, edit, and delete tags. + * @param tagIdentifier Name or Id of the tag. + * @param updateTagRequest + */ + updateTag(tagIdentifier: string, updateTagRequest: UpdateTagRequest, _options?: Configuration): Promise; + /** + * Version: 9.0.0.cl or later Updates the properties of a user object. You can modify user properties such as username, email, and share notification settings. You can also assign new groups and Orgs, remove the user from a group or Org, reset password, and modify user preferences. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `USER_ADMINISTRATION` (**Can manage users**) privilege is required. + * @param userIdentifier GUID / name of the user + * @param updateUserRequest + */ + updateUser(userIdentifier: string, updateUserRequest: UpdateUserRequest, _options?: Configuration): Promise; + /** + * Version: 9.0.0.cl or later Updates the properties of a group object in ThoughtSpot. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `GROUP_ADMINISTRATION` (**Can manage groups**) privilege is required. #### Supported operations This API endpoint lets you perform the following operations in a single API request: * Edit [privileges](https://developers.thoughtspot.com/docs/?pageid=api-user-management#group-privileges) * Add or remove users * Change sharing visibility settings * Add or remove sub-groups * Assign a default Liveboard or update the existing settings + * @param groupIdentifier GUID or name of the group. + * @param updateUserGroupRequest + */ + updateUserGroup(groupIdentifier: string, updateUserGroupRequest: UpdateUserGroupRequest, _options?: Configuration): Promise; + /** + * Update a variable\'s name Version: 26.4.0.cl or later Allows updating a variable\'s name in ThoughtSpot. Requires ADMINISTRATION role and TENANT scope. The CAN_MANAGE_VARIABLES permission allows you to manage Formula Variables in the current organization scope. The API endpoint allows updating: * The variable name + * @param identifier Unique id or name of the variable to update. + * @param updateVariableRequest + */ + updateVariable(identifier: string, updateVariableRequest: UpdateVariableRequest, _options?: Configuration): Promise; + /** + * Update values for multiple variables Version: 10.14.0.cl or later **Note:** This API endpoint is deprecated and will be removed from ThoughtSpot in a future release. Use [POST /api/rest/2.0/template/variables/{identifier}/update-values](/api/rest/2.0/template/variables/%7Bidentifier%7D/update-values) instead. Allows updating values for multiple variables in ThoughtSpot. Requires ADMINISTRATION role. The CAN_MANAGE_VARIABLES permission allows you to manage Formula Variables in the current organization scope. The API endpoint allows: * Adding new values to variables * Replacing existing values * Deleting values from variables When updating variable values, you need to specify: * The variable identifiers * The values to add/replace/remove for each variable * The operation to perform (ADD, REPLACE, REMOVE, RESET) Behaviour based on operation type: * ADD - Adds values to the variable if this is a list type variable, else same as replace. * REPLACE - Replaces all values of a given set of constraints with the current set of values. * REMOVE - Removes any values which match the set of conditions of the variables if this is a list type variable, else clears value. * RESET - Removes all constrains for a given variable, scope is ignored + * @param updateVariableValuesRequest + */ + updateVariableValues(updateVariableValuesRequest: UpdateVariableValuesRequest, _options?: Configuration): Promise; + /** + * Version: 10.14.0.cl or later Updates an existing webhook configuration by its unique id or name. Only the provided fields will be updated. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) or `DEVELOPER` (**Has developer privilege**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, users with `CAN_MANAGE_WEBHOOKS` (**Can manage webhooks**) privilege are also authorized to perform this action. + * @param webhookIdentifier Unique ID or name of the webhook configuration. + * @param updateWebhookConfigurationRequest + */ + updateWebhookConfiguration(webhookIdentifier: string, updateWebhookConfigurationRequest: UpdateWebhookConfigurationRequest, _options?: Configuration): Promise; + /** + * Version: 26.4.0.cl or later Validates a communication channel configuration to ensure it is properly set up and can receive events. - Use `channel_type` to specify the type of communication channel to validate (e.g., WEBHOOK). - Use `channel_identifier` to provide the unique identifier or name for the communication channel. - Use `event_type` to specify the event type to validate for this channel. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) or `DEVELOPER` (**Has developer privilege**) privilege. For webhook channels, users with `CAN_MANAGE_WEBHOOKS` (**Can manage webhooks**) privilege are also authorized to perform this action. + * @param validateCommunicationChannelRequest + */ + validateCommunicationChannel(validateCommunicationChannelRequest: ValidateCommunicationChannelRequest, _options?: Configuration): Promise; + /** + * Version: 10.10.0.cl or later Validates the email customization configuration if any set for the ThoughtSpot system. #### Pre-requisites Requires `DEVELOPER` (**has developer privilege**) or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `DEVELOPER` (**Has developer privilege**) privilege is required. **NOTE**:This endpoint in currently in beta. Contact ThoughtSpot support to enable this on your instance. + */ + validateEmailCustomization(_options?: Configuration): Promise; + /** + * Version: 9.2.0.cl or later Validates the content of your source branch against the objects in your destination environment. Before merging content from your source branch to the destination branch, run this API operation from your destination environment and ensure that the changes from the source branch function in the destination environment. Requires `DATAMANAGEMENT` (**Can manage data**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance on your instance, the `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` (**Can manage data models**) privilege and edit access to the metadata objects. + * @param validateMergeRequest + */ + validateMerge(validateMergeRequest: ValidateMergeRequest, _options?: Configuration): Promise; + /** + * Version: 9.12.0.cl or later Validates the authentication token specified in the API request. If your token is not valid, [Get a new token](#/http/api-endpoints/authentication/get-full-access-token). + * @param validateTokenRequest + */ + validateToken(validateTokenRequest: ValidateTokenRequest, _options?: Configuration): Promise; +} +declare class ThoughtSpotRestApiResponseProcessor { + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to activateUser + * @throws ApiException if the response code was not in [200, 299] + */ + activateUser(response: ResponseContext): Promise; + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to assignChangeAuthor + * @throws ApiException if the response code was not in [200, 299] + */ + assignChangeAuthor(response: ResponseContext): Promise; + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to assignTag + * @throws ApiException if the response code was not in [200, 299] + */ + assignTag(response: ResponseContext): Promise; + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to changeUserPassword + * @throws ApiException if the response code was not in [200, 299] + */ + changeUserPassword(response: ResponseContext): Promise; + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to commitBranch + * @throws ApiException if the response code was not in [200, 299] + */ + commitBranch(response: ResponseContext): Promise; + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to configureAuthSettings + * @throws ApiException if the response code was not in [200, 299] + */ + configureAuthSettings(response: ResponseContext): Promise; + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to configureCommunicationChannelPreferences + * @throws ApiException if the response code was not in [200, 299] + */ + configureCommunicationChannelPreferences(response: ResponseContext): Promise; + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to configureSecuritySettings + * @throws ApiException if the response code was not in [200, 299] + */ + configureSecuritySettings(response: ResponseContext): Promise; + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to connectionConfigurationSearch + * @throws ApiException if the response code was not in [200, 299] + */ + connectionConfigurationSearch(response: ResponseContext): Promise>; + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to convertWorksheetToModel + * @throws ApiException if the response code was not in [200, 299] + */ + convertWorksheetToModel(response: ResponseContext): Promise; + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to copyObject + * @throws ApiException if the response code was not in [200, 299] + */ + copyObject(response: ResponseContext): Promise; + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to createAgentConversation + * @throws ApiException if the response code was not in [200, 299] + */ + createAgentConversation(response: ResponseContext): Promise; + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to createCalendar + * @throws ApiException if the response code was not in [200, 299] + */ + createCalendar(response: ResponseContext): Promise; + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to createCollection + * @throws ApiException if the response code was not in [200, 299] + */ + createCollection(response: ResponseContext): Promise; + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to createConfig + * @throws ApiException if the response code was not in [200, 299] + */ + createConfig(response: ResponseContext): Promise; + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to createConnection + * @throws ApiException if the response code was not in [200, 299] + */ + createConnection(response: ResponseContext): Promise; + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to createConnectionConfiguration + * @throws ApiException if the response code was not in [200, 299] + */ + createConnectionConfiguration(response: ResponseContext): Promise; + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to createConversation + * @throws ApiException if the response code was not in [200, 299] + */ + createConversation(response: ResponseContext): Promise; + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to createCustomAction + * @throws ApiException if the response code was not in [200, 299] + */ + createCustomAction(response: ResponseContext): Promise; + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to createEmailCustomization + * @throws ApiException if the response code was not in [200, 299] + */ + createEmailCustomization(response: ResponseContext): Promise; + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to createOrg + * @throws ApiException if the response code was not in [200, 299] + */ + createOrg(response: ResponseContext): Promise; + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to createRole + * @throws ApiException if the response code was not in [200, 299] + */ + createRole(response: ResponseContext): Promise; + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to createSchedule + * @throws ApiException if the response code was not in [200, 299] + */ + createSchedule(response: ResponseContext): Promise; + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to createTag + * @throws ApiException if the response code was not in [200, 299] + */ + createTag(response: ResponseContext): Promise; + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to createUser + * @throws ApiException if the response code was not in [200, 299] + */ + createUser(response: ResponseContext): Promise; + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to createUserGroup + * @throws ApiException if the response code was not in [200, 299] + */ + createUserGroup(response: ResponseContext): Promise; + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to createVariable + * @throws ApiException if the response code was not in [200, 299] + */ + createVariable(response: ResponseContext): Promise; + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to createWebhookConfiguration + * @throws ApiException if the response code was not in [200, 299] + */ + createWebhookConfiguration(response: ResponseContext): Promise; + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to dbtConnection + * @throws ApiException if the response code was not in [200, 299] + */ + dbtConnection(response: ResponseContext): Promise; + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to dbtGenerateSyncTml + * @throws ApiException if the response code was not in [200, 299] + */ + dbtGenerateSyncTml(response: ResponseContext): Promise; + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to dbtGenerateTml + * @throws ApiException if the response code was not in [200, 299] + */ + dbtGenerateTml(response: ResponseContext): Promise; + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to dbtSearch + * @throws ApiException if the response code was not in [200, 299] + */ + dbtSearch(response: ResponseContext): Promise>; + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to deactivateUser + * @throws ApiException if the response code was not in [200, 299] + */ + deactivateUser(response: ResponseContext): Promise; + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to deleteCalendar + * @throws ApiException if the response code was not in [200, 299] + */ + deleteCalendar(response: ResponseContext): Promise; + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to deleteCollection + * @throws ApiException if the response code was not in [200, 299] + */ + deleteCollection(response: ResponseContext): Promise; + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to deleteConfig + * @throws ApiException if the response code was not in [200, 299] + */ + deleteConfig(response: ResponseContext): Promise; + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to deleteConnection + * @throws ApiException if the response code was not in [200, 299] + */ + deleteConnection(response: ResponseContext): Promise; + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to deleteConnectionConfiguration + * @throws ApiException if the response code was not in [200, 299] + */ + deleteConnectionConfiguration(response: ResponseContext): Promise; + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to deleteConnectionV2 + * @throws ApiException if the response code was not in [200, 299] + */ + deleteConnectionV2(response: ResponseContext): Promise; + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to deleteCustomAction + * @throws ApiException if the response code was not in [200, 299] + */ + deleteCustomAction(response: ResponseContext): Promise; + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to deleteDbtConnection + * @throws ApiException if the response code was not in [200, 299] + */ + deleteDbtConnection(response: ResponseContext): Promise; + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to deleteEmailCustomization + * @throws ApiException if the response code was not in [200, 299] + */ + deleteEmailCustomization(response: ResponseContext): Promise; + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to deleteMetadata + * @throws ApiException if the response code was not in [200, 299] + */ + deleteMetadata(response: ResponseContext): Promise; + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to deleteOrg + * @throws ApiException if the response code was not in [200, 299] + */ + deleteOrg(response: ResponseContext): Promise; + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to deleteOrgEmailCustomization + * @throws ApiException if the response code was not in [200, 299] + */ + deleteOrgEmailCustomization(response: ResponseContext): Promise; + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to deleteRole + * @throws ApiException if the response code was not in [200, 299] + */ + deleteRole(response: ResponseContext): Promise; + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to deleteSchedule + * @throws ApiException if the response code was not in [200, 299] + */ + deleteSchedule(response: ResponseContext): Promise; + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to deleteTag + * @throws ApiException if the response code was not in [200, 299] + */ + deleteTag(response: ResponseContext): Promise; + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to deleteUser + * @throws ApiException if the response code was not in [200, 299] + */ + deleteUser(response: ResponseContext): Promise; + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to deleteUserGroup + * @throws ApiException if the response code was not in [200, 299] + */ + deleteUserGroup(response: ResponseContext): Promise; + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to deleteVariable + * @throws ApiException if the response code was not in [200, 299] + */ + deleteVariable(response: ResponseContext): Promise; + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to deleteVariables + * @throws ApiException if the response code was not in [200, 299] + */ + deleteVariables(response: ResponseContext): Promise; + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to deleteWebhookConfigurations + * @throws ApiException if the response code was not in [200, 299] + */ + deleteWebhookConfigurations(response: ResponseContext): Promise; + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to deployCommit + * @throws ApiException if the response code was not in [200, 299] + */ + deployCommit(response: ResponseContext): Promise>; + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to downloadConnectionMetadataChanges + * @throws ApiException if the response code was not in [200, 299] + */ + downloadConnectionMetadataChanges(response: ResponseContext): Promise; + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to exportAnswerReport + * @throws ApiException if the response code was not in [200, 299] + */ + exportAnswerReport(response: ResponseContext): Promise; + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to exportLiveboardReport + * @throws ApiException if the response code was not in [200, 299] + */ + exportLiveboardReport(response: ResponseContext): Promise; + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to exportMetadataTML + * @throws ApiException if the response code was not in [200, 299] + */ + exportMetadataTML(response: ResponseContext): Promise>; + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to exportMetadataTMLBatched + * @throws ApiException if the response code was not in [200, 299] + */ + exportMetadataTMLBatched(response: ResponseContext): Promise; + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to fetchAnswerData + * @throws ApiException if the response code was not in [200, 299] + */ + fetchAnswerData(response: ResponseContext): Promise; + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to fetchAnswerSqlQuery + * @throws ApiException if the response code was not in [200, 299] + */ + fetchAnswerSqlQuery(response: ResponseContext): Promise; + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to fetchAsyncImportTaskStatus + * @throws ApiException if the response code was not in [200, 299] + */ + fetchAsyncImportTaskStatus(response: ResponseContext): Promise; + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to fetchColumnSecurityRules + * @throws ApiException if the response code was not in [200, 299] + */ + fetchColumnSecurityRules(response: ResponseContext): Promise>; + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to fetchConnectionDiffStatus + * @throws ApiException if the response code was not in [200, 299] + */ + fetchConnectionDiffStatus(response: ResponseContext): Promise; + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to fetchLiveboardData + * @throws ApiException if the response code was not in [200, 299] + */ + fetchLiveboardData(response: ResponseContext): Promise; + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to fetchLiveboardSqlQuery + * @throws ApiException if the response code was not in [200, 299] + */ + fetchLiveboardSqlQuery(response: ResponseContext): Promise; + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to fetchLogs + * @throws ApiException if the response code was not in [200, 299] + */ + fetchLogs(response: ResponseContext): Promise>; + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to fetchObjectPrivileges + * @throws ApiException if the response code was not in [200, 299] + */ + fetchObjectPrivileges(response: ResponseContext): Promise; + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to fetchPermissionsOfPrincipals + * @throws ApiException if the response code was not in [200, 299] + */ + fetchPermissionsOfPrincipals(response: ResponseContext): Promise; + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to fetchPermissionsOnMetadata + * @throws ApiException if the response code was not in [200, 299] + */ + fetchPermissionsOnMetadata(response: ResponseContext): Promise; + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to forceLogoutUsers + * @throws ApiException if the response code was not in [200, 299] + */ + forceLogoutUsers(response: ResponseContext): Promise; + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to generateCSV + * @throws ApiException if the response code was not in [200, 299] + */ + generateCSV(response: ResponseContext): Promise; + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to getCurrentUserInfo + * @throws ApiException if the response code was not in [200, 299] + */ + getCurrentUserInfo(response: ResponseContext): Promise; + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to getCurrentUserToken + * @throws ApiException if the response code was not in [200, 299] + */ + getCurrentUserToken(response: ResponseContext): Promise; + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to getCustomAccessToken + * @throws ApiException if the response code was not in [200, 299] + */ + getCustomAccessToken(response: ResponseContext): Promise; + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to getDataSourceSuggestions + * @throws ApiException if the response code was not in [200, 299] + */ + getDataSourceSuggestions(response: ResponseContext): Promise; + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to getFullAccessToken + * @throws ApiException if the response code was not in [200, 299] + */ + getFullAccessToken(response: ResponseContext): Promise; + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to getNLInstructions + * @throws ApiException if the response code was not in [200, 299] + */ + getNLInstructions(response: ResponseContext): Promise; + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to getObjectAccessToken + * @throws ApiException if the response code was not in [200, 299] + */ + getObjectAccessToken(response: ResponseContext): Promise; + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to getRelevantQuestions + * @throws ApiException if the response code was not in [200, 299] + */ + getRelevantQuestions(response: ResponseContext): Promise; + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to getSystemConfig + * @throws ApiException if the response code was not in [200, 299] + */ + getSystemConfig(response: ResponseContext): Promise; + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to getSystemInformation + * @throws ApiException if the response code was not in [200, 299] + */ + getSystemInformation(response: ResponseContext): Promise; + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to getSystemOverrideInfo + * @throws ApiException if the response code was not in [200, 299] + */ + getSystemOverrideInfo(response: ResponseContext): Promise; + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to importMetadataTML + * @throws ApiException if the response code was not in [200, 299] + */ + importMetadataTML(response: ResponseContext): Promise>; + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to importMetadataTMLAsync + * @throws ApiException if the response code was not in [200, 299] + */ + importMetadataTMLAsync(response: ResponseContext): Promise; + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to importUserGroups + * @throws ApiException if the response code was not in [200, 299] + */ + importUserGroups(response: ResponseContext): Promise; + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to importUsers + * @throws ApiException if the response code was not in [200, 299] + */ + importUsers(response: ResponseContext): Promise; + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to login + * @throws ApiException if the response code was not in [200, 299] + */ + login(response: ResponseContext): Promise; + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to logout + * @throws ApiException if the response code was not in [200, 299] + */ + logout(response: ResponseContext): Promise; + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to manageObjectPrivilege + * @throws ApiException if the response code was not in [200, 299] + */ + manageObjectPrivilege(response: ResponseContext): Promise; + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to parameterizeMetadata + * @throws ApiException if the response code was not in [200, 299] + */ + parameterizeMetadata(response: ResponseContext): Promise; + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to parameterizeMetadataFields + * @throws ApiException if the response code was not in [200, 299] + */ + parameterizeMetadataFields(response: ResponseContext): Promise; + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to publishMetadata + * @throws ApiException if the response code was not in [200, 299] + */ + publishMetadata(response: ResponseContext): Promise; + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to putVariableValues + * @throws ApiException if the response code was not in [200, 299] + */ + putVariableValues(response: ResponseContext): Promise; + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to queryGetDecomposedQuery + * @throws ApiException if the response code was not in [200, 299] + */ + queryGetDecomposedQuery(response: ResponseContext): Promise; + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to resetUserPassword + * @throws ApiException if the response code was not in [200, 299] + */ + resetUserPassword(response: ResponseContext): Promise; + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to revertCommit + * @throws ApiException if the response code was not in [200, 299] + */ + revertCommit(response: ResponseContext): Promise; + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to revokeRefreshTokens + * @throws ApiException if the response code was not in [200, 299] + */ + revokeRefreshTokens(response: ResponseContext): Promise; + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to revokeToken + * @throws ApiException if the response code was not in [200, 299] + */ + revokeToken(response: ResponseContext): Promise; + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to searchAuthSettings + * @throws ApiException if the response code was not in [200, 299] + */ + searchAuthSettings(response: ResponseContext): Promise; + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to searchCalendars + * @throws ApiException if the response code was not in [200, 299] + */ + searchCalendars(response: ResponseContext): Promise>; + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to searchChannelHistory + * @throws ApiException if the response code was not in [200, 299] + */ + searchChannelHistory(response: ResponseContext): Promise; + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to searchCollections + * @throws ApiException if the response code was not in [200, 299] + */ + searchCollections(response: ResponseContext): Promise; + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to searchCommits + * @throws ApiException if the response code was not in [200, 299] + */ + searchCommits(response: ResponseContext): Promise>; + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to searchCommunicationChannelPreferences + * @throws ApiException if the response code was not in [200, 299] + */ + searchCommunicationChannelPreferences(response: ResponseContext): Promise; + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to searchConfig + * @throws ApiException if the response code was not in [200, 299] + */ + searchConfig(response: ResponseContext): Promise>; + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to searchConnection + * @throws ApiException if the response code was not in [200, 299] + */ + searchConnection(response: ResponseContext): Promise>; + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to searchCustomActions + * @throws ApiException if the response code was not in [200, 299] + */ + searchCustomActions(response: ResponseContext): Promise>; + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to searchData + * @throws ApiException if the response code was not in [200, 299] + */ + searchData(response: ResponseContext): Promise; + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to searchEmailCustomization + * @throws ApiException if the response code was not in [200, 299] + */ + searchEmailCustomization(response: ResponseContext): Promise>; + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to searchMetadata + * @throws ApiException if the response code was not in [200, 299] + */ + searchMetadata(response: ResponseContext): Promise>; + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to searchOrgs + * @throws ApiException if the response code was not in [200, 299] + */ + searchOrgs(response: ResponseContext): Promise>; + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to searchRoles + * @throws ApiException if the response code was not in [200, 299] + */ + searchRoles(response: ResponseContext): Promise>; + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to searchSchedules + * @throws ApiException if the response code was not in [200, 299] + */ + searchSchedules(response: ResponseContext): Promise>; + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to searchSecuritySettings + * @throws ApiException if the response code was not in [200, 299] + */ + searchSecuritySettings(response: ResponseContext): Promise; + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to searchTags + * @throws ApiException if the response code was not in [200, 299] + */ + searchTags(response: ResponseContext): Promise>; + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to searchUserGroups + * @throws ApiException if the response code was not in [200, 299] + */ + searchUserGroups(response: ResponseContext): Promise>; + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to searchUsers + * @throws ApiException if the response code was not in [200, 299] + */ + searchUsers(response: ResponseContext): Promise>; + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to searchVariables + * @throws ApiException if the response code was not in [200, 299] + */ + searchVariables(response: ResponseContext): Promise>; + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to searchWebhookConfigurations + * @throws ApiException if the response code was not in [200, 299] + */ + searchWebhookConfigurations(response: ResponseContext): Promise; + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to sendAgentConversationMessage + * @throws ApiException if the response code was not in [200, 299] + */ + sendAgentConversationMessage(response: ResponseContext): Promise; + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to sendAgentConversationMessageStreaming + * @throws ApiException if the response code was not in [200, 299] + */ + sendAgentConversationMessageStreaming(response: ResponseContext): Promise; + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to sendAgentMessage + * @throws ApiException if the response code was not in [200, 299] + */ + sendAgentMessage(response: ResponseContext): Promise; + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to sendAgentMessageStreaming + * @throws ApiException if the response code was not in [200, 299] + */ + sendAgentMessageStreaming(response: ResponseContext): Promise; + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to sendMessage + * @throws ApiException if the response code was not in [200, 299] + */ + sendMessage(response: ResponseContext): Promise>; + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to setNLInstructions + * @throws ApiException if the response code was not in [200, 299] + */ + setNLInstructions(response: ResponseContext): Promise; + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to shareMetadata + * @throws ApiException if the response code was not in [200, 299] + */ + shareMetadata(response: ResponseContext): Promise; + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to singleAnswer + * @throws ApiException if the response code was not in [200, 299] + */ + singleAnswer(response: ResponseContext): Promise; + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to stopConversation + * @throws ApiException if the response code was not in [200, 299] + */ + stopConversation(response: ResponseContext): Promise; + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to syncMetadata + * @throws ApiException if the response code was not in [200, 299] + */ + syncMetadata(response: ResponseContext): Promise; + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to unassignTag + * @throws ApiException if the response code was not in [200, 299] + */ + unassignTag(response: ResponseContext): Promise; + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to unparameterizeMetadata + * @throws ApiException if the response code was not in [200, 299] + */ + unparameterizeMetadata(response: ResponseContext): Promise; + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to unpublishMetadata + * @throws ApiException if the response code was not in [200, 299] + */ + unpublishMetadata(response: ResponseContext): Promise; + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to updateCalendar + * @throws ApiException if the response code was not in [200, 299] + */ + updateCalendar(response: ResponseContext): Promise; + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to updateCollection + * @throws ApiException if the response code was not in [200, 299] + */ + updateCollection(response: ResponseContext): Promise; + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to updateColumnSecurityRules + * @throws ApiException if the response code was not in [200, 299] + */ + updateColumnSecurityRules(response: ResponseContext): Promise; + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to updateConfig + * @throws ApiException if the response code was not in [200, 299] + */ + updateConfig(response: ResponseContext): Promise; + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to updateConnection + * @throws ApiException if the response code was not in [200, 299] + */ + updateConnection(response: ResponseContext): Promise; + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to updateConnectionConfiguration + * @throws ApiException if the response code was not in [200, 299] + */ + updateConnectionConfiguration(response: ResponseContext): Promise; + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to updateConnectionStatus + * @throws ApiException if the response code was not in [200, 299] + */ + updateConnectionStatus(response: ResponseContext): Promise; + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to updateConnectionV2 + * @throws ApiException if the response code was not in [200, 299] + */ + updateConnectionV2(response: ResponseContext): Promise; + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to updateCustomAction + * @throws ApiException if the response code was not in [200, 299] + */ + updateCustomAction(response: ResponseContext): Promise; + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to updateDbtConnection + * @throws ApiException if the response code was not in [200, 299] + */ + updateDbtConnection(response: ResponseContext): Promise; + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to updateEmailCustomization + * @throws ApiException if the response code was not in [200, 299] + */ + updateEmailCustomization(response: ResponseContext): Promise; + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to updateMetadataHeader + * @throws ApiException if the response code was not in [200, 299] + */ + updateMetadataHeader(response: ResponseContext): Promise; + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to updateMetadataObjId + * @throws ApiException if the response code was not in [200, 299] + */ + updateMetadataObjId(response: ResponseContext): Promise; + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to updateOrg + * @throws ApiException if the response code was not in [200, 299] + */ + updateOrg(response: ResponseContext): Promise; + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to updateRole + * @throws ApiException if the response code was not in [200, 299] + */ + updateRole(response: ResponseContext): Promise; + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to updateSchedule + * @throws ApiException if the response code was not in [200, 299] + */ + updateSchedule(response: ResponseContext): Promise; + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to updateSystemConfig + * @throws ApiException if the response code was not in [200, 299] + */ + updateSystemConfig(response: ResponseContext): Promise; + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to updateTag + * @throws ApiException if the response code was not in [200, 299] + */ + updateTag(response: ResponseContext): Promise; + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to updateUser + * @throws ApiException if the response code was not in [200, 299] + */ + updateUser(response: ResponseContext): Promise; + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to updateUserGroup + * @throws ApiException if the response code was not in [200, 299] + */ + updateUserGroup(response: ResponseContext): Promise; + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to updateVariable + * @throws ApiException if the response code was not in [200, 299] + */ + updateVariable(response: ResponseContext): Promise; + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to updateVariableValues + * @throws ApiException if the response code was not in [200, 299] + */ + updateVariableValues(response: ResponseContext): Promise; + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to updateWebhookConfiguration + * @throws ApiException if the response code was not in [200, 299] + */ + updateWebhookConfiguration(response: ResponseContext): Promise; + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to validateCommunicationChannel + * @throws ApiException if the response code was not in [200, 299] + */ + validateCommunicationChannel(response: ResponseContext): Promise; + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to validateEmailCustomization + * @throws ApiException if the response code was not in [200, 299] + */ + validateEmailCustomization(response: ResponseContext): Promise; + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to validateMerge + * @throws ApiException if the response code was not in [200, 299] + */ + validateMerge(response: ResponseContext): Promise>; + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to validateToken + * @throws ApiException if the response code was not in [200, 299] + */ + validateToken(response: ResponseContext): Promise; +} + +/** + * no description + */ +declare class UsersApiRequestFactory extends BaseAPIRequestFactory { + /** + * Version: 9.7.0.cl or later Activates a deactivated user account. Requires `ADMINISTRATION` (**Can administer Thoughtspot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `USER_ADMINISTRATION` (**Can manage users**) privilege is required. To activate an inactive user account, the API request body must include the following information: - Username or the GUID of the user account. - Auth token generated for the deactivated user. The auth token is sent in the API response when a user is deactivated. - Password for the user account. + * @param activateUserRequest + */ + activateUser(activateUserRequest: ActivateUserRequest, _options?: Configuration): Promise; + /** + * Version: 9.0.0.cl or later Updates the current password of the user. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `USER_ADMINISTRATION` (**Can manage users**) privilege is required. + * @param changeUserPasswordRequest + */ + changeUserPassword(changeUserPasswordRequest: ChangeUserPasswordRequest, _options?: Configuration): Promise; + /** + * Version: 9.0.0.cl or later Creates a user in ThoughtSpot. The API endpoint allows you to configure several user properties such as email address, account status, share notification preferences, and sharing visibility. You can provision the user to [groups](https://docs.thoughtspot.com/cloud/latest/groups-privileges) and [Orgs](https://docs.thoughtspot.com/cloud/latest/orgs-overview). You can also add Liveboard, Answer, and Worksheet objects to the user’s favorites list, assign a default Liveboard for the user, and set user preferences. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `USER_ADMINISTRATION` (**Can manage users**) privilege is required. + * @param createUserRequest + */ + createUser(createUserRequest: CreateUserRequest, _options?: Configuration): Promise; + /** + * Version: 9.7.0.cl or later Deactivates a user account. Requires `ADMINISTRATION` (**Can administer Thoughtspot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `USER_ADMINISTRATION` (**Can manage users**) privilege is required. To deactivate a user account, the API request body must include the following information: - Username or the GUID of the user account - Base URL of the ThoughtSpot instance If the API request is successful, ThoughtSpot returns the activation URL in the response. The activation URL is valid for 14 days and can be used to re-activate the account and reset the password of the deactivated account. + * @param deactivateUserRequest + */ + deactivateUser(deactivateUserRequest: DeactivateUserRequest, _options?: Configuration): Promise; + /** + * Version: 9.0.0.cl or later Deletes a user from the ThoughtSpot system. If you want to remove a user from a specific Org but not from ThoughtSpot, update the group and Org mapping properties of the user object via a POST API call to the [/api/rest/2.0/users/{user_identifier}/update](#/http/api-endpoints/users/update-user) endpoint. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `USER_ADMINISTRATION` (**Can manage users**) privilege is required. + * @param userIdentifier GUID / name of the user + */ + deleteUser(userIdentifier: string, _options?: Configuration): Promise; + /** + * Version: 9.0.0.cl or later Enforces logout on current user sessions. Use this API with caution as it may invalidate active user sessions and force users to re-login. Make sure you specify the usernames or GUIDs. If you pass null values in the API call, all user sessions on your cluster become invalid, and the users are forced to re-login. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `USER_ADMINISTRATION` (**Can manage users**) privilege is required. + * @param forceLogoutUsersRequest + */ + forceLogoutUsers(forceLogoutUsersRequest: ForceLogoutUsersRequest, _options?: Configuration): Promise; + /** + * Version: 9.0.0.cl or later Imports user data from external databases into ThoughtSpot. During the user import operation: * If the specified users are not available in ThoughtSpot, the users are created and assigned a default password. Defining a `default_password` in the API request is optional. * If `delete_unspecified_users` is set to `true`, the users not specified in the API request, excluding the `tsadmin`, `guest`, `system` and `su` users, are deleted. * If the specified user objects are already available in ThoughtSpot, the object properties are updated and synchronized as per the input data in the API request. A successful API call returns the object that represents the changes made in the ThoughtSpot system. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `USER_ADMINISTRATION` (**Can manage users**) privilege is required. + * @param importUsersRequest + */ + importUsers(importUsersRequest: ImportUsersRequest, _options?: Configuration): Promise; + /** + * Version: 9.0.0.cl or later Resets the password of a user account. Administrators can reset password on behalf of a user. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `USER_ADMINISTRATION` (**Can manage users**) privilege is required. + * @param resetUserPasswordRequest + */ + resetUserPassword(resetUserPasswordRequest: ResetUserPasswordRequest, _options?: Configuration): Promise; + /** + * Version: 9.0.0.cl or later Gets a list of users available on the ThoughtSpot system. To get details of a specific user, specify the user GUID or name. You can also filter the API response based on groups, Org ID, user visibility, account status, user type, and user preference settings and favorites. Available to all users. Users with `ADMINISTRATION` (**Can administer ThoughtSpot**) privileges can view all users properties. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `USER_ADMINISTRATION` (**Can manage users**) privilege is required. **NOTE**: If the API returns an empty list, consider increasing the value of the `record_size` parameter. To search across all available users, set `record_size` to `-1`. + * @param searchUsersRequest + */ + searchUsers(searchUsersRequest: SearchUsersRequest, _options?: Configuration): Promise; + /** + * Version: 9.0.0.cl or later Updates the properties of a user object. You can modify user properties such as username, email, and share notification settings. You can also assign new groups and Orgs, remove the user from a group or Org, reset password, and modify user preferences. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `USER_ADMINISTRATION` (**Can manage users**) privilege is required. + * @param userIdentifier GUID / name of the user + * @param updateUserRequest + */ + updateUser(userIdentifier: string, updateUserRequest: UpdateUserRequest, _options?: Configuration): Promise; +} +declare class UsersApiResponseProcessor { + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to activateUser + * @throws ApiException if the response code was not in [200, 299] + */ + activateUser(response: ResponseContext): Promise; + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to changeUserPassword + * @throws ApiException if the response code was not in [200, 299] + */ + changeUserPassword(response: ResponseContext): Promise; + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to createUser + * @throws ApiException if the response code was not in [200, 299] + */ + createUser(response: ResponseContext): Promise; + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to deactivateUser + * @throws ApiException if the response code was not in [200, 299] + */ + deactivateUser(response: ResponseContext): Promise; + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to deleteUser + * @throws ApiException if the response code was not in [200, 299] + */ + deleteUser(response: ResponseContext): Promise; + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to forceLogoutUsers + * @throws ApiException if the response code was not in [200, 299] + */ + forceLogoutUsers(response: ResponseContext): Promise; + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to importUsers + * @throws ApiException if the response code was not in [200, 299] + */ + importUsers(response: ResponseContext): Promise; + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to resetUserPassword + * @throws ApiException if the response code was not in [200, 299] + */ + resetUserPassword(response: ResponseContext): Promise; + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to searchUsers + * @throws ApiException if the response code was not in [200, 299] + */ + searchUsers(response: ResponseContext): Promise>; + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to updateUser + * @throws ApiException if the response code was not in [200, 299] + */ + updateUser(response: ResponseContext): Promise; +} + +/** + * no description + */ +declare class VariableApiRequestFactory extends BaseAPIRequestFactory { + /** + * Create a variable which can be used for parameterizing metadata objects Version: 26.4.0.cl or later Allows creating a variable which can be used for parameterizing metadata objects in ThoughtSpot. Requires ADMINISTRATION role and TENANT scope. The CAN_MANAGE_VARIABLES permission allows you to manage Formula Variables in the current organization scope. The API endpoint supports the following types of variables: * CONNECTION_PROPERTY - For connection properties * TABLE_MAPPING - For table mappings * CONNECTION_PROPERTY_PER_PRINCIPAL - For connection properties per principal. In order to use this please contact support to enable this. * FORMULA_VARIABLE - For Formula variables, introduced in 10.15.0.cl When creating a variable, you need to specify: * The variable type * A unique name for the variable * Whether the variable contains sensitive values (defaults to false) * The data type of the variable, only specify for formula variables (defaults to null) The operation will fail if: * The user lacks required permissions * The variable name already exists * The variable type is invalid + * @param createVariableRequest + */ + createVariable(createVariableRequest: CreateVariableRequest, _options?: Configuration): Promise; + /** + * Delete a variable Version: 10.14.0.cl or later **Note:** This API endpoint is deprecated and will be removed from ThoughtSpot in a future release. Use [POST /api/rest/2.0/template/variables/delete](/api/rest/2.0/template/variables/delete) instead. Allows deleting a variable from ThoughtSpot. Requires ADMINISTRATION role and TENANT scope. The CAN_MANAGE_VARIABLES permission allows you to manage Formula Variables in the current organization scope. The API endpoint requires: * The variable identifier (ID or name) The operation will fail if: * The user lacks required permissions * The variable doesn\'t exist * The variable is being used by other objects + * @param identifier Unique id or name of the variable + */ + deleteVariable(identifier: string, _options?: Configuration): Promise; + /** + * Delete variable(s) Version: 26.4.0.cl or later Allows deleting multiple variables from ThoughtSpot. Requires ADMINISTRATION role and TENANT scope. The CAN_MANAGE_VARIABLES permission allows you to manage Formula Variables in the current organization scope. The API endpoint requires: * The variable identifiers (IDs or names) The operation will fail if: * The user lacks required permissions * Any of the variables don\'t exist * Any of the variables are being used by other objects + * @param deleteVariablesRequest + */ + deleteVariables(deleteVariablesRequest: DeleteVariablesRequest, _options?: Configuration): Promise; + /** + * Update values for a variable Version: 26.4.0.cl or later Allows updating values for a specific variable in ThoughtSpot. Requires ADMINISTRATION role. The CAN_MANAGE_VARIABLES permission allows you to manage Formula Variables in the current organization scope. The API endpoint allows: * Adding new values to the variable * Replacing existing values * Deleting values from the variable * Resetting all values When updating variable values, you need to specify: * The variable identifier (ID or name) * The values to add/replace/remove * The operation to perform (ADD, REPLACE, REMOVE, RESET) Behaviour based on operation type: * ADD - Adds values to the variable if this is a list type variable, else same as replace. * REPLACE - Replaces all values of a given set of constraints with the current set of values. * REMOVE - Removes any values which match the set of conditions of the variables if this is a list type variable, else clears value. * RESET - Removes all constraints for the given variable, scope is ignored + * @param identifier Unique ID or name of the variable + * @param putVariableValuesRequest + */ + putVariableValues(identifier: string, putVariableValuesRequest: PutVariableValuesRequest, _options?: Configuration): Promise; + /** + * Search variables Version: 26.4.0.cl or later Allows searching for variables in ThoughtSpot. Requires ADMINISTRATION role. The CAN_MANAGE_VARIABLES permission allows you to manage Formula Variables in the current organization scope. The API endpoint supports searching variables by: * Variable identifier (ID or name) * Variable type * Name pattern (case-insensitive, supports % for wildcard) The search results can be formatted in three ways: * METADATA - Returns only variable metadata (default) * METADATA_AND_VALUES - Returns variable metadata and values The values can be filtered by scope: * org_identifier * principal_identifier * model_identifier + * @param searchVariablesRequest + */ + searchVariables(searchVariablesRequest: SearchVariablesRequest, _options?: Configuration): Promise; + /** + * Update a variable\'s name Version: 26.4.0.cl or later Allows updating a variable\'s name in ThoughtSpot. Requires ADMINISTRATION role and TENANT scope. The CAN_MANAGE_VARIABLES permission allows you to manage Formula Variables in the current organization scope. The API endpoint allows updating: * The variable name + * @param identifier Unique id or name of the variable to update. + * @param updateVariableRequest + */ + updateVariable(identifier: string, updateVariableRequest: UpdateVariableRequest, _options?: Configuration): Promise; + /** + * Update values for multiple variables Version: 10.14.0.cl or later **Note:** This API endpoint is deprecated and will be removed from ThoughtSpot in a future release. Use [POST /api/rest/2.0/template/variables/{identifier}/update-values](/api/rest/2.0/template/variables/%7Bidentifier%7D/update-values) instead. Allows updating values for multiple variables in ThoughtSpot. Requires ADMINISTRATION role. The CAN_MANAGE_VARIABLES permission allows you to manage Formula Variables in the current organization scope. The API endpoint allows: * Adding new values to variables * Replacing existing values * Deleting values from variables When updating variable values, you need to specify: * The variable identifiers * The values to add/replace/remove for each variable * The operation to perform (ADD, REPLACE, REMOVE, RESET) Behaviour based on operation type: * ADD - Adds values to the variable if this is a list type variable, else same as replace. * REPLACE - Replaces all values of a given set of constraints with the current set of values. * REMOVE - Removes any values which match the set of conditions of the variables if this is a list type variable, else clears value. * RESET - Removes all constrains for a given variable, scope is ignored + * @param updateVariableValuesRequest + */ + updateVariableValues(updateVariableValuesRequest: UpdateVariableValuesRequest, _options?: Configuration): Promise; +} +declare class VariableApiResponseProcessor { + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to createVariable + * @throws ApiException if the response code was not in [200, 299] + */ + createVariable(response: ResponseContext): Promise; + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to deleteVariable + * @throws ApiException if the response code was not in [200, 299] + */ + deleteVariable(response: ResponseContext): Promise; + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to deleteVariables + * @throws ApiException if the response code was not in [200, 299] + */ + deleteVariables(response: ResponseContext): Promise; + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to putVariableValues + * @throws ApiException if the response code was not in [200, 299] + */ + putVariableValues(response: ResponseContext): Promise; + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to searchVariables + * @throws ApiException if the response code was not in [200, 299] + */ + searchVariables(response: ResponseContext): Promise>; + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to updateVariable + * @throws ApiException if the response code was not in [200, 299] + */ + updateVariable(response: ResponseContext): Promise; + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to updateVariableValues + * @throws ApiException if the response code was not in [200, 299] + */ + updateVariableValues(response: ResponseContext): Promise; +} + +/** + * no description + */ +declare class VersionControlApiRequestFactory extends BaseAPIRequestFactory { + /** + * Version: 9.2.0.cl or later Commits TML files of metadata objects to the Git branch configured on your instance. Requires at least edit access to objects used in the commit operation. Before using this endpoint to push your commits: * Enable Git integration on your instance. * Make sure the Git repository and branch details are configured on your instance. For more information, see [Git integration documentation](https://developers.thoughtspot.com/docs/git-integration). + * @param commitBranchRequest + */ + commitBranch(commitBranchRequest: CommitBranchRequest, _options?: Configuration): Promise; + /** + * Version: 9.2.0.cl or later Allows you to connect a ThoughtSpot instance to a Git repository. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance on your instance, the `CAN_SETUP_VERSION_CONTROL` (**Can set up version control**) privilege. You can use this API endpoint to connect your ThoughtSpot development and production environments to the development and production branches of a Git repository. Before using this endpoint to connect your ThoughtSpot instance to a Git repository, check the following prerequisites: * You have a Git repository. If you are using GitHub, make sure you have a valid account and an access token to connect ThoughtSpot to GitHub. For information about generating a token, see [GitHub Documentation](https://docs.github.com/en/authentication/keeping-your-account-and-data-secure/managing-your-personal-access-tokens). * Your access token has `repo` scope that grants full access to public and private repositories. * Your Git repository has a branch that can be configured as a default branch in ThoughtSpot. For more information, see [Git integration documentation](https://developers.thoughtspot.com/docs/?pageid=git-integration). **Note**: ThoughtSpot supports only GitHub / itHub Enterprise for CI/CD. + * @param createConfigRequest + */ + createConfig(createConfigRequest: CreateConfigRequest, _options?: Configuration): Promise; + /** + * Version: 9.2.0.cl or later Deletes Git repository configuration from your ThoughtSpot instance. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance on your instance, the `CAN_SETUP_VERSION_CONTROL` (**Can set up version control**) privilege. + * @param deleteConfigRequest + */ + deleteConfig(deleteConfigRequest: DeleteConfigRequest, _options?: Configuration): Promise; + /** + * Version: 9.2.0.cl or later Allows you to deploy a commit and publish TML content to your ThoughtSpot instance. Requires at least edit access to the objects used in the deploy operation. The API deploys the head of the branch unless a `commit_id` is specified in the API request. If the branch name is not defined in the request, the default branch is considered for deploying commits. For more information, see [Git integration documentation](https://developers.thoughtspot.com/docs/git-integration). + * @param deployCommitRequest + */ + deployCommit(deployCommitRequest: DeployCommitRequest, _options?: Configuration): Promise; + /** + * Version: 9.2.0.cl or later Reverts TML objects to a previous commit specified in the API request. Requires at least edit access to objects. In the API request, specify the `commit_id`. If the branch name is not specified in the request, the API will consider the default branch configured on your instance. By default, the API reverts all objects. If the revert operation fails for one of the objects provided in the commit, the API returns an error and does not revert any object. For more information, see [Git integration documentation](https://developers.thoughtspot.com/docs/git-integration). + * @param commitId Commit id to which the object should be reverted + * @param revertCommitRequest + */ + revertCommit(commitId: string, revertCommitRequest: RevertCommitRequest, _options?: Configuration): Promise; + /** + * Version: 9.2.0.cl or later Gets a list of commits for a given metadata object. Requires `DATAMANAGEMENT` (**Can manage data**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance on your instance, the `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` (**Can manage data models**) privilege and edit access to the metadata objects. + * @param searchCommitsRequest + */ + searchCommits(searchCommitsRequest: SearchCommitsRequest, _options?: Configuration): Promise; + /** + * Version: 9.2.0.cl or later Gets Git repository connections configured on the ThoughtSpot instance. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance on your instance, the `CAN_SETUP_VERSION_CONTROL` (**Can set up version control**) privilege. + * @param searchConfigRequest + */ + searchConfig(searchConfigRequest: SearchConfigRequest, _options?: Configuration): Promise; + /** + * Version: 9.2.0.cl or later Updates Git repository configuration settings. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance on your instance, the `CAN_SETUP_VERSION_CONTROL` (**Can set up version control**) privilege. + * @param updateConfigRequest + */ + updateConfig(updateConfigRequest: UpdateConfigRequest, _options?: Configuration): Promise; + /** + * Version: 9.2.0.cl or later Validates the content of your source branch against the objects in your destination environment. Before merging content from your source branch to the destination branch, run this API operation from your destination environment and ensure that the changes from the source branch function in the destination environment. Requires `DATAMANAGEMENT` (**Can manage data**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance on your instance, the `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` (**Can manage data models**) privilege and edit access to the metadata objects. + * @param validateMergeRequest + */ + validateMerge(validateMergeRequest: ValidateMergeRequest, _options?: Configuration): Promise; +} +declare class VersionControlApiResponseProcessor { + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to commitBranch + * @throws ApiException if the response code was not in [200, 299] + */ + commitBranch(response: ResponseContext): Promise; + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to createConfig + * @throws ApiException if the response code was not in [200, 299] + */ + createConfig(response: ResponseContext): Promise; + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to deleteConfig + * @throws ApiException if the response code was not in [200, 299] + */ + deleteConfig(response: ResponseContext): Promise; + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to deployCommit + * @throws ApiException if the response code was not in [200, 299] + */ + deployCommit(response: ResponseContext): Promise>; + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to revertCommit + * @throws ApiException if the response code was not in [200, 299] + */ + revertCommit(response: ResponseContext): Promise; + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to searchCommits + * @throws ApiException if the response code was not in [200, 299] + */ + searchCommits(response: ResponseContext): Promise>; + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to searchConfig + * @throws ApiException if the response code was not in [200, 299] + */ + searchConfig(response: ResponseContext): Promise>; + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to updateConfig + * @throws ApiException if the response code was not in [200, 299] + */ + updateConfig(response: ResponseContext): Promise; + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to validateMerge + * @throws ApiException if the response code was not in [200, 299] + */ + validateMerge(response: ResponseContext): Promise>; +} + +/** + * no description + */ +declare class WebhooksApiRequestFactory extends BaseAPIRequestFactory { + /** + * Version: 10.14.0.cl or later Creates a new webhook configuration to receive notifications for specified events. The webhook will be triggered when the configured events occur in the system. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) or `DEVELOPER` (**Has developer privilege**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, users with `CAN_MANAGE_WEBHOOKS` (**Can manage webhooks**) privilege are also authorized to perform this action. + * @param createWebhookConfigurationRequest + */ + createWebhookConfiguration(createWebhookConfigurationRequest: CreateWebhookConfigurationRequest, _options?: Configuration): Promise; + /** + * Version: 10.14.0.cl or later Deletes one or more webhook configurations by their unique id or name. Returns status of each deletion operation, including successfully deleted webhooks and any failures with error details. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) or `DEVELOPER` (**Has developer privilege**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, users with `CAN_MANAGE_WEBHOOKS` (**Can manage webhooks**) privilege are also authorized to perform this action. + * @param deleteWebhookConfigurationsRequest + */ + deleteWebhookConfigurations(deleteWebhookConfigurationsRequest: DeleteWebhookConfigurationsRequest, _options?: Configuration): Promise; + /** + * Version: 10.14.0.cl or later Searches for webhook configurations based on various criteria such as Org, webhook identifier, event type, with support for pagination and sorting. Returns matching webhook configurations with their complete details. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) or `DEVELOPER` (**Has developer privilege**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, users with `CAN_MANAGE_WEBHOOKS` (**Can manage webhooks**) privilege are also authorized to perform this action. + * @param searchWebhookConfigurationsRequest + */ + searchWebhookConfigurations(searchWebhookConfigurationsRequest: SearchWebhookConfigurationsRequest, _options?: Configuration): Promise; + /** + * Version: 10.14.0.cl or later Updates an existing webhook configuration by its unique id or name. Only the provided fields will be updated. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) or `DEVELOPER` (**Has developer privilege**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, users with `CAN_MANAGE_WEBHOOKS` (**Can manage webhooks**) privilege are also authorized to perform this action. + * @param webhookIdentifier Unique ID or name of the webhook configuration. + * @param updateWebhookConfigurationRequest + */ + updateWebhookConfiguration(webhookIdentifier: string, updateWebhookConfigurationRequest: UpdateWebhookConfigurationRequest, _options?: Configuration): Promise; +} +declare class WebhooksApiResponseProcessor { + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to createWebhookConfiguration + * @throws ApiException if the response code was not in [200, 299] + */ + createWebhookConfiguration(response: ResponseContext): Promise; + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to deleteWebhookConfigurations + * @throws ApiException if the response code was not in [200, 299] + */ + deleteWebhookConfigurations(response: ResponseContext): Promise; + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to searchWebhookConfigurations + * @throws ApiException if the response code was not in [200, 299] + */ + searchWebhookConfigurations(response: ResponseContext): Promise; + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to updateWebhookConfiguration + * @throws ApiException if the response code was not in [200, 299] + */ + updateWebhookConfiguration(response: ResponseContext): Promise; +} + +declare class PromiseAIApi { + private api; + constructor(configuration: Configuration, requestFactory?: AIApiRequestFactory, responseProcessor?: AIApiResponseProcessor); + /** + * Version: 26.2.0.cl or later Creates a new Spotter agent conversation based on the provided context and settings. The endpoint was in Beta from 26.2.0.cl through 26.4.0.cl. Requires `CAN_USE_SPOTTER` privilege and at least view access to the metadata object specified in the request. #### Usage guidelines The request must include the `metadata_context` parameter to define the conversation context. The context type can be one of: - `DATA_SOURCE` *(available from 26.5.0.cl)*: targets a specific data source. Provide `data_source_identifier` in `data_source_context` for a single data source, or `data_source_identifiers` for multi-data-source context. The deprecated `guid` field is accepted for backwards compatibility. - `AUTO_MODE` *(available from 26.5.0.cl)*: automatically discovers and selects the most relevant datasets for the user\'s queries. > **Note for callers on versions 26.2.0.cl – 26.4.0.cl (Beta):** use the lowercase `data_source` enum value with the `guid` field instead of the above. Example: `{ \"type\": \"data_source\", \"data_source_context\": { \"guid\": \"\" } }`. The `conversation_settings` parameter controls which Spotter capabilities are enabled for the conversation: - `enable_contextual_change_analysis` (default: `true`, **deprecated from 26.2.0.cl**) — always enabled in Spotter 3; setting this to `false` has no effect on versions >= 26.2.0.cl - `enable_natural_language_answer_generation` (default: `true`, **deprecated from 26.2.0.cl**) — always enabled in Spotter 3; setting this to `false` has no effect on versions >= 26.2.0.cl - `enable_reasoning` (default: `true`, **deprecated from 26.2.0.cl**) — always enabled in Spotter 3; setting this to `false` has no effect on versions >= 26.2.0.cl - `enable_save_chat` (default: `false`, *available from 26.5.0.cl*) — enables saving the conversation for later retrieval via conversation history If the request is successful, the response includes a unique `conversation_identifier` that must be passed to `sendAgentConversationMessage` or `sendAgentConversationMessageStreaming` to send messages within this conversation. The response also includes `conversation_id` with the same value for backwards compatibility; use `conversation_identifier` for new integrations. #### Example request ```json { \"metadata_context\": { \"type\": \"DATA_SOURCE\", \"data_source_context\": { \"data_source_identifier\": \"a1b2c3d4-e5f6-7890-abcd-ef1234567890\" } }, \"conversation_settings\": {} } ``` #### Error responses | Code | Description | | ---- | --------------------------------------------------------------------------------------------------------------------------------------- | | 401 | Unauthorized — authentication token is missing, expired, or invalid. | | 403 | Forbidden — the authenticated user does not have `CAN_USE_SPOTTER` privilege or lacks view permission on the specified metadata object. | > ###### Note: > > - This endpoint was in Beta from 26.2.0.cl through 26.4.0.cl and is Generally Available from version 26.5.0.cl. > - This endpoint requires Spotter - please contact ThoughtSpot support to enable Spotter on your cluster. + * @param createAgentConversationRequest + */ + createAgentConversation(createAgentConversationRequest: CreateAgentConversationRequest, _options?: Configuration): Promise; + /** + * Version: 10.4.0.cl or later Creates a new conversation session tied to a specific data model for AI-driven natural language querying. Requires `CAN_USE_SPOTTER` privilege and at least view access to the metadata object specified in the request. #### Usage guidelines The request must include: - `metadata_identifier`: the unique ID of the data source that provides context for the conversation Optionally, you can provide: - `tokens`: a token string to set initial context for the conversation (e.g., `\"[sales],[item type],[state]\"`) If the request is successful, ThoughtSpot returns a unique `conversation_identifier` that must be passed to `sendMessage` to continue the conversation. #### Error responses | Code | Description | |------|-------------| | 401 | Unauthorized — authentication token is missing, expired, or invalid. | | 403 | Forbidden — the authenticated user does not have `CAN_USE_SPOTTER` privilege or lacks view permission on the specified metadata object. | > ###### Note: > * This endpoint is currently in Beta. Breaking changes may be introduced before the endpoint is made Generally Available. > * This endpoint requires Spotter - please contact ThoughtSpot support to enable Spotter on your cluster. + * @param createConversationRequest + */ + createConversation(createConversationRequest: CreateConversationRequest, _options?: Configuration): Promise; + /** + * Version: 10.15.0.cl or later Suggests the most relevant data sources for a given natural language query, ranked by confidence with LLM-generated reasoning. Requires `CAN_USE_SPOTTER` privilege and at least view-level access to the underlying metadata entities referenced in the response. #### Usage guidelines The request must include: - `query`: the natural language question to find relevant data sources for If the request is successful, the API returns a ranked list of suggested data sources, each containing: - `confidence`: a float score indicating the model\'s confidence in the relevance of the suggestion - `details`: metadata about the data source - `data_source_identifier`: the unique ID of the data source - `data_source_name`: the display name of the data source - `description`: a description of the data source - `reasoning`: LLM-generated rationale explaining why the data source was recommended #### Error responses | Code | Description | |------|--------------------------------------------------------------------------------------------------------------------------------------------| | 401 | Unauthorized — authentication token is missing, expired, or invalid. | | 403 | Forbidden — the authenticated user does not have `CAN_USE_SPOTTER` privilege or lacks view permission on the underlying metadata entities. | > ###### Note: > * This endpoint is currently in Beta. Breaking changes may be introduced before it is made Generally Available. > * This endpoint requires Spotter — please contact ThoughtSpot Support to enable Spotter on your cluster. + * @param getDataSourceSuggestionsRequest + */ + getDataSourceSuggestions(getDataSourceSuggestionsRequest: GetDataSourceSuggestionsRequest, _options?: Configuration): Promise; + /** + * Version: 10.15.0.cl or later Retrieves existing natural language (NL) instructions configured for a specific data model. These instructions guide the AI system in understanding data context and generating more accurate responses. Requires `CAN_USE_SPOTTER` privilege, at least view access on the data model, and a bearer token corresponding to the org where the data model exists. #### Usage guidelines The request must include: - `data_source_identifier`: the unique ID of the data model to retrieve instructions for If the request is successful, the API returns: - `nl_instructions_info`: an array of instruction objects, each containing: - `instructions`: the configured text instructions for AI processing - `scope`: the scope of the instruction — currently only `GLOBAL` is supported #### Instructions scope - **GLOBAL**: Instructions that apply globally across the system on the given data-model (currently only global instructions are supported) #### Error responses | Code | Description | |------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| | 401 | Unauthorized — authentication token is missing, expired, or invalid. | | 403 | Forbidden — the authenticated user does not have `CAN_USE_SPOTTER` privilege, lacks view access on the data model, or the bearer token does not correspond to the org where the data model exists. | > ###### Note: > > - To use this API, the user needs at least view access on the data model, and must use the bearer token corresponding to the org where the data model exists. > - This endpoint is currently in Beta. Breaking changes may be introduced before the endpoint is made Generally Available. > - Available from version 10.15.0.cl and later. > - This endpoint requires Spotter — please contact ThoughtSpot Support to enable Spotter on your cluster. > - Use this API to review currently configured instructions before modifying them with `setNLInstructions`. + * @param getNLInstructionsRequest + */ + getNLInstructions(getNLInstructionsRequest: GetNLInstructionsRequest, _options?: Configuration): Promise; + /** + * Version: 10.13.0.cl or later Breaks down a natural language query into a series of smaller analytical sub-questions, each mapped to a relevant data source. Requires `CAN_USE_SPOTTER` privilege and at least view-level access to the referenced metadata objects. #### Usage guidelines The request must include: - `query`: the natural language question to decompose into analytical sub-questions - `metadata_context`: at least one of the following context identifiers to guide question generation: - `conversation_identifier` — an existing conversation session ID - `answer_identifiers` — a list of Answer GUIDs - `liveboard_identifiers` — a list of Liveboard GUIDs - `data_source_identifiers` — a list of data source GUIDs Optional parameters for refining the output: - `ai_context`: additional context to improve response quality - `content` — supplementary text or CSV data as string input - `instructions` — custom text instructions for the AI system - `limit_relevant_questions`: maximum number of questions to return (default: `5`) - `bypass_cache`: if `true`, forces fresh computation instead of returning cached results If the request is successful, the API returns a list of relevant analytical questions, each containing: - `query`: the generated sub-question - `data_source_identifier`: the unique ID of the data source the question targets - `data_source_name`: the display name of the corresponding data source #### Error responses | Code | Description | |------|---------------------------------------------------------------------------------------------------------------------------------------| | 401 | Unauthorized — authentication token is missing, expired, or invalid. | | 403 | Forbidden — the authenticated user does not have `CAN_USE_SPOTTER` privilege or lacks view access to the referenced metadata objects. | > ###### Note: > * This endpoint is currently in Beta. Breaking changes may be introduced before the endpoint is made Generally Available. > * This endpoint requires Spotter - please contact ThoughtSpot support to enable Spotter on your cluster. + * @param getRelevantQuestionsRequest + */ + getRelevantQuestions(getRelevantQuestionsRequest: GetRelevantQuestionsRequest, _options?: Configuration): Promise; + /** + * Version: 10.7.0.cl or later **Deprecated** — Use `getRelevantQuestions` instead (available from 10.13.0.cl). Breaks down a topical or goal-oriented natural language question into smaller, actionable analytical sub-questions, each mapped to a relevant data source for independent execution. Requires `CAN_USE_SPOTTER` privilege and at least view-level access to the referenced metadata objects. #### Usage guidelines The request accepts the following parameters: - `nlsRequest`: contains the user `query` to decompose, along with optional `instructions` and `bypassCache` flag - `worksheetIds`: list of data source identifiers to scope the decomposition - `answerIds`: list of Answer GUIDs whose data guides the response - `liveboardIds`: list of Liveboard GUIDs whose data guides the response - `conversationId`: an existing conversation session ID for context continuity - `content`: supplementary text or CSV data to improve response quality - `maxDecomposedQueries`: maximum number of sub-questions to return (default: `5`) If the request is successful, the API returns a `decomposedQueryResponse` containing a list of `decomposedQueries`, each with: - `query`: the generated analytical sub-question - `worksheetId`: the unique ID of the data source the question targets - `worksheetName`: the display name of the corresponding data source #### Error responses | Code | Description | |------|---------------------------------------------------------------------------------------------------------------------------------------| | 401 | Unauthorized — authentication token is missing, expired, or invalid. | | 403 | Forbidden — the authenticated user does not have `CAN_USE_SPOTTER` privilege or lacks view access to the referenced metadata objects. | > ###### Note: > * This endpoint is deprecated since 10.13.0.cl. Use `getRelevantQuestions` for new integrations. > * This endpoint is currently in Beta. Breaking changes may be introduced before the endpoint is made Generally Available. > * This endpoint requires Spotter — please contact ThoughtSpot support to enable Spotter on your cluster. + * @param queryGetDecomposedQueryRequest + */ + queryGetDecomposedQuery(queryGetDecomposedQueryRequest: QueryGetDecomposedQueryRequest, _options?: Configuration): Promise; + /** + * Version: 26.5.0.cl or later Sends natural language messages to an existing Spotter agent conversation and returns the complete response synchronously. Requires `CAN_USE_SPOTTER` privilege and access to the metadata object associated with the conversation. The user must have access to the conversation session referenced by `conversation_identifier`. A conversation must first be created using the `createAgentConversation` API. #### Usage guidelines The request must include: - `conversation_identifier`: the unique session ID returned by `createAgentConversation`, used for context continuity and message tracking - `messages`: an array of one or more text messages to send to the agent The API returns an array of response objects, each containing: - `type`: the kind of response — `text`, `answer`, or `error` - `message`: the main content of the response - `metadata`: additional information depending on the message type (e.g., answer metadata includes analytics and visualization details) #### Error responses | Code | Description | |------|----------------------------------------------------------------------------------------------------------------------------------| | 401 | Unauthorized — authentication token is missing, expired, or invalid. | | 403 | Forbidden — the authenticated user does not have `CAN_USE_SPOTTER` privilege or lacks permission on the referenced conversation. | > ###### Note: > > - This endpoint is Generally Available from version 26.5.0.cl. > - This endpoint requires Spotter - please contact ThoughtSpot support to enable Spotter on your cluster. > - For real-time streamed responses, use `sendAgentConversationMessageStreaming` instead. + * @param conversationIdentifier Unique identifier for the conversation (used to track context) + * @param sendAgentConversationMessageRequest + */ + sendAgentConversationMessage(conversationIdentifier: string, sendAgentConversationMessageRequest: SendAgentConversationMessageRequest, _options?: Configuration): Promise; + /** + * Version: 26.5.0.cl or later Sends one or more natural language messages to an existing Spotter agent conversation and returns the response as a real-time Server-Sent Events stream. Requires `CAN_USE_SPOTTER` privilege and access to the metadata object associated with the conversation. The user must have access to the conversation session referenced by `conversation_identifier`. A conversation must first be created using the `createAgentConversation` API. #### Usage guidelines The request must include: - `conversation_identifier`: the unique session ID returned by `createAgentConversation`, used for context continuity and message tracking - `messages`: an array of one or more text messages to send to the agent If the request is valid, the API returns a Server-Sent Events (SSE) stream. Each line has the form `data: [{\"type\": \"...\", ...}]` — a JSON array of event objects. Event types include: - `ack`: confirms receipt of the request (`node_id`) - `conv_title`: conversation title (`title`, `conv_id`) - `notification`: status updates on operations (`group_id`, `metadata`, `code` — e.g. `TOOL_CALL_NOTIFICATION`, `nls_start`, `FINAL_RESPONSE_NOTIFICATION`) - `text-chunk`: incremental content chunks (`id`, `group_id`, `metadata` with `format` and `type` such as `thinking` or `text`, `content`) - `text`: full text block with same structure as `text-chunk` - `answer`: structured answer with metadata (`id`, `group_id`, `metadata` with `sage_query`, `session_id`, `title`, etc., `title`) - `error`: if a failure occurs #### Error responses | Code | Description | | ---- | -------------------------------------------------------------------------------------------------------------------------------- | | 401 | Unauthorized — authentication token is missing, expired, or invalid. | | 403 | Forbidden — the authenticated user does not have `CAN_USE_SPOTTER` privilege or lacks permission on the referenced conversation. | > ###### Note: > > - This endpoint is Generally Available from version 26.5.0.cl. > - This endpoint requires Spotter - please contact ThoughtSpot support to enable Spotter on your cluster. > - The streaming protocol uses Server-Sent Events (SSE). > - For the complete response in a single payload, use `sendAgentConversationMessage` instead. + * @param conversationIdentifier Unique identifier for the conversation (used to track context) + * @param sendAgentConversationMessageStreamingRequest + */ + sendAgentConversationMessageStreaming(conversationIdentifier: string, sendAgentConversationMessageStreamingRequest: SendAgentConversationMessageStreamingRequest, _options?: Configuration): Promise; + /** + * Version: 26.2.0.cl or later **Deprecated** — Use `sendAgentConversationMessage` instead. Send natural language messages to an existing Spotter agent conversation and returns the complete response synchronously. Requires `CAN_USE_SPOTTER` privilege and access to the metadata object associated with the conversation. The user must have access to the conversation session referenced by `conversation_identifier`. A conversation must first be created using the `createAgentConversation` API. #### Usage guidelines The request must include: - `conversation_identifier`: the unique session ID returned by `createAgentConversation`, used for context continuity and message tracking - `messages`: an array of one or more text messages to send to the agent The API returns an array of response objects, each containing: - `type`: the kind of response — `text`, `answer`, or `error` - `message`: the main content of the response - `metadata`: additional information depending on the message type (e.g., answer metadata includes analytics and visualization details) #### Error responses | Code | Description | |------|----------------------------------------------------------------------------------------------------------------------------------| | 401 | Unauthorized — authentication token is missing, expired, or invalid. | | 403 | Forbidden — the authenticated user does not have `CAN_USE_SPOTTER` privilege or lacks permission on the referenced conversation. | > ###### Note: > > - This endpoint is deprecated. Use `sendAgentConversationMessage` for new integrations. > - This endpoint is currently in Beta. Breaking changes may be introduced before the endpoint is made Generally Available. > - This endpoint requires Spotter - please contact ThoughtSpot support to enable Spotter on your cluster. + * @param conversationIdentifier Unique identifier for the conversation (used to track context) + * @param sendAgentMessageRequest + */ + sendAgentMessage(conversationIdentifier: string, sendAgentMessageRequest: SendAgentMessageRequest, _options?: Configuration): Promise; + /** + * Version: 26.2.0.cl or later **Deprecated** — Use `sendAgentConversationMessageStreaming` instead. Sends one or more natural language messages to an existing Spotter agent conversation and returns the response as a real-time Server-Sent Events stream. Requires `CAN_USE_SPOTTER` privilege and access to the metadata object associated with the conversation. The user must have access to the conversation session referenced by `conversation_identifier`. A conversation must first be created using the `createAgentConversation` API. #### Usage guidelines The request must include: - `conversation_identifier`: the unique session ID returned by `createAgentConversation`, used for context continuity and message tracking - `messages`: an array of one or more text messages to send to the agent If the request is valid, the API returns a Server-Sent Events (SSE) stream. Each line has the form `data: [{\"type\": \"...\", ...}]` — a JSON array of event objects. Event types include: - `ack`: confirms receipt of the request (`node_id`) - `conv_title`: conversation title (`title`, `conv_id`) - `notification`: status updates on operations (`group_id`, `metadata`, `code` — e.g. `TOOL_CALL_NOTIFICATION`, `nls_start`, `FINAL_RESPONSE_NOTIFICATION`) - `text-chunk`: incremental content chunks (`id`, `group_id`, `metadata` with `format` and `type` such as `thinking` or `text`, `content`) - `text`: full text block with same structure as `text-chunk` - `answer`: structured answer with metadata (`id`, `group_id`, `metadata` with `sage_query`, `session_id`, `title`, etc., `title`) - `error`: if a failure occurs #### Error responses | Code | Description | |------|----------------------------------------------------------------------------------------------------------------------------------| | 401 | Unauthorized — authentication token is missing, expired, or invalid. | | 403 | Forbidden — the authenticated user does not have `CAN_USE_SPOTTER` privilege or lacks permission on the referenced conversation. | > ###### Note: > > - This endpoint is deprecated. Use `sendAgentConversationMessageStreaming` for new integrations. > - This endpoint is currently in Beta. Breaking changes may be introduced before the endpoint is made Generally Available. > - This endpoint requires Spotter - please contact ThoughtSpot support to enable Spotter on your cluster. > - The streaming protocol uses Server-Sent Events (SSE). + * @param sendAgentMessageStreamingRequest + */ + sendAgentMessageStreaming(sendAgentMessageStreamingRequest: SendAgentMessageStreamingRequest, _options?: Configuration): Promise; + /** + * Version: 10.4.0.cl or later Sends a follow-up message to an existing conversation within the context of a data model. Requires `CAN_USE_SPOTTER` privilege and at least view access to the metadata object specified in the request. A conversation must first be created using the `createConversation` API. #### Usage guidelines The request must include: - `conversation_identifier`: the unique session ID returned by `createConversation` - `metadata_identifier`: the unique ID of the data source used for the conversation - `message`: a natural language string with the follow-up question If the request is successful, the API returns an array of response messages, each containing: - `session_identifier`: the unique ID of the generated response - `generation_number`: the generation number of the response - `message_type`: the type of the response (e.g., `TSAnswer`) - `visualization_type`: the generated visualization type (`Chart`, `Table`, or `Undefined`) - `tokens` / `display_tokens`: the search tokens and user-friendly display tokens for the response #### Error responses | Code | Description | |------|-----------------------------------------------------------------------------------------------------------------------------------------| | 401 | Unauthorized — authentication token is missing, expired, or invalid. | | 403 | Forbidden — the authenticated user does not have `CAN_USE_SPOTTER` privilege or lacks view permission on the specified metadata object. | > ###### Note: > * This endpoint is currently in Beta. Breaking changes may be introduced before the endpoint is made Generally Available. > * This endpoint requires Spotter - please contact ThoughtSpot support to enable Spotter on your cluster. + * @param conversationIdentifier Unique identifier of the conversation. + * @param sendMessageRequest + */ + sendMessage(conversationIdentifier: string, sendMessageRequest: SendMessageRequest, _options?: Configuration): Promise>; + /** + * Version: 10.15.0.cl or later This API allows users to set natural language (NL) instructions for a specific data-model to improve AI-generated answers and query processing. These instructions help guide the AI system to better understand the data context and provide more accurate responses. Requires `CAN_USE_SPOTTER` privilege, either edit access or `SPOTTER_COACHING_PRIVILEGE` on the data model, and a bearer token corresponding to the org where the data model exists. #### Usage guidelines To set NL instructions for a data-model, the request must include: - `data_source_identifier`: The unique ID of the data-model for which to set NL instructions - `nl_instructions_info`: An array of instruction objects, each containing: - `instructions`: Array of text instructions for the LLM - `scope`: The scope of the instruction (`GLOBAL`). Currently only `GLOBAL` is supported. It can be extended to data-model-user scope in future. #### Instructions scope - **GLOBAL**: instructions that apply to all users querying this data model If the request is successful, the API returns: - `success`: a boolean indicating whether the operation completed successfully #### Error responses | Code | Description | |------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| | 401 | Unauthorized — authentication token is missing, expired, or invalid. | | 403 | Forbidden — the authenticated user does not have `CAN_USE_SPOTTER` privilege, lacks edit access or `SPOTTER_COACHING_PRIVILEGE` on the data model, or the bearer token does not correspond to the org where the data model exists. | > ###### Note: > > - To use this API, the user needs either edit access or `SPOTTER_COACHING_PRIVILEGE` on the data model, and must use the bearer token corresponding to the org where the data model exists. > - This endpoint is currently in Beta. Breaking changes may be introduced before the endpoint is made Generally Available. > - Available from version 10.15.0.cl and later. > - This endpoint requires Spotter — please contact ThoughtSpot Support to enable Spotter on your cluster. > - Instructions help improve the accuracy and relevance of AI-generated responses for the specified data-model. + * @param setNLInstructionsRequest + */ + setNLInstructions(setNLInstructionsRequest: SetNLInstructionsRequest, _options?: Configuration): Promise; + /** + * Version: 10.4.0.cl or later Processes a natural language query against a specified data model and returns a single AI-generated answer without requiring a conversation session. Requires `CAN_USE_SPOTTER` privilege and at least view access to the metadata object specified in the request. #### Usage guidelines The request must include: - `query`: a natural language question (e.g., \"What were total sales last quarter?\") - `metadata_identifier`: the unique ID of the data source to query against If the request is successful, the API returns a response message containing: - `session_identifier`: the unique ID of the generated response - `generation_number`: the generation number of the response - `message_type`: the type of the response (e.g., `TSAnswer`) - `visualization_type`: the generated visualization type (`Chart`, `Table`, or `Undefined`) - `tokens` / `display_tokens`: the search tokens and user-friendly display tokens for the response #### Error responses | Code | Description | |------|-----------------------------------------------------------------------------------------------------------------------------------------| | 401 | Unauthorized — authentication token is missing, expired, or invalid. | | 403 | Forbidden — the authenticated user does not have `CAN_USE_SPOTTER` privilege or lacks view permission on the specified metadata object. | > ###### Note: > * This endpoint is currently in Beta. Breaking changes may be introduced before the endpoint is made Generally Available. > * This endpoint requires Spotter - please contact ThoughtSpot support to enable Spotter on your cluster. + * @param singleAnswerRequest + */ + singleAnswer(singleAnswerRequest: SingleAnswerRequest, _options?: Configuration): Promise; + /** + * Stops an in-progress agent conversation response. Version: 26.6.0.cl or later Version: 26.6.0.cl or later Stops an in-progress agent response for the specified conversation. Use this endpoint to cancel a response that is actively being generated — for example, when the user navigates away, reformulates their question, or no longer needs the current result. Requires `CAN_USE_SPOTTER` privilege and access to the specified conversation. #### Usage guidelines The request must include: - `conversation_identifier` *(path parameter)*: the unique ID of the conversation whose active response should be stopped, as returned by `createAgentConversation` A successful request returns an empty `204 No Content` response. If there is no active response in progress at the time of the call, the request is still treated as successful. After stopping a response, the conversation session remains active. You can continue sending messages using `sendAgentConversationMessage` or `sendAgentConversationMessageStreaming`. #### Example request ```bash POST /api/rest/2.0/ai/agent/conversation/{conversation_identifier}/stop-response ``` #### Typical usage scenario This endpoint is useful when integrating Spotter into a chat UI where users can cancel a long-running query. For example: 1. User sends a message via `sendAgentConversationMessageStreaming`. 2. User clicks a \"Stop generating\" button while the response is streaming. 3. Your client calls `stopConversation` with the active `conversation_identifier`. 4. The stream is terminated and the user can ask a new question. #### Error responses | Code | Description | |------|-------------| | 401 | Unauthorized — authentication token is missing, expired, or invalid. | | 403 | Forbidden — the authenticated user does not have `CAN_USE_SPOTTER` privilege or lacks access to the specified conversation. | > ###### Note: > > - Calling this endpoint when no response is in progress does not return an error. > - The conversation context is preserved after stopping — previous messages and answers remain accessible. > - Available from version 26.6.0.cl and later. > - This endpoint requires Spotter — please contact ThoughtSpot Support to enable Spotter on your cluster. > - This feature is available only for **Spotter 3** (`SPOTTER3`) version. + * @param conversationIdentifier Unique identifier of the conversation to stop. + */ + stopConversation(conversationIdentifier: string, _options?: Configuration): Promise; +} + +declare class PromiseAuthenticationApi { + private api; + constructor(configuration: Configuration, requestFactory?: AuthenticationApiRequestFactory, responseProcessor?: AuthenticationApiResponseProcessor); + /** + * Version: 26.6.0.cl or later Enables or disables authentication at cluster or org level for the specified auth type. Currently supports `TRUSTED_AUTH`. #### Required privileges Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) or `CONTROL_TRUSTED_AUTH` (**Can Enable or Disable Trusted Authentication**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled, the `CONTROL_TRUSTED_AUTH` privilege is required. #### Usage guidelines Use `cluster_preferences` to enable or disable authentication at the cluster level. Cluster-level settings can only be configured from the Primary Org. - `ENABLED` — Generates a new access token if one does not exist. An existing token is preserved. - `DISABLED` — Revokes the existing cluster-level access token. Use `org_preferences` to enable or disable authentication for one or more Orgs. Each entry must include an `org_identifier` (unique ID or name) and an `auth_status`. Org-level configuration requires the per-Org authentication feature to be enabled on your instance. - `ENABLED` — Generates a new org-level access token if one does not exist. - `DISABLED` — Revokes the existing org-level access token for that Org. Both `cluster_preferences` and `org_preferences` are optional. Omitting a field leaves the corresponding settings unchanged. If both are omitted, the API returns `204 No Content` without making any changes. **Note**: Cluster-level and org-level settings are independent of each other. Enabling or disabling one does not affect the other. + * @param configureAuthSettingsRequest + */ + configureAuthSettings(configureAuthSettingsRequest: ConfigureAuthSettingsRequest, _options?: Configuration): Promise; + /** + * Version: 9.0.0.cl or later Retrieves details of the current user session for the token provided in the request header. Any ThoughtSpot user can access this endpoint and send an API request. The data returned in the API response varies according to user\'s privilege and object access permissions. **NOTE**: In ThoughtSpot, users with cluster administration privileges can access all Orgs by default. However, unless the administrator is explicitly added to an Org, the Orgs list in the session information returned by the API will include only the Primary Org. To include other Orgs in the API response, you must explicitly add the administrator to each Org in the Admin settings page in the UI or via user REST API. + */ + getCurrentUserInfo(_options?: Configuration): Promise; + /** + * Version: 9.4.0.cl or later Retrieves details of the current session token for the bearer token provided in the request header. This API endpoint does not create a new token. Instead, it returns details about the token, including the token string, creation time, expiration time, and the associated user. Use this endpoint to introspect your current session token, debug authentication issues, or when a frontend application needs session token details. Any ThoughtSpot user with a valid bearer token can access this endpoint and send an API request + */ + getCurrentUserToken(_options?: Configuration): Promise; + /** + * Version: 10.4.0.cl or later Creates an authentication token that provides values for the formula variables in the Row Level Security (RLS) rules for a given user. Recommended for use cases that require Attribute-based access control (ABAC) via RLS. #### Required privileges To add a new user and assign privileges during auto-creation, the `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege is required. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled, the `CONTROL_TRUSTED_AUTH` (**Can Enable or Disable Trusted Authentication**) privilege and edit access to the data source are required. To configure formula variables for all Orgs on your instance or the Primary Org, cluster administration privileges are required. Org administrators can configure formula variables for their respective Orgs. If Role-Based Access Control (RBAC) is enabled, users with the `CAN_MANAGE_VARIABLES` (**Can manage variables**) role privilege can also create and manage variables for their Org context. #### Usage guidelines You can generate a token by providing a `username` and `password`, or by using a `secret_key`. To generate a `secret_key`, the administrator must enable [Trusted authentication](https://developers.thoughtspot.com/docs/trusted-auth-secret-key) in the **Develop** > **Customizations** > **Security Settings** page. **Note**: * When both `password` and `secret_key` are included in the API request, `password` takes precedence. * If [Multi-Factor Authentication (MFA)](https://docs.thoughtspot.com/cloud/latest/authentication-local-mfa) is enabled on your instance, the API login request with `username` and `password` returns an error. You can switch to token-based authentication with `secret_key` or contact ThoughtSpot Support for assistance. The token obtained from ThoughtSpot is valid for 5 minutes by default. You can configure the token expiration time as required. #### ABAC via RLS To implement ABAC via RLS and assign security entitlements to users during session creation, generate a token with custom variable values. The values set in the authentication token are applied to the formula variables referenced in RLS rules at the table level, which determines the data each user can access based on their entitlements. The variable values can be configured to persist for a specific set of Models in user sessions initiated with the token, allowing different RLS rules to be set for different data models. Once defined, the rules are added to the user\'s `variable_values` object, after which all sessions will use the persisted values. For more information, see [ABAC via tokens Documentation](https://developers.thoughtspot.com/docs/abac-via-rls-variables). ##### Formula variables Before defining variable values, ensure the variables are created and available on your instance. To create a formula variable, you can use the **Create variable** (`/api/rest/2.0/template/variables/create`) REST API endpoint, with the variable `type` set as `Formula_Variable` in the API request. The API doesn\'t support `\"persist_option\": \"RESET\"` and `\"persist_option\": \"NONE\"` when `variable_values` are defined in the request. If you are using `variable_values` for token generation, you must use other supported persist options such as `APPEND` or `REPLACE`. If you want to use `RESET` or `NONE`, do not pass any `variable_values`. In such cases, `variable_values` will remain unaffected. #### Supported objects The supported object type is `LOGICAL_TABLE`. When using `object_id` with `variable_values`, models are supported. #### Just-in-time provisioning For [just-in-time user creation and provisioning](https://developers.thoughtspot.com/docs/just-in-time-provisioning), specify the following attributes in the API request: * `auto_create` * `username` * `display_name` * `email` * `groups` Set `auto_create` to `true` if the username does not exist in ThoughtSpot. If the username already exists in ThoughtSpot and `auto_create` is set to `true`, user properties such as display name, email, Org and group entitlements will not be updated with new values. Setting `auto_create` to `true` does not create formula variables. Hence, this setting will not be applicable to `variable_values`. #### Important point to note All options in the token creation APIs that define user access to data in ThoughtSpot will take effect during token creation, not when the token is used for authentication. For example, `auto_create:true` will create the user when the authentication token is created. Persist options such as `APPEND` and `REPLACE` will persist `variable_values` on the user profile when the token is created. + * @param getCustomAccessTokenRequest + */ + getCustomAccessToken(getCustomAccessTokenRequest: GetCustomAccessTokenRequest, _options?: Configuration): Promise; + /** + * Version: 9.0.0.cl or later Generates an authentication token for creating a full session in ThoughtSpot for a given user. Recommended for use cases that do not require Attribute-based access control (ABAC) via Row Level Security (RLS). #### Usage guidelines You can generate a token for a user by providing a `username` and `password`, or by using the `secret_key` generated for your instance. To generate a `secret_key`, the administrator must enable [Trusted authentication](https://developers.thoughtspot.com/docs/trusted-auth-secret-key) in the **Develop** > **Customizations** > **Security Settings** page. **Note**: * When both `password` and `secret_key` are included in the API request, `password` takes precedence. * If [Multi-Factor Authentication (MFA)](https://docs.thoughtspot.com/cloud/latest/authentication-local-mfa) is enabled on your instance, the API login request with `username` and `password` returns an error. You can switch to token-based authentication with `secret_key` or contact ThoughtSpot Support for assistance. The token obtained from ThoughtSpot is valid for 5 minutes by default. You can configure the token expiration time as required. #### Just-in-time provisioning For [just-in-time user creation and provisioning](https://developers.thoughtspot.com/docs/just-in-time-provisioning), specify the following attributes in the API request: * `auto_create` * `username` * `display_name` * `email` * `group_identifiers` Set `auto_create` to `true` if the username does not exist in ThoughtSpot. If the user already exists in ThoughtSpot and `auto_create` is set to `true`, user properties such as display name, email and group assignment will be updated. To add a new user and assign privileges during auto-creation, the `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege is required. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled, the `CONTROL_TRUSTED_AUTH` (**Can Enable or Disable Trusted Authentication**) privilege is required. #### Important point to note All options in the token creation APIs that define user access to data in ThoughtSpot will take effect during token creation, not when the token is used for authentication. For example, `auto_create:true` will create the user when the authentication token is created. + * @param getFullAccessTokenRequest + */ + getFullAccessToken(getFullAccessTokenRequest: GetFullAccessTokenRequest, _options?: Configuration): Promise; + /** + * Version: 9.0.0.cl or later Generates an authentication token that provides access to a specific metadata object. This object list is intersected with the list of objects the user is allowed to access via group membership. For more information, see [Object security](https://docs.thoughtspot.com/cloud/latest/security-data-object#object_security). #### Usage guidelines You can generate a token for a user by providing a `username` and `password`, or by using the `secret_key` generated for your instance. To generate a `secret_key`, the administrator must enable [Trusted authentication](https://developers.thoughtspot.com/docs/trusted-auth-secret-key) in the **Develop** > **Customizations** > **Security Settings** page. **Note**: * When both `password` and `secret_key` are included in the API request, `password` takes precedence. * If [Multi-Factor Authentication (MFA)](https://docs.thoughtspot.com/cloud/latest/authentication-local-mfa) is enabled on your instance, the API login request with `username` and `password` returns an error. You can switch to token-based authentication with `secret_key` or contact ThoughtSpot Support for assistance. The token obtained from ThoughtSpot is valid for 5 minutes by default. You can configure the token expiration time as required. #### Just-in-time provisioning For [just-in-time user creation and provisioning](https://developers.thoughtspot.com/docs/just-in-time-provisioning), specify the following attributes in the API request: * `auto_create` * `username` * `display_name` * `email` * `group_identifiers` Set `auto_create` to `true` if the user is not available in ThoughtSpot. If the user already exists in ThoughtSpot and the `auto_create` parameter is set to `true`, user properties such as display name, email, and group assignment will be updated. To add a new user and assign privileges, the `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege is required. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled, the `CONTROL_TRUSTED_AUTH`(**Can Enable or Disable Trusted Authentication**) privilege is required. #### Important point to note All options in the token creation APIs that define user access to data in ThoughtSpot will take effect during token creation, not when the token is used for authentication. For example, `auto_create:true` will create the user when the authentication token is created. + * @param getObjectAccessTokenRequest + */ + getObjectAccessToken(getObjectAccessTokenRequest: GetObjectAccessTokenRequest, _options?: Configuration): Promise; + /** + * Version: 9.0.0.cl or later Creates a login session for a ThoughtSpot user with Basic authentication. In Basic authentication method, REST clients log in to ThoughtSpot using `username` and `password` attributes. On a multi-tenant cluster with Orgs, users can pass the ID of the Org in the API request to log in to a specific Org context. **Note**: If Multi-Factor Authentication (MFA) is enabled on your instance, the API login request with basic authentication (`username` and `password` ) returns an error. Contact ThoughtSpot Support for assistance. A successful login returns a session cookie that can be used in your subsequent API requests. + * @param loginRequest + */ + login(loginRequest: LoginRequest, _options?: Configuration): Promise; + /** + * Version: 9.0.0.cl or later Logs out a user from their current session. + */ + logout(_options?: Configuration): Promise; + /** + * Version: 9.0.0.cl or later Revokes the authentication token issued for current user session. The token of your current session expires when you make a call to the `/api/rest/2.0/auth/token/revoke` endpoint. the users will not be able to access ThoughtSpot objects until a new token is obtained. To restart your session, request for a new token from ThoughtSpot. See [Get Full Access Token](#/http/api-endpoints/authentication/get-full-access-token). + * @param revokeTokenRequest + */ + revokeToken(revokeTokenRequest: RevokeTokenRequest, _options?: Configuration): Promise; + /** + * Version: 26.6.0.cl or later Returns the authentication configuration for the specified auth type at cluster and org level. Currently supports `TRUSTED_AUTH`. #### Required privileges Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) or `CONTROL_TRUSTED_AUTH` (**Can Enable or Disable Trusted Authentication**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled, the `CONTROL_TRUSTED_AUTH` privilege is required. #### Usage guidelines Use `scope` to control which level of settings are returned: - `CLUSTER` — Returns cluster-level authentication status and access tokens. Accessible only from the Primary Org. - `ORG` — Returns org-level authentication status and access tokens for the current Org. Requires the per-Org authentication feature to be enabled on your instance. - If `scope` is omitted, both cluster and org-level settings are returned based on the caller\'s org context and feature availability. The `access_tokens` array in `cluster_preferences` or `org_preferences` is omitted when no token is configured at that level. **Note**: Access tokens returned in the response are sensitive credentials. Treat them with the same care as passwords. + * @param searchAuthSettingsRequest + */ + searchAuthSettings(searchAuthSettingsRequest: SearchAuthSettingsRequest, _options?: Configuration): Promise; + /** + * Version: 9.12.0.cl or later Validates the authentication token specified in the API request. If your token is not valid, [Get a new token](#/http/api-endpoints/authentication/get-full-access-token). + * @param validateTokenRequest + */ + validateToken(validateTokenRequest: ValidateTokenRequest, _options?: Configuration): Promise; +} + +declare class PromiseCollectionsApi { + private api; + constructor(configuration: Configuration, requestFactory?: CollectionsApiRequestFactory, responseProcessor?: CollectionsApiResponseProcessor); + /** + * Version: 26.4.0.cl or later Creates a new collection in ThoughtSpot. Collections allow you to organize and group related metadata objects such as Liveboards, Answers, worksheets, and other data objects. You can also create nested collections (sub-collections) to build a hierarchical structure. #### Supported operations The API endpoint lets you perform the following operations: * Create a new collection * Add metadata objects (Liveboards, Answers, Logical Tables) to the collection * Create nested collections by adding sub-collections + * @param createCollectionRequest + */ + createCollection(createCollectionRequest: CreateCollectionRequest, _options?: Configuration): Promise; + /** + * Version: 26.4.0.cl or later Deletes one or more collections from ThoughtSpot. #### Delete options * **delete_children**: When set to `true`, deletes the child objects (metadata items) within the collection that the user has access to. Objects that the user does not have permission to delete will be skipped. * **dry_run**: When set to `true`, performs a preview of the deletion operation without actually deleting anything. The response shows what would be deleted, allowing you to review before committing the deletion. #### Response The response includes: * **metadata_deleted**: List of metadata objects that were successfully deleted * **metadata_skipped**: List of metadata objects that were skipped due to lack of permissions or other constraints + * @param deleteCollectionRequest + */ + deleteCollection(deleteCollectionRequest: DeleteCollectionRequest, _options?: Configuration): Promise; + /** + * Version: 26.4.0.cl or later Gets a list of collections available in ThoughtSpot. To get details of a specific collection, specify the collection GUID or name. You can also filter the API response based on the collection name pattern, author, and other criteria. #### Search options * **name_pattern**: Use \'%\' as a wildcard character to match collection names * **collection_identifiers**: Search for specific collections by their GUIDs or names * **include_metadata**: When set to `true`, includes the metadata objects within each collection in the response **NOTE**: If the API returns an empty list, consider increasing the value of the `record_size` parameter. To search across all available collections, set `record_size` to `-1`. + * @param searchCollectionsRequest + */ + searchCollections(searchCollectionsRequest: SearchCollectionsRequest, _options?: Configuration): Promise; + /** + * Version: 26.4.0.cl or later Updates an existing collection in ThoughtSpot. #### Supported operations This API endpoint lets you perform the following operations: * Update collection name and description * Change visibility settings * Add metadata objects to the collection (operation: ADD) * Remove metadata objects from the collection (operation: REMOVE) * Replace all metadata objects in the collection (operation: REPLACE) #### Operation types * **ADD**: Adds the specified metadata objects to the existing collection without removing current items * **REMOVE**: Removes only the specified metadata objects from the collection * **REPLACE**: Replaces all existing metadata objects with the specified items (default behavior) + * @param collectionIdentifier Unique GUID of the collection. Note: Collection names cannot be used as identifiers since duplicate names are allowed. + * @param updateCollectionRequest + */ + updateCollection(collectionIdentifier: string, updateCollectionRequest: UpdateCollectionRequest, _options?: Configuration): Promise; +} + +declare class PromiseConnectionConfigurationsApi { + private api; + constructor(configuration: Configuration, requestFactory?: ConnectionConfigurationsApiRequestFactory, responseProcessor?: ConnectionConfigurationsApiResponseProcessor); + /** + * Version: 10.12.0.cl or later Gets connection configuration objects. Requires `DATAMANAGEMENT` (**Can manage data**) and edit permissions to the connection object, or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) privilege is required. #### Usage guidelines * To get a list of all configurations available in the ThoughtSpot system, send the API request with only the connection name or GUID in the request body. * To fetch details of a configuration object, specify the configuration object name or GUID. + * @param connectionConfigurationSearchRequest + */ + connectionConfigurationSearch(connectionConfigurationSearchRequest: ConnectionConfigurationSearchRequest, _options?: Configuration): Promise>; + /** + * Version: 10.12.0.cl or later Creates an additional configuration to an existing connection to a data warehouse. Requires `DATAMANAGEMENT` (**Can manage data**) or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) privilege is required. #### Usage guidelines * A JSON map of configuration attributes in `configuration`. The following example shows the configuration attributes: ``` { \"user\":\"DEV_USER\", \"password\":\"TestConn123\", \"role\":\"DEV\", \"warehouse\":\"DEV_WH\" } ``` * If the `policy_type` is `PRINCIPALS`, then `policy_principals` is a required field. * If the `policy_type` is `PROCESSES`, then `policy_processes` is a required field. * If the `policy_type` is `NO_POLICY`, then `policy_principals` and `policy_processes` are not required fields. #### Parameterized Connection Support For parameterized connections that use OAuth authentication, only the same_as_parent and policy_process_options attributes are allowed in the API request. These attributes are not applicable to connections that are not parameterized. + * @param createConnectionConfigurationRequest + */ + createConnectionConfiguration(createConnectionConfigurationRequest: CreateConnectionConfigurationRequest, _options?: Configuration): Promise; + /** + * Version: 10.12.0.cl or later Deletes connection configuration objects. Requires `DATAMANAGEMENT` (**Can manage data**) and edit permissions to the connection object, or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) privilege is required. + * @param deleteConnectionConfigurationRequest + */ + deleteConnectionConfiguration(deleteConnectionConfigurationRequest: DeleteConnectionConfigurationRequest, _options?: Configuration): Promise; + /** + * Version: 10.12.0.cl or later Updates a connection configuration object. Requires `DATAMANAGEMENT` (**Can manage data**) and edit permissions to the connection object, or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) privilege is required. #### Supported operations This API endpoint lets you perform the following operations in a single API request: * Edit the name or description of the configuration * Edit the configuration properties * Edit the `policy_type` * Edit the type of authentication * Enable or disable a configuration #### Parameterized Connection Support For parameterized oauth based connections, only the `same_as_parent` and `policy_process_options` attributes are allowed. These attributes are not applicable to connections that are not parameterized. **NOTE**: When updating a configuration where `disabled` is `true`, you must reset `disabled` to `true` in your update request payload. If not explicitly set again, the API will default `disabled` to `false`. + * @param configurationIdentifier Unique ID or name of the configuration. + * @param updateConnectionConfigurationRequest + */ + updateConnectionConfiguration(configurationIdentifier: string, updateConnectionConfigurationRequest: UpdateConnectionConfigurationRequest, _options?: Configuration): Promise; +} + +declare class PromiseConnectionsApi { + private api; + constructor(configuration: Configuration, requestFactory?: ConnectionsApiRequestFactory, responseProcessor?: ConnectionsApiResponseProcessor); + /** + * Version: 9.2.0.cl or later Creates a connection to a data warehouse for live query services. Requires `DATAMANAGEMENT` (**Can manage data**) or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) privilege is required. #### Create a connection without tables To create a connection without tables: 1. Pass these parameters in your API request. * Name of the connection. * Type of the data warehouse to connect to. * A JSON map of configuration attributes in `data_warehouse_config`. The following example shows the configuration attributes for a SnowFlake connection: ``` { \"configuration\":{ \"accountName\":\"thoughtspot_partner\", \"user\":\"tsadmin\", \"password\":\"TestConn123\", \"role\":\"sysadmin\", \"warehouse\":\"MEDIUM_WH\" }, \"authenticationType\": \"SERVICE_ACCOUNT\", \"externalDatabases\":[ ] } ``` 2. Set `validate` to `false`. **NOTE:** If the `authentication_type` is anything other than SERVICE_ACCOUNT, you must explicitly provide the authenticationType property in the payload. If you do not specify authenticationType, the API will default to SERVICE_ACCOUNT as the authentication type. #### Create a connection with tables If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) and `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` (**Can manage data models**) privilege is required. To create a connection with tables: 1. Pass these parameters in your API request. * Name of the connection. * Type of the data warehouse to connect to. * A JSON map of configuration attributes, database details, and table properties in `data_warehouse_config` as shown in the following example: ``` { \"configuration\":{ \"accountName\":\"thoughtspot_partner\", \"user\":\"tsadmin\", \"password\":\"TestConn123\", \"role\":\"sysadmin\", \"warehouse\":\"MEDIUM_WH\" }, \"authenticationType\": \"SERVICE_ACCOUNT\", \"externalDatabases\":[ { \"name\":\"AllDatatypes\", \"isAutoCreated\":false, \"schemas\":[ { \"name\":\"alldatatypes\", \"tables\":[ { \"name\":\"allDatatypes\", \"type\":\"TABLE\", \"description\":\"\", \"selected\":true, \"linked\":true, \"columns\":[ { \"name\":\"CNUMBER\", \"type\":\"INT64\", \"canImport\":true, \"selected\":true, \"isLinkedActive\":true, \"isImported\":false, \"tableName\":\"allDatatypes\", \"schemaName\":\"alldatatypes\", \"dbName\":\"AllDatatypes\" }, { \"name\":\"CDECIMAL\", \"type\":\"INT64\", \"canImport\":true, \"selected\":true, \"isLinkedActive\":true, \"isImported\":false, \"tableName\":\"allDatatypes\", \"schemaName\":\"alldatatypes\", \"dbName\":\"AllDatatypes\" } ] } ] } ] } ] } ``` 2. Set `validate` to `true`. **NOTE:** If the `authentication_type` is anything other than SERVICE_ACCOUNT, you must explicitly provide the authenticationType property in the payload. If you do not specify authenticationType, the API will default to SERVICE_ACCOUNT as the authentication type. + * @param createConnectionRequest + */ + createConnection(createConnectionRequest: CreateConnectionRequest, _options?: Configuration): Promise; + /** + * Version: 9.2.0.cl or later **Important**: This endpoint is deprecated and will be removed from ThoughtSpot in September 2025. ThoughtSpot strongly recommends using the [Delete Connection V2](#/http/api-endpoints/connections/delete-connection-v2) endpoint to delete your connection objects. #### Usage guidelines Deletes a connection object. Requires `DATAMANAGEMENT` (**Can manage data**) and edit permissions to the connection object, or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) privilege is required. **Note**: If a connection has dependent objects, make sure you remove its associations before the delete operation. + * @param deleteConnectionRequest + */ + deleteConnection(deleteConnectionRequest: DeleteConnectionRequest, _options?: Configuration): Promise; + /** + * Version: 10.4.0.cl or later Deletes a connection object. **Note**: If a connection has dependent objects, make sure you remove its associations before the delete operation. Requires `DATAMANAGEMENT` (**Can manage data**) and edit permissions to the connection object, or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) privilege is required. + * @param connectionIdentifier Unique ID or name of the connection. + */ + deleteConnectionV2(connectionIdentifier: string, _options?: Configuration): Promise; + /** + * Version: 9.9.0.cl or later Exports the difference in connection metadata between CDW and ThoughtSpot Requires `DATAMANAGEMENT` (**Can manage data**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the following Data control privileges may be required: - `CAN_MANAGE_CUSTOM_CALENDAR`(**Can manage custom calendars**) - `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) - `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` (**Can manage data models**) To download the connection metadata difference between ThoughtSpot and CDW, pass the connection GUID as `connection_identifier` in the API request. + * @param connectionIdentifier GUID of the connection + */ + downloadConnectionMetadataChanges(connectionIdentifier: string, _options?: Configuration): Promise; + /** + * Version: 9.9.0.cl or later Validates the difference in connection metadata between CDW and ThoughtSpot. Requires `DATAMANAGEMENT` (**Can manage data**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the following Data control privileges may be required: - `CAN_MANAGE_CUSTOM_CALENDAR`(**Can manage custom calendars**) - `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) - `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` (**Can manage data models**) Returns a boolean indicating whether there is any difference between the connection metadata at ThoughtSpot and CDW. To get the connection metadata difference status, pass the connection GUID as `connection_identifier` in the API request. + * @param connectionIdentifier GUID of the connection + */ + fetchConnectionDiffStatus(connectionIdentifier: string, _options?: Configuration): Promise; + /** + * Version: 26.2.0.cl or later Revokes OAuth refresh tokens for users who no longer require access to a data warehouse connection. When a token is revoked, the affected user\'s session for that connection is terminated, and they must re-authenticate to regain access. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) or `DATAMANAGEMENT` (**Can manage data**) privileges. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on the ThoughtSpot instance, users with `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) privilege can also make API requests to revoke tokens for connection users. #### Usage guidelines You can specify different combinations of identifiers to control which refresh tokens are revoked. - **connection_identifier**: Revokes refresh tokens for all users of the connection, except the connection author. - **connection_identifier** and **user_identifiers**: Revokes refresh tokens only for the users specified in the request. If the name or ID of the connection author is included in the request, their token will also be revoked. - **connection_identifier** and **configuration_identifiers**: Revokes refresh tokens for all users on the specified configurations, except the configuration author. - **connection_identifier**, **configuration_identifiers**, and **user_identifiers**: Revokes refresh tokens for the specified users on the specified configurations. - **connection_identifier** and **org_identifiers**: Revokes refresh tokens for the specified Orgs. Applicable only for published connections. - **connection_identifier**, **org_identifiers**, and **user_identifiers**: Revokes refresh tokens for the specified users in the specified Orgs. Applicable only for published connections. **NOTE**: The `org_identifiers` parameter is only applicable for published connections. Using this parameter for unpublished connections will result in an error. Ensure that the connections are published before making the API request. + * @param connectionIdentifier Unique ID or name of the connection whose refresh tokens need to be revoked. All the users associated with the connection will have their refresh tokens revoked except the author. + * @param revokeRefreshTokensRequest + */ + revokeRefreshTokens(connectionIdentifier: string, revokeRefreshTokensRequest: RevokeRefreshTokensRequest, _options?: Configuration): Promise; + /** + * Version: 9.2.0.cl or later Gets connection objects. Requires `DATAMANAGEMENT` (**Can manage data**) or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) privilege is required. - To get a list of all connections available in the ThoughtSpot system, send the API request without any attributes in the request body. - To get the connection objects for a specific type of data warehouse, specify the type in `data_warehouse_types`. - To fetch details of a connection object, specify the connection object GUID or name. The `name_pattern` attribute allows passing partial text with `%` for a wildcard match. - To get details of the database, schemas, tables, or columns from a data connection object, specify `data_warehouse_object_type`. - To get a specific database, schema, table, or column from a connection object, define the object type in `data_warehouse_object_type` and object properties in the `data_warehouse_objects` array. For example, to search for a column, you must pass the database, schema, and table names in the API request. Note that in the following example, object properties are set in a hierarchical order (`database` > `schema` > `table` > `column`). ``` { \"connections\": [ { \"identifier\": \"b9d1f2ef-fa65-4a4b-994e-30fa2d57b0c2\", \"data_warehouse_objects\": [ { \"database\": \"NEBULADEV\", \"schema\": \"INFORMATION_SCHEMA\", \"table\": \"APPLICABLE_ROLES\", \"column\": \"ROLE_NAME\" } ] } ], \"data_warehouse_object_type\": \"COLUMN\" } ``` - To fetch data by `configuration`, specify `data_warehouse_object_type`. For example, to fetch columns from the `DEVELOPMENT` database, specify the `data_warehouse_object_type` as `DATABASE` and define the `configuration` string as `{\"database\":\"DEVELOPMENT\"}`. To get column data for a specific table, specify the table, for example,`{\"database\":\"RETAILAPPAREL\",\"table\":\"PIPES\"}`. - To query connections by `authentication_type`, specify `data_warehouse_object_type`. Supported values for `authentication_type` are: - `SERVICE_ACCOUNT`: For connections that require service account credentials to authenticate to the Cloud Data Warehouse and fetch data. - `OAUTH`: For connections that require OAuth credentials to authenticate to the Cloud Data Warehouse and fetch data. Teradata, Oracle, and Presto Cloud Data Warehouses do not support the OAuth authentication type. - `IAM`: For connections that have the IAM OAuth set up. This authentication type is supported on Amazon Redshift connections only. - `EXTOAUTH`: For connections that have External OAuth set up. ThoughtSpot supports external [OAuth with Microsoft Azure Active Directory (AD)](https://docs.thoughtspot.com/cloud/latest/ connections-snowflake-azure-ad-oauth) and [Okta for Snowflake data connections](https://docs.thoughtspot.com/cloud/latest/connections-snowflake-okta-oauth). - `KEY_PAIR`: For connections that require Key Pair account credentials to authenticate to the Cloud Data Warehouse and fetch data. This authentication type is supported on Snowflake connections only. - `OAUTH_WITH_PKCE`: For connections that require OAuth with PKCE account credentials to authenticate to the Cloud Data Warehouse and fetch data. This authentication type is supported on Snowflake, Starburst, Databricks, Denodo connections only. - `EXTOAUTH_WITH_PKCE`: For connections that require External OAuth With PKCE account credentials to authenticate to the Cloud Data Warehouse and fetch data. This authentication type is supported on Snowflake connections only. - `OAUTH_WITH_PEZ`: For connections that require OAuth With PEZ account credentials to authenticate to the Cloud Data Warehouse and fetch data. This authentication type is supported on Amazon Redshift connections only. - `OAUTH_WITH_SERVICE_PRINCIPAL`: For connections that require OAuth With Service Principal account credentials to authenticate to the Cloud Data Warehouse and fetch data. This authentication type is supported on Databricks connections only. - `PERSONAL_ACCESS_TOKEN`: For connections that require Personal Access Token account credentials to authenticate to the Cloud Data Warehouse and fetch data. This authentication type is supported on Databricks connections only. - `OAUTH_CLIENT_CREDENTIALS`: For connections that require OAuth Client Credentials to authenticate to the Cloud Data Warehouse and fetch data. This authentication type is supported on Snowflake connections only. - To include more details about connection objects in the API response, set `include_details` to `true`. - You can also sort the output by field names and filter connections by tags. **NOTE**: When filtering connection records by parameters other than `data_warehouse_types` or `tag_identifiers`, ensure that you set `record_size` to `-1` and `record_offset` to `0` for precise results. + * @param searchConnectionRequest + */ + searchConnection(searchConnectionRequest: SearchConnectionRequest, _options?: Configuration): Promise>; + /** + * Version: 26.5.0.cl or later Synchronizes connection metadata attributes from your Cloud Data Warehouse (CDW) with ThoughtSpot. Requires the `DATAMANAGEMENT` (**Can manage data**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` (**Can manage data models**) privilege is required. #### Usage guidelines To synchronize attributes from a CDW, specify the connection GUID or name in the `connection_identifier` path parameter and `sync_attributes` in the request body. Default attribute is `[\"DESCRIPTION\"]`. ##### Hierarchical schema * Connection: The connection object for the sync operation. * Tables: Tables for the sync operation. When no table is specified, all tables are synchronized. * Columns: If the table is specified, you can add the columns for the sync operation. If no columns are specified, all columns in the specified table are considered for the sync operation. To set the scope for the sync operation: * Connection-level: To sync all tables and columns, pass an empty request body, or only the attributes in the request body. * Table-level: To synchronize specific tables and their columns, specify the table identifiers in the `tables` array. * Column-level: To synchronize specific columns, specify the table identifier as the key and column identifiers as the value in the `tables` array. ``` { \"tables\": [ {\"table-guid-1\": [\"column-guid-1\", \"column-guid-2\"]}, \"table-guid-2\" ], \"sync_attributes\": [\"DESCRIPTION\"] } ``` ##### API response If the sync operation is successful, the API returns the following information: * Status of the sync operation. For example, `SUCCESS`, `PARTIAL_SUCCESS`, or `NO_UPDATE`. * Number of tables and columns that were updated. * Number of tables and columns with the sync failed status when the overall sync status is `PARTIAL_SUCCESS`. * Message text indicating the sync results. + * @param connectionIdentifier Unique ID or name of the connection. + * @param syncMetadataRequest + */ + syncMetadata(connectionIdentifier: string, syncMetadataRequest: SyncMetadataRequest, _options?: Configuration): Promise; + /** + * Version: 9.2.0.cl or later **Important**: This endpoint is deprecated and will be removed from ThoughtSpot in September 2025. ThoughtSpot strongly recommends using the [Update connection V2](#/http/api-endpoints/connections/update-connection-v2) endpoint to update your connection objects. #### Usage guidelines Updates a connection object. Requires `DATAMANAGEMENT` (**Can manage data**) and edit permissions to the connection object, or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) privilege is required. To update a connection object, pass these parameters in your API request: 1. GUID of the connection object. 2. If you are updating tables or database schema of a connection object: a. Add the updated JSON map of metadata with database, schema, and tables in `data_warehouse_config`. b. Set `validate` to `true`. 3. If you are updating a configuration attribute, connection name, or description, you can set `validate` to `false`. + * @param updateConnectionRequest + */ + updateConnection(updateConnectionRequest: UpdateConnectionRequest, _options?: Configuration): Promise; + /** + * Version: 26.6.0.cl or later Activates or deactivates a connection. A deactivated connection cannot be used for queries or operations until it is activated again. Requires `DATAMANAGEMENT` (**Can manage data**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) privilege is required. Only the connection owner or an administrator can perform this operation. #### Usage guidelines To update the status of a connection, specify the connection GUID or name in the `connection_identifier` path parameter and the desired `status` in the request body. - **ACTIVATED**: Enables the connection. Queries and operations can resume on an activated connection. - **DEACTIVATED**: Disables the connection. It does not remove the connection metadata, but only makes the connection unavailable for queries and operations. You can reactivate a deactivated connection by setting \"status\": \"ACTIVATED\". + * @param connectionIdentifier Unique ID or name of the connection. + * @param updateConnectionStatusRequest + */ + updateConnectionStatus(connectionIdentifier: string, updateConnectionStatusRequest: UpdateConnectionStatusRequest, _options?: Configuration): Promise; + /** + * Version: 10.4.0.cl or later Updates a connection object. Requires `DATAMANAGEMENT` (**Can manage data**) and edit permissions to the connection object, or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) privilege is required. To update a connection object, pass these parameters in your API request: 1. GUID of the connection object. 2. If you are updating tables or database schema of a connection object: a. Add the updated JSON map of metadata with database, schema, and tables in `data_warehouse_config`. b. Set `validate` to `true`. **NOTE:** If the `authentication_type` is anything other than SERVICE_ACCOUNT, you must explicitly provide the authenticationType property in the payload. If you do not specify authenticationType, the API will default to SERVICE_ACCOUNT as the authentication type. * A JSON map of configuration attributes, database details, and table properties in `data_warehouse_config` as shown in the following example: * This is an example of updating a single table in a empty connection: ``` { \"authenticationType\": \"SERVICE_ACCOUNT\", \"externalDatabases\": [ { \"name\": \"DEVELOPMENT\", \"isAutoCreated\": false, \"schemas\": [ { \"name\": \"TS_dataset\", \"tables\": [ { \"name\": \"DEMORENAME\", \"type\": \"TABLE\", \"description\": \"\", \"selected\": true, \"linked\": true, \"gid\": 0, \"datasetId\": \"-1\", \"subType\": \"\", \"reportId\": \"\", \"viewId\": \"\", \"columns\": [ { \"name\": \"Col1\", \"type\": \"VARCHAR\", \"canImport\": true, \"selected\": true, \"description\": \"\", \"isLinkedActive\": true, \"isAggregate\": false }, { \"name\": \"Col2\", \"type\": \"VARCHAR\", \"canImport\": true, \"selected\": true, \"description\": \"\", \"isLinkedActive\": true, \"isAggregate\": false }, { \"name\": \"Col3\", \"type\": \"VARCHAR\", \"canImport\": true, \"selected\": true, \"description\": \"\", \"isLinkedActive\": true, \"isAggregate\": false }, { \"name\": \"Col312\", \"type\": \"VARCHAR\", \"canImport\": true, \"selected\": true, \"description\": \"\", \"isLinkedActive\": true, \"isAggregate\": false }, { \"name\": \"Col4\", \"type\": \"VARCHAR\", \"canImport\": true, \"selected\": true, \"description\": \"\", \"isLinkedActive\": true, \"isAggregate\": false } ], \"relationships\": [] } ] } ] } ], \"configuration\": { \"password\": \"\", \"database\": \"DEVELOPMENT\", \"role\": \"DEV\", \"accountName\": \"thoughtspot_partner\", \"warehouse\": \"DEMO_WH\", \"user\": \"DEV_USER\" } } ``` * This is an example of updating a single table in an existing connection with tables: ``` { \"authenticationType\": \"SERVICE_ACCOUNT\", \"externalDatabases\": [ { \"name\": \"DEVELOPMENT\", \"isAutoCreated\": false, \"schemas\": [ { \"name\": \"TS_dataset\", \"tables\": [ { \"name\": \"CUSTOMER\", \"type\": \"TABLE\", \"description\": \"\", \"selected\": true, \"linked\": true, \"gid\": 0, \"datasetId\": \"-1\", \"subType\": \"\", \"reportId\": \"\", \"viewId\": \"\", \"columns\": [], \"relationships\": [] }, { \"name\": \"tpch5k_falcon_default_schema_users\", \"type\": \"TABLE\", \"description\": \"\", \"selected\": true, \"linked\": true, \"gid\": 0, \"datasetId\": \"-1\", \"subType\": \"\", \"reportId\": \"\", \"viewId\": \"\", \"columns\": [ { \"name\": \"user_id\", \"type\": \"INT64\", \"canImport\": true, \"selected\": true, \"description\": \"\", \"isLinkedActive\": true, \"isAggregate\": false }, { \"name\": \"product_id\", \"type\": \"INT64\", \"canImport\": true, \"selected\": true, \"description\": \"\", \"isLinkedActive\": true, \"isAggregate\": false }, { \"name\": \"user_cost\", \"type\": \"INT64\", \"canImport\": true, \"selected\": true, \"description\": \"\", \"isLinkedActive\": true, \"isAggregate\": false } ], \"relationships\": [] } ] } ] } ], \"configuration\": { \"password\": \"\", \"database\": \"DEVELOPMENT\", \"role\": \"DEV\", \"accountName\": \"thoughtspot_partner\", \"warehouse\": \"DEMO_WH\", \"user\": \"DEV_USER\" } } ``` 3. If you are updating a configuration attribute, connection name, or description, you can set `validate` to `false`. **NOTE:** If the `authentication_type` is anything other than SERVICE_ACCOUNT, you must explicitly provide the authenticationType property in the payload. If you do not specify authenticationType, the API will default to SERVICE_ACCOUNT as the authentication type. * A JSON map of configuration attributes in `data_warehouse_config`. The following example shows the configuration attributes for a Snowflake connection: ``` { \"configuration\":{ \"accountName\":\"thoughtspot_partner\", \"user\":\"tsadmin\", \"password\":\"TestConn123\", \"role\":\"sysadmin\", \"warehouse\":\"MEDIUM_WH\" }, \"externalDatabases\":[ ] } ``` + * @param connectionIdentifier Unique ID or name of the connection. + * @param updateConnectionV2Request + */ + updateConnectionV2(connectionIdentifier: string, updateConnectionV2Request: UpdateConnectionV2Request, _options?: Configuration): Promise; +} + +declare class PromiseCustomActionApi { + private api; + constructor(configuration: Configuration, requestFactory?: CustomActionApiRequestFactory, responseProcessor?: CustomActionApiResponseProcessor); + /** + * Version: 9.6.0.cl or later Creates a custom action that appears as a menu action on a saved Answer or Liveboard visualization. Requires `DEVELOPER` (**Has Developer privilege**) or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `DEVELOPER` (**Has developer privilege**) privilege is required. #### Usage Guidelines The API lets you create the following types of custom actions: * URL-based action Allows pushing data to an external URL. * Callback action Triggers a callback to the host application and initiates a response payload on an embedded ThoughtSpot instance. By default, custom actions are visible to only administrator or developer users. To make a custom action available to other users, and specify the groups in `group_identifiers`. By default, the custom action is set as a _global_ action on all visualizations and saved Answers. To assign a custom action to specific Liveboard visualization, saved Answer, or Worksheet, set `visibility` to `false` in `default_action_config` property and specify the GUID or name of the object in `associate_metadata`. For more information, see [Custom actions](https://developers.thoughtspot.com/docs/custom-action-intro). + * @param createCustomActionRequest + */ + createCustomAction(createCustomActionRequest: CreateCustomActionRequest, _options?: Configuration): Promise; + /** + * Version: 9.6.0.cl or later Removes the custom action specified in the API request. Requires `DEVELOPER` (**Has Developer privilege**) or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `DEVELOPER` (**Has developer privilege**) privilege is required. + * @param customActionIdentifier Unique ID or name of the custom action. + */ + deleteCustomAction(customActionIdentifier: string, _options?: Configuration): Promise; + /** + * Version: 9.6.0.cl or later Gets custom actions configured on the cluster. Requires `DEVELOPER` (**Has Developer privilege**) or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `DEVELOPER` (**Has developer privilege**) privilege is required. + * @param searchCustomActionsRequest + */ + searchCustomActions(searchCustomActionsRequest: SearchCustomActionsRequest, _options?: Configuration): Promise>; + /** + * Version: 9.6.0.cl or later Updates a custom action. Requires `DEVELOPER` (**Has Developer privilege**) or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `DEVELOPER` (**Has developer privilege**) privilege is required. #### Usage Guidelines The API allows you to modify the following properties: * Name of the custom action * Action availability to groups * Association to metadata objects * Authentication settings for a URL-based action For more information, see [Custom actions](https://developers.thoughtspot.com/docs/custom-action-intro). + * @param customActionIdentifier Unique ID or name of the custom action. + * @param updateCustomActionRequest + */ + updateCustomAction(customActionIdentifier: string, updateCustomActionRequest: UpdateCustomActionRequest, _options?: Configuration): Promise; +} + +declare class PromiseCustomCalendarsApi { + private api; + constructor(configuration: Configuration, requestFactory?: CustomCalendarsApiRequestFactory, responseProcessor?: CustomCalendarsApiResponseProcessor); + /** + * Version: 10.12.0.cl or later Creates a new [custom calendar](https://docs.thoughtspot.com/cloud/latest/connections-cust-cal). Requires `DATAMANAGEMENT` (**Can manage data**) or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your ThoughtSpot instance, the `CAN_MANAGE_CUSTOM_CALENDAR` (**Can manage custom calendars**) privilege is required. #### Usage guidelines You can create a custom calendar from scratch or an existing Table in ThoughtSpot. For both methods of calendar creation, the following parameters are required: * Name of the custom calendar. * Calendar creation method. To create a calendar from an existing table, specify the method: - `FROM_EXISTING_TABLE` - Creates calendar from the table reference provided in the API request. - `FROM_INPUT_PARAMS` - Creates a calendar from the parameters defined in the API request. * Connection ID and Table name * Database and schema name attributes: For most Cloud Data Warehouse (CDW) connectors, both `database_name` and `schema_name` attributes are required. However, the attribute requirements are conditional and vary based on the connector type and its metadata structure. For example, for connectors such as Teradata, MySQL, SingleSore, Amazon Aurora MySQL, Amazon RDS MySQL, Oracle, and GCP_MYSQL, the `schema_name` is required, whereas the `database_name` attribute is not. Similarly, connectors such as ClickHouse require you to specify the `database_name` and the schema specification in such cases is optional. **NOTE**: If you are creating a calendar from an existing table, ensure that the referenced table matches the required DDL for custom calendars. If the schema does not match, the API returns an error. ##### Calendar type The API allows you to create the following types of calendars: * `MONTH_OFFSET`. The default calendar type. A `MONTH_OFFSET` calendar is offset by a few months from the standard calendar months (January to December) and the year begins with the month defined in the request. For example, if the `month_offset` value is set as `April`, the calendar year begins in April. * `4-4-5`. Each quarter in the calendar will include two 4-week months followed by one 5-week month. * `4-5-4`. Each quarter in the calendar will include two 4-week months with a 5-week month between. * `5-4-4`. Each quarter begins with a 5-week month, followed by two 4-week months. To start and end the calendar on a specific date, specify the dates in the `MM/DD/YYYY` format. For `MONTH_OFFSET` calendars, ensure that the `start_date` matches the month specified in the `month_offset` attribute. You can also set the starting day of the week and customize the prefixes for year and quarter labels. #### Examples To create a calendar from an existing table: ``` { \"name\": \"MyCustomCalendar1\", \"table_reference\": { \"connection_identifier\": \"4db8ea22-2ff4-4224-b05a-26674717e468\", \"table_name\": \"MyCalendarTable\", \"database_name\": \"RETAILAPPAREL\", \"schema_name\": \"PUBLIC\" }, \"creation_method\": \"FROM_EXISTING_TABLE\", } ``` To create a calendar from scratch: ``` { \"name\": \"MyCustomCalendar1\", \"table_reference\": { \"connection_identifier\": \"4db8ea22-2ff4-4224-b05a-26674717e468\", \"table_name\": \"MyCalendarTable\", \"database_name\": \"RETAILAPPAREL\", \"schema_name\": \"PUBLIC\" }, \"creation_method\": \"FROM_INPUT_PARAMS\", \"calendar_type\": \"MONTH_OFFSET\", \"month_offset\": \"April\", \"start_day_of_week\": \"Monday\", \"quarter_name_prefix\": \"Q\", \"year_name_prefix\": \"FY\", \"start_date\": \"04/01/2025\", \"end_date\": \"04/31/2025\" } ``` + * @param createCalendarRequest + */ + createCalendar(createCalendarRequest: CreateCalendarRequest, _options?: Configuration): Promise; + /** + * Version: 10.12.0.cl or later Deletes a [custom calendar](https://docs.thoughtspot.com/cloud/latest/connections-cust-cal). Requires `DATAMANAGEMENT` (**Can manage data**) or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your ThoughtSpot instance, the `CAN_MANAGE_CUSTOM_CALENDAR` (**Can manage custom calendars**) privilege is required. #### Usage guidelines To delete a custom calendar, specify the calendar ID as a path parameter in the request URL. + * @param calendarIdentifier Unique ID or name of the Calendar. + */ + deleteCalendar(calendarIdentifier: string, _options?: Configuration): Promise; + /** + * Version: 10.12.0.cl or later Exports a [custom calendar](https://docs.thoughtspot.com/cloud/latest/connections-cust-cal) in the CSV format. Requires `DATAMANAGEMENT` (**Can manage data**) or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your ThoughtSpot instance, the `CAN_MANAGE_CUSTOM_CALENDAR` (**Can manage custom calendars**) privilege is required. #### Usage guidelines Use this API to download a custom calendar in the CSV file format. In your API request, specify the following parameters. * Start and end date of the calendar. For \"month offset\" calendars, the start date must match the month defined in the `month_offset` attribute. You can also specify optional parameters such as the starting day of the week and prefixes for the quarter and year labels. + * @param generateCSVRequest + */ + generateCSV(generateCSVRequest: GenerateCSVRequest, _options?: Configuration): Promise; + /** + * Version: 10.12.0.cl or later Gets a list of [custom calendars](https://docs.thoughtspot.com/cloud/latest/connections-cust-cal). Requires `DATAMANAGEMENT` (**Can manage data**) or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your ThoughtSpot instance, the `CAN_MANAGE_CUSTOM_CALENDAR` (**Can manage custom calendars**) privilege is required. #### Usage guidelines By default, the API returns a list of custom calendars for all connection objects. To retrieve custom calendar details for a particular connection, specify the connection ID. You can also use other search parameters such as `name_pattern` and `sort_options` as search filters. The `name_pattern` parameter filters and returns only those objects that match the specified pattern. Use `%` as a wildcard for pattern matching. + * @param searchCalendarsRequest + */ + searchCalendars(searchCalendarsRequest: SearchCalendarsRequest, _options?: Configuration): Promise>; + /** + * Version: 10.12.0.cl or later Updates the properties of a [custom calendar](https://docs.thoughtspot.com/cloud/latest/connections-cust-cal). Requires `DATAMANAGEMENT` (**Can manage data**) or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your ThoughtSpot instance, the `CAN_MANAGE_CUSTOM_CALENDAR` (**Can manage custom calendars**) privilege is required. #### Usage guidelines You can update the properties of a calendar using one of the following methods: * `FROM_INPUT_PARAMS` to update the calendar properties with the values defined in the API request. * `FROM_EXISTING_TABLE` Creates a calendar from the parameters defined in the API request. To update a custom calendar, specify the calendar ID as a path parameter in the request URL and the following parameters in the request body: * Connection ID and Table name * Database and schema name attributes: For most Cloud Data Warehouse (CDW) connectors, both `database_name` and `schema_name` attributes are required. However, the attribute requirements are conditional and vary based on the connector type and its metadata structure. For example, for connectors such as Teradata, MySQL, SingleSore, Amazon Aurora MySQL, Amazon RDS MySQL, Oracle, and GCP_MYSQL, the `schema_name` is required, whereas the `database_name` attribute is not. Similarly, connectors such as ClickHouse require you to specify the `database_name` and the schema specification in such cases is optional. The API allows you to modify the calendar type, month offset value, start and end date, starting day of the week, and prefixes assigned to the year and quarter labels. #### Examples Update a custom calendar using an existing Table in ThoughtSpot: ``` { \"update_method\": \"FROM_EXISTING_TABLE\", \"table_reference\": { \"connection_identifier\": \"Connection1\", \"database_name\": \"db1\", \"table_name\": \"custom_calendar_2025\", \"schame_name\": \"schemaVar\" } } ``` Update a custom calendar with the attributes defined in the API request: ``` { \"update_method\": \"FROM_INPUT_PARAMS\", \"table_reference\": { \"connection_identifier\": \"Connection1\", \"database_name\": \"db1\", \"table_name\": \"custom_calendar_2025\", \"schame_name\": \"schemaVar\" }, \"month_offset\": \"August\", \"start_day_of_week\": \"Monday\", \"start_date\": \"08/01/2025\", \"end_date\": \"07/31/2026\" } ``` + * @param calendarIdentifier Unique Id or name of the calendar. + * @param updateCalendarRequest + */ + updateCalendar(calendarIdentifier: string, updateCalendarRequest: UpdateCalendarRequest, _options?: Configuration): Promise; +} + +declare class PromiseDBTApi { + private api; + constructor(configuration: Configuration, requestFactory?: DBTApiRequestFactory, responseProcessor?: DBTApiResponseProcessor); + /** + * Version: 9.9.0.cl or later Creates a DBT connection object in ThoughtSpot. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege or `DATAMANAGEMENT` (**Can manage data**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the following Data control privileges may be required: - `CAN_MANAGE_CUSTOM_CALENDAR`(**Can manage custom calendars**) - `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) - `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` (**Can manage data models**) #### About create DBT connection DBT connection in ThoughtSpot is used by the user to define DBT credentials for cloud . The API needs embrace connection, embrace database name, DBT url, import type, DBT account identifier, DBT project identifier, DBT access token and environment details (or) embrace connection, embrace database name, import type, file_content to create a connection object. To know more about DBT, see ThoughtSpot Product Documentation. + * @param connectionName Name of the connection. + * @param databaseName Name of the Database. + * @param importType Mention type of Import + * @param accessToken Access token is mandatory when Import_Type is DBT_CLOUD. + * @param dbtUrl DBT URL is mandatory when Import_Type is DBT_CLOUD. + * @param accountId Account ID is mandatory when Import_Type is DBT_CLOUD + * @param projectId Project ID is mandatory when Import_Type is DBT_CLOUD + * @param dbtEnvId DBT Environment ID\\\" + * @param projectName Name of the project + * @param fileContent Upload DBT Manifest and Catalog artifact files as a ZIP file. This field is Mandatory when Import Type is \\\'ZIP_FILE\\\' + */ + dbtConnection(connectionName: string, databaseName: string, importType?: string, accessToken?: string, dbtUrl?: string, accountId?: string, projectId?: string, dbtEnvId?: string, projectName?: string, fileContent?: HttpFile, _options?: Configuration): Promise; + /** + * Version: 9.9.0.cl or later Resynchronize the existing list of models, tables, worksheet tml’s and import them to Thoughtspot based on the DBT connection object. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege or `DATAMANAGEMENT` (**Can manage data**) privilege, along with an existing DBT connection. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the following data control privileges may be required: - `CAN_MANAGE_CUSTOM_CALENDAR`(**Can manage custom calendars**) - `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) - `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` (**Can manage data models**) + * @param dbtConnectionIdentifier Unique ID of the DBT connection. + * @param fileContent Upload DBT Manifest and Catalog artifact files as a ZIP file. This field is mandatory if the connection was created with import_type ‘ZIP_FILE’ + */ + dbtGenerateSyncTml(dbtConnectionIdentifier: string, fileContent?: HttpFile, _options?: Configuration): Promise; + /** + * Version: 9.9.0.cl or later Generate required table and worksheet and import them. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege or `DATAMANAGEMENT` (**Can manage data**) privilege, along with an existing DBT connection. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the following data control privileges may be required: - `CAN_MANAGE_CUSTOM_CALENDAR`(**Can manage custom calendars**) - `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) - `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` (**Can manage data models**) #### About generate TML Models and Worksheets to be imported can be selected by the user as part of the API. + * @param dbtConnectionIdentifier Unique ID of the DBT connection. + * @param modelTables List of Models and their respective Tables Example: \\\'[{\\\"model_name\\\": \\\"model_name\\\", \\\"tables\\\": [\\\"table_name\\\"]}]\\\' + * @param importWorksheets Mention the worksheet tmls to import + * @param worksheets List of worksheets is mandatory when import_Worksheets is type SELECTED Example: [\\\"worksheet_name\\\"] + * @param fileContent Upload DBT Manifest and Catalog artifact files as a ZIP file. This field is mandatory if the connection was created with import_type ‘ZIP_FILE’ + */ + dbtGenerateTml(dbtConnectionIdentifier: string, modelTables: string, importWorksheets: string, worksheets?: string, fileContent?: HttpFile, _options?: Configuration): Promise; + /** + * Version: 9.9.0.cl or later Gets a list of DBT connection objects by user and organization, available on the ThoughtSpot system. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege or `DATAMANAGEMENT` (**Can manage data**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the following Data control privileges may be required: - `CAN_MANAGE_CUSTOM_CALENDAR`(**Can manage custom calendars**) - `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) - `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` (**Can manage data models**) #### About search DBT connection To get details of a specific DBT connection identifier, database connection identifier, database connection name, database name, project name, project identifier, environment identifier , import type and author. + */ + dbtSearch(_options?: Configuration): Promise>; + /** + * Version: 9.9.0.cl or later Removes the specified DBT connection object from the ThoughtSpot system. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) or `DATAMANAGEMENT` (**Can manage data ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the following Data control privileges may be required: - `CAN_MANAGE_CUSTOM_CALENDAR`(**Can manage custom calendars**) - `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) - `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` (**Can manage data models**) + * @param dbtConnectionIdentifier Unique ID of the DBT Connection. + */ + deleteDbtConnection(dbtConnectionIdentifier: string, _options?: Configuration): Promise; + /** + * Version: 9.9.0.cl or later Updates a DBT connection object. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege or `DATAMANAGEMENT` (**Can manage data ThoughtSpot**) privilege, along with an existing DBT connection. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the following data control privileges may be required: - `CAN_MANAGE_CUSTOM_CALENDAR`(**Can manage custom calendars**) - `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) - `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` (**Can manage data models**) #### About update DBT connection You can modify DBT connection object properties such as embrace connection name, embrace database name, import type, account identifier, access token, project identifier and environment (or) embrace connection, embrace database name, import type, file_content settings. + * @param dbtConnectionIdentifier Unique ID of the DBT Connection. + * @param connectionName Name of the connection. + * @param databaseName Name of the Database. + * @param importType Mention type of Import + * @param accessToken Access token is mandatory when Import_Type is DBT_CLOUD. + * @param dbtUrl DBT URL is mandatory when Import_Type is DBT_CLOUD. + * @param accountId Account ID is mandatory when Import_Type is DBT_CLOUD + * @param projectId Project ID is mandatory when Import_Type is DBT_CLOUD + * @param dbtEnvId DBT Environment ID\\\" + * @param projectName Name of the project + * @param fileContent Upload DBT Manifest and Catalog artifact files as a ZIP file. This field is Mandatory when Import Type is \\\'ZIP_FILE\\\' + */ + updateDbtConnection(dbtConnectionIdentifier: string, connectionName?: string, databaseName?: string, importType?: string, accessToken?: string, dbtUrl?: string, accountId?: string, projectId?: string, dbtEnvId?: string, projectName?: string, fileContent?: HttpFile, _options?: Configuration): Promise; +} + +declare class PromiseDataApi { + private api; + constructor(configuration: Configuration, requestFactory?: DataApiRequestFactory, responseProcessor?: DataApiResponseProcessor); + /** + * Version: 9.0.0.cl or later Fetches data from a saved Answer. Requires at least view access to the saved Answer. The `record_size` attribute determines the number of records to retrieve in an API call. For more information about pagination, record size, and maximum row limit, see [Pagination and record size settings](https://developers.thoughtspot.com/docs/fetch-data-and-report-apis#_pagination_settings_for_data_and_report_apis). + * @param fetchAnswerDataRequest + */ + fetchAnswerData(fetchAnswerDataRequest: FetchAnswerDataRequest, _options?: Configuration): Promise; + /** + * Version: 9.0.0.cl or later Gets data from a Liveboard object and its visualization. Requires at least view access to the Liveboard. #### Usage guidelines In the request body, specify the GUID or name of the Liveboard. To get data for specific visualizations, add the GUIDs or names of the visualizations in the API request. To include unsaved changes in the report, pass the `transient_pinboard_content` script generated from the `getExportRequestForCurrentPinboard` method in the Visual Embed SDK. Upon successful execution, the API returns the report with unsaved changes. If the new Liveboard experience mode, the transient content includes ad hoc changes to visualizations such as sorting, toggling of legends, and data drill down. For more information, and see [Liveboard data API](https://developers.thoughtspot.com/docs/fetch-data-and-report-apis#_fetch_liveboard_data_api). + * @param fetchLiveboardDataRequest + */ + fetchLiveboardData(fetchLiveboardDataRequest: FetchLiveboardDataRequest, _options?: Configuration): Promise; + /** + * Version: 9.0.0.cl or later Generates an Answer from a given data source. Requires at least view access to the data source object (Worksheet or View). #### Usage guidelines To search data, specify the data source GUID in `logical_table_identifier`. The data source can be a Worksheet, View, Table, or SQL view. Pass search tokens in the `query_string` attribute in the API request as shown in the following example: ``` { \"query_string\": \"[sales] by [store]\", \"logical_table_identifier\": \"cd252e5c-b552-49a8-821d-3eadaa049cca\", } ``` For more information about the `query_string` format and data source attribute, see [Search data API](https://developers.thoughtspot.com/docs/fetch-data-and-report-apis#_search_data_api). The `record_size` attribute determines the number of records to retrieve in an API call. For more information about pagination, record size, and maximum row limit, see [Pagination and record size settings](https://developers.thoughtspot.com/docs/fetch-data-and-report-apis#_pagination_settings_for_data_and_report_api). + * @param searchDataRequest + */ + searchData(searchDataRequest: SearchDataRequest, _options?: Configuration): Promise; +} + +declare class PromiseEmailCustomizationApi { + private api; + constructor(configuration: Configuration, requestFactory?: EmailCustomizationApiRequestFactory, responseProcessor?: EmailCustomizationApiResponseProcessor); + /** + * Version: 10.10.0.cl or later Creates a customization configuration for the notification email. #### Pre-requisites Requires `DEVELOPER` (**has developer privilege**) or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `DEVELOPER` (**Has developer privilege**) privilege is required. **NOTE**:This endpoint in currently in beta. Contact ThoughtSpot support to enable this on your instance. #### Usage guidelines To create a custom configuration pass these parameters in your API request: - A JSON map of configuration attributes `template_properties`. The following example shows a sample set of customization configuration: ``` { { \"cta_button_bg_color\": \"#444DEA\", \"cta_text_font_color\": \"#FFFFFF\", \"primary_bg_color\": \"#D3DEF0\", \"logo_url\": \"https://storage.pardot.com/710713/1642089901EbkRibJq/TS_fullworkmark_darkmode.png\", \"font_family\": \"\", \"product_name\": \"ThoughtSpot\", \"footer_address\": \"444 Castro St, Suite 1000 Mountain View, CA 94041\", \"footer_phone\": \"(800) 508-7008\", \"replacement_value_for_liveboard\": \"Dashboard\", \"replacement_value_for_answer\": \"Chart\", \"replacement_value_for_spot_iq\": \"AI Insights\", \"hide_footer_phone\": false, \"hide_footer_address\": false, \"hide_product_name\": false, \"hide_manage_notification\": false, \"hide_mobile_app_nudge\": false, \"hide_privacy_policy\": false, \"hide_ts_vocabulary_definitions\": false, \"hide_error_message\": false, \"hide_unsubscribe_link\": false, \"hide_notification_status\": false, \"hide_modify_alert\": false, \"company_website_url\": \"https://your-website.com/\", \"company_privacy_policy_url\" : \"https://link-to-privacy-policy.com/\", \"contact_support_url\": \"https://link-to-contact-support.com/\", \"hide_contact_support_url\": false, \"hide_logo_url\" : false } } ``` + * @param createEmailCustomizationRequest + */ + createEmailCustomization(createEmailCustomizationRequest: CreateEmailCustomizationRequest, _options?: Configuration): Promise; + /** + * Version: 10.10.0.cl or later Deletes the configuration for the email customization. #### Pre-requisites Requires `DEVELOPER` (**has developer privilege**) or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `DEVELOPER` (**Has developer privilege**) privilege is required. **NOTE**:This endpoint in currently in beta. Contact ThoughtSpot support to enable this on your instance. #### Usage guidelines - Call the search API endpoint to get the `template_identifier` from the response. - Use that `template_identifier` as a parameter in this API request. + * @param templateIdentifier Unique ID or name of the email customization. + */ + deleteEmailCustomization(templateIdentifier: string, _options?: Configuration): Promise; + /** + * Version: 10.12.0.cl or later Deletes the configuration for the email customization. #### Pre-requisites Requires `DEVELOPER` (**has developer privilege**) or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `DEVELOPER` (**Has developer privilege**) privilege is required. **NOTE**:This endpoint in currently in beta. Contact ThoughtSpot support to enable this on your instance. #### Usage guidelines - Call the search API endpoint to get the `org_identifier` from the response. - Use that `org_identifier` as a parameter in this API request. + * @param deleteOrgEmailCustomizationRequest + */ + deleteOrgEmailCustomization(deleteOrgEmailCustomizationRequest: DeleteOrgEmailCustomizationRequest, _options?: Configuration): Promise; + /** + * Version: 10.10.0.cl or later Search the email customization configuration if any set for the ThoughtSpot system. #### Pre-requisites Requires `DEVELOPER` (**has developer privilege**) or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `DEVELOPER` (**Has developer privilege**) privilege is required. **NOTE**:This endpoint in currently in beta. Contact ThoughtSpot support to enable this on your instance. + * @param searchEmailCustomizationRequest + */ + searchEmailCustomization(searchEmailCustomizationRequest: SearchEmailCustomizationRequest, _options?: Configuration): Promise>; + /** + * Version: 10.12.0.cl or later Updates a customization configuration for the notification email. #### Pre-requisites Requires `DEVELOPER` (**has developer privilege**) or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `DEVELOPER` (**Has developer privilege**) privilege is required. **NOTE**:This endpoint in currently in beta. Contact ThoughtSpot support to enable this on your instance. #### Usage guidelines To update a custom configuration pass these parameters in your API request: - A JSON map of configuration attributes `template_properties`. The following example shows a sample set of customization configuration: ``` { { \"cta_button_bg_color\": \"#444DEA\", \"cta_text_font_color\": \"#FFFFFF\", \"primary_bg_color\": \"#D3DEF0\", \"logo_url\": \"https://storage.pardot.com/710713/1642089901EbkRibJq/TS_fullworkmark_darkmode.png\", \"font_family\": \"\", \"product_name\": \"ThoughtSpot\", \"footer_address\": \"444 Castro St, Suite 1000 Mountain View, CA 94041\", \"footer_phone\": \"(800) 508-7008\", \"replacement_value_for_liveboard\": \"Dashboard\", \"replacement_value_for_answer\": \"Chart\", \"replacement_value_for_spot_iq\": \"AI Insights\", \"hide_footer_phone\": false, \"hide_footer_address\": false, \"hide_product_name\": false, \"hide_manage_notification\": false, \"hide_mobile_app_nudge\": false, \"hide_privacy_policy\": false, \"hide_ts_vocabulary_definitions\": false, \"hide_error_message\": false, \"hide_unsubscribe_link\": false, \"hide_notification_status\": false, \"hide_modify_alert\": false, \"company_website_url\": \"https://your-website.com/\", \"company_privacy_policy_url\" : \"https://link-to-privacy-policy.com/\", \"contact_support_url\": \"https://link-to-contact-support.com/\", \"hide_contact_support_url\": false, \"hide_logo_url\" : false } } ``` + * @param updateEmailCustomizationRequest + */ + updateEmailCustomization(updateEmailCustomizationRequest: UpdateEmailCustomizationRequest, _options?: Configuration): Promise; + /** + * Version: 10.10.0.cl or later Validates the email customization configuration if any set for the ThoughtSpot system. #### Pre-requisites Requires `DEVELOPER` (**has developer privilege**) or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `DEVELOPER` (**Has developer privilege**) privilege is required. **NOTE**:This endpoint in currently in beta. Contact ThoughtSpot support to enable this on your instance. + */ + validateEmailCustomization(_options?: Configuration): Promise; +} + +declare class PromiseGroupsApi { + private api; + constructor(configuration: Configuration, requestFactory?: GroupsApiRequestFactory, responseProcessor?: GroupsApiResponseProcessor); + /** + * Version: 9.0.0.cl or later Creates a group object in ThoughtSpot. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `GROUP_ADMINISTRATION` (**Can manage groups**) privilege is required. #### About groups Groups in ThoughtSpot are used by the administrators to define privileges and organize users based on their roles and access requirements. To know more about groups and privileges, see [ThoughtSpot Product Documentation](https://docs.thoughtspot.com/cloud/latest/groups-privileges). #### Supported operations The API endpoint lets you perform the following operations: * Assign privileges * Add users * Define sharing visibility * Add sub-groups * Assign a default Liveboard + * @param createUserGroupRequest + */ + createUserGroup(createUserGroupRequest: CreateUserGroupRequest, _options?: Configuration): Promise; + /** + * Version: 9.0.0.cl or later Removes the specified group object from the ThoughtSpot system. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `GROUP_ADMINISTRATION` (**Can manage groups**) privilege is required. + * @param groupIdentifier GUID or name of the group. + */ + deleteUserGroup(groupIdentifier: string, _options?: Configuration): Promise; + /** + * Version: 9.0.0.cl or later Imports group objects from external databases into ThoughtSpot. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `GROUP_ADMINISTRATION` (**Can manage groups**) privilege is required. During the import operation: * If the specified group is not available in ThoughtSpot, it will be added to ThoughtSpot. * If `delete_unspecified_groups` is set to `true`, the groups not specified in the API request, excluding administrator and system user groups, are deleted. * If the specified groups are already available in ThoughtSpot, the object properties of these groups are modified and synchronized as per the input data in the API request. A successful API call returns the object that represents the changes made in the ThoughtSpot system. + * @param importUserGroupsRequest + */ + importUserGroups(importUserGroupsRequest: ImportUserGroupsRequest, _options?: Configuration): Promise; + /** + * Version: 9.0.0.cl or later Gets a list of user group objects from the ThoughtSpot system. To get details of a specific user group, specify the user group GUID or name. You can also filter the API response based on User ID, Org ID, Role ID, type of group, sharing visibility, privileges assigned to the group, and the Liveboard IDs assigned to the users in the group. Available to all users. Users with `ADMINISTRATION` (**Can administer ThoughtSpot**) privileges can view all users properties. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `GROUP_ADMINISTRATION` (**Can manage groups**) privilege is required. **NOTE**: If you do not get precise results, try setting `record_size` to `-1` and `record_offset` to `0`. + * @param searchUserGroupsRequest + */ + searchUserGroups(searchUserGroupsRequest: SearchUserGroupsRequest, _options?: Configuration): Promise>; + /** + * Version: 9.0.0.cl or later Updates the properties of a group object in ThoughtSpot. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `GROUP_ADMINISTRATION` (**Can manage groups**) privilege is required. #### Supported operations This API endpoint lets you perform the following operations in a single API request: * Edit [privileges](https://developers.thoughtspot.com/docs/?pageid=api-user-management#group-privileges) * Add or remove users * Change sharing visibility settings * Add or remove sub-groups * Assign a default Liveboard or update the existing settings + * @param groupIdentifier GUID or name of the group. + * @param updateUserGroupRequest + */ + updateUserGroup(groupIdentifier: string, updateUserGroupRequest: UpdateUserGroupRequest, _options?: Configuration): Promise; +} + +declare class PromiseJobsApi { + private api; + constructor(configuration: Configuration, requestFactory?: JobsApiRequestFactory, responseProcessor?: JobsApiResponseProcessor); + /** + * Version: 26.4.0.cl or later Searches delivery history for communication channels such as webhooks. Returns channel-level delivery status for each job execution record. Use this to monitor channel health and delivery success rates across events. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) or `DEVELOPER` (**Has developer privilege**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, users with `CAN_MANAGE_WEBHOOKS` (**Can manage webhooks**) privilege are also authorized to perform this action. **NOTE**: When `channel_type` is `WEBHOOK`, the following constraints apply: - `job_ids`, `channel_identifiers`, and `events` each accept at most one element. - When `job_ids` is provided, it is used as the sole lookup key and other filter fields are ignored. - When `job_ids` is not provided, `channel_identifiers` and `events` are both required, each containing exactly one element. - Records older than the configured retention period are not returned. - Use `start_epoch_time_in_millis` and/or `end_epoch_time_in_millis` to narrow results to a specific time window. + * @param searchChannelHistoryRequest + */ + searchChannelHistory(searchChannelHistoryRequest: SearchChannelHistoryRequest, _options?: Configuration): Promise; +} + +declare class PromiseLogApi { + private api; + constructor(configuration: Configuration, requestFactory?: LogApiRequestFactory, responseProcessor?: LogApiResponseProcessor); + /** + * Version: 9.0.0.cl or later Fetches security audit logs. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the [Admin Control](https://developers.thoughtspot.com/docs/rbac#_admin_control) privileges are required. #### Usage guidelines By default, the API retrieves logs for the last 24 hours. You can set a custom duration in EPOCH time. Make sure the log duration specified in your API request doesn’t exceed 24 hours. If you must fetch logs for a longer time range, modify the duration and make multiple sequential API requests. Upon successful execution, the API returns logs with the following information: * timestamp of the event * event ID * event type * name and GUID of the user * IP address of ThoughtSpot instance For more information see [Audit logs Documentation](https://developers.thoughtspot.com/docs/audit-logs). + * @param fetchLogsRequest + */ + fetchLogs(fetchLogsRequest: FetchLogsRequest, _options?: Configuration): Promise>; +} + +declare class PromiseMetadataApi { + private api; + constructor(configuration: Configuration, requestFactory?: MetadataApiRequestFactory, responseProcessor?: MetadataApiResponseProcessor); + /** + * Convert worksheets to models Version: 10.6.0.cl or later ## Prerequisites - **Privileges Required:** - `DATAMANAGEMENT` (Can manage data) or `ADMINISTRATION` (Can administer ThoughtSpot). - **Additional Privileges (if RBAC is enabled):** - `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` (Can manage data models). --- ## Usage Guidelines ### Parameters 1. **worksheet_ids** - **Description:** A comma-separated list of GUIDs (Globally Unique Identifiers) specifying the Worksheets to be converted. - **Usage:** - Used only when `convert_all` is set to `false`. - Leave empty or omit when `convert_all` is set to `true`. 2. **exclude_worksheet_ids** - **Description:** A comma-separated list of GUIDs specifying Worksheets to be excluded from conversion. - **Usage:** - Useful when `convert_all` is set to `true` and specific Worksheets should not be converted. 3. **convert_all** - **Description:** Sets the scope of conversion. - **Options:** - `true`: Converts all Worksheets in the system, except those specified in `exclude_worksheet_ids`. - `false`: Converts only the Worksheets listed in `worksheet_ids`. 4. **apply_changes** - **Description:** Specifies whether to apply changes directly to ThoughtSpot or to generate a preview before applying any changes.Used for validation of conversion. - **Options:** - `true`: Applies conversion changes directly to ThoughtSpot. - `false`: Generates only a preview of the changes and does not apply any changes to ThoughtSpot --- ## Best Practices 1. **Backup Before Conversion:** Always export metadata as a backup before initiating the conversion process 2. **Partial Conversion for Testing:** Test the conversion process by setting `convert_all` to `false` and specifying a small number of `worksheet_ids`. 3. **Verify Dependencies:** Check for dependent objects, such as Tables and Connections, to avoid invalid references. 4. **Review Changes:** Use `apply_changes: false` to preview the impact of the conversion before applying changes. --- ## Examples ### Convert Specific Worksheets ```json { \"worksheet_ids\": [\"guid1\", \"guid2\", \"guid3\"], \"exclude_worksheet_ids\": [], \"convert_all\": false, \"apply_changes\": true } ``` ### Convert All Accessible Worksheets ```json { \"worksheet_ids\": [], \"exclude_worksheet_ids\": [], \"convert_all\": true, \"apply_changes\": true } ``` ### Exclude Specific Worksheets While Converting All Accessible Worksheets ```json { \"worksheet_ids\": [], \"exclude_worksheet_ids\": [\"abc\"], \"convert_all\": true, \"apply_changes\": true } ``` + * @param convertWorksheetToModelRequest + */ + convertWorksheetToModel(convertWorksheetToModelRequest: ConvertWorksheetToModelRequest, _options?: Configuration): Promise; + /** + * Makes a copy of an Answer or Liveboard Version: 10.3.0.cl or later Creates a copy of a metadata object. Requires at least view access to the metadata object being copied. Upon successful execution, the API creates a copy of the metadata object specified in the API request and returns the ID of the new object. + * @param copyObjectRequest + */ + copyObject(copyObjectRequest: CopyObjectRequest, _options?: Configuration): Promise; + /** + * Version: 9.0.0.cl or later Removes the specified metadata object from the ThoughtSpot system. Requires edit access to the metadata object. + * @param deleteMetadataRequest + */ + deleteMetadata(deleteMetadataRequest: DeleteMetadataRequest, _options?: Configuration): Promise; + /** + * Version: 9.0.0.cl or later Exports the [TML](https://docs.thoughtspot.com/cloud/latest/tml) representation of metadata objects in JSON or YAML format. Requires `DATADOWNLOADING` (**Can download Data**) and at least view access to the metadata object. #### Usage guidelines * You can export one or several objects by passing metadata object GUIDs in the `metadata` array. * When exporting TML content for a Liveboard or Answer object, you can set `export_associated` to `true` to retrieve TML content for underlying Worksheets, Tables, or Views, including the GUID of each object within the headers. When `export_associated` is set to `true`, consider retrieving one metadata object at a time. * Set `export_fqns` to `true` to add FQNs of the referenced objects in the TML content. For example, if you send an API request to retrieve TML for a Liveboard and its associated objects, the API returns the TML content with FQNs of the referenced Worksheet. Exporting TML with FQNs is useful if ThoughtSpot has multiple objects with the same name and you want to eliminate ambiguity when importing TML files into ThoughtSpot. It eliminates the need for adding FQNs of the referenced objects manually during the import operation. * To export only the TML of feedbacks associated with an object, set the GUID of the object as `identifier`, and set the `type` as `FEEDBACK` in the `metadata` array. * To export the TML of an object along with the feedbacks associated with it, set the GUID of the object as `identifier`, set the `type` as `LOGIAL_TABLE` in the `metadata` array, and set `export_with_associated_feedbacks` in `export_options` to true. For more information, see [TML Documentation](https://developers.thoughtspot.com/docs/tml#_export_a_tml). For more information on feedbacks, see [Feedback Documentation](https://docs.thoughtspot.com/cloud/latest/sage-feedback). + * @param exportMetadataTMLRequest + */ + exportMetadataTML(exportMetadataTMLRequest: ExportMetadataTMLRequest, _options?: Configuration): Promise>; + /** + * Version: 10.1.0.cl or later Exports the [TML](https://docs.thoughtspot.com/cloud/latest/tml) representation of metadata objects in JSON or YAML format. ### **Permissions Required** Requires `DATAMANAGEMENT` (**Can manage data**) and `USERMANAGEMENT` (**Can manage users**) privileges. #### **Usage Guidelines** This API is only applicable for `USER`, `GROUP`, and `ROLES` metadata types. - `batch_offset` Indicates the starting position within the complete dataset from which the API should begin returning objects. Useful for paginating results efficiently. - `batch_size` Specifies the number of objects or items to retrieve in a single request. Helps control response size for better performance. - `edoc_format` Defines the format of the TML content. The exported metadata can be in JSON or YAML format. - `export_dependent` Specifies whether to include dependent metadata objects in the export. Ensures related objects are also retrieved if needed. - `all_orgs_override` Indicates whether the export operation applies across all organizations. Useful for multi-tenant environments where cross-org exports are required. + * @param exportMetadataTMLBatchedRequest + */ + exportMetadataTMLBatched(exportMetadataTMLBatchedRequest: ExportMetadataTMLBatchedRequest, _options?: Configuration): Promise; + /** + * Version: 9.0.0.cl or later Fetches the underlying SQL query data for an Answer object. Requires at least view access to the Answer object. Upon successful execution, the API returns the SQL queries for the specified object as shown in this example: ``` { \"metadata_id\":\"8fbe44a8-46ad-4b16-8d39-184b2fada490\", \"metadata_name\":\"Total sales\", \"metadata_type\":\"ANSWER\", \"sql_queries\":[ { \"metadata_id\":\"8fbe44a8-46ad-4b16-8d39-184b2fada490\", \"metadata_name\":\"Total sales -test\", \"sql_query\":\"SELECT \\n \\\"ta_1\\\".\\\"REGION\\\" \\\"ca_1\\\", \\n \\\"ta_2\\\".\\\"PRODUCTNAME\\\" \\\"ca_2\\\", \\n \\\"ta_1\\\".\\\"STORENAME\\\" \\\"ca_3\\\", \\n CASE\\n WHEN sum(\\\"ta_3\\\".\\\"SALES\\\") IS NOT NULL THEN sum(\\\"ta_3\\\".\\\"SALES\\\")\\n ELSE 0\\n END \\\"ca_4\\\", \\n CASE\\n WHEN sum(\\\"ta_3\\\".\\\"QUANTITYPURCHASED\\\") IS NOT NULL THEN sum(\\\"ta_3\\\".\\\"QUANTITYPURCHASED\\\")\\n ELSE 0\\n END \\\"ca_5\\\"\\nFROM \\\"RETAILAPPAREL\\\".\\\"PUBLIC\\\".\\\"FACT_RETAPP_SALES\\\" \\\"ta_3\\\"\\n JOIN \\\"RETAILAPPAREL\\\".\\\"PUBLIC\\\".\\\"DIM_RETAPP_STORES\\\" \\\"ta_1\\\"\\n ON \\\"ta_3\\\".\\\"STOREID\\\" = \\\"ta_1\\\".\\\"STOREID\\\"\\n JOIN \\\"RETAILAPPAREL\\\".\\\"PUBLIC\\\".\\\"DIM_RETAPP_PRODUCTS\\\" \\\"ta_2\\\"\\n ON \\\"ta_3\\\".\\\"PRODUCTID\\\" = \\\"ta_2\\\".\\\"PRODUCTID\\\"\\nGROUP BY \\n \\\"ca_1\\\", \\n \\\"ca_2\\\", \\n \\\"ca_3\\\"\\n\" } ] } ``` + * @param fetchAnswerSqlQueryRequest + */ + fetchAnswerSqlQuery(fetchAnswerSqlQueryRequest: FetchAnswerSqlQueryRequest, _options?: Configuration): Promise; + /** + * Version: 10.4.0.cl or later Gets information about the status of the TML async import task scheduled using the `/api/rest/2.0/metadata/tml/async/import` API call. To fetch the task details, specify the ID of the TML async import task. Requires access to the task ID. The API allows users who initiated the asynchronous TML import via `/api/rest/2.0/metadata/tml/async/import` to view the status of their tasks. Users with administration privilege can view the status of all import tasks initiated by the users in their Org. #### Usage guidelines See [TML API Documentation](https://developers.thoughtspot.com/docs/tml#_fetch_status_of_the_tml_import_task) for usage guidelines. + * @param fetchAsyncImportTaskStatusRequest + */ + fetchAsyncImportTaskStatus(fetchAsyncImportTaskStatusRequest: FetchAsyncImportTaskStatusRequest, _options?: Configuration): Promise; + /** + * Version: 9.0.0.cl or later Fetches the underlying SQL query data for a Liveboard object and its visualizations. Requires at least view access to the Liveboard object. To get SQL query data for a Liveboard, specify the GUID of the Liveboard. Optionally, you can add an array of visualization GUIDs to retrieve the SQL query data for visualizations in the Liveboard. Upon successful execution, the API returns the SQL queries for the specified object as shown in this example: ``` { \"metadata_id\": \"fa68ae91-7588-4136-bacd-d71fb12dda69\", \"metadata_name\": \"Total Sales\", \"metadata_type\": \"LIVEBOARD\", \"sql_queries\": [ { \"metadata_id\": \"b3b6d2b9-089a-490c-8e16-b144650b7843\", \"metadata_name\": \"Total quantity purchased, Total sales by region\", \"sql_query\": \"SELECT \\n \\\"ta_1\\\".\\\"REGION\\\" \\\"ca_1\\\", \\n CASE\\n WHEN sum(\\\"ta_2\\\".\\\"QUANTITYPURCHASED\\\") IS NOT NULL THEN sum(\\\"ta_2\\\".\\\"QUANTITYPURCHASED\\\")\\n ELSE 0\\n END \\\"ca_2\\\", \\n CASE\\n WHEN sum(\\\"ta_2\\\".\\\"SALES\\\") IS NOT NULL THEN sum(\\\"ta_2\\\".\\\"SALES\\\")\\n ELSE 0\\n END \\\"ca_3\\\"\\nFROM \\\"RETAILAPPAREL\\\".\\\"PUBLIC\\\".\\\"FACT_RETAPP_SALES\\\" \\\"ta_2\\\"\\n JOIN \\\"RETAILAPPAREL\\\".\\\"PUBLIC\\\".\\\"DIM_RETAPP_STORES\\\" \\\"ta_1\\\"\\n ON \\\"ta_2\\\".\\\"STOREID\\\" = \\\"ta_1\\\".\\\"STOREID\\\"\\nGROUP BY \\\"ca_1\\\"\" } ] } ``` + * @param fetchLiveboardSqlQueryRequest + */ + fetchLiveboardSqlQuery(fetchLiveboardSqlQueryRequest: FetchLiveboardSqlQueryRequest, _options?: Configuration): Promise; + /** + * Version: 9.0.0.cl or later Imports [TML](https://docs.thoughtspot.com/cloud/latest/tml) files into ThoughtSpot. Requires `DATAMANAGEMENT` (**Can manage data**) or `ADMINISTRATION` (**Can administer ThoughtsSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the following Data control privileges may be required: - `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) - `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` (**Can manage data models**) #### Usage guidelines * Import all related objects in a single TML Import API call. For example, Tables that use the same Connection object and Worksheets connected to these Tables. * Include the `fqn` property to distinguish objects that have the same name. For example, if you have multiple Connections or Worksheets with the same name on ThoughtSpot and the Connection or Worksheet referenced in your TML file does not have a unique name to distinguish, it may result in invalid object references. Adding `fqn` helps ThoughtSpot differentiate a Table from another with the same name. We recommend [exporting TML with FQNs](#/http/api-endpoints/metadata/export-metadata-tml) and using these during the import operation. * You can upload multiple TML files at a time. If you import a Worksheet along with Liveboards, Answers, and other dependent objects in a single API call, the imported objects will be immediately available for use. When you import only a Worksheet object, it may take some time for the Worksheet to become available in the ThoughtSpot system. Please wait for a few minutes, and then proceed to create an Answer and Liveboard from the newly imported Worksheet. For more information, see [TML Documentation](https://developers.thoughtspot.com/docs/tml#_import_a_tml). + * @param importMetadataTMLRequest + */ + importMetadataTML(importMetadataTMLRequest: ImportMetadataTMLRequest, _options?: Configuration): Promise>; + /** + * Version: 10.4.0.cl or later Schedules a task to import [TML](https://docs.thoughtspot.com/cloud/latest/tml) files into ThoughtSpot. You can use this API endpoint to process TML objects asynchronously when importing TMLs of large and complex metadata objects into ThoughtSpot. Unlike the synchronous import TML operation, the API processes TML data in the background and returns a task ID, which can be used to check the status of the import task via `/api/rest/2.0/metadata/tml/async/status` API endpoint. Requires `DATAMANAGEMENT` (**Can manage data**) or `ADMINISTRATION` (**Can administer ThoughtsSpot**) privilege, and edit access to the TML objects. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the following Data control privileges may be required: - `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) - `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` (**Can manage data models**) #### Usage guidelines See [Async TML API Documentation](https://developers.thoughtspot.com/docs/tml#_import_tml_objects_asynchronously) for usage guidelines. + * @param importMetadataTMLAsyncRequest + */ + importMetadataTMLAsync(importMetadataTMLAsyncRequest: ImportMetadataTMLAsyncRequest, _options?: Configuration): Promise; + /** + * Parameterize fields in metadata objects. Version: 10.9.0.cl or later **Note:** This API endpoint is deprecated and will be removed from ThoughtSpot in a future release. Use [POST /api/rest/2.0/metadata/parameterize-fields](/api/rest/2.0/metadata/parameterize-fields) instead. Allows parameterizing fields in metadata objects in ThoughtSpot. Requires appropriate permissions to modify the metadata object. The API endpoint allows parameterizing the following types of metadata objects: * Logical Tables * Connections * Connection Configs For a Logical Table the field type must be `ATTRIBUTE` and field name can be one of: * databaseName * schemaName * tableName For a Connection or Connection Config, the field type is always `CONNECTION_PROPERTY`. In this case, field_name specifies the exact property of the Connection or Connection Config that needs to be parameterized. For Connection Config, the only supported field name is: * impersonate_user + * @param parameterizeMetadataRequest + */ + parameterizeMetadata(parameterizeMetadataRequest: ParameterizeMetadataRequest, _options?: Configuration): Promise; + /** + * Parameterize multiple fields of metadata objects. For example [schemaName, databaseName] for LOGICAL_TABLE. Version: 26.5.0.cl or later Allows parameterizing multiple fields of metadata objects in ThoughtSpot. For example, you can parameterize [schemaName, databaseName] for LOGICAL_TABLE. Requires appropriate permissions to modify the metadata object. The API endpoint allows parameterizing the following types of metadata objects: * Logical Tables * Connections * Connection Configs For a Logical Table, the field type must be `ATTRIBUTE` and field names can include: * databaseName * schemaName * tableName For a Connection or Connection Config, the field type is always `CONNECTION_PROPERTY`. In this case, field_names specifies the exact properties of the Connection or Connection Config that need to be parameterized. For Connection Config, supported field names include: * impersonate_user You can parameterize multiple fields at once by providing an array of field names. + * @param parameterizeMetadataFieldsRequest + */ + parameterizeMetadataFields(parameterizeMetadataFieldsRequest: ParameterizeMetadataFieldsRequest, _options?: Configuration): Promise; + /** + * Version: 9.0.0.cl or later Gets a list of metadata objects available on the ThoughtSpot system. This API endpoint is available to all users who have view access to the object. Users with `ADMINISTRATION` (**Can administer ThoughtSpot**) privileges can view data for all metadata objects, including users and groups. #### Usage guidelines - To get all metadata objects, send the API request without any attributes. - To get metadata objects of a specific type, set the `type` attribute. For example, to fetch a Worksheet, set the type as `LOGICAL_TABLE`. - To filter metadata objects within type `LOGICAL_TABLE`, set the `subtypes` attribute. For example, to fetch a Worksheet, set the type as `LOGICAL_TABLE` & subtypes as `[WORKSHEET]`. - To get a specific metadata object, specify the GUID. - To customize your search and filter the API response, you can use several parameters. You can search for objects created or modified by specific users, by tags applied to the objects, or by using the include parameters like `include_auto_created_objects`, `include_dependent_objects`, `include_headers`, `include_incomplete_objects`, and so on. You can also define sorting options to sort the data retrieved in the API response. - To get discoverable objects when linientmodel is enabled you can use `include_discoverable_objects` as true else false. Default value is true. - For liveboard metadata type, to get the newer format, set the `liveboard_response_format` as V2. Default value is V1. - To retrieve only objects that are published, set the `include_only_published_objects` as true. Default value is false. **NOTE**: The following parameters support pagination of metadata records: - `tag_identifiers` - `type` - `subtypes` - `created_by_user_identifiers` - `modified_by_user_identifiers` - `owned_by_user_identifiers` - `exclude_objects` - `include_auto_created_objects` - `favorite_object_options` - `include_only_published_objects` If you are using other parameters to search metadata, set `record_size` to `-1` and `record_offset` to `0`. + * @param searchMetadataRequest + */ + searchMetadata(searchMetadataRequest: SearchMetadataRequest, _options?: Configuration): Promise>; + /** + * Remove parameterization from fields in metadata objects. Version: 26.5.0.cl or later Allows removing parameterization from fields in metadata objects in ThoughtSpot. Requires appropriate permissions to modify the metadata object. The API endpoint allows unparameterizing the following types of metadata objects: * Logical Tables * Connections * Connection Configs For a Logical Table the field type must be `ATTRIBUTE` and field name can be one of: * databaseName * schemaName * tableName For a Connection or Connection Config, the field type is always `CONNECTION_PROPERTY`. In this case, field_name specifies the exact property of the Connection or Connection Config that needs to be unparameterized. For Connection Config, the only supported field name is: * impersonate_user + * @param unparameterizeMetadataRequest + */ + unparameterizeMetadata(unparameterizeMetadataRequest: UnparameterizeMetadataRequest, _options?: Configuration): Promise; + /** + * Update header attributes for a given list of header objects. Version: 10.6.0.cl or later ## Prerequisites - **Privileges Required:** - `DATAMANAGEMENT` (Can manage data) or `ADMINISTRATION` (Can administer ThoughtSpot). - **Additional Privileges (if RBAC is enabled):** - `ORG_ADMINISTRATION` (Can manage orgs). --- ## Usage Guidelines ### Parameters 1. **headers_update** - **Description:** List of header objects with their attributes to be updated. Each object contains a list of attributes to be updated in the header. - **Usage:** - You must provide either `identifier` or `obj_identifier`, but not both. Both fields cannot be empty. - When `org_identifier` is set to `-1`, only the `identifier` value is accepted; `obj_identifier` is not allowed. 2. **org_identifier** - **Description:** GUID (Globally Unique Identifier) or name of the organization. - **Usage:** - Leaving this field empty assumes that the changes should be applied to the current organization - Provide `org_guid` or `org_name` to uniquely identify the organization where changes need to be applied. . - Provide `-1` if changes have to be applied across all the org. --- ## Note Currently, this API is enabled only for updating the `obj_identifier` attribute. Only `text` will be allowed in attribute\'s value. ## Best Practices 1. **Backup Before Conversion:** Always export metadata as a backup before initiating the update process --- ## Examples ### Only `identifier` is given ```json { \"headers_update\": [ { \"identifier\": \"guid_1\", \"obj_identifier\": \"\", \"type\": \"LOGICAL_COLUMN\", \"attributes\": [ { \"name\": \"obj_id\", \"value\": \"custom_object_id\" } ] } ], \"org_identifier\": \"orgGuid\" } ``` ### Only `obj_identifier` is given ```json { \"headers_update\": [ { \"obj_identifier\": \"custom_object_id\", \"type\": \"ANSWER\", \"attributes\": [ { \"name\": \"obj_id\", \"value\": \"custom_object_id\" } ] } ], \"org_identifier\": \"orgName\" } ``` ### Executing update for all org `-1` ```json { \"headers_update\": [ { \"identifier\": \"guid_1\", \"type\": \"ANSWER\", \"attributes\": [ { \"name\": \"obj_id\", \"value\": \"custom_object_id\" } ] } ], \"org_identifier\": -1 } ``` ### Optional `type` is not provided ```json { \"headers_update\": [ { \"identifier\": \"guid_1\", \"attributes\": [ { \"name\": \"obj_id\", \"value\": \"custom_object_id\" } ] } ], \"org_identifier\": -1 } ``` + * @param updateMetadataHeaderRequest + */ + updateMetadataHeader(updateMetadataHeaderRequest: UpdateMetadataHeaderRequest, _options?: Configuration): Promise; + /** + * Update object IDs for given metadata objects. Version: 10.8.0.cl or later ## Prerequisites - **Privileges Required:** - `DATAMANAGEMENT` (Can manage data) or `ADMINISTRATION` (Can administer ThoughtSpot). - **Additional Privileges (if RBAC is enabled):** - `ORG_ADMINISTRATION` (Can manage orgs). --- ## Usage Guidelines ### Parameters 1. **metadata** - **Description:** List of metadata objects to update their object IDs. - **Usage:** - Use either `current_obj_id` alone OR use `metadata_identifier` with `type` (when needed). - When using `metadata_identifier`, the `type` field is required if using a name instead of a GUID. - The `new_obj_id` field is always required. --- ## Note This API is specifically designed for updating object IDs of metadata objects. It internally uses the header update mechanism to perform the changes. ## Best Practices 1. **Backup Before Update:** Always export metadata as a backup before initiating the update process. 2. **Validation:** - When using `current_obj_id`, ensure it matches the existing object ID exactly. - When using `metadata_identifier` with a name, ensure the `type` is specified correctly. - Verify that the `new_obj_id` follows your naming conventions and is unique within your system. --- ## Examples ### Using current_obj_id ```json { \"metadata\": [ { \"current_obj_id\": \"existing_object_id\", \"new_obj_id\": \"new_object_id\" } ] } ``` ### Using metadata_identifier with GUID ```json { \"metadata\": [ { \"metadata_identifier\": \"01234567-89ab-cdef-0123-456789abcdef\", \"new_obj_id\": \"new_object_id\" } ] } ``` ### Using metadata_identifier with name and type ```json { \"metadata\": [ { \"metadata_identifier\": \"My Answer\", \"type\": \"ANSWER\", \"new_obj_id\": \"new_object_id\" } ] } ``` ### Multiple objects update ```json { \"metadata\": [ { \"current_obj_id\": \"existing_object_id_1\", \"new_obj_id\": \"new_object_id_1\" }, { \"metadata_identifier\": \"My Worksheet\", \"type\": \"LOGICAL_TABLE\", \"new_obj_id\": \"new_object_id_2\" } ] } ``` + * @param updateMetadataObjIdRequest + */ + updateMetadataObjId(updateMetadataObjIdRequest: UpdateMetadataObjIdRequest, _options?: Configuration): Promise; +} + +declare class PromiseOrgsApi { + private api; + constructor(configuration: Configuration, requestFactory?: OrgsApiRequestFactory, responseProcessor?: OrgsApiResponseProcessor); + /** + * Version: 9.0.0.cl or later Creates an Org object. To use this API, the [Orgs](https://docs.thoughtspot.com/cloud/latest/orgs-overview) feature must be enabled in your cluster. Requires cluster administration (**Can administer Org**) privileges. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `ORG_ADMINISTRATION` (**Can manage Orgs**) privilege is required. + * @param createOrgRequest + */ + createOrg(createOrgRequest: CreateOrgRequest, _options?: Configuration): Promise; + /** + * Version: 9.0.0.cl or later Deletes an Org object from the ThoughtSpot system. Requires cluster administration (**Can administer Org**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `ORG_ADMINISTRATION` (**Can manage Orgs**) privilege is required. When you delete an Org, all its users and objects created in that Org context are removed. However, if the users in the deleted Org also exists in other Orgs, they are removed only from the deleted Org. + * @param orgIdentifier ID or name of the Org + */ + deleteOrg(orgIdentifier: string, _options?: Configuration): Promise; + /** + * Version: 9.0.0.cl or later Gets a list of Orgs configured on the ThoughtSpot system. To get details of a specific Org, specify the Org ID or name. You can also pass parameters such as status, visibility, and user identifiers to get a specific list of Orgs. Requires cluster administration (**Can administer Org**) privileges. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `ORG_ADMINISTRATION` (**Can manage Orgs**) privilege is required. + * @param searchOrgsRequest + */ + searchOrgs(searchOrgsRequest: SearchOrgsRequest, _options?: Configuration): Promise>; + /** + * Version: 9.0.0.cl or later Updates an Org object. You can modify Org properties such as name, description, and user associations. Requires cluster administration (**Can administer Org**) privileges. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `ORG_ADMINISTRATION` (**Can manage Orgs**) privilege is required. + * @param orgIdentifier ID or name of the Org + * @param updateOrgRequest + */ + updateOrg(orgIdentifier: string, updateOrgRequest: UpdateOrgRequest, _options?: Configuration): Promise; +} + +declare class PromiseReportsApi { + private api; + constructor(configuration: Configuration, requestFactory?: ReportsApiRequestFactory, responseProcessor?: ReportsApiResponseProcessor); + /** + * Version: 9.0.0.cl or later Exports an Answer in the given file format. You can download the Answer data as a PDF, PNG, CSV, or XLSX file. Requires at least view access to the Answer. #### Usage guidelines In the request body, specify the GUID or name of the Answer and set `file_format`. The default file format is CSV. Use the `type` parameter to specify whether the Answer being exported is a saved Answer (`SAVED`) or a pinned Answer on a Liveboard (`PINNED`). Defaults to `SAVED`. When using `PINNED`, the `metadata_identifier` must be the container id. **NOTE**: * The downloadable file returned in API response file is extensionless. Please rename the downloaded file by typing in the relevant extension. * HTML rendering is not supported for PDF exports of Answers with tables. Optionally, you can define [runtime overrides](https://developers.thoughtspot.com/docs/fetch-data-and-report-apis#_runtime_overrides) to apply to the Answer data. + * @param exportAnswerReportRequest + */ + exportAnswerReport(exportAnswerReportRequest: ExportAnswerReportRequest, _options?: Configuration): Promise; + /** + * Version: 9.0.0.cl or later Exports a Liveboard and its visualizations in PDF, PNG, CSV, or XLSX file format. The default `file_format` is CSV. Requires at least view access to the Liveboard. #### Usage guidelines In the request body, specify the GUID or name of the Liveboard. To generate a Liveboard report with specific visualizations, add GUIDs or names of the visualizations. **NOTE**: * The downloadable file returned in API response file is extensionless. Please rename the downloaded file by typing in the relevant extension. * Optionally, you can define [runtime overrides](https://developers.thoughtspot.com/docs/fetch-data-and-report-apis#_runtime_overrides) to apply to the Answer data. * To include unsaved changes in the report, pass the `transient_pinboard_content` script generated from the `getExportRequestForCurrentPinboard` method in the Visual Embed SDK. Upon successful execution, the API returns the report with unsaved changes, including ad hoc changes to visualizations. For more information, see [Liveboard Report API](https://developers.thoughtspot.com/docs/fetch-data-and-report-apis#_liveboard_report_api). * Starting with ThoughtSpot Cloud 10.9.0.cl release, the Liveboard can be exported in the PNG format in the resolution of your choice. To enable this on your instance, contact ThoughtSpot support. When this feature is enabled, the options `include_cover_page`,`include_filter_page` within the `png_options` will not be available for PNG exports. * Starting with the ThoughtSpot Cloud 26.2.0.cl release, * Liveboards can be exported in CSV format. * All visualizations within a Liveboard can be exported as individual CSV files. * When exporting multiple visualizations or the entire Liveboard, the system returns the report as a compressed ZIP file containing the separate CSV files for each visualization. * Liveboards can also be exported in XLSX format. * All selected visualizations are consolidated into a single Excel workbook (.xlsx), with each visualization placed in its own worksheet (tab). * XLSX exports are limited to a maximum of 255 worksheets (tabs) per workbook. + * @param exportLiveboardReportRequest + */ + exportLiveboardReport(exportLiveboardReportRequest: ExportLiveboardReportRequest, _options?: Configuration): Promise; +} + +declare class PromiseRolesApi { + private api; + constructor(configuration: Configuration, requestFactory?: RolesApiRequestFactory, responseProcessor?: RolesApiResponseProcessor); + /** + * Version: 9.5.0.cl or later Creates a Role object in ThoughtSpot. Available only if [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance. To create a Role, the `ROLE_ADMINISTRATION` (**Can manage roles**) privilege is required. + * @param createRoleRequest + */ + createRole(createRoleRequest: CreateRoleRequest, _options?: Configuration): Promise; + /** + * Version: 9.5.0.cl or later Deletes a Role object from the ThoughtSpot system. Available only if [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance. To delete a Role, the `ROLE_ADMINISTRATION` (**Can manage roles**) privilege is required. + * @param roleIdentifier Unique ID or name of the Role. ReadOnly roles cannot be deleted. + */ + deleteRole(roleIdentifier: string, _options?: Configuration): Promise; + /** + * Version: 9.5.0.cl or later Gets a list of Role objects from the ThoughtSpot system. Available if [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance. To search for Roles, the `ROLE_ADMINISTRATION` (**Can manage roles**) privilege is required. To get details of a specific Role object, specify the GUID or name. You can also filter the API response based on user group and Org identifiers, privileges assigned to the Role, and deprecation status. + * @param searchRolesRequest + */ + searchRoles(searchRolesRequest: SearchRolesRequest, _options?: Configuration): Promise>; + /** + * Version: 9.5.0.cl or later Updates the properties of a Role object. Available only if [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance. To update a Role, the `ROLE_ADMINISTRATION` (**Can manage roles**) privilege is required. + * @param roleIdentifier Unique ID or name of the Role. + * @param updateRoleRequest + */ + updateRole(roleIdentifier: string, updateRoleRequest: UpdateRoleRequest, _options?: Configuration): Promise; +} + +declare class PromiseSchedulesApi { + private api; + constructor(configuration: Configuration, requestFactory?: SchedulesApiRequestFactory, responseProcessor?: SchedulesApiResponseProcessor); + /** + * Create schedule. Version: 9.4.0.cl or later Creates a Liveboard schedule job. Requires at least edit access to Liveboards. To create a schedule on behalf of another user, you need `ADMINISTRATION` (**Can administer Org**) or `JOBSCHEDULING` (**Can schedule for others**) privilege and edit access to the Liveboard. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `JOBSCHEDULING` (**Can schedule for others**) privilege is required. #### Usage guidelines * The description text is mandatory. The description text appears as **Description: ** in the Liveboard schedule email notifications. * For Liveboards with both charts and tables, schedule creation is only supported in PDF and XLS formats. Schedules created in CSV formats for such Liveboards will fail to run. If `PDF` is set as the `file_format`, enable `pdf_options` to get the correct attachment. Not doing so may cause the attachment to be rendered empty. * To include only specific visualizations, specify the visualization GUIDs in the `visualization_identifiers` array. * You can schedule a Liveboard job to run periodically by setting frequency parameters. You can set the schedule to run daily, weekly, monthly or every n minutes or hours. The scheduled job can also be configured to run at a specific time of the day or on specific days of the week or month. Please ensure that when setting the schedule frequency for _minute of the object_, only values that are multiples of 5 are included. * If the `frequency` parameters are defined, you can set the time zone to a value that matches your server\'s time zone. For example, `US/Central`, `Etc/UTC`, `CET`. The default time zone is `America/Los_Angeles`. For more information about Liveboard jobs, see [ThoughtSpot Product Documentation](https://docs.thoughtspot.com/cloud/latest/liveboard-schedule). + * @param createScheduleRequest + */ + createSchedule(createScheduleRequest: CreateScheduleRequest, _options?: Configuration): Promise; + /** + * Deletes a scheduled job. Version: 9.4.0.cl or later Deletes a scheduled Liveboard job. Requires at least edit access to Liveboard or `ADMINISTRATION` (**Can administer Org**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `JOBSCHEDULING` (**Can schedule for others**) privilege is required. + * @param scheduleIdentifier Unique ID or name of the scheduled job. + */ + deleteSchedule(scheduleIdentifier: string, _options?: Configuration): Promise; + /** + * Search Schedules Version: 9.4.0.cl or later Gets a list of scheduled jobs configured for a Liveboard. To get details of a specific scheduled job, specify the name or GUID of the scheduled job. Requires at least view access to Liveboards. **NOTE**: When filtering schedules by parameters other than `metadata`, set `record_size` to `-1` and `record_offset` to `0` for accurate results. + * @param searchSchedulesRequest + */ + searchSchedules(searchSchedulesRequest: SearchSchedulesRequest, _options?: Configuration): Promise>; + /** + * Update schedule. Version: 9.4.0.cl or later Updates a scheduled Liveboard job. Requires at least edit access to Liveboards. To update a schedule on behalf of another user, you need `ADMINISTRATION` (**Can administer Org**) or `JOBSCHEDULING` (**Can schedule for others**) privilege and edit access to the Liveboard. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `JOBSCHEDULING` (**Can schedule for others**) privilege is required. The API endpoint allows you to pause a scheduled job, change the status of a paused job. You can also edit the recipients list, frequency of the job, format of the file to send to the recipients in email notifications, PDF options, and time zone setting. + * @param scheduleIdentifier Unique ID or name of the schedule. + * @param updateScheduleRequest + */ + updateSchedule(scheduleIdentifier: string, updateScheduleRequest: UpdateScheduleRequest, _options?: Configuration): Promise; +} + +declare class PromiseSecurityApi { + private api; + constructor(configuration: Configuration, requestFactory?: SecurityApiRequestFactory, responseProcessor?: SecurityApiResponseProcessor); + /** + * Version: 9.0.0.cl or later Transfers the ownership of one or several objects from one user to another. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `USER_ADMINISTRATION` (**Can manage users**) privilege and edit access to the objects are required. + * @param assignChangeAuthorRequest + */ + assignChangeAuthor(assignChangeAuthorRequest: AssignChangeAuthorRequest, _options?: Configuration): Promise; + /** + * Version: 10.12.0.cl or later Fetches column security rules for specified tables. This API endpoint retrieves column-level security rules configured for tables. It returns information about which columns are secured and which groups have access to those columns. #### Usage guidelines - Provide an array of table identifiers using either `identifier` (GUID or name) or `obj_identifier` (object ID) - At least one of `identifier` or `obj_identifier` must be provided for each table - The API returns column security rules for all specified tables - Users must have appropriate permissions to access security rules for the specified tables #### Required permissions - `ADMINISTRATION` - Can administer ThoughtSpot - `DATAMANAGEMENT` - Can manage data - `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` - Can manage worksheet views and tables #### Example request ```json { \"tables\": [ { \"identifier\": \"table-guid\", \"obj_identifier\": \"table-object-id\" } ] } ``` #### Response format The API returns an array of `ColumnSecurityRuleResponse` objects wrapped in a `data` field. Each `ColumnSecurityRuleResponse` object contains: - Table information (GUID and object ID) - Array of column security rules with column details, group access, and source table information #### Example response ```json { \"data\": [ { \"guid\": \"table-guid\", \"objId\": \"table-object-id\", \"columnSecurityRules\": [ { \"column\": { \"id\": \"col_123\", \"name\": \"Salary\" }, \"groups\": [ { \"id\": \"group_1\", \"name\": \"HR Department\" } ], \"sourceTableDetails\": { \"id\": \"source-table-guid\", \"name\": \"Employee_Data\" } } ] } ] } ``` + * @param fetchColumnSecurityRulesRequest + */ + fetchColumnSecurityRules(fetchColumnSecurityRulesRequest: FetchColumnSecurityRulesRequest, _options?: Configuration): Promise>; + /** + * Version: 26.3.0.cl or later This API fetches the object privileges present for the given list of principals (user or group), on the given set of objects. It supports pagination, which can be enabled and configured using the request parameters. It provides users access to certain features based on privilege based access control. #### Usage guidelines - Specify the `type` (`USER` or `USER_GROUP`) and `identifier` (either GUID or name) of the principals for which you want to retrieve object privilege information in the `principals` array. - Specify the `type` (`LOGICAL_TABLE`) and `identifier` (either GUID or name) of the metadata objects for which you want to retrieve object privilege information in the `metadata` array. Only `LOGICAL_TABLE` metadata type is supported for now. It may be extended for other metadata types in future. - To control the offset from where principals have to be fetched, use `record_offset`. When `record_offset` is 0, information is fetched from the beginning. - To control the number of principals to be fetched, use `record_size`. Default `record_size` is 20. - Ensure `record_offset` for a subsequent request is one more than the value of `record_size` of the previous request. - Ensure using correct Authorization Bearer Token corresponding to specific user & org. #### Example request ```json { \"principals\": [ { \"type\": \"type-1\", \"identifier\": \"principal-guid-or-name-1\" }, { \"type\": \"type-2\", \"identifier\": \"principal-guid-or-name-2\" } ], \"metadata\": [ { \"type\": \"metadata-type-1\", \"identifier\": \"metadata-guid-or-name-1\" }, { \"type\": \"metadata-type-2\", \"identifier\": \"metadata-guid-or-name-2\" } ], \"record_offset\": 0, \"record_size\": 20 } ``` #### Response format The API returns an array of `metadata_object_privileges` objects wrapped in JSON. Each `metadata_object_privileges` object contains: - Metadata information (GUID, name and type) - Array of `principal_object_privilege_info`. - Each `principal_object_privilege_info` contains: - Principal type. All principals of this type are listed as described below. - Array of `principal_object_privileges`. - Each `principal_object_privileges` contains: - Principal information (GUID, name, subtype) - List of applied object level privileges. #### Example response ```json { \"metadata_object_privileges\": [ { \"metadata_id\": \"metadata-guid-1\", \"metadata_name\": \"metadata-name-1\", \"metadata_type\": \"metadata-type-1\", \"principal_object_privilege_info\": [ { \"principal_type\": \"principal-type-1\", \"principal_object_privileges\": [ { \"principal_id\": \"principal-guid-1\", \"principal_name\": \"principal-name-1\", \"principal_sub_type\": \"principal-sub-type-1\", \"object_privileges\": \"[object-privilege-1, object-privilege-2]\" }, { \"principal_id\": \"principal-guid-2\", \"principal_name\": \"principal-name-2\", \"principal_sub_type\": \"principal-sub-type-2\", \"object_privileges\": \"[object-privilege-1, object-privilege-2]\" } ] }, { \"principal_type\": \"principal-type-2\", \"principal_object_privileges\": [ { \"principal_id\": \"principal-guid-3\", \"principal_name\": \"principal-guid-4\", \"principal_sub_type\": \"principal-sub-type-4\", \"object_privileges\": \"[object-privilege-1]\" } ] } ] }, { \"metadata_id\": \"metadata-guid-2\", \"metadata_name\": \"metadata-name-2\", \"metadata_type\": \"metadata-type-2\", \"principal_object_privilege_info\": [ { \"principal_type\": \"principal-type-1\", \"principal_object_privileges\": [ { \"principal_id\": \"principal-guid-1\", \"principal_name\": \"principal-name-1\", \"principal_sub_type\": \"principal-sub-type-1\", \"object_privileges\": \"[object-privilege-3, object-privilege-4]\" }, { \"principal_id\": \"principal-guid-2\", \"principal_name\": \"principal-name-2\", \"principal_sub_type\": \"principal-sub-type-2\", \"object_privileges\": \"[object-privilege-4]\" } ] } ] } ] } ``` + * @param fetchObjectPrivilegesRequest + */ + fetchObjectPrivileges(fetchObjectPrivilegesRequest: FetchObjectPrivilegesRequest, _options?: Configuration): Promise; + /** + * Version: 9.0.0.cl or later Fetches object permission details for a given principal object such as a user and group. Requires view access to the metadata object. #### Usage guidelines * To get a list of all metadata objects that a user or group can access, specify the `type` and GUID or name of the principal. * To get permission details for a specific object, add the `type` and GUID or name of the metadata object to your API request. Upon successful execution, the API returns a list of metadata objects and permission details for each object. + * @param fetchPermissionsOfPrincipalsRequest + */ + fetchPermissionsOfPrincipals(fetchPermissionsOfPrincipalsRequest: FetchPermissionsOfPrincipalsRequest, _options?: Configuration): Promise; + /** + * Version: 9.0.0.cl or later Fetches permission details for a given metadata object. Requires view access to the metadata object. #### Usage guidelines * To fetch a list of users and groups for a metadata object, specify `type` and GUID or name of the metadata object. * To get permission details for a specific user or group, add `type` and GUID or name of the principal object to your API request. Upon successful execution, the API returns permission details and principal information for the object specified in the API request. + * @param fetchPermissionsOnMetadataRequest + */ + fetchPermissionsOnMetadata(fetchPermissionsOnMetadataRequest: FetchPermissionsOnMetadataRequest, _options?: Configuration): Promise; + /** + * Version: 26.3.0.cl or later This API allows the addition or deletion of object level privileges for a set of users and groups, on a set of metadata objects. It provides users to access certain features based on privilege based access control. #### Usage guidelines - Specify the `operation`. The supported operations are: `ADD`, `REMOVE`. - Specify the type of the objects on which the object privileges are being provided in `metadata_type`. Only `LOGICAL_TABLE` metadata type is supported for now. It may be extended for other metadata types in future. - Specify the list of object privilege types in the `object_privilege_types` array. The supported object privilege types are: `SPOTTER_COACHING_PRIVILEGE`. - Specify the identifiers (either GUID or name) for the metadata objects in the `metadata_identifiers` array. - Specify the `type` (`USER` or `USER_GROUP`) and `identifier` (either GUID or name) of the principals to which you want to apply the given operation and given object privileges in the `principals` array. - Ensure using correct Authorization Bearer Token corresponding to specific user & org. #### Example request ```json { \"operation\": \"operation-type\", \"metadata_type\": \"metadata-type\", \"object_privilege_types\": [\"privilege-type-1\", \"privilege-type-2\"], \"metadata_identifiers\": [\"metadata-guid-or-name-1\", \"metadata-guid-or-name-1\"], \"principals\": [ { \"type\": \"type-1\", \"identifier\": \"principal-guid-or-name-1\" }, { \"type\": \"type-2\", \"identifier\": \"principal-guid-or-name-2\" } ] } ``` > ###### Note: > * Only admin users, users with edit access and users with coaching privilege on a given data-model can add or remove principals related to SPOTTER_COACHING_PRIVILEGE + * @param manageObjectPrivilegeRequest + */ + manageObjectPrivilege(manageObjectPrivilegeRequest: ManageObjectPrivilegeRequest, _options?: Configuration): Promise; + /** + * Version: 26.5.0.cl or later Allows publishing metadata objects across organizations in ThoughtSpot. Requires ADMINISTRATION role and TENANT scope. The API endpoint allows publishing the following types of metadata objects: * Liveboards * Answers * Logical Tables This API will essentially share the objects along with it\'s dependencies to the org admins of the orgs to which it is being published. + * @param publishMetadataRequest + */ + publishMetadata(publishMetadataRequest: PublishMetadataRequest, _options?: Configuration): Promise; + /** + * Version: 9.0.0.cl or later Allows sharing one or several metadata objects with users and groups in ThoughtSpot. Requires edit access to the metadata object. #### Supported metadata objects: * Liveboards * Visualizations * Answers * Models * Views * Connections * Collections #### Object permissions You can provide `READ_ONLY` or `MODIFY` access when sharing an object with another user or group. The `READ_ONLY` permission grants view access to the shared object, whereas `MODIFY` provides edit access. To prevent a user or group from accessing the shared object, specify the GUID or name of the principal and set `shareMode` to `NO_ACCESS`. #### Sharing a visualization * Sharing a visualization implicitly shares the entire Liveboard with the recipient. * Object permissions set for a shared visualization also apply to the Liveboard unless overridden by another API request or via UI. * If email notifications for object sharing are enabled, a notification with a link to the shared visualization will be sent to the recipient’s email address. Although this link opens the shared visualization, recipients can also access other visualizations in the Liveboard. #### Sharing a collection Collections support **dual permissions** that provide fine-grained control: * **Collection permissions** (`share_mode`) - controls access to the collection itself (view, edit, delete the collection) * **Content permissions** (`content_share_mode`) - controls access to objects within the collection (view, edit objects inside) **Default Behavior:** - If only `share_mode` is specified, the content permissions default to `READ_ONLY` (except when `share_mode` is `NO_ACCESS`, then content also gets `NO_ACCESS`) - To give users edit access to collection contents, explicitly set `content_share_mode: \"MODIFY\"` ## Examples The following JSON examples can be copy-pasted as request bodies for the REST v2 API endpoint: ```bash POST /callosum/v1/v2/security/metadata/share Content-Type: application/x-www-form-urlencoded ``` ### Basic collection sharing Share a collection with read-only access: ```json { \"metadata_type\": \"COLLECTION\", \"metadata_identifiers\": [\"Sales Reports Collection\"], \"permissions\": [{ \"principal\": { \"type\": \"USER\", \"identifier\": \"alice@company.com\" }, \"share_mode\": \"READ_ONLY\" }], \"notification\": { \"message\": \"I\'ve shared the Sales Reports collection with you\", \"notify_on_share\": true } } ``` ### Collection sharing with dual permissions Share a collection with different permissions for the collection vs. its contents: ```json { \"metadata_type\": \"COLLECTION\", \"metadata_identifiers\": [\"Marketing Analytics\"], \"permissions\": [{ \"principal\": { \"type\": \"USER\", \"identifier\": \"bob@company.com\" }, \"share_mode\": \"MODIFY\", \"content_share_mode\": \"READ_ONLY\" }, { \"principal\": { \"type\": \"USER_GROUP\", \"identifier\": \"Marketing Team\" }, \"share_mode\": \"READ_ONLY\", \"content_share_mode\": \"READ_ONLY\" }], \"notification\": { \"emails\": [\"bob@company.com\"], \"message\": \"You can edit the collection but content is read-only\", \"enable_custom_url\": false, \"notify_on_share\": true }, \"has_lenient_discoverability\": false } ``` ### Multiple collections sharing Share multiple collections with different users: ```json { \"metadata\": [ { \"type\": \"COLLECTION\", \"identifier\": \"Q4 Reports\" }, { \"type\": \"COLLECTION\", \"identifier\": \"Executive Dashboard Collection\" } ], \"permissions\": [{ \"principal\": { \"type\": \"USER_GROUP\", \"identifier\": \"Executives\" }, \"share_mode\": \"MODIFY\" }, { \"principal\": { \"type\": \"USER\", \"identifier\": \"manager@company.com\" }, \"share_mode\": \"READ_ONLY\", \"content_share_mode\": \"MODIFY\" }], \"notification\": { \"message\": \"Sharing quarterly collections with leadership team\", \"notify_on_share\": true } } ``` ### Remove collection access Remove access to a collection by setting share_mode to NO_ACCESS: ```json { \"metadata_type\": \"COLLECTION\", \"metadata_identifiers\": [\"Confidential Reports\"], \"permissions\": [{ \"principal\": { \"type\": \"USER\", \"identifier\": \"former-employee@company.com\" }, \"share_mode\": \"NO_ACCESS\" }], \"notification\": { \"notify_on_share\": false } } ``` ### Collection Permission Scenarios **Scenario 1: Collection Admin** - `share_mode: MODIFY` + `content_share_mode: MODIFY` = Full control over collection and its contents **Scenario 2: Collection Curator** - `share_mode: MODIFY` + `content_share_mode: READ_ONLY` = Can manage collection structure but not edit contents **Scenario 3: Content Editor** - `share_mode: READ_ONLY` + `content_share_mode: MODIFY` = Can edit objects within collection but can\'t change collection itself **Scenario 4: Viewer** - `share_mode: READ_ONLY` + `content_share_mode: READ_ONLY` = View-only access to collection and contents + * @param shareMetadataRequest + */ + shareMetadata(shareMetadataRequest: ShareMetadataRequest, _options?: Configuration): Promise; + /** + * Version: 26.5.0.cl or later Allows unpublishing metadata objects from organizations in ThoughtSpot. Requires ADMINISTRATION role and TENANT scope. The API endpoint allows unpublishing the following types of metadata objects: * Liveboards * Answers * Logical Tables When unpublishing objects, you can: * Include dependencies by setting `include_dependencies` to true - this will unpublish all dependent objects if no other published object is using them * Force unpublish by setting `force` to true - this will break all dependent objects in the unpublished organizations + * @param unpublishMetadataRequest + */ + unpublishMetadata(unpublishMetadataRequest: UnpublishMetadataRequest, _options?: Configuration): Promise; + /** + * Version: 10.12.0.cl or later Creates, updates, or deletes column security rules for specified tables. This API endpoint allows you to create, update, or delete column-level security rules on columns of a table. The operation follows an \"all or none\" policy: if defining security rules for any of the provided columns fails, the entire operation will be rolled back, and no rules will be created. #### Usage guidelines - Provide table identifier using either `identifier` (GUID or name) or `obj_identifier` (object ID) - Use `clear_csr: true` to remove all column security rules from the table - For each column, specify the security rule using `column_security_rules` array - Use `is_unsecured: true` to mark a specific column as unprotected - Use `group_access` operations to manage group associations: - `ADD`: Add groups to the column\'s access list - `REMOVE`: Remove groups from the column\'s access list - `REPLACE`: Replace all existing groups with the specified groups #### Required permissions - `ADMINISTRATION` - Can administer ThoughtSpot - `DATAMANAGEMENT` - Can manage data (if RBAC is disabled) - `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` - Can manage worksheet views and tables (if RBAC is enabled) #### Example request ```json { \"identifier\": \"table-guid\", \"obj_identifier\": \"table-object-id\", \"clear_csr\": false, \"column_security_rules\": [ { \"column_identifier\": \"col id or col name\", \"is_unsecured\": false, \"group_access\": [ { \"operation\": \"ADD\", \"group_identifiers\": [\"hr_group_id\", \"hr_group_name\", \"finance_group_id\"] } ] }, { \"column_identifier\": \"col id or col name\", \"is_unsecured\": true }, { \"column_identifier\": \"col id or col name\", \"is_unsecured\": false, \"group_access\": [ { \"operation\": \"REPLACE\", \"group_identifiers\": [\"management_group_id\", \"management_group_name\"] } ] } ] } ``` #### Request Body Schema - `identifier` (string, optional): GUID or name of the table for which we want to create column security rules - `obj_identifier` (string, optional): The object ID of the table - `clear_csr` (boolean, optional): If true, then all the secured columns will be marked as unprotected, and all the group associations will be removed - `column_security_rules` (array of objects, required): An array where each object defines the security rule for a specific column Each column security rule object contains: - `column_identifier` (string, required): Column identifier (col_id or name) - `is_unsecured` (boolean, optional): If true, the column will be marked as unprotected and all groups associated with it will be removed - `group_access` (array of objects, optional): Array of group operation objects Each group operation object contains: - `operation` (string, required): Operation type - ADD, REMOVE, or REPLACE - `group_identifiers` (array of strings, required): Array of group identifiers (name or GUID) on which the operation will be performed #### Response This API does not return any response body. A successful operation returns HTTP 200 status code. #### Operation Types - **ADD**: Adds the specified groups to the column\'s access list - **REMOVE**: Removes the specified groups from the column\'s access list - **REPLACE**: Replaces all existing groups with the specified groups + * @param updateColumnSecurityRulesRequest + */ + updateColumnSecurityRules(updateColumnSecurityRulesRequest: UpdateColumnSecurityRulesRequest, _options?: Configuration): Promise; +} + +declare class PromiseSystemApi { + private api; + constructor(configuration: Configuration, requestFactory?: SystemApiRequestFactory, responseProcessor?: SystemApiResponseProcessor); + /** + * Version: 10.14.0.cl or later Configure communication channel preferences. - Use `cluster_preferences` to update the default preferences for your ThoughtSpot application instance. - If your instance has [Orgs](https://docs.thoughtspot.com/cloud/latest/orgs-overview), use `org_preferences` to specify Org-specific preferences that override the defaults. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) or `DEVELOPER` (**Has developer privilege**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, users with `APPLICATION_ADMINISTRATION` (**Can manage application settings**) privilege are also authorized to perform this action. + * @param configureCommunicationChannelPreferencesRequest + */ + configureCommunicationChannelPreferences(configureCommunicationChannelPreferencesRequest: ConfigureCommunicationChannelPreferencesRequest, _options?: Configuration): Promise; + /** + * Version: 26.2.0.cl or later Configure security settings for your ThoughtSpot application instance. - Use `cluster_preferences` to update cluster-level security settings including CORS whitelisted URLs, CSP settings, SAML redirect URLs, partitioned cookies, and non-embed access configuration. - Use `org_preferences` to configure Org-specific security settings. If your instance has [Orgs](https://docs.thoughtspot.com/cloud/latest/orgs-overview), this allows configuring CORS and non-embed access settings specific to the Org. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) or `DEVELOPER` (**Has developer privilege**) privilege. Cluster-level SAML and script-src settings require `ADMINISTRATION` privilege. See [Security Settings](https://developers.thoughtspot.com/docs/security-settings) for more details. + * @param configureSecuritySettingsRequest + */ + configureSecuritySettings(configureSecuritySettingsRequest: ConfigureSecuritySettingsRequest, _options?: Configuration): Promise; + /** + * Version: 9.0.0.cl or later Retrieves the current configuration details of the cluster. If the request is successful, the API returns a list configuration settings applied on the cluster. Requires `ADMINISTRATION`(**Can administer ThoughtSpot**) privilege to view these complete configuration settings of the cluster. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `SYSTEM_INFO_ADMINISTRATION` (**Can view system activities**) privilege is required. This API does not require any parameters to be passed in the request. + */ + getSystemConfig(_options?: Configuration): Promise; + /** + * Version: 9.0.0.cl or later Gets system information such as the release version, locale, time zone, deployment environment, date format, and date time format of the cluster. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privileges. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `SYSTEM_INFO_ADMINISTRATION` (**Can view system activities**) privilege is required. This API does not require any parameters to be passed in the request. + */ + getSystemInformation(_options?: Configuration): Promise; + /** + * Version: 9.2.0.cl or later Gets a list of configuration overrides applied on the cluster. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `APPLICATION_ADMINISTRATION` (**Can manage application settings**) privilege is required. This API does not require any parameters to be passed in the request. + */ + getSystemOverrideInfo(_options?: Configuration): Promise; + /** + * Version: 10.14.0.cl or later Fetch communication channel preferences. - Use `cluster_preferences` to fetch the default preferences for your ThoughtSpot application instance. - If your instance has [Orgs](https://docs.thoughtspot.com/cloud/latest/orgs-overview), use `org_preferences` to fetch any Org-specific preferences that override the defaults. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) or `DEVELOPER` (**Has developer privilege**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, users with `APPLICATION_ADMINISTRATION` (**Can manage application settings**) privilege are also authorized to perform this action. + * @param searchCommunicationChannelPreferencesRequest + */ + searchCommunicationChannelPreferences(searchCommunicationChannelPreferencesRequest: SearchCommunicationChannelPreferencesRequest, _options?: Configuration): Promise; + /** + * Version: 26.2.0.cl or later Fetch security settings for your ThoughtSpot application instance. - Use `scope: CLUSTER` to retrieve cluster-level security settings, including CORS and CSP allowlists, SAML redirect URLs, and settings that control access to non-embedded pages. - Use `scope: ORG` to retrieve Org-level security settings. If your instance has [Orgs](https://docs.thoughtspot.com/cloud/latest/orgs-overview), this returns CORS and non-embed access settings specific to the Org. - If `scope` is not specified, returns both cluster and Org-specific settings based on user privileges. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) or `DEVELOPER` (**Has developer privilege**) privilege. See [Security Settings](https://developers.thoughtspot.com/docs/security-settings) for more details. + * @param searchSecuritySettingsRequest + */ + searchSecuritySettings(searchSecuritySettingsRequest: SearchSecuritySettingsRequest, _options?: Configuration): Promise; + /** + * Version: 9.2.0.cl or later Updates the current configuration of the cluster. You must send the configuration data in JSON format. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privileges. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `APPLICATION_ADMINISTRATION` (**Can manage application settings**) privilege is required. + * @param updateSystemConfigRequest + */ + updateSystemConfig(updateSystemConfigRequest: UpdateSystemConfigRequest, _options?: Configuration): Promise; + /** + * Version: 26.4.0.cl or later Validates a communication channel configuration to ensure it is properly set up and can receive events. - Use `channel_type` to specify the type of communication channel to validate (e.g., WEBHOOK). - Use `channel_identifier` to provide the unique identifier or name for the communication channel. - Use `event_type` to specify the event type to validate for this channel. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) or `DEVELOPER` (**Has developer privilege**) privilege. For webhook channels, users with `CAN_MANAGE_WEBHOOKS` (**Can manage webhooks**) privilege are also authorized to perform this action. + * @param validateCommunicationChannelRequest + */ + validateCommunicationChannel(validateCommunicationChannelRequest: ValidateCommunicationChannelRequest, _options?: Configuration): Promise; +} + +declare class PromiseTagsApi { + private api; + constructor(configuration: Configuration, requestFactory?: TagsApiRequestFactory, responseProcessor?: TagsApiResponseProcessor); + /** + * Version: 9.0.0.cl or later Assigns tags to Liveboards, Answers, Tables, and Worksheets. Requires edit access to the metadata object. + * @param assignTagRequest + */ + assignTag(assignTagRequest: AssignTagRequest, _options?: Configuration): Promise; + /** + * Version: 9.0.0.cl or later Creates a tag object. Tags are labels that identify a metadata object. For example, you can create a tag to designate subject areas, such as sales, HR, marketing, and finance. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `TAGMANAGEMENT` (**Can manage tags**) privilege is required to create, edit, and delete tags. + * @param createTagRequest + */ + createTag(createTagRequest: CreateTagRequest, _options?: Configuration): Promise; + /** + * Version: 9.0.0.cl or later Deletes a tag object from the ThoughtSpot system Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `TAGMANAGEMENT` (**Can manage tags**) privilege is required to create, edit, and delete tags. + * @param tagIdentifier Tag identifier Tag name or Tag id. + */ + deleteTag(tagIdentifier: string, _options?: Configuration): Promise; + /** + * Version: 9.0.0.cl or later Gets a list of tag objects available on the ThoughtSpot system. To get details of a specific tag object, specify the GUID or name. Any authenticated user can search for tag objects. + * @param searchTagsRequest + */ + searchTags(searchTagsRequest: SearchTagsRequest, _options?: Configuration): Promise>; + /** + * Version: 9.0.0.cl or later Removes the tags applied to a Liveboard, Answer, Table, or Worksheet. Requires edit access to the metadata object. + * @param unassignTagRequest + */ + unassignTag(unassignTagRequest: UnassignTagRequest, _options?: Configuration): Promise; + /** + * Version: 9.0.0.cl or later Updates a tag object. You can modify the `name` and `color` properties of a tag object. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `TAGMANAGEMENT` (**Can manage tags**) privilege is required to create, edit, and delete tags. + * @param tagIdentifier Name or Id of the tag. + * @param updateTagRequest + */ + updateTag(tagIdentifier: string, updateTagRequest: UpdateTagRequest, _options?: Configuration): Promise; +} + +declare class PromiseThoughtSpotRestApi { + private api; + constructor(configuration: Configuration, requestFactory?: ThoughtSpotRestApiRequestFactory, responseProcessor?: ThoughtSpotRestApiResponseProcessor); + /** + * Version: 9.7.0.cl or later Activates a deactivated user account. Requires `ADMINISTRATION` (**Can administer Thoughtspot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `USER_ADMINISTRATION` (**Can manage users**) privilege is required. To activate an inactive user account, the API request body must include the following information: - Username or the GUID of the user account. - Auth token generated for the deactivated user. The auth token is sent in the API response when a user is deactivated. - Password for the user account. + * @param activateUserRequest + */ + activateUser(activateUserRequest: ActivateUserRequest, _options?: Configuration): Promise; + /** + * Version: 9.0.0.cl or later Transfers the ownership of one or several objects from one user to another. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `USER_ADMINISTRATION` (**Can manage users**) privilege and edit access to the objects are required. + * @param assignChangeAuthorRequest + */ + assignChangeAuthor(assignChangeAuthorRequest: AssignChangeAuthorRequest, _options?: Configuration): Promise; + /** + * Version: 9.0.0.cl or later Assigns tags to Liveboards, Answers, Tables, and Worksheets. Requires edit access to the metadata object. + * @param assignTagRequest + */ + assignTag(assignTagRequest: AssignTagRequest, _options?: Configuration): Promise; + /** + * Version: 9.0.0.cl or later Updates the current password of the user. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `USER_ADMINISTRATION` (**Can manage users**) privilege is required. + * @param changeUserPasswordRequest + */ + changeUserPassword(changeUserPasswordRequest: ChangeUserPasswordRequest, _options?: Configuration): Promise; + /** + * Version: 9.2.0.cl or later Commits TML files of metadata objects to the Git branch configured on your instance. Requires at least edit access to objects used in the commit operation. Before using this endpoint to push your commits: * Enable Git integration on your instance. * Make sure the Git repository and branch details are configured on your instance. For more information, see [Git integration documentation](https://developers.thoughtspot.com/docs/git-integration). + * @param commitBranchRequest + */ + commitBranch(commitBranchRequest: CommitBranchRequest, _options?: Configuration): Promise; + /** + * Version: 26.6.0.cl or later Enables or disables authentication at cluster or org level for the specified auth type. Currently supports `TRUSTED_AUTH`. #### Required privileges Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) or `CONTROL_TRUSTED_AUTH` (**Can Enable or Disable Trusted Authentication**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled, the `CONTROL_TRUSTED_AUTH` privilege is required. #### Usage guidelines Use `cluster_preferences` to enable or disable authentication at the cluster level. Cluster-level settings can only be configured from the Primary Org. - `ENABLED` — Generates a new access token if one does not exist. An existing token is preserved. - `DISABLED` — Revokes the existing cluster-level access token. Use `org_preferences` to enable or disable authentication for one or more Orgs. Each entry must include an `org_identifier` (unique ID or name) and an `auth_status`. Org-level configuration requires the per-Org authentication feature to be enabled on your instance. - `ENABLED` — Generates a new org-level access token if one does not exist. - `DISABLED` — Revokes the existing org-level access token for that Org. Both `cluster_preferences` and `org_preferences` are optional. Omitting a field leaves the corresponding settings unchanged. If both are omitted, the API returns `204 No Content` without making any changes. **Note**: Cluster-level and org-level settings are independent of each other. Enabling or disabling one does not affect the other. + * @param configureAuthSettingsRequest + */ + configureAuthSettings(configureAuthSettingsRequest: ConfigureAuthSettingsRequest, _options?: Configuration): Promise; + /** + * Version: 10.14.0.cl or later Configure communication channel preferences. - Use `cluster_preferences` to update the default preferences for your ThoughtSpot application instance. - If your instance has [Orgs](https://docs.thoughtspot.com/cloud/latest/orgs-overview), use `org_preferences` to specify Org-specific preferences that override the defaults. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) or `DEVELOPER` (**Has developer privilege**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, users with `APPLICATION_ADMINISTRATION` (**Can manage application settings**) privilege are also authorized to perform this action. + * @param configureCommunicationChannelPreferencesRequest + */ + configureCommunicationChannelPreferences(configureCommunicationChannelPreferencesRequest: ConfigureCommunicationChannelPreferencesRequest, _options?: Configuration): Promise; + /** + * Version: 26.2.0.cl or later Configure security settings for your ThoughtSpot application instance. - Use `cluster_preferences` to update cluster-level security settings including CORS whitelisted URLs, CSP settings, SAML redirect URLs, partitioned cookies, and non-embed access configuration. - Use `org_preferences` to configure Org-specific security settings. If your instance has [Orgs](https://docs.thoughtspot.com/cloud/latest/orgs-overview), this allows configuring CORS and non-embed access settings specific to the Org. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) or `DEVELOPER` (**Has developer privilege**) privilege. Cluster-level SAML and script-src settings require `ADMINISTRATION` privilege. See [Security Settings](https://developers.thoughtspot.com/docs/security-settings) for more details. + * @param configureSecuritySettingsRequest + */ + configureSecuritySettings(configureSecuritySettingsRequest: ConfigureSecuritySettingsRequest, _options?: Configuration): Promise; + /** + * Version: 10.12.0.cl or later Gets connection configuration objects. Requires `DATAMANAGEMENT` (**Can manage data**) and edit permissions to the connection object, or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) privilege is required. #### Usage guidelines * To get a list of all configurations available in the ThoughtSpot system, send the API request with only the connection name or GUID in the request body. * To fetch details of a configuration object, specify the configuration object name or GUID. + * @param connectionConfigurationSearchRequest + */ + connectionConfigurationSearch(connectionConfigurationSearchRequest: ConnectionConfigurationSearchRequest, _options?: Configuration): Promise>; + /** + * Convert worksheets to models Version: 10.6.0.cl or later ## Prerequisites - **Privileges Required:** - `DATAMANAGEMENT` (Can manage data) or `ADMINISTRATION` (Can administer ThoughtSpot). - **Additional Privileges (if RBAC is enabled):** - `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` (Can manage data models). --- ## Usage Guidelines ### Parameters 1. **worksheet_ids** - **Description:** A comma-separated list of GUIDs (Globally Unique Identifiers) specifying the Worksheets to be converted. - **Usage:** - Used only when `convert_all` is set to `false`. - Leave empty or omit when `convert_all` is set to `true`. 2. **exclude_worksheet_ids** - **Description:** A comma-separated list of GUIDs specifying Worksheets to be excluded from conversion. - **Usage:** - Useful when `convert_all` is set to `true` and specific Worksheets should not be converted. 3. **convert_all** - **Description:** Sets the scope of conversion. - **Options:** - `true`: Converts all Worksheets in the system, except those specified in `exclude_worksheet_ids`. - `false`: Converts only the Worksheets listed in `worksheet_ids`. 4. **apply_changes** - **Description:** Specifies whether to apply changes directly to ThoughtSpot or to generate a preview before applying any changes.Used for validation of conversion. - **Options:** - `true`: Applies conversion changes directly to ThoughtSpot. - `false`: Generates only a preview of the changes and does not apply any changes to ThoughtSpot --- ## Best Practices 1. **Backup Before Conversion:** Always export metadata as a backup before initiating the conversion process 2. **Partial Conversion for Testing:** Test the conversion process by setting `convert_all` to `false` and specifying a small number of `worksheet_ids`. 3. **Verify Dependencies:** Check for dependent objects, such as Tables and Connections, to avoid invalid references. 4. **Review Changes:** Use `apply_changes: false` to preview the impact of the conversion before applying changes. --- ## Examples ### Convert Specific Worksheets ```json { \"worksheet_ids\": [\"guid1\", \"guid2\", \"guid3\"], \"exclude_worksheet_ids\": [], \"convert_all\": false, \"apply_changes\": true } ``` ### Convert All Accessible Worksheets ```json { \"worksheet_ids\": [], \"exclude_worksheet_ids\": [], \"convert_all\": true, \"apply_changes\": true } ``` ### Exclude Specific Worksheets While Converting All Accessible Worksheets ```json { \"worksheet_ids\": [], \"exclude_worksheet_ids\": [\"abc\"], \"convert_all\": true, \"apply_changes\": true } ``` + * @param convertWorksheetToModelRequest + */ + convertWorksheetToModel(convertWorksheetToModelRequest: ConvertWorksheetToModelRequest, _options?: Configuration): Promise; + /** + * Makes a copy of an Answer or Liveboard Version: 10.3.0.cl or later Creates a copy of a metadata object. Requires at least view access to the metadata object being copied. Upon successful execution, the API creates a copy of the metadata object specified in the API request and returns the ID of the new object. + * @param copyObjectRequest + */ + copyObject(copyObjectRequest: CopyObjectRequest, _options?: Configuration): Promise; + /** + * Version: 26.2.0.cl or later Creates a new Spotter agent conversation based on the provided context and settings. The endpoint was in Beta from 26.2.0.cl through 26.4.0.cl. Requires `CAN_USE_SPOTTER` privilege and at least view access to the metadata object specified in the request. #### Usage guidelines The request must include the `metadata_context` parameter to define the conversation context. The context type can be one of: - `DATA_SOURCE` *(available from 26.5.0.cl)*: targets a specific data source. Provide `data_source_identifier` in `data_source_context` for a single data source, or `data_source_identifiers` for multi-data-source context. The deprecated `guid` field is accepted for backwards compatibility. - `AUTO_MODE` *(available from 26.5.0.cl)*: automatically discovers and selects the most relevant datasets for the user\'s queries. > **Note for callers on versions 26.2.0.cl – 26.4.0.cl (Beta):** use the lowercase `data_source` enum value with the `guid` field instead of the above. Example: `{ \"type\": \"data_source\", \"data_source_context\": { \"guid\": \"\" } }`. The `conversation_settings` parameter controls which Spotter capabilities are enabled for the conversation: - `enable_contextual_change_analysis` (default: `true`, **deprecated from 26.2.0.cl**) — always enabled in Spotter 3; setting this to `false` has no effect on versions >= 26.2.0.cl - `enable_natural_language_answer_generation` (default: `true`, **deprecated from 26.2.0.cl**) — always enabled in Spotter 3; setting this to `false` has no effect on versions >= 26.2.0.cl - `enable_reasoning` (default: `true`, **deprecated from 26.2.0.cl**) — always enabled in Spotter 3; setting this to `false` has no effect on versions >= 26.2.0.cl - `enable_save_chat` (default: `false`, *available from 26.5.0.cl*) — enables saving the conversation for later retrieval via conversation history If the request is successful, the response includes a unique `conversation_identifier` that must be passed to `sendAgentConversationMessage` or `sendAgentConversationMessageStreaming` to send messages within this conversation. The response also includes `conversation_id` with the same value for backwards compatibility; use `conversation_identifier` for new integrations. #### Example request ```json { \"metadata_context\": { \"type\": \"DATA_SOURCE\", \"data_source_context\": { \"data_source_identifier\": \"a1b2c3d4-e5f6-7890-abcd-ef1234567890\" } }, \"conversation_settings\": {} } ``` #### Error responses | Code | Description | | ---- | --------------------------------------------------------------------------------------------------------------------------------------- | | 401 | Unauthorized — authentication token is missing, expired, or invalid. | | 403 | Forbidden — the authenticated user does not have `CAN_USE_SPOTTER` privilege or lacks view permission on the specified metadata object. | > ###### Note: > > - This endpoint was in Beta from 26.2.0.cl through 26.4.0.cl and is Generally Available from version 26.5.0.cl. > - This endpoint requires Spotter - please contact ThoughtSpot support to enable Spotter on your cluster. + * @param createAgentConversationRequest + */ + createAgentConversation(createAgentConversationRequest: CreateAgentConversationRequest, _options?: Configuration): Promise; + /** + * Version: 10.12.0.cl or later Creates a new [custom calendar](https://docs.thoughtspot.com/cloud/latest/connections-cust-cal). Requires `DATAMANAGEMENT` (**Can manage data**) or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your ThoughtSpot instance, the `CAN_MANAGE_CUSTOM_CALENDAR` (**Can manage custom calendars**) privilege is required. #### Usage guidelines You can create a custom calendar from scratch or an existing Table in ThoughtSpot. For both methods of calendar creation, the following parameters are required: * Name of the custom calendar. * Calendar creation method. To create a calendar from an existing table, specify the method: - `FROM_EXISTING_TABLE` - Creates calendar from the table reference provided in the API request. - `FROM_INPUT_PARAMS` - Creates a calendar from the parameters defined in the API request. * Connection ID and Table name * Database and schema name attributes: For most Cloud Data Warehouse (CDW) connectors, both `database_name` and `schema_name` attributes are required. However, the attribute requirements are conditional and vary based on the connector type and its metadata structure. For example, for connectors such as Teradata, MySQL, SingleSore, Amazon Aurora MySQL, Amazon RDS MySQL, Oracle, and GCP_MYSQL, the `schema_name` is required, whereas the `database_name` attribute is not. Similarly, connectors such as ClickHouse require you to specify the `database_name` and the schema specification in such cases is optional. **NOTE**: If you are creating a calendar from an existing table, ensure that the referenced table matches the required DDL for custom calendars. If the schema does not match, the API returns an error. ##### Calendar type The API allows you to create the following types of calendars: * `MONTH_OFFSET`. The default calendar type. A `MONTH_OFFSET` calendar is offset by a few months from the standard calendar months (January to December) and the year begins with the month defined in the request. For example, if the `month_offset` value is set as `April`, the calendar year begins in April. * `4-4-5`. Each quarter in the calendar will include two 4-week months followed by one 5-week month. * `4-5-4`. Each quarter in the calendar will include two 4-week months with a 5-week month between. * `5-4-4`. Each quarter begins with a 5-week month, followed by two 4-week months. To start and end the calendar on a specific date, specify the dates in the `MM/DD/YYYY` format. For `MONTH_OFFSET` calendars, ensure that the `start_date` matches the month specified in the `month_offset` attribute. You can also set the starting day of the week and customize the prefixes for year and quarter labels. #### Examples To create a calendar from an existing table: ``` { \"name\": \"MyCustomCalendar1\", \"table_reference\": { \"connection_identifier\": \"4db8ea22-2ff4-4224-b05a-26674717e468\", \"table_name\": \"MyCalendarTable\", \"database_name\": \"RETAILAPPAREL\", \"schema_name\": \"PUBLIC\" }, \"creation_method\": \"FROM_EXISTING_TABLE\", } ``` To create a calendar from scratch: ``` { \"name\": \"MyCustomCalendar1\", \"table_reference\": { \"connection_identifier\": \"4db8ea22-2ff4-4224-b05a-26674717e468\", \"table_name\": \"MyCalendarTable\", \"database_name\": \"RETAILAPPAREL\", \"schema_name\": \"PUBLIC\" }, \"creation_method\": \"FROM_INPUT_PARAMS\", \"calendar_type\": \"MONTH_OFFSET\", \"month_offset\": \"April\", \"start_day_of_week\": \"Monday\", \"quarter_name_prefix\": \"Q\", \"year_name_prefix\": \"FY\", \"start_date\": \"04/01/2025\", \"end_date\": \"04/31/2025\" } ``` + * @param createCalendarRequest + */ + createCalendar(createCalendarRequest: CreateCalendarRequest, _options?: Configuration): Promise; + /** + * Version: 26.4.0.cl or later Creates a new collection in ThoughtSpot. Collections allow you to organize and group related metadata objects such as Liveboards, Answers, worksheets, and other data objects. You can also create nested collections (sub-collections) to build a hierarchical structure. #### Supported operations The API endpoint lets you perform the following operations: * Create a new collection * Add metadata objects (Liveboards, Answers, Logical Tables) to the collection * Create nested collections by adding sub-collections + * @param createCollectionRequest + */ + createCollection(createCollectionRequest: CreateCollectionRequest, _options?: Configuration): Promise; + /** + * Version: 9.2.0.cl or later Allows you to connect a ThoughtSpot instance to a Git repository. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance on your instance, the `CAN_SETUP_VERSION_CONTROL` (**Can set up version control**) privilege. You can use this API endpoint to connect your ThoughtSpot development and production environments to the development and production branches of a Git repository. Before using this endpoint to connect your ThoughtSpot instance to a Git repository, check the following prerequisites: * You have a Git repository. If you are using GitHub, make sure you have a valid account and an access token to connect ThoughtSpot to GitHub. For information about generating a token, see [GitHub Documentation](https://docs.github.com/en/authentication/keeping-your-account-and-data-secure/managing-your-personal-access-tokens). * Your access token has `repo` scope that grants full access to public and private repositories. * Your Git repository has a branch that can be configured as a default branch in ThoughtSpot. For more information, see [Git integration documentation](https://developers.thoughtspot.com/docs/?pageid=git-integration). **Note**: ThoughtSpot supports only GitHub / itHub Enterprise for CI/CD. + * @param createConfigRequest + */ + createConfig(createConfigRequest: CreateConfigRequest, _options?: Configuration): Promise; + /** + * Version: 9.2.0.cl or later Creates a connection to a data warehouse for live query services. Requires `DATAMANAGEMENT` (**Can manage data**) or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) privilege is required. #### Create a connection without tables To create a connection without tables: 1. Pass these parameters in your API request. * Name of the connection. * Type of the data warehouse to connect to. * A JSON map of configuration attributes in `data_warehouse_config`. The following example shows the configuration attributes for a SnowFlake connection: ``` { \"configuration\":{ \"accountName\":\"thoughtspot_partner\", \"user\":\"tsadmin\", \"password\":\"TestConn123\", \"role\":\"sysadmin\", \"warehouse\":\"MEDIUM_WH\" }, \"authenticationType\": \"SERVICE_ACCOUNT\", \"externalDatabases\":[ ] } ``` 2. Set `validate` to `false`. **NOTE:** If the `authentication_type` is anything other than SERVICE_ACCOUNT, you must explicitly provide the authenticationType property in the payload. If you do not specify authenticationType, the API will default to SERVICE_ACCOUNT as the authentication type. #### Create a connection with tables If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) and `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` (**Can manage data models**) privilege is required. To create a connection with tables: 1. Pass these parameters in your API request. * Name of the connection. * Type of the data warehouse to connect to. * A JSON map of configuration attributes, database details, and table properties in `data_warehouse_config` as shown in the following example: ``` { \"configuration\":{ \"accountName\":\"thoughtspot_partner\", \"user\":\"tsadmin\", \"password\":\"TestConn123\", \"role\":\"sysadmin\", \"warehouse\":\"MEDIUM_WH\" }, \"authenticationType\": \"SERVICE_ACCOUNT\", \"externalDatabases\":[ { \"name\":\"AllDatatypes\", \"isAutoCreated\":false, \"schemas\":[ { \"name\":\"alldatatypes\", \"tables\":[ { \"name\":\"allDatatypes\", \"type\":\"TABLE\", \"description\":\"\", \"selected\":true, \"linked\":true, \"columns\":[ { \"name\":\"CNUMBER\", \"type\":\"INT64\", \"canImport\":true, \"selected\":true, \"isLinkedActive\":true, \"isImported\":false, \"tableName\":\"allDatatypes\", \"schemaName\":\"alldatatypes\", \"dbName\":\"AllDatatypes\" }, { \"name\":\"CDECIMAL\", \"type\":\"INT64\", \"canImport\":true, \"selected\":true, \"isLinkedActive\":true, \"isImported\":false, \"tableName\":\"allDatatypes\", \"schemaName\":\"alldatatypes\", \"dbName\":\"AllDatatypes\" } ] } ] } ] } ] } ``` 2. Set `validate` to `true`. **NOTE:** If the `authentication_type` is anything other than SERVICE_ACCOUNT, you must explicitly provide the authenticationType property in the payload. If you do not specify authenticationType, the API will default to SERVICE_ACCOUNT as the authentication type. + * @param createConnectionRequest + */ + createConnection(createConnectionRequest: CreateConnectionRequest, _options?: Configuration): Promise; + /** + * Version: 10.12.0.cl or later Creates an additional configuration to an existing connection to a data warehouse. Requires `DATAMANAGEMENT` (**Can manage data**) or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) privilege is required. #### Usage guidelines * A JSON map of configuration attributes in `configuration`. The following example shows the configuration attributes: ``` { \"user\":\"DEV_USER\", \"password\":\"TestConn123\", \"role\":\"DEV\", \"warehouse\":\"DEV_WH\" } ``` * If the `policy_type` is `PRINCIPALS`, then `policy_principals` is a required field. * If the `policy_type` is `PROCESSES`, then `policy_processes` is a required field. * If the `policy_type` is `NO_POLICY`, then `policy_principals` and `policy_processes` are not required fields. #### Parameterized Connection Support For parameterized connections that use OAuth authentication, only the same_as_parent and policy_process_options attributes are allowed in the API request. These attributes are not applicable to connections that are not parameterized. + * @param createConnectionConfigurationRequest + */ + createConnectionConfiguration(createConnectionConfigurationRequest: CreateConnectionConfigurationRequest, _options?: Configuration): Promise; + /** + * Version: 10.4.0.cl or later Creates a new conversation session tied to a specific data model for AI-driven natural language querying. Requires `CAN_USE_SPOTTER` privilege and at least view access to the metadata object specified in the request. #### Usage guidelines The request must include: - `metadata_identifier`: the unique ID of the data source that provides context for the conversation Optionally, you can provide: - `tokens`: a token string to set initial context for the conversation (e.g., `\"[sales],[item type],[state]\"`) If the request is successful, ThoughtSpot returns a unique `conversation_identifier` that must be passed to `sendMessage` to continue the conversation. #### Error responses | Code | Description | |------|-------------| | 401 | Unauthorized — authentication token is missing, expired, or invalid. | | 403 | Forbidden — the authenticated user does not have `CAN_USE_SPOTTER` privilege or lacks view permission on the specified metadata object. | > ###### Note: > * This endpoint is currently in Beta. Breaking changes may be introduced before the endpoint is made Generally Available. > * This endpoint requires Spotter - please contact ThoughtSpot support to enable Spotter on your cluster. + * @param createConversationRequest + */ + createConversation(createConversationRequest: CreateConversationRequest, _options?: Configuration): Promise; + /** + * Version: 9.6.0.cl or later Creates a custom action that appears as a menu action on a saved Answer or Liveboard visualization. Requires `DEVELOPER` (**Has Developer privilege**) or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `DEVELOPER` (**Has developer privilege**) privilege is required. #### Usage Guidelines The API lets you create the following types of custom actions: * URL-based action Allows pushing data to an external URL. * Callback action Triggers a callback to the host application and initiates a response payload on an embedded ThoughtSpot instance. By default, custom actions are visible to only administrator or developer users. To make a custom action available to other users, and specify the groups in `group_identifiers`. By default, the custom action is set as a _global_ action on all visualizations and saved Answers. To assign a custom action to specific Liveboard visualization, saved Answer, or Worksheet, set `visibility` to `false` in `default_action_config` property and specify the GUID or name of the object in `associate_metadata`. For more information, see [Custom actions](https://developers.thoughtspot.com/docs/custom-action-intro). + * @param createCustomActionRequest + */ + createCustomAction(createCustomActionRequest: CreateCustomActionRequest, _options?: Configuration): Promise; + /** + * Version: 10.10.0.cl or later Creates a customization configuration for the notification email. #### Pre-requisites Requires `DEVELOPER` (**has developer privilege**) or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `DEVELOPER` (**Has developer privilege**) privilege is required. **NOTE**:This endpoint in currently in beta. Contact ThoughtSpot support to enable this on your instance. #### Usage guidelines To create a custom configuration pass these parameters in your API request: - A JSON map of configuration attributes `template_properties`. The following example shows a sample set of customization configuration: ``` { { \"cta_button_bg_color\": \"#444DEA\", \"cta_text_font_color\": \"#FFFFFF\", \"primary_bg_color\": \"#D3DEF0\", \"logo_url\": \"https://storage.pardot.com/710713/1642089901EbkRibJq/TS_fullworkmark_darkmode.png\", \"font_family\": \"\", \"product_name\": \"ThoughtSpot\", \"footer_address\": \"444 Castro St, Suite 1000 Mountain View, CA 94041\", \"footer_phone\": \"(800) 508-7008\", \"replacement_value_for_liveboard\": \"Dashboard\", \"replacement_value_for_answer\": \"Chart\", \"replacement_value_for_spot_iq\": \"AI Insights\", \"hide_footer_phone\": false, \"hide_footer_address\": false, \"hide_product_name\": false, \"hide_manage_notification\": false, \"hide_mobile_app_nudge\": false, \"hide_privacy_policy\": false, \"hide_ts_vocabulary_definitions\": false, \"hide_error_message\": false, \"hide_unsubscribe_link\": false, \"hide_notification_status\": false, \"hide_modify_alert\": false, \"company_website_url\": \"https://your-website.com/\", \"company_privacy_policy_url\" : \"https://link-to-privacy-policy.com/\", \"contact_support_url\": \"https://link-to-contact-support.com/\", \"hide_contact_support_url\": false, \"hide_logo_url\" : false } } ``` + * @param createEmailCustomizationRequest + */ + createEmailCustomization(createEmailCustomizationRequest: CreateEmailCustomizationRequest, _options?: Configuration): Promise; + /** + * Version: 9.0.0.cl or later Creates an Org object. To use this API, the [Orgs](https://docs.thoughtspot.com/cloud/latest/orgs-overview) feature must be enabled in your cluster. Requires cluster administration (**Can administer Org**) privileges. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `ORG_ADMINISTRATION` (**Can manage Orgs**) privilege is required. + * @param createOrgRequest + */ + createOrg(createOrgRequest: CreateOrgRequest, _options?: Configuration): Promise; + /** + * Version: 9.5.0.cl or later Creates a Role object in ThoughtSpot. Available only if [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance. To create a Role, the `ROLE_ADMINISTRATION` (**Can manage roles**) privilege is required. + * @param createRoleRequest + */ + createRole(createRoleRequest: CreateRoleRequest, _options?: Configuration): Promise; + /** + * Create schedule. Version: 9.4.0.cl or later Creates a Liveboard schedule job. Requires at least edit access to Liveboards. To create a schedule on behalf of another user, you need `ADMINISTRATION` (**Can administer Org**) or `JOBSCHEDULING` (**Can schedule for others**) privilege and edit access to the Liveboard. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `JOBSCHEDULING` (**Can schedule for others**) privilege is required. #### Usage guidelines * The description text is mandatory. The description text appears as **Description: ** in the Liveboard schedule email notifications. * For Liveboards with both charts and tables, schedule creation is only supported in PDF and XLS formats. Schedules created in CSV formats for such Liveboards will fail to run. If `PDF` is set as the `file_format`, enable `pdf_options` to get the correct attachment. Not doing so may cause the attachment to be rendered empty. * To include only specific visualizations, specify the visualization GUIDs in the `visualization_identifiers` array. * You can schedule a Liveboard job to run periodically by setting frequency parameters. You can set the schedule to run daily, weekly, monthly or every n minutes or hours. The scheduled job can also be configured to run at a specific time of the day or on specific days of the week or month. Please ensure that when setting the schedule frequency for _minute of the object_, only values that are multiples of 5 are included. * If the `frequency` parameters are defined, you can set the time zone to a value that matches your server\'s time zone. For example, `US/Central`, `Etc/UTC`, `CET`. The default time zone is `America/Los_Angeles`. For more information about Liveboard jobs, see [ThoughtSpot Product Documentation](https://docs.thoughtspot.com/cloud/latest/liveboard-schedule). + * @param createScheduleRequest + */ + createSchedule(createScheduleRequest: CreateScheduleRequest, _options?: Configuration): Promise; + /** + * Version: 9.0.0.cl or later Creates a tag object. Tags are labels that identify a metadata object. For example, you can create a tag to designate subject areas, such as sales, HR, marketing, and finance. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `TAGMANAGEMENT` (**Can manage tags**) privilege is required to create, edit, and delete tags. + * @param createTagRequest + */ + createTag(createTagRequest: CreateTagRequest, _options?: Configuration): Promise; + /** + * Version: 9.0.0.cl or later Creates a user in ThoughtSpot. The API endpoint allows you to configure several user properties such as email address, account status, share notification preferences, and sharing visibility. You can provision the user to [groups](https://docs.thoughtspot.com/cloud/latest/groups-privileges) and [Orgs](https://docs.thoughtspot.com/cloud/latest/orgs-overview). You can also add Liveboard, Answer, and Worksheet objects to the user’s favorites list, assign a default Liveboard for the user, and set user preferences. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `USER_ADMINISTRATION` (**Can manage users**) privilege is required. + * @param createUserRequest + */ + createUser(createUserRequest: CreateUserRequest, _options?: Configuration): Promise; + /** + * Version: 9.0.0.cl or later Creates a group object in ThoughtSpot. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `GROUP_ADMINISTRATION` (**Can manage groups**) privilege is required. #### About groups Groups in ThoughtSpot are used by the administrators to define privileges and organize users based on their roles and access requirements. To know more about groups and privileges, see [ThoughtSpot Product Documentation](https://docs.thoughtspot.com/cloud/latest/groups-privileges). #### Supported operations The API endpoint lets you perform the following operations: * Assign privileges * Add users * Define sharing visibility * Add sub-groups * Assign a default Liveboard + * @param createUserGroupRequest + */ + createUserGroup(createUserGroupRequest: CreateUserGroupRequest, _options?: Configuration): Promise; + /** + * Create a variable which can be used for parameterizing metadata objects Version: 26.4.0.cl or later Allows creating a variable which can be used for parameterizing metadata objects in ThoughtSpot. Requires ADMINISTRATION role and TENANT scope. The CAN_MANAGE_VARIABLES permission allows you to manage Formula Variables in the current organization scope. The API endpoint supports the following types of variables: * CONNECTION_PROPERTY - For connection properties * TABLE_MAPPING - For table mappings * CONNECTION_PROPERTY_PER_PRINCIPAL - For connection properties per principal. In order to use this please contact support to enable this. * FORMULA_VARIABLE - For Formula variables, introduced in 10.15.0.cl When creating a variable, you need to specify: * The variable type * A unique name for the variable * Whether the variable contains sensitive values (defaults to false) * The data type of the variable, only specify for formula variables (defaults to null) The operation will fail if: * The user lacks required permissions * The variable name already exists * The variable type is invalid + * @param createVariableRequest + */ + createVariable(createVariableRequest: CreateVariableRequest, _options?: Configuration): Promise; + /** + * Version: 10.14.0.cl or later Creates a new webhook configuration to receive notifications for specified events. The webhook will be triggered when the configured events occur in the system. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) or `DEVELOPER` (**Has developer privilege**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, users with `CAN_MANAGE_WEBHOOKS` (**Can manage webhooks**) privilege are also authorized to perform this action. + * @param createWebhookConfigurationRequest + */ + createWebhookConfiguration(createWebhookConfigurationRequest: CreateWebhookConfigurationRequest, _options?: Configuration): Promise; + /** + * Version: 9.9.0.cl or later Creates a DBT connection object in ThoughtSpot. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege or `DATAMANAGEMENT` (**Can manage data**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the following Data control privileges may be required: - `CAN_MANAGE_CUSTOM_CALENDAR`(**Can manage custom calendars**) - `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) - `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` (**Can manage data models**) #### About create DBT connection DBT connection in ThoughtSpot is used by the user to define DBT credentials for cloud . The API needs embrace connection, embrace database name, DBT url, import type, DBT account identifier, DBT project identifier, DBT access token and environment details (or) embrace connection, embrace database name, import type, file_content to create a connection object. To know more about DBT, see ThoughtSpot Product Documentation. + * @param connectionName Name of the connection. + * @param databaseName Name of the Database. + * @param importType Mention type of Import + * @param accessToken Access token is mandatory when Import_Type is DBT_CLOUD. + * @param dbtUrl DBT URL is mandatory when Import_Type is DBT_CLOUD. + * @param accountId Account ID is mandatory when Import_Type is DBT_CLOUD + * @param projectId Project ID is mandatory when Import_Type is DBT_CLOUD + * @param dbtEnvId DBT Environment ID\\\" + * @param projectName Name of the project + * @param fileContent Upload DBT Manifest and Catalog artifact files as a ZIP file. This field is Mandatory when Import Type is \\\'ZIP_FILE\\\' + */ + dbtConnection(connectionName: string, databaseName: string, importType?: string, accessToken?: string, dbtUrl?: string, accountId?: string, projectId?: string, dbtEnvId?: string, projectName?: string, fileContent?: HttpFile, _options?: Configuration): Promise; + /** + * Version: 9.9.0.cl or later Resynchronize the existing list of models, tables, worksheet tml’s and import them to Thoughtspot based on the DBT connection object. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege or `DATAMANAGEMENT` (**Can manage data**) privilege, along with an existing DBT connection. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the following data control privileges may be required: - `CAN_MANAGE_CUSTOM_CALENDAR`(**Can manage custom calendars**) - `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) - `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` (**Can manage data models**) + * @param dbtConnectionIdentifier Unique ID of the DBT connection. + * @param fileContent Upload DBT Manifest and Catalog artifact files as a ZIP file. This field is mandatory if the connection was created with import_type ‘ZIP_FILE’ + */ + dbtGenerateSyncTml(dbtConnectionIdentifier: string, fileContent?: HttpFile, _options?: Configuration): Promise; + /** + * Version: 9.9.0.cl or later Generate required table and worksheet and import them. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege or `DATAMANAGEMENT` (**Can manage data**) privilege, along with an existing DBT connection. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the following data control privileges may be required: - `CAN_MANAGE_CUSTOM_CALENDAR`(**Can manage custom calendars**) - `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) - `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` (**Can manage data models**) #### About generate TML Models and Worksheets to be imported can be selected by the user as part of the API. + * @param dbtConnectionIdentifier Unique ID of the DBT connection. + * @param modelTables List of Models and their respective Tables Example: \\\'[{\\\"model_name\\\": \\\"model_name\\\", \\\"tables\\\": [\\\"table_name\\\"]}]\\\' + * @param importWorksheets Mention the worksheet tmls to import + * @param worksheets List of worksheets is mandatory when import_Worksheets is type SELECTED Example: [\\\"worksheet_name\\\"] + * @param fileContent Upload DBT Manifest and Catalog artifact files as a ZIP file. This field is mandatory if the connection was created with import_type ‘ZIP_FILE’ + */ + dbtGenerateTml(dbtConnectionIdentifier: string, modelTables: string, importWorksheets: string, worksheets?: string, fileContent?: HttpFile, _options?: Configuration): Promise; + /** + * Version: 9.9.0.cl or later Gets a list of DBT connection objects by user and organization, available on the ThoughtSpot system. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege or `DATAMANAGEMENT` (**Can manage data**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the following Data control privileges may be required: - `CAN_MANAGE_CUSTOM_CALENDAR`(**Can manage custom calendars**) - `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) - `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` (**Can manage data models**) #### About search DBT connection To get details of a specific DBT connection identifier, database connection identifier, database connection name, database name, project name, project identifier, environment identifier , import type and author. + */ + dbtSearch(_options?: Configuration): Promise>; + /** + * Version: 9.7.0.cl or later Deactivates a user account. Requires `ADMINISTRATION` (**Can administer Thoughtspot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `USER_ADMINISTRATION` (**Can manage users**) privilege is required. To deactivate a user account, the API request body must include the following information: - Username or the GUID of the user account - Base URL of the ThoughtSpot instance If the API request is successful, ThoughtSpot returns the activation URL in the response. The activation URL is valid for 14 days and can be used to re-activate the account and reset the password of the deactivated account. + * @param deactivateUserRequest + */ + deactivateUser(deactivateUserRequest: DeactivateUserRequest, _options?: Configuration): Promise; + /** + * Version: 10.12.0.cl or later Deletes a [custom calendar](https://docs.thoughtspot.com/cloud/latest/connections-cust-cal). Requires `DATAMANAGEMENT` (**Can manage data**) or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your ThoughtSpot instance, the `CAN_MANAGE_CUSTOM_CALENDAR` (**Can manage custom calendars**) privilege is required. #### Usage guidelines To delete a custom calendar, specify the calendar ID as a path parameter in the request URL. + * @param calendarIdentifier Unique ID or name of the Calendar. + */ + deleteCalendar(calendarIdentifier: string, _options?: Configuration): Promise; + /** + * Version: 26.4.0.cl or later Deletes one or more collections from ThoughtSpot. #### Delete options * **delete_children**: When set to `true`, deletes the child objects (metadata items) within the collection that the user has access to. Objects that the user does not have permission to delete will be skipped. * **dry_run**: When set to `true`, performs a preview of the deletion operation without actually deleting anything. The response shows what would be deleted, allowing you to review before committing the deletion. #### Response The response includes: * **metadata_deleted**: List of metadata objects that were successfully deleted * **metadata_skipped**: List of metadata objects that were skipped due to lack of permissions or other constraints + * @param deleteCollectionRequest + */ + deleteCollection(deleteCollectionRequest: DeleteCollectionRequest, _options?: Configuration): Promise; + /** + * Version: 9.2.0.cl or later Deletes Git repository configuration from your ThoughtSpot instance. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance on your instance, the `CAN_SETUP_VERSION_CONTROL` (**Can set up version control**) privilege. + * @param deleteConfigRequest + */ + deleteConfig(deleteConfigRequest: DeleteConfigRequest, _options?: Configuration): Promise; + /** + * Version: 9.2.0.cl or later **Important**: This endpoint is deprecated and will be removed from ThoughtSpot in September 2025. ThoughtSpot strongly recommends using the [Delete Connection V2](#/http/api-endpoints/connections/delete-connection-v2) endpoint to delete your connection objects. #### Usage guidelines Deletes a connection object. Requires `DATAMANAGEMENT` (**Can manage data**) and edit permissions to the connection object, or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) privilege is required. **Note**: If a connection has dependent objects, make sure you remove its associations before the delete operation. + * @param deleteConnectionRequest + */ + deleteConnection(deleteConnectionRequest: DeleteConnectionRequest, _options?: Configuration): Promise; + /** + * Version: 10.12.0.cl or later Deletes connection configuration objects. Requires `DATAMANAGEMENT` (**Can manage data**) and edit permissions to the connection object, or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) privilege is required. + * @param deleteConnectionConfigurationRequest + */ + deleteConnectionConfiguration(deleteConnectionConfigurationRequest: DeleteConnectionConfigurationRequest, _options?: Configuration): Promise; + /** + * Version: 10.4.0.cl or later Deletes a connection object. **Note**: If a connection has dependent objects, make sure you remove its associations before the delete operation. Requires `DATAMANAGEMENT` (**Can manage data**) and edit permissions to the connection object, or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) privilege is required. + * @param connectionIdentifier Unique ID or name of the connection. + */ + deleteConnectionV2(connectionIdentifier: string, _options?: Configuration): Promise; + /** + * Version: 9.6.0.cl or later Removes the custom action specified in the API request. Requires `DEVELOPER` (**Has Developer privilege**) or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `DEVELOPER` (**Has developer privilege**) privilege is required. + * @param customActionIdentifier Unique ID or name of the custom action. + */ + deleteCustomAction(customActionIdentifier: string, _options?: Configuration): Promise; + /** + * Version: 9.9.0.cl or later Removes the specified DBT connection object from the ThoughtSpot system. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) or `DATAMANAGEMENT` (**Can manage data ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the following Data control privileges may be required: - `CAN_MANAGE_CUSTOM_CALENDAR`(**Can manage custom calendars**) - `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) - `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` (**Can manage data models**) + * @param dbtConnectionIdentifier Unique ID of the DBT Connection. + */ + deleteDbtConnection(dbtConnectionIdentifier: string, _options?: Configuration): Promise; + /** + * Version: 10.10.0.cl or later Deletes the configuration for the email customization. #### Pre-requisites Requires `DEVELOPER` (**has developer privilege**) or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `DEVELOPER` (**Has developer privilege**) privilege is required. **NOTE**:This endpoint in currently in beta. Contact ThoughtSpot support to enable this on your instance. #### Usage guidelines - Call the search API endpoint to get the `template_identifier` from the response. - Use that `template_identifier` as a parameter in this API request. + * @param templateIdentifier Unique ID or name of the email customization. + */ + deleteEmailCustomization(templateIdentifier: string, _options?: Configuration): Promise; + /** + * Version: 9.0.0.cl or later Removes the specified metadata object from the ThoughtSpot system. Requires edit access to the metadata object. + * @param deleteMetadataRequest + */ + deleteMetadata(deleteMetadataRequest: DeleteMetadataRequest, _options?: Configuration): Promise; + /** + * Version: 9.0.0.cl or later Deletes an Org object from the ThoughtSpot system. Requires cluster administration (**Can administer Org**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `ORG_ADMINISTRATION` (**Can manage Orgs**) privilege is required. When you delete an Org, all its users and objects created in that Org context are removed. However, if the users in the deleted Org also exists in other Orgs, they are removed only from the deleted Org. + * @param orgIdentifier ID or name of the Org + */ + deleteOrg(orgIdentifier: string, _options?: Configuration): Promise; + /** + * Version: 10.12.0.cl or later Deletes the configuration for the email customization. #### Pre-requisites Requires `DEVELOPER` (**has developer privilege**) or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `DEVELOPER` (**Has developer privilege**) privilege is required. **NOTE**:This endpoint in currently in beta. Contact ThoughtSpot support to enable this on your instance. #### Usage guidelines - Call the search API endpoint to get the `org_identifier` from the response. - Use that `org_identifier` as a parameter in this API request. + * @param deleteOrgEmailCustomizationRequest + */ + deleteOrgEmailCustomization(deleteOrgEmailCustomizationRequest: DeleteOrgEmailCustomizationRequest, _options?: Configuration): Promise; + /** + * Version: 9.5.0.cl or later Deletes a Role object from the ThoughtSpot system. Available only if [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance. To delete a Role, the `ROLE_ADMINISTRATION` (**Can manage roles**) privilege is required. + * @param roleIdentifier Unique ID or name of the Role. ReadOnly roles cannot be deleted. + */ + deleteRole(roleIdentifier: string, _options?: Configuration): Promise; + /** + * Deletes a scheduled job. Version: 9.4.0.cl or later Deletes a scheduled Liveboard job. Requires at least edit access to Liveboard or `ADMINISTRATION` (**Can administer Org**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `JOBSCHEDULING` (**Can schedule for others**) privilege is required. + * @param scheduleIdentifier Unique ID or name of the scheduled job. + */ + deleteSchedule(scheduleIdentifier: string, _options?: Configuration): Promise; + /** + * Version: 9.0.0.cl or later Deletes a tag object from the ThoughtSpot system Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `TAGMANAGEMENT` (**Can manage tags**) privilege is required to create, edit, and delete tags. + * @param tagIdentifier Tag identifier Tag name or Tag id. + */ + deleteTag(tagIdentifier: string, _options?: Configuration): Promise; + /** + * Version: 9.0.0.cl or later Deletes a user from the ThoughtSpot system. If you want to remove a user from a specific Org but not from ThoughtSpot, update the group and Org mapping properties of the user object via a POST API call to the [/api/rest/2.0/users/{user_identifier}/update](#/http/api-endpoints/users/update-user) endpoint. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `USER_ADMINISTRATION` (**Can manage users**) privilege is required. + * @param userIdentifier GUID / name of the user + */ + deleteUser(userIdentifier: string, _options?: Configuration): Promise; + /** + * Version: 9.0.0.cl or later Removes the specified group object from the ThoughtSpot system. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `GROUP_ADMINISTRATION` (**Can manage groups**) privilege is required. + * @param groupIdentifier GUID or name of the group. + */ + deleteUserGroup(groupIdentifier: string, _options?: Configuration): Promise; + /** + * Delete a variable Version: 10.14.0.cl or later **Note:** This API endpoint is deprecated and will be removed from ThoughtSpot in a future release. Use [POST /api/rest/2.0/template/variables/delete](/api/rest/2.0/template/variables/delete) instead. Allows deleting a variable from ThoughtSpot. Requires ADMINISTRATION role and TENANT scope. The CAN_MANAGE_VARIABLES permission allows you to manage Formula Variables in the current organization scope. The API endpoint requires: * The variable identifier (ID or name) The operation will fail if: * The user lacks required permissions * The variable doesn\'t exist * The variable is being used by other objects + * @param identifier Unique id or name of the variable + */ + deleteVariable(identifier: string, _options?: Configuration): Promise; + /** + * Delete variable(s) Version: 26.4.0.cl or later Allows deleting multiple variables from ThoughtSpot. Requires ADMINISTRATION role and TENANT scope. The CAN_MANAGE_VARIABLES permission allows you to manage Formula Variables in the current organization scope. The API endpoint requires: * The variable identifiers (IDs or names) The operation will fail if: * The user lacks required permissions * Any of the variables don\'t exist * Any of the variables are being used by other objects + * @param deleteVariablesRequest + */ + deleteVariables(deleteVariablesRequest: DeleteVariablesRequest, _options?: Configuration): Promise; + /** + * Version: 10.14.0.cl or later Deletes one or more webhook configurations by their unique id or name. Returns status of each deletion operation, including successfully deleted webhooks and any failures with error details. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) or `DEVELOPER` (**Has developer privilege**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, users with `CAN_MANAGE_WEBHOOKS` (**Can manage webhooks**) privilege are also authorized to perform this action. + * @param deleteWebhookConfigurationsRequest + */ + deleteWebhookConfigurations(deleteWebhookConfigurationsRequest: DeleteWebhookConfigurationsRequest, _options?: Configuration): Promise; + /** + * Version: 9.2.0.cl or later Allows you to deploy a commit and publish TML content to your ThoughtSpot instance. Requires at least edit access to the objects used in the deploy operation. The API deploys the head of the branch unless a `commit_id` is specified in the API request. If the branch name is not defined in the request, the default branch is considered for deploying commits. For more information, see [Git integration documentation](https://developers.thoughtspot.com/docs/git-integration). + * @param deployCommitRequest + */ + deployCommit(deployCommitRequest: DeployCommitRequest, _options?: Configuration): Promise>; + /** + * Version: 9.9.0.cl or later Exports the difference in connection metadata between CDW and ThoughtSpot Requires `DATAMANAGEMENT` (**Can manage data**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the following Data control privileges may be required: - `CAN_MANAGE_CUSTOM_CALENDAR`(**Can manage custom calendars**) - `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) - `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` (**Can manage data models**) To download the connection metadata difference between ThoughtSpot and CDW, pass the connection GUID as `connection_identifier` in the API request. + * @param connectionIdentifier GUID of the connection + */ + downloadConnectionMetadataChanges(connectionIdentifier: string, _options?: Configuration): Promise; + /** + * Version: 9.0.0.cl or later Exports an Answer in the given file format. You can download the Answer data as a PDF, PNG, CSV, or XLSX file. Requires at least view access to the Answer. #### Usage guidelines In the request body, specify the GUID or name of the Answer and set `file_format`. The default file format is CSV. Use the `type` parameter to specify whether the Answer being exported is a saved Answer (`SAVED`) or a pinned Answer on a Liveboard (`PINNED`). Defaults to `SAVED`. When using `PINNED`, the `metadata_identifier` must be the container id. **NOTE**: * The downloadable file returned in API response file is extensionless. Please rename the downloaded file by typing in the relevant extension. * HTML rendering is not supported for PDF exports of Answers with tables. Optionally, you can define [runtime overrides](https://developers.thoughtspot.com/docs/fetch-data-and-report-apis#_runtime_overrides) to apply to the Answer data. + * @param exportAnswerReportRequest + */ + exportAnswerReport(exportAnswerReportRequest: ExportAnswerReportRequest, _options?: Configuration): Promise; + /** + * Version: 9.0.0.cl or later Exports a Liveboard and its visualizations in PDF, PNG, CSV, or XLSX file format. The default `file_format` is CSV. Requires at least view access to the Liveboard. #### Usage guidelines In the request body, specify the GUID or name of the Liveboard. To generate a Liveboard report with specific visualizations, add GUIDs or names of the visualizations. **NOTE**: * The downloadable file returned in API response file is extensionless. Please rename the downloaded file by typing in the relevant extension. * Optionally, you can define [runtime overrides](https://developers.thoughtspot.com/docs/fetch-data-and-report-apis#_runtime_overrides) to apply to the Answer data. * To include unsaved changes in the report, pass the `transient_pinboard_content` script generated from the `getExportRequestForCurrentPinboard` method in the Visual Embed SDK. Upon successful execution, the API returns the report with unsaved changes, including ad hoc changes to visualizations. For more information, see [Liveboard Report API](https://developers.thoughtspot.com/docs/fetch-data-and-report-apis#_liveboard_report_api). * Starting with ThoughtSpot Cloud 10.9.0.cl release, the Liveboard can be exported in the PNG format in the resolution of your choice. To enable this on your instance, contact ThoughtSpot support. When this feature is enabled, the options `include_cover_page`,`include_filter_page` within the `png_options` will not be available for PNG exports. * Starting with the ThoughtSpot Cloud 26.2.0.cl release, * Liveboards can be exported in CSV format. * All visualizations within a Liveboard can be exported as individual CSV files. * When exporting multiple visualizations or the entire Liveboard, the system returns the report as a compressed ZIP file containing the separate CSV files for each visualization. * Liveboards can also be exported in XLSX format. * All selected visualizations are consolidated into a single Excel workbook (.xlsx), with each visualization placed in its own worksheet (tab). * XLSX exports are limited to a maximum of 255 worksheets (tabs) per workbook. + * @param exportLiveboardReportRequest + */ + exportLiveboardReport(exportLiveboardReportRequest: ExportLiveboardReportRequest, _options?: Configuration): Promise; + /** + * Version: 9.0.0.cl or later Exports the [TML](https://docs.thoughtspot.com/cloud/latest/tml) representation of metadata objects in JSON or YAML format. Requires `DATADOWNLOADING` (**Can download Data**) and at least view access to the metadata object. #### Usage guidelines * You can export one or several objects by passing metadata object GUIDs in the `metadata` array. * When exporting TML content for a Liveboard or Answer object, you can set `export_associated` to `true` to retrieve TML content for underlying Worksheets, Tables, or Views, including the GUID of each object within the headers. When `export_associated` is set to `true`, consider retrieving one metadata object at a time. * Set `export_fqns` to `true` to add FQNs of the referenced objects in the TML content. For example, if you send an API request to retrieve TML for a Liveboard and its associated objects, the API returns the TML content with FQNs of the referenced Worksheet. Exporting TML with FQNs is useful if ThoughtSpot has multiple objects with the same name and you want to eliminate ambiguity when importing TML files into ThoughtSpot. It eliminates the need for adding FQNs of the referenced objects manually during the import operation. * To export only the TML of feedbacks associated with an object, set the GUID of the object as `identifier`, and set the `type` as `FEEDBACK` in the `metadata` array. * To export the TML of an object along with the feedbacks associated with it, set the GUID of the object as `identifier`, set the `type` as `LOGIAL_TABLE` in the `metadata` array, and set `export_with_associated_feedbacks` in `export_options` to true. For more information, see [TML Documentation](https://developers.thoughtspot.com/docs/tml#_export_a_tml). For more information on feedbacks, see [Feedback Documentation](https://docs.thoughtspot.com/cloud/latest/sage-feedback). + * @param exportMetadataTMLRequest + */ + exportMetadataTML(exportMetadataTMLRequest: ExportMetadataTMLRequest, _options?: Configuration): Promise>; + /** + * Version: 10.1.0.cl or later Exports the [TML](https://docs.thoughtspot.com/cloud/latest/tml) representation of metadata objects in JSON or YAML format. ### **Permissions Required** Requires `DATAMANAGEMENT` (**Can manage data**) and `USERMANAGEMENT` (**Can manage users**) privileges. #### **Usage Guidelines** This API is only applicable for `USER`, `GROUP`, and `ROLES` metadata types. - `batch_offset` Indicates the starting position within the complete dataset from which the API should begin returning objects. Useful for paginating results efficiently. - `batch_size` Specifies the number of objects or items to retrieve in a single request. Helps control response size for better performance. - `edoc_format` Defines the format of the TML content. The exported metadata can be in JSON or YAML format. - `export_dependent` Specifies whether to include dependent metadata objects in the export. Ensures related objects are also retrieved if needed. - `all_orgs_override` Indicates whether the export operation applies across all organizations. Useful for multi-tenant environments where cross-org exports are required. + * @param exportMetadataTMLBatchedRequest + */ + exportMetadataTMLBatched(exportMetadataTMLBatchedRequest: ExportMetadataTMLBatchedRequest, _options?: Configuration): Promise; + /** + * Version: 9.0.0.cl or later Fetches data from a saved Answer. Requires at least view access to the saved Answer. The `record_size` attribute determines the number of records to retrieve in an API call. For more information about pagination, record size, and maximum row limit, see [Pagination and record size settings](https://developers.thoughtspot.com/docs/fetch-data-and-report-apis#_pagination_settings_for_data_and_report_apis). + * @param fetchAnswerDataRequest + */ + fetchAnswerData(fetchAnswerDataRequest: FetchAnswerDataRequest, _options?: Configuration): Promise; + /** + * Version: 9.0.0.cl or later Fetches the underlying SQL query data for an Answer object. Requires at least view access to the Answer object. Upon successful execution, the API returns the SQL queries for the specified object as shown in this example: ``` { \"metadata_id\":\"8fbe44a8-46ad-4b16-8d39-184b2fada490\", \"metadata_name\":\"Total sales\", \"metadata_type\":\"ANSWER\", \"sql_queries\":[ { \"metadata_id\":\"8fbe44a8-46ad-4b16-8d39-184b2fada490\", \"metadata_name\":\"Total sales -test\", \"sql_query\":\"SELECT \\n \\\"ta_1\\\".\\\"REGION\\\" \\\"ca_1\\\", \\n \\\"ta_2\\\".\\\"PRODUCTNAME\\\" \\\"ca_2\\\", \\n \\\"ta_1\\\".\\\"STORENAME\\\" \\\"ca_3\\\", \\n CASE\\n WHEN sum(\\\"ta_3\\\".\\\"SALES\\\") IS NOT NULL THEN sum(\\\"ta_3\\\".\\\"SALES\\\")\\n ELSE 0\\n END \\\"ca_4\\\", \\n CASE\\n WHEN sum(\\\"ta_3\\\".\\\"QUANTITYPURCHASED\\\") IS NOT NULL THEN sum(\\\"ta_3\\\".\\\"QUANTITYPURCHASED\\\")\\n ELSE 0\\n END \\\"ca_5\\\"\\nFROM \\\"RETAILAPPAREL\\\".\\\"PUBLIC\\\".\\\"FACT_RETAPP_SALES\\\" \\\"ta_3\\\"\\n JOIN \\\"RETAILAPPAREL\\\".\\\"PUBLIC\\\".\\\"DIM_RETAPP_STORES\\\" \\\"ta_1\\\"\\n ON \\\"ta_3\\\".\\\"STOREID\\\" = \\\"ta_1\\\".\\\"STOREID\\\"\\n JOIN \\\"RETAILAPPAREL\\\".\\\"PUBLIC\\\".\\\"DIM_RETAPP_PRODUCTS\\\" \\\"ta_2\\\"\\n ON \\\"ta_3\\\".\\\"PRODUCTID\\\" = \\\"ta_2\\\".\\\"PRODUCTID\\\"\\nGROUP BY \\n \\\"ca_1\\\", \\n \\\"ca_2\\\", \\n \\\"ca_3\\\"\\n\" } ] } ``` + * @param fetchAnswerSqlQueryRequest + */ + fetchAnswerSqlQuery(fetchAnswerSqlQueryRequest: FetchAnswerSqlQueryRequest, _options?: Configuration): Promise; + /** + * Version: 10.4.0.cl or later Gets information about the status of the TML async import task scheduled using the `/api/rest/2.0/metadata/tml/async/import` API call. To fetch the task details, specify the ID of the TML async import task. Requires access to the task ID. The API allows users who initiated the asynchronous TML import via `/api/rest/2.0/metadata/tml/async/import` to view the status of their tasks. Users with administration privilege can view the status of all import tasks initiated by the users in their Org. #### Usage guidelines See [TML API Documentation](https://developers.thoughtspot.com/docs/tml#_fetch_status_of_the_tml_import_task) for usage guidelines. + * @param fetchAsyncImportTaskStatusRequest + */ + fetchAsyncImportTaskStatus(fetchAsyncImportTaskStatusRequest: FetchAsyncImportTaskStatusRequest, _options?: Configuration): Promise; + /** + * Version: 10.12.0.cl or later Fetches column security rules for specified tables. This API endpoint retrieves column-level security rules configured for tables. It returns information about which columns are secured and which groups have access to those columns. #### Usage guidelines - Provide an array of table identifiers using either `identifier` (GUID or name) or `obj_identifier` (object ID) - At least one of `identifier` or `obj_identifier` must be provided for each table - The API returns column security rules for all specified tables - Users must have appropriate permissions to access security rules for the specified tables #### Required permissions - `ADMINISTRATION` - Can administer ThoughtSpot - `DATAMANAGEMENT` - Can manage data - `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` - Can manage worksheet views and tables #### Example request ```json { \"tables\": [ { \"identifier\": \"table-guid\", \"obj_identifier\": \"table-object-id\" } ] } ``` #### Response format The API returns an array of `ColumnSecurityRuleResponse` objects wrapped in a `data` field. Each `ColumnSecurityRuleResponse` object contains: - Table information (GUID and object ID) - Array of column security rules with column details, group access, and source table information #### Example response ```json { \"data\": [ { \"guid\": \"table-guid\", \"objId\": \"table-object-id\", \"columnSecurityRules\": [ { \"column\": { \"id\": \"col_123\", \"name\": \"Salary\" }, \"groups\": [ { \"id\": \"group_1\", \"name\": \"HR Department\" } ], \"sourceTableDetails\": { \"id\": \"source-table-guid\", \"name\": \"Employee_Data\" } } ] } ] } ``` + * @param fetchColumnSecurityRulesRequest + */ + fetchColumnSecurityRules(fetchColumnSecurityRulesRequest: FetchColumnSecurityRulesRequest, _options?: Configuration): Promise>; + /** + * Version: 9.9.0.cl or later Validates the difference in connection metadata between CDW and ThoughtSpot. Requires `DATAMANAGEMENT` (**Can manage data**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the following Data control privileges may be required: - `CAN_MANAGE_CUSTOM_CALENDAR`(**Can manage custom calendars**) - `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) - `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` (**Can manage data models**) Returns a boolean indicating whether there is any difference between the connection metadata at ThoughtSpot and CDW. To get the connection metadata difference status, pass the connection GUID as `connection_identifier` in the API request. + * @param connectionIdentifier GUID of the connection + */ + fetchConnectionDiffStatus(connectionIdentifier: string, _options?: Configuration): Promise; + /** + * Version: 9.0.0.cl or later Gets data from a Liveboard object and its visualization. Requires at least view access to the Liveboard. #### Usage guidelines In the request body, specify the GUID or name of the Liveboard. To get data for specific visualizations, add the GUIDs or names of the visualizations in the API request. To include unsaved changes in the report, pass the `transient_pinboard_content` script generated from the `getExportRequestForCurrentPinboard` method in the Visual Embed SDK. Upon successful execution, the API returns the report with unsaved changes. If the new Liveboard experience mode, the transient content includes ad hoc changes to visualizations such as sorting, toggling of legends, and data drill down. For more information, and see [Liveboard data API](https://developers.thoughtspot.com/docs/fetch-data-and-report-apis#_fetch_liveboard_data_api). + * @param fetchLiveboardDataRequest + */ + fetchLiveboardData(fetchLiveboardDataRequest: FetchLiveboardDataRequest, _options?: Configuration): Promise; + /** + * Version: 9.0.0.cl or later Fetches the underlying SQL query data for a Liveboard object and its visualizations. Requires at least view access to the Liveboard object. To get SQL query data for a Liveboard, specify the GUID of the Liveboard. Optionally, you can add an array of visualization GUIDs to retrieve the SQL query data for visualizations in the Liveboard. Upon successful execution, the API returns the SQL queries for the specified object as shown in this example: ``` { \"metadata_id\": \"fa68ae91-7588-4136-bacd-d71fb12dda69\", \"metadata_name\": \"Total Sales\", \"metadata_type\": \"LIVEBOARD\", \"sql_queries\": [ { \"metadata_id\": \"b3b6d2b9-089a-490c-8e16-b144650b7843\", \"metadata_name\": \"Total quantity purchased, Total sales by region\", \"sql_query\": \"SELECT \\n \\\"ta_1\\\".\\\"REGION\\\" \\\"ca_1\\\", \\n CASE\\n WHEN sum(\\\"ta_2\\\".\\\"QUANTITYPURCHASED\\\") IS NOT NULL THEN sum(\\\"ta_2\\\".\\\"QUANTITYPURCHASED\\\")\\n ELSE 0\\n END \\\"ca_2\\\", \\n CASE\\n WHEN sum(\\\"ta_2\\\".\\\"SALES\\\") IS NOT NULL THEN sum(\\\"ta_2\\\".\\\"SALES\\\")\\n ELSE 0\\n END \\\"ca_3\\\"\\nFROM \\\"RETAILAPPAREL\\\".\\\"PUBLIC\\\".\\\"FACT_RETAPP_SALES\\\" \\\"ta_2\\\"\\n JOIN \\\"RETAILAPPAREL\\\".\\\"PUBLIC\\\".\\\"DIM_RETAPP_STORES\\\" \\\"ta_1\\\"\\n ON \\\"ta_2\\\".\\\"STOREID\\\" = \\\"ta_1\\\".\\\"STOREID\\\"\\nGROUP BY \\\"ca_1\\\"\" } ] } ``` + * @param fetchLiveboardSqlQueryRequest + */ + fetchLiveboardSqlQuery(fetchLiveboardSqlQueryRequest: FetchLiveboardSqlQueryRequest, _options?: Configuration): Promise; + /** + * Version: 9.0.0.cl or later Fetches security audit logs. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the [Admin Control](https://developers.thoughtspot.com/docs/rbac#_admin_control) privileges are required. #### Usage guidelines By default, the API retrieves logs for the last 24 hours. You can set a custom duration in EPOCH time. Make sure the log duration specified in your API request doesn’t exceed 24 hours. If you must fetch logs for a longer time range, modify the duration and make multiple sequential API requests. Upon successful execution, the API returns logs with the following information: * timestamp of the event * event ID * event type * name and GUID of the user * IP address of ThoughtSpot instance For more information see [Audit logs Documentation](https://developers.thoughtspot.com/docs/audit-logs). + * @param fetchLogsRequest + */ + fetchLogs(fetchLogsRequest: FetchLogsRequest, _options?: Configuration): Promise>; + /** + * Version: 26.3.0.cl or later This API fetches the object privileges present for the given list of principals (user or group), on the given set of objects. It supports pagination, which can be enabled and configured using the request parameters. It provides users access to certain features based on privilege based access control. #### Usage guidelines - Specify the `type` (`USER` or `USER_GROUP`) and `identifier` (either GUID or name) of the principals for which you want to retrieve object privilege information in the `principals` array. - Specify the `type` (`LOGICAL_TABLE`) and `identifier` (either GUID or name) of the metadata objects for which you want to retrieve object privilege information in the `metadata` array. Only `LOGICAL_TABLE` metadata type is supported for now. It may be extended for other metadata types in future. - To control the offset from where principals have to be fetched, use `record_offset`. When `record_offset` is 0, information is fetched from the beginning. - To control the number of principals to be fetched, use `record_size`. Default `record_size` is 20. - Ensure `record_offset` for a subsequent request is one more than the value of `record_size` of the previous request. - Ensure using correct Authorization Bearer Token corresponding to specific user & org. #### Example request ```json { \"principals\": [ { \"type\": \"type-1\", \"identifier\": \"principal-guid-or-name-1\" }, { \"type\": \"type-2\", \"identifier\": \"principal-guid-or-name-2\" } ], \"metadata\": [ { \"type\": \"metadata-type-1\", \"identifier\": \"metadata-guid-or-name-1\" }, { \"type\": \"metadata-type-2\", \"identifier\": \"metadata-guid-or-name-2\" } ], \"record_offset\": 0, \"record_size\": 20 } ``` #### Response format The API returns an array of `metadata_object_privileges` objects wrapped in JSON. Each `metadata_object_privileges` object contains: - Metadata information (GUID, name and type) - Array of `principal_object_privilege_info`. - Each `principal_object_privilege_info` contains: - Principal type. All principals of this type are listed as described below. - Array of `principal_object_privileges`. - Each `principal_object_privileges` contains: - Principal information (GUID, name, subtype) - List of applied object level privileges. #### Example response ```json { \"metadata_object_privileges\": [ { \"metadata_id\": \"metadata-guid-1\", \"metadata_name\": \"metadata-name-1\", \"metadata_type\": \"metadata-type-1\", \"principal_object_privilege_info\": [ { \"principal_type\": \"principal-type-1\", \"principal_object_privileges\": [ { \"principal_id\": \"principal-guid-1\", \"principal_name\": \"principal-name-1\", \"principal_sub_type\": \"principal-sub-type-1\", \"object_privileges\": \"[object-privilege-1, object-privilege-2]\" }, { \"principal_id\": \"principal-guid-2\", \"principal_name\": \"principal-name-2\", \"principal_sub_type\": \"principal-sub-type-2\", \"object_privileges\": \"[object-privilege-1, object-privilege-2]\" } ] }, { \"principal_type\": \"principal-type-2\", \"principal_object_privileges\": [ { \"principal_id\": \"principal-guid-3\", \"principal_name\": \"principal-guid-4\", \"principal_sub_type\": \"principal-sub-type-4\", \"object_privileges\": \"[object-privilege-1]\" } ] } ] }, { \"metadata_id\": \"metadata-guid-2\", \"metadata_name\": \"metadata-name-2\", \"metadata_type\": \"metadata-type-2\", \"principal_object_privilege_info\": [ { \"principal_type\": \"principal-type-1\", \"principal_object_privileges\": [ { \"principal_id\": \"principal-guid-1\", \"principal_name\": \"principal-name-1\", \"principal_sub_type\": \"principal-sub-type-1\", \"object_privileges\": \"[object-privilege-3, object-privilege-4]\" }, { \"principal_id\": \"principal-guid-2\", \"principal_name\": \"principal-name-2\", \"principal_sub_type\": \"principal-sub-type-2\", \"object_privileges\": \"[object-privilege-4]\" } ] } ] } ] } ``` + * @param fetchObjectPrivilegesRequest + */ + fetchObjectPrivileges(fetchObjectPrivilegesRequest: FetchObjectPrivilegesRequest, _options?: Configuration): Promise; + /** + * Version: 9.0.0.cl or later Fetches object permission details for a given principal object such as a user and group. Requires view access to the metadata object. #### Usage guidelines * To get a list of all metadata objects that a user or group can access, specify the `type` and GUID or name of the principal. * To get permission details for a specific object, add the `type` and GUID or name of the metadata object to your API request. Upon successful execution, the API returns a list of metadata objects and permission details for each object. + * @param fetchPermissionsOfPrincipalsRequest + */ + fetchPermissionsOfPrincipals(fetchPermissionsOfPrincipalsRequest: FetchPermissionsOfPrincipalsRequest, _options?: Configuration): Promise; + /** + * Version: 9.0.0.cl or later Fetches permission details for a given metadata object. Requires view access to the metadata object. #### Usage guidelines * To fetch a list of users and groups for a metadata object, specify `type` and GUID or name of the metadata object. * To get permission details for a specific user or group, add `type` and GUID or name of the principal object to your API request. Upon successful execution, the API returns permission details and principal information for the object specified in the API request. + * @param fetchPermissionsOnMetadataRequest + */ + fetchPermissionsOnMetadata(fetchPermissionsOnMetadataRequest: FetchPermissionsOnMetadataRequest, _options?: Configuration): Promise; + /** + * Version: 9.0.0.cl or later Enforces logout on current user sessions. Use this API with caution as it may invalidate active user sessions and force users to re-login. Make sure you specify the usernames or GUIDs. If you pass null values in the API call, all user sessions on your cluster become invalid, and the users are forced to re-login. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `USER_ADMINISTRATION` (**Can manage users**) privilege is required. + * @param forceLogoutUsersRequest + */ + forceLogoutUsers(forceLogoutUsersRequest: ForceLogoutUsersRequest, _options?: Configuration): Promise; + /** + * Version: 10.12.0.cl or later Exports a [custom calendar](https://docs.thoughtspot.com/cloud/latest/connections-cust-cal) in the CSV format. Requires `DATAMANAGEMENT` (**Can manage data**) or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your ThoughtSpot instance, the `CAN_MANAGE_CUSTOM_CALENDAR` (**Can manage custom calendars**) privilege is required. #### Usage guidelines Use this API to download a custom calendar in the CSV file format. In your API request, specify the following parameters. * Start and end date of the calendar. For \"month offset\" calendars, the start date must match the month defined in the `month_offset` attribute. You can also specify optional parameters such as the starting day of the week and prefixes for the quarter and year labels. + * @param generateCSVRequest + */ + generateCSV(generateCSVRequest: GenerateCSVRequest, _options?: Configuration): Promise; + /** + * Version: 9.0.0.cl or later Retrieves details of the current user session for the token provided in the request header. Any ThoughtSpot user can access this endpoint and send an API request. The data returned in the API response varies according to user\'s privilege and object access permissions. **NOTE**: In ThoughtSpot, users with cluster administration privileges can access all Orgs by default. However, unless the administrator is explicitly added to an Org, the Orgs list in the session information returned by the API will include only the Primary Org. To include other Orgs in the API response, you must explicitly add the administrator to each Org in the Admin settings page in the UI or via user REST API. + */ + getCurrentUserInfo(_options?: Configuration): Promise; + /** + * Version: 9.4.0.cl or later Retrieves details of the current session token for the bearer token provided in the request header. This API endpoint does not create a new token. Instead, it returns details about the token, including the token string, creation time, expiration time, and the associated user. Use this endpoint to introspect your current session token, debug authentication issues, or when a frontend application needs session token details. Any ThoughtSpot user with a valid bearer token can access this endpoint and send an API request + */ + getCurrentUserToken(_options?: Configuration): Promise; + /** + * Version: 10.4.0.cl or later Creates an authentication token that provides values for the formula variables in the Row Level Security (RLS) rules for a given user. Recommended for use cases that require Attribute-based access control (ABAC) via RLS. #### Required privileges To add a new user and assign privileges during auto-creation, the `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege is required. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled, the `CONTROL_TRUSTED_AUTH` (**Can Enable or Disable Trusted Authentication**) privilege and edit access to the data source are required. To configure formula variables for all Orgs on your instance or the Primary Org, cluster administration privileges are required. Org administrators can configure formula variables for their respective Orgs. If Role-Based Access Control (RBAC) is enabled, users with the `CAN_MANAGE_VARIABLES` (**Can manage variables**) role privilege can also create and manage variables for their Org context. #### Usage guidelines You can generate a token by providing a `username` and `password`, or by using a `secret_key`. To generate a `secret_key`, the administrator must enable [Trusted authentication](https://developers.thoughtspot.com/docs/trusted-auth-secret-key) in the **Develop** > **Customizations** > **Security Settings** page. **Note**: * When both `password` and `secret_key` are included in the API request, `password` takes precedence. * If [Multi-Factor Authentication (MFA)](https://docs.thoughtspot.com/cloud/latest/authentication-local-mfa) is enabled on your instance, the API login request with `username` and `password` returns an error. You can switch to token-based authentication with `secret_key` or contact ThoughtSpot Support for assistance. The token obtained from ThoughtSpot is valid for 5 minutes by default. You can configure the token expiration time as required. #### ABAC via RLS To implement ABAC via RLS and assign security entitlements to users during session creation, generate a token with custom variable values. The values set in the authentication token are applied to the formula variables referenced in RLS rules at the table level, which determines the data each user can access based on their entitlements. The variable values can be configured to persist for a specific set of Models in user sessions initiated with the token, allowing different RLS rules to be set for different data models. Once defined, the rules are added to the user\'s `variable_values` object, after which all sessions will use the persisted values. For more information, see [ABAC via tokens Documentation](https://developers.thoughtspot.com/docs/abac-via-rls-variables). ##### Formula variables Before defining variable values, ensure the variables are created and available on your instance. To create a formula variable, you can use the **Create variable** (`/api/rest/2.0/template/variables/create`) REST API endpoint, with the variable `type` set as `Formula_Variable` in the API request. The API doesn\'t support `\"persist_option\": \"RESET\"` and `\"persist_option\": \"NONE\"` when `variable_values` are defined in the request. If you are using `variable_values` for token generation, you must use other supported persist options such as `APPEND` or `REPLACE`. If you want to use `RESET` or `NONE`, do not pass any `variable_values`. In such cases, `variable_values` will remain unaffected. #### Supported objects The supported object type is `LOGICAL_TABLE`. When using `object_id` with `variable_values`, models are supported. #### Just-in-time provisioning For [just-in-time user creation and provisioning](https://developers.thoughtspot.com/docs/just-in-time-provisioning), specify the following attributes in the API request: * `auto_create` * `username` * `display_name` * `email` * `groups` Set `auto_create` to `true` if the username does not exist in ThoughtSpot. If the username already exists in ThoughtSpot and `auto_create` is set to `true`, user properties such as display name, email, Org and group entitlements will not be updated with new values. Setting `auto_create` to `true` does not create formula variables. Hence, this setting will not be applicable to `variable_values`. #### Important point to note All options in the token creation APIs that define user access to data in ThoughtSpot will take effect during token creation, not when the token is used for authentication. For example, `auto_create:true` will create the user when the authentication token is created. Persist options such as `APPEND` and `REPLACE` will persist `variable_values` on the user profile when the token is created. + * @param getCustomAccessTokenRequest + */ + getCustomAccessToken(getCustomAccessTokenRequest: GetCustomAccessTokenRequest, _options?: Configuration): Promise; + /** + * Version: 10.15.0.cl or later Suggests the most relevant data sources for a given natural language query, ranked by confidence with LLM-generated reasoning. Requires `CAN_USE_SPOTTER` privilege and at least view-level access to the underlying metadata entities referenced in the response. #### Usage guidelines The request must include: - `query`: the natural language question to find relevant data sources for If the request is successful, the API returns a ranked list of suggested data sources, each containing: - `confidence`: a float score indicating the model\'s confidence in the relevance of the suggestion - `details`: metadata about the data source - `data_source_identifier`: the unique ID of the data source - `data_source_name`: the display name of the data source - `description`: a description of the data source - `reasoning`: LLM-generated rationale explaining why the data source was recommended #### Error responses | Code | Description | |------|--------------------------------------------------------------------------------------------------------------------------------------------| | 401 | Unauthorized — authentication token is missing, expired, or invalid. | | 403 | Forbidden — the authenticated user does not have `CAN_USE_SPOTTER` privilege or lacks view permission on the underlying metadata entities. | > ###### Note: > * This endpoint is currently in Beta. Breaking changes may be introduced before it is made Generally Available. > * This endpoint requires Spotter — please contact ThoughtSpot Support to enable Spotter on your cluster. + * @param getDataSourceSuggestionsRequest + */ + getDataSourceSuggestions(getDataSourceSuggestionsRequest: GetDataSourceSuggestionsRequest, _options?: Configuration): Promise; + /** + * Version: 9.0.0.cl or later Generates an authentication token for creating a full session in ThoughtSpot for a given user. Recommended for use cases that do not require Attribute-based access control (ABAC) via Row Level Security (RLS). #### Usage guidelines You can generate a token for a user by providing a `username` and `password`, or by using the `secret_key` generated for your instance. To generate a `secret_key`, the administrator must enable [Trusted authentication](https://developers.thoughtspot.com/docs/trusted-auth-secret-key) in the **Develop** > **Customizations** > **Security Settings** page. **Note**: * When both `password` and `secret_key` are included in the API request, `password` takes precedence. * If [Multi-Factor Authentication (MFA)](https://docs.thoughtspot.com/cloud/latest/authentication-local-mfa) is enabled on your instance, the API login request with `username` and `password` returns an error. You can switch to token-based authentication with `secret_key` or contact ThoughtSpot Support for assistance. The token obtained from ThoughtSpot is valid for 5 minutes by default. You can configure the token expiration time as required. #### Just-in-time provisioning For [just-in-time user creation and provisioning](https://developers.thoughtspot.com/docs/just-in-time-provisioning), specify the following attributes in the API request: * `auto_create` * `username` * `display_name` * `email` * `group_identifiers` Set `auto_create` to `true` if the username does not exist in ThoughtSpot. If the user already exists in ThoughtSpot and `auto_create` is set to `true`, user properties such as display name, email and group assignment will be updated. To add a new user and assign privileges during auto-creation, the `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege is required. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled, the `CONTROL_TRUSTED_AUTH` (**Can Enable or Disable Trusted Authentication**) privilege is required. #### Important point to note All options in the token creation APIs that define user access to data in ThoughtSpot will take effect during token creation, not when the token is used for authentication. For example, `auto_create:true` will create the user when the authentication token is created. + * @param getFullAccessTokenRequest + */ + getFullAccessToken(getFullAccessTokenRequest: GetFullAccessTokenRequest, _options?: Configuration): Promise; + /** + * Version: 10.15.0.cl or later Retrieves existing natural language (NL) instructions configured for a specific data model. These instructions guide the AI system in understanding data context and generating more accurate responses. Requires `CAN_USE_SPOTTER` privilege, at least view access on the data model, and a bearer token corresponding to the org where the data model exists. #### Usage guidelines The request must include: - `data_source_identifier`: the unique ID of the data model to retrieve instructions for If the request is successful, the API returns: - `nl_instructions_info`: an array of instruction objects, each containing: - `instructions`: the configured text instructions for AI processing - `scope`: the scope of the instruction — currently only `GLOBAL` is supported #### Instructions scope - **GLOBAL**: Instructions that apply globally across the system on the given data-model (currently only global instructions are supported) #### Error responses | Code | Description | |------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| | 401 | Unauthorized — authentication token is missing, expired, or invalid. | | 403 | Forbidden — the authenticated user does not have `CAN_USE_SPOTTER` privilege, lacks view access on the data model, or the bearer token does not correspond to the org where the data model exists. | > ###### Note: > > - To use this API, the user needs at least view access on the data model, and must use the bearer token corresponding to the org where the data model exists. > - This endpoint is currently in Beta. Breaking changes may be introduced before the endpoint is made Generally Available. > - Available from version 10.15.0.cl and later. > - This endpoint requires Spotter — please contact ThoughtSpot Support to enable Spotter on your cluster. > - Use this API to review currently configured instructions before modifying them with `setNLInstructions`. + * @param getNLInstructionsRequest + */ + getNLInstructions(getNLInstructionsRequest: GetNLInstructionsRequest, _options?: Configuration): Promise; + /** + * Version: 9.0.0.cl or later Generates an authentication token that provides access to a specific metadata object. This object list is intersected with the list of objects the user is allowed to access via group membership. For more information, see [Object security](https://docs.thoughtspot.com/cloud/latest/security-data-object#object_security). #### Usage guidelines You can generate a token for a user by providing a `username` and `password`, or by using the `secret_key` generated for your instance. To generate a `secret_key`, the administrator must enable [Trusted authentication](https://developers.thoughtspot.com/docs/trusted-auth-secret-key) in the **Develop** > **Customizations** > **Security Settings** page. **Note**: * When both `password` and `secret_key` are included in the API request, `password` takes precedence. * If [Multi-Factor Authentication (MFA)](https://docs.thoughtspot.com/cloud/latest/authentication-local-mfa) is enabled on your instance, the API login request with `username` and `password` returns an error. You can switch to token-based authentication with `secret_key` or contact ThoughtSpot Support for assistance. The token obtained from ThoughtSpot is valid for 5 minutes by default. You can configure the token expiration time as required. #### Just-in-time provisioning For [just-in-time user creation and provisioning](https://developers.thoughtspot.com/docs/just-in-time-provisioning), specify the following attributes in the API request: * `auto_create` * `username` * `display_name` * `email` * `group_identifiers` Set `auto_create` to `true` if the user is not available in ThoughtSpot. If the user already exists in ThoughtSpot and the `auto_create` parameter is set to `true`, user properties such as display name, email, and group assignment will be updated. To add a new user and assign privileges, the `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege is required. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled, the `CONTROL_TRUSTED_AUTH`(**Can Enable or Disable Trusted Authentication**) privilege is required. #### Important point to note All options in the token creation APIs that define user access to data in ThoughtSpot will take effect during token creation, not when the token is used for authentication. For example, `auto_create:true` will create the user when the authentication token is created. + * @param getObjectAccessTokenRequest + */ + getObjectAccessToken(getObjectAccessTokenRequest: GetObjectAccessTokenRequest, _options?: Configuration): Promise; + /** + * Version: 10.13.0.cl or later Breaks down a natural language query into a series of smaller analytical sub-questions, each mapped to a relevant data source. Requires `CAN_USE_SPOTTER` privilege and at least view-level access to the referenced metadata objects. #### Usage guidelines The request must include: - `query`: the natural language question to decompose into analytical sub-questions - `metadata_context`: at least one of the following context identifiers to guide question generation: - `conversation_identifier` — an existing conversation session ID - `answer_identifiers` — a list of Answer GUIDs - `liveboard_identifiers` — a list of Liveboard GUIDs - `data_source_identifiers` — a list of data source GUIDs Optional parameters for refining the output: - `ai_context`: additional context to improve response quality - `content` — supplementary text or CSV data as string input - `instructions` — custom text instructions for the AI system - `limit_relevant_questions`: maximum number of questions to return (default: `5`) - `bypass_cache`: if `true`, forces fresh computation instead of returning cached results If the request is successful, the API returns a list of relevant analytical questions, each containing: - `query`: the generated sub-question - `data_source_identifier`: the unique ID of the data source the question targets - `data_source_name`: the display name of the corresponding data source #### Error responses | Code | Description | |------|---------------------------------------------------------------------------------------------------------------------------------------| | 401 | Unauthorized — authentication token is missing, expired, or invalid. | | 403 | Forbidden — the authenticated user does not have `CAN_USE_SPOTTER` privilege or lacks view access to the referenced metadata objects. | > ###### Note: > * This endpoint is currently in Beta. Breaking changes may be introduced before the endpoint is made Generally Available. > * This endpoint requires Spotter - please contact ThoughtSpot support to enable Spotter on your cluster. + * @param getRelevantQuestionsRequest + */ + getRelevantQuestions(getRelevantQuestionsRequest: GetRelevantQuestionsRequest, _options?: Configuration): Promise; + /** + * Version: 9.0.0.cl or later Retrieves the current configuration details of the cluster. If the request is successful, the API returns a list configuration settings applied on the cluster. Requires `ADMINISTRATION`(**Can administer ThoughtSpot**) privilege to view these complete configuration settings of the cluster. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `SYSTEM_INFO_ADMINISTRATION` (**Can view system activities**) privilege is required. This API does not require any parameters to be passed in the request. + */ + getSystemConfig(_options?: Configuration): Promise; + /** + * Version: 9.0.0.cl or later Gets system information such as the release version, locale, time zone, deployment environment, date format, and date time format of the cluster. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privileges. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `SYSTEM_INFO_ADMINISTRATION` (**Can view system activities**) privilege is required. This API does not require any parameters to be passed in the request. + */ + getSystemInformation(_options?: Configuration): Promise; + /** + * Version: 9.2.0.cl or later Gets a list of configuration overrides applied on the cluster. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `APPLICATION_ADMINISTRATION` (**Can manage application settings**) privilege is required. This API does not require any parameters to be passed in the request. + */ + getSystemOverrideInfo(_options?: Configuration): Promise; + /** + * Version: 9.0.0.cl or later Imports [TML](https://docs.thoughtspot.com/cloud/latest/tml) files into ThoughtSpot. Requires `DATAMANAGEMENT` (**Can manage data**) or `ADMINISTRATION` (**Can administer ThoughtsSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the following Data control privileges may be required: - `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) - `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` (**Can manage data models**) #### Usage guidelines * Import all related objects in a single TML Import API call. For example, Tables that use the same Connection object and Worksheets connected to these Tables. * Include the `fqn` property to distinguish objects that have the same name. For example, if you have multiple Connections or Worksheets with the same name on ThoughtSpot and the Connection or Worksheet referenced in your TML file does not have a unique name to distinguish, it may result in invalid object references. Adding `fqn` helps ThoughtSpot differentiate a Table from another with the same name. We recommend [exporting TML with FQNs](#/http/api-endpoints/metadata/export-metadata-tml) and using these during the import operation. * You can upload multiple TML files at a time. If you import a Worksheet along with Liveboards, Answers, and other dependent objects in a single API call, the imported objects will be immediately available for use. When you import only a Worksheet object, it may take some time for the Worksheet to become available in the ThoughtSpot system. Please wait for a few minutes, and then proceed to create an Answer and Liveboard from the newly imported Worksheet. For more information, see [TML Documentation](https://developers.thoughtspot.com/docs/tml#_import_a_tml). + * @param importMetadataTMLRequest + */ + importMetadataTML(importMetadataTMLRequest: ImportMetadataTMLRequest, _options?: Configuration): Promise>; + /** + * Version: 10.4.0.cl or later Schedules a task to import [TML](https://docs.thoughtspot.com/cloud/latest/tml) files into ThoughtSpot. You can use this API endpoint to process TML objects asynchronously when importing TMLs of large and complex metadata objects into ThoughtSpot. Unlike the synchronous import TML operation, the API processes TML data in the background and returns a task ID, which can be used to check the status of the import task via `/api/rest/2.0/metadata/tml/async/status` API endpoint. Requires `DATAMANAGEMENT` (**Can manage data**) or `ADMINISTRATION` (**Can administer ThoughtsSpot**) privilege, and edit access to the TML objects. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the following Data control privileges may be required: - `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) - `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` (**Can manage data models**) #### Usage guidelines See [Async TML API Documentation](https://developers.thoughtspot.com/docs/tml#_import_tml_objects_asynchronously) for usage guidelines. + * @param importMetadataTMLAsyncRequest + */ + importMetadataTMLAsync(importMetadataTMLAsyncRequest: ImportMetadataTMLAsyncRequest, _options?: Configuration): Promise; + /** + * Version: 9.0.0.cl or later Imports group objects from external databases into ThoughtSpot. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `GROUP_ADMINISTRATION` (**Can manage groups**) privilege is required. During the import operation: * If the specified group is not available in ThoughtSpot, it will be added to ThoughtSpot. * If `delete_unspecified_groups` is set to `true`, the groups not specified in the API request, excluding administrator and system user groups, are deleted. * If the specified groups are already available in ThoughtSpot, the object properties of these groups are modified and synchronized as per the input data in the API request. A successful API call returns the object that represents the changes made in the ThoughtSpot system. + * @param importUserGroupsRequest + */ + importUserGroups(importUserGroupsRequest: ImportUserGroupsRequest, _options?: Configuration): Promise; + /** + * Version: 9.0.0.cl or later Imports user data from external databases into ThoughtSpot. During the user import operation: * If the specified users are not available in ThoughtSpot, the users are created and assigned a default password. Defining a `default_password` in the API request is optional. * If `delete_unspecified_users` is set to `true`, the users not specified in the API request, excluding the `tsadmin`, `guest`, `system` and `su` users, are deleted. * If the specified user objects are already available in ThoughtSpot, the object properties are updated and synchronized as per the input data in the API request. A successful API call returns the object that represents the changes made in the ThoughtSpot system. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `USER_ADMINISTRATION` (**Can manage users**) privilege is required. + * @param importUsersRequest + */ + importUsers(importUsersRequest: ImportUsersRequest, _options?: Configuration): Promise; + /** + * Version: 9.0.0.cl or later Creates a login session for a ThoughtSpot user with Basic authentication. In Basic authentication method, REST clients log in to ThoughtSpot using `username` and `password` attributes. On a multi-tenant cluster with Orgs, users can pass the ID of the Org in the API request to log in to a specific Org context. **Note**: If Multi-Factor Authentication (MFA) is enabled on your instance, the API login request with basic authentication (`username` and `password` ) returns an error. Contact ThoughtSpot Support for assistance. A successful login returns a session cookie that can be used in your subsequent API requests. + * @param loginRequest + */ + login(loginRequest: LoginRequest, _options?: Configuration): Promise; + /** + * Version: 9.0.0.cl or later Logs out a user from their current session. + */ + logout(_options?: Configuration): Promise; + /** + * Version: 26.3.0.cl or later This API allows the addition or deletion of object level privileges for a set of users and groups, on a set of metadata objects. It provides users to access certain features based on privilege based access control. #### Usage guidelines - Specify the `operation`. The supported operations are: `ADD`, `REMOVE`. - Specify the type of the objects on which the object privileges are being provided in `metadata_type`. Only `LOGICAL_TABLE` metadata type is supported for now. It may be extended for other metadata types in future. - Specify the list of object privilege types in the `object_privilege_types` array. The supported object privilege types are: `SPOTTER_COACHING_PRIVILEGE`. - Specify the identifiers (either GUID or name) for the metadata objects in the `metadata_identifiers` array. - Specify the `type` (`USER` or `USER_GROUP`) and `identifier` (either GUID or name) of the principals to which you want to apply the given operation and given object privileges in the `principals` array. - Ensure using correct Authorization Bearer Token corresponding to specific user & org. #### Example request ```json { \"operation\": \"operation-type\", \"metadata_type\": \"metadata-type\", \"object_privilege_types\": [\"privilege-type-1\", \"privilege-type-2\"], \"metadata_identifiers\": [\"metadata-guid-or-name-1\", \"metadata-guid-or-name-1\"], \"principals\": [ { \"type\": \"type-1\", \"identifier\": \"principal-guid-or-name-1\" }, { \"type\": \"type-2\", \"identifier\": \"principal-guid-or-name-2\" } ] } ``` > ###### Note: > * Only admin users, users with edit access and users with coaching privilege on a given data-model can add or remove principals related to SPOTTER_COACHING_PRIVILEGE + * @param manageObjectPrivilegeRequest + */ + manageObjectPrivilege(manageObjectPrivilegeRequest: ManageObjectPrivilegeRequest, _options?: Configuration): Promise; + /** + * Parameterize fields in metadata objects. Version: 10.9.0.cl or later **Note:** This API endpoint is deprecated and will be removed from ThoughtSpot in a future release. Use [POST /api/rest/2.0/metadata/parameterize-fields](/api/rest/2.0/metadata/parameterize-fields) instead. Allows parameterizing fields in metadata objects in ThoughtSpot. Requires appropriate permissions to modify the metadata object. The API endpoint allows parameterizing the following types of metadata objects: * Logical Tables * Connections * Connection Configs For a Logical Table the field type must be `ATTRIBUTE` and field name can be one of: * databaseName * schemaName * tableName For a Connection or Connection Config, the field type is always `CONNECTION_PROPERTY`. In this case, field_name specifies the exact property of the Connection or Connection Config that needs to be parameterized. For Connection Config, the only supported field name is: * impersonate_user + * @param parameterizeMetadataRequest + */ + parameterizeMetadata(parameterizeMetadataRequest: ParameterizeMetadataRequest, _options?: Configuration): Promise; + /** + * Parameterize multiple fields of metadata objects. For example [schemaName, databaseName] for LOGICAL_TABLE. Version: 26.5.0.cl or later Allows parameterizing multiple fields of metadata objects in ThoughtSpot. For example, you can parameterize [schemaName, databaseName] for LOGICAL_TABLE. Requires appropriate permissions to modify the metadata object. The API endpoint allows parameterizing the following types of metadata objects: * Logical Tables * Connections * Connection Configs For a Logical Table, the field type must be `ATTRIBUTE` and field names can include: * databaseName * schemaName * tableName For a Connection or Connection Config, the field type is always `CONNECTION_PROPERTY`. In this case, field_names specifies the exact properties of the Connection or Connection Config that need to be parameterized. For Connection Config, supported field names include: * impersonate_user You can parameterize multiple fields at once by providing an array of field names. + * @param parameterizeMetadataFieldsRequest + */ + parameterizeMetadataFields(parameterizeMetadataFieldsRequest: ParameterizeMetadataFieldsRequest, _options?: Configuration): Promise; + /** + * Version: 26.5.0.cl or later Allows publishing metadata objects across organizations in ThoughtSpot. Requires ADMINISTRATION role and TENANT scope. The API endpoint allows publishing the following types of metadata objects: * Liveboards * Answers * Logical Tables This API will essentially share the objects along with it\'s dependencies to the org admins of the orgs to which it is being published. + * @param publishMetadataRequest + */ + publishMetadata(publishMetadataRequest: PublishMetadataRequest, _options?: Configuration): Promise; + /** + * Update values for a variable Version: 26.4.0.cl or later Allows updating values for a specific variable in ThoughtSpot. Requires ADMINISTRATION role. The CAN_MANAGE_VARIABLES permission allows you to manage Formula Variables in the current organization scope. The API endpoint allows: * Adding new values to the variable * Replacing existing values * Deleting values from the variable * Resetting all values When updating variable values, you need to specify: * The variable identifier (ID or name) * The values to add/replace/remove * The operation to perform (ADD, REPLACE, REMOVE, RESET) Behaviour based on operation type: * ADD - Adds values to the variable if this is a list type variable, else same as replace. * REPLACE - Replaces all values of a given set of constraints with the current set of values. * REMOVE - Removes any values which match the set of conditions of the variables if this is a list type variable, else clears value. * RESET - Removes all constraints for the given variable, scope is ignored + * @param identifier Unique ID or name of the variable + * @param putVariableValuesRequest + */ + putVariableValues(identifier: string, putVariableValuesRequest: PutVariableValuesRequest, _options?: Configuration): Promise; + /** + * Version: 10.7.0.cl or later **Deprecated** — Use `getRelevantQuestions` instead (available from 10.13.0.cl). Breaks down a topical or goal-oriented natural language question into smaller, actionable analytical sub-questions, each mapped to a relevant data source for independent execution. Requires `CAN_USE_SPOTTER` privilege and at least view-level access to the referenced metadata objects. #### Usage guidelines The request accepts the following parameters: - `nlsRequest`: contains the user `query` to decompose, along with optional `instructions` and `bypassCache` flag - `worksheetIds`: list of data source identifiers to scope the decomposition - `answerIds`: list of Answer GUIDs whose data guides the response - `liveboardIds`: list of Liveboard GUIDs whose data guides the response - `conversationId`: an existing conversation session ID for context continuity - `content`: supplementary text or CSV data to improve response quality - `maxDecomposedQueries`: maximum number of sub-questions to return (default: `5`) If the request is successful, the API returns a `decomposedQueryResponse` containing a list of `decomposedQueries`, each with: - `query`: the generated analytical sub-question - `worksheetId`: the unique ID of the data source the question targets - `worksheetName`: the display name of the corresponding data source #### Error responses | Code | Description | |------|---------------------------------------------------------------------------------------------------------------------------------------| | 401 | Unauthorized — authentication token is missing, expired, or invalid. | | 403 | Forbidden — the authenticated user does not have `CAN_USE_SPOTTER` privilege or lacks view access to the referenced metadata objects. | > ###### Note: > * This endpoint is deprecated since 10.13.0.cl. Use `getRelevantQuestions` for new integrations. > * This endpoint is currently in Beta. Breaking changes may be introduced before the endpoint is made Generally Available. > * This endpoint requires Spotter — please contact ThoughtSpot support to enable Spotter on your cluster. + * @param queryGetDecomposedQueryRequest + */ + queryGetDecomposedQuery(queryGetDecomposedQueryRequest: QueryGetDecomposedQueryRequest, _options?: Configuration): Promise; + /** + * Version: 9.0.0.cl or later Resets the password of a user account. Administrators can reset password on behalf of a user. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `USER_ADMINISTRATION` (**Can manage users**) privilege is required. + * @param resetUserPasswordRequest + */ + resetUserPassword(resetUserPasswordRequest: ResetUserPasswordRequest, _options?: Configuration): Promise; + /** + * Version: 9.2.0.cl or later Reverts TML objects to a previous commit specified in the API request. Requires at least edit access to objects. In the API request, specify the `commit_id`. If the branch name is not specified in the request, the API will consider the default branch configured on your instance. By default, the API reverts all objects. If the revert operation fails for one of the objects provided in the commit, the API returns an error and does not revert any object. For more information, see [Git integration documentation](https://developers.thoughtspot.com/docs/git-integration). + * @param commitId Commit id to which the object should be reverted + * @param revertCommitRequest + */ + revertCommit(commitId: string, revertCommitRequest: RevertCommitRequest, _options?: Configuration): Promise; + /** + * Version: 26.2.0.cl or later Revokes OAuth refresh tokens for users who no longer require access to a data warehouse connection. When a token is revoked, the affected user\'s session for that connection is terminated, and they must re-authenticate to regain access. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) or `DATAMANAGEMENT` (**Can manage data**) privileges. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on the ThoughtSpot instance, users with `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) privilege can also make API requests to revoke tokens for connection users. #### Usage guidelines You can specify different combinations of identifiers to control which refresh tokens are revoked. - **connection_identifier**: Revokes refresh tokens for all users of the connection, except the connection author. - **connection_identifier** and **user_identifiers**: Revokes refresh tokens only for the users specified in the request. If the name or ID of the connection author is included in the request, their token will also be revoked. - **connection_identifier** and **configuration_identifiers**: Revokes refresh tokens for all users on the specified configurations, except the configuration author. - **connection_identifier**, **configuration_identifiers**, and **user_identifiers**: Revokes refresh tokens for the specified users on the specified configurations. - **connection_identifier** and **org_identifiers**: Revokes refresh tokens for the specified Orgs. Applicable only for published connections. - **connection_identifier**, **org_identifiers**, and **user_identifiers**: Revokes refresh tokens for the specified users in the specified Orgs. Applicable only for published connections. **NOTE**: The `org_identifiers` parameter is only applicable for published connections. Using this parameter for unpublished connections will result in an error. Ensure that the connections are published before making the API request. + * @param connectionIdentifier Unique ID or name of the connection whose refresh tokens need to be revoked. All the users associated with the connection will have their refresh tokens revoked except the author. + * @param revokeRefreshTokensRequest + */ + revokeRefreshTokens(connectionIdentifier: string, revokeRefreshTokensRequest: RevokeRefreshTokensRequest, _options?: Configuration): Promise; + /** + * Version: 9.0.0.cl or later Revokes the authentication token issued for current user session. The token of your current session expires when you make a call to the `/api/rest/2.0/auth/token/revoke` endpoint. the users will not be able to access ThoughtSpot objects until a new token is obtained. To restart your session, request for a new token from ThoughtSpot. See [Get Full Access Token](#/http/api-endpoints/authentication/get-full-access-token). + * @param revokeTokenRequest + */ + revokeToken(revokeTokenRequest: RevokeTokenRequest, _options?: Configuration): Promise; + /** + * Version: 26.6.0.cl or later Returns the authentication configuration for the specified auth type at cluster and org level. Currently supports `TRUSTED_AUTH`. #### Required privileges Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) or `CONTROL_TRUSTED_AUTH` (**Can Enable or Disable Trusted Authentication**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled, the `CONTROL_TRUSTED_AUTH` privilege is required. #### Usage guidelines Use `scope` to control which level of settings are returned: - `CLUSTER` — Returns cluster-level authentication status and access tokens. Accessible only from the Primary Org. - `ORG` — Returns org-level authentication status and access tokens for the current Org. Requires the per-Org authentication feature to be enabled on your instance. - If `scope` is omitted, both cluster and org-level settings are returned based on the caller\'s org context and feature availability. The `access_tokens` array in `cluster_preferences` or `org_preferences` is omitted when no token is configured at that level. **Note**: Access tokens returned in the response are sensitive credentials. Treat them with the same care as passwords. + * @param searchAuthSettingsRequest + */ + searchAuthSettings(searchAuthSettingsRequest: SearchAuthSettingsRequest, _options?: Configuration): Promise; + /** + * Version: 10.12.0.cl or later Gets a list of [custom calendars](https://docs.thoughtspot.com/cloud/latest/connections-cust-cal). Requires `DATAMANAGEMENT` (**Can manage data**) or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your ThoughtSpot instance, the `CAN_MANAGE_CUSTOM_CALENDAR` (**Can manage custom calendars**) privilege is required. #### Usage guidelines By default, the API returns a list of custom calendars for all connection objects. To retrieve custom calendar details for a particular connection, specify the connection ID. You can also use other search parameters such as `name_pattern` and `sort_options` as search filters. The `name_pattern` parameter filters and returns only those objects that match the specified pattern. Use `%` as a wildcard for pattern matching. + * @param searchCalendarsRequest + */ + searchCalendars(searchCalendarsRequest: SearchCalendarsRequest, _options?: Configuration): Promise>; + /** + * Version: 26.4.0.cl or later Searches delivery history for communication channels such as webhooks. Returns channel-level delivery status for each job execution record. Use this to monitor channel health and delivery success rates across events. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) or `DEVELOPER` (**Has developer privilege**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, users with `CAN_MANAGE_WEBHOOKS` (**Can manage webhooks**) privilege are also authorized to perform this action. **NOTE**: When `channel_type` is `WEBHOOK`, the following constraints apply: - `job_ids`, `channel_identifiers`, and `events` each accept at most one element. - When `job_ids` is provided, it is used as the sole lookup key and other filter fields are ignored. - When `job_ids` is not provided, `channel_identifiers` and `events` are both required, each containing exactly one element. - Records older than the configured retention period are not returned. - Use `start_epoch_time_in_millis` and/or `end_epoch_time_in_millis` to narrow results to a specific time window. + * @param searchChannelHistoryRequest + */ + searchChannelHistory(searchChannelHistoryRequest: SearchChannelHistoryRequest, _options?: Configuration): Promise; + /** + * Version: 26.4.0.cl or later Gets a list of collections available in ThoughtSpot. To get details of a specific collection, specify the collection GUID or name. You can also filter the API response based on the collection name pattern, author, and other criteria. #### Search options * **name_pattern**: Use \'%\' as a wildcard character to match collection names * **collection_identifiers**: Search for specific collections by their GUIDs or names * **include_metadata**: When set to `true`, includes the metadata objects within each collection in the response **NOTE**: If the API returns an empty list, consider increasing the value of the `record_size` parameter. To search across all available collections, set `record_size` to `-1`. + * @param searchCollectionsRequest + */ + searchCollections(searchCollectionsRequest: SearchCollectionsRequest, _options?: Configuration): Promise; + /** + * Version: 9.2.0.cl or later Gets a list of commits for a given metadata object. Requires `DATAMANAGEMENT` (**Can manage data**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance on your instance, the `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` (**Can manage data models**) privilege and edit access to the metadata objects. + * @param searchCommitsRequest + */ + searchCommits(searchCommitsRequest: SearchCommitsRequest, _options?: Configuration): Promise>; + /** + * Version: 10.14.0.cl or later Fetch communication channel preferences. - Use `cluster_preferences` to fetch the default preferences for your ThoughtSpot application instance. - If your instance has [Orgs](https://docs.thoughtspot.com/cloud/latest/orgs-overview), use `org_preferences` to fetch any Org-specific preferences that override the defaults. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) or `DEVELOPER` (**Has developer privilege**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, users with `APPLICATION_ADMINISTRATION` (**Can manage application settings**) privilege are also authorized to perform this action. + * @param searchCommunicationChannelPreferencesRequest + */ + searchCommunicationChannelPreferences(searchCommunicationChannelPreferencesRequest: SearchCommunicationChannelPreferencesRequest, _options?: Configuration): Promise; + /** + * Version: 9.2.0.cl or later Gets Git repository connections configured on the ThoughtSpot instance. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance on your instance, the `CAN_SETUP_VERSION_CONTROL` (**Can set up version control**) privilege. + * @param searchConfigRequest + */ + searchConfig(searchConfigRequest: SearchConfigRequest, _options?: Configuration): Promise>; + /** + * Version: 9.2.0.cl or later Gets connection objects. Requires `DATAMANAGEMENT` (**Can manage data**) or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) privilege is required. - To get a list of all connections available in the ThoughtSpot system, send the API request without any attributes in the request body. - To get the connection objects for a specific type of data warehouse, specify the type in `data_warehouse_types`. - To fetch details of a connection object, specify the connection object GUID or name. The `name_pattern` attribute allows passing partial text with `%` for a wildcard match. - To get details of the database, schemas, tables, or columns from a data connection object, specify `data_warehouse_object_type`. - To get a specific database, schema, table, or column from a connection object, define the object type in `data_warehouse_object_type` and object properties in the `data_warehouse_objects` array. For example, to search for a column, you must pass the database, schema, and table names in the API request. Note that in the following example, object properties are set in a hierarchical order (`database` > `schema` > `table` > `column`). ``` { \"connections\": [ { \"identifier\": \"b9d1f2ef-fa65-4a4b-994e-30fa2d57b0c2\", \"data_warehouse_objects\": [ { \"database\": \"NEBULADEV\", \"schema\": \"INFORMATION_SCHEMA\", \"table\": \"APPLICABLE_ROLES\", \"column\": \"ROLE_NAME\" } ] } ], \"data_warehouse_object_type\": \"COLUMN\" } ``` - To fetch data by `configuration`, specify `data_warehouse_object_type`. For example, to fetch columns from the `DEVELOPMENT` database, specify the `data_warehouse_object_type` as `DATABASE` and define the `configuration` string as `{\"database\":\"DEVELOPMENT\"}`. To get column data for a specific table, specify the table, for example,`{\"database\":\"RETAILAPPAREL\",\"table\":\"PIPES\"}`. - To query connections by `authentication_type`, specify `data_warehouse_object_type`. Supported values for `authentication_type` are: - `SERVICE_ACCOUNT`: For connections that require service account credentials to authenticate to the Cloud Data Warehouse and fetch data. - `OAUTH`: For connections that require OAuth credentials to authenticate to the Cloud Data Warehouse and fetch data. Teradata, Oracle, and Presto Cloud Data Warehouses do not support the OAuth authentication type. - `IAM`: For connections that have the IAM OAuth set up. This authentication type is supported on Amazon Redshift connections only. - `EXTOAUTH`: For connections that have External OAuth set up. ThoughtSpot supports external [OAuth with Microsoft Azure Active Directory (AD)](https://docs.thoughtspot.com/cloud/latest/ connections-snowflake-azure-ad-oauth) and [Okta for Snowflake data connections](https://docs.thoughtspot.com/cloud/latest/connections-snowflake-okta-oauth). - `KEY_PAIR`: For connections that require Key Pair account credentials to authenticate to the Cloud Data Warehouse and fetch data. This authentication type is supported on Snowflake connections only. - `OAUTH_WITH_PKCE`: For connections that require OAuth with PKCE account credentials to authenticate to the Cloud Data Warehouse and fetch data. This authentication type is supported on Snowflake, Starburst, Databricks, Denodo connections only. - `EXTOAUTH_WITH_PKCE`: For connections that require External OAuth With PKCE account credentials to authenticate to the Cloud Data Warehouse and fetch data. This authentication type is supported on Snowflake connections only. - `OAUTH_WITH_PEZ`: For connections that require OAuth With PEZ account credentials to authenticate to the Cloud Data Warehouse and fetch data. This authentication type is supported on Amazon Redshift connections only. - `OAUTH_WITH_SERVICE_PRINCIPAL`: For connections that require OAuth With Service Principal account credentials to authenticate to the Cloud Data Warehouse and fetch data. This authentication type is supported on Databricks connections only. - `PERSONAL_ACCESS_TOKEN`: For connections that require Personal Access Token account credentials to authenticate to the Cloud Data Warehouse and fetch data. This authentication type is supported on Databricks connections only. - `OAUTH_CLIENT_CREDENTIALS`: For connections that require OAuth Client Credentials to authenticate to the Cloud Data Warehouse and fetch data. This authentication type is supported on Snowflake connections only. - To include more details about connection objects in the API response, set `include_details` to `true`. - You can also sort the output by field names and filter connections by tags. **NOTE**: When filtering connection records by parameters other than `data_warehouse_types` or `tag_identifiers`, ensure that you set `record_size` to `-1` and `record_offset` to `0` for precise results. + * @param searchConnectionRequest + */ + searchConnection(searchConnectionRequest: SearchConnectionRequest, _options?: Configuration): Promise>; + /** + * Version: 9.6.0.cl or later Gets custom actions configured on the cluster. Requires `DEVELOPER` (**Has Developer privilege**) or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `DEVELOPER` (**Has developer privilege**) privilege is required. + * @param searchCustomActionsRequest + */ + searchCustomActions(searchCustomActionsRequest: SearchCustomActionsRequest, _options?: Configuration): Promise>; + /** + * Version: 9.0.0.cl or later Generates an Answer from a given data source. Requires at least view access to the data source object (Worksheet or View). #### Usage guidelines To search data, specify the data source GUID in `logical_table_identifier`. The data source can be a Worksheet, View, Table, or SQL view. Pass search tokens in the `query_string` attribute in the API request as shown in the following example: ``` { \"query_string\": \"[sales] by [store]\", \"logical_table_identifier\": \"cd252e5c-b552-49a8-821d-3eadaa049cca\", } ``` For more information about the `query_string` format and data source attribute, see [Search data API](https://developers.thoughtspot.com/docs/fetch-data-and-report-apis#_search_data_api). The `record_size` attribute determines the number of records to retrieve in an API call. For more information about pagination, record size, and maximum row limit, see [Pagination and record size settings](https://developers.thoughtspot.com/docs/fetch-data-and-report-apis#_pagination_settings_for_data_and_report_api). + * @param searchDataRequest + */ + searchData(searchDataRequest: SearchDataRequest, _options?: Configuration): Promise; + /** + * Version: 10.10.0.cl or later Search the email customization configuration if any set for the ThoughtSpot system. #### Pre-requisites Requires `DEVELOPER` (**has developer privilege**) or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `DEVELOPER` (**Has developer privilege**) privilege is required. **NOTE**:This endpoint in currently in beta. Contact ThoughtSpot support to enable this on your instance. + * @param searchEmailCustomizationRequest + */ + searchEmailCustomization(searchEmailCustomizationRequest: SearchEmailCustomizationRequest, _options?: Configuration): Promise>; + /** + * Version: 9.0.0.cl or later Gets a list of metadata objects available on the ThoughtSpot system. This API endpoint is available to all users who have view access to the object. Users with `ADMINISTRATION` (**Can administer ThoughtSpot**) privileges can view data for all metadata objects, including users and groups. #### Usage guidelines - To get all metadata objects, send the API request without any attributes. - To get metadata objects of a specific type, set the `type` attribute. For example, to fetch a Worksheet, set the type as `LOGICAL_TABLE`. - To filter metadata objects within type `LOGICAL_TABLE`, set the `subtypes` attribute. For example, to fetch a Worksheet, set the type as `LOGICAL_TABLE` & subtypes as `[WORKSHEET]`. - To get a specific metadata object, specify the GUID. - To customize your search and filter the API response, you can use several parameters. You can search for objects created or modified by specific users, by tags applied to the objects, or by using the include parameters like `include_auto_created_objects`, `include_dependent_objects`, `include_headers`, `include_incomplete_objects`, and so on. You can also define sorting options to sort the data retrieved in the API response. - To get discoverable objects when linientmodel is enabled you can use `include_discoverable_objects` as true else false. Default value is true. - For liveboard metadata type, to get the newer format, set the `liveboard_response_format` as V2. Default value is V1. - To retrieve only objects that are published, set the `include_only_published_objects` as true. Default value is false. **NOTE**: The following parameters support pagination of metadata records: - `tag_identifiers` - `type` - `subtypes` - `created_by_user_identifiers` - `modified_by_user_identifiers` - `owned_by_user_identifiers` - `exclude_objects` - `include_auto_created_objects` - `favorite_object_options` - `include_only_published_objects` If you are using other parameters to search metadata, set `record_size` to `-1` and `record_offset` to `0`. + * @param searchMetadataRequest + */ + searchMetadata(searchMetadataRequest: SearchMetadataRequest, _options?: Configuration): Promise>; + /** + * Version: 9.0.0.cl or later Gets a list of Orgs configured on the ThoughtSpot system. To get details of a specific Org, specify the Org ID or name. You can also pass parameters such as status, visibility, and user identifiers to get a specific list of Orgs. Requires cluster administration (**Can administer Org**) privileges. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `ORG_ADMINISTRATION` (**Can manage Orgs**) privilege is required. + * @param searchOrgsRequest + */ + searchOrgs(searchOrgsRequest: SearchOrgsRequest, _options?: Configuration): Promise>; + /** + * Version: 9.5.0.cl or later Gets a list of Role objects from the ThoughtSpot system. Available if [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance. To search for Roles, the `ROLE_ADMINISTRATION` (**Can manage roles**) privilege is required. To get details of a specific Role object, specify the GUID or name. You can also filter the API response based on user group and Org identifiers, privileges assigned to the Role, and deprecation status. + * @param searchRolesRequest + */ + searchRoles(searchRolesRequest: SearchRolesRequest, _options?: Configuration): Promise>; + /** + * Search Schedules Version: 9.4.0.cl or later Gets a list of scheduled jobs configured for a Liveboard. To get details of a specific scheduled job, specify the name or GUID of the scheduled job. Requires at least view access to Liveboards. **NOTE**: When filtering schedules by parameters other than `metadata`, set `record_size` to `-1` and `record_offset` to `0` for accurate results. + * @param searchSchedulesRequest + */ + searchSchedules(searchSchedulesRequest: SearchSchedulesRequest, _options?: Configuration): Promise>; + /** + * Version: 26.2.0.cl or later Fetch security settings for your ThoughtSpot application instance. - Use `scope: CLUSTER` to retrieve cluster-level security settings, including CORS and CSP allowlists, SAML redirect URLs, and settings that control access to non-embedded pages. - Use `scope: ORG` to retrieve Org-level security settings. If your instance has [Orgs](https://docs.thoughtspot.com/cloud/latest/orgs-overview), this returns CORS and non-embed access settings specific to the Org. - If `scope` is not specified, returns both cluster and Org-specific settings based on user privileges. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) or `DEVELOPER` (**Has developer privilege**) privilege. See [Security Settings](https://developers.thoughtspot.com/docs/security-settings) for more details. + * @param searchSecuritySettingsRequest + */ + searchSecuritySettings(searchSecuritySettingsRequest: SearchSecuritySettingsRequest, _options?: Configuration): Promise; + /** + * Version: 9.0.0.cl or later Gets a list of tag objects available on the ThoughtSpot system. To get details of a specific tag object, specify the GUID or name. Any authenticated user can search for tag objects. + * @param searchTagsRequest + */ + searchTags(searchTagsRequest: SearchTagsRequest, _options?: Configuration): Promise>; + /** + * Version: 9.0.0.cl or later Gets a list of user group objects from the ThoughtSpot system. To get details of a specific user group, specify the user group GUID or name. You can also filter the API response based on User ID, Org ID, Role ID, type of group, sharing visibility, privileges assigned to the group, and the Liveboard IDs assigned to the users in the group. Available to all users. Users with `ADMINISTRATION` (**Can administer ThoughtSpot**) privileges can view all users properties. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `GROUP_ADMINISTRATION` (**Can manage groups**) privilege is required. **NOTE**: If you do not get precise results, try setting `record_size` to `-1` and `record_offset` to `0`. + * @param searchUserGroupsRequest + */ + searchUserGroups(searchUserGroupsRequest: SearchUserGroupsRequest, _options?: Configuration): Promise>; + /** + * Version: 9.0.0.cl or later Gets a list of users available on the ThoughtSpot system. To get details of a specific user, specify the user GUID or name. You can also filter the API response based on groups, Org ID, user visibility, account status, user type, and user preference settings and favorites. Available to all users. Users with `ADMINISTRATION` (**Can administer ThoughtSpot**) privileges can view all users properties. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `USER_ADMINISTRATION` (**Can manage users**) privilege is required. **NOTE**: If the API returns an empty list, consider increasing the value of the `record_size` parameter. To search across all available users, set `record_size` to `-1`. + * @param searchUsersRequest + */ + searchUsers(searchUsersRequest: SearchUsersRequest, _options?: Configuration): Promise>; + /** + * Search variables Version: 26.4.0.cl or later Allows searching for variables in ThoughtSpot. Requires ADMINISTRATION role. The CAN_MANAGE_VARIABLES permission allows you to manage Formula Variables in the current organization scope. The API endpoint supports searching variables by: * Variable identifier (ID or name) * Variable type * Name pattern (case-insensitive, supports % for wildcard) The search results can be formatted in three ways: * METADATA - Returns only variable metadata (default) * METADATA_AND_VALUES - Returns variable metadata and values The values can be filtered by scope: * org_identifier * principal_identifier * model_identifier + * @param searchVariablesRequest + */ + searchVariables(searchVariablesRequest: SearchVariablesRequest, _options?: Configuration): Promise>; + /** + * Version: 10.14.0.cl or later Searches for webhook configurations based on various criteria such as Org, webhook identifier, event type, with support for pagination and sorting. Returns matching webhook configurations with their complete details. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) or `DEVELOPER` (**Has developer privilege**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, users with `CAN_MANAGE_WEBHOOKS` (**Can manage webhooks**) privilege are also authorized to perform this action. + * @param searchWebhookConfigurationsRequest + */ + searchWebhookConfigurations(searchWebhookConfigurationsRequest: SearchWebhookConfigurationsRequest, _options?: Configuration): Promise; + /** + * Version: 26.5.0.cl or later Sends natural language messages to an existing Spotter agent conversation and returns the complete response synchronously. Requires `CAN_USE_SPOTTER` privilege and access to the metadata object associated with the conversation. The user must have access to the conversation session referenced by `conversation_identifier`. A conversation must first be created using the `createAgentConversation` API. #### Usage guidelines The request must include: - `conversation_identifier`: the unique session ID returned by `createAgentConversation`, used for context continuity and message tracking - `messages`: an array of one or more text messages to send to the agent The API returns an array of response objects, each containing: - `type`: the kind of response — `text`, `answer`, or `error` - `message`: the main content of the response - `metadata`: additional information depending on the message type (e.g., answer metadata includes analytics and visualization details) #### Error responses | Code | Description | |------|----------------------------------------------------------------------------------------------------------------------------------| | 401 | Unauthorized — authentication token is missing, expired, or invalid. | | 403 | Forbidden — the authenticated user does not have `CAN_USE_SPOTTER` privilege or lacks permission on the referenced conversation. | > ###### Note: > > - This endpoint is Generally Available from version 26.5.0.cl. > - This endpoint requires Spotter - please contact ThoughtSpot support to enable Spotter on your cluster. > - For real-time streamed responses, use `sendAgentConversationMessageStreaming` instead. + * @param conversationIdentifier Unique identifier for the conversation (used to track context) + * @param sendAgentConversationMessageRequest + */ + sendAgentConversationMessage(conversationIdentifier: string, sendAgentConversationMessageRequest: SendAgentConversationMessageRequest, _options?: Configuration): Promise; + /** + * Version: 26.5.0.cl or later Sends one or more natural language messages to an existing Spotter agent conversation and returns the response as a real-time Server-Sent Events stream. Requires `CAN_USE_SPOTTER` privilege and access to the metadata object associated with the conversation. The user must have access to the conversation session referenced by `conversation_identifier`. A conversation must first be created using the `createAgentConversation` API. #### Usage guidelines The request must include: - `conversation_identifier`: the unique session ID returned by `createAgentConversation`, used for context continuity and message tracking - `messages`: an array of one or more text messages to send to the agent If the request is valid, the API returns a Server-Sent Events (SSE) stream. Each line has the form `data: [{\"type\": \"...\", ...}]` — a JSON array of event objects. Event types include: - `ack`: confirms receipt of the request (`node_id`) - `conv_title`: conversation title (`title`, `conv_id`) - `notification`: status updates on operations (`group_id`, `metadata`, `code` — e.g. `TOOL_CALL_NOTIFICATION`, `nls_start`, `FINAL_RESPONSE_NOTIFICATION`) - `text-chunk`: incremental content chunks (`id`, `group_id`, `metadata` with `format` and `type` such as `thinking` or `text`, `content`) - `text`: full text block with same structure as `text-chunk` - `answer`: structured answer with metadata (`id`, `group_id`, `metadata` with `sage_query`, `session_id`, `title`, etc., `title`) - `error`: if a failure occurs #### Error responses | Code | Description | | ---- | -------------------------------------------------------------------------------------------------------------------------------- | | 401 | Unauthorized — authentication token is missing, expired, or invalid. | | 403 | Forbidden — the authenticated user does not have `CAN_USE_SPOTTER` privilege or lacks permission on the referenced conversation. | > ###### Note: > > - This endpoint is Generally Available from version 26.5.0.cl. > - This endpoint requires Spotter - please contact ThoughtSpot support to enable Spotter on your cluster. > - The streaming protocol uses Server-Sent Events (SSE). > - For the complete response in a single payload, use `sendAgentConversationMessage` instead. + * @param conversationIdentifier Unique identifier for the conversation (used to track context) + * @param sendAgentConversationMessageStreamingRequest + */ + sendAgentConversationMessageStreaming(conversationIdentifier: string, sendAgentConversationMessageStreamingRequest: SendAgentConversationMessageStreamingRequest, _options?: Configuration): Promise; + /** + * Version: 26.2.0.cl or later **Deprecated** — Use `sendAgentConversationMessage` instead. Send natural language messages to an existing Spotter agent conversation and returns the complete response synchronously. Requires `CAN_USE_SPOTTER` privilege and access to the metadata object associated with the conversation. The user must have access to the conversation session referenced by `conversation_identifier`. A conversation must first be created using the `createAgentConversation` API. #### Usage guidelines The request must include: - `conversation_identifier`: the unique session ID returned by `createAgentConversation`, used for context continuity and message tracking - `messages`: an array of one or more text messages to send to the agent The API returns an array of response objects, each containing: - `type`: the kind of response — `text`, `answer`, or `error` - `message`: the main content of the response - `metadata`: additional information depending on the message type (e.g., answer metadata includes analytics and visualization details) #### Error responses | Code | Description | |------|----------------------------------------------------------------------------------------------------------------------------------| | 401 | Unauthorized — authentication token is missing, expired, or invalid. | | 403 | Forbidden — the authenticated user does not have `CAN_USE_SPOTTER` privilege or lacks permission on the referenced conversation. | > ###### Note: > > - This endpoint is deprecated. Use `sendAgentConversationMessage` for new integrations. > - This endpoint is currently in Beta. Breaking changes may be introduced before the endpoint is made Generally Available. > - This endpoint requires Spotter - please contact ThoughtSpot support to enable Spotter on your cluster. + * @param conversationIdentifier Unique identifier for the conversation (used to track context) + * @param sendAgentMessageRequest + */ + sendAgentMessage(conversationIdentifier: string, sendAgentMessageRequest: SendAgentMessageRequest, _options?: Configuration): Promise; + /** + * Version: 26.2.0.cl or later **Deprecated** — Use `sendAgentConversationMessageStreaming` instead. Sends one or more natural language messages to an existing Spotter agent conversation and returns the response as a real-time Server-Sent Events stream. Requires `CAN_USE_SPOTTER` privilege and access to the metadata object associated with the conversation. The user must have access to the conversation session referenced by `conversation_identifier`. A conversation must first be created using the `createAgentConversation` API. #### Usage guidelines The request must include: - `conversation_identifier`: the unique session ID returned by `createAgentConversation`, used for context continuity and message tracking - `messages`: an array of one or more text messages to send to the agent If the request is valid, the API returns a Server-Sent Events (SSE) stream. Each line has the form `data: [{\"type\": \"...\", ...}]` — a JSON array of event objects. Event types include: - `ack`: confirms receipt of the request (`node_id`) - `conv_title`: conversation title (`title`, `conv_id`) - `notification`: status updates on operations (`group_id`, `metadata`, `code` — e.g. `TOOL_CALL_NOTIFICATION`, `nls_start`, `FINAL_RESPONSE_NOTIFICATION`) - `text-chunk`: incremental content chunks (`id`, `group_id`, `metadata` with `format` and `type` such as `thinking` or `text`, `content`) - `text`: full text block with same structure as `text-chunk` - `answer`: structured answer with metadata (`id`, `group_id`, `metadata` with `sage_query`, `session_id`, `title`, etc., `title`) - `error`: if a failure occurs #### Error responses | Code | Description | |------|----------------------------------------------------------------------------------------------------------------------------------| | 401 | Unauthorized — authentication token is missing, expired, or invalid. | | 403 | Forbidden — the authenticated user does not have `CAN_USE_SPOTTER` privilege or lacks permission on the referenced conversation. | > ###### Note: > > - This endpoint is deprecated. Use `sendAgentConversationMessageStreaming` for new integrations. > - This endpoint is currently in Beta. Breaking changes may be introduced before the endpoint is made Generally Available. > - This endpoint requires Spotter - please contact ThoughtSpot support to enable Spotter on your cluster. > - The streaming protocol uses Server-Sent Events (SSE). + * @param sendAgentMessageStreamingRequest + */ + sendAgentMessageStreaming(sendAgentMessageStreamingRequest: SendAgentMessageStreamingRequest, _options?: Configuration): Promise; + /** + * Version: 10.4.0.cl or later Sends a follow-up message to an existing conversation within the context of a data model. Requires `CAN_USE_SPOTTER` privilege and at least view access to the metadata object specified in the request. A conversation must first be created using the `createConversation` API. #### Usage guidelines The request must include: - `conversation_identifier`: the unique session ID returned by `createConversation` - `metadata_identifier`: the unique ID of the data source used for the conversation - `message`: a natural language string with the follow-up question If the request is successful, the API returns an array of response messages, each containing: - `session_identifier`: the unique ID of the generated response - `generation_number`: the generation number of the response - `message_type`: the type of the response (e.g., `TSAnswer`) - `visualization_type`: the generated visualization type (`Chart`, `Table`, or `Undefined`) - `tokens` / `display_tokens`: the search tokens and user-friendly display tokens for the response #### Error responses | Code | Description | |------|-----------------------------------------------------------------------------------------------------------------------------------------| | 401 | Unauthorized — authentication token is missing, expired, or invalid. | | 403 | Forbidden — the authenticated user does not have `CAN_USE_SPOTTER` privilege or lacks view permission on the specified metadata object. | > ###### Note: > * This endpoint is currently in Beta. Breaking changes may be introduced before the endpoint is made Generally Available. > * This endpoint requires Spotter - please contact ThoughtSpot support to enable Spotter on your cluster. + * @param conversationIdentifier Unique identifier of the conversation. + * @param sendMessageRequest + */ + sendMessage(conversationIdentifier: string, sendMessageRequest: SendMessageRequest, _options?: Configuration): Promise>; + /** + * Version: 10.15.0.cl or later This API allows users to set natural language (NL) instructions for a specific data-model to improve AI-generated answers and query processing. These instructions help guide the AI system to better understand the data context and provide more accurate responses. Requires `CAN_USE_SPOTTER` privilege, either edit access or `SPOTTER_COACHING_PRIVILEGE` on the data model, and a bearer token corresponding to the org where the data model exists. #### Usage guidelines To set NL instructions for a data-model, the request must include: - `data_source_identifier`: The unique ID of the data-model for which to set NL instructions - `nl_instructions_info`: An array of instruction objects, each containing: - `instructions`: Array of text instructions for the LLM - `scope`: The scope of the instruction (`GLOBAL`). Currently only `GLOBAL` is supported. It can be extended to data-model-user scope in future. #### Instructions scope - **GLOBAL**: instructions that apply to all users querying this data model If the request is successful, the API returns: - `success`: a boolean indicating whether the operation completed successfully #### Error responses | Code | Description | |------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| | 401 | Unauthorized — authentication token is missing, expired, or invalid. | | 403 | Forbidden — the authenticated user does not have `CAN_USE_SPOTTER` privilege, lacks edit access or `SPOTTER_COACHING_PRIVILEGE` on the data model, or the bearer token does not correspond to the org where the data model exists. | > ###### Note: > > - To use this API, the user needs either edit access or `SPOTTER_COACHING_PRIVILEGE` on the data model, and must use the bearer token corresponding to the org where the data model exists. > - This endpoint is currently in Beta. Breaking changes may be introduced before the endpoint is made Generally Available. > - Available from version 10.15.0.cl and later. > - This endpoint requires Spotter — please contact ThoughtSpot Support to enable Spotter on your cluster. > - Instructions help improve the accuracy and relevance of AI-generated responses for the specified data-model. + * @param setNLInstructionsRequest + */ + setNLInstructions(setNLInstructionsRequest: SetNLInstructionsRequest, _options?: Configuration): Promise; + /** + * Version: 9.0.0.cl or later Allows sharing one or several metadata objects with users and groups in ThoughtSpot. Requires edit access to the metadata object. #### Supported metadata objects: * Liveboards * Visualizations * Answers * Models * Views * Connections * Collections #### Object permissions You can provide `READ_ONLY` or `MODIFY` access when sharing an object with another user or group. The `READ_ONLY` permission grants view access to the shared object, whereas `MODIFY` provides edit access. To prevent a user or group from accessing the shared object, specify the GUID or name of the principal and set `shareMode` to `NO_ACCESS`. #### Sharing a visualization * Sharing a visualization implicitly shares the entire Liveboard with the recipient. * Object permissions set for a shared visualization also apply to the Liveboard unless overridden by another API request or via UI. * If email notifications for object sharing are enabled, a notification with a link to the shared visualization will be sent to the recipient’s email address. Although this link opens the shared visualization, recipients can also access other visualizations in the Liveboard. #### Sharing a collection Collections support **dual permissions** that provide fine-grained control: * **Collection permissions** (`share_mode`) - controls access to the collection itself (view, edit, delete the collection) * **Content permissions** (`content_share_mode`) - controls access to objects within the collection (view, edit objects inside) **Default Behavior:** - If only `share_mode` is specified, the content permissions default to `READ_ONLY` (except when `share_mode` is `NO_ACCESS`, then content also gets `NO_ACCESS`) - To give users edit access to collection contents, explicitly set `content_share_mode: \"MODIFY\"` ## Examples The following JSON examples can be copy-pasted as request bodies for the REST v2 API endpoint: ```bash POST /callosum/v1/v2/security/metadata/share Content-Type: application/x-www-form-urlencoded ``` ### Basic collection sharing Share a collection with read-only access: ```json { \"metadata_type\": \"COLLECTION\", \"metadata_identifiers\": [\"Sales Reports Collection\"], \"permissions\": [{ \"principal\": { \"type\": \"USER\", \"identifier\": \"alice@company.com\" }, \"share_mode\": \"READ_ONLY\" }], \"notification\": { \"message\": \"I\'ve shared the Sales Reports collection with you\", \"notify_on_share\": true } } ``` ### Collection sharing with dual permissions Share a collection with different permissions for the collection vs. its contents: ```json { \"metadata_type\": \"COLLECTION\", \"metadata_identifiers\": [\"Marketing Analytics\"], \"permissions\": [{ \"principal\": { \"type\": \"USER\", \"identifier\": \"bob@company.com\" }, \"share_mode\": \"MODIFY\", \"content_share_mode\": \"READ_ONLY\" }, { \"principal\": { \"type\": \"USER_GROUP\", \"identifier\": \"Marketing Team\" }, \"share_mode\": \"READ_ONLY\", \"content_share_mode\": \"READ_ONLY\" }], \"notification\": { \"emails\": [\"bob@company.com\"], \"message\": \"You can edit the collection but content is read-only\", \"enable_custom_url\": false, \"notify_on_share\": true }, \"has_lenient_discoverability\": false } ``` ### Multiple collections sharing Share multiple collections with different users: ```json { \"metadata\": [ { \"type\": \"COLLECTION\", \"identifier\": \"Q4 Reports\" }, { \"type\": \"COLLECTION\", \"identifier\": \"Executive Dashboard Collection\" } ], \"permissions\": [{ \"principal\": { \"type\": \"USER_GROUP\", \"identifier\": \"Executives\" }, \"share_mode\": \"MODIFY\" }, { \"principal\": { \"type\": \"USER\", \"identifier\": \"manager@company.com\" }, \"share_mode\": \"READ_ONLY\", \"content_share_mode\": \"MODIFY\" }], \"notification\": { \"message\": \"Sharing quarterly collections with leadership team\", \"notify_on_share\": true } } ``` ### Remove collection access Remove access to a collection by setting share_mode to NO_ACCESS: ```json { \"metadata_type\": \"COLLECTION\", \"metadata_identifiers\": [\"Confidential Reports\"], \"permissions\": [{ \"principal\": { \"type\": \"USER\", \"identifier\": \"former-employee@company.com\" }, \"share_mode\": \"NO_ACCESS\" }], \"notification\": { \"notify_on_share\": false } } ``` ### Collection Permission Scenarios **Scenario 1: Collection Admin** - `share_mode: MODIFY` + `content_share_mode: MODIFY` = Full control over collection and its contents **Scenario 2: Collection Curator** - `share_mode: MODIFY` + `content_share_mode: READ_ONLY` = Can manage collection structure but not edit contents **Scenario 3: Content Editor** - `share_mode: READ_ONLY` + `content_share_mode: MODIFY` = Can edit objects within collection but can\'t change collection itself **Scenario 4: Viewer** - `share_mode: READ_ONLY` + `content_share_mode: READ_ONLY` = View-only access to collection and contents + * @param shareMetadataRequest + */ + shareMetadata(shareMetadataRequest: ShareMetadataRequest, _options?: Configuration): Promise; + /** + * Version: 10.4.0.cl or later Processes a natural language query against a specified data model and returns a single AI-generated answer without requiring a conversation session. Requires `CAN_USE_SPOTTER` privilege and at least view access to the metadata object specified in the request. #### Usage guidelines The request must include: - `query`: a natural language question (e.g., \"What were total sales last quarter?\") - `metadata_identifier`: the unique ID of the data source to query against If the request is successful, the API returns a response message containing: - `session_identifier`: the unique ID of the generated response - `generation_number`: the generation number of the response - `message_type`: the type of the response (e.g., `TSAnswer`) - `visualization_type`: the generated visualization type (`Chart`, `Table`, or `Undefined`) - `tokens` / `display_tokens`: the search tokens and user-friendly display tokens for the response #### Error responses | Code | Description | |------|-----------------------------------------------------------------------------------------------------------------------------------------| | 401 | Unauthorized — authentication token is missing, expired, or invalid. | | 403 | Forbidden — the authenticated user does not have `CAN_USE_SPOTTER` privilege or lacks view permission on the specified metadata object. | > ###### Note: > * This endpoint is currently in Beta. Breaking changes may be introduced before the endpoint is made Generally Available. > * This endpoint requires Spotter - please contact ThoughtSpot support to enable Spotter on your cluster. + * @param singleAnswerRequest + */ + singleAnswer(singleAnswerRequest: SingleAnswerRequest, _options?: Configuration): Promise; + /** + * Stops an in-progress agent conversation response. Version: 26.6.0.cl or later Version: 26.6.0.cl or later Stops an in-progress agent response for the specified conversation. Use this endpoint to cancel a response that is actively being generated — for example, when the user navigates away, reformulates their question, or no longer needs the current result. Requires `CAN_USE_SPOTTER` privilege and access to the specified conversation. #### Usage guidelines The request must include: - `conversation_identifier` *(path parameter)*: the unique ID of the conversation whose active response should be stopped, as returned by `createAgentConversation` A successful request returns an empty `204 No Content` response. If there is no active response in progress at the time of the call, the request is still treated as successful. After stopping a response, the conversation session remains active. You can continue sending messages using `sendAgentConversationMessage` or `sendAgentConversationMessageStreaming`. #### Example request ```bash POST /api/rest/2.0/ai/agent/conversation/{conversation_identifier}/stop-response ``` #### Typical usage scenario This endpoint is useful when integrating Spotter into a chat UI where users can cancel a long-running query. For example: 1. User sends a message via `sendAgentConversationMessageStreaming`. 2. User clicks a \"Stop generating\" button while the response is streaming. 3. Your client calls `stopConversation` with the active `conversation_identifier`. 4. The stream is terminated and the user can ask a new question. #### Error responses | Code | Description | |------|-------------| | 401 | Unauthorized — authentication token is missing, expired, or invalid. | | 403 | Forbidden — the authenticated user does not have `CAN_USE_SPOTTER` privilege or lacks access to the specified conversation. | > ###### Note: > > - Calling this endpoint when no response is in progress does not return an error. > - The conversation context is preserved after stopping — previous messages and answers remain accessible. > - Available from version 26.6.0.cl and later. > - This endpoint requires Spotter — please contact ThoughtSpot Support to enable Spotter on your cluster. > - This feature is available only for **Spotter 3** (`SPOTTER3`) version. + * @param conversationIdentifier Unique identifier of the conversation to stop. + */ + stopConversation(conversationIdentifier: string, _options?: Configuration): Promise; + /** + * Version: 26.5.0.cl or later Synchronizes connection metadata attributes from your Cloud Data Warehouse (CDW) with ThoughtSpot. Requires the `DATAMANAGEMENT` (**Can manage data**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` (**Can manage data models**) privilege is required. #### Usage guidelines To synchronize attributes from a CDW, specify the connection GUID or name in the `connection_identifier` path parameter and `sync_attributes` in the request body. Default attribute is `[\"DESCRIPTION\"]`. ##### Hierarchical schema * Connection: The connection object for the sync operation. * Tables: Tables for the sync operation. When no table is specified, all tables are synchronized. * Columns: If the table is specified, you can add the columns for the sync operation. If no columns are specified, all columns in the specified table are considered for the sync operation. To set the scope for the sync operation: * Connection-level: To sync all tables and columns, pass an empty request body, or only the attributes in the request body. * Table-level: To synchronize specific tables and their columns, specify the table identifiers in the `tables` array. * Column-level: To synchronize specific columns, specify the table identifier as the key and column identifiers as the value in the `tables` array. ``` { \"tables\": [ {\"table-guid-1\": [\"column-guid-1\", \"column-guid-2\"]}, \"table-guid-2\" ], \"sync_attributes\": [\"DESCRIPTION\"] } ``` ##### API response If the sync operation is successful, the API returns the following information: * Status of the sync operation. For example, `SUCCESS`, `PARTIAL_SUCCESS`, or `NO_UPDATE`. * Number of tables and columns that were updated. * Number of tables and columns with the sync failed status when the overall sync status is `PARTIAL_SUCCESS`. * Message text indicating the sync results. + * @param connectionIdentifier Unique ID or name of the connection. + * @param syncMetadataRequest + */ + syncMetadata(connectionIdentifier: string, syncMetadataRequest: SyncMetadataRequest, _options?: Configuration): Promise; + /** + * Version: 9.0.0.cl or later Removes the tags applied to a Liveboard, Answer, Table, or Worksheet. Requires edit access to the metadata object. + * @param unassignTagRequest + */ + unassignTag(unassignTagRequest: UnassignTagRequest, _options?: Configuration): Promise; + /** + * Remove parameterization from fields in metadata objects. Version: 26.5.0.cl or later Allows removing parameterization from fields in metadata objects in ThoughtSpot. Requires appropriate permissions to modify the metadata object. The API endpoint allows unparameterizing the following types of metadata objects: * Logical Tables * Connections * Connection Configs For a Logical Table the field type must be `ATTRIBUTE` and field name can be one of: * databaseName * schemaName * tableName For a Connection or Connection Config, the field type is always `CONNECTION_PROPERTY`. In this case, field_name specifies the exact property of the Connection or Connection Config that needs to be unparameterized. For Connection Config, the only supported field name is: * impersonate_user + * @param unparameterizeMetadataRequest + */ + unparameterizeMetadata(unparameterizeMetadataRequest: UnparameterizeMetadataRequest, _options?: Configuration): Promise; + /** + * Version: 26.5.0.cl or later Allows unpublishing metadata objects from organizations in ThoughtSpot. Requires ADMINISTRATION role and TENANT scope. The API endpoint allows unpublishing the following types of metadata objects: * Liveboards * Answers * Logical Tables When unpublishing objects, you can: * Include dependencies by setting `include_dependencies` to true - this will unpublish all dependent objects if no other published object is using them * Force unpublish by setting `force` to true - this will break all dependent objects in the unpublished organizations + * @param unpublishMetadataRequest + */ + unpublishMetadata(unpublishMetadataRequest: UnpublishMetadataRequest, _options?: Configuration): Promise; + /** + * Version: 10.12.0.cl or later Updates the properties of a [custom calendar](https://docs.thoughtspot.com/cloud/latest/connections-cust-cal). Requires `DATAMANAGEMENT` (**Can manage data**) or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your ThoughtSpot instance, the `CAN_MANAGE_CUSTOM_CALENDAR` (**Can manage custom calendars**) privilege is required. #### Usage guidelines You can update the properties of a calendar using one of the following methods: * `FROM_INPUT_PARAMS` to update the calendar properties with the values defined in the API request. * `FROM_EXISTING_TABLE` Creates a calendar from the parameters defined in the API request. To update a custom calendar, specify the calendar ID as a path parameter in the request URL and the following parameters in the request body: * Connection ID and Table name * Database and schema name attributes: For most Cloud Data Warehouse (CDW) connectors, both `database_name` and `schema_name` attributes are required. However, the attribute requirements are conditional and vary based on the connector type and its metadata structure. For example, for connectors such as Teradata, MySQL, SingleSore, Amazon Aurora MySQL, Amazon RDS MySQL, Oracle, and GCP_MYSQL, the `schema_name` is required, whereas the `database_name` attribute is not. Similarly, connectors such as ClickHouse require you to specify the `database_name` and the schema specification in such cases is optional. The API allows you to modify the calendar type, month offset value, start and end date, starting day of the week, and prefixes assigned to the year and quarter labels. #### Examples Update a custom calendar using an existing Table in ThoughtSpot: ``` { \"update_method\": \"FROM_EXISTING_TABLE\", \"table_reference\": { \"connection_identifier\": \"Connection1\", \"database_name\": \"db1\", \"table_name\": \"custom_calendar_2025\", \"schame_name\": \"schemaVar\" } } ``` Update a custom calendar with the attributes defined in the API request: ``` { \"update_method\": \"FROM_INPUT_PARAMS\", \"table_reference\": { \"connection_identifier\": \"Connection1\", \"database_name\": \"db1\", \"table_name\": \"custom_calendar_2025\", \"schame_name\": \"schemaVar\" }, \"month_offset\": \"August\", \"start_day_of_week\": \"Monday\", \"start_date\": \"08/01/2025\", \"end_date\": \"07/31/2026\" } ``` + * @param calendarIdentifier Unique Id or name of the calendar. + * @param updateCalendarRequest + */ + updateCalendar(calendarIdentifier: string, updateCalendarRequest: UpdateCalendarRequest, _options?: Configuration): Promise; + /** + * Version: 26.4.0.cl or later Updates an existing collection in ThoughtSpot. #### Supported operations This API endpoint lets you perform the following operations: * Update collection name and description * Change visibility settings * Add metadata objects to the collection (operation: ADD) * Remove metadata objects from the collection (operation: REMOVE) * Replace all metadata objects in the collection (operation: REPLACE) #### Operation types * **ADD**: Adds the specified metadata objects to the existing collection without removing current items * **REMOVE**: Removes only the specified metadata objects from the collection * **REPLACE**: Replaces all existing metadata objects with the specified items (default behavior) + * @param collectionIdentifier Unique GUID of the collection. Note: Collection names cannot be used as identifiers since duplicate names are allowed. + * @param updateCollectionRequest + */ + updateCollection(collectionIdentifier: string, updateCollectionRequest: UpdateCollectionRequest, _options?: Configuration): Promise; + /** + * Version: 10.12.0.cl or later Creates, updates, or deletes column security rules for specified tables. This API endpoint allows you to create, update, or delete column-level security rules on columns of a table. The operation follows an \"all or none\" policy: if defining security rules for any of the provided columns fails, the entire operation will be rolled back, and no rules will be created. #### Usage guidelines - Provide table identifier using either `identifier` (GUID or name) or `obj_identifier` (object ID) - Use `clear_csr: true` to remove all column security rules from the table - For each column, specify the security rule using `column_security_rules` array - Use `is_unsecured: true` to mark a specific column as unprotected - Use `group_access` operations to manage group associations: - `ADD`: Add groups to the column\'s access list - `REMOVE`: Remove groups from the column\'s access list - `REPLACE`: Replace all existing groups with the specified groups #### Required permissions - `ADMINISTRATION` - Can administer ThoughtSpot - `DATAMANAGEMENT` - Can manage data (if RBAC is disabled) - `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` - Can manage worksheet views and tables (if RBAC is enabled) #### Example request ```json { \"identifier\": \"table-guid\", \"obj_identifier\": \"table-object-id\", \"clear_csr\": false, \"column_security_rules\": [ { \"column_identifier\": \"col id or col name\", \"is_unsecured\": false, \"group_access\": [ { \"operation\": \"ADD\", \"group_identifiers\": [\"hr_group_id\", \"hr_group_name\", \"finance_group_id\"] } ] }, { \"column_identifier\": \"col id or col name\", \"is_unsecured\": true }, { \"column_identifier\": \"col id or col name\", \"is_unsecured\": false, \"group_access\": [ { \"operation\": \"REPLACE\", \"group_identifiers\": [\"management_group_id\", \"management_group_name\"] } ] } ] } ``` #### Request Body Schema - `identifier` (string, optional): GUID or name of the table for which we want to create column security rules - `obj_identifier` (string, optional): The object ID of the table - `clear_csr` (boolean, optional): If true, then all the secured columns will be marked as unprotected, and all the group associations will be removed - `column_security_rules` (array of objects, required): An array where each object defines the security rule for a specific column Each column security rule object contains: - `column_identifier` (string, required): Column identifier (col_id or name) - `is_unsecured` (boolean, optional): If true, the column will be marked as unprotected and all groups associated with it will be removed - `group_access` (array of objects, optional): Array of group operation objects Each group operation object contains: - `operation` (string, required): Operation type - ADD, REMOVE, or REPLACE - `group_identifiers` (array of strings, required): Array of group identifiers (name or GUID) on which the operation will be performed #### Response This API does not return any response body. A successful operation returns HTTP 200 status code. #### Operation Types - **ADD**: Adds the specified groups to the column\'s access list - **REMOVE**: Removes the specified groups from the column\'s access list - **REPLACE**: Replaces all existing groups with the specified groups + * @param updateColumnSecurityRulesRequest + */ + updateColumnSecurityRules(updateColumnSecurityRulesRequest: UpdateColumnSecurityRulesRequest, _options?: Configuration): Promise; + /** + * Version: 9.2.0.cl or later Updates Git repository configuration settings. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance on your instance, the `CAN_SETUP_VERSION_CONTROL` (**Can set up version control**) privilege. + * @param updateConfigRequest + */ + updateConfig(updateConfigRequest: UpdateConfigRequest, _options?: Configuration): Promise; + /** + * Version: 9.2.0.cl or later **Important**: This endpoint is deprecated and will be removed from ThoughtSpot in September 2025. ThoughtSpot strongly recommends using the [Update connection V2](#/http/api-endpoints/connections/update-connection-v2) endpoint to update your connection objects. #### Usage guidelines Updates a connection object. Requires `DATAMANAGEMENT` (**Can manage data**) and edit permissions to the connection object, or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) privilege is required. To update a connection object, pass these parameters in your API request: 1. GUID of the connection object. 2. If you are updating tables or database schema of a connection object: a. Add the updated JSON map of metadata with database, schema, and tables in `data_warehouse_config`. b. Set `validate` to `true`. 3. If you are updating a configuration attribute, connection name, or description, you can set `validate` to `false`. + * @param updateConnectionRequest + */ + updateConnection(updateConnectionRequest: UpdateConnectionRequest, _options?: Configuration): Promise; + /** + * Version: 10.12.0.cl or later Updates a connection configuration object. Requires `DATAMANAGEMENT` (**Can manage data**) and edit permissions to the connection object, or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) privilege is required. #### Supported operations This API endpoint lets you perform the following operations in a single API request: * Edit the name or description of the configuration * Edit the configuration properties * Edit the `policy_type` * Edit the type of authentication * Enable or disable a configuration #### Parameterized Connection Support For parameterized oauth based connections, only the `same_as_parent` and `policy_process_options` attributes are allowed. These attributes are not applicable to connections that are not parameterized. **NOTE**: When updating a configuration where `disabled` is `true`, you must reset `disabled` to `true` in your update request payload. If not explicitly set again, the API will default `disabled` to `false`. + * @param configurationIdentifier Unique ID or name of the configuration. + * @param updateConnectionConfigurationRequest + */ + updateConnectionConfiguration(configurationIdentifier: string, updateConnectionConfigurationRequest: UpdateConnectionConfigurationRequest, _options?: Configuration): Promise; + /** + * Version: 26.6.0.cl or later Activates or deactivates a connection. A deactivated connection cannot be used for queries or operations until it is activated again. Requires `DATAMANAGEMENT` (**Can manage data**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) privilege is required. Only the connection owner or an administrator can perform this operation. #### Usage guidelines To update the status of a connection, specify the connection GUID or name in the `connection_identifier` path parameter and the desired `status` in the request body. - **ACTIVATED**: Enables the connection. Queries and operations can resume on an activated connection. - **DEACTIVATED**: Disables the connection. It does not remove the connection metadata, but only makes the connection unavailable for queries and operations. You can reactivate a deactivated connection by setting \"status\": \"ACTIVATED\". + * @param connectionIdentifier Unique ID or name of the connection. + * @param updateConnectionStatusRequest + */ + updateConnectionStatus(connectionIdentifier: string, updateConnectionStatusRequest: UpdateConnectionStatusRequest, _options?: Configuration): Promise; + /** + * Version: 10.4.0.cl or later Updates a connection object. Requires `DATAMANAGEMENT` (**Can manage data**) and edit permissions to the connection object, or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) privilege is required. To update a connection object, pass these parameters in your API request: 1. GUID of the connection object. 2. If you are updating tables or database schema of a connection object: a. Add the updated JSON map of metadata with database, schema, and tables in `data_warehouse_config`. b. Set `validate` to `true`. **NOTE:** If the `authentication_type` is anything other than SERVICE_ACCOUNT, you must explicitly provide the authenticationType property in the payload. If you do not specify authenticationType, the API will default to SERVICE_ACCOUNT as the authentication type. * A JSON map of configuration attributes, database details, and table properties in `data_warehouse_config` as shown in the following example: * This is an example of updating a single table in a empty connection: ``` { \"authenticationType\": \"SERVICE_ACCOUNT\", \"externalDatabases\": [ { \"name\": \"DEVELOPMENT\", \"isAutoCreated\": false, \"schemas\": [ { \"name\": \"TS_dataset\", \"tables\": [ { \"name\": \"DEMORENAME\", \"type\": \"TABLE\", \"description\": \"\", \"selected\": true, \"linked\": true, \"gid\": 0, \"datasetId\": \"-1\", \"subType\": \"\", \"reportId\": \"\", \"viewId\": \"\", \"columns\": [ { \"name\": \"Col1\", \"type\": \"VARCHAR\", \"canImport\": true, \"selected\": true, \"description\": \"\", \"isLinkedActive\": true, \"isAggregate\": false }, { \"name\": \"Col2\", \"type\": \"VARCHAR\", \"canImport\": true, \"selected\": true, \"description\": \"\", \"isLinkedActive\": true, \"isAggregate\": false }, { \"name\": \"Col3\", \"type\": \"VARCHAR\", \"canImport\": true, \"selected\": true, \"description\": \"\", \"isLinkedActive\": true, \"isAggregate\": false }, { \"name\": \"Col312\", \"type\": \"VARCHAR\", \"canImport\": true, \"selected\": true, \"description\": \"\", \"isLinkedActive\": true, \"isAggregate\": false }, { \"name\": \"Col4\", \"type\": \"VARCHAR\", \"canImport\": true, \"selected\": true, \"description\": \"\", \"isLinkedActive\": true, \"isAggregate\": false } ], \"relationships\": [] } ] } ] } ], \"configuration\": { \"password\": \"\", \"database\": \"DEVELOPMENT\", \"role\": \"DEV\", \"accountName\": \"thoughtspot_partner\", \"warehouse\": \"DEMO_WH\", \"user\": \"DEV_USER\" } } ``` * This is an example of updating a single table in an existing connection with tables: ``` { \"authenticationType\": \"SERVICE_ACCOUNT\", \"externalDatabases\": [ { \"name\": \"DEVELOPMENT\", \"isAutoCreated\": false, \"schemas\": [ { \"name\": \"TS_dataset\", \"tables\": [ { \"name\": \"CUSTOMER\", \"type\": \"TABLE\", \"description\": \"\", \"selected\": true, \"linked\": true, \"gid\": 0, \"datasetId\": \"-1\", \"subType\": \"\", \"reportId\": \"\", \"viewId\": \"\", \"columns\": [], \"relationships\": [] }, { \"name\": \"tpch5k_falcon_default_schema_users\", \"type\": \"TABLE\", \"description\": \"\", \"selected\": true, \"linked\": true, \"gid\": 0, \"datasetId\": \"-1\", \"subType\": \"\", \"reportId\": \"\", \"viewId\": \"\", \"columns\": [ { \"name\": \"user_id\", \"type\": \"INT64\", \"canImport\": true, \"selected\": true, \"description\": \"\", \"isLinkedActive\": true, \"isAggregate\": false }, { \"name\": \"product_id\", \"type\": \"INT64\", \"canImport\": true, \"selected\": true, \"description\": \"\", \"isLinkedActive\": true, \"isAggregate\": false }, { \"name\": \"user_cost\", \"type\": \"INT64\", \"canImport\": true, \"selected\": true, \"description\": \"\", \"isLinkedActive\": true, \"isAggregate\": false } ], \"relationships\": [] } ] } ] } ], \"configuration\": { \"password\": \"\", \"database\": \"DEVELOPMENT\", \"role\": \"DEV\", \"accountName\": \"thoughtspot_partner\", \"warehouse\": \"DEMO_WH\", \"user\": \"DEV_USER\" } } ``` 3. If you are updating a configuration attribute, connection name, or description, you can set `validate` to `false`. **NOTE:** If the `authentication_type` is anything other than SERVICE_ACCOUNT, you must explicitly provide the authenticationType property in the payload. If you do not specify authenticationType, the API will default to SERVICE_ACCOUNT as the authentication type. * A JSON map of configuration attributes in `data_warehouse_config`. The following example shows the configuration attributes for a Snowflake connection: ``` { \"configuration\":{ \"accountName\":\"thoughtspot_partner\", \"user\":\"tsadmin\", \"password\":\"TestConn123\", \"role\":\"sysadmin\", \"warehouse\":\"MEDIUM_WH\" }, \"externalDatabases\":[ ] } ``` + * @param connectionIdentifier Unique ID or name of the connection. + * @param updateConnectionV2Request + */ + updateConnectionV2(connectionIdentifier: string, updateConnectionV2Request: UpdateConnectionV2Request, _options?: Configuration): Promise; + /** + * Version: 9.6.0.cl or later Updates a custom action. Requires `DEVELOPER` (**Has Developer privilege**) or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `DEVELOPER` (**Has developer privilege**) privilege is required. #### Usage Guidelines The API allows you to modify the following properties: * Name of the custom action * Action availability to groups * Association to metadata objects * Authentication settings for a URL-based action For more information, see [Custom actions](https://developers.thoughtspot.com/docs/custom-action-intro). + * @param customActionIdentifier Unique ID or name of the custom action. + * @param updateCustomActionRequest + */ + updateCustomAction(customActionIdentifier: string, updateCustomActionRequest: UpdateCustomActionRequest, _options?: Configuration): Promise; + /** + * Version: 9.9.0.cl or later Updates a DBT connection object. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege or `DATAMANAGEMENT` (**Can manage data ThoughtSpot**) privilege, along with an existing DBT connection. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the following data control privileges may be required: - `CAN_MANAGE_CUSTOM_CALENDAR`(**Can manage custom calendars**) - `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) - `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` (**Can manage data models**) #### About update DBT connection You can modify DBT connection object properties such as embrace connection name, embrace database name, import type, account identifier, access token, project identifier and environment (or) embrace connection, embrace database name, import type, file_content settings. + * @param dbtConnectionIdentifier Unique ID of the DBT Connection. + * @param connectionName Name of the connection. + * @param databaseName Name of the Database. + * @param importType Mention type of Import + * @param accessToken Access token is mandatory when Import_Type is DBT_CLOUD. + * @param dbtUrl DBT URL is mandatory when Import_Type is DBT_CLOUD. + * @param accountId Account ID is mandatory when Import_Type is DBT_CLOUD + * @param projectId Project ID is mandatory when Import_Type is DBT_CLOUD + * @param dbtEnvId DBT Environment ID\\\" + * @param projectName Name of the project + * @param fileContent Upload DBT Manifest and Catalog artifact files as a ZIP file. This field is Mandatory when Import Type is \\\'ZIP_FILE\\\' + */ + updateDbtConnection(dbtConnectionIdentifier: string, connectionName?: string, databaseName?: string, importType?: string, accessToken?: string, dbtUrl?: string, accountId?: string, projectId?: string, dbtEnvId?: string, projectName?: string, fileContent?: HttpFile, _options?: Configuration): Promise; + /** + * Version: 10.12.0.cl or later Updates a customization configuration for the notification email. #### Pre-requisites Requires `DEVELOPER` (**has developer privilege**) or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `DEVELOPER` (**Has developer privilege**) privilege is required. **NOTE**:This endpoint in currently in beta. Contact ThoughtSpot support to enable this on your instance. #### Usage guidelines To update a custom configuration pass these parameters in your API request: - A JSON map of configuration attributes `template_properties`. The following example shows a sample set of customization configuration: ``` { { \"cta_button_bg_color\": \"#444DEA\", \"cta_text_font_color\": \"#FFFFFF\", \"primary_bg_color\": \"#D3DEF0\", \"logo_url\": \"https://storage.pardot.com/710713/1642089901EbkRibJq/TS_fullworkmark_darkmode.png\", \"font_family\": \"\", \"product_name\": \"ThoughtSpot\", \"footer_address\": \"444 Castro St, Suite 1000 Mountain View, CA 94041\", \"footer_phone\": \"(800) 508-7008\", \"replacement_value_for_liveboard\": \"Dashboard\", \"replacement_value_for_answer\": \"Chart\", \"replacement_value_for_spot_iq\": \"AI Insights\", \"hide_footer_phone\": false, \"hide_footer_address\": false, \"hide_product_name\": false, \"hide_manage_notification\": false, \"hide_mobile_app_nudge\": false, \"hide_privacy_policy\": false, \"hide_ts_vocabulary_definitions\": false, \"hide_error_message\": false, \"hide_unsubscribe_link\": false, \"hide_notification_status\": false, \"hide_modify_alert\": false, \"company_website_url\": \"https://your-website.com/\", \"company_privacy_policy_url\" : \"https://link-to-privacy-policy.com/\", \"contact_support_url\": \"https://link-to-contact-support.com/\", \"hide_contact_support_url\": false, \"hide_logo_url\" : false } } ``` + * @param updateEmailCustomizationRequest + */ + updateEmailCustomization(updateEmailCustomizationRequest: UpdateEmailCustomizationRequest, _options?: Configuration): Promise; + /** + * Update header attributes for a given list of header objects. Version: 10.6.0.cl or later ## Prerequisites - **Privileges Required:** - `DATAMANAGEMENT` (Can manage data) or `ADMINISTRATION` (Can administer ThoughtSpot). - **Additional Privileges (if RBAC is enabled):** - `ORG_ADMINISTRATION` (Can manage orgs). --- ## Usage Guidelines ### Parameters 1. **headers_update** - **Description:** List of header objects with their attributes to be updated. Each object contains a list of attributes to be updated in the header. - **Usage:** - You must provide either `identifier` or `obj_identifier`, but not both. Both fields cannot be empty. - When `org_identifier` is set to `-1`, only the `identifier` value is accepted; `obj_identifier` is not allowed. 2. **org_identifier** - **Description:** GUID (Globally Unique Identifier) or name of the organization. - **Usage:** - Leaving this field empty assumes that the changes should be applied to the current organization - Provide `org_guid` or `org_name` to uniquely identify the organization where changes need to be applied. . - Provide `-1` if changes have to be applied across all the org. --- ## Note Currently, this API is enabled only for updating the `obj_identifier` attribute. Only `text` will be allowed in attribute\'s value. ## Best Practices 1. **Backup Before Conversion:** Always export metadata as a backup before initiating the update process --- ## Examples ### Only `identifier` is given ```json { \"headers_update\": [ { \"identifier\": \"guid_1\", \"obj_identifier\": \"\", \"type\": \"LOGICAL_COLUMN\", \"attributes\": [ { \"name\": \"obj_id\", \"value\": \"custom_object_id\" } ] } ], \"org_identifier\": \"orgGuid\" } ``` ### Only `obj_identifier` is given ```json { \"headers_update\": [ { \"obj_identifier\": \"custom_object_id\", \"type\": \"ANSWER\", \"attributes\": [ { \"name\": \"obj_id\", \"value\": \"custom_object_id\" } ] } ], \"org_identifier\": \"orgName\" } ``` ### Executing update for all org `-1` ```json { \"headers_update\": [ { \"identifier\": \"guid_1\", \"type\": \"ANSWER\", \"attributes\": [ { \"name\": \"obj_id\", \"value\": \"custom_object_id\" } ] } ], \"org_identifier\": -1 } ``` ### Optional `type` is not provided ```json { \"headers_update\": [ { \"identifier\": \"guid_1\", \"attributes\": [ { \"name\": \"obj_id\", \"value\": \"custom_object_id\" } ] } ], \"org_identifier\": -1 } ``` + * @param updateMetadataHeaderRequest + */ + updateMetadataHeader(updateMetadataHeaderRequest: UpdateMetadataHeaderRequest, _options?: Configuration): Promise; + /** + * Update object IDs for given metadata objects. Version: 10.8.0.cl or later ## Prerequisites - **Privileges Required:** - `DATAMANAGEMENT` (Can manage data) or `ADMINISTRATION` (Can administer ThoughtSpot). - **Additional Privileges (if RBAC is enabled):** - `ORG_ADMINISTRATION` (Can manage orgs). --- ## Usage Guidelines ### Parameters 1. **metadata** - **Description:** List of metadata objects to update their object IDs. - **Usage:** - Use either `current_obj_id` alone OR use `metadata_identifier` with `type` (when needed). - When using `metadata_identifier`, the `type` field is required if using a name instead of a GUID. - The `new_obj_id` field is always required. --- ## Note This API is specifically designed for updating object IDs of metadata objects. It internally uses the header update mechanism to perform the changes. ## Best Practices 1. **Backup Before Update:** Always export metadata as a backup before initiating the update process. 2. **Validation:** - When using `current_obj_id`, ensure it matches the existing object ID exactly. - When using `metadata_identifier` with a name, ensure the `type` is specified correctly. - Verify that the `new_obj_id` follows your naming conventions and is unique within your system. --- ## Examples ### Using current_obj_id ```json { \"metadata\": [ { \"current_obj_id\": \"existing_object_id\", \"new_obj_id\": \"new_object_id\" } ] } ``` ### Using metadata_identifier with GUID ```json { \"metadata\": [ { \"metadata_identifier\": \"01234567-89ab-cdef-0123-456789abcdef\", \"new_obj_id\": \"new_object_id\" } ] } ``` ### Using metadata_identifier with name and type ```json { \"metadata\": [ { \"metadata_identifier\": \"My Answer\", \"type\": \"ANSWER\", \"new_obj_id\": \"new_object_id\" } ] } ``` ### Multiple objects update ```json { \"metadata\": [ { \"current_obj_id\": \"existing_object_id_1\", \"new_obj_id\": \"new_object_id_1\" }, { \"metadata_identifier\": \"My Worksheet\", \"type\": \"LOGICAL_TABLE\", \"new_obj_id\": \"new_object_id_2\" } ] } ``` + * @param updateMetadataObjIdRequest + */ + updateMetadataObjId(updateMetadataObjIdRequest: UpdateMetadataObjIdRequest, _options?: Configuration): Promise; + /** + * Version: 9.0.0.cl or later Updates an Org object. You can modify Org properties such as name, description, and user associations. Requires cluster administration (**Can administer Org**) privileges. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `ORG_ADMINISTRATION` (**Can manage Orgs**) privilege is required. + * @param orgIdentifier ID or name of the Org + * @param updateOrgRequest + */ + updateOrg(orgIdentifier: string, updateOrgRequest: UpdateOrgRequest, _options?: Configuration): Promise; + /** + * Version: 9.5.0.cl or later Updates the properties of a Role object. Available only if [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance. To update a Role, the `ROLE_ADMINISTRATION` (**Can manage roles**) privilege is required. + * @param roleIdentifier Unique ID or name of the Role. + * @param updateRoleRequest + */ + updateRole(roleIdentifier: string, updateRoleRequest: UpdateRoleRequest, _options?: Configuration): Promise; + /** + * Update schedule. Version: 9.4.0.cl or later Updates a scheduled Liveboard job. Requires at least edit access to Liveboards. To update a schedule on behalf of another user, you need `ADMINISTRATION` (**Can administer Org**) or `JOBSCHEDULING` (**Can schedule for others**) privilege and edit access to the Liveboard. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `JOBSCHEDULING` (**Can schedule for others**) privilege is required. The API endpoint allows you to pause a scheduled job, change the status of a paused job. You can also edit the recipients list, frequency of the job, format of the file to send to the recipients in email notifications, PDF options, and time zone setting. + * @param scheduleIdentifier Unique ID or name of the schedule. + * @param updateScheduleRequest + */ + updateSchedule(scheduleIdentifier: string, updateScheduleRequest: UpdateScheduleRequest, _options?: Configuration): Promise; + /** + * Version: 9.2.0.cl or later Updates the current configuration of the cluster. You must send the configuration data in JSON format. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privileges. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `APPLICATION_ADMINISTRATION` (**Can manage application settings**) privilege is required. + * @param updateSystemConfigRequest + */ + updateSystemConfig(updateSystemConfigRequest: UpdateSystemConfigRequest, _options?: Configuration): Promise; + /** + * Version: 9.0.0.cl or later Updates a tag object. You can modify the `name` and `color` properties of a tag object. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `TAGMANAGEMENT` (**Can manage tags**) privilege is required to create, edit, and delete tags. + * @param tagIdentifier Name or Id of the tag. + * @param updateTagRequest + */ + updateTag(tagIdentifier: string, updateTagRequest: UpdateTagRequest, _options?: Configuration): Promise; + /** + * Version: 9.0.0.cl or later Updates the properties of a user object. You can modify user properties such as username, email, and share notification settings. You can also assign new groups and Orgs, remove the user from a group or Org, reset password, and modify user preferences. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `USER_ADMINISTRATION` (**Can manage users**) privilege is required. + * @param userIdentifier GUID / name of the user + * @param updateUserRequest + */ + updateUser(userIdentifier: string, updateUserRequest: UpdateUserRequest, _options?: Configuration): Promise; + /** + * Version: 9.0.0.cl or later Updates the properties of a group object in ThoughtSpot. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `GROUP_ADMINISTRATION` (**Can manage groups**) privilege is required. #### Supported operations This API endpoint lets you perform the following operations in a single API request: * Edit [privileges](https://developers.thoughtspot.com/docs/?pageid=api-user-management#group-privileges) * Add or remove users * Change sharing visibility settings * Add or remove sub-groups * Assign a default Liveboard or update the existing settings + * @param groupIdentifier GUID or name of the group. + * @param updateUserGroupRequest + */ + updateUserGroup(groupIdentifier: string, updateUserGroupRequest: UpdateUserGroupRequest, _options?: Configuration): Promise; + /** + * Update a variable\'s name Version: 26.4.0.cl or later Allows updating a variable\'s name in ThoughtSpot. Requires ADMINISTRATION role and TENANT scope. The CAN_MANAGE_VARIABLES permission allows you to manage Formula Variables in the current organization scope. The API endpoint allows updating: * The variable name + * @param identifier Unique id or name of the variable to update. + * @param updateVariableRequest + */ + updateVariable(identifier: string, updateVariableRequest: UpdateVariableRequest, _options?: Configuration): Promise; + /** + * Update values for multiple variables Version: 10.14.0.cl or later **Note:** This API endpoint is deprecated and will be removed from ThoughtSpot in a future release. Use [POST /api/rest/2.0/template/variables/{identifier}/update-values](/api/rest/2.0/template/variables/%7Bidentifier%7D/update-values) instead. Allows updating values for multiple variables in ThoughtSpot. Requires ADMINISTRATION role. The CAN_MANAGE_VARIABLES permission allows you to manage Formula Variables in the current organization scope. The API endpoint allows: * Adding new values to variables * Replacing existing values * Deleting values from variables When updating variable values, you need to specify: * The variable identifiers * The values to add/replace/remove for each variable * The operation to perform (ADD, REPLACE, REMOVE, RESET) Behaviour based on operation type: * ADD - Adds values to the variable if this is a list type variable, else same as replace. * REPLACE - Replaces all values of a given set of constraints with the current set of values. * REMOVE - Removes any values which match the set of conditions of the variables if this is a list type variable, else clears value. * RESET - Removes all constrains for a given variable, scope is ignored + * @param updateVariableValuesRequest + */ + updateVariableValues(updateVariableValuesRequest: UpdateVariableValuesRequest, _options?: Configuration): Promise; + /** + * Version: 10.14.0.cl or later Updates an existing webhook configuration by its unique id or name. Only the provided fields will be updated. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) or `DEVELOPER` (**Has developer privilege**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, users with `CAN_MANAGE_WEBHOOKS` (**Can manage webhooks**) privilege are also authorized to perform this action. + * @param webhookIdentifier Unique ID or name of the webhook configuration. + * @param updateWebhookConfigurationRequest + */ + updateWebhookConfiguration(webhookIdentifier: string, updateWebhookConfigurationRequest: UpdateWebhookConfigurationRequest, _options?: Configuration): Promise; + /** + * Version: 26.4.0.cl or later Validates a communication channel configuration to ensure it is properly set up and can receive events. - Use `channel_type` to specify the type of communication channel to validate (e.g., WEBHOOK). - Use `channel_identifier` to provide the unique identifier or name for the communication channel. - Use `event_type` to specify the event type to validate for this channel. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) or `DEVELOPER` (**Has developer privilege**) privilege. For webhook channels, users with `CAN_MANAGE_WEBHOOKS` (**Can manage webhooks**) privilege are also authorized to perform this action. + * @param validateCommunicationChannelRequest + */ + validateCommunicationChannel(validateCommunicationChannelRequest: ValidateCommunicationChannelRequest, _options?: Configuration): Promise; + /** + * Version: 10.10.0.cl or later Validates the email customization configuration if any set for the ThoughtSpot system. #### Pre-requisites Requires `DEVELOPER` (**has developer privilege**) or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `DEVELOPER` (**Has developer privilege**) privilege is required. **NOTE**:This endpoint in currently in beta. Contact ThoughtSpot support to enable this on your instance. + */ + validateEmailCustomization(_options?: Configuration): Promise; + /** + * Version: 9.2.0.cl or later Validates the content of your source branch against the objects in your destination environment. Before merging content from your source branch to the destination branch, run this API operation from your destination environment and ensure that the changes from the source branch function in the destination environment. Requires `DATAMANAGEMENT` (**Can manage data**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance on your instance, the `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` (**Can manage data models**) privilege and edit access to the metadata objects. + * @param validateMergeRequest + */ + validateMerge(validateMergeRequest: ValidateMergeRequest, _options?: Configuration): Promise>; + /** + * Version: 9.12.0.cl or later Validates the authentication token specified in the API request. If your token is not valid, [Get a new token](#/http/api-endpoints/authentication/get-full-access-token). + * @param validateTokenRequest + */ + validateToken(validateTokenRequest: ValidateTokenRequest, _options?: Configuration): Promise; +} + +declare class PromiseUsersApi { + private api; + constructor(configuration: Configuration, requestFactory?: UsersApiRequestFactory, responseProcessor?: UsersApiResponseProcessor); + /** + * Version: 9.7.0.cl or later Activates a deactivated user account. Requires `ADMINISTRATION` (**Can administer Thoughtspot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `USER_ADMINISTRATION` (**Can manage users**) privilege is required. To activate an inactive user account, the API request body must include the following information: - Username or the GUID of the user account. - Auth token generated for the deactivated user. The auth token is sent in the API response when a user is deactivated. - Password for the user account. + * @param activateUserRequest + */ + activateUser(activateUserRequest: ActivateUserRequest, _options?: Configuration): Promise; + /** + * Version: 9.0.0.cl or later Updates the current password of the user. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `USER_ADMINISTRATION` (**Can manage users**) privilege is required. + * @param changeUserPasswordRequest + */ + changeUserPassword(changeUserPasswordRequest: ChangeUserPasswordRequest, _options?: Configuration): Promise; + /** + * Version: 9.0.0.cl or later Creates a user in ThoughtSpot. The API endpoint allows you to configure several user properties such as email address, account status, share notification preferences, and sharing visibility. You can provision the user to [groups](https://docs.thoughtspot.com/cloud/latest/groups-privileges) and [Orgs](https://docs.thoughtspot.com/cloud/latest/orgs-overview). You can also add Liveboard, Answer, and Worksheet objects to the user’s favorites list, assign a default Liveboard for the user, and set user preferences. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `USER_ADMINISTRATION` (**Can manage users**) privilege is required. + * @param createUserRequest + */ + createUser(createUserRequest: CreateUserRequest, _options?: Configuration): Promise; + /** + * Version: 9.7.0.cl or later Deactivates a user account. Requires `ADMINISTRATION` (**Can administer Thoughtspot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `USER_ADMINISTRATION` (**Can manage users**) privilege is required. To deactivate a user account, the API request body must include the following information: - Username or the GUID of the user account - Base URL of the ThoughtSpot instance If the API request is successful, ThoughtSpot returns the activation URL in the response. The activation URL is valid for 14 days and can be used to re-activate the account and reset the password of the deactivated account. + * @param deactivateUserRequest + */ + deactivateUser(deactivateUserRequest: DeactivateUserRequest, _options?: Configuration): Promise; + /** + * Version: 9.0.0.cl or later Deletes a user from the ThoughtSpot system. If you want to remove a user from a specific Org but not from ThoughtSpot, update the group and Org mapping properties of the user object via a POST API call to the [/api/rest/2.0/users/{user_identifier}/update](#/http/api-endpoints/users/update-user) endpoint. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `USER_ADMINISTRATION` (**Can manage users**) privilege is required. + * @param userIdentifier GUID / name of the user + */ + deleteUser(userIdentifier: string, _options?: Configuration): Promise; + /** + * Version: 9.0.0.cl or later Enforces logout on current user sessions. Use this API with caution as it may invalidate active user sessions and force users to re-login. Make sure you specify the usernames or GUIDs. If you pass null values in the API call, all user sessions on your cluster become invalid, and the users are forced to re-login. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `USER_ADMINISTRATION` (**Can manage users**) privilege is required. + * @param forceLogoutUsersRequest + */ + forceLogoutUsers(forceLogoutUsersRequest: ForceLogoutUsersRequest, _options?: Configuration): Promise; + /** + * Version: 9.0.0.cl or later Imports user data from external databases into ThoughtSpot. During the user import operation: * If the specified users are not available in ThoughtSpot, the users are created and assigned a default password. Defining a `default_password` in the API request is optional. * If `delete_unspecified_users` is set to `true`, the users not specified in the API request, excluding the `tsadmin`, `guest`, `system` and `su` users, are deleted. * If the specified user objects are already available in ThoughtSpot, the object properties are updated and synchronized as per the input data in the API request. A successful API call returns the object that represents the changes made in the ThoughtSpot system. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `USER_ADMINISTRATION` (**Can manage users**) privilege is required. + * @param importUsersRequest + */ + importUsers(importUsersRequest: ImportUsersRequest, _options?: Configuration): Promise; + /** + * Version: 9.0.0.cl or later Resets the password of a user account. Administrators can reset password on behalf of a user. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `USER_ADMINISTRATION` (**Can manage users**) privilege is required. + * @param resetUserPasswordRequest + */ + resetUserPassword(resetUserPasswordRequest: ResetUserPasswordRequest, _options?: Configuration): Promise; + /** + * Version: 9.0.0.cl or later Gets a list of users available on the ThoughtSpot system. To get details of a specific user, specify the user GUID or name. You can also filter the API response based on groups, Org ID, user visibility, account status, user type, and user preference settings and favorites. Available to all users. Users with `ADMINISTRATION` (**Can administer ThoughtSpot**) privileges can view all users properties. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `USER_ADMINISTRATION` (**Can manage users**) privilege is required. **NOTE**: If the API returns an empty list, consider increasing the value of the `record_size` parameter. To search across all available users, set `record_size` to `-1`. + * @param searchUsersRequest + */ + searchUsers(searchUsersRequest: SearchUsersRequest, _options?: Configuration): Promise>; + /** + * Version: 9.0.0.cl or later Updates the properties of a user object. You can modify user properties such as username, email, and share notification settings. You can also assign new groups and Orgs, remove the user from a group or Org, reset password, and modify user preferences. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `USER_ADMINISTRATION` (**Can manage users**) privilege is required. + * @param userIdentifier GUID / name of the user + * @param updateUserRequest + */ + updateUser(userIdentifier: string, updateUserRequest: UpdateUserRequest, _options?: Configuration): Promise; +} + +declare class PromiseVariableApi { + private api; + constructor(configuration: Configuration, requestFactory?: VariableApiRequestFactory, responseProcessor?: VariableApiResponseProcessor); + /** + * Create a variable which can be used for parameterizing metadata objects Version: 26.4.0.cl or later Allows creating a variable which can be used for parameterizing metadata objects in ThoughtSpot. Requires ADMINISTRATION role and TENANT scope. The CAN_MANAGE_VARIABLES permission allows you to manage Formula Variables in the current organization scope. The API endpoint supports the following types of variables: * CONNECTION_PROPERTY - For connection properties * TABLE_MAPPING - For table mappings * CONNECTION_PROPERTY_PER_PRINCIPAL - For connection properties per principal. In order to use this please contact support to enable this. * FORMULA_VARIABLE - For Formula variables, introduced in 10.15.0.cl When creating a variable, you need to specify: * The variable type * A unique name for the variable * Whether the variable contains sensitive values (defaults to false) * The data type of the variable, only specify for formula variables (defaults to null) The operation will fail if: * The user lacks required permissions * The variable name already exists * The variable type is invalid + * @param createVariableRequest + */ + createVariable(createVariableRequest: CreateVariableRequest, _options?: Configuration): Promise; + /** + * Delete a variable Version: 10.14.0.cl or later **Note:** This API endpoint is deprecated and will be removed from ThoughtSpot in a future release. Use [POST /api/rest/2.0/template/variables/delete](/api/rest/2.0/template/variables/delete) instead. Allows deleting a variable from ThoughtSpot. Requires ADMINISTRATION role and TENANT scope. The CAN_MANAGE_VARIABLES permission allows you to manage Formula Variables in the current organization scope. The API endpoint requires: * The variable identifier (ID or name) The operation will fail if: * The user lacks required permissions * The variable doesn\'t exist * The variable is being used by other objects + * @param identifier Unique id or name of the variable + */ + deleteVariable(identifier: string, _options?: Configuration): Promise; + /** + * Delete variable(s) Version: 26.4.0.cl or later Allows deleting multiple variables from ThoughtSpot. Requires ADMINISTRATION role and TENANT scope. The CAN_MANAGE_VARIABLES permission allows you to manage Formula Variables in the current organization scope. The API endpoint requires: * The variable identifiers (IDs or names) The operation will fail if: * The user lacks required permissions * Any of the variables don\'t exist * Any of the variables are being used by other objects + * @param deleteVariablesRequest + */ + deleteVariables(deleteVariablesRequest: DeleteVariablesRequest, _options?: Configuration): Promise; + /** + * Update values for a variable Version: 26.4.0.cl or later Allows updating values for a specific variable in ThoughtSpot. Requires ADMINISTRATION role. The CAN_MANAGE_VARIABLES permission allows you to manage Formula Variables in the current organization scope. The API endpoint allows: * Adding new values to the variable * Replacing existing values * Deleting values from the variable * Resetting all values When updating variable values, you need to specify: * The variable identifier (ID or name) * The values to add/replace/remove * The operation to perform (ADD, REPLACE, REMOVE, RESET) Behaviour based on operation type: * ADD - Adds values to the variable if this is a list type variable, else same as replace. * REPLACE - Replaces all values of a given set of constraints with the current set of values. * REMOVE - Removes any values which match the set of conditions of the variables if this is a list type variable, else clears value. * RESET - Removes all constraints for the given variable, scope is ignored + * @param identifier Unique ID or name of the variable + * @param putVariableValuesRequest + */ + putVariableValues(identifier: string, putVariableValuesRequest: PutVariableValuesRequest, _options?: Configuration): Promise; + /** + * Search variables Version: 26.4.0.cl or later Allows searching for variables in ThoughtSpot. Requires ADMINISTRATION role. The CAN_MANAGE_VARIABLES permission allows you to manage Formula Variables in the current organization scope. The API endpoint supports searching variables by: * Variable identifier (ID or name) * Variable type * Name pattern (case-insensitive, supports % for wildcard) The search results can be formatted in three ways: * METADATA - Returns only variable metadata (default) * METADATA_AND_VALUES - Returns variable metadata and values The values can be filtered by scope: * org_identifier * principal_identifier * model_identifier + * @param searchVariablesRequest + */ + searchVariables(searchVariablesRequest: SearchVariablesRequest, _options?: Configuration): Promise>; + /** + * Update a variable\'s name Version: 26.4.0.cl or later Allows updating a variable\'s name in ThoughtSpot. Requires ADMINISTRATION role and TENANT scope. The CAN_MANAGE_VARIABLES permission allows you to manage Formula Variables in the current organization scope. The API endpoint allows updating: * The variable name + * @param identifier Unique id or name of the variable to update. + * @param updateVariableRequest + */ + updateVariable(identifier: string, updateVariableRequest: UpdateVariableRequest, _options?: Configuration): Promise; + /** + * Update values for multiple variables Version: 10.14.0.cl or later **Note:** This API endpoint is deprecated and will be removed from ThoughtSpot in a future release. Use [POST /api/rest/2.0/template/variables/{identifier}/update-values](/api/rest/2.0/template/variables/%7Bidentifier%7D/update-values) instead. Allows updating values for multiple variables in ThoughtSpot. Requires ADMINISTRATION role. The CAN_MANAGE_VARIABLES permission allows you to manage Formula Variables in the current organization scope. The API endpoint allows: * Adding new values to variables * Replacing existing values * Deleting values from variables When updating variable values, you need to specify: * The variable identifiers * The values to add/replace/remove for each variable * The operation to perform (ADD, REPLACE, REMOVE, RESET) Behaviour based on operation type: * ADD - Adds values to the variable if this is a list type variable, else same as replace. * REPLACE - Replaces all values of a given set of constraints with the current set of values. * REMOVE - Removes any values which match the set of conditions of the variables if this is a list type variable, else clears value. * RESET - Removes all constrains for a given variable, scope is ignored + * @param updateVariableValuesRequest + */ + updateVariableValues(updateVariableValuesRequest: UpdateVariableValuesRequest, _options?: Configuration): Promise; +} + +declare class PromiseVersionControlApi { + private api; + constructor(configuration: Configuration, requestFactory?: VersionControlApiRequestFactory, responseProcessor?: VersionControlApiResponseProcessor); + /** + * Version: 9.2.0.cl or later Commits TML files of metadata objects to the Git branch configured on your instance. Requires at least edit access to objects used in the commit operation. Before using this endpoint to push your commits: * Enable Git integration on your instance. * Make sure the Git repository and branch details are configured on your instance. For more information, see [Git integration documentation](https://developers.thoughtspot.com/docs/git-integration). + * @param commitBranchRequest + */ + commitBranch(commitBranchRequest: CommitBranchRequest, _options?: Configuration): Promise; + /** + * Version: 9.2.0.cl or later Allows you to connect a ThoughtSpot instance to a Git repository. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance on your instance, the `CAN_SETUP_VERSION_CONTROL` (**Can set up version control**) privilege. You can use this API endpoint to connect your ThoughtSpot development and production environments to the development and production branches of a Git repository. Before using this endpoint to connect your ThoughtSpot instance to a Git repository, check the following prerequisites: * You have a Git repository. If you are using GitHub, make sure you have a valid account and an access token to connect ThoughtSpot to GitHub. For information about generating a token, see [GitHub Documentation](https://docs.github.com/en/authentication/keeping-your-account-and-data-secure/managing-your-personal-access-tokens). * Your access token has `repo` scope that grants full access to public and private repositories. * Your Git repository has a branch that can be configured as a default branch in ThoughtSpot. For more information, see [Git integration documentation](https://developers.thoughtspot.com/docs/?pageid=git-integration). **Note**: ThoughtSpot supports only GitHub / itHub Enterprise for CI/CD. + * @param createConfigRequest + */ + createConfig(createConfigRequest: CreateConfigRequest, _options?: Configuration): Promise; + /** + * Version: 9.2.0.cl or later Deletes Git repository configuration from your ThoughtSpot instance. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance on your instance, the `CAN_SETUP_VERSION_CONTROL` (**Can set up version control**) privilege. + * @param deleteConfigRequest + */ + deleteConfig(deleteConfigRequest: DeleteConfigRequest, _options?: Configuration): Promise; + /** + * Version: 9.2.0.cl or later Allows you to deploy a commit and publish TML content to your ThoughtSpot instance. Requires at least edit access to the objects used in the deploy operation. The API deploys the head of the branch unless a `commit_id` is specified in the API request. If the branch name is not defined in the request, the default branch is considered for deploying commits. For more information, see [Git integration documentation](https://developers.thoughtspot.com/docs/git-integration). + * @param deployCommitRequest + */ + deployCommit(deployCommitRequest: DeployCommitRequest, _options?: Configuration): Promise>; + /** + * Version: 9.2.0.cl or later Reverts TML objects to a previous commit specified in the API request. Requires at least edit access to objects. In the API request, specify the `commit_id`. If the branch name is not specified in the request, the API will consider the default branch configured on your instance. By default, the API reverts all objects. If the revert operation fails for one of the objects provided in the commit, the API returns an error and does not revert any object. For more information, see [Git integration documentation](https://developers.thoughtspot.com/docs/git-integration). + * @param commitId Commit id to which the object should be reverted + * @param revertCommitRequest + */ + revertCommit(commitId: string, revertCommitRequest: RevertCommitRequest, _options?: Configuration): Promise; + /** + * Version: 9.2.0.cl or later Gets a list of commits for a given metadata object. Requires `DATAMANAGEMENT` (**Can manage data**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance on your instance, the `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` (**Can manage data models**) privilege and edit access to the metadata objects. + * @param searchCommitsRequest + */ + searchCommits(searchCommitsRequest: SearchCommitsRequest, _options?: Configuration): Promise>; + /** + * Version: 9.2.0.cl or later Gets Git repository connections configured on the ThoughtSpot instance. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance on your instance, the `CAN_SETUP_VERSION_CONTROL` (**Can set up version control**) privilege. + * @param searchConfigRequest + */ + searchConfig(searchConfigRequest: SearchConfigRequest, _options?: Configuration): Promise>; + /** + * Version: 9.2.0.cl or later Updates Git repository configuration settings. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance on your instance, the `CAN_SETUP_VERSION_CONTROL` (**Can set up version control**) privilege. + * @param updateConfigRequest + */ + updateConfig(updateConfigRequest: UpdateConfigRequest, _options?: Configuration): Promise; + /** + * Version: 9.2.0.cl or later Validates the content of your source branch against the objects in your destination environment. Before merging content from your source branch to the destination branch, run this API operation from your destination environment and ensure that the changes from the source branch function in the destination environment. Requires `DATAMANAGEMENT` (**Can manage data**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance on your instance, the `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` (**Can manage data models**) privilege and edit access to the metadata objects. + * @param validateMergeRequest + */ + validateMerge(validateMergeRequest: ValidateMergeRequest, _options?: Configuration): Promise>; +} + +declare class PromiseWebhooksApi { + private api; + constructor(configuration: Configuration, requestFactory?: WebhooksApiRequestFactory, responseProcessor?: WebhooksApiResponseProcessor); + /** + * Version: 10.14.0.cl or later Creates a new webhook configuration to receive notifications for specified events. The webhook will be triggered when the configured events occur in the system. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) or `DEVELOPER` (**Has developer privilege**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, users with `CAN_MANAGE_WEBHOOKS` (**Can manage webhooks**) privilege are also authorized to perform this action. + * @param createWebhookConfigurationRequest + */ + createWebhookConfiguration(createWebhookConfigurationRequest: CreateWebhookConfigurationRequest, _options?: Configuration): Promise; + /** + * Version: 10.14.0.cl or later Deletes one or more webhook configurations by their unique id or name. Returns status of each deletion operation, including successfully deleted webhooks and any failures with error details. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) or `DEVELOPER` (**Has developer privilege**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, users with `CAN_MANAGE_WEBHOOKS` (**Can manage webhooks**) privilege are also authorized to perform this action. + * @param deleteWebhookConfigurationsRequest + */ + deleteWebhookConfigurations(deleteWebhookConfigurationsRequest: DeleteWebhookConfigurationsRequest, _options?: Configuration): Promise; + /** + * Version: 10.14.0.cl or later Searches for webhook configurations based on various criteria such as Org, webhook identifier, event type, with support for pagination and sorting. Returns matching webhook configurations with their complete details. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) or `DEVELOPER` (**Has developer privilege**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, users with `CAN_MANAGE_WEBHOOKS` (**Can manage webhooks**) privilege are also authorized to perform this action. + * @param searchWebhookConfigurationsRequest + */ + searchWebhookConfigurations(searchWebhookConfigurationsRequest: SearchWebhookConfigurationsRequest, _options?: Configuration): Promise; + /** + * Version: 10.14.0.cl or later Updates an existing webhook configuration by its unique id or name. Only the provided fields will be updated. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) or `DEVELOPER` (**Has developer privilege**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, users with `CAN_MANAGE_WEBHOOKS` (**Can manage webhooks**) privilege are also authorized to perform this action. + * @param webhookIdentifier Unique ID or name of the webhook configuration. + * @param updateWebhookConfigurationRequest + */ + updateWebhookConfiguration(webhookIdentifier: string, updateWebhookConfigurationRequest: UpdateWebhookConfigurationRequest, _options?: Configuration): Promise; +} + +/** + * Options for additional configuration settings + */ +interface ConfigurationOptions { + /** + * Additional headers to be included in every request + * @example + * ```typescript + * { + * additionalHeaders: { + * "Accept-Language": "en-US", + * } + * } + * ``` + */ + additionalHeaders?: Record; +} +/** + * creates a bearer authentication configuration using params or a token provider + * @param thoughtSpotHost thoughtSpotHost URL + * @param paramOrTokenProvider either a GetFullAccessTokenRequest or a TokenProvider , + * Pass a GetFullAccessTokenRequest which contains the object body required to get a full access token , or + * function which returns a promise of a string which is the full access token + * @param options - Optional configuration for custom headers and other settings + * @returns Configuration object ready for authenticated API calls + * @example + * ```typescript + * const configWithTokenProvider = createBearerAuthenticationConfig( + * "CLUSTER_SERVER_URL", + * YOUR_TOKEN_PROVIDER, + * { + * additionalHeaders: { + * "Accept-Language": "en-US", + * } + * } + * ); + */ +declare const createBearerAuthenticationConfig: (thoughtSpotHost: string, paramOrTokenProvider: GetFullAccessTokenRequest | (() => Promise), options?: ConfigurationOptions) => Configuration; +/** + * creates a basic configuration using params which does not require authentication + * @param thoughtSpotHost : the base url of the server + * @param options - Optional configuration for additional headers and other settings + * @returns Basic client configuration for unauthenticated API calls + */ +declare const createBasicConfig: (thoughtSpotHost: string, options?: ConfigurationOptions) => Configuration; + +export { PromiseAIApi as AIApi, AIContext, APIKey, APIKeyInput, AccessToken, ActionConfig, ActionConfigInput, ActionConfigInputCreate, ActionConfigInputCreatePositionEnum, ActionConfigInputPositionEnum, ActionDetails, ActionDetailsInput, ActionDetailsInputCreate, ActivateUserRequest, AgentConversation, AnswerContent, AnswerDataResponse, AnswerPngOptionsInput, ApiException, ApiKeyConfiguration, AssignChangeAuthorRequest, AssignTagRequest, AssociateMetadataInput, AssociateMetadataInputCreate, AssociateMetadataInputCreateTypeEnum, AssociateMetadataInputTypeEnum, AuthClusterPreferences, AuthClusterPreferencesAuthStatusEnum, AuthClusterPreferencesInput, AuthClusterPreferencesInputAuthStatusEnum, AuthMethods, AuthMethodsConfiguration, AuthOrgInfo, AuthOrgPreference, AuthOrgPreferenceAuthStatusEnum, AuthOrgPreferenceInput, AuthOrgPreferenceInputAuthStatusEnum, AuthSettingsAccessToken, Authentication, PromiseAuthenticationApi as AuthenticationApi, AuthenticationInput, Author, AuthorMetadataTypeInput, AuthorMetadataTypeInputTypeEnum, AuthorType, AwsS3Config, AwsS3ConfigInput, BaseServerConfiguration, BasicAuth, BasicAuthInput, BearerAuthAuthentication, CALLBACK, CALLBACKInput, CALLBACKInputMandatory, CalendarResponse, ChangeUserPasswordRequest, ChannelHistoryEventInfo, ChannelHistoryEventInfoTypeEnum, ChannelHistoryEventInput, ChannelHistoryEventInputTypeEnum, ChannelHistoryJob, ChannelHistoryJobStatusEnum, ChannelValidationAwsS3Info, ChannelValidationDetail, ChannelValidationDetailStatusEnum, ChannelValidationDetailValidationStepEnum, ClusterNonEmbedAccess, ClusterNonEmbedAccessInput, Collection, CollectionDeleteResponse, CollectionDeleteTypeIdentifiers, CollectionEntityIdentifier, CollectionMetadataInput, CollectionMetadataInputTypeEnum, CollectionMetadataItem, CollectionSearchResponse, PromiseCollectionsApi as CollectionsApi, Column, ColumnSecurityRule, ColumnSecurityRuleColumn, ColumnSecurityRuleGroup, ColumnSecurityRuleGroupOperation, ColumnSecurityRuleGroupOperationOperationEnum, ColumnSecurityRuleResponse, ColumnSecurityRuleSourceTable, ColumnSecurityRuleTableInput, ColumnSecurityRuleUpdate, CommitBranchRequest, CommitFileType, CommitHistoryResponse, CommitResponse, CommiterType, CommunicationChannelPreferencesResponse, CommunicationChannelValidateResponse, CommunicationChannelValidateResponseChannelTypeEnum, CommunicationChannelValidateResponseEventTypeEnum, CommunicationChannelValidateResponseResultCodeEnum, Configuration, ConfigureAuthSettingsRequest, ConfigureAuthSettingsRequestAuthTypeEnum, ConfigureAuthSettingsRequestClusterPreferences, ConfigureAuthSettingsRequestClusterPreferencesAuthStatusEnum, ConfigureCommunicationChannelPreferencesRequest, ConfigureSecuritySettingsRequest, ConfigureSecuritySettingsRequestClusterPreferences, ConnectionConfigurationResponse, ConnectionConfigurationResponseDataWarehouseTypeEnum, ConnectionConfigurationResponsePolicyProcessesEnum, ConnectionConfigurationResponsePolicyTypeEnum, ConnectionConfigurationSearchRequest, ConnectionConfigurationSearchRequestPolicyTypeEnum, PromiseConnectionConfigurationsApi as ConnectionConfigurationsApi, ConnectionInput, PromiseConnectionsApi as ConnectionsApi, ContextPayloadV2Input, ContextPayloadV2InputTypeEnum, Conversation, ConversationSettingsInput, ConvertWorksheetToModelRequest, CopyObjectRequest, CopyObjectRequestTypeEnum, CreateAgentConversationRequest, CreateAgentConversationRequestConversationSettings, CreateAgentConversationRequestMetadataContext, CreateAgentConversationRequestMetadataContextTypeEnum, CreateCalendarRequest, CreateCalendarRequestCalendarTypeEnum, CreateCalendarRequestCreationMethodEnum, CreateCalendarRequestMonthOffsetEnum, CreateCalendarRequestStartDayOfWeekEnum, CreateCalendarRequestTableReference, CreateCollectionRequest, CreateConfigRequest, CreateConnectionConfigurationRequest, CreateConnectionConfigurationRequestAuthenticationTypeEnum, CreateConnectionConfigurationRequestPolicyProcessOptions, CreateConnectionConfigurationRequestPolicyProcessesEnum, CreateConnectionConfigurationRequestPolicyTypeEnum, CreateConnectionRequest, CreateConnectionRequestDataWarehouseTypeEnum, CreateConnectionResponse, CreateConnectionResponseDataWarehouseTypeEnum, CreateConversationRequest, CreateCustomActionRequest, CreateCustomActionRequestActionDetails, CreateCustomActionRequestDefaultActionConfig, CreateEmailCustomizationRequest, CreateEmailCustomizationRequestTemplateProperties, CreateEmailCustomizationResponse, CreateOrgRequest, CreateRoleRequest, CreateRoleRequestPrivilegesEnum, CreateScheduleRequest, CreateScheduleRequestFileFormatEnum, CreateScheduleRequestFrequency, CreateScheduleRequestLiveboardOptions, CreateScheduleRequestMetadataTypeEnum, CreateScheduleRequestPdfOptions, CreateScheduleRequestPdfOptionsPageSizeEnum, CreateScheduleRequestRecipientDetails, CreateScheduleRequestTimeZoneEnum, CreateTagRequest, CreateUserGroupRequest, CreateUserGroupRequestPrivilegesEnum, CreateUserGroupRequestTypeEnum, CreateUserGroupRequestVisibilityEnum, CreateUserRequest, CreateUserRequestAccountStatusEnum, CreateUserRequestAccountTypeEnum, CreateUserRequestPreferredLocaleEnum, CreateUserRequestVisibilityEnum, CreateVariableRequest, CreateVariableRequestDataTypeEnum, CreateVariableRequestTypeEnum, CreateWebhookConfigurationRequest, CreateWebhookConfigurationRequestAuthentication, CreateWebhookConfigurationRequestEventsEnum, CreateWebhookConfigurationRequestSignatureVerification, CreateWebhookConfigurationRequestSignatureVerificationAlgorithmEnum, CreateWebhookConfigurationRequestSignatureVerificationTypeEnum, CreateWebhookConfigurationRequestStorageDestination, CreateWebhookConfigurationRequestStorageDestinationStorageTypeEnum, CronExpression, CronExpressionInput, CspSettings, CspSettingsInput, PromiseCustomActionApi as CustomActionApi, CustomActionMetadataTypeInput, CustomActionMetadataTypeInputTypeEnum, PromiseCustomCalendarsApi as CustomCalendarsApi, PromiseDBTApi as DBTApi, PromiseDataApi as DataApi, DataSource, DataSourceContextInput, DataWarehouseObjectInput, DataWarehouseObjects, Database, DbtSearchResponse, DeactivateUserRequest, DefaultActionConfig, DefaultActionConfigInput, DefaultActionConfigInputCreate, DefaultActionConfigSearchInput, DeleteCollectionRequest, DeleteConfigRequest, DeleteConnectionConfigurationRequest, DeleteConnectionRequest, DeleteMetadataRequest, DeleteMetadataTypeInput, DeleteMetadataTypeInputTypeEnum, DeleteOrgEmailCustomizationRequest, DeleteVariablesRequest, DeleteWebhookConfigurationsRequest, DeployCommitRequest, DeployCommitRequestDeployPolicyEnum, DeployCommitRequestDeployTypeEnum, DeployResponse, PromiseEmailCustomizationApi as EmailCustomizationApi, EntityHeader, ErrorResponse, EurekaDataSourceSuggestionResponse, EurekaDecomposeQueryResponse, EurekaGetNLInstructionsResponse, EurekaGetRelevantQuestionsResponse, EurekaLLMDecomposeQueryResponse, EurekaLLMSuggestedQuery, EurekaRelevantQuestion, EurekaSetNLInstructionsResponse, EventChannelConfig, EventChannelConfigChannelsEnum, EventChannelConfigEventTypeEnum, EventChannelConfigInput, EventChannelConfigInputChannelsEnum, EventChannelConfigInputEventTypeEnum, ExcludeMetadataListItemInput, ExcludeMetadataListItemInputTypeEnum, ExportAnswerReportRequest, ExportAnswerReportRequestFileFormatEnum, ExportAnswerReportRequestPngOptions, ExportAnswerReportRequestRegionalSettings, ExportAnswerReportRequestRegionalSettingsCurrencyFormatEnum, ExportAnswerReportRequestRegionalSettingsDateFormatLocaleEnum, ExportAnswerReportRequestRegionalSettingsNumberFormatLocaleEnum, ExportAnswerReportRequestRegionalSettingsUserLocaleEnum, ExportAnswerReportRequestTypeEnum, ExportLiveboardReportRequest, ExportLiveboardReportRequestFileFormatEnum, ExportLiveboardReportRequestPdfOptions, ExportLiveboardReportRequestPdfOptionsPageOrientationEnum, ExportLiveboardReportRequestPdfOptionsPageSizeEnum, ExportLiveboardReportRequestPngOptions, ExportMetadataTMLBatchedRequest, ExportMetadataTMLBatchedRequestEdocFormatEnum, ExportMetadataTMLBatchedRequestMetadataTypeEnum, ExportMetadataTMLRequest, ExportMetadataTMLRequestEdocFormatEnum, ExportMetadataTMLRequestExportOptions, ExportMetadataTMLRequestExportSchemaVersionEnum, ExportMetadataTypeInput, ExportMetadataTypeInputTypeEnum, ExportOptions, ExternalTableInput, FavoriteMetadataInput, FavoriteMetadataInputTypeEnum, FavoriteMetadataItem, FavoriteMetadataItemTypeEnum, FavoriteObjectOptionsInput, FetchAnswerDataRequest, FetchAnswerDataRequestDataFormatEnum, FetchAnswerSqlQueryRequest, FetchAsyncImportTaskStatusRequest, FetchAsyncImportTaskStatusRequestTaskStatusEnum, FetchColumnSecurityRulesRequest, FetchConnectionDiffStatusResponse, FetchLiveboardDataRequest, FetchLiveboardDataRequestDataFormatEnum, FetchLiveboardSqlQueryRequest, FetchLogsRequest, FetchLogsRequestLogTypeEnum, FetchObjectPrivilegesRequest, FetchPermissionsOfPrincipalsRequest, FetchPermissionsOfPrincipalsRequestDefaultMetadataTypeEnum, FetchPermissionsOnMetadataRequest, FilterRules, FilterRulesOperatorEnum, ForceLogoutUsersRequest, Frequency, FrequencyInput, GenerateCSVRequest, GenerateCSVRequestCalendarTypeEnum, GenerateCSVRequestMonthOffsetEnum, GenerateCSVRequestStartDayOfWeekEnum, GenericInfo, GetAsyncImportStatusResponse, GetCustomAccessTokenRequest, GetCustomAccessTokenRequestPersistOptionEnum, GetDataSourceSuggestionsRequest, GetFullAccessTokenRequest, GetFullAccessTokenRequestUserParameters, GetNLInstructionsRequest, GetObjectAccessTokenRequest, GetRelevantQuestionsRequest, GetRelevantQuestionsRequestAiContext, GetRelevantQuestionsRequestMetadataContext, GetTokenResponse, GroupInfo, GroupObject, PromiseGroupsApi as GroupsApi, GroupsImportListInput, GroupsImportListInputPrivilegesEnum, GroupsImportListInputTypeEnum, GroupsImportListInputVisibilityEnum, HeaderAttributeInput, HeaderUpdateInput, HeaderUpdateInputTypeEnum, HttpBasicConfiguration, HttpBearerConfiguration, HttpException, HttpFile, HttpLibrary, HttpMethod, ImportEPackAsyncTaskStatus, ImportEPackAsyncTaskStatusImportPolicyEnum, ImportEPackAsyncTaskStatusTaskStatusEnum, ImportMetadataTMLAsyncRequest, ImportMetadataTMLAsyncRequestImportPolicyEnum, ImportMetadataTMLRequest, ImportMetadataTMLRequestImportPolicyEnum, ImportUser, ImportUserAccountStatusEnum, ImportUserAccountTypeEnum, ImportUserGroupsRequest, ImportUserGroupsResponse, ImportUserPreferredLocaleEnum, ImportUserType, ImportUserVisibilityEnum, ImportUsersRequest, ImportUsersResponse, InputEurekaNLSRequest, IsomorphicFetchHttpLibrary, JWTMetadataObject, JWTMetadataObjectTypeEnum, JWTParameter, JWTUserOptions, JWTUserOptionsFull, JobRecipient, JobRecipientTypeEnum, PromiseJobsApi as JobsApi, LiveboardContent, LiveboardDataResponse, LiveboardOptions, LiveboardOptionsInput, PromiseLogApi as LogApi, LogResponse, LoginRequest, ManageObjectPrivilegeRequest, ManageObjectPrivilegeRequestMetadataTypeEnum, ManageObjectPrivilegeRequestObjectPrivilegeTypesEnum, ManageObjectPrivilegeRequestOperationEnum, PromiseMetadataApi as MetadataApi, MetadataAssociationItem, MetadataContext, MetadataInput, MetadataInputTypeEnum, MetadataListItemInput, MetadataListItemInputSubtypesEnum, MetadataListItemInputTypeEnum, MetadataObject, MetadataObjectTypeEnum, MetadataResponse, MetadataResponseTypeEnum, MetadataSearchResponse, MetadataSearchResponseMetadataTypeEnum, MetadataSearchSortOptions, MetadataSearchSortOptionsFieldNameEnum, MetadataSearchSortOptionsOrderEnum, PromiseMiddleware as Middleware, ModelTableList, NLInstructionsInfo, NLInstructionsInfoInput, NLInstructionsInfoInputScopeEnum, NLInstructionsInfoScopeEnum, OAuth2Configuration, ObjectIDAndName, ObjectPrivilegesMetadataInput, ObjectPrivilegesMetadataInputTypeEnum, ObjectPrivilegesOfMetadataResponse, Org, OrgChannelConfigInput, OrgChannelConfigInputOperationEnum, OrgChannelConfigInputResetEventsEnum, OrgChannelConfigResponse, OrgDetails, OrgInfo, OrgNonEmbedAccess, OrgNonEmbedAccessInput, OrgPreferenceSearchCriteriaInput, OrgPreferenceSearchCriteriaInputEventTypesEnum, OrgResponse, OrgResponseStatusEnum, OrgResponseVisibilityEnum, OrgType, PromiseOrgsApi as OrgsApi, ParameterValues, ParameterizeMetadataFieldsRequest, ParameterizeMetadataFieldsRequestFieldTypeEnum, ParameterizeMetadataFieldsRequestMetadataTypeEnum, ParameterizeMetadataRequest, ParameterizeMetadataRequestFieldTypeEnum, ParameterizeMetadataRequestMetadataTypeEnum, ParametersListItem, ParametersListItemInput, PdfOptions, PdfOptionsInput, PdfOptionsInputPageOrientationEnum, PdfOptionsInputPageSizeEnum, PdfOptionsPageSizeEnum, PermissionInput, PermissionInputShareModeEnum, PermissionOfMetadataResponse, PermissionOfPrincipalsResponse, PermissionsMetadataTypeInput, PermissionsMetadataTypeInputTypeEnum, PngOptionsInput, PolicyProcessOptions, PolicyProcessOptionsInput, PrincipalsInput, PrincipalsInputTypeEnum, PrincipalsListItem, PrincipalsListItemInput, PromiseHttpLibrary, PublishMetadataListItem, PublishMetadataListItemTypeEnum, PublishMetadataRequest, PutVariableValuesRequest, PutVariableValuesRequestOperationEnum, QueryGetDecomposedQueryRequest, QueryGetDecomposedQueryRequestNlsRequest, RecipientDetails, RecipientDetailsInput, RegionalSettingsInput, RegionalSettingsInputCurrencyFormatEnum, RegionalSettingsInputDateFormatLocaleEnum, RegionalSettingsInputNumberFormatLocaleEnum, RegionalSettingsInputUserLocaleEnum, RepoConfigObject, PromiseReportsApi as ReportsApi, RequestBody, RequestContext, RequiredError, ResetUserPasswordRequest, ResponseActivationURL, ResponseBody, ResponseContext, ResponseCopyObject, ResponseCustomAction, ResponseFailedEntities, ResponseFailedEntity, ResponseIncompleteEntities, ResponseIncompleteEntity, ResponseMessage, ResponseMessageMessageTypeEnum, ResponseMessageVisualizationTypeEnum, ResponsePostUpgradeFailedEntities, ResponsePostUpgradeFailedEntity, ResponseSchedule, ResponseScheduleRun, ResponseSuccessfulEntities, ResponseSuccessfulEntity, ResponseWorksheetToModelConversion, RevertCommitRequest, RevertCommitRequestRevertPolicyEnum, RevertResponse, RevertedMetadata, RevokeRefreshTokensRequest, RevokeRefreshTokensResponse, RevokeTokenRequest, RiseGQLArgWrapper, RiseSetter, Role, RoleResponse, RoleResponsePermissionEnum, RoleResponsePrivilegesEnum, PromiseRolesApi as RolesApi, RuntimeFilter, RuntimeFilters, RuntimeFiltersOperatorEnum, RuntimeParamOverride, RuntimeParameters, RuntimeSort, RuntimeSorts, RuntimeSortsOrderEnum, ScheduleHistoryRunsOptionsInput, PromiseSchedulesApi as SchedulesApi, SchedulesPdfOptionsInput, SchedulesPdfOptionsInputPageSizeEnum, SchemaObject, Scope, ScriptSrcUrls, ScriptSrcUrlsInput, SearchAuthSettingsRequest, SearchAuthSettingsRequestAuthTypeEnum, SearchAuthSettingsRequestScopeEnum, SearchAuthSettingsResponse, SearchAuthSettingsResponseAuthTypeEnum, SearchCalendarsRequest, SearchCalendarsRequestSortOptions, SearchCalendarsRequestSortOptionsFieldNameEnum, SearchCalendarsRequestSortOptionsOrderEnum, SearchChannelHistoryRequest, SearchChannelHistoryRequestChannelStatusEnum, SearchChannelHistoryRequestChannelTypeEnum, SearchChannelHistoryResponse, SearchCollectionsRequest, SearchCollectionsRequestSortOptions, SearchCollectionsRequestSortOptionsFieldNameEnum, SearchCollectionsRequestSortOptionsOrderEnum, SearchCommitsRequest, SearchCommitsRequestMetadataTypeEnum, SearchCommunicationChannelPreferencesRequest, SearchCommunicationChannelPreferencesRequestClusterPreferencesEnum, SearchConfigRequest, SearchConnectionRequest, SearchConnectionRequestAuthenticationTypeEnum, SearchConnectionRequestDataWarehouseObjectTypeEnum, SearchConnectionRequestDataWarehouseTypesEnum, SearchConnectionRequestSortOptions, SearchConnectionRequestSortOptionsFieldNameEnum, SearchConnectionRequestSortOptionsOrderEnum, SearchConnectionResponse, SearchConnectionResponseDataWarehouseTypeEnum, SearchCustomActionsRequest, SearchCustomActionsRequestDefaultActionConfig, SearchCustomActionsRequestTypeEnum, SearchDataRequest, SearchDataRequestDataFormatEnum, SearchDataResponse, SearchEmailCustomizationRequest, SearchMetadataRequest, SearchMetadataRequestDependentObjectVersionEnum, SearchMetadataRequestFavoriteObjectOptions, SearchMetadataRequestLiveboardResponseVersionEnum, SearchMetadataRequestSortOptions, SearchMetadataRequestSortOptionsFieldNameEnum, SearchMetadataRequestSortOptionsOrderEnum, SearchOrgsRequest, SearchOrgsRequestStatusEnum, SearchOrgsRequestVisibilityEnum, SearchRoleResponse, SearchRoleResponsePermissionEnum, SearchRoleResponsePrivilegesEnum, SearchRolesRequest, SearchRolesRequestPermissionsEnum, SearchRolesRequestPrivilegesEnum, SearchSchedulesRequest, SearchSchedulesRequestHistoryRunsOptions, SearchSchedulesRequestSortOptions, SearchSecuritySettingsRequest, SearchSecuritySettingsRequestScopeEnum, SearchTagsRequest, SearchUserGroupsRequest, SearchUserGroupsRequestPrivilegesEnum, SearchUserGroupsRequestSortOptions, SearchUserGroupsRequestSortOptionsFieldNameEnum, SearchUserGroupsRequestSortOptionsOrderEnum, SearchUserGroupsRequestTypeEnum, SearchUserGroupsRequestVisibilityEnum, SearchUsersRequest, SearchUsersRequestAccountStatusEnum, SearchUsersRequestAccountTypeEnum, SearchUsersRequestPrivilegesEnum, SearchUsersRequestVisibilityEnum, SearchVariablesRequest, SearchVariablesRequestResponseContentEnum, SearchWebhookConfigurationsRequest, SearchWebhookConfigurationsRequestEventTypeEnum, SearchWebhookConfigurationsRequestSortOptions, SearchWebhookConfigurationsRequestSortOptionsFieldNameEnum, SearchWebhookConfigurationsRequestSortOptionsOrderEnum, PromiseSecurityApi as SecurityApi, SecurityAuthentication, SecuritySettingsClusterPreferences, SecuritySettingsClusterPreferencesInput, SecuritySettingsClusterPreferencesTrustedAuthStatusEnum, SecuritySettingsOrgDetails, SecuritySettingsOrgPreferences, SecuritySettingsOrgPreferencesInput, SecuritySettingsOrgPreferencesTrustedAuthStatusEnum, SecuritySettingsResponse, SelfDecodingBody, SendAgentConversationMessageRequest, SendAgentConversationMessageStreamingRequest, SendAgentMessageRequest, SendAgentMessageResponse, SendAgentMessageStreamingRequest, SendMessageRequest, ServerConfiguration, SetNLInstructionsRequest, ShareMetadataRequest, ShareMetadataRequestMetadataTypeEnum, ShareMetadataTypeInput, ShareMetadataTypeInputTypeEnum, SharePermissionsInput, SharePermissionsInputContentShareModeEnum, SharePermissionsInputShareModeEnum, SingleAnswerRequest, SortOption, SortOptionFieldNameEnum, SortOptionInput, SortOptionInputFieldNameEnum, SortOptionInputOrderEnum, SortOptionOrderEnum, SortOptions, SortOptionsFieldNameEnum, SortOptionsOrderEnum, SortingOptions, SqlQuery, SqlQueryResponse, SqlQueryResponseMetadataTypeEnum, StorageConfig, StorageConfigInput, StorageDestination, StorageDestinationInput, StorageDestinationInputStorageTypeEnum, StorageDestinationStorageTypeEnum, SyncMetadataRequest, SyncMetadataRequestSyncAttributesEnum, SyncMetadataResponse, SyncMetadataResponseStatusEnum, PromiseSystemApi as SystemApi, SystemConfig, SystemInfo, SystemOverrideInfo, Table, Tag, TagMetadataTypeInput, TagMetadataTypeInputTypeEnum, PromiseTagsApi as TagsApi, TemplatePropertiesInputCreate, PromiseThoughtSpotRestApi as ThoughtSpotRestApi, Token, TokenAccessScopeObject, TokenAccessScopeObjectTypeEnum, TokenProvider, TokenValidationResponse, URL, URLInput, URLInputMandatory, UnassignTagRequest, UnparameterizeMetadataRequest, UnparameterizeMetadataRequestFieldTypeEnum, UnparameterizeMetadataRequestMetadataTypeEnum, UnpublishMetadataRequest, UpdateCalendarRequest, UpdateCalendarRequestCalendarTypeEnum, UpdateCalendarRequestMonthOffsetEnum, UpdateCalendarRequestStartDayOfWeekEnum, UpdateCalendarRequestTableReference, UpdateCalendarRequestUpdateMethodEnum, UpdateCollectionRequest, UpdateCollectionRequestOperationEnum, UpdateColumnSecurityRulesRequest, UpdateConfigRequest, UpdateConnectionConfigurationRequest, UpdateConnectionConfigurationRequestAuthenticationTypeEnum, UpdateConnectionConfigurationRequestPolicyProcessesEnum, UpdateConnectionConfigurationRequestPolicyTypeEnum, UpdateConnectionRequest, UpdateConnectionStatusRequest, UpdateConnectionStatusRequestStatusEnum, UpdateConnectionV2Request, UpdateCustomActionRequest, UpdateCustomActionRequestActionDetails, UpdateCustomActionRequestDefaultActionConfig, UpdateCustomActionRequestOperationEnum, UpdateEmailCustomizationRequest, UpdateMetadataHeaderRequest, UpdateMetadataObjIdRequest, UpdateObjIdInput, UpdateObjIdInputTypeEnum, UpdateOrgRequest, UpdateOrgRequestOperationEnum, UpdateRoleRequest, UpdateRoleRequestPrivilegesEnum, UpdateScheduleRequest, UpdateScheduleRequestFileFormatEnum, UpdateScheduleRequestFrequency, UpdateScheduleRequestLiveboardOptions, UpdateScheduleRequestMetadataTypeEnum, UpdateScheduleRequestPdfOptions, UpdateScheduleRequestPdfOptionsPageSizeEnum, UpdateScheduleRequestRecipientDetails, UpdateScheduleRequestStatusEnum, UpdateScheduleRequestTimeZoneEnum, UpdateSystemConfigRequest, UpdateTagRequest, UpdateUserGroupRequest, UpdateUserGroupRequestOperationEnum, UpdateUserGroupRequestPrivilegesEnum, UpdateUserGroupRequestTypeEnum, UpdateUserGroupRequestVisibilityEnum, UpdateUserRequest, UpdateUserRequestAccountStatusEnum, UpdateUserRequestAccountTypeEnum, UpdateUserRequestOperationEnum, UpdateUserRequestPreferredLocaleEnum, UpdateUserRequestVisibilityEnum, UpdateVariableRequest, UpdateVariableValuesRequest, UpdateWebhookConfigurationRequest, UpdateWebhookConfigurationRequestEventsEnum, User, UserAccountStatusEnum, UserAccountTypeEnum, UserGroup, UserGroupResponse, UserGroupResponseParentTypeEnum, UserGroupResponseTypeEnum, UserGroupResponseVisibilityEnum, UserInfo, UserObject, UserObjectTypeEnum, UserParameterOptions, UserParentTypeEnum, UserPrincipal, UserVisibilityEnum, PromiseUsersApi as UsersApi, ValidateCommunicationChannelRequest, ValidateCommunicationChannelRequestChannelTypeEnum, ValidateCommunicationChannelRequestEventTypeEnum, ValidateMergeRequest, ValidateTokenRequest, ValueScopeInput, ValueScopeInputPrincipalTypeEnum, Variable, PromiseVariableApi as VariableApi, VariableDetailInput, VariableDetailInputTypeEnum, VariableOrgInfo, VariablePutAssignmentInput, VariablePutAssignmentInputPrincipalTypeEnum, VariableUpdateAssignmentInput, VariableUpdateAssignmentInputOperationEnum, VariableUpdateScopeInput, VariableUpdateScopeInputPrincipalTypeEnum, VariableValue, VariableValuePrincipalTypeEnum, VariableValues, VariableVariableTypeEnum, PromiseVersionControlApi as VersionControlApi, WebhookAuthApiKey, WebhookAuthApiKeyInput, WebhookAuthBasicAuth, WebhookAuthBasicAuthInput, WebhookAuthOAuth2, WebhookAuthOAuth2Input, WebhookAuthentication, WebhookAuthenticationInput, WebhookDeleteFailure, WebhookDeleteResponse, WebhookKeyValuePair, WebhookKeyValuePairInput, WebhookOrg, WebhookPagination, WebhookResponse, WebhookResponseEventsEnum, WebhookSearchResponse, WebhookSignatureVerification, WebhookSignatureVerificationAlgorithmEnum, WebhookSignatureVerificationInput, WebhookSignatureVerificationInputAlgorithmEnum, WebhookSignatureVerificationInputTypeEnum, WebhookSignatureVerificationTypeEnum, WebhookSortOptionsInput, WebhookSortOptionsInputFieldNameEnum, WebhookSortOptionsInputOrderEnum, WebhookUser, PromiseWebhooksApi as WebhooksApi, configureAuthMethods, createBasicConfig, createBearerAuthenticationConfig, createConfiguration, server1, servers, wrapHttpLibrary }; diff --git a/sdks/typescript/dist/index.js b/sdks/typescript/dist/index.js new file mode 100644 index 000000000..748990aa6 --- /dev/null +++ b/sdks/typescript/dist/index.js @@ -0,0 +1,59229 @@ +var __async = (__this, __arguments, generator) => { + return new Promise((resolve, reject) => { + var fulfilled = (value) => { + try { + step(generator.next(value)); + } catch (e) { + reject(e); + } + }; + var rejected = (value) => { + try { + step(generator.throw(value)); + } catch (e) { + reject(e); + } + }; + var step = (x) => x.done ? resolve(x.value) : Promise.resolve(x.value).then(fulfilled, rejected); + step((generator = generator.apply(__this, __arguments)).next()); + }); +}; + +// rxjsStub.ts +var Observable = class _Observable { + constructor(promise) { + this.promise = promise; + } + toPromise() { + return this.promise; + } + pipe(callback) { + return new _Observable(this.promise.then(callback)); + } +}; +function from(promise) { + return new Observable(promise); +} +function of(value) { + return new Observable(Promise.resolve(value)); +} +function mergeMap(callback) { + return (value) => callback(value).toPromise(); +} +function map(callback) { + return callback; +} + +// http/isomorphic-fetch.ts +import "whatwg-fetch"; +var IsomorphicFetchHttpLibrary = class { + send(request) { + let method = request.getHttpMethod().toString(); + let body = request.getBody(); + const resultPromise = fetch(request.getUrl(), { + method, + body, + headers: request.getHeaders(), + credentials: "include" + }).then((resp) => { + const headers = {}; + resp.headers.forEach((value, name) => { + headers[name] = value; + }); + const body2 = { + text: () => resp.text(), + binary: () => resp.blob() + }; + return new ResponseContext(resp.status, headers, body2); + }); + return from(resultPromise); + } +}; + +// http/http.ts +var HttpMethod = /* @__PURE__ */ ((HttpMethod3) => { + HttpMethod3["GET"] = "GET"; + HttpMethod3["HEAD"] = "HEAD"; + HttpMethod3["POST"] = "POST"; + HttpMethod3["PUT"] = "PUT"; + HttpMethod3["DELETE"] = "DELETE"; + HttpMethod3["CONNECT"] = "CONNECT"; + HttpMethod3["OPTIONS"] = "OPTIONS"; + HttpMethod3["TRACE"] = "TRACE"; + HttpMethod3["PATCH"] = "PATCH"; + return HttpMethod3; +})(HttpMethod || {}); +var HttpException = class extends Error { + constructor(msg) { + super(msg); + } +}; +var RequestContext2 = class { + /** + * Creates the request context using a http method and request resource url + * + * @param url url of the requested resource + * @param httpMethod http method + */ + constructor(url, httpMethod) { + this.httpMethod = httpMethod; + this.headers = {}; + this.body = void 0; + this.url = new URL(url); + } + /* + * Returns the url set in the constructor including the query string + * + */ + getUrl() { + return this.url.toString().endsWith("/") ? this.url.toString().slice(0, -1) : this.url.toString(); + } + /** + * Replaces the url set in the constructor with this url. + * + */ + setUrl(url) { + this.url = new URL(url); + } + /** + * Sets the body of the http request either as a string or FormData + * + * Note that setting a body on a HTTP GET, HEAD, DELETE, CONNECT or TRACE + * request is discouraged. + * https://httpwg.org/http-core/draft-ietf-httpbis-semantics-latest.html#rfc.section.7.3.1 + * + * @param body the body of the request + */ + setBody(body) { + this.body = body; + } + getHttpMethod() { + return this.httpMethod; + } + getHeaders() { + return this.headers; + } + getBody() { + return this.body; + } + setQueryParam(name, value) { + this.url.searchParams.set(name, value); + } + /** + * Sets a cookie with the name and value. NO check for duplicate cookies is performed + * + */ + addCookie(name, value) { + if (!this.headers["Cookie"]) { + this.headers["Cookie"] = ""; + } + this.headers["Cookie"] += name + "=" + value + "; "; + } + setHeaderParam(key, value) { + this.headers[key] = value; + } +}; +var SelfDecodingBody = class { + constructor(dataSource) { + this.dataSource = dataSource; + } + binary() { + return this.dataSource; + } + text() { + return __async(this, null, function* () { + const data = yield this.dataSource; + if (data.text) { + return data.text(); + } + return new Promise((resolve, reject) => { + const reader = new FileReader(); + reader.addEventListener("load", () => resolve(reader.result)); + reader.addEventListener("error", () => reject(reader.error)); + reader.readAsText(data); + }); + }); + } +}; +var ResponseContext = class { + constructor(httpStatusCode, headers, body) { + this.httpStatusCode = httpStatusCode; + this.headers = headers; + this.body = body; + } + /** + * Parse header value in the form `value; param1="value1"` + * + * E.g. for Content-Type or Content-Disposition + * Parameter names are converted to lower case + * The first parameter is returned with the key `""` + */ + getParsedHeader(headerName) { + const result = {}; + if (!this.headers[headerName]) { + return result; + } + const parameters = this.headers[headerName].split(";"); + for (const parameter of parameters) { + let [key, value] = parameter.split("=", 2); + key = key.toLowerCase().trim(); + if (value === void 0) { + result[""] = key; + } else { + value = value.trim(); + if (value.startsWith('"') && value.endsWith('"')) { + value = value.substring(1, value.length - 1); + } + result[key] = value; + } + } + return result; + } + getBodyAsFile() { + return __async(this, null, function* () { + const data = yield this.body.binary(); + const fileName = this.getParsedHeader("content-disposition")["filename"] || ""; + const contentType = this.headers["content-type"] || ""; + try { + return new File([data], fileName, { type: contentType }); + } catch (error) { + return Object.assign(data, { + name: fileName, + type: contentType + }); + } + }); + } + /** + * Use a heuristic to get a body of unknown data structure. + * Return as string if possible, otherwise as binary. + */ + getBodyAsAny() { + try { + return this.body.text(); + } catch (e) { + } + try { + return this.body.binary(); + } catch (e) { + } + return Promise.resolve(void 0); + } +}; +function wrapHttpLibrary(promiseHttpLibrary) { + return { + send(request) { + return from(promiseHttpLibrary.send(request)); + } + }; +} + +// auth/auth.ts +var BearerAuthAuthentication = class { + /** + * Configures the http authentication with the required details. + * + * @param tokenProvider service that can provide the up-to-date token when needed + */ + constructor(tokenProvider) { + this.tokenProvider = tokenProvider; + } + getName() { + return "bearerAuth"; + } + applySecurityAuthentication(context) { + return __async(this, null, function* () { + context.setHeaderParam("Authorization", "Bearer " + (yield this.tokenProvider.getToken())); + }); + } +}; +function configureAuthMethods(config) { + let authMethods = {}; + if (!config) { + return authMethods; + } + authMethods["default"] = config["default"]; + if (config["bearerAuth"]) { + authMethods["bearerAuth"] = new BearerAuthAuthentication( + config["bearerAuth"]["tokenProvider"] + ); + } + return authMethods; +} + +// models/AIContext.ts +var _AIContext = class _AIContext { + static getAttributeTypeMap() { + return _AIContext.attributeTypeMap; + } + constructor() { + } +}; +_AIContext.discriminator = void 0; +_AIContext.attributeTypeMap = [ + { + "name": "instructions", + "baseName": "instructions", + "type": "Array", + "format": "" + }, + { + "name": "content", + "baseName": "content", + "type": "Array", + "format": "" + } +]; +var AIContext = _AIContext; + +// models/APIKey.ts +var _APIKey = class _APIKey { + static getAttributeTypeMap() { + return _APIKey.attributeTypeMap; + } + constructor() { + } +}; +_APIKey.discriminator = void 0; +_APIKey.attributeTypeMap = [ + { + "name": "key", + "baseName": "key", + "type": "string", + "format": "" + }, + { + "name": "value", + "baseName": "value", + "type": "string", + "format": "" + } +]; +var APIKey = _APIKey; + +// models/APIKeyInput.ts +var _APIKeyInput = class _APIKeyInput { + static getAttributeTypeMap() { + return _APIKeyInput.attributeTypeMap; + } + constructor() { + } +}; +_APIKeyInput.discriminator = void 0; +_APIKeyInput.attributeTypeMap = [ + { + "name": "key", + "baseName": "key", + "type": "string", + "format": "" + }, + { + "name": "value", + "baseName": "value", + "type": "string", + "format": "" + } +]; +var APIKeyInput = _APIKeyInput; + +// models/AccessToken.ts +var _AccessToken = class _AccessToken { + static getAttributeTypeMap() { + return _AccessToken.attributeTypeMap; + } + constructor() { + } +}; +_AccessToken.discriminator = void 0; +_AccessToken.attributeTypeMap = [ + { + "name": "id", + "baseName": "id", + "type": "string", + "format": "" + }, + { + "name": "token", + "baseName": "token", + "type": "string", + "format": "" + }, + { + "name": "org", + "baseName": "org", + "type": "OrgInfo", + "format": "" + }, + { + "name": "user", + "baseName": "user", + "type": "UserInfo", + "format": "" + }, + { + "name": "creation_time_in_millis", + "baseName": "creation_time_in_millis", + "type": "number", + "format": "float" + }, + { + "name": "expiration_time_in_millis", + "baseName": "expiration_time_in_millis", + "type": "number", + "format": "float" + } +]; +var AccessToken = _AccessToken; + +// models/ActionConfig.ts +var _ActionConfig = class _ActionConfig { + static getAttributeTypeMap() { + return _ActionConfig.attributeTypeMap; + } + constructor() { + } +}; +_ActionConfig.discriminator = void 0; +_ActionConfig.attributeTypeMap = [ + { + "name": "position", + "baseName": "position", + "type": "string", + "format": "" + }, + { + "name": "visibility", + "baseName": "visibility", + "type": "boolean", + "format": "" + } +]; +var ActionConfig = _ActionConfig; + +// models/ActionConfigInput.ts +var _ActionConfigInput = class _ActionConfigInput { + static getAttributeTypeMap() { + return _ActionConfigInput.attributeTypeMap; + } + constructor() { + } +}; +_ActionConfigInput.discriminator = void 0; +_ActionConfigInput.attributeTypeMap = [ + { + "name": "position", + "baseName": "position", + "type": "ActionConfigInputPositionEnum", + "format": "" + }, + { + "name": "visibility", + "baseName": "visibility", + "type": "boolean", + "format": "" + } +]; +var ActionConfigInput = _ActionConfigInput; + +// models/ActionConfigInputCreate.ts +var _ActionConfigInputCreate = class _ActionConfigInputCreate { + static getAttributeTypeMap() { + return _ActionConfigInputCreate.attributeTypeMap; + } + constructor() { + } +}; +_ActionConfigInputCreate.discriminator = void 0; +_ActionConfigInputCreate.attributeTypeMap = [ + { + "name": "position", + "baseName": "position", + "type": "ActionConfigInputCreatePositionEnum", + "format": "" + }, + { + "name": "visibility", + "baseName": "visibility", + "type": "boolean", + "format": "" + } +]; +var ActionConfigInputCreate = _ActionConfigInputCreate; + +// models/ActionDetails.ts +var _ActionDetails = class _ActionDetails { + static getAttributeTypeMap() { + return _ActionDetails.attributeTypeMap; + } + constructor() { + } +}; +_ActionDetails.discriminator = void 0; +_ActionDetails.attributeTypeMap = [ + { + "name": "CALLBACK", + "baseName": "CALLBACK", + "type": "CALLBACK", + "format": "" + }, + { + "name": "URL", + "baseName": "URL", + "type": "URL", + "format": "" + } +]; +var ActionDetails = _ActionDetails; + +// models/ActionDetailsInput.ts +var _ActionDetailsInput = class _ActionDetailsInput { + static getAttributeTypeMap() { + return _ActionDetailsInput.attributeTypeMap; + } + constructor() { + } +}; +_ActionDetailsInput.discriminator = void 0; +_ActionDetailsInput.attributeTypeMap = [ + { + "name": "CALLBACK", + "baseName": "CALLBACK", + "type": "CALLBACKInput", + "format": "" + }, + { + "name": "URL", + "baseName": "URL", + "type": "URLInput", + "format": "" + } +]; +var ActionDetailsInput = _ActionDetailsInput; + +// models/ActionDetailsInputCreate.ts +var _ActionDetailsInputCreate = class _ActionDetailsInputCreate { + static getAttributeTypeMap() { + return _ActionDetailsInputCreate.attributeTypeMap; + } + constructor() { + } +}; +_ActionDetailsInputCreate.discriminator = void 0; +_ActionDetailsInputCreate.attributeTypeMap = [ + { + "name": "CALLBACK", + "baseName": "CALLBACK", + "type": "CALLBACKInputMandatory", + "format": "" + }, + { + "name": "URL", + "baseName": "URL", + "type": "URLInputMandatory", + "format": "" + } +]; +var ActionDetailsInputCreate = _ActionDetailsInputCreate; + +// models/ActivateUserRequest.ts +var _ActivateUserRequest = class _ActivateUserRequest { + static getAttributeTypeMap() { + return _ActivateUserRequest.attributeTypeMap; + } + constructor() { + } +}; +_ActivateUserRequest.discriminator = void 0; +_ActivateUserRequest.attributeTypeMap = [ + { + "name": "user_identifier", + "baseName": "user_identifier", + "type": "string", + "format": "" + }, + { + "name": "auth_token", + "baseName": "auth_token", + "type": "string", + "format": "" + }, + { + "name": "password", + "baseName": "password", + "type": "string", + "format": "" + }, + { + "name": "properties", + "baseName": "properties", + "type": "string", + "format": "" + } +]; +var ActivateUserRequest = _ActivateUserRequest; + +// models/AgentConversation.ts +var _AgentConversation = class _AgentConversation { + static getAttributeTypeMap() { + return _AgentConversation.attributeTypeMap; + } + constructor() { + } +}; +_AgentConversation.discriminator = void 0; +_AgentConversation.attributeTypeMap = [ + { + "name": "conversation_id", + "baseName": "conversation_id", + "type": "string", + "format": "" + }, + { + "name": "conversation_identifier", + "baseName": "conversation_identifier", + "type": "string", + "format": "" + } +]; +var AgentConversation = _AgentConversation; + +// models/AnswerContent.ts +var _AnswerContent = class _AnswerContent { + static getAttributeTypeMap() { + return _AnswerContent.attributeTypeMap; + } + constructor() { + } +}; +_AnswerContent.discriminator = void 0; +_AnswerContent.attributeTypeMap = [ + { + "name": "available_data_row_count", + "baseName": "available_data_row_count", + "type": "number", + "format": "int32" + }, + { + "name": "column_names", + "baseName": "column_names", + "type": "Array", + "format": "" + }, + { + "name": "data_rows", + "baseName": "data_rows", + "type": "Array", + "format": "" + }, + { + "name": "record_offset", + "baseName": "record_offset", + "type": "number", + "format": "int32" + }, + { + "name": "record_size", + "baseName": "record_size", + "type": "number", + "format": "int32" + }, + { + "name": "returned_data_row_count", + "baseName": "returned_data_row_count", + "type": "number", + "format": "int32" + }, + { + "name": "sampling_ratio", + "baseName": "sampling_ratio", + "type": "number", + "format": "float" + } +]; +var AnswerContent = _AnswerContent; + +// models/AnswerDataResponse.ts +var _AnswerDataResponse = class _AnswerDataResponse { + static getAttributeTypeMap() { + return _AnswerDataResponse.attributeTypeMap; + } + constructor() { + } +}; +_AnswerDataResponse.discriminator = void 0; +_AnswerDataResponse.attributeTypeMap = [ + { + "name": "metadata_id", + "baseName": "metadata_id", + "type": "string", + "format": "" + }, + { + "name": "metadata_name", + "baseName": "metadata_name", + "type": "string", + "format": "" + }, + { + "name": "contents", + "baseName": "contents", + "type": "Array", + "format": "" + } +]; +var AnswerDataResponse = _AnswerDataResponse; + +// models/AnswerPngOptionsInput.ts +var _AnswerPngOptionsInput = class _AnswerPngOptionsInput { + static getAttributeTypeMap() { + return _AnswerPngOptionsInput.attributeTypeMap; + } + constructor() { + } +}; +_AnswerPngOptionsInput.discriminator = void 0; +_AnswerPngOptionsInput.attributeTypeMap = [ + { + "name": "x_resolution", + "baseName": "x_resolution", + "type": "number", + "format": "int32" + }, + { + "name": "y_resolution", + "baseName": "y_resolution", + "type": "number", + "format": "int32" + }, + { + "name": "scaling", + "baseName": "scaling", + "type": "number", + "format": "int32" + } +]; +var AnswerPngOptionsInput = _AnswerPngOptionsInput; + +// models/AssignChangeAuthorRequest.ts +var _AssignChangeAuthorRequest = class _AssignChangeAuthorRequest { + static getAttributeTypeMap() { + return _AssignChangeAuthorRequest.attributeTypeMap; + } + constructor() { + } +}; +_AssignChangeAuthorRequest.discriminator = void 0; +_AssignChangeAuthorRequest.attributeTypeMap = [ + { + "name": "metadata", + "baseName": "metadata", + "type": "Array", + "format": "" + }, + { + "name": "user_identifier", + "baseName": "user_identifier", + "type": "string", + "format": "" + }, + { + "name": "current_owner_identifier", + "baseName": "current_owner_identifier", + "type": "string", + "format": "" + } +]; +var AssignChangeAuthorRequest = _AssignChangeAuthorRequest; + +// models/AssignTagRequest.ts +var _AssignTagRequest = class _AssignTagRequest { + static getAttributeTypeMap() { + return _AssignTagRequest.attributeTypeMap; + } + constructor() { + } +}; +_AssignTagRequest.discriminator = void 0; +_AssignTagRequest.attributeTypeMap = [ + { + "name": "metadata", + "baseName": "metadata", + "type": "Array", + "format": "" + }, + { + "name": "tag_identifiers", + "baseName": "tag_identifiers", + "type": "Array", + "format": "" + } +]; +var AssignTagRequest = _AssignTagRequest; + +// models/AssociateMetadataInput.ts +var _AssociateMetadataInput = class _AssociateMetadataInput { + static getAttributeTypeMap() { + return _AssociateMetadataInput.attributeTypeMap; + } + constructor() { + } +}; +_AssociateMetadataInput.discriminator = void 0; +_AssociateMetadataInput.attributeTypeMap = [ + { + "name": "action_config", + "baseName": "action_config", + "type": "ActionConfigInput", + "format": "" + }, + { + "name": "identifier", + "baseName": "identifier", + "type": "string", + "format": "" + }, + { + "name": "type", + "baseName": "type", + "type": "AssociateMetadataInputTypeEnum", + "format": "" + } +]; +var AssociateMetadataInput = _AssociateMetadataInput; + +// models/AssociateMetadataInputCreate.ts +var _AssociateMetadataInputCreate = class _AssociateMetadataInputCreate { + static getAttributeTypeMap() { + return _AssociateMetadataInputCreate.attributeTypeMap; + } + constructor() { + } +}; +_AssociateMetadataInputCreate.discriminator = void 0; +_AssociateMetadataInputCreate.attributeTypeMap = [ + { + "name": "action_config", + "baseName": "action_config", + "type": "ActionConfigInputCreate", + "format": "" + }, + { + "name": "identifier", + "baseName": "identifier", + "type": "string", + "format": "" + }, + { + "name": "type", + "baseName": "type", + "type": "AssociateMetadataInputCreateTypeEnum", + "format": "" + } +]; +var AssociateMetadataInputCreate = _AssociateMetadataInputCreate; + +// models/AuthClusterPreferences.ts +var _AuthClusterPreferences = class _AuthClusterPreferences { + static getAttributeTypeMap() { + return _AuthClusterPreferences.attributeTypeMap; + } + constructor() { + } +}; +_AuthClusterPreferences.discriminator = void 0; +_AuthClusterPreferences.attributeTypeMap = [ + { + "name": "auth_status", + "baseName": "auth_status", + "type": "AuthClusterPreferencesAuthStatusEnum", + "format": "" + }, + { + "name": "access_tokens", + "baseName": "access_tokens", + "type": "Array", + "format": "" + } +]; +var AuthClusterPreferences = _AuthClusterPreferences; + +// models/AuthClusterPreferencesInput.ts +var _AuthClusterPreferencesInput = class _AuthClusterPreferencesInput { + static getAttributeTypeMap() { + return _AuthClusterPreferencesInput.attributeTypeMap; + } + constructor() { + } +}; +_AuthClusterPreferencesInput.discriminator = void 0; +_AuthClusterPreferencesInput.attributeTypeMap = [ + { + "name": "auth_status", + "baseName": "auth_status", + "type": "AuthClusterPreferencesInputAuthStatusEnum", + "format": "" + } +]; +var AuthClusterPreferencesInput = _AuthClusterPreferencesInput; + +// models/AuthOrgInfo.ts +var _AuthOrgInfo = class _AuthOrgInfo { + static getAttributeTypeMap() { + return _AuthOrgInfo.attributeTypeMap; + } + constructor() { + } +}; +_AuthOrgInfo.discriminator = void 0; +_AuthOrgInfo.attributeTypeMap = [ + { + "name": "id", + "baseName": "id", + "type": "number", + "format": "int32" + }, + { + "name": "name", + "baseName": "name", + "type": "string", + "format": "" + } +]; +var AuthOrgInfo = _AuthOrgInfo; + +// models/AuthOrgPreference.ts +var _AuthOrgPreference = class _AuthOrgPreference { + static getAttributeTypeMap() { + return _AuthOrgPreference.attributeTypeMap; + } + constructor() { + } +}; +_AuthOrgPreference.discriminator = void 0; +_AuthOrgPreference.attributeTypeMap = [ + { + "name": "org", + "baseName": "org", + "type": "AuthOrgInfo", + "format": "" + }, + { + "name": "auth_status", + "baseName": "auth_status", + "type": "AuthOrgPreferenceAuthStatusEnum", + "format": "" + }, + { + "name": "access_tokens", + "baseName": "access_tokens", + "type": "Array", + "format": "" + } +]; +var AuthOrgPreference = _AuthOrgPreference; + +// models/AuthOrgPreferenceInput.ts +var _AuthOrgPreferenceInput = class _AuthOrgPreferenceInput { + static getAttributeTypeMap() { + return _AuthOrgPreferenceInput.attributeTypeMap; + } + constructor() { + } +}; +_AuthOrgPreferenceInput.discriminator = void 0; +_AuthOrgPreferenceInput.attributeTypeMap = [ + { + "name": "org_identifier", + "baseName": "org_identifier", + "type": "string", + "format": "" + }, + { + "name": "auth_status", + "baseName": "auth_status", + "type": "AuthOrgPreferenceInputAuthStatusEnum", + "format": "" + } +]; +var AuthOrgPreferenceInput = _AuthOrgPreferenceInput; + +// models/AuthSettingsAccessToken.ts +var _AuthSettingsAccessToken = class _AuthSettingsAccessToken { + static getAttributeTypeMap() { + return _AuthSettingsAccessToken.attributeTypeMap; + } + constructor() { + } +}; +_AuthSettingsAccessToken.discriminator = void 0; +_AuthSettingsAccessToken.attributeTypeMap = [ + { + "name": "key", + "baseName": "key", + "type": "string", + "format": "" + } +]; +var AuthSettingsAccessToken = _AuthSettingsAccessToken; + +// models/Authentication.ts +var _Authentication = class _Authentication { + static getAttributeTypeMap() { + return _Authentication.attributeTypeMap; + } + constructor() { + } +}; +_Authentication.discriminator = void 0; +_Authentication.attributeTypeMap = [ + { + "name": "API_Key", + "baseName": "API_Key", + "type": "APIKey", + "format": "" + }, + { + "name": "Basic_Auth", + "baseName": "Basic_Auth", + "type": "BasicAuth", + "format": "" + }, + { + "name": "Bearer_Token", + "baseName": "Bearer_Token", + "type": "string", + "format": "" + }, + { + "name": "No_Auth", + "baseName": "No_Auth", + "type": "string", + "format": "" + } +]; +var Authentication = _Authentication; + +// models/AuthenticationInput.ts +var _AuthenticationInput = class _AuthenticationInput { + static getAttributeTypeMap() { + return _AuthenticationInput.attributeTypeMap; + } + constructor() { + } +}; +_AuthenticationInput.discriminator = void 0; +_AuthenticationInput.attributeTypeMap = [ + { + "name": "API_Key", + "baseName": "API_Key", + "type": "APIKeyInput", + "format": "" + }, + { + "name": "Basic_Auth", + "baseName": "Basic_Auth", + "type": "BasicAuthInput", + "format": "" + }, + { + "name": "Bearer_Token", + "baseName": "Bearer_Token", + "type": "string", + "format": "" + }, + { + "name": "No_Auth", + "baseName": "No_Auth", + "type": "string", + "format": "" + } +]; +var AuthenticationInput = _AuthenticationInput; + +// models/Author.ts +var _Author = class _Author { + static getAttributeTypeMap() { + return _Author.attributeTypeMap; + } + constructor() { + } +}; +_Author.discriminator = void 0; +_Author.attributeTypeMap = [ + { + "name": "id", + "baseName": "id", + "type": "string", + "format": "" + }, + { + "name": "name", + "baseName": "name", + "type": "string", + "format": "" + } +]; +var Author = _Author; + +// models/AuthorMetadataTypeInput.ts +var _AuthorMetadataTypeInput = class _AuthorMetadataTypeInput { + static getAttributeTypeMap() { + return _AuthorMetadataTypeInput.attributeTypeMap; + } + constructor() { + } +}; +_AuthorMetadataTypeInput.discriminator = void 0; +_AuthorMetadataTypeInput.attributeTypeMap = [ + { + "name": "type", + "baseName": "type", + "type": "AuthorMetadataTypeInputTypeEnum", + "format": "" + }, + { + "name": "identifier", + "baseName": "identifier", + "type": "string", + "format": "" + } +]; +var AuthorMetadataTypeInput = _AuthorMetadataTypeInput; + +// models/AuthorType.ts +var _AuthorType = class _AuthorType { + static getAttributeTypeMap() { + return _AuthorType.attributeTypeMap; + } + constructor() { + } +}; +_AuthorType.discriminator = void 0; +_AuthorType.attributeTypeMap = [ + { + "name": "email", + "baseName": "email", + "type": "string", + "format": "" + }, + { + "name": "username", + "baseName": "username", + "type": "string", + "format": "" + } +]; +var AuthorType = _AuthorType; + +// models/AwsS3Config.ts +var _AwsS3Config = class _AwsS3Config { + static getAttributeTypeMap() { + return _AwsS3Config.attributeTypeMap; + } + constructor() { + } +}; +_AwsS3Config.discriminator = void 0; +_AwsS3Config.attributeTypeMap = [ + { + "name": "bucket_name", + "baseName": "bucket_name", + "type": "string", + "format": "" + }, + { + "name": "region", + "baseName": "region", + "type": "string", + "format": "" + }, + { + "name": "role_arn", + "baseName": "role_arn", + "type": "string", + "format": "" + }, + { + "name": "external_id", + "baseName": "external_id", + "type": "string", + "format": "" + }, + { + "name": "path_prefix", + "baseName": "path_prefix", + "type": "string", + "format": "" + } +]; +var AwsS3Config = _AwsS3Config; + +// models/AwsS3ConfigInput.ts +var _AwsS3ConfigInput = class _AwsS3ConfigInput { + static getAttributeTypeMap() { + return _AwsS3ConfigInput.attributeTypeMap; + } + constructor() { + } +}; +_AwsS3ConfigInput.discriminator = void 0; +_AwsS3ConfigInput.attributeTypeMap = [ + { + "name": "bucket_name", + "baseName": "bucket_name", + "type": "string", + "format": "" + }, + { + "name": "region", + "baseName": "region", + "type": "string", + "format": "" + }, + { + "name": "role_arn", + "baseName": "role_arn", + "type": "string", + "format": "" + }, + { + "name": "external_id", + "baseName": "external_id", + "type": "string", + "format": "" + }, + { + "name": "path_prefix", + "baseName": "path_prefix", + "type": "string", + "format": "" + } +]; +var AwsS3ConfigInput = _AwsS3ConfigInput; + +// models/BasicAuth.ts +var _BasicAuth = class _BasicAuth { + static getAttributeTypeMap() { + return _BasicAuth.attributeTypeMap; + } + constructor() { + } +}; +_BasicAuth.discriminator = void 0; +_BasicAuth.attributeTypeMap = [ + { + "name": "password", + "baseName": "password", + "type": "string", + "format": "" + }, + { + "name": "username", + "baseName": "username", + "type": "string", + "format": "" + } +]; +var BasicAuth = _BasicAuth; + +// models/BasicAuthInput.ts +var _BasicAuthInput = class _BasicAuthInput { + static getAttributeTypeMap() { + return _BasicAuthInput.attributeTypeMap; + } + constructor() { + } +}; +_BasicAuthInput.discriminator = void 0; +_BasicAuthInput.attributeTypeMap = [ + { + "name": "password", + "baseName": "password", + "type": "string", + "format": "" + }, + { + "name": "username", + "baseName": "username", + "type": "string", + "format": "" + } +]; +var BasicAuthInput = _BasicAuthInput; + +// models/CALLBACK.ts +var _CALLBACK = class _CALLBACK { + static getAttributeTypeMap() { + return _CALLBACK.attributeTypeMap; + } + constructor() { + } +}; +_CALLBACK.discriminator = void 0; +_CALLBACK.attributeTypeMap = [ + { + "name": "reference", + "baseName": "reference", + "type": "string", + "format": "" + } +]; +var CALLBACK = _CALLBACK; + +// models/CALLBACKInput.ts +var _CALLBACKInput = class _CALLBACKInput { + static getAttributeTypeMap() { + return _CALLBACKInput.attributeTypeMap; + } + constructor() { + } +}; +_CALLBACKInput.discriminator = void 0; +_CALLBACKInput.attributeTypeMap = [ + { + "name": "reference", + "baseName": "reference", + "type": "string", + "format": "" + } +]; +var CALLBACKInput = _CALLBACKInput; + +// models/CALLBACKInputMandatory.ts +var _CALLBACKInputMandatory = class _CALLBACKInputMandatory { + static getAttributeTypeMap() { + return _CALLBACKInputMandatory.attributeTypeMap; + } + constructor() { + } +}; +_CALLBACKInputMandatory.discriminator = void 0; +_CALLBACKInputMandatory.attributeTypeMap = [ + { + "name": "reference", + "baseName": "reference", + "type": "string", + "format": "" + } +]; +var CALLBACKInputMandatory = _CALLBACKInputMandatory; + +// models/CalendarResponse.ts +var _CalendarResponse = class _CalendarResponse { + static getAttributeTypeMap() { + return _CalendarResponse.attributeTypeMap; + } + constructor() { + } +}; +_CalendarResponse.discriminator = void 0; +_CalendarResponse.attributeTypeMap = [ + { + "name": "calendar_name", + "baseName": "calendar_name", + "type": "string", + "format": "" + }, + { + "name": "connection_name", + "baseName": "connection_name", + "type": "string", + "format": "" + }, + { + "name": "data_warehouse_type", + "baseName": "data_warehouse_type", + "type": "string", + "format": "" + }, + { + "name": "modification_time_in_millis", + "baseName": "modification_time_in_millis", + "type": "string", + "format": "" + }, + { + "name": "author_name", + "baseName": "author_name", + "type": "string", + "format": "" + }, + { + "name": "connection_id", + "baseName": "connection_id", + "type": "string", + "format": "" + }, + { + "name": "calendar_id", + "baseName": "calendar_id", + "type": "string", + "format": "" + } +]; +var CalendarResponse = _CalendarResponse; + +// models/ChangeUserPasswordRequest.ts +var _ChangeUserPasswordRequest = class _ChangeUserPasswordRequest { + static getAttributeTypeMap() { + return _ChangeUserPasswordRequest.attributeTypeMap; + } + constructor() { + } +}; +_ChangeUserPasswordRequest.discriminator = void 0; +_ChangeUserPasswordRequest.attributeTypeMap = [ + { + "name": "current_password", + "baseName": "current_password", + "type": "string", + "format": "" + }, + { + "name": "new_password", + "baseName": "new_password", + "type": "string", + "format": "" + }, + { + "name": "user_identifier", + "baseName": "user_identifier", + "type": "string", + "format": "" + } +]; +var ChangeUserPasswordRequest = _ChangeUserPasswordRequest; + +// models/ChannelHistoryEventInfo.ts +var _ChannelHistoryEventInfo = class _ChannelHistoryEventInfo { + static getAttributeTypeMap() { + return _ChannelHistoryEventInfo.attributeTypeMap; + } + constructor() { + } +}; +_ChannelHistoryEventInfo.discriminator = void 0; +_ChannelHistoryEventInfo.attributeTypeMap = [ + { + "name": "type", + "baseName": "type", + "type": "ChannelHistoryEventInfoTypeEnum", + "format": "" + }, + { + "name": "id", + "baseName": "id", + "type": "string", + "format": "" + }, + { + "name": "name", + "baseName": "name", + "type": "string", + "format": "" + }, + { + "name": "run_id", + "baseName": "run_id", + "type": "string", + "format": "" + } +]; +var ChannelHistoryEventInfo = _ChannelHistoryEventInfo; + +// models/ChannelHistoryEventInput.ts +var _ChannelHistoryEventInput = class _ChannelHistoryEventInput { + static getAttributeTypeMap() { + return _ChannelHistoryEventInput.attributeTypeMap; + } + constructor() { + } +}; +_ChannelHistoryEventInput.discriminator = void 0; +_ChannelHistoryEventInput.attributeTypeMap = [ + { + "name": "type", + "baseName": "type", + "type": "ChannelHistoryEventInputTypeEnum", + "format": "" + }, + { + "name": "identifier", + "baseName": "identifier", + "type": "string", + "format": "" + } +]; +var ChannelHistoryEventInput = _ChannelHistoryEventInput; + +// models/ChannelHistoryJob.ts +var _ChannelHistoryJob = class _ChannelHistoryJob { + static getAttributeTypeMap() { + return _ChannelHistoryJob.attributeTypeMap; + } + constructor() { + } +}; +_ChannelHistoryJob.discriminator = void 0; +_ChannelHistoryJob.attributeTypeMap = [ + { + "name": "id", + "baseName": "id", + "type": "string", + "format": "" + }, + { + "name": "status", + "baseName": "status", + "type": "ChannelHistoryJobStatusEnum", + "format": "" + }, + { + "name": "creation_time_in_millis", + "baseName": "creation_time_in_millis", + "type": "number", + "format": "float" + }, + { + "name": "event", + "baseName": "event", + "type": "ChannelHistoryEventInfo", + "format": "" + }, + { + "name": "recipients", + "baseName": "recipients", + "type": "Array", + "format": "" + }, + { + "name": "detail", + "baseName": "detail", + "type": "string", + "format": "" + }, + { + "name": "try_count", + "baseName": "try_count", + "type": "number", + "format": "int32" + } +]; +var ChannelHistoryJob = _ChannelHistoryJob; + +// models/ChannelValidationAwsS3Info.ts +var _ChannelValidationAwsS3Info = class _ChannelValidationAwsS3Info { + static getAttributeTypeMap() { + return _ChannelValidationAwsS3Info.attributeTypeMap; + } + constructor() { + } +}; +_ChannelValidationAwsS3Info.discriminator = void 0; +_ChannelValidationAwsS3Info.attributeTypeMap = [ + { + "name": "bucket_name", + "baseName": "bucket_name", + "type": "string", + "format": "" + }, + { + "name": "file_name", + "baseName": "file_name", + "type": "string", + "format": "" + }, + { + "name": "object_key", + "baseName": "object_key", + "type": "string", + "format": "" + } +]; +var ChannelValidationAwsS3Info = _ChannelValidationAwsS3Info; + +// models/ChannelValidationDetail.ts +var _ChannelValidationDetail = class _ChannelValidationDetail { + static getAttributeTypeMap() { + return _ChannelValidationDetail.attributeTypeMap; + } + constructor() { + } +}; +_ChannelValidationDetail.discriminator = void 0; +_ChannelValidationDetail.attributeTypeMap = [ + { + "name": "validation_step", + "baseName": "validation_step", + "type": "ChannelValidationDetailValidationStepEnum", + "format": "" + }, + { + "name": "status", + "baseName": "status", + "type": "ChannelValidationDetailStatusEnum", + "format": "" + }, + { + "name": "http_status", + "baseName": "http_status", + "type": "number", + "format": "int32" + }, + { + "name": "error_message", + "baseName": "error_message", + "type": "string", + "format": "" + }, + { + "name": "aws_s3_info", + "baseName": "aws_s3_info", + "type": "ChannelValidationAwsS3Info", + "format": "" + } +]; +var ChannelValidationDetail = _ChannelValidationDetail; + +// models/ClusterNonEmbedAccess.ts +var _ClusterNonEmbedAccess = class _ClusterNonEmbedAccess { + static getAttributeTypeMap() { + return _ClusterNonEmbedAccess.attributeTypeMap; + } + constructor() { + } +}; +_ClusterNonEmbedAccess.discriminator = void 0; +_ClusterNonEmbedAccess.attributeTypeMap = [ + { + "name": "block_full_app_access", + "baseName": "block_full_app_access", + "type": "boolean", + "format": "" + }, + { + "name": "groups_with_access", + "baseName": "groups_with_access", + "type": "Array", + "format": "" + } +]; +var ClusterNonEmbedAccess = _ClusterNonEmbedAccess; + +// models/ClusterNonEmbedAccessInput.ts +var _ClusterNonEmbedAccessInput = class _ClusterNonEmbedAccessInput { + static getAttributeTypeMap() { + return _ClusterNonEmbedAccessInput.attributeTypeMap; + } + constructor() { + } +}; +_ClusterNonEmbedAccessInput.discriminator = void 0; +_ClusterNonEmbedAccessInput.attributeTypeMap = [ + { + "name": "block_full_app_access", + "baseName": "block_full_app_access", + "type": "boolean", + "format": "" + }, + { + "name": "groups_identifiers_with_access", + "baseName": "groups_identifiers_with_access", + "type": "Array", + "format": "" + } +]; +var ClusterNonEmbedAccessInput = _ClusterNonEmbedAccessInput; + +// models/Collection.ts +var _Collection = class _Collection { + static getAttributeTypeMap() { + return _Collection.attributeTypeMap; + } + constructor() { + } +}; +_Collection.discriminator = void 0; +_Collection.attributeTypeMap = [ + { + "name": "id", + "baseName": "id", + "type": "string", + "format": "" + }, + { + "name": "name", + "baseName": "name", + "type": "string", + "format": "" + }, + { + "name": "description", + "baseName": "description", + "type": "string", + "format": "" + }, + { + "name": "metadata", + "baseName": "metadata", + "type": "Array", + "format": "" + }, + { + "name": "created_at", + "baseName": "created_at", + "type": "string", + "format": "" + }, + { + "name": "updated_at", + "baseName": "updated_at", + "type": "string", + "format": "" + }, + { + "name": "author_name", + "baseName": "author_name", + "type": "string", + "format": "" + }, + { + "name": "author_id", + "baseName": "author_id", + "type": "string", + "format": "" + }, + { + "name": "org", + "baseName": "org", + "type": "CollectionEntityIdentifier", + "format": "" + } +]; +var Collection = _Collection; + +// models/CollectionDeleteResponse.ts +var _CollectionDeleteResponse = class _CollectionDeleteResponse { + static getAttributeTypeMap() { + return _CollectionDeleteResponse.attributeTypeMap; + } + constructor() { + } +}; +_CollectionDeleteResponse.discriminator = void 0; +_CollectionDeleteResponse.attributeTypeMap = [ + { + "name": "metadata_deleted", + "baseName": "metadata_deleted", + "type": "Array", + "format": "" + }, + { + "name": "metadata_skipped", + "baseName": "metadata_skipped", + "type": "Array", + "format": "" + } +]; +var CollectionDeleteResponse = _CollectionDeleteResponse; + +// models/CollectionDeleteTypeIdentifiers.ts +var _CollectionDeleteTypeIdentifiers = class _CollectionDeleteTypeIdentifiers { + static getAttributeTypeMap() { + return _CollectionDeleteTypeIdentifiers.attributeTypeMap; + } + constructor() { + } +}; +_CollectionDeleteTypeIdentifiers.discriminator = void 0; +_CollectionDeleteTypeIdentifiers.attributeTypeMap = [ + { + "name": "type", + "baseName": "type", + "type": "string", + "format": "" + }, + { + "name": "identifiers", + "baseName": "identifiers", + "type": "Array", + "format": "" + } +]; +var CollectionDeleteTypeIdentifiers = _CollectionDeleteTypeIdentifiers; + +// models/CollectionEntityIdentifier.ts +var _CollectionEntityIdentifier = class _CollectionEntityIdentifier { + static getAttributeTypeMap() { + return _CollectionEntityIdentifier.attributeTypeMap; + } + constructor() { + } +}; +_CollectionEntityIdentifier.discriminator = void 0; +_CollectionEntityIdentifier.attributeTypeMap = [ + { + "name": "identifier", + "baseName": "identifier", + "type": "string", + "format": "" + }, + { + "name": "name", + "baseName": "name", + "type": "string", + "format": "" + } +]; +var CollectionEntityIdentifier = _CollectionEntityIdentifier; + +// models/CollectionMetadataInput.ts +var _CollectionMetadataInput = class _CollectionMetadataInput { + static getAttributeTypeMap() { + return _CollectionMetadataInput.attributeTypeMap; + } + constructor() { + } +}; +_CollectionMetadataInput.discriminator = void 0; +_CollectionMetadataInput.attributeTypeMap = [ + { + "name": "type", + "baseName": "type", + "type": "CollectionMetadataInputTypeEnum", + "format": "" + }, + { + "name": "identifiers", + "baseName": "identifiers", + "type": "Array", + "format": "" + } +]; +var CollectionMetadataInput = _CollectionMetadataInput; + +// models/CollectionMetadataItem.ts +var _CollectionMetadataItem = class _CollectionMetadataItem { + static getAttributeTypeMap() { + return _CollectionMetadataItem.attributeTypeMap; + } + constructor() { + } +}; +_CollectionMetadataItem.discriminator = void 0; +_CollectionMetadataItem.attributeTypeMap = [ + { + "name": "type", + "baseName": "type", + "type": "string", + "format": "" + }, + { + "name": "identifiers", + "baseName": "identifiers", + "type": "Array", + "format": "" + } +]; +var CollectionMetadataItem = _CollectionMetadataItem; + +// models/CollectionSearchResponse.ts +var _CollectionSearchResponse = class _CollectionSearchResponse { + static getAttributeTypeMap() { + return _CollectionSearchResponse.attributeTypeMap; + } + constructor() { + } +}; +_CollectionSearchResponse.discriminator = void 0; +_CollectionSearchResponse.attributeTypeMap = [ + { + "name": "collections", + "baseName": "collections", + "type": "Array", + "format": "" + }, + { + "name": "record_offset", + "baseName": "record_offset", + "type": "number", + "format": "int32" + }, + { + "name": "record_size", + "baseName": "record_size", + "type": "number", + "format": "int32" + }, + { + "name": "is_last_batch", + "baseName": "is_last_batch", + "type": "boolean", + "format": "" + }, + { + "name": "count", + "baseName": "count", + "type": "number", + "format": "int32" + } +]; +var CollectionSearchResponse = _CollectionSearchResponse; + +// models/Column.ts +var _Column = class _Column { + static getAttributeTypeMap() { + return _Column.attributeTypeMap; + } + constructor() { + } +}; +_Column.discriminator = void 0; +_Column.attributeTypeMap = [ + { + "name": "name", + "baseName": "name", + "type": "string", + "format": "" + }, + { + "name": "data_type", + "baseName": "data_type", + "type": "string", + "format": "" + }, + { + "name": "is_aggregate", + "baseName": "is_aggregate", + "type": "string", + "format": "" + }, + { + "name": "can_import", + "baseName": "can_import", + "type": "boolean", + "format": "" + }, + { + "name": "selected", + "baseName": "selected", + "type": "boolean", + "format": "" + }, + { + "name": "is_linked_active", + "baseName": "is_linked_active", + "type": "boolean", + "format": "" + } +]; +var Column = _Column; + +// models/ColumnSecurityRule.ts +var _ColumnSecurityRule = class _ColumnSecurityRule { + static getAttributeTypeMap() { + return _ColumnSecurityRule.attributeTypeMap; + } + constructor() { + } +}; +_ColumnSecurityRule.discriminator = void 0; +_ColumnSecurityRule.attributeTypeMap = [ + { + "name": "column", + "baseName": "column", + "type": "ColumnSecurityRuleColumn", + "format": "" + }, + { + "name": "groups", + "baseName": "groups", + "type": "Array", + "format": "" + }, + { + "name": "source_table_details", + "baseName": "source_table_details", + "type": "ColumnSecurityRuleSourceTable", + "format": "" + } +]; +var ColumnSecurityRule = _ColumnSecurityRule; + +// models/ColumnSecurityRuleColumn.ts +var _ColumnSecurityRuleColumn = class _ColumnSecurityRuleColumn { + static getAttributeTypeMap() { + return _ColumnSecurityRuleColumn.attributeTypeMap; + } + constructor() { + } +}; +_ColumnSecurityRuleColumn.discriminator = void 0; +_ColumnSecurityRuleColumn.attributeTypeMap = [ + { + "name": "id", + "baseName": "id", + "type": "string", + "format": "" + }, + { + "name": "name", + "baseName": "name", + "type": "string", + "format": "" + } +]; +var ColumnSecurityRuleColumn = _ColumnSecurityRuleColumn; + +// models/ColumnSecurityRuleGroup.ts +var _ColumnSecurityRuleGroup = class _ColumnSecurityRuleGroup { + static getAttributeTypeMap() { + return _ColumnSecurityRuleGroup.attributeTypeMap; + } + constructor() { + } +}; +_ColumnSecurityRuleGroup.discriminator = void 0; +_ColumnSecurityRuleGroup.attributeTypeMap = [ + { + "name": "id", + "baseName": "id", + "type": "string", + "format": "" + }, + { + "name": "name", + "baseName": "name", + "type": "string", + "format": "" + } +]; +var ColumnSecurityRuleGroup = _ColumnSecurityRuleGroup; + +// models/ColumnSecurityRuleGroupOperation.ts +var _ColumnSecurityRuleGroupOperation = class _ColumnSecurityRuleGroupOperation { + static getAttributeTypeMap() { + return _ColumnSecurityRuleGroupOperation.attributeTypeMap; + } + constructor() { + } +}; +_ColumnSecurityRuleGroupOperation.discriminator = void 0; +_ColumnSecurityRuleGroupOperation.attributeTypeMap = [ + { + "name": "operation", + "baseName": "operation", + "type": "ColumnSecurityRuleGroupOperationOperationEnum", + "format": "" + }, + { + "name": "group_identifiers", + "baseName": "group_identifiers", + "type": "Array", + "format": "" + } +]; +var ColumnSecurityRuleGroupOperation = _ColumnSecurityRuleGroupOperation; + +// models/ColumnSecurityRuleResponse.ts +var _ColumnSecurityRuleResponse = class _ColumnSecurityRuleResponse { + static getAttributeTypeMap() { + return _ColumnSecurityRuleResponse.attributeTypeMap; + } + constructor() { + } +}; +_ColumnSecurityRuleResponse.discriminator = void 0; +_ColumnSecurityRuleResponse.attributeTypeMap = [ + { + "name": "table_guid", + "baseName": "table_guid", + "type": "string", + "format": "" + }, + { + "name": "obj_id", + "baseName": "obj_id", + "type": "string", + "format": "" + }, + { + "name": "column_security_rules", + "baseName": "column_security_rules", + "type": "Array", + "format": "" + } +]; +var ColumnSecurityRuleResponse = _ColumnSecurityRuleResponse; + +// models/ColumnSecurityRuleSourceTable.ts +var _ColumnSecurityRuleSourceTable = class _ColumnSecurityRuleSourceTable { + static getAttributeTypeMap() { + return _ColumnSecurityRuleSourceTable.attributeTypeMap; + } + constructor() { + } +}; +_ColumnSecurityRuleSourceTable.discriminator = void 0; +_ColumnSecurityRuleSourceTable.attributeTypeMap = [ + { + "name": "id", + "baseName": "id", + "type": "string", + "format": "" + }, + { + "name": "name", + "baseName": "name", + "type": "string", + "format": "" + } +]; +var ColumnSecurityRuleSourceTable = _ColumnSecurityRuleSourceTable; + +// models/ColumnSecurityRuleTableInput.ts +var _ColumnSecurityRuleTableInput = class _ColumnSecurityRuleTableInput { + static getAttributeTypeMap() { + return _ColumnSecurityRuleTableInput.attributeTypeMap; + } + constructor() { + } +}; +_ColumnSecurityRuleTableInput.discriminator = void 0; +_ColumnSecurityRuleTableInput.attributeTypeMap = [ + { + "name": "identifier", + "baseName": "identifier", + "type": "string", + "format": "" + }, + { + "name": "obj_identifier", + "baseName": "obj_identifier", + "type": "string", + "format": "" + } +]; +var ColumnSecurityRuleTableInput = _ColumnSecurityRuleTableInput; + +// models/ColumnSecurityRuleUpdate.ts +var _ColumnSecurityRuleUpdate = class _ColumnSecurityRuleUpdate { + static getAttributeTypeMap() { + return _ColumnSecurityRuleUpdate.attributeTypeMap; + } + constructor() { + } +}; +_ColumnSecurityRuleUpdate.discriminator = void 0; +_ColumnSecurityRuleUpdate.attributeTypeMap = [ + { + "name": "column_identifier", + "baseName": "column_identifier", + "type": "string", + "format": "" + }, + { + "name": "is_unsecured", + "baseName": "is_unsecured", + "type": "boolean", + "format": "" + }, + { + "name": "group_access", + "baseName": "group_access", + "type": "Array", + "format": "" + } +]; +var ColumnSecurityRuleUpdate = _ColumnSecurityRuleUpdate; + +// models/CommitBranchRequest.ts +var _CommitBranchRequest = class _CommitBranchRequest { + static getAttributeTypeMap() { + return _CommitBranchRequest.attributeTypeMap; + } + constructor() { + } +}; +_CommitBranchRequest.discriminator = void 0; +_CommitBranchRequest.attributeTypeMap = [ + { + "name": "metadata", + "baseName": "metadata", + "type": "Array", + "format": "" + }, + { + "name": "delete_aware", + "baseName": "delete_aware", + "type": "boolean", + "format": "" + }, + { + "name": "branch_name", + "baseName": "branch_name", + "type": "string", + "format": "" + }, + { + "name": "comment", + "baseName": "comment", + "type": "string", + "format": "" + } +]; +var CommitBranchRequest = _CommitBranchRequest; + +// models/CommitFileType.ts +var _CommitFileType = class _CommitFileType { + static getAttributeTypeMap() { + return _CommitFileType.attributeTypeMap; + } + constructor() { + } +}; +_CommitFileType.discriminator = void 0; +_CommitFileType.attributeTypeMap = [ + { + "name": "file_name", + "baseName": "file_name", + "type": "string", + "format": "" + }, + { + "name": "status_code", + "baseName": "status_code", + "type": "string", + "format": "" + }, + { + "name": "status_message", + "baseName": "status_message", + "type": "string", + "format": "" + } +]; +var CommitFileType = _CommitFileType; + +// models/CommitHistoryResponse.ts +var _CommitHistoryResponse = class _CommitHistoryResponse { + static getAttributeTypeMap() { + return _CommitHistoryResponse.attributeTypeMap; + } + constructor() { + } +}; +_CommitHistoryResponse.discriminator = void 0; +_CommitHistoryResponse.attributeTypeMap = [ + { + "name": "committer", + "baseName": "committer", + "type": "CommiterType", + "format": "" + }, + { + "name": "author", + "baseName": "author", + "type": "AuthorType", + "format": "" + }, + { + "name": "comment", + "baseName": "comment", + "type": "string", + "format": "" + }, + { + "name": "commit_time", + "baseName": "commit_time", + "type": "string", + "format": "" + }, + { + "name": "commit_id", + "baseName": "commit_id", + "type": "string", + "format": "" + }, + { + "name": "branch", + "baseName": "branch", + "type": "string", + "format": "" + } +]; +var CommitHistoryResponse = _CommitHistoryResponse; + +// models/CommitResponse.ts +var _CommitResponse = class _CommitResponse { + static getAttributeTypeMap() { + return _CommitResponse.attributeTypeMap; + } + constructor() { + } +}; +_CommitResponse.discriminator = void 0; +_CommitResponse.attributeTypeMap = [ + { + "name": "committer", + "baseName": "committer", + "type": "CommiterType", + "format": "" + }, + { + "name": "author", + "baseName": "author", + "type": "AuthorType", + "format": "" + }, + { + "name": "comment", + "baseName": "comment", + "type": "string", + "format": "" + }, + { + "name": "commit_time", + "baseName": "commit_time", + "type": "string", + "format": "" + }, + { + "name": "commit_id", + "baseName": "commit_id", + "type": "string", + "format": "" + }, + { + "name": "branch", + "baseName": "branch", + "type": "string", + "format": "" + }, + { + "name": "committed_files", + "baseName": "committed_files", + "type": "Array", + "format": "" + } +]; +var CommitResponse = _CommitResponse; + +// models/CommiterType.ts +var _CommiterType = class _CommiterType { + static getAttributeTypeMap() { + return _CommiterType.attributeTypeMap; + } + constructor() { + } +}; +_CommiterType.discriminator = void 0; +_CommiterType.attributeTypeMap = [ + { + "name": "email", + "baseName": "email", + "type": "string", + "format": "" + }, + { + "name": "username", + "baseName": "username", + "type": "string", + "format": "" + } +]; +var CommiterType = _CommiterType; + +// models/CommunicationChannelPreferencesResponse.ts +var _CommunicationChannelPreferencesResponse = class _CommunicationChannelPreferencesResponse { + static getAttributeTypeMap() { + return _CommunicationChannelPreferencesResponse.attributeTypeMap; + } + constructor() { + } +}; +_CommunicationChannelPreferencesResponse.discriminator = void 0; +_CommunicationChannelPreferencesResponse.attributeTypeMap = [ + { + "name": "cluster_preferences", + "baseName": "cluster_preferences", + "type": "Array", + "format": "" + }, + { + "name": "org_preferences", + "baseName": "org_preferences", + "type": "Array", + "format": "" + } +]; +var CommunicationChannelPreferencesResponse = _CommunicationChannelPreferencesResponse; + +// models/CommunicationChannelValidateResponse.ts +var _CommunicationChannelValidateResponse = class _CommunicationChannelValidateResponse { + static getAttributeTypeMap() { + return _CommunicationChannelValidateResponse.attributeTypeMap; + } + constructor() { + } +}; +_CommunicationChannelValidateResponse.discriminator = void 0; +_CommunicationChannelValidateResponse.attributeTypeMap = [ + { + "name": "channel_type", + "baseName": "channel_type", + "type": "CommunicationChannelValidateResponseChannelTypeEnum", + "format": "" + }, + { + "name": "channel_id", + "baseName": "channel_id", + "type": "string", + "format": "" + }, + { + "name": "channel_name", + "baseName": "channel_name", + "type": "string", + "format": "" + }, + { + "name": "event_type", + "baseName": "event_type", + "type": "CommunicationChannelValidateResponseEventTypeEnum", + "format": "" + }, + { + "name": "job_id", + "baseName": "job_id", + "type": "string", + "format": "" + }, + { + "name": "result_code", + "baseName": "result_code", + "type": "CommunicationChannelValidateResponseResultCodeEnum", + "format": "" + }, + { + "name": "details", + "baseName": "details", + "type": "Array", + "format": "" + } +]; +var CommunicationChannelValidateResponse = _CommunicationChannelValidateResponse; + +// models/ConfigureAuthSettingsRequest.ts +var _ConfigureAuthSettingsRequest = class _ConfigureAuthSettingsRequest { + static getAttributeTypeMap() { + return _ConfigureAuthSettingsRequest.attributeTypeMap; + } + constructor() { + } +}; +_ConfigureAuthSettingsRequest.discriminator = void 0; +_ConfigureAuthSettingsRequest.attributeTypeMap = [ + { + "name": "auth_type", + "baseName": "auth_type", + "type": "ConfigureAuthSettingsRequestAuthTypeEnum", + "format": "" + }, + { + "name": "cluster_preferences", + "baseName": "cluster_preferences", + "type": "ConfigureAuthSettingsRequestClusterPreferences", + "format": "" + }, + { + "name": "org_preferences", + "baseName": "org_preferences", + "type": "Array", + "format": "" + } +]; +var ConfigureAuthSettingsRequest = _ConfigureAuthSettingsRequest; + +// models/ConfigureAuthSettingsRequestClusterPreferences.ts +var _ConfigureAuthSettingsRequestClusterPreferences = class _ConfigureAuthSettingsRequestClusterPreferences { + static getAttributeTypeMap() { + return _ConfigureAuthSettingsRequestClusterPreferences.attributeTypeMap; + } + constructor() { + } +}; +_ConfigureAuthSettingsRequestClusterPreferences.discriminator = void 0; +_ConfigureAuthSettingsRequestClusterPreferences.attributeTypeMap = [ + { + "name": "auth_status", + "baseName": "auth_status", + "type": "ConfigureAuthSettingsRequestClusterPreferencesAuthStatusEnum", + "format": "" + } +]; +var ConfigureAuthSettingsRequestClusterPreferences = _ConfigureAuthSettingsRequestClusterPreferences; + +// models/ConfigureCommunicationChannelPreferencesRequest.ts +var _ConfigureCommunicationChannelPreferencesRequest = class _ConfigureCommunicationChannelPreferencesRequest { + static getAttributeTypeMap() { + return _ConfigureCommunicationChannelPreferencesRequest.attributeTypeMap; + } + constructor() { + } +}; +_ConfigureCommunicationChannelPreferencesRequest.discriminator = void 0; +_ConfigureCommunicationChannelPreferencesRequest.attributeTypeMap = [ + { + "name": "cluster_preferences", + "baseName": "cluster_preferences", + "type": "Array", + "format": "" + }, + { + "name": "org_preferences", + "baseName": "org_preferences", + "type": "Array", + "format": "" + } +]; +var ConfigureCommunicationChannelPreferencesRequest = _ConfigureCommunicationChannelPreferencesRequest; + +// models/ConfigureSecuritySettingsRequest.ts +var _ConfigureSecuritySettingsRequest = class _ConfigureSecuritySettingsRequest { + static getAttributeTypeMap() { + return _ConfigureSecuritySettingsRequest.attributeTypeMap; + } + constructor() { + } +}; +_ConfigureSecuritySettingsRequest.discriminator = void 0; +_ConfigureSecuritySettingsRequest.attributeTypeMap = [ + { + "name": "cluster_preferences", + "baseName": "cluster_preferences", + "type": "ConfigureSecuritySettingsRequestClusterPreferences", + "format": "" + }, + { + "name": "org_preferences", + "baseName": "org_preferences", + "type": "Array", + "format": "" + } +]; +var ConfigureSecuritySettingsRequest = _ConfigureSecuritySettingsRequest; + +// models/ConfigureSecuritySettingsRequestClusterPreferences.ts +var _ConfigureSecuritySettingsRequestClusterPreferences = class _ConfigureSecuritySettingsRequestClusterPreferences { + static getAttributeTypeMap() { + return _ConfigureSecuritySettingsRequestClusterPreferences.attributeTypeMap; + } + constructor() { + } +}; +_ConfigureSecuritySettingsRequestClusterPreferences.discriminator = void 0; +_ConfigureSecuritySettingsRequestClusterPreferences.attributeTypeMap = [ + { + "name": "enable_partitioned_cookies", + "baseName": "enable_partitioned_cookies", + "type": "boolean", + "format": "" + }, + { + "name": "cors_whitelisted_urls", + "baseName": "cors_whitelisted_urls", + "type": "Array", + "format": "" + }, + { + "name": "csp_settings", + "baseName": "csp_settings", + "type": "CspSettingsInput", + "format": "" + }, + { + "name": "saml_redirect_urls", + "baseName": "saml_redirect_urls", + "type": "Array", + "format": "" + }, + { + "name": "non_embed_access", + "baseName": "non_embed_access", + "type": "ClusterNonEmbedAccessInput", + "format": "" + } +]; +var ConfigureSecuritySettingsRequestClusterPreferences = _ConfigureSecuritySettingsRequestClusterPreferences; + +// models/ConnectionConfigurationResponse.ts +var _ConnectionConfigurationResponse = class _ConnectionConfigurationResponse { + static getAttributeTypeMap() { + return _ConnectionConfigurationResponse.attributeTypeMap; + } + constructor() { + } +}; +_ConnectionConfigurationResponse.discriminator = void 0; +_ConnectionConfigurationResponse.attributeTypeMap = [ + { + "name": "configuration_identifier", + "baseName": "configuration_identifier", + "type": "string", + "format": "" + }, + { + "name": "name", + "baseName": "name", + "type": "string", + "format": "" + }, + { + "name": "description", + "baseName": "description", + "type": "string", + "format": "" + }, + { + "name": "configuration", + "baseName": "configuration", + "type": "any", + "format": "" + }, + { + "name": "policy_principals", + "baseName": "policy_principals", + "type": "Array", + "format": "" + }, + { + "name": "policy_processes", + "baseName": "policy_processes", + "type": "Array", + "format": "" + }, + { + "name": "disabled", + "baseName": "disabled", + "type": "boolean", + "format": "" + }, + { + "name": "data_warehouse_type", + "baseName": "data_warehouse_type", + "type": "ConnectionConfigurationResponseDataWarehouseTypeEnum", + "format": "" + }, + { + "name": "policy_type", + "baseName": "policy_type", + "type": "ConnectionConfigurationResponsePolicyTypeEnum", + "format": "" + }, + { + "name": "same_as_parent", + "baseName": "same_as_parent", + "type": "boolean", + "format": "" + }, + { + "name": "policy_process_options", + "baseName": "policy_process_options", + "type": "PolicyProcessOptions", + "format": "" + } +]; +var ConnectionConfigurationResponse = _ConnectionConfigurationResponse; + +// models/ConnectionConfigurationSearchRequest.ts +var _ConnectionConfigurationSearchRequest = class _ConnectionConfigurationSearchRequest { + static getAttributeTypeMap() { + return _ConnectionConfigurationSearchRequest.attributeTypeMap; + } + constructor() { + } +}; +_ConnectionConfigurationSearchRequest.discriminator = void 0; +_ConnectionConfigurationSearchRequest.attributeTypeMap = [ + { + "name": "connection_identifier", + "baseName": "connection_identifier", + "type": "string", + "format": "" + }, + { + "name": "configuration_identifier", + "baseName": "configuration_identifier", + "type": "string", + "format": "" + }, + { + "name": "policy_type", + "baseName": "policy_type", + "type": "ConnectionConfigurationSearchRequestPolicyTypeEnum", + "format": "" + } +]; +var ConnectionConfigurationSearchRequest = _ConnectionConfigurationSearchRequest; + +// models/ConnectionInput.ts +var _ConnectionInput = class _ConnectionInput { + static getAttributeTypeMap() { + return _ConnectionInput.attributeTypeMap; + } + constructor() { + } +}; +_ConnectionInput.discriminator = void 0; +_ConnectionInput.attributeTypeMap = [ + { + "name": "identifier", + "baseName": "identifier", + "type": "string", + "format": "" + }, + { + "name": "name_pattern", + "baseName": "name_pattern", + "type": "string", + "format": "" + }, + { + "name": "data_warehouse_objects", + "baseName": "data_warehouse_objects", + "type": "Array", + "format": "" + } +]; +var ConnectionInput = _ConnectionInput; + +// models/ContextPayloadV2Input.ts +var _ContextPayloadV2Input = class _ContextPayloadV2Input { + static getAttributeTypeMap() { + return _ContextPayloadV2Input.attributeTypeMap; + } + constructor() { + } +}; +_ContextPayloadV2Input.discriminator = void 0; +_ContextPayloadV2Input.attributeTypeMap = [ + { + "name": "type", + "baseName": "type", + "type": "ContextPayloadV2InputTypeEnum", + "format": "" + }, + { + "name": "data_source_context", + "baseName": "data_source_context", + "type": "DataSourceContextInput", + "format": "" + } +]; +var ContextPayloadV2Input = _ContextPayloadV2Input; + +// models/Conversation.ts +var _Conversation = class _Conversation { + static getAttributeTypeMap() { + return _Conversation.attributeTypeMap; + } + constructor() { + } +}; +_Conversation.discriminator = void 0; +_Conversation.attributeTypeMap = [ + { + "name": "conversation_identifier", + "baseName": "conversation_identifier", + "type": "string", + "format": "" + } +]; +var Conversation = _Conversation; + +// models/ConversationSettingsInput.ts +var _ConversationSettingsInput = class _ConversationSettingsInput { + static getAttributeTypeMap() { + return _ConversationSettingsInput.attributeTypeMap; + } + constructor() { + } +}; +_ConversationSettingsInput.discriminator = void 0; +_ConversationSettingsInput.attributeTypeMap = [ + { + "name": "enable_contextual_change_analysis", + "baseName": "enable_contextual_change_analysis", + "type": "boolean", + "format": "" + }, + { + "name": "enable_natural_language_answer_generation", + "baseName": "enable_natural_language_answer_generation", + "type": "boolean", + "format": "" + }, + { + "name": "enable_reasoning", + "baseName": "enable_reasoning", + "type": "boolean", + "format": "" + }, + { + "name": "enable_save_chat", + "baseName": "enable_save_chat", + "type": "boolean", + "format": "" + } +]; +var ConversationSettingsInput = _ConversationSettingsInput; + +// models/ConvertWorksheetToModelRequest.ts +var _ConvertWorksheetToModelRequest = class _ConvertWorksheetToModelRequest { + static getAttributeTypeMap() { + return _ConvertWorksheetToModelRequest.attributeTypeMap; + } + constructor() { + } +}; +_ConvertWorksheetToModelRequest.discriminator = void 0; +_ConvertWorksheetToModelRequest.attributeTypeMap = [ + { + "name": "worksheet_ids", + "baseName": "worksheet_ids", + "type": "Array", + "format": "" + }, + { + "name": "exclude_worksheet_ids", + "baseName": "exclude_worksheet_ids", + "type": "Array", + "format": "" + }, + { + "name": "convert_all", + "baseName": "convert_all", + "type": "boolean", + "format": "" + }, + { + "name": "apply_changes", + "baseName": "apply_changes", + "type": "boolean", + "format": "" + } +]; +var ConvertWorksheetToModelRequest = _ConvertWorksheetToModelRequest; + +// models/CopyObjectRequest.ts +var _CopyObjectRequest = class _CopyObjectRequest { + static getAttributeTypeMap() { + return _CopyObjectRequest.attributeTypeMap; + } + constructor() { + } +}; +_CopyObjectRequest.discriminator = void 0; +_CopyObjectRequest.attributeTypeMap = [ + { + "name": "description", + "baseName": "description", + "type": "string", + "format": "" + }, + { + "name": "identifier", + "baseName": "identifier", + "type": "string", + "format": "" + }, + { + "name": "type", + "baseName": "type", + "type": "CopyObjectRequestTypeEnum", + "format": "" + }, + { + "name": "title", + "baseName": "title", + "type": "string", + "format": "" + } +]; +var CopyObjectRequest = _CopyObjectRequest; + +// models/CreateAgentConversationRequest.ts +var _CreateAgentConversationRequest = class _CreateAgentConversationRequest { + static getAttributeTypeMap() { + return _CreateAgentConversationRequest.attributeTypeMap; + } + constructor() { + } +}; +_CreateAgentConversationRequest.discriminator = void 0; +_CreateAgentConversationRequest.attributeTypeMap = [ + { + "name": "metadata_context", + "baseName": "metadata_context", + "type": "CreateAgentConversationRequestMetadataContext", + "format": "" + }, + { + "name": "conversation_settings", + "baseName": "conversation_settings", + "type": "CreateAgentConversationRequestConversationSettings", + "format": "" + } +]; +var CreateAgentConversationRequest = _CreateAgentConversationRequest; + +// models/CreateAgentConversationRequestConversationSettings.ts +var _CreateAgentConversationRequestConversationSettings = class _CreateAgentConversationRequestConversationSettings { + static getAttributeTypeMap() { + return _CreateAgentConversationRequestConversationSettings.attributeTypeMap; + } + constructor() { + } +}; +_CreateAgentConversationRequestConversationSettings.discriminator = void 0; +_CreateAgentConversationRequestConversationSettings.attributeTypeMap = [ + { + "name": "enable_contextual_change_analysis", + "baseName": "enable_contextual_change_analysis", + "type": "boolean", + "format": "" + }, + { + "name": "enable_natural_language_answer_generation", + "baseName": "enable_natural_language_answer_generation", + "type": "boolean", + "format": "" + }, + { + "name": "enable_reasoning", + "baseName": "enable_reasoning", + "type": "boolean", + "format": "" + }, + { + "name": "enable_save_chat", + "baseName": "enable_save_chat", + "type": "boolean", + "format": "" + } +]; +var CreateAgentConversationRequestConversationSettings = _CreateAgentConversationRequestConversationSettings; + +// models/CreateAgentConversationRequestMetadataContext.ts +var _CreateAgentConversationRequestMetadataContext = class _CreateAgentConversationRequestMetadataContext { + static getAttributeTypeMap() { + return _CreateAgentConversationRequestMetadataContext.attributeTypeMap; + } + constructor() { + } +}; +_CreateAgentConversationRequestMetadataContext.discriminator = void 0; +_CreateAgentConversationRequestMetadataContext.attributeTypeMap = [ + { + "name": "type", + "baseName": "type", + "type": "CreateAgentConversationRequestMetadataContextTypeEnum", + "format": "" + }, + { + "name": "data_source_context", + "baseName": "data_source_context", + "type": "DataSourceContextInput", + "format": "" + } +]; +var CreateAgentConversationRequestMetadataContext = _CreateAgentConversationRequestMetadataContext; + +// models/CreateCalendarRequest.ts +var _CreateCalendarRequest = class _CreateCalendarRequest { + static getAttributeTypeMap() { + return _CreateCalendarRequest.attributeTypeMap; + } + constructor() { + } +}; +_CreateCalendarRequest.discriminator = void 0; +_CreateCalendarRequest.attributeTypeMap = [ + { + "name": "name", + "baseName": "name", + "type": "string", + "format": "" + }, + { + "name": "creation_method", + "baseName": "creation_method", + "type": "CreateCalendarRequestCreationMethodEnum", + "format": "" + }, + { + "name": "table_reference", + "baseName": "table_reference", + "type": "CreateCalendarRequestTableReference", + "format": "" + }, + { + "name": "start_date", + "baseName": "start_date", + "type": "string", + "format": "" + }, + { + "name": "end_date", + "baseName": "end_date", + "type": "string", + "format": "" + }, + { + "name": "calendar_type", + "baseName": "calendar_type", + "type": "CreateCalendarRequestCalendarTypeEnum", + "format": "" + }, + { + "name": "month_offset", + "baseName": "month_offset", + "type": "CreateCalendarRequestMonthOffsetEnum", + "format": "" + }, + { + "name": "start_day_of_week", + "baseName": "start_day_of_week", + "type": "CreateCalendarRequestStartDayOfWeekEnum", + "format": "" + }, + { + "name": "quarter_name_prefix", + "baseName": "quarter_name_prefix", + "type": "string", + "format": "" + }, + { + "name": "year_name_prefix", + "baseName": "year_name_prefix", + "type": "string", + "format": "" + } +]; +var CreateCalendarRequest = _CreateCalendarRequest; + +// models/CreateCalendarRequestTableReference.ts +var _CreateCalendarRequestTableReference = class _CreateCalendarRequestTableReference { + static getAttributeTypeMap() { + return _CreateCalendarRequestTableReference.attributeTypeMap; + } + constructor() { + } +}; +_CreateCalendarRequestTableReference.discriminator = void 0; +_CreateCalendarRequestTableReference.attributeTypeMap = [ + { + "name": "connection_identifier", + "baseName": "connection_identifier", + "type": "string", + "format": "" + }, + { + "name": "database_name", + "baseName": "database_name", + "type": "string", + "format": "" + }, + { + "name": "schema_name", + "baseName": "schema_name", + "type": "string", + "format": "" + }, + { + "name": "table_name", + "baseName": "table_name", + "type": "string", + "format": "" + } +]; +var CreateCalendarRequestTableReference = _CreateCalendarRequestTableReference; + +// models/CreateCollectionRequest.ts +var _CreateCollectionRequest = class _CreateCollectionRequest { + static getAttributeTypeMap() { + return _CreateCollectionRequest.attributeTypeMap; + } + constructor() { + } +}; +_CreateCollectionRequest.discriminator = void 0; +_CreateCollectionRequest.attributeTypeMap = [ + { + "name": "name", + "baseName": "name", + "type": "string", + "format": "" + }, + { + "name": "description", + "baseName": "description", + "type": "string", + "format": "" + }, + { + "name": "metadata", + "baseName": "metadata", + "type": "Array", + "format": "" + } +]; +var CreateCollectionRequest = _CreateCollectionRequest; + +// models/CreateConfigRequest.ts +var _CreateConfigRequest = class _CreateConfigRequest { + static getAttributeTypeMap() { + return _CreateConfigRequest.attributeTypeMap; + } + constructor() { + } +}; +_CreateConfigRequest.discriminator = void 0; +_CreateConfigRequest.attributeTypeMap = [ + { + "name": "repository_url", + "baseName": "repository_url", + "type": "string", + "format": "" + }, + { + "name": "username", + "baseName": "username", + "type": "string", + "format": "" + }, + { + "name": "access_token", + "baseName": "access_token", + "type": "string", + "format": "" + }, + { + "name": "org_identifier", + "baseName": "org_identifier", + "type": "string", + "format": "" + }, + { + "name": "branch_names", + "baseName": "branch_names", + "type": "Array", + "format": "" + }, + { + "name": "commit_branch_name", + "baseName": "commit_branch_name", + "type": "string", + "format": "" + }, + { + "name": "enable_guid_mapping", + "baseName": "enable_guid_mapping", + "type": "boolean", + "format": "" + }, + { + "name": "configuration_branch_name", + "baseName": "configuration_branch_name", + "type": "string", + "format": "" + } +]; +var CreateConfigRequest = _CreateConfigRequest; + +// models/CreateConnectionConfigurationRequest.ts +var _CreateConnectionConfigurationRequest = class _CreateConnectionConfigurationRequest { + static getAttributeTypeMap() { + return _CreateConnectionConfigurationRequest.attributeTypeMap; + } + constructor() { + } +}; +_CreateConnectionConfigurationRequest.discriminator = void 0; +_CreateConnectionConfigurationRequest.attributeTypeMap = [ + { + "name": "name", + "baseName": "name", + "type": "string", + "format": "" + }, + { + "name": "description", + "baseName": "description", + "type": "string", + "format": "" + }, + { + "name": "connection_identifier", + "baseName": "connection_identifier", + "type": "string", + "format": "" + }, + { + "name": "same_as_parent", + "baseName": "same_as_parent", + "type": "boolean", + "format": "" + }, + { + "name": "policy_process_options", + "baseName": "policy_process_options", + "type": "CreateConnectionConfigurationRequestPolicyProcessOptions", + "format": "" + }, + { + "name": "authentication_type", + "baseName": "authentication_type", + "type": "CreateConnectionConfigurationRequestAuthenticationTypeEnum", + "format": "" + }, + { + "name": "configuration", + "baseName": "configuration", + "type": "any", + "format": "" + }, + { + "name": "policy_type", + "baseName": "policy_type", + "type": "CreateConnectionConfigurationRequestPolicyTypeEnum", + "format": "" + }, + { + "name": "policy_principals", + "baseName": "policy_principals", + "type": "Array", + "format": "" + }, + { + "name": "policy_processes", + "baseName": "policy_processes", + "type": "Array", + "format": "" + } +]; +var CreateConnectionConfigurationRequest = _CreateConnectionConfigurationRequest; + +// models/CreateConnectionConfigurationRequestPolicyProcessOptions.ts +var _CreateConnectionConfigurationRequestPolicyProcessOptions = class _CreateConnectionConfigurationRequestPolicyProcessOptions { + static getAttributeTypeMap() { + return _CreateConnectionConfigurationRequestPolicyProcessOptions.attributeTypeMap; + } + constructor() { + } +}; +_CreateConnectionConfigurationRequestPolicyProcessOptions.discriminator = void 0; +_CreateConnectionConfigurationRequestPolicyProcessOptions.attributeTypeMap = [ + { + "name": "impersonate_user", + "baseName": "impersonate_user", + "type": "string", + "format": "" + } +]; +var CreateConnectionConfigurationRequestPolicyProcessOptions = _CreateConnectionConfigurationRequestPolicyProcessOptions; + +// models/CreateConnectionRequest.ts +var _CreateConnectionRequest = class _CreateConnectionRequest { + static getAttributeTypeMap() { + return _CreateConnectionRequest.attributeTypeMap; + } + constructor() { + } +}; +_CreateConnectionRequest.discriminator = void 0; +_CreateConnectionRequest.attributeTypeMap = [ + { + "name": "name", + "baseName": "name", + "type": "string", + "format": "" + }, + { + "name": "description", + "baseName": "description", + "type": "string", + "format": "" + }, + { + "name": "data_warehouse_type", + "baseName": "data_warehouse_type", + "type": "CreateConnectionRequestDataWarehouseTypeEnum", + "format": "" + }, + { + "name": "data_warehouse_config", + "baseName": "data_warehouse_config", + "type": "any", + "format": "" + }, + { + "name": "validate", + "baseName": "validate", + "type": "boolean", + "format": "" + } +]; +var CreateConnectionRequest = _CreateConnectionRequest; + +// models/CreateConnectionResponse.ts +var _CreateConnectionResponse = class _CreateConnectionResponse { + static getAttributeTypeMap() { + return _CreateConnectionResponse.attributeTypeMap; + } + constructor() { + } +}; +_CreateConnectionResponse.discriminator = void 0; +_CreateConnectionResponse.attributeTypeMap = [ + { + "name": "id", + "baseName": "id", + "type": "string", + "format": "" + }, + { + "name": "name", + "baseName": "name", + "type": "string", + "format": "" + }, + { + "name": "data_warehouse_type", + "baseName": "data_warehouse_type", + "type": "CreateConnectionResponseDataWarehouseTypeEnum", + "format": "" + }, + { + "name": "details", + "baseName": "details", + "type": "any", + "format": "" + } +]; +var CreateConnectionResponse = _CreateConnectionResponse; + +// models/CreateConversationRequest.ts +var _CreateConversationRequest = class _CreateConversationRequest { + static getAttributeTypeMap() { + return _CreateConversationRequest.attributeTypeMap; + } + constructor() { + } +}; +_CreateConversationRequest.discriminator = void 0; +_CreateConversationRequest.attributeTypeMap = [ + { + "name": "metadata_identifier", + "baseName": "metadata_identifier", + "type": "string", + "format": "" + }, + { + "name": "tokens", + "baseName": "tokens", + "type": "string", + "format": "" + } +]; +var CreateConversationRequest = _CreateConversationRequest; + +// models/CreateCustomActionRequest.ts +var _CreateCustomActionRequest = class _CreateCustomActionRequest { + static getAttributeTypeMap() { + return _CreateCustomActionRequest.attributeTypeMap; + } + constructor() { + } +}; +_CreateCustomActionRequest.discriminator = void 0; +_CreateCustomActionRequest.attributeTypeMap = [ + { + "name": "name", + "baseName": "name", + "type": "string", + "format": "" + }, + { + "name": "action_details", + "baseName": "action_details", + "type": "CreateCustomActionRequestActionDetails", + "format": "" + }, + { + "name": "associate_metadata", + "baseName": "associate_metadata", + "type": "Array", + "format": "" + }, + { + "name": "default_action_config", + "baseName": "default_action_config", + "type": "CreateCustomActionRequestDefaultActionConfig", + "format": "" + }, + { + "name": "group_identifiers", + "baseName": "group_identifiers", + "type": "Array", + "format": "" + } +]; +var CreateCustomActionRequest = _CreateCustomActionRequest; + +// models/CreateCustomActionRequestActionDetails.ts +var _CreateCustomActionRequestActionDetails = class _CreateCustomActionRequestActionDetails { + static getAttributeTypeMap() { + return _CreateCustomActionRequestActionDetails.attributeTypeMap; + } + constructor() { + } +}; +_CreateCustomActionRequestActionDetails.discriminator = void 0; +_CreateCustomActionRequestActionDetails.attributeTypeMap = [ + { + "name": "CALLBACK", + "baseName": "CALLBACK", + "type": "CALLBACKInputMandatory", + "format": "" + }, + { + "name": "URL", + "baseName": "URL", + "type": "URLInputMandatory", + "format": "" + } +]; +var CreateCustomActionRequestActionDetails = _CreateCustomActionRequestActionDetails; + +// models/CreateCustomActionRequestDefaultActionConfig.ts +var _CreateCustomActionRequestDefaultActionConfig = class _CreateCustomActionRequestDefaultActionConfig { + static getAttributeTypeMap() { + return _CreateCustomActionRequestDefaultActionConfig.attributeTypeMap; + } + constructor() { + } +}; +_CreateCustomActionRequestDefaultActionConfig.discriminator = void 0; +_CreateCustomActionRequestDefaultActionConfig.attributeTypeMap = [ + { + "name": "visibility", + "baseName": "visibility", + "type": "boolean", + "format": "" + } +]; +var CreateCustomActionRequestDefaultActionConfig = _CreateCustomActionRequestDefaultActionConfig; + +// models/CreateEmailCustomizationRequest.ts +var _CreateEmailCustomizationRequest = class _CreateEmailCustomizationRequest { + static getAttributeTypeMap() { + return _CreateEmailCustomizationRequest.attributeTypeMap; + } + constructor() { + } +}; +_CreateEmailCustomizationRequest.discriminator = void 0; +_CreateEmailCustomizationRequest.attributeTypeMap = [ + { + "name": "template_properties", + "baseName": "template_properties", + "type": "CreateEmailCustomizationRequestTemplateProperties", + "format": "" + }, + { + "name": "org_identifier", + "baseName": "org_identifier", + "type": "string", + "format": "" + } +]; +var CreateEmailCustomizationRequest = _CreateEmailCustomizationRequest; + +// models/CreateEmailCustomizationRequestTemplateProperties.ts +var _CreateEmailCustomizationRequestTemplateProperties = class _CreateEmailCustomizationRequestTemplateProperties { + static getAttributeTypeMap() { + return _CreateEmailCustomizationRequestTemplateProperties.attributeTypeMap; + } + constructor() { + } +}; +_CreateEmailCustomizationRequestTemplateProperties.discriminator = void 0; +_CreateEmailCustomizationRequestTemplateProperties.attributeTypeMap = [ + { + "name": "cta_button_bg_color", + "baseName": "cta_button_bg_color", + "type": "string", + "format": "" + }, + { + "name": "cta_text_font_color", + "baseName": "cta_text_font_color", + "type": "string", + "format": "" + }, + { + "name": "primary_bg_color", + "baseName": "primary_bg_color", + "type": "string", + "format": "" + }, + { + "name": "home_url", + "baseName": "home_url", + "type": "string", + "format": "" + }, + { + "name": "logo_url", + "baseName": "logo_url", + "type": "string", + "format": "" + }, + { + "name": "font_family", + "baseName": "font_family", + "type": "string", + "format": "" + }, + { + "name": "product_name", + "baseName": "product_name", + "type": "string", + "format": "" + }, + { + "name": "footer_address", + "baseName": "footer_address", + "type": "string", + "format": "" + }, + { + "name": "footer_phone", + "baseName": "footer_phone", + "type": "string", + "format": "" + }, + { + "name": "replacement_value_for_liveboard", + "baseName": "replacement_value_for_liveboard", + "type": "string", + "format": "" + }, + { + "name": "replacement_value_for_answer", + "baseName": "replacement_value_for_answer", + "type": "string", + "format": "" + }, + { + "name": "replacement_value_for_spot_iq", + "baseName": "replacement_value_for_spot_iq", + "type": "string", + "format": "" + }, + { + "name": "hide_footer_address", + "baseName": "hide_footer_address", + "type": "boolean", + "format": "" + }, + { + "name": "hide_footer_phone", + "baseName": "hide_footer_phone", + "type": "boolean", + "format": "" + }, + { + "name": "hide_manage_notification", + "baseName": "hide_manage_notification", + "type": "boolean", + "format": "" + }, + { + "name": "hide_mobile_app_nudge", + "baseName": "hide_mobile_app_nudge", + "type": "boolean", + "format": "" + }, + { + "name": "hide_privacy_policy", + "baseName": "hide_privacy_policy", + "type": "boolean", + "format": "" + }, + { + "name": "hide_product_name", + "baseName": "hide_product_name", + "type": "boolean", + "format": "" + }, + { + "name": "hide_ts_vocabulary_definitions", + "baseName": "hide_ts_vocabulary_definitions", + "type": "boolean", + "format": "" + }, + { + "name": "hide_notification_status", + "baseName": "hide_notification_status", + "type": "boolean", + "format": "" + }, + { + "name": "hide_error_message", + "baseName": "hide_error_message", + "type": "boolean", + "format": "" + }, + { + "name": "hide_unsubscribe_link", + "baseName": "hide_unsubscribe_link", + "type": "boolean", + "format": "" + }, + { + "name": "hide_modify_alert", + "baseName": "hide_modify_alert", + "type": "boolean", + "format": "" + }, + { + "name": "company_privacy_policy_url", + "baseName": "company_privacy_policy_url", + "type": "string", + "format": "" + }, + { + "name": "company_website_url", + "baseName": "company_website_url", + "type": "string", + "format": "" + }, + { + "name": "contact_support_url", + "baseName": "contact_support_url", + "type": "string", + "format": "" + }, + { + "name": "hide_contact_support_url", + "baseName": "hide_contact_support_url", + "type": "boolean", + "format": "" + }, + { + "name": "hide_logo_url", + "baseName": "hide_logo_url", + "type": "boolean", + "format": "" + } +]; +var CreateEmailCustomizationRequestTemplateProperties = _CreateEmailCustomizationRequestTemplateProperties; + +// models/CreateEmailCustomizationResponse.ts +var _CreateEmailCustomizationResponse = class _CreateEmailCustomizationResponse { + static getAttributeTypeMap() { + return _CreateEmailCustomizationResponse.attributeTypeMap; + } + constructor() { + } +}; +_CreateEmailCustomizationResponse.discriminator = void 0; +_CreateEmailCustomizationResponse.attributeTypeMap = [ + { + "name": "tenant_id", + "baseName": "tenant_id", + "type": "string", + "format": "" + }, + { + "name": "org", + "baseName": "org", + "type": "OrgType", + "format": "" + }, + { + "name": "name", + "baseName": "name", + "type": "string", + "format": "" + }, + { + "name": "template_properties", + "baseName": "template_properties", + "type": "any", + "format": "" + } +]; +var CreateEmailCustomizationResponse = _CreateEmailCustomizationResponse; + +// models/CreateOrgRequest.ts +var _CreateOrgRequest = class _CreateOrgRequest { + static getAttributeTypeMap() { + return _CreateOrgRequest.attributeTypeMap; + } + constructor() { + } +}; +_CreateOrgRequest.discriminator = void 0; +_CreateOrgRequest.attributeTypeMap = [ + { + "name": "name", + "baseName": "name", + "type": "string", + "format": "" + }, + { + "name": "description", + "baseName": "description", + "type": "string", + "format": "" + } +]; +var CreateOrgRequest = _CreateOrgRequest; + +// models/CreateRoleRequest.ts +var _CreateRoleRequest = class _CreateRoleRequest { + static getAttributeTypeMap() { + return _CreateRoleRequest.attributeTypeMap; + } + constructor() { + } +}; +_CreateRoleRequest.discriminator = void 0; +_CreateRoleRequest.attributeTypeMap = [ + { + "name": "name", + "baseName": "name", + "type": "string", + "format": "" + }, + { + "name": "description", + "baseName": "description", + "type": "string", + "format": "" + }, + { + "name": "privileges", + "baseName": "privileges", + "type": "Array", + "format": "" + }, + { + "name": "read_only", + "baseName": "read_only", + "type": "boolean", + "format": "" + } +]; +var CreateRoleRequest = _CreateRoleRequest; + +// models/CreateScheduleRequest.ts +var _CreateScheduleRequest = class _CreateScheduleRequest { + static getAttributeTypeMap() { + return _CreateScheduleRequest.attributeTypeMap; + } + constructor() { + } +}; +_CreateScheduleRequest.discriminator = void 0; +_CreateScheduleRequest.attributeTypeMap = [ + { + "name": "name", + "baseName": "name", + "type": "string", + "format": "" + }, + { + "name": "description", + "baseName": "description", + "type": "string", + "format": "" + }, + { + "name": "metadata_type", + "baseName": "metadata_type", + "type": "CreateScheduleRequestMetadataTypeEnum", + "format": "" + }, + { + "name": "metadata_identifier", + "baseName": "metadata_identifier", + "type": "string", + "format": "" + }, + { + "name": "file_format", + "baseName": "file_format", + "type": "CreateScheduleRequestFileFormatEnum", + "format": "" + }, + { + "name": "liveboard_options", + "baseName": "liveboard_options", + "type": "CreateScheduleRequestLiveboardOptions", + "format": "" + }, + { + "name": "pdf_options", + "baseName": "pdf_options", + "type": "CreateScheduleRequestPdfOptions", + "format": "" + }, + { + "name": "time_zone", + "baseName": "time_zone", + "type": "CreateScheduleRequestTimeZoneEnum", + "format": "" + }, + { + "name": "frequency", + "baseName": "frequency", + "type": "CreateScheduleRequestFrequency", + "format": "" + }, + { + "name": "recipient_details", + "baseName": "recipient_details", + "type": "CreateScheduleRequestRecipientDetails", + "format": "" + }, + { + "name": "personalised_view_id", + "baseName": "personalised_view_id", + "type": "string", + "format": "" + } +]; +var CreateScheduleRequest = _CreateScheduleRequest; + +// models/CreateScheduleRequestFrequency.ts +var _CreateScheduleRequestFrequency = class _CreateScheduleRequestFrequency { + static getAttributeTypeMap() { + return _CreateScheduleRequestFrequency.attributeTypeMap; + } + constructor() { + } +}; +_CreateScheduleRequestFrequency.discriminator = void 0; +_CreateScheduleRequestFrequency.attributeTypeMap = [ + { + "name": "cron_expression", + "baseName": "cron_expression", + "type": "CronExpressionInput", + "format": "" + } +]; +var CreateScheduleRequestFrequency = _CreateScheduleRequestFrequency; + +// models/CreateScheduleRequestLiveboardOptions.ts +var _CreateScheduleRequestLiveboardOptions = class _CreateScheduleRequestLiveboardOptions { + static getAttributeTypeMap() { + return _CreateScheduleRequestLiveboardOptions.attributeTypeMap; + } + constructor() { + } +}; +_CreateScheduleRequestLiveboardOptions.discriminator = void 0; +_CreateScheduleRequestLiveboardOptions.attributeTypeMap = [ + { + "name": "visualization_identifiers", + "baseName": "visualization_identifiers", + "type": "Array", + "format": "" + } +]; +var CreateScheduleRequestLiveboardOptions = _CreateScheduleRequestLiveboardOptions; + +// models/CreateScheduleRequestPdfOptions.ts +var _CreateScheduleRequestPdfOptions = class _CreateScheduleRequestPdfOptions { + static getAttributeTypeMap() { + return _CreateScheduleRequestPdfOptions.attributeTypeMap; + } + constructor() { + } +}; +_CreateScheduleRequestPdfOptions.discriminator = void 0; +_CreateScheduleRequestPdfOptions.attributeTypeMap = [ + { + "name": "complete_liveboard", + "baseName": "complete_liveboard", + "type": "boolean", + "format": "" + }, + { + "name": "include_cover_page", + "baseName": "include_cover_page", + "type": "boolean", + "format": "" + }, + { + "name": "include_custom_logo", + "baseName": "include_custom_logo", + "type": "boolean", + "format": "" + }, + { + "name": "include_filter_page", + "baseName": "include_filter_page", + "type": "boolean", + "format": "" + }, + { + "name": "include_page_number", + "baseName": "include_page_number", + "type": "boolean", + "format": "" + }, + { + "name": "page_footer_text", + "baseName": "page_footer_text", + "type": "string", + "format": "" + }, + { + "name": "page_orientation", + "baseName": "page_orientation", + "type": "string", + "format": "" + }, + { + "name": "page_size", + "baseName": "page_size", + "type": "CreateScheduleRequestPdfOptionsPageSizeEnum", + "format": "" + }, + { + "name": "truncate_table", + "baseName": "truncate_table", + "type": "boolean", + "format": "" + } +]; +var CreateScheduleRequestPdfOptions = _CreateScheduleRequestPdfOptions; + +// models/CreateScheduleRequestRecipientDetails.ts +var _CreateScheduleRequestRecipientDetails = class _CreateScheduleRequestRecipientDetails { + static getAttributeTypeMap() { + return _CreateScheduleRequestRecipientDetails.attributeTypeMap; + } + constructor() { + } +}; +_CreateScheduleRequestRecipientDetails.discriminator = void 0; +_CreateScheduleRequestRecipientDetails.attributeTypeMap = [ + { + "name": "emails", + "baseName": "emails", + "type": "Array", + "format": "" + }, + { + "name": "principals", + "baseName": "principals", + "type": "Array", + "format": "" + } +]; +var CreateScheduleRequestRecipientDetails = _CreateScheduleRequestRecipientDetails; + +// models/CreateTagRequest.ts +var _CreateTagRequest = class _CreateTagRequest { + static getAttributeTypeMap() { + return _CreateTagRequest.attributeTypeMap; + } + constructor() { + } +}; +_CreateTagRequest.discriminator = void 0; +_CreateTagRequest.attributeTypeMap = [ + { + "name": "name", + "baseName": "name", + "type": "string", + "format": "" + }, + { + "name": "color", + "baseName": "color", + "type": "string", + "format": "" + } +]; +var CreateTagRequest = _CreateTagRequest; + +// models/CreateUserGroupRequest.ts +var _CreateUserGroupRequest = class _CreateUserGroupRequest { + static getAttributeTypeMap() { + return _CreateUserGroupRequest.attributeTypeMap; + } + constructor() { + } +}; +_CreateUserGroupRequest.discriminator = void 0; +_CreateUserGroupRequest.attributeTypeMap = [ + { + "name": "name", + "baseName": "name", + "type": "string", + "format": "" + }, + { + "name": "display_name", + "baseName": "display_name", + "type": "string", + "format": "" + }, + { + "name": "default_liveboard_identifiers", + "baseName": "default_liveboard_identifiers", + "type": "Array", + "format": "" + }, + { + "name": "description", + "baseName": "description", + "type": "string", + "format": "" + }, + { + "name": "privileges", + "baseName": "privileges", + "type": "Array", + "format": "" + }, + { + "name": "sub_group_identifiers", + "baseName": "sub_group_identifiers", + "type": "Array", + "format": "" + }, + { + "name": "type", + "baseName": "type", + "type": "CreateUserGroupRequestTypeEnum", + "format": "" + }, + { + "name": "user_identifiers", + "baseName": "user_identifiers", + "type": "Array", + "format": "" + }, + { + "name": "visibility", + "baseName": "visibility", + "type": "CreateUserGroupRequestVisibilityEnum", + "format": "" + }, + { + "name": "role_identifiers", + "baseName": "role_identifiers", + "type": "Array", + "format": "" + } +]; +var CreateUserGroupRequest = _CreateUserGroupRequest; + +// models/CreateUserRequest.ts +var _CreateUserRequest = class _CreateUserRequest { + static getAttributeTypeMap() { + return _CreateUserRequest.attributeTypeMap; + } + constructor() { + } +}; +_CreateUserRequest.discriminator = void 0; +_CreateUserRequest.attributeTypeMap = [ + { + "name": "name", + "baseName": "name", + "type": "string", + "format": "" + }, + { + "name": "display_name", + "baseName": "display_name", + "type": "string", + "format": "" + }, + { + "name": "password", + "baseName": "password", + "type": "string", + "format": "" + }, + { + "name": "email", + "baseName": "email", + "type": "string", + "format": "" + }, + { + "name": "account_type", + "baseName": "account_type", + "type": "CreateUserRequestAccountTypeEnum", + "format": "" + }, + { + "name": "account_status", + "baseName": "account_status", + "type": "CreateUserRequestAccountStatusEnum", + "format": "" + }, + { + "name": "org_identifiers", + "baseName": "org_identifiers", + "type": "Array", + "format": "" + }, + { + "name": "group_identifiers", + "baseName": "group_identifiers", + "type": "Array", + "format": "" + }, + { + "name": "visibility", + "baseName": "visibility", + "type": "CreateUserRequestVisibilityEnum", + "format": "" + }, + { + "name": "notify_on_share", + "baseName": "notify_on_share", + "type": "boolean", + "format": "" + }, + { + "name": "show_onboarding_experience", + "baseName": "show_onboarding_experience", + "type": "boolean", + "format": "" + }, + { + "name": "onboarding_experience_completed", + "baseName": "onboarding_experience_completed", + "type": "boolean", + "format": "" + }, + { + "name": "home_liveboard_identifier", + "baseName": "home_liveboard_identifier", + "type": "string", + "format": "" + }, + { + "name": "favorite_metadata", + "baseName": "favorite_metadata", + "type": "Array", + "format": "" + }, + { + "name": "preferred_locale", + "baseName": "preferred_locale", + "type": "CreateUserRequestPreferredLocaleEnum", + "format": "" + }, + { + "name": "use_browser_language", + "baseName": "use_browser_language", + "type": "boolean", + "format": "" + }, + { + "name": "extended_properties", + "baseName": "extended_properties", + "type": "any", + "format": "" + }, + { + "name": "extended_preferences", + "baseName": "extended_preferences", + "type": "any", + "format": "" + }, + { + "name": "trigger_welcome_email", + "baseName": "trigger_welcome_email", + "type": "boolean", + "format": "" + }, + { + "name": "trigger_activation_email", + "baseName": "trigger_activation_email", + "type": "boolean", + "format": "" + } +]; +var CreateUserRequest = _CreateUserRequest; + +// models/CreateVariableRequest.ts +var _CreateVariableRequest = class _CreateVariableRequest { + static getAttributeTypeMap() { + return _CreateVariableRequest.attributeTypeMap; + } + constructor() { + } +}; +_CreateVariableRequest.discriminator = void 0; +_CreateVariableRequest.attributeTypeMap = [ + { + "name": "type", + "baseName": "type", + "type": "CreateVariableRequestTypeEnum", + "format": "" + }, + { + "name": "name", + "baseName": "name", + "type": "string", + "format": "" + }, + { + "name": "is_sensitive", + "baseName": "is_sensitive", + "type": "boolean", + "format": "" + }, + { + "name": "data_type", + "baseName": "data_type", + "type": "CreateVariableRequestDataTypeEnum", + "format": "" + } +]; +var CreateVariableRequest = _CreateVariableRequest; + +// models/CreateWebhookConfigurationRequest.ts +var _CreateWebhookConfigurationRequest = class _CreateWebhookConfigurationRequest { + static getAttributeTypeMap() { + return _CreateWebhookConfigurationRequest.attributeTypeMap; + } + constructor() { + } +}; +_CreateWebhookConfigurationRequest.discriminator = void 0; +_CreateWebhookConfigurationRequest.attributeTypeMap = [ + { + "name": "name", + "baseName": "name", + "type": "string", + "format": "" + }, + { + "name": "description", + "baseName": "description", + "type": "string", + "format": "" + }, + { + "name": "url", + "baseName": "url", + "type": "string", + "format": "" + }, + { + "name": "url_params", + "baseName": "url_params", + "type": "any", + "format": "" + }, + { + "name": "events", + "baseName": "events", + "type": "Array", + "format": "" + }, + { + "name": "authentication", + "baseName": "authentication", + "type": "CreateWebhookConfigurationRequestAuthentication", + "format": "" + }, + { + "name": "signature_verification", + "baseName": "signature_verification", + "type": "CreateWebhookConfigurationRequestSignatureVerification", + "format": "" + }, + { + "name": "storage_destination", + "baseName": "storage_destination", + "type": "CreateWebhookConfigurationRequestStorageDestination", + "format": "" + }, + { + "name": "additional_headers", + "baseName": "additional_headers", + "type": "Array", + "format": "" + } +]; +var CreateWebhookConfigurationRequest = _CreateWebhookConfigurationRequest; + +// models/CreateWebhookConfigurationRequestAuthentication.ts +var _CreateWebhookConfigurationRequestAuthentication = class _CreateWebhookConfigurationRequestAuthentication { + static getAttributeTypeMap() { + return _CreateWebhookConfigurationRequestAuthentication.attributeTypeMap; + } + constructor() { + } +}; +_CreateWebhookConfigurationRequestAuthentication.discriminator = void 0; +_CreateWebhookConfigurationRequestAuthentication.attributeTypeMap = [ + { + "name": "API_KEY", + "baseName": "API_KEY", + "type": "WebhookAuthApiKeyInput", + "format": "" + }, + { + "name": "BASIC_AUTH", + "baseName": "BASIC_AUTH", + "type": "WebhookAuthBasicAuthInput", + "format": "" + }, + { + "name": "BEARER_TOKEN", + "baseName": "BEARER_TOKEN", + "type": "string", + "format": "" + }, + { + "name": "OAUTH2", + "baseName": "OAUTH2", + "type": "WebhookAuthOAuth2Input", + "format": "" + } +]; +var CreateWebhookConfigurationRequestAuthentication = _CreateWebhookConfigurationRequestAuthentication; + +// models/CreateWebhookConfigurationRequestSignatureVerification.ts +var _CreateWebhookConfigurationRequestSignatureVerification = class _CreateWebhookConfigurationRequestSignatureVerification { + static getAttributeTypeMap() { + return _CreateWebhookConfigurationRequestSignatureVerification.attributeTypeMap; + } + constructor() { + } +}; +_CreateWebhookConfigurationRequestSignatureVerification.discriminator = void 0; +_CreateWebhookConfigurationRequestSignatureVerification.attributeTypeMap = [ + { + "name": "type", + "baseName": "type", + "type": "CreateWebhookConfigurationRequestSignatureVerificationTypeEnum", + "format": "" + }, + { + "name": "header", + "baseName": "header", + "type": "string", + "format": "" + }, + { + "name": "algorithm", + "baseName": "algorithm", + "type": "CreateWebhookConfigurationRequestSignatureVerificationAlgorithmEnum", + "format": "" + }, + { + "name": "secret", + "baseName": "secret", + "type": "string", + "format": "" + } +]; +var CreateWebhookConfigurationRequestSignatureVerification = _CreateWebhookConfigurationRequestSignatureVerification; + +// models/CreateWebhookConfigurationRequestStorageDestination.ts +var _CreateWebhookConfigurationRequestStorageDestination = class _CreateWebhookConfigurationRequestStorageDestination { + static getAttributeTypeMap() { + return _CreateWebhookConfigurationRequestStorageDestination.attributeTypeMap; + } + constructor() { + } +}; +_CreateWebhookConfigurationRequestStorageDestination.discriminator = void 0; +_CreateWebhookConfigurationRequestStorageDestination.attributeTypeMap = [ + { + "name": "storage_type", + "baseName": "storage_type", + "type": "CreateWebhookConfigurationRequestStorageDestinationStorageTypeEnum", + "format": "" + }, + { + "name": "storage_config", + "baseName": "storage_config", + "type": "StorageConfigInput", + "format": "" + } +]; +var CreateWebhookConfigurationRequestStorageDestination = _CreateWebhookConfigurationRequestStorageDestination; + +// models/CronExpression.ts +var _CronExpression = class _CronExpression { + static getAttributeTypeMap() { + return _CronExpression.attributeTypeMap; + } + constructor() { + } +}; +_CronExpression.discriminator = void 0; +_CronExpression.attributeTypeMap = [ + { + "name": "day_of_month", + "baseName": "day_of_month", + "type": "string", + "format": "" + }, + { + "name": "day_of_week", + "baseName": "day_of_week", + "type": "string", + "format": "" + }, + { + "name": "hour", + "baseName": "hour", + "type": "string", + "format": "" + }, + { + "name": "minute", + "baseName": "minute", + "type": "string", + "format": "" + }, + { + "name": "month", + "baseName": "month", + "type": "string", + "format": "" + }, + { + "name": "second", + "baseName": "second", + "type": "string", + "format": "" + } +]; +var CronExpression = _CronExpression; + +// models/CronExpressionInput.ts +var _CronExpressionInput = class _CronExpressionInput { + static getAttributeTypeMap() { + return _CronExpressionInput.attributeTypeMap; + } + constructor() { + } +}; +_CronExpressionInput.discriminator = void 0; +_CronExpressionInput.attributeTypeMap = [ + { + "name": "day_of_month", + "baseName": "day_of_month", + "type": "string", + "format": "" + }, + { + "name": "day_of_week", + "baseName": "day_of_week", + "type": "string", + "format": "" + }, + { + "name": "hour", + "baseName": "hour", + "type": "string", + "format": "" + }, + { + "name": "minute", + "baseName": "minute", + "type": "string", + "format": "" + }, + { + "name": "month", + "baseName": "month", + "type": "string", + "format": "" + }, + { + "name": "second", + "baseName": "second", + "type": "string", + "format": "" + } +]; +var CronExpressionInput = _CronExpressionInput; + +// models/CspSettings.ts +var _CspSettings = class _CspSettings { + static getAttributeTypeMap() { + return _CspSettings.attributeTypeMap; + } + constructor() { + } +}; +_CspSettings.discriminator = void 0; +_CspSettings.attributeTypeMap = [ + { + "name": "connect_src_urls", + "baseName": "connect_src_urls", + "type": "Array", + "format": "" + }, + { + "name": "font_src_urls", + "baseName": "font_src_urls", + "type": "Array", + "format": "" + }, + { + "name": "visual_embed_hosts", + "baseName": "visual_embed_hosts", + "type": "Array", + "format": "" + }, + { + "name": "iframe_src_urls", + "baseName": "iframe_src_urls", + "type": "Array", + "format": "" + }, + { + "name": "img_src_urls", + "baseName": "img_src_urls", + "type": "Array", + "format": "" + }, + { + "name": "script_src_urls", + "baseName": "script_src_urls", + "type": "ScriptSrcUrls", + "format": "" + }, + { + "name": "style_src_urls", + "baseName": "style_src_urls", + "type": "Array", + "format": "" + } +]; +var CspSettings = _CspSettings; + +// models/CspSettingsInput.ts +var _CspSettingsInput = class _CspSettingsInput { + static getAttributeTypeMap() { + return _CspSettingsInput.attributeTypeMap; + } + constructor() { + } +}; +_CspSettingsInput.discriminator = void 0; +_CspSettingsInput.attributeTypeMap = [ + { + "name": "connect_src_urls", + "baseName": "connect_src_urls", + "type": "Array", + "format": "" + }, + { + "name": "font_src_urls", + "baseName": "font_src_urls", + "type": "Array", + "format": "" + }, + { + "name": "visual_embed_hosts", + "baseName": "visual_embed_hosts", + "type": "Array", + "format": "" + }, + { + "name": "iframe_src_urls", + "baseName": "iframe_src_urls", + "type": "Array", + "format": "" + }, + { + "name": "img_src_urls", + "baseName": "img_src_urls", + "type": "Array", + "format": "" + }, + { + "name": "script_src_urls", + "baseName": "script_src_urls", + "type": "ScriptSrcUrlsInput", + "format": "" + }, + { + "name": "style_src_urls", + "baseName": "style_src_urls", + "type": "Array", + "format": "" + } +]; +var CspSettingsInput = _CspSettingsInput; + +// models/CustomActionMetadataTypeInput.ts +var _CustomActionMetadataTypeInput = class _CustomActionMetadataTypeInput { + static getAttributeTypeMap() { + return _CustomActionMetadataTypeInput.attributeTypeMap; + } + constructor() { + } +}; +_CustomActionMetadataTypeInput.discriminator = void 0; +_CustomActionMetadataTypeInput.attributeTypeMap = [ + { + "name": "type", + "baseName": "type", + "type": "CustomActionMetadataTypeInputTypeEnum", + "format": "" + }, + { + "name": "identifier", + "baseName": "identifier", + "type": "string", + "format": "" + } +]; +var CustomActionMetadataTypeInput = _CustomActionMetadataTypeInput; + +// models/DataSource.ts +var _DataSource = class _DataSource { + static getAttributeTypeMap() { + return _DataSource.attributeTypeMap; + } + constructor() { + } +}; +_DataSource.discriminator = void 0; +_DataSource.attributeTypeMap = [ + { + "name": "confidence", + "baseName": "confidence", + "type": "number", + "format": "float" + }, + { + "name": "details", + "baseName": "details", + "type": "EntityHeader", + "format": "" + }, + { + "name": "reasoning", + "baseName": "reasoning", + "type": "string", + "format": "" + } +]; +var DataSource = _DataSource; + +// models/DataSourceContextInput.ts +var _DataSourceContextInput = class _DataSourceContextInput { + static getAttributeTypeMap() { + return _DataSourceContextInput.attributeTypeMap; + } + constructor() { + } +}; +_DataSourceContextInput.discriminator = void 0; +_DataSourceContextInput.attributeTypeMap = [ + { + "name": "data_source_identifier", + "baseName": "data_source_identifier", + "type": "string", + "format": "" + }, + { + "name": "data_source_identifiers", + "baseName": "data_source_identifiers", + "type": "Array", + "format": "" + }, + { + "name": "guid", + "baseName": "guid", + "type": "string", + "format": "" + } +]; +var DataSourceContextInput = _DataSourceContextInput; + +// models/DataWarehouseObjectInput.ts +var _DataWarehouseObjectInput = class _DataWarehouseObjectInput { + static getAttributeTypeMap() { + return _DataWarehouseObjectInput.attributeTypeMap; + } + constructor() { + } +}; +_DataWarehouseObjectInput.discriminator = void 0; +_DataWarehouseObjectInput.attributeTypeMap = [ + { + "name": "database", + "baseName": "database", + "type": "string", + "format": "" + }, + { + "name": "schema", + "baseName": "schema", + "type": "string", + "format": "" + }, + { + "name": "table", + "baseName": "table", + "type": "string", + "format": "" + }, + { + "name": "column", + "baseName": "column", + "type": "string", + "format": "" + } +]; +var DataWarehouseObjectInput = _DataWarehouseObjectInput; + +// models/DataWarehouseObjects.ts +var _DataWarehouseObjects = class _DataWarehouseObjects { + static getAttributeTypeMap() { + return _DataWarehouseObjects.attributeTypeMap; + } + constructor() { + } +}; +_DataWarehouseObjects.discriminator = void 0; +_DataWarehouseObjects.attributeTypeMap = [ + { + "name": "databases", + "baseName": "databases", + "type": "Array", + "format": "" + } +]; +var DataWarehouseObjects = _DataWarehouseObjects; + +// models/Database.ts +var _Database = class _Database { + static getAttributeTypeMap() { + return _Database.attributeTypeMap; + } + constructor() { + } +}; +_Database.discriminator = void 0; +_Database.attributeTypeMap = [ + { + "name": "name", + "baseName": "name", + "type": "string", + "format": "" + }, + { + "name": "schemas", + "baseName": "schemas", + "type": "Array", + "format": "" + }, + { + "name": "auto_created", + "baseName": "auto_created", + "type": "boolean", + "format": "" + } +]; +var Database = _Database; + +// models/DbtSearchResponse.ts +var _DbtSearchResponse = class _DbtSearchResponse { + static getAttributeTypeMap() { + return _DbtSearchResponse.attributeTypeMap; + } + constructor() { + } +}; +_DbtSearchResponse.discriminator = void 0; +_DbtSearchResponse.attributeTypeMap = [ + { + "name": "dbt_connection_identifier", + "baseName": "dbt_connection_identifier", + "type": "string", + "format": "" + }, + { + "name": "project_name", + "baseName": "project_name", + "type": "string", + "format": "" + }, + { + "name": "connection_id", + "baseName": "connection_id", + "type": "string", + "format": "" + }, + { + "name": "connection_name", + "baseName": "connection_name", + "type": "string", + "format": "" + }, + { + "name": "cdw_database", + "baseName": "cdw_database", + "type": "string", + "format": "" + }, + { + "name": "import_type", + "baseName": "import_type", + "type": "string", + "format": "" + }, + { + "name": "author_name", + "baseName": "author_name", + "type": "string", + "format": "" + } +]; +var DbtSearchResponse = _DbtSearchResponse; + +// models/DeactivateUserRequest.ts +var _DeactivateUserRequest = class _DeactivateUserRequest { + static getAttributeTypeMap() { + return _DeactivateUserRequest.attributeTypeMap; + } + constructor() { + } +}; +_DeactivateUserRequest.discriminator = void 0; +_DeactivateUserRequest.attributeTypeMap = [ + { + "name": "user_identifier", + "baseName": "user_identifier", + "type": "string", + "format": "" + }, + { + "name": "base_url", + "baseName": "base_url", + "type": "string", + "format": "" + } +]; +var DeactivateUserRequest = _DeactivateUserRequest; + +// models/DefaultActionConfig.ts +var _DefaultActionConfig = class _DefaultActionConfig { + static getAttributeTypeMap() { + return _DefaultActionConfig.attributeTypeMap; + } + constructor() { + } +}; +_DefaultActionConfig.discriminator = void 0; +_DefaultActionConfig.attributeTypeMap = [ + { + "name": "visibility", + "baseName": "visibility", + "type": "boolean", + "format": "" + } +]; +var DefaultActionConfig = _DefaultActionConfig; + +// models/DefaultActionConfigInput.ts +var _DefaultActionConfigInput = class _DefaultActionConfigInput { + static getAttributeTypeMap() { + return _DefaultActionConfigInput.attributeTypeMap; + } + constructor() { + } +}; +_DefaultActionConfigInput.discriminator = void 0; +_DefaultActionConfigInput.attributeTypeMap = [ + { + "name": "visibility", + "baseName": "visibility", + "type": "boolean", + "format": "" + } +]; +var DefaultActionConfigInput = _DefaultActionConfigInput; + +// models/DefaultActionConfigInputCreate.ts +var _DefaultActionConfigInputCreate = class _DefaultActionConfigInputCreate { + static getAttributeTypeMap() { + return _DefaultActionConfigInputCreate.attributeTypeMap; + } + constructor() { + } +}; +_DefaultActionConfigInputCreate.discriminator = void 0; +_DefaultActionConfigInputCreate.attributeTypeMap = [ + { + "name": "visibility", + "baseName": "visibility", + "type": "boolean", + "format": "" + } +]; +var DefaultActionConfigInputCreate = _DefaultActionConfigInputCreate; + +// models/DefaultActionConfigSearchInput.ts +var _DefaultActionConfigSearchInput = class _DefaultActionConfigSearchInput { + static getAttributeTypeMap() { + return _DefaultActionConfigSearchInput.attributeTypeMap; + } + constructor() { + } +}; +_DefaultActionConfigSearchInput.discriminator = void 0; +_DefaultActionConfigSearchInput.attributeTypeMap = [ + { + "name": "visibility", + "baseName": "visibility", + "type": "boolean", + "format": "" + } +]; +var DefaultActionConfigSearchInput = _DefaultActionConfigSearchInput; + +// models/DeleteCollectionRequest.ts +var _DeleteCollectionRequest = class _DeleteCollectionRequest { + static getAttributeTypeMap() { + return _DeleteCollectionRequest.attributeTypeMap; + } + constructor() { + } +}; +_DeleteCollectionRequest.discriminator = void 0; +_DeleteCollectionRequest.attributeTypeMap = [ + { + "name": "collection_identifiers", + "baseName": "collection_identifiers", + "type": "Array", + "format": "" + }, + { + "name": "delete_children", + "baseName": "delete_children", + "type": "boolean", + "format": "" + }, + { + "name": "dry_run", + "baseName": "dry_run", + "type": "boolean", + "format": "" + } +]; +var DeleteCollectionRequest = _DeleteCollectionRequest; + +// models/DeleteConfigRequest.ts +var _DeleteConfigRequest = class _DeleteConfigRequest { + static getAttributeTypeMap() { + return _DeleteConfigRequest.attributeTypeMap; + } + constructor() { + } +}; +_DeleteConfigRequest.discriminator = void 0; +_DeleteConfigRequest.attributeTypeMap = [ + { + "name": "cluster_level", + "baseName": "cluster_level", + "type": "boolean", + "format": "" + } +]; +var DeleteConfigRequest = _DeleteConfigRequest; + +// models/DeleteConnectionConfigurationRequest.ts +var _DeleteConnectionConfigurationRequest = class _DeleteConnectionConfigurationRequest { + static getAttributeTypeMap() { + return _DeleteConnectionConfigurationRequest.attributeTypeMap; + } + constructor() { + } +}; +_DeleteConnectionConfigurationRequest.discriminator = void 0; +_DeleteConnectionConfigurationRequest.attributeTypeMap = [ + { + "name": "configuration_identifier", + "baseName": "configuration_identifier", + "type": "string", + "format": "" + }, + { + "name": "connection_identifier", + "baseName": "connection_identifier", + "type": "string", + "format": "" + } +]; +var DeleteConnectionConfigurationRequest = _DeleteConnectionConfigurationRequest; + +// models/DeleteConnectionRequest.ts +var _DeleteConnectionRequest = class _DeleteConnectionRequest { + static getAttributeTypeMap() { + return _DeleteConnectionRequest.attributeTypeMap; + } + constructor() { + } +}; +_DeleteConnectionRequest.discriminator = void 0; +_DeleteConnectionRequest.attributeTypeMap = [ + { + "name": "connection_identifier", + "baseName": "connection_identifier", + "type": "string", + "format": "" + } +]; +var DeleteConnectionRequest = _DeleteConnectionRequest; + +// models/DeleteMetadataRequest.ts +var _DeleteMetadataRequest = class _DeleteMetadataRequest { + static getAttributeTypeMap() { + return _DeleteMetadataRequest.attributeTypeMap; + } + constructor() { + } +}; +_DeleteMetadataRequest.discriminator = void 0; +_DeleteMetadataRequest.attributeTypeMap = [ + { + "name": "metadata", + "baseName": "metadata", + "type": "Array", + "format": "" + }, + { + "name": "delete_disabled_objects", + "baseName": "delete_disabled_objects", + "type": "boolean", + "format": "" + } +]; +var DeleteMetadataRequest = _DeleteMetadataRequest; + +// models/DeleteMetadataTypeInput.ts +var _DeleteMetadataTypeInput = class _DeleteMetadataTypeInput { + static getAttributeTypeMap() { + return _DeleteMetadataTypeInput.attributeTypeMap; + } + constructor() { + } +}; +_DeleteMetadataTypeInput.discriminator = void 0; +_DeleteMetadataTypeInput.attributeTypeMap = [ + { + "name": "type", + "baseName": "type", + "type": "DeleteMetadataTypeInputTypeEnum", + "format": "" + }, + { + "name": "identifier", + "baseName": "identifier", + "type": "string", + "format": "" + } +]; +var DeleteMetadataTypeInput = _DeleteMetadataTypeInput; + +// models/DeleteOrgEmailCustomizationRequest.ts +var _DeleteOrgEmailCustomizationRequest = class _DeleteOrgEmailCustomizationRequest { + static getAttributeTypeMap() { + return _DeleteOrgEmailCustomizationRequest.attributeTypeMap; + } + constructor() { + } +}; +_DeleteOrgEmailCustomizationRequest.discriminator = void 0; +_DeleteOrgEmailCustomizationRequest.attributeTypeMap = [ + { + "name": "org_identifiers", + "baseName": "org_identifiers", + "type": "Array", + "format": "" + } +]; +var DeleteOrgEmailCustomizationRequest = _DeleteOrgEmailCustomizationRequest; + +// models/DeleteVariablesRequest.ts +var _DeleteVariablesRequest = class _DeleteVariablesRequest { + static getAttributeTypeMap() { + return _DeleteVariablesRequest.attributeTypeMap; + } + constructor() { + } +}; +_DeleteVariablesRequest.discriminator = void 0; +_DeleteVariablesRequest.attributeTypeMap = [ + { + "name": "identifiers", + "baseName": "identifiers", + "type": "Array", + "format": "" + } +]; +var DeleteVariablesRequest = _DeleteVariablesRequest; + +// models/DeleteWebhookConfigurationsRequest.ts +var _DeleteWebhookConfigurationsRequest = class _DeleteWebhookConfigurationsRequest { + static getAttributeTypeMap() { + return _DeleteWebhookConfigurationsRequest.attributeTypeMap; + } + constructor() { + } +}; +_DeleteWebhookConfigurationsRequest.discriminator = void 0; +_DeleteWebhookConfigurationsRequest.attributeTypeMap = [ + { + "name": "webhook_identifiers", + "baseName": "webhook_identifiers", + "type": "Array", + "format": "" + } +]; +var DeleteWebhookConfigurationsRequest = _DeleteWebhookConfigurationsRequest; + +// models/DeployCommitRequest.ts +var _DeployCommitRequest = class _DeployCommitRequest { + static getAttributeTypeMap() { + return _DeployCommitRequest.attributeTypeMap; + } + constructor() { + } +}; +_DeployCommitRequest.discriminator = void 0; +_DeployCommitRequest.attributeTypeMap = [ + { + "name": "commit_id", + "baseName": "commit_id", + "type": "string", + "format": "" + }, + { + "name": "branch_name", + "baseName": "branch_name", + "type": "string", + "format": "" + }, + { + "name": "deploy_type", + "baseName": "deploy_type", + "type": "DeployCommitRequestDeployTypeEnum", + "format": "" + }, + { + "name": "deploy_policy", + "baseName": "deploy_policy", + "type": "DeployCommitRequestDeployPolicyEnum", + "format": "" + } +]; +var DeployCommitRequest = _DeployCommitRequest; + +// models/DeployResponse.ts +var _DeployResponse = class _DeployResponse { + static getAttributeTypeMap() { + return _DeployResponse.attributeTypeMap; + } + constructor() { + } +}; +_DeployResponse.discriminator = void 0; +_DeployResponse.attributeTypeMap = [ + { + "name": "file_name", + "baseName": "file_name", + "type": "string", + "format": "" + }, + { + "name": "metadata_name", + "baseName": "metadata_name", + "type": "string", + "format": "" + }, + { + "name": "metadata_type", + "baseName": "metadata_type", + "type": "string", + "format": "" + }, + { + "name": "status_code", + "baseName": "status_code", + "type": "string", + "format": "" + }, + { + "name": "status_message", + "baseName": "status_message", + "type": "string", + "format": "" + } +]; +var DeployResponse = _DeployResponse; + +// models/EntityHeader.ts +var _EntityHeader = class _EntityHeader { + static getAttributeTypeMap() { + return _EntityHeader.attributeTypeMap; + } + constructor() { + } +}; +_EntityHeader.discriminator = void 0; +_EntityHeader.attributeTypeMap = [ + { + "name": "description", + "baseName": "description", + "type": "string", + "format": "" + }, + { + "name": "data_source_name", + "baseName": "data_source_name", + "type": "string", + "format": "" + }, + { + "name": "data_source_identifier", + "baseName": "data_source_identifier", + "type": "string", + "format": "" + } +]; +var EntityHeader = _EntityHeader; + +// models/ErrorResponse.ts +var _ErrorResponse = class _ErrorResponse { + static getAttributeTypeMap() { + return _ErrorResponse.attributeTypeMap; + } + constructor() { + } +}; +_ErrorResponse.discriminator = void 0; +_ErrorResponse.attributeTypeMap = [ + { + "name": "error", + "baseName": "error", + "type": "any", + "format": "" + } +]; +var ErrorResponse = _ErrorResponse; + +// models/EurekaDataSourceSuggestionResponse.ts +var _EurekaDataSourceSuggestionResponse = class _EurekaDataSourceSuggestionResponse { + static getAttributeTypeMap() { + return _EurekaDataSourceSuggestionResponse.attributeTypeMap; + } + constructor() { + } +}; +_EurekaDataSourceSuggestionResponse.discriminator = void 0; +_EurekaDataSourceSuggestionResponse.attributeTypeMap = [ + { + "name": "data_sources", + "baseName": "data_sources", + "type": "Array", + "format": "" + } +]; +var EurekaDataSourceSuggestionResponse = _EurekaDataSourceSuggestionResponse; + +// models/EurekaDecomposeQueryResponse.ts +var _EurekaDecomposeQueryResponse = class _EurekaDecomposeQueryResponse { + static getAttributeTypeMap() { + return _EurekaDecomposeQueryResponse.attributeTypeMap; + } + constructor() { + } +}; +_EurekaDecomposeQueryResponse.discriminator = void 0; +_EurekaDecomposeQueryResponse.attributeTypeMap = [ + { + "name": "decomposedQueryResponse", + "baseName": "decomposedQueryResponse", + "type": "EurekaLLMDecomposeQueryResponse", + "format": "" + } +]; +var EurekaDecomposeQueryResponse = _EurekaDecomposeQueryResponse; + +// models/EurekaGetNLInstructionsResponse.ts +var _EurekaGetNLInstructionsResponse = class _EurekaGetNLInstructionsResponse { + static getAttributeTypeMap() { + return _EurekaGetNLInstructionsResponse.attributeTypeMap; + } + constructor() { + } +}; +_EurekaGetNLInstructionsResponse.discriminator = void 0; +_EurekaGetNLInstructionsResponse.attributeTypeMap = [ + { + "name": "nl_instructions_info", + "baseName": "nl_instructions_info", + "type": "Array", + "format": "" + } +]; +var EurekaGetNLInstructionsResponse = _EurekaGetNLInstructionsResponse; + +// models/EurekaGetRelevantQuestionsResponse.ts +var _EurekaGetRelevantQuestionsResponse = class _EurekaGetRelevantQuestionsResponse { + static getAttributeTypeMap() { + return _EurekaGetRelevantQuestionsResponse.attributeTypeMap; + } + constructor() { + } +}; +_EurekaGetRelevantQuestionsResponse.discriminator = void 0; +_EurekaGetRelevantQuestionsResponse.attributeTypeMap = [ + { + "name": "relevant_questions", + "baseName": "relevant_questions", + "type": "Array", + "format": "" + } +]; +var EurekaGetRelevantQuestionsResponse = _EurekaGetRelevantQuestionsResponse; + +// models/EurekaLLMDecomposeQueryResponse.ts +var _EurekaLLMDecomposeQueryResponse = class _EurekaLLMDecomposeQueryResponse { + static getAttributeTypeMap() { + return _EurekaLLMDecomposeQueryResponse.attributeTypeMap; + } + constructor() { + } +}; +_EurekaLLMDecomposeQueryResponse.discriminator = void 0; +_EurekaLLMDecomposeQueryResponse.attributeTypeMap = [ + { + "name": "decomposedQueries", + "baseName": "decomposedQueries", + "type": "Array", + "format": "" + } +]; +var EurekaLLMDecomposeQueryResponse = _EurekaLLMDecomposeQueryResponse; + +// models/EurekaLLMSuggestedQuery.ts +var _EurekaLLMSuggestedQuery = class _EurekaLLMSuggestedQuery { + static getAttributeTypeMap() { + return _EurekaLLMSuggestedQuery.attributeTypeMap; + } + constructor() { + } +}; +_EurekaLLMSuggestedQuery.discriminator = void 0; +_EurekaLLMSuggestedQuery.attributeTypeMap = [ + { + "name": "query", + "baseName": "query", + "type": "string", + "format": "" + }, + { + "name": "worksheetId", + "baseName": "worksheetId", + "type": "string", + "format": "" + }, + { + "name": "worksheetName", + "baseName": "worksheetName", + "type": "string", + "format": "" + } +]; +var EurekaLLMSuggestedQuery = _EurekaLLMSuggestedQuery; + +// models/EurekaRelevantQuestion.ts +var _EurekaRelevantQuestion = class _EurekaRelevantQuestion { + static getAttributeTypeMap() { + return _EurekaRelevantQuestion.attributeTypeMap; + } + constructor() { + } +}; +_EurekaRelevantQuestion.discriminator = void 0; +_EurekaRelevantQuestion.attributeTypeMap = [ + { + "name": "query", + "baseName": "query", + "type": "string", + "format": "" + }, + { + "name": "data_source_identifier", + "baseName": "data_source_identifier", + "type": "string", + "format": "" + }, + { + "name": "data_source_name", + "baseName": "data_source_name", + "type": "string", + "format": "" + } +]; +var EurekaRelevantQuestion = _EurekaRelevantQuestion; + +// models/EurekaSetNLInstructionsResponse.ts +var _EurekaSetNLInstructionsResponse = class _EurekaSetNLInstructionsResponse { + static getAttributeTypeMap() { + return _EurekaSetNLInstructionsResponse.attributeTypeMap; + } + constructor() { + } +}; +_EurekaSetNLInstructionsResponse.discriminator = void 0; +_EurekaSetNLInstructionsResponse.attributeTypeMap = [ + { + "name": "success", + "baseName": "success", + "type": "boolean", + "format": "" + } +]; +var EurekaSetNLInstructionsResponse = _EurekaSetNLInstructionsResponse; + +// models/EventChannelConfig.ts +var _EventChannelConfig = class _EventChannelConfig { + static getAttributeTypeMap() { + return _EventChannelConfig.attributeTypeMap; + } + constructor() { + } +}; +_EventChannelConfig.discriminator = void 0; +_EventChannelConfig.attributeTypeMap = [ + { + "name": "event_type", + "baseName": "event_type", + "type": "EventChannelConfigEventTypeEnum", + "format": "" + }, + { + "name": "channels", + "baseName": "channels", + "type": "Array", + "format": "" + } +]; +var EventChannelConfig = _EventChannelConfig; + +// models/EventChannelConfigInput.ts +var _EventChannelConfigInput = class _EventChannelConfigInput { + static getAttributeTypeMap() { + return _EventChannelConfigInput.attributeTypeMap; + } + constructor() { + } +}; +_EventChannelConfigInput.discriminator = void 0; +_EventChannelConfigInput.attributeTypeMap = [ + { + "name": "event_type", + "baseName": "event_type", + "type": "EventChannelConfigInputEventTypeEnum", + "format": "" + }, + { + "name": "channels", + "baseName": "channels", + "type": "Array", + "format": "" + } +]; +var EventChannelConfigInput = _EventChannelConfigInput; + +// models/ExcludeMetadataListItemInput.ts +var _ExcludeMetadataListItemInput = class _ExcludeMetadataListItemInput { + static getAttributeTypeMap() { + return _ExcludeMetadataListItemInput.attributeTypeMap; + } + constructor() { + } +}; +_ExcludeMetadataListItemInput.discriminator = void 0; +_ExcludeMetadataListItemInput.attributeTypeMap = [ + { + "name": "identifier", + "baseName": "identifier", + "type": "string", + "format": "" + }, + { + "name": "type", + "baseName": "type", + "type": "ExcludeMetadataListItemInputTypeEnum", + "format": "" + } +]; +var ExcludeMetadataListItemInput = _ExcludeMetadataListItemInput; + +// models/ExportAnswerReportRequest.ts +var _ExportAnswerReportRequest = class _ExportAnswerReportRequest { + static getAttributeTypeMap() { + return _ExportAnswerReportRequest.attributeTypeMap; + } + constructor() { + } +}; +_ExportAnswerReportRequest.discriminator = void 0; +_ExportAnswerReportRequest.attributeTypeMap = [ + { + "name": "metadata_identifier", + "baseName": "metadata_identifier", + "type": "string", + "format": "" + }, + { + "name": "session_identifier", + "baseName": "session_identifier", + "type": "string", + "format": "" + }, + { + "name": "generation_number", + "baseName": "generation_number", + "type": "number", + "format": "int32" + }, + { + "name": "file_format", + "baseName": "file_format", + "type": "ExportAnswerReportRequestFileFormatEnum", + "format": "" + }, + { + "name": "runtime_filter", + "baseName": "runtime_filter", + "type": "any", + "format": "" + }, + { + "name": "runtime_sort", + "baseName": "runtime_sort", + "type": "any", + "format": "" + }, + { + "name": "runtime_param_override", + "baseName": "runtime_param_override", + "type": "any", + "format": "" + }, + { + "name": "regional_settings", + "baseName": "regional_settings", + "type": "ExportAnswerReportRequestRegionalSettings", + "format": "" + }, + { + "name": "png_options", + "baseName": "png_options", + "type": "ExportAnswerReportRequestPngOptions", + "format": "" + }, + { + "name": "personalised_view_identifier", + "baseName": "personalised_view_identifier", + "type": "string", + "format": "" + }, + { + "name": "type", + "baseName": "type", + "type": "ExportAnswerReportRequestTypeEnum", + "format": "" + } +]; +var ExportAnswerReportRequest = _ExportAnswerReportRequest; + +// models/ExportAnswerReportRequestPngOptions.ts +var _ExportAnswerReportRequestPngOptions = class _ExportAnswerReportRequestPngOptions { + static getAttributeTypeMap() { + return _ExportAnswerReportRequestPngOptions.attributeTypeMap; + } + constructor() { + } +}; +_ExportAnswerReportRequestPngOptions.discriminator = void 0; +_ExportAnswerReportRequestPngOptions.attributeTypeMap = [ + { + "name": "x_resolution", + "baseName": "x_resolution", + "type": "number", + "format": "int32" + }, + { + "name": "y_resolution", + "baseName": "y_resolution", + "type": "number", + "format": "int32" + }, + { + "name": "scaling", + "baseName": "scaling", + "type": "number", + "format": "int32" + } +]; +var ExportAnswerReportRequestPngOptions = _ExportAnswerReportRequestPngOptions; + +// models/ExportAnswerReportRequestRegionalSettings.ts +var _ExportAnswerReportRequestRegionalSettings = class _ExportAnswerReportRequestRegionalSettings { + static getAttributeTypeMap() { + return _ExportAnswerReportRequestRegionalSettings.attributeTypeMap; + } + constructor() { + } +}; +_ExportAnswerReportRequestRegionalSettings.discriminator = void 0; +_ExportAnswerReportRequestRegionalSettings.attributeTypeMap = [ + { + "name": "currency_format", + "baseName": "currency_format", + "type": "ExportAnswerReportRequestRegionalSettingsCurrencyFormatEnum", + "format": "" + }, + { + "name": "user_locale", + "baseName": "user_locale", + "type": "ExportAnswerReportRequestRegionalSettingsUserLocaleEnum", + "format": "" + }, + { + "name": "number_format_locale", + "baseName": "number_format_locale", + "type": "ExportAnswerReportRequestRegionalSettingsNumberFormatLocaleEnum", + "format": "" + }, + { + "name": "date_format_locale", + "baseName": "date_format_locale", + "type": "ExportAnswerReportRequestRegionalSettingsDateFormatLocaleEnum", + "format": "" + } +]; +var ExportAnswerReportRequestRegionalSettings = _ExportAnswerReportRequestRegionalSettings; + +// models/ExportLiveboardReportRequest.ts +var _ExportLiveboardReportRequest = class _ExportLiveboardReportRequest { + static getAttributeTypeMap() { + return _ExportLiveboardReportRequest.attributeTypeMap; + } + constructor() { + } +}; +_ExportLiveboardReportRequest.discriminator = void 0; +_ExportLiveboardReportRequest.attributeTypeMap = [ + { + "name": "metadata_identifier", + "baseName": "metadata_identifier", + "type": "string", + "format": "" + }, + { + "name": "tab_identifiers", + "baseName": "tab_identifiers", + "type": "Array", + "format": "" + }, + { + "name": "personalised_view_identifier", + "baseName": "personalised_view_identifier", + "type": "string", + "format": "" + }, + { + "name": "visualization_identifiers", + "baseName": "visualization_identifiers", + "type": "Array", + "format": "" + }, + { + "name": "transient_content", + "baseName": "transient_content", + "type": "string", + "format": "" + }, + { + "name": "file_format", + "baseName": "file_format", + "type": "ExportLiveboardReportRequestFileFormatEnum", + "format": "" + }, + { + "name": "runtime_filter", + "baseName": "runtime_filter", + "type": "any", + "format": "" + }, + { + "name": "override_filters", + "baseName": "override_filters", + "type": "any", + "format": "" + }, + { + "name": "runtime_sort", + "baseName": "runtime_sort", + "type": "any", + "format": "" + }, + { + "name": "pdf_options", + "baseName": "pdf_options", + "type": "ExportLiveboardReportRequestPdfOptions", + "format": "" + }, + { + "name": "png_options", + "baseName": "png_options", + "type": "ExportLiveboardReportRequestPngOptions", + "format": "" + }, + { + "name": "runtime_param_override", + "baseName": "runtime_param_override", + "type": "any", + "format": "" + }, + { + "name": "regional_settings", + "baseName": "regional_settings", + "type": "ExportAnswerReportRequestRegionalSettings", + "format": "" + } +]; +var ExportLiveboardReportRequest = _ExportLiveboardReportRequest; + +// models/ExportLiveboardReportRequestPdfOptions.ts +var _ExportLiveboardReportRequestPdfOptions = class _ExportLiveboardReportRequestPdfOptions { + static getAttributeTypeMap() { + return _ExportLiveboardReportRequestPdfOptions.attributeTypeMap; + } + constructor() { + } +}; +_ExportLiveboardReportRequestPdfOptions.discriminator = void 0; +_ExportLiveboardReportRequestPdfOptions.attributeTypeMap = [ + { + "name": "page_size", + "baseName": "page_size", + "type": "ExportLiveboardReportRequestPdfOptionsPageSizeEnum", + "format": "" + }, + { + "name": "zoom_level", + "baseName": "zoom_level", + "type": "number", + "format": "int32" + }, + { + "name": "include_cover_page", + "baseName": "include_cover_page", + "type": "boolean", + "format": "" + }, + { + "name": "include_custom_logo", + "baseName": "include_custom_logo", + "type": "boolean", + "format": "" + }, + { + "name": "include_filter_page", + "baseName": "include_filter_page", + "type": "boolean", + "format": "" + }, + { + "name": "include_page_number", + "baseName": "include_page_number", + "type": "boolean", + "format": "" + }, + { + "name": "page_orientation", + "baseName": "page_orientation", + "type": "ExportLiveboardReportRequestPdfOptionsPageOrientationEnum", + "format": "" + }, + { + "name": "truncate_table", + "baseName": "truncate_table", + "type": "boolean", + "format": "" + }, + { + "name": "page_footer_text", + "baseName": "page_footer_text", + "type": "string", + "format": "" + } +]; +var ExportLiveboardReportRequestPdfOptions = _ExportLiveboardReportRequestPdfOptions; + +// models/ExportLiveboardReportRequestPngOptions.ts +var _ExportLiveboardReportRequestPngOptions = class _ExportLiveboardReportRequestPngOptions { + static getAttributeTypeMap() { + return _ExportLiveboardReportRequestPngOptions.attributeTypeMap; + } + constructor() { + } +}; +_ExportLiveboardReportRequestPngOptions.discriminator = void 0; +_ExportLiveboardReportRequestPngOptions.attributeTypeMap = [ + { + "name": "include_cover_page", + "baseName": "include_cover_page", + "type": "boolean", + "format": "" + }, + { + "name": "include_filter_page", + "baseName": "include_filter_page", + "type": "boolean", + "format": "" + }, + { + "name": "personalised_view_id", + "baseName": "personalised_view_id", + "type": "string", + "format": "" + }, + { + "name": "image_resolution", + "baseName": "image_resolution", + "type": "number", + "format": "int32" + }, + { + "name": "image_scale", + "baseName": "image_scale", + "type": "number", + "format": "int32" + }, + { + "name": "include_header", + "baseName": "include_header", + "type": "boolean", + "format": "" + } +]; +var ExportLiveboardReportRequestPngOptions = _ExportLiveboardReportRequestPngOptions; + +// models/ExportMetadataTMLBatchedRequest.ts +var _ExportMetadataTMLBatchedRequest = class _ExportMetadataTMLBatchedRequest { + static getAttributeTypeMap() { + return _ExportMetadataTMLBatchedRequest.attributeTypeMap; + } + constructor() { + } +}; +_ExportMetadataTMLBatchedRequest.discriminator = void 0; +_ExportMetadataTMLBatchedRequest.attributeTypeMap = [ + { + "name": "metadata_type", + "baseName": "metadata_type", + "type": "ExportMetadataTMLBatchedRequestMetadataTypeEnum", + "format": "" + }, + { + "name": "batch_offset", + "baseName": "batch_offset", + "type": "number", + "format": "int32" + }, + { + "name": "batch_size", + "baseName": "batch_size", + "type": "number", + "format": "int32" + }, + { + "name": "edoc_format", + "baseName": "edoc_format", + "type": "ExportMetadataTMLBatchedRequestEdocFormatEnum", + "format": "" + }, + { + "name": "export_dependent", + "baseName": "export_dependent", + "type": "boolean", + "format": "" + }, + { + "name": "all_orgs_override", + "baseName": "all_orgs_override", + "type": "boolean", + "format": "" + } +]; +var ExportMetadataTMLBatchedRequest = _ExportMetadataTMLBatchedRequest; + +// models/ExportMetadataTMLRequest.ts +var _ExportMetadataTMLRequest = class _ExportMetadataTMLRequest { + static getAttributeTypeMap() { + return _ExportMetadataTMLRequest.attributeTypeMap; + } + constructor() { + } +}; +_ExportMetadataTMLRequest.discriminator = void 0; +_ExportMetadataTMLRequest.attributeTypeMap = [ + { + "name": "metadata", + "baseName": "metadata", + "type": "Array", + "format": "" + }, + { + "name": "export_associated", + "baseName": "export_associated", + "type": "boolean", + "format": "" + }, + { + "name": "export_fqn", + "baseName": "export_fqn", + "type": "boolean", + "format": "" + }, + { + "name": "edoc_format", + "baseName": "edoc_format", + "type": "ExportMetadataTMLRequestEdocFormatEnum", + "format": "" + }, + { + "name": "export_schema_version", + "baseName": "export_schema_version", + "type": "ExportMetadataTMLRequestExportSchemaVersionEnum", + "format": "" + }, + { + "name": "export_dependent", + "baseName": "export_dependent", + "type": "boolean", + "format": "" + }, + { + "name": "export_connection_as_dependent", + "baseName": "export_connection_as_dependent", + "type": "boolean", + "format": "" + }, + { + "name": "all_orgs_override", + "baseName": "all_orgs_override", + "type": "boolean", + "format": "" + }, + { + "name": "export_options", + "baseName": "export_options", + "type": "ExportMetadataTMLRequestExportOptions", + "format": "" + } +]; +var ExportMetadataTMLRequest = _ExportMetadataTMLRequest; + +// models/ExportMetadataTMLRequestExportOptions.ts +var _ExportMetadataTMLRequestExportOptions = class _ExportMetadataTMLRequestExportOptions { + static getAttributeTypeMap() { + return _ExportMetadataTMLRequestExportOptions.attributeTypeMap; + } + constructor() { + } +}; +_ExportMetadataTMLRequestExportOptions.discriminator = void 0; +_ExportMetadataTMLRequestExportOptions.attributeTypeMap = [ + { + "name": "include_obj_id_ref", + "baseName": "include_obj_id_ref", + "type": "boolean", + "format": "" + }, + { + "name": "include_guid", + "baseName": "include_guid", + "type": "boolean", + "format": "" + }, + { + "name": "include_obj_id", + "baseName": "include_obj_id", + "type": "boolean", + "format": "" + }, + { + "name": "export_with_associated_feedbacks", + "baseName": "export_with_associated_feedbacks", + "type": "boolean", + "format": "" + }, + { + "name": "export_column_security_rules", + "baseName": "export_column_security_rules", + "type": "boolean", + "format": "" + }, + { + "name": "export_with_column_aliases", + "baseName": "export_with_column_aliases", + "type": "boolean", + "format": "" + } +]; +var ExportMetadataTMLRequestExportOptions = _ExportMetadataTMLRequestExportOptions; + +// models/ExportMetadataTypeInput.ts +var _ExportMetadataTypeInput = class _ExportMetadataTypeInput { + static getAttributeTypeMap() { + return _ExportMetadataTypeInput.attributeTypeMap; + } + constructor() { + } +}; +_ExportMetadataTypeInput.discriminator = void 0; +_ExportMetadataTypeInput.attributeTypeMap = [ + { + "name": "type", + "baseName": "type", + "type": "ExportMetadataTypeInputTypeEnum", + "format": "" + }, + { + "name": "identifier", + "baseName": "identifier", + "type": "string", + "format": "" + }, + { + "name": "session_identifier", + "baseName": "session_identifier", + "type": "string", + "format": "" + }, + { + "name": "generation_number", + "baseName": "generation_number", + "type": "number", + "format": "int32" + } +]; +var ExportMetadataTypeInput = _ExportMetadataTypeInput; + +// models/ExportOptions.ts +var _ExportOptions = class _ExportOptions { + static getAttributeTypeMap() { + return _ExportOptions.attributeTypeMap; + } + constructor() { + } +}; +_ExportOptions.discriminator = void 0; +_ExportOptions.attributeTypeMap = [ + { + "name": "include_obj_id_ref", + "baseName": "include_obj_id_ref", + "type": "boolean", + "format": "" + }, + { + "name": "include_guid", + "baseName": "include_guid", + "type": "boolean", + "format": "" + }, + { + "name": "include_obj_id", + "baseName": "include_obj_id", + "type": "boolean", + "format": "" + }, + { + "name": "export_with_associated_feedbacks", + "baseName": "export_with_associated_feedbacks", + "type": "boolean", + "format": "" + }, + { + "name": "export_column_security_rules", + "baseName": "export_column_security_rules", + "type": "boolean", + "format": "" + }, + { + "name": "export_with_column_aliases", + "baseName": "export_with_column_aliases", + "type": "boolean", + "format": "" + } +]; +var ExportOptions = _ExportOptions; + +// models/ExternalTableInput.ts +var _ExternalTableInput = class _ExternalTableInput { + static getAttributeTypeMap() { + return _ExternalTableInput.attributeTypeMap; + } + constructor() { + } +}; +_ExternalTableInput.discriminator = void 0; +_ExternalTableInput.attributeTypeMap = [ + { + "name": "connection_identifier", + "baseName": "connection_identifier", + "type": "string", + "format": "" + }, + { + "name": "database_name", + "baseName": "database_name", + "type": "string", + "format": "" + }, + { + "name": "schema_name", + "baseName": "schema_name", + "type": "string", + "format": "" + }, + { + "name": "table_name", + "baseName": "table_name", + "type": "string", + "format": "" + } +]; +var ExternalTableInput = _ExternalTableInput; + +// models/FavoriteMetadataInput.ts +var _FavoriteMetadataInput = class _FavoriteMetadataInput { + static getAttributeTypeMap() { + return _FavoriteMetadataInput.attributeTypeMap; + } + constructor() { + } +}; +_FavoriteMetadataInput.discriminator = void 0; +_FavoriteMetadataInput.attributeTypeMap = [ + { + "name": "identifier", + "baseName": "identifier", + "type": "string", + "format": "" + }, + { + "name": "type", + "baseName": "type", + "type": "FavoriteMetadataInputTypeEnum", + "format": "" + } +]; +var FavoriteMetadataInput = _FavoriteMetadataInput; + +// models/FavoriteMetadataItem.ts +var _FavoriteMetadataItem = class _FavoriteMetadataItem { + static getAttributeTypeMap() { + return _FavoriteMetadataItem.attributeTypeMap; + } + constructor() { + } +}; +_FavoriteMetadataItem.discriminator = void 0; +_FavoriteMetadataItem.attributeTypeMap = [ + { + "name": "id", + "baseName": "id", + "type": "string", + "format": "" + }, + { + "name": "name", + "baseName": "name", + "type": "string", + "format": "" + }, + { + "name": "type", + "baseName": "type", + "type": "FavoriteMetadataItemTypeEnum", + "format": "" + } +]; +var FavoriteMetadataItem = _FavoriteMetadataItem; + +// models/FavoriteObjectOptionsInput.ts +var _FavoriteObjectOptionsInput = class _FavoriteObjectOptionsInput { + static getAttributeTypeMap() { + return _FavoriteObjectOptionsInput.attributeTypeMap; + } + constructor() { + } +}; +_FavoriteObjectOptionsInput.discriminator = void 0; +_FavoriteObjectOptionsInput.attributeTypeMap = [ + { + "name": "include", + "baseName": "include", + "type": "boolean", + "format": "" + }, + { + "name": "user_identifiers", + "baseName": "user_identifiers", + "type": "Array", + "format": "" + } +]; +var FavoriteObjectOptionsInput = _FavoriteObjectOptionsInput; + +// models/FetchAnswerDataRequest.ts +var _FetchAnswerDataRequest = class _FetchAnswerDataRequest { + static getAttributeTypeMap() { + return _FetchAnswerDataRequest.attributeTypeMap; + } + constructor() { + } +}; +_FetchAnswerDataRequest.discriminator = void 0; +_FetchAnswerDataRequest.attributeTypeMap = [ + { + "name": "metadata_identifier", + "baseName": "metadata_identifier", + "type": "string", + "format": "" + }, + { + "name": "data_format", + "baseName": "data_format", + "type": "FetchAnswerDataRequestDataFormatEnum", + "format": "" + }, + { + "name": "record_offset", + "baseName": "record_offset", + "type": "number", + "format": "int32" + }, + { + "name": "record_size", + "baseName": "record_size", + "type": "number", + "format": "int32" + }, + { + "name": "runtime_filter", + "baseName": "runtime_filter", + "type": "any", + "format": "" + }, + { + "name": "runtime_sort", + "baseName": "runtime_sort", + "type": "any", + "format": "" + }, + { + "name": "runtime_param_override", + "baseName": "runtime_param_override", + "type": "any", + "format": "" + } +]; +var FetchAnswerDataRequest = _FetchAnswerDataRequest; + +// models/FetchAnswerSqlQueryRequest.ts +var _FetchAnswerSqlQueryRequest = class _FetchAnswerSqlQueryRequest { + static getAttributeTypeMap() { + return _FetchAnswerSqlQueryRequest.attributeTypeMap; + } + constructor() { + } +}; +_FetchAnswerSqlQueryRequest.discriminator = void 0; +_FetchAnswerSqlQueryRequest.attributeTypeMap = [ + { + "name": "metadata_identifier", + "baseName": "metadata_identifier", + "type": "string", + "format": "" + } +]; +var FetchAnswerSqlQueryRequest = _FetchAnswerSqlQueryRequest; + +// models/FetchAsyncImportTaskStatusRequest.ts +var _FetchAsyncImportTaskStatusRequest = class _FetchAsyncImportTaskStatusRequest { + static getAttributeTypeMap() { + return _FetchAsyncImportTaskStatusRequest.attributeTypeMap; + } + constructor() { + } +}; +_FetchAsyncImportTaskStatusRequest.discriminator = void 0; +_FetchAsyncImportTaskStatusRequest.attributeTypeMap = [ + { + "name": "task_ids", + "baseName": "task_ids", + "type": "Array", + "format": "" + }, + { + "name": "task_status", + "baseName": "task_status", + "type": "Array", + "format": "" + }, + { + "name": "author_identifier", + "baseName": "author_identifier", + "type": "string", + "format": "" + }, + { + "name": "record_offset", + "baseName": "record_offset", + "type": "number", + "format": "int32" + }, + { + "name": "record_size", + "baseName": "record_size", + "type": "number", + "format": "int32" + }, + { + "name": "include_import_response", + "baseName": "include_import_response", + "type": "boolean", + "format": "" + } +]; +var FetchAsyncImportTaskStatusRequest = _FetchAsyncImportTaskStatusRequest; + +// models/FetchColumnSecurityRulesRequest.ts +var _FetchColumnSecurityRulesRequest = class _FetchColumnSecurityRulesRequest { + static getAttributeTypeMap() { + return _FetchColumnSecurityRulesRequest.attributeTypeMap; + } + constructor() { + } +}; +_FetchColumnSecurityRulesRequest.discriminator = void 0; +_FetchColumnSecurityRulesRequest.attributeTypeMap = [ + { + "name": "tables", + "baseName": "tables", + "type": "Array", + "format": "" + } +]; +var FetchColumnSecurityRulesRequest = _FetchColumnSecurityRulesRequest; + +// models/FetchConnectionDiffStatusResponse.ts +var _FetchConnectionDiffStatusResponse = class _FetchConnectionDiffStatusResponse { + static getAttributeTypeMap() { + return _FetchConnectionDiffStatusResponse.attributeTypeMap; + } + constructor() { + } +}; +_FetchConnectionDiffStatusResponse.discriminator = void 0; +_FetchConnectionDiffStatusResponse.attributeTypeMap = [ + { + "name": "status", + "baseName": "status", + "type": "boolean", + "format": "" + } +]; +var FetchConnectionDiffStatusResponse = _FetchConnectionDiffStatusResponse; + +// models/FetchLiveboardDataRequest.ts +var _FetchLiveboardDataRequest = class _FetchLiveboardDataRequest { + static getAttributeTypeMap() { + return _FetchLiveboardDataRequest.attributeTypeMap; + } + constructor() { + } +}; +_FetchLiveboardDataRequest.discriminator = void 0; +_FetchLiveboardDataRequest.attributeTypeMap = [ + { + "name": "metadata_identifier", + "baseName": "metadata_identifier", + "type": "string", + "format": "" + }, + { + "name": "visualization_identifiers", + "baseName": "visualization_identifiers", + "type": "Array", + "format": "" + }, + { + "name": "transient_content", + "baseName": "transient_content", + "type": "string", + "format": "" + }, + { + "name": "data_format", + "baseName": "data_format", + "type": "FetchLiveboardDataRequestDataFormatEnum", + "format": "" + }, + { + "name": "record_offset", + "baseName": "record_offset", + "type": "number", + "format": "int32" + }, + { + "name": "record_size", + "baseName": "record_size", + "type": "number", + "format": "int32" + }, + { + "name": "runtime_filter", + "baseName": "runtime_filter", + "type": "any", + "format": "" + }, + { + "name": "runtime_sort", + "baseName": "runtime_sort", + "type": "any", + "format": "" + }, + { + "name": "runtime_param_override", + "baseName": "runtime_param_override", + "type": "any", + "format": "" + } +]; +var FetchLiveboardDataRequest = _FetchLiveboardDataRequest; + +// models/FetchLiveboardSqlQueryRequest.ts +var _FetchLiveboardSqlQueryRequest = class _FetchLiveboardSqlQueryRequest { + static getAttributeTypeMap() { + return _FetchLiveboardSqlQueryRequest.attributeTypeMap; + } + constructor() { + } +}; +_FetchLiveboardSqlQueryRequest.discriminator = void 0; +_FetchLiveboardSqlQueryRequest.attributeTypeMap = [ + { + "name": "metadata_identifier", + "baseName": "metadata_identifier", + "type": "string", + "format": "" + }, + { + "name": "visualization_identifiers", + "baseName": "visualization_identifiers", + "type": "Array", + "format": "" + } +]; +var FetchLiveboardSqlQueryRequest = _FetchLiveboardSqlQueryRequest; + +// models/FetchLogsRequest.ts +var _FetchLogsRequest = class _FetchLogsRequest { + static getAttributeTypeMap() { + return _FetchLogsRequest.attributeTypeMap; + } + constructor() { + } +}; +_FetchLogsRequest.discriminator = void 0; +_FetchLogsRequest.attributeTypeMap = [ + { + "name": "log_type", + "baseName": "log_type", + "type": "FetchLogsRequestLogTypeEnum", + "format": "" + }, + { + "name": "start_epoch_time_in_millis", + "baseName": "start_epoch_time_in_millis", + "type": "number", + "format": "float" + }, + { + "name": "end_epoch_time_in_millis", + "baseName": "end_epoch_time_in_millis", + "type": "number", + "format": "float" + }, + { + "name": "get_all_logs", + "baseName": "get_all_logs", + "type": "boolean", + "format": "" + } +]; +var FetchLogsRequest = _FetchLogsRequest; + +// models/FetchObjectPrivilegesRequest.ts +var _FetchObjectPrivilegesRequest = class _FetchObjectPrivilegesRequest { + static getAttributeTypeMap() { + return _FetchObjectPrivilegesRequest.attributeTypeMap; + } + constructor() { + } +}; +_FetchObjectPrivilegesRequest.discriminator = void 0; +_FetchObjectPrivilegesRequest.attributeTypeMap = [ + { + "name": "metadata", + "baseName": "metadata", + "type": "Array", + "format": "" + }, + { + "name": "principals", + "baseName": "principals", + "type": "Array", + "format": "" + }, + { + "name": "record_offset", + "baseName": "record_offset", + "type": "number", + "format": "int32" + }, + { + "name": "record_size", + "baseName": "record_size", + "type": "number", + "format": "int32" + } +]; +var FetchObjectPrivilegesRequest = _FetchObjectPrivilegesRequest; + +// models/FetchPermissionsOfPrincipalsRequest.ts +var _FetchPermissionsOfPrincipalsRequest = class _FetchPermissionsOfPrincipalsRequest { + static getAttributeTypeMap() { + return _FetchPermissionsOfPrincipalsRequest.attributeTypeMap; + } + constructor() { + } +}; +_FetchPermissionsOfPrincipalsRequest.discriminator = void 0; +_FetchPermissionsOfPrincipalsRequest.attributeTypeMap = [ + { + "name": "principals", + "baseName": "principals", + "type": "Array", + "format": "" + }, + { + "name": "metadata", + "baseName": "metadata", + "type": "Array", + "format": "" + }, + { + "name": "record_offset", + "baseName": "record_offset", + "type": "number", + "format": "int32" + }, + { + "name": "record_size", + "baseName": "record_size", + "type": "number", + "format": "int32" + }, + { + "name": "default_metadata_type", + "baseName": "default_metadata_type", + "type": "FetchPermissionsOfPrincipalsRequestDefaultMetadataTypeEnum", + "format": "" + } +]; +var FetchPermissionsOfPrincipalsRequest = _FetchPermissionsOfPrincipalsRequest; + +// models/FetchPermissionsOnMetadataRequest.ts +var _FetchPermissionsOnMetadataRequest = class _FetchPermissionsOnMetadataRequest { + static getAttributeTypeMap() { + return _FetchPermissionsOnMetadataRequest.attributeTypeMap; + } + constructor() { + } +}; +_FetchPermissionsOnMetadataRequest.discriminator = void 0; +_FetchPermissionsOnMetadataRequest.attributeTypeMap = [ + { + "name": "metadata", + "baseName": "metadata", + "type": "Array", + "format": "" + }, + { + "name": "principals", + "baseName": "principals", + "type": "Array", + "format": "" + }, + { + "name": "include_dependent_objects", + "baseName": "include_dependent_objects", + "type": "boolean", + "format": "" + }, + { + "name": "record_offset", + "baseName": "record_offset", + "type": "number", + "format": "int32" + }, + { + "name": "record_size", + "baseName": "record_size", + "type": "number", + "format": "int32" + }, + { + "name": "permission_type", + "baseName": "permission_type", + "type": "string", + "format": "" + } +]; +var FetchPermissionsOnMetadataRequest = _FetchPermissionsOnMetadataRequest; + +// models/FilterRules.ts +var _FilterRules = class _FilterRules { + static getAttributeTypeMap() { + return _FilterRules.attributeTypeMap; + } + constructor() { + } +}; +_FilterRules.discriminator = void 0; +_FilterRules.attributeTypeMap = [ + { + "name": "column_name", + "baseName": "column_name", + "type": "string", + "format": "" + }, + { + "name": "operator", + "baseName": "operator", + "type": "FilterRulesOperatorEnum", + "format": "" + }, + { + "name": "values", + "baseName": "values", + "type": "Array", + "format": "" + } +]; +var FilterRules = _FilterRules; + +// models/ForceLogoutUsersRequest.ts +var _ForceLogoutUsersRequest = class _ForceLogoutUsersRequest { + static getAttributeTypeMap() { + return _ForceLogoutUsersRequest.attributeTypeMap; + } + constructor() { + } +}; +_ForceLogoutUsersRequest.discriminator = void 0; +_ForceLogoutUsersRequest.attributeTypeMap = [ + { + "name": "user_identifiers", + "baseName": "user_identifiers", + "type": "Array", + "format": "" + } +]; +var ForceLogoutUsersRequest = _ForceLogoutUsersRequest; + +// models/Frequency.ts +var _Frequency = class _Frequency { + static getAttributeTypeMap() { + return _Frequency.attributeTypeMap; + } + constructor() { + } +}; +_Frequency.discriminator = void 0; +_Frequency.attributeTypeMap = [ + { + "name": "cron_expression", + "baseName": "cron_expression", + "type": "CronExpression", + "format": "" + } +]; +var Frequency = _Frequency; + +// models/FrequencyInput.ts +var _FrequencyInput = class _FrequencyInput { + static getAttributeTypeMap() { + return _FrequencyInput.attributeTypeMap; + } + constructor() { + } +}; +_FrequencyInput.discriminator = void 0; +_FrequencyInput.attributeTypeMap = [ + { + "name": "cron_expression", + "baseName": "cron_expression", + "type": "CronExpressionInput", + "format": "" + } +]; +var FrequencyInput = _FrequencyInput; + +// models/GenerateCSVRequest.ts +var _GenerateCSVRequest = class _GenerateCSVRequest { + static getAttributeTypeMap() { + return _GenerateCSVRequest.attributeTypeMap; + } + constructor() { + } +}; +_GenerateCSVRequest.discriminator = void 0; +_GenerateCSVRequest.attributeTypeMap = [ + { + "name": "start_date", + "baseName": "start_date", + "type": "string", + "format": "" + }, + { + "name": "end_date", + "baseName": "end_date", + "type": "string", + "format": "" + }, + { + "name": "calendar_type", + "baseName": "calendar_type", + "type": "GenerateCSVRequestCalendarTypeEnum", + "format": "" + }, + { + "name": "month_offset", + "baseName": "month_offset", + "type": "GenerateCSVRequestMonthOffsetEnum", + "format": "" + }, + { + "name": "start_day_of_week", + "baseName": "start_day_of_week", + "type": "GenerateCSVRequestStartDayOfWeekEnum", + "format": "" + }, + { + "name": "quarter_name_prefix", + "baseName": "quarter_name_prefix", + "type": "string", + "format": "" + }, + { + "name": "year_name_prefix", + "baseName": "year_name_prefix", + "type": "string", + "format": "" + } +]; +var GenerateCSVRequest = _GenerateCSVRequest; + +// models/GenericInfo.ts +var _GenericInfo = class _GenericInfo { + static getAttributeTypeMap() { + return _GenericInfo.attributeTypeMap; + } + constructor() { + } +}; +_GenericInfo.discriminator = void 0; +_GenericInfo.attributeTypeMap = [ + { + "name": "id", + "baseName": "id", + "type": "string", + "format": "" + }, + { + "name": "name", + "baseName": "name", + "type": "string", + "format": "" + } +]; +var GenericInfo = _GenericInfo; + +// models/GetAsyncImportStatusResponse.ts +var _GetAsyncImportStatusResponse = class _GetAsyncImportStatusResponse { + static getAttributeTypeMap() { + return _GetAsyncImportStatusResponse.attributeTypeMap; + } + constructor() { + } +}; +_GetAsyncImportStatusResponse.discriminator = void 0; +_GetAsyncImportStatusResponse.attributeTypeMap = [ + { + "name": "status_list", + "baseName": "status_list", + "type": "Array", + "format": "" + }, + { + "name": "last_batch", + "baseName": "last_batch", + "type": "boolean", + "format": "" + } +]; +var GetAsyncImportStatusResponse = _GetAsyncImportStatusResponse; + +// models/GetCustomAccessTokenRequest.ts +var _GetCustomAccessTokenRequest = class _GetCustomAccessTokenRequest { + static getAttributeTypeMap() { + return _GetCustomAccessTokenRequest.attributeTypeMap; + } + constructor() { + } +}; +_GetCustomAccessTokenRequest.discriminator = void 0; +_GetCustomAccessTokenRequest.attributeTypeMap = [ + { + "name": "username", + "baseName": "username", + "type": "string", + "format": "" + }, + { + "name": "password", + "baseName": "password", + "type": "string", + "format": "" + }, + { + "name": "secret_key", + "baseName": "secret_key", + "type": "string", + "format": "" + }, + { + "name": "validity_time_in_sec", + "baseName": "validity_time_in_sec", + "type": "number", + "format": "int32" + }, + { + "name": "org_identifier", + "baseName": "org_identifier", + "type": "string", + "format": "" + }, + { + "name": "persist_option", + "baseName": "persist_option", + "type": "GetCustomAccessTokenRequestPersistOptionEnum", + "format": "" + }, + { + "name": "filter_rules", + "baseName": "filter_rules", + "type": "Array", + "format": "" + }, + { + "name": "parameter_values", + "baseName": "parameter_values", + "type": "Array", + "format": "" + }, + { + "name": "variable_values", + "baseName": "variable_values", + "type": "Array", + "format": "" + }, + { + "name": "objects", + "baseName": "objects", + "type": "Array", + "format": "" + }, + { + "name": "email", + "baseName": "email", + "type": "string", + "format": "" + }, + { + "name": "display_name", + "baseName": "display_name", + "type": "string", + "format": "" + }, + { + "name": "groups", + "baseName": "groups", + "type": "Array", + "format": "" + }, + { + "name": "auto_create", + "baseName": "auto_create", + "type": "boolean", + "format": "" + } +]; +var GetCustomAccessTokenRequest = _GetCustomAccessTokenRequest; + +// models/GetDataSourceSuggestionsRequest.ts +var _GetDataSourceSuggestionsRequest = class _GetDataSourceSuggestionsRequest { + static getAttributeTypeMap() { + return _GetDataSourceSuggestionsRequest.attributeTypeMap; + } + constructor() { + } +}; +_GetDataSourceSuggestionsRequest.discriminator = void 0; +_GetDataSourceSuggestionsRequest.attributeTypeMap = [ + { + "name": "query", + "baseName": "query", + "type": "string", + "format": "" + } +]; +var GetDataSourceSuggestionsRequest = _GetDataSourceSuggestionsRequest; + +// models/GetFullAccessTokenRequest.ts +var _GetFullAccessTokenRequest = class _GetFullAccessTokenRequest { + static getAttributeTypeMap() { + return _GetFullAccessTokenRequest.attributeTypeMap; + } + constructor() { + } +}; +_GetFullAccessTokenRequest.discriminator = void 0; +_GetFullAccessTokenRequest.attributeTypeMap = [ + { + "name": "username", + "baseName": "username", + "type": "string", + "format": "" + }, + { + "name": "password", + "baseName": "password", + "type": "string", + "format": "" + }, + { + "name": "secret_key", + "baseName": "secret_key", + "type": "string", + "format": "" + }, + { + "name": "validity_time_in_sec", + "baseName": "validity_time_in_sec", + "type": "number", + "format": "int32" + }, + { + "name": "org_id", + "baseName": "org_id", + "type": "number", + "format": "int32" + }, + { + "name": "email", + "baseName": "email", + "type": "string", + "format": "" + }, + { + "name": "display_name", + "baseName": "display_name", + "type": "string", + "format": "" + }, + { + "name": "auto_create", + "baseName": "auto_create", + "type": "boolean", + "format": "" + }, + { + "name": "group_identifiers", + "baseName": "group_identifiers", + "type": "Array", + "format": "" + }, + { + "name": "user_parameters", + "baseName": "user_parameters", + "type": "GetFullAccessTokenRequestUserParameters", + "format": "" + } +]; +var GetFullAccessTokenRequest = _GetFullAccessTokenRequest; + +// models/GetFullAccessTokenRequestUserParameters.ts +var _GetFullAccessTokenRequestUserParameters = class _GetFullAccessTokenRequestUserParameters { + static getAttributeTypeMap() { + return _GetFullAccessTokenRequestUserParameters.attributeTypeMap; + } + constructor() { + } +}; +_GetFullAccessTokenRequestUserParameters.discriminator = void 0; +_GetFullAccessTokenRequestUserParameters.attributeTypeMap = [ + { + "name": "objects", + "baseName": "objects", + "type": "Array", + "format": "" + }, + { + "name": "runtime_filters", + "baseName": "runtime_filters", + "type": "Array", + "format": "" + }, + { + "name": "runtime_sorts", + "baseName": "runtime_sorts", + "type": "Array", + "format": "" + }, + { + "name": "parameters", + "baseName": "parameters", + "type": "Array", + "format": "" + } +]; +var GetFullAccessTokenRequestUserParameters = _GetFullAccessTokenRequestUserParameters; + +// models/GetNLInstructionsRequest.ts +var _GetNLInstructionsRequest = class _GetNLInstructionsRequest { + static getAttributeTypeMap() { + return _GetNLInstructionsRequest.attributeTypeMap; + } + constructor() { + } +}; +_GetNLInstructionsRequest.discriminator = void 0; +_GetNLInstructionsRequest.attributeTypeMap = [ + { + "name": "data_source_identifier", + "baseName": "data_source_identifier", + "type": "string", + "format": "" + } +]; +var GetNLInstructionsRequest = _GetNLInstructionsRequest; + +// models/GetObjectAccessTokenRequest.ts +var _GetObjectAccessTokenRequest = class _GetObjectAccessTokenRequest { + static getAttributeTypeMap() { + return _GetObjectAccessTokenRequest.attributeTypeMap; + } + constructor() { + } +}; +_GetObjectAccessTokenRequest.discriminator = void 0; +_GetObjectAccessTokenRequest.attributeTypeMap = [ + { + "name": "username", + "baseName": "username", + "type": "string", + "format": "" + }, + { + "name": "object_id", + "baseName": "object_id", + "type": "string", + "format": "" + }, + { + "name": "password", + "baseName": "password", + "type": "string", + "format": "" + }, + { + "name": "secret_key", + "baseName": "secret_key", + "type": "string", + "format": "" + }, + { + "name": "validity_time_in_sec", + "baseName": "validity_time_in_sec", + "type": "number", + "format": "int32" + }, + { + "name": "org_id", + "baseName": "org_id", + "type": "number", + "format": "int32" + }, + { + "name": "email", + "baseName": "email", + "type": "string", + "format": "" + }, + { + "name": "display_name", + "baseName": "display_name", + "type": "string", + "format": "" + }, + { + "name": "auto_create", + "baseName": "auto_create", + "type": "boolean", + "format": "" + }, + { + "name": "group_identifiers", + "baseName": "group_identifiers", + "type": "Array", + "format": "" + }, + { + "name": "user_parameters", + "baseName": "user_parameters", + "type": "GetFullAccessTokenRequestUserParameters", + "format": "" + } +]; +var GetObjectAccessTokenRequest = _GetObjectAccessTokenRequest; + +// models/GetRelevantQuestionsRequest.ts +var _GetRelevantQuestionsRequest = class _GetRelevantQuestionsRequest { + static getAttributeTypeMap() { + return _GetRelevantQuestionsRequest.attributeTypeMap; + } + constructor() { + } +}; +_GetRelevantQuestionsRequest.discriminator = void 0; +_GetRelevantQuestionsRequest.attributeTypeMap = [ + { + "name": "metadata_context", + "baseName": "metadata_context", + "type": "GetRelevantQuestionsRequestMetadataContext", + "format": "" + }, + { + "name": "limit_relevant_questions", + "baseName": "limit_relevant_questions", + "type": "number", + "format": "int32" + }, + { + "name": "bypass_cache", + "baseName": "bypass_cache", + "type": "boolean", + "format": "" + }, + { + "name": "query", + "baseName": "query", + "type": "string", + "format": "" + }, + { + "name": "ai_context", + "baseName": "ai_context", + "type": "GetRelevantQuestionsRequestAiContext", + "format": "" + } +]; +var GetRelevantQuestionsRequest = _GetRelevantQuestionsRequest; + +// models/GetRelevantQuestionsRequestAiContext.ts +var _GetRelevantQuestionsRequestAiContext = class _GetRelevantQuestionsRequestAiContext { + static getAttributeTypeMap() { + return _GetRelevantQuestionsRequestAiContext.attributeTypeMap; + } + constructor() { + } +}; +_GetRelevantQuestionsRequestAiContext.discriminator = void 0; +_GetRelevantQuestionsRequestAiContext.attributeTypeMap = [ + { + "name": "instructions", + "baseName": "instructions", + "type": "Array", + "format": "" + }, + { + "name": "content", + "baseName": "content", + "type": "Array", + "format": "" + } +]; +var GetRelevantQuestionsRequestAiContext = _GetRelevantQuestionsRequestAiContext; + +// models/GetRelevantQuestionsRequestMetadataContext.ts +var _GetRelevantQuestionsRequestMetadataContext = class _GetRelevantQuestionsRequestMetadataContext { + static getAttributeTypeMap() { + return _GetRelevantQuestionsRequestMetadataContext.attributeTypeMap; + } + constructor() { + } +}; +_GetRelevantQuestionsRequestMetadataContext.discriminator = void 0; +_GetRelevantQuestionsRequestMetadataContext.attributeTypeMap = [ + { + "name": "data_source_identifiers", + "baseName": "data_source_identifiers", + "type": "Array", + "format": "" + }, + { + "name": "answer_identifiers", + "baseName": "answer_identifiers", + "type": "Array", + "format": "" + }, + { + "name": "conversation_identifier", + "baseName": "conversation_identifier", + "type": "string", + "format": "" + }, + { + "name": "liveboard_identifiers", + "baseName": "liveboard_identifiers", + "type": "Array", + "format": "" + } +]; +var GetRelevantQuestionsRequestMetadataContext = _GetRelevantQuestionsRequestMetadataContext; + +// models/GetTokenResponse.ts +var _GetTokenResponse = class _GetTokenResponse { + static getAttributeTypeMap() { + return _GetTokenResponse.attributeTypeMap; + } + constructor() { + } +}; +_GetTokenResponse.discriminator = void 0; +_GetTokenResponse.attributeTypeMap = [ + { + "name": "token", + "baseName": "token", + "type": "string", + "format": "" + }, + { + "name": "creation_time_in_millis", + "baseName": "creation_time_in_millis", + "type": "number", + "format": "float" + }, + { + "name": "expiration_time_in_millis", + "baseName": "expiration_time_in_millis", + "type": "number", + "format": "float" + }, + { + "name": "valid_for_user_id", + "baseName": "valid_for_user_id", + "type": "string", + "format": "" + }, + { + "name": "valid_for_username", + "baseName": "valid_for_username", + "type": "string", + "format": "" + } +]; +var GetTokenResponse = _GetTokenResponse; + +// models/GroupInfo.ts +var _GroupInfo = class _GroupInfo { + static getAttributeTypeMap() { + return _GroupInfo.attributeTypeMap; + } + constructor() { + } +}; +_GroupInfo.discriminator = void 0; +_GroupInfo.attributeTypeMap = [ + { + "name": "id", + "baseName": "id", + "type": "string", + "format": "" + }, + { + "name": "name", + "baseName": "name", + "type": "string", + "format": "" + } +]; +var GroupInfo = _GroupInfo; + +// models/GroupObject.ts +var _GroupObject = class _GroupObject { + static getAttributeTypeMap() { + return _GroupObject.attributeTypeMap; + } + constructor() { + } +}; +_GroupObject.discriminator = void 0; +_GroupObject.attributeTypeMap = [ + { + "name": "identifier", + "baseName": "identifier", + "type": "string", + "format": "" + } +]; +var GroupObject = _GroupObject; + +// models/GroupsImportListInput.ts +var _GroupsImportListInput = class _GroupsImportListInput { + static getAttributeTypeMap() { + return _GroupsImportListInput.attributeTypeMap; + } + constructor() { + } +}; +_GroupsImportListInput.discriminator = void 0; +_GroupsImportListInput.attributeTypeMap = [ + { + "name": "display_name", + "baseName": "display_name", + "type": "string", + "format": "" + }, + { + "name": "group_identifier", + "baseName": "group_identifier", + "type": "string", + "format": "" + }, + { + "name": "default_liveboard_identifiers", + "baseName": "default_liveboard_identifiers", + "type": "Array", + "format": "" + }, + { + "name": "description", + "baseName": "description", + "type": "string", + "format": "" + }, + { + "name": "privileges", + "baseName": "privileges", + "type": "Array", + "format": "" + }, + { + "name": "sub_group_identifiers", + "baseName": "sub_group_identifiers", + "type": "Array", + "format": "" + }, + { + "name": "type", + "baseName": "type", + "type": "GroupsImportListInputTypeEnum", + "format": "" + }, + { + "name": "user_identifiers", + "baseName": "user_identifiers", + "type": "Array", + "format": "" + }, + { + "name": "visibility", + "baseName": "visibility", + "type": "GroupsImportListInputVisibilityEnum", + "format": "" + } +]; +var GroupsImportListInput = _GroupsImportListInput; + +// models/HeaderAttributeInput.ts +var _HeaderAttributeInput = class _HeaderAttributeInput { + static getAttributeTypeMap() { + return _HeaderAttributeInput.attributeTypeMap; + } + constructor() { + } +}; +_HeaderAttributeInput.discriminator = void 0; +_HeaderAttributeInput.attributeTypeMap = [ + { + "name": "name", + "baseName": "name", + "type": "string", + "format": "" + }, + { + "name": "value", + "baseName": "value", + "type": "string", + "format": "" + } +]; +var HeaderAttributeInput = _HeaderAttributeInput; + +// models/HeaderUpdateInput.ts +var _HeaderUpdateInput = class _HeaderUpdateInput { + static getAttributeTypeMap() { + return _HeaderUpdateInput.attributeTypeMap; + } + constructor() { + } +}; +_HeaderUpdateInput.discriminator = void 0; +_HeaderUpdateInput.attributeTypeMap = [ + { + "name": "identifier", + "baseName": "identifier", + "type": "string", + "format": "" + }, + { + "name": "obj_identifier", + "baseName": "obj_identifier", + "type": "string", + "format": "" + }, + { + "name": "type", + "baseName": "type", + "type": "HeaderUpdateInputTypeEnum", + "format": "" + }, + { + "name": "attributes", + "baseName": "attributes", + "type": "Array", + "format": "" + } +]; +var HeaderUpdateInput = _HeaderUpdateInput; + +// models/ImportEPackAsyncTaskStatus.ts +var _ImportEPackAsyncTaskStatus = class _ImportEPackAsyncTaskStatus { + static getAttributeTypeMap() { + return _ImportEPackAsyncTaskStatus.attributeTypeMap; + } + constructor() { + } +}; +_ImportEPackAsyncTaskStatus.discriminator = void 0; +_ImportEPackAsyncTaskStatus.attributeTypeMap = [ + { + "name": "tenant_id", + "baseName": "tenant_id", + "type": "string", + "format": "" + }, + { + "name": "org_id", + "baseName": "org_id", + "type": "number", + "format": "int32" + }, + { + "name": "task_id", + "baseName": "task_id", + "type": "string", + "format": "" + }, + { + "name": "task_name", + "baseName": "task_name", + "type": "string", + "format": "" + }, + { + "name": "import_response", + "baseName": "import_response", + "type": "any", + "format": "" + }, + { + "name": "task_status", + "baseName": "task_status", + "type": "ImportEPackAsyncTaskStatusTaskStatusEnum", + "format": "" + }, + { + "name": "author_id", + "baseName": "author_id", + "type": "string", + "format": "" + }, + { + "name": "import_policy", + "baseName": "import_policy", + "type": "ImportEPackAsyncTaskStatusImportPolicyEnum", + "format": "" + }, + { + "name": "created_at", + "baseName": "created_at", + "type": "number", + "format": "float" + }, + { + "name": "in_progress_at", + "baseName": "in_progress_at", + "type": "number", + "format": "float" + }, + { + "name": "completed_at", + "baseName": "completed_at", + "type": "number", + "format": "float" + }, + { + "name": "total_object_count", + "baseName": "total_object_count", + "type": "number", + "format": "int32" + }, + { + "name": "object_processed_count", + "baseName": "object_processed_count", + "type": "number", + "format": "int32" + }, + { + "name": "modified_at", + "baseName": "modified_at", + "type": "number", + "format": "float" + }, + { + "name": "author_display_name", + "baseName": "author_display_name", + "type": "string", + "format": "" + } +]; +var ImportEPackAsyncTaskStatus = _ImportEPackAsyncTaskStatus; + +// models/ImportMetadataTMLAsyncRequest.ts +var _ImportMetadataTMLAsyncRequest = class _ImportMetadataTMLAsyncRequest { + static getAttributeTypeMap() { + return _ImportMetadataTMLAsyncRequest.attributeTypeMap; + } + constructor() { + } +}; +_ImportMetadataTMLAsyncRequest.discriminator = void 0; +_ImportMetadataTMLAsyncRequest.attributeTypeMap = [ + { + "name": "metadata_tmls", + "baseName": "metadata_tmls", + "type": "Array", + "format": "" + }, + { + "name": "create_new", + "baseName": "create_new", + "type": "boolean", + "format": "" + }, + { + "name": "all_orgs_override", + "baseName": "all_orgs_override", + "type": "boolean", + "format": "" + }, + { + "name": "import_policy", + "baseName": "import_policy", + "type": "ImportMetadataTMLAsyncRequestImportPolicyEnum", + "format": "" + }, + { + "name": "skip_diff_check", + "baseName": "skip_diff_check", + "type": "boolean", + "format": "" + }, + { + "name": "enable_large_metadata_validation", + "baseName": "enable_large_metadata_validation", + "type": "boolean", + "format": "" + } +]; +var ImportMetadataTMLAsyncRequest = _ImportMetadataTMLAsyncRequest; + +// models/ImportMetadataTMLRequest.ts +var _ImportMetadataTMLRequest = class _ImportMetadataTMLRequest { + static getAttributeTypeMap() { + return _ImportMetadataTMLRequest.attributeTypeMap; + } + constructor() { + } +}; +_ImportMetadataTMLRequest.discriminator = void 0; +_ImportMetadataTMLRequest.attributeTypeMap = [ + { + "name": "metadata_tmls", + "baseName": "metadata_tmls", + "type": "Array", + "format": "" + }, + { + "name": "import_policy", + "baseName": "import_policy", + "type": "ImportMetadataTMLRequestImportPolicyEnum", + "format": "" + }, + { + "name": "create_new", + "baseName": "create_new", + "type": "boolean", + "format": "" + }, + { + "name": "all_orgs_override", + "baseName": "all_orgs_override", + "type": "boolean", + "format": "" + }, + { + "name": "skip_diff_check", + "baseName": "skip_diff_check", + "type": "boolean", + "format": "" + }, + { + "name": "enable_large_metadata_validation", + "baseName": "enable_large_metadata_validation", + "type": "boolean", + "format": "" + } +]; +var ImportMetadataTMLRequest = _ImportMetadataTMLRequest; + +// models/ImportUser.ts +var _ImportUser = class _ImportUser { + static getAttributeTypeMap() { + return _ImportUser.attributeTypeMap; + } + constructor() { + } +}; +_ImportUser.discriminator = void 0; +_ImportUser.attributeTypeMap = [ + { + "name": "user_identifier", + "baseName": "user_identifier", + "type": "string", + "format": "" + }, + { + "name": "display_name", + "baseName": "display_name", + "type": "string", + "format": "" + }, + { + "name": "password", + "baseName": "password", + "type": "string", + "format": "" + }, + { + "name": "account_type", + "baseName": "account_type", + "type": "ImportUserAccountTypeEnum", + "format": "" + }, + { + "name": "account_status", + "baseName": "account_status", + "type": "ImportUserAccountStatusEnum", + "format": "" + }, + { + "name": "email", + "baseName": "email", + "type": "string", + "format": "" + }, + { + "name": "org_identifiers", + "baseName": "org_identifiers", + "type": "Array", + "format": "" + }, + { + "name": "group_identifiers", + "baseName": "group_identifiers", + "type": "Array", + "format": "" + }, + { + "name": "visibility", + "baseName": "visibility", + "type": "ImportUserVisibilityEnum", + "format": "" + }, + { + "name": "notify_on_share", + "baseName": "notify_on_share", + "type": "boolean", + "format": "" + }, + { + "name": "show_onboarding_experience", + "baseName": "show_onboarding_experience", + "type": "boolean", + "format": "" + }, + { + "name": "onboarding_experience_completed", + "baseName": "onboarding_experience_completed", + "type": "boolean", + "format": "" + }, + { + "name": "home_liveboard_identifier", + "baseName": "home_liveboard_identifier", + "type": "string", + "format": "" + }, + { + "name": "favorite_metadata", + "baseName": "favorite_metadata", + "type": "Array", + "format": "" + }, + { + "name": "preferred_locale", + "baseName": "preferred_locale", + "type": "ImportUserPreferredLocaleEnum", + "format": "" + }, + { + "name": "use_browser_language", + "baseName": "use_browser_language", + "type": "boolean", + "format": "" + } +]; +var ImportUser = _ImportUser; + +// models/ImportUserGroupsRequest.ts +var _ImportUserGroupsRequest = class _ImportUserGroupsRequest { + static getAttributeTypeMap() { + return _ImportUserGroupsRequest.attributeTypeMap; + } + constructor() { + } +}; +_ImportUserGroupsRequest.discriminator = void 0; +_ImportUserGroupsRequest.attributeTypeMap = [ + { + "name": "groups", + "baseName": "groups", + "type": "Array", + "format": "" + }, + { + "name": "delete_unspecified_groups", + "baseName": "delete_unspecified_groups", + "type": "boolean", + "format": "" + }, + { + "name": "dry_run", + "baseName": "dry_run", + "type": "boolean", + "format": "" + } +]; +var ImportUserGroupsRequest = _ImportUserGroupsRequest; + +// models/ImportUserGroupsResponse.ts +var _ImportUserGroupsResponse = class _ImportUserGroupsResponse { + static getAttributeTypeMap() { + return _ImportUserGroupsResponse.attributeTypeMap; + } + constructor() { + } +}; +_ImportUserGroupsResponse.discriminator = void 0; +_ImportUserGroupsResponse.attributeTypeMap = [ + { + "name": "groups_added", + "baseName": "groups_added", + "type": "Array", + "format": "" + }, + { + "name": "groups_deleted", + "baseName": "groups_deleted", + "type": "Array", + "format": "" + }, + { + "name": "groups_updated", + "baseName": "groups_updated", + "type": "Array", + "format": "" + } +]; +var ImportUserGroupsResponse = _ImportUserGroupsResponse; + +// models/ImportUserType.ts +var _ImportUserType = class _ImportUserType { + static getAttributeTypeMap() { + return _ImportUserType.attributeTypeMap; + } + constructor() { + } +}; +_ImportUserType.discriminator = void 0; +_ImportUserType.attributeTypeMap = [ + { + "name": "id", + "baseName": "id", + "type": "string", + "format": "" + }, + { + "name": "name", + "baseName": "name", + "type": "string", + "format": "" + } +]; +var ImportUserType = _ImportUserType; + +// models/ImportUsersRequest.ts +var _ImportUsersRequest = class _ImportUsersRequest { + static getAttributeTypeMap() { + return _ImportUsersRequest.attributeTypeMap; + } + constructor() { + } +}; +_ImportUsersRequest.discriminator = void 0; +_ImportUsersRequest.attributeTypeMap = [ + { + "name": "users", + "baseName": "users", + "type": "Array", + "format": "" + }, + { + "name": "default_password", + "baseName": "default_password", + "type": "string", + "format": "" + }, + { + "name": "dry_run", + "baseName": "dry_run", + "type": "boolean", + "format": "" + }, + { + "name": "delete_unspecified_users", + "baseName": "delete_unspecified_users", + "type": "boolean", + "format": "" + } +]; +var ImportUsersRequest = _ImportUsersRequest; + +// models/ImportUsersResponse.ts +var _ImportUsersResponse = class _ImportUsersResponse { + static getAttributeTypeMap() { + return _ImportUsersResponse.attributeTypeMap; + } + constructor() { + } +}; +_ImportUsersResponse.discriminator = void 0; +_ImportUsersResponse.attributeTypeMap = [ + { + "name": "users_added", + "baseName": "users_added", + "type": "Array", + "format": "" + }, + { + "name": "users_updated", + "baseName": "users_updated", + "type": "Array", + "format": "" + }, + { + "name": "users_deleted", + "baseName": "users_deleted", + "type": "Array", + "format": "" + } +]; +var ImportUsersResponse = _ImportUsersResponse; + +// models/InputEurekaNLSRequest.ts +var _InputEurekaNLSRequest = class _InputEurekaNLSRequest { + static getAttributeTypeMap() { + return _InputEurekaNLSRequest.attributeTypeMap; + } + constructor() { + } +}; +_InputEurekaNLSRequest.discriminator = void 0; +_InputEurekaNLSRequest.attributeTypeMap = [ + { + "name": "agentVersion", + "baseName": "agentVersion", + "type": "number", + "format": "int32" + }, + { + "name": "bypassCache", + "baseName": "bypassCache", + "type": "boolean", + "format": "" + }, + { + "name": "instructions", + "baseName": "instructions", + "type": "Array", + "format": "" + }, + { + "name": "query", + "baseName": "query", + "type": "string", + "format": "" + } +]; +var InputEurekaNLSRequest = _InputEurekaNLSRequest; + +// models/JWTMetadataObject.ts +var _JWTMetadataObject = class _JWTMetadataObject { + static getAttributeTypeMap() { + return _JWTMetadataObject.attributeTypeMap; + } + constructor() { + } +}; +_JWTMetadataObject.discriminator = void 0; +_JWTMetadataObject.attributeTypeMap = [ + { + "name": "identifier", + "baseName": "identifier", + "type": "string", + "format": "" + }, + { + "name": "type", + "baseName": "type", + "type": "JWTMetadataObjectTypeEnum", + "format": "" + } +]; +var JWTMetadataObject = _JWTMetadataObject; + +// models/JWTParameter.ts +var _JWTParameter = class _JWTParameter { + static getAttributeTypeMap() { + return _JWTParameter.attributeTypeMap; + } + constructor() { + } +}; +_JWTParameter.discriminator = void 0; +_JWTParameter.attributeTypeMap = [ + { + "name": "runtime_filter", + "baseName": "runtime_filter", + "type": "any", + "format": "" + }, + { + "name": "runtime_sort", + "baseName": "runtime_sort", + "type": "any", + "format": "" + }, + { + "name": "runtime_param_override", + "baseName": "runtime_param_override", + "type": "any", + "format": "" + } +]; +var JWTParameter = _JWTParameter; + +// models/JWTUserOptions.ts +var _JWTUserOptions = class _JWTUserOptions { + static getAttributeTypeMap() { + return _JWTUserOptions.attributeTypeMap; + } + constructor() { + } +}; +_JWTUserOptions.discriminator = void 0; +_JWTUserOptions.attributeTypeMap = [ + { + "name": "parameters", + "baseName": "parameters", + "type": "Array", + "format": "" + }, + { + "name": "metadata", + "baseName": "metadata", + "type": "Array", + "format": "" + } +]; +var JWTUserOptions = _JWTUserOptions; + +// models/JWTUserOptionsFull.ts +var _JWTUserOptionsFull = class _JWTUserOptionsFull { + static getAttributeTypeMap() { + return _JWTUserOptionsFull.attributeTypeMap; + } + constructor() { + } +}; +_JWTUserOptionsFull.discriminator = void 0; +_JWTUserOptionsFull.attributeTypeMap = [ + { + "name": "parameters", + "baseName": "parameters", + "type": "Array", + "format": "" + } +]; +var JWTUserOptionsFull = _JWTUserOptionsFull; + +// models/JobRecipient.ts +var _JobRecipient = class _JobRecipient { + static getAttributeTypeMap() { + return _JobRecipient.attributeTypeMap; + } + constructor() { + } +}; +_JobRecipient.discriminator = void 0; +_JobRecipient.attributeTypeMap = [ + { + "name": "type", + "baseName": "type", + "type": "JobRecipientTypeEnum", + "format": "" + }, + { + "name": "id", + "baseName": "id", + "type": "string", + "format": "" + }, + { + "name": "name", + "baseName": "name", + "type": "string", + "format": "" + }, + { + "name": "email", + "baseName": "email", + "type": "string", + "format": "" + } +]; +var JobRecipient = _JobRecipient; + +// models/LiveboardContent.ts +var _LiveboardContent = class _LiveboardContent { + static getAttributeTypeMap() { + return _LiveboardContent.attributeTypeMap; + } + constructor() { + } +}; +_LiveboardContent.discriminator = void 0; +_LiveboardContent.attributeTypeMap = [ + { + "name": "available_data_row_count", + "baseName": "available_data_row_count", + "type": "number", + "format": "int32" + }, + { + "name": "column_names", + "baseName": "column_names", + "type": "Array", + "format": "" + }, + { + "name": "data_rows", + "baseName": "data_rows", + "type": "Array", + "format": "" + }, + { + "name": "record_offset", + "baseName": "record_offset", + "type": "number", + "format": "int32" + }, + { + "name": "record_size", + "baseName": "record_size", + "type": "number", + "format": "int32" + }, + { + "name": "returned_data_row_count", + "baseName": "returned_data_row_count", + "type": "number", + "format": "int32" + }, + { + "name": "sampling_ratio", + "baseName": "sampling_ratio", + "type": "number", + "format": "float" + }, + { + "name": "visualization_id", + "baseName": "visualization_id", + "type": "string", + "format": "" + }, + { + "name": "visualization_name", + "baseName": "visualization_name", + "type": "string", + "format": "" + } +]; +var LiveboardContent = _LiveboardContent; + +// models/LiveboardDataResponse.ts +var _LiveboardDataResponse = class _LiveboardDataResponse { + static getAttributeTypeMap() { + return _LiveboardDataResponse.attributeTypeMap; + } + constructor() { + } +}; +_LiveboardDataResponse.discriminator = void 0; +_LiveboardDataResponse.attributeTypeMap = [ + { + "name": "metadata_id", + "baseName": "metadata_id", + "type": "string", + "format": "" + }, + { + "name": "metadata_name", + "baseName": "metadata_name", + "type": "string", + "format": "" + }, + { + "name": "contents", + "baseName": "contents", + "type": "Array", + "format": "" + } +]; +var LiveboardDataResponse = _LiveboardDataResponse; + +// models/LiveboardOptions.ts +var _LiveboardOptions = class _LiveboardOptions { + static getAttributeTypeMap() { + return _LiveboardOptions.attributeTypeMap; + } + constructor() { + } +}; +_LiveboardOptions.discriminator = void 0; +_LiveboardOptions.attributeTypeMap = [ + { + "name": "visualization_identifiers", + "baseName": "visualization_identifiers", + "type": "Array", + "format": "" + } +]; +var LiveboardOptions = _LiveboardOptions; + +// models/LiveboardOptionsInput.ts +var _LiveboardOptionsInput = class _LiveboardOptionsInput { + static getAttributeTypeMap() { + return _LiveboardOptionsInput.attributeTypeMap; + } + constructor() { + } +}; +_LiveboardOptionsInput.discriminator = void 0; +_LiveboardOptionsInput.attributeTypeMap = [ + { + "name": "visualization_identifiers", + "baseName": "visualization_identifiers", + "type": "Array", + "format": "" + } +]; +var LiveboardOptionsInput = _LiveboardOptionsInput; + +// models/LogResponse.ts +var _LogResponse = class _LogResponse { + static getAttributeTypeMap() { + return _LogResponse.attributeTypeMap; + } + constructor() { + } +}; +_LogResponse.discriminator = void 0; +_LogResponse.attributeTypeMap = [ + { + "name": "date", + "baseName": "date", + "type": "string", + "format": "" + }, + { + "name": "log", + "baseName": "log", + "type": "string", + "format": "" + } +]; +var LogResponse = _LogResponse; + +// models/LoginRequest.ts +var _LoginRequest = class _LoginRequest { + static getAttributeTypeMap() { + return _LoginRequest.attributeTypeMap; + } + constructor() { + } +}; +_LoginRequest.discriminator = void 0; +_LoginRequest.attributeTypeMap = [ + { + "name": "username", + "baseName": "username", + "type": "string", + "format": "" + }, + { + "name": "password", + "baseName": "password", + "type": "string", + "format": "" + }, + { + "name": "org_identifier", + "baseName": "org_identifier", + "type": "string", + "format": "" + }, + { + "name": "remember_me", + "baseName": "remember_me", + "type": "boolean", + "format": "" + } +]; +var LoginRequest = _LoginRequest; + +// models/ManageObjectPrivilegeRequest.ts +var _ManageObjectPrivilegeRequest = class _ManageObjectPrivilegeRequest { + static getAttributeTypeMap() { + return _ManageObjectPrivilegeRequest.attributeTypeMap; + } + constructor() { + } +}; +_ManageObjectPrivilegeRequest.discriminator = void 0; +_ManageObjectPrivilegeRequest.attributeTypeMap = [ + { + "name": "operation", + "baseName": "operation", + "type": "ManageObjectPrivilegeRequestOperationEnum", + "format": "" + }, + { + "name": "metadata_type", + "baseName": "metadata_type", + "type": "ManageObjectPrivilegeRequestMetadataTypeEnum", + "format": "" + }, + { + "name": "object_privilege_types", + "baseName": "object_privilege_types", + "type": "Array", + "format": "" + }, + { + "name": "metadata_identifiers", + "baseName": "metadata_identifiers", + "type": "Array", + "format": "" + }, + { + "name": "principals", + "baseName": "principals", + "type": "Array", + "format": "" + } +]; +var ManageObjectPrivilegeRequest = _ManageObjectPrivilegeRequest; + +// models/MetadataAssociationItem.ts +var _MetadataAssociationItem = class _MetadataAssociationItem { + static getAttributeTypeMap() { + return _MetadataAssociationItem.attributeTypeMap; + } + constructor() { + } +}; +_MetadataAssociationItem.discriminator = void 0; +_MetadataAssociationItem.attributeTypeMap = [ + { + "name": "action_config", + "baseName": "action_config", + "type": "ActionConfig", + "format": "" + }, + { + "name": "identifier", + "baseName": "identifier", + "type": "string", + "format": "" + }, + { + "name": "type", + "baseName": "type", + "type": "string", + "format": "" + } +]; +var MetadataAssociationItem = _MetadataAssociationItem; + +// models/MetadataContext.ts +var _MetadataContext = class _MetadataContext { + static getAttributeTypeMap() { + return _MetadataContext.attributeTypeMap; + } + constructor() { + } +}; +_MetadataContext.discriminator = void 0; +_MetadataContext.attributeTypeMap = [ + { + "name": "data_source_identifiers", + "baseName": "data_source_identifiers", + "type": "Array", + "format": "" + }, + { + "name": "answer_identifiers", + "baseName": "answer_identifiers", + "type": "Array", + "format": "" + }, + { + "name": "conversation_identifier", + "baseName": "conversation_identifier", + "type": "string", + "format": "" + }, + { + "name": "liveboard_identifiers", + "baseName": "liveboard_identifiers", + "type": "Array", + "format": "" + } +]; +var MetadataContext = _MetadataContext; + +// models/MetadataInput.ts +var _MetadataInput = class _MetadataInput { + static getAttributeTypeMap() { + return _MetadataInput.attributeTypeMap; + } + constructor() { + } +}; +_MetadataInput.discriminator = void 0; +_MetadataInput.attributeTypeMap = [ + { + "name": "identifier", + "baseName": "identifier", + "type": "string", + "format": "" + }, + { + "name": "type", + "baseName": "type", + "type": "MetadataInputTypeEnum", + "format": "" + } +]; +var MetadataInput = _MetadataInput; + +// models/MetadataListItemInput.ts +var _MetadataListItemInput = class _MetadataListItemInput { + static getAttributeTypeMap() { + return _MetadataListItemInput.attributeTypeMap; + } + constructor() { + } +}; +_MetadataListItemInput.discriminator = void 0; +_MetadataListItemInput.attributeTypeMap = [ + { + "name": "identifier", + "baseName": "identifier", + "type": "string", + "format": "" + }, + { + "name": "obj_identifier", + "baseName": "obj_identifier", + "type": "string", + "format": "" + }, + { + "name": "name_pattern", + "baseName": "name_pattern", + "type": "string", + "format": "" + }, + { + "name": "type", + "baseName": "type", + "type": "MetadataListItemInputTypeEnum", + "format": "" + }, + { + "name": "subtypes", + "baseName": "subtypes", + "type": "Array", + "format": "" + } +]; +var MetadataListItemInput = _MetadataListItemInput; + +// models/MetadataObject.ts +var _MetadataObject = class _MetadataObject { + static getAttributeTypeMap() { + return _MetadataObject.attributeTypeMap; + } + constructor() { + } +}; +_MetadataObject.discriminator = void 0; +_MetadataObject.attributeTypeMap = [ + { + "name": "identifier", + "baseName": "identifier", + "type": "string", + "format": "" + }, + { + "name": "type", + "baseName": "type", + "type": "MetadataObjectTypeEnum", + "format": "" + } +]; +var MetadataObject = _MetadataObject; + +// models/MetadataResponse.ts +var _MetadataResponse = class _MetadataResponse { + static getAttributeTypeMap() { + return _MetadataResponse.attributeTypeMap; + } + constructor() { + } +}; +_MetadataResponse.discriminator = void 0; +_MetadataResponse.attributeTypeMap = [ + { + "name": "name", + "baseName": "name", + "type": "string", + "format": "" + }, + { + "name": "id", + "baseName": "id", + "type": "string", + "format": "" + }, + { + "name": "type", + "baseName": "type", + "type": "MetadataResponseTypeEnum", + "format": "" + } +]; +var MetadataResponse = _MetadataResponse; + +// models/MetadataSearchResponse.ts +var _MetadataSearchResponse = class _MetadataSearchResponse { + static getAttributeTypeMap() { + return _MetadataSearchResponse.attributeTypeMap; + } + constructor() { + } +}; +_MetadataSearchResponse.discriminator = void 0; +_MetadataSearchResponse.attributeTypeMap = [ + { + "name": "metadata_id", + "baseName": "metadata_id", + "type": "string", + "format": "" + }, + { + "name": "metadata_name", + "baseName": "metadata_name", + "type": "string", + "format": "" + }, + { + "name": "metadata_type", + "baseName": "metadata_type", + "type": "MetadataSearchResponseMetadataTypeEnum", + "format": "" + }, + { + "name": "metadata_obj_id", + "baseName": "metadata_obj_id", + "type": "string", + "format": "" + }, + { + "name": "dependent_objects", + "baseName": "dependent_objects", + "type": "any", + "format": "" + }, + { + "name": "incomplete_objects", + "baseName": "incomplete_objects", + "type": "Array", + "format": "" + }, + { + "name": "metadata_detail", + "baseName": "metadata_detail", + "type": "any", + "format": "" + }, + { + "name": "metadata_header", + "baseName": "metadata_header", + "type": "any", + "format": "" + }, + { + "name": "visualization_headers", + "baseName": "visualization_headers", + "type": "Array", + "format": "" + }, + { + "name": "stats", + "baseName": "stats", + "type": "any", + "format": "" + } +]; +var MetadataSearchResponse = _MetadataSearchResponse; + +// models/MetadataSearchSortOptions.ts +var _MetadataSearchSortOptions = class _MetadataSearchSortOptions { + static getAttributeTypeMap() { + return _MetadataSearchSortOptions.attributeTypeMap; + } + constructor() { + } +}; +_MetadataSearchSortOptions.discriminator = void 0; +_MetadataSearchSortOptions.attributeTypeMap = [ + { + "name": "field_name", + "baseName": "field_name", + "type": "MetadataSearchSortOptionsFieldNameEnum", + "format": "" + }, + { + "name": "order", + "baseName": "order", + "type": "MetadataSearchSortOptionsOrderEnum", + "format": "" + } +]; +var MetadataSearchSortOptions = _MetadataSearchSortOptions; + +// models/ModelTableList.ts +var _ModelTableList = class _ModelTableList { + static getAttributeTypeMap() { + return _ModelTableList.attributeTypeMap; + } + constructor() { + } +}; +_ModelTableList.discriminator = void 0; +_ModelTableList.attributeTypeMap = [ + { + "name": "model_name", + "baseName": "model_name", + "type": "string", + "format": "" + }, + { + "name": "model_path", + "baseName": "model_path", + "type": "string", + "format": "" + }, + { + "name": "tables", + "baseName": "tables", + "type": "Array", + "format": "" + } +]; +var ModelTableList = _ModelTableList; + +// models/NLInstructionsInfo.ts +var _NLInstructionsInfo = class _NLInstructionsInfo { + static getAttributeTypeMap() { + return _NLInstructionsInfo.attributeTypeMap; + } + constructor() { + } +}; +_NLInstructionsInfo.discriminator = void 0; +_NLInstructionsInfo.attributeTypeMap = [ + { + "name": "instructions", + "baseName": "instructions", + "type": "Array", + "format": "" + }, + { + "name": "scope", + "baseName": "scope", + "type": "NLInstructionsInfoScopeEnum", + "format": "" + } +]; +var NLInstructionsInfo = _NLInstructionsInfo; + +// models/NLInstructionsInfoInput.ts +var _NLInstructionsInfoInput = class _NLInstructionsInfoInput { + static getAttributeTypeMap() { + return _NLInstructionsInfoInput.attributeTypeMap; + } + constructor() { + } +}; +_NLInstructionsInfoInput.discriminator = void 0; +_NLInstructionsInfoInput.attributeTypeMap = [ + { + "name": "instructions", + "baseName": "instructions", + "type": "Array", + "format": "" + }, + { + "name": "scope", + "baseName": "scope", + "type": "NLInstructionsInfoInputScopeEnum", + "format": "" + } +]; +var NLInstructionsInfoInput = _NLInstructionsInfoInput; + +// models/ObjectIDAndName.ts +var _ObjectIDAndName = class _ObjectIDAndName { + static getAttributeTypeMap() { + return _ObjectIDAndName.attributeTypeMap; + } + constructor() { + } +}; +_ObjectIDAndName.discriminator = void 0; +_ObjectIDAndName.attributeTypeMap = [ + { + "name": "id", + "baseName": "id", + "type": "string", + "format": "" + }, + { + "name": "name", + "baseName": "name", + "type": "string", + "format": "" + } +]; +var ObjectIDAndName = _ObjectIDAndName; + +// models/ObjectPrivilegesMetadataInput.ts +var _ObjectPrivilegesMetadataInput = class _ObjectPrivilegesMetadataInput { + static getAttributeTypeMap() { + return _ObjectPrivilegesMetadataInput.attributeTypeMap; + } + constructor() { + } +}; +_ObjectPrivilegesMetadataInput.discriminator = void 0; +_ObjectPrivilegesMetadataInput.attributeTypeMap = [ + { + "name": "type", + "baseName": "type", + "type": "ObjectPrivilegesMetadataInputTypeEnum", + "format": "" + }, + { + "name": "identifier", + "baseName": "identifier", + "type": "string", + "format": "" + } +]; +var ObjectPrivilegesMetadataInput = _ObjectPrivilegesMetadataInput; + +// models/ObjectPrivilegesOfMetadataResponse.ts +var _ObjectPrivilegesOfMetadataResponse = class _ObjectPrivilegesOfMetadataResponse { + static getAttributeTypeMap() { + return _ObjectPrivilegesOfMetadataResponse.attributeTypeMap; + } + constructor() { + } +}; +_ObjectPrivilegesOfMetadataResponse.discriminator = void 0; +_ObjectPrivilegesOfMetadataResponse.attributeTypeMap = [ + { + "name": "metadata_object_privileges", + "baseName": "metadata_object_privileges", + "type": "any", + "format": "" + } +]; +var ObjectPrivilegesOfMetadataResponse = _ObjectPrivilegesOfMetadataResponse; + +// models/Org.ts +var _Org = class _Org { + static getAttributeTypeMap() { + return _Org.attributeTypeMap; + } + constructor() { + } +}; +_Org.discriminator = void 0; +_Org.attributeTypeMap = [ + { + "name": "id", + "baseName": "id", + "type": "number", + "format": "int32" + }, + { + "name": "name", + "baseName": "name", + "type": "string", + "format": "" + } +]; +var Org = _Org; + +// models/OrgChannelConfigInput.ts +var _OrgChannelConfigInput = class _OrgChannelConfigInput { + static getAttributeTypeMap() { + return _OrgChannelConfigInput.attributeTypeMap; + } + constructor() { + } +}; +_OrgChannelConfigInput.discriminator = void 0; +_OrgChannelConfigInput.attributeTypeMap = [ + { + "name": "org_identifier", + "baseName": "org_identifier", + "type": "string", + "format": "" + }, + { + "name": "operation", + "baseName": "operation", + "type": "OrgChannelConfigInputOperationEnum", + "format": "" + }, + { + "name": "preferences", + "baseName": "preferences", + "type": "Array", + "format": "" + }, + { + "name": "reset_events", + "baseName": "reset_events", + "type": "Array", + "format": "" + } +]; +var OrgChannelConfigInput = _OrgChannelConfigInput; + +// models/OrgChannelConfigResponse.ts +var _OrgChannelConfigResponse = class _OrgChannelConfigResponse { + static getAttributeTypeMap() { + return _OrgChannelConfigResponse.attributeTypeMap; + } + constructor() { + } +}; +_OrgChannelConfigResponse.discriminator = void 0; +_OrgChannelConfigResponse.attributeTypeMap = [ + { + "name": "org", + "baseName": "org", + "type": "OrgDetails", + "format": "" + }, + { + "name": "preferences", + "baseName": "preferences", + "type": "Array", + "format": "" + } +]; +var OrgChannelConfigResponse = _OrgChannelConfigResponse; + +// models/OrgDetails.ts +var _OrgDetails = class _OrgDetails { + static getAttributeTypeMap() { + return _OrgDetails.attributeTypeMap; + } + constructor() { + } +}; +_OrgDetails.discriminator = void 0; +_OrgDetails.attributeTypeMap = [ + { + "name": "id", + "baseName": "id", + "type": "string", + "format": "" + }, + { + "name": "name", + "baseName": "name", + "type": "string", + "format": "" + } +]; +var OrgDetails = _OrgDetails; + +// models/OrgInfo.ts +var _OrgInfo = class _OrgInfo { + static getAttributeTypeMap() { + return _OrgInfo.attributeTypeMap; + } + constructor() { + } +}; +_OrgInfo.discriminator = void 0; +_OrgInfo.attributeTypeMap = [ + { + "name": "id", + "baseName": "id", + "type": "number", + "format": "int32" + }, + { + "name": "name", + "baseName": "name", + "type": "string", + "format": "" + } +]; +var OrgInfo = _OrgInfo; + +// models/OrgNonEmbedAccess.ts +var _OrgNonEmbedAccess = class _OrgNonEmbedAccess { + static getAttributeTypeMap() { + return _OrgNonEmbedAccess.attributeTypeMap; + } + constructor() { + } +}; +_OrgNonEmbedAccess.discriminator = void 0; +_OrgNonEmbedAccess.attributeTypeMap = [ + { + "name": "block_full_app_access", + "baseName": "block_full_app_access", + "type": "boolean", + "format": "" + }, + { + "name": "groups_with_access", + "baseName": "groups_with_access", + "type": "Array", + "format": "" + } +]; +var OrgNonEmbedAccess = _OrgNonEmbedAccess; + +// models/OrgNonEmbedAccessInput.ts +var _OrgNonEmbedAccessInput = class _OrgNonEmbedAccessInput { + static getAttributeTypeMap() { + return _OrgNonEmbedAccessInput.attributeTypeMap; + } + constructor() { + } +}; +_OrgNonEmbedAccessInput.discriminator = void 0; +_OrgNonEmbedAccessInput.attributeTypeMap = [ + { + "name": "block_full_app_access", + "baseName": "block_full_app_access", + "type": "boolean", + "format": "" + }, + { + "name": "groups_identifiers_with_access", + "baseName": "groups_identifiers_with_access", + "type": "Array", + "format": "" + } +]; +var OrgNonEmbedAccessInput = _OrgNonEmbedAccessInput; + +// models/OrgPreferenceSearchCriteriaInput.ts +var _OrgPreferenceSearchCriteriaInput = class _OrgPreferenceSearchCriteriaInput { + static getAttributeTypeMap() { + return _OrgPreferenceSearchCriteriaInput.attributeTypeMap; + } + constructor() { + } +}; +_OrgPreferenceSearchCriteriaInput.discriminator = void 0; +_OrgPreferenceSearchCriteriaInput.attributeTypeMap = [ + { + "name": "org_identifier", + "baseName": "org_identifier", + "type": "string", + "format": "" + }, + { + "name": "event_types", + "baseName": "event_types", + "type": "Array", + "format": "" + } +]; +var OrgPreferenceSearchCriteriaInput = _OrgPreferenceSearchCriteriaInput; + +// models/OrgResponse.ts +var _OrgResponse = class _OrgResponse { + static getAttributeTypeMap() { + return _OrgResponse.attributeTypeMap; + } + constructor() { + } +}; +_OrgResponse.discriminator = void 0; +_OrgResponse.attributeTypeMap = [ + { + "name": "id", + "baseName": "id", + "type": "number", + "format": "int32" + }, + { + "name": "name", + "baseName": "name", + "type": "string", + "format": "" + }, + { + "name": "status", + "baseName": "status", + "type": "OrgResponseStatusEnum", + "format": "" + }, + { + "name": "description", + "baseName": "description", + "type": "string", + "format": "" + }, + { + "name": "visibility", + "baseName": "visibility", + "type": "OrgResponseVisibilityEnum", + "format": "" + } +]; +var OrgResponse = _OrgResponse; + +// models/OrgType.ts +var _OrgType = class _OrgType { + static getAttributeTypeMap() { + return _OrgType.attributeTypeMap; + } + constructor() { + } +}; +_OrgType.discriminator = void 0; +_OrgType.attributeTypeMap = [ + { + "name": "name", + "baseName": "name", + "type": "string", + "format": "" + }, + { + "name": "id", + "baseName": "id", + "type": "number", + "format": "int32" + } +]; +var OrgType = _OrgType; + +// models/ParameterValues.ts +var _ParameterValues = class _ParameterValues { + static getAttributeTypeMap() { + return _ParameterValues.attributeTypeMap; + } + constructor() { + } +}; +_ParameterValues.discriminator = void 0; +_ParameterValues.attributeTypeMap = [ + { + "name": "name", + "baseName": "name", + "type": "string", + "format": "" + }, + { + "name": "values", + "baseName": "values", + "type": "Array", + "format": "" + } +]; +var ParameterValues = _ParameterValues; + +// models/ParameterizeMetadataFieldsRequest.ts +var _ParameterizeMetadataFieldsRequest = class _ParameterizeMetadataFieldsRequest { + static getAttributeTypeMap() { + return _ParameterizeMetadataFieldsRequest.attributeTypeMap; + } + constructor() { + } +}; +_ParameterizeMetadataFieldsRequest.discriminator = void 0; +_ParameterizeMetadataFieldsRequest.attributeTypeMap = [ + { + "name": "metadata_type", + "baseName": "metadata_type", + "type": "ParameterizeMetadataFieldsRequestMetadataTypeEnum", + "format": "" + }, + { + "name": "metadata_identifier", + "baseName": "metadata_identifier", + "type": "string", + "format": "" + }, + { + "name": "field_type", + "baseName": "field_type", + "type": "ParameterizeMetadataFieldsRequestFieldTypeEnum", + "format": "" + }, + { + "name": "field_names", + "baseName": "field_names", + "type": "Array", + "format": "" + }, + { + "name": "variable_identifier", + "baseName": "variable_identifier", + "type": "string", + "format": "" + } +]; +var ParameterizeMetadataFieldsRequest = _ParameterizeMetadataFieldsRequest; + +// models/ParameterizeMetadataRequest.ts +var _ParameterizeMetadataRequest = class _ParameterizeMetadataRequest { + static getAttributeTypeMap() { + return _ParameterizeMetadataRequest.attributeTypeMap; + } + constructor() { + } +}; +_ParameterizeMetadataRequest.discriminator = void 0; +_ParameterizeMetadataRequest.attributeTypeMap = [ + { + "name": "metadata_type", + "baseName": "metadata_type", + "type": "ParameterizeMetadataRequestMetadataTypeEnum", + "format": "" + }, + { + "name": "metadata_identifier", + "baseName": "metadata_identifier", + "type": "string", + "format": "" + }, + { + "name": "field_type", + "baseName": "field_type", + "type": "ParameterizeMetadataRequestFieldTypeEnum", + "format": "" + }, + { + "name": "field_name", + "baseName": "field_name", + "type": "string", + "format": "" + }, + { + "name": "variable_identifier", + "baseName": "variable_identifier", + "type": "string", + "format": "" + } +]; +var ParameterizeMetadataRequest = _ParameterizeMetadataRequest; + +// models/ParametersListItem.ts +var _ParametersListItem = class _ParametersListItem { + static getAttributeTypeMap() { + return _ParametersListItem.attributeTypeMap; + } + constructor() { + } +}; +_ParametersListItem.discriminator = void 0; +_ParametersListItem.attributeTypeMap = [ + { + "name": "key", + "baseName": "key", + "type": "string", + "format": "" + }, + { + "name": "value", + "baseName": "value", + "type": "string", + "format": "" + } +]; +var ParametersListItem = _ParametersListItem; + +// models/ParametersListItemInput.ts +var _ParametersListItemInput = class _ParametersListItemInput { + static getAttributeTypeMap() { + return _ParametersListItemInput.attributeTypeMap; + } + constructor() { + } +}; +_ParametersListItemInput.discriminator = void 0; +_ParametersListItemInput.attributeTypeMap = [ + { + "name": "key", + "baseName": "key", + "type": "string", + "format": "" + }, + { + "name": "value", + "baseName": "value", + "type": "string", + "format": "" + } +]; +var ParametersListItemInput = _ParametersListItemInput; + +// models/PdfOptions.ts +var _PdfOptions = class _PdfOptions { + static getAttributeTypeMap() { + return _PdfOptions.attributeTypeMap; + } + constructor() { + } +}; +_PdfOptions.discriminator = void 0; +_PdfOptions.attributeTypeMap = [ + { + "name": "complete_liveboard", + "baseName": "complete_liveboard", + "type": "boolean", + "format": "" + }, + { + "name": "include_cover_page", + "baseName": "include_cover_page", + "type": "boolean", + "format": "" + }, + { + "name": "include_custom_logo", + "baseName": "include_custom_logo", + "type": "boolean", + "format": "" + }, + { + "name": "include_filter_page", + "baseName": "include_filter_page", + "type": "boolean", + "format": "" + }, + { + "name": "include_page_number", + "baseName": "include_page_number", + "type": "boolean", + "format": "" + }, + { + "name": "page_footer_text", + "baseName": "page_footer_text", + "type": "string", + "format": "" + }, + { + "name": "page_orientation", + "baseName": "page_orientation", + "type": "string", + "format": "" + }, + { + "name": "page_size", + "baseName": "page_size", + "type": "PdfOptionsPageSizeEnum", + "format": "" + }, + { + "name": "truncate_table", + "baseName": "truncate_table", + "type": "boolean", + "format": "" + } +]; +var PdfOptions = _PdfOptions; + +// models/PdfOptionsInput.ts +var _PdfOptionsInput = class _PdfOptionsInput { + static getAttributeTypeMap() { + return _PdfOptionsInput.attributeTypeMap; + } + constructor() { + } +}; +_PdfOptionsInput.discriminator = void 0; +_PdfOptionsInput.attributeTypeMap = [ + { + "name": "page_size", + "baseName": "page_size", + "type": "PdfOptionsInputPageSizeEnum", + "format": "" + }, + { + "name": "zoom_level", + "baseName": "zoom_level", + "type": "number", + "format": "int32" + }, + { + "name": "include_cover_page", + "baseName": "include_cover_page", + "type": "boolean", + "format": "" + }, + { + "name": "include_custom_logo", + "baseName": "include_custom_logo", + "type": "boolean", + "format": "" + }, + { + "name": "include_filter_page", + "baseName": "include_filter_page", + "type": "boolean", + "format": "" + }, + { + "name": "include_page_number", + "baseName": "include_page_number", + "type": "boolean", + "format": "" + }, + { + "name": "page_orientation", + "baseName": "page_orientation", + "type": "PdfOptionsInputPageOrientationEnum", + "format": "" + }, + { + "name": "truncate_table", + "baseName": "truncate_table", + "type": "boolean", + "format": "" + }, + { + "name": "page_footer_text", + "baseName": "page_footer_text", + "type": "string", + "format": "" + } +]; +var PdfOptionsInput = _PdfOptionsInput; + +// models/PermissionInput.ts +var _PermissionInput = class _PermissionInput { + static getAttributeTypeMap() { + return _PermissionInput.attributeTypeMap; + } + constructor() { + } +}; +_PermissionInput.discriminator = void 0; +_PermissionInput.attributeTypeMap = [ + { + "name": "principal", + "baseName": "principal", + "type": "PrincipalsInput", + "format": "" + }, + { + "name": "share_mode", + "baseName": "share_mode", + "type": "PermissionInputShareModeEnum", + "format": "" + } +]; +var PermissionInput = _PermissionInput; + +// models/PermissionOfMetadataResponse.ts +var _PermissionOfMetadataResponse = class _PermissionOfMetadataResponse { + static getAttributeTypeMap() { + return _PermissionOfMetadataResponse.attributeTypeMap; + } + constructor() { + } +}; +_PermissionOfMetadataResponse.discriminator = void 0; +_PermissionOfMetadataResponse.attributeTypeMap = [ + { + "name": "metadata_permission_details", + "baseName": "metadata_permission_details", + "type": "any", + "format": "" + } +]; +var PermissionOfMetadataResponse = _PermissionOfMetadataResponse; + +// models/PermissionOfPrincipalsResponse.ts +var _PermissionOfPrincipalsResponse = class _PermissionOfPrincipalsResponse { + static getAttributeTypeMap() { + return _PermissionOfPrincipalsResponse.attributeTypeMap; + } + constructor() { + } +}; +_PermissionOfPrincipalsResponse.discriminator = void 0; +_PermissionOfPrincipalsResponse.attributeTypeMap = [ + { + "name": "principal_permission_details", + "baseName": "principal_permission_details", + "type": "any", + "format": "" + } +]; +var PermissionOfPrincipalsResponse = _PermissionOfPrincipalsResponse; + +// models/PermissionsMetadataTypeInput.ts +var _PermissionsMetadataTypeInput = class _PermissionsMetadataTypeInput { + static getAttributeTypeMap() { + return _PermissionsMetadataTypeInput.attributeTypeMap; + } + constructor() { + } +}; +_PermissionsMetadataTypeInput.discriminator = void 0; +_PermissionsMetadataTypeInput.attributeTypeMap = [ + { + "name": "type", + "baseName": "type", + "type": "PermissionsMetadataTypeInputTypeEnum", + "format": "" + }, + { + "name": "identifier", + "baseName": "identifier", + "type": "string", + "format": "" + } +]; +var PermissionsMetadataTypeInput = _PermissionsMetadataTypeInput; + +// models/PngOptionsInput.ts +var _PngOptionsInput = class _PngOptionsInput { + static getAttributeTypeMap() { + return _PngOptionsInput.attributeTypeMap; + } + constructor() { + } +}; +_PngOptionsInput.discriminator = void 0; +_PngOptionsInput.attributeTypeMap = [ + { + "name": "include_cover_page", + "baseName": "include_cover_page", + "type": "boolean", + "format": "" + }, + { + "name": "include_filter_page", + "baseName": "include_filter_page", + "type": "boolean", + "format": "" + }, + { + "name": "personalised_view_id", + "baseName": "personalised_view_id", + "type": "string", + "format": "" + }, + { + "name": "image_resolution", + "baseName": "image_resolution", + "type": "number", + "format": "int32" + }, + { + "name": "image_scale", + "baseName": "image_scale", + "type": "number", + "format": "int32" + }, + { + "name": "include_header", + "baseName": "include_header", + "type": "boolean", + "format": "" + } +]; +var PngOptionsInput = _PngOptionsInput; + +// models/PolicyProcessOptions.ts +var _PolicyProcessOptions = class _PolicyProcessOptions { + static getAttributeTypeMap() { + return _PolicyProcessOptions.attributeTypeMap; + } + constructor() { + } +}; +_PolicyProcessOptions.discriminator = void 0; +_PolicyProcessOptions.attributeTypeMap = [ + { + "name": "impersonate_user", + "baseName": "impersonate_user", + "type": "string", + "format": "" + } +]; +var PolicyProcessOptions = _PolicyProcessOptions; + +// models/PolicyProcessOptionsInput.ts +var _PolicyProcessOptionsInput = class _PolicyProcessOptionsInput { + static getAttributeTypeMap() { + return _PolicyProcessOptionsInput.attributeTypeMap; + } + constructor() { + } +}; +_PolicyProcessOptionsInput.discriminator = void 0; +_PolicyProcessOptionsInput.attributeTypeMap = [ + { + "name": "impersonate_user", + "baseName": "impersonate_user", + "type": "string", + "format": "" + } +]; +var PolicyProcessOptionsInput = _PolicyProcessOptionsInput; + +// models/PrincipalsInput.ts +var _PrincipalsInput = class _PrincipalsInput { + static getAttributeTypeMap() { + return _PrincipalsInput.attributeTypeMap; + } + constructor() { + } +}; +_PrincipalsInput.discriminator = void 0; +_PrincipalsInput.attributeTypeMap = [ + { + "name": "identifier", + "baseName": "identifier", + "type": "string", + "format": "" + }, + { + "name": "type", + "baseName": "type", + "type": "PrincipalsInputTypeEnum", + "format": "" + } +]; +var PrincipalsInput = _PrincipalsInput; + +// models/PrincipalsListItem.ts +var _PrincipalsListItem = class _PrincipalsListItem { + static getAttributeTypeMap() { + return _PrincipalsListItem.attributeTypeMap; + } + constructor() { + } +}; +_PrincipalsListItem.discriminator = void 0; +_PrincipalsListItem.attributeTypeMap = [ + { + "name": "identifier", + "baseName": "identifier", + "type": "string", + "format": "" + }, + { + "name": "type", + "baseName": "type", + "type": "string", + "format": "" + } +]; +var PrincipalsListItem = _PrincipalsListItem; + +// models/PrincipalsListItemInput.ts +var _PrincipalsListItemInput = class _PrincipalsListItemInput { + static getAttributeTypeMap() { + return _PrincipalsListItemInput.attributeTypeMap; + } + constructor() { + } +}; +_PrincipalsListItemInput.discriminator = void 0; +_PrincipalsListItemInput.attributeTypeMap = [ + { + "name": "identifier", + "baseName": "identifier", + "type": "string", + "format": "" + }, + { + "name": "type", + "baseName": "type", + "type": "string", + "format": "" + } +]; +var PrincipalsListItemInput = _PrincipalsListItemInput; + +// models/PublishMetadataListItem.ts +var _PublishMetadataListItem = class _PublishMetadataListItem { + static getAttributeTypeMap() { + return _PublishMetadataListItem.attributeTypeMap; + } + constructor() { + } +}; +_PublishMetadataListItem.discriminator = void 0; +_PublishMetadataListItem.attributeTypeMap = [ + { + "name": "identifier", + "baseName": "identifier", + "type": "string", + "format": "" + }, + { + "name": "type", + "baseName": "type", + "type": "PublishMetadataListItemTypeEnum", + "format": "" + } +]; +var PublishMetadataListItem = _PublishMetadataListItem; + +// models/PublishMetadataRequest.ts +var _PublishMetadataRequest = class _PublishMetadataRequest { + static getAttributeTypeMap() { + return _PublishMetadataRequest.attributeTypeMap; + } + constructor() { + } +}; +_PublishMetadataRequest.discriminator = void 0; +_PublishMetadataRequest.attributeTypeMap = [ + { + "name": "metadata", + "baseName": "metadata", + "type": "Array", + "format": "" + }, + { + "name": "org_identifiers", + "baseName": "org_identifiers", + "type": "Array", + "format": "" + }, + { + "name": "skip_validation", + "baseName": "skip_validation", + "type": "boolean", + "format": "" + } +]; +var PublishMetadataRequest = _PublishMetadataRequest; + +// models/PutVariableValuesRequest.ts +var _PutVariableValuesRequest = class _PutVariableValuesRequest { + static getAttributeTypeMap() { + return _PutVariableValuesRequest.attributeTypeMap; + } + constructor() { + } +}; +_PutVariableValuesRequest.discriminator = void 0; +_PutVariableValuesRequest.attributeTypeMap = [ + { + "name": "operation", + "baseName": "operation", + "type": "PutVariableValuesRequestOperationEnum", + "format": "" + }, + { + "name": "variable_assignment", + "baseName": "variable_assignment", + "type": "Array", + "format": "" + } +]; +var PutVariableValuesRequest = _PutVariableValuesRequest; + +// models/QueryGetDecomposedQueryRequest.ts +var _QueryGetDecomposedQueryRequest = class _QueryGetDecomposedQueryRequest { + static getAttributeTypeMap() { + return _QueryGetDecomposedQueryRequest.attributeTypeMap; + } + constructor() { + } +}; +_QueryGetDecomposedQueryRequest.discriminator = void 0; +_QueryGetDecomposedQueryRequest.attributeTypeMap = [ + { + "name": "answerIds", + "baseName": "answerIds", + "type": "Array", + "format": "" + }, + { + "name": "content", + "baseName": "content", + "type": "Array", + "format": "" + }, + { + "name": "conversationId", + "baseName": "conversationId", + "type": "string", + "format": "" + }, + { + "name": "liveboardIds", + "baseName": "liveboardIds", + "type": "Array", + "format": "" + }, + { + "name": "maxDecomposedQueries", + "baseName": "maxDecomposedQueries", + "type": "number", + "format": "int32" + }, + { + "name": "nlsRequest", + "baseName": "nlsRequest", + "type": "QueryGetDecomposedQueryRequestNlsRequest", + "format": "" + }, + { + "name": "worksheetIds", + "baseName": "worksheetIds", + "type": "Array", + "format": "" + } +]; +var QueryGetDecomposedQueryRequest = _QueryGetDecomposedQueryRequest; + +// models/QueryGetDecomposedQueryRequestNlsRequest.ts +var _QueryGetDecomposedQueryRequestNlsRequest = class _QueryGetDecomposedQueryRequestNlsRequest { + static getAttributeTypeMap() { + return _QueryGetDecomposedQueryRequestNlsRequest.attributeTypeMap; + } + constructor() { + } +}; +_QueryGetDecomposedQueryRequestNlsRequest.discriminator = void 0; +_QueryGetDecomposedQueryRequestNlsRequest.attributeTypeMap = [ + { + "name": "agentVersion", + "baseName": "agentVersion", + "type": "number", + "format": "int32" + }, + { + "name": "bypassCache", + "baseName": "bypassCache", + "type": "boolean", + "format": "" + }, + { + "name": "instructions", + "baseName": "instructions", + "type": "Array", + "format": "" + }, + { + "name": "query", + "baseName": "query", + "type": "string", + "format": "" + } +]; +var QueryGetDecomposedQueryRequestNlsRequest = _QueryGetDecomposedQueryRequestNlsRequest; + +// models/RecipientDetails.ts +var _RecipientDetails = class _RecipientDetails { + static getAttributeTypeMap() { + return _RecipientDetails.attributeTypeMap; + } + constructor() { + } +}; +_RecipientDetails.discriminator = void 0; +_RecipientDetails.attributeTypeMap = [ + { + "name": "emails", + "baseName": "emails", + "type": "Array", + "format": "" + }, + { + "name": "principals", + "baseName": "principals", + "type": "Array", + "format": "" + } +]; +var RecipientDetails = _RecipientDetails; + +// models/RecipientDetailsInput.ts +var _RecipientDetailsInput = class _RecipientDetailsInput { + static getAttributeTypeMap() { + return _RecipientDetailsInput.attributeTypeMap; + } + constructor() { + } +}; +_RecipientDetailsInput.discriminator = void 0; +_RecipientDetailsInput.attributeTypeMap = [ + { + "name": "emails", + "baseName": "emails", + "type": "Array", + "format": "" + }, + { + "name": "principals", + "baseName": "principals", + "type": "Array", + "format": "" + } +]; +var RecipientDetailsInput = _RecipientDetailsInput; + +// models/RegionalSettingsInput.ts +var _RegionalSettingsInput = class _RegionalSettingsInput { + static getAttributeTypeMap() { + return _RegionalSettingsInput.attributeTypeMap; + } + constructor() { + } +}; +_RegionalSettingsInput.discriminator = void 0; +_RegionalSettingsInput.attributeTypeMap = [ + { + "name": "currency_format", + "baseName": "currency_format", + "type": "RegionalSettingsInputCurrencyFormatEnum", + "format": "" + }, + { + "name": "user_locale", + "baseName": "user_locale", + "type": "RegionalSettingsInputUserLocaleEnum", + "format": "" + }, + { + "name": "number_format_locale", + "baseName": "number_format_locale", + "type": "RegionalSettingsInputNumberFormatLocaleEnum", + "format": "" + }, + { + "name": "date_format_locale", + "baseName": "date_format_locale", + "type": "RegionalSettingsInputDateFormatLocaleEnum", + "format": "" + } +]; +var RegionalSettingsInput = _RegionalSettingsInput; + +// models/RepoConfigObject.ts +var _RepoConfigObject = class _RepoConfigObject { + static getAttributeTypeMap() { + return _RepoConfigObject.attributeTypeMap; + } + constructor() { + } +}; +_RepoConfigObject.discriminator = void 0; +_RepoConfigObject.attributeTypeMap = [ + { + "name": "repository_url", + "baseName": "repository_url", + "type": "string", + "format": "" + }, + { + "name": "username", + "baseName": "username", + "type": "string", + "format": "" + }, + { + "name": "commit_branch_name", + "baseName": "commit_branch_name", + "type": "string", + "format": "" + }, + { + "name": "branches", + "baseName": "branches", + "type": "Array", + "format": "" + }, + { + "name": "enable_guid_mapping", + "baseName": "enable_guid_mapping", + "type": "boolean", + "format": "" + }, + { + "name": "configuration_branch_name", + "baseName": "configuration_branch_name", + "type": "string", + "format": "" + }, + { + "name": "org", + "baseName": "org", + "type": "Org", + "format": "" + } +]; +var RepoConfigObject = _RepoConfigObject; + +// models/ResetUserPasswordRequest.ts +var _ResetUserPasswordRequest = class _ResetUserPasswordRequest { + static getAttributeTypeMap() { + return _ResetUserPasswordRequest.attributeTypeMap; + } + constructor() { + } +}; +_ResetUserPasswordRequest.discriminator = void 0; +_ResetUserPasswordRequest.attributeTypeMap = [ + { + "name": "new_password", + "baseName": "new_password", + "type": "string", + "format": "" + }, + { + "name": "user_identifier", + "baseName": "user_identifier", + "type": "string", + "format": "" + } +]; +var ResetUserPasswordRequest = _ResetUserPasswordRequest; + +// models/ResponseActivationURL.ts +var _ResponseActivationURL = class _ResponseActivationURL { + static getAttributeTypeMap() { + return _ResponseActivationURL.attributeTypeMap; + } + constructor() { + } +}; +_ResponseActivationURL.discriminator = void 0; +_ResponseActivationURL.attributeTypeMap = [ + { + "name": "activation_link", + "baseName": "activation_link", + "type": "string", + "format": "" + } +]; +var ResponseActivationURL = _ResponseActivationURL; + +// models/ResponseCopyObject.ts +var _ResponseCopyObject = class _ResponseCopyObject { + static getAttributeTypeMap() { + return _ResponseCopyObject.attributeTypeMap; + } + constructor() { + } +}; +_ResponseCopyObject.discriminator = void 0; +_ResponseCopyObject.attributeTypeMap = [ + { + "name": "metadata_id", + "baseName": "metadata_id", + "type": "string", + "format": "" + } +]; +var ResponseCopyObject = _ResponseCopyObject; + +// models/ResponseCustomAction.ts +var _ResponseCustomAction = class _ResponseCustomAction { + static getAttributeTypeMap() { + return _ResponseCustomAction.attributeTypeMap; + } + constructor() { + } +}; +_ResponseCustomAction.discriminator = void 0; +_ResponseCustomAction.attributeTypeMap = [ + { + "name": "action_details", + "baseName": "action_details", + "type": "ActionDetails", + "format": "" + }, + { + "name": "default_action_config", + "baseName": "default_action_config", + "type": "DefaultActionConfig", + "format": "" + }, + { + "name": "id", + "baseName": "id", + "type": "string", + "format": "" + }, + { + "name": "metadata_association", + "baseName": "metadata_association", + "type": "Array", + "format": "" + }, + { + "name": "name", + "baseName": "name", + "type": "string", + "format": "" + }, + { + "name": "user_groups", + "baseName": "user_groups", + "type": "Array", + "format": "" + } +]; +var ResponseCustomAction = _ResponseCustomAction; + +// models/ResponseFailedEntities.ts +var _ResponseFailedEntities = class _ResponseFailedEntities { + static getAttributeTypeMap() { + return _ResponseFailedEntities.attributeTypeMap; + } + constructor() { + } +}; +_ResponseFailedEntities.discriminator = void 0; +_ResponseFailedEntities.attributeTypeMap = [ + { + "name": "data", + "baseName": "data", + "type": "Array", + "format": "" + } +]; +var ResponseFailedEntities = _ResponseFailedEntities; + +// models/ResponseFailedEntity.ts +var _ResponseFailedEntity = class _ResponseFailedEntity { + static getAttributeTypeMap() { + return _ResponseFailedEntity.attributeTypeMap; + } + constructor() { + } +}; +_ResponseFailedEntity.discriminator = void 0; +_ResponseFailedEntity.attributeTypeMap = [ + { + "name": "id", + "baseName": "id", + "type": "string", + "format": "" + }, + { + "name": "name", + "baseName": "name", + "type": "string", + "format": "" + }, + { + "name": "error", + "baseName": "error", + "type": "string", + "format": "" + } +]; +var ResponseFailedEntity = _ResponseFailedEntity; + +// models/ResponseIncompleteEntities.ts +var _ResponseIncompleteEntities = class _ResponseIncompleteEntities { + static getAttributeTypeMap() { + return _ResponseIncompleteEntities.attributeTypeMap; + } + constructor() { + } +}; +_ResponseIncompleteEntities.discriminator = void 0; +_ResponseIncompleteEntities.attributeTypeMap = [ + { + "name": "data", + "baseName": "data", + "type": "Array", + "format": "" + } +]; +var ResponseIncompleteEntities = _ResponseIncompleteEntities; + +// models/ResponseIncompleteEntity.ts +var _ResponseIncompleteEntity = class _ResponseIncompleteEntity { + static getAttributeTypeMap() { + return _ResponseIncompleteEntity.attributeTypeMap; + } + constructor() { + } +}; +_ResponseIncompleteEntity.discriminator = void 0; +_ResponseIncompleteEntity.attributeTypeMap = [ + { + "name": "id", + "baseName": "id", + "type": "string", + "format": "" + }, + { + "name": "name", + "baseName": "name", + "type": "string", + "format": "" + }, + { + "name": "error", + "baseName": "error", + "type": "string", + "format": "" + } +]; +var ResponseIncompleteEntity = _ResponseIncompleteEntity; + +// models/ResponseMessage.ts +var _ResponseMessage = class _ResponseMessage { + static getAttributeTypeMap() { + return _ResponseMessage.attributeTypeMap; + } + constructor() { + } +}; +_ResponseMessage.discriminator = void 0; +_ResponseMessage.attributeTypeMap = [ + { + "name": "session_identifier", + "baseName": "session_identifier", + "type": "string", + "format": "" + }, + { + "name": "generation_number", + "baseName": "generation_number", + "type": "number", + "format": "int32" + }, + { + "name": "message_type", + "baseName": "message_type", + "type": "ResponseMessageMessageTypeEnum", + "format": "" + }, + { + "name": "visualization_type", + "baseName": "visualization_type", + "type": "ResponseMessageVisualizationTypeEnum", + "format": "" + }, + { + "name": "tokens", + "baseName": "tokens", + "type": "string", + "format": "" + }, + { + "name": "display_tokens", + "baseName": "display_tokens", + "type": "string", + "format": "" + } +]; +var ResponseMessage = _ResponseMessage; + +// models/ResponsePostUpgradeFailedEntities.ts +var _ResponsePostUpgradeFailedEntities = class _ResponsePostUpgradeFailedEntities { + static getAttributeTypeMap() { + return _ResponsePostUpgradeFailedEntities.attributeTypeMap; + } + constructor() { + } +}; +_ResponsePostUpgradeFailedEntities.discriminator = void 0; +_ResponsePostUpgradeFailedEntities.attributeTypeMap = [ + { + "name": "data", + "baseName": "data", + "type": "Array", + "format": "" + } +]; +var ResponsePostUpgradeFailedEntities = _ResponsePostUpgradeFailedEntities; + +// models/ResponsePostUpgradeFailedEntity.ts +var _ResponsePostUpgradeFailedEntity = class _ResponsePostUpgradeFailedEntity { + static getAttributeTypeMap() { + return _ResponsePostUpgradeFailedEntity.attributeTypeMap; + } + constructor() { + } +}; +_ResponsePostUpgradeFailedEntity.discriminator = void 0; +_ResponsePostUpgradeFailedEntity.attributeTypeMap = [ + { + "name": "id", + "baseName": "id", + "type": "string", + "format": "" + }, + { + "name": "name", + "baseName": "name", + "type": "string", + "format": "" + }, + { + "name": "error", + "baseName": "error", + "type": "string", + "format": "" + } +]; +var ResponsePostUpgradeFailedEntity = _ResponsePostUpgradeFailedEntity; + +// models/ResponseSchedule.ts +var _ResponseSchedule = class _ResponseSchedule { + static getAttributeTypeMap() { + return _ResponseSchedule.attributeTypeMap; + } + constructor() { + } +}; +_ResponseSchedule.discriminator = void 0; +_ResponseSchedule.attributeTypeMap = [ + { + "name": "author", + "baseName": "author", + "type": "Author", + "format": "" + }, + { + "name": "creation_time_in_millis", + "baseName": "creation_time_in_millis", + "type": "any", + "format": "" + }, + { + "name": "description", + "baseName": "description", + "type": "string", + "format": "" + }, + { + "name": "file_format", + "baseName": "file_format", + "type": "string", + "format": "" + }, + { + "name": "frequency", + "baseName": "frequency", + "type": "Frequency", + "format": "" + }, + { + "name": "id", + "baseName": "id", + "type": "string", + "format": "" + }, + { + "name": "liveboard_options", + "baseName": "liveboard_options", + "type": "LiveboardOptions", + "format": "" + }, + { + "name": "metadata", + "baseName": "metadata", + "type": "MetadataResponse", + "format": "" + }, + { + "name": "name", + "baseName": "name", + "type": "string", + "format": "" + }, + { + "name": "pdf_options", + "baseName": "pdf_options", + "type": "PdfOptions", + "format": "" + }, + { + "name": "recipient_details", + "baseName": "recipient_details", + "type": "RecipientDetails", + "format": "" + }, + { + "name": "status", + "baseName": "status", + "type": "string", + "format": "" + }, + { + "name": "time_zone", + "baseName": "time_zone", + "type": "string", + "format": "" + }, + { + "name": "history_runs", + "baseName": "history_runs", + "type": "Array", + "format": "" + }, + { + "name": "personalised_view_id", + "baseName": "personalised_view_id", + "type": "string", + "format": "" + } +]; +var ResponseSchedule = _ResponseSchedule; + +// models/ResponseScheduleRun.ts +var _ResponseScheduleRun = class _ResponseScheduleRun { + static getAttributeTypeMap() { + return _ResponseScheduleRun.attributeTypeMap; + } + constructor() { + } +}; +_ResponseScheduleRun.discriminator = void 0; +_ResponseScheduleRun.attributeTypeMap = [ + { + "name": "id", + "baseName": "id", + "type": "string", + "format": "" + }, + { + "name": "start_time_in_millis", + "baseName": "start_time_in_millis", + "type": "number", + "format": "int32" + }, + { + "name": "end_time_in_millis", + "baseName": "end_time_in_millis", + "type": "number", + "format": "int32" + }, + { + "name": "status", + "baseName": "status", + "type": "string", + "format": "" + }, + { + "name": "detail", + "baseName": "detail", + "type": "string", + "format": "" + } +]; +var ResponseScheduleRun = _ResponseScheduleRun; + +// models/ResponseSuccessfulEntities.ts +var _ResponseSuccessfulEntities = class _ResponseSuccessfulEntities { + static getAttributeTypeMap() { + return _ResponseSuccessfulEntities.attributeTypeMap; + } + constructor() { + } +}; +_ResponseSuccessfulEntities.discriminator = void 0; +_ResponseSuccessfulEntities.attributeTypeMap = [ + { + "name": "data", + "baseName": "data", + "type": "Array", + "format": "" + } +]; +var ResponseSuccessfulEntities = _ResponseSuccessfulEntities; + +// models/ResponseSuccessfulEntity.ts +var _ResponseSuccessfulEntity = class _ResponseSuccessfulEntity { + static getAttributeTypeMap() { + return _ResponseSuccessfulEntity.attributeTypeMap; + } + constructor() { + } +}; +_ResponseSuccessfulEntity.discriminator = void 0; +_ResponseSuccessfulEntity.attributeTypeMap = [ + { + "name": "id", + "baseName": "id", + "type": "string", + "format": "" + }, + { + "name": "name", + "baseName": "name", + "type": "string", + "format": "" + } +]; +var ResponseSuccessfulEntity = _ResponseSuccessfulEntity; + +// models/ResponseWorksheetToModelConversion.ts +var _ResponseWorksheetToModelConversion = class _ResponseWorksheetToModelConversion { + static getAttributeTypeMap() { + return _ResponseWorksheetToModelConversion.attributeTypeMap; + } + constructor() { + } +}; +_ResponseWorksheetToModelConversion.discriminator = void 0; +_ResponseWorksheetToModelConversion.attributeTypeMap = [ + { + "name": "name", + "baseName": "name", + "type": "string", + "format": "" + }, + { + "name": "success_count", + "baseName": "success_count", + "type": "number", + "format": "int32" + }, + { + "name": "failure_count", + "baseName": "failure_count", + "type": "number", + "format": "int32" + }, + { + "name": "incomplete_count", + "baseName": "incomplete_count", + "type": "number", + "format": "int32" + }, + { + "name": "post_upgrade_failed_count", + "baseName": "post_upgrade_failed_count", + "type": "number", + "format": "int32" + }, + { + "name": "total_time_in_millis", + "baseName": "total_time_in_millis", + "type": "number", + "format": "int32" + }, + { + "name": "successful_entities", + "baseName": "successful_entities", + "type": "ResponseSuccessfulEntities", + "format": "" + }, + { + "name": "failed_entities", + "baseName": "failed_entities", + "type": "ResponseFailedEntities", + "format": "" + }, + { + "name": "incomplete_entities", + "baseName": "incomplete_entities", + "type": "ResponseIncompleteEntities", + "format": "" + }, + { + "name": "post_upgrade_failed_entities", + "baseName": "post_upgrade_failed_entities", + "type": "ResponsePostUpgradeFailedEntities", + "format": "" + } +]; +var ResponseWorksheetToModelConversion = _ResponseWorksheetToModelConversion; + +// models/RevertCommitRequest.ts +var _RevertCommitRequest = class _RevertCommitRequest { + static getAttributeTypeMap() { + return _RevertCommitRequest.attributeTypeMap; + } + constructor() { + } +}; +_RevertCommitRequest.discriminator = void 0; +_RevertCommitRequest.attributeTypeMap = [ + { + "name": "metadata", + "baseName": "metadata", + "type": "Array", + "format": "" + }, + { + "name": "branch_name", + "baseName": "branch_name", + "type": "string", + "format": "" + }, + { + "name": "revert_policy", + "baseName": "revert_policy", + "type": "RevertCommitRequestRevertPolicyEnum", + "format": "" + } +]; +var RevertCommitRequest = _RevertCommitRequest; + +// models/RevertResponse.ts +var _RevertResponse = class _RevertResponse { + static getAttributeTypeMap() { + return _RevertResponse.attributeTypeMap; + } + constructor() { + } +}; +_RevertResponse.discriminator = void 0; +_RevertResponse.attributeTypeMap = [ + { + "name": "committer", + "baseName": "committer", + "type": "CommiterType", + "format": "" + }, + { + "name": "author", + "baseName": "author", + "type": "AuthorType", + "format": "" + }, + { + "name": "comment", + "baseName": "comment", + "type": "string", + "format": "" + }, + { + "name": "commit_time", + "baseName": "commit_time", + "type": "string", + "format": "" + }, + { + "name": "commit_id", + "baseName": "commit_id", + "type": "string", + "format": "" + }, + { + "name": "branch", + "baseName": "branch", + "type": "string", + "format": "" + }, + { + "name": "committed_files", + "baseName": "committed_files", + "type": "Array", + "format": "" + }, + { + "name": "reverted_metadata", + "baseName": "reverted_metadata", + "type": "Array", + "format": "" + } +]; +var RevertResponse = _RevertResponse; + +// models/RevertedMetadata.ts +var _RevertedMetadata = class _RevertedMetadata { + static getAttributeTypeMap() { + return _RevertedMetadata.attributeTypeMap; + } + constructor() { + } +}; +_RevertedMetadata.discriminator = void 0; +_RevertedMetadata.attributeTypeMap = [ + { + "name": "file_name", + "baseName": "file_name", + "type": "string", + "format": "" + }, + { + "name": "metadata_name", + "baseName": "metadata_name", + "type": "string", + "format": "" + }, + { + "name": "metadata_type", + "baseName": "metadata_type", + "type": "string", + "format": "" + }, + { + "name": "status_code", + "baseName": "status_code", + "type": "string", + "format": "" + }, + { + "name": "status_message", + "baseName": "status_message", + "type": "string", + "format": "" + } +]; +var RevertedMetadata = _RevertedMetadata; + +// models/RevokeRefreshTokensRequest.ts +var _RevokeRefreshTokensRequest = class _RevokeRefreshTokensRequest { + static getAttributeTypeMap() { + return _RevokeRefreshTokensRequest.attributeTypeMap; + } + constructor() { + } +}; +_RevokeRefreshTokensRequest.discriminator = void 0; +_RevokeRefreshTokensRequest.attributeTypeMap = [ + { + "name": "configuration_identifiers", + "baseName": "configuration_identifiers", + "type": "Array", + "format": "" + }, + { + "name": "user_identifiers", + "baseName": "user_identifiers", + "type": "Array", + "format": "" + }, + { + "name": "org_identifiers", + "baseName": "org_identifiers", + "type": "Array", + "format": "" + } +]; +var RevokeRefreshTokensRequest = _RevokeRefreshTokensRequest; + +// models/RevokeRefreshTokensResponse.ts +var _RevokeRefreshTokensResponse = class _RevokeRefreshTokensResponse { + static getAttributeTypeMap() { + return _RevokeRefreshTokensResponse.attributeTypeMap; + } + constructor() { + } +}; +_RevokeRefreshTokensResponse.discriminator = void 0; +_RevokeRefreshTokensResponse.attributeTypeMap = [ + { + "name": "data", + "baseName": "data", + "type": "string", + "format": "" + } +]; +var RevokeRefreshTokensResponse = _RevokeRefreshTokensResponse; + +// models/RevokeTokenRequest.ts +var _RevokeTokenRequest = class _RevokeTokenRequest { + static getAttributeTypeMap() { + return _RevokeTokenRequest.attributeTypeMap; + } + constructor() { + } +}; +_RevokeTokenRequest.discriminator = void 0; +_RevokeTokenRequest.attributeTypeMap = [ + { + "name": "user_identifier", + "baseName": "user_identifier", + "type": "string", + "format": "" + }, + { + "name": "token", + "baseName": "token", + "type": "string", + "format": "" + } +]; +var RevokeTokenRequest = _RevokeTokenRequest; + +// models/RiseGQLArgWrapper.ts +var _RiseGQLArgWrapper = class _RiseGQLArgWrapper { + static getAttributeTypeMap() { + return _RiseGQLArgWrapper.attributeTypeMap; + } + constructor() { + } +}; +_RiseGQLArgWrapper.discriminator = void 0; +_RiseGQLArgWrapper.attributeTypeMap = [ + { + "name": "name", + "baseName": "name", + "type": "string", + "format": "" + }, + { + "name": "type", + "baseName": "type", + "type": "string", + "format": "" + } +]; +var RiseGQLArgWrapper = _RiseGQLArgWrapper; + +// models/RiseSetter.ts +var _RiseSetter = class _RiseSetter { + static getAttributeTypeMap() { + return _RiseSetter.attributeTypeMap; + } + constructor() { + } +}; +_RiseSetter.discriminator = void 0; +_RiseSetter.attributeTypeMap = [ + { + "name": "field", + "baseName": "field", + "type": "string", + "format": "" + }, + { + "name": "path", + "baseName": "path", + "type": "string", + "format": "" + } +]; +var RiseSetter = _RiseSetter; + +// models/Role.ts +var _Role = class _Role { + static getAttributeTypeMap() { + return _Role.attributeTypeMap; + } + constructor() { + } +}; +_Role.discriminator = void 0; +_Role.attributeTypeMap = [ + { + "name": "id", + "baseName": "id", + "type": "string", + "format": "" + }, + { + "name": "name", + "baseName": "name", + "type": "string", + "format": "" + } +]; +var Role = _Role; + +// models/RoleResponse.ts +var _RoleResponse = class _RoleResponse { + static getAttributeTypeMap() { + return _RoleResponse.attributeTypeMap; + } + constructor() { + } +}; +_RoleResponse.discriminator = void 0; +_RoleResponse.attributeTypeMap = [ + { + "name": "id", + "baseName": "id", + "type": "string", + "format": "" + }, + { + "name": "name", + "baseName": "name", + "type": "string", + "format": "" + }, + { + "name": "description", + "baseName": "description", + "type": "string", + "format": "" + }, + { + "name": "groups_assigned_count", + "baseName": "groups_assigned_count", + "type": "number", + "format": "int32" + }, + { + "name": "orgs", + "baseName": "orgs", + "type": "Array", + "format": "" + }, + { + "name": "groups", + "baseName": "groups", + "type": "Array", + "format": "" + }, + { + "name": "privileges", + "baseName": "privileges", + "type": "Array", + "format": "" + }, + { + "name": "permission", + "baseName": "permission", + "type": "RoleResponsePermissionEnum", + "format": "" + }, + { + "name": "author_id", + "baseName": "author_id", + "type": "string", + "format": "" + }, + { + "name": "modifier_id", + "baseName": "modifier_id", + "type": "string", + "format": "" + }, + { + "name": "creation_time_in_millis", + "baseName": "creation_time_in_millis", + "type": "any", + "format": "" + }, + { + "name": "modification_time_in_millis", + "baseName": "modification_time_in_millis", + "type": "any", + "format": "" + }, + { + "name": "deleted", + "baseName": "deleted", + "type": "boolean", + "format": "" + }, + { + "name": "deprecated", + "baseName": "deprecated", + "type": "boolean", + "format": "" + }, + { + "name": "external", + "baseName": "external", + "type": "boolean", + "format": "" + }, + { + "name": "hidden", + "baseName": "hidden", + "type": "boolean", + "format": "" + }, + { + "name": "shared_via_connection", + "baseName": "shared_via_connection", + "type": "boolean", + "format": "" + } +]; +var RoleResponse = _RoleResponse; + +// models/RuntimeFilter.ts +var _RuntimeFilter = class _RuntimeFilter { + static getAttributeTypeMap() { + return _RuntimeFilter.attributeTypeMap; + } + constructor() { + } +}; +_RuntimeFilter.discriminator = void 0; +_RuntimeFilter.attributeTypeMap = [ + { + "name": "runtime_filter", + "baseName": "runtime_filter", + "type": "any", + "format": "" + } +]; +var RuntimeFilter = _RuntimeFilter; + +// models/RuntimeFilters.ts +var _RuntimeFilters = class _RuntimeFilters { + static getAttributeTypeMap() { + return _RuntimeFilters.attributeTypeMap; + } + constructor() { + } +}; +_RuntimeFilters.discriminator = void 0; +_RuntimeFilters.attributeTypeMap = [ + { + "name": "column_name", + "baseName": "column_name", + "type": "string", + "format": "" + }, + { + "name": "values", + "baseName": "values", + "type": "Array", + "format": "" + }, + { + "name": "operator", + "baseName": "operator", + "type": "RuntimeFiltersOperatorEnum", + "format": "" + }, + { + "name": "persist", + "baseName": "persist", + "type": "boolean", + "format": "" + }, + { + "name": "objects", + "baseName": "objects", + "type": "Array", + "format": "" + } +]; +var RuntimeFilters = _RuntimeFilters; + +// models/RuntimeParamOverride.ts +var _RuntimeParamOverride = class _RuntimeParamOverride { + static getAttributeTypeMap() { + return _RuntimeParamOverride.attributeTypeMap; + } + constructor() { + } +}; +_RuntimeParamOverride.discriminator = void 0; +_RuntimeParamOverride.attributeTypeMap = [ + { + "name": "runtime_param_override", + "baseName": "runtime_param_override", + "type": "any", + "format": "" + } +]; +var RuntimeParamOverride = _RuntimeParamOverride; + +// models/RuntimeParameters.ts +var _RuntimeParameters = class _RuntimeParameters { + static getAttributeTypeMap() { + return _RuntimeParameters.attributeTypeMap; + } + constructor() { + } +}; +_RuntimeParameters.discriminator = void 0; +_RuntimeParameters.attributeTypeMap = [ + { + "name": "name", + "baseName": "name", + "type": "string", + "format": "" + }, + { + "name": "values", + "baseName": "values", + "type": "Array", + "format": "" + }, + { + "name": "persist", + "baseName": "persist", + "type": "boolean", + "format": "" + }, + { + "name": "objects", + "baseName": "objects", + "type": "Array", + "format": "" + } +]; +var RuntimeParameters = _RuntimeParameters; + +// models/RuntimeSort.ts +var _RuntimeSort = class _RuntimeSort { + static getAttributeTypeMap() { + return _RuntimeSort.attributeTypeMap; + } + constructor() { + } +}; +_RuntimeSort.discriminator = void 0; +_RuntimeSort.attributeTypeMap = [ + { + "name": "runtime_sort", + "baseName": "runtime_sort", + "type": "any", + "format": "" + } +]; +var RuntimeSort = _RuntimeSort; + +// models/RuntimeSorts.ts +var _RuntimeSorts = class _RuntimeSorts { + static getAttributeTypeMap() { + return _RuntimeSorts.attributeTypeMap; + } + constructor() { + } +}; +_RuntimeSorts.discriminator = void 0; +_RuntimeSorts.attributeTypeMap = [ + { + "name": "column_name", + "baseName": "column_name", + "type": "string", + "format": "" + }, + { + "name": "order", + "baseName": "order", + "type": "RuntimeSortsOrderEnum", + "format": "" + }, + { + "name": "persist", + "baseName": "persist", + "type": "boolean", + "format": "" + }, + { + "name": "objects", + "baseName": "objects", + "type": "Array", + "format": "" + } +]; +var RuntimeSorts = _RuntimeSorts; + +// models/ScheduleHistoryRunsOptionsInput.ts +var _ScheduleHistoryRunsOptionsInput = class _ScheduleHistoryRunsOptionsInput { + static getAttributeTypeMap() { + return _ScheduleHistoryRunsOptionsInput.attributeTypeMap; + } + constructor() { + } +}; +_ScheduleHistoryRunsOptionsInput.discriminator = void 0; +_ScheduleHistoryRunsOptionsInput.attributeTypeMap = [ + { + "name": "include_history_runs", + "baseName": "include_history_runs", + "type": "boolean", + "format": "" + }, + { + "name": "record_size", + "baseName": "record_size", + "type": "number", + "format": "int32" + }, + { + "name": "record_offset", + "baseName": "record_offset", + "type": "number", + "format": "int32" + } +]; +var ScheduleHistoryRunsOptionsInput = _ScheduleHistoryRunsOptionsInput; + +// models/SchedulesPdfOptionsInput.ts +var _SchedulesPdfOptionsInput = class _SchedulesPdfOptionsInput { + static getAttributeTypeMap() { + return _SchedulesPdfOptionsInput.attributeTypeMap; + } + constructor() { + } +}; +_SchedulesPdfOptionsInput.discriminator = void 0; +_SchedulesPdfOptionsInput.attributeTypeMap = [ + { + "name": "complete_liveboard", + "baseName": "complete_liveboard", + "type": "boolean", + "format": "" + }, + { + "name": "include_cover_page", + "baseName": "include_cover_page", + "type": "boolean", + "format": "" + }, + { + "name": "include_custom_logo", + "baseName": "include_custom_logo", + "type": "boolean", + "format": "" + }, + { + "name": "include_filter_page", + "baseName": "include_filter_page", + "type": "boolean", + "format": "" + }, + { + "name": "include_page_number", + "baseName": "include_page_number", + "type": "boolean", + "format": "" + }, + { + "name": "page_footer_text", + "baseName": "page_footer_text", + "type": "string", + "format": "" + }, + { + "name": "page_orientation", + "baseName": "page_orientation", + "type": "string", + "format": "" + }, + { + "name": "page_size", + "baseName": "page_size", + "type": "SchedulesPdfOptionsInputPageSizeEnum", + "format": "" + }, + { + "name": "truncate_table", + "baseName": "truncate_table", + "type": "boolean", + "format": "" + } +]; +var SchedulesPdfOptionsInput = _SchedulesPdfOptionsInput; + +// models/SchemaObject.ts +var _SchemaObject = class _SchemaObject { + static getAttributeTypeMap() { + return _SchemaObject.attributeTypeMap; + } + constructor() { + } +}; +_SchemaObject.discriminator = void 0; +_SchemaObject.attributeTypeMap = [ + { + "name": "name", + "baseName": "name", + "type": "string", + "format": "" + }, + { + "name": "tables", + "baseName": "tables", + "type": "Array
", + "format": "" + } +]; +var SchemaObject = _SchemaObject; + +// models/Scope.ts +var _Scope = class _Scope { + static getAttributeTypeMap() { + return _Scope.attributeTypeMap; + } + constructor() { + } +}; +_Scope.discriminator = void 0; +_Scope.attributeTypeMap = [ + { + "name": "access_type", + "baseName": "access_type", + "type": "string", + "format": "" + }, + { + "name": "org_id", + "baseName": "org_id", + "type": "number", + "format": "int32" + }, + { + "name": "metadata_id", + "baseName": "metadata_id", + "type": "string", + "format": "" + } +]; +var Scope = _Scope; + +// models/ScriptSrcUrls.ts +var _ScriptSrcUrls = class _ScriptSrcUrls { + static getAttributeTypeMap() { + return _ScriptSrcUrls.attributeTypeMap; + } + constructor() { + } +}; +_ScriptSrcUrls.discriminator = void 0; +_ScriptSrcUrls.attributeTypeMap = [ + { + "name": "enabled", + "baseName": "enabled", + "type": "boolean", + "format": "" + }, + { + "name": "urls", + "baseName": "urls", + "type": "Array", + "format": "" + } +]; +var ScriptSrcUrls = _ScriptSrcUrls; + +// models/ScriptSrcUrlsInput.ts +var _ScriptSrcUrlsInput = class _ScriptSrcUrlsInput { + static getAttributeTypeMap() { + return _ScriptSrcUrlsInput.attributeTypeMap; + } + constructor() { + } +}; +_ScriptSrcUrlsInput.discriminator = void 0; +_ScriptSrcUrlsInput.attributeTypeMap = [ + { + "name": "enabled", + "baseName": "enabled", + "type": "boolean", + "format": "" + }, + { + "name": "urls", + "baseName": "urls", + "type": "Array", + "format": "" + } +]; +var ScriptSrcUrlsInput = _ScriptSrcUrlsInput; + +// models/SearchAuthSettingsRequest.ts +var _SearchAuthSettingsRequest = class _SearchAuthSettingsRequest { + static getAttributeTypeMap() { + return _SearchAuthSettingsRequest.attributeTypeMap; + } + constructor() { + } +}; +_SearchAuthSettingsRequest.discriminator = void 0; +_SearchAuthSettingsRequest.attributeTypeMap = [ + { + "name": "auth_type", + "baseName": "auth_type", + "type": "SearchAuthSettingsRequestAuthTypeEnum", + "format": "" + }, + { + "name": "scope", + "baseName": "scope", + "type": "SearchAuthSettingsRequestScopeEnum", + "format": "" + } +]; +var SearchAuthSettingsRequest = _SearchAuthSettingsRequest; + +// models/SearchAuthSettingsResponse.ts +var _SearchAuthSettingsResponse = class _SearchAuthSettingsResponse { + static getAttributeTypeMap() { + return _SearchAuthSettingsResponse.attributeTypeMap; + } + constructor() { + } +}; +_SearchAuthSettingsResponse.discriminator = void 0; +_SearchAuthSettingsResponse.attributeTypeMap = [ + { + "name": "auth_type", + "baseName": "auth_type", + "type": "SearchAuthSettingsResponseAuthTypeEnum", + "format": "" + }, + { + "name": "cluster_preferences", + "baseName": "cluster_preferences", + "type": "AuthClusterPreferences", + "format": "" + }, + { + "name": "org_preferences", + "baseName": "org_preferences", + "type": "Array", + "format": "" + } +]; +var SearchAuthSettingsResponse = _SearchAuthSettingsResponse; + +// models/SearchCalendarsRequest.ts +var _SearchCalendarsRequest = class _SearchCalendarsRequest { + static getAttributeTypeMap() { + return _SearchCalendarsRequest.attributeTypeMap; + } + constructor() { + } +}; +_SearchCalendarsRequest.discriminator = void 0; +_SearchCalendarsRequest.attributeTypeMap = [ + { + "name": "connection_identifier", + "baseName": "connection_identifier", + "type": "string", + "format": "" + }, + { + "name": "name_pattern", + "baseName": "name_pattern", + "type": "string", + "format": "" + }, + { + "name": "record_offset", + "baseName": "record_offset", + "type": "number", + "format": "int32" + }, + { + "name": "record_size", + "baseName": "record_size", + "type": "number", + "format": "int32" + }, + { + "name": "sort_options", + "baseName": "sort_options", + "type": "SearchCalendarsRequestSortOptions", + "format": "" + } +]; +var SearchCalendarsRequest = _SearchCalendarsRequest; + +// models/SearchCalendarsRequestSortOptions.ts +var _SearchCalendarsRequestSortOptions = class _SearchCalendarsRequestSortOptions { + static getAttributeTypeMap() { + return _SearchCalendarsRequestSortOptions.attributeTypeMap; + } + constructor() { + } +}; +_SearchCalendarsRequestSortOptions.discriminator = void 0; +_SearchCalendarsRequestSortOptions.attributeTypeMap = [ + { + "name": "field_name", + "baseName": "field_name", + "type": "SearchCalendarsRequestSortOptionsFieldNameEnum", + "format": "" + }, + { + "name": "order", + "baseName": "order", + "type": "SearchCalendarsRequestSortOptionsOrderEnum", + "format": "" + } +]; +var SearchCalendarsRequestSortOptions = _SearchCalendarsRequestSortOptions; + +// models/SearchChannelHistoryRequest.ts +var _SearchChannelHistoryRequest = class _SearchChannelHistoryRequest { + static getAttributeTypeMap() { + return _SearchChannelHistoryRequest.attributeTypeMap; + } + constructor() { + } +}; +_SearchChannelHistoryRequest.discriminator = void 0; +_SearchChannelHistoryRequest.attributeTypeMap = [ + { + "name": "channel_type", + "baseName": "channel_type", + "type": "SearchChannelHistoryRequestChannelTypeEnum", + "format": "" + }, + { + "name": "job_ids", + "baseName": "job_ids", + "type": "Array", + "format": "" + }, + { + "name": "channel_identifiers", + "baseName": "channel_identifiers", + "type": "Array", + "format": "" + }, + { + "name": "channel_status", + "baseName": "channel_status", + "type": "SearchChannelHistoryRequestChannelStatusEnum", + "format": "" + }, + { + "name": "events", + "baseName": "events", + "type": "Array", + "format": "" + }, + { + "name": "start_epoch_time_in_millis", + "baseName": "start_epoch_time_in_millis", + "type": "number", + "format": "float" + } +]; +var SearchChannelHistoryRequest = _SearchChannelHistoryRequest; + +// models/SearchChannelHistoryResponse.ts +var _SearchChannelHistoryResponse = class _SearchChannelHistoryResponse { + static getAttributeTypeMap() { + return _SearchChannelHistoryResponse.attributeTypeMap; + } + constructor() { + } +}; +_SearchChannelHistoryResponse.discriminator = void 0; +_SearchChannelHistoryResponse.attributeTypeMap = [ + { + "name": "jobs", + "baseName": "jobs", + "type": "Array", + "format": "" + } +]; +var SearchChannelHistoryResponse = _SearchChannelHistoryResponse; + +// models/SearchCollectionsRequest.ts +var _SearchCollectionsRequest = class _SearchCollectionsRequest { + static getAttributeTypeMap() { + return _SearchCollectionsRequest.attributeTypeMap; + } + constructor() { + } +}; +_SearchCollectionsRequest.discriminator = void 0; +_SearchCollectionsRequest.attributeTypeMap = [ + { + "name": "name_pattern", + "baseName": "name_pattern", + "type": "string", + "format": "" + }, + { + "name": "record_offset", + "baseName": "record_offset", + "type": "number", + "format": "int32" + }, + { + "name": "record_size", + "baseName": "record_size", + "type": "number", + "format": "int32" + }, + { + "name": "collection_identifiers", + "baseName": "collection_identifiers", + "type": "Array", + "format": "" + }, + { + "name": "created_by_user_identifiers", + "baseName": "created_by_user_identifiers", + "type": "Array", + "format": "" + }, + { + "name": "include_metadata", + "baseName": "include_metadata", + "type": "boolean", + "format": "" + }, + { + "name": "sort_options", + "baseName": "sort_options", + "type": "SearchCollectionsRequestSortOptions", + "format": "" + } +]; +var SearchCollectionsRequest = _SearchCollectionsRequest; + +// models/SearchCollectionsRequestSortOptions.ts +var _SearchCollectionsRequestSortOptions = class _SearchCollectionsRequestSortOptions { + static getAttributeTypeMap() { + return _SearchCollectionsRequestSortOptions.attributeTypeMap; + } + constructor() { + } +}; +_SearchCollectionsRequestSortOptions.discriminator = void 0; +_SearchCollectionsRequestSortOptions.attributeTypeMap = [ + { + "name": "field_name", + "baseName": "field_name", + "type": "SearchCollectionsRequestSortOptionsFieldNameEnum", + "format": "" + }, + { + "name": "order", + "baseName": "order", + "type": "SearchCollectionsRequestSortOptionsOrderEnum", + "format": "" + } +]; +var SearchCollectionsRequestSortOptions = _SearchCollectionsRequestSortOptions; + +// models/SearchCommitsRequest.ts +var _SearchCommitsRequest = class _SearchCommitsRequest { + static getAttributeTypeMap() { + return _SearchCommitsRequest.attributeTypeMap; + } + constructor() { + } +}; +_SearchCommitsRequest.discriminator = void 0; +_SearchCommitsRequest.attributeTypeMap = [ + { + "name": "metadata_identifier", + "baseName": "metadata_identifier", + "type": "string", + "format": "" + }, + { + "name": "metadata_type", + "baseName": "metadata_type", + "type": "SearchCommitsRequestMetadataTypeEnum", + "format": "" + }, + { + "name": "branch_name", + "baseName": "branch_name", + "type": "string", + "format": "" + }, + { + "name": "record_offset", + "baseName": "record_offset", + "type": "number", + "format": "int32" + }, + { + "name": "record_size", + "baseName": "record_size", + "type": "number", + "format": "int32" + } +]; +var SearchCommitsRequest = _SearchCommitsRequest; + +// models/SearchCommunicationChannelPreferencesRequest.ts +var _SearchCommunicationChannelPreferencesRequest = class _SearchCommunicationChannelPreferencesRequest { + static getAttributeTypeMap() { + return _SearchCommunicationChannelPreferencesRequest.attributeTypeMap; + } + constructor() { + } +}; +_SearchCommunicationChannelPreferencesRequest.discriminator = void 0; +_SearchCommunicationChannelPreferencesRequest.attributeTypeMap = [ + { + "name": "cluster_preferences", + "baseName": "cluster_preferences", + "type": "Array", + "format": "" + }, + { + "name": "org_preferences", + "baseName": "org_preferences", + "type": "Array", + "format": "" + } +]; +var SearchCommunicationChannelPreferencesRequest = _SearchCommunicationChannelPreferencesRequest; + +// models/SearchConfigRequest.ts +var _SearchConfigRequest = class _SearchConfigRequest { + static getAttributeTypeMap() { + return _SearchConfigRequest.attributeTypeMap; + } + constructor() { + } +}; +_SearchConfigRequest.discriminator = void 0; +_SearchConfigRequest.attributeTypeMap = [ + { + "name": "org_identifiers", + "baseName": "org_identifiers", + "type": "Array", + "format": "" + } +]; +var SearchConfigRequest = _SearchConfigRequest; + +// models/SearchConnectionRequest.ts +var _SearchConnectionRequest = class _SearchConnectionRequest { + static getAttributeTypeMap() { + return _SearchConnectionRequest.attributeTypeMap; + } + constructor() { + } +}; +_SearchConnectionRequest.discriminator = void 0; +_SearchConnectionRequest.attributeTypeMap = [ + { + "name": "connections", + "baseName": "connections", + "type": "Array", + "format": "" + }, + { + "name": "data_warehouse_types", + "baseName": "data_warehouse_types", + "type": "Array", + "format": "" + }, + { + "name": "record_offset", + "baseName": "record_offset", + "type": "number", + "format": "int32" + }, + { + "name": "record_size", + "baseName": "record_size", + "type": "number", + "format": "int32" + }, + { + "name": "tag_identifiers", + "baseName": "tag_identifiers", + "type": "Array", + "format": "" + }, + { + "name": "data_warehouse_object_type", + "baseName": "data_warehouse_object_type", + "type": "SearchConnectionRequestDataWarehouseObjectTypeEnum", + "format": "" + }, + { + "name": "sort_options", + "baseName": "sort_options", + "type": "SearchConnectionRequestSortOptions", + "format": "" + }, + { + "name": "include_details", + "baseName": "include_details", + "type": "boolean", + "format": "" + }, + { + "name": "configuration", + "baseName": "configuration", + "type": "any", + "format": "" + }, + { + "name": "authentication_type", + "baseName": "authentication_type", + "type": "SearchConnectionRequestAuthenticationTypeEnum", + "format": "" + }, + { + "name": "show_resolved_parameters", + "baseName": "show_resolved_parameters", + "type": "boolean", + "format": "" + } +]; +var SearchConnectionRequest = _SearchConnectionRequest; + +// models/SearchConnectionRequestSortOptions.ts +var _SearchConnectionRequestSortOptions = class _SearchConnectionRequestSortOptions { + static getAttributeTypeMap() { + return _SearchConnectionRequestSortOptions.attributeTypeMap; + } + constructor() { + } +}; +_SearchConnectionRequestSortOptions.discriminator = void 0; +_SearchConnectionRequestSortOptions.attributeTypeMap = [ + { + "name": "field_name", + "baseName": "field_name", + "type": "SearchConnectionRequestSortOptionsFieldNameEnum", + "format": "" + }, + { + "name": "order", + "baseName": "order", + "type": "SearchConnectionRequestSortOptionsOrderEnum", + "format": "" + } +]; +var SearchConnectionRequestSortOptions = _SearchConnectionRequestSortOptions; + +// models/SearchConnectionResponse.ts +var _SearchConnectionResponse = class _SearchConnectionResponse { + static getAttributeTypeMap() { + return _SearchConnectionResponse.attributeTypeMap; + } + constructor() { + } +}; +_SearchConnectionResponse.discriminator = void 0; +_SearchConnectionResponse.attributeTypeMap = [ + { + "name": "id", + "baseName": "id", + "type": "string", + "format": "" + }, + { + "name": "name", + "baseName": "name", + "type": "string", + "format": "" + }, + { + "name": "description", + "baseName": "description", + "type": "string", + "format": "" + }, + { + "name": "data_warehouse_type", + "baseName": "data_warehouse_type", + "type": "SearchConnectionResponseDataWarehouseTypeEnum", + "format": "" + }, + { + "name": "data_warehouse_objects", + "baseName": "data_warehouse_objects", + "type": "DataWarehouseObjects", + "format": "" + }, + { + "name": "details", + "baseName": "details", + "type": "any", + "format": "" + } +]; +var SearchConnectionResponse = _SearchConnectionResponse; + +// models/SearchCustomActionsRequest.ts +var _SearchCustomActionsRequest = class _SearchCustomActionsRequest { + static getAttributeTypeMap() { + return _SearchCustomActionsRequest.attributeTypeMap; + } + constructor() { + } +}; +_SearchCustomActionsRequest.discriminator = void 0; +_SearchCustomActionsRequest.attributeTypeMap = [ + { + "name": "custom_action_identifier", + "baseName": "custom_action_identifier", + "type": "string", + "format": "" + }, + { + "name": "name_pattern", + "baseName": "name_pattern", + "type": "string", + "format": "" + }, + { + "name": "default_action_config", + "baseName": "default_action_config", + "type": "SearchCustomActionsRequestDefaultActionConfig", + "format": "" + }, + { + "name": "include_group_associations", + "baseName": "include_group_associations", + "type": "boolean", + "format": "" + }, + { + "name": "include_metadata_associations", + "baseName": "include_metadata_associations", + "type": "boolean", + "format": "" + }, + { + "name": "metadata", + "baseName": "metadata", + "type": "Array", + "format": "" + }, + { + "name": "type", + "baseName": "type", + "type": "SearchCustomActionsRequestTypeEnum", + "format": "" + } +]; +var SearchCustomActionsRequest = _SearchCustomActionsRequest; + +// models/SearchCustomActionsRequestDefaultActionConfig.ts +var _SearchCustomActionsRequestDefaultActionConfig = class _SearchCustomActionsRequestDefaultActionConfig { + static getAttributeTypeMap() { + return _SearchCustomActionsRequestDefaultActionConfig.attributeTypeMap; + } + constructor() { + } +}; +_SearchCustomActionsRequestDefaultActionConfig.discriminator = void 0; +_SearchCustomActionsRequestDefaultActionConfig.attributeTypeMap = [ + { + "name": "visibility", + "baseName": "visibility", + "type": "boolean", + "format": "" + } +]; +var SearchCustomActionsRequestDefaultActionConfig = _SearchCustomActionsRequestDefaultActionConfig; + +// models/SearchDataRequest.ts +var _SearchDataRequest = class _SearchDataRequest { + static getAttributeTypeMap() { + return _SearchDataRequest.attributeTypeMap; + } + constructor() { + } +}; +_SearchDataRequest.discriminator = void 0; +_SearchDataRequest.attributeTypeMap = [ + { + "name": "query_string", + "baseName": "query_string", + "type": "string", + "format": "" + }, + { + "name": "logical_table_identifier", + "baseName": "logical_table_identifier", + "type": "string", + "format": "" + }, + { + "name": "data_format", + "baseName": "data_format", + "type": "SearchDataRequestDataFormatEnum", + "format": "" + }, + { + "name": "record_offset", + "baseName": "record_offset", + "type": "number", + "format": "int32" + }, + { + "name": "record_size", + "baseName": "record_size", + "type": "number", + "format": "int32" + }, + { + "name": "runtime_filter", + "baseName": "runtime_filter", + "type": "any", + "format": "" + }, + { + "name": "runtime_sort", + "baseName": "runtime_sort", + "type": "any", + "format": "" + }, + { + "name": "runtime_param_override", + "baseName": "runtime_param_override", + "type": "any", + "format": "" + } +]; +var SearchDataRequest = _SearchDataRequest; + +// models/SearchDataResponse.ts +var _SearchDataResponse = class _SearchDataResponse { + static getAttributeTypeMap() { + return _SearchDataResponse.attributeTypeMap; + } + constructor() { + } +}; +_SearchDataResponse.discriminator = void 0; +_SearchDataResponse.attributeTypeMap = [ + { + "name": "contents", + "baseName": "contents", + "type": "Array", + "format": "" + } +]; +var SearchDataResponse = _SearchDataResponse; + +// models/SearchEmailCustomizationRequest.ts +var _SearchEmailCustomizationRequest = class _SearchEmailCustomizationRequest { + static getAttributeTypeMap() { + return _SearchEmailCustomizationRequest.attributeTypeMap; + } + constructor() { + } +}; +_SearchEmailCustomizationRequest.discriminator = void 0; +_SearchEmailCustomizationRequest.attributeTypeMap = [ + { + "name": "org_identifiers", + "baseName": "org_identifiers", + "type": "Array", + "format": "" + } +]; +var SearchEmailCustomizationRequest = _SearchEmailCustomizationRequest; + +// models/SearchMetadataRequest.ts +var _SearchMetadataRequest = class _SearchMetadataRequest { + static getAttributeTypeMap() { + return _SearchMetadataRequest.attributeTypeMap; + } + constructor() { + } +}; +_SearchMetadataRequest.discriminator = void 0; +_SearchMetadataRequest.attributeTypeMap = [ + { + "name": "metadata", + "baseName": "metadata", + "type": "Array", + "format": "" + }, + { + "name": "permissions", + "baseName": "permissions", + "type": "Array", + "format": "" + }, + { + "name": "created_by_user_identifiers", + "baseName": "created_by_user_identifiers", + "type": "Array", + "format": "" + }, + { + "name": "dependent_object_version", + "baseName": "dependent_object_version", + "type": "SearchMetadataRequestDependentObjectVersionEnum", + "format": "" + }, + { + "name": "exclude_objects", + "baseName": "exclude_objects", + "type": "Array", + "format": "" + }, + { + "name": "favorite_object_options", + "baseName": "favorite_object_options", + "type": "SearchMetadataRequestFavoriteObjectOptions", + "format": "" + }, + { + "name": "include_auto_created_objects", + "baseName": "include_auto_created_objects", + "type": "boolean", + "format": "" + }, + { + "name": "include_dependent_objects", + "baseName": "include_dependent_objects", + "type": "boolean", + "format": "" + }, + { + "name": "dependent_objects_record_size", + "baseName": "dependent_objects_record_size", + "type": "number", + "format": "int32" + }, + { + "name": "include_details", + "baseName": "include_details", + "type": "boolean", + "format": "" + }, + { + "name": "include_personalised_views", + "baseName": "include_personalised_views", + "type": "boolean", + "format": "" + }, + { + "name": "include_headers", + "baseName": "include_headers", + "type": "boolean", + "format": "" + }, + { + "name": "include_hidden_objects", + "baseName": "include_hidden_objects", + "type": "boolean", + "format": "" + }, + { + "name": "include_incomplete_objects", + "baseName": "include_incomplete_objects", + "type": "boolean", + "format": "" + }, + { + "name": "include_visualization_headers", + "baseName": "include_visualization_headers", + "type": "boolean", + "format": "" + }, + { + "name": "include_worksheet_search_assist_data", + "baseName": "include_worksheet_search_assist_data", + "type": "boolean", + "format": "" + }, + { + "name": "modified_by_user_identifiers", + "baseName": "modified_by_user_identifiers", + "type": "Array", + "format": "" + }, + { + "name": "record_offset", + "baseName": "record_offset", + "type": "number", + "format": "int32" + }, + { + "name": "record_size", + "baseName": "record_size", + "type": "number", + "format": "int32" + }, + { + "name": "sort_options", + "baseName": "sort_options", + "type": "SearchMetadataRequestSortOptions", + "format": "" + }, + { + "name": "tag_identifiers", + "baseName": "tag_identifiers", + "type": "Array", + "format": "" + }, + { + "name": "include_stats", + "baseName": "include_stats", + "type": "boolean", + "format": "" + }, + { + "name": "include_discoverable_objects", + "baseName": "include_discoverable_objects", + "type": "boolean", + "format": "" + }, + { + "name": "show_resolved_parameters", + "baseName": "show_resolved_parameters", + "type": "boolean", + "format": "" + }, + { + "name": "liveboard_response_version", + "baseName": "liveboard_response_version", + "type": "SearchMetadataRequestLiveboardResponseVersionEnum", + "format": "" + }, + { + "name": "include_only_published_objects", + "baseName": "include_only_published_objects", + "type": "boolean", + "format": "" + } +]; +var SearchMetadataRequest = _SearchMetadataRequest; + +// models/SearchMetadataRequestFavoriteObjectOptions.ts +var _SearchMetadataRequestFavoriteObjectOptions = class _SearchMetadataRequestFavoriteObjectOptions { + static getAttributeTypeMap() { + return _SearchMetadataRequestFavoriteObjectOptions.attributeTypeMap; + } + constructor() { + } +}; +_SearchMetadataRequestFavoriteObjectOptions.discriminator = void 0; +_SearchMetadataRequestFavoriteObjectOptions.attributeTypeMap = [ + { + "name": "include", + "baseName": "include", + "type": "boolean", + "format": "" + }, + { + "name": "user_identifiers", + "baseName": "user_identifiers", + "type": "Array", + "format": "" + } +]; +var SearchMetadataRequestFavoriteObjectOptions = _SearchMetadataRequestFavoriteObjectOptions; + +// models/SearchMetadataRequestSortOptions.ts +var _SearchMetadataRequestSortOptions = class _SearchMetadataRequestSortOptions { + static getAttributeTypeMap() { + return _SearchMetadataRequestSortOptions.attributeTypeMap; + } + constructor() { + } +}; +_SearchMetadataRequestSortOptions.discriminator = void 0; +_SearchMetadataRequestSortOptions.attributeTypeMap = [ + { + "name": "field_name", + "baseName": "field_name", + "type": "SearchMetadataRequestSortOptionsFieldNameEnum", + "format": "" + }, + { + "name": "order", + "baseName": "order", + "type": "SearchMetadataRequestSortOptionsOrderEnum", + "format": "" + } +]; +var SearchMetadataRequestSortOptions = _SearchMetadataRequestSortOptions; + +// models/SearchOrgsRequest.ts +var _SearchOrgsRequest = class _SearchOrgsRequest { + static getAttributeTypeMap() { + return _SearchOrgsRequest.attributeTypeMap; + } + constructor() { + } +}; +_SearchOrgsRequest.discriminator = void 0; +_SearchOrgsRequest.attributeTypeMap = [ + { + "name": "org_identifier", + "baseName": "org_identifier", + "type": "string", + "format": "" + }, + { + "name": "description", + "baseName": "description", + "type": "string", + "format": "" + }, + { + "name": "visibility", + "baseName": "visibility", + "type": "SearchOrgsRequestVisibilityEnum", + "format": "" + }, + { + "name": "status", + "baseName": "status", + "type": "SearchOrgsRequestStatusEnum", + "format": "" + }, + { + "name": "user_identifiers", + "baseName": "user_identifiers", + "type": "Array", + "format": "" + } +]; +var SearchOrgsRequest = _SearchOrgsRequest; + +// models/SearchRoleResponse.ts +var _SearchRoleResponse = class _SearchRoleResponse { + static getAttributeTypeMap() { + return _SearchRoleResponse.attributeTypeMap; + } + constructor() { + } +}; +_SearchRoleResponse.discriminator = void 0; +_SearchRoleResponse.attributeTypeMap = [ + { + "name": "id", + "baseName": "id", + "type": "string", + "format": "" + }, + { + "name": "name", + "baseName": "name", + "type": "string", + "format": "" + }, + { + "name": "description", + "baseName": "description", + "type": "string", + "format": "" + }, + { + "name": "groups_assigned_count", + "baseName": "groups_assigned_count", + "type": "number", + "format": "int32" + }, + { + "name": "orgs", + "baseName": "orgs", + "type": "Array", + "format": "" + }, + { + "name": "groups", + "baseName": "groups", + "type": "Array", + "format": "" + }, + { + "name": "privileges", + "baseName": "privileges", + "type": "Array", + "format": "" + }, + { + "name": "permission", + "baseName": "permission", + "type": "SearchRoleResponsePermissionEnum", + "format": "" + }, + { + "name": "author_id", + "baseName": "author_id", + "type": "string", + "format": "" + }, + { + "name": "modifier_id", + "baseName": "modifier_id", + "type": "string", + "format": "" + }, + { + "name": "creation_time_in_millis", + "baseName": "creation_time_in_millis", + "type": "any", + "format": "" + }, + { + "name": "modification_time_in_millis", + "baseName": "modification_time_in_millis", + "type": "any", + "format": "" + }, + { + "name": "deleted", + "baseName": "deleted", + "type": "boolean", + "format": "" + }, + { + "name": "deprecated", + "baseName": "deprecated", + "type": "boolean", + "format": "" + }, + { + "name": "external", + "baseName": "external", + "type": "boolean", + "format": "" + }, + { + "name": "hidden", + "baseName": "hidden", + "type": "boolean", + "format": "" + }, + { + "name": "shared_via_connection", + "baseName": "shared_via_connection", + "type": "boolean", + "format": "" + } +]; +var SearchRoleResponse = _SearchRoleResponse; + +// models/SearchRolesRequest.ts +var _SearchRolesRequest = class _SearchRolesRequest { + static getAttributeTypeMap() { + return _SearchRolesRequest.attributeTypeMap; + } + constructor() { + } +}; +_SearchRolesRequest.discriminator = void 0; +_SearchRolesRequest.attributeTypeMap = [ + { + "name": "role_identifiers", + "baseName": "role_identifiers", + "type": "Array", + "format": "" + }, + { + "name": "org_identifiers", + "baseName": "org_identifiers", + "type": "Array", + "format": "" + }, + { + "name": "group_identifiers", + "baseName": "group_identifiers", + "type": "Array", + "format": "" + }, + { + "name": "privileges", + "baseName": "privileges", + "type": "Array", + "format": "" + }, + { + "name": "deprecated", + "baseName": "deprecated", + "type": "boolean", + "format": "" + }, + { + "name": "external", + "baseName": "external", + "type": "boolean", + "format": "" + }, + { + "name": "shared_via_connection", + "baseName": "shared_via_connection", + "type": "boolean", + "format": "" + }, + { + "name": "permissions", + "baseName": "permissions", + "type": "Array", + "format": "" + } +]; +var SearchRolesRequest = _SearchRolesRequest; + +// models/SearchSchedulesRequest.ts +var _SearchSchedulesRequest = class _SearchSchedulesRequest { + static getAttributeTypeMap() { + return _SearchSchedulesRequest.attributeTypeMap; + } + constructor() { + } +}; +_SearchSchedulesRequest.discriminator = void 0; +_SearchSchedulesRequest.attributeTypeMap = [ + { + "name": "metadata", + "baseName": "metadata", + "type": "Array", + "format": "" + }, + { + "name": "record_offset", + "baseName": "record_offset", + "type": "number", + "format": "int32" + }, + { + "name": "record_size", + "baseName": "record_size", + "type": "number", + "format": "int32" + }, + { + "name": "sort_options", + "baseName": "sort_options", + "type": "SearchSchedulesRequestSortOptions", + "format": "" + }, + { + "name": "history_runs_options", + "baseName": "history_runs_options", + "type": "SearchSchedulesRequestHistoryRunsOptions", + "format": "" + }, + { + "name": "schedule_identifiers", + "baseName": "schedule_identifiers", + "type": "Array", + "format": "" + } +]; +var SearchSchedulesRequest = _SearchSchedulesRequest; + +// models/SearchSchedulesRequestHistoryRunsOptions.ts +var _SearchSchedulesRequestHistoryRunsOptions = class _SearchSchedulesRequestHistoryRunsOptions { + static getAttributeTypeMap() { + return _SearchSchedulesRequestHistoryRunsOptions.attributeTypeMap; + } + constructor() { + } +}; +_SearchSchedulesRequestHistoryRunsOptions.discriminator = void 0; +_SearchSchedulesRequestHistoryRunsOptions.attributeTypeMap = [ + { + "name": "include_history_runs", + "baseName": "include_history_runs", + "type": "boolean", + "format": "" + }, + { + "name": "record_size", + "baseName": "record_size", + "type": "number", + "format": "int32" + }, + { + "name": "record_offset", + "baseName": "record_offset", + "type": "number", + "format": "int32" + } +]; +var SearchSchedulesRequestHistoryRunsOptions = _SearchSchedulesRequestHistoryRunsOptions; + +// models/SearchSchedulesRequestSortOptions.ts +var _SearchSchedulesRequestSortOptions = class _SearchSchedulesRequestSortOptions { + static getAttributeTypeMap() { + return _SearchSchedulesRequestSortOptions.attributeTypeMap; + } + constructor() { + } +}; +_SearchSchedulesRequestSortOptions.discriminator = void 0; +_SearchSchedulesRequestSortOptions.attributeTypeMap = [ + { + "name": "field_name", + "baseName": "field_name", + "type": "string", + "format": "" + }, + { + "name": "order", + "baseName": "order", + "type": "string", + "format": "" + } +]; +var SearchSchedulesRequestSortOptions = _SearchSchedulesRequestSortOptions; + +// models/SearchSecuritySettingsRequest.ts +var _SearchSecuritySettingsRequest = class _SearchSecuritySettingsRequest { + static getAttributeTypeMap() { + return _SearchSecuritySettingsRequest.attributeTypeMap; + } + constructor() { + } +}; +_SearchSecuritySettingsRequest.discriminator = void 0; +_SearchSecuritySettingsRequest.attributeTypeMap = [ + { + "name": "scope", + "baseName": "scope", + "type": "SearchSecuritySettingsRequestScopeEnum", + "format": "" + } +]; +var SearchSecuritySettingsRequest = _SearchSecuritySettingsRequest; + +// models/SearchTagsRequest.ts +var _SearchTagsRequest = class _SearchTagsRequest { + static getAttributeTypeMap() { + return _SearchTagsRequest.attributeTypeMap; + } + constructor() { + } +}; +_SearchTagsRequest.discriminator = void 0; +_SearchTagsRequest.attributeTypeMap = [ + { + "name": "tag_identifier", + "baseName": "tag_identifier", + "type": "string", + "format": "" + }, + { + "name": "name_pattern", + "baseName": "name_pattern", + "type": "string", + "format": "" + }, + { + "name": "color", + "baseName": "color", + "type": "string", + "format": "" + } +]; +var SearchTagsRequest = _SearchTagsRequest; + +// models/SearchUserGroupsRequest.ts +var _SearchUserGroupsRequest = class _SearchUserGroupsRequest { + static getAttributeTypeMap() { + return _SearchUserGroupsRequest.attributeTypeMap; + } + constructor() { + } +}; +_SearchUserGroupsRequest.discriminator = void 0; +_SearchUserGroupsRequest.attributeTypeMap = [ + { + "name": "default_liveboard_identifiers", + "baseName": "default_liveboard_identifiers", + "type": "Array", + "format": "" + }, + { + "name": "description", + "baseName": "description", + "type": "string", + "format": "" + }, + { + "name": "display_name", + "baseName": "display_name", + "type": "string", + "format": "" + }, + { + "name": "name_pattern", + "baseName": "name_pattern", + "type": "string", + "format": "" + }, + { + "name": "group_identifier", + "baseName": "group_identifier", + "type": "string", + "format": "" + }, + { + "name": "org_identifiers", + "baseName": "org_identifiers", + "type": "Array", + "format": "" + }, + { + "name": "privileges", + "baseName": "privileges", + "type": "Array", + "format": "" + }, + { + "name": "sub_group_identifiers", + "baseName": "sub_group_identifiers", + "type": "Array", + "format": "" + }, + { + "name": "type", + "baseName": "type", + "type": "SearchUserGroupsRequestTypeEnum", + "format": "" + }, + { + "name": "user_identifiers", + "baseName": "user_identifiers", + "type": "Array", + "format": "" + }, + { + "name": "visibility", + "baseName": "visibility", + "type": "SearchUserGroupsRequestVisibilityEnum", + "format": "" + }, + { + "name": "role_identifiers", + "baseName": "role_identifiers", + "type": "Array", + "format": "" + }, + { + "name": "record_offset", + "baseName": "record_offset", + "type": "number", + "format": "int32" + }, + { + "name": "record_size", + "baseName": "record_size", + "type": "number", + "format": "int32" + }, + { + "name": "sort_options", + "baseName": "sort_options", + "type": "SearchUserGroupsRequestSortOptions", + "format": "" + }, + { + "name": "include_users", + "baseName": "include_users", + "type": "boolean", + "format": "" + }, + { + "name": "include_sub_groups", + "baseName": "include_sub_groups", + "type": "boolean", + "format": "" + } +]; +var SearchUserGroupsRequest = _SearchUserGroupsRequest; + +// models/SearchUserGroupsRequestSortOptions.ts +var _SearchUserGroupsRequestSortOptions = class _SearchUserGroupsRequestSortOptions { + static getAttributeTypeMap() { + return _SearchUserGroupsRequestSortOptions.attributeTypeMap; + } + constructor() { + } +}; +_SearchUserGroupsRequestSortOptions.discriminator = void 0; +_SearchUserGroupsRequestSortOptions.attributeTypeMap = [ + { + "name": "field_name", + "baseName": "field_name", + "type": "SearchUserGroupsRequestSortOptionsFieldNameEnum", + "format": "" + }, + { + "name": "order", + "baseName": "order", + "type": "SearchUserGroupsRequestSortOptionsOrderEnum", + "format": "" + } +]; +var SearchUserGroupsRequestSortOptions = _SearchUserGroupsRequestSortOptions; + +// models/SearchUsersRequest.ts +var _SearchUsersRequest = class _SearchUsersRequest { + static getAttributeTypeMap() { + return _SearchUsersRequest.attributeTypeMap; + } + constructor() { + } +}; +_SearchUsersRequest.discriminator = void 0; +_SearchUsersRequest.attributeTypeMap = [ + { + "name": "user_identifier", + "baseName": "user_identifier", + "type": "string", + "format": "" + }, + { + "name": "display_name", + "baseName": "display_name", + "type": "string", + "format": "" + }, + { + "name": "name_pattern", + "baseName": "name_pattern", + "type": "string", + "format": "" + }, + { + "name": "visibility", + "baseName": "visibility", + "type": "SearchUsersRequestVisibilityEnum", + "format": "" + }, + { + "name": "email", + "baseName": "email", + "type": "string", + "format": "" + }, + { + "name": "group_identifiers", + "baseName": "group_identifiers", + "type": "Array", + "format": "" + }, + { + "name": "privileges", + "baseName": "privileges", + "type": "Array", + "format": "" + }, + { + "name": "account_type", + "baseName": "account_type", + "type": "SearchUsersRequestAccountTypeEnum", + "format": "" + }, + { + "name": "account_status", + "baseName": "account_status", + "type": "SearchUsersRequestAccountStatusEnum", + "format": "" + }, + { + "name": "notify_on_share", + "baseName": "notify_on_share", + "type": "boolean", + "format": "" + }, + { + "name": "show_onboarding_experience", + "baseName": "show_onboarding_experience", + "type": "boolean", + "format": "" + }, + { + "name": "onboarding_experience_completed", + "baseName": "onboarding_experience_completed", + "type": "boolean", + "format": "" + }, + { + "name": "org_identifiers", + "baseName": "org_identifiers", + "type": "Array", + "format": "" + }, + { + "name": "home_liveboard_identifier", + "baseName": "home_liveboard_identifier", + "type": "string", + "format": "" + }, + { + "name": "favorite_metadata", + "baseName": "favorite_metadata", + "type": "Array", + "format": "" + }, + { + "name": "record_offset", + "baseName": "record_offset", + "type": "number", + "format": "int32" + }, + { + "name": "record_size", + "baseName": "record_size", + "type": "number", + "format": "int32" + }, + { + "name": "sort_options", + "baseName": "sort_options", + "type": "SearchCollectionsRequestSortOptions", + "format": "" + }, + { + "name": "role_identifiers", + "baseName": "role_identifiers", + "type": "Array", + "format": "" + }, + { + "name": "include_favorite_metadata", + "baseName": "include_favorite_metadata", + "type": "boolean", + "format": "" + }, + { + "name": "include_variable_values", + "baseName": "include_variable_values", + "type": "boolean", + "format": "" + } +]; +var SearchUsersRequest = _SearchUsersRequest; + +// models/SearchVariablesRequest.ts +var _SearchVariablesRequest = class _SearchVariablesRequest { + static getAttributeTypeMap() { + return _SearchVariablesRequest.attributeTypeMap; + } + constructor() { + } +}; +_SearchVariablesRequest.discriminator = void 0; +_SearchVariablesRequest.attributeTypeMap = [ + { + "name": "variable_details", + "baseName": "variable_details", + "type": "Array", + "format": "" + }, + { + "name": "value_scope", + "baseName": "value_scope", + "type": "Array", + "format": "" + }, + { + "name": "record_offset", + "baseName": "record_offset", + "type": "number", + "format": "int32" + }, + { + "name": "record_size", + "baseName": "record_size", + "type": "number", + "format": "int32" + }, + { + "name": "response_content", + "baseName": "response_content", + "type": "SearchVariablesRequestResponseContentEnum", + "format": "" + } +]; +var SearchVariablesRequest = _SearchVariablesRequest; + +// models/SearchWebhookConfigurationsRequest.ts +var _SearchWebhookConfigurationsRequest = class _SearchWebhookConfigurationsRequest { + static getAttributeTypeMap() { + return _SearchWebhookConfigurationsRequest.attributeTypeMap; + } + constructor() { + } +}; +_SearchWebhookConfigurationsRequest.discriminator = void 0; +_SearchWebhookConfigurationsRequest.attributeTypeMap = [ + { + "name": "org_identifier", + "baseName": "org_identifier", + "type": "string", + "format": "" + }, + { + "name": "webhook_identifier", + "baseName": "webhook_identifier", + "type": "string", + "format": "" + }, + { + "name": "event_type", + "baseName": "event_type", + "type": "SearchWebhookConfigurationsRequestEventTypeEnum", + "format": "" + }, + { + "name": "record_offset", + "baseName": "record_offset", + "type": "number", + "format": "int32" + }, + { + "name": "record_size", + "baseName": "record_size", + "type": "number", + "format": "int32" + }, + { + "name": "sort_options", + "baseName": "sort_options", + "type": "SearchWebhookConfigurationsRequestSortOptions", + "format": "" + } +]; +var SearchWebhookConfigurationsRequest = _SearchWebhookConfigurationsRequest; + +// models/SearchWebhookConfigurationsRequestSortOptions.ts +var _SearchWebhookConfigurationsRequestSortOptions = class _SearchWebhookConfigurationsRequestSortOptions { + static getAttributeTypeMap() { + return _SearchWebhookConfigurationsRequestSortOptions.attributeTypeMap; + } + constructor() { + } +}; +_SearchWebhookConfigurationsRequestSortOptions.discriminator = void 0; +_SearchWebhookConfigurationsRequestSortOptions.attributeTypeMap = [ + { + "name": "field_name", + "baseName": "field_name", + "type": "SearchWebhookConfigurationsRequestSortOptionsFieldNameEnum", + "format": "" + }, + { + "name": "order", + "baseName": "order", + "type": "SearchWebhookConfigurationsRequestSortOptionsOrderEnum", + "format": "" + } +]; +var SearchWebhookConfigurationsRequestSortOptions = _SearchWebhookConfigurationsRequestSortOptions; + +// models/SecuritySettingsClusterPreferences.ts +var _SecuritySettingsClusterPreferences = class _SecuritySettingsClusterPreferences { + static getAttributeTypeMap() { + return _SecuritySettingsClusterPreferences.attributeTypeMap; + } + constructor() { + } +}; +_SecuritySettingsClusterPreferences.discriminator = void 0; +_SecuritySettingsClusterPreferences.attributeTypeMap = [ + { + "name": "enable_partitioned_cookies", + "baseName": "enable_partitioned_cookies", + "type": "boolean", + "format": "" + }, + { + "name": "cors_whitelisted_urls", + "baseName": "cors_whitelisted_urls", + "type": "Array", + "format": "" + }, + { + "name": "csp_settings", + "baseName": "csp_settings", + "type": "CspSettings", + "format": "" + }, + { + "name": "saml_redirect_urls", + "baseName": "saml_redirect_urls", + "type": "Array", + "format": "" + }, + { + "name": "non_embed_access", + "baseName": "non_embed_access", + "type": "ClusterNonEmbedAccess", + "format": "" + }, + { + "name": "trusted_auth_status", + "baseName": "trusted_auth_status", + "type": "SecuritySettingsClusterPreferencesTrustedAuthStatusEnum", + "format": "" + } +]; +var SecuritySettingsClusterPreferences = _SecuritySettingsClusterPreferences; + +// models/SecuritySettingsClusterPreferencesInput.ts +var _SecuritySettingsClusterPreferencesInput = class _SecuritySettingsClusterPreferencesInput { + static getAttributeTypeMap() { + return _SecuritySettingsClusterPreferencesInput.attributeTypeMap; + } + constructor() { + } +}; +_SecuritySettingsClusterPreferencesInput.discriminator = void 0; +_SecuritySettingsClusterPreferencesInput.attributeTypeMap = [ + { + "name": "enable_partitioned_cookies", + "baseName": "enable_partitioned_cookies", + "type": "boolean", + "format": "" + }, + { + "name": "cors_whitelisted_urls", + "baseName": "cors_whitelisted_urls", + "type": "Array", + "format": "" + }, + { + "name": "csp_settings", + "baseName": "csp_settings", + "type": "CspSettingsInput", + "format": "" + }, + { + "name": "saml_redirect_urls", + "baseName": "saml_redirect_urls", + "type": "Array", + "format": "" + }, + { + "name": "non_embed_access", + "baseName": "non_embed_access", + "type": "ClusterNonEmbedAccessInput", + "format": "" + } +]; +var SecuritySettingsClusterPreferencesInput = _SecuritySettingsClusterPreferencesInput; + +// models/SecuritySettingsOrgDetails.ts +var _SecuritySettingsOrgDetails = class _SecuritySettingsOrgDetails { + static getAttributeTypeMap() { + return _SecuritySettingsOrgDetails.attributeTypeMap; + } + constructor() { + } +}; +_SecuritySettingsOrgDetails.discriminator = void 0; +_SecuritySettingsOrgDetails.attributeTypeMap = [ + { + "name": "id", + "baseName": "id", + "type": "number", + "format": "int32" + }, + { + "name": "name", + "baseName": "name", + "type": "string", + "format": "" + } +]; +var SecuritySettingsOrgDetails = _SecuritySettingsOrgDetails; + +// models/SecuritySettingsOrgPreferences.ts +var _SecuritySettingsOrgPreferences = class _SecuritySettingsOrgPreferences { + static getAttributeTypeMap() { + return _SecuritySettingsOrgPreferences.attributeTypeMap; + } + constructor() { + } +}; +_SecuritySettingsOrgPreferences.discriminator = void 0; +_SecuritySettingsOrgPreferences.attributeTypeMap = [ + { + "name": "org", + "baseName": "org", + "type": "SecuritySettingsOrgDetails", + "format": "" + }, + { + "name": "cors_whitelisted_urls", + "baseName": "cors_whitelisted_urls", + "type": "Array", + "format": "" + }, + { + "name": "non_embed_access", + "baseName": "non_embed_access", + "type": "OrgNonEmbedAccess", + "format": "" + }, + { + "name": "trusted_auth_status", + "baseName": "trusted_auth_status", + "type": "SecuritySettingsOrgPreferencesTrustedAuthStatusEnum", + "format": "" + } +]; +var SecuritySettingsOrgPreferences = _SecuritySettingsOrgPreferences; + +// models/SecuritySettingsOrgPreferencesInput.ts +var _SecuritySettingsOrgPreferencesInput = class _SecuritySettingsOrgPreferencesInput { + static getAttributeTypeMap() { + return _SecuritySettingsOrgPreferencesInput.attributeTypeMap; + } + constructor() { + } +}; +_SecuritySettingsOrgPreferencesInput.discriminator = void 0; +_SecuritySettingsOrgPreferencesInput.attributeTypeMap = [ + { + "name": "org_identifier", + "baseName": "org_identifier", + "type": "string", + "format": "" + }, + { + "name": "cors_whitelisted_urls", + "baseName": "cors_whitelisted_urls", + "type": "Array", + "format": "" + }, + { + "name": "non_embed_access", + "baseName": "non_embed_access", + "type": "OrgNonEmbedAccessInput", + "format": "" + } +]; +var SecuritySettingsOrgPreferencesInput = _SecuritySettingsOrgPreferencesInput; + +// models/SecuritySettingsResponse.ts +var _SecuritySettingsResponse = class _SecuritySettingsResponse { + static getAttributeTypeMap() { + return _SecuritySettingsResponse.attributeTypeMap; + } + constructor() { + } +}; +_SecuritySettingsResponse.discriminator = void 0; +_SecuritySettingsResponse.attributeTypeMap = [ + { + "name": "cluster_preferences", + "baseName": "cluster_preferences", + "type": "SecuritySettingsClusterPreferences", + "format": "" + }, + { + "name": "org_preferences", + "baseName": "org_preferences", + "type": "Array", + "format": "" + } +]; +var SecuritySettingsResponse = _SecuritySettingsResponse; + +// models/SendAgentConversationMessageRequest.ts +var _SendAgentConversationMessageRequest = class _SendAgentConversationMessageRequest { + static getAttributeTypeMap() { + return _SendAgentConversationMessageRequest.attributeTypeMap; + } + constructor() { + } +}; +_SendAgentConversationMessageRequest.discriminator = void 0; +_SendAgentConversationMessageRequest.attributeTypeMap = [ + { + "name": "messages", + "baseName": "messages", + "type": "Array", + "format": "" + } +]; +var SendAgentConversationMessageRequest = _SendAgentConversationMessageRequest; + +// models/SendAgentConversationMessageStreamingRequest.ts +var _SendAgentConversationMessageStreamingRequest = class _SendAgentConversationMessageStreamingRequest { + static getAttributeTypeMap() { + return _SendAgentConversationMessageStreamingRequest.attributeTypeMap; + } + constructor() { + } +}; +_SendAgentConversationMessageStreamingRequest.discriminator = void 0; +_SendAgentConversationMessageStreamingRequest.attributeTypeMap = [ + { + "name": "messages", + "baseName": "messages", + "type": "Array", + "format": "" + } +]; +var SendAgentConversationMessageStreamingRequest = _SendAgentConversationMessageStreamingRequest; + +// models/SendAgentMessageRequest.ts +var _SendAgentMessageRequest = class _SendAgentMessageRequest { + static getAttributeTypeMap() { + return _SendAgentMessageRequest.attributeTypeMap; + } + constructor() { + } +}; +_SendAgentMessageRequest.discriminator = void 0; +_SendAgentMessageRequest.attributeTypeMap = [ + { + "name": "messages", + "baseName": "messages", + "type": "Array", + "format": "" + } +]; +var SendAgentMessageRequest = _SendAgentMessageRequest; + +// models/SendAgentMessageResponse.ts +var _SendAgentMessageResponse = class _SendAgentMessageResponse { + static getAttributeTypeMap() { + return _SendAgentMessageResponse.attributeTypeMap; + } + constructor() { + } +}; +_SendAgentMessageResponse.discriminator = void 0; +_SendAgentMessageResponse.attributeTypeMap = [ + { + "name": "success", + "baseName": "success", + "type": "boolean", + "format": "" + }, + { + "name": "message", + "baseName": "message", + "type": "string", + "format": "" + } +]; +var SendAgentMessageResponse = _SendAgentMessageResponse; + +// models/SendAgentMessageStreamingRequest.ts +var _SendAgentMessageStreamingRequest = class _SendAgentMessageStreamingRequest { + static getAttributeTypeMap() { + return _SendAgentMessageStreamingRequest.attributeTypeMap; + } + constructor() { + } +}; +_SendAgentMessageStreamingRequest.discriminator = void 0; +_SendAgentMessageStreamingRequest.attributeTypeMap = [ + { + "name": "conversation_identifier", + "baseName": "conversation_identifier", + "type": "string", + "format": "" + }, + { + "name": "messages", + "baseName": "messages", + "type": "Array", + "format": "" + } +]; +var SendAgentMessageStreamingRequest = _SendAgentMessageStreamingRequest; + +// models/SendMessageRequest.ts +var _SendMessageRequest = class _SendMessageRequest { + static getAttributeTypeMap() { + return _SendMessageRequest.attributeTypeMap; + } + constructor() { + } +}; +_SendMessageRequest.discriminator = void 0; +_SendMessageRequest.attributeTypeMap = [ + { + "name": "metadata_identifier", + "baseName": "metadata_identifier", + "type": "string", + "format": "" + }, + { + "name": "message", + "baseName": "message", + "type": "string", + "format": "" + } +]; +var SendMessageRequest = _SendMessageRequest; + +// models/SetNLInstructionsRequest.ts +var _SetNLInstructionsRequest = class _SetNLInstructionsRequest { + static getAttributeTypeMap() { + return _SetNLInstructionsRequest.attributeTypeMap; + } + constructor() { + } +}; +_SetNLInstructionsRequest.discriminator = void 0; +_SetNLInstructionsRequest.attributeTypeMap = [ + { + "name": "data_source_identifier", + "baseName": "data_source_identifier", + "type": "string", + "format": "" + }, + { + "name": "nl_instructions_info", + "baseName": "nl_instructions_info", + "type": "Array", + "format": "" + } +]; +var SetNLInstructionsRequest = _SetNLInstructionsRequest; + +// models/ShareMetadataRequest.ts +var _ShareMetadataRequest = class _ShareMetadataRequest { + static getAttributeTypeMap() { + return _ShareMetadataRequest.attributeTypeMap; + } + constructor() { + } +}; +_ShareMetadataRequest.discriminator = void 0; +_ShareMetadataRequest.attributeTypeMap = [ + { + "name": "metadata_type", + "baseName": "metadata_type", + "type": "ShareMetadataRequestMetadataTypeEnum", + "format": "" + }, + { + "name": "metadata_identifiers", + "baseName": "metadata_identifiers", + "type": "Array", + "format": "" + }, + { + "name": "metadata", + "baseName": "metadata", + "type": "Array", + "format": "" + }, + { + "name": "permissions", + "baseName": "permissions", + "type": "Array", + "format": "" + }, + { + "name": "visualization_identifiers", + "baseName": "visualization_identifiers", + "type": "Array", + "format": "" + }, + { + "name": "emails", + "baseName": "emails", + "type": "Array", + "format": "" + }, + { + "name": "message", + "baseName": "message", + "type": "string", + "format": "" + }, + { + "name": "enable_custom_url", + "baseName": "enable_custom_url", + "type": "boolean", + "format": "" + }, + { + "name": "notify_on_share", + "baseName": "notify_on_share", + "type": "boolean", + "format": "" + }, + { + "name": "has_lenient_discoverability", + "baseName": "has_lenient_discoverability", + "type": "boolean", + "format": "" + } +]; +var ShareMetadataRequest = _ShareMetadataRequest; + +// models/ShareMetadataTypeInput.ts +var _ShareMetadataTypeInput = class _ShareMetadataTypeInput { + static getAttributeTypeMap() { + return _ShareMetadataTypeInput.attributeTypeMap; + } + constructor() { + } +}; +_ShareMetadataTypeInput.discriminator = void 0; +_ShareMetadataTypeInput.attributeTypeMap = [ + { + "name": "type", + "baseName": "type", + "type": "ShareMetadataTypeInputTypeEnum", + "format": "" + }, + { + "name": "identifier", + "baseName": "identifier", + "type": "string", + "format": "" + } +]; +var ShareMetadataTypeInput = _ShareMetadataTypeInput; + +// models/SharePermissionsInput.ts +var _SharePermissionsInput = class _SharePermissionsInput { + static getAttributeTypeMap() { + return _SharePermissionsInput.attributeTypeMap; + } + constructor() { + } +}; +_SharePermissionsInput.discriminator = void 0; +_SharePermissionsInput.attributeTypeMap = [ + { + "name": "principal", + "baseName": "principal", + "type": "PrincipalsInput", + "format": "" + }, + { + "name": "share_mode", + "baseName": "share_mode", + "type": "SharePermissionsInputShareModeEnum", + "format": "" + }, + { + "name": "content_share_mode", + "baseName": "content_share_mode", + "type": "SharePermissionsInputContentShareModeEnum", + "format": "" + } +]; +var SharePermissionsInput = _SharePermissionsInput; + +// models/SingleAnswerRequest.ts +var _SingleAnswerRequest = class _SingleAnswerRequest { + static getAttributeTypeMap() { + return _SingleAnswerRequest.attributeTypeMap; + } + constructor() { + } +}; +_SingleAnswerRequest.discriminator = void 0; +_SingleAnswerRequest.attributeTypeMap = [ + { + "name": "query", + "baseName": "query", + "type": "string", + "format": "" + }, + { + "name": "metadata_identifier", + "baseName": "metadata_identifier", + "type": "string", + "format": "" + } +]; +var SingleAnswerRequest = _SingleAnswerRequest; + +// models/SortOption.ts +var _SortOption = class _SortOption { + static getAttributeTypeMap() { + return _SortOption.attributeTypeMap; + } + constructor() { + } +}; +_SortOption.discriminator = void 0; +_SortOption.attributeTypeMap = [ + { + "name": "field_name", + "baseName": "field_name", + "type": "SortOptionFieldNameEnum", + "format": "" + }, + { + "name": "order", + "baseName": "order", + "type": "SortOptionOrderEnum", + "format": "" + } +]; +var SortOption = _SortOption; + +// models/SortOptionInput.ts +var _SortOptionInput = class _SortOptionInput { + static getAttributeTypeMap() { + return _SortOptionInput.attributeTypeMap; + } + constructor() { + } +}; +_SortOptionInput.discriminator = void 0; +_SortOptionInput.attributeTypeMap = [ + { + "name": "field_name", + "baseName": "field_name", + "type": "SortOptionInputFieldNameEnum", + "format": "" + }, + { + "name": "order", + "baseName": "order", + "type": "SortOptionInputOrderEnum", + "format": "" + } +]; +var SortOptionInput = _SortOptionInput; + +// models/SortOptions.ts +var _SortOptions = class _SortOptions { + static getAttributeTypeMap() { + return _SortOptions.attributeTypeMap; + } + constructor() { + } +}; +_SortOptions.discriminator = void 0; +_SortOptions.attributeTypeMap = [ + { + "name": "field_name", + "baseName": "field_name", + "type": "SortOptionsFieldNameEnum", + "format": "" + }, + { + "name": "order", + "baseName": "order", + "type": "SortOptionsOrderEnum", + "format": "" + } +]; +var SortOptions = _SortOptions; + +// models/SortingOptions.ts +var _SortingOptions = class _SortingOptions { + static getAttributeTypeMap() { + return _SortingOptions.attributeTypeMap; + } + constructor() { + } +}; +_SortingOptions.discriminator = void 0; +_SortingOptions.attributeTypeMap = [ + { + "name": "field_name", + "baseName": "field_name", + "type": "string", + "format": "" + }, + { + "name": "order", + "baseName": "order", + "type": "string", + "format": "" + } +]; +var SortingOptions = _SortingOptions; + +// models/SqlQuery.ts +var _SqlQuery = class _SqlQuery { + static getAttributeTypeMap() { + return _SqlQuery.attributeTypeMap; + } + constructor() { + } +}; +_SqlQuery.discriminator = void 0; +_SqlQuery.attributeTypeMap = [ + { + "name": "metadata_id", + "baseName": "metadata_id", + "type": "string", + "format": "" + }, + { + "name": "metadata_name", + "baseName": "metadata_name", + "type": "string", + "format": "" + }, + { + "name": "sql_query", + "baseName": "sql_query", + "type": "string", + "format": "" + } +]; +var SqlQuery = _SqlQuery; + +// models/SqlQueryResponse.ts +var _SqlQueryResponse = class _SqlQueryResponse { + static getAttributeTypeMap() { + return _SqlQueryResponse.attributeTypeMap; + } + constructor() { + } +}; +_SqlQueryResponse.discriminator = void 0; +_SqlQueryResponse.attributeTypeMap = [ + { + "name": "metadata_id", + "baseName": "metadata_id", + "type": "string", + "format": "" + }, + { + "name": "metadata_name", + "baseName": "metadata_name", + "type": "string", + "format": "" + }, + { + "name": "metadata_type", + "baseName": "metadata_type", + "type": "SqlQueryResponseMetadataTypeEnum", + "format": "" + }, + { + "name": "sql_queries", + "baseName": "sql_queries", + "type": "Array", + "format": "" + } +]; +var SqlQueryResponse = _SqlQueryResponse; + +// models/StorageConfig.ts +var _StorageConfig = class _StorageConfig { + static getAttributeTypeMap() { + return _StorageConfig.attributeTypeMap; + } + constructor() { + } +}; +_StorageConfig.discriminator = void 0; +_StorageConfig.attributeTypeMap = [ + { + "name": "aws_s3_config", + "baseName": "aws_s3_config", + "type": "AwsS3Config", + "format": "" + } +]; +var StorageConfig = _StorageConfig; + +// models/StorageConfigInput.ts +var _StorageConfigInput = class _StorageConfigInput { + static getAttributeTypeMap() { + return _StorageConfigInput.attributeTypeMap; + } + constructor() { + } +}; +_StorageConfigInput.discriminator = void 0; +_StorageConfigInput.attributeTypeMap = [ + { + "name": "aws_s3_config", + "baseName": "aws_s3_config", + "type": "AwsS3ConfigInput", + "format": "" + } +]; +var StorageConfigInput = _StorageConfigInput; + +// models/StorageDestination.ts +var _StorageDestination = class _StorageDestination { + static getAttributeTypeMap() { + return _StorageDestination.attributeTypeMap; + } + constructor() { + } +}; +_StorageDestination.discriminator = void 0; +_StorageDestination.attributeTypeMap = [ + { + "name": "storage_type", + "baseName": "storage_type", + "type": "StorageDestinationStorageTypeEnum", + "format": "" + }, + { + "name": "storage_config", + "baseName": "storage_config", + "type": "StorageConfig", + "format": "" + } +]; +var StorageDestination = _StorageDestination; + +// models/StorageDestinationInput.ts +var _StorageDestinationInput = class _StorageDestinationInput { + static getAttributeTypeMap() { + return _StorageDestinationInput.attributeTypeMap; + } + constructor() { + } +}; +_StorageDestinationInput.discriminator = void 0; +_StorageDestinationInput.attributeTypeMap = [ + { + "name": "storage_type", + "baseName": "storage_type", + "type": "StorageDestinationInputStorageTypeEnum", + "format": "" + }, + { + "name": "storage_config", + "baseName": "storage_config", + "type": "StorageConfigInput", + "format": "" + } +]; +var StorageDestinationInput = _StorageDestinationInput; + +// models/SyncMetadataRequest.ts +var _SyncMetadataRequest = class _SyncMetadataRequest { + static getAttributeTypeMap() { + return _SyncMetadataRequest.attributeTypeMap; + } + constructor() { + } +}; +_SyncMetadataRequest.discriminator = void 0; +_SyncMetadataRequest.attributeTypeMap = [ + { + "name": "tables", + "baseName": "tables", + "type": "any", + "format": "" + }, + { + "name": "sync_attributes", + "baseName": "sync_attributes", + "type": "Array", + "format": "" + } +]; +var SyncMetadataRequest = _SyncMetadataRequest; + +// models/SyncMetadataResponse.ts +var _SyncMetadataResponse = class _SyncMetadataResponse { + static getAttributeTypeMap() { + return _SyncMetadataResponse.attributeTypeMap; + } + constructor() { + } +}; +_SyncMetadataResponse.discriminator = void 0; +_SyncMetadataResponse.attributeTypeMap = [ + { + "name": "status", + "baseName": "status", + "type": "SyncMetadataResponseStatusEnum", + "format": "" + }, + { + "name": "tables_updated", + "baseName": "tables_updated", + "type": "number", + "format": "int32" + }, + { + "name": "columns_updated", + "baseName": "columns_updated", + "type": "number", + "format": "int32" + }, + { + "name": "tables_failed", + "baseName": "tables_failed", + "type": "number", + "format": "int32" + }, + { + "name": "columns_failed", + "baseName": "columns_failed", + "type": "number", + "format": "int32" + }, + { + "name": "message", + "baseName": "message", + "type": "string", + "format": "" + } +]; +var SyncMetadataResponse = _SyncMetadataResponse; + +// models/SystemConfig.ts +var _SystemConfig = class _SystemConfig { + static getAttributeTypeMap() { + return _SystemConfig.attributeTypeMap; + } + constructor() { + } +}; +_SystemConfig.discriminator = void 0; +_SystemConfig.attributeTypeMap = [ + { + "name": "onboarding_content_url", + "baseName": "onboarding_content_url", + "type": "string", + "format": "" + }, + { + "name": "saml_enabled", + "baseName": "saml_enabled", + "type": "boolean", + "format": "" + }, + { + "name": "okta_enabled", + "baseName": "okta_enabled", + "type": "boolean", + "format": "" + } +]; +var SystemConfig = _SystemConfig; + +// models/SystemInfo.ts +var _SystemInfo = class _SystemInfo { + static getAttributeTypeMap() { + return _SystemInfo.attributeTypeMap; + } + constructor() { + } +}; +_SystemInfo.discriminator = void 0; +_SystemInfo.attributeTypeMap = [ + { + "name": "id", + "baseName": "id", + "type": "string", + "format": "" + }, + { + "name": "name", + "baseName": "name", + "type": "string", + "format": "" + }, + { + "name": "release_version", + "baseName": "release_version", + "type": "string", + "format": "" + }, + { + "name": "time_zone", + "baseName": "time_zone", + "type": "string", + "format": "" + }, + { + "name": "locale", + "baseName": "locale", + "type": "string", + "format": "" + }, + { + "name": "date_format", + "baseName": "date_format", + "type": "string", + "format": "" + }, + { + "name": "api_version", + "baseName": "api_version", + "type": "string", + "format": "" + }, + { + "name": "type", + "baseName": "type", + "type": "string", + "format": "" + }, + { + "name": "environment", + "baseName": "environment", + "type": "string", + "format": "" + }, + { + "name": "license", + "baseName": "license", + "type": "string", + "format": "" + }, + { + "name": "date_time_format", + "baseName": "date_time_format", + "type": "string", + "format": "" + }, + { + "name": "time_format", + "baseName": "time_format", + "type": "string", + "format": "" + }, + { + "name": "system_user_id", + "baseName": "system_user_id", + "type": "string", + "format": "" + }, + { + "name": "super_user_id", + "baseName": "super_user_id", + "type": "string", + "format": "" + }, + { + "name": "hidden_object_id", + "baseName": "hidden_object_id", + "type": "string", + "format": "" + }, + { + "name": "system_group_id", + "baseName": "system_group_id", + "type": "string", + "format": "" + }, + { + "name": "tsadmin_user_id", + "baseName": "tsadmin_user_id", + "type": "string", + "format": "" + }, + { + "name": "admin_group_id", + "baseName": "admin_group_id", + "type": "string", + "format": "" + }, + { + "name": "all_tables_connection_id", + "baseName": "all_tables_connection_id", + "type": "string", + "format": "" + }, + { + "name": "all_user_group_id", + "baseName": "all_user_group_id", + "type": "string", + "format": "" + }, + { + "name": "accept_language", + "baseName": "accept_language", + "type": "string", + "format": "" + }, + { + "name": "all_user_group_member_user_count", + "baseName": "all_user_group_member_user_count", + "type": "number", + "format": "int32" + }, + { + "name": "logical_model_version", + "baseName": "logical_model_version", + "type": "number", + "format": "int32" + } +]; +var SystemInfo = _SystemInfo; + +// models/SystemOverrideInfo.ts +var _SystemOverrideInfo = class _SystemOverrideInfo { + static getAttributeTypeMap() { + return _SystemOverrideInfo.attributeTypeMap; + } + constructor() { + } +}; +_SystemOverrideInfo.discriminator = void 0; +_SystemOverrideInfo.attributeTypeMap = [ + { + "name": "config_override_info", + "baseName": "config_override_info", + "type": "any", + "format": "" + } +]; +var SystemOverrideInfo = _SystemOverrideInfo; + +// models/Table.ts +var _Table = class _Table { + static getAttributeTypeMap() { + return _Table.attributeTypeMap; + } + constructor() { + } +}; +_Table.discriminator = void 0; +_Table.attributeTypeMap = [ + { + "name": "name", + "baseName": "name", + "type": "string", + "format": "" + }, + { + "name": "columns", + "baseName": "columns", + "type": "Array", + "format": "" + }, + { + "name": "type", + "baseName": "type", + "type": "string", + "format": "" + }, + { + "name": "description", + "baseName": "description", + "type": "string", + "format": "" + }, + { + "name": "selected", + "baseName": "selected", + "type": "boolean", + "format": "" + }, + { + "name": "linked", + "baseName": "linked", + "type": "boolean", + "format": "" + }, + { + "name": "relationships", + "baseName": "relationships", + "type": "Array", + "format": "" + } +]; +var Table = _Table; + +// models/Tag.ts +var _Tag = class _Tag { + static getAttributeTypeMap() { + return _Tag.attributeTypeMap; + } + constructor() { + } +}; +_Tag.discriminator = void 0; +_Tag.attributeTypeMap = [ + { + "name": "name", + "baseName": "name", + "type": "string", + "format": "" + }, + { + "name": "id", + "baseName": "id", + "type": "string", + "format": "" + }, + { + "name": "color", + "baseName": "color", + "type": "string", + "format": "" + }, + { + "name": "deleted", + "baseName": "deleted", + "type": "boolean", + "format": "" + }, + { + "name": "hidden", + "baseName": "hidden", + "type": "boolean", + "format": "" + }, + { + "name": "external", + "baseName": "external", + "type": "boolean", + "format": "" + }, + { + "name": "deprecated", + "baseName": "deprecated", + "type": "boolean", + "format": "" + }, + { + "name": "creation_time_in_millis", + "baseName": "creation_time_in_millis", + "type": "number", + "format": "float" + }, + { + "name": "modification_time_in_millis", + "baseName": "modification_time_in_millis", + "type": "number", + "format": "float" + }, + { + "name": "author_id", + "baseName": "author_id", + "type": "string", + "format": "" + }, + { + "name": "modifier_id", + "baseName": "modifier_id", + "type": "string", + "format": "" + }, + { + "name": "owner_id", + "baseName": "owner_id", + "type": "string", + "format": "" + } +]; +var Tag = _Tag; + +// models/TagMetadataTypeInput.ts +var _TagMetadataTypeInput = class _TagMetadataTypeInput { + static getAttributeTypeMap() { + return _TagMetadataTypeInput.attributeTypeMap; + } + constructor() { + } +}; +_TagMetadataTypeInput.discriminator = void 0; +_TagMetadataTypeInput.attributeTypeMap = [ + { + "name": "type", + "baseName": "type", + "type": "TagMetadataTypeInputTypeEnum", + "format": "" + }, + { + "name": "identifier", + "baseName": "identifier", + "type": "string", + "format": "" + } +]; +var TagMetadataTypeInput = _TagMetadataTypeInput; + +// models/TemplatePropertiesInputCreate.ts +var _TemplatePropertiesInputCreate = class _TemplatePropertiesInputCreate { + static getAttributeTypeMap() { + return _TemplatePropertiesInputCreate.attributeTypeMap; + } + constructor() { + } +}; +_TemplatePropertiesInputCreate.discriminator = void 0; +_TemplatePropertiesInputCreate.attributeTypeMap = [ + { + "name": "cta_button_bg_color", + "baseName": "cta_button_bg_color", + "type": "string", + "format": "" + }, + { + "name": "cta_text_font_color", + "baseName": "cta_text_font_color", + "type": "string", + "format": "" + }, + { + "name": "primary_bg_color", + "baseName": "primary_bg_color", + "type": "string", + "format": "" + }, + { + "name": "home_url", + "baseName": "home_url", + "type": "string", + "format": "" + }, + { + "name": "logo_url", + "baseName": "logo_url", + "type": "string", + "format": "" + }, + { + "name": "font_family", + "baseName": "font_family", + "type": "string", + "format": "" + }, + { + "name": "product_name", + "baseName": "product_name", + "type": "string", + "format": "" + }, + { + "name": "footer_address", + "baseName": "footer_address", + "type": "string", + "format": "" + }, + { + "name": "footer_phone", + "baseName": "footer_phone", + "type": "string", + "format": "" + }, + { + "name": "replacement_value_for_liveboard", + "baseName": "replacement_value_for_liveboard", + "type": "string", + "format": "" + }, + { + "name": "replacement_value_for_answer", + "baseName": "replacement_value_for_answer", + "type": "string", + "format": "" + }, + { + "name": "replacement_value_for_spot_iq", + "baseName": "replacement_value_for_spot_iq", + "type": "string", + "format": "" + }, + { + "name": "hide_footer_address", + "baseName": "hide_footer_address", + "type": "boolean", + "format": "" + }, + { + "name": "hide_footer_phone", + "baseName": "hide_footer_phone", + "type": "boolean", + "format": "" + }, + { + "name": "hide_manage_notification", + "baseName": "hide_manage_notification", + "type": "boolean", + "format": "" + }, + { + "name": "hide_mobile_app_nudge", + "baseName": "hide_mobile_app_nudge", + "type": "boolean", + "format": "" + }, + { + "name": "hide_privacy_policy", + "baseName": "hide_privacy_policy", + "type": "boolean", + "format": "" + }, + { + "name": "hide_product_name", + "baseName": "hide_product_name", + "type": "boolean", + "format": "" + }, + { + "name": "hide_ts_vocabulary_definitions", + "baseName": "hide_ts_vocabulary_definitions", + "type": "boolean", + "format": "" + }, + { + "name": "hide_notification_status", + "baseName": "hide_notification_status", + "type": "boolean", + "format": "" + }, + { + "name": "hide_error_message", + "baseName": "hide_error_message", + "type": "boolean", + "format": "" + }, + { + "name": "hide_unsubscribe_link", + "baseName": "hide_unsubscribe_link", + "type": "boolean", + "format": "" + }, + { + "name": "hide_modify_alert", + "baseName": "hide_modify_alert", + "type": "boolean", + "format": "" + }, + { + "name": "company_privacy_policy_url", + "baseName": "company_privacy_policy_url", + "type": "string", + "format": "" + }, + { + "name": "company_website_url", + "baseName": "company_website_url", + "type": "string", + "format": "" + }, + { + "name": "contact_support_url", + "baseName": "contact_support_url", + "type": "string", + "format": "" + }, + { + "name": "hide_contact_support_url", + "baseName": "hide_contact_support_url", + "type": "boolean", + "format": "" + }, + { + "name": "hide_logo_url", + "baseName": "hide_logo_url", + "type": "boolean", + "format": "" + } +]; +var TemplatePropertiesInputCreate = _TemplatePropertiesInputCreate; + +// models/Token.ts +var _Token = class _Token { + static getAttributeTypeMap() { + return _Token.attributeTypeMap; + } + constructor() { + } +}; +_Token.discriminator = void 0; +_Token.attributeTypeMap = [ + { + "name": "token", + "baseName": "token", + "type": "string", + "format": "" + }, + { + "name": "creation_time_in_millis", + "baseName": "creation_time_in_millis", + "type": "number", + "format": "float" + }, + { + "name": "expiration_time_in_millis", + "baseName": "expiration_time_in_millis", + "type": "number", + "format": "float" + }, + { + "name": "scope", + "baseName": "scope", + "type": "Scope", + "format": "" + }, + { + "name": "valid_for_user_id", + "baseName": "valid_for_user_id", + "type": "string", + "format": "" + }, + { + "name": "valid_for_username", + "baseName": "valid_for_username", + "type": "string", + "format": "" + } +]; +var Token = _Token; + +// models/TokenAccessScopeObject.ts +var _TokenAccessScopeObject = class _TokenAccessScopeObject { + static getAttributeTypeMap() { + return _TokenAccessScopeObject.attributeTypeMap; + } + constructor() { + } +}; +_TokenAccessScopeObject.discriminator = void 0; +_TokenAccessScopeObject.attributeTypeMap = [ + { + "name": "type", + "baseName": "type", + "type": "TokenAccessScopeObjectTypeEnum", + "format": "" + }, + { + "name": "identifier", + "baseName": "identifier", + "type": "string", + "format": "" + } +]; +var TokenAccessScopeObject = _TokenAccessScopeObject; + +// models/TokenValidationResponse.ts +var _TokenValidationResponse = class _TokenValidationResponse { + static getAttributeTypeMap() { + return _TokenValidationResponse.attributeTypeMap; + } + constructor() { + } +}; +_TokenValidationResponse.discriminator = void 0; +_TokenValidationResponse.attributeTypeMap = [ + { + "name": "creation_time_in_millis", + "baseName": "creation_time_in_millis", + "type": "number", + "format": "float" + }, + { + "name": "expiration_time_in_millis", + "baseName": "expiration_time_in_millis", + "type": "number", + "format": "float" + }, + { + "name": "scope", + "baseName": "scope", + "type": "Scope", + "format": "" + }, + { + "name": "valid_for_user_id", + "baseName": "valid_for_user_id", + "type": "string", + "format": "" + }, + { + "name": "token_type", + "baseName": "token_type", + "type": "string", + "format": "" + } +]; +var TokenValidationResponse = _TokenValidationResponse; + +// models/URL.ts +var _URL = class _URL { + static getAttributeTypeMap() { + return _URL.attributeTypeMap; + } + constructor() { + } +}; +_URL.discriminator = void 0; +_URL.attributeTypeMap = [ + { + "name": "authentication", + "baseName": "authentication", + "type": "Authentication", + "format": "" + }, + { + "name": "parameters", + "baseName": "parameters", + "type": "Array", + "format": "" + }, + { + "name": "url", + "baseName": "url", + "type": "string", + "format": "" + }, + { + "name": "reference", + "baseName": "reference", + "type": "string", + "format": "" + } +]; +var URL2 = _URL; + +// models/URLInput.ts +var _URLInput = class _URLInput { + static getAttributeTypeMap() { + return _URLInput.attributeTypeMap; + } + constructor() { + } +}; +_URLInput.discriminator = void 0; +_URLInput.attributeTypeMap = [ + { + "name": "authentication", + "baseName": "authentication", + "type": "AuthenticationInput", + "format": "" + }, + { + "name": "parameters", + "baseName": "parameters", + "type": "Array", + "format": "" + }, + { + "name": "url", + "baseName": "url", + "type": "string", + "format": "" + }, + { + "name": "reference", + "baseName": "reference", + "type": "string", + "format": "" + } +]; +var URLInput = _URLInput; + +// models/URLInputMandatory.ts +var _URLInputMandatory = class _URLInputMandatory { + static getAttributeTypeMap() { + return _URLInputMandatory.attributeTypeMap; + } + constructor() { + } +}; +_URLInputMandatory.discriminator = void 0; +_URLInputMandatory.attributeTypeMap = [ + { + "name": "authentication", + "baseName": "authentication", + "type": "AuthenticationInput", + "format": "" + }, + { + "name": "parameters", + "baseName": "parameters", + "type": "Array", + "format": "" + }, + { + "name": "url", + "baseName": "url", + "type": "string", + "format": "" + }, + { + "name": "reference", + "baseName": "reference", + "type": "string", + "format": "" + } +]; +var URLInputMandatory = _URLInputMandatory; + +// models/UnassignTagRequest.ts +var _UnassignTagRequest = class _UnassignTagRequest { + static getAttributeTypeMap() { + return _UnassignTagRequest.attributeTypeMap; + } + constructor() { + } +}; +_UnassignTagRequest.discriminator = void 0; +_UnassignTagRequest.attributeTypeMap = [ + { + "name": "metadata", + "baseName": "metadata", + "type": "Array", + "format": "" + }, + { + "name": "tag_identifiers", + "baseName": "tag_identifiers", + "type": "Array", + "format": "" + } +]; +var UnassignTagRequest = _UnassignTagRequest; + +// models/UnparameterizeMetadataRequest.ts +var _UnparameterizeMetadataRequest = class _UnparameterizeMetadataRequest { + static getAttributeTypeMap() { + return _UnparameterizeMetadataRequest.attributeTypeMap; + } + constructor() { + } +}; +_UnparameterizeMetadataRequest.discriminator = void 0; +_UnparameterizeMetadataRequest.attributeTypeMap = [ + { + "name": "metadata_type", + "baseName": "metadata_type", + "type": "UnparameterizeMetadataRequestMetadataTypeEnum", + "format": "" + }, + { + "name": "metadata_identifier", + "baseName": "metadata_identifier", + "type": "string", + "format": "" + }, + { + "name": "field_type", + "baseName": "field_type", + "type": "UnparameterizeMetadataRequestFieldTypeEnum", + "format": "" + }, + { + "name": "field_name", + "baseName": "field_name", + "type": "string", + "format": "" + }, + { + "name": "value", + "baseName": "value", + "type": "string", + "format": "" + } +]; +var UnparameterizeMetadataRequest = _UnparameterizeMetadataRequest; + +// models/UnpublishMetadataRequest.ts +var _UnpublishMetadataRequest = class _UnpublishMetadataRequest { + static getAttributeTypeMap() { + return _UnpublishMetadataRequest.attributeTypeMap; + } + constructor() { + } +}; +_UnpublishMetadataRequest.discriminator = void 0; +_UnpublishMetadataRequest.attributeTypeMap = [ + { + "name": "force", + "baseName": "force", + "type": "boolean", + "format": "" + }, + { + "name": "include_dependencies", + "baseName": "include_dependencies", + "type": "boolean", + "format": "" + }, + { + "name": "metadata", + "baseName": "metadata", + "type": "Array", + "format": "" + }, + { + "name": "org_identifiers", + "baseName": "org_identifiers", + "type": "Array", + "format": "" + } +]; +var UnpublishMetadataRequest = _UnpublishMetadataRequest; + +// models/UpdateCalendarRequest.ts +var _UpdateCalendarRequest = class _UpdateCalendarRequest { + static getAttributeTypeMap() { + return _UpdateCalendarRequest.attributeTypeMap; + } + constructor() { + } +}; +_UpdateCalendarRequest.discriminator = void 0; +_UpdateCalendarRequest.attributeTypeMap = [ + { + "name": "update_method", + "baseName": "update_method", + "type": "UpdateCalendarRequestUpdateMethodEnum", + "format": "" + }, + { + "name": "table_reference", + "baseName": "table_reference", + "type": "UpdateCalendarRequestTableReference", + "format": "" + }, + { + "name": "start_date", + "baseName": "start_date", + "type": "string", + "format": "" + }, + { + "name": "end_date", + "baseName": "end_date", + "type": "string", + "format": "" + }, + { + "name": "calendar_type", + "baseName": "calendar_type", + "type": "UpdateCalendarRequestCalendarTypeEnum", + "format": "" + }, + { + "name": "month_offset", + "baseName": "month_offset", + "type": "UpdateCalendarRequestMonthOffsetEnum", + "format": "" + }, + { + "name": "start_day_of_week", + "baseName": "start_day_of_week", + "type": "UpdateCalendarRequestStartDayOfWeekEnum", + "format": "" + }, + { + "name": "quarter_name_prefix", + "baseName": "quarter_name_prefix", + "type": "string", + "format": "" + }, + { + "name": "year_name_prefix", + "baseName": "year_name_prefix", + "type": "string", + "format": "" + } +]; +var UpdateCalendarRequest = _UpdateCalendarRequest; + +// models/UpdateCalendarRequestTableReference.ts +var _UpdateCalendarRequestTableReference = class _UpdateCalendarRequestTableReference { + static getAttributeTypeMap() { + return _UpdateCalendarRequestTableReference.attributeTypeMap; + } + constructor() { + } +}; +_UpdateCalendarRequestTableReference.discriminator = void 0; +_UpdateCalendarRequestTableReference.attributeTypeMap = [ + { + "name": "connection_identifier", + "baseName": "connection_identifier", + "type": "string", + "format": "" + }, + { + "name": "database_name", + "baseName": "database_name", + "type": "string", + "format": "" + }, + { + "name": "schema_name", + "baseName": "schema_name", + "type": "string", + "format": "" + }, + { + "name": "table_name", + "baseName": "table_name", + "type": "string", + "format": "" + } +]; +var UpdateCalendarRequestTableReference = _UpdateCalendarRequestTableReference; + +// models/UpdateCollectionRequest.ts +var _UpdateCollectionRequest = class _UpdateCollectionRequest { + static getAttributeTypeMap() { + return _UpdateCollectionRequest.attributeTypeMap; + } + constructor() { + } +}; +_UpdateCollectionRequest.discriminator = void 0; +_UpdateCollectionRequest.attributeTypeMap = [ + { + "name": "name", + "baseName": "name", + "type": "string", + "format": "" + }, + { + "name": "description", + "baseName": "description", + "type": "string", + "format": "" + }, + { + "name": "metadata", + "baseName": "metadata", + "type": "Array", + "format": "" + }, + { + "name": "operation", + "baseName": "operation", + "type": "UpdateCollectionRequestOperationEnum", + "format": "" + } +]; +var UpdateCollectionRequest = _UpdateCollectionRequest; + +// models/UpdateColumnSecurityRulesRequest.ts +var _UpdateColumnSecurityRulesRequest = class _UpdateColumnSecurityRulesRequest { + static getAttributeTypeMap() { + return _UpdateColumnSecurityRulesRequest.attributeTypeMap; + } + constructor() { + } +}; +_UpdateColumnSecurityRulesRequest.discriminator = void 0; +_UpdateColumnSecurityRulesRequest.attributeTypeMap = [ + { + "name": "identifier", + "baseName": "identifier", + "type": "string", + "format": "" + }, + { + "name": "obj_identifier", + "baseName": "obj_identifier", + "type": "string", + "format": "" + }, + { + "name": "clear_csr", + "baseName": "clear_csr", + "type": "boolean", + "format": "" + }, + { + "name": "column_security_rules", + "baseName": "column_security_rules", + "type": "Array", + "format": "" + } +]; +var UpdateColumnSecurityRulesRequest = _UpdateColumnSecurityRulesRequest; + +// models/UpdateConfigRequest.ts +var _UpdateConfigRequest = class _UpdateConfigRequest { + static getAttributeTypeMap() { + return _UpdateConfigRequest.attributeTypeMap; + } + constructor() { + } +}; +_UpdateConfigRequest.discriminator = void 0; +_UpdateConfigRequest.attributeTypeMap = [ + { + "name": "username", + "baseName": "username", + "type": "string", + "format": "" + }, + { + "name": "access_token", + "baseName": "access_token", + "type": "string", + "format": "" + }, + { + "name": "org_identifier", + "baseName": "org_identifier", + "type": "string", + "format": "" + }, + { + "name": "branch_names", + "baseName": "branch_names", + "type": "Array", + "format": "" + }, + { + "name": "commit_branch_name", + "baseName": "commit_branch_name", + "type": "string", + "format": "" + }, + { + "name": "enable_guid_mapping", + "baseName": "enable_guid_mapping", + "type": "boolean", + "format": "" + }, + { + "name": "configuration_branch_name", + "baseName": "configuration_branch_name", + "type": "string", + "format": "" + } +]; +var UpdateConfigRequest = _UpdateConfigRequest; + +// models/UpdateConnectionConfigurationRequest.ts +var _UpdateConnectionConfigurationRequest = class _UpdateConnectionConfigurationRequest { + static getAttributeTypeMap() { + return _UpdateConnectionConfigurationRequest.attributeTypeMap; + } + constructor() { + } +}; +_UpdateConnectionConfigurationRequest.discriminator = void 0; +_UpdateConnectionConfigurationRequest.attributeTypeMap = [ + { + "name": "connection_identifier", + "baseName": "connection_identifier", + "type": "string", + "format": "" + }, + { + "name": "name", + "baseName": "name", + "type": "string", + "format": "" + }, + { + "name": "description", + "baseName": "description", + "type": "string", + "format": "" + }, + { + "name": "same_as_parent", + "baseName": "same_as_parent", + "type": "boolean", + "format": "" + }, + { + "name": "policy_process_options", + "baseName": "policy_process_options", + "type": "CreateConnectionConfigurationRequestPolicyProcessOptions", + "format": "" + }, + { + "name": "authentication_type", + "baseName": "authentication_type", + "type": "UpdateConnectionConfigurationRequestAuthenticationTypeEnum", + "format": "" + }, + { + "name": "configuration", + "baseName": "configuration", + "type": "any", + "format": "" + }, + { + "name": "policy_type", + "baseName": "policy_type", + "type": "UpdateConnectionConfigurationRequestPolicyTypeEnum", + "format": "" + }, + { + "name": "policy_principals", + "baseName": "policy_principals", + "type": "Array", + "format": "" + }, + { + "name": "policy_processes", + "baseName": "policy_processes", + "type": "Array", + "format": "" + }, + { + "name": "disable", + "baseName": "disable", + "type": "boolean", + "format": "" + } +]; +var UpdateConnectionConfigurationRequest = _UpdateConnectionConfigurationRequest; + +// models/UpdateConnectionRequest.ts +var _UpdateConnectionRequest = class _UpdateConnectionRequest { + static getAttributeTypeMap() { + return _UpdateConnectionRequest.attributeTypeMap; + } + constructor() { + } +}; +_UpdateConnectionRequest.discriminator = void 0; +_UpdateConnectionRequest.attributeTypeMap = [ + { + "name": "connection_identifier", + "baseName": "connection_identifier", + "type": "string", + "format": "" + }, + { + "name": "name", + "baseName": "name", + "type": "string", + "format": "" + }, + { + "name": "description", + "baseName": "description", + "type": "string", + "format": "" + }, + { + "name": "data_warehouse_config", + "baseName": "data_warehouse_config", + "type": "any", + "format": "" + }, + { + "name": "validate", + "baseName": "validate", + "type": "boolean", + "format": "" + } +]; +var UpdateConnectionRequest = _UpdateConnectionRequest; + +// models/UpdateConnectionStatusRequest.ts +var _UpdateConnectionStatusRequest = class _UpdateConnectionStatusRequest { + static getAttributeTypeMap() { + return _UpdateConnectionStatusRequest.attributeTypeMap; + } + constructor() { + } +}; +_UpdateConnectionStatusRequest.discriminator = void 0; +_UpdateConnectionStatusRequest.attributeTypeMap = [ + { + "name": "status", + "baseName": "status", + "type": "UpdateConnectionStatusRequestStatusEnum", + "format": "" + } +]; +var UpdateConnectionStatusRequest = _UpdateConnectionStatusRequest; + +// models/UpdateConnectionV2Request.ts +var _UpdateConnectionV2Request = class _UpdateConnectionV2Request { + static getAttributeTypeMap() { + return _UpdateConnectionV2Request.attributeTypeMap; + } + constructor() { + } +}; +_UpdateConnectionV2Request.discriminator = void 0; +_UpdateConnectionV2Request.attributeTypeMap = [ + { + "name": "name", + "baseName": "name", + "type": "string", + "format": "" + }, + { + "name": "description", + "baseName": "description", + "type": "string", + "format": "" + }, + { + "name": "data_warehouse_config", + "baseName": "data_warehouse_config", + "type": "any", + "format": "" + }, + { + "name": "validate", + "baseName": "validate", + "type": "boolean", + "format": "" + } +]; +var UpdateConnectionV2Request = _UpdateConnectionV2Request; + +// models/UpdateCustomActionRequest.ts +var _UpdateCustomActionRequest = class _UpdateCustomActionRequest { + static getAttributeTypeMap() { + return _UpdateCustomActionRequest.attributeTypeMap; + } + constructor() { + } +}; +_UpdateCustomActionRequest.discriminator = void 0; +_UpdateCustomActionRequest.attributeTypeMap = [ + { + "name": "action_details", + "baseName": "action_details", + "type": "UpdateCustomActionRequestActionDetails", + "format": "" + }, + { + "name": "associate_metadata", + "baseName": "associate_metadata", + "type": "Array", + "format": "" + }, + { + "name": "default_action_config", + "baseName": "default_action_config", + "type": "UpdateCustomActionRequestDefaultActionConfig", + "format": "" + }, + { + "name": "group_identifiers", + "baseName": "group_identifiers", + "type": "Array", + "format": "" + }, + { + "name": "name", + "baseName": "name", + "type": "string", + "format": "" + }, + { + "name": "operation", + "baseName": "operation", + "type": "UpdateCustomActionRequestOperationEnum", + "format": "" + } +]; +var UpdateCustomActionRequest = _UpdateCustomActionRequest; + +// models/UpdateCustomActionRequestActionDetails.ts +var _UpdateCustomActionRequestActionDetails = class _UpdateCustomActionRequestActionDetails { + static getAttributeTypeMap() { + return _UpdateCustomActionRequestActionDetails.attributeTypeMap; + } + constructor() { + } +}; +_UpdateCustomActionRequestActionDetails.discriminator = void 0; +_UpdateCustomActionRequestActionDetails.attributeTypeMap = [ + { + "name": "CALLBACK", + "baseName": "CALLBACK", + "type": "CALLBACKInput", + "format": "" + }, + { + "name": "URL", + "baseName": "URL", + "type": "URLInput", + "format": "" + } +]; +var UpdateCustomActionRequestActionDetails = _UpdateCustomActionRequestActionDetails; + +// models/UpdateCustomActionRequestDefaultActionConfig.ts +var _UpdateCustomActionRequestDefaultActionConfig = class _UpdateCustomActionRequestDefaultActionConfig { + static getAttributeTypeMap() { + return _UpdateCustomActionRequestDefaultActionConfig.attributeTypeMap; + } + constructor() { + } +}; +_UpdateCustomActionRequestDefaultActionConfig.discriminator = void 0; +_UpdateCustomActionRequestDefaultActionConfig.attributeTypeMap = [ + { + "name": "visibility", + "baseName": "visibility", + "type": "boolean", + "format": "" + } +]; +var UpdateCustomActionRequestDefaultActionConfig = _UpdateCustomActionRequestDefaultActionConfig; + +// models/UpdateEmailCustomizationRequest.ts +var _UpdateEmailCustomizationRequest = class _UpdateEmailCustomizationRequest { + static getAttributeTypeMap() { + return _UpdateEmailCustomizationRequest.attributeTypeMap; + } + constructor() { + } +}; +_UpdateEmailCustomizationRequest.discriminator = void 0; +_UpdateEmailCustomizationRequest.attributeTypeMap = [ + { + "name": "template_properties", + "baseName": "template_properties", + "type": "CreateEmailCustomizationRequestTemplateProperties", + "format": "" + }, + { + "name": "org_identifier", + "baseName": "org_identifier", + "type": "string", + "format": "" + } +]; +var UpdateEmailCustomizationRequest = _UpdateEmailCustomizationRequest; + +// models/UpdateMetadataHeaderRequest.ts +var _UpdateMetadataHeaderRequest = class _UpdateMetadataHeaderRequest { + static getAttributeTypeMap() { + return _UpdateMetadataHeaderRequest.attributeTypeMap; + } + constructor() { + } +}; +_UpdateMetadataHeaderRequest.discriminator = void 0; +_UpdateMetadataHeaderRequest.attributeTypeMap = [ + { + "name": "headers_update", + "baseName": "headers_update", + "type": "Array", + "format": "" + }, + { + "name": "org_identifier", + "baseName": "org_identifier", + "type": "string", + "format": "" + } +]; +var UpdateMetadataHeaderRequest = _UpdateMetadataHeaderRequest; + +// models/UpdateMetadataObjIdRequest.ts +var _UpdateMetadataObjIdRequest = class _UpdateMetadataObjIdRequest { + static getAttributeTypeMap() { + return _UpdateMetadataObjIdRequest.attributeTypeMap; + } + constructor() { + } +}; +_UpdateMetadataObjIdRequest.discriminator = void 0; +_UpdateMetadataObjIdRequest.attributeTypeMap = [ + { + "name": "metadata", + "baseName": "metadata", + "type": "Array", + "format": "" + } +]; +var UpdateMetadataObjIdRequest = _UpdateMetadataObjIdRequest; + +// models/UpdateObjIdInput.ts +var _UpdateObjIdInput = class _UpdateObjIdInput { + static getAttributeTypeMap() { + return _UpdateObjIdInput.attributeTypeMap; + } + constructor() { + } +}; +_UpdateObjIdInput.discriminator = void 0; +_UpdateObjIdInput.attributeTypeMap = [ + { + "name": "metadata_identifier", + "baseName": "metadata_identifier", + "type": "string", + "format": "" + }, + { + "name": "type", + "baseName": "type", + "type": "UpdateObjIdInputTypeEnum", + "format": "" + }, + { + "name": "current_obj_id", + "baseName": "current_obj_id", + "type": "string", + "format": "" + }, + { + "name": "new_obj_id", + "baseName": "new_obj_id", + "type": "string", + "format": "" + } +]; +var UpdateObjIdInput = _UpdateObjIdInput; + +// models/UpdateOrgRequest.ts +var _UpdateOrgRequest = class _UpdateOrgRequest { + static getAttributeTypeMap() { + return _UpdateOrgRequest.attributeTypeMap; + } + constructor() { + } +}; +_UpdateOrgRequest.discriminator = void 0; +_UpdateOrgRequest.attributeTypeMap = [ + { + "name": "name", + "baseName": "name", + "type": "string", + "format": "" + }, + { + "name": "description", + "baseName": "description", + "type": "string", + "format": "" + }, + { + "name": "user_identifiers", + "baseName": "user_identifiers", + "type": "Array", + "format": "" + }, + { + "name": "group_identifiers", + "baseName": "group_identifiers", + "type": "Array", + "format": "" + }, + { + "name": "operation", + "baseName": "operation", + "type": "UpdateOrgRequestOperationEnum", + "format": "" + } +]; +var UpdateOrgRequest = _UpdateOrgRequest; + +// models/UpdateRoleRequest.ts +var _UpdateRoleRequest = class _UpdateRoleRequest { + static getAttributeTypeMap() { + return _UpdateRoleRequest.attributeTypeMap; + } + constructor() { + } +}; +_UpdateRoleRequest.discriminator = void 0; +_UpdateRoleRequest.attributeTypeMap = [ + { + "name": "name", + "baseName": "name", + "type": "string", + "format": "" + }, + { + "name": "description", + "baseName": "description", + "type": "string", + "format": "" + }, + { + "name": "privileges", + "baseName": "privileges", + "type": "Array", + "format": "" + } +]; +var UpdateRoleRequest = _UpdateRoleRequest; + +// models/UpdateScheduleRequest.ts +var _UpdateScheduleRequest = class _UpdateScheduleRequest { + static getAttributeTypeMap() { + return _UpdateScheduleRequest.attributeTypeMap; + } + constructor() { + } +}; +_UpdateScheduleRequest.discriminator = void 0; +_UpdateScheduleRequest.attributeTypeMap = [ + { + "name": "name", + "baseName": "name", + "type": "string", + "format": "" + }, + { + "name": "description", + "baseName": "description", + "type": "string", + "format": "" + }, + { + "name": "metadata_type", + "baseName": "metadata_type", + "type": "UpdateScheduleRequestMetadataTypeEnum", + "format": "" + }, + { + "name": "metadata_identifier", + "baseName": "metadata_identifier", + "type": "string", + "format": "" + }, + { + "name": "file_format", + "baseName": "file_format", + "type": "UpdateScheduleRequestFileFormatEnum", + "format": "" + }, + { + "name": "liveboard_options", + "baseName": "liveboard_options", + "type": "UpdateScheduleRequestLiveboardOptions", + "format": "" + }, + { + "name": "pdf_options", + "baseName": "pdf_options", + "type": "UpdateScheduleRequestPdfOptions", + "format": "" + }, + { + "name": "time_zone", + "baseName": "time_zone", + "type": "UpdateScheduleRequestTimeZoneEnum", + "format": "" + }, + { + "name": "frequency", + "baseName": "frequency", + "type": "UpdateScheduleRequestFrequency", + "format": "" + }, + { + "name": "recipient_details", + "baseName": "recipient_details", + "type": "UpdateScheduleRequestRecipientDetails", + "format": "" + }, + { + "name": "status", + "baseName": "status", + "type": "UpdateScheduleRequestStatusEnum", + "format": "" + }, + { + "name": "personalised_view_id", + "baseName": "personalised_view_id", + "type": "string", + "format": "" + } +]; +var UpdateScheduleRequest = _UpdateScheduleRequest; + +// models/UpdateScheduleRequestFrequency.ts +var _UpdateScheduleRequestFrequency = class _UpdateScheduleRequestFrequency { + static getAttributeTypeMap() { + return _UpdateScheduleRequestFrequency.attributeTypeMap; + } + constructor() { + } +}; +_UpdateScheduleRequestFrequency.discriminator = void 0; +_UpdateScheduleRequestFrequency.attributeTypeMap = [ + { + "name": "cron_expression", + "baseName": "cron_expression", + "type": "CronExpressionInput", + "format": "" + } +]; +var UpdateScheduleRequestFrequency = _UpdateScheduleRequestFrequency; + +// models/UpdateScheduleRequestLiveboardOptions.ts +var _UpdateScheduleRequestLiveboardOptions = class _UpdateScheduleRequestLiveboardOptions { + static getAttributeTypeMap() { + return _UpdateScheduleRequestLiveboardOptions.attributeTypeMap; + } + constructor() { + } +}; +_UpdateScheduleRequestLiveboardOptions.discriminator = void 0; +_UpdateScheduleRequestLiveboardOptions.attributeTypeMap = [ + { + "name": "visualization_identifiers", + "baseName": "visualization_identifiers", + "type": "Array", + "format": "" + } +]; +var UpdateScheduleRequestLiveboardOptions = _UpdateScheduleRequestLiveboardOptions; + +// models/UpdateScheduleRequestPdfOptions.ts +var _UpdateScheduleRequestPdfOptions = class _UpdateScheduleRequestPdfOptions { + static getAttributeTypeMap() { + return _UpdateScheduleRequestPdfOptions.attributeTypeMap; + } + constructor() { + } +}; +_UpdateScheduleRequestPdfOptions.discriminator = void 0; +_UpdateScheduleRequestPdfOptions.attributeTypeMap = [ + { + "name": "complete_liveboard", + "baseName": "complete_liveboard", + "type": "boolean", + "format": "" + }, + { + "name": "include_cover_page", + "baseName": "include_cover_page", + "type": "boolean", + "format": "" + }, + { + "name": "include_custom_logo", + "baseName": "include_custom_logo", + "type": "boolean", + "format": "" + }, + { + "name": "include_filter_page", + "baseName": "include_filter_page", + "type": "boolean", + "format": "" + }, + { + "name": "include_page_number", + "baseName": "include_page_number", + "type": "boolean", + "format": "" + }, + { + "name": "page_footer_text", + "baseName": "page_footer_text", + "type": "string", + "format": "" + }, + { + "name": "page_orientation", + "baseName": "page_orientation", + "type": "string", + "format": "" + }, + { + "name": "page_size", + "baseName": "page_size", + "type": "UpdateScheduleRequestPdfOptionsPageSizeEnum", + "format": "" + }, + { + "name": "truncate_table", + "baseName": "truncate_table", + "type": "boolean", + "format": "" + } +]; +var UpdateScheduleRequestPdfOptions = _UpdateScheduleRequestPdfOptions; + +// models/UpdateScheduleRequestRecipientDetails.ts +var _UpdateScheduleRequestRecipientDetails = class _UpdateScheduleRequestRecipientDetails { + static getAttributeTypeMap() { + return _UpdateScheduleRequestRecipientDetails.attributeTypeMap; + } + constructor() { + } +}; +_UpdateScheduleRequestRecipientDetails.discriminator = void 0; +_UpdateScheduleRequestRecipientDetails.attributeTypeMap = [ + { + "name": "emails", + "baseName": "emails", + "type": "Array", + "format": "" + }, + { + "name": "principals", + "baseName": "principals", + "type": "Array", + "format": "" + } +]; +var UpdateScheduleRequestRecipientDetails = _UpdateScheduleRequestRecipientDetails; + +// models/UpdateSystemConfigRequest.ts +var _UpdateSystemConfigRequest = class _UpdateSystemConfigRequest { + static getAttributeTypeMap() { + return _UpdateSystemConfigRequest.attributeTypeMap; + } + constructor() { + } +}; +_UpdateSystemConfigRequest.discriminator = void 0; +_UpdateSystemConfigRequest.attributeTypeMap = [ + { + "name": "configuration", + "baseName": "configuration", + "type": "any", + "format": "" + } +]; +var UpdateSystemConfigRequest = _UpdateSystemConfigRequest; + +// models/UpdateTagRequest.ts +var _UpdateTagRequest = class _UpdateTagRequest { + static getAttributeTypeMap() { + return _UpdateTagRequest.attributeTypeMap; + } + constructor() { + } +}; +_UpdateTagRequest.discriminator = void 0; +_UpdateTagRequest.attributeTypeMap = [ + { + "name": "name", + "baseName": "name", + "type": "string", + "format": "" + }, + { + "name": "color", + "baseName": "color", + "type": "string", + "format": "" + } +]; +var UpdateTagRequest = _UpdateTagRequest; + +// models/UpdateUserGroupRequest.ts +var _UpdateUserGroupRequest = class _UpdateUserGroupRequest { + static getAttributeTypeMap() { + return _UpdateUserGroupRequest.attributeTypeMap; + } + constructor() { + } +}; +_UpdateUserGroupRequest.discriminator = void 0; +_UpdateUserGroupRequest.attributeTypeMap = [ + { + "name": "name", + "baseName": "name", + "type": "string", + "format": "" + }, + { + "name": "default_liveboard_identifiers", + "baseName": "default_liveboard_identifiers", + "type": "Array", + "format": "" + }, + { + "name": "description", + "baseName": "description", + "type": "string", + "format": "" + }, + { + "name": "display_name", + "baseName": "display_name", + "type": "string", + "format": "" + }, + { + "name": "privileges", + "baseName": "privileges", + "type": "Array", + "format": "" + }, + { + "name": "sub_group_identifiers", + "baseName": "sub_group_identifiers", + "type": "Array", + "format": "" + }, + { + "name": "type", + "baseName": "type", + "type": "UpdateUserGroupRequestTypeEnum", + "format": "" + }, + { + "name": "user_identifiers", + "baseName": "user_identifiers", + "type": "Array", + "format": "" + }, + { + "name": "visibility", + "baseName": "visibility", + "type": "UpdateUserGroupRequestVisibilityEnum", + "format": "" + }, + { + "name": "role_identifiers", + "baseName": "role_identifiers", + "type": "Array", + "format": "" + }, + { + "name": "operation", + "baseName": "operation", + "type": "UpdateUserGroupRequestOperationEnum", + "format": "" + } +]; +var UpdateUserGroupRequest = _UpdateUserGroupRequest; + +// models/UpdateUserRequest.ts +var _UpdateUserRequest = class _UpdateUserRequest { + static getAttributeTypeMap() { + return _UpdateUserRequest.attributeTypeMap; + } + constructor() { + } +}; +_UpdateUserRequest.discriminator = void 0; +_UpdateUserRequest.attributeTypeMap = [ + { + "name": "name", + "baseName": "name", + "type": "string", + "format": "" + }, + { + "name": "display_name", + "baseName": "display_name", + "type": "string", + "format": "" + }, + { + "name": "visibility", + "baseName": "visibility", + "type": "UpdateUserRequestVisibilityEnum", + "format": "" + }, + { + "name": "email", + "baseName": "email", + "type": "string", + "format": "" + }, + { + "name": "account_status", + "baseName": "account_status", + "type": "UpdateUserRequestAccountStatusEnum", + "format": "" + }, + { + "name": "notify_on_share", + "baseName": "notify_on_share", + "type": "boolean", + "format": "" + }, + { + "name": "show_onboarding_experience", + "baseName": "show_onboarding_experience", + "type": "boolean", + "format": "" + }, + { + "name": "onboarding_experience_completed", + "baseName": "onboarding_experience_completed", + "type": "boolean", + "format": "" + }, + { + "name": "account_type", + "baseName": "account_type", + "type": "UpdateUserRequestAccountTypeEnum", + "format": "" + }, + { + "name": "group_identifiers", + "baseName": "group_identifiers", + "type": "Array", + "format": "" + }, + { + "name": "home_liveboard_identifier", + "baseName": "home_liveboard_identifier", + "type": "string", + "format": "" + }, + { + "name": "favorite_metadata", + "baseName": "favorite_metadata", + "type": "Array", + "format": "" + }, + { + "name": "org_identifiers", + "baseName": "org_identifiers", + "type": "Array", + "format": "" + }, + { + "name": "operation", + "baseName": "operation", + "type": "UpdateUserRequestOperationEnum", + "format": "" + }, + { + "name": "preferred_locale", + "baseName": "preferred_locale", + "type": "UpdateUserRequestPreferredLocaleEnum", + "format": "" + }, + { + "name": "use_browser_language", + "baseName": "use_browser_language", + "type": "boolean", + "format": "" + }, + { + "name": "extended_properties", + "baseName": "extended_properties", + "type": "any", + "format": "" + }, + { + "name": "extended_preferences", + "baseName": "extended_preferences", + "type": "any", + "format": "" + } +]; +var UpdateUserRequest = _UpdateUserRequest; + +// models/UpdateVariableRequest.ts +var _UpdateVariableRequest = class _UpdateVariableRequest { + static getAttributeTypeMap() { + return _UpdateVariableRequest.attributeTypeMap; + } + constructor() { + } +}; +_UpdateVariableRequest.discriminator = void 0; +_UpdateVariableRequest.attributeTypeMap = [ + { + "name": "name", + "baseName": "name", + "type": "string", + "format": "" + } +]; +var UpdateVariableRequest = _UpdateVariableRequest; + +// models/UpdateVariableValuesRequest.ts +var _UpdateVariableValuesRequest = class _UpdateVariableValuesRequest { + static getAttributeTypeMap() { + return _UpdateVariableValuesRequest.attributeTypeMap; + } + constructor() { + } +}; +_UpdateVariableValuesRequest.discriminator = void 0; +_UpdateVariableValuesRequest.attributeTypeMap = [ + { + "name": "variable_assignment", + "baseName": "variable_assignment", + "type": "Array", + "format": "" + }, + { + "name": "variable_value_scope", + "baseName": "variable_value_scope", + "type": "Array", + "format": "" + } +]; +var UpdateVariableValuesRequest = _UpdateVariableValuesRequest; + +// models/UpdateWebhookConfigurationRequest.ts +var _UpdateWebhookConfigurationRequest = class _UpdateWebhookConfigurationRequest { + static getAttributeTypeMap() { + return _UpdateWebhookConfigurationRequest.attributeTypeMap; + } + constructor() { + } +}; +_UpdateWebhookConfigurationRequest.discriminator = void 0; +_UpdateWebhookConfigurationRequest.attributeTypeMap = [ + { + "name": "name", + "baseName": "name", + "type": "string", + "format": "" + }, + { + "name": "description", + "baseName": "description", + "type": "string", + "format": "" + }, + { + "name": "url", + "baseName": "url", + "type": "string", + "format": "" + }, + { + "name": "url_params", + "baseName": "url_params", + "type": "any", + "format": "" + }, + { + "name": "events", + "baseName": "events", + "type": "Array", + "format": "" + }, + { + "name": "authentication", + "baseName": "authentication", + "type": "CreateWebhookConfigurationRequestAuthentication", + "format": "" + }, + { + "name": "signature_verification", + "baseName": "signature_verification", + "type": "CreateWebhookConfigurationRequestSignatureVerification", + "format": "" + }, + { + "name": "storage_destination", + "baseName": "storage_destination", + "type": "CreateWebhookConfigurationRequestStorageDestination", + "format": "" + }, + { + "name": "additional_headers", + "baseName": "additional_headers", + "type": "Array", + "format": "" + } +]; +var UpdateWebhookConfigurationRequest = _UpdateWebhookConfigurationRequest; + +// models/User.ts +var _User = class _User { + static getAttributeTypeMap() { + return _User.attributeTypeMap; + } + constructor() { + } +}; +_User.discriminator = void 0; +_User.attributeTypeMap = [ + { + "name": "id", + "baseName": "id", + "type": "string", + "format": "" + }, + { + "name": "name", + "baseName": "name", + "type": "string", + "format": "" + }, + { + "name": "display_name", + "baseName": "display_name", + "type": "string", + "format": "" + }, + { + "name": "visibility", + "baseName": "visibility", + "type": "UserVisibilityEnum", + "format": "" + }, + { + "name": "author_id", + "baseName": "author_id", + "type": "string", + "format": "" + }, + { + "name": "can_change_password", + "baseName": "can_change_password", + "type": "boolean", + "format": "" + }, + { + "name": "complete_detail", + "baseName": "complete_detail", + "type": "boolean", + "format": "" + }, + { + "name": "creation_time_in_millis", + "baseName": "creation_time_in_millis", + "type": "number", + "format": "float" + }, + { + "name": "current_org", + "baseName": "current_org", + "type": "Org", + "format": "" + }, + { + "name": "deleted", + "baseName": "deleted", + "type": "boolean", + "format": "" + }, + { + "name": "deprecated", + "baseName": "deprecated", + "type": "boolean", + "format": "" + }, + { + "name": "account_type", + "baseName": "account_type", + "type": "UserAccountTypeEnum", + "format": "" + }, + { + "name": "account_status", + "baseName": "account_status", + "type": "UserAccountStatusEnum", + "format": "" + }, + { + "name": "email", + "baseName": "email", + "type": "string", + "format": "" + }, + { + "name": "expiration_time_in_millis", + "baseName": "expiration_time_in_millis", + "type": "number", + "format": "float" + }, + { + "name": "external", + "baseName": "external", + "type": "boolean", + "format": "" + }, + { + "name": "favorite_metadata", + "baseName": "favorite_metadata", + "type": "Array", + "format": "" + }, + { + "name": "first_login_time_in_millis", + "baseName": "first_login_time_in_millis", + "type": "number", + "format": "float" + }, + { + "name": "group_mask", + "baseName": "group_mask", + "type": "number", + "format": "int32" + }, + { + "name": "hidden", + "baseName": "hidden", + "type": "boolean", + "format": "" + }, + { + "name": "home_liveboard", + "baseName": "home_liveboard", + "type": "ObjectIDAndName", + "format": "" + }, + { + "name": "incomplete_details", + "baseName": "incomplete_details", + "type": "any", + "format": "" + }, + { + "name": "is_first_login", + "baseName": "is_first_login", + "type": "boolean", + "format": "" + }, + { + "name": "modification_time_in_millis", + "baseName": "modification_time_in_millis", + "type": "number", + "format": "float" + }, + { + "name": "modifier_id", + "baseName": "modifier_id", + "type": "string", + "format": "" + }, + { + "name": "notify_on_share", + "baseName": "notify_on_share", + "type": "boolean", + "format": "" + }, + { + "name": "onboarding_experience_completed", + "baseName": "onboarding_experience_completed", + "type": "boolean", + "format": "" + }, + { + "name": "orgs", + "baseName": "orgs", + "type": "Array", + "format": "" + }, + { + "name": "owner_id", + "baseName": "owner_id", + "type": "string", + "format": "" + }, + { + "name": "parent_type", + "baseName": "parent_type", + "type": "UserParentTypeEnum", + "format": "" + }, + { + "name": "privileges", + "baseName": "privileges", + "type": "Array", + "format": "" + }, + { + "name": "show_onboarding_experience", + "baseName": "show_onboarding_experience", + "type": "boolean", + "format": "" + }, + { + "name": "super_user", + "baseName": "super_user", + "type": "boolean", + "format": "" + }, + { + "name": "system_user", + "baseName": "system_user", + "type": "boolean", + "format": "" + }, + { + "name": "tags", + "baseName": "tags", + "type": "Array", + "format": "" + }, + { + "name": "tenant_id", + "baseName": "tenant_id", + "type": "string", + "format": "" + }, + { + "name": "user_groups", + "baseName": "user_groups", + "type": "Array", + "format": "" + }, + { + "name": "user_inherited_groups", + "baseName": "user_inherited_groups", + "type": "Array", + "format": "" + }, + { + "name": "welcome_email_sent", + "baseName": "welcome_email_sent", + "type": "boolean", + "format": "" + }, + { + "name": "org_privileges", + "baseName": "org_privileges", + "type": "any", + "format": "" + }, + { + "name": "preferred_locale", + "baseName": "preferred_locale", + "type": "string", + "format": "" + }, + { + "name": "use_browser_language", + "baseName": "use_browser_language", + "type": "boolean", + "format": "" + }, + { + "name": "extended_properties", + "baseName": "extended_properties", + "type": "any", + "format": "" + }, + { + "name": "extended_preferences", + "baseName": "extended_preferences", + "type": "any", + "format": "" + }, + { + "name": "user_parameters", + "baseName": "user_parameters", + "type": "any", + "format": "" + }, + { + "name": "access_control_properties", + "baseName": "access_control_properties", + "type": "any", + "format": "" + }, + { + "name": "variable_values", + "baseName": "variable_values", + "type": "any", + "format": "" + } +]; +var User = _User; + +// models/UserGroup.ts +var _UserGroup = class _UserGroup { + static getAttributeTypeMap() { + return _UserGroup.attributeTypeMap; + } + constructor() { + } +}; +_UserGroup.discriminator = void 0; +_UserGroup.attributeTypeMap = [ + { + "name": "id", + "baseName": "id", + "type": "string", + "format": "" + }, + { + "name": "name", + "baseName": "name", + "type": "string", + "format": "" + } +]; +var UserGroup = _UserGroup; + +// models/UserGroupResponse.ts +var _UserGroupResponse = class _UserGroupResponse { + static getAttributeTypeMap() { + return _UserGroupResponse.attributeTypeMap; + } + constructor() { + } +}; +_UserGroupResponse.discriminator = void 0; +_UserGroupResponse.attributeTypeMap = [ + { + "name": "author_id", + "baseName": "author_id", + "type": "string", + "format": "" + }, + { + "name": "complete_detail", + "baseName": "complete_detail", + "type": "boolean", + "format": "" + }, + { + "name": "content", + "baseName": "content", + "type": "any", + "format": "" + }, + { + "name": "creation_time_in_millis", + "baseName": "creation_time_in_millis", + "type": "number", + "format": "float" + }, + { + "name": "default_liveboards", + "baseName": "default_liveboards", + "type": "Array", + "format": "" + }, + { + "name": "deleted", + "baseName": "deleted", + "type": "boolean", + "format": "" + }, + { + "name": "deprecated", + "baseName": "deprecated", + "type": "boolean", + "format": "" + }, + { + "name": "description", + "baseName": "description", + "type": "string", + "format": "" + }, + { + "name": "display_name", + "baseName": "display_name", + "type": "string", + "format": "" + }, + { + "name": "external", + "baseName": "external", + "type": "boolean", + "format": "" + }, + { + "name": "generation_number", + "baseName": "generation_number", + "type": "number", + "format": "int32" + }, + { + "name": "hidden", + "baseName": "hidden", + "type": "boolean", + "format": "" + }, + { + "name": "id", + "baseName": "id", + "type": "string", + "format": "" + }, + { + "name": "index", + "baseName": "index", + "type": "number", + "format": "int32" + }, + { + "name": "index_version", + "baseName": "index_version", + "type": "number", + "format": "int32" + }, + { + "name": "metadata_version", + "baseName": "metadata_version", + "type": "number", + "format": "int32" + }, + { + "name": "modification_time_in_millis", + "baseName": "modification_time_in_millis", + "type": "number", + "format": "float" + }, + { + "name": "modifier_id", + "baseName": "modifier_id", + "type": "string", + "format": "" + }, + { + "name": "name", + "baseName": "name", + "type": "string", + "format": "" + }, + { + "name": "orgs", + "baseName": "orgs", + "type": "Array", + "format": "" + }, + { + "name": "owner_id", + "baseName": "owner_id", + "type": "string", + "format": "" + }, + { + "name": "parent_type", + "baseName": "parent_type", + "type": "UserGroupResponseParentTypeEnum", + "format": "" + }, + { + "name": "privileges", + "baseName": "privileges", + "type": "Array", + "format": "" + }, + { + "name": "sub_groups", + "baseName": "sub_groups", + "type": "Array", + "format": "" + }, + { + "name": "system_group", + "baseName": "system_group", + "type": "boolean", + "format": "" + }, + { + "name": "tags", + "baseName": "tags", + "type": "Array", + "format": "" + }, + { + "name": "type", + "baseName": "type", + "type": "UserGroupResponseTypeEnum", + "format": "" + }, + { + "name": "users", + "baseName": "users", + "type": "Array", + "format": "" + }, + { + "name": "visibility", + "baseName": "visibility", + "type": "UserGroupResponseVisibilityEnum", + "format": "" + }, + { + "name": "roles", + "baseName": "roles", + "type": "Array", + "format": "" + } +]; +var UserGroupResponse = _UserGroupResponse; + +// models/UserInfo.ts +var _UserInfo = class _UserInfo { + static getAttributeTypeMap() { + return _UserInfo.attributeTypeMap; + } + constructor() { + } +}; +_UserInfo.discriminator = void 0; +_UserInfo.attributeTypeMap = [ + { + "name": "id", + "baseName": "id", + "type": "string", + "format": "" + }, + { + "name": "name", + "baseName": "name", + "type": "string", + "format": "" + } +]; +var UserInfo = _UserInfo; + +// models/UserObject.ts +var _UserObject = class _UserObject { + static getAttributeTypeMap() { + return _UserObject.attributeTypeMap; + } + constructor() { + } +}; +_UserObject.discriminator = void 0; +_UserObject.attributeTypeMap = [ + { + "name": "type", + "baseName": "type", + "type": "UserObjectTypeEnum", + "format": "" + }, + { + "name": "identifier", + "baseName": "identifier", + "type": "string", + "format": "" + } +]; +var UserObject = _UserObject; + +// models/UserParameterOptions.ts +var _UserParameterOptions = class _UserParameterOptions { + static getAttributeTypeMap() { + return _UserParameterOptions.attributeTypeMap; + } + constructor() { + } +}; +_UserParameterOptions.discriminator = void 0; +_UserParameterOptions.attributeTypeMap = [ + { + "name": "objects", + "baseName": "objects", + "type": "Array", + "format": "" + }, + { + "name": "runtime_filters", + "baseName": "runtime_filters", + "type": "Array", + "format": "" + }, + { + "name": "runtime_sorts", + "baseName": "runtime_sorts", + "type": "Array", + "format": "" + }, + { + "name": "parameters", + "baseName": "parameters", + "type": "Array", + "format": "" + } +]; +var UserParameterOptions = _UserParameterOptions; + +// models/UserPrincipal.ts +var _UserPrincipal = class _UserPrincipal { + static getAttributeTypeMap() { + return _UserPrincipal.attributeTypeMap; + } + constructor() { + } +}; +_UserPrincipal.discriminator = void 0; +_UserPrincipal.attributeTypeMap = [ + { + "name": "id", + "baseName": "id", + "type": "string", + "format": "" + }, + { + "name": "name", + "baseName": "name", + "type": "string", + "format": "" + }, + { + "name": "type", + "baseName": "type", + "type": "string", + "format": "" + } +]; +var UserPrincipal = _UserPrincipal; + +// models/ValidateCommunicationChannelRequest.ts +var _ValidateCommunicationChannelRequest = class _ValidateCommunicationChannelRequest { + static getAttributeTypeMap() { + return _ValidateCommunicationChannelRequest.attributeTypeMap; + } + constructor() { + } +}; +_ValidateCommunicationChannelRequest.discriminator = void 0; +_ValidateCommunicationChannelRequest.attributeTypeMap = [ + { + "name": "channel_type", + "baseName": "channel_type", + "type": "ValidateCommunicationChannelRequestChannelTypeEnum", + "format": "" + }, + { + "name": "channel_identifier", + "baseName": "channel_identifier", + "type": "string", + "format": "" + }, + { + "name": "event_type", + "baseName": "event_type", + "type": "ValidateCommunicationChannelRequestEventTypeEnum", + "format": "" + } +]; +var ValidateCommunicationChannelRequest = _ValidateCommunicationChannelRequest; + +// models/ValidateMergeRequest.ts +var _ValidateMergeRequest = class _ValidateMergeRequest { + static getAttributeTypeMap() { + return _ValidateMergeRequest.attributeTypeMap; + } + constructor() { + } +}; +_ValidateMergeRequest.discriminator = void 0; +_ValidateMergeRequest.attributeTypeMap = [ + { + "name": "source_branch_name", + "baseName": "source_branch_name", + "type": "string", + "format": "" + }, + { + "name": "target_branch_name", + "baseName": "target_branch_name", + "type": "string", + "format": "" + } +]; +var ValidateMergeRequest = _ValidateMergeRequest; + +// models/ValidateTokenRequest.ts +var _ValidateTokenRequest = class _ValidateTokenRequest { + static getAttributeTypeMap() { + return _ValidateTokenRequest.attributeTypeMap; + } + constructor() { + } +}; +_ValidateTokenRequest.discriminator = void 0; +_ValidateTokenRequest.attributeTypeMap = [ + { + "name": "token", + "baseName": "token", + "type": "string", + "format": "" + } +]; +var ValidateTokenRequest = _ValidateTokenRequest; + +// models/ValueScopeInput.ts +var _ValueScopeInput = class _ValueScopeInput { + static getAttributeTypeMap() { + return _ValueScopeInput.attributeTypeMap; + } + constructor() { + } +}; +_ValueScopeInput.discriminator = void 0; +_ValueScopeInput.attributeTypeMap = [ + { + "name": "org_identifier", + "baseName": "org_identifier", + "type": "string", + "format": "" + }, + { + "name": "principal_type", + "baseName": "principal_type", + "type": "ValueScopeInputPrincipalTypeEnum", + "format": "" + }, + { + "name": "principal_identifier", + "baseName": "principal_identifier", + "type": "string", + "format": "" + }, + { + "name": "model_identifier", + "baseName": "model_identifier", + "type": "string", + "format": "" + } +]; +var ValueScopeInput = _ValueScopeInput; + +// models/Variable.ts +var _Variable = class _Variable { + static getAttributeTypeMap() { + return _Variable.attributeTypeMap; + } + constructor() { + } +}; +_Variable.discriminator = void 0; +_Variable.attributeTypeMap = [ + { + "name": "id", + "baseName": "id", + "type": "string", + "format": "" + }, + { + "name": "name", + "baseName": "name", + "type": "string", + "format": "" + }, + { + "name": "variable_type", + "baseName": "variable_type", + "type": "VariableVariableTypeEnum", + "format": "" + }, + { + "name": "sensitive", + "baseName": "sensitive", + "type": "boolean", + "format": "" + }, + { + "name": "values", + "baseName": "values", + "type": "Array", + "format": "" + }, + { + "name": "org", + "baseName": "org", + "type": "VariableOrgInfo", + "format": "" + } +]; +var Variable = _Variable; + +// models/VariableDetailInput.ts +var _VariableDetailInput = class _VariableDetailInput { + static getAttributeTypeMap() { + return _VariableDetailInput.attributeTypeMap; + } + constructor() { + } +}; +_VariableDetailInput.discriminator = void 0; +_VariableDetailInput.attributeTypeMap = [ + { + "name": "identifier", + "baseName": "identifier", + "type": "string", + "format": "" + }, + { + "name": "type", + "baseName": "type", + "type": "VariableDetailInputTypeEnum", + "format": "" + }, + { + "name": "name_pattern", + "baseName": "name_pattern", + "type": "string", + "format": "" + } +]; +var VariableDetailInput = _VariableDetailInput; + +// models/VariableOrgInfo.ts +var _VariableOrgInfo = class _VariableOrgInfo { + static getAttributeTypeMap() { + return _VariableOrgInfo.attributeTypeMap; + } + constructor() { + } +}; +_VariableOrgInfo.discriminator = void 0; +_VariableOrgInfo.attributeTypeMap = [ + { + "name": "id", + "baseName": "id", + "type": "number", + "format": "int32" + }, + { + "name": "name", + "baseName": "name", + "type": "string", + "format": "" + } +]; +var VariableOrgInfo = _VariableOrgInfo; + +// models/VariablePutAssignmentInput.ts +var _VariablePutAssignmentInput = class _VariablePutAssignmentInput { + static getAttributeTypeMap() { + return _VariablePutAssignmentInput.attributeTypeMap; + } + constructor() { + } +}; +_VariablePutAssignmentInput.discriminator = void 0; +_VariablePutAssignmentInput.attributeTypeMap = [ + { + "name": "assigned_values", + "baseName": "assigned_values", + "type": "Array", + "format": "" + }, + { + "name": "org_identifier", + "baseName": "org_identifier", + "type": "string", + "format": "" + }, + { + "name": "principal_type", + "baseName": "principal_type", + "type": "VariablePutAssignmentInputPrincipalTypeEnum", + "format": "" + }, + { + "name": "principal_identifier", + "baseName": "principal_identifier", + "type": "string", + "format": "" + }, + { + "name": "model_identifier", + "baseName": "model_identifier", + "type": "string", + "format": "" + }, + { + "name": "priority", + "baseName": "priority", + "type": "number", + "format": "int32" + } +]; +var VariablePutAssignmentInput = _VariablePutAssignmentInput; + +// models/VariableUpdateAssignmentInput.ts +var _VariableUpdateAssignmentInput = class _VariableUpdateAssignmentInput { + static getAttributeTypeMap() { + return _VariableUpdateAssignmentInput.attributeTypeMap; + } + constructor() { + } +}; +_VariableUpdateAssignmentInput.discriminator = void 0; +_VariableUpdateAssignmentInput.attributeTypeMap = [ + { + "name": "variable_identifier", + "baseName": "variable_identifier", + "type": "string", + "format": "" + }, + { + "name": "variable_values", + "baseName": "variable_values", + "type": "Array", + "format": "" + }, + { + "name": "operation", + "baseName": "operation", + "type": "VariableUpdateAssignmentInputOperationEnum", + "format": "" + } +]; +var VariableUpdateAssignmentInput = _VariableUpdateAssignmentInput; + +// models/VariableUpdateScopeInput.ts +var _VariableUpdateScopeInput = class _VariableUpdateScopeInput { + static getAttributeTypeMap() { + return _VariableUpdateScopeInput.attributeTypeMap; + } + constructor() { + } +}; +_VariableUpdateScopeInput.discriminator = void 0; +_VariableUpdateScopeInput.attributeTypeMap = [ + { + "name": "org_identifier", + "baseName": "org_identifier", + "type": "string", + "format": "" + }, + { + "name": "principal_type", + "baseName": "principal_type", + "type": "VariableUpdateScopeInputPrincipalTypeEnum", + "format": "" + }, + { + "name": "principal_identifier", + "baseName": "principal_identifier", + "type": "string", + "format": "" + }, + { + "name": "model_identifier", + "baseName": "model_identifier", + "type": "string", + "format": "" + }, + { + "name": "priority", + "baseName": "priority", + "type": "number", + "format": "int32" + } +]; +var VariableUpdateScopeInput = _VariableUpdateScopeInput; + +// models/VariableValue.ts +var _VariableValue = class _VariableValue { + static getAttributeTypeMap() { + return _VariableValue.attributeTypeMap; + } + constructor() { + } +}; +_VariableValue.discriminator = void 0; +_VariableValue.attributeTypeMap = [ + { + "name": "value", + "baseName": "value", + "type": "string", + "format": "" + }, + { + "name": "value_list", + "baseName": "value_list", + "type": "Array", + "format": "" + }, + { + "name": "org_identifier", + "baseName": "org_identifier", + "type": "string", + "format": "" + }, + { + "name": "principal_type", + "baseName": "principal_type", + "type": "VariableValuePrincipalTypeEnum", + "format": "" + }, + { + "name": "principal_identifier", + "baseName": "principal_identifier", + "type": "string", + "format": "" + }, + { + "name": "model_identifier", + "baseName": "model_identifier", + "type": "string", + "format": "" + }, + { + "name": "priority", + "baseName": "priority", + "type": "number", + "format": "int32" + } +]; +var VariableValue = _VariableValue; + +// models/VariableValues.ts +var _VariableValues = class _VariableValues { + static getAttributeTypeMap() { + return _VariableValues.attributeTypeMap; + } + constructor() { + } +}; +_VariableValues.discriminator = void 0; +_VariableValues.attributeTypeMap = [ + { + "name": "name", + "baseName": "name", + "type": "string", + "format": "" + }, + { + "name": "values", + "baseName": "values", + "type": "Array", + "format": "" + } +]; +var VariableValues = _VariableValues; + +// models/WebhookAuthApiKey.ts +var _WebhookAuthApiKey = class _WebhookAuthApiKey { + static getAttributeTypeMap() { + return _WebhookAuthApiKey.attributeTypeMap; + } + constructor() { + } +}; +_WebhookAuthApiKey.discriminator = void 0; +_WebhookAuthApiKey.attributeTypeMap = [ + { + "name": "key", + "baseName": "key", + "type": "string", + "format": "" + }, + { + "name": "value", + "baseName": "value", + "type": "string", + "format": "" + } +]; +var WebhookAuthApiKey = _WebhookAuthApiKey; + +// models/WebhookAuthApiKeyInput.ts +var _WebhookAuthApiKeyInput = class _WebhookAuthApiKeyInput { + static getAttributeTypeMap() { + return _WebhookAuthApiKeyInput.attributeTypeMap; + } + constructor() { + } +}; +_WebhookAuthApiKeyInput.discriminator = void 0; +_WebhookAuthApiKeyInput.attributeTypeMap = [ + { + "name": "key", + "baseName": "key", + "type": "string", + "format": "" + }, + { + "name": "value", + "baseName": "value", + "type": "string", + "format": "" + } +]; +var WebhookAuthApiKeyInput = _WebhookAuthApiKeyInput; + +// models/WebhookAuthBasicAuth.ts +var _WebhookAuthBasicAuth = class _WebhookAuthBasicAuth { + static getAttributeTypeMap() { + return _WebhookAuthBasicAuth.attributeTypeMap; + } + constructor() { + } +}; +_WebhookAuthBasicAuth.discriminator = void 0; +_WebhookAuthBasicAuth.attributeTypeMap = [ + { + "name": "username", + "baseName": "username", + "type": "string", + "format": "" + }, + { + "name": "password", + "baseName": "password", + "type": "string", + "format": "" + } +]; +var WebhookAuthBasicAuth = _WebhookAuthBasicAuth; + +// models/WebhookAuthBasicAuthInput.ts +var _WebhookAuthBasicAuthInput = class _WebhookAuthBasicAuthInput { + static getAttributeTypeMap() { + return _WebhookAuthBasicAuthInput.attributeTypeMap; + } + constructor() { + } +}; +_WebhookAuthBasicAuthInput.discriminator = void 0; +_WebhookAuthBasicAuthInput.attributeTypeMap = [ + { + "name": "username", + "baseName": "username", + "type": "string", + "format": "" + }, + { + "name": "password", + "baseName": "password", + "type": "string", + "format": "" + } +]; +var WebhookAuthBasicAuthInput = _WebhookAuthBasicAuthInput; + +// models/WebhookAuthOAuth2.ts +var _WebhookAuthOAuth2 = class _WebhookAuthOAuth2 { + static getAttributeTypeMap() { + return _WebhookAuthOAuth2.attributeTypeMap; + } + constructor() { + } +}; +_WebhookAuthOAuth2.discriminator = void 0; +_WebhookAuthOAuth2.attributeTypeMap = [ + { + "name": "authorization_url", + "baseName": "authorization_url", + "type": "string", + "format": "" + }, + { + "name": "client_id", + "baseName": "client_id", + "type": "string", + "format": "" + }, + { + "name": "client_secret", + "baseName": "client_secret", + "type": "string", + "format": "" + } +]; +var WebhookAuthOAuth2 = _WebhookAuthOAuth2; + +// models/WebhookAuthOAuth2Input.ts +var _WebhookAuthOAuth2Input = class _WebhookAuthOAuth2Input { + static getAttributeTypeMap() { + return _WebhookAuthOAuth2Input.attributeTypeMap; + } + constructor() { + } +}; +_WebhookAuthOAuth2Input.discriminator = void 0; +_WebhookAuthOAuth2Input.attributeTypeMap = [ + { + "name": "authorization_url", + "baseName": "authorization_url", + "type": "string", + "format": "" + }, + { + "name": "client_id", + "baseName": "client_id", + "type": "string", + "format": "" + }, + { + "name": "client_secret", + "baseName": "client_secret", + "type": "string", + "format": "" + } +]; +var WebhookAuthOAuth2Input = _WebhookAuthOAuth2Input; + +// models/WebhookAuthentication.ts +var _WebhookAuthentication = class _WebhookAuthentication { + static getAttributeTypeMap() { + return _WebhookAuthentication.attributeTypeMap; + } + constructor() { + } +}; +_WebhookAuthentication.discriminator = void 0; +_WebhookAuthentication.attributeTypeMap = [ + { + "name": "API_KEY", + "baseName": "API_KEY", + "type": "WebhookAuthApiKey", + "format": "" + }, + { + "name": "BASIC_AUTH", + "baseName": "BASIC_AUTH", + "type": "WebhookAuthBasicAuth", + "format": "" + }, + { + "name": "BEARER_TOKEN", + "baseName": "BEARER_TOKEN", + "type": "string", + "format": "" + }, + { + "name": "OAUTH2", + "baseName": "OAUTH2", + "type": "WebhookAuthOAuth2", + "format": "" + } +]; +var WebhookAuthentication = _WebhookAuthentication; + +// models/WebhookAuthenticationInput.ts +var _WebhookAuthenticationInput = class _WebhookAuthenticationInput { + static getAttributeTypeMap() { + return _WebhookAuthenticationInput.attributeTypeMap; + } + constructor() { + } +}; +_WebhookAuthenticationInput.discriminator = void 0; +_WebhookAuthenticationInput.attributeTypeMap = [ + { + "name": "API_KEY", + "baseName": "API_KEY", + "type": "WebhookAuthApiKeyInput", + "format": "" + }, + { + "name": "BASIC_AUTH", + "baseName": "BASIC_AUTH", + "type": "WebhookAuthBasicAuthInput", + "format": "" + }, + { + "name": "BEARER_TOKEN", + "baseName": "BEARER_TOKEN", + "type": "string", + "format": "" + }, + { + "name": "OAUTH2", + "baseName": "OAUTH2", + "type": "WebhookAuthOAuth2Input", + "format": "" + } +]; +var WebhookAuthenticationInput = _WebhookAuthenticationInput; + +// models/WebhookDeleteFailure.ts +var _WebhookDeleteFailure = class _WebhookDeleteFailure { + static getAttributeTypeMap() { + return _WebhookDeleteFailure.attributeTypeMap; + } + constructor() { + } +}; +_WebhookDeleteFailure.discriminator = void 0; +_WebhookDeleteFailure.attributeTypeMap = [ + { + "name": "id", + "baseName": "id", + "type": "string", + "format": "" + }, + { + "name": "name", + "baseName": "name", + "type": "string", + "format": "" + }, + { + "name": "error", + "baseName": "error", + "type": "string", + "format": "" + } +]; +var WebhookDeleteFailure = _WebhookDeleteFailure; + +// models/WebhookDeleteResponse.ts +var _WebhookDeleteResponse = class _WebhookDeleteResponse { + static getAttributeTypeMap() { + return _WebhookDeleteResponse.attributeTypeMap; + } + constructor() { + } +}; +_WebhookDeleteResponse.discriminator = void 0; +_WebhookDeleteResponse.attributeTypeMap = [ + { + "name": "deleted_count", + "baseName": "deleted_count", + "type": "number", + "format": "int32" + }, + { + "name": "failed_count", + "baseName": "failed_count", + "type": "number", + "format": "int32" + }, + { + "name": "deleted_webhooks", + "baseName": "deleted_webhooks", + "type": "Array", + "format": "" + }, + { + "name": "failed_webhooks", + "baseName": "failed_webhooks", + "type": "Array", + "format": "" + } +]; +var WebhookDeleteResponse = _WebhookDeleteResponse; + +// models/WebhookKeyValuePair.ts +var _WebhookKeyValuePair = class _WebhookKeyValuePair { + static getAttributeTypeMap() { + return _WebhookKeyValuePair.attributeTypeMap; + } + constructor() { + } +}; +_WebhookKeyValuePair.discriminator = void 0; +_WebhookKeyValuePair.attributeTypeMap = [ + { + "name": "key", + "baseName": "key", + "type": "string", + "format": "" + }, + { + "name": "value", + "baseName": "value", + "type": "string", + "format": "" + } +]; +var WebhookKeyValuePair = _WebhookKeyValuePair; + +// models/WebhookKeyValuePairInput.ts +var _WebhookKeyValuePairInput = class _WebhookKeyValuePairInput { + static getAttributeTypeMap() { + return _WebhookKeyValuePairInput.attributeTypeMap; + } + constructor() { + } +}; +_WebhookKeyValuePairInput.discriminator = void 0; +_WebhookKeyValuePairInput.attributeTypeMap = [ + { + "name": "key", + "baseName": "key", + "type": "string", + "format": "" + }, + { + "name": "value", + "baseName": "value", + "type": "string", + "format": "" + } +]; +var WebhookKeyValuePairInput = _WebhookKeyValuePairInput; + +// models/WebhookOrg.ts +var _WebhookOrg = class _WebhookOrg { + static getAttributeTypeMap() { + return _WebhookOrg.attributeTypeMap; + } + constructor() { + } +}; +_WebhookOrg.discriminator = void 0; +_WebhookOrg.attributeTypeMap = [ + { + "name": "id", + "baseName": "id", + "type": "string", + "format": "" + }, + { + "name": "name", + "baseName": "name", + "type": "string", + "format": "" + } +]; +var WebhookOrg = _WebhookOrg; + +// models/WebhookPagination.ts +var _WebhookPagination = class _WebhookPagination { + static getAttributeTypeMap() { + return _WebhookPagination.attributeTypeMap; + } + constructor() { + } +}; +_WebhookPagination.discriminator = void 0; +_WebhookPagination.attributeTypeMap = [ + { + "name": "record_offset", + "baseName": "record_offset", + "type": "number", + "format": "int32" + }, + { + "name": "record_size", + "baseName": "record_size", + "type": "number", + "format": "int32" + }, + { + "name": "total_count", + "baseName": "total_count", + "type": "number", + "format": "int32" + }, + { + "name": "has_more", + "baseName": "has_more", + "type": "boolean", + "format": "" + } +]; +var WebhookPagination = _WebhookPagination; + +// models/WebhookResponse.ts +var _WebhookResponse = class _WebhookResponse { + static getAttributeTypeMap() { + return _WebhookResponse.attributeTypeMap; + } + constructor() { + } +}; +_WebhookResponse.discriminator = void 0; +_WebhookResponse.attributeTypeMap = [ + { + "name": "id", + "baseName": "id", + "type": "string", + "format": "" + }, + { + "name": "name", + "baseName": "name", + "type": "string", + "format": "" + }, + { + "name": "description", + "baseName": "description", + "type": "string", + "format": "" + }, + { + "name": "org", + "baseName": "org", + "type": "WebhookOrg", + "format": "" + }, + { + "name": "url", + "baseName": "url", + "type": "string", + "format": "" + }, + { + "name": "url_params", + "baseName": "url_params", + "type": "any", + "format": "" + }, + { + "name": "events", + "baseName": "events", + "type": "Array", + "format": "" + }, + { + "name": "authentication", + "baseName": "authentication", + "type": "WebhookAuthentication", + "format": "" + }, + { + "name": "signature_verification", + "baseName": "signature_verification", + "type": "WebhookSignatureVerification", + "format": "" + }, + { + "name": "additional_headers", + "baseName": "additional_headers", + "type": "Array", + "format": "" + }, + { + "name": "creation_time_in_millis", + "baseName": "creation_time_in_millis", + "type": "number", + "format": "float" + }, + { + "name": "modification_time_in_millis", + "baseName": "modification_time_in_millis", + "type": "number", + "format": "float" + }, + { + "name": "created_by", + "baseName": "created_by", + "type": "WebhookUser", + "format": "" + }, + { + "name": "last_modified_by", + "baseName": "last_modified_by", + "type": "WebhookUser", + "format": "" + }, + { + "name": "storage_destination", + "baseName": "storage_destination", + "type": "StorageDestination", + "format": "" + } +]; +var WebhookResponse = _WebhookResponse; + +// models/WebhookSearchResponse.ts +var _WebhookSearchResponse = class _WebhookSearchResponse { + static getAttributeTypeMap() { + return _WebhookSearchResponse.attributeTypeMap; + } + constructor() { + } +}; +_WebhookSearchResponse.discriminator = void 0; +_WebhookSearchResponse.attributeTypeMap = [ + { + "name": "webhooks", + "baseName": "webhooks", + "type": "Array", + "format": "" + }, + { + "name": "pagination", + "baseName": "pagination", + "type": "WebhookPagination", + "format": "" + } +]; +var WebhookSearchResponse = _WebhookSearchResponse; + +// models/WebhookSignatureVerification.ts +var _WebhookSignatureVerification = class _WebhookSignatureVerification { + static getAttributeTypeMap() { + return _WebhookSignatureVerification.attributeTypeMap; + } + constructor() { + } +}; +_WebhookSignatureVerification.discriminator = void 0; +_WebhookSignatureVerification.attributeTypeMap = [ + { + "name": "type", + "baseName": "type", + "type": "WebhookSignatureVerificationTypeEnum", + "format": "" + }, + { + "name": "header", + "baseName": "header", + "type": "string", + "format": "" + }, + { + "name": "algorithm", + "baseName": "algorithm", + "type": "WebhookSignatureVerificationAlgorithmEnum", + "format": "" + }, + { + "name": "secret", + "baseName": "secret", + "type": "string", + "format": "" + } +]; +var WebhookSignatureVerification = _WebhookSignatureVerification; + +// models/WebhookSignatureVerificationInput.ts +var _WebhookSignatureVerificationInput = class _WebhookSignatureVerificationInput { + static getAttributeTypeMap() { + return _WebhookSignatureVerificationInput.attributeTypeMap; + } + constructor() { + } +}; +_WebhookSignatureVerificationInput.discriminator = void 0; +_WebhookSignatureVerificationInput.attributeTypeMap = [ + { + "name": "type", + "baseName": "type", + "type": "WebhookSignatureVerificationInputTypeEnum", + "format": "" + }, + { + "name": "header", + "baseName": "header", + "type": "string", + "format": "" + }, + { + "name": "algorithm", + "baseName": "algorithm", + "type": "WebhookSignatureVerificationInputAlgorithmEnum", + "format": "" + }, + { + "name": "secret", + "baseName": "secret", + "type": "string", + "format": "" + } +]; +var WebhookSignatureVerificationInput = _WebhookSignatureVerificationInput; + +// models/WebhookSortOptionsInput.ts +var _WebhookSortOptionsInput = class _WebhookSortOptionsInput { + static getAttributeTypeMap() { + return _WebhookSortOptionsInput.attributeTypeMap; + } + constructor() { + } +}; +_WebhookSortOptionsInput.discriminator = void 0; +_WebhookSortOptionsInput.attributeTypeMap = [ + { + "name": "field_name", + "baseName": "field_name", + "type": "WebhookSortOptionsInputFieldNameEnum", + "format": "" + }, + { + "name": "order", + "baseName": "order", + "type": "WebhookSortOptionsInputOrderEnum", + "format": "" + } +]; +var WebhookSortOptionsInput = _WebhookSortOptionsInput; + +// models/WebhookUser.ts +var _WebhookUser = class _WebhookUser { + static getAttributeTypeMap() { + return _WebhookUser.attributeTypeMap; + } + constructor() { + } +}; +_WebhookUser.discriminator = void 0; +_WebhookUser.attributeTypeMap = [ + { + "name": "id", + "baseName": "id", + "type": "string", + "format": "" + }, + { + "name": "name", + "baseName": "name", + "type": "string", + "format": "" + } +]; +var WebhookUser = _WebhookUser; + +// middleware.ts +var PromiseMiddlewareWrapper = class { + constructor(middleware) { + this.middleware = middleware; + } + pre(context) { + return from(this.middleware.pre(context)); + } + post(context) { + return from(this.middleware.post(context)); + } +}; + +// servers.ts +var ServerConfiguration = class { + constructor(url, variableConfiguration) { + this.url = url; + this.variableConfiguration = variableConfiguration; + } + /** + * Sets the value of the variables of this server. Variables are included in + * the `url` of this ServerConfiguration in the form `{variableName}` + * + * @param variableConfiguration a partial variable configuration for the + * variables contained in the url + */ + setVariables(variableConfiguration) { + Object.assign(this.variableConfiguration, variableConfiguration); + } + getConfiguration() { + return this.variableConfiguration; + } + getUrl() { + let replacedUrl = this.url; + for (const key in this.variableConfiguration) { + var re = new RegExp("{" + key + "}", "g"); + replacedUrl = replacedUrl.replace(re, this.variableConfiguration[key]); + } + return replacedUrl; + } + /** + * Creates a new request context for this server using the url with variables + * replaced with their respective values and the endpoint of the request appended. + * + * @param endpoint the endpoint to be queried on the server + * @param httpMethod httpMethod to be used + * + */ + makeRequestContext(endpoint, httpMethod) { + return new RequestContext2(this.getUrl() + endpoint, httpMethod); + } +}; +var server1 = new ServerConfiguration("{base-url}", { "base-url": "https://localhost:443" }); +var servers = [server1]; + +// configuration.ts +function createConfiguration(conf = {}) { + const configuration = { + baseServer: conf.baseServer !== void 0 ? conf.baseServer : server1, + httpApi: conf.httpApi || new IsomorphicFetchHttpLibrary(), + middleware: conf.middleware || [], + authMethods: configureAuthMethods(conf.authMethods) + }; + if (conf.promiseMiddleware) { + conf.promiseMiddleware.forEach( + (m) => configuration.middleware.push(new PromiseMiddlewareWrapper(m)) + ); + } + return configuration; +} + +// apis/exception.ts +var ApiException = class extends Error { + constructor(code, message, body, headers) { + super("HTTP-Code: " + code + "\nMessage: " + message + "\nBody: " + JSON.stringify(body) + "\nHeaders: " + JSON.stringify(headers)); + this.code = code; + this.body = body; + this.headers = headers; + } +}; + +// apis/baseapi.ts +var BaseAPIRequestFactory = class { + constructor(configuration) { + this.configuration = configuration; + } +}; +var RequiredError = class extends Error { + constructor(api, method, field) { + super("Required parameter " + field + " was null or undefined when calling " + api + "." + method + "."); + this.api = api; + this.method = method; + this.field = field; + this.name = "RequiredError"; + } +}; + +// models/ObjectSerializer.ts +var primitives = [ + "string", + "boolean", + "double", + "integer", + "long", + "float", + "number", + "any" +]; +var supportedMediaTypes = { + "application/json": Infinity, + "application/octet-stream": 0, + "application/x-www-form-urlencoded": 0 +}; +var enumsMap = /* @__PURE__ */ new Set([ + "ActionConfigInputPositionEnum", + "ActionConfigInputCreatePositionEnum", + "AssociateMetadataInputTypeEnum", + "AssociateMetadataInputCreateTypeEnum", + "AuthClusterPreferencesAuthStatusEnum", + "AuthClusterPreferencesInputAuthStatusEnum", + "AuthOrgPreferenceAuthStatusEnum", + "AuthOrgPreferenceInputAuthStatusEnum", + "AuthorMetadataTypeInputTypeEnum", + "ChannelHistoryEventInfoTypeEnum", + "ChannelHistoryEventInputTypeEnum", + "ChannelHistoryJobStatusEnum", + "ChannelValidationDetailValidationStepEnum", + "ChannelValidationDetailStatusEnum", + "CollectionMetadataInputTypeEnum", + "ColumnSecurityRuleGroupOperationOperationEnum", + "CommunicationChannelValidateResponseChannelTypeEnum", + "CommunicationChannelValidateResponseEventTypeEnum", + "CommunicationChannelValidateResponseResultCodeEnum", + "ConfigureAuthSettingsRequestAuthTypeEnum", + "ConfigureAuthSettingsRequestClusterPreferencesAuthStatusEnum", + "ConnectionConfigurationResponsePolicyProcessesEnum", + "ConnectionConfigurationResponseDataWarehouseTypeEnum", + "ConnectionConfigurationResponsePolicyTypeEnum", + "ConnectionConfigurationSearchRequestPolicyTypeEnum", + "ContextPayloadV2InputTypeEnum", + "CopyObjectRequestTypeEnum", + "CreateAgentConversationRequestMetadataContextTypeEnum", + "CreateCalendarRequestCreationMethodEnum", + "CreateCalendarRequestCalendarTypeEnum", + "CreateCalendarRequestMonthOffsetEnum", + "CreateCalendarRequestStartDayOfWeekEnum", + "CreateConnectionConfigurationRequestAuthenticationTypeEnum", + "CreateConnectionConfigurationRequestPolicyTypeEnum", + "CreateConnectionConfigurationRequestPolicyProcessesEnum", + "CreateConnectionRequestDataWarehouseTypeEnum", + "CreateConnectionResponseDataWarehouseTypeEnum", + "CreateRoleRequestPrivilegesEnum", + "CreateScheduleRequestMetadataTypeEnum", + "CreateScheduleRequestFileFormatEnum", + "CreateScheduleRequestTimeZoneEnum", + "CreateScheduleRequestPdfOptionsPageSizeEnum", + "CreateUserGroupRequestPrivilegesEnum", + "CreateUserGroupRequestTypeEnum", + "CreateUserGroupRequestVisibilityEnum", + "CreateUserRequestAccountTypeEnum", + "CreateUserRequestAccountStatusEnum", + "CreateUserRequestVisibilityEnum", + "CreateUserRequestPreferredLocaleEnum", + "CreateVariableRequestTypeEnum", + "CreateVariableRequestDataTypeEnum", + "CreateWebhookConfigurationRequestEventsEnum", + "CreateWebhookConfigurationRequestSignatureVerificationTypeEnum", + "CreateWebhookConfigurationRequestSignatureVerificationAlgorithmEnum", + "CreateWebhookConfigurationRequestStorageDestinationStorageTypeEnum", + "CustomActionMetadataTypeInputTypeEnum", + "DeleteMetadataTypeInputTypeEnum", + "DeployCommitRequestDeployTypeEnum", + "DeployCommitRequestDeployPolicyEnum", + "EventChannelConfigEventTypeEnum", + "EventChannelConfigChannelsEnum", + "EventChannelConfigInputEventTypeEnum", + "EventChannelConfigInputChannelsEnum", + "ExcludeMetadataListItemInputTypeEnum", + "ExportAnswerReportRequestFileFormatEnum", + "ExportAnswerReportRequestTypeEnum", + "ExportAnswerReportRequestRegionalSettingsCurrencyFormatEnum", + "ExportAnswerReportRequestRegionalSettingsUserLocaleEnum", + "ExportAnswerReportRequestRegionalSettingsNumberFormatLocaleEnum", + "ExportAnswerReportRequestRegionalSettingsDateFormatLocaleEnum", + "ExportLiveboardReportRequestFileFormatEnum", + "ExportLiveboardReportRequestPdfOptionsPageSizeEnum", + "ExportLiveboardReportRequestPdfOptionsPageOrientationEnum", + "ExportMetadataTMLBatchedRequestMetadataTypeEnum", + "ExportMetadataTMLBatchedRequestEdocFormatEnum", + "ExportMetadataTMLRequestEdocFormatEnum", + "ExportMetadataTMLRequestExportSchemaVersionEnum", + "ExportMetadataTypeInputTypeEnum", + "FavoriteMetadataInputTypeEnum", + "FavoriteMetadataItemTypeEnum", + "FetchAnswerDataRequestDataFormatEnum", + "FetchAsyncImportTaskStatusRequestTaskStatusEnum", + "FetchLiveboardDataRequestDataFormatEnum", + "FetchLogsRequestLogTypeEnum", + "FetchPermissionsOfPrincipalsRequestDefaultMetadataTypeEnum", + "FilterRulesOperatorEnum", + "GenerateCSVRequestCalendarTypeEnum", + "GenerateCSVRequestMonthOffsetEnum", + "GenerateCSVRequestStartDayOfWeekEnum", + "GetCustomAccessTokenRequestPersistOptionEnum", + "GroupsImportListInputPrivilegesEnum", + "GroupsImportListInputTypeEnum", + "GroupsImportListInputVisibilityEnum", + "HeaderUpdateInputTypeEnum", + "ImportEPackAsyncTaskStatusTaskStatusEnum", + "ImportEPackAsyncTaskStatusImportPolicyEnum", + "ImportMetadataTMLAsyncRequestImportPolicyEnum", + "ImportMetadataTMLRequestImportPolicyEnum", + "ImportUserAccountTypeEnum", + "ImportUserAccountStatusEnum", + "ImportUserVisibilityEnum", + "ImportUserPreferredLocaleEnum", + "JWTMetadataObjectTypeEnum", + "JobRecipientTypeEnum", + "ManageObjectPrivilegeRequestOperationEnum", + "ManageObjectPrivilegeRequestMetadataTypeEnum", + "ManageObjectPrivilegeRequestObjectPrivilegeTypesEnum", + "MetadataInputTypeEnum", + "MetadataListItemInputTypeEnum", + "MetadataListItemInputSubtypesEnum", + "MetadataObjectTypeEnum", + "MetadataResponseTypeEnum", + "MetadataSearchResponseMetadataTypeEnum", + "MetadataSearchSortOptionsFieldNameEnum", + "MetadataSearchSortOptionsOrderEnum", + "NLInstructionsInfoScopeEnum", + "NLInstructionsInfoInputScopeEnum", + "ObjectPrivilegesMetadataInputTypeEnum", + "OrgChannelConfigInputOperationEnum", + "OrgChannelConfigInputResetEventsEnum", + "OrgPreferenceSearchCriteriaInputEventTypesEnum", + "OrgResponseStatusEnum", + "OrgResponseVisibilityEnum", + "ParameterizeMetadataFieldsRequestMetadataTypeEnum", + "ParameterizeMetadataFieldsRequestFieldTypeEnum", + "ParameterizeMetadataRequestMetadataTypeEnum", + "ParameterizeMetadataRequestFieldTypeEnum", + "PdfOptionsPageSizeEnum", + "PdfOptionsInputPageSizeEnum", + "PdfOptionsInputPageOrientationEnum", + "PermissionInputShareModeEnum", + "PermissionsMetadataTypeInputTypeEnum", + "PrincipalsInputTypeEnum", + "PublishMetadataListItemTypeEnum", + "PutVariableValuesRequestOperationEnum", + "RegionalSettingsInputCurrencyFormatEnum", + "RegionalSettingsInputUserLocaleEnum", + "RegionalSettingsInputNumberFormatLocaleEnum", + "RegionalSettingsInputDateFormatLocaleEnum", + "ResponseMessageMessageTypeEnum", + "ResponseMessageVisualizationTypeEnum", + "RevertCommitRequestRevertPolicyEnum", + "RoleResponsePrivilegesEnum", + "RoleResponsePermissionEnum", + "RuntimeFiltersOperatorEnum", + "RuntimeSortsOrderEnum", + "SchedulesPdfOptionsInputPageSizeEnum", + "SearchAuthSettingsRequestAuthTypeEnum", + "SearchAuthSettingsRequestScopeEnum", + "SearchAuthSettingsResponseAuthTypeEnum", + "SearchCalendarsRequestSortOptionsFieldNameEnum", + "SearchCalendarsRequestSortOptionsOrderEnum", + "SearchChannelHistoryRequestChannelTypeEnum", + "SearchChannelHistoryRequestChannelStatusEnum", + "SearchCollectionsRequestSortOptionsFieldNameEnum", + "SearchCollectionsRequestSortOptionsOrderEnum", + "SearchCommitsRequestMetadataTypeEnum", + "SearchCommunicationChannelPreferencesRequestClusterPreferencesEnum", + "SearchConnectionRequestDataWarehouseTypesEnum", + "SearchConnectionRequestDataWarehouseObjectTypeEnum", + "SearchConnectionRequestAuthenticationTypeEnum", + "SearchConnectionRequestSortOptionsFieldNameEnum", + "SearchConnectionRequestSortOptionsOrderEnum", + "SearchConnectionResponseDataWarehouseTypeEnum", + "SearchCustomActionsRequestTypeEnum", + "SearchDataRequestDataFormatEnum", + "SearchMetadataRequestDependentObjectVersionEnum", + "SearchMetadataRequestLiveboardResponseVersionEnum", + "SearchMetadataRequestSortOptionsFieldNameEnum", + "SearchMetadataRequestSortOptionsOrderEnum", + "SearchOrgsRequestVisibilityEnum", + "SearchOrgsRequestStatusEnum", + "SearchRoleResponsePrivilegesEnum", + "SearchRoleResponsePermissionEnum", + "SearchRolesRequestPrivilegesEnum", + "SearchRolesRequestPermissionsEnum", + "SearchSecuritySettingsRequestScopeEnum", + "SearchUserGroupsRequestPrivilegesEnum", + "SearchUserGroupsRequestTypeEnum", + "SearchUserGroupsRequestVisibilityEnum", + "SearchUserGroupsRequestSortOptionsFieldNameEnum", + "SearchUserGroupsRequestSortOptionsOrderEnum", + "SearchUsersRequestVisibilityEnum", + "SearchUsersRequestPrivilegesEnum", + "SearchUsersRequestAccountTypeEnum", + "SearchUsersRequestAccountStatusEnum", + "SearchVariablesRequestResponseContentEnum", + "SearchWebhookConfigurationsRequestEventTypeEnum", + "SearchWebhookConfigurationsRequestSortOptionsFieldNameEnum", + "SearchWebhookConfigurationsRequestSortOptionsOrderEnum", + "SecuritySettingsClusterPreferencesTrustedAuthStatusEnum", + "SecuritySettingsOrgPreferencesTrustedAuthStatusEnum", + "ShareMetadataRequestMetadataTypeEnum", + "ShareMetadataTypeInputTypeEnum", + "SharePermissionsInputShareModeEnum", + "SharePermissionsInputContentShareModeEnum", + "SortOptionFieldNameEnum", + "SortOptionOrderEnum", + "SortOptionInputFieldNameEnum", + "SortOptionInputOrderEnum", + "SortOptionsFieldNameEnum", + "SortOptionsOrderEnum", + "SqlQueryResponseMetadataTypeEnum", + "StorageDestinationStorageTypeEnum", + "StorageDestinationInputStorageTypeEnum", + "SyncMetadataRequestSyncAttributesEnum", + "SyncMetadataResponseStatusEnum", + "TagMetadataTypeInputTypeEnum", + "TokenAccessScopeObjectTypeEnum", + "UnparameterizeMetadataRequestMetadataTypeEnum", + "UnparameterizeMetadataRequestFieldTypeEnum", + "UpdateCalendarRequestUpdateMethodEnum", + "UpdateCalendarRequestCalendarTypeEnum", + "UpdateCalendarRequestMonthOffsetEnum", + "UpdateCalendarRequestStartDayOfWeekEnum", + "UpdateCollectionRequestOperationEnum", + "UpdateConnectionConfigurationRequestAuthenticationTypeEnum", + "UpdateConnectionConfigurationRequestPolicyTypeEnum", + "UpdateConnectionConfigurationRequestPolicyProcessesEnum", + "UpdateConnectionStatusRequestStatusEnum", + "UpdateCustomActionRequestOperationEnum", + "UpdateObjIdInputTypeEnum", + "UpdateOrgRequestOperationEnum", + "UpdateRoleRequestPrivilegesEnum", + "UpdateScheduleRequestMetadataTypeEnum", + "UpdateScheduleRequestFileFormatEnum", + "UpdateScheduleRequestTimeZoneEnum", + "UpdateScheduleRequestStatusEnum", + "UpdateScheduleRequestPdfOptionsPageSizeEnum", + "UpdateUserGroupRequestPrivilegesEnum", + "UpdateUserGroupRequestTypeEnum", + "UpdateUserGroupRequestVisibilityEnum", + "UpdateUserGroupRequestOperationEnum", + "UpdateUserRequestVisibilityEnum", + "UpdateUserRequestAccountStatusEnum", + "UpdateUserRequestAccountTypeEnum", + "UpdateUserRequestOperationEnum", + "UpdateUserRequestPreferredLocaleEnum", + "UpdateWebhookConfigurationRequestEventsEnum", + "UserVisibilityEnum", + "UserAccountTypeEnum", + "UserAccountStatusEnum", + "UserParentTypeEnum", + "UserGroupResponseParentTypeEnum", + "UserGroupResponseTypeEnum", + "UserGroupResponseVisibilityEnum", + "UserObjectTypeEnum", + "ValidateCommunicationChannelRequestChannelTypeEnum", + "ValidateCommunicationChannelRequestEventTypeEnum", + "ValueScopeInputPrincipalTypeEnum", + "VariableVariableTypeEnum", + "VariableDetailInputTypeEnum", + "VariablePutAssignmentInputPrincipalTypeEnum", + "VariableUpdateAssignmentInputOperationEnum", + "VariableUpdateScopeInputPrincipalTypeEnum", + "VariableValuePrincipalTypeEnum", + "WebhookResponseEventsEnum", + "WebhookSignatureVerificationTypeEnum", + "WebhookSignatureVerificationAlgorithmEnum", + "WebhookSignatureVerificationInputTypeEnum", + "WebhookSignatureVerificationInputAlgorithmEnum", + "WebhookSortOptionsInputFieldNameEnum", + "WebhookSortOptionsInputOrderEnum" +]); +var typeMap = { + "AIContext": AIContext, + "APIKey": APIKey, + "APIKeyInput": APIKeyInput, + "AccessToken": AccessToken, + "ActionConfig": ActionConfig, + "ActionConfigInput": ActionConfigInput, + "ActionConfigInputCreate": ActionConfigInputCreate, + "ActionDetails": ActionDetails, + "ActionDetailsInput": ActionDetailsInput, + "ActionDetailsInputCreate": ActionDetailsInputCreate, + "ActivateUserRequest": ActivateUserRequest, + "AgentConversation": AgentConversation, + "AnswerContent": AnswerContent, + "AnswerDataResponse": AnswerDataResponse, + "AnswerPngOptionsInput": AnswerPngOptionsInput, + "AssignChangeAuthorRequest": AssignChangeAuthorRequest, + "AssignTagRequest": AssignTagRequest, + "AssociateMetadataInput": AssociateMetadataInput, + "AssociateMetadataInputCreate": AssociateMetadataInputCreate, + "AuthClusterPreferences": AuthClusterPreferences, + "AuthClusterPreferencesInput": AuthClusterPreferencesInput, + "AuthOrgInfo": AuthOrgInfo, + "AuthOrgPreference": AuthOrgPreference, + "AuthOrgPreferenceInput": AuthOrgPreferenceInput, + "AuthSettingsAccessToken": AuthSettingsAccessToken, + "Authentication": Authentication, + "AuthenticationInput": AuthenticationInput, + "Author": Author, + "AuthorMetadataTypeInput": AuthorMetadataTypeInput, + "AuthorType": AuthorType, + "AwsS3Config": AwsS3Config, + "AwsS3ConfigInput": AwsS3ConfigInput, + "BasicAuth": BasicAuth, + "BasicAuthInput": BasicAuthInput, + "CALLBACK": CALLBACK, + "CALLBACKInput": CALLBACKInput, + "CALLBACKInputMandatory": CALLBACKInputMandatory, + "CalendarResponse": CalendarResponse, + "ChangeUserPasswordRequest": ChangeUserPasswordRequest, + "ChannelHistoryEventInfo": ChannelHistoryEventInfo, + "ChannelHistoryEventInput": ChannelHistoryEventInput, + "ChannelHistoryJob": ChannelHistoryJob, + "ChannelValidationAwsS3Info": ChannelValidationAwsS3Info, + "ChannelValidationDetail": ChannelValidationDetail, + "ClusterNonEmbedAccess": ClusterNonEmbedAccess, + "ClusterNonEmbedAccessInput": ClusterNonEmbedAccessInput, + "Collection": Collection, + "CollectionDeleteResponse": CollectionDeleteResponse, + "CollectionDeleteTypeIdentifiers": CollectionDeleteTypeIdentifiers, + "CollectionEntityIdentifier": CollectionEntityIdentifier, + "CollectionMetadataInput": CollectionMetadataInput, + "CollectionMetadataItem": CollectionMetadataItem, + "CollectionSearchResponse": CollectionSearchResponse, + "Column": Column, + "ColumnSecurityRule": ColumnSecurityRule, + "ColumnSecurityRuleColumn": ColumnSecurityRuleColumn, + "ColumnSecurityRuleGroup": ColumnSecurityRuleGroup, + "ColumnSecurityRuleGroupOperation": ColumnSecurityRuleGroupOperation, + "ColumnSecurityRuleResponse": ColumnSecurityRuleResponse, + "ColumnSecurityRuleSourceTable": ColumnSecurityRuleSourceTable, + "ColumnSecurityRuleTableInput": ColumnSecurityRuleTableInput, + "ColumnSecurityRuleUpdate": ColumnSecurityRuleUpdate, + "CommitBranchRequest": CommitBranchRequest, + "CommitFileType": CommitFileType, + "CommitHistoryResponse": CommitHistoryResponse, + "CommitResponse": CommitResponse, + "CommiterType": CommiterType, + "CommunicationChannelPreferencesResponse": CommunicationChannelPreferencesResponse, + "CommunicationChannelValidateResponse": CommunicationChannelValidateResponse, + "ConfigureAuthSettingsRequest": ConfigureAuthSettingsRequest, + "ConfigureAuthSettingsRequestClusterPreferences": ConfigureAuthSettingsRequestClusterPreferences, + "ConfigureCommunicationChannelPreferencesRequest": ConfigureCommunicationChannelPreferencesRequest, + "ConfigureSecuritySettingsRequest": ConfigureSecuritySettingsRequest, + "ConfigureSecuritySettingsRequestClusterPreferences": ConfigureSecuritySettingsRequestClusterPreferences, + "ConnectionConfigurationResponse": ConnectionConfigurationResponse, + "ConnectionConfigurationSearchRequest": ConnectionConfigurationSearchRequest, + "ConnectionInput": ConnectionInput, + "ContextPayloadV2Input": ContextPayloadV2Input, + "Conversation": Conversation, + "ConversationSettingsInput": ConversationSettingsInput, + "ConvertWorksheetToModelRequest": ConvertWorksheetToModelRequest, + "CopyObjectRequest": CopyObjectRequest, + "CreateAgentConversationRequest": CreateAgentConversationRequest, + "CreateAgentConversationRequestConversationSettings": CreateAgentConversationRequestConversationSettings, + "CreateAgentConversationRequestMetadataContext": CreateAgentConversationRequestMetadataContext, + "CreateCalendarRequest": CreateCalendarRequest, + "CreateCalendarRequestTableReference": CreateCalendarRequestTableReference, + "CreateCollectionRequest": CreateCollectionRequest, + "CreateConfigRequest": CreateConfigRequest, + "CreateConnectionConfigurationRequest": CreateConnectionConfigurationRequest, + "CreateConnectionConfigurationRequestPolicyProcessOptions": CreateConnectionConfigurationRequestPolicyProcessOptions, + "CreateConnectionRequest": CreateConnectionRequest, + "CreateConnectionResponse": CreateConnectionResponse, + "CreateConversationRequest": CreateConversationRequest, + "CreateCustomActionRequest": CreateCustomActionRequest, + "CreateCustomActionRequestActionDetails": CreateCustomActionRequestActionDetails, + "CreateCustomActionRequestDefaultActionConfig": CreateCustomActionRequestDefaultActionConfig, + "CreateEmailCustomizationRequest": CreateEmailCustomizationRequest, + "CreateEmailCustomizationRequestTemplateProperties": CreateEmailCustomizationRequestTemplateProperties, + "CreateEmailCustomizationResponse": CreateEmailCustomizationResponse, + "CreateOrgRequest": CreateOrgRequest, + "CreateRoleRequest": CreateRoleRequest, + "CreateScheduleRequest": CreateScheduleRequest, + "CreateScheduleRequestFrequency": CreateScheduleRequestFrequency, + "CreateScheduleRequestLiveboardOptions": CreateScheduleRequestLiveboardOptions, + "CreateScheduleRequestPdfOptions": CreateScheduleRequestPdfOptions, + "CreateScheduleRequestRecipientDetails": CreateScheduleRequestRecipientDetails, + "CreateTagRequest": CreateTagRequest, + "CreateUserGroupRequest": CreateUserGroupRequest, + "CreateUserRequest": CreateUserRequest, + "CreateVariableRequest": CreateVariableRequest, + "CreateWebhookConfigurationRequest": CreateWebhookConfigurationRequest, + "CreateWebhookConfigurationRequestAuthentication": CreateWebhookConfigurationRequestAuthentication, + "CreateWebhookConfigurationRequestSignatureVerification": CreateWebhookConfigurationRequestSignatureVerification, + "CreateWebhookConfigurationRequestStorageDestination": CreateWebhookConfigurationRequestStorageDestination, + "CronExpression": CronExpression, + "CronExpressionInput": CronExpressionInput, + "CspSettings": CspSettings, + "CspSettingsInput": CspSettingsInput, + "CustomActionMetadataTypeInput": CustomActionMetadataTypeInput, + "DataSource": DataSource, + "DataSourceContextInput": DataSourceContextInput, + "DataWarehouseObjectInput": DataWarehouseObjectInput, + "DataWarehouseObjects": DataWarehouseObjects, + "Database": Database, + "DbtSearchResponse": DbtSearchResponse, + "DeactivateUserRequest": DeactivateUserRequest, + "DefaultActionConfig": DefaultActionConfig, + "DefaultActionConfigInput": DefaultActionConfigInput, + "DefaultActionConfigInputCreate": DefaultActionConfigInputCreate, + "DefaultActionConfigSearchInput": DefaultActionConfigSearchInput, + "DeleteCollectionRequest": DeleteCollectionRequest, + "DeleteConfigRequest": DeleteConfigRequest, + "DeleteConnectionConfigurationRequest": DeleteConnectionConfigurationRequest, + "DeleteConnectionRequest": DeleteConnectionRequest, + "DeleteMetadataRequest": DeleteMetadataRequest, + "DeleteMetadataTypeInput": DeleteMetadataTypeInput, + "DeleteOrgEmailCustomizationRequest": DeleteOrgEmailCustomizationRequest, + "DeleteVariablesRequest": DeleteVariablesRequest, + "DeleteWebhookConfigurationsRequest": DeleteWebhookConfigurationsRequest, + "DeployCommitRequest": DeployCommitRequest, + "DeployResponse": DeployResponse, + "EntityHeader": EntityHeader, + "ErrorResponse": ErrorResponse, + "EurekaDataSourceSuggestionResponse": EurekaDataSourceSuggestionResponse, + "EurekaDecomposeQueryResponse": EurekaDecomposeQueryResponse, + "EurekaGetNLInstructionsResponse": EurekaGetNLInstructionsResponse, + "EurekaGetRelevantQuestionsResponse": EurekaGetRelevantQuestionsResponse, + "EurekaLLMDecomposeQueryResponse": EurekaLLMDecomposeQueryResponse, + "EurekaLLMSuggestedQuery": EurekaLLMSuggestedQuery, + "EurekaRelevantQuestion": EurekaRelevantQuestion, + "EurekaSetNLInstructionsResponse": EurekaSetNLInstructionsResponse, + "EventChannelConfig": EventChannelConfig, + "EventChannelConfigInput": EventChannelConfigInput, + "ExcludeMetadataListItemInput": ExcludeMetadataListItemInput, + "ExportAnswerReportRequest": ExportAnswerReportRequest, + "ExportAnswerReportRequestPngOptions": ExportAnswerReportRequestPngOptions, + "ExportAnswerReportRequestRegionalSettings": ExportAnswerReportRequestRegionalSettings, + "ExportLiveboardReportRequest": ExportLiveboardReportRequest, + "ExportLiveboardReportRequestPdfOptions": ExportLiveboardReportRequestPdfOptions, + "ExportLiveboardReportRequestPngOptions": ExportLiveboardReportRequestPngOptions, + "ExportMetadataTMLBatchedRequest": ExportMetadataTMLBatchedRequest, + "ExportMetadataTMLRequest": ExportMetadataTMLRequest, + "ExportMetadataTMLRequestExportOptions": ExportMetadataTMLRequestExportOptions, + "ExportMetadataTypeInput": ExportMetadataTypeInput, + "ExportOptions": ExportOptions, + "ExternalTableInput": ExternalTableInput, + "FavoriteMetadataInput": FavoriteMetadataInput, + "FavoriteMetadataItem": FavoriteMetadataItem, + "FavoriteObjectOptionsInput": FavoriteObjectOptionsInput, + "FetchAnswerDataRequest": FetchAnswerDataRequest, + "FetchAnswerSqlQueryRequest": FetchAnswerSqlQueryRequest, + "FetchAsyncImportTaskStatusRequest": FetchAsyncImportTaskStatusRequest, + "FetchColumnSecurityRulesRequest": FetchColumnSecurityRulesRequest, + "FetchConnectionDiffStatusResponse": FetchConnectionDiffStatusResponse, + "FetchLiveboardDataRequest": FetchLiveboardDataRequest, + "FetchLiveboardSqlQueryRequest": FetchLiveboardSqlQueryRequest, + "FetchLogsRequest": FetchLogsRequest, + "FetchObjectPrivilegesRequest": FetchObjectPrivilegesRequest, + "FetchPermissionsOfPrincipalsRequest": FetchPermissionsOfPrincipalsRequest, + "FetchPermissionsOnMetadataRequest": FetchPermissionsOnMetadataRequest, + "FilterRules": FilterRules, + "ForceLogoutUsersRequest": ForceLogoutUsersRequest, + "Frequency": Frequency, + "FrequencyInput": FrequencyInput, + "GenerateCSVRequest": GenerateCSVRequest, + "GenericInfo": GenericInfo, + "GetAsyncImportStatusResponse": GetAsyncImportStatusResponse, + "GetCustomAccessTokenRequest": GetCustomAccessTokenRequest, + "GetDataSourceSuggestionsRequest": GetDataSourceSuggestionsRequest, + "GetFullAccessTokenRequest": GetFullAccessTokenRequest, + "GetFullAccessTokenRequestUserParameters": GetFullAccessTokenRequestUserParameters, + "GetNLInstructionsRequest": GetNLInstructionsRequest, + "GetObjectAccessTokenRequest": GetObjectAccessTokenRequest, + "GetRelevantQuestionsRequest": GetRelevantQuestionsRequest, + "GetRelevantQuestionsRequestAiContext": GetRelevantQuestionsRequestAiContext, + "GetRelevantQuestionsRequestMetadataContext": GetRelevantQuestionsRequestMetadataContext, + "GetTokenResponse": GetTokenResponse, + "GroupInfo": GroupInfo, + "GroupObject": GroupObject, + "GroupsImportListInput": GroupsImportListInput, + "HeaderAttributeInput": HeaderAttributeInput, + "HeaderUpdateInput": HeaderUpdateInput, + "ImportEPackAsyncTaskStatus": ImportEPackAsyncTaskStatus, + "ImportMetadataTMLAsyncRequest": ImportMetadataTMLAsyncRequest, + "ImportMetadataTMLRequest": ImportMetadataTMLRequest, + "ImportUser": ImportUser, + "ImportUserGroupsRequest": ImportUserGroupsRequest, + "ImportUserGroupsResponse": ImportUserGroupsResponse, + "ImportUserType": ImportUserType, + "ImportUsersRequest": ImportUsersRequest, + "ImportUsersResponse": ImportUsersResponse, + "InputEurekaNLSRequest": InputEurekaNLSRequest, + "JWTMetadataObject": JWTMetadataObject, + "JWTParameter": JWTParameter, + "JWTUserOptions": JWTUserOptions, + "JWTUserOptionsFull": JWTUserOptionsFull, + "JobRecipient": JobRecipient, + "LiveboardContent": LiveboardContent, + "LiveboardDataResponse": LiveboardDataResponse, + "LiveboardOptions": LiveboardOptions, + "LiveboardOptionsInput": LiveboardOptionsInput, + "LogResponse": LogResponse, + "LoginRequest": LoginRequest, + "ManageObjectPrivilegeRequest": ManageObjectPrivilegeRequest, + "MetadataAssociationItem": MetadataAssociationItem, + "MetadataContext": MetadataContext, + "MetadataInput": MetadataInput, + "MetadataListItemInput": MetadataListItemInput, + "MetadataObject": MetadataObject, + "MetadataResponse": MetadataResponse, + "MetadataSearchResponse": MetadataSearchResponse, + "MetadataSearchSortOptions": MetadataSearchSortOptions, + "ModelTableList": ModelTableList, + "NLInstructionsInfo": NLInstructionsInfo, + "NLInstructionsInfoInput": NLInstructionsInfoInput, + "ObjectIDAndName": ObjectIDAndName, + "ObjectPrivilegesMetadataInput": ObjectPrivilegesMetadataInput, + "ObjectPrivilegesOfMetadataResponse": ObjectPrivilegesOfMetadataResponse, + "Org": Org, + "OrgChannelConfigInput": OrgChannelConfigInput, + "OrgChannelConfigResponse": OrgChannelConfigResponse, + "OrgDetails": OrgDetails, + "OrgInfo": OrgInfo, + "OrgNonEmbedAccess": OrgNonEmbedAccess, + "OrgNonEmbedAccessInput": OrgNonEmbedAccessInput, + "OrgPreferenceSearchCriteriaInput": OrgPreferenceSearchCriteriaInput, + "OrgResponse": OrgResponse, + "OrgType": OrgType, + "ParameterValues": ParameterValues, + "ParameterizeMetadataFieldsRequest": ParameterizeMetadataFieldsRequest, + "ParameterizeMetadataRequest": ParameterizeMetadataRequest, + "ParametersListItem": ParametersListItem, + "ParametersListItemInput": ParametersListItemInput, + "PdfOptions": PdfOptions, + "PdfOptionsInput": PdfOptionsInput, + "PermissionInput": PermissionInput, + "PermissionOfMetadataResponse": PermissionOfMetadataResponse, + "PermissionOfPrincipalsResponse": PermissionOfPrincipalsResponse, + "PermissionsMetadataTypeInput": PermissionsMetadataTypeInput, + "PngOptionsInput": PngOptionsInput, + "PolicyProcessOptions": PolicyProcessOptions, + "PolicyProcessOptionsInput": PolicyProcessOptionsInput, + "PrincipalsInput": PrincipalsInput, + "PrincipalsListItem": PrincipalsListItem, + "PrincipalsListItemInput": PrincipalsListItemInput, + "PublishMetadataListItem": PublishMetadataListItem, + "PublishMetadataRequest": PublishMetadataRequest, + "PutVariableValuesRequest": PutVariableValuesRequest, + "QueryGetDecomposedQueryRequest": QueryGetDecomposedQueryRequest, + "QueryGetDecomposedQueryRequestNlsRequest": QueryGetDecomposedQueryRequestNlsRequest, + "RecipientDetails": RecipientDetails, + "RecipientDetailsInput": RecipientDetailsInput, + "RegionalSettingsInput": RegionalSettingsInput, + "RepoConfigObject": RepoConfigObject, + "ResetUserPasswordRequest": ResetUserPasswordRequest, + "ResponseActivationURL": ResponseActivationURL, + "ResponseCopyObject": ResponseCopyObject, + "ResponseCustomAction": ResponseCustomAction, + "ResponseFailedEntities": ResponseFailedEntities, + "ResponseFailedEntity": ResponseFailedEntity, + "ResponseIncompleteEntities": ResponseIncompleteEntities, + "ResponseIncompleteEntity": ResponseIncompleteEntity, + "ResponseMessage": ResponseMessage, + "ResponsePostUpgradeFailedEntities": ResponsePostUpgradeFailedEntities, + "ResponsePostUpgradeFailedEntity": ResponsePostUpgradeFailedEntity, + "ResponseSchedule": ResponseSchedule, + "ResponseScheduleRun": ResponseScheduleRun, + "ResponseSuccessfulEntities": ResponseSuccessfulEntities, + "ResponseSuccessfulEntity": ResponseSuccessfulEntity, + "ResponseWorksheetToModelConversion": ResponseWorksheetToModelConversion, + "RevertCommitRequest": RevertCommitRequest, + "RevertResponse": RevertResponse, + "RevertedMetadata": RevertedMetadata, + "RevokeRefreshTokensRequest": RevokeRefreshTokensRequest, + "RevokeRefreshTokensResponse": RevokeRefreshTokensResponse, + "RevokeTokenRequest": RevokeTokenRequest, + "RiseGQLArgWrapper": RiseGQLArgWrapper, + "RiseSetter": RiseSetter, + "Role": Role, + "RoleResponse": RoleResponse, + "RuntimeFilter": RuntimeFilter, + "RuntimeFilters": RuntimeFilters, + "RuntimeParamOverride": RuntimeParamOverride, + "RuntimeParameters": RuntimeParameters, + "RuntimeSort": RuntimeSort, + "RuntimeSorts": RuntimeSorts, + "ScheduleHistoryRunsOptionsInput": ScheduleHistoryRunsOptionsInput, + "SchedulesPdfOptionsInput": SchedulesPdfOptionsInput, + "SchemaObject": SchemaObject, + "Scope": Scope, + "ScriptSrcUrls": ScriptSrcUrls, + "ScriptSrcUrlsInput": ScriptSrcUrlsInput, + "SearchAuthSettingsRequest": SearchAuthSettingsRequest, + "SearchAuthSettingsResponse": SearchAuthSettingsResponse, + "SearchCalendarsRequest": SearchCalendarsRequest, + "SearchCalendarsRequestSortOptions": SearchCalendarsRequestSortOptions, + "SearchChannelHistoryRequest": SearchChannelHistoryRequest, + "SearchChannelHistoryResponse": SearchChannelHistoryResponse, + "SearchCollectionsRequest": SearchCollectionsRequest, + "SearchCollectionsRequestSortOptions": SearchCollectionsRequestSortOptions, + "SearchCommitsRequest": SearchCommitsRequest, + "SearchCommunicationChannelPreferencesRequest": SearchCommunicationChannelPreferencesRequest, + "SearchConfigRequest": SearchConfigRequest, + "SearchConnectionRequest": SearchConnectionRequest, + "SearchConnectionRequestSortOptions": SearchConnectionRequestSortOptions, + "SearchConnectionResponse": SearchConnectionResponse, + "SearchCustomActionsRequest": SearchCustomActionsRequest, + "SearchCustomActionsRequestDefaultActionConfig": SearchCustomActionsRequestDefaultActionConfig, + "SearchDataRequest": SearchDataRequest, + "SearchDataResponse": SearchDataResponse, + "SearchEmailCustomizationRequest": SearchEmailCustomizationRequest, + "SearchMetadataRequest": SearchMetadataRequest, + "SearchMetadataRequestFavoriteObjectOptions": SearchMetadataRequestFavoriteObjectOptions, + "SearchMetadataRequestSortOptions": SearchMetadataRequestSortOptions, + "SearchOrgsRequest": SearchOrgsRequest, + "SearchRoleResponse": SearchRoleResponse, + "SearchRolesRequest": SearchRolesRequest, + "SearchSchedulesRequest": SearchSchedulesRequest, + "SearchSchedulesRequestHistoryRunsOptions": SearchSchedulesRequestHistoryRunsOptions, + "SearchSchedulesRequestSortOptions": SearchSchedulesRequestSortOptions, + "SearchSecuritySettingsRequest": SearchSecuritySettingsRequest, + "SearchTagsRequest": SearchTagsRequest, + "SearchUserGroupsRequest": SearchUserGroupsRequest, + "SearchUserGroupsRequestSortOptions": SearchUserGroupsRequestSortOptions, + "SearchUsersRequest": SearchUsersRequest, + "SearchVariablesRequest": SearchVariablesRequest, + "SearchWebhookConfigurationsRequest": SearchWebhookConfigurationsRequest, + "SearchWebhookConfigurationsRequestSortOptions": SearchWebhookConfigurationsRequestSortOptions, + "SecuritySettingsClusterPreferences": SecuritySettingsClusterPreferences, + "SecuritySettingsClusterPreferencesInput": SecuritySettingsClusterPreferencesInput, + "SecuritySettingsOrgDetails": SecuritySettingsOrgDetails, + "SecuritySettingsOrgPreferences": SecuritySettingsOrgPreferences, + "SecuritySettingsOrgPreferencesInput": SecuritySettingsOrgPreferencesInput, + "SecuritySettingsResponse": SecuritySettingsResponse, + "SendAgentConversationMessageRequest": SendAgentConversationMessageRequest, + "SendAgentConversationMessageStreamingRequest": SendAgentConversationMessageStreamingRequest, + "SendAgentMessageRequest": SendAgentMessageRequest, + "SendAgentMessageResponse": SendAgentMessageResponse, + "SendAgentMessageStreamingRequest": SendAgentMessageStreamingRequest, + "SendMessageRequest": SendMessageRequest, + "SetNLInstructionsRequest": SetNLInstructionsRequest, + "ShareMetadataRequest": ShareMetadataRequest, + "ShareMetadataTypeInput": ShareMetadataTypeInput, + "SharePermissionsInput": SharePermissionsInput, + "SingleAnswerRequest": SingleAnswerRequest, + "SortOption": SortOption, + "SortOptionInput": SortOptionInput, + "SortOptions": SortOptions, + "SortingOptions": SortingOptions, + "SqlQuery": SqlQuery, + "SqlQueryResponse": SqlQueryResponse, + "StorageConfig": StorageConfig, + "StorageConfigInput": StorageConfigInput, + "StorageDestination": StorageDestination, + "StorageDestinationInput": StorageDestinationInput, + "SyncMetadataRequest": SyncMetadataRequest, + "SyncMetadataResponse": SyncMetadataResponse, + "SystemConfig": SystemConfig, + "SystemInfo": SystemInfo, + "SystemOverrideInfo": SystemOverrideInfo, + "Table": Table, + "Tag": Tag, + "TagMetadataTypeInput": TagMetadataTypeInput, + "TemplatePropertiesInputCreate": TemplatePropertiesInputCreate, + "Token": Token, + "TokenAccessScopeObject": TokenAccessScopeObject, + "TokenValidationResponse": TokenValidationResponse, + "URL": URL2, + "URLInput": URLInput, + "URLInputMandatory": URLInputMandatory, + "UnassignTagRequest": UnassignTagRequest, + "UnparameterizeMetadataRequest": UnparameterizeMetadataRequest, + "UnpublishMetadataRequest": UnpublishMetadataRequest, + "UpdateCalendarRequest": UpdateCalendarRequest, + "UpdateCalendarRequestTableReference": UpdateCalendarRequestTableReference, + "UpdateCollectionRequest": UpdateCollectionRequest, + "UpdateColumnSecurityRulesRequest": UpdateColumnSecurityRulesRequest, + "UpdateConfigRequest": UpdateConfigRequest, + "UpdateConnectionConfigurationRequest": UpdateConnectionConfigurationRequest, + "UpdateConnectionRequest": UpdateConnectionRequest, + "UpdateConnectionStatusRequest": UpdateConnectionStatusRequest, + "UpdateConnectionV2Request": UpdateConnectionV2Request, + "UpdateCustomActionRequest": UpdateCustomActionRequest, + "UpdateCustomActionRequestActionDetails": UpdateCustomActionRequestActionDetails, + "UpdateCustomActionRequestDefaultActionConfig": UpdateCustomActionRequestDefaultActionConfig, + "UpdateEmailCustomizationRequest": UpdateEmailCustomizationRequest, + "UpdateMetadataHeaderRequest": UpdateMetadataHeaderRequest, + "UpdateMetadataObjIdRequest": UpdateMetadataObjIdRequest, + "UpdateObjIdInput": UpdateObjIdInput, + "UpdateOrgRequest": UpdateOrgRequest, + "UpdateRoleRequest": UpdateRoleRequest, + "UpdateScheduleRequest": UpdateScheduleRequest, + "UpdateScheduleRequestFrequency": UpdateScheduleRequestFrequency, + "UpdateScheduleRequestLiveboardOptions": UpdateScheduleRequestLiveboardOptions, + "UpdateScheduleRequestPdfOptions": UpdateScheduleRequestPdfOptions, + "UpdateScheduleRequestRecipientDetails": UpdateScheduleRequestRecipientDetails, + "UpdateSystemConfigRequest": UpdateSystemConfigRequest, + "UpdateTagRequest": UpdateTagRequest, + "UpdateUserGroupRequest": UpdateUserGroupRequest, + "UpdateUserRequest": UpdateUserRequest, + "UpdateVariableRequest": UpdateVariableRequest, + "UpdateVariableValuesRequest": UpdateVariableValuesRequest, + "UpdateWebhookConfigurationRequest": UpdateWebhookConfigurationRequest, + "User": User, + "UserGroup": UserGroup, + "UserGroupResponse": UserGroupResponse, + "UserInfo": UserInfo, + "UserObject": UserObject, + "UserParameterOptions": UserParameterOptions, + "UserPrincipal": UserPrincipal, + "ValidateCommunicationChannelRequest": ValidateCommunicationChannelRequest, + "ValidateMergeRequest": ValidateMergeRequest, + "ValidateTokenRequest": ValidateTokenRequest, + "ValueScopeInput": ValueScopeInput, + "Variable": Variable, + "VariableDetailInput": VariableDetailInput, + "VariableOrgInfo": VariableOrgInfo, + "VariablePutAssignmentInput": VariablePutAssignmentInput, + "VariableUpdateAssignmentInput": VariableUpdateAssignmentInput, + "VariableUpdateScopeInput": VariableUpdateScopeInput, + "VariableValue": VariableValue, + "VariableValues": VariableValues, + "WebhookAuthApiKey": WebhookAuthApiKey, + "WebhookAuthApiKeyInput": WebhookAuthApiKeyInput, + "WebhookAuthBasicAuth": WebhookAuthBasicAuth, + "WebhookAuthBasicAuthInput": WebhookAuthBasicAuthInput, + "WebhookAuthOAuth2": WebhookAuthOAuth2, + "WebhookAuthOAuth2Input": WebhookAuthOAuth2Input, + "WebhookAuthentication": WebhookAuthentication, + "WebhookAuthenticationInput": WebhookAuthenticationInput, + "WebhookDeleteFailure": WebhookDeleteFailure, + "WebhookDeleteResponse": WebhookDeleteResponse, + "WebhookKeyValuePair": WebhookKeyValuePair, + "WebhookKeyValuePairInput": WebhookKeyValuePairInput, + "WebhookOrg": WebhookOrg, + "WebhookPagination": WebhookPagination, + "WebhookResponse": WebhookResponse, + "WebhookSearchResponse": WebhookSearchResponse, + "WebhookSignatureVerification": WebhookSignatureVerification, + "WebhookSignatureVerificationInput": WebhookSignatureVerificationInput, + "WebhookSortOptionsInput": WebhookSortOptionsInput, + "WebhookUser": WebhookUser +}; +var ObjectSerializer = class _ObjectSerializer { + static findCorrectType(data, expectedType) { + if (data == void 0) { + return expectedType; + } else if (primitives.indexOf(expectedType.toLowerCase()) !== -1) { + return expectedType; + } else if (expectedType === "Date") { + return expectedType; + } else { + if (enumsMap.has(expectedType)) { + return expectedType; + } + if (!typeMap[expectedType]) { + return expectedType; + } + let discriminatorProperty = typeMap[expectedType].discriminator; + if (discriminatorProperty == null) { + return expectedType; + } else { + if (data[discriminatorProperty]) { + var discriminatorType = data[discriminatorProperty]; + if (typeMap[discriminatorType]) { + return discriminatorType; + } else { + return expectedType; + } + } else { + return expectedType; + } + } + } + } + static serialize(data, type, format) { + if (data == void 0) { + return data; + } else if (primitives.indexOf(type.toLowerCase()) !== -1) { + return data; + } else if (type.lastIndexOf("Array<", 0) === 0) { + let subType = type.replace("Array<", ""); + subType = subType.substring(0, subType.length - 1); + let transformedData = []; + for (let date of data) { + transformedData.push(_ObjectSerializer.serialize(date, subType, format)); + } + return transformedData; + } else if (type === "Date") { + if (format == "date") { + let month = data.getMonth() + 1; + month = month < 10 ? "0" + month.toString() : month.toString(); + let day = data.getDate(); + day = day < 10 ? "0" + day.toString() : day.toString(); + return data.getFullYear() + "-" + month + "-" + day; + } else { + return data.toISOString(); + } + } else { + if (enumsMap.has(type)) { + return data; + } + if (!typeMap[type]) { + return data; + } + type = this.findCorrectType(data, type); + let attributeTypes = typeMap[type].getAttributeTypeMap(); + let instance = {}; + for (let attributeType of attributeTypes) { + instance[attributeType.baseName] = _ObjectSerializer.serialize(data[attributeType.name], attributeType.type, attributeType.format); + } + return instance; + } + } + static deserialize(data, type, format) { + type = _ObjectSerializer.findCorrectType(data, type); + if (data == void 0) { + return data; + } else if (primitives.indexOf(type.toLowerCase()) !== -1) { + return data; + } else if (type.lastIndexOf("Array<", 0) === 0) { + let subType = type.replace("Array<", ""); + subType = subType.substring(0, subType.length - 1); + let transformedData = []; + for (let date of data) { + transformedData.push(_ObjectSerializer.deserialize(date, subType, format)); + } + return transformedData; + } else if (type === "Date") { + return new Date(data); + } else { + if (enumsMap.has(type)) { + return data; + } + if (!typeMap[type]) { + return data; + } + let instance = new typeMap[type](); + let attributeTypes = typeMap[type].getAttributeTypeMap(); + for (let attributeType of attributeTypes) { + let value = _ObjectSerializer.deserialize(data[attributeType.baseName], attributeType.type, attributeType.format); + if (value !== void 0) { + instance[attributeType.name] = value; + } + } + return instance; + } + } + /** + * Normalize media type + * + * We currently do not handle any media types attributes, i.e. anything + * after a semicolon. All content is assumed to be UTF-8 compatible. + */ + static normalizeMediaType(mediaType) { + if (mediaType === void 0) { + return void 0; + } + return mediaType.split(";")[0].trim().toLowerCase(); + } + /** + * From a list of possible media types, choose the one we can handle best. + * + * The order of the given media types does not have any impact on the choice + * made. + */ + static getPreferredMediaType(mediaTypes) { + if (!mediaTypes) { + return "application/json"; + } + const normalMediaTypes = mediaTypes.map(this.normalizeMediaType); + let selectedMediaType = void 0; + let selectedRank = -Infinity; + for (const mediaType of normalMediaTypes) { + if (supportedMediaTypes[mediaType] > selectedRank) { + selectedMediaType = mediaType; + selectedRank = supportedMediaTypes[mediaType]; + } + } + if (selectedMediaType === void 0) { + throw new Error("None of the given media types are supported: " + mediaTypes.join(", ")); + } + return selectedMediaType; + } + /** + * Convert data to a string according the given media type + */ + static stringify(data, mediaType) { + if (mediaType === "text/plain") { + return String(data); + } + if (mediaType === "application/json") { + return JSON.stringify(data); + } + throw new Error("The mediaType " + mediaType + " is not supported by ObjectSerializer.stringify."); + } + /** + * Parse data from a string according to the given media type + */ + static parse(rawData, mediaType) { + if (mediaType === void 0) { + throw new Error("Cannot parse content. No Content-Type defined."); + } + if (mediaType === "text/plain") { + return rawData; + } + if (mediaType === "application/json") { + return JSON.parse(rawData); + } + if (mediaType === "text/html") { + return rawData; + } + throw new Error("The mediaType " + mediaType + " is not supported by ObjectSerializer.parse."); + } +}; + +// util.ts +function isCodeInRange(codeRange, code) { + if (codeRange === "0") { + return true; + } + if (codeRange == code.toString()) { + return true; + } else { + const codeString = code.toString(); + if (codeString.length != codeRange.length) { + return false; + } + for (let i = 0; i < codeString.length; i++) { + if (codeRange.charAt(i) != "X" && codeRange.charAt(i) != codeString.charAt(i)) { + return false; + } + } + return true; + } +} +function canConsumeForm(contentTypes) { + return contentTypes.indexOf("multipart/form-data") !== -1; +} + +// apis/AIApi.ts +var AIApiRequestFactory = class extends BaseAPIRequestFactory { + /** + * Version: 26.2.0.cl or later Creates a new Spotter agent conversation based on the provided context and settings. The endpoint was in Beta from 26.2.0.cl through 26.4.0.cl. Requires `CAN_USE_SPOTTER` privilege and at least view access to the metadata object specified in the request. #### Usage guidelines The request must include the `metadata_context` parameter to define the conversation context. The context type can be one of: - `DATA_SOURCE` *(available from 26.5.0.cl)*: targets a specific data source. Provide `data_source_identifier` in `data_source_context` for a single data source, or `data_source_identifiers` for multi-data-source context. The deprecated `guid` field is accepted for backwards compatibility. - `AUTO_MODE` *(available from 26.5.0.cl)*: automatically discovers and selects the most relevant datasets for the user\'s queries. > **Note for callers on versions 26.2.0.cl – 26.4.0.cl (Beta):** use the lowercase `data_source` enum value with the `guid` field instead of the above. Example: `{ \"type\": \"data_source\", \"data_source_context\": { \"guid\": \"\" } }`. The `conversation_settings` parameter controls which Spotter capabilities are enabled for the conversation: - `enable_contextual_change_analysis` (default: `true`, **deprecated from 26.2.0.cl**) — always enabled in Spotter 3; setting this to `false` has no effect on versions >= 26.2.0.cl - `enable_natural_language_answer_generation` (default: `true`, **deprecated from 26.2.0.cl**) — always enabled in Spotter 3; setting this to `false` has no effect on versions >= 26.2.0.cl - `enable_reasoning` (default: `true`, **deprecated from 26.2.0.cl**) — always enabled in Spotter 3; setting this to `false` has no effect on versions >= 26.2.0.cl - `enable_save_chat` (default: `false`, *available from 26.5.0.cl*) — enables saving the conversation for later retrieval via conversation history If the request is successful, the response includes a unique `conversation_identifier` that must be passed to `sendAgentConversationMessage` or `sendAgentConversationMessageStreaming` to send messages within this conversation. The response also includes `conversation_id` with the same value for backwards compatibility; use `conversation_identifier` for new integrations. #### Example request ```json { \"metadata_context\": { \"type\": \"DATA_SOURCE\", \"data_source_context\": { \"data_source_identifier\": \"a1b2c3d4-e5f6-7890-abcd-ef1234567890\" } }, \"conversation_settings\": {} } ``` #### Error responses | Code | Description | | ---- | --------------------------------------------------------------------------------------------------------------------------------------- | | 401 | Unauthorized — authentication token is missing, expired, or invalid. | | 403 | Forbidden — the authenticated user does not have `CAN_USE_SPOTTER` privilege or lacks view permission on the specified metadata object. | > ###### Note: > > - This endpoint was in Beta from 26.2.0.cl through 26.4.0.cl and is Generally Available from version 26.5.0.cl. > - This endpoint requires Spotter - please contact ThoughtSpot support to enable Spotter on your cluster. + * @param createAgentConversationRequest + */ + createAgentConversation(createAgentConversationRequest, _options) { + return __async(this, null, function* () { + var _a, _b, _c; + let _config = _options || this.configuration; + if (createAgentConversationRequest === null || createAgentConversationRequest === void 0) { + throw new RequiredError("AIApi", "createAgentConversation", "createAgentConversationRequest"); + } + const localVarPath = "/api/rest/2.0/ai/agent/conversation/create"; + const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.25.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.25.0"); + const contentType = ObjectSerializer.getPreferredMediaType([ + "application/json" + ]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = ObjectSerializer.stringify( + ObjectSerializer.serialize(createAgentConversationRequest, "CreateAgentConversationRequest", ""), + contentType + ); + requestContext.setBody(serializedBody); + let authMethod; + authMethod = _config.authMethods["bearerAuth"]; + if (authMethod == null ? void 0 : authMethod.applySecurityAuthentication) { + yield authMethod == null ? void 0 : authMethod.applySecurityAuthentication(requestContext); + } + const defaultAuth = ((_a = _options == null ? void 0 : _options.authMethods) == null ? void 0 : _a.default) || ((_c = (_b = this.configuration) == null ? void 0 : _b.authMethods) == null ? void 0 : _c.default); + if (defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication) { + yield defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication(requestContext); + } + return requestContext; + }); + } + /** + * Version: 10.4.0.cl or later Creates a new conversation session tied to a specific data model for AI-driven natural language querying. Requires `CAN_USE_SPOTTER` privilege and at least view access to the metadata object specified in the request. #### Usage guidelines The request must include: - `metadata_identifier`: the unique ID of the data source that provides context for the conversation Optionally, you can provide: - `tokens`: a token string to set initial context for the conversation (e.g., `\"[sales],[item type],[state]\"`) If the request is successful, ThoughtSpot returns a unique `conversation_identifier` that must be passed to `sendMessage` to continue the conversation. #### Error responses | Code | Description | |------|-------------| | 401 | Unauthorized — authentication token is missing, expired, or invalid. | | 403 | Forbidden — the authenticated user does not have `CAN_USE_SPOTTER` privilege or lacks view permission on the specified metadata object. | > ###### Note: > * This endpoint is currently in Beta. Breaking changes may be introduced before the endpoint is made Generally Available. > * This endpoint requires Spotter - please contact ThoughtSpot support to enable Spotter on your cluster. + * @param createConversationRequest + */ + createConversation(createConversationRequest, _options) { + return __async(this, null, function* () { + var _a, _b, _c; + let _config = _options || this.configuration; + if (createConversationRequest === null || createConversationRequest === void 0) { + throw new RequiredError("AIApi", "createConversation", "createConversationRequest"); + } + const localVarPath = "/api/rest/2.0/ai/conversation/create"; + const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.25.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.25.0"); + const contentType = ObjectSerializer.getPreferredMediaType([ + "application/json" + ]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = ObjectSerializer.stringify( + ObjectSerializer.serialize(createConversationRequest, "CreateConversationRequest", ""), + contentType + ); + requestContext.setBody(serializedBody); + let authMethod; + authMethod = _config.authMethods["bearerAuth"]; + if (authMethod == null ? void 0 : authMethod.applySecurityAuthentication) { + yield authMethod == null ? void 0 : authMethod.applySecurityAuthentication(requestContext); + } + const defaultAuth = ((_a = _options == null ? void 0 : _options.authMethods) == null ? void 0 : _a.default) || ((_c = (_b = this.configuration) == null ? void 0 : _b.authMethods) == null ? void 0 : _c.default); + if (defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication) { + yield defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication(requestContext); + } + return requestContext; + }); + } + /** + * Version: 10.15.0.cl or later Suggests the most relevant data sources for a given natural language query, ranked by confidence with LLM-generated reasoning. Requires `CAN_USE_SPOTTER` privilege and at least view-level access to the underlying metadata entities referenced in the response. #### Usage guidelines The request must include: - `query`: the natural language question to find relevant data sources for If the request is successful, the API returns a ranked list of suggested data sources, each containing: - `confidence`: a float score indicating the model\'s confidence in the relevance of the suggestion - `details`: metadata about the data source - `data_source_identifier`: the unique ID of the data source - `data_source_name`: the display name of the data source - `description`: a description of the data source - `reasoning`: LLM-generated rationale explaining why the data source was recommended #### Error responses | Code | Description | |------|--------------------------------------------------------------------------------------------------------------------------------------------| | 401 | Unauthorized — authentication token is missing, expired, or invalid. | | 403 | Forbidden — the authenticated user does not have `CAN_USE_SPOTTER` privilege or lacks view permission on the underlying metadata entities. | > ###### Note: > * This endpoint is currently in Beta. Breaking changes may be introduced before it is made Generally Available. > * This endpoint requires Spotter — please contact ThoughtSpot Support to enable Spotter on your cluster. + * @param getDataSourceSuggestionsRequest + */ + getDataSourceSuggestions(getDataSourceSuggestionsRequest, _options) { + return __async(this, null, function* () { + var _a, _b, _c; + let _config = _options || this.configuration; + if (getDataSourceSuggestionsRequest === null || getDataSourceSuggestionsRequest === void 0) { + throw new RequiredError("AIApi", "getDataSourceSuggestions", "getDataSourceSuggestionsRequest"); + } + const localVarPath = "/api/rest/2.0/ai/data-source-suggestions"; + const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.25.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.25.0"); + const contentType = ObjectSerializer.getPreferredMediaType([ + "application/json" + ]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = ObjectSerializer.stringify( + ObjectSerializer.serialize(getDataSourceSuggestionsRequest, "GetDataSourceSuggestionsRequest", ""), + contentType + ); + requestContext.setBody(serializedBody); + let authMethod; + authMethod = _config.authMethods["bearerAuth"]; + if (authMethod == null ? void 0 : authMethod.applySecurityAuthentication) { + yield authMethod == null ? void 0 : authMethod.applySecurityAuthentication(requestContext); + } + const defaultAuth = ((_a = _options == null ? void 0 : _options.authMethods) == null ? void 0 : _a.default) || ((_c = (_b = this.configuration) == null ? void 0 : _b.authMethods) == null ? void 0 : _c.default); + if (defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication) { + yield defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication(requestContext); + } + return requestContext; + }); + } + /** + * Version: 10.15.0.cl or later Retrieves existing natural language (NL) instructions configured for a specific data model. These instructions guide the AI system in understanding data context and generating more accurate responses. Requires `CAN_USE_SPOTTER` privilege, at least view access on the data model, and a bearer token corresponding to the org where the data model exists. #### Usage guidelines The request must include: - `data_source_identifier`: the unique ID of the data model to retrieve instructions for If the request is successful, the API returns: - `nl_instructions_info`: an array of instruction objects, each containing: - `instructions`: the configured text instructions for AI processing - `scope`: the scope of the instruction — currently only `GLOBAL` is supported #### Instructions scope - **GLOBAL**: Instructions that apply globally across the system on the given data-model (currently only global instructions are supported) #### Error responses | Code | Description | |------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| | 401 | Unauthorized — authentication token is missing, expired, or invalid. | | 403 | Forbidden — the authenticated user does not have `CAN_USE_SPOTTER` privilege, lacks view access on the data model, or the bearer token does not correspond to the org where the data model exists. | > ###### Note: > > - To use this API, the user needs at least view access on the data model, and must use the bearer token corresponding to the org where the data model exists. > - This endpoint is currently in Beta. Breaking changes may be introduced before the endpoint is made Generally Available. > - Available from version 10.15.0.cl and later. > - This endpoint requires Spotter — please contact ThoughtSpot Support to enable Spotter on your cluster. > - Use this API to review currently configured instructions before modifying them with `setNLInstructions`. + * @param getNLInstructionsRequest + */ + getNLInstructions(getNLInstructionsRequest, _options) { + return __async(this, null, function* () { + var _a, _b, _c; + let _config = _options || this.configuration; + if (getNLInstructionsRequest === null || getNLInstructionsRequest === void 0) { + throw new RequiredError("AIApi", "getNLInstructions", "getNLInstructionsRequest"); + } + const localVarPath = "/api/rest/2.0/ai/instructions/get"; + const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.25.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.25.0"); + const contentType = ObjectSerializer.getPreferredMediaType([ + "application/json" + ]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = ObjectSerializer.stringify( + ObjectSerializer.serialize(getNLInstructionsRequest, "GetNLInstructionsRequest", ""), + contentType + ); + requestContext.setBody(serializedBody); + let authMethod; + authMethod = _config.authMethods["bearerAuth"]; + if (authMethod == null ? void 0 : authMethod.applySecurityAuthentication) { + yield authMethod == null ? void 0 : authMethod.applySecurityAuthentication(requestContext); + } + const defaultAuth = ((_a = _options == null ? void 0 : _options.authMethods) == null ? void 0 : _a.default) || ((_c = (_b = this.configuration) == null ? void 0 : _b.authMethods) == null ? void 0 : _c.default); + if (defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication) { + yield defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication(requestContext); + } + return requestContext; + }); + } + /** + * Version: 10.13.0.cl or later Breaks down a natural language query into a series of smaller analytical sub-questions, each mapped to a relevant data source. Requires `CAN_USE_SPOTTER` privilege and at least view-level access to the referenced metadata objects. #### Usage guidelines The request must include: - `query`: the natural language question to decompose into analytical sub-questions - `metadata_context`: at least one of the following context identifiers to guide question generation: - `conversation_identifier` — an existing conversation session ID - `answer_identifiers` — a list of Answer GUIDs - `liveboard_identifiers` — a list of Liveboard GUIDs - `data_source_identifiers` — a list of data source GUIDs Optional parameters for refining the output: - `ai_context`: additional context to improve response quality - `content` — supplementary text or CSV data as string input - `instructions` — custom text instructions for the AI system - `limit_relevant_questions`: maximum number of questions to return (default: `5`) - `bypass_cache`: if `true`, forces fresh computation instead of returning cached results If the request is successful, the API returns a list of relevant analytical questions, each containing: - `query`: the generated sub-question - `data_source_identifier`: the unique ID of the data source the question targets - `data_source_name`: the display name of the corresponding data source #### Error responses | Code | Description | |------|---------------------------------------------------------------------------------------------------------------------------------------| | 401 | Unauthorized — authentication token is missing, expired, or invalid. | | 403 | Forbidden — the authenticated user does not have `CAN_USE_SPOTTER` privilege or lacks view access to the referenced metadata objects. | > ###### Note: > * This endpoint is currently in Beta. Breaking changes may be introduced before the endpoint is made Generally Available. > * This endpoint requires Spotter - please contact ThoughtSpot support to enable Spotter on your cluster. + * @param getRelevantQuestionsRequest + */ + getRelevantQuestions(getRelevantQuestionsRequest, _options) { + return __async(this, null, function* () { + var _a, _b, _c; + let _config = _options || this.configuration; + if (getRelevantQuestionsRequest === null || getRelevantQuestionsRequest === void 0) { + throw new RequiredError("AIApi", "getRelevantQuestions", "getRelevantQuestionsRequest"); + } + const localVarPath = "/api/rest/2.0/ai/relevant-questions/"; + const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.25.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.25.0"); + const contentType = ObjectSerializer.getPreferredMediaType([ + "application/json" + ]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = ObjectSerializer.stringify( + ObjectSerializer.serialize(getRelevantQuestionsRequest, "GetRelevantQuestionsRequest", ""), + contentType + ); + requestContext.setBody(serializedBody); + let authMethod; + authMethod = _config.authMethods["bearerAuth"]; + if (authMethod == null ? void 0 : authMethod.applySecurityAuthentication) { + yield authMethod == null ? void 0 : authMethod.applySecurityAuthentication(requestContext); + } + const defaultAuth = ((_a = _options == null ? void 0 : _options.authMethods) == null ? void 0 : _a.default) || ((_c = (_b = this.configuration) == null ? void 0 : _b.authMethods) == null ? void 0 : _c.default); + if (defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication) { + yield defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication(requestContext); + } + return requestContext; + }); + } + /** + * Version: 10.7.0.cl or later **Deprecated** — Use `getRelevantQuestions` instead (available from 10.13.0.cl). Breaks down a topical or goal-oriented natural language question into smaller, actionable analytical sub-questions, each mapped to a relevant data source for independent execution. Requires `CAN_USE_SPOTTER` privilege and at least view-level access to the referenced metadata objects. #### Usage guidelines The request accepts the following parameters: - `nlsRequest`: contains the user `query` to decompose, along with optional `instructions` and `bypassCache` flag - `worksheetIds`: list of data source identifiers to scope the decomposition - `answerIds`: list of Answer GUIDs whose data guides the response - `liveboardIds`: list of Liveboard GUIDs whose data guides the response - `conversationId`: an existing conversation session ID for context continuity - `content`: supplementary text or CSV data to improve response quality - `maxDecomposedQueries`: maximum number of sub-questions to return (default: `5`) If the request is successful, the API returns a `decomposedQueryResponse` containing a list of `decomposedQueries`, each with: - `query`: the generated analytical sub-question - `worksheetId`: the unique ID of the data source the question targets - `worksheetName`: the display name of the corresponding data source #### Error responses | Code | Description | |------|---------------------------------------------------------------------------------------------------------------------------------------| | 401 | Unauthorized — authentication token is missing, expired, or invalid. | | 403 | Forbidden — the authenticated user does not have `CAN_USE_SPOTTER` privilege or lacks view access to the referenced metadata objects. | > ###### Note: > * This endpoint is deprecated since 10.13.0.cl. Use `getRelevantQuestions` for new integrations. > * This endpoint is currently in Beta. Breaking changes may be introduced before the endpoint is made Generally Available. > * This endpoint requires Spotter — please contact ThoughtSpot support to enable Spotter on your cluster. + * @param queryGetDecomposedQueryRequest + */ + queryGetDecomposedQuery(queryGetDecomposedQueryRequest, _options) { + return __async(this, null, function* () { + var _a, _b, _c; + let _config = _options || this.configuration; + if (queryGetDecomposedQueryRequest === null || queryGetDecomposedQueryRequest === void 0) { + throw new RequiredError("AIApi", "queryGetDecomposedQuery", "queryGetDecomposedQueryRequest"); + } + const localVarPath = "/api/rest/2.0/ai/analytical-questions"; + const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.25.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.25.0"); + const contentType = ObjectSerializer.getPreferredMediaType([ + "application/json" + ]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = ObjectSerializer.stringify( + ObjectSerializer.serialize(queryGetDecomposedQueryRequest, "QueryGetDecomposedQueryRequest", ""), + contentType + ); + requestContext.setBody(serializedBody); + let authMethod; + authMethod = _config.authMethods["bearerAuth"]; + if (authMethod == null ? void 0 : authMethod.applySecurityAuthentication) { + yield authMethod == null ? void 0 : authMethod.applySecurityAuthentication(requestContext); + } + const defaultAuth = ((_a = _options == null ? void 0 : _options.authMethods) == null ? void 0 : _a.default) || ((_c = (_b = this.configuration) == null ? void 0 : _b.authMethods) == null ? void 0 : _c.default); + if (defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication) { + yield defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication(requestContext); + } + return requestContext; + }); + } + /** + * Version: 26.5.0.cl or later Sends natural language messages to an existing Spotter agent conversation and returns the complete response synchronously. Requires `CAN_USE_SPOTTER` privilege and access to the metadata object associated with the conversation. The user must have access to the conversation session referenced by `conversation_identifier`. A conversation must first be created using the `createAgentConversation` API. #### Usage guidelines The request must include: - `conversation_identifier`: the unique session ID returned by `createAgentConversation`, used for context continuity and message tracking - `messages`: an array of one or more text messages to send to the agent The API returns an array of response objects, each containing: - `type`: the kind of response — `text`, `answer`, or `error` - `message`: the main content of the response - `metadata`: additional information depending on the message type (e.g., answer metadata includes analytics and visualization details) #### Error responses | Code | Description | |------|----------------------------------------------------------------------------------------------------------------------------------| | 401 | Unauthorized — authentication token is missing, expired, or invalid. | | 403 | Forbidden — the authenticated user does not have `CAN_USE_SPOTTER` privilege or lacks permission on the referenced conversation. | > ###### Note: > > - This endpoint is Generally Available from version 26.5.0.cl. > - This endpoint requires Spotter - please contact ThoughtSpot support to enable Spotter on your cluster. > - For real-time streamed responses, use `sendAgentConversationMessageStreaming` instead. + * @param conversationIdentifier Unique identifier for the conversation (used to track context) + * @param sendAgentConversationMessageRequest + */ + sendAgentConversationMessage(conversationIdentifier, sendAgentConversationMessageRequest, _options) { + return __async(this, null, function* () { + var _a, _b, _c; + let _config = _options || this.configuration; + if (conversationIdentifier === null || conversationIdentifier === void 0) { + throw new RequiredError("AIApi", "sendAgentConversationMessage", "conversationIdentifier"); + } + if (sendAgentConversationMessageRequest === null || sendAgentConversationMessageRequest === void 0) { + throw new RequiredError("AIApi", "sendAgentConversationMessage", "sendAgentConversationMessageRequest"); + } + const localVarPath = "/api/rest/2.0/ai/agent/conversation/{conversation_identifier}/send".replace("{conversation_identifier}", encodeURIComponent(String(conversationIdentifier))); + const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.25.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.25.0"); + const contentType = ObjectSerializer.getPreferredMediaType([ + "application/json" + ]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = ObjectSerializer.stringify( + ObjectSerializer.serialize(sendAgentConversationMessageRequest, "SendAgentConversationMessageRequest", ""), + contentType + ); + requestContext.setBody(serializedBody); + let authMethod; + authMethod = _config.authMethods["bearerAuth"]; + if (authMethod == null ? void 0 : authMethod.applySecurityAuthentication) { + yield authMethod == null ? void 0 : authMethod.applySecurityAuthentication(requestContext); + } + const defaultAuth = ((_a = _options == null ? void 0 : _options.authMethods) == null ? void 0 : _a.default) || ((_c = (_b = this.configuration) == null ? void 0 : _b.authMethods) == null ? void 0 : _c.default); + if (defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication) { + yield defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication(requestContext); + } + return requestContext; + }); + } + /** + * Version: 26.5.0.cl or later Sends one or more natural language messages to an existing Spotter agent conversation and returns the response as a real-time Server-Sent Events stream. Requires `CAN_USE_SPOTTER` privilege and access to the metadata object associated with the conversation. The user must have access to the conversation session referenced by `conversation_identifier`. A conversation must first be created using the `createAgentConversation` API. #### Usage guidelines The request must include: - `conversation_identifier`: the unique session ID returned by `createAgentConversation`, used for context continuity and message tracking - `messages`: an array of one or more text messages to send to the agent If the request is valid, the API returns a Server-Sent Events (SSE) stream. Each line has the form `data: [{\"type\": \"...\", ...}]` — a JSON array of event objects. Event types include: - `ack`: confirms receipt of the request (`node_id`) - `conv_title`: conversation title (`title`, `conv_id`) - `notification`: status updates on operations (`group_id`, `metadata`, `code` — e.g. `TOOL_CALL_NOTIFICATION`, `nls_start`, `FINAL_RESPONSE_NOTIFICATION`) - `text-chunk`: incremental content chunks (`id`, `group_id`, `metadata` with `format` and `type` such as `thinking` or `text`, `content`) - `text`: full text block with same structure as `text-chunk` - `answer`: structured answer with metadata (`id`, `group_id`, `metadata` with `sage_query`, `session_id`, `title`, etc., `title`) - `error`: if a failure occurs #### Error responses | Code | Description | | ---- | -------------------------------------------------------------------------------------------------------------------------------- | | 401 | Unauthorized — authentication token is missing, expired, or invalid. | | 403 | Forbidden — the authenticated user does not have `CAN_USE_SPOTTER` privilege or lacks permission on the referenced conversation. | > ###### Note: > > - This endpoint is Generally Available from version 26.5.0.cl. > - This endpoint requires Spotter - please contact ThoughtSpot support to enable Spotter on your cluster. > - The streaming protocol uses Server-Sent Events (SSE). > - For the complete response in a single payload, use `sendAgentConversationMessage` instead. + * @param conversationIdentifier Unique identifier for the conversation (used to track context) + * @param sendAgentConversationMessageStreamingRequest + */ + sendAgentConversationMessageStreaming(conversationIdentifier, sendAgentConversationMessageStreamingRequest, _options) { + return __async(this, null, function* () { + var _a, _b, _c; + let _config = _options || this.configuration; + if (conversationIdentifier === null || conversationIdentifier === void 0) { + throw new RequiredError("AIApi", "sendAgentConversationMessageStreaming", "conversationIdentifier"); + } + if (sendAgentConversationMessageStreamingRequest === null || sendAgentConversationMessageStreamingRequest === void 0) { + throw new RequiredError("AIApi", "sendAgentConversationMessageStreaming", "sendAgentConversationMessageStreamingRequest"); + } + const localVarPath = "/api/rest/2.0/ai/agent/conversation/{conversation_identifier}/send/stream".replace("{conversation_identifier}", encodeURIComponent(String(conversationIdentifier))); + const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.25.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.25.0"); + const contentType = ObjectSerializer.getPreferredMediaType([ + "application/json" + ]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = ObjectSerializer.stringify( + ObjectSerializer.serialize(sendAgentConversationMessageStreamingRequest, "SendAgentConversationMessageStreamingRequest", ""), + contentType + ); + requestContext.setBody(serializedBody); + let authMethod; + authMethod = _config.authMethods["bearerAuth"]; + if (authMethod == null ? void 0 : authMethod.applySecurityAuthentication) { + yield authMethod == null ? void 0 : authMethod.applySecurityAuthentication(requestContext); + } + const defaultAuth = ((_a = _options == null ? void 0 : _options.authMethods) == null ? void 0 : _a.default) || ((_c = (_b = this.configuration) == null ? void 0 : _b.authMethods) == null ? void 0 : _c.default); + if (defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication) { + yield defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication(requestContext); + } + return requestContext; + }); + } + /** + * Version: 26.2.0.cl or later **Deprecated** — Use `sendAgentConversationMessage` instead. Send natural language messages to an existing Spotter agent conversation and returns the complete response synchronously. Requires `CAN_USE_SPOTTER` privilege and access to the metadata object associated with the conversation. The user must have access to the conversation session referenced by `conversation_identifier`. A conversation must first be created using the `createAgentConversation` API. #### Usage guidelines The request must include: - `conversation_identifier`: the unique session ID returned by `createAgentConversation`, used for context continuity and message tracking - `messages`: an array of one or more text messages to send to the agent The API returns an array of response objects, each containing: - `type`: the kind of response — `text`, `answer`, or `error` - `message`: the main content of the response - `metadata`: additional information depending on the message type (e.g., answer metadata includes analytics and visualization details) #### Error responses | Code | Description | |------|----------------------------------------------------------------------------------------------------------------------------------| | 401 | Unauthorized — authentication token is missing, expired, or invalid. | | 403 | Forbidden — the authenticated user does not have `CAN_USE_SPOTTER` privilege or lacks permission on the referenced conversation. | > ###### Note: > > - This endpoint is deprecated. Use `sendAgentConversationMessage` for new integrations. > - This endpoint is currently in Beta. Breaking changes may be introduced before the endpoint is made Generally Available. > - This endpoint requires Spotter - please contact ThoughtSpot support to enable Spotter on your cluster. + * @param conversationIdentifier Unique identifier for the conversation (used to track context) + * @param sendAgentMessageRequest + */ + sendAgentMessage(conversationIdentifier, sendAgentMessageRequest, _options) { + return __async(this, null, function* () { + var _a, _b, _c; + let _config = _options || this.configuration; + if (conversationIdentifier === null || conversationIdentifier === void 0) { + throw new RequiredError("AIApi", "sendAgentMessage", "conversationIdentifier"); + } + if (sendAgentMessageRequest === null || sendAgentMessageRequest === void 0) { + throw new RequiredError("AIApi", "sendAgentMessage", "sendAgentMessageRequest"); + } + const localVarPath = "/api/rest/2.0/ai/agent/{conversation_identifier}/converse".replace("{conversation_identifier}", encodeURIComponent(String(conversationIdentifier))); + const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.25.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.25.0"); + const contentType = ObjectSerializer.getPreferredMediaType([ + "application/json" + ]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = ObjectSerializer.stringify( + ObjectSerializer.serialize(sendAgentMessageRequest, "SendAgentMessageRequest", ""), + contentType + ); + requestContext.setBody(serializedBody); + let authMethod; + authMethod = _config.authMethods["bearerAuth"]; + if (authMethod == null ? void 0 : authMethod.applySecurityAuthentication) { + yield authMethod == null ? void 0 : authMethod.applySecurityAuthentication(requestContext); + } + const defaultAuth = ((_a = _options == null ? void 0 : _options.authMethods) == null ? void 0 : _a.default) || ((_c = (_b = this.configuration) == null ? void 0 : _b.authMethods) == null ? void 0 : _c.default); + if (defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication) { + yield defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication(requestContext); + } + return requestContext; + }); + } + /** + * Version: 26.2.0.cl or later **Deprecated** — Use `sendAgentConversationMessageStreaming` instead. Sends one or more natural language messages to an existing Spotter agent conversation and returns the response as a real-time Server-Sent Events stream. Requires `CAN_USE_SPOTTER` privilege and access to the metadata object associated with the conversation. The user must have access to the conversation session referenced by `conversation_identifier`. A conversation must first be created using the `createAgentConversation` API. #### Usage guidelines The request must include: - `conversation_identifier`: the unique session ID returned by `createAgentConversation`, used for context continuity and message tracking - `messages`: an array of one or more text messages to send to the agent If the request is valid, the API returns a Server-Sent Events (SSE) stream. Each line has the form `data: [{\"type\": \"...\", ...}]` — a JSON array of event objects. Event types include: - `ack`: confirms receipt of the request (`node_id`) - `conv_title`: conversation title (`title`, `conv_id`) - `notification`: status updates on operations (`group_id`, `metadata`, `code` — e.g. `TOOL_CALL_NOTIFICATION`, `nls_start`, `FINAL_RESPONSE_NOTIFICATION`) - `text-chunk`: incremental content chunks (`id`, `group_id`, `metadata` with `format` and `type` such as `thinking` or `text`, `content`) - `text`: full text block with same structure as `text-chunk` - `answer`: structured answer with metadata (`id`, `group_id`, `metadata` with `sage_query`, `session_id`, `title`, etc., `title`) - `error`: if a failure occurs #### Error responses | Code | Description | |------|----------------------------------------------------------------------------------------------------------------------------------| | 401 | Unauthorized — authentication token is missing, expired, or invalid. | | 403 | Forbidden — the authenticated user does not have `CAN_USE_SPOTTER` privilege or lacks permission on the referenced conversation. | > ###### Note: > > - This endpoint is deprecated. Use `sendAgentConversationMessageStreaming` for new integrations. > - This endpoint is currently in Beta. Breaking changes may be introduced before the endpoint is made Generally Available. > - This endpoint requires Spotter - please contact ThoughtSpot support to enable Spotter on your cluster. > - The streaming protocol uses Server-Sent Events (SSE). + * @param sendAgentMessageStreamingRequest + */ + sendAgentMessageStreaming(sendAgentMessageStreamingRequest, _options) { + return __async(this, null, function* () { + var _a, _b, _c; + let _config = _options || this.configuration; + if (sendAgentMessageStreamingRequest === null || sendAgentMessageStreamingRequest === void 0) { + throw new RequiredError("AIApi", "sendAgentMessageStreaming", "sendAgentMessageStreamingRequest"); + } + const localVarPath = "/api/rest/2.0/ai/agent/converse/sse"; + const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.25.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.25.0"); + const contentType = ObjectSerializer.getPreferredMediaType([ + "application/json" + ]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = ObjectSerializer.stringify( + ObjectSerializer.serialize(sendAgentMessageStreamingRequest, "SendAgentMessageStreamingRequest", ""), + contentType + ); + requestContext.setBody(serializedBody); + let authMethod; + authMethod = _config.authMethods["bearerAuth"]; + if (authMethod == null ? void 0 : authMethod.applySecurityAuthentication) { + yield authMethod == null ? void 0 : authMethod.applySecurityAuthentication(requestContext); + } + const defaultAuth = ((_a = _options == null ? void 0 : _options.authMethods) == null ? void 0 : _a.default) || ((_c = (_b = this.configuration) == null ? void 0 : _b.authMethods) == null ? void 0 : _c.default); + if (defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication) { + yield defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication(requestContext); + } + return requestContext; + }); + } + /** + * Version: 10.4.0.cl or later Sends a follow-up message to an existing conversation within the context of a data model. Requires `CAN_USE_SPOTTER` privilege and at least view access to the metadata object specified in the request. A conversation must first be created using the `createConversation` API. #### Usage guidelines The request must include: - `conversation_identifier`: the unique session ID returned by `createConversation` - `metadata_identifier`: the unique ID of the data source used for the conversation - `message`: a natural language string with the follow-up question If the request is successful, the API returns an array of response messages, each containing: - `session_identifier`: the unique ID of the generated response - `generation_number`: the generation number of the response - `message_type`: the type of the response (e.g., `TSAnswer`) - `visualization_type`: the generated visualization type (`Chart`, `Table`, or `Undefined`) - `tokens` / `display_tokens`: the search tokens and user-friendly display tokens for the response #### Error responses | Code | Description | |------|-----------------------------------------------------------------------------------------------------------------------------------------| | 401 | Unauthorized — authentication token is missing, expired, or invalid. | | 403 | Forbidden — the authenticated user does not have `CAN_USE_SPOTTER` privilege or lacks view permission on the specified metadata object. | > ###### Note: > * This endpoint is currently in Beta. Breaking changes may be introduced before the endpoint is made Generally Available. > * This endpoint requires Spotter - please contact ThoughtSpot support to enable Spotter on your cluster. + * @param conversationIdentifier Unique identifier of the conversation. + * @param sendMessageRequest + */ + sendMessage(conversationIdentifier, sendMessageRequest, _options) { + return __async(this, null, function* () { + var _a, _b, _c; + let _config = _options || this.configuration; + if (conversationIdentifier === null || conversationIdentifier === void 0) { + throw new RequiredError("AIApi", "sendMessage", "conversationIdentifier"); + } + if (sendMessageRequest === null || sendMessageRequest === void 0) { + throw new RequiredError("AIApi", "sendMessage", "sendMessageRequest"); + } + const localVarPath = "/api/rest/2.0/ai/conversation/{conversation_identifier}/converse".replace("{conversation_identifier}", encodeURIComponent(String(conversationIdentifier))); + const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.25.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.25.0"); + const contentType = ObjectSerializer.getPreferredMediaType([ + "application/json" + ]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = ObjectSerializer.stringify( + ObjectSerializer.serialize(sendMessageRequest, "SendMessageRequest", ""), + contentType + ); + requestContext.setBody(serializedBody); + let authMethod; + authMethod = _config.authMethods["bearerAuth"]; + if (authMethod == null ? void 0 : authMethod.applySecurityAuthentication) { + yield authMethod == null ? void 0 : authMethod.applySecurityAuthentication(requestContext); + } + const defaultAuth = ((_a = _options == null ? void 0 : _options.authMethods) == null ? void 0 : _a.default) || ((_c = (_b = this.configuration) == null ? void 0 : _b.authMethods) == null ? void 0 : _c.default); + if (defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication) { + yield defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication(requestContext); + } + return requestContext; + }); + } + /** + * Version: 10.15.0.cl or later This API allows users to set natural language (NL) instructions for a specific data-model to improve AI-generated answers and query processing. These instructions help guide the AI system to better understand the data context and provide more accurate responses. Requires `CAN_USE_SPOTTER` privilege, either edit access or `SPOTTER_COACHING_PRIVILEGE` on the data model, and a bearer token corresponding to the org where the data model exists. #### Usage guidelines To set NL instructions for a data-model, the request must include: - `data_source_identifier`: The unique ID of the data-model for which to set NL instructions - `nl_instructions_info`: An array of instruction objects, each containing: - `instructions`: Array of text instructions for the LLM - `scope`: The scope of the instruction (`GLOBAL`). Currently only `GLOBAL` is supported. It can be extended to data-model-user scope in future. #### Instructions scope - **GLOBAL**: instructions that apply to all users querying this data model If the request is successful, the API returns: - `success`: a boolean indicating whether the operation completed successfully #### Error responses | Code | Description | |------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| | 401 | Unauthorized — authentication token is missing, expired, or invalid. | | 403 | Forbidden — the authenticated user does not have `CAN_USE_SPOTTER` privilege, lacks edit access or `SPOTTER_COACHING_PRIVILEGE` on the data model, or the bearer token does not correspond to the org where the data model exists. | > ###### Note: > > - To use this API, the user needs either edit access or `SPOTTER_COACHING_PRIVILEGE` on the data model, and must use the bearer token corresponding to the org where the data model exists. > - This endpoint is currently in Beta. Breaking changes may be introduced before the endpoint is made Generally Available. > - Available from version 10.15.0.cl and later. > - This endpoint requires Spotter — please contact ThoughtSpot Support to enable Spotter on your cluster. > - Instructions help improve the accuracy and relevance of AI-generated responses for the specified data-model. + * @param setNLInstructionsRequest + */ + setNLInstructions(setNLInstructionsRequest, _options) { + return __async(this, null, function* () { + var _a, _b, _c; + let _config = _options || this.configuration; + if (setNLInstructionsRequest === null || setNLInstructionsRequest === void 0) { + throw new RequiredError("AIApi", "setNLInstructions", "setNLInstructionsRequest"); + } + const localVarPath = "/api/rest/2.0/ai/instructions/set"; + const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.25.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.25.0"); + const contentType = ObjectSerializer.getPreferredMediaType([ + "application/json" + ]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = ObjectSerializer.stringify( + ObjectSerializer.serialize(setNLInstructionsRequest, "SetNLInstructionsRequest", ""), + contentType + ); + requestContext.setBody(serializedBody); + let authMethod; + authMethod = _config.authMethods["bearerAuth"]; + if (authMethod == null ? void 0 : authMethod.applySecurityAuthentication) { + yield authMethod == null ? void 0 : authMethod.applySecurityAuthentication(requestContext); + } + const defaultAuth = ((_a = _options == null ? void 0 : _options.authMethods) == null ? void 0 : _a.default) || ((_c = (_b = this.configuration) == null ? void 0 : _b.authMethods) == null ? void 0 : _c.default); + if (defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication) { + yield defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication(requestContext); + } + return requestContext; + }); + } + /** + * Version: 10.4.0.cl or later Processes a natural language query against a specified data model and returns a single AI-generated answer without requiring a conversation session. Requires `CAN_USE_SPOTTER` privilege and at least view access to the metadata object specified in the request. #### Usage guidelines The request must include: - `query`: a natural language question (e.g., \"What were total sales last quarter?\") - `metadata_identifier`: the unique ID of the data source to query against If the request is successful, the API returns a response message containing: - `session_identifier`: the unique ID of the generated response - `generation_number`: the generation number of the response - `message_type`: the type of the response (e.g., `TSAnswer`) - `visualization_type`: the generated visualization type (`Chart`, `Table`, or `Undefined`) - `tokens` / `display_tokens`: the search tokens and user-friendly display tokens for the response #### Error responses | Code | Description | |------|-----------------------------------------------------------------------------------------------------------------------------------------| | 401 | Unauthorized — authentication token is missing, expired, or invalid. | | 403 | Forbidden — the authenticated user does not have `CAN_USE_SPOTTER` privilege or lacks view permission on the specified metadata object. | > ###### Note: > * This endpoint is currently in Beta. Breaking changes may be introduced before the endpoint is made Generally Available. > * This endpoint requires Spotter - please contact ThoughtSpot support to enable Spotter on your cluster. + * @param singleAnswerRequest + */ + singleAnswer(singleAnswerRequest, _options) { + return __async(this, null, function* () { + var _a, _b, _c; + let _config = _options || this.configuration; + if (singleAnswerRequest === null || singleAnswerRequest === void 0) { + throw new RequiredError("AIApi", "singleAnswer", "singleAnswerRequest"); + } + const localVarPath = "/api/rest/2.0/ai/answer/create"; + const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.25.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.25.0"); + const contentType = ObjectSerializer.getPreferredMediaType([ + "application/json" + ]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = ObjectSerializer.stringify( + ObjectSerializer.serialize(singleAnswerRequest, "SingleAnswerRequest", ""), + contentType + ); + requestContext.setBody(serializedBody); + let authMethod; + authMethod = _config.authMethods["bearerAuth"]; + if (authMethod == null ? void 0 : authMethod.applySecurityAuthentication) { + yield authMethod == null ? void 0 : authMethod.applySecurityAuthentication(requestContext); + } + const defaultAuth = ((_a = _options == null ? void 0 : _options.authMethods) == null ? void 0 : _a.default) || ((_c = (_b = this.configuration) == null ? void 0 : _b.authMethods) == null ? void 0 : _c.default); + if (defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication) { + yield defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication(requestContext); + } + return requestContext; + }); + } + /** + * Stops an in-progress agent conversation response. Version: 26.6.0.cl or later Version: 26.6.0.cl or later Stops an in-progress agent response for the specified conversation. Use this endpoint to cancel a response that is actively being generated — for example, when the user navigates away, reformulates their question, or no longer needs the current result. Requires `CAN_USE_SPOTTER` privilege and access to the specified conversation. #### Usage guidelines The request must include: - `conversation_identifier` *(path parameter)*: the unique ID of the conversation whose active response should be stopped, as returned by `createAgentConversation` A successful request returns an empty `204 No Content` response. If there is no active response in progress at the time of the call, the request is still treated as successful. After stopping a response, the conversation session remains active. You can continue sending messages using `sendAgentConversationMessage` or `sendAgentConversationMessageStreaming`. #### Example request ```bash POST /api/rest/2.0/ai/agent/conversation/{conversation_identifier}/stop-response ``` #### Typical usage scenario This endpoint is useful when integrating Spotter into a chat UI where users can cancel a long-running query. For example: 1. User sends a message via `sendAgentConversationMessageStreaming`. 2. User clicks a \"Stop generating\" button while the response is streaming. 3. Your client calls `stopConversation` with the active `conversation_identifier`. 4. The stream is terminated and the user can ask a new question. #### Error responses | Code | Description | |------|-------------| | 401 | Unauthorized — authentication token is missing, expired, or invalid. | | 403 | Forbidden — the authenticated user does not have `CAN_USE_SPOTTER` privilege or lacks access to the specified conversation. | > ###### Note: > > - Calling this endpoint when no response is in progress does not return an error. > - The conversation context is preserved after stopping — previous messages and answers remain accessible. > - Available from version 26.6.0.cl and later. > - This endpoint requires Spotter — please contact ThoughtSpot Support to enable Spotter on your cluster. > - This feature is available only for **Spotter 3** (`SPOTTER3`) version. + * @param conversationIdentifier Unique identifier of the conversation to stop. + */ + stopConversation(conversationIdentifier, _options) { + return __async(this, null, function* () { + var _a, _b, _c; + let _config = _options || this.configuration; + if (conversationIdentifier === null || conversationIdentifier === void 0) { + throw new RequiredError("AIApi", "stopConversation", "conversationIdentifier"); + } + const localVarPath = "/api/rest/2.0/ai/agent/conversation/{conversation_identifier}/stop-response".replace("{conversation_identifier}", encodeURIComponent(String(conversationIdentifier))); + const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.25.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.25.0"); + let authMethod; + authMethod = _config.authMethods["bearerAuth"]; + if (authMethod == null ? void 0 : authMethod.applySecurityAuthentication) { + yield authMethod == null ? void 0 : authMethod.applySecurityAuthentication(requestContext); + } + const defaultAuth = ((_a = _options == null ? void 0 : _options.authMethods) == null ? void 0 : _a.default) || ((_c = (_b = this.configuration) == null ? void 0 : _b.authMethods) == null ? void 0 : _c.default); + if (defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication) { + yield defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication(requestContext); + } + return requestContext; + }); + } +}; +var AIApiResponseProcessor = class { + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to createAgentConversation + * @throws ApiException if the response code was not in [200, 299] + */ + createAgentConversation(response) { + return __async(this, null, function* () { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("200", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "AgentConversation", + "" + ); + return body; + } + if (isCodeInRange("201", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "AgentConversation", + "" + ); + return body; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Operation failed", body, response.headers); + } + if (isCodeInRange("401", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Operation failed", body, response.headers); + } + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "AgentConversation", + "" + ); + return body; + } + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", yield response.getBodyAsAny(), response.headers); + }); + } + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to createConversation + * @throws ApiException if the response code was not in [200, 299] + */ + createConversation(response) { + return __async(this, null, function* () { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("200", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "Conversation", + "" + ); + return body; + } + if (isCodeInRange("201", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "Conversation", + "" + ); + return body; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Operation failed", body, response.headers); + } + if (isCodeInRange("401", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Operation failed", body, response.headers); + } + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "Conversation", + "" + ); + return body; + } + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", yield response.getBodyAsAny(), response.headers); + }); + } + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to getDataSourceSuggestions + * @throws ApiException if the response code was not in [200, 299] + */ + getDataSourceSuggestions(response) { + return __async(this, null, function* () { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("200", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "EurekaDataSourceSuggestionResponse", + "" + ); + return body; + } + if (isCodeInRange("201", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "EurekaDataSourceSuggestionResponse", + "" + ); + return body; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Operation failed", body, response.headers); + } + if (isCodeInRange("401", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Operation failed", body, response.headers); + } + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "EurekaDataSourceSuggestionResponse", + "" + ); + return body; + } + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", yield response.getBodyAsAny(), response.headers); + }); + } + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to getNLInstructions + * @throws ApiException if the response code was not in [200, 299] + */ + getNLInstructions(response) { + return __async(this, null, function* () { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("200", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "EurekaGetNLInstructionsResponse", + "" + ); + return body; + } + if (isCodeInRange("201", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "EurekaGetNLInstructionsResponse", + "" + ); + return body; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Operation failed", body, response.headers); + } + if (isCodeInRange("401", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Operation failed", body, response.headers); + } + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "EurekaGetNLInstructionsResponse", + "" + ); + return body; + } + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", yield response.getBodyAsAny(), response.headers); + }); + } + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to getRelevantQuestions + * @throws ApiException if the response code was not in [200, 299] + */ + getRelevantQuestions(response) { + return __async(this, null, function* () { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("200", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "EurekaGetRelevantQuestionsResponse", + "" + ); + return body; + } + if (isCodeInRange("201", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "EurekaGetRelevantQuestionsResponse", + "" + ); + return body; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Operation failed", body, response.headers); + } + if (isCodeInRange("401", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Operation failed", body, response.headers); + } + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "EurekaGetRelevantQuestionsResponse", + "" + ); + return body; + } + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", yield response.getBodyAsAny(), response.headers); + }); + } + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to queryGetDecomposedQuery + * @throws ApiException if the response code was not in [200, 299] + */ + queryGetDecomposedQuery(response) { + return __async(this, null, function* () { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("200", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "EurekaDecomposeQueryResponse", + "" + ); + return body; + } + if (isCodeInRange("201", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "EurekaDecomposeQueryResponse", + "" + ); + return body; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Operation failed", body, response.headers); + } + if (isCodeInRange("401", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Operation failed", body, response.headers); + } + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "EurekaDecomposeQueryResponse", + "" + ); + return body; + } + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", yield response.getBodyAsAny(), response.headers); + }); + } + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to sendAgentConversationMessage + * @throws ApiException if the response code was not in [200, 299] + */ + sendAgentConversationMessage(response) { + return __async(this, null, function* () { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("200", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "any", + "" + ); + return body; + } + if (isCodeInRange("201", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "any", + "" + ); + return body; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Operation failed", body, response.headers); + } + if (isCodeInRange("401", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Operation failed", body, response.headers); + } + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "any", + "" + ); + return body; + } + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", yield response.getBodyAsAny(), response.headers); + }); + } + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to sendAgentConversationMessageStreaming + * @throws ApiException if the response code was not in [200, 299] + */ + sendAgentConversationMessageStreaming(response) { + return __async(this, null, function* () { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("200", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "SendAgentMessageResponse", + "" + ); + return body; + } + if (isCodeInRange("201", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "SendAgentMessageResponse", + "" + ); + return body; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Operation failed", body, response.headers); + } + if (isCodeInRange("401", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Operation failed", body, response.headers); + } + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "SendAgentMessageResponse", + "" + ); + return body; + } + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", yield response.getBodyAsAny(), response.headers); + }); + } + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to sendAgentMessage + * @throws ApiException if the response code was not in [200, 299] + */ + sendAgentMessage(response) { + return __async(this, null, function* () { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("200", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "any", + "" + ); + return body; + } + if (isCodeInRange("201", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "any", + "" + ); + return body; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Operation failed", body, response.headers); + } + if (isCodeInRange("401", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Operation failed", body, response.headers); + } + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "any", + "" + ); + return body; + } + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", yield response.getBodyAsAny(), response.headers); + }); + } + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to sendAgentMessageStreaming + * @throws ApiException if the response code was not in [200, 299] + */ + sendAgentMessageStreaming(response) { + return __async(this, null, function* () { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("200", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "SendAgentMessageResponse", + "" + ); + return body; + } + if (isCodeInRange("201", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "SendAgentMessageResponse", + "" + ); + return body; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Operation failed", body, response.headers); + } + if (isCodeInRange("401", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Operation failed", body, response.headers); + } + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "SendAgentMessageResponse", + "" + ); + return body; + } + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", yield response.getBodyAsAny(), response.headers); + }); + } + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to sendMessage + * @throws ApiException if the response code was not in [200, 299] + */ + sendMessage(response) { + return __async(this, null, function* () { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("200", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "Array", + "" + ); + return body; + } + if (isCodeInRange("201", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "Array", + "" + ); + return body; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Operation failed", body, response.headers); + } + if (isCodeInRange("401", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Operation failed", body, response.headers); + } + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "Array", + "" + ); + return body; + } + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", yield response.getBodyAsAny(), response.headers); + }); + } + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to setNLInstructions + * @throws ApiException if the response code was not in [200, 299] + */ + setNLInstructions(response) { + return __async(this, null, function* () { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("200", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "EurekaSetNLInstructionsResponse", + "" + ); + return body; + } + if (isCodeInRange("201", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "EurekaSetNLInstructionsResponse", + "" + ); + return body; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Operation failed", body, response.headers); + } + if (isCodeInRange("401", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Operation failed", body, response.headers); + } + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "EurekaSetNLInstructionsResponse", + "" + ); + return body; + } + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", yield response.getBodyAsAny(), response.headers); + }); + } + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to singleAnswer + * @throws ApiException if the response code was not in [200, 299] + */ + singleAnswer(response) { + return __async(this, null, function* () { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("200", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ResponseMessage", + "" + ); + return body; + } + if (isCodeInRange("201", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ResponseMessage", + "" + ); + return body; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Operation failed", body, response.headers); + } + if (isCodeInRange("401", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Operation failed", body, response.headers); + } + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ResponseMessage", + "" + ); + return body; + } + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", yield response.getBodyAsAny(), response.headers); + }); + } + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to stopConversation + * @throws ApiException if the response code was not in [200, 299] + */ + stopConversation(response) { + return __async(this, null, function* () { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("204", response.httpStatusCode)) { + return; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Operation failed", body, response.headers); + } + if (isCodeInRange("401", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Operation failed", body, response.headers); + } + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "void", + "" + ); + return body; + } + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", yield response.getBodyAsAny(), response.headers); + }); + } +}; + +// apis/AuthenticationApi.ts +var AuthenticationApiRequestFactory = class extends BaseAPIRequestFactory { + /** + * Version: 26.6.0.cl or later Enables or disables authentication at cluster or org level for the specified auth type. Currently supports `TRUSTED_AUTH`. #### Required privileges Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) or `CONTROL_TRUSTED_AUTH` (**Can Enable or Disable Trusted Authentication**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled, the `CONTROL_TRUSTED_AUTH` privilege is required. #### Usage guidelines Use `cluster_preferences` to enable or disable authentication at the cluster level. Cluster-level settings can only be configured from the Primary Org. - `ENABLED` — Generates a new access token if one does not exist. An existing token is preserved. - `DISABLED` — Revokes the existing cluster-level access token. Use `org_preferences` to enable or disable authentication for one or more Orgs. Each entry must include an `org_identifier` (unique ID or name) and an `auth_status`. Org-level configuration requires the per-Org authentication feature to be enabled on your instance. - `ENABLED` — Generates a new org-level access token if one does not exist. - `DISABLED` — Revokes the existing org-level access token for that Org. Both `cluster_preferences` and `org_preferences` are optional. Omitting a field leaves the corresponding settings unchanged. If both are omitted, the API returns `204 No Content` without making any changes. **Note**: Cluster-level and org-level settings are independent of each other. Enabling or disabling one does not affect the other. + * @param configureAuthSettingsRequest + */ + configureAuthSettings(configureAuthSettingsRequest, _options) { + return __async(this, null, function* () { + var _a, _b, _c; + let _config = _options || this.configuration; + if (configureAuthSettingsRequest === null || configureAuthSettingsRequest === void 0) { + throw new RequiredError("AuthenticationApi", "configureAuthSettings", "configureAuthSettingsRequest"); + } + const localVarPath = "/api/rest/2.0/auth/configure"; + const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.25.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.25.0"); + const contentType = ObjectSerializer.getPreferredMediaType([ + "application/json" + ]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = ObjectSerializer.stringify( + ObjectSerializer.serialize(configureAuthSettingsRequest, "ConfigureAuthSettingsRequest", ""), + contentType + ); + requestContext.setBody(serializedBody); + let authMethod; + authMethod = _config.authMethods["bearerAuth"]; + if (authMethod == null ? void 0 : authMethod.applySecurityAuthentication) { + yield authMethod == null ? void 0 : authMethod.applySecurityAuthentication(requestContext); + } + const defaultAuth = ((_a = _options == null ? void 0 : _options.authMethods) == null ? void 0 : _a.default) || ((_c = (_b = this.configuration) == null ? void 0 : _b.authMethods) == null ? void 0 : _c.default); + if (defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication) { + yield defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication(requestContext); + } + return requestContext; + }); + } + /** + * Version: 9.0.0.cl or later Retrieves details of the current user session for the token provided in the request header. Any ThoughtSpot user can access this endpoint and send an API request. The data returned in the API response varies according to user\'s privilege and object access permissions. **NOTE**: In ThoughtSpot, users with cluster administration privileges can access all Orgs by default. However, unless the administrator is explicitly added to an Org, the Orgs list in the session information returned by the API will include only the Primary Org. To include other Orgs in the API response, you must explicitly add the administrator to each Org in the Admin settings page in the UI or via user REST API. + */ + getCurrentUserInfo(_options) { + return __async(this, null, function* () { + var _a, _b, _c; + let _config = _options || this.configuration; + const localVarPath = "/api/rest/2.0/auth/session/user"; + const requestContext = _config.baseServer.makeRequestContext(localVarPath, "GET" /* GET */); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.25.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.25.0"); + let authMethod; + authMethod = _config.authMethods["bearerAuth"]; + if (authMethod == null ? void 0 : authMethod.applySecurityAuthentication) { + yield authMethod == null ? void 0 : authMethod.applySecurityAuthentication(requestContext); + } + const defaultAuth = ((_a = _options == null ? void 0 : _options.authMethods) == null ? void 0 : _a.default) || ((_c = (_b = this.configuration) == null ? void 0 : _b.authMethods) == null ? void 0 : _c.default); + if (defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication) { + yield defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication(requestContext); + } + return requestContext; + }); + } + /** + * Version: 9.4.0.cl or later Retrieves details of the current session token for the bearer token provided in the request header. This API endpoint does not create a new token. Instead, it returns details about the token, including the token string, creation time, expiration time, and the associated user. Use this endpoint to introspect your current session token, debug authentication issues, or when a frontend application needs session token details. Any ThoughtSpot user with a valid bearer token can access this endpoint and send an API request + */ + getCurrentUserToken(_options) { + return __async(this, null, function* () { + var _a, _b, _c; + let _config = _options || this.configuration; + const localVarPath = "/api/rest/2.0/auth/session/token"; + const requestContext = _config.baseServer.makeRequestContext(localVarPath, "GET" /* GET */); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.25.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.25.0"); + let authMethod; + authMethod = _config.authMethods["bearerAuth"]; + if (authMethod == null ? void 0 : authMethod.applySecurityAuthentication) { + yield authMethod == null ? void 0 : authMethod.applySecurityAuthentication(requestContext); + } + const defaultAuth = ((_a = _options == null ? void 0 : _options.authMethods) == null ? void 0 : _a.default) || ((_c = (_b = this.configuration) == null ? void 0 : _b.authMethods) == null ? void 0 : _c.default); + if (defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication) { + yield defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication(requestContext); + } + return requestContext; + }); + } + /** + * Version: 10.4.0.cl or later Creates an authentication token that provides values for the formula variables in the Row Level Security (RLS) rules for a given user. Recommended for use cases that require Attribute-based access control (ABAC) via RLS. #### Required privileges To add a new user and assign privileges during auto-creation, the `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege is required. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled, the `CONTROL_TRUSTED_AUTH` (**Can Enable or Disable Trusted Authentication**) privilege and edit access to the data source are required. To configure formula variables for all Orgs on your instance or the Primary Org, cluster administration privileges are required. Org administrators can configure formula variables for their respective Orgs. If Role-Based Access Control (RBAC) is enabled, users with the `CAN_MANAGE_VARIABLES` (**Can manage variables**) role privilege can also create and manage variables for their Org context. #### Usage guidelines You can generate a token by providing a `username` and `password`, or by using a `secret_key`. To generate a `secret_key`, the administrator must enable [Trusted authentication](https://developers.thoughtspot.com/docs/trusted-auth-secret-key) in the **Develop** > **Customizations** > **Security Settings** page. **Note**: * When both `password` and `secret_key` are included in the API request, `password` takes precedence. * If [Multi-Factor Authentication (MFA)](https://docs.thoughtspot.com/cloud/latest/authentication-local-mfa) is enabled on your instance, the API login request with `username` and `password` returns an error. You can switch to token-based authentication with `secret_key` or contact ThoughtSpot Support for assistance. The token obtained from ThoughtSpot is valid for 5 minutes by default. You can configure the token expiration time as required. #### ABAC via RLS To implement ABAC via RLS and assign security entitlements to users during session creation, generate a token with custom variable values. The values set in the authentication token are applied to the formula variables referenced in RLS rules at the table level, which determines the data each user can access based on their entitlements. The variable values can be configured to persist for a specific set of Models in user sessions initiated with the token, allowing different RLS rules to be set for different data models. Once defined, the rules are added to the user\'s `variable_values` object, after which all sessions will use the persisted values. For more information, see [ABAC via tokens Documentation](https://developers.thoughtspot.com/docs/abac-via-rls-variables). ##### Formula variables Before defining variable values, ensure the variables are created and available on your instance. To create a formula variable, you can use the **Create variable** (`/api/rest/2.0/template/variables/create`) REST API endpoint, with the variable `type` set as `Formula_Variable` in the API request. The API doesn\'t support `\"persist_option\": \"RESET\"` and `\"persist_option\": \"NONE\"` when `variable_values` are defined in the request. If you are using `variable_values` for token generation, you must use other supported persist options such as `APPEND` or `REPLACE`. If you want to use `RESET` or `NONE`, do not pass any `variable_values`. In such cases, `variable_values` will remain unaffected. #### Supported objects The supported object type is `LOGICAL_TABLE`. When using `object_id` with `variable_values`, models are supported. #### Just-in-time provisioning For [just-in-time user creation and provisioning](https://developers.thoughtspot.com/docs/just-in-time-provisioning), specify the following attributes in the API request: * `auto_create` * `username` * `display_name` * `email` * `groups` Set `auto_create` to `true` if the username does not exist in ThoughtSpot. If the username already exists in ThoughtSpot and `auto_create` is set to `true`, user properties such as display name, email, Org and group entitlements will not be updated with new values. Setting `auto_create` to `true` does not create formula variables. Hence, this setting will not be applicable to `variable_values`. #### Important point to note All options in the token creation APIs that define user access to data in ThoughtSpot will take effect during token creation, not when the token is used for authentication. For example, `auto_create:true` will create the user when the authentication token is created. Persist options such as `APPEND` and `REPLACE` will persist `variable_values` on the user profile when the token is created. + * @param getCustomAccessTokenRequest + */ + getCustomAccessToken(getCustomAccessTokenRequest, _options) { + return __async(this, null, function* () { + var _a, _b, _c; + let _config = _options || this.configuration; + if (getCustomAccessTokenRequest === null || getCustomAccessTokenRequest === void 0) { + throw new RequiredError("AuthenticationApi", "getCustomAccessToken", "getCustomAccessTokenRequest"); + } + const localVarPath = "/api/rest/2.0/auth/token/custom"; + const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.25.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.25.0"); + const contentType = ObjectSerializer.getPreferredMediaType([ + "application/json" + ]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = ObjectSerializer.stringify( + ObjectSerializer.serialize(getCustomAccessTokenRequest, "GetCustomAccessTokenRequest", ""), + contentType + ); + requestContext.setBody(serializedBody); + const defaultAuth = ((_a = _options == null ? void 0 : _options.authMethods) == null ? void 0 : _a.default) || ((_c = (_b = this.configuration) == null ? void 0 : _b.authMethods) == null ? void 0 : _c.default); + if (defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication) { + yield defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication(requestContext); + } + return requestContext; + }); + } + /** + * Version: 9.0.0.cl or later Generates an authentication token for creating a full session in ThoughtSpot for a given user. Recommended for use cases that do not require Attribute-based access control (ABAC) via Row Level Security (RLS). #### Usage guidelines You can generate a token for a user by providing a `username` and `password`, or by using the `secret_key` generated for your instance. To generate a `secret_key`, the administrator must enable [Trusted authentication](https://developers.thoughtspot.com/docs/trusted-auth-secret-key) in the **Develop** > **Customizations** > **Security Settings** page. **Note**: * When both `password` and `secret_key` are included in the API request, `password` takes precedence. * If [Multi-Factor Authentication (MFA)](https://docs.thoughtspot.com/cloud/latest/authentication-local-mfa) is enabled on your instance, the API login request with `username` and `password` returns an error. You can switch to token-based authentication with `secret_key` or contact ThoughtSpot Support for assistance. The token obtained from ThoughtSpot is valid for 5 minutes by default. You can configure the token expiration time as required. #### Just-in-time provisioning For [just-in-time user creation and provisioning](https://developers.thoughtspot.com/docs/just-in-time-provisioning), specify the following attributes in the API request: * `auto_create` * `username` * `display_name` * `email` * `group_identifiers` Set `auto_create` to `true` if the username does not exist in ThoughtSpot. If the user already exists in ThoughtSpot and `auto_create` is set to `true`, user properties such as display name, email and group assignment will be updated. To add a new user and assign privileges during auto-creation, the `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege is required. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled, the `CONTROL_TRUSTED_AUTH` (**Can Enable or Disable Trusted Authentication**) privilege is required. #### Important point to note All options in the token creation APIs that define user access to data in ThoughtSpot will take effect during token creation, not when the token is used for authentication. For example, `auto_create:true` will create the user when the authentication token is created. + * @param getFullAccessTokenRequest + */ + getFullAccessToken(getFullAccessTokenRequest, _options) { + return __async(this, null, function* () { + var _a, _b, _c; + let _config = _options || this.configuration; + if (getFullAccessTokenRequest === null || getFullAccessTokenRequest === void 0) { + throw new RequiredError("AuthenticationApi", "getFullAccessToken", "getFullAccessTokenRequest"); + } + const localVarPath = "/api/rest/2.0/auth/token/full"; + const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.25.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.25.0"); + const contentType = ObjectSerializer.getPreferredMediaType([ + "application/json" + ]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = ObjectSerializer.stringify( + ObjectSerializer.serialize(getFullAccessTokenRequest, "GetFullAccessTokenRequest", ""), + contentType + ); + requestContext.setBody(serializedBody); + const defaultAuth = ((_a = _options == null ? void 0 : _options.authMethods) == null ? void 0 : _a.default) || ((_c = (_b = this.configuration) == null ? void 0 : _b.authMethods) == null ? void 0 : _c.default); + if (defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication) { + yield defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication(requestContext); + } + return requestContext; + }); + } + /** + * Version: 9.0.0.cl or later Generates an authentication token that provides access to a specific metadata object. This object list is intersected with the list of objects the user is allowed to access via group membership. For more information, see [Object security](https://docs.thoughtspot.com/cloud/latest/security-data-object#object_security). #### Usage guidelines You can generate a token for a user by providing a `username` and `password`, or by using the `secret_key` generated for your instance. To generate a `secret_key`, the administrator must enable [Trusted authentication](https://developers.thoughtspot.com/docs/trusted-auth-secret-key) in the **Develop** > **Customizations** > **Security Settings** page. **Note**: * When both `password` and `secret_key` are included in the API request, `password` takes precedence. * If [Multi-Factor Authentication (MFA)](https://docs.thoughtspot.com/cloud/latest/authentication-local-mfa) is enabled on your instance, the API login request with `username` and `password` returns an error. You can switch to token-based authentication with `secret_key` or contact ThoughtSpot Support for assistance. The token obtained from ThoughtSpot is valid for 5 minutes by default. You can configure the token expiration time as required. #### Just-in-time provisioning For [just-in-time user creation and provisioning](https://developers.thoughtspot.com/docs/just-in-time-provisioning), specify the following attributes in the API request: * `auto_create` * `username` * `display_name` * `email` * `group_identifiers` Set `auto_create` to `true` if the user is not available in ThoughtSpot. If the user already exists in ThoughtSpot and the `auto_create` parameter is set to `true`, user properties such as display name, email, and group assignment will be updated. To add a new user and assign privileges, the `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege is required. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled, the `CONTROL_TRUSTED_AUTH`(**Can Enable or Disable Trusted Authentication**) privilege is required. #### Important point to note All options in the token creation APIs that define user access to data in ThoughtSpot will take effect during token creation, not when the token is used for authentication. For example, `auto_create:true` will create the user when the authentication token is created. + * @param getObjectAccessTokenRequest + */ + getObjectAccessToken(getObjectAccessTokenRequest, _options) { + return __async(this, null, function* () { + var _a, _b, _c; + let _config = _options || this.configuration; + if (getObjectAccessTokenRequest === null || getObjectAccessTokenRequest === void 0) { + throw new RequiredError("AuthenticationApi", "getObjectAccessToken", "getObjectAccessTokenRequest"); + } + const localVarPath = "/api/rest/2.0/auth/token/object"; + const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.25.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.25.0"); + const contentType = ObjectSerializer.getPreferredMediaType([ + "application/json" + ]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = ObjectSerializer.stringify( + ObjectSerializer.serialize(getObjectAccessTokenRequest, "GetObjectAccessTokenRequest", ""), + contentType + ); + requestContext.setBody(serializedBody); + const defaultAuth = ((_a = _options == null ? void 0 : _options.authMethods) == null ? void 0 : _a.default) || ((_c = (_b = this.configuration) == null ? void 0 : _b.authMethods) == null ? void 0 : _c.default); + if (defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication) { + yield defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication(requestContext); + } + return requestContext; + }); + } + /** + * Version: 9.0.0.cl or later Creates a login session for a ThoughtSpot user with Basic authentication. In Basic authentication method, REST clients log in to ThoughtSpot using `username` and `password` attributes. On a multi-tenant cluster with Orgs, users can pass the ID of the Org in the API request to log in to a specific Org context. **Note**: If Multi-Factor Authentication (MFA) is enabled on your instance, the API login request with basic authentication (`username` and `password` ) returns an error. Contact ThoughtSpot Support for assistance. A successful login returns a session cookie that can be used in your subsequent API requests. + * @param loginRequest + */ + login(loginRequest, _options) { + return __async(this, null, function* () { + var _a, _b, _c; + let _config = _options || this.configuration; + if (loginRequest === null || loginRequest === void 0) { + throw new RequiredError("AuthenticationApi", "login", "loginRequest"); + } + const localVarPath = "/api/rest/2.0/auth/session/login"; + const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.25.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.25.0"); + const contentType = ObjectSerializer.getPreferredMediaType([ + "application/json" + ]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = ObjectSerializer.stringify( + ObjectSerializer.serialize(loginRequest, "LoginRequest", ""), + contentType + ); + requestContext.setBody(serializedBody); + let authMethod; + authMethod = _config.authMethods["bearerAuth"]; + if (authMethod == null ? void 0 : authMethod.applySecurityAuthentication) { + yield authMethod == null ? void 0 : authMethod.applySecurityAuthentication(requestContext); + } + const defaultAuth = ((_a = _options == null ? void 0 : _options.authMethods) == null ? void 0 : _a.default) || ((_c = (_b = this.configuration) == null ? void 0 : _b.authMethods) == null ? void 0 : _c.default); + if (defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication) { + yield defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication(requestContext); + } + return requestContext; + }); + } + /** + * Version: 9.0.0.cl or later Logs out a user from their current session. + */ + logout(_options) { + return __async(this, null, function* () { + var _a, _b, _c; + let _config = _options || this.configuration; + const localVarPath = "/api/rest/2.0/auth/session/logout"; + const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.25.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.25.0"); + let authMethod; + authMethod = _config.authMethods["bearerAuth"]; + if (authMethod == null ? void 0 : authMethod.applySecurityAuthentication) { + yield authMethod == null ? void 0 : authMethod.applySecurityAuthentication(requestContext); + } + const defaultAuth = ((_a = _options == null ? void 0 : _options.authMethods) == null ? void 0 : _a.default) || ((_c = (_b = this.configuration) == null ? void 0 : _b.authMethods) == null ? void 0 : _c.default); + if (defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication) { + yield defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication(requestContext); + } + return requestContext; + }); + } + /** + * Version: 9.0.0.cl or later Revokes the authentication token issued for current user session. The token of your current session expires when you make a call to the `/api/rest/2.0/auth/token/revoke` endpoint. the users will not be able to access ThoughtSpot objects until a new token is obtained. To restart your session, request for a new token from ThoughtSpot. See [Get Full Access Token](#/http/api-endpoints/authentication/get-full-access-token). + * @param revokeTokenRequest + */ + revokeToken(revokeTokenRequest, _options) { + return __async(this, null, function* () { + var _a, _b, _c; + let _config = _options || this.configuration; + if (revokeTokenRequest === null || revokeTokenRequest === void 0) { + throw new RequiredError("AuthenticationApi", "revokeToken", "revokeTokenRequest"); + } + const localVarPath = "/api/rest/2.0/auth/token/revoke"; + const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.25.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.25.0"); + const contentType = ObjectSerializer.getPreferredMediaType([ + "application/json" + ]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = ObjectSerializer.stringify( + ObjectSerializer.serialize(revokeTokenRequest, "RevokeTokenRequest", ""), + contentType + ); + requestContext.setBody(serializedBody); + let authMethod; + authMethod = _config.authMethods["bearerAuth"]; + if (authMethod == null ? void 0 : authMethod.applySecurityAuthentication) { + yield authMethod == null ? void 0 : authMethod.applySecurityAuthentication(requestContext); + } + const defaultAuth = ((_a = _options == null ? void 0 : _options.authMethods) == null ? void 0 : _a.default) || ((_c = (_b = this.configuration) == null ? void 0 : _b.authMethods) == null ? void 0 : _c.default); + if (defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication) { + yield defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication(requestContext); + } + return requestContext; + }); + } + /** + * Version: 26.6.0.cl or later Returns the authentication configuration for the specified auth type at cluster and org level. Currently supports `TRUSTED_AUTH`. #### Required privileges Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) or `CONTROL_TRUSTED_AUTH` (**Can Enable or Disable Trusted Authentication**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled, the `CONTROL_TRUSTED_AUTH` privilege is required. #### Usage guidelines Use `scope` to control which level of settings are returned: - `CLUSTER` — Returns cluster-level authentication status and access tokens. Accessible only from the Primary Org. - `ORG` — Returns org-level authentication status and access tokens for the current Org. Requires the per-Org authentication feature to be enabled on your instance. - If `scope` is omitted, both cluster and org-level settings are returned based on the caller\'s org context and feature availability. The `access_tokens` array in `cluster_preferences` or `org_preferences` is omitted when no token is configured at that level. **Note**: Access tokens returned in the response are sensitive credentials. Treat them with the same care as passwords. + * @param searchAuthSettingsRequest + */ + searchAuthSettings(searchAuthSettingsRequest, _options) { + return __async(this, null, function* () { + var _a, _b, _c; + let _config = _options || this.configuration; + if (searchAuthSettingsRequest === null || searchAuthSettingsRequest === void 0) { + throw new RequiredError("AuthenticationApi", "searchAuthSettings", "searchAuthSettingsRequest"); + } + const localVarPath = "/api/rest/2.0/auth/search"; + const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.25.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.25.0"); + const contentType = ObjectSerializer.getPreferredMediaType([ + "application/json" + ]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = ObjectSerializer.stringify( + ObjectSerializer.serialize(searchAuthSettingsRequest, "SearchAuthSettingsRequest", ""), + contentType + ); + requestContext.setBody(serializedBody); + let authMethod; + authMethod = _config.authMethods["bearerAuth"]; + if (authMethod == null ? void 0 : authMethod.applySecurityAuthentication) { + yield authMethod == null ? void 0 : authMethod.applySecurityAuthentication(requestContext); + } + const defaultAuth = ((_a = _options == null ? void 0 : _options.authMethods) == null ? void 0 : _a.default) || ((_c = (_b = this.configuration) == null ? void 0 : _b.authMethods) == null ? void 0 : _c.default); + if (defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication) { + yield defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication(requestContext); + } + return requestContext; + }); + } + /** + * Version: 9.12.0.cl or later Validates the authentication token specified in the API request. If your token is not valid, [Get a new token](#/http/api-endpoints/authentication/get-full-access-token). + * @param validateTokenRequest + */ + validateToken(validateTokenRequest, _options) { + return __async(this, null, function* () { + var _a, _b, _c; + let _config = _options || this.configuration; + if (validateTokenRequest === null || validateTokenRequest === void 0) { + throw new RequiredError("AuthenticationApi", "validateToken", "validateTokenRequest"); + } + const localVarPath = "/api/rest/2.0/auth/token/validate"; + const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.25.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.25.0"); + const contentType = ObjectSerializer.getPreferredMediaType([ + "application/json" + ]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = ObjectSerializer.stringify( + ObjectSerializer.serialize(validateTokenRequest, "ValidateTokenRequest", ""), + contentType + ); + requestContext.setBody(serializedBody); + let authMethod; + authMethod = _config.authMethods["bearerAuth"]; + if (authMethod == null ? void 0 : authMethod.applySecurityAuthentication) { + yield authMethod == null ? void 0 : authMethod.applySecurityAuthentication(requestContext); + } + const defaultAuth = ((_a = _options == null ? void 0 : _options.authMethods) == null ? void 0 : _a.default) || ((_c = (_b = this.configuration) == null ? void 0 : _b.authMethods) == null ? void 0 : _c.default); + if (defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication) { + yield defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication(requestContext); + } + return requestContext; + }); + } +}; +var AuthenticationApiResponseProcessor = class { + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to configureAuthSettings + * @throws ApiException if the response code was not in [200, 299] + */ + configureAuthSettings(response) { + return __async(this, null, function* () { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("204", response.httpStatusCode)) { + return; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Invalid request.", body, response.headers); + } + if (isCodeInRange("401", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unexpected error", body, response.headers); + } + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "void", + "" + ); + return body; + } + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", yield response.getBodyAsAny(), response.headers); + }); + } + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to getCurrentUserInfo + * @throws ApiException if the response code was not in [200, 299] + */ + getCurrentUserInfo(response) { + return __async(this, null, function* () { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("200", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "User", + "" + ); + return body; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Invalid request.", body, response.headers); + } + if (isCodeInRange("401", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unexpected error", body, response.headers); + } + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "User", + "" + ); + return body; + } + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", yield response.getBodyAsAny(), response.headers); + }); + } + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to getCurrentUserToken + * @throws ApiException if the response code was not in [200, 299] + */ + getCurrentUserToken(response) { + return __async(this, null, function* () { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("200", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "GetTokenResponse", + "" + ); + return body; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Invalid request.", body, response.headers); + } + if (isCodeInRange("401", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unexpected error", body, response.headers); + } + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "GetTokenResponse", + "" + ); + return body; + } + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", yield response.getBodyAsAny(), response.headers); + }); + } + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to getCustomAccessToken + * @throws ApiException if the response code was not in [200, 299] + */ + getCustomAccessToken(response) { + return __async(this, null, function* () { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("200", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "AccessToken", + "" + ); + return body; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Invalid request. This could be due to missing or incorrect parameters.", body, response.headers); + } + if (isCodeInRange("401", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unauthorized access. The request could not be authenticated.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Forbidden access. The user does not have permission to access this resource.", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "An unexpected error occurred on the server.", body, response.headers); + } + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "AccessToken", + "" + ); + return body; + } + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", yield response.getBodyAsAny(), response.headers); + }); + } + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to getFullAccessToken + * @throws ApiException if the response code was not in [200, 299] + */ + getFullAccessToken(response) { + return __async(this, null, function* () { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("200", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "Token", + "" + ); + return body; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Invalid request.", body, response.headers); + } + if (isCodeInRange("401", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unexpected error", body, response.headers); + } + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "Token", + "" + ); + return body; + } + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", yield response.getBodyAsAny(), response.headers); + }); + } + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to getObjectAccessToken + * @throws ApiException if the response code was not in [200, 299] + */ + getObjectAccessToken(response) { + return __async(this, null, function* () { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("200", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "Token", + "" + ); + return body; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Invalid request.", body, response.headers); + } + if (isCodeInRange("401", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unexpected error", body, response.headers); + } + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "Token", + "" + ); + return body; + } + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", yield response.getBodyAsAny(), response.headers); + }); + } + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to login + * @throws ApiException if the response code was not in [200, 299] + */ + login(response) { + return __async(this, null, function* () { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("204", response.httpStatusCode)) { + return; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Invalid request.", body, response.headers); + } + if (isCodeInRange("401", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unexpected error", body, response.headers); + } + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "void", + "" + ); + return body; + } + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", yield response.getBodyAsAny(), response.headers); + }); + } + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to logout + * @throws ApiException if the response code was not in [200, 299] + */ + logout(response) { + return __async(this, null, function* () { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("204", response.httpStatusCode)) { + return; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Invalid request.", body, response.headers); + } + if (isCodeInRange("401", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unexpected error", body, response.headers); + } + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "void", + "" + ); + return body; + } + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", yield response.getBodyAsAny(), response.headers); + }); + } + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to revokeToken + * @throws ApiException if the response code was not in [200, 299] + */ + revokeToken(response) { + return __async(this, null, function* () { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("204", response.httpStatusCode)) { + return; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Invalid request.", body, response.headers); + } + if (isCodeInRange("401", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unexpected error", body, response.headers); + } + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "void", + "" + ); + return body; + } + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", yield response.getBodyAsAny(), response.headers); + }); + } + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to searchAuthSettings + * @throws ApiException if the response code was not in [200, 299] + */ + searchAuthSettings(response) { + return __async(this, null, function* () { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("200", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "SearchAuthSettingsResponse", + "" + ); + return body; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Invalid request.", body, response.headers); + } + if (isCodeInRange("401", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unexpected error", body, response.headers); + } + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "SearchAuthSettingsResponse", + "" + ); + return body; + } + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", yield response.getBodyAsAny(), response.headers); + }); + } + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to validateToken + * @throws ApiException if the response code was not in [200, 299] + */ + validateToken(response) { + return __async(this, null, function* () { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("200", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "TokenValidationResponse", + "" + ); + return body; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Invalid request.", body, response.headers); + } + if (isCodeInRange("401", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unexpected error", body, response.headers); + } + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "TokenValidationResponse", + "" + ); + return body; + } + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", yield response.getBodyAsAny(), response.headers); + }); + } +}; + +// apis/CollectionsApi.ts +var CollectionsApiRequestFactory = class extends BaseAPIRequestFactory { + /** + * Version: 26.4.0.cl or later Creates a new collection in ThoughtSpot. Collections allow you to organize and group related metadata objects such as Liveboards, Answers, worksheets, and other data objects. You can also create nested collections (sub-collections) to build a hierarchical structure. #### Supported operations The API endpoint lets you perform the following operations: * Create a new collection * Add metadata objects (Liveboards, Answers, Logical Tables) to the collection * Create nested collections by adding sub-collections + * @param createCollectionRequest + */ + createCollection(createCollectionRequest, _options) { + return __async(this, null, function* () { + var _a, _b, _c; + let _config = _options || this.configuration; + if (createCollectionRequest === null || createCollectionRequest === void 0) { + throw new RequiredError("CollectionsApi", "createCollection", "createCollectionRequest"); + } + const localVarPath = "/api/rest/2.0/collections/create"; + const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.25.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.25.0"); + const contentType = ObjectSerializer.getPreferredMediaType([ + "application/json" + ]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = ObjectSerializer.stringify( + ObjectSerializer.serialize(createCollectionRequest, "CreateCollectionRequest", ""), + contentType + ); + requestContext.setBody(serializedBody); + let authMethod; + authMethod = _config.authMethods["bearerAuth"]; + if (authMethod == null ? void 0 : authMethod.applySecurityAuthentication) { + yield authMethod == null ? void 0 : authMethod.applySecurityAuthentication(requestContext); + } + const defaultAuth = ((_a = _options == null ? void 0 : _options.authMethods) == null ? void 0 : _a.default) || ((_c = (_b = this.configuration) == null ? void 0 : _b.authMethods) == null ? void 0 : _c.default); + if (defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication) { + yield defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication(requestContext); + } + return requestContext; + }); + } + /** + * Version: 26.4.0.cl or later Deletes one or more collections from ThoughtSpot. #### Delete options * **delete_children**: When set to `true`, deletes the child objects (metadata items) within the collection that the user has access to. Objects that the user does not have permission to delete will be skipped. * **dry_run**: When set to `true`, performs a preview of the deletion operation without actually deleting anything. The response shows what would be deleted, allowing you to review before committing the deletion. #### Response The response includes: * **metadata_deleted**: List of metadata objects that were successfully deleted * **metadata_skipped**: List of metadata objects that were skipped due to lack of permissions or other constraints + * @param deleteCollectionRequest + */ + deleteCollection(deleteCollectionRequest, _options) { + return __async(this, null, function* () { + var _a, _b, _c; + let _config = _options || this.configuration; + if (deleteCollectionRequest === null || deleteCollectionRequest === void 0) { + throw new RequiredError("CollectionsApi", "deleteCollection", "deleteCollectionRequest"); + } + const localVarPath = "/api/rest/2.0/collections/delete"; + const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.25.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.25.0"); + const contentType = ObjectSerializer.getPreferredMediaType([ + "application/json" + ]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = ObjectSerializer.stringify( + ObjectSerializer.serialize(deleteCollectionRequest, "DeleteCollectionRequest", ""), + contentType + ); + requestContext.setBody(serializedBody); + let authMethod; + authMethod = _config.authMethods["bearerAuth"]; + if (authMethod == null ? void 0 : authMethod.applySecurityAuthentication) { + yield authMethod == null ? void 0 : authMethod.applySecurityAuthentication(requestContext); + } + const defaultAuth = ((_a = _options == null ? void 0 : _options.authMethods) == null ? void 0 : _a.default) || ((_c = (_b = this.configuration) == null ? void 0 : _b.authMethods) == null ? void 0 : _c.default); + if (defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication) { + yield defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication(requestContext); + } + return requestContext; + }); + } + /** + * Version: 26.4.0.cl or later Gets a list of collections available in ThoughtSpot. To get details of a specific collection, specify the collection GUID or name. You can also filter the API response based on the collection name pattern, author, and other criteria. #### Search options * **name_pattern**: Use \'%\' as a wildcard character to match collection names * **collection_identifiers**: Search for specific collections by their GUIDs or names * **include_metadata**: When set to `true`, includes the metadata objects within each collection in the response **NOTE**: If the API returns an empty list, consider increasing the value of the `record_size` parameter. To search across all available collections, set `record_size` to `-1`. + * @param searchCollectionsRequest + */ + searchCollections(searchCollectionsRequest, _options) { + return __async(this, null, function* () { + var _a, _b, _c; + let _config = _options || this.configuration; + if (searchCollectionsRequest === null || searchCollectionsRequest === void 0) { + throw new RequiredError("CollectionsApi", "searchCollections", "searchCollectionsRequest"); + } + const localVarPath = "/api/rest/2.0/collections/search"; + const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.25.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.25.0"); + const contentType = ObjectSerializer.getPreferredMediaType([ + "application/json" + ]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = ObjectSerializer.stringify( + ObjectSerializer.serialize(searchCollectionsRequest, "SearchCollectionsRequest", ""), + contentType + ); + requestContext.setBody(serializedBody); + let authMethod; + authMethod = _config.authMethods["bearerAuth"]; + if (authMethod == null ? void 0 : authMethod.applySecurityAuthentication) { + yield authMethod == null ? void 0 : authMethod.applySecurityAuthentication(requestContext); + } + const defaultAuth = ((_a = _options == null ? void 0 : _options.authMethods) == null ? void 0 : _a.default) || ((_c = (_b = this.configuration) == null ? void 0 : _b.authMethods) == null ? void 0 : _c.default); + if (defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication) { + yield defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication(requestContext); + } + return requestContext; + }); + } + /** + * Version: 26.4.0.cl or later Updates an existing collection in ThoughtSpot. #### Supported operations This API endpoint lets you perform the following operations: * Update collection name and description * Change visibility settings * Add metadata objects to the collection (operation: ADD) * Remove metadata objects from the collection (operation: REMOVE) * Replace all metadata objects in the collection (operation: REPLACE) #### Operation types * **ADD**: Adds the specified metadata objects to the existing collection without removing current items * **REMOVE**: Removes only the specified metadata objects from the collection * **REPLACE**: Replaces all existing metadata objects with the specified items (default behavior) + * @param collectionIdentifier Unique GUID of the collection. Note: Collection names cannot be used as identifiers since duplicate names are allowed. + * @param updateCollectionRequest + */ + updateCollection(collectionIdentifier, updateCollectionRequest, _options) { + return __async(this, null, function* () { + var _a, _b, _c; + let _config = _options || this.configuration; + if (collectionIdentifier === null || collectionIdentifier === void 0) { + throw new RequiredError("CollectionsApi", "updateCollection", "collectionIdentifier"); + } + if (updateCollectionRequest === null || updateCollectionRequest === void 0) { + throw new RequiredError("CollectionsApi", "updateCollection", "updateCollectionRequest"); + } + const localVarPath = "/api/rest/2.0/collections/{collection_identifier}/update".replace("{collection_identifier}", encodeURIComponent(String(collectionIdentifier))); + const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.25.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.25.0"); + const contentType = ObjectSerializer.getPreferredMediaType([ + "application/json" + ]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = ObjectSerializer.stringify( + ObjectSerializer.serialize(updateCollectionRequest, "UpdateCollectionRequest", ""), + contentType + ); + requestContext.setBody(serializedBody); + let authMethod; + authMethod = _config.authMethods["bearerAuth"]; + if (authMethod == null ? void 0 : authMethod.applySecurityAuthentication) { + yield authMethod == null ? void 0 : authMethod.applySecurityAuthentication(requestContext); + } + const defaultAuth = ((_a = _options == null ? void 0 : _options.authMethods) == null ? void 0 : _a.default) || ((_c = (_b = this.configuration) == null ? void 0 : _b.authMethods) == null ? void 0 : _c.default); + if (defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication) { + yield defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication(requestContext); + } + return requestContext; + }); + } +}; +var CollectionsApiResponseProcessor = class { + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to createCollection + * @throws ApiException if the response code was not in [200, 299] + */ + createCollection(response) { + return __async(this, null, function* () { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("200", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "Collection", + "" + ); + return body; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Invalid request.", body, response.headers); + } + if (isCodeInRange("401", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unexpected error", body, response.headers); + } + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "Collection", + "" + ); + return body; + } + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", yield response.getBodyAsAny(), response.headers); + }); + } + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to deleteCollection + * @throws ApiException if the response code was not in [200, 299] + */ + deleteCollection(response) { + return __async(this, null, function* () { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("200", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "CollectionDeleteResponse", + "" + ); + return body; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Invalid request.", body, response.headers); + } + if (isCodeInRange("401", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } + if (isCodeInRange("404", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Resource not found.", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unexpected error", body, response.headers); + } + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "CollectionDeleteResponse", + "" + ); + return body; + } + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", yield response.getBodyAsAny(), response.headers); + }); + } + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to searchCollections + * @throws ApiException if the response code was not in [200, 299] + */ + searchCollections(response) { + return __async(this, null, function* () { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("200", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "CollectionSearchResponse", + "" + ); + return body; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Invalid request.", body, response.headers); + } + if (isCodeInRange("401", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unexpected error", body, response.headers); + } + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "CollectionSearchResponse", + "" + ); + return body; + } + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", yield response.getBodyAsAny(), response.headers); + }); + } + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to updateCollection + * @throws ApiException if the response code was not in [200, 299] + */ + updateCollection(response) { + return __async(this, null, function* () { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("204", response.httpStatusCode)) { + return; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Invalid request.", body, response.headers); + } + if (isCodeInRange("401", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } + if (isCodeInRange("404", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Resource not found.", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unexpected error", body, response.headers); + } + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "void", + "" + ); + return body; + } + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", yield response.getBodyAsAny(), response.headers); + }); + } +}; + +// apis/ConnectionConfigurationsApi.ts +var ConnectionConfigurationsApiRequestFactory = class extends BaseAPIRequestFactory { + /** + * Version: 10.12.0.cl or later Gets connection configuration objects. Requires `DATAMANAGEMENT` (**Can manage data**) and edit permissions to the connection object, or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) privilege is required. #### Usage guidelines * To get a list of all configurations available in the ThoughtSpot system, send the API request with only the connection name or GUID in the request body. * To fetch details of a configuration object, specify the configuration object name or GUID. + * @param connectionConfigurationSearchRequest + */ + connectionConfigurationSearch(connectionConfigurationSearchRequest, _options) { + return __async(this, null, function* () { + var _a, _b, _c; + let _config = _options || this.configuration; + if (connectionConfigurationSearchRequest === null || connectionConfigurationSearchRequest === void 0) { + throw new RequiredError("ConnectionConfigurationsApi", "connectionConfigurationSearch", "connectionConfigurationSearchRequest"); + } + const localVarPath = "/api/rest/2.0/connection-configurations/search"; + const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.25.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.25.0"); + const contentType = ObjectSerializer.getPreferredMediaType([ + "application/json" + ]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = ObjectSerializer.stringify( + ObjectSerializer.serialize(connectionConfigurationSearchRequest, "ConnectionConfigurationSearchRequest", ""), + contentType + ); + requestContext.setBody(serializedBody); + let authMethod; + authMethod = _config.authMethods["bearerAuth"]; + if (authMethod == null ? void 0 : authMethod.applySecurityAuthentication) { + yield authMethod == null ? void 0 : authMethod.applySecurityAuthentication(requestContext); + } + const defaultAuth = ((_a = _options == null ? void 0 : _options.authMethods) == null ? void 0 : _a.default) || ((_c = (_b = this.configuration) == null ? void 0 : _b.authMethods) == null ? void 0 : _c.default); + if (defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication) { + yield defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication(requestContext); + } + return requestContext; + }); + } + /** + * Version: 10.12.0.cl or later Creates an additional configuration to an existing connection to a data warehouse. Requires `DATAMANAGEMENT` (**Can manage data**) or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) privilege is required. #### Usage guidelines * A JSON map of configuration attributes in `configuration`. The following example shows the configuration attributes: ``` { \"user\":\"DEV_USER\", \"password\":\"TestConn123\", \"role\":\"DEV\", \"warehouse\":\"DEV_WH\" } ``` * If the `policy_type` is `PRINCIPALS`, then `policy_principals` is a required field. * If the `policy_type` is `PROCESSES`, then `policy_processes` is a required field. * If the `policy_type` is `NO_POLICY`, then `policy_principals` and `policy_processes` are not required fields. #### Parameterized Connection Support For parameterized connections that use OAuth authentication, only the same_as_parent and policy_process_options attributes are allowed in the API request. These attributes are not applicable to connections that are not parameterized. + * @param createConnectionConfigurationRequest + */ + createConnectionConfiguration(createConnectionConfigurationRequest, _options) { + return __async(this, null, function* () { + var _a, _b, _c; + let _config = _options || this.configuration; + if (createConnectionConfigurationRequest === null || createConnectionConfigurationRequest === void 0) { + throw new RequiredError("ConnectionConfigurationsApi", "createConnectionConfiguration", "createConnectionConfigurationRequest"); + } + const localVarPath = "/api/rest/2.0/connection-configurations/create"; + const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.25.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.25.0"); + const contentType = ObjectSerializer.getPreferredMediaType([ + "application/json" + ]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = ObjectSerializer.stringify( + ObjectSerializer.serialize(createConnectionConfigurationRequest, "CreateConnectionConfigurationRequest", ""), + contentType + ); + requestContext.setBody(serializedBody); + let authMethod; + authMethod = _config.authMethods["bearerAuth"]; + if (authMethod == null ? void 0 : authMethod.applySecurityAuthentication) { + yield authMethod == null ? void 0 : authMethod.applySecurityAuthentication(requestContext); + } + const defaultAuth = ((_a = _options == null ? void 0 : _options.authMethods) == null ? void 0 : _a.default) || ((_c = (_b = this.configuration) == null ? void 0 : _b.authMethods) == null ? void 0 : _c.default); + if (defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication) { + yield defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication(requestContext); + } + return requestContext; + }); + } + /** + * Version: 10.12.0.cl or later Deletes connection configuration objects. Requires `DATAMANAGEMENT` (**Can manage data**) and edit permissions to the connection object, or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) privilege is required. + * @param deleteConnectionConfigurationRequest + */ + deleteConnectionConfiguration(deleteConnectionConfigurationRequest, _options) { + return __async(this, null, function* () { + var _a, _b, _c; + let _config = _options || this.configuration; + if (deleteConnectionConfigurationRequest === null || deleteConnectionConfigurationRequest === void 0) { + throw new RequiredError("ConnectionConfigurationsApi", "deleteConnectionConfiguration", "deleteConnectionConfigurationRequest"); + } + const localVarPath = "/api/rest/2.0/connection-configurations/delete"; + const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.25.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.25.0"); + const contentType = ObjectSerializer.getPreferredMediaType([ + "application/json" + ]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = ObjectSerializer.stringify( + ObjectSerializer.serialize(deleteConnectionConfigurationRequest, "DeleteConnectionConfigurationRequest", ""), + contentType + ); + requestContext.setBody(serializedBody); + let authMethod; + authMethod = _config.authMethods["bearerAuth"]; + if (authMethod == null ? void 0 : authMethod.applySecurityAuthentication) { + yield authMethod == null ? void 0 : authMethod.applySecurityAuthentication(requestContext); + } + const defaultAuth = ((_a = _options == null ? void 0 : _options.authMethods) == null ? void 0 : _a.default) || ((_c = (_b = this.configuration) == null ? void 0 : _b.authMethods) == null ? void 0 : _c.default); + if (defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication) { + yield defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication(requestContext); + } + return requestContext; + }); + } + /** + * Version: 10.12.0.cl or later Updates a connection configuration object. Requires `DATAMANAGEMENT` (**Can manage data**) and edit permissions to the connection object, or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) privilege is required. #### Supported operations This API endpoint lets you perform the following operations in a single API request: * Edit the name or description of the configuration * Edit the configuration properties * Edit the `policy_type` * Edit the type of authentication * Enable or disable a configuration #### Parameterized Connection Support For parameterized oauth based connections, only the `same_as_parent` and `policy_process_options` attributes are allowed. These attributes are not applicable to connections that are not parameterized. **NOTE**: When updating a configuration where `disabled` is `true`, you must reset `disabled` to `true` in your update request payload. If not explicitly set again, the API will default `disabled` to `false`. + * @param configurationIdentifier Unique ID or name of the configuration. + * @param updateConnectionConfigurationRequest + */ + updateConnectionConfiguration(configurationIdentifier, updateConnectionConfigurationRequest, _options) { + return __async(this, null, function* () { + var _a, _b, _c; + let _config = _options || this.configuration; + if (configurationIdentifier === null || configurationIdentifier === void 0) { + throw new RequiredError("ConnectionConfigurationsApi", "updateConnectionConfiguration", "configurationIdentifier"); + } + if (updateConnectionConfigurationRequest === null || updateConnectionConfigurationRequest === void 0) { + throw new RequiredError("ConnectionConfigurationsApi", "updateConnectionConfiguration", "updateConnectionConfigurationRequest"); + } + const localVarPath = "/api/rest/2.0/connection-configurations/{configuration_identifier}/update".replace("{configuration_identifier}", encodeURIComponent(String(configurationIdentifier))); + const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.25.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.25.0"); + const contentType = ObjectSerializer.getPreferredMediaType([ + "application/json" + ]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = ObjectSerializer.stringify( + ObjectSerializer.serialize(updateConnectionConfigurationRequest, "UpdateConnectionConfigurationRequest", ""), + contentType + ); + requestContext.setBody(serializedBody); + let authMethod; + authMethod = _config.authMethods["bearerAuth"]; + if (authMethod == null ? void 0 : authMethod.applySecurityAuthentication) { + yield authMethod == null ? void 0 : authMethod.applySecurityAuthentication(requestContext); + } + const defaultAuth = ((_a = _options == null ? void 0 : _options.authMethods) == null ? void 0 : _a.default) || ((_c = (_b = this.configuration) == null ? void 0 : _b.authMethods) == null ? void 0 : _c.default); + if (defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication) { + yield defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication(requestContext); + } + return requestContext; + }); + } +}; +var ConnectionConfigurationsApiResponseProcessor = class { + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to connectionConfigurationSearch + * @throws ApiException if the response code was not in [200, 299] + */ + connectionConfigurationSearch(response) { + return __async(this, null, function* () { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("200", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "Array", + "" + ); + return body; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Invalid request.", body, response.headers); + } + if (isCodeInRange("401", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unexpected error", body, response.headers); + } + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "Array", + "" + ); + return body; + } + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", yield response.getBodyAsAny(), response.headers); + }); + } + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to createConnectionConfiguration + * @throws ApiException if the response code was not in [200, 299] + */ + createConnectionConfiguration(response) { + return __async(this, null, function* () { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("200", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ConnectionConfigurationResponse", + "" + ); + return body; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Invalid request.", body, response.headers); + } + if (isCodeInRange("401", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unexpected error", body, response.headers); + } + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ConnectionConfigurationResponse", + "" + ); + return body; + } + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", yield response.getBodyAsAny(), response.headers); + }); + } + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to deleteConnectionConfiguration + * @throws ApiException if the response code was not in [200, 299] + */ + deleteConnectionConfiguration(response) { + return __async(this, null, function* () { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("204", response.httpStatusCode)) { + return; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Invalid request.", body, response.headers); + } + if (isCodeInRange("401", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unexpected error", body, response.headers); + } + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "void", + "" + ); + return body; + } + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", yield response.getBodyAsAny(), response.headers); + }); + } + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to updateConnectionConfiguration + * @throws ApiException if the response code was not in [200, 299] + */ + updateConnectionConfiguration(response) { + return __async(this, null, function* () { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("204", response.httpStatusCode)) { + return; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Invalid request.", body, response.headers); + } + if (isCodeInRange("401", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unexpected error", body, response.headers); + } + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "void", + "" + ); + return body; + } + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", yield response.getBodyAsAny(), response.headers); + }); + } +}; + +// apis/ConnectionsApi.ts +var ConnectionsApiRequestFactory = class extends BaseAPIRequestFactory { + /** + * Version: 9.2.0.cl or later Creates a connection to a data warehouse for live query services. Requires `DATAMANAGEMENT` (**Can manage data**) or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) privilege is required. #### Create a connection without tables To create a connection without tables: 1. Pass these parameters in your API request. * Name of the connection. * Type of the data warehouse to connect to. * A JSON map of configuration attributes in `data_warehouse_config`. The following example shows the configuration attributes for a SnowFlake connection: ``` { \"configuration\":{ \"accountName\":\"thoughtspot_partner\", \"user\":\"tsadmin\", \"password\":\"TestConn123\", \"role\":\"sysadmin\", \"warehouse\":\"MEDIUM_WH\" }, \"authenticationType\": \"SERVICE_ACCOUNT\", \"externalDatabases\":[ ] } ``` 2. Set `validate` to `false`. **NOTE:** If the `authentication_type` is anything other than SERVICE_ACCOUNT, you must explicitly provide the authenticationType property in the payload. If you do not specify authenticationType, the API will default to SERVICE_ACCOUNT as the authentication type. #### Create a connection with tables If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) and `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` (**Can manage data models**) privilege is required. To create a connection with tables: 1. Pass these parameters in your API request. * Name of the connection. * Type of the data warehouse to connect to. * A JSON map of configuration attributes, database details, and table properties in `data_warehouse_config` as shown in the following example: ``` { \"configuration\":{ \"accountName\":\"thoughtspot_partner\", \"user\":\"tsadmin\", \"password\":\"TestConn123\", \"role\":\"sysadmin\", \"warehouse\":\"MEDIUM_WH\" }, \"authenticationType\": \"SERVICE_ACCOUNT\", \"externalDatabases\":[ { \"name\":\"AllDatatypes\", \"isAutoCreated\":false, \"schemas\":[ { \"name\":\"alldatatypes\", \"tables\":[ { \"name\":\"allDatatypes\", \"type\":\"TABLE\", \"description\":\"\", \"selected\":true, \"linked\":true, \"columns\":[ { \"name\":\"CNUMBER\", \"type\":\"INT64\", \"canImport\":true, \"selected\":true, \"isLinkedActive\":true, \"isImported\":false, \"tableName\":\"allDatatypes\", \"schemaName\":\"alldatatypes\", \"dbName\":\"AllDatatypes\" }, { \"name\":\"CDECIMAL\", \"type\":\"INT64\", \"canImport\":true, \"selected\":true, \"isLinkedActive\":true, \"isImported\":false, \"tableName\":\"allDatatypes\", \"schemaName\":\"alldatatypes\", \"dbName\":\"AllDatatypes\" } ] } ] } ] } ] } ``` 2. Set `validate` to `true`. **NOTE:** If the `authentication_type` is anything other than SERVICE_ACCOUNT, you must explicitly provide the authenticationType property in the payload. If you do not specify authenticationType, the API will default to SERVICE_ACCOUNT as the authentication type. + * @param createConnectionRequest + */ + createConnection(createConnectionRequest, _options) { + return __async(this, null, function* () { + var _a, _b, _c; + let _config = _options || this.configuration; + if (createConnectionRequest === null || createConnectionRequest === void 0) { + throw new RequiredError("ConnectionsApi", "createConnection", "createConnectionRequest"); + } + const localVarPath = "/api/rest/2.0/connection/create"; + const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.25.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.25.0"); + const contentType = ObjectSerializer.getPreferredMediaType([ + "application/json" + ]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = ObjectSerializer.stringify( + ObjectSerializer.serialize(createConnectionRequest, "CreateConnectionRequest", ""), + contentType + ); + requestContext.setBody(serializedBody); + let authMethod; + authMethod = _config.authMethods["bearerAuth"]; + if (authMethod == null ? void 0 : authMethod.applySecurityAuthentication) { + yield authMethod == null ? void 0 : authMethod.applySecurityAuthentication(requestContext); + } + const defaultAuth = ((_a = _options == null ? void 0 : _options.authMethods) == null ? void 0 : _a.default) || ((_c = (_b = this.configuration) == null ? void 0 : _b.authMethods) == null ? void 0 : _c.default); + if (defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication) { + yield defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication(requestContext); + } + return requestContext; + }); + } + /** + * Version: 9.2.0.cl or later **Important**: This endpoint is deprecated and will be removed from ThoughtSpot in September 2025. ThoughtSpot strongly recommends using the [Delete Connection V2](#/http/api-endpoints/connections/delete-connection-v2) endpoint to delete your connection objects. #### Usage guidelines Deletes a connection object. Requires `DATAMANAGEMENT` (**Can manage data**) and edit permissions to the connection object, or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) privilege is required. **Note**: If a connection has dependent objects, make sure you remove its associations before the delete operation. + * @param deleteConnectionRequest + */ + deleteConnection(deleteConnectionRequest, _options) { + return __async(this, null, function* () { + var _a, _b, _c; + let _config = _options || this.configuration; + if (deleteConnectionRequest === null || deleteConnectionRequest === void 0) { + throw new RequiredError("ConnectionsApi", "deleteConnection", "deleteConnectionRequest"); + } + const localVarPath = "/api/rest/2.0/connection/delete"; + const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.25.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.25.0"); + const contentType = ObjectSerializer.getPreferredMediaType([ + "application/json" + ]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = ObjectSerializer.stringify( + ObjectSerializer.serialize(deleteConnectionRequest, "DeleteConnectionRequest", ""), + contentType + ); + requestContext.setBody(serializedBody); + let authMethod; + authMethod = _config.authMethods["bearerAuth"]; + if (authMethod == null ? void 0 : authMethod.applySecurityAuthentication) { + yield authMethod == null ? void 0 : authMethod.applySecurityAuthentication(requestContext); + } + const defaultAuth = ((_a = _options == null ? void 0 : _options.authMethods) == null ? void 0 : _a.default) || ((_c = (_b = this.configuration) == null ? void 0 : _b.authMethods) == null ? void 0 : _c.default); + if (defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication) { + yield defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication(requestContext); + } + return requestContext; + }); + } + /** + * Version: 10.4.0.cl or later Deletes a connection object. **Note**: If a connection has dependent objects, make sure you remove its associations before the delete operation. Requires `DATAMANAGEMENT` (**Can manage data**) and edit permissions to the connection object, or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) privilege is required. + * @param connectionIdentifier Unique ID or name of the connection. + */ + deleteConnectionV2(connectionIdentifier, _options) { + return __async(this, null, function* () { + var _a, _b, _c; + let _config = _options || this.configuration; + if (connectionIdentifier === null || connectionIdentifier === void 0) { + throw new RequiredError("ConnectionsApi", "deleteConnectionV2", "connectionIdentifier"); + } + const localVarPath = "/api/rest/2.0/connections/{connection_identifier}/delete".replace("{connection_identifier}", encodeURIComponent(String(connectionIdentifier))); + const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.25.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.25.0"); + let authMethod; + authMethod = _config.authMethods["bearerAuth"]; + if (authMethod == null ? void 0 : authMethod.applySecurityAuthentication) { + yield authMethod == null ? void 0 : authMethod.applySecurityAuthentication(requestContext); + } + const defaultAuth = ((_a = _options == null ? void 0 : _options.authMethods) == null ? void 0 : _a.default) || ((_c = (_b = this.configuration) == null ? void 0 : _b.authMethods) == null ? void 0 : _c.default); + if (defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication) { + yield defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication(requestContext); + } + return requestContext; + }); + } + /** + * Version: 9.9.0.cl or later Exports the difference in connection metadata between CDW and ThoughtSpot Requires `DATAMANAGEMENT` (**Can manage data**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the following Data control privileges may be required: - `CAN_MANAGE_CUSTOM_CALENDAR`(**Can manage custom calendars**) - `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) - `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` (**Can manage data models**) To download the connection metadata difference between ThoughtSpot and CDW, pass the connection GUID as `connection_identifier` in the API request. + * @param connectionIdentifier GUID of the connection + */ + downloadConnectionMetadataChanges(connectionIdentifier, _options) { + return __async(this, null, function* () { + var _a, _b, _c; + let _config = _options || this.configuration; + if (connectionIdentifier === null || connectionIdentifier === void 0) { + throw new RequiredError("ConnectionsApi", "downloadConnectionMetadataChanges", "connectionIdentifier"); + } + const localVarPath = "/api/rest/2.0/connections/download-connection-metadata-changes/{connection_identifier}".replace("{connection_identifier}", encodeURIComponent(String(connectionIdentifier))); + const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.25.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.25.0"); + let authMethod; + authMethod = _config.authMethods["bearerAuth"]; + if (authMethod == null ? void 0 : authMethod.applySecurityAuthentication) { + yield authMethod == null ? void 0 : authMethod.applySecurityAuthentication(requestContext); + } + const defaultAuth = ((_a = _options == null ? void 0 : _options.authMethods) == null ? void 0 : _a.default) || ((_c = (_b = this.configuration) == null ? void 0 : _b.authMethods) == null ? void 0 : _c.default); + if (defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication) { + yield defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication(requestContext); + } + return requestContext; + }); + } + /** + * Version: 9.9.0.cl or later Validates the difference in connection metadata between CDW and ThoughtSpot. Requires `DATAMANAGEMENT` (**Can manage data**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the following Data control privileges may be required: - `CAN_MANAGE_CUSTOM_CALENDAR`(**Can manage custom calendars**) - `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) - `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` (**Can manage data models**) Returns a boolean indicating whether there is any difference between the connection metadata at ThoughtSpot and CDW. To get the connection metadata difference status, pass the connection GUID as `connection_identifier` in the API request. + * @param connectionIdentifier GUID of the connection + */ + fetchConnectionDiffStatus(connectionIdentifier, _options) { + return __async(this, null, function* () { + var _a, _b, _c; + let _config = _options || this.configuration; + if (connectionIdentifier === null || connectionIdentifier === void 0) { + throw new RequiredError("ConnectionsApi", "fetchConnectionDiffStatus", "connectionIdentifier"); + } + const localVarPath = "/api/rest/2.0/connections/fetch-connection-diff-status/{connection_identifier}".replace("{connection_identifier}", encodeURIComponent(String(connectionIdentifier))); + const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.25.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.25.0"); + let authMethod; + authMethod = _config.authMethods["bearerAuth"]; + if (authMethod == null ? void 0 : authMethod.applySecurityAuthentication) { + yield authMethod == null ? void 0 : authMethod.applySecurityAuthentication(requestContext); + } + const defaultAuth = ((_a = _options == null ? void 0 : _options.authMethods) == null ? void 0 : _a.default) || ((_c = (_b = this.configuration) == null ? void 0 : _b.authMethods) == null ? void 0 : _c.default); + if (defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication) { + yield defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication(requestContext); + } + return requestContext; + }); + } + /** + * Version: 26.2.0.cl or later Revokes OAuth refresh tokens for users who no longer require access to a data warehouse connection. When a token is revoked, the affected user\'s session for that connection is terminated, and they must re-authenticate to regain access. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) or `DATAMANAGEMENT` (**Can manage data**) privileges. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on the ThoughtSpot instance, users with `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) privilege can also make API requests to revoke tokens for connection users. #### Usage guidelines You can specify different combinations of identifiers to control which refresh tokens are revoked. - **connection_identifier**: Revokes refresh tokens for all users of the connection, except the connection author. - **connection_identifier** and **user_identifiers**: Revokes refresh tokens only for the users specified in the request. If the name or ID of the connection author is included in the request, their token will also be revoked. - **connection_identifier** and **configuration_identifiers**: Revokes refresh tokens for all users on the specified configurations, except the configuration author. - **connection_identifier**, **configuration_identifiers**, and **user_identifiers**: Revokes refresh tokens for the specified users on the specified configurations. - **connection_identifier** and **org_identifiers**: Revokes refresh tokens for the specified Orgs. Applicable only for published connections. - **connection_identifier**, **org_identifiers**, and **user_identifiers**: Revokes refresh tokens for the specified users in the specified Orgs. Applicable only for published connections. **NOTE**: The `org_identifiers` parameter is only applicable for published connections. Using this parameter for unpublished connections will result in an error. Ensure that the connections are published before making the API request. + * @param connectionIdentifier Unique ID or name of the connection whose refresh tokens need to be revoked. All the users associated with the connection will have their refresh tokens revoked except the author. + * @param revokeRefreshTokensRequest + */ + revokeRefreshTokens(connectionIdentifier, revokeRefreshTokensRequest, _options) { + return __async(this, null, function* () { + var _a, _b, _c; + let _config = _options || this.configuration; + if (connectionIdentifier === null || connectionIdentifier === void 0) { + throw new RequiredError("ConnectionsApi", "revokeRefreshTokens", "connectionIdentifier"); + } + if (revokeRefreshTokensRequest === null || revokeRefreshTokensRequest === void 0) { + throw new RequiredError("ConnectionsApi", "revokeRefreshTokens", "revokeRefreshTokensRequest"); + } + const localVarPath = "/api/rest/2.0/connections/{connection_identifier}/revoke-refresh-tokens".replace("{connection_identifier}", encodeURIComponent(String(connectionIdentifier))); + const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.25.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.25.0"); + const contentType = ObjectSerializer.getPreferredMediaType([ + "application/json" + ]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = ObjectSerializer.stringify( + ObjectSerializer.serialize(revokeRefreshTokensRequest, "RevokeRefreshTokensRequest", ""), + contentType + ); + requestContext.setBody(serializedBody); + let authMethod; + authMethod = _config.authMethods["bearerAuth"]; + if (authMethod == null ? void 0 : authMethod.applySecurityAuthentication) { + yield authMethod == null ? void 0 : authMethod.applySecurityAuthentication(requestContext); + } + const defaultAuth = ((_a = _options == null ? void 0 : _options.authMethods) == null ? void 0 : _a.default) || ((_c = (_b = this.configuration) == null ? void 0 : _b.authMethods) == null ? void 0 : _c.default); + if (defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication) { + yield defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication(requestContext); + } + return requestContext; + }); + } + /** + * Version: 9.2.0.cl or later Gets connection objects. Requires `DATAMANAGEMENT` (**Can manage data**) or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) privilege is required. - To get a list of all connections available in the ThoughtSpot system, send the API request without any attributes in the request body. - To get the connection objects for a specific type of data warehouse, specify the type in `data_warehouse_types`. - To fetch details of a connection object, specify the connection object GUID or name. The `name_pattern` attribute allows passing partial text with `%` for a wildcard match. - To get details of the database, schemas, tables, or columns from a data connection object, specify `data_warehouse_object_type`. - To get a specific database, schema, table, or column from a connection object, define the object type in `data_warehouse_object_type` and object properties in the `data_warehouse_objects` array. For example, to search for a column, you must pass the database, schema, and table names in the API request. Note that in the following example, object properties are set in a hierarchical order (`database` > `schema` > `table` > `column`). ``` { \"connections\": [ { \"identifier\": \"b9d1f2ef-fa65-4a4b-994e-30fa2d57b0c2\", \"data_warehouse_objects\": [ { \"database\": \"NEBULADEV\", \"schema\": \"INFORMATION_SCHEMA\", \"table\": \"APPLICABLE_ROLES\", \"column\": \"ROLE_NAME\" } ] } ], \"data_warehouse_object_type\": \"COLUMN\" } ``` - To fetch data by `configuration`, specify `data_warehouse_object_type`. For example, to fetch columns from the `DEVELOPMENT` database, specify the `data_warehouse_object_type` as `DATABASE` and define the `configuration` string as `{\"database\":\"DEVELOPMENT\"}`. To get column data for a specific table, specify the table, for example,`{\"database\":\"RETAILAPPAREL\",\"table\":\"PIPES\"}`. - To query connections by `authentication_type`, specify `data_warehouse_object_type`. Supported values for `authentication_type` are: - `SERVICE_ACCOUNT`: For connections that require service account credentials to authenticate to the Cloud Data Warehouse and fetch data. - `OAUTH`: For connections that require OAuth credentials to authenticate to the Cloud Data Warehouse and fetch data. Teradata, Oracle, and Presto Cloud Data Warehouses do not support the OAuth authentication type. - `IAM`: For connections that have the IAM OAuth set up. This authentication type is supported on Amazon Redshift connections only. - `EXTOAUTH`: For connections that have External OAuth set up. ThoughtSpot supports external [OAuth with Microsoft Azure Active Directory (AD)](https://docs.thoughtspot.com/cloud/latest/ connections-snowflake-azure-ad-oauth) and [Okta for Snowflake data connections](https://docs.thoughtspot.com/cloud/latest/connections-snowflake-okta-oauth). - `KEY_PAIR`: For connections that require Key Pair account credentials to authenticate to the Cloud Data Warehouse and fetch data. This authentication type is supported on Snowflake connections only. - `OAUTH_WITH_PKCE`: For connections that require OAuth with PKCE account credentials to authenticate to the Cloud Data Warehouse and fetch data. This authentication type is supported on Snowflake, Starburst, Databricks, Denodo connections only. - `EXTOAUTH_WITH_PKCE`: For connections that require External OAuth With PKCE account credentials to authenticate to the Cloud Data Warehouse and fetch data. This authentication type is supported on Snowflake connections only. - `OAUTH_WITH_PEZ`: For connections that require OAuth With PEZ account credentials to authenticate to the Cloud Data Warehouse and fetch data. This authentication type is supported on Amazon Redshift connections only. - `OAUTH_WITH_SERVICE_PRINCIPAL`: For connections that require OAuth With Service Principal account credentials to authenticate to the Cloud Data Warehouse and fetch data. This authentication type is supported on Databricks connections only. - `PERSONAL_ACCESS_TOKEN`: For connections that require Personal Access Token account credentials to authenticate to the Cloud Data Warehouse and fetch data. This authentication type is supported on Databricks connections only. - `OAUTH_CLIENT_CREDENTIALS`: For connections that require OAuth Client Credentials to authenticate to the Cloud Data Warehouse and fetch data. This authentication type is supported on Snowflake connections only. - To include more details about connection objects in the API response, set `include_details` to `true`. - You can also sort the output by field names and filter connections by tags. **NOTE**: When filtering connection records by parameters other than `data_warehouse_types` or `tag_identifiers`, ensure that you set `record_size` to `-1` and `record_offset` to `0` for precise results. + * @param searchConnectionRequest + */ + searchConnection(searchConnectionRequest, _options) { + return __async(this, null, function* () { + var _a, _b, _c; + let _config = _options || this.configuration; + if (searchConnectionRequest === null || searchConnectionRequest === void 0) { + throw new RequiredError("ConnectionsApi", "searchConnection", "searchConnectionRequest"); + } + const localVarPath = "/api/rest/2.0/connection/search"; + const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.25.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.25.0"); + const contentType = ObjectSerializer.getPreferredMediaType([ + "application/json" + ]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = ObjectSerializer.stringify( + ObjectSerializer.serialize(searchConnectionRequest, "SearchConnectionRequest", ""), + contentType + ); + requestContext.setBody(serializedBody); + let authMethod; + authMethod = _config.authMethods["bearerAuth"]; + if (authMethod == null ? void 0 : authMethod.applySecurityAuthentication) { + yield authMethod == null ? void 0 : authMethod.applySecurityAuthentication(requestContext); + } + const defaultAuth = ((_a = _options == null ? void 0 : _options.authMethods) == null ? void 0 : _a.default) || ((_c = (_b = this.configuration) == null ? void 0 : _b.authMethods) == null ? void 0 : _c.default); + if (defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication) { + yield defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication(requestContext); + } + return requestContext; + }); + } + /** + * Version: 26.5.0.cl or later Synchronizes connection metadata attributes from your Cloud Data Warehouse (CDW) with ThoughtSpot. Requires the `DATAMANAGEMENT` (**Can manage data**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` (**Can manage data models**) privilege is required. #### Usage guidelines To synchronize attributes from a CDW, specify the connection GUID or name in the `connection_identifier` path parameter and `sync_attributes` in the request body. Default attribute is `[\"DESCRIPTION\"]`. ##### Hierarchical schema * Connection: The connection object for the sync operation. * Tables: Tables for the sync operation. When no table is specified, all tables are synchronized. * Columns: If the table is specified, you can add the columns for the sync operation. If no columns are specified, all columns in the specified table are considered for the sync operation. To set the scope for the sync operation: * Connection-level: To sync all tables and columns, pass an empty request body, or only the attributes in the request body. * Table-level: To synchronize specific tables and their columns, specify the table identifiers in the `tables` array. * Column-level: To synchronize specific columns, specify the table identifier as the key and column identifiers as the value in the `tables` array. ``` { \"tables\": [ {\"table-guid-1\": [\"column-guid-1\", \"column-guid-2\"]}, \"table-guid-2\" ], \"sync_attributes\": [\"DESCRIPTION\"] } ``` ##### API response If the sync operation is successful, the API returns the following information: * Status of the sync operation. For example, `SUCCESS`, `PARTIAL_SUCCESS`, or `NO_UPDATE`. * Number of tables and columns that were updated. * Number of tables and columns with the sync failed status when the overall sync status is `PARTIAL_SUCCESS`. * Message text indicating the sync results. + * @param connectionIdentifier Unique ID or name of the connection. + * @param syncMetadataRequest + */ + syncMetadata(connectionIdentifier, syncMetadataRequest, _options) { + return __async(this, null, function* () { + var _a, _b, _c; + let _config = _options || this.configuration; + if (connectionIdentifier === null || connectionIdentifier === void 0) { + throw new RequiredError("ConnectionsApi", "syncMetadata", "connectionIdentifier"); + } + if (syncMetadataRequest === null || syncMetadataRequest === void 0) { + throw new RequiredError("ConnectionsApi", "syncMetadata", "syncMetadataRequest"); + } + const localVarPath = "/api/rest/2.0/connections/{connection_identifier}/resync-metadata".replace("{connection_identifier}", encodeURIComponent(String(connectionIdentifier))); + const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.25.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.25.0"); + const contentType = ObjectSerializer.getPreferredMediaType([ + "application/json" + ]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = ObjectSerializer.stringify( + ObjectSerializer.serialize(syncMetadataRequest, "SyncMetadataRequest", ""), + contentType + ); + requestContext.setBody(serializedBody); + let authMethod; + authMethod = _config.authMethods["bearerAuth"]; + if (authMethod == null ? void 0 : authMethod.applySecurityAuthentication) { + yield authMethod == null ? void 0 : authMethod.applySecurityAuthentication(requestContext); + } + const defaultAuth = ((_a = _options == null ? void 0 : _options.authMethods) == null ? void 0 : _a.default) || ((_c = (_b = this.configuration) == null ? void 0 : _b.authMethods) == null ? void 0 : _c.default); + if (defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication) { + yield defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication(requestContext); + } + return requestContext; + }); + } + /** + * Version: 9.2.0.cl or later **Important**: This endpoint is deprecated and will be removed from ThoughtSpot in September 2025. ThoughtSpot strongly recommends using the [Update connection V2](#/http/api-endpoints/connections/update-connection-v2) endpoint to update your connection objects. #### Usage guidelines Updates a connection object. Requires `DATAMANAGEMENT` (**Can manage data**) and edit permissions to the connection object, or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) privilege is required. To update a connection object, pass these parameters in your API request: 1. GUID of the connection object. 2. If you are updating tables or database schema of a connection object: a. Add the updated JSON map of metadata with database, schema, and tables in `data_warehouse_config`. b. Set `validate` to `true`. 3. If you are updating a configuration attribute, connection name, or description, you can set `validate` to `false`. + * @param updateConnectionRequest + */ + updateConnection(updateConnectionRequest, _options) { + return __async(this, null, function* () { + var _a, _b, _c; + let _config = _options || this.configuration; + if (updateConnectionRequest === null || updateConnectionRequest === void 0) { + throw new RequiredError("ConnectionsApi", "updateConnection", "updateConnectionRequest"); + } + const localVarPath = "/api/rest/2.0/connection/update"; + const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.25.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.25.0"); + const contentType = ObjectSerializer.getPreferredMediaType([ + "application/json" + ]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = ObjectSerializer.stringify( + ObjectSerializer.serialize(updateConnectionRequest, "UpdateConnectionRequest", ""), + contentType + ); + requestContext.setBody(serializedBody); + let authMethod; + authMethod = _config.authMethods["bearerAuth"]; + if (authMethod == null ? void 0 : authMethod.applySecurityAuthentication) { + yield authMethod == null ? void 0 : authMethod.applySecurityAuthentication(requestContext); + } + const defaultAuth = ((_a = _options == null ? void 0 : _options.authMethods) == null ? void 0 : _a.default) || ((_c = (_b = this.configuration) == null ? void 0 : _b.authMethods) == null ? void 0 : _c.default); + if (defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication) { + yield defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication(requestContext); + } + return requestContext; + }); + } + /** + * Version: 26.6.0.cl or later Activates or deactivates a connection. A deactivated connection cannot be used for queries or operations until it is activated again. Requires `DATAMANAGEMENT` (**Can manage data**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) privilege is required. Only the connection owner or an administrator can perform this operation. #### Usage guidelines To update the status of a connection, specify the connection GUID or name in the `connection_identifier` path parameter and the desired `status` in the request body. - **ACTIVATED**: Enables the connection. Queries and operations can resume on an activated connection. - **DEACTIVATED**: Disables the connection. It does not remove the connection metadata, but only makes the connection unavailable for queries and operations. You can reactivate a deactivated connection by setting \"status\": \"ACTIVATED\". + * @param connectionIdentifier Unique ID or name of the connection. + * @param updateConnectionStatusRequest + */ + updateConnectionStatus(connectionIdentifier, updateConnectionStatusRequest, _options) { + return __async(this, null, function* () { + var _a, _b, _c; + let _config = _options || this.configuration; + if (connectionIdentifier === null || connectionIdentifier === void 0) { + throw new RequiredError("ConnectionsApi", "updateConnectionStatus", "connectionIdentifier"); + } + if (updateConnectionStatusRequest === null || updateConnectionStatusRequest === void 0) { + throw new RequiredError("ConnectionsApi", "updateConnectionStatus", "updateConnectionStatusRequest"); + } + const localVarPath = "/api/rest/2.0/connections/{connection_identifier}/status".replace("{connection_identifier}", encodeURIComponent(String(connectionIdentifier))); + const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.25.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.25.0"); + const contentType = ObjectSerializer.getPreferredMediaType([ + "application/json" + ]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = ObjectSerializer.stringify( + ObjectSerializer.serialize(updateConnectionStatusRequest, "UpdateConnectionStatusRequest", ""), + contentType + ); + requestContext.setBody(serializedBody); + let authMethod; + authMethod = _config.authMethods["bearerAuth"]; + if (authMethod == null ? void 0 : authMethod.applySecurityAuthentication) { + yield authMethod == null ? void 0 : authMethod.applySecurityAuthentication(requestContext); + } + const defaultAuth = ((_a = _options == null ? void 0 : _options.authMethods) == null ? void 0 : _a.default) || ((_c = (_b = this.configuration) == null ? void 0 : _b.authMethods) == null ? void 0 : _c.default); + if (defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication) { + yield defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication(requestContext); + } + return requestContext; + }); + } + /** + * Version: 10.4.0.cl or later Updates a connection object. Requires `DATAMANAGEMENT` (**Can manage data**) and edit permissions to the connection object, or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) privilege is required. To update a connection object, pass these parameters in your API request: 1. GUID of the connection object. 2. If you are updating tables or database schema of a connection object: a. Add the updated JSON map of metadata with database, schema, and tables in `data_warehouse_config`. b. Set `validate` to `true`. **NOTE:** If the `authentication_type` is anything other than SERVICE_ACCOUNT, you must explicitly provide the authenticationType property in the payload. If you do not specify authenticationType, the API will default to SERVICE_ACCOUNT as the authentication type. * A JSON map of configuration attributes, database details, and table properties in `data_warehouse_config` as shown in the following example: * This is an example of updating a single table in a empty connection: ``` { \"authenticationType\": \"SERVICE_ACCOUNT\", \"externalDatabases\": [ { \"name\": \"DEVELOPMENT\", \"isAutoCreated\": false, \"schemas\": [ { \"name\": \"TS_dataset\", \"tables\": [ { \"name\": \"DEMORENAME\", \"type\": \"TABLE\", \"description\": \"\", \"selected\": true, \"linked\": true, \"gid\": 0, \"datasetId\": \"-1\", \"subType\": \"\", \"reportId\": \"\", \"viewId\": \"\", \"columns\": [ { \"name\": \"Col1\", \"type\": \"VARCHAR\", \"canImport\": true, \"selected\": true, \"description\": \"\", \"isLinkedActive\": true, \"isAggregate\": false }, { \"name\": \"Col2\", \"type\": \"VARCHAR\", \"canImport\": true, \"selected\": true, \"description\": \"\", \"isLinkedActive\": true, \"isAggregate\": false }, { \"name\": \"Col3\", \"type\": \"VARCHAR\", \"canImport\": true, \"selected\": true, \"description\": \"\", \"isLinkedActive\": true, \"isAggregate\": false }, { \"name\": \"Col312\", \"type\": \"VARCHAR\", \"canImport\": true, \"selected\": true, \"description\": \"\", \"isLinkedActive\": true, \"isAggregate\": false }, { \"name\": \"Col4\", \"type\": \"VARCHAR\", \"canImport\": true, \"selected\": true, \"description\": \"\", \"isLinkedActive\": true, \"isAggregate\": false } ], \"relationships\": [] } ] } ] } ], \"configuration\": { \"password\": \"\", \"database\": \"DEVELOPMENT\", \"role\": \"DEV\", \"accountName\": \"thoughtspot_partner\", \"warehouse\": \"DEMO_WH\", \"user\": \"DEV_USER\" } } ``` * This is an example of updating a single table in an existing connection with tables: ``` { \"authenticationType\": \"SERVICE_ACCOUNT\", \"externalDatabases\": [ { \"name\": \"DEVELOPMENT\", \"isAutoCreated\": false, \"schemas\": [ { \"name\": \"TS_dataset\", \"tables\": [ { \"name\": \"CUSTOMER\", \"type\": \"TABLE\", \"description\": \"\", \"selected\": true, \"linked\": true, \"gid\": 0, \"datasetId\": \"-1\", \"subType\": \"\", \"reportId\": \"\", \"viewId\": \"\", \"columns\": [], \"relationships\": [] }, { \"name\": \"tpch5k_falcon_default_schema_users\", \"type\": \"TABLE\", \"description\": \"\", \"selected\": true, \"linked\": true, \"gid\": 0, \"datasetId\": \"-1\", \"subType\": \"\", \"reportId\": \"\", \"viewId\": \"\", \"columns\": [ { \"name\": \"user_id\", \"type\": \"INT64\", \"canImport\": true, \"selected\": true, \"description\": \"\", \"isLinkedActive\": true, \"isAggregate\": false }, { \"name\": \"product_id\", \"type\": \"INT64\", \"canImport\": true, \"selected\": true, \"description\": \"\", \"isLinkedActive\": true, \"isAggregate\": false }, { \"name\": \"user_cost\", \"type\": \"INT64\", \"canImport\": true, \"selected\": true, \"description\": \"\", \"isLinkedActive\": true, \"isAggregate\": false } ], \"relationships\": [] } ] } ] } ], \"configuration\": { \"password\": \"\", \"database\": \"DEVELOPMENT\", \"role\": \"DEV\", \"accountName\": \"thoughtspot_partner\", \"warehouse\": \"DEMO_WH\", \"user\": \"DEV_USER\" } } ``` 3. If you are updating a configuration attribute, connection name, or description, you can set `validate` to `false`. **NOTE:** If the `authentication_type` is anything other than SERVICE_ACCOUNT, you must explicitly provide the authenticationType property in the payload. If you do not specify authenticationType, the API will default to SERVICE_ACCOUNT as the authentication type. * A JSON map of configuration attributes in `data_warehouse_config`. The following example shows the configuration attributes for a Snowflake connection: ``` { \"configuration\":{ \"accountName\":\"thoughtspot_partner\", \"user\":\"tsadmin\", \"password\":\"TestConn123\", \"role\":\"sysadmin\", \"warehouse\":\"MEDIUM_WH\" }, \"externalDatabases\":[ ] } ``` + * @param connectionIdentifier Unique ID or name of the connection. + * @param updateConnectionV2Request + */ + updateConnectionV2(connectionIdentifier, updateConnectionV2Request, _options) { + return __async(this, null, function* () { + var _a, _b, _c; + let _config = _options || this.configuration; + if (connectionIdentifier === null || connectionIdentifier === void 0) { + throw new RequiredError("ConnectionsApi", "updateConnectionV2", "connectionIdentifier"); + } + if (updateConnectionV2Request === null || updateConnectionV2Request === void 0) { + throw new RequiredError("ConnectionsApi", "updateConnectionV2", "updateConnectionV2Request"); + } + const localVarPath = "/api/rest/2.0/connections/{connection_identifier}/update".replace("{connection_identifier}", encodeURIComponent(String(connectionIdentifier))); + const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.25.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.25.0"); + const contentType = ObjectSerializer.getPreferredMediaType([ + "application/json" + ]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = ObjectSerializer.stringify( + ObjectSerializer.serialize(updateConnectionV2Request, "UpdateConnectionV2Request", ""), + contentType + ); + requestContext.setBody(serializedBody); + let authMethod; + authMethod = _config.authMethods["bearerAuth"]; + if (authMethod == null ? void 0 : authMethod.applySecurityAuthentication) { + yield authMethod == null ? void 0 : authMethod.applySecurityAuthentication(requestContext); + } + const defaultAuth = ((_a = _options == null ? void 0 : _options.authMethods) == null ? void 0 : _a.default) || ((_c = (_b = this.configuration) == null ? void 0 : _b.authMethods) == null ? void 0 : _c.default); + if (defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication) { + yield defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication(requestContext); + } + return requestContext; + }); + } +}; +var ConnectionsApiResponseProcessor = class { + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to createConnection + * @throws ApiException if the response code was not in [200, 299] + */ + createConnection(response) { + return __async(this, null, function* () { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("200", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "CreateConnectionResponse", + "" + ); + return body; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Invalid request.", body, response.headers); + } + if (isCodeInRange("401", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unexpected error", body, response.headers); + } + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "CreateConnectionResponse", + "" + ); + return body; + } + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", yield response.getBodyAsAny(), response.headers); + }); + } + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to deleteConnection + * @throws ApiException if the response code was not in [200, 299] + */ + deleteConnection(response) { + return __async(this, null, function* () { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("204", response.httpStatusCode)) { + return; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Invalid request.", body, response.headers); + } + if (isCodeInRange("401", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unexpected error", body, response.headers); + } + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "void", + "" + ); + return body; + } + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", yield response.getBodyAsAny(), response.headers); + }); + } + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to deleteConnectionV2 + * @throws ApiException if the response code was not in [200, 299] + */ + deleteConnectionV2(response) { + return __async(this, null, function* () { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("204", response.httpStatusCode)) { + return; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Invalid request.", body, response.headers); + } + if (isCodeInRange("401", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unexpected error", body, response.headers); + } + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "void", + "" + ); + return body; + } + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", yield response.getBodyAsAny(), response.headers); + }); + } + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to downloadConnectionMetadataChanges + * @throws ApiException if the response code was not in [200, 299] + */ + downloadConnectionMetadataChanges(response) { + return __async(this, null, function* () { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("200", response.httpStatusCode)) { + const body = yield response.getBodyAsFile(); + return body; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "binary" + ); + throw new ApiException(response.httpStatusCode, "Invalid request.", body, response.headers); + } + if (isCodeInRange("401", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "binary" + ); + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "binary" + ); + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "binary" + ); + throw new ApiException(response.httpStatusCode, "Unexpected error", body, response.headers); + } + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "HttpFile", + "binary" + ); + return body; + } + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", yield response.getBodyAsAny(), response.headers); + }); + } + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to fetchConnectionDiffStatus + * @throws ApiException if the response code was not in [200, 299] + */ + fetchConnectionDiffStatus(response) { + return __async(this, null, function* () { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("200", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "FetchConnectionDiffStatusResponse", + "" + ); + return body; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Invalid request.", body, response.headers); + } + if (isCodeInRange("401", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unexpected error", body, response.headers); + } + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "FetchConnectionDiffStatusResponse", + "" + ); + return body; + } + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", yield response.getBodyAsAny(), response.headers); + }); + } + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to revokeRefreshTokens + * @throws ApiException if the response code was not in [200, 299] + */ + revokeRefreshTokens(response) { + return __async(this, null, function* () { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("200", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "RevokeRefreshTokensResponse", + "" + ); + return body; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Invalid request.", body, response.headers); + } + if (isCodeInRange("401", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } + if (isCodeInRange("404", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Object not found", body, response.headers); + } + if (isCodeInRange("409", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Conflict", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unexpected error", body, response.headers); + } + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "RevokeRefreshTokensResponse", + "" + ); + return body; + } + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", yield response.getBodyAsAny(), response.headers); + }); + } + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to searchConnection + * @throws ApiException if the response code was not in [200, 299] + */ + searchConnection(response) { + return __async(this, null, function* () { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("200", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "Array", + "" + ); + return body; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Invalid request.", body, response.headers); + } + if (isCodeInRange("401", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unexpected error", body, response.headers); + } + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "Array", + "" + ); + return body; + } + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", yield response.getBodyAsAny(), response.headers); + }); + } + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to syncMetadata + * @throws ApiException if the response code was not in [200, 299] + */ + syncMetadata(response) { + return __async(this, null, function* () { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("200", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "SyncMetadataResponse", + "" + ); + return body; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Invalid request parameters or hierarchy.", body, response.headers); + } + if (isCodeInRange("401", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } + if (isCodeInRange("404", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Connection, table, or column not found.", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unexpected error", body, response.headers); + } + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "SyncMetadataResponse", + "" + ); + return body; + } + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", yield response.getBodyAsAny(), response.headers); + }); + } + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to updateConnection + * @throws ApiException if the response code was not in [200, 299] + */ + updateConnection(response) { + return __async(this, null, function* () { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("204", response.httpStatusCode)) { + return; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Invalid request.", body, response.headers); + } + if (isCodeInRange("401", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unexpected error", body, response.headers); + } + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "void", + "" + ); + return body; + } + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", yield response.getBodyAsAny(), response.headers); + }); + } + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to updateConnectionStatus + * @throws ApiException if the response code was not in [200, 299] + */ + updateConnectionStatus(response) { + return __async(this, null, function* () { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("204", response.httpStatusCode)) { + return; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Invalid request.", body, response.headers); + } + if (isCodeInRange("401", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } + if (isCodeInRange("404", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Object not found", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unexpected error", body, response.headers); + } + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "void", + "" + ); + return body; + } + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", yield response.getBodyAsAny(), response.headers); + }); + } + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to updateConnectionV2 + * @throws ApiException if the response code was not in [200, 299] + */ + updateConnectionV2(response) { + return __async(this, null, function* () { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("204", response.httpStatusCode)) { + return; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Invalid request.", body, response.headers); + } + if (isCodeInRange("401", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unexpected error", body, response.headers); + } + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "void", + "" + ); + return body; + } + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", yield response.getBodyAsAny(), response.headers); + }); + } +}; + +// apis/CustomActionApi.ts +var CustomActionApiRequestFactory = class extends BaseAPIRequestFactory { + /** + * Version: 9.6.0.cl or later Creates a custom action that appears as a menu action on a saved Answer or Liveboard visualization. Requires `DEVELOPER` (**Has Developer privilege**) or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `DEVELOPER` (**Has developer privilege**) privilege is required. #### Usage Guidelines The API lets you create the following types of custom actions: * URL-based action Allows pushing data to an external URL. * Callback action Triggers a callback to the host application and initiates a response payload on an embedded ThoughtSpot instance. By default, custom actions are visible to only administrator or developer users. To make a custom action available to other users, and specify the groups in `group_identifiers`. By default, the custom action is set as a _global_ action on all visualizations and saved Answers. To assign a custom action to specific Liveboard visualization, saved Answer, or Worksheet, set `visibility` to `false` in `default_action_config` property and specify the GUID or name of the object in `associate_metadata`. For more information, see [Custom actions](https://developers.thoughtspot.com/docs/custom-action-intro). + * @param createCustomActionRequest + */ + createCustomAction(createCustomActionRequest, _options) { + return __async(this, null, function* () { + var _a, _b, _c; + let _config = _options || this.configuration; + if (createCustomActionRequest === null || createCustomActionRequest === void 0) { + throw new RequiredError("CustomActionApi", "createCustomAction", "createCustomActionRequest"); + } + const localVarPath = "/api/rest/2.0/customization/custom-actions"; + const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.25.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.25.0"); + const contentType = ObjectSerializer.getPreferredMediaType([ + "application/json" + ]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = ObjectSerializer.stringify( + ObjectSerializer.serialize(createCustomActionRequest, "CreateCustomActionRequest", ""), + contentType + ); + requestContext.setBody(serializedBody); + let authMethod; + authMethod = _config.authMethods["bearerAuth"]; + if (authMethod == null ? void 0 : authMethod.applySecurityAuthentication) { + yield authMethod == null ? void 0 : authMethod.applySecurityAuthentication(requestContext); + } + const defaultAuth = ((_a = _options == null ? void 0 : _options.authMethods) == null ? void 0 : _a.default) || ((_c = (_b = this.configuration) == null ? void 0 : _b.authMethods) == null ? void 0 : _c.default); + if (defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication) { + yield defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication(requestContext); + } + return requestContext; + }); + } + /** + * Version: 9.6.0.cl or later Removes the custom action specified in the API request. Requires `DEVELOPER` (**Has Developer privilege**) or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `DEVELOPER` (**Has developer privilege**) privilege is required. + * @param customActionIdentifier Unique ID or name of the custom action. + */ + deleteCustomAction(customActionIdentifier, _options) { + return __async(this, null, function* () { + var _a, _b, _c; + let _config = _options || this.configuration; + if (customActionIdentifier === null || customActionIdentifier === void 0) { + throw new RequiredError("CustomActionApi", "deleteCustomAction", "customActionIdentifier"); + } + const localVarPath = "/api/rest/2.0/customization/custom-actions/{custom_action_identifier}/delete".replace("{custom_action_identifier}", encodeURIComponent(String(customActionIdentifier))); + const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.25.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.25.0"); + let authMethod; + authMethod = _config.authMethods["bearerAuth"]; + if (authMethod == null ? void 0 : authMethod.applySecurityAuthentication) { + yield authMethod == null ? void 0 : authMethod.applySecurityAuthentication(requestContext); + } + const defaultAuth = ((_a = _options == null ? void 0 : _options.authMethods) == null ? void 0 : _a.default) || ((_c = (_b = this.configuration) == null ? void 0 : _b.authMethods) == null ? void 0 : _c.default); + if (defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication) { + yield defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication(requestContext); + } + return requestContext; + }); + } + /** + * Version: 9.6.0.cl or later Gets custom actions configured on the cluster. Requires `DEVELOPER` (**Has Developer privilege**) or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `DEVELOPER` (**Has developer privilege**) privilege is required. + * @param searchCustomActionsRequest + */ + searchCustomActions(searchCustomActionsRequest, _options) { + return __async(this, null, function* () { + var _a, _b, _c; + let _config = _options || this.configuration; + if (searchCustomActionsRequest === null || searchCustomActionsRequest === void 0) { + throw new RequiredError("CustomActionApi", "searchCustomActions", "searchCustomActionsRequest"); + } + const localVarPath = "/api/rest/2.0/customization/custom-actions/search"; + const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.25.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.25.0"); + const contentType = ObjectSerializer.getPreferredMediaType([ + "application/json" + ]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = ObjectSerializer.stringify( + ObjectSerializer.serialize(searchCustomActionsRequest, "SearchCustomActionsRequest", ""), + contentType + ); + requestContext.setBody(serializedBody); + let authMethod; + authMethod = _config.authMethods["bearerAuth"]; + if (authMethod == null ? void 0 : authMethod.applySecurityAuthentication) { + yield authMethod == null ? void 0 : authMethod.applySecurityAuthentication(requestContext); + } + const defaultAuth = ((_a = _options == null ? void 0 : _options.authMethods) == null ? void 0 : _a.default) || ((_c = (_b = this.configuration) == null ? void 0 : _b.authMethods) == null ? void 0 : _c.default); + if (defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication) { + yield defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication(requestContext); + } + return requestContext; + }); + } + /** + * Version: 9.6.0.cl or later Updates a custom action. Requires `DEVELOPER` (**Has Developer privilege**) or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `DEVELOPER` (**Has developer privilege**) privilege is required. #### Usage Guidelines The API allows you to modify the following properties: * Name of the custom action * Action availability to groups * Association to metadata objects * Authentication settings for a URL-based action For more information, see [Custom actions](https://developers.thoughtspot.com/docs/custom-action-intro). + * @param customActionIdentifier Unique ID or name of the custom action. + * @param updateCustomActionRequest + */ + updateCustomAction(customActionIdentifier, updateCustomActionRequest, _options) { + return __async(this, null, function* () { + var _a, _b, _c; + let _config = _options || this.configuration; + if (customActionIdentifier === null || customActionIdentifier === void 0) { + throw new RequiredError("CustomActionApi", "updateCustomAction", "customActionIdentifier"); + } + if (updateCustomActionRequest === null || updateCustomActionRequest === void 0) { + throw new RequiredError("CustomActionApi", "updateCustomAction", "updateCustomActionRequest"); + } + const localVarPath = "/api/rest/2.0/customization/custom-actions/{custom_action_identifier}/update".replace("{custom_action_identifier}", encodeURIComponent(String(customActionIdentifier))); + const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.25.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.25.0"); + const contentType = ObjectSerializer.getPreferredMediaType([ + "application/json" + ]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = ObjectSerializer.stringify( + ObjectSerializer.serialize(updateCustomActionRequest, "UpdateCustomActionRequest", ""), + contentType + ); + requestContext.setBody(serializedBody); + let authMethod; + authMethod = _config.authMethods["bearerAuth"]; + if (authMethod == null ? void 0 : authMethod.applySecurityAuthentication) { + yield authMethod == null ? void 0 : authMethod.applySecurityAuthentication(requestContext); + } + const defaultAuth = ((_a = _options == null ? void 0 : _options.authMethods) == null ? void 0 : _a.default) || ((_c = (_b = this.configuration) == null ? void 0 : _b.authMethods) == null ? void 0 : _c.default); + if (defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication) { + yield defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication(requestContext); + } + return requestContext; + }); + } +}; +var CustomActionApiResponseProcessor = class { + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to createCustomAction + * @throws ApiException if the response code was not in [200, 299] + */ + createCustomAction(response) { + return __async(this, null, function* () { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("200", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ResponseCustomAction", + "" + ); + return body; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Invalid request.", body, response.headers); + } + if (isCodeInRange("401", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unexpected error", body, response.headers); + } + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ResponseCustomAction", + "" + ); + return body; + } + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", yield response.getBodyAsAny(), response.headers); + }); + } + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to deleteCustomAction + * @throws ApiException if the response code was not in [200, 299] + */ + deleteCustomAction(response) { + return __async(this, null, function* () { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("204", response.httpStatusCode)) { + return; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Invalid request.", body, response.headers); + } + if (isCodeInRange("401", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unexpected error", body, response.headers); + } + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "void", + "" + ); + return body; + } + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", yield response.getBodyAsAny(), response.headers); + }); + } + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to searchCustomActions + * @throws ApiException if the response code was not in [200, 299] + */ + searchCustomActions(response) { + return __async(this, null, function* () { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("200", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "Array", + "" + ); + return body; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Invalid request.", body, response.headers); + } + if (isCodeInRange("401", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unexpected error", body, response.headers); + } + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "Array", + "" + ); + return body; + } + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", yield response.getBodyAsAny(), response.headers); + }); + } + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to updateCustomAction + * @throws ApiException if the response code was not in [200, 299] + */ + updateCustomAction(response) { + return __async(this, null, function* () { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("204", response.httpStatusCode)) { + return; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Invalid request.", body, response.headers); + } + if (isCodeInRange("401", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unexpected error", body, response.headers); + } + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "void", + "" + ); + return body; + } + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", yield response.getBodyAsAny(), response.headers); + }); + } +}; + +// apis/CustomCalendarsApi.ts +var CustomCalendarsApiRequestFactory = class extends BaseAPIRequestFactory { + /** + * Version: 10.12.0.cl or later Creates a new [custom calendar](https://docs.thoughtspot.com/cloud/latest/connections-cust-cal). Requires `DATAMANAGEMENT` (**Can manage data**) or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your ThoughtSpot instance, the `CAN_MANAGE_CUSTOM_CALENDAR` (**Can manage custom calendars**) privilege is required. #### Usage guidelines You can create a custom calendar from scratch or an existing Table in ThoughtSpot. For both methods of calendar creation, the following parameters are required: * Name of the custom calendar. * Calendar creation method. To create a calendar from an existing table, specify the method: - `FROM_EXISTING_TABLE` - Creates calendar from the table reference provided in the API request. - `FROM_INPUT_PARAMS` - Creates a calendar from the parameters defined in the API request. * Connection ID and Table name * Database and schema name attributes: For most Cloud Data Warehouse (CDW) connectors, both `database_name` and `schema_name` attributes are required. However, the attribute requirements are conditional and vary based on the connector type and its metadata structure. For example, for connectors such as Teradata, MySQL, SingleSore, Amazon Aurora MySQL, Amazon RDS MySQL, Oracle, and GCP_MYSQL, the `schema_name` is required, whereas the `database_name` attribute is not. Similarly, connectors such as ClickHouse require you to specify the `database_name` and the schema specification in such cases is optional. **NOTE**: If you are creating a calendar from an existing table, ensure that the referenced table matches the required DDL for custom calendars. If the schema does not match, the API returns an error. ##### Calendar type The API allows you to create the following types of calendars: * `MONTH_OFFSET`. The default calendar type. A `MONTH_OFFSET` calendar is offset by a few months from the standard calendar months (January to December) and the year begins with the month defined in the request. For example, if the `month_offset` value is set as `April`, the calendar year begins in April. * `4-4-5`. Each quarter in the calendar will include two 4-week months followed by one 5-week month. * `4-5-4`. Each quarter in the calendar will include two 4-week months with a 5-week month between. * `5-4-4`. Each quarter begins with a 5-week month, followed by two 4-week months. To start and end the calendar on a specific date, specify the dates in the `MM/DD/YYYY` format. For `MONTH_OFFSET` calendars, ensure that the `start_date` matches the month specified in the `month_offset` attribute. You can also set the starting day of the week and customize the prefixes for year and quarter labels. #### Examples To create a calendar from an existing table: ``` { \"name\": \"MyCustomCalendar1\", \"table_reference\": { \"connection_identifier\": \"4db8ea22-2ff4-4224-b05a-26674717e468\", \"table_name\": \"MyCalendarTable\", \"database_name\": \"RETAILAPPAREL\", \"schema_name\": \"PUBLIC\" }, \"creation_method\": \"FROM_EXISTING_TABLE\", } ``` To create a calendar from scratch: ``` { \"name\": \"MyCustomCalendar1\", \"table_reference\": { \"connection_identifier\": \"4db8ea22-2ff4-4224-b05a-26674717e468\", \"table_name\": \"MyCalendarTable\", \"database_name\": \"RETAILAPPAREL\", \"schema_name\": \"PUBLIC\" }, \"creation_method\": \"FROM_INPUT_PARAMS\", \"calendar_type\": \"MONTH_OFFSET\", \"month_offset\": \"April\", \"start_day_of_week\": \"Monday\", \"quarter_name_prefix\": \"Q\", \"year_name_prefix\": \"FY\", \"start_date\": \"04/01/2025\", \"end_date\": \"04/31/2025\" } ``` + * @param createCalendarRequest + */ + createCalendar(createCalendarRequest, _options) { + return __async(this, null, function* () { + var _a, _b, _c; + let _config = _options || this.configuration; + if (createCalendarRequest === null || createCalendarRequest === void 0) { + throw new RequiredError("CustomCalendarsApi", "createCalendar", "createCalendarRequest"); + } + const localVarPath = "/api/rest/2.0/calendars/create"; + const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.25.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.25.0"); + const contentType = ObjectSerializer.getPreferredMediaType([ + "application/json" + ]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = ObjectSerializer.stringify( + ObjectSerializer.serialize(createCalendarRequest, "CreateCalendarRequest", ""), + contentType + ); + requestContext.setBody(serializedBody); + let authMethod; + authMethod = _config.authMethods["bearerAuth"]; + if (authMethod == null ? void 0 : authMethod.applySecurityAuthentication) { + yield authMethod == null ? void 0 : authMethod.applySecurityAuthentication(requestContext); + } + const defaultAuth = ((_a = _options == null ? void 0 : _options.authMethods) == null ? void 0 : _a.default) || ((_c = (_b = this.configuration) == null ? void 0 : _b.authMethods) == null ? void 0 : _c.default); + if (defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication) { + yield defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication(requestContext); + } + return requestContext; + }); + } + /** + * Version: 10.12.0.cl or later Deletes a [custom calendar](https://docs.thoughtspot.com/cloud/latest/connections-cust-cal). Requires `DATAMANAGEMENT` (**Can manage data**) or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your ThoughtSpot instance, the `CAN_MANAGE_CUSTOM_CALENDAR` (**Can manage custom calendars**) privilege is required. #### Usage guidelines To delete a custom calendar, specify the calendar ID as a path parameter in the request URL. + * @param calendarIdentifier Unique ID or name of the Calendar. + */ + deleteCalendar(calendarIdentifier, _options) { + return __async(this, null, function* () { + var _a, _b, _c; + let _config = _options || this.configuration; + if (calendarIdentifier === null || calendarIdentifier === void 0) { + throw new RequiredError("CustomCalendarsApi", "deleteCalendar", "calendarIdentifier"); + } + const localVarPath = "/api/rest/2.0/calendars/{calendar_identifier}/delete".replace("{calendar_identifier}", encodeURIComponent(String(calendarIdentifier))); + const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.25.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.25.0"); + let authMethod; + authMethod = _config.authMethods["bearerAuth"]; + if (authMethod == null ? void 0 : authMethod.applySecurityAuthentication) { + yield authMethod == null ? void 0 : authMethod.applySecurityAuthentication(requestContext); + } + const defaultAuth = ((_a = _options == null ? void 0 : _options.authMethods) == null ? void 0 : _a.default) || ((_c = (_b = this.configuration) == null ? void 0 : _b.authMethods) == null ? void 0 : _c.default); + if (defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication) { + yield defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication(requestContext); + } + return requestContext; + }); + } + /** + * Version: 10.12.0.cl or later Exports a [custom calendar](https://docs.thoughtspot.com/cloud/latest/connections-cust-cal) in the CSV format. Requires `DATAMANAGEMENT` (**Can manage data**) or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your ThoughtSpot instance, the `CAN_MANAGE_CUSTOM_CALENDAR` (**Can manage custom calendars**) privilege is required. #### Usage guidelines Use this API to download a custom calendar in the CSV file format. In your API request, specify the following parameters. * Start and end date of the calendar. For \"month offset\" calendars, the start date must match the month defined in the `month_offset` attribute. You can also specify optional parameters such as the starting day of the week and prefixes for the quarter and year labels. + * @param generateCSVRequest + */ + generateCSV(generateCSVRequest, _options) { + return __async(this, null, function* () { + var _a, _b, _c; + let _config = _options || this.configuration; + if (generateCSVRequest === null || generateCSVRequest === void 0) { + throw new RequiredError("CustomCalendarsApi", "generateCSV", "generateCSVRequest"); + } + const localVarPath = "/api/rest/2.0/calendars/generate-csv"; + const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.25.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.25.0"); + const contentType = ObjectSerializer.getPreferredMediaType([ + "application/json" + ]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = ObjectSerializer.stringify( + ObjectSerializer.serialize(generateCSVRequest, "GenerateCSVRequest", ""), + contentType + ); + requestContext.setBody(serializedBody); + let authMethod; + authMethod = _config.authMethods["bearerAuth"]; + if (authMethod == null ? void 0 : authMethod.applySecurityAuthentication) { + yield authMethod == null ? void 0 : authMethod.applySecurityAuthentication(requestContext); + } + const defaultAuth = ((_a = _options == null ? void 0 : _options.authMethods) == null ? void 0 : _a.default) || ((_c = (_b = this.configuration) == null ? void 0 : _b.authMethods) == null ? void 0 : _c.default); + if (defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication) { + yield defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication(requestContext); + } + return requestContext; + }); + } + /** + * Version: 10.12.0.cl or later Gets a list of [custom calendars](https://docs.thoughtspot.com/cloud/latest/connections-cust-cal). Requires `DATAMANAGEMENT` (**Can manage data**) or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your ThoughtSpot instance, the `CAN_MANAGE_CUSTOM_CALENDAR` (**Can manage custom calendars**) privilege is required. #### Usage guidelines By default, the API returns a list of custom calendars for all connection objects. To retrieve custom calendar details for a particular connection, specify the connection ID. You can also use other search parameters such as `name_pattern` and `sort_options` as search filters. The `name_pattern` parameter filters and returns only those objects that match the specified pattern. Use `%` as a wildcard for pattern matching. + * @param searchCalendarsRequest + */ + searchCalendars(searchCalendarsRequest, _options) { + return __async(this, null, function* () { + var _a, _b, _c; + let _config = _options || this.configuration; + if (searchCalendarsRequest === null || searchCalendarsRequest === void 0) { + throw new RequiredError("CustomCalendarsApi", "searchCalendars", "searchCalendarsRequest"); + } + const localVarPath = "/api/rest/2.0/calendars/search"; + const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.25.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.25.0"); + const contentType = ObjectSerializer.getPreferredMediaType([ + "application/json" + ]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = ObjectSerializer.stringify( + ObjectSerializer.serialize(searchCalendarsRequest, "SearchCalendarsRequest", ""), + contentType + ); + requestContext.setBody(serializedBody); + let authMethod; + authMethod = _config.authMethods["bearerAuth"]; + if (authMethod == null ? void 0 : authMethod.applySecurityAuthentication) { + yield authMethod == null ? void 0 : authMethod.applySecurityAuthentication(requestContext); + } + const defaultAuth = ((_a = _options == null ? void 0 : _options.authMethods) == null ? void 0 : _a.default) || ((_c = (_b = this.configuration) == null ? void 0 : _b.authMethods) == null ? void 0 : _c.default); + if (defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication) { + yield defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication(requestContext); + } + return requestContext; + }); + } + /** + * Version: 10.12.0.cl or later Updates the properties of a [custom calendar](https://docs.thoughtspot.com/cloud/latest/connections-cust-cal). Requires `DATAMANAGEMENT` (**Can manage data**) or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your ThoughtSpot instance, the `CAN_MANAGE_CUSTOM_CALENDAR` (**Can manage custom calendars**) privilege is required. #### Usage guidelines You can update the properties of a calendar using one of the following methods: * `FROM_INPUT_PARAMS` to update the calendar properties with the values defined in the API request. * `FROM_EXISTING_TABLE` Creates a calendar from the parameters defined in the API request. To update a custom calendar, specify the calendar ID as a path parameter in the request URL and the following parameters in the request body: * Connection ID and Table name * Database and schema name attributes: For most Cloud Data Warehouse (CDW) connectors, both `database_name` and `schema_name` attributes are required. However, the attribute requirements are conditional and vary based on the connector type and its metadata structure. For example, for connectors such as Teradata, MySQL, SingleSore, Amazon Aurora MySQL, Amazon RDS MySQL, Oracle, and GCP_MYSQL, the `schema_name` is required, whereas the `database_name` attribute is not. Similarly, connectors such as ClickHouse require you to specify the `database_name` and the schema specification in such cases is optional. The API allows you to modify the calendar type, month offset value, start and end date, starting day of the week, and prefixes assigned to the year and quarter labels. #### Examples Update a custom calendar using an existing Table in ThoughtSpot: ``` { \"update_method\": \"FROM_EXISTING_TABLE\", \"table_reference\": { \"connection_identifier\": \"Connection1\", \"database_name\": \"db1\", \"table_name\": \"custom_calendar_2025\", \"schame_name\": \"schemaVar\" } } ``` Update a custom calendar with the attributes defined in the API request: ``` { \"update_method\": \"FROM_INPUT_PARAMS\", \"table_reference\": { \"connection_identifier\": \"Connection1\", \"database_name\": \"db1\", \"table_name\": \"custom_calendar_2025\", \"schame_name\": \"schemaVar\" }, \"month_offset\": \"August\", \"start_day_of_week\": \"Monday\", \"start_date\": \"08/01/2025\", \"end_date\": \"07/31/2026\" } ``` + * @param calendarIdentifier Unique Id or name of the calendar. + * @param updateCalendarRequest + */ + updateCalendar(calendarIdentifier, updateCalendarRequest, _options) { + return __async(this, null, function* () { + var _a, _b, _c; + let _config = _options || this.configuration; + if (calendarIdentifier === null || calendarIdentifier === void 0) { + throw new RequiredError("CustomCalendarsApi", "updateCalendar", "calendarIdentifier"); + } + if (updateCalendarRequest === null || updateCalendarRequest === void 0) { + throw new RequiredError("CustomCalendarsApi", "updateCalendar", "updateCalendarRequest"); + } + const localVarPath = "/api/rest/2.0/calendars/{calendar_identifier}/update".replace("{calendar_identifier}", encodeURIComponent(String(calendarIdentifier))); + const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.25.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.25.0"); + const contentType = ObjectSerializer.getPreferredMediaType([ + "application/json" + ]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = ObjectSerializer.stringify( + ObjectSerializer.serialize(updateCalendarRequest, "UpdateCalendarRequest", ""), + contentType + ); + requestContext.setBody(serializedBody); + let authMethod; + authMethod = _config.authMethods["bearerAuth"]; + if (authMethod == null ? void 0 : authMethod.applySecurityAuthentication) { + yield authMethod == null ? void 0 : authMethod.applySecurityAuthentication(requestContext); + } + const defaultAuth = ((_a = _options == null ? void 0 : _options.authMethods) == null ? void 0 : _a.default) || ((_c = (_b = this.configuration) == null ? void 0 : _b.authMethods) == null ? void 0 : _c.default); + if (defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication) { + yield defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication(requestContext); + } + return requestContext; + }); + } +}; +var CustomCalendarsApiResponseProcessor = class { + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to createCalendar + * @throws ApiException if the response code was not in [200, 299] + */ + createCalendar(response) { + return __async(this, null, function* () { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("200", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "CalendarResponse", + "" + ); + return body; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Invalid request.", body, response.headers); + } + if (isCodeInRange("401", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unexpected error", body, response.headers); + } + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "CalendarResponse", + "" + ); + return body; + } + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", yield response.getBodyAsAny(), response.headers); + }); + } + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to deleteCalendar + * @throws ApiException if the response code was not in [200, 299] + */ + deleteCalendar(response) { + return __async(this, null, function* () { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("204", response.httpStatusCode)) { + return; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Invalid request.", body, response.headers); + } + if (isCodeInRange("401", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unexpected error", body, response.headers); + } + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "void", + "" + ); + return body; + } + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", yield response.getBodyAsAny(), response.headers); + }); + } + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to generateCSV + * @throws ApiException if the response code was not in [200, 299] + */ + generateCSV(response) { + return __async(this, null, function* () { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("200", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "any", + "" + ); + return body; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Invalid request.", body, response.headers); + } + if (isCodeInRange("401", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unexpected error", body, response.headers); + } + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "any", + "" + ); + return body; + } + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", yield response.getBodyAsAny(), response.headers); + }); + } + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to searchCalendars + * @throws ApiException if the response code was not in [200, 299] + */ + searchCalendars(response) { + return __async(this, null, function* () { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("200", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "Array", + "" + ); + return body; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Invalid request.", body, response.headers); + } + if (isCodeInRange("401", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unexpected error", body, response.headers); + } + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "Array", + "" + ); + return body; + } + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", yield response.getBodyAsAny(), response.headers); + }); + } + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to updateCalendar + * @throws ApiException if the response code was not in [200, 299] + */ + updateCalendar(response) { + return __async(this, null, function* () { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("204", response.httpStatusCode)) { + return; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Invalid request.", body, response.headers); + } + if (isCodeInRange("401", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unexpected error", body, response.headers); + } + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "void", + "" + ); + return body; + } + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", yield response.getBodyAsAny(), response.headers); + }); + } +}; + +// apis/DBTApi.ts +var DBTApiRequestFactory = class extends BaseAPIRequestFactory { + /** + * Version: 9.9.0.cl or later Creates a DBT connection object in ThoughtSpot. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege or `DATAMANAGEMENT` (**Can manage data**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the following Data control privileges may be required: - `CAN_MANAGE_CUSTOM_CALENDAR`(**Can manage custom calendars**) - `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) - `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` (**Can manage data models**) #### About create DBT connection DBT connection in ThoughtSpot is used by the user to define DBT credentials for cloud . The API needs embrace connection, embrace database name, DBT url, import type, DBT account identifier, DBT project identifier, DBT access token and environment details (or) embrace connection, embrace database name, import type, file_content to create a connection object. To know more about DBT, see ThoughtSpot Product Documentation. + * @param connectionName Name of the connection. + * @param databaseName Name of the Database. + * @param importType Mention type of Import + * @param accessToken Access token is mandatory when Import_Type is DBT_CLOUD. + * @param dbtUrl DBT URL is mandatory when Import_Type is DBT_CLOUD. + * @param accountId Account ID is mandatory when Import_Type is DBT_CLOUD + * @param projectId Project ID is mandatory when Import_Type is DBT_CLOUD + * @param dbtEnvId DBT Environment ID\\\" + * @param projectName Name of the project + * @param fileContent Upload DBT Manifest and Catalog artifact files as a ZIP file. This field is Mandatory when Import Type is \\\'ZIP_FILE\\\' + */ + dbtConnection(connectionName, databaseName, importType, accessToken, dbtUrl, accountId, projectId, dbtEnvId, projectName, fileContent, _options) { + return __async(this, null, function* () { + var _a, _b, _c; + let _config = _options || this.configuration; + if (connectionName === null || connectionName === void 0) { + throw new RequiredError("DBTApi", "dbtConnection", "connectionName"); + } + if (databaseName === null || databaseName === void 0) { + throw new RequiredError("DBTApi", "dbtConnection", "databaseName"); + } + const localVarPath = "/api/rest/2.0/dbt/dbt-connection"; + const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.25.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.25.0"); + const useForm = canConsumeForm([ + "multipart/form-data" + ]); + let localVarFormParams; + if (useForm) { + localVarFormParams = new FormData(); + } else { + localVarFormParams = new URLSearchParams(); + } + if (connectionName !== void 0) { + localVarFormParams.append("connection_name", connectionName); + } + if (databaseName !== void 0) { + localVarFormParams.append("database_name", databaseName); + } + if (importType !== void 0) { + localVarFormParams.append("import_type", importType); + } + if (accessToken !== void 0) { + localVarFormParams.append("access_token", accessToken); + } + if (dbtUrl !== void 0) { + localVarFormParams.append("dbt_url", dbtUrl); + } + if (accountId !== void 0) { + localVarFormParams.append("account_id", accountId); + } + if (projectId !== void 0) { + localVarFormParams.append("project_id", projectId); + } + if (dbtEnvId !== void 0) { + localVarFormParams.append("dbt_env_id", dbtEnvId); + } + if (projectName !== void 0) { + localVarFormParams.append("project_name", projectName); + } + if (fileContent !== void 0) { + if (localVarFormParams instanceof FormData) { + localVarFormParams.append("file_content", fileContent, fileContent.name); + } + } + requestContext.setBody(localVarFormParams); + if (!useForm) { + const contentType = ObjectSerializer.getPreferredMediaType([ + "multipart/form-data" + ]); + requestContext.setHeaderParam("Content-Type", contentType); + } + let authMethod; + authMethod = _config.authMethods["bearerAuth"]; + if (authMethod == null ? void 0 : authMethod.applySecurityAuthentication) { + yield authMethod == null ? void 0 : authMethod.applySecurityAuthentication(requestContext); + } + const defaultAuth = ((_a = _options == null ? void 0 : _options.authMethods) == null ? void 0 : _a.default) || ((_c = (_b = this.configuration) == null ? void 0 : _b.authMethods) == null ? void 0 : _c.default); + if (defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication) { + yield defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication(requestContext); + } + return requestContext; + }); + } + /** + * Version: 9.9.0.cl or later Resynchronize the existing list of models, tables, worksheet tml’s and import them to Thoughtspot based on the DBT connection object. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege or `DATAMANAGEMENT` (**Can manage data**) privilege, along with an existing DBT connection. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the following data control privileges may be required: - `CAN_MANAGE_CUSTOM_CALENDAR`(**Can manage custom calendars**) - `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) - `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` (**Can manage data models**) + * @param dbtConnectionIdentifier Unique ID of the DBT connection. + * @param fileContent Upload DBT Manifest and Catalog artifact files as a ZIP file. This field is mandatory if the connection was created with import_type ‘ZIP_FILE’ + */ + dbtGenerateSyncTml(dbtConnectionIdentifier, fileContent, _options) { + return __async(this, null, function* () { + var _a, _b, _c; + let _config = _options || this.configuration; + if (dbtConnectionIdentifier === null || dbtConnectionIdentifier === void 0) { + throw new RequiredError("DBTApi", "dbtGenerateSyncTml", "dbtConnectionIdentifier"); + } + const localVarPath = "/api/rest/2.0/dbt/generate-sync-tml"; + const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.25.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.25.0"); + const useForm = canConsumeForm([ + "multipart/form-data" + ]); + let localVarFormParams; + if (useForm) { + localVarFormParams = new FormData(); + } else { + localVarFormParams = new URLSearchParams(); + } + if (dbtConnectionIdentifier !== void 0) { + localVarFormParams.append("dbt_connection_identifier", dbtConnectionIdentifier); + } + if (fileContent !== void 0) { + if (localVarFormParams instanceof FormData) { + localVarFormParams.append("file_content", fileContent, fileContent.name); + } + } + requestContext.setBody(localVarFormParams); + if (!useForm) { + const contentType = ObjectSerializer.getPreferredMediaType([ + "multipart/form-data" + ]); + requestContext.setHeaderParam("Content-Type", contentType); + } + let authMethod; + authMethod = _config.authMethods["bearerAuth"]; + if (authMethod == null ? void 0 : authMethod.applySecurityAuthentication) { + yield authMethod == null ? void 0 : authMethod.applySecurityAuthentication(requestContext); + } + const defaultAuth = ((_a = _options == null ? void 0 : _options.authMethods) == null ? void 0 : _a.default) || ((_c = (_b = this.configuration) == null ? void 0 : _b.authMethods) == null ? void 0 : _c.default); + if (defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication) { + yield defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication(requestContext); + } + return requestContext; + }); + } + /** + * Version: 9.9.0.cl or later Generate required table and worksheet and import them. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege or `DATAMANAGEMENT` (**Can manage data**) privilege, along with an existing DBT connection. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the following data control privileges may be required: - `CAN_MANAGE_CUSTOM_CALENDAR`(**Can manage custom calendars**) - `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) - `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` (**Can manage data models**) #### About generate TML Models and Worksheets to be imported can be selected by the user as part of the API. + * @param dbtConnectionIdentifier Unique ID of the DBT connection. + * @param modelTables List of Models and their respective Tables Example: \\\'[{\\\"model_name\\\": \\\"model_name\\\", \\\"tables\\\": [\\\"table_name\\\"]}]\\\' + * @param importWorksheets Mention the worksheet tmls to import + * @param worksheets List of worksheets is mandatory when import_Worksheets is type SELECTED Example: [\\\"worksheet_name\\\"] + * @param fileContent Upload DBT Manifest and Catalog artifact files as a ZIP file. This field is mandatory if the connection was created with import_type ‘ZIP_FILE’ + */ + dbtGenerateTml(dbtConnectionIdentifier, modelTables, importWorksheets, worksheets, fileContent, _options) { + return __async(this, null, function* () { + var _a, _b, _c; + let _config = _options || this.configuration; + if (dbtConnectionIdentifier === null || dbtConnectionIdentifier === void 0) { + throw new RequiredError("DBTApi", "dbtGenerateTml", "dbtConnectionIdentifier"); + } + if (modelTables === null || modelTables === void 0) { + throw new RequiredError("DBTApi", "dbtGenerateTml", "modelTables"); + } + if (importWorksheets === null || importWorksheets === void 0) { + throw new RequiredError("DBTApi", "dbtGenerateTml", "importWorksheets"); + } + const localVarPath = "/api/rest/2.0/dbt/generate-tml"; + const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.25.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.25.0"); + const useForm = canConsumeForm([ + "multipart/form-data" + ]); + let localVarFormParams; + if (useForm) { + localVarFormParams = new FormData(); + } else { + localVarFormParams = new URLSearchParams(); + } + if (dbtConnectionIdentifier !== void 0) { + localVarFormParams.append("dbt_connection_identifier", dbtConnectionIdentifier); + } + if (modelTables !== void 0) { + localVarFormParams.append("model_tables", modelTables); + } + if (importWorksheets !== void 0) { + localVarFormParams.append("import_worksheets", importWorksheets); + } + if (worksheets !== void 0) { + localVarFormParams.append("worksheets", worksheets); + } + if (fileContent !== void 0) { + if (localVarFormParams instanceof FormData) { + localVarFormParams.append("file_content", fileContent, fileContent.name); + } + } + requestContext.setBody(localVarFormParams); + if (!useForm) { + const contentType = ObjectSerializer.getPreferredMediaType([ + "multipart/form-data" + ]); + requestContext.setHeaderParam("Content-Type", contentType); + } + let authMethod; + authMethod = _config.authMethods["bearerAuth"]; + if (authMethod == null ? void 0 : authMethod.applySecurityAuthentication) { + yield authMethod == null ? void 0 : authMethod.applySecurityAuthentication(requestContext); + } + const defaultAuth = ((_a = _options == null ? void 0 : _options.authMethods) == null ? void 0 : _a.default) || ((_c = (_b = this.configuration) == null ? void 0 : _b.authMethods) == null ? void 0 : _c.default); + if (defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication) { + yield defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication(requestContext); + } + return requestContext; + }); + } + /** + * Version: 9.9.0.cl or later Gets a list of DBT connection objects by user and organization, available on the ThoughtSpot system. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege or `DATAMANAGEMENT` (**Can manage data**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the following Data control privileges may be required: - `CAN_MANAGE_CUSTOM_CALENDAR`(**Can manage custom calendars**) - `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) - `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` (**Can manage data models**) #### About search DBT connection To get details of a specific DBT connection identifier, database connection identifier, database connection name, database name, project name, project identifier, environment identifier , import type and author. + */ + dbtSearch(_options) { + return __async(this, null, function* () { + var _a, _b, _c; + let _config = _options || this.configuration; + const localVarPath = "/api/rest/2.0/dbt/search"; + const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.25.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.25.0"); + let authMethod; + authMethod = _config.authMethods["bearerAuth"]; + if (authMethod == null ? void 0 : authMethod.applySecurityAuthentication) { + yield authMethod == null ? void 0 : authMethod.applySecurityAuthentication(requestContext); + } + const defaultAuth = ((_a = _options == null ? void 0 : _options.authMethods) == null ? void 0 : _a.default) || ((_c = (_b = this.configuration) == null ? void 0 : _b.authMethods) == null ? void 0 : _c.default); + if (defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication) { + yield defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication(requestContext); + } + return requestContext; + }); + } + /** + * Version: 9.9.0.cl or later Removes the specified DBT connection object from the ThoughtSpot system. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) or `DATAMANAGEMENT` (**Can manage data ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the following Data control privileges may be required: - `CAN_MANAGE_CUSTOM_CALENDAR`(**Can manage custom calendars**) - `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) - `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` (**Can manage data models**) + * @param dbtConnectionIdentifier Unique ID of the DBT Connection. + */ + deleteDbtConnection(dbtConnectionIdentifier, _options) { + return __async(this, null, function* () { + var _a, _b, _c; + let _config = _options || this.configuration; + if (dbtConnectionIdentifier === null || dbtConnectionIdentifier === void 0) { + throw new RequiredError("DBTApi", "deleteDbtConnection", "dbtConnectionIdentifier"); + } + const localVarPath = "/api/rest/2.0/dbt/{dbt_connection_identifier}/delete".replace("{dbt_connection_identifier}", encodeURIComponent(String(dbtConnectionIdentifier))); + const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.25.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.25.0"); + let authMethod; + authMethod = _config.authMethods["bearerAuth"]; + if (authMethod == null ? void 0 : authMethod.applySecurityAuthentication) { + yield authMethod == null ? void 0 : authMethod.applySecurityAuthentication(requestContext); + } + const defaultAuth = ((_a = _options == null ? void 0 : _options.authMethods) == null ? void 0 : _a.default) || ((_c = (_b = this.configuration) == null ? void 0 : _b.authMethods) == null ? void 0 : _c.default); + if (defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication) { + yield defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication(requestContext); + } + return requestContext; + }); + } + /** + * Version: 9.9.0.cl or later Updates a DBT connection object. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege or `DATAMANAGEMENT` (**Can manage data ThoughtSpot**) privilege, along with an existing DBT connection. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the following data control privileges may be required: - `CAN_MANAGE_CUSTOM_CALENDAR`(**Can manage custom calendars**) - `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) - `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` (**Can manage data models**) #### About update DBT connection You can modify DBT connection object properties such as embrace connection name, embrace database name, import type, account identifier, access token, project identifier and environment (or) embrace connection, embrace database name, import type, file_content settings. + * @param dbtConnectionIdentifier Unique ID of the DBT Connection. + * @param connectionName Name of the connection. + * @param databaseName Name of the Database. + * @param importType Mention type of Import + * @param accessToken Access token is mandatory when Import_Type is DBT_CLOUD. + * @param dbtUrl DBT URL is mandatory when Import_Type is DBT_CLOUD. + * @param accountId Account ID is mandatory when Import_Type is DBT_CLOUD + * @param projectId Project ID is mandatory when Import_Type is DBT_CLOUD + * @param dbtEnvId DBT Environment ID\\\" + * @param projectName Name of the project + * @param fileContent Upload DBT Manifest and Catalog artifact files as a ZIP file. This field is Mandatory when Import Type is \\\'ZIP_FILE\\\' + */ + updateDbtConnection(dbtConnectionIdentifier, connectionName, databaseName, importType, accessToken, dbtUrl, accountId, projectId, dbtEnvId, projectName, fileContent, _options) { + return __async(this, null, function* () { + var _a, _b, _c; + let _config = _options || this.configuration; + if (dbtConnectionIdentifier === null || dbtConnectionIdentifier === void 0) { + throw new RequiredError("DBTApi", "updateDbtConnection", "dbtConnectionIdentifier"); + } + const localVarPath = "/api/rest/2.0/dbt/update-dbt-connection"; + const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.25.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.25.0"); + const useForm = canConsumeForm([ + "multipart/form-data" + ]); + let localVarFormParams; + if (useForm) { + localVarFormParams = new FormData(); + } else { + localVarFormParams = new URLSearchParams(); + } + if (dbtConnectionIdentifier !== void 0) { + localVarFormParams.append("dbt_connection_identifier", dbtConnectionIdentifier); + } + if (connectionName !== void 0) { + localVarFormParams.append("connection_name", connectionName); + } + if (databaseName !== void 0) { + localVarFormParams.append("database_name", databaseName); + } + if (importType !== void 0) { + localVarFormParams.append("import_type", importType); + } + if (accessToken !== void 0) { + localVarFormParams.append("access_token", accessToken); + } + if (dbtUrl !== void 0) { + localVarFormParams.append("dbt_url", dbtUrl); + } + if (accountId !== void 0) { + localVarFormParams.append("account_id", accountId); + } + if (projectId !== void 0) { + localVarFormParams.append("project_id", projectId); + } + if (dbtEnvId !== void 0) { + localVarFormParams.append("dbt_env_id", dbtEnvId); + } + if (projectName !== void 0) { + localVarFormParams.append("project_name", projectName); + } + if (fileContent !== void 0) { + if (localVarFormParams instanceof FormData) { + localVarFormParams.append("file_content", fileContent, fileContent.name); + } + } + requestContext.setBody(localVarFormParams); + if (!useForm) { + const contentType = ObjectSerializer.getPreferredMediaType([ + "multipart/form-data" + ]); + requestContext.setHeaderParam("Content-Type", contentType); + } + let authMethod; + authMethod = _config.authMethods["bearerAuth"]; + if (authMethod == null ? void 0 : authMethod.applySecurityAuthentication) { + yield authMethod == null ? void 0 : authMethod.applySecurityAuthentication(requestContext); + } + const defaultAuth = ((_a = _options == null ? void 0 : _options.authMethods) == null ? void 0 : _a.default) || ((_c = (_b = this.configuration) == null ? void 0 : _b.authMethods) == null ? void 0 : _c.default); + if (defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication) { + yield defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication(requestContext); + } + return requestContext; + }); + } +}; +var DBTApiResponseProcessor = class { + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to dbtConnection + * @throws ApiException if the response code was not in [200, 299] + */ + dbtConnection(response) { + return __async(this, null, function* () { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("200", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "any", + "" + ); + return body; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Invalid request.", body, response.headers); + } + if (isCodeInRange("401", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unexpected error", body, response.headers); + } + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "any", + "" + ); + return body; + } + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", yield response.getBodyAsAny(), response.headers); + }); + } + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to dbtGenerateSyncTml + * @throws ApiException if the response code was not in [200, 299] + */ + dbtGenerateSyncTml(response) { + return __async(this, null, function* () { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("200", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "any", + "" + ); + return body; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Invalid request.", body, response.headers); + } + if (isCodeInRange("401", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unexpected error", body, response.headers); + } + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "any", + "" + ); + return body; + } + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", yield response.getBodyAsAny(), response.headers); + }); + } + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to dbtGenerateTml + * @throws ApiException if the response code was not in [200, 299] + */ + dbtGenerateTml(response) { + return __async(this, null, function* () { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("200", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "any", + "" + ); + return body; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Invalid request.", body, response.headers); + } + if (isCodeInRange("401", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unexpected error", body, response.headers); + } + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "any", + "" + ); + return body; + } + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", yield response.getBodyAsAny(), response.headers); + }); + } + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to dbtSearch + * @throws ApiException if the response code was not in [200, 299] + */ + dbtSearch(response) { + return __async(this, null, function* () { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("200", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "Array", + "" + ); + return body; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Invalid request.", body, response.headers); + } + if (isCodeInRange("401", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unexpected error", body, response.headers); + } + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "Array", + "" + ); + return body; + } + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", yield response.getBodyAsAny(), response.headers); + }); + } + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to deleteDbtConnection + * @throws ApiException if the response code was not in [200, 299] + */ + deleteDbtConnection(response) { + return __async(this, null, function* () { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("204", response.httpStatusCode)) { + return; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Invalid request.", body, response.headers); + } + if (isCodeInRange("401", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unexpected error", body, response.headers); + } + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "void", + "" + ); + return body; + } + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", yield response.getBodyAsAny(), response.headers); + }); + } + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to updateDbtConnection + * @throws ApiException if the response code was not in [200, 299] + */ + updateDbtConnection(response) { + return __async(this, null, function* () { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("200", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "any", + "" + ); + return body; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Invalid request.", body, response.headers); + } + if (isCodeInRange("401", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unexpected error", body, response.headers); + } + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "any", + "" + ); + return body; + } + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", yield response.getBodyAsAny(), response.headers); + }); + } +}; + +// apis/DataApi.ts +var DataApiRequestFactory = class extends BaseAPIRequestFactory { + /** + * Version: 9.0.0.cl or later Fetches data from a saved Answer. Requires at least view access to the saved Answer. The `record_size` attribute determines the number of records to retrieve in an API call. For more information about pagination, record size, and maximum row limit, see [Pagination and record size settings](https://developers.thoughtspot.com/docs/fetch-data-and-report-apis#_pagination_settings_for_data_and_report_apis). + * @param fetchAnswerDataRequest + */ + fetchAnswerData(fetchAnswerDataRequest, _options) { + return __async(this, null, function* () { + var _a, _b, _c; + let _config = _options || this.configuration; + if (fetchAnswerDataRequest === null || fetchAnswerDataRequest === void 0) { + throw new RequiredError("DataApi", "fetchAnswerData", "fetchAnswerDataRequest"); + } + const localVarPath = "/api/rest/2.0/metadata/answer/data"; + const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.25.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.25.0"); + const contentType = ObjectSerializer.getPreferredMediaType([ + "application/json" + ]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = ObjectSerializer.stringify( + ObjectSerializer.serialize(fetchAnswerDataRequest, "FetchAnswerDataRequest", ""), + contentType + ); + requestContext.setBody(serializedBody); + let authMethod; + authMethod = _config.authMethods["bearerAuth"]; + if (authMethod == null ? void 0 : authMethod.applySecurityAuthentication) { + yield authMethod == null ? void 0 : authMethod.applySecurityAuthentication(requestContext); + } + const defaultAuth = ((_a = _options == null ? void 0 : _options.authMethods) == null ? void 0 : _a.default) || ((_c = (_b = this.configuration) == null ? void 0 : _b.authMethods) == null ? void 0 : _c.default); + if (defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication) { + yield defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication(requestContext); + } + return requestContext; + }); + } + /** + * Version: 9.0.0.cl or later Gets data from a Liveboard object and its visualization. Requires at least view access to the Liveboard. #### Usage guidelines In the request body, specify the GUID or name of the Liveboard. To get data for specific visualizations, add the GUIDs or names of the visualizations in the API request. To include unsaved changes in the report, pass the `transient_pinboard_content` script generated from the `getExportRequestForCurrentPinboard` method in the Visual Embed SDK. Upon successful execution, the API returns the report with unsaved changes. If the new Liveboard experience mode, the transient content includes ad hoc changes to visualizations such as sorting, toggling of legends, and data drill down. For more information, and see [Liveboard data API](https://developers.thoughtspot.com/docs/fetch-data-and-report-apis#_fetch_liveboard_data_api). + * @param fetchLiveboardDataRequest + */ + fetchLiveboardData(fetchLiveboardDataRequest, _options) { + return __async(this, null, function* () { + var _a, _b, _c; + let _config = _options || this.configuration; + if (fetchLiveboardDataRequest === null || fetchLiveboardDataRequest === void 0) { + throw new RequiredError("DataApi", "fetchLiveboardData", "fetchLiveboardDataRequest"); + } + const localVarPath = "/api/rest/2.0/metadata/liveboard/data"; + const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.25.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.25.0"); + const contentType = ObjectSerializer.getPreferredMediaType([ + "application/json" + ]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = ObjectSerializer.stringify( + ObjectSerializer.serialize(fetchLiveboardDataRequest, "FetchLiveboardDataRequest", ""), + contentType + ); + requestContext.setBody(serializedBody); + let authMethod; + authMethod = _config.authMethods["bearerAuth"]; + if (authMethod == null ? void 0 : authMethod.applySecurityAuthentication) { + yield authMethod == null ? void 0 : authMethod.applySecurityAuthentication(requestContext); + } + const defaultAuth = ((_a = _options == null ? void 0 : _options.authMethods) == null ? void 0 : _a.default) || ((_c = (_b = this.configuration) == null ? void 0 : _b.authMethods) == null ? void 0 : _c.default); + if (defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication) { + yield defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication(requestContext); + } + return requestContext; + }); + } + /** + * Version: 9.0.0.cl or later Generates an Answer from a given data source. Requires at least view access to the data source object (Worksheet or View). #### Usage guidelines To search data, specify the data source GUID in `logical_table_identifier`. The data source can be a Worksheet, View, Table, or SQL view. Pass search tokens in the `query_string` attribute in the API request as shown in the following example: ``` { \"query_string\": \"[sales] by [store]\", \"logical_table_identifier\": \"cd252e5c-b552-49a8-821d-3eadaa049cca\", } ``` For more information about the `query_string` format and data source attribute, see [Search data API](https://developers.thoughtspot.com/docs/fetch-data-and-report-apis#_search_data_api). The `record_size` attribute determines the number of records to retrieve in an API call. For more information about pagination, record size, and maximum row limit, see [Pagination and record size settings](https://developers.thoughtspot.com/docs/fetch-data-and-report-apis#_pagination_settings_for_data_and_report_api). + * @param searchDataRequest + */ + searchData(searchDataRequest, _options) { + return __async(this, null, function* () { + var _a, _b, _c; + let _config = _options || this.configuration; + if (searchDataRequest === null || searchDataRequest === void 0) { + throw new RequiredError("DataApi", "searchData", "searchDataRequest"); + } + const localVarPath = "/api/rest/2.0/searchdata"; + const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.25.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.25.0"); + const contentType = ObjectSerializer.getPreferredMediaType([ + "application/json" + ]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = ObjectSerializer.stringify( + ObjectSerializer.serialize(searchDataRequest, "SearchDataRequest", ""), + contentType + ); + requestContext.setBody(serializedBody); + let authMethod; + authMethod = _config.authMethods["bearerAuth"]; + if (authMethod == null ? void 0 : authMethod.applySecurityAuthentication) { + yield authMethod == null ? void 0 : authMethod.applySecurityAuthentication(requestContext); + } + const defaultAuth = ((_a = _options == null ? void 0 : _options.authMethods) == null ? void 0 : _a.default) || ((_c = (_b = this.configuration) == null ? void 0 : _b.authMethods) == null ? void 0 : _c.default); + if (defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication) { + yield defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication(requestContext); + } + return requestContext; + }); + } +}; +var DataApiResponseProcessor = class { + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to fetchAnswerData + * @throws ApiException if the response code was not in [200, 299] + */ + fetchAnswerData(response) { + return __async(this, null, function* () { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("200", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "AnswerDataResponse", + "" + ); + return body; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Invalid request.", body, response.headers); + } + if (isCodeInRange("401", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unexpected error", body, response.headers); + } + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "AnswerDataResponse", + "" + ); + return body; + } + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", yield response.getBodyAsAny(), response.headers); + }); + } + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to fetchLiveboardData + * @throws ApiException if the response code was not in [200, 299] + */ + fetchLiveboardData(response) { + return __async(this, null, function* () { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("200", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "LiveboardDataResponse", + "" + ); + return body; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Invalid request.", body, response.headers); + } + if (isCodeInRange("401", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unexpected error", body, response.headers); + } + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "LiveboardDataResponse", + "" + ); + return body; + } + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", yield response.getBodyAsAny(), response.headers); + }); + } + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to searchData + * @throws ApiException if the response code was not in [200, 299] + */ + searchData(response) { + return __async(this, null, function* () { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("200", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "SearchDataResponse", + "" + ); + return body; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Invalid request.", body, response.headers); + } + if (isCodeInRange("401", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unexpected error", body, response.headers); + } + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "SearchDataResponse", + "" + ); + return body; + } + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", yield response.getBodyAsAny(), response.headers); + }); + } +}; + +// apis/EmailCustomizationApi.ts +var EmailCustomizationApiRequestFactory = class extends BaseAPIRequestFactory { + /** + * Version: 10.10.0.cl or later Creates a customization configuration for the notification email. #### Pre-requisites Requires `DEVELOPER` (**has developer privilege**) or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `DEVELOPER` (**Has developer privilege**) privilege is required. **NOTE**:This endpoint in currently in beta. Contact ThoughtSpot support to enable this on your instance. #### Usage guidelines To create a custom configuration pass these parameters in your API request: - A JSON map of configuration attributes `template_properties`. The following example shows a sample set of customization configuration: ``` { { \"cta_button_bg_color\": \"#444DEA\", \"cta_text_font_color\": \"#FFFFFF\", \"primary_bg_color\": \"#D3DEF0\", \"logo_url\": \"https://storage.pardot.com/710713/1642089901EbkRibJq/TS_fullworkmark_darkmode.png\", \"font_family\": \"\", \"product_name\": \"ThoughtSpot\", \"footer_address\": \"444 Castro St, Suite 1000 Mountain View, CA 94041\", \"footer_phone\": \"(800) 508-7008\", \"replacement_value_for_liveboard\": \"Dashboard\", \"replacement_value_for_answer\": \"Chart\", \"replacement_value_for_spot_iq\": \"AI Insights\", \"hide_footer_phone\": false, \"hide_footer_address\": false, \"hide_product_name\": false, \"hide_manage_notification\": false, \"hide_mobile_app_nudge\": false, \"hide_privacy_policy\": false, \"hide_ts_vocabulary_definitions\": false, \"hide_error_message\": false, \"hide_unsubscribe_link\": false, \"hide_notification_status\": false, \"hide_modify_alert\": false, \"company_website_url\": \"https://your-website.com/\", \"company_privacy_policy_url\" : \"https://link-to-privacy-policy.com/\", \"contact_support_url\": \"https://link-to-contact-support.com/\", \"hide_contact_support_url\": false, \"hide_logo_url\" : false } } ``` + * @param createEmailCustomizationRequest + */ + createEmailCustomization(createEmailCustomizationRequest, _options) { + return __async(this, null, function* () { + var _a, _b, _c; + let _config = _options || this.configuration; + if (createEmailCustomizationRequest === null || createEmailCustomizationRequest === void 0) { + throw new RequiredError("EmailCustomizationApi", "createEmailCustomization", "createEmailCustomizationRequest"); + } + const localVarPath = "/api/rest/2.0/customization/email"; + const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.25.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.25.0"); + const contentType = ObjectSerializer.getPreferredMediaType([ + "application/json" + ]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = ObjectSerializer.stringify( + ObjectSerializer.serialize(createEmailCustomizationRequest, "CreateEmailCustomizationRequest", ""), + contentType + ); + requestContext.setBody(serializedBody); + let authMethod; + authMethod = _config.authMethods["bearerAuth"]; + if (authMethod == null ? void 0 : authMethod.applySecurityAuthentication) { + yield authMethod == null ? void 0 : authMethod.applySecurityAuthentication(requestContext); + } + const defaultAuth = ((_a = _options == null ? void 0 : _options.authMethods) == null ? void 0 : _a.default) || ((_c = (_b = this.configuration) == null ? void 0 : _b.authMethods) == null ? void 0 : _c.default); + if (defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication) { + yield defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication(requestContext); + } + return requestContext; + }); + } + /** + * Version: 10.10.0.cl or later Deletes the configuration for the email customization. #### Pre-requisites Requires `DEVELOPER` (**has developer privilege**) or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `DEVELOPER` (**Has developer privilege**) privilege is required. **NOTE**:This endpoint in currently in beta. Contact ThoughtSpot support to enable this on your instance. #### Usage guidelines - Call the search API endpoint to get the `template_identifier` from the response. - Use that `template_identifier` as a parameter in this API request. + * @param templateIdentifier Unique ID or name of the email customization. + */ + deleteEmailCustomization(templateIdentifier, _options) { + return __async(this, null, function* () { + var _a, _b, _c; + let _config = _options || this.configuration; + if (templateIdentifier === null || templateIdentifier === void 0) { + throw new RequiredError("EmailCustomizationApi", "deleteEmailCustomization", "templateIdentifier"); + } + const localVarPath = "/api/rest/2.0/customization/email/{template_identifier}/delete".replace("{template_identifier}", encodeURIComponent(String(templateIdentifier))); + const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.25.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.25.0"); + let authMethod; + authMethod = _config.authMethods["bearerAuth"]; + if (authMethod == null ? void 0 : authMethod.applySecurityAuthentication) { + yield authMethod == null ? void 0 : authMethod.applySecurityAuthentication(requestContext); + } + const defaultAuth = ((_a = _options == null ? void 0 : _options.authMethods) == null ? void 0 : _a.default) || ((_c = (_b = this.configuration) == null ? void 0 : _b.authMethods) == null ? void 0 : _c.default); + if (defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication) { + yield defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication(requestContext); + } + return requestContext; + }); + } + /** + * Version: 10.12.0.cl or later Deletes the configuration for the email customization. #### Pre-requisites Requires `DEVELOPER` (**has developer privilege**) or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `DEVELOPER` (**Has developer privilege**) privilege is required. **NOTE**:This endpoint in currently in beta. Contact ThoughtSpot support to enable this on your instance. #### Usage guidelines - Call the search API endpoint to get the `org_identifier` from the response. - Use that `org_identifier` as a parameter in this API request. + * @param deleteOrgEmailCustomizationRequest + */ + deleteOrgEmailCustomization(deleteOrgEmailCustomizationRequest, _options) { + return __async(this, null, function* () { + var _a, _b, _c; + let _config = _options || this.configuration; + if (deleteOrgEmailCustomizationRequest === null || deleteOrgEmailCustomizationRequest === void 0) { + throw new RequiredError("EmailCustomizationApi", "deleteOrgEmailCustomization", "deleteOrgEmailCustomizationRequest"); + } + const localVarPath = "/api/rest/2.0/customization/email/delete"; + const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.25.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.25.0"); + const contentType = ObjectSerializer.getPreferredMediaType([ + "application/json" + ]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = ObjectSerializer.stringify( + ObjectSerializer.serialize(deleteOrgEmailCustomizationRequest, "DeleteOrgEmailCustomizationRequest", ""), + contentType + ); + requestContext.setBody(serializedBody); + let authMethod; + authMethod = _config.authMethods["bearerAuth"]; + if (authMethod == null ? void 0 : authMethod.applySecurityAuthentication) { + yield authMethod == null ? void 0 : authMethod.applySecurityAuthentication(requestContext); + } + const defaultAuth = ((_a = _options == null ? void 0 : _options.authMethods) == null ? void 0 : _a.default) || ((_c = (_b = this.configuration) == null ? void 0 : _b.authMethods) == null ? void 0 : _c.default); + if (defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication) { + yield defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication(requestContext); + } + return requestContext; + }); + } + /** + * Version: 10.10.0.cl or later Search the email customization configuration if any set for the ThoughtSpot system. #### Pre-requisites Requires `DEVELOPER` (**has developer privilege**) or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `DEVELOPER` (**Has developer privilege**) privilege is required. **NOTE**:This endpoint in currently in beta. Contact ThoughtSpot support to enable this on your instance. + * @param searchEmailCustomizationRequest + */ + searchEmailCustomization(searchEmailCustomizationRequest, _options) { + return __async(this, null, function* () { + var _a, _b, _c; + let _config = _options || this.configuration; + if (searchEmailCustomizationRequest === null || searchEmailCustomizationRequest === void 0) { + throw new RequiredError("EmailCustomizationApi", "searchEmailCustomization", "searchEmailCustomizationRequest"); + } + const localVarPath = "/api/rest/2.0/customization/email/search"; + const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.25.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.25.0"); + const contentType = ObjectSerializer.getPreferredMediaType([ + "application/json" + ]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = ObjectSerializer.stringify( + ObjectSerializer.serialize(searchEmailCustomizationRequest, "SearchEmailCustomizationRequest", ""), + contentType + ); + requestContext.setBody(serializedBody); + let authMethod; + authMethod = _config.authMethods["bearerAuth"]; + if (authMethod == null ? void 0 : authMethod.applySecurityAuthentication) { + yield authMethod == null ? void 0 : authMethod.applySecurityAuthentication(requestContext); + } + const defaultAuth = ((_a = _options == null ? void 0 : _options.authMethods) == null ? void 0 : _a.default) || ((_c = (_b = this.configuration) == null ? void 0 : _b.authMethods) == null ? void 0 : _c.default); + if (defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication) { + yield defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication(requestContext); + } + return requestContext; + }); + } + /** + * Version: 10.12.0.cl or later Updates a customization configuration for the notification email. #### Pre-requisites Requires `DEVELOPER` (**has developer privilege**) or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `DEVELOPER` (**Has developer privilege**) privilege is required. **NOTE**:This endpoint in currently in beta. Contact ThoughtSpot support to enable this on your instance. #### Usage guidelines To update a custom configuration pass these parameters in your API request: - A JSON map of configuration attributes `template_properties`. The following example shows a sample set of customization configuration: ``` { { \"cta_button_bg_color\": \"#444DEA\", \"cta_text_font_color\": \"#FFFFFF\", \"primary_bg_color\": \"#D3DEF0\", \"logo_url\": \"https://storage.pardot.com/710713/1642089901EbkRibJq/TS_fullworkmark_darkmode.png\", \"font_family\": \"\", \"product_name\": \"ThoughtSpot\", \"footer_address\": \"444 Castro St, Suite 1000 Mountain View, CA 94041\", \"footer_phone\": \"(800) 508-7008\", \"replacement_value_for_liveboard\": \"Dashboard\", \"replacement_value_for_answer\": \"Chart\", \"replacement_value_for_spot_iq\": \"AI Insights\", \"hide_footer_phone\": false, \"hide_footer_address\": false, \"hide_product_name\": false, \"hide_manage_notification\": false, \"hide_mobile_app_nudge\": false, \"hide_privacy_policy\": false, \"hide_ts_vocabulary_definitions\": false, \"hide_error_message\": false, \"hide_unsubscribe_link\": false, \"hide_notification_status\": false, \"hide_modify_alert\": false, \"company_website_url\": \"https://your-website.com/\", \"company_privacy_policy_url\" : \"https://link-to-privacy-policy.com/\", \"contact_support_url\": \"https://link-to-contact-support.com/\", \"hide_contact_support_url\": false, \"hide_logo_url\" : false } } ``` + * @param updateEmailCustomizationRequest + */ + updateEmailCustomization(updateEmailCustomizationRequest, _options) { + return __async(this, null, function* () { + var _a, _b, _c; + let _config = _options || this.configuration; + if (updateEmailCustomizationRequest === null || updateEmailCustomizationRequest === void 0) { + throw new RequiredError("EmailCustomizationApi", "updateEmailCustomization", "updateEmailCustomizationRequest"); + } + const localVarPath = "/api/rest/2.0/customization/email/update"; + const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.25.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.25.0"); + const contentType = ObjectSerializer.getPreferredMediaType([ + "application/json" + ]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = ObjectSerializer.stringify( + ObjectSerializer.serialize(updateEmailCustomizationRequest, "UpdateEmailCustomizationRequest", ""), + contentType + ); + requestContext.setBody(serializedBody); + let authMethod; + authMethod = _config.authMethods["bearerAuth"]; + if (authMethod == null ? void 0 : authMethod.applySecurityAuthentication) { + yield authMethod == null ? void 0 : authMethod.applySecurityAuthentication(requestContext); + } + const defaultAuth = ((_a = _options == null ? void 0 : _options.authMethods) == null ? void 0 : _a.default) || ((_c = (_b = this.configuration) == null ? void 0 : _b.authMethods) == null ? void 0 : _c.default); + if (defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication) { + yield defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication(requestContext); + } + return requestContext; + }); + } + /** + * Version: 10.10.0.cl or later Validates the email customization configuration if any set for the ThoughtSpot system. #### Pre-requisites Requires `DEVELOPER` (**has developer privilege**) or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `DEVELOPER` (**Has developer privilege**) privilege is required. **NOTE**:This endpoint in currently in beta. Contact ThoughtSpot support to enable this on your instance. + */ + validateEmailCustomization(_options) { + return __async(this, null, function* () { + var _a, _b, _c; + let _config = _options || this.configuration; + const localVarPath = "/api/rest/2.0/customization/email/validate"; + const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.25.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.25.0"); + let authMethod; + authMethod = _config.authMethods["bearerAuth"]; + if (authMethod == null ? void 0 : authMethod.applySecurityAuthentication) { + yield authMethod == null ? void 0 : authMethod.applySecurityAuthentication(requestContext); + } + const defaultAuth = ((_a = _options == null ? void 0 : _options.authMethods) == null ? void 0 : _a.default) || ((_c = (_b = this.configuration) == null ? void 0 : _b.authMethods) == null ? void 0 : _c.default); + if (defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication) { + yield defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication(requestContext); + } + return requestContext; + }); + } +}; +var EmailCustomizationApiResponseProcessor = class { + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to createEmailCustomization + * @throws ApiException if the response code was not in [200, 299] + */ + createEmailCustomization(response) { + return __async(this, null, function* () { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("200", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "CreateEmailCustomizationResponse", + "" + ); + return body; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Invalid request.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unexpected error", body, response.headers); + } + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "CreateEmailCustomizationResponse", + "" + ); + return body; + } + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", yield response.getBodyAsAny(), response.headers); + }); + } + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to deleteEmailCustomization + * @throws ApiException if the response code was not in [200, 299] + */ + deleteEmailCustomization(response) { + return __async(this, null, function* () { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("204", response.httpStatusCode)) { + return; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Invalid request.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unexpected error", body, response.headers); + } + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "void", + "" + ); + return body; + } + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", yield response.getBodyAsAny(), response.headers); + }); + } + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to deleteOrgEmailCustomization + * @throws ApiException if the response code was not in [200, 299] + */ + deleteOrgEmailCustomization(response) { + return __async(this, null, function* () { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("204", response.httpStatusCode)) { + return; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Invalid request.", body, response.headers); + } + if (isCodeInRange("401", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unexpected error", body, response.headers); + } + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "void", + "" + ); + return body; + } + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", yield response.getBodyAsAny(), response.headers); + }); + } + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to searchEmailCustomization + * @throws ApiException if the response code was not in [200, 299] + */ + searchEmailCustomization(response) { + return __async(this, null, function* () { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("200", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "Array", + "" + ); + return body; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Invalid request.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unexpected error", body, response.headers); + } + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "Array", + "" + ); + return body; + } + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", yield response.getBodyAsAny(), response.headers); + }); + } + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to updateEmailCustomization + * @throws ApiException if the response code was not in [200, 299] + */ + updateEmailCustomization(response) { + return __async(this, null, function* () { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("204", response.httpStatusCode)) { + return; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Invalid request.", body, response.headers); + } + if (isCodeInRange("401", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unexpected error", body, response.headers); + } + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "void", + "" + ); + return body; + } + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", yield response.getBodyAsAny(), response.headers); + }); + } + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to validateEmailCustomization + * @throws ApiException if the response code was not in [200, 299] + */ + validateEmailCustomization(response) { + return __async(this, null, function* () { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("204", response.httpStatusCode)) { + return; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Invalid request.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unexpected error", body, response.headers); + } + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "void", + "" + ); + return body; + } + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", yield response.getBodyAsAny(), response.headers); + }); + } +}; + +// apis/GroupsApi.ts +var GroupsApiRequestFactory = class extends BaseAPIRequestFactory { + /** + * Version: 9.0.0.cl or later Creates a group object in ThoughtSpot. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `GROUP_ADMINISTRATION` (**Can manage groups**) privilege is required. #### About groups Groups in ThoughtSpot are used by the administrators to define privileges and organize users based on their roles and access requirements. To know more about groups and privileges, see [ThoughtSpot Product Documentation](https://docs.thoughtspot.com/cloud/latest/groups-privileges). #### Supported operations The API endpoint lets you perform the following operations: * Assign privileges * Add users * Define sharing visibility * Add sub-groups * Assign a default Liveboard + * @param createUserGroupRequest + */ + createUserGroup(createUserGroupRequest, _options) { + return __async(this, null, function* () { + var _a, _b, _c; + let _config = _options || this.configuration; + if (createUserGroupRequest === null || createUserGroupRequest === void 0) { + throw new RequiredError("GroupsApi", "createUserGroup", "createUserGroupRequest"); + } + const localVarPath = "/api/rest/2.0/groups/create"; + const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.25.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.25.0"); + const contentType = ObjectSerializer.getPreferredMediaType([ + "application/json" + ]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = ObjectSerializer.stringify( + ObjectSerializer.serialize(createUserGroupRequest, "CreateUserGroupRequest", ""), + contentType + ); + requestContext.setBody(serializedBody); + let authMethod; + authMethod = _config.authMethods["bearerAuth"]; + if (authMethod == null ? void 0 : authMethod.applySecurityAuthentication) { + yield authMethod == null ? void 0 : authMethod.applySecurityAuthentication(requestContext); + } + const defaultAuth = ((_a = _options == null ? void 0 : _options.authMethods) == null ? void 0 : _a.default) || ((_c = (_b = this.configuration) == null ? void 0 : _b.authMethods) == null ? void 0 : _c.default); + if (defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication) { + yield defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication(requestContext); + } + return requestContext; + }); + } + /** + * Version: 9.0.0.cl or later Removes the specified group object from the ThoughtSpot system. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `GROUP_ADMINISTRATION` (**Can manage groups**) privilege is required. + * @param groupIdentifier GUID or name of the group. + */ + deleteUserGroup(groupIdentifier, _options) { + return __async(this, null, function* () { + var _a, _b, _c; + let _config = _options || this.configuration; + if (groupIdentifier === null || groupIdentifier === void 0) { + throw new RequiredError("GroupsApi", "deleteUserGroup", "groupIdentifier"); + } + const localVarPath = "/api/rest/2.0/groups/{group_identifier}/delete".replace("{group_identifier}", encodeURIComponent(String(groupIdentifier))); + const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.25.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.25.0"); + let authMethod; + authMethod = _config.authMethods["bearerAuth"]; + if (authMethod == null ? void 0 : authMethod.applySecurityAuthentication) { + yield authMethod == null ? void 0 : authMethod.applySecurityAuthentication(requestContext); + } + const defaultAuth = ((_a = _options == null ? void 0 : _options.authMethods) == null ? void 0 : _a.default) || ((_c = (_b = this.configuration) == null ? void 0 : _b.authMethods) == null ? void 0 : _c.default); + if (defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication) { + yield defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication(requestContext); + } + return requestContext; + }); + } + /** + * Version: 9.0.0.cl or later Imports group objects from external databases into ThoughtSpot. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `GROUP_ADMINISTRATION` (**Can manage groups**) privilege is required. During the import operation: * If the specified group is not available in ThoughtSpot, it will be added to ThoughtSpot. * If `delete_unspecified_groups` is set to `true`, the groups not specified in the API request, excluding administrator and system user groups, are deleted. * If the specified groups are already available in ThoughtSpot, the object properties of these groups are modified and synchronized as per the input data in the API request. A successful API call returns the object that represents the changes made in the ThoughtSpot system. + * @param importUserGroupsRequest + */ + importUserGroups(importUserGroupsRequest, _options) { + return __async(this, null, function* () { + var _a, _b, _c; + let _config = _options || this.configuration; + if (importUserGroupsRequest === null || importUserGroupsRequest === void 0) { + throw new RequiredError("GroupsApi", "importUserGroups", "importUserGroupsRequest"); + } + const localVarPath = "/api/rest/2.0/groups/import"; + const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.25.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.25.0"); + const contentType = ObjectSerializer.getPreferredMediaType([ + "application/json" + ]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = ObjectSerializer.stringify( + ObjectSerializer.serialize(importUserGroupsRequest, "ImportUserGroupsRequest", ""), + contentType + ); + requestContext.setBody(serializedBody); + let authMethod; + authMethod = _config.authMethods["bearerAuth"]; + if (authMethod == null ? void 0 : authMethod.applySecurityAuthentication) { + yield authMethod == null ? void 0 : authMethod.applySecurityAuthentication(requestContext); + } + const defaultAuth = ((_a = _options == null ? void 0 : _options.authMethods) == null ? void 0 : _a.default) || ((_c = (_b = this.configuration) == null ? void 0 : _b.authMethods) == null ? void 0 : _c.default); + if (defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication) { + yield defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication(requestContext); + } + return requestContext; + }); + } + /** + * Version: 9.0.0.cl or later Gets a list of user group objects from the ThoughtSpot system. To get details of a specific user group, specify the user group GUID or name. You can also filter the API response based on User ID, Org ID, Role ID, type of group, sharing visibility, privileges assigned to the group, and the Liveboard IDs assigned to the users in the group. Available to all users. Users with `ADMINISTRATION` (**Can administer ThoughtSpot**) privileges can view all users properties. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `GROUP_ADMINISTRATION` (**Can manage groups**) privilege is required. **NOTE**: If you do not get precise results, try setting `record_size` to `-1` and `record_offset` to `0`. + * @param searchUserGroupsRequest + */ + searchUserGroups(searchUserGroupsRequest, _options) { + return __async(this, null, function* () { + var _a, _b, _c; + let _config = _options || this.configuration; + if (searchUserGroupsRequest === null || searchUserGroupsRequest === void 0) { + throw new RequiredError("GroupsApi", "searchUserGroups", "searchUserGroupsRequest"); + } + const localVarPath = "/api/rest/2.0/groups/search"; + const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.25.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.25.0"); + const contentType = ObjectSerializer.getPreferredMediaType([ + "application/json" + ]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = ObjectSerializer.stringify( + ObjectSerializer.serialize(searchUserGroupsRequest, "SearchUserGroupsRequest", ""), + contentType + ); + requestContext.setBody(serializedBody); + let authMethod; + authMethod = _config.authMethods["bearerAuth"]; + if (authMethod == null ? void 0 : authMethod.applySecurityAuthentication) { + yield authMethod == null ? void 0 : authMethod.applySecurityAuthentication(requestContext); + } + const defaultAuth = ((_a = _options == null ? void 0 : _options.authMethods) == null ? void 0 : _a.default) || ((_c = (_b = this.configuration) == null ? void 0 : _b.authMethods) == null ? void 0 : _c.default); + if (defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication) { + yield defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication(requestContext); + } + return requestContext; + }); + } + /** + * Version: 9.0.0.cl or later Updates the properties of a group object in ThoughtSpot. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `GROUP_ADMINISTRATION` (**Can manage groups**) privilege is required. #### Supported operations This API endpoint lets you perform the following operations in a single API request: * Edit [privileges](https://developers.thoughtspot.com/docs/?pageid=api-user-management#group-privileges) * Add or remove users * Change sharing visibility settings * Add or remove sub-groups * Assign a default Liveboard or update the existing settings + * @param groupIdentifier GUID or name of the group. + * @param updateUserGroupRequest + */ + updateUserGroup(groupIdentifier, updateUserGroupRequest, _options) { + return __async(this, null, function* () { + var _a, _b, _c; + let _config = _options || this.configuration; + if (groupIdentifier === null || groupIdentifier === void 0) { + throw new RequiredError("GroupsApi", "updateUserGroup", "groupIdentifier"); + } + if (updateUserGroupRequest === null || updateUserGroupRequest === void 0) { + throw new RequiredError("GroupsApi", "updateUserGroup", "updateUserGroupRequest"); + } + const localVarPath = "/api/rest/2.0/groups/{group_identifier}/update".replace("{group_identifier}", encodeURIComponent(String(groupIdentifier))); + const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.25.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.25.0"); + const contentType = ObjectSerializer.getPreferredMediaType([ + "application/json" + ]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = ObjectSerializer.stringify( + ObjectSerializer.serialize(updateUserGroupRequest, "UpdateUserGroupRequest", ""), + contentType + ); + requestContext.setBody(serializedBody); + let authMethod; + authMethod = _config.authMethods["bearerAuth"]; + if (authMethod == null ? void 0 : authMethod.applySecurityAuthentication) { + yield authMethod == null ? void 0 : authMethod.applySecurityAuthentication(requestContext); + } + const defaultAuth = ((_a = _options == null ? void 0 : _options.authMethods) == null ? void 0 : _a.default) || ((_c = (_b = this.configuration) == null ? void 0 : _b.authMethods) == null ? void 0 : _c.default); + if (defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication) { + yield defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication(requestContext); + } + return requestContext; + }); + } +}; +var GroupsApiResponseProcessor = class { + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to createUserGroup + * @throws ApiException if the response code was not in [200, 299] + */ + createUserGroup(response) { + return __async(this, null, function* () { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("200", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "UserGroupResponse", + "" + ); + return body; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Invalid request.", body, response.headers); + } + if (isCodeInRange("401", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unexpected error", body, response.headers); + } + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "UserGroupResponse", + "" + ); + return body; + } + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", yield response.getBodyAsAny(), response.headers); + }); + } + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to deleteUserGroup + * @throws ApiException if the response code was not in [200, 299] + */ + deleteUserGroup(response) { + return __async(this, null, function* () { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("204", response.httpStatusCode)) { + return; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Invalid request.", body, response.headers); + } + if (isCodeInRange("401", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unexpected error", body, response.headers); + } + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "void", + "" + ); + return body; + } + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", yield response.getBodyAsAny(), response.headers); + }); + } + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to importUserGroups + * @throws ApiException if the response code was not in [200, 299] + */ + importUserGroups(response) { + return __async(this, null, function* () { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("200", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ImportUserGroupsResponse", + "" + ); + return body; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Invalid request.", body, response.headers); + } + if (isCodeInRange("401", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unexpected error", body, response.headers); + } + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ImportUserGroupsResponse", + "" + ); + return body; + } + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", yield response.getBodyAsAny(), response.headers); + }); + } + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to searchUserGroups + * @throws ApiException if the response code was not in [200, 299] + */ + searchUserGroups(response) { + return __async(this, null, function* () { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("200", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "Array", + "" + ); + return body; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Invalid request.", body, response.headers); + } + if (isCodeInRange("401", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unexpected error", body, response.headers); + } + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "Array", + "" + ); + return body; + } + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", yield response.getBodyAsAny(), response.headers); + }); + } + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to updateUserGroup + * @throws ApiException if the response code was not in [200, 299] + */ + updateUserGroup(response) { + return __async(this, null, function* () { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("204", response.httpStatusCode)) { + return; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Invalid request.", body, response.headers); + } + if (isCodeInRange("401", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unexpected error", body, response.headers); + } + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "void", + "" + ); + return body; + } + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", yield response.getBodyAsAny(), response.headers); + }); + } +}; + +// apis/JobsApi.ts +var JobsApiRequestFactory = class extends BaseAPIRequestFactory { + /** + * Version: 26.4.0.cl or later Searches delivery history for communication channels such as webhooks. Returns channel-level delivery status for each job execution record. Use this to monitor channel health and delivery success rates across events. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) or `DEVELOPER` (**Has developer privilege**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, users with `CAN_MANAGE_WEBHOOKS` (**Can manage webhooks**) privilege are also authorized to perform this action. **NOTE**: When `channel_type` is `WEBHOOK`, the following constraints apply: - `job_ids`, `channel_identifiers`, and `events` each accept at most one element. - When `job_ids` is provided, it is used as the sole lookup key and other filter fields are ignored. - When `job_ids` is not provided, `channel_identifiers` and `events` are both required, each containing exactly one element. - Records older than the configured retention period are not returned. - Use `start_epoch_time_in_millis` and/or `end_epoch_time_in_millis` to narrow results to a specific time window. + * @param searchChannelHistoryRequest + */ + searchChannelHistory(searchChannelHistoryRequest, _options) { + return __async(this, null, function* () { + var _a, _b, _c; + let _config = _options || this.configuration; + if (searchChannelHistoryRequest === null || searchChannelHistoryRequest === void 0) { + throw new RequiredError("JobsApi", "searchChannelHistory", "searchChannelHistoryRequest"); + } + const localVarPath = "/api/rest/2.0/jobs/history/communication-channels/search"; + const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.25.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.25.0"); + const contentType = ObjectSerializer.getPreferredMediaType([ + "application/json" + ]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = ObjectSerializer.stringify( + ObjectSerializer.serialize(searchChannelHistoryRequest, "SearchChannelHistoryRequest", ""), + contentType + ); + requestContext.setBody(serializedBody); + let authMethod; + authMethod = _config.authMethods["bearerAuth"]; + if (authMethod == null ? void 0 : authMethod.applySecurityAuthentication) { + yield authMethod == null ? void 0 : authMethod.applySecurityAuthentication(requestContext); + } + const defaultAuth = ((_a = _options == null ? void 0 : _options.authMethods) == null ? void 0 : _a.default) || ((_c = (_b = this.configuration) == null ? void 0 : _b.authMethods) == null ? void 0 : _c.default); + if (defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication) { + yield defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication(requestContext); + } + return requestContext; + }); + } +}; +var JobsApiResponseProcessor = class { + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to searchChannelHistory + * @throws ApiException if the response code was not in [200, 299] + */ + searchChannelHistory(response) { + return __async(this, null, function* () { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("200", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "SearchChannelHistoryResponse", + "" + ); + return body; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Invalid request.", body, response.headers); + } + if (isCodeInRange("401", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unexpected error", body, response.headers); + } + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "SearchChannelHistoryResponse", + "" + ); + return body; + } + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", yield response.getBodyAsAny(), response.headers); + }); + } +}; + +// apis/LogApi.ts +var LogApiRequestFactory = class extends BaseAPIRequestFactory { + /** + * Version: 9.0.0.cl or later Fetches security audit logs. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the [Admin Control](https://developers.thoughtspot.com/docs/rbac#_admin_control) privileges are required. #### Usage guidelines By default, the API retrieves logs for the last 24 hours. You can set a custom duration in EPOCH time. Make sure the log duration specified in your API request doesn’t exceed 24 hours. If you must fetch logs for a longer time range, modify the duration and make multiple sequential API requests. Upon successful execution, the API returns logs with the following information: * timestamp of the event * event ID * event type * name and GUID of the user * IP address of ThoughtSpot instance For more information see [Audit logs Documentation](https://developers.thoughtspot.com/docs/audit-logs). + * @param fetchLogsRequest + */ + fetchLogs(fetchLogsRequest, _options) { + return __async(this, null, function* () { + var _a, _b, _c; + let _config = _options || this.configuration; + if (fetchLogsRequest === null || fetchLogsRequest === void 0) { + throw new RequiredError("LogApi", "fetchLogs", "fetchLogsRequest"); + } + const localVarPath = "/api/rest/2.0/logs/fetch"; + const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.25.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.25.0"); + const contentType = ObjectSerializer.getPreferredMediaType([ + "application/json" + ]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = ObjectSerializer.stringify( + ObjectSerializer.serialize(fetchLogsRequest, "FetchLogsRequest", ""), + contentType + ); + requestContext.setBody(serializedBody); + let authMethod; + authMethod = _config.authMethods["bearerAuth"]; + if (authMethod == null ? void 0 : authMethod.applySecurityAuthentication) { + yield authMethod == null ? void 0 : authMethod.applySecurityAuthentication(requestContext); + } + const defaultAuth = ((_a = _options == null ? void 0 : _options.authMethods) == null ? void 0 : _a.default) || ((_c = (_b = this.configuration) == null ? void 0 : _b.authMethods) == null ? void 0 : _c.default); + if (defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication) { + yield defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication(requestContext); + } + return requestContext; + }); + } +}; +var LogApiResponseProcessor = class { + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to fetchLogs + * @throws ApiException if the response code was not in [200, 299] + */ + fetchLogs(response) { + return __async(this, null, function* () { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("200", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "Array", + "" + ); + return body; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Invalid request.", body, response.headers); + } + if (isCodeInRange("401", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unexpected error", body, response.headers); + } + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "Array", + "" + ); + return body; + } + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", yield response.getBodyAsAny(), response.headers); + }); + } +}; + +// apis/MetadataApi.ts +var MetadataApiRequestFactory = class extends BaseAPIRequestFactory { + /** + * Convert worksheets to models Version: 10.6.0.cl or later ## Prerequisites - **Privileges Required:** - `DATAMANAGEMENT` (Can manage data) or `ADMINISTRATION` (Can administer ThoughtSpot). - **Additional Privileges (if RBAC is enabled):** - `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` (Can manage data models). --- ## Usage Guidelines ### Parameters 1. **worksheet_ids** - **Description:** A comma-separated list of GUIDs (Globally Unique Identifiers) specifying the Worksheets to be converted. - **Usage:** - Used only when `convert_all` is set to `false`. - Leave empty or omit when `convert_all` is set to `true`. 2. **exclude_worksheet_ids** - **Description:** A comma-separated list of GUIDs specifying Worksheets to be excluded from conversion. - **Usage:** - Useful when `convert_all` is set to `true` and specific Worksheets should not be converted. 3. **convert_all** - **Description:** Sets the scope of conversion. - **Options:** - `true`: Converts all Worksheets in the system, except those specified in `exclude_worksheet_ids`. - `false`: Converts only the Worksheets listed in `worksheet_ids`. 4. **apply_changes** - **Description:** Specifies whether to apply changes directly to ThoughtSpot or to generate a preview before applying any changes.Used for validation of conversion. - **Options:** - `true`: Applies conversion changes directly to ThoughtSpot. - `false`: Generates only a preview of the changes and does not apply any changes to ThoughtSpot --- ## Best Practices 1. **Backup Before Conversion:** Always export metadata as a backup before initiating the conversion process 2. **Partial Conversion for Testing:** Test the conversion process by setting `convert_all` to `false` and specifying a small number of `worksheet_ids`. 3. **Verify Dependencies:** Check for dependent objects, such as Tables and Connections, to avoid invalid references. 4. **Review Changes:** Use `apply_changes: false` to preview the impact of the conversion before applying changes. --- ## Examples ### Convert Specific Worksheets ```json { \"worksheet_ids\": [\"guid1\", \"guid2\", \"guid3\"], \"exclude_worksheet_ids\": [], \"convert_all\": false, \"apply_changes\": true } ``` ### Convert All Accessible Worksheets ```json { \"worksheet_ids\": [], \"exclude_worksheet_ids\": [], \"convert_all\": true, \"apply_changes\": true } ``` ### Exclude Specific Worksheets While Converting All Accessible Worksheets ```json { \"worksheet_ids\": [], \"exclude_worksheet_ids\": [\"abc\"], \"convert_all\": true, \"apply_changes\": true } ``` + * @param convertWorksheetToModelRequest + */ + convertWorksheetToModel(convertWorksheetToModelRequest, _options) { + return __async(this, null, function* () { + var _a, _b, _c; + let _config = _options || this.configuration; + if (convertWorksheetToModelRequest === null || convertWorksheetToModelRequest === void 0) { + throw new RequiredError("MetadataApi", "convertWorksheetToModel", "convertWorksheetToModelRequest"); + } + const localVarPath = "/api/rest/2.0/metadata/worksheets/convert"; + const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.25.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.25.0"); + const contentType = ObjectSerializer.getPreferredMediaType([ + "application/json" + ]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = ObjectSerializer.stringify( + ObjectSerializer.serialize(convertWorksheetToModelRequest, "ConvertWorksheetToModelRequest", ""), + contentType + ); + requestContext.setBody(serializedBody); + let authMethod; + authMethod = _config.authMethods["bearerAuth"]; + if (authMethod == null ? void 0 : authMethod.applySecurityAuthentication) { + yield authMethod == null ? void 0 : authMethod.applySecurityAuthentication(requestContext); + } + const defaultAuth = ((_a = _options == null ? void 0 : _options.authMethods) == null ? void 0 : _a.default) || ((_c = (_b = this.configuration) == null ? void 0 : _b.authMethods) == null ? void 0 : _c.default); + if (defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication) { + yield defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication(requestContext); + } + return requestContext; + }); + } + /** + * Makes a copy of an Answer or Liveboard Version: 10.3.0.cl or later Creates a copy of a metadata object. Requires at least view access to the metadata object being copied. Upon successful execution, the API creates a copy of the metadata object specified in the API request and returns the ID of the new object. + * @param copyObjectRequest + */ + copyObject(copyObjectRequest, _options) { + return __async(this, null, function* () { + var _a, _b, _c; + let _config = _options || this.configuration; + if (copyObjectRequest === null || copyObjectRequest === void 0) { + throw new RequiredError("MetadataApi", "copyObject", "copyObjectRequest"); + } + const localVarPath = "/api/rest/2.0/metadata/copyobject"; + const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.25.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.25.0"); + const contentType = ObjectSerializer.getPreferredMediaType([ + "application/json" + ]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = ObjectSerializer.stringify( + ObjectSerializer.serialize(copyObjectRequest, "CopyObjectRequest", ""), + contentType + ); + requestContext.setBody(serializedBody); + let authMethod; + authMethod = _config.authMethods["bearerAuth"]; + if (authMethod == null ? void 0 : authMethod.applySecurityAuthentication) { + yield authMethod == null ? void 0 : authMethod.applySecurityAuthentication(requestContext); + } + const defaultAuth = ((_a = _options == null ? void 0 : _options.authMethods) == null ? void 0 : _a.default) || ((_c = (_b = this.configuration) == null ? void 0 : _b.authMethods) == null ? void 0 : _c.default); + if (defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication) { + yield defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication(requestContext); + } + return requestContext; + }); + } + /** + * Version: 9.0.0.cl or later Removes the specified metadata object from the ThoughtSpot system. Requires edit access to the metadata object. + * @param deleteMetadataRequest + */ + deleteMetadata(deleteMetadataRequest, _options) { + return __async(this, null, function* () { + var _a, _b, _c; + let _config = _options || this.configuration; + if (deleteMetadataRequest === null || deleteMetadataRequest === void 0) { + throw new RequiredError("MetadataApi", "deleteMetadata", "deleteMetadataRequest"); + } + const localVarPath = "/api/rest/2.0/metadata/delete"; + const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.25.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.25.0"); + const contentType = ObjectSerializer.getPreferredMediaType([ + "application/json" + ]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = ObjectSerializer.stringify( + ObjectSerializer.serialize(deleteMetadataRequest, "DeleteMetadataRequest", ""), + contentType + ); + requestContext.setBody(serializedBody); + let authMethod; + authMethod = _config.authMethods["bearerAuth"]; + if (authMethod == null ? void 0 : authMethod.applySecurityAuthentication) { + yield authMethod == null ? void 0 : authMethod.applySecurityAuthentication(requestContext); + } + const defaultAuth = ((_a = _options == null ? void 0 : _options.authMethods) == null ? void 0 : _a.default) || ((_c = (_b = this.configuration) == null ? void 0 : _b.authMethods) == null ? void 0 : _c.default); + if (defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication) { + yield defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication(requestContext); + } + return requestContext; + }); + } + /** + * Version: 9.0.0.cl or later Exports the [TML](https://docs.thoughtspot.com/cloud/latest/tml) representation of metadata objects in JSON or YAML format. Requires `DATADOWNLOADING` (**Can download Data**) and at least view access to the metadata object. #### Usage guidelines * You can export one or several objects by passing metadata object GUIDs in the `metadata` array. * When exporting TML content for a Liveboard or Answer object, you can set `export_associated` to `true` to retrieve TML content for underlying Worksheets, Tables, or Views, including the GUID of each object within the headers. When `export_associated` is set to `true`, consider retrieving one metadata object at a time. * Set `export_fqns` to `true` to add FQNs of the referenced objects in the TML content. For example, if you send an API request to retrieve TML for a Liveboard and its associated objects, the API returns the TML content with FQNs of the referenced Worksheet. Exporting TML with FQNs is useful if ThoughtSpot has multiple objects with the same name and you want to eliminate ambiguity when importing TML files into ThoughtSpot. It eliminates the need for adding FQNs of the referenced objects manually during the import operation. * To export only the TML of feedbacks associated with an object, set the GUID of the object as `identifier`, and set the `type` as `FEEDBACK` in the `metadata` array. * To export the TML of an object along with the feedbacks associated with it, set the GUID of the object as `identifier`, set the `type` as `LOGIAL_TABLE` in the `metadata` array, and set `export_with_associated_feedbacks` in `export_options` to true. For more information, see [TML Documentation](https://developers.thoughtspot.com/docs/tml#_export_a_tml). For more information on feedbacks, see [Feedback Documentation](https://docs.thoughtspot.com/cloud/latest/sage-feedback). + * @param exportMetadataTMLRequest + */ + exportMetadataTML(exportMetadataTMLRequest, _options) { + return __async(this, null, function* () { + var _a, _b, _c; + let _config = _options || this.configuration; + if (exportMetadataTMLRequest === null || exportMetadataTMLRequest === void 0) { + throw new RequiredError("MetadataApi", "exportMetadataTML", "exportMetadataTMLRequest"); + } + const localVarPath = "/api/rest/2.0/metadata/tml/export"; + const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.25.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.25.0"); + const contentType = ObjectSerializer.getPreferredMediaType([ + "application/json" + ]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = ObjectSerializer.stringify( + ObjectSerializer.serialize(exportMetadataTMLRequest, "ExportMetadataTMLRequest", ""), + contentType + ); + requestContext.setBody(serializedBody); + let authMethod; + authMethod = _config.authMethods["bearerAuth"]; + if (authMethod == null ? void 0 : authMethod.applySecurityAuthentication) { + yield authMethod == null ? void 0 : authMethod.applySecurityAuthentication(requestContext); + } + const defaultAuth = ((_a = _options == null ? void 0 : _options.authMethods) == null ? void 0 : _a.default) || ((_c = (_b = this.configuration) == null ? void 0 : _b.authMethods) == null ? void 0 : _c.default); + if (defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication) { + yield defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication(requestContext); + } + return requestContext; + }); + } + /** + * Version: 10.1.0.cl or later Exports the [TML](https://docs.thoughtspot.com/cloud/latest/tml) representation of metadata objects in JSON or YAML format. ### **Permissions Required** Requires `DATAMANAGEMENT` (**Can manage data**) and `USERMANAGEMENT` (**Can manage users**) privileges. #### **Usage Guidelines** This API is only applicable for `USER`, `GROUP`, and `ROLES` metadata types. - `batch_offset` Indicates the starting position within the complete dataset from which the API should begin returning objects. Useful for paginating results efficiently. - `batch_size` Specifies the number of objects or items to retrieve in a single request. Helps control response size for better performance. - `edoc_format` Defines the format of the TML content. The exported metadata can be in JSON or YAML format. - `export_dependent` Specifies whether to include dependent metadata objects in the export. Ensures related objects are also retrieved if needed. - `all_orgs_override` Indicates whether the export operation applies across all organizations. Useful for multi-tenant environments where cross-org exports are required. + * @param exportMetadataTMLBatchedRequest + */ + exportMetadataTMLBatched(exportMetadataTMLBatchedRequest, _options) { + return __async(this, null, function* () { + var _a, _b, _c; + let _config = _options || this.configuration; + if (exportMetadataTMLBatchedRequest === null || exportMetadataTMLBatchedRequest === void 0) { + throw new RequiredError("MetadataApi", "exportMetadataTMLBatched", "exportMetadataTMLBatchedRequest"); + } + const localVarPath = "/api/rest/2.0/metadata/tml/export/batch"; + const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.25.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.25.0"); + const contentType = ObjectSerializer.getPreferredMediaType([ + "application/json" + ]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = ObjectSerializer.stringify( + ObjectSerializer.serialize(exportMetadataTMLBatchedRequest, "ExportMetadataTMLBatchedRequest", ""), + contentType + ); + requestContext.setBody(serializedBody); + let authMethod; + authMethod = _config.authMethods["bearerAuth"]; + if (authMethod == null ? void 0 : authMethod.applySecurityAuthentication) { + yield authMethod == null ? void 0 : authMethod.applySecurityAuthentication(requestContext); + } + const defaultAuth = ((_a = _options == null ? void 0 : _options.authMethods) == null ? void 0 : _a.default) || ((_c = (_b = this.configuration) == null ? void 0 : _b.authMethods) == null ? void 0 : _c.default); + if (defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication) { + yield defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication(requestContext); + } + return requestContext; + }); + } + /** + * Version: 9.0.0.cl or later Fetches the underlying SQL query data for an Answer object. Requires at least view access to the Answer object. Upon successful execution, the API returns the SQL queries for the specified object as shown in this example: ``` { \"metadata_id\":\"8fbe44a8-46ad-4b16-8d39-184b2fada490\", \"metadata_name\":\"Total sales\", \"metadata_type\":\"ANSWER\", \"sql_queries\":[ { \"metadata_id\":\"8fbe44a8-46ad-4b16-8d39-184b2fada490\", \"metadata_name\":\"Total sales -test\", \"sql_query\":\"SELECT \\n \\\"ta_1\\\".\\\"REGION\\\" \\\"ca_1\\\", \\n \\\"ta_2\\\".\\\"PRODUCTNAME\\\" \\\"ca_2\\\", \\n \\\"ta_1\\\".\\\"STORENAME\\\" \\\"ca_3\\\", \\n CASE\\n WHEN sum(\\\"ta_3\\\".\\\"SALES\\\") IS NOT NULL THEN sum(\\\"ta_3\\\".\\\"SALES\\\")\\n ELSE 0\\n END \\\"ca_4\\\", \\n CASE\\n WHEN sum(\\\"ta_3\\\".\\\"QUANTITYPURCHASED\\\") IS NOT NULL THEN sum(\\\"ta_3\\\".\\\"QUANTITYPURCHASED\\\")\\n ELSE 0\\n END \\\"ca_5\\\"\\nFROM \\\"RETAILAPPAREL\\\".\\\"PUBLIC\\\".\\\"FACT_RETAPP_SALES\\\" \\\"ta_3\\\"\\n JOIN \\\"RETAILAPPAREL\\\".\\\"PUBLIC\\\".\\\"DIM_RETAPP_STORES\\\" \\\"ta_1\\\"\\n ON \\\"ta_3\\\".\\\"STOREID\\\" = \\\"ta_1\\\".\\\"STOREID\\\"\\n JOIN \\\"RETAILAPPAREL\\\".\\\"PUBLIC\\\".\\\"DIM_RETAPP_PRODUCTS\\\" \\\"ta_2\\\"\\n ON \\\"ta_3\\\".\\\"PRODUCTID\\\" = \\\"ta_2\\\".\\\"PRODUCTID\\\"\\nGROUP BY \\n \\\"ca_1\\\", \\n \\\"ca_2\\\", \\n \\\"ca_3\\\"\\n\" } ] } ``` + * @param fetchAnswerSqlQueryRequest + */ + fetchAnswerSqlQuery(fetchAnswerSqlQueryRequest, _options) { + return __async(this, null, function* () { + var _a, _b, _c; + let _config = _options || this.configuration; + if (fetchAnswerSqlQueryRequest === null || fetchAnswerSqlQueryRequest === void 0) { + throw new RequiredError("MetadataApi", "fetchAnswerSqlQuery", "fetchAnswerSqlQueryRequest"); + } + const localVarPath = "/api/rest/2.0/metadata/answer/sql"; + const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.25.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.25.0"); + const contentType = ObjectSerializer.getPreferredMediaType([ + "application/json" + ]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = ObjectSerializer.stringify( + ObjectSerializer.serialize(fetchAnswerSqlQueryRequest, "FetchAnswerSqlQueryRequest", ""), + contentType + ); + requestContext.setBody(serializedBody); + let authMethod; + authMethod = _config.authMethods["bearerAuth"]; + if (authMethod == null ? void 0 : authMethod.applySecurityAuthentication) { + yield authMethod == null ? void 0 : authMethod.applySecurityAuthentication(requestContext); + } + const defaultAuth = ((_a = _options == null ? void 0 : _options.authMethods) == null ? void 0 : _a.default) || ((_c = (_b = this.configuration) == null ? void 0 : _b.authMethods) == null ? void 0 : _c.default); + if (defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication) { + yield defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication(requestContext); + } + return requestContext; + }); + } + /** + * Version: 10.4.0.cl or later Gets information about the status of the TML async import task scheduled using the `/api/rest/2.0/metadata/tml/async/import` API call. To fetch the task details, specify the ID of the TML async import task. Requires access to the task ID. The API allows users who initiated the asynchronous TML import via `/api/rest/2.0/metadata/tml/async/import` to view the status of their tasks. Users with administration privilege can view the status of all import tasks initiated by the users in their Org. #### Usage guidelines See [TML API Documentation](https://developers.thoughtspot.com/docs/tml#_fetch_status_of_the_tml_import_task) for usage guidelines. + * @param fetchAsyncImportTaskStatusRequest + */ + fetchAsyncImportTaskStatus(fetchAsyncImportTaskStatusRequest, _options) { + return __async(this, null, function* () { + var _a, _b, _c; + let _config = _options || this.configuration; + if (fetchAsyncImportTaskStatusRequest === null || fetchAsyncImportTaskStatusRequest === void 0) { + throw new RequiredError("MetadataApi", "fetchAsyncImportTaskStatus", "fetchAsyncImportTaskStatusRequest"); + } + const localVarPath = "/api/rest/2.0/metadata/tml/async/status"; + const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.25.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.25.0"); + const contentType = ObjectSerializer.getPreferredMediaType([ + "application/json" + ]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = ObjectSerializer.stringify( + ObjectSerializer.serialize(fetchAsyncImportTaskStatusRequest, "FetchAsyncImportTaskStatusRequest", ""), + contentType + ); + requestContext.setBody(serializedBody); + let authMethod; + authMethod = _config.authMethods["bearerAuth"]; + if (authMethod == null ? void 0 : authMethod.applySecurityAuthentication) { + yield authMethod == null ? void 0 : authMethod.applySecurityAuthentication(requestContext); + } + const defaultAuth = ((_a = _options == null ? void 0 : _options.authMethods) == null ? void 0 : _a.default) || ((_c = (_b = this.configuration) == null ? void 0 : _b.authMethods) == null ? void 0 : _c.default); + if (defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication) { + yield defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication(requestContext); + } + return requestContext; + }); + } + /** + * Version: 9.0.0.cl or later Fetches the underlying SQL query data for a Liveboard object and its visualizations. Requires at least view access to the Liveboard object. To get SQL query data for a Liveboard, specify the GUID of the Liveboard. Optionally, you can add an array of visualization GUIDs to retrieve the SQL query data for visualizations in the Liveboard. Upon successful execution, the API returns the SQL queries for the specified object as shown in this example: ``` { \"metadata_id\": \"fa68ae91-7588-4136-bacd-d71fb12dda69\", \"metadata_name\": \"Total Sales\", \"metadata_type\": \"LIVEBOARD\", \"sql_queries\": [ { \"metadata_id\": \"b3b6d2b9-089a-490c-8e16-b144650b7843\", \"metadata_name\": \"Total quantity purchased, Total sales by region\", \"sql_query\": \"SELECT \\n \\\"ta_1\\\".\\\"REGION\\\" \\\"ca_1\\\", \\n CASE\\n WHEN sum(\\\"ta_2\\\".\\\"QUANTITYPURCHASED\\\") IS NOT NULL THEN sum(\\\"ta_2\\\".\\\"QUANTITYPURCHASED\\\")\\n ELSE 0\\n END \\\"ca_2\\\", \\n CASE\\n WHEN sum(\\\"ta_2\\\".\\\"SALES\\\") IS NOT NULL THEN sum(\\\"ta_2\\\".\\\"SALES\\\")\\n ELSE 0\\n END \\\"ca_3\\\"\\nFROM \\\"RETAILAPPAREL\\\".\\\"PUBLIC\\\".\\\"FACT_RETAPP_SALES\\\" \\\"ta_2\\\"\\n JOIN \\\"RETAILAPPAREL\\\".\\\"PUBLIC\\\".\\\"DIM_RETAPP_STORES\\\" \\\"ta_1\\\"\\n ON \\\"ta_2\\\".\\\"STOREID\\\" = \\\"ta_1\\\".\\\"STOREID\\\"\\nGROUP BY \\\"ca_1\\\"\" } ] } ``` + * @param fetchLiveboardSqlQueryRequest + */ + fetchLiveboardSqlQuery(fetchLiveboardSqlQueryRequest, _options) { + return __async(this, null, function* () { + var _a, _b, _c; + let _config = _options || this.configuration; + if (fetchLiveboardSqlQueryRequest === null || fetchLiveboardSqlQueryRequest === void 0) { + throw new RequiredError("MetadataApi", "fetchLiveboardSqlQuery", "fetchLiveboardSqlQueryRequest"); + } + const localVarPath = "/api/rest/2.0/metadata/liveboard/sql"; + const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.25.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.25.0"); + const contentType = ObjectSerializer.getPreferredMediaType([ + "application/json" + ]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = ObjectSerializer.stringify( + ObjectSerializer.serialize(fetchLiveboardSqlQueryRequest, "FetchLiveboardSqlQueryRequest", ""), + contentType + ); + requestContext.setBody(serializedBody); + let authMethod; + authMethod = _config.authMethods["bearerAuth"]; + if (authMethod == null ? void 0 : authMethod.applySecurityAuthentication) { + yield authMethod == null ? void 0 : authMethod.applySecurityAuthentication(requestContext); + } + const defaultAuth = ((_a = _options == null ? void 0 : _options.authMethods) == null ? void 0 : _a.default) || ((_c = (_b = this.configuration) == null ? void 0 : _b.authMethods) == null ? void 0 : _c.default); + if (defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication) { + yield defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication(requestContext); + } + return requestContext; + }); + } + /** + * Version: 9.0.0.cl or later Imports [TML](https://docs.thoughtspot.com/cloud/latest/tml) files into ThoughtSpot. Requires `DATAMANAGEMENT` (**Can manage data**) or `ADMINISTRATION` (**Can administer ThoughtsSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the following Data control privileges may be required: - `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) - `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` (**Can manage data models**) #### Usage guidelines * Import all related objects in a single TML Import API call. For example, Tables that use the same Connection object and Worksheets connected to these Tables. * Include the `fqn` property to distinguish objects that have the same name. For example, if you have multiple Connections or Worksheets with the same name on ThoughtSpot and the Connection or Worksheet referenced in your TML file does not have a unique name to distinguish, it may result in invalid object references. Adding `fqn` helps ThoughtSpot differentiate a Table from another with the same name. We recommend [exporting TML with FQNs](#/http/api-endpoints/metadata/export-metadata-tml) and using these during the import operation. * You can upload multiple TML files at a time. If you import a Worksheet along with Liveboards, Answers, and other dependent objects in a single API call, the imported objects will be immediately available for use. When you import only a Worksheet object, it may take some time for the Worksheet to become available in the ThoughtSpot system. Please wait for a few minutes, and then proceed to create an Answer and Liveboard from the newly imported Worksheet. For more information, see [TML Documentation](https://developers.thoughtspot.com/docs/tml#_import_a_tml). + * @param importMetadataTMLRequest + */ + importMetadataTML(importMetadataTMLRequest, _options) { + return __async(this, null, function* () { + var _a, _b, _c; + let _config = _options || this.configuration; + if (importMetadataTMLRequest === null || importMetadataTMLRequest === void 0) { + throw new RequiredError("MetadataApi", "importMetadataTML", "importMetadataTMLRequest"); + } + const localVarPath = "/api/rest/2.0/metadata/tml/import"; + const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.25.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.25.0"); + const contentType = ObjectSerializer.getPreferredMediaType([ + "application/json" + ]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = ObjectSerializer.stringify( + ObjectSerializer.serialize(importMetadataTMLRequest, "ImportMetadataTMLRequest", ""), + contentType + ); + requestContext.setBody(serializedBody); + let authMethod; + authMethod = _config.authMethods["bearerAuth"]; + if (authMethod == null ? void 0 : authMethod.applySecurityAuthentication) { + yield authMethod == null ? void 0 : authMethod.applySecurityAuthentication(requestContext); + } + const defaultAuth = ((_a = _options == null ? void 0 : _options.authMethods) == null ? void 0 : _a.default) || ((_c = (_b = this.configuration) == null ? void 0 : _b.authMethods) == null ? void 0 : _c.default); + if (defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication) { + yield defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication(requestContext); + } + return requestContext; + }); + } + /** + * Version: 10.4.0.cl or later Schedules a task to import [TML](https://docs.thoughtspot.com/cloud/latest/tml) files into ThoughtSpot. You can use this API endpoint to process TML objects asynchronously when importing TMLs of large and complex metadata objects into ThoughtSpot. Unlike the synchronous import TML operation, the API processes TML data in the background and returns a task ID, which can be used to check the status of the import task via `/api/rest/2.0/metadata/tml/async/status` API endpoint. Requires `DATAMANAGEMENT` (**Can manage data**) or `ADMINISTRATION` (**Can administer ThoughtsSpot**) privilege, and edit access to the TML objects. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the following Data control privileges may be required: - `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) - `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` (**Can manage data models**) #### Usage guidelines See [Async TML API Documentation](https://developers.thoughtspot.com/docs/tml#_import_tml_objects_asynchronously) for usage guidelines. + * @param importMetadataTMLAsyncRequest + */ + importMetadataTMLAsync(importMetadataTMLAsyncRequest, _options) { + return __async(this, null, function* () { + var _a, _b, _c; + let _config = _options || this.configuration; + if (importMetadataTMLAsyncRequest === null || importMetadataTMLAsyncRequest === void 0) { + throw new RequiredError("MetadataApi", "importMetadataTMLAsync", "importMetadataTMLAsyncRequest"); + } + const localVarPath = "/api/rest/2.0/metadata/tml/async/import"; + const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.25.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.25.0"); + const contentType = ObjectSerializer.getPreferredMediaType([ + "application/json" + ]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = ObjectSerializer.stringify( + ObjectSerializer.serialize(importMetadataTMLAsyncRequest, "ImportMetadataTMLAsyncRequest", ""), + contentType + ); + requestContext.setBody(serializedBody); + let authMethod; + authMethod = _config.authMethods["bearerAuth"]; + if (authMethod == null ? void 0 : authMethod.applySecurityAuthentication) { + yield authMethod == null ? void 0 : authMethod.applySecurityAuthentication(requestContext); + } + const defaultAuth = ((_a = _options == null ? void 0 : _options.authMethods) == null ? void 0 : _a.default) || ((_c = (_b = this.configuration) == null ? void 0 : _b.authMethods) == null ? void 0 : _c.default); + if (defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication) { + yield defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication(requestContext); + } + return requestContext; + }); + } + /** + * Parameterize fields in metadata objects. Version: 10.9.0.cl or later **Note:** This API endpoint is deprecated and will be removed from ThoughtSpot in a future release. Use [POST /api/rest/2.0/metadata/parameterize-fields](/api/rest/2.0/metadata/parameterize-fields) instead. Allows parameterizing fields in metadata objects in ThoughtSpot. Requires appropriate permissions to modify the metadata object. The API endpoint allows parameterizing the following types of metadata objects: * Logical Tables * Connections * Connection Configs For a Logical Table the field type must be `ATTRIBUTE` and field name can be one of: * databaseName * schemaName * tableName For a Connection or Connection Config, the field type is always `CONNECTION_PROPERTY`. In this case, field_name specifies the exact property of the Connection or Connection Config that needs to be parameterized. For Connection Config, the only supported field name is: * impersonate_user + * @param parameterizeMetadataRequest + */ + parameterizeMetadata(parameterizeMetadataRequest, _options) { + return __async(this, null, function* () { + var _a, _b, _c; + let _config = _options || this.configuration; + if (parameterizeMetadataRequest === null || parameterizeMetadataRequest === void 0) { + throw new RequiredError("MetadataApi", "parameterizeMetadata", "parameterizeMetadataRequest"); + } + const localVarPath = "/api/rest/2.0/metadata/parameterize"; + const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.25.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.25.0"); + const contentType = ObjectSerializer.getPreferredMediaType([ + "application/json" + ]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = ObjectSerializer.stringify( + ObjectSerializer.serialize(parameterizeMetadataRequest, "ParameterizeMetadataRequest", ""), + contentType + ); + requestContext.setBody(serializedBody); + let authMethod; + authMethod = _config.authMethods["bearerAuth"]; + if (authMethod == null ? void 0 : authMethod.applySecurityAuthentication) { + yield authMethod == null ? void 0 : authMethod.applySecurityAuthentication(requestContext); + } + const defaultAuth = ((_a = _options == null ? void 0 : _options.authMethods) == null ? void 0 : _a.default) || ((_c = (_b = this.configuration) == null ? void 0 : _b.authMethods) == null ? void 0 : _c.default); + if (defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication) { + yield defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication(requestContext); + } + return requestContext; + }); + } + /** + * Parameterize multiple fields of metadata objects. For example [schemaName, databaseName] for LOGICAL_TABLE. Version: 26.5.0.cl or later Allows parameterizing multiple fields of metadata objects in ThoughtSpot. For example, you can parameterize [schemaName, databaseName] for LOGICAL_TABLE. Requires appropriate permissions to modify the metadata object. The API endpoint allows parameterizing the following types of metadata objects: * Logical Tables * Connections * Connection Configs For a Logical Table, the field type must be `ATTRIBUTE` and field names can include: * databaseName * schemaName * tableName For a Connection or Connection Config, the field type is always `CONNECTION_PROPERTY`. In this case, field_names specifies the exact properties of the Connection or Connection Config that need to be parameterized. For Connection Config, supported field names include: * impersonate_user You can parameterize multiple fields at once by providing an array of field names. + * @param parameterizeMetadataFieldsRequest + */ + parameterizeMetadataFields(parameterizeMetadataFieldsRequest, _options) { + return __async(this, null, function* () { + var _a, _b, _c; + let _config = _options || this.configuration; + if (parameterizeMetadataFieldsRequest === null || parameterizeMetadataFieldsRequest === void 0) { + throw new RequiredError("MetadataApi", "parameterizeMetadataFields", "parameterizeMetadataFieldsRequest"); + } + const localVarPath = "/api/rest/2.0/metadata/parameterize-fields"; + const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.25.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.25.0"); + const contentType = ObjectSerializer.getPreferredMediaType([ + "application/json" + ]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = ObjectSerializer.stringify( + ObjectSerializer.serialize(parameterizeMetadataFieldsRequest, "ParameterizeMetadataFieldsRequest", ""), + contentType + ); + requestContext.setBody(serializedBody); + let authMethod; + authMethod = _config.authMethods["bearerAuth"]; + if (authMethod == null ? void 0 : authMethod.applySecurityAuthentication) { + yield authMethod == null ? void 0 : authMethod.applySecurityAuthentication(requestContext); + } + const defaultAuth = ((_a = _options == null ? void 0 : _options.authMethods) == null ? void 0 : _a.default) || ((_c = (_b = this.configuration) == null ? void 0 : _b.authMethods) == null ? void 0 : _c.default); + if (defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication) { + yield defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication(requestContext); + } + return requestContext; + }); + } + /** + * Version: 9.0.0.cl or later Gets a list of metadata objects available on the ThoughtSpot system. This API endpoint is available to all users who have view access to the object. Users with `ADMINISTRATION` (**Can administer ThoughtSpot**) privileges can view data for all metadata objects, including users and groups. #### Usage guidelines - To get all metadata objects, send the API request without any attributes. - To get metadata objects of a specific type, set the `type` attribute. For example, to fetch a Worksheet, set the type as `LOGICAL_TABLE`. - To filter metadata objects within type `LOGICAL_TABLE`, set the `subtypes` attribute. For example, to fetch a Worksheet, set the type as `LOGICAL_TABLE` & subtypes as `[WORKSHEET]`. - To get a specific metadata object, specify the GUID. - To customize your search and filter the API response, you can use several parameters. You can search for objects created or modified by specific users, by tags applied to the objects, or by using the include parameters like `include_auto_created_objects`, `include_dependent_objects`, `include_headers`, `include_incomplete_objects`, and so on. You can also define sorting options to sort the data retrieved in the API response. - To get discoverable objects when linientmodel is enabled you can use `include_discoverable_objects` as true else false. Default value is true. - For liveboard metadata type, to get the newer format, set the `liveboard_response_format` as V2. Default value is V1. - To retrieve only objects that are published, set the `include_only_published_objects` as true. Default value is false. **NOTE**: The following parameters support pagination of metadata records: - `tag_identifiers` - `type` - `subtypes` - `created_by_user_identifiers` - `modified_by_user_identifiers` - `owned_by_user_identifiers` - `exclude_objects` - `include_auto_created_objects` - `favorite_object_options` - `include_only_published_objects` If you are using other parameters to search metadata, set `record_size` to `-1` and `record_offset` to `0`. + * @param searchMetadataRequest + */ + searchMetadata(searchMetadataRequest, _options) { + return __async(this, null, function* () { + var _a, _b, _c; + let _config = _options || this.configuration; + if (searchMetadataRequest === null || searchMetadataRequest === void 0) { + throw new RequiredError("MetadataApi", "searchMetadata", "searchMetadataRequest"); + } + const localVarPath = "/api/rest/2.0/metadata/search"; + const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.25.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.25.0"); + const contentType = ObjectSerializer.getPreferredMediaType([ + "application/json" + ]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = ObjectSerializer.stringify( + ObjectSerializer.serialize(searchMetadataRequest, "SearchMetadataRequest", ""), + contentType + ); + requestContext.setBody(serializedBody); + let authMethod; + authMethod = _config.authMethods["bearerAuth"]; + if (authMethod == null ? void 0 : authMethod.applySecurityAuthentication) { + yield authMethod == null ? void 0 : authMethod.applySecurityAuthentication(requestContext); + } + const defaultAuth = ((_a = _options == null ? void 0 : _options.authMethods) == null ? void 0 : _a.default) || ((_c = (_b = this.configuration) == null ? void 0 : _b.authMethods) == null ? void 0 : _c.default); + if (defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication) { + yield defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication(requestContext); + } + return requestContext; + }); + } + /** + * Remove parameterization from fields in metadata objects. Version: 26.5.0.cl or later Allows removing parameterization from fields in metadata objects in ThoughtSpot. Requires appropriate permissions to modify the metadata object. The API endpoint allows unparameterizing the following types of metadata objects: * Logical Tables * Connections * Connection Configs For a Logical Table the field type must be `ATTRIBUTE` and field name can be one of: * databaseName * schemaName * tableName For a Connection or Connection Config, the field type is always `CONNECTION_PROPERTY`. In this case, field_name specifies the exact property of the Connection or Connection Config that needs to be unparameterized. For Connection Config, the only supported field name is: * impersonate_user + * @param unparameterizeMetadataRequest + */ + unparameterizeMetadata(unparameterizeMetadataRequest, _options) { + return __async(this, null, function* () { + var _a, _b, _c; + let _config = _options || this.configuration; + if (unparameterizeMetadataRequest === null || unparameterizeMetadataRequest === void 0) { + throw new RequiredError("MetadataApi", "unparameterizeMetadata", "unparameterizeMetadataRequest"); + } + const localVarPath = "/api/rest/2.0/metadata/unparameterize"; + const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.25.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.25.0"); + const contentType = ObjectSerializer.getPreferredMediaType([ + "application/json" + ]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = ObjectSerializer.stringify( + ObjectSerializer.serialize(unparameterizeMetadataRequest, "UnparameterizeMetadataRequest", ""), + contentType + ); + requestContext.setBody(serializedBody); + let authMethod; + authMethod = _config.authMethods["bearerAuth"]; + if (authMethod == null ? void 0 : authMethod.applySecurityAuthentication) { + yield authMethod == null ? void 0 : authMethod.applySecurityAuthentication(requestContext); + } + const defaultAuth = ((_a = _options == null ? void 0 : _options.authMethods) == null ? void 0 : _a.default) || ((_c = (_b = this.configuration) == null ? void 0 : _b.authMethods) == null ? void 0 : _c.default); + if (defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication) { + yield defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication(requestContext); + } + return requestContext; + }); + } + /** + * Update header attributes for a given list of header objects. Version: 10.6.0.cl or later ## Prerequisites - **Privileges Required:** - `DATAMANAGEMENT` (Can manage data) or `ADMINISTRATION` (Can administer ThoughtSpot). - **Additional Privileges (if RBAC is enabled):** - `ORG_ADMINISTRATION` (Can manage orgs). --- ## Usage Guidelines ### Parameters 1. **headers_update** - **Description:** List of header objects with their attributes to be updated. Each object contains a list of attributes to be updated in the header. - **Usage:** - You must provide either `identifier` or `obj_identifier`, but not both. Both fields cannot be empty. - When `org_identifier` is set to `-1`, only the `identifier` value is accepted; `obj_identifier` is not allowed. 2. **org_identifier** - **Description:** GUID (Globally Unique Identifier) or name of the organization. - **Usage:** - Leaving this field empty assumes that the changes should be applied to the current organization - Provide `org_guid` or `org_name` to uniquely identify the organization where changes need to be applied. . - Provide `-1` if changes have to be applied across all the org. --- ## Note Currently, this API is enabled only for updating the `obj_identifier` attribute. Only `text` will be allowed in attribute\'s value. ## Best Practices 1. **Backup Before Conversion:** Always export metadata as a backup before initiating the update process --- ## Examples ### Only `identifier` is given ```json { \"headers_update\": [ { \"identifier\": \"guid_1\", \"obj_identifier\": \"\", \"type\": \"LOGICAL_COLUMN\", \"attributes\": [ { \"name\": \"obj_id\", \"value\": \"custom_object_id\" } ] } ], \"org_identifier\": \"orgGuid\" } ``` ### Only `obj_identifier` is given ```json { \"headers_update\": [ { \"obj_identifier\": \"custom_object_id\", \"type\": \"ANSWER\", \"attributes\": [ { \"name\": \"obj_id\", \"value\": \"custom_object_id\" } ] } ], \"org_identifier\": \"orgName\" } ``` ### Executing update for all org `-1` ```json { \"headers_update\": [ { \"identifier\": \"guid_1\", \"type\": \"ANSWER\", \"attributes\": [ { \"name\": \"obj_id\", \"value\": \"custom_object_id\" } ] } ], \"org_identifier\": -1 } ``` ### Optional `type` is not provided ```json { \"headers_update\": [ { \"identifier\": \"guid_1\", \"attributes\": [ { \"name\": \"obj_id\", \"value\": \"custom_object_id\" } ] } ], \"org_identifier\": -1 } ``` + * @param updateMetadataHeaderRequest + */ + updateMetadataHeader(updateMetadataHeaderRequest, _options) { + return __async(this, null, function* () { + var _a, _b, _c; + let _config = _options || this.configuration; + if (updateMetadataHeaderRequest === null || updateMetadataHeaderRequest === void 0) { + throw new RequiredError("MetadataApi", "updateMetadataHeader", "updateMetadataHeaderRequest"); + } + const localVarPath = "/api/rest/2.0/metadata/headers/update"; + const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.25.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.25.0"); + const contentType = ObjectSerializer.getPreferredMediaType([ + "application/json" + ]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = ObjectSerializer.stringify( + ObjectSerializer.serialize(updateMetadataHeaderRequest, "UpdateMetadataHeaderRequest", ""), + contentType + ); + requestContext.setBody(serializedBody); + let authMethod; + authMethod = _config.authMethods["bearerAuth"]; + if (authMethod == null ? void 0 : authMethod.applySecurityAuthentication) { + yield authMethod == null ? void 0 : authMethod.applySecurityAuthentication(requestContext); + } + const defaultAuth = ((_a = _options == null ? void 0 : _options.authMethods) == null ? void 0 : _a.default) || ((_c = (_b = this.configuration) == null ? void 0 : _b.authMethods) == null ? void 0 : _c.default); + if (defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication) { + yield defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication(requestContext); + } + return requestContext; + }); + } + /** + * Update object IDs for given metadata objects. Version: 10.8.0.cl or later ## Prerequisites - **Privileges Required:** - `DATAMANAGEMENT` (Can manage data) or `ADMINISTRATION` (Can administer ThoughtSpot). - **Additional Privileges (if RBAC is enabled):** - `ORG_ADMINISTRATION` (Can manage orgs). --- ## Usage Guidelines ### Parameters 1. **metadata** - **Description:** List of metadata objects to update their object IDs. - **Usage:** - Use either `current_obj_id` alone OR use `metadata_identifier` with `type` (when needed). - When using `metadata_identifier`, the `type` field is required if using a name instead of a GUID. - The `new_obj_id` field is always required. --- ## Note This API is specifically designed for updating object IDs of metadata objects. It internally uses the header update mechanism to perform the changes. ## Best Practices 1. **Backup Before Update:** Always export metadata as a backup before initiating the update process. 2. **Validation:** - When using `current_obj_id`, ensure it matches the existing object ID exactly. - When using `metadata_identifier` with a name, ensure the `type` is specified correctly. - Verify that the `new_obj_id` follows your naming conventions and is unique within your system. --- ## Examples ### Using current_obj_id ```json { \"metadata\": [ { \"current_obj_id\": \"existing_object_id\", \"new_obj_id\": \"new_object_id\" } ] } ``` ### Using metadata_identifier with GUID ```json { \"metadata\": [ { \"metadata_identifier\": \"01234567-89ab-cdef-0123-456789abcdef\", \"new_obj_id\": \"new_object_id\" } ] } ``` ### Using metadata_identifier with name and type ```json { \"metadata\": [ { \"metadata_identifier\": \"My Answer\", \"type\": \"ANSWER\", \"new_obj_id\": \"new_object_id\" } ] } ``` ### Multiple objects update ```json { \"metadata\": [ { \"current_obj_id\": \"existing_object_id_1\", \"new_obj_id\": \"new_object_id_1\" }, { \"metadata_identifier\": \"My Worksheet\", \"type\": \"LOGICAL_TABLE\", \"new_obj_id\": \"new_object_id_2\" } ] } ``` + * @param updateMetadataObjIdRequest + */ + updateMetadataObjId(updateMetadataObjIdRequest, _options) { + return __async(this, null, function* () { + var _a, _b, _c; + let _config = _options || this.configuration; + if (updateMetadataObjIdRequest === null || updateMetadataObjIdRequest === void 0) { + throw new RequiredError("MetadataApi", "updateMetadataObjId", "updateMetadataObjIdRequest"); + } + const localVarPath = "/api/rest/2.0/metadata/update-obj-id"; + const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.25.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.25.0"); + const contentType = ObjectSerializer.getPreferredMediaType([ + "application/json" + ]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = ObjectSerializer.stringify( + ObjectSerializer.serialize(updateMetadataObjIdRequest, "UpdateMetadataObjIdRequest", ""), + contentType + ); + requestContext.setBody(serializedBody); + let authMethod; + authMethod = _config.authMethods["bearerAuth"]; + if (authMethod == null ? void 0 : authMethod.applySecurityAuthentication) { + yield authMethod == null ? void 0 : authMethod.applySecurityAuthentication(requestContext); + } + const defaultAuth = ((_a = _options == null ? void 0 : _options.authMethods) == null ? void 0 : _a.default) || ((_c = (_b = this.configuration) == null ? void 0 : _b.authMethods) == null ? void 0 : _c.default); + if (defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication) { + yield defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication(requestContext); + } + return requestContext; + }); + } +}; +var MetadataApiResponseProcessor = class { + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to convertWorksheetToModel + * @throws ApiException if the response code was not in [200, 299] + */ + convertWorksheetToModel(response) { + return __async(this, null, function* () { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("200", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ResponseWorksheetToModelConversion", + "" + ); + return body; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Invalid request.", body, response.headers); + } + if (isCodeInRange("401", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unexpected error", body, response.headers); + } + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ResponseWorksheetToModelConversion", + "" + ); + return body; + } + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", yield response.getBodyAsAny(), response.headers); + }); + } + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to copyObject + * @throws ApiException if the response code was not in [200, 299] + */ + copyObject(response) { + return __async(this, null, function* () { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("200", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ResponseCopyObject", + "" + ); + return body; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Invalid request.", body, response.headers); + } + if (isCodeInRange("401", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } + if (isCodeInRange("404", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Object not found", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unexpected error", body, response.headers); + } + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ResponseCopyObject", + "" + ); + return body; + } + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", yield response.getBodyAsAny(), response.headers); + }); + } + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to deleteMetadata + * @throws ApiException if the response code was not in [200, 299] + */ + deleteMetadata(response) { + return __async(this, null, function* () { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("204", response.httpStatusCode)) { + return; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Invalid request.", body, response.headers); + } + if (isCodeInRange("401", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unexpected error", body, response.headers); + } + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "void", + "" + ); + return body; + } + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", yield response.getBodyAsAny(), response.headers); + }); + } + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to exportMetadataTML + * @throws ApiException if the response code was not in [200, 299] + */ + exportMetadataTML(response) { + return __async(this, null, function* () { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("200", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "Array", + "" + ); + return body; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Invalid request.", body, response.headers); + } + if (isCodeInRange("401", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unexpected error", body, response.headers); + } + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "Array", + "" + ); + return body; + } + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", yield response.getBodyAsAny(), response.headers); + }); + } + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to exportMetadataTMLBatched + * @throws ApiException if the response code was not in [200, 299] + */ + exportMetadataTMLBatched(response) { + return __async(this, null, function* () { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("200", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "any", + "" + ); + return body; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Invalid request.", body, response.headers); + } + if (isCodeInRange("401", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unexpected error", body, response.headers); + } + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "any", + "" + ); + return body; + } + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", yield response.getBodyAsAny(), response.headers); + }); + } + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to fetchAnswerSqlQuery + * @throws ApiException if the response code was not in [200, 299] + */ + fetchAnswerSqlQuery(response) { + return __async(this, null, function* () { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("200", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "SqlQueryResponse", + "" + ); + return body; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Invalid request.", body, response.headers); + } + if (isCodeInRange("401", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unexpected error", body, response.headers); + } + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "SqlQueryResponse", + "" + ); + return body; + } + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", yield response.getBodyAsAny(), response.headers); + }); + } + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to fetchAsyncImportTaskStatus + * @throws ApiException if the response code was not in [200, 299] + */ + fetchAsyncImportTaskStatus(response) { + return __async(this, null, function* () { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("200", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "GetAsyncImportStatusResponse", + "" + ); + return body; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Invalid request.", body, response.headers); + } + if (isCodeInRange("401", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unexpected error", body, response.headers); + } + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "GetAsyncImportStatusResponse", + "" + ); + return body; + } + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", yield response.getBodyAsAny(), response.headers); + }); + } + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to fetchLiveboardSqlQuery + * @throws ApiException if the response code was not in [200, 299] + */ + fetchLiveboardSqlQuery(response) { + return __async(this, null, function* () { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("200", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "SqlQueryResponse", + "" + ); + return body; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Invalid request.", body, response.headers); + } + if (isCodeInRange("401", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unexpected error", body, response.headers); + } + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "SqlQueryResponse", + "" + ); + return body; + } + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", yield response.getBodyAsAny(), response.headers); + }); + } + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to importMetadataTML + * @throws ApiException if the response code was not in [200, 299] + */ + importMetadataTML(response) { + return __async(this, null, function* () { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("200", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "Array", + "" + ); + return body; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Invalid request.", body, response.headers); + } + if (isCodeInRange("401", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unexpected error", body, response.headers); + } + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "Array", + "" + ); + return body; + } + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", yield response.getBodyAsAny(), response.headers); + }); + } + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to importMetadataTMLAsync + * @throws ApiException if the response code was not in [200, 299] + */ + importMetadataTMLAsync(response) { + return __async(this, null, function* () { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("200", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ImportEPackAsyncTaskStatus", + "" + ); + return body; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Invalid request.", body, response.headers); + } + if (isCodeInRange("401", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unexpected error", body, response.headers); + } + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ImportEPackAsyncTaskStatus", + "" + ); + return body; + } + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", yield response.getBodyAsAny(), response.headers); + }); + } + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to parameterizeMetadata + * @throws ApiException if the response code was not in [200, 299] + */ + parameterizeMetadata(response) { + return __async(this, null, function* () { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("204", response.httpStatusCode)) { + return; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Invalid request.", body, response.headers); + } + if (isCodeInRange("401", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unexpected error", body, response.headers); + } + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "void", + "" + ); + return body; + } + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", yield response.getBodyAsAny(), response.headers); + }); + } + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to parameterizeMetadataFields + * @throws ApiException if the response code was not in [200, 299] + */ + parameterizeMetadataFields(response) { + return __async(this, null, function* () { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("204", response.httpStatusCode)) { + return; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Invalid request.", body, response.headers); + } + if (isCodeInRange("401", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unexpected error", body, response.headers); + } + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "void", + "" + ); + return body; + } + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", yield response.getBodyAsAny(), response.headers); + }); + } + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to searchMetadata + * @throws ApiException if the response code was not in [200, 299] + */ + searchMetadata(response) { + return __async(this, null, function* () { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("200", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "Array", + "" + ); + return body; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Invalid request.", body, response.headers); + } + if (isCodeInRange("401", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unexpected error", body, response.headers); + } + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "Array", + "" + ); + return body; + } + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", yield response.getBodyAsAny(), response.headers); + }); + } + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to unparameterizeMetadata + * @throws ApiException if the response code was not in [200, 299] + */ + unparameterizeMetadata(response) { + return __async(this, null, function* () { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("204", response.httpStatusCode)) { + return; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Invalid request.", body, response.headers); + } + if (isCodeInRange("401", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unexpected error", body, response.headers); + } + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "void", + "" + ); + return body; + } + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", yield response.getBodyAsAny(), response.headers); + }); + } + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to updateMetadataHeader + * @throws ApiException if the response code was not in [200, 299] + */ + updateMetadataHeader(response) { + return __async(this, null, function* () { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("204", response.httpStatusCode)) { + return; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Invalid request.", body, response.headers); + } + if (isCodeInRange("401", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unexpected error", body, response.headers); + } + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "void", + "" + ); + return body; + } + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", yield response.getBodyAsAny(), response.headers); + }); + } + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to updateMetadataObjId + * @throws ApiException if the response code was not in [200, 299] + */ + updateMetadataObjId(response) { + return __async(this, null, function* () { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("204", response.httpStatusCode)) { + return; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Invalid request.", body, response.headers); + } + if (isCodeInRange("401", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unexpected error", body, response.headers); + } + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "void", + "" + ); + return body; + } + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", yield response.getBodyAsAny(), response.headers); + }); + } +}; + +// apis/OrgsApi.ts +var OrgsApiRequestFactory = class extends BaseAPIRequestFactory { + /** + * Version: 9.0.0.cl or later Creates an Org object. To use this API, the [Orgs](https://docs.thoughtspot.com/cloud/latest/orgs-overview) feature must be enabled in your cluster. Requires cluster administration (**Can administer Org**) privileges. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `ORG_ADMINISTRATION` (**Can manage Orgs**) privilege is required. + * @param createOrgRequest + */ + createOrg(createOrgRequest, _options) { + return __async(this, null, function* () { + var _a, _b, _c; + let _config = _options || this.configuration; + if (createOrgRequest === null || createOrgRequest === void 0) { + throw new RequiredError("OrgsApi", "createOrg", "createOrgRequest"); + } + const localVarPath = "/api/rest/2.0/orgs/create"; + const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.25.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.25.0"); + const contentType = ObjectSerializer.getPreferredMediaType([ + "application/json" + ]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = ObjectSerializer.stringify( + ObjectSerializer.serialize(createOrgRequest, "CreateOrgRequest", ""), + contentType + ); + requestContext.setBody(serializedBody); + let authMethod; + authMethod = _config.authMethods["bearerAuth"]; + if (authMethod == null ? void 0 : authMethod.applySecurityAuthentication) { + yield authMethod == null ? void 0 : authMethod.applySecurityAuthentication(requestContext); + } + const defaultAuth = ((_a = _options == null ? void 0 : _options.authMethods) == null ? void 0 : _a.default) || ((_c = (_b = this.configuration) == null ? void 0 : _b.authMethods) == null ? void 0 : _c.default); + if (defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication) { + yield defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication(requestContext); + } + return requestContext; + }); + } + /** + * Version: 9.0.0.cl or later Deletes an Org object from the ThoughtSpot system. Requires cluster administration (**Can administer Org**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `ORG_ADMINISTRATION` (**Can manage Orgs**) privilege is required. When you delete an Org, all its users and objects created in that Org context are removed. However, if the users in the deleted Org also exists in other Orgs, they are removed only from the deleted Org. + * @param orgIdentifier ID or name of the Org + */ + deleteOrg(orgIdentifier, _options) { + return __async(this, null, function* () { + var _a, _b, _c; + let _config = _options || this.configuration; + if (orgIdentifier === null || orgIdentifier === void 0) { + throw new RequiredError("OrgsApi", "deleteOrg", "orgIdentifier"); + } + const localVarPath = "/api/rest/2.0/orgs/{org_identifier}/delete".replace("{org_identifier}", encodeURIComponent(String(orgIdentifier))); + const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.25.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.25.0"); + let authMethod; + authMethod = _config.authMethods["bearerAuth"]; + if (authMethod == null ? void 0 : authMethod.applySecurityAuthentication) { + yield authMethod == null ? void 0 : authMethod.applySecurityAuthentication(requestContext); + } + const defaultAuth = ((_a = _options == null ? void 0 : _options.authMethods) == null ? void 0 : _a.default) || ((_c = (_b = this.configuration) == null ? void 0 : _b.authMethods) == null ? void 0 : _c.default); + if (defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication) { + yield defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication(requestContext); + } + return requestContext; + }); + } + /** + * Version: 9.0.0.cl or later Gets a list of Orgs configured on the ThoughtSpot system. To get details of a specific Org, specify the Org ID or name. You can also pass parameters such as status, visibility, and user identifiers to get a specific list of Orgs. Requires cluster administration (**Can administer Org**) privileges. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `ORG_ADMINISTRATION` (**Can manage Orgs**) privilege is required. + * @param searchOrgsRequest + */ + searchOrgs(searchOrgsRequest, _options) { + return __async(this, null, function* () { + var _a, _b, _c; + let _config = _options || this.configuration; + if (searchOrgsRequest === null || searchOrgsRequest === void 0) { + throw new RequiredError("OrgsApi", "searchOrgs", "searchOrgsRequest"); + } + const localVarPath = "/api/rest/2.0/orgs/search"; + const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.25.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.25.0"); + const contentType = ObjectSerializer.getPreferredMediaType([ + "application/json" + ]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = ObjectSerializer.stringify( + ObjectSerializer.serialize(searchOrgsRequest, "SearchOrgsRequest", ""), + contentType + ); + requestContext.setBody(serializedBody); + let authMethod; + authMethod = _config.authMethods["bearerAuth"]; + if (authMethod == null ? void 0 : authMethod.applySecurityAuthentication) { + yield authMethod == null ? void 0 : authMethod.applySecurityAuthentication(requestContext); + } + const defaultAuth = ((_a = _options == null ? void 0 : _options.authMethods) == null ? void 0 : _a.default) || ((_c = (_b = this.configuration) == null ? void 0 : _b.authMethods) == null ? void 0 : _c.default); + if (defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication) { + yield defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication(requestContext); + } + return requestContext; + }); + } + /** + * Version: 9.0.0.cl or later Updates an Org object. You can modify Org properties such as name, description, and user associations. Requires cluster administration (**Can administer Org**) privileges. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `ORG_ADMINISTRATION` (**Can manage Orgs**) privilege is required. + * @param orgIdentifier ID or name of the Org + * @param updateOrgRequest + */ + updateOrg(orgIdentifier, updateOrgRequest, _options) { + return __async(this, null, function* () { + var _a, _b, _c; + let _config = _options || this.configuration; + if (orgIdentifier === null || orgIdentifier === void 0) { + throw new RequiredError("OrgsApi", "updateOrg", "orgIdentifier"); + } + if (updateOrgRequest === null || updateOrgRequest === void 0) { + throw new RequiredError("OrgsApi", "updateOrg", "updateOrgRequest"); + } + const localVarPath = "/api/rest/2.0/orgs/{org_identifier}/update".replace("{org_identifier}", encodeURIComponent(String(orgIdentifier))); + const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.25.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.25.0"); + const contentType = ObjectSerializer.getPreferredMediaType([ + "application/json" + ]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = ObjectSerializer.stringify( + ObjectSerializer.serialize(updateOrgRequest, "UpdateOrgRequest", ""), + contentType + ); + requestContext.setBody(serializedBody); + let authMethod; + authMethod = _config.authMethods["bearerAuth"]; + if (authMethod == null ? void 0 : authMethod.applySecurityAuthentication) { + yield authMethod == null ? void 0 : authMethod.applySecurityAuthentication(requestContext); + } + const defaultAuth = ((_a = _options == null ? void 0 : _options.authMethods) == null ? void 0 : _a.default) || ((_c = (_b = this.configuration) == null ? void 0 : _b.authMethods) == null ? void 0 : _c.default); + if (defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication) { + yield defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication(requestContext); + } + return requestContext; + }); + } +}; +var OrgsApiResponseProcessor = class { + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to createOrg + * @throws ApiException if the response code was not in [200, 299] + */ + createOrg(response) { + return __async(this, null, function* () { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("200", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "OrgResponse", + "" + ); + return body; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Invalid request.", body, response.headers); + } + if (isCodeInRange("401", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unexpected error", body, response.headers); + } + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "OrgResponse", + "" + ); + return body; + } + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", yield response.getBodyAsAny(), response.headers); + }); + } + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to deleteOrg + * @throws ApiException if the response code was not in [200, 299] + */ + deleteOrg(response) { + return __async(this, null, function* () { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("204", response.httpStatusCode)) { + return; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Invalid request.", body, response.headers); + } + if (isCodeInRange("401", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unexpected error", body, response.headers); + } + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "void", + "" + ); + return body; + } + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", yield response.getBodyAsAny(), response.headers); + }); + } + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to searchOrgs + * @throws ApiException if the response code was not in [200, 299] + */ + searchOrgs(response) { + return __async(this, null, function* () { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("200", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "Array", + "" + ); + return body; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Invalid request.", body, response.headers); + } + if (isCodeInRange("401", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unexpected error", body, response.headers); + } + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "Array", + "" + ); + return body; + } + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", yield response.getBodyAsAny(), response.headers); + }); + } + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to updateOrg + * @throws ApiException if the response code was not in [200, 299] + */ + updateOrg(response) { + return __async(this, null, function* () { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("204", response.httpStatusCode)) { + return; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Invalid request.", body, response.headers); + } + if (isCodeInRange("401", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unexpected error", body, response.headers); + } + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "void", + "" + ); + return body; + } + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", yield response.getBodyAsAny(), response.headers); + }); + } +}; + +// apis/ReportsApi.ts +var ReportsApiRequestFactory = class extends BaseAPIRequestFactory { + /** + * Version: 9.0.0.cl or later Exports an Answer in the given file format. You can download the Answer data as a PDF, PNG, CSV, or XLSX file. Requires at least view access to the Answer. #### Usage guidelines In the request body, specify the GUID or name of the Answer and set `file_format`. The default file format is CSV. Use the `type` parameter to specify whether the Answer being exported is a saved Answer (`SAVED`) or a pinned Answer on a Liveboard (`PINNED`). Defaults to `SAVED`. When using `PINNED`, the `metadata_identifier` must be the container id. **NOTE**: * The downloadable file returned in API response file is extensionless. Please rename the downloaded file by typing in the relevant extension. * HTML rendering is not supported for PDF exports of Answers with tables. Optionally, you can define [runtime overrides](https://developers.thoughtspot.com/docs/fetch-data-and-report-apis#_runtime_overrides) to apply to the Answer data. + * @param exportAnswerReportRequest + */ + exportAnswerReport(exportAnswerReportRequest, _options) { + return __async(this, null, function* () { + var _a, _b, _c; + let _config = _options || this.configuration; + if (exportAnswerReportRequest === null || exportAnswerReportRequest === void 0) { + throw new RequiredError("ReportsApi", "exportAnswerReport", "exportAnswerReportRequest"); + } + const localVarPath = "/api/rest/2.0/report/answer"; + const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.25.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.25.0"); + const contentType = ObjectSerializer.getPreferredMediaType([ + "application/json" + ]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = ObjectSerializer.stringify( + ObjectSerializer.serialize(exportAnswerReportRequest, "ExportAnswerReportRequest", ""), + contentType + ); + requestContext.setBody(serializedBody); + let authMethod; + authMethod = _config.authMethods["bearerAuth"]; + if (authMethod == null ? void 0 : authMethod.applySecurityAuthentication) { + yield authMethod == null ? void 0 : authMethod.applySecurityAuthentication(requestContext); + } + const defaultAuth = ((_a = _options == null ? void 0 : _options.authMethods) == null ? void 0 : _a.default) || ((_c = (_b = this.configuration) == null ? void 0 : _b.authMethods) == null ? void 0 : _c.default); + if (defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication) { + yield defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication(requestContext); + } + return requestContext; + }); + } + /** + * Version: 9.0.0.cl or later Exports a Liveboard and its visualizations in PDF, PNG, CSV, or XLSX file format. The default `file_format` is CSV. Requires at least view access to the Liveboard. #### Usage guidelines In the request body, specify the GUID or name of the Liveboard. To generate a Liveboard report with specific visualizations, add GUIDs or names of the visualizations. **NOTE**: * The downloadable file returned in API response file is extensionless. Please rename the downloaded file by typing in the relevant extension. * Optionally, you can define [runtime overrides](https://developers.thoughtspot.com/docs/fetch-data-and-report-apis#_runtime_overrides) to apply to the Answer data. * To include unsaved changes in the report, pass the `transient_pinboard_content` script generated from the `getExportRequestForCurrentPinboard` method in the Visual Embed SDK. Upon successful execution, the API returns the report with unsaved changes, including ad hoc changes to visualizations. For more information, see [Liveboard Report API](https://developers.thoughtspot.com/docs/fetch-data-and-report-apis#_liveboard_report_api). * Starting with ThoughtSpot Cloud 10.9.0.cl release, the Liveboard can be exported in the PNG format in the resolution of your choice. To enable this on your instance, contact ThoughtSpot support. When this feature is enabled, the options `include_cover_page`,`include_filter_page` within the `png_options` will not be available for PNG exports. * Starting with the ThoughtSpot Cloud 26.2.0.cl release, * Liveboards can be exported in CSV format. * All visualizations within a Liveboard can be exported as individual CSV files. * When exporting multiple visualizations or the entire Liveboard, the system returns the report as a compressed ZIP file containing the separate CSV files for each visualization. * Liveboards can also be exported in XLSX format. * All selected visualizations are consolidated into a single Excel workbook (.xlsx), with each visualization placed in its own worksheet (tab). * XLSX exports are limited to a maximum of 255 worksheets (tabs) per workbook. + * @param exportLiveboardReportRequest + */ + exportLiveboardReport(exportLiveboardReportRequest, _options) { + return __async(this, null, function* () { + var _a, _b, _c; + let _config = _options || this.configuration; + if (exportLiveboardReportRequest === null || exportLiveboardReportRequest === void 0) { + throw new RequiredError("ReportsApi", "exportLiveboardReport", "exportLiveboardReportRequest"); + } + const localVarPath = "/api/rest/2.0/report/liveboard"; + const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.25.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.25.0"); + const contentType = ObjectSerializer.getPreferredMediaType([ + "application/json" + ]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = ObjectSerializer.stringify( + ObjectSerializer.serialize(exportLiveboardReportRequest, "ExportLiveboardReportRequest", ""), + contentType + ); + requestContext.setBody(serializedBody); + let authMethod; + authMethod = _config.authMethods["bearerAuth"]; + if (authMethod == null ? void 0 : authMethod.applySecurityAuthentication) { + yield authMethod == null ? void 0 : authMethod.applySecurityAuthentication(requestContext); + } + const defaultAuth = ((_a = _options == null ? void 0 : _options.authMethods) == null ? void 0 : _a.default) || ((_c = (_b = this.configuration) == null ? void 0 : _b.authMethods) == null ? void 0 : _c.default); + if (defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication) { + yield defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication(requestContext); + } + return requestContext; + }); + } +}; +var ReportsApiResponseProcessor = class { + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to exportAnswerReport + * @throws ApiException if the response code was not in [200, 299] + */ + exportAnswerReport(response) { + return __async(this, null, function* () { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("200", response.httpStatusCode)) { + const body = yield response.getBodyAsFile(); + return body; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "binary" + ); + throw new ApiException(response.httpStatusCode, "Invalid request.", body, response.headers); + } + if (isCodeInRange("401", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "binary" + ); + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "binary" + ); + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "binary" + ); + throw new ApiException(response.httpStatusCode, "Unexpected error", body, response.headers); + } + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "HttpFile", + "binary" + ); + return body; + } + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", yield response.getBodyAsAny(), response.headers); + }); + } + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to exportLiveboardReport + * @throws ApiException if the response code was not in [200, 299] + */ + exportLiveboardReport(response) { + return __async(this, null, function* () { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("200", response.httpStatusCode)) { + const body = yield response.getBodyAsFile(); + return body; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "binary" + ); + throw new ApiException(response.httpStatusCode, "Invalid request.", body, response.headers); + } + if (isCodeInRange("401", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "binary" + ); + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "binary" + ); + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "binary" + ); + throw new ApiException(response.httpStatusCode, "Unexpected error", body, response.headers); + } + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "HttpFile", + "binary" + ); + return body; + } + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", yield response.getBodyAsAny(), response.headers); + }); + } +}; + +// apis/RolesApi.ts +var RolesApiRequestFactory = class extends BaseAPIRequestFactory { + /** + * Version: 9.5.0.cl or later Creates a Role object in ThoughtSpot. Available only if [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance. To create a Role, the `ROLE_ADMINISTRATION` (**Can manage roles**) privilege is required. + * @param createRoleRequest + */ + createRole(createRoleRequest, _options) { + return __async(this, null, function* () { + var _a, _b, _c; + let _config = _options || this.configuration; + if (createRoleRequest === null || createRoleRequest === void 0) { + throw new RequiredError("RolesApi", "createRole", "createRoleRequest"); + } + const localVarPath = "/api/rest/2.0/roles/create"; + const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.25.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.25.0"); + const contentType = ObjectSerializer.getPreferredMediaType([ + "application/json" + ]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = ObjectSerializer.stringify( + ObjectSerializer.serialize(createRoleRequest, "CreateRoleRequest", ""), + contentType + ); + requestContext.setBody(serializedBody); + let authMethod; + authMethod = _config.authMethods["bearerAuth"]; + if (authMethod == null ? void 0 : authMethod.applySecurityAuthentication) { + yield authMethod == null ? void 0 : authMethod.applySecurityAuthentication(requestContext); + } + const defaultAuth = ((_a = _options == null ? void 0 : _options.authMethods) == null ? void 0 : _a.default) || ((_c = (_b = this.configuration) == null ? void 0 : _b.authMethods) == null ? void 0 : _c.default); + if (defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication) { + yield defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication(requestContext); + } + return requestContext; + }); + } + /** + * Version: 9.5.0.cl or later Deletes a Role object from the ThoughtSpot system. Available only if [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance. To delete a Role, the `ROLE_ADMINISTRATION` (**Can manage roles**) privilege is required. + * @param roleIdentifier Unique ID or name of the Role. ReadOnly roles cannot be deleted. + */ + deleteRole(roleIdentifier, _options) { + return __async(this, null, function* () { + var _a, _b, _c; + let _config = _options || this.configuration; + if (roleIdentifier === null || roleIdentifier === void 0) { + throw new RequiredError("RolesApi", "deleteRole", "roleIdentifier"); + } + const localVarPath = "/api/rest/2.0/roles/{role_identifier}/delete".replace("{role_identifier}", encodeURIComponent(String(roleIdentifier))); + const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.25.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.25.0"); + let authMethod; + authMethod = _config.authMethods["bearerAuth"]; + if (authMethod == null ? void 0 : authMethod.applySecurityAuthentication) { + yield authMethod == null ? void 0 : authMethod.applySecurityAuthentication(requestContext); + } + const defaultAuth = ((_a = _options == null ? void 0 : _options.authMethods) == null ? void 0 : _a.default) || ((_c = (_b = this.configuration) == null ? void 0 : _b.authMethods) == null ? void 0 : _c.default); + if (defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication) { + yield defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication(requestContext); + } + return requestContext; + }); + } + /** + * Version: 9.5.0.cl or later Gets a list of Role objects from the ThoughtSpot system. Available if [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance. To search for Roles, the `ROLE_ADMINISTRATION` (**Can manage roles**) privilege is required. To get details of a specific Role object, specify the GUID or name. You can also filter the API response based on user group and Org identifiers, privileges assigned to the Role, and deprecation status. + * @param searchRolesRequest + */ + searchRoles(searchRolesRequest, _options) { + return __async(this, null, function* () { + var _a, _b, _c; + let _config = _options || this.configuration; + if (searchRolesRequest === null || searchRolesRequest === void 0) { + throw new RequiredError("RolesApi", "searchRoles", "searchRolesRequest"); + } + const localVarPath = "/api/rest/2.0/roles/search"; + const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.25.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.25.0"); + const contentType = ObjectSerializer.getPreferredMediaType([ + "application/json" + ]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = ObjectSerializer.stringify( + ObjectSerializer.serialize(searchRolesRequest, "SearchRolesRequest", ""), + contentType + ); + requestContext.setBody(serializedBody); + let authMethod; + authMethod = _config.authMethods["bearerAuth"]; + if (authMethod == null ? void 0 : authMethod.applySecurityAuthentication) { + yield authMethod == null ? void 0 : authMethod.applySecurityAuthentication(requestContext); + } + const defaultAuth = ((_a = _options == null ? void 0 : _options.authMethods) == null ? void 0 : _a.default) || ((_c = (_b = this.configuration) == null ? void 0 : _b.authMethods) == null ? void 0 : _c.default); + if (defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication) { + yield defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication(requestContext); + } + return requestContext; + }); + } + /** + * Version: 9.5.0.cl or later Updates the properties of a Role object. Available only if [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance. To update a Role, the `ROLE_ADMINISTRATION` (**Can manage roles**) privilege is required. + * @param roleIdentifier Unique ID or name of the Role. + * @param updateRoleRequest + */ + updateRole(roleIdentifier, updateRoleRequest, _options) { + return __async(this, null, function* () { + var _a, _b, _c; + let _config = _options || this.configuration; + if (roleIdentifier === null || roleIdentifier === void 0) { + throw new RequiredError("RolesApi", "updateRole", "roleIdentifier"); + } + if (updateRoleRequest === null || updateRoleRequest === void 0) { + throw new RequiredError("RolesApi", "updateRole", "updateRoleRequest"); + } + const localVarPath = "/api/rest/2.0/roles/{role_identifier}/update".replace("{role_identifier}", encodeURIComponent(String(roleIdentifier))); + const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.25.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.25.0"); + const contentType = ObjectSerializer.getPreferredMediaType([ + "application/json" + ]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = ObjectSerializer.stringify( + ObjectSerializer.serialize(updateRoleRequest, "UpdateRoleRequest", ""), + contentType + ); + requestContext.setBody(serializedBody); + let authMethod; + authMethod = _config.authMethods["bearerAuth"]; + if (authMethod == null ? void 0 : authMethod.applySecurityAuthentication) { + yield authMethod == null ? void 0 : authMethod.applySecurityAuthentication(requestContext); + } + const defaultAuth = ((_a = _options == null ? void 0 : _options.authMethods) == null ? void 0 : _a.default) || ((_c = (_b = this.configuration) == null ? void 0 : _b.authMethods) == null ? void 0 : _c.default); + if (defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication) { + yield defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication(requestContext); + } + return requestContext; + }); + } +}; +var RolesApiResponseProcessor = class { + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to createRole + * @throws ApiException if the response code was not in [200, 299] + */ + createRole(response) { + return __async(this, null, function* () { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("200", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "RoleResponse", + "" + ); + return body; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Invalid parameters.", body, response.headers); + } + if (isCodeInRange("401", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Internal error", body, response.headers); + } + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "RoleResponse", + "" + ); + return body; + } + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", yield response.getBodyAsAny(), response.headers); + }); + } + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to deleteRole + * @throws ApiException if the response code was not in [200, 299] + */ + deleteRole(response) { + return __async(this, null, function* () { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("204", response.httpStatusCode)) { + return; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Invalid request.", body, response.headers); + } + if (isCodeInRange("401", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Internal error", body, response.headers); + } + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "void", + "" + ); + return body; + } + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", yield response.getBodyAsAny(), response.headers); + }); + } + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to searchRoles + * @throws ApiException if the response code was not in [200, 299] + */ + searchRoles(response) { + return __async(this, null, function* () { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("200", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "Array", + "" + ); + return body; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Invalid request.", body, response.headers); + } + if (isCodeInRange("401", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Internal error", body, response.headers); + } + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "Array", + "" + ); + return body; + } + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", yield response.getBodyAsAny(), response.headers); + }); + } + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to updateRole + * @throws ApiException if the response code was not in [200, 299] + */ + updateRole(response) { + return __async(this, null, function* () { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("200", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "RoleResponse", + "" + ); + return body; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Invalid request.", body, response.headers); + } + if (isCodeInRange("401", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unexpected error", body, response.headers); + } + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "RoleResponse", + "" + ); + return body; + } + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", yield response.getBodyAsAny(), response.headers); + }); + } +}; + +// apis/SchedulesApi.ts +var SchedulesApiRequestFactory = class extends BaseAPIRequestFactory { + /** + * Create schedule. Version: 9.4.0.cl or later Creates a Liveboard schedule job. Requires at least edit access to Liveboards. To create a schedule on behalf of another user, you need `ADMINISTRATION` (**Can administer Org**) or `JOBSCHEDULING` (**Can schedule for others**) privilege and edit access to the Liveboard. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `JOBSCHEDULING` (**Can schedule for others**) privilege is required. #### Usage guidelines * The description text is mandatory. The description text appears as **Description: ** in the Liveboard schedule email notifications. * For Liveboards with both charts and tables, schedule creation is only supported in PDF and XLS formats. Schedules created in CSV formats for such Liveboards will fail to run. If `PDF` is set as the `file_format`, enable `pdf_options` to get the correct attachment. Not doing so may cause the attachment to be rendered empty. * To include only specific visualizations, specify the visualization GUIDs in the `visualization_identifiers` array. * You can schedule a Liveboard job to run periodically by setting frequency parameters. You can set the schedule to run daily, weekly, monthly or every n minutes or hours. The scheduled job can also be configured to run at a specific time of the day or on specific days of the week or month. Please ensure that when setting the schedule frequency for _minute of the object_, only values that are multiples of 5 are included. * If the `frequency` parameters are defined, you can set the time zone to a value that matches your server\'s time zone. For example, `US/Central`, `Etc/UTC`, `CET`. The default time zone is `America/Los_Angeles`. For more information about Liveboard jobs, see [ThoughtSpot Product Documentation](https://docs.thoughtspot.com/cloud/latest/liveboard-schedule). + * @param createScheduleRequest + */ + createSchedule(createScheduleRequest, _options) { + return __async(this, null, function* () { + var _a, _b, _c; + let _config = _options || this.configuration; + if (createScheduleRequest === null || createScheduleRequest === void 0) { + throw new RequiredError("SchedulesApi", "createSchedule", "createScheduleRequest"); + } + const localVarPath = "/api/rest/2.0/schedules/create"; + const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.25.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.25.0"); + const contentType = ObjectSerializer.getPreferredMediaType([ + "application/json" + ]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = ObjectSerializer.stringify( + ObjectSerializer.serialize(createScheduleRequest, "CreateScheduleRequest", ""), + contentType + ); + requestContext.setBody(serializedBody); + let authMethod; + authMethod = _config.authMethods["bearerAuth"]; + if (authMethod == null ? void 0 : authMethod.applySecurityAuthentication) { + yield authMethod == null ? void 0 : authMethod.applySecurityAuthentication(requestContext); + } + const defaultAuth = ((_a = _options == null ? void 0 : _options.authMethods) == null ? void 0 : _a.default) || ((_c = (_b = this.configuration) == null ? void 0 : _b.authMethods) == null ? void 0 : _c.default); + if (defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication) { + yield defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication(requestContext); + } + return requestContext; + }); + } + /** + * Deletes a scheduled job. Version: 9.4.0.cl or later Deletes a scheduled Liveboard job. Requires at least edit access to Liveboard or `ADMINISTRATION` (**Can administer Org**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `JOBSCHEDULING` (**Can schedule for others**) privilege is required. + * @param scheduleIdentifier Unique ID or name of the scheduled job. + */ + deleteSchedule(scheduleIdentifier, _options) { + return __async(this, null, function* () { + var _a, _b, _c; + let _config = _options || this.configuration; + if (scheduleIdentifier === null || scheduleIdentifier === void 0) { + throw new RequiredError("SchedulesApi", "deleteSchedule", "scheduleIdentifier"); + } + const localVarPath = "/api/rest/2.0/schedules/{schedule_identifier}/delete".replace("{schedule_identifier}", encodeURIComponent(String(scheduleIdentifier))); + const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.25.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.25.0"); + let authMethod; + authMethod = _config.authMethods["bearerAuth"]; + if (authMethod == null ? void 0 : authMethod.applySecurityAuthentication) { + yield authMethod == null ? void 0 : authMethod.applySecurityAuthentication(requestContext); + } + const defaultAuth = ((_a = _options == null ? void 0 : _options.authMethods) == null ? void 0 : _a.default) || ((_c = (_b = this.configuration) == null ? void 0 : _b.authMethods) == null ? void 0 : _c.default); + if (defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication) { + yield defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication(requestContext); + } + return requestContext; + }); + } + /** + * Search Schedules Version: 9.4.0.cl or later Gets a list of scheduled jobs configured for a Liveboard. To get details of a specific scheduled job, specify the name or GUID of the scheduled job. Requires at least view access to Liveboards. **NOTE**: When filtering schedules by parameters other than `metadata`, set `record_size` to `-1` and `record_offset` to `0` for accurate results. + * @param searchSchedulesRequest + */ + searchSchedules(searchSchedulesRequest, _options) { + return __async(this, null, function* () { + var _a, _b, _c; + let _config = _options || this.configuration; + if (searchSchedulesRequest === null || searchSchedulesRequest === void 0) { + throw new RequiredError("SchedulesApi", "searchSchedules", "searchSchedulesRequest"); + } + const localVarPath = "/api/rest/2.0/schedules/search"; + const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.25.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.25.0"); + const contentType = ObjectSerializer.getPreferredMediaType([ + "application/json" + ]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = ObjectSerializer.stringify( + ObjectSerializer.serialize(searchSchedulesRequest, "SearchSchedulesRequest", ""), + contentType + ); + requestContext.setBody(serializedBody); + let authMethod; + authMethod = _config.authMethods["bearerAuth"]; + if (authMethod == null ? void 0 : authMethod.applySecurityAuthentication) { + yield authMethod == null ? void 0 : authMethod.applySecurityAuthentication(requestContext); + } + const defaultAuth = ((_a = _options == null ? void 0 : _options.authMethods) == null ? void 0 : _a.default) || ((_c = (_b = this.configuration) == null ? void 0 : _b.authMethods) == null ? void 0 : _c.default); + if (defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication) { + yield defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication(requestContext); + } + return requestContext; + }); + } + /** + * Update schedule. Version: 9.4.0.cl or later Updates a scheduled Liveboard job. Requires at least edit access to Liveboards. To update a schedule on behalf of another user, you need `ADMINISTRATION` (**Can administer Org**) or `JOBSCHEDULING` (**Can schedule for others**) privilege and edit access to the Liveboard. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `JOBSCHEDULING` (**Can schedule for others**) privilege is required. The API endpoint allows you to pause a scheduled job, change the status of a paused job. You can also edit the recipients list, frequency of the job, format of the file to send to the recipients in email notifications, PDF options, and time zone setting. + * @param scheduleIdentifier Unique ID or name of the schedule. + * @param updateScheduleRequest + */ + updateSchedule(scheduleIdentifier, updateScheduleRequest, _options) { + return __async(this, null, function* () { + var _a, _b, _c; + let _config = _options || this.configuration; + if (scheduleIdentifier === null || scheduleIdentifier === void 0) { + throw new RequiredError("SchedulesApi", "updateSchedule", "scheduleIdentifier"); + } + if (updateScheduleRequest === null || updateScheduleRequest === void 0) { + throw new RequiredError("SchedulesApi", "updateSchedule", "updateScheduleRequest"); + } + const localVarPath = "/api/rest/2.0/schedules/{schedule_identifier}/update".replace("{schedule_identifier}", encodeURIComponent(String(scheduleIdentifier))); + const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.25.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.25.0"); + const contentType = ObjectSerializer.getPreferredMediaType([ + "application/json" + ]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = ObjectSerializer.stringify( + ObjectSerializer.serialize(updateScheduleRequest, "UpdateScheduleRequest", ""), + contentType + ); + requestContext.setBody(serializedBody); + let authMethod; + authMethod = _config.authMethods["bearerAuth"]; + if (authMethod == null ? void 0 : authMethod.applySecurityAuthentication) { + yield authMethod == null ? void 0 : authMethod.applySecurityAuthentication(requestContext); + } + const defaultAuth = ((_a = _options == null ? void 0 : _options.authMethods) == null ? void 0 : _a.default) || ((_c = (_b = this.configuration) == null ? void 0 : _b.authMethods) == null ? void 0 : _c.default); + if (defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication) { + yield defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication(requestContext); + } + return requestContext; + }); + } +}; +var SchedulesApiResponseProcessor = class { + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to createSchedule + * @throws ApiException if the response code was not in [200, 299] + */ + createSchedule(response) { + return __async(this, null, function* () { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("200", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ResponseSchedule", + "" + ); + return body; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Invalid request.", body, response.headers); + } + if (isCodeInRange("401", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unexpected error", body, response.headers); + } + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ResponseSchedule", + "" + ); + return body; + } + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", yield response.getBodyAsAny(), response.headers); + }); + } + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to deleteSchedule + * @throws ApiException if the response code was not in [200, 299] + */ + deleteSchedule(response) { + return __async(this, null, function* () { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("204", response.httpStatusCode)) { + return; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Invalid request.", body, response.headers); + } + if (isCodeInRange("401", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unexpected error", body, response.headers); + } + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "void", + "" + ); + return body; + } + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", yield response.getBodyAsAny(), response.headers); + }); + } + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to searchSchedules + * @throws ApiException if the response code was not in [200, 299] + */ + searchSchedules(response) { + return __async(this, null, function* () { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("200", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "Array", + "" + ); + return body; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Invalid request.", body, response.headers); + } + if (isCodeInRange("401", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unexpected error", body, response.headers); + } + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "Array", + "" + ); + return body; + } + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", yield response.getBodyAsAny(), response.headers); + }); + } + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to updateSchedule + * @throws ApiException if the response code was not in [200, 299] + */ + updateSchedule(response) { + return __async(this, null, function* () { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("204", response.httpStatusCode)) { + return; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Invalid request.", body, response.headers); + } + if (isCodeInRange("401", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unexpected error", body, response.headers); + } + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "void", + "" + ); + return body; + } + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", yield response.getBodyAsAny(), response.headers); + }); + } +}; + +// apis/SecurityApi.ts +var SecurityApiRequestFactory = class extends BaseAPIRequestFactory { + /** + * Version: 9.0.0.cl or later Transfers the ownership of one or several objects from one user to another. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `USER_ADMINISTRATION` (**Can manage users**) privilege and edit access to the objects are required. + * @param assignChangeAuthorRequest + */ + assignChangeAuthor(assignChangeAuthorRequest, _options) { + return __async(this, null, function* () { + var _a, _b, _c; + let _config = _options || this.configuration; + if (assignChangeAuthorRequest === null || assignChangeAuthorRequest === void 0) { + throw new RequiredError("SecurityApi", "assignChangeAuthor", "assignChangeAuthorRequest"); + } + const localVarPath = "/api/rest/2.0/security/metadata/assign"; + const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.25.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.25.0"); + const contentType = ObjectSerializer.getPreferredMediaType([ + "application/json" + ]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = ObjectSerializer.stringify( + ObjectSerializer.serialize(assignChangeAuthorRequest, "AssignChangeAuthorRequest", ""), + contentType + ); + requestContext.setBody(serializedBody); + let authMethod; + authMethod = _config.authMethods["bearerAuth"]; + if (authMethod == null ? void 0 : authMethod.applySecurityAuthentication) { + yield authMethod == null ? void 0 : authMethod.applySecurityAuthentication(requestContext); + } + const defaultAuth = ((_a = _options == null ? void 0 : _options.authMethods) == null ? void 0 : _a.default) || ((_c = (_b = this.configuration) == null ? void 0 : _b.authMethods) == null ? void 0 : _c.default); + if (defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication) { + yield defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication(requestContext); + } + return requestContext; + }); + } + /** + * Version: 10.12.0.cl or later Fetches column security rules for specified tables. This API endpoint retrieves column-level security rules configured for tables. It returns information about which columns are secured and which groups have access to those columns. #### Usage guidelines - Provide an array of table identifiers using either `identifier` (GUID or name) or `obj_identifier` (object ID) - At least one of `identifier` or `obj_identifier` must be provided for each table - The API returns column security rules for all specified tables - Users must have appropriate permissions to access security rules for the specified tables #### Required permissions - `ADMINISTRATION` - Can administer ThoughtSpot - `DATAMANAGEMENT` - Can manage data - `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` - Can manage worksheet views and tables #### Example request ```json { \"tables\": [ { \"identifier\": \"table-guid\", \"obj_identifier\": \"table-object-id\" } ] } ``` #### Response format The API returns an array of `ColumnSecurityRuleResponse` objects wrapped in a `data` field. Each `ColumnSecurityRuleResponse` object contains: - Table information (GUID and object ID) - Array of column security rules with column details, group access, and source table information #### Example response ```json { \"data\": [ { \"guid\": \"table-guid\", \"objId\": \"table-object-id\", \"columnSecurityRules\": [ { \"column\": { \"id\": \"col_123\", \"name\": \"Salary\" }, \"groups\": [ { \"id\": \"group_1\", \"name\": \"HR Department\" } ], \"sourceTableDetails\": { \"id\": \"source-table-guid\", \"name\": \"Employee_Data\" } } ] } ] } ``` + * @param fetchColumnSecurityRulesRequest + */ + fetchColumnSecurityRules(fetchColumnSecurityRulesRequest, _options) { + return __async(this, null, function* () { + var _a, _b, _c; + let _config = _options || this.configuration; + if (fetchColumnSecurityRulesRequest === null || fetchColumnSecurityRulesRequest === void 0) { + throw new RequiredError("SecurityApi", "fetchColumnSecurityRules", "fetchColumnSecurityRulesRequest"); + } + const localVarPath = "/api/rest/2.0/security/column/rules/fetch"; + const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.25.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.25.0"); + const contentType = ObjectSerializer.getPreferredMediaType([ + "application/json" + ]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = ObjectSerializer.stringify( + ObjectSerializer.serialize(fetchColumnSecurityRulesRequest, "FetchColumnSecurityRulesRequest", ""), + contentType + ); + requestContext.setBody(serializedBody); + let authMethod; + authMethod = _config.authMethods["bearerAuth"]; + if (authMethod == null ? void 0 : authMethod.applySecurityAuthentication) { + yield authMethod == null ? void 0 : authMethod.applySecurityAuthentication(requestContext); + } + const defaultAuth = ((_a = _options == null ? void 0 : _options.authMethods) == null ? void 0 : _a.default) || ((_c = (_b = this.configuration) == null ? void 0 : _b.authMethods) == null ? void 0 : _c.default); + if (defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication) { + yield defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication(requestContext); + } + return requestContext; + }); + } + /** + * Version: 26.3.0.cl or later This API fetches the object privileges present for the given list of principals (user or group), on the given set of objects. It supports pagination, which can be enabled and configured using the request parameters. It provides users access to certain features based on privilege based access control. #### Usage guidelines - Specify the `type` (`USER` or `USER_GROUP`) and `identifier` (either GUID or name) of the principals for which you want to retrieve object privilege information in the `principals` array. - Specify the `type` (`LOGICAL_TABLE`) and `identifier` (either GUID or name) of the metadata objects for which you want to retrieve object privilege information in the `metadata` array. Only `LOGICAL_TABLE` metadata type is supported for now. It may be extended for other metadata types in future. - To control the offset from where principals have to be fetched, use `record_offset`. When `record_offset` is 0, information is fetched from the beginning. - To control the number of principals to be fetched, use `record_size`. Default `record_size` is 20. - Ensure `record_offset` for a subsequent request is one more than the value of `record_size` of the previous request. - Ensure using correct Authorization Bearer Token corresponding to specific user & org. #### Example request ```json { \"principals\": [ { \"type\": \"type-1\", \"identifier\": \"principal-guid-or-name-1\" }, { \"type\": \"type-2\", \"identifier\": \"principal-guid-or-name-2\" } ], \"metadata\": [ { \"type\": \"metadata-type-1\", \"identifier\": \"metadata-guid-or-name-1\" }, { \"type\": \"metadata-type-2\", \"identifier\": \"metadata-guid-or-name-2\" } ], \"record_offset\": 0, \"record_size\": 20 } ``` #### Response format The API returns an array of `metadata_object_privileges` objects wrapped in JSON. Each `metadata_object_privileges` object contains: - Metadata information (GUID, name and type) - Array of `principal_object_privilege_info`. - Each `principal_object_privilege_info` contains: - Principal type. All principals of this type are listed as described below. - Array of `principal_object_privileges`. - Each `principal_object_privileges` contains: - Principal information (GUID, name, subtype) - List of applied object level privileges. #### Example response ```json { \"metadata_object_privileges\": [ { \"metadata_id\": \"metadata-guid-1\", \"metadata_name\": \"metadata-name-1\", \"metadata_type\": \"metadata-type-1\", \"principal_object_privilege_info\": [ { \"principal_type\": \"principal-type-1\", \"principal_object_privileges\": [ { \"principal_id\": \"principal-guid-1\", \"principal_name\": \"principal-name-1\", \"principal_sub_type\": \"principal-sub-type-1\", \"object_privileges\": \"[object-privilege-1, object-privilege-2]\" }, { \"principal_id\": \"principal-guid-2\", \"principal_name\": \"principal-name-2\", \"principal_sub_type\": \"principal-sub-type-2\", \"object_privileges\": \"[object-privilege-1, object-privilege-2]\" } ] }, { \"principal_type\": \"principal-type-2\", \"principal_object_privileges\": [ { \"principal_id\": \"principal-guid-3\", \"principal_name\": \"principal-guid-4\", \"principal_sub_type\": \"principal-sub-type-4\", \"object_privileges\": \"[object-privilege-1]\" } ] } ] }, { \"metadata_id\": \"metadata-guid-2\", \"metadata_name\": \"metadata-name-2\", \"metadata_type\": \"metadata-type-2\", \"principal_object_privilege_info\": [ { \"principal_type\": \"principal-type-1\", \"principal_object_privileges\": [ { \"principal_id\": \"principal-guid-1\", \"principal_name\": \"principal-name-1\", \"principal_sub_type\": \"principal-sub-type-1\", \"object_privileges\": \"[object-privilege-3, object-privilege-4]\" }, { \"principal_id\": \"principal-guid-2\", \"principal_name\": \"principal-name-2\", \"principal_sub_type\": \"principal-sub-type-2\", \"object_privileges\": \"[object-privilege-4]\" } ] } ] } ] } ``` + * @param fetchObjectPrivilegesRequest + */ + fetchObjectPrivileges(fetchObjectPrivilegesRequest, _options) { + return __async(this, null, function* () { + var _a, _b, _c; + let _config = _options || this.configuration; + if (fetchObjectPrivilegesRequest === null || fetchObjectPrivilegesRequest === void 0) { + throw new RequiredError("SecurityApi", "fetchObjectPrivileges", "fetchObjectPrivilegesRequest"); + } + const localVarPath = "/api/rest/2.0/security/metadata/fetch-object-privileges"; + const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.25.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.25.0"); + const contentType = ObjectSerializer.getPreferredMediaType([ + "application/json" + ]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = ObjectSerializer.stringify( + ObjectSerializer.serialize(fetchObjectPrivilegesRequest, "FetchObjectPrivilegesRequest", ""), + contentType + ); + requestContext.setBody(serializedBody); + let authMethod; + authMethod = _config.authMethods["bearerAuth"]; + if (authMethod == null ? void 0 : authMethod.applySecurityAuthentication) { + yield authMethod == null ? void 0 : authMethod.applySecurityAuthentication(requestContext); + } + const defaultAuth = ((_a = _options == null ? void 0 : _options.authMethods) == null ? void 0 : _a.default) || ((_c = (_b = this.configuration) == null ? void 0 : _b.authMethods) == null ? void 0 : _c.default); + if (defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication) { + yield defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication(requestContext); + } + return requestContext; + }); + } + /** + * Version: 9.0.0.cl or later Fetches object permission details for a given principal object such as a user and group. Requires view access to the metadata object. #### Usage guidelines * To get a list of all metadata objects that a user or group can access, specify the `type` and GUID or name of the principal. * To get permission details for a specific object, add the `type` and GUID or name of the metadata object to your API request. Upon successful execution, the API returns a list of metadata objects and permission details for each object. + * @param fetchPermissionsOfPrincipalsRequest + */ + fetchPermissionsOfPrincipals(fetchPermissionsOfPrincipalsRequest, _options) { + return __async(this, null, function* () { + var _a, _b, _c; + let _config = _options || this.configuration; + if (fetchPermissionsOfPrincipalsRequest === null || fetchPermissionsOfPrincipalsRequest === void 0) { + throw new RequiredError("SecurityApi", "fetchPermissionsOfPrincipals", "fetchPermissionsOfPrincipalsRequest"); + } + const localVarPath = "/api/rest/2.0/security/principals/fetch-permissions"; + const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.25.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.25.0"); + const contentType = ObjectSerializer.getPreferredMediaType([ + "application/json" + ]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = ObjectSerializer.stringify( + ObjectSerializer.serialize(fetchPermissionsOfPrincipalsRequest, "FetchPermissionsOfPrincipalsRequest", ""), + contentType + ); + requestContext.setBody(serializedBody); + let authMethod; + authMethod = _config.authMethods["bearerAuth"]; + if (authMethod == null ? void 0 : authMethod.applySecurityAuthentication) { + yield authMethod == null ? void 0 : authMethod.applySecurityAuthentication(requestContext); + } + const defaultAuth = ((_a = _options == null ? void 0 : _options.authMethods) == null ? void 0 : _a.default) || ((_c = (_b = this.configuration) == null ? void 0 : _b.authMethods) == null ? void 0 : _c.default); + if (defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication) { + yield defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication(requestContext); + } + return requestContext; + }); + } + /** + * Version: 9.0.0.cl or later Fetches permission details for a given metadata object. Requires view access to the metadata object. #### Usage guidelines * To fetch a list of users and groups for a metadata object, specify `type` and GUID or name of the metadata object. * To get permission details for a specific user or group, add `type` and GUID or name of the principal object to your API request. Upon successful execution, the API returns permission details and principal information for the object specified in the API request. + * @param fetchPermissionsOnMetadataRequest + */ + fetchPermissionsOnMetadata(fetchPermissionsOnMetadataRequest, _options) { + return __async(this, null, function* () { + var _a, _b, _c; + let _config = _options || this.configuration; + if (fetchPermissionsOnMetadataRequest === null || fetchPermissionsOnMetadataRequest === void 0) { + throw new RequiredError("SecurityApi", "fetchPermissionsOnMetadata", "fetchPermissionsOnMetadataRequest"); + } + const localVarPath = "/api/rest/2.0/security/metadata/fetch-permissions"; + const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.25.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.25.0"); + const contentType = ObjectSerializer.getPreferredMediaType([ + "application/json" + ]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = ObjectSerializer.stringify( + ObjectSerializer.serialize(fetchPermissionsOnMetadataRequest, "FetchPermissionsOnMetadataRequest", ""), + contentType + ); + requestContext.setBody(serializedBody); + let authMethod; + authMethod = _config.authMethods["bearerAuth"]; + if (authMethod == null ? void 0 : authMethod.applySecurityAuthentication) { + yield authMethod == null ? void 0 : authMethod.applySecurityAuthentication(requestContext); + } + const defaultAuth = ((_a = _options == null ? void 0 : _options.authMethods) == null ? void 0 : _a.default) || ((_c = (_b = this.configuration) == null ? void 0 : _b.authMethods) == null ? void 0 : _c.default); + if (defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication) { + yield defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication(requestContext); + } + return requestContext; + }); + } + /** + * Version: 26.3.0.cl or later This API allows the addition or deletion of object level privileges for a set of users and groups, on a set of metadata objects. It provides users to access certain features based on privilege based access control. #### Usage guidelines - Specify the `operation`. The supported operations are: `ADD`, `REMOVE`. - Specify the type of the objects on which the object privileges are being provided in `metadata_type`. Only `LOGICAL_TABLE` metadata type is supported for now. It may be extended for other metadata types in future. - Specify the list of object privilege types in the `object_privilege_types` array. The supported object privilege types are: `SPOTTER_COACHING_PRIVILEGE`. - Specify the identifiers (either GUID or name) for the metadata objects in the `metadata_identifiers` array. - Specify the `type` (`USER` or `USER_GROUP`) and `identifier` (either GUID or name) of the principals to which you want to apply the given operation and given object privileges in the `principals` array. - Ensure using correct Authorization Bearer Token corresponding to specific user & org. #### Example request ```json { \"operation\": \"operation-type\", \"metadata_type\": \"metadata-type\", \"object_privilege_types\": [\"privilege-type-1\", \"privilege-type-2\"], \"metadata_identifiers\": [\"metadata-guid-or-name-1\", \"metadata-guid-or-name-1\"], \"principals\": [ { \"type\": \"type-1\", \"identifier\": \"principal-guid-or-name-1\" }, { \"type\": \"type-2\", \"identifier\": \"principal-guid-or-name-2\" } ] } ``` > ###### Note: > * Only admin users, users with edit access and users with coaching privilege on a given data-model can add or remove principals related to SPOTTER_COACHING_PRIVILEGE + * @param manageObjectPrivilegeRequest + */ + manageObjectPrivilege(manageObjectPrivilegeRequest, _options) { + return __async(this, null, function* () { + var _a, _b, _c; + let _config = _options || this.configuration; + if (manageObjectPrivilegeRequest === null || manageObjectPrivilegeRequest === void 0) { + throw new RequiredError("SecurityApi", "manageObjectPrivilege", "manageObjectPrivilegeRequest"); + } + const localVarPath = "/api/rest/2.0/security/metadata/manage-object-privilege"; + const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.25.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.25.0"); + const contentType = ObjectSerializer.getPreferredMediaType([ + "application/json" + ]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = ObjectSerializer.stringify( + ObjectSerializer.serialize(manageObjectPrivilegeRequest, "ManageObjectPrivilegeRequest", ""), + contentType + ); + requestContext.setBody(serializedBody); + let authMethod; + authMethod = _config.authMethods["bearerAuth"]; + if (authMethod == null ? void 0 : authMethod.applySecurityAuthentication) { + yield authMethod == null ? void 0 : authMethod.applySecurityAuthentication(requestContext); + } + const defaultAuth = ((_a = _options == null ? void 0 : _options.authMethods) == null ? void 0 : _a.default) || ((_c = (_b = this.configuration) == null ? void 0 : _b.authMethods) == null ? void 0 : _c.default); + if (defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication) { + yield defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication(requestContext); + } + return requestContext; + }); + } + /** + * Version: 26.5.0.cl or later Allows publishing metadata objects across organizations in ThoughtSpot. Requires ADMINISTRATION role and TENANT scope. The API endpoint allows publishing the following types of metadata objects: * Liveboards * Answers * Logical Tables This API will essentially share the objects along with it\'s dependencies to the org admins of the orgs to which it is being published. + * @param publishMetadataRequest + */ + publishMetadata(publishMetadataRequest, _options) { + return __async(this, null, function* () { + var _a, _b, _c; + let _config = _options || this.configuration; + if (publishMetadataRequest === null || publishMetadataRequest === void 0) { + throw new RequiredError("SecurityApi", "publishMetadata", "publishMetadataRequest"); + } + const localVarPath = "/api/rest/2.0/security/metadata/publish"; + const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.25.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.25.0"); + const contentType = ObjectSerializer.getPreferredMediaType([ + "application/json" + ]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = ObjectSerializer.stringify( + ObjectSerializer.serialize(publishMetadataRequest, "PublishMetadataRequest", ""), + contentType + ); + requestContext.setBody(serializedBody); + let authMethod; + authMethod = _config.authMethods["bearerAuth"]; + if (authMethod == null ? void 0 : authMethod.applySecurityAuthentication) { + yield authMethod == null ? void 0 : authMethod.applySecurityAuthentication(requestContext); + } + const defaultAuth = ((_a = _options == null ? void 0 : _options.authMethods) == null ? void 0 : _a.default) || ((_c = (_b = this.configuration) == null ? void 0 : _b.authMethods) == null ? void 0 : _c.default); + if (defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication) { + yield defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication(requestContext); + } + return requestContext; + }); + } + /** + * Version: 9.0.0.cl or later Allows sharing one or several metadata objects with users and groups in ThoughtSpot. Requires edit access to the metadata object. #### Supported metadata objects: * Liveboards * Visualizations * Answers * Models * Views * Connections * Collections #### Object permissions You can provide `READ_ONLY` or `MODIFY` access when sharing an object with another user or group. The `READ_ONLY` permission grants view access to the shared object, whereas `MODIFY` provides edit access. To prevent a user or group from accessing the shared object, specify the GUID or name of the principal and set `shareMode` to `NO_ACCESS`. #### Sharing a visualization * Sharing a visualization implicitly shares the entire Liveboard with the recipient. * Object permissions set for a shared visualization also apply to the Liveboard unless overridden by another API request or via UI. * If email notifications for object sharing are enabled, a notification with a link to the shared visualization will be sent to the recipient’s email address. Although this link opens the shared visualization, recipients can also access other visualizations in the Liveboard. #### Sharing a collection Collections support **dual permissions** that provide fine-grained control: * **Collection permissions** (`share_mode`) - controls access to the collection itself (view, edit, delete the collection) * **Content permissions** (`content_share_mode`) - controls access to objects within the collection (view, edit objects inside) **Default Behavior:** - If only `share_mode` is specified, the content permissions default to `READ_ONLY` (except when `share_mode` is `NO_ACCESS`, then content also gets `NO_ACCESS`) - To give users edit access to collection contents, explicitly set `content_share_mode: \"MODIFY\"` ## Examples The following JSON examples can be copy-pasted as request bodies for the REST v2 API endpoint: ```bash POST /callosum/v1/v2/security/metadata/share Content-Type: application/x-www-form-urlencoded ``` ### Basic collection sharing Share a collection with read-only access: ```json { \"metadata_type\": \"COLLECTION\", \"metadata_identifiers\": [\"Sales Reports Collection\"], \"permissions\": [{ \"principal\": { \"type\": \"USER\", \"identifier\": \"alice@company.com\" }, \"share_mode\": \"READ_ONLY\" }], \"notification\": { \"message\": \"I\'ve shared the Sales Reports collection with you\", \"notify_on_share\": true } } ``` ### Collection sharing with dual permissions Share a collection with different permissions for the collection vs. its contents: ```json { \"metadata_type\": \"COLLECTION\", \"metadata_identifiers\": [\"Marketing Analytics\"], \"permissions\": [{ \"principal\": { \"type\": \"USER\", \"identifier\": \"bob@company.com\" }, \"share_mode\": \"MODIFY\", \"content_share_mode\": \"READ_ONLY\" }, { \"principal\": { \"type\": \"USER_GROUP\", \"identifier\": \"Marketing Team\" }, \"share_mode\": \"READ_ONLY\", \"content_share_mode\": \"READ_ONLY\" }], \"notification\": { \"emails\": [\"bob@company.com\"], \"message\": \"You can edit the collection but content is read-only\", \"enable_custom_url\": false, \"notify_on_share\": true }, \"has_lenient_discoverability\": false } ``` ### Multiple collections sharing Share multiple collections with different users: ```json { \"metadata\": [ { \"type\": \"COLLECTION\", \"identifier\": \"Q4 Reports\" }, { \"type\": \"COLLECTION\", \"identifier\": \"Executive Dashboard Collection\" } ], \"permissions\": [{ \"principal\": { \"type\": \"USER_GROUP\", \"identifier\": \"Executives\" }, \"share_mode\": \"MODIFY\" }, { \"principal\": { \"type\": \"USER\", \"identifier\": \"manager@company.com\" }, \"share_mode\": \"READ_ONLY\", \"content_share_mode\": \"MODIFY\" }], \"notification\": { \"message\": \"Sharing quarterly collections with leadership team\", \"notify_on_share\": true } } ``` ### Remove collection access Remove access to a collection by setting share_mode to NO_ACCESS: ```json { \"metadata_type\": \"COLLECTION\", \"metadata_identifiers\": [\"Confidential Reports\"], \"permissions\": [{ \"principal\": { \"type\": \"USER\", \"identifier\": \"former-employee@company.com\" }, \"share_mode\": \"NO_ACCESS\" }], \"notification\": { \"notify_on_share\": false } } ``` ### Collection Permission Scenarios **Scenario 1: Collection Admin** - `share_mode: MODIFY` + `content_share_mode: MODIFY` = Full control over collection and its contents **Scenario 2: Collection Curator** - `share_mode: MODIFY` + `content_share_mode: READ_ONLY` = Can manage collection structure but not edit contents **Scenario 3: Content Editor** - `share_mode: READ_ONLY` + `content_share_mode: MODIFY` = Can edit objects within collection but can\'t change collection itself **Scenario 4: Viewer** - `share_mode: READ_ONLY` + `content_share_mode: READ_ONLY` = View-only access to collection and contents + * @param shareMetadataRequest + */ + shareMetadata(shareMetadataRequest, _options) { + return __async(this, null, function* () { + var _a, _b, _c; + let _config = _options || this.configuration; + if (shareMetadataRequest === null || shareMetadataRequest === void 0) { + throw new RequiredError("SecurityApi", "shareMetadata", "shareMetadataRequest"); + } + const localVarPath = "/api/rest/2.0/security/metadata/share"; + const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.25.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.25.0"); + const contentType = ObjectSerializer.getPreferredMediaType([ + "application/json" + ]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = ObjectSerializer.stringify( + ObjectSerializer.serialize(shareMetadataRequest, "ShareMetadataRequest", ""), + contentType + ); + requestContext.setBody(serializedBody); + let authMethod; + authMethod = _config.authMethods["bearerAuth"]; + if (authMethod == null ? void 0 : authMethod.applySecurityAuthentication) { + yield authMethod == null ? void 0 : authMethod.applySecurityAuthentication(requestContext); + } + const defaultAuth = ((_a = _options == null ? void 0 : _options.authMethods) == null ? void 0 : _a.default) || ((_c = (_b = this.configuration) == null ? void 0 : _b.authMethods) == null ? void 0 : _c.default); + if (defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication) { + yield defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication(requestContext); + } + return requestContext; + }); + } + /** + * Version: 26.5.0.cl or later Allows unpublishing metadata objects from organizations in ThoughtSpot. Requires ADMINISTRATION role and TENANT scope. The API endpoint allows unpublishing the following types of metadata objects: * Liveboards * Answers * Logical Tables When unpublishing objects, you can: * Include dependencies by setting `include_dependencies` to true - this will unpublish all dependent objects if no other published object is using them * Force unpublish by setting `force` to true - this will break all dependent objects in the unpublished organizations + * @param unpublishMetadataRequest + */ + unpublishMetadata(unpublishMetadataRequest, _options) { + return __async(this, null, function* () { + var _a, _b, _c; + let _config = _options || this.configuration; + if (unpublishMetadataRequest === null || unpublishMetadataRequest === void 0) { + throw new RequiredError("SecurityApi", "unpublishMetadata", "unpublishMetadataRequest"); + } + const localVarPath = "/api/rest/2.0/security/metadata/unpublish"; + const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.25.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.25.0"); + const contentType = ObjectSerializer.getPreferredMediaType([ + "application/json" + ]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = ObjectSerializer.stringify( + ObjectSerializer.serialize(unpublishMetadataRequest, "UnpublishMetadataRequest", ""), + contentType + ); + requestContext.setBody(serializedBody); + let authMethod; + authMethod = _config.authMethods["bearerAuth"]; + if (authMethod == null ? void 0 : authMethod.applySecurityAuthentication) { + yield authMethod == null ? void 0 : authMethod.applySecurityAuthentication(requestContext); + } + const defaultAuth = ((_a = _options == null ? void 0 : _options.authMethods) == null ? void 0 : _a.default) || ((_c = (_b = this.configuration) == null ? void 0 : _b.authMethods) == null ? void 0 : _c.default); + if (defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication) { + yield defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication(requestContext); + } + return requestContext; + }); + } + /** + * Version: 10.12.0.cl or later Creates, updates, or deletes column security rules for specified tables. This API endpoint allows you to create, update, or delete column-level security rules on columns of a table. The operation follows an \"all or none\" policy: if defining security rules for any of the provided columns fails, the entire operation will be rolled back, and no rules will be created. #### Usage guidelines - Provide table identifier using either `identifier` (GUID or name) or `obj_identifier` (object ID) - Use `clear_csr: true` to remove all column security rules from the table - For each column, specify the security rule using `column_security_rules` array - Use `is_unsecured: true` to mark a specific column as unprotected - Use `group_access` operations to manage group associations: - `ADD`: Add groups to the column\'s access list - `REMOVE`: Remove groups from the column\'s access list - `REPLACE`: Replace all existing groups with the specified groups #### Required permissions - `ADMINISTRATION` - Can administer ThoughtSpot - `DATAMANAGEMENT` - Can manage data (if RBAC is disabled) - `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` - Can manage worksheet views and tables (if RBAC is enabled) #### Example request ```json { \"identifier\": \"table-guid\", \"obj_identifier\": \"table-object-id\", \"clear_csr\": false, \"column_security_rules\": [ { \"column_identifier\": \"col id or col name\", \"is_unsecured\": false, \"group_access\": [ { \"operation\": \"ADD\", \"group_identifiers\": [\"hr_group_id\", \"hr_group_name\", \"finance_group_id\"] } ] }, { \"column_identifier\": \"col id or col name\", \"is_unsecured\": true }, { \"column_identifier\": \"col id or col name\", \"is_unsecured\": false, \"group_access\": [ { \"operation\": \"REPLACE\", \"group_identifiers\": [\"management_group_id\", \"management_group_name\"] } ] } ] } ``` #### Request Body Schema - `identifier` (string, optional): GUID or name of the table for which we want to create column security rules - `obj_identifier` (string, optional): The object ID of the table - `clear_csr` (boolean, optional): If true, then all the secured columns will be marked as unprotected, and all the group associations will be removed - `column_security_rules` (array of objects, required): An array where each object defines the security rule for a specific column Each column security rule object contains: - `column_identifier` (string, required): Column identifier (col_id or name) - `is_unsecured` (boolean, optional): If true, the column will be marked as unprotected and all groups associated with it will be removed - `group_access` (array of objects, optional): Array of group operation objects Each group operation object contains: - `operation` (string, required): Operation type - ADD, REMOVE, or REPLACE - `group_identifiers` (array of strings, required): Array of group identifiers (name or GUID) on which the operation will be performed #### Response This API does not return any response body. A successful operation returns HTTP 200 status code. #### Operation Types - **ADD**: Adds the specified groups to the column\'s access list - **REMOVE**: Removes the specified groups from the column\'s access list - **REPLACE**: Replaces all existing groups with the specified groups + * @param updateColumnSecurityRulesRequest + */ + updateColumnSecurityRules(updateColumnSecurityRulesRequest, _options) { + return __async(this, null, function* () { + var _a, _b, _c; + let _config = _options || this.configuration; + if (updateColumnSecurityRulesRequest === null || updateColumnSecurityRulesRequest === void 0) { + throw new RequiredError("SecurityApi", "updateColumnSecurityRules", "updateColumnSecurityRulesRequest"); + } + const localVarPath = "/api/rest/2.0/security/column/rules/update"; + const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.25.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.25.0"); + const contentType = ObjectSerializer.getPreferredMediaType([ + "application/json" + ]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = ObjectSerializer.stringify( + ObjectSerializer.serialize(updateColumnSecurityRulesRequest, "UpdateColumnSecurityRulesRequest", ""), + contentType + ); + requestContext.setBody(serializedBody); + let authMethod; + authMethod = _config.authMethods["bearerAuth"]; + if (authMethod == null ? void 0 : authMethod.applySecurityAuthentication) { + yield authMethod == null ? void 0 : authMethod.applySecurityAuthentication(requestContext); + } + const defaultAuth = ((_a = _options == null ? void 0 : _options.authMethods) == null ? void 0 : _a.default) || ((_c = (_b = this.configuration) == null ? void 0 : _b.authMethods) == null ? void 0 : _c.default); + if (defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication) { + yield defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication(requestContext); + } + return requestContext; + }); + } +}; +var SecurityApiResponseProcessor = class { + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to assignChangeAuthor + * @throws ApiException if the response code was not in [200, 299] + */ + assignChangeAuthor(response) { + return __async(this, null, function* () { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("204", response.httpStatusCode)) { + return; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Invalid request.", body, response.headers); + } + if (isCodeInRange("401", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unexpected error", body, response.headers); + } + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "void", + "" + ); + return body; + } + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", yield response.getBodyAsAny(), response.headers); + }); + } + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to fetchColumnSecurityRules + * @throws ApiException if the response code was not in [200, 299] + */ + fetchColumnSecurityRules(response) { + return __async(this, null, function* () { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("200", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "Array", + "" + ); + return body; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Bad request - Table not found or invalid parameters", body, response.headers); + } + if (isCodeInRange("401", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Forbidden - User doesn't have permission to access security rules for this table", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Internal server error", body, response.headers); + } + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "Array", + "" + ); + return body; + } + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", yield response.getBodyAsAny(), response.headers); + }); + } + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to fetchObjectPrivileges + * @throws ApiException if the response code was not in [200, 299] + */ + fetchObjectPrivileges(response) { + return __async(this, null, function* () { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("200", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ObjectPrivilegesOfMetadataResponse", + "" + ); + return body; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Invalid request.", body, response.headers); + } + if (isCodeInRange("401", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unexpected error", body, response.headers); + } + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ObjectPrivilegesOfMetadataResponse", + "" + ); + return body; + } + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", yield response.getBodyAsAny(), response.headers); + }); + } + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to fetchPermissionsOfPrincipals + * @throws ApiException if the response code was not in [200, 299] + */ + fetchPermissionsOfPrincipals(response) { + return __async(this, null, function* () { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("200", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "PermissionOfPrincipalsResponse", + "" + ); + return body; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Invalid request.", body, response.headers); + } + if (isCodeInRange("401", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unexpected error", body, response.headers); + } + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "PermissionOfPrincipalsResponse", + "" + ); + return body; + } + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", yield response.getBodyAsAny(), response.headers); + }); + } + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to fetchPermissionsOnMetadata + * @throws ApiException if the response code was not in [200, 299] + */ + fetchPermissionsOnMetadata(response) { + return __async(this, null, function* () { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("200", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "PermissionOfMetadataResponse", + "" + ); + return body; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Invalid request.", body, response.headers); + } + if (isCodeInRange("401", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unexpected error", body, response.headers); + } + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "PermissionOfMetadataResponse", + "" + ); + return body; + } + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", yield response.getBodyAsAny(), response.headers); + }); + } + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to manageObjectPrivilege + * @throws ApiException if the response code was not in [200, 299] + */ + manageObjectPrivilege(response) { + return __async(this, null, function* () { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("204", response.httpStatusCode)) { + return; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Invalid request", body, response.headers); + } + if (isCodeInRange("401", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unauthorized access", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Forbidden access", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unexpected error", body, response.headers); + } + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "void", + "" + ); + return body; + } + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", yield response.getBodyAsAny(), response.headers); + }); + } + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to publishMetadata + * @throws ApiException if the response code was not in [200, 299] + */ + publishMetadata(response) { + return __async(this, null, function* () { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("204", response.httpStatusCode)) { + return; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Invalid request.", body, response.headers); + } + if (isCodeInRange("401", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unexpected error", body, response.headers); + } + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "void", + "" + ); + return body; + } + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", yield response.getBodyAsAny(), response.headers); + }); + } + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to shareMetadata + * @throws ApiException if the response code was not in [200, 299] + */ + shareMetadata(response) { + return __async(this, null, function* () { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("204", response.httpStatusCode)) { + return; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Invalid request.", body, response.headers); + } + if (isCodeInRange("401", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unexpected error", body, response.headers); + } + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "void", + "" + ); + return body; + } + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", yield response.getBodyAsAny(), response.headers); + }); + } + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to unpublishMetadata + * @throws ApiException if the response code was not in [200, 299] + */ + unpublishMetadata(response) { + return __async(this, null, function* () { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("204", response.httpStatusCode)) { + return; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Invalid request.", body, response.headers); + } + if (isCodeInRange("401", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unexpected error", body, response.headers); + } + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "void", + "" + ); + return body; + } + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", yield response.getBodyAsAny(), response.headers); + }); + } + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to updateColumnSecurityRules + * @throws ApiException if the response code was not in [200, 299] + */ + updateColumnSecurityRules(response) { + return __async(this, null, function* () { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("204", response.httpStatusCode)) { + return; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Bad request - Invalid parameters or table not found", body, response.headers); + } + if (isCodeInRange("401", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Forbidden - User doesn't have permission to modify security rules for this table", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Internal server error", body, response.headers); + } + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "void", + "" + ); + return body; + } + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", yield response.getBodyAsAny(), response.headers); + }); + } +}; + +// apis/SystemApi.ts +var SystemApiRequestFactory = class extends BaseAPIRequestFactory { + /** + * Version: 10.14.0.cl or later Configure communication channel preferences. - Use `cluster_preferences` to update the default preferences for your ThoughtSpot application instance. - If your instance has [Orgs](https://docs.thoughtspot.com/cloud/latest/orgs-overview), use `org_preferences` to specify Org-specific preferences that override the defaults. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) or `DEVELOPER` (**Has developer privilege**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, users with `APPLICATION_ADMINISTRATION` (**Can manage application settings**) privilege are also authorized to perform this action. + * @param configureCommunicationChannelPreferencesRequest + */ + configureCommunicationChannelPreferences(configureCommunicationChannelPreferencesRequest, _options) { + return __async(this, null, function* () { + var _a, _b, _c; + let _config = _options || this.configuration; + if (configureCommunicationChannelPreferencesRequest === null || configureCommunicationChannelPreferencesRequest === void 0) { + throw new RequiredError("SystemApi", "configureCommunicationChannelPreferences", "configureCommunicationChannelPreferencesRequest"); + } + const localVarPath = "/api/rest/2.0/system/preferences/communication-channels/configure"; + const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.25.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.25.0"); + const contentType = ObjectSerializer.getPreferredMediaType([ + "application/json" + ]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = ObjectSerializer.stringify( + ObjectSerializer.serialize(configureCommunicationChannelPreferencesRequest, "ConfigureCommunicationChannelPreferencesRequest", ""), + contentType + ); + requestContext.setBody(serializedBody); + let authMethod; + authMethod = _config.authMethods["bearerAuth"]; + if (authMethod == null ? void 0 : authMethod.applySecurityAuthentication) { + yield authMethod == null ? void 0 : authMethod.applySecurityAuthentication(requestContext); + } + const defaultAuth = ((_a = _options == null ? void 0 : _options.authMethods) == null ? void 0 : _a.default) || ((_c = (_b = this.configuration) == null ? void 0 : _b.authMethods) == null ? void 0 : _c.default); + if (defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication) { + yield defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication(requestContext); + } + return requestContext; + }); + } + /** + * Version: 26.2.0.cl or later Configure security settings for your ThoughtSpot application instance. - Use `cluster_preferences` to update cluster-level security settings including CORS whitelisted URLs, CSP settings, SAML redirect URLs, partitioned cookies, and non-embed access configuration. - Use `org_preferences` to configure Org-specific security settings. If your instance has [Orgs](https://docs.thoughtspot.com/cloud/latest/orgs-overview), this allows configuring CORS and non-embed access settings specific to the Org. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) or `DEVELOPER` (**Has developer privilege**) privilege. Cluster-level SAML and script-src settings require `ADMINISTRATION` privilege. See [Security Settings](https://developers.thoughtspot.com/docs/security-settings) for more details. + * @param configureSecuritySettingsRequest + */ + configureSecuritySettings(configureSecuritySettingsRequest, _options) { + return __async(this, null, function* () { + var _a, _b, _c; + let _config = _options || this.configuration; + if (configureSecuritySettingsRequest === null || configureSecuritySettingsRequest === void 0) { + throw new RequiredError("SystemApi", "configureSecuritySettings", "configureSecuritySettingsRequest"); + } + const localVarPath = "/api/rest/2.0/system/security-settings/configure"; + const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.25.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.25.0"); + const contentType = ObjectSerializer.getPreferredMediaType([ + "application/json" + ]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = ObjectSerializer.stringify( + ObjectSerializer.serialize(configureSecuritySettingsRequest, "ConfigureSecuritySettingsRequest", ""), + contentType + ); + requestContext.setBody(serializedBody); + let authMethod; + authMethod = _config.authMethods["bearerAuth"]; + if (authMethod == null ? void 0 : authMethod.applySecurityAuthentication) { + yield authMethod == null ? void 0 : authMethod.applySecurityAuthentication(requestContext); + } + const defaultAuth = ((_a = _options == null ? void 0 : _options.authMethods) == null ? void 0 : _a.default) || ((_c = (_b = this.configuration) == null ? void 0 : _b.authMethods) == null ? void 0 : _c.default); + if (defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication) { + yield defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication(requestContext); + } + return requestContext; + }); + } + /** + * Version: 9.0.0.cl or later Retrieves the current configuration details of the cluster. If the request is successful, the API returns a list configuration settings applied on the cluster. Requires `ADMINISTRATION`(**Can administer ThoughtSpot**) privilege to view these complete configuration settings of the cluster. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `SYSTEM_INFO_ADMINISTRATION` (**Can view system activities**) privilege is required. This API does not require any parameters to be passed in the request. + */ + getSystemConfig(_options) { + return __async(this, null, function* () { + var _a, _b, _c; + let _config = _options || this.configuration; + const localVarPath = "/api/rest/2.0/system/config"; + const requestContext = _config.baseServer.makeRequestContext(localVarPath, "GET" /* GET */); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.25.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.25.0"); + let authMethod; + authMethod = _config.authMethods["bearerAuth"]; + if (authMethod == null ? void 0 : authMethod.applySecurityAuthentication) { + yield authMethod == null ? void 0 : authMethod.applySecurityAuthentication(requestContext); + } + const defaultAuth = ((_a = _options == null ? void 0 : _options.authMethods) == null ? void 0 : _a.default) || ((_c = (_b = this.configuration) == null ? void 0 : _b.authMethods) == null ? void 0 : _c.default); + if (defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication) { + yield defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication(requestContext); + } + return requestContext; + }); + } + /** + * Version: 9.0.0.cl or later Gets system information such as the release version, locale, time zone, deployment environment, date format, and date time format of the cluster. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privileges. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `SYSTEM_INFO_ADMINISTRATION` (**Can view system activities**) privilege is required. This API does not require any parameters to be passed in the request. + */ + getSystemInformation(_options) { + return __async(this, null, function* () { + var _a, _b, _c; + let _config = _options || this.configuration; + const localVarPath = "/api/rest/2.0/system"; + const requestContext = _config.baseServer.makeRequestContext(localVarPath, "GET" /* GET */); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.25.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.25.0"); + let authMethod; + authMethod = _config.authMethods["bearerAuth"]; + if (authMethod == null ? void 0 : authMethod.applySecurityAuthentication) { + yield authMethod == null ? void 0 : authMethod.applySecurityAuthentication(requestContext); + } + const defaultAuth = ((_a = _options == null ? void 0 : _options.authMethods) == null ? void 0 : _a.default) || ((_c = (_b = this.configuration) == null ? void 0 : _b.authMethods) == null ? void 0 : _c.default); + if (defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication) { + yield defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication(requestContext); + } + return requestContext; + }); + } + /** + * Version: 9.2.0.cl or later Gets a list of configuration overrides applied on the cluster. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `APPLICATION_ADMINISTRATION` (**Can manage application settings**) privilege is required. This API does not require any parameters to be passed in the request. + */ + getSystemOverrideInfo(_options) { + return __async(this, null, function* () { + var _a, _b, _c; + let _config = _options || this.configuration; + const localVarPath = "/api/rest/2.0/system/config-overrides"; + const requestContext = _config.baseServer.makeRequestContext(localVarPath, "GET" /* GET */); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.25.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.25.0"); + let authMethod; + authMethod = _config.authMethods["bearerAuth"]; + if (authMethod == null ? void 0 : authMethod.applySecurityAuthentication) { + yield authMethod == null ? void 0 : authMethod.applySecurityAuthentication(requestContext); + } + const defaultAuth = ((_a = _options == null ? void 0 : _options.authMethods) == null ? void 0 : _a.default) || ((_c = (_b = this.configuration) == null ? void 0 : _b.authMethods) == null ? void 0 : _c.default); + if (defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication) { + yield defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication(requestContext); + } + return requestContext; + }); + } + /** + * Version: 10.14.0.cl or later Fetch communication channel preferences. - Use `cluster_preferences` to fetch the default preferences for your ThoughtSpot application instance. - If your instance has [Orgs](https://docs.thoughtspot.com/cloud/latest/orgs-overview), use `org_preferences` to fetch any Org-specific preferences that override the defaults. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) or `DEVELOPER` (**Has developer privilege**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, users with `APPLICATION_ADMINISTRATION` (**Can manage application settings**) privilege are also authorized to perform this action. + * @param searchCommunicationChannelPreferencesRequest + */ + searchCommunicationChannelPreferences(searchCommunicationChannelPreferencesRequest, _options) { + return __async(this, null, function* () { + var _a, _b, _c; + let _config = _options || this.configuration; + if (searchCommunicationChannelPreferencesRequest === null || searchCommunicationChannelPreferencesRequest === void 0) { + throw new RequiredError("SystemApi", "searchCommunicationChannelPreferences", "searchCommunicationChannelPreferencesRequest"); + } + const localVarPath = "/api/rest/2.0/system/preferences/communication-channels/search"; + const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.25.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.25.0"); + const contentType = ObjectSerializer.getPreferredMediaType([ + "application/json" + ]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = ObjectSerializer.stringify( + ObjectSerializer.serialize(searchCommunicationChannelPreferencesRequest, "SearchCommunicationChannelPreferencesRequest", ""), + contentType + ); + requestContext.setBody(serializedBody); + let authMethod; + authMethod = _config.authMethods["bearerAuth"]; + if (authMethod == null ? void 0 : authMethod.applySecurityAuthentication) { + yield authMethod == null ? void 0 : authMethod.applySecurityAuthentication(requestContext); + } + const defaultAuth = ((_a = _options == null ? void 0 : _options.authMethods) == null ? void 0 : _a.default) || ((_c = (_b = this.configuration) == null ? void 0 : _b.authMethods) == null ? void 0 : _c.default); + if (defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication) { + yield defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication(requestContext); + } + return requestContext; + }); + } + /** + * Version: 26.2.0.cl or later Fetch security settings for your ThoughtSpot application instance. - Use `scope: CLUSTER` to retrieve cluster-level security settings, including CORS and CSP allowlists, SAML redirect URLs, and settings that control access to non-embedded pages. - Use `scope: ORG` to retrieve Org-level security settings. If your instance has [Orgs](https://docs.thoughtspot.com/cloud/latest/orgs-overview), this returns CORS and non-embed access settings specific to the Org. - If `scope` is not specified, returns both cluster and Org-specific settings based on user privileges. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) or `DEVELOPER` (**Has developer privilege**) privilege. See [Security Settings](https://developers.thoughtspot.com/docs/security-settings) for more details. + * @param searchSecuritySettingsRequest + */ + searchSecuritySettings(searchSecuritySettingsRequest, _options) { + return __async(this, null, function* () { + var _a, _b, _c; + let _config = _options || this.configuration; + if (searchSecuritySettingsRequest === null || searchSecuritySettingsRequest === void 0) { + throw new RequiredError("SystemApi", "searchSecuritySettings", "searchSecuritySettingsRequest"); + } + const localVarPath = "/api/rest/2.0/system/security-settings/search"; + const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.25.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.25.0"); + const contentType = ObjectSerializer.getPreferredMediaType([ + "application/json" + ]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = ObjectSerializer.stringify( + ObjectSerializer.serialize(searchSecuritySettingsRequest, "SearchSecuritySettingsRequest", ""), + contentType + ); + requestContext.setBody(serializedBody); + let authMethod; + authMethod = _config.authMethods["bearerAuth"]; + if (authMethod == null ? void 0 : authMethod.applySecurityAuthentication) { + yield authMethod == null ? void 0 : authMethod.applySecurityAuthentication(requestContext); + } + const defaultAuth = ((_a = _options == null ? void 0 : _options.authMethods) == null ? void 0 : _a.default) || ((_c = (_b = this.configuration) == null ? void 0 : _b.authMethods) == null ? void 0 : _c.default); + if (defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication) { + yield defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication(requestContext); + } + return requestContext; + }); + } + /** + * Version: 9.2.0.cl or later Updates the current configuration of the cluster. You must send the configuration data in JSON format. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privileges. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `APPLICATION_ADMINISTRATION` (**Can manage application settings**) privilege is required. + * @param updateSystemConfigRequest + */ + updateSystemConfig(updateSystemConfigRequest, _options) { + return __async(this, null, function* () { + var _a, _b, _c; + let _config = _options || this.configuration; + if (updateSystemConfigRequest === null || updateSystemConfigRequest === void 0) { + throw new RequiredError("SystemApi", "updateSystemConfig", "updateSystemConfigRequest"); + } + const localVarPath = "/api/rest/2.0/system/config-update"; + const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.25.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.25.0"); + const contentType = ObjectSerializer.getPreferredMediaType([ + "application/json" + ]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = ObjectSerializer.stringify( + ObjectSerializer.serialize(updateSystemConfigRequest, "UpdateSystemConfigRequest", ""), + contentType + ); + requestContext.setBody(serializedBody); + let authMethod; + authMethod = _config.authMethods["bearerAuth"]; + if (authMethod == null ? void 0 : authMethod.applySecurityAuthentication) { + yield authMethod == null ? void 0 : authMethod.applySecurityAuthentication(requestContext); + } + const defaultAuth = ((_a = _options == null ? void 0 : _options.authMethods) == null ? void 0 : _a.default) || ((_c = (_b = this.configuration) == null ? void 0 : _b.authMethods) == null ? void 0 : _c.default); + if (defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication) { + yield defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication(requestContext); + } + return requestContext; + }); + } + /** + * Version: 26.4.0.cl or later Validates a communication channel configuration to ensure it is properly set up and can receive events. - Use `channel_type` to specify the type of communication channel to validate (e.g., WEBHOOK). - Use `channel_identifier` to provide the unique identifier or name for the communication channel. - Use `event_type` to specify the event type to validate for this channel. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) or `DEVELOPER` (**Has developer privilege**) privilege. For webhook channels, users with `CAN_MANAGE_WEBHOOKS` (**Can manage webhooks**) privilege are also authorized to perform this action. + * @param validateCommunicationChannelRequest + */ + validateCommunicationChannel(validateCommunicationChannelRequest, _options) { + return __async(this, null, function* () { + var _a, _b, _c; + let _config = _options || this.configuration; + if (validateCommunicationChannelRequest === null || validateCommunicationChannelRequest === void 0) { + throw new RequiredError("SystemApi", "validateCommunicationChannel", "validateCommunicationChannelRequest"); + } + const localVarPath = "/api/rest/2.0/system/communication-channels/validate"; + const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.25.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.25.0"); + const contentType = ObjectSerializer.getPreferredMediaType([ + "application/json" + ]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = ObjectSerializer.stringify( + ObjectSerializer.serialize(validateCommunicationChannelRequest, "ValidateCommunicationChannelRequest", ""), + contentType + ); + requestContext.setBody(serializedBody); + let authMethod; + authMethod = _config.authMethods["bearerAuth"]; + if (authMethod == null ? void 0 : authMethod.applySecurityAuthentication) { + yield authMethod == null ? void 0 : authMethod.applySecurityAuthentication(requestContext); + } + const defaultAuth = ((_a = _options == null ? void 0 : _options.authMethods) == null ? void 0 : _a.default) || ((_c = (_b = this.configuration) == null ? void 0 : _b.authMethods) == null ? void 0 : _c.default); + if (defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication) { + yield defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication(requestContext); + } + return requestContext; + }); + } +}; +var SystemApiResponseProcessor = class { + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to configureCommunicationChannelPreferences + * @throws ApiException if the response code was not in [200, 299] + */ + configureCommunicationChannelPreferences(response) { + return __async(this, null, function* () { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("204", response.httpStatusCode)) { + return; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Invalid request.", body, response.headers); + } + if (isCodeInRange("401", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unexpected error", body, response.headers); + } + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "void", + "" + ); + return body; + } + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", yield response.getBodyAsAny(), response.headers); + }); + } + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to configureSecuritySettings + * @throws ApiException if the response code was not in [200, 299] + */ + configureSecuritySettings(response) { + return __async(this, null, function* () { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("204", response.httpStatusCode)) { + return; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Invalid request.", body, response.headers); + } + if (isCodeInRange("401", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unexpected error", body, response.headers); + } + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "void", + "" + ); + return body; + } + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", yield response.getBodyAsAny(), response.headers); + }); + } + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to getSystemConfig + * @throws ApiException if the response code was not in [200, 299] + */ + getSystemConfig(response) { + return __async(this, null, function* () { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("200", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "SystemConfig", + "" + ); + return body; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Invalid request.", body, response.headers); + } + if (isCodeInRange("401", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unexpected error", body, response.headers); + } + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "SystemConfig", + "" + ); + return body; + } + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", yield response.getBodyAsAny(), response.headers); + }); + } + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to getSystemInformation + * @throws ApiException if the response code was not in [200, 299] + */ + getSystemInformation(response) { + return __async(this, null, function* () { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("200", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "SystemInfo", + "" + ); + return body; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Invalid request.", body, response.headers); + } + if (isCodeInRange("401", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unexpected error", body, response.headers); + } + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "SystemInfo", + "" + ); + return body; + } + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", yield response.getBodyAsAny(), response.headers); + }); + } + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to getSystemOverrideInfo + * @throws ApiException if the response code was not in [200, 299] + */ + getSystemOverrideInfo(response) { + return __async(this, null, function* () { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("200", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "SystemOverrideInfo", + "" + ); + return body; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Invalid request.", body, response.headers); + } + if (isCodeInRange("401", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unexpected error", body, response.headers); + } + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "SystemOverrideInfo", + "" + ); + return body; + } + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", yield response.getBodyAsAny(), response.headers); + }); + } + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to searchCommunicationChannelPreferences + * @throws ApiException if the response code was not in [200, 299] + */ + searchCommunicationChannelPreferences(response) { + return __async(this, null, function* () { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("200", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "CommunicationChannelPreferencesResponse", + "" + ); + return body; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Invalid request.", body, response.headers); + } + if (isCodeInRange("401", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unexpected error", body, response.headers); + } + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "CommunicationChannelPreferencesResponse", + "" + ); + return body; + } + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", yield response.getBodyAsAny(), response.headers); + }); + } + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to searchSecuritySettings + * @throws ApiException if the response code was not in [200, 299] + */ + searchSecuritySettings(response) { + return __async(this, null, function* () { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("200", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "SecuritySettingsResponse", + "" + ); + return body; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Invalid request.", body, response.headers); + } + if (isCodeInRange("401", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unexpected error", body, response.headers); + } + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "SecuritySettingsResponse", + "" + ); + return body; + } + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", yield response.getBodyAsAny(), response.headers); + }); + } + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to updateSystemConfig + * @throws ApiException if the response code was not in [200, 299] + */ + updateSystemConfig(response) { + return __async(this, null, function* () { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("204", response.httpStatusCode)) { + return; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Invalid request.", body, response.headers); + } + if (isCodeInRange("401", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unexpected error", body, response.headers); + } + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "void", + "" + ); + return body; + } + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", yield response.getBodyAsAny(), response.headers); + }); + } + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to validateCommunicationChannel + * @throws ApiException if the response code was not in [200, 299] + */ + validateCommunicationChannel(response) { + return __async(this, null, function* () { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("200", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "CommunicationChannelValidateResponse", + "" + ); + return body; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Invalid request.", body, response.headers); + } + if (isCodeInRange("401", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unexpected error", body, response.headers); + } + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "CommunicationChannelValidateResponse", + "" + ); + return body; + } + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", yield response.getBodyAsAny(), response.headers); + }); + } +}; + +// apis/TagsApi.ts +var TagsApiRequestFactory = class extends BaseAPIRequestFactory { + /** + * Version: 9.0.0.cl or later Assigns tags to Liveboards, Answers, Tables, and Worksheets. Requires edit access to the metadata object. + * @param assignTagRequest + */ + assignTag(assignTagRequest, _options) { + return __async(this, null, function* () { + var _a, _b, _c; + let _config = _options || this.configuration; + if (assignTagRequest === null || assignTagRequest === void 0) { + throw new RequiredError("TagsApi", "assignTag", "assignTagRequest"); + } + const localVarPath = "/api/rest/2.0/tags/assign"; + const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.25.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.25.0"); + const contentType = ObjectSerializer.getPreferredMediaType([ + "application/json" + ]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = ObjectSerializer.stringify( + ObjectSerializer.serialize(assignTagRequest, "AssignTagRequest", ""), + contentType + ); + requestContext.setBody(serializedBody); + let authMethod; + authMethod = _config.authMethods["bearerAuth"]; + if (authMethod == null ? void 0 : authMethod.applySecurityAuthentication) { + yield authMethod == null ? void 0 : authMethod.applySecurityAuthentication(requestContext); + } + const defaultAuth = ((_a = _options == null ? void 0 : _options.authMethods) == null ? void 0 : _a.default) || ((_c = (_b = this.configuration) == null ? void 0 : _b.authMethods) == null ? void 0 : _c.default); + if (defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication) { + yield defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication(requestContext); + } + return requestContext; + }); + } + /** + * Version: 9.0.0.cl or later Creates a tag object. Tags are labels that identify a metadata object. For example, you can create a tag to designate subject areas, such as sales, HR, marketing, and finance. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `TAGMANAGEMENT` (**Can manage tags**) privilege is required to create, edit, and delete tags. + * @param createTagRequest + */ + createTag(createTagRequest, _options) { + return __async(this, null, function* () { + var _a, _b, _c; + let _config = _options || this.configuration; + if (createTagRequest === null || createTagRequest === void 0) { + throw new RequiredError("TagsApi", "createTag", "createTagRequest"); + } + const localVarPath = "/api/rest/2.0/tags/create"; + const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.25.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.25.0"); + const contentType = ObjectSerializer.getPreferredMediaType([ + "application/json" + ]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = ObjectSerializer.stringify( + ObjectSerializer.serialize(createTagRequest, "CreateTagRequest", ""), + contentType + ); + requestContext.setBody(serializedBody); + let authMethod; + authMethod = _config.authMethods["bearerAuth"]; + if (authMethod == null ? void 0 : authMethod.applySecurityAuthentication) { + yield authMethod == null ? void 0 : authMethod.applySecurityAuthentication(requestContext); + } + const defaultAuth = ((_a = _options == null ? void 0 : _options.authMethods) == null ? void 0 : _a.default) || ((_c = (_b = this.configuration) == null ? void 0 : _b.authMethods) == null ? void 0 : _c.default); + if (defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication) { + yield defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication(requestContext); + } + return requestContext; + }); + } + /** + * Version: 9.0.0.cl or later Deletes a tag object from the ThoughtSpot system Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `TAGMANAGEMENT` (**Can manage tags**) privilege is required to create, edit, and delete tags. + * @param tagIdentifier Tag identifier Tag name or Tag id. + */ + deleteTag(tagIdentifier, _options) { + return __async(this, null, function* () { + var _a, _b, _c; + let _config = _options || this.configuration; + if (tagIdentifier === null || tagIdentifier === void 0) { + throw new RequiredError("TagsApi", "deleteTag", "tagIdentifier"); + } + const localVarPath = "/api/rest/2.0/tags/{tag_identifier}/delete".replace("{tag_identifier}", encodeURIComponent(String(tagIdentifier))); + const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.25.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.25.0"); + let authMethod; + authMethod = _config.authMethods["bearerAuth"]; + if (authMethod == null ? void 0 : authMethod.applySecurityAuthentication) { + yield authMethod == null ? void 0 : authMethod.applySecurityAuthentication(requestContext); + } + const defaultAuth = ((_a = _options == null ? void 0 : _options.authMethods) == null ? void 0 : _a.default) || ((_c = (_b = this.configuration) == null ? void 0 : _b.authMethods) == null ? void 0 : _c.default); + if (defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication) { + yield defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication(requestContext); + } + return requestContext; + }); + } + /** + * Version: 9.0.0.cl or later Gets a list of tag objects available on the ThoughtSpot system. To get details of a specific tag object, specify the GUID or name. Any authenticated user can search for tag objects. + * @param searchTagsRequest + */ + searchTags(searchTagsRequest, _options) { + return __async(this, null, function* () { + var _a, _b, _c; + let _config = _options || this.configuration; + if (searchTagsRequest === null || searchTagsRequest === void 0) { + throw new RequiredError("TagsApi", "searchTags", "searchTagsRequest"); + } + const localVarPath = "/api/rest/2.0/tags/search"; + const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.25.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.25.0"); + const contentType = ObjectSerializer.getPreferredMediaType([ + "application/json" + ]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = ObjectSerializer.stringify( + ObjectSerializer.serialize(searchTagsRequest, "SearchTagsRequest", ""), + contentType + ); + requestContext.setBody(serializedBody); + let authMethod; + authMethod = _config.authMethods["bearerAuth"]; + if (authMethod == null ? void 0 : authMethod.applySecurityAuthentication) { + yield authMethod == null ? void 0 : authMethod.applySecurityAuthentication(requestContext); + } + const defaultAuth = ((_a = _options == null ? void 0 : _options.authMethods) == null ? void 0 : _a.default) || ((_c = (_b = this.configuration) == null ? void 0 : _b.authMethods) == null ? void 0 : _c.default); + if (defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication) { + yield defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication(requestContext); + } + return requestContext; + }); + } + /** + * Version: 9.0.0.cl or later Removes the tags applied to a Liveboard, Answer, Table, or Worksheet. Requires edit access to the metadata object. + * @param unassignTagRequest + */ + unassignTag(unassignTagRequest, _options) { + return __async(this, null, function* () { + var _a, _b, _c; + let _config = _options || this.configuration; + if (unassignTagRequest === null || unassignTagRequest === void 0) { + throw new RequiredError("TagsApi", "unassignTag", "unassignTagRequest"); + } + const localVarPath = "/api/rest/2.0/tags/unassign"; + const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.25.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.25.0"); + const contentType = ObjectSerializer.getPreferredMediaType([ + "application/json" + ]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = ObjectSerializer.stringify( + ObjectSerializer.serialize(unassignTagRequest, "UnassignTagRequest", ""), + contentType + ); + requestContext.setBody(serializedBody); + let authMethod; + authMethod = _config.authMethods["bearerAuth"]; + if (authMethod == null ? void 0 : authMethod.applySecurityAuthentication) { + yield authMethod == null ? void 0 : authMethod.applySecurityAuthentication(requestContext); + } + const defaultAuth = ((_a = _options == null ? void 0 : _options.authMethods) == null ? void 0 : _a.default) || ((_c = (_b = this.configuration) == null ? void 0 : _b.authMethods) == null ? void 0 : _c.default); + if (defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication) { + yield defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication(requestContext); + } + return requestContext; + }); + } + /** + * Version: 9.0.0.cl or later Updates a tag object. You can modify the `name` and `color` properties of a tag object. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `TAGMANAGEMENT` (**Can manage tags**) privilege is required to create, edit, and delete tags. + * @param tagIdentifier Name or Id of the tag. + * @param updateTagRequest + */ + updateTag(tagIdentifier, updateTagRequest, _options) { + return __async(this, null, function* () { + var _a, _b, _c; + let _config = _options || this.configuration; + if (tagIdentifier === null || tagIdentifier === void 0) { + throw new RequiredError("TagsApi", "updateTag", "tagIdentifier"); + } + if (updateTagRequest === null || updateTagRequest === void 0) { + throw new RequiredError("TagsApi", "updateTag", "updateTagRequest"); + } + const localVarPath = "/api/rest/2.0/tags/{tag_identifier}/update".replace("{tag_identifier}", encodeURIComponent(String(tagIdentifier))); + const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.25.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.25.0"); + const contentType = ObjectSerializer.getPreferredMediaType([ + "application/json" + ]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = ObjectSerializer.stringify( + ObjectSerializer.serialize(updateTagRequest, "UpdateTagRequest", ""), + contentType + ); + requestContext.setBody(serializedBody); + let authMethod; + authMethod = _config.authMethods["bearerAuth"]; + if (authMethod == null ? void 0 : authMethod.applySecurityAuthentication) { + yield authMethod == null ? void 0 : authMethod.applySecurityAuthentication(requestContext); + } + const defaultAuth = ((_a = _options == null ? void 0 : _options.authMethods) == null ? void 0 : _a.default) || ((_c = (_b = this.configuration) == null ? void 0 : _b.authMethods) == null ? void 0 : _c.default); + if (defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication) { + yield defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication(requestContext); + } + return requestContext; + }); + } +}; +var TagsApiResponseProcessor = class { + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to assignTag + * @throws ApiException if the response code was not in [200, 299] + */ + assignTag(response) { + return __async(this, null, function* () { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("204", response.httpStatusCode)) { + return; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Invalid request.", body, response.headers); + } + if (isCodeInRange("401", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unexpected error", body, response.headers); + } + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "void", + "" + ); + return body; + } + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", yield response.getBodyAsAny(), response.headers); + }); + } + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to createTag + * @throws ApiException if the response code was not in [200, 299] + */ + createTag(response) { + return __async(this, null, function* () { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("200", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "Tag", + "" + ); + return body; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Invalid request.", body, response.headers); + } + if (isCodeInRange("401", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unexpected error", body, response.headers); + } + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "Tag", + "" + ); + return body; + } + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", yield response.getBodyAsAny(), response.headers); + }); + } + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to deleteTag + * @throws ApiException if the response code was not in [200, 299] + */ + deleteTag(response) { + return __async(this, null, function* () { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("204", response.httpStatusCode)) { + return; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Invalid request.", body, response.headers); + } + if (isCodeInRange("401", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unexpected error", body, response.headers); + } + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "void", + "" + ); + return body; + } + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", yield response.getBodyAsAny(), response.headers); + }); + } + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to searchTags + * @throws ApiException if the response code was not in [200, 299] + */ + searchTags(response) { + return __async(this, null, function* () { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("200", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "Array", + "" + ); + return body; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Invalid request.", body, response.headers); + } + if (isCodeInRange("401", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unexpected error", body, response.headers); + } + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "Array", + "" + ); + return body; + } + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", yield response.getBodyAsAny(), response.headers); + }); + } + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to unassignTag + * @throws ApiException if the response code was not in [200, 299] + */ + unassignTag(response) { + return __async(this, null, function* () { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("204", response.httpStatusCode)) { + return; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Invalid request.", body, response.headers); + } + if (isCodeInRange("401", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unexpected error", body, response.headers); + } + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "void", + "" + ); + return body; + } + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", yield response.getBodyAsAny(), response.headers); + }); + } + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to updateTag + * @throws ApiException if the response code was not in [200, 299] + */ + updateTag(response) { + return __async(this, null, function* () { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("204", response.httpStatusCode)) { + return; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Invalid request.", body, response.headers); + } + if (isCodeInRange("401", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unexpected error", body, response.headers); + } + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "void", + "" + ); + return body; + } + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", yield response.getBodyAsAny(), response.headers); + }); + } +}; + +// apis/ThoughtSpotRestApi.ts +var ThoughtSpotRestApiRequestFactory = class extends BaseAPIRequestFactory { + /** + * Version: 9.7.0.cl or later Activates a deactivated user account. Requires `ADMINISTRATION` (**Can administer Thoughtspot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `USER_ADMINISTRATION` (**Can manage users**) privilege is required. To activate an inactive user account, the API request body must include the following information: - Username or the GUID of the user account. - Auth token generated for the deactivated user. The auth token is sent in the API response when a user is deactivated. - Password for the user account. + * @param activateUserRequest + */ + activateUser(activateUserRequest, _options) { + return __async(this, null, function* () { + var _a, _b, _c; + let _config = _options || this.configuration; + if (activateUserRequest === null || activateUserRequest === void 0) { + throw new RequiredError("ThoughtSpotRestApi", "activateUser", "activateUserRequest"); + } + const localVarPath = "/api/rest/2.0/users/activate"; + const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.25.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.25.0"); + const contentType = ObjectSerializer.getPreferredMediaType([ + "application/json" + ]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = ObjectSerializer.stringify( + ObjectSerializer.serialize(activateUserRequest, "ActivateUserRequest", ""), + contentType + ); + requestContext.setBody(serializedBody); + let authMethod; + authMethod = _config.authMethods["bearerAuth"]; + if (authMethod == null ? void 0 : authMethod.applySecurityAuthentication) { + yield authMethod == null ? void 0 : authMethod.applySecurityAuthentication(requestContext); + } + const defaultAuth = ((_a = _options == null ? void 0 : _options.authMethods) == null ? void 0 : _a.default) || ((_c = (_b = this.configuration) == null ? void 0 : _b.authMethods) == null ? void 0 : _c.default); + if (defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication) { + yield defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication(requestContext); + } + return requestContext; + }); + } + /** + * Version: 9.0.0.cl or later Transfers the ownership of one or several objects from one user to another. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `USER_ADMINISTRATION` (**Can manage users**) privilege and edit access to the objects are required. + * @param assignChangeAuthorRequest + */ + assignChangeAuthor(assignChangeAuthorRequest, _options) { + return __async(this, null, function* () { + var _a, _b, _c; + let _config = _options || this.configuration; + if (assignChangeAuthorRequest === null || assignChangeAuthorRequest === void 0) { + throw new RequiredError("ThoughtSpotRestApi", "assignChangeAuthor", "assignChangeAuthorRequest"); + } + const localVarPath = "/api/rest/2.0/security/metadata/assign"; + const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.25.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.25.0"); + const contentType = ObjectSerializer.getPreferredMediaType([ + "application/json" + ]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = ObjectSerializer.stringify( + ObjectSerializer.serialize(assignChangeAuthorRequest, "AssignChangeAuthorRequest", ""), + contentType + ); + requestContext.setBody(serializedBody); + let authMethod; + authMethod = _config.authMethods["bearerAuth"]; + if (authMethod == null ? void 0 : authMethod.applySecurityAuthentication) { + yield authMethod == null ? void 0 : authMethod.applySecurityAuthentication(requestContext); + } + const defaultAuth = ((_a = _options == null ? void 0 : _options.authMethods) == null ? void 0 : _a.default) || ((_c = (_b = this.configuration) == null ? void 0 : _b.authMethods) == null ? void 0 : _c.default); + if (defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication) { + yield defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication(requestContext); + } + return requestContext; + }); + } + /** + * Version: 9.0.0.cl or later Assigns tags to Liveboards, Answers, Tables, and Worksheets. Requires edit access to the metadata object. + * @param assignTagRequest + */ + assignTag(assignTagRequest, _options) { + return __async(this, null, function* () { + var _a, _b, _c; + let _config = _options || this.configuration; + if (assignTagRequest === null || assignTagRequest === void 0) { + throw new RequiredError("ThoughtSpotRestApi", "assignTag", "assignTagRequest"); + } + const localVarPath = "/api/rest/2.0/tags/assign"; + const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.25.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.25.0"); + const contentType = ObjectSerializer.getPreferredMediaType([ + "application/json" + ]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = ObjectSerializer.stringify( + ObjectSerializer.serialize(assignTagRequest, "AssignTagRequest", ""), + contentType + ); + requestContext.setBody(serializedBody); + let authMethod; + authMethod = _config.authMethods["bearerAuth"]; + if (authMethod == null ? void 0 : authMethod.applySecurityAuthentication) { + yield authMethod == null ? void 0 : authMethod.applySecurityAuthentication(requestContext); + } + const defaultAuth = ((_a = _options == null ? void 0 : _options.authMethods) == null ? void 0 : _a.default) || ((_c = (_b = this.configuration) == null ? void 0 : _b.authMethods) == null ? void 0 : _c.default); + if (defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication) { + yield defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication(requestContext); + } + return requestContext; + }); + } + /** + * Version: 9.0.0.cl or later Updates the current password of the user. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `USER_ADMINISTRATION` (**Can manage users**) privilege is required. + * @param changeUserPasswordRequest + */ + changeUserPassword(changeUserPasswordRequest, _options) { + return __async(this, null, function* () { + var _a, _b, _c; + let _config = _options || this.configuration; + if (changeUserPasswordRequest === null || changeUserPasswordRequest === void 0) { + throw new RequiredError("ThoughtSpotRestApi", "changeUserPassword", "changeUserPasswordRequest"); + } + const localVarPath = "/api/rest/2.0/users/change-password"; + const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.25.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.25.0"); + const contentType = ObjectSerializer.getPreferredMediaType([ + "application/json" + ]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = ObjectSerializer.stringify( + ObjectSerializer.serialize(changeUserPasswordRequest, "ChangeUserPasswordRequest", ""), + contentType + ); + requestContext.setBody(serializedBody); + let authMethod; + authMethod = _config.authMethods["bearerAuth"]; + if (authMethod == null ? void 0 : authMethod.applySecurityAuthentication) { + yield authMethod == null ? void 0 : authMethod.applySecurityAuthentication(requestContext); + } + const defaultAuth = ((_a = _options == null ? void 0 : _options.authMethods) == null ? void 0 : _a.default) || ((_c = (_b = this.configuration) == null ? void 0 : _b.authMethods) == null ? void 0 : _c.default); + if (defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication) { + yield defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication(requestContext); + } + return requestContext; + }); + } + /** + * Version: 9.2.0.cl or later Commits TML files of metadata objects to the Git branch configured on your instance. Requires at least edit access to objects used in the commit operation. Before using this endpoint to push your commits: * Enable Git integration on your instance. * Make sure the Git repository and branch details are configured on your instance. For more information, see [Git integration documentation](https://developers.thoughtspot.com/docs/git-integration). + * @param commitBranchRequest + */ + commitBranch(commitBranchRequest, _options) { + return __async(this, null, function* () { + var _a, _b, _c; + let _config = _options || this.configuration; + if (commitBranchRequest === null || commitBranchRequest === void 0) { + throw new RequiredError("ThoughtSpotRestApi", "commitBranch", "commitBranchRequest"); + } + const localVarPath = "/api/rest/2.0/vcs/git/branches/commit"; + const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.25.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.25.0"); + const contentType = ObjectSerializer.getPreferredMediaType([ + "application/json" + ]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = ObjectSerializer.stringify( + ObjectSerializer.serialize(commitBranchRequest, "CommitBranchRequest", ""), + contentType + ); + requestContext.setBody(serializedBody); + let authMethod; + authMethod = _config.authMethods["bearerAuth"]; + if (authMethod == null ? void 0 : authMethod.applySecurityAuthentication) { + yield authMethod == null ? void 0 : authMethod.applySecurityAuthentication(requestContext); + } + const defaultAuth = ((_a = _options == null ? void 0 : _options.authMethods) == null ? void 0 : _a.default) || ((_c = (_b = this.configuration) == null ? void 0 : _b.authMethods) == null ? void 0 : _c.default); + if (defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication) { + yield defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication(requestContext); + } + return requestContext; + }); + } + /** + * Version: 26.6.0.cl or later Enables or disables authentication at cluster or org level for the specified auth type. Currently supports `TRUSTED_AUTH`. #### Required privileges Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) or `CONTROL_TRUSTED_AUTH` (**Can Enable or Disable Trusted Authentication**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled, the `CONTROL_TRUSTED_AUTH` privilege is required. #### Usage guidelines Use `cluster_preferences` to enable or disable authentication at the cluster level. Cluster-level settings can only be configured from the Primary Org. - `ENABLED` — Generates a new access token if one does not exist. An existing token is preserved. - `DISABLED` — Revokes the existing cluster-level access token. Use `org_preferences` to enable or disable authentication for one or more Orgs. Each entry must include an `org_identifier` (unique ID or name) and an `auth_status`. Org-level configuration requires the per-Org authentication feature to be enabled on your instance. - `ENABLED` — Generates a new org-level access token if one does not exist. - `DISABLED` — Revokes the existing org-level access token for that Org. Both `cluster_preferences` and `org_preferences` are optional. Omitting a field leaves the corresponding settings unchanged. If both are omitted, the API returns `204 No Content` without making any changes. **Note**: Cluster-level and org-level settings are independent of each other. Enabling or disabling one does not affect the other. + * @param configureAuthSettingsRequest + */ + configureAuthSettings(configureAuthSettingsRequest, _options) { + return __async(this, null, function* () { + var _a, _b, _c; + let _config = _options || this.configuration; + if (configureAuthSettingsRequest === null || configureAuthSettingsRequest === void 0) { + throw new RequiredError("ThoughtSpotRestApi", "configureAuthSettings", "configureAuthSettingsRequest"); + } + const localVarPath = "/api/rest/2.0/auth/configure"; + const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.25.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.25.0"); + const contentType = ObjectSerializer.getPreferredMediaType([ + "application/json" + ]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = ObjectSerializer.stringify( + ObjectSerializer.serialize(configureAuthSettingsRequest, "ConfigureAuthSettingsRequest", ""), + contentType + ); + requestContext.setBody(serializedBody); + let authMethod; + authMethod = _config.authMethods["bearerAuth"]; + if (authMethod == null ? void 0 : authMethod.applySecurityAuthentication) { + yield authMethod == null ? void 0 : authMethod.applySecurityAuthentication(requestContext); + } + const defaultAuth = ((_a = _options == null ? void 0 : _options.authMethods) == null ? void 0 : _a.default) || ((_c = (_b = this.configuration) == null ? void 0 : _b.authMethods) == null ? void 0 : _c.default); + if (defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication) { + yield defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication(requestContext); + } + return requestContext; + }); + } + /** + * Version: 10.14.0.cl or later Configure communication channel preferences. - Use `cluster_preferences` to update the default preferences for your ThoughtSpot application instance. - If your instance has [Orgs](https://docs.thoughtspot.com/cloud/latest/orgs-overview), use `org_preferences` to specify Org-specific preferences that override the defaults. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) or `DEVELOPER` (**Has developer privilege**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, users with `APPLICATION_ADMINISTRATION` (**Can manage application settings**) privilege are also authorized to perform this action. + * @param configureCommunicationChannelPreferencesRequest + */ + configureCommunicationChannelPreferences(configureCommunicationChannelPreferencesRequest, _options) { + return __async(this, null, function* () { + var _a, _b, _c; + let _config = _options || this.configuration; + if (configureCommunicationChannelPreferencesRequest === null || configureCommunicationChannelPreferencesRequest === void 0) { + throw new RequiredError("ThoughtSpotRestApi", "configureCommunicationChannelPreferences", "configureCommunicationChannelPreferencesRequest"); + } + const localVarPath = "/api/rest/2.0/system/preferences/communication-channels/configure"; + const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.25.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.25.0"); + const contentType = ObjectSerializer.getPreferredMediaType([ + "application/json" + ]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = ObjectSerializer.stringify( + ObjectSerializer.serialize(configureCommunicationChannelPreferencesRequest, "ConfigureCommunicationChannelPreferencesRequest", ""), + contentType + ); + requestContext.setBody(serializedBody); + let authMethod; + authMethod = _config.authMethods["bearerAuth"]; + if (authMethod == null ? void 0 : authMethod.applySecurityAuthentication) { + yield authMethod == null ? void 0 : authMethod.applySecurityAuthentication(requestContext); + } + const defaultAuth = ((_a = _options == null ? void 0 : _options.authMethods) == null ? void 0 : _a.default) || ((_c = (_b = this.configuration) == null ? void 0 : _b.authMethods) == null ? void 0 : _c.default); + if (defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication) { + yield defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication(requestContext); + } + return requestContext; + }); + } + /** + * Version: 26.2.0.cl or later Configure security settings for your ThoughtSpot application instance. - Use `cluster_preferences` to update cluster-level security settings including CORS whitelisted URLs, CSP settings, SAML redirect URLs, partitioned cookies, and non-embed access configuration. - Use `org_preferences` to configure Org-specific security settings. If your instance has [Orgs](https://docs.thoughtspot.com/cloud/latest/orgs-overview), this allows configuring CORS and non-embed access settings specific to the Org. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) or `DEVELOPER` (**Has developer privilege**) privilege. Cluster-level SAML and script-src settings require `ADMINISTRATION` privilege. See [Security Settings](https://developers.thoughtspot.com/docs/security-settings) for more details. + * @param configureSecuritySettingsRequest + */ + configureSecuritySettings(configureSecuritySettingsRequest, _options) { + return __async(this, null, function* () { + var _a, _b, _c; + let _config = _options || this.configuration; + if (configureSecuritySettingsRequest === null || configureSecuritySettingsRequest === void 0) { + throw new RequiredError("ThoughtSpotRestApi", "configureSecuritySettings", "configureSecuritySettingsRequest"); + } + const localVarPath = "/api/rest/2.0/system/security-settings/configure"; + const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.25.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.25.0"); + const contentType = ObjectSerializer.getPreferredMediaType([ + "application/json" + ]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = ObjectSerializer.stringify( + ObjectSerializer.serialize(configureSecuritySettingsRequest, "ConfigureSecuritySettingsRequest", ""), + contentType + ); + requestContext.setBody(serializedBody); + let authMethod; + authMethod = _config.authMethods["bearerAuth"]; + if (authMethod == null ? void 0 : authMethod.applySecurityAuthentication) { + yield authMethod == null ? void 0 : authMethod.applySecurityAuthentication(requestContext); + } + const defaultAuth = ((_a = _options == null ? void 0 : _options.authMethods) == null ? void 0 : _a.default) || ((_c = (_b = this.configuration) == null ? void 0 : _b.authMethods) == null ? void 0 : _c.default); + if (defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication) { + yield defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication(requestContext); + } + return requestContext; + }); + } + /** + * Version: 10.12.0.cl or later Gets connection configuration objects. Requires `DATAMANAGEMENT` (**Can manage data**) and edit permissions to the connection object, or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) privilege is required. #### Usage guidelines * To get a list of all configurations available in the ThoughtSpot system, send the API request with only the connection name or GUID in the request body. * To fetch details of a configuration object, specify the configuration object name or GUID. + * @param connectionConfigurationSearchRequest + */ + connectionConfigurationSearch(connectionConfigurationSearchRequest, _options) { + return __async(this, null, function* () { + var _a, _b, _c; + let _config = _options || this.configuration; + if (connectionConfigurationSearchRequest === null || connectionConfigurationSearchRequest === void 0) { + throw new RequiredError("ThoughtSpotRestApi", "connectionConfigurationSearch", "connectionConfigurationSearchRequest"); + } + const localVarPath = "/api/rest/2.0/connection-configurations/search"; + const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.25.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.25.0"); + const contentType = ObjectSerializer.getPreferredMediaType([ + "application/json" + ]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = ObjectSerializer.stringify( + ObjectSerializer.serialize(connectionConfigurationSearchRequest, "ConnectionConfigurationSearchRequest", ""), + contentType + ); + requestContext.setBody(serializedBody); + let authMethod; + authMethod = _config.authMethods["bearerAuth"]; + if (authMethod == null ? void 0 : authMethod.applySecurityAuthentication) { + yield authMethod == null ? void 0 : authMethod.applySecurityAuthentication(requestContext); + } + const defaultAuth = ((_a = _options == null ? void 0 : _options.authMethods) == null ? void 0 : _a.default) || ((_c = (_b = this.configuration) == null ? void 0 : _b.authMethods) == null ? void 0 : _c.default); + if (defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication) { + yield defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication(requestContext); + } + return requestContext; + }); + } + /** + * Convert worksheets to models Version: 10.6.0.cl or later ## Prerequisites - **Privileges Required:** - `DATAMANAGEMENT` (Can manage data) or `ADMINISTRATION` (Can administer ThoughtSpot). - **Additional Privileges (if RBAC is enabled):** - `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` (Can manage data models). --- ## Usage Guidelines ### Parameters 1. **worksheet_ids** - **Description:** A comma-separated list of GUIDs (Globally Unique Identifiers) specifying the Worksheets to be converted. - **Usage:** - Used only when `convert_all` is set to `false`. - Leave empty or omit when `convert_all` is set to `true`. 2. **exclude_worksheet_ids** - **Description:** A comma-separated list of GUIDs specifying Worksheets to be excluded from conversion. - **Usage:** - Useful when `convert_all` is set to `true` and specific Worksheets should not be converted. 3. **convert_all** - **Description:** Sets the scope of conversion. - **Options:** - `true`: Converts all Worksheets in the system, except those specified in `exclude_worksheet_ids`. - `false`: Converts only the Worksheets listed in `worksheet_ids`. 4. **apply_changes** - **Description:** Specifies whether to apply changes directly to ThoughtSpot or to generate a preview before applying any changes.Used for validation of conversion. - **Options:** - `true`: Applies conversion changes directly to ThoughtSpot. - `false`: Generates only a preview of the changes and does not apply any changes to ThoughtSpot --- ## Best Practices 1. **Backup Before Conversion:** Always export metadata as a backup before initiating the conversion process 2. **Partial Conversion for Testing:** Test the conversion process by setting `convert_all` to `false` and specifying a small number of `worksheet_ids`. 3. **Verify Dependencies:** Check for dependent objects, such as Tables and Connections, to avoid invalid references. 4. **Review Changes:** Use `apply_changes: false` to preview the impact of the conversion before applying changes. --- ## Examples ### Convert Specific Worksheets ```json { \"worksheet_ids\": [\"guid1\", \"guid2\", \"guid3\"], \"exclude_worksheet_ids\": [], \"convert_all\": false, \"apply_changes\": true } ``` ### Convert All Accessible Worksheets ```json { \"worksheet_ids\": [], \"exclude_worksheet_ids\": [], \"convert_all\": true, \"apply_changes\": true } ``` ### Exclude Specific Worksheets While Converting All Accessible Worksheets ```json { \"worksheet_ids\": [], \"exclude_worksheet_ids\": [\"abc\"], \"convert_all\": true, \"apply_changes\": true } ``` + * @param convertWorksheetToModelRequest + */ + convertWorksheetToModel(convertWorksheetToModelRequest, _options) { + return __async(this, null, function* () { + var _a, _b, _c; + let _config = _options || this.configuration; + if (convertWorksheetToModelRequest === null || convertWorksheetToModelRequest === void 0) { + throw new RequiredError("ThoughtSpotRestApi", "convertWorksheetToModel", "convertWorksheetToModelRequest"); + } + const localVarPath = "/api/rest/2.0/metadata/worksheets/convert"; + const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.25.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.25.0"); + const contentType = ObjectSerializer.getPreferredMediaType([ + "application/json" + ]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = ObjectSerializer.stringify( + ObjectSerializer.serialize(convertWorksheetToModelRequest, "ConvertWorksheetToModelRequest", ""), + contentType + ); + requestContext.setBody(serializedBody); + let authMethod; + authMethod = _config.authMethods["bearerAuth"]; + if (authMethod == null ? void 0 : authMethod.applySecurityAuthentication) { + yield authMethod == null ? void 0 : authMethod.applySecurityAuthentication(requestContext); + } + const defaultAuth = ((_a = _options == null ? void 0 : _options.authMethods) == null ? void 0 : _a.default) || ((_c = (_b = this.configuration) == null ? void 0 : _b.authMethods) == null ? void 0 : _c.default); + if (defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication) { + yield defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication(requestContext); + } + return requestContext; + }); + } + /** + * Makes a copy of an Answer or Liveboard Version: 10.3.0.cl or later Creates a copy of a metadata object. Requires at least view access to the metadata object being copied. Upon successful execution, the API creates a copy of the metadata object specified in the API request and returns the ID of the new object. + * @param copyObjectRequest + */ + copyObject(copyObjectRequest, _options) { + return __async(this, null, function* () { + var _a, _b, _c; + let _config = _options || this.configuration; + if (copyObjectRequest === null || copyObjectRequest === void 0) { + throw new RequiredError("ThoughtSpotRestApi", "copyObject", "copyObjectRequest"); + } + const localVarPath = "/api/rest/2.0/metadata/copyobject"; + const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.25.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.25.0"); + const contentType = ObjectSerializer.getPreferredMediaType([ + "application/json" + ]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = ObjectSerializer.stringify( + ObjectSerializer.serialize(copyObjectRequest, "CopyObjectRequest", ""), + contentType + ); + requestContext.setBody(serializedBody); + let authMethod; + authMethod = _config.authMethods["bearerAuth"]; + if (authMethod == null ? void 0 : authMethod.applySecurityAuthentication) { + yield authMethod == null ? void 0 : authMethod.applySecurityAuthentication(requestContext); + } + const defaultAuth = ((_a = _options == null ? void 0 : _options.authMethods) == null ? void 0 : _a.default) || ((_c = (_b = this.configuration) == null ? void 0 : _b.authMethods) == null ? void 0 : _c.default); + if (defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication) { + yield defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication(requestContext); + } + return requestContext; + }); + } + /** + * Version: 26.2.0.cl or later Creates a new Spotter agent conversation based on the provided context and settings. The endpoint was in Beta from 26.2.0.cl through 26.4.0.cl. Requires `CAN_USE_SPOTTER` privilege and at least view access to the metadata object specified in the request. #### Usage guidelines The request must include the `metadata_context` parameter to define the conversation context. The context type can be one of: - `DATA_SOURCE` *(available from 26.5.0.cl)*: targets a specific data source. Provide `data_source_identifier` in `data_source_context` for a single data source, or `data_source_identifiers` for multi-data-source context. The deprecated `guid` field is accepted for backwards compatibility. - `AUTO_MODE` *(available from 26.5.0.cl)*: automatically discovers and selects the most relevant datasets for the user\'s queries. > **Note for callers on versions 26.2.0.cl – 26.4.0.cl (Beta):** use the lowercase `data_source` enum value with the `guid` field instead of the above. Example: `{ \"type\": \"data_source\", \"data_source_context\": { \"guid\": \"\" } }`. The `conversation_settings` parameter controls which Spotter capabilities are enabled for the conversation: - `enable_contextual_change_analysis` (default: `true`, **deprecated from 26.2.0.cl**) — always enabled in Spotter 3; setting this to `false` has no effect on versions >= 26.2.0.cl - `enable_natural_language_answer_generation` (default: `true`, **deprecated from 26.2.0.cl**) — always enabled in Spotter 3; setting this to `false` has no effect on versions >= 26.2.0.cl - `enable_reasoning` (default: `true`, **deprecated from 26.2.0.cl**) — always enabled in Spotter 3; setting this to `false` has no effect on versions >= 26.2.0.cl - `enable_save_chat` (default: `false`, *available from 26.5.0.cl*) — enables saving the conversation for later retrieval via conversation history If the request is successful, the response includes a unique `conversation_identifier` that must be passed to `sendAgentConversationMessage` or `sendAgentConversationMessageStreaming` to send messages within this conversation. The response also includes `conversation_id` with the same value for backwards compatibility; use `conversation_identifier` for new integrations. #### Example request ```json { \"metadata_context\": { \"type\": \"DATA_SOURCE\", \"data_source_context\": { \"data_source_identifier\": \"a1b2c3d4-e5f6-7890-abcd-ef1234567890\" } }, \"conversation_settings\": {} } ``` #### Error responses | Code | Description | | ---- | --------------------------------------------------------------------------------------------------------------------------------------- | | 401 | Unauthorized — authentication token is missing, expired, or invalid. | | 403 | Forbidden — the authenticated user does not have `CAN_USE_SPOTTER` privilege or lacks view permission on the specified metadata object. | > ###### Note: > > - This endpoint was in Beta from 26.2.0.cl through 26.4.0.cl and is Generally Available from version 26.5.0.cl. > - This endpoint requires Spotter - please contact ThoughtSpot support to enable Spotter on your cluster. + * @param createAgentConversationRequest + */ + createAgentConversation(createAgentConversationRequest, _options) { + return __async(this, null, function* () { + var _a, _b, _c; + let _config = _options || this.configuration; + if (createAgentConversationRequest === null || createAgentConversationRequest === void 0) { + throw new RequiredError("ThoughtSpotRestApi", "createAgentConversation", "createAgentConversationRequest"); + } + const localVarPath = "/api/rest/2.0/ai/agent/conversation/create"; + const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.25.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.25.0"); + const contentType = ObjectSerializer.getPreferredMediaType([ + "application/json" + ]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = ObjectSerializer.stringify( + ObjectSerializer.serialize(createAgentConversationRequest, "CreateAgentConversationRequest", ""), + contentType + ); + requestContext.setBody(serializedBody); + let authMethod; + authMethod = _config.authMethods["bearerAuth"]; + if (authMethod == null ? void 0 : authMethod.applySecurityAuthentication) { + yield authMethod == null ? void 0 : authMethod.applySecurityAuthentication(requestContext); + } + const defaultAuth = ((_a = _options == null ? void 0 : _options.authMethods) == null ? void 0 : _a.default) || ((_c = (_b = this.configuration) == null ? void 0 : _b.authMethods) == null ? void 0 : _c.default); + if (defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication) { + yield defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication(requestContext); + } + return requestContext; + }); + } + /** + * Version: 10.12.0.cl or later Creates a new [custom calendar](https://docs.thoughtspot.com/cloud/latest/connections-cust-cal). Requires `DATAMANAGEMENT` (**Can manage data**) or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your ThoughtSpot instance, the `CAN_MANAGE_CUSTOM_CALENDAR` (**Can manage custom calendars**) privilege is required. #### Usage guidelines You can create a custom calendar from scratch or an existing Table in ThoughtSpot. For both methods of calendar creation, the following parameters are required: * Name of the custom calendar. * Calendar creation method. To create a calendar from an existing table, specify the method: - `FROM_EXISTING_TABLE` - Creates calendar from the table reference provided in the API request. - `FROM_INPUT_PARAMS` - Creates a calendar from the parameters defined in the API request. * Connection ID and Table name * Database and schema name attributes: For most Cloud Data Warehouse (CDW) connectors, both `database_name` and `schema_name` attributes are required. However, the attribute requirements are conditional and vary based on the connector type and its metadata structure. For example, for connectors such as Teradata, MySQL, SingleSore, Amazon Aurora MySQL, Amazon RDS MySQL, Oracle, and GCP_MYSQL, the `schema_name` is required, whereas the `database_name` attribute is not. Similarly, connectors such as ClickHouse require you to specify the `database_name` and the schema specification in such cases is optional. **NOTE**: If you are creating a calendar from an existing table, ensure that the referenced table matches the required DDL for custom calendars. If the schema does not match, the API returns an error. ##### Calendar type The API allows you to create the following types of calendars: * `MONTH_OFFSET`. The default calendar type. A `MONTH_OFFSET` calendar is offset by a few months from the standard calendar months (January to December) and the year begins with the month defined in the request. For example, if the `month_offset` value is set as `April`, the calendar year begins in April. * `4-4-5`. Each quarter in the calendar will include two 4-week months followed by one 5-week month. * `4-5-4`. Each quarter in the calendar will include two 4-week months with a 5-week month between. * `5-4-4`. Each quarter begins with a 5-week month, followed by two 4-week months. To start and end the calendar on a specific date, specify the dates in the `MM/DD/YYYY` format. For `MONTH_OFFSET` calendars, ensure that the `start_date` matches the month specified in the `month_offset` attribute. You can also set the starting day of the week and customize the prefixes for year and quarter labels. #### Examples To create a calendar from an existing table: ``` { \"name\": \"MyCustomCalendar1\", \"table_reference\": { \"connection_identifier\": \"4db8ea22-2ff4-4224-b05a-26674717e468\", \"table_name\": \"MyCalendarTable\", \"database_name\": \"RETAILAPPAREL\", \"schema_name\": \"PUBLIC\" }, \"creation_method\": \"FROM_EXISTING_TABLE\", } ``` To create a calendar from scratch: ``` { \"name\": \"MyCustomCalendar1\", \"table_reference\": { \"connection_identifier\": \"4db8ea22-2ff4-4224-b05a-26674717e468\", \"table_name\": \"MyCalendarTable\", \"database_name\": \"RETAILAPPAREL\", \"schema_name\": \"PUBLIC\" }, \"creation_method\": \"FROM_INPUT_PARAMS\", \"calendar_type\": \"MONTH_OFFSET\", \"month_offset\": \"April\", \"start_day_of_week\": \"Monday\", \"quarter_name_prefix\": \"Q\", \"year_name_prefix\": \"FY\", \"start_date\": \"04/01/2025\", \"end_date\": \"04/31/2025\" } ``` + * @param createCalendarRequest + */ + createCalendar(createCalendarRequest, _options) { + return __async(this, null, function* () { + var _a, _b, _c; + let _config = _options || this.configuration; + if (createCalendarRequest === null || createCalendarRequest === void 0) { + throw new RequiredError("ThoughtSpotRestApi", "createCalendar", "createCalendarRequest"); + } + const localVarPath = "/api/rest/2.0/calendars/create"; + const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.25.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.25.0"); + const contentType = ObjectSerializer.getPreferredMediaType([ + "application/json" + ]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = ObjectSerializer.stringify( + ObjectSerializer.serialize(createCalendarRequest, "CreateCalendarRequest", ""), + contentType + ); + requestContext.setBody(serializedBody); + let authMethod; + authMethod = _config.authMethods["bearerAuth"]; + if (authMethod == null ? void 0 : authMethod.applySecurityAuthentication) { + yield authMethod == null ? void 0 : authMethod.applySecurityAuthentication(requestContext); + } + const defaultAuth = ((_a = _options == null ? void 0 : _options.authMethods) == null ? void 0 : _a.default) || ((_c = (_b = this.configuration) == null ? void 0 : _b.authMethods) == null ? void 0 : _c.default); + if (defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication) { + yield defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication(requestContext); + } + return requestContext; + }); + } + /** + * Version: 26.4.0.cl or later Creates a new collection in ThoughtSpot. Collections allow you to organize and group related metadata objects such as Liveboards, Answers, worksheets, and other data objects. You can also create nested collections (sub-collections) to build a hierarchical structure. #### Supported operations The API endpoint lets you perform the following operations: * Create a new collection * Add metadata objects (Liveboards, Answers, Logical Tables) to the collection * Create nested collections by adding sub-collections + * @param createCollectionRequest + */ + createCollection(createCollectionRequest, _options) { + return __async(this, null, function* () { + var _a, _b, _c; + let _config = _options || this.configuration; + if (createCollectionRequest === null || createCollectionRequest === void 0) { + throw new RequiredError("ThoughtSpotRestApi", "createCollection", "createCollectionRequest"); + } + const localVarPath = "/api/rest/2.0/collections/create"; + const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.25.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.25.0"); + const contentType = ObjectSerializer.getPreferredMediaType([ + "application/json" + ]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = ObjectSerializer.stringify( + ObjectSerializer.serialize(createCollectionRequest, "CreateCollectionRequest", ""), + contentType + ); + requestContext.setBody(serializedBody); + let authMethod; + authMethod = _config.authMethods["bearerAuth"]; + if (authMethod == null ? void 0 : authMethod.applySecurityAuthentication) { + yield authMethod == null ? void 0 : authMethod.applySecurityAuthentication(requestContext); + } + const defaultAuth = ((_a = _options == null ? void 0 : _options.authMethods) == null ? void 0 : _a.default) || ((_c = (_b = this.configuration) == null ? void 0 : _b.authMethods) == null ? void 0 : _c.default); + if (defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication) { + yield defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication(requestContext); + } + return requestContext; + }); + } + /** + * Version: 9.2.0.cl or later Allows you to connect a ThoughtSpot instance to a Git repository. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance on your instance, the `CAN_SETUP_VERSION_CONTROL` (**Can set up version control**) privilege. You can use this API endpoint to connect your ThoughtSpot development and production environments to the development and production branches of a Git repository. Before using this endpoint to connect your ThoughtSpot instance to a Git repository, check the following prerequisites: * You have a Git repository. If you are using GitHub, make sure you have a valid account and an access token to connect ThoughtSpot to GitHub. For information about generating a token, see [GitHub Documentation](https://docs.github.com/en/authentication/keeping-your-account-and-data-secure/managing-your-personal-access-tokens). * Your access token has `repo` scope that grants full access to public and private repositories. * Your Git repository has a branch that can be configured as a default branch in ThoughtSpot. For more information, see [Git integration documentation](https://developers.thoughtspot.com/docs/?pageid=git-integration). **Note**: ThoughtSpot supports only GitHub / itHub Enterprise for CI/CD. + * @param createConfigRequest + */ + createConfig(createConfigRequest, _options) { + return __async(this, null, function* () { + var _a, _b, _c; + let _config = _options || this.configuration; + if (createConfigRequest === null || createConfigRequest === void 0) { + throw new RequiredError("ThoughtSpotRestApi", "createConfig", "createConfigRequest"); + } + const localVarPath = "/api/rest/2.0/vcs/git/config/create"; + const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.25.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.25.0"); + const contentType = ObjectSerializer.getPreferredMediaType([ + "application/json" + ]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = ObjectSerializer.stringify( + ObjectSerializer.serialize(createConfigRequest, "CreateConfigRequest", ""), + contentType + ); + requestContext.setBody(serializedBody); + let authMethod; + authMethod = _config.authMethods["bearerAuth"]; + if (authMethod == null ? void 0 : authMethod.applySecurityAuthentication) { + yield authMethod == null ? void 0 : authMethod.applySecurityAuthentication(requestContext); + } + const defaultAuth = ((_a = _options == null ? void 0 : _options.authMethods) == null ? void 0 : _a.default) || ((_c = (_b = this.configuration) == null ? void 0 : _b.authMethods) == null ? void 0 : _c.default); + if (defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication) { + yield defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication(requestContext); + } + return requestContext; + }); + } + /** + * Version: 9.2.0.cl or later Creates a connection to a data warehouse for live query services. Requires `DATAMANAGEMENT` (**Can manage data**) or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) privilege is required. #### Create a connection without tables To create a connection without tables: 1. Pass these parameters in your API request. * Name of the connection. * Type of the data warehouse to connect to. * A JSON map of configuration attributes in `data_warehouse_config`. The following example shows the configuration attributes for a SnowFlake connection: ``` { \"configuration\":{ \"accountName\":\"thoughtspot_partner\", \"user\":\"tsadmin\", \"password\":\"TestConn123\", \"role\":\"sysadmin\", \"warehouse\":\"MEDIUM_WH\" }, \"authenticationType\": \"SERVICE_ACCOUNT\", \"externalDatabases\":[ ] } ``` 2. Set `validate` to `false`. **NOTE:** If the `authentication_type` is anything other than SERVICE_ACCOUNT, you must explicitly provide the authenticationType property in the payload. If you do not specify authenticationType, the API will default to SERVICE_ACCOUNT as the authentication type. #### Create a connection with tables If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) and `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` (**Can manage data models**) privilege is required. To create a connection with tables: 1. Pass these parameters in your API request. * Name of the connection. * Type of the data warehouse to connect to. * A JSON map of configuration attributes, database details, and table properties in `data_warehouse_config` as shown in the following example: ``` { \"configuration\":{ \"accountName\":\"thoughtspot_partner\", \"user\":\"tsadmin\", \"password\":\"TestConn123\", \"role\":\"sysadmin\", \"warehouse\":\"MEDIUM_WH\" }, \"authenticationType\": \"SERVICE_ACCOUNT\", \"externalDatabases\":[ { \"name\":\"AllDatatypes\", \"isAutoCreated\":false, \"schemas\":[ { \"name\":\"alldatatypes\", \"tables\":[ { \"name\":\"allDatatypes\", \"type\":\"TABLE\", \"description\":\"\", \"selected\":true, \"linked\":true, \"columns\":[ { \"name\":\"CNUMBER\", \"type\":\"INT64\", \"canImport\":true, \"selected\":true, \"isLinkedActive\":true, \"isImported\":false, \"tableName\":\"allDatatypes\", \"schemaName\":\"alldatatypes\", \"dbName\":\"AllDatatypes\" }, { \"name\":\"CDECIMAL\", \"type\":\"INT64\", \"canImport\":true, \"selected\":true, \"isLinkedActive\":true, \"isImported\":false, \"tableName\":\"allDatatypes\", \"schemaName\":\"alldatatypes\", \"dbName\":\"AllDatatypes\" } ] } ] } ] } ] } ``` 2. Set `validate` to `true`. **NOTE:** If the `authentication_type` is anything other than SERVICE_ACCOUNT, you must explicitly provide the authenticationType property in the payload. If you do not specify authenticationType, the API will default to SERVICE_ACCOUNT as the authentication type. + * @param createConnectionRequest + */ + createConnection(createConnectionRequest, _options) { + return __async(this, null, function* () { + var _a, _b, _c; + let _config = _options || this.configuration; + if (createConnectionRequest === null || createConnectionRequest === void 0) { + throw new RequiredError("ThoughtSpotRestApi", "createConnection", "createConnectionRequest"); + } + const localVarPath = "/api/rest/2.0/connection/create"; + const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.25.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.25.0"); + const contentType = ObjectSerializer.getPreferredMediaType([ + "application/json" + ]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = ObjectSerializer.stringify( + ObjectSerializer.serialize(createConnectionRequest, "CreateConnectionRequest", ""), + contentType + ); + requestContext.setBody(serializedBody); + let authMethod; + authMethod = _config.authMethods["bearerAuth"]; + if (authMethod == null ? void 0 : authMethod.applySecurityAuthentication) { + yield authMethod == null ? void 0 : authMethod.applySecurityAuthentication(requestContext); + } + const defaultAuth = ((_a = _options == null ? void 0 : _options.authMethods) == null ? void 0 : _a.default) || ((_c = (_b = this.configuration) == null ? void 0 : _b.authMethods) == null ? void 0 : _c.default); + if (defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication) { + yield defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication(requestContext); + } + return requestContext; + }); + } + /** + * Version: 10.12.0.cl or later Creates an additional configuration to an existing connection to a data warehouse. Requires `DATAMANAGEMENT` (**Can manage data**) or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) privilege is required. #### Usage guidelines * A JSON map of configuration attributes in `configuration`. The following example shows the configuration attributes: ``` { \"user\":\"DEV_USER\", \"password\":\"TestConn123\", \"role\":\"DEV\", \"warehouse\":\"DEV_WH\" } ``` * If the `policy_type` is `PRINCIPALS`, then `policy_principals` is a required field. * If the `policy_type` is `PROCESSES`, then `policy_processes` is a required field. * If the `policy_type` is `NO_POLICY`, then `policy_principals` and `policy_processes` are not required fields. #### Parameterized Connection Support For parameterized connections that use OAuth authentication, only the same_as_parent and policy_process_options attributes are allowed in the API request. These attributes are not applicable to connections that are not parameterized. + * @param createConnectionConfigurationRequest + */ + createConnectionConfiguration(createConnectionConfigurationRequest, _options) { + return __async(this, null, function* () { + var _a, _b, _c; + let _config = _options || this.configuration; + if (createConnectionConfigurationRequest === null || createConnectionConfigurationRequest === void 0) { + throw new RequiredError("ThoughtSpotRestApi", "createConnectionConfiguration", "createConnectionConfigurationRequest"); + } + const localVarPath = "/api/rest/2.0/connection-configurations/create"; + const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.25.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.25.0"); + const contentType = ObjectSerializer.getPreferredMediaType([ + "application/json" + ]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = ObjectSerializer.stringify( + ObjectSerializer.serialize(createConnectionConfigurationRequest, "CreateConnectionConfigurationRequest", ""), + contentType + ); + requestContext.setBody(serializedBody); + let authMethod; + authMethod = _config.authMethods["bearerAuth"]; + if (authMethod == null ? void 0 : authMethod.applySecurityAuthentication) { + yield authMethod == null ? void 0 : authMethod.applySecurityAuthentication(requestContext); + } + const defaultAuth = ((_a = _options == null ? void 0 : _options.authMethods) == null ? void 0 : _a.default) || ((_c = (_b = this.configuration) == null ? void 0 : _b.authMethods) == null ? void 0 : _c.default); + if (defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication) { + yield defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication(requestContext); + } + return requestContext; + }); + } + /** + * Version: 10.4.0.cl or later Creates a new conversation session tied to a specific data model for AI-driven natural language querying. Requires `CAN_USE_SPOTTER` privilege and at least view access to the metadata object specified in the request. #### Usage guidelines The request must include: - `metadata_identifier`: the unique ID of the data source that provides context for the conversation Optionally, you can provide: - `tokens`: a token string to set initial context for the conversation (e.g., `\"[sales],[item type],[state]\"`) If the request is successful, ThoughtSpot returns a unique `conversation_identifier` that must be passed to `sendMessage` to continue the conversation. #### Error responses | Code | Description | |------|-------------| | 401 | Unauthorized — authentication token is missing, expired, or invalid. | | 403 | Forbidden — the authenticated user does not have `CAN_USE_SPOTTER` privilege or lacks view permission on the specified metadata object. | > ###### Note: > * This endpoint is currently in Beta. Breaking changes may be introduced before the endpoint is made Generally Available. > * This endpoint requires Spotter - please contact ThoughtSpot support to enable Spotter on your cluster. + * @param createConversationRequest + */ + createConversation(createConversationRequest, _options) { + return __async(this, null, function* () { + var _a, _b, _c; + let _config = _options || this.configuration; + if (createConversationRequest === null || createConversationRequest === void 0) { + throw new RequiredError("ThoughtSpotRestApi", "createConversation", "createConversationRequest"); + } + const localVarPath = "/api/rest/2.0/ai/conversation/create"; + const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.25.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.25.0"); + const contentType = ObjectSerializer.getPreferredMediaType([ + "application/json" + ]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = ObjectSerializer.stringify( + ObjectSerializer.serialize(createConversationRequest, "CreateConversationRequest", ""), + contentType + ); + requestContext.setBody(serializedBody); + let authMethod; + authMethod = _config.authMethods["bearerAuth"]; + if (authMethod == null ? void 0 : authMethod.applySecurityAuthentication) { + yield authMethod == null ? void 0 : authMethod.applySecurityAuthentication(requestContext); + } + const defaultAuth = ((_a = _options == null ? void 0 : _options.authMethods) == null ? void 0 : _a.default) || ((_c = (_b = this.configuration) == null ? void 0 : _b.authMethods) == null ? void 0 : _c.default); + if (defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication) { + yield defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication(requestContext); + } + return requestContext; + }); + } + /** + * Version: 9.6.0.cl or later Creates a custom action that appears as a menu action on a saved Answer or Liveboard visualization. Requires `DEVELOPER` (**Has Developer privilege**) or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `DEVELOPER` (**Has developer privilege**) privilege is required. #### Usage Guidelines The API lets you create the following types of custom actions: * URL-based action Allows pushing data to an external URL. * Callback action Triggers a callback to the host application and initiates a response payload on an embedded ThoughtSpot instance. By default, custom actions are visible to only administrator or developer users. To make a custom action available to other users, and specify the groups in `group_identifiers`. By default, the custom action is set as a _global_ action on all visualizations and saved Answers. To assign a custom action to specific Liveboard visualization, saved Answer, or Worksheet, set `visibility` to `false` in `default_action_config` property and specify the GUID or name of the object in `associate_metadata`. For more information, see [Custom actions](https://developers.thoughtspot.com/docs/custom-action-intro). + * @param createCustomActionRequest + */ + createCustomAction(createCustomActionRequest, _options) { + return __async(this, null, function* () { + var _a, _b, _c; + let _config = _options || this.configuration; + if (createCustomActionRequest === null || createCustomActionRequest === void 0) { + throw new RequiredError("ThoughtSpotRestApi", "createCustomAction", "createCustomActionRequest"); + } + const localVarPath = "/api/rest/2.0/customization/custom-actions"; + const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.25.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.25.0"); + const contentType = ObjectSerializer.getPreferredMediaType([ + "application/json" + ]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = ObjectSerializer.stringify( + ObjectSerializer.serialize(createCustomActionRequest, "CreateCustomActionRequest", ""), + contentType + ); + requestContext.setBody(serializedBody); + let authMethod; + authMethod = _config.authMethods["bearerAuth"]; + if (authMethod == null ? void 0 : authMethod.applySecurityAuthentication) { + yield authMethod == null ? void 0 : authMethod.applySecurityAuthentication(requestContext); + } + const defaultAuth = ((_a = _options == null ? void 0 : _options.authMethods) == null ? void 0 : _a.default) || ((_c = (_b = this.configuration) == null ? void 0 : _b.authMethods) == null ? void 0 : _c.default); + if (defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication) { + yield defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication(requestContext); + } + return requestContext; + }); + } + /** + * Version: 10.10.0.cl or later Creates a customization configuration for the notification email. #### Pre-requisites Requires `DEVELOPER` (**has developer privilege**) or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `DEVELOPER` (**Has developer privilege**) privilege is required. **NOTE**:This endpoint in currently in beta. Contact ThoughtSpot support to enable this on your instance. #### Usage guidelines To create a custom configuration pass these parameters in your API request: - A JSON map of configuration attributes `template_properties`. The following example shows a sample set of customization configuration: ``` { { \"cta_button_bg_color\": \"#444DEA\", \"cta_text_font_color\": \"#FFFFFF\", \"primary_bg_color\": \"#D3DEF0\", \"logo_url\": \"https://storage.pardot.com/710713/1642089901EbkRibJq/TS_fullworkmark_darkmode.png\", \"font_family\": \"\", \"product_name\": \"ThoughtSpot\", \"footer_address\": \"444 Castro St, Suite 1000 Mountain View, CA 94041\", \"footer_phone\": \"(800) 508-7008\", \"replacement_value_for_liveboard\": \"Dashboard\", \"replacement_value_for_answer\": \"Chart\", \"replacement_value_for_spot_iq\": \"AI Insights\", \"hide_footer_phone\": false, \"hide_footer_address\": false, \"hide_product_name\": false, \"hide_manage_notification\": false, \"hide_mobile_app_nudge\": false, \"hide_privacy_policy\": false, \"hide_ts_vocabulary_definitions\": false, \"hide_error_message\": false, \"hide_unsubscribe_link\": false, \"hide_notification_status\": false, \"hide_modify_alert\": false, \"company_website_url\": \"https://your-website.com/\", \"company_privacy_policy_url\" : \"https://link-to-privacy-policy.com/\", \"contact_support_url\": \"https://link-to-contact-support.com/\", \"hide_contact_support_url\": false, \"hide_logo_url\" : false } } ``` + * @param createEmailCustomizationRequest + */ + createEmailCustomization(createEmailCustomizationRequest, _options) { + return __async(this, null, function* () { + var _a, _b, _c; + let _config = _options || this.configuration; + if (createEmailCustomizationRequest === null || createEmailCustomizationRequest === void 0) { + throw new RequiredError("ThoughtSpotRestApi", "createEmailCustomization", "createEmailCustomizationRequest"); + } + const localVarPath = "/api/rest/2.0/customization/email"; + const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.25.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.25.0"); + const contentType = ObjectSerializer.getPreferredMediaType([ + "application/json" + ]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = ObjectSerializer.stringify( + ObjectSerializer.serialize(createEmailCustomizationRequest, "CreateEmailCustomizationRequest", ""), + contentType + ); + requestContext.setBody(serializedBody); + let authMethod; + authMethod = _config.authMethods["bearerAuth"]; + if (authMethod == null ? void 0 : authMethod.applySecurityAuthentication) { + yield authMethod == null ? void 0 : authMethod.applySecurityAuthentication(requestContext); + } + const defaultAuth = ((_a = _options == null ? void 0 : _options.authMethods) == null ? void 0 : _a.default) || ((_c = (_b = this.configuration) == null ? void 0 : _b.authMethods) == null ? void 0 : _c.default); + if (defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication) { + yield defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication(requestContext); + } + return requestContext; + }); + } + /** + * Version: 9.0.0.cl or later Creates an Org object. To use this API, the [Orgs](https://docs.thoughtspot.com/cloud/latest/orgs-overview) feature must be enabled in your cluster. Requires cluster administration (**Can administer Org**) privileges. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `ORG_ADMINISTRATION` (**Can manage Orgs**) privilege is required. + * @param createOrgRequest + */ + createOrg(createOrgRequest, _options) { + return __async(this, null, function* () { + var _a, _b, _c; + let _config = _options || this.configuration; + if (createOrgRequest === null || createOrgRequest === void 0) { + throw new RequiredError("ThoughtSpotRestApi", "createOrg", "createOrgRequest"); + } + const localVarPath = "/api/rest/2.0/orgs/create"; + const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.25.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.25.0"); + const contentType = ObjectSerializer.getPreferredMediaType([ + "application/json" + ]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = ObjectSerializer.stringify( + ObjectSerializer.serialize(createOrgRequest, "CreateOrgRequest", ""), + contentType + ); + requestContext.setBody(serializedBody); + let authMethod; + authMethod = _config.authMethods["bearerAuth"]; + if (authMethod == null ? void 0 : authMethod.applySecurityAuthentication) { + yield authMethod == null ? void 0 : authMethod.applySecurityAuthentication(requestContext); + } + const defaultAuth = ((_a = _options == null ? void 0 : _options.authMethods) == null ? void 0 : _a.default) || ((_c = (_b = this.configuration) == null ? void 0 : _b.authMethods) == null ? void 0 : _c.default); + if (defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication) { + yield defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication(requestContext); + } + return requestContext; + }); + } + /** + * Version: 9.5.0.cl or later Creates a Role object in ThoughtSpot. Available only if [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance. To create a Role, the `ROLE_ADMINISTRATION` (**Can manage roles**) privilege is required. + * @param createRoleRequest + */ + createRole(createRoleRequest, _options) { + return __async(this, null, function* () { + var _a, _b, _c; + let _config = _options || this.configuration; + if (createRoleRequest === null || createRoleRequest === void 0) { + throw new RequiredError("ThoughtSpotRestApi", "createRole", "createRoleRequest"); + } + const localVarPath = "/api/rest/2.0/roles/create"; + const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.25.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.25.0"); + const contentType = ObjectSerializer.getPreferredMediaType([ + "application/json" + ]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = ObjectSerializer.stringify( + ObjectSerializer.serialize(createRoleRequest, "CreateRoleRequest", ""), + contentType + ); + requestContext.setBody(serializedBody); + let authMethod; + authMethod = _config.authMethods["bearerAuth"]; + if (authMethod == null ? void 0 : authMethod.applySecurityAuthentication) { + yield authMethod == null ? void 0 : authMethod.applySecurityAuthentication(requestContext); + } + const defaultAuth = ((_a = _options == null ? void 0 : _options.authMethods) == null ? void 0 : _a.default) || ((_c = (_b = this.configuration) == null ? void 0 : _b.authMethods) == null ? void 0 : _c.default); + if (defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication) { + yield defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication(requestContext); + } + return requestContext; + }); + } + /** + * Create schedule. Version: 9.4.0.cl or later Creates a Liveboard schedule job. Requires at least edit access to Liveboards. To create a schedule on behalf of another user, you need `ADMINISTRATION` (**Can administer Org**) or `JOBSCHEDULING` (**Can schedule for others**) privilege and edit access to the Liveboard. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `JOBSCHEDULING` (**Can schedule for others**) privilege is required. #### Usage guidelines * The description text is mandatory. The description text appears as **Description: ** in the Liveboard schedule email notifications. * For Liveboards with both charts and tables, schedule creation is only supported in PDF and XLS formats. Schedules created in CSV formats for such Liveboards will fail to run. If `PDF` is set as the `file_format`, enable `pdf_options` to get the correct attachment. Not doing so may cause the attachment to be rendered empty. * To include only specific visualizations, specify the visualization GUIDs in the `visualization_identifiers` array. * You can schedule a Liveboard job to run periodically by setting frequency parameters. You can set the schedule to run daily, weekly, monthly or every n minutes or hours. The scheduled job can also be configured to run at a specific time of the day or on specific days of the week or month. Please ensure that when setting the schedule frequency for _minute of the object_, only values that are multiples of 5 are included. * If the `frequency` parameters are defined, you can set the time zone to a value that matches your server\'s time zone. For example, `US/Central`, `Etc/UTC`, `CET`. The default time zone is `America/Los_Angeles`. For more information about Liveboard jobs, see [ThoughtSpot Product Documentation](https://docs.thoughtspot.com/cloud/latest/liveboard-schedule). + * @param createScheduleRequest + */ + createSchedule(createScheduleRequest, _options) { + return __async(this, null, function* () { + var _a, _b, _c; + let _config = _options || this.configuration; + if (createScheduleRequest === null || createScheduleRequest === void 0) { + throw new RequiredError("ThoughtSpotRestApi", "createSchedule", "createScheduleRequest"); + } + const localVarPath = "/api/rest/2.0/schedules/create"; + const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.25.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.25.0"); + const contentType = ObjectSerializer.getPreferredMediaType([ + "application/json" + ]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = ObjectSerializer.stringify( + ObjectSerializer.serialize(createScheduleRequest, "CreateScheduleRequest", ""), + contentType + ); + requestContext.setBody(serializedBody); + let authMethod; + authMethod = _config.authMethods["bearerAuth"]; + if (authMethod == null ? void 0 : authMethod.applySecurityAuthentication) { + yield authMethod == null ? void 0 : authMethod.applySecurityAuthentication(requestContext); + } + const defaultAuth = ((_a = _options == null ? void 0 : _options.authMethods) == null ? void 0 : _a.default) || ((_c = (_b = this.configuration) == null ? void 0 : _b.authMethods) == null ? void 0 : _c.default); + if (defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication) { + yield defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication(requestContext); + } + return requestContext; + }); + } + /** + * Version: 9.0.0.cl or later Creates a tag object. Tags are labels that identify a metadata object. For example, you can create a tag to designate subject areas, such as sales, HR, marketing, and finance. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `TAGMANAGEMENT` (**Can manage tags**) privilege is required to create, edit, and delete tags. + * @param createTagRequest + */ + createTag(createTagRequest, _options) { + return __async(this, null, function* () { + var _a, _b, _c; + let _config = _options || this.configuration; + if (createTagRequest === null || createTagRequest === void 0) { + throw new RequiredError("ThoughtSpotRestApi", "createTag", "createTagRequest"); + } + const localVarPath = "/api/rest/2.0/tags/create"; + const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.25.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.25.0"); + const contentType = ObjectSerializer.getPreferredMediaType([ + "application/json" + ]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = ObjectSerializer.stringify( + ObjectSerializer.serialize(createTagRequest, "CreateTagRequest", ""), + contentType + ); + requestContext.setBody(serializedBody); + let authMethod; + authMethod = _config.authMethods["bearerAuth"]; + if (authMethod == null ? void 0 : authMethod.applySecurityAuthentication) { + yield authMethod == null ? void 0 : authMethod.applySecurityAuthentication(requestContext); + } + const defaultAuth = ((_a = _options == null ? void 0 : _options.authMethods) == null ? void 0 : _a.default) || ((_c = (_b = this.configuration) == null ? void 0 : _b.authMethods) == null ? void 0 : _c.default); + if (defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication) { + yield defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication(requestContext); + } + return requestContext; + }); + } + /** + * Version: 9.0.0.cl or later Creates a user in ThoughtSpot. The API endpoint allows you to configure several user properties such as email address, account status, share notification preferences, and sharing visibility. You can provision the user to [groups](https://docs.thoughtspot.com/cloud/latest/groups-privileges) and [Orgs](https://docs.thoughtspot.com/cloud/latest/orgs-overview). You can also add Liveboard, Answer, and Worksheet objects to the user’s favorites list, assign a default Liveboard for the user, and set user preferences. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `USER_ADMINISTRATION` (**Can manage users**) privilege is required. + * @param createUserRequest + */ + createUser(createUserRequest, _options) { + return __async(this, null, function* () { + var _a, _b, _c; + let _config = _options || this.configuration; + if (createUserRequest === null || createUserRequest === void 0) { + throw new RequiredError("ThoughtSpotRestApi", "createUser", "createUserRequest"); + } + const localVarPath = "/api/rest/2.0/users/create"; + const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.25.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.25.0"); + const contentType = ObjectSerializer.getPreferredMediaType([ + "application/json" + ]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = ObjectSerializer.stringify( + ObjectSerializer.serialize(createUserRequest, "CreateUserRequest", ""), + contentType + ); + requestContext.setBody(serializedBody); + let authMethod; + authMethod = _config.authMethods["bearerAuth"]; + if (authMethod == null ? void 0 : authMethod.applySecurityAuthentication) { + yield authMethod == null ? void 0 : authMethod.applySecurityAuthentication(requestContext); + } + const defaultAuth = ((_a = _options == null ? void 0 : _options.authMethods) == null ? void 0 : _a.default) || ((_c = (_b = this.configuration) == null ? void 0 : _b.authMethods) == null ? void 0 : _c.default); + if (defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication) { + yield defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication(requestContext); + } + return requestContext; + }); + } + /** + * Version: 9.0.0.cl or later Creates a group object in ThoughtSpot. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `GROUP_ADMINISTRATION` (**Can manage groups**) privilege is required. #### About groups Groups in ThoughtSpot are used by the administrators to define privileges and organize users based on their roles and access requirements. To know more about groups and privileges, see [ThoughtSpot Product Documentation](https://docs.thoughtspot.com/cloud/latest/groups-privileges). #### Supported operations The API endpoint lets you perform the following operations: * Assign privileges * Add users * Define sharing visibility * Add sub-groups * Assign a default Liveboard + * @param createUserGroupRequest + */ + createUserGroup(createUserGroupRequest, _options) { + return __async(this, null, function* () { + var _a, _b, _c; + let _config = _options || this.configuration; + if (createUserGroupRequest === null || createUserGroupRequest === void 0) { + throw new RequiredError("ThoughtSpotRestApi", "createUserGroup", "createUserGroupRequest"); + } + const localVarPath = "/api/rest/2.0/groups/create"; + const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.25.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.25.0"); + const contentType = ObjectSerializer.getPreferredMediaType([ + "application/json" + ]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = ObjectSerializer.stringify( + ObjectSerializer.serialize(createUserGroupRequest, "CreateUserGroupRequest", ""), + contentType + ); + requestContext.setBody(serializedBody); + let authMethod; + authMethod = _config.authMethods["bearerAuth"]; + if (authMethod == null ? void 0 : authMethod.applySecurityAuthentication) { + yield authMethod == null ? void 0 : authMethod.applySecurityAuthentication(requestContext); + } + const defaultAuth = ((_a = _options == null ? void 0 : _options.authMethods) == null ? void 0 : _a.default) || ((_c = (_b = this.configuration) == null ? void 0 : _b.authMethods) == null ? void 0 : _c.default); + if (defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication) { + yield defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication(requestContext); + } + return requestContext; + }); + } + /** + * Create a variable which can be used for parameterizing metadata objects Version: 26.4.0.cl or later Allows creating a variable which can be used for parameterizing metadata objects in ThoughtSpot. Requires ADMINISTRATION role and TENANT scope. The CAN_MANAGE_VARIABLES permission allows you to manage Formula Variables in the current organization scope. The API endpoint supports the following types of variables: * CONNECTION_PROPERTY - For connection properties * TABLE_MAPPING - For table mappings * CONNECTION_PROPERTY_PER_PRINCIPAL - For connection properties per principal. In order to use this please contact support to enable this. * FORMULA_VARIABLE - For Formula variables, introduced in 10.15.0.cl When creating a variable, you need to specify: * The variable type * A unique name for the variable * Whether the variable contains sensitive values (defaults to false) * The data type of the variable, only specify for formula variables (defaults to null) The operation will fail if: * The user lacks required permissions * The variable name already exists * The variable type is invalid + * @param createVariableRequest + */ + createVariable(createVariableRequest, _options) { + return __async(this, null, function* () { + var _a, _b, _c; + let _config = _options || this.configuration; + if (createVariableRequest === null || createVariableRequest === void 0) { + throw new RequiredError("ThoughtSpotRestApi", "createVariable", "createVariableRequest"); + } + const localVarPath = "/api/rest/2.0/template/variables/create"; + const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.25.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.25.0"); + const contentType = ObjectSerializer.getPreferredMediaType([ + "application/json" + ]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = ObjectSerializer.stringify( + ObjectSerializer.serialize(createVariableRequest, "CreateVariableRequest", ""), + contentType + ); + requestContext.setBody(serializedBody); + let authMethod; + authMethod = _config.authMethods["bearerAuth"]; + if (authMethod == null ? void 0 : authMethod.applySecurityAuthentication) { + yield authMethod == null ? void 0 : authMethod.applySecurityAuthentication(requestContext); + } + const defaultAuth = ((_a = _options == null ? void 0 : _options.authMethods) == null ? void 0 : _a.default) || ((_c = (_b = this.configuration) == null ? void 0 : _b.authMethods) == null ? void 0 : _c.default); + if (defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication) { + yield defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication(requestContext); + } + return requestContext; + }); + } + /** + * Version: 10.14.0.cl or later Creates a new webhook configuration to receive notifications for specified events. The webhook will be triggered when the configured events occur in the system. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) or `DEVELOPER` (**Has developer privilege**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, users with `CAN_MANAGE_WEBHOOKS` (**Can manage webhooks**) privilege are also authorized to perform this action. + * @param createWebhookConfigurationRequest + */ + createWebhookConfiguration(createWebhookConfigurationRequest, _options) { + return __async(this, null, function* () { + var _a, _b, _c; + let _config = _options || this.configuration; + if (createWebhookConfigurationRequest === null || createWebhookConfigurationRequest === void 0) { + throw new RequiredError("ThoughtSpotRestApi", "createWebhookConfiguration", "createWebhookConfigurationRequest"); + } + const localVarPath = "/api/rest/2.0/webhooks/create"; + const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.25.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.25.0"); + const contentType = ObjectSerializer.getPreferredMediaType([ + "application/json" + ]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = ObjectSerializer.stringify( + ObjectSerializer.serialize(createWebhookConfigurationRequest, "CreateWebhookConfigurationRequest", ""), + contentType + ); + requestContext.setBody(serializedBody); + let authMethod; + authMethod = _config.authMethods["bearerAuth"]; + if (authMethod == null ? void 0 : authMethod.applySecurityAuthentication) { + yield authMethod == null ? void 0 : authMethod.applySecurityAuthentication(requestContext); + } + const defaultAuth = ((_a = _options == null ? void 0 : _options.authMethods) == null ? void 0 : _a.default) || ((_c = (_b = this.configuration) == null ? void 0 : _b.authMethods) == null ? void 0 : _c.default); + if (defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication) { + yield defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication(requestContext); + } + return requestContext; + }); + } + /** + * Version: 9.9.0.cl or later Creates a DBT connection object in ThoughtSpot. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege or `DATAMANAGEMENT` (**Can manage data**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the following Data control privileges may be required: - `CAN_MANAGE_CUSTOM_CALENDAR`(**Can manage custom calendars**) - `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) - `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` (**Can manage data models**) #### About create DBT connection DBT connection in ThoughtSpot is used by the user to define DBT credentials for cloud . The API needs embrace connection, embrace database name, DBT url, import type, DBT account identifier, DBT project identifier, DBT access token and environment details (or) embrace connection, embrace database name, import type, file_content to create a connection object. To know more about DBT, see ThoughtSpot Product Documentation. + * @param connectionName Name of the connection. + * @param databaseName Name of the Database. + * @param importType Mention type of Import + * @param accessToken Access token is mandatory when Import_Type is DBT_CLOUD. + * @param dbtUrl DBT URL is mandatory when Import_Type is DBT_CLOUD. + * @param accountId Account ID is mandatory when Import_Type is DBT_CLOUD + * @param projectId Project ID is mandatory when Import_Type is DBT_CLOUD + * @param dbtEnvId DBT Environment ID\\\" + * @param projectName Name of the project + * @param fileContent Upload DBT Manifest and Catalog artifact files as a ZIP file. This field is Mandatory when Import Type is \\\'ZIP_FILE\\\' + */ + dbtConnection(connectionName, databaseName, importType, accessToken, dbtUrl, accountId, projectId, dbtEnvId, projectName, fileContent, _options) { + return __async(this, null, function* () { + var _a, _b, _c; + let _config = _options || this.configuration; + if (connectionName === null || connectionName === void 0) { + throw new RequiredError("ThoughtSpotRestApi", "dbtConnection", "connectionName"); + } + if (databaseName === null || databaseName === void 0) { + throw new RequiredError("ThoughtSpotRestApi", "dbtConnection", "databaseName"); + } + const localVarPath = "/api/rest/2.0/dbt/dbt-connection"; + const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.25.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.25.0"); + const useForm = canConsumeForm([ + "multipart/form-data" + ]); + let localVarFormParams; + if (useForm) { + localVarFormParams = new FormData(); + } else { + localVarFormParams = new URLSearchParams(); + } + if (connectionName !== void 0) { + localVarFormParams.append("connection_name", connectionName); + } + if (databaseName !== void 0) { + localVarFormParams.append("database_name", databaseName); + } + if (importType !== void 0) { + localVarFormParams.append("import_type", importType); + } + if (accessToken !== void 0) { + localVarFormParams.append("access_token", accessToken); + } + if (dbtUrl !== void 0) { + localVarFormParams.append("dbt_url", dbtUrl); + } + if (accountId !== void 0) { + localVarFormParams.append("account_id", accountId); + } + if (projectId !== void 0) { + localVarFormParams.append("project_id", projectId); + } + if (dbtEnvId !== void 0) { + localVarFormParams.append("dbt_env_id", dbtEnvId); + } + if (projectName !== void 0) { + localVarFormParams.append("project_name", projectName); + } + if (fileContent !== void 0) { + if (localVarFormParams instanceof FormData) { + localVarFormParams.append("file_content", fileContent, fileContent.name); + } + } + requestContext.setBody(localVarFormParams); + if (!useForm) { + const contentType = ObjectSerializer.getPreferredMediaType([ + "multipart/form-data" + ]); + requestContext.setHeaderParam("Content-Type", contentType); + } + let authMethod; + authMethod = _config.authMethods["bearerAuth"]; + if (authMethod == null ? void 0 : authMethod.applySecurityAuthentication) { + yield authMethod == null ? void 0 : authMethod.applySecurityAuthentication(requestContext); + } + const defaultAuth = ((_a = _options == null ? void 0 : _options.authMethods) == null ? void 0 : _a.default) || ((_c = (_b = this.configuration) == null ? void 0 : _b.authMethods) == null ? void 0 : _c.default); + if (defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication) { + yield defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication(requestContext); + } + return requestContext; + }); + } + /** + * Version: 9.9.0.cl or later Resynchronize the existing list of models, tables, worksheet tml’s and import them to Thoughtspot based on the DBT connection object. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege or `DATAMANAGEMENT` (**Can manage data**) privilege, along with an existing DBT connection. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the following data control privileges may be required: - `CAN_MANAGE_CUSTOM_CALENDAR`(**Can manage custom calendars**) - `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) - `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` (**Can manage data models**) + * @param dbtConnectionIdentifier Unique ID of the DBT connection. + * @param fileContent Upload DBT Manifest and Catalog artifact files as a ZIP file. This field is mandatory if the connection was created with import_type ‘ZIP_FILE’ + */ + dbtGenerateSyncTml(dbtConnectionIdentifier, fileContent, _options) { + return __async(this, null, function* () { + var _a, _b, _c; + let _config = _options || this.configuration; + if (dbtConnectionIdentifier === null || dbtConnectionIdentifier === void 0) { + throw new RequiredError("ThoughtSpotRestApi", "dbtGenerateSyncTml", "dbtConnectionIdentifier"); + } + const localVarPath = "/api/rest/2.0/dbt/generate-sync-tml"; + const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.25.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.25.0"); + const useForm = canConsumeForm([ + "multipart/form-data" + ]); + let localVarFormParams; + if (useForm) { + localVarFormParams = new FormData(); + } else { + localVarFormParams = new URLSearchParams(); + } + if (dbtConnectionIdentifier !== void 0) { + localVarFormParams.append("dbt_connection_identifier", dbtConnectionIdentifier); + } + if (fileContent !== void 0) { + if (localVarFormParams instanceof FormData) { + localVarFormParams.append("file_content", fileContent, fileContent.name); + } + } + requestContext.setBody(localVarFormParams); + if (!useForm) { + const contentType = ObjectSerializer.getPreferredMediaType([ + "multipart/form-data" + ]); + requestContext.setHeaderParam("Content-Type", contentType); + } + let authMethod; + authMethod = _config.authMethods["bearerAuth"]; + if (authMethod == null ? void 0 : authMethod.applySecurityAuthentication) { + yield authMethod == null ? void 0 : authMethod.applySecurityAuthentication(requestContext); + } + const defaultAuth = ((_a = _options == null ? void 0 : _options.authMethods) == null ? void 0 : _a.default) || ((_c = (_b = this.configuration) == null ? void 0 : _b.authMethods) == null ? void 0 : _c.default); + if (defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication) { + yield defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication(requestContext); + } + return requestContext; + }); + } + /** + * Version: 9.9.0.cl or later Generate required table and worksheet and import them. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege or `DATAMANAGEMENT` (**Can manage data**) privilege, along with an existing DBT connection. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the following data control privileges may be required: - `CAN_MANAGE_CUSTOM_CALENDAR`(**Can manage custom calendars**) - `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) - `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` (**Can manage data models**) #### About generate TML Models and Worksheets to be imported can be selected by the user as part of the API. + * @param dbtConnectionIdentifier Unique ID of the DBT connection. + * @param modelTables List of Models and their respective Tables Example: \\\'[{\\\"model_name\\\": \\\"model_name\\\", \\\"tables\\\": [\\\"table_name\\\"]}]\\\' + * @param importWorksheets Mention the worksheet tmls to import + * @param worksheets List of worksheets is mandatory when import_Worksheets is type SELECTED Example: [\\\"worksheet_name\\\"] + * @param fileContent Upload DBT Manifest and Catalog artifact files as a ZIP file. This field is mandatory if the connection was created with import_type ‘ZIP_FILE’ + */ + dbtGenerateTml(dbtConnectionIdentifier, modelTables, importWorksheets, worksheets, fileContent, _options) { + return __async(this, null, function* () { + var _a, _b, _c; + let _config = _options || this.configuration; + if (dbtConnectionIdentifier === null || dbtConnectionIdentifier === void 0) { + throw new RequiredError("ThoughtSpotRestApi", "dbtGenerateTml", "dbtConnectionIdentifier"); + } + if (modelTables === null || modelTables === void 0) { + throw new RequiredError("ThoughtSpotRestApi", "dbtGenerateTml", "modelTables"); + } + if (importWorksheets === null || importWorksheets === void 0) { + throw new RequiredError("ThoughtSpotRestApi", "dbtGenerateTml", "importWorksheets"); + } + const localVarPath = "/api/rest/2.0/dbt/generate-tml"; + const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.25.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.25.0"); + const useForm = canConsumeForm([ + "multipart/form-data" + ]); + let localVarFormParams; + if (useForm) { + localVarFormParams = new FormData(); + } else { + localVarFormParams = new URLSearchParams(); + } + if (dbtConnectionIdentifier !== void 0) { + localVarFormParams.append("dbt_connection_identifier", dbtConnectionIdentifier); + } + if (modelTables !== void 0) { + localVarFormParams.append("model_tables", modelTables); + } + if (importWorksheets !== void 0) { + localVarFormParams.append("import_worksheets", importWorksheets); + } + if (worksheets !== void 0) { + localVarFormParams.append("worksheets", worksheets); + } + if (fileContent !== void 0) { + if (localVarFormParams instanceof FormData) { + localVarFormParams.append("file_content", fileContent, fileContent.name); + } + } + requestContext.setBody(localVarFormParams); + if (!useForm) { + const contentType = ObjectSerializer.getPreferredMediaType([ + "multipart/form-data" + ]); + requestContext.setHeaderParam("Content-Type", contentType); + } + let authMethod; + authMethod = _config.authMethods["bearerAuth"]; + if (authMethod == null ? void 0 : authMethod.applySecurityAuthentication) { + yield authMethod == null ? void 0 : authMethod.applySecurityAuthentication(requestContext); + } + const defaultAuth = ((_a = _options == null ? void 0 : _options.authMethods) == null ? void 0 : _a.default) || ((_c = (_b = this.configuration) == null ? void 0 : _b.authMethods) == null ? void 0 : _c.default); + if (defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication) { + yield defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication(requestContext); + } + return requestContext; + }); + } + /** + * Version: 9.9.0.cl or later Gets a list of DBT connection objects by user and organization, available on the ThoughtSpot system. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege or `DATAMANAGEMENT` (**Can manage data**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the following Data control privileges may be required: - `CAN_MANAGE_CUSTOM_CALENDAR`(**Can manage custom calendars**) - `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) - `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` (**Can manage data models**) #### About search DBT connection To get details of a specific DBT connection identifier, database connection identifier, database connection name, database name, project name, project identifier, environment identifier , import type and author. + */ + dbtSearch(_options) { + return __async(this, null, function* () { + var _a, _b, _c; + let _config = _options || this.configuration; + const localVarPath = "/api/rest/2.0/dbt/search"; + const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.25.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.25.0"); + let authMethod; + authMethod = _config.authMethods["bearerAuth"]; + if (authMethod == null ? void 0 : authMethod.applySecurityAuthentication) { + yield authMethod == null ? void 0 : authMethod.applySecurityAuthentication(requestContext); + } + const defaultAuth = ((_a = _options == null ? void 0 : _options.authMethods) == null ? void 0 : _a.default) || ((_c = (_b = this.configuration) == null ? void 0 : _b.authMethods) == null ? void 0 : _c.default); + if (defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication) { + yield defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication(requestContext); + } + return requestContext; + }); + } + /** + * Version: 9.7.0.cl or later Deactivates a user account. Requires `ADMINISTRATION` (**Can administer Thoughtspot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `USER_ADMINISTRATION` (**Can manage users**) privilege is required. To deactivate a user account, the API request body must include the following information: - Username or the GUID of the user account - Base URL of the ThoughtSpot instance If the API request is successful, ThoughtSpot returns the activation URL in the response. The activation URL is valid for 14 days and can be used to re-activate the account and reset the password of the deactivated account. + * @param deactivateUserRequest + */ + deactivateUser(deactivateUserRequest, _options) { + return __async(this, null, function* () { + var _a, _b, _c; + let _config = _options || this.configuration; + if (deactivateUserRequest === null || deactivateUserRequest === void 0) { + throw new RequiredError("ThoughtSpotRestApi", "deactivateUser", "deactivateUserRequest"); + } + const localVarPath = "/api/rest/2.0/users/deactivate"; + const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.25.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.25.0"); + const contentType = ObjectSerializer.getPreferredMediaType([ + "application/json" + ]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = ObjectSerializer.stringify( + ObjectSerializer.serialize(deactivateUserRequest, "DeactivateUserRequest", ""), + contentType + ); + requestContext.setBody(serializedBody); + let authMethod; + authMethod = _config.authMethods["bearerAuth"]; + if (authMethod == null ? void 0 : authMethod.applySecurityAuthentication) { + yield authMethod == null ? void 0 : authMethod.applySecurityAuthentication(requestContext); + } + const defaultAuth = ((_a = _options == null ? void 0 : _options.authMethods) == null ? void 0 : _a.default) || ((_c = (_b = this.configuration) == null ? void 0 : _b.authMethods) == null ? void 0 : _c.default); + if (defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication) { + yield defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication(requestContext); + } + return requestContext; + }); + } + /** + * Version: 10.12.0.cl or later Deletes a [custom calendar](https://docs.thoughtspot.com/cloud/latest/connections-cust-cal). Requires `DATAMANAGEMENT` (**Can manage data**) or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your ThoughtSpot instance, the `CAN_MANAGE_CUSTOM_CALENDAR` (**Can manage custom calendars**) privilege is required. #### Usage guidelines To delete a custom calendar, specify the calendar ID as a path parameter in the request URL. + * @param calendarIdentifier Unique ID or name of the Calendar. + */ + deleteCalendar(calendarIdentifier, _options) { + return __async(this, null, function* () { + var _a, _b, _c; + let _config = _options || this.configuration; + if (calendarIdentifier === null || calendarIdentifier === void 0) { + throw new RequiredError("ThoughtSpotRestApi", "deleteCalendar", "calendarIdentifier"); + } + const localVarPath = "/api/rest/2.0/calendars/{calendar_identifier}/delete".replace("{calendar_identifier}", encodeURIComponent(String(calendarIdentifier))); + const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.25.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.25.0"); + let authMethod; + authMethod = _config.authMethods["bearerAuth"]; + if (authMethod == null ? void 0 : authMethod.applySecurityAuthentication) { + yield authMethod == null ? void 0 : authMethod.applySecurityAuthentication(requestContext); + } + const defaultAuth = ((_a = _options == null ? void 0 : _options.authMethods) == null ? void 0 : _a.default) || ((_c = (_b = this.configuration) == null ? void 0 : _b.authMethods) == null ? void 0 : _c.default); + if (defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication) { + yield defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication(requestContext); + } + return requestContext; + }); + } + /** + * Version: 26.4.0.cl or later Deletes one or more collections from ThoughtSpot. #### Delete options * **delete_children**: When set to `true`, deletes the child objects (metadata items) within the collection that the user has access to. Objects that the user does not have permission to delete will be skipped. * **dry_run**: When set to `true`, performs a preview of the deletion operation without actually deleting anything. The response shows what would be deleted, allowing you to review before committing the deletion. #### Response The response includes: * **metadata_deleted**: List of metadata objects that were successfully deleted * **metadata_skipped**: List of metadata objects that were skipped due to lack of permissions or other constraints + * @param deleteCollectionRequest + */ + deleteCollection(deleteCollectionRequest, _options) { + return __async(this, null, function* () { + var _a, _b, _c; + let _config = _options || this.configuration; + if (deleteCollectionRequest === null || deleteCollectionRequest === void 0) { + throw new RequiredError("ThoughtSpotRestApi", "deleteCollection", "deleteCollectionRequest"); + } + const localVarPath = "/api/rest/2.0/collections/delete"; + const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.25.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.25.0"); + const contentType = ObjectSerializer.getPreferredMediaType([ + "application/json" + ]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = ObjectSerializer.stringify( + ObjectSerializer.serialize(deleteCollectionRequest, "DeleteCollectionRequest", ""), + contentType + ); + requestContext.setBody(serializedBody); + let authMethod; + authMethod = _config.authMethods["bearerAuth"]; + if (authMethod == null ? void 0 : authMethod.applySecurityAuthentication) { + yield authMethod == null ? void 0 : authMethod.applySecurityAuthentication(requestContext); + } + const defaultAuth = ((_a = _options == null ? void 0 : _options.authMethods) == null ? void 0 : _a.default) || ((_c = (_b = this.configuration) == null ? void 0 : _b.authMethods) == null ? void 0 : _c.default); + if (defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication) { + yield defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication(requestContext); + } + return requestContext; + }); + } + /** + * Version: 9.2.0.cl or later Deletes Git repository configuration from your ThoughtSpot instance. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance on your instance, the `CAN_SETUP_VERSION_CONTROL` (**Can set up version control**) privilege. + * @param deleteConfigRequest + */ + deleteConfig(deleteConfigRequest, _options) { + return __async(this, null, function* () { + var _a, _b, _c; + let _config = _options || this.configuration; + if (deleteConfigRequest === null || deleteConfigRequest === void 0) { + throw new RequiredError("ThoughtSpotRestApi", "deleteConfig", "deleteConfigRequest"); + } + const localVarPath = "/api/rest/2.0/vcs/git/config/delete"; + const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.25.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.25.0"); + const contentType = ObjectSerializer.getPreferredMediaType([ + "application/json" + ]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = ObjectSerializer.stringify( + ObjectSerializer.serialize(deleteConfigRequest, "DeleteConfigRequest", ""), + contentType + ); + requestContext.setBody(serializedBody); + let authMethod; + authMethod = _config.authMethods["bearerAuth"]; + if (authMethod == null ? void 0 : authMethod.applySecurityAuthentication) { + yield authMethod == null ? void 0 : authMethod.applySecurityAuthentication(requestContext); + } + const defaultAuth = ((_a = _options == null ? void 0 : _options.authMethods) == null ? void 0 : _a.default) || ((_c = (_b = this.configuration) == null ? void 0 : _b.authMethods) == null ? void 0 : _c.default); + if (defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication) { + yield defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication(requestContext); + } + return requestContext; + }); + } + /** + * Version: 9.2.0.cl or later **Important**: This endpoint is deprecated and will be removed from ThoughtSpot in September 2025. ThoughtSpot strongly recommends using the [Delete Connection V2](#/http/api-endpoints/connections/delete-connection-v2) endpoint to delete your connection objects. #### Usage guidelines Deletes a connection object. Requires `DATAMANAGEMENT` (**Can manage data**) and edit permissions to the connection object, or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) privilege is required. **Note**: If a connection has dependent objects, make sure you remove its associations before the delete operation. + * @param deleteConnectionRequest + */ + deleteConnection(deleteConnectionRequest, _options) { + return __async(this, null, function* () { + var _a, _b, _c; + let _config = _options || this.configuration; + if (deleteConnectionRequest === null || deleteConnectionRequest === void 0) { + throw new RequiredError("ThoughtSpotRestApi", "deleteConnection", "deleteConnectionRequest"); + } + const localVarPath = "/api/rest/2.0/connection/delete"; + const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.25.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.25.0"); + const contentType = ObjectSerializer.getPreferredMediaType([ + "application/json" + ]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = ObjectSerializer.stringify( + ObjectSerializer.serialize(deleteConnectionRequest, "DeleteConnectionRequest", ""), + contentType + ); + requestContext.setBody(serializedBody); + let authMethod; + authMethod = _config.authMethods["bearerAuth"]; + if (authMethod == null ? void 0 : authMethod.applySecurityAuthentication) { + yield authMethod == null ? void 0 : authMethod.applySecurityAuthentication(requestContext); + } + const defaultAuth = ((_a = _options == null ? void 0 : _options.authMethods) == null ? void 0 : _a.default) || ((_c = (_b = this.configuration) == null ? void 0 : _b.authMethods) == null ? void 0 : _c.default); + if (defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication) { + yield defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication(requestContext); + } + return requestContext; + }); + } + /** + * Version: 10.12.0.cl or later Deletes connection configuration objects. Requires `DATAMANAGEMENT` (**Can manage data**) and edit permissions to the connection object, or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) privilege is required. + * @param deleteConnectionConfigurationRequest + */ + deleteConnectionConfiguration(deleteConnectionConfigurationRequest, _options) { + return __async(this, null, function* () { + var _a, _b, _c; + let _config = _options || this.configuration; + if (deleteConnectionConfigurationRequest === null || deleteConnectionConfigurationRequest === void 0) { + throw new RequiredError("ThoughtSpotRestApi", "deleteConnectionConfiguration", "deleteConnectionConfigurationRequest"); + } + const localVarPath = "/api/rest/2.0/connection-configurations/delete"; + const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.25.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.25.0"); + const contentType = ObjectSerializer.getPreferredMediaType([ + "application/json" + ]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = ObjectSerializer.stringify( + ObjectSerializer.serialize(deleteConnectionConfigurationRequest, "DeleteConnectionConfigurationRequest", ""), + contentType + ); + requestContext.setBody(serializedBody); + let authMethod; + authMethod = _config.authMethods["bearerAuth"]; + if (authMethod == null ? void 0 : authMethod.applySecurityAuthentication) { + yield authMethod == null ? void 0 : authMethod.applySecurityAuthentication(requestContext); + } + const defaultAuth = ((_a = _options == null ? void 0 : _options.authMethods) == null ? void 0 : _a.default) || ((_c = (_b = this.configuration) == null ? void 0 : _b.authMethods) == null ? void 0 : _c.default); + if (defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication) { + yield defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication(requestContext); + } + return requestContext; + }); + } + /** + * Version: 10.4.0.cl or later Deletes a connection object. **Note**: If a connection has dependent objects, make sure you remove its associations before the delete operation. Requires `DATAMANAGEMENT` (**Can manage data**) and edit permissions to the connection object, or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) privilege is required. + * @param connectionIdentifier Unique ID or name of the connection. + */ + deleteConnectionV2(connectionIdentifier, _options) { + return __async(this, null, function* () { + var _a, _b, _c; + let _config = _options || this.configuration; + if (connectionIdentifier === null || connectionIdentifier === void 0) { + throw new RequiredError("ThoughtSpotRestApi", "deleteConnectionV2", "connectionIdentifier"); + } + const localVarPath = "/api/rest/2.0/connections/{connection_identifier}/delete".replace("{connection_identifier}", encodeURIComponent(String(connectionIdentifier))); + const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.25.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.25.0"); + let authMethod; + authMethod = _config.authMethods["bearerAuth"]; + if (authMethod == null ? void 0 : authMethod.applySecurityAuthentication) { + yield authMethod == null ? void 0 : authMethod.applySecurityAuthentication(requestContext); + } + const defaultAuth = ((_a = _options == null ? void 0 : _options.authMethods) == null ? void 0 : _a.default) || ((_c = (_b = this.configuration) == null ? void 0 : _b.authMethods) == null ? void 0 : _c.default); + if (defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication) { + yield defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication(requestContext); + } + return requestContext; + }); + } + /** + * Version: 9.6.0.cl or later Removes the custom action specified in the API request. Requires `DEVELOPER` (**Has Developer privilege**) or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `DEVELOPER` (**Has developer privilege**) privilege is required. + * @param customActionIdentifier Unique ID or name of the custom action. + */ + deleteCustomAction(customActionIdentifier, _options) { + return __async(this, null, function* () { + var _a, _b, _c; + let _config = _options || this.configuration; + if (customActionIdentifier === null || customActionIdentifier === void 0) { + throw new RequiredError("ThoughtSpotRestApi", "deleteCustomAction", "customActionIdentifier"); + } + const localVarPath = "/api/rest/2.0/customization/custom-actions/{custom_action_identifier}/delete".replace("{custom_action_identifier}", encodeURIComponent(String(customActionIdentifier))); + const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.25.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.25.0"); + let authMethod; + authMethod = _config.authMethods["bearerAuth"]; + if (authMethod == null ? void 0 : authMethod.applySecurityAuthentication) { + yield authMethod == null ? void 0 : authMethod.applySecurityAuthentication(requestContext); + } + const defaultAuth = ((_a = _options == null ? void 0 : _options.authMethods) == null ? void 0 : _a.default) || ((_c = (_b = this.configuration) == null ? void 0 : _b.authMethods) == null ? void 0 : _c.default); + if (defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication) { + yield defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication(requestContext); + } + return requestContext; + }); + } + /** + * Version: 9.9.0.cl or later Removes the specified DBT connection object from the ThoughtSpot system. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) or `DATAMANAGEMENT` (**Can manage data ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the following Data control privileges may be required: - `CAN_MANAGE_CUSTOM_CALENDAR`(**Can manage custom calendars**) - `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) - `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` (**Can manage data models**) + * @param dbtConnectionIdentifier Unique ID of the DBT Connection. + */ + deleteDbtConnection(dbtConnectionIdentifier, _options) { + return __async(this, null, function* () { + var _a, _b, _c; + let _config = _options || this.configuration; + if (dbtConnectionIdentifier === null || dbtConnectionIdentifier === void 0) { + throw new RequiredError("ThoughtSpotRestApi", "deleteDbtConnection", "dbtConnectionIdentifier"); + } + const localVarPath = "/api/rest/2.0/dbt/{dbt_connection_identifier}/delete".replace("{dbt_connection_identifier}", encodeURIComponent(String(dbtConnectionIdentifier))); + const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.25.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.25.0"); + let authMethod; + authMethod = _config.authMethods["bearerAuth"]; + if (authMethod == null ? void 0 : authMethod.applySecurityAuthentication) { + yield authMethod == null ? void 0 : authMethod.applySecurityAuthentication(requestContext); + } + const defaultAuth = ((_a = _options == null ? void 0 : _options.authMethods) == null ? void 0 : _a.default) || ((_c = (_b = this.configuration) == null ? void 0 : _b.authMethods) == null ? void 0 : _c.default); + if (defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication) { + yield defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication(requestContext); + } + return requestContext; + }); + } + /** + * Version: 10.10.0.cl or later Deletes the configuration for the email customization. #### Pre-requisites Requires `DEVELOPER` (**has developer privilege**) or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `DEVELOPER` (**Has developer privilege**) privilege is required. **NOTE**:This endpoint in currently in beta. Contact ThoughtSpot support to enable this on your instance. #### Usage guidelines - Call the search API endpoint to get the `template_identifier` from the response. - Use that `template_identifier` as a parameter in this API request. + * @param templateIdentifier Unique ID or name of the email customization. + */ + deleteEmailCustomization(templateIdentifier, _options) { + return __async(this, null, function* () { + var _a, _b, _c; + let _config = _options || this.configuration; + if (templateIdentifier === null || templateIdentifier === void 0) { + throw new RequiredError("ThoughtSpotRestApi", "deleteEmailCustomization", "templateIdentifier"); + } + const localVarPath = "/api/rest/2.0/customization/email/{template_identifier}/delete".replace("{template_identifier}", encodeURIComponent(String(templateIdentifier))); + const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.25.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.25.0"); + let authMethod; + authMethod = _config.authMethods["bearerAuth"]; + if (authMethod == null ? void 0 : authMethod.applySecurityAuthentication) { + yield authMethod == null ? void 0 : authMethod.applySecurityAuthentication(requestContext); + } + const defaultAuth = ((_a = _options == null ? void 0 : _options.authMethods) == null ? void 0 : _a.default) || ((_c = (_b = this.configuration) == null ? void 0 : _b.authMethods) == null ? void 0 : _c.default); + if (defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication) { + yield defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication(requestContext); + } + return requestContext; + }); + } + /** + * Version: 9.0.0.cl or later Removes the specified metadata object from the ThoughtSpot system. Requires edit access to the metadata object. + * @param deleteMetadataRequest + */ + deleteMetadata(deleteMetadataRequest, _options) { + return __async(this, null, function* () { + var _a, _b, _c; + let _config = _options || this.configuration; + if (deleteMetadataRequest === null || deleteMetadataRequest === void 0) { + throw new RequiredError("ThoughtSpotRestApi", "deleteMetadata", "deleteMetadataRequest"); + } + const localVarPath = "/api/rest/2.0/metadata/delete"; + const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.25.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.25.0"); + const contentType = ObjectSerializer.getPreferredMediaType([ + "application/json" + ]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = ObjectSerializer.stringify( + ObjectSerializer.serialize(deleteMetadataRequest, "DeleteMetadataRequest", ""), + contentType + ); + requestContext.setBody(serializedBody); + let authMethod; + authMethod = _config.authMethods["bearerAuth"]; + if (authMethod == null ? void 0 : authMethod.applySecurityAuthentication) { + yield authMethod == null ? void 0 : authMethod.applySecurityAuthentication(requestContext); + } + const defaultAuth = ((_a = _options == null ? void 0 : _options.authMethods) == null ? void 0 : _a.default) || ((_c = (_b = this.configuration) == null ? void 0 : _b.authMethods) == null ? void 0 : _c.default); + if (defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication) { + yield defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication(requestContext); + } + return requestContext; + }); + } + /** + * Version: 9.0.0.cl or later Deletes an Org object from the ThoughtSpot system. Requires cluster administration (**Can administer Org**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `ORG_ADMINISTRATION` (**Can manage Orgs**) privilege is required. When you delete an Org, all its users and objects created in that Org context are removed. However, if the users in the deleted Org also exists in other Orgs, they are removed only from the deleted Org. + * @param orgIdentifier ID or name of the Org + */ + deleteOrg(orgIdentifier, _options) { + return __async(this, null, function* () { + var _a, _b, _c; + let _config = _options || this.configuration; + if (orgIdentifier === null || orgIdentifier === void 0) { + throw new RequiredError("ThoughtSpotRestApi", "deleteOrg", "orgIdentifier"); + } + const localVarPath = "/api/rest/2.0/orgs/{org_identifier}/delete".replace("{org_identifier}", encodeURIComponent(String(orgIdentifier))); + const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.25.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.25.0"); + let authMethod; + authMethod = _config.authMethods["bearerAuth"]; + if (authMethod == null ? void 0 : authMethod.applySecurityAuthentication) { + yield authMethod == null ? void 0 : authMethod.applySecurityAuthentication(requestContext); + } + const defaultAuth = ((_a = _options == null ? void 0 : _options.authMethods) == null ? void 0 : _a.default) || ((_c = (_b = this.configuration) == null ? void 0 : _b.authMethods) == null ? void 0 : _c.default); + if (defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication) { + yield defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication(requestContext); + } + return requestContext; + }); + } + /** + * Version: 10.12.0.cl or later Deletes the configuration for the email customization. #### Pre-requisites Requires `DEVELOPER` (**has developer privilege**) or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `DEVELOPER` (**Has developer privilege**) privilege is required. **NOTE**:This endpoint in currently in beta. Contact ThoughtSpot support to enable this on your instance. #### Usage guidelines - Call the search API endpoint to get the `org_identifier` from the response. - Use that `org_identifier` as a parameter in this API request. + * @param deleteOrgEmailCustomizationRequest + */ + deleteOrgEmailCustomization(deleteOrgEmailCustomizationRequest, _options) { + return __async(this, null, function* () { + var _a, _b, _c; + let _config = _options || this.configuration; + if (deleteOrgEmailCustomizationRequest === null || deleteOrgEmailCustomizationRequest === void 0) { + throw new RequiredError("ThoughtSpotRestApi", "deleteOrgEmailCustomization", "deleteOrgEmailCustomizationRequest"); + } + const localVarPath = "/api/rest/2.0/customization/email/delete"; + const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.25.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.25.0"); + const contentType = ObjectSerializer.getPreferredMediaType([ + "application/json" + ]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = ObjectSerializer.stringify( + ObjectSerializer.serialize(deleteOrgEmailCustomizationRequest, "DeleteOrgEmailCustomizationRequest", ""), + contentType + ); + requestContext.setBody(serializedBody); + let authMethod; + authMethod = _config.authMethods["bearerAuth"]; + if (authMethod == null ? void 0 : authMethod.applySecurityAuthentication) { + yield authMethod == null ? void 0 : authMethod.applySecurityAuthentication(requestContext); + } + const defaultAuth = ((_a = _options == null ? void 0 : _options.authMethods) == null ? void 0 : _a.default) || ((_c = (_b = this.configuration) == null ? void 0 : _b.authMethods) == null ? void 0 : _c.default); + if (defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication) { + yield defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication(requestContext); + } + return requestContext; + }); + } + /** + * Version: 9.5.0.cl or later Deletes a Role object from the ThoughtSpot system. Available only if [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance. To delete a Role, the `ROLE_ADMINISTRATION` (**Can manage roles**) privilege is required. + * @param roleIdentifier Unique ID or name of the Role. ReadOnly roles cannot be deleted. + */ + deleteRole(roleIdentifier, _options) { + return __async(this, null, function* () { + var _a, _b, _c; + let _config = _options || this.configuration; + if (roleIdentifier === null || roleIdentifier === void 0) { + throw new RequiredError("ThoughtSpotRestApi", "deleteRole", "roleIdentifier"); + } + const localVarPath = "/api/rest/2.0/roles/{role_identifier}/delete".replace("{role_identifier}", encodeURIComponent(String(roleIdentifier))); + const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.25.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.25.0"); + let authMethod; + authMethod = _config.authMethods["bearerAuth"]; + if (authMethod == null ? void 0 : authMethod.applySecurityAuthentication) { + yield authMethod == null ? void 0 : authMethod.applySecurityAuthentication(requestContext); + } + const defaultAuth = ((_a = _options == null ? void 0 : _options.authMethods) == null ? void 0 : _a.default) || ((_c = (_b = this.configuration) == null ? void 0 : _b.authMethods) == null ? void 0 : _c.default); + if (defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication) { + yield defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication(requestContext); + } + return requestContext; + }); + } + /** + * Deletes a scheduled job. Version: 9.4.0.cl or later Deletes a scheduled Liveboard job. Requires at least edit access to Liveboard or `ADMINISTRATION` (**Can administer Org**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `JOBSCHEDULING` (**Can schedule for others**) privilege is required. + * @param scheduleIdentifier Unique ID or name of the scheduled job. + */ + deleteSchedule(scheduleIdentifier, _options) { + return __async(this, null, function* () { + var _a, _b, _c; + let _config = _options || this.configuration; + if (scheduleIdentifier === null || scheduleIdentifier === void 0) { + throw new RequiredError("ThoughtSpotRestApi", "deleteSchedule", "scheduleIdentifier"); + } + const localVarPath = "/api/rest/2.0/schedules/{schedule_identifier}/delete".replace("{schedule_identifier}", encodeURIComponent(String(scheduleIdentifier))); + const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.25.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.25.0"); + let authMethod; + authMethod = _config.authMethods["bearerAuth"]; + if (authMethod == null ? void 0 : authMethod.applySecurityAuthentication) { + yield authMethod == null ? void 0 : authMethod.applySecurityAuthentication(requestContext); + } + const defaultAuth = ((_a = _options == null ? void 0 : _options.authMethods) == null ? void 0 : _a.default) || ((_c = (_b = this.configuration) == null ? void 0 : _b.authMethods) == null ? void 0 : _c.default); + if (defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication) { + yield defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication(requestContext); + } + return requestContext; + }); + } + /** + * Version: 9.0.0.cl or later Deletes a tag object from the ThoughtSpot system Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `TAGMANAGEMENT` (**Can manage tags**) privilege is required to create, edit, and delete tags. + * @param tagIdentifier Tag identifier Tag name or Tag id. + */ + deleteTag(tagIdentifier, _options) { + return __async(this, null, function* () { + var _a, _b, _c; + let _config = _options || this.configuration; + if (tagIdentifier === null || tagIdentifier === void 0) { + throw new RequiredError("ThoughtSpotRestApi", "deleteTag", "tagIdentifier"); + } + const localVarPath = "/api/rest/2.0/tags/{tag_identifier}/delete".replace("{tag_identifier}", encodeURIComponent(String(tagIdentifier))); + const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.25.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.25.0"); + let authMethod; + authMethod = _config.authMethods["bearerAuth"]; + if (authMethod == null ? void 0 : authMethod.applySecurityAuthentication) { + yield authMethod == null ? void 0 : authMethod.applySecurityAuthentication(requestContext); + } + const defaultAuth = ((_a = _options == null ? void 0 : _options.authMethods) == null ? void 0 : _a.default) || ((_c = (_b = this.configuration) == null ? void 0 : _b.authMethods) == null ? void 0 : _c.default); + if (defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication) { + yield defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication(requestContext); + } + return requestContext; + }); + } + /** + * Version: 9.0.0.cl or later Deletes a user from the ThoughtSpot system. If you want to remove a user from a specific Org but not from ThoughtSpot, update the group and Org mapping properties of the user object via a POST API call to the [/api/rest/2.0/users/{user_identifier}/update](#/http/api-endpoints/users/update-user) endpoint. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `USER_ADMINISTRATION` (**Can manage users**) privilege is required. + * @param userIdentifier GUID / name of the user + */ + deleteUser(userIdentifier, _options) { + return __async(this, null, function* () { + var _a, _b, _c; + let _config = _options || this.configuration; + if (userIdentifier === null || userIdentifier === void 0) { + throw new RequiredError("ThoughtSpotRestApi", "deleteUser", "userIdentifier"); + } + const localVarPath = "/api/rest/2.0/users/{user_identifier}/delete".replace("{user_identifier}", encodeURIComponent(String(userIdentifier))); + const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.25.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.25.0"); + let authMethod; + authMethod = _config.authMethods["bearerAuth"]; + if (authMethod == null ? void 0 : authMethod.applySecurityAuthentication) { + yield authMethod == null ? void 0 : authMethod.applySecurityAuthentication(requestContext); + } + const defaultAuth = ((_a = _options == null ? void 0 : _options.authMethods) == null ? void 0 : _a.default) || ((_c = (_b = this.configuration) == null ? void 0 : _b.authMethods) == null ? void 0 : _c.default); + if (defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication) { + yield defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication(requestContext); + } + return requestContext; + }); + } + /** + * Version: 9.0.0.cl or later Removes the specified group object from the ThoughtSpot system. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `GROUP_ADMINISTRATION` (**Can manage groups**) privilege is required. + * @param groupIdentifier GUID or name of the group. + */ + deleteUserGroup(groupIdentifier, _options) { + return __async(this, null, function* () { + var _a, _b, _c; + let _config = _options || this.configuration; + if (groupIdentifier === null || groupIdentifier === void 0) { + throw new RequiredError("ThoughtSpotRestApi", "deleteUserGroup", "groupIdentifier"); + } + const localVarPath = "/api/rest/2.0/groups/{group_identifier}/delete".replace("{group_identifier}", encodeURIComponent(String(groupIdentifier))); + const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.25.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.25.0"); + let authMethod; + authMethod = _config.authMethods["bearerAuth"]; + if (authMethod == null ? void 0 : authMethod.applySecurityAuthentication) { + yield authMethod == null ? void 0 : authMethod.applySecurityAuthentication(requestContext); + } + const defaultAuth = ((_a = _options == null ? void 0 : _options.authMethods) == null ? void 0 : _a.default) || ((_c = (_b = this.configuration) == null ? void 0 : _b.authMethods) == null ? void 0 : _c.default); + if (defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication) { + yield defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication(requestContext); + } + return requestContext; + }); + } + /** + * Delete a variable Version: 10.14.0.cl or later **Note:** This API endpoint is deprecated and will be removed from ThoughtSpot in a future release. Use [POST /api/rest/2.0/template/variables/delete](/api/rest/2.0/template/variables/delete) instead. Allows deleting a variable from ThoughtSpot. Requires ADMINISTRATION role and TENANT scope. The CAN_MANAGE_VARIABLES permission allows you to manage Formula Variables in the current organization scope. The API endpoint requires: * The variable identifier (ID or name) The operation will fail if: * The user lacks required permissions * The variable doesn\'t exist * The variable is being used by other objects + * @param identifier Unique id or name of the variable + */ + deleteVariable(identifier, _options) { + return __async(this, null, function* () { + var _a, _b, _c; + let _config = _options || this.configuration; + if (identifier === null || identifier === void 0) { + throw new RequiredError("ThoughtSpotRestApi", "deleteVariable", "identifier"); + } + const localVarPath = "/api/rest/2.0/template/variables/{identifier}/delete".replace("{identifier}", encodeURIComponent(String(identifier))); + const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.25.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.25.0"); + let authMethod; + authMethod = _config.authMethods["bearerAuth"]; + if (authMethod == null ? void 0 : authMethod.applySecurityAuthentication) { + yield authMethod == null ? void 0 : authMethod.applySecurityAuthentication(requestContext); + } + const defaultAuth = ((_a = _options == null ? void 0 : _options.authMethods) == null ? void 0 : _a.default) || ((_c = (_b = this.configuration) == null ? void 0 : _b.authMethods) == null ? void 0 : _c.default); + if (defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication) { + yield defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication(requestContext); + } + return requestContext; + }); + } + /** + * Delete variable(s) Version: 26.4.0.cl or later Allows deleting multiple variables from ThoughtSpot. Requires ADMINISTRATION role and TENANT scope. The CAN_MANAGE_VARIABLES permission allows you to manage Formula Variables in the current organization scope. The API endpoint requires: * The variable identifiers (IDs or names) The operation will fail if: * The user lacks required permissions * Any of the variables don\'t exist * Any of the variables are being used by other objects + * @param deleteVariablesRequest + */ + deleteVariables(deleteVariablesRequest, _options) { + return __async(this, null, function* () { + var _a, _b, _c; + let _config = _options || this.configuration; + if (deleteVariablesRequest === null || deleteVariablesRequest === void 0) { + throw new RequiredError("ThoughtSpotRestApi", "deleteVariables", "deleteVariablesRequest"); + } + const localVarPath = "/api/rest/2.0/template/variables/delete"; + const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.25.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.25.0"); + const contentType = ObjectSerializer.getPreferredMediaType([ + "application/json" + ]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = ObjectSerializer.stringify( + ObjectSerializer.serialize(deleteVariablesRequest, "DeleteVariablesRequest", ""), + contentType + ); + requestContext.setBody(serializedBody); + let authMethod; + authMethod = _config.authMethods["bearerAuth"]; + if (authMethod == null ? void 0 : authMethod.applySecurityAuthentication) { + yield authMethod == null ? void 0 : authMethod.applySecurityAuthentication(requestContext); + } + const defaultAuth = ((_a = _options == null ? void 0 : _options.authMethods) == null ? void 0 : _a.default) || ((_c = (_b = this.configuration) == null ? void 0 : _b.authMethods) == null ? void 0 : _c.default); + if (defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication) { + yield defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication(requestContext); + } + return requestContext; + }); + } + /** + * Version: 10.14.0.cl or later Deletes one or more webhook configurations by their unique id or name. Returns status of each deletion operation, including successfully deleted webhooks and any failures with error details. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) or `DEVELOPER` (**Has developer privilege**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, users with `CAN_MANAGE_WEBHOOKS` (**Can manage webhooks**) privilege are also authorized to perform this action. + * @param deleteWebhookConfigurationsRequest + */ + deleteWebhookConfigurations(deleteWebhookConfigurationsRequest, _options) { + return __async(this, null, function* () { + var _a, _b, _c; + let _config = _options || this.configuration; + if (deleteWebhookConfigurationsRequest === null || deleteWebhookConfigurationsRequest === void 0) { + throw new RequiredError("ThoughtSpotRestApi", "deleteWebhookConfigurations", "deleteWebhookConfigurationsRequest"); + } + const localVarPath = "/api/rest/2.0/webhooks/delete"; + const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.25.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.25.0"); + const contentType = ObjectSerializer.getPreferredMediaType([ + "application/json" + ]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = ObjectSerializer.stringify( + ObjectSerializer.serialize(deleteWebhookConfigurationsRequest, "DeleteWebhookConfigurationsRequest", ""), + contentType + ); + requestContext.setBody(serializedBody); + let authMethod; + authMethod = _config.authMethods["bearerAuth"]; + if (authMethod == null ? void 0 : authMethod.applySecurityAuthentication) { + yield authMethod == null ? void 0 : authMethod.applySecurityAuthentication(requestContext); + } + const defaultAuth = ((_a = _options == null ? void 0 : _options.authMethods) == null ? void 0 : _a.default) || ((_c = (_b = this.configuration) == null ? void 0 : _b.authMethods) == null ? void 0 : _c.default); + if (defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication) { + yield defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication(requestContext); + } + return requestContext; + }); + } + /** + * Version: 9.2.0.cl or later Allows you to deploy a commit and publish TML content to your ThoughtSpot instance. Requires at least edit access to the objects used in the deploy operation. The API deploys the head of the branch unless a `commit_id` is specified in the API request. If the branch name is not defined in the request, the default branch is considered for deploying commits. For more information, see [Git integration documentation](https://developers.thoughtspot.com/docs/git-integration). + * @param deployCommitRequest + */ + deployCommit(deployCommitRequest, _options) { + return __async(this, null, function* () { + var _a, _b, _c; + let _config = _options || this.configuration; + if (deployCommitRequest === null || deployCommitRequest === void 0) { + throw new RequiredError("ThoughtSpotRestApi", "deployCommit", "deployCommitRequest"); + } + const localVarPath = "/api/rest/2.0/vcs/git/commits/deploy"; + const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.25.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.25.0"); + const contentType = ObjectSerializer.getPreferredMediaType([ + "application/json" + ]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = ObjectSerializer.stringify( + ObjectSerializer.serialize(deployCommitRequest, "DeployCommitRequest", ""), + contentType + ); + requestContext.setBody(serializedBody); + let authMethod; + authMethod = _config.authMethods["bearerAuth"]; + if (authMethod == null ? void 0 : authMethod.applySecurityAuthentication) { + yield authMethod == null ? void 0 : authMethod.applySecurityAuthentication(requestContext); + } + const defaultAuth = ((_a = _options == null ? void 0 : _options.authMethods) == null ? void 0 : _a.default) || ((_c = (_b = this.configuration) == null ? void 0 : _b.authMethods) == null ? void 0 : _c.default); + if (defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication) { + yield defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication(requestContext); + } + return requestContext; + }); + } + /** + * Version: 9.9.0.cl or later Exports the difference in connection metadata between CDW and ThoughtSpot Requires `DATAMANAGEMENT` (**Can manage data**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the following Data control privileges may be required: - `CAN_MANAGE_CUSTOM_CALENDAR`(**Can manage custom calendars**) - `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) - `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` (**Can manage data models**) To download the connection metadata difference between ThoughtSpot and CDW, pass the connection GUID as `connection_identifier` in the API request. + * @param connectionIdentifier GUID of the connection + */ + downloadConnectionMetadataChanges(connectionIdentifier, _options) { + return __async(this, null, function* () { + var _a, _b, _c; + let _config = _options || this.configuration; + if (connectionIdentifier === null || connectionIdentifier === void 0) { + throw new RequiredError("ThoughtSpotRestApi", "downloadConnectionMetadataChanges", "connectionIdentifier"); + } + const localVarPath = "/api/rest/2.0/connections/download-connection-metadata-changes/{connection_identifier}".replace("{connection_identifier}", encodeURIComponent(String(connectionIdentifier))); + const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.25.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.25.0"); + let authMethod; + authMethod = _config.authMethods["bearerAuth"]; + if (authMethod == null ? void 0 : authMethod.applySecurityAuthentication) { + yield authMethod == null ? void 0 : authMethod.applySecurityAuthentication(requestContext); + } + const defaultAuth = ((_a = _options == null ? void 0 : _options.authMethods) == null ? void 0 : _a.default) || ((_c = (_b = this.configuration) == null ? void 0 : _b.authMethods) == null ? void 0 : _c.default); + if (defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication) { + yield defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication(requestContext); + } + return requestContext; + }); + } + /** + * Version: 9.0.0.cl or later Exports an Answer in the given file format. You can download the Answer data as a PDF, PNG, CSV, or XLSX file. Requires at least view access to the Answer. #### Usage guidelines In the request body, specify the GUID or name of the Answer and set `file_format`. The default file format is CSV. Use the `type` parameter to specify whether the Answer being exported is a saved Answer (`SAVED`) or a pinned Answer on a Liveboard (`PINNED`). Defaults to `SAVED`. When using `PINNED`, the `metadata_identifier` must be the container id. **NOTE**: * The downloadable file returned in API response file is extensionless. Please rename the downloaded file by typing in the relevant extension. * HTML rendering is not supported for PDF exports of Answers with tables. Optionally, you can define [runtime overrides](https://developers.thoughtspot.com/docs/fetch-data-and-report-apis#_runtime_overrides) to apply to the Answer data. + * @param exportAnswerReportRequest + */ + exportAnswerReport(exportAnswerReportRequest, _options) { + return __async(this, null, function* () { + var _a, _b, _c; + let _config = _options || this.configuration; + if (exportAnswerReportRequest === null || exportAnswerReportRequest === void 0) { + throw new RequiredError("ThoughtSpotRestApi", "exportAnswerReport", "exportAnswerReportRequest"); + } + const localVarPath = "/api/rest/2.0/report/answer"; + const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.25.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.25.0"); + const contentType = ObjectSerializer.getPreferredMediaType([ + "application/json" + ]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = ObjectSerializer.stringify( + ObjectSerializer.serialize(exportAnswerReportRequest, "ExportAnswerReportRequest", ""), + contentType + ); + requestContext.setBody(serializedBody); + let authMethod; + authMethod = _config.authMethods["bearerAuth"]; + if (authMethod == null ? void 0 : authMethod.applySecurityAuthentication) { + yield authMethod == null ? void 0 : authMethod.applySecurityAuthentication(requestContext); + } + const defaultAuth = ((_a = _options == null ? void 0 : _options.authMethods) == null ? void 0 : _a.default) || ((_c = (_b = this.configuration) == null ? void 0 : _b.authMethods) == null ? void 0 : _c.default); + if (defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication) { + yield defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication(requestContext); + } + return requestContext; + }); + } + /** + * Version: 9.0.0.cl or later Exports a Liveboard and its visualizations in PDF, PNG, CSV, or XLSX file format. The default `file_format` is CSV. Requires at least view access to the Liveboard. #### Usage guidelines In the request body, specify the GUID or name of the Liveboard. To generate a Liveboard report with specific visualizations, add GUIDs or names of the visualizations. **NOTE**: * The downloadable file returned in API response file is extensionless. Please rename the downloaded file by typing in the relevant extension. * Optionally, you can define [runtime overrides](https://developers.thoughtspot.com/docs/fetch-data-and-report-apis#_runtime_overrides) to apply to the Answer data. * To include unsaved changes in the report, pass the `transient_pinboard_content` script generated from the `getExportRequestForCurrentPinboard` method in the Visual Embed SDK. Upon successful execution, the API returns the report with unsaved changes, including ad hoc changes to visualizations. For more information, see [Liveboard Report API](https://developers.thoughtspot.com/docs/fetch-data-and-report-apis#_liveboard_report_api). * Starting with ThoughtSpot Cloud 10.9.0.cl release, the Liveboard can be exported in the PNG format in the resolution of your choice. To enable this on your instance, contact ThoughtSpot support. When this feature is enabled, the options `include_cover_page`,`include_filter_page` within the `png_options` will not be available for PNG exports. * Starting with the ThoughtSpot Cloud 26.2.0.cl release, * Liveboards can be exported in CSV format. * All visualizations within a Liveboard can be exported as individual CSV files. * When exporting multiple visualizations or the entire Liveboard, the system returns the report as a compressed ZIP file containing the separate CSV files for each visualization. * Liveboards can also be exported in XLSX format. * All selected visualizations are consolidated into a single Excel workbook (.xlsx), with each visualization placed in its own worksheet (tab). * XLSX exports are limited to a maximum of 255 worksheets (tabs) per workbook. + * @param exportLiveboardReportRequest + */ + exportLiveboardReport(exportLiveboardReportRequest, _options) { + return __async(this, null, function* () { + var _a, _b, _c; + let _config = _options || this.configuration; + if (exportLiveboardReportRequest === null || exportLiveboardReportRequest === void 0) { + throw new RequiredError("ThoughtSpotRestApi", "exportLiveboardReport", "exportLiveboardReportRequest"); + } + const localVarPath = "/api/rest/2.0/report/liveboard"; + const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.25.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.25.0"); + const contentType = ObjectSerializer.getPreferredMediaType([ + "application/json" + ]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = ObjectSerializer.stringify( + ObjectSerializer.serialize(exportLiveboardReportRequest, "ExportLiveboardReportRequest", ""), + contentType + ); + requestContext.setBody(serializedBody); + let authMethod; + authMethod = _config.authMethods["bearerAuth"]; + if (authMethod == null ? void 0 : authMethod.applySecurityAuthentication) { + yield authMethod == null ? void 0 : authMethod.applySecurityAuthentication(requestContext); + } + const defaultAuth = ((_a = _options == null ? void 0 : _options.authMethods) == null ? void 0 : _a.default) || ((_c = (_b = this.configuration) == null ? void 0 : _b.authMethods) == null ? void 0 : _c.default); + if (defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication) { + yield defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication(requestContext); + } + return requestContext; + }); + } + /** + * Version: 9.0.0.cl or later Exports the [TML](https://docs.thoughtspot.com/cloud/latest/tml) representation of metadata objects in JSON or YAML format. Requires `DATADOWNLOADING` (**Can download Data**) and at least view access to the metadata object. #### Usage guidelines * You can export one or several objects by passing metadata object GUIDs in the `metadata` array. * When exporting TML content for a Liveboard or Answer object, you can set `export_associated` to `true` to retrieve TML content for underlying Worksheets, Tables, or Views, including the GUID of each object within the headers. When `export_associated` is set to `true`, consider retrieving one metadata object at a time. * Set `export_fqns` to `true` to add FQNs of the referenced objects in the TML content. For example, if you send an API request to retrieve TML for a Liveboard and its associated objects, the API returns the TML content with FQNs of the referenced Worksheet. Exporting TML with FQNs is useful if ThoughtSpot has multiple objects with the same name and you want to eliminate ambiguity when importing TML files into ThoughtSpot. It eliminates the need for adding FQNs of the referenced objects manually during the import operation. * To export only the TML of feedbacks associated with an object, set the GUID of the object as `identifier`, and set the `type` as `FEEDBACK` in the `metadata` array. * To export the TML of an object along with the feedbacks associated with it, set the GUID of the object as `identifier`, set the `type` as `LOGIAL_TABLE` in the `metadata` array, and set `export_with_associated_feedbacks` in `export_options` to true. For more information, see [TML Documentation](https://developers.thoughtspot.com/docs/tml#_export_a_tml). For more information on feedbacks, see [Feedback Documentation](https://docs.thoughtspot.com/cloud/latest/sage-feedback). + * @param exportMetadataTMLRequest + */ + exportMetadataTML(exportMetadataTMLRequest, _options) { + return __async(this, null, function* () { + var _a, _b, _c; + let _config = _options || this.configuration; + if (exportMetadataTMLRequest === null || exportMetadataTMLRequest === void 0) { + throw new RequiredError("ThoughtSpotRestApi", "exportMetadataTML", "exportMetadataTMLRequest"); + } + const localVarPath = "/api/rest/2.0/metadata/tml/export"; + const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.25.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.25.0"); + const contentType = ObjectSerializer.getPreferredMediaType([ + "application/json" + ]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = ObjectSerializer.stringify( + ObjectSerializer.serialize(exportMetadataTMLRequest, "ExportMetadataTMLRequest", ""), + contentType + ); + requestContext.setBody(serializedBody); + let authMethod; + authMethod = _config.authMethods["bearerAuth"]; + if (authMethod == null ? void 0 : authMethod.applySecurityAuthentication) { + yield authMethod == null ? void 0 : authMethod.applySecurityAuthentication(requestContext); + } + const defaultAuth = ((_a = _options == null ? void 0 : _options.authMethods) == null ? void 0 : _a.default) || ((_c = (_b = this.configuration) == null ? void 0 : _b.authMethods) == null ? void 0 : _c.default); + if (defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication) { + yield defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication(requestContext); + } + return requestContext; + }); + } + /** + * Version: 10.1.0.cl or later Exports the [TML](https://docs.thoughtspot.com/cloud/latest/tml) representation of metadata objects in JSON or YAML format. ### **Permissions Required** Requires `DATAMANAGEMENT` (**Can manage data**) and `USERMANAGEMENT` (**Can manage users**) privileges. #### **Usage Guidelines** This API is only applicable for `USER`, `GROUP`, and `ROLES` metadata types. - `batch_offset` Indicates the starting position within the complete dataset from which the API should begin returning objects. Useful for paginating results efficiently. - `batch_size` Specifies the number of objects or items to retrieve in a single request. Helps control response size for better performance. - `edoc_format` Defines the format of the TML content. The exported metadata can be in JSON or YAML format. - `export_dependent` Specifies whether to include dependent metadata objects in the export. Ensures related objects are also retrieved if needed. - `all_orgs_override` Indicates whether the export operation applies across all organizations. Useful for multi-tenant environments where cross-org exports are required. + * @param exportMetadataTMLBatchedRequest + */ + exportMetadataTMLBatched(exportMetadataTMLBatchedRequest, _options) { + return __async(this, null, function* () { + var _a, _b, _c; + let _config = _options || this.configuration; + if (exportMetadataTMLBatchedRequest === null || exportMetadataTMLBatchedRequest === void 0) { + throw new RequiredError("ThoughtSpotRestApi", "exportMetadataTMLBatched", "exportMetadataTMLBatchedRequest"); + } + const localVarPath = "/api/rest/2.0/metadata/tml/export/batch"; + const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.25.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.25.0"); + const contentType = ObjectSerializer.getPreferredMediaType([ + "application/json" + ]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = ObjectSerializer.stringify( + ObjectSerializer.serialize(exportMetadataTMLBatchedRequest, "ExportMetadataTMLBatchedRequest", ""), + contentType + ); + requestContext.setBody(serializedBody); + let authMethod; + authMethod = _config.authMethods["bearerAuth"]; + if (authMethod == null ? void 0 : authMethod.applySecurityAuthentication) { + yield authMethod == null ? void 0 : authMethod.applySecurityAuthentication(requestContext); + } + const defaultAuth = ((_a = _options == null ? void 0 : _options.authMethods) == null ? void 0 : _a.default) || ((_c = (_b = this.configuration) == null ? void 0 : _b.authMethods) == null ? void 0 : _c.default); + if (defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication) { + yield defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication(requestContext); + } + return requestContext; + }); + } + /** + * Version: 9.0.0.cl or later Fetches data from a saved Answer. Requires at least view access to the saved Answer. The `record_size` attribute determines the number of records to retrieve in an API call. For more information about pagination, record size, and maximum row limit, see [Pagination and record size settings](https://developers.thoughtspot.com/docs/fetch-data-and-report-apis#_pagination_settings_for_data_and_report_apis). + * @param fetchAnswerDataRequest + */ + fetchAnswerData(fetchAnswerDataRequest, _options) { + return __async(this, null, function* () { + var _a, _b, _c; + let _config = _options || this.configuration; + if (fetchAnswerDataRequest === null || fetchAnswerDataRequest === void 0) { + throw new RequiredError("ThoughtSpotRestApi", "fetchAnswerData", "fetchAnswerDataRequest"); + } + const localVarPath = "/api/rest/2.0/metadata/answer/data"; + const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.25.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.25.0"); + const contentType = ObjectSerializer.getPreferredMediaType([ + "application/json" + ]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = ObjectSerializer.stringify( + ObjectSerializer.serialize(fetchAnswerDataRequest, "FetchAnswerDataRequest", ""), + contentType + ); + requestContext.setBody(serializedBody); + let authMethod; + authMethod = _config.authMethods["bearerAuth"]; + if (authMethod == null ? void 0 : authMethod.applySecurityAuthentication) { + yield authMethod == null ? void 0 : authMethod.applySecurityAuthentication(requestContext); + } + const defaultAuth = ((_a = _options == null ? void 0 : _options.authMethods) == null ? void 0 : _a.default) || ((_c = (_b = this.configuration) == null ? void 0 : _b.authMethods) == null ? void 0 : _c.default); + if (defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication) { + yield defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication(requestContext); + } + return requestContext; + }); + } + /** + * Version: 9.0.0.cl or later Fetches the underlying SQL query data for an Answer object. Requires at least view access to the Answer object. Upon successful execution, the API returns the SQL queries for the specified object as shown in this example: ``` { \"metadata_id\":\"8fbe44a8-46ad-4b16-8d39-184b2fada490\", \"metadata_name\":\"Total sales\", \"metadata_type\":\"ANSWER\", \"sql_queries\":[ { \"metadata_id\":\"8fbe44a8-46ad-4b16-8d39-184b2fada490\", \"metadata_name\":\"Total sales -test\", \"sql_query\":\"SELECT \\n \\\"ta_1\\\".\\\"REGION\\\" \\\"ca_1\\\", \\n \\\"ta_2\\\".\\\"PRODUCTNAME\\\" \\\"ca_2\\\", \\n \\\"ta_1\\\".\\\"STORENAME\\\" \\\"ca_3\\\", \\n CASE\\n WHEN sum(\\\"ta_3\\\".\\\"SALES\\\") IS NOT NULL THEN sum(\\\"ta_3\\\".\\\"SALES\\\")\\n ELSE 0\\n END \\\"ca_4\\\", \\n CASE\\n WHEN sum(\\\"ta_3\\\".\\\"QUANTITYPURCHASED\\\") IS NOT NULL THEN sum(\\\"ta_3\\\".\\\"QUANTITYPURCHASED\\\")\\n ELSE 0\\n END \\\"ca_5\\\"\\nFROM \\\"RETAILAPPAREL\\\".\\\"PUBLIC\\\".\\\"FACT_RETAPP_SALES\\\" \\\"ta_3\\\"\\n JOIN \\\"RETAILAPPAREL\\\".\\\"PUBLIC\\\".\\\"DIM_RETAPP_STORES\\\" \\\"ta_1\\\"\\n ON \\\"ta_3\\\".\\\"STOREID\\\" = \\\"ta_1\\\".\\\"STOREID\\\"\\n JOIN \\\"RETAILAPPAREL\\\".\\\"PUBLIC\\\".\\\"DIM_RETAPP_PRODUCTS\\\" \\\"ta_2\\\"\\n ON \\\"ta_3\\\".\\\"PRODUCTID\\\" = \\\"ta_2\\\".\\\"PRODUCTID\\\"\\nGROUP BY \\n \\\"ca_1\\\", \\n \\\"ca_2\\\", \\n \\\"ca_3\\\"\\n\" } ] } ``` + * @param fetchAnswerSqlQueryRequest + */ + fetchAnswerSqlQuery(fetchAnswerSqlQueryRequest, _options) { + return __async(this, null, function* () { + var _a, _b, _c; + let _config = _options || this.configuration; + if (fetchAnswerSqlQueryRequest === null || fetchAnswerSqlQueryRequest === void 0) { + throw new RequiredError("ThoughtSpotRestApi", "fetchAnswerSqlQuery", "fetchAnswerSqlQueryRequest"); + } + const localVarPath = "/api/rest/2.0/metadata/answer/sql"; + const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.25.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.25.0"); + const contentType = ObjectSerializer.getPreferredMediaType([ + "application/json" + ]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = ObjectSerializer.stringify( + ObjectSerializer.serialize(fetchAnswerSqlQueryRequest, "FetchAnswerSqlQueryRequest", ""), + contentType + ); + requestContext.setBody(serializedBody); + let authMethod; + authMethod = _config.authMethods["bearerAuth"]; + if (authMethod == null ? void 0 : authMethod.applySecurityAuthentication) { + yield authMethod == null ? void 0 : authMethod.applySecurityAuthentication(requestContext); + } + const defaultAuth = ((_a = _options == null ? void 0 : _options.authMethods) == null ? void 0 : _a.default) || ((_c = (_b = this.configuration) == null ? void 0 : _b.authMethods) == null ? void 0 : _c.default); + if (defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication) { + yield defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication(requestContext); + } + return requestContext; + }); + } + /** + * Version: 10.4.0.cl or later Gets information about the status of the TML async import task scheduled using the `/api/rest/2.0/metadata/tml/async/import` API call. To fetch the task details, specify the ID of the TML async import task. Requires access to the task ID. The API allows users who initiated the asynchronous TML import via `/api/rest/2.0/metadata/tml/async/import` to view the status of their tasks. Users with administration privilege can view the status of all import tasks initiated by the users in their Org. #### Usage guidelines See [TML API Documentation](https://developers.thoughtspot.com/docs/tml#_fetch_status_of_the_tml_import_task) for usage guidelines. + * @param fetchAsyncImportTaskStatusRequest + */ + fetchAsyncImportTaskStatus(fetchAsyncImportTaskStatusRequest, _options) { + return __async(this, null, function* () { + var _a, _b, _c; + let _config = _options || this.configuration; + if (fetchAsyncImportTaskStatusRequest === null || fetchAsyncImportTaskStatusRequest === void 0) { + throw new RequiredError("ThoughtSpotRestApi", "fetchAsyncImportTaskStatus", "fetchAsyncImportTaskStatusRequest"); + } + const localVarPath = "/api/rest/2.0/metadata/tml/async/status"; + const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.25.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.25.0"); + const contentType = ObjectSerializer.getPreferredMediaType([ + "application/json" + ]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = ObjectSerializer.stringify( + ObjectSerializer.serialize(fetchAsyncImportTaskStatusRequest, "FetchAsyncImportTaskStatusRequest", ""), + contentType + ); + requestContext.setBody(serializedBody); + let authMethod; + authMethod = _config.authMethods["bearerAuth"]; + if (authMethod == null ? void 0 : authMethod.applySecurityAuthentication) { + yield authMethod == null ? void 0 : authMethod.applySecurityAuthentication(requestContext); + } + const defaultAuth = ((_a = _options == null ? void 0 : _options.authMethods) == null ? void 0 : _a.default) || ((_c = (_b = this.configuration) == null ? void 0 : _b.authMethods) == null ? void 0 : _c.default); + if (defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication) { + yield defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication(requestContext); + } + return requestContext; + }); + } + /** + * Version: 10.12.0.cl or later Fetches column security rules for specified tables. This API endpoint retrieves column-level security rules configured for tables. It returns information about which columns are secured and which groups have access to those columns. #### Usage guidelines - Provide an array of table identifiers using either `identifier` (GUID or name) or `obj_identifier` (object ID) - At least one of `identifier` or `obj_identifier` must be provided for each table - The API returns column security rules for all specified tables - Users must have appropriate permissions to access security rules for the specified tables #### Required permissions - `ADMINISTRATION` - Can administer ThoughtSpot - `DATAMANAGEMENT` - Can manage data - `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` - Can manage worksheet views and tables #### Example request ```json { \"tables\": [ { \"identifier\": \"table-guid\", \"obj_identifier\": \"table-object-id\" } ] } ``` #### Response format The API returns an array of `ColumnSecurityRuleResponse` objects wrapped in a `data` field. Each `ColumnSecurityRuleResponse` object contains: - Table information (GUID and object ID) - Array of column security rules with column details, group access, and source table information #### Example response ```json { \"data\": [ { \"guid\": \"table-guid\", \"objId\": \"table-object-id\", \"columnSecurityRules\": [ { \"column\": { \"id\": \"col_123\", \"name\": \"Salary\" }, \"groups\": [ { \"id\": \"group_1\", \"name\": \"HR Department\" } ], \"sourceTableDetails\": { \"id\": \"source-table-guid\", \"name\": \"Employee_Data\" } } ] } ] } ``` + * @param fetchColumnSecurityRulesRequest + */ + fetchColumnSecurityRules(fetchColumnSecurityRulesRequest, _options) { + return __async(this, null, function* () { + var _a, _b, _c; + let _config = _options || this.configuration; + if (fetchColumnSecurityRulesRequest === null || fetchColumnSecurityRulesRequest === void 0) { + throw new RequiredError("ThoughtSpotRestApi", "fetchColumnSecurityRules", "fetchColumnSecurityRulesRequest"); + } + const localVarPath = "/api/rest/2.0/security/column/rules/fetch"; + const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.25.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.25.0"); + const contentType = ObjectSerializer.getPreferredMediaType([ + "application/json" + ]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = ObjectSerializer.stringify( + ObjectSerializer.serialize(fetchColumnSecurityRulesRequest, "FetchColumnSecurityRulesRequest", ""), + contentType + ); + requestContext.setBody(serializedBody); + let authMethod; + authMethod = _config.authMethods["bearerAuth"]; + if (authMethod == null ? void 0 : authMethod.applySecurityAuthentication) { + yield authMethod == null ? void 0 : authMethod.applySecurityAuthentication(requestContext); + } + const defaultAuth = ((_a = _options == null ? void 0 : _options.authMethods) == null ? void 0 : _a.default) || ((_c = (_b = this.configuration) == null ? void 0 : _b.authMethods) == null ? void 0 : _c.default); + if (defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication) { + yield defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication(requestContext); + } + return requestContext; + }); + } + /** + * Version: 9.9.0.cl or later Validates the difference in connection metadata between CDW and ThoughtSpot. Requires `DATAMANAGEMENT` (**Can manage data**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the following Data control privileges may be required: - `CAN_MANAGE_CUSTOM_CALENDAR`(**Can manage custom calendars**) - `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) - `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` (**Can manage data models**) Returns a boolean indicating whether there is any difference between the connection metadata at ThoughtSpot and CDW. To get the connection metadata difference status, pass the connection GUID as `connection_identifier` in the API request. + * @param connectionIdentifier GUID of the connection + */ + fetchConnectionDiffStatus(connectionIdentifier, _options) { + return __async(this, null, function* () { + var _a, _b, _c; + let _config = _options || this.configuration; + if (connectionIdentifier === null || connectionIdentifier === void 0) { + throw new RequiredError("ThoughtSpotRestApi", "fetchConnectionDiffStatus", "connectionIdentifier"); + } + const localVarPath = "/api/rest/2.0/connections/fetch-connection-diff-status/{connection_identifier}".replace("{connection_identifier}", encodeURIComponent(String(connectionIdentifier))); + const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.25.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.25.0"); + let authMethod; + authMethod = _config.authMethods["bearerAuth"]; + if (authMethod == null ? void 0 : authMethod.applySecurityAuthentication) { + yield authMethod == null ? void 0 : authMethod.applySecurityAuthentication(requestContext); + } + const defaultAuth = ((_a = _options == null ? void 0 : _options.authMethods) == null ? void 0 : _a.default) || ((_c = (_b = this.configuration) == null ? void 0 : _b.authMethods) == null ? void 0 : _c.default); + if (defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication) { + yield defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication(requestContext); + } + return requestContext; + }); + } + /** + * Version: 9.0.0.cl or later Gets data from a Liveboard object and its visualization. Requires at least view access to the Liveboard. #### Usage guidelines In the request body, specify the GUID or name of the Liveboard. To get data for specific visualizations, add the GUIDs or names of the visualizations in the API request. To include unsaved changes in the report, pass the `transient_pinboard_content` script generated from the `getExportRequestForCurrentPinboard` method in the Visual Embed SDK. Upon successful execution, the API returns the report with unsaved changes. If the new Liveboard experience mode, the transient content includes ad hoc changes to visualizations such as sorting, toggling of legends, and data drill down. For more information, and see [Liveboard data API](https://developers.thoughtspot.com/docs/fetch-data-and-report-apis#_fetch_liveboard_data_api). + * @param fetchLiveboardDataRequest + */ + fetchLiveboardData(fetchLiveboardDataRequest, _options) { + return __async(this, null, function* () { + var _a, _b, _c; + let _config = _options || this.configuration; + if (fetchLiveboardDataRequest === null || fetchLiveboardDataRequest === void 0) { + throw new RequiredError("ThoughtSpotRestApi", "fetchLiveboardData", "fetchLiveboardDataRequest"); + } + const localVarPath = "/api/rest/2.0/metadata/liveboard/data"; + const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.25.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.25.0"); + const contentType = ObjectSerializer.getPreferredMediaType([ + "application/json" + ]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = ObjectSerializer.stringify( + ObjectSerializer.serialize(fetchLiveboardDataRequest, "FetchLiveboardDataRequest", ""), + contentType + ); + requestContext.setBody(serializedBody); + let authMethod; + authMethod = _config.authMethods["bearerAuth"]; + if (authMethod == null ? void 0 : authMethod.applySecurityAuthentication) { + yield authMethod == null ? void 0 : authMethod.applySecurityAuthentication(requestContext); + } + const defaultAuth = ((_a = _options == null ? void 0 : _options.authMethods) == null ? void 0 : _a.default) || ((_c = (_b = this.configuration) == null ? void 0 : _b.authMethods) == null ? void 0 : _c.default); + if (defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication) { + yield defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication(requestContext); + } + return requestContext; + }); + } + /** + * Version: 9.0.0.cl or later Fetches the underlying SQL query data for a Liveboard object and its visualizations. Requires at least view access to the Liveboard object. To get SQL query data for a Liveboard, specify the GUID of the Liveboard. Optionally, you can add an array of visualization GUIDs to retrieve the SQL query data for visualizations in the Liveboard. Upon successful execution, the API returns the SQL queries for the specified object as shown in this example: ``` { \"metadata_id\": \"fa68ae91-7588-4136-bacd-d71fb12dda69\", \"metadata_name\": \"Total Sales\", \"metadata_type\": \"LIVEBOARD\", \"sql_queries\": [ { \"metadata_id\": \"b3b6d2b9-089a-490c-8e16-b144650b7843\", \"metadata_name\": \"Total quantity purchased, Total sales by region\", \"sql_query\": \"SELECT \\n \\\"ta_1\\\".\\\"REGION\\\" \\\"ca_1\\\", \\n CASE\\n WHEN sum(\\\"ta_2\\\".\\\"QUANTITYPURCHASED\\\") IS NOT NULL THEN sum(\\\"ta_2\\\".\\\"QUANTITYPURCHASED\\\")\\n ELSE 0\\n END \\\"ca_2\\\", \\n CASE\\n WHEN sum(\\\"ta_2\\\".\\\"SALES\\\") IS NOT NULL THEN sum(\\\"ta_2\\\".\\\"SALES\\\")\\n ELSE 0\\n END \\\"ca_3\\\"\\nFROM \\\"RETAILAPPAREL\\\".\\\"PUBLIC\\\".\\\"FACT_RETAPP_SALES\\\" \\\"ta_2\\\"\\n JOIN \\\"RETAILAPPAREL\\\".\\\"PUBLIC\\\".\\\"DIM_RETAPP_STORES\\\" \\\"ta_1\\\"\\n ON \\\"ta_2\\\".\\\"STOREID\\\" = \\\"ta_1\\\".\\\"STOREID\\\"\\nGROUP BY \\\"ca_1\\\"\" } ] } ``` + * @param fetchLiveboardSqlQueryRequest + */ + fetchLiveboardSqlQuery(fetchLiveboardSqlQueryRequest, _options) { + return __async(this, null, function* () { + var _a, _b, _c; + let _config = _options || this.configuration; + if (fetchLiveboardSqlQueryRequest === null || fetchLiveboardSqlQueryRequest === void 0) { + throw new RequiredError("ThoughtSpotRestApi", "fetchLiveboardSqlQuery", "fetchLiveboardSqlQueryRequest"); + } + const localVarPath = "/api/rest/2.0/metadata/liveboard/sql"; + const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.25.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.25.0"); + const contentType = ObjectSerializer.getPreferredMediaType([ + "application/json" + ]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = ObjectSerializer.stringify( + ObjectSerializer.serialize(fetchLiveboardSqlQueryRequest, "FetchLiveboardSqlQueryRequest", ""), + contentType + ); + requestContext.setBody(serializedBody); + let authMethod; + authMethod = _config.authMethods["bearerAuth"]; + if (authMethod == null ? void 0 : authMethod.applySecurityAuthentication) { + yield authMethod == null ? void 0 : authMethod.applySecurityAuthentication(requestContext); + } + const defaultAuth = ((_a = _options == null ? void 0 : _options.authMethods) == null ? void 0 : _a.default) || ((_c = (_b = this.configuration) == null ? void 0 : _b.authMethods) == null ? void 0 : _c.default); + if (defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication) { + yield defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication(requestContext); + } + return requestContext; + }); + } + /** + * Version: 9.0.0.cl or later Fetches security audit logs. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the [Admin Control](https://developers.thoughtspot.com/docs/rbac#_admin_control) privileges are required. #### Usage guidelines By default, the API retrieves logs for the last 24 hours. You can set a custom duration in EPOCH time. Make sure the log duration specified in your API request doesn’t exceed 24 hours. If you must fetch logs for a longer time range, modify the duration and make multiple sequential API requests. Upon successful execution, the API returns logs with the following information: * timestamp of the event * event ID * event type * name and GUID of the user * IP address of ThoughtSpot instance For more information see [Audit logs Documentation](https://developers.thoughtspot.com/docs/audit-logs). + * @param fetchLogsRequest + */ + fetchLogs(fetchLogsRequest, _options) { + return __async(this, null, function* () { + var _a, _b, _c; + let _config = _options || this.configuration; + if (fetchLogsRequest === null || fetchLogsRequest === void 0) { + throw new RequiredError("ThoughtSpotRestApi", "fetchLogs", "fetchLogsRequest"); + } + const localVarPath = "/api/rest/2.0/logs/fetch"; + const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.25.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.25.0"); + const contentType = ObjectSerializer.getPreferredMediaType([ + "application/json" + ]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = ObjectSerializer.stringify( + ObjectSerializer.serialize(fetchLogsRequest, "FetchLogsRequest", ""), + contentType + ); + requestContext.setBody(serializedBody); + let authMethod; + authMethod = _config.authMethods["bearerAuth"]; + if (authMethod == null ? void 0 : authMethod.applySecurityAuthentication) { + yield authMethod == null ? void 0 : authMethod.applySecurityAuthentication(requestContext); + } + const defaultAuth = ((_a = _options == null ? void 0 : _options.authMethods) == null ? void 0 : _a.default) || ((_c = (_b = this.configuration) == null ? void 0 : _b.authMethods) == null ? void 0 : _c.default); + if (defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication) { + yield defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication(requestContext); + } + return requestContext; + }); + } + /** + * Version: 26.3.0.cl or later This API fetches the object privileges present for the given list of principals (user or group), on the given set of objects. It supports pagination, which can be enabled and configured using the request parameters. It provides users access to certain features based on privilege based access control. #### Usage guidelines - Specify the `type` (`USER` or `USER_GROUP`) and `identifier` (either GUID or name) of the principals for which you want to retrieve object privilege information in the `principals` array. - Specify the `type` (`LOGICAL_TABLE`) and `identifier` (either GUID or name) of the metadata objects for which you want to retrieve object privilege information in the `metadata` array. Only `LOGICAL_TABLE` metadata type is supported for now. It may be extended for other metadata types in future. - To control the offset from where principals have to be fetched, use `record_offset`. When `record_offset` is 0, information is fetched from the beginning. - To control the number of principals to be fetched, use `record_size`. Default `record_size` is 20. - Ensure `record_offset` for a subsequent request is one more than the value of `record_size` of the previous request. - Ensure using correct Authorization Bearer Token corresponding to specific user & org. #### Example request ```json { \"principals\": [ { \"type\": \"type-1\", \"identifier\": \"principal-guid-or-name-1\" }, { \"type\": \"type-2\", \"identifier\": \"principal-guid-or-name-2\" } ], \"metadata\": [ { \"type\": \"metadata-type-1\", \"identifier\": \"metadata-guid-or-name-1\" }, { \"type\": \"metadata-type-2\", \"identifier\": \"metadata-guid-or-name-2\" } ], \"record_offset\": 0, \"record_size\": 20 } ``` #### Response format The API returns an array of `metadata_object_privileges` objects wrapped in JSON. Each `metadata_object_privileges` object contains: - Metadata information (GUID, name and type) - Array of `principal_object_privilege_info`. - Each `principal_object_privilege_info` contains: - Principal type. All principals of this type are listed as described below. - Array of `principal_object_privileges`. - Each `principal_object_privileges` contains: - Principal information (GUID, name, subtype) - List of applied object level privileges. #### Example response ```json { \"metadata_object_privileges\": [ { \"metadata_id\": \"metadata-guid-1\", \"metadata_name\": \"metadata-name-1\", \"metadata_type\": \"metadata-type-1\", \"principal_object_privilege_info\": [ { \"principal_type\": \"principal-type-1\", \"principal_object_privileges\": [ { \"principal_id\": \"principal-guid-1\", \"principal_name\": \"principal-name-1\", \"principal_sub_type\": \"principal-sub-type-1\", \"object_privileges\": \"[object-privilege-1, object-privilege-2]\" }, { \"principal_id\": \"principal-guid-2\", \"principal_name\": \"principal-name-2\", \"principal_sub_type\": \"principal-sub-type-2\", \"object_privileges\": \"[object-privilege-1, object-privilege-2]\" } ] }, { \"principal_type\": \"principal-type-2\", \"principal_object_privileges\": [ { \"principal_id\": \"principal-guid-3\", \"principal_name\": \"principal-guid-4\", \"principal_sub_type\": \"principal-sub-type-4\", \"object_privileges\": \"[object-privilege-1]\" } ] } ] }, { \"metadata_id\": \"metadata-guid-2\", \"metadata_name\": \"metadata-name-2\", \"metadata_type\": \"metadata-type-2\", \"principal_object_privilege_info\": [ { \"principal_type\": \"principal-type-1\", \"principal_object_privileges\": [ { \"principal_id\": \"principal-guid-1\", \"principal_name\": \"principal-name-1\", \"principal_sub_type\": \"principal-sub-type-1\", \"object_privileges\": \"[object-privilege-3, object-privilege-4]\" }, { \"principal_id\": \"principal-guid-2\", \"principal_name\": \"principal-name-2\", \"principal_sub_type\": \"principal-sub-type-2\", \"object_privileges\": \"[object-privilege-4]\" } ] } ] } ] } ``` + * @param fetchObjectPrivilegesRequest + */ + fetchObjectPrivileges(fetchObjectPrivilegesRequest, _options) { + return __async(this, null, function* () { + var _a, _b, _c; + let _config = _options || this.configuration; + if (fetchObjectPrivilegesRequest === null || fetchObjectPrivilegesRequest === void 0) { + throw new RequiredError("ThoughtSpotRestApi", "fetchObjectPrivileges", "fetchObjectPrivilegesRequest"); + } + const localVarPath = "/api/rest/2.0/security/metadata/fetch-object-privileges"; + const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.25.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.25.0"); + const contentType = ObjectSerializer.getPreferredMediaType([ + "application/json" + ]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = ObjectSerializer.stringify( + ObjectSerializer.serialize(fetchObjectPrivilegesRequest, "FetchObjectPrivilegesRequest", ""), + contentType + ); + requestContext.setBody(serializedBody); + let authMethod; + authMethod = _config.authMethods["bearerAuth"]; + if (authMethod == null ? void 0 : authMethod.applySecurityAuthentication) { + yield authMethod == null ? void 0 : authMethod.applySecurityAuthentication(requestContext); + } + const defaultAuth = ((_a = _options == null ? void 0 : _options.authMethods) == null ? void 0 : _a.default) || ((_c = (_b = this.configuration) == null ? void 0 : _b.authMethods) == null ? void 0 : _c.default); + if (defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication) { + yield defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication(requestContext); + } + return requestContext; + }); + } + /** + * Version: 9.0.0.cl or later Fetches object permission details for a given principal object such as a user and group. Requires view access to the metadata object. #### Usage guidelines * To get a list of all metadata objects that a user or group can access, specify the `type` and GUID or name of the principal. * To get permission details for a specific object, add the `type` and GUID or name of the metadata object to your API request. Upon successful execution, the API returns a list of metadata objects and permission details for each object. + * @param fetchPermissionsOfPrincipalsRequest + */ + fetchPermissionsOfPrincipals(fetchPermissionsOfPrincipalsRequest, _options) { + return __async(this, null, function* () { + var _a, _b, _c; + let _config = _options || this.configuration; + if (fetchPermissionsOfPrincipalsRequest === null || fetchPermissionsOfPrincipalsRequest === void 0) { + throw new RequiredError("ThoughtSpotRestApi", "fetchPermissionsOfPrincipals", "fetchPermissionsOfPrincipalsRequest"); + } + const localVarPath = "/api/rest/2.0/security/principals/fetch-permissions"; + const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.25.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.25.0"); + const contentType = ObjectSerializer.getPreferredMediaType([ + "application/json" + ]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = ObjectSerializer.stringify( + ObjectSerializer.serialize(fetchPermissionsOfPrincipalsRequest, "FetchPermissionsOfPrincipalsRequest", ""), + contentType + ); + requestContext.setBody(serializedBody); + let authMethod; + authMethod = _config.authMethods["bearerAuth"]; + if (authMethod == null ? void 0 : authMethod.applySecurityAuthentication) { + yield authMethod == null ? void 0 : authMethod.applySecurityAuthentication(requestContext); + } + const defaultAuth = ((_a = _options == null ? void 0 : _options.authMethods) == null ? void 0 : _a.default) || ((_c = (_b = this.configuration) == null ? void 0 : _b.authMethods) == null ? void 0 : _c.default); + if (defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication) { + yield defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication(requestContext); + } + return requestContext; + }); + } + /** + * Version: 9.0.0.cl or later Fetches permission details for a given metadata object. Requires view access to the metadata object. #### Usage guidelines * To fetch a list of users and groups for a metadata object, specify `type` and GUID or name of the metadata object. * To get permission details for a specific user or group, add `type` and GUID or name of the principal object to your API request. Upon successful execution, the API returns permission details and principal information for the object specified in the API request. + * @param fetchPermissionsOnMetadataRequest + */ + fetchPermissionsOnMetadata(fetchPermissionsOnMetadataRequest, _options) { + return __async(this, null, function* () { + var _a, _b, _c; + let _config = _options || this.configuration; + if (fetchPermissionsOnMetadataRequest === null || fetchPermissionsOnMetadataRequest === void 0) { + throw new RequiredError("ThoughtSpotRestApi", "fetchPermissionsOnMetadata", "fetchPermissionsOnMetadataRequest"); + } + const localVarPath = "/api/rest/2.0/security/metadata/fetch-permissions"; + const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.25.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.25.0"); + const contentType = ObjectSerializer.getPreferredMediaType([ + "application/json" + ]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = ObjectSerializer.stringify( + ObjectSerializer.serialize(fetchPermissionsOnMetadataRequest, "FetchPermissionsOnMetadataRequest", ""), + contentType + ); + requestContext.setBody(serializedBody); + let authMethod; + authMethod = _config.authMethods["bearerAuth"]; + if (authMethod == null ? void 0 : authMethod.applySecurityAuthentication) { + yield authMethod == null ? void 0 : authMethod.applySecurityAuthentication(requestContext); + } + const defaultAuth = ((_a = _options == null ? void 0 : _options.authMethods) == null ? void 0 : _a.default) || ((_c = (_b = this.configuration) == null ? void 0 : _b.authMethods) == null ? void 0 : _c.default); + if (defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication) { + yield defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication(requestContext); + } + return requestContext; + }); + } + /** + * Version: 9.0.0.cl or later Enforces logout on current user sessions. Use this API with caution as it may invalidate active user sessions and force users to re-login. Make sure you specify the usernames or GUIDs. If you pass null values in the API call, all user sessions on your cluster become invalid, and the users are forced to re-login. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `USER_ADMINISTRATION` (**Can manage users**) privilege is required. + * @param forceLogoutUsersRequest + */ + forceLogoutUsers(forceLogoutUsersRequest, _options) { + return __async(this, null, function* () { + var _a, _b, _c; + let _config = _options || this.configuration; + if (forceLogoutUsersRequest === null || forceLogoutUsersRequest === void 0) { + throw new RequiredError("ThoughtSpotRestApi", "forceLogoutUsers", "forceLogoutUsersRequest"); + } + const localVarPath = "/api/rest/2.0/users/force-logout"; + const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.25.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.25.0"); + const contentType = ObjectSerializer.getPreferredMediaType([ + "application/json" + ]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = ObjectSerializer.stringify( + ObjectSerializer.serialize(forceLogoutUsersRequest, "ForceLogoutUsersRequest", ""), + contentType + ); + requestContext.setBody(serializedBody); + let authMethod; + authMethod = _config.authMethods["bearerAuth"]; + if (authMethod == null ? void 0 : authMethod.applySecurityAuthentication) { + yield authMethod == null ? void 0 : authMethod.applySecurityAuthentication(requestContext); + } + const defaultAuth = ((_a = _options == null ? void 0 : _options.authMethods) == null ? void 0 : _a.default) || ((_c = (_b = this.configuration) == null ? void 0 : _b.authMethods) == null ? void 0 : _c.default); + if (defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication) { + yield defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication(requestContext); + } + return requestContext; + }); + } + /** + * Version: 10.12.0.cl or later Exports a [custom calendar](https://docs.thoughtspot.com/cloud/latest/connections-cust-cal) in the CSV format. Requires `DATAMANAGEMENT` (**Can manage data**) or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your ThoughtSpot instance, the `CAN_MANAGE_CUSTOM_CALENDAR` (**Can manage custom calendars**) privilege is required. #### Usage guidelines Use this API to download a custom calendar in the CSV file format. In your API request, specify the following parameters. * Start and end date of the calendar. For \"month offset\" calendars, the start date must match the month defined in the `month_offset` attribute. You can also specify optional parameters such as the starting day of the week and prefixes for the quarter and year labels. + * @param generateCSVRequest + */ + generateCSV(generateCSVRequest, _options) { + return __async(this, null, function* () { + var _a, _b, _c; + let _config = _options || this.configuration; + if (generateCSVRequest === null || generateCSVRequest === void 0) { + throw new RequiredError("ThoughtSpotRestApi", "generateCSV", "generateCSVRequest"); + } + const localVarPath = "/api/rest/2.0/calendars/generate-csv"; + const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.25.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.25.0"); + const contentType = ObjectSerializer.getPreferredMediaType([ + "application/json" + ]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = ObjectSerializer.stringify( + ObjectSerializer.serialize(generateCSVRequest, "GenerateCSVRequest", ""), + contentType + ); + requestContext.setBody(serializedBody); + let authMethod; + authMethod = _config.authMethods["bearerAuth"]; + if (authMethod == null ? void 0 : authMethod.applySecurityAuthentication) { + yield authMethod == null ? void 0 : authMethod.applySecurityAuthentication(requestContext); + } + const defaultAuth = ((_a = _options == null ? void 0 : _options.authMethods) == null ? void 0 : _a.default) || ((_c = (_b = this.configuration) == null ? void 0 : _b.authMethods) == null ? void 0 : _c.default); + if (defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication) { + yield defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication(requestContext); + } + return requestContext; + }); + } + /** + * Version: 9.0.0.cl or later Retrieves details of the current user session for the token provided in the request header. Any ThoughtSpot user can access this endpoint and send an API request. The data returned in the API response varies according to user\'s privilege and object access permissions. **NOTE**: In ThoughtSpot, users with cluster administration privileges can access all Orgs by default. However, unless the administrator is explicitly added to an Org, the Orgs list in the session information returned by the API will include only the Primary Org. To include other Orgs in the API response, you must explicitly add the administrator to each Org in the Admin settings page in the UI or via user REST API. + */ + getCurrentUserInfo(_options) { + return __async(this, null, function* () { + var _a, _b, _c; + let _config = _options || this.configuration; + const localVarPath = "/api/rest/2.0/auth/session/user"; + const requestContext = _config.baseServer.makeRequestContext(localVarPath, "GET" /* GET */); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.25.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.25.0"); + let authMethod; + authMethod = _config.authMethods["bearerAuth"]; + if (authMethod == null ? void 0 : authMethod.applySecurityAuthentication) { + yield authMethod == null ? void 0 : authMethod.applySecurityAuthentication(requestContext); + } + const defaultAuth = ((_a = _options == null ? void 0 : _options.authMethods) == null ? void 0 : _a.default) || ((_c = (_b = this.configuration) == null ? void 0 : _b.authMethods) == null ? void 0 : _c.default); + if (defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication) { + yield defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication(requestContext); + } + return requestContext; + }); + } + /** + * Version: 9.4.0.cl or later Retrieves details of the current session token for the bearer token provided in the request header. This API endpoint does not create a new token. Instead, it returns details about the token, including the token string, creation time, expiration time, and the associated user. Use this endpoint to introspect your current session token, debug authentication issues, or when a frontend application needs session token details. Any ThoughtSpot user with a valid bearer token can access this endpoint and send an API request + */ + getCurrentUserToken(_options) { + return __async(this, null, function* () { + var _a, _b, _c; + let _config = _options || this.configuration; + const localVarPath = "/api/rest/2.0/auth/session/token"; + const requestContext = _config.baseServer.makeRequestContext(localVarPath, "GET" /* GET */); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.25.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.25.0"); + let authMethod; + authMethod = _config.authMethods["bearerAuth"]; + if (authMethod == null ? void 0 : authMethod.applySecurityAuthentication) { + yield authMethod == null ? void 0 : authMethod.applySecurityAuthentication(requestContext); + } + const defaultAuth = ((_a = _options == null ? void 0 : _options.authMethods) == null ? void 0 : _a.default) || ((_c = (_b = this.configuration) == null ? void 0 : _b.authMethods) == null ? void 0 : _c.default); + if (defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication) { + yield defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication(requestContext); + } + return requestContext; + }); + } + /** + * Version: 10.4.0.cl or later Creates an authentication token that provides values for the formula variables in the Row Level Security (RLS) rules for a given user. Recommended for use cases that require Attribute-based access control (ABAC) via RLS. #### Required privileges To add a new user and assign privileges during auto-creation, the `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege is required. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled, the `CONTROL_TRUSTED_AUTH` (**Can Enable or Disable Trusted Authentication**) privilege and edit access to the data source are required. To configure formula variables for all Orgs on your instance or the Primary Org, cluster administration privileges are required. Org administrators can configure formula variables for their respective Orgs. If Role-Based Access Control (RBAC) is enabled, users with the `CAN_MANAGE_VARIABLES` (**Can manage variables**) role privilege can also create and manage variables for their Org context. #### Usage guidelines You can generate a token by providing a `username` and `password`, or by using a `secret_key`. To generate a `secret_key`, the administrator must enable [Trusted authentication](https://developers.thoughtspot.com/docs/trusted-auth-secret-key) in the **Develop** > **Customizations** > **Security Settings** page. **Note**: * When both `password` and `secret_key` are included in the API request, `password` takes precedence. * If [Multi-Factor Authentication (MFA)](https://docs.thoughtspot.com/cloud/latest/authentication-local-mfa) is enabled on your instance, the API login request with `username` and `password` returns an error. You can switch to token-based authentication with `secret_key` or contact ThoughtSpot Support for assistance. The token obtained from ThoughtSpot is valid for 5 minutes by default. You can configure the token expiration time as required. #### ABAC via RLS To implement ABAC via RLS and assign security entitlements to users during session creation, generate a token with custom variable values. The values set in the authentication token are applied to the formula variables referenced in RLS rules at the table level, which determines the data each user can access based on their entitlements. The variable values can be configured to persist for a specific set of Models in user sessions initiated with the token, allowing different RLS rules to be set for different data models. Once defined, the rules are added to the user\'s `variable_values` object, after which all sessions will use the persisted values. For more information, see [ABAC via tokens Documentation](https://developers.thoughtspot.com/docs/abac-via-rls-variables). ##### Formula variables Before defining variable values, ensure the variables are created and available on your instance. To create a formula variable, you can use the **Create variable** (`/api/rest/2.0/template/variables/create`) REST API endpoint, with the variable `type` set as `Formula_Variable` in the API request. The API doesn\'t support `\"persist_option\": \"RESET\"` and `\"persist_option\": \"NONE\"` when `variable_values` are defined in the request. If you are using `variable_values` for token generation, you must use other supported persist options such as `APPEND` or `REPLACE`. If you want to use `RESET` or `NONE`, do not pass any `variable_values`. In such cases, `variable_values` will remain unaffected. #### Supported objects The supported object type is `LOGICAL_TABLE`. When using `object_id` with `variable_values`, models are supported. #### Just-in-time provisioning For [just-in-time user creation and provisioning](https://developers.thoughtspot.com/docs/just-in-time-provisioning), specify the following attributes in the API request: * `auto_create` * `username` * `display_name` * `email` * `groups` Set `auto_create` to `true` if the username does not exist in ThoughtSpot. If the username already exists in ThoughtSpot and `auto_create` is set to `true`, user properties such as display name, email, Org and group entitlements will not be updated with new values. Setting `auto_create` to `true` does not create formula variables. Hence, this setting will not be applicable to `variable_values`. #### Important point to note All options in the token creation APIs that define user access to data in ThoughtSpot will take effect during token creation, not when the token is used for authentication. For example, `auto_create:true` will create the user when the authentication token is created. Persist options such as `APPEND` and `REPLACE` will persist `variable_values` on the user profile when the token is created. + * @param getCustomAccessTokenRequest + */ + getCustomAccessToken(getCustomAccessTokenRequest, _options) { + return __async(this, null, function* () { + var _a, _b, _c; + let _config = _options || this.configuration; + if (getCustomAccessTokenRequest === null || getCustomAccessTokenRequest === void 0) { + throw new RequiredError("ThoughtSpotRestApi", "getCustomAccessToken", "getCustomAccessTokenRequest"); + } + const localVarPath = "/api/rest/2.0/auth/token/custom"; + const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.25.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.25.0"); + const contentType = ObjectSerializer.getPreferredMediaType([ + "application/json" + ]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = ObjectSerializer.stringify( + ObjectSerializer.serialize(getCustomAccessTokenRequest, "GetCustomAccessTokenRequest", ""), + contentType + ); + requestContext.setBody(serializedBody); + const defaultAuth = ((_a = _options == null ? void 0 : _options.authMethods) == null ? void 0 : _a.default) || ((_c = (_b = this.configuration) == null ? void 0 : _b.authMethods) == null ? void 0 : _c.default); + if (defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication) { + yield defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication(requestContext); + } + return requestContext; + }); + } + /** + * Version: 10.15.0.cl or later Suggests the most relevant data sources for a given natural language query, ranked by confidence with LLM-generated reasoning. Requires `CAN_USE_SPOTTER` privilege and at least view-level access to the underlying metadata entities referenced in the response. #### Usage guidelines The request must include: - `query`: the natural language question to find relevant data sources for If the request is successful, the API returns a ranked list of suggested data sources, each containing: - `confidence`: a float score indicating the model\'s confidence in the relevance of the suggestion - `details`: metadata about the data source - `data_source_identifier`: the unique ID of the data source - `data_source_name`: the display name of the data source - `description`: a description of the data source - `reasoning`: LLM-generated rationale explaining why the data source was recommended #### Error responses | Code | Description | |------|--------------------------------------------------------------------------------------------------------------------------------------------| | 401 | Unauthorized — authentication token is missing, expired, or invalid. | | 403 | Forbidden — the authenticated user does not have `CAN_USE_SPOTTER` privilege or lacks view permission on the underlying metadata entities. | > ###### Note: > * This endpoint is currently in Beta. Breaking changes may be introduced before it is made Generally Available. > * This endpoint requires Spotter — please contact ThoughtSpot Support to enable Spotter on your cluster. + * @param getDataSourceSuggestionsRequest + */ + getDataSourceSuggestions(getDataSourceSuggestionsRequest, _options) { + return __async(this, null, function* () { + var _a, _b, _c; + let _config = _options || this.configuration; + if (getDataSourceSuggestionsRequest === null || getDataSourceSuggestionsRequest === void 0) { + throw new RequiredError("ThoughtSpotRestApi", "getDataSourceSuggestions", "getDataSourceSuggestionsRequest"); + } + const localVarPath = "/api/rest/2.0/ai/data-source-suggestions"; + const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.25.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.25.0"); + const contentType = ObjectSerializer.getPreferredMediaType([ + "application/json" + ]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = ObjectSerializer.stringify( + ObjectSerializer.serialize(getDataSourceSuggestionsRequest, "GetDataSourceSuggestionsRequest", ""), + contentType + ); + requestContext.setBody(serializedBody); + let authMethod; + authMethod = _config.authMethods["bearerAuth"]; + if (authMethod == null ? void 0 : authMethod.applySecurityAuthentication) { + yield authMethod == null ? void 0 : authMethod.applySecurityAuthentication(requestContext); + } + const defaultAuth = ((_a = _options == null ? void 0 : _options.authMethods) == null ? void 0 : _a.default) || ((_c = (_b = this.configuration) == null ? void 0 : _b.authMethods) == null ? void 0 : _c.default); + if (defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication) { + yield defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication(requestContext); + } + return requestContext; + }); + } + /** + * Version: 9.0.0.cl or later Generates an authentication token for creating a full session in ThoughtSpot for a given user. Recommended for use cases that do not require Attribute-based access control (ABAC) via Row Level Security (RLS). #### Usage guidelines You can generate a token for a user by providing a `username` and `password`, or by using the `secret_key` generated for your instance. To generate a `secret_key`, the administrator must enable [Trusted authentication](https://developers.thoughtspot.com/docs/trusted-auth-secret-key) in the **Develop** > **Customizations** > **Security Settings** page. **Note**: * When both `password` and `secret_key` are included in the API request, `password` takes precedence. * If [Multi-Factor Authentication (MFA)](https://docs.thoughtspot.com/cloud/latest/authentication-local-mfa) is enabled on your instance, the API login request with `username` and `password` returns an error. You can switch to token-based authentication with `secret_key` or contact ThoughtSpot Support for assistance. The token obtained from ThoughtSpot is valid for 5 minutes by default. You can configure the token expiration time as required. #### Just-in-time provisioning For [just-in-time user creation and provisioning](https://developers.thoughtspot.com/docs/just-in-time-provisioning), specify the following attributes in the API request: * `auto_create` * `username` * `display_name` * `email` * `group_identifiers` Set `auto_create` to `true` if the username does not exist in ThoughtSpot. If the user already exists in ThoughtSpot and `auto_create` is set to `true`, user properties such as display name, email and group assignment will be updated. To add a new user and assign privileges during auto-creation, the `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege is required. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled, the `CONTROL_TRUSTED_AUTH` (**Can Enable or Disable Trusted Authentication**) privilege is required. #### Important point to note All options in the token creation APIs that define user access to data in ThoughtSpot will take effect during token creation, not when the token is used for authentication. For example, `auto_create:true` will create the user when the authentication token is created. + * @param getFullAccessTokenRequest + */ + getFullAccessToken(getFullAccessTokenRequest, _options) { + return __async(this, null, function* () { + var _a, _b, _c; + let _config = _options || this.configuration; + if (getFullAccessTokenRequest === null || getFullAccessTokenRequest === void 0) { + throw new RequiredError("ThoughtSpotRestApi", "getFullAccessToken", "getFullAccessTokenRequest"); + } + const localVarPath = "/api/rest/2.0/auth/token/full"; + const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.25.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.25.0"); + const contentType = ObjectSerializer.getPreferredMediaType([ + "application/json" + ]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = ObjectSerializer.stringify( + ObjectSerializer.serialize(getFullAccessTokenRequest, "GetFullAccessTokenRequest", ""), + contentType + ); + requestContext.setBody(serializedBody); + const defaultAuth = ((_a = _options == null ? void 0 : _options.authMethods) == null ? void 0 : _a.default) || ((_c = (_b = this.configuration) == null ? void 0 : _b.authMethods) == null ? void 0 : _c.default); + if (defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication) { + yield defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication(requestContext); + } + return requestContext; + }); + } + /** + * Version: 10.15.0.cl or later Retrieves existing natural language (NL) instructions configured for a specific data model. These instructions guide the AI system in understanding data context and generating more accurate responses. Requires `CAN_USE_SPOTTER` privilege, at least view access on the data model, and a bearer token corresponding to the org where the data model exists. #### Usage guidelines The request must include: - `data_source_identifier`: the unique ID of the data model to retrieve instructions for If the request is successful, the API returns: - `nl_instructions_info`: an array of instruction objects, each containing: - `instructions`: the configured text instructions for AI processing - `scope`: the scope of the instruction — currently only `GLOBAL` is supported #### Instructions scope - **GLOBAL**: Instructions that apply globally across the system on the given data-model (currently only global instructions are supported) #### Error responses | Code | Description | |------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| | 401 | Unauthorized — authentication token is missing, expired, or invalid. | | 403 | Forbidden — the authenticated user does not have `CAN_USE_SPOTTER` privilege, lacks view access on the data model, or the bearer token does not correspond to the org where the data model exists. | > ###### Note: > > - To use this API, the user needs at least view access on the data model, and must use the bearer token corresponding to the org where the data model exists. > - This endpoint is currently in Beta. Breaking changes may be introduced before the endpoint is made Generally Available. > - Available from version 10.15.0.cl and later. > - This endpoint requires Spotter — please contact ThoughtSpot Support to enable Spotter on your cluster. > - Use this API to review currently configured instructions before modifying them with `setNLInstructions`. + * @param getNLInstructionsRequest + */ + getNLInstructions(getNLInstructionsRequest, _options) { + return __async(this, null, function* () { + var _a, _b, _c; + let _config = _options || this.configuration; + if (getNLInstructionsRequest === null || getNLInstructionsRequest === void 0) { + throw new RequiredError("ThoughtSpotRestApi", "getNLInstructions", "getNLInstructionsRequest"); + } + const localVarPath = "/api/rest/2.0/ai/instructions/get"; + const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.25.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.25.0"); + const contentType = ObjectSerializer.getPreferredMediaType([ + "application/json" + ]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = ObjectSerializer.stringify( + ObjectSerializer.serialize(getNLInstructionsRequest, "GetNLInstructionsRequest", ""), + contentType + ); + requestContext.setBody(serializedBody); + let authMethod; + authMethod = _config.authMethods["bearerAuth"]; + if (authMethod == null ? void 0 : authMethod.applySecurityAuthentication) { + yield authMethod == null ? void 0 : authMethod.applySecurityAuthentication(requestContext); + } + const defaultAuth = ((_a = _options == null ? void 0 : _options.authMethods) == null ? void 0 : _a.default) || ((_c = (_b = this.configuration) == null ? void 0 : _b.authMethods) == null ? void 0 : _c.default); + if (defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication) { + yield defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication(requestContext); + } + return requestContext; + }); + } + /** + * Version: 9.0.0.cl or later Generates an authentication token that provides access to a specific metadata object. This object list is intersected with the list of objects the user is allowed to access via group membership. For more information, see [Object security](https://docs.thoughtspot.com/cloud/latest/security-data-object#object_security). #### Usage guidelines You can generate a token for a user by providing a `username` and `password`, or by using the `secret_key` generated for your instance. To generate a `secret_key`, the administrator must enable [Trusted authentication](https://developers.thoughtspot.com/docs/trusted-auth-secret-key) in the **Develop** > **Customizations** > **Security Settings** page. **Note**: * When both `password` and `secret_key` are included in the API request, `password` takes precedence. * If [Multi-Factor Authentication (MFA)](https://docs.thoughtspot.com/cloud/latest/authentication-local-mfa) is enabled on your instance, the API login request with `username` and `password` returns an error. You can switch to token-based authentication with `secret_key` or contact ThoughtSpot Support for assistance. The token obtained from ThoughtSpot is valid for 5 minutes by default. You can configure the token expiration time as required. #### Just-in-time provisioning For [just-in-time user creation and provisioning](https://developers.thoughtspot.com/docs/just-in-time-provisioning), specify the following attributes in the API request: * `auto_create` * `username` * `display_name` * `email` * `group_identifiers` Set `auto_create` to `true` if the user is not available in ThoughtSpot. If the user already exists in ThoughtSpot and the `auto_create` parameter is set to `true`, user properties such as display name, email, and group assignment will be updated. To add a new user and assign privileges, the `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege is required. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled, the `CONTROL_TRUSTED_AUTH`(**Can Enable or Disable Trusted Authentication**) privilege is required. #### Important point to note All options in the token creation APIs that define user access to data in ThoughtSpot will take effect during token creation, not when the token is used for authentication. For example, `auto_create:true` will create the user when the authentication token is created. + * @param getObjectAccessTokenRequest + */ + getObjectAccessToken(getObjectAccessTokenRequest, _options) { + return __async(this, null, function* () { + var _a, _b, _c; + let _config = _options || this.configuration; + if (getObjectAccessTokenRequest === null || getObjectAccessTokenRequest === void 0) { + throw new RequiredError("ThoughtSpotRestApi", "getObjectAccessToken", "getObjectAccessTokenRequest"); + } + const localVarPath = "/api/rest/2.0/auth/token/object"; + const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.25.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.25.0"); + const contentType = ObjectSerializer.getPreferredMediaType([ + "application/json" + ]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = ObjectSerializer.stringify( + ObjectSerializer.serialize(getObjectAccessTokenRequest, "GetObjectAccessTokenRequest", ""), + contentType + ); + requestContext.setBody(serializedBody); + const defaultAuth = ((_a = _options == null ? void 0 : _options.authMethods) == null ? void 0 : _a.default) || ((_c = (_b = this.configuration) == null ? void 0 : _b.authMethods) == null ? void 0 : _c.default); + if (defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication) { + yield defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication(requestContext); + } + return requestContext; + }); + } + /** + * Version: 10.13.0.cl or later Breaks down a natural language query into a series of smaller analytical sub-questions, each mapped to a relevant data source. Requires `CAN_USE_SPOTTER` privilege and at least view-level access to the referenced metadata objects. #### Usage guidelines The request must include: - `query`: the natural language question to decompose into analytical sub-questions - `metadata_context`: at least one of the following context identifiers to guide question generation: - `conversation_identifier` — an existing conversation session ID - `answer_identifiers` — a list of Answer GUIDs - `liveboard_identifiers` — a list of Liveboard GUIDs - `data_source_identifiers` — a list of data source GUIDs Optional parameters for refining the output: - `ai_context`: additional context to improve response quality - `content` — supplementary text or CSV data as string input - `instructions` — custom text instructions for the AI system - `limit_relevant_questions`: maximum number of questions to return (default: `5`) - `bypass_cache`: if `true`, forces fresh computation instead of returning cached results If the request is successful, the API returns a list of relevant analytical questions, each containing: - `query`: the generated sub-question - `data_source_identifier`: the unique ID of the data source the question targets - `data_source_name`: the display name of the corresponding data source #### Error responses | Code | Description | |------|---------------------------------------------------------------------------------------------------------------------------------------| | 401 | Unauthorized — authentication token is missing, expired, or invalid. | | 403 | Forbidden — the authenticated user does not have `CAN_USE_SPOTTER` privilege or lacks view access to the referenced metadata objects. | > ###### Note: > * This endpoint is currently in Beta. Breaking changes may be introduced before the endpoint is made Generally Available. > * This endpoint requires Spotter - please contact ThoughtSpot support to enable Spotter on your cluster. + * @param getRelevantQuestionsRequest + */ + getRelevantQuestions(getRelevantQuestionsRequest, _options) { + return __async(this, null, function* () { + var _a, _b, _c; + let _config = _options || this.configuration; + if (getRelevantQuestionsRequest === null || getRelevantQuestionsRequest === void 0) { + throw new RequiredError("ThoughtSpotRestApi", "getRelevantQuestions", "getRelevantQuestionsRequest"); + } + const localVarPath = "/api/rest/2.0/ai/relevant-questions/"; + const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.25.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.25.0"); + const contentType = ObjectSerializer.getPreferredMediaType([ + "application/json" + ]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = ObjectSerializer.stringify( + ObjectSerializer.serialize(getRelevantQuestionsRequest, "GetRelevantQuestionsRequest", ""), + contentType + ); + requestContext.setBody(serializedBody); + let authMethod; + authMethod = _config.authMethods["bearerAuth"]; + if (authMethod == null ? void 0 : authMethod.applySecurityAuthentication) { + yield authMethod == null ? void 0 : authMethod.applySecurityAuthentication(requestContext); + } + const defaultAuth = ((_a = _options == null ? void 0 : _options.authMethods) == null ? void 0 : _a.default) || ((_c = (_b = this.configuration) == null ? void 0 : _b.authMethods) == null ? void 0 : _c.default); + if (defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication) { + yield defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication(requestContext); + } + return requestContext; + }); + } + /** + * Version: 9.0.0.cl or later Retrieves the current configuration details of the cluster. If the request is successful, the API returns a list configuration settings applied on the cluster. Requires `ADMINISTRATION`(**Can administer ThoughtSpot**) privilege to view these complete configuration settings of the cluster. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `SYSTEM_INFO_ADMINISTRATION` (**Can view system activities**) privilege is required. This API does not require any parameters to be passed in the request. + */ + getSystemConfig(_options) { + return __async(this, null, function* () { + var _a, _b, _c; + let _config = _options || this.configuration; + const localVarPath = "/api/rest/2.0/system/config"; + const requestContext = _config.baseServer.makeRequestContext(localVarPath, "GET" /* GET */); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.25.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.25.0"); + let authMethod; + authMethod = _config.authMethods["bearerAuth"]; + if (authMethod == null ? void 0 : authMethod.applySecurityAuthentication) { + yield authMethod == null ? void 0 : authMethod.applySecurityAuthentication(requestContext); + } + const defaultAuth = ((_a = _options == null ? void 0 : _options.authMethods) == null ? void 0 : _a.default) || ((_c = (_b = this.configuration) == null ? void 0 : _b.authMethods) == null ? void 0 : _c.default); + if (defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication) { + yield defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication(requestContext); + } + return requestContext; + }); + } + /** + * Version: 9.0.0.cl or later Gets system information such as the release version, locale, time zone, deployment environment, date format, and date time format of the cluster. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privileges. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `SYSTEM_INFO_ADMINISTRATION` (**Can view system activities**) privilege is required. This API does not require any parameters to be passed in the request. + */ + getSystemInformation(_options) { + return __async(this, null, function* () { + var _a, _b, _c; + let _config = _options || this.configuration; + const localVarPath = "/api/rest/2.0/system"; + const requestContext = _config.baseServer.makeRequestContext(localVarPath, "GET" /* GET */); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.25.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.25.0"); + let authMethod; + authMethod = _config.authMethods["bearerAuth"]; + if (authMethod == null ? void 0 : authMethod.applySecurityAuthentication) { + yield authMethod == null ? void 0 : authMethod.applySecurityAuthentication(requestContext); + } + const defaultAuth = ((_a = _options == null ? void 0 : _options.authMethods) == null ? void 0 : _a.default) || ((_c = (_b = this.configuration) == null ? void 0 : _b.authMethods) == null ? void 0 : _c.default); + if (defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication) { + yield defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication(requestContext); + } + return requestContext; + }); + } + /** + * Version: 9.2.0.cl or later Gets a list of configuration overrides applied on the cluster. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `APPLICATION_ADMINISTRATION` (**Can manage application settings**) privilege is required. This API does not require any parameters to be passed in the request. + */ + getSystemOverrideInfo(_options) { + return __async(this, null, function* () { + var _a, _b, _c; + let _config = _options || this.configuration; + const localVarPath = "/api/rest/2.0/system/config-overrides"; + const requestContext = _config.baseServer.makeRequestContext(localVarPath, "GET" /* GET */); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.25.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.25.0"); + let authMethod; + authMethod = _config.authMethods["bearerAuth"]; + if (authMethod == null ? void 0 : authMethod.applySecurityAuthentication) { + yield authMethod == null ? void 0 : authMethod.applySecurityAuthentication(requestContext); + } + const defaultAuth = ((_a = _options == null ? void 0 : _options.authMethods) == null ? void 0 : _a.default) || ((_c = (_b = this.configuration) == null ? void 0 : _b.authMethods) == null ? void 0 : _c.default); + if (defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication) { + yield defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication(requestContext); + } + return requestContext; + }); + } + /** + * Version: 9.0.0.cl or later Imports [TML](https://docs.thoughtspot.com/cloud/latest/tml) files into ThoughtSpot. Requires `DATAMANAGEMENT` (**Can manage data**) or `ADMINISTRATION` (**Can administer ThoughtsSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the following Data control privileges may be required: - `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) - `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` (**Can manage data models**) #### Usage guidelines * Import all related objects in a single TML Import API call. For example, Tables that use the same Connection object and Worksheets connected to these Tables. * Include the `fqn` property to distinguish objects that have the same name. For example, if you have multiple Connections or Worksheets with the same name on ThoughtSpot and the Connection or Worksheet referenced in your TML file does not have a unique name to distinguish, it may result in invalid object references. Adding `fqn` helps ThoughtSpot differentiate a Table from another with the same name. We recommend [exporting TML with FQNs](#/http/api-endpoints/metadata/export-metadata-tml) and using these during the import operation. * You can upload multiple TML files at a time. If you import a Worksheet along with Liveboards, Answers, and other dependent objects in a single API call, the imported objects will be immediately available for use. When you import only a Worksheet object, it may take some time for the Worksheet to become available in the ThoughtSpot system. Please wait for a few minutes, and then proceed to create an Answer and Liveboard from the newly imported Worksheet. For more information, see [TML Documentation](https://developers.thoughtspot.com/docs/tml#_import_a_tml). + * @param importMetadataTMLRequest + */ + importMetadataTML(importMetadataTMLRequest, _options) { + return __async(this, null, function* () { + var _a, _b, _c; + let _config = _options || this.configuration; + if (importMetadataTMLRequest === null || importMetadataTMLRequest === void 0) { + throw new RequiredError("ThoughtSpotRestApi", "importMetadataTML", "importMetadataTMLRequest"); + } + const localVarPath = "/api/rest/2.0/metadata/tml/import"; + const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.25.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.25.0"); + const contentType = ObjectSerializer.getPreferredMediaType([ + "application/json" + ]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = ObjectSerializer.stringify( + ObjectSerializer.serialize(importMetadataTMLRequest, "ImportMetadataTMLRequest", ""), + contentType + ); + requestContext.setBody(serializedBody); + let authMethod; + authMethod = _config.authMethods["bearerAuth"]; + if (authMethod == null ? void 0 : authMethod.applySecurityAuthentication) { + yield authMethod == null ? void 0 : authMethod.applySecurityAuthentication(requestContext); + } + const defaultAuth = ((_a = _options == null ? void 0 : _options.authMethods) == null ? void 0 : _a.default) || ((_c = (_b = this.configuration) == null ? void 0 : _b.authMethods) == null ? void 0 : _c.default); + if (defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication) { + yield defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication(requestContext); + } + return requestContext; + }); + } + /** + * Version: 10.4.0.cl or later Schedules a task to import [TML](https://docs.thoughtspot.com/cloud/latest/tml) files into ThoughtSpot. You can use this API endpoint to process TML objects asynchronously when importing TMLs of large and complex metadata objects into ThoughtSpot. Unlike the synchronous import TML operation, the API processes TML data in the background and returns a task ID, which can be used to check the status of the import task via `/api/rest/2.0/metadata/tml/async/status` API endpoint. Requires `DATAMANAGEMENT` (**Can manage data**) or `ADMINISTRATION` (**Can administer ThoughtsSpot**) privilege, and edit access to the TML objects. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the following Data control privileges may be required: - `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) - `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` (**Can manage data models**) #### Usage guidelines See [Async TML API Documentation](https://developers.thoughtspot.com/docs/tml#_import_tml_objects_asynchronously) for usage guidelines. + * @param importMetadataTMLAsyncRequest + */ + importMetadataTMLAsync(importMetadataTMLAsyncRequest, _options) { + return __async(this, null, function* () { + var _a, _b, _c; + let _config = _options || this.configuration; + if (importMetadataTMLAsyncRequest === null || importMetadataTMLAsyncRequest === void 0) { + throw new RequiredError("ThoughtSpotRestApi", "importMetadataTMLAsync", "importMetadataTMLAsyncRequest"); + } + const localVarPath = "/api/rest/2.0/metadata/tml/async/import"; + const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.25.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.25.0"); + const contentType = ObjectSerializer.getPreferredMediaType([ + "application/json" + ]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = ObjectSerializer.stringify( + ObjectSerializer.serialize(importMetadataTMLAsyncRequest, "ImportMetadataTMLAsyncRequest", ""), + contentType + ); + requestContext.setBody(serializedBody); + let authMethod; + authMethod = _config.authMethods["bearerAuth"]; + if (authMethod == null ? void 0 : authMethod.applySecurityAuthentication) { + yield authMethod == null ? void 0 : authMethod.applySecurityAuthentication(requestContext); + } + const defaultAuth = ((_a = _options == null ? void 0 : _options.authMethods) == null ? void 0 : _a.default) || ((_c = (_b = this.configuration) == null ? void 0 : _b.authMethods) == null ? void 0 : _c.default); + if (defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication) { + yield defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication(requestContext); + } + return requestContext; + }); + } + /** + * Version: 9.0.0.cl or later Imports group objects from external databases into ThoughtSpot. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `GROUP_ADMINISTRATION` (**Can manage groups**) privilege is required. During the import operation: * If the specified group is not available in ThoughtSpot, it will be added to ThoughtSpot. * If `delete_unspecified_groups` is set to `true`, the groups not specified in the API request, excluding administrator and system user groups, are deleted. * If the specified groups are already available in ThoughtSpot, the object properties of these groups are modified and synchronized as per the input data in the API request. A successful API call returns the object that represents the changes made in the ThoughtSpot system. + * @param importUserGroupsRequest + */ + importUserGroups(importUserGroupsRequest, _options) { + return __async(this, null, function* () { + var _a, _b, _c; + let _config = _options || this.configuration; + if (importUserGroupsRequest === null || importUserGroupsRequest === void 0) { + throw new RequiredError("ThoughtSpotRestApi", "importUserGroups", "importUserGroupsRequest"); + } + const localVarPath = "/api/rest/2.0/groups/import"; + const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.25.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.25.0"); + const contentType = ObjectSerializer.getPreferredMediaType([ + "application/json" + ]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = ObjectSerializer.stringify( + ObjectSerializer.serialize(importUserGroupsRequest, "ImportUserGroupsRequest", ""), + contentType + ); + requestContext.setBody(serializedBody); + let authMethod; + authMethod = _config.authMethods["bearerAuth"]; + if (authMethod == null ? void 0 : authMethod.applySecurityAuthentication) { + yield authMethod == null ? void 0 : authMethod.applySecurityAuthentication(requestContext); + } + const defaultAuth = ((_a = _options == null ? void 0 : _options.authMethods) == null ? void 0 : _a.default) || ((_c = (_b = this.configuration) == null ? void 0 : _b.authMethods) == null ? void 0 : _c.default); + if (defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication) { + yield defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication(requestContext); + } + return requestContext; + }); + } + /** + * Version: 9.0.0.cl or later Imports user data from external databases into ThoughtSpot. During the user import operation: * If the specified users are not available in ThoughtSpot, the users are created and assigned a default password. Defining a `default_password` in the API request is optional. * If `delete_unspecified_users` is set to `true`, the users not specified in the API request, excluding the `tsadmin`, `guest`, `system` and `su` users, are deleted. * If the specified user objects are already available in ThoughtSpot, the object properties are updated and synchronized as per the input data in the API request. A successful API call returns the object that represents the changes made in the ThoughtSpot system. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `USER_ADMINISTRATION` (**Can manage users**) privilege is required. + * @param importUsersRequest + */ + importUsers(importUsersRequest, _options) { + return __async(this, null, function* () { + var _a, _b, _c; + let _config = _options || this.configuration; + if (importUsersRequest === null || importUsersRequest === void 0) { + throw new RequiredError("ThoughtSpotRestApi", "importUsers", "importUsersRequest"); + } + const localVarPath = "/api/rest/2.0/users/import"; + const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.25.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.25.0"); + const contentType = ObjectSerializer.getPreferredMediaType([ + "application/json" + ]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = ObjectSerializer.stringify( + ObjectSerializer.serialize(importUsersRequest, "ImportUsersRequest", ""), + contentType + ); + requestContext.setBody(serializedBody); + let authMethod; + authMethod = _config.authMethods["bearerAuth"]; + if (authMethod == null ? void 0 : authMethod.applySecurityAuthentication) { + yield authMethod == null ? void 0 : authMethod.applySecurityAuthentication(requestContext); + } + const defaultAuth = ((_a = _options == null ? void 0 : _options.authMethods) == null ? void 0 : _a.default) || ((_c = (_b = this.configuration) == null ? void 0 : _b.authMethods) == null ? void 0 : _c.default); + if (defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication) { + yield defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication(requestContext); + } + return requestContext; + }); + } + /** + * Version: 9.0.0.cl or later Creates a login session for a ThoughtSpot user with Basic authentication. In Basic authentication method, REST clients log in to ThoughtSpot using `username` and `password` attributes. On a multi-tenant cluster with Orgs, users can pass the ID of the Org in the API request to log in to a specific Org context. **Note**: If Multi-Factor Authentication (MFA) is enabled on your instance, the API login request with basic authentication (`username` and `password` ) returns an error. Contact ThoughtSpot Support for assistance. A successful login returns a session cookie that can be used in your subsequent API requests. + * @param loginRequest + */ + login(loginRequest, _options) { + return __async(this, null, function* () { + var _a, _b, _c; + let _config = _options || this.configuration; + if (loginRequest === null || loginRequest === void 0) { + throw new RequiredError("ThoughtSpotRestApi", "login", "loginRequest"); + } + const localVarPath = "/api/rest/2.0/auth/session/login"; + const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.25.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.25.0"); + const contentType = ObjectSerializer.getPreferredMediaType([ + "application/json" + ]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = ObjectSerializer.stringify( + ObjectSerializer.serialize(loginRequest, "LoginRequest", ""), + contentType + ); + requestContext.setBody(serializedBody); + let authMethod; + authMethod = _config.authMethods["bearerAuth"]; + if (authMethod == null ? void 0 : authMethod.applySecurityAuthentication) { + yield authMethod == null ? void 0 : authMethod.applySecurityAuthentication(requestContext); + } + const defaultAuth = ((_a = _options == null ? void 0 : _options.authMethods) == null ? void 0 : _a.default) || ((_c = (_b = this.configuration) == null ? void 0 : _b.authMethods) == null ? void 0 : _c.default); + if (defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication) { + yield defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication(requestContext); + } + return requestContext; + }); + } + /** + * Version: 9.0.0.cl or later Logs out a user from their current session. + */ + logout(_options) { + return __async(this, null, function* () { + var _a, _b, _c; + let _config = _options || this.configuration; + const localVarPath = "/api/rest/2.0/auth/session/logout"; + const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.25.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.25.0"); + let authMethod; + authMethod = _config.authMethods["bearerAuth"]; + if (authMethod == null ? void 0 : authMethod.applySecurityAuthentication) { + yield authMethod == null ? void 0 : authMethod.applySecurityAuthentication(requestContext); + } + const defaultAuth = ((_a = _options == null ? void 0 : _options.authMethods) == null ? void 0 : _a.default) || ((_c = (_b = this.configuration) == null ? void 0 : _b.authMethods) == null ? void 0 : _c.default); + if (defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication) { + yield defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication(requestContext); + } + return requestContext; + }); + } + /** + * Version: 26.3.0.cl or later This API allows the addition or deletion of object level privileges for a set of users and groups, on a set of metadata objects. It provides users to access certain features based on privilege based access control. #### Usage guidelines - Specify the `operation`. The supported operations are: `ADD`, `REMOVE`. - Specify the type of the objects on which the object privileges are being provided in `metadata_type`. Only `LOGICAL_TABLE` metadata type is supported for now. It may be extended for other metadata types in future. - Specify the list of object privilege types in the `object_privilege_types` array. The supported object privilege types are: `SPOTTER_COACHING_PRIVILEGE`. - Specify the identifiers (either GUID or name) for the metadata objects in the `metadata_identifiers` array. - Specify the `type` (`USER` or `USER_GROUP`) and `identifier` (either GUID or name) of the principals to which you want to apply the given operation and given object privileges in the `principals` array. - Ensure using correct Authorization Bearer Token corresponding to specific user & org. #### Example request ```json { \"operation\": \"operation-type\", \"metadata_type\": \"metadata-type\", \"object_privilege_types\": [\"privilege-type-1\", \"privilege-type-2\"], \"metadata_identifiers\": [\"metadata-guid-or-name-1\", \"metadata-guid-or-name-1\"], \"principals\": [ { \"type\": \"type-1\", \"identifier\": \"principal-guid-or-name-1\" }, { \"type\": \"type-2\", \"identifier\": \"principal-guid-or-name-2\" } ] } ``` > ###### Note: > * Only admin users, users with edit access and users with coaching privilege on a given data-model can add or remove principals related to SPOTTER_COACHING_PRIVILEGE + * @param manageObjectPrivilegeRequest + */ + manageObjectPrivilege(manageObjectPrivilegeRequest, _options) { + return __async(this, null, function* () { + var _a, _b, _c; + let _config = _options || this.configuration; + if (manageObjectPrivilegeRequest === null || manageObjectPrivilegeRequest === void 0) { + throw new RequiredError("ThoughtSpotRestApi", "manageObjectPrivilege", "manageObjectPrivilegeRequest"); + } + const localVarPath = "/api/rest/2.0/security/metadata/manage-object-privilege"; + const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.25.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.25.0"); + const contentType = ObjectSerializer.getPreferredMediaType([ + "application/json" + ]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = ObjectSerializer.stringify( + ObjectSerializer.serialize(manageObjectPrivilegeRequest, "ManageObjectPrivilegeRequest", ""), + contentType + ); + requestContext.setBody(serializedBody); + let authMethod; + authMethod = _config.authMethods["bearerAuth"]; + if (authMethod == null ? void 0 : authMethod.applySecurityAuthentication) { + yield authMethod == null ? void 0 : authMethod.applySecurityAuthentication(requestContext); + } + const defaultAuth = ((_a = _options == null ? void 0 : _options.authMethods) == null ? void 0 : _a.default) || ((_c = (_b = this.configuration) == null ? void 0 : _b.authMethods) == null ? void 0 : _c.default); + if (defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication) { + yield defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication(requestContext); + } + return requestContext; + }); + } + /** + * Parameterize fields in metadata objects. Version: 10.9.0.cl or later **Note:** This API endpoint is deprecated and will be removed from ThoughtSpot in a future release. Use [POST /api/rest/2.0/metadata/parameterize-fields](/api/rest/2.0/metadata/parameterize-fields) instead. Allows parameterizing fields in metadata objects in ThoughtSpot. Requires appropriate permissions to modify the metadata object. The API endpoint allows parameterizing the following types of metadata objects: * Logical Tables * Connections * Connection Configs For a Logical Table the field type must be `ATTRIBUTE` and field name can be one of: * databaseName * schemaName * tableName For a Connection or Connection Config, the field type is always `CONNECTION_PROPERTY`. In this case, field_name specifies the exact property of the Connection or Connection Config that needs to be parameterized. For Connection Config, the only supported field name is: * impersonate_user + * @param parameterizeMetadataRequest + */ + parameterizeMetadata(parameterizeMetadataRequest, _options) { + return __async(this, null, function* () { + var _a, _b, _c; + let _config = _options || this.configuration; + if (parameterizeMetadataRequest === null || parameterizeMetadataRequest === void 0) { + throw new RequiredError("ThoughtSpotRestApi", "parameterizeMetadata", "parameterizeMetadataRequest"); + } + const localVarPath = "/api/rest/2.0/metadata/parameterize"; + const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.25.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.25.0"); + const contentType = ObjectSerializer.getPreferredMediaType([ + "application/json" + ]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = ObjectSerializer.stringify( + ObjectSerializer.serialize(parameterizeMetadataRequest, "ParameterizeMetadataRequest", ""), + contentType + ); + requestContext.setBody(serializedBody); + let authMethod; + authMethod = _config.authMethods["bearerAuth"]; + if (authMethod == null ? void 0 : authMethod.applySecurityAuthentication) { + yield authMethod == null ? void 0 : authMethod.applySecurityAuthentication(requestContext); + } + const defaultAuth = ((_a = _options == null ? void 0 : _options.authMethods) == null ? void 0 : _a.default) || ((_c = (_b = this.configuration) == null ? void 0 : _b.authMethods) == null ? void 0 : _c.default); + if (defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication) { + yield defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication(requestContext); + } + return requestContext; + }); + } + /** + * Parameterize multiple fields of metadata objects. For example [schemaName, databaseName] for LOGICAL_TABLE. Version: 26.5.0.cl or later Allows parameterizing multiple fields of metadata objects in ThoughtSpot. For example, you can parameterize [schemaName, databaseName] for LOGICAL_TABLE. Requires appropriate permissions to modify the metadata object. The API endpoint allows parameterizing the following types of metadata objects: * Logical Tables * Connections * Connection Configs For a Logical Table, the field type must be `ATTRIBUTE` and field names can include: * databaseName * schemaName * tableName For a Connection or Connection Config, the field type is always `CONNECTION_PROPERTY`. In this case, field_names specifies the exact properties of the Connection or Connection Config that need to be parameterized. For Connection Config, supported field names include: * impersonate_user You can parameterize multiple fields at once by providing an array of field names. + * @param parameterizeMetadataFieldsRequest + */ + parameterizeMetadataFields(parameterizeMetadataFieldsRequest, _options) { + return __async(this, null, function* () { + var _a, _b, _c; + let _config = _options || this.configuration; + if (parameterizeMetadataFieldsRequest === null || parameterizeMetadataFieldsRequest === void 0) { + throw new RequiredError("ThoughtSpotRestApi", "parameterizeMetadataFields", "parameterizeMetadataFieldsRequest"); + } + const localVarPath = "/api/rest/2.0/metadata/parameterize-fields"; + const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.25.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.25.0"); + const contentType = ObjectSerializer.getPreferredMediaType([ + "application/json" + ]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = ObjectSerializer.stringify( + ObjectSerializer.serialize(parameterizeMetadataFieldsRequest, "ParameterizeMetadataFieldsRequest", ""), + contentType + ); + requestContext.setBody(serializedBody); + let authMethod; + authMethod = _config.authMethods["bearerAuth"]; + if (authMethod == null ? void 0 : authMethod.applySecurityAuthentication) { + yield authMethod == null ? void 0 : authMethod.applySecurityAuthentication(requestContext); + } + const defaultAuth = ((_a = _options == null ? void 0 : _options.authMethods) == null ? void 0 : _a.default) || ((_c = (_b = this.configuration) == null ? void 0 : _b.authMethods) == null ? void 0 : _c.default); + if (defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication) { + yield defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication(requestContext); + } + return requestContext; + }); + } + /** + * Version: 26.5.0.cl or later Allows publishing metadata objects across organizations in ThoughtSpot. Requires ADMINISTRATION role and TENANT scope. The API endpoint allows publishing the following types of metadata objects: * Liveboards * Answers * Logical Tables This API will essentially share the objects along with it\'s dependencies to the org admins of the orgs to which it is being published. + * @param publishMetadataRequest + */ + publishMetadata(publishMetadataRequest, _options) { + return __async(this, null, function* () { + var _a, _b, _c; + let _config = _options || this.configuration; + if (publishMetadataRequest === null || publishMetadataRequest === void 0) { + throw new RequiredError("ThoughtSpotRestApi", "publishMetadata", "publishMetadataRequest"); + } + const localVarPath = "/api/rest/2.0/security/metadata/publish"; + const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.25.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.25.0"); + const contentType = ObjectSerializer.getPreferredMediaType([ + "application/json" + ]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = ObjectSerializer.stringify( + ObjectSerializer.serialize(publishMetadataRequest, "PublishMetadataRequest", ""), + contentType + ); + requestContext.setBody(serializedBody); + let authMethod; + authMethod = _config.authMethods["bearerAuth"]; + if (authMethod == null ? void 0 : authMethod.applySecurityAuthentication) { + yield authMethod == null ? void 0 : authMethod.applySecurityAuthentication(requestContext); + } + const defaultAuth = ((_a = _options == null ? void 0 : _options.authMethods) == null ? void 0 : _a.default) || ((_c = (_b = this.configuration) == null ? void 0 : _b.authMethods) == null ? void 0 : _c.default); + if (defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication) { + yield defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication(requestContext); + } + return requestContext; + }); + } + /** + * Update values for a variable Version: 26.4.0.cl or later Allows updating values for a specific variable in ThoughtSpot. Requires ADMINISTRATION role. The CAN_MANAGE_VARIABLES permission allows you to manage Formula Variables in the current organization scope. The API endpoint allows: * Adding new values to the variable * Replacing existing values * Deleting values from the variable * Resetting all values When updating variable values, you need to specify: * The variable identifier (ID or name) * The values to add/replace/remove * The operation to perform (ADD, REPLACE, REMOVE, RESET) Behaviour based on operation type: * ADD - Adds values to the variable if this is a list type variable, else same as replace. * REPLACE - Replaces all values of a given set of constraints with the current set of values. * REMOVE - Removes any values which match the set of conditions of the variables if this is a list type variable, else clears value. * RESET - Removes all constraints for the given variable, scope is ignored + * @param identifier Unique ID or name of the variable + * @param putVariableValuesRequest + */ + putVariableValues(identifier, putVariableValuesRequest, _options) { + return __async(this, null, function* () { + var _a, _b, _c; + let _config = _options || this.configuration; + if (identifier === null || identifier === void 0) { + throw new RequiredError("ThoughtSpotRestApi", "putVariableValues", "identifier"); + } + if (putVariableValuesRequest === null || putVariableValuesRequest === void 0) { + throw new RequiredError("ThoughtSpotRestApi", "putVariableValues", "putVariableValuesRequest"); + } + const localVarPath = "/api/rest/2.0/template/variables/{identifier}/update-values".replace("{identifier}", encodeURIComponent(String(identifier))); + const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.25.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.25.0"); + const contentType = ObjectSerializer.getPreferredMediaType([ + "application/json" + ]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = ObjectSerializer.stringify( + ObjectSerializer.serialize(putVariableValuesRequest, "PutVariableValuesRequest", ""), + contentType + ); + requestContext.setBody(serializedBody); + let authMethod; + authMethod = _config.authMethods["bearerAuth"]; + if (authMethod == null ? void 0 : authMethod.applySecurityAuthentication) { + yield authMethod == null ? void 0 : authMethod.applySecurityAuthentication(requestContext); + } + const defaultAuth = ((_a = _options == null ? void 0 : _options.authMethods) == null ? void 0 : _a.default) || ((_c = (_b = this.configuration) == null ? void 0 : _b.authMethods) == null ? void 0 : _c.default); + if (defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication) { + yield defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication(requestContext); + } + return requestContext; + }); + } + /** + * Version: 10.7.0.cl or later **Deprecated** — Use `getRelevantQuestions` instead (available from 10.13.0.cl). Breaks down a topical or goal-oriented natural language question into smaller, actionable analytical sub-questions, each mapped to a relevant data source for independent execution. Requires `CAN_USE_SPOTTER` privilege and at least view-level access to the referenced metadata objects. #### Usage guidelines The request accepts the following parameters: - `nlsRequest`: contains the user `query` to decompose, along with optional `instructions` and `bypassCache` flag - `worksheetIds`: list of data source identifiers to scope the decomposition - `answerIds`: list of Answer GUIDs whose data guides the response - `liveboardIds`: list of Liveboard GUIDs whose data guides the response - `conversationId`: an existing conversation session ID for context continuity - `content`: supplementary text or CSV data to improve response quality - `maxDecomposedQueries`: maximum number of sub-questions to return (default: `5`) If the request is successful, the API returns a `decomposedQueryResponse` containing a list of `decomposedQueries`, each with: - `query`: the generated analytical sub-question - `worksheetId`: the unique ID of the data source the question targets - `worksheetName`: the display name of the corresponding data source #### Error responses | Code | Description | |------|---------------------------------------------------------------------------------------------------------------------------------------| | 401 | Unauthorized — authentication token is missing, expired, or invalid. | | 403 | Forbidden — the authenticated user does not have `CAN_USE_SPOTTER` privilege or lacks view access to the referenced metadata objects. | > ###### Note: > * This endpoint is deprecated since 10.13.0.cl. Use `getRelevantQuestions` for new integrations. > * This endpoint is currently in Beta. Breaking changes may be introduced before the endpoint is made Generally Available. > * This endpoint requires Spotter — please contact ThoughtSpot support to enable Spotter on your cluster. + * @param queryGetDecomposedQueryRequest + */ + queryGetDecomposedQuery(queryGetDecomposedQueryRequest, _options) { + return __async(this, null, function* () { + var _a, _b, _c; + let _config = _options || this.configuration; + if (queryGetDecomposedQueryRequest === null || queryGetDecomposedQueryRequest === void 0) { + throw new RequiredError("ThoughtSpotRestApi", "queryGetDecomposedQuery", "queryGetDecomposedQueryRequest"); + } + const localVarPath = "/api/rest/2.0/ai/analytical-questions"; + const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.25.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.25.0"); + const contentType = ObjectSerializer.getPreferredMediaType([ + "application/json" + ]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = ObjectSerializer.stringify( + ObjectSerializer.serialize(queryGetDecomposedQueryRequest, "QueryGetDecomposedQueryRequest", ""), + contentType + ); + requestContext.setBody(serializedBody); + let authMethod; + authMethod = _config.authMethods["bearerAuth"]; + if (authMethod == null ? void 0 : authMethod.applySecurityAuthentication) { + yield authMethod == null ? void 0 : authMethod.applySecurityAuthentication(requestContext); + } + const defaultAuth = ((_a = _options == null ? void 0 : _options.authMethods) == null ? void 0 : _a.default) || ((_c = (_b = this.configuration) == null ? void 0 : _b.authMethods) == null ? void 0 : _c.default); + if (defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication) { + yield defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication(requestContext); + } + return requestContext; + }); + } + /** + * Version: 9.0.0.cl or later Resets the password of a user account. Administrators can reset password on behalf of a user. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `USER_ADMINISTRATION` (**Can manage users**) privilege is required. + * @param resetUserPasswordRequest + */ + resetUserPassword(resetUserPasswordRequest, _options) { + return __async(this, null, function* () { + var _a, _b, _c; + let _config = _options || this.configuration; + if (resetUserPasswordRequest === null || resetUserPasswordRequest === void 0) { + throw new RequiredError("ThoughtSpotRestApi", "resetUserPassword", "resetUserPasswordRequest"); + } + const localVarPath = "/api/rest/2.0/users/reset-password"; + const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.25.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.25.0"); + const contentType = ObjectSerializer.getPreferredMediaType([ + "application/json" + ]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = ObjectSerializer.stringify( + ObjectSerializer.serialize(resetUserPasswordRequest, "ResetUserPasswordRequest", ""), + contentType + ); + requestContext.setBody(serializedBody); + let authMethod; + authMethod = _config.authMethods["bearerAuth"]; + if (authMethod == null ? void 0 : authMethod.applySecurityAuthentication) { + yield authMethod == null ? void 0 : authMethod.applySecurityAuthentication(requestContext); + } + const defaultAuth = ((_a = _options == null ? void 0 : _options.authMethods) == null ? void 0 : _a.default) || ((_c = (_b = this.configuration) == null ? void 0 : _b.authMethods) == null ? void 0 : _c.default); + if (defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication) { + yield defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication(requestContext); + } + return requestContext; + }); + } + /** + * Version: 9.2.0.cl or later Reverts TML objects to a previous commit specified in the API request. Requires at least edit access to objects. In the API request, specify the `commit_id`. If the branch name is not specified in the request, the API will consider the default branch configured on your instance. By default, the API reverts all objects. If the revert operation fails for one of the objects provided in the commit, the API returns an error and does not revert any object. For more information, see [Git integration documentation](https://developers.thoughtspot.com/docs/git-integration). + * @param commitId Commit id to which the object should be reverted + * @param revertCommitRequest + */ + revertCommit(commitId, revertCommitRequest, _options) { + return __async(this, null, function* () { + var _a, _b, _c; + let _config = _options || this.configuration; + if (commitId === null || commitId === void 0) { + throw new RequiredError("ThoughtSpotRestApi", "revertCommit", "commitId"); + } + if (revertCommitRequest === null || revertCommitRequest === void 0) { + throw new RequiredError("ThoughtSpotRestApi", "revertCommit", "revertCommitRequest"); + } + const localVarPath = "/api/rest/2.0/vcs/git/commits/{commit_id}/revert".replace("{commit_id}", encodeURIComponent(String(commitId))); + const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.25.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.25.0"); + const contentType = ObjectSerializer.getPreferredMediaType([ + "application/json" + ]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = ObjectSerializer.stringify( + ObjectSerializer.serialize(revertCommitRequest, "RevertCommitRequest", ""), + contentType + ); + requestContext.setBody(serializedBody); + let authMethod; + authMethod = _config.authMethods["bearerAuth"]; + if (authMethod == null ? void 0 : authMethod.applySecurityAuthentication) { + yield authMethod == null ? void 0 : authMethod.applySecurityAuthentication(requestContext); + } + const defaultAuth = ((_a = _options == null ? void 0 : _options.authMethods) == null ? void 0 : _a.default) || ((_c = (_b = this.configuration) == null ? void 0 : _b.authMethods) == null ? void 0 : _c.default); + if (defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication) { + yield defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication(requestContext); + } + return requestContext; + }); + } + /** + * Version: 26.2.0.cl or later Revokes OAuth refresh tokens for users who no longer require access to a data warehouse connection. When a token is revoked, the affected user\'s session for that connection is terminated, and they must re-authenticate to regain access. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) or `DATAMANAGEMENT` (**Can manage data**) privileges. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on the ThoughtSpot instance, users with `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) privilege can also make API requests to revoke tokens for connection users. #### Usage guidelines You can specify different combinations of identifiers to control which refresh tokens are revoked. - **connection_identifier**: Revokes refresh tokens for all users of the connection, except the connection author. - **connection_identifier** and **user_identifiers**: Revokes refresh tokens only for the users specified in the request. If the name or ID of the connection author is included in the request, their token will also be revoked. - **connection_identifier** and **configuration_identifiers**: Revokes refresh tokens for all users on the specified configurations, except the configuration author. - **connection_identifier**, **configuration_identifiers**, and **user_identifiers**: Revokes refresh tokens for the specified users on the specified configurations. - **connection_identifier** and **org_identifiers**: Revokes refresh tokens for the specified Orgs. Applicable only for published connections. - **connection_identifier**, **org_identifiers**, and **user_identifiers**: Revokes refresh tokens for the specified users in the specified Orgs. Applicable only for published connections. **NOTE**: The `org_identifiers` parameter is only applicable for published connections. Using this parameter for unpublished connections will result in an error. Ensure that the connections are published before making the API request. + * @param connectionIdentifier Unique ID or name of the connection whose refresh tokens need to be revoked. All the users associated with the connection will have their refresh tokens revoked except the author. + * @param revokeRefreshTokensRequest + */ + revokeRefreshTokens(connectionIdentifier, revokeRefreshTokensRequest, _options) { + return __async(this, null, function* () { + var _a, _b, _c; + let _config = _options || this.configuration; + if (connectionIdentifier === null || connectionIdentifier === void 0) { + throw new RequiredError("ThoughtSpotRestApi", "revokeRefreshTokens", "connectionIdentifier"); + } + if (revokeRefreshTokensRequest === null || revokeRefreshTokensRequest === void 0) { + throw new RequiredError("ThoughtSpotRestApi", "revokeRefreshTokens", "revokeRefreshTokensRequest"); + } + const localVarPath = "/api/rest/2.0/connections/{connection_identifier}/revoke-refresh-tokens".replace("{connection_identifier}", encodeURIComponent(String(connectionIdentifier))); + const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.25.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.25.0"); + const contentType = ObjectSerializer.getPreferredMediaType([ + "application/json" + ]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = ObjectSerializer.stringify( + ObjectSerializer.serialize(revokeRefreshTokensRequest, "RevokeRefreshTokensRequest", ""), + contentType + ); + requestContext.setBody(serializedBody); + let authMethod; + authMethod = _config.authMethods["bearerAuth"]; + if (authMethod == null ? void 0 : authMethod.applySecurityAuthentication) { + yield authMethod == null ? void 0 : authMethod.applySecurityAuthentication(requestContext); + } + const defaultAuth = ((_a = _options == null ? void 0 : _options.authMethods) == null ? void 0 : _a.default) || ((_c = (_b = this.configuration) == null ? void 0 : _b.authMethods) == null ? void 0 : _c.default); + if (defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication) { + yield defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication(requestContext); + } + return requestContext; + }); + } + /** + * Version: 9.0.0.cl or later Revokes the authentication token issued for current user session. The token of your current session expires when you make a call to the `/api/rest/2.0/auth/token/revoke` endpoint. the users will not be able to access ThoughtSpot objects until a new token is obtained. To restart your session, request for a new token from ThoughtSpot. See [Get Full Access Token](#/http/api-endpoints/authentication/get-full-access-token). + * @param revokeTokenRequest + */ + revokeToken(revokeTokenRequest, _options) { + return __async(this, null, function* () { + var _a, _b, _c; + let _config = _options || this.configuration; + if (revokeTokenRequest === null || revokeTokenRequest === void 0) { + throw new RequiredError("ThoughtSpotRestApi", "revokeToken", "revokeTokenRequest"); + } + const localVarPath = "/api/rest/2.0/auth/token/revoke"; + const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.25.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.25.0"); + const contentType = ObjectSerializer.getPreferredMediaType([ + "application/json" + ]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = ObjectSerializer.stringify( + ObjectSerializer.serialize(revokeTokenRequest, "RevokeTokenRequest", ""), + contentType + ); + requestContext.setBody(serializedBody); + let authMethod; + authMethod = _config.authMethods["bearerAuth"]; + if (authMethod == null ? void 0 : authMethod.applySecurityAuthentication) { + yield authMethod == null ? void 0 : authMethod.applySecurityAuthentication(requestContext); + } + const defaultAuth = ((_a = _options == null ? void 0 : _options.authMethods) == null ? void 0 : _a.default) || ((_c = (_b = this.configuration) == null ? void 0 : _b.authMethods) == null ? void 0 : _c.default); + if (defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication) { + yield defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication(requestContext); + } + return requestContext; + }); + } + /** + * Version: 26.6.0.cl or later Returns the authentication configuration for the specified auth type at cluster and org level. Currently supports `TRUSTED_AUTH`. #### Required privileges Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) or `CONTROL_TRUSTED_AUTH` (**Can Enable or Disable Trusted Authentication**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled, the `CONTROL_TRUSTED_AUTH` privilege is required. #### Usage guidelines Use `scope` to control which level of settings are returned: - `CLUSTER` — Returns cluster-level authentication status and access tokens. Accessible only from the Primary Org. - `ORG` — Returns org-level authentication status and access tokens for the current Org. Requires the per-Org authentication feature to be enabled on your instance. - If `scope` is omitted, both cluster and org-level settings are returned based on the caller\'s org context and feature availability. The `access_tokens` array in `cluster_preferences` or `org_preferences` is omitted when no token is configured at that level. **Note**: Access tokens returned in the response are sensitive credentials. Treat them with the same care as passwords. + * @param searchAuthSettingsRequest + */ + searchAuthSettings(searchAuthSettingsRequest, _options) { + return __async(this, null, function* () { + var _a, _b, _c; + let _config = _options || this.configuration; + if (searchAuthSettingsRequest === null || searchAuthSettingsRequest === void 0) { + throw new RequiredError("ThoughtSpotRestApi", "searchAuthSettings", "searchAuthSettingsRequest"); + } + const localVarPath = "/api/rest/2.0/auth/search"; + const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.25.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.25.0"); + const contentType = ObjectSerializer.getPreferredMediaType([ + "application/json" + ]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = ObjectSerializer.stringify( + ObjectSerializer.serialize(searchAuthSettingsRequest, "SearchAuthSettingsRequest", ""), + contentType + ); + requestContext.setBody(serializedBody); + let authMethod; + authMethod = _config.authMethods["bearerAuth"]; + if (authMethod == null ? void 0 : authMethod.applySecurityAuthentication) { + yield authMethod == null ? void 0 : authMethod.applySecurityAuthentication(requestContext); + } + const defaultAuth = ((_a = _options == null ? void 0 : _options.authMethods) == null ? void 0 : _a.default) || ((_c = (_b = this.configuration) == null ? void 0 : _b.authMethods) == null ? void 0 : _c.default); + if (defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication) { + yield defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication(requestContext); + } + return requestContext; + }); + } + /** + * Version: 10.12.0.cl or later Gets a list of [custom calendars](https://docs.thoughtspot.com/cloud/latest/connections-cust-cal). Requires `DATAMANAGEMENT` (**Can manage data**) or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your ThoughtSpot instance, the `CAN_MANAGE_CUSTOM_CALENDAR` (**Can manage custom calendars**) privilege is required. #### Usage guidelines By default, the API returns a list of custom calendars for all connection objects. To retrieve custom calendar details for a particular connection, specify the connection ID. You can also use other search parameters such as `name_pattern` and `sort_options` as search filters. The `name_pattern` parameter filters and returns only those objects that match the specified pattern. Use `%` as a wildcard for pattern matching. + * @param searchCalendarsRequest + */ + searchCalendars(searchCalendarsRequest, _options) { + return __async(this, null, function* () { + var _a, _b, _c; + let _config = _options || this.configuration; + if (searchCalendarsRequest === null || searchCalendarsRequest === void 0) { + throw new RequiredError("ThoughtSpotRestApi", "searchCalendars", "searchCalendarsRequest"); + } + const localVarPath = "/api/rest/2.0/calendars/search"; + const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.25.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.25.0"); + const contentType = ObjectSerializer.getPreferredMediaType([ + "application/json" + ]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = ObjectSerializer.stringify( + ObjectSerializer.serialize(searchCalendarsRequest, "SearchCalendarsRequest", ""), + contentType + ); + requestContext.setBody(serializedBody); + let authMethod; + authMethod = _config.authMethods["bearerAuth"]; + if (authMethod == null ? void 0 : authMethod.applySecurityAuthentication) { + yield authMethod == null ? void 0 : authMethod.applySecurityAuthentication(requestContext); + } + const defaultAuth = ((_a = _options == null ? void 0 : _options.authMethods) == null ? void 0 : _a.default) || ((_c = (_b = this.configuration) == null ? void 0 : _b.authMethods) == null ? void 0 : _c.default); + if (defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication) { + yield defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication(requestContext); + } + return requestContext; + }); + } + /** + * Version: 26.4.0.cl or later Searches delivery history for communication channels such as webhooks. Returns channel-level delivery status for each job execution record. Use this to monitor channel health and delivery success rates across events. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) or `DEVELOPER` (**Has developer privilege**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, users with `CAN_MANAGE_WEBHOOKS` (**Can manage webhooks**) privilege are also authorized to perform this action. **NOTE**: When `channel_type` is `WEBHOOK`, the following constraints apply: - `job_ids`, `channel_identifiers`, and `events` each accept at most one element. - When `job_ids` is provided, it is used as the sole lookup key and other filter fields are ignored. - When `job_ids` is not provided, `channel_identifiers` and `events` are both required, each containing exactly one element. - Records older than the configured retention period are not returned. - Use `start_epoch_time_in_millis` and/or `end_epoch_time_in_millis` to narrow results to a specific time window. + * @param searchChannelHistoryRequest + */ + searchChannelHistory(searchChannelHistoryRequest, _options) { + return __async(this, null, function* () { + var _a, _b, _c; + let _config = _options || this.configuration; + if (searchChannelHistoryRequest === null || searchChannelHistoryRequest === void 0) { + throw new RequiredError("ThoughtSpotRestApi", "searchChannelHistory", "searchChannelHistoryRequest"); + } + const localVarPath = "/api/rest/2.0/jobs/history/communication-channels/search"; + const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.25.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.25.0"); + const contentType = ObjectSerializer.getPreferredMediaType([ + "application/json" + ]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = ObjectSerializer.stringify( + ObjectSerializer.serialize(searchChannelHistoryRequest, "SearchChannelHistoryRequest", ""), + contentType + ); + requestContext.setBody(serializedBody); + let authMethod; + authMethod = _config.authMethods["bearerAuth"]; + if (authMethod == null ? void 0 : authMethod.applySecurityAuthentication) { + yield authMethod == null ? void 0 : authMethod.applySecurityAuthentication(requestContext); + } + const defaultAuth = ((_a = _options == null ? void 0 : _options.authMethods) == null ? void 0 : _a.default) || ((_c = (_b = this.configuration) == null ? void 0 : _b.authMethods) == null ? void 0 : _c.default); + if (defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication) { + yield defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication(requestContext); + } + return requestContext; + }); + } + /** + * Version: 26.4.0.cl or later Gets a list of collections available in ThoughtSpot. To get details of a specific collection, specify the collection GUID or name. You can also filter the API response based on the collection name pattern, author, and other criteria. #### Search options * **name_pattern**: Use \'%\' as a wildcard character to match collection names * **collection_identifiers**: Search for specific collections by their GUIDs or names * **include_metadata**: When set to `true`, includes the metadata objects within each collection in the response **NOTE**: If the API returns an empty list, consider increasing the value of the `record_size` parameter. To search across all available collections, set `record_size` to `-1`. + * @param searchCollectionsRequest + */ + searchCollections(searchCollectionsRequest, _options) { + return __async(this, null, function* () { + var _a, _b, _c; + let _config = _options || this.configuration; + if (searchCollectionsRequest === null || searchCollectionsRequest === void 0) { + throw new RequiredError("ThoughtSpotRestApi", "searchCollections", "searchCollectionsRequest"); + } + const localVarPath = "/api/rest/2.0/collections/search"; + const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.25.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.25.0"); + const contentType = ObjectSerializer.getPreferredMediaType([ + "application/json" + ]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = ObjectSerializer.stringify( + ObjectSerializer.serialize(searchCollectionsRequest, "SearchCollectionsRequest", ""), + contentType + ); + requestContext.setBody(serializedBody); + let authMethod; + authMethod = _config.authMethods["bearerAuth"]; + if (authMethod == null ? void 0 : authMethod.applySecurityAuthentication) { + yield authMethod == null ? void 0 : authMethod.applySecurityAuthentication(requestContext); + } + const defaultAuth = ((_a = _options == null ? void 0 : _options.authMethods) == null ? void 0 : _a.default) || ((_c = (_b = this.configuration) == null ? void 0 : _b.authMethods) == null ? void 0 : _c.default); + if (defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication) { + yield defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication(requestContext); + } + return requestContext; + }); + } + /** + * Version: 9.2.0.cl or later Gets a list of commits for a given metadata object. Requires `DATAMANAGEMENT` (**Can manage data**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance on your instance, the `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` (**Can manage data models**) privilege and edit access to the metadata objects. + * @param searchCommitsRequest + */ + searchCommits(searchCommitsRequest, _options) { + return __async(this, null, function* () { + var _a, _b, _c; + let _config = _options || this.configuration; + if (searchCommitsRequest === null || searchCommitsRequest === void 0) { + throw new RequiredError("ThoughtSpotRestApi", "searchCommits", "searchCommitsRequest"); + } + const localVarPath = "/api/rest/2.0/vcs/git/commits/search"; + const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.25.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.25.0"); + const contentType = ObjectSerializer.getPreferredMediaType([ + "application/json" + ]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = ObjectSerializer.stringify( + ObjectSerializer.serialize(searchCommitsRequest, "SearchCommitsRequest", ""), + contentType + ); + requestContext.setBody(serializedBody); + let authMethod; + authMethod = _config.authMethods["bearerAuth"]; + if (authMethod == null ? void 0 : authMethod.applySecurityAuthentication) { + yield authMethod == null ? void 0 : authMethod.applySecurityAuthentication(requestContext); + } + const defaultAuth = ((_a = _options == null ? void 0 : _options.authMethods) == null ? void 0 : _a.default) || ((_c = (_b = this.configuration) == null ? void 0 : _b.authMethods) == null ? void 0 : _c.default); + if (defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication) { + yield defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication(requestContext); + } + return requestContext; + }); + } + /** + * Version: 10.14.0.cl or later Fetch communication channel preferences. - Use `cluster_preferences` to fetch the default preferences for your ThoughtSpot application instance. - If your instance has [Orgs](https://docs.thoughtspot.com/cloud/latest/orgs-overview), use `org_preferences` to fetch any Org-specific preferences that override the defaults. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) or `DEVELOPER` (**Has developer privilege**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, users with `APPLICATION_ADMINISTRATION` (**Can manage application settings**) privilege are also authorized to perform this action. + * @param searchCommunicationChannelPreferencesRequest + */ + searchCommunicationChannelPreferences(searchCommunicationChannelPreferencesRequest, _options) { + return __async(this, null, function* () { + var _a, _b, _c; + let _config = _options || this.configuration; + if (searchCommunicationChannelPreferencesRequest === null || searchCommunicationChannelPreferencesRequest === void 0) { + throw new RequiredError("ThoughtSpotRestApi", "searchCommunicationChannelPreferences", "searchCommunicationChannelPreferencesRequest"); + } + const localVarPath = "/api/rest/2.0/system/preferences/communication-channels/search"; + const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.25.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.25.0"); + const contentType = ObjectSerializer.getPreferredMediaType([ + "application/json" + ]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = ObjectSerializer.stringify( + ObjectSerializer.serialize(searchCommunicationChannelPreferencesRequest, "SearchCommunicationChannelPreferencesRequest", ""), + contentType + ); + requestContext.setBody(serializedBody); + let authMethod; + authMethod = _config.authMethods["bearerAuth"]; + if (authMethod == null ? void 0 : authMethod.applySecurityAuthentication) { + yield authMethod == null ? void 0 : authMethod.applySecurityAuthentication(requestContext); + } + const defaultAuth = ((_a = _options == null ? void 0 : _options.authMethods) == null ? void 0 : _a.default) || ((_c = (_b = this.configuration) == null ? void 0 : _b.authMethods) == null ? void 0 : _c.default); + if (defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication) { + yield defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication(requestContext); + } + return requestContext; + }); + } + /** + * Version: 9.2.0.cl or later Gets Git repository connections configured on the ThoughtSpot instance. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance on your instance, the `CAN_SETUP_VERSION_CONTROL` (**Can set up version control**) privilege. + * @param searchConfigRequest + */ + searchConfig(searchConfigRequest, _options) { + return __async(this, null, function* () { + var _a, _b, _c; + let _config = _options || this.configuration; + if (searchConfigRequest === null || searchConfigRequest === void 0) { + throw new RequiredError("ThoughtSpotRestApi", "searchConfig", "searchConfigRequest"); + } + const localVarPath = "/api/rest/2.0/vcs/git/config/search"; + const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.25.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.25.0"); + const contentType = ObjectSerializer.getPreferredMediaType([ + "application/json" + ]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = ObjectSerializer.stringify( + ObjectSerializer.serialize(searchConfigRequest, "SearchConfigRequest", ""), + contentType + ); + requestContext.setBody(serializedBody); + let authMethod; + authMethod = _config.authMethods["bearerAuth"]; + if (authMethod == null ? void 0 : authMethod.applySecurityAuthentication) { + yield authMethod == null ? void 0 : authMethod.applySecurityAuthentication(requestContext); + } + const defaultAuth = ((_a = _options == null ? void 0 : _options.authMethods) == null ? void 0 : _a.default) || ((_c = (_b = this.configuration) == null ? void 0 : _b.authMethods) == null ? void 0 : _c.default); + if (defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication) { + yield defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication(requestContext); + } + return requestContext; + }); + } + /** + * Version: 9.2.0.cl or later Gets connection objects. Requires `DATAMANAGEMENT` (**Can manage data**) or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) privilege is required. - To get a list of all connections available in the ThoughtSpot system, send the API request without any attributes in the request body. - To get the connection objects for a specific type of data warehouse, specify the type in `data_warehouse_types`. - To fetch details of a connection object, specify the connection object GUID or name. The `name_pattern` attribute allows passing partial text with `%` for a wildcard match. - To get details of the database, schemas, tables, or columns from a data connection object, specify `data_warehouse_object_type`. - To get a specific database, schema, table, or column from a connection object, define the object type in `data_warehouse_object_type` and object properties in the `data_warehouse_objects` array. For example, to search for a column, you must pass the database, schema, and table names in the API request. Note that in the following example, object properties are set in a hierarchical order (`database` > `schema` > `table` > `column`). ``` { \"connections\": [ { \"identifier\": \"b9d1f2ef-fa65-4a4b-994e-30fa2d57b0c2\", \"data_warehouse_objects\": [ { \"database\": \"NEBULADEV\", \"schema\": \"INFORMATION_SCHEMA\", \"table\": \"APPLICABLE_ROLES\", \"column\": \"ROLE_NAME\" } ] } ], \"data_warehouse_object_type\": \"COLUMN\" } ``` - To fetch data by `configuration`, specify `data_warehouse_object_type`. For example, to fetch columns from the `DEVELOPMENT` database, specify the `data_warehouse_object_type` as `DATABASE` and define the `configuration` string as `{\"database\":\"DEVELOPMENT\"}`. To get column data for a specific table, specify the table, for example,`{\"database\":\"RETAILAPPAREL\",\"table\":\"PIPES\"}`. - To query connections by `authentication_type`, specify `data_warehouse_object_type`. Supported values for `authentication_type` are: - `SERVICE_ACCOUNT`: For connections that require service account credentials to authenticate to the Cloud Data Warehouse and fetch data. - `OAUTH`: For connections that require OAuth credentials to authenticate to the Cloud Data Warehouse and fetch data. Teradata, Oracle, and Presto Cloud Data Warehouses do not support the OAuth authentication type. - `IAM`: For connections that have the IAM OAuth set up. This authentication type is supported on Amazon Redshift connections only. - `EXTOAUTH`: For connections that have External OAuth set up. ThoughtSpot supports external [OAuth with Microsoft Azure Active Directory (AD)](https://docs.thoughtspot.com/cloud/latest/ connections-snowflake-azure-ad-oauth) and [Okta for Snowflake data connections](https://docs.thoughtspot.com/cloud/latest/connections-snowflake-okta-oauth). - `KEY_PAIR`: For connections that require Key Pair account credentials to authenticate to the Cloud Data Warehouse and fetch data. This authentication type is supported on Snowflake connections only. - `OAUTH_WITH_PKCE`: For connections that require OAuth with PKCE account credentials to authenticate to the Cloud Data Warehouse and fetch data. This authentication type is supported on Snowflake, Starburst, Databricks, Denodo connections only. - `EXTOAUTH_WITH_PKCE`: For connections that require External OAuth With PKCE account credentials to authenticate to the Cloud Data Warehouse and fetch data. This authentication type is supported on Snowflake connections only. - `OAUTH_WITH_PEZ`: For connections that require OAuth With PEZ account credentials to authenticate to the Cloud Data Warehouse and fetch data. This authentication type is supported on Amazon Redshift connections only. - `OAUTH_WITH_SERVICE_PRINCIPAL`: For connections that require OAuth With Service Principal account credentials to authenticate to the Cloud Data Warehouse and fetch data. This authentication type is supported on Databricks connections only. - `PERSONAL_ACCESS_TOKEN`: For connections that require Personal Access Token account credentials to authenticate to the Cloud Data Warehouse and fetch data. This authentication type is supported on Databricks connections only. - `OAUTH_CLIENT_CREDENTIALS`: For connections that require OAuth Client Credentials to authenticate to the Cloud Data Warehouse and fetch data. This authentication type is supported on Snowflake connections only. - To include more details about connection objects in the API response, set `include_details` to `true`. - You can also sort the output by field names and filter connections by tags. **NOTE**: When filtering connection records by parameters other than `data_warehouse_types` or `tag_identifiers`, ensure that you set `record_size` to `-1` and `record_offset` to `0` for precise results. + * @param searchConnectionRequest + */ + searchConnection(searchConnectionRequest, _options) { + return __async(this, null, function* () { + var _a, _b, _c; + let _config = _options || this.configuration; + if (searchConnectionRequest === null || searchConnectionRequest === void 0) { + throw new RequiredError("ThoughtSpotRestApi", "searchConnection", "searchConnectionRequest"); + } + const localVarPath = "/api/rest/2.0/connection/search"; + const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.25.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.25.0"); + const contentType = ObjectSerializer.getPreferredMediaType([ + "application/json" + ]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = ObjectSerializer.stringify( + ObjectSerializer.serialize(searchConnectionRequest, "SearchConnectionRequest", ""), + contentType + ); + requestContext.setBody(serializedBody); + let authMethod; + authMethod = _config.authMethods["bearerAuth"]; + if (authMethod == null ? void 0 : authMethod.applySecurityAuthentication) { + yield authMethod == null ? void 0 : authMethod.applySecurityAuthentication(requestContext); + } + const defaultAuth = ((_a = _options == null ? void 0 : _options.authMethods) == null ? void 0 : _a.default) || ((_c = (_b = this.configuration) == null ? void 0 : _b.authMethods) == null ? void 0 : _c.default); + if (defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication) { + yield defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication(requestContext); + } + return requestContext; + }); + } + /** + * Version: 9.6.0.cl or later Gets custom actions configured on the cluster. Requires `DEVELOPER` (**Has Developer privilege**) or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `DEVELOPER` (**Has developer privilege**) privilege is required. + * @param searchCustomActionsRequest + */ + searchCustomActions(searchCustomActionsRequest, _options) { + return __async(this, null, function* () { + var _a, _b, _c; + let _config = _options || this.configuration; + if (searchCustomActionsRequest === null || searchCustomActionsRequest === void 0) { + throw new RequiredError("ThoughtSpotRestApi", "searchCustomActions", "searchCustomActionsRequest"); + } + const localVarPath = "/api/rest/2.0/customization/custom-actions/search"; + const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.25.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.25.0"); + const contentType = ObjectSerializer.getPreferredMediaType([ + "application/json" + ]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = ObjectSerializer.stringify( + ObjectSerializer.serialize(searchCustomActionsRequest, "SearchCustomActionsRequest", ""), + contentType + ); + requestContext.setBody(serializedBody); + let authMethod; + authMethod = _config.authMethods["bearerAuth"]; + if (authMethod == null ? void 0 : authMethod.applySecurityAuthentication) { + yield authMethod == null ? void 0 : authMethod.applySecurityAuthentication(requestContext); + } + const defaultAuth = ((_a = _options == null ? void 0 : _options.authMethods) == null ? void 0 : _a.default) || ((_c = (_b = this.configuration) == null ? void 0 : _b.authMethods) == null ? void 0 : _c.default); + if (defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication) { + yield defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication(requestContext); + } + return requestContext; + }); + } + /** + * Version: 9.0.0.cl or later Generates an Answer from a given data source. Requires at least view access to the data source object (Worksheet or View). #### Usage guidelines To search data, specify the data source GUID in `logical_table_identifier`. The data source can be a Worksheet, View, Table, or SQL view. Pass search tokens in the `query_string` attribute in the API request as shown in the following example: ``` { \"query_string\": \"[sales] by [store]\", \"logical_table_identifier\": \"cd252e5c-b552-49a8-821d-3eadaa049cca\", } ``` For more information about the `query_string` format and data source attribute, see [Search data API](https://developers.thoughtspot.com/docs/fetch-data-and-report-apis#_search_data_api). The `record_size` attribute determines the number of records to retrieve in an API call. For more information about pagination, record size, and maximum row limit, see [Pagination and record size settings](https://developers.thoughtspot.com/docs/fetch-data-and-report-apis#_pagination_settings_for_data_and_report_api). + * @param searchDataRequest + */ + searchData(searchDataRequest, _options) { + return __async(this, null, function* () { + var _a, _b, _c; + let _config = _options || this.configuration; + if (searchDataRequest === null || searchDataRequest === void 0) { + throw new RequiredError("ThoughtSpotRestApi", "searchData", "searchDataRequest"); + } + const localVarPath = "/api/rest/2.0/searchdata"; + const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.25.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.25.0"); + const contentType = ObjectSerializer.getPreferredMediaType([ + "application/json" + ]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = ObjectSerializer.stringify( + ObjectSerializer.serialize(searchDataRequest, "SearchDataRequest", ""), + contentType + ); + requestContext.setBody(serializedBody); + let authMethod; + authMethod = _config.authMethods["bearerAuth"]; + if (authMethod == null ? void 0 : authMethod.applySecurityAuthentication) { + yield authMethod == null ? void 0 : authMethod.applySecurityAuthentication(requestContext); + } + const defaultAuth = ((_a = _options == null ? void 0 : _options.authMethods) == null ? void 0 : _a.default) || ((_c = (_b = this.configuration) == null ? void 0 : _b.authMethods) == null ? void 0 : _c.default); + if (defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication) { + yield defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication(requestContext); + } + return requestContext; + }); + } + /** + * Version: 10.10.0.cl or later Search the email customization configuration if any set for the ThoughtSpot system. #### Pre-requisites Requires `DEVELOPER` (**has developer privilege**) or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `DEVELOPER` (**Has developer privilege**) privilege is required. **NOTE**:This endpoint in currently in beta. Contact ThoughtSpot support to enable this on your instance. + * @param searchEmailCustomizationRequest + */ + searchEmailCustomization(searchEmailCustomizationRequest, _options) { + return __async(this, null, function* () { + var _a, _b, _c; + let _config = _options || this.configuration; + if (searchEmailCustomizationRequest === null || searchEmailCustomizationRequest === void 0) { + throw new RequiredError("ThoughtSpotRestApi", "searchEmailCustomization", "searchEmailCustomizationRequest"); + } + const localVarPath = "/api/rest/2.0/customization/email/search"; + const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.25.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.25.0"); + const contentType = ObjectSerializer.getPreferredMediaType([ + "application/json" + ]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = ObjectSerializer.stringify( + ObjectSerializer.serialize(searchEmailCustomizationRequest, "SearchEmailCustomizationRequest", ""), + contentType + ); + requestContext.setBody(serializedBody); + let authMethod; + authMethod = _config.authMethods["bearerAuth"]; + if (authMethod == null ? void 0 : authMethod.applySecurityAuthentication) { + yield authMethod == null ? void 0 : authMethod.applySecurityAuthentication(requestContext); + } + const defaultAuth = ((_a = _options == null ? void 0 : _options.authMethods) == null ? void 0 : _a.default) || ((_c = (_b = this.configuration) == null ? void 0 : _b.authMethods) == null ? void 0 : _c.default); + if (defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication) { + yield defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication(requestContext); + } + return requestContext; + }); + } + /** + * Version: 9.0.0.cl or later Gets a list of metadata objects available on the ThoughtSpot system. This API endpoint is available to all users who have view access to the object. Users with `ADMINISTRATION` (**Can administer ThoughtSpot**) privileges can view data for all metadata objects, including users and groups. #### Usage guidelines - To get all metadata objects, send the API request without any attributes. - To get metadata objects of a specific type, set the `type` attribute. For example, to fetch a Worksheet, set the type as `LOGICAL_TABLE`. - To filter metadata objects within type `LOGICAL_TABLE`, set the `subtypes` attribute. For example, to fetch a Worksheet, set the type as `LOGICAL_TABLE` & subtypes as `[WORKSHEET]`. - To get a specific metadata object, specify the GUID. - To customize your search and filter the API response, you can use several parameters. You can search for objects created or modified by specific users, by tags applied to the objects, or by using the include parameters like `include_auto_created_objects`, `include_dependent_objects`, `include_headers`, `include_incomplete_objects`, and so on. You can also define sorting options to sort the data retrieved in the API response. - To get discoverable objects when linientmodel is enabled you can use `include_discoverable_objects` as true else false. Default value is true. - For liveboard metadata type, to get the newer format, set the `liveboard_response_format` as V2. Default value is V1. - To retrieve only objects that are published, set the `include_only_published_objects` as true. Default value is false. **NOTE**: The following parameters support pagination of metadata records: - `tag_identifiers` - `type` - `subtypes` - `created_by_user_identifiers` - `modified_by_user_identifiers` - `owned_by_user_identifiers` - `exclude_objects` - `include_auto_created_objects` - `favorite_object_options` - `include_only_published_objects` If you are using other parameters to search metadata, set `record_size` to `-1` and `record_offset` to `0`. + * @param searchMetadataRequest + */ + searchMetadata(searchMetadataRequest, _options) { + return __async(this, null, function* () { + var _a, _b, _c; + let _config = _options || this.configuration; + if (searchMetadataRequest === null || searchMetadataRequest === void 0) { + throw new RequiredError("ThoughtSpotRestApi", "searchMetadata", "searchMetadataRequest"); + } + const localVarPath = "/api/rest/2.0/metadata/search"; + const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.25.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.25.0"); + const contentType = ObjectSerializer.getPreferredMediaType([ + "application/json" + ]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = ObjectSerializer.stringify( + ObjectSerializer.serialize(searchMetadataRequest, "SearchMetadataRequest", ""), + contentType + ); + requestContext.setBody(serializedBody); + let authMethod; + authMethod = _config.authMethods["bearerAuth"]; + if (authMethod == null ? void 0 : authMethod.applySecurityAuthentication) { + yield authMethod == null ? void 0 : authMethod.applySecurityAuthentication(requestContext); + } + const defaultAuth = ((_a = _options == null ? void 0 : _options.authMethods) == null ? void 0 : _a.default) || ((_c = (_b = this.configuration) == null ? void 0 : _b.authMethods) == null ? void 0 : _c.default); + if (defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication) { + yield defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication(requestContext); + } + return requestContext; + }); + } + /** + * Version: 9.0.0.cl or later Gets a list of Orgs configured on the ThoughtSpot system. To get details of a specific Org, specify the Org ID or name. You can also pass parameters such as status, visibility, and user identifiers to get a specific list of Orgs. Requires cluster administration (**Can administer Org**) privileges. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `ORG_ADMINISTRATION` (**Can manage Orgs**) privilege is required. + * @param searchOrgsRequest + */ + searchOrgs(searchOrgsRequest, _options) { + return __async(this, null, function* () { + var _a, _b, _c; + let _config = _options || this.configuration; + if (searchOrgsRequest === null || searchOrgsRequest === void 0) { + throw new RequiredError("ThoughtSpotRestApi", "searchOrgs", "searchOrgsRequest"); + } + const localVarPath = "/api/rest/2.0/orgs/search"; + const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.25.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.25.0"); + const contentType = ObjectSerializer.getPreferredMediaType([ + "application/json" + ]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = ObjectSerializer.stringify( + ObjectSerializer.serialize(searchOrgsRequest, "SearchOrgsRequest", ""), + contentType + ); + requestContext.setBody(serializedBody); + let authMethod; + authMethod = _config.authMethods["bearerAuth"]; + if (authMethod == null ? void 0 : authMethod.applySecurityAuthentication) { + yield authMethod == null ? void 0 : authMethod.applySecurityAuthentication(requestContext); + } + const defaultAuth = ((_a = _options == null ? void 0 : _options.authMethods) == null ? void 0 : _a.default) || ((_c = (_b = this.configuration) == null ? void 0 : _b.authMethods) == null ? void 0 : _c.default); + if (defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication) { + yield defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication(requestContext); + } + return requestContext; + }); + } + /** + * Version: 9.5.0.cl or later Gets a list of Role objects from the ThoughtSpot system. Available if [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance. To search for Roles, the `ROLE_ADMINISTRATION` (**Can manage roles**) privilege is required. To get details of a specific Role object, specify the GUID or name. You can also filter the API response based on user group and Org identifiers, privileges assigned to the Role, and deprecation status. + * @param searchRolesRequest + */ + searchRoles(searchRolesRequest, _options) { + return __async(this, null, function* () { + var _a, _b, _c; + let _config = _options || this.configuration; + if (searchRolesRequest === null || searchRolesRequest === void 0) { + throw new RequiredError("ThoughtSpotRestApi", "searchRoles", "searchRolesRequest"); + } + const localVarPath = "/api/rest/2.0/roles/search"; + const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.25.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.25.0"); + const contentType = ObjectSerializer.getPreferredMediaType([ + "application/json" + ]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = ObjectSerializer.stringify( + ObjectSerializer.serialize(searchRolesRequest, "SearchRolesRequest", ""), + contentType + ); + requestContext.setBody(serializedBody); + let authMethod; + authMethod = _config.authMethods["bearerAuth"]; + if (authMethod == null ? void 0 : authMethod.applySecurityAuthentication) { + yield authMethod == null ? void 0 : authMethod.applySecurityAuthentication(requestContext); + } + const defaultAuth = ((_a = _options == null ? void 0 : _options.authMethods) == null ? void 0 : _a.default) || ((_c = (_b = this.configuration) == null ? void 0 : _b.authMethods) == null ? void 0 : _c.default); + if (defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication) { + yield defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication(requestContext); + } + return requestContext; + }); + } + /** + * Search Schedules Version: 9.4.0.cl or later Gets a list of scheduled jobs configured for a Liveboard. To get details of a specific scheduled job, specify the name or GUID of the scheduled job. Requires at least view access to Liveboards. **NOTE**: When filtering schedules by parameters other than `metadata`, set `record_size` to `-1` and `record_offset` to `0` for accurate results. + * @param searchSchedulesRequest + */ + searchSchedules(searchSchedulesRequest, _options) { + return __async(this, null, function* () { + var _a, _b, _c; + let _config = _options || this.configuration; + if (searchSchedulesRequest === null || searchSchedulesRequest === void 0) { + throw new RequiredError("ThoughtSpotRestApi", "searchSchedules", "searchSchedulesRequest"); + } + const localVarPath = "/api/rest/2.0/schedules/search"; + const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.25.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.25.0"); + const contentType = ObjectSerializer.getPreferredMediaType([ + "application/json" + ]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = ObjectSerializer.stringify( + ObjectSerializer.serialize(searchSchedulesRequest, "SearchSchedulesRequest", ""), + contentType + ); + requestContext.setBody(serializedBody); + let authMethod; + authMethod = _config.authMethods["bearerAuth"]; + if (authMethod == null ? void 0 : authMethod.applySecurityAuthentication) { + yield authMethod == null ? void 0 : authMethod.applySecurityAuthentication(requestContext); + } + const defaultAuth = ((_a = _options == null ? void 0 : _options.authMethods) == null ? void 0 : _a.default) || ((_c = (_b = this.configuration) == null ? void 0 : _b.authMethods) == null ? void 0 : _c.default); + if (defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication) { + yield defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication(requestContext); + } + return requestContext; + }); + } + /** + * Version: 26.2.0.cl or later Fetch security settings for your ThoughtSpot application instance. - Use `scope: CLUSTER` to retrieve cluster-level security settings, including CORS and CSP allowlists, SAML redirect URLs, and settings that control access to non-embedded pages. - Use `scope: ORG` to retrieve Org-level security settings. If your instance has [Orgs](https://docs.thoughtspot.com/cloud/latest/orgs-overview), this returns CORS and non-embed access settings specific to the Org. - If `scope` is not specified, returns both cluster and Org-specific settings based on user privileges. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) or `DEVELOPER` (**Has developer privilege**) privilege. See [Security Settings](https://developers.thoughtspot.com/docs/security-settings) for more details. + * @param searchSecuritySettingsRequest + */ + searchSecuritySettings(searchSecuritySettingsRequest, _options) { + return __async(this, null, function* () { + var _a, _b, _c; + let _config = _options || this.configuration; + if (searchSecuritySettingsRequest === null || searchSecuritySettingsRequest === void 0) { + throw new RequiredError("ThoughtSpotRestApi", "searchSecuritySettings", "searchSecuritySettingsRequest"); + } + const localVarPath = "/api/rest/2.0/system/security-settings/search"; + const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.25.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.25.0"); + const contentType = ObjectSerializer.getPreferredMediaType([ + "application/json" + ]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = ObjectSerializer.stringify( + ObjectSerializer.serialize(searchSecuritySettingsRequest, "SearchSecuritySettingsRequest", ""), + contentType + ); + requestContext.setBody(serializedBody); + let authMethod; + authMethod = _config.authMethods["bearerAuth"]; + if (authMethod == null ? void 0 : authMethod.applySecurityAuthentication) { + yield authMethod == null ? void 0 : authMethod.applySecurityAuthentication(requestContext); + } + const defaultAuth = ((_a = _options == null ? void 0 : _options.authMethods) == null ? void 0 : _a.default) || ((_c = (_b = this.configuration) == null ? void 0 : _b.authMethods) == null ? void 0 : _c.default); + if (defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication) { + yield defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication(requestContext); + } + return requestContext; + }); + } + /** + * Version: 9.0.0.cl or later Gets a list of tag objects available on the ThoughtSpot system. To get details of a specific tag object, specify the GUID or name. Any authenticated user can search for tag objects. + * @param searchTagsRequest + */ + searchTags(searchTagsRequest, _options) { + return __async(this, null, function* () { + var _a, _b, _c; + let _config = _options || this.configuration; + if (searchTagsRequest === null || searchTagsRequest === void 0) { + throw new RequiredError("ThoughtSpotRestApi", "searchTags", "searchTagsRequest"); + } + const localVarPath = "/api/rest/2.0/tags/search"; + const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.25.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.25.0"); + const contentType = ObjectSerializer.getPreferredMediaType([ + "application/json" + ]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = ObjectSerializer.stringify( + ObjectSerializer.serialize(searchTagsRequest, "SearchTagsRequest", ""), + contentType + ); + requestContext.setBody(serializedBody); + let authMethod; + authMethod = _config.authMethods["bearerAuth"]; + if (authMethod == null ? void 0 : authMethod.applySecurityAuthentication) { + yield authMethod == null ? void 0 : authMethod.applySecurityAuthentication(requestContext); + } + const defaultAuth = ((_a = _options == null ? void 0 : _options.authMethods) == null ? void 0 : _a.default) || ((_c = (_b = this.configuration) == null ? void 0 : _b.authMethods) == null ? void 0 : _c.default); + if (defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication) { + yield defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication(requestContext); + } + return requestContext; + }); + } + /** + * Version: 9.0.0.cl or later Gets a list of user group objects from the ThoughtSpot system. To get details of a specific user group, specify the user group GUID or name. You can also filter the API response based on User ID, Org ID, Role ID, type of group, sharing visibility, privileges assigned to the group, and the Liveboard IDs assigned to the users in the group. Available to all users. Users with `ADMINISTRATION` (**Can administer ThoughtSpot**) privileges can view all users properties. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `GROUP_ADMINISTRATION` (**Can manage groups**) privilege is required. **NOTE**: If you do not get precise results, try setting `record_size` to `-1` and `record_offset` to `0`. + * @param searchUserGroupsRequest + */ + searchUserGroups(searchUserGroupsRequest, _options) { + return __async(this, null, function* () { + var _a, _b, _c; + let _config = _options || this.configuration; + if (searchUserGroupsRequest === null || searchUserGroupsRequest === void 0) { + throw new RequiredError("ThoughtSpotRestApi", "searchUserGroups", "searchUserGroupsRequest"); + } + const localVarPath = "/api/rest/2.0/groups/search"; + const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.25.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.25.0"); + const contentType = ObjectSerializer.getPreferredMediaType([ + "application/json" + ]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = ObjectSerializer.stringify( + ObjectSerializer.serialize(searchUserGroupsRequest, "SearchUserGroupsRequest", ""), + contentType + ); + requestContext.setBody(serializedBody); + let authMethod; + authMethod = _config.authMethods["bearerAuth"]; + if (authMethod == null ? void 0 : authMethod.applySecurityAuthentication) { + yield authMethod == null ? void 0 : authMethod.applySecurityAuthentication(requestContext); + } + const defaultAuth = ((_a = _options == null ? void 0 : _options.authMethods) == null ? void 0 : _a.default) || ((_c = (_b = this.configuration) == null ? void 0 : _b.authMethods) == null ? void 0 : _c.default); + if (defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication) { + yield defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication(requestContext); + } + return requestContext; + }); + } + /** + * Version: 9.0.0.cl or later Gets a list of users available on the ThoughtSpot system. To get details of a specific user, specify the user GUID or name. You can also filter the API response based on groups, Org ID, user visibility, account status, user type, and user preference settings and favorites. Available to all users. Users with `ADMINISTRATION` (**Can administer ThoughtSpot**) privileges can view all users properties. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `USER_ADMINISTRATION` (**Can manage users**) privilege is required. **NOTE**: If the API returns an empty list, consider increasing the value of the `record_size` parameter. To search across all available users, set `record_size` to `-1`. + * @param searchUsersRequest + */ + searchUsers(searchUsersRequest, _options) { + return __async(this, null, function* () { + var _a, _b, _c; + let _config = _options || this.configuration; + if (searchUsersRequest === null || searchUsersRequest === void 0) { + throw new RequiredError("ThoughtSpotRestApi", "searchUsers", "searchUsersRequest"); + } + const localVarPath = "/api/rest/2.0/users/search"; + const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.25.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.25.0"); + const contentType = ObjectSerializer.getPreferredMediaType([ + "application/json" + ]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = ObjectSerializer.stringify( + ObjectSerializer.serialize(searchUsersRequest, "SearchUsersRequest", ""), + contentType + ); + requestContext.setBody(serializedBody); + let authMethod; + authMethod = _config.authMethods["bearerAuth"]; + if (authMethod == null ? void 0 : authMethod.applySecurityAuthentication) { + yield authMethod == null ? void 0 : authMethod.applySecurityAuthentication(requestContext); + } + const defaultAuth = ((_a = _options == null ? void 0 : _options.authMethods) == null ? void 0 : _a.default) || ((_c = (_b = this.configuration) == null ? void 0 : _b.authMethods) == null ? void 0 : _c.default); + if (defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication) { + yield defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication(requestContext); + } + return requestContext; + }); + } + /** + * Search variables Version: 26.4.0.cl or later Allows searching for variables in ThoughtSpot. Requires ADMINISTRATION role. The CAN_MANAGE_VARIABLES permission allows you to manage Formula Variables in the current organization scope. The API endpoint supports searching variables by: * Variable identifier (ID or name) * Variable type * Name pattern (case-insensitive, supports % for wildcard) The search results can be formatted in three ways: * METADATA - Returns only variable metadata (default) * METADATA_AND_VALUES - Returns variable metadata and values The values can be filtered by scope: * org_identifier * principal_identifier * model_identifier + * @param searchVariablesRequest + */ + searchVariables(searchVariablesRequest, _options) { + return __async(this, null, function* () { + var _a, _b, _c; + let _config = _options || this.configuration; + if (searchVariablesRequest === null || searchVariablesRequest === void 0) { + throw new RequiredError("ThoughtSpotRestApi", "searchVariables", "searchVariablesRequest"); + } + const localVarPath = "/api/rest/2.0/template/variables/search"; + const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.25.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.25.0"); + const contentType = ObjectSerializer.getPreferredMediaType([ + "application/json" + ]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = ObjectSerializer.stringify( + ObjectSerializer.serialize(searchVariablesRequest, "SearchVariablesRequest", ""), + contentType + ); + requestContext.setBody(serializedBody); + let authMethod; + authMethod = _config.authMethods["bearerAuth"]; + if (authMethod == null ? void 0 : authMethod.applySecurityAuthentication) { + yield authMethod == null ? void 0 : authMethod.applySecurityAuthentication(requestContext); + } + const defaultAuth = ((_a = _options == null ? void 0 : _options.authMethods) == null ? void 0 : _a.default) || ((_c = (_b = this.configuration) == null ? void 0 : _b.authMethods) == null ? void 0 : _c.default); + if (defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication) { + yield defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication(requestContext); + } + return requestContext; + }); + } + /** + * Version: 10.14.0.cl or later Searches for webhook configurations based on various criteria such as Org, webhook identifier, event type, with support for pagination and sorting. Returns matching webhook configurations with their complete details. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) or `DEVELOPER` (**Has developer privilege**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, users with `CAN_MANAGE_WEBHOOKS` (**Can manage webhooks**) privilege are also authorized to perform this action. + * @param searchWebhookConfigurationsRequest + */ + searchWebhookConfigurations(searchWebhookConfigurationsRequest, _options) { + return __async(this, null, function* () { + var _a, _b, _c; + let _config = _options || this.configuration; + if (searchWebhookConfigurationsRequest === null || searchWebhookConfigurationsRequest === void 0) { + throw new RequiredError("ThoughtSpotRestApi", "searchWebhookConfigurations", "searchWebhookConfigurationsRequest"); + } + const localVarPath = "/api/rest/2.0/webhooks/search"; + const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.25.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.25.0"); + const contentType = ObjectSerializer.getPreferredMediaType([ + "application/json" + ]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = ObjectSerializer.stringify( + ObjectSerializer.serialize(searchWebhookConfigurationsRequest, "SearchWebhookConfigurationsRequest", ""), + contentType + ); + requestContext.setBody(serializedBody); + let authMethod; + authMethod = _config.authMethods["bearerAuth"]; + if (authMethod == null ? void 0 : authMethod.applySecurityAuthentication) { + yield authMethod == null ? void 0 : authMethod.applySecurityAuthentication(requestContext); + } + const defaultAuth = ((_a = _options == null ? void 0 : _options.authMethods) == null ? void 0 : _a.default) || ((_c = (_b = this.configuration) == null ? void 0 : _b.authMethods) == null ? void 0 : _c.default); + if (defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication) { + yield defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication(requestContext); + } + return requestContext; + }); + } + /** + * Version: 26.5.0.cl or later Sends natural language messages to an existing Spotter agent conversation and returns the complete response synchronously. Requires `CAN_USE_SPOTTER` privilege and access to the metadata object associated with the conversation. The user must have access to the conversation session referenced by `conversation_identifier`. A conversation must first be created using the `createAgentConversation` API. #### Usage guidelines The request must include: - `conversation_identifier`: the unique session ID returned by `createAgentConversation`, used for context continuity and message tracking - `messages`: an array of one or more text messages to send to the agent The API returns an array of response objects, each containing: - `type`: the kind of response — `text`, `answer`, or `error` - `message`: the main content of the response - `metadata`: additional information depending on the message type (e.g., answer metadata includes analytics and visualization details) #### Error responses | Code | Description | |------|----------------------------------------------------------------------------------------------------------------------------------| | 401 | Unauthorized — authentication token is missing, expired, or invalid. | | 403 | Forbidden — the authenticated user does not have `CAN_USE_SPOTTER` privilege or lacks permission on the referenced conversation. | > ###### Note: > > - This endpoint is Generally Available from version 26.5.0.cl. > - This endpoint requires Spotter - please contact ThoughtSpot support to enable Spotter on your cluster. > - For real-time streamed responses, use `sendAgentConversationMessageStreaming` instead. + * @param conversationIdentifier Unique identifier for the conversation (used to track context) + * @param sendAgentConversationMessageRequest + */ + sendAgentConversationMessage(conversationIdentifier, sendAgentConversationMessageRequest, _options) { + return __async(this, null, function* () { + var _a, _b, _c; + let _config = _options || this.configuration; + if (conversationIdentifier === null || conversationIdentifier === void 0) { + throw new RequiredError("ThoughtSpotRestApi", "sendAgentConversationMessage", "conversationIdentifier"); + } + if (sendAgentConversationMessageRequest === null || sendAgentConversationMessageRequest === void 0) { + throw new RequiredError("ThoughtSpotRestApi", "sendAgentConversationMessage", "sendAgentConversationMessageRequest"); + } + const localVarPath = "/api/rest/2.0/ai/agent/conversation/{conversation_identifier}/send".replace("{conversation_identifier}", encodeURIComponent(String(conversationIdentifier))); + const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.25.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.25.0"); + const contentType = ObjectSerializer.getPreferredMediaType([ + "application/json" + ]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = ObjectSerializer.stringify( + ObjectSerializer.serialize(sendAgentConversationMessageRequest, "SendAgentConversationMessageRequest", ""), + contentType + ); + requestContext.setBody(serializedBody); + let authMethod; + authMethod = _config.authMethods["bearerAuth"]; + if (authMethod == null ? void 0 : authMethod.applySecurityAuthentication) { + yield authMethod == null ? void 0 : authMethod.applySecurityAuthentication(requestContext); + } + const defaultAuth = ((_a = _options == null ? void 0 : _options.authMethods) == null ? void 0 : _a.default) || ((_c = (_b = this.configuration) == null ? void 0 : _b.authMethods) == null ? void 0 : _c.default); + if (defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication) { + yield defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication(requestContext); + } + return requestContext; + }); + } + /** + * Version: 26.5.0.cl or later Sends one or more natural language messages to an existing Spotter agent conversation and returns the response as a real-time Server-Sent Events stream. Requires `CAN_USE_SPOTTER` privilege and access to the metadata object associated with the conversation. The user must have access to the conversation session referenced by `conversation_identifier`. A conversation must first be created using the `createAgentConversation` API. #### Usage guidelines The request must include: - `conversation_identifier`: the unique session ID returned by `createAgentConversation`, used for context continuity and message tracking - `messages`: an array of one or more text messages to send to the agent If the request is valid, the API returns a Server-Sent Events (SSE) stream. Each line has the form `data: [{\"type\": \"...\", ...}]` — a JSON array of event objects. Event types include: - `ack`: confirms receipt of the request (`node_id`) - `conv_title`: conversation title (`title`, `conv_id`) - `notification`: status updates on operations (`group_id`, `metadata`, `code` — e.g. `TOOL_CALL_NOTIFICATION`, `nls_start`, `FINAL_RESPONSE_NOTIFICATION`) - `text-chunk`: incremental content chunks (`id`, `group_id`, `metadata` with `format` and `type` such as `thinking` or `text`, `content`) - `text`: full text block with same structure as `text-chunk` - `answer`: structured answer with metadata (`id`, `group_id`, `metadata` with `sage_query`, `session_id`, `title`, etc., `title`) - `error`: if a failure occurs #### Error responses | Code | Description | | ---- | -------------------------------------------------------------------------------------------------------------------------------- | | 401 | Unauthorized — authentication token is missing, expired, or invalid. | | 403 | Forbidden — the authenticated user does not have `CAN_USE_SPOTTER` privilege or lacks permission on the referenced conversation. | > ###### Note: > > - This endpoint is Generally Available from version 26.5.0.cl. > - This endpoint requires Spotter - please contact ThoughtSpot support to enable Spotter on your cluster. > - The streaming protocol uses Server-Sent Events (SSE). > - For the complete response in a single payload, use `sendAgentConversationMessage` instead. + * @param conversationIdentifier Unique identifier for the conversation (used to track context) + * @param sendAgentConversationMessageStreamingRequest + */ + sendAgentConversationMessageStreaming(conversationIdentifier, sendAgentConversationMessageStreamingRequest, _options) { + return __async(this, null, function* () { + var _a, _b, _c; + let _config = _options || this.configuration; + if (conversationIdentifier === null || conversationIdentifier === void 0) { + throw new RequiredError("ThoughtSpotRestApi", "sendAgentConversationMessageStreaming", "conversationIdentifier"); + } + if (sendAgentConversationMessageStreamingRequest === null || sendAgentConversationMessageStreamingRequest === void 0) { + throw new RequiredError("ThoughtSpotRestApi", "sendAgentConversationMessageStreaming", "sendAgentConversationMessageStreamingRequest"); + } + const localVarPath = "/api/rest/2.0/ai/agent/conversation/{conversation_identifier}/send/stream".replace("{conversation_identifier}", encodeURIComponent(String(conversationIdentifier))); + const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.25.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.25.0"); + const contentType = ObjectSerializer.getPreferredMediaType([ + "application/json" + ]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = ObjectSerializer.stringify( + ObjectSerializer.serialize(sendAgentConversationMessageStreamingRequest, "SendAgentConversationMessageStreamingRequest", ""), + contentType + ); + requestContext.setBody(serializedBody); + let authMethod; + authMethod = _config.authMethods["bearerAuth"]; + if (authMethod == null ? void 0 : authMethod.applySecurityAuthentication) { + yield authMethod == null ? void 0 : authMethod.applySecurityAuthentication(requestContext); + } + const defaultAuth = ((_a = _options == null ? void 0 : _options.authMethods) == null ? void 0 : _a.default) || ((_c = (_b = this.configuration) == null ? void 0 : _b.authMethods) == null ? void 0 : _c.default); + if (defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication) { + yield defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication(requestContext); + } + return requestContext; + }); + } + /** + * Version: 26.2.0.cl or later **Deprecated** — Use `sendAgentConversationMessage` instead. Send natural language messages to an existing Spotter agent conversation and returns the complete response synchronously. Requires `CAN_USE_SPOTTER` privilege and access to the metadata object associated with the conversation. The user must have access to the conversation session referenced by `conversation_identifier`. A conversation must first be created using the `createAgentConversation` API. #### Usage guidelines The request must include: - `conversation_identifier`: the unique session ID returned by `createAgentConversation`, used for context continuity and message tracking - `messages`: an array of one or more text messages to send to the agent The API returns an array of response objects, each containing: - `type`: the kind of response — `text`, `answer`, or `error` - `message`: the main content of the response - `metadata`: additional information depending on the message type (e.g., answer metadata includes analytics and visualization details) #### Error responses | Code | Description | |------|----------------------------------------------------------------------------------------------------------------------------------| | 401 | Unauthorized — authentication token is missing, expired, or invalid. | | 403 | Forbidden — the authenticated user does not have `CAN_USE_SPOTTER` privilege or lacks permission on the referenced conversation. | > ###### Note: > > - This endpoint is deprecated. Use `sendAgentConversationMessage` for new integrations. > - This endpoint is currently in Beta. Breaking changes may be introduced before the endpoint is made Generally Available. > - This endpoint requires Spotter - please contact ThoughtSpot support to enable Spotter on your cluster. + * @param conversationIdentifier Unique identifier for the conversation (used to track context) + * @param sendAgentMessageRequest + */ + sendAgentMessage(conversationIdentifier, sendAgentMessageRequest, _options) { + return __async(this, null, function* () { + var _a, _b, _c; + let _config = _options || this.configuration; + if (conversationIdentifier === null || conversationIdentifier === void 0) { + throw new RequiredError("ThoughtSpotRestApi", "sendAgentMessage", "conversationIdentifier"); + } + if (sendAgentMessageRequest === null || sendAgentMessageRequest === void 0) { + throw new RequiredError("ThoughtSpotRestApi", "sendAgentMessage", "sendAgentMessageRequest"); + } + const localVarPath = "/api/rest/2.0/ai/agent/{conversation_identifier}/converse".replace("{conversation_identifier}", encodeURIComponent(String(conversationIdentifier))); + const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.25.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.25.0"); + const contentType = ObjectSerializer.getPreferredMediaType([ + "application/json" + ]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = ObjectSerializer.stringify( + ObjectSerializer.serialize(sendAgentMessageRequest, "SendAgentMessageRequest", ""), + contentType + ); + requestContext.setBody(serializedBody); + let authMethod; + authMethod = _config.authMethods["bearerAuth"]; + if (authMethod == null ? void 0 : authMethod.applySecurityAuthentication) { + yield authMethod == null ? void 0 : authMethod.applySecurityAuthentication(requestContext); + } + const defaultAuth = ((_a = _options == null ? void 0 : _options.authMethods) == null ? void 0 : _a.default) || ((_c = (_b = this.configuration) == null ? void 0 : _b.authMethods) == null ? void 0 : _c.default); + if (defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication) { + yield defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication(requestContext); + } + return requestContext; + }); + } + /** + * Version: 26.2.0.cl or later **Deprecated** — Use `sendAgentConversationMessageStreaming` instead. Sends one or more natural language messages to an existing Spotter agent conversation and returns the response as a real-time Server-Sent Events stream. Requires `CAN_USE_SPOTTER` privilege and access to the metadata object associated with the conversation. The user must have access to the conversation session referenced by `conversation_identifier`. A conversation must first be created using the `createAgentConversation` API. #### Usage guidelines The request must include: - `conversation_identifier`: the unique session ID returned by `createAgentConversation`, used for context continuity and message tracking - `messages`: an array of one or more text messages to send to the agent If the request is valid, the API returns a Server-Sent Events (SSE) stream. Each line has the form `data: [{\"type\": \"...\", ...}]` — a JSON array of event objects. Event types include: - `ack`: confirms receipt of the request (`node_id`) - `conv_title`: conversation title (`title`, `conv_id`) - `notification`: status updates on operations (`group_id`, `metadata`, `code` — e.g. `TOOL_CALL_NOTIFICATION`, `nls_start`, `FINAL_RESPONSE_NOTIFICATION`) - `text-chunk`: incremental content chunks (`id`, `group_id`, `metadata` with `format` and `type` such as `thinking` or `text`, `content`) - `text`: full text block with same structure as `text-chunk` - `answer`: structured answer with metadata (`id`, `group_id`, `metadata` with `sage_query`, `session_id`, `title`, etc., `title`) - `error`: if a failure occurs #### Error responses | Code | Description | |------|----------------------------------------------------------------------------------------------------------------------------------| | 401 | Unauthorized — authentication token is missing, expired, or invalid. | | 403 | Forbidden — the authenticated user does not have `CAN_USE_SPOTTER` privilege or lacks permission on the referenced conversation. | > ###### Note: > > - This endpoint is deprecated. Use `sendAgentConversationMessageStreaming` for new integrations. > - This endpoint is currently in Beta. Breaking changes may be introduced before the endpoint is made Generally Available. > - This endpoint requires Spotter - please contact ThoughtSpot support to enable Spotter on your cluster. > - The streaming protocol uses Server-Sent Events (SSE). + * @param sendAgentMessageStreamingRequest + */ + sendAgentMessageStreaming(sendAgentMessageStreamingRequest, _options) { + return __async(this, null, function* () { + var _a, _b, _c; + let _config = _options || this.configuration; + if (sendAgentMessageStreamingRequest === null || sendAgentMessageStreamingRequest === void 0) { + throw new RequiredError("ThoughtSpotRestApi", "sendAgentMessageStreaming", "sendAgentMessageStreamingRequest"); + } + const localVarPath = "/api/rest/2.0/ai/agent/converse/sse"; + const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.25.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.25.0"); + const contentType = ObjectSerializer.getPreferredMediaType([ + "application/json" + ]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = ObjectSerializer.stringify( + ObjectSerializer.serialize(sendAgentMessageStreamingRequest, "SendAgentMessageStreamingRequest", ""), + contentType + ); + requestContext.setBody(serializedBody); + let authMethod; + authMethod = _config.authMethods["bearerAuth"]; + if (authMethod == null ? void 0 : authMethod.applySecurityAuthentication) { + yield authMethod == null ? void 0 : authMethod.applySecurityAuthentication(requestContext); + } + const defaultAuth = ((_a = _options == null ? void 0 : _options.authMethods) == null ? void 0 : _a.default) || ((_c = (_b = this.configuration) == null ? void 0 : _b.authMethods) == null ? void 0 : _c.default); + if (defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication) { + yield defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication(requestContext); + } + return requestContext; + }); + } + /** + * Version: 10.4.0.cl or later Sends a follow-up message to an existing conversation within the context of a data model. Requires `CAN_USE_SPOTTER` privilege and at least view access to the metadata object specified in the request. A conversation must first be created using the `createConversation` API. #### Usage guidelines The request must include: - `conversation_identifier`: the unique session ID returned by `createConversation` - `metadata_identifier`: the unique ID of the data source used for the conversation - `message`: a natural language string with the follow-up question If the request is successful, the API returns an array of response messages, each containing: - `session_identifier`: the unique ID of the generated response - `generation_number`: the generation number of the response - `message_type`: the type of the response (e.g., `TSAnswer`) - `visualization_type`: the generated visualization type (`Chart`, `Table`, or `Undefined`) - `tokens` / `display_tokens`: the search tokens and user-friendly display tokens for the response #### Error responses | Code | Description | |------|-----------------------------------------------------------------------------------------------------------------------------------------| | 401 | Unauthorized — authentication token is missing, expired, or invalid. | | 403 | Forbidden — the authenticated user does not have `CAN_USE_SPOTTER` privilege or lacks view permission on the specified metadata object. | > ###### Note: > * This endpoint is currently in Beta. Breaking changes may be introduced before the endpoint is made Generally Available. > * This endpoint requires Spotter - please contact ThoughtSpot support to enable Spotter on your cluster. + * @param conversationIdentifier Unique identifier of the conversation. + * @param sendMessageRequest + */ + sendMessage(conversationIdentifier, sendMessageRequest, _options) { + return __async(this, null, function* () { + var _a, _b, _c; + let _config = _options || this.configuration; + if (conversationIdentifier === null || conversationIdentifier === void 0) { + throw new RequiredError("ThoughtSpotRestApi", "sendMessage", "conversationIdentifier"); + } + if (sendMessageRequest === null || sendMessageRequest === void 0) { + throw new RequiredError("ThoughtSpotRestApi", "sendMessage", "sendMessageRequest"); + } + const localVarPath = "/api/rest/2.0/ai/conversation/{conversation_identifier}/converse".replace("{conversation_identifier}", encodeURIComponent(String(conversationIdentifier))); + const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.25.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.25.0"); + const contentType = ObjectSerializer.getPreferredMediaType([ + "application/json" + ]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = ObjectSerializer.stringify( + ObjectSerializer.serialize(sendMessageRequest, "SendMessageRequest", ""), + contentType + ); + requestContext.setBody(serializedBody); + let authMethod; + authMethod = _config.authMethods["bearerAuth"]; + if (authMethod == null ? void 0 : authMethod.applySecurityAuthentication) { + yield authMethod == null ? void 0 : authMethod.applySecurityAuthentication(requestContext); + } + const defaultAuth = ((_a = _options == null ? void 0 : _options.authMethods) == null ? void 0 : _a.default) || ((_c = (_b = this.configuration) == null ? void 0 : _b.authMethods) == null ? void 0 : _c.default); + if (defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication) { + yield defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication(requestContext); + } + return requestContext; + }); + } + /** + * Version: 10.15.0.cl or later This API allows users to set natural language (NL) instructions for a specific data-model to improve AI-generated answers and query processing. These instructions help guide the AI system to better understand the data context and provide more accurate responses. Requires `CAN_USE_SPOTTER` privilege, either edit access or `SPOTTER_COACHING_PRIVILEGE` on the data model, and a bearer token corresponding to the org where the data model exists. #### Usage guidelines To set NL instructions for a data-model, the request must include: - `data_source_identifier`: The unique ID of the data-model for which to set NL instructions - `nl_instructions_info`: An array of instruction objects, each containing: - `instructions`: Array of text instructions for the LLM - `scope`: The scope of the instruction (`GLOBAL`). Currently only `GLOBAL` is supported. It can be extended to data-model-user scope in future. #### Instructions scope - **GLOBAL**: instructions that apply to all users querying this data model If the request is successful, the API returns: - `success`: a boolean indicating whether the operation completed successfully #### Error responses | Code | Description | |------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| | 401 | Unauthorized — authentication token is missing, expired, or invalid. | | 403 | Forbidden — the authenticated user does not have `CAN_USE_SPOTTER` privilege, lacks edit access or `SPOTTER_COACHING_PRIVILEGE` on the data model, or the bearer token does not correspond to the org where the data model exists. | > ###### Note: > > - To use this API, the user needs either edit access or `SPOTTER_COACHING_PRIVILEGE` on the data model, and must use the bearer token corresponding to the org where the data model exists. > - This endpoint is currently in Beta. Breaking changes may be introduced before the endpoint is made Generally Available. > - Available from version 10.15.0.cl and later. > - This endpoint requires Spotter — please contact ThoughtSpot Support to enable Spotter on your cluster. > - Instructions help improve the accuracy and relevance of AI-generated responses for the specified data-model. + * @param setNLInstructionsRequest + */ + setNLInstructions(setNLInstructionsRequest, _options) { + return __async(this, null, function* () { + var _a, _b, _c; + let _config = _options || this.configuration; + if (setNLInstructionsRequest === null || setNLInstructionsRequest === void 0) { + throw new RequiredError("ThoughtSpotRestApi", "setNLInstructions", "setNLInstructionsRequest"); + } + const localVarPath = "/api/rest/2.0/ai/instructions/set"; + const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.25.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.25.0"); + const contentType = ObjectSerializer.getPreferredMediaType([ + "application/json" + ]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = ObjectSerializer.stringify( + ObjectSerializer.serialize(setNLInstructionsRequest, "SetNLInstructionsRequest", ""), + contentType + ); + requestContext.setBody(serializedBody); + let authMethod; + authMethod = _config.authMethods["bearerAuth"]; + if (authMethod == null ? void 0 : authMethod.applySecurityAuthentication) { + yield authMethod == null ? void 0 : authMethod.applySecurityAuthentication(requestContext); + } + const defaultAuth = ((_a = _options == null ? void 0 : _options.authMethods) == null ? void 0 : _a.default) || ((_c = (_b = this.configuration) == null ? void 0 : _b.authMethods) == null ? void 0 : _c.default); + if (defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication) { + yield defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication(requestContext); + } + return requestContext; + }); + } + /** + * Version: 9.0.0.cl or later Allows sharing one or several metadata objects with users and groups in ThoughtSpot. Requires edit access to the metadata object. #### Supported metadata objects: * Liveboards * Visualizations * Answers * Models * Views * Connections * Collections #### Object permissions You can provide `READ_ONLY` or `MODIFY` access when sharing an object with another user or group. The `READ_ONLY` permission grants view access to the shared object, whereas `MODIFY` provides edit access. To prevent a user or group from accessing the shared object, specify the GUID or name of the principal and set `shareMode` to `NO_ACCESS`. #### Sharing a visualization * Sharing a visualization implicitly shares the entire Liveboard with the recipient. * Object permissions set for a shared visualization also apply to the Liveboard unless overridden by another API request or via UI. * If email notifications for object sharing are enabled, a notification with a link to the shared visualization will be sent to the recipient’s email address. Although this link opens the shared visualization, recipients can also access other visualizations in the Liveboard. #### Sharing a collection Collections support **dual permissions** that provide fine-grained control: * **Collection permissions** (`share_mode`) - controls access to the collection itself (view, edit, delete the collection) * **Content permissions** (`content_share_mode`) - controls access to objects within the collection (view, edit objects inside) **Default Behavior:** - If only `share_mode` is specified, the content permissions default to `READ_ONLY` (except when `share_mode` is `NO_ACCESS`, then content also gets `NO_ACCESS`) - To give users edit access to collection contents, explicitly set `content_share_mode: \"MODIFY\"` ## Examples The following JSON examples can be copy-pasted as request bodies for the REST v2 API endpoint: ```bash POST /callosum/v1/v2/security/metadata/share Content-Type: application/x-www-form-urlencoded ``` ### Basic collection sharing Share a collection with read-only access: ```json { \"metadata_type\": \"COLLECTION\", \"metadata_identifiers\": [\"Sales Reports Collection\"], \"permissions\": [{ \"principal\": { \"type\": \"USER\", \"identifier\": \"alice@company.com\" }, \"share_mode\": \"READ_ONLY\" }], \"notification\": { \"message\": \"I\'ve shared the Sales Reports collection with you\", \"notify_on_share\": true } } ``` ### Collection sharing with dual permissions Share a collection with different permissions for the collection vs. its contents: ```json { \"metadata_type\": \"COLLECTION\", \"metadata_identifiers\": [\"Marketing Analytics\"], \"permissions\": [{ \"principal\": { \"type\": \"USER\", \"identifier\": \"bob@company.com\" }, \"share_mode\": \"MODIFY\", \"content_share_mode\": \"READ_ONLY\" }, { \"principal\": { \"type\": \"USER_GROUP\", \"identifier\": \"Marketing Team\" }, \"share_mode\": \"READ_ONLY\", \"content_share_mode\": \"READ_ONLY\" }], \"notification\": { \"emails\": [\"bob@company.com\"], \"message\": \"You can edit the collection but content is read-only\", \"enable_custom_url\": false, \"notify_on_share\": true }, \"has_lenient_discoverability\": false } ``` ### Multiple collections sharing Share multiple collections with different users: ```json { \"metadata\": [ { \"type\": \"COLLECTION\", \"identifier\": \"Q4 Reports\" }, { \"type\": \"COLLECTION\", \"identifier\": \"Executive Dashboard Collection\" } ], \"permissions\": [{ \"principal\": { \"type\": \"USER_GROUP\", \"identifier\": \"Executives\" }, \"share_mode\": \"MODIFY\" }, { \"principal\": { \"type\": \"USER\", \"identifier\": \"manager@company.com\" }, \"share_mode\": \"READ_ONLY\", \"content_share_mode\": \"MODIFY\" }], \"notification\": { \"message\": \"Sharing quarterly collections with leadership team\", \"notify_on_share\": true } } ``` ### Remove collection access Remove access to a collection by setting share_mode to NO_ACCESS: ```json { \"metadata_type\": \"COLLECTION\", \"metadata_identifiers\": [\"Confidential Reports\"], \"permissions\": [{ \"principal\": { \"type\": \"USER\", \"identifier\": \"former-employee@company.com\" }, \"share_mode\": \"NO_ACCESS\" }], \"notification\": { \"notify_on_share\": false } } ``` ### Collection Permission Scenarios **Scenario 1: Collection Admin** - `share_mode: MODIFY` + `content_share_mode: MODIFY` = Full control over collection and its contents **Scenario 2: Collection Curator** - `share_mode: MODIFY` + `content_share_mode: READ_ONLY` = Can manage collection structure but not edit contents **Scenario 3: Content Editor** - `share_mode: READ_ONLY` + `content_share_mode: MODIFY` = Can edit objects within collection but can\'t change collection itself **Scenario 4: Viewer** - `share_mode: READ_ONLY` + `content_share_mode: READ_ONLY` = View-only access to collection and contents + * @param shareMetadataRequest + */ + shareMetadata(shareMetadataRequest, _options) { + return __async(this, null, function* () { + var _a, _b, _c; + let _config = _options || this.configuration; + if (shareMetadataRequest === null || shareMetadataRequest === void 0) { + throw new RequiredError("ThoughtSpotRestApi", "shareMetadata", "shareMetadataRequest"); + } + const localVarPath = "/api/rest/2.0/security/metadata/share"; + const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.25.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.25.0"); + const contentType = ObjectSerializer.getPreferredMediaType([ + "application/json" + ]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = ObjectSerializer.stringify( + ObjectSerializer.serialize(shareMetadataRequest, "ShareMetadataRequest", ""), + contentType + ); + requestContext.setBody(serializedBody); + let authMethod; + authMethod = _config.authMethods["bearerAuth"]; + if (authMethod == null ? void 0 : authMethod.applySecurityAuthentication) { + yield authMethod == null ? void 0 : authMethod.applySecurityAuthentication(requestContext); + } + const defaultAuth = ((_a = _options == null ? void 0 : _options.authMethods) == null ? void 0 : _a.default) || ((_c = (_b = this.configuration) == null ? void 0 : _b.authMethods) == null ? void 0 : _c.default); + if (defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication) { + yield defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication(requestContext); + } + return requestContext; + }); + } + /** + * Version: 10.4.0.cl or later Processes a natural language query against a specified data model and returns a single AI-generated answer without requiring a conversation session. Requires `CAN_USE_SPOTTER` privilege and at least view access to the metadata object specified in the request. #### Usage guidelines The request must include: - `query`: a natural language question (e.g., \"What were total sales last quarter?\") - `metadata_identifier`: the unique ID of the data source to query against If the request is successful, the API returns a response message containing: - `session_identifier`: the unique ID of the generated response - `generation_number`: the generation number of the response - `message_type`: the type of the response (e.g., `TSAnswer`) - `visualization_type`: the generated visualization type (`Chart`, `Table`, or `Undefined`) - `tokens` / `display_tokens`: the search tokens and user-friendly display tokens for the response #### Error responses | Code | Description | |------|-----------------------------------------------------------------------------------------------------------------------------------------| | 401 | Unauthorized — authentication token is missing, expired, or invalid. | | 403 | Forbidden — the authenticated user does not have `CAN_USE_SPOTTER` privilege or lacks view permission on the specified metadata object. | > ###### Note: > * This endpoint is currently in Beta. Breaking changes may be introduced before the endpoint is made Generally Available. > * This endpoint requires Spotter - please contact ThoughtSpot support to enable Spotter on your cluster. + * @param singleAnswerRequest + */ + singleAnswer(singleAnswerRequest, _options) { + return __async(this, null, function* () { + var _a, _b, _c; + let _config = _options || this.configuration; + if (singleAnswerRequest === null || singleAnswerRequest === void 0) { + throw new RequiredError("ThoughtSpotRestApi", "singleAnswer", "singleAnswerRequest"); + } + const localVarPath = "/api/rest/2.0/ai/answer/create"; + const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.25.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.25.0"); + const contentType = ObjectSerializer.getPreferredMediaType([ + "application/json" + ]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = ObjectSerializer.stringify( + ObjectSerializer.serialize(singleAnswerRequest, "SingleAnswerRequest", ""), + contentType + ); + requestContext.setBody(serializedBody); + let authMethod; + authMethod = _config.authMethods["bearerAuth"]; + if (authMethod == null ? void 0 : authMethod.applySecurityAuthentication) { + yield authMethod == null ? void 0 : authMethod.applySecurityAuthentication(requestContext); + } + const defaultAuth = ((_a = _options == null ? void 0 : _options.authMethods) == null ? void 0 : _a.default) || ((_c = (_b = this.configuration) == null ? void 0 : _b.authMethods) == null ? void 0 : _c.default); + if (defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication) { + yield defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication(requestContext); + } + return requestContext; + }); + } + /** + * Stops an in-progress agent conversation response. Version: 26.6.0.cl or later Version: 26.6.0.cl or later Stops an in-progress agent response for the specified conversation. Use this endpoint to cancel a response that is actively being generated — for example, when the user navigates away, reformulates their question, or no longer needs the current result. Requires `CAN_USE_SPOTTER` privilege and access to the specified conversation. #### Usage guidelines The request must include: - `conversation_identifier` *(path parameter)*: the unique ID of the conversation whose active response should be stopped, as returned by `createAgentConversation` A successful request returns an empty `204 No Content` response. If there is no active response in progress at the time of the call, the request is still treated as successful. After stopping a response, the conversation session remains active. You can continue sending messages using `sendAgentConversationMessage` or `sendAgentConversationMessageStreaming`. #### Example request ```bash POST /api/rest/2.0/ai/agent/conversation/{conversation_identifier}/stop-response ``` #### Typical usage scenario This endpoint is useful when integrating Spotter into a chat UI where users can cancel a long-running query. For example: 1. User sends a message via `sendAgentConversationMessageStreaming`. 2. User clicks a \"Stop generating\" button while the response is streaming. 3. Your client calls `stopConversation` with the active `conversation_identifier`. 4. The stream is terminated and the user can ask a new question. #### Error responses | Code | Description | |------|-------------| | 401 | Unauthorized — authentication token is missing, expired, or invalid. | | 403 | Forbidden — the authenticated user does not have `CAN_USE_SPOTTER` privilege or lacks access to the specified conversation. | > ###### Note: > > - Calling this endpoint when no response is in progress does not return an error. > - The conversation context is preserved after stopping — previous messages and answers remain accessible. > - Available from version 26.6.0.cl and later. > - This endpoint requires Spotter — please contact ThoughtSpot Support to enable Spotter on your cluster. > - This feature is available only for **Spotter 3** (`SPOTTER3`) version. + * @param conversationIdentifier Unique identifier of the conversation to stop. + */ + stopConversation(conversationIdentifier, _options) { + return __async(this, null, function* () { + var _a, _b, _c; + let _config = _options || this.configuration; + if (conversationIdentifier === null || conversationIdentifier === void 0) { + throw new RequiredError("ThoughtSpotRestApi", "stopConversation", "conversationIdentifier"); + } + const localVarPath = "/api/rest/2.0/ai/agent/conversation/{conversation_identifier}/stop-response".replace("{conversation_identifier}", encodeURIComponent(String(conversationIdentifier))); + const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.25.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.25.0"); + let authMethod; + authMethod = _config.authMethods["bearerAuth"]; + if (authMethod == null ? void 0 : authMethod.applySecurityAuthentication) { + yield authMethod == null ? void 0 : authMethod.applySecurityAuthentication(requestContext); + } + const defaultAuth = ((_a = _options == null ? void 0 : _options.authMethods) == null ? void 0 : _a.default) || ((_c = (_b = this.configuration) == null ? void 0 : _b.authMethods) == null ? void 0 : _c.default); + if (defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication) { + yield defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication(requestContext); + } + return requestContext; + }); + } + /** + * Version: 26.5.0.cl or later Synchronizes connection metadata attributes from your Cloud Data Warehouse (CDW) with ThoughtSpot. Requires the `DATAMANAGEMENT` (**Can manage data**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` (**Can manage data models**) privilege is required. #### Usage guidelines To synchronize attributes from a CDW, specify the connection GUID or name in the `connection_identifier` path parameter and `sync_attributes` in the request body. Default attribute is `[\"DESCRIPTION\"]`. ##### Hierarchical schema * Connection: The connection object for the sync operation. * Tables: Tables for the sync operation. When no table is specified, all tables are synchronized. * Columns: If the table is specified, you can add the columns for the sync operation. If no columns are specified, all columns in the specified table are considered for the sync operation. To set the scope for the sync operation: * Connection-level: To sync all tables and columns, pass an empty request body, or only the attributes in the request body. * Table-level: To synchronize specific tables and their columns, specify the table identifiers in the `tables` array. * Column-level: To synchronize specific columns, specify the table identifier as the key and column identifiers as the value in the `tables` array. ``` { \"tables\": [ {\"table-guid-1\": [\"column-guid-1\", \"column-guid-2\"]}, \"table-guid-2\" ], \"sync_attributes\": [\"DESCRIPTION\"] } ``` ##### API response If the sync operation is successful, the API returns the following information: * Status of the sync operation. For example, `SUCCESS`, `PARTIAL_SUCCESS`, or `NO_UPDATE`. * Number of tables and columns that were updated. * Number of tables and columns with the sync failed status when the overall sync status is `PARTIAL_SUCCESS`. * Message text indicating the sync results. + * @param connectionIdentifier Unique ID or name of the connection. + * @param syncMetadataRequest + */ + syncMetadata(connectionIdentifier, syncMetadataRequest, _options) { + return __async(this, null, function* () { + var _a, _b, _c; + let _config = _options || this.configuration; + if (connectionIdentifier === null || connectionIdentifier === void 0) { + throw new RequiredError("ThoughtSpotRestApi", "syncMetadata", "connectionIdentifier"); + } + if (syncMetadataRequest === null || syncMetadataRequest === void 0) { + throw new RequiredError("ThoughtSpotRestApi", "syncMetadata", "syncMetadataRequest"); + } + const localVarPath = "/api/rest/2.0/connections/{connection_identifier}/resync-metadata".replace("{connection_identifier}", encodeURIComponent(String(connectionIdentifier))); + const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.25.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.25.0"); + const contentType = ObjectSerializer.getPreferredMediaType([ + "application/json" + ]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = ObjectSerializer.stringify( + ObjectSerializer.serialize(syncMetadataRequest, "SyncMetadataRequest", ""), + contentType + ); + requestContext.setBody(serializedBody); + let authMethod; + authMethod = _config.authMethods["bearerAuth"]; + if (authMethod == null ? void 0 : authMethod.applySecurityAuthentication) { + yield authMethod == null ? void 0 : authMethod.applySecurityAuthentication(requestContext); + } + const defaultAuth = ((_a = _options == null ? void 0 : _options.authMethods) == null ? void 0 : _a.default) || ((_c = (_b = this.configuration) == null ? void 0 : _b.authMethods) == null ? void 0 : _c.default); + if (defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication) { + yield defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication(requestContext); + } + return requestContext; + }); + } + /** + * Version: 9.0.0.cl or later Removes the tags applied to a Liveboard, Answer, Table, or Worksheet. Requires edit access to the metadata object. + * @param unassignTagRequest + */ + unassignTag(unassignTagRequest, _options) { + return __async(this, null, function* () { + var _a, _b, _c; + let _config = _options || this.configuration; + if (unassignTagRequest === null || unassignTagRequest === void 0) { + throw new RequiredError("ThoughtSpotRestApi", "unassignTag", "unassignTagRequest"); + } + const localVarPath = "/api/rest/2.0/tags/unassign"; + const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.25.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.25.0"); + const contentType = ObjectSerializer.getPreferredMediaType([ + "application/json" + ]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = ObjectSerializer.stringify( + ObjectSerializer.serialize(unassignTagRequest, "UnassignTagRequest", ""), + contentType + ); + requestContext.setBody(serializedBody); + let authMethod; + authMethod = _config.authMethods["bearerAuth"]; + if (authMethod == null ? void 0 : authMethod.applySecurityAuthentication) { + yield authMethod == null ? void 0 : authMethod.applySecurityAuthentication(requestContext); + } + const defaultAuth = ((_a = _options == null ? void 0 : _options.authMethods) == null ? void 0 : _a.default) || ((_c = (_b = this.configuration) == null ? void 0 : _b.authMethods) == null ? void 0 : _c.default); + if (defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication) { + yield defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication(requestContext); + } + return requestContext; + }); + } + /** + * Remove parameterization from fields in metadata objects. Version: 26.5.0.cl or later Allows removing parameterization from fields in metadata objects in ThoughtSpot. Requires appropriate permissions to modify the metadata object. The API endpoint allows unparameterizing the following types of metadata objects: * Logical Tables * Connections * Connection Configs For a Logical Table the field type must be `ATTRIBUTE` and field name can be one of: * databaseName * schemaName * tableName For a Connection or Connection Config, the field type is always `CONNECTION_PROPERTY`. In this case, field_name specifies the exact property of the Connection or Connection Config that needs to be unparameterized. For Connection Config, the only supported field name is: * impersonate_user + * @param unparameterizeMetadataRequest + */ + unparameterizeMetadata(unparameterizeMetadataRequest, _options) { + return __async(this, null, function* () { + var _a, _b, _c; + let _config = _options || this.configuration; + if (unparameterizeMetadataRequest === null || unparameterizeMetadataRequest === void 0) { + throw new RequiredError("ThoughtSpotRestApi", "unparameterizeMetadata", "unparameterizeMetadataRequest"); + } + const localVarPath = "/api/rest/2.0/metadata/unparameterize"; + const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.25.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.25.0"); + const contentType = ObjectSerializer.getPreferredMediaType([ + "application/json" + ]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = ObjectSerializer.stringify( + ObjectSerializer.serialize(unparameterizeMetadataRequest, "UnparameterizeMetadataRequest", ""), + contentType + ); + requestContext.setBody(serializedBody); + let authMethod; + authMethod = _config.authMethods["bearerAuth"]; + if (authMethod == null ? void 0 : authMethod.applySecurityAuthentication) { + yield authMethod == null ? void 0 : authMethod.applySecurityAuthentication(requestContext); + } + const defaultAuth = ((_a = _options == null ? void 0 : _options.authMethods) == null ? void 0 : _a.default) || ((_c = (_b = this.configuration) == null ? void 0 : _b.authMethods) == null ? void 0 : _c.default); + if (defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication) { + yield defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication(requestContext); + } + return requestContext; + }); + } + /** + * Version: 26.5.0.cl or later Allows unpublishing metadata objects from organizations in ThoughtSpot. Requires ADMINISTRATION role and TENANT scope. The API endpoint allows unpublishing the following types of metadata objects: * Liveboards * Answers * Logical Tables When unpublishing objects, you can: * Include dependencies by setting `include_dependencies` to true - this will unpublish all dependent objects if no other published object is using them * Force unpublish by setting `force` to true - this will break all dependent objects in the unpublished organizations + * @param unpublishMetadataRequest + */ + unpublishMetadata(unpublishMetadataRequest, _options) { + return __async(this, null, function* () { + var _a, _b, _c; + let _config = _options || this.configuration; + if (unpublishMetadataRequest === null || unpublishMetadataRequest === void 0) { + throw new RequiredError("ThoughtSpotRestApi", "unpublishMetadata", "unpublishMetadataRequest"); + } + const localVarPath = "/api/rest/2.0/security/metadata/unpublish"; + const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.25.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.25.0"); + const contentType = ObjectSerializer.getPreferredMediaType([ + "application/json" + ]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = ObjectSerializer.stringify( + ObjectSerializer.serialize(unpublishMetadataRequest, "UnpublishMetadataRequest", ""), + contentType + ); + requestContext.setBody(serializedBody); + let authMethod; + authMethod = _config.authMethods["bearerAuth"]; + if (authMethod == null ? void 0 : authMethod.applySecurityAuthentication) { + yield authMethod == null ? void 0 : authMethod.applySecurityAuthentication(requestContext); + } + const defaultAuth = ((_a = _options == null ? void 0 : _options.authMethods) == null ? void 0 : _a.default) || ((_c = (_b = this.configuration) == null ? void 0 : _b.authMethods) == null ? void 0 : _c.default); + if (defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication) { + yield defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication(requestContext); + } + return requestContext; + }); + } + /** + * Version: 10.12.0.cl or later Updates the properties of a [custom calendar](https://docs.thoughtspot.com/cloud/latest/connections-cust-cal). Requires `DATAMANAGEMENT` (**Can manage data**) or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your ThoughtSpot instance, the `CAN_MANAGE_CUSTOM_CALENDAR` (**Can manage custom calendars**) privilege is required. #### Usage guidelines You can update the properties of a calendar using one of the following methods: * `FROM_INPUT_PARAMS` to update the calendar properties with the values defined in the API request. * `FROM_EXISTING_TABLE` Creates a calendar from the parameters defined in the API request. To update a custom calendar, specify the calendar ID as a path parameter in the request URL and the following parameters in the request body: * Connection ID and Table name * Database and schema name attributes: For most Cloud Data Warehouse (CDW) connectors, both `database_name` and `schema_name` attributes are required. However, the attribute requirements are conditional and vary based on the connector type and its metadata structure. For example, for connectors such as Teradata, MySQL, SingleSore, Amazon Aurora MySQL, Amazon RDS MySQL, Oracle, and GCP_MYSQL, the `schema_name` is required, whereas the `database_name` attribute is not. Similarly, connectors such as ClickHouse require you to specify the `database_name` and the schema specification in such cases is optional. The API allows you to modify the calendar type, month offset value, start and end date, starting day of the week, and prefixes assigned to the year and quarter labels. #### Examples Update a custom calendar using an existing Table in ThoughtSpot: ``` { \"update_method\": \"FROM_EXISTING_TABLE\", \"table_reference\": { \"connection_identifier\": \"Connection1\", \"database_name\": \"db1\", \"table_name\": \"custom_calendar_2025\", \"schame_name\": \"schemaVar\" } } ``` Update a custom calendar with the attributes defined in the API request: ``` { \"update_method\": \"FROM_INPUT_PARAMS\", \"table_reference\": { \"connection_identifier\": \"Connection1\", \"database_name\": \"db1\", \"table_name\": \"custom_calendar_2025\", \"schame_name\": \"schemaVar\" }, \"month_offset\": \"August\", \"start_day_of_week\": \"Monday\", \"start_date\": \"08/01/2025\", \"end_date\": \"07/31/2026\" } ``` + * @param calendarIdentifier Unique Id or name of the calendar. + * @param updateCalendarRequest + */ + updateCalendar(calendarIdentifier, updateCalendarRequest, _options) { + return __async(this, null, function* () { + var _a, _b, _c; + let _config = _options || this.configuration; + if (calendarIdentifier === null || calendarIdentifier === void 0) { + throw new RequiredError("ThoughtSpotRestApi", "updateCalendar", "calendarIdentifier"); + } + if (updateCalendarRequest === null || updateCalendarRequest === void 0) { + throw new RequiredError("ThoughtSpotRestApi", "updateCalendar", "updateCalendarRequest"); + } + const localVarPath = "/api/rest/2.0/calendars/{calendar_identifier}/update".replace("{calendar_identifier}", encodeURIComponent(String(calendarIdentifier))); + const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.25.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.25.0"); + const contentType = ObjectSerializer.getPreferredMediaType([ + "application/json" + ]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = ObjectSerializer.stringify( + ObjectSerializer.serialize(updateCalendarRequest, "UpdateCalendarRequest", ""), + contentType + ); + requestContext.setBody(serializedBody); + let authMethod; + authMethod = _config.authMethods["bearerAuth"]; + if (authMethod == null ? void 0 : authMethod.applySecurityAuthentication) { + yield authMethod == null ? void 0 : authMethod.applySecurityAuthentication(requestContext); + } + const defaultAuth = ((_a = _options == null ? void 0 : _options.authMethods) == null ? void 0 : _a.default) || ((_c = (_b = this.configuration) == null ? void 0 : _b.authMethods) == null ? void 0 : _c.default); + if (defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication) { + yield defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication(requestContext); + } + return requestContext; + }); + } + /** + * Version: 26.4.0.cl or later Updates an existing collection in ThoughtSpot. #### Supported operations This API endpoint lets you perform the following operations: * Update collection name and description * Change visibility settings * Add metadata objects to the collection (operation: ADD) * Remove metadata objects from the collection (operation: REMOVE) * Replace all metadata objects in the collection (operation: REPLACE) #### Operation types * **ADD**: Adds the specified metadata objects to the existing collection without removing current items * **REMOVE**: Removes only the specified metadata objects from the collection * **REPLACE**: Replaces all existing metadata objects with the specified items (default behavior) + * @param collectionIdentifier Unique GUID of the collection. Note: Collection names cannot be used as identifiers since duplicate names are allowed. + * @param updateCollectionRequest + */ + updateCollection(collectionIdentifier, updateCollectionRequest, _options) { + return __async(this, null, function* () { + var _a, _b, _c; + let _config = _options || this.configuration; + if (collectionIdentifier === null || collectionIdentifier === void 0) { + throw new RequiredError("ThoughtSpotRestApi", "updateCollection", "collectionIdentifier"); + } + if (updateCollectionRequest === null || updateCollectionRequest === void 0) { + throw new RequiredError("ThoughtSpotRestApi", "updateCollection", "updateCollectionRequest"); + } + const localVarPath = "/api/rest/2.0/collections/{collection_identifier}/update".replace("{collection_identifier}", encodeURIComponent(String(collectionIdentifier))); + const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.25.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.25.0"); + const contentType = ObjectSerializer.getPreferredMediaType([ + "application/json" + ]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = ObjectSerializer.stringify( + ObjectSerializer.serialize(updateCollectionRequest, "UpdateCollectionRequest", ""), + contentType + ); + requestContext.setBody(serializedBody); + let authMethod; + authMethod = _config.authMethods["bearerAuth"]; + if (authMethod == null ? void 0 : authMethod.applySecurityAuthentication) { + yield authMethod == null ? void 0 : authMethod.applySecurityAuthentication(requestContext); + } + const defaultAuth = ((_a = _options == null ? void 0 : _options.authMethods) == null ? void 0 : _a.default) || ((_c = (_b = this.configuration) == null ? void 0 : _b.authMethods) == null ? void 0 : _c.default); + if (defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication) { + yield defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication(requestContext); + } + return requestContext; + }); + } + /** + * Version: 10.12.0.cl or later Creates, updates, or deletes column security rules for specified tables. This API endpoint allows you to create, update, or delete column-level security rules on columns of a table. The operation follows an \"all or none\" policy: if defining security rules for any of the provided columns fails, the entire operation will be rolled back, and no rules will be created. #### Usage guidelines - Provide table identifier using either `identifier` (GUID or name) or `obj_identifier` (object ID) - Use `clear_csr: true` to remove all column security rules from the table - For each column, specify the security rule using `column_security_rules` array - Use `is_unsecured: true` to mark a specific column as unprotected - Use `group_access` operations to manage group associations: - `ADD`: Add groups to the column\'s access list - `REMOVE`: Remove groups from the column\'s access list - `REPLACE`: Replace all existing groups with the specified groups #### Required permissions - `ADMINISTRATION` - Can administer ThoughtSpot - `DATAMANAGEMENT` - Can manage data (if RBAC is disabled) - `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` - Can manage worksheet views and tables (if RBAC is enabled) #### Example request ```json { \"identifier\": \"table-guid\", \"obj_identifier\": \"table-object-id\", \"clear_csr\": false, \"column_security_rules\": [ { \"column_identifier\": \"col id or col name\", \"is_unsecured\": false, \"group_access\": [ { \"operation\": \"ADD\", \"group_identifiers\": [\"hr_group_id\", \"hr_group_name\", \"finance_group_id\"] } ] }, { \"column_identifier\": \"col id or col name\", \"is_unsecured\": true }, { \"column_identifier\": \"col id or col name\", \"is_unsecured\": false, \"group_access\": [ { \"operation\": \"REPLACE\", \"group_identifiers\": [\"management_group_id\", \"management_group_name\"] } ] } ] } ``` #### Request Body Schema - `identifier` (string, optional): GUID or name of the table for which we want to create column security rules - `obj_identifier` (string, optional): The object ID of the table - `clear_csr` (boolean, optional): If true, then all the secured columns will be marked as unprotected, and all the group associations will be removed - `column_security_rules` (array of objects, required): An array where each object defines the security rule for a specific column Each column security rule object contains: - `column_identifier` (string, required): Column identifier (col_id or name) - `is_unsecured` (boolean, optional): If true, the column will be marked as unprotected and all groups associated with it will be removed - `group_access` (array of objects, optional): Array of group operation objects Each group operation object contains: - `operation` (string, required): Operation type - ADD, REMOVE, or REPLACE - `group_identifiers` (array of strings, required): Array of group identifiers (name or GUID) on which the operation will be performed #### Response This API does not return any response body. A successful operation returns HTTP 200 status code. #### Operation Types - **ADD**: Adds the specified groups to the column\'s access list - **REMOVE**: Removes the specified groups from the column\'s access list - **REPLACE**: Replaces all existing groups with the specified groups + * @param updateColumnSecurityRulesRequest + */ + updateColumnSecurityRules(updateColumnSecurityRulesRequest, _options) { + return __async(this, null, function* () { + var _a, _b, _c; + let _config = _options || this.configuration; + if (updateColumnSecurityRulesRequest === null || updateColumnSecurityRulesRequest === void 0) { + throw new RequiredError("ThoughtSpotRestApi", "updateColumnSecurityRules", "updateColumnSecurityRulesRequest"); + } + const localVarPath = "/api/rest/2.0/security/column/rules/update"; + const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.25.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.25.0"); + const contentType = ObjectSerializer.getPreferredMediaType([ + "application/json" + ]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = ObjectSerializer.stringify( + ObjectSerializer.serialize(updateColumnSecurityRulesRequest, "UpdateColumnSecurityRulesRequest", ""), + contentType + ); + requestContext.setBody(serializedBody); + let authMethod; + authMethod = _config.authMethods["bearerAuth"]; + if (authMethod == null ? void 0 : authMethod.applySecurityAuthentication) { + yield authMethod == null ? void 0 : authMethod.applySecurityAuthentication(requestContext); + } + const defaultAuth = ((_a = _options == null ? void 0 : _options.authMethods) == null ? void 0 : _a.default) || ((_c = (_b = this.configuration) == null ? void 0 : _b.authMethods) == null ? void 0 : _c.default); + if (defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication) { + yield defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication(requestContext); + } + return requestContext; + }); + } + /** + * Version: 9.2.0.cl or later Updates Git repository configuration settings. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance on your instance, the `CAN_SETUP_VERSION_CONTROL` (**Can set up version control**) privilege. + * @param updateConfigRequest + */ + updateConfig(updateConfigRequest, _options) { + return __async(this, null, function* () { + var _a, _b, _c; + let _config = _options || this.configuration; + if (updateConfigRequest === null || updateConfigRequest === void 0) { + throw new RequiredError("ThoughtSpotRestApi", "updateConfig", "updateConfigRequest"); + } + const localVarPath = "/api/rest/2.0/vcs/git/config/update"; + const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.25.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.25.0"); + const contentType = ObjectSerializer.getPreferredMediaType([ + "application/json" + ]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = ObjectSerializer.stringify( + ObjectSerializer.serialize(updateConfigRequest, "UpdateConfigRequest", ""), + contentType + ); + requestContext.setBody(serializedBody); + let authMethod; + authMethod = _config.authMethods["bearerAuth"]; + if (authMethod == null ? void 0 : authMethod.applySecurityAuthentication) { + yield authMethod == null ? void 0 : authMethod.applySecurityAuthentication(requestContext); + } + const defaultAuth = ((_a = _options == null ? void 0 : _options.authMethods) == null ? void 0 : _a.default) || ((_c = (_b = this.configuration) == null ? void 0 : _b.authMethods) == null ? void 0 : _c.default); + if (defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication) { + yield defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication(requestContext); + } + return requestContext; + }); + } + /** + * Version: 9.2.0.cl or later **Important**: This endpoint is deprecated and will be removed from ThoughtSpot in September 2025. ThoughtSpot strongly recommends using the [Update connection V2](#/http/api-endpoints/connections/update-connection-v2) endpoint to update your connection objects. #### Usage guidelines Updates a connection object. Requires `DATAMANAGEMENT` (**Can manage data**) and edit permissions to the connection object, or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) privilege is required. To update a connection object, pass these parameters in your API request: 1. GUID of the connection object. 2. If you are updating tables or database schema of a connection object: a. Add the updated JSON map of metadata with database, schema, and tables in `data_warehouse_config`. b. Set `validate` to `true`. 3. If you are updating a configuration attribute, connection name, or description, you can set `validate` to `false`. + * @param updateConnectionRequest + */ + updateConnection(updateConnectionRequest, _options) { + return __async(this, null, function* () { + var _a, _b, _c; + let _config = _options || this.configuration; + if (updateConnectionRequest === null || updateConnectionRequest === void 0) { + throw new RequiredError("ThoughtSpotRestApi", "updateConnection", "updateConnectionRequest"); + } + const localVarPath = "/api/rest/2.0/connection/update"; + const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.25.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.25.0"); + const contentType = ObjectSerializer.getPreferredMediaType([ + "application/json" + ]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = ObjectSerializer.stringify( + ObjectSerializer.serialize(updateConnectionRequest, "UpdateConnectionRequest", ""), + contentType + ); + requestContext.setBody(serializedBody); + let authMethod; + authMethod = _config.authMethods["bearerAuth"]; + if (authMethod == null ? void 0 : authMethod.applySecurityAuthentication) { + yield authMethod == null ? void 0 : authMethod.applySecurityAuthentication(requestContext); + } + const defaultAuth = ((_a = _options == null ? void 0 : _options.authMethods) == null ? void 0 : _a.default) || ((_c = (_b = this.configuration) == null ? void 0 : _b.authMethods) == null ? void 0 : _c.default); + if (defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication) { + yield defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication(requestContext); + } + return requestContext; + }); + } + /** + * Version: 10.12.0.cl or later Updates a connection configuration object. Requires `DATAMANAGEMENT` (**Can manage data**) and edit permissions to the connection object, or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) privilege is required. #### Supported operations This API endpoint lets you perform the following operations in a single API request: * Edit the name or description of the configuration * Edit the configuration properties * Edit the `policy_type` * Edit the type of authentication * Enable or disable a configuration #### Parameterized Connection Support For parameterized oauth based connections, only the `same_as_parent` and `policy_process_options` attributes are allowed. These attributes are not applicable to connections that are not parameterized. **NOTE**: When updating a configuration where `disabled` is `true`, you must reset `disabled` to `true` in your update request payload. If not explicitly set again, the API will default `disabled` to `false`. + * @param configurationIdentifier Unique ID or name of the configuration. + * @param updateConnectionConfigurationRequest + */ + updateConnectionConfiguration(configurationIdentifier, updateConnectionConfigurationRequest, _options) { + return __async(this, null, function* () { + var _a, _b, _c; + let _config = _options || this.configuration; + if (configurationIdentifier === null || configurationIdentifier === void 0) { + throw new RequiredError("ThoughtSpotRestApi", "updateConnectionConfiguration", "configurationIdentifier"); + } + if (updateConnectionConfigurationRequest === null || updateConnectionConfigurationRequest === void 0) { + throw new RequiredError("ThoughtSpotRestApi", "updateConnectionConfiguration", "updateConnectionConfigurationRequest"); + } + const localVarPath = "/api/rest/2.0/connection-configurations/{configuration_identifier}/update".replace("{configuration_identifier}", encodeURIComponent(String(configurationIdentifier))); + const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.25.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.25.0"); + const contentType = ObjectSerializer.getPreferredMediaType([ + "application/json" + ]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = ObjectSerializer.stringify( + ObjectSerializer.serialize(updateConnectionConfigurationRequest, "UpdateConnectionConfigurationRequest", ""), + contentType + ); + requestContext.setBody(serializedBody); + let authMethod; + authMethod = _config.authMethods["bearerAuth"]; + if (authMethod == null ? void 0 : authMethod.applySecurityAuthentication) { + yield authMethod == null ? void 0 : authMethod.applySecurityAuthentication(requestContext); + } + const defaultAuth = ((_a = _options == null ? void 0 : _options.authMethods) == null ? void 0 : _a.default) || ((_c = (_b = this.configuration) == null ? void 0 : _b.authMethods) == null ? void 0 : _c.default); + if (defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication) { + yield defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication(requestContext); + } + return requestContext; + }); + } + /** + * Version: 26.6.0.cl or later Activates or deactivates a connection. A deactivated connection cannot be used for queries or operations until it is activated again. Requires `DATAMANAGEMENT` (**Can manage data**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) privilege is required. Only the connection owner or an administrator can perform this operation. #### Usage guidelines To update the status of a connection, specify the connection GUID or name in the `connection_identifier` path parameter and the desired `status` in the request body. - **ACTIVATED**: Enables the connection. Queries and operations can resume on an activated connection. - **DEACTIVATED**: Disables the connection. It does not remove the connection metadata, but only makes the connection unavailable for queries and operations. You can reactivate a deactivated connection by setting \"status\": \"ACTIVATED\". + * @param connectionIdentifier Unique ID or name of the connection. + * @param updateConnectionStatusRequest + */ + updateConnectionStatus(connectionIdentifier, updateConnectionStatusRequest, _options) { + return __async(this, null, function* () { + var _a, _b, _c; + let _config = _options || this.configuration; + if (connectionIdentifier === null || connectionIdentifier === void 0) { + throw new RequiredError("ThoughtSpotRestApi", "updateConnectionStatus", "connectionIdentifier"); + } + if (updateConnectionStatusRequest === null || updateConnectionStatusRequest === void 0) { + throw new RequiredError("ThoughtSpotRestApi", "updateConnectionStatus", "updateConnectionStatusRequest"); + } + const localVarPath = "/api/rest/2.0/connections/{connection_identifier}/status".replace("{connection_identifier}", encodeURIComponent(String(connectionIdentifier))); + const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.25.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.25.0"); + const contentType = ObjectSerializer.getPreferredMediaType([ + "application/json" + ]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = ObjectSerializer.stringify( + ObjectSerializer.serialize(updateConnectionStatusRequest, "UpdateConnectionStatusRequest", ""), + contentType + ); + requestContext.setBody(serializedBody); + let authMethod; + authMethod = _config.authMethods["bearerAuth"]; + if (authMethod == null ? void 0 : authMethod.applySecurityAuthentication) { + yield authMethod == null ? void 0 : authMethod.applySecurityAuthentication(requestContext); + } + const defaultAuth = ((_a = _options == null ? void 0 : _options.authMethods) == null ? void 0 : _a.default) || ((_c = (_b = this.configuration) == null ? void 0 : _b.authMethods) == null ? void 0 : _c.default); + if (defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication) { + yield defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication(requestContext); + } + return requestContext; + }); + } + /** + * Version: 10.4.0.cl or later Updates a connection object. Requires `DATAMANAGEMENT` (**Can manage data**) and edit permissions to the connection object, or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) privilege is required. To update a connection object, pass these parameters in your API request: 1. GUID of the connection object. 2. If you are updating tables or database schema of a connection object: a. Add the updated JSON map of metadata with database, schema, and tables in `data_warehouse_config`. b. Set `validate` to `true`. **NOTE:** If the `authentication_type` is anything other than SERVICE_ACCOUNT, you must explicitly provide the authenticationType property in the payload. If you do not specify authenticationType, the API will default to SERVICE_ACCOUNT as the authentication type. * A JSON map of configuration attributes, database details, and table properties in `data_warehouse_config` as shown in the following example: * This is an example of updating a single table in a empty connection: ``` { \"authenticationType\": \"SERVICE_ACCOUNT\", \"externalDatabases\": [ { \"name\": \"DEVELOPMENT\", \"isAutoCreated\": false, \"schemas\": [ { \"name\": \"TS_dataset\", \"tables\": [ { \"name\": \"DEMORENAME\", \"type\": \"TABLE\", \"description\": \"\", \"selected\": true, \"linked\": true, \"gid\": 0, \"datasetId\": \"-1\", \"subType\": \"\", \"reportId\": \"\", \"viewId\": \"\", \"columns\": [ { \"name\": \"Col1\", \"type\": \"VARCHAR\", \"canImport\": true, \"selected\": true, \"description\": \"\", \"isLinkedActive\": true, \"isAggregate\": false }, { \"name\": \"Col2\", \"type\": \"VARCHAR\", \"canImport\": true, \"selected\": true, \"description\": \"\", \"isLinkedActive\": true, \"isAggregate\": false }, { \"name\": \"Col3\", \"type\": \"VARCHAR\", \"canImport\": true, \"selected\": true, \"description\": \"\", \"isLinkedActive\": true, \"isAggregate\": false }, { \"name\": \"Col312\", \"type\": \"VARCHAR\", \"canImport\": true, \"selected\": true, \"description\": \"\", \"isLinkedActive\": true, \"isAggregate\": false }, { \"name\": \"Col4\", \"type\": \"VARCHAR\", \"canImport\": true, \"selected\": true, \"description\": \"\", \"isLinkedActive\": true, \"isAggregate\": false } ], \"relationships\": [] } ] } ] } ], \"configuration\": { \"password\": \"\", \"database\": \"DEVELOPMENT\", \"role\": \"DEV\", \"accountName\": \"thoughtspot_partner\", \"warehouse\": \"DEMO_WH\", \"user\": \"DEV_USER\" } } ``` * This is an example of updating a single table in an existing connection with tables: ``` { \"authenticationType\": \"SERVICE_ACCOUNT\", \"externalDatabases\": [ { \"name\": \"DEVELOPMENT\", \"isAutoCreated\": false, \"schemas\": [ { \"name\": \"TS_dataset\", \"tables\": [ { \"name\": \"CUSTOMER\", \"type\": \"TABLE\", \"description\": \"\", \"selected\": true, \"linked\": true, \"gid\": 0, \"datasetId\": \"-1\", \"subType\": \"\", \"reportId\": \"\", \"viewId\": \"\", \"columns\": [], \"relationships\": [] }, { \"name\": \"tpch5k_falcon_default_schema_users\", \"type\": \"TABLE\", \"description\": \"\", \"selected\": true, \"linked\": true, \"gid\": 0, \"datasetId\": \"-1\", \"subType\": \"\", \"reportId\": \"\", \"viewId\": \"\", \"columns\": [ { \"name\": \"user_id\", \"type\": \"INT64\", \"canImport\": true, \"selected\": true, \"description\": \"\", \"isLinkedActive\": true, \"isAggregate\": false }, { \"name\": \"product_id\", \"type\": \"INT64\", \"canImport\": true, \"selected\": true, \"description\": \"\", \"isLinkedActive\": true, \"isAggregate\": false }, { \"name\": \"user_cost\", \"type\": \"INT64\", \"canImport\": true, \"selected\": true, \"description\": \"\", \"isLinkedActive\": true, \"isAggregate\": false } ], \"relationships\": [] } ] } ] } ], \"configuration\": { \"password\": \"\", \"database\": \"DEVELOPMENT\", \"role\": \"DEV\", \"accountName\": \"thoughtspot_partner\", \"warehouse\": \"DEMO_WH\", \"user\": \"DEV_USER\" } } ``` 3. If you are updating a configuration attribute, connection name, or description, you can set `validate` to `false`. **NOTE:** If the `authentication_type` is anything other than SERVICE_ACCOUNT, you must explicitly provide the authenticationType property in the payload. If you do not specify authenticationType, the API will default to SERVICE_ACCOUNT as the authentication type. * A JSON map of configuration attributes in `data_warehouse_config`. The following example shows the configuration attributes for a Snowflake connection: ``` { \"configuration\":{ \"accountName\":\"thoughtspot_partner\", \"user\":\"tsadmin\", \"password\":\"TestConn123\", \"role\":\"sysadmin\", \"warehouse\":\"MEDIUM_WH\" }, \"externalDatabases\":[ ] } ``` + * @param connectionIdentifier Unique ID or name of the connection. + * @param updateConnectionV2Request + */ + updateConnectionV2(connectionIdentifier, updateConnectionV2Request, _options) { + return __async(this, null, function* () { + var _a, _b, _c; + let _config = _options || this.configuration; + if (connectionIdentifier === null || connectionIdentifier === void 0) { + throw new RequiredError("ThoughtSpotRestApi", "updateConnectionV2", "connectionIdentifier"); + } + if (updateConnectionV2Request === null || updateConnectionV2Request === void 0) { + throw new RequiredError("ThoughtSpotRestApi", "updateConnectionV2", "updateConnectionV2Request"); + } + const localVarPath = "/api/rest/2.0/connections/{connection_identifier}/update".replace("{connection_identifier}", encodeURIComponent(String(connectionIdentifier))); + const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.25.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.25.0"); + const contentType = ObjectSerializer.getPreferredMediaType([ + "application/json" + ]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = ObjectSerializer.stringify( + ObjectSerializer.serialize(updateConnectionV2Request, "UpdateConnectionV2Request", ""), + contentType + ); + requestContext.setBody(serializedBody); + let authMethod; + authMethod = _config.authMethods["bearerAuth"]; + if (authMethod == null ? void 0 : authMethod.applySecurityAuthentication) { + yield authMethod == null ? void 0 : authMethod.applySecurityAuthentication(requestContext); + } + const defaultAuth = ((_a = _options == null ? void 0 : _options.authMethods) == null ? void 0 : _a.default) || ((_c = (_b = this.configuration) == null ? void 0 : _b.authMethods) == null ? void 0 : _c.default); + if (defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication) { + yield defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication(requestContext); + } + return requestContext; + }); + } + /** + * Version: 9.6.0.cl or later Updates a custom action. Requires `DEVELOPER` (**Has Developer privilege**) or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `DEVELOPER` (**Has developer privilege**) privilege is required. #### Usage Guidelines The API allows you to modify the following properties: * Name of the custom action * Action availability to groups * Association to metadata objects * Authentication settings for a URL-based action For more information, see [Custom actions](https://developers.thoughtspot.com/docs/custom-action-intro). + * @param customActionIdentifier Unique ID or name of the custom action. + * @param updateCustomActionRequest + */ + updateCustomAction(customActionIdentifier, updateCustomActionRequest, _options) { + return __async(this, null, function* () { + var _a, _b, _c; + let _config = _options || this.configuration; + if (customActionIdentifier === null || customActionIdentifier === void 0) { + throw new RequiredError("ThoughtSpotRestApi", "updateCustomAction", "customActionIdentifier"); + } + if (updateCustomActionRequest === null || updateCustomActionRequest === void 0) { + throw new RequiredError("ThoughtSpotRestApi", "updateCustomAction", "updateCustomActionRequest"); + } + const localVarPath = "/api/rest/2.0/customization/custom-actions/{custom_action_identifier}/update".replace("{custom_action_identifier}", encodeURIComponent(String(customActionIdentifier))); + const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.25.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.25.0"); + const contentType = ObjectSerializer.getPreferredMediaType([ + "application/json" + ]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = ObjectSerializer.stringify( + ObjectSerializer.serialize(updateCustomActionRequest, "UpdateCustomActionRequest", ""), + contentType + ); + requestContext.setBody(serializedBody); + let authMethod; + authMethod = _config.authMethods["bearerAuth"]; + if (authMethod == null ? void 0 : authMethod.applySecurityAuthentication) { + yield authMethod == null ? void 0 : authMethod.applySecurityAuthentication(requestContext); + } + const defaultAuth = ((_a = _options == null ? void 0 : _options.authMethods) == null ? void 0 : _a.default) || ((_c = (_b = this.configuration) == null ? void 0 : _b.authMethods) == null ? void 0 : _c.default); + if (defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication) { + yield defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication(requestContext); + } + return requestContext; + }); + } + /** + * Version: 9.9.0.cl or later Updates a DBT connection object. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege or `DATAMANAGEMENT` (**Can manage data ThoughtSpot**) privilege, along with an existing DBT connection. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the following data control privileges may be required: - `CAN_MANAGE_CUSTOM_CALENDAR`(**Can manage custom calendars**) - `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) - `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` (**Can manage data models**) #### About update DBT connection You can modify DBT connection object properties such as embrace connection name, embrace database name, import type, account identifier, access token, project identifier and environment (or) embrace connection, embrace database name, import type, file_content settings. + * @param dbtConnectionIdentifier Unique ID of the DBT Connection. + * @param connectionName Name of the connection. + * @param databaseName Name of the Database. + * @param importType Mention type of Import + * @param accessToken Access token is mandatory when Import_Type is DBT_CLOUD. + * @param dbtUrl DBT URL is mandatory when Import_Type is DBT_CLOUD. + * @param accountId Account ID is mandatory when Import_Type is DBT_CLOUD + * @param projectId Project ID is mandatory when Import_Type is DBT_CLOUD + * @param dbtEnvId DBT Environment ID\\\" + * @param projectName Name of the project + * @param fileContent Upload DBT Manifest and Catalog artifact files as a ZIP file. This field is Mandatory when Import Type is \\\'ZIP_FILE\\\' + */ + updateDbtConnection(dbtConnectionIdentifier, connectionName, databaseName, importType, accessToken, dbtUrl, accountId, projectId, dbtEnvId, projectName, fileContent, _options) { + return __async(this, null, function* () { + var _a, _b, _c; + let _config = _options || this.configuration; + if (dbtConnectionIdentifier === null || dbtConnectionIdentifier === void 0) { + throw new RequiredError("ThoughtSpotRestApi", "updateDbtConnection", "dbtConnectionIdentifier"); + } + const localVarPath = "/api/rest/2.0/dbt/update-dbt-connection"; + const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.25.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.25.0"); + const useForm = canConsumeForm([ + "multipart/form-data" + ]); + let localVarFormParams; + if (useForm) { + localVarFormParams = new FormData(); + } else { + localVarFormParams = new URLSearchParams(); + } + if (dbtConnectionIdentifier !== void 0) { + localVarFormParams.append("dbt_connection_identifier", dbtConnectionIdentifier); + } + if (connectionName !== void 0) { + localVarFormParams.append("connection_name", connectionName); + } + if (databaseName !== void 0) { + localVarFormParams.append("database_name", databaseName); + } + if (importType !== void 0) { + localVarFormParams.append("import_type", importType); + } + if (accessToken !== void 0) { + localVarFormParams.append("access_token", accessToken); + } + if (dbtUrl !== void 0) { + localVarFormParams.append("dbt_url", dbtUrl); + } + if (accountId !== void 0) { + localVarFormParams.append("account_id", accountId); + } + if (projectId !== void 0) { + localVarFormParams.append("project_id", projectId); + } + if (dbtEnvId !== void 0) { + localVarFormParams.append("dbt_env_id", dbtEnvId); + } + if (projectName !== void 0) { + localVarFormParams.append("project_name", projectName); + } + if (fileContent !== void 0) { + if (localVarFormParams instanceof FormData) { + localVarFormParams.append("file_content", fileContent, fileContent.name); + } + } + requestContext.setBody(localVarFormParams); + if (!useForm) { + const contentType = ObjectSerializer.getPreferredMediaType([ + "multipart/form-data" + ]); + requestContext.setHeaderParam("Content-Type", contentType); + } + let authMethod; + authMethod = _config.authMethods["bearerAuth"]; + if (authMethod == null ? void 0 : authMethod.applySecurityAuthentication) { + yield authMethod == null ? void 0 : authMethod.applySecurityAuthentication(requestContext); + } + const defaultAuth = ((_a = _options == null ? void 0 : _options.authMethods) == null ? void 0 : _a.default) || ((_c = (_b = this.configuration) == null ? void 0 : _b.authMethods) == null ? void 0 : _c.default); + if (defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication) { + yield defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication(requestContext); + } + return requestContext; + }); + } + /** + * Version: 10.12.0.cl or later Updates a customization configuration for the notification email. #### Pre-requisites Requires `DEVELOPER` (**has developer privilege**) or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `DEVELOPER` (**Has developer privilege**) privilege is required. **NOTE**:This endpoint in currently in beta. Contact ThoughtSpot support to enable this on your instance. #### Usage guidelines To update a custom configuration pass these parameters in your API request: - A JSON map of configuration attributes `template_properties`. The following example shows a sample set of customization configuration: ``` { { \"cta_button_bg_color\": \"#444DEA\", \"cta_text_font_color\": \"#FFFFFF\", \"primary_bg_color\": \"#D3DEF0\", \"logo_url\": \"https://storage.pardot.com/710713/1642089901EbkRibJq/TS_fullworkmark_darkmode.png\", \"font_family\": \"\", \"product_name\": \"ThoughtSpot\", \"footer_address\": \"444 Castro St, Suite 1000 Mountain View, CA 94041\", \"footer_phone\": \"(800) 508-7008\", \"replacement_value_for_liveboard\": \"Dashboard\", \"replacement_value_for_answer\": \"Chart\", \"replacement_value_for_spot_iq\": \"AI Insights\", \"hide_footer_phone\": false, \"hide_footer_address\": false, \"hide_product_name\": false, \"hide_manage_notification\": false, \"hide_mobile_app_nudge\": false, \"hide_privacy_policy\": false, \"hide_ts_vocabulary_definitions\": false, \"hide_error_message\": false, \"hide_unsubscribe_link\": false, \"hide_notification_status\": false, \"hide_modify_alert\": false, \"company_website_url\": \"https://your-website.com/\", \"company_privacy_policy_url\" : \"https://link-to-privacy-policy.com/\", \"contact_support_url\": \"https://link-to-contact-support.com/\", \"hide_contact_support_url\": false, \"hide_logo_url\" : false } } ``` + * @param updateEmailCustomizationRequest + */ + updateEmailCustomization(updateEmailCustomizationRequest, _options) { + return __async(this, null, function* () { + var _a, _b, _c; + let _config = _options || this.configuration; + if (updateEmailCustomizationRequest === null || updateEmailCustomizationRequest === void 0) { + throw new RequiredError("ThoughtSpotRestApi", "updateEmailCustomization", "updateEmailCustomizationRequest"); + } + const localVarPath = "/api/rest/2.0/customization/email/update"; + const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.25.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.25.0"); + const contentType = ObjectSerializer.getPreferredMediaType([ + "application/json" + ]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = ObjectSerializer.stringify( + ObjectSerializer.serialize(updateEmailCustomizationRequest, "UpdateEmailCustomizationRequest", ""), + contentType + ); + requestContext.setBody(serializedBody); + let authMethod; + authMethod = _config.authMethods["bearerAuth"]; + if (authMethod == null ? void 0 : authMethod.applySecurityAuthentication) { + yield authMethod == null ? void 0 : authMethod.applySecurityAuthentication(requestContext); + } + const defaultAuth = ((_a = _options == null ? void 0 : _options.authMethods) == null ? void 0 : _a.default) || ((_c = (_b = this.configuration) == null ? void 0 : _b.authMethods) == null ? void 0 : _c.default); + if (defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication) { + yield defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication(requestContext); + } + return requestContext; + }); + } + /** + * Update header attributes for a given list of header objects. Version: 10.6.0.cl or later ## Prerequisites - **Privileges Required:** - `DATAMANAGEMENT` (Can manage data) or `ADMINISTRATION` (Can administer ThoughtSpot). - **Additional Privileges (if RBAC is enabled):** - `ORG_ADMINISTRATION` (Can manage orgs). --- ## Usage Guidelines ### Parameters 1. **headers_update** - **Description:** List of header objects with their attributes to be updated. Each object contains a list of attributes to be updated in the header. - **Usage:** - You must provide either `identifier` or `obj_identifier`, but not both. Both fields cannot be empty. - When `org_identifier` is set to `-1`, only the `identifier` value is accepted; `obj_identifier` is not allowed. 2. **org_identifier** - **Description:** GUID (Globally Unique Identifier) or name of the organization. - **Usage:** - Leaving this field empty assumes that the changes should be applied to the current organization - Provide `org_guid` or `org_name` to uniquely identify the organization where changes need to be applied. . - Provide `-1` if changes have to be applied across all the org. --- ## Note Currently, this API is enabled only for updating the `obj_identifier` attribute. Only `text` will be allowed in attribute\'s value. ## Best Practices 1. **Backup Before Conversion:** Always export metadata as a backup before initiating the update process --- ## Examples ### Only `identifier` is given ```json { \"headers_update\": [ { \"identifier\": \"guid_1\", \"obj_identifier\": \"\", \"type\": \"LOGICAL_COLUMN\", \"attributes\": [ { \"name\": \"obj_id\", \"value\": \"custom_object_id\" } ] } ], \"org_identifier\": \"orgGuid\" } ``` ### Only `obj_identifier` is given ```json { \"headers_update\": [ { \"obj_identifier\": \"custom_object_id\", \"type\": \"ANSWER\", \"attributes\": [ { \"name\": \"obj_id\", \"value\": \"custom_object_id\" } ] } ], \"org_identifier\": \"orgName\" } ``` ### Executing update for all org `-1` ```json { \"headers_update\": [ { \"identifier\": \"guid_1\", \"type\": \"ANSWER\", \"attributes\": [ { \"name\": \"obj_id\", \"value\": \"custom_object_id\" } ] } ], \"org_identifier\": -1 } ``` ### Optional `type` is not provided ```json { \"headers_update\": [ { \"identifier\": \"guid_1\", \"attributes\": [ { \"name\": \"obj_id\", \"value\": \"custom_object_id\" } ] } ], \"org_identifier\": -1 } ``` + * @param updateMetadataHeaderRequest + */ + updateMetadataHeader(updateMetadataHeaderRequest, _options) { + return __async(this, null, function* () { + var _a, _b, _c; + let _config = _options || this.configuration; + if (updateMetadataHeaderRequest === null || updateMetadataHeaderRequest === void 0) { + throw new RequiredError("ThoughtSpotRestApi", "updateMetadataHeader", "updateMetadataHeaderRequest"); + } + const localVarPath = "/api/rest/2.0/metadata/headers/update"; + const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.25.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.25.0"); + const contentType = ObjectSerializer.getPreferredMediaType([ + "application/json" + ]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = ObjectSerializer.stringify( + ObjectSerializer.serialize(updateMetadataHeaderRequest, "UpdateMetadataHeaderRequest", ""), + contentType + ); + requestContext.setBody(serializedBody); + let authMethod; + authMethod = _config.authMethods["bearerAuth"]; + if (authMethod == null ? void 0 : authMethod.applySecurityAuthentication) { + yield authMethod == null ? void 0 : authMethod.applySecurityAuthentication(requestContext); + } + const defaultAuth = ((_a = _options == null ? void 0 : _options.authMethods) == null ? void 0 : _a.default) || ((_c = (_b = this.configuration) == null ? void 0 : _b.authMethods) == null ? void 0 : _c.default); + if (defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication) { + yield defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication(requestContext); + } + return requestContext; + }); + } + /** + * Update object IDs for given metadata objects. Version: 10.8.0.cl or later ## Prerequisites - **Privileges Required:** - `DATAMANAGEMENT` (Can manage data) or `ADMINISTRATION` (Can administer ThoughtSpot). - **Additional Privileges (if RBAC is enabled):** - `ORG_ADMINISTRATION` (Can manage orgs). --- ## Usage Guidelines ### Parameters 1. **metadata** - **Description:** List of metadata objects to update their object IDs. - **Usage:** - Use either `current_obj_id` alone OR use `metadata_identifier` with `type` (when needed). - When using `metadata_identifier`, the `type` field is required if using a name instead of a GUID. - The `new_obj_id` field is always required. --- ## Note This API is specifically designed for updating object IDs of metadata objects. It internally uses the header update mechanism to perform the changes. ## Best Practices 1. **Backup Before Update:** Always export metadata as a backup before initiating the update process. 2. **Validation:** - When using `current_obj_id`, ensure it matches the existing object ID exactly. - When using `metadata_identifier` with a name, ensure the `type` is specified correctly. - Verify that the `new_obj_id` follows your naming conventions and is unique within your system. --- ## Examples ### Using current_obj_id ```json { \"metadata\": [ { \"current_obj_id\": \"existing_object_id\", \"new_obj_id\": \"new_object_id\" } ] } ``` ### Using metadata_identifier with GUID ```json { \"metadata\": [ { \"metadata_identifier\": \"01234567-89ab-cdef-0123-456789abcdef\", \"new_obj_id\": \"new_object_id\" } ] } ``` ### Using metadata_identifier with name and type ```json { \"metadata\": [ { \"metadata_identifier\": \"My Answer\", \"type\": \"ANSWER\", \"new_obj_id\": \"new_object_id\" } ] } ``` ### Multiple objects update ```json { \"metadata\": [ { \"current_obj_id\": \"existing_object_id_1\", \"new_obj_id\": \"new_object_id_1\" }, { \"metadata_identifier\": \"My Worksheet\", \"type\": \"LOGICAL_TABLE\", \"new_obj_id\": \"new_object_id_2\" } ] } ``` + * @param updateMetadataObjIdRequest + */ + updateMetadataObjId(updateMetadataObjIdRequest, _options) { + return __async(this, null, function* () { + var _a, _b, _c; + let _config = _options || this.configuration; + if (updateMetadataObjIdRequest === null || updateMetadataObjIdRequest === void 0) { + throw new RequiredError("ThoughtSpotRestApi", "updateMetadataObjId", "updateMetadataObjIdRequest"); + } + const localVarPath = "/api/rest/2.0/metadata/update-obj-id"; + const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.25.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.25.0"); + const contentType = ObjectSerializer.getPreferredMediaType([ + "application/json" + ]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = ObjectSerializer.stringify( + ObjectSerializer.serialize(updateMetadataObjIdRequest, "UpdateMetadataObjIdRequest", ""), + contentType + ); + requestContext.setBody(serializedBody); + let authMethod; + authMethod = _config.authMethods["bearerAuth"]; + if (authMethod == null ? void 0 : authMethod.applySecurityAuthentication) { + yield authMethod == null ? void 0 : authMethod.applySecurityAuthentication(requestContext); + } + const defaultAuth = ((_a = _options == null ? void 0 : _options.authMethods) == null ? void 0 : _a.default) || ((_c = (_b = this.configuration) == null ? void 0 : _b.authMethods) == null ? void 0 : _c.default); + if (defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication) { + yield defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication(requestContext); + } + return requestContext; + }); + } + /** + * Version: 9.0.0.cl or later Updates an Org object. You can modify Org properties such as name, description, and user associations. Requires cluster administration (**Can administer Org**) privileges. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `ORG_ADMINISTRATION` (**Can manage Orgs**) privilege is required. + * @param orgIdentifier ID or name of the Org + * @param updateOrgRequest + */ + updateOrg(orgIdentifier, updateOrgRequest, _options) { + return __async(this, null, function* () { + var _a, _b, _c; + let _config = _options || this.configuration; + if (orgIdentifier === null || orgIdentifier === void 0) { + throw new RequiredError("ThoughtSpotRestApi", "updateOrg", "orgIdentifier"); + } + if (updateOrgRequest === null || updateOrgRequest === void 0) { + throw new RequiredError("ThoughtSpotRestApi", "updateOrg", "updateOrgRequest"); + } + const localVarPath = "/api/rest/2.0/orgs/{org_identifier}/update".replace("{org_identifier}", encodeURIComponent(String(orgIdentifier))); + const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.25.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.25.0"); + const contentType = ObjectSerializer.getPreferredMediaType([ + "application/json" + ]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = ObjectSerializer.stringify( + ObjectSerializer.serialize(updateOrgRequest, "UpdateOrgRequest", ""), + contentType + ); + requestContext.setBody(serializedBody); + let authMethod; + authMethod = _config.authMethods["bearerAuth"]; + if (authMethod == null ? void 0 : authMethod.applySecurityAuthentication) { + yield authMethod == null ? void 0 : authMethod.applySecurityAuthentication(requestContext); + } + const defaultAuth = ((_a = _options == null ? void 0 : _options.authMethods) == null ? void 0 : _a.default) || ((_c = (_b = this.configuration) == null ? void 0 : _b.authMethods) == null ? void 0 : _c.default); + if (defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication) { + yield defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication(requestContext); + } + return requestContext; + }); + } + /** + * Version: 9.5.0.cl or later Updates the properties of a Role object. Available only if [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance. To update a Role, the `ROLE_ADMINISTRATION` (**Can manage roles**) privilege is required. + * @param roleIdentifier Unique ID or name of the Role. + * @param updateRoleRequest + */ + updateRole(roleIdentifier, updateRoleRequest, _options) { + return __async(this, null, function* () { + var _a, _b, _c; + let _config = _options || this.configuration; + if (roleIdentifier === null || roleIdentifier === void 0) { + throw new RequiredError("ThoughtSpotRestApi", "updateRole", "roleIdentifier"); + } + if (updateRoleRequest === null || updateRoleRequest === void 0) { + throw new RequiredError("ThoughtSpotRestApi", "updateRole", "updateRoleRequest"); + } + const localVarPath = "/api/rest/2.0/roles/{role_identifier}/update".replace("{role_identifier}", encodeURIComponent(String(roleIdentifier))); + const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.25.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.25.0"); + const contentType = ObjectSerializer.getPreferredMediaType([ + "application/json" + ]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = ObjectSerializer.stringify( + ObjectSerializer.serialize(updateRoleRequest, "UpdateRoleRequest", ""), + contentType + ); + requestContext.setBody(serializedBody); + let authMethod; + authMethod = _config.authMethods["bearerAuth"]; + if (authMethod == null ? void 0 : authMethod.applySecurityAuthentication) { + yield authMethod == null ? void 0 : authMethod.applySecurityAuthentication(requestContext); + } + const defaultAuth = ((_a = _options == null ? void 0 : _options.authMethods) == null ? void 0 : _a.default) || ((_c = (_b = this.configuration) == null ? void 0 : _b.authMethods) == null ? void 0 : _c.default); + if (defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication) { + yield defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication(requestContext); + } + return requestContext; + }); + } + /** + * Update schedule. Version: 9.4.0.cl or later Updates a scheduled Liveboard job. Requires at least edit access to Liveboards. To update a schedule on behalf of another user, you need `ADMINISTRATION` (**Can administer Org**) or `JOBSCHEDULING` (**Can schedule for others**) privilege and edit access to the Liveboard. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `JOBSCHEDULING` (**Can schedule for others**) privilege is required. The API endpoint allows you to pause a scheduled job, change the status of a paused job. You can also edit the recipients list, frequency of the job, format of the file to send to the recipients in email notifications, PDF options, and time zone setting. + * @param scheduleIdentifier Unique ID or name of the schedule. + * @param updateScheduleRequest + */ + updateSchedule(scheduleIdentifier, updateScheduleRequest, _options) { + return __async(this, null, function* () { + var _a, _b, _c; + let _config = _options || this.configuration; + if (scheduleIdentifier === null || scheduleIdentifier === void 0) { + throw new RequiredError("ThoughtSpotRestApi", "updateSchedule", "scheduleIdentifier"); + } + if (updateScheduleRequest === null || updateScheduleRequest === void 0) { + throw new RequiredError("ThoughtSpotRestApi", "updateSchedule", "updateScheduleRequest"); + } + const localVarPath = "/api/rest/2.0/schedules/{schedule_identifier}/update".replace("{schedule_identifier}", encodeURIComponent(String(scheduleIdentifier))); + const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.25.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.25.0"); + const contentType = ObjectSerializer.getPreferredMediaType([ + "application/json" + ]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = ObjectSerializer.stringify( + ObjectSerializer.serialize(updateScheduleRequest, "UpdateScheduleRequest", ""), + contentType + ); + requestContext.setBody(serializedBody); + let authMethod; + authMethod = _config.authMethods["bearerAuth"]; + if (authMethod == null ? void 0 : authMethod.applySecurityAuthentication) { + yield authMethod == null ? void 0 : authMethod.applySecurityAuthentication(requestContext); + } + const defaultAuth = ((_a = _options == null ? void 0 : _options.authMethods) == null ? void 0 : _a.default) || ((_c = (_b = this.configuration) == null ? void 0 : _b.authMethods) == null ? void 0 : _c.default); + if (defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication) { + yield defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication(requestContext); + } + return requestContext; + }); + } + /** + * Version: 9.2.0.cl or later Updates the current configuration of the cluster. You must send the configuration data in JSON format. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privileges. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `APPLICATION_ADMINISTRATION` (**Can manage application settings**) privilege is required. + * @param updateSystemConfigRequest + */ + updateSystemConfig(updateSystemConfigRequest, _options) { + return __async(this, null, function* () { + var _a, _b, _c; + let _config = _options || this.configuration; + if (updateSystemConfigRequest === null || updateSystemConfigRequest === void 0) { + throw new RequiredError("ThoughtSpotRestApi", "updateSystemConfig", "updateSystemConfigRequest"); + } + const localVarPath = "/api/rest/2.0/system/config-update"; + const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.25.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.25.0"); + const contentType = ObjectSerializer.getPreferredMediaType([ + "application/json" + ]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = ObjectSerializer.stringify( + ObjectSerializer.serialize(updateSystemConfigRequest, "UpdateSystemConfigRequest", ""), + contentType + ); + requestContext.setBody(serializedBody); + let authMethod; + authMethod = _config.authMethods["bearerAuth"]; + if (authMethod == null ? void 0 : authMethod.applySecurityAuthentication) { + yield authMethod == null ? void 0 : authMethod.applySecurityAuthentication(requestContext); + } + const defaultAuth = ((_a = _options == null ? void 0 : _options.authMethods) == null ? void 0 : _a.default) || ((_c = (_b = this.configuration) == null ? void 0 : _b.authMethods) == null ? void 0 : _c.default); + if (defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication) { + yield defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication(requestContext); + } + return requestContext; + }); + } + /** + * Version: 9.0.0.cl or later Updates a tag object. You can modify the `name` and `color` properties of a tag object. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `TAGMANAGEMENT` (**Can manage tags**) privilege is required to create, edit, and delete tags. + * @param tagIdentifier Name or Id of the tag. + * @param updateTagRequest + */ + updateTag(tagIdentifier, updateTagRequest, _options) { + return __async(this, null, function* () { + var _a, _b, _c; + let _config = _options || this.configuration; + if (tagIdentifier === null || tagIdentifier === void 0) { + throw new RequiredError("ThoughtSpotRestApi", "updateTag", "tagIdentifier"); + } + if (updateTagRequest === null || updateTagRequest === void 0) { + throw new RequiredError("ThoughtSpotRestApi", "updateTag", "updateTagRequest"); + } + const localVarPath = "/api/rest/2.0/tags/{tag_identifier}/update".replace("{tag_identifier}", encodeURIComponent(String(tagIdentifier))); + const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.25.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.25.0"); + const contentType = ObjectSerializer.getPreferredMediaType([ + "application/json" + ]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = ObjectSerializer.stringify( + ObjectSerializer.serialize(updateTagRequest, "UpdateTagRequest", ""), + contentType + ); + requestContext.setBody(serializedBody); + let authMethod; + authMethod = _config.authMethods["bearerAuth"]; + if (authMethod == null ? void 0 : authMethod.applySecurityAuthentication) { + yield authMethod == null ? void 0 : authMethod.applySecurityAuthentication(requestContext); + } + const defaultAuth = ((_a = _options == null ? void 0 : _options.authMethods) == null ? void 0 : _a.default) || ((_c = (_b = this.configuration) == null ? void 0 : _b.authMethods) == null ? void 0 : _c.default); + if (defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication) { + yield defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication(requestContext); + } + return requestContext; + }); + } + /** + * Version: 9.0.0.cl or later Updates the properties of a user object. You can modify user properties such as username, email, and share notification settings. You can also assign new groups and Orgs, remove the user from a group or Org, reset password, and modify user preferences. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `USER_ADMINISTRATION` (**Can manage users**) privilege is required. + * @param userIdentifier GUID / name of the user + * @param updateUserRequest + */ + updateUser(userIdentifier, updateUserRequest, _options) { + return __async(this, null, function* () { + var _a, _b, _c; + let _config = _options || this.configuration; + if (userIdentifier === null || userIdentifier === void 0) { + throw new RequiredError("ThoughtSpotRestApi", "updateUser", "userIdentifier"); + } + if (updateUserRequest === null || updateUserRequest === void 0) { + throw new RequiredError("ThoughtSpotRestApi", "updateUser", "updateUserRequest"); + } + const localVarPath = "/api/rest/2.0/users/{user_identifier}/update".replace("{user_identifier}", encodeURIComponent(String(userIdentifier))); + const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.25.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.25.0"); + const contentType = ObjectSerializer.getPreferredMediaType([ + "application/json" + ]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = ObjectSerializer.stringify( + ObjectSerializer.serialize(updateUserRequest, "UpdateUserRequest", ""), + contentType + ); + requestContext.setBody(serializedBody); + let authMethod; + authMethod = _config.authMethods["bearerAuth"]; + if (authMethod == null ? void 0 : authMethod.applySecurityAuthentication) { + yield authMethod == null ? void 0 : authMethod.applySecurityAuthentication(requestContext); + } + const defaultAuth = ((_a = _options == null ? void 0 : _options.authMethods) == null ? void 0 : _a.default) || ((_c = (_b = this.configuration) == null ? void 0 : _b.authMethods) == null ? void 0 : _c.default); + if (defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication) { + yield defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication(requestContext); + } + return requestContext; + }); + } + /** + * Version: 9.0.0.cl or later Updates the properties of a group object in ThoughtSpot. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `GROUP_ADMINISTRATION` (**Can manage groups**) privilege is required. #### Supported operations This API endpoint lets you perform the following operations in a single API request: * Edit [privileges](https://developers.thoughtspot.com/docs/?pageid=api-user-management#group-privileges) * Add or remove users * Change sharing visibility settings * Add or remove sub-groups * Assign a default Liveboard or update the existing settings + * @param groupIdentifier GUID or name of the group. + * @param updateUserGroupRequest + */ + updateUserGroup(groupIdentifier, updateUserGroupRequest, _options) { + return __async(this, null, function* () { + var _a, _b, _c; + let _config = _options || this.configuration; + if (groupIdentifier === null || groupIdentifier === void 0) { + throw new RequiredError("ThoughtSpotRestApi", "updateUserGroup", "groupIdentifier"); + } + if (updateUserGroupRequest === null || updateUserGroupRequest === void 0) { + throw new RequiredError("ThoughtSpotRestApi", "updateUserGroup", "updateUserGroupRequest"); + } + const localVarPath = "/api/rest/2.0/groups/{group_identifier}/update".replace("{group_identifier}", encodeURIComponent(String(groupIdentifier))); + const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.25.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.25.0"); + const contentType = ObjectSerializer.getPreferredMediaType([ + "application/json" + ]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = ObjectSerializer.stringify( + ObjectSerializer.serialize(updateUserGroupRequest, "UpdateUserGroupRequest", ""), + contentType + ); + requestContext.setBody(serializedBody); + let authMethod; + authMethod = _config.authMethods["bearerAuth"]; + if (authMethod == null ? void 0 : authMethod.applySecurityAuthentication) { + yield authMethod == null ? void 0 : authMethod.applySecurityAuthentication(requestContext); + } + const defaultAuth = ((_a = _options == null ? void 0 : _options.authMethods) == null ? void 0 : _a.default) || ((_c = (_b = this.configuration) == null ? void 0 : _b.authMethods) == null ? void 0 : _c.default); + if (defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication) { + yield defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication(requestContext); + } + return requestContext; + }); + } + /** + * Update a variable\'s name Version: 26.4.0.cl or later Allows updating a variable\'s name in ThoughtSpot. Requires ADMINISTRATION role and TENANT scope. The CAN_MANAGE_VARIABLES permission allows you to manage Formula Variables in the current organization scope. The API endpoint allows updating: * The variable name + * @param identifier Unique id or name of the variable to update. + * @param updateVariableRequest + */ + updateVariable(identifier, updateVariableRequest, _options) { + return __async(this, null, function* () { + var _a, _b, _c; + let _config = _options || this.configuration; + if (identifier === null || identifier === void 0) { + throw new RequiredError("ThoughtSpotRestApi", "updateVariable", "identifier"); + } + if (updateVariableRequest === null || updateVariableRequest === void 0) { + throw new RequiredError("ThoughtSpotRestApi", "updateVariable", "updateVariableRequest"); + } + const localVarPath = "/api/rest/2.0/template/variables/{identifier}/update".replace("{identifier}", encodeURIComponent(String(identifier))); + const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.25.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.25.0"); + const contentType = ObjectSerializer.getPreferredMediaType([ + "application/json" + ]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = ObjectSerializer.stringify( + ObjectSerializer.serialize(updateVariableRequest, "UpdateVariableRequest", ""), + contentType + ); + requestContext.setBody(serializedBody); + let authMethod; + authMethod = _config.authMethods["bearerAuth"]; + if (authMethod == null ? void 0 : authMethod.applySecurityAuthentication) { + yield authMethod == null ? void 0 : authMethod.applySecurityAuthentication(requestContext); + } + const defaultAuth = ((_a = _options == null ? void 0 : _options.authMethods) == null ? void 0 : _a.default) || ((_c = (_b = this.configuration) == null ? void 0 : _b.authMethods) == null ? void 0 : _c.default); + if (defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication) { + yield defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication(requestContext); + } + return requestContext; + }); + } + /** + * Update values for multiple variables Version: 10.14.0.cl or later **Note:** This API endpoint is deprecated and will be removed from ThoughtSpot in a future release. Use [POST /api/rest/2.0/template/variables/{identifier}/update-values](/api/rest/2.0/template/variables/%7Bidentifier%7D/update-values) instead. Allows updating values for multiple variables in ThoughtSpot. Requires ADMINISTRATION role. The CAN_MANAGE_VARIABLES permission allows you to manage Formula Variables in the current organization scope. The API endpoint allows: * Adding new values to variables * Replacing existing values * Deleting values from variables When updating variable values, you need to specify: * The variable identifiers * The values to add/replace/remove for each variable * The operation to perform (ADD, REPLACE, REMOVE, RESET) Behaviour based on operation type: * ADD - Adds values to the variable if this is a list type variable, else same as replace. * REPLACE - Replaces all values of a given set of constraints with the current set of values. * REMOVE - Removes any values which match the set of conditions of the variables if this is a list type variable, else clears value. * RESET - Removes all constrains for a given variable, scope is ignored + * @param updateVariableValuesRequest + */ + updateVariableValues(updateVariableValuesRequest, _options) { + return __async(this, null, function* () { + var _a, _b, _c; + let _config = _options || this.configuration; + if (updateVariableValuesRequest === null || updateVariableValuesRequest === void 0) { + throw new RequiredError("ThoughtSpotRestApi", "updateVariableValues", "updateVariableValuesRequest"); + } + const localVarPath = "/api/rest/2.0/template/variables/update-values"; + const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.25.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.25.0"); + const contentType = ObjectSerializer.getPreferredMediaType([ + "application/json" + ]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = ObjectSerializer.stringify( + ObjectSerializer.serialize(updateVariableValuesRequest, "UpdateVariableValuesRequest", ""), + contentType + ); + requestContext.setBody(serializedBody); + let authMethod; + authMethod = _config.authMethods["bearerAuth"]; + if (authMethod == null ? void 0 : authMethod.applySecurityAuthentication) { + yield authMethod == null ? void 0 : authMethod.applySecurityAuthentication(requestContext); + } + const defaultAuth = ((_a = _options == null ? void 0 : _options.authMethods) == null ? void 0 : _a.default) || ((_c = (_b = this.configuration) == null ? void 0 : _b.authMethods) == null ? void 0 : _c.default); + if (defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication) { + yield defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication(requestContext); + } + return requestContext; + }); + } + /** + * Version: 10.14.0.cl or later Updates an existing webhook configuration by its unique id or name. Only the provided fields will be updated. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) or `DEVELOPER` (**Has developer privilege**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, users with `CAN_MANAGE_WEBHOOKS` (**Can manage webhooks**) privilege are also authorized to perform this action. + * @param webhookIdentifier Unique ID or name of the webhook configuration. + * @param updateWebhookConfigurationRequest + */ + updateWebhookConfiguration(webhookIdentifier, updateWebhookConfigurationRequest, _options) { + return __async(this, null, function* () { + var _a, _b, _c; + let _config = _options || this.configuration; + if (webhookIdentifier === null || webhookIdentifier === void 0) { + throw new RequiredError("ThoughtSpotRestApi", "updateWebhookConfiguration", "webhookIdentifier"); + } + if (updateWebhookConfigurationRequest === null || updateWebhookConfigurationRequest === void 0) { + throw new RequiredError("ThoughtSpotRestApi", "updateWebhookConfiguration", "updateWebhookConfigurationRequest"); + } + const localVarPath = "/api/rest/2.0/webhooks/{webhook_identifier}/update".replace("{webhook_identifier}", encodeURIComponent(String(webhookIdentifier))); + const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.25.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.25.0"); + const contentType = ObjectSerializer.getPreferredMediaType([ + "application/json" + ]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = ObjectSerializer.stringify( + ObjectSerializer.serialize(updateWebhookConfigurationRequest, "UpdateWebhookConfigurationRequest", ""), + contentType + ); + requestContext.setBody(serializedBody); + let authMethod; + authMethod = _config.authMethods["bearerAuth"]; + if (authMethod == null ? void 0 : authMethod.applySecurityAuthentication) { + yield authMethod == null ? void 0 : authMethod.applySecurityAuthentication(requestContext); + } + const defaultAuth = ((_a = _options == null ? void 0 : _options.authMethods) == null ? void 0 : _a.default) || ((_c = (_b = this.configuration) == null ? void 0 : _b.authMethods) == null ? void 0 : _c.default); + if (defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication) { + yield defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication(requestContext); + } + return requestContext; + }); + } + /** + * Version: 26.4.0.cl or later Validates a communication channel configuration to ensure it is properly set up and can receive events. - Use `channel_type` to specify the type of communication channel to validate (e.g., WEBHOOK). - Use `channel_identifier` to provide the unique identifier or name for the communication channel. - Use `event_type` to specify the event type to validate for this channel. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) or `DEVELOPER` (**Has developer privilege**) privilege. For webhook channels, users with `CAN_MANAGE_WEBHOOKS` (**Can manage webhooks**) privilege are also authorized to perform this action. + * @param validateCommunicationChannelRequest + */ + validateCommunicationChannel(validateCommunicationChannelRequest, _options) { + return __async(this, null, function* () { + var _a, _b, _c; + let _config = _options || this.configuration; + if (validateCommunicationChannelRequest === null || validateCommunicationChannelRequest === void 0) { + throw new RequiredError("ThoughtSpotRestApi", "validateCommunicationChannel", "validateCommunicationChannelRequest"); + } + const localVarPath = "/api/rest/2.0/system/communication-channels/validate"; + const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.25.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.25.0"); + const contentType = ObjectSerializer.getPreferredMediaType([ + "application/json" + ]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = ObjectSerializer.stringify( + ObjectSerializer.serialize(validateCommunicationChannelRequest, "ValidateCommunicationChannelRequest", ""), + contentType + ); + requestContext.setBody(serializedBody); + let authMethod; + authMethod = _config.authMethods["bearerAuth"]; + if (authMethod == null ? void 0 : authMethod.applySecurityAuthentication) { + yield authMethod == null ? void 0 : authMethod.applySecurityAuthentication(requestContext); + } + const defaultAuth = ((_a = _options == null ? void 0 : _options.authMethods) == null ? void 0 : _a.default) || ((_c = (_b = this.configuration) == null ? void 0 : _b.authMethods) == null ? void 0 : _c.default); + if (defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication) { + yield defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication(requestContext); + } + return requestContext; + }); + } + /** + * Version: 10.10.0.cl or later Validates the email customization configuration if any set for the ThoughtSpot system. #### Pre-requisites Requires `DEVELOPER` (**has developer privilege**) or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `DEVELOPER` (**Has developer privilege**) privilege is required. **NOTE**:This endpoint in currently in beta. Contact ThoughtSpot support to enable this on your instance. + */ + validateEmailCustomization(_options) { + return __async(this, null, function* () { + var _a, _b, _c; + let _config = _options || this.configuration; + const localVarPath = "/api/rest/2.0/customization/email/validate"; + const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.25.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.25.0"); + let authMethod; + authMethod = _config.authMethods["bearerAuth"]; + if (authMethod == null ? void 0 : authMethod.applySecurityAuthentication) { + yield authMethod == null ? void 0 : authMethod.applySecurityAuthentication(requestContext); + } + const defaultAuth = ((_a = _options == null ? void 0 : _options.authMethods) == null ? void 0 : _a.default) || ((_c = (_b = this.configuration) == null ? void 0 : _b.authMethods) == null ? void 0 : _c.default); + if (defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication) { + yield defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication(requestContext); + } + return requestContext; + }); + } + /** + * Version: 9.2.0.cl or later Validates the content of your source branch against the objects in your destination environment. Before merging content from your source branch to the destination branch, run this API operation from your destination environment and ensure that the changes from the source branch function in the destination environment. Requires `DATAMANAGEMENT` (**Can manage data**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance on your instance, the `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` (**Can manage data models**) privilege and edit access to the metadata objects. + * @param validateMergeRequest + */ + validateMerge(validateMergeRequest, _options) { + return __async(this, null, function* () { + var _a, _b, _c; + let _config = _options || this.configuration; + if (validateMergeRequest === null || validateMergeRequest === void 0) { + throw new RequiredError("ThoughtSpotRestApi", "validateMerge", "validateMergeRequest"); + } + const localVarPath = "/api/rest/2.0/vcs/git/branches/validate"; + const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.25.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.25.0"); + const contentType = ObjectSerializer.getPreferredMediaType([ + "application/json" + ]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = ObjectSerializer.stringify( + ObjectSerializer.serialize(validateMergeRequest, "ValidateMergeRequest", ""), + contentType + ); + requestContext.setBody(serializedBody); + let authMethod; + authMethod = _config.authMethods["bearerAuth"]; + if (authMethod == null ? void 0 : authMethod.applySecurityAuthentication) { + yield authMethod == null ? void 0 : authMethod.applySecurityAuthentication(requestContext); + } + const defaultAuth = ((_a = _options == null ? void 0 : _options.authMethods) == null ? void 0 : _a.default) || ((_c = (_b = this.configuration) == null ? void 0 : _b.authMethods) == null ? void 0 : _c.default); + if (defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication) { + yield defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication(requestContext); + } + return requestContext; + }); + } + /** + * Version: 9.12.0.cl or later Validates the authentication token specified in the API request. If your token is not valid, [Get a new token](#/http/api-endpoints/authentication/get-full-access-token). + * @param validateTokenRequest + */ + validateToken(validateTokenRequest, _options) { + return __async(this, null, function* () { + var _a, _b, _c; + let _config = _options || this.configuration; + if (validateTokenRequest === null || validateTokenRequest === void 0) { + throw new RequiredError("ThoughtSpotRestApi", "validateToken", "validateTokenRequest"); + } + const localVarPath = "/api/rest/2.0/auth/token/validate"; + const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.25.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.25.0"); + const contentType = ObjectSerializer.getPreferredMediaType([ + "application/json" + ]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = ObjectSerializer.stringify( + ObjectSerializer.serialize(validateTokenRequest, "ValidateTokenRequest", ""), + contentType + ); + requestContext.setBody(serializedBody); + let authMethod; + authMethod = _config.authMethods["bearerAuth"]; + if (authMethod == null ? void 0 : authMethod.applySecurityAuthentication) { + yield authMethod == null ? void 0 : authMethod.applySecurityAuthentication(requestContext); + } + const defaultAuth = ((_a = _options == null ? void 0 : _options.authMethods) == null ? void 0 : _a.default) || ((_c = (_b = this.configuration) == null ? void 0 : _b.authMethods) == null ? void 0 : _c.default); + if (defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication) { + yield defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication(requestContext); + } + return requestContext; + }); + } +}; +var ThoughtSpotRestApiResponseProcessor = class { + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to activateUser + * @throws ApiException if the response code was not in [200, 299] + */ + activateUser(response) { + return __async(this, null, function* () { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("200", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "User", + "" + ); + return body; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Invalid request.", body, response.headers); + } + if (isCodeInRange("401", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unexpected error", body, response.headers); + } + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "User", + "" + ); + return body; + } + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", yield response.getBodyAsAny(), response.headers); + }); + } + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to assignChangeAuthor + * @throws ApiException if the response code was not in [200, 299] + */ + assignChangeAuthor(response) { + return __async(this, null, function* () { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("204", response.httpStatusCode)) { + return; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Invalid request.", body, response.headers); + } + if (isCodeInRange("401", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unexpected error", body, response.headers); + } + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "void", + "" + ); + return body; + } + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", yield response.getBodyAsAny(), response.headers); + }); + } + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to assignTag + * @throws ApiException if the response code was not in [200, 299] + */ + assignTag(response) { + return __async(this, null, function* () { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("204", response.httpStatusCode)) { + return; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Invalid request.", body, response.headers); + } + if (isCodeInRange("401", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unexpected error", body, response.headers); + } + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "void", + "" + ); + return body; + } + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", yield response.getBodyAsAny(), response.headers); + }); + } + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to changeUserPassword + * @throws ApiException if the response code was not in [200, 299] + */ + changeUserPassword(response) { + return __async(this, null, function* () { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("204", response.httpStatusCode)) { + return; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Invalid request.", body, response.headers); + } + if (isCodeInRange("401", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unexpected error", body, response.headers); + } + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "void", + "" + ); + return body; + } + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", yield response.getBodyAsAny(), response.headers); + }); + } + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to commitBranch + * @throws ApiException if the response code was not in [200, 299] + */ + commitBranch(response) { + return __async(this, null, function* () { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("200", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "CommitResponse", + "" + ); + return body; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Invalid request.", body, response.headers); + } + if (isCodeInRange("401", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unexpected error", body, response.headers); + } + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "CommitResponse", + "" + ); + return body; + } + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", yield response.getBodyAsAny(), response.headers); + }); + } + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to configureAuthSettings + * @throws ApiException if the response code was not in [200, 299] + */ + configureAuthSettings(response) { + return __async(this, null, function* () { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("204", response.httpStatusCode)) { + return; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Invalid request.", body, response.headers); + } + if (isCodeInRange("401", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unexpected error", body, response.headers); + } + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "void", + "" + ); + return body; + } + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", yield response.getBodyAsAny(), response.headers); + }); + } + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to configureCommunicationChannelPreferences + * @throws ApiException if the response code was not in [200, 299] + */ + configureCommunicationChannelPreferences(response) { + return __async(this, null, function* () { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("204", response.httpStatusCode)) { + return; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Invalid request.", body, response.headers); + } + if (isCodeInRange("401", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unexpected error", body, response.headers); + } + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "void", + "" + ); + return body; + } + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", yield response.getBodyAsAny(), response.headers); + }); + } + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to configureSecuritySettings + * @throws ApiException if the response code was not in [200, 299] + */ + configureSecuritySettings(response) { + return __async(this, null, function* () { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("204", response.httpStatusCode)) { + return; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Invalid request.", body, response.headers); + } + if (isCodeInRange("401", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unexpected error", body, response.headers); + } + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "void", + "" + ); + return body; + } + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", yield response.getBodyAsAny(), response.headers); + }); + } + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to connectionConfigurationSearch + * @throws ApiException if the response code was not in [200, 299] + */ + connectionConfigurationSearch(response) { + return __async(this, null, function* () { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("200", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "Array", + "" + ); + return body; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Invalid request.", body, response.headers); + } + if (isCodeInRange("401", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unexpected error", body, response.headers); + } + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "Array", + "" + ); + return body; + } + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", yield response.getBodyAsAny(), response.headers); + }); + } + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to convertWorksheetToModel + * @throws ApiException if the response code was not in [200, 299] + */ + convertWorksheetToModel(response) { + return __async(this, null, function* () { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("200", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ResponseWorksheetToModelConversion", + "" + ); + return body; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Invalid request.", body, response.headers); + } + if (isCodeInRange("401", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unexpected error", body, response.headers); + } + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ResponseWorksheetToModelConversion", + "" + ); + return body; + } + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", yield response.getBodyAsAny(), response.headers); + }); + } + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to copyObject + * @throws ApiException if the response code was not in [200, 299] + */ + copyObject(response) { + return __async(this, null, function* () { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("200", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ResponseCopyObject", + "" + ); + return body; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Invalid request.", body, response.headers); + } + if (isCodeInRange("401", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } + if (isCodeInRange("404", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Object not found", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unexpected error", body, response.headers); + } + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ResponseCopyObject", + "" + ); + return body; + } + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", yield response.getBodyAsAny(), response.headers); + }); + } + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to createAgentConversation + * @throws ApiException if the response code was not in [200, 299] + */ + createAgentConversation(response) { + return __async(this, null, function* () { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("200", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "AgentConversation", + "" + ); + return body; + } + if (isCodeInRange("201", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "AgentConversation", + "" + ); + return body; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Operation failed", body, response.headers); + } + if (isCodeInRange("401", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Operation failed", body, response.headers); + } + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "AgentConversation", + "" + ); + return body; + } + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", yield response.getBodyAsAny(), response.headers); + }); + } + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to createCalendar + * @throws ApiException if the response code was not in [200, 299] + */ + createCalendar(response) { + return __async(this, null, function* () { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("200", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "CalendarResponse", + "" + ); + return body; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Invalid request.", body, response.headers); + } + if (isCodeInRange("401", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unexpected error", body, response.headers); + } + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "CalendarResponse", + "" + ); + return body; + } + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", yield response.getBodyAsAny(), response.headers); + }); + } + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to createCollection + * @throws ApiException if the response code was not in [200, 299] + */ + createCollection(response) { + return __async(this, null, function* () { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("200", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "Collection", + "" + ); + return body; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Invalid request.", body, response.headers); + } + if (isCodeInRange("401", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unexpected error", body, response.headers); + } + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "Collection", + "" + ); + return body; + } + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", yield response.getBodyAsAny(), response.headers); + }); + } + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to createConfig + * @throws ApiException if the response code was not in [200, 299] + */ + createConfig(response) { + return __async(this, null, function* () { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("200", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "RepoConfigObject", + "" + ); + return body; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Invalid request.", body, response.headers); + } + if (isCodeInRange("401", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unexpected error", body, response.headers); + } + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "RepoConfigObject", + "" + ); + return body; + } + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", yield response.getBodyAsAny(), response.headers); + }); + } + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to createConnection + * @throws ApiException if the response code was not in [200, 299] + */ + createConnection(response) { + return __async(this, null, function* () { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("200", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "CreateConnectionResponse", + "" + ); + return body; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Invalid request.", body, response.headers); + } + if (isCodeInRange("401", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unexpected error", body, response.headers); + } + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "CreateConnectionResponse", + "" + ); + return body; + } + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", yield response.getBodyAsAny(), response.headers); + }); + } + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to createConnectionConfiguration + * @throws ApiException if the response code was not in [200, 299] + */ + createConnectionConfiguration(response) { + return __async(this, null, function* () { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("200", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ConnectionConfigurationResponse", + "" + ); + return body; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Invalid request.", body, response.headers); + } + if (isCodeInRange("401", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unexpected error", body, response.headers); + } + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ConnectionConfigurationResponse", + "" + ); + return body; + } + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", yield response.getBodyAsAny(), response.headers); + }); + } + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to createConversation + * @throws ApiException if the response code was not in [200, 299] + */ + createConversation(response) { + return __async(this, null, function* () { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("200", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "Conversation", + "" + ); + return body; + } + if (isCodeInRange("201", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "Conversation", + "" + ); + return body; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Operation failed", body, response.headers); + } + if (isCodeInRange("401", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Operation failed", body, response.headers); + } + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "Conversation", + "" + ); + return body; + } + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", yield response.getBodyAsAny(), response.headers); + }); + } + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to createCustomAction + * @throws ApiException if the response code was not in [200, 299] + */ + createCustomAction(response) { + return __async(this, null, function* () { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("200", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ResponseCustomAction", + "" + ); + return body; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Invalid request.", body, response.headers); + } + if (isCodeInRange("401", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unexpected error", body, response.headers); + } + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ResponseCustomAction", + "" + ); + return body; + } + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", yield response.getBodyAsAny(), response.headers); + }); + } + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to createEmailCustomization + * @throws ApiException if the response code was not in [200, 299] + */ + createEmailCustomization(response) { + return __async(this, null, function* () { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("200", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "CreateEmailCustomizationResponse", + "" + ); + return body; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Invalid request.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unexpected error", body, response.headers); + } + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "CreateEmailCustomizationResponse", + "" + ); + return body; + } + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", yield response.getBodyAsAny(), response.headers); + }); + } + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to createOrg + * @throws ApiException if the response code was not in [200, 299] + */ + createOrg(response) { + return __async(this, null, function* () { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("200", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "OrgResponse", + "" + ); + return body; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Invalid request.", body, response.headers); + } + if (isCodeInRange("401", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unexpected error", body, response.headers); + } + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "OrgResponse", + "" + ); + return body; + } + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", yield response.getBodyAsAny(), response.headers); + }); + } + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to createRole + * @throws ApiException if the response code was not in [200, 299] + */ + createRole(response) { + return __async(this, null, function* () { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("200", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "RoleResponse", + "" + ); + return body; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Invalid parameters.", body, response.headers); + } + if (isCodeInRange("401", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Internal error", body, response.headers); + } + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "RoleResponse", + "" + ); + return body; + } + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", yield response.getBodyAsAny(), response.headers); + }); + } + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to createSchedule + * @throws ApiException if the response code was not in [200, 299] + */ + createSchedule(response) { + return __async(this, null, function* () { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("200", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ResponseSchedule", + "" + ); + return body; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Invalid request.", body, response.headers); + } + if (isCodeInRange("401", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unexpected error", body, response.headers); + } + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ResponseSchedule", + "" + ); + return body; + } + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", yield response.getBodyAsAny(), response.headers); + }); + } + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to createTag + * @throws ApiException if the response code was not in [200, 299] + */ + createTag(response) { + return __async(this, null, function* () { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("200", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "Tag", + "" + ); + return body; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Invalid request.", body, response.headers); + } + if (isCodeInRange("401", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unexpected error", body, response.headers); + } + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "Tag", + "" + ); + return body; + } + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", yield response.getBodyAsAny(), response.headers); + }); + } + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to createUser + * @throws ApiException if the response code was not in [200, 299] + */ + createUser(response) { + return __async(this, null, function* () { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("200", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "User", + "" + ); + return body; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Invalid request.", body, response.headers); + } + if (isCodeInRange("401", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unexpected error", body, response.headers); + } + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "User", + "" + ); + return body; + } + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", yield response.getBodyAsAny(), response.headers); + }); + } + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to createUserGroup + * @throws ApiException if the response code was not in [200, 299] + */ + createUserGroup(response) { + return __async(this, null, function* () { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("200", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "UserGroupResponse", + "" + ); + return body; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Invalid request.", body, response.headers); + } + if (isCodeInRange("401", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unexpected error", body, response.headers); + } + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "UserGroupResponse", + "" + ); + return body; + } + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", yield response.getBodyAsAny(), response.headers); + }); + } + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to createVariable + * @throws ApiException if the response code was not in [200, 299] + */ + createVariable(response) { + return __async(this, null, function* () { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("200", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "Variable", + "" + ); + return body; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Invalid request.", body, response.headers); + } + if (isCodeInRange("401", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unexpected error", body, response.headers); + } + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "Variable", + "" + ); + return body; + } + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", yield response.getBodyAsAny(), response.headers); + }); + } + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to createWebhookConfiguration + * @throws ApiException if the response code was not in [200, 299] + */ + createWebhookConfiguration(response) { + return __async(this, null, function* () { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("200", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "WebhookResponse", + "" + ); + return body; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Invalid request.", body, response.headers); + } + if (isCodeInRange("401", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unexpected error", body, response.headers); + } + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "WebhookResponse", + "" + ); + return body; + } + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", yield response.getBodyAsAny(), response.headers); + }); + } + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to dbtConnection + * @throws ApiException if the response code was not in [200, 299] + */ + dbtConnection(response) { + return __async(this, null, function* () { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("200", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "any", + "" + ); + return body; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Invalid request.", body, response.headers); + } + if (isCodeInRange("401", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unexpected error", body, response.headers); + } + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "any", + "" + ); + return body; + } + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", yield response.getBodyAsAny(), response.headers); + }); + } + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to dbtGenerateSyncTml + * @throws ApiException if the response code was not in [200, 299] + */ + dbtGenerateSyncTml(response) { + return __async(this, null, function* () { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("200", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "any", + "" + ); + return body; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Invalid request.", body, response.headers); + } + if (isCodeInRange("401", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unexpected error", body, response.headers); + } + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "any", + "" + ); + return body; + } + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", yield response.getBodyAsAny(), response.headers); + }); + } + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to dbtGenerateTml + * @throws ApiException if the response code was not in [200, 299] + */ + dbtGenerateTml(response) { + return __async(this, null, function* () { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("200", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "any", + "" + ); + return body; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Invalid request.", body, response.headers); + } + if (isCodeInRange("401", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unexpected error", body, response.headers); + } + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "any", + "" + ); + return body; + } + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", yield response.getBodyAsAny(), response.headers); + }); + } + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to dbtSearch + * @throws ApiException if the response code was not in [200, 299] + */ + dbtSearch(response) { + return __async(this, null, function* () { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("200", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "Array", + "" + ); + return body; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Invalid request.", body, response.headers); + } + if (isCodeInRange("401", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unexpected error", body, response.headers); + } + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "Array", + "" + ); + return body; + } + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", yield response.getBodyAsAny(), response.headers); + }); + } + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to deactivateUser + * @throws ApiException if the response code was not in [200, 299] + */ + deactivateUser(response) { + return __async(this, null, function* () { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("200", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ResponseActivationURL", + "" + ); + return body; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Invalid request.", body, response.headers); + } + if (isCodeInRange("401", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unexpected error", body, response.headers); + } + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ResponseActivationURL", + "" + ); + return body; + } + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", yield response.getBodyAsAny(), response.headers); + }); + } + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to deleteCalendar + * @throws ApiException if the response code was not in [200, 299] + */ + deleteCalendar(response) { + return __async(this, null, function* () { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("204", response.httpStatusCode)) { + return; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Invalid request.", body, response.headers); + } + if (isCodeInRange("401", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unexpected error", body, response.headers); + } + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "void", + "" + ); + return body; + } + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", yield response.getBodyAsAny(), response.headers); + }); + } + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to deleteCollection + * @throws ApiException if the response code was not in [200, 299] + */ + deleteCollection(response) { + return __async(this, null, function* () { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("200", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "CollectionDeleteResponse", + "" + ); + return body; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Invalid request.", body, response.headers); + } + if (isCodeInRange("401", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } + if (isCodeInRange("404", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Resource not found.", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unexpected error", body, response.headers); + } + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "CollectionDeleteResponse", + "" + ); + return body; + } + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", yield response.getBodyAsAny(), response.headers); + }); + } + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to deleteConfig + * @throws ApiException if the response code was not in [200, 299] + */ + deleteConfig(response) { + return __async(this, null, function* () { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("204", response.httpStatusCode)) { + return; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Invalid request.", body, response.headers); + } + if (isCodeInRange("401", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unexpected error", body, response.headers); + } + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "void", + "" + ); + return body; + } + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", yield response.getBodyAsAny(), response.headers); + }); + } + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to deleteConnection + * @throws ApiException if the response code was not in [200, 299] + */ + deleteConnection(response) { + return __async(this, null, function* () { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("204", response.httpStatusCode)) { + return; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Invalid request.", body, response.headers); + } + if (isCodeInRange("401", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unexpected error", body, response.headers); + } + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "void", + "" + ); + return body; + } + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", yield response.getBodyAsAny(), response.headers); + }); + } + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to deleteConnectionConfiguration + * @throws ApiException if the response code was not in [200, 299] + */ + deleteConnectionConfiguration(response) { + return __async(this, null, function* () { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("204", response.httpStatusCode)) { + return; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Invalid request.", body, response.headers); + } + if (isCodeInRange("401", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unexpected error", body, response.headers); + } + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "void", + "" + ); + return body; + } + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", yield response.getBodyAsAny(), response.headers); + }); + } + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to deleteConnectionV2 + * @throws ApiException if the response code was not in [200, 299] + */ + deleteConnectionV2(response) { + return __async(this, null, function* () { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("204", response.httpStatusCode)) { + return; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Invalid request.", body, response.headers); + } + if (isCodeInRange("401", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unexpected error", body, response.headers); + } + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "void", + "" + ); + return body; + } + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", yield response.getBodyAsAny(), response.headers); + }); + } + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to deleteCustomAction + * @throws ApiException if the response code was not in [200, 299] + */ + deleteCustomAction(response) { + return __async(this, null, function* () { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("204", response.httpStatusCode)) { + return; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Invalid request.", body, response.headers); + } + if (isCodeInRange("401", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unexpected error", body, response.headers); + } + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "void", + "" + ); + return body; + } + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", yield response.getBodyAsAny(), response.headers); + }); + } + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to deleteDbtConnection + * @throws ApiException if the response code was not in [200, 299] + */ + deleteDbtConnection(response) { + return __async(this, null, function* () { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("204", response.httpStatusCode)) { + return; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Invalid request.", body, response.headers); + } + if (isCodeInRange("401", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unexpected error", body, response.headers); + } + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "void", + "" + ); + return body; + } + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", yield response.getBodyAsAny(), response.headers); + }); + } + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to deleteEmailCustomization + * @throws ApiException if the response code was not in [200, 299] + */ + deleteEmailCustomization(response) { + return __async(this, null, function* () { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("204", response.httpStatusCode)) { + return; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Invalid request.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unexpected error", body, response.headers); + } + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "void", + "" + ); + return body; + } + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", yield response.getBodyAsAny(), response.headers); + }); + } + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to deleteMetadata + * @throws ApiException if the response code was not in [200, 299] + */ + deleteMetadata(response) { + return __async(this, null, function* () { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("204", response.httpStatusCode)) { + return; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Invalid request.", body, response.headers); + } + if (isCodeInRange("401", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unexpected error", body, response.headers); + } + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "void", + "" + ); + return body; + } + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", yield response.getBodyAsAny(), response.headers); + }); + } + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to deleteOrg + * @throws ApiException if the response code was not in [200, 299] + */ + deleteOrg(response) { + return __async(this, null, function* () { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("204", response.httpStatusCode)) { + return; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Invalid request.", body, response.headers); + } + if (isCodeInRange("401", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unexpected error", body, response.headers); + } + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "void", + "" + ); + return body; + } + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", yield response.getBodyAsAny(), response.headers); + }); + } + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to deleteOrgEmailCustomization + * @throws ApiException if the response code was not in [200, 299] + */ + deleteOrgEmailCustomization(response) { + return __async(this, null, function* () { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("204", response.httpStatusCode)) { + return; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Invalid request.", body, response.headers); + } + if (isCodeInRange("401", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unexpected error", body, response.headers); + } + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "void", + "" + ); + return body; + } + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", yield response.getBodyAsAny(), response.headers); + }); + } + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to deleteRole + * @throws ApiException if the response code was not in [200, 299] + */ + deleteRole(response) { + return __async(this, null, function* () { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("204", response.httpStatusCode)) { + return; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Invalid request.", body, response.headers); + } + if (isCodeInRange("401", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Internal error", body, response.headers); + } + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "void", + "" + ); + return body; + } + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", yield response.getBodyAsAny(), response.headers); + }); + } + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to deleteSchedule + * @throws ApiException if the response code was not in [200, 299] + */ + deleteSchedule(response) { + return __async(this, null, function* () { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("204", response.httpStatusCode)) { + return; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Invalid request.", body, response.headers); + } + if (isCodeInRange("401", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unexpected error", body, response.headers); + } + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "void", + "" + ); + return body; + } + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", yield response.getBodyAsAny(), response.headers); + }); + } + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to deleteTag + * @throws ApiException if the response code was not in [200, 299] + */ + deleteTag(response) { + return __async(this, null, function* () { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("204", response.httpStatusCode)) { + return; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Invalid request.", body, response.headers); + } + if (isCodeInRange("401", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unexpected error", body, response.headers); + } + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "void", + "" + ); + return body; + } + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", yield response.getBodyAsAny(), response.headers); + }); + } + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to deleteUser + * @throws ApiException if the response code was not in [200, 299] + */ + deleteUser(response) { + return __async(this, null, function* () { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("204", response.httpStatusCode)) { + return; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Invalid request.", body, response.headers); + } + if (isCodeInRange("401", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unexpected error", body, response.headers); + } + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "void", + "" + ); + return body; + } + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", yield response.getBodyAsAny(), response.headers); + }); + } + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to deleteUserGroup + * @throws ApiException if the response code was not in [200, 299] + */ + deleteUserGroup(response) { + return __async(this, null, function* () { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("204", response.httpStatusCode)) { + return; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Invalid request.", body, response.headers); + } + if (isCodeInRange("401", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unexpected error", body, response.headers); + } + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "void", + "" + ); + return body; + } + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", yield response.getBodyAsAny(), response.headers); + }); + } + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to deleteVariable + * @throws ApiException if the response code was not in [200, 299] + */ + deleteVariable(response) { + return __async(this, null, function* () { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("204", response.httpStatusCode)) { + return; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Invalid request.", body, response.headers); + } + if (isCodeInRange("401", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unexpected error", body, response.headers); + } + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "void", + "" + ); + return body; + } + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", yield response.getBodyAsAny(), response.headers); + }); + } + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to deleteVariables + * @throws ApiException if the response code was not in [200, 299] + */ + deleteVariables(response) { + return __async(this, null, function* () { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("204", response.httpStatusCode)) { + return; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Invalid request.", body, response.headers); + } + if (isCodeInRange("401", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unexpected error", body, response.headers); + } + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "void", + "" + ); + return body; + } + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", yield response.getBodyAsAny(), response.headers); + }); + } + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to deleteWebhookConfigurations + * @throws ApiException if the response code was not in [200, 299] + */ + deleteWebhookConfigurations(response) { + return __async(this, null, function* () { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("200", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "WebhookDeleteResponse", + "" + ); + return body; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Invalid request.", body, response.headers); + } + if (isCodeInRange("401", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unexpected error", body, response.headers); + } + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "WebhookDeleteResponse", + "" + ); + return body; + } + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", yield response.getBodyAsAny(), response.headers); + }); + } + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to deployCommit + * @throws ApiException if the response code was not in [200, 299] + */ + deployCommit(response) { + return __async(this, null, function* () { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("200", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "Array", + "" + ); + return body; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Invalid request.", body, response.headers); + } + if (isCodeInRange("401", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unexpected error", body, response.headers); + } + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "Array", + "" + ); + return body; + } + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", yield response.getBodyAsAny(), response.headers); + }); + } + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to downloadConnectionMetadataChanges + * @throws ApiException if the response code was not in [200, 299] + */ + downloadConnectionMetadataChanges(response) { + return __async(this, null, function* () { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("200", response.httpStatusCode)) { + const body = yield response.getBodyAsFile(); + return body; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "binary" + ); + throw new ApiException(response.httpStatusCode, "Invalid request.", body, response.headers); + } + if (isCodeInRange("401", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "binary" + ); + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "binary" + ); + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "binary" + ); + throw new ApiException(response.httpStatusCode, "Unexpected error", body, response.headers); + } + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "HttpFile", + "binary" + ); + return body; + } + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", yield response.getBodyAsAny(), response.headers); + }); + } + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to exportAnswerReport + * @throws ApiException if the response code was not in [200, 299] + */ + exportAnswerReport(response) { + return __async(this, null, function* () { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("200", response.httpStatusCode)) { + const body = yield response.getBodyAsFile(); + return body; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "binary" + ); + throw new ApiException(response.httpStatusCode, "Invalid request.", body, response.headers); + } + if (isCodeInRange("401", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "binary" + ); + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "binary" + ); + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "binary" + ); + throw new ApiException(response.httpStatusCode, "Unexpected error", body, response.headers); + } + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "HttpFile", + "binary" + ); + return body; + } + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", yield response.getBodyAsAny(), response.headers); + }); + } + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to exportLiveboardReport + * @throws ApiException if the response code was not in [200, 299] + */ + exportLiveboardReport(response) { + return __async(this, null, function* () { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("200", response.httpStatusCode)) { + const body = yield response.getBodyAsFile(); + return body; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "binary" + ); + throw new ApiException(response.httpStatusCode, "Invalid request.", body, response.headers); + } + if (isCodeInRange("401", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "binary" + ); + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "binary" + ); + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "binary" + ); + throw new ApiException(response.httpStatusCode, "Unexpected error", body, response.headers); + } + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "HttpFile", + "binary" + ); + return body; + } + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", yield response.getBodyAsAny(), response.headers); + }); + } + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to exportMetadataTML + * @throws ApiException if the response code was not in [200, 299] + */ + exportMetadataTML(response) { + return __async(this, null, function* () { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("200", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "Array", + "" + ); + return body; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Invalid request.", body, response.headers); + } + if (isCodeInRange("401", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unexpected error", body, response.headers); + } + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "Array", + "" + ); + return body; + } + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", yield response.getBodyAsAny(), response.headers); + }); + } + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to exportMetadataTMLBatched + * @throws ApiException if the response code was not in [200, 299] + */ + exportMetadataTMLBatched(response) { + return __async(this, null, function* () { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("200", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "any", + "" + ); + return body; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Invalid request.", body, response.headers); + } + if (isCodeInRange("401", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unexpected error", body, response.headers); + } + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "any", + "" + ); + return body; + } + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", yield response.getBodyAsAny(), response.headers); + }); + } + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to fetchAnswerData + * @throws ApiException if the response code was not in [200, 299] + */ + fetchAnswerData(response) { + return __async(this, null, function* () { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("200", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "AnswerDataResponse", + "" + ); + return body; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Invalid request.", body, response.headers); + } + if (isCodeInRange("401", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unexpected error", body, response.headers); + } + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "AnswerDataResponse", + "" + ); + return body; + } + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", yield response.getBodyAsAny(), response.headers); + }); + } + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to fetchAnswerSqlQuery + * @throws ApiException if the response code was not in [200, 299] + */ + fetchAnswerSqlQuery(response) { + return __async(this, null, function* () { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("200", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "SqlQueryResponse", + "" + ); + return body; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Invalid request.", body, response.headers); + } + if (isCodeInRange("401", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unexpected error", body, response.headers); + } + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "SqlQueryResponse", + "" + ); + return body; + } + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", yield response.getBodyAsAny(), response.headers); + }); + } + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to fetchAsyncImportTaskStatus + * @throws ApiException if the response code was not in [200, 299] + */ + fetchAsyncImportTaskStatus(response) { + return __async(this, null, function* () { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("200", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "GetAsyncImportStatusResponse", + "" + ); + return body; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Invalid request.", body, response.headers); + } + if (isCodeInRange("401", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unexpected error", body, response.headers); + } + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "GetAsyncImportStatusResponse", + "" + ); + return body; + } + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", yield response.getBodyAsAny(), response.headers); + }); + } + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to fetchColumnSecurityRules + * @throws ApiException if the response code was not in [200, 299] + */ + fetchColumnSecurityRules(response) { + return __async(this, null, function* () { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("200", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "Array", + "" + ); + return body; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Bad request - Table not found or invalid parameters", body, response.headers); + } + if (isCodeInRange("401", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Forbidden - User doesn't have permission to access security rules for this table", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Internal server error", body, response.headers); + } + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "Array", + "" + ); + return body; + } + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", yield response.getBodyAsAny(), response.headers); + }); + } + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to fetchConnectionDiffStatus + * @throws ApiException if the response code was not in [200, 299] + */ + fetchConnectionDiffStatus(response) { + return __async(this, null, function* () { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("200", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "FetchConnectionDiffStatusResponse", + "" + ); + return body; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Invalid request.", body, response.headers); + } + if (isCodeInRange("401", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unexpected error", body, response.headers); + } + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "FetchConnectionDiffStatusResponse", + "" + ); + return body; + } + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", yield response.getBodyAsAny(), response.headers); + }); + } + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to fetchLiveboardData + * @throws ApiException if the response code was not in [200, 299] + */ + fetchLiveboardData(response) { + return __async(this, null, function* () { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("200", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "LiveboardDataResponse", + "" + ); + return body; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Invalid request.", body, response.headers); + } + if (isCodeInRange("401", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unexpected error", body, response.headers); + } + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "LiveboardDataResponse", + "" + ); + return body; + } + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", yield response.getBodyAsAny(), response.headers); + }); + } + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to fetchLiveboardSqlQuery + * @throws ApiException if the response code was not in [200, 299] + */ + fetchLiveboardSqlQuery(response) { + return __async(this, null, function* () { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("200", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "SqlQueryResponse", + "" + ); + return body; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Invalid request.", body, response.headers); + } + if (isCodeInRange("401", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unexpected error", body, response.headers); + } + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "SqlQueryResponse", + "" + ); + return body; + } + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", yield response.getBodyAsAny(), response.headers); + }); + } + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to fetchLogs + * @throws ApiException if the response code was not in [200, 299] + */ + fetchLogs(response) { + return __async(this, null, function* () { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("200", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "Array", + "" + ); + return body; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Invalid request.", body, response.headers); + } + if (isCodeInRange("401", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unexpected error", body, response.headers); + } + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "Array", + "" + ); + return body; + } + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", yield response.getBodyAsAny(), response.headers); + }); + } + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to fetchObjectPrivileges + * @throws ApiException if the response code was not in [200, 299] + */ + fetchObjectPrivileges(response) { + return __async(this, null, function* () { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("200", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ObjectPrivilegesOfMetadataResponse", + "" + ); + return body; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Invalid request.", body, response.headers); + } + if (isCodeInRange("401", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unexpected error", body, response.headers); + } + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ObjectPrivilegesOfMetadataResponse", + "" + ); + return body; + } + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", yield response.getBodyAsAny(), response.headers); + }); + } + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to fetchPermissionsOfPrincipals + * @throws ApiException if the response code was not in [200, 299] + */ + fetchPermissionsOfPrincipals(response) { + return __async(this, null, function* () { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("200", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "PermissionOfPrincipalsResponse", + "" + ); + return body; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Invalid request.", body, response.headers); + } + if (isCodeInRange("401", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unexpected error", body, response.headers); + } + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "PermissionOfPrincipalsResponse", + "" + ); + return body; + } + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", yield response.getBodyAsAny(), response.headers); + }); + } + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to fetchPermissionsOnMetadata + * @throws ApiException if the response code was not in [200, 299] + */ + fetchPermissionsOnMetadata(response) { + return __async(this, null, function* () { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("200", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "PermissionOfMetadataResponse", + "" + ); + return body; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Invalid request.", body, response.headers); + } + if (isCodeInRange("401", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unexpected error", body, response.headers); + } + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "PermissionOfMetadataResponse", + "" + ); + return body; + } + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", yield response.getBodyAsAny(), response.headers); + }); + } + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to forceLogoutUsers + * @throws ApiException if the response code was not in [200, 299] + */ + forceLogoutUsers(response) { + return __async(this, null, function* () { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("204", response.httpStatusCode)) { + return; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Invalid request.", body, response.headers); + } + if (isCodeInRange("401", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unexpected error", body, response.headers); + } + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "void", + "" + ); + return body; + } + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", yield response.getBodyAsAny(), response.headers); + }); + } + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to generateCSV + * @throws ApiException if the response code was not in [200, 299] + */ + generateCSV(response) { + return __async(this, null, function* () { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("200", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "any", + "" + ); + return body; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Invalid request.", body, response.headers); + } + if (isCodeInRange("401", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unexpected error", body, response.headers); + } + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "any", + "" + ); + return body; + } + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", yield response.getBodyAsAny(), response.headers); + }); + } + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to getCurrentUserInfo + * @throws ApiException if the response code was not in [200, 299] + */ + getCurrentUserInfo(response) { + return __async(this, null, function* () { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("200", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "User", + "" + ); + return body; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Invalid request.", body, response.headers); + } + if (isCodeInRange("401", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unexpected error", body, response.headers); + } + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "User", + "" + ); + return body; + } + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", yield response.getBodyAsAny(), response.headers); + }); + } + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to getCurrentUserToken + * @throws ApiException if the response code was not in [200, 299] + */ + getCurrentUserToken(response) { + return __async(this, null, function* () { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("200", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "GetTokenResponse", + "" + ); + return body; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Invalid request.", body, response.headers); + } + if (isCodeInRange("401", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unexpected error", body, response.headers); + } + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "GetTokenResponse", + "" + ); + return body; + } + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", yield response.getBodyAsAny(), response.headers); + }); + } + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to getCustomAccessToken + * @throws ApiException if the response code was not in [200, 299] + */ + getCustomAccessToken(response) { + return __async(this, null, function* () { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("200", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "AccessToken", + "" + ); + return body; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Invalid request. This could be due to missing or incorrect parameters.", body, response.headers); + } + if (isCodeInRange("401", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unauthorized access. The request could not be authenticated.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Forbidden access. The user does not have permission to access this resource.", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "An unexpected error occurred on the server.", body, response.headers); + } + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "AccessToken", + "" + ); + return body; + } + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", yield response.getBodyAsAny(), response.headers); + }); + } + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to getDataSourceSuggestions + * @throws ApiException if the response code was not in [200, 299] + */ + getDataSourceSuggestions(response) { + return __async(this, null, function* () { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("200", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "EurekaDataSourceSuggestionResponse", + "" + ); + return body; + } + if (isCodeInRange("201", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "EurekaDataSourceSuggestionResponse", + "" + ); + return body; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Operation failed", body, response.headers); + } + if (isCodeInRange("401", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Operation failed", body, response.headers); + } + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "EurekaDataSourceSuggestionResponse", + "" + ); + return body; + } + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", yield response.getBodyAsAny(), response.headers); + }); + } + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to getFullAccessToken + * @throws ApiException if the response code was not in [200, 299] + */ + getFullAccessToken(response) { + return __async(this, null, function* () { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("200", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "Token", + "" + ); + return body; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Invalid request.", body, response.headers); + } + if (isCodeInRange("401", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unexpected error", body, response.headers); + } + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "Token", + "" + ); + return body; + } + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", yield response.getBodyAsAny(), response.headers); + }); + } + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to getNLInstructions + * @throws ApiException if the response code was not in [200, 299] + */ + getNLInstructions(response) { + return __async(this, null, function* () { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("200", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "EurekaGetNLInstructionsResponse", + "" + ); + return body; + } + if (isCodeInRange("201", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "EurekaGetNLInstructionsResponse", + "" + ); + return body; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Operation failed", body, response.headers); + } + if (isCodeInRange("401", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Operation failed", body, response.headers); + } + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "EurekaGetNLInstructionsResponse", + "" + ); + return body; + } + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", yield response.getBodyAsAny(), response.headers); + }); + } + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to getObjectAccessToken + * @throws ApiException if the response code was not in [200, 299] + */ + getObjectAccessToken(response) { + return __async(this, null, function* () { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("200", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "Token", + "" + ); + return body; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Invalid request.", body, response.headers); + } + if (isCodeInRange("401", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unexpected error", body, response.headers); + } + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "Token", + "" + ); + return body; + } + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", yield response.getBodyAsAny(), response.headers); + }); + } + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to getRelevantQuestions + * @throws ApiException if the response code was not in [200, 299] + */ + getRelevantQuestions(response) { + return __async(this, null, function* () { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("200", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "EurekaGetRelevantQuestionsResponse", + "" + ); + return body; + } + if (isCodeInRange("201", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "EurekaGetRelevantQuestionsResponse", + "" + ); + return body; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Operation failed", body, response.headers); + } + if (isCodeInRange("401", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Operation failed", body, response.headers); + } + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "EurekaGetRelevantQuestionsResponse", + "" + ); + return body; + } + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", yield response.getBodyAsAny(), response.headers); + }); + } + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to getSystemConfig + * @throws ApiException if the response code was not in [200, 299] + */ + getSystemConfig(response) { + return __async(this, null, function* () { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("200", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "SystemConfig", + "" + ); + return body; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Invalid request.", body, response.headers); + } + if (isCodeInRange("401", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unexpected error", body, response.headers); + } + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "SystemConfig", + "" + ); + return body; + } + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", yield response.getBodyAsAny(), response.headers); + }); + } + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to getSystemInformation + * @throws ApiException if the response code was not in [200, 299] + */ + getSystemInformation(response) { + return __async(this, null, function* () { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("200", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "SystemInfo", + "" + ); + return body; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Invalid request.", body, response.headers); + } + if (isCodeInRange("401", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unexpected error", body, response.headers); + } + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "SystemInfo", + "" + ); + return body; + } + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", yield response.getBodyAsAny(), response.headers); + }); + } + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to getSystemOverrideInfo + * @throws ApiException if the response code was not in [200, 299] + */ + getSystemOverrideInfo(response) { + return __async(this, null, function* () { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("200", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "SystemOverrideInfo", + "" + ); + return body; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Invalid request.", body, response.headers); + } + if (isCodeInRange("401", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unexpected error", body, response.headers); + } + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "SystemOverrideInfo", + "" + ); + return body; + } + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", yield response.getBodyAsAny(), response.headers); + }); + } + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to importMetadataTML + * @throws ApiException if the response code was not in [200, 299] + */ + importMetadataTML(response) { + return __async(this, null, function* () { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("200", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "Array", + "" + ); + return body; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Invalid request.", body, response.headers); + } + if (isCodeInRange("401", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unexpected error", body, response.headers); + } + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "Array", + "" + ); + return body; + } + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", yield response.getBodyAsAny(), response.headers); + }); + } + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to importMetadataTMLAsync + * @throws ApiException if the response code was not in [200, 299] + */ + importMetadataTMLAsync(response) { + return __async(this, null, function* () { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("200", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ImportEPackAsyncTaskStatus", + "" + ); + return body; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Invalid request.", body, response.headers); + } + if (isCodeInRange("401", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unexpected error", body, response.headers); + } + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ImportEPackAsyncTaskStatus", + "" + ); + return body; + } + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", yield response.getBodyAsAny(), response.headers); + }); + } + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to importUserGroups + * @throws ApiException if the response code was not in [200, 299] + */ + importUserGroups(response) { + return __async(this, null, function* () { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("200", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ImportUserGroupsResponse", + "" + ); + return body; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Invalid request.", body, response.headers); + } + if (isCodeInRange("401", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unexpected error", body, response.headers); + } + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ImportUserGroupsResponse", + "" + ); + return body; + } + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", yield response.getBodyAsAny(), response.headers); + }); + } + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to importUsers + * @throws ApiException if the response code was not in [200, 299] + */ + importUsers(response) { + return __async(this, null, function* () { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("200", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ImportUsersResponse", + "" + ); + return body; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Invalid request.", body, response.headers); + } + if (isCodeInRange("401", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unexpected error", body, response.headers); + } + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ImportUsersResponse", + "" + ); + return body; + } + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", yield response.getBodyAsAny(), response.headers); + }); + } + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to login + * @throws ApiException if the response code was not in [200, 299] + */ + login(response) { + return __async(this, null, function* () { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("204", response.httpStatusCode)) { + return; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Invalid request.", body, response.headers); + } + if (isCodeInRange("401", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unexpected error", body, response.headers); + } + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "void", + "" + ); + return body; + } + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", yield response.getBodyAsAny(), response.headers); + }); + } + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to logout + * @throws ApiException if the response code was not in [200, 299] + */ + logout(response) { + return __async(this, null, function* () { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("204", response.httpStatusCode)) { + return; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Invalid request.", body, response.headers); + } + if (isCodeInRange("401", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unexpected error", body, response.headers); + } + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "void", + "" + ); + return body; + } + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", yield response.getBodyAsAny(), response.headers); + }); + } + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to manageObjectPrivilege + * @throws ApiException if the response code was not in [200, 299] + */ + manageObjectPrivilege(response) { + return __async(this, null, function* () { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("204", response.httpStatusCode)) { + return; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Invalid request", body, response.headers); + } + if (isCodeInRange("401", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unauthorized access", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Forbidden access", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unexpected error", body, response.headers); + } + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "void", + "" + ); + return body; + } + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", yield response.getBodyAsAny(), response.headers); + }); + } + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to parameterizeMetadata + * @throws ApiException if the response code was not in [200, 299] + */ + parameterizeMetadata(response) { + return __async(this, null, function* () { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("204", response.httpStatusCode)) { + return; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Invalid request.", body, response.headers); + } + if (isCodeInRange("401", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unexpected error", body, response.headers); + } + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "void", + "" + ); + return body; + } + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", yield response.getBodyAsAny(), response.headers); + }); + } + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to parameterizeMetadataFields + * @throws ApiException if the response code was not in [200, 299] + */ + parameterizeMetadataFields(response) { + return __async(this, null, function* () { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("204", response.httpStatusCode)) { + return; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Invalid request.", body, response.headers); + } + if (isCodeInRange("401", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unexpected error", body, response.headers); + } + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "void", + "" + ); + return body; + } + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", yield response.getBodyAsAny(), response.headers); + }); + } + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to publishMetadata + * @throws ApiException if the response code was not in [200, 299] + */ + publishMetadata(response) { + return __async(this, null, function* () { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("204", response.httpStatusCode)) { + return; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Invalid request.", body, response.headers); + } + if (isCodeInRange("401", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unexpected error", body, response.headers); + } + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "void", + "" + ); + return body; + } + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", yield response.getBodyAsAny(), response.headers); + }); + } + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to putVariableValues + * @throws ApiException if the response code was not in [200, 299] + */ + putVariableValues(response) { + return __async(this, null, function* () { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("204", response.httpStatusCode)) { + return; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Invalid request.", body, response.headers); + } + if (isCodeInRange("401", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unexpected error", body, response.headers); + } + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "void", + "" + ); + return body; + } + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", yield response.getBodyAsAny(), response.headers); + }); + } + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to queryGetDecomposedQuery + * @throws ApiException if the response code was not in [200, 299] + */ + queryGetDecomposedQuery(response) { + return __async(this, null, function* () { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("200", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "EurekaDecomposeQueryResponse", + "" + ); + return body; + } + if (isCodeInRange("201", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "EurekaDecomposeQueryResponse", + "" + ); + return body; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Operation failed", body, response.headers); + } + if (isCodeInRange("401", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Operation failed", body, response.headers); + } + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "EurekaDecomposeQueryResponse", + "" + ); + return body; + } + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", yield response.getBodyAsAny(), response.headers); + }); + } + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to resetUserPassword + * @throws ApiException if the response code was not in [200, 299] + */ + resetUserPassword(response) { + return __async(this, null, function* () { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("204", response.httpStatusCode)) { + return; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Invalid request.", body, response.headers); + } + if (isCodeInRange("401", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unexpected error", body, response.headers); + } + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "void", + "" + ); + return body; + } + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", yield response.getBodyAsAny(), response.headers); + }); + } + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to revertCommit + * @throws ApiException if the response code was not in [200, 299] + */ + revertCommit(response) { + return __async(this, null, function* () { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("200", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "RevertResponse", + "" + ); + return body; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Invalid request.", body, response.headers); + } + if (isCodeInRange("401", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unexpected error", body, response.headers); + } + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "RevertResponse", + "" + ); + return body; + } + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", yield response.getBodyAsAny(), response.headers); + }); + } + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to revokeRefreshTokens + * @throws ApiException if the response code was not in [200, 299] + */ + revokeRefreshTokens(response) { + return __async(this, null, function* () { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("200", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "RevokeRefreshTokensResponse", + "" + ); + return body; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Invalid request.", body, response.headers); + } + if (isCodeInRange("401", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } + if (isCodeInRange("404", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Object not found", body, response.headers); + } + if (isCodeInRange("409", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Conflict", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unexpected error", body, response.headers); + } + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "RevokeRefreshTokensResponse", + "" + ); + return body; + } + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", yield response.getBodyAsAny(), response.headers); + }); + } + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to revokeToken + * @throws ApiException if the response code was not in [200, 299] + */ + revokeToken(response) { + return __async(this, null, function* () { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("204", response.httpStatusCode)) { + return; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Invalid request.", body, response.headers); + } + if (isCodeInRange("401", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unexpected error", body, response.headers); + } + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "void", + "" + ); + return body; + } + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", yield response.getBodyAsAny(), response.headers); + }); + } + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to searchAuthSettings + * @throws ApiException if the response code was not in [200, 299] + */ + searchAuthSettings(response) { + return __async(this, null, function* () { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("200", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "SearchAuthSettingsResponse", + "" + ); + return body; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Invalid request.", body, response.headers); + } + if (isCodeInRange("401", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unexpected error", body, response.headers); + } + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "SearchAuthSettingsResponse", + "" + ); + return body; + } + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", yield response.getBodyAsAny(), response.headers); + }); + } + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to searchCalendars + * @throws ApiException if the response code was not in [200, 299] + */ + searchCalendars(response) { + return __async(this, null, function* () { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("200", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "Array", + "" + ); + return body; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Invalid request.", body, response.headers); + } + if (isCodeInRange("401", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unexpected error", body, response.headers); + } + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "Array", + "" + ); + return body; + } + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", yield response.getBodyAsAny(), response.headers); + }); + } + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to searchChannelHistory + * @throws ApiException if the response code was not in [200, 299] + */ + searchChannelHistory(response) { + return __async(this, null, function* () { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("200", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "SearchChannelHistoryResponse", + "" + ); + return body; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Invalid request.", body, response.headers); + } + if (isCodeInRange("401", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unexpected error", body, response.headers); + } + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "SearchChannelHistoryResponse", + "" + ); + return body; + } + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", yield response.getBodyAsAny(), response.headers); + }); + } + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to searchCollections + * @throws ApiException if the response code was not in [200, 299] + */ + searchCollections(response) { + return __async(this, null, function* () { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("200", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "CollectionSearchResponse", + "" + ); + return body; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Invalid request.", body, response.headers); + } + if (isCodeInRange("401", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unexpected error", body, response.headers); + } + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "CollectionSearchResponse", + "" + ); + return body; + } + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", yield response.getBodyAsAny(), response.headers); + }); + } + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to searchCommits + * @throws ApiException if the response code was not in [200, 299] + */ + searchCommits(response) { + return __async(this, null, function* () { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("200", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "Array", + "" + ); + return body; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Invalid request.", body, response.headers); + } + if (isCodeInRange("401", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unexpected error", body, response.headers); + } + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "Array", + "" + ); + return body; + } + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", yield response.getBodyAsAny(), response.headers); + }); + } + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to searchCommunicationChannelPreferences + * @throws ApiException if the response code was not in [200, 299] + */ + searchCommunicationChannelPreferences(response) { + return __async(this, null, function* () { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("200", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "CommunicationChannelPreferencesResponse", + "" + ); + return body; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Invalid request.", body, response.headers); + } + if (isCodeInRange("401", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unexpected error", body, response.headers); + } + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "CommunicationChannelPreferencesResponse", + "" + ); + return body; + } + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", yield response.getBodyAsAny(), response.headers); + }); + } + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to searchConfig + * @throws ApiException if the response code was not in [200, 299] + */ + searchConfig(response) { + return __async(this, null, function* () { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("200", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "Array", + "" + ); + return body; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Invalid request.", body, response.headers); + } + if (isCodeInRange("401", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unexpected error", body, response.headers); + } + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "Array", + "" + ); + return body; + } + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", yield response.getBodyAsAny(), response.headers); + }); + } + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to searchConnection + * @throws ApiException if the response code was not in [200, 299] + */ + searchConnection(response) { + return __async(this, null, function* () { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("200", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "Array", + "" + ); + return body; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Invalid request.", body, response.headers); + } + if (isCodeInRange("401", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unexpected error", body, response.headers); + } + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "Array", + "" + ); + return body; + } + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", yield response.getBodyAsAny(), response.headers); + }); + } + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to searchCustomActions + * @throws ApiException if the response code was not in [200, 299] + */ + searchCustomActions(response) { + return __async(this, null, function* () { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("200", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "Array", + "" + ); + return body; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Invalid request.", body, response.headers); + } + if (isCodeInRange("401", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unexpected error", body, response.headers); + } + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "Array", + "" + ); + return body; + } + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", yield response.getBodyAsAny(), response.headers); + }); + } + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to searchData + * @throws ApiException if the response code was not in [200, 299] + */ + searchData(response) { + return __async(this, null, function* () { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("200", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "SearchDataResponse", + "" + ); + return body; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Invalid request.", body, response.headers); + } + if (isCodeInRange("401", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unexpected error", body, response.headers); + } + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "SearchDataResponse", + "" + ); + return body; + } + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", yield response.getBodyAsAny(), response.headers); + }); + } + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to searchEmailCustomization + * @throws ApiException if the response code was not in [200, 299] + */ + searchEmailCustomization(response) { + return __async(this, null, function* () { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("200", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "Array", + "" + ); + return body; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Invalid request.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unexpected error", body, response.headers); + } + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "Array", + "" + ); + return body; + } + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", yield response.getBodyAsAny(), response.headers); + }); + } + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to searchMetadata + * @throws ApiException if the response code was not in [200, 299] + */ + searchMetadata(response) { + return __async(this, null, function* () { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("200", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "Array", + "" + ); + return body; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Invalid request.", body, response.headers); + } + if (isCodeInRange("401", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unexpected error", body, response.headers); + } + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "Array", + "" + ); + return body; + } + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", yield response.getBodyAsAny(), response.headers); + }); + } + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to searchOrgs + * @throws ApiException if the response code was not in [200, 299] + */ + searchOrgs(response) { + return __async(this, null, function* () { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("200", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "Array", + "" + ); + return body; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Invalid request.", body, response.headers); + } + if (isCodeInRange("401", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unexpected error", body, response.headers); + } + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "Array", + "" + ); + return body; + } + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", yield response.getBodyAsAny(), response.headers); + }); + } + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to searchRoles + * @throws ApiException if the response code was not in [200, 299] + */ + searchRoles(response) { + return __async(this, null, function* () { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("200", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "Array", + "" + ); + return body; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Invalid request.", body, response.headers); + } + if (isCodeInRange("401", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Internal error", body, response.headers); + } + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "Array", + "" + ); + return body; + } + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", yield response.getBodyAsAny(), response.headers); + }); + } + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to searchSchedules + * @throws ApiException if the response code was not in [200, 299] + */ + searchSchedules(response) { + return __async(this, null, function* () { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("200", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "Array", + "" + ); + return body; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Invalid request.", body, response.headers); + } + if (isCodeInRange("401", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unexpected error", body, response.headers); + } + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "Array", + "" + ); + return body; + } + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", yield response.getBodyAsAny(), response.headers); + }); + } + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to searchSecuritySettings + * @throws ApiException if the response code was not in [200, 299] + */ + searchSecuritySettings(response) { + return __async(this, null, function* () { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("200", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "SecuritySettingsResponse", + "" + ); + return body; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Invalid request.", body, response.headers); + } + if (isCodeInRange("401", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unexpected error", body, response.headers); + } + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "SecuritySettingsResponse", + "" + ); + return body; + } + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", yield response.getBodyAsAny(), response.headers); + }); + } + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to searchTags + * @throws ApiException if the response code was not in [200, 299] + */ + searchTags(response) { + return __async(this, null, function* () { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("200", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "Array", + "" + ); + return body; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Invalid request.", body, response.headers); + } + if (isCodeInRange("401", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unexpected error", body, response.headers); + } + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "Array", + "" + ); + return body; + } + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", yield response.getBodyAsAny(), response.headers); + }); + } + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to searchUserGroups + * @throws ApiException if the response code was not in [200, 299] + */ + searchUserGroups(response) { + return __async(this, null, function* () { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("200", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "Array", + "" + ); + return body; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Invalid request.", body, response.headers); + } + if (isCodeInRange("401", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unexpected error", body, response.headers); + } + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "Array", + "" + ); + return body; + } + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", yield response.getBodyAsAny(), response.headers); + }); + } + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to searchUsers + * @throws ApiException if the response code was not in [200, 299] + */ + searchUsers(response) { + return __async(this, null, function* () { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("200", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "Array", + "" + ); + return body; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Invalid request.", body, response.headers); + } + if (isCodeInRange("401", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unexpected error", body, response.headers); + } + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "Array", + "" + ); + return body; + } + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", yield response.getBodyAsAny(), response.headers); + }); + } + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to searchVariables + * @throws ApiException if the response code was not in [200, 299] + */ + searchVariables(response) { + return __async(this, null, function* () { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("200", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "Array", + "" + ); + return body; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Invalid request.", body, response.headers); + } + if (isCodeInRange("401", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unexpected error", body, response.headers); + } + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "Array", + "" + ); + return body; + } + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", yield response.getBodyAsAny(), response.headers); + }); + } + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to searchWebhookConfigurations + * @throws ApiException if the response code was not in [200, 299] + */ + searchWebhookConfigurations(response) { + return __async(this, null, function* () { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("200", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "WebhookSearchResponse", + "" + ); + return body; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Invalid request.", body, response.headers); + } + if (isCodeInRange("401", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unexpected error", body, response.headers); + } + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "WebhookSearchResponse", + "" + ); + return body; + } + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", yield response.getBodyAsAny(), response.headers); + }); + } + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to sendAgentConversationMessage + * @throws ApiException if the response code was not in [200, 299] + */ + sendAgentConversationMessage(response) { + return __async(this, null, function* () { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("200", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "any", + "" + ); + return body; + } + if (isCodeInRange("201", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "any", + "" + ); + return body; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Operation failed", body, response.headers); + } + if (isCodeInRange("401", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Operation failed", body, response.headers); + } + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "any", + "" + ); + return body; + } + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", yield response.getBodyAsAny(), response.headers); + }); + } + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to sendAgentConversationMessageStreaming + * @throws ApiException if the response code was not in [200, 299] + */ + sendAgentConversationMessageStreaming(response) { + return __async(this, null, function* () { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("200", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "SendAgentMessageResponse", + "" + ); + return body; + } + if (isCodeInRange("201", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "SendAgentMessageResponse", + "" + ); + return body; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Operation failed", body, response.headers); + } + if (isCodeInRange("401", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Operation failed", body, response.headers); + } + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "SendAgentMessageResponse", + "" + ); + return body; + } + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", yield response.getBodyAsAny(), response.headers); + }); + } + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to sendAgentMessage + * @throws ApiException if the response code was not in [200, 299] + */ + sendAgentMessage(response) { + return __async(this, null, function* () { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("200", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "any", + "" + ); + return body; + } + if (isCodeInRange("201", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "any", + "" + ); + return body; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Operation failed", body, response.headers); + } + if (isCodeInRange("401", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Operation failed", body, response.headers); + } + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "any", + "" + ); + return body; + } + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", yield response.getBodyAsAny(), response.headers); + }); + } + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to sendAgentMessageStreaming + * @throws ApiException if the response code was not in [200, 299] + */ + sendAgentMessageStreaming(response) { + return __async(this, null, function* () { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("200", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "SendAgentMessageResponse", + "" + ); + return body; + } + if (isCodeInRange("201", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "SendAgentMessageResponse", + "" + ); + return body; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Operation failed", body, response.headers); + } + if (isCodeInRange("401", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Operation failed", body, response.headers); + } + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "SendAgentMessageResponse", + "" + ); + return body; + } + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", yield response.getBodyAsAny(), response.headers); + }); + } + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to sendMessage + * @throws ApiException if the response code was not in [200, 299] + */ + sendMessage(response) { + return __async(this, null, function* () { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("200", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "Array", + "" + ); + return body; + } + if (isCodeInRange("201", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "Array", + "" + ); + return body; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Operation failed", body, response.headers); + } + if (isCodeInRange("401", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Operation failed", body, response.headers); + } + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "Array", + "" + ); + return body; + } + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", yield response.getBodyAsAny(), response.headers); + }); + } + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to setNLInstructions + * @throws ApiException if the response code was not in [200, 299] + */ + setNLInstructions(response) { + return __async(this, null, function* () { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("200", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "EurekaSetNLInstructionsResponse", + "" + ); + return body; + } + if (isCodeInRange("201", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "EurekaSetNLInstructionsResponse", + "" + ); + return body; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Operation failed", body, response.headers); + } + if (isCodeInRange("401", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Operation failed", body, response.headers); + } + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "EurekaSetNLInstructionsResponse", + "" + ); + return body; + } + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", yield response.getBodyAsAny(), response.headers); + }); + } + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to shareMetadata + * @throws ApiException if the response code was not in [200, 299] + */ + shareMetadata(response) { + return __async(this, null, function* () { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("204", response.httpStatusCode)) { + return; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Invalid request.", body, response.headers); + } + if (isCodeInRange("401", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unexpected error", body, response.headers); + } + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "void", + "" + ); + return body; + } + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", yield response.getBodyAsAny(), response.headers); + }); + } + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to singleAnswer + * @throws ApiException if the response code was not in [200, 299] + */ + singleAnswer(response) { + return __async(this, null, function* () { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("200", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ResponseMessage", + "" + ); + return body; + } + if (isCodeInRange("201", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ResponseMessage", + "" + ); + return body; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Operation failed", body, response.headers); + } + if (isCodeInRange("401", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Operation failed", body, response.headers); + } + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ResponseMessage", + "" + ); + return body; + } + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", yield response.getBodyAsAny(), response.headers); + }); + } + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to stopConversation + * @throws ApiException if the response code was not in [200, 299] + */ + stopConversation(response) { + return __async(this, null, function* () { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("204", response.httpStatusCode)) { + return; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Operation failed", body, response.headers); + } + if (isCodeInRange("401", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Operation failed", body, response.headers); + } + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "void", + "" + ); + return body; + } + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", yield response.getBodyAsAny(), response.headers); + }); + } + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to syncMetadata + * @throws ApiException if the response code was not in [200, 299] + */ + syncMetadata(response) { + return __async(this, null, function* () { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("200", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "SyncMetadataResponse", + "" + ); + return body; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Invalid request parameters or hierarchy.", body, response.headers); + } + if (isCodeInRange("401", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } + if (isCodeInRange("404", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Connection, table, or column not found.", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unexpected error", body, response.headers); + } + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "SyncMetadataResponse", + "" + ); + return body; + } + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", yield response.getBodyAsAny(), response.headers); + }); + } + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to unassignTag + * @throws ApiException if the response code was not in [200, 299] + */ + unassignTag(response) { + return __async(this, null, function* () { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("204", response.httpStatusCode)) { + return; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Invalid request.", body, response.headers); + } + if (isCodeInRange("401", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unexpected error", body, response.headers); + } + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "void", + "" + ); + return body; + } + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", yield response.getBodyAsAny(), response.headers); + }); + } + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to unparameterizeMetadata + * @throws ApiException if the response code was not in [200, 299] + */ + unparameterizeMetadata(response) { + return __async(this, null, function* () { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("204", response.httpStatusCode)) { + return; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Invalid request.", body, response.headers); + } + if (isCodeInRange("401", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unexpected error", body, response.headers); + } + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "void", + "" + ); + return body; + } + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", yield response.getBodyAsAny(), response.headers); + }); + } + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to unpublishMetadata + * @throws ApiException if the response code was not in [200, 299] + */ + unpublishMetadata(response) { + return __async(this, null, function* () { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("204", response.httpStatusCode)) { + return; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Invalid request.", body, response.headers); + } + if (isCodeInRange("401", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unexpected error", body, response.headers); + } + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "void", + "" + ); + return body; + } + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", yield response.getBodyAsAny(), response.headers); + }); + } + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to updateCalendar + * @throws ApiException if the response code was not in [200, 299] + */ + updateCalendar(response) { + return __async(this, null, function* () { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("204", response.httpStatusCode)) { + return; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Invalid request.", body, response.headers); + } + if (isCodeInRange("401", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unexpected error", body, response.headers); + } + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "void", + "" + ); + return body; + } + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", yield response.getBodyAsAny(), response.headers); + }); + } + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to updateCollection + * @throws ApiException if the response code was not in [200, 299] + */ + updateCollection(response) { + return __async(this, null, function* () { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("204", response.httpStatusCode)) { + return; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Invalid request.", body, response.headers); + } + if (isCodeInRange("401", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } + if (isCodeInRange("404", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Resource not found.", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unexpected error", body, response.headers); + } + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "void", + "" + ); + return body; + } + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", yield response.getBodyAsAny(), response.headers); + }); + } + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to updateColumnSecurityRules + * @throws ApiException if the response code was not in [200, 299] + */ + updateColumnSecurityRules(response) { + return __async(this, null, function* () { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("204", response.httpStatusCode)) { + return; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Bad request - Invalid parameters or table not found", body, response.headers); + } + if (isCodeInRange("401", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Forbidden - User doesn't have permission to modify security rules for this table", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Internal server error", body, response.headers); + } + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "void", + "" + ); + return body; + } + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", yield response.getBodyAsAny(), response.headers); + }); + } + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to updateConfig + * @throws ApiException if the response code was not in [200, 299] + */ + updateConfig(response) { + return __async(this, null, function* () { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("200", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "RepoConfigObject", + "" + ); + return body; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Invalid request.", body, response.headers); + } + if (isCodeInRange("401", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unexpected error", body, response.headers); + } + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "RepoConfigObject", + "" + ); + return body; + } + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", yield response.getBodyAsAny(), response.headers); + }); + } + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to updateConnection + * @throws ApiException if the response code was not in [200, 299] + */ + updateConnection(response) { + return __async(this, null, function* () { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("204", response.httpStatusCode)) { + return; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Invalid request.", body, response.headers); + } + if (isCodeInRange("401", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unexpected error", body, response.headers); + } + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "void", + "" + ); + return body; + } + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", yield response.getBodyAsAny(), response.headers); + }); + } + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to updateConnectionConfiguration + * @throws ApiException if the response code was not in [200, 299] + */ + updateConnectionConfiguration(response) { + return __async(this, null, function* () { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("204", response.httpStatusCode)) { + return; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Invalid request.", body, response.headers); + } + if (isCodeInRange("401", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unexpected error", body, response.headers); + } + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "void", + "" + ); + return body; + } + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", yield response.getBodyAsAny(), response.headers); + }); + } + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to updateConnectionStatus + * @throws ApiException if the response code was not in [200, 299] + */ + updateConnectionStatus(response) { + return __async(this, null, function* () { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("204", response.httpStatusCode)) { + return; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Invalid request.", body, response.headers); + } + if (isCodeInRange("401", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } + if (isCodeInRange("404", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Object not found", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unexpected error", body, response.headers); + } + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "void", + "" + ); + return body; + } + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", yield response.getBodyAsAny(), response.headers); + }); + } + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to updateConnectionV2 + * @throws ApiException if the response code was not in [200, 299] + */ + updateConnectionV2(response) { + return __async(this, null, function* () { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("204", response.httpStatusCode)) { + return; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Invalid request.", body, response.headers); + } + if (isCodeInRange("401", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unexpected error", body, response.headers); + } + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "void", + "" + ); + return body; + } + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", yield response.getBodyAsAny(), response.headers); + }); + } + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to updateCustomAction + * @throws ApiException if the response code was not in [200, 299] + */ + updateCustomAction(response) { + return __async(this, null, function* () { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("204", response.httpStatusCode)) { + return; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Invalid request.", body, response.headers); + } + if (isCodeInRange("401", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unexpected error", body, response.headers); + } + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "void", + "" + ); + return body; + } + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", yield response.getBodyAsAny(), response.headers); + }); + } + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to updateDbtConnection + * @throws ApiException if the response code was not in [200, 299] + */ + updateDbtConnection(response) { + return __async(this, null, function* () { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("200", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "any", + "" + ); + return body; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Invalid request.", body, response.headers); + } + if (isCodeInRange("401", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unexpected error", body, response.headers); + } + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "any", + "" + ); + return body; + } + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", yield response.getBodyAsAny(), response.headers); + }); + } + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to updateEmailCustomization + * @throws ApiException if the response code was not in [200, 299] + */ + updateEmailCustomization(response) { + return __async(this, null, function* () { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("204", response.httpStatusCode)) { + return; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Invalid request.", body, response.headers); + } + if (isCodeInRange("401", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unexpected error", body, response.headers); + } + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "void", + "" + ); + return body; + } + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", yield response.getBodyAsAny(), response.headers); + }); + } + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to updateMetadataHeader + * @throws ApiException if the response code was not in [200, 299] + */ + updateMetadataHeader(response) { + return __async(this, null, function* () { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("204", response.httpStatusCode)) { + return; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Invalid request.", body, response.headers); + } + if (isCodeInRange("401", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unexpected error", body, response.headers); + } + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "void", + "" + ); + return body; + } + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", yield response.getBodyAsAny(), response.headers); + }); + } + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to updateMetadataObjId + * @throws ApiException if the response code was not in [200, 299] + */ + updateMetadataObjId(response) { + return __async(this, null, function* () { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("204", response.httpStatusCode)) { + return; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Invalid request.", body, response.headers); + } + if (isCodeInRange("401", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unexpected error", body, response.headers); + } + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "void", + "" + ); + return body; + } + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", yield response.getBodyAsAny(), response.headers); + }); + } + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to updateOrg + * @throws ApiException if the response code was not in [200, 299] + */ + updateOrg(response) { + return __async(this, null, function* () { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("204", response.httpStatusCode)) { + return; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Invalid request.", body, response.headers); + } + if (isCodeInRange("401", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unexpected error", body, response.headers); + } + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "void", + "" + ); + return body; + } + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", yield response.getBodyAsAny(), response.headers); + }); + } + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to updateRole + * @throws ApiException if the response code was not in [200, 299] + */ + updateRole(response) { + return __async(this, null, function* () { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("200", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "RoleResponse", + "" + ); + return body; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Invalid request.", body, response.headers); + } + if (isCodeInRange("401", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unexpected error", body, response.headers); + } + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "RoleResponse", + "" + ); + return body; + } + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", yield response.getBodyAsAny(), response.headers); + }); + } + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to updateSchedule + * @throws ApiException if the response code was not in [200, 299] + */ + updateSchedule(response) { + return __async(this, null, function* () { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("204", response.httpStatusCode)) { + return; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Invalid request.", body, response.headers); + } + if (isCodeInRange("401", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unexpected error", body, response.headers); + } + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "void", + "" + ); + return body; + } + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", yield response.getBodyAsAny(), response.headers); + }); + } + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to updateSystemConfig + * @throws ApiException if the response code was not in [200, 299] + */ + updateSystemConfig(response) { + return __async(this, null, function* () { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("204", response.httpStatusCode)) { + return; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Invalid request.", body, response.headers); + } + if (isCodeInRange("401", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unexpected error", body, response.headers); + } + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "void", + "" + ); + return body; + } + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", yield response.getBodyAsAny(), response.headers); + }); + } + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to updateTag + * @throws ApiException if the response code was not in [200, 299] + */ + updateTag(response) { + return __async(this, null, function* () { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("204", response.httpStatusCode)) { + return; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Invalid request.", body, response.headers); + } + if (isCodeInRange("401", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unexpected error", body, response.headers); + } + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "void", + "" + ); + return body; + } + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", yield response.getBodyAsAny(), response.headers); + }); + } + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to updateUser + * @throws ApiException if the response code was not in [200, 299] + */ + updateUser(response) { + return __async(this, null, function* () { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("204", response.httpStatusCode)) { + return; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Invalid request.", body, response.headers); + } + if (isCodeInRange("401", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unexpected error", body, response.headers); + } + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "void", + "" + ); + return body; + } + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", yield response.getBodyAsAny(), response.headers); + }); + } + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to updateUserGroup + * @throws ApiException if the response code was not in [200, 299] + */ + updateUserGroup(response) { + return __async(this, null, function* () { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("204", response.httpStatusCode)) { + return; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Invalid request.", body, response.headers); + } + if (isCodeInRange("401", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unexpected error", body, response.headers); + } + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "void", + "" + ); + return body; + } + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", yield response.getBodyAsAny(), response.headers); + }); + } + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to updateVariable + * @throws ApiException if the response code was not in [200, 299] + */ + updateVariable(response) { + return __async(this, null, function* () { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("204", response.httpStatusCode)) { + return; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Invalid request.", body, response.headers); + } + if (isCodeInRange("401", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unexpected error", body, response.headers); + } + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "void", + "" + ); + return body; + } + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", yield response.getBodyAsAny(), response.headers); + }); + } + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to updateVariableValues + * @throws ApiException if the response code was not in [200, 299] + */ + updateVariableValues(response) { + return __async(this, null, function* () { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("204", response.httpStatusCode)) { + return; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Invalid request.", body, response.headers); + } + if (isCodeInRange("401", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unexpected error", body, response.headers); + } + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "void", + "" + ); + return body; + } + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", yield response.getBodyAsAny(), response.headers); + }); + } + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to updateWebhookConfiguration + * @throws ApiException if the response code was not in [200, 299] + */ + updateWebhookConfiguration(response) { + return __async(this, null, function* () { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("204", response.httpStatusCode)) { + return; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Invalid request.", body, response.headers); + } + if (isCodeInRange("401", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unexpected error", body, response.headers); + } + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "void", + "" + ); + return body; + } + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", yield response.getBodyAsAny(), response.headers); + }); + } + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to validateCommunicationChannel + * @throws ApiException if the response code was not in [200, 299] + */ + validateCommunicationChannel(response) { + return __async(this, null, function* () { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("200", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "CommunicationChannelValidateResponse", + "" + ); + return body; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Invalid request.", body, response.headers); + } + if (isCodeInRange("401", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unexpected error", body, response.headers); + } + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "CommunicationChannelValidateResponse", + "" + ); + return body; + } + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", yield response.getBodyAsAny(), response.headers); + }); + } + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to validateEmailCustomization + * @throws ApiException if the response code was not in [200, 299] + */ + validateEmailCustomization(response) { + return __async(this, null, function* () { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("204", response.httpStatusCode)) { + return; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Invalid request.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unexpected error", body, response.headers); + } + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "void", + "" + ); + return body; + } + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", yield response.getBodyAsAny(), response.headers); + }); + } + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to validateMerge + * @throws ApiException if the response code was not in [200, 299] + */ + validateMerge(response) { + return __async(this, null, function* () { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("200", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "Array", + "" + ); + return body; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Invalid request.", body, response.headers); + } + if (isCodeInRange("401", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unexpected error", body, response.headers); + } + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "Array", + "" + ); + return body; + } + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", yield response.getBodyAsAny(), response.headers); + }); + } + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to validateToken + * @throws ApiException if the response code was not in [200, 299] + */ + validateToken(response) { + return __async(this, null, function* () { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("200", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "TokenValidationResponse", + "" + ); + return body; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Invalid request.", body, response.headers); + } + if (isCodeInRange("401", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unexpected error", body, response.headers); + } + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "TokenValidationResponse", + "" + ); + return body; + } + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", yield response.getBodyAsAny(), response.headers); + }); + } +}; + +// apis/UsersApi.ts +var UsersApiRequestFactory = class extends BaseAPIRequestFactory { + /** + * Version: 9.7.0.cl or later Activates a deactivated user account. Requires `ADMINISTRATION` (**Can administer Thoughtspot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `USER_ADMINISTRATION` (**Can manage users**) privilege is required. To activate an inactive user account, the API request body must include the following information: - Username or the GUID of the user account. - Auth token generated for the deactivated user. The auth token is sent in the API response when a user is deactivated. - Password for the user account. + * @param activateUserRequest + */ + activateUser(activateUserRequest, _options) { + return __async(this, null, function* () { + var _a, _b, _c; + let _config = _options || this.configuration; + if (activateUserRequest === null || activateUserRequest === void 0) { + throw new RequiredError("UsersApi", "activateUser", "activateUserRequest"); + } + const localVarPath = "/api/rest/2.0/users/activate"; + const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.25.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.25.0"); + const contentType = ObjectSerializer.getPreferredMediaType([ + "application/json" + ]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = ObjectSerializer.stringify( + ObjectSerializer.serialize(activateUserRequest, "ActivateUserRequest", ""), + contentType + ); + requestContext.setBody(serializedBody); + let authMethod; + authMethod = _config.authMethods["bearerAuth"]; + if (authMethod == null ? void 0 : authMethod.applySecurityAuthentication) { + yield authMethod == null ? void 0 : authMethod.applySecurityAuthentication(requestContext); + } + const defaultAuth = ((_a = _options == null ? void 0 : _options.authMethods) == null ? void 0 : _a.default) || ((_c = (_b = this.configuration) == null ? void 0 : _b.authMethods) == null ? void 0 : _c.default); + if (defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication) { + yield defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication(requestContext); + } + return requestContext; + }); + } + /** + * Version: 9.0.0.cl or later Updates the current password of the user. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `USER_ADMINISTRATION` (**Can manage users**) privilege is required. + * @param changeUserPasswordRequest + */ + changeUserPassword(changeUserPasswordRequest, _options) { + return __async(this, null, function* () { + var _a, _b, _c; + let _config = _options || this.configuration; + if (changeUserPasswordRequest === null || changeUserPasswordRequest === void 0) { + throw new RequiredError("UsersApi", "changeUserPassword", "changeUserPasswordRequest"); + } + const localVarPath = "/api/rest/2.0/users/change-password"; + const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.25.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.25.0"); + const contentType = ObjectSerializer.getPreferredMediaType([ + "application/json" + ]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = ObjectSerializer.stringify( + ObjectSerializer.serialize(changeUserPasswordRequest, "ChangeUserPasswordRequest", ""), + contentType + ); + requestContext.setBody(serializedBody); + let authMethod; + authMethod = _config.authMethods["bearerAuth"]; + if (authMethod == null ? void 0 : authMethod.applySecurityAuthentication) { + yield authMethod == null ? void 0 : authMethod.applySecurityAuthentication(requestContext); + } + const defaultAuth = ((_a = _options == null ? void 0 : _options.authMethods) == null ? void 0 : _a.default) || ((_c = (_b = this.configuration) == null ? void 0 : _b.authMethods) == null ? void 0 : _c.default); + if (defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication) { + yield defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication(requestContext); + } + return requestContext; + }); + } + /** + * Version: 9.0.0.cl or later Creates a user in ThoughtSpot. The API endpoint allows you to configure several user properties such as email address, account status, share notification preferences, and sharing visibility. You can provision the user to [groups](https://docs.thoughtspot.com/cloud/latest/groups-privileges) and [Orgs](https://docs.thoughtspot.com/cloud/latest/orgs-overview). You can also add Liveboard, Answer, and Worksheet objects to the user’s favorites list, assign a default Liveboard for the user, and set user preferences. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `USER_ADMINISTRATION` (**Can manage users**) privilege is required. + * @param createUserRequest + */ + createUser(createUserRequest, _options) { + return __async(this, null, function* () { + var _a, _b, _c; + let _config = _options || this.configuration; + if (createUserRequest === null || createUserRequest === void 0) { + throw new RequiredError("UsersApi", "createUser", "createUserRequest"); + } + const localVarPath = "/api/rest/2.0/users/create"; + const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.25.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.25.0"); + const contentType = ObjectSerializer.getPreferredMediaType([ + "application/json" + ]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = ObjectSerializer.stringify( + ObjectSerializer.serialize(createUserRequest, "CreateUserRequest", ""), + contentType + ); + requestContext.setBody(serializedBody); + let authMethod; + authMethod = _config.authMethods["bearerAuth"]; + if (authMethod == null ? void 0 : authMethod.applySecurityAuthentication) { + yield authMethod == null ? void 0 : authMethod.applySecurityAuthentication(requestContext); + } + const defaultAuth = ((_a = _options == null ? void 0 : _options.authMethods) == null ? void 0 : _a.default) || ((_c = (_b = this.configuration) == null ? void 0 : _b.authMethods) == null ? void 0 : _c.default); + if (defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication) { + yield defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication(requestContext); + } + return requestContext; + }); + } + /** + * Version: 9.7.0.cl or later Deactivates a user account. Requires `ADMINISTRATION` (**Can administer Thoughtspot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `USER_ADMINISTRATION` (**Can manage users**) privilege is required. To deactivate a user account, the API request body must include the following information: - Username or the GUID of the user account - Base URL of the ThoughtSpot instance If the API request is successful, ThoughtSpot returns the activation URL in the response. The activation URL is valid for 14 days and can be used to re-activate the account and reset the password of the deactivated account. + * @param deactivateUserRequest + */ + deactivateUser(deactivateUserRequest, _options) { + return __async(this, null, function* () { + var _a, _b, _c; + let _config = _options || this.configuration; + if (deactivateUserRequest === null || deactivateUserRequest === void 0) { + throw new RequiredError("UsersApi", "deactivateUser", "deactivateUserRequest"); + } + const localVarPath = "/api/rest/2.0/users/deactivate"; + const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.25.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.25.0"); + const contentType = ObjectSerializer.getPreferredMediaType([ + "application/json" + ]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = ObjectSerializer.stringify( + ObjectSerializer.serialize(deactivateUserRequest, "DeactivateUserRequest", ""), + contentType + ); + requestContext.setBody(serializedBody); + let authMethod; + authMethod = _config.authMethods["bearerAuth"]; + if (authMethod == null ? void 0 : authMethod.applySecurityAuthentication) { + yield authMethod == null ? void 0 : authMethod.applySecurityAuthentication(requestContext); + } + const defaultAuth = ((_a = _options == null ? void 0 : _options.authMethods) == null ? void 0 : _a.default) || ((_c = (_b = this.configuration) == null ? void 0 : _b.authMethods) == null ? void 0 : _c.default); + if (defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication) { + yield defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication(requestContext); + } + return requestContext; + }); + } + /** + * Version: 9.0.0.cl or later Deletes a user from the ThoughtSpot system. If you want to remove a user from a specific Org but not from ThoughtSpot, update the group and Org mapping properties of the user object via a POST API call to the [/api/rest/2.0/users/{user_identifier}/update](#/http/api-endpoints/users/update-user) endpoint. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `USER_ADMINISTRATION` (**Can manage users**) privilege is required. + * @param userIdentifier GUID / name of the user + */ + deleteUser(userIdentifier, _options) { + return __async(this, null, function* () { + var _a, _b, _c; + let _config = _options || this.configuration; + if (userIdentifier === null || userIdentifier === void 0) { + throw new RequiredError("UsersApi", "deleteUser", "userIdentifier"); + } + const localVarPath = "/api/rest/2.0/users/{user_identifier}/delete".replace("{user_identifier}", encodeURIComponent(String(userIdentifier))); + const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.25.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.25.0"); + let authMethod; + authMethod = _config.authMethods["bearerAuth"]; + if (authMethod == null ? void 0 : authMethod.applySecurityAuthentication) { + yield authMethod == null ? void 0 : authMethod.applySecurityAuthentication(requestContext); + } + const defaultAuth = ((_a = _options == null ? void 0 : _options.authMethods) == null ? void 0 : _a.default) || ((_c = (_b = this.configuration) == null ? void 0 : _b.authMethods) == null ? void 0 : _c.default); + if (defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication) { + yield defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication(requestContext); + } + return requestContext; + }); + } + /** + * Version: 9.0.0.cl or later Enforces logout on current user sessions. Use this API with caution as it may invalidate active user sessions and force users to re-login. Make sure you specify the usernames or GUIDs. If you pass null values in the API call, all user sessions on your cluster become invalid, and the users are forced to re-login. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `USER_ADMINISTRATION` (**Can manage users**) privilege is required. + * @param forceLogoutUsersRequest + */ + forceLogoutUsers(forceLogoutUsersRequest, _options) { + return __async(this, null, function* () { + var _a, _b, _c; + let _config = _options || this.configuration; + if (forceLogoutUsersRequest === null || forceLogoutUsersRequest === void 0) { + throw new RequiredError("UsersApi", "forceLogoutUsers", "forceLogoutUsersRequest"); + } + const localVarPath = "/api/rest/2.0/users/force-logout"; + const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.25.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.25.0"); + const contentType = ObjectSerializer.getPreferredMediaType([ + "application/json" + ]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = ObjectSerializer.stringify( + ObjectSerializer.serialize(forceLogoutUsersRequest, "ForceLogoutUsersRequest", ""), + contentType + ); + requestContext.setBody(serializedBody); + let authMethod; + authMethod = _config.authMethods["bearerAuth"]; + if (authMethod == null ? void 0 : authMethod.applySecurityAuthentication) { + yield authMethod == null ? void 0 : authMethod.applySecurityAuthentication(requestContext); + } + const defaultAuth = ((_a = _options == null ? void 0 : _options.authMethods) == null ? void 0 : _a.default) || ((_c = (_b = this.configuration) == null ? void 0 : _b.authMethods) == null ? void 0 : _c.default); + if (defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication) { + yield defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication(requestContext); + } + return requestContext; + }); + } + /** + * Version: 9.0.0.cl or later Imports user data from external databases into ThoughtSpot. During the user import operation: * If the specified users are not available in ThoughtSpot, the users are created and assigned a default password. Defining a `default_password` in the API request is optional. * If `delete_unspecified_users` is set to `true`, the users not specified in the API request, excluding the `tsadmin`, `guest`, `system` and `su` users, are deleted. * If the specified user objects are already available in ThoughtSpot, the object properties are updated and synchronized as per the input data in the API request. A successful API call returns the object that represents the changes made in the ThoughtSpot system. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `USER_ADMINISTRATION` (**Can manage users**) privilege is required. + * @param importUsersRequest + */ + importUsers(importUsersRequest, _options) { + return __async(this, null, function* () { + var _a, _b, _c; + let _config = _options || this.configuration; + if (importUsersRequest === null || importUsersRequest === void 0) { + throw new RequiredError("UsersApi", "importUsers", "importUsersRequest"); + } + const localVarPath = "/api/rest/2.0/users/import"; + const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.25.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.25.0"); + const contentType = ObjectSerializer.getPreferredMediaType([ + "application/json" + ]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = ObjectSerializer.stringify( + ObjectSerializer.serialize(importUsersRequest, "ImportUsersRequest", ""), + contentType + ); + requestContext.setBody(serializedBody); + let authMethod; + authMethod = _config.authMethods["bearerAuth"]; + if (authMethod == null ? void 0 : authMethod.applySecurityAuthentication) { + yield authMethod == null ? void 0 : authMethod.applySecurityAuthentication(requestContext); + } + const defaultAuth = ((_a = _options == null ? void 0 : _options.authMethods) == null ? void 0 : _a.default) || ((_c = (_b = this.configuration) == null ? void 0 : _b.authMethods) == null ? void 0 : _c.default); + if (defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication) { + yield defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication(requestContext); + } + return requestContext; + }); + } + /** + * Version: 9.0.0.cl or later Resets the password of a user account. Administrators can reset password on behalf of a user. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `USER_ADMINISTRATION` (**Can manage users**) privilege is required. + * @param resetUserPasswordRequest + */ + resetUserPassword(resetUserPasswordRequest, _options) { + return __async(this, null, function* () { + var _a, _b, _c; + let _config = _options || this.configuration; + if (resetUserPasswordRequest === null || resetUserPasswordRequest === void 0) { + throw new RequiredError("UsersApi", "resetUserPassword", "resetUserPasswordRequest"); + } + const localVarPath = "/api/rest/2.0/users/reset-password"; + const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.25.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.25.0"); + const contentType = ObjectSerializer.getPreferredMediaType([ + "application/json" + ]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = ObjectSerializer.stringify( + ObjectSerializer.serialize(resetUserPasswordRequest, "ResetUserPasswordRequest", ""), + contentType + ); + requestContext.setBody(serializedBody); + let authMethod; + authMethod = _config.authMethods["bearerAuth"]; + if (authMethod == null ? void 0 : authMethod.applySecurityAuthentication) { + yield authMethod == null ? void 0 : authMethod.applySecurityAuthentication(requestContext); + } + const defaultAuth = ((_a = _options == null ? void 0 : _options.authMethods) == null ? void 0 : _a.default) || ((_c = (_b = this.configuration) == null ? void 0 : _b.authMethods) == null ? void 0 : _c.default); + if (defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication) { + yield defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication(requestContext); + } + return requestContext; + }); + } + /** + * Version: 9.0.0.cl or later Gets a list of users available on the ThoughtSpot system. To get details of a specific user, specify the user GUID or name. You can also filter the API response based on groups, Org ID, user visibility, account status, user type, and user preference settings and favorites. Available to all users. Users with `ADMINISTRATION` (**Can administer ThoughtSpot**) privileges can view all users properties. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `USER_ADMINISTRATION` (**Can manage users**) privilege is required. **NOTE**: If the API returns an empty list, consider increasing the value of the `record_size` parameter. To search across all available users, set `record_size` to `-1`. + * @param searchUsersRequest + */ + searchUsers(searchUsersRequest, _options) { + return __async(this, null, function* () { + var _a, _b, _c; + let _config = _options || this.configuration; + if (searchUsersRequest === null || searchUsersRequest === void 0) { + throw new RequiredError("UsersApi", "searchUsers", "searchUsersRequest"); + } + const localVarPath = "/api/rest/2.0/users/search"; + const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.25.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.25.0"); + const contentType = ObjectSerializer.getPreferredMediaType([ + "application/json" + ]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = ObjectSerializer.stringify( + ObjectSerializer.serialize(searchUsersRequest, "SearchUsersRequest", ""), + contentType + ); + requestContext.setBody(serializedBody); + let authMethod; + authMethod = _config.authMethods["bearerAuth"]; + if (authMethod == null ? void 0 : authMethod.applySecurityAuthentication) { + yield authMethod == null ? void 0 : authMethod.applySecurityAuthentication(requestContext); + } + const defaultAuth = ((_a = _options == null ? void 0 : _options.authMethods) == null ? void 0 : _a.default) || ((_c = (_b = this.configuration) == null ? void 0 : _b.authMethods) == null ? void 0 : _c.default); + if (defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication) { + yield defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication(requestContext); + } + return requestContext; + }); + } + /** + * Version: 9.0.0.cl or later Updates the properties of a user object. You can modify user properties such as username, email, and share notification settings. You can also assign new groups and Orgs, remove the user from a group or Org, reset password, and modify user preferences. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `USER_ADMINISTRATION` (**Can manage users**) privilege is required. + * @param userIdentifier GUID / name of the user + * @param updateUserRequest + */ + updateUser(userIdentifier, updateUserRequest, _options) { + return __async(this, null, function* () { + var _a, _b, _c; + let _config = _options || this.configuration; + if (userIdentifier === null || userIdentifier === void 0) { + throw new RequiredError("UsersApi", "updateUser", "userIdentifier"); + } + if (updateUserRequest === null || updateUserRequest === void 0) { + throw new RequiredError("UsersApi", "updateUser", "updateUserRequest"); + } + const localVarPath = "/api/rest/2.0/users/{user_identifier}/update".replace("{user_identifier}", encodeURIComponent(String(userIdentifier))); + const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.25.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.25.0"); + const contentType = ObjectSerializer.getPreferredMediaType([ + "application/json" + ]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = ObjectSerializer.stringify( + ObjectSerializer.serialize(updateUserRequest, "UpdateUserRequest", ""), + contentType + ); + requestContext.setBody(serializedBody); + let authMethod; + authMethod = _config.authMethods["bearerAuth"]; + if (authMethod == null ? void 0 : authMethod.applySecurityAuthentication) { + yield authMethod == null ? void 0 : authMethod.applySecurityAuthentication(requestContext); + } + const defaultAuth = ((_a = _options == null ? void 0 : _options.authMethods) == null ? void 0 : _a.default) || ((_c = (_b = this.configuration) == null ? void 0 : _b.authMethods) == null ? void 0 : _c.default); + if (defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication) { + yield defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication(requestContext); + } + return requestContext; + }); + } +}; +var UsersApiResponseProcessor = class { + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to activateUser + * @throws ApiException if the response code was not in [200, 299] + */ + activateUser(response) { + return __async(this, null, function* () { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("200", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "User", + "" + ); + return body; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Invalid request.", body, response.headers); + } + if (isCodeInRange("401", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unexpected error", body, response.headers); + } + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "User", + "" + ); + return body; + } + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", yield response.getBodyAsAny(), response.headers); + }); + } + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to changeUserPassword + * @throws ApiException if the response code was not in [200, 299] + */ + changeUserPassword(response) { + return __async(this, null, function* () { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("204", response.httpStatusCode)) { + return; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Invalid request.", body, response.headers); + } + if (isCodeInRange("401", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unexpected error", body, response.headers); + } + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "void", + "" + ); + return body; + } + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", yield response.getBodyAsAny(), response.headers); + }); + } + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to createUser + * @throws ApiException if the response code was not in [200, 299] + */ + createUser(response) { + return __async(this, null, function* () { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("200", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "User", + "" + ); + return body; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Invalid request.", body, response.headers); + } + if (isCodeInRange("401", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unexpected error", body, response.headers); + } + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "User", + "" + ); + return body; + } + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", yield response.getBodyAsAny(), response.headers); + }); + } + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to deactivateUser + * @throws ApiException if the response code was not in [200, 299] + */ + deactivateUser(response) { + return __async(this, null, function* () { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("200", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ResponseActivationURL", + "" + ); + return body; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Invalid request.", body, response.headers); + } + if (isCodeInRange("401", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unexpected error", body, response.headers); + } + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ResponseActivationURL", + "" + ); + return body; + } + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", yield response.getBodyAsAny(), response.headers); + }); + } + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to deleteUser + * @throws ApiException if the response code was not in [200, 299] + */ + deleteUser(response) { + return __async(this, null, function* () { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("204", response.httpStatusCode)) { + return; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Invalid request.", body, response.headers); + } + if (isCodeInRange("401", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unexpected error", body, response.headers); + } + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "void", + "" + ); + return body; + } + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", yield response.getBodyAsAny(), response.headers); + }); + } + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to forceLogoutUsers + * @throws ApiException if the response code was not in [200, 299] + */ + forceLogoutUsers(response) { + return __async(this, null, function* () { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("204", response.httpStatusCode)) { + return; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Invalid request.", body, response.headers); + } + if (isCodeInRange("401", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unexpected error", body, response.headers); + } + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "void", + "" + ); + return body; + } + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", yield response.getBodyAsAny(), response.headers); + }); + } + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to importUsers + * @throws ApiException if the response code was not in [200, 299] + */ + importUsers(response) { + return __async(this, null, function* () { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("200", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ImportUsersResponse", + "" + ); + return body; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Invalid request.", body, response.headers); + } + if (isCodeInRange("401", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unexpected error", body, response.headers); + } + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ImportUsersResponse", + "" + ); + return body; + } + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", yield response.getBodyAsAny(), response.headers); + }); + } + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to resetUserPassword + * @throws ApiException if the response code was not in [200, 299] + */ + resetUserPassword(response) { + return __async(this, null, function* () { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("204", response.httpStatusCode)) { + return; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Invalid request.", body, response.headers); + } + if (isCodeInRange("401", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unexpected error", body, response.headers); + } + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "void", + "" + ); + return body; + } + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", yield response.getBodyAsAny(), response.headers); + }); + } + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to searchUsers + * @throws ApiException if the response code was not in [200, 299] + */ + searchUsers(response) { + return __async(this, null, function* () { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("200", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "Array", + "" + ); + return body; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Invalid request.", body, response.headers); + } + if (isCodeInRange("401", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unexpected error", body, response.headers); + } + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "Array", + "" + ); + return body; + } + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", yield response.getBodyAsAny(), response.headers); + }); + } + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to updateUser + * @throws ApiException if the response code was not in [200, 299] + */ + updateUser(response) { + return __async(this, null, function* () { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("204", response.httpStatusCode)) { + return; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Invalid request.", body, response.headers); + } + if (isCodeInRange("401", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unexpected error", body, response.headers); + } + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "void", + "" + ); + return body; + } + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", yield response.getBodyAsAny(), response.headers); + }); + } +}; + +// apis/VariableApi.ts +var VariableApiRequestFactory = class extends BaseAPIRequestFactory { + /** + * Create a variable which can be used for parameterizing metadata objects Version: 26.4.0.cl or later Allows creating a variable which can be used for parameterizing metadata objects in ThoughtSpot. Requires ADMINISTRATION role and TENANT scope. The CAN_MANAGE_VARIABLES permission allows you to manage Formula Variables in the current organization scope. The API endpoint supports the following types of variables: * CONNECTION_PROPERTY - For connection properties * TABLE_MAPPING - For table mappings * CONNECTION_PROPERTY_PER_PRINCIPAL - For connection properties per principal. In order to use this please contact support to enable this. * FORMULA_VARIABLE - For Formula variables, introduced in 10.15.0.cl When creating a variable, you need to specify: * The variable type * A unique name for the variable * Whether the variable contains sensitive values (defaults to false) * The data type of the variable, only specify for formula variables (defaults to null) The operation will fail if: * The user lacks required permissions * The variable name already exists * The variable type is invalid + * @param createVariableRequest + */ + createVariable(createVariableRequest, _options) { + return __async(this, null, function* () { + var _a, _b, _c; + let _config = _options || this.configuration; + if (createVariableRequest === null || createVariableRequest === void 0) { + throw new RequiredError("VariableApi", "createVariable", "createVariableRequest"); + } + const localVarPath = "/api/rest/2.0/template/variables/create"; + const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.25.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.25.0"); + const contentType = ObjectSerializer.getPreferredMediaType([ + "application/json" + ]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = ObjectSerializer.stringify( + ObjectSerializer.serialize(createVariableRequest, "CreateVariableRequest", ""), + contentType + ); + requestContext.setBody(serializedBody); + let authMethod; + authMethod = _config.authMethods["bearerAuth"]; + if (authMethod == null ? void 0 : authMethod.applySecurityAuthentication) { + yield authMethod == null ? void 0 : authMethod.applySecurityAuthentication(requestContext); + } + const defaultAuth = ((_a = _options == null ? void 0 : _options.authMethods) == null ? void 0 : _a.default) || ((_c = (_b = this.configuration) == null ? void 0 : _b.authMethods) == null ? void 0 : _c.default); + if (defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication) { + yield defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication(requestContext); + } + return requestContext; + }); + } + /** + * Delete a variable Version: 10.14.0.cl or later **Note:** This API endpoint is deprecated and will be removed from ThoughtSpot in a future release. Use [POST /api/rest/2.0/template/variables/delete](/api/rest/2.0/template/variables/delete) instead. Allows deleting a variable from ThoughtSpot. Requires ADMINISTRATION role and TENANT scope. The CAN_MANAGE_VARIABLES permission allows you to manage Formula Variables in the current organization scope. The API endpoint requires: * The variable identifier (ID or name) The operation will fail if: * The user lacks required permissions * The variable doesn\'t exist * The variable is being used by other objects + * @param identifier Unique id or name of the variable + */ + deleteVariable(identifier, _options) { + return __async(this, null, function* () { + var _a, _b, _c; + let _config = _options || this.configuration; + if (identifier === null || identifier === void 0) { + throw new RequiredError("VariableApi", "deleteVariable", "identifier"); + } + const localVarPath = "/api/rest/2.0/template/variables/{identifier}/delete".replace("{identifier}", encodeURIComponent(String(identifier))); + const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.25.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.25.0"); + let authMethod; + authMethod = _config.authMethods["bearerAuth"]; + if (authMethod == null ? void 0 : authMethod.applySecurityAuthentication) { + yield authMethod == null ? void 0 : authMethod.applySecurityAuthentication(requestContext); + } + const defaultAuth = ((_a = _options == null ? void 0 : _options.authMethods) == null ? void 0 : _a.default) || ((_c = (_b = this.configuration) == null ? void 0 : _b.authMethods) == null ? void 0 : _c.default); + if (defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication) { + yield defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication(requestContext); + } + return requestContext; + }); + } + /** + * Delete variable(s) Version: 26.4.0.cl or later Allows deleting multiple variables from ThoughtSpot. Requires ADMINISTRATION role and TENANT scope. The CAN_MANAGE_VARIABLES permission allows you to manage Formula Variables in the current organization scope. The API endpoint requires: * The variable identifiers (IDs or names) The operation will fail if: * The user lacks required permissions * Any of the variables don\'t exist * Any of the variables are being used by other objects + * @param deleteVariablesRequest + */ + deleteVariables(deleteVariablesRequest, _options) { + return __async(this, null, function* () { + var _a, _b, _c; + let _config = _options || this.configuration; + if (deleteVariablesRequest === null || deleteVariablesRequest === void 0) { + throw new RequiredError("VariableApi", "deleteVariables", "deleteVariablesRequest"); + } + const localVarPath = "/api/rest/2.0/template/variables/delete"; + const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.25.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.25.0"); + const contentType = ObjectSerializer.getPreferredMediaType([ + "application/json" + ]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = ObjectSerializer.stringify( + ObjectSerializer.serialize(deleteVariablesRequest, "DeleteVariablesRequest", ""), + contentType + ); + requestContext.setBody(serializedBody); + let authMethod; + authMethod = _config.authMethods["bearerAuth"]; + if (authMethod == null ? void 0 : authMethod.applySecurityAuthentication) { + yield authMethod == null ? void 0 : authMethod.applySecurityAuthentication(requestContext); + } + const defaultAuth = ((_a = _options == null ? void 0 : _options.authMethods) == null ? void 0 : _a.default) || ((_c = (_b = this.configuration) == null ? void 0 : _b.authMethods) == null ? void 0 : _c.default); + if (defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication) { + yield defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication(requestContext); + } + return requestContext; + }); + } + /** + * Update values for a variable Version: 26.4.0.cl or later Allows updating values for a specific variable in ThoughtSpot. Requires ADMINISTRATION role. The CAN_MANAGE_VARIABLES permission allows you to manage Formula Variables in the current organization scope. The API endpoint allows: * Adding new values to the variable * Replacing existing values * Deleting values from the variable * Resetting all values When updating variable values, you need to specify: * The variable identifier (ID or name) * The values to add/replace/remove * The operation to perform (ADD, REPLACE, REMOVE, RESET) Behaviour based on operation type: * ADD - Adds values to the variable if this is a list type variable, else same as replace. * REPLACE - Replaces all values of a given set of constraints with the current set of values. * REMOVE - Removes any values which match the set of conditions of the variables if this is a list type variable, else clears value. * RESET - Removes all constraints for the given variable, scope is ignored + * @param identifier Unique ID or name of the variable + * @param putVariableValuesRequest + */ + putVariableValues(identifier, putVariableValuesRequest, _options) { + return __async(this, null, function* () { + var _a, _b, _c; + let _config = _options || this.configuration; + if (identifier === null || identifier === void 0) { + throw new RequiredError("VariableApi", "putVariableValues", "identifier"); + } + if (putVariableValuesRequest === null || putVariableValuesRequest === void 0) { + throw new RequiredError("VariableApi", "putVariableValues", "putVariableValuesRequest"); + } + const localVarPath = "/api/rest/2.0/template/variables/{identifier}/update-values".replace("{identifier}", encodeURIComponent(String(identifier))); + const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.25.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.25.0"); + const contentType = ObjectSerializer.getPreferredMediaType([ + "application/json" + ]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = ObjectSerializer.stringify( + ObjectSerializer.serialize(putVariableValuesRequest, "PutVariableValuesRequest", ""), + contentType + ); + requestContext.setBody(serializedBody); + let authMethod; + authMethod = _config.authMethods["bearerAuth"]; + if (authMethod == null ? void 0 : authMethod.applySecurityAuthentication) { + yield authMethod == null ? void 0 : authMethod.applySecurityAuthentication(requestContext); + } + const defaultAuth = ((_a = _options == null ? void 0 : _options.authMethods) == null ? void 0 : _a.default) || ((_c = (_b = this.configuration) == null ? void 0 : _b.authMethods) == null ? void 0 : _c.default); + if (defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication) { + yield defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication(requestContext); + } + return requestContext; + }); + } + /** + * Search variables Version: 26.4.0.cl or later Allows searching for variables in ThoughtSpot. Requires ADMINISTRATION role. The CAN_MANAGE_VARIABLES permission allows you to manage Formula Variables in the current organization scope. The API endpoint supports searching variables by: * Variable identifier (ID or name) * Variable type * Name pattern (case-insensitive, supports % for wildcard) The search results can be formatted in three ways: * METADATA - Returns only variable metadata (default) * METADATA_AND_VALUES - Returns variable metadata and values The values can be filtered by scope: * org_identifier * principal_identifier * model_identifier + * @param searchVariablesRequest + */ + searchVariables(searchVariablesRequest, _options) { + return __async(this, null, function* () { + var _a, _b, _c; + let _config = _options || this.configuration; + if (searchVariablesRequest === null || searchVariablesRequest === void 0) { + throw new RequiredError("VariableApi", "searchVariables", "searchVariablesRequest"); + } + const localVarPath = "/api/rest/2.0/template/variables/search"; + const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.25.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.25.0"); + const contentType = ObjectSerializer.getPreferredMediaType([ + "application/json" + ]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = ObjectSerializer.stringify( + ObjectSerializer.serialize(searchVariablesRequest, "SearchVariablesRequest", ""), + contentType + ); + requestContext.setBody(serializedBody); + let authMethod; + authMethod = _config.authMethods["bearerAuth"]; + if (authMethod == null ? void 0 : authMethod.applySecurityAuthentication) { + yield authMethod == null ? void 0 : authMethod.applySecurityAuthentication(requestContext); + } + const defaultAuth = ((_a = _options == null ? void 0 : _options.authMethods) == null ? void 0 : _a.default) || ((_c = (_b = this.configuration) == null ? void 0 : _b.authMethods) == null ? void 0 : _c.default); + if (defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication) { + yield defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication(requestContext); + } + return requestContext; + }); + } + /** + * Update a variable\'s name Version: 26.4.0.cl or later Allows updating a variable\'s name in ThoughtSpot. Requires ADMINISTRATION role and TENANT scope. The CAN_MANAGE_VARIABLES permission allows you to manage Formula Variables in the current organization scope. The API endpoint allows updating: * The variable name + * @param identifier Unique id or name of the variable to update. + * @param updateVariableRequest + */ + updateVariable(identifier, updateVariableRequest, _options) { + return __async(this, null, function* () { + var _a, _b, _c; + let _config = _options || this.configuration; + if (identifier === null || identifier === void 0) { + throw new RequiredError("VariableApi", "updateVariable", "identifier"); + } + if (updateVariableRequest === null || updateVariableRequest === void 0) { + throw new RequiredError("VariableApi", "updateVariable", "updateVariableRequest"); + } + const localVarPath = "/api/rest/2.0/template/variables/{identifier}/update".replace("{identifier}", encodeURIComponent(String(identifier))); + const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.25.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.25.0"); + const contentType = ObjectSerializer.getPreferredMediaType([ + "application/json" + ]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = ObjectSerializer.stringify( + ObjectSerializer.serialize(updateVariableRequest, "UpdateVariableRequest", ""), + contentType + ); + requestContext.setBody(serializedBody); + let authMethod; + authMethod = _config.authMethods["bearerAuth"]; + if (authMethod == null ? void 0 : authMethod.applySecurityAuthentication) { + yield authMethod == null ? void 0 : authMethod.applySecurityAuthentication(requestContext); + } + const defaultAuth = ((_a = _options == null ? void 0 : _options.authMethods) == null ? void 0 : _a.default) || ((_c = (_b = this.configuration) == null ? void 0 : _b.authMethods) == null ? void 0 : _c.default); + if (defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication) { + yield defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication(requestContext); + } + return requestContext; + }); + } + /** + * Update values for multiple variables Version: 10.14.0.cl or later **Note:** This API endpoint is deprecated and will be removed from ThoughtSpot in a future release. Use [POST /api/rest/2.0/template/variables/{identifier}/update-values](/api/rest/2.0/template/variables/%7Bidentifier%7D/update-values) instead. Allows updating values for multiple variables in ThoughtSpot. Requires ADMINISTRATION role. The CAN_MANAGE_VARIABLES permission allows you to manage Formula Variables in the current organization scope. The API endpoint allows: * Adding new values to variables * Replacing existing values * Deleting values from variables When updating variable values, you need to specify: * The variable identifiers * The values to add/replace/remove for each variable * The operation to perform (ADD, REPLACE, REMOVE, RESET) Behaviour based on operation type: * ADD - Adds values to the variable if this is a list type variable, else same as replace. * REPLACE - Replaces all values of a given set of constraints with the current set of values. * REMOVE - Removes any values which match the set of conditions of the variables if this is a list type variable, else clears value. * RESET - Removes all constrains for a given variable, scope is ignored + * @param updateVariableValuesRequest + */ + updateVariableValues(updateVariableValuesRequest, _options) { + return __async(this, null, function* () { + var _a, _b, _c; + let _config = _options || this.configuration; + if (updateVariableValuesRequest === null || updateVariableValuesRequest === void 0) { + throw new RequiredError("VariableApi", "updateVariableValues", "updateVariableValuesRequest"); + } + const localVarPath = "/api/rest/2.0/template/variables/update-values"; + const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.25.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.25.0"); + const contentType = ObjectSerializer.getPreferredMediaType([ + "application/json" + ]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = ObjectSerializer.stringify( + ObjectSerializer.serialize(updateVariableValuesRequest, "UpdateVariableValuesRequest", ""), + contentType + ); + requestContext.setBody(serializedBody); + let authMethod; + authMethod = _config.authMethods["bearerAuth"]; + if (authMethod == null ? void 0 : authMethod.applySecurityAuthentication) { + yield authMethod == null ? void 0 : authMethod.applySecurityAuthentication(requestContext); + } + const defaultAuth = ((_a = _options == null ? void 0 : _options.authMethods) == null ? void 0 : _a.default) || ((_c = (_b = this.configuration) == null ? void 0 : _b.authMethods) == null ? void 0 : _c.default); + if (defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication) { + yield defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication(requestContext); + } + return requestContext; + }); + } +}; +var VariableApiResponseProcessor = class { + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to createVariable + * @throws ApiException if the response code was not in [200, 299] + */ + createVariable(response) { + return __async(this, null, function* () { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("200", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "Variable", + "" + ); + return body; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Invalid request.", body, response.headers); + } + if (isCodeInRange("401", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unexpected error", body, response.headers); + } + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "Variable", + "" + ); + return body; + } + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", yield response.getBodyAsAny(), response.headers); + }); + } + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to deleteVariable + * @throws ApiException if the response code was not in [200, 299] + */ + deleteVariable(response) { + return __async(this, null, function* () { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("204", response.httpStatusCode)) { + return; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Invalid request.", body, response.headers); + } + if (isCodeInRange("401", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unexpected error", body, response.headers); + } + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "void", + "" + ); + return body; + } + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", yield response.getBodyAsAny(), response.headers); + }); + } + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to deleteVariables + * @throws ApiException if the response code was not in [200, 299] + */ + deleteVariables(response) { + return __async(this, null, function* () { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("204", response.httpStatusCode)) { + return; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Invalid request.", body, response.headers); + } + if (isCodeInRange("401", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unexpected error", body, response.headers); + } + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "void", + "" + ); + return body; + } + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", yield response.getBodyAsAny(), response.headers); + }); + } + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to putVariableValues + * @throws ApiException if the response code was not in [200, 299] + */ + putVariableValues(response) { + return __async(this, null, function* () { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("204", response.httpStatusCode)) { + return; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Invalid request.", body, response.headers); + } + if (isCodeInRange("401", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unexpected error", body, response.headers); + } + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "void", + "" + ); + return body; + } + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", yield response.getBodyAsAny(), response.headers); + }); + } + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to searchVariables + * @throws ApiException if the response code was not in [200, 299] + */ + searchVariables(response) { + return __async(this, null, function* () { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("200", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "Array", + "" + ); + return body; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Invalid request.", body, response.headers); + } + if (isCodeInRange("401", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unexpected error", body, response.headers); + } + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "Array", + "" + ); + return body; + } + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", yield response.getBodyAsAny(), response.headers); + }); + } + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to updateVariable + * @throws ApiException if the response code was not in [200, 299] + */ + updateVariable(response) { + return __async(this, null, function* () { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("204", response.httpStatusCode)) { + return; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Invalid request.", body, response.headers); + } + if (isCodeInRange("401", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unexpected error", body, response.headers); + } + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "void", + "" + ); + return body; + } + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", yield response.getBodyAsAny(), response.headers); + }); + } + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to updateVariableValues + * @throws ApiException if the response code was not in [200, 299] + */ + updateVariableValues(response) { + return __async(this, null, function* () { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("204", response.httpStatusCode)) { + return; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Invalid request.", body, response.headers); + } + if (isCodeInRange("401", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unexpected error", body, response.headers); + } + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "void", + "" + ); + return body; + } + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", yield response.getBodyAsAny(), response.headers); + }); + } +}; + +// apis/VersionControlApi.ts +var VersionControlApiRequestFactory = class extends BaseAPIRequestFactory { + /** + * Version: 9.2.0.cl or later Commits TML files of metadata objects to the Git branch configured on your instance. Requires at least edit access to objects used in the commit operation. Before using this endpoint to push your commits: * Enable Git integration on your instance. * Make sure the Git repository and branch details are configured on your instance. For more information, see [Git integration documentation](https://developers.thoughtspot.com/docs/git-integration). + * @param commitBranchRequest + */ + commitBranch(commitBranchRequest, _options) { + return __async(this, null, function* () { + var _a, _b, _c; + let _config = _options || this.configuration; + if (commitBranchRequest === null || commitBranchRequest === void 0) { + throw new RequiredError("VersionControlApi", "commitBranch", "commitBranchRequest"); + } + const localVarPath = "/api/rest/2.0/vcs/git/branches/commit"; + const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.25.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.25.0"); + const contentType = ObjectSerializer.getPreferredMediaType([ + "application/json" + ]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = ObjectSerializer.stringify( + ObjectSerializer.serialize(commitBranchRequest, "CommitBranchRequest", ""), + contentType + ); + requestContext.setBody(serializedBody); + let authMethod; + authMethod = _config.authMethods["bearerAuth"]; + if (authMethod == null ? void 0 : authMethod.applySecurityAuthentication) { + yield authMethod == null ? void 0 : authMethod.applySecurityAuthentication(requestContext); + } + const defaultAuth = ((_a = _options == null ? void 0 : _options.authMethods) == null ? void 0 : _a.default) || ((_c = (_b = this.configuration) == null ? void 0 : _b.authMethods) == null ? void 0 : _c.default); + if (defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication) { + yield defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication(requestContext); + } + return requestContext; + }); + } + /** + * Version: 9.2.0.cl or later Allows you to connect a ThoughtSpot instance to a Git repository. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance on your instance, the `CAN_SETUP_VERSION_CONTROL` (**Can set up version control**) privilege. You can use this API endpoint to connect your ThoughtSpot development and production environments to the development and production branches of a Git repository. Before using this endpoint to connect your ThoughtSpot instance to a Git repository, check the following prerequisites: * You have a Git repository. If you are using GitHub, make sure you have a valid account and an access token to connect ThoughtSpot to GitHub. For information about generating a token, see [GitHub Documentation](https://docs.github.com/en/authentication/keeping-your-account-and-data-secure/managing-your-personal-access-tokens). * Your access token has `repo` scope that grants full access to public and private repositories. * Your Git repository has a branch that can be configured as a default branch in ThoughtSpot. For more information, see [Git integration documentation](https://developers.thoughtspot.com/docs/?pageid=git-integration). **Note**: ThoughtSpot supports only GitHub / itHub Enterprise for CI/CD. + * @param createConfigRequest + */ + createConfig(createConfigRequest, _options) { + return __async(this, null, function* () { + var _a, _b, _c; + let _config = _options || this.configuration; + if (createConfigRequest === null || createConfigRequest === void 0) { + throw new RequiredError("VersionControlApi", "createConfig", "createConfigRequest"); + } + const localVarPath = "/api/rest/2.0/vcs/git/config/create"; + const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.25.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.25.0"); + const contentType = ObjectSerializer.getPreferredMediaType([ + "application/json" + ]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = ObjectSerializer.stringify( + ObjectSerializer.serialize(createConfigRequest, "CreateConfigRequest", ""), + contentType + ); + requestContext.setBody(serializedBody); + let authMethod; + authMethod = _config.authMethods["bearerAuth"]; + if (authMethod == null ? void 0 : authMethod.applySecurityAuthentication) { + yield authMethod == null ? void 0 : authMethod.applySecurityAuthentication(requestContext); + } + const defaultAuth = ((_a = _options == null ? void 0 : _options.authMethods) == null ? void 0 : _a.default) || ((_c = (_b = this.configuration) == null ? void 0 : _b.authMethods) == null ? void 0 : _c.default); + if (defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication) { + yield defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication(requestContext); + } + return requestContext; + }); + } + /** + * Version: 9.2.0.cl or later Deletes Git repository configuration from your ThoughtSpot instance. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance on your instance, the `CAN_SETUP_VERSION_CONTROL` (**Can set up version control**) privilege. + * @param deleteConfigRequest + */ + deleteConfig(deleteConfigRequest, _options) { + return __async(this, null, function* () { + var _a, _b, _c; + let _config = _options || this.configuration; + if (deleteConfigRequest === null || deleteConfigRequest === void 0) { + throw new RequiredError("VersionControlApi", "deleteConfig", "deleteConfigRequest"); + } + const localVarPath = "/api/rest/2.0/vcs/git/config/delete"; + const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.25.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.25.0"); + const contentType = ObjectSerializer.getPreferredMediaType([ + "application/json" + ]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = ObjectSerializer.stringify( + ObjectSerializer.serialize(deleteConfigRequest, "DeleteConfigRequest", ""), + contentType + ); + requestContext.setBody(serializedBody); + let authMethod; + authMethod = _config.authMethods["bearerAuth"]; + if (authMethod == null ? void 0 : authMethod.applySecurityAuthentication) { + yield authMethod == null ? void 0 : authMethod.applySecurityAuthentication(requestContext); + } + const defaultAuth = ((_a = _options == null ? void 0 : _options.authMethods) == null ? void 0 : _a.default) || ((_c = (_b = this.configuration) == null ? void 0 : _b.authMethods) == null ? void 0 : _c.default); + if (defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication) { + yield defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication(requestContext); + } + return requestContext; + }); + } + /** + * Version: 9.2.0.cl or later Allows you to deploy a commit and publish TML content to your ThoughtSpot instance. Requires at least edit access to the objects used in the deploy operation. The API deploys the head of the branch unless a `commit_id` is specified in the API request. If the branch name is not defined in the request, the default branch is considered for deploying commits. For more information, see [Git integration documentation](https://developers.thoughtspot.com/docs/git-integration). + * @param deployCommitRequest + */ + deployCommit(deployCommitRequest, _options) { + return __async(this, null, function* () { + var _a, _b, _c; + let _config = _options || this.configuration; + if (deployCommitRequest === null || deployCommitRequest === void 0) { + throw new RequiredError("VersionControlApi", "deployCommit", "deployCommitRequest"); + } + const localVarPath = "/api/rest/2.0/vcs/git/commits/deploy"; + const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.25.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.25.0"); + const contentType = ObjectSerializer.getPreferredMediaType([ + "application/json" + ]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = ObjectSerializer.stringify( + ObjectSerializer.serialize(deployCommitRequest, "DeployCommitRequest", ""), + contentType + ); + requestContext.setBody(serializedBody); + let authMethod; + authMethod = _config.authMethods["bearerAuth"]; + if (authMethod == null ? void 0 : authMethod.applySecurityAuthentication) { + yield authMethod == null ? void 0 : authMethod.applySecurityAuthentication(requestContext); + } + const defaultAuth = ((_a = _options == null ? void 0 : _options.authMethods) == null ? void 0 : _a.default) || ((_c = (_b = this.configuration) == null ? void 0 : _b.authMethods) == null ? void 0 : _c.default); + if (defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication) { + yield defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication(requestContext); + } + return requestContext; + }); + } + /** + * Version: 9.2.0.cl or later Reverts TML objects to a previous commit specified in the API request. Requires at least edit access to objects. In the API request, specify the `commit_id`. If the branch name is not specified in the request, the API will consider the default branch configured on your instance. By default, the API reverts all objects. If the revert operation fails for one of the objects provided in the commit, the API returns an error and does not revert any object. For more information, see [Git integration documentation](https://developers.thoughtspot.com/docs/git-integration). + * @param commitId Commit id to which the object should be reverted + * @param revertCommitRequest + */ + revertCommit(commitId, revertCommitRequest, _options) { + return __async(this, null, function* () { + var _a, _b, _c; + let _config = _options || this.configuration; + if (commitId === null || commitId === void 0) { + throw new RequiredError("VersionControlApi", "revertCommit", "commitId"); + } + if (revertCommitRequest === null || revertCommitRequest === void 0) { + throw new RequiredError("VersionControlApi", "revertCommit", "revertCommitRequest"); + } + const localVarPath = "/api/rest/2.0/vcs/git/commits/{commit_id}/revert".replace("{commit_id}", encodeURIComponent(String(commitId))); + const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.25.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.25.0"); + const contentType = ObjectSerializer.getPreferredMediaType([ + "application/json" + ]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = ObjectSerializer.stringify( + ObjectSerializer.serialize(revertCommitRequest, "RevertCommitRequest", ""), + contentType + ); + requestContext.setBody(serializedBody); + let authMethod; + authMethod = _config.authMethods["bearerAuth"]; + if (authMethod == null ? void 0 : authMethod.applySecurityAuthentication) { + yield authMethod == null ? void 0 : authMethod.applySecurityAuthentication(requestContext); + } + const defaultAuth = ((_a = _options == null ? void 0 : _options.authMethods) == null ? void 0 : _a.default) || ((_c = (_b = this.configuration) == null ? void 0 : _b.authMethods) == null ? void 0 : _c.default); + if (defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication) { + yield defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication(requestContext); + } + return requestContext; + }); + } + /** + * Version: 9.2.0.cl or later Gets a list of commits for a given metadata object. Requires `DATAMANAGEMENT` (**Can manage data**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance on your instance, the `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` (**Can manage data models**) privilege and edit access to the metadata objects. + * @param searchCommitsRequest + */ + searchCommits(searchCommitsRequest, _options) { + return __async(this, null, function* () { + var _a, _b, _c; + let _config = _options || this.configuration; + if (searchCommitsRequest === null || searchCommitsRequest === void 0) { + throw new RequiredError("VersionControlApi", "searchCommits", "searchCommitsRequest"); + } + const localVarPath = "/api/rest/2.0/vcs/git/commits/search"; + const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.25.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.25.0"); + const contentType = ObjectSerializer.getPreferredMediaType([ + "application/json" + ]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = ObjectSerializer.stringify( + ObjectSerializer.serialize(searchCommitsRequest, "SearchCommitsRequest", ""), + contentType + ); + requestContext.setBody(serializedBody); + let authMethod; + authMethod = _config.authMethods["bearerAuth"]; + if (authMethod == null ? void 0 : authMethod.applySecurityAuthentication) { + yield authMethod == null ? void 0 : authMethod.applySecurityAuthentication(requestContext); + } + const defaultAuth = ((_a = _options == null ? void 0 : _options.authMethods) == null ? void 0 : _a.default) || ((_c = (_b = this.configuration) == null ? void 0 : _b.authMethods) == null ? void 0 : _c.default); + if (defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication) { + yield defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication(requestContext); + } + return requestContext; + }); + } + /** + * Version: 9.2.0.cl or later Gets Git repository connections configured on the ThoughtSpot instance. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance on your instance, the `CAN_SETUP_VERSION_CONTROL` (**Can set up version control**) privilege. + * @param searchConfigRequest + */ + searchConfig(searchConfigRequest, _options) { + return __async(this, null, function* () { + var _a, _b, _c; + let _config = _options || this.configuration; + if (searchConfigRequest === null || searchConfigRequest === void 0) { + throw new RequiredError("VersionControlApi", "searchConfig", "searchConfigRequest"); + } + const localVarPath = "/api/rest/2.0/vcs/git/config/search"; + const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.25.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.25.0"); + const contentType = ObjectSerializer.getPreferredMediaType([ + "application/json" + ]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = ObjectSerializer.stringify( + ObjectSerializer.serialize(searchConfigRequest, "SearchConfigRequest", ""), + contentType + ); + requestContext.setBody(serializedBody); + let authMethod; + authMethod = _config.authMethods["bearerAuth"]; + if (authMethod == null ? void 0 : authMethod.applySecurityAuthentication) { + yield authMethod == null ? void 0 : authMethod.applySecurityAuthentication(requestContext); + } + const defaultAuth = ((_a = _options == null ? void 0 : _options.authMethods) == null ? void 0 : _a.default) || ((_c = (_b = this.configuration) == null ? void 0 : _b.authMethods) == null ? void 0 : _c.default); + if (defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication) { + yield defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication(requestContext); + } + return requestContext; + }); + } + /** + * Version: 9.2.0.cl or later Updates Git repository configuration settings. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance on your instance, the `CAN_SETUP_VERSION_CONTROL` (**Can set up version control**) privilege. + * @param updateConfigRequest + */ + updateConfig(updateConfigRequest, _options) { + return __async(this, null, function* () { + var _a, _b, _c; + let _config = _options || this.configuration; + if (updateConfigRequest === null || updateConfigRequest === void 0) { + throw new RequiredError("VersionControlApi", "updateConfig", "updateConfigRequest"); + } + const localVarPath = "/api/rest/2.0/vcs/git/config/update"; + const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.25.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.25.0"); + const contentType = ObjectSerializer.getPreferredMediaType([ + "application/json" + ]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = ObjectSerializer.stringify( + ObjectSerializer.serialize(updateConfigRequest, "UpdateConfigRequest", ""), + contentType + ); + requestContext.setBody(serializedBody); + let authMethod; + authMethod = _config.authMethods["bearerAuth"]; + if (authMethod == null ? void 0 : authMethod.applySecurityAuthentication) { + yield authMethod == null ? void 0 : authMethod.applySecurityAuthentication(requestContext); + } + const defaultAuth = ((_a = _options == null ? void 0 : _options.authMethods) == null ? void 0 : _a.default) || ((_c = (_b = this.configuration) == null ? void 0 : _b.authMethods) == null ? void 0 : _c.default); + if (defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication) { + yield defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication(requestContext); + } + return requestContext; + }); + } + /** + * Version: 9.2.0.cl or later Validates the content of your source branch against the objects in your destination environment. Before merging content from your source branch to the destination branch, run this API operation from your destination environment and ensure that the changes from the source branch function in the destination environment. Requires `DATAMANAGEMENT` (**Can manage data**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance on your instance, the `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` (**Can manage data models**) privilege and edit access to the metadata objects. + * @param validateMergeRequest + */ + validateMerge(validateMergeRequest, _options) { + return __async(this, null, function* () { + var _a, _b, _c; + let _config = _options || this.configuration; + if (validateMergeRequest === null || validateMergeRequest === void 0) { + throw new RequiredError("VersionControlApi", "validateMerge", "validateMergeRequest"); + } + const localVarPath = "/api/rest/2.0/vcs/git/branches/validate"; + const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.25.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.25.0"); + const contentType = ObjectSerializer.getPreferredMediaType([ + "application/json" + ]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = ObjectSerializer.stringify( + ObjectSerializer.serialize(validateMergeRequest, "ValidateMergeRequest", ""), + contentType + ); + requestContext.setBody(serializedBody); + let authMethod; + authMethod = _config.authMethods["bearerAuth"]; + if (authMethod == null ? void 0 : authMethod.applySecurityAuthentication) { + yield authMethod == null ? void 0 : authMethod.applySecurityAuthentication(requestContext); + } + const defaultAuth = ((_a = _options == null ? void 0 : _options.authMethods) == null ? void 0 : _a.default) || ((_c = (_b = this.configuration) == null ? void 0 : _b.authMethods) == null ? void 0 : _c.default); + if (defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication) { + yield defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication(requestContext); + } + return requestContext; + }); + } +}; +var VersionControlApiResponseProcessor = class { + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to commitBranch + * @throws ApiException if the response code was not in [200, 299] + */ + commitBranch(response) { + return __async(this, null, function* () { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("200", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "CommitResponse", + "" + ); + return body; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Invalid request.", body, response.headers); + } + if (isCodeInRange("401", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unexpected error", body, response.headers); + } + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "CommitResponse", + "" + ); + return body; + } + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", yield response.getBodyAsAny(), response.headers); + }); + } + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to createConfig + * @throws ApiException if the response code was not in [200, 299] + */ + createConfig(response) { + return __async(this, null, function* () { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("200", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "RepoConfigObject", + "" + ); + return body; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Invalid request.", body, response.headers); + } + if (isCodeInRange("401", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unexpected error", body, response.headers); + } + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "RepoConfigObject", + "" + ); + return body; + } + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", yield response.getBodyAsAny(), response.headers); + }); + } + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to deleteConfig + * @throws ApiException if the response code was not in [200, 299] + */ + deleteConfig(response) { + return __async(this, null, function* () { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("204", response.httpStatusCode)) { + return; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Invalid request.", body, response.headers); + } + if (isCodeInRange("401", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unexpected error", body, response.headers); + } + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "void", + "" + ); + return body; + } + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", yield response.getBodyAsAny(), response.headers); + }); + } + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to deployCommit + * @throws ApiException if the response code was not in [200, 299] + */ + deployCommit(response) { + return __async(this, null, function* () { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("200", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "Array", + "" + ); + return body; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Invalid request.", body, response.headers); + } + if (isCodeInRange("401", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unexpected error", body, response.headers); + } + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "Array", + "" + ); + return body; + } + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", yield response.getBodyAsAny(), response.headers); + }); + } + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to revertCommit + * @throws ApiException if the response code was not in [200, 299] + */ + revertCommit(response) { + return __async(this, null, function* () { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("200", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "RevertResponse", + "" + ); + return body; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Invalid request.", body, response.headers); + } + if (isCodeInRange("401", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unexpected error", body, response.headers); + } + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "RevertResponse", + "" + ); + return body; + } + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", yield response.getBodyAsAny(), response.headers); + }); + } + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to searchCommits + * @throws ApiException if the response code was not in [200, 299] + */ + searchCommits(response) { + return __async(this, null, function* () { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("200", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "Array", + "" + ); + return body; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Invalid request.", body, response.headers); + } + if (isCodeInRange("401", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unexpected error", body, response.headers); + } + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "Array", + "" + ); + return body; + } + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", yield response.getBodyAsAny(), response.headers); + }); + } + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to searchConfig + * @throws ApiException if the response code was not in [200, 299] + */ + searchConfig(response) { + return __async(this, null, function* () { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("200", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "Array", + "" + ); + return body; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Invalid request.", body, response.headers); + } + if (isCodeInRange("401", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unexpected error", body, response.headers); + } + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "Array", + "" + ); + return body; + } + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", yield response.getBodyAsAny(), response.headers); + }); + } + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to updateConfig + * @throws ApiException if the response code was not in [200, 299] + */ + updateConfig(response) { + return __async(this, null, function* () { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("200", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "RepoConfigObject", + "" + ); + return body; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Invalid request.", body, response.headers); + } + if (isCodeInRange("401", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unexpected error", body, response.headers); + } + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "RepoConfigObject", + "" + ); + return body; + } + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", yield response.getBodyAsAny(), response.headers); + }); + } + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to validateMerge + * @throws ApiException if the response code was not in [200, 299] + */ + validateMerge(response) { + return __async(this, null, function* () { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("200", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "Array", + "" + ); + return body; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Invalid request.", body, response.headers); + } + if (isCodeInRange("401", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unexpected error", body, response.headers); + } + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "Array", + "" + ); + return body; + } + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", yield response.getBodyAsAny(), response.headers); + }); + } +}; + +// apis/WebhooksApi.ts +var WebhooksApiRequestFactory = class extends BaseAPIRequestFactory { + /** + * Version: 10.14.0.cl or later Creates a new webhook configuration to receive notifications for specified events. The webhook will be triggered when the configured events occur in the system. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) or `DEVELOPER` (**Has developer privilege**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, users with `CAN_MANAGE_WEBHOOKS` (**Can manage webhooks**) privilege are also authorized to perform this action. + * @param createWebhookConfigurationRequest + */ + createWebhookConfiguration(createWebhookConfigurationRequest, _options) { + return __async(this, null, function* () { + var _a, _b, _c; + let _config = _options || this.configuration; + if (createWebhookConfigurationRequest === null || createWebhookConfigurationRequest === void 0) { + throw new RequiredError("WebhooksApi", "createWebhookConfiguration", "createWebhookConfigurationRequest"); + } + const localVarPath = "/api/rest/2.0/webhooks/create"; + const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.25.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.25.0"); + const contentType = ObjectSerializer.getPreferredMediaType([ + "application/json" + ]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = ObjectSerializer.stringify( + ObjectSerializer.serialize(createWebhookConfigurationRequest, "CreateWebhookConfigurationRequest", ""), + contentType + ); + requestContext.setBody(serializedBody); + let authMethod; + authMethod = _config.authMethods["bearerAuth"]; + if (authMethod == null ? void 0 : authMethod.applySecurityAuthentication) { + yield authMethod == null ? void 0 : authMethod.applySecurityAuthentication(requestContext); + } + const defaultAuth = ((_a = _options == null ? void 0 : _options.authMethods) == null ? void 0 : _a.default) || ((_c = (_b = this.configuration) == null ? void 0 : _b.authMethods) == null ? void 0 : _c.default); + if (defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication) { + yield defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication(requestContext); + } + return requestContext; + }); + } + /** + * Version: 10.14.0.cl or later Deletes one or more webhook configurations by their unique id or name. Returns status of each deletion operation, including successfully deleted webhooks and any failures with error details. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) or `DEVELOPER` (**Has developer privilege**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, users with `CAN_MANAGE_WEBHOOKS` (**Can manage webhooks**) privilege are also authorized to perform this action. + * @param deleteWebhookConfigurationsRequest + */ + deleteWebhookConfigurations(deleteWebhookConfigurationsRequest, _options) { + return __async(this, null, function* () { + var _a, _b, _c; + let _config = _options || this.configuration; + if (deleteWebhookConfigurationsRequest === null || deleteWebhookConfigurationsRequest === void 0) { + throw new RequiredError("WebhooksApi", "deleteWebhookConfigurations", "deleteWebhookConfigurationsRequest"); + } + const localVarPath = "/api/rest/2.0/webhooks/delete"; + const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.25.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.25.0"); + const contentType = ObjectSerializer.getPreferredMediaType([ + "application/json" + ]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = ObjectSerializer.stringify( + ObjectSerializer.serialize(deleteWebhookConfigurationsRequest, "DeleteWebhookConfigurationsRequest", ""), + contentType + ); + requestContext.setBody(serializedBody); + let authMethod; + authMethod = _config.authMethods["bearerAuth"]; + if (authMethod == null ? void 0 : authMethod.applySecurityAuthentication) { + yield authMethod == null ? void 0 : authMethod.applySecurityAuthentication(requestContext); + } + const defaultAuth = ((_a = _options == null ? void 0 : _options.authMethods) == null ? void 0 : _a.default) || ((_c = (_b = this.configuration) == null ? void 0 : _b.authMethods) == null ? void 0 : _c.default); + if (defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication) { + yield defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication(requestContext); + } + return requestContext; + }); + } + /** + * Version: 10.14.0.cl or later Searches for webhook configurations based on various criteria such as Org, webhook identifier, event type, with support for pagination and sorting. Returns matching webhook configurations with their complete details. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) or `DEVELOPER` (**Has developer privilege**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, users with `CAN_MANAGE_WEBHOOKS` (**Can manage webhooks**) privilege are also authorized to perform this action. + * @param searchWebhookConfigurationsRequest + */ + searchWebhookConfigurations(searchWebhookConfigurationsRequest, _options) { + return __async(this, null, function* () { + var _a, _b, _c; + let _config = _options || this.configuration; + if (searchWebhookConfigurationsRequest === null || searchWebhookConfigurationsRequest === void 0) { + throw new RequiredError("WebhooksApi", "searchWebhookConfigurations", "searchWebhookConfigurationsRequest"); + } + const localVarPath = "/api/rest/2.0/webhooks/search"; + const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.25.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.25.0"); + const contentType = ObjectSerializer.getPreferredMediaType([ + "application/json" + ]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = ObjectSerializer.stringify( + ObjectSerializer.serialize(searchWebhookConfigurationsRequest, "SearchWebhookConfigurationsRequest", ""), + contentType + ); + requestContext.setBody(serializedBody); + let authMethod; + authMethod = _config.authMethods["bearerAuth"]; + if (authMethod == null ? void 0 : authMethod.applySecurityAuthentication) { + yield authMethod == null ? void 0 : authMethod.applySecurityAuthentication(requestContext); + } + const defaultAuth = ((_a = _options == null ? void 0 : _options.authMethods) == null ? void 0 : _a.default) || ((_c = (_b = this.configuration) == null ? void 0 : _b.authMethods) == null ? void 0 : _c.default); + if (defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication) { + yield defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication(requestContext); + } + return requestContext; + }); + } + /** + * Version: 10.14.0.cl or later Updates an existing webhook configuration by its unique id or name. Only the provided fields will be updated. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) or `DEVELOPER` (**Has developer privilege**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, users with `CAN_MANAGE_WEBHOOKS` (**Can manage webhooks**) privilege are also authorized to perform this action. + * @param webhookIdentifier Unique ID or name of the webhook configuration. + * @param updateWebhookConfigurationRequest + */ + updateWebhookConfiguration(webhookIdentifier, updateWebhookConfigurationRequest, _options) { + return __async(this, null, function* () { + var _a, _b, _c; + let _config = _options || this.configuration; + if (webhookIdentifier === null || webhookIdentifier === void 0) { + throw new RequiredError("WebhooksApi", "updateWebhookConfiguration", "webhookIdentifier"); + } + if (updateWebhookConfigurationRequest === null || updateWebhookConfigurationRequest === void 0) { + throw new RequiredError("WebhooksApi", "updateWebhookConfiguration", "updateWebhookConfigurationRequest"); + } + const localVarPath = "/api/rest/2.0/webhooks/{webhook_identifier}/update".replace("{webhook_identifier}", encodeURIComponent(String(webhookIdentifier))); + const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.25.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.25.0"); + const contentType = ObjectSerializer.getPreferredMediaType([ + "application/json" + ]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = ObjectSerializer.stringify( + ObjectSerializer.serialize(updateWebhookConfigurationRequest, "UpdateWebhookConfigurationRequest", ""), + contentType + ); + requestContext.setBody(serializedBody); + let authMethod; + authMethod = _config.authMethods["bearerAuth"]; + if (authMethod == null ? void 0 : authMethod.applySecurityAuthentication) { + yield authMethod == null ? void 0 : authMethod.applySecurityAuthentication(requestContext); + } + const defaultAuth = ((_a = _options == null ? void 0 : _options.authMethods) == null ? void 0 : _a.default) || ((_c = (_b = this.configuration) == null ? void 0 : _b.authMethods) == null ? void 0 : _c.default); + if (defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication) { + yield defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication(requestContext); + } + return requestContext; + }); + } +}; +var WebhooksApiResponseProcessor = class { + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to createWebhookConfiguration + * @throws ApiException if the response code was not in [200, 299] + */ + createWebhookConfiguration(response) { + return __async(this, null, function* () { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("200", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "WebhookResponse", + "" + ); + return body; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Invalid request.", body, response.headers); + } + if (isCodeInRange("401", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unexpected error", body, response.headers); + } + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "WebhookResponse", + "" + ); + return body; + } + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", yield response.getBodyAsAny(), response.headers); + }); + } + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to deleteWebhookConfigurations + * @throws ApiException if the response code was not in [200, 299] + */ + deleteWebhookConfigurations(response) { + return __async(this, null, function* () { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("200", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "WebhookDeleteResponse", + "" + ); + return body; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Invalid request.", body, response.headers); + } + if (isCodeInRange("401", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unexpected error", body, response.headers); + } + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "WebhookDeleteResponse", + "" + ); + return body; + } + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", yield response.getBodyAsAny(), response.headers); + }); + } + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to searchWebhookConfigurations + * @throws ApiException if the response code was not in [200, 299] + */ + searchWebhookConfigurations(response) { + return __async(this, null, function* () { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("200", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "WebhookSearchResponse", + "" + ); + return body; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Invalid request.", body, response.headers); + } + if (isCodeInRange("401", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unexpected error", body, response.headers); + } + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "WebhookSearchResponse", + "" + ); + return body; + } + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", yield response.getBodyAsAny(), response.headers); + }); + } + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to updateWebhookConfiguration + * @throws ApiException if the response code was not in [200, 299] + */ + updateWebhookConfiguration(response) { + return __async(this, null, function* () { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("204", response.httpStatusCode)) { + return; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Invalid request.", body, response.headers); + } + if (isCodeInRange("401", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unexpected error", body, response.headers); + } + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "void", + "" + ); + return body; + } + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", yield response.getBodyAsAny(), response.headers); + }); + } +}; + +// types/ObservableAPI.ts +var ObservableAIApi = class { + constructor(configuration, requestFactory, responseProcessor) { + this.configuration = configuration; + this.requestFactory = requestFactory || new AIApiRequestFactory(configuration); + this.responseProcessor = responseProcessor || new AIApiResponseProcessor(); + } + /** + * Version: 26.2.0.cl or later Creates a new Spotter agent conversation based on the provided context and settings. The endpoint was in Beta from 26.2.0.cl through 26.4.0.cl. Requires `CAN_USE_SPOTTER` privilege and at least view access to the metadata object specified in the request. #### Usage guidelines The request must include the `metadata_context` parameter to define the conversation context. The context type can be one of: - `DATA_SOURCE` *(available from 26.5.0.cl)*: targets a specific data source. Provide `data_source_identifier` in `data_source_context` for a single data source, or `data_source_identifiers` for multi-data-source context. The deprecated `guid` field is accepted for backwards compatibility. - `AUTO_MODE` *(available from 26.5.0.cl)*: automatically discovers and selects the most relevant datasets for the user\'s queries. > **Note for callers on versions 26.2.0.cl – 26.4.0.cl (Beta):** use the lowercase `data_source` enum value with the `guid` field instead of the above. Example: `{ \"type\": \"data_source\", \"data_source_context\": { \"guid\": \"\" } }`. The `conversation_settings` parameter controls which Spotter capabilities are enabled for the conversation: - `enable_contextual_change_analysis` (default: `true`, **deprecated from 26.2.0.cl**) — always enabled in Spotter 3; setting this to `false` has no effect on versions >= 26.2.0.cl - `enable_natural_language_answer_generation` (default: `true`, **deprecated from 26.2.0.cl**) — always enabled in Spotter 3; setting this to `false` has no effect on versions >= 26.2.0.cl - `enable_reasoning` (default: `true`, **deprecated from 26.2.0.cl**) — always enabled in Spotter 3; setting this to `false` has no effect on versions >= 26.2.0.cl - `enable_save_chat` (default: `false`, *available from 26.5.0.cl*) — enables saving the conversation for later retrieval via conversation history If the request is successful, the response includes a unique `conversation_identifier` that must be passed to `sendAgentConversationMessage` or `sendAgentConversationMessageStreaming` to send messages within this conversation. The response also includes `conversation_id` with the same value for backwards compatibility; use `conversation_identifier` for new integrations. #### Example request ```json { \"metadata_context\": { \"type\": \"DATA_SOURCE\", \"data_source_context\": { \"data_source_identifier\": \"a1b2c3d4-e5f6-7890-abcd-ef1234567890\" } }, \"conversation_settings\": {} } ``` #### Error responses | Code | Description | | ---- | --------------------------------------------------------------------------------------------------------------------------------------- | | 401 | Unauthorized — authentication token is missing, expired, or invalid. | | 403 | Forbidden — the authenticated user does not have `CAN_USE_SPOTTER` privilege or lacks view permission on the specified metadata object. | > ###### Note: > > - This endpoint was in Beta from 26.2.0.cl through 26.4.0.cl and is Generally Available from version 26.5.0.cl. > - This endpoint requires Spotter - please contact ThoughtSpot support to enable Spotter on your cluster. + * @param createAgentConversationRequest + */ + createAgentConversation(createAgentConversationRequest, _options) { + const requestContextPromise = this.requestFactory.createAgentConversation(createAgentConversationRequest, _options); + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx) => middleware.pre(ctx))); + } + return middlewarePreObservable.pipe(mergeMap((ctx) => this.configuration.httpApi.send(ctx))).pipe(mergeMap((response) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp) => this.responseProcessor.createAgentConversation(rsp))); + })); + } + /** + * Version: 10.4.0.cl or later Creates a new conversation session tied to a specific data model for AI-driven natural language querying. Requires `CAN_USE_SPOTTER` privilege and at least view access to the metadata object specified in the request. #### Usage guidelines The request must include: - `metadata_identifier`: the unique ID of the data source that provides context for the conversation Optionally, you can provide: - `tokens`: a token string to set initial context for the conversation (e.g., `\"[sales],[item type],[state]\"`) If the request is successful, ThoughtSpot returns a unique `conversation_identifier` that must be passed to `sendMessage` to continue the conversation. #### Error responses | Code | Description | |------|-------------| | 401 | Unauthorized — authentication token is missing, expired, or invalid. | | 403 | Forbidden — the authenticated user does not have `CAN_USE_SPOTTER` privilege or lacks view permission on the specified metadata object. | > ###### Note: > * This endpoint is currently in Beta. Breaking changes may be introduced before the endpoint is made Generally Available. > * This endpoint requires Spotter - please contact ThoughtSpot support to enable Spotter on your cluster. + * @param createConversationRequest + */ + createConversation(createConversationRequest, _options) { + const requestContextPromise = this.requestFactory.createConversation(createConversationRequest, _options); + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx) => middleware.pre(ctx))); + } + return middlewarePreObservable.pipe(mergeMap((ctx) => this.configuration.httpApi.send(ctx))).pipe(mergeMap((response) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp) => this.responseProcessor.createConversation(rsp))); + })); + } + /** + * Version: 10.15.0.cl or later Suggests the most relevant data sources for a given natural language query, ranked by confidence with LLM-generated reasoning. Requires `CAN_USE_SPOTTER` privilege and at least view-level access to the underlying metadata entities referenced in the response. #### Usage guidelines The request must include: - `query`: the natural language question to find relevant data sources for If the request is successful, the API returns a ranked list of suggested data sources, each containing: - `confidence`: a float score indicating the model\'s confidence in the relevance of the suggestion - `details`: metadata about the data source - `data_source_identifier`: the unique ID of the data source - `data_source_name`: the display name of the data source - `description`: a description of the data source - `reasoning`: LLM-generated rationale explaining why the data source was recommended #### Error responses | Code | Description | |------|--------------------------------------------------------------------------------------------------------------------------------------------| | 401 | Unauthorized — authentication token is missing, expired, or invalid. | | 403 | Forbidden — the authenticated user does not have `CAN_USE_SPOTTER` privilege or lacks view permission on the underlying metadata entities. | > ###### Note: > * This endpoint is currently in Beta. Breaking changes may be introduced before it is made Generally Available. > * This endpoint requires Spotter — please contact ThoughtSpot Support to enable Spotter on your cluster. + * @param getDataSourceSuggestionsRequest + */ + getDataSourceSuggestions(getDataSourceSuggestionsRequest, _options) { + const requestContextPromise = this.requestFactory.getDataSourceSuggestions(getDataSourceSuggestionsRequest, _options); + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx) => middleware.pre(ctx))); + } + return middlewarePreObservable.pipe(mergeMap((ctx) => this.configuration.httpApi.send(ctx))).pipe(mergeMap((response) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp) => this.responseProcessor.getDataSourceSuggestions(rsp))); + })); + } + /** + * Version: 10.15.0.cl or later Retrieves existing natural language (NL) instructions configured for a specific data model. These instructions guide the AI system in understanding data context and generating more accurate responses. Requires `CAN_USE_SPOTTER` privilege, at least view access on the data model, and a bearer token corresponding to the org where the data model exists. #### Usage guidelines The request must include: - `data_source_identifier`: the unique ID of the data model to retrieve instructions for If the request is successful, the API returns: - `nl_instructions_info`: an array of instruction objects, each containing: - `instructions`: the configured text instructions for AI processing - `scope`: the scope of the instruction — currently only `GLOBAL` is supported #### Instructions scope - **GLOBAL**: Instructions that apply globally across the system on the given data-model (currently only global instructions are supported) #### Error responses | Code | Description | |------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| | 401 | Unauthorized — authentication token is missing, expired, or invalid. | | 403 | Forbidden — the authenticated user does not have `CAN_USE_SPOTTER` privilege, lacks view access on the data model, or the bearer token does not correspond to the org where the data model exists. | > ###### Note: > > - To use this API, the user needs at least view access on the data model, and must use the bearer token corresponding to the org where the data model exists. > - This endpoint is currently in Beta. Breaking changes may be introduced before the endpoint is made Generally Available. > - Available from version 10.15.0.cl and later. > - This endpoint requires Spotter — please contact ThoughtSpot Support to enable Spotter on your cluster. > - Use this API to review currently configured instructions before modifying them with `setNLInstructions`. + * @param getNLInstructionsRequest + */ + getNLInstructions(getNLInstructionsRequest, _options) { + const requestContextPromise = this.requestFactory.getNLInstructions(getNLInstructionsRequest, _options); + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx) => middleware.pre(ctx))); + } + return middlewarePreObservable.pipe(mergeMap((ctx) => this.configuration.httpApi.send(ctx))).pipe(mergeMap((response) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp) => this.responseProcessor.getNLInstructions(rsp))); + })); + } + /** + * Version: 10.13.0.cl or later Breaks down a natural language query into a series of smaller analytical sub-questions, each mapped to a relevant data source. Requires `CAN_USE_SPOTTER` privilege and at least view-level access to the referenced metadata objects. #### Usage guidelines The request must include: - `query`: the natural language question to decompose into analytical sub-questions - `metadata_context`: at least one of the following context identifiers to guide question generation: - `conversation_identifier` — an existing conversation session ID - `answer_identifiers` — a list of Answer GUIDs - `liveboard_identifiers` — a list of Liveboard GUIDs - `data_source_identifiers` — a list of data source GUIDs Optional parameters for refining the output: - `ai_context`: additional context to improve response quality - `content` — supplementary text or CSV data as string input - `instructions` — custom text instructions for the AI system - `limit_relevant_questions`: maximum number of questions to return (default: `5`) - `bypass_cache`: if `true`, forces fresh computation instead of returning cached results If the request is successful, the API returns a list of relevant analytical questions, each containing: - `query`: the generated sub-question - `data_source_identifier`: the unique ID of the data source the question targets - `data_source_name`: the display name of the corresponding data source #### Error responses | Code | Description | |------|---------------------------------------------------------------------------------------------------------------------------------------| | 401 | Unauthorized — authentication token is missing, expired, or invalid. | | 403 | Forbidden — the authenticated user does not have `CAN_USE_SPOTTER` privilege or lacks view access to the referenced metadata objects. | > ###### Note: > * This endpoint is currently in Beta. Breaking changes may be introduced before the endpoint is made Generally Available. > * This endpoint requires Spotter - please contact ThoughtSpot support to enable Spotter on your cluster. + * @param getRelevantQuestionsRequest + */ + getRelevantQuestions(getRelevantQuestionsRequest, _options) { + const requestContextPromise = this.requestFactory.getRelevantQuestions(getRelevantQuestionsRequest, _options); + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx) => middleware.pre(ctx))); + } + return middlewarePreObservable.pipe(mergeMap((ctx) => this.configuration.httpApi.send(ctx))).pipe(mergeMap((response) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp) => this.responseProcessor.getRelevantQuestions(rsp))); + })); + } + /** + * Version: 10.7.0.cl or later **Deprecated** — Use `getRelevantQuestions` instead (available from 10.13.0.cl). Breaks down a topical or goal-oriented natural language question into smaller, actionable analytical sub-questions, each mapped to a relevant data source for independent execution. Requires `CAN_USE_SPOTTER` privilege and at least view-level access to the referenced metadata objects. #### Usage guidelines The request accepts the following parameters: - `nlsRequest`: contains the user `query` to decompose, along with optional `instructions` and `bypassCache` flag - `worksheetIds`: list of data source identifiers to scope the decomposition - `answerIds`: list of Answer GUIDs whose data guides the response - `liveboardIds`: list of Liveboard GUIDs whose data guides the response - `conversationId`: an existing conversation session ID for context continuity - `content`: supplementary text or CSV data to improve response quality - `maxDecomposedQueries`: maximum number of sub-questions to return (default: `5`) If the request is successful, the API returns a `decomposedQueryResponse` containing a list of `decomposedQueries`, each with: - `query`: the generated analytical sub-question - `worksheetId`: the unique ID of the data source the question targets - `worksheetName`: the display name of the corresponding data source #### Error responses | Code | Description | |------|---------------------------------------------------------------------------------------------------------------------------------------| | 401 | Unauthorized — authentication token is missing, expired, or invalid. | | 403 | Forbidden — the authenticated user does not have `CAN_USE_SPOTTER` privilege or lacks view access to the referenced metadata objects. | > ###### Note: > * This endpoint is deprecated since 10.13.0.cl. Use `getRelevantQuestions` for new integrations. > * This endpoint is currently in Beta. Breaking changes may be introduced before the endpoint is made Generally Available. > * This endpoint requires Spotter — please contact ThoughtSpot support to enable Spotter on your cluster. + * @param queryGetDecomposedQueryRequest + */ + queryGetDecomposedQuery(queryGetDecomposedQueryRequest, _options) { + const requestContextPromise = this.requestFactory.queryGetDecomposedQuery(queryGetDecomposedQueryRequest, _options); + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx) => middleware.pre(ctx))); + } + return middlewarePreObservable.pipe(mergeMap((ctx) => this.configuration.httpApi.send(ctx))).pipe(mergeMap((response) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp) => this.responseProcessor.queryGetDecomposedQuery(rsp))); + })); + } + /** + * Version: 26.5.0.cl or later Sends natural language messages to an existing Spotter agent conversation and returns the complete response synchronously. Requires `CAN_USE_SPOTTER` privilege and access to the metadata object associated with the conversation. The user must have access to the conversation session referenced by `conversation_identifier`. A conversation must first be created using the `createAgentConversation` API. #### Usage guidelines The request must include: - `conversation_identifier`: the unique session ID returned by `createAgentConversation`, used for context continuity and message tracking - `messages`: an array of one or more text messages to send to the agent The API returns an array of response objects, each containing: - `type`: the kind of response — `text`, `answer`, or `error` - `message`: the main content of the response - `metadata`: additional information depending on the message type (e.g., answer metadata includes analytics and visualization details) #### Error responses | Code | Description | |------|----------------------------------------------------------------------------------------------------------------------------------| | 401 | Unauthorized — authentication token is missing, expired, or invalid. | | 403 | Forbidden — the authenticated user does not have `CAN_USE_SPOTTER` privilege or lacks permission on the referenced conversation. | > ###### Note: > > - This endpoint is Generally Available from version 26.5.0.cl. > - This endpoint requires Spotter - please contact ThoughtSpot support to enable Spotter on your cluster. > - For real-time streamed responses, use `sendAgentConversationMessageStreaming` instead. + * @param conversationIdentifier Unique identifier for the conversation (used to track context) + * @param sendAgentConversationMessageRequest + */ + sendAgentConversationMessage(conversationIdentifier, sendAgentConversationMessageRequest, _options) { + const requestContextPromise = this.requestFactory.sendAgentConversationMessage(conversationIdentifier, sendAgentConversationMessageRequest, _options); + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx) => middleware.pre(ctx))); + } + return middlewarePreObservable.pipe(mergeMap((ctx) => this.configuration.httpApi.send(ctx))).pipe(mergeMap((response) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp) => this.responseProcessor.sendAgentConversationMessage(rsp))); + })); + } + /** + * Version: 26.5.0.cl or later Sends one or more natural language messages to an existing Spotter agent conversation and returns the response as a real-time Server-Sent Events stream. Requires `CAN_USE_SPOTTER` privilege and access to the metadata object associated with the conversation. The user must have access to the conversation session referenced by `conversation_identifier`. A conversation must first be created using the `createAgentConversation` API. #### Usage guidelines The request must include: - `conversation_identifier`: the unique session ID returned by `createAgentConversation`, used for context continuity and message tracking - `messages`: an array of one or more text messages to send to the agent If the request is valid, the API returns a Server-Sent Events (SSE) stream. Each line has the form `data: [{\"type\": \"...\", ...}]` — a JSON array of event objects. Event types include: - `ack`: confirms receipt of the request (`node_id`) - `conv_title`: conversation title (`title`, `conv_id`) - `notification`: status updates on operations (`group_id`, `metadata`, `code` — e.g. `TOOL_CALL_NOTIFICATION`, `nls_start`, `FINAL_RESPONSE_NOTIFICATION`) - `text-chunk`: incremental content chunks (`id`, `group_id`, `metadata` with `format` and `type` such as `thinking` or `text`, `content`) - `text`: full text block with same structure as `text-chunk` - `answer`: structured answer with metadata (`id`, `group_id`, `metadata` with `sage_query`, `session_id`, `title`, etc., `title`) - `error`: if a failure occurs #### Error responses | Code | Description | | ---- | -------------------------------------------------------------------------------------------------------------------------------- | | 401 | Unauthorized — authentication token is missing, expired, or invalid. | | 403 | Forbidden — the authenticated user does not have `CAN_USE_SPOTTER` privilege or lacks permission on the referenced conversation. | > ###### Note: > > - This endpoint is Generally Available from version 26.5.0.cl. > - This endpoint requires Spotter - please contact ThoughtSpot support to enable Spotter on your cluster. > - The streaming protocol uses Server-Sent Events (SSE). > - For the complete response in a single payload, use `sendAgentConversationMessage` instead. + * @param conversationIdentifier Unique identifier for the conversation (used to track context) + * @param sendAgentConversationMessageStreamingRequest + */ + sendAgentConversationMessageStreaming(conversationIdentifier, sendAgentConversationMessageStreamingRequest, _options) { + const requestContextPromise = this.requestFactory.sendAgentConversationMessageStreaming(conversationIdentifier, sendAgentConversationMessageStreamingRequest, _options); + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx) => middleware.pre(ctx))); + } + return middlewarePreObservable.pipe(mergeMap((ctx) => this.configuration.httpApi.send(ctx))).pipe(mergeMap((response) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp) => this.responseProcessor.sendAgentConversationMessageStreaming(rsp))); + })); + } + /** + * Version: 26.2.0.cl or later **Deprecated** — Use `sendAgentConversationMessage` instead. Send natural language messages to an existing Spotter agent conversation and returns the complete response synchronously. Requires `CAN_USE_SPOTTER` privilege and access to the metadata object associated with the conversation. The user must have access to the conversation session referenced by `conversation_identifier`. A conversation must first be created using the `createAgentConversation` API. #### Usage guidelines The request must include: - `conversation_identifier`: the unique session ID returned by `createAgentConversation`, used for context continuity and message tracking - `messages`: an array of one or more text messages to send to the agent The API returns an array of response objects, each containing: - `type`: the kind of response — `text`, `answer`, or `error` - `message`: the main content of the response - `metadata`: additional information depending on the message type (e.g., answer metadata includes analytics and visualization details) #### Error responses | Code | Description | |------|----------------------------------------------------------------------------------------------------------------------------------| | 401 | Unauthorized — authentication token is missing, expired, or invalid. | | 403 | Forbidden — the authenticated user does not have `CAN_USE_SPOTTER` privilege or lacks permission on the referenced conversation. | > ###### Note: > > - This endpoint is deprecated. Use `sendAgentConversationMessage` for new integrations. > - This endpoint is currently in Beta. Breaking changes may be introduced before the endpoint is made Generally Available. > - This endpoint requires Spotter - please contact ThoughtSpot support to enable Spotter on your cluster. + * @param conversationIdentifier Unique identifier for the conversation (used to track context) + * @param sendAgentMessageRequest + */ + sendAgentMessage(conversationIdentifier, sendAgentMessageRequest, _options) { + const requestContextPromise = this.requestFactory.sendAgentMessage(conversationIdentifier, sendAgentMessageRequest, _options); + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx) => middleware.pre(ctx))); + } + return middlewarePreObservable.pipe(mergeMap((ctx) => this.configuration.httpApi.send(ctx))).pipe(mergeMap((response) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp) => this.responseProcessor.sendAgentMessage(rsp))); + })); + } + /** + * Version: 26.2.0.cl or later **Deprecated** — Use `sendAgentConversationMessageStreaming` instead. Sends one or more natural language messages to an existing Spotter agent conversation and returns the response as a real-time Server-Sent Events stream. Requires `CAN_USE_SPOTTER` privilege and access to the metadata object associated with the conversation. The user must have access to the conversation session referenced by `conversation_identifier`. A conversation must first be created using the `createAgentConversation` API. #### Usage guidelines The request must include: - `conversation_identifier`: the unique session ID returned by `createAgentConversation`, used for context continuity and message tracking - `messages`: an array of one or more text messages to send to the agent If the request is valid, the API returns a Server-Sent Events (SSE) stream. Each line has the form `data: [{\"type\": \"...\", ...}]` — a JSON array of event objects. Event types include: - `ack`: confirms receipt of the request (`node_id`) - `conv_title`: conversation title (`title`, `conv_id`) - `notification`: status updates on operations (`group_id`, `metadata`, `code` — e.g. `TOOL_CALL_NOTIFICATION`, `nls_start`, `FINAL_RESPONSE_NOTIFICATION`) - `text-chunk`: incremental content chunks (`id`, `group_id`, `metadata` with `format` and `type` such as `thinking` or `text`, `content`) - `text`: full text block with same structure as `text-chunk` - `answer`: structured answer with metadata (`id`, `group_id`, `metadata` with `sage_query`, `session_id`, `title`, etc., `title`) - `error`: if a failure occurs #### Error responses | Code | Description | |------|----------------------------------------------------------------------------------------------------------------------------------| | 401 | Unauthorized — authentication token is missing, expired, or invalid. | | 403 | Forbidden — the authenticated user does not have `CAN_USE_SPOTTER` privilege or lacks permission on the referenced conversation. | > ###### Note: > > - This endpoint is deprecated. Use `sendAgentConversationMessageStreaming` for new integrations. > - This endpoint is currently in Beta. Breaking changes may be introduced before the endpoint is made Generally Available. > - This endpoint requires Spotter - please contact ThoughtSpot support to enable Spotter on your cluster. > - The streaming protocol uses Server-Sent Events (SSE). + * @param sendAgentMessageStreamingRequest + */ + sendAgentMessageStreaming(sendAgentMessageStreamingRequest, _options) { + const requestContextPromise = this.requestFactory.sendAgentMessageStreaming(sendAgentMessageStreamingRequest, _options); + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx) => middleware.pre(ctx))); + } + return middlewarePreObservable.pipe(mergeMap((ctx) => this.configuration.httpApi.send(ctx))).pipe(mergeMap((response) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp) => this.responseProcessor.sendAgentMessageStreaming(rsp))); + })); + } + /** + * Version: 10.4.0.cl or later Sends a follow-up message to an existing conversation within the context of a data model. Requires `CAN_USE_SPOTTER` privilege and at least view access to the metadata object specified in the request. A conversation must first be created using the `createConversation` API. #### Usage guidelines The request must include: - `conversation_identifier`: the unique session ID returned by `createConversation` - `metadata_identifier`: the unique ID of the data source used for the conversation - `message`: a natural language string with the follow-up question If the request is successful, the API returns an array of response messages, each containing: - `session_identifier`: the unique ID of the generated response - `generation_number`: the generation number of the response - `message_type`: the type of the response (e.g., `TSAnswer`) - `visualization_type`: the generated visualization type (`Chart`, `Table`, or `Undefined`) - `tokens` / `display_tokens`: the search tokens and user-friendly display tokens for the response #### Error responses | Code | Description | |------|-----------------------------------------------------------------------------------------------------------------------------------------| | 401 | Unauthorized — authentication token is missing, expired, or invalid. | | 403 | Forbidden — the authenticated user does not have `CAN_USE_SPOTTER` privilege or lacks view permission on the specified metadata object. | > ###### Note: > * This endpoint is currently in Beta. Breaking changes may be introduced before the endpoint is made Generally Available. > * This endpoint requires Spotter - please contact ThoughtSpot support to enable Spotter on your cluster. + * @param conversationIdentifier Unique identifier of the conversation. + * @param sendMessageRequest + */ + sendMessage(conversationIdentifier, sendMessageRequest, _options) { + const requestContextPromise = this.requestFactory.sendMessage(conversationIdentifier, sendMessageRequest, _options); + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx) => middleware.pre(ctx))); + } + return middlewarePreObservable.pipe(mergeMap((ctx) => this.configuration.httpApi.send(ctx))).pipe(mergeMap((response) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp) => this.responseProcessor.sendMessage(rsp))); + })); + } + /** + * Version: 10.15.0.cl or later This API allows users to set natural language (NL) instructions for a specific data-model to improve AI-generated answers and query processing. These instructions help guide the AI system to better understand the data context and provide more accurate responses. Requires `CAN_USE_SPOTTER` privilege, either edit access or `SPOTTER_COACHING_PRIVILEGE` on the data model, and a bearer token corresponding to the org where the data model exists. #### Usage guidelines To set NL instructions for a data-model, the request must include: - `data_source_identifier`: The unique ID of the data-model for which to set NL instructions - `nl_instructions_info`: An array of instruction objects, each containing: - `instructions`: Array of text instructions for the LLM - `scope`: The scope of the instruction (`GLOBAL`). Currently only `GLOBAL` is supported. It can be extended to data-model-user scope in future. #### Instructions scope - **GLOBAL**: instructions that apply to all users querying this data model If the request is successful, the API returns: - `success`: a boolean indicating whether the operation completed successfully #### Error responses | Code | Description | |------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| | 401 | Unauthorized — authentication token is missing, expired, or invalid. | | 403 | Forbidden — the authenticated user does not have `CAN_USE_SPOTTER` privilege, lacks edit access or `SPOTTER_COACHING_PRIVILEGE` on the data model, or the bearer token does not correspond to the org where the data model exists. | > ###### Note: > > - To use this API, the user needs either edit access or `SPOTTER_COACHING_PRIVILEGE` on the data model, and must use the bearer token corresponding to the org where the data model exists. > - This endpoint is currently in Beta. Breaking changes may be introduced before the endpoint is made Generally Available. > - Available from version 10.15.0.cl and later. > - This endpoint requires Spotter — please contact ThoughtSpot Support to enable Spotter on your cluster. > - Instructions help improve the accuracy and relevance of AI-generated responses for the specified data-model. + * @param setNLInstructionsRequest + */ + setNLInstructions(setNLInstructionsRequest, _options) { + const requestContextPromise = this.requestFactory.setNLInstructions(setNLInstructionsRequest, _options); + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx) => middleware.pre(ctx))); + } + return middlewarePreObservable.pipe(mergeMap((ctx) => this.configuration.httpApi.send(ctx))).pipe(mergeMap((response) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp) => this.responseProcessor.setNLInstructions(rsp))); + })); + } + /** + * Version: 10.4.0.cl or later Processes a natural language query against a specified data model and returns a single AI-generated answer without requiring a conversation session. Requires `CAN_USE_SPOTTER` privilege and at least view access to the metadata object specified in the request. #### Usage guidelines The request must include: - `query`: a natural language question (e.g., \"What were total sales last quarter?\") - `metadata_identifier`: the unique ID of the data source to query against If the request is successful, the API returns a response message containing: - `session_identifier`: the unique ID of the generated response - `generation_number`: the generation number of the response - `message_type`: the type of the response (e.g., `TSAnswer`) - `visualization_type`: the generated visualization type (`Chart`, `Table`, or `Undefined`) - `tokens` / `display_tokens`: the search tokens and user-friendly display tokens for the response #### Error responses | Code | Description | |------|-----------------------------------------------------------------------------------------------------------------------------------------| | 401 | Unauthorized — authentication token is missing, expired, or invalid. | | 403 | Forbidden — the authenticated user does not have `CAN_USE_SPOTTER` privilege or lacks view permission on the specified metadata object. | > ###### Note: > * This endpoint is currently in Beta. Breaking changes may be introduced before the endpoint is made Generally Available. > * This endpoint requires Spotter - please contact ThoughtSpot support to enable Spotter on your cluster. + * @param singleAnswerRequest + */ + singleAnswer(singleAnswerRequest, _options) { + const requestContextPromise = this.requestFactory.singleAnswer(singleAnswerRequest, _options); + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx) => middleware.pre(ctx))); + } + return middlewarePreObservable.pipe(mergeMap((ctx) => this.configuration.httpApi.send(ctx))).pipe(mergeMap((response) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp) => this.responseProcessor.singleAnswer(rsp))); + })); + } + /** + * Stops an in-progress agent conversation response. Version: 26.6.0.cl or later Version: 26.6.0.cl or later Stops an in-progress agent response for the specified conversation. Use this endpoint to cancel a response that is actively being generated — for example, when the user navigates away, reformulates their question, or no longer needs the current result. Requires `CAN_USE_SPOTTER` privilege and access to the specified conversation. #### Usage guidelines The request must include: - `conversation_identifier` *(path parameter)*: the unique ID of the conversation whose active response should be stopped, as returned by `createAgentConversation` A successful request returns an empty `204 No Content` response. If there is no active response in progress at the time of the call, the request is still treated as successful. After stopping a response, the conversation session remains active. You can continue sending messages using `sendAgentConversationMessage` or `sendAgentConversationMessageStreaming`. #### Example request ```bash POST /api/rest/2.0/ai/agent/conversation/{conversation_identifier}/stop-response ``` #### Typical usage scenario This endpoint is useful when integrating Spotter into a chat UI where users can cancel a long-running query. For example: 1. User sends a message via `sendAgentConversationMessageStreaming`. 2. User clicks a \"Stop generating\" button while the response is streaming. 3. Your client calls `stopConversation` with the active `conversation_identifier`. 4. The stream is terminated and the user can ask a new question. #### Error responses | Code | Description | |------|-------------| | 401 | Unauthorized — authentication token is missing, expired, or invalid. | | 403 | Forbidden — the authenticated user does not have `CAN_USE_SPOTTER` privilege or lacks access to the specified conversation. | > ###### Note: > > - Calling this endpoint when no response is in progress does not return an error. > - The conversation context is preserved after stopping — previous messages and answers remain accessible. > - Available from version 26.6.0.cl and later. > - This endpoint requires Spotter — please contact ThoughtSpot Support to enable Spotter on your cluster. > - This feature is available only for **Spotter 3** (`SPOTTER3`) version. + * @param conversationIdentifier Unique identifier of the conversation to stop. + */ + stopConversation(conversationIdentifier, _options) { + const requestContextPromise = this.requestFactory.stopConversation(conversationIdentifier, _options); + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx) => middleware.pre(ctx))); + } + return middlewarePreObservable.pipe(mergeMap((ctx) => this.configuration.httpApi.send(ctx))).pipe(mergeMap((response) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp) => this.responseProcessor.stopConversation(rsp))); + })); + } +}; +var ObservableAuthenticationApi = class { + constructor(configuration, requestFactory, responseProcessor) { + this.configuration = configuration; + this.requestFactory = requestFactory || new AuthenticationApiRequestFactory(configuration); + this.responseProcessor = responseProcessor || new AuthenticationApiResponseProcessor(); + } + /** + * Version: 26.6.0.cl or later Enables or disables authentication at cluster or org level for the specified auth type. Currently supports `TRUSTED_AUTH`. #### Required privileges Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) or `CONTROL_TRUSTED_AUTH` (**Can Enable or Disable Trusted Authentication**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled, the `CONTROL_TRUSTED_AUTH` privilege is required. #### Usage guidelines Use `cluster_preferences` to enable or disable authentication at the cluster level. Cluster-level settings can only be configured from the Primary Org. - `ENABLED` — Generates a new access token if one does not exist. An existing token is preserved. - `DISABLED` — Revokes the existing cluster-level access token. Use `org_preferences` to enable or disable authentication for one or more Orgs. Each entry must include an `org_identifier` (unique ID or name) and an `auth_status`. Org-level configuration requires the per-Org authentication feature to be enabled on your instance. - `ENABLED` — Generates a new org-level access token if one does not exist. - `DISABLED` — Revokes the existing org-level access token for that Org. Both `cluster_preferences` and `org_preferences` are optional. Omitting a field leaves the corresponding settings unchanged. If both are omitted, the API returns `204 No Content` without making any changes. **Note**: Cluster-level and org-level settings are independent of each other. Enabling or disabling one does not affect the other. + * @param configureAuthSettingsRequest + */ + configureAuthSettings(configureAuthSettingsRequest, _options) { + const requestContextPromise = this.requestFactory.configureAuthSettings(configureAuthSettingsRequest, _options); + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx) => middleware.pre(ctx))); + } + return middlewarePreObservable.pipe(mergeMap((ctx) => this.configuration.httpApi.send(ctx))).pipe(mergeMap((response) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp) => this.responseProcessor.configureAuthSettings(rsp))); + })); + } + /** + * Version: 9.0.0.cl or later Retrieves details of the current user session for the token provided in the request header. Any ThoughtSpot user can access this endpoint and send an API request. The data returned in the API response varies according to user\'s privilege and object access permissions. **NOTE**: In ThoughtSpot, users with cluster administration privileges can access all Orgs by default. However, unless the administrator is explicitly added to an Org, the Orgs list in the session information returned by the API will include only the Primary Org. To include other Orgs in the API response, you must explicitly add the administrator to each Org in the Admin settings page in the UI or via user REST API. + */ + getCurrentUserInfo(_options) { + const requestContextPromise = this.requestFactory.getCurrentUserInfo(_options); + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx) => middleware.pre(ctx))); + } + return middlewarePreObservable.pipe(mergeMap((ctx) => this.configuration.httpApi.send(ctx))).pipe(mergeMap((response) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp) => this.responseProcessor.getCurrentUserInfo(rsp))); + })); + } + /** + * Version: 9.4.0.cl or later Retrieves details of the current session token for the bearer token provided in the request header. This API endpoint does not create a new token. Instead, it returns details about the token, including the token string, creation time, expiration time, and the associated user. Use this endpoint to introspect your current session token, debug authentication issues, or when a frontend application needs session token details. Any ThoughtSpot user with a valid bearer token can access this endpoint and send an API request + */ + getCurrentUserToken(_options) { + const requestContextPromise = this.requestFactory.getCurrentUserToken(_options); + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx) => middleware.pre(ctx))); + } + return middlewarePreObservable.pipe(mergeMap((ctx) => this.configuration.httpApi.send(ctx))).pipe(mergeMap((response) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp) => this.responseProcessor.getCurrentUserToken(rsp))); + })); + } + /** + * Version: 10.4.0.cl or later Creates an authentication token that provides values for the formula variables in the Row Level Security (RLS) rules for a given user. Recommended for use cases that require Attribute-based access control (ABAC) via RLS. #### Required privileges To add a new user and assign privileges during auto-creation, the `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege is required. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled, the `CONTROL_TRUSTED_AUTH` (**Can Enable or Disable Trusted Authentication**) privilege and edit access to the data source are required. To configure formula variables for all Orgs on your instance or the Primary Org, cluster administration privileges are required. Org administrators can configure formula variables for their respective Orgs. If Role-Based Access Control (RBAC) is enabled, users with the `CAN_MANAGE_VARIABLES` (**Can manage variables**) role privilege can also create and manage variables for their Org context. #### Usage guidelines You can generate a token by providing a `username` and `password`, or by using a `secret_key`. To generate a `secret_key`, the administrator must enable [Trusted authentication](https://developers.thoughtspot.com/docs/trusted-auth-secret-key) in the **Develop** > **Customizations** > **Security Settings** page. **Note**: * When both `password` and `secret_key` are included in the API request, `password` takes precedence. * If [Multi-Factor Authentication (MFA)](https://docs.thoughtspot.com/cloud/latest/authentication-local-mfa) is enabled on your instance, the API login request with `username` and `password` returns an error. You can switch to token-based authentication with `secret_key` or contact ThoughtSpot Support for assistance. The token obtained from ThoughtSpot is valid for 5 minutes by default. You can configure the token expiration time as required. #### ABAC via RLS To implement ABAC via RLS and assign security entitlements to users during session creation, generate a token with custom variable values. The values set in the authentication token are applied to the formula variables referenced in RLS rules at the table level, which determines the data each user can access based on their entitlements. The variable values can be configured to persist for a specific set of Models in user sessions initiated with the token, allowing different RLS rules to be set for different data models. Once defined, the rules are added to the user\'s `variable_values` object, after which all sessions will use the persisted values. For more information, see [ABAC via tokens Documentation](https://developers.thoughtspot.com/docs/abac-via-rls-variables). ##### Formula variables Before defining variable values, ensure the variables are created and available on your instance. To create a formula variable, you can use the **Create variable** (`/api/rest/2.0/template/variables/create`) REST API endpoint, with the variable `type` set as `Formula_Variable` in the API request. The API doesn\'t support `\"persist_option\": \"RESET\"` and `\"persist_option\": \"NONE\"` when `variable_values` are defined in the request. If you are using `variable_values` for token generation, you must use other supported persist options such as `APPEND` or `REPLACE`. If you want to use `RESET` or `NONE`, do not pass any `variable_values`. In such cases, `variable_values` will remain unaffected. #### Supported objects The supported object type is `LOGICAL_TABLE`. When using `object_id` with `variable_values`, models are supported. #### Just-in-time provisioning For [just-in-time user creation and provisioning](https://developers.thoughtspot.com/docs/just-in-time-provisioning), specify the following attributes in the API request: * `auto_create` * `username` * `display_name` * `email` * `groups` Set `auto_create` to `true` if the username does not exist in ThoughtSpot. If the username already exists in ThoughtSpot and `auto_create` is set to `true`, user properties such as display name, email, Org and group entitlements will not be updated with new values. Setting `auto_create` to `true` does not create formula variables. Hence, this setting will not be applicable to `variable_values`. #### Important point to note All options in the token creation APIs that define user access to data in ThoughtSpot will take effect during token creation, not when the token is used for authentication. For example, `auto_create:true` will create the user when the authentication token is created. Persist options such as `APPEND` and `REPLACE` will persist `variable_values` on the user profile when the token is created. + * @param getCustomAccessTokenRequest + */ + getCustomAccessToken(getCustomAccessTokenRequest, _options) { + const requestContextPromise = this.requestFactory.getCustomAccessToken(getCustomAccessTokenRequest, _options); + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx) => middleware.pre(ctx))); + } + return middlewarePreObservable.pipe(mergeMap((ctx) => this.configuration.httpApi.send(ctx))).pipe(mergeMap((response) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp) => this.responseProcessor.getCustomAccessToken(rsp))); + })); + } + /** + * Version: 9.0.0.cl or later Generates an authentication token for creating a full session in ThoughtSpot for a given user. Recommended for use cases that do not require Attribute-based access control (ABAC) via Row Level Security (RLS). #### Usage guidelines You can generate a token for a user by providing a `username` and `password`, or by using the `secret_key` generated for your instance. To generate a `secret_key`, the administrator must enable [Trusted authentication](https://developers.thoughtspot.com/docs/trusted-auth-secret-key) in the **Develop** > **Customizations** > **Security Settings** page. **Note**: * When both `password` and `secret_key` are included in the API request, `password` takes precedence. * If [Multi-Factor Authentication (MFA)](https://docs.thoughtspot.com/cloud/latest/authentication-local-mfa) is enabled on your instance, the API login request with `username` and `password` returns an error. You can switch to token-based authentication with `secret_key` or contact ThoughtSpot Support for assistance. The token obtained from ThoughtSpot is valid for 5 minutes by default. You can configure the token expiration time as required. #### Just-in-time provisioning For [just-in-time user creation and provisioning](https://developers.thoughtspot.com/docs/just-in-time-provisioning), specify the following attributes in the API request: * `auto_create` * `username` * `display_name` * `email` * `group_identifiers` Set `auto_create` to `true` if the username does not exist in ThoughtSpot. If the user already exists in ThoughtSpot and `auto_create` is set to `true`, user properties such as display name, email and group assignment will be updated. To add a new user and assign privileges during auto-creation, the `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege is required. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled, the `CONTROL_TRUSTED_AUTH` (**Can Enable or Disable Trusted Authentication**) privilege is required. #### Important point to note All options in the token creation APIs that define user access to data in ThoughtSpot will take effect during token creation, not when the token is used for authentication. For example, `auto_create:true` will create the user when the authentication token is created. + * @param getFullAccessTokenRequest + */ + getFullAccessToken(getFullAccessTokenRequest, _options) { + const requestContextPromise = this.requestFactory.getFullAccessToken(getFullAccessTokenRequest, _options); + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx) => middleware.pre(ctx))); + } + return middlewarePreObservable.pipe(mergeMap((ctx) => this.configuration.httpApi.send(ctx))).pipe(mergeMap((response) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp) => this.responseProcessor.getFullAccessToken(rsp))); + })); + } + /** + * Version: 9.0.0.cl or later Generates an authentication token that provides access to a specific metadata object. This object list is intersected with the list of objects the user is allowed to access via group membership. For more information, see [Object security](https://docs.thoughtspot.com/cloud/latest/security-data-object#object_security). #### Usage guidelines You can generate a token for a user by providing a `username` and `password`, or by using the `secret_key` generated for your instance. To generate a `secret_key`, the administrator must enable [Trusted authentication](https://developers.thoughtspot.com/docs/trusted-auth-secret-key) in the **Develop** > **Customizations** > **Security Settings** page. **Note**: * When both `password` and `secret_key` are included in the API request, `password` takes precedence. * If [Multi-Factor Authentication (MFA)](https://docs.thoughtspot.com/cloud/latest/authentication-local-mfa) is enabled on your instance, the API login request with `username` and `password` returns an error. You can switch to token-based authentication with `secret_key` or contact ThoughtSpot Support for assistance. The token obtained from ThoughtSpot is valid for 5 minutes by default. You can configure the token expiration time as required. #### Just-in-time provisioning For [just-in-time user creation and provisioning](https://developers.thoughtspot.com/docs/just-in-time-provisioning), specify the following attributes in the API request: * `auto_create` * `username` * `display_name` * `email` * `group_identifiers` Set `auto_create` to `true` if the user is not available in ThoughtSpot. If the user already exists in ThoughtSpot and the `auto_create` parameter is set to `true`, user properties such as display name, email, and group assignment will be updated. To add a new user and assign privileges, the `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege is required. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled, the `CONTROL_TRUSTED_AUTH`(**Can Enable or Disable Trusted Authentication**) privilege is required. #### Important point to note All options in the token creation APIs that define user access to data in ThoughtSpot will take effect during token creation, not when the token is used for authentication. For example, `auto_create:true` will create the user when the authentication token is created. + * @param getObjectAccessTokenRequest + */ + getObjectAccessToken(getObjectAccessTokenRequest, _options) { + const requestContextPromise = this.requestFactory.getObjectAccessToken(getObjectAccessTokenRequest, _options); + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx) => middleware.pre(ctx))); + } + return middlewarePreObservable.pipe(mergeMap((ctx) => this.configuration.httpApi.send(ctx))).pipe(mergeMap((response) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp) => this.responseProcessor.getObjectAccessToken(rsp))); + })); + } + /** + * Version: 9.0.0.cl or later Creates a login session for a ThoughtSpot user with Basic authentication. In Basic authentication method, REST clients log in to ThoughtSpot using `username` and `password` attributes. On a multi-tenant cluster with Orgs, users can pass the ID of the Org in the API request to log in to a specific Org context. **Note**: If Multi-Factor Authentication (MFA) is enabled on your instance, the API login request with basic authentication (`username` and `password` ) returns an error. Contact ThoughtSpot Support for assistance. A successful login returns a session cookie that can be used in your subsequent API requests. + * @param loginRequest + */ + login(loginRequest, _options) { + const requestContextPromise = this.requestFactory.login(loginRequest, _options); + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx) => middleware.pre(ctx))); + } + return middlewarePreObservable.pipe(mergeMap((ctx) => this.configuration.httpApi.send(ctx))).pipe(mergeMap((response) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp) => this.responseProcessor.login(rsp))); + })); + } + /** + * Version: 9.0.0.cl or later Logs out a user from their current session. + */ + logout(_options) { + const requestContextPromise = this.requestFactory.logout(_options); + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx) => middleware.pre(ctx))); + } + return middlewarePreObservable.pipe(mergeMap((ctx) => this.configuration.httpApi.send(ctx))).pipe(mergeMap((response) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp) => this.responseProcessor.logout(rsp))); + })); + } + /** + * Version: 9.0.0.cl or later Revokes the authentication token issued for current user session. The token of your current session expires when you make a call to the `/api/rest/2.0/auth/token/revoke` endpoint. the users will not be able to access ThoughtSpot objects until a new token is obtained. To restart your session, request for a new token from ThoughtSpot. See [Get Full Access Token](#/http/api-endpoints/authentication/get-full-access-token). + * @param revokeTokenRequest + */ + revokeToken(revokeTokenRequest, _options) { + const requestContextPromise = this.requestFactory.revokeToken(revokeTokenRequest, _options); + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx) => middleware.pre(ctx))); + } + return middlewarePreObservable.pipe(mergeMap((ctx) => this.configuration.httpApi.send(ctx))).pipe(mergeMap((response) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp) => this.responseProcessor.revokeToken(rsp))); + })); + } + /** + * Version: 26.6.0.cl or later Returns the authentication configuration for the specified auth type at cluster and org level. Currently supports `TRUSTED_AUTH`. #### Required privileges Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) or `CONTROL_TRUSTED_AUTH` (**Can Enable or Disable Trusted Authentication**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled, the `CONTROL_TRUSTED_AUTH` privilege is required. #### Usage guidelines Use `scope` to control which level of settings are returned: - `CLUSTER` — Returns cluster-level authentication status and access tokens. Accessible only from the Primary Org. - `ORG` — Returns org-level authentication status and access tokens for the current Org. Requires the per-Org authentication feature to be enabled on your instance. - If `scope` is omitted, both cluster and org-level settings are returned based on the caller\'s org context and feature availability. The `access_tokens` array in `cluster_preferences` or `org_preferences` is omitted when no token is configured at that level. **Note**: Access tokens returned in the response are sensitive credentials. Treat them with the same care as passwords. + * @param searchAuthSettingsRequest + */ + searchAuthSettings(searchAuthSettingsRequest, _options) { + const requestContextPromise = this.requestFactory.searchAuthSettings(searchAuthSettingsRequest, _options); + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx) => middleware.pre(ctx))); + } + return middlewarePreObservable.pipe(mergeMap((ctx) => this.configuration.httpApi.send(ctx))).pipe(mergeMap((response) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp) => this.responseProcessor.searchAuthSettings(rsp))); + })); + } + /** + * Version: 9.12.0.cl or later Validates the authentication token specified in the API request. If your token is not valid, [Get a new token](#/http/api-endpoints/authentication/get-full-access-token). + * @param validateTokenRequest + */ + validateToken(validateTokenRequest, _options) { + const requestContextPromise = this.requestFactory.validateToken(validateTokenRequest, _options); + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx) => middleware.pre(ctx))); + } + return middlewarePreObservable.pipe(mergeMap((ctx) => this.configuration.httpApi.send(ctx))).pipe(mergeMap((response) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp) => this.responseProcessor.validateToken(rsp))); + })); + } +}; +var ObservableCollectionsApi = class { + constructor(configuration, requestFactory, responseProcessor) { + this.configuration = configuration; + this.requestFactory = requestFactory || new CollectionsApiRequestFactory(configuration); + this.responseProcessor = responseProcessor || new CollectionsApiResponseProcessor(); + } + /** + * Version: 26.4.0.cl or later Creates a new collection in ThoughtSpot. Collections allow you to organize and group related metadata objects such as Liveboards, Answers, worksheets, and other data objects. You can also create nested collections (sub-collections) to build a hierarchical structure. #### Supported operations The API endpoint lets you perform the following operations: * Create a new collection * Add metadata objects (Liveboards, Answers, Logical Tables) to the collection * Create nested collections by adding sub-collections + * @param createCollectionRequest + */ + createCollection(createCollectionRequest, _options) { + const requestContextPromise = this.requestFactory.createCollection(createCollectionRequest, _options); + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx) => middleware.pre(ctx))); + } + return middlewarePreObservable.pipe(mergeMap((ctx) => this.configuration.httpApi.send(ctx))).pipe(mergeMap((response) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp) => this.responseProcessor.createCollection(rsp))); + })); + } + /** + * Version: 26.4.0.cl or later Deletes one or more collections from ThoughtSpot. #### Delete options * **delete_children**: When set to `true`, deletes the child objects (metadata items) within the collection that the user has access to. Objects that the user does not have permission to delete will be skipped. * **dry_run**: When set to `true`, performs a preview of the deletion operation without actually deleting anything. The response shows what would be deleted, allowing you to review before committing the deletion. #### Response The response includes: * **metadata_deleted**: List of metadata objects that were successfully deleted * **metadata_skipped**: List of metadata objects that were skipped due to lack of permissions or other constraints + * @param deleteCollectionRequest + */ + deleteCollection(deleteCollectionRequest, _options) { + const requestContextPromise = this.requestFactory.deleteCollection(deleteCollectionRequest, _options); + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx) => middleware.pre(ctx))); + } + return middlewarePreObservable.pipe(mergeMap((ctx) => this.configuration.httpApi.send(ctx))).pipe(mergeMap((response) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp) => this.responseProcessor.deleteCollection(rsp))); + })); + } + /** + * Version: 26.4.0.cl or later Gets a list of collections available in ThoughtSpot. To get details of a specific collection, specify the collection GUID or name. You can also filter the API response based on the collection name pattern, author, and other criteria. #### Search options * **name_pattern**: Use \'%\' as a wildcard character to match collection names * **collection_identifiers**: Search for specific collections by their GUIDs or names * **include_metadata**: When set to `true`, includes the metadata objects within each collection in the response **NOTE**: If the API returns an empty list, consider increasing the value of the `record_size` parameter. To search across all available collections, set `record_size` to `-1`. + * @param searchCollectionsRequest + */ + searchCollections(searchCollectionsRequest, _options) { + const requestContextPromise = this.requestFactory.searchCollections(searchCollectionsRequest, _options); + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx) => middleware.pre(ctx))); + } + return middlewarePreObservable.pipe(mergeMap((ctx) => this.configuration.httpApi.send(ctx))).pipe(mergeMap((response) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp) => this.responseProcessor.searchCollections(rsp))); + })); + } + /** + * Version: 26.4.0.cl or later Updates an existing collection in ThoughtSpot. #### Supported operations This API endpoint lets you perform the following operations: * Update collection name and description * Change visibility settings * Add metadata objects to the collection (operation: ADD) * Remove metadata objects from the collection (operation: REMOVE) * Replace all metadata objects in the collection (operation: REPLACE) #### Operation types * **ADD**: Adds the specified metadata objects to the existing collection without removing current items * **REMOVE**: Removes only the specified metadata objects from the collection * **REPLACE**: Replaces all existing metadata objects with the specified items (default behavior) + * @param collectionIdentifier Unique GUID of the collection. Note: Collection names cannot be used as identifiers since duplicate names are allowed. + * @param updateCollectionRequest + */ + updateCollection(collectionIdentifier, updateCollectionRequest, _options) { + const requestContextPromise = this.requestFactory.updateCollection(collectionIdentifier, updateCollectionRequest, _options); + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx) => middleware.pre(ctx))); + } + return middlewarePreObservable.pipe(mergeMap((ctx) => this.configuration.httpApi.send(ctx))).pipe(mergeMap((response) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp) => this.responseProcessor.updateCollection(rsp))); + })); + } +}; +var ObservableConnectionConfigurationsApi = class { + constructor(configuration, requestFactory, responseProcessor) { + this.configuration = configuration; + this.requestFactory = requestFactory || new ConnectionConfigurationsApiRequestFactory(configuration); + this.responseProcessor = responseProcessor || new ConnectionConfigurationsApiResponseProcessor(); + } + /** + * Version: 10.12.0.cl or later Gets connection configuration objects. Requires `DATAMANAGEMENT` (**Can manage data**) and edit permissions to the connection object, or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) privilege is required. #### Usage guidelines * To get a list of all configurations available in the ThoughtSpot system, send the API request with only the connection name or GUID in the request body. * To fetch details of a configuration object, specify the configuration object name or GUID. + * @param connectionConfigurationSearchRequest + */ + connectionConfigurationSearch(connectionConfigurationSearchRequest, _options) { + const requestContextPromise = this.requestFactory.connectionConfigurationSearch(connectionConfigurationSearchRequest, _options); + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx) => middleware.pre(ctx))); + } + return middlewarePreObservable.pipe(mergeMap((ctx) => this.configuration.httpApi.send(ctx))).pipe(mergeMap((response) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp) => this.responseProcessor.connectionConfigurationSearch(rsp))); + })); + } + /** + * Version: 10.12.0.cl or later Creates an additional configuration to an existing connection to a data warehouse. Requires `DATAMANAGEMENT` (**Can manage data**) or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) privilege is required. #### Usage guidelines * A JSON map of configuration attributes in `configuration`. The following example shows the configuration attributes: ``` { \"user\":\"DEV_USER\", \"password\":\"TestConn123\", \"role\":\"DEV\", \"warehouse\":\"DEV_WH\" } ``` * If the `policy_type` is `PRINCIPALS`, then `policy_principals` is a required field. * If the `policy_type` is `PROCESSES`, then `policy_processes` is a required field. * If the `policy_type` is `NO_POLICY`, then `policy_principals` and `policy_processes` are not required fields. #### Parameterized Connection Support For parameterized connections that use OAuth authentication, only the same_as_parent and policy_process_options attributes are allowed in the API request. These attributes are not applicable to connections that are not parameterized. + * @param createConnectionConfigurationRequest + */ + createConnectionConfiguration(createConnectionConfigurationRequest, _options) { + const requestContextPromise = this.requestFactory.createConnectionConfiguration(createConnectionConfigurationRequest, _options); + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx) => middleware.pre(ctx))); + } + return middlewarePreObservable.pipe(mergeMap((ctx) => this.configuration.httpApi.send(ctx))).pipe(mergeMap((response) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp) => this.responseProcessor.createConnectionConfiguration(rsp))); + })); + } + /** + * Version: 10.12.0.cl or later Deletes connection configuration objects. Requires `DATAMANAGEMENT` (**Can manage data**) and edit permissions to the connection object, or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) privilege is required. + * @param deleteConnectionConfigurationRequest + */ + deleteConnectionConfiguration(deleteConnectionConfigurationRequest, _options) { + const requestContextPromise = this.requestFactory.deleteConnectionConfiguration(deleteConnectionConfigurationRequest, _options); + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx) => middleware.pre(ctx))); + } + return middlewarePreObservable.pipe(mergeMap((ctx) => this.configuration.httpApi.send(ctx))).pipe(mergeMap((response) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp) => this.responseProcessor.deleteConnectionConfiguration(rsp))); + })); + } + /** + * Version: 10.12.0.cl or later Updates a connection configuration object. Requires `DATAMANAGEMENT` (**Can manage data**) and edit permissions to the connection object, or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) privilege is required. #### Supported operations This API endpoint lets you perform the following operations in a single API request: * Edit the name or description of the configuration * Edit the configuration properties * Edit the `policy_type` * Edit the type of authentication * Enable or disable a configuration #### Parameterized Connection Support For parameterized oauth based connections, only the `same_as_parent` and `policy_process_options` attributes are allowed. These attributes are not applicable to connections that are not parameterized. **NOTE**: When updating a configuration where `disabled` is `true`, you must reset `disabled` to `true` in your update request payload. If not explicitly set again, the API will default `disabled` to `false`. + * @param configurationIdentifier Unique ID or name of the configuration. + * @param updateConnectionConfigurationRequest + */ + updateConnectionConfiguration(configurationIdentifier, updateConnectionConfigurationRequest, _options) { + const requestContextPromise = this.requestFactory.updateConnectionConfiguration(configurationIdentifier, updateConnectionConfigurationRequest, _options); + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx) => middleware.pre(ctx))); + } + return middlewarePreObservable.pipe(mergeMap((ctx) => this.configuration.httpApi.send(ctx))).pipe(mergeMap((response) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp) => this.responseProcessor.updateConnectionConfiguration(rsp))); + })); + } +}; +var ObservableConnectionsApi = class { + constructor(configuration, requestFactory, responseProcessor) { + this.configuration = configuration; + this.requestFactory = requestFactory || new ConnectionsApiRequestFactory(configuration); + this.responseProcessor = responseProcessor || new ConnectionsApiResponseProcessor(); + } + /** + * Version: 9.2.0.cl or later Creates a connection to a data warehouse for live query services. Requires `DATAMANAGEMENT` (**Can manage data**) or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) privilege is required. #### Create a connection without tables To create a connection without tables: 1. Pass these parameters in your API request. * Name of the connection. * Type of the data warehouse to connect to. * A JSON map of configuration attributes in `data_warehouse_config`. The following example shows the configuration attributes for a SnowFlake connection: ``` { \"configuration\":{ \"accountName\":\"thoughtspot_partner\", \"user\":\"tsadmin\", \"password\":\"TestConn123\", \"role\":\"sysadmin\", \"warehouse\":\"MEDIUM_WH\" }, \"authenticationType\": \"SERVICE_ACCOUNT\", \"externalDatabases\":[ ] } ``` 2. Set `validate` to `false`. **NOTE:** If the `authentication_type` is anything other than SERVICE_ACCOUNT, you must explicitly provide the authenticationType property in the payload. If you do not specify authenticationType, the API will default to SERVICE_ACCOUNT as the authentication type. #### Create a connection with tables If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) and `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` (**Can manage data models**) privilege is required. To create a connection with tables: 1. Pass these parameters in your API request. * Name of the connection. * Type of the data warehouse to connect to. * A JSON map of configuration attributes, database details, and table properties in `data_warehouse_config` as shown in the following example: ``` { \"configuration\":{ \"accountName\":\"thoughtspot_partner\", \"user\":\"tsadmin\", \"password\":\"TestConn123\", \"role\":\"sysadmin\", \"warehouse\":\"MEDIUM_WH\" }, \"authenticationType\": \"SERVICE_ACCOUNT\", \"externalDatabases\":[ { \"name\":\"AllDatatypes\", \"isAutoCreated\":false, \"schemas\":[ { \"name\":\"alldatatypes\", \"tables\":[ { \"name\":\"allDatatypes\", \"type\":\"TABLE\", \"description\":\"\", \"selected\":true, \"linked\":true, \"columns\":[ { \"name\":\"CNUMBER\", \"type\":\"INT64\", \"canImport\":true, \"selected\":true, \"isLinkedActive\":true, \"isImported\":false, \"tableName\":\"allDatatypes\", \"schemaName\":\"alldatatypes\", \"dbName\":\"AllDatatypes\" }, { \"name\":\"CDECIMAL\", \"type\":\"INT64\", \"canImport\":true, \"selected\":true, \"isLinkedActive\":true, \"isImported\":false, \"tableName\":\"allDatatypes\", \"schemaName\":\"alldatatypes\", \"dbName\":\"AllDatatypes\" } ] } ] } ] } ] } ``` 2. Set `validate` to `true`. **NOTE:** If the `authentication_type` is anything other than SERVICE_ACCOUNT, you must explicitly provide the authenticationType property in the payload. If you do not specify authenticationType, the API will default to SERVICE_ACCOUNT as the authentication type. + * @param createConnectionRequest + */ + createConnection(createConnectionRequest, _options) { + const requestContextPromise = this.requestFactory.createConnection(createConnectionRequest, _options); + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx) => middleware.pre(ctx))); + } + return middlewarePreObservable.pipe(mergeMap((ctx) => this.configuration.httpApi.send(ctx))).pipe(mergeMap((response) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp) => this.responseProcessor.createConnection(rsp))); + })); + } + /** + * Version: 9.2.0.cl or later **Important**: This endpoint is deprecated and will be removed from ThoughtSpot in September 2025. ThoughtSpot strongly recommends using the [Delete Connection V2](#/http/api-endpoints/connections/delete-connection-v2) endpoint to delete your connection objects. #### Usage guidelines Deletes a connection object. Requires `DATAMANAGEMENT` (**Can manage data**) and edit permissions to the connection object, or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) privilege is required. **Note**: If a connection has dependent objects, make sure you remove its associations before the delete operation. + * @param deleteConnectionRequest + */ + deleteConnection(deleteConnectionRequest, _options) { + const requestContextPromise = this.requestFactory.deleteConnection(deleteConnectionRequest, _options); + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx) => middleware.pre(ctx))); + } + return middlewarePreObservable.pipe(mergeMap((ctx) => this.configuration.httpApi.send(ctx))).pipe(mergeMap((response) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp) => this.responseProcessor.deleteConnection(rsp))); + })); + } + /** + * Version: 10.4.0.cl or later Deletes a connection object. **Note**: If a connection has dependent objects, make sure you remove its associations before the delete operation. Requires `DATAMANAGEMENT` (**Can manage data**) and edit permissions to the connection object, or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) privilege is required. + * @param connectionIdentifier Unique ID or name of the connection. + */ + deleteConnectionV2(connectionIdentifier, _options) { + const requestContextPromise = this.requestFactory.deleteConnectionV2(connectionIdentifier, _options); + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx) => middleware.pre(ctx))); + } + return middlewarePreObservable.pipe(mergeMap((ctx) => this.configuration.httpApi.send(ctx))).pipe(mergeMap((response) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp) => this.responseProcessor.deleteConnectionV2(rsp))); + })); + } + /** + * Version: 9.9.0.cl or later Exports the difference in connection metadata between CDW and ThoughtSpot Requires `DATAMANAGEMENT` (**Can manage data**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the following Data control privileges may be required: - `CAN_MANAGE_CUSTOM_CALENDAR`(**Can manage custom calendars**) - `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) - `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` (**Can manage data models**) To download the connection metadata difference between ThoughtSpot and CDW, pass the connection GUID as `connection_identifier` in the API request. + * @param connectionIdentifier GUID of the connection + */ + downloadConnectionMetadataChanges(connectionIdentifier, _options) { + const requestContextPromise = this.requestFactory.downloadConnectionMetadataChanges(connectionIdentifier, _options); + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx) => middleware.pre(ctx))); + } + return middlewarePreObservable.pipe(mergeMap((ctx) => this.configuration.httpApi.send(ctx))).pipe(mergeMap((response) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp) => this.responseProcessor.downloadConnectionMetadataChanges(rsp))); + })); + } + /** + * Version: 9.9.0.cl or later Validates the difference in connection metadata between CDW and ThoughtSpot. Requires `DATAMANAGEMENT` (**Can manage data**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the following Data control privileges may be required: - `CAN_MANAGE_CUSTOM_CALENDAR`(**Can manage custom calendars**) - `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) - `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` (**Can manage data models**) Returns a boolean indicating whether there is any difference between the connection metadata at ThoughtSpot and CDW. To get the connection metadata difference status, pass the connection GUID as `connection_identifier` in the API request. + * @param connectionIdentifier GUID of the connection + */ + fetchConnectionDiffStatus(connectionIdentifier, _options) { + const requestContextPromise = this.requestFactory.fetchConnectionDiffStatus(connectionIdentifier, _options); + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx) => middleware.pre(ctx))); + } + return middlewarePreObservable.pipe(mergeMap((ctx) => this.configuration.httpApi.send(ctx))).pipe(mergeMap((response) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp) => this.responseProcessor.fetchConnectionDiffStatus(rsp))); + })); + } + /** + * Version: 26.2.0.cl or later Revokes OAuth refresh tokens for users who no longer require access to a data warehouse connection. When a token is revoked, the affected user\'s session for that connection is terminated, and they must re-authenticate to regain access. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) or `DATAMANAGEMENT` (**Can manage data**) privileges. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on the ThoughtSpot instance, users with `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) privilege can also make API requests to revoke tokens for connection users. #### Usage guidelines You can specify different combinations of identifiers to control which refresh tokens are revoked. - **connection_identifier**: Revokes refresh tokens for all users of the connection, except the connection author. - **connection_identifier** and **user_identifiers**: Revokes refresh tokens only for the users specified in the request. If the name or ID of the connection author is included in the request, their token will also be revoked. - **connection_identifier** and **configuration_identifiers**: Revokes refresh tokens for all users on the specified configurations, except the configuration author. - **connection_identifier**, **configuration_identifiers**, and **user_identifiers**: Revokes refresh tokens for the specified users on the specified configurations. - **connection_identifier** and **org_identifiers**: Revokes refresh tokens for the specified Orgs. Applicable only for published connections. - **connection_identifier**, **org_identifiers**, and **user_identifiers**: Revokes refresh tokens for the specified users in the specified Orgs. Applicable only for published connections. **NOTE**: The `org_identifiers` parameter is only applicable for published connections. Using this parameter for unpublished connections will result in an error. Ensure that the connections are published before making the API request. + * @param connectionIdentifier Unique ID or name of the connection whose refresh tokens need to be revoked. All the users associated with the connection will have their refresh tokens revoked except the author. + * @param revokeRefreshTokensRequest + */ + revokeRefreshTokens(connectionIdentifier, revokeRefreshTokensRequest, _options) { + const requestContextPromise = this.requestFactory.revokeRefreshTokens(connectionIdentifier, revokeRefreshTokensRequest, _options); + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx) => middleware.pre(ctx))); + } + return middlewarePreObservable.pipe(mergeMap((ctx) => this.configuration.httpApi.send(ctx))).pipe(mergeMap((response) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp) => this.responseProcessor.revokeRefreshTokens(rsp))); + })); + } + /** + * Version: 9.2.0.cl or later Gets connection objects. Requires `DATAMANAGEMENT` (**Can manage data**) or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) privilege is required. - To get a list of all connections available in the ThoughtSpot system, send the API request without any attributes in the request body. - To get the connection objects for a specific type of data warehouse, specify the type in `data_warehouse_types`. - To fetch details of a connection object, specify the connection object GUID or name. The `name_pattern` attribute allows passing partial text with `%` for a wildcard match. - To get details of the database, schemas, tables, or columns from a data connection object, specify `data_warehouse_object_type`. - To get a specific database, schema, table, or column from a connection object, define the object type in `data_warehouse_object_type` and object properties in the `data_warehouse_objects` array. For example, to search for a column, you must pass the database, schema, and table names in the API request. Note that in the following example, object properties are set in a hierarchical order (`database` > `schema` > `table` > `column`). ``` { \"connections\": [ { \"identifier\": \"b9d1f2ef-fa65-4a4b-994e-30fa2d57b0c2\", \"data_warehouse_objects\": [ { \"database\": \"NEBULADEV\", \"schema\": \"INFORMATION_SCHEMA\", \"table\": \"APPLICABLE_ROLES\", \"column\": \"ROLE_NAME\" } ] } ], \"data_warehouse_object_type\": \"COLUMN\" } ``` - To fetch data by `configuration`, specify `data_warehouse_object_type`. For example, to fetch columns from the `DEVELOPMENT` database, specify the `data_warehouse_object_type` as `DATABASE` and define the `configuration` string as `{\"database\":\"DEVELOPMENT\"}`. To get column data for a specific table, specify the table, for example,`{\"database\":\"RETAILAPPAREL\",\"table\":\"PIPES\"}`. - To query connections by `authentication_type`, specify `data_warehouse_object_type`. Supported values for `authentication_type` are: - `SERVICE_ACCOUNT`: For connections that require service account credentials to authenticate to the Cloud Data Warehouse and fetch data. - `OAUTH`: For connections that require OAuth credentials to authenticate to the Cloud Data Warehouse and fetch data. Teradata, Oracle, and Presto Cloud Data Warehouses do not support the OAuth authentication type. - `IAM`: For connections that have the IAM OAuth set up. This authentication type is supported on Amazon Redshift connections only. - `EXTOAUTH`: For connections that have External OAuth set up. ThoughtSpot supports external [OAuth with Microsoft Azure Active Directory (AD)](https://docs.thoughtspot.com/cloud/latest/ connections-snowflake-azure-ad-oauth) and [Okta for Snowflake data connections](https://docs.thoughtspot.com/cloud/latest/connections-snowflake-okta-oauth). - `KEY_PAIR`: For connections that require Key Pair account credentials to authenticate to the Cloud Data Warehouse and fetch data. This authentication type is supported on Snowflake connections only. - `OAUTH_WITH_PKCE`: For connections that require OAuth with PKCE account credentials to authenticate to the Cloud Data Warehouse and fetch data. This authentication type is supported on Snowflake, Starburst, Databricks, Denodo connections only. - `EXTOAUTH_WITH_PKCE`: For connections that require External OAuth With PKCE account credentials to authenticate to the Cloud Data Warehouse and fetch data. This authentication type is supported on Snowflake connections only. - `OAUTH_WITH_PEZ`: For connections that require OAuth With PEZ account credentials to authenticate to the Cloud Data Warehouse and fetch data. This authentication type is supported on Amazon Redshift connections only. - `OAUTH_WITH_SERVICE_PRINCIPAL`: For connections that require OAuth With Service Principal account credentials to authenticate to the Cloud Data Warehouse and fetch data. This authentication type is supported on Databricks connections only. - `PERSONAL_ACCESS_TOKEN`: For connections that require Personal Access Token account credentials to authenticate to the Cloud Data Warehouse and fetch data. This authentication type is supported on Databricks connections only. - `OAUTH_CLIENT_CREDENTIALS`: For connections that require OAuth Client Credentials to authenticate to the Cloud Data Warehouse and fetch data. This authentication type is supported on Snowflake connections only. - To include more details about connection objects in the API response, set `include_details` to `true`. - You can also sort the output by field names and filter connections by tags. **NOTE**: When filtering connection records by parameters other than `data_warehouse_types` or `tag_identifiers`, ensure that you set `record_size` to `-1` and `record_offset` to `0` for precise results. + * @param searchConnectionRequest + */ + searchConnection(searchConnectionRequest, _options) { + const requestContextPromise = this.requestFactory.searchConnection(searchConnectionRequest, _options); + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx) => middleware.pre(ctx))); + } + return middlewarePreObservable.pipe(mergeMap((ctx) => this.configuration.httpApi.send(ctx))).pipe(mergeMap((response) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp) => this.responseProcessor.searchConnection(rsp))); + })); + } + /** + * Version: 26.5.0.cl or later Synchronizes connection metadata attributes from your Cloud Data Warehouse (CDW) with ThoughtSpot. Requires the `DATAMANAGEMENT` (**Can manage data**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` (**Can manage data models**) privilege is required. #### Usage guidelines To synchronize attributes from a CDW, specify the connection GUID or name in the `connection_identifier` path parameter and `sync_attributes` in the request body. Default attribute is `[\"DESCRIPTION\"]`. ##### Hierarchical schema * Connection: The connection object for the sync operation. * Tables: Tables for the sync operation. When no table is specified, all tables are synchronized. * Columns: If the table is specified, you can add the columns for the sync operation. If no columns are specified, all columns in the specified table are considered for the sync operation. To set the scope for the sync operation: * Connection-level: To sync all tables and columns, pass an empty request body, or only the attributes in the request body. * Table-level: To synchronize specific tables and their columns, specify the table identifiers in the `tables` array. * Column-level: To synchronize specific columns, specify the table identifier as the key and column identifiers as the value in the `tables` array. ``` { \"tables\": [ {\"table-guid-1\": [\"column-guid-1\", \"column-guid-2\"]}, \"table-guid-2\" ], \"sync_attributes\": [\"DESCRIPTION\"] } ``` ##### API response If the sync operation is successful, the API returns the following information: * Status of the sync operation. For example, `SUCCESS`, `PARTIAL_SUCCESS`, or `NO_UPDATE`. * Number of tables and columns that were updated. * Number of tables and columns with the sync failed status when the overall sync status is `PARTIAL_SUCCESS`. * Message text indicating the sync results. + * @param connectionIdentifier Unique ID or name of the connection. + * @param syncMetadataRequest + */ + syncMetadata(connectionIdentifier, syncMetadataRequest, _options) { + const requestContextPromise = this.requestFactory.syncMetadata(connectionIdentifier, syncMetadataRequest, _options); + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx) => middleware.pre(ctx))); + } + return middlewarePreObservable.pipe(mergeMap((ctx) => this.configuration.httpApi.send(ctx))).pipe(mergeMap((response) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp) => this.responseProcessor.syncMetadata(rsp))); + })); + } + /** + * Version: 9.2.0.cl or later **Important**: This endpoint is deprecated and will be removed from ThoughtSpot in September 2025. ThoughtSpot strongly recommends using the [Update connection V2](#/http/api-endpoints/connections/update-connection-v2) endpoint to update your connection objects. #### Usage guidelines Updates a connection object. Requires `DATAMANAGEMENT` (**Can manage data**) and edit permissions to the connection object, or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) privilege is required. To update a connection object, pass these parameters in your API request: 1. GUID of the connection object. 2. If you are updating tables or database schema of a connection object: a. Add the updated JSON map of metadata with database, schema, and tables in `data_warehouse_config`. b. Set `validate` to `true`. 3. If you are updating a configuration attribute, connection name, or description, you can set `validate` to `false`. + * @param updateConnectionRequest + */ + updateConnection(updateConnectionRequest, _options) { + const requestContextPromise = this.requestFactory.updateConnection(updateConnectionRequest, _options); + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx) => middleware.pre(ctx))); + } + return middlewarePreObservable.pipe(mergeMap((ctx) => this.configuration.httpApi.send(ctx))).pipe(mergeMap((response) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp) => this.responseProcessor.updateConnection(rsp))); + })); + } + /** + * Version: 26.6.0.cl or later Activates or deactivates a connection. A deactivated connection cannot be used for queries or operations until it is activated again. Requires `DATAMANAGEMENT` (**Can manage data**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) privilege is required. Only the connection owner or an administrator can perform this operation. #### Usage guidelines To update the status of a connection, specify the connection GUID or name in the `connection_identifier` path parameter and the desired `status` in the request body. - **ACTIVATED**: Enables the connection. Queries and operations can resume on an activated connection. - **DEACTIVATED**: Disables the connection. It does not remove the connection metadata, but only makes the connection unavailable for queries and operations. You can reactivate a deactivated connection by setting \"status\": \"ACTIVATED\". + * @param connectionIdentifier Unique ID or name of the connection. + * @param updateConnectionStatusRequest + */ + updateConnectionStatus(connectionIdentifier, updateConnectionStatusRequest, _options) { + const requestContextPromise = this.requestFactory.updateConnectionStatus(connectionIdentifier, updateConnectionStatusRequest, _options); + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx) => middleware.pre(ctx))); + } + return middlewarePreObservable.pipe(mergeMap((ctx) => this.configuration.httpApi.send(ctx))).pipe(mergeMap((response) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp) => this.responseProcessor.updateConnectionStatus(rsp))); + })); + } + /** + * Version: 10.4.0.cl or later Updates a connection object. Requires `DATAMANAGEMENT` (**Can manage data**) and edit permissions to the connection object, or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) privilege is required. To update a connection object, pass these parameters in your API request: 1. GUID of the connection object. 2. If you are updating tables or database schema of a connection object: a. Add the updated JSON map of metadata with database, schema, and tables in `data_warehouse_config`. b. Set `validate` to `true`. **NOTE:** If the `authentication_type` is anything other than SERVICE_ACCOUNT, you must explicitly provide the authenticationType property in the payload. If you do not specify authenticationType, the API will default to SERVICE_ACCOUNT as the authentication type. * A JSON map of configuration attributes, database details, and table properties in `data_warehouse_config` as shown in the following example: * This is an example of updating a single table in a empty connection: ``` { \"authenticationType\": \"SERVICE_ACCOUNT\", \"externalDatabases\": [ { \"name\": \"DEVELOPMENT\", \"isAutoCreated\": false, \"schemas\": [ { \"name\": \"TS_dataset\", \"tables\": [ { \"name\": \"DEMORENAME\", \"type\": \"TABLE\", \"description\": \"\", \"selected\": true, \"linked\": true, \"gid\": 0, \"datasetId\": \"-1\", \"subType\": \"\", \"reportId\": \"\", \"viewId\": \"\", \"columns\": [ { \"name\": \"Col1\", \"type\": \"VARCHAR\", \"canImport\": true, \"selected\": true, \"description\": \"\", \"isLinkedActive\": true, \"isAggregate\": false }, { \"name\": \"Col2\", \"type\": \"VARCHAR\", \"canImport\": true, \"selected\": true, \"description\": \"\", \"isLinkedActive\": true, \"isAggregate\": false }, { \"name\": \"Col3\", \"type\": \"VARCHAR\", \"canImport\": true, \"selected\": true, \"description\": \"\", \"isLinkedActive\": true, \"isAggregate\": false }, { \"name\": \"Col312\", \"type\": \"VARCHAR\", \"canImport\": true, \"selected\": true, \"description\": \"\", \"isLinkedActive\": true, \"isAggregate\": false }, { \"name\": \"Col4\", \"type\": \"VARCHAR\", \"canImport\": true, \"selected\": true, \"description\": \"\", \"isLinkedActive\": true, \"isAggregate\": false } ], \"relationships\": [] } ] } ] } ], \"configuration\": { \"password\": \"\", \"database\": \"DEVELOPMENT\", \"role\": \"DEV\", \"accountName\": \"thoughtspot_partner\", \"warehouse\": \"DEMO_WH\", \"user\": \"DEV_USER\" } } ``` * This is an example of updating a single table in an existing connection with tables: ``` { \"authenticationType\": \"SERVICE_ACCOUNT\", \"externalDatabases\": [ { \"name\": \"DEVELOPMENT\", \"isAutoCreated\": false, \"schemas\": [ { \"name\": \"TS_dataset\", \"tables\": [ { \"name\": \"CUSTOMER\", \"type\": \"TABLE\", \"description\": \"\", \"selected\": true, \"linked\": true, \"gid\": 0, \"datasetId\": \"-1\", \"subType\": \"\", \"reportId\": \"\", \"viewId\": \"\", \"columns\": [], \"relationships\": [] }, { \"name\": \"tpch5k_falcon_default_schema_users\", \"type\": \"TABLE\", \"description\": \"\", \"selected\": true, \"linked\": true, \"gid\": 0, \"datasetId\": \"-1\", \"subType\": \"\", \"reportId\": \"\", \"viewId\": \"\", \"columns\": [ { \"name\": \"user_id\", \"type\": \"INT64\", \"canImport\": true, \"selected\": true, \"description\": \"\", \"isLinkedActive\": true, \"isAggregate\": false }, { \"name\": \"product_id\", \"type\": \"INT64\", \"canImport\": true, \"selected\": true, \"description\": \"\", \"isLinkedActive\": true, \"isAggregate\": false }, { \"name\": \"user_cost\", \"type\": \"INT64\", \"canImport\": true, \"selected\": true, \"description\": \"\", \"isLinkedActive\": true, \"isAggregate\": false } ], \"relationships\": [] } ] } ] } ], \"configuration\": { \"password\": \"\", \"database\": \"DEVELOPMENT\", \"role\": \"DEV\", \"accountName\": \"thoughtspot_partner\", \"warehouse\": \"DEMO_WH\", \"user\": \"DEV_USER\" } } ``` 3. If you are updating a configuration attribute, connection name, or description, you can set `validate` to `false`. **NOTE:** If the `authentication_type` is anything other than SERVICE_ACCOUNT, you must explicitly provide the authenticationType property in the payload. If you do not specify authenticationType, the API will default to SERVICE_ACCOUNT as the authentication type. * A JSON map of configuration attributes in `data_warehouse_config`. The following example shows the configuration attributes for a Snowflake connection: ``` { \"configuration\":{ \"accountName\":\"thoughtspot_partner\", \"user\":\"tsadmin\", \"password\":\"TestConn123\", \"role\":\"sysadmin\", \"warehouse\":\"MEDIUM_WH\" }, \"externalDatabases\":[ ] } ``` + * @param connectionIdentifier Unique ID or name of the connection. + * @param updateConnectionV2Request + */ + updateConnectionV2(connectionIdentifier, updateConnectionV2Request, _options) { + const requestContextPromise = this.requestFactory.updateConnectionV2(connectionIdentifier, updateConnectionV2Request, _options); + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx) => middleware.pre(ctx))); + } + return middlewarePreObservable.pipe(mergeMap((ctx) => this.configuration.httpApi.send(ctx))).pipe(mergeMap((response) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp) => this.responseProcessor.updateConnectionV2(rsp))); + })); + } +}; +var ObservableCustomActionApi = class { + constructor(configuration, requestFactory, responseProcessor) { + this.configuration = configuration; + this.requestFactory = requestFactory || new CustomActionApiRequestFactory(configuration); + this.responseProcessor = responseProcessor || new CustomActionApiResponseProcessor(); + } + /** + * Version: 9.6.0.cl or later Creates a custom action that appears as a menu action on a saved Answer or Liveboard visualization. Requires `DEVELOPER` (**Has Developer privilege**) or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `DEVELOPER` (**Has developer privilege**) privilege is required. #### Usage Guidelines The API lets you create the following types of custom actions: * URL-based action Allows pushing data to an external URL. * Callback action Triggers a callback to the host application and initiates a response payload on an embedded ThoughtSpot instance. By default, custom actions are visible to only administrator or developer users. To make a custom action available to other users, and specify the groups in `group_identifiers`. By default, the custom action is set as a _global_ action on all visualizations and saved Answers. To assign a custom action to specific Liveboard visualization, saved Answer, or Worksheet, set `visibility` to `false` in `default_action_config` property and specify the GUID or name of the object in `associate_metadata`. For more information, see [Custom actions](https://developers.thoughtspot.com/docs/custom-action-intro). + * @param createCustomActionRequest + */ + createCustomAction(createCustomActionRequest, _options) { + const requestContextPromise = this.requestFactory.createCustomAction(createCustomActionRequest, _options); + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx) => middleware.pre(ctx))); + } + return middlewarePreObservable.pipe(mergeMap((ctx) => this.configuration.httpApi.send(ctx))).pipe(mergeMap((response) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp) => this.responseProcessor.createCustomAction(rsp))); + })); + } + /** + * Version: 9.6.0.cl or later Removes the custom action specified in the API request. Requires `DEVELOPER` (**Has Developer privilege**) or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `DEVELOPER` (**Has developer privilege**) privilege is required. + * @param customActionIdentifier Unique ID or name of the custom action. + */ + deleteCustomAction(customActionIdentifier, _options) { + const requestContextPromise = this.requestFactory.deleteCustomAction(customActionIdentifier, _options); + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx) => middleware.pre(ctx))); + } + return middlewarePreObservable.pipe(mergeMap((ctx) => this.configuration.httpApi.send(ctx))).pipe(mergeMap((response) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp) => this.responseProcessor.deleteCustomAction(rsp))); + })); + } + /** + * Version: 9.6.0.cl or later Gets custom actions configured on the cluster. Requires `DEVELOPER` (**Has Developer privilege**) or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `DEVELOPER` (**Has developer privilege**) privilege is required. + * @param searchCustomActionsRequest + */ + searchCustomActions(searchCustomActionsRequest, _options) { + const requestContextPromise = this.requestFactory.searchCustomActions(searchCustomActionsRequest, _options); + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx) => middleware.pre(ctx))); + } + return middlewarePreObservable.pipe(mergeMap((ctx) => this.configuration.httpApi.send(ctx))).pipe(mergeMap((response) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp) => this.responseProcessor.searchCustomActions(rsp))); + })); + } + /** + * Version: 9.6.0.cl or later Updates a custom action. Requires `DEVELOPER` (**Has Developer privilege**) or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `DEVELOPER` (**Has developer privilege**) privilege is required. #### Usage Guidelines The API allows you to modify the following properties: * Name of the custom action * Action availability to groups * Association to metadata objects * Authentication settings for a URL-based action For more information, see [Custom actions](https://developers.thoughtspot.com/docs/custom-action-intro). + * @param customActionIdentifier Unique ID or name of the custom action. + * @param updateCustomActionRequest + */ + updateCustomAction(customActionIdentifier, updateCustomActionRequest, _options) { + const requestContextPromise = this.requestFactory.updateCustomAction(customActionIdentifier, updateCustomActionRequest, _options); + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx) => middleware.pre(ctx))); + } + return middlewarePreObservable.pipe(mergeMap((ctx) => this.configuration.httpApi.send(ctx))).pipe(mergeMap((response) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp) => this.responseProcessor.updateCustomAction(rsp))); + })); + } +}; +var ObservableCustomCalendarsApi = class { + constructor(configuration, requestFactory, responseProcessor) { + this.configuration = configuration; + this.requestFactory = requestFactory || new CustomCalendarsApiRequestFactory(configuration); + this.responseProcessor = responseProcessor || new CustomCalendarsApiResponseProcessor(); + } + /** + * Version: 10.12.0.cl or later Creates a new [custom calendar](https://docs.thoughtspot.com/cloud/latest/connections-cust-cal). Requires `DATAMANAGEMENT` (**Can manage data**) or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your ThoughtSpot instance, the `CAN_MANAGE_CUSTOM_CALENDAR` (**Can manage custom calendars**) privilege is required. #### Usage guidelines You can create a custom calendar from scratch or an existing Table in ThoughtSpot. For both methods of calendar creation, the following parameters are required: * Name of the custom calendar. * Calendar creation method. To create a calendar from an existing table, specify the method: - `FROM_EXISTING_TABLE` - Creates calendar from the table reference provided in the API request. - `FROM_INPUT_PARAMS` - Creates a calendar from the parameters defined in the API request. * Connection ID and Table name * Database and schema name attributes: For most Cloud Data Warehouse (CDW) connectors, both `database_name` and `schema_name` attributes are required. However, the attribute requirements are conditional and vary based on the connector type and its metadata structure. For example, for connectors such as Teradata, MySQL, SingleSore, Amazon Aurora MySQL, Amazon RDS MySQL, Oracle, and GCP_MYSQL, the `schema_name` is required, whereas the `database_name` attribute is not. Similarly, connectors such as ClickHouse require you to specify the `database_name` and the schema specification in such cases is optional. **NOTE**: If you are creating a calendar from an existing table, ensure that the referenced table matches the required DDL for custom calendars. If the schema does not match, the API returns an error. ##### Calendar type The API allows you to create the following types of calendars: * `MONTH_OFFSET`. The default calendar type. A `MONTH_OFFSET` calendar is offset by a few months from the standard calendar months (January to December) and the year begins with the month defined in the request. For example, if the `month_offset` value is set as `April`, the calendar year begins in April. * `4-4-5`. Each quarter in the calendar will include two 4-week months followed by one 5-week month. * `4-5-4`. Each quarter in the calendar will include two 4-week months with a 5-week month between. * `5-4-4`. Each quarter begins with a 5-week month, followed by two 4-week months. To start and end the calendar on a specific date, specify the dates in the `MM/DD/YYYY` format. For `MONTH_OFFSET` calendars, ensure that the `start_date` matches the month specified in the `month_offset` attribute. You can also set the starting day of the week and customize the prefixes for year and quarter labels. #### Examples To create a calendar from an existing table: ``` { \"name\": \"MyCustomCalendar1\", \"table_reference\": { \"connection_identifier\": \"4db8ea22-2ff4-4224-b05a-26674717e468\", \"table_name\": \"MyCalendarTable\", \"database_name\": \"RETAILAPPAREL\", \"schema_name\": \"PUBLIC\" }, \"creation_method\": \"FROM_EXISTING_TABLE\", } ``` To create a calendar from scratch: ``` { \"name\": \"MyCustomCalendar1\", \"table_reference\": { \"connection_identifier\": \"4db8ea22-2ff4-4224-b05a-26674717e468\", \"table_name\": \"MyCalendarTable\", \"database_name\": \"RETAILAPPAREL\", \"schema_name\": \"PUBLIC\" }, \"creation_method\": \"FROM_INPUT_PARAMS\", \"calendar_type\": \"MONTH_OFFSET\", \"month_offset\": \"April\", \"start_day_of_week\": \"Monday\", \"quarter_name_prefix\": \"Q\", \"year_name_prefix\": \"FY\", \"start_date\": \"04/01/2025\", \"end_date\": \"04/31/2025\" } ``` + * @param createCalendarRequest + */ + createCalendar(createCalendarRequest, _options) { + const requestContextPromise = this.requestFactory.createCalendar(createCalendarRequest, _options); + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx) => middleware.pre(ctx))); + } + return middlewarePreObservable.pipe(mergeMap((ctx) => this.configuration.httpApi.send(ctx))).pipe(mergeMap((response) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp) => this.responseProcessor.createCalendar(rsp))); + })); + } + /** + * Version: 10.12.0.cl or later Deletes a [custom calendar](https://docs.thoughtspot.com/cloud/latest/connections-cust-cal). Requires `DATAMANAGEMENT` (**Can manage data**) or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your ThoughtSpot instance, the `CAN_MANAGE_CUSTOM_CALENDAR` (**Can manage custom calendars**) privilege is required. #### Usage guidelines To delete a custom calendar, specify the calendar ID as a path parameter in the request URL. + * @param calendarIdentifier Unique ID or name of the Calendar. + */ + deleteCalendar(calendarIdentifier, _options) { + const requestContextPromise = this.requestFactory.deleteCalendar(calendarIdentifier, _options); + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx) => middleware.pre(ctx))); + } + return middlewarePreObservable.pipe(mergeMap((ctx) => this.configuration.httpApi.send(ctx))).pipe(mergeMap((response) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp) => this.responseProcessor.deleteCalendar(rsp))); + })); + } + /** + * Version: 10.12.0.cl or later Exports a [custom calendar](https://docs.thoughtspot.com/cloud/latest/connections-cust-cal) in the CSV format. Requires `DATAMANAGEMENT` (**Can manage data**) or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your ThoughtSpot instance, the `CAN_MANAGE_CUSTOM_CALENDAR` (**Can manage custom calendars**) privilege is required. #### Usage guidelines Use this API to download a custom calendar in the CSV file format. In your API request, specify the following parameters. * Start and end date of the calendar. For \"month offset\" calendars, the start date must match the month defined in the `month_offset` attribute. You can also specify optional parameters such as the starting day of the week and prefixes for the quarter and year labels. + * @param generateCSVRequest + */ + generateCSV(generateCSVRequest, _options) { + const requestContextPromise = this.requestFactory.generateCSV(generateCSVRequest, _options); + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx) => middleware.pre(ctx))); + } + return middlewarePreObservable.pipe(mergeMap((ctx) => this.configuration.httpApi.send(ctx))).pipe(mergeMap((response) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp) => this.responseProcessor.generateCSV(rsp))); + })); + } + /** + * Version: 10.12.0.cl or later Gets a list of [custom calendars](https://docs.thoughtspot.com/cloud/latest/connections-cust-cal). Requires `DATAMANAGEMENT` (**Can manage data**) or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your ThoughtSpot instance, the `CAN_MANAGE_CUSTOM_CALENDAR` (**Can manage custom calendars**) privilege is required. #### Usage guidelines By default, the API returns a list of custom calendars for all connection objects. To retrieve custom calendar details for a particular connection, specify the connection ID. You can also use other search parameters such as `name_pattern` and `sort_options` as search filters. The `name_pattern` parameter filters and returns only those objects that match the specified pattern. Use `%` as a wildcard for pattern matching. + * @param searchCalendarsRequest + */ + searchCalendars(searchCalendarsRequest, _options) { + const requestContextPromise = this.requestFactory.searchCalendars(searchCalendarsRequest, _options); + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx) => middleware.pre(ctx))); + } + return middlewarePreObservable.pipe(mergeMap((ctx) => this.configuration.httpApi.send(ctx))).pipe(mergeMap((response) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp) => this.responseProcessor.searchCalendars(rsp))); + })); + } + /** + * Version: 10.12.0.cl or later Updates the properties of a [custom calendar](https://docs.thoughtspot.com/cloud/latest/connections-cust-cal). Requires `DATAMANAGEMENT` (**Can manage data**) or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your ThoughtSpot instance, the `CAN_MANAGE_CUSTOM_CALENDAR` (**Can manage custom calendars**) privilege is required. #### Usage guidelines You can update the properties of a calendar using one of the following methods: * `FROM_INPUT_PARAMS` to update the calendar properties with the values defined in the API request. * `FROM_EXISTING_TABLE` Creates a calendar from the parameters defined in the API request. To update a custom calendar, specify the calendar ID as a path parameter in the request URL and the following parameters in the request body: * Connection ID and Table name * Database and schema name attributes: For most Cloud Data Warehouse (CDW) connectors, both `database_name` and `schema_name` attributes are required. However, the attribute requirements are conditional and vary based on the connector type and its metadata structure. For example, for connectors such as Teradata, MySQL, SingleSore, Amazon Aurora MySQL, Amazon RDS MySQL, Oracle, and GCP_MYSQL, the `schema_name` is required, whereas the `database_name` attribute is not. Similarly, connectors such as ClickHouse require you to specify the `database_name` and the schema specification in such cases is optional. The API allows you to modify the calendar type, month offset value, start and end date, starting day of the week, and prefixes assigned to the year and quarter labels. #### Examples Update a custom calendar using an existing Table in ThoughtSpot: ``` { \"update_method\": \"FROM_EXISTING_TABLE\", \"table_reference\": { \"connection_identifier\": \"Connection1\", \"database_name\": \"db1\", \"table_name\": \"custom_calendar_2025\", \"schame_name\": \"schemaVar\" } } ``` Update a custom calendar with the attributes defined in the API request: ``` { \"update_method\": \"FROM_INPUT_PARAMS\", \"table_reference\": { \"connection_identifier\": \"Connection1\", \"database_name\": \"db1\", \"table_name\": \"custom_calendar_2025\", \"schame_name\": \"schemaVar\" }, \"month_offset\": \"August\", \"start_day_of_week\": \"Monday\", \"start_date\": \"08/01/2025\", \"end_date\": \"07/31/2026\" } ``` + * @param calendarIdentifier Unique Id or name of the calendar. + * @param updateCalendarRequest + */ + updateCalendar(calendarIdentifier, updateCalendarRequest, _options) { + const requestContextPromise = this.requestFactory.updateCalendar(calendarIdentifier, updateCalendarRequest, _options); + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx) => middleware.pre(ctx))); + } + return middlewarePreObservable.pipe(mergeMap((ctx) => this.configuration.httpApi.send(ctx))).pipe(mergeMap((response) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp) => this.responseProcessor.updateCalendar(rsp))); + })); + } +}; +var ObservableDBTApi = class { + constructor(configuration, requestFactory, responseProcessor) { + this.configuration = configuration; + this.requestFactory = requestFactory || new DBTApiRequestFactory(configuration); + this.responseProcessor = responseProcessor || new DBTApiResponseProcessor(); + } + /** + * Version: 9.9.0.cl or later Creates a DBT connection object in ThoughtSpot. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege or `DATAMANAGEMENT` (**Can manage data**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the following Data control privileges may be required: - `CAN_MANAGE_CUSTOM_CALENDAR`(**Can manage custom calendars**) - `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) - `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` (**Can manage data models**) #### About create DBT connection DBT connection in ThoughtSpot is used by the user to define DBT credentials for cloud . The API needs embrace connection, embrace database name, DBT url, import type, DBT account identifier, DBT project identifier, DBT access token and environment details (or) embrace connection, embrace database name, import type, file_content to create a connection object. To know more about DBT, see ThoughtSpot Product Documentation. + * @param connectionName Name of the connection. + * @param databaseName Name of the Database. + * @param importType Mention type of Import + * @param accessToken Access token is mandatory when Import_Type is DBT_CLOUD. + * @param dbtUrl DBT URL is mandatory when Import_Type is DBT_CLOUD. + * @param accountId Account ID is mandatory when Import_Type is DBT_CLOUD + * @param projectId Project ID is mandatory when Import_Type is DBT_CLOUD + * @param dbtEnvId DBT Environment ID\\\" + * @param projectName Name of the project + * @param fileContent Upload DBT Manifest and Catalog artifact files as a ZIP file. This field is Mandatory when Import Type is \\\'ZIP_FILE\\\' + */ + dbtConnection(connectionName, databaseName, importType, accessToken, dbtUrl, accountId, projectId, dbtEnvId, projectName, fileContent, _options) { + const requestContextPromise = this.requestFactory.dbtConnection(connectionName, databaseName, importType, accessToken, dbtUrl, accountId, projectId, dbtEnvId, projectName, fileContent, _options); + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx) => middleware.pre(ctx))); + } + return middlewarePreObservable.pipe(mergeMap((ctx) => this.configuration.httpApi.send(ctx))).pipe(mergeMap((response) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp) => this.responseProcessor.dbtConnection(rsp))); + })); + } + /** + * Version: 9.9.0.cl or later Resynchronize the existing list of models, tables, worksheet tml’s and import them to Thoughtspot based on the DBT connection object. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege or `DATAMANAGEMENT` (**Can manage data**) privilege, along with an existing DBT connection. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the following data control privileges may be required: - `CAN_MANAGE_CUSTOM_CALENDAR`(**Can manage custom calendars**) - `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) - `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` (**Can manage data models**) + * @param dbtConnectionIdentifier Unique ID of the DBT connection. + * @param fileContent Upload DBT Manifest and Catalog artifact files as a ZIP file. This field is mandatory if the connection was created with import_type ‘ZIP_FILE’ + */ + dbtGenerateSyncTml(dbtConnectionIdentifier, fileContent, _options) { + const requestContextPromise = this.requestFactory.dbtGenerateSyncTml(dbtConnectionIdentifier, fileContent, _options); + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx) => middleware.pre(ctx))); + } + return middlewarePreObservable.pipe(mergeMap((ctx) => this.configuration.httpApi.send(ctx))).pipe(mergeMap((response) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp) => this.responseProcessor.dbtGenerateSyncTml(rsp))); + })); + } + /** + * Version: 9.9.0.cl or later Generate required table and worksheet and import them. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege or `DATAMANAGEMENT` (**Can manage data**) privilege, along with an existing DBT connection. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the following data control privileges may be required: - `CAN_MANAGE_CUSTOM_CALENDAR`(**Can manage custom calendars**) - `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) - `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` (**Can manage data models**) #### About generate TML Models and Worksheets to be imported can be selected by the user as part of the API. + * @param dbtConnectionIdentifier Unique ID of the DBT connection. + * @param modelTables List of Models and their respective Tables Example: \\\'[{\\\"model_name\\\": \\\"model_name\\\", \\\"tables\\\": [\\\"table_name\\\"]}]\\\' + * @param importWorksheets Mention the worksheet tmls to import + * @param worksheets List of worksheets is mandatory when import_Worksheets is type SELECTED Example: [\\\"worksheet_name\\\"] + * @param fileContent Upload DBT Manifest and Catalog artifact files as a ZIP file. This field is mandatory if the connection was created with import_type ‘ZIP_FILE’ + */ + dbtGenerateTml(dbtConnectionIdentifier, modelTables, importWorksheets, worksheets, fileContent, _options) { + const requestContextPromise = this.requestFactory.dbtGenerateTml(dbtConnectionIdentifier, modelTables, importWorksheets, worksheets, fileContent, _options); + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx) => middleware.pre(ctx))); + } + return middlewarePreObservable.pipe(mergeMap((ctx) => this.configuration.httpApi.send(ctx))).pipe(mergeMap((response) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp) => this.responseProcessor.dbtGenerateTml(rsp))); + })); + } + /** + * Version: 9.9.0.cl or later Gets a list of DBT connection objects by user and organization, available on the ThoughtSpot system. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege or `DATAMANAGEMENT` (**Can manage data**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the following Data control privileges may be required: - `CAN_MANAGE_CUSTOM_CALENDAR`(**Can manage custom calendars**) - `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) - `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` (**Can manage data models**) #### About search DBT connection To get details of a specific DBT connection identifier, database connection identifier, database connection name, database name, project name, project identifier, environment identifier , import type and author. + */ + dbtSearch(_options) { + const requestContextPromise = this.requestFactory.dbtSearch(_options); + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx) => middleware.pre(ctx))); + } + return middlewarePreObservable.pipe(mergeMap((ctx) => this.configuration.httpApi.send(ctx))).pipe(mergeMap((response) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp) => this.responseProcessor.dbtSearch(rsp))); + })); + } + /** + * Version: 9.9.0.cl or later Removes the specified DBT connection object from the ThoughtSpot system. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) or `DATAMANAGEMENT` (**Can manage data ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the following Data control privileges may be required: - `CAN_MANAGE_CUSTOM_CALENDAR`(**Can manage custom calendars**) - `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) - `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` (**Can manage data models**) + * @param dbtConnectionIdentifier Unique ID of the DBT Connection. + */ + deleteDbtConnection(dbtConnectionIdentifier, _options) { + const requestContextPromise = this.requestFactory.deleteDbtConnection(dbtConnectionIdentifier, _options); + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx) => middleware.pre(ctx))); + } + return middlewarePreObservable.pipe(mergeMap((ctx) => this.configuration.httpApi.send(ctx))).pipe(mergeMap((response) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp) => this.responseProcessor.deleteDbtConnection(rsp))); + })); + } + /** + * Version: 9.9.0.cl or later Updates a DBT connection object. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege or `DATAMANAGEMENT` (**Can manage data ThoughtSpot**) privilege, along with an existing DBT connection. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the following data control privileges may be required: - `CAN_MANAGE_CUSTOM_CALENDAR`(**Can manage custom calendars**) - `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) - `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` (**Can manage data models**) #### About update DBT connection You can modify DBT connection object properties such as embrace connection name, embrace database name, import type, account identifier, access token, project identifier and environment (or) embrace connection, embrace database name, import type, file_content settings. + * @param dbtConnectionIdentifier Unique ID of the DBT Connection. + * @param connectionName Name of the connection. + * @param databaseName Name of the Database. + * @param importType Mention type of Import + * @param accessToken Access token is mandatory when Import_Type is DBT_CLOUD. + * @param dbtUrl DBT URL is mandatory when Import_Type is DBT_CLOUD. + * @param accountId Account ID is mandatory when Import_Type is DBT_CLOUD + * @param projectId Project ID is mandatory when Import_Type is DBT_CLOUD + * @param dbtEnvId DBT Environment ID\\\" + * @param projectName Name of the project + * @param fileContent Upload DBT Manifest and Catalog artifact files as a ZIP file. This field is Mandatory when Import Type is \\\'ZIP_FILE\\\' + */ + updateDbtConnection(dbtConnectionIdentifier, connectionName, databaseName, importType, accessToken, dbtUrl, accountId, projectId, dbtEnvId, projectName, fileContent, _options) { + const requestContextPromise = this.requestFactory.updateDbtConnection(dbtConnectionIdentifier, connectionName, databaseName, importType, accessToken, dbtUrl, accountId, projectId, dbtEnvId, projectName, fileContent, _options); + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx) => middleware.pre(ctx))); + } + return middlewarePreObservable.pipe(mergeMap((ctx) => this.configuration.httpApi.send(ctx))).pipe(mergeMap((response) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp) => this.responseProcessor.updateDbtConnection(rsp))); + })); + } +}; +var ObservableDataApi = class { + constructor(configuration, requestFactory, responseProcessor) { + this.configuration = configuration; + this.requestFactory = requestFactory || new DataApiRequestFactory(configuration); + this.responseProcessor = responseProcessor || new DataApiResponseProcessor(); + } + /** + * Version: 9.0.0.cl or later Fetches data from a saved Answer. Requires at least view access to the saved Answer. The `record_size` attribute determines the number of records to retrieve in an API call. For more information about pagination, record size, and maximum row limit, see [Pagination and record size settings](https://developers.thoughtspot.com/docs/fetch-data-and-report-apis#_pagination_settings_for_data_and_report_apis). + * @param fetchAnswerDataRequest + */ + fetchAnswerData(fetchAnswerDataRequest, _options) { + const requestContextPromise = this.requestFactory.fetchAnswerData(fetchAnswerDataRequest, _options); + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx) => middleware.pre(ctx))); + } + return middlewarePreObservable.pipe(mergeMap((ctx) => this.configuration.httpApi.send(ctx))).pipe(mergeMap((response) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp) => this.responseProcessor.fetchAnswerData(rsp))); + })); + } + /** + * Version: 9.0.0.cl or later Gets data from a Liveboard object and its visualization. Requires at least view access to the Liveboard. #### Usage guidelines In the request body, specify the GUID or name of the Liveboard. To get data for specific visualizations, add the GUIDs or names of the visualizations in the API request. To include unsaved changes in the report, pass the `transient_pinboard_content` script generated from the `getExportRequestForCurrentPinboard` method in the Visual Embed SDK. Upon successful execution, the API returns the report with unsaved changes. If the new Liveboard experience mode, the transient content includes ad hoc changes to visualizations such as sorting, toggling of legends, and data drill down. For more information, and see [Liveboard data API](https://developers.thoughtspot.com/docs/fetch-data-and-report-apis#_fetch_liveboard_data_api). + * @param fetchLiveboardDataRequest + */ + fetchLiveboardData(fetchLiveboardDataRequest, _options) { + const requestContextPromise = this.requestFactory.fetchLiveboardData(fetchLiveboardDataRequest, _options); + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx) => middleware.pre(ctx))); + } + return middlewarePreObservable.pipe(mergeMap((ctx) => this.configuration.httpApi.send(ctx))).pipe(mergeMap((response) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp) => this.responseProcessor.fetchLiveboardData(rsp))); + })); + } + /** + * Version: 9.0.0.cl or later Generates an Answer from a given data source. Requires at least view access to the data source object (Worksheet or View). #### Usage guidelines To search data, specify the data source GUID in `logical_table_identifier`. The data source can be a Worksheet, View, Table, or SQL view. Pass search tokens in the `query_string` attribute in the API request as shown in the following example: ``` { \"query_string\": \"[sales] by [store]\", \"logical_table_identifier\": \"cd252e5c-b552-49a8-821d-3eadaa049cca\", } ``` For more information about the `query_string` format and data source attribute, see [Search data API](https://developers.thoughtspot.com/docs/fetch-data-and-report-apis#_search_data_api). The `record_size` attribute determines the number of records to retrieve in an API call. For more information about pagination, record size, and maximum row limit, see [Pagination and record size settings](https://developers.thoughtspot.com/docs/fetch-data-and-report-apis#_pagination_settings_for_data_and_report_api). + * @param searchDataRequest + */ + searchData(searchDataRequest, _options) { + const requestContextPromise = this.requestFactory.searchData(searchDataRequest, _options); + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx) => middleware.pre(ctx))); + } + return middlewarePreObservable.pipe(mergeMap((ctx) => this.configuration.httpApi.send(ctx))).pipe(mergeMap((response) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp) => this.responseProcessor.searchData(rsp))); + })); + } +}; +var ObservableEmailCustomizationApi = class { + constructor(configuration, requestFactory, responseProcessor) { + this.configuration = configuration; + this.requestFactory = requestFactory || new EmailCustomizationApiRequestFactory(configuration); + this.responseProcessor = responseProcessor || new EmailCustomizationApiResponseProcessor(); + } + /** + * Version: 10.10.0.cl or later Creates a customization configuration for the notification email. #### Pre-requisites Requires `DEVELOPER` (**has developer privilege**) or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `DEVELOPER` (**Has developer privilege**) privilege is required. **NOTE**:This endpoint in currently in beta. Contact ThoughtSpot support to enable this on your instance. #### Usage guidelines To create a custom configuration pass these parameters in your API request: - A JSON map of configuration attributes `template_properties`. The following example shows a sample set of customization configuration: ``` { { \"cta_button_bg_color\": \"#444DEA\", \"cta_text_font_color\": \"#FFFFFF\", \"primary_bg_color\": \"#D3DEF0\", \"logo_url\": \"https://storage.pardot.com/710713/1642089901EbkRibJq/TS_fullworkmark_darkmode.png\", \"font_family\": \"\", \"product_name\": \"ThoughtSpot\", \"footer_address\": \"444 Castro St, Suite 1000 Mountain View, CA 94041\", \"footer_phone\": \"(800) 508-7008\", \"replacement_value_for_liveboard\": \"Dashboard\", \"replacement_value_for_answer\": \"Chart\", \"replacement_value_for_spot_iq\": \"AI Insights\", \"hide_footer_phone\": false, \"hide_footer_address\": false, \"hide_product_name\": false, \"hide_manage_notification\": false, \"hide_mobile_app_nudge\": false, \"hide_privacy_policy\": false, \"hide_ts_vocabulary_definitions\": false, \"hide_error_message\": false, \"hide_unsubscribe_link\": false, \"hide_notification_status\": false, \"hide_modify_alert\": false, \"company_website_url\": \"https://your-website.com/\", \"company_privacy_policy_url\" : \"https://link-to-privacy-policy.com/\", \"contact_support_url\": \"https://link-to-contact-support.com/\", \"hide_contact_support_url\": false, \"hide_logo_url\" : false } } ``` + * @param createEmailCustomizationRequest + */ + createEmailCustomization(createEmailCustomizationRequest, _options) { + const requestContextPromise = this.requestFactory.createEmailCustomization(createEmailCustomizationRequest, _options); + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx) => middleware.pre(ctx))); + } + return middlewarePreObservable.pipe(mergeMap((ctx) => this.configuration.httpApi.send(ctx))).pipe(mergeMap((response) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp) => this.responseProcessor.createEmailCustomization(rsp))); + })); + } + /** + * Version: 10.10.0.cl or later Deletes the configuration for the email customization. #### Pre-requisites Requires `DEVELOPER` (**has developer privilege**) or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `DEVELOPER` (**Has developer privilege**) privilege is required. **NOTE**:This endpoint in currently in beta. Contact ThoughtSpot support to enable this on your instance. #### Usage guidelines - Call the search API endpoint to get the `template_identifier` from the response. - Use that `template_identifier` as a parameter in this API request. + * @param templateIdentifier Unique ID or name of the email customization. + */ + deleteEmailCustomization(templateIdentifier, _options) { + const requestContextPromise = this.requestFactory.deleteEmailCustomization(templateIdentifier, _options); + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx) => middleware.pre(ctx))); + } + return middlewarePreObservable.pipe(mergeMap((ctx) => this.configuration.httpApi.send(ctx))).pipe(mergeMap((response) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp) => this.responseProcessor.deleteEmailCustomization(rsp))); + })); + } + /** + * Version: 10.12.0.cl or later Deletes the configuration for the email customization. #### Pre-requisites Requires `DEVELOPER` (**has developer privilege**) or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `DEVELOPER` (**Has developer privilege**) privilege is required. **NOTE**:This endpoint in currently in beta. Contact ThoughtSpot support to enable this on your instance. #### Usage guidelines - Call the search API endpoint to get the `org_identifier` from the response. - Use that `org_identifier` as a parameter in this API request. + * @param deleteOrgEmailCustomizationRequest + */ + deleteOrgEmailCustomization(deleteOrgEmailCustomizationRequest, _options) { + const requestContextPromise = this.requestFactory.deleteOrgEmailCustomization(deleteOrgEmailCustomizationRequest, _options); + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx) => middleware.pre(ctx))); + } + return middlewarePreObservable.pipe(mergeMap((ctx) => this.configuration.httpApi.send(ctx))).pipe(mergeMap((response) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp) => this.responseProcessor.deleteOrgEmailCustomization(rsp))); + })); + } + /** + * Version: 10.10.0.cl or later Search the email customization configuration if any set for the ThoughtSpot system. #### Pre-requisites Requires `DEVELOPER` (**has developer privilege**) or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `DEVELOPER` (**Has developer privilege**) privilege is required. **NOTE**:This endpoint in currently in beta. Contact ThoughtSpot support to enable this on your instance. + * @param searchEmailCustomizationRequest + */ + searchEmailCustomization(searchEmailCustomizationRequest, _options) { + const requestContextPromise = this.requestFactory.searchEmailCustomization(searchEmailCustomizationRequest, _options); + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx) => middleware.pre(ctx))); + } + return middlewarePreObservable.pipe(mergeMap((ctx) => this.configuration.httpApi.send(ctx))).pipe(mergeMap((response) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp) => this.responseProcessor.searchEmailCustomization(rsp))); + })); + } + /** + * Version: 10.12.0.cl or later Updates a customization configuration for the notification email. #### Pre-requisites Requires `DEVELOPER` (**has developer privilege**) or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `DEVELOPER` (**Has developer privilege**) privilege is required. **NOTE**:This endpoint in currently in beta. Contact ThoughtSpot support to enable this on your instance. #### Usage guidelines To update a custom configuration pass these parameters in your API request: - A JSON map of configuration attributes `template_properties`. The following example shows a sample set of customization configuration: ``` { { \"cta_button_bg_color\": \"#444DEA\", \"cta_text_font_color\": \"#FFFFFF\", \"primary_bg_color\": \"#D3DEF0\", \"logo_url\": \"https://storage.pardot.com/710713/1642089901EbkRibJq/TS_fullworkmark_darkmode.png\", \"font_family\": \"\", \"product_name\": \"ThoughtSpot\", \"footer_address\": \"444 Castro St, Suite 1000 Mountain View, CA 94041\", \"footer_phone\": \"(800) 508-7008\", \"replacement_value_for_liveboard\": \"Dashboard\", \"replacement_value_for_answer\": \"Chart\", \"replacement_value_for_spot_iq\": \"AI Insights\", \"hide_footer_phone\": false, \"hide_footer_address\": false, \"hide_product_name\": false, \"hide_manage_notification\": false, \"hide_mobile_app_nudge\": false, \"hide_privacy_policy\": false, \"hide_ts_vocabulary_definitions\": false, \"hide_error_message\": false, \"hide_unsubscribe_link\": false, \"hide_notification_status\": false, \"hide_modify_alert\": false, \"company_website_url\": \"https://your-website.com/\", \"company_privacy_policy_url\" : \"https://link-to-privacy-policy.com/\", \"contact_support_url\": \"https://link-to-contact-support.com/\", \"hide_contact_support_url\": false, \"hide_logo_url\" : false } } ``` + * @param updateEmailCustomizationRequest + */ + updateEmailCustomization(updateEmailCustomizationRequest, _options) { + const requestContextPromise = this.requestFactory.updateEmailCustomization(updateEmailCustomizationRequest, _options); + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx) => middleware.pre(ctx))); + } + return middlewarePreObservable.pipe(mergeMap((ctx) => this.configuration.httpApi.send(ctx))).pipe(mergeMap((response) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp) => this.responseProcessor.updateEmailCustomization(rsp))); + })); + } + /** + * Version: 10.10.0.cl or later Validates the email customization configuration if any set for the ThoughtSpot system. #### Pre-requisites Requires `DEVELOPER` (**has developer privilege**) or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `DEVELOPER` (**Has developer privilege**) privilege is required. **NOTE**:This endpoint in currently in beta. Contact ThoughtSpot support to enable this on your instance. + */ + validateEmailCustomization(_options) { + const requestContextPromise = this.requestFactory.validateEmailCustomization(_options); + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx) => middleware.pre(ctx))); + } + return middlewarePreObservable.pipe(mergeMap((ctx) => this.configuration.httpApi.send(ctx))).pipe(mergeMap((response) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp) => this.responseProcessor.validateEmailCustomization(rsp))); + })); + } +}; +var ObservableGroupsApi = class { + constructor(configuration, requestFactory, responseProcessor) { + this.configuration = configuration; + this.requestFactory = requestFactory || new GroupsApiRequestFactory(configuration); + this.responseProcessor = responseProcessor || new GroupsApiResponseProcessor(); + } + /** + * Version: 9.0.0.cl or later Creates a group object in ThoughtSpot. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `GROUP_ADMINISTRATION` (**Can manage groups**) privilege is required. #### About groups Groups in ThoughtSpot are used by the administrators to define privileges and organize users based on their roles and access requirements. To know more about groups and privileges, see [ThoughtSpot Product Documentation](https://docs.thoughtspot.com/cloud/latest/groups-privileges). #### Supported operations The API endpoint lets you perform the following operations: * Assign privileges * Add users * Define sharing visibility * Add sub-groups * Assign a default Liveboard + * @param createUserGroupRequest + */ + createUserGroup(createUserGroupRequest, _options) { + const requestContextPromise = this.requestFactory.createUserGroup(createUserGroupRequest, _options); + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx) => middleware.pre(ctx))); + } + return middlewarePreObservable.pipe(mergeMap((ctx) => this.configuration.httpApi.send(ctx))).pipe(mergeMap((response) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp) => this.responseProcessor.createUserGroup(rsp))); + })); + } + /** + * Version: 9.0.0.cl or later Removes the specified group object from the ThoughtSpot system. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `GROUP_ADMINISTRATION` (**Can manage groups**) privilege is required. + * @param groupIdentifier GUID or name of the group. + */ + deleteUserGroup(groupIdentifier, _options) { + const requestContextPromise = this.requestFactory.deleteUserGroup(groupIdentifier, _options); + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx) => middleware.pre(ctx))); + } + return middlewarePreObservable.pipe(mergeMap((ctx) => this.configuration.httpApi.send(ctx))).pipe(mergeMap((response) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp) => this.responseProcessor.deleteUserGroup(rsp))); + })); + } + /** + * Version: 9.0.0.cl or later Imports group objects from external databases into ThoughtSpot. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `GROUP_ADMINISTRATION` (**Can manage groups**) privilege is required. During the import operation: * If the specified group is not available in ThoughtSpot, it will be added to ThoughtSpot. * If `delete_unspecified_groups` is set to `true`, the groups not specified in the API request, excluding administrator and system user groups, are deleted. * If the specified groups are already available in ThoughtSpot, the object properties of these groups are modified and synchronized as per the input data in the API request. A successful API call returns the object that represents the changes made in the ThoughtSpot system. + * @param importUserGroupsRequest + */ + importUserGroups(importUserGroupsRequest, _options) { + const requestContextPromise = this.requestFactory.importUserGroups(importUserGroupsRequest, _options); + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx) => middleware.pre(ctx))); + } + return middlewarePreObservable.pipe(mergeMap((ctx) => this.configuration.httpApi.send(ctx))).pipe(mergeMap((response) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp) => this.responseProcessor.importUserGroups(rsp))); + })); + } + /** + * Version: 9.0.0.cl or later Gets a list of user group objects from the ThoughtSpot system. To get details of a specific user group, specify the user group GUID or name. You can also filter the API response based on User ID, Org ID, Role ID, type of group, sharing visibility, privileges assigned to the group, and the Liveboard IDs assigned to the users in the group. Available to all users. Users with `ADMINISTRATION` (**Can administer ThoughtSpot**) privileges can view all users properties. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `GROUP_ADMINISTRATION` (**Can manage groups**) privilege is required. **NOTE**: If you do not get precise results, try setting `record_size` to `-1` and `record_offset` to `0`. + * @param searchUserGroupsRequest + */ + searchUserGroups(searchUserGroupsRequest, _options) { + const requestContextPromise = this.requestFactory.searchUserGroups(searchUserGroupsRequest, _options); + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx) => middleware.pre(ctx))); + } + return middlewarePreObservable.pipe(mergeMap((ctx) => this.configuration.httpApi.send(ctx))).pipe(mergeMap((response) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp) => this.responseProcessor.searchUserGroups(rsp))); + })); + } + /** + * Version: 9.0.0.cl or later Updates the properties of a group object in ThoughtSpot. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `GROUP_ADMINISTRATION` (**Can manage groups**) privilege is required. #### Supported operations This API endpoint lets you perform the following operations in a single API request: * Edit [privileges](https://developers.thoughtspot.com/docs/?pageid=api-user-management#group-privileges) * Add or remove users * Change sharing visibility settings * Add or remove sub-groups * Assign a default Liveboard or update the existing settings + * @param groupIdentifier GUID or name of the group. + * @param updateUserGroupRequest + */ + updateUserGroup(groupIdentifier, updateUserGroupRequest, _options) { + const requestContextPromise = this.requestFactory.updateUserGroup(groupIdentifier, updateUserGroupRequest, _options); + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx) => middleware.pre(ctx))); + } + return middlewarePreObservable.pipe(mergeMap((ctx) => this.configuration.httpApi.send(ctx))).pipe(mergeMap((response) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp) => this.responseProcessor.updateUserGroup(rsp))); + })); + } +}; +var ObservableJobsApi = class { + constructor(configuration, requestFactory, responseProcessor) { + this.configuration = configuration; + this.requestFactory = requestFactory || new JobsApiRequestFactory(configuration); + this.responseProcessor = responseProcessor || new JobsApiResponseProcessor(); + } + /** + * Version: 26.4.0.cl or later Searches delivery history for communication channels such as webhooks. Returns channel-level delivery status for each job execution record. Use this to monitor channel health and delivery success rates across events. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) or `DEVELOPER` (**Has developer privilege**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, users with `CAN_MANAGE_WEBHOOKS` (**Can manage webhooks**) privilege are also authorized to perform this action. **NOTE**: When `channel_type` is `WEBHOOK`, the following constraints apply: - `job_ids`, `channel_identifiers`, and `events` each accept at most one element. - When `job_ids` is provided, it is used as the sole lookup key and other filter fields are ignored. - When `job_ids` is not provided, `channel_identifiers` and `events` are both required, each containing exactly one element. - Records older than the configured retention period are not returned. - Use `start_epoch_time_in_millis` and/or `end_epoch_time_in_millis` to narrow results to a specific time window. + * @param searchChannelHistoryRequest + */ + searchChannelHistory(searchChannelHistoryRequest, _options) { + const requestContextPromise = this.requestFactory.searchChannelHistory(searchChannelHistoryRequest, _options); + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx) => middleware.pre(ctx))); + } + return middlewarePreObservable.pipe(mergeMap((ctx) => this.configuration.httpApi.send(ctx))).pipe(mergeMap((response) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp) => this.responseProcessor.searchChannelHistory(rsp))); + })); + } +}; +var ObservableLogApi = class { + constructor(configuration, requestFactory, responseProcessor) { + this.configuration = configuration; + this.requestFactory = requestFactory || new LogApiRequestFactory(configuration); + this.responseProcessor = responseProcessor || new LogApiResponseProcessor(); + } + /** + * Version: 9.0.0.cl or later Fetches security audit logs. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the [Admin Control](https://developers.thoughtspot.com/docs/rbac#_admin_control) privileges are required. #### Usage guidelines By default, the API retrieves logs for the last 24 hours. You can set a custom duration in EPOCH time. Make sure the log duration specified in your API request doesn’t exceed 24 hours. If you must fetch logs for a longer time range, modify the duration and make multiple sequential API requests. Upon successful execution, the API returns logs with the following information: * timestamp of the event * event ID * event type * name and GUID of the user * IP address of ThoughtSpot instance For more information see [Audit logs Documentation](https://developers.thoughtspot.com/docs/audit-logs). + * @param fetchLogsRequest + */ + fetchLogs(fetchLogsRequest, _options) { + const requestContextPromise = this.requestFactory.fetchLogs(fetchLogsRequest, _options); + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx) => middleware.pre(ctx))); + } + return middlewarePreObservable.pipe(mergeMap((ctx) => this.configuration.httpApi.send(ctx))).pipe(mergeMap((response) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp) => this.responseProcessor.fetchLogs(rsp))); + })); + } +}; +var ObservableMetadataApi = class { + constructor(configuration, requestFactory, responseProcessor) { + this.configuration = configuration; + this.requestFactory = requestFactory || new MetadataApiRequestFactory(configuration); + this.responseProcessor = responseProcessor || new MetadataApiResponseProcessor(); + } + /** + * Convert worksheets to models Version: 10.6.0.cl or later ## Prerequisites - **Privileges Required:** - `DATAMANAGEMENT` (Can manage data) or `ADMINISTRATION` (Can administer ThoughtSpot). - **Additional Privileges (if RBAC is enabled):** - `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` (Can manage data models). --- ## Usage Guidelines ### Parameters 1. **worksheet_ids** - **Description:** A comma-separated list of GUIDs (Globally Unique Identifiers) specifying the Worksheets to be converted. - **Usage:** - Used only when `convert_all` is set to `false`. - Leave empty or omit when `convert_all` is set to `true`. 2. **exclude_worksheet_ids** - **Description:** A comma-separated list of GUIDs specifying Worksheets to be excluded from conversion. - **Usage:** - Useful when `convert_all` is set to `true` and specific Worksheets should not be converted. 3. **convert_all** - **Description:** Sets the scope of conversion. - **Options:** - `true`: Converts all Worksheets in the system, except those specified in `exclude_worksheet_ids`. - `false`: Converts only the Worksheets listed in `worksheet_ids`. 4. **apply_changes** - **Description:** Specifies whether to apply changes directly to ThoughtSpot or to generate a preview before applying any changes.Used for validation of conversion. - **Options:** - `true`: Applies conversion changes directly to ThoughtSpot. - `false`: Generates only a preview of the changes and does not apply any changes to ThoughtSpot --- ## Best Practices 1. **Backup Before Conversion:** Always export metadata as a backup before initiating the conversion process 2. **Partial Conversion for Testing:** Test the conversion process by setting `convert_all` to `false` and specifying a small number of `worksheet_ids`. 3. **Verify Dependencies:** Check for dependent objects, such as Tables and Connections, to avoid invalid references. 4. **Review Changes:** Use `apply_changes: false` to preview the impact of the conversion before applying changes. --- ## Examples ### Convert Specific Worksheets ```json { \"worksheet_ids\": [\"guid1\", \"guid2\", \"guid3\"], \"exclude_worksheet_ids\": [], \"convert_all\": false, \"apply_changes\": true } ``` ### Convert All Accessible Worksheets ```json { \"worksheet_ids\": [], \"exclude_worksheet_ids\": [], \"convert_all\": true, \"apply_changes\": true } ``` ### Exclude Specific Worksheets While Converting All Accessible Worksheets ```json { \"worksheet_ids\": [], \"exclude_worksheet_ids\": [\"abc\"], \"convert_all\": true, \"apply_changes\": true } ``` + * @param convertWorksheetToModelRequest + */ + convertWorksheetToModel(convertWorksheetToModelRequest, _options) { + const requestContextPromise = this.requestFactory.convertWorksheetToModel(convertWorksheetToModelRequest, _options); + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx) => middleware.pre(ctx))); + } + return middlewarePreObservable.pipe(mergeMap((ctx) => this.configuration.httpApi.send(ctx))).pipe(mergeMap((response) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp) => this.responseProcessor.convertWorksheetToModel(rsp))); + })); + } + /** + * Makes a copy of an Answer or Liveboard Version: 10.3.0.cl or later Creates a copy of a metadata object. Requires at least view access to the metadata object being copied. Upon successful execution, the API creates a copy of the metadata object specified in the API request and returns the ID of the new object. + * @param copyObjectRequest + */ + copyObject(copyObjectRequest, _options) { + const requestContextPromise = this.requestFactory.copyObject(copyObjectRequest, _options); + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx) => middleware.pre(ctx))); + } + return middlewarePreObservable.pipe(mergeMap((ctx) => this.configuration.httpApi.send(ctx))).pipe(mergeMap((response) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp) => this.responseProcessor.copyObject(rsp))); + })); + } + /** + * Version: 9.0.0.cl or later Removes the specified metadata object from the ThoughtSpot system. Requires edit access to the metadata object. + * @param deleteMetadataRequest + */ + deleteMetadata(deleteMetadataRequest, _options) { + const requestContextPromise = this.requestFactory.deleteMetadata(deleteMetadataRequest, _options); + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx) => middleware.pre(ctx))); + } + return middlewarePreObservable.pipe(mergeMap((ctx) => this.configuration.httpApi.send(ctx))).pipe(mergeMap((response) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp) => this.responseProcessor.deleteMetadata(rsp))); + })); + } + /** + * Version: 9.0.0.cl or later Exports the [TML](https://docs.thoughtspot.com/cloud/latest/tml) representation of metadata objects in JSON or YAML format. Requires `DATADOWNLOADING` (**Can download Data**) and at least view access to the metadata object. #### Usage guidelines * You can export one or several objects by passing metadata object GUIDs in the `metadata` array. * When exporting TML content for a Liveboard or Answer object, you can set `export_associated` to `true` to retrieve TML content for underlying Worksheets, Tables, or Views, including the GUID of each object within the headers. When `export_associated` is set to `true`, consider retrieving one metadata object at a time. * Set `export_fqns` to `true` to add FQNs of the referenced objects in the TML content. For example, if you send an API request to retrieve TML for a Liveboard and its associated objects, the API returns the TML content with FQNs of the referenced Worksheet. Exporting TML with FQNs is useful if ThoughtSpot has multiple objects with the same name and you want to eliminate ambiguity when importing TML files into ThoughtSpot. It eliminates the need for adding FQNs of the referenced objects manually during the import operation. * To export only the TML of feedbacks associated with an object, set the GUID of the object as `identifier`, and set the `type` as `FEEDBACK` in the `metadata` array. * To export the TML of an object along with the feedbacks associated with it, set the GUID of the object as `identifier`, set the `type` as `LOGIAL_TABLE` in the `metadata` array, and set `export_with_associated_feedbacks` in `export_options` to true. For more information, see [TML Documentation](https://developers.thoughtspot.com/docs/tml#_export_a_tml). For more information on feedbacks, see [Feedback Documentation](https://docs.thoughtspot.com/cloud/latest/sage-feedback). + * @param exportMetadataTMLRequest + */ + exportMetadataTML(exportMetadataTMLRequest, _options) { + const requestContextPromise = this.requestFactory.exportMetadataTML(exportMetadataTMLRequest, _options); + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx) => middleware.pre(ctx))); + } + return middlewarePreObservable.pipe(mergeMap((ctx) => this.configuration.httpApi.send(ctx))).pipe(mergeMap((response) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp) => this.responseProcessor.exportMetadataTML(rsp))); + })); + } + /** + * Version: 10.1.0.cl or later Exports the [TML](https://docs.thoughtspot.com/cloud/latest/tml) representation of metadata objects in JSON or YAML format. ### **Permissions Required** Requires `DATAMANAGEMENT` (**Can manage data**) and `USERMANAGEMENT` (**Can manage users**) privileges. #### **Usage Guidelines** This API is only applicable for `USER`, `GROUP`, and `ROLES` metadata types. - `batch_offset` Indicates the starting position within the complete dataset from which the API should begin returning objects. Useful for paginating results efficiently. - `batch_size` Specifies the number of objects or items to retrieve in a single request. Helps control response size for better performance. - `edoc_format` Defines the format of the TML content. The exported metadata can be in JSON or YAML format. - `export_dependent` Specifies whether to include dependent metadata objects in the export. Ensures related objects are also retrieved if needed. - `all_orgs_override` Indicates whether the export operation applies across all organizations. Useful for multi-tenant environments where cross-org exports are required. + * @param exportMetadataTMLBatchedRequest + */ + exportMetadataTMLBatched(exportMetadataTMLBatchedRequest, _options) { + const requestContextPromise = this.requestFactory.exportMetadataTMLBatched(exportMetadataTMLBatchedRequest, _options); + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx) => middleware.pre(ctx))); + } + return middlewarePreObservable.pipe(mergeMap((ctx) => this.configuration.httpApi.send(ctx))).pipe(mergeMap((response) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp) => this.responseProcessor.exportMetadataTMLBatched(rsp))); + })); + } + /** + * Version: 9.0.0.cl or later Fetches the underlying SQL query data for an Answer object. Requires at least view access to the Answer object. Upon successful execution, the API returns the SQL queries for the specified object as shown in this example: ``` { \"metadata_id\":\"8fbe44a8-46ad-4b16-8d39-184b2fada490\", \"metadata_name\":\"Total sales\", \"metadata_type\":\"ANSWER\", \"sql_queries\":[ { \"metadata_id\":\"8fbe44a8-46ad-4b16-8d39-184b2fada490\", \"metadata_name\":\"Total sales -test\", \"sql_query\":\"SELECT \\n \\\"ta_1\\\".\\\"REGION\\\" \\\"ca_1\\\", \\n \\\"ta_2\\\".\\\"PRODUCTNAME\\\" \\\"ca_2\\\", \\n \\\"ta_1\\\".\\\"STORENAME\\\" \\\"ca_3\\\", \\n CASE\\n WHEN sum(\\\"ta_3\\\".\\\"SALES\\\") IS NOT NULL THEN sum(\\\"ta_3\\\".\\\"SALES\\\")\\n ELSE 0\\n END \\\"ca_4\\\", \\n CASE\\n WHEN sum(\\\"ta_3\\\".\\\"QUANTITYPURCHASED\\\") IS NOT NULL THEN sum(\\\"ta_3\\\".\\\"QUANTITYPURCHASED\\\")\\n ELSE 0\\n END \\\"ca_5\\\"\\nFROM \\\"RETAILAPPAREL\\\".\\\"PUBLIC\\\".\\\"FACT_RETAPP_SALES\\\" \\\"ta_3\\\"\\n JOIN \\\"RETAILAPPAREL\\\".\\\"PUBLIC\\\".\\\"DIM_RETAPP_STORES\\\" \\\"ta_1\\\"\\n ON \\\"ta_3\\\".\\\"STOREID\\\" = \\\"ta_1\\\".\\\"STOREID\\\"\\n JOIN \\\"RETAILAPPAREL\\\".\\\"PUBLIC\\\".\\\"DIM_RETAPP_PRODUCTS\\\" \\\"ta_2\\\"\\n ON \\\"ta_3\\\".\\\"PRODUCTID\\\" = \\\"ta_2\\\".\\\"PRODUCTID\\\"\\nGROUP BY \\n \\\"ca_1\\\", \\n \\\"ca_2\\\", \\n \\\"ca_3\\\"\\n\" } ] } ``` + * @param fetchAnswerSqlQueryRequest + */ + fetchAnswerSqlQuery(fetchAnswerSqlQueryRequest, _options) { + const requestContextPromise = this.requestFactory.fetchAnswerSqlQuery(fetchAnswerSqlQueryRequest, _options); + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx) => middleware.pre(ctx))); + } + return middlewarePreObservable.pipe(mergeMap((ctx) => this.configuration.httpApi.send(ctx))).pipe(mergeMap((response) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp) => this.responseProcessor.fetchAnswerSqlQuery(rsp))); + })); + } + /** + * Version: 10.4.0.cl or later Gets information about the status of the TML async import task scheduled using the `/api/rest/2.0/metadata/tml/async/import` API call. To fetch the task details, specify the ID of the TML async import task. Requires access to the task ID. The API allows users who initiated the asynchronous TML import via `/api/rest/2.0/metadata/tml/async/import` to view the status of their tasks. Users with administration privilege can view the status of all import tasks initiated by the users in their Org. #### Usage guidelines See [TML API Documentation](https://developers.thoughtspot.com/docs/tml#_fetch_status_of_the_tml_import_task) for usage guidelines. + * @param fetchAsyncImportTaskStatusRequest + */ + fetchAsyncImportTaskStatus(fetchAsyncImportTaskStatusRequest, _options) { + const requestContextPromise = this.requestFactory.fetchAsyncImportTaskStatus(fetchAsyncImportTaskStatusRequest, _options); + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx) => middleware.pre(ctx))); + } + return middlewarePreObservable.pipe(mergeMap((ctx) => this.configuration.httpApi.send(ctx))).pipe(mergeMap((response) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp) => this.responseProcessor.fetchAsyncImportTaskStatus(rsp))); + })); + } + /** + * Version: 9.0.0.cl or later Fetches the underlying SQL query data for a Liveboard object and its visualizations. Requires at least view access to the Liveboard object. To get SQL query data for a Liveboard, specify the GUID of the Liveboard. Optionally, you can add an array of visualization GUIDs to retrieve the SQL query data for visualizations in the Liveboard. Upon successful execution, the API returns the SQL queries for the specified object as shown in this example: ``` { \"metadata_id\": \"fa68ae91-7588-4136-bacd-d71fb12dda69\", \"metadata_name\": \"Total Sales\", \"metadata_type\": \"LIVEBOARD\", \"sql_queries\": [ { \"metadata_id\": \"b3b6d2b9-089a-490c-8e16-b144650b7843\", \"metadata_name\": \"Total quantity purchased, Total sales by region\", \"sql_query\": \"SELECT \\n \\\"ta_1\\\".\\\"REGION\\\" \\\"ca_1\\\", \\n CASE\\n WHEN sum(\\\"ta_2\\\".\\\"QUANTITYPURCHASED\\\") IS NOT NULL THEN sum(\\\"ta_2\\\".\\\"QUANTITYPURCHASED\\\")\\n ELSE 0\\n END \\\"ca_2\\\", \\n CASE\\n WHEN sum(\\\"ta_2\\\".\\\"SALES\\\") IS NOT NULL THEN sum(\\\"ta_2\\\".\\\"SALES\\\")\\n ELSE 0\\n END \\\"ca_3\\\"\\nFROM \\\"RETAILAPPAREL\\\".\\\"PUBLIC\\\".\\\"FACT_RETAPP_SALES\\\" \\\"ta_2\\\"\\n JOIN \\\"RETAILAPPAREL\\\".\\\"PUBLIC\\\".\\\"DIM_RETAPP_STORES\\\" \\\"ta_1\\\"\\n ON \\\"ta_2\\\".\\\"STOREID\\\" = \\\"ta_1\\\".\\\"STOREID\\\"\\nGROUP BY \\\"ca_1\\\"\" } ] } ``` + * @param fetchLiveboardSqlQueryRequest + */ + fetchLiveboardSqlQuery(fetchLiveboardSqlQueryRequest, _options) { + const requestContextPromise = this.requestFactory.fetchLiveboardSqlQuery(fetchLiveboardSqlQueryRequest, _options); + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx) => middleware.pre(ctx))); + } + return middlewarePreObservable.pipe(mergeMap((ctx) => this.configuration.httpApi.send(ctx))).pipe(mergeMap((response) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp) => this.responseProcessor.fetchLiveboardSqlQuery(rsp))); + })); + } + /** + * Version: 9.0.0.cl or later Imports [TML](https://docs.thoughtspot.com/cloud/latest/tml) files into ThoughtSpot. Requires `DATAMANAGEMENT` (**Can manage data**) or `ADMINISTRATION` (**Can administer ThoughtsSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the following Data control privileges may be required: - `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) - `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` (**Can manage data models**) #### Usage guidelines * Import all related objects in a single TML Import API call. For example, Tables that use the same Connection object and Worksheets connected to these Tables. * Include the `fqn` property to distinguish objects that have the same name. For example, if you have multiple Connections or Worksheets with the same name on ThoughtSpot and the Connection or Worksheet referenced in your TML file does not have a unique name to distinguish, it may result in invalid object references. Adding `fqn` helps ThoughtSpot differentiate a Table from another with the same name. We recommend [exporting TML with FQNs](#/http/api-endpoints/metadata/export-metadata-tml) and using these during the import operation. * You can upload multiple TML files at a time. If you import a Worksheet along with Liveboards, Answers, and other dependent objects in a single API call, the imported objects will be immediately available for use. When you import only a Worksheet object, it may take some time for the Worksheet to become available in the ThoughtSpot system. Please wait for a few minutes, and then proceed to create an Answer and Liveboard from the newly imported Worksheet. For more information, see [TML Documentation](https://developers.thoughtspot.com/docs/tml#_import_a_tml). + * @param importMetadataTMLRequest + */ + importMetadataTML(importMetadataTMLRequest, _options) { + const requestContextPromise = this.requestFactory.importMetadataTML(importMetadataTMLRequest, _options); + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx) => middleware.pre(ctx))); + } + return middlewarePreObservable.pipe(mergeMap((ctx) => this.configuration.httpApi.send(ctx))).pipe(mergeMap((response) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp) => this.responseProcessor.importMetadataTML(rsp))); + })); + } + /** + * Version: 10.4.0.cl or later Schedules a task to import [TML](https://docs.thoughtspot.com/cloud/latest/tml) files into ThoughtSpot. You can use this API endpoint to process TML objects asynchronously when importing TMLs of large and complex metadata objects into ThoughtSpot. Unlike the synchronous import TML operation, the API processes TML data in the background and returns a task ID, which can be used to check the status of the import task via `/api/rest/2.0/metadata/tml/async/status` API endpoint. Requires `DATAMANAGEMENT` (**Can manage data**) or `ADMINISTRATION` (**Can administer ThoughtsSpot**) privilege, and edit access to the TML objects. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the following Data control privileges may be required: - `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) - `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` (**Can manage data models**) #### Usage guidelines See [Async TML API Documentation](https://developers.thoughtspot.com/docs/tml#_import_tml_objects_asynchronously) for usage guidelines. + * @param importMetadataTMLAsyncRequest + */ + importMetadataTMLAsync(importMetadataTMLAsyncRequest, _options) { + const requestContextPromise = this.requestFactory.importMetadataTMLAsync(importMetadataTMLAsyncRequest, _options); + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx) => middleware.pre(ctx))); + } + return middlewarePreObservable.pipe(mergeMap((ctx) => this.configuration.httpApi.send(ctx))).pipe(mergeMap((response) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp) => this.responseProcessor.importMetadataTMLAsync(rsp))); + })); + } + /** + * Parameterize fields in metadata objects. Version: 10.9.0.cl or later **Note:** This API endpoint is deprecated and will be removed from ThoughtSpot in a future release. Use [POST /api/rest/2.0/metadata/parameterize-fields](/api/rest/2.0/metadata/parameterize-fields) instead. Allows parameterizing fields in metadata objects in ThoughtSpot. Requires appropriate permissions to modify the metadata object. The API endpoint allows parameterizing the following types of metadata objects: * Logical Tables * Connections * Connection Configs For a Logical Table the field type must be `ATTRIBUTE` and field name can be one of: * databaseName * schemaName * tableName For a Connection or Connection Config, the field type is always `CONNECTION_PROPERTY`. In this case, field_name specifies the exact property of the Connection or Connection Config that needs to be parameterized. For Connection Config, the only supported field name is: * impersonate_user + * @param parameterizeMetadataRequest + */ + parameterizeMetadata(parameterizeMetadataRequest, _options) { + const requestContextPromise = this.requestFactory.parameterizeMetadata(parameterizeMetadataRequest, _options); + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx) => middleware.pre(ctx))); + } + return middlewarePreObservable.pipe(mergeMap((ctx) => this.configuration.httpApi.send(ctx))).pipe(mergeMap((response) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp) => this.responseProcessor.parameterizeMetadata(rsp))); + })); + } + /** + * Parameterize multiple fields of metadata objects. For example [schemaName, databaseName] for LOGICAL_TABLE. Version: 26.5.0.cl or later Allows parameterizing multiple fields of metadata objects in ThoughtSpot. For example, you can parameterize [schemaName, databaseName] for LOGICAL_TABLE. Requires appropriate permissions to modify the metadata object. The API endpoint allows parameterizing the following types of metadata objects: * Logical Tables * Connections * Connection Configs For a Logical Table, the field type must be `ATTRIBUTE` and field names can include: * databaseName * schemaName * tableName For a Connection or Connection Config, the field type is always `CONNECTION_PROPERTY`. In this case, field_names specifies the exact properties of the Connection or Connection Config that need to be parameterized. For Connection Config, supported field names include: * impersonate_user You can parameterize multiple fields at once by providing an array of field names. + * @param parameterizeMetadataFieldsRequest + */ + parameterizeMetadataFields(parameterizeMetadataFieldsRequest, _options) { + const requestContextPromise = this.requestFactory.parameterizeMetadataFields(parameterizeMetadataFieldsRequest, _options); + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx) => middleware.pre(ctx))); + } + return middlewarePreObservable.pipe(mergeMap((ctx) => this.configuration.httpApi.send(ctx))).pipe(mergeMap((response) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp) => this.responseProcessor.parameterizeMetadataFields(rsp))); + })); + } + /** + * Version: 9.0.0.cl or later Gets a list of metadata objects available on the ThoughtSpot system. This API endpoint is available to all users who have view access to the object. Users with `ADMINISTRATION` (**Can administer ThoughtSpot**) privileges can view data for all metadata objects, including users and groups. #### Usage guidelines - To get all metadata objects, send the API request without any attributes. - To get metadata objects of a specific type, set the `type` attribute. For example, to fetch a Worksheet, set the type as `LOGICAL_TABLE`. - To filter metadata objects within type `LOGICAL_TABLE`, set the `subtypes` attribute. For example, to fetch a Worksheet, set the type as `LOGICAL_TABLE` & subtypes as `[WORKSHEET]`. - To get a specific metadata object, specify the GUID. - To customize your search and filter the API response, you can use several parameters. You can search for objects created or modified by specific users, by tags applied to the objects, or by using the include parameters like `include_auto_created_objects`, `include_dependent_objects`, `include_headers`, `include_incomplete_objects`, and so on. You can also define sorting options to sort the data retrieved in the API response. - To get discoverable objects when linientmodel is enabled you can use `include_discoverable_objects` as true else false. Default value is true. - For liveboard metadata type, to get the newer format, set the `liveboard_response_format` as V2. Default value is V1. - To retrieve only objects that are published, set the `include_only_published_objects` as true. Default value is false. **NOTE**: The following parameters support pagination of metadata records: - `tag_identifiers` - `type` - `subtypes` - `created_by_user_identifiers` - `modified_by_user_identifiers` - `owned_by_user_identifiers` - `exclude_objects` - `include_auto_created_objects` - `favorite_object_options` - `include_only_published_objects` If you are using other parameters to search metadata, set `record_size` to `-1` and `record_offset` to `0`. + * @param searchMetadataRequest + */ + searchMetadata(searchMetadataRequest, _options) { + const requestContextPromise = this.requestFactory.searchMetadata(searchMetadataRequest, _options); + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx) => middleware.pre(ctx))); + } + return middlewarePreObservable.pipe(mergeMap((ctx) => this.configuration.httpApi.send(ctx))).pipe(mergeMap((response) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp) => this.responseProcessor.searchMetadata(rsp))); + })); + } + /** + * Remove parameterization from fields in metadata objects. Version: 26.5.0.cl or later Allows removing parameterization from fields in metadata objects in ThoughtSpot. Requires appropriate permissions to modify the metadata object. The API endpoint allows unparameterizing the following types of metadata objects: * Logical Tables * Connections * Connection Configs For a Logical Table the field type must be `ATTRIBUTE` and field name can be one of: * databaseName * schemaName * tableName For a Connection or Connection Config, the field type is always `CONNECTION_PROPERTY`. In this case, field_name specifies the exact property of the Connection or Connection Config that needs to be unparameterized. For Connection Config, the only supported field name is: * impersonate_user + * @param unparameterizeMetadataRequest + */ + unparameterizeMetadata(unparameterizeMetadataRequest, _options) { + const requestContextPromise = this.requestFactory.unparameterizeMetadata(unparameterizeMetadataRequest, _options); + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx) => middleware.pre(ctx))); + } + return middlewarePreObservable.pipe(mergeMap((ctx) => this.configuration.httpApi.send(ctx))).pipe(mergeMap((response) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp) => this.responseProcessor.unparameterizeMetadata(rsp))); + })); + } + /** + * Update header attributes for a given list of header objects. Version: 10.6.0.cl or later ## Prerequisites - **Privileges Required:** - `DATAMANAGEMENT` (Can manage data) or `ADMINISTRATION` (Can administer ThoughtSpot). - **Additional Privileges (if RBAC is enabled):** - `ORG_ADMINISTRATION` (Can manage orgs). --- ## Usage Guidelines ### Parameters 1. **headers_update** - **Description:** List of header objects with their attributes to be updated. Each object contains a list of attributes to be updated in the header. - **Usage:** - You must provide either `identifier` or `obj_identifier`, but not both. Both fields cannot be empty. - When `org_identifier` is set to `-1`, only the `identifier` value is accepted; `obj_identifier` is not allowed. 2. **org_identifier** - **Description:** GUID (Globally Unique Identifier) or name of the organization. - **Usage:** - Leaving this field empty assumes that the changes should be applied to the current organization - Provide `org_guid` or `org_name` to uniquely identify the organization where changes need to be applied. . - Provide `-1` if changes have to be applied across all the org. --- ## Note Currently, this API is enabled only for updating the `obj_identifier` attribute. Only `text` will be allowed in attribute\'s value. ## Best Practices 1. **Backup Before Conversion:** Always export metadata as a backup before initiating the update process --- ## Examples ### Only `identifier` is given ```json { \"headers_update\": [ { \"identifier\": \"guid_1\", \"obj_identifier\": \"\", \"type\": \"LOGICAL_COLUMN\", \"attributes\": [ { \"name\": \"obj_id\", \"value\": \"custom_object_id\" } ] } ], \"org_identifier\": \"orgGuid\" } ``` ### Only `obj_identifier` is given ```json { \"headers_update\": [ { \"obj_identifier\": \"custom_object_id\", \"type\": \"ANSWER\", \"attributes\": [ { \"name\": \"obj_id\", \"value\": \"custom_object_id\" } ] } ], \"org_identifier\": \"orgName\" } ``` ### Executing update for all org `-1` ```json { \"headers_update\": [ { \"identifier\": \"guid_1\", \"type\": \"ANSWER\", \"attributes\": [ { \"name\": \"obj_id\", \"value\": \"custom_object_id\" } ] } ], \"org_identifier\": -1 } ``` ### Optional `type` is not provided ```json { \"headers_update\": [ { \"identifier\": \"guid_1\", \"attributes\": [ { \"name\": \"obj_id\", \"value\": \"custom_object_id\" } ] } ], \"org_identifier\": -1 } ``` + * @param updateMetadataHeaderRequest + */ + updateMetadataHeader(updateMetadataHeaderRequest, _options) { + const requestContextPromise = this.requestFactory.updateMetadataHeader(updateMetadataHeaderRequest, _options); + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx) => middleware.pre(ctx))); + } + return middlewarePreObservable.pipe(mergeMap((ctx) => this.configuration.httpApi.send(ctx))).pipe(mergeMap((response) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp) => this.responseProcessor.updateMetadataHeader(rsp))); + })); + } + /** + * Update object IDs for given metadata objects. Version: 10.8.0.cl or later ## Prerequisites - **Privileges Required:** - `DATAMANAGEMENT` (Can manage data) or `ADMINISTRATION` (Can administer ThoughtSpot). - **Additional Privileges (if RBAC is enabled):** - `ORG_ADMINISTRATION` (Can manage orgs). --- ## Usage Guidelines ### Parameters 1. **metadata** - **Description:** List of metadata objects to update their object IDs. - **Usage:** - Use either `current_obj_id` alone OR use `metadata_identifier` with `type` (when needed). - When using `metadata_identifier`, the `type` field is required if using a name instead of a GUID. - The `new_obj_id` field is always required. --- ## Note This API is specifically designed for updating object IDs of metadata objects. It internally uses the header update mechanism to perform the changes. ## Best Practices 1. **Backup Before Update:** Always export metadata as a backup before initiating the update process. 2. **Validation:** - When using `current_obj_id`, ensure it matches the existing object ID exactly. - When using `metadata_identifier` with a name, ensure the `type` is specified correctly. - Verify that the `new_obj_id` follows your naming conventions and is unique within your system. --- ## Examples ### Using current_obj_id ```json { \"metadata\": [ { \"current_obj_id\": \"existing_object_id\", \"new_obj_id\": \"new_object_id\" } ] } ``` ### Using metadata_identifier with GUID ```json { \"metadata\": [ { \"metadata_identifier\": \"01234567-89ab-cdef-0123-456789abcdef\", \"new_obj_id\": \"new_object_id\" } ] } ``` ### Using metadata_identifier with name and type ```json { \"metadata\": [ { \"metadata_identifier\": \"My Answer\", \"type\": \"ANSWER\", \"new_obj_id\": \"new_object_id\" } ] } ``` ### Multiple objects update ```json { \"metadata\": [ { \"current_obj_id\": \"existing_object_id_1\", \"new_obj_id\": \"new_object_id_1\" }, { \"metadata_identifier\": \"My Worksheet\", \"type\": \"LOGICAL_TABLE\", \"new_obj_id\": \"new_object_id_2\" } ] } ``` + * @param updateMetadataObjIdRequest + */ + updateMetadataObjId(updateMetadataObjIdRequest, _options) { + const requestContextPromise = this.requestFactory.updateMetadataObjId(updateMetadataObjIdRequest, _options); + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx) => middleware.pre(ctx))); + } + return middlewarePreObservable.pipe(mergeMap((ctx) => this.configuration.httpApi.send(ctx))).pipe(mergeMap((response) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp) => this.responseProcessor.updateMetadataObjId(rsp))); + })); + } +}; +var ObservableOrgsApi = class { + constructor(configuration, requestFactory, responseProcessor) { + this.configuration = configuration; + this.requestFactory = requestFactory || new OrgsApiRequestFactory(configuration); + this.responseProcessor = responseProcessor || new OrgsApiResponseProcessor(); + } + /** + * Version: 9.0.0.cl or later Creates an Org object. To use this API, the [Orgs](https://docs.thoughtspot.com/cloud/latest/orgs-overview) feature must be enabled in your cluster. Requires cluster administration (**Can administer Org**) privileges. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `ORG_ADMINISTRATION` (**Can manage Orgs**) privilege is required. + * @param createOrgRequest + */ + createOrg(createOrgRequest, _options) { + const requestContextPromise = this.requestFactory.createOrg(createOrgRequest, _options); + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx) => middleware.pre(ctx))); + } + return middlewarePreObservable.pipe(mergeMap((ctx) => this.configuration.httpApi.send(ctx))).pipe(mergeMap((response) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp) => this.responseProcessor.createOrg(rsp))); + })); + } + /** + * Version: 9.0.0.cl or later Deletes an Org object from the ThoughtSpot system. Requires cluster administration (**Can administer Org**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `ORG_ADMINISTRATION` (**Can manage Orgs**) privilege is required. When you delete an Org, all its users and objects created in that Org context are removed. However, if the users in the deleted Org also exists in other Orgs, they are removed only from the deleted Org. + * @param orgIdentifier ID or name of the Org + */ + deleteOrg(orgIdentifier, _options) { + const requestContextPromise = this.requestFactory.deleteOrg(orgIdentifier, _options); + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx) => middleware.pre(ctx))); + } + return middlewarePreObservable.pipe(mergeMap((ctx) => this.configuration.httpApi.send(ctx))).pipe(mergeMap((response) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp) => this.responseProcessor.deleteOrg(rsp))); + })); + } + /** + * Version: 9.0.0.cl or later Gets a list of Orgs configured on the ThoughtSpot system. To get details of a specific Org, specify the Org ID or name. You can also pass parameters such as status, visibility, and user identifiers to get a specific list of Orgs. Requires cluster administration (**Can administer Org**) privileges. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `ORG_ADMINISTRATION` (**Can manage Orgs**) privilege is required. + * @param searchOrgsRequest + */ + searchOrgs(searchOrgsRequest, _options) { + const requestContextPromise = this.requestFactory.searchOrgs(searchOrgsRequest, _options); + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx) => middleware.pre(ctx))); + } + return middlewarePreObservable.pipe(mergeMap((ctx) => this.configuration.httpApi.send(ctx))).pipe(mergeMap((response) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp) => this.responseProcessor.searchOrgs(rsp))); + })); + } + /** + * Version: 9.0.0.cl or later Updates an Org object. You can modify Org properties such as name, description, and user associations. Requires cluster administration (**Can administer Org**) privileges. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `ORG_ADMINISTRATION` (**Can manage Orgs**) privilege is required. + * @param orgIdentifier ID or name of the Org + * @param updateOrgRequest + */ + updateOrg(orgIdentifier, updateOrgRequest, _options) { + const requestContextPromise = this.requestFactory.updateOrg(orgIdentifier, updateOrgRequest, _options); + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx) => middleware.pre(ctx))); + } + return middlewarePreObservable.pipe(mergeMap((ctx) => this.configuration.httpApi.send(ctx))).pipe(mergeMap((response) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp) => this.responseProcessor.updateOrg(rsp))); + })); + } +}; +var ObservableReportsApi = class { + constructor(configuration, requestFactory, responseProcessor) { + this.configuration = configuration; + this.requestFactory = requestFactory || new ReportsApiRequestFactory(configuration); + this.responseProcessor = responseProcessor || new ReportsApiResponseProcessor(); + } + /** + * Version: 9.0.0.cl or later Exports an Answer in the given file format. You can download the Answer data as a PDF, PNG, CSV, or XLSX file. Requires at least view access to the Answer. #### Usage guidelines In the request body, specify the GUID or name of the Answer and set `file_format`. The default file format is CSV. Use the `type` parameter to specify whether the Answer being exported is a saved Answer (`SAVED`) or a pinned Answer on a Liveboard (`PINNED`). Defaults to `SAVED`. When using `PINNED`, the `metadata_identifier` must be the container id. **NOTE**: * The downloadable file returned in API response file is extensionless. Please rename the downloaded file by typing in the relevant extension. * HTML rendering is not supported for PDF exports of Answers with tables. Optionally, you can define [runtime overrides](https://developers.thoughtspot.com/docs/fetch-data-and-report-apis#_runtime_overrides) to apply to the Answer data. + * @param exportAnswerReportRequest + */ + exportAnswerReport(exportAnswerReportRequest, _options) { + const requestContextPromise = this.requestFactory.exportAnswerReport(exportAnswerReportRequest, _options); + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx) => middleware.pre(ctx))); + } + return middlewarePreObservable.pipe(mergeMap((ctx) => this.configuration.httpApi.send(ctx))).pipe(mergeMap((response) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp) => this.responseProcessor.exportAnswerReport(rsp))); + })); + } + /** + * Version: 9.0.0.cl or later Exports a Liveboard and its visualizations in PDF, PNG, CSV, or XLSX file format. The default `file_format` is CSV. Requires at least view access to the Liveboard. #### Usage guidelines In the request body, specify the GUID or name of the Liveboard. To generate a Liveboard report with specific visualizations, add GUIDs or names of the visualizations. **NOTE**: * The downloadable file returned in API response file is extensionless. Please rename the downloaded file by typing in the relevant extension. * Optionally, you can define [runtime overrides](https://developers.thoughtspot.com/docs/fetch-data-and-report-apis#_runtime_overrides) to apply to the Answer data. * To include unsaved changes in the report, pass the `transient_pinboard_content` script generated from the `getExportRequestForCurrentPinboard` method in the Visual Embed SDK. Upon successful execution, the API returns the report with unsaved changes, including ad hoc changes to visualizations. For more information, see [Liveboard Report API](https://developers.thoughtspot.com/docs/fetch-data-and-report-apis#_liveboard_report_api). * Starting with ThoughtSpot Cloud 10.9.0.cl release, the Liveboard can be exported in the PNG format in the resolution of your choice. To enable this on your instance, contact ThoughtSpot support. When this feature is enabled, the options `include_cover_page`,`include_filter_page` within the `png_options` will not be available for PNG exports. * Starting with the ThoughtSpot Cloud 26.2.0.cl release, * Liveboards can be exported in CSV format. * All visualizations within a Liveboard can be exported as individual CSV files. * When exporting multiple visualizations or the entire Liveboard, the system returns the report as a compressed ZIP file containing the separate CSV files for each visualization. * Liveboards can also be exported in XLSX format. * All selected visualizations are consolidated into a single Excel workbook (.xlsx), with each visualization placed in its own worksheet (tab). * XLSX exports are limited to a maximum of 255 worksheets (tabs) per workbook. + * @param exportLiveboardReportRequest + */ + exportLiveboardReport(exportLiveboardReportRequest, _options) { + const requestContextPromise = this.requestFactory.exportLiveboardReport(exportLiveboardReportRequest, _options); + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx) => middleware.pre(ctx))); + } + return middlewarePreObservable.pipe(mergeMap((ctx) => this.configuration.httpApi.send(ctx))).pipe(mergeMap((response) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp) => this.responseProcessor.exportLiveboardReport(rsp))); + })); + } +}; +var ObservableRolesApi = class { + constructor(configuration, requestFactory, responseProcessor) { + this.configuration = configuration; + this.requestFactory = requestFactory || new RolesApiRequestFactory(configuration); + this.responseProcessor = responseProcessor || new RolesApiResponseProcessor(); + } + /** + * Version: 9.5.0.cl or later Creates a Role object in ThoughtSpot. Available only if [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance. To create a Role, the `ROLE_ADMINISTRATION` (**Can manage roles**) privilege is required. + * @param createRoleRequest + */ + createRole(createRoleRequest, _options) { + const requestContextPromise = this.requestFactory.createRole(createRoleRequest, _options); + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx) => middleware.pre(ctx))); + } + return middlewarePreObservable.pipe(mergeMap((ctx) => this.configuration.httpApi.send(ctx))).pipe(mergeMap((response) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp) => this.responseProcessor.createRole(rsp))); + })); + } + /** + * Version: 9.5.0.cl or later Deletes a Role object from the ThoughtSpot system. Available only if [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance. To delete a Role, the `ROLE_ADMINISTRATION` (**Can manage roles**) privilege is required. + * @param roleIdentifier Unique ID or name of the Role. ReadOnly roles cannot be deleted. + */ + deleteRole(roleIdentifier, _options) { + const requestContextPromise = this.requestFactory.deleteRole(roleIdentifier, _options); + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx) => middleware.pre(ctx))); + } + return middlewarePreObservable.pipe(mergeMap((ctx) => this.configuration.httpApi.send(ctx))).pipe(mergeMap((response) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp) => this.responseProcessor.deleteRole(rsp))); + })); + } + /** + * Version: 9.5.0.cl or later Gets a list of Role objects from the ThoughtSpot system. Available if [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance. To search for Roles, the `ROLE_ADMINISTRATION` (**Can manage roles**) privilege is required. To get details of a specific Role object, specify the GUID or name. You can also filter the API response based on user group and Org identifiers, privileges assigned to the Role, and deprecation status. + * @param searchRolesRequest + */ + searchRoles(searchRolesRequest, _options) { + const requestContextPromise = this.requestFactory.searchRoles(searchRolesRequest, _options); + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx) => middleware.pre(ctx))); + } + return middlewarePreObservable.pipe(mergeMap((ctx) => this.configuration.httpApi.send(ctx))).pipe(mergeMap((response) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp) => this.responseProcessor.searchRoles(rsp))); + })); + } + /** + * Version: 9.5.0.cl or later Updates the properties of a Role object. Available only if [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance. To update a Role, the `ROLE_ADMINISTRATION` (**Can manage roles**) privilege is required. + * @param roleIdentifier Unique ID or name of the Role. + * @param updateRoleRequest + */ + updateRole(roleIdentifier, updateRoleRequest, _options) { + const requestContextPromise = this.requestFactory.updateRole(roleIdentifier, updateRoleRequest, _options); + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx) => middleware.pre(ctx))); + } + return middlewarePreObservable.pipe(mergeMap((ctx) => this.configuration.httpApi.send(ctx))).pipe(mergeMap((response) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp) => this.responseProcessor.updateRole(rsp))); + })); + } +}; +var ObservableSchedulesApi = class { + constructor(configuration, requestFactory, responseProcessor) { + this.configuration = configuration; + this.requestFactory = requestFactory || new SchedulesApiRequestFactory(configuration); + this.responseProcessor = responseProcessor || new SchedulesApiResponseProcessor(); + } + /** + * Create schedule. Version: 9.4.0.cl or later Creates a Liveboard schedule job. Requires at least edit access to Liveboards. To create a schedule on behalf of another user, you need `ADMINISTRATION` (**Can administer Org**) or `JOBSCHEDULING` (**Can schedule for others**) privilege and edit access to the Liveboard. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `JOBSCHEDULING` (**Can schedule for others**) privilege is required. #### Usage guidelines * The description text is mandatory. The description text appears as **Description: ** in the Liveboard schedule email notifications. * For Liveboards with both charts and tables, schedule creation is only supported in PDF and XLS formats. Schedules created in CSV formats for such Liveboards will fail to run. If `PDF` is set as the `file_format`, enable `pdf_options` to get the correct attachment. Not doing so may cause the attachment to be rendered empty. * To include only specific visualizations, specify the visualization GUIDs in the `visualization_identifiers` array. * You can schedule a Liveboard job to run periodically by setting frequency parameters. You can set the schedule to run daily, weekly, monthly or every n minutes or hours. The scheduled job can also be configured to run at a specific time of the day or on specific days of the week or month. Please ensure that when setting the schedule frequency for _minute of the object_, only values that are multiples of 5 are included. * If the `frequency` parameters are defined, you can set the time zone to a value that matches your server\'s time zone. For example, `US/Central`, `Etc/UTC`, `CET`. The default time zone is `America/Los_Angeles`. For more information about Liveboard jobs, see [ThoughtSpot Product Documentation](https://docs.thoughtspot.com/cloud/latest/liveboard-schedule). + * @param createScheduleRequest + */ + createSchedule(createScheduleRequest, _options) { + const requestContextPromise = this.requestFactory.createSchedule(createScheduleRequest, _options); + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx) => middleware.pre(ctx))); + } + return middlewarePreObservable.pipe(mergeMap((ctx) => this.configuration.httpApi.send(ctx))).pipe(mergeMap((response) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp) => this.responseProcessor.createSchedule(rsp))); + })); + } + /** + * Deletes a scheduled job. Version: 9.4.0.cl or later Deletes a scheduled Liveboard job. Requires at least edit access to Liveboard or `ADMINISTRATION` (**Can administer Org**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `JOBSCHEDULING` (**Can schedule for others**) privilege is required. + * @param scheduleIdentifier Unique ID or name of the scheduled job. + */ + deleteSchedule(scheduleIdentifier, _options) { + const requestContextPromise = this.requestFactory.deleteSchedule(scheduleIdentifier, _options); + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx) => middleware.pre(ctx))); + } + return middlewarePreObservable.pipe(mergeMap((ctx) => this.configuration.httpApi.send(ctx))).pipe(mergeMap((response) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp) => this.responseProcessor.deleteSchedule(rsp))); + })); + } + /** + * Search Schedules Version: 9.4.0.cl or later Gets a list of scheduled jobs configured for a Liveboard. To get details of a specific scheduled job, specify the name or GUID of the scheduled job. Requires at least view access to Liveboards. **NOTE**: When filtering schedules by parameters other than `metadata`, set `record_size` to `-1` and `record_offset` to `0` for accurate results. + * @param searchSchedulesRequest + */ + searchSchedules(searchSchedulesRequest, _options) { + const requestContextPromise = this.requestFactory.searchSchedules(searchSchedulesRequest, _options); + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx) => middleware.pre(ctx))); + } + return middlewarePreObservable.pipe(mergeMap((ctx) => this.configuration.httpApi.send(ctx))).pipe(mergeMap((response) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp) => this.responseProcessor.searchSchedules(rsp))); + })); + } + /** + * Update schedule. Version: 9.4.0.cl or later Updates a scheduled Liveboard job. Requires at least edit access to Liveboards. To update a schedule on behalf of another user, you need `ADMINISTRATION` (**Can administer Org**) or `JOBSCHEDULING` (**Can schedule for others**) privilege and edit access to the Liveboard. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `JOBSCHEDULING` (**Can schedule for others**) privilege is required. The API endpoint allows you to pause a scheduled job, change the status of a paused job. You can also edit the recipients list, frequency of the job, format of the file to send to the recipients in email notifications, PDF options, and time zone setting. + * @param scheduleIdentifier Unique ID or name of the schedule. + * @param updateScheduleRequest + */ + updateSchedule(scheduleIdentifier, updateScheduleRequest, _options) { + const requestContextPromise = this.requestFactory.updateSchedule(scheduleIdentifier, updateScheduleRequest, _options); + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx) => middleware.pre(ctx))); + } + return middlewarePreObservable.pipe(mergeMap((ctx) => this.configuration.httpApi.send(ctx))).pipe(mergeMap((response) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp) => this.responseProcessor.updateSchedule(rsp))); + })); + } +}; +var ObservableSecurityApi = class { + constructor(configuration, requestFactory, responseProcessor) { + this.configuration = configuration; + this.requestFactory = requestFactory || new SecurityApiRequestFactory(configuration); + this.responseProcessor = responseProcessor || new SecurityApiResponseProcessor(); + } + /** + * Version: 9.0.0.cl or later Transfers the ownership of one or several objects from one user to another. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `USER_ADMINISTRATION` (**Can manage users**) privilege and edit access to the objects are required. + * @param assignChangeAuthorRequest + */ + assignChangeAuthor(assignChangeAuthorRequest, _options) { + const requestContextPromise = this.requestFactory.assignChangeAuthor(assignChangeAuthorRequest, _options); + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx) => middleware.pre(ctx))); + } + return middlewarePreObservable.pipe(mergeMap((ctx) => this.configuration.httpApi.send(ctx))).pipe(mergeMap((response) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp) => this.responseProcessor.assignChangeAuthor(rsp))); + })); + } + /** + * Version: 10.12.0.cl or later Fetches column security rules for specified tables. This API endpoint retrieves column-level security rules configured for tables. It returns information about which columns are secured and which groups have access to those columns. #### Usage guidelines - Provide an array of table identifiers using either `identifier` (GUID or name) or `obj_identifier` (object ID) - At least one of `identifier` or `obj_identifier` must be provided for each table - The API returns column security rules for all specified tables - Users must have appropriate permissions to access security rules for the specified tables #### Required permissions - `ADMINISTRATION` - Can administer ThoughtSpot - `DATAMANAGEMENT` - Can manage data - `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` - Can manage worksheet views and tables #### Example request ```json { \"tables\": [ { \"identifier\": \"table-guid\", \"obj_identifier\": \"table-object-id\" } ] } ``` #### Response format The API returns an array of `ColumnSecurityRuleResponse` objects wrapped in a `data` field. Each `ColumnSecurityRuleResponse` object contains: - Table information (GUID and object ID) - Array of column security rules with column details, group access, and source table information #### Example response ```json { \"data\": [ { \"guid\": \"table-guid\", \"objId\": \"table-object-id\", \"columnSecurityRules\": [ { \"column\": { \"id\": \"col_123\", \"name\": \"Salary\" }, \"groups\": [ { \"id\": \"group_1\", \"name\": \"HR Department\" } ], \"sourceTableDetails\": { \"id\": \"source-table-guid\", \"name\": \"Employee_Data\" } } ] } ] } ``` + * @param fetchColumnSecurityRulesRequest + */ + fetchColumnSecurityRules(fetchColumnSecurityRulesRequest, _options) { + const requestContextPromise = this.requestFactory.fetchColumnSecurityRules(fetchColumnSecurityRulesRequest, _options); + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx) => middleware.pre(ctx))); + } + return middlewarePreObservable.pipe(mergeMap((ctx) => this.configuration.httpApi.send(ctx))).pipe(mergeMap((response) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp) => this.responseProcessor.fetchColumnSecurityRules(rsp))); + })); + } + /** + * Version: 26.3.0.cl or later This API fetches the object privileges present for the given list of principals (user or group), on the given set of objects. It supports pagination, which can be enabled and configured using the request parameters. It provides users access to certain features based on privilege based access control. #### Usage guidelines - Specify the `type` (`USER` or `USER_GROUP`) and `identifier` (either GUID or name) of the principals for which you want to retrieve object privilege information in the `principals` array. - Specify the `type` (`LOGICAL_TABLE`) and `identifier` (either GUID or name) of the metadata objects for which you want to retrieve object privilege information in the `metadata` array. Only `LOGICAL_TABLE` metadata type is supported for now. It may be extended for other metadata types in future. - To control the offset from where principals have to be fetched, use `record_offset`. When `record_offset` is 0, information is fetched from the beginning. - To control the number of principals to be fetched, use `record_size`. Default `record_size` is 20. - Ensure `record_offset` for a subsequent request is one more than the value of `record_size` of the previous request. - Ensure using correct Authorization Bearer Token corresponding to specific user & org. #### Example request ```json { \"principals\": [ { \"type\": \"type-1\", \"identifier\": \"principal-guid-or-name-1\" }, { \"type\": \"type-2\", \"identifier\": \"principal-guid-or-name-2\" } ], \"metadata\": [ { \"type\": \"metadata-type-1\", \"identifier\": \"metadata-guid-or-name-1\" }, { \"type\": \"metadata-type-2\", \"identifier\": \"metadata-guid-or-name-2\" } ], \"record_offset\": 0, \"record_size\": 20 } ``` #### Response format The API returns an array of `metadata_object_privileges` objects wrapped in JSON. Each `metadata_object_privileges` object contains: - Metadata information (GUID, name and type) - Array of `principal_object_privilege_info`. - Each `principal_object_privilege_info` contains: - Principal type. All principals of this type are listed as described below. - Array of `principal_object_privileges`. - Each `principal_object_privileges` contains: - Principal information (GUID, name, subtype) - List of applied object level privileges. #### Example response ```json { \"metadata_object_privileges\": [ { \"metadata_id\": \"metadata-guid-1\", \"metadata_name\": \"metadata-name-1\", \"metadata_type\": \"metadata-type-1\", \"principal_object_privilege_info\": [ { \"principal_type\": \"principal-type-1\", \"principal_object_privileges\": [ { \"principal_id\": \"principal-guid-1\", \"principal_name\": \"principal-name-1\", \"principal_sub_type\": \"principal-sub-type-1\", \"object_privileges\": \"[object-privilege-1, object-privilege-2]\" }, { \"principal_id\": \"principal-guid-2\", \"principal_name\": \"principal-name-2\", \"principal_sub_type\": \"principal-sub-type-2\", \"object_privileges\": \"[object-privilege-1, object-privilege-2]\" } ] }, { \"principal_type\": \"principal-type-2\", \"principal_object_privileges\": [ { \"principal_id\": \"principal-guid-3\", \"principal_name\": \"principal-guid-4\", \"principal_sub_type\": \"principal-sub-type-4\", \"object_privileges\": \"[object-privilege-1]\" } ] } ] }, { \"metadata_id\": \"metadata-guid-2\", \"metadata_name\": \"metadata-name-2\", \"metadata_type\": \"metadata-type-2\", \"principal_object_privilege_info\": [ { \"principal_type\": \"principal-type-1\", \"principal_object_privileges\": [ { \"principal_id\": \"principal-guid-1\", \"principal_name\": \"principal-name-1\", \"principal_sub_type\": \"principal-sub-type-1\", \"object_privileges\": \"[object-privilege-3, object-privilege-4]\" }, { \"principal_id\": \"principal-guid-2\", \"principal_name\": \"principal-name-2\", \"principal_sub_type\": \"principal-sub-type-2\", \"object_privileges\": \"[object-privilege-4]\" } ] } ] } ] } ``` + * @param fetchObjectPrivilegesRequest + */ + fetchObjectPrivileges(fetchObjectPrivilegesRequest, _options) { + const requestContextPromise = this.requestFactory.fetchObjectPrivileges(fetchObjectPrivilegesRequest, _options); + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx) => middleware.pre(ctx))); + } + return middlewarePreObservable.pipe(mergeMap((ctx) => this.configuration.httpApi.send(ctx))).pipe(mergeMap((response) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp) => this.responseProcessor.fetchObjectPrivileges(rsp))); + })); + } + /** + * Version: 9.0.0.cl or later Fetches object permission details for a given principal object such as a user and group. Requires view access to the metadata object. #### Usage guidelines * To get a list of all metadata objects that a user or group can access, specify the `type` and GUID or name of the principal. * To get permission details for a specific object, add the `type` and GUID or name of the metadata object to your API request. Upon successful execution, the API returns a list of metadata objects and permission details for each object. + * @param fetchPermissionsOfPrincipalsRequest + */ + fetchPermissionsOfPrincipals(fetchPermissionsOfPrincipalsRequest, _options) { + const requestContextPromise = this.requestFactory.fetchPermissionsOfPrincipals(fetchPermissionsOfPrincipalsRequest, _options); + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx) => middleware.pre(ctx))); + } + return middlewarePreObservable.pipe(mergeMap((ctx) => this.configuration.httpApi.send(ctx))).pipe(mergeMap((response) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp) => this.responseProcessor.fetchPermissionsOfPrincipals(rsp))); + })); + } + /** + * Version: 9.0.0.cl or later Fetches permission details for a given metadata object. Requires view access to the metadata object. #### Usage guidelines * To fetch a list of users and groups for a metadata object, specify `type` and GUID or name of the metadata object. * To get permission details for a specific user or group, add `type` and GUID or name of the principal object to your API request. Upon successful execution, the API returns permission details and principal information for the object specified in the API request. + * @param fetchPermissionsOnMetadataRequest + */ + fetchPermissionsOnMetadata(fetchPermissionsOnMetadataRequest, _options) { + const requestContextPromise = this.requestFactory.fetchPermissionsOnMetadata(fetchPermissionsOnMetadataRequest, _options); + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx) => middleware.pre(ctx))); + } + return middlewarePreObservable.pipe(mergeMap((ctx) => this.configuration.httpApi.send(ctx))).pipe(mergeMap((response) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp) => this.responseProcessor.fetchPermissionsOnMetadata(rsp))); + })); + } + /** + * Version: 26.3.0.cl or later This API allows the addition or deletion of object level privileges for a set of users and groups, on a set of metadata objects. It provides users to access certain features based on privilege based access control. #### Usage guidelines - Specify the `operation`. The supported operations are: `ADD`, `REMOVE`. - Specify the type of the objects on which the object privileges are being provided in `metadata_type`. Only `LOGICAL_TABLE` metadata type is supported for now. It may be extended for other metadata types in future. - Specify the list of object privilege types in the `object_privilege_types` array. The supported object privilege types are: `SPOTTER_COACHING_PRIVILEGE`. - Specify the identifiers (either GUID or name) for the metadata objects in the `metadata_identifiers` array. - Specify the `type` (`USER` or `USER_GROUP`) and `identifier` (either GUID or name) of the principals to which you want to apply the given operation and given object privileges in the `principals` array. - Ensure using correct Authorization Bearer Token corresponding to specific user & org. #### Example request ```json { \"operation\": \"operation-type\", \"metadata_type\": \"metadata-type\", \"object_privilege_types\": [\"privilege-type-1\", \"privilege-type-2\"], \"metadata_identifiers\": [\"metadata-guid-or-name-1\", \"metadata-guid-or-name-1\"], \"principals\": [ { \"type\": \"type-1\", \"identifier\": \"principal-guid-or-name-1\" }, { \"type\": \"type-2\", \"identifier\": \"principal-guid-or-name-2\" } ] } ``` > ###### Note: > * Only admin users, users with edit access and users with coaching privilege on a given data-model can add or remove principals related to SPOTTER_COACHING_PRIVILEGE + * @param manageObjectPrivilegeRequest + */ + manageObjectPrivilege(manageObjectPrivilegeRequest, _options) { + const requestContextPromise = this.requestFactory.manageObjectPrivilege(manageObjectPrivilegeRequest, _options); + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx) => middleware.pre(ctx))); + } + return middlewarePreObservable.pipe(mergeMap((ctx) => this.configuration.httpApi.send(ctx))).pipe(mergeMap((response) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp) => this.responseProcessor.manageObjectPrivilege(rsp))); + })); + } + /** + * Version: 26.5.0.cl or later Allows publishing metadata objects across organizations in ThoughtSpot. Requires ADMINISTRATION role and TENANT scope. The API endpoint allows publishing the following types of metadata objects: * Liveboards * Answers * Logical Tables This API will essentially share the objects along with it\'s dependencies to the org admins of the orgs to which it is being published. + * @param publishMetadataRequest + */ + publishMetadata(publishMetadataRequest, _options) { + const requestContextPromise = this.requestFactory.publishMetadata(publishMetadataRequest, _options); + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx) => middleware.pre(ctx))); + } + return middlewarePreObservable.pipe(mergeMap((ctx) => this.configuration.httpApi.send(ctx))).pipe(mergeMap((response) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp) => this.responseProcessor.publishMetadata(rsp))); + })); + } + /** + * Version: 9.0.0.cl or later Allows sharing one or several metadata objects with users and groups in ThoughtSpot. Requires edit access to the metadata object. #### Supported metadata objects: * Liveboards * Visualizations * Answers * Models * Views * Connections * Collections #### Object permissions You can provide `READ_ONLY` or `MODIFY` access when sharing an object with another user or group. The `READ_ONLY` permission grants view access to the shared object, whereas `MODIFY` provides edit access. To prevent a user or group from accessing the shared object, specify the GUID or name of the principal and set `shareMode` to `NO_ACCESS`. #### Sharing a visualization * Sharing a visualization implicitly shares the entire Liveboard with the recipient. * Object permissions set for a shared visualization also apply to the Liveboard unless overridden by another API request or via UI. * If email notifications for object sharing are enabled, a notification with a link to the shared visualization will be sent to the recipient’s email address. Although this link opens the shared visualization, recipients can also access other visualizations in the Liveboard. #### Sharing a collection Collections support **dual permissions** that provide fine-grained control: * **Collection permissions** (`share_mode`) - controls access to the collection itself (view, edit, delete the collection) * **Content permissions** (`content_share_mode`) - controls access to objects within the collection (view, edit objects inside) **Default Behavior:** - If only `share_mode` is specified, the content permissions default to `READ_ONLY` (except when `share_mode` is `NO_ACCESS`, then content also gets `NO_ACCESS`) - To give users edit access to collection contents, explicitly set `content_share_mode: \"MODIFY\"` ## Examples The following JSON examples can be copy-pasted as request bodies for the REST v2 API endpoint: ```bash POST /callosum/v1/v2/security/metadata/share Content-Type: application/x-www-form-urlencoded ``` ### Basic collection sharing Share a collection with read-only access: ```json { \"metadata_type\": \"COLLECTION\", \"metadata_identifiers\": [\"Sales Reports Collection\"], \"permissions\": [{ \"principal\": { \"type\": \"USER\", \"identifier\": \"alice@company.com\" }, \"share_mode\": \"READ_ONLY\" }], \"notification\": { \"message\": \"I\'ve shared the Sales Reports collection with you\", \"notify_on_share\": true } } ``` ### Collection sharing with dual permissions Share a collection with different permissions for the collection vs. its contents: ```json { \"metadata_type\": \"COLLECTION\", \"metadata_identifiers\": [\"Marketing Analytics\"], \"permissions\": [{ \"principal\": { \"type\": \"USER\", \"identifier\": \"bob@company.com\" }, \"share_mode\": \"MODIFY\", \"content_share_mode\": \"READ_ONLY\" }, { \"principal\": { \"type\": \"USER_GROUP\", \"identifier\": \"Marketing Team\" }, \"share_mode\": \"READ_ONLY\", \"content_share_mode\": \"READ_ONLY\" }], \"notification\": { \"emails\": [\"bob@company.com\"], \"message\": \"You can edit the collection but content is read-only\", \"enable_custom_url\": false, \"notify_on_share\": true }, \"has_lenient_discoverability\": false } ``` ### Multiple collections sharing Share multiple collections with different users: ```json { \"metadata\": [ { \"type\": \"COLLECTION\", \"identifier\": \"Q4 Reports\" }, { \"type\": \"COLLECTION\", \"identifier\": \"Executive Dashboard Collection\" } ], \"permissions\": [{ \"principal\": { \"type\": \"USER_GROUP\", \"identifier\": \"Executives\" }, \"share_mode\": \"MODIFY\" }, { \"principal\": { \"type\": \"USER\", \"identifier\": \"manager@company.com\" }, \"share_mode\": \"READ_ONLY\", \"content_share_mode\": \"MODIFY\" }], \"notification\": { \"message\": \"Sharing quarterly collections with leadership team\", \"notify_on_share\": true } } ``` ### Remove collection access Remove access to a collection by setting share_mode to NO_ACCESS: ```json { \"metadata_type\": \"COLLECTION\", \"metadata_identifiers\": [\"Confidential Reports\"], \"permissions\": [{ \"principal\": { \"type\": \"USER\", \"identifier\": \"former-employee@company.com\" }, \"share_mode\": \"NO_ACCESS\" }], \"notification\": { \"notify_on_share\": false } } ``` ### Collection Permission Scenarios **Scenario 1: Collection Admin** - `share_mode: MODIFY` + `content_share_mode: MODIFY` = Full control over collection and its contents **Scenario 2: Collection Curator** - `share_mode: MODIFY` + `content_share_mode: READ_ONLY` = Can manage collection structure but not edit contents **Scenario 3: Content Editor** - `share_mode: READ_ONLY` + `content_share_mode: MODIFY` = Can edit objects within collection but can\'t change collection itself **Scenario 4: Viewer** - `share_mode: READ_ONLY` + `content_share_mode: READ_ONLY` = View-only access to collection and contents + * @param shareMetadataRequest + */ + shareMetadata(shareMetadataRequest, _options) { + const requestContextPromise = this.requestFactory.shareMetadata(shareMetadataRequest, _options); + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx) => middleware.pre(ctx))); + } + return middlewarePreObservable.pipe(mergeMap((ctx) => this.configuration.httpApi.send(ctx))).pipe(mergeMap((response) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp) => this.responseProcessor.shareMetadata(rsp))); + })); + } + /** + * Version: 26.5.0.cl or later Allows unpublishing metadata objects from organizations in ThoughtSpot. Requires ADMINISTRATION role and TENANT scope. The API endpoint allows unpublishing the following types of metadata objects: * Liveboards * Answers * Logical Tables When unpublishing objects, you can: * Include dependencies by setting `include_dependencies` to true - this will unpublish all dependent objects if no other published object is using them * Force unpublish by setting `force` to true - this will break all dependent objects in the unpublished organizations + * @param unpublishMetadataRequest + */ + unpublishMetadata(unpublishMetadataRequest, _options) { + const requestContextPromise = this.requestFactory.unpublishMetadata(unpublishMetadataRequest, _options); + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx) => middleware.pre(ctx))); + } + return middlewarePreObservable.pipe(mergeMap((ctx) => this.configuration.httpApi.send(ctx))).pipe(mergeMap((response) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp) => this.responseProcessor.unpublishMetadata(rsp))); + })); + } + /** + * Version: 10.12.0.cl or later Creates, updates, or deletes column security rules for specified tables. This API endpoint allows you to create, update, or delete column-level security rules on columns of a table. The operation follows an \"all or none\" policy: if defining security rules for any of the provided columns fails, the entire operation will be rolled back, and no rules will be created. #### Usage guidelines - Provide table identifier using either `identifier` (GUID or name) or `obj_identifier` (object ID) - Use `clear_csr: true` to remove all column security rules from the table - For each column, specify the security rule using `column_security_rules` array - Use `is_unsecured: true` to mark a specific column as unprotected - Use `group_access` operations to manage group associations: - `ADD`: Add groups to the column\'s access list - `REMOVE`: Remove groups from the column\'s access list - `REPLACE`: Replace all existing groups with the specified groups #### Required permissions - `ADMINISTRATION` - Can administer ThoughtSpot - `DATAMANAGEMENT` - Can manage data (if RBAC is disabled) - `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` - Can manage worksheet views and tables (if RBAC is enabled) #### Example request ```json { \"identifier\": \"table-guid\", \"obj_identifier\": \"table-object-id\", \"clear_csr\": false, \"column_security_rules\": [ { \"column_identifier\": \"col id or col name\", \"is_unsecured\": false, \"group_access\": [ { \"operation\": \"ADD\", \"group_identifiers\": [\"hr_group_id\", \"hr_group_name\", \"finance_group_id\"] } ] }, { \"column_identifier\": \"col id or col name\", \"is_unsecured\": true }, { \"column_identifier\": \"col id or col name\", \"is_unsecured\": false, \"group_access\": [ { \"operation\": \"REPLACE\", \"group_identifiers\": [\"management_group_id\", \"management_group_name\"] } ] } ] } ``` #### Request Body Schema - `identifier` (string, optional): GUID or name of the table for which we want to create column security rules - `obj_identifier` (string, optional): The object ID of the table - `clear_csr` (boolean, optional): If true, then all the secured columns will be marked as unprotected, and all the group associations will be removed - `column_security_rules` (array of objects, required): An array where each object defines the security rule for a specific column Each column security rule object contains: - `column_identifier` (string, required): Column identifier (col_id or name) - `is_unsecured` (boolean, optional): If true, the column will be marked as unprotected and all groups associated with it will be removed - `group_access` (array of objects, optional): Array of group operation objects Each group operation object contains: - `operation` (string, required): Operation type - ADD, REMOVE, or REPLACE - `group_identifiers` (array of strings, required): Array of group identifiers (name or GUID) on which the operation will be performed #### Response This API does not return any response body. A successful operation returns HTTP 200 status code. #### Operation Types - **ADD**: Adds the specified groups to the column\'s access list - **REMOVE**: Removes the specified groups from the column\'s access list - **REPLACE**: Replaces all existing groups with the specified groups + * @param updateColumnSecurityRulesRequest + */ + updateColumnSecurityRules(updateColumnSecurityRulesRequest, _options) { + const requestContextPromise = this.requestFactory.updateColumnSecurityRules(updateColumnSecurityRulesRequest, _options); + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx) => middleware.pre(ctx))); + } + return middlewarePreObservable.pipe(mergeMap((ctx) => this.configuration.httpApi.send(ctx))).pipe(mergeMap((response) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp) => this.responseProcessor.updateColumnSecurityRules(rsp))); + })); + } +}; +var ObservableSystemApi = class { + constructor(configuration, requestFactory, responseProcessor) { + this.configuration = configuration; + this.requestFactory = requestFactory || new SystemApiRequestFactory(configuration); + this.responseProcessor = responseProcessor || new SystemApiResponseProcessor(); + } + /** + * Version: 10.14.0.cl or later Configure communication channel preferences. - Use `cluster_preferences` to update the default preferences for your ThoughtSpot application instance. - If your instance has [Orgs](https://docs.thoughtspot.com/cloud/latest/orgs-overview), use `org_preferences` to specify Org-specific preferences that override the defaults. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) or `DEVELOPER` (**Has developer privilege**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, users with `APPLICATION_ADMINISTRATION` (**Can manage application settings**) privilege are also authorized to perform this action. + * @param configureCommunicationChannelPreferencesRequest + */ + configureCommunicationChannelPreferences(configureCommunicationChannelPreferencesRequest, _options) { + const requestContextPromise = this.requestFactory.configureCommunicationChannelPreferences(configureCommunicationChannelPreferencesRequest, _options); + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx) => middleware.pre(ctx))); + } + return middlewarePreObservable.pipe(mergeMap((ctx) => this.configuration.httpApi.send(ctx))).pipe(mergeMap((response) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp) => this.responseProcessor.configureCommunicationChannelPreferences(rsp))); + })); + } + /** + * Version: 26.2.0.cl or later Configure security settings for your ThoughtSpot application instance. - Use `cluster_preferences` to update cluster-level security settings including CORS whitelisted URLs, CSP settings, SAML redirect URLs, partitioned cookies, and non-embed access configuration. - Use `org_preferences` to configure Org-specific security settings. If your instance has [Orgs](https://docs.thoughtspot.com/cloud/latest/orgs-overview), this allows configuring CORS and non-embed access settings specific to the Org. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) or `DEVELOPER` (**Has developer privilege**) privilege. Cluster-level SAML and script-src settings require `ADMINISTRATION` privilege. See [Security Settings](https://developers.thoughtspot.com/docs/security-settings) for more details. + * @param configureSecuritySettingsRequest + */ + configureSecuritySettings(configureSecuritySettingsRequest, _options) { + const requestContextPromise = this.requestFactory.configureSecuritySettings(configureSecuritySettingsRequest, _options); + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx) => middleware.pre(ctx))); + } + return middlewarePreObservable.pipe(mergeMap((ctx) => this.configuration.httpApi.send(ctx))).pipe(mergeMap((response) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp) => this.responseProcessor.configureSecuritySettings(rsp))); + })); + } + /** + * Version: 9.0.0.cl or later Retrieves the current configuration details of the cluster. If the request is successful, the API returns a list configuration settings applied on the cluster. Requires `ADMINISTRATION`(**Can administer ThoughtSpot**) privilege to view these complete configuration settings of the cluster. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `SYSTEM_INFO_ADMINISTRATION` (**Can view system activities**) privilege is required. This API does not require any parameters to be passed in the request. + */ + getSystemConfig(_options) { + const requestContextPromise = this.requestFactory.getSystemConfig(_options); + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx) => middleware.pre(ctx))); + } + return middlewarePreObservable.pipe(mergeMap((ctx) => this.configuration.httpApi.send(ctx))).pipe(mergeMap((response) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp) => this.responseProcessor.getSystemConfig(rsp))); + })); + } + /** + * Version: 9.0.0.cl or later Gets system information such as the release version, locale, time zone, deployment environment, date format, and date time format of the cluster. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privileges. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `SYSTEM_INFO_ADMINISTRATION` (**Can view system activities**) privilege is required. This API does not require any parameters to be passed in the request. + */ + getSystemInformation(_options) { + const requestContextPromise = this.requestFactory.getSystemInformation(_options); + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx) => middleware.pre(ctx))); + } + return middlewarePreObservable.pipe(mergeMap((ctx) => this.configuration.httpApi.send(ctx))).pipe(mergeMap((response) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp) => this.responseProcessor.getSystemInformation(rsp))); + })); + } + /** + * Version: 9.2.0.cl or later Gets a list of configuration overrides applied on the cluster. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `APPLICATION_ADMINISTRATION` (**Can manage application settings**) privilege is required. This API does not require any parameters to be passed in the request. + */ + getSystemOverrideInfo(_options) { + const requestContextPromise = this.requestFactory.getSystemOverrideInfo(_options); + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx) => middleware.pre(ctx))); + } + return middlewarePreObservable.pipe(mergeMap((ctx) => this.configuration.httpApi.send(ctx))).pipe(mergeMap((response) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp) => this.responseProcessor.getSystemOverrideInfo(rsp))); + })); + } + /** + * Version: 10.14.0.cl or later Fetch communication channel preferences. - Use `cluster_preferences` to fetch the default preferences for your ThoughtSpot application instance. - If your instance has [Orgs](https://docs.thoughtspot.com/cloud/latest/orgs-overview), use `org_preferences` to fetch any Org-specific preferences that override the defaults. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) or `DEVELOPER` (**Has developer privilege**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, users with `APPLICATION_ADMINISTRATION` (**Can manage application settings**) privilege are also authorized to perform this action. + * @param searchCommunicationChannelPreferencesRequest + */ + searchCommunicationChannelPreferences(searchCommunicationChannelPreferencesRequest, _options) { + const requestContextPromise = this.requestFactory.searchCommunicationChannelPreferences(searchCommunicationChannelPreferencesRequest, _options); + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx) => middleware.pre(ctx))); + } + return middlewarePreObservable.pipe(mergeMap((ctx) => this.configuration.httpApi.send(ctx))).pipe(mergeMap((response) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp) => this.responseProcessor.searchCommunicationChannelPreferences(rsp))); + })); + } + /** + * Version: 26.2.0.cl or later Fetch security settings for your ThoughtSpot application instance. - Use `scope: CLUSTER` to retrieve cluster-level security settings, including CORS and CSP allowlists, SAML redirect URLs, and settings that control access to non-embedded pages. - Use `scope: ORG` to retrieve Org-level security settings. If your instance has [Orgs](https://docs.thoughtspot.com/cloud/latest/orgs-overview), this returns CORS and non-embed access settings specific to the Org. - If `scope` is not specified, returns both cluster and Org-specific settings based on user privileges. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) or `DEVELOPER` (**Has developer privilege**) privilege. See [Security Settings](https://developers.thoughtspot.com/docs/security-settings) for more details. + * @param searchSecuritySettingsRequest + */ + searchSecuritySettings(searchSecuritySettingsRequest, _options) { + const requestContextPromise = this.requestFactory.searchSecuritySettings(searchSecuritySettingsRequest, _options); + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx) => middleware.pre(ctx))); + } + return middlewarePreObservable.pipe(mergeMap((ctx) => this.configuration.httpApi.send(ctx))).pipe(mergeMap((response) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp) => this.responseProcessor.searchSecuritySettings(rsp))); + })); + } + /** + * Version: 9.2.0.cl or later Updates the current configuration of the cluster. You must send the configuration data in JSON format. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privileges. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `APPLICATION_ADMINISTRATION` (**Can manage application settings**) privilege is required. + * @param updateSystemConfigRequest + */ + updateSystemConfig(updateSystemConfigRequest, _options) { + const requestContextPromise = this.requestFactory.updateSystemConfig(updateSystemConfigRequest, _options); + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx) => middleware.pre(ctx))); + } + return middlewarePreObservable.pipe(mergeMap((ctx) => this.configuration.httpApi.send(ctx))).pipe(mergeMap((response) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp) => this.responseProcessor.updateSystemConfig(rsp))); + })); + } + /** + * Version: 26.4.0.cl or later Validates a communication channel configuration to ensure it is properly set up and can receive events. - Use `channel_type` to specify the type of communication channel to validate (e.g., WEBHOOK). - Use `channel_identifier` to provide the unique identifier or name for the communication channel. - Use `event_type` to specify the event type to validate for this channel. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) or `DEVELOPER` (**Has developer privilege**) privilege. For webhook channels, users with `CAN_MANAGE_WEBHOOKS` (**Can manage webhooks**) privilege are also authorized to perform this action. + * @param validateCommunicationChannelRequest + */ + validateCommunicationChannel(validateCommunicationChannelRequest, _options) { + const requestContextPromise = this.requestFactory.validateCommunicationChannel(validateCommunicationChannelRequest, _options); + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx) => middleware.pre(ctx))); + } + return middlewarePreObservable.pipe(mergeMap((ctx) => this.configuration.httpApi.send(ctx))).pipe(mergeMap((response) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp) => this.responseProcessor.validateCommunicationChannel(rsp))); + })); + } +}; +var ObservableTagsApi = class { + constructor(configuration, requestFactory, responseProcessor) { + this.configuration = configuration; + this.requestFactory = requestFactory || new TagsApiRequestFactory(configuration); + this.responseProcessor = responseProcessor || new TagsApiResponseProcessor(); + } + /** + * Version: 9.0.0.cl or later Assigns tags to Liveboards, Answers, Tables, and Worksheets. Requires edit access to the metadata object. + * @param assignTagRequest + */ + assignTag(assignTagRequest, _options) { + const requestContextPromise = this.requestFactory.assignTag(assignTagRequest, _options); + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx) => middleware.pre(ctx))); + } + return middlewarePreObservable.pipe(mergeMap((ctx) => this.configuration.httpApi.send(ctx))).pipe(mergeMap((response) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp) => this.responseProcessor.assignTag(rsp))); + })); + } + /** + * Version: 9.0.0.cl or later Creates a tag object. Tags are labels that identify a metadata object. For example, you can create a tag to designate subject areas, such as sales, HR, marketing, and finance. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `TAGMANAGEMENT` (**Can manage tags**) privilege is required to create, edit, and delete tags. + * @param createTagRequest + */ + createTag(createTagRequest, _options) { + const requestContextPromise = this.requestFactory.createTag(createTagRequest, _options); + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx) => middleware.pre(ctx))); + } + return middlewarePreObservable.pipe(mergeMap((ctx) => this.configuration.httpApi.send(ctx))).pipe(mergeMap((response) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp) => this.responseProcessor.createTag(rsp))); + })); + } + /** + * Version: 9.0.0.cl or later Deletes a tag object from the ThoughtSpot system Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `TAGMANAGEMENT` (**Can manage tags**) privilege is required to create, edit, and delete tags. + * @param tagIdentifier Tag identifier Tag name or Tag id. + */ + deleteTag(tagIdentifier, _options) { + const requestContextPromise = this.requestFactory.deleteTag(tagIdentifier, _options); + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx) => middleware.pre(ctx))); + } + return middlewarePreObservable.pipe(mergeMap((ctx) => this.configuration.httpApi.send(ctx))).pipe(mergeMap((response) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp) => this.responseProcessor.deleteTag(rsp))); + })); + } + /** + * Version: 9.0.0.cl or later Gets a list of tag objects available on the ThoughtSpot system. To get details of a specific tag object, specify the GUID or name. Any authenticated user can search for tag objects. + * @param searchTagsRequest + */ + searchTags(searchTagsRequest, _options) { + const requestContextPromise = this.requestFactory.searchTags(searchTagsRequest, _options); + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx) => middleware.pre(ctx))); + } + return middlewarePreObservable.pipe(mergeMap((ctx) => this.configuration.httpApi.send(ctx))).pipe(mergeMap((response) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp) => this.responseProcessor.searchTags(rsp))); + })); + } + /** + * Version: 9.0.0.cl or later Removes the tags applied to a Liveboard, Answer, Table, or Worksheet. Requires edit access to the metadata object. + * @param unassignTagRequest + */ + unassignTag(unassignTagRequest, _options) { + const requestContextPromise = this.requestFactory.unassignTag(unassignTagRequest, _options); + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx) => middleware.pre(ctx))); + } + return middlewarePreObservable.pipe(mergeMap((ctx) => this.configuration.httpApi.send(ctx))).pipe(mergeMap((response) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp) => this.responseProcessor.unassignTag(rsp))); + })); + } + /** + * Version: 9.0.0.cl or later Updates a tag object. You can modify the `name` and `color` properties of a tag object. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `TAGMANAGEMENT` (**Can manage tags**) privilege is required to create, edit, and delete tags. + * @param tagIdentifier Name or Id of the tag. + * @param updateTagRequest + */ + updateTag(tagIdentifier, updateTagRequest, _options) { + const requestContextPromise = this.requestFactory.updateTag(tagIdentifier, updateTagRequest, _options); + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx) => middleware.pre(ctx))); + } + return middlewarePreObservable.pipe(mergeMap((ctx) => this.configuration.httpApi.send(ctx))).pipe(mergeMap((response) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp) => this.responseProcessor.updateTag(rsp))); + })); + } +}; +var ObservableThoughtSpotRestApi = class { + constructor(configuration, requestFactory, responseProcessor) { + this.configuration = configuration; + this.requestFactory = requestFactory || new ThoughtSpotRestApiRequestFactory(configuration); + this.responseProcessor = responseProcessor || new ThoughtSpotRestApiResponseProcessor(); + } + /** + * Version: 9.7.0.cl or later Activates a deactivated user account. Requires `ADMINISTRATION` (**Can administer Thoughtspot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `USER_ADMINISTRATION` (**Can manage users**) privilege is required. To activate an inactive user account, the API request body must include the following information: - Username or the GUID of the user account. - Auth token generated for the deactivated user. The auth token is sent in the API response when a user is deactivated. - Password for the user account. + * @param activateUserRequest + */ + activateUser(activateUserRequest, _options) { + const requestContextPromise = this.requestFactory.activateUser(activateUserRequest, _options); + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx) => middleware.pre(ctx))); + } + return middlewarePreObservable.pipe(mergeMap((ctx) => this.configuration.httpApi.send(ctx))).pipe(mergeMap((response) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp) => this.responseProcessor.activateUser(rsp))); + })); + } + /** + * Version: 9.0.0.cl or later Transfers the ownership of one or several objects from one user to another. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `USER_ADMINISTRATION` (**Can manage users**) privilege and edit access to the objects are required. + * @param assignChangeAuthorRequest + */ + assignChangeAuthor(assignChangeAuthorRequest, _options) { + const requestContextPromise = this.requestFactory.assignChangeAuthor(assignChangeAuthorRequest, _options); + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx) => middleware.pre(ctx))); + } + return middlewarePreObservable.pipe(mergeMap((ctx) => this.configuration.httpApi.send(ctx))).pipe(mergeMap((response) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp) => this.responseProcessor.assignChangeAuthor(rsp))); + })); + } + /** + * Version: 9.0.0.cl or later Assigns tags to Liveboards, Answers, Tables, and Worksheets. Requires edit access to the metadata object. + * @param assignTagRequest + */ + assignTag(assignTagRequest, _options) { + const requestContextPromise = this.requestFactory.assignTag(assignTagRequest, _options); + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx) => middleware.pre(ctx))); + } + return middlewarePreObservable.pipe(mergeMap((ctx) => this.configuration.httpApi.send(ctx))).pipe(mergeMap((response) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp) => this.responseProcessor.assignTag(rsp))); + })); + } + /** + * Version: 9.0.0.cl or later Updates the current password of the user. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `USER_ADMINISTRATION` (**Can manage users**) privilege is required. + * @param changeUserPasswordRequest + */ + changeUserPassword(changeUserPasswordRequest, _options) { + const requestContextPromise = this.requestFactory.changeUserPassword(changeUserPasswordRequest, _options); + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx) => middleware.pre(ctx))); + } + return middlewarePreObservable.pipe(mergeMap((ctx) => this.configuration.httpApi.send(ctx))).pipe(mergeMap((response) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp) => this.responseProcessor.changeUserPassword(rsp))); + })); + } + /** + * Version: 9.2.0.cl or later Commits TML files of metadata objects to the Git branch configured on your instance. Requires at least edit access to objects used in the commit operation. Before using this endpoint to push your commits: * Enable Git integration on your instance. * Make sure the Git repository and branch details are configured on your instance. For more information, see [Git integration documentation](https://developers.thoughtspot.com/docs/git-integration). + * @param commitBranchRequest + */ + commitBranch(commitBranchRequest, _options) { + const requestContextPromise = this.requestFactory.commitBranch(commitBranchRequest, _options); + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx) => middleware.pre(ctx))); + } + return middlewarePreObservable.pipe(mergeMap((ctx) => this.configuration.httpApi.send(ctx))).pipe(mergeMap((response) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp) => this.responseProcessor.commitBranch(rsp))); + })); + } + /** + * Version: 26.6.0.cl or later Enables or disables authentication at cluster or org level for the specified auth type. Currently supports `TRUSTED_AUTH`. #### Required privileges Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) or `CONTROL_TRUSTED_AUTH` (**Can Enable or Disable Trusted Authentication**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled, the `CONTROL_TRUSTED_AUTH` privilege is required. #### Usage guidelines Use `cluster_preferences` to enable or disable authentication at the cluster level. Cluster-level settings can only be configured from the Primary Org. - `ENABLED` — Generates a new access token if one does not exist. An existing token is preserved. - `DISABLED` — Revokes the existing cluster-level access token. Use `org_preferences` to enable or disable authentication for one or more Orgs. Each entry must include an `org_identifier` (unique ID or name) and an `auth_status`. Org-level configuration requires the per-Org authentication feature to be enabled on your instance. - `ENABLED` — Generates a new org-level access token if one does not exist. - `DISABLED` — Revokes the existing org-level access token for that Org. Both `cluster_preferences` and `org_preferences` are optional. Omitting a field leaves the corresponding settings unchanged. If both are omitted, the API returns `204 No Content` without making any changes. **Note**: Cluster-level and org-level settings are independent of each other. Enabling or disabling one does not affect the other. + * @param configureAuthSettingsRequest + */ + configureAuthSettings(configureAuthSettingsRequest, _options) { + const requestContextPromise = this.requestFactory.configureAuthSettings(configureAuthSettingsRequest, _options); + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx) => middleware.pre(ctx))); + } + return middlewarePreObservable.pipe(mergeMap((ctx) => this.configuration.httpApi.send(ctx))).pipe(mergeMap((response) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp) => this.responseProcessor.configureAuthSettings(rsp))); + })); + } + /** + * Version: 10.14.0.cl or later Configure communication channel preferences. - Use `cluster_preferences` to update the default preferences for your ThoughtSpot application instance. - If your instance has [Orgs](https://docs.thoughtspot.com/cloud/latest/orgs-overview), use `org_preferences` to specify Org-specific preferences that override the defaults. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) or `DEVELOPER` (**Has developer privilege**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, users with `APPLICATION_ADMINISTRATION` (**Can manage application settings**) privilege are also authorized to perform this action. + * @param configureCommunicationChannelPreferencesRequest + */ + configureCommunicationChannelPreferences(configureCommunicationChannelPreferencesRequest, _options) { + const requestContextPromise = this.requestFactory.configureCommunicationChannelPreferences(configureCommunicationChannelPreferencesRequest, _options); + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx) => middleware.pre(ctx))); + } + return middlewarePreObservable.pipe(mergeMap((ctx) => this.configuration.httpApi.send(ctx))).pipe(mergeMap((response) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp) => this.responseProcessor.configureCommunicationChannelPreferences(rsp))); + })); + } + /** + * Version: 26.2.0.cl or later Configure security settings for your ThoughtSpot application instance. - Use `cluster_preferences` to update cluster-level security settings including CORS whitelisted URLs, CSP settings, SAML redirect URLs, partitioned cookies, and non-embed access configuration. - Use `org_preferences` to configure Org-specific security settings. If your instance has [Orgs](https://docs.thoughtspot.com/cloud/latest/orgs-overview), this allows configuring CORS and non-embed access settings specific to the Org. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) or `DEVELOPER` (**Has developer privilege**) privilege. Cluster-level SAML and script-src settings require `ADMINISTRATION` privilege. See [Security Settings](https://developers.thoughtspot.com/docs/security-settings) for more details. + * @param configureSecuritySettingsRequest + */ + configureSecuritySettings(configureSecuritySettingsRequest, _options) { + const requestContextPromise = this.requestFactory.configureSecuritySettings(configureSecuritySettingsRequest, _options); + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx) => middleware.pre(ctx))); + } + return middlewarePreObservable.pipe(mergeMap((ctx) => this.configuration.httpApi.send(ctx))).pipe(mergeMap((response) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp) => this.responseProcessor.configureSecuritySettings(rsp))); + })); + } + /** + * Version: 10.12.0.cl or later Gets connection configuration objects. Requires `DATAMANAGEMENT` (**Can manage data**) and edit permissions to the connection object, or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) privilege is required. #### Usage guidelines * To get a list of all configurations available in the ThoughtSpot system, send the API request with only the connection name or GUID in the request body. * To fetch details of a configuration object, specify the configuration object name or GUID. + * @param connectionConfigurationSearchRequest + */ + connectionConfigurationSearch(connectionConfigurationSearchRequest, _options) { + const requestContextPromise = this.requestFactory.connectionConfigurationSearch(connectionConfigurationSearchRequest, _options); + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx) => middleware.pre(ctx))); + } + return middlewarePreObservable.pipe(mergeMap((ctx) => this.configuration.httpApi.send(ctx))).pipe(mergeMap((response) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp) => this.responseProcessor.connectionConfigurationSearch(rsp))); + })); + } + /** + * Convert worksheets to models Version: 10.6.0.cl or later ## Prerequisites - **Privileges Required:** - `DATAMANAGEMENT` (Can manage data) or `ADMINISTRATION` (Can administer ThoughtSpot). - **Additional Privileges (if RBAC is enabled):** - `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` (Can manage data models). --- ## Usage Guidelines ### Parameters 1. **worksheet_ids** - **Description:** A comma-separated list of GUIDs (Globally Unique Identifiers) specifying the Worksheets to be converted. - **Usage:** - Used only when `convert_all` is set to `false`. - Leave empty or omit when `convert_all` is set to `true`. 2. **exclude_worksheet_ids** - **Description:** A comma-separated list of GUIDs specifying Worksheets to be excluded from conversion. - **Usage:** - Useful when `convert_all` is set to `true` and specific Worksheets should not be converted. 3. **convert_all** - **Description:** Sets the scope of conversion. - **Options:** - `true`: Converts all Worksheets in the system, except those specified in `exclude_worksheet_ids`. - `false`: Converts only the Worksheets listed in `worksheet_ids`. 4. **apply_changes** - **Description:** Specifies whether to apply changes directly to ThoughtSpot or to generate a preview before applying any changes.Used for validation of conversion. - **Options:** - `true`: Applies conversion changes directly to ThoughtSpot. - `false`: Generates only a preview of the changes and does not apply any changes to ThoughtSpot --- ## Best Practices 1. **Backup Before Conversion:** Always export metadata as a backup before initiating the conversion process 2. **Partial Conversion for Testing:** Test the conversion process by setting `convert_all` to `false` and specifying a small number of `worksheet_ids`. 3. **Verify Dependencies:** Check for dependent objects, such as Tables and Connections, to avoid invalid references. 4. **Review Changes:** Use `apply_changes: false` to preview the impact of the conversion before applying changes. --- ## Examples ### Convert Specific Worksheets ```json { \"worksheet_ids\": [\"guid1\", \"guid2\", \"guid3\"], \"exclude_worksheet_ids\": [], \"convert_all\": false, \"apply_changes\": true } ``` ### Convert All Accessible Worksheets ```json { \"worksheet_ids\": [], \"exclude_worksheet_ids\": [], \"convert_all\": true, \"apply_changes\": true } ``` ### Exclude Specific Worksheets While Converting All Accessible Worksheets ```json { \"worksheet_ids\": [], \"exclude_worksheet_ids\": [\"abc\"], \"convert_all\": true, \"apply_changes\": true } ``` + * @param convertWorksheetToModelRequest + */ + convertWorksheetToModel(convertWorksheetToModelRequest, _options) { + const requestContextPromise = this.requestFactory.convertWorksheetToModel(convertWorksheetToModelRequest, _options); + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx) => middleware.pre(ctx))); + } + return middlewarePreObservable.pipe(mergeMap((ctx) => this.configuration.httpApi.send(ctx))).pipe(mergeMap((response) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp) => this.responseProcessor.convertWorksheetToModel(rsp))); + })); + } + /** + * Makes a copy of an Answer or Liveboard Version: 10.3.0.cl or later Creates a copy of a metadata object. Requires at least view access to the metadata object being copied. Upon successful execution, the API creates a copy of the metadata object specified in the API request and returns the ID of the new object. + * @param copyObjectRequest + */ + copyObject(copyObjectRequest, _options) { + const requestContextPromise = this.requestFactory.copyObject(copyObjectRequest, _options); + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx) => middleware.pre(ctx))); + } + return middlewarePreObservable.pipe(mergeMap((ctx) => this.configuration.httpApi.send(ctx))).pipe(mergeMap((response) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp) => this.responseProcessor.copyObject(rsp))); + })); + } + /** + * Version: 26.2.0.cl or later Creates a new Spotter agent conversation based on the provided context and settings. The endpoint was in Beta from 26.2.0.cl through 26.4.0.cl. Requires `CAN_USE_SPOTTER` privilege and at least view access to the metadata object specified in the request. #### Usage guidelines The request must include the `metadata_context` parameter to define the conversation context. The context type can be one of: - `DATA_SOURCE` *(available from 26.5.0.cl)*: targets a specific data source. Provide `data_source_identifier` in `data_source_context` for a single data source, or `data_source_identifiers` for multi-data-source context. The deprecated `guid` field is accepted for backwards compatibility. - `AUTO_MODE` *(available from 26.5.0.cl)*: automatically discovers and selects the most relevant datasets for the user\'s queries. > **Note for callers on versions 26.2.0.cl – 26.4.0.cl (Beta):** use the lowercase `data_source` enum value with the `guid` field instead of the above. Example: `{ \"type\": \"data_source\", \"data_source_context\": { \"guid\": \"\" } }`. The `conversation_settings` parameter controls which Spotter capabilities are enabled for the conversation: - `enable_contextual_change_analysis` (default: `true`, **deprecated from 26.2.0.cl**) — always enabled in Spotter 3; setting this to `false` has no effect on versions >= 26.2.0.cl - `enable_natural_language_answer_generation` (default: `true`, **deprecated from 26.2.0.cl**) — always enabled in Spotter 3; setting this to `false` has no effect on versions >= 26.2.0.cl - `enable_reasoning` (default: `true`, **deprecated from 26.2.0.cl**) — always enabled in Spotter 3; setting this to `false` has no effect on versions >= 26.2.0.cl - `enable_save_chat` (default: `false`, *available from 26.5.0.cl*) — enables saving the conversation for later retrieval via conversation history If the request is successful, the response includes a unique `conversation_identifier` that must be passed to `sendAgentConversationMessage` or `sendAgentConversationMessageStreaming` to send messages within this conversation. The response also includes `conversation_id` with the same value for backwards compatibility; use `conversation_identifier` for new integrations. #### Example request ```json { \"metadata_context\": { \"type\": \"DATA_SOURCE\", \"data_source_context\": { \"data_source_identifier\": \"a1b2c3d4-e5f6-7890-abcd-ef1234567890\" } }, \"conversation_settings\": {} } ``` #### Error responses | Code | Description | | ---- | --------------------------------------------------------------------------------------------------------------------------------------- | | 401 | Unauthorized — authentication token is missing, expired, or invalid. | | 403 | Forbidden — the authenticated user does not have `CAN_USE_SPOTTER` privilege or lacks view permission on the specified metadata object. | > ###### Note: > > - This endpoint was in Beta from 26.2.0.cl through 26.4.0.cl and is Generally Available from version 26.5.0.cl. > - This endpoint requires Spotter - please contact ThoughtSpot support to enable Spotter on your cluster. + * @param createAgentConversationRequest + */ + createAgentConversation(createAgentConversationRequest, _options) { + const requestContextPromise = this.requestFactory.createAgentConversation(createAgentConversationRequest, _options); + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx) => middleware.pre(ctx))); + } + return middlewarePreObservable.pipe(mergeMap((ctx) => this.configuration.httpApi.send(ctx))).pipe(mergeMap((response) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp) => this.responseProcessor.createAgentConversation(rsp))); + })); + } + /** + * Version: 10.12.0.cl or later Creates a new [custom calendar](https://docs.thoughtspot.com/cloud/latest/connections-cust-cal). Requires `DATAMANAGEMENT` (**Can manage data**) or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your ThoughtSpot instance, the `CAN_MANAGE_CUSTOM_CALENDAR` (**Can manage custom calendars**) privilege is required. #### Usage guidelines You can create a custom calendar from scratch or an existing Table in ThoughtSpot. For both methods of calendar creation, the following parameters are required: * Name of the custom calendar. * Calendar creation method. To create a calendar from an existing table, specify the method: - `FROM_EXISTING_TABLE` - Creates calendar from the table reference provided in the API request. - `FROM_INPUT_PARAMS` - Creates a calendar from the parameters defined in the API request. * Connection ID and Table name * Database and schema name attributes: For most Cloud Data Warehouse (CDW) connectors, both `database_name` and `schema_name` attributes are required. However, the attribute requirements are conditional and vary based on the connector type and its metadata structure. For example, for connectors such as Teradata, MySQL, SingleSore, Amazon Aurora MySQL, Amazon RDS MySQL, Oracle, and GCP_MYSQL, the `schema_name` is required, whereas the `database_name` attribute is not. Similarly, connectors such as ClickHouse require you to specify the `database_name` and the schema specification in such cases is optional. **NOTE**: If you are creating a calendar from an existing table, ensure that the referenced table matches the required DDL for custom calendars. If the schema does not match, the API returns an error. ##### Calendar type The API allows you to create the following types of calendars: * `MONTH_OFFSET`. The default calendar type. A `MONTH_OFFSET` calendar is offset by a few months from the standard calendar months (January to December) and the year begins with the month defined in the request. For example, if the `month_offset` value is set as `April`, the calendar year begins in April. * `4-4-5`. Each quarter in the calendar will include two 4-week months followed by one 5-week month. * `4-5-4`. Each quarter in the calendar will include two 4-week months with a 5-week month between. * `5-4-4`. Each quarter begins with a 5-week month, followed by two 4-week months. To start and end the calendar on a specific date, specify the dates in the `MM/DD/YYYY` format. For `MONTH_OFFSET` calendars, ensure that the `start_date` matches the month specified in the `month_offset` attribute. You can also set the starting day of the week and customize the prefixes for year and quarter labels. #### Examples To create a calendar from an existing table: ``` { \"name\": \"MyCustomCalendar1\", \"table_reference\": { \"connection_identifier\": \"4db8ea22-2ff4-4224-b05a-26674717e468\", \"table_name\": \"MyCalendarTable\", \"database_name\": \"RETAILAPPAREL\", \"schema_name\": \"PUBLIC\" }, \"creation_method\": \"FROM_EXISTING_TABLE\", } ``` To create a calendar from scratch: ``` { \"name\": \"MyCustomCalendar1\", \"table_reference\": { \"connection_identifier\": \"4db8ea22-2ff4-4224-b05a-26674717e468\", \"table_name\": \"MyCalendarTable\", \"database_name\": \"RETAILAPPAREL\", \"schema_name\": \"PUBLIC\" }, \"creation_method\": \"FROM_INPUT_PARAMS\", \"calendar_type\": \"MONTH_OFFSET\", \"month_offset\": \"April\", \"start_day_of_week\": \"Monday\", \"quarter_name_prefix\": \"Q\", \"year_name_prefix\": \"FY\", \"start_date\": \"04/01/2025\", \"end_date\": \"04/31/2025\" } ``` + * @param createCalendarRequest + */ + createCalendar(createCalendarRequest, _options) { + const requestContextPromise = this.requestFactory.createCalendar(createCalendarRequest, _options); + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx) => middleware.pre(ctx))); + } + return middlewarePreObservable.pipe(mergeMap((ctx) => this.configuration.httpApi.send(ctx))).pipe(mergeMap((response) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp) => this.responseProcessor.createCalendar(rsp))); + })); + } + /** + * Version: 26.4.0.cl or later Creates a new collection in ThoughtSpot. Collections allow you to organize and group related metadata objects such as Liveboards, Answers, worksheets, and other data objects. You can also create nested collections (sub-collections) to build a hierarchical structure. #### Supported operations The API endpoint lets you perform the following operations: * Create a new collection * Add metadata objects (Liveboards, Answers, Logical Tables) to the collection * Create nested collections by adding sub-collections + * @param createCollectionRequest + */ + createCollection(createCollectionRequest, _options) { + const requestContextPromise = this.requestFactory.createCollection(createCollectionRequest, _options); + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx) => middleware.pre(ctx))); + } + return middlewarePreObservable.pipe(mergeMap((ctx) => this.configuration.httpApi.send(ctx))).pipe(mergeMap((response) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp) => this.responseProcessor.createCollection(rsp))); + })); + } + /** + * Version: 9.2.0.cl or later Allows you to connect a ThoughtSpot instance to a Git repository. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance on your instance, the `CAN_SETUP_VERSION_CONTROL` (**Can set up version control**) privilege. You can use this API endpoint to connect your ThoughtSpot development and production environments to the development and production branches of a Git repository. Before using this endpoint to connect your ThoughtSpot instance to a Git repository, check the following prerequisites: * You have a Git repository. If you are using GitHub, make sure you have a valid account and an access token to connect ThoughtSpot to GitHub. For information about generating a token, see [GitHub Documentation](https://docs.github.com/en/authentication/keeping-your-account-and-data-secure/managing-your-personal-access-tokens). * Your access token has `repo` scope that grants full access to public and private repositories. * Your Git repository has a branch that can be configured as a default branch in ThoughtSpot. For more information, see [Git integration documentation](https://developers.thoughtspot.com/docs/?pageid=git-integration). **Note**: ThoughtSpot supports only GitHub / itHub Enterprise for CI/CD. + * @param createConfigRequest + */ + createConfig(createConfigRequest, _options) { + const requestContextPromise = this.requestFactory.createConfig(createConfigRequest, _options); + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx) => middleware.pre(ctx))); + } + return middlewarePreObservable.pipe(mergeMap((ctx) => this.configuration.httpApi.send(ctx))).pipe(mergeMap((response) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp) => this.responseProcessor.createConfig(rsp))); + })); + } + /** + * Version: 9.2.0.cl or later Creates a connection to a data warehouse for live query services. Requires `DATAMANAGEMENT` (**Can manage data**) or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) privilege is required. #### Create a connection without tables To create a connection without tables: 1. Pass these parameters in your API request. * Name of the connection. * Type of the data warehouse to connect to. * A JSON map of configuration attributes in `data_warehouse_config`. The following example shows the configuration attributes for a SnowFlake connection: ``` { \"configuration\":{ \"accountName\":\"thoughtspot_partner\", \"user\":\"tsadmin\", \"password\":\"TestConn123\", \"role\":\"sysadmin\", \"warehouse\":\"MEDIUM_WH\" }, \"authenticationType\": \"SERVICE_ACCOUNT\", \"externalDatabases\":[ ] } ``` 2. Set `validate` to `false`. **NOTE:** If the `authentication_type` is anything other than SERVICE_ACCOUNT, you must explicitly provide the authenticationType property in the payload. If you do not specify authenticationType, the API will default to SERVICE_ACCOUNT as the authentication type. #### Create a connection with tables If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) and `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` (**Can manage data models**) privilege is required. To create a connection with tables: 1. Pass these parameters in your API request. * Name of the connection. * Type of the data warehouse to connect to. * A JSON map of configuration attributes, database details, and table properties in `data_warehouse_config` as shown in the following example: ``` { \"configuration\":{ \"accountName\":\"thoughtspot_partner\", \"user\":\"tsadmin\", \"password\":\"TestConn123\", \"role\":\"sysadmin\", \"warehouse\":\"MEDIUM_WH\" }, \"authenticationType\": \"SERVICE_ACCOUNT\", \"externalDatabases\":[ { \"name\":\"AllDatatypes\", \"isAutoCreated\":false, \"schemas\":[ { \"name\":\"alldatatypes\", \"tables\":[ { \"name\":\"allDatatypes\", \"type\":\"TABLE\", \"description\":\"\", \"selected\":true, \"linked\":true, \"columns\":[ { \"name\":\"CNUMBER\", \"type\":\"INT64\", \"canImport\":true, \"selected\":true, \"isLinkedActive\":true, \"isImported\":false, \"tableName\":\"allDatatypes\", \"schemaName\":\"alldatatypes\", \"dbName\":\"AllDatatypes\" }, { \"name\":\"CDECIMAL\", \"type\":\"INT64\", \"canImport\":true, \"selected\":true, \"isLinkedActive\":true, \"isImported\":false, \"tableName\":\"allDatatypes\", \"schemaName\":\"alldatatypes\", \"dbName\":\"AllDatatypes\" } ] } ] } ] } ] } ``` 2. Set `validate` to `true`. **NOTE:** If the `authentication_type` is anything other than SERVICE_ACCOUNT, you must explicitly provide the authenticationType property in the payload. If you do not specify authenticationType, the API will default to SERVICE_ACCOUNT as the authentication type. + * @param createConnectionRequest + */ + createConnection(createConnectionRequest, _options) { + const requestContextPromise = this.requestFactory.createConnection(createConnectionRequest, _options); + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx) => middleware.pre(ctx))); + } + return middlewarePreObservable.pipe(mergeMap((ctx) => this.configuration.httpApi.send(ctx))).pipe(mergeMap((response) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp) => this.responseProcessor.createConnection(rsp))); + })); + } + /** + * Version: 10.12.0.cl or later Creates an additional configuration to an existing connection to a data warehouse. Requires `DATAMANAGEMENT` (**Can manage data**) or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) privilege is required. #### Usage guidelines * A JSON map of configuration attributes in `configuration`. The following example shows the configuration attributes: ``` { \"user\":\"DEV_USER\", \"password\":\"TestConn123\", \"role\":\"DEV\", \"warehouse\":\"DEV_WH\" } ``` * If the `policy_type` is `PRINCIPALS`, then `policy_principals` is a required field. * If the `policy_type` is `PROCESSES`, then `policy_processes` is a required field. * If the `policy_type` is `NO_POLICY`, then `policy_principals` and `policy_processes` are not required fields. #### Parameterized Connection Support For parameterized connections that use OAuth authentication, only the same_as_parent and policy_process_options attributes are allowed in the API request. These attributes are not applicable to connections that are not parameterized. + * @param createConnectionConfigurationRequest + */ + createConnectionConfiguration(createConnectionConfigurationRequest, _options) { + const requestContextPromise = this.requestFactory.createConnectionConfiguration(createConnectionConfigurationRequest, _options); + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx) => middleware.pre(ctx))); + } + return middlewarePreObservable.pipe(mergeMap((ctx) => this.configuration.httpApi.send(ctx))).pipe(mergeMap((response) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp) => this.responseProcessor.createConnectionConfiguration(rsp))); + })); + } + /** + * Version: 10.4.0.cl or later Creates a new conversation session tied to a specific data model for AI-driven natural language querying. Requires `CAN_USE_SPOTTER` privilege and at least view access to the metadata object specified in the request. #### Usage guidelines The request must include: - `metadata_identifier`: the unique ID of the data source that provides context for the conversation Optionally, you can provide: - `tokens`: a token string to set initial context for the conversation (e.g., `\"[sales],[item type],[state]\"`) If the request is successful, ThoughtSpot returns a unique `conversation_identifier` that must be passed to `sendMessage` to continue the conversation. #### Error responses | Code | Description | |------|-------------| | 401 | Unauthorized — authentication token is missing, expired, or invalid. | | 403 | Forbidden — the authenticated user does not have `CAN_USE_SPOTTER` privilege or lacks view permission on the specified metadata object. | > ###### Note: > * This endpoint is currently in Beta. Breaking changes may be introduced before the endpoint is made Generally Available. > * This endpoint requires Spotter - please contact ThoughtSpot support to enable Spotter on your cluster. + * @param createConversationRequest + */ + createConversation(createConversationRequest, _options) { + const requestContextPromise = this.requestFactory.createConversation(createConversationRequest, _options); + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx) => middleware.pre(ctx))); + } + return middlewarePreObservable.pipe(mergeMap((ctx) => this.configuration.httpApi.send(ctx))).pipe(mergeMap((response) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp) => this.responseProcessor.createConversation(rsp))); + })); + } + /** + * Version: 9.6.0.cl or later Creates a custom action that appears as a menu action on a saved Answer or Liveboard visualization. Requires `DEVELOPER` (**Has Developer privilege**) or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `DEVELOPER` (**Has developer privilege**) privilege is required. #### Usage Guidelines The API lets you create the following types of custom actions: * URL-based action Allows pushing data to an external URL. * Callback action Triggers a callback to the host application and initiates a response payload on an embedded ThoughtSpot instance. By default, custom actions are visible to only administrator or developer users. To make a custom action available to other users, and specify the groups in `group_identifiers`. By default, the custom action is set as a _global_ action on all visualizations and saved Answers. To assign a custom action to specific Liveboard visualization, saved Answer, or Worksheet, set `visibility` to `false` in `default_action_config` property and specify the GUID or name of the object in `associate_metadata`. For more information, see [Custom actions](https://developers.thoughtspot.com/docs/custom-action-intro). + * @param createCustomActionRequest + */ + createCustomAction(createCustomActionRequest, _options) { + const requestContextPromise = this.requestFactory.createCustomAction(createCustomActionRequest, _options); + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx) => middleware.pre(ctx))); + } + return middlewarePreObservable.pipe(mergeMap((ctx) => this.configuration.httpApi.send(ctx))).pipe(mergeMap((response) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp) => this.responseProcessor.createCustomAction(rsp))); + })); + } + /** + * Version: 10.10.0.cl or later Creates a customization configuration for the notification email. #### Pre-requisites Requires `DEVELOPER` (**has developer privilege**) or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `DEVELOPER` (**Has developer privilege**) privilege is required. **NOTE**:This endpoint in currently in beta. Contact ThoughtSpot support to enable this on your instance. #### Usage guidelines To create a custom configuration pass these parameters in your API request: - A JSON map of configuration attributes `template_properties`. The following example shows a sample set of customization configuration: ``` { { \"cta_button_bg_color\": \"#444DEA\", \"cta_text_font_color\": \"#FFFFFF\", \"primary_bg_color\": \"#D3DEF0\", \"logo_url\": \"https://storage.pardot.com/710713/1642089901EbkRibJq/TS_fullworkmark_darkmode.png\", \"font_family\": \"\", \"product_name\": \"ThoughtSpot\", \"footer_address\": \"444 Castro St, Suite 1000 Mountain View, CA 94041\", \"footer_phone\": \"(800) 508-7008\", \"replacement_value_for_liveboard\": \"Dashboard\", \"replacement_value_for_answer\": \"Chart\", \"replacement_value_for_spot_iq\": \"AI Insights\", \"hide_footer_phone\": false, \"hide_footer_address\": false, \"hide_product_name\": false, \"hide_manage_notification\": false, \"hide_mobile_app_nudge\": false, \"hide_privacy_policy\": false, \"hide_ts_vocabulary_definitions\": false, \"hide_error_message\": false, \"hide_unsubscribe_link\": false, \"hide_notification_status\": false, \"hide_modify_alert\": false, \"company_website_url\": \"https://your-website.com/\", \"company_privacy_policy_url\" : \"https://link-to-privacy-policy.com/\", \"contact_support_url\": \"https://link-to-contact-support.com/\", \"hide_contact_support_url\": false, \"hide_logo_url\" : false } } ``` + * @param createEmailCustomizationRequest + */ + createEmailCustomization(createEmailCustomizationRequest, _options) { + const requestContextPromise = this.requestFactory.createEmailCustomization(createEmailCustomizationRequest, _options); + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx) => middleware.pre(ctx))); + } + return middlewarePreObservable.pipe(mergeMap((ctx) => this.configuration.httpApi.send(ctx))).pipe(mergeMap((response) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp) => this.responseProcessor.createEmailCustomization(rsp))); + })); + } + /** + * Version: 9.0.0.cl or later Creates an Org object. To use this API, the [Orgs](https://docs.thoughtspot.com/cloud/latest/orgs-overview) feature must be enabled in your cluster. Requires cluster administration (**Can administer Org**) privileges. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `ORG_ADMINISTRATION` (**Can manage Orgs**) privilege is required. + * @param createOrgRequest + */ + createOrg(createOrgRequest, _options) { + const requestContextPromise = this.requestFactory.createOrg(createOrgRequest, _options); + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx) => middleware.pre(ctx))); + } + return middlewarePreObservable.pipe(mergeMap((ctx) => this.configuration.httpApi.send(ctx))).pipe(mergeMap((response) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp) => this.responseProcessor.createOrg(rsp))); + })); + } + /** + * Version: 9.5.0.cl or later Creates a Role object in ThoughtSpot. Available only if [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance. To create a Role, the `ROLE_ADMINISTRATION` (**Can manage roles**) privilege is required. + * @param createRoleRequest + */ + createRole(createRoleRequest, _options) { + const requestContextPromise = this.requestFactory.createRole(createRoleRequest, _options); + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx) => middleware.pre(ctx))); + } + return middlewarePreObservable.pipe(mergeMap((ctx) => this.configuration.httpApi.send(ctx))).pipe(mergeMap((response) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp) => this.responseProcessor.createRole(rsp))); + })); + } + /** + * Create schedule. Version: 9.4.0.cl or later Creates a Liveboard schedule job. Requires at least edit access to Liveboards. To create a schedule on behalf of another user, you need `ADMINISTRATION` (**Can administer Org**) or `JOBSCHEDULING` (**Can schedule for others**) privilege and edit access to the Liveboard. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `JOBSCHEDULING` (**Can schedule for others**) privilege is required. #### Usage guidelines * The description text is mandatory. The description text appears as **Description: ** in the Liveboard schedule email notifications. * For Liveboards with both charts and tables, schedule creation is only supported in PDF and XLS formats. Schedules created in CSV formats for such Liveboards will fail to run. If `PDF` is set as the `file_format`, enable `pdf_options` to get the correct attachment. Not doing so may cause the attachment to be rendered empty. * To include only specific visualizations, specify the visualization GUIDs in the `visualization_identifiers` array. * You can schedule a Liveboard job to run periodically by setting frequency parameters. You can set the schedule to run daily, weekly, monthly or every n minutes or hours. The scheduled job can also be configured to run at a specific time of the day or on specific days of the week or month. Please ensure that when setting the schedule frequency for _minute of the object_, only values that are multiples of 5 are included. * If the `frequency` parameters are defined, you can set the time zone to a value that matches your server\'s time zone. For example, `US/Central`, `Etc/UTC`, `CET`. The default time zone is `America/Los_Angeles`. For more information about Liveboard jobs, see [ThoughtSpot Product Documentation](https://docs.thoughtspot.com/cloud/latest/liveboard-schedule). + * @param createScheduleRequest + */ + createSchedule(createScheduleRequest, _options) { + const requestContextPromise = this.requestFactory.createSchedule(createScheduleRequest, _options); + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx) => middleware.pre(ctx))); + } + return middlewarePreObservable.pipe(mergeMap((ctx) => this.configuration.httpApi.send(ctx))).pipe(mergeMap((response) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp) => this.responseProcessor.createSchedule(rsp))); + })); + } + /** + * Version: 9.0.0.cl or later Creates a tag object. Tags are labels that identify a metadata object. For example, you can create a tag to designate subject areas, such as sales, HR, marketing, and finance. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `TAGMANAGEMENT` (**Can manage tags**) privilege is required to create, edit, and delete tags. + * @param createTagRequest + */ + createTag(createTagRequest, _options) { + const requestContextPromise = this.requestFactory.createTag(createTagRequest, _options); + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx) => middleware.pre(ctx))); + } + return middlewarePreObservable.pipe(mergeMap((ctx) => this.configuration.httpApi.send(ctx))).pipe(mergeMap((response) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp) => this.responseProcessor.createTag(rsp))); + })); + } + /** + * Version: 9.0.0.cl or later Creates a user in ThoughtSpot. The API endpoint allows you to configure several user properties such as email address, account status, share notification preferences, and sharing visibility. You can provision the user to [groups](https://docs.thoughtspot.com/cloud/latest/groups-privileges) and [Orgs](https://docs.thoughtspot.com/cloud/latest/orgs-overview). You can also add Liveboard, Answer, and Worksheet objects to the user’s favorites list, assign a default Liveboard for the user, and set user preferences. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `USER_ADMINISTRATION` (**Can manage users**) privilege is required. + * @param createUserRequest + */ + createUser(createUserRequest, _options) { + const requestContextPromise = this.requestFactory.createUser(createUserRequest, _options); + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx) => middleware.pre(ctx))); + } + return middlewarePreObservable.pipe(mergeMap((ctx) => this.configuration.httpApi.send(ctx))).pipe(mergeMap((response) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp) => this.responseProcessor.createUser(rsp))); + })); + } + /** + * Version: 9.0.0.cl or later Creates a group object in ThoughtSpot. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `GROUP_ADMINISTRATION` (**Can manage groups**) privilege is required. #### About groups Groups in ThoughtSpot are used by the administrators to define privileges and organize users based on their roles and access requirements. To know more about groups and privileges, see [ThoughtSpot Product Documentation](https://docs.thoughtspot.com/cloud/latest/groups-privileges). #### Supported operations The API endpoint lets you perform the following operations: * Assign privileges * Add users * Define sharing visibility * Add sub-groups * Assign a default Liveboard + * @param createUserGroupRequest + */ + createUserGroup(createUserGroupRequest, _options) { + const requestContextPromise = this.requestFactory.createUserGroup(createUserGroupRequest, _options); + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx) => middleware.pre(ctx))); + } + return middlewarePreObservable.pipe(mergeMap((ctx) => this.configuration.httpApi.send(ctx))).pipe(mergeMap((response) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp) => this.responseProcessor.createUserGroup(rsp))); + })); + } + /** + * Create a variable which can be used for parameterizing metadata objects Version: 26.4.0.cl or later Allows creating a variable which can be used for parameterizing metadata objects in ThoughtSpot. Requires ADMINISTRATION role and TENANT scope. The CAN_MANAGE_VARIABLES permission allows you to manage Formula Variables in the current organization scope. The API endpoint supports the following types of variables: * CONNECTION_PROPERTY - For connection properties * TABLE_MAPPING - For table mappings * CONNECTION_PROPERTY_PER_PRINCIPAL - For connection properties per principal. In order to use this please contact support to enable this. * FORMULA_VARIABLE - For Formula variables, introduced in 10.15.0.cl When creating a variable, you need to specify: * The variable type * A unique name for the variable * Whether the variable contains sensitive values (defaults to false) * The data type of the variable, only specify for formula variables (defaults to null) The operation will fail if: * The user lacks required permissions * The variable name already exists * The variable type is invalid + * @param createVariableRequest + */ + createVariable(createVariableRequest, _options) { + const requestContextPromise = this.requestFactory.createVariable(createVariableRequest, _options); + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx) => middleware.pre(ctx))); + } + return middlewarePreObservable.pipe(mergeMap((ctx) => this.configuration.httpApi.send(ctx))).pipe(mergeMap((response) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp) => this.responseProcessor.createVariable(rsp))); + })); + } + /** + * Version: 10.14.0.cl or later Creates a new webhook configuration to receive notifications for specified events. The webhook will be triggered when the configured events occur in the system. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) or `DEVELOPER` (**Has developer privilege**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, users with `CAN_MANAGE_WEBHOOKS` (**Can manage webhooks**) privilege are also authorized to perform this action. + * @param createWebhookConfigurationRequest + */ + createWebhookConfiguration(createWebhookConfigurationRequest, _options) { + const requestContextPromise = this.requestFactory.createWebhookConfiguration(createWebhookConfigurationRequest, _options); + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx) => middleware.pre(ctx))); + } + return middlewarePreObservable.pipe(mergeMap((ctx) => this.configuration.httpApi.send(ctx))).pipe(mergeMap((response) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp) => this.responseProcessor.createWebhookConfiguration(rsp))); + })); + } + /** + * Version: 9.9.0.cl or later Creates a DBT connection object in ThoughtSpot. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege or `DATAMANAGEMENT` (**Can manage data**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the following Data control privileges may be required: - `CAN_MANAGE_CUSTOM_CALENDAR`(**Can manage custom calendars**) - `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) - `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` (**Can manage data models**) #### About create DBT connection DBT connection in ThoughtSpot is used by the user to define DBT credentials for cloud . The API needs embrace connection, embrace database name, DBT url, import type, DBT account identifier, DBT project identifier, DBT access token and environment details (or) embrace connection, embrace database name, import type, file_content to create a connection object. To know more about DBT, see ThoughtSpot Product Documentation. + * @param connectionName Name of the connection. + * @param databaseName Name of the Database. + * @param importType Mention type of Import + * @param accessToken Access token is mandatory when Import_Type is DBT_CLOUD. + * @param dbtUrl DBT URL is mandatory when Import_Type is DBT_CLOUD. + * @param accountId Account ID is mandatory when Import_Type is DBT_CLOUD + * @param projectId Project ID is mandatory when Import_Type is DBT_CLOUD + * @param dbtEnvId DBT Environment ID\\\" + * @param projectName Name of the project + * @param fileContent Upload DBT Manifest and Catalog artifact files as a ZIP file. This field is Mandatory when Import Type is \\\'ZIP_FILE\\\' + */ + dbtConnection(connectionName, databaseName, importType, accessToken, dbtUrl, accountId, projectId, dbtEnvId, projectName, fileContent, _options) { + const requestContextPromise = this.requestFactory.dbtConnection(connectionName, databaseName, importType, accessToken, dbtUrl, accountId, projectId, dbtEnvId, projectName, fileContent, _options); + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx) => middleware.pre(ctx))); + } + return middlewarePreObservable.pipe(mergeMap((ctx) => this.configuration.httpApi.send(ctx))).pipe(mergeMap((response) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp) => this.responseProcessor.dbtConnection(rsp))); + })); + } + /** + * Version: 9.9.0.cl or later Resynchronize the existing list of models, tables, worksheet tml’s and import them to Thoughtspot based on the DBT connection object. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege or `DATAMANAGEMENT` (**Can manage data**) privilege, along with an existing DBT connection. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the following data control privileges may be required: - `CAN_MANAGE_CUSTOM_CALENDAR`(**Can manage custom calendars**) - `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) - `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` (**Can manage data models**) + * @param dbtConnectionIdentifier Unique ID of the DBT connection. + * @param fileContent Upload DBT Manifest and Catalog artifact files as a ZIP file. This field is mandatory if the connection was created with import_type ‘ZIP_FILE’ + */ + dbtGenerateSyncTml(dbtConnectionIdentifier, fileContent, _options) { + const requestContextPromise = this.requestFactory.dbtGenerateSyncTml(dbtConnectionIdentifier, fileContent, _options); + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx) => middleware.pre(ctx))); + } + return middlewarePreObservable.pipe(mergeMap((ctx) => this.configuration.httpApi.send(ctx))).pipe(mergeMap((response) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp) => this.responseProcessor.dbtGenerateSyncTml(rsp))); + })); + } + /** + * Version: 9.9.0.cl or later Generate required table and worksheet and import them. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege or `DATAMANAGEMENT` (**Can manage data**) privilege, along with an existing DBT connection. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the following data control privileges may be required: - `CAN_MANAGE_CUSTOM_CALENDAR`(**Can manage custom calendars**) - `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) - `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` (**Can manage data models**) #### About generate TML Models and Worksheets to be imported can be selected by the user as part of the API. + * @param dbtConnectionIdentifier Unique ID of the DBT connection. + * @param modelTables List of Models and their respective Tables Example: \\\'[{\\\"model_name\\\": \\\"model_name\\\", \\\"tables\\\": [\\\"table_name\\\"]}]\\\' + * @param importWorksheets Mention the worksheet tmls to import + * @param worksheets List of worksheets is mandatory when import_Worksheets is type SELECTED Example: [\\\"worksheet_name\\\"] + * @param fileContent Upload DBT Manifest and Catalog artifact files as a ZIP file. This field is mandatory if the connection was created with import_type ‘ZIP_FILE’ + */ + dbtGenerateTml(dbtConnectionIdentifier, modelTables, importWorksheets, worksheets, fileContent, _options) { + const requestContextPromise = this.requestFactory.dbtGenerateTml(dbtConnectionIdentifier, modelTables, importWorksheets, worksheets, fileContent, _options); + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx) => middleware.pre(ctx))); + } + return middlewarePreObservable.pipe(mergeMap((ctx) => this.configuration.httpApi.send(ctx))).pipe(mergeMap((response) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp) => this.responseProcessor.dbtGenerateTml(rsp))); + })); + } + /** + * Version: 9.9.0.cl or later Gets a list of DBT connection objects by user and organization, available on the ThoughtSpot system. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege or `DATAMANAGEMENT` (**Can manage data**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the following Data control privileges may be required: - `CAN_MANAGE_CUSTOM_CALENDAR`(**Can manage custom calendars**) - `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) - `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` (**Can manage data models**) #### About search DBT connection To get details of a specific DBT connection identifier, database connection identifier, database connection name, database name, project name, project identifier, environment identifier , import type and author. + */ + dbtSearch(_options) { + const requestContextPromise = this.requestFactory.dbtSearch(_options); + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx) => middleware.pre(ctx))); + } + return middlewarePreObservable.pipe(mergeMap((ctx) => this.configuration.httpApi.send(ctx))).pipe(mergeMap((response) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp) => this.responseProcessor.dbtSearch(rsp))); + })); + } + /** + * Version: 9.7.0.cl or later Deactivates a user account. Requires `ADMINISTRATION` (**Can administer Thoughtspot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `USER_ADMINISTRATION` (**Can manage users**) privilege is required. To deactivate a user account, the API request body must include the following information: - Username or the GUID of the user account - Base URL of the ThoughtSpot instance If the API request is successful, ThoughtSpot returns the activation URL in the response. The activation URL is valid for 14 days and can be used to re-activate the account and reset the password of the deactivated account. + * @param deactivateUserRequest + */ + deactivateUser(deactivateUserRequest, _options) { + const requestContextPromise = this.requestFactory.deactivateUser(deactivateUserRequest, _options); + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx) => middleware.pre(ctx))); + } + return middlewarePreObservable.pipe(mergeMap((ctx) => this.configuration.httpApi.send(ctx))).pipe(mergeMap((response) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp) => this.responseProcessor.deactivateUser(rsp))); + })); + } + /** + * Version: 10.12.0.cl or later Deletes a [custom calendar](https://docs.thoughtspot.com/cloud/latest/connections-cust-cal). Requires `DATAMANAGEMENT` (**Can manage data**) or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your ThoughtSpot instance, the `CAN_MANAGE_CUSTOM_CALENDAR` (**Can manage custom calendars**) privilege is required. #### Usage guidelines To delete a custom calendar, specify the calendar ID as a path parameter in the request URL. + * @param calendarIdentifier Unique ID or name of the Calendar. + */ + deleteCalendar(calendarIdentifier, _options) { + const requestContextPromise = this.requestFactory.deleteCalendar(calendarIdentifier, _options); + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx) => middleware.pre(ctx))); + } + return middlewarePreObservable.pipe(mergeMap((ctx) => this.configuration.httpApi.send(ctx))).pipe(mergeMap((response) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp) => this.responseProcessor.deleteCalendar(rsp))); + })); + } + /** + * Version: 26.4.0.cl or later Deletes one or more collections from ThoughtSpot. #### Delete options * **delete_children**: When set to `true`, deletes the child objects (metadata items) within the collection that the user has access to. Objects that the user does not have permission to delete will be skipped. * **dry_run**: When set to `true`, performs a preview of the deletion operation without actually deleting anything. The response shows what would be deleted, allowing you to review before committing the deletion. #### Response The response includes: * **metadata_deleted**: List of metadata objects that were successfully deleted * **metadata_skipped**: List of metadata objects that were skipped due to lack of permissions or other constraints + * @param deleteCollectionRequest + */ + deleteCollection(deleteCollectionRequest, _options) { + const requestContextPromise = this.requestFactory.deleteCollection(deleteCollectionRequest, _options); + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx) => middleware.pre(ctx))); + } + return middlewarePreObservable.pipe(mergeMap((ctx) => this.configuration.httpApi.send(ctx))).pipe(mergeMap((response) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp) => this.responseProcessor.deleteCollection(rsp))); + })); + } + /** + * Version: 9.2.0.cl or later Deletes Git repository configuration from your ThoughtSpot instance. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance on your instance, the `CAN_SETUP_VERSION_CONTROL` (**Can set up version control**) privilege. + * @param deleteConfigRequest + */ + deleteConfig(deleteConfigRequest, _options) { + const requestContextPromise = this.requestFactory.deleteConfig(deleteConfigRequest, _options); + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx) => middleware.pre(ctx))); + } + return middlewarePreObservable.pipe(mergeMap((ctx) => this.configuration.httpApi.send(ctx))).pipe(mergeMap((response) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp) => this.responseProcessor.deleteConfig(rsp))); + })); + } + /** + * Version: 9.2.0.cl or later **Important**: This endpoint is deprecated and will be removed from ThoughtSpot in September 2025. ThoughtSpot strongly recommends using the [Delete Connection V2](#/http/api-endpoints/connections/delete-connection-v2) endpoint to delete your connection objects. #### Usage guidelines Deletes a connection object. Requires `DATAMANAGEMENT` (**Can manage data**) and edit permissions to the connection object, or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) privilege is required. **Note**: If a connection has dependent objects, make sure you remove its associations before the delete operation. + * @param deleteConnectionRequest + */ + deleteConnection(deleteConnectionRequest, _options) { + const requestContextPromise = this.requestFactory.deleteConnection(deleteConnectionRequest, _options); + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx) => middleware.pre(ctx))); + } + return middlewarePreObservable.pipe(mergeMap((ctx) => this.configuration.httpApi.send(ctx))).pipe(mergeMap((response) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp) => this.responseProcessor.deleteConnection(rsp))); + })); + } + /** + * Version: 10.12.0.cl or later Deletes connection configuration objects. Requires `DATAMANAGEMENT` (**Can manage data**) and edit permissions to the connection object, or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) privilege is required. + * @param deleteConnectionConfigurationRequest + */ + deleteConnectionConfiguration(deleteConnectionConfigurationRequest, _options) { + const requestContextPromise = this.requestFactory.deleteConnectionConfiguration(deleteConnectionConfigurationRequest, _options); + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx) => middleware.pre(ctx))); + } + return middlewarePreObservable.pipe(mergeMap((ctx) => this.configuration.httpApi.send(ctx))).pipe(mergeMap((response) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp) => this.responseProcessor.deleteConnectionConfiguration(rsp))); + })); + } + /** + * Version: 10.4.0.cl or later Deletes a connection object. **Note**: If a connection has dependent objects, make sure you remove its associations before the delete operation. Requires `DATAMANAGEMENT` (**Can manage data**) and edit permissions to the connection object, or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) privilege is required. + * @param connectionIdentifier Unique ID or name of the connection. + */ + deleteConnectionV2(connectionIdentifier, _options) { + const requestContextPromise = this.requestFactory.deleteConnectionV2(connectionIdentifier, _options); + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx) => middleware.pre(ctx))); + } + return middlewarePreObservable.pipe(mergeMap((ctx) => this.configuration.httpApi.send(ctx))).pipe(mergeMap((response) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp) => this.responseProcessor.deleteConnectionV2(rsp))); + })); + } + /** + * Version: 9.6.0.cl or later Removes the custom action specified in the API request. Requires `DEVELOPER` (**Has Developer privilege**) or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `DEVELOPER` (**Has developer privilege**) privilege is required. + * @param customActionIdentifier Unique ID or name of the custom action. + */ + deleteCustomAction(customActionIdentifier, _options) { + const requestContextPromise = this.requestFactory.deleteCustomAction(customActionIdentifier, _options); + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx) => middleware.pre(ctx))); + } + return middlewarePreObservable.pipe(mergeMap((ctx) => this.configuration.httpApi.send(ctx))).pipe(mergeMap((response) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp) => this.responseProcessor.deleteCustomAction(rsp))); + })); + } + /** + * Version: 9.9.0.cl or later Removes the specified DBT connection object from the ThoughtSpot system. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) or `DATAMANAGEMENT` (**Can manage data ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the following Data control privileges may be required: - `CAN_MANAGE_CUSTOM_CALENDAR`(**Can manage custom calendars**) - `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) - `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` (**Can manage data models**) + * @param dbtConnectionIdentifier Unique ID of the DBT Connection. + */ + deleteDbtConnection(dbtConnectionIdentifier, _options) { + const requestContextPromise = this.requestFactory.deleteDbtConnection(dbtConnectionIdentifier, _options); + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx) => middleware.pre(ctx))); + } + return middlewarePreObservable.pipe(mergeMap((ctx) => this.configuration.httpApi.send(ctx))).pipe(mergeMap((response) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp) => this.responseProcessor.deleteDbtConnection(rsp))); + })); + } + /** + * Version: 10.10.0.cl or later Deletes the configuration for the email customization. #### Pre-requisites Requires `DEVELOPER` (**has developer privilege**) or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `DEVELOPER` (**Has developer privilege**) privilege is required. **NOTE**:This endpoint in currently in beta. Contact ThoughtSpot support to enable this on your instance. #### Usage guidelines - Call the search API endpoint to get the `template_identifier` from the response. - Use that `template_identifier` as a parameter in this API request. + * @param templateIdentifier Unique ID or name of the email customization. + */ + deleteEmailCustomization(templateIdentifier, _options) { + const requestContextPromise = this.requestFactory.deleteEmailCustomization(templateIdentifier, _options); + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx) => middleware.pre(ctx))); + } + return middlewarePreObservable.pipe(mergeMap((ctx) => this.configuration.httpApi.send(ctx))).pipe(mergeMap((response) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp) => this.responseProcessor.deleteEmailCustomization(rsp))); + })); + } + /** + * Version: 9.0.0.cl or later Removes the specified metadata object from the ThoughtSpot system. Requires edit access to the metadata object. + * @param deleteMetadataRequest + */ + deleteMetadata(deleteMetadataRequest, _options) { + const requestContextPromise = this.requestFactory.deleteMetadata(deleteMetadataRequest, _options); + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx) => middleware.pre(ctx))); + } + return middlewarePreObservable.pipe(mergeMap((ctx) => this.configuration.httpApi.send(ctx))).pipe(mergeMap((response) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp) => this.responseProcessor.deleteMetadata(rsp))); + })); + } + /** + * Version: 9.0.0.cl or later Deletes an Org object from the ThoughtSpot system. Requires cluster administration (**Can administer Org**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `ORG_ADMINISTRATION` (**Can manage Orgs**) privilege is required. When you delete an Org, all its users and objects created in that Org context are removed. However, if the users in the deleted Org also exists in other Orgs, they are removed only from the deleted Org. + * @param orgIdentifier ID or name of the Org + */ + deleteOrg(orgIdentifier, _options) { + const requestContextPromise = this.requestFactory.deleteOrg(orgIdentifier, _options); + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx) => middleware.pre(ctx))); + } + return middlewarePreObservable.pipe(mergeMap((ctx) => this.configuration.httpApi.send(ctx))).pipe(mergeMap((response) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp) => this.responseProcessor.deleteOrg(rsp))); + })); + } + /** + * Version: 10.12.0.cl or later Deletes the configuration for the email customization. #### Pre-requisites Requires `DEVELOPER` (**has developer privilege**) or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `DEVELOPER` (**Has developer privilege**) privilege is required. **NOTE**:This endpoint in currently in beta. Contact ThoughtSpot support to enable this on your instance. #### Usage guidelines - Call the search API endpoint to get the `org_identifier` from the response. - Use that `org_identifier` as a parameter in this API request. + * @param deleteOrgEmailCustomizationRequest + */ + deleteOrgEmailCustomization(deleteOrgEmailCustomizationRequest, _options) { + const requestContextPromise = this.requestFactory.deleteOrgEmailCustomization(deleteOrgEmailCustomizationRequest, _options); + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx) => middleware.pre(ctx))); + } + return middlewarePreObservable.pipe(mergeMap((ctx) => this.configuration.httpApi.send(ctx))).pipe(mergeMap((response) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp) => this.responseProcessor.deleteOrgEmailCustomization(rsp))); + })); + } + /** + * Version: 9.5.0.cl or later Deletes a Role object from the ThoughtSpot system. Available only if [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance. To delete a Role, the `ROLE_ADMINISTRATION` (**Can manage roles**) privilege is required. + * @param roleIdentifier Unique ID or name of the Role. ReadOnly roles cannot be deleted. + */ + deleteRole(roleIdentifier, _options) { + const requestContextPromise = this.requestFactory.deleteRole(roleIdentifier, _options); + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx) => middleware.pre(ctx))); + } + return middlewarePreObservable.pipe(mergeMap((ctx) => this.configuration.httpApi.send(ctx))).pipe(mergeMap((response) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp) => this.responseProcessor.deleteRole(rsp))); + })); + } + /** + * Deletes a scheduled job. Version: 9.4.0.cl or later Deletes a scheduled Liveboard job. Requires at least edit access to Liveboard or `ADMINISTRATION` (**Can administer Org**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `JOBSCHEDULING` (**Can schedule for others**) privilege is required. + * @param scheduleIdentifier Unique ID or name of the scheduled job. + */ + deleteSchedule(scheduleIdentifier, _options) { + const requestContextPromise = this.requestFactory.deleteSchedule(scheduleIdentifier, _options); + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx) => middleware.pre(ctx))); + } + return middlewarePreObservable.pipe(mergeMap((ctx) => this.configuration.httpApi.send(ctx))).pipe(mergeMap((response) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp) => this.responseProcessor.deleteSchedule(rsp))); + })); + } + /** + * Version: 9.0.0.cl or later Deletes a tag object from the ThoughtSpot system Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `TAGMANAGEMENT` (**Can manage tags**) privilege is required to create, edit, and delete tags. + * @param tagIdentifier Tag identifier Tag name or Tag id. + */ + deleteTag(tagIdentifier, _options) { + const requestContextPromise = this.requestFactory.deleteTag(tagIdentifier, _options); + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx) => middleware.pre(ctx))); + } + return middlewarePreObservable.pipe(mergeMap((ctx) => this.configuration.httpApi.send(ctx))).pipe(mergeMap((response) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp) => this.responseProcessor.deleteTag(rsp))); + })); + } + /** + * Version: 9.0.0.cl or later Deletes a user from the ThoughtSpot system. If you want to remove a user from a specific Org but not from ThoughtSpot, update the group and Org mapping properties of the user object via a POST API call to the [/api/rest/2.0/users/{user_identifier}/update](#/http/api-endpoints/users/update-user) endpoint. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `USER_ADMINISTRATION` (**Can manage users**) privilege is required. + * @param userIdentifier GUID / name of the user + */ + deleteUser(userIdentifier, _options) { + const requestContextPromise = this.requestFactory.deleteUser(userIdentifier, _options); + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx) => middleware.pre(ctx))); + } + return middlewarePreObservable.pipe(mergeMap((ctx) => this.configuration.httpApi.send(ctx))).pipe(mergeMap((response) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp) => this.responseProcessor.deleteUser(rsp))); + })); + } + /** + * Version: 9.0.0.cl or later Removes the specified group object from the ThoughtSpot system. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `GROUP_ADMINISTRATION` (**Can manage groups**) privilege is required. + * @param groupIdentifier GUID or name of the group. + */ + deleteUserGroup(groupIdentifier, _options) { + const requestContextPromise = this.requestFactory.deleteUserGroup(groupIdentifier, _options); + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx) => middleware.pre(ctx))); + } + return middlewarePreObservable.pipe(mergeMap((ctx) => this.configuration.httpApi.send(ctx))).pipe(mergeMap((response) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp) => this.responseProcessor.deleteUserGroup(rsp))); + })); + } + /** + * Delete a variable Version: 10.14.0.cl or later **Note:** This API endpoint is deprecated and will be removed from ThoughtSpot in a future release. Use [POST /api/rest/2.0/template/variables/delete](/api/rest/2.0/template/variables/delete) instead. Allows deleting a variable from ThoughtSpot. Requires ADMINISTRATION role and TENANT scope. The CAN_MANAGE_VARIABLES permission allows you to manage Formula Variables in the current organization scope. The API endpoint requires: * The variable identifier (ID or name) The operation will fail if: * The user lacks required permissions * The variable doesn\'t exist * The variable is being used by other objects + * @param identifier Unique id or name of the variable + */ + deleteVariable(identifier, _options) { + const requestContextPromise = this.requestFactory.deleteVariable(identifier, _options); + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx) => middleware.pre(ctx))); + } + return middlewarePreObservable.pipe(mergeMap((ctx) => this.configuration.httpApi.send(ctx))).pipe(mergeMap((response) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp) => this.responseProcessor.deleteVariable(rsp))); + })); + } + /** + * Delete variable(s) Version: 26.4.0.cl or later Allows deleting multiple variables from ThoughtSpot. Requires ADMINISTRATION role and TENANT scope. The CAN_MANAGE_VARIABLES permission allows you to manage Formula Variables in the current organization scope. The API endpoint requires: * The variable identifiers (IDs or names) The operation will fail if: * The user lacks required permissions * Any of the variables don\'t exist * Any of the variables are being used by other objects + * @param deleteVariablesRequest + */ + deleteVariables(deleteVariablesRequest, _options) { + const requestContextPromise = this.requestFactory.deleteVariables(deleteVariablesRequest, _options); + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx) => middleware.pre(ctx))); + } + return middlewarePreObservable.pipe(mergeMap((ctx) => this.configuration.httpApi.send(ctx))).pipe(mergeMap((response) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp) => this.responseProcessor.deleteVariables(rsp))); + })); + } + /** + * Version: 10.14.0.cl or later Deletes one or more webhook configurations by their unique id or name. Returns status of each deletion operation, including successfully deleted webhooks and any failures with error details. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) or `DEVELOPER` (**Has developer privilege**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, users with `CAN_MANAGE_WEBHOOKS` (**Can manage webhooks**) privilege are also authorized to perform this action. + * @param deleteWebhookConfigurationsRequest + */ + deleteWebhookConfigurations(deleteWebhookConfigurationsRequest, _options) { + const requestContextPromise = this.requestFactory.deleteWebhookConfigurations(deleteWebhookConfigurationsRequest, _options); + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx) => middleware.pre(ctx))); + } + return middlewarePreObservable.pipe(mergeMap((ctx) => this.configuration.httpApi.send(ctx))).pipe(mergeMap((response) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp) => this.responseProcessor.deleteWebhookConfigurations(rsp))); + })); + } + /** + * Version: 9.2.0.cl or later Allows you to deploy a commit and publish TML content to your ThoughtSpot instance. Requires at least edit access to the objects used in the deploy operation. The API deploys the head of the branch unless a `commit_id` is specified in the API request. If the branch name is not defined in the request, the default branch is considered for deploying commits. For more information, see [Git integration documentation](https://developers.thoughtspot.com/docs/git-integration). + * @param deployCommitRequest + */ + deployCommit(deployCommitRequest, _options) { + const requestContextPromise = this.requestFactory.deployCommit(deployCommitRequest, _options); + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx) => middleware.pre(ctx))); + } + return middlewarePreObservable.pipe(mergeMap((ctx) => this.configuration.httpApi.send(ctx))).pipe(mergeMap((response) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp) => this.responseProcessor.deployCommit(rsp))); + })); + } + /** + * Version: 9.9.0.cl or later Exports the difference in connection metadata between CDW and ThoughtSpot Requires `DATAMANAGEMENT` (**Can manage data**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the following Data control privileges may be required: - `CAN_MANAGE_CUSTOM_CALENDAR`(**Can manage custom calendars**) - `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) - `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` (**Can manage data models**) To download the connection metadata difference between ThoughtSpot and CDW, pass the connection GUID as `connection_identifier` in the API request. + * @param connectionIdentifier GUID of the connection + */ + downloadConnectionMetadataChanges(connectionIdentifier, _options) { + const requestContextPromise = this.requestFactory.downloadConnectionMetadataChanges(connectionIdentifier, _options); + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx) => middleware.pre(ctx))); + } + return middlewarePreObservable.pipe(mergeMap((ctx) => this.configuration.httpApi.send(ctx))).pipe(mergeMap((response) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp) => this.responseProcessor.downloadConnectionMetadataChanges(rsp))); + })); + } + /** + * Version: 9.0.0.cl or later Exports an Answer in the given file format. You can download the Answer data as a PDF, PNG, CSV, or XLSX file. Requires at least view access to the Answer. #### Usage guidelines In the request body, specify the GUID or name of the Answer and set `file_format`. The default file format is CSV. Use the `type` parameter to specify whether the Answer being exported is a saved Answer (`SAVED`) or a pinned Answer on a Liveboard (`PINNED`). Defaults to `SAVED`. When using `PINNED`, the `metadata_identifier` must be the container id. **NOTE**: * The downloadable file returned in API response file is extensionless. Please rename the downloaded file by typing in the relevant extension. * HTML rendering is not supported for PDF exports of Answers with tables. Optionally, you can define [runtime overrides](https://developers.thoughtspot.com/docs/fetch-data-and-report-apis#_runtime_overrides) to apply to the Answer data. + * @param exportAnswerReportRequest + */ + exportAnswerReport(exportAnswerReportRequest, _options) { + const requestContextPromise = this.requestFactory.exportAnswerReport(exportAnswerReportRequest, _options); + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx) => middleware.pre(ctx))); + } + return middlewarePreObservable.pipe(mergeMap((ctx) => this.configuration.httpApi.send(ctx))).pipe(mergeMap((response) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp) => this.responseProcessor.exportAnswerReport(rsp))); + })); + } + /** + * Version: 9.0.0.cl or later Exports a Liveboard and its visualizations in PDF, PNG, CSV, or XLSX file format. The default `file_format` is CSV. Requires at least view access to the Liveboard. #### Usage guidelines In the request body, specify the GUID or name of the Liveboard. To generate a Liveboard report with specific visualizations, add GUIDs or names of the visualizations. **NOTE**: * The downloadable file returned in API response file is extensionless. Please rename the downloaded file by typing in the relevant extension. * Optionally, you can define [runtime overrides](https://developers.thoughtspot.com/docs/fetch-data-and-report-apis#_runtime_overrides) to apply to the Answer data. * To include unsaved changes in the report, pass the `transient_pinboard_content` script generated from the `getExportRequestForCurrentPinboard` method in the Visual Embed SDK. Upon successful execution, the API returns the report with unsaved changes, including ad hoc changes to visualizations. For more information, see [Liveboard Report API](https://developers.thoughtspot.com/docs/fetch-data-and-report-apis#_liveboard_report_api). * Starting with ThoughtSpot Cloud 10.9.0.cl release, the Liveboard can be exported in the PNG format in the resolution of your choice. To enable this on your instance, contact ThoughtSpot support. When this feature is enabled, the options `include_cover_page`,`include_filter_page` within the `png_options` will not be available for PNG exports. * Starting with the ThoughtSpot Cloud 26.2.0.cl release, * Liveboards can be exported in CSV format. * All visualizations within a Liveboard can be exported as individual CSV files. * When exporting multiple visualizations or the entire Liveboard, the system returns the report as a compressed ZIP file containing the separate CSV files for each visualization. * Liveboards can also be exported in XLSX format. * All selected visualizations are consolidated into a single Excel workbook (.xlsx), with each visualization placed in its own worksheet (tab). * XLSX exports are limited to a maximum of 255 worksheets (tabs) per workbook. + * @param exportLiveboardReportRequest + */ + exportLiveboardReport(exportLiveboardReportRequest, _options) { + const requestContextPromise = this.requestFactory.exportLiveboardReport(exportLiveboardReportRequest, _options); + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx) => middleware.pre(ctx))); + } + return middlewarePreObservable.pipe(mergeMap((ctx) => this.configuration.httpApi.send(ctx))).pipe(mergeMap((response) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp) => this.responseProcessor.exportLiveboardReport(rsp))); + })); + } + /** + * Version: 9.0.0.cl or later Exports the [TML](https://docs.thoughtspot.com/cloud/latest/tml) representation of metadata objects in JSON or YAML format. Requires `DATADOWNLOADING` (**Can download Data**) and at least view access to the metadata object. #### Usage guidelines * You can export one or several objects by passing metadata object GUIDs in the `metadata` array. * When exporting TML content for a Liveboard or Answer object, you can set `export_associated` to `true` to retrieve TML content for underlying Worksheets, Tables, or Views, including the GUID of each object within the headers. When `export_associated` is set to `true`, consider retrieving one metadata object at a time. * Set `export_fqns` to `true` to add FQNs of the referenced objects in the TML content. For example, if you send an API request to retrieve TML for a Liveboard and its associated objects, the API returns the TML content with FQNs of the referenced Worksheet. Exporting TML with FQNs is useful if ThoughtSpot has multiple objects with the same name and you want to eliminate ambiguity when importing TML files into ThoughtSpot. It eliminates the need for adding FQNs of the referenced objects manually during the import operation. * To export only the TML of feedbacks associated with an object, set the GUID of the object as `identifier`, and set the `type` as `FEEDBACK` in the `metadata` array. * To export the TML of an object along with the feedbacks associated with it, set the GUID of the object as `identifier`, set the `type` as `LOGIAL_TABLE` in the `metadata` array, and set `export_with_associated_feedbacks` in `export_options` to true. For more information, see [TML Documentation](https://developers.thoughtspot.com/docs/tml#_export_a_tml). For more information on feedbacks, see [Feedback Documentation](https://docs.thoughtspot.com/cloud/latest/sage-feedback). + * @param exportMetadataTMLRequest + */ + exportMetadataTML(exportMetadataTMLRequest, _options) { + const requestContextPromise = this.requestFactory.exportMetadataTML(exportMetadataTMLRequest, _options); + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx) => middleware.pre(ctx))); + } + return middlewarePreObservable.pipe(mergeMap((ctx) => this.configuration.httpApi.send(ctx))).pipe(mergeMap((response) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp) => this.responseProcessor.exportMetadataTML(rsp))); + })); + } + /** + * Version: 10.1.0.cl or later Exports the [TML](https://docs.thoughtspot.com/cloud/latest/tml) representation of metadata objects in JSON or YAML format. ### **Permissions Required** Requires `DATAMANAGEMENT` (**Can manage data**) and `USERMANAGEMENT` (**Can manage users**) privileges. #### **Usage Guidelines** This API is only applicable for `USER`, `GROUP`, and `ROLES` metadata types. - `batch_offset` Indicates the starting position within the complete dataset from which the API should begin returning objects. Useful for paginating results efficiently. - `batch_size` Specifies the number of objects or items to retrieve in a single request. Helps control response size for better performance. - `edoc_format` Defines the format of the TML content. The exported metadata can be in JSON or YAML format. - `export_dependent` Specifies whether to include dependent metadata objects in the export. Ensures related objects are also retrieved if needed. - `all_orgs_override` Indicates whether the export operation applies across all organizations. Useful for multi-tenant environments where cross-org exports are required. + * @param exportMetadataTMLBatchedRequest + */ + exportMetadataTMLBatched(exportMetadataTMLBatchedRequest, _options) { + const requestContextPromise = this.requestFactory.exportMetadataTMLBatched(exportMetadataTMLBatchedRequest, _options); + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx) => middleware.pre(ctx))); + } + return middlewarePreObservable.pipe(mergeMap((ctx) => this.configuration.httpApi.send(ctx))).pipe(mergeMap((response) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp) => this.responseProcessor.exportMetadataTMLBatched(rsp))); + })); + } + /** + * Version: 9.0.0.cl or later Fetches data from a saved Answer. Requires at least view access to the saved Answer. The `record_size` attribute determines the number of records to retrieve in an API call. For more information about pagination, record size, and maximum row limit, see [Pagination and record size settings](https://developers.thoughtspot.com/docs/fetch-data-and-report-apis#_pagination_settings_for_data_and_report_apis). + * @param fetchAnswerDataRequest + */ + fetchAnswerData(fetchAnswerDataRequest, _options) { + const requestContextPromise = this.requestFactory.fetchAnswerData(fetchAnswerDataRequest, _options); + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx) => middleware.pre(ctx))); + } + return middlewarePreObservable.pipe(mergeMap((ctx) => this.configuration.httpApi.send(ctx))).pipe(mergeMap((response) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp) => this.responseProcessor.fetchAnswerData(rsp))); + })); + } + /** + * Version: 9.0.0.cl or later Fetches the underlying SQL query data for an Answer object. Requires at least view access to the Answer object. Upon successful execution, the API returns the SQL queries for the specified object as shown in this example: ``` { \"metadata_id\":\"8fbe44a8-46ad-4b16-8d39-184b2fada490\", \"metadata_name\":\"Total sales\", \"metadata_type\":\"ANSWER\", \"sql_queries\":[ { \"metadata_id\":\"8fbe44a8-46ad-4b16-8d39-184b2fada490\", \"metadata_name\":\"Total sales -test\", \"sql_query\":\"SELECT \\n \\\"ta_1\\\".\\\"REGION\\\" \\\"ca_1\\\", \\n \\\"ta_2\\\".\\\"PRODUCTNAME\\\" \\\"ca_2\\\", \\n \\\"ta_1\\\".\\\"STORENAME\\\" \\\"ca_3\\\", \\n CASE\\n WHEN sum(\\\"ta_3\\\".\\\"SALES\\\") IS NOT NULL THEN sum(\\\"ta_3\\\".\\\"SALES\\\")\\n ELSE 0\\n END \\\"ca_4\\\", \\n CASE\\n WHEN sum(\\\"ta_3\\\".\\\"QUANTITYPURCHASED\\\") IS NOT NULL THEN sum(\\\"ta_3\\\".\\\"QUANTITYPURCHASED\\\")\\n ELSE 0\\n END \\\"ca_5\\\"\\nFROM \\\"RETAILAPPAREL\\\".\\\"PUBLIC\\\".\\\"FACT_RETAPP_SALES\\\" \\\"ta_3\\\"\\n JOIN \\\"RETAILAPPAREL\\\".\\\"PUBLIC\\\".\\\"DIM_RETAPP_STORES\\\" \\\"ta_1\\\"\\n ON \\\"ta_3\\\".\\\"STOREID\\\" = \\\"ta_1\\\".\\\"STOREID\\\"\\n JOIN \\\"RETAILAPPAREL\\\".\\\"PUBLIC\\\".\\\"DIM_RETAPP_PRODUCTS\\\" \\\"ta_2\\\"\\n ON \\\"ta_3\\\".\\\"PRODUCTID\\\" = \\\"ta_2\\\".\\\"PRODUCTID\\\"\\nGROUP BY \\n \\\"ca_1\\\", \\n \\\"ca_2\\\", \\n \\\"ca_3\\\"\\n\" } ] } ``` + * @param fetchAnswerSqlQueryRequest + */ + fetchAnswerSqlQuery(fetchAnswerSqlQueryRequest, _options) { + const requestContextPromise = this.requestFactory.fetchAnswerSqlQuery(fetchAnswerSqlQueryRequest, _options); + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx) => middleware.pre(ctx))); + } + return middlewarePreObservable.pipe(mergeMap((ctx) => this.configuration.httpApi.send(ctx))).pipe(mergeMap((response) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp) => this.responseProcessor.fetchAnswerSqlQuery(rsp))); + })); + } + /** + * Version: 10.4.0.cl or later Gets information about the status of the TML async import task scheduled using the `/api/rest/2.0/metadata/tml/async/import` API call. To fetch the task details, specify the ID of the TML async import task. Requires access to the task ID. The API allows users who initiated the asynchronous TML import via `/api/rest/2.0/metadata/tml/async/import` to view the status of their tasks. Users with administration privilege can view the status of all import tasks initiated by the users in their Org. #### Usage guidelines See [TML API Documentation](https://developers.thoughtspot.com/docs/tml#_fetch_status_of_the_tml_import_task) for usage guidelines. + * @param fetchAsyncImportTaskStatusRequest + */ + fetchAsyncImportTaskStatus(fetchAsyncImportTaskStatusRequest, _options) { + const requestContextPromise = this.requestFactory.fetchAsyncImportTaskStatus(fetchAsyncImportTaskStatusRequest, _options); + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx) => middleware.pre(ctx))); + } + return middlewarePreObservable.pipe(mergeMap((ctx) => this.configuration.httpApi.send(ctx))).pipe(mergeMap((response) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp) => this.responseProcessor.fetchAsyncImportTaskStatus(rsp))); + })); + } + /** + * Version: 10.12.0.cl or later Fetches column security rules for specified tables. This API endpoint retrieves column-level security rules configured for tables. It returns information about which columns are secured and which groups have access to those columns. #### Usage guidelines - Provide an array of table identifiers using either `identifier` (GUID or name) or `obj_identifier` (object ID) - At least one of `identifier` or `obj_identifier` must be provided for each table - The API returns column security rules for all specified tables - Users must have appropriate permissions to access security rules for the specified tables #### Required permissions - `ADMINISTRATION` - Can administer ThoughtSpot - `DATAMANAGEMENT` - Can manage data - `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` - Can manage worksheet views and tables #### Example request ```json { \"tables\": [ { \"identifier\": \"table-guid\", \"obj_identifier\": \"table-object-id\" } ] } ``` #### Response format The API returns an array of `ColumnSecurityRuleResponse` objects wrapped in a `data` field. Each `ColumnSecurityRuleResponse` object contains: - Table information (GUID and object ID) - Array of column security rules with column details, group access, and source table information #### Example response ```json { \"data\": [ { \"guid\": \"table-guid\", \"objId\": \"table-object-id\", \"columnSecurityRules\": [ { \"column\": { \"id\": \"col_123\", \"name\": \"Salary\" }, \"groups\": [ { \"id\": \"group_1\", \"name\": \"HR Department\" } ], \"sourceTableDetails\": { \"id\": \"source-table-guid\", \"name\": \"Employee_Data\" } } ] } ] } ``` + * @param fetchColumnSecurityRulesRequest + */ + fetchColumnSecurityRules(fetchColumnSecurityRulesRequest, _options) { + const requestContextPromise = this.requestFactory.fetchColumnSecurityRules(fetchColumnSecurityRulesRequest, _options); + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx) => middleware.pre(ctx))); + } + return middlewarePreObservable.pipe(mergeMap((ctx) => this.configuration.httpApi.send(ctx))).pipe(mergeMap((response) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp) => this.responseProcessor.fetchColumnSecurityRules(rsp))); + })); + } + /** + * Version: 9.9.0.cl or later Validates the difference in connection metadata between CDW and ThoughtSpot. Requires `DATAMANAGEMENT` (**Can manage data**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the following Data control privileges may be required: - `CAN_MANAGE_CUSTOM_CALENDAR`(**Can manage custom calendars**) - `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) - `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` (**Can manage data models**) Returns a boolean indicating whether there is any difference between the connection metadata at ThoughtSpot and CDW. To get the connection metadata difference status, pass the connection GUID as `connection_identifier` in the API request. + * @param connectionIdentifier GUID of the connection + */ + fetchConnectionDiffStatus(connectionIdentifier, _options) { + const requestContextPromise = this.requestFactory.fetchConnectionDiffStatus(connectionIdentifier, _options); + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx) => middleware.pre(ctx))); + } + return middlewarePreObservable.pipe(mergeMap((ctx) => this.configuration.httpApi.send(ctx))).pipe(mergeMap((response) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp) => this.responseProcessor.fetchConnectionDiffStatus(rsp))); + })); + } + /** + * Version: 9.0.0.cl or later Gets data from a Liveboard object and its visualization. Requires at least view access to the Liveboard. #### Usage guidelines In the request body, specify the GUID or name of the Liveboard. To get data for specific visualizations, add the GUIDs or names of the visualizations in the API request. To include unsaved changes in the report, pass the `transient_pinboard_content` script generated from the `getExportRequestForCurrentPinboard` method in the Visual Embed SDK. Upon successful execution, the API returns the report with unsaved changes. If the new Liveboard experience mode, the transient content includes ad hoc changes to visualizations such as sorting, toggling of legends, and data drill down. For more information, and see [Liveboard data API](https://developers.thoughtspot.com/docs/fetch-data-and-report-apis#_fetch_liveboard_data_api). + * @param fetchLiveboardDataRequest + */ + fetchLiveboardData(fetchLiveboardDataRequest, _options) { + const requestContextPromise = this.requestFactory.fetchLiveboardData(fetchLiveboardDataRequest, _options); + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx) => middleware.pre(ctx))); + } + return middlewarePreObservable.pipe(mergeMap((ctx) => this.configuration.httpApi.send(ctx))).pipe(mergeMap((response) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp) => this.responseProcessor.fetchLiveboardData(rsp))); + })); + } + /** + * Version: 9.0.0.cl or later Fetches the underlying SQL query data for a Liveboard object and its visualizations. Requires at least view access to the Liveboard object. To get SQL query data for a Liveboard, specify the GUID of the Liveboard. Optionally, you can add an array of visualization GUIDs to retrieve the SQL query data for visualizations in the Liveboard. Upon successful execution, the API returns the SQL queries for the specified object as shown in this example: ``` { \"metadata_id\": \"fa68ae91-7588-4136-bacd-d71fb12dda69\", \"metadata_name\": \"Total Sales\", \"metadata_type\": \"LIVEBOARD\", \"sql_queries\": [ { \"metadata_id\": \"b3b6d2b9-089a-490c-8e16-b144650b7843\", \"metadata_name\": \"Total quantity purchased, Total sales by region\", \"sql_query\": \"SELECT \\n \\\"ta_1\\\".\\\"REGION\\\" \\\"ca_1\\\", \\n CASE\\n WHEN sum(\\\"ta_2\\\".\\\"QUANTITYPURCHASED\\\") IS NOT NULL THEN sum(\\\"ta_2\\\".\\\"QUANTITYPURCHASED\\\")\\n ELSE 0\\n END \\\"ca_2\\\", \\n CASE\\n WHEN sum(\\\"ta_2\\\".\\\"SALES\\\") IS NOT NULL THEN sum(\\\"ta_2\\\".\\\"SALES\\\")\\n ELSE 0\\n END \\\"ca_3\\\"\\nFROM \\\"RETAILAPPAREL\\\".\\\"PUBLIC\\\".\\\"FACT_RETAPP_SALES\\\" \\\"ta_2\\\"\\n JOIN \\\"RETAILAPPAREL\\\".\\\"PUBLIC\\\".\\\"DIM_RETAPP_STORES\\\" \\\"ta_1\\\"\\n ON \\\"ta_2\\\".\\\"STOREID\\\" = \\\"ta_1\\\".\\\"STOREID\\\"\\nGROUP BY \\\"ca_1\\\"\" } ] } ``` + * @param fetchLiveboardSqlQueryRequest + */ + fetchLiveboardSqlQuery(fetchLiveboardSqlQueryRequest, _options) { + const requestContextPromise = this.requestFactory.fetchLiveboardSqlQuery(fetchLiveboardSqlQueryRequest, _options); + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx) => middleware.pre(ctx))); + } + return middlewarePreObservable.pipe(mergeMap((ctx) => this.configuration.httpApi.send(ctx))).pipe(mergeMap((response) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp) => this.responseProcessor.fetchLiveboardSqlQuery(rsp))); + })); + } + /** + * Version: 9.0.0.cl or later Fetches security audit logs. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the [Admin Control](https://developers.thoughtspot.com/docs/rbac#_admin_control) privileges are required. #### Usage guidelines By default, the API retrieves logs for the last 24 hours. You can set a custom duration in EPOCH time. Make sure the log duration specified in your API request doesn’t exceed 24 hours. If you must fetch logs for a longer time range, modify the duration and make multiple sequential API requests. Upon successful execution, the API returns logs with the following information: * timestamp of the event * event ID * event type * name and GUID of the user * IP address of ThoughtSpot instance For more information see [Audit logs Documentation](https://developers.thoughtspot.com/docs/audit-logs). + * @param fetchLogsRequest + */ + fetchLogs(fetchLogsRequest, _options) { + const requestContextPromise = this.requestFactory.fetchLogs(fetchLogsRequest, _options); + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx) => middleware.pre(ctx))); + } + return middlewarePreObservable.pipe(mergeMap((ctx) => this.configuration.httpApi.send(ctx))).pipe(mergeMap((response) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp) => this.responseProcessor.fetchLogs(rsp))); + })); + } + /** + * Version: 26.3.0.cl or later This API fetches the object privileges present for the given list of principals (user or group), on the given set of objects. It supports pagination, which can be enabled and configured using the request parameters. It provides users access to certain features based on privilege based access control. #### Usage guidelines - Specify the `type` (`USER` or `USER_GROUP`) and `identifier` (either GUID or name) of the principals for which you want to retrieve object privilege information in the `principals` array. - Specify the `type` (`LOGICAL_TABLE`) and `identifier` (either GUID or name) of the metadata objects for which you want to retrieve object privilege information in the `metadata` array. Only `LOGICAL_TABLE` metadata type is supported for now. It may be extended for other metadata types in future. - To control the offset from where principals have to be fetched, use `record_offset`. When `record_offset` is 0, information is fetched from the beginning. - To control the number of principals to be fetched, use `record_size`. Default `record_size` is 20. - Ensure `record_offset` for a subsequent request is one more than the value of `record_size` of the previous request. - Ensure using correct Authorization Bearer Token corresponding to specific user & org. #### Example request ```json { \"principals\": [ { \"type\": \"type-1\", \"identifier\": \"principal-guid-or-name-1\" }, { \"type\": \"type-2\", \"identifier\": \"principal-guid-or-name-2\" } ], \"metadata\": [ { \"type\": \"metadata-type-1\", \"identifier\": \"metadata-guid-or-name-1\" }, { \"type\": \"metadata-type-2\", \"identifier\": \"metadata-guid-or-name-2\" } ], \"record_offset\": 0, \"record_size\": 20 } ``` #### Response format The API returns an array of `metadata_object_privileges` objects wrapped in JSON. Each `metadata_object_privileges` object contains: - Metadata information (GUID, name and type) - Array of `principal_object_privilege_info`. - Each `principal_object_privilege_info` contains: - Principal type. All principals of this type are listed as described below. - Array of `principal_object_privileges`. - Each `principal_object_privileges` contains: - Principal information (GUID, name, subtype) - List of applied object level privileges. #### Example response ```json { \"metadata_object_privileges\": [ { \"metadata_id\": \"metadata-guid-1\", \"metadata_name\": \"metadata-name-1\", \"metadata_type\": \"metadata-type-1\", \"principal_object_privilege_info\": [ { \"principal_type\": \"principal-type-1\", \"principal_object_privileges\": [ { \"principal_id\": \"principal-guid-1\", \"principal_name\": \"principal-name-1\", \"principal_sub_type\": \"principal-sub-type-1\", \"object_privileges\": \"[object-privilege-1, object-privilege-2]\" }, { \"principal_id\": \"principal-guid-2\", \"principal_name\": \"principal-name-2\", \"principal_sub_type\": \"principal-sub-type-2\", \"object_privileges\": \"[object-privilege-1, object-privilege-2]\" } ] }, { \"principal_type\": \"principal-type-2\", \"principal_object_privileges\": [ { \"principal_id\": \"principal-guid-3\", \"principal_name\": \"principal-guid-4\", \"principal_sub_type\": \"principal-sub-type-4\", \"object_privileges\": \"[object-privilege-1]\" } ] } ] }, { \"metadata_id\": \"metadata-guid-2\", \"metadata_name\": \"metadata-name-2\", \"metadata_type\": \"metadata-type-2\", \"principal_object_privilege_info\": [ { \"principal_type\": \"principal-type-1\", \"principal_object_privileges\": [ { \"principal_id\": \"principal-guid-1\", \"principal_name\": \"principal-name-1\", \"principal_sub_type\": \"principal-sub-type-1\", \"object_privileges\": \"[object-privilege-3, object-privilege-4]\" }, { \"principal_id\": \"principal-guid-2\", \"principal_name\": \"principal-name-2\", \"principal_sub_type\": \"principal-sub-type-2\", \"object_privileges\": \"[object-privilege-4]\" } ] } ] } ] } ``` + * @param fetchObjectPrivilegesRequest + */ + fetchObjectPrivileges(fetchObjectPrivilegesRequest, _options) { + const requestContextPromise = this.requestFactory.fetchObjectPrivileges(fetchObjectPrivilegesRequest, _options); + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx) => middleware.pre(ctx))); + } + return middlewarePreObservable.pipe(mergeMap((ctx) => this.configuration.httpApi.send(ctx))).pipe(mergeMap((response) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp) => this.responseProcessor.fetchObjectPrivileges(rsp))); + })); + } + /** + * Version: 9.0.0.cl or later Fetches object permission details for a given principal object such as a user and group. Requires view access to the metadata object. #### Usage guidelines * To get a list of all metadata objects that a user or group can access, specify the `type` and GUID or name of the principal. * To get permission details for a specific object, add the `type` and GUID or name of the metadata object to your API request. Upon successful execution, the API returns a list of metadata objects and permission details for each object. + * @param fetchPermissionsOfPrincipalsRequest + */ + fetchPermissionsOfPrincipals(fetchPermissionsOfPrincipalsRequest, _options) { + const requestContextPromise = this.requestFactory.fetchPermissionsOfPrincipals(fetchPermissionsOfPrincipalsRequest, _options); + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx) => middleware.pre(ctx))); + } + return middlewarePreObservable.pipe(mergeMap((ctx) => this.configuration.httpApi.send(ctx))).pipe(mergeMap((response) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp) => this.responseProcessor.fetchPermissionsOfPrincipals(rsp))); + })); + } + /** + * Version: 9.0.0.cl or later Fetches permission details for a given metadata object. Requires view access to the metadata object. #### Usage guidelines * To fetch a list of users and groups for a metadata object, specify `type` and GUID or name of the metadata object. * To get permission details for a specific user or group, add `type` and GUID or name of the principal object to your API request. Upon successful execution, the API returns permission details and principal information for the object specified in the API request. + * @param fetchPermissionsOnMetadataRequest + */ + fetchPermissionsOnMetadata(fetchPermissionsOnMetadataRequest, _options) { + const requestContextPromise = this.requestFactory.fetchPermissionsOnMetadata(fetchPermissionsOnMetadataRequest, _options); + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx) => middleware.pre(ctx))); + } + return middlewarePreObservable.pipe(mergeMap((ctx) => this.configuration.httpApi.send(ctx))).pipe(mergeMap((response) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp) => this.responseProcessor.fetchPermissionsOnMetadata(rsp))); + })); + } + /** + * Version: 9.0.0.cl or later Enforces logout on current user sessions. Use this API with caution as it may invalidate active user sessions and force users to re-login. Make sure you specify the usernames or GUIDs. If you pass null values in the API call, all user sessions on your cluster become invalid, and the users are forced to re-login. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `USER_ADMINISTRATION` (**Can manage users**) privilege is required. + * @param forceLogoutUsersRequest + */ + forceLogoutUsers(forceLogoutUsersRequest, _options) { + const requestContextPromise = this.requestFactory.forceLogoutUsers(forceLogoutUsersRequest, _options); + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx) => middleware.pre(ctx))); + } + return middlewarePreObservable.pipe(mergeMap((ctx) => this.configuration.httpApi.send(ctx))).pipe(mergeMap((response) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp) => this.responseProcessor.forceLogoutUsers(rsp))); + })); + } + /** + * Version: 10.12.0.cl or later Exports a [custom calendar](https://docs.thoughtspot.com/cloud/latest/connections-cust-cal) in the CSV format. Requires `DATAMANAGEMENT` (**Can manage data**) or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your ThoughtSpot instance, the `CAN_MANAGE_CUSTOM_CALENDAR` (**Can manage custom calendars**) privilege is required. #### Usage guidelines Use this API to download a custom calendar in the CSV file format. In your API request, specify the following parameters. * Start and end date of the calendar. For \"month offset\" calendars, the start date must match the month defined in the `month_offset` attribute. You can also specify optional parameters such as the starting day of the week and prefixes for the quarter and year labels. + * @param generateCSVRequest + */ + generateCSV(generateCSVRequest, _options) { + const requestContextPromise = this.requestFactory.generateCSV(generateCSVRequest, _options); + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx) => middleware.pre(ctx))); + } + return middlewarePreObservable.pipe(mergeMap((ctx) => this.configuration.httpApi.send(ctx))).pipe(mergeMap((response) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp) => this.responseProcessor.generateCSV(rsp))); + })); + } + /** + * Version: 9.0.0.cl or later Retrieves details of the current user session for the token provided in the request header. Any ThoughtSpot user can access this endpoint and send an API request. The data returned in the API response varies according to user\'s privilege and object access permissions. **NOTE**: In ThoughtSpot, users with cluster administration privileges can access all Orgs by default. However, unless the administrator is explicitly added to an Org, the Orgs list in the session information returned by the API will include only the Primary Org. To include other Orgs in the API response, you must explicitly add the administrator to each Org in the Admin settings page in the UI or via user REST API. + */ + getCurrentUserInfo(_options) { + const requestContextPromise = this.requestFactory.getCurrentUserInfo(_options); + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx) => middleware.pre(ctx))); + } + return middlewarePreObservable.pipe(mergeMap((ctx) => this.configuration.httpApi.send(ctx))).pipe(mergeMap((response) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp) => this.responseProcessor.getCurrentUserInfo(rsp))); + })); + } + /** + * Version: 9.4.0.cl or later Retrieves details of the current session token for the bearer token provided in the request header. This API endpoint does not create a new token. Instead, it returns details about the token, including the token string, creation time, expiration time, and the associated user. Use this endpoint to introspect your current session token, debug authentication issues, or when a frontend application needs session token details. Any ThoughtSpot user with a valid bearer token can access this endpoint and send an API request + */ + getCurrentUserToken(_options) { + const requestContextPromise = this.requestFactory.getCurrentUserToken(_options); + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx) => middleware.pre(ctx))); + } + return middlewarePreObservable.pipe(mergeMap((ctx) => this.configuration.httpApi.send(ctx))).pipe(mergeMap((response) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp) => this.responseProcessor.getCurrentUserToken(rsp))); + })); + } + /** + * Version: 10.4.0.cl or later Creates an authentication token that provides values for the formula variables in the Row Level Security (RLS) rules for a given user. Recommended for use cases that require Attribute-based access control (ABAC) via RLS. #### Required privileges To add a new user and assign privileges during auto-creation, the `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege is required. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled, the `CONTROL_TRUSTED_AUTH` (**Can Enable or Disable Trusted Authentication**) privilege and edit access to the data source are required. To configure formula variables for all Orgs on your instance or the Primary Org, cluster administration privileges are required. Org administrators can configure formula variables for their respective Orgs. If Role-Based Access Control (RBAC) is enabled, users with the `CAN_MANAGE_VARIABLES` (**Can manage variables**) role privilege can also create and manage variables for their Org context. #### Usage guidelines You can generate a token by providing a `username` and `password`, or by using a `secret_key`. To generate a `secret_key`, the administrator must enable [Trusted authentication](https://developers.thoughtspot.com/docs/trusted-auth-secret-key) in the **Develop** > **Customizations** > **Security Settings** page. **Note**: * When both `password` and `secret_key` are included in the API request, `password` takes precedence. * If [Multi-Factor Authentication (MFA)](https://docs.thoughtspot.com/cloud/latest/authentication-local-mfa) is enabled on your instance, the API login request with `username` and `password` returns an error. You can switch to token-based authentication with `secret_key` or contact ThoughtSpot Support for assistance. The token obtained from ThoughtSpot is valid for 5 minutes by default. You can configure the token expiration time as required. #### ABAC via RLS To implement ABAC via RLS and assign security entitlements to users during session creation, generate a token with custom variable values. The values set in the authentication token are applied to the formula variables referenced in RLS rules at the table level, which determines the data each user can access based on their entitlements. The variable values can be configured to persist for a specific set of Models in user sessions initiated with the token, allowing different RLS rules to be set for different data models. Once defined, the rules are added to the user\'s `variable_values` object, after which all sessions will use the persisted values. For more information, see [ABAC via tokens Documentation](https://developers.thoughtspot.com/docs/abac-via-rls-variables). ##### Formula variables Before defining variable values, ensure the variables are created and available on your instance. To create a formula variable, you can use the **Create variable** (`/api/rest/2.0/template/variables/create`) REST API endpoint, with the variable `type` set as `Formula_Variable` in the API request. The API doesn\'t support `\"persist_option\": \"RESET\"` and `\"persist_option\": \"NONE\"` when `variable_values` are defined in the request. If you are using `variable_values` for token generation, you must use other supported persist options such as `APPEND` or `REPLACE`. If you want to use `RESET` or `NONE`, do not pass any `variable_values`. In such cases, `variable_values` will remain unaffected. #### Supported objects The supported object type is `LOGICAL_TABLE`. When using `object_id` with `variable_values`, models are supported. #### Just-in-time provisioning For [just-in-time user creation and provisioning](https://developers.thoughtspot.com/docs/just-in-time-provisioning), specify the following attributes in the API request: * `auto_create` * `username` * `display_name` * `email` * `groups` Set `auto_create` to `true` if the username does not exist in ThoughtSpot. If the username already exists in ThoughtSpot and `auto_create` is set to `true`, user properties such as display name, email, Org and group entitlements will not be updated with new values. Setting `auto_create` to `true` does not create formula variables. Hence, this setting will not be applicable to `variable_values`. #### Important point to note All options in the token creation APIs that define user access to data in ThoughtSpot will take effect during token creation, not when the token is used for authentication. For example, `auto_create:true` will create the user when the authentication token is created. Persist options such as `APPEND` and `REPLACE` will persist `variable_values` on the user profile when the token is created. + * @param getCustomAccessTokenRequest + */ + getCustomAccessToken(getCustomAccessTokenRequest, _options) { + const requestContextPromise = this.requestFactory.getCustomAccessToken(getCustomAccessTokenRequest, _options); + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx) => middleware.pre(ctx))); + } + return middlewarePreObservable.pipe(mergeMap((ctx) => this.configuration.httpApi.send(ctx))).pipe(mergeMap((response) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp) => this.responseProcessor.getCustomAccessToken(rsp))); + })); + } + /** + * Version: 10.15.0.cl or later Suggests the most relevant data sources for a given natural language query, ranked by confidence with LLM-generated reasoning. Requires `CAN_USE_SPOTTER` privilege and at least view-level access to the underlying metadata entities referenced in the response. #### Usage guidelines The request must include: - `query`: the natural language question to find relevant data sources for If the request is successful, the API returns a ranked list of suggested data sources, each containing: - `confidence`: a float score indicating the model\'s confidence in the relevance of the suggestion - `details`: metadata about the data source - `data_source_identifier`: the unique ID of the data source - `data_source_name`: the display name of the data source - `description`: a description of the data source - `reasoning`: LLM-generated rationale explaining why the data source was recommended #### Error responses | Code | Description | |------|--------------------------------------------------------------------------------------------------------------------------------------------| | 401 | Unauthorized — authentication token is missing, expired, or invalid. | | 403 | Forbidden — the authenticated user does not have `CAN_USE_SPOTTER` privilege or lacks view permission on the underlying metadata entities. | > ###### Note: > * This endpoint is currently in Beta. Breaking changes may be introduced before it is made Generally Available. > * This endpoint requires Spotter — please contact ThoughtSpot Support to enable Spotter on your cluster. + * @param getDataSourceSuggestionsRequest + */ + getDataSourceSuggestions(getDataSourceSuggestionsRequest, _options) { + const requestContextPromise = this.requestFactory.getDataSourceSuggestions(getDataSourceSuggestionsRequest, _options); + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx) => middleware.pre(ctx))); + } + return middlewarePreObservable.pipe(mergeMap((ctx) => this.configuration.httpApi.send(ctx))).pipe(mergeMap((response) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp) => this.responseProcessor.getDataSourceSuggestions(rsp))); + })); + } + /** + * Version: 9.0.0.cl or later Generates an authentication token for creating a full session in ThoughtSpot for a given user. Recommended for use cases that do not require Attribute-based access control (ABAC) via Row Level Security (RLS). #### Usage guidelines You can generate a token for a user by providing a `username` and `password`, or by using the `secret_key` generated for your instance. To generate a `secret_key`, the administrator must enable [Trusted authentication](https://developers.thoughtspot.com/docs/trusted-auth-secret-key) in the **Develop** > **Customizations** > **Security Settings** page. **Note**: * When both `password` and `secret_key` are included in the API request, `password` takes precedence. * If [Multi-Factor Authentication (MFA)](https://docs.thoughtspot.com/cloud/latest/authentication-local-mfa) is enabled on your instance, the API login request with `username` and `password` returns an error. You can switch to token-based authentication with `secret_key` or contact ThoughtSpot Support for assistance. The token obtained from ThoughtSpot is valid for 5 minutes by default. You can configure the token expiration time as required. #### Just-in-time provisioning For [just-in-time user creation and provisioning](https://developers.thoughtspot.com/docs/just-in-time-provisioning), specify the following attributes in the API request: * `auto_create` * `username` * `display_name` * `email` * `group_identifiers` Set `auto_create` to `true` if the username does not exist in ThoughtSpot. If the user already exists in ThoughtSpot and `auto_create` is set to `true`, user properties such as display name, email and group assignment will be updated. To add a new user and assign privileges during auto-creation, the `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege is required. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled, the `CONTROL_TRUSTED_AUTH` (**Can Enable or Disable Trusted Authentication**) privilege is required. #### Important point to note All options in the token creation APIs that define user access to data in ThoughtSpot will take effect during token creation, not when the token is used for authentication. For example, `auto_create:true` will create the user when the authentication token is created. + * @param getFullAccessTokenRequest + */ + getFullAccessToken(getFullAccessTokenRequest, _options) { + const requestContextPromise = this.requestFactory.getFullAccessToken(getFullAccessTokenRequest, _options); + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx) => middleware.pre(ctx))); + } + return middlewarePreObservable.pipe(mergeMap((ctx) => this.configuration.httpApi.send(ctx))).pipe(mergeMap((response) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp) => this.responseProcessor.getFullAccessToken(rsp))); + })); + } + /** + * Version: 10.15.0.cl or later Retrieves existing natural language (NL) instructions configured for a specific data model. These instructions guide the AI system in understanding data context and generating more accurate responses. Requires `CAN_USE_SPOTTER` privilege, at least view access on the data model, and a bearer token corresponding to the org where the data model exists. #### Usage guidelines The request must include: - `data_source_identifier`: the unique ID of the data model to retrieve instructions for If the request is successful, the API returns: - `nl_instructions_info`: an array of instruction objects, each containing: - `instructions`: the configured text instructions for AI processing - `scope`: the scope of the instruction — currently only `GLOBAL` is supported #### Instructions scope - **GLOBAL**: Instructions that apply globally across the system on the given data-model (currently only global instructions are supported) #### Error responses | Code | Description | |------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| | 401 | Unauthorized — authentication token is missing, expired, or invalid. | | 403 | Forbidden — the authenticated user does not have `CAN_USE_SPOTTER` privilege, lacks view access on the data model, or the bearer token does not correspond to the org where the data model exists. | > ###### Note: > > - To use this API, the user needs at least view access on the data model, and must use the bearer token corresponding to the org where the data model exists. > - This endpoint is currently in Beta. Breaking changes may be introduced before the endpoint is made Generally Available. > - Available from version 10.15.0.cl and later. > - This endpoint requires Spotter — please contact ThoughtSpot Support to enable Spotter on your cluster. > - Use this API to review currently configured instructions before modifying them with `setNLInstructions`. + * @param getNLInstructionsRequest + */ + getNLInstructions(getNLInstructionsRequest, _options) { + const requestContextPromise = this.requestFactory.getNLInstructions(getNLInstructionsRequest, _options); + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx) => middleware.pre(ctx))); + } + return middlewarePreObservable.pipe(mergeMap((ctx) => this.configuration.httpApi.send(ctx))).pipe(mergeMap((response) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp) => this.responseProcessor.getNLInstructions(rsp))); + })); + } + /** + * Version: 9.0.0.cl or later Generates an authentication token that provides access to a specific metadata object. This object list is intersected with the list of objects the user is allowed to access via group membership. For more information, see [Object security](https://docs.thoughtspot.com/cloud/latest/security-data-object#object_security). #### Usage guidelines You can generate a token for a user by providing a `username` and `password`, or by using the `secret_key` generated for your instance. To generate a `secret_key`, the administrator must enable [Trusted authentication](https://developers.thoughtspot.com/docs/trusted-auth-secret-key) in the **Develop** > **Customizations** > **Security Settings** page. **Note**: * When both `password` and `secret_key` are included in the API request, `password` takes precedence. * If [Multi-Factor Authentication (MFA)](https://docs.thoughtspot.com/cloud/latest/authentication-local-mfa) is enabled on your instance, the API login request with `username` and `password` returns an error. You can switch to token-based authentication with `secret_key` or contact ThoughtSpot Support for assistance. The token obtained from ThoughtSpot is valid for 5 minutes by default. You can configure the token expiration time as required. #### Just-in-time provisioning For [just-in-time user creation and provisioning](https://developers.thoughtspot.com/docs/just-in-time-provisioning), specify the following attributes in the API request: * `auto_create` * `username` * `display_name` * `email` * `group_identifiers` Set `auto_create` to `true` if the user is not available in ThoughtSpot. If the user already exists in ThoughtSpot and the `auto_create` parameter is set to `true`, user properties such as display name, email, and group assignment will be updated. To add a new user and assign privileges, the `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege is required. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled, the `CONTROL_TRUSTED_AUTH`(**Can Enable or Disable Trusted Authentication**) privilege is required. #### Important point to note All options in the token creation APIs that define user access to data in ThoughtSpot will take effect during token creation, not when the token is used for authentication. For example, `auto_create:true` will create the user when the authentication token is created. + * @param getObjectAccessTokenRequest + */ + getObjectAccessToken(getObjectAccessTokenRequest, _options) { + const requestContextPromise = this.requestFactory.getObjectAccessToken(getObjectAccessTokenRequest, _options); + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx) => middleware.pre(ctx))); + } + return middlewarePreObservable.pipe(mergeMap((ctx) => this.configuration.httpApi.send(ctx))).pipe(mergeMap((response) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp) => this.responseProcessor.getObjectAccessToken(rsp))); + })); + } + /** + * Version: 10.13.0.cl or later Breaks down a natural language query into a series of smaller analytical sub-questions, each mapped to a relevant data source. Requires `CAN_USE_SPOTTER` privilege and at least view-level access to the referenced metadata objects. #### Usage guidelines The request must include: - `query`: the natural language question to decompose into analytical sub-questions - `metadata_context`: at least one of the following context identifiers to guide question generation: - `conversation_identifier` — an existing conversation session ID - `answer_identifiers` — a list of Answer GUIDs - `liveboard_identifiers` — a list of Liveboard GUIDs - `data_source_identifiers` — a list of data source GUIDs Optional parameters for refining the output: - `ai_context`: additional context to improve response quality - `content` — supplementary text or CSV data as string input - `instructions` — custom text instructions for the AI system - `limit_relevant_questions`: maximum number of questions to return (default: `5`) - `bypass_cache`: if `true`, forces fresh computation instead of returning cached results If the request is successful, the API returns a list of relevant analytical questions, each containing: - `query`: the generated sub-question - `data_source_identifier`: the unique ID of the data source the question targets - `data_source_name`: the display name of the corresponding data source #### Error responses | Code | Description | |------|---------------------------------------------------------------------------------------------------------------------------------------| | 401 | Unauthorized — authentication token is missing, expired, or invalid. | | 403 | Forbidden — the authenticated user does not have `CAN_USE_SPOTTER` privilege or lacks view access to the referenced metadata objects. | > ###### Note: > * This endpoint is currently in Beta. Breaking changes may be introduced before the endpoint is made Generally Available. > * This endpoint requires Spotter - please contact ThoughtSpot support to enable Spotter on your cluster. + * @param getRelevantQuestionsRequest + */ + getRelevantQuestions(getRelevantQuestionsRequest, _options) { + const requestContextPromise = this.requestFactory.getRelevantQuestions(getRelevantQuestionsRequest, _options); + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx) => middleware.pre(ctx))); + } + return middlewarePreObservable.pipe(mergeMap((ctx) => this.configuration.httpApi.send(ctx))).pipe(mergeMap((response) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp) => this.responseProcessor.getRelevantQuestions(rsp))); + })); + } + /** + * Version: 9.0.0.cl or later Retrieves the current configuration details of the cluster. If the request is successful, the API returns a list configuration settings applied on the cluster. Requires `ADMINISTRATION`(**Can administer ThoughtSpot**) privilege to view these complete configuration settings of the cluster. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `SYSTEM_INFO_ADMINISTRATION` (**Can view system activities**) privilege is required. This API does not require any parameters to be passed in the request. + */ + getSystemConfig(_options) { + const requestContextPromise = this.requestFactory.getSystemConfig(_options); + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx) => middleware.pre(ctx))); + } + return middlewarePreObservable.pipe(mergeMap((ctx) => this.configuration.httpApi.send(ctx))).pipe(mergeMap((response) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp) => this.responseProcessor.getSystemConfig(rsp))); + })); + } + /** + * Version: 9.0.0.cl or later Gets system information such as the release version, locale, time zone, deployment environment, date format, and date time format of the cluster. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privileges. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `SYSTEM_INFO_ADMINISTRATION` (**Can view system activities**) privilege is required. This API does not require any parameters to be passed in the request. + */ + getSystemInformation(_options) { + const requestContextPromise = this.requestFactory.getSystemInformation(_options); + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx) => middleware.pre(ctx))); + } + return middlewarePreObservable.pipe(mergeMap((ctx) => this.configuration.httpApi.send(ctx))).pipe(mergeMap((response) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp) => this.responseProcessor.getSystemInformation(rsp))); + })); + } + /** + * Version: 9.2.0.cl or later Gets a list of configuration overrides applied on the cluster. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `APPLICATION_ADMINISTRATION` (**Can manage application settings**) privilege is required. This API does not require any parameters to be passed in the request. + */ + getSystemOverrideInfo(_options) { + const requestContextPromise = this.requestFactory.getSystemOverrideInfo(_options); + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx) => middleware.pre(ctx))); + } + return middlewarePreObservable.pipe(mergeMap((ctx) => this.configuration.httpApi.send(ctx))).pipe(mergeMap((response) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp) => this.responseProcessor.getSystemOverrideInfo(rsp))); + })); + } + /** + * Version: 9.0.0.cl or later Imports [TML](https://docs.thoughtspot.com/cloud/latest/tml) files into ThoughtSpot. Requires `DATAMANAGEMENT` (**Can manage data**) or `ADMINISTRATION` (**Can administer ThoughtsSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the following Data control privileges may be required: - `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) - `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` (**Can manage data models**) #### Usage guidelines * Import all related objects in a single TML Import API call. For example, Tables that use the same Connection object and Worksheets connected to these Tables. * Include the `fqn` property to distinguish objects that have the same name. For example, if you have multiple Connections or Worksheets with the same name on ThoughtSpot and the Connection or Worksheet referenced in your TML file does not have a unique name to distinguish, it may result in invalid object references. Adding `fqn` helps ThoughtSpot differentiate a Table from another with the same name. We recommend [exporting TML with FQNs](#/http/api-endpoints/metadata/export-metadata-tml) and using these during the import operation. * You can upload multiple TML files at a time. If you import a Worksheet along with Liveboards, Answers, and other dependent objects in a single API call, the imported objects will be immediately available for use. When you import only a Worksheet object, it may take some time for the Worksheet to become available in the ThoughtSpot system. Please wait for a few minutes, and then proceed to create an Answer and Liveboard from the newly imported Worksheet. For more information, see [TML Documentation](https://developers.thoughtspot.com/docs/tml#_import_a_tml). + * @param importMetadataTMLRequest + */ + importMetadataTML(importMetadataTMLRequest, _options) { + const requestContextPromise = this.requestFactory.importMetadataTML(importMetadataTMLRequest, _options); + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx) => middleware.pre(ctx))); + } + return middlewarePreObservable.pipe(mergeMap((ctx) => this.configuration.httpApi.send(ctx))).pipe(mergeMap((response) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp) => this.responseProcessor.importMetadataTML(rsp))); + })); + } + /** + * Version: 10.4.0.cl or later Schedules a task to import [TML](https://docs.thoughtspot.com/cloud/latest/tml) files into ThoughtSpot. You can use this API endpoint to process TML objects asynchronously when importing TMLs of large and complex metadata objects into ThoughtSpot. Unlike the synchronous import TML operation, the API processes TML data in the background and returns a task ID, which can be used to check the status of the import task via `/api/rest/2.0/metadata/tml/async/status` API endpoint. Requires `DATAMANAGEMENT` (**Can manage data**) or `ADMINISTRATION` (**Can administer ThoughtsSpot**) privilege, and edit access to the TML objects. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the following Data control privileges may be required: - `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) - `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` (**Can manage data models**) #### Usage guidelines See [Async TML API Documentation](https://developers.thoughtspot.com/docs/tml#_import_tml_objects_asynchronously) for usage guidelines. + * @param importMetadataTMLAsyncRequest + */ + importMetadataTMLAsync(importMetadataTMLAsyncRequest, _options) { + const requestContextPromise = this.requestFactory.importMetadataTMLAsync(importMetadataTMLAsyncRequest, _options); + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx) => middleware.pre(ctx))); + } + return middlewarePreObservable.pipe(mergeMap((ctx) => this.configuration.httpApi.send(ctx))).pipe(mergeMap((response) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp) => this.responseProcessor.importMetadataTMLAsync(rsp))); + })); + } + /** + * Version: 9.0.0.cl or later Imports group objects from external databases into ThoughtSpot. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `GROUP_ADMINISTRATION` (**Can manage groups**) privilege is required. During the import operation: * If the specified group is not available in ThoughtSpot, it will be added to ThoughtSpot. * If `delete_unspecified_groups` is set to `true`, the groups not specified in the API request, excluding administrator and system user groups, are deleted. * If the specified groups are already available in ThoughtSpot, the object properties of these groups are modified and synchronized as per the input data in the API request. A successful API call returns the object that represents the changes made in the ThoughtSpot system. + * @param importUserGroupsRequest + */ + importUserGroups(importUserGroupsRequest, _options) { + const requestContextPromise = this.requestFactory.importUserGroups(importUserGroupsRequest, _options); + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx) => middleware.pre(ctx))); + } + return middlewarePreObservable.pipe(mergeMap((ctx) => this.configuration.httpApi.send(ctx))).pipe(mergeMap((response) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp) => this.responseProcessor.importUserGroups(rsp))); + })); + } + /** + * Version: 9.0.0.cl or later Imports user data from external databases into ThoughtSpot. During the user import operation: * If the specified users are not available in ThoughtSpot, the users are created and assigned a default password. Defining a `default_password` in the API request is optional. * If `delete_unspecified_users` is set to `true`, the users not specified in the API request, excluding the `tsadmin`, `guest`, `system` and `su` users, are deleted. * If the specified user objects are already available in ThoughtSpot, the object properties are updated and synchronized as per the input data in the API request. A successful API call returns the object that represents the changes made in the ThoughtSpot system. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `USER_ADMINISTRATION` (**Can manage users**) privilege is required. + * @param importUsersRequest + */ + importUsers(importUsersRequest, _options) { + const requestContextPromise = this.requestFactory.importUsers(importUsersRequest, _options); + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx) => middleware.pre(ctx))); + } + return middlewarePreObservable.pipe(mergeMap((ctx) => this.configuration.httpApi.send(ctx))).pipe(mergeMap((response) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp) => this.responseProcessor.importUsers(rsp))); + })); + } + /** + * Version: 9.0.0.cl or later Creates a login session for a ThoughtSpot user with Basic authentication. In Basic authentication method, REST clients log in to ThoughtSpot using `username` and `password` attributes. On a multi-tenant cluster with Orgs, users can pass the ID of the Org in the API request to log in to a specific Org context. **Note**: If Multi-Factor Authentication (MFA) is enabled on your instance, the API login request with basic authentication (`username` and `password` ) returns an error. Contact ThoughtSpot Support for assistance. A successful login returns a session cookie that can be used in your subsequent API requests. + * @param loginRequest + */ + login(loginRequest, _options) { + const requestContextPromise = this.requestFactory.login(loginRequest, _options); + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx) => middleware.pre(ctx))); + } + return middlewarePreObservable.pipe(mergeMap((ctx) => this.configuration.httpApi.send(ctx))).pipe(mergeMap((response) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp) => this.responseProcessor.login(rsp))); + })); + } + /** + * Version: 9.0.0.cl or later Logs out a user from their current session. + */ + logout(_options) { + const requestContextPromise = this.requestFactory.logout(_options); + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx) => middleware.pre(ctx))); + } + return middlewarePreObservable.pipe(mergeMap((ctx) => this.configuration.httpApi.send(ctx))).pipe(mergeMap((response) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp) => this.responseProcessor.logout(rsp))); + })); + } + /** + * Version: 26.3.0.cl or later This API allows the addition or deletion of object level privileges for a set of users and groups, on a set of metadata objects. It provides users to access certain features based on privilege based access control. #### Usage guidelines - Specify the `operation`. The supported operations are: `ADD`, `REMOVE`. - Specify the type of the objects on which the object privileges are being provided in `metadata_type`. Only `LOGICAL_TABLE` metadata type is supported for now. It may be extended for other metadata types in future. - Specify the list of object privilege types in the `object_privilege_types` array. The supported object privilege types are: `SPOTTER_COACHING_PRIVILEGE`. - Specify the identifiers (either GUID or name) for the metadata objects in the `metadata_identifiers` array. - Specify the `type` (`USER` or `USER_GROUP`) and `identifier` (either GUID or name) of the principals to which you want to apply the given operation and given object privileges in the `principals` array. - Ensure using correct Authorization Bearer Token corresponding to specific user & org. #### Example request ```json { \"operation\": \"operation-type\", \"metadata_type\": \"metadata-type\", \"object_privilege_types\": [\"privilege-type-1\", \"privilege-type-2\"], \"metadata_identifiers\": [\"metadata-guid-or-name-1\", \"metadata-guid-or-name-1\"], \"principals\": [ { \"type\": \"type-1\", \"identifier\": \"principal-guid-or-name-1\" }, { \"type\": \"type-2\", \"identifier\": \"principal-guid-or-name-2\" } ] } ``` > ###### Note: > * Only admin users, users with edit access and users with coaching privilege on a given data-model can add or remove principals related to SPOTTER_COACHING_PRIVILEGE + * @param manageObjectPrivilegeRequest + */ + manageObjectPrivilege(manageObjectPrivilegeRequest, _options) { + const requestContextPromise = this.requestFactory.manageObjectPrivilege(manageObjectPrivilegeRequest, _options); + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx) => middleware.pre(ctx))); + } + return middlewarePreObservable.pipe(mergeMap((ctx) => this.configuration.httpApi.send(ctx))).pipe(mergeMap((response) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp) => this.responseProcessor.manageObjectPrivilege(rsp))); + })); + } + /** + * Parameterize fields in metadata objects. Version: 10.9.0.cl or later **Note:** This API endpoint is deprecated and will be removed from ThoughtSpot in a future release. Use [POST /api/rest/2.0/metadata/parameterize-fields](/api/rest/2.0/metadata/parameterize-fields) instead. Allows parameterizing fields in metadata objects in ThoughtSpot. Requires appropriate permissions to modify the metadata object. The API endpoint allows parameterizing the following types of metadata objects: * Logical Tables * Connections * Connection Configs For a Logical Table the field type must be `ATTRIBUTE` and field name can be one of: * databaseName * schemaName * tableName For a Connection or Connection Config, the field type is always `CONNECTION_PROPERTY`. In this case, field_name specifies the exact property of the Connection or Connection Config that needs to be parameterized. For Connection Config, the only supported field name is: * impersonate_user + * @param parameterizeMetadataRequest + */ + parameterizeMetadata(parameterizeMetadataRequest, _options) { + const requestContextPromise = this.requestFactory.parameterizeMetadata(parameterizeMetadataRequest, _options); + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx) => middleware.pre(ctx))); + } + return middlewarePreObservable.pipe(mergeMap((ctx) => this.configuration.httpApi.send(ctx))).pipe(mergeMap((response) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp) => this.responseProcessor.parameterizeMetadata(rsp))); + })); + } + /** + * Parameterize multiple fields of metadata objects. For example [schemaName, databaseName] for LOGICAL_TABLE. Version: 26.5.0.cl or later Allows parameterizing multiple fields of metadata objects in ThoughtSpot. For example, you can parameterize [schemaName, databaseName] for LOGICAL_TABLE. Requires appropriate permissions to modify the metadata object. The API endpoint allows parameterizing the following types of metadata objects: * Logical Tables * Connections * Connection Configs For a Logical Table, the field type must be `ATTRIBUTE` and field names can include: * databaseName * schemaName * tableName For a Connection or Connection Config, the field type is always `CONNECTION_PROPERTY`. In this case, field_names specifies the exact properties of the Connection or Connection Config that need to be parameterized. For Connection Config, supported field names include: * impersonate_user You can parameterize multiple fields at once by providing an array of field names. + * @param parameterizeMetadataFieldsRequest + */ + parameterizeMetadataFields(parameterizeMetadataFieldsRequest, _options) { + const requestContextPromise = this.requestFactory.parameterizeMetadataFields(parameterizeMetadataFieldsRequest, _options); + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx) => middleware.pre(ctx))); + } + return middlewarePreObservable.pipe(mergeMap((ctx) => this.configuration.httpApi.send(ctx))).pipe(mergeMap((response) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp) => this.responseProcessor.parameterizeMetadataFields(rsp))); + })); + } + /** + * Version: 26.5.0.cl or later Allows publishing metadata objects across organizations in ThoughtSpot. Requires ADMINISTRATION role and TENANT scope. The API endpoint allows publishing the following types of metadata objects: * Liveboards * Answers * Logical Tables This API will essentially share the objects along with it\'s dependencies to the org admins of the orgs to which it is being published. + * @param publishMetadataRequest + */ + publishMetadata(publishMetadataRequest, _options) { + const requestContextPromise = this.requestFactory.publishMetadata(publishMetadataRequest, _options); + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx) => middleware.pre(ctx))); + } + return middlewarePreObservable.pipe(mergeMap((ctx) => this.configuration.httpApi.send(ctx))).pipe(mergeMap((response) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp) => this.responseProcessor.publishMetadata(rsp))); + })); + } + /** + * Update values for a variable Version: 26.4.0.cl or later Allows updating values for a specific variable in ThoughtSpot. Requires ADMINISTRATION role. The CAN_MANAGE_VARIABLES permission allows you to manage Formula Variables in the current organization scope. The API endpoint allows: * Adding new values to the variable * Replacing existing values * Deleting values from the variable * Resetting all values When updating variable values, you need to specify: * The variable identifier (ID or name) * The values to add/replace/remove * The operation to perform (ADD, REPLACE, REMOVE, RESET) Behaviour based on operation type: * ADD - Adds values to the variable if this is a list type variable, else same as replace. * REPLACE - Replaces all values of a given set of constraints with the current set of values. * REMOVE - Removes any values which match the set of conditions of the variables if this is a list type variable, else clears value. * RESET - Removes all constraints for the given variable, scope is ignored + * @param identifier Unique ID or name of the variable + * @param putVariableValuesRequest + */ + putVariableValues(identifier, putVariableValuesRequest, _options) { + const requestContextPromise = this.requestFactory.putVariableValues(identifier, putVariableValuesRequest, _options); + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx) => middleware.pre(ctx))); + } + return middlewarePreObservable.pipe(mergeMap((ctx) => this.configuration.httpApi.send(ctx))).pipe(mergeMap((response) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp) => this.responseProcessor.putVariableValues(rsp))); + })); + } + /** + * Version: 10.7.0.cl or later **Deprecated** — Use `getRelevantQuestions` instead (available from 10.13.0.cl). Breaks down a topical or goal-oriented natural language question into smaller, actionable analytical sub-questions, each mapped to a relevant data source for independent execution. Requires `CAN_USE_SPOTTER` privilege and at least view-level access to the referenced metadata objects. #### Usage guidelines The request accepts the following parameters: - `nlsRequest`: contains the user `query` to decompose, along with optional `instructions` and `bypassCache` flag - `worksheetIds`: list of data source identifiers to scope the decomposition - `answerIds`: list of Answer GUIDs whose data guides the response - `liveboardIds`: list of Liveboard GUIDs whose data guides the response - `conversationId`: an existing conversation session ID for context continuity - `content`: supplementary text or CSV data to improve response quality - `maxDecomposedQueries`: maximum number of sub-questions to return (default: `5`) If the request is successful, the API returns a `decomposedQueryResponse` containing a list of `decomposedQueries`, each with: - `query`: the generated analytical sub-question - `worksheetId`: the unique ID of the data source the question targets - `worksheetName`: the display name of the corresponding data source #### Error responses | Code | Description | |------|---------------------------------------------------------------------------------------------------------------------------------------| | 401 | Unauthorized — authentication token is missing, expired, or invalid. | | 403 | Forbidden — the authenticated user does not have `CAN_USE_SPOTTER` privilege or lacks view access to the referenced metadata objects. | > ###### Note: > * This endpoint is deprecated since 10.13.0.cl. Use `getRelevantQuestions` for new integrations. > * This endpoint is currently in Beta. Breaking changes may be introduced before the endpoint is made Generally Available. > * This endpoint requires Spotter — please contact ThoughtSpot support to enable Spotter on your cluster. + * @param queryGetDecomposedQueryRequest + */ + queryGetDecomposedQuery(queryGetDecomposedQueryRequest, _options) { + const requestContextPromise = this.requestFactory.queryGetDecomposedQuery(queryGetDecomposedQueryRequest, _options); + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx) => middleware.pre(ctx))); + } + return middlewarePreObservable.pipe(mergeMap((ctx) => this.configuration.httpApi.send(ctx))).pipe(mergeMap((response) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp) => this.responseProcessor.queryGetDecomposedQuery(rsp))); + })); + } + /** + * Version: 9.0.0.cl or later Resets the password of a user account. Administrators can reset password on behalf of a user. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `USER_ADMINISTRATION` (**Can manage users**) privilege is required. + * @param resetUserPasswordRequest + */ + resetUserPassword(resetUserPasswordRequest, _options) { + const requestContextPromise = this.requestFactory.resetUserPassword(resetUserPasswordRequest, _options); + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx) => middleware.pre(ctx))); + } + return middlewarePreObservable.pipe(mergeMap((ctx) => this.configuration.httpApi.send(ctx))).pipe(mergeMap((response) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp) => this.responseProcessor.resetUserPassword(rsp))); + })); + } + /** + * Version: 9.2.0.cl or later Reverts TML objects to a previous commit specified in the API request. Requires at least edit access to objects. In the API request, specify the `commit_id`. If the branch name is not specified in the request, the API will consider the default branch configured on your instance. By default, the API reverts all objects. If the revert operation fails for one of the objects provided in the commit, the API returns an error and does not revert any object. For more information, see [Git integration documentation](https://developers.thoughtspot.com/docs/git-integration). + * @param commitId Commit id to which the object should be reverted + * @param revertCommitRequest + */ + revertCommit(commitId, revertCommitRequest, _options) { + const requestContextPromise = this.requestFactory.revertCommit(commitId, revertCommitRequest, _options); + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx) => middleware.pre(ctx))); + } + return middlewarePreObservable.pipe(mergeMap((ctx) => this.configuration.httpApi.send(ctx))).pipe(mergeMap((response) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp) => this.responseProcessor.revertCommit(rsp))); + })); + } + /** + * Version: 26.2.0.cl or later Revokes OAuth refresh tokens for users who no longer require access to a data warehouse connection. When a token is revoked, the affected user\'s session for that connection is terminated, and they must re-authenticate to regain access. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) or `DATAMANAGEMENT` (**Can manage data**) privileges. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on the ThoughtSpot instance, users with `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) privilege can also make API requests to revoke tokens for connection users. #### Usage guidelines You can specify different combinations of identifiers to control which refresh tokens are revoked. - **connection_identifier**: Revokes refresh tokens for all users of the connection, except the connection author. - **connection_identifier** and **user_identifiers**: Revokes refresh tokens only for the users specified in the request. If the name or ID of the connection author is included in the request, their token will also be revoked. - **connection_identifier** and **configuration_identifiers**: Revokes refresh tokens for all users on the specified configurations, except the configuration author. - **connection_identifier**, **configuration_identifiers**, and **user_identifiers**: Revokes refresh tokens for the specified users on the specified configurations. - **connection_identifier** and **org_identifiers**: Revokes refresh tokens for the specified Orgs. Applicable only for published connections. - **connection_identifier**, **org_identifiers**, and **user_identifiers**: Revokes refresh tokens for the specified users in the specified Orgs. Applicable only for published connections. **NOTE**: The `org_identifiers` parameter is only applicable for published connections. Using this parameter for unpublished connections will result in an error. Ensure that the connections are published before making the API request. + * @param connectionIdentifier Unique ID or name of the connection whose refresh tokens need to be revoked. All the users associated with the connection will have their refresh tokens revoked except the author. + * @param revokeRefreshTokensRequest + */ + revokeRefreshTokens(connectionIdentifier, revokeRefreshTokensRequest, _options) { + const requestContextPromise = this.requestFactory.revokeRefreshTokens(connectionIdentifier, revokeRefreshTokensRequest, _options); + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx) => middleware.pre(ctx))); + } + return middlewarePreObservable.pipe(mergeMap((ctx) => this.configuration.httpApi.send(ctx))).pipe(mergeMap((response) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp) => this.responseProcessor.revokeRefreshTokens(rsp))); + })); + } + /** + * Version: 9.0.0.cl or later Revokes the authentication token issued for current user session. The token of your current session expires when you make a call to the `/api/rest/2.0/auth/token/revoke` endpoint. the users will not be able to access ThoughtSpot objects until a new token is obtained. To restart your session, request for a new token from ThoughtSpot. See [Get Full Access Token](#/http/api-endpoints/authentication/get-full-access-token). + * @param revokeTokenRequest + */ + revokeToken(revokeTokenRequest, _options) { + const requestContextPromise = this.requestFactory.revokeToken(revokeTokenRequest, _options); + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx) => middleware.pre(ctx))); + } + return middlewarePreObservable.pipe(mergeMap((ctx) => this.configuration.httpApi.send(ctx))).pipe(mergeMap((response) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp) => this.responseProcessor.revokeToken(rsp))); + })); + } + /** + * Version: 26.6.0.cl or later Returns the authentication configuration for the specified auth type at cluster and org level. Currently supports `TRUSTED_AUTH`. #### Required privileges Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) or `CONTROL_TRUSTED_AUTH` (**Can Enable or Disable Trusted Authentication**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled, the `CONTROL_TRUSTED_AUTH` privilege is required. #### Usage guidelines Use `scope` to control which level of settings are returned: - `CLUSTER` — Returns cluster-level authentication status and access tokens. Accessible only from the Primary Org. - `ORG` — Returns org-level authentication status and access tokens for the current Org. Requires the per-Org authentication feature to be enabled on your instance. - If `scope` is omitted, both cluster and org-level settings are returned based on the caller\'s org context and feature availability. The `access_tokens` array in `cluster_preferences` or `org_preferences` is omitted when no token is configured at that level. **Note**: Access tokens returned in the response are sensitive credentials. Treat them with the same care as passwords. + * @param searchAuthSettingsRequest + */ + searchAuthSettings(searchAuthSettingsRequest, _options) { + const requestContextPromise = this.requestFactory.searchAuthSettings(searchAuthSettingsRequest, _options); + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx) => middleware.pre(ctx))); + } + return middlewarePreObservable.pipe(mergeMap((ctx) => this.configuration.httpApi.send(ctx))).pipe(mergeMap((response) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp) => this.responseProcessor.searchAuthSettings(rsp))); + })); + } + /** + * Version: 10.12.0.cl or later Gets a list of [custom calendars](https://docs.thoughtspot.com/cloud/latest/connections-cust-cal). Requires `DATAMANAGEMENT` (**Can manage data**) or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your ThoughtSpot instance, the `CAN_MANAGE_CUSTOM_CALENDAR` (**Can manage custom calendars**) privilege is required. #### Usage guidelines By default, the API returns a list of custom calendars for all connection objects. To retrieve custom calendar details for a particular connection, specify the connection ID. You can also use other search parameters such as `name_pattern` and `sort_options` as search filters. The `name_pattern` parameter filters and returns only those objects that match the specified pattern. Use `%` as a wildcard for pattern matching. + * @param searchCalendarsRequest + */ + searchCalendars(searchCalendarsRequest, _options) { + const requestContextPromise = this.requestFactory.searchCalendars(searchCalendarsRequest, _options); + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx) => middleware.pre(ctx))); + } + return middlewarePreObservable.pipe(mergeMap((ctx) => this.configuration.httpApi.send(ctx))).pipe(mergeMap((response) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp) => this.responseProcessor.searchCalendars(rsp))); + })); + } + /** + * Version: 26.4.0.cl or later Searches delivery history for communication channels such as webhooks. Returns channel-level delivery status for each job execution record. Use this to monitor channel health and delivery success rates across events. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) or `DEVELOPER` (**Has developer privilege**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, users with `CAN_MANAGE_WEBHOOKS` (**Can manage webhooks**) privilege are also authorized to perform this action. **NOTE**: When `channel_type` is `WEBHOOK`, the following constraints apply: - `job_ids`, `channel_identifiers`, and `events` each accept at most one element. - When `job_ids` is provided, it is used as the sole lookup key and other filter fields are ignored. - When `job_ids` is not provided, `channel_identifiers` and `events` are both required, each containing exactly one element. - Records older than the configured retention period are not returned. - Use `start_epoch_time_in_millis` and/or `end_epoch_time_in_millis` to narrow results to a specific time window. + * @param searchChannelHistoryRequest + */ + searchChannelHistory(searchChannelHistoryRequest, _options) { + const requestContextPromise = this.requestFactory.searchChannelHistory(searchChannelHistoryRequest, _options); + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx) => middleware.pre(ctx))); + } + return middlewarePreObservable.pipe(mergeMap((ctx) => this.configuration.httpApi.send(ctx))).pipe(mergeMap((response) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp) => this.responseProcessor.searchChannelHistory(rsp))); + })); + } + /** + * Version: 26.4.0.cl or later Gets a list of collections available in ThoughtSpot. To get details of a specific collection, specify the collection GUID or name. You can also filter the API response based on the collection name pattern, author, and other criteria. #### Search options * **name_pattern**: Use \'%\' as a wildcard character to match collection names * **collection_identifiers**: Search for specific collections by their GUIDs or names * **include_metadata**: When set to `true`, includes the metadata objects within each collection in the response **NOTE**: If the API returns an empty list, consider increasing the value of the `record_size` parameter. To search across all available collections, set `record_size` to `-1`. + * @param searchCollectionsRequest + */ + searchCollections(searchCollectionsRequest, _options) { + const requestContextPromise = this.requestFactory.searchCollections(searchCollectionsRequest, _options); + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx) => middleware.pre(ctx))); + } + return middlewarePreObservable.pipe(mergeMap((ctx) => this.configuration.httpApi.send(ctx))).pipe(mergeMap((response) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp) => this.responseProcessor.searchCollections(rsp))); + })); + } + /** + * Version: 9.2.0.cl or later Gets a list of commits for a given metadata object. Requires `DATAMANAGEMENT` (**Can manage data**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance on your instance, the `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` (**Can manage data models**) privilege and edit access to the metadata objects. + * @param searchCommitsRequest + */ + searchCommits(searchCommitsRequest, _options) { + const requestContextPromise = this.requestFactory.searchCommits(searchCommitsRequest, _options); + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx) => middleware.pre(ctx))); + } + return middlewarePreObservable.pipe(mergeMap((ctx) => this.configuration.httpApi.send(ctx))).pipe(mergeMap((response) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp) => this.responseProcessor.searchCommits(rsp))); + })); + } + /** + * Version: 10.14.0.cl or later Fetch communication channel preferences. - Use `cluster_preferences` to fetch the default preferences for your ThoughtSpot application instance. - If your instance has [Orgs](https://docs.thoughtspot.com/cloud/latest/orgs-overview), use `org_preferences` to fetch any Org-specific preferences that override the defaults. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) or `DEVELOPER` (**Has developer privilege**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, users with `APPLICATION_ADMINISTRATION` (**Can manage application settings**) privilege are also authorized to perform this action. + * @param searchCommunicationChannelPreferencesRequest + */ + searchCommunicationChannelPreferences(searchCommunicationChannelPreferencesRequest, _options) { + const requestContextPromise = this.requestFactory.searchCommunicationChannelPreferences(searchCommunicationChannelPreferencesRequest, _options); + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx) => middleware.pre(ctx))); + } + return middlewarePreObservable.pipe(mergeMap((ctx) => this.configuration.httpApi.send(ctx))).pipe(mergeMap((response) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp) => this.responseProcessor.searchCommunicationChannelPreferences(rsp))); + })); + } + /** + * Version: 9.2.0.cl or later Gets Git repository connections configured on the ThoughtSpot instance. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance on your instance, the `CAN_SETUP_VERSION_CONTROL` (**Can set up version control**) privilege. + * @param searchConfigRequest + */ + searchConfig(searchConfigRequest, _options) { + const requestContextPromise = this.requestFactory.searchConfig(searchConfigRequest, _options); + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx) => middleware.pre(ctx))); + } + return middlewarePreObservable.pipe(mergeMap((ctx) => this.configuration.httpApi.send(ctx))).pipe(mergeMap((response) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp) => this.responseProcessor.searchConfig(rsp))); + })); + } + /** + * Version: 9.2.0.cl or later Gets connection objects. Requires `DATAMANAGEMENT` (**Can manage data**) or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) privilege is required. - To get a list of all connections available in the ThoughtSpot system, send the API request without any attributes in the request body. - To get the connection objects for a specific type of data warehouse, specify the type in `data_warehouse_types`. - To fetch details of a connection object, specify the connection object GUID or name. The `name_pattern` attribute allows passing partial text with `%` for a wildcard match. - To get details of the database, schemas, tables, or columns from a data connection object, specify `data_warehouse_object_type`. - To get a specific database, schema, table, or column from a connection object, define the object type in `data_warehouse_object_type` and object properties in the `data_warehouse_objects` array. For example, to search for a column, you must pass the database, schema, and table names in the API request. Note that in the following example, object properties are set in a hierarchical order (`database` > `schema` > `table` > `column`). ``` { \"connections\": [ { \"identifier\": \"b9d1f2ef-fa65-4a4b-994e-30fa2d57b0c2\", \"data_warehouse_objects\": [ { \"database\": \"NEBULADEV\", \"schema\": \"INFORMATION_SCHEMA\", \"table\": \"APPLICABLE_ROLES\", \"column\": \"ROLE_NAME\" } ] } ], \"data_warehouse_object_type\": \"COLUMN\" } ``` - To fetch data by `configuration`, specify `data_warehouse_object_type`. For example, to fetch columns from the `DEVELOPMENT` database, specify the `data_warehouse_object_type` as `DATABASE` and define the `configuration` string as `{\"database\":\"DEVELOPMENT\"}`. To get column data for a specific table, specify the table, for example,`{\"database\":\"RETAILAPPAREL\",\"table\":\"PIPES\"}`. - To query connections by `authentication_type`, specify `data_warehouse_object_type`. Supported values for `authentication_type` are: - `SERVICE_ACCOUNT`: For connections that require service account credentials to authenticate to the Cloud Data Warehouse and fetch data. - `OAUTH`: For connections that require OAuth credentials to authenticate to the Cloud Data Warehouse and fetch data. Teradata, Oracle, and Presto Cloud Data Warehouses do not support the OAuth authentication type. - `IAM`: For connections that have the IAM OAuth set up. This authentication type is supported on Amazon Redshift connections only. - `EXTOAUTH`: For connections that have External OAuth set up. ThoughtSpot supports external [OAuth with Microsoft Azure Active Directory (AD)](https://docs.thoughtspot.com/cloud/latest/ connections-snowflake-azure-ad-oauth) and [Okta for Snowflake data connections](https://docs.thoughtspot.com/cloud/latest/connections-snowflake-okta-oauth). - `KEY_PAIR`: For connections that require Key Pair account credentials to authenticate to the Cloud Data Warehouse and fetch data. This authentication type is supported on Snowflake connections only. - `OAUTH_WITH_PKCE`: For connections that require OAuth with PKCE account credentials to authenticate to the Cloud Data Warehouse and fetch data. This authentication type is supported on Snowflake, Starburst, Databricks, Denodo connections only. - `EXTOAUTH_WITH_PKCE`: For connections that require External OAuth With PKCE account credentials to authenticate to the Cloud Data Warehouse and fetch data. This authentication type is supported on Snowflake connections only. - `OAUTH_WITH_PEZ`: For connections that require OAuth With PEZ account credentials to authenticate to the Cloud Data Warehouse and fetch data. This authentication type is supported on Amazon Redshift connections only. - `OAUTH_WITH_SERVICE_PRINCIPAL`: For connections that require OAuth With Service Principal account credentials to authenticate to the Cloud Data Warehouse and fetch data. This authentication type is supported on Databricks connections only. - `PERSONAL_ACCESS_TOKEN`: For connections that require Personal Access Token account credentials to authenticate to the Cloud Data Warehouse and fetch data. This authentication type is supported on Databricks connections only. - `OAUTH_CLIENT_CREDENTIALS`: For connections that require OAuth Client Credentials to authenticate to the Cloud Data Warehouse and fetch data. This authentication type is supported on Snowflake connections only. - To include more details about connection objects in the API response, set `include_details` to `true`. - You can also sort the output by field names and filter connections by tags. **NOTE**: When filtering connection records by parameters other than `data_warehouse_types` or `tag_identifiers`, ensure that you set `record_size` to `-1` and `record_offset` to `0` for precise results. + * @param searchConnectionRequest + */ + searchConnection(searchConnectionRequest, _options) { + const requestContextPromise = this.requestFactory.searchConnection(searchConnectionRequest, _options); + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx) => middleware.pre(ctx))); + } + return middlewarePreObservable.pipe(mergeMap((ctx) => this.configuration.httpApi.send(ctx))).pipe(mergeMap((response) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp) => this.responseProcessor.searchConnection(rsp))); + })); + } + /** + * Version: 9.6.0.cl or later Gets custom actions configured on the cluster. Requires `DEVELOPER` (**Has Developer privilege**) or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `DEVELOPER` (**Has developer privilege**) privilege is required. + * @param searchCustomActionsRequest + */ + searchCustomActions(searchCustomActionsRequest, _options) { + const requestContextPromise = this.requestFactory.searchCustomActions(searchCustomActionsRequest, _options); + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx) => middleware.pre(ctx))); + } + return middlewarePreObservable.pipe(mergeMap((ctx) => this.configuration.httpApi.send(ctx))).pipe(mergeMap((response) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp) => this.responseProcessor.searchCustomActions(rsp))); + })); + } + /** + * Version: 9.0.0.cl or later Generates an Answer from a given data source. Requires at least view access to the data source object (Worksheet or View). #### Usage guidelines To search data, specify the data source GUID in `logical_table_identifier`. The data source can be a Worksheet, View, Table, or SQL view. Pass search tokens in the `query_string` attribute in the API request as shown in the following example: ``` { \"query_string\": \"[sales] by [store]\", \"logical_table_identifier\": \"cd252e5c-b552-49a8-821d-3eadaa049cca\", } ``` For more information about the `query_string` format and data source attribute, see [Search data API](https://developers.thoughtspot.com/docs/fetch-data-and-report-apis#_search_data_api). The `record_size` attribute determines the number of records to retrieve in an API call. For more information about pagination, record size, and maximum row limit, see [Pagination and record size settings](https://developers.thoughtspot.com/docs/fetch-data-and-report-apis#_pagination_settings_for_data_and_report_api). + * @param searchDataRequest + */ + searchData(searchDataRequest, _options) { + const requestContextPromise = this.requestFactory.searchData(searchDataRequest, _options); + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx) => middleware.pre(ctx))); + } + return middlewarePreObservable.pipe(mergeMap((ctx) => this.configuration.httpApi.send(ctx))).pipe(mergeMap((response) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp) => this.responseProcessor.searchData(rsp))); + })); + } + /** + * Version: 10.10.0.cl or later Search the email customization configuration if any set for the ThoughtSpot system. #### Pre-requisites Requires `DEVELOPER` (**has developer privilege**) or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `DEVELOPER` (**Has developer privilege**) privilege is required. **NOTE**:This endpoint in currently in beta. Contact ThoughtSpot support to enable this on your instance. + * @param searchEmailCustomizationRequest + */ + searchEmailCustomization(searchEmailCustomizationRequest, _options) { + const requestContextPromise = this.requestFactory.searchEmailCustomization(searchEmailCustomizationRequest, _options); + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx) => middleware.pre(ctx))); + } + return middlewarePreObservable.pipe(mergeMap((ctx) => this.configuration.httpApi.send(ctx))).pipe(mergeMap((response) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp) => this.responseProcessor.searchEmailCustomization(rsp))); + })); + } + /** + * Version: 9.0.0.cl or later Gets a list of metadata objects available on the ThoughtSpot system. This API endpoint is available to all users who have view access to the object. Users with `ADMINISTRATION` (**Can administer ThoughtSpot**) privileges can view data for all metadata objects, including users and groups. #### Usage guidelines - To get all metadata objects, send the API request without any attributes. - To get metadata objects of a specific type, set the `type` attribute. For example, to fetch a Worksheet, set the type as `LOGICAL_TABLE`. - To filter metadata objects within type `LOGICAL_TABLE`, set the `subtypes` attribute. For example, to fetch a Worksheet, set the type as `LOGICAL_TABLE` & subtypes as `[WORKSHEET]`. - To get a specific metadata object, specify the GUID. - To customize your search and filter the API response, you can use several parameters. You can search for objects created or modified by specific users, by tags applied to the objects, or by using the include parameters like `include_auto_created_objects`, `include_dependent_objects`, `include_headers`, `include_incomplete_objects`, and so on. You can also define sorting options to sort the data retrieved in the API response. - To get discoverable objects when linientmodel is enabled you can use `include_discoverable_objects` as true else false. Default value is true. - For liveboard metadata type, to get the newer format, set the `liveboard_response_format` as V2. Default value is V1. - To retrieve only objects that are published, set the `include_only_published_objects` as true. Default value is false. **NOTE**: The following parameters support pagination of metadata records: - `tag_identifiers` - `type` - `subtypes` - `created_by_user_identifiers` - `modified_by_user_identifiers` - `owned_by_user_identifiers` - `exclude_objects` - `include_auto_created_objects` - `favorite_object_options` - `include_only_published_objects` If you are using other parameters to search metadata, set `record_size` to `-1` and `record_offset` to `0`. + * @param searchMetadataRequest + */ + searchMetadata(searchMetadataRequest, _options) { + const requestContextPromise = this.requestFactory.searchMetadata(searchMetadataRequest, _options); + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx) => middleware.pre(ctx))); + } + return middlewarePreObservable.pipe(mergeMap((ctx) => this.configuration.httpApi.send(ctx))).pipe(mergeMap((response) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp) => this.responseProcessor.searchMetadata(rsp))); + })); + } + /** + * Version: 9.0.0.cl or later Gets a list of Orgs configured on the ThoughtSpot system. To get details of a specific Org, specify the Org ID or name. You can also pass parameters such as status, visibility, and user identifiers to get a specific list of Orgs. Requires cluster administration (**Can administer Org**) privileges. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `ORG_ADMINISTRATION` (**Can manage Orgs**) privilege is required. + * @param searchOrgsRequest + */ + searchOrgs(searchOrgsRequest, _options) { + const requestContextPromise = this.requestFactory.searchOrgs(searchOrgsRequest, _options); + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx) => middleware.pre(ctx))); + } + return middlewarePreObservable.pipe(mergeMap((ctx) => this.configuration.httpApi.send(ctx))).pipe(mergeMap((response) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp) => this.responseProcessor.searchOrgs(rsp))); + })); + } + /** + * Version: 9.5.0.cl or later Gets a list of Role objects from the ThoughtSpot system. Available if [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance. To search for Roles, the `ROLE_ADMINISTRATION` (**Can manage roles**) privilege is required. To get details of a specific Role object, specify the GUID or name. You can also filter the API response based on user group and Org identifiers, privileges assigned to the Role, and deprecation status. + * @param searchRolesRequest + */ + searchRoles(searchRolesRequest, _options) { + const requestContextPromise = this.requestFactory.searchRoles(searchRolesRequest, _options); + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx) => middleware.pre(ctx))); + } + return middlewarePreObservable.pipe(mergeMap((ctx) => this.configuration.httpApi.send(ctx))).pipe(mergeMap((response) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp) => this.responseProcessor.searchRoles(rsp))); + })); + } + /** + * Search Schedules Version: 9.4.0.cl or later Gets a list of scheduled jobs configured for a Liveboard. To get details of a specific scheduled job, specify the name or GUID of the scheduled job. Requires at least view access to Liveboards. **NOTE**: When filtering schedules by parameters other than `metadata`, set `record_size` to `-1` and `record_offset` to `0` for accurate results. + * @param searchSchedulesRequest + */ + searchSchedules(searchSchedulesRequest, _options) { + const requestContextPromise = this.requestFactory.searchSchedules(searchSchedulesRequest, _options); + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx) => middleware.pre(ctx))); + } + return middlewarePreObservable.pipe(mergeMap((ctx) => this.configuration.httpApi.send(ctx))).pipe(mergeMap((response) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp) => this.responseProcessor.searchSchedules(rsp))); + })); + } + /** + * Version: 26.2.0.cl or later Fetch security settings for your ThoughtSpot application instance. - Use `scope: CLUSTER` to retrieve cluster-level security settings, including CORS and CSP allowlists, SAML redirect URLs, and settings that control access to non-embedded pages. - Use `scope: ORG` to retrieve Org-level security settings. If your instance has [Orgs](https://docs.thoughtspot.com/cloud/latest/orgs-overview), this returns CORS and non-embed access settings specific to the Org. - If `scope` is not specified, returns both cluster and Org-specific settings based on user privileges. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) or `DEVELOPER` (**Has developer privilege**) privilege. See [Security Settings](https://developers.thoughtspot.com/docs/security-settings) for more details. + * @param searchSecuritySettingsRequest + */ + searchSecuritySettings(searchSecuritySettingsRequest, _options) { + const requestContextPromise = this.requestFactory.searchSecuritySettings(searchSecuritySettingsRequest, _options); + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx) => middleware.pre(ctx))); + } + return middlewarePreObservable.pipe(mergeMap((ctx) => this.configuration.httpApi.send(ctx))).pipe(mergeMap((response) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp) => this.responseProcessor.searchSecuritySettings(rsp))); + })); + } + /** + * Version: 9.0.0.cl or later Gets a list of tag objects available on the ThoughtSpot system. To get details of a specific tag object, specify the GUID or name. Any authenticated user can search for tag objects. + * @param searchTagsRequest + */ + searchTags(searchTagsRequest, _options) { + const requestContextPromise = this.requestFactory.searchTags(searchTagsRequest, _options); + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx) => middleware.pre(ctx))); + } + return middlewarePreObservable.pipe(mergeMap((ctx) => this.configuration.httpApi.send(ctx))).pipe(mergeMap((response) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp) => this.responseProcessor.searchTags(rsp))); + })); + } + /** + * Version: 9.0.0.cl or later Gets a list of user group objects from the ThoughtSpot system. To get details of a specific user group, specify the user group GUID or name. You can also filter the API response based on User ID, Org ID, Role ID, type of group, sharing visibility, privileges assigned to the group, and the Liveboard IDs assigned to the users in the group. Available to all users. Users with `ADMINISTRATION` (**Can administer ThoughtSpot**) privileges can view all users properties. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `GROUP_ADMINISTRATION` (**Can manage groups**) privilege is required. **NOTE**: If you do not get precise results, try setting `record_size` to `-1` and `record_offset` to `0`. + * @param searchUserGroupsRequest + */ + searchUserGroups(searchUserGroupsRequest, _options) { + const requestContextPromise = this.requestFactory.searchUserGroups(searchUserGroupsRequest, _options); + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx) => middleware.pre(ctx))); + } + return middlewarePreObservable.pipe(mergeMap((ctx) => this.configuration.httpApi.send(ctx))).pipe(mergeMap((response) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp) => this.responseProcessor.searchUserGroups(rsp))); + })); + } + /** + * Version: 9.0.0.cl or later Gets a list of users available on the ThoughtSpot system. To get details of a specific user, specify the user GUID or name. You can also filter the API response based on groups, Org ID, user visibility, account status, user type, and user preference settings and favorites. Available to all users. Users with `ADMINISTRATION` (**Can administer ThoughtSpot**) privileges can view all users properties. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `USER_ADMINISTRATION` (**Can manage users**) privilege is required. **NOTE**: If the API returns an empty list, consider increasing the value of the `record_size` parameter. To search across all available users, set `record_size` to `-1`. + * @param searchUsersRequest + */ + searchUsers(searchUsersRequest, _options) { + const requestContextPromise = this.requestFactory.searchUsers(searchUsersRequest, _options); + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx) => middleware.pre(ctx))); + } + return middlewarePreObservable.pipe(mergeMap((ctx) => this.configuration.httpApi.send(ctx))).pipe(mergeMap((response) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp) => this.responseProcessor.searchUsers(rsp))); + })); + } + /** + * Search variables Version: 26.4.0.cl or later Allows searching for variables in ThoughtSpot. Requires ADMINISTRATION role. The CAN_MANAGE_VARIABLES permission allows you to manage Formula Variables in the current organization scope. The API endpoint supports searching variables by: * Variable identifier (ID or name) * Variable type * Name pattern (case-insensitive, supports % for wildcard) The search results can be formatted in three ways: * METADATA - Returns only variable metadata (default) * METADATA_AND_VALUES - Returns variable metadata and values The values can be filtered by scope: * org_identifier * principal_identifier * model_identifier + * @param searchVariablesRequest + */ + searchVariables(searchVariablesRequest, _options) { + const requestContextPromise = this.requestFactory.searchVariables(searchVariablesRequest, _options); + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx) => middleware.pre(ctx))); + } + return middlewarePreObservable.pipe(mergeMap((ctx) => this.configuration.httpApi.send(ctx))).pipe(mergeMap((response) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp) => this.responseProcessor.searchVariables(rsp))); + })); + } + /** + * Version: 10.14.0.cl or later Searches for webhook configurations based on various criteria such as Org, webhook identifier, event type, with support for pagination and sorting. Returns matching webhook configurations with their complete details. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) or `DEVELOPER` (**Has developer privilege**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, users with `CAN_MANAGE_WEBHOOKS` (**Can manage webhooks**) privilege are also authorized to perform this action. + * @param searchWebhookConfigurationsRequest + */ + searchWebhookConfigurations(searchWebhookConfigurationsRequest, _options) { + const requestContextPromise = this.requestFactory.searchWebhookConfigurations(searchWebhookConfigurationsRequest, _options); + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx) => middleware.pre(ctx))); + } + return middlewarePreObservable.pipe(mergeMap((ctx) => this.configuration.httpApi.send(ctx))).pipe(mergeMap((response) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp) => this.responseProcessor.searchWebhookConfigurations(rsp))); + })); + } + /** + * Version: 26.5.0.cl or later Sends natural language messages to an existing Spotter agent conversation and returns the complete response synchronously. Requires `CAN_USE_SPOTTER` privilege and access to the metadata object associated with the conversation. The user must have access to the conversation session referenced by `conversation_identifier`. A conversation must first be created using the `createAgentConversation` API. #### Usage guidelines The request must include: - `conversation_identifier`: the unique session ID returned by `createAgentConversation`, used for context continuity and message tracking - `messages`: an array of one or more text messages to send to the agent The API returns an array of response objects, each containing: - `type`: the kind of response — `text`, `answer`, or `error` - `message`: the main content of the response - `metadata`: additional information depending on the message type (e.g., answer metadata includes analytics and visualization details) #### Error responses | Code | Description | |------|----------------------------------------------------------------------------------------------------------------------------------| | 401 | Unauthorized — authentication token is missing, expired, or invalid. | | 403 | Forbidden — the authenticated user does not have `CAN_USE_SPOTTER` privilege or lacks permission on the referenced conversation. | > ###### Note: > > - This endpoint is Generally Available from version 26.5.0.cl. > - This endpoint requires Spotter - please contact ThoughtSpot support to enable Spotter on your cluster. > - For real-time streamed responses, use `sendAgentConversationMessageStreaming` instead. + * @param conversationIdentifier Unique identifier for the conversation (used to track context) + * @param sendAgentConversationMessageRequest + */ + sendAgentConversationMessage(conversationIdentifier, sendAgentConversationMessageRequest, _options) { + const requestContextPromise = this.requestFactory.sendAgentConversationMessage(conversationIdentifier, sendAgentConversationMessageRequest, _options); + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx) => middleware.pre(ctx))); + } + return middlewarePreObservable.pipe(mergeMap((ctx) => this.configuration.httpApi.send(ctx))).pipe(mergeMap((response) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp) => this.responseProcessor.sendAgentConversationMessage(rsp))); + })); + } + /** + * Version: 26.5.0.cl or later Sends one or more natural language messages to an existing Spotter agent conversation and returns the response as a real-time Server-Sent Events stream. Requires `CAN_USE_SPOTTER` privilege and access to the metadata object associated with the conversation. The user must have access to the conversation session referenced by `conversation_identifier`. A conversation must first be created using the `createAgentConversation` API. #### Usage guidelines The request must include: - `conversation_identifier`: the unique session ID returned by `createAgentConversation`, used for context continuity and message tracking - `messages`: an array of one or more text messages to send to the agent If the request is valid, the API returns a Server-Sent Events (SSE) stream. Each line has the form `data: [{\"type\": \"...\", ...}]` — a JSON array of event objects. Event types include: - `ack`: confirms receipt of the request (`node_id`) - `conv_title`: conversation title (`title`, `conv_id`) - `notification`: status updates on operations (`group_id`, `metadata`, `code` — e.g. `TOOL_CALL_NOTIFICATION`, `nls_start`, `FINAL_RESPONSE_NOTIFICATION`) - `text-chunk`: incremental content chunks (`id`, `group_id`, `metadata` with `format` and `type` such as `thinking` or `text`, `content`) - `text`: full text block with same structure as `text-chunk` - `answer`: structured answer with metadata (`id`, `group_id`, `metadata` with `sage_query`, `session_id`, `title`, etc., `title`) - `error`: if a failure occurs #### Error responses | Code | Description | | ---- | -------------------------------------------------------------------------------------------------------------------------------- | | 401 | Unauthorized — authentication token is missing, expired, or invalid. | | 403 | Forbidden — the authenticated user does not have `CAN_USE_SPOTTER` privilege or lacks permission on the referenced conversation. | > ###### Note: > > - This endpoint is Generally Available from version 26.5.0.cl. > - This endpoint requires Spotter - please contact ThoughtSpot support to enable Spotter on your cluster. > - The streaming protocol uses Server-Sent Events (SSE). > - For the complete response in a single payload, use `sendAgentConversationMessage` instead. + * @param conversationIdentifier Unique identifier for the conversation (used to track context) + * @param sendAgentConversationMessageStreamingRequest + */ + sendAgentConversationMessageStreaming(conversationIdentifier, sendAgentConversationMessageStreamingRequest, _options) { + const requestContextPromise = this.requestFactory.sendAgentConversationMessageStreaming(conversationIdentifier, sendAgentConversationMessageStreamingRequest, _options); + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx) => middleware.pre(ctx))); + } + return middlewarePreObservable.pipe(mergeMap((ctx) => this.configuration.httpApi.send(ctx))).pipe(mergeMap((response) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp) => this.responseProcessor.sendAgentConversationMessageStreaming(rsp))); + })); + } + /** + * Version: 26.2.0.cl or later **Deprecated** — Use `sendAgentConversationMessage` instead. Send natural language messages to an existing Spotter agent conversation and returns the complete response synchronously. Requires `CAN_USE_SPOTTER` privilege and access to the metadata object associated with the conversation. The user must have access to the conversation session referenced by `conversation_identifier`. A conversation must first be created using the `createAgentConversation` API. #### Usage guidelines The request must include: - `conversation_identifier`: the unique session ID returned by `createAgentConversation`, used for context continuity and message tracking - `messages`: an array of one or more text messages to send to the agent The API returns an array of response objects, each containing: - `type`: the kind of response — `text`, `answer`, or `error` - `message`: the main content of the response - `metadata`: additional information depending on the message type (e.g., answer metadata includes analytics and visualization details) #### Error responses | Code | Description | |------|----------------------------------------------------------------------------------------------------------------------------------| | 401 | Unauthorized — authentication token is missing, expired, or invalid. | | 403 | Forbidden — the authenticated user does not have `CAN_USE_SPOTTER` privilege or lacks permission on the referenced conversation. | > ###### Note: > > - This endpoint is deprecated. Use `sendAgentConversationMessage` for new integrations. > - This endpoint is currently in Beta. Breaking changes may be introduced before the endpoint is made Generally Available. > - This endpoint requires Spotter - please contact ThoughtSpot support to enable Spotter on your cluster. + * @param conversationIdentifier Unique identifier for the conversation (used to track context) + * @param sendAgentMessageRequest + */ + sendAgentMessage(conversationIdentifier, sendAgentMessageRequest, _options) { + const requestContextPromise = this.requestFactory.sendAgentMessage(conversationIdentifier, sendAgentMessageRequest, _options); + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx) => middleware.pre(ctx))); + } + return middlewarePreObservable.pipe(mergeMap((ctx) => this.configuration.httpApi.send(ctx))).pipe(mergeMap((response) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp) => this.responseProcessor.sendAgentMessage(rsp))); + })); + } + /** + * Version: 26.2.0.cl or later **Deprecated** — Use `sendAgentConversationMessageStreaming` instead. Sends one or more natural language messages to an existing Spotter agent conversation and returns the response as a real-time Server-Sent Events stream. Requires `CAN_USE_SPOTTER` privilege and access to the metadata object associated with the conversation. The user must have access to the conversation session referenced by `conversation_identifier`. A conversation must first be created using the `createAgentConversation` API. #### Usage guidelines The request must include: - `conversation_identifier`: the unique session ID returned by `createAgentConversation`, used for context continuity and message tracking - `messages`: an array of one or more text messages to send to the agent If the request is valid, the API returns a Server-Sent Events (SSE) stream. Each line has the form `data: [{\"type\": \"...\", ...}]` — a JSON array of event objects. Event types include: - `ack`: confirms receipt of the request (`node_id`) - `conv_title`: conversation title (`title`, `conv_id`) - `notification`: status updates on operations (`group_id`, `metadata`, `code` — e.g. `TOOL_CALL_NOTIFICATION`, `nls_start`, `FINAL_RESPONSE_NOTIFICATION`) - `text-chunk`: incremental content chunks (`id`, `group_id`, `metadata` with `format` and `type` such as `thinking` or `text`, `content`) - `text`: full text block with same structure as `text-chunk` - `answer`: structured answer with metadata (`id`, `group_id`, `metadata` with `sage_query`, `session_id`, `title`, etc., `title`) - `error`: if a failure occurs #### Error responses | Code | Description | |------|----------------------------------------------------------------------------------------------------------------------------------| | 401 | Unauthorized — authentication token is missing, expired, or invalid. | | 403 | Forbidden — the authenticated user does not have `CAN_USE_SPOTTER` privilege or lacks permission on the referenced conversation. | > ###### Note: > > - This endpoint is deprecated. Use `sendAgentConversationMessageStreaming` for new integrations. > - This endpoint is currently in Beta. Breaking changes may be introduced before the endpoint is made Generally Available. > - This endpoint requires Spotter - please contact ThoughtSpot support to enable Spotter on your cluster. > - The streaming protocol uses Server-Sent Events (SSE). + * @param sendAgentMessageStreamingRequest + */ + sendAgentMessageStreaming(sendAgentMessageStreamingRequest, _options) { + const requestContextPromise = this.requestFactory.sendAgentMessageStreaming(sendAgentMessageStreamingRequest, _options); + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx) => middleware.pre(ctx))); + } + return middlewarePreObservable.pipe(mergeMap((ctx) => this.configuration.httpApi.send(ctx))).pipe(mergeMap((response) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp) => this.responseProcessor.sendAgentMessageStreaming(rsp))); + })); + } + /** + * Version: 10.4.0.cl or later Sends a follow-up message to an existing conversation within the context of a data model. Requires `CAN_USE_SPOTTER` privilege and at least view access to the metadata object specified in the request. A conversation must first be created using the `createConversation` API. #### Usage guidelines The request must include: - `conversation_identifier`: the unique session ID returned by `createConversation` - `metadata_identifier`: the unique ID of the data source used for the conversation - `message`: a natural language string with the follow-up question If the request is successful, the API returns an array of response messages, each containing: - `session_identifier`: the unique ID of the generated response - `generation_number`: the generation number of the response - `message_type`: the type of the response (e.g., `TSAnswer`) - `visualization_type`: the generated visualization type (`Chart`, `Table`, or `Undefined`) - `tokens` / `display_tokens`: the search tokens and user-friendly display tokens for the response #### Error responses | Code | Description | |------|-----------------------------------------------------------------------------------------------------------------------------------------| | 401 | Unauthorized — authentication token is missing, expired, or invalid. | | 403 | Forbidden — the authenticated user does not have `CAN_USE_SPOTTER` privilege or lacks view permission on the specified metadata object. | > ###### Note: > * This endpoint is currently in Beta. Breaking changes may be introduced before the endpoint is made Generally Available. > * This endpoint requires Spotter - please contact ThoughtSpot support to enable Spotter on your cluster. + * @param conversationIdentifier Unique identifier of the conversation. + * @param sendMessageRequest + */ + sendMessage(conversationIdentifier, sendMessageRequest, _options) { + const requestContextPromise = this.requestFactory.sendMessage(conversationIdentifier, sendMessageRequest, _options); + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx) => middleware.pre(ctx))); + } + return middlewarePreObservable.pipe(mergeMap((ctx) => this.configuration.httpApi.send(ctx))).pipe(mergeMap((response) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp) => this.responseProcessor.sendMessage(rsp))); + })); + } + /** + * Version: 10.15.0.cl or later This API allows users to set natural language (NL) instructions for a specific data-model to improve AI-generated answers and query processing. These instructions help guide the AI system to better understand the data context and provide more accurate responses. Requires `CAN_USE_SPOTTER` privilege, either edit access or `SPOTTER_COACHING_PRIVILEGE` on the data model, and a bearer token corresponding to the org where the data model exists. #### Usage guidelines To set NL instructions for a data-model, the request must include: - `data_source_identifier`: The unique ID of the data-model for which to set NL instructions - `nl_instructions_info`: An array of instruction objects, each containing: - `instructions`: Array of text instructions for the LLM - `scope`: The scope of the instruction (`GLOBAL`). Currently only `GLOBAL` is supported. It can be extended to data-model-user scope in future. #### Instructions scope - **GLOBAL**: instructions that apply to all users querying this data model If the request is successful, the API returns: - `success`: a boolean indicating whether the operation completed successfully #### Error responses | Code | Description | |------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| | 401 | Unauthorized — authentication token is missing, expired, or invalid. | | 403 | Forbidden — the authenticated user does not have `CAN_USE_SPOTTER` privilege, lacks edit access or `SPOTTER_COACHING_PRIVILEGE` on the data model, or the bearer token does not correspond to the org where the data model exists. | > ###### Note: > > - To use this API, the user needs either edit access or `SPOTTER_COACHING_PRIVILEGE` on the data model, and must use the bearer token corresponding to the org where the data model exists. > - This endpoint is currently in Beta. Breaking changes may be introduced before the endpoint is made Generally Available. > - Available from version 10.15.0.cl and later. > - This endpoint requires Spotter — please contact ThoughtSpot Support to enable Spotter on your cluster. > - Instructions help improve the accuracy and relevance of AI-generated responses for the specified data-model. + * @param setNLInstructionsRequest + */ + setNLInstructions(setNLInstructionsRequest, _options) { + const requestContextPromise = this.requestFactory.setNLInstructions(setNLInstructionsRequest, _options); + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx) => middleware.pre(ctx))); + } + return middlewarePreObservable.pipe(mergeMap((ctx) => this.configuration.httpApi.send(ctx))).pipe(mergeMap((response) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp) => this.responseProcessor.setNLInstructions(rsp))); + })); + } + /** + * Version: 9.0.0.cl or later Allows sharing one or several metadata objects with users and groups in ThoughtSpot. Requires edit access to the metadata object. #### Supported metadata objects: * Liveboards * Visualizations * Answers * Models * Views * Connections * Collections #### Object permissions You can provide `READ_ONLY` or `MODIFY` access when sharing an object with another user or group. The `READ_ONLY` permission grants view access to the shared object, whereas `MODIFY` provides edit access. To prevent a user or group from accessing the shared object, specify the GUID or name of the principal and set `shareMode` to `NO_ACCESS`. #### Sharing a visualization * Sharing a visualization implicitly shares the entire Liveboard with the recipient. * Object permissions set for a shared visualization also apply to the Liveboard unless overridden by another API request or via UI. * If email notifications for object sharing are enabled, a notification with a link to the shared visualization will be sent to the recipient’s email address. Although this link opens the shared visualization, recipients can also access other visualizations in the Liveboard. #### Sharing a collection Collections support **dual permissions** that provide fine-grained control: * **Collection permissions** (`share_mode`) - controls access to the collection itself (view, edit, delete the collection) * **Content permissions** (`content_share_mode`) - controls access to objects within the collection (view, edit objects inside) **Default Behavior:** - If only `share_mode` is specified, the content permissions default to `READ_ONLY` (except when `share_mode` is `NO_ACCESS`, then content also gets `NO_ACCESS`) - To give users edit access to collection contents, explicitly set `content_share_mode: \"MODIFY\"` ## Examples The following JSON examples can be copy-pasted as request bodies for the REST v2 API endpoint: ```bash POST /callosum/v1/v2/security/metadata/share Content-Type: application/x-www-form-urlencoded ``` ### Basic collection sharing Share a collection with read-only access: ```json { \"metadata_type\": \"COLLECTION\", \"metadata_identifiers\": [\"Sales Reports Collection\"], \"permissions\": [{ \"principal\": { \"type\": \"USER\", \"identifier\": \"alice@company.com\" }, \"share_mode\": \"READ_ONLY\" }], \"notification\": { \"message\": \"I\'ve shared the Sales Reports collection with you\", \"notify_on_share\": true } } ``` ### Collection sharing with dual permissions Share a collection with different permissions for the collection vs. its contents: ```json { \"metadata_type\": \"COLLECTION\", \"metadata_identifiers\": [\"Marketing Analytics\"], \"permissions\": [{ \"principal\": { \"type\": \"USER\", \"identifier\": \"bob@company.com\" }, \"share_mode\": \"MODIFY\", \"content_share_mode\": \"READ_ONLY\" }, { \"principal\": { \"type\": \"USER_GROUP\", \"identifier\": \"Marketing Team\" }, \"share_mode\": \"READ_ONLY\", \"content_share_mode\": \"READ_ONLY\" }], \"notification\": { \"emails\": [\"bob@company.com\"], \"message\": \"You can edit the collection but content is read-only\", \"enable_custom_url\": false, \"notify_on_share\": true }, \"has_lenient_discoverability\": false } ``` ### Multiple collections sharing Share multiple collections with different users: ```json { \"metadata\": [ { \"type\": \"COLLECTION\", \"identifier\": \"Q4 Reports\" }, { \"type\": \"COLLECTION\", \"identifier\": \"Executive Dashboard Collection\" } ], \"permissions\": [{ \"principal\": { \"type\": \"USER_GROUP\", \"identifier\": \"Executives\" }, \"share_mode\": \"MODIFY\" }, { \"principal\": { \"type\": \"USER\", \"identifier\": \"manager@company.com\" }, \"share_mode\": \"READ_ONLY\", \"content_share_mode\": \"MODIFY\" }], \"notification\": { \"message\": \"Sharing quarterly collections with leadership team\", \"notify_on_share\": true } } ``` ### Remove collection access Remove access to a collection by setting share_mode to NO_ACCESS: ```json { \"metadata_type\": \"COLLECTION\", \"metadata_identifiers\": [\"Confidential Reports\"], \"permissions\": [{ \"principal\": { \"type\": \"USER\", \"identifier\": \"former-employee@company.com\" }, \"share_mode\": \"NO_ACCESS\" }], \"notification\": { \"notify_on_share\": false } } ``` ### Collection Permission Scenarios **Scenario 1: Collection Admin** - `share_mode: MODIFY` + `content_share_mode: MODIFY` = Full control over collection and its contents **Scenario 2: Collection Curator** - `share_mode: MODIFY` + `content_share_mode: READ_ONLY` = Can manage collection structure but not edit contents **Scenario 3: Content Editor** - `share_mode: READ_ONLY` + `content_share_mode: MODIFY` = Can edit objects within collection but can\'t change collection itself **Scenario 4: Viewer** - `share_mode: READ_ONLY` + `content_share_mode: READ_ONLY` = View-only access to collection and contents + * @param shareMetadataRequest + */ + shareMetadata(shareMetadataRequest, _options) { + const requestContextPromise = this.requestFactory.shareMetadata(shareMetadataRequest, _options); + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx) => middleware.pre(ctx))); + } + return middlewarePreObservable.pipe(mergeMap((ctx) => this.configuration.httpApi.send(ctx))).pipe(mergeMap((response) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp) => this.responseProcessor.shareMetadata(rsp))); + })); + } + /** + * Version: 10.4.0.cl or later Processes a natural language query against a specified data model and returns a single AI-generated answer without requiring a conversation session. Requires `CAN_USE_SPOTTER` privilege and at least view access to the metadata object specified in the request. #### Usage guidelines The request must include: - `query`: a natural language question (e.g., \"What were total sales last quarter?\") - `metadata_identifier`: the unique ID of the data source to query against If the request is successful, the API returns a response message containing: - `session_identifier`: the unique ID of the generated response - `generation_number`: the generation number of the response - `message_type`: the type of the response (e.g., `TSAnswer`) - `visualization_type`: the generated visualization type (`Chart`, `Table`, or `Undefined`) - `tokens` / `display_tokens`: the search tokens and user-friendly display tokens for the response #### Error responses | Code | Description | |------|-----------------------------------------------------------------------------------------------------------------------------------------| | 401 | Unauthorized — authentication token is missing, expired, or invalid. | | 403 | Forbidden — the authenticated user does not have `CAN_USE_SPOTTER` privilege or lacks view permission on the specified metadata object. | > ###### Note: > * This endpoint is currently in Beta. Breaking changes may be introduced before the endpoint is made Generally Available. > * This endpoint requires Spotter - please contact ThoughtSpot support to enable Spotter on your cluster. + * @param singleAnswerRequest + */ + singleAnswer(singleAnswerRequest, _options) { + const requestContextPromise = this.requestFactory.singleAnswer(singleAnswerRequest, _options); + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx) => middleware.pre(ctx))); + } + return middlewarePreObservable.pipe(mergeMap((ctx) => this.configuration.httpApi.send(ctx))).pipe(mergeMap((response) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp) => this.responseProcessor.singleAnswer(rsp))); + })); + } + /** + * Stops an in-progress agent conversation response. Version: 26.6.0.cl or later Version: 26.6.0.cl or later Stops an in-progress agent response for the specified conversation. Use this endpoint to cancel a response that is actively being generated — for example, when the user navigates away, reformulates their question, or no longer needs the current result. Requires `CAN_USE_SPOTTER` privilege and access to the specified conversation. #### Usage guidelines The request must include: - `conversation_identifier` *(path parameter)*: the unique ID of the conversation whose active response should be stopped, as returned by `createAgentConversation` A successful request returns an empty `204 No Content` response. If there is no active response in progress at the time of the call, the request is still treated as successful. After stopping a response, the conversation session remains active. You can continue sending messages using `sendAgentConversationMessage` or `sendAgentConversationMessageStreaming`. #### Example request ```bash POST /api/rest/2.0/ai/agent/conversation/{conversation_identifier}/stop-response ``` #### Typical usage scenario This endpoint is useful when integrating Spotter into a chat UI where users can cancel a long-running query. For example: 1. User sends a message via `sendAgentConversationMessageStreaming`. 2. User clicks a \"Stop generating\" button while the response is streaming. 3. Your client calls `stopConversation` with the active `conversation_identifier`. 4. The stream is terminated and the user can ask a new question. #### Error responses | Code | Description | |------|-------------| | 401 | Unauthorized — authentication token is missing, expired, or invalid. | | 403 | Forbidden — the authenticated user does not have `CAN_USE_SPOTTER` privilege or lacks access to the specified conversation. | > ###### Note: > > - Calling this endpoint when no response is in progress does not return an error. > - The conversation context is preserved after stopping — previous messages and answers remain accessible. > - Available from version 26.6.0.cl and later. > - This endpoint requires Spotter — please contact ThoughtSpot Support to enable Spotter on your cluster. > - This feature is available only for **Spotter 3** (`SPOTTER3`) version. + * @param conversationIdentifier Unique identifier of the conversation to stop. + */ + stopConversation(conversationIdentifier, _options) { + const requestContextPromise = this.requestFactory.stopConversation(conversationIdentifier, _options); + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx) => middleware.pre(ctx))); + } + return middlewarePreObservable.pipe(mergeMap((ctx) => this.configuration.httpApi.send(ctx))).pipe(mergeMap((response) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp) => this.responseProcessor.stopConversation(rsp))); + })); + } + /** + * Version: 26.5.0.cl or later Synchronizes connection metadata attributes from your Cloud Data Warehouse (CDW) with ThoughtSpot. Requires the `DATAMANAGEMENT` (**Can manage data**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` (**Can manage data models**) privilege is required. #### Usage guidelines To synchronize attributes from a CDW, specify the connection GUID or name in the `connection_identifier` path parameter and `sync_attributes` in the request body. Default attribute is `[\"DESCRIPTION\"]`. ##### Hierarchical schema * Connection: The connection object for the sync operation. * Tables: Tables for the sync operation. When no table is specified, all tables are synchronized. * Columns: If the table is specified, you can add the columns for the sync operation. If no columns are specified, all columns in the specified table are considered for the sync operation. To set the scope for the sync operation: * Connection-level: To sync all tables and columns, pass an empty request body, or only the attributes in the request body. * Table-level: To synchronize specific tables and their columns, specify the table identifiers in the `tables` array. * Column-level: To synchronize specific columns, specify the table identifier as the key and column identifiers as the value in the `tables` array. ``` { \"tables\": [ {\"table-guid-1\": [\"column-guid-1\", \"column-guid-2\"]}, \"table-guid-2\" ], \"sync_attributes\": [\"DESCRIPTION\"] } ``` ##### API response If the sync operation is successful, the API returns the following information: * Status of the sync operation. For example, `SUCCESS`, `PARTIAL_SUCCESS`, or `NO_UPDATE`. * Number of tables and columns that were updated. * Number of tables and columns with the sync failed status when the overall sync status is `PARTIAL_SUCCESS`. * Message text indicating the sync results. + * @param connectionIdentifier Unique ID or name of the connection. + * @param syncMetadataRequest + */ + syncMetadata(connectionIdentifier, syncMetadataRequest, _options) { + const requestContextPromise = this.requestFactory.syncMetadata(connectionIdentifier, syncMetadataRequest, _options); + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx) => middleware.pre(ctx))); + } + return middlewarePreObservable.pipe(mergeMap((ctx) => this.configuration.httpApi.send(ctx))).pipe(mergeMap((response) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp) => this.responseProcessor.syncMetadata(rsp))); + })); + } + /** + * Version: 9.0.0.cl or later Removes the tags applied to a Liveboard, Answer, Table, or Worksheet. Requires edit access to the metadata object. + * @param unassignTagRequest + */ + unassignTag(unassignTagRequest, _options) { + const requestContextPromise = this.requestFactory.unassignTag(unassignTagRequest, _options); + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx) => middleware.pre(ctx))); + } + return middlewarePreObservable.pipe(mergeMap((ctx) => this.configuration.httpApi.send(ctx))).pipe(mergeMap((response) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp) => this.responseProcessor.unassignTag(rsp))); + })); + } + /** + * Remove parameterization from fields in metadata objects. Version: 26.5.0.cl or later Allows removing parameterization from fields in metadata objects in ThoughtSpot. Requires appropriate permissions to modify the metadata object. The API endpoint allows unparameterizing the following types of metadata objects: * Logical Tables * Connections * Connection Configs For a Logical Table the field type must be `ATTRIBUTE` and field name can be one of: * databaseName * schemaName * tableName For a Connection or Connection Config, the field type is always `CONNECTION_PROPERTY`. In this case, field_name specifies the exact property of the Connection or Connection Config that needs to be unparameterized. For Connection Config, the only supported field name is: * impersonate_user + * @param unparameterizeMetadataRequest + */ + unparameterizeMetadata(unparameterizeMetadataRequest, _options) { + const requestContextPromise = this.requestFactory.unparameterizeMetadata(unparameterizeMetadataRequest, _options); + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx) => middleware.pre(ctx))); + } + return middlewarePreObservable.pipe(mergeMap((ctx) => this.configuration.httpApi.send(ctx))).pipe(mergeMap((response) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp) => this.responseProcessor.unparameterizeMetadata(rsp))); + })); + } + /** + * Version: 26.5.0.cl or later Allows unpublishing metadata objects from organizations in ThoughtSpot. Requires ADMINISTRATION role and TENANT scope. The API endpoint allows unpublishing the following types of metadata objects: * Liveboards * Answers * Logical Tables When unpublishing objects, you can: * Include dependencies by setting `include_dependencies` to true - this will unpublish all dependent objects if no other published object is using them * Force unpublish by setting `force` to true - this will break all dependent objects in the unpublished organizations + * @param unpublishMetadataRequest + */ + unpublishMetadata(unpublishMetadataRequest, _options) { + const requestContextPromise = this.requestFactory.unpublishMetadata(unpublishMetadataRequest, _options); + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx) => middleware.pre(ctx))); + } + return middlewarePreObservable.pipe(mergeMap((ctx) => this.configuration.httpApi.send(ctx))).pipe(mergeMap((response) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp) => this.responseProcessor.unpublishMetadata(rsp))); + })); + } + /** + * Version: 10.12.0.cl or later Updates the properties of a [custom calendar](https://docs.thoughtspot.com/cloud/latest/connections-cust-cal). Requires `DATAMANAGEMENT` (**Can manage data**) or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your ThoughtSpot instance, the `CAN_MANAGE_CUSTOM_CALENDAR` (**Can manage custom calendars**) privilege is required. #### Usage guidelines You can update the properties of a calendar using one of the following methods: * `FROM_INPUT_PARAMS` to update the calendar properties with the values defined in the API request. * `FROM_EXISTING_TABLE` Creates a calendar from the parameters defined in the API request. To update a custom calendar, specify the calendar ID as a path parameter in the request URL and the following parameters in the request body: * Connection ID and Table name * Database and schema name attributes: For most Cloud Data Warehouse (CDW) connectors, both `database_name` and `schema_name` attributes are required. However, the attribute requirements are conditional and vary based on the connector type and its metadata structure. For example, for connectors such as Teradata, MySQL, SingleSore, Amazon Aurora MySQL, Amazon RDS MySQL, Oracle, and GCP_MYSQL, the `schema_name` is required, whereas the `database_name` attribute is not. Similarly, connectors such as ClickHouse require you to specify the `database_name` and the schema specification in such cases is optional. The API allows you to modify the calendar type, month offset value, start and end date, starting day of the week, and prefixes assigned to the year and quarter labels. #### Examples Update a custom calendar using an existing Table in ThoughtSpot: ``` { \"update_method\": \"FROM_EXISTING_TABLE\", \"table_reference\": { \"connection_identifier\": \"Connection1\", \"database_name\": \"db1\", \"table_name\": \"custom_calendar_2025\", \"schame_name\": \"schemaVar\" } } ``` Update a custom calendar with the attributes defined in the API request: ``` { \"update_method\": \"FROM_INPUT_PARAMS\", \"table_reference\": { \"connection_identifier\": \"Connection1\", \"database_name\": \"db1\", \"table_name\": \"custom_calendar_2025\", \"schame_name\": \"schemaVar\" }, \"month_offset\": \"August\", \"start_day_of_week\": \"Monday\", \"start_date\": \"08/01/2025\", \"end_date\": \"07/31/2026\" } ``` + * @param calendarIdentifier Unique Id or name of the calendar. + * @param updateCalendarRequest + */ + updateCalendar(calendarIdentifier, updateCalendarRequest, _options) { + const requestContextPromise = this.requestFactory.updateCalendar(calendarIdentifier, updateCalendarRequest, _options); + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx) => middleware.pre(ctx))); + } + return middlewarePreObservable.pipe(mergeMap((ctx) => this.configuration.httpApi.send(ctx))).pipe(mergeMap((response) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp) => this.responseProcessor.updateCalendar(rsp))); + })); + } + /** + * Version: 26.4.0.cl or later Updates an existing collection in ThoughtSpot. #### Supported operations This API endpoint lets you perform the following operations: * Update collection name and description * Change visibility settings * Add metadata objects to the collection (operation: ADD) * Remove metadata objects from the collection (operation: REMOVE) * Replace all metadata objects in the collection (operation: REPLACE) #### Operation types * **ADD**: Adds the specified metadata objects to the existing collection without removing current items * **REMOVE**: Removes only the specified metadata objects from the collection * **REPLACE**: Replaces all existing metadata objects with the specified items (default behavior) + * @param collectionIdentifier Unique GUID of the collection. Note: Collection names cannot be used as identifiers since duplicate names are allowed. + * @param updateCollectionRequest + */ + updateCollection(collectionIdentifier, updateCollectionRequest, _options) { + const requestContextPromise = this.requestFactory.updateCollection(collectionIdentifier, updateCollectionRequest, _options); + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx) => middleware.pre(ctx))); + } + return middlewarePreObservable.pipe(mergeMap((ctx) => this.configuration.httpApi.send(ctx))).pipe(mergeMap((response) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp) => this.responseProcessor.updateCollection(rsp))); + })); + } + /** + * Version: 10.12.0.cl or later Creates, updates, or deletes column security rules for specified tables. This API endpoint allows you to create, update, or delete column-level security rules on columns of a table. The operation follows an \"all or none\" policy: if defining security rules for any of the provided columns fails, the entire operation will be rolled back, and no rules will be created. #### Usage guidelines - Provide table identifier using either `identifier` (GUID or name) or `obj_identifier` (object ID) - Use `clear_csr: true` to remove all column security rules from the table - For each column, specify the security rule using `column_security_rules` array - Use `is_unsecured: true` to mark a specific column as unprotected - Use `group_access` operations to manage group associations: - `ADD`: Add groups to the column\'s access list - `REMOVE`: Remove groups from the column\'s access list - `REPLACE`: Replace all existing groups with the specified groups #### Required permissions - `ADMINISTRATION` - Can administer ThoughtSpot - `DATAMANAGEMENT` - Can manage data (if RBAC is disabled) - `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` - Can manage worksheet views and tables (if RBAC is enabled) #### Example request ```json { \"identifier\": \"table-guid\", \"obj_identifier\": \"table-object-id\", \"clear_csr\": false, \"column_security_rules\": [ { \"column_identifier\": \"col id or col name\", \"is_unsecured\": false, \"group_access\": [ { \"operation\": \"ADD\", \"group_identifiers\": [\"hr_group_id\", \"hr_group_name\", \"finance_group_id\"] } ] }, { \"column_identifier\": \"col id or col name\", \"is_unsecured\": true }, { \"column_identifier\": \"col id or col name\", \"is_unsecured\": false, \"group_access\": [ { \"operation\": \"REPLACE\", \"group_identifiers\": [\"management_group_id\", \"management_group_name\"] } ] } ] } ``` #### Request Body Schema - `identifier` (string, optional): GUID or name of the table for which we want to create column security rules - `obj_identifier` (string, optional): The object ID of the table - `clear_csr` (boolean, optional): If true, then all the secured columns will be marked as unprotected, and all the group associations will be removed - `column_security_rules` (array of objects, required): An array where each object defines the security rule for a specific column Each column security rule object contains: - `column_identifier` (string, required): Column identifier (col_id or name) - `is_unsecured` (boolean, optional): If true, the column will be marked as unprotected and all groups associated with it will be removed - `group_access` (array of objects, optional): Array of group operation objects Each group operation object contains: - `operation` (string, required): Operation type - ADD, REMOVE, or REPLACE - `group_identifiers` (array of strings, required): Array of group identifiers (name or GUID) on which the operation will be performed #### Response This API does not return any response body. A successful operation returns HTTP 200 status code. #### Operation Types - **ADD**: Adds the specified groups to the column\'s access list - **REMOVE**: Removes the specified groups from the column\'s access list - **REPLACE**: Replaces all existing groups with the specified groups + * @param updateColumnSecurityRulesRequest + */ + updateColumnSecurityRules(updateColumnSecurityRulesRequest, _options) { + const requestContextPromise = this.requestFactory.updateColumnSecurityRules(updateColumnSecurityRulesRequest, _options); + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx) => middleware.pre(ctx))); + } + return middlewarePreObservable.pipe(mergeMap((ctx) => this.configuration.httpApi.send(ctx))).pipe(mergeMap((response) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp) => this.responseProcessor.updateColumnSecurityRules(rsp))); + })); + } + /** + * Version: 9.2.0.cl or later Updates Git repository configuration settings. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance on your instance, the `CAN_SETUP_VERSION_CONTROL` (**Can set up version control**) privilege. + * @param updateConfigRequest + */ + updateConfig(updateConfigRequest, _options) { + const requestContextPromise = this.requestFactory.updateConfig(updateConfigRequest, _options); + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx) => middleware.pre(ctx))); + } + return middlewarePreObservable.pipe(mergeMap((ctx) => this.configuration.httpApi.send(ctx))).pipe(mergeMap((response) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp) => this.responseProcessor.updateConfig(rsp))); + })); + } + /** + * Version: 9.2.0.cl or later **Important**: This endpoint is deprecated and will be removed from ThoughtSpot in September 2025. ThoughtSpot strongly recommends using the [Update connection V2](#/http/api-endpoints/connections/update-connection-v2) endpoint to update your connection objects. #### Usage guidelines Updates a connection object. Requires `DATAMANAGEMENT` (**Can manage data**) and edit permissions to the connection object, or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) privilege is required. To update a connection object, pass these parameters in your API request: 1. GUID of the connection object. 2. If you are updating tables or database schema of a connection object: a. Add the updated JSON map of metadata with database, schema, and tables in `data_warehouse_config`. b. Set `validate` to `true`. 3. If you are updating a configuration attribute, connection name, or description, you can set `validate` to `false`. + * @param updateConnectionRequest + */ + updateConnection(updateConnectionRequest, _options) { + const requestContextPromise = this.requestFactory.updateConnection(updateConnectionRequest, _options); + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx) => middleware.pre(ctx))); + } + return middlewarePreObservable.pipe(mergeMap((ctx) => this.configuration.httpApi.send(ctx))).pipe(mergeMap((response) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp) => this.responseProcessor.updateConnection(rsp))); + })); + } + /** + * Version: 10.12.0.cl or later Updates a connection configuration object. Requires `DATAMANAGEMENT` (**Can manage data**) and edit permissions to the connection object, or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) privilege is required. #### Supported operations This API endpoint lets you perform the following operations in a single API request: * Edit the name or description of the configuration * Edit the configuration properties * Edit the `policy_type` * Edit the type of authentication * Enable or disable a configuration #### Parameterized Connection Support For parameterized oauth based connections, only the `same_as_parent` and `policy_process_options` attributes are allowed. These attributes are not applicable to connections that are not parameterized. **NOTE**: When updating a configuration where `disabled` is `true`, you must reset `disabled` to `true` in your update request payload. If not explicitly set again, the API will default `disabled` to `false`. + * @param configurationIdentifier Unique ID or name of the configuration. + * @param updateConnectionConfigurationRequest + */ + updateConnectionConfiguration(configurationIdentifier, updateConnectionConfigurationRequest, _options) { + const requestContextPromise = this.requestFactory.updateConnectionConfiguration(configurationIdentifier, updateConnectionConfigurationRequest, _options); + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx) => middleware.pre(ctx))); + } + return middlewarePreObservable.pipe(mergeMap((ctx) => this.configuration.httpApi.send(ctx))).pipe(mergeMap((response) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp) => this.responseProcessor.updateConnectionConfiguration(rsp))); + })); + } + /** + * Version: 26.6.0.cl or later Activates or deactivates a connection. A deactivated connection cannot be used for queries or operations until it is activated again. Requires `DATAMANAGEMENT` (**Can manage data**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) privilege is required. Only the connection owner or an administrator can perform this operation. #### Usage guidelines To update the status of a connection, specify the connection GUID or name in the `connection_identifier` path parameter and the desired `status` in the request body. - **ACTIVATED**: Enables the connection. Queries and operations can resume on an activated connection. - **DEACTIVATED**: Disables the connection. It does not remove the connection metadata, but only makes the connection unavailable for queries and operations. You can reactivate a deactivated connection by setting \"status\": \"ACTIVATED\". + * @param connectionIdentifier Unique ID or name of the connection. + * @param updateConnectionStatusRequest + */ + updateConnectionStatus(connectionIdentifier, updateConnectionStatusRequest, _options) { + const requestContextPromise = this.requestFactory.updateConnectionStatus(connectionIdentifier, updateConnectionStatusRequest, _options); + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx) => middleware.pre(ctx))); + } + return middlewarePreObservable.pipe(mergeMap((ctx) => this.configuration.httpApi.send(ctx))).pipe(mergeMap((response) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp) => this.responseProcessor.updateConnectionStatus(rsp))); + })); + } + /** + * Version: 10.4.0.cl or later Updates a connection object. Requires `DATAMANAGEMENT` (**Can manage data**) and edit permissions to the connection object, or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) privilege is required. To update a connection object, pass these parameters in your API request: 1. GUID of the connection object. 2. If you are updating tables or database schema of a connection object: a. Add the updated JSON map of metadata with database, schema, and tables in `data_warehouse_config`. b. Set `validate` to `true`. **NOTE:** If the `authentication_type` is anything other than SERVICE_ACCOUNT, you must explicitly provide the authenticationType property in the payload. If you do not specify authenticationType, the API will default to SERVICE_ACCOUNT as the authentication type. * A JSON map of configuration attributes, database details, and table properties in `data_warehouse_config` as shown in the following example: * This is an example of updating a single table in a empty connection: ``` { \"authenticationType\": \"SERVICE_ACCOUNT\", \"externalDatabases\": [ { \"name\": \"DEVELOPMENT\", \"isAutoCreated\": false, \"schemas\": [ { \"name\": \"TS_dataset\", \"tables\": [ { \"name\": \"DEMORENAME\", \"type\": \"TABLE\", \"description\": \"\", \"selected\": true, \"linked\": true, \"gid\": 0, \"datasetId\": \"-1\", \"subType\": \"\", \"reportId\": \"\", \"viewId\": \"\", \"columns\": [ { \"name\": \"Col1\", \"type\": \"VARCHAR\", \"canImport\": true, \"selected\": true, \"description\": \"\", \"isLinkedActive\": true, \"isAggregate\": false }, { \"name\": \"Col2\", \"type\": \"VARCHAR\", \"canImport\": true, \"selected\": true, \"description\": \"\", \"isLinkedActive\": true, \"isAggregate\": false }, { \"name\": \"Col3\", \"type\": \"VARCHAR\", \"canImport\": true, \"selected\": true, \"description\": \"\", \"isLinkedActive\": true, \"isAggregate\": false }, { \"name\": \"Col312\", \"type\": \"VARCHAR\", \"canImport\": true, \"selected\": true, \"description\": \"\", \"isLinkedActive\": true, \"isAggregate\": false }, { \"name\": \"Col4\", \"type\": \"VARCHAR\", \"canImport\": true, \"selected\": true, \"description\": \"\", \"isLinkedActive\": true, \"isAggregate\": false } ], \"relationships\": [] } ] } ] } ], \"configuration\": { \"password\": \"\", \"database\": \"DEVELOPMENT\", \"role\": \"DEV\", \"accountName\": \"thoughtspot_partner\", \"warehouse\": \"DEMO_WH\", \"user\": \"DEV_USER\" } } ``` * This is an example of updating a single table in an existing connection with tables: ``` { \"authenticationType\": \"SERVICE_ACCOUNT\", \"externalDatabases\": [ { \"name\": \"DEVELOPMENT\", \"isAutoCreated\": false, \"schemas\": [ { \"name\": \"TS_dataset\", \"tables\": [ { \"name\": \"CUSTOMER\", \"type\": \"TABLE\", \"description\": \"\", \"selected\": true, \"linked\": true, \"gid\": 0, \"datasetId\": \"-1\", \"subType\": \"\", \"reportId\": \"\", \"viewId\": \"\", \"columns\": [], \"relationships\": [] }, { \"name\": \"tpch5k_falcon_default_schema_users\", \"type\": \"TABLE\", \"description\": \"\", \"selected\": true, \"linked\": true, \"gid\": 0, \"datasetId\": \"-1\", \"subType\": \"\", \"reportId\": \"\", \"viewId\": \"\", \"columns\": [ { \"name\": \"user_id\", \"type\": \"INT64\", \"canImport\": true, \"selected\": true, \"description\": \"\", \"isLinkedActive\": true, \"isAggregate\": false }, { \"name\": \"product_id\", \"type\": \"INT64\", \"canImport\": true, \"selected\": true, \"description\": \"\", \"isLinkedActive\": true, \"isAggregate\": false }, { \"name\": \"user_cost\", \"type\": \"INT64\", \"canImport\": true, \"selected\": true, \"description\": \"\", \"isLinkedActive\": true, \"isAggregate\": false } ], \"relationships\": [] } ] } ] } ], \"configuration\": { \"password\": \"\", \"database\": \"DEVELOPMENT\", \"role\": \"DEV\", \"accountName\": \"thoughtspot_partner\", \"warehouse\": \"DEMO_WH\", \"user\": \"DEV_USER\" } } ``` 3. If you are updating a configuration attribute, connection name, or description, you can set `validate` to `false`. **NOTE:** If the `authentication_type` is anything other than SERVICE_ACCOUNT, you must explicitly provide the authenticationType property in the payload. If you do not specify authenticationType, the API will default to SERVICE_ACCOUNT as the authentication type. * A JSON map of configuration attributes in `data_warehouse_config`. The following example shows the configuration attributes for a Snowflake connection: ``` { \"configuration\":{ \"accountName\":\"thoughtspot_partner\", \"user\":\"tsadmin\", \"password\":\"TestConn123\", \"role\":\"sysadmin\", \"warehouse\":\"MEDIUM_WH\" }, \"externalDatabases\":[ ] } ``` + * @param connectionIdentifier Unique ID or name of the connection. + * @param updateConnectionV2Request + */ + updateConnectionV2(connectionIdentifier, updateConnectionV2Request, _options) { + const requestContextPromise = this.requestFactory.updateConnectionV2(connectionIdentifier, updateConnectionV2Request, _options); + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx) => middleware.pre(ctx))); + } + return middlewarePreObservable.pipe(mergeMap((ctx) => this.configuration.httpApi.send(ctx))).pipe(mergeMap((response) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp) => this.responseProcessor.updateConnectionV2(rsp))); + })); + } + /** + * Version: 9.6.0.cl or later Updates a custom action. Requires `DEVELOPER` (**Has Developer privilege**) or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `DEVELOPER` (**Has developer privilege**) privilege is required. #### Usage Guidelines The API allows you to modify the following properties: * Name of the custom action * Action availability to groups * Association to metadata objects * Authentication settings for a URL-based action For more information, see [Custom actions](https://developers.thoughtspot.com/docs/custom-action-intro). + * @param customActionIdentifier Unique ID or name of the custom action. + * @param updateCustomActionRequest + */ + updateCustomAction(customActionIdentifier, updateCustomActionRequest, _options) { + const requestContextPromise = this.requestFactory.updateCustomAction(customActionIdentifier, updateCustomActionRequest, _options); + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx) => middleware.pre(ctx))); + } + return middlewarePreObservable.pipe(mergeMap((ctx) => this.configuration.httpApi.send(ctx))).pipe(mergeMap((response) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp) => this.responseProcessor.updateCustomAction(rsp))); + })); + } + /** + * Version: 9.9.0.cl or later Updates a DBT connection object. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege or `DATAMANAGEMENT` (**Can manage data ThoughtSpot**) privilege, along with an existing DBT connection. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the following data control privileges may be required: - `CAN_MANAGE_CUSTOM_CALENDAR`(**Can manage custom calendars**) - `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) - `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` (**Can manage data models**) #### About update DBT connection You can modify DBT connection object properties such as embrace connection name, embrace database name, import type, account identifier, access token, project identifier and environment (or) embrace connection, embrace database name, import type, file_content settings. + * @param dbtConnectionIdentifier Unique ID of the DBT Connection. + * @param connectionName Name of the connection. + * @param databaseName Name of the Database. + * @param importType Mention type of Import + * @param accessToken Access token is mandatory when Import_Type is DBT_CLOUD. + * @param dbtUrl DBT URL is mandatory when Import_Type is DBT_CLOUD. + * @param accountId Account ID is mandatory when Import_Type is DBT_CLOUD + * @param projectId Project ID is mandatory when Import_Type is DBT_CLOUD + * @param dbtEnvId DBT Environment ID\\\" + * @param projectName Name of the project + * @param fileContent Upload DBT Manifest and Catalog artifact files as a ZIP file. This field is Mandatory when Import Type is \\\'ZIP_FILE\\\' + */ + updateDbtConnection(dbtConnectionIdentifier, connectionName, databaseName, importType, accessToken, dbtUrl, accountId, projectId, dbtEnvId, projectName, fileContent, _options) { + const requestContextPromise = this.requestFactory.updateDbtConnection(dbtConnectionIdentifier, connectionName, databaseName, importType, accessToken, dbtUrl, accountId, projectId, dbtEnvId, projectName, fileContent, _options); + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx) => middleware.pre(ctx))); + } + return middlewarePreObservable.pipe(mergeMap((ctx) => this.configuration.httpApi.send(ctx))).pipe(mergeMap((response) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp) => this.responseProcessor.updateDbtConnection(rsp))); + })); + } + /** + * Version: 10.12.0.cl or later Updates a customization configuration for the notification email. #### Pre-requisites Requires `DEVELOPER` (**has developer privilege**) or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `DEVELOPER` (**Has developer privilege**) privilege is required. **NOTE**:This endpoint in currently in beta. Contact ThoughtSpot support to enable this on your instance. #### Usage guidelines To update a custom configuration pass these parameters in your API request: - A JSON map of configuration attributes `template_properties`. The following example shows a sample set of customization configuration: ``` { { \"cta_button_bg_color\": \"#444DEA\", \"cta_text_font_color\": \"#FFFFFF\", \"primary_bg_color\": \"#D3DEF0\", \"logo_url\": \"https://storage.pardot.com/710713/1642089901EbkRibJq/TS_fullworkmark_darkmode.png\", \"font_family\": \"\", \"product_name\": \"ThoughtSpot\", \"footer_address\": \"444 Castro St, Suite 1000 Mountain View, CA 94041\", \"footer_phone\": \"(800) 508-7008\", \"replacement_value_for_liveboard\": \"Dashboard\", \"replacement_value_for_answer\": \"Chart\", \"replacement_value_for_spot_iq\": \"AI Insights\", \"hide_footer_phone\": false, \"hide_footer_address\": false, \"hide_product_name\": false, \"hide_manage_notification\": false, \"hide_mobile_app_nudge\": false, \"hide_privacy_policy\": false, \"hide_ts_vocabulary_definitions\": false, \"hide_error_message\": false, \"hide_unsubscribe_link\": false, \"hide_notification_status\": false, \"hide_modify_alert\": false, \"company_website_url\": \"https://your-website.com/\", \"company_privacy_policy_url\" : \"https://link-to-privacy-policy.com/\", \"contact_support_url\": \"https://link-to-contact-support.com/\", \"hide_contact_support_url\": false, \"hide_logo_url\" : false } } ``` + * @param updateEmailCustomizationRequest + */ + updateEmailCustomization(updateEmailCustomizationRequest, _options) { + const requestContextPromise = this.requestFactory.updateEmailCustomization(updateEmailCustomizationRequest, _options); + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx) => middleware.pre(ctx))); + } + return middlewarePreObservable.pipe(mergeMap((ctx) => this.configuration.httpApi.send(ctx))).pipe(mergeMap((response) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp) => this.responseProcessor.updateEmailCustomization(rsp))); + })); + } + /** + * Update header attributes for a given list of header objects. Version: 10.6.0.cl or later ## Prerequisites - **Privileges Required:** - `DATAMANAGEMENT` (Can manage data) or `ADMINISTRATION` (Can administer ThoughtSpot). - **Additional Privileges (if RBAC is enabled):** - `ORG_ADMINISTRATION` (Can manage orgs). --- ## Usage Guidelines ### Parameters 1. **headers_update** - **Description:** List of header objects with their attributes to be updated. Each object contains a list of attributes to be updated in the header. - **Usage:** - You must provide either `identifier` or `obj_identifier`, but not both. Both fields cannot be empty. - When `org_identifier` is set to `-1`, only the `identifier` value is accepted; `obj_identifier` is not allowed. 2. **org_identifier** - **Description:** GUID (Globally Unique Identifier) or name of the organization. - **Usage:** - Leaving this field empty assumes that the changes should be applied to the current organization - Provide `org_guid` or `org_name` to uniquely identify the organization where changes need to be applied. . - Provide `-1` if changes have to be applied across all the org. --- ## Note Currently, this API is enabled only for updating the `obj_identifier` attribute. Only `text` will be allowed in attribute\'s value. ## Best Practices 1. **Backup Before Conversion:** Always export metadata as a backup before initiating the update process --- ## Examples ### Only `identifier` is given ```json { \"headers_update\": [ { \"identifier\": \"guid_1\", \"obj_identifier\": \"\", \"type\": \"LOGICAL_COLUMN\", \"attributes\": [ { \"name\": \"obj_id\", \"value\": \"custom_object_id\" } ] } ], \"org_identifier\": \"orgGuid\" } ``` ### Only `obj_identifier` is given ```json { \"headers_update\": [ { \"obj_identifier\": \"custom_object_id\", \"type\": \"ANSWER\", \"attributes\": [ { \"name\": \"obj_id\", \"value\": \"custom_object_id\" } ] } ], \"org_identifier\": \"orgName\" } ``` ### Executing update for all org `-1` ```json { \"headers_update\": [ { \"identifier\": \"guid_1\", \"type\": \"ANSWER\", \"attributes\": [ { \"name\": \"obj_id\", \"value\": \"custom_object_id\" } ] } ], \"org_identifier\": -1 } ``` ### Optional `type` is not provided ```json { \"headers_update\": [ { \"identifier\": \"guid_1\", \"attributes\": [ { \"name\": \"obj_id\", \"value\": \"custom_object_id\" } ] } ], \"org_identifier\": -1 } ``` + * @param updateMetadataHeaderRequest + */ + updateMetadataHeader(updateMetadataHeaderRequest, _options) { + const requestContextPromise = this.requestFactory.updateMetadataHeader(updateMetadataHeaderRequest, _options); + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx) => middleware.pre(ctx))); + } + return middlewarePreObservable.pipe(mergeMap((ctx) => this.configuration.httpApi.send(ctx))).pipe(mergeMap((response) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp) => this.responseProcessor.updateMetadataHeader(rsp))); + })); + } + /** + * Update object IDs for given metadata objects. Version: 10.8.0.cl or later ## Prerequisites - **Privileges Required:** - `DATAMANAGEMENT` (Can manage data) or `ADMINISTRATION` (Can administer ThoughtSpot). - **Additional Privileges (if RBAC is enabled):** - `ORG_ADMINISTRATION` (Can manage orgs). --- ## Usage Guidelines ### Parameters 1. **metadata** - **Description:** List of metadata objects to update their object IDs. - **Usage:** - Use either `current_obj_id` alone OR use `metadata_identifier` with `type` (when needed). - When using `metadata_identifier`, the `type` field is required if using a name instead of a GUID. - The `new_obj_id` field is always required. --- ## Note This API is specifically designed for updating object IDs of metadata objects. It internally uses the header update mechanism to perform the changes. ## Best Practices 1. **Backup Before Update:** Always export metadata as a backup before initiating the update process. 2. **Validation:** - When using `current_obj_id`, ensure it matches the existing object ID exactly. - When using `metadata_identifier` with a name, ensure the `type` is specified correctly. - Verify that the `new_obj_id` follows your naming conventions and is unique within your system. --- ## Examples ### Using current_obj_id ```json { \"metadata\": [ { \"current_obj_id\": \"existing_object_id\", \"new_obj_id\": \"new_object_id\" } ] } ``` ### Using metadata_identifier with GUID ```json { \"metadata\": [ { \"metadata_identifier\": \"01234567-89ab-cdef-0123-456789abcdef\", \"new_obj_id\": \"new_object_id\" } ] } ``` ### Using metadata_identifier with name and type ```json { \"metadata\": [ { \"metadata_identifier\": \"My Answer\", \"type\": \"ANSWER\", \"new_obj_id\": \"new_object_id\" } ] } ``` ### Multiple objects update ```json { \"metadata\": [ { \"current_obj_id\": \"existing_object_id_1\", \"new_obj_id\": \"new_object_id_1\" }, { \"metadata_identifier\": \"My Worksheet\", \"type\": \"LOGICAL_TABLE\", \"new_obj_id\": \"new_object_id_2\" } ] } ``` + * @param updateMetadataObjIdRequest + */ + updateMetadataObjId(updateMetadataObjIdRequest, _options) { + const requestContextPromise = this.requestFactory.updateMetadataObjId(updateMetadataObjIdRequest, _options); + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx) => middleware.pre(ctx))); + } + return middlewarePreObservable.pipe(mergeMap((ctx) => this.configuration.httpApi.send(ctx))).pipe(mergeMap((response) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp) => this.responseProcessor.updateMetadataObjId(rsp))); + })); + } + /** + * Version: 9.0.0.cl or later Updates an Org object. You can modify Org properties such as name, description, and user associations. Requires cluster administration (**Can administer Org**) privileges. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `ORG_ADMINISTRATION` (**Can manage Orgs**) privilege is required. + * @param orgIdentifier ID or name of the Org + * @param updateOrgRequest + */ + updateOrg(orgIdentifier, updateOrgRequest, _options) { + const requestContextPromise = this.requestFactory.updateOrg(orgIdentifier, updateOrgRequest, _options); + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx) => middleware.pre(ctx))); + } + return middlewarePreObservable.pipe(mergeMap((ctx) => this.configuration.httpApi.send(ctx))).pipe(mergeMap((response) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp) => this.responseProcessor.updateOrg(rsp))); + })); + } + /** + * Version: 9.5.0.cl or later Updates the properties of a Role object. Available only if [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance. To update a Role, the `ROLE_ADMINISTRATION` (**Can manage roles**) privilege is required. + * @param roleIdentifier Unique ID or name of the Role. + * @param updateRoleRequest + */ + updateRole(roleIdentifier, updateRoleRequest, _options) { + const requestContextPromise = this.requestFactory.updateRole(roleIdentifier, updateRoleRequest, _options); + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx) => middleware.pre(ctx))); + } + return middlewarePreObservable.pipe(mergeMap((ctx) => this.configuration.httpApi.send(ctx))).pipe(mergeMap((response) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp) => this.responseProcessor.updateRole(rsp))); + })); + } + /** + * Update schedule. Version: 9.4.0.cl or later Updates a scheduled Liveboard job. Requires at least edit access to Liveboards. To update a schedule on behalf of another user, you need `ADMINISTRATION` (**Can administer Org**) or `JOBSCHEDULING` (**Can schedule for others**) privilege and edit access to the Liveboard. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `JOBSCHEDULING` (**Can schedule for others**) privilege is required. The API endpoint allows you to pause a scheduled job, change the status of a paused job. You can also edit the recipients list, frequency of the job, format of the file to send to the recipients in email notifications, PDF options, and time zone setting. + * @param scheduleIdentifier Unique ID or name of the schedule. + * @param updateScheduleRequest + */ + updateSchedule(scheduleIdentifier, updateScheduleRequest, _options) { + const requestContextPromise = this.requestFactory.updateSchedule(scheduleIdentifier, updateScheduleRequest, _options); + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx) => middleware.pre(ctx))); + } + return middlewarePreObservable.pipe(mergeMap((ctx) => this.configuration.httpApi.send(ctx))).pipe(mergeMap((response) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp) => this.responseProcessor.updateSchedule(rsp))); + })); + } + /** + * Version: 9.2.0.cl or later Updates the current configuration of the cluster. You must send the configuration data in JSON format. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privileges. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `APPLICATION_ADMINISTRATION` (**Can manage application settings**) privilege is required. + * @param updateSystemConfigRequest + */ + updateSystemConfig(updateSystemConfigRequest, _options) { + const requestContextPromise = this.requestFactory.updateSystemConfig(updateSystemConfigRequest, _options); + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx) => middleware.pre(ctx))); + } + return middlewarePreObservable.pipe(mergeMap((ctx) => this.configuration.httpApi.send(ctx))).pipe(mergeMap((response) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp) => this.responseProcessor.updateSystemConfig(rsp))); + })); + } + /** + * Version: 9.0.0.cl or later Updates a tag object. You can modify the `name` and `color` properties of a tag object. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `TAGMANAGEMENT` (**Can manage tags**) privilege is required to create, edit, and delete tags. + * @param tagIdentifier Name or Id of the tag. + * @param updateTagRequest + */ + updateTag(tagIdentifier, updateTagRequest, _options) { + const requestContextPromise = this.requestFactory.updateTag(tagIdentifier, updateTagRequest, _options); + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx) => middleware.pre(ctx))); + } + return middlewarePreObservable.pipe(mergeMap((ctx) => this.configuration.httpApi.send(ctx))).pipe(mergeMap((response) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp) => this.responseProcessor.updateTag(rsp))); + })); + } + /** + * Version: 9.0.0.cl or later Updates the properties of a user object. You can modify user properties such as username, email, and share notification settings. You can also assign new groups and Orgs, remove the user from a group or Org, reset password, and modify user preferences. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `USER_ADMINISTRATION` (**Can manage users**) privilege is required. + * @param userIdentifier GUID / name of the user + * @param updateUserRequest + */ + updateUser(userIdentifier, updateUserRequest, _options) { + const requestContextPromise = this.requestFactory.updateUser(userIdentifier, updateUserRequest, _options); + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx) => middleware.pre(ctx))); + } + return middlewarePreObservable.pipe(mergeMap((ctx) => this.configuration.httpApi.send(ctx))).pipe(mergeMap((response) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp) => this.responseProcessor.updateUser(rsp))); + })); + } + /** + * Version: 9.0.0.cl or later Updates the properties of a group object in ThoughtSpot. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `GROUP_ADMINISTRATION` (**Can manage groups**) privilege is required. #### Supported operations This API endpoint lets you perform the following operations in a single API request: * Edit [privileges](https://developers.thoughtspot.com/docs/?pageid=api-user-management#group-privileges) * Add or remove users * Change sharing visibility settings * Add or remove sub-groups * Assign a default Liveboard or update the existing settings + * @param groupIdentifier GUID or name of the group. + * @param updateUserGroupRequest + */ + updateUserGroup(groupIdentifier, updateUserGroupRequest, _options) { + const requestContextPromise = this.requestFactory.updateUserGroup(groupIdentifier, updateUserGroupRequest, _options); + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx) => middleware.pre(ctx))); + } + return middlewarePreObservable.pipe(mergeMap((ctx) => this.configuration.httpApi.send(ctx))).pipe(mergeMap((response) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp) => this.responseProcessor.updateUserGroup(rsp))); + })); + } + /** + * Update a variable\'s name Version: 26.4.0.cl or later Allows updating a variable\'s name in ThoughtSpot. Requires ADMINISTRATION role and TENANT scope. The CAN_MANAGE_VARIABLES permission allows you to manage Formula Variables in the current organization scope. The API endpoint allows updating: * The variable name + * @param identifier Unique id or name of the variable to update. + * @param updateVariableRequest + */ + updateVariable(identifier, updateVariableRequest, _options) { + const requestContextPromise = this.requestFactory.updateVariable(identifier, updateVariableRequest, _options); + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx) => middleware.pre(ctx))); + } + return middlewarePreObservable.pipe(mergeMap((ctx) => this.configuration.httpApi.send(ctx))).pipe(mergeMap((response) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp) => this.responseProcessor.updateVariable(rsp))); + })); + } + /** + * Update values for multiple variables Version: 10.14.0.cl or later **Note:** This API endpoint is deprecated and will be removed from ThoughtSpot in a future release. Use [POST /api/rest/2.0/template/variables/{identifier}/update-values](/api/rest/2.0/template/variables/%7Bidentifier%7D/update-values) instead. Allows updating values for multiple variables in ThoughtSpot. Requires ADMINISTRATION role. The CAN_MANAGE_VARIABLES permission allows you to manage Formula Variables in the current organization scope. The API endpoint allows: * Adding new values to variables * Replacing existing values * Deleting values from variables When updating variable values, you need to specify: * The variable identifiers * The values to add/replace/remove for each variable * The operation to perform (ADD, REPLACE, REMOVE, RESET) Behaviour based on operation type: * ADD - Adds values to the variable if this is a list type variable, else same as replace. * REPLACE - Replaces all values of a given set of constraints with the current set of values. * REMOVE - Removes any values which match the set of conditions of the variables if this is a list type variable, else clears value. * RESET - Removes all constrains for a given variable, scope is ignored + * @param updateVariableValuesRequest + */ + updateVariableValues(updateVariableValuesRequest, _options) { + const requestContextPromise = this.requestFactory.updateVariableValues(updateVariableValuesRequest, _options); + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx) => middleware.pre(ctx))); + } + return middlewarePreObservable.pipe(mergeMap((ctx) => this.configuration.httpApi.send(ctx))).pipe(mergeMap((response) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp) => this.responseProcessor.updateVariableValues(rsp))); + })); + } + /** + * Version: 10.14.0.cl or later Updates an existing webhook configuration by its unique id or name. Only the provided fields will be updated. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) or `DEVELOPER` (**Has developer privilege**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, users with `CAN_MANAGE_WEBHOOKS` (**Can manage webhooks**) privilege are also authorized to perform this action. + * @param webhookIdentifier Unique ID or name of the webhook configuration. + * @param updateWebhookConfigurationRequest + */ + updateWebhookConfiguration(webhookIdentifier, updateWebhookConfigurationRequest, _options) { + const requestContextPromise = this.requestFactory.updateWebhookConfiguration(webhookIdentifier, updateWebhookConfigurationRequest, _options); + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx) => middleware.pre(ctx))); + } + return middlewarePreObservable.pipe(mergeMap((ctx) => this.configuration.httpApi.send(ctx))).pipe(mergeMap((response) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp) => this.responseProcessor.updateWebhookConfiguration(rsp))); + })); + } + /** + * Version: 26.4.0.cl or later Validates a communication channel configuration to ensure it is properly set up and can receive events. - Use `channel_type` to specify the type of communication channel to validate (e.g., WEBHOOK). - Use `channel_identifier` to provide the unique identifier or name for the communication channel. - Use `event_type` to specify the event type to validate for this channel. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) or `DEVELOPER` (**Has developer privilege**) privilege. For webhook channels, users with `CAN_MANAGE_WEBHOOKS` (**Can manage webhooks**) privilege are also authorized to perform this action. + * @param validateCommunicationChannelRequest + */ + validateCommunicationChannel(validateCommunicationChannelRequest, _options) { + const requestContextPromise = this.requestFactory.validateCommunicationChannel(validateCommunicationChannelRequest, _options); + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx) => middleware.pre(ctx))); + } + return middlewarePreObservable.pipe(mergeMap((ctx) => this.configuration.httpApi.send(ctx))).pipe(mergeMap((response) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp) => this.responseProcessor.validateCommunicationChannel(rsp))); + })); + } + /** + * Version: 10.10.0.cl or later Validates the email customization configuration if any set for the ThoughtSpot system. #### Pre-requisites Requires `DEVELOPER` (**has developer privilege**) or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `DEVELOPER` (**Has developer privilege**) privilege is required. **NOTE**:This endpoint in currently in beta. Contact ThoughtSpot support to enable this on your instance. + */ + validateEmailCustomization(_options) { + const requestContextPromise = this.requestFactory.validateEmailCustomization(_options); + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx) => middleware.pre(ctx))); + } + return middlewarePreObservable.pipe(mergeMap((ctx) => this.configuration.httpApi.send(ctx))).pipe(mergeMap((response) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp) => this.responseProcessor.validateEmailCustomization(rsp))); + })); + } + /** + * Version: 9.2.0.cl or later Validates the content of your source branch against the objects in your destination environment. Before merging content from your source branch to the destination branch, run this API operation from your destination environment and ensure that the changes from the source branch function in the destination environment. Requires `DATAMANAGEMENT` (**Can manage data**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance on your instance, the `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` (**Can manage data models**) privilege and edit access to the metadata objects. + * @param validateMergeRequest + */ + validateMerge(validateMergeRequest, _options) { + const requestContextPromise = this.requestFactory.validateMerge(validateMergeRequest, _options); + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx) => middleware.pre(ctx))); + } + return middlewarePreObservable.pipe(mergeMap((ctx) => this.configuration.httpApi.send(ctx))).pipe(mergeMap((response) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp) => this.responseProcessor.validateMerge(rsp))); + })); + } + /** + * Version: 9.12.0.cl or later Validates the authentication token specified in the API request. If your token is not valid, [Get a new token](#/http/api-endpoints/authentication/get-full-access-token). + * @param validateTokenRequest + */ + validateToken(validateTokenRequest, _options) { + const requestContextPromise = this.requestFactory.validateToken(validateTokenRequest, _options); + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx) => middleware.pre(ctx))); + } + return middlewarePreObservable.pipe(mergeMap((ctx) => this.configuration.httpApi.send(ctx))).pipe(mergeMap((response) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp) => this.responseProcessor.validateToken(rsp))); + })); + } +}; +var ObservableUsersApi = class { + constructor(configuration, requestFactory, responseProcessor) { + this.configuration = configuration; + this.requestFactory = requestFactory || new UsersApiRequestFactory(configuration); + this.responseProcessor = responseProcessor || new UsersApiResponseProcessor(); + } + /** + * Version: 9.7.0.cl or later Activates a deactivated user account. Requires `ADMINISTRATION` (**Can administer Thoughtspot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `USER_ADMINISTRATION` (**Can manage users**) privilege is required. To activate an inactive user account, the API request body must include the following information: - Username or the GUID of the user account. - Auth token generated for the deactivated user. The auth token is sent in the API response when a user is deactivated. - Password for the user account. + * @param activateUserRequest + */ + activateUser(activateUserRequest, _options) { + const requestContextPromise = this.requestFactory.activateUser(activateUserRequest, _options); + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx) => middleware.pre(ctx))); + } + return middlewarePreObservable.pipe(mergeMap((ctx) => this.configuration.httpApi.send(ctx))).pipe(mergeMap((response) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp) => this.responseProcessor.activateUser(rsp))); + })); + } + /** + * Version: 9.0.0.cl or later Updates the current password of the user. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `USER_ADMINISTRATION` (**Can manage users**) privilege is required. + * @param changeUserPasswordRequest + */ + changeUserPassword(changeUserPasswordRequest, _options) { + const requestContextPromise = this.requestFactory.changeUserPassword(changeUserPasswordRequest, _options); + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx) => middleware.pre(ctx))); + } + return middlewarePreObservable.pipe(mergeMap((ctx) => this.configuration.httpApi.send(ctx))).pipe(mergeMap((response) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp) => this.responseProcessor.changeUserPassword(rsp))); + })); + } + /** + * Version: 9.0.0.cl or later Creates a user in ThoughtSpot. The API endpoint allows you to configure several user properties such as email address, account status, share notification preferences, and sharing visibility. You can provision the user to [groups](https://docs.thoughtspot.com/cloud/latest/groups-privileges) and [Orgs](https://docs.thoughtspot.com/cloud/latest/orgs-overview). You can also add Liveboard, Answer, and Worksheet objects to the user’s favorites list, assign a default Liveboard for the user, and set user preferences. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `USER_ADMINISTRATION` (**Can manage users**) privilege is required. + * @param createUserRequest + */ + createUser(createUserRequest, _options) { + const requestContextPromise = this.requestFactory.createUser(createUserRequest, _options); + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx) => middleware.pre(ctx))); + } + return middlewarePreObservable.pipe(mergeMap((ctx) => this.configuration.httpApi.send(ctx))).pipe(mergeMap((response) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp) => this.responseProcessor.createUser(rsp))); + })); + } + /** + * Version: 9.7.0.cl or later Deactivates a user account. Requires `ADMINISTRATION` (**Can administer Thoughtspot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `USER_ADMINISTRATION` (**Can manage users**) privilege is required. To deactivate a user account, the API request body must include the following information: - Username or the GUID of the user account - Base URL of the ThoughtSpot instance If the API request is successful, ThoughtSpot returns the activation URL in the response. The activation URL is valid for 14 days and can be used to re-activate the account and reset the password of the deactivated account. + * @param deactivateUserRequest + */ + deactivateUser(deactivateUserRequest, _options) { + const requestContextPromise = this.requestFactory.deactivateUser(deactivateUserRequest, _options); + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx) => middleware.pre(ctx))); + } + return middlewarePreObservable.pipe(mergeMap((ctx) => this.configuration.httpApi.send(ctx))).pipe(mergeMap((response) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp) => this.responseProcessor.deactivateUser(rsp))); + })); + } + /** + * Version: 9.0.0.cl or later Deletes a user from the ThoughtSpot system. If you want to remove a user from a specific Org but not from ThoughtSpot, update the group and Org mapping properties of the user object via a POST API call to the [/api/rest/2.0/users/{user_identifier}/update](#/http/api-endpoints/users/update-user) endpoint. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `USER_ADMINISTRATION` (**Can manage users**) privilege is required. + * @param userIdentifier GUID / name of the user + */ + deleteUser(userIdentifier, _options) { + const requestContextPromise = this.requestFactory.deleteUser(userIdentifier, _options); + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx) => middleware.pre(ctx))); + } + return middlewarePreObservable.pipe(mergeMap((ctx) => this.configuration.httpApi.send(ctx))).pipe(mergeMap((response) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp) => this.responseProcessor.deleteUser(rsp))); + })); + } + /** + * Version: 9.0.0.cl or later Enforces logout on current user sessions. Use this API with caution as it may invalidate active user sessions and force users to re-login. Make sure you specify the usernames or GUIDs. If you pass null values in the API call, all user sessions on your cluster become invalid, and the users are forced to re-login. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `USER_ADMINISTRATION` (**Can manage users**) privilege is required. + * @param forceLogoutUsersRequest + */ + forceLogoutUsers(forceLogoutUsersRequest, _options) { + const requestContextPromise = this.requestFactory.forceLogoutUsers(forceLogoutUsersRequest, _options); + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx) => middleware.pre(ctx))); + } + return middlewarePreObservable.pipe(mergeMap((ctx) => this.configuration.httpApi.send(ctx))).pipe(mergeMap((response) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp) => this.responseProcessor.forceLogoutUsers(rsp))); + })); + } + /** + * Version: 9.0.0.cl or later Imports user data from external databases into ThoughtSpot. During the user import operation: * If the specified users are not available in ThoughtSpot, the users are created and assigned a default password. Defining a `default_password` in the API request is optional. * If `delete_unspecified_users` is set to `true`, the users not specified in the API request, excluding the `tsadmin`, `guest`, `system` and `su` users, are deleted. * If the specified user objects are already available in ThoughtSpot, the object properties are updated and synchronized as per the input data in the API request. A successful API call returns the object that represents the changes made in the ThoughtSpot system. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `USER_ADMINISTRATION` (**Can manage users**) privilege is required. + * @param importUsersRequest + */ + importUsers(importUsersRequest, _options) { + const requestContextPromise = this.requestFactory.importUsers(importUsersRequest, _options); + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx) => middleware.pre(ctx))); + } + return middlewarePreObservable.pipe(mergeMap((ctx) => this.configuration.httpApi.send(ctx))).pipe(mergeMap((response) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp) => this.responseProcessor.importUsers(rsp))); + })); + } + /** + * Version: 9.0.0.cl or later Resets the password of a user account. Administrators can reset password on behalf of a user. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `USER_ADMINISTRATION` (**Can manage users**) privilege is required. + * @param resetUserPasswordRequest + */ + resetUserPassword(resetUserPasswordRequest, _options) { + const requestContextPromise = this.requestFactory.resetUserPassword(resetUserPasswordRequest, _options); + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx) => middleware.pre(ctx))); + } + return middlewarePreObservable.pipe(mergeMap((ctx) => this.configuration.httpApi.send(ctx))).pipe(mergeMap((response) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp) => this.responseProcessor.resetUserPassword(rsp))); + })); + } + /** + * Version: 9.0.0.cl or later Gets a list of users available on the ThoughtSpot system. To get details of a specific user, specify the user GUID or name. You can also filter the API response based on groups, Org ID, user visibility, account status, user type, and user preference settings and favorites. Available to all users. Users with `ADMINISTRATION` (**Can administer ThoughtSpot**) privileges can view all users properties. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `USER_ADMINISTRATION` (**Can manage users**) privilege is required. **NOTE**: If the API returns an empty list, consider increasing the value of the `record_size` parameter. To search across all available users, set `record_size` to `-1`. + * @param searchUsersRequest + */ + searchUsers(searchUsersRequest, _options) { + const requestContextPromise = this.requestFactory.searchUsers(searchUsersRequest, _options); + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx) => middleware.pre(ctx))); + } + return middlewarePreObservable.pipe(mergeMap((ctx) => this.configuration.httpApi.send(ctx))).pipe(mergeMap((response) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp) => this.responseProcessor.searchUsers(rsp))); + })); + } + /** + * Version: 9.0.0.cl or later Updates the properties of a user object. You can modify user properties such as username, email, and share notification settings. You can also assign new groups and Orgs, remove the user from a group or Org, reset password, and modify user preferences. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `USER_ADMINISTRATION` (**Can manage users**) privilege is required. + * @param userIdentifier GUID / name of the user + * @param updateUserRequest + */ + updateUser(userIdentifier, updateUserRequest, _options) { + const requestContextPromise = this.requestFactory.updateUser(userIdentifier, updateUserRequest, _options); + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx) => middleware.pre(ctx))); + } + return middlewarePreObservable.pipe(mergeMap((ctx) => this.configuration.httpApi.send(ctx))).pipe(mergeMap((response) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp) => this.responseProcessor.updateUser(rsp))); + })); + } +}; +var ObservableVariableApi = class { + constructor(configuration, requestFactory, responseProcessor) { + this.configuration = configuration; + this.requestFactory = requestFactory || new VariableApiRequestFactory(configuration); + this.responseProcessor = responseProcessor || new VariableApiResponseProcessor(); + } + /** + * Create a variable which can be used for parameterizing metadata objects Version: 26.4.0.cl or later Allows creating a variable which can be used for parameterizing metadata objects in ThoughtSpot. Requires ADMINISTRATION role and TENANT scope. The CAN_MANAGE_VARIABLES permission allows you to manage Formula Variables in the current organization scope. The API endpoint supports the following types of variables: * CONNECTION_PROPERTY - For connection properties * TABLE_MAPPING - For table mappings * CONNECTION_PROPERTY_PER_PRINCIPAL - For connection properties per principal. In order to use this please contact support to enable this. * FORMULA_VARIABLE - For Formula variables, introduced in 10.15.0.cl When creating a variable, you need to specify: * The variable type * A unique name for the variable * Whether the variable contains sensitive values (defaults to false) * The data type of the variable, only specify for formula variables (defaults to null) The operation will fail if: * The user lacks required permissions * The variable name already exists * The variable type is invalid + * @param createVariableRequest + */ + createVariable(createVariableRequest, _options) { + const requestContextPromise = this.requestFactory.createVariable(createVariableRequest, _options); + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx) => middleware.pre(ctx))); + } + return middlewarePreObservable.pipe(mergeMap((ctx) => this.configuration.httpApi.send(ctx))).pipe(mergeMap((response) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp) => this.responseProcessor.createVariable(rsp))); + })); + } + /** + * Delete a variable Version: 10.14.0.cl or later **Note:** This API endpoint is deprecated and will be removed from ThoughtSpot in a future release. Use [POST /api/rest/2.0/template/variables/delete](/api/rest/2.0/template/variables/delete) instead. Allows deleting a variable from ThoughtSpot. Requires ADMINISTRATION role and TENANT scope. The CAN_MANAGE_VARIABLES permission allows you to manage Formula Variables in the current organization scope. The API endpoint requires: * The variable identifier (ID or name) The operation will fail if: * The user lacks required permissions * The variable doesn\'t exist * The variable is being used by other objects + * @param identifier Unique id or name of the variable + */ + deleteVariable(identifier, _options) { + const requestContextPromise = this.requestFactory.deleteVariable(identifier, _options); + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx) => middleware.pre(ctx))); + } + return middlewarePreObservable.pipe(mergeMap((ctx) => this.configuration.httpApi.send(ctx))).pipe(mergeMap((response) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp) => this.responseProcessor.deleteVariable(rsp))); + })); + } + /** + * Delete variable(s) Version: 26.4.0.cl or later Allows deleting multiple variables from ThoughtSpot. Requires ADMINISTRATION role and TENANT scope. The CAN_MANAGE_VARIABLES permission allows you to manage Formula Variables in the current organization scope. The API endpoint requires: * The variable identifiers (IDs or names) The operation will fail if: * The user lacks required permissions * Any of the variables don\'t exist * Any of the variables are being used by other objects + * @param deleteVariablesRequest + */ + deleteVariables(deleteVariablesRequest, _options) { + const requestContextPromise = this.requestFactory.deleteVariables(deleteVariablesRequest, _options); + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx) => middleware.pre(ctx))); + } + return middlewarePreObservable.pipe(mergeMap((ctx) => this.configuration.httpApi.send(ctx))).pipe(mergeMap((response) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp) => this.responseProcessor.deleteVariables(rsp))); + })); + } + /** + * Update values for a variable Version: 26.4.0.cl or later Allows updating values for a specific variable in ThoughtSpot. Requires ADMINISTRATION role. The CAN_MANAGE_VARIABLES permission allows you to manage Formula Variables in the current organization scope. The API endpoint allows: * Adding new values to the variable * Replacing existing values * Deleting values from the variable * Resetting all values When updating variable values, you need to specify: * The variable identifier (ID or name) * The values to add/replace/remove * The operation to perform (ADD, REPLACE, REMOVE, RESET) Behaviour based on operation type: * ADD - Adds values to the variable if this is a list type variable, else same as replace. * REPLACE - Replaces all values of a given set of constraints with the current set of values. * REMOVE - Removes any values which match the set of conditions of the variables if this is a list type variable, else clears value. * RESET - Removes all constraints for the given variable, scope is ignored + * @param identifier Unique ID or name of the variable + * @param putVariableValuesRequest + */ + putVariableValues(identifier, putVariableValuesRequest, _options) { + const requestContextPromise = this.requestFactory.putVariableValues(identifier, putVariableValuesRequest, _options); + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx) => middleware.pre(ctx))); + } + return middlewarePreObservable.pipe(mergeMap((ctx) => this.configuration.httpApi.send(ctx))).pipe(mergeMap((response) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp) => this.responseProcessor.putVariableValues(rsp))); + })); + } + /** + * Search variables Version: 26.4.0.cl or later Allows searching for variables in ThoughtSpot. Requires ADMINISTRATION role. The CAN_MANAGE_VARIABLES permission allows you to manage Formula Variables in the current organization scope. The API endpoint supports searching variables by: * Variable identifier (ID or name) * Variable type * Name pattern (case-insensitive, supports % for wildcard) The search results can be formatted in three ways: * METADATA - Returns only variable metadata (default) * METADATA_AND_VALUES - Returns variable metadata and values The values can be filtered by scope: * org_identifier * principal_identifier * model_identifier + * @param searchVariablesRequest + */ + searchVariables(searchVariablesRequest, _options) { + const requestContextPromise = this.requestFactory.searchVariables(searchVariablesRequest, _options); + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx) => middleware.pre(ctx))); + } + return middlewarePreObservable.pipe(mergeMap((ctx) => this.configuration.httpApi.send(ctx))).pipe(mergeMap((response) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp) => this.responseProcessor.searchVariables(rsp))); + })); + } + /** + * Update a variable\'s name Version: 26.4.0.cl or later Allows updating a variable\'s name in ThoughtSpot. Requires ADMINISTRATION role and TENANT scope. The CAN_MANAGE_VARIABLES permission allows you to manage Formula Variables in the current organization scope. The API endpoint allows updating: * The variable name + * @param identifier Unique id or name of the variable to update. + * @param updateVariableRequest + */ + updateVariable(identifier, updateVariableRequest, _options) { + const requestContextPromise = this.requestFactory.updateVariable(identifier, updateVariableRequest, _options); + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx) => middleware.pre(ctx))); + } + return middlewarePreObservable.pipe(mergeMap((ctx) => this.configuration.httpApi.send(ctx))).pipe(mergeMap((response) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp) => this.responseProcessor.updateVariable(rsp))); + })); + } + /** + * Update values for multiple variables Version: 10.14.0.cl or later **Note:** This API endpoint is deprecated and will be removed from ThoughtSpot in a future release. Use [POST /api/rest/2.0/template/variables/{identifier}/update-values](/api/rest/2.0/template/variables/%7Bidentifier%7D/update-values) instead. Allows updating values for multiple variables in ThoughtSpot. Requires ADMINISTRATION role. The CAN_MANAGE_VARIABLES permission allows you to manage Formula Variables in the current organization scope. The API endpoint allows: * Adding new values to variables * Replacing existing values * Deleting values from variables When updating variable values, you need to specify: * The variable identifiers * The values to add/replace/remove for each variable * The operation to perform (ADD, REPLACE, REMOVE, RESET) Behaviour based on operation type: * ADD - Adds values to the variable if this is a list type variable, else same as replace. * REPLACE - Replaces all values of a given set of constraints with the current set of values. * REMOVE - Removes any values which match the set of conditions of the variables if this is a list type variable, else clears value. * RESET - Removes all constrains for a given variable, scope is ignored + * @param updateVariableValuesRequest + */ + updateVariableValues(updateVariableValuesRequest, _options) { + const requestContextPromise = this.requestFactory.updateVariableValues(updateVariableValuesRequest, _options); + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx) => middleware.pre(ctx))); + } + return middlewarePreObservable.pipe(mergeMap((ctx) => this.configuration.httpApi.send(ctx))).pipe(mergeMap((response) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp) => this.responseProcessor.updateVariableValues(rsp))); + })); + } +}; +var ObservableVersionControlApi = class { + constructor(configuration, requestFactory, responseProcessor) { + this.configuration = configuration; + this.requestFactory = requestFactory || new VersionControlApiRequestFactory(configuration); + this.responseProcessor = responseProcessor || new VersionControlApiResponseProcessor(); + } + /** + * Version: 9.2.0.cl or later Commits TML files of metadata objects to the Git branch configured on your instance. Requires at least edit access to objects used in the commit operation. Before using this endpoint to push your commits: * Enable Git integration on your instance. * Make sure the Git repository and branch details are configured on your instance. For more information, see [Git integration documentation](https://developers.thoughtspot.com/docs/git-integration). + * @param commitBranchRequest + */ + commitBranch(commitBranchRequest, _options) { + const requestContextPromise = this.requestFactory.commitBranch(commitBranchRequest, _options); + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx) => middleware.pre(ctx))); + } + return middlewarePreObservable.pipe(mergeMap((ctx) => this.configuration.httpApi.send(ctx))).pipe(mergeMap((response) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp) => this.responseProcessor.commitBranch(rsp))); + })); + } + /** + * Version: 9.2.0.cl or later Allows you to connect a ThoughtSpot instance to a Git repository. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance on your instance, the `CAN_SETUP_VERSION_CONTROL` (**Can set up version control**) privilege. You can use this API endpoint to connect your ThoughtSpot development and production environments to the development and production branches of a Git repository. Before using this endpoint to connect your ThoughtSpot instance to a Git repository, check the following prerequisites: * You have a Git repository. If you are using GitHub, make sure you have a valid account and an access token to connect ThoughtSpot to GitHub. For information about generating a token, see [GitHub Documentation](https://docs.github.com/en/authentication/keeping-your-account-and-data-secure/managing-your-personal-access-tokens). * Your access token has `repo` scope that grants full access to public and private repositories. * Your Git repository has a branch that can be configured as a default branch in ThoughtSpot. For more information, see [Git integration documentation](https://developers.thoughtspot.com/docs/?pageid=git-integration). **Note**: ThoughtSpot supports only GitHub / itHub Enterprise for CI/CD. + * @param createConfigRequest + */ + createConfig(createConfigRequest, _options) { + const requestContextPromise = this.requestFactory.createConfig(createConfigRequest, _options); + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx) => middleware.pre(ctx))); + } + return middlewarePreObservable.pipe(mergeMap((ctx) => this.configuration.httpApi.send(ctx))).pipe(mergeMap((response) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp) => this.responseProcessor.createConfig(rsp))); + })); + } + /** + * Version: 9.2.0.cl or later Deletes Git repository configuration from your ThoughtSpot instance. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance on your instance, the `CAN_SETUP_VERSION_CONTROL` (**Can set up version control**) privilege. + * @param deleteConfigRequest + */ + deleteConfig(deleteConfigRequest, _options) { + const requestContextPromise = this.requestFactory.deleteConfig(deleteConfigRequest, _options); + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx) => middleware.pre(ctx))); + } + return middlewarePreObservable.pipe(mergeMap((ctx) => this.configuration.httpApi.send(ctx))).pipe(mergeMap((response) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp) => this.responseProcessor.deleteConfig(rsp))); + })); + } + /** + * Version: 9.2.0.cl or later Allows you to deploy a commit and publish TML content to your ThoughtSpot instance. Requires at least edit access to the objects used in the deploy operation. The API deploys the head of the branch unless a `commit_id` is specified in the API request. If the branch name is not defined in the request, the default branch is considered for deploying commits. For more information, see [Git integration documentation](https://developers.thoughtspot.com/docs/git-integration). + * @param deployCommitRequest + */ + deployCommit(deployCommitRequest, _options) { + const requestContextPromise = this.requestFactory.deployCommit(deployCommitRequest, _options); + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx) => middleware.pre(ctx))); + } + return middlewarePreObservable.pipe(mergeMap((ctx) => this.configuration.httpApi.send(ctx))).pipe(mergeMap((response) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp) => this.responseProcessor.deployCommit(rsp))); + })); + } + /** + * Version: 9.2.0.cl or later Reverts TML objects to a previous commit specified in the API request. Requires at least edit access to objects. In the API request, specify the `commit_id`. If the branch name is not specified in the request, the API will consider the default branch configured on your instance. By default, the API reverts all objects. If the revert operation fails for one of the objects provided in the commit, the API returns an error and does not revert any object. For more information, see [Git integration documentation](https://developers.thoughtspot.com/docs/git-integration). + * @param commitId Commit id to which the object should be reverted + * @param revertCommitRequest + */ + revertCommit(commitId, revertCommitRequest, _options) { + const requestContextPromise = this.requestFactory.revertCommit(commitId, revertCommitRequest, _options); + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx) => middleware.pre(ctx))); + } + return middlewarePreObservable.pipe(mergeMap((ctx) => this.configuration.httpApi.send(ctx))).pipe(mergeMap((response) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp) => this.responseProcessor.revertCommit(rsp))); + })); + } + /** + * Version: 9.2.0.cl or later Gets a list of commits for a given metadata object. Requires `DATAMANAGEMENT` (**Can manage data**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance on your instance, the `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` (**Can manage data models**) privilege and edit access to the metadata objects. + * @param searchCommitsRequest + */ + searchCommits(searchCommitsRequest, _options) { + const requestContextPromise = this.requestFactory.searchCommits(searchCommitsRequest, _options); + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx) => middleware.pre(ctx))); + } + return middlewarePreObservable.pipe(mergeMap((ctx) => this.configuration.httpApi.send(ctx))).pipe(mergeMap((response) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp) => this.responseProcessor.searchCommits(rsp))); + })); + } + /** + * Version: 9.2.0.cl or later Gets Git repository connections configured on the ThoughtSpot instance. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance on your instance, the `CAN_SETUP_VERSION_CONTROL` (**Can set up version control**) privilege. + * @param searchConfigRequest + */ + searchConfig(searchConfigRequest, _options) { + const requestContextPromise = this.requestFactory.searchConfig(searchConfigRequest, _options); + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx) => middleware.pre(ctx))); + } + return middlewarePreObservable.pipe(mergeMap((ctx) => this.configuration.httpApi.send(ctx))).pipe(mergeMap((response) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp) => this.responseProcessor.searchConfig(rsp))); + })); + } + /** + * Version: 9.2.0.cl or later Updates Git repository configuration settings. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance on your instance, the `CAN_SETUP_VERSION_CONTROL` (**Can set up version control**) privilege. + * @param updateConfigRequest + */ + updateConfig(updateConfigRequest, _options) { + const requestContextPromise = this.requestFactory.updateConfig(updateConfigRequest, _options); + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx) => middleware.pre(ctx))); + } + return middlewarePreObservable.pipe(mergeMap((ctx) => this.configuration.httpApi.send(ctx))).pipe(mergeMap((response) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp) => this.responseProcessor.updateConfig(rsp))); + })); + } + /** + * Version: 9.2.0.cl or later Validates the content of your source branch against the objects in your destination environment. Before merging content from your source branch to the destination branch, run this API operation from your destination environment and ensure that the changes from the source branch function in the destination environment. Requires `DATAMANAGEMENT` (**Can manage data**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance on your instance, the `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` (**Can manage data models**) privilege and edit access to the metadata objects. + * @param validateMergeRequest + */ + validateMerge(validateMergeRequest, _options) { + const requestContextPromise = this.requestFactory.validateMerge(validateMergeRequest, _options); + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx) => middleware.pre(ctx))); + } + return middlewarePreObservable.pipe(mergeMap((ctx) => this.configuration.httpApi.send(ctx))).pipe(mergeMap((response) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp) => this.responseProcessor.validateMerge(rsp))); + })); + } +}; +var ObservableWebhooksApi = class { + constructor(configuration, requestFactory, responseProcessor) { + this.configuration = configuration; + this.requestFactory = requestFactory || new WebhooksApiRequestFactory(configuration); + this.responseProcessor = responseProcessor || new WebhooksApiResponseProcessor(); + } + /** + * Version: 10.14.0.cl or later Creates a new webhook configuration to receive notifications for specified events. The webhook will be triggered when the configured events occur in the system. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) or `DEVELOPER` (**Has developer privilege**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, users with `CAN_MANAGE_WEBHOOKS` (**Can manage webhooks**) privilege are also authorized to perform this action. + * @param createWebhookConfigurationRequest + */ + createWebhookConfiguration(createWebhookConfigurationRequest, _options) { + const requestContextPromise = this.requestFactory.createWebhookConfiguration(createWebhookConfigurationRequest, _options); + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx) => middleware.pre(ctx))); + } + return middlewarePreObservable.pipe(mergeMap((ctx) => this.configuration.httpApi.send(ctx))).pipe(mergeMap((response) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp) => this.responseProcessor.createWebhookConfiguration(rsp))); + })); + } + /** + * Version: 10.14.0.cl or later Deletes one or more webhook configurations by their unique id or name. Returns status of each deletion operation, including successfully deleted webhooks and any failures with error details. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) or `DEVELOPER` (**Has developer privilege**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, users with `CAN_MANAGE_WEBHOOKS` (**Can manage webhooks**) privilege are also authorized to perform this action. + * @param deleteWebhookConfigurationsRequest + */ + deleteWebhookConfigurations(deleteWebhookConfigurationsRequest, _options) { + const requestContextPromise = this.requestFactory.deleteWebhookConfigurations(deleteWebhookConfigurationsRequest, _options); + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx) => middleware.pre(ctx))); + } + return middlewarePreObservable.pipe(mergeMap((ctx) => this.configuration.httpApi.send(ctx))).pipe(mergeMap((response) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp) => this.responseProcessor.deleteWebhookConfigurations(rsp))); + })); + } + /** + * Version: 10.14.0.cl or later Searches for webhook configurations based on various criteria such as Org, webhook identifier, event type, with support for pagination and sorting. Returns matching webhook configurations with their complete details. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) or `DEVELOPER` (**Has developer privilege**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, users with `CAN_MANAGE_WEBHOOKS` (**Can manage webhooks**) privilege are also authorized to perform this action. + * @param searchWebhookConfigurationsRequest + */ + searchWebhookConfigurations(searchWebhookConfigurationsRequest, _options) { + const requestContextPromise = this.requestFactory.searchWebhookConfigurations(searchWebhookConfigurationsRequest, _options); + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx) => middleware.pre(ctx))); + } + return middlewarePreObservable.pipe(mergeMap((ctx) => this.configuration.httpApi.send(ctx))).pipe(mergeMap((response) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp) => this.responseProcessor.searchWebhookConfigurations(rsp))); + })); + } + /** + * Version: 10.14.0.cl or later Updates an existing webhook configuration by its unique id or name. Only the provided fields will be updated. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) or `DEVELOPER` (**Has developer privilege**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, users with `CAN_MANAGE_WEBHOOKS` (**Can manage webhooks**) privilege are also authorized to perform this action. + * @param webhookIdentifier Unique ID or name of the webhook configuration. + * @param updateWebhookConfigurationRequest + */ + updateWebhookConfiguration(webhookIdentifier, updateWebhookConfigurationRequest, _options) { + const requestContextPromise = this.requestFactory.updateWebhookConfiguration(webhookIdentifier, updateWebhookConfigurationRequest, _options); + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx) => middleware.pre(ctx))); + } + return middlewarePreObservable.pipe(mergeMap((ctx) => this.configuration.httpApi.send(ctx))).pipe(mergeMap((response) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp) => this.responseProcessor.updateWebhookConfiguration(rsp))); + })); + } +}; + +// types/PromiseAPI.ts +var PromiseAIApi = class { + constructor(configuration, requestFactory, responseProcessor) { + this.api = new ObservableAIApi(configuration, requestFactory, responseProcessor); + } + /** + * Version: 26.2.0.cl or later Creates a new Spotter agent conversation based on the provided context and settings. The endpoint was in Beta from 26.2.0.cl through 26.4.0.cl. Requires `CAN_USE_SPOTTER` privilege and at least view access to the metadata object specified in the request. #### Usage guidelines The request must include the `metadata_context` parameter to define the conversation context. The context type can be one of: - `DATA_SOURCE` *(available from 26.5.0.cl)*: targets a specific data source. Provide `data_source_identifier` in `data_source_context` for a single data source, or `data_source_identifiers` for multi-data-source context. The deprecated `guid` field is accepted for backwards compatibility. - `AUTO_MODE` *(available from 26.5.0.cl)*: automatically discovers and selects the most relevant datasets for the user\'s queries. > **Note for callers on versions 26.2.0.cl – 26.4.0.cl (Beta):** use the lowercase `data_source` enum value with the `guid` field instead of the above. Example: `{ \"type\": \"data_source\", \"data_source_context\": { \"guid\": \"\" } }`. The `conversation_settings` parameter controls which Spotter capabilities are enabled for the conversation: - `enable_contextual_change_analysis` (default: `true`, **deprecated from 26.2.0.cl**) — always enabled in Spotter 3; setting this to `false` has no effect on versions >= 26.2.0.cl - `enable_natural_language_answer_generation` (default: `true`, **deprecated from 26.2.0.cl**) — always enabled in Spotter 3; setting this to `false` has no effect on versions >= 26.2.0.cl - `enable_reasoning` (default: `true`, **deprecated from 26.2.0.cl**) — always enabled in Spotter 3; setting this to `false` has no effect on versions >= 26.2.0.cl - `enable_save_chat` (default: `false`, *available from 26.5.0.cl*) — enables saving the conversation for later retrieval via conversation history If the request is successful, the response includes a unique `conversation_identifier` that must be passed to `sendAgentConversationMessage` or `sendAgentConversationMessageStreaming` to send messages within this conversation. The response also includes `conversation_id` with the same value for backwards compatibility; use `conversation_identifier` for new integrations. #### Example request ```json { \"metadata_context\": { \"type\": \"DATA_SOURCE\", \"data_source_context\": { \"data_source_identifier\": \"a1b2c3d4-e5f6-7890-abcd-ef1234567890\" } }, \"conversation_settings\": {} } ``` #### Error responses | Code | Description | | ---- | --------------------------------------------------------------------------------------------------------------------------------------- | | 401 | Unauthorized — authentication token is missing, expired, or invalid. | | 403 | Forbidden — the authenticated user does not have `CAN_USE_SPOTTER` privilege or lacks view permission on the specified metadata object. | > ###### Note: > > - This endpoint was in Beta from 26.2.0.cl through 26.4.0.cl and is Generally Available from version 26.5.0.cl. > - This endpoint requires Spotter - please contact ThoughtSpot support to enable Spotter on your cluster. + * @param createAgentConversationRequest + */ + createAgentConversation(createAgentConversationRequest, _options) { + const result = this.api.createAgentConversation(createAgentConversationRequest, _options); + return result.toPromise(); + } + /** + * Version: 10.4.0.cl or later Creates a new conversation session tied to a specific data model for AI-driven natural language querying. Requires `CAN_USE_SPOTTER` privilege and at least view access to the metadata object specified in the request. #### Usage guidelines The request must include: - `metadata_identifier`: the unique ID of the data source that provides context for the conversation Optionally, you can provide: - `tokens`: a token string to set initial context for the conversation (e.g., `\"[sales],[item type],[state]\"`) If the request is successful, ThoughtSpot returns a unique `conversation_identifier` that must be passed to `sendMessage` to continue the conversation. #### Error responses | Code | Description | |------|-------------| | 401 | Unauthorized — authentication token is missing, expired, or invalid. | | 403 | Forbidden — the authenticated user does not have `CAN_USE_SPOTTER` privilege or lacks view permission on the specified metadata object. | > ###### Note: > * This endpoint is currently in Beta. Breaking changes may be introduced before the endpoint is made Generally Available. > * This endpoint requires Spotter - please contact ThoughtSpot support to enable Spotter on your cluster. + * @param createConversationRequest + */ + createConversation(createConversationRequest, _options) { + const result = this.api.createConversation(createConversationRequest, _options); + return result.toPromise(); + } + /** + * Version: 10.15.0.cl or later Suggests the most relevant data sources for a given natural language query, ranked by confidence with LLM-generated reasoning. Requires `CAN_USE_SPOTTER` privilege and at least view-level access to the underlying metadata entities referenced in the response. #### Usage guidelines The request must include: - `query`: the natural language question to find relevant data sources for If the request is successful, the API returns a ranked list of suggested data sources, each containing: - `confidence`: a float score indicating the model\'s confidence in the relevance of the suggestion - `details`: metadata about the data source - `data_source_identifier`: the unique ID of the data source - `data_source_name`: the display name of the data source - `description`: a description of the data source - `reasoning`: LLM-generated rationale explaining why the data source was recommended #### Error responses | Code | Description | |------|--------------------------------------------------------------------------------------------------------------------------------------------| | 401 | Unauthorized — authentication token is missing, expired, or invalid. | | 403 | Forbidden — the authenticated user does not have `CAN_USE_SPOTTER` privilege or lacks view permission on the underlying metadata entities. | > ###### Note: > * This endpoint is currently in Beta. Breaking changes may be introduced before it is made Generally Available. > * This endpoint requires Spotter — please contact ThoughtSpot Support to enable Spotter on your cluster. + * @param getDataSourceSuggestionsRequest + */ + getDataSourceSuggestions(getDataSourceSuggestionsRequest, _options) { + const result = this.api.getDataSourceSuggestions(getDataSourceSuggestionsRequest, _options); + return result.toPromise(); + } + /** + * Version: 10.15.0.cl or later Retrieves existing natural language (NL) instructions configured for a specific data model. These instructions guide the AI system in understanding data context and generating more accurate responses. Requires `CAN_USE_SPOTTER` privilege, at least view access on the data model, and a bearer token corresponding to the org where the data model exists. #### Usage guidelines The request must include: - `data_source_identifier`: the unique ID of the data model to retrieve instructions for If the request is successful, the API returns: - `nl_instructions_info`: an array of instruction objects, each containing: - `instructions`: the configured text instructions for AI processing - `scope`: the scope of the instruction — currently only `GLOBAL` is supported #### Instructions scope - **GLOBAL**: Instructions that apply globally across the system on the given data-model (currently only global instructions are supported) #### Error responses | Code | Description | |------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| | 401 | Unauthorized — authentication token is missing, expired, or invalid. | | 403 | Forbidden — the authenticated user does not have `CAN_USE_SPOTTER` privilege, lacks view access on the data model, or the bearer token does not correspond to the org where the data model exists. | > ###### Note: > > - To use this API, the user needs at least view access on the data model, and must use the bearer token corresponding to the org where the data model exists. > - This endpoint is currently in Beta. Breaking changes may be introduced before the endpoint is made Generally Available. > - Available from version 10.15.0.cl and later. > - This endpoint requires Spotter — please contact ThoughtSpot Support to enable Spotter on your cluster. > - Use this API to review currently configured instructions before modifying them with `setNLInstructions`. + * @param getNLInstructionsRequest + */ + getNLInstructions(getNLInstructionsRequest, _options) { + const result = this.api.getNLInstructions(getNLInstructionsRequest, _options); + return result.toPromise(); + } + /** + * Version: 10.13.0.cl or later Breaks down a natural language query into a series of smaller analytical sub-questions, each mapped to a relevant data source. Requires `CAN_USE_SPOTTER` privilege and at least view-level access to the referenced metadata objects. #### Usage guidelines The request must include: - `query`: the natural language question to decompose into analytical sub-questions - `metadata_context`: at least one of the following context identifiers to guide question generation: - `conversation_identifier` — an existing conversation session ID - `answer_identifiers` — a list of Answer GUIDs - `liveboard_identifiers` — a list of Liveboard GUIDs - `data_source_identifiers` — a list of data source GUIDs Optional parameters for refining the output: - `ai_context`: additional context to improve response quality - `content` — supplementary text or CSV data as string input - `instructions` — custom text instructions for the AI system - `limit_relevant_questions`: maximum number of questions to return (default: `5`) - `bypass_cache`: if `true`, forces fresh computation instead of returning cached results If the request is successful, the API returns a list of relevant analytical questions, each containing: - `query`: the generated sub-question - `data_source_identifier`: the unique ID of the data source the question targets - `data_source_name`: the display name of the corresponding data source #### Error responses | Code | Description | |------|---------------------------------------------------------------------------------------------------------------------------------------| | 401 | Unauthorized — authentication token is missing, expired, or invalid. | | 403 | Forbidden — the authenticated user does not have `CAN_USE_SPOTTER` privilege or lacks view access to the referenced metadata objects. | > ###### Note: > * This endpoint is currently in Beta. Breaking changes may be introduced before the endpoint is made Generally Available. > * This endpoint requires Spotter - please contact ThoughtSpot support to enable Spotter on your cluster. + * @param getRelevantQuestionsRequest + */ + getRelevantQuestions(getRelevantQuestionsRequest, _options) { + const result = this.api.getRelevantQuestions(getRelevantQuestionsRequest, _options); + return result.toPromise(); + } + /** + * Version: 10.7.0.cl or later **Deprecated** — Use `getRelevantQuestions` instead (available from 10.13.0.cl). Breaks down a topical or goal-oriented natural language question into smaller, actionable analytical sub-questions, each mapped to a relevant data source for independent execution. Requires `CAN_USE_SPOTTER` privilege and at least view-level access to the referenced metadata objects. #### Usage guidelines The request accepts the following parameters: - `nlsRequest`: contains the user `query` to decompose, along with optional `instructions` and `bypassCache` flag - `worksheetIds`: list of data source identifiers to scope the decomposition - `answerIds`: list of Answer GUIDs whose data guides the response - `liveboardIds`: list of Liveboard GUIDs whose data guides the response - `conversationId`: an existing conversation session ID for context continuity - `content`: supplementary text or CSV data to improve response quality - `maxDecomposedQueries`: maximum number of sub-questions to return (default: `5`) If the request is successful, the API returns a `decomposedQueryResponse` containing a list of `decomposedQueries`, each with: - `query`: the generated analytical sub-question - `worksheetId`: the unique ID of the data source the question targets - `worksheetName`: the display name of the corresponding data source #### Error responses | Code | Description | |------|---------------------------------------------------------------------------------------------------------------------------------------| | 401 | Unauthorized — authentication token is missing, expired, or invalid. | | 403 | Forbidden — the authenticated user does not have `CAN_USE_SPOTTER` privilege or lacks view access to the referenced metadata objects. | > ###### Note: > * This endpoint is deprecated since 10.13.0.cl. Use `getRelevantQuestions` for new integrations. > * This endpoint is currently in Beta. Breaking changes may be introduced before the endpoint is made Generally Available. > * This endpoint requires Spotter — please contact ThoughtSpot support to enable Spotter on your cluster. + * @param queryGetDecomposedQueryRequest + */ + queryGetDecomposedQuery(queryGetDecomposedQueryRequest, _options) { + const result = this.api.queryGetDecomposedQuery(queryGetDecomposedQueryRequest, _options); + return result.toPromise(); + } + /** + * Version: 26.5.0.cl or later Sends natural language messages to an existing Spotter agent conversation and returns the complete response synchronously. Requires `CAN_USE_SPOTTER` privilege and access to the metadata object associated with the conversation. The user must have access to the conversation session referenced by `conversation_identifier`. A conversation must first be created using the `createAgentConversation` API. #### Usage guidelines The request must include: - `conversation_identifier`: the unique session ID returned by `createAgentConversation`, used for context continuity and message tracking - `messages`: an array of one or more text messages to send to the agent The API returns an array of response objects, each containing: - `type`: the kind of response — `text`, `answer`, or `error` - `message`: the main content of the response - `metadata`: additional information depending on the message type (e.g., answer metadata includes analytics and visualization details) #### Error responses | Code | Description | |------|----------------------------------------------------------------------------------------------------------------------------------| | 401 | Unauthorized — authentication token is missing, expired, or invalid. | | 403 | Forbidden — the authenticated user does not have `CAN_USE_SPOTTER` privilege or lacks permission on the referenced conversation. | > ###### Note: > > - This endpoint is Generally Available from version 26.5.0.cl. > - This endpoint requires Spotter - please contact ThoughtSpot support to enable Spotter on your cluster. > - For real-time streamed responses, use `sendAgentConversationMessageStreaming` instead. + * @param conversationIdentifier Unique identifier for the conversation (used to track context) + * @param sendAgentConversationMessageRequest + */ + sendAgentConversationMessage(conversationIdentifier, sendAgentConversationMessageRequest, _options) { + const result = this.api.sendAgentConversationMessage(conversationIdentifier, sendAgentConversationMessageRequest, _options); + return result.toPromise(); + } + /** + * Version: 26.5.0.cl or later Sends one or more natural language messages to an existing Spotter agent conversation and returns the response as a real-time Server-Sent Events stream. Requires `CAN_USE_SPOTTER` privilege and access to the metadata object associated with the conversation. The user must have access to the conversation session referenced by `conversation_identifier`. A conversation must first be created using the `createAgentConversation` API. #### Usage guidelines The request must include: - `conversation_identifier`: the unique session ID returned by `createAgentConversation`, used for context continuity and message tracking - `messages`: an array of one or more text messages to send to the agent If the request is valid, the API returns a Server-Sent Events (SSE) stream. Each line has the form `data: [{\"type\": \"...\", ...}]` — a JSON array of event objects. Event types include: - `ack`: confirms receipt of the request (`node_id`) - `conv_title`: conversation title (`title`, `conv_id`) - `notification`: status updates on operations (`group_id`, `metadata`, `code` — e.g. `TOOL_CALL_NOTIFICATION`, `nls_start`, `FINAL_RESPONSE_NOTIFICATION`) - `text-chunk`: incremental content chunks (`id`, `group_id`, `metadata` with `format` and `type` such as `thinking` or `text`, `content`) - `text`: full text block with same structure as `text-chunk` - `answer`: structured answer with metadata (`id`, `group_id`, `metadata` with `sage_query`, `session_id`, `title`, etc., `title`) - `error`: if a failure occurs #### Error responses | Code | Description | | ---- | -------------------------------------------------------------------------------------------------------------------------------- | | 401 | Unauthorized — authentication token is missing, expired, or invalid. | | 403 | Forbidden — the authenticated user does not have `CAN_USE_SPOTTER` privilege or lacks permission on the referenced conversation. | > ###### Note: > > - This endpoint is Generally Available from version 26.5.0.cl. > - This endpoint requires Spotter - please contact ThoughtSpot support to enable Spotter on your cluster. > - The streaming protocol uses Server-Sent Events (SSE). > - For the complete response in a single payload, use `sendAgentConversationMessage` instead. + * @param conversationIdentifier Unique identifier for the conversation (used to track context) + * @param sendAgentConversationMessageStreamingRequest + */ + sendAgentConversationMessageStreaming(conversationIdentifier, sendAgentConversationMessageStreamingRequest, _options) { + const result = this.api.sendAgentConversationMessageStreaming(conversationIdentifier, sendAgentConversationMessageStreamingRequest, _options); + return result.toPromise(); + } + /** + * Version: 26.2.0.cl or later **Deprecated** — Use `sendAgentConversationMessage` instead. Send natural language messages to an existing Spotter agent conversation and returns the complete response synchronously. Requires `CAN_USE_SPOTTER` privilege and access to the metadata object associated with the conversation. The user must have access to the conversation session referenced by `conversation_identifier`. A conversation must first be created using the `createAgentConversation` API. #### Usage guidelines The request must include: - `conversation_identifier`: the unique session ID returned by `createAgentConversation`, used for context continuity and message tracking - `messages`: an array of one or more text messages to send to the agent The API returns an array of response objects, each containing: - `type`: the kind of response — `text`, `answer`, or `error` - `message`: the main content of the response - `metadata`: additional information depending on the message type (e.g., answer metadata includes analytics and visualization details) #### Error responses | Code | Description | |------|----------------------------------------------------------------------------------------------------------------------------------| | 401 | Unauthorized — authentication token is missing, expired, or invalid. | | 403 | Forbidden — the authenticated user does not have `CAN_USE_SPOTTER` privilege or lacks permission on the referenced conversation. | > ###### Note: > > - This endpoint is deprecated. Use `sendAgentConversationMessage` for new integrations. > - This endpoint is currently in Beta. Breaking changes may be introduced before the endpoint is made Generally Available. > - This endpoint requires Spotter - please contact ThoughtSpot support to enable Spotter on your cluster. + * @param conversationIdentifier Unique identifier for the conversation (used to track context) + * @param sendAgentMessageRequest + */ + sendAgentMessage(conversationIdentifier, sendAgentMessageRequest, _options) { + const result = this.api.sendAgentMessage(conversationIdentifier, sendAgentMessageRequest, _options); + return result.toPromise(); + } + /** + * Version: 26.2.0.cl or later **Deprecated** — Use `sendAgentConversationMessageStreaming` instead. Sends one or more natural language messages to an existing Spotter agent conversation and returns the response as a real-time Server-Sent Events stream. Requires `CAN_USE_SPOTTER` privilege and access to the metadata object associated with the conversation. The user must have access to the conversation session referenced by `conversation_identifier`. A conversation must first be created using the `createAgentConversation` API. #### Usage guidelines The request must include: - `conversation_identifier`: the unique session ID returned by `createAgentConversation`, used for context continuity and message tracking - `messages`: an array of one or more text messages to send to the agent If the request is valid, the API returns a Server-Sent Events (SSE) stream. Each line has the form `data: [{\"type\": \"...\", ...}]` — a JSON array of event objects. Event types include: - `ack`: confirms receipt of the request (`node_id`) - `conv_title`: conversation title (`title`, `conv_id`) - `notification`: status updates on operations (`group_id`, `metadata`, `code` — e.g. `TOOL_CALL_NOTIFICATION`, `nls_start`, `FINAL_RESPONSE_NOTIFICATION`) - `text-chunk`: incremental content chunks (`id`, `group_id`, `metadata` with `format` and `type` such as `thinking` or `text`, `content`) - `text`: full text block with same structure as `text-chunk` - `answer`: structured answer with metadata (`id`, `group_id`, `metadata` with `sage_query`, `session_id`, `title`, etc., `title`) - `error`: if a failure occurs #### Error responses | Code | Description | |------|----------------------------------------------------------------------------------------------------------------------------------| | 401 | Unauthorized — authentication token is missing, expired, or invalid. | | 403 | Forbidden — the authenticated user does not have `CAN_USE_SPOTTER` privilege or lacks permission on the referenced conversation. | > ###### Note: > > - This endpoint is deprecated. Use `sendAgentConversationMessageStreaming` for new integrations. > - This endpoint is currently in Beta. Breaking changes may be introduced before the endpoint is made Generally Available. > - This endpoint requires Spotter - please contact ThoughtSpot support to enable Spotter on your cluster. > - The streaming protocol uses Server-Sent Events (SSE). + * @param sendAgentMessageStreamingRequest + */ + sendAgentMessageStreaming(sendAgentMessageStreamingRequest, _options) { + const result = this.api.sendAgentMessageStreaming(sendAgentMessageStreamingRequest, _options); + return result.toPromise(); + } + /** + * Version: 10.4.0.cl or later Sends a follow-up message to an existing conversation within the context of a data model. Requires `CAN_USE_SPOTTER` privilege and at least view access to the metadata object specified in the request. A conversation must first be created using the `createConversation` API. #### Usage guidelines The request must include: - `conversation_identifier`: the unique session ID returned by `createConversation` - `metadata_identifier`: the unique ID of the data source used for the conversation - `message`: a natural language string with the follow-up question If the request is successful, the API returns an array of response messages, each containing: - `session_identifier`: the unique ID of the generated response - `generation_number`: the generation number of the response - `message_type`: the type of the response (e.g., `TSAnswer`) - `visualization_type`: the generated visualization type (`Chart`, `Table`, or `Undefined`) - `tokens` / `display_tokens`: the search tokens and user-friendly display tokens for the response #### Error responses | Code | Description | |------|-----------------------------------------------------------------------------------------------------------------------------------------| | 401 | Unauthorized — authentication token is missing, expired, or invalid. | | 403 | Forbidden — the authenticated user does not have `CAN_USE_SPOTTER` privilege or lacks view permission on the specified metadata object. | > ###### Note: > * This endpoint is currently in Beta. Breaking changes may be introduced before the endpoint is made Generally Available. > * This endpoint requires Spotter - please contact ThoughtSpot support to enable Spotter on your cluster. + * @param conversationIdentifier Unique identifier of the conversation. + * @param sendMessageRequest + */ + sendMessage(conversationIdentifier, sendMessageRequest, _options) { + const result = this.api.sendMessage(conversationIdentifier, sendMessageRequest, _options); + return result.toPromise(); + } + /** + * Version: 10.15.0.cl or later This API allows users to set natural language (NL) instructions for a specific data-model to improve AI-generated answers and query processing. These instructions help guide the AI system to better understand the data context and provide more accurate responses. Requires `CAN_USE_SPOTTER` privilege, either edit access or `SPOTTER_COACHING_PRIVILEGE` on the data model, and a bearer token corresponding to the org where the data model exists. #### Usage guidelines To set NL instructions for a data-model, the request must include: - `data_source_identifier`: The unique ID of the data-model for which to set NL instructions - `nl_instructions_info`: An array of instruction objects, each containing: - `instructions`: Array of text instructions for the LLM - `scope`: The scope of the instruction (`GLOBAL`). Currently only `GLOBAL` is supported. It can be extended to data-model-user scope in future. #### Instructions scope - **GLOBAL**: instructions that apply to all users querying this data model If the request is successful, the API returns: - `success`: a boolean indicating whether the operation completed successfully #### Error responses | Code | Description | |------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| | 401 | Unauthorized — authentication token is missing, expired, or invalid. | | 403 | Forbidden — the authenticated user does not have `CAN_USE_SPOTTER` privilege, lacks edit access or `SPOTTER_COACHING_PRIVILEGE` on the data model, or the bearer token does not correspond to the org where the data model exists. | > ###### Note: > > - To use this API, the user needs either edit access or `SPOTTER_COACHING_PRIVILEGE` on the data model, and must use the bearer token corresponding to the org where the data model exists. > - This endpoint is currently in Beta. Breaking changes may be introduced before the endpoint is made Generally Available. > - Available from version 10.15.0.cl and later. > - This endpoint requires Spotter — please contact ThoughtSpot Support to enable Spotter on your cluster. > - Instructions help improve the accuracy and relevance of AI-generated responses for the specified data-model. + * @param setNLInstructionsRequest + */ + setNLInstructions(setNLInstructionsRequest, _options) { + const result = this.api.setNLInstructions(setNLInstructionsRequest, _options); + return result.toPromise(); + } + /** + * Version: 10.4.0.cl or later Processes a natural language query against a specified data model and returns a single AI-generated answer without requiring a conversation session. Requires `CAN_USE_SPOTTER` privilege and at least view access to the metadata object specified in the request. #### Usage guidelines The request must include: - `query`: a natural language question (e.g., \"What were total sales last quarter?\") - `metadata_identifier`: the unique ID of the data source to query against If the request is successful, the API returns a response message containing: - `session_identifier`: the unique ID of the generated response - `generation_number`: the generation number of the response - `message_type`: the type of the response (e.g., `TSAnswer`) - `visualization_type`: the generated visualization type (`Chart`, `Table`, or `Undefined`) - `tokens` / `display_tokens`: the search tokens and user-friendly display tokens for the response #### Error responses | Code | Description | |------|-----------------------------------------------------------------------------------------------------------------------------------------| | 401 | Unauthorized — authentication token is missing, expired, or invalid. | | 403 | Forbidden — the authenticated user does not have `CAN_USE_SPOTTER` privilege or lacks view permission on the specified metadata object. | > ###### Note: > * This endpoint is currently in Beta. Breaking changes may be introduced before the endpoint is made Generally Available. > * This endpoint requires Spotter - please contact ThoughtSpot support to enable Spotter on your cluster. + * @param singleAnswerRequest + */ + singleAnswer(singleAnswerRequest, _options) { + const result = this.api.singleAnswer(singleAnswerRequest, _options); + return result.toPromise(); + } + /** + * Stops an in-progress agent conversation response. Version: 26.6.0.cl or later Version: 26.6.0.cl or later Stops an in-progress agent response for the specified conversation. Use this endpoint to cancel a response that is actively being generated — for example, when the user navigates away, reformulates their question, or no longer needs the current result. Requires `CAN_USE_SPOTTER` privilege and access to the specified conversation. #### Usage guidelines The request must include: - `conversation_identifier` *(path parameter)*: the unique ID of the conversation whose active response should be stopped, as returned by `createAgentConversation` A successful request returns an empty `204 No Content` response. If there is no active response in progress at the time of the call, the request is still treated as successful. After stopping a response, the conversation session remains active. You can continue sending messages using `sendAgentConversationMessage` or `sendAgentConversationMessageStreaming`. #### Example request ```bash POST /api/rest/2.0/ai/agent/conversation/{conversation_identifier}/stop-response ``` #### Typical usage scenario This endpoint is useful when integrating Spotter into a chat UI where users can cancel a long-running query. For example: 1. User sends a message via `sendAgentConversationMessageStreaming`. 2. User clicks a \"Stop generating\" button while the response is streaming. 3. Your client calls `stopConversation` with the active `conversation_identifier`. 4. The stream is terminated and the user can ask a new question. #### Error responses | Code | Description | |------|-------------| | 401 | Unauthorized — authentication token is missing, expired, or invalid. | | 403 | Forbidden — the authenticated user does not have `CAN_USE_SPOTTER` privilege or lacks access to the specified conversation. | > ###### Note: > > - Calling this endpoint when no response is in progress does not return an error. > - The conversation context is preserved after stopping — previous messages and answers remain accessible. > - Available from version 26.6.0.cl and later. > - This endpoint requires Spotter — please contact ThoughtSpot Support to enable Spotter on your cluster. > - This feature is available only for **Spotter 3** (`SPOTTER3`) version. + * @param conversationIdentifier Unique identifier of the conversation to stop. + */ + stopConversation(conversationIdentifier, _options) { + const result = this.api.stopConversation(conversationIdentifier, _options); + return result.toPromise(); + } +}; +var PromiseAuthenticationApi = class { + constructor(configuration, requestFactory, responseProcessor) { + this.api = new ObservableAuthenticationApi(configuration, requestFactory, responseProcessor); + } + /** + * Version: 26.6.0.cl or later Enables or disables authentication at cluster or org level for the specified auth type. Currently supports `TRUSTED_AUTH`. #### Required privileges Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) or `CONTROL_TRUSTED_AUTH` (**Can Enable or Disable Trusted Authentication**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled, the `CONTROL_TRUSTED_AUTH` privilege is required. #### Usage guidelines Use `cluster_preferences` to enable or disable authentication at the cluster level. Cluster-level settings can only be configured from the Primary Org. - `ENABLED` — Generates a new access token if one does not exist. An existing token is preserved. - `DISABLED` — Revokes the existing cluster-level access token. Use `org_preferences` to enable or disable authentication for one or more Orgs. Each entry must include an `org_identifier` (unique ID or name) and an `auth_status`. Org-level configuration requires the per-Org authentication feature to be enabled on your instance. - `ENABLED` — Generates a new org-level access token if one does not exist. - `DISABLED` — Revokes the existing org-level access token for that Org. Both `cluster_preferences` and `org_preferences` are optional. Omitting a field leaves the corresponding settings unchanged. If both are omitted, the API returns `204 No Content` without making any changes. **Note**: Cluster-level and org-level settings are independent of each other. Enabling or disabling one does not affect the other. + * @param configureAuthSettingsRequest + */ + configureAuthSettings(configureAuthSettingsRequest, _options) { + const result = this.api.configureAuthSettings(configureAuthSettingsRequest, _options); + return result.toPromise(); + } + /** + * Version: 9.0.0.cl or later Retrieves details of the current user session for the token provided in the request header. Any ThoughtSpot user can access this endpoint and send an API request. The data returned in the API response varies according to user\'s privilege and object access permissions. **NOTE**: In ThoughtSpot, users with cluster administration privileges can access all Orgs by default. However, unless the administrator is explicitly added to an Org, the Orgs list in the session information returned by the API will include only the Primary Org. To include other Orgs in the API response, you must explicitly add the administrator to each Org in the Admin settings page in the UI or via user REST API. + */ + getCurrentUserInfo(_options) { + const result = this.api.getCurrentUserInfo(_options); + return result.toPromise(); + } + /** + * Version: 9.4.0.cl or later Retrieves details of the current session token for the bearer token provided in the request header. This API endpoint does not create a new token. Instead, it returns details about the token, including the token string, creation time, expiration time, and the associated user. Use this endpoint to introspect your current session token, debug authentication issues, or when a frontend application needs session token details. Any ThoughtSpot user with a valid bearer token can access this endpoint and send an API request + */ + getCurrentUserToken(_options) { + const result = this.api.getCurrentUserToken(_options); + return result.toPromise(); + } + /** + * Version: 10.4.0.cl or later Creates an authentication token that provides values for the formula variables in the Row Level Security (RLS) rules for a given user. Recommended for use cases that require Attribute-based access control (ABAC) via RLS. #### Required privileges To add a new user and assign privileges during auto-creation, the `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege is required. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled, the `CONTROL_TRUSTED_AUTH` (**Can Enable or Disable Trusted Authentication**) privilege and edit access to the data source are required. To configure formula variables for all Orgs on your instance or the Primary Org, cluster administration privileges are required. Org administrators can configure formula variables for their respective Orgs. If Role-Based Access Control (RBAC) is enabled, users with the `CAN_MANAGE_VARIABLES` (**Can manage variables**) role privilege can also create and manage variables for their Org context. #### Usage guidelines You can generate a token by providing a `username` and `password`, or by using a `secret_key`. To generate a `secret_key`, the administrator must enable [Trusted authentication](https://developers.thoughtspot.com/docs/trusted-auth-secret-key) in the **Develop** > **Customizations** > **Security Settings** page. **Note**: * When both `password` and `secret_key` are included in the API request, `password` takes precedence. * If [Multi-Factor Authentication (MFA)](https://docs.thoughtspot.com/cloud/latest/authentication-local-mfa) is enabled on your instance, the API login request with `username` and `password` returns an error. You can switch to token-based authentication with `secret_key` or contact ThoughtSpot Support for assistance. The token obtained from ThoughtSpot is valid for 5 minutes by default. You can configure the token expiration time as required. #### ABAC via RLS To implement ABAC via RLS and assign security entitlements to users during session creation, generate a token with custom variable values. The values set in the authentication token are applied to the formula variables referenced in RLS rules at the table level, which determines the data each user can access based on their entitlements. The variable values can be configured to persist for a specific set of Models in user sessions initiated with the token, allowing different RLS rules to be set for different data models. Once defined, the rules are added to the user\'s `variable_values` object, after which all sessions will use the persisted values. For more information, see [ABAC via tokens Documentation](https://developers.thoughtspot.com/docs/abac-via-rls-variables). ##### Formula variables Before defining variable values, ensure the variables are created and available on your instance. To create a formula variable, you can use the **Create variable** (`/api/rest/2.0/template/variables/create`) REST API endpoint, with the variable `type` set as `Formula_Variable` in the API request. The API doesn\'t support `\"persist_option\": \"RESET\"` and `\"persist_option\": \"NONE\"` when `variable_values` are defined in the request. If you are using `variable_values` for token generation, you must use other supported persist options such as `APPEND` or `REPLACE`. If you want to use `RESET` or `NONE`, do not pass any `variable_values`. In such cases, `variable_values` will remain unaffected. #### Supported objects The supported object type is `LOGICAL_TABLE`. When using `object_id` with `variable_values`, models are supported. #### Just-in-time provisioning For [just-in-time user creation and provisioning](https://developers.thoughtspot.com/docs/just-in-time-provisioning), specify the following attributes in the API request: * `auto_create` * `username` * `display_name` * `email` * `groups` Set `auto_create` to `true` if the username does not exist in ThoughtSpot. If the username already exists in ThoughtSpot and `auto_create` is set to `true`, user properties such as display name, email, Org and group entitlements will not be updated with new values. Setting `auto_create` to `true` does not create formula variables. Hence, this setting will not be applicable to `variable_values`. #### Important point to note All options in the token creation APIs that define user access to data in ThoughtSpot will take effect during token creation, not when the token is used for authentication. For example, `auto_create:true` will create the user when the authentication token is created. Persist options such as `APPEND` and `REPLACE` will persist `variable_values` on the user profile when the token is created. + * @param getCustomAccessTokenRequest + */ + getCustomAccessToken(getCustomAccessTokenRequest, _options) { + const result = this.api.getCustomAccessToken(getCustomAccessTokenRequest, _options); + return result.toPromise(); + } + /** + * Version: 9.0.0.cl or later Generates an authentication token for creating a full session in ThoughtSpot for a given user. Recommended for use cases that do not require Attribute-based access control (ABAC) via Row Level Security (RLS). #### Usage guidelines You can generate a token for a user by providing a `username` and `password`, or by using the `secret_key` generated for your instance. To generate a `secret_key`, the administrator must enable [Trusted authentication](https://developers.thoughtspot.com/docs/trusted-auth-secret-key) in the **Develop** > **Customizations** > **Security Settings** page. **Note**: * When both `password` and `secret_key` are included in the API request, `password` takes precedence. * If [Multi-Factor Authentication (MFA)](https://docs.thoughtspot.com/cloud/latest/authentication-local-mfa) is enabled on your instance, the API login request with `username` and `password` returns an error. You can switch to token-based authentication with `secret_key` or contact ThoughtSpot Support for assistance. The token obtained from ThoughtSpot is valid for 5 minutes by default. You can configure the token expiration time as required. #### Just-in-time provisioning For [just-in-time user creation and provisioning](https://developers.thoughtspot.com/docs/just-in-time-provisioning), specify the following attributes in the API request: * `auto_create` * `username` * `display_name` * `email` * `group_identifiers` Set `auto_create` to `true` if the username does not exist in ThoughtSpot. If the user already exists in ThoughtSpot and `auto_create` is set to `true`, user properties such as display name, email and group assignment will be updated. To add a new user and assign privileges during auto-creation, the `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege is required. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled, the `CONTROL_TRUSTED_AUTH` (**Can Enable or Disable Trusted Authentication**) privilege is required. #### Important point to note All options in the token creation APIs that define user access to data in ThoughtSpot will take effect during token creation, not when the token is used for authentication. For example, `auto_create:true` will create the user when the authentication token is created. + * @param getFullAccessTokenRequest + */ + getFullAccessToken(getFullAccessTokenRequest, _options) { + const result = this.api.getFullAccessToken(getFullAccessTokenRequest, _options); + return result.toPromise(); + } + /** + * Version: 9.0.0.cl or later Generates an authentication token that provides access to a specific metadata object. This object list is intersected with the list of objects the user is allowed to access via group membership. For more information, see [Object security](https://docs.thoughtspot.com/cloud/latest/security-data-object#object_security). #### Usage guidelines You can generate a token for a user by providing a `username` and `password`, or by using the `secret_key` generated for your instance. To generate a `secret_key`, the administrator must enable [Trusted authentication](https://developers.thoughtspot.com/docs/trusted-auth-secret-key) in the **Develop** > **Customizations** > **Security Settings** page. **Note**: * When both `password` and `secret_key` are included in the API request, `password` takes precedence. * If [Multi-Factor Authentication (MFA)](https://docs.thoughtspot.com/cloud/latest/authentication-local-mfa) is enabled on your instance, the API login request with `username` and `password` returns an error. You can switch to token-based authentication with `secret_key` or contact ThoughtSpot Support for assistance. The token obtained from ThoughtSpot is valid for 5 minutes by default. You can configure the token expiration time as required. #### Just-in-time provisioning For [just-in-time user creation and provisioning](https://developers.thoughtspot.com/docs/just-in-time-provisioning), specify the following attributes in the API request: * `auto_create` * `username` * `display_name` * `email` * `group_identifiers` Set `auto_create` to `true` if the user is not available in ThoughtSpot. If the user already exists in ThoughtSpot and the `auto_create` parameter is set to `true`, user properties such as display name, email, and group assignment will be updated. To add a new user and assign privileges, the `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege is required. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled, the `CONTROL_TRUSTED_AUTH`(**Can Enable or Disable Trusted Authentication**) privilege is required. #### Important point to note All options in the token creation APIs that define user access to data in ThoughtSpot will take effect during token creation, not when the token is used for authentication. For example, `auto_create:true` will create the user when the authentication token is created. + * @param getObjectAccessTokenRequest + */ + getObjectAccessToken(getObjectAccessTokenRequest, _options) { + const result = this.api.getObjectAccessToken(getObjectAccessTokenRequest, _options); + return result.toPromise(); + } + /** + * Version: 9.0.0.cl or later Creates a login session for a ThoughtSpot user with Basic authentication. In Basic authentication method, REST clients log in to ThoughtSpot using `username` and `password` attributes. On a multi-tenant cluster with Orgs, users can pass the ID of the Org in the API request to log in to a specific Org context. **Note**: If Multi-Factor Authentication (MFA) is enabled on your instance, the API login request with basic authentication (`username` and `password` ) returns an error. Contact ThoughtSpot Support for assistance. A successful login returns a session cookie that can be used in your subsequent API requests. + * @param loginRequest + */ + login(loginRequest, _options) { + const result = this.api.login(loginRequest, _options); + return result.toPromise(); + } + /** + * Version: 9.0.0.cl or later Logs out a user from their current session. + */ + logout(_options) { + const result = this.api.logout(_options); + return result.toPromise(); + } + /** + * Version: 9.0.0.cl or later Revokes the authentication token issued for current user session. The token of your current session expires when you make a call to the `/api/rest/2.0/auth/token/revoke` endpoint. the users will not be able to access ThoughtSpot objects until a new token is obtained. To restart your session, request for a new token from ThoughtSpot. See [Get Full Access Token](#/http/api-endpoints/authentication/get-full-access-token). + * @param revokeTokenRequest + */ + revokeToken(revokeTokenRequest, _options) { + const result = this.api.revokeToken(revokeTokenRequest, _options); + return result.toPromise(); + } + /** + * Version: 26.6.0.cl or later Returns the authentication configuration for the specified auth type at cluster and org level. Currently supports `TRUSTED_AUTH`. #### Required privileges Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) or `CONTROL_TRUSTED_AUTH` (**Can Enable or Disable Trusted Authentication**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled, the `CONTROL_TRUSTED_AUTH` privilege is required. #### Usage guidelines Use `scope` to control which level of settings are returned: - `CLUSTER` — Returns cluster-level authentication status and access tokens. Accessible only from the Primary Org. - `ORG` — Returns org-level authentication status and access tokens for the current Org. Requires the per-Org authentication feature to be enabled on your instance. - If `scope` is omitted, both cluster and org-level settings are returned based on the caller\'s org context and feature availability. The `access_tokens` array in `cluster_preferences` or `org_preferences` is omitted when no token is configured at that level. **Note**: Access tokens returned in the response are sensitive credentials. Treat them with the same care as passwords. + * @param searchAuthSettingsRequest + */ + searchAuthSettings(searchAuthSettingsRequest, _options) { + const result = this.api.searchAuthSettings(searchAuthSettingsRequest, _options); + return result.toPromise(); + } + /** + * Version: 9.12.0.cl or later Validates the authentication token specified in the API request. If your token is not valid, [Get a new token](#/http/api-endpoints/authentication/get-full-access-token). + * @param validateTokenRequest + */ + validateToken(validateTokenRequest, _options) { + const result = this.api.validateToken(validateTokenRequest, _options); + return result.toPromise(); + } +}; +var PromiseCollectionsApi = class { + constructor(configuration, requestFactory, responseProcessor) { + this.api = new ObservableCollectionsApi(configuration, requestFactory, responseProcessor); + } + /** + * Version: 26.4.0.cl or later Creates a new collection in ThoughtSpot. Collections allow you to organize and group related metadata objects such as Liveboards, Answers, worksheets, and other data objects. You can also create nested collections (sub-collections) to build a hierarchical structure. #### Supported operations The API endpoint lets you perform the following operations: * Create a new collection * Add metadata objects (Liveboards, Answers, Logical Tables) to the collection * Create nested collections by adding sub-collections + * @param createCollectionRequest + */ + createCollection(createCollectionRequest, _options) { + const result = this.api.createCollection(createCollectionRequest, _options); + return result.toPromise(); + } + /** + * Version: 26.4.0.cl or later Deletes one or more collections from ThoughtSpot. #### Delete options * **delete_children**: When set to `true`, deletes the child objects (metadata items) within the collection that the user has access to. Objects that the user does not have permission to delete will be skipped. * **dry_run**: When set to `true`, performs a preview of the deletion operation without actually deleting anything. The response shows what would be deleted, allowing you to review before committing the deletion. #### Response The response includes: * **metadata_deleted**: List of metadata objects that were successfully deleted * **metadata_skipped**: List of metadata objects that were skipped due to lack of permissions or other constraints + * @param deleteCollectionRequest + */ + deleteCollection(deleteCollectionRequest, _options) { + const result = this.api.deleteCollection(deleteCollectionRequest, _options); + return result.toPromise(); + } + /** + * Version: 26.4.0.cl or later Gets a list of collections available in ThoughtSpot. To get details of a specific collection, specify the collection GUID or name. You can also filter the API response based on the collection name pattern, author, and other criteria. #### Search options * **name_pattern**: Use \'%\' as a wildcard character to match collection names * **collection_identifiers**: Search for specific collections by their GUIDs or names * **include_metadata**: When set to `true`, includes the metadata objects within each collection in the response **NOTE**: If the API returns an empty list, consider increasing the value of the `record_size` parameter. To search across all available collections, set `record_size` to `-1`. + * @param searchCollectionsRequest + */ + searchCollections(searchCollectionsRequest, _options) { + const result = this.api.searchCollections(searchCollectionsRequest, _options); + return result.toPromise(); + } + /** + * Version: 26.4.0.cl or later Updates an existing collection in ThoughtSpot. #### Supported operations This API endpoint lets you perform the following operations: * Update collection name and description * Change visibility settings * Add metadata objects to the collection (operation: ADD) * Remove metadata objects from the collection (operation: REMOVE) * Replace all metadata objects in the collection (operation: REPLACE) #### Operation types * **ADD**: Adds the specified metadata objects to the existing collection without removing current items * **REMOVE**: Removes only the specified metadata objects from the collection * **REPLACE**: Replaces all existing metadata objects with the specified items (default behavior) + * @param collectionIdentifier Unique GUID of the collection. Note: Collection names cannot be used as identifiers since duplicate names are allowed. + * @param updateCollectionRequest + */ + updateCollection(collectionIdentifier, updateCollectionRequest, _options) { + const result = this.api.updateCollection(collectionIdentifier, updateCollectionRequest, _options); + return result.toPromise(); + } +}; +var PromiseConnectionConfigurationsApi = class { + constructor(configuration, requestFactory, responseProcessor) { + this.api = new ObservableConnectionConfigurationsApi(configuration, requestFactory, responseProcessor); + } + /** + * Version: 10.12.0.cl or later Gets connection configuration objects. Requires `DATAMANAGEMENT` (**Can manage data**) and edit permissions to the connection object, or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) privilege is required. #### Usage guidelines * To get a list of all configurations available in the ThoughtSpot system, send the API request with only the connection name or GUID in the request body. * To fetch details of a configuration object, specify the configuration object name or GUID. + * @param connectionConfigurationSearchRequest + */ + connectionConfigurationSearch(connectionConfigurationSearchRequest, _options) { + const result = this.api.connectionConfigurationSearch(connectionConfigurationSearchRequest, _options); + return result.toPromise(); + } + /** + * Version: 10.12.0.cl or later Creates an additional configuration to an existing connection to a data warehouse. Requires `DATAMANAGEMENT` (**Can manage data**) or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) privilege is required. #### Usage guidelines * A JSON map of configuration attributes in `configuration`. The following example shows the configuration attributes: ``` { \"user\":\"DEV_USER\", \"password\":\"TestConn123\", \"role\":\"DEV\", \"warehouse\":\"DEV_WH\" } ``` * If the `policy_type` is `PRINCIPALS`, then `policy_principals` is a required field. * If the `policy_type` is `PROCESSES`, then `policy_processes` is a required field. * If the `policy_type` is `NO_POLICY`, then `policy_principals` and `policy_processes` are not required fields. #### Parameterized Connection Support For parameterized connections that use OAuth authentication, only the same_as_parent and policy_process_options attributes are allowed in the API request. These attributes are not applicable to connections that are not parameterized. + * @param createConnectionConfigurationRequest + */ + createConnectionConfiguration(createConnectionConfigurationRequest, _options) { + const result = this.api.createConnectionConfiguration(createConnectionConfigurationRequest, _options); + return result.toPromise(); + } + /** + * Version: 10.12.0.cl or later Deletes connection configuration objects. Requires `DATAMANAGEMENT` (**Can manage data**) and edit permissions to the connection object, or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) privilege is required. + * @param deleteConnectionConfigurationRequest + */ + deleteConnectionConfiguration(deleteConnectionConfigurationRequest, _options) { + const result = this.api.deleteConnectionConfiguration(deleteConnectionConfigurationRequest, _options); + return result.toPromise(); + } + /** + * Version: 10.12.0.cl or later Updates a connection configuration object. Requires `DATAMANAGEMENT` (**Can manage data**) and edit permissions to the connection object, or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) privilege is required. #### Supported operations This API endpoint lets you perform the following operations in a single API request: * Edit the name or description of the configuration * Edit the configuration properties * Edit the `policy_type` * Edit the type of authentication * Enable or disable a configuration #### Parameterized Connection Support For parameterized oauth based connections, only the `same_as_parent` and `policy_process_options` attributes are allowed. These attributes are not applicable to connections that are not parameterized. **NOTE**: When updating a configuration where `disabled` is `true`, you must reset `disabled` to `true` in your update request payload. If not explicitly set again, the API will default `disabled` to `false`. + * @param configurationIdentifier Unique ID or name of the configuration. + * @param updateConnectionConfigurationRequest + */ + updateConnectionConfiguration(configurationIdentifier, updateConnectionConfigurationRequest, _options) { + const result = this.api.updateConnectionConfiguration(configurationIdentifier, updateConnectionConfigurationRequest, _options); + return result.toPromise(); + } +}; +var PromiseConnectionsApi = class { + constructor(configuration, requestFactory, responseProcessor) { + this.api = new ObservableConnectionsApi(configuration, requestFactory, responseProcessor); + } + /** + * Version: 9.2.0.cl or later Creates a connection to a data warehouse for live query services. Requires `DATAMANAGEMENT` (**Can manage data**) or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) privilege is required. #### Create a connection without tables To create a connection without tables: 1. Pass these parameters in your API request. * Name of the connection. * Type of the data warehouse to connect to. * A JSON map of configuration attributes in `data_warehouse_config`. The following example shows the configuration attributes for a SnowFlake connection: ``` { \"configuration\":{ \"accountName\":\"thoughtspot_partner\", \"user\":\"tsadmin\", \"password\":\"TestConn123\", \"role\":\"sysadmin\", \"warehouse\":\"MEDIUM_WH\" }, \"authenticationType\": \"SERVICE_ACCOUNT\", \"externalDatabases\":[ ] } ``` 2. Set `validate` to `false`. **NOTE:** If the `authentication_type` is anything other than SERVICE_ACCOUNT, you must explicitly provide the authenticationType property in the payload. If you do not specify authenticationType, the API will default to SERVICE_ACCOUNT as the authentication type. #### Create a connection with tables If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) and `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` (**Can manage data models**) privilege is required. To create a connection with tables: 1. Pass these parameters in your API request. * Name of the connection. * Type of the data warehouse to connect to. * A JSON map of configuration attributes, database details, and table properties in `data_warehouse_config` as shown in the following example: ``` { \"configuration\":{ \"accountName\":\"thoughtspot_partner\", \"user\":\"tsadmin\", \"password\":\"TestConn123\", \"role\":\"sysadmin\", \"warehouse\":\"MEDIUM_WH\" }, \"authenticationType\": \"SERVICE_ACCOUNT\", \"externalDatabases\":[ { \"name\":\"AllDatatypes\", \"isAutoCreated\":false, \"schemas\":[ { \"name\":\"alldatatypes\", \"tables\":[ { \"name\":\"allDatatypes\", \"type\":\"TABLE\", \"description\":\"\", \"selected\":true, \"linked\":true, \"columns\":[ { \"name\":\"CNUMBER\", \"type\":\"INT64\", \"canImport\":true, \"selected\":true, \"isLinkedActive\":true, \"isImported\":false, \"tableName\":\"allDatatypes\", \"schemaName\":\"alldatatypes\", \"dbName\":\"AllDatatypes\" }, { \"name\":\"CDECIMAL\", \"type\":\"INT64\", \"canImport\":true, \"selected\":true, \"isLinkedActive\":true, \"isImported\":false, \"tableName\":\"allDatatypes\", \"schemaName\":\"alldatatypes\", \"dbName\":\"AllDatatypes\" } ] } ] } ] } ] } ``` 2. Set `validate` to `true`. **NOTE:** If the `authentication_type` is anything other than SERVICE_ACCOUNT, you must explicitly provide the authenticationType property in the payload. If you do not specify authenticationType, the API will default to SERVICE_ACCOUNT as the authentication type. + * @param createConnectionRequest + */ + createConnection(createConnectionRequest, _options) { + const result = this.api.createConnection(createConnectionRequest, _options); + return result.toPromise(); + } + /** + * Version: 9.2.0.cl or later **Important**: This endpoint is deprecated and will be removed from ThoughtSpot in September 2025. ThoughtSpot strongly recommends using the [Delete Connection V2](#/http/api-endpoints/connections/delete-connection-v2) endpoint to delete your connection objects. #### Usage guidelines Deletes a connection object. Requires `DATAMANAGEMENT` (**Can manage data**) and edit permissions to the connection object, or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) privilege is required. **Note**: If a connection has dependent objects, make sure you remove its associations before the delete operation. + * @param deleteConnectionRequest + */ + deleteConnection(deleteConnectionRequest, _options) { + const result = this.api.deleteConnection(deleteConnectionRequest, _options); + return result.toPromise(); + } + /** + * Version: 10.4.0.cl or later Deletes a connection object. **Note**: If a connection has dependent objects, make sure you remove its associations before the delete operation. Requires `DATAMANAGEMENT` (**Can manage data**) and edit permissions to the connection object, or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) privilege is required. + * @param connectionIdentifier Unique ID or name of the connection. + */ + deleteConnectionV2(connectionIdentifier, _options) { + const result = this.api.deleteConnectionV2(connectionIdentifier, _options); + return result.toPromise(); + } + /** + * Version: 9.9.0.cl or later Exports the difference in connection metadata between CDW and ThoughtSpot Requires `DATAMANAGEMENT` (**Can manage data**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the following Data control privileges may be required: - `CAN_MANAGE_CUSTOM_CALENDAR`(**Can manage custom calendars**) - `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) - `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` (**Can manage data models**) To download the connection metadata difference between ThoughtSpot and CDW, pass the connection GUID as `connection_identifier` in the API request. + * @param connectionIdentifier GUID of the connection + */ + downloadConnectionMetadataChanges(connectionIdentifier, _options) { + const result = this.api.downloadConnectionMetadataChanges(connectionIdentifier, _options); + return result.toPromise(); + } + /** + * Version: 9.9.0.cl or later Validates the difference in connection metadata between CDW and ThoughtSpot. Requires `DATAMANAGEMENT` (**Can manage data**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the following Data control privileges may be required: - `CAN_MANAGE_CUSTOM_CALENDAR`(**Can manage custom calendars**) - `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) - `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` (**Can manage data models**) Returns a boolean indicating whether there is any difference between the connection metadata at ThoughtSpot and CDW. To get the connection metadata difference status, pass the connection GUID as `connection_identifier` in the API request. + * @param connectionIdentifier GUID of the connection + */ + fetchConnectionDiffStatus(connectionIdentifier, _options) { + const result = this.api.fetchConnectionDiffStatus(connectionIdentifier, _options); + return result.toPromise(); + } + /** + * Version: 26.2.0.cl or later Revokes OAuth refresh tokens for users who no longer require access to a data warehouse connection. When a token is revoked, the affected user\'s session for that connection is terminated, and they must re-authenticate to regain access. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) or `DATAMANAGEMENT` (**Can manage data**) privileges. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on the ThoughtSpot instance, users with `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) privilege can also make API requests to revoke tokens for connection users. #### Usage guidelines You can specify different combinations of identifiers to control which refresh tokens are revoked. - **connection_identifier**: Revokes refresh tokens for all users of the connection, except the connection author. - **connection_identifier** and **user_identifiers**: Revokes refresh tokens only for the users specified in the request. If the name or ID of the connection author is included in the request, their token will also be revoked. - **connection_identifier** and **configuration_identifiers**: Revokes refresh tokens for all users on the specified configurations, except the configuration author. - **connection_identifier**, **configuration_identifiers**, and **user_identifiers**: Revokes refresh tokens for the specified users on the specified configurations. - **connection_identifier** and **org_identifiers**: Revokes refresh tokens for the specified Orgs. Applicable only for published connections. - **connection_identifier**, **org_identifiers**, and **user_identifiers**: Revokes refresh tokens for the specified users in the specified Orgs. Applicable only for published connections. **NOTE**: The `org_identifiers` parameter is only applicable for published connections. Using this parameter for unpublished connections will result in an error. Ensure that the connections are published before making the API request. + * @param connectionIdentifier Unique ID or name of the connection whose refresh tokens need to be revoked. All the users associated with the connection will have their refresh tokens revoked except the author. + * @param revokeRefreshTokensRequest + */ + revokeRefreshTokens(connectionIdentifier, revokeRefreshTokensRequest, _options) { + const result = this.api.revokeRefreshTokens(connectionIdentifier, revokeRefreshTokensRequest, _options); + return result.toPromise(); + } + /** + * Version: 9.2.0.cl or later Gets connection objects. Requires `DATAMANAGEMENT` (**Can manage data**) or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) privilege is required. - To get a list of all connections available in the ThoughtSpot system, send the API request without any attributes in the request body. - To get the connection objects for a specific type of data warehouse, specify the type in `data_warehouse_types`. - To fetch details of a connection object, specify the connection object GUID or name. The `name_pattern` attribute allows passing partial text with `%` for a wildcard match. - To get details of the database, schemas, tables, or columns from a data connection object, specify `data_warehouse_object_type`. - To get a specific database, schema, table, or column from a connection object, define the object type in `data_warehouse_object_type` and object properties in the `data_warehouse_objects` array. For example, to search for a column, you must pass the database, schema, and table names in the API request. Note that in the following example, object properties are set in a hierarchical order (`database` > `schema` > `table` > `column`). ``` { \"connections\": [ { \"identifier\": \"b9d1f2ef-fa65-4a4b-994e-30fa2d57b0c2\", \"data_warehouse_objects\": [ { \"database\": \"NEBULADEV\", \"schema\": \"INFORMATION_SCHEMA\", \"table\": \"APPLICABLE_ROLES\", \"column\": \"ROLE_NAME\" } ] } ], \"data_warehouse_object_type\": \"COLUMN\" } ``` - To fetch data by `configuration`, specify `data_warehouse_object_type`. For example, to fetch columns from the `DEVELOPMENT` database, specify the `data_warehouse_object_type` as `DATABASE` and define the `configuration` string as `{\"database\":\"DEVELOPMENT\"}`. To get column data for a specific table, specify the table, for example,`{\"database\":\"RETAILAPPAREL\",\"table\":\"PIPES\"}`. - To query connections by `authentication_type`, specify `data_warehouse_object_type`. Supported values for `authentication_type` are: - `SERVICE_ACCOUNT`: For connections that require service account credentials to authenticate to the Cloud Data Warehouse and fetch data. - `OAUTH`: For connections that require OAuth credentials to authenticate to the Cloud Data Warehouse and fetch data. Teradata, Oracle, and Presto Cloud Data Warehouses do not support the OAuth authentication type. - `IAM`: For connections that have the IAM OAuth set up. This authentication type is supported on Amazon Redshift connections only. - `EXTOAUTH`: For connections that have External OAuth set up. ThoughtSpot supports external [OAuth with Microsoft Azure Active Directory (AD)](https://docs.thoughtspot.com/cloud/latest/ connections-snowflake-azure-ad-oauth) and [Okta for Snowflake data connections](https://docs.thoughtspot.com/cloud/latest/connections-snowflake-okta-oauth). - `KEY_PAIR`: For connections that require Key Pair account credentials to authenticate to the Cloud Data Warehouse and fetch data. This authentication type is supported on Snowflake connections only. - `OAUTH_WITH_PKCE`: For connections that require OAuth with PKCE account credentials to authenticate to the Cloud Data Warehouse and fetch data. This authentication type is supported on Snowflake, Starburst, Databricks, Denodo connections only. - `EXTOAUTH_WITH_PKCE`: For connections that require External OAuth With PKCE account credentials to authenticate to the Cloud Data Warehouse and fetch data. This authentication type is supported on Snowflake connections only. - `OAUTH_WITH_PEZ`: For connections that require OAuth With PEZ account credentials to authenticate to the Cloud Data Warehouse and fetch data. This authentication type is supported on Amazon Redshift connections only. - `OAUTH_WITH_SERVICE_PRINCIPAL`: For connections that require OAuth With Service Principal account credentials to authenticate to the Cloud Data Warehouse and fetch data. This authentication type is supported on Databricks connections only. - `PERSONAL_ACCESS_TOKEN`: For connections that require Personal Access Token account credentials to authenticate to the Cloud Data Warehouse and fetch data. This authentication type is supported on Databricks connections only. - `OAUTH_CLIENT_CREDENTIALS`: For connections that require OAuth Client Credentials to authenticate to the Cloud Data Warehouse and fetch data. This authentication type is supported on Snowflake connections only. - To include more details about connection objects in the API response, set `include_details` to `true`. - You can also sort the output by field names and filter connections by tags. **NOTE**: When filtering connection records by parameters other than `data_warehouse_types` or `tag_identifiers`, ensure that you set `record_size` to `-1` and `record_offset` to `0` for precise results. + * @param searchConnectionRequest + */ + searchConnection(searchConnectionRequest, _options) { + const result = this.api.searchConnection(searchConnectionRequest, _options); + return result.toPromise(); + } + /** + * Version: 26.5.0.cl or later Synchronizes connection metadata attributes from your Cloud Data Warehouse (CDW) with ThoughtSpot. Requires the `DATAMANAGEMENT` (**Can manage data**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` (**Can manage data models**) privilege is required. #### Usage guidelines To synchronize attributes from a CDW, specify the connection GUID or name in the `connection_identifier` path parameter and `sync_attributes` in the request body. Default attribute is `[\"DESCRIPTION\"]`. ##### Hierarchical schema * Connection: The connection object for the sync operation. * Tables: Tables for the sync operation. When no table is specified, all tables are synchronized. * Columns: If the table is specified, you can add the columns for the sync operation. If no columns are specified, all columns in the specified table are considered for the sync operation. To set the scope for the sync operation: * Connection-level: To sync all tables and columns, pass an empty request body, or only the attributes in the request body. * Table-level: To synchronize specific tables and their columns, specify the table identifiers in the `tables` array. * Column-level: To synchronize specific columns, specify the table identifier as the key and column identifiers as the value in the `tables` array. ``` { \"tables\": [ {\"table-guid-1\": [\"column-guid-1\", \"column-guid-2\"]}, \"table-guid-2\" ], \"sync_attributes\": [\"DESCRIPTION\"] } ``` ##### API response If the sync operation is successful, the API returns the following information: * Status of the sync operation. For example, `SUCCESS`, `PARTIAL_SUCCESS`, or `NO_UPDATE`. * Number of tables and columns that were updated. * Number of tables and columns with the sync failed status when the overall sync status is `PARTIAL_SUCCESS`. * Message text indicating the sync results. + * @param connectionIdentifier Unique ID or name of the connection. + * @param syncMetadataRequest + */ + syncMetadata(connectionIdentifier, syncMetadataRequest, _options) { + const result = this.api.syncMetadata(connectionIdentifier, syncMetadataRequest, _options); + return result.toPromise(); + } + /** + * Version: 9.2.0.cl or later **Important**: This endpoint is deprecated and will be removed from ThoughtSpot in September 2025. ThoughtSpot strongly recommends using the [Update connection V2](#/http/api-endpoints/connections/update-connection-v2) endpoint to update your connection objects. #### Usage guidelines Updates a connection object. Requires `DATAMANAGEMENT` (**Can manage data**) and edit permissions to the connection object, or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) privilege is required. To update a connection object, pass these parameters in your API request: 1. GUID of the connection object. 2. If you are updating tables or database schema of a connection object: a. Add the updated JSON map of metadata with database, schema, and tables in `data_warehouse_config`. b. Set `validate` to `true`. 3. If you are updating a configuration attribute, connection name, or description, you can set `validate` to `false`. + * @param updateConnectionRequest + */ + updateConnection(updateConnectionRequest, _options) { + const result = this.api.updateConnection(updateConnectionRequest, _options); + return result.toPromise(); + } + /** + * Version: 26.6.0.cl or later Activates or deactivates a connection. A deactivated connection cannot be used for queries or operations until it is activated again. Requires `DATAMANAGEMENT` (**Can manage data**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) privilege is required. Only the connection owner or an administrator can perform this operation. #### Usage guidelines To update the status of a connection, specify the connection GUID or name in the `connection_identifier` path parameter and the desired `status` in the request body. - **ACTIVATED**: Enables the connection. Queries and operations can resume on an activated connection. - **DEACTIVATED**: Disables the connection. It does not remove the connection metadata, but only makes the connection unavailable for queries and operations. You can reactivate a deactivated connection by setting \"status\": \"ACTIVATED\". + * @param connectionIdentifier Unique ID or name of the connection. + * @param updateConnectionStatusRequest + */ + updateConnectionStatus(connectionIdentifier, updateConnectionStatusRequest, _options) { + const result = this.api.updateConnectionStatus(connectionIdentifier, updateConnectionStatusRequest, _options); + return result.toPromise(); + } + /** + * Version: 10.4.0.cl or later Updates a connection object. Requires `DATAMANAGEMENT` (**Can manage data**) and edit permissions to the connection object, or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) privilege is required. To update a connection object, pass these parameters in your API request: 1. GUID of the connection object. 2. If you are updating tables or database schema of a connection object: a. Add the updated JSON map of metadata with database, schema, and tables in `data_warehouse_config`. b. Set `validate` to `true`. **NOTE:** If the `authentication_type` is anything other than SERVICE_ACCOUNT, you must explicitly provide the authenticationType property in the payload. If you do not specify authenticationType, the API will default to SERVICE_ACCOUNT as the authentication type. * A JSON map of configuration attributes, database details, and table properties in `data_warehouse_config` as shown in the following example: * This is an example of updating a single table in a empty connection: ``` { \"authenticationType\": \"SERVICE_ACCOUNT\", \"externalDatabases\": [ { \"name\": \"DEVELOPMENT\", \"isAutoCreated\": false, \"schemas\": [ { \"name\": \"TS_dataset\", \"tables\": [ { \"name\": \"DEMORENAME\", \"type\": \"TABLE\", \"description\": \"\", \"selected\": true, \"linked\": true, \"gid\": 0, \"datasetId\": \"-1\", \"subType\": \"\", \"reportId\": \"\", \"viewId\": \"\", \"columns\": [ { \"name\": \"Col1\", \"type\": \"VARCHAR\", \"canImport\": true, \"selected\": true, \"description\": \"\", \"isLinkedActive\": true, \"isAggregate\": false }, { \"name\": \"Col2\", \"type\": \"VARCHAR\", \"canImport\": true, \"selected\": true, \"description\": \"\", \"isLinkedActive\": true, \"isAggregate\": false }, { \"name\": \"Col3\", \"type\": \"VARCHAR\", \"canImport\": true, \"selected\": true, \"description\": \"\", \"isLinkedActive\": true, \"isAggregate\": false }, { \"name\": \"Col312\", \"type\": \"VARCHAR\", \"canImport\": true, \"selected\": true, \"description\": \"\", \"isLinkedActive\": true, \"isAggregate\": false }, { \"name\": \"Col4\", \"type\": \"VARCHAR\", \"canImport\": true, \"selected\": true, \"description\": \"\", \"isLinkedActive\": true, \"isAggregate\": false } ], \"relationships\": [] } ] } ] } ], \"configuration\": { \"password\": \"\", \"database\": \"DEVELOPMENT\", \"role\": \"DEV\", \"accountName\": \"thoughtspot_partner\", \"warehouse\": \"DEMO_WH\", \"user\": \"DEV_USER\" } } ``` * This is an example of updating a single table in an existing connection with tables: ``` { \"authenticationType\": \"SERVICE_ACCOUNT\", \"externalDatabases\": [ { \"name\": \"DEVELOPMENT\", \"isAutoCreated\": false, \"schemas\": [ { \"name\": \"TS_dataset\", \"tables\": [ { \"name\": \"CUSTOMER\", \"type\": \"TABLE\", \"description\": \"\", \"selected\": true, \"linked\": true, \"gid\": 0, \"datasetId\": \"-1\", \"subType\": \"\", \"reportId\": \"\", \"viewId\": \"\", \"columns\": [], \"relationships\": [] }, { \"name\": \"tpch5k_falcon_default_schema_users\", \"type\": \"TABLE\", \"description\": \"\", \"selected\": true, \"linked\": true, \"gid\": 0, \"datasetId\": \"-1\", \"subType\": \"\", \"reportId\": \"\", \"viewId\": \"\", \"columns\": [ { \"name\": \"user_id\", \"type\": \"INT64\", \"canImport\": true, \"selected\": true, \"description\": \"\", \"isLinkedActive\": true, \"isAggregate\": false }, { \"name\": \"product_id\", \"type\": \"INT64\", \"canImport\": true, \"selected\": true, \"description\": \"\", \"isLinkedActive\": true, \"isAggregate\": false }, { \"name\": \"user_cost\", \"type\": \"INT64\", \"canImport\": true, \"selected\": true, \"description\": \"\", \"isLinkedActive\": true, \"isAggregate\": false } ], \"relationships\": [] } ] } ] } ], \"configuration\": { \"password\": \"\", \"database\": \"DEVELOPMENT\", \"role\": \"DEV\", \"accountName\": \"thoughtspot_partner\", \"warehouse\": \"DEMO_WH\", \"user\": \"DEV_USER\" } } ``` 3. If you are updating a configuration attribute, connection name, or description, you can set `validate` to `false`. **NOTE:** If the `authentication_type` is anything other than SERVICE_ACCOUNT, you must explicitly provide the authenticationType property in the payload. If you do not specify authenticationType, the API will default to SERVICE_ACCOUNT as the authentication type. * A JSON map of configuration attributes in `data_warehouse_config`. The following example shows the configuration attributes for a Snowflake connection: ``` { \"configuration\":{ \"accountName\":\"thoughtspot_partner\", \"user\":\"tsadmin\", \"password\":\"TestConn123\", \"role\":\"sysadmin\", \"warehouse\":\"MEDIUM_WH\" }, \"externalDatabases\":[ ] } ``` + * @param connectionIdentifier Unique ID or name of the connection. + * @param updateConnectionV2Request + */ + updateConnectionV2(connectionIdentifier, updateConnectionV2Request, _options) { + const result = this.api.updateConnectionV2(connectionIdentifier, updateConnectionV2Request, _options); + return result.toPromise(); + } +}; +var PromiseCustomActionApi = class { + constructor(configuration, requestFactory, responseProcessor) { + this.api = new ObservableCustomActionApi(configuration, requestFactory, responseProcessor); + } + /** + * Version: 9.6.0.cl or later Creates a custom action that appears as a menu action on a saved Answer or Liveboard visualization. Requires `DEVELOPER` (**Has Developer privilege**) or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `DEVELOPER` (**Has developer privilege**) privilege is required. #### Usage Guidelines The API lets you create the following types of custom actions: * URL-based action Allows pushing data to an external URL. * Callback action Triggers a callback to the host application and initiates a response payload on an embedded ThoughtSpot instance. By default, custom actions are visible to only administrator or developer users. To make a custom action available to other users, and specify the groups in `group_identifiers`. By default, the custom action is set as a _global_ action on all visualizations and saved Answers. To assign a custom action to specific Liveboard visualization, saved Answer, or Worksheet, set `visibility` to `false` in `default_action_config` property and specify the GUID or name of the object in `associate_metadata`. For more information, see [Custom actions](https://developers.thoughtspot.com/docs/custom-action-intro). + * @param createCustomActionRequest + */ + createCustomAction(createCustomActionRequest, _options) { + const result = this.api.createCustomAction(createCustomActionRequest, _options); + return result.toPromise(); + } + /** + * Version: 9.6.0.cl or later Removes the custom action specified in the API request. Requires `DEVELOPER` (**Has Developer privilege**) or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `DEVELOPER` (**Has developer privilege**) privilege is required. + * @param customActionIdentifier Unique ID or name of the custom action. + */ + deleteCustomAction(customActionIdentifier, _options) { + const result = this.api.deleteCustomAction(customActionIdentifier, _options); + return result.toPromise(); + } + /** + * Version: 9.6.0.cl or later Gets custom actions configured on the cluster. Requires `DEVELOPER` (**Has Developer privilege**) or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `DEVELOPER` (**Has developer privilege**) privilege is required. + * @param searchCustomActionsRequest + */ + searchCustomActions(searchCustomActionsRequest, _options) { + const result = this.api.searchCustomActions(searchCustomActionsRequest, _options); + return result.toPromise(); + } + /** + * Version: 9.6.0.cl or later Updates a custom action. Requires `DEVELOPER` (**Has Developer privilege**) or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `DEVELOPER` (**Has developer privilege**) privilege is required. #### Usage Guidelines The API allows you to modify the following properties: * Name of the custom action * Action availability to groups * Association to metadata objects * Authentication settings for a URL-based action For more information, see [Custom actions](https://developers.thoughtspot.com/docs/custom-action-intro). + * @param customActionIdentifier Unique ID or name of the custom action. + * @param updateCustomActionRequest + */ + updateCustomAction(customActionIdentifier, updateCustomActionRequest, _options) { + const result = this.api.updateCustomAction(customActionIdentifier, updateCustomActionRequest, _options); + return result.toPromise(); + } +}; +var PromiseCustomCalendarsApi = class { + constructor(configuration, requestFactory, responseProcessor) { + this.api = new ObservableCustomCalendarsApi(configuration, requestFactory, responseProcessor); + } + /** + * Version: 10.12.0.cl or later Creates a new [custom calendar](https://docs.thoughtspot.com/cloud/latest/connections-cust-cal). Requires `DATAMANAGEMENT` (**Can manage data**) or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your ThoughtSpot instance, the `CAN_MANAGE_CUSTOM_CALENDAR` (**Can manage custom calendars**) privilege is required. #### Usage guidelines You can create a custom calendar from scratch or an existing Table in ThoughtSpot. For both methods of calendar creation, the following parameters are required: * Name of the custom calendar. * Calendar creation method. To create a calendar from an existing table, specify the method: - `FROM_EXISTING_TABLE` - Creates calendar from the table reference provided in the API request. - `FROM_INPUT_PARAMS` - Creates a calendar from the parameters defined in the API request. * Connection ID and Table name * Database and schema name attributes: For most Cloud Data Warehouse (CDW) connectors, both `database_name` and `schema_name` attributes are required. However, the attribute requirements are conditional and vary based on the connector type and its metadata structure. For example, for connectors such as Teradata, MySQL, SingleSore, Amazon Aurora MySQL, Amazon RDS MySQL, Oracle, and GCP_MYSQL, the `schema_name` is required, whereas the `database_name` attribute is not. Similarly, connectors such as ClickHouse require you to specify the `database_name` and the schema specification in such cases is optional. **NOTE**: If you are creating a calendar from an existing table, ensure that the referenced table matches the required DDL for custom calendars. If the schema does not match, the API returns an error. ##### Calendar type The API allows you to create the following types of calendars: * `MONTH_OFFSET`. The default calendar type. A `MONTH_OFFSET` calendar is offset by a few months from the standard calendar months (January to December) and the year begins with the month defined in the request. For example, if the `month_offset` value is set as `April`, the calendar year begins in April. * `4-4-5`. Each quarter in the calendar will include two 4-week months followed by one 5-week month. * `4-5-4`. Each quarter in the calendar will include two 4-week months with a 5-week month between. * `5-4-4`. Each quarter begins with a 5-week month, followed by two 4-week months. To start and end the calendar on a specific date, specify the dates in the `MM/DD/YYYY` format. For `MONTH_OFFSET` calendars, ensure that the `start_date` matches the month specified in the `month_offset` attribute. You can also set the starting day of the week and customize the prefixes for year and quarter labels. #### Examples To create a calendar from an existing table: ``` { \"name\": \"MyCustomCalendar1\", \"table_reference\": { \"connection_identifier\": \"4db8ea22-2ff4-4224-b05a-26674717e468\", \"table_name\": \"MyCalendarTable\", \"database_name\": \"RETAILAPPAREL\", \"schema_name\": \"PUBLIC\" }, \"creation_method\": \"FROM_EXISTING_TABLE\", } ``` To create a calendar from scratch: ``` { \"name\": \"MyCustomCalendar1\", \"table_reference\": { \"connection_identifier\": \"4db8ea22-2ff4-4224-b05a-26674717e468\", \"table_name\": \"MyCalendarTable\", \"database_name\": \"RETAILAPPAREL\", \"schema_name\": \"PUBLIC\" }, \"creation_method\": \"FROM_INPUT_PARAMS\", \"calendar_type\": \"MONTH_OFFSET\", \"month_offset\": \"April\", \"start_day_of_week\": \"Monday\", \"quarter_name_prefix\": \"Q\", \"year_name_prefix\": \"FY\", \"start_date\": \"04/01/2025\", \"end_date\": \"04/31/2025\" } ``` + * @param createCalendarRequest + */ + createCalendar(createCalendarRequest, _options) { + const result = this.api.createCalendar(createCalendarRequest, _options); + return result.toPromise(); + } + /** + * Version: 10.12.0.cl or later Deletes a [custom calendar](https://docs.thoughtspot.com/cloud/latest/connections-cust-cal). Requires `DATAMANAGEMENT` (**Can manage data**) or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your ThoughtSpot instance, the `CAN_MANAGE_CUSTOM_CALENDAR` (**Can manage custom calendars**) privilege is required. #### Usage guidelines To delete a custom calendar, specify the calendar ID as a path parameter in the request URL. + * @param calendarIdentifier Unique ID or name of the Calendar. + */ + deleteCalendar(calendarIdentifier, _options) { + const result = this.api.deleteCalendar(calendarIdentifier, _options); + return result.toPromise(); + } + /** + * Version: 10.12.0.cl or later Exports a [custom calendar](https://docs.thoughtspot.com/cloud/latest/connections-cust-cal) in the CSV format. Requires `DATAMANAGEMENT` (**Can manage data**) or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your ThoughtSpot instance, the `CAN_MANAGE_CUSTOM_CALENDAR` (**Can manage custom calendars**) privilege is required. #### Usage guidelines Use this API to download a custom calendar in the CSV file format. In your API request, specify the following parameters. * Start and end date of the calendar. For \"month offset\" calendars, the start date must match the month defined in the `month_offset` attribute. You can also specify optional parameters such as the starting day of the week and prefixes for the quarter and year labels. + * @param generateCSVRequest + */ + generateCSV(generateCSVRequest, _options) { + const result = this.api.generateCSV(generateCSVRequest, _options); + return result.toPromise(); + } + /** + * Version: 10.12.0.cl or later Gets a list of [custom calendars](https://docs.thoughtspot.com/cloud/latest/connections-cust-cal). Requires `DATAMANAGEMENT` (**Can manage data**) or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your ThoughtSpot instance, the `CAN_MANAGE_CUSTOM_CALENDAR` (**Can manage custom calendars**) privilege is required. #### Usage guidelines By default, the API returns a list of custom calendars for all connection objects. To retrieve custom calendar details for a particular connection, specify the connection ID. You can also use other search parameters such as `name_pattern` and `sort_options` as search filters. The `name_pattern` parameter filters and returns only those objects that match the specified pattern. Use `%` as a wildcard for pattern matching. + * @param searchCalendarsRequest + */ + searchCalendars(searchCalendarsRequest, _options) { + const result = this.api.searchCalendars(searchCalendarsRequest, _options); + return result.toPromise(); + } + /** + * Version: 10.12.0.cl or later Updates the properties of a [custom calendar](https://docs.thoughtspot.com/cloud/latest/connections-cust-cal). Requires `DATAMANAGEMENT` (**Can manage data**) or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your ThoughtSpot instance, the `CAN_MANAGE_CUSTOM_CALENDAR` (**Can manage custom calendars**) privilege is required. #### Usage guidelines You can update the properties of a calendar using one of the following methods: * `FROM_INPUT_PARAMS` to update the calendar properties with the values defined in the API request. * `FROM_EXISTING_TABLE` Creates a calendar from the parameters defined in the API request. To update a custom calendar, specify the calendar ID as a path parameter in the request URL and the following parameters in the request body: * Connection ID and Table name * Database and schema name attributes: For most Cloud Data Warehouse (CDW) connectors, both `database_name` and `schema_name` attributes are required. However, the attribute requirements are conditional and vary based on the connector type and its metadata structure. For example, for connectors such as Teradata, MySQL, SingleSore, Amazon Aurora MySQL, Amazon RDS MySQL, Oracle, and GCP_MYSQL, the `schema_name` is required, whereas the `database_name` attribute is not. Similarly, connectors such as ClickHouse require you to specify the `database_name` and the schema specification in such cases is optional. The API allows you to modify the calendar type, month offset value, start and end date, starting day of the week, and prefixes assigned to the year and quarter labels. #### Examples Update a custom calendar using an existing Table in ThoughtSpot: ``` { \"update_method\": \"FROM_EXISTING_TABLE\", \"table_reference\": { \"connection_identifier\": \"Connection1\", \"database_name\": \"db1\", \"table_name\": \"custom_calendar_2025\", \"schame_name\": \"schemaVar\" } } ``` Update a custom calendar with the attributes defined in the API request: ``` { \"update_method\": \"FROM_INPUT_PARAMS\", \"table_reference\": { \"connection_identifier\": \"Connection1\", \"database_name\": \"db1\", \"table_name\": \"custom_calendar_2025\", \"schame_name\": \"schemaVar\" }, \"month_offset\": \"August\", \"start_day_of_week\": \"Monday\", \"start_date\": \"08/01/2025\", \"end_date\": \"07/31/2026\" } ``` + * @param calendarIdentifier Unique Id or name of the calendar. + * @param updateCalendarRequest + */ + updateCalendar(calendarIdentifier, updateCalendarRequest, _options) { + const result = this.api.updateCalendar(calendarIdentifier, updateCalendarRequest, _options); + return result.toPromise(); + } +}; +var PromiseDBTApi = class { + constructor(configuration, requestFactory, responseProcessor) { + this.api = new ObservableDBTApi(configuration, requestFactory, responseProcessor); + } + /** + * Version: 9.9.0.cl or later Creates a DBT connection object in ThoughtSpot. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege or `DATAMANAGEMENT` (**Can manage data**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the following Data control privileges may be required: - `CAN_MANAGE_CUSTOM_CALENDAR`(**Can manage custom calendars**) - `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) - `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` (**Can manage data models**) #### About create DBT connection DBT connection in ThoughtSpot is used by the user to define DBT credentials for cloud . The API needs embrace connection, embrace database name, DBT url, import type, DBT account identifier, DBT project identifier, DBT access token and environment details (or) embrace connection, embrace database name, import type, file_content to create a connection object. To know more about DBT, see ThoughtSpot Product Documentation. + * @param connectionName Name of the connection. + * @param databaseName Name of the Database. + * @param importType Mention type of Import + * @param accessToken Access token is mandatory when Import_Type is DBT_CLOUD. + * @param dbtUrl DBT URL is mandatory when Import_Type is DBT_CLOUD. + * @param accountId Account ID is mandatory when Import_Type is DBT_CLOUD + * @param projectId Project ID is mandatory when Import_Type is DBT_CLOUD + * @param dbtEnvId DBT Environment ID\\\" + * @param projectName Name of the project + * @param fileContent Upload DBT Manifest and Catalog artifact files as a ZIP file. This field is Mandatory when Import Type is \\\'ZIP_FILE\\\' + */ + dbtConnection(connectionName, databaseName, importType, accessToken, dbtUrl, accountId, projectId, dbtEnvId, projectName, fileContent, _options) { + const result = this.api.dbtConnection(connectionName, databaseName, importType, accessToken, dbtUrl, accountId, projectId, dbtEnvId, projectName, fileContent, _options); + return result.toPromise(); + } + /** + * Version: 9.9.0.cl or later Resynchronize the existing list of models, tables, worksheet tml’s and import them to Thoughtspot based on the DBT connection object. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege or `DATAMANAGEMENT` (**Can manage data**) privilege, along with an existing DBT connection. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the following data control privileges may be required: - `CAN_MANAGE_CUSTOM_CALENDAR`(**Can manage custom calendars**) - `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) - `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` (**Can manage data models**) + * @param dbtConnectionIdentifier Unique ID of the DBT connection. + * @param fileContent Upload DBT Manifest and Catalog artifact files as a ZIP file. This field is mandatory if the connection was created with import_type ‘ZIP_FILE’ + */ + dbtGenerateSyncTml(dbtConnectionIdentifier, fileContent, _options) { + const result = this.api.dbtGenerateSyncTml(dbtConnectionIdentifier, fileContent, _options); + return result.toPromise(); + } + /** + * Version: 9.9.0.cl or later Generate required table and worksheet and import them. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege or `DATAMANAGEMENT` (**Can manage data**) privilege, along with an existing DBT connection. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the following data control privileges may be required: - `CAN_MANAGE_CUSTOM_CALENDAR`(**Can manage custom calendars**) - `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) - `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` (**Can manage data models**) #### About generate TML Models and Worksheets to be imported can be selected by the user as part of the API. + * @param dbtConnectionIdentifier Unique ID of the DBT connection. + * @param modelTables List of Models and their respective Tables Example: \\\'[{\\\"model_name\\\": \\\"model_name\\\", \\\"tables\\\": [\\\"table_name\\\"]}]\\\' + * @param importWorksheets Mention the worksheet tmls to import + * @param worksheets List of worksheets is mandatory when import_Worksheets is type SELECTED Example: [\\\"worksheet_name\\\"] + * @param fileContent Upload DBT Manifest and Catalog artifact files as a ZIP file. This field is mandatory if the connection was created with import_type ‘ZIP_FILE’ + */ + dbtGenerateTml(dbtConnectionIdentifier, modelTables, importWorksheets, worksheets, fileContent, _options) { + const result = this.api.dbtGenerateTml(dbtConnectionIdentifier, modelTables, importWorksheets, worksheets, fileContent, _options); + return result.toPromise(); + } + /** + * Version: 9.9.0.cl or later Gets a list of DBT connection objects by user and organization, available on the ThoughtSpot system. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege or `DATAMANAGEMENT` (**Can manage data**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the following Data control privileges may be required: - `CAN_MANAGE_CUSTOM_CALENDAR`(**Can manage custom calendars**) - `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) - `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` (**Can manage data models**) #### About search DBT connection To get details of a specific DBT connection identifier, database connection identifier, database connection name, database name, project name, project identifier, environment identifier , import type and author. + */ + dbtSearch(_options) { + const result = this.api.dbtSearch(_options); + return result.toPromise(); + } + /** + * Version: 9.9.0.cl or later Removes the specified DBT connection object from the ThoughtSpot system. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) or `DATAMANAGEMENT` (**Can manage data ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the following Data control privileges may be required: - `CAN_MANAGE_CUSTOM_CALENDAR`(**Can manage custom calendars**) - `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) - `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` (**Can manage data models**) + * @param dbtConnectionIdentifier Unique ID of the DBT Connection. + */ + deleteDbtConnection(dbtConnectionIdentifier, _options) { + const result = this.api.deleteDbtConnection(dbtConnectionIdentifier, _options); + return result.toPromise(); + } + /** + * Version: 9.9.0.cl or later Updates a DBT connection object. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege or `DATAMANAGEMENT` (**Can manage data ThoughtSpot**) privilege, along with an existing DBT connection. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the following data control privileges may be required: - `CAN_MANAGE_CUSTOM_CALENDAR`(**Can manage custom calendars**) - `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) - `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` (**Can manage data models**) #### About update DBT connection You can modify DBT connection object properties such as embrace connection name, embrace database name, import type, account identifier, access token, project identifier and environment (or) embrace connection, embrace database name, import type, file_content settings. + * @param dbtConnectionIdentifier Unique ID of the DBT Connection. + * @param connectionName Name of the connection. + * @param databaseName Name of the Database. + * @param importType Mention type of Import + * @param accessToken Access token is mandatory when Import_Type is DBT_CLOUD. + * @param dbtUrl DBT URL is mandatory when Import_Type is DBT_CLOUD. + * @param accountId Account ID is mandatory when Import_Type is DBT_CLOUD + * @param projectId Project ID is mandatory when Import_Type is DBT_CLOUD + * @param dbtEnvId DBT Environment ID\\\" + * @param projectName Name of the project + * @param fileContent Upload DBT Manifest and Catalog artifact files as a ZIP file. This field is Mandatory when Import Type is \\\'ZIP_FILE\\\' + */ + updateDbtConnection(dbtConnectionIdentifier, connectionName, databaseName, importType, accessToken, dbtUrl, accountId, projectId, dbtEnvId, projectName, fileContent, _options) { + const result = this.api.updateDbtConnection(dbtConnectionIdentifier, connectionName, databaseName, importType, accessToken, dbtUrl, accountId, projectId, dbtEnvId, projectName, fileContent, _options); + return result.toPromise(); + } +}; +var PromiseDataApi = class { + constructor(configuration, requestFactory, responseProcessor) { + this.api = new ObservableDataApi(configuration, requestFactory, responseProcessor); + } + /** + * Version: 9.0.0.cl or later Fetches data from a saved Answer. Requires at least view access to the saved Answer. The `record_size` attribute determines the number of records to retrieve in an API call. For more information about pagination, record size, and maximum row limit, see [Pagination and record size settings](https://developers.thoughtspot.com/docs/fetch-data-and-report-apis#_pagination_settings_for_data_and_report_apis). + * @param fetchAnswerDataRequest + */ + fetchAnswerData(fetchAnswerDataRequest, _options) { + const result = this.api.fetchAnswerData(fetchAnswerDataRequest, _options); + return result.toPromise(); + } + /** + * Version: 9.0.0.cl or later Gets data from a Liveboard object and its visualization. Requires at least view access to the Liveboard. #### Usage guidelines In the request body, specify the GUID or name of the Liveboard. To get data for specific visualizations, add the GUIDs or names of the visualizations in the API request. To include unsaved changes in the report, pass the `transient_pinboard_content` script generated from the `getExportRequestForCurrentPinboard` method in the Visual Embed SDK. Upon successful execution, the API returns the report with unsaved changes. If the new Liveboard experience mode, the transient content includes ad hoc changes to visualizations such as sorting, toggling of legends, and data drill down. For more information, and see [Liveboard data API](https://developers.thoughtspot.com/docs/fetch-data-and-report-apis#_fetch_liveboard_data_api). + * @param fetchLiveboardDataRequest + */ + fetchLiveboardData(fetchLiveboardDataRequest, _options) { + const result = this.api.fetchLiveboardData(fetchLiveboardDataRequest, _options); + return result.toPromise(); + } + /** + * Version: 9.0.0.cl or later Generates an Answer from a given data source. Requires at least view access to the data source object (Worksheet or View). #### Usage guidelines To search data, specify the data source GUID in `logical_table_identifier`. The data source can be a Worksheet, View, Table, or SQL view. Pass search tokens in the `query_string` attribute in the API request as shown in the following example: ``` { \"query_string\": \"[sales] by [store]\", \"logical_table_identifier\": \"cd252e5c-b552-49a8-821d-3eadaa049cca\", } ``` For more information about the `query_string` format and data source attribute, see [Search data API](https://developers.thoughtspot.com/docs/fetch-data-and-report-apis#_search_data_api). The `record_size` attribute determines the number of records to retrieve in an API call. For more information about pagination, record size, and maximum row limit, see [Pagination and record size settings](https://developers.thoughtspot.com/docs/fetch-data-and-report-apis#_pagination_settings_for_data_and_report_api). + * @param searchDataRequest + */ + searchData(searchDataRequest, _options) { + const result = this.api.searchData(searchDataRequest, _options); + return result.toPromise(); + } +}; +var PromiseEmailCustomizationApi = class { + constructor(configuration, requestFactory, responseProcessor) { + this.api = new ObservableEmailCustomizationApi(configuration, requestFactory, responseProcessor); + } + /** + * Version: 10.10.0.cl or later Creates a customization configuration for the notification email. #### Pre-requisites Requires `DEVELOPER` (**has developer privilege**) or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `DEVELOPER` (**Has developer privilege**) privilege is required. **NOTE**:This endpoint in currently in beta. Contact ThoughtSpot support to enable this on your instance. #### Usage guidelines To create a custom configuration pass these parameters in your API request: - A JSON map of configuration attributes `template_properties`. The following example shows a sample set of customization configuration: ``` { { \"cta_button_bg_color\": \"#444DEA\", \"cta_text_font_color\": \"#FFFFFF\", \"primary_bg_color\": \"#D3DEF0\", \"logo_url\": \"https://storage.pardot.com/710713/1642089901EbkRibJq/TS_fullworkmark_darkmode.png\", \"font_family\": \"\", \"product_name\": \"ThoughtSpot\", \"footer_address\": \"444 Castro St, Suite 1000 Mountain View, CA 94041\", \"footer_phone\": \"(800) 508-7008\", \"replacement_value_for_liveboard\": \"Dashboard\", \"replacement_value_for_answer\": \"Chart\", \"replacement_value_for_spot_iq\": \"AI Insights\", \"hide_footer_phone\": false, \"hide_footer_address\": false, \"hide_product_name\": false, \"hide_manage_notification\": false, \"hide_mobile_app_nudge\": false, \"hide_privacy_policy\": false, \"hide_ts_vocabulary_definitions\": false, \"hide_error_message\": false, \"hide_unsubscribe_link\": false, \"hide_notification_status\": false, \"hide_modify_alert\": false, \"company_website_url\": \"https://your-website.com/\", \"company_privacy_policy_url\" : \"https://link-to-privacy-policy.com/\", \"contact_support_url\": \"https://link-to-contact-support.com/\", \"hide_contact_support_url\": false, \"hide_logo_url\" : false } } ``` + * @param createEmailCustomizationRequest + */ + createEmailCustomization(createEmailCustomizationRequest, _options) { + const result = this.api.createEmailCustomization(createEmailCustomizationRequest, _options); + return result.toPromise(); + } + /** + * Version: 10.10.0.cl or later Deletes the configuration for the email customization. #### Pre-requisites Requires `DEVELOPER` (**has developer privilege**) or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `DEVELOPER` (**Has developer privilege**) privilege is required. **NOTE**:This endpoint in currently in beta. Contact ThoughtSpot support to enable this on your instance. #### Usage guidelines - Call the search API endpoint to get the `template_identifier` from the response. - Use that `template_identifier` as a parameter in this API request. + * @param templateIdentifier Unique ID or name of the email customization. + */ + deleteEmailCustomization(templateIdentifier, _options) { + const result = this.api.deleteEmailCustomization(templateIdentifier, _options); + return result.toPromise(); + } + /** + * Version: 10.12.0.cl or later Deletes the configuration for the email customization. #### Pre-requisites Requires `DEVELOPER` (**has developer privilege**) or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `DEVELOPER` (**Has developer privilege**) privilege is required. **NOTE**:This endpoint in currently in beta. Contact ThoughtSpot support to enable this on your instance. #### Usage guidelines - Call the search API endpoint to get the `org_identifier` from the response. - Use that `org_identifier` as a parameter in this API request. + * @param deleteOrgEmailCustomizationRequest + */ + deleteOrgEmailCustomization(deleteOrgEmailCustomizationRequest, _options) { + const result = this.api.deleteOrgEmailCustomization(deleteOrgEmailCustomizationRequest, _options); + return result.toPromise(); + } + /** + * Version: 10.10.0.cl or later Search the email customization configuration if any set for the ThoughtSpot system. #### Pre-requisites Requires `DEVELOPER` (**has developer privilege**) or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `DEVELOPER` (**Has developer privilege**) privilege is required. **NOTE**:This endpoint in currently in beta. Contact ThoughtSpot support to enable this on your instance. + * @param searchEmailCustomizationRequest + */ + searchEmailCustomization(searchEmailCustomizationRequest, _options) { + const result = this.api.searchEmailCustomization(searchEmailCustomizationRequest, _options); + return result.toPromise(); + } + /** + * Version: 10.12.0.cl or later Updates a customization configuration for the notification email. #### Pre-requisites Requires `DEVELOPER` (**has developer privilege**) or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `DEVELOPER` (**Has developer privilege**) privilege is required. **NOTE**:This endpoint in currently in beta. Contact ThoughtSpot support to enable this on your instance. #### Usage guidelines To update a custom configuration pass these parameters in your API request: - A JSON map of configuration attributes `template_properties`. The following example shows a sample set of customization configuration: ``` { { \"cta_button_bg_color\": \"#444DEA\", \"cta_text_font_color\": \"#FFFFFF\", \"primary_bg_color\": \"#D3DEF0\", \"logo_url\": \"https://storage.pardot.com/710713/1642089901EbkRibJq/TS_fullworkmark_darkmode.png\", \"font_family\": \"\", \"product_name\": \"ThoughtSpot\", \"footer_address\": \"444 Castro St, Suite 1000 Mountain View, CA 94041\", \"footer_phone\": \"(800) 508-7008\", \"replacement_value_for_liveboard\": \"Dashboard\", \"replacement_value_for_answer\": \"Chart\", \"replacement_value_for_spot_iq\": \"AI Insights\", \"hide_footer_phone\": false, \"hide_footer_address\": false, \"hide_product_name\": false, \"hide_manage_notification\": false, \"hide_mobile_app_nudge\": false, \"hide_privacy_policy\": false, \"hide_ts_vocabulary_definitions\": false, \"hide_error_message\": false, \"hide_unsubscribe_link\": false, \"hide_notification_status\": false, \"hide_modify_alert\": false, \"company_website_url\": \"https://your-website.com/\", \"company_privacy_policy_url\" : \"https://link-to-privacy-policy.com/\", \"contact_support_url\": \"https://link-to-contact-support.com/\", \"hide_contact_support_url\": false, \"hide_logo_url\" : false } } ``` + * @param updateEmailCustomizationRequest + */ + updateEmailCustomization(updateEmailCustomizationRequest, _options) { + const result = this.api.updateEmailCustomization(updateEmailCustomizationRequest, _options); + return result.toPromise(); + } + /** + * Version: 10.10.0.cl or later Validates the email customization configuration if any set for the ThoughtSpot system. #### Pre-requisites Requires `DEVELOPER` (**has developer privilege**) or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `DEVELOPER` (**Has developer privilege**) privilege is required. **NOTE**:This endpoint in currently in beta. Contact ThoughtSpot support to enable this on your instance. + */ + validateEmailCustomization(_options) { + const result = this.api.validateEmailCustomization(_options); + return result.toPromise(); + } +}; +var PromiseGroupsApi = class { + constructor(configuration, requestFactory, responseProcessor) { + this.api = new ObservableGroupsApi(configuration, requestFactory, responseProcessor); + } + /** + * Version: 9.0.0.cl or later Creates a group object in ThoughtSpot. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `GROUP_ADMINISTRATION` (**Can manage groups**) privilege is required. #### About groups Groups in ThoughtSpot are used by the administrators to define privileges and organize users based on their roles and access requirements. To know more about groups and privileges, see [ThoughtSpot Product Documentation](https://docs.thoughtspot.com/cloud/latest/groups-privileges). #### Supported operations The API endpoint lets you perform the following operations: * Assign privileges * Add users * Define sharing visibility * Add sub-groups * Assign a default Liveboard + * @param createUserGroupRequest + */ + createUserGroup(createUserGroupRequest, _options) { + const result = this.api.createUserGroup(createUserGroupRequest, _options); + return result.toPromise(); + } + /** + * Version: 9.0.0.cl or later Removes the specified group object from the ThoughtSpot system. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `GROUP_ADMINISTRATION` (**Can manage groups**) privilege is required. + * @param groupIdentifier GUID or name of the group. + */ + deleteUserGroup(groupIdentifier, _options) { + const result = this.api.deleteUserGroup(groupIdentifier, _options); + return result.toPromise(); + } + /** + * Version: 9.0.0.cl or later Imports group objects from external databases into ThoughtSpot. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `GROUP_ADMINISTRATION` (**Can manage groups**) privilege is required. During the import operation: * If the specified group is not available in ThoughtSpot, it will be added to ThoughtSpot. * If `delete_unspecified_groups` is set to `true`, the groups not specified in the API request, excluding administrator and system user groups, are deleted. * If the specified groups are already available in ThoughtSpot, the object properties of these groups are modified and synchronized as per the input data in the API request. A successful API call returns the object that represents the changes made in the ThoughtSpot system. + * @param importUserGroupsRequest + */ + importUserGroups(importUserGroupsRequest, _options) { + const result = this.api.importUserGroups(importUserGroupsRequest, _options); + return result.toPromise(); + } + /** + * Version: 9.0.0.cl or later Gets a list of user group objects from the ThoughtSpot system. To get details of a specific user group, specify the user group GUID or name. You can also filter the API response based on User ID, Org ID, Role ID, type of group, sharing visibility, privileges assigned to the group, and the Liveboard IDs assigned to the users in the group. Available to all users. Users with `ADMINISTRATION` (**Can administer ThoughtSpot**) privileges can view all users properties. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `GROUP_ADMINISTRATION` (**Can manage groups**) privilege is required. **NOTE**: If you do not get precise results, try setting `record_size` to `-1` and `record_offset` to `0`. + * @param searchUserGroupsRequest + */ + searchUserGroups(searchUserGroupsRequest, _options) { + const result = this.api.searchUserGroups(searchUserGroupsRequest, _options); + return result.toPromise(); + } + /** + * Version: 9.0.0.cl or later Updates the properties of a group object in ThoughtSpot. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `GROUP_ADMINISTRATION` (**Can manage groups**) privilege is required. #### Supported operations This API endpoint lets you perform the following operations in a single API request: * Edit [privileges](https://developers.thoughtspot.com/docs/?pageid=api-user-management#group-privileges) * Add or remove users * Change sharing visibility settings * Add or remove sub-groups * Assign a default Liveboard or update the existing settings + * @param groupIdentifier GUID or name of the group. + * @param updateUserGroupRequest + */ + updateUserGroup(groupIdentifier, updateUserGroupRequest, _options) { + const result = this.api.updateUserGroup(groupIdentifier, updateUserGroupRequest, _options); + return result.toPromise(); + } +}; +var PromiseJobsApi = class { + constructor(configuration, requestFactory, responseProcessor) { + this.api = new ObservableJobsApi(configuration, requestFactory, responseProcessor); + } + /** + * Version: 26.4.0.cl or later Searches delivery history for communication channels such as webhooks. Returns channel-level delivery status for each job execution record. Use this to monitor channel health and delivery success rates across events. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) or `DEVELOPER` (**Has developer privilege**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, users with `CAN_MANAGE_WEBHOOKS` (**Can manage webhooks**) privilege are also authorized to perform this action. **NOTE**: When `channel_type` is `WEBHOOK`, the following constraints apply: - `job_ids`, `channel_identifiers`, and `events` each accept at most one element. - When `job_ids` is provided, it is used as the sole lookup key and other filter fields are ignored. - When `job_ids` is not provided, `channel_identifiers` and `events` are both required, each containing exactly one element. - Records older than the configured retention period are not returned. - Use `start_epoch_time_in_millis` and/or `end_epoch_time_in_millis` to narrow results to a specific time window. + * @param searchChannelHistoryRequest + */ + searchChannelHistory(searchChannelHistoryRequest, _options) { + const result = this.api.searchChannelHistory(searchChannelHistoryRequest, _options); + return result.toPromise(); + } +}; +var PromiseLogApi = class { + constructor(configuration, requestFactory, responseProcessor) { + this.api = new ObservableLogApi(configuration, requestFactory, responseProcessor); + } + /** + * Version: 9.0.0.cl or later Fetches security audit logs. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the [Admin Control](https://developers.thoughtspot.com/docs/rbac#_admin_control) privileges are required. #### Usage guidelines By default, the API retrieves logs for the last 24 hours. You can set a custom duration in EPOCH time. Make sure the log duration specified in your API request doesn’t exceed 24 hours. If you must fetch logs for a longer time range, modify the duration and make multiple sequential API requests. Upon successful execution, the API returns logs with the following information: * timestamp of the event * event ID * event type * name and GUID of the user * IP address of ThoughtSpot instance For more information see [Audit logs Documentation](https://developers.thoughtspot.com/docs/audit-logs). + * @param fetchLogsRequest + */ + fetchLogs(fetchLogsRequest, _options) { + const result = this.api.fetchLogs(fetchLogsRequest, _options); + return result.toPromise(); + } +}; +var PromiseMetadataApi = class { + constructor(configuration, requestFactory, responseProcessor) { + this.api = new ObservableMetadataApi(configuration, requestFactory, responseProcessor); + } + /** + * Convert worksheets to models Version: 10.6.0.cl or later ## Prerequisites - **Privileges Required:** - `DATAMANAGEMENT` (Can manage data) or `ADMINISTRATION` (Can administer ThoughtSpot). - **Additional Privileges (if RBAC is enabled):** - `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` (Can manage data models). --- ## Usage Guidelines ### Parameters 1. **worksheet_ids** - **Description:** A comma-separated list of GUIDs (Globally Unique Identifiers) specifying the Worksheets to be converted. - **Usage:** - Used only when `convert_all` is set to `false`. - Leave empty or omit when `convert_all` is set to `true`. 2. **exclude_worksheet_ids** - **Description:** A comma-separated list of GUIDs specifying Worksheets to be excluded from conversion. - **Usage:** - Useful when `convert_all` is set to `true` and specific Worksheets should not be converted. 3. **convert_all** - **Description:** Sets the scope of conversion. - **Options:** - `true`: Converts all Worksheets in the system, except those specified in `exclude_worksheet_ids`. - `false`: Converts only the Worksheets listed in `worksheet_ids`. 4. **apply_changes** - **Description:** Specifies whether to apply changes directly to ThoughtSpot or to generate a preview before applying any changes.Used for validation of conversion. - **Options:** - `true`: Applies conversion changes directly to ThoughtSpot. - `false`: Generates only a preview of the changes and does not apply any changes to ThoughtSpot --- ## Best Practices 1. **Backup Before Conversion:** Always export metadata as a backup before initiating the conversion process 2. **Partial Conversion for Testing:** Test the conversion process by setting `convert_all` to `false` and specifying a small number of `worksheet_ids`. 3. **Verify Dependencies:** Check for dependent objects, such as Tables and Connections, to avoid invalid references. 4. **Review Changes:** Use `apply_changes: false` to preview the impact of the conversion before applying changes. --- ## Examples ### Convert Specific Worksheets ```json { \"worksheet_ids\": [\"guid1\", \"guid2\", \"guid3\"], \"exclude_worksheet_ids\": [], \"convert_all\": false, \"apply_changes\": true } ``` ### Convert All Accessible Worksheets ```json { \"worksheet_ids\": [], \"exclude_worksheet_ids\": [], \"convert_all\": true, \"apply_changes\": true } ``` ### Exclude Specific Worksheets While Converting All Accessible Worksheets ```json { \"worksheet_ids\": [], \"exclude_worksheet_ids\": [\"abc\"], \"convert_all\": true, \"apply_changes\": true } ``` + * @param convertWorksheetToModelRequest + */ + convertWorksheetToModel(convertWorksheetToModelRequest, _options) { + const result = this.api.convertWorksheetToModel(convertWorksheetToModelRequest, _options); + return result.toPromise(); + } + /** + * Makes a copy of an Answer or Liveboard Version: 10.3.0.cl or later Creates a copy of a metadata object. Requires at least view access to the metadata object being copied. Upon successful execution, the API creates a copy of the metadata object specified in the API request and returns the ID of the new object. + * @param copyObjectRequest + */ + copyObject(copyObjectRequest, _options) { + const result = this.api.copyObject(copyObjectRequest, _options); + return result.toPromise(); + } + /** + * Version: 9.0.0.cl or later Removes the specified metadata object from the ThoughtSpot system. Requires edit access to the metadata object. + * @param deleteMetadataRequest + */ + deleteMetadata(deleteMetadataRequest, _options) { + const result = this.api.deleteMetadata(deleteMetadataRequest, _options); + return result.toPromise(); + } + /** + * Version: 9.0.0.cl or later Exports the [TML](https://docs.thoughtspot.com/cloud/latest/tml) representation of metadata objects in JSON or YAML format. Requires `DATADOWNLOADING` (**Can download Data**) and at least view access to the metadata object. #### Usage guidelines * You can export one or several objects by passing metadata object GUIDs in the `metadata` array. * When exporting TML content for a Liveboard or Answer object, you can set `export_associated` to `true` to retrieve TML content for underlying Worksheets, Tables, or Views, including the GUID of each object within the headers. When `export_associated` is set to `true`, consider retrieving one metadata object at a time. * Set `export_fqns` to `true` to add FQNs of the referenced objects in the TML content. For example, if you send an API request to retrieve TML for a Liveboard and its associated objects, the API returns the TML content with FQNs of the referenced Worksheet. Exporting TML with FQNs is useful if ThoughtSpot has multiple objects with the same name and you want to eliminate ambiguity when importing TML files into ThoughtSpot. It eliminates the need for adding FQNs of the referenced objects manually during the import operation. * To export only the TML of feedbacks associated with an object, set the GUID of the object as `identifier`, and set the `type` as `FEEDBACK` in the `metadata` array. * To export the TML of an object along with the feedbacks associated with it, set the GUID of the object as `identifier`, set the `type` as `LOGIAL_TABLE` in the `metadata` array, and set `export_with_associated_feedbacks` in `export_options` to true. For more information, see [TML Documentation](https://developers.thoughtspot.com/docs/tml#_export_a_tml). For more information on feedbacks, see [Feedback Documentation](https://docs.thoughtspot.com/cloud/latest/sage-feedback). + * @param exportMetadataTMLRequest + */ + exportMetadataTML(exportMetadataTMLRequest, _options) { + const result = this.api.exportMetadataTML(exportMetadataTMLRequest, _options); + return result.toPromise(); + } + /** + * Version: 10.1.0.cl or later Exports the [TML](https://docs.thoughtspot.com/cloud/latest/tml) representation of metadata objects in JSON or YAML format. ### **Permissions Required** Requires `DATAMANAGEMENT` (**Can manage data**) and `USERMANAGEMENT` (**Can manage users**) privileges. #### **Usage Guidelines** This API is only applicable for `USER`, `GROUP`, and `ROLES` metadata types. - `batch_offset` Indicates the starting position within the complete dataset from which the API should begin returning objects. Useful for paginating results efficiently. - `batch_size` Specifies the number of objects or items to retrieve in a single request. Helps control response size for better performance. - `edoc_format` Defines the format of the TML content. The exported metadata can be in JSON or YAML format. - `export_dependent` Specifies whether to include dependent metadata objects in the export. Ensures related objects are also retrieved if needed. - `all_orgs_override` Indicates whether the export operation applies across all organizations. Useful for multi-tenant environments where cross-org exports are required. + * @param exportMetadataTMLBatchedRequest + */ + exportMetadataTMLBatched(exportMetadataTMLBatchedRequest, _options) { + const result = this.api.exportMetadataTMLBatched(exportMetadataTMLBatchedRequest, _options); + return result.toPromise(); + } + /** + * Version: 9.0.0.cl or later Fetches the underlying SQL query data for an Answer object. Requires at least view access to the Answer object. Upon successful execution, the API returns the SQL queries for the specified object as shown in this example: ``` { \"metadata_id\":\"8fbe44a8-46ad-4b16-8d39-184b2fada490\", \"metadata_name\":\"Total sales\", \"metadata_type\":\"ANSWER\", \"sql_queries\":[ { \"metadata_id\":\"8fbe44a8-46ad-4b16-8d39-184b2fada490\", \"metadata_name\":\"Total sales -test\", \"sql_query\":\"SELECT \\n \\\"ta_1\\\".\\\"REGION\\\" \\\"ca_1\\\", \\n \\\"ta_2\\\".\\\"PRODUCTNAME\\\" \\\"ca_2\\\", \\n \\\"ta_1\\\".\\\"STORENAME\\\" \\\"ca_3\\\", \\n CASE\\n WHEN sum(\\\"ta_3\\\".\\\"SALES\\\") IS NOT NULL THEN sum(\\\"ta_3\\\".\\\"SALES\\\")\\n ELSE 0\\n END \\\"ca_4\\\", \\n CASE\\n WHEN sum(\\\"ta_3\\\".\\\"QUANTITYPURCHASED\\\") IS NOT NULL THEN sum(\\\"ta_3\\\".\\\"QUANTITYPURCHASED\\\")\\n ELSE 0\\n END \\\"ca_5\\\"\\nFROM \\\"RETAILAPPAREL\\\".\\\"PUBLIC\\\".\\\"FACT_RETAPP_SALES\\\" \\\"ta_3\\\"\\n JOIN \\\"RETAILAPPAREL\\\".\\\"PUBLIC\\\".\\\"DIM_RETAPP_STORES\\\" \\\"ta_1\\\"\\n ON \\\"ta_3\\\".\\\"STOREID\\\" = \\\"ta_1\\\".\\\"STOREID\\\"\\n JOIN \\\"RETAILAPPAREL\\\".\\\"PUBLIC\\\".\\\"DIM_RETAPP_PRODUCTS\\\" \\\"ta_2\\\"\\n ON \\\"ta_3\\\".\\\"PRODUCTID\\\" = \\\"ta_2\\\".\\\"PRODUCTID\\\"\\nGROUP BY \\n \\\"ca_1\\\", \\n \\\"ca_2\\\", \\n \\\"ca_3\\\"\\n\" } ] } ``` + * @param fetchAnswerSqlQueryRequest + */ + fetchAnswerSqlQuery(fetchAnswerSqlQueryRequest, _options) { + const result = this.api.fetchAnswerSqlQuery(fetchAnswerSqlQueryRequest, _options); + return result.toPromise(); + } + /** + * Version: 10.4.0.cl or later Gets information about the status of the TML async import task scheduled using the `/api/rest/2.0/metadata/tml/async/import` API call. To fetch the task details, specify the ID of the TML async import task. Requires access to the task ID. The API allows users who initiated the asynchronous TML import via `/api/rest/2.0/metadata/tml/async/import` to view the status of their tasks. Users with administration privilege can view the status of all import tasks initiated by the users in their Org. #### Usage guidelines See [TML API Documentation](https://developers.thoughtspot.com/docs/tml#_fetch_status_of_the_tml_import_task) for usage guidelines. + * @param fetchAsyncImportTaskStatusRequest + */ + fetchAsyncImportTaskStatus(fetchAsyncImportTaskStatusRequest, _options) { + const result = this.api.fetchAsyncImportTaskStatus(fetchAsyncImportTaskStatusRequest, _options); + return result.toPromise(); + } + /** + * Version: 9.0.0.cl or later Fetches the underlying SQL query data for a Liveboard object and its visualizations. Requires at least view access to the Liveboard object. To get SQL query data for a Liveboard, specify the GUID of the Liveboard. Optionally, you can add an array of visualization GUIDs to retrieve the SQL query data for visualizations in the Liveboard. Upon successful execution, the API returns the SQL queries for the specified object as shown in this example: ``` { \"metadata_id\": \"fa68ae91-7588-4136-bacd-d71fb12dda69\", \"metadata_name\": \"Total Sales\", \"metadata_type\": \"LIVEBOARD\", \"sql_queries\": [ { \"metadata_id\": \"b3b6d2b9-089a-490c-8e16-b144650b7843\", \"metadata_name\": \"Total quantity purchased, Total sales by region\", \"sql_query\": \"SELECT \\n \\\"ta_1\\\".\\\"REGION\\\" \\\"ca_1\\\", \\n CASE\\n WHEN sum(\\\"ta_2\\\".\\\"QUANTITYPURCHASED\\\") IS NOT NULL THEN sum(\\\"ta_2\\\".\\\"QUANTITYPURCHASED\\\")\\n ELSE 0\\n END \\\"ca_2\\\", \\n CASE\\n WHEN sum(\\\"ta_2\\\".\\\"SALES\\\") IS NOT NULL THEN sum(\\\"ta_2\\\".\\\"SALES\\\")\\n ELSE 0\\n END \\\"ca_3\\\"\\nFROM \\\"RETAILAPPAREL\\\".\\\"PUBLIC\\\".\\\"FACT_RETAPP_SALES\\\" \\\"ta_2\\\"\\n JOIN \\\"RETAILAPPAREL\\\".\\\"PUBLIC\\\".\\\"DIM_RETAPP_STORES\\\" \\\"ta_1\\\"\\n ON \\\"ta_2\\\".\\\"STOREID\\\" = \\\"ta_1\\\".\\\"STOREID\\\"\\nGROUP BY \\\"ca_1\\\"\" } ] } ``` + * @param fetchLiveboardSqlQueryRequest + */ + fetchLiveboardSqlQuery(fetchLiveboardSqlQueryRequest, _options) { + const result = this.api.fetchLiveboardSqlQuery(fetchLiveboardSqlQueryRequest, _options); + return result.toPromise(); + } + /** + * Version: 9.0.0.cl or later Imports [TML](https://docs.thoughtspot.com/cloud/latest/tml) files into ThoughtSpot. Requires `DATAMANAGEMENT` (**Can manage data**) or `ADMINISTRATION` (**Can administer ThoughtsSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the following Data control privileges may be required: - `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) - `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` (**Can manage data models**) #### Usage guidelines * Import all related objects in a single TML Import API call. For example, Tables that use the same Connection object and Worksheets connected to these Tables. * Include the `fqn` property to distinguish objects that have the same name. For example, if you have multiple Connections or Worksheets with the same name on ThoughtSpot and the Connection or Worksheet referenced in your TML file does not have a unique name to distinguish, it may result in invalid object references. Adding `fqn` helps ThoughtSpot differentiate a Table from another with the same name. We recommend [exporting TML with FQNs](#/http/api-endpoints/metadata/export-metadata-tml) and using these during the import operation. * You can upload multiple TML files at a time. If you import a Worksheet along with Liveboards, Answers, and other dependent objects in a single API call, the imported objects will be immediately available for use. When you import only a Worksheet object, it may take some time for the Worksheet to become available in the ThoughtSpot system. Please wait for a few minutes, and then proceed to create an Answer and Liveboard from the newly imported Worksheet. For more information, see [TML Documentation](https://developers.thoughtspot.com/docs/tml#_import_a_tml). + * @param importMetadataTMLRequest + */ + importMetadataTML(importMetadataTMLRequest, _options) { + const result = this.api.importMetadataTML(importMetadataTMLRequest, _options); + return result.toPromise(); + } + /** + * Version: 10.4.0.cl or later Schedules a task to import [TML](https://docs.thoughtspot.com/cloud/latest/tml) files into ThoughtSpot. You can use this API endpoint to process TML objects asynchronously when importing TMLs of large and complex metadata objects into ThoughtSpot. Unlike the synchronous import TML operation, the API processes TML data in the background and returns a task ID, which can be used to check the status of the import task via `/api/rest/2.0/metadata/tml/async/status` API endpoint. Requires `DATAMANAGEMENT` (**Can manage data**) or `ADMINISTRATION` (**Can administer ThoughtsSpot**) privilege, and edit access to the TML objects. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the following Data control privileges may be required: - `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) - `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` (**Can manage data models**) #### Usage guidelines See [Async TML API Documentation](https://developers.thoughtspot.com/docs/tml#_import_tml_objects_asynchronously) for usage guidelines. + * @param importMetadataTMLAsyncRequest + */ + importMetadataTMLAsync(importMetadataTMLAsyncRequest, _options) { + const result = this.api.importMetadataTMLAsync(importMetadataTMLAsyncRequest, _options); + return result.toPromise(); + } + /** + * Parameterize fields in metadata objects. Version: 10.9.0.cl or later **Note:** This API endpoint is deprecated and will be removed from ThoughtSpot in a future release. Use [POST /api/rest/2.0/metadata/parameterize-fields](/api/rest/2.0/metadata/parameterize-fields) instead. Allows parameterizing fields in metadata objects in ThoughtSpot. Requires appropriate permissions to modify the metadata object. The API endpoint allows parameterizing the following types of metadata objects: * Logical Tables * Connections * Connection Configs For a Logical Table the field type must be `ATTRIBUTE` and field name can be one of: * databaseName * schemaName * tableName For a Connection or Connection Config, the field type is always `CONNECTION_PROPERTY`. In this case, field_name specifies the exact property of the Connection or Connection Config that needs to be parameterized. For Connection Config, the only supported field name is: * impersonate_user + * @param parameterizeMetadataRequest + */ + parameterizeMetadata(parameterizeMetadataRequest, _options) { + const result = this.api.parameterizeMetadata(parameterizeMetadataRequest, _options); + return result.toPromise(); + } + /** + * Parameterize multiple fields of metadata objects. For example [schemaName, databaseName] for LOGICAL_TABLE. Version: 26.5.0.cl or later Allows parameterizing multiple fields of metadata objects in ThoughtSpot. For example, you can parameterize [schemaName, databaseName] for LOGICAL_TABLE. Requires appropriate permissions to modify the metadata object. The API endpoint allows parameterizing the following types of metadata objects: * Logical Tables * Connections * Connection Configs For a Logical Table, the field type must be `ATTRIBUTE` and field names can include: * databaseName * schemaName * tableName For a Connection or Connection Config, the field type is always `CONNECTION_PROPERTY`. In this case, field_names specifies the exact properties of the Connection or Connection Config that need to be parameterized. For Connection Config, supported field names include: * impersonate_user You can parameterize multiple fields at once by providing an array of field names. + * @param parameterizeMetadataFieldsRequest + */ + parameterizeMetadataFields(parameterizeMetadataFieldsRequest, _options) { + const result = this.api.parameterizeMetadataFields(parameterizeMetadataFieldsRequest, _options); + return result.toPromise(); + } + /** + * Version: 9.0.0.cl or later Gets a list of metadata objects available on the ThoughtSpot system. This API endpoint is available to all users who have view access to the object. Users with `ADMINISTRATION` (**Can administer ThoughtSpot**) privileges can view data for all metadata objects, including users and groups. #### Usage guidelines - To get all metadata objects, send the API request without any attributes. - To get metadata objects of a specific type, set the `type` attribute. For example, to fetch a Worksheet, set the type as `LOGICAL_TABLE`. - To filter metadata objects within type `LOGICAL_TABLE`, set the `subtypes` attribute. For example, to fetch a Worksheet, set the type as `LOGICAL_TABLE` & subtypes as `[WORKSHEET]`. - To get a specific metadata object, specify the GUID. - To customize your search and filter the API response, you can use several parameters. You can search for objects created or modified by specific users, by tags applied to the objects, or by using the include parameters like `include_auto_created_objects`, `include_dependent_objects`, `include_headers`, `include_incomplete_objects`, and so on. You can also define sorting options to sort the data retrieved in the API response. - To get discoverable objects when linientmodel is enabled you can use `include_discoverable_objects` as true else false. Default value is true. - For liveboard metadata type, to get the newer format, set the `liveboard_response_format` as V2. Default value is V1. - To retrieve only objects that are published, set the `include_only_published_objects` as true. Default value is false. **NOTE**: The following parameters support pagination of metadata records: - `tag_identifiers` - `type` - `subtypes` - `created_by_user_identifiers` - `modified_by_user_identifiers` - `owned_by_user_identifiers` - `exclude_objects` - `include_auto_created_objects` - `favorite_object_options` - `include_only_published_objects` If you are using other parameters to search metadata, set `record_size` to `-1` and `record_offset` to `0`. + * @param searchMetadataRequest + */ + searchMetadata(searchMetadataRequest, _options) { + const result = this.api.searchMetadata(searchMetadataRequest, _options); + return result.toPromise(); + } + /** + * Remove parameterization from fields in metadata objects. Version: 26.5.0.cl or later Allows removing parameterization from fields in metadata objects in ThoughtSpot. Requires appropriate permissions to modify the metadata object. The API endpoint allows unparameterizing the following types of metadata objects: * Logical Tables * Connections * Connection Configs For a Logical Table the field type must be `ATTRIBUTE` and field name can be one of: * databaseName * schemaName * tableName For a Connection or Connection Config, the field type is always `CONNECTION_PROPERTY`. In this case, field_name specifies the exact property of the Connection or Connection Config that needs to be unparameterized. For Connection Config, the only supported field name is: * impersonate_user + * @param unparameterizeMetadataRequest + */ + unparameterizeMetadata(unparameterizeMetadataRequest, _options) { + const result = this.api.unparameterizeMetadata(unparameterizeMetadataRequest, _options); + return result.toPromise(); + } + /** + * Update header attributes for a given list of header objects. Version: 10.6.0.cl or later ## Prerequisites - **Privileges Required:** - `DATAMANAGEMENT` (Can manage data) or `ADMINISTRATION` (Can administer ThoughtSpot). - **Additional Privileges (if RBAC is enabled):** - `ORG_ADMINISTRATION` (Can manage orgs). --- ## Usage Guidelines ### Parameters 1. **headers_update** - **Description:** List of header objects with their attributes to be updated. Each object contains a list of attributes to be updated in the header. - **Usage:** - You must provide either `identifier` or `obj_identifier`, but not both. Both fields cannot be empty. - When `org_identifier` is set to `-1`, only the `identifier` value is accepted; `obj_identifier` is not allowed. 2. **org_identifier** - **Description:** GUID (Globally Unique Identifier) or name of the organization. - **Usage:** - Leaving this field empty assumes that the changes should be applied to the current organization - Provide `org_guid` or `org_name` to uniquely identify the organization where changes need to be applied. . - Provide `-1` if changes have to be applied across all the org. --- ## Note Currently, this API is enabled only for updating the `obj_identifier` attribute. Only `text` will be allowed in attribute\'s value. ## Best Practices 1. **Backup Before Conversion:** Always export metadata as a backup before initiating the update process --- ## Examples ### Only `identifier` is given ```json { \"headers_update\": [ { \"identifier\": \"guid_1\", \"obj_identifier\": \"\", \"type\": \"LOGICAL_COLUMN\", \"attributes\": [ { \"name\": \"obj_id\", \"value\": \"custom_object_id\" } ] } ], \"org_identifier\": \"orgGuid\" } ``` ### Only `obj_identifier` is given ```json { \"headers_update\": [ { \"obj_identifier\": \"custom_object_id\", \"type\": \"ANSWER\", \"attributes\": [ { \"name\": \"obj_id\", \"value\": \"custom_object_id\" } ] } ], \"org_identifier\": \"orgName\" } ``` ### Executing update for all org `-1` ```json { \"headers_update\": [ { \"identifier\": \"guid_1\", \"type\": \"ANSWER\", \"attributes\": [ { \"name\": \"obj_id\", \"value\": \"custom_object_id\" } ] } ], \"org_identifier\": -1 } ``` ### Optional `type` is not provided ```json { \"headers_update\": [ { \"identifier\": \"guid_1\", \"attributes\": [ { \"name\": \"obj_id\", \"value\": \"custom_object_id\" } ] } ], \"org_identifier\": -1 } ``` + * @param updateMetadataHeaderRequest + */ + updateMetadataHeader(updateMetadataHeaderRequest, _options) { + const result = this.api.updateMetadataHeader(updateMetadataHeaderRequest, _options); + return result.toPromise(); + } + /** + * Update object IDs for given metadata objects. Version: 10.8.0.cl or later ## Prerequisites - **Privileges Required:** - `DATAMANAGEMENT` (Can manage data) or `ADMINISTRATION` (Can administer ThoughtSpot). - **Additional Privileges (if RBAC is enabled):** - `ORG_ADMINISTRATION` (Can manage orgs). --- ## Usage Guidelines ### Parameters 1. **metadata** - **Description:** List of metadata objects to update their object IDs. - **Usage:** - Use either `current_obj_id` alone OR use `metadata_identifier` with `type` (when needed). - When using `metadata_identifier`, the `type` field is required if using a name instead of a GUID. - The `new_obj_id` field is always required. --- ## Note This API is specifically designed for updating object IDs of metadata objects. It internally uses the header update mechanism to perform the changes. ## Best Practices 1. **Backup Before Update:** Always export metadata as a backup before initiating the update process. 2. **Validation:** - When using `current_obj_id`, ensure it matches the existing object ID exactly. - When using `metadata_identifier` with a name, ensure the `type` is specified correctly. - Verify that the `new_obj_id` follows your naming conventions and is unique within your system. --- ## Examples ### Using current_obj_id ```json { \"metadata\": [ { \"current_obj_id\": \"existing_object_id\", \"new_obj_id\": \"new_object_id\" } ] } ``` ### Using metadata_identifier with GUID ```json { \"metadata\": [ { \"metadata_identifier\": \"01234567-89ab-cdef-0123-456789abcdef\", \"new_obj_id\": \"new_object_id\" } ] } ``` ### Using metadata_identifier with name and type ```json { \"metadata\": [ { \"metadata_identifier\": \"My Answer\", \"type\": \"ANSWER\", \"new_obj_id\": \"new_object_id\" } ] } ``` ### Multiple objects update ```json { \"metadata\": [ { \"current_obj_id\": \"existing_object_id_1\", \"new_obj_id\": \"new_object_id_1\" }, { \"metadata_identifier\": \"My Worksheet\", \"type\": \"LOGICAL_TABLE\", \"new_obj_id\": \"new_object_id_2\" } ] } ``` + * @param updateMetadataObjIdRequest + */ + updateMetadataObjId(updateMetadataObjIdRequest, _options) { + const result = this.api.updateMetadataObjId(updateMetadataObjIdRequest, _options); + return result.toPromise(); + } +}; +var PromiseOrgsApi = class { + constructor(configuration, requestFactory, responseProcessor) { + this.api = new ObservableOrgsApi(configuration, requestFactory, responseProcessor); + } + /** + * Version: 9.0.0.cl or later Creates an Org object. To use this API, the [Orgs](https://docs.thoughtspot.com/cloud/latest/orgs-overview) feature must be enabled in your cluster. Requires cluster administration (**Can administer Org**) privileges. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `ORG_ADMINISTRATION` (**Can manage Orgs**) privilege is required. + * @param createOrgRequest + */ + createOrg(createOrgRequest, _options) { + const result = this.api.createOrg(createOrgRequest, _options); + return result.toPromise(); + } + /** + * Version: 9.0.0.cl or later Deletes an Org object from the ThoughtSpot system. Requires cluster administration (**Can administer Org**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `ORG_ADMINISTRATION` (**Can manage Orgs**) privilege is required. When you delete an Org, all its users and objects created in that Org context are removed. However, if the users in the deleted Org also exists in other Orgs, they are removed only from the deleted Org. + * @param orgIdentifier ID or name of the Org + */ + deleteOrg(orgIdentifier, _options) { + const result = this.api.deleteOrg(orgIdentifier, _options); + return result.toPromise(); + } + /** + * Version: 9.0.0.cl or later Gets a list of Orgs configured on the ThoughtSpot system. To get details of a specific Org, specify the Org ID or name. You can also pass parameters such as status, visibility, and user identifiers to get a specific list of Orgs. Requires cluster administration (**Can administer Org**) privileges. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `ORG_ADMINISTRATION` (**Can manage Orgs**) privilege is required. + * @param searchOrgsRequest + */ + searchOrgs(searchOrgsRequest, _options) { + const result = this.api.searchOrgs(searchOrgsRequest, _options); + return result.toPromise(); + } + /** + * Version: 9.0.0.cl or later Updates an Org object. You can modify Org properties such as name, description, and user associations. Requires cluster administration (**Can administer Org**) privileges. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `ORG_ADMINISTRATION` (**Can manage Orgs**) privilege is required. + * @param orgIdentifier ID or name of the Org + * @param updateOrgRequest + */ + updateOrg(orgIdentifier, updateOrgRequest, _options) { + const result = this.api.updateOrg(orgIdentifier, updateOrgRequest, _options); + return result.toPromise(); + } +}; +var PromiseReportsApi = class { + constructor(configuration, requestFactory, responseProcessor) { + this.api = new ObservableReportsApi(configuration, requestFactory, responseProcessor); + } + /** + * Version: 9.0.0.cl or later Exports an Answer in the given file format. You can download the Answer data as a PDF, PNG, CSV, or XLSX file. Requires at least view access to the Answer. #### Usage guidelines In the request body, specify the GUID or name of the Answer and set `file_format`. The default file format is CSV. Use the `type` parameter to specify whether the Answer being exported is a saved Answer (`SAVED`) or a pinned Answer on a Liveboard (`PINNED`). Defaults to `SAVED`. When using `PINNED`, the `metadata_identifier` must be the container id. **NOTE**: * The downloadable file returned in API response file is extensionless. Please rename the downloaded file by typing in the relevant extension. * HTML rendering is not supported for PDF exports of Answers with tables. Optionally, you can define [runtime overrides](https://developers.thoughtspot.com/docs/fetch-data-and-report-apis#_runtime_overrides) to apply to the Answer data. + * @param exportAnswerReportRequest + */ + exportAnswerReport(exportAnswerReportRequest, _options) { + const result = this.api.exportAnswerReport(exportAnswerReportRequest, _options); + return result.toPromise(); + } + /** + * Version: 9.0.0.cl or later Exports a Liveboard and its visualizations in PDF, PNG, CSV, or XLSX file format. The default `file_format` is CSV. Requires at least view access to the Liveboard. #### Usage guidelines In the request body, specify the GUID or name of the Liveboard. To generate a Liveboard report with specific visualizations, add GUIDs or names of the visualizations. **NOTE**: * The downloadable file returned in API response file is extensionless. Please rename the downloaded file by typing in the relevant extension. * Optionally, you can define [runtime overrides](https://developers.thoughtspot.com/docs/fetch-data-and-report-apis#_runtime_overrides) to apply to the Answer data. * To include unsaved changes in the report, pass the `transient_pinboard_content` script generated from the `getExportRequestForCurrentPinboard` method in the Visual Embed SDK. Upon successful execution, the API returns the report with unsaved changes, including ad hoc changes to visualizations. For more information, see [Liveboard Report API](https://developers.thoughtspot.com/docs/fetch-data-and-report-apis#_liveboard_report_api). * Starting with ThoughtSpot Cloud 10.9.0.cl release, the Liveboard can be exported in the PNG format in the resolution of your choice. To enable this on your instance, contact ThoughtSpot support. When this feature is enabled, the options `include_cover_page`,`include_filter_page` within the `png_options` will not be available for PNG exports. * Starting with the ThoughtSpot Cloud 26.2.0.cl release, * Liveboards can be exported in CSV format. * All visualizations within a Liveboard can be exported as individual CSV files. * When exporting multiple visualizations or the entire Liveboard, the system returns the report as a compressed ZIP file containing the separate CSV files for each visualization. * Liveboards can also be exported in XLSX format. * All selected visualizations are consolidated into a single Excel workbook (.xlsx), with each visualization placed in its own worksheet (tab). * XLSX exports are limited to a maximum of 255 worksheets (tabs) per workbook. + * @param exportLiveboardReportRequest + */ + exportLiveboardReport(exportLiveboardReportRequest, _options) { + const result = this.api.exportLiveboardReport(exportLiveboardReportRequest, _options); + return result.toPromise(); + } +}; +var PromiseRolesApi = class { + constructor(configuration, requestFactory, responseProcessor) { + this.api = new ObservableRolesApi(configuration, requestFactory, responseProcessor); + } + /** + * Version: 9.5.0.cl or later Creates a Role object in ThoughtSpot. Available only if [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance. To create a Role, the `ROLE_ADMINISTRATION` (**Can manage roles**) privilege is required. + * @param createRoleRequest + */ + createRole(createRoleRequest, _options) { + const result = this.api.createRole(createRoleRequest, _options); + return result.toPromise(); + } + /** + * Version: 9.5.0.cl or later Deletes a Role object from the ThoughtSpot system. Available only if [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance. To delete a Role, the `ROLE_ADMINISTRATION` (**Can manage roles**) privilege is required. + * @param roleIdentifier Unique ID or name of the Role. ReadOnly roles cannot be deleted. + */ + deleteRole(roleIdentifier, _options) { + const result = this.api.deleteRole(roleIdentifier, _options); + return result.toPromise(); + } + /** + * Version: 9.5.0.cl or later Gets a list of Role objects from the ThoughtSpot system. Available if [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance. To search for Roles, the `ROLE_ADMINISTRATION` (**Can manage roles**) privilege is required. To get details of a specific Role object, specify the GUID or name. You can also filter the API response based on user group and Org identifiers, privileges assigned to the Role, and deprecation status. + * @param searchRolesRequest + */ + searchRoles(searchRolesRequest, _options) { + const result = this.api.searchRoles(searchRolesRequest, _options); + return result.toPromise(); + } + /** + * Version: 9.5.0.cl or later Updates the properties of a Role object. Available only if [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance. To update a Role, the `ROLE_ADMINISTRATION` (**Can manage roles**) privilege is required. + * @param roleIdentifier Unique ID or name of the Role. + * @param updateRoleRequest + */ + updateRole(roleIdentifier, updateRoleRequest, _options) { + const result = this.api.updateRole(roleIdentifier, updateRoleRequest, _options); + return result.toPromise(); + } +}; +var PromiseSchedulesApi = class { + constructor(configuration, requestFactory, responseProcessor) { + this.api = new ObservableSchedulesApi(configuration, requestFactory, responseProcessor); + } + /** + * Create schedule. Version: 9.4.0.cl or later Creates a Liveboard schedule job. Requires at least edit access to Liveboards. To create a schedule on behalf of another user, you need `ADMINISTRATION` (**Can administer Org**) or `JOBSCHEDULING` (**Can schedule for others**) privilege and edit access to the Liveboard. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `JOBSCHEDULING` (**Can schedule for others**) privilege is required. #### Usage guidelines * The description text is mandatory. The description text appears as **Description: ** in the Liveboard schedule email notifications. * For Liveboards with both charts and tables, schedule creation is only supported in PDF and XLS formats. Schedules created in CSV formats for such Liveboards will fail to run. If `PDF` is set as the `file_format`, enable `pdf_options` to get the correct attachment. Not doing so may cause the attachment to be rendered empty. * To include only specific visualizations, specify the visualization GUIDs in the `visualization_identifiers` array. * You can schedule a Liveboard job to run periodically by setting frequency parameters. You can set the schedule to run daily, weekly, monthly or every n minutes or hours. The scheduled job can also be configured to run at a specific time of the day or on specific days of the week or month. Please ensure that when setting the schedule frequency for _minute of the object_, only values that are multiples of 5 are included. * If the `frequency` parameters are defined, you can set the time zone to a value that matches your server\'s time zone. For example, `US/Central`, `Etc/UTC`, `CET`. The default time zone is `America/Los_Angeles`. For more information about Liveboard jobs, see [ThoughtSpot Product Documentation](https://docs.thoughtspot.com/cloud/latest/liveboard-schedule). + * @param createScheduleRequest + */ + createSchedule(createScheduleRequest, _options) { + const result = this.api.createSchedule(createScheduleRequest, _options); + return result.toPromise(); + } + /** + * Deletes a scheduled job. Version: 9.4.0.cl or later Deletes a scheduled Liveboard job. Requires at least edit access to Liveboard or `ADMINISTRATION` (**Can administer Org**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `JOBSCHEDULING` (**Can schedule for others**) privilege is required. + * @param scheduleIdentifier Unique ID or name of the scheduled job. + */ + deleteSchedule(scheduleIdentifier, _options) { + const result = this.api.deleteSchedule(scheduleIdentifier, _options); + return result.toPromise(); + } + /** + * Search Schedules Version: 9.4.0.cl or later Gets a list of scheduled jobs configured for a Liveboard. To get details of a specific scheduled job, specify the name or GUID of the scheduled job. Requires at least view access to Liveboards. **NOTE**: When filtering schedules by parameters other than `metadata`, set `record_size` to `-1` and `record_offset` to `0` for accurate results. + * @param searchSchedulesRequest + */ + searchSchedules(searchSchedulesRequest, _options) { + const result = this.api.searchSchedules(searchSchedulesRequest, _options); + return result.toPromise(); + } + /** + * Update schedule. Version: 9.4.0.cl or later Updates a scheduled Liveboard job. Requires at least edit access to Liveboards. To update a schedule on behalf of another user, you need `ADMINISTRATION` (**Can administer Org**) or `JOBSCHEDULING` (**Can schedule for others**) privilege and edit access to the Liveboard. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `JOBSCHEDULING` (**Can schedule for others**) privilege is required. The API endpoint allows you to pause a scheduled job, change the status of a paused job. You can also edit the recipients list, frequency of the job, format of the file to send to the recipients in email notifications, PDF options, and time zone setting. + * @param scheduleIdentifier Unique ID or name of the schedule. + * @param updateScheduleRequest + */ + updateSchedule(scheduleIdentifier, updateScheduleRequest, _options) { + const result = this.api.updateSchedule(scheduleIdentifier, updateScheduleRequest, _options); + return result.toPromise(); + } +}; +var PromiseSecurityApi = class { + constructor(configuration, requestFactory, responseProcessor) { + this.api = new ObservableSecurityApi(configuration, requestFactory, responseProcessor); + } + /** + * Version: 9.0.0.cl or later Transfers the ownership of one or several objects from one user to another. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `USER_ADMINISTRATION` (**Can manage users**) privilege and edit access to the objects are required. + * @param assignChangeAuthorRequest + */ + assignChangeAuthor(assignChangeAuthorRequest, _options) { + const result = this.api.assignChangeAuthor(assignChangeAuthorRequest, _options); + return result.toPromise(); + } + /** + * Version: 10.12.0.cl or later Fetches column security rules for specified tables. This API endpoint retrieves column-level security rules configured for tables. It returns information about which columns are secured and which groups have access to those columns. #### Usage guidelines - Provide an array of table identifiers using either `identifier` (GUID or name) or `obj_identifier` (object ID) - At least one of `identifier` or `obj_identifier` must be provided for each table - The API returns column security rules for all specified tables - Users must have appropriate permissions to access security rules for the specified tables #### Required permissions - `ADMINISTRATION` - Can administer ThoughtSpot - `DATAMANAGEMENT` - Can manage data - `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` - Can manage worksheet views and tables #### Example request ```json { \"tables\": [ { \"identifier\": \"table-guid\", \"obj_identifier\": \"table-object-id\" } ] } ``` #### Response format The API returns an array of `ColumnSecurityRuleResponse` objects wrapped in a `data` field. Each `ColumnSecurityRuleResponse` object contains: - Table information (GUID and object ID) - Array of column security rules with column details, group access, and source table information #### Example response ```json { \"data\": [ { \"guid\": \"table-guid\", \"objId\": \"table-object-id\", \"columnSecurityRules\": [ { \"column\": { \"id\": \"col_123\", \"name\": \"Salary\" }, \"groups\": [ { \"id\": \"group_1\", \"name\": \"HR Department\" } ], \"sourceTableDetails\": { \"id\": \"source-table-guid\", \"name\": \"Employee_Data\" } } ] } ] } ``` + * @param fetchColumnSecurityRulesRequest + */ + fetchColumnSecurityRules(fetchColumnSecurityRulesRequest, _options) { + const result = this.api.fetchColumnSecurityRules(fetchColumnSecurityRulesRequest, _options); + return result.toPromise(); + } + /** + * Version: 26.3.0.cl or later This API fetches the object privileges present for the given list of principals (user or group), on the given set of objects. It supports pagination, which can be enabled and configured using the request parameters. It provides users access to certain features based on privilege based access control. #### Usage guidelines - Specify the `type` (`USER` or `USER_GROUP`) and `identifier` (either GUID or name) of the principals for which you want to retrieve object privilege information in the `principals` array. - Specify the `type` (`LOGICAL_TABLE`) and `identifier` (either GUID or name) of the metadata objects for which you want to retrieve object privilege information in the `metadata` array. Only `LOGICAL_TABLE` metadata type is supported for now. It may be extended for other metadata types in future. - To control the offset from where principals have to be fetched, use `record_offset`. When `record_offset` is 0, information is fetched from the beginning. - To control the number of principals to be fetched, use `record_size`. Default `record_size` is 20. - Ensure `record_offset` for a subsequent request is one more than the value of `record_size` of the previous request. - Ensure using correct Authorization Bearer Token corresponding to specific user & org. #### Example request ```json { \"principals\": [ { \"type\": \"type-1\", \"identifier\": \"principal-guid-or-name-1\" }, { \"type\": \"type-2\", \"identifier\": \"principal-guid-or-name-2\" } ], \"metadata\": [ { \"type\": \"metadata-type-1\", \"identifier\": \"metadata-guid-or-name-1\" }, { \"type\": \"metadata-type-2\", \"identifier\": \"metadata-guid-or-name-2\" } ], \"record_offset\": 0, \"record_size\": 20 } ``` #### Response format The API returns an array of `metadata_object_privileges` objects wrapped in JSON. Each `metadata_object_privileges` object contains: - Metadata information (GUID, name and type) - Array of `principal_object_privilege_info`. - Each `principal_object_privilege_info` contains: - Principal type. All principals of this type are listed as described below. - Array of `principal_object_privileges`. - Each `principal_object_privileges` contains: - Principal information (GUID, name, subtype) - List of applied object level privileges. #### Example response ```json { \"metadata_object_privileges\": [ { \"metadata_id\": \"metadata-guid-1\", \"metadata_name\": \"metadata-name-1\", \"metadata_type\": \"metadata-type-1\", \"principal_object_privilege_info\": [ { \"principal_type\": \"principal-type-1\", \"principal_object_privileges\": [ { \"principal_id\": \"principal-guid-1\", \"principal_name\": \"principal-name-1\", \"principal_sub_type\": \"principal-sub-type-1\", \"object_privileges\": \"[object-privilege-1, object-privilege-2]\" }, { \"principal_id\": \"principal-guid-2\", \"principal_name\": \"principal-name-2\", \"principal_sub_type\": \"principal-sub-type-2\", \"object_privileges\": \"[object-privilege-1, object-privilege-2]\" } ] }, { \"principal_type\": \"principal-type-2\", \"principal_object_privileges\": [ { \"principal_id\": \"principal-guid-3\", \"principal_name\": \"principal-guid-4\", \"principal_sub_type\": \"principal-sub-type-4\", \"object_privileges\": \"[object-privilege-1]\" } ] } ] }, { \"metadata_id\": \"metadata-guid-2\", \"metadata_name\": \"metadata-name-2\", \"metadata_type\": \"metadata-type-2\", \"principal_object_privilege_info\": [ { \"principal_type\": \"principal-type-1\", \"principal_object_privileges\": [ { \"principal_id\": \"principal-guid-1\", \"principal_name\": \"principal-name-1\", \"principal_sub_type\": \"principal-sub-type-1\", \"object_privileges\": \"[object-privilege-3, object-privilege-4]\" }, { \"principal_id\": \"principal-guid-2\", \"principal_name\": \"principal-name-2\", \"principal_sub_type\": \"principal-sub-type-2\", \"object_privileges\": \"[object-privilege-4]\" } ] } ] } ] } ``` + * @param fetchObjectPrivilegesRequest + */ + fetchObjectPrivileges(fetchObjectPrivilegesRequest, _options) { + const result = this.api.fetchObjectPrivileges(fetchObjectPrivilegesRequest, _options); + return result.toPromise(); + } + /** + * Version: 9.0.0.cl or later Fetches object permission details for a given principal object such as a user and group. Requires view access to the metadata object. #### Usage guidelines * To get a list of all metadata objects that a user or group can access, specify the `type` and GUID or name of the principal. * To get permission details for a specific object, add the `type` and GUID or name of the metadata object to your API request. Upon successful execution, the API returns a list of metadata objects and permission details for each object. + * @param fetchPermissionsOfPrincipalsRequest + */ + fetchPermissionsOfPrincipals(fetchPermissionsOfPrincipalsRequest, _options) { + const result = this.api.fetchPermissionsOfPrincipals(fetchPermissionsOfPrincipalsRequest, _options); + return result.toPromise(); + } + /** + * Version: 9.0.0.cl or later Fetches permission details for a given metadata object. Requires view access to the metadata object. #### Usage guidelines * To fetch a list of users and groups for a metadata object, specify `type` and GUID or name of the metadata object. * To get permission details for a specific user or group, add `type` and GUID or name of the principal object to your API request. Upon successful execution, the API returns permission details and principal information for the object specified in the API request. + * @param fetchPermissionsOnMetadataRequest + */ + fetchPermissionsOnMetadata(fetchPermissionsOnMetadataRequest, _options) { + const result = this.api.fetchPermissionsOnMetadata(fetchPermissionsOnMetadataRequest, _options); + return result.toPromise(); + } + /** + * Version: 26.3.0.cl or later This API allows the addition or deletion of object level privileges for a set of users and groups, on a set of metadata objects. It provides users to access certain features based on privilege based access control. #### Usage guidelines - Specify the `operation`. The supported operations are: `ADD`, `REMOVE`. - Specify the type of the objects on which the object privileges are being provided in `metadata_type`. Only `LOGICAL_TABLE` metadata type is supported for now. It may be extended for other metadata types in future. - Specify the list of object privilege types in the `object_privilege_types` array. The supported object privilege types are: `SPOTTER_COACHING_PRIVILEGE`. - Specify the identifiers (either GUID or name) for the metadata objects in the `metadata_identifiers` array. - Specify the `type` (`USER` or `USER_GROUP`) and `identifier` (either GUID or name) of the principals to which you want to apply the given operation and given object privileges in the `principals` array. - Ensure using correct Authorization Bearer Token corresponding to specific user & org. #### Example request ```json { \"operation\": \"operation-type\", \"metadata_type\": \"metadata-type\", \"object_privilege_types\": [\"privilege-type-1\", \"privilege-type-2\"], \"metadata_identifiers\": [\"metadata-guid-or-name-1\", \"metadata-guid-or-name-1\"], \"principals\": [ { \"type\": \"type-1\", \"identifier\": \"principal-guid-or-name-1\" }, { \"type\": \"type-2\", \"identifier\": \"principal-guid-or-name-2\" } ] } ``` > ###### Note: > * Only admin users, users with edit access and users with coaching privilege on a given data-model can add or remove principals related to SPOTTER_COACHING_PRIVILEGE + * @param manageObjectPrivilegeRequest + */ + manageObjectPrivilege(manageObjectPrivilegeRequest, _options) { + const result = this.api.manageObjectPrivilege(manageObjectPrivilegeRequest, _options); + return result.toPromise(); + } + /** + * Version: 26.5.0.cl or later Allows publishing metadata objects across organizations in ThoughtSpot. Requires ADMINISTRATION role and TENANT scope. The API endpoint allows publishing the following types of metadata objects: * Liveboards * Answers * Logical Tables This API will essentially share the objects along with it\'s dependencies to the org admins of the orgs to which it is being published. + * @param publishMetadataRequest + */ + publishMetadata(publishMetadataRequest, _options) { + const result = this.api.publishMetadata(publishMetadataRequest, _options); + return result.toPromise(); + } + /** + * Version: 9.0.0.cl or later Allows sharing one or several metadata objects with users and groups in ThoughtSpot. Requires edit access to the metadata object. #### Supported metadata objects: * Liveboards * Visualizations * Answers * Models * Views * Connections * Collections #### Object permissions You can provide `READ_ONLY` or `MODIFY` access when sharing an object with another user or group. The `READ_ONLY` permission grants view access to the shared object, whereas `MODIFY` provides edit access. To prevent a user or group from accessing the shared object, specify the GUID or name of the principal and set `shareMode` to `NO_ACCESS`. #### Sharing a visualization * Sharing a visualization implicitly shares the entire Liveboard with the recipient. * Object permissions set for a shared visualization also apply to the Liveboard unless overridden by another API request or via UI. * If email notifications for object sharing are enabled, a notification with a link to the shared visualization will be sent to the recipient’s email address. Although this link opens the shared visualization, recipients can also access other visualizations in the Liveboard. #### Sharing a collection Collections support **dual permissions** that provide fine-grained control: * **Collection permissions** (`share_mode`) - controls access to the collection itself (view, edit, delete the collection) * **Content permissions** (`content_share_mode`) - controls access to objects within the collection (view, edit objects inside) **Default Behavior:** - If only `share_mode` is specified, the content permissions default to `READ_ONLY` (except when `share_mode` is `NO_ACCESS`, then content also gets `NO_ACCESS`) - To give users edit access to collection contents, explicitly set `content_share_mode: \"MODIFY\"` ## Examples The following JSON examples can be copy-pasted as request bodies for the REST v2 API endpoint: ```bash POST /callosum/v1/v2/security/metadata/share Content-Type: application/x-www-form-urlencoded ``` ### Basic collection sharing Share a collection with read-only access: ```json { \"metadata_type\": \"COLLECTION\", \"metadata_identifiers\": [\"Sales Reports Collection\"], \"permissions\": [{ \"principal\": { \"type\": \"USER\", \"identifier\": \"alice@company.com\" }, \"share_mode\": \"READ_ONLY\" }], \"notification\": { \"message\": \"I\'ve shared the Sales Reports collection with you\", \"notify_on_share\": true } } ``` ### Collection sharing with dual permissions Share a collection with different permissions for the collection vs. its contents: ```json { \"metadata_type\": \"COLLECTION\", \"metadata_identifiers\": [\"Marketing Analytics\"], \"permissions\": [{ \"principal\": { \"type\": \"USER\", \"identifier\": \"bob@company.com\" }, \"share_mode\": \"MODIFY\", \"content_share_mode\": \"READ_ONLY\" }, { \"principal\": { \"type\": \"USER_GROUP\", \"identifier\": \"Marketing Team\" }, \"share_mode\": \"READ_ONLY\", \"content_share_mode\": \"READ_ONLY\" }], \"notification\": { \"emails\": [\"bob@company.com\"], \"message\": \"You can edit the collection but content is read-only\", \"enable_custom_url\": false, \"notify_on_share\": true }, \"has_lenient_discoverability\": false } ``` ### Multiple collections sharing Share multiple collections with different users: ```json { \"metadata\": [ { \"type\": \"COLLECTION\", \"identifier\": \"Q4 Reports\" }, { \"type\": \"COLLECTION\", \"identifier\": \"Executive Dashboard Collection\" } ], \"permissions\": [{ \"principal\": { \"type\": \"USER_GROUP\", \"identifier\": \"Executives\" }, \"share_mode\": \"MODIFY\" }, { \"principal\": { \"type\": \"USER\", \"identifier\": \"manager@company.com\" }, \"share_mode\": \"READ_ONLY\", \"content_share_mode\": \"MODIFY\" }], \"notification\": { \"message\": \"Sharing quarterly collections with leadership team\", \"notify_on_share\": true } } ``` ### Remove collection access Remove access to a collection by setting share_mode to NO_ACCESS: ```json { \"metadata_type\": \"COLLECTION\", \"metadata_identifiers\": [\"Confidential Reports\"], \"permissions\": [{ \"principal\": { \"type\": \"USER\", \"identifier\": \"former-employee@company.com\" }, \"share_mode\": \"NO_ACCESS\" }], \"notification\": { \"notify_on_share\": false } } ``` ### Collection Permission Scenarios **Scenario 1: Collection Admin** - `share_mode: MODIFY` + `content_share_mode: MODIFY` = Full control over collection and its contents **Scenario 2: Collection Curator** - `share_mode: MODIFY` + `content_share_mode: READ_ONLY` = Can manage collection structure but not edit contents **Scenario 3: Content Editor** - `share_mode: READ_ONLY` + `content_share_mode: MODIFY` = Can edit objects within collection but can\'t change collection itself **Scenario 4: Viewer** - `share_mode: READ_ONLY` + `content_share_mode: READ_ONLY` = View-only access to collection and contents + * @param shareMetadataRequest + */ + shareMetadata(shareMetadataRequest, _options) { + const result = this.api.shareMetadata(shareMetadataRequest, _options); + return result.toPromise(); + } + /** + * Version: 26.5.0.cl or later Allows unpublishing metadata objects from organizations in ThoughtSpot. Requires ADMINISTRATION role and TENANT scope. The API endpoint allows unpublishing the following types of metadata objects: * Liveboards * Answers * Logical Tables When unpublishing objects, you can: * Include dependencies by setting `include_dependencies` to true - this will unpublish all dependent objects if no other published object is using them * Force unpublish by setting `force` to true - this will break all dependent objects in the unpublished organizations + * @param unpublishMetadataRequest + */ + unpublishMetadata(unpublishMetadataRequest, _options) { + const result = this.api.unpublishMetadata(unpublishMetadataRequest, _options); + return result.toPromise(); + } + /** + * Version: 10.12.0.cl or later Creates, updates, or deletes column security rules for specified tables. This API endpoint allows you to create, update, or delete column-level security rules on columns of a table. The operation follows an \"all or none\" policy: if defining security rules for any of the provided columns fails, the entire operation will be rolled back, and no rules will be created. #### Usage guidelines - Provide table identifier using either `identifier` (GUID or name) or `obj_identifier` (object ID) - Use `clear_csr: true` to remove all column security rules from the table - For each column, specify the security rule using `column_security_rules` array - Use `is_unsecured: true` to mark a specific column as unprotected - Use `group_access` operations to manage group associations: - `ADD`: Add groups to the column\'s access list - `REMOVE`: Remove groups from the column\'s access list - `REPLACE`: Replace all existing groups with the specified groups #### Required permissions - `ADMINISTRATION` - Can administer ThoughtSpot - `DATAMANAGEMENT` - Can manage data (if RBAC is disabled) - `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` - Can manage worksheet views and tables (if RBAC is enabled) #### Example request ```json { \"identifier\": \"table-guid\", \"obj_identifier\": \"table-object-id\", \"clear_csr\": false, \"column_security_rules\": [ { \"column_identifier\": \"col id or col name\", \"is_unsecured\": false, \"group_access\": [ { \"operation\": \"ADD\", \"group_identifiers\": [\"hr_group_id\", \"hr_group_name\", \"finance_group_id\"] } ] }, { \"column_identifier\": \"col id or col name\", \"is_unsecured\": true }, { \"column_identifier\": \"col id or col name\", \"is_unsecured\": false, \"group_access\": [ { \"operation\": \"REPLACE\", \"group_identifiers\": [\"management_group_id\", \"management_group_name\"] } ] } ] } ``` #### Request Body Schema - `identifier` (string, optional): GUID or name of the table for which we want to create column security rules - `obj_identifier` (string, optional): The object ID of the table - `clear_csr` (boolean, optional): If true, then all the secured columns will be marked as unprotected, and all the group associations will be removed - `column_security_rules` (array of objects, required): An array where each object defines the security rule for a specific column Each column security rule object contains: - `column_identifier` (string, required): Column identifier (col_id or name) - `is_unsecured` (boolean, optional): If true, the column will be marked as unprotected and all groups associated with it will be removed - `group_access` (array of objects, optional): Array of group operation objects Each group operation object contains: - `operation` (string, required): Operation type - ADD, REMOVE, or REPLACE - `group_identifiers` (array of strings, required): Array of group identifiers (name or GUID) on which the operation will be performed #### Response This API does not return any response body. A successful operation returns HTTP 200 status code. #### Operation Types - **ADD**: Adds the specified groups to the column\'s access list - **REMOVE**: Removes the specified groups from the column\'s access list - **REPLACE**: Replaces all existing groups with the specified groups + * @param updateColumnSecurityRulesRequest + */ + updateColumnSecurityRules(updateColumnSecurityRulesRequest, _options) { + const result = this.api.updateColumnSecurityRules(updateColumnSecurityRulesRequest, _options); + return result.toPromise(); + } +}; +var PromiseSystemApi = class { + constructor(configuration, requestFactory, responseProcessor) { + this.api = new ObservableSystemApi(configuration, requestFactory, responseProcessor); + } + /** + * Version: 10.14.0.cl or later Configure communication channel preferences. - Use `cluster_preferences` to update the default preferences for your ThoughtSpot application instance. - If your instance has [Orgs](https://docs.thoughtspot.com/cloud/latest/orgs-overview), use `org_preferences` to specify Org-specific preferences that override the defaults. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) or `DEVELOPER` (**Has developer privilege**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, users with `APPLICATION_ADMINISTRATION` (**Can manage application settings**) privilege are also authorized to perform this action. + * @param configureCommunicationChannelPreferencesRequest + */ + configureCommunicationChannelPreferences(configureCommunicationChannelPreferencesRequest, _options) { + const result = this.api.configureCommunicationChannelPreferences(configureCommunicationChannelPreferencesRequest, _options); + return result.toPromise(); + } + /** + * Version: 26.2.0.cl or later Configure security settings for your ThoughtSpot application instance. - Use `cluster_preferences` to update cluster-level security settings including CORS whitelisted URLs, CSP settings, SAML redirect URLs, partitioned cookies, and non-embed access configuration. - Use `org_preferences` to configure Org-specific security settings. If your instance has [Orgs](https://docs.thoughtspot.com/cloud/latest/orgs-overview), this allows configuring CORS and non-embed access settings specific to the Org. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) or `DEVELOPER` (**Has developer privilege**) privilege. Cluster-level SAML and script-src settings require `ADMINISTRATION` privilege. See [Security Settings](https://developers.thoughtspot.com/docs/security-settings) for more details. + * @param configureSecuritySettingsRequest + */ + configureSecuritySettings(configureSecuritySettingsRequest, _options) { + const result = this.api.configureSecuritySettings(configureSecuritySettingsRequest, _options); + return result.toPromise(); + } + /** + * Version: 9.0.0.cl or later Retrieves the current configuration details of the cluster. If the request is successful, the API returns a list configuration settings applied on the cluster. Requires `ADMINISTRATION`(**Can administer ThoughtSpot**) privilege to view these complete configuration settings of the cluster. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `SYSTEM_INFO_ADMINISTRATION` (**Can view system activities**) privilege is required. This API does not require any parameters to be passed in the request. + */ + getSystemConfig(_options) { + const result = this.api.getSystemConfig(_options); + return result.toPromise(); + } + /** + * Version: 9.0.0.cl or later Gets system information such as the release version, locale, time zone, deployment environment, date format, and date time format of the cluster. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privileges. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `SYSTEM_INFO_ADMINISTRATION` (**Can view system activities**) privilege is required. This API does not require any parameters to be passed in the request. + */ + getSystemInformation(_options) { + const result = this.api.getSystemInformation(_options); + return result.toPromise(); + } + /** + * Version: 9.2.0.cl or later Gets a list of configuration overrides applied on the cluster. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `APPLICATION_ADMINISTRATION` (**Can manage application settings**) privilege is required. This API does not require any parameters to be passed in the request. + */ + getSystemOverrideInfo(_options) { + const result = this.api.getSystemOverrideInfo(_options); + return result.toPromise(); + } + /** + * Version: 10.14.0.cl or later Fetch communication channel preferences. - Use `cluster_preferences` to fetch the default preferences for your ThoughtSpot application instance. - If your instance has [Orgs](https://docs.thoughtspot.com/cloud/latest/orgs-overview), use `org_preferences` to fetch any Org-specific preferences that override the defaults. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) or `DEVELOPER` (**Has developer privilege**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, users with `APPLICATION_ADMINISTRATION` (**Can manage application settings**) privilege are also authorized to perform this action. + * @param searchCommunicationChannelPreferencesRequest + */ + searchCommunicationChannelPreferences(searchCommunicationChannelPreferencesRequest, _options) { + const result = this.api.searchCommunicationChannelPreferences(searchCommunicationChannelPreferencesRequest, _options); + return result.toPromise(); + } + /** + * Version: 26.2.0.cl or later Fetch security settings for your ThoughtSpot application instance. - Use `scope: CLUSTER` to retrieve cluster-level security settings, including CORS and CSP allowlists, SAML redirect URLs, and settings that control access to non-embedded pages. - Use `scope: ORG` to retrieve Org-level security settings. If your instance has [Orgs](https://docs.thoughtspot.com/cloud/latest/orgs-overview), this returns CORS and non-embed access settings specific to the Org. - If `scope` is not specified, returns both cluster and Org-specific settings based on user privileges. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) or `DEVELOPER` (**Has developer privilege**) privilege. See [Security Settings](https://developers.thoughtspot.com/docs/security-settings) for more details. + * @param searchSecuritySettingsRequest + */ + searchSecuritySettings(searchSecuritySettingsRequest, _options) { + const result = this.api.searchSecuritySettings(searchSecuritySettingsRequest, _options); + return result.toPromise(); + } + /** + * Version: 9.2.0.cl or later Updates the current configuration of the cluster. You must send the configuration data in JSON format. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privileges. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `APPLICATION_ADMINISTRATION` (**Can manage application settings**) privilege is required. + * @param updateSystemConfigRequest + */ + updateSystemConfig(updateSystemConfigRequest, _options) { + const result = this.api.updateSystemConfig(updateSystemConfigRequest, _options); + return result.toPromise(); + } + /** + * Version: 26.4.0.cl or later Validates a communication channel configuration to ensure it is properly set up and can receive events. - Use `channel_type` to specify the type of communication channel to validate (e.g., WEBHOOK). - Use `channel_identifier` to provide the unique identifier or name for the communication channel. - Use `event_type` to specify the event type to validate for this channel. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) or `DEVELOPER` (**Has developer privilege**) privilege. For webhook channels, users with `CAN_MANAGE_WEBHOOKS` (**Can manage webhooks**) privilege are also authorized to perform this action. + * @param validateCommunicationChannelRequest + */ + validateCommunicationChannel(validateCommunicationChannelRequest, _options) { + const result = this.api.validateCommunicationChannel(validateCommunicationChannelRequest, _options); + return result.toPromise(); + } +}; +var PromiseTagsApi = class { + constructor(configuration, requestFactory, responseProcessor) { + this.api = new ObservableTagsApi(configuration, requestFactory, responseProcessor); + } + /** + * Version: 9.0.0.cl or later Assigns tags to Liveboards, Answers, Tables, and Worksheets. Requires edit access to the metadata object. + * @param assignTagRequest + */ + assignTag(assignTagRequest, _options) { + const result = this.api.assignTag(assignTagRequest, _options); + return result.toPromise(); + } + /** + * Version: 9.0.0.cl or later Creates a tag object. Tags are labels that identify a metadata object. For example, you can create a tag to designate subject areas, such as sales, HR, marketing, and finance. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `TAGMANAGEMENT` (**Can manage tags**) privilege is required to create, edit, and delete tags. + * @param createTagRequest + */ + createTag(createTagRequest, _options) { + const result = this.api.createTag(createTagRequest, _options); + return result.toPromise(); + } + /** + * Version: 9.0.0.cl or later Deletes a tag object from the ThoughtSpot system Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `TAGMANAGEMENT` (**Can manage tags**) privilege is required to create, edit, and delete tags. + * @param tagIdentifier Tag identifier Tag name or Tag id. + */ + deleteTag(tagIdentifier, _options) { + const result = this.api.deleteTag(tagIdentifier, _options); + return result.toPromise(); + } + /** + * Version: 9.0.0.cl or later Gets a list of tag objects available on the ThoughtSpot system. To get details of a specific tag object, specify the GUID or name. Any authenticated user can search for tag objects. + * @param searchTagsRequest + */ + searchTags(searchTagsRequest, _options) { + const result = this.api.searchTags(searchTagsRequest, _options); + return result.toPromise(); + } + /** + * Version: 9.0.0.cl or later Removes the tags applied to a Liveboard, Answer, Table, or Worksheet. Requires edit access to the metadata object. + * @param unassignTagRequest + */ + unassignTag(unassignTagRequest, _options) { + const result = this.api.unassignTag(unassignTagRequest, _options); + return result.toPromise(); + } + /** + * Version: 9.0.0.cl or later Updates a tag object. You can modify the `name` and `color` properties of a tag object. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `TAGMANAGEMENT` (**Can manage tags**) privilege is required to create, edit, and delete tags. + * @param tagIdentifier Name or Id of the tag. + * @param updateTagRequest + */ + updateTag(tagIdentifier, updateTagRequest, _options) { + const result = this.api.updateTag(tagIdentifier, updateTagRequest, _options); + return result.toPromise(); + } +}; +var PromiseThoughtSpotRestApi = class { + constructor(configuration, requestFactory, responseProcessor) { + this.api = new ObservableThoughtSpotRestApi(configuration, requestFactory, responseProcessor); + } + /** + * Version: 9.7.0.cl or later Activates a deactivated user account. Requires `ADMINISTRATION` (**Can administer Thoughtspot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `USER_ADMINISTRATION` (**Can manage users**) privilege is required. To activate an inactive user account, the API request body must include the following information: - Username or the GUID of the user account. - Auth token generated for the deactivated user. The auth token is sent in the API response when a user is deactivated. - Password for the user account. + * @param activateUserRequest + */ + activateUser(activateUserRequest, _options) { + const result = this.api.activateUser(activateUserRequest, _options); + return result.toPromise(); + } + /** + * Version: 9.0.0.cl or later Transfers the ownership of one or several objects from one user to another. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `USER_ADMINISTRATION` (**Can manage users**) privilege and edit access to the objects are required. + * @param assignChangeAuthorRequest + */ + assignChangeAuthor(assignChangeAuthorRequest, _options) { + const result = this.api.assignChangeAuthor(assignChangeAuthorRequest, _options); + return result.toPromise(); + } + /** + * Version: 9.0.0.cl or later Assigns tags to Liveboards, Answers, Tables, and Worksheets. Requires edit access to the metadata object. + * @param assignTagRequest + */ + assignTag(assignTagRequest, _options) { + const result = this.api.assignTag(assignTagRequest, _options); + return result.toPromise(); + } + /** + * Version: 9.0.0.cl or later Updates the current password of the user. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `USER_ADMINISTRATION` (**Can manage users**) privilege is required. + * @param changeUserPasswordRequest + */ + changeUserPassword(changeUserPasswordRequest, _options) { + const result = this.api.changeUserPassword(changeUserPasswordRequest, _options); + return result.toPromise(); + } + /** + * Version: 9.2.0.cl or later Commits TML files of metadata objects to the Git branch configured on your instance. Requires at least edit access to objects used in the commit operation. Before using this endpoint to push your commits: * Enable Git integration on your instance. * Make sure the Git repository and branch details are configured on your instance. For more information, see [Git integration documentation](https://developers.thoughtspot.com/docs/git-integration). + * @param commitBranchRequest + */ + commitBranch(commitBranchRequest, _options) { + const result = this.api.commitBranch(commitBranchRequest, _options); + return result.toPromise(); + } + /** + * Version: 26.6.0.cl or later Enables or disables authentication at cluster or org level for the specified auth type. Currently supports `TRUSTED_AUTH`. #### Required privileges Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) or `CONTROL_TRUSTED_AUTH` (**Can Enable or Disable Trusted Authentication**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled, the `CONTROL_TRUSTED_AUTH` privilege is required. #### Usage guidelines Use `cluster_preferences` to enable or disable authentication at the cluster level. Cluster-level settings can only be configured from the Primary Org. - `ENABLED` — Generates a new access token if one does not exist. An existing token is preserved. - `DISABLED` — Revokes the existing cluster-level access token. Use `org_preferences` to enable or disable authentication for one or more Orgs. Each entry must include an `org_identifier` (unique ID or name) and an `auth_status`. Org-level configuration requires the per-Org authentication feature to be enabled on your instance. - `ENABLED` — Generates a new org-level access token if one does not exist. - `DISABLED` — Revokes the existing org-level access token for that Org. Both `cluster_preferences` and `org_preferences` are optional. Omitting a field leaves the corresponding settings unchanged. If both are omitted, the API returns `204 No Content` without making any changes. **Note**: Cluster-level and org-level settings are independent of each other. Enabling or disabling one does not affect the other. + * @param configureAuthSettingsRequest + */ + configureAuthSettings(configureAuthSettingsRequest, _options) { + const result = this.api.configureAuthSettings(configureAuthSettingsRequest, _options); + return result.toPromise(); + } + /** + * Version: 10.14.0.cl or later Configure communication channel preferences. - Use `cluster_preferences` to update the default preferences for your ThoughtSpot application instance. - If your instance has [Orgs](https://docs.thoughtspot.com/cloud/latest/orgs-overview), use `org_preferences` to specify Org-specific preferences that override the defaults. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) or `DEVELOPER` (**Has developer privilege**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, users with `APPLICATION_ADMINISTRATION` (**Can manage application settings**) privilege are also authorized to perform this action. + * @param configureCommunicationChannelPreferencesRequest + */ + configureCommunicationChannelPreferences(configureCommunicationChannelPreferencesRequest, _options) { + const result = this.api.configureCommunicationChannelPreferences(configureCommunicationChannelPreferencesRequest, _options); + return result.toPromise(); + } + /** + * Version: 26.2.0.cl or later Configure security settings for your ThoughtSpot application instance. - Use `cluster_preferences` to update cluster-level security settings including CORS whitelisted URLs, CSP settings, SAML redirect URLs, partitioned cookies, and non-embed access configuration. - Use `org_preferences` to configure Org-specific security settings. If your instance has [Orgs](https://docs.thoughtspot.com/cloud/latest/orgs-overview), this allows configuring CORS and non-embed access settings specific to the Org. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) or `DEVELOPER` (**Has developer privilege**) privilege. Cluster-level SAML and script-src settings require `ADMINISTRATION` privilege. See [Security Settings](https://developers.thoughtspot.com/docs/security-settings) for more details. + * @param configureSecuritySettingsRequest + */ + configureSecuritySettings(configureSecuritySettingsRequest, _options) { + const result = this.api.configureSecuritySettings(configureSecuritySettingsRequest, _options); + return result.toPromise(); + } + /** + * Version: 10.12.0.cl or later Gets connection configuration objects. Requires `DATAMANAGEMENT` (**Can manage data**) and edit permissions to the connection object, or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) privilege is required. #### Usage guidelines * To get a list of all configurations available in the ThoughtSpot system, send the API request with only the connection name or GUID in the request body. * To fetch details of a configuration object, specify the configuration object name or GUID. + * @param connectionConfigurationSearchRequest + */ + connectionConfigurationSearch(connectionConfigurationSearchRequest, _options) { + const result = this.api.connectionConfigurationSearch(connectionConfigurationSearchRequest, _options); + return result.toPromise(); + } + /** + * Convert worksheets to models Version: 10.6.0.cl or later ## Prerequisites - **Privileges Required:** - `DATAMANAGEMENT` (Can manage data) or `ADMINISTRATION` (Can administer ThoughtSpot). - **Additional Privileges (if RBAC is enabled):** - `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` (Can manage data models). --- ## Usage Guidelines ### Parameters 1. **worksheet_ids** - **Description:** A comma-separated list of GUIDs (Globally Unique Identifiers) specifying the Worksheets to be converted. - **Usage:** - Used only when `convert_all` is set to `false`. - Leave empty or omit when `convert_all` is set to `true`. 2. **exclude_worksheet_ids** - **Description:** A comma-separated list of GUIDs specifying Worksheets to be excluded from conversion. - **Usage:** - Useful when `convert_all` is set to `true` and specific Worksheets should not be converted. 3. **convert_all** - **Description:** Sets the scope of conversion. - **Options:** - `true`: Converts all Worksheets in the system, except those specified in `exclude_worksheet_ids`. - `false`: Converts only the Worksheets listed in `worksheet_ids`. 4. **apply_changes** - **Description:** Specifies whether to apply changes directly to ThoughtSpot or to generate a preview before applying any changes.Used for validation of conversion. - **Options:** - `true`: Applies conversion changes directly to ThoughtSpot. - `false`: Generates only a preview of the changes and does not apply any changes to ThoughtSpot --- ## Best Practices 1. **Backup Before Conversion:** Always export metadata as a backup before initiating the conversion process 2. **Partial Conversion for Testing:** Test the conversion process by setting `convert_all` to `false` and specifying a small number of `worksheet_ids`. 3. **Verify Dependencies:** Check for dependent objects, such as Tables and Connections, to avoid invalid references. 4. **Review Changes:** Use `apply_changes: false` to preview the impact of the conversion before applying changes. --- ## Examples ### Convert Specific Worksheets ```json { \"worksheet_ids\": [\"guid1\", \"guid2\", \"guid3\"], \"exclude_worksheet_ids\": [], \"convert_all\": false, \"apply_changes\": true } ``` ### Convert All Accessible Worksheets ```json { \"worksheet_ids\": [], \"exclude_worksheet_ids\": [], \"convert_all\": true, \"apply_changes\": true } ``` ### Exclude Specific Worksheets While Converting All Accessible Worksheets ```json { \"worksheet_ids\": [], \"exclude_worksheet_ids\": [\"abc\"], \"convert_all\": true, \"apply_changes\": true } ``` + * @param convertWorksheetToModelRequest + */ + convertWorksheetToModel(convertWorksheetToModelRequest, _options) { + const result = this.api.convertWorksheetToModel(convertWorksheetToModelRequest, _options); + return result.toPromise(); + } + /** + * Makes a copy of an Answer or Liveboard Version: 10.3.0.cl or later Creates a copy of a metadata object. Requires at least view access to the metadata object being copied. Upon successful execution, the API creates a copy of the metadata object specified in the API request and returns the ID of the new object. + * @param copyObjectRequest + */ + copyObject(copyObjectRequest, _options) { + const result = this.api.copyObject(copyObjectRequest, _options); + return result.toPromise(); + } + /** + * Version: 26.2.0.cl or later Creates a new Spotter agent conversation based on the provided context and settings. The endpoint was in Beta from 26.2.0.cl through 26.4.0.cl. Requires `CAN_USE_SPOTTER` privilege and at least view access to the metadata object specified in the request. #### Usage guidelines The request must include the `metadata_context` parameter to define the conversation context. The context type can be one of: - `DATA_SOURCE` *(available from 26.5.0.cl)*: targets a specific data source. Provide `data_source_identifier` in `data_source_context` for a single data source, or `data_source_identifiers` for multi-data-source context. The deprecated `guid` field is accepted for backwards compatibility. - `AUTO_MODE` *(available from 26.5.0.cl)*: automatically discovers and selects the most relevant datasets for the user\'s queries. > **Note for callers on versions 26.2.0.cl – 26.4.0.cl (Beta):** use the lowercase `data_source` enum value with the `guid` field instead of the above. Example: `{ \"type\": \"data_source\", \"data_source_context\": { \"guid\": \"\" } }`. The `conversation_settings` parameter controls which Spotter capabilities are enabled for the conversation: - `enable_contextual_change_analysis` (default: `true`, **deprecated from 26.2.0.cl**) — always enabled in Spotter 3; setting this to `false` has no effect on versions >= 26.2.0.cl - `enable_natural_language_answer_generation` (default: `true`, **deprecated from 26.2.0.cl**) — always enabled in Spotter 3; setting this to `false` has no effect on versions >= 26.2.0.cl - `enable_reasoning` (default: `true`, **deprecated from 26.2.0.cl**) — always enabled in Spotter 3; setting this to `false` has no effect on versions >= 26.2.0.cl - `enable_save_chat` (default: `false`, *available from 26.5.0.cl*) — enables saving the conversation for later retrieval via conversation history If the request is successful, the response includes a unique `conversation_identifier` that must be passed to `sendAgentConversationMessage` or `sendAgentConversationMessageStreaming` to send messages within this conversation. The response also includes `conversation_id` with the same value for backwards compatibility; use `conversation_identifier` for new integrations. #### Example request ```json { \"metadata_context\": { \"type\": \"DATA_SOURCE\", \"data_source_context\": { \"data_source_identifier\": \"a1b2c3d4-e5f6-7890-abcd-ef1234567890\" } }, \"conversation_settings\": {} } ``` #### Error responses | Code | Description | | ---- | --------------------------------------------------------------------------------------------------------------------------------------- | | 401 | Unauthorized — authentication token is missing, expired, or invalid. | | 403 | Forbidden — the authenticated user does not have `CAN_USE_SPOTTER` privilege or lacks view permission on the specified metadata object. | > ###### Note: > > - This endpoint was in Beta from 26.2.0.cl through 26.4.0.cl and is Generally Available from version 26.5.0.cl. > - This endpoint requires Spotter - please contact ThoughtSpot support to enable Spotter on your cluster. + * @param createAgentConversationRequest + */ + createAgentConversation(createAgentConversationRequest, _options) { + const result = this.api.createAgentConversation(createAgentConversationRequest, _options); + return result.toPromise(); + } + /** + * Version: 10.12.0.cl or later Creates a new [custom calendar](https://docs.thoughtspot.com/cloud/latest/connections-cust-cal). Requires `DATAMANAGEMENT` (**Can manage data**) or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your ThoughtSpot instance, the `CAN_MANAGE_CUSTOM_CALENDAR` (**Can manage custom calendars**) privilege is required. #### Usage guidelines You can create a custom calendar from scratch or an existing Table in ThoughtSpot. For both methods of calendar creation, the following parameters are required: * Name of the custom calendar. * Calendar creation method. To create a calendar from an existing table, specify the method: - `FROM_EXISTING_TABLE` - Creates calendar from the table reference provided in the API request. - `FROM_INPUT_PARAMS` - Creates a calendar from the parameters defined in the API request. * Connection ID and Table name * Database and schema name attributes: For most Cloud Data Warehouse (CDW) connectors, both `database_name` and `schema_name` attributes are required. However, the attribute requirements are conditional and vary based on the connector type and its metadata structure. For example, for connectors such as Teradata, MySQL, SingleSore, Amazon Aurora MySQL, Amazon RDS MySQL, Oracle, and GCP_MYSQL, the `schema_name` is required, whereas the `database_name` attribute is not. Similarly, connectors such as ClickHouse require you to specify the `database_name` and the schema specification in such cases is optional. **NOTE**: If you are creating a calendar from an existing table, ensure that the referenced table matches the required DDL for custom calendars. If the schema does not match, the API returns an error. ##### Calendar type The API allows you to create the following types of calendars: * `MONTH_OFFSET`. The default calendar type. A `MONTH_OFFSET` calendar is offset by a few months from the standard calendar months (January to December) and the year begins with the month defined in the request. For example, if the `month_offset` value is set as `April`, the calendar year begins in April. * `4-4-5`. Each quarter in the calendar will include two 4-week months followed by one 5-week month. * `4-5-4`. Each quarter in the calendar will include two 4-week months with a 5-week month between. * `5-4-4`. Each quarter begins with a 5-week month, followed by two 4-week months. To start and end the calendar on a specific date, specify the dates in the `MM/DD/YYYY` format. For `MONTH_OFFSET` calendars, ensure that the `start_date` matches the month specified in the `month_offset` attribute. You can also set the starting day of the week and customize the prefixes for year and quarter labels. #### Examples To create a calendar from an existing table: ``` { \"name\": \"MyCustomCalendar1\", \"table_reference\": { \"connection_identifier\": \"4db8ea22-2ff4-4224-b05a-26674717e468\", \"table_name\": \"MyCalendarTable\", \"database_name\": \"RETAILAPPAREL\", \"schema_name\": \"PUBLIC\" }, \"creation_method\": \"FROM_EXISTING_TABLE\", } ``` To create a calendar from scratch: ``` { \"name\": \"MyCustomCalendar1\", \"table_reference\": { \"connection_identifier\": \"4db8ea22-2ff4-4224-b05a-26674717e468\", \"table_name\": \"MyCalendarTable\", \"database_name\": \"RETAILAPPAREL\", \"schema_name\": \"PUBLIC\" }, \"creation_method\": \"FROM_INPUT_PARAMS\", \"calendar_type\": \"MONTH_OFFSET\", \"month_offset\": \"April\", \"start_day_of_week\": \"Monday\", \"quarter_name_prefix\": \"Q\", \"year_name_prefix\": \"FY\", \"start_date\": \"04/01/2025\", \"end_date\": \"04/31/2025\" } ``` + * @param createCalendarRequest + */ + createCalendar(createCalendarRequest, _options) { + const result = this.api.createCalendar(createCalendarRequest, _options); + return result.toPromise(); + } + /** + * Version: 26.4.0.cl or later Creates a new collection in ThoughtSpot. Collections allow you to organize and group related metadata objects such as Liveboards, Answers, worksheets, and other data objects. You can also create nested collections (sub-collections) to build a hierarchical structure. #### Supported operations The API endpoint lets you perform the following operations: * Create a new collection * Add metadata objects (Liveboards, Answers, Logical Tables) to the collection * Create nested collections by adding sub-collections + * @param createCollectionRequest + */ + createCollection(createCollectionRequest, _options) { + const result = this.api.createCollection(createCollectionRequest, _options); + return result.toPromise(); + } + /** + * Version: 9.2.0.cl or later Allows you to connect a ThoughtSpot instance to a Git repository. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance on your instance, the `CAN_SETUP_VERSION_CONTROL` (**Can set up version control**) privilege. You can use this API endpoint to connect your ThoughtSpot development and production environments to the development and production branches of a Git repository. Before using this endpoint to connect your ThoughtSpot instance to a Git repository, check the following prerequisites: * You have a Git repository. If you are using GitHub, make sure you have a valid account and an access token to connect ThoughtSpot to GitHub. For information about generating a token, see [GitHub Documentation](https://docs.github.com/en/authentication/keeping-your-account-and-data-secure/managing-your-personal-access-tokens). * Your access token has `repo` scope that grants full access to public and private repositories. * Your Git repository has a branch that can be configured as a default branch in ThoughtSpot. For more information, see [Git integration documentation](https://developers.thoughtspot.com/docs/?pageid=git-integration). **Note**: ThoughtSpot supports only GitHub / itHub Enterprise for CI/CD. + * @param createConfigRequest + */ + createConfig(createConfigRequest, _options) { + const result = this.api.createConfig(createConfigRequest, _options); + return result.toPromise(); + } + /** + * Version: 9.2.0.cl or later Creates a connection to a data warehouse for live query services. Requires `DATAMANAGEMENT` (**Can manage data**) or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) privilege is required. #### Create a connection without tables To create a connection without tables: 1. Pass these parameters in your API request. * Name of the connection. * Type of the data warehouse to connect to. * A JSON map of configuration attributes in `data_warehouse_config`. The following example shows the configuration attributes for a SnowFlake connection: ``` { \"configuration\":{ \"accountName\":\"thoughtspot_partner\", \"user\":\"tsadmin\", \"password\":\"TestConn123\", \"role\":\"sysadmin\", \"warehouse\":\"MEDIUM_WH\" }, \"authenticationType\": \"SERVICE_ACCOUNT\", \"externalDatabases\":[ ] } ``` 2. Set `validate` to `false`. **NOTE:** If the `authentication_type` is anything other than SERVICE_ACCOUNT, you must explicitly provide the authenticationType property in the payload. If you do not specify authenticationType, the API will default to SERVICE_ACCOUNT as the authentication type. #### Create a connection with tables If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) and `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` (**Can manage data models**) privilege is required. To create a connection with tables: 1. Pass these parameters in your API request. * Name of the connection. * Type of the data warehouse to connect to. * A JSON map of configuration attributes, database details, and table properties in `data_warehouse_config` as shown in the following example: ``` { \"configuration\":{ \"accountName\":\"thoughtspot_partner\", \"user\":\"tsadmin\", \"password\":\"TestConn123\", \"role\":\"sysadmin\", \"warehouse\":\"MEDIUM_WH\" }, \"authenticationType\": \"SERVICE_ACCOUNT\", \"externalDatabases\":[ { \"name\":\"AllDatatypes\", \"isAutoCreated\":false, \"schemas\":[ { \"name\":\"alldatatypes\", \"tables\":[ { \"name\":\"allDatatypes\", \"type\":\"TABLE\", \"description\":\"\", \"selected\":true, \"linked\":true, \"columns\":[ { \"name\":\"CNUMBER\", \"type\":\"INT64\", \"canImport\":true, \"selected\":true, \"isLinkedActive\":true, \"isImported\":false, \"tableName\":\"allDatatypes\", \"schemaName\":\"alldatatypes\", \"dbName\":\"AllDatatypes\" }, { \"name\":\"CDECIMAL\", \"type\":\"INT64\", \"canImport\":true, \"selected\":true, \"isLinkedActive\":true, \"isImported\":false, \"tableName\":\"allDatatypes\", \"schemaName\":\"alldatatypes\", \"dbName\":\"AllDatatypes\" } ] } ] } ] } ] } ``` 2. Set `validate` to `true`. **NOTE:** If the `authentication_type` is anything other than SERVICE_ACCOUNT, you must explicitly provide the authenticationType property in the payload. If you do not specify authenticationType, the API will default to SERVICE_ACCOUNT as the authentication type. + * @param createConnectionRequest + */ + createConnection(createConnectionRequest, _options) { + const result = this.api.createConnection(createConnectionRequest, _options); + return result.toPromise(); + } + /** + * Version: 10.12.0.cl or later Creates an additional configuration to an existing connection to a data warehouse. Requires `DATAMANAGEMENT` (**Can manage data**) or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) privilege is required. #### Usage guidelines * A JSON map of configuration attributes in `configuration`. The following example shows the configuration attributes: ``` { \"user\":\"DEV_USER\", \"password\":\"TestConn123\", \"role\":\"DEV\", \"warehouse\":\"DEV_WH\" } ``` * If the `policy_type` is `PRINCIPALS`, then `policy_principals` is a required field. * If the `policy_type` is `PROCESSES`, then `policy_processes` is a required field. * If the `policy_type` is `NO_POLICY`, then `policy_principals` and `policy_processes` are not required fields. #### Parameterized Connection Support For parameterized connections that use OAuth authentication, only the same_as_parent and policy_process_options attributes are allowed in the API request. These attributes are not applicable to connections that are not parameterized. + * @param createConnectionConfigurationRequest + */ + createConnectionConfiguration(createConnectionConfigurationRequest, _options) { + const result = this.api.createConnectionConfiguration(createConnectionConfigurationRequest, _options); + return result.toPromise(); + } + /** + * Version: 10.4.0.cl or later Creates a new conversation session tied to a specific data model for AI-driven natural language querying. Requires `CAN_USE_SPOTTER` privilege and at least view access to the metadata object specified in the request. #### Usage guidelines The request must include: - `metadata_identifier`: the unique ID of the data source that provides context for the conversation Optionally, you can provide: - `tokens`: a token string to set initial context for the conversation (e.g., `\"[sales],[item type],[state]\"`) If the request is successful, ThoughtSpot returns a unique `conversation_identifier` that must be passed to `sendMessage` to continue the conversation. #### Error responses | Code | Description | |------|-------------| | 401 | Unauthorized — authentication token is missing, expired, or invalid. | | 403 | Forbidden — the authenticated user does not have `CAN_USE_SPOTTER` privilege or lacks view permission on the specified metadata object. | > ###### Note: > * This endpoint is currently in Beta. Breaking changes may be introduced before the endpoint is made Generally Available. > * This endpoint requires Spotter - please contact ThoughtSpot support to enable Spotter on your cluster. + * @param createConversationRequest + */ + createConversation(createConversationRequest, _options) { + const result = this.api.createConversation(createConversationRequest, _options); + return result.toPromise(); + } + /** + * Version: 9.6.0.cl or later Creates a custom action that appears as a menu action on a saved Answer or Liveboard visualization. Requires `DEVELOPER` (**Has Developer privilege**) or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `DEVELOPER` (**Has developer privilege**) privilege is required. #### Usage Guidelines The API lets you create the following types of custom actions: * URL-based action Allows pushing data to an external URL. * Callback action Triggers a callback to the host application and initiates a response payload on an embedded ThoughtSpot instance. By default, custom actions are visible to only administrator or developer users. To make a custom action available to other users, and specify the groups in `group_identifiers`. By default, the custom action is set as a _global_ action on all visualizations and saved Answers. To assign a custom action to specific Liveboard visualization, saved Answer, or Worksheet, set `visibility` to `false` in `default_action_config` property and specify the GUID or name of the object in `associate_metadata`. For more information, see [Custom actions](https://developers.thoughtspot.com/docs/custom-action-intro). + * @param createCustomActionRequest + */ + createCustomAction(createCustomActionRequest, _options) { + const result = this.api.createCustomAction(createCustomActionRequest, _options); + return result.toPromise(); + } + /** + * Version: 10.10.0.cl or later Creates a customization configuration for the notification email. #### Pre-requisites Requires `DEVELOPER` (**has developer privilege**) or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `DEVELOPER` (**Has developer privilege**) privilege is required. **NOTE**:This endpoint in currently in beta. Contact ThoughtSpot support to enable this on your instance. #### Usage guidelines To create a custom configuration pass these parameters in your API request: - A JSON map of configuration attributes `template_properties`. The following example shows a sample set of customization configuration: ``` { { \"cta_button_bg_color\": \"#444DEA\", \"cta_text_font_color\": \"#FFFFFF\", \"primary_bg_color\": \"#D3DEF0\", \"logo_url\": \"https://storage.pardot.com/710713/1642089901EbkRibJq/TS_fullworkmark_darkmode.png\", \"font_family\": \"\", \"product_name\": \"ThoughtSpot\", \"footer_address\": \"444 Castro St, Suite 1000 Mountain View, CA 94041\", \"footer_phone\": \"(800) 508-7008\", \"replacement_value_for_liveboard\": \"Dashboard\", \"replacement_value_for_answer\": \"Chart\", \"replacement_value_for_spot_iq\": \"AI Insights\", \"hide_footer_phone\": false, \"hide_footer_address\": false, \"hide_product_name\": false, \"hide_manage_notification\": false, \"hide_mobile_app_nudge\": false, \"hide_privacy_policy\": false, \"hide_ts_vocabulary_definitions\": false, \"hide_error_message\": false, \"hide_unsubscribe_link\": false, \"hide_notification_status\": false, \"hide_modify_alert\": false, \"company_website_url\": \"https://your-website.com/\", \"company_privacy_policy_url\" : \"https://link-to-privacy-policy.com/\", \"contact_support_url\": \"https://link-to-contact-support.com/\", \"hide_contact_support_url\": false, \"hide_logo_url\" : false } } ``` + * @param createEmailCustomizationRequest + */ + createEmailCustomization(createEmailCustomizationRequest, _options) { + const result = this.api.createEmailCustomization(createEmailCustomizationRequest, _options); + return result.toPromise(); + } + /** + * Version: 9.0.0.cl or later Creates an Org object. To use this API, the [Orgs](https://docs.thoughtspot.com/cloud/latest/orgs-overview) feature must be enabled in your cluster. Requires cluster administration (**Can administer Org**) privileges. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `ORG_ADMINISTRATION` (**Can manage Orgs**) privilege is required. + * @param createOrgRequest + */ + createOrg(createOrgRequest, _options) { + const result = this.api.createOrg(createOrgRequest, _options); + return result.toPromise(); + } + /** + * Version: 9.5.0.cl or later Creates a Role object in ThoughtSpot. Available only if [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance. To create a Role, the `ROLE_ADMINISTRATION` (**Can manage roles**) privilege is required. + * @param createRoleRequest + */ + createRole(createRoleRequest, _options) { + const result = this.api.createRole(createRoleRequest, _options); + return result.toPromise(); + } + /** + * Create schedule. Version: 9.4.0.cl or later Creates a Liveboard schedule job. Requires at least edit access to Liveboards. To create a schedule on behalf of another user, you need `ADMINISTRATION` (**Can administer Org**) or `JOBSCHEDULING` (**Can schedule for others**) privilege and edit access to the Liveboard. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `JOBSCHEDULING` (**Can schedule for others**) privilege is required. #### Usage guidelines * The description text is mandatory. The description text appears as **Description: ** in the Liveboard schedule email notifications. * For Liveboards with both charts and tables, schedule creation is only supported in PDF and XLS formats. Schedules created in CSV formats for such Liveboards will fail to run. If `PDF` is set as the `file_format`, enable `pdf_options` to get the correct attachment. Not doing so may cause the attachment to be rendered empty. * To include only specific visualizations, specify the visualization GUIDs in the `visualization_identifiers` array. * You can schedule a Liveboard job to run periodically by setting frequency parameters. You can set the schedule to run daily, weekly, monthly or every n minutes or hours. The scheduled job can also be configured to run at a specific time of the day or on specific days of the week or month. Please ensure that when setting the schedule frequency for _minute of the object_, only values that are multiples of 5 are included. * If the `frequency` parameters are defined, you can set the time zone to a value that matches your server\'s time zone. For example, `US/Central`, `Etc/UTC`, `CET`. The default time zone is `America/Los_Angeles`. For more information about Liveboard jobs, see [ThoughtSpot Product Documentation](https://docs.thoughtspot.com/cloud/latest/liveboard-schedule). + * @param createScheduleRequest + */ + createSchedule(createScheduleRequest, _options) { + const result = this.api.createSchedule(createScheduleRequest, _options); + return result.toPromise(); + } + /** + * Version: 9.0.0.cl or later Creates a tag object. Tags are labels that identify a metadata object. For example, you can create a tag to designate subject areas, such as sales, HR, marketing, and finance. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `TAGMANAGEMENT` (**Can manage tags**) privilege is required to create, edit, and delete tags. + * @param createTagRequest + */ + createTag(createTagRequest, _options) { + const result = this.api.createTag(createTagRequest, _options); + return result.toPromise(); + } + /** + * Version: 9.0.0.cl or later Creates a user in ThoughtSpot. The API endpoint allows you to configure several user properties such as email address, account status, share notification preferences, and sharing visibility. You can provision the user to [groups](https://docs.thoughtspot.com/cloud/latest/groups-privileges) and [Orgs](https://docs.thoughtspot.com/cloud/latest/orgs-overview). You can also add Liveboard, Answer, and Worksheet objects to the user’s favorites list, assign a default Liveboard for the user, and set user preferences. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `USER_ADMINISTRATION` (**Can manage users**) privilege is required. + * @param createUserRequest + */ + createUser(createUserRequest, _options) { + const result = this.api.createUser(createUserRequest, _options); + return result.toPromise(); + } + /** + * Version: 9.0.0.cl or later Creates a group object in ThoughtSpot. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `GROUP_ADMINISTRATION` (**Can manage groups**) privilege is required. #### About groups Groups in ThoughtSpot are used by the administrators to define privileges and organize users based on their roles and access requirements. To know more about groups and privileges, see [ThoughtSpot Product Documentation](https://docs.thoughtspot.com/cloud/latest/groups-privileges). #### Supported operations The API endpoint lets you perform the following operations: * Assign privileges * Add users * Define sharing visibility * Add sub-groups * Assign a default Liveboard + * @param createUserGroupRequest + */ + createUserGroup(createUserGroupRequest, _options) { + const result = this.api.createUserGroup(createUserGroupRequest, _options); + return result.toPromise(); + } + /** + * Create a variable which can be used for parameterizing metadata objects Version: 26.4.0.cl or later Allows creating a variable which can be used for parameterizing metadata objects in ThoughtSpot. Requires ADMINISTRATION role and TENANT scope. The CAN_MANAGE_VARIABLES permission allows you to manage Formula Variables in the current organization scope. The API endpoint supports the following types of variables: * CONNECTION_PROPERTY - For connection properties * TABLE_MAPPING - For table mappings * CONNECTION_PROPERTY_PER_PRINCIPAL - For connection properties per principal. In order to use this please contact support to enable this. * FORMULA_VARIABLE - For Formula variables, introduced in 10.15.0.cl When creating a variable, you need to specify: * The variable type * A unique name for the variable * Whether the variable contains sensitive values (defaults to false) * The data type of the variable, only specify for formula variables (defaults to null) The operation will fail if: * The user lacks required permissions * The variable name already exists * The variable type is invalid + * @param createVariableRequest + */ + createVariable(createVariableRequest, _options) { + const result = this.api.createVariable(createVariableRequest, _options); + return result.toPromise(); + } + /** + * Version: 10.14.0.cl or later Creates a new webhook configuration to receive notifications for specified events. The webhook will be triggered when the configured events occur in the system. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) or `DEVELOPER` (**Has developer privilege**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, users with `CAN_MANAGE_WEBHOOKS` (**Can manage webhooks**) privilege are also authorized to perform this action. + * @param createWebhookConfigurationRequest + */ + createWebhookConfiguration(createWebhookConfigurationRequest, _options) { + const result = this.api.createWebhookConfiguration(createWebhookConfigurationRequest, _options); + return result.toPromise(); + } + /** + * Version: 9.9.0.cl or later Creates a DBT connection object in ThoughtSpot. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege or `DATAMANAGEMENT` (**Can manage data**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the following Data control privileges may be required: - `CAN_MANAGE_CUSTOM_CALENDAR`(**Can manage custom calendars**) - `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) - `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` (**Can manage data models**) #### About create DBT connection DBT connection in ThoughtSpot is used by the user to define DBT credentials for cloud . The API needs embrace connection, embrace database name, DBT url, import type, DBT account identifier, DBT project identifier, DBT access token and environment details (or) embrace connection, embrace database name, import type, file_content to create a connection object. To know more about DBT, see ThoughtSpot Product Documentation. + * @param connectionName Name of the connection. + * @param databaseName Name of the Database. + * @param importType Mention type of Import + * @param accessToken Access token is mandatory when Import_Type is DBT_CLOUD. + * @param dbtUrl DBT URL is mandatory when Import_Type is DBT_CLOUD. + * @param accountId Account ID is mandatory when Import_Type is DBT_CLOUD + * @param projectId Project ID is mandatory when Import_Type is DBT_CLOUD + * @param dbtEnvId DBT Environment ID\\\" + * @param projectName Name of the project + * @param fileContent Upload DBT Manifest and Catalog artifact files as a ZIP file. This field is Mandatory when Import Type is \\\'ZIP_FILE\\\' + */ + dbtConnection(connectionName, databaseName, importType, accessToken, dbtUrl, accountId, projectId, dbtEnvId, projectName, fileContent, _options) { + const result = this.api.dbtConnection(connectionName, databaseName, importType, accessToken, dbtUrl, accountId, projectId, dbtEnvId, projectName, fileContent, _options); + return result.toPromise(); + } + /** + * Version: 9.9.0.cl or later Resynchronize the existing list of models, tables, worksheet tml’s and import them to Thoughtspot based on the DBT connection object. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege or `DATAMANAGEMENT` (**Can manage data**) privilege, along with an existing DBT connection. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the following data control privileges may be required: - `CAN_MANAGE_CUSTOM_CALENDAR`(**Can manage custom calendars**) - `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) - `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` (**Can manage data models**) + * @param dbtConnectionIdentifier Unique ID of the DBT connection. + * @param fileContent Upload DBT Manifest and Catalog artifact files as a ZIP file. This field is mandatory if the connection was created with import_type ‘ZIP_FILE’ + */ + dbtGenerateSyncTml(dbtConnectionIdentifier, fileContent, _options) { + const result = this.api.dbtGenerateSyncTml(dbtConnectionIdentifier, fileContent, _options); + return result.toPromise(); + } + /** + * Version: 9.9.0.cl or later Generate required table and worksheet and import them. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege or `DATAMANAGEMENT` (**Can manage data**) privilege, along with an existing DBT connection. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the following data control privileges may be required: - `CAN_MANAGE_CUSTOM_CALENDAR`(**Can manage custom calendars**) - `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) - `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` (**Can manage data models**) #### About generate TML Models and Worksheets to be imported can be selected by the user as part of the API. + * @param dbtConnectionIdentifier Unique ID of the DBT connection. + * @param modelTables List of Models and their respective Tables Example: \\\'[{\\\"model_name\\\": \\\"model_name\\\", \\\"tables\\\": [\\\"table_name\\\"]}]\\\' + * @param importWorksheets Mention the worksheet tmls to import + * @param worksheets List of worksheets is mandatory when import_Worksheets is type SELECTED Example: [\\\"worksheet_name\\\"] + * @param fileContent Upload DBT Manifest and Catalog artifact files as a ZIP file. This field is mandatory if the connection was created with import_type ‘ZIP_FILE’ + */ + dbtGenerateTml(dbtConnectionIdentifier, modelTables, importWorksheets, worksheets, fileContent, _options) { + const result = this.api.dbtGenerateTml(dbtConnectionIdentifier, modelTables, importWorksheets, worksheets, fileContent, _options); + return result.toPromise(); + } + /** + * Version: 9.9.0.cl or later Gets a list of DBT connection objects by user and organization, available on the ThoughtSpot system. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege or `DATAMANAGEMENT` (**Can manage data**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the following Data control privileges may be required: - `CAN_MANAGE_CUSTOM_CALENDAR`(**Can manage custom calendars**) - `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) - `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` (**Can manage data models**) #### About search DBT connection To get details of a specific DBT connection identifier, database connection identifier, database connection name, database name, project name, project identifier, environment identifier , import type and author. + */ + dbtSearch(_options) { + const result = this.api.dbtSearch(_options); + return result.toPromise(); + } + /** + * Version: 9.7.0.cl or later Deactivates a user account. Requires `ADMINISTRATION` (**Can administer Thoughtspot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `USER_ADMINISTRATION` (**Can manage users**) privilege is required. To deactivate a user account, the API request body must include the following information: - Username or the GUID of the user account - Base URL of the ThoughtSpot instance If the API request is successful, ThoughtSpot returns the activation URL in the response. The activation URL is valid for 14 days and can be used to re-activate the account and reset the password of the deactivated account. + * @param deactivateUserRequest + */ + deactivateUser(deactivateUserRequest, _options) { + const result = this.api.deactivateUser(deactivateUserRequest, _options); + return result.toPromise(); + } + /** + * Version: 10.12.0.cl or later Deletes a [custom calendar](https://docs.thoughtspot.com/cloud/latest/connections-cust-cal). Requires `DATAMANAGEMENT` (**Can manage data**) or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your ThoughtSpot instance, the `CAN_MANAGE_CUSTOM_CALENDAR` (**Can manage custom calendars**) privilege is required. #### Usage guidelines To delete a custom calendar, specify the calendar ID as a path parameter in the request URL. + * @param calendarIdentifier Unique ID or name of the Calendar. + */ + deleteCalendar(calendarIdentifier, _options) { + const result = this.api.deleteCalendar(calendarIdentifier, _options); + return result.toPromise(); + } + /** + * Version: 26.4.0.cl or later Deletes one or more collections from ThoughtSpot. #### Delete options * **delete_children**: When set to `true`, deletes the child objects (metadata items) within the collection that the user has access to. Objects that the user does not have permission to delete will be skipped. * **dry_run**: When set to `true`, performs a preview of the deletion operation without actually deleting anything. The response shows what would be deleted, allowing you to review before committing the deletion. #### Response The response includes: * **metadata_deleted**: List of metadata objects that were successfully deleted * **metadata_skipped**: List of metadata objects that were skipped due to lack of permissions or other constraints + * @param deleteCollectionRequest + */ + deleteCollection(deleteCollectionRequest, _options) { + const result = this.api.deleteCollection(deleteCollectionRequest, _options); + return result.toPromise(); + } + /** + * Version: 9.2.0.cl or later Deletes Git repository configuration from your ThoughtSpot instance. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance on your instance, the `CAN_SETUP_VERSION_CONTROL` (**Can set up version control**) privilege. + * @param deleteConfigRequest + */ + deleteConfig(deleteConfigRequest, _options) { + const result = this.api.deleteConfig(deleteConfigRequest, _options); + return result.toPromise(); + } + /** + * Version: 9.2.0.cl or later **Important**: This endpoint is deprecated and will be removed from ThoughtSpot in September 2025. ThoughtSpot strongly recommends using the [Delete Connection V2](#/http/api-endpoints/connections/delete-connection-v2) endpoint to delete your connection objects. #### Usage guidelines Deletes a connection object. Requires `DATAMANAGEMENT` (**Can manage data**) and edit permissions to the connection object, or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) privilege is required. **Note**: If a connection has dependent objects, make sure you remove its associations before the delete operation. + * @param deleteConnectionRequest + */ + deleteConnection(deleteConnectionRequest, _options) { + const result = this.api.deleteConnection(deleteConnectionRequest, _options); + return result.toPromise(); + } + /** + * Version: 10.12.0.cl or later Deletes connection configuration objects. Requires `DATAMANAGEMENT` (**Can manage data**) and edit permissions to the connection object, or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) privilege is required. + * @param deleteConnectionConfigurationRequest + */ + deleteConnectionConfiguration(deleteConnectionConfigurationRequest, _options) { + const result = this.api.deleteConnectionConfiguration(deleteConnectionConfigurationRequest, _options); + return result.toPromise(); + } + /** + * Version: 10.4.0.cl or later Deletes a connection object. **Note**: If a connection has dependent objects, make sure you remove its associations before the delete operation. Requires `DATAMANAGEMENT` (**Can manage data**) and edit permissions to the connection object, or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) privilege is required. + * @param connectionIdentifier Unique ID or name of the connection. + */ + deleteConnectionV2(connectionIdentifier, _options) { + const result = this.api.deleteConnectionV2(connectionIdentifier, _options); + return result.toPromise(); + } + /** + * Version: 9.6.0.cl or later Removes the custom action specified in the API request. Requires `DEVELOPER` (**Has Developer privilege**) or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `DEVELOPER` (**Has developer privilege**) privilege is required. + * @param customActionIdentifier Unique ID or name of the custom action. + */ + deleteCustomAction(customActionIdentifier, _options) { + const result = this.api.deleteCustomAction(customActionIdentifier, _options); + return result.toPromise(); + } + /** + * Version: 9.9.0.cl or later Removes the specified DBT connection object from the ThoughtSpot system. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) or `DATAMANAGEMENT` (**Can manage data ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the following Data control privileges may be required: - `CAN_MANAGE_CUSTOM_CALENDAR`(**Can manage custom calendars**) - `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) - `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` (**Can manage data models**) + * @param dbtConnectionIdentifier Unique ID of the DBT Connection. + */ + deleteDbtConnection(dbtConnectionIdentifier, _options) { + const result = this.api.deleteDbtConnection(dbtConnectionIdentifier, _options); + return result.toPromise(); + } + /** + * Version: 10.10.0.cl or later Deletes the configuration for the email customization. #### Pre-requisites Requires `DEVELOPER` (**has developer privilege**) or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `DEVELOPER` (**Has developer privilege**) privilege is required. **NOTE**:This endpoint in currently in beta. Contact ThoughtSpot support to enable this on your instance. #### Usage guidelines - Call the search API endpoint to get the `template_identifier` from the response. - Use that `template_identifier` as a parameter in this API request. + * @param templateIdentifier Unique ID or name of the email customization. + */ + deleteEmailCustomization(templateIdentifier, _options) { + const result = this.api.deleteEmailCustomization(templateIdentifier, _options); + return result.toPromise(); + } + /** + * Version: 9.0.0.cl or later Removes the specified metadata object from the ThoughtSpot system. Requires edit access to the metadata object. + * @param deleteMetadataRequest + */ + deleteMetadata(deleteMetadataRequest, _options) { + const result = this.api.deleteMetadata(deleteMetadataRequest, _options); + return result.toPromise(); + } + /** + * Version: 9.0.0.cl or later Deletes an Org object from the ThoughtSpot system. Requires cluster administration (**Can administer Org**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `ORG_ADMINISTRATION` (**Can manage Orgs**) privilege is required. When you delete an Org, all its users and objects created in that Org context are removed. However, if the users in the deleted Org also exists in other Orgs, they are removed only from the deleted Org. + * @param orgIdentifier ID or name of the Org + */ + deleteOrg(orgIdentifier, _options) { + const result = this.api.deleteOrg(orgIdentifier, _options); + return result.toPromise(); + } + /** + * Version: 10.12.0.cl or later Deletes the configuration for the email customization. #### Pre-requisites Requires `DEVELOPER` (**has developer privilege**) or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `DEVELOPER` (**Has developer privilege**) privilege is required. **NOTE**:This endpoint in currently in beta. Contact ThoughtSpot support to enable this on your instance. #### Usage guidelines - Call the search API endpoint to get the `org_identifier` from the response. - Use that `org_identifier` as a parameter in this API request. + * @param deleteOrgEmailCustomizationRequest + */ + deleteOrgEmailCustomization(deleteOrgEmailCustomizationRequest, _options) { + const result = this.api.deleteOrgEmailCustomization(deleteOrgEmailCustomizationRequest, _options); + return result.toPromise(); + } + /** + * Version: 9.5.0.cl or later Deletes a Role object from the ThoughtSpot system. Available only if [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance. To delete a Role, the `ROLE_ADMINISTRATION` (**Can manage roles**) privilege is required. + * @param roleIdentifier Unique ID or name of the Role. ReadOnly roles cannot be deleted. + */ + deleteRole(roleIdentifier, _options) { + const result = this.api.deleteRole(roleIdentifier, _options); + return result.toPromise(); + } + /** + * Deletes a scheduled job. Version: 9.4.0.cl or later Deletes a scheduled Liveboard job. Requires at least edit access to Liveboard or `ADMINISTRATION` (**Can administer Org**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `JOBSCHEDULING` (**Can schedule for others**) privilege is required. + * @param scheduleIdentifier Unique ID or name of the scheduled job. + */ + deleteSchedule(scheduleIdentifier, _options) { + const result = this.api.deleteSchedule(scheduleIdentifier, _options); + return result.toPromise(); + } + /** + * Version: 9.0.0.cl or later Deletes a tag object from the ThoughtSpot system Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `TAGMANAGEMENT` (**Can manage tags**) privilege is required to create, edit, and delete tags. + * @param tagIdentifier Tag identifier Tag name or Tag id. + */ + deleteTag(tagIdentifier, _options) { + const result = this.api.deleteTag(tagIdentifier, _options); + return result.toPromise(); + } + /** + * Version: 9.0.0.cl or later Deletes a user from the ThoughtSpot system. If you want to remove a user from a specific Org but not from ThoughtSpot, update the group and Org mapping properties of the user object via a POST API call to the [/api/rest/2.0/users/{user_identifier}/update](#/http/api-endpoints/users/update-user) endpoint. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `USER_ADMINISTRATION` (**Can manage users**) privilege is required. + * @param userIdentifier GUID / name of the user + */ + deleteUser(userIdentifier, _options) { + const result = this.api.deleteUser(userIdentifier, _options); + return result.toPromise(); + } + /** + * Version: 9.0.0.cl or later Removes the specified group object from the ThoughtSpot system. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `GROUP_ADMINISTRATION` (**Can manage groups**) privilege is required. + * @param groupIdentifier GUID or name of the group. + */ + deleteUserGroup(groupIdentifier, _options) { + const result = this.api.deleteUserGroup(groupIdentifier, _options); + return result.toPromise(); + } + /** + * Delete a variable Version: 10.14.0.cl or later **Note:** This API endpoint is deprecated and will be removed from ThoughtSpot in a future release. Use [POST /api/rest/2.0/template/variables/delete](/api/rest/2.0/template/variables/delete) instead. Allows deleting a variable from ThoughtSpot. Requires ADMINISTRATION role and TENANT scope. The CAN_MANAGE_VARIABLES permission allows you to manage Formula Variables in the current organization scope. The API endpoint requires: * The variable identifier (ID or name) The operation will fail if: * The user lacks required permissions * The variable doesn\'t exist * The variable is being used by other objects + * @param identifier Unique id or name of the variable + */ + deleteVariable(identifier, _options) { + const result = this.api.deleteVariable(identifier, _options); + return result.toPromise(); + } + /** + * Delete variable(s) Version: 26.4.0.cl or later Allows deleting multiple variables from ThoughtSpot. Requires ADMINISTRATION role and TENANT scope. The CAN_MANAGE_VARIABLES permission allows you to manage Formula Variables in the current organization scope. The API endpoint requires: * The variable identifiers (IDs or names) The operation will fail if: * The user lacks required permissions * Any of the variables don\'t exist * Any of the variables are being used by other objects + * @param deleteVariablesRequest + */ + deleteVariables(deleteVariablesRequest, _options) { + const result = this.api.deleteVariables(deleteVariablesRequest, _options); + return result.toPromise(); + } + /** + * Version: 10.14.0.cl or later Deletes one or more webhook configurations by their unique id or name. Returns status of each deletion operation, including successfully deleted webhooks and any failures with error details. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) or `DEVELOPER` (**Has developer privilege**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, users with `CAN_MANAGE_WEBHOOKS` (**Can manage webhooks**) privilege are also authorized to perform this action. + * @param deleteWebhookConfigurationsRequest + */ + deleteWebhookConfigurations(deleteWebhookConfigurationsRequest, _options) { + const result = this.api.deleteWebhookConfigurations(deleteWebhookConfigurationsRequest, _options); + return result.toPromise(); + } + /** + * Version: 9.2.0.cl or later Allows you to deploy a commit and publish TML content to your ThoughtSpot instance. Requires at least edit access to the objects used in the deploy operation. The API deploys the head of the branch unless a `commit_id` is specified in the API request. If the branch name is not defined in the request, the default branch is considered for deploying commits. For more information, see [Git integration documentation](https://developers.thoughtspot.com/docs/git-integration). + * @param deployCommitRequest + */ + deployCommit(deployCommitRequest, _options) { + const result = this.api.deployCommit(deployCommitRequest, _options); + return result.toPromise(); + } + /** + * Version: 9.9.0.cl or later Exports the difference in connection metadata between CDW and ThoughtSpot Requires `DATAMANAGEMENT` (**Can manage data**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the following Data control privileges may be required: - `CAN_MANAGE_CUSTOM_CALENDAR`(**Can manage custom calendars**) - `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) - `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` (**Can manage data models**) To download the connection metadata difference between ThoughtSpot and CDW, pass the connection GUID as `connection_identifier` in the API request. + * @param connectionIdentifier GUID of the connection + */ + downloadConnectionMetadataChanges(connectionIdentifier, _options) { + const result = this.api.downloadConnectionMetadataChanges(connectionIdentifier, _options); + return result.toPromise(); + } + /** + * Version: 9.0.0.cl or later Exports an Answer in the given file format. You can download the Answer data as a PDF, PNG, CSV, or XLSX file. Requires at least view access to the Answer. #### Usage guidelines In the request body, specify the GUID or name of the Answer and set `file_format`. The default file format is CSV. Use the `type` parameter to specify whether the Answer being exported is a saved Answer (`SAVED`) or a pinned Answer on a Liveboard (`PINNED`). Defaults to `SAVED`. When using `PINNED`, the `metadata_identifier` must be the container id. **NOTE**: * The downloadable file returned in API response file is extensionless. Please rename the downloaded file by typing in the relevant extension. * HTML rendering is not supported for PDF exports of Answers with tables. Optionally, you can define [runtime overrides](https://developers.thoughtspot.com/docs/fetch-data-and-report-apis#_runtime_overrides) to apply to the Answer data. + * @param exportAnswerReportRequest + */ + exportAnswerReport(exportAnswerReportRequest, _options) { + const result = this.api.exportAnswerReport(exportAnswerReportRequest, _options); + return result.toPromise(); + } + /** + * Version: 9.0.0.cl or later Exports a Liveboard and its visualizations in PDF, PNG, CSV, or XLSX file format. The default `file_format` is CSV. Requires at least view access to the Liveboard. #### Usage guidelines In the request body, specify the GUID or name of the Liveboard. To generate a Liveboard report with specific visualizations, add GUIDs or names of the visualizations. **NOTE**: * The downloadable file returned in API response file is extensionless. Please rename the downloaded file by typing in the relevant extension. * Optionally, you can define [runtime overrides](https://developers.thoughtspot.com/docs/fetch-data-and-report-apis#_runtime_overrides) to apply to the Answer data. * To include unsaved changes in the report, pass the `transient_pinboard_content` script generated from the `getExportRequestForCurrentPinboard` method in the Visual Embed SDK. Upon successful execution, the API returns the report with unsaved changes, including ad hoc changes to visualizations. For more information, see [Liveboard Report API](https://developers.thoughtspot.com/docs/fetch-data-and-report-apis#_liveboard_report_api). * Starting with ThoughtSpot Cloud 10.9.0.cl release, the Liveboard can be exported in the PNG format in the resolution of your choice. To enable this on your instance, contact ThoughtSpot support. When this feature is enabled, the options `include_cover_page`,`include_filter_page` within the `png_options` will not be available for PNG exports. * Starting with the ThoughtSpot Cloud 26.2.0.cl release, * Liveboards can be exported in CSV format. * All visualizations within a Liveboard can be exported as individual CSV files. * When exporting multiple visualizations or the entire Liveboard, the system returns the report as a compressed ZIP file containing the separate CSV files for each visualization. * Liveboards can also be exported in XLSX format. * All selected visualizations are consolidated into a single Excel workbook (.xlsx), with each visualization placed in its own worksheet (tab). * XLSX exports are limited to a maximum of 255 worksheets (tabs) per workbook. + * @param exportLiveboardReportRequest + */ + exportLiveboardReport(exportLiveboardReportRequest, _options) { + const result = this.api.exportLiveboardReport(exportLiveboardReportRequest, _options); + return result.toPromise(); + } + /** + * Version: 9.0.0.cl or later Exports the [TML](https://docs.thoughtspot.com/cloud/latest/tml) representation of metadata objects in JSON or YAML format. Requires `DATADOWNLOADING` (**Can download Data**) and at least view access to the metadata object. #### Usage guidelines * You can export one or several objects by passing metadata object GUIDs in the `metadata` array. * When exporting TML content for a Liveboard or Answer object, you can set `export_associated` to `true` to retrieve TML content for underlying Worksheets, Tables, or Views, including the GUID of each object within the headers. When `export_associated` is set to `true`, consider retrieving one metadata object at a time. * Set `export_fqns` to `true` to add FQNs of the referenced objects in the TML content. For example, if you send an API request to retrieve TML for a Liveboard and its associated objects, the API returns the TML content with FQNs of the referenced Worksheet. Exporting TML with FQNs is useful if ThoughtSpot has multiple objects with the same name and you want to eliminate ambiguity when importing TML files into ThoughtSpot. It eliminates the need for adding FQNs of the referenced objects manually during the import operation. * To export only the TML of feedbacks associated with an object, set the GUID of the object as `identifier`, and set the `type` as `FEEDBACK` in the `metadata` array. * To export the TML of an object along with the feedbacks associated with it, set the GUID of the object as `identifier`, set the `type` as `LOGIAL_TABLE` in the `metadata` array, and set `export_with_associated_feedbacks` in `export_options` to true. For more information, see [TML Documentation](https://developers.thoughtspot.com/docs/tml#_export_a_tml). For more information on feedbacks, see [Feedback Documentation](https://docs.thoughtspot.com/cloud/latest/sage-feedback). + * @param exportMetadataTMLRequest + */ + exportMetadataTML(exportMetadataTMLRequest, _options) { + const result = this.api.exportMetadataTML(exportMetadataTMLRequest, _options); + return result.toPromise(); + } + /** + * Version: 10.1.0.cl or later Exports the [TML](https://docs.thoughtspot.com/cloud/latest/tml) representation of metadata objects in JSON or YAML format. ### **Permissions Required** Requires `DATAMANAGEMENT` (**Can manage data**) and `USERMANAGEMENT` (**Can manage users**) privileges. #### **Usage Guidelines** This API is only applicable for `USER`, `GROUP`, and `ROLES` metadata types. - `batch_offset` Indicates the starting position within the complete dataset from which the API should begin returning objects. Useful for paginating results efficiently. - `batch_size` Specifies the number of objects or items to retrieve in a single request. Helps control response size for better performance. - `edoc_format` Defines the format of the TML content. The exported metadata can be in JSON or YAML format. - `export_dependent` Specifies whether to include dependent metadata objects in the export. Ensures related objects are also retrieved if needed. - `all_orgs_override` Indicates whether the export operation applies across all organizations. Useful for multi-tenant environments where cross-org exports are required. + * @param exportMetadataTMLBatchedRequest + */ + exportMetadataTMLBatched(exportMetadataTMLBatchedRequest, _options) { + const result = this.api.exportMetadataTMLBatched(exportMetadataTMLBatchedRequest, _options); + return result.toPromise(); + } + /** + * Version: 9.0.0.cl or later Fetches data from a saved Answer. Requires at least view access to the saved Answer. The `record_size` attribute determines the number of records to retrieve in an API call. For more information about pagination, record size, and maximum row limit, see [Pagination and record size settings](https://developers.thoughtspot.com/docs/fetch-data-and-report-apis#_pagination_settings_for_data_and_report_apis). + * @param fetchAnswerDataRequest + */ + fetchAnswerData(fetchAnswerDataRequest, _options) { + const result = this.api.fetchAnswerData(fetchAnswerDataRequest, _options); + return result.toPromise(); + } + /** + * Version: 9.0.0.cl or later Fetches the underlying SQL query data for an Answer object. Requires at least view access to the Answer object. Upon successful execution, the API returns the SQL queries for the specified object as shown in this example: ``` { \"metadata_id\":\"8fbe44a8-46ad-4b16-8d39-184b2fada490\", \"metadata_name\":\"Total sales\", \"metadata_type\":\"ANSWER\", \"sql_queries\":[ { \"metadata_id\":\"8fbe44a8-46ad-4b16-8d39-184b2fada490\", \"metadata_name\":\"Total sales -test\", \"sql_query\":\"SELECT \\n \\\"ta_1\\\".\\\"REGION\\\" \\\"ca_1\\\", \\n \\\"ta_2\\\".\\\"PRODUCTNAME\\\" \\\"ca_2\\\", \\n \\\"ta_1\\\".\\\"STORENAME\\\" \\\"ca_3\\\", \\n CASE\\n WHEN sum(\\\"ta_3\\\".\\\"SALES\\\") IS NOT NULL THEN sum(\\\"ta_3\\\".\\\"SALES\\\")\\n ELSE 0\\n END \\\"ca_4\\\", \\n CASE\\n WHEN sum(\\\"ta_3\\\".\\\"QUANTITYPURCHASED\\\") IS NOT NULL THEN sum(\\\"ta_3\\\".\\\"QUANTITYPURCHASED\\\")\\n ELSE 0\\n END \\\"ca_5\\\"\\nFROM \\\"RETAILAPPAREL\\\".\\\"PUBLIC\\\".\\\"FACT_RETAPP_SALES\\\" \\\"ta_3\\\"\\n JOIN \\\"RETAILAPPAREL\\\".\\\"PUBLIC\\\".\\\"DIM_RETAPP_STORES\\\" \\\"ta_1\\\"\\n ON \\\"ta_3\\\".\\\"STOREID\\\" = \\\"ta_1\\\".\\\"STOREID\\\"\\n JOIN \\\"RETAILAPPAREL\\\".\\\"PUBLIC\\\".\\\"DIM_RETAPP_PRODUCTS\\\" \\\"ta_2\\\"\\n ON \\\"ta_3\\\".\\\"PRODUCTID\\\" = \\\"ta_2\\\".\\\"PRODUCTID\\\"\\nGROUP BY \\n \\\"ca_1\\\", \\n \\\"ca_2\\\", \\n \\\"ca_3\\\"\\n\" } ] } ``` + * @param fetchAnswerSqlQueryRequest + */ + fetchAnswerSqlQuery(fetchAnswerSqlQueryRequest, _options) { + const result = this.api.fetchAnswerSqlQuery(fetchAnswerSqlQueryRequest, _options); + return result.toPromise(); + } + /** + * Version: 10.4.0.cl or later Gets information about the status of the TML async import task scheduled using the `/api/rest/2.0/metadata/tml/async/import` API call. To fetch the task details, specify the ID of the TML async import task. Requires access to the task ID. The API allows users who initiated the asynchronous TML import via `/api/rest/2.0/metadata/tml/async/import` to view the status of their tasks. Users with administration privilege can view the status of all import tasks initiated by the users in their Org. #### Usage guidelines See [TML API Documentation](https://developers.thoughtspot.com/docs/tml#_fetch_status_of_the_tml_import_task) for usage guidelines. + * @param fetchAsyncImportTaskStatusRequest + */ + fetchAsyncImportTaskStatus(fetchAsyncImportTaskStatusRequest, _options) { + const result = this.api.fetchAsyncImportTaskStatus(fetchAsyncImportTaskStatusRequest, _options); + return result.toPromise(); + } + /** + * Version: 10.12.0.cl or later Fetches column security rules for specified tables. This API endpoint retrieves column-level security rules configured for tables. It returns information about which columns are secured and which groups have access to those columns. #### Usage guidelines - Provide an array of table identifiers using either `identifier` (GUID or name) or `obj_identifier` (object ID) - At least one of `identifier` or `obj_identifier` must be provided for each table - The API returns column security rules for all specified tables - Users must have appropriate permissions to access security rules for the specified tables #### Required permissions - `ADMINISTRATION` - Can administer ThoughtSpot - `DATAMANAGEMENT` - Can manage data - `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` - Can manage worksheet views and tables #### Example request ```json { \"tables\": [ { \"identifier\": \"table-guid\", \"obj_identifier\": \"table-object-id\" } ] } ``` #### Response format The API returns an array of `ColumnSecurityRuleResponse` objects wrapped in a `data` field. Each `ColumnSecurityRuleResponse` object contains: - Table information (GUID and object ID) - Array of column security rules with column details, group access, and source table information #### Example response ```json { \"data\": [ { \"guid\": \"table-guid\", \"objId\": \"table-object-id\", \"columnSecurityRules\": [ { \"column\": { \"id\": \"col_123\", \"name\": \"Salary\" }, \"groups\": [ { \"id\": \"group_1\", \"name\": \"HR Department\" } ], \"sourceTableDetails\": { \"id\": \"source-table-guid\", \"name\": \"Employee_Data\" } } ] } ] } ``` + * @param fetchColumnSecurityRulesRequest + */ + fetchColumnSecurityRules(fetchColumnSecurityRulesRequest, _options) { + const result = this.api.fetchColumnSecurityRules(fetchColumnSecurityRulesRequest, _options); + return result.toPromise(); + } + /** + * Version: 9.9.0.cl or later Validates the difference in connection metadata between CDW and ThoughtSpot. Requires `DATAMANAGEMENT` (**Can manage data**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the following Data control privileges may be required: - `CAN_MANAGE_CUSTOM_CALENDAR`(**Can manage custom calendars**) - `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) - `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` (**Can manage data models**) Returns a boolean indicating whether there is any difference between the connection metadata at ThoughtSpot and CDW. To get the connection metadata difference status, pass the connection GUID as `connection_identifier` in the API request. + * @param connectionIdentifier GUID of the connection + */ + fetchConnectionDiffStatus(connectionIdentifier, _options) { + const result = this.api.fetchConnectionDiffStatus(connectionIdentifier, _options); + return result.toPromise(); + } + /** + * Version: 9.0.0.cl or later Gets data from a Liveboard object and its visualization. Requires at least view access to the Liveboard. #### Usage guidelines In the request body, specify the GUID or name of the Liveboard. To get data for specific visualizations, add the GUIDs or names of the visualizations in the API request. To include unsaved changes in the report, pass the `transient_pinboard_content` script generated from the `getExportRequestForCurrentPinboard` method in the Visual Embed SDK. Upon successful execution, the API returns the report with unsaved changes. If the new Liveboard experience mode, the transient content includes ad hoc changes to visualizations such as sorting, toggling of legends, and data drill down. For more information, and see [Liveboard data API](https://developers.thoughtspot.com/docs/fetch-data-and-report-apis#_fetch_liveboard_data_api). + * @param fetchLiveboardDataRequest + */ + fetchLiveboardData(fetchLiveboardDataRequest, _options) { + const result = this.api.fetchLiveboardData(fetchLiveboardDataRequest, _options); + return result.toPromise(); + } + /** + * Version: 9.0.0.cl or later Fetches the underlying SQL query data for a Liveboard object and its visualizations. Requires at least view access to the Liveboard object. To get SQL query data for a Liveboard, specify the GUID of the Liveboard. Optionally, you can add an array of visualization GUIDs to retrieve the SQL query data for visualizations in the Liveboard. Upon successful execution, the API returns the SQL queries for the specified object as shown in this example: ``` { \"metadata_id\": \"fa68ae91-7588-4136-bacd-d71fb12dda69\", \"metadata_name\": \"Total Sales\", \"metadata_type\": \"LIVEBOARD\", \"sql_queries\": [ { \"metadata_id\": \"b3b6d2b9-089a-490c-8e16-b144650b7843\", \"metadata_name\": \"Total quantity purchased, Total sales by region\", \"sql_query\": \"SELECT \\n \\\"ta_1\\\".\\\"REGION\\\" \\\"ca_1\\\", \\n CASE\\n WHEN sum(\\\"ta_2\\\".\\\"QUANTITYPURCHASED\\\") IS NOT NULL THEN sum(\\\"ta_2\\\".\\\"QUANTITYPURCHASED\\\")\\n ELSE 0\\n END \\\"ca_2\\\", \\n CASE\\n WHEN sum(\\\"ta_2\\\".\\\"SALES\\\") IS NOT NULL THEN sum(\\\"ta_2\\\".\\\"SALES\\\")\\n ELSE 0\\n END \\\"ca_3\\\"\\nFROM \\\"RETAILAPPAREL\\\".\\\"PUBLIC\\\".\\\"FACT_RETAPP_SALES\\\" \\\"ta_2\\\"\\n JOIN \\\"RETAILAPPAREL\\\".\\\"PUBLIC\\\".\\\"DIM_RETAPP_STORES\\\" \\\"ta_1\\\"\\n ON \\\"ta_2\\\".\\\"STOREID\\\" = \\\"ta_1\\\".\\\"STOREID\\\"\\nGROUP BY \\\"ca_1\\\"\" } ] } ``` + * @param fetchLiveboardSqlQueryRequest + */ + fetchLiveboardSqlQuery(fetchLiveboardSqlQueryRequest, _options) { + const result = this.api.fetchLiveboardSqlQuery(fetchLiveboardSqlQueryRequest, _options); + return result.toPromise(); + } + /** + * Version: 9.0.0.cl or later Fetches security audit logs. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the [Admin Control](https://developers.thoughtspot.com/docs/rbac#_admin_control) privileges are required. #### Usage guidelines By default, the API retrieves logs for the last 24 hours. You can set a custom duration in EPOCH time. Make sure the log duration specified in your API request doesn’t exceed 24 hours. If you must fetch logs for a longer time range, modify the duration and make multiple sequential API requests. Upon successful execution, the API returns logs with the following information: * timestamp of the event * event ID * event type * name and GUID of the user * IP address of ThoughtSpot instance For more information see [Audit logs Documentation](https://developers.thoughtspot.com/docs/audit-logs). + * @param fetchLogsRequest + */ + fetchLogs(fetchLogsRequest, _options) { + const result = this.api.fetchLogs(fetchLogsRequest, _options); + return result.toPromise(); + } + /** + * Version: 26.3.0.cl or later This API fetches the object privileges present for the given list of principals (user or group), on the given set of objects. It supports pagination, which can be enabled and configured using the request parameters. It provides users access to certain features based on privilege based access control. #### Usage guidelines - Specify the `type` (`USER` or `USER_GROUP`) and `identifier` (either GUID or name) of the principals for which you want to retrieve object privilege information in the `principals` array. - Specify the `type` (`LOGICAL_TABLE`) and `identifier` (either GUID or name) of the metadata objects for which you want to retrieve object privilege information in the `metadata` array. Only `LOGICAL_TABLE` metadata type is supported for now. It may be extended for other metadata types in future. - To control the offset from where principals have to be fetched, use `record_offset`. When `record_offset` is 0, information is fetched from the beginning. - To control the number of principals to be fetched, use `record_size`. Default `record_size` is 20. - Ensure `record_offset` for a subsequent request is one more than the value of `record_size` of the previous request. - Ensure using correct Authorization Bearer Token corresponding to specific user & org. #### Example request ```json { \"principals\": [ { \"type\": \"type-1\", \"identifier\": \"principal-guid-or-name-1\" }, { \"type\": \"type-2\", \"identifier\": \"principal-guid-or-name-2\" } ], \"metadata\": [ { \"type\": \"metadata-type-1\", \"identifier\": \"metadata-guid-or-name-1\" }, { \"type\": \"metadata-type-2\", \"identifier\": \"metadata-guid-or-name-2\" } ], \"record_offset\": 0, \"record_size\": 20 } ``` #### Response format The API returns an array of `metadata_object_privileges` objects wrapped in JSON. Each `metadata_object_privileges` object contains: - Metadata information (GUID, name and type) - Array of `principal_object_privilege_info`. - Each `principal_object_privilege_info` contains: - Principal type. All principals of this type are listed as described below. - Array of `principal_object_privileges`. - Each `principal_object_privileges` contains: - Principal information (GUID, name, subtype) - List of applied object level privileges. #### Example response ```json { \"metadata_object_privileges\": [ { \"metadata_id\": \"metadata-guid-1\", \"metadata_name\": \"metadata-name-1\", \"metadata_type\": \"metadata-type-1\", \"principal_object_privilege_info\": [ { \"principal_type\": \"principal-type-1\", \"principal_object_privileges\": [ { \"principal_id\": \"principal-guid-1\", \"principal_name\": \"principal-name-1\", \"principal_sub_type\": \"principal-sub-type-1\", \"object_privileges\": \"[object-privilege-1, object-privilege-2]\" }, { \"principal_id\": \"principal-guid-2\", \"principal_name\": \"principal-name-2\", \"principal_sub_type\": \"principal-sub-type-2\", \"object_privileges\": \"[object-privilege-1, object-privilege-2]\" } ] }, { \"principal_type\": \"principal-type-2\", \"principal_object_privileges\": [ { \"principal_id\": \"principal-guid-3\", \"principal_name\": \"principal-guid-4\", \"principal_sub_type\": \"principal-sub-type-4\", \"object_privileges\": \"[object-privilege-1]\" } ] } ] }, { \"metadata_id\": \"metadata-guid-2\", \"metadata_name\": \"metadata-name-2\", \"metadata_type\": \"metadata-type-2\", \"principal_object_privilege_info\": [ { \"principal_type\": \"principal-type-1\", \"principal_object_privileges\": [ { \"principal_id\": \"principal-guid-1\", \"principal_name\": \"principal-name-1\", \"principal_sub_type\": \"principal-sub-type-1\", \"object_privileges\": \"[object-privilege-3, object-privilege-4]\" }, { \"principal_id\": \"principal-guid-2\", \"principal_name\": \"principal-name-2\", \"principal_sub_type\": \"principal-sub-type-2\", \"object_privileges\": \"[object-privilege-4]\" } ] } ] } ] } ``` + * @param fetchObjectPrivilegesRequest + */ + fetchObjectPrivileges(fetchObjectPrivilegesRequest, _options) { + const result = this.api.fetchObjectPrivileges(fetchObjectPrivilegesRequest, _options); + return result.toPromise(); + } + /** + * Version: 9.0.0.cl or later Fetches object permission details for a given principal object such as a user and group. Requires view access to the metadata object. #### Usage guidelines * To get a list of all metadata objects that a user or group can access, specify the `type` and GUID or name of the principal. * To get permission details for a specific object, add the `type` and GUID or name of the metadata object to your API request. Upon successful execution, the API returns a list of metadata objects and permission details for each object. + * @param fetchPermissionsOfPrincipalsRequest + */ + fetchPermissionsOfPrincipals(fetchPermissionsOfPrincipalsRequest, _options) { + const result = this.api.fetchPermissionsOfPrincipals(fetchPermissionsOfPrincipalsRequest, _options); + return result.toPromise(); + } + /** + * Version: 9.0.0.cl or later Fetches permission details for a given metadata object. Requires view access to the metadata object. #### Usage guidelines * To fetch a list of users and groups for a metadata object, specify `type` and GUID or name of the metadata object. * To get permission details for a specific user or group, add `type` and GUID or name of the principal object to your API request. Upon successful execution, the API returns permission details and principal information for the object specified in the API request. + * @param fetchPermissionsOnMetadataRequest + */ + fetchPermissionsOnMetadata(fetchPermissionsOnMetadataRequest, _options) { + const result = this.api.fetchPermissionsOnMetadata(fetchPermissionsOnMetadataRequest, _options); + return result.toPromise(); + } + /** + * Version: 9.0.0.cl or later Enforces logout on current user sessions. Use this API with caution as it may invalidate active user sessions and force users to re-login. Make sure you specify the usernames or GUIDs. If you pass null values in the API call, all user sessions on your cluster become invalid, and the users are forced to re-login. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `USER_ADMINISTRATION` (**Can manage users**) privilege is required. + * @param forceLogoutUsersRequest + */ + forceLogoutUsers(forceLogoutUsersRequest, _options) { + const result = this.api.forceLogoutUsers(forceLogoutUsersRequest, _options); + return result.toPromise(); + } + /** + * Version: 10.12.0.cl or later Exports a [custom calendar](https://docs.thoughtspot.com/cloud/latest/connections-cust-cal) in the CSV format. Requires `DATAMANAGEMENT` (**Can manage data**) or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your ThoughtSpot instance, the `CAN_MANAGE_CUSTOM_CALENDAR` (**Can manage custom calendars**) privilege is required. #### Usage guidelines Use this API to download a custom calendar in the CSV file format. In your API request, specify the following parameters. * Start and end date of the calendar. For \"month offset\" calendars, the start date must match the month defined in the `month_offset` attribute. You can also specify optional parameters such as the starting day of the week and prefixes for the quarter and year labels. + * @param generateCSVRequest + */ + generateCSV(generateCSVRequest, _options) { + const result = this.api.generateCSV(generateCSVRequest, _options); + return result.toPromise(); + } + /** + * Version: 9.0.0.cl or later Retrieves details of the current user session for the token provided in the request header. Any ThoughtSpot user can access this endpoint and send an API request. The data returned in the API response varies according to user\'s privilege and object access permissions. **NOTE**: In ThoughtSpot, users with cluster administration privileges can access all Orgs by default. However, unless the administrator is explicitly added to an Org, the Orgs list in the session information returned by the API will include only the Primary Org. To include other Orgs in the API response, you must explicitly add the administrator to each Org in the Admin settings page in the UI or via user REST API. + */ + getCurrentUserInfo(_options) { + const result = this.api.getCurrentUserInfo(_options); + return result.toPromise(); + } + /** + * Version: 9.4.0.cl or later Retrieves details of the current session token for the bearer token provided in the request header. This API endpoint does not create a new token. Instead, it returns details about the token, including the token string, creation time, expiration time, and the associated user. Use this endpoint to introspect your current session token, debug authentication issues, or when a frontend application needs session token details. Any ThoughtSpot user with a valid bearer token can access this endpoint and send an API request + */ + getCurrentUserToken(_options) { + const result = this.api.getCurrentUserToken(_options); + return result.toPromise(); + } + /** + * Version: 10.4.0.cl or later Creates an authentication token that provides values for the formula variables in the Row Level Security (RLS) rules for a given user. Recommended for use cases that require Attribute-based access control (ABAC) via RLS. #### Required privileges To add a new user and assign privileges during auto-creation, the `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege is required. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled, the `CONTROL_TRUSTED_AUTH` (**Can Enable or Disable Trusted Authentication**) privilege and edit access to the data source are required. To configure formula variables for all Orgs on your instance or the Primary Org, cluster administration privileges are required. Org administrators can configure formula variables for their respective Orgs. If Role-Based Access Control (RBAC) is enabled, users with the `CAN_MANAGE_VARIABLES` (**Can manage variables**) role privilege can also create and manage variables for their Org context. #### Usage guidelines You can generate a token by providing a `username` and `password`, or by using a `secret_key`. To generate a `secret_key`, the administrator must enable [Trusted authentication](https://developers.thoughtspot.com/docs/trusted-auth-secret-key) in the **Develop** > **Customizations** > **Security Settings** page. **Note**: * When both `password` and `secret_key` are included in the API request, `password` takes precedence. * If [Multi-Factor Authentication (MFA)](https://docs.thoughtspot.com/cloud/latest/authentication-local-mfa) is enabled on your instance, the API login request with `username` and `password` returns an error. You can switch to token-based authentication with `secret_key` or contact ThoughtSpot Support for assistance. The token obtained from ThoughtSpot is valid for 5 minutes by default. You can configure the token expiration time as required. #### ABAC via RLS To implement ABAC via RLS and assign security entitlements to users during session creation, generate a token with custom variable values. The values set in the authentication token are applied to the formula variables referenced in RLS rules at the table level, which determines the data each user can access based on their entitlements. The variable values can be configured to persist for a specific set of Models in user sessions initiated with the token, allowing different RLS rules to be set for different data models. Once defined, the rules are added to the user\'s `variable_values` object, after which all sessions will use the persisted values. For more information, see [ABAC via tokens Documentation](https://developers.thoughtspot.com/docs/abac-via-rls-variables). ##### Formula variables Before defining variable values, ensure the variables are created and available on your instance. To create a formula variable, you can use the **Create variable** (`/api/rest/2.0/template/variables/create`) REST API endpoint, with the variable `type` set as `Formula_Variable` in the API request. The API doesn\'t support `\"persist_option\": \"RESET\"` and `\"persist_option\": \"NONE\"` when `variable_values` are defined in the request. If you are using `variable_values` for token generation, you must use other supported persist options such as `APPEND` or `REPLACE`. If you want to use `RESET` or `NONE`, do not pass any `variable_values`. In such cases, `variable_values` will remain unaffected. #### Supported objects The supported object type is `LOGICAL_TABLE`. When using `object_id` with `variable_values`, models are supported. #### Just-in-time provisioning For [just-in-time user creation and provisioning](https://developers.thoughtspot.com/docs/just-in-time-provisioning), specify the following attributes in the API request: * `auto_create` * `username` * `display_name` * `email` * `groups` Set `auto_create` to `true` if the username does not exist in ThoughtSpot. If the username already exists in ThoughtSpot and `auto_create` is set to `true`, user properties such as display name, email, Org and group entitlements will not be updated with new values. Setting `auto_create` to `true` does not create formula variables. Hence, this setting will not be applicable to `variable_values`. #### Important point to note All options in the token creation APIs that define user access to data in ThoughtSpot will take effect during token creation, not when the token is used for authentication. For example, `auto_create:true` will create the user when the authentication token is created. Persist options such as `APPEND` and `REPLACE` will persist `variable_values` on the user profile when the token is created. + * @param getCustomAccessTokenRequest + */ + getCustomAccessToken(getCustomAccessTokenRequest, _options) { + const result = this.api.getCustomAccessToken(getCustomAccessTokenRequest, _options); + return result.toPromise(); + } + /** + * Version: 10.15.0.cl or later Suggests the most relevant data sources for a given natural language query, ranked by confidence with LLM-generated reasoning. Requires `CAN_USE_SPOTTER` privilege and at least view-level access to the underlying metadata entities referenced in the response. #### Usage guidelines The request must include: - `query`: the natural language question to find relevant data sources for If the request is successful, the API returns a ranked list of suggested data sources, each containing: - `confidence`: a float score indicating the model\'s confidence in the relevance of the suggestion - `details`: metadata about the data source - `data_source_identifier`: the unique ID of the data source - `data_source_name`: the display name of the data source - `description`: a description of the data source - `reasoning`: LLM-generated rationale explaining why the data source was recommended #### Error responses | Code | Description | |------|--------------------------------------------------------------------------------------------------------------------------------------------| | 401 | Unauthorized — authentication token is missing, expired, or invalid. | | 403 | Forbidden — the authenticated user does not have `CAN_USE_SPOTTER` privilege or lacks view permission on the underlying metadata entities. | > ###### Note: > * This endpoint is currently in Beta. Breaking changes may be introduced before it is made Generally Available. > * This endpoint requires Spotter — please contact ThoughtSpot Support to enable Spotter on your cluster. + * @param getDataSourceSuggestionsRequest + */ + getDataSourceSuggestions(getDataSourceSuggestionsRequest, _options) { + const result = this.api.getDataSourceSuggestions(getDataSourceSuggestionsRequest, _options); + return result.toPromise(); + } + /** + * Version: 9.0.0.cl or later Generates an authentication token for creating a full session in ThoughtSpot for a given user. Recommended for use cases that do not require Attribute-based access control (ABAC) via Row Level Security (RLS). #### Usage guidelines You can generate a token for a user by providing a `username` and `password`, or by using the `secret_key` generated for your instance. To generate a `secret_key`, the administrator must enable [Trusted authentication](https://developers.thoughtspot.com/docs/trusted-auth-secret-key) in the **Develop** > **Customizations** > **Security Settings** page. **Note**: * When both `password` and `secret_key` are included in the API request, `password` takes precedence. * If [Multi-Factor Authentication (MFA)](https://docs.thoughtspot.com/cloud/latest/authentication-local-mfa) is enabled on your instance, the API login request with `username` and `password` returns an error. You can switch to token-based authentication with `secret_key` or contact ThoughtSpot Support for assistance. The token obtained from ThoughtSpot is valid for 5 minutes by default. You can configure the token expiration time as required. #### Just-in-time provisioning For [just-in-time user creation and provisioning](https://developers.thoughtspot.com/docs/just-in-time-provisioning), specify the following attributes in the API request: * `auto_create` * `username` * `display_name` * `email` * `group_identifiers` Set `auto_create` to `true` if the username does not exist in ThoughtSpot. If the user already exists in ThoughtSpot and `auto_create` is set to `true`, user properties such as display name, email and group assignment will be updated. To add a new user and assign privileges during auto-creation, the `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege is required. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled, the `CONTROL_TRUSTED_AUTH` (**Can Enable or Disable Trusted Authentication**) privilege is required. #### Important point to note All options in the token creation APIs that define user access to data in ThoughtSpot will take effect during token creation, not when the token is used for authentication. For example, `auto_create:true` will create the user when the authentication token is created. + * @param getFullAccessTokenRequest + */ + getFullAccessToken(getFullAccessTokenRequest, _options) { + const result = this.api.getFullAccessToken(getFullAccessTokenRequest, _options); + return result.toPromise(); + } + /** + * Version: 10.15.0.cl or later Retrieves existing natural language (NL) instructions configured for a specific data model. These instructions guide the AI system in understanding data context and generating more accurate responses. Requires `CAN_USE_SPOTTER` privilege, at least view access on the data model, and a bearer token corresponding to the org where the data model exists. #### Usage guidelines The request must include: - `data_source_identifier`: the unique ID of the data model to retrieve instructions for If the request is successful, the API returns: - `nl_instructions_info`: an array of instruction objects, each containing: - `instructions`: the configured text instructions for AI processing - `scope`: the scope of the instruction — currently only `GLOBAL` is supported #### Instructions scope - **GLOBAL**: Instructions that apply globally across the system on the given data-model (currently only global instructions are supported) #### Error responses | Code | Description | |------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| | 401 | Unauthorized — authentication token is missing, expired, or invalid. | | 403 | Forbidden — the authenticated user does not have `CAN_USE_SPOTTER` privilege, lacks view access on the data model, or the bearer token does not correspond to the org where the data model exists. | > ###### Note: > > - To use this API, the user needs at least view access on the data model, and must use the bearer token corresponding to the org where the data model exists. > - This endpoint is currently in Beta. Breaking changes may be introduced before the endpoint is made Generally Available. > - Available from version 10.15.0.cl and later. > - This endpoint requires Spotter — please contact ThoughtSpot Support to enable Spotter on your cluster. > - Use this API to review currently configured instructions before modifying them with `setNLInstructions`. + * @param getNLInstructionsRequest + */ + getNLInstructions(getNLInstructionsRequest, _options) { + const result = this.api.getNLInstructions(getNLInstructionsRequest, _options); + return result.toPromise(); + } + /** + * Version: 9.0.0.cl or later Generates an authentication token that provides access to a specific metadata object. This object list is intersected with the list of objects the user is allowed to access via group membership. For more information, see [Object security](https://docs.thoughtspot.com/cloud/latest/security-data-object#object_security). #### Usage guidelines You can generate a token for a user by providing a `username` and `password`, or by using the `secret_key` generated for your instance. To generate a `secret_key`, the administrator must enable [Trusted authentication](https://developers.thoughtspot.com/docs/trusted-auth-secret-key) in the **Develop** > **Customizations** > **Security Settings** page. **Note**: * When both `password` and `secret_key` are included in the API request, `password` takes precedence. * If [Multi-Factor Authentication (MFA)](https://docs.thoughtspot.com/cloud/latest/authentication-local-mfa) is enabled on your instance, the API login request with `username` and `password` returns an error. You can switch to token-based authentication with `secret_key` or contact ThoughtSpot Support for assistance. The token obtained from ThoughtSpot is valid for 5 minutes by default. You can configure the token expiration time as required. #### Just-in-time provisioning For [just-in-time user creation and provisioning](https://developers.thoughtspot.com/docs/just-in-time-provisioning), specify the following attributes in the API request: * `auto_create` * `username` * `display_name` * `email` * `group_identifiers` Set `auto_create` to `true` if the user is not available in ThoughtSpot. If the user already exists in ThoughtSpot and the `auto_create` parameter is set to `true`, user properties such as display name, email, and group assignment will be updated. To add a new user and assign privileges, the `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege is required. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled, the `CONTROL_TRUSTED_AUTH`(**Can Enable or Disable Trusted Authentication**) privilege is required. #### Important point to note All options in the token creation APIs that define user access to data in ThoughtSpot will take effect during token creation, not when the token is used for authentication. For example, `auto_create:true` will create the user when the authentication token is created. + * @param getObjectAccessTokenRequest + */ + getObjectAccessToken(getObjectAccessTokenRequest, _options) { + const result = this.api.getObjectAccessToken(getObjectAccessTokenRequest, _options); + return result.toPromise(); + } + /** + * Version: 10.13.0.cl or later Breaks down a natural language query into a series of smaller analytical sub-questions, each mapped to a relevant data source. Requires `CAN_USE_SPOTTER` privilege and at least view-level access to the referenced metadata objects. #### Usage guidelines The request must include: - `query`: the natural language question to decompose into analytical sub-questions - `metadata_context`: at least one of the following context identifiers to guide question generation: - `conversation_identifier` — an existing conversation session ID - `answer_identifiers` — a list of Answer GUIDs - `liveboard_identifiers` — a list of Liveboard GUIDs - `data_source_identifiers` — a list of data source GUIDs Optional parameters for refining the output: - `ai_context`: additional context to improve response quality - `content` — supplementary text or CSV data as string input - `instructions` — custom text instructions for the AI system - `limit_relevant_questions`: maximum number of questions to return (default: `5`) - `bypass_cache`: if `true`, forces fresh computation instead of returning cached results If the request is successful, the API returns a list of relevant analytical questions, each containing: - `query`: the generated sub-question - `data_source_identifier`: the unique ID of the data source the question targets - `data_source_name`: the display name of the corresponding data source #### Error responses | Code | Description | |------|---------------------------------------------------------------------------------------------------------------------------------------| | 401 | Unauthorized — authentication token is missing, expired, or invalid. | | 403 | Forbidden — the authenticated user does not have `CAN_USE_SPOTTER` privilege or lacks view access to the referenced metadata objects. | > ###### Note: > * This endpoint is currently in Beta. Breaking changes may be introduced before the endpoint is made Generally Available. > * This endpoint requires Spotter - please contact ThoughtSpot support to enable Spotter on your cluster. + * @param getRelevantQuestionsRequest + */ + getRelevantQuestions(getRelevantQuestionsRequest, _options) { + const result = this.api.getRelevantQuestions(getRelevantQuestionsRequest, _options); + return result.toPromise(); + } + /** + * Version: 9.0.0.cl or later Retrieves the current configuration details of the cluster. If the request is successful, the API returns a list configuration settings applied on the cluster. Requires `ADMINISTRATION`(**Can administer ThoughtSpot**) privilege to view these complete configuration settings of the cluster. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `SYSTEM_INFO_ADMINISTRATION` (**Can view system activities**) privilege is required. This API does not require any parameters to be passed in the request. + */ + getSystemConfig(_options) { + const result = this.api.getSystemConfig(_options); + return result.toPromise(); + } + /** + * Version: 9.0.0.cl or later Gets system information such as the release version, locale, time zone, deployment environment, date format, and date time format of the cluster. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privileges. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `SYSTEM_INFO_ADMINISTRATION` (**Can view system activities**) privilege is required. This API does not require any parameters to be passed in the request. + */ + getSystemInformation(_options) { + const result = this.api.getSystemInformation(_options); + return result.toPromise(); + } + /** + * Version: 9.2.0.cl or later Gets a list of configuration overrides applied on the cluster. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `APPLICATION_ADMINISTRATION` (**Can manage application settings**) privilege is required. This API does not require any parameters to be passed in the request. + */ + getSystemOverrideInfo(_options) { + const result = this.api.getSystemOverrideInfo(_options); + return result.toPromise(); + } + /** + * Version: 9.0.0.cl or later Imports [TML](https://docs.thoughtspot.com/cloud/latest/tml) files into ThoughtSpot. Requires `DATAMANAGEMENT` (**Can manage data**) or `ADMINISTRATION` (**Can administer ThoughtsSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the following Data control privileges may be required: - `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) - `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` (**Can manage data models**) #### Usage guidelines * Import all related objects in a single TML Import API call. For example, Tables that use the same Connection object and Worksheets connected to these Tables. * Include the `fqn` property to distinguish objects that have the same name. For example, if you have multiple Connections or Worksheets with the same name on ThoughtSpot and the Connection or Worksheet referenced in your TML file does not have a unique name to distinguish, it may result in invalid object references. Adding `fqn` helps ThoughtSpot differentiate a Table from another with the same name. We recommend [exporting TML with FQNs](#/http/api-endpoints/metadata/export-metadata-tml) and using these during the import operation. * You can upload multiple TML files at a time. If you import a Worksheet along with Liveboards, Answers, and other dependent objects in a single API call, the imported objects will be immediately available for use. When you import only a Worksheet object, it may take some time for the Worksheet to become available in the ThoughtSpot system. Please wait for a few minutes, and then proceed to create an Answer and Liveboard from the newly imported Worksheet. For more information, see [TML Documentation](https://developers.thoughtspot.com/docs/tml#_import_a_tml). + * @param importMetadataTMLRequest + */ + importMetadataTML(importMetadataTMLRequest, _options) { + const result = this.api.importMetadataTML(importMetadataTMLRequest, _options); + return result.toPromise(); + } + /** + * Version: 10.4.0.cl or later Schedules a task to import [TML](https://docs.thoughtspot.com/cloud/latest/tml) files into ThoughtSpot. You can use this API endpoint to process TML objects asynchronously when importing TMLs of large and complex metadata objects into ThoughtSpot. Unlike the synchronous import TML operation, the API processes TML data in the background and returns a task ID, which can be used to check the status of the import task via `/api/rest/2.0/metadata/tml/async/status` API endpoint. Requires `DATAMANAGEMENT` (**Can manage data**) or `ADMINISTRATION` (**Can administer ThoughtsSpot**) privilege, and edit access to the TML objects. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the following Data control privileges may be required: - `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) - `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` (**Can manage data models**) #### Usage guidelines See [Async TML API Documentation](https://developers.thoughtspot.com/docs/tml#_import_tml_objects_asynchronously) for usage guidelines. + * @param importMetadataTMLAsyncRequest + */ + importMetadataTMLAsync(importMetadataTMLAsyncRequest, _options) { + const result = this.api.importMetadataTMLAsync(importMetadataTMLAsyncRequest, _options); + return result.toPromise(); + } + /** + * Version: 9.0.0.cl or later Imports group objects from external databases into ThoughtSpot. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `GROUP_ADMINISTRATION` (**Can manage groups**) privilege is required. During the import operation: * If the specified group is not available in ThoughtSpot, it will be added to ThoughtSpot. * If `delete_unspecified_groups` is set to `true`, the groups not specified in the API request, excluding administrator and system user groups, are deleted. * If the specified groups are already available in ThoughtSpot, the object properties of these groups are modified and synchronized as per the input data in the API request. A successful API call returns the object that represents the changes made in the ThoughtSpot system. + * @param importUserGroupsRequest + */ + importUserGroups(importUserGroupsRequest, _options) { + const result = this.api.importUserGroups(importUserGroupsRequest, _options); + return result.toPromise(); + } + /** + * Version: 9.0.0.cl or later Imports user data from external databases into ThoughtSpot. During the user import operation: * If the specified users are not available in ThoughtSpot, the users are created and assigned a default password. Defining a `default_password` in the API request is optional. * If `delete_unspecified_users` is set to `true`, the users not specified in the API request, excluding the `tsadmin`, `guest`, `system` and `su` users, are deleted. * If the specified user objects are already available in ThoughtSpot, the object properties are updated and synchronized as per the input data in the API request. A successful API call returns the object that represents the changes made in the ThoughtSpot system. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `USER_ADMINISTRATION` (**Can manage users**) privilege is required. + * @param importUsersRequest + */ + importUsers(importUsersRequest, _options) { + const result = this.api.importUsers(importUsersRequest, _options); + return result.toPromise(); + } + /** + * Version: 9.0.0.cl or later Creates a login session for a ThoughtSpot user with Basic authentication. In Basic authentication method, REST clients log in to ThoughtSpot using `username` and `password` attributes. On a multi-tenant cluster with Orgs, users can pass the ID of the Org in the API request to log in to a specific Org context. **Note**: If Multi-Factor Authentication (MFA) is enabled on your instance, the API login request with basic authentication (`username` and `password` ) returns an error. Contact ThoughtSpot Support for assistance. A successful login returns a session cookie that can be used in your subsequent API requests. + * @param loginRequest + */ + login(loginRequest, _options) { + const result = this.api.login(loginRequest, _options); + return result.toPromise(); + } + /** + * Version: 9.0.0.cl or later Logs out a user from their current session. + */ + logout(_options) { + const result = this.api.logout(_options); + return result.toPromise(); + } + /** + * Version: 26.3.0.cl or later This API allows the addition or deletion of object level privileges for a set of users and groups, on a set of metadata objects. It provides users to access certain features based on privilege based access control. #### Usage guidelines - Specify the `operation`. The supported operations are: `ADD`, `REMOVE`. - Specify the type of the objects on which the object privileges are being provided in `metadata_type`. Only `LOGICAL_TABLE` metadata type is supported for now. It may be extended for other metadata types in future. - Specify the list of object privilege types in the `object_privilege_types` array. The supported object privilege types are: `SPOTTER_COACHING_PRIVILEGE`. - Specify the identifiers (either GUID or name) for the metadata objects in the `metadata_identifiers` array. - Specify the `type` (`USER` or `USER_GROUP`) and `identifier` (either GUID or name) of the principals to which you want to apply the given operation and given object privileges in the `principals` array. - Ensure using correct Authorization Bearer Token corresponding to specific user & org. #### Example request ```json { \"operation\": \"operation-type\", \"metadata_type\": \"metadata-type\", \"object_privilege_types\": [\"privilege-type-1\", \"privilege-type-2\"], \"metadata_identifiers\": [\"metadata-guid-or-name-1\", \"metadata-guid-or-name-1\"], \"principals\": [ { \"type\": \"type-1\", \"identifier\": \"principal-guid-or-name-1\" }, { \"type\": \"type-2\", \"identifier\": \"principal-guid-or-name-2\" } ] } ``` > ###### Note: > * Only admin users, users with edit access and users with coaching privilege on a given data-model can add or remove principals related to SPOTTER_COACHING_PRIVILEGE + * @param manageObjectPrivilegeRequest + */ + manageObjectPrivilege(manageObjectPrivilegeRequest, _options) { + const result = this.api.manageObjectPrivilege(manageObjectPrivilegeRequest, _options); + return result.toPromise(); + } + /** + * Parameterize fields in metadata objects. Version: 10.9.0.cl or later **Note:** This API endpoint is deprecated and will be removed from ThoughtSpot in a future release. Use [POST /api/rest/2.0/metadata/parameterize-fields](/api/rest/2.0/metadata/parameterize-fields) instead. Allows parameterizing fields in metadata objects in ThoughtSpot. Requires appropriate permissions to modify the metadata object. The API endpoint allows parameterizing the following types of metadata objects: * Logical Tables * Connections * Connection Configs For a Logical Table the field type must be `ATTRIBUTE` and field name can be one of: * databaseName * schemaName * tableName For a Connection or Connection Config, the field type is always `CONNECTION_PROPERTY`. In this case, field_name specifies the exact property of the Connection or Connection Config that needs to be parameterized. For Connection Config, the only supported field name is: * impersonate_user + * @param parameterizeMetadataRequest + */ + parameterizeMetadata(parameterizeMetadataRequest, _options) { + const result = this.api.parameterizeMetadata(parameterizeMetadataRequest, _options); + return result.toPromise(); + } + /** + * Parameterize multiple fields of metadata objects. For example [schemaName, databaseName] for LOGICAL_TABLE. Version: 26.5.0.cl or later Allows parameterizing multiple fields of metadata objects in ThoughtSpot. For example, you can parameterize [schemaName, databaseName] for LOGICAL_TABLE. Requires appropriate permissions to modify the metadata object. The API endpoint allows parameterizing the following types of metadata objects: * Logical Tables * Connections * Connection Configs For a Logical Table, the field type must be `ATTRIBUTE` and field names can include: * databaseName * schemaName * tableName For a Connection or Connection Config, the field type is always `CONNECTION_PROPERTY`. In this case, field_names specifies the exact properties of the Connection or Connection Config that need to be parameterized. For Connection Config, supported field names include: * impersonate_user You can parameterize multiple fields at once by providing an array of field names. + * @param parameterizeMetadataFieldsRequest + */ + parameterizeMetadataFields(parameterizeMetadataFieldsRequest, _options) { + const result = this.api.parameterizeMetadataFields(parameterizeMetadataFieldsRequest, _options); + return result.toPromise(); + } + /** + * Version: 26.5.0.cl or later Allows publishing metadata objects across organizations in ThoughtSpot. Requires ADMINISTRATION role and TENANT scope. The API endpoint allows publishing the following types of metadata objects: * Liveboards * Answers * Logical Tables This API will essentially share the objects along with it\'s dependencies to the org admins of the orgs to which it is being published. + * @param publishMetadataRequest + */ + publishMetadata(publishMetadataRequest, _options) { + const result = this.api.publishMetadata(publishMetadataRequest, _options); + return result.toPromise(); + } + /** + * Update values for a variable Version: 26.4.0.cl or later Allows updating values for a specific variable in ThoughtSpot. Requires ADMINISTRATION role. The CAN_MANAGE_VARIABLES permission allows you to manage Formula Variables in the current organization scope. The API endpoint allows: * Adding new values to the variable * Replacing existing values * Deleting values from the variable * Resetting all values When updating variable values, you need to specify: * The variable identifier (ID or name) * The values to add/replace/remove * The operation to perform (ADD, REPLACE, REMOVE, RESET) Behaviour based on operation type: * ADD - Adds values to the variable if this is a list type variable, else same as replace. * REPLACE - Replaces all values of a given set of constraints with the current set of values. * REMOVE - Removes any values which match the set of conditions of the variables if this is a list type variable, else clears value. * RESET - Removes all constraints for the given variable, scope is ignored + * @param identifier Unique ID or name of the variable + * @param putVariableValuesRequest + */ + putVariableValues(identifier, putVariableValuesRequest, _options) { + const result = this.api.putVariableValues(identifier, putVariableValuesRequest, _options); + return result.toPromise(); + } + /** + * Version: 10.7.0.cl or later **Deprecated** — Use `getRelevantQuestions` instead (available from 10.13.0.cl). Breaks down a topical or goal-oriented natural language question into smaller, actionable analytical sub-questions, each mapped to a relevant data source for independent execution. Requires `CAN_USE_SPOTTER` privilege and at least view-level access to the referenced metadata objects. #### Usage guidelines The request accepts the following parameters: - `nlsRequest`: contains the user `query` to decompose, along with optional `instructions` and `bypassCache` flag - `worksheetIds`: list of data source identifiers to scope the decomposition - `answerIds`: list of Answer GUIDs whose data guides the response - `liveboardIds`: list of Liveboard GUIDs whose data guides the response - `conversationId`: an existing conversation session ID for context continuity - `content`: supplementary text or CSV data to improve response quality - `maxDecomposedQueries`: maximum number of sub-questions to return (default: `5`) If the request is successful, the API returns a `decomposedQueryResponse` containing a list of `decomposedQueries`, each with: - `query`: the generated analytical sub-question - `worksheetId`: the unique ID of the data source the question targets - `worksheetName`: the display name of the corresponding data source #### Error responses | Code | Description | |------|---------------------------------------------------------------------------------------------------------------------------------------| | 401 | Unauthorized — authentication token is missing, expired, or invalid. | | 403 | Forbidden — the authenticated user does not have `CAN_USE_SPOTTER` privilege or lacks view access to the referenced metadata objects. | > ###### Note: > * This endpoint is deprecated since 10.13.0.cl. Use `getRelevantQuestions` for new integrations. > * This endpoint is currently in Beta. Breaking changes may be introduced before the endpoint is made Generally Available. > * This endpoint requires Spotter — please contact ThoughtSpot support to enable Spotter on your cluster. + * @param queryGetDecomposedQueryRequest + */ + queryGetDecomposedQuery(queryGetDecomposedQueryRequest, _options) { + const result = this.api.queryGetDecomposedQuery(queryGetDecomposedQueryRequest, _options); + return result.toPromise(); + } + /** + * Version: 9.0.0.cl or later Resets the password of a user account. Administrators can reset password on behalf of a user. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `USER_ADMINISTRATION` (**Can manage users**) privilege is required. + * @param resetUserPasswordRequest + */ + resetUserPassword(resetUserPasswordRequest, _options) { + const result = this.api.resetUserPassword(resetUserPasswordRequest, _options); + return result.toPromise(); + } + /** + * Version: 9.2.0.cl or later Reverts TML objects to a previous commit specified in the API request. Requires at least edit access to objects. In the API request, specify the `commit_id`. If the branch name is not specified in the request, the API will consider the default branch configured on your instance. By default, the API reverts all objects. If the revert operation fails for one of the objects provided in the commit, the API returns an error and does not revert any object. For more information, see [Git integration documentation](https://developers.thoughtspot.com/docs/git-integration). + * @param commitId Commit id to which the object should be reverted + * @param revertCommitRequest + */ + revertCommit(commitId, revertCommitRequest, _options) { + const result = this.api.revertCommit(commitId, revertCommitRequest, _options); + return result.toPromise(); + } + /** + * Version: 26.2.0.cl or later Revokes OAuth refresh tokens for users who no longer require access to a data warehouse connection. When a token is revoked, the affected user\'s session for that connection is terminated, and they must re-authenticate to regain access. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) or `DATAMANAGEMENT` (**Can manage data**) privileges. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on the ThoughtSpot instance, users with `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) privilege can also make API requests to revoke tokens for connection users. #### Usage guidelines You can specify different combinations of identifiers to control which refresh tokens are revoked. - **connection_identifier**: Revokes refresh tokens for all users of the connection, except the connection author. - **connection_identifier** and **user_identifiers**: Revokes refresh tokens only for the users specified in the request. If the name or ID of the connection author is included in the request, their token will also be revoked. - **connection_identifier** and **configuration_identifiers**: Revokes refresh tokens for all users on the specified configurations, except the configuration author. - **connection_identifier**, **configuration_identifiers**, and **user_identifiers**: Revokes refresh tokens for the specified users on the specified configurations. - **connection_identifier** and **org_identifiers**: Revokes refresh tokens for the specified Orgs. Applicable only for published connections. - **connection_identifier**, **org_identifiers**, and **user_identifiers**: Revokes refresh tokens for the specified users in the specified Orgs. Applicable only for published connections. **NOTE**: The `org_identifiers` parameter is only applicable for published connections. Using this parameter for unpublished connections will result in an error. Ensure that the connections are published before making the API request. + * @param connectionIdentifier Unique ID or name of the connection whose refresh tokens need to be revoked. All the users associated with the connection will have their refresh tokens revoked except the author. + * @param revokeRefreshTokensRequest + */ + revokeRefreshTokens(connectionIdentifier, revokeRefreshTokensRequest, _options) { + const result = this.api.revokeRefreshTokens(connectionIdentifier, revokeRefreshTokensRequest, _options); + return result.toPromise(); + } + /** + * Version: 9.0.0.cl or later Revokes the authentication token issued for current user session. The token of your current session expires when you make a call to the `/api/rest/2.0/auth/token/revoke` endpoint. the users will not be able to access ThoughtSpot objects until a new token is obtained. To restart your session, request for a new token from ThoughtSpot. See [Get Full Access Token](#/http/api-endpoints/authentication/get-full-access-token). + * @param revokeTokenRequest + */ + revokeToken(revokeTokenRequest, _options) { + const result = this.api.revokeToken(revokeTokenRequest, _options); + return result.toPromise(); + } + /** + * Version: 26.6.0.cl or later Returns the authentication configuration for the specified auth type at cluster and org level. Currently supports `TRUSTED_AUTH`. #### Required privileges Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) or `CONTROL_TRUSTED_AUTH` (**Can Enable or Disable Trusted Authentication**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled, the `CONTROL_TRUSTED_AUTH` privilege is required. #### Usage guidelines Use `scope` to control which level of settings are returned: - `CLUSTER` — Returns cluster-level authentication status and access tokens. Accessible only from the Primary Org. - `ORG` — Returns org-level authentication status and access tokens for the current Org. Requires the per-Org authentication feature to be enabled on your instance. - If `scope` is omitted, both cluster and org-level settings are returned based on the caller\'s org context and feature availability. The `access_tokens` array in `cluster_preferences` or `org_preferences` is omitted when no token is configured at that level. **Note**: Access tokens returned in the response are sensitive credentials. Treat them with the same care as passwords. + * @param searchAuthSettingsRequest + */ + searchAuthSettings(searchAuthSettingsRequest, _options) { + const result = this.api.searchAuthSettings(searchAuthSettingsRequest, _options); + return result.toPromise(); + } + /** + * Version: 10.12.0.cl or later Gets a list of [custom calendars](https://docs.thoughtspot.com/cloud/latest/connections-cust-cal). Requires `DATAMANAGEMENT` (**Can manage data**) or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your ThoughtSpot instance, the `CAN_MANAGE_CUSTOM_CALENDAR` (**Can manage custom calendars**) privilege is required. #### Usage guidelines By default, the API returns a list of custom calendars for all connection objects. To retrieve custom calendar details for a particular connection, specify the connection ID. You can also use other search parameters such as `name_pattern` and `sort_options` as search filters. The `name_pattern` parameter filters and returns only those objects that match the specified pattern. Use `%` as a wildcard for pattern matching. + * @param searchCalendarsRequest + */ + searchCalendars(searchCalendarsRequest, _options) { + const result = this.api.searchCalendars(searchCalendarsRequest, _options); + return result.toPromise(); + } + /** + * Version: 26.4.0.cl or later Searches delivery history for communication channels such as webhooks. Returns channel-level delivery status for each job execution record. Use this to monitor channel health and delivery success rates across events. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) or `DEVELOPER` (**Has developer privilege**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, users with `CAN_MANAGE_WEBHOOKS` (**Can manage webhooks**) privilege are also authorized to perform this action. **NOTE**: When `channel_type` is `WEBHOOK`, the following constraints apply: - `job_ids`, `channel_identifiers`, and `events` each accept at most one element. - When `job_ids` is provided, it is used as the sole lookup key and other filter fields are ignored. - When `job_ids` is not provided, `channel_identifiers` and `events` are both required, each containing exactly one element. - Records older than the configured retention period are not returned. - Use `start_epoch_time_in_millis` and/or `end_epoch_time_in_millis` to narrow results to a specific time window. + * @param searchChannelHistoryRequest + */ + searchChannelHistory(searchChannelHistoryRequest, _options) { + const result = this.api.searchChannelHistory(searchChannelHistoryRequest, _options); + return result.toPromise(); + } + /** + * Version: 26.4.0.cl or later Gets a list of collections available in ThoughtSpot. To get details of a specific collection, specify the collection GUID or name. You can also filter the API response based on the collection name pattern, author, and other criteria. #### Search options * **name_pattern**: Use \'%\' as a wildcard character to match collection names * **collection_identifiers**: Search for specific collections by their GUIDs or names * **include_metadata**: When set to `true`, includes the metadata objects within each collection in the response **NOTE**: If the API returns an empty list, consider increasing the value of the `record_size` parameter. To search across all available collections, set `record_size` to `-1`. + * @param searchCollectionsRequest + */ + searchCollections(searchCollectionsRequest, _options) { + const result = this.api.searchCollections(searchCollectionsRequest, _options); + return result.toPromise(); + } + /** + * Version: 9.2.0.cl or later Gets a list of commits for a given metadata object. Requires `DATAMANAGEMENT` (**Can manage data**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance on your instance, the `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` (**Can manage data models**) privilege and edit access to the metadata objects. + * @param searchCommitsRequest + */ + searchCommits(searchCommitsRequest, _options) { + const result = this.api.searchCommits(searchCommitsRequest, _options); + return result.toPromise(); + } + /** + * Version: 10.14.0.cl or later Fetch communication channel preferences. - Use `cluster_preferences` to fetch the default preferences for your ThoughtSpot application instance. - If your instance has [Orgs](https://docs.thoughtspot.com/cloud/latest/orgs-overview), use `org_preferences` to fetch any Org-specific preferences that override the defaults. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) or `DEVELOPER` (**Has developer privilege**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, users with `APPLICATION_ADMINISTRATION` (**Can manage application settings**) privilege are also authorized to perform this action. + * @param searchCommunicationChannelPreferencesRequest + */ + searchCommunicationChannelPreferences(searchCommunicationChannelPreferencesRequest, _options) { + const result = this.api.searchCommunicationChannelPreferences(searchCommunicationChannelPreferencesRequest, _options); + return result.toPromise(); + } + /** + * Version: 9.2.0.cl or later Gets Git repository connections configured on the ThoughtSpot instance. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance on your instance, the `CAN_SETUP_VERSION_CONTROL` (**Can set up version control**) privilege. + * @param searchConfigRequest + */ + searchConfig(searchConfigRequest, _options) { + const result = this.api.searchConfig(searchConfigRequest, _options); + return result.toPromise(); + } + /** + * Version: 9.2.0.cl or later Gets connection objects. Requires `DATAMANAGEMENT` (**Can manage data**) or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) privilege is required. - To get a list of all connections available in the ThoughtSpot system, send the API request without any attributes in the request body. - To get the connection objects for a specific type of data warehouse, specify the type in `data_warehouse_types`. - To fetch details of a connection object, specify the connection object GUID or name. The `name_pattern` attribute allows passing partial text with `%` for a wildcard match. - To get details of the database, schemas, tables, or columns from a data connection object, specify `data_warehouse_object_type`. - To get a specific database, schema, table, or column from a connection object, define the object type in `data_warehouse_object_type` and object properties in the `data_warehouse_objects` array. For example, to search for a column, you must pass the database, schema, and table names in the API request. Note that in the following example, object properties are set in a hierarchical order (`database` > `schema` > `table` > `column`). ``` { \"connections\": [ { \"identifier\": \"b9d1f2ef-fa65-4a4b-994e-30fa2d57b0c2\", \"data_warehouse_objects\": [ { \"database\": \"NEBULADEV\", \"schema\": \"INFORMATION_SCHEMA\", \"table\": \"APPLICABLE_ROLES\", \"column\": \"ROLE_NAME\" } ] } ], \"data_warehouse_object_type\": \"COLUMN\" } ``` - To fetch data by `configuration`, specify `data_warehouse_object_type`. For example, to fetch columns from the `DEVELOPMENT` database, specify the `data_warehouse_object_type` as `DATABASE` and define the `configuration` string as `{\"database\":\"DEVELOPMENT\"}`. To get column data for a specific table, specify the table, for example,`{\"database\":\"RETAILAPPAREL\",\"table\":\"PIPES\"}`. - To query connections by `authentication_type`, specify `data_warehouse_object_type`. Supported values for `authentication_type` are: - `SERVICE_ACCOUNT`: For connections that require service account credentials to authenticate to the Cloud Data Warehouse and fetch data. - `OAUTH`: For connections that require OAuth credentials to authenticate to the Cloud Data Warehouse and fetch data. Teradata, Oracle, and Presto Cloud Data Warehouses do not support the OAuth authentication type. - `IAM`: For connections that have the IAM OAuth set up. This authentication type is supported on Amazon Redshift connections only. - `EXTOAUTH`: For connections that have External OAuth set up. ThoughtSpot supports external [OAuth with Microsoft Azure Active Directory (AD)](https://docs.thoughtspot.com/cloud/latest/ connections-snowflake-azure-ad-oauth) and [Okta for Snowflake data connections](https://docs.thoughtspot.com/cloud/latest/connections-snowflake-okta-oauth). - `KEY_PAIR`: For connections that require Key Pair account credentials to authenticate to the Cloud Data Warehouse and fetch data. This authentication type is supported on Snowflake connections only. - `OAUTH_WITH_PKCE`: For connections that require OAuth with PKCE account credentials to authenticate to the Cloud Data Warehouse and fetch data. This authentication type is supported on Snowflake, Starburst, Databricks, Denodo connections only. - `EXTOAUTH_WITH_PKCE`: For connections that require External OAuth With PKCE account credentials to authenticate to the Cloud Data Warehouse and fetch data. This authentication type is supported on Snowflake connections only. - `OAUTH_WITH_PEZ`: For connections that require OAuth With PEZ account credentials to authenticate to the Cloud Data Warehouse and fetch data. This authentication type is supported on Amazon Redshift connections only. - `OAUTH_WITH_SERVICE_PRINCIPAL`: For connections that require OAuth With Service Principal account credentials to authenticate to the Cloud Data Warehouse and fetch data. This authentication type is supported on Databricks connections only. - `PERSONAL_ACCESS_TOKEN`: For connections that require Personal Access Token account credentials to authenticate to the Cloud Data Warehouse and fetch data. This authentication type is supported on Databricks connections only. - `OAUTH_CLIENT_CREDENTIALS`: For connections that require OAuth Client Credentials to authenticate to the Cloud Data Warehouse and fetch data. This authentication type is supported on Snowflake connections only. - To include more details about connection objects in the API response, set `include_details` to `true`. - You can also sort the output by field names and filter connections by tags. **NOTE**: When filtering connection records by parameters other than `data_warehouse_types` or `tag_identifiers`, ensure that you set `record_size` to `-1` and `record_offset` to `0` for precise results. + * @param searchConnectionRequest + */ + searchConnection(searchConnectionRequest, _options) { + const result = this.api.searchConnection(searchConnectionRequest, _options); + return result.toPromise(); + } + /** + * Version: 9.6.0.cl or later Gets custom actions configured on the cluster. Requires `DEVELOPER` (**Has Developer privilege**) or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `DEVELOPER` (**Has developer privilege**) privilege is required. + * @param searchCustomActionsRequest + */ + searchCustomActions(searchCustomActionsRequest, _options) { + const result = this.api.searchCustomActions(searchCustomActionsRequest, _options); + return result.toPromise(); + } + /** + * Version: 9.0.0.cl or later Generates an Answer from a given data source. Requires at least view access to the data source object (Worksheet or View). #### Usage guidelines To search data, specify the data source GUID in `logical_table_identifier`. The data source can be a Worksheet, View, Table, or SQL view. Pass search tokens in the `query_string` attribute in the API request as shown in the following example: ``` { \"query_string\": \"[sales] by [store]\", \"logical_table_identifier\": \"cd252e5c-b552-49a8-821d-3eadaa049cca\", } ``` For more information about the `query_string` format and data source attribute, see [Search data API](https://developers.thoughtspot.com/docs/fetch-data-and-report-apis#_search_data_api). The `record_size` attribute determines the number of records to retrieve in an API call. For more information about pagination, record size, and maximum row limit, see [Pagination and record size settings](https://developers.thoughtspot.com/docs/fetch-data-and-report-apis#_pagination_settings_for_data_and_report_api). + * @param searchDataRequest + */ + searchData(searchDataRequest, _options) { + const result = this.api.searchData(searchDataRequest, _options); + return result.toPromise(); + } + /** + * Version: 10.10.0.cl or later Search the email customization configuration if any set for the ThoughtSpot system. #### Pre-requisites Requires `DEVELOPER` (**has developer privilege**) or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `DEVELOPER` (**Has developer privilege**) privilege is required. **NOTE**:This endpoint in currently in beta. Contact ThoughtSpot support to enable this on your instance. + * @param searchEmailCustomizationRequest + */ + searchEmailCustomization(searchEmailCustomizationRequest, _options) { + const result = this.api.searchEmailCustomization(searchEmailCustomizationRequest, _options); + return result.toPromise(); + } + /** + * Version: 9.0.0.cl or later Gets a list of metadata objects available on the ThoughtSpot system. This API endpoint is available to all users who have view access to the object. Users with `ADMINISTRATION` (**Can administer ThoughtSpot**) privileges can view data for all metadata objects, including users and groups. #### Usage guidelines - To get all metadata objects, send the API request without any attributes. - To get metadata objects of a specific type, set the `type` attribute. For example, to fetch a Worksheet, set the type as `LOGICAL_TABLE`. - To filter metadata objects within type `LOGICAL_TABLE`, set the `subtypes` attribute. For example, to fetch a Worksheet, set the type as `LOGICAL_TABLE` & subtypes as `[WORKSHEET]`. - To get a specific metadata object, specify the GUID. - To customize your search and filter the API response, you can use several parameters. You can search for objects created or modified by specific users, by tags applied to the objects, or by using the include parameters like `include_auto_created_objects`, `include_dependent_objects`, `include_headers`, `include_incomplete_objects`, and so on. You can also define sorting options to sort the data retrieved in the API response. - To get discoverable objects when linientmodel is enabled you can use `include_discoverable_objects` as true else false. Default value is true. - For liveboard metadata type, to get the newer format, set the `liveboard_response_format` as V2. Default value is V1. - To retrieve only objects that are published, set the `include_only_published_objects` as true. Default value is false. **NOTE**: The following parameters support pagination of metadata records: - `tag_identifiers` - `type` - `subtypes` - `created_by_user_identifiers` - `modified_by_user_identifiers` - `owned_by_user_identifiers` - `exclude_objects` - `include_auto_created_objects` - `favorite_object_options` - `include_only_published_objects` If you are using other parameters to search metadata, set `record_size` to `-1` and `record_offset` to `0`. + * @param searchMetadataRequest + */ + searchMetadata(searchMetadataRequest, _options) { + const result = this.api.searchMetadata(searchMetadataRequest, _options); + return result.toPromise(); + } + /** + * Version: 9.0.0.cl or later Gets a list of Orgs configured on the ThoughtSpot system. To get details of a specific Org, specify the Org ID or name. You can also pass parameters such as status, visibility, and user identifiers to get a specific list of Orgs. Requires cluster administration (**Can administer Org**) privileges. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `ORG_ADMINISTRATION` (**Can manage Orgs**) privilege is required. + * @param searchOrgsRequest + */ + searchOrgs(searchOrgsRequest, _options) { + const result = this.api.searchOrgs(searchOrgsRequest, _options); + return result.toPromise(); + } + /** + * Version: 9.5.0.cl or later Gets a list of Role objects from the ThoughtSpot system. Available if [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance. To search for Roles, the `ROLE_ADMINISTRATION` (**Can manage roles**) privilege is required. To get details of a specific Role object, specify the GUID or name. You can also filter the API response based on user group and Org identifiers, privileges assigned to the Role, and deprecation status. + * @param searchRolesRequest + */ + searchRoles(searchRolesRequest, _options) { + const result = this.api.searchRoles(searchRolesRequest, _options); + return result.toPromise(); + } + /** + * Search Schedules Version: 9.4.0.cl or later Gets a list of scheduled jobs configured for a Liveboard. To get details of a specific scheduled job, specify the name or GUID of the scheduled job. Requires at least view access to Liveboards. **NOTE**: When filtering schedules by parameters other than `metadata`, set `record_size` to `-1` and `record_offset` to `0` for accurate results. + * @param searchSchedulesRequest + */ + searchSchedules(searchSchedulesRequest, _options) { + const result = this.api.searchSchedules(searchSchedulesRequest, _options); + return result.toPromise(); + } + /** + * Version: 26.2.0.cl or later Fetch security settings for your ThoughtSpot application instance. - Use `scope: CLUSTER` to retrieve cluster-level security settings, including CORS and CSP allowlists, SAML redirect URLs, and settings that control access to non-embedded pages. - Use `scope: ORG` to retrieve Org-level security settings. If your instance has [Orgs](https://docs.thoughtspot.com/cloud/latest/orgs-overview), this returns CORS and non-embed access settings specific to the Org. - If `scope` is not specified, returns both cluster and Org-specific settings based on user privileges. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) or `DEVELOPER` (**Has developer privilege**) privilege. See [Security Settings](https://developers.thoughtspot.com/docs/security-settings) for more details. + * @param searchSecuritySettingsRequest + */ + searchSecuritySettings(searchSecuritySettingsRequest, _options) { + const result = this.api.searchSecuritySettings(searchSecuritySettingsRequest, _options); + return result.toPromise(); + } + /** + * Version: 9.0.0.cl or later Gets a list of tag objects available on the ThoughtSpot system. To get details of a specific tag object, specify the GUID or name. Any authenticated user can search for tag objects. + * @param searchTagsRequest + */ + searchTags(searchTagsRequest, _options) { + const result = this.api.searchTags(searchTagsRequest, _options); + return result.toPromise(); + } + /** + * Version: 9.0.0.cl or later Gets a list of user group objects from the ThoughtSpot system. To get details of a specific user group, specify the user group GUID or name. You can also filter the API response based on User ID, Org ID, Role ID, type of group, sharing visibility, privileges assigned to the group, and the Liveboard IDs assigned to the users in the group. Available to all users. Users with `ADMINISTRATION` (**Can administer ThoughtSpot**) privileges can view all users properties. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `GROUP_ADMINISTRATION` (**Can manage groups**) privilege is required. **NOTE**: If you do not get precise results, try setting `record_size` to `-1` and `record_offset` to `0`. + * @param searchUserGroupsRequest + */ + searchUserGroups(searchUserGroupsRequest, _options) { + const result = this.api.searchUserGroups(searchUserGroupsRequest, _options); + return result.toPromise(); + } + /** + * Version: 9.0.0.cl or later Gets a list of users available on the ThoughtSpot system. To get details of a specific user, specify the user GUID or name. You can also filter the API response based on groups, Org ID, user visibility, account status, user type, and user preference settings and favorites. Available to all users. Users with `ADMINISTRATION` (**Can administer ThoughtSpot**) privileges can view all users properties. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `USER_ADMINISTRATION` (**Can manage users**) privilege is required. **NOTE**: If the API returns an empty list, consider increasing the value of the `record_size` parameter. To search across all available users, set `record_size` to `-1`. + * @param searchUsersRequest + */ + searchUsers(searchUsersRequest, _options) { + const result = this.api.searchUsers(searchUsersRequest, _options); + return result.toPromise(); + } + /** + * Search variables Version: 26.4.0.cl or later Allows searching for variables in ThoughtSpot. Requires ADMINISTRATION role. The CAN_MANAGE_VARIABLES permission allows you to manage Formula Variables in the current organization scope. The API endpoint supports searching variables by: * Variable identifier (ID or name) * Variable type * Name pattern (case-insensitive, supports % for wildcard) The search results can be formatted in three ways: * METADATA - Returns only variable metadata (default) * METADATA_AND_VALUES - Returns variable metadata and values The values can be filtered by scope: * org_identifier * principal_identifier * model_identifier + * @param searchVariablesRequest + */ + searchVariables(searchVariablesRequest, _options) { + const result = this.api.searchVariables(searchVariablesRequest, _options); + return result.toPromise(); + } + /** + * Version: 10.14.0.cl or later Searches for webhook configurations based on various criteria such as Org, webhook identifier, event type, with support for pagination and sorting. Returns matching webhook configurations with their complete details. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) or `DEVELOPER` (**Has developer privilege**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, users with `CAN_MANAGE_WEBHOOKS` (**Can manage webhooks**) privilege are also authorized to perform this action. + * @param searchWebhookConfigurationsRequest + */ + searchWebhookConfigurations(searchWebhookConfigurationsRequest, _options) { + const result = this.api.searchWebhookConfigurations(searchWebhookConfigurationsRequest, _options); + return result.toPromise(); + } + /** + * Version: 26.5.0.cl or later Sends natural language messages to an existing Spotter agent conversation and returns the complete response synchronously. Requires `CAN_USE_SPOTTER` privilege and access to the metadata object associated with the conversation. The user must have access to the conversation session referenced by `conversation_identifier`. A conversation must first be created using the `createAgentConversation` API. #### Usage guidelines The request must include: - `conversation_identifier`: the unique session ID returned by `createAgentConversation`, used for context continuity and message tracking - `messages`: an array of one or more text messages to send to the agent The API returns an array of response objects, each containing: - `type`: the kind of response — `text`, `answer`, or `error` - `message`: the main content of the response - `metadata`: additional information depending on the message type (e.g., answer metadata includes analytics and visualization details) #### Error responses | Code | Description | |------|----------------------------------------------------------------------------------------------------------------------------------| | 401 | Unauthorized — authentication token is missing, expired, or invalid. | | 403 | Forbidden — the authenticated user does not have `CAN_USE_SPOTTER` privilege or lacks permission on the referenced conversation. | > ###### Note: > > - This endpoint is Generally Available from version 26.5.0.cl. > - This endpoint requires Spotter - please contact ThoughtSpot support to enable Spotter on your cluster. > - For real-time streamed responses, use `sendAgentConversationMessageStreaming` instead. + * @param conversationIdentifier Unique identifier for the conversation (used to track context) + * @param sendAgentConversationMessageRequest + */ + sendAgentConversationMessage(conversationIdentifier, sendAgentConversationMessageRequest, _options) { + const result = this.api.sendAgentConversationMessage(conversationIdentifier, sendAgentConversationMessageRequest, _options); + return result.toPromise(); + } + /** + * Version: 26.5.0.cl or later Sends one or more natural language messages to an existing Spotter agent conversation and returns the response as a real-time Server-Sent Events stream. Requires `CAN_USE_SPOTTER` privilege and access to the metadata object associated with the conversation. The user must have access to the conversation session referenced by `conversation_identifier`. A conversation must first be created using the `createAgentConversation` API. #### Usage guidelines The request must include: - `conversation_identifier`: the unique session ID returned by `createAgentConversation`, used for context continuity and message tracking - `messages`: an array of one or more text messages to send to the agent If the request is valid, the API returns a Server-Sent Events (SSE) stream. Each line has the form `data: [{\"type\": \"...\", ...}]` — a JSON array of event objects. Event types include: - `ack`: confirms receipt of the request (`node_id`) - `conv_title`: conversation title (`title`, `conv_id`) - `notification`: status updates on operations (`group_id`, `metadata`, `code` — e.g. `TOOL_CALL_NOTIFICATION`, `nls_start`, `FINAL_RESPONSE_NOTIFICATION`) - `text-chunk`: incremental content chunks (`id`, `group_id`, `metadata` with `format` and `type` such as `thinking` or `text`, `content`) - `text`: full text block with same structure as `text-chunk` - `answer`: structured answer with metadata (`id`, `group_id`, `metadata` with `sage_query`, `session_id`, `title`, etc., `title`) - `error`: if a failure occurs #### Error responses | Code | Description | | ---- | -------------------------------------------------------------------------------------------------------------------------------- | | 401 | Unauthorized — authentication token is missing, expired, or invalid. | | 403 | Forbidden — the authenticated user does not have `CAN_USE_SPOTTER` privilege or lacks permission on the referenced conversation. | > ###### Note: > > - This endpoint is Generally Available from version 26.5.0.cl. > - This endpoint requires Spotter - please contact ThoughtSpot support to enable Spotter on your cluster. > - The streaming protocol uses Server-Sent Events (SSE). > - For the complete response in a single payload, use `sendAgentConversationMessage` instead. + * @param conversationIdentifier Unique identifier for the conversation (used to track context) + * @param sendAgentConversationMessageStreamingRequest + */ + sendAgentConversationMessageStreaming(conversationIdentifier, sendAgentConversationMessageStreamingRequest, _options) { + const result = this.api.sendAgentConversationMessageStreaming(conversationIdentifier, sendAgentConversationMessageStreamingRequest, _options); + return result.toPromise(); + } + /** + * Version: 26.2.0.cl or later **Deprecated** — Use `sendAgentConversationMessage` instead. Send natural language messages to an existing Spotter agent conversation and returns the complete response synchronously. Requires `CAN_USE_SPOTTER` privilege and access to the metadata object associated with the conversation. The user must have access to the conversation session referenced by `conversation_identifier`. A conversation must first be created using the `createAgentConversation` API. #### Usage guidelines The request must include: - `conversation_identifier`: the unique session ID returned by `createAgentConversation`, used for context continuity and message tracking - `messages`: an array of one or more text messages to send to the agent The API returns an array of response objects, each containing: - `type`: the kind of response — `text`, `answer`, or `error` - `message`: the main content of the response - `metadata`: additional information depending on the message type (e.g., answer metadata includes analytics and visualization details) #### Error responses | Code | Description | |------|----------------------------------------------------------------------------------------------------------------------------------| | 401 | Unauthorized — authentication token is missing, expired, or invalid. | | 403 | Forbidden — the authenticated user does not have `CAN_USE_SPOTTER` privilege or lacks permission on the referenced conversation. | > ###### Note: > > - This endpoint is deprecated. Use `sendAgentConversationMessage` for new integrations. > - This endpoint is currently in Beta. Breaking changes may be introduced before the endpoint is made Generally Available. > - This endpoint requires Spotter - please contact ThoughtSpot support to enable Spotter on your cluster. + * @param conversationIdentifier Unique identifier for the conversation (used to track context) + * @param sendAgentMessageRequest + */ + sendAgentMessage(conversationIdentifier, sendAgentMessageRequest, _options) { + const result = this.api.sendAgentMessage(conversationIdentifier, sendAgentMessageRequest, _options); + return result.toPromise(); + } + /** + * Version: 26.2.0.cl or later **Deprecated** — Use `sendAgentConversationMessageStreaming` instead. Sends one or more natural language messages to an existing Spotter agent conversation and returns the response as a real-time Server-Sent Events stream. Requires `CAN_USE_SPOTTER` privilege and access to the metadata object associated with the conversation. The user must have access to the conversation session referenced by `conversation_identifier`. A conversation must first be created using the `createAgentConversation` API. #### Usage guidelines The request must include: - `conversation_identifier`: the unique session ID returned by `createAgentConversation`, used for context continuity and message tracking - `messages`: an array of one or more text messages to send to the agent If the request is valid, the API returns a Server-Sent Events (SSE) stream. Each line has the form `data: [{\"type\": \"...\", ...}]` — a JSON array of event objects. Event types include: - `ack`: confirms receipt of the request (`node_id`) - `conv_title`: conversation title (`title`, `conv_id`) - `notification`: status updates on operations (`group_id`, `metadata`, `code` — e.g. `TOOL_CALL_NOTIFICATION`, `nls_start`, `FINAL_RESPONSE_NOTIFICATION`) - `text-chunk`: incremental content chunks (`id`, `group_id`, `metadata` with `format` and `type` such as `thinking` or `text`, `content`) - `text`: full text block with same structure as `text-chunk` - `answer`: structured answer with metadata (`id`, `group_id`, `metadata` with `sage_query`, `session_id`, `title`, etc., `title`) - `error`: if a failure occurs #### Error responses | Code | Description | |------|----------------------------------------------------------------------------------------------------------------------------------| | 401 | Unauthorized — authentication token is missing, expired, or invalid. | | 403 | Forbidden — the authenticated user does not have `CAN_USE_SPOTTER` privilege or lacks permission on the referenced conversation. | > ###### Note: > > - This endpoint is deprecated. Use `sendAgentConversationMessageStreaming` for new integrations. > - This endpoint is currently in Beta. Breaking changes may be introduced before the endpoint is made Generally Available. > - This endpoint requires Spotter - please contact ThoughtSpot support to enable Spotter on your cluster. > - The streaming protocol uses Server-Sent Events (SSE). + * @param sendAgentMessageStreamingRequest + */ + sendAgentMessageStreaming(sendAgentMessageStreamingRequest, _options) { + const result = this.api.sendAgentMessageStreaming(sendAgentMessageStreamingRequest, _options); + return result.toPromise(); + } + /** + * Version: 10.4.0.cl or later Sends a follow-up message to an existing conversation within the context of a data model. Requires `CAN_USE_SPOTTER` privilege and at least view access to the metadata object specified in the request. A conversation must first be created using the `createConversation` API. #### Usage guidelines The request must include: - `conversation_identifier`: the unique session ID returned by `createConversation` - `metadata_identifier`: the unique ID of the data source used for the conversation - `message`: a natural language string with the follow-up question If the request is successful, the API returns an array of response messages, each containing: - `session_identifier`: the unique ID of the generated response - `generation_number`: the generation number of the response - `message_type`: the type of the response (e.g., `TSAnswer`) - `visualization_type`: the generated visualization type (`Chart`, `Table`, or `Undefined`) - `tokens` / `display_tokens`: the search tokens and user-friendly display tokens for the response #### Error responses | Code | Description | |------|-----------------------------------------------------------------------------------------------------------------------------------------| | 401 | Unauthorized — authentication token is missing, expired, or invalid. | | 403 | Forbidden — the authenticated user does not have `CAN_USE_SPOTTER` privilege or lacks view permission on the specified metadata object. | > ###### Note: > * This endpoint is currently in Beta. Breaking changes may be introduced before the endpoint is made Generally Available. > * This endpoint requires Spotter - please contact ThoughtSpot support to enable Spotter on your cluster. + * @param conversationIdentifier Unique identifier of the conversation. + * @param sendMessageRequest + */ + sendMessage(conversationIdentifier, sendMessageRequest, _options) { + const result = this.api.sendMessage(conversationIdentifier, sendMessageRequest, _options); + return result.toPromise(); + } + /** + * Version: 10.15.0.cl or later This API allows users to set natural language (NL) instructions for a specific data-model to improve AI-generated answers and query processing. These instructions help guide the AI system to better understand the data context and provide more accurate responses. Requires `CAN_USE_SPOTTER` privilege, either edit access or `SPOTTER_COACHING_PRIVILEGE` on the data model, and a bearer token corresponding to the org where the data model exists. #### Usage guidelines To set NL instructions for a data-model, the request must include: - `data_source_identifier`: The unique ID of the data-model for which to set NL instructions - `nl_instructions_info`: An array of instruction objects, each containing: - `instructions`: Array of text instructions for the LLM - `scope`: The scope of the instruction (`GLOBAL`). Currently only `GLOBAL` is supported. It can be extended to data-model-user scope in future. #### Instructions scope - **GLOBAL**: instructions that apply to all users querying this data model If the request is successful, the API returns: - `success`: a boolean indicating whether the operation completed successfully #### Error responses | Code | Description | |------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| | 401 | Unauthorized — authentication token is missing, expired, or invalid. | | 403 | Forbidden — the authenticated user does not have `CAN_USE_SPOTTER` privilege, lacks edit access or `SPOTTER_COACHING_PRIVILEGE` on the data model, or the bearer token does not correspond to the org where the data model exists. | > ###### Note: > > - To use this API, the user needs either edit access or `SPOTTER_COACHING_PRIVILEGE` on the data model, and must use the bearer token corresponding to the org where the data model exists. > - This endpoint is currently in Beta. Breaking changes may be introduced before the endpoint is made Generally Available. > - Available from version 10.15.0.cl and later. > - This endpoint requires Spotter — please contact ThoughtSpot Support to enable Spotter on your cluster. > - Instructions help improve the accuracy and relevance of AI-generated responses for the specified data-model. + * @param setNLInstructionsRequest + */ + setNLInstructions(setNLInstructionsRequest, _options) { + const result = this.api.setNLInstructions(setNLInstructionsRequest, _options); + return result.toPromise(); + } + /** + * Version: 9.0.0.cl or later Allows sharing one or several metadata objects with users and groups in ThoughtSpot. Requires edit access to the metadata object. #### Supported metadata objects: * Liveboards * Visualizations * Answers * Models * Views * Connections * Collections #### Object permissions You can provide `READ_ONLY` or `MODIFY` access when sharing an object with another user or group. The `READ_ONLY` permission grants view access to the shared object, whereas `MODIFY` provides edit access. To prevent a user or group from accessing the shared object, specify the GUID or name of the principal and set `shareMode` to `NO_ACCESS`. #### Sharing a visualization * Sharing a visualization implicitly shares the entire Liveboard with the recipient. * Object permissions set for a shared visualization also apply to the Liveboard unless overridden by another API request or via UI. * If email notifications for object sharing are enabled, a notification with a link to the shared visualization will be sent to the recipient’s email address. Although this link opens the shared visualization, recipients can also access other visualizations in the Liveboard. #### Sharing a collection Collections support **dual permissions** that provide fine-grained control: * **Collection permissions** (`share_mode`) - controls access to the collection itself (view, edit, delete the collection) * **Content permissions** (`content_share_mode`) - controls access to objects within the collection (view, edit objects inside) **Default Behavior:** - If only `share_mode` is specified, the content permissions default to `READ_ONLY` (except when `share_mode` is `NO_ACCESS`, then content also gets `NO_ACCESS`) - To give users edit access to collection contents, explicitly set `content_share_mode: \"MODIFY\"` ## Examples The following JSON examples can be copy-pasted as request bodies for the REST v2 API endpoint: ```bash POST /callosum/v1/v2/security/metadata/share Content-Type: application/x-www-form-urlencoded ``` ### Basic collection sharing Share a collection with read-only access: ```json { \"metadata_type\": \"COLLECTION\", \"metadata_identifiers\": [\"Sales Reports Collection\"], \"permissions\": [{ \"principal\": { \"type\": \"USER\", \"identifier\": \"alice@company.com\" }, \"share_mode\": \"READ_ONLY\" }], \"notification\": { \"message\": \"I\'ve shared the Sales Reports collection with you\", \"notify_on_share\": true } } ``` ### Collection sharing with dual permissions Share a collection with different permissions for the collection vs. its contents: ```json { \"metadata_type\": \"COLLECTION\", \"metadata_identifiers\": [\"Marketing Analytics\"], \"permissions\": [{ \"principal\": { \"type\": \"USER\", \"identifier\": \"bob@company.com\" }, \"share_mode\": \"MODIFY\", \"content_share_mode\": \"READ_ONLY\" }, { \"principal\": { \"type\": \"USER_GROUP\", \"identifier\": \"Marketing Team\" }, \"share_mode\": \"READ_ONLY\", \"content_share_mode\": \"READ_ONLY\" }], \"notification\": { \"emails\": [\"bob@company.com\"], \"message\": \"You can edit the collection but content is read-only\", \"enable_custom_url\": false, \"notify_on_share\": true }, \"has_lenient_discoverability\": false } ``` ### Multiple collections sharing Share multiple collections with different users: ```json { \"metadata\": [ { \"type\": \"COLLECTION\", \"identifier\": \"Q4 Reports\" }, { \"type\": \"COLLECTION\", \"identifier\": \"Executive Dashboard Collection\" } ], \"permissions\": [{ \"principal\": { \"type\": \"USER_GROUP\", \"identifier\": \"Executives\" }, \"share_mode\": \"MODIFY\" }, { \"principal\": { \"type\": \"USER\", \"identifier\": \"manager@company.com\" }, \"share_mode\": \"READ_ONLY\", \"content_share_mode\": \"MODIFY\" }], \"notification\": { \"message\": \"Sharing quarterly collections with leadership team\", \"notify_on_share\": true } } ``` ### Remove collection access Remove access to a collection by setting share_mode to NO_ACCESS: ```json { \"metadata_type\": \"COLLECTION\", \"metadata_identifiers\": [\"Confidential Reports\"], \"permissions\": [{ \"principal\": { \"type\": \"USER\", \"identifier\": \"former-employee@company.com\" }, \"share_mode\": \"NO_ACCESS\" }], \"notification\": { \"notify_on_share\": false } } ``` ### Collection Permission Scenarios **Scenario 1: Collection Admin** - `share_mode: MODIFY` + `content_share_mode: MODIFY` = Full control over collection and its contents **Scenario 2: Collection Curator** - `share_mode: MODIFY` + `content_share_mode: READ_ONLY` = Can manage collection structure but not edit contents **Scenario 3: Content Editor** - `share_mode: READ_ONLY` + `content_share_mode: MODIFY` = Can edit objects within collection but can\'t change collection itself **Scenario 4: Viewer** - `share_mode: READ_ONLY` + `content_share_mode: READ_ONLY` = View-only access to collection and contents + * @param shareMetadataRequest + */ + shareMetadata(shareMetadataRequest, _options) { + const result = this.api.shareMetadata(shareMetadataRequest, _options); + return result.toPromise(); + } + /** + * Version: 10.4.0.cl or later Processes a natural language query against a specified data model and returns a single AI-generated answer without requiring a conversation session. Requires `CAN_USE_SPOTTER` privilege and at least view access to the metadata object specified in the request. #### Usage guidelines The request must include: - `query`: a natural language question (e.g., \"What were total sales last quarter?\") - `metadata_identifier`: the unique ID of the data source to query against If the request is successful, the API returns a response message containing: - `session_identifier`: the unique ID of the generated response - `generation_number`: the generation number of the response - `message_type`: the type of the response (e.g., `TSAnswer`) - `visualization_type`: the generated visualization type (`Chart`, `Table`, or `Undefined`) - `tokens` / `display_tokens`: the search tokens and user-friendly display tokens for the response #### Error responses | Code | Description | |------|-----------------------------------------------------------------------------------------------------------------------------------------| | 401 | Unauthorized — authentication token is missing, expired, or invalid. | | 403 | Forbidden — the authenticated user does not have `CAN_USE_SPOTTER` privilege or lacks view permission on the specified metadata object. | > ###### Note: > * This endpoint is currently in Beta. Breaking changes may be introduced before the endpoint is made Generally Available. > * This endpoint requires Spotter - please contact ThoughtSpot support to enable Spotter on your cluster. + * @param singleAnswerRequest + */ + singleAnswer(singleAnswerRequest, _options) { + const result = this.api.singleAnswer(singleAnswerRequest, _options); + return result.toPromise(); + } + /** + * Stops an in-progress agent conversation response. Version: 26.6.0.cl or later Version: 26.6.0.cl or later Stops an in-progress agent response for the specified conversation. Use this endpoint to cancel a response that is actively being generated — for example, when the user navigates away, reformulates their question, or no longer needs the current result. Requires `CAN_USE_SPOTTER` privilege and access to the specified conversation. #### Usage guidelines The request must include: - `conversation_identifier` *(path parameter)*: the unique ID of the conversation whose active response should be stopped, as returned by `createAgentConversation` A successful request returns an empty `204 No Content` response. If there is no active response in progress at the time of the call, the request is still treated as successful. After stopping a response, the conversation session remains active. You can continue sending messages using `sendAgentConversationMessage` or `sendAgentConversationMessageStreaming`. #### Example request ```bash POST /api/rest/2.0/ai/agent/conversation/{conversation_identifier}/stop-response ``` #### Typical usage scenario This endpoint is useful when integrating Spotter into a chat UI where users can cancel a long-running query. For example: 1. User sends a message via `sendAgentConversationMessageStreaming`. 2. User clicks a \"Stop generating\" button while the response is streaming. 3. Your client calls `stopConversation` with the active `conversation_identifier`. 4. The stream is terminated and the user can ask a new question. #### Error responses | Code | Description | |------|-------------| | 401 | Unauthorized — authentication token is missing, expired, or invalid. | | 403 | Forbidden — the authenticated user does not have `CAN_USE_SPOTTER` privilege or lacks access to the specified conversation. | > ###### Note: > > - Calling this endpoint when no response is in progress does not return an error. > - The conversation context is preserved after stopping — previous messages and answers remain accessible. > - Available from version 26.6.0.cl and later. > - This endpoint requires Spotter — please contact ThoughtSpot Support to enable Spotter on your cluster. > - This feature is available only for **Spotter 3** (`SPOTTER3`) version. + * @param conversationIdentifier Unique identifier of the conversation to stop. + */ + stopConversation(conversationIdentifier, _options) { + const result = this.api.stopConversation(conversationIdentifier, _options); + return result.toPromise(); + } + /** + * Version: 26.5.0.cl or later Synchronizes connection metadata attributes from your Cloud Data Warehouse (CDW) with ThoughtSpot. Requires the `DATAMANAGEMENT` (**Can manage data**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` (**Can manage data models**) privilege is required. #### Usage guidelines To synchronize attributes from a CDW, specify the connection GUID or name in the `connection_identifier` path parameter and `sync_attributes` in the request body. Default attribute is `[\"DESCRIPTION\"]`. ##### Hierarchical schema * Connection: The connection object for the sync operation. * Tables: Tables for the sync operation. When no table is specified, all tables are synchronized. * Columns: If the table is specified, you can add the columns for the sync operation. If no columns are specified, all columns in the specified table are considered for the sync operation. To set the scope for the sync operation: * Connection-level: To sync all tables and columns, pass an empty request body, or only the attributes in the request body. * Table-level: To synchronize specific tables and their columns, specify the table identifiers in the `tables` array. * Column-level: To synchronize specific columns, specify the table identifier as the key and column identifiers as the value in the `tables` array. ``` { \"tables\": [ {\"table-guid-1\": [\"column-guid-1\", \"column-guid-2\"]}, \"table-guid-2\" ], \"sync_attributes\": [\"DESCRIPTION\"] } ``` ##### API response If the sync operation is successful, the API returns the following information: * Status of the sync operation. For example, `SUCCESS`, `PARTIAL_SUCCESS`, or `NO_UPDATE`. * Number of tables and columns that were updated. * Number of tables and columns with the sync failed status when the overall sync status is `PARTIAL_SUCCESS`. * Message text indicating the sync results. + * @param connectionIdentifier Unique ID or name of the connection. + * @param syncMetadataRequest + */ + syncMetadata(connectionIdentifier, syncMetadataRequest, _options) { + const result = this.api.syncMetadata(connectionIdentifier, syncMetadataRequest, _options); + return result.toPromise(); + } + /** + * Version: 9.0.0.cl or later Removes the tags applied to a Liveboard, Answer, Table, or Worksheet. Requires edit access to the metadata object. + * @param unassignTagRequest + */ + unassignTag(unassignTagRequest, _options) { + const result = this.api.unassignTag(unassignTagRequest, _options); + return result.toPromise(); + } + /** + * Remove parameterization from fields in metadata objects. Version: 26.5.0.cl or later Allows removing parameterization from fields in metadata objects in ThoughtSpot. Requires appropriate permissions to modify the metadata object. The API endpoint allows unparameterizing the following types of metadata objects: * Logical Tables * Connections * Connection Configs For a Logical Table the field type must be `ATTRIBUTE` and field name can be one of: * databaseName * schemaName * tableName For a Connection or Connection Config, the field type is always `CONNECTION_PROPERTY`. In this case, field_name specifies the exact property of the Connection or Connection Config that needs to be unparameterized. For Connection Config, the only supported field name is: * impersonate_user + * @param unparameterizeMetadataRequest + */ + unparameterizeMetadata(unparameterizeMetadataRequest, _options) { + const result = this.api.unparameterizeMetadata(unparameterizeMetadataRequest, _options); + return result.toPromise(); + } + /** + * Version: 26.5.0.cl or later Allows unpublishing metadata objects from organizations in ThoughtSpot. Requires ADMINISTRATION role and TENANT scope. The API endpoint allows unpublishing the following types of metadata objects: * Liveboards * Answers * Logical Tables When unpublishing objects, you can: * Include dependencies by setting `include_dependencies` to true - this will unpublish all dependent objects if no other published object is using them * Force unpublish by setting `force` to true - this will break all dependent objects in the unpublished organizations + * @param unpublishMetadataRequest + */ + unpublishMetadata(unpublishMetadataRequest, _options) { + const result = this.api.unpublishMetadata(unpublishMetadataRequest, _options); + return result.toPromise(); + } + /** + * Version: 10.12.0.cl or later Updates the properties of a [custom calendar](https://docs.thoughtspot.com/cloud/latest/connections-cust-cal). Requires `DATAMANAGEMENT` (**Can manage data**) or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your ThoughtSpot instance, the `CAN_MANAGE_CUSTOM_CALENDAR` (**Can manage custom calendars**) privilege is required. #### Usage guidelines You can update the properties of a calendar using one of the following methods: * `FROM_INPUT_PARAMS` to update the calendar properties with the values defined in the API request. * `FROM_EXISTING_TABLE` Creates a calendar from the parameters defined in the API request. To update a custom calendar, specify the calendar ID as a path parameter in the request URL and the following parameters in the request body: * Connection ID and Table name * Database and schema name attributes: For most Cloud Data Warehouse (CDW) connectors, both `database_name` and `schema_name` attributes are required. However, the attribute requirements are conditional and vary based on the connector type and its metadata structure. For example, for connectors such as Teradata, MySQL, SingleSore, Amazon Aurora MySQL, Amazon RDS MySQL, Oracle, and GCP_MYSQL, the `schema_name` is required, whereas the `database_name` attribute is not. Similarly, connectors such as ClickHouse require you to specify the `database_name` and the schema specification in such cases is optional. The API allows you to modify the calendar type, month offset value, start and end date, starting day of the week, and prefixes assigned to the year and quarter labels. #### Examples Update a custom calendar using an existing Table in ThoughtSpot: ``` { \"update_method\": \"FROM_EXISTING_TABLE\", \"table_reference\": { \"connection_identifier\": \"Connection1\", \"database_name\": \"db1\", \"table_name\": \"custom_calendar_2025\", \"schame_name\": \"schemaVar\" } } ``` Update a custom calendar with the attributes defined in the API request: ``` { \"update_method\": \"FROM_INPUT_PARAMS\", \"table_reference\": { \"connection_identifier\": \"Connection1\", \"database_name\": \"db1\", \"table_name\": \"custom_calendar_2025\", \"schame_name\": \"schemaVar\" }, \"month_offset\": \"August\", \"start_day_of_week\": \"Monday\", \"start_date\": \"08/01/2025\", \"end_date\": \"07/31/2026\" } ``` + * @param calendarIdentifier Unique Id or name of the calendar. + * @param updateCalendarRequest + */ + updateCalendar(calendarIdentifier, updateCalendarRequest, _options) { + const result = this.api.updateCalendar(calendarIdentifier, updateCalendarRequest, _options); + return result.toPromise(); + } + /** + * Version: 26.4.0.cl or later Updates an existing collection in ThoughtSpot. #### Supported operations This API endpoint lets you perform the following operations: * Update collection name and description * Change visibility settings * Add metadata objects to the collection (operation: ADD) * Remove metadata objects from the collection (operation: REMOVE) * Replace all metadata objects in the collection (operation: REPLACE) #### Operation types * **ADD**: Adds the specified metadata objects to the existing collection without removing current items * **REMOVE**: Removes only the specified metadata objects from the collection * **REPLACE**: Replaces all existing metadata objects with the specified items (default behavior) + * @param collectionIdentifier Unique GUID of the collection. Note: Collection names cannot be used as identifiers since duplicate names are allowed. + * @param updateCollectionRequest + */ + updateCollection(collectionIdentifier, updateCollectionRequest, _options) { + const result = this.api.updateCollection(collectionIdentifier, updateCollectionRequest, _options); + return result.toPromise(); + } + /** + * Version: 10.12.0.cl or later Creates, updates, or deletes column security rules for specified tables. This API endpoint allows you to create, update, or delete column-level security rules on columns of a table. The operation follows an \"all or none\" policy: if defining security rules for any of the provided columns fails, the entire operation will be rolled back, and no rules will be created. #### Usage guidelines - Provide table identifier using either `identifier` (GUID or name) or `obj_identifier` (object ID) - Use `clear_csr: true` to remove all column security rules from the table - For each column, specify the security rule using `column_security_rules` array - Use `is_unsecured: true` to mark a specific column as unprotected - Use `group_access` operations to manage group associations: - `ADD`: Add groups to the column\'s access list - `REMOVE`: Remove groups from the column\'s access list - `REPLACE`: Replace all existing groups with the specified groups #### Required permissions - `ADMINISTRATION` - Can administer ThoughtSpot - `DATAMANAGEMENT` - Can manage data (if RBAC is disabled) - `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` - Can manage worksheet views and tables (if RBAC is enabled) #### Example request ```json { \"identifier\": \"table-guid\", \"obj_identifier\": \"table-object-id\", \"clear_csr\": false, \"column_security_rules\": [ { \"column_identifier\": \"col id or col name\", \"is_unsecured\": false, \"group_access\": [ { \"operation\": \"ADD\", \"group_identifiers\": [\"hr_group_id\", \"hr_group_name\", \"finance_group_id\"] } ] }, { \"column_identifier\": \"col id or col name\", \"is_unsecured\": true }, { \"column_identifier\": \"col id or col name\", \"is_unsecured\": false, \"group_access\": [ { \"operation\": \"REPLACE\", \"group_identifiers\": [\"management_group_id\", \"management_group_name\"] } ] } ] } ``` #### Request Body Schema - `identifier` (string, optional): GUID or name of the table for which we want to create column security rules - `obj_identifier` (string, optional): The object ID of the table - `clear_csr` (boolean, optional): If true, then all the secured columns will be marked as unprotected, and all the group associations will be removed - `column_security_rules` (array of objects, required): An array where each object defines the security rule for a specific column Each column security rule object contains: - `column_identifier` (string, required): Column identifier (col_id or name) - `is_unsecured` (boolean, optional): If true, the column will be marked as unprotected and all groups associated with it will be removed - `group_access` (array of objects, optional): Array of group operation objects Each group operation object contains: - `operation` (string, required): Operation type - ADD, REMOVE, or REPLACE - `group_identifiers` (array of strings, required): Array of group identifiers (name or GUID) on which the operation will be performed #### Response This API does not return any response body. A successful operation returns HTTP 200 status code. #### Operation Types - **ADD**: Adds the specified groups to the column\'s access list - **REMOVE**: Removes the specified groups from the column\'s access list - **REPLACE**: Replaces all existing groups with the specified groups + * @param updateColumnSecurityRulesRequest + */ + updateColumnSecurityRules(updateColumnSecurityRulesRequest, _options) { + const result = this.api.updateColumnSecurityRules(updateColumnSecurityRulesRequest, _options); + return result.toPromise(); + } + /** + * Version: 9.2.0.cl or later Updates Git repository configuration settings. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance on your instance, the `CAN_SETUP_VERSION_CONTROL` (**Can set up version control**) privilege. + * @param updateConfigRequest + */ + updateConfig(updateConfigRequest, _options) { + const result = this.api.updateConfig(updateConfigRequest, _options); + return result.toPromise(); + } + /** + * Version: 9.2.0.cl or later **Important**: This endpoint is deprecated and will be removed from ThoughtSpot in September 2025. ThoughtSpot strongly recommends using the [Update connection V2](#/http/api-endpoints/connections/update-connection-v2) endpoint to update your connection objects. #### Usage guidelines Updates a connection object. Requires `DATAMANAGEMENT` (**Can manage data**) and edit permissions to the connection object, or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) privilege is required. To update a connection object, pass these parameters in your API request: 1. GUID of the connection object. 2. If you are updating tables or database schema of a connection object: a. Add the updated JSON map of metadata with database, schema, and tables in `data_warehouse_config`. b. Set `validate` to `true`. 3. If you are updating a configuration attribute, connection name, or description, you can set `validate` to `false`. + * @param updateConnectionRequest + */ + updateConnection(updateConnectionRequest, _options) { + const result = this.api.updateConnection(updateConnectionRequest, _options); + return result.toPromise(); + } + /** + * Version: 10.12.0.cl or later Updates a connection configuration object. Requires `DATAMANAGEMENT` (**Can manage data**) and edit permissions to the connection object, or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) privilege is required. #### Supported operations This API endpoint lets you perform the following operations in a single API request: * Edit the name or description of the configuration * Edit the configuration properties * Edit the `policy_type` * Edit the type of authentication * Enable or disable a configuration #### Parameterized Connection Support For parameterized oauth based connections, only the `same_as_parent` and `policy_process_options` attributes are allowed. These attributes are not applicable to connections that are not parameterized. **NOTE**: When updating a configuration where `disabled` is `true`, you must reset `disabled` to `true` in your update request payload. If not explicitly set again, the API will default `disabled` to `false`. + * @param configurationIdentifier Unique ID or name of the configuration. + * @param updateConnectionConfigurationRequest + */ + updateConnectionConfiguration(configurationIdentifier, updateConnectionConfigurationRequest, _options) { + const result = this.api.updateConnectionConfiguration(configurationIdentifier, updateConnectionConfigurationRequest, _options); + return result.toPromise(); + } + /** + * Version: 26.6.0.cl or later Activates or deactivates a connection. A deactivated connection cannot be used for queries or operations until it is activated again. Requires `DATAMANAGEMENT` (**Can manage data**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) privilege is required. Only the connection owner or an administrator can perform this operation. #### Usage guidelines To update the status of a connection, specify the connection GUID or name in the `connection_identifier` path parameter and the desired `status` in the request body. - **ACTIVATED**: Enables the connection. Queries and operations can resume on an activated connection. - **DEACTIVATED**: Disables the connection. It does not remove the connection metadata, but only makes the connection unavailable for queries and operations. You can reactivate a deactivated connection by setting \"status\": \"ACTIVATED\". + * @param connectionIdentifier Unique ID or name of the connection. + * @param updateConnectionStatusRequest + */ + updateConnectionStatus(connectionIdentifier, updateConnectionStatusRequest, _options) { + const result = this.api.updateConnectionStatus(connectionIdentifier, updateConnectionStatusRequest, _options); + return result.toPromise(); + } + /** + * Version: 10.4.0.cl or later Updates a connection object. Requires `DATAMANAGEMENT` (**Can manage data**) and edit permissions to the connection object, or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) privilege is required. To update a connection object, pass these parameters in your API request: 1. GUID of the connection object. 2. If you are updating tables or database schema of a connection object: a. Add the updated JSON map of metadata with database, schema, and tables in `data_warehouse_config`. b. Set `validate` to `true`. **NOTE:** If the `authentication_type` is anything other than SERVICE_ACCOUNT, you must explicitly provide the authenticationType property in the payload. If you do not specify authenticationType, the API will default to SERVICE_ACCOUNT as the authentication type. * A JSON map of configuration attributes, database details, and table properties in `data_warehouse_config` as shown in the following example: * This is an example of updating a single table in a empty connection: ``` { \"authenticationType\": \"SERVICE_ACCOUNT\", \"externalDatabases\": [ { \"name\": \"DEVELOPMENT\", \"isAutoCreated\": false, \"schemas\": [ { \"name\": \"TS_dataset\", \"tables\": [ { \"name\": \"DEMORENAME\", \"type\": \"TABLE\", \"description\": \"\", \"selected\": true, \"linked\": true, \"gid\": 0, \"datasetId\": \"-1\", \"subType\": \"\", \"reportId\": \"\", \"viewId\": \"\", \"columns\": [ { \"name\": \"Col1\", \"type\": \"VARCHAR\", \"canImport\": true, \"selected\": true, \"description\": \"\", \"isLinkedActive\": true, \"isAggregate\": false }, { \"name\": \"Col2\", \"type\": \"VARCHAR\", \"canImport\": true, \"selected\": true, \"description\": \"\", \"isLinkedActive\": true, \"isAggregate\": false }, { \"name\": \"Col3\", \"type\": \"VARCHAR\", \"canImport\": true, \"selected\": true, \"description\": \"\", \"isLinkedActive\": true, \"isAggregate\": false }, { \"name\": \"Col312\", \"type\": \"VARCHAR\", \"canImport\": true, \"selected\": true, \"description\": \"\", \"isLinkedActive\": true, \"isAggregate\": false }, { \"name\": \"Col4\", \"type\": \"VARCHAR\", \"canImport\": true, \"selected\": true, \"description\": \"\", \"isLinkedActive\": true, \"isAggregate\": false } ], \"relationships\": [] } ] } ] } ], \"configuration\": { \"password\": \"\", \"database\": \"DEVELOPMENT\", \"role\": \"DEV\", \"accountName\": \"thoughtspot_partner\", \"warehouse\": \"DEMO_WH\", \"user\": \"DEV_USER\" } } ``` * This is an example of updating a single table in an existing connection with tables: ``` { \"authenticationType\": \"SERVICE_ACCOUNT\", \"externalDatabases\": [ { \"name\": \"DEVELOPMENT\", \"isAutoCreated\": false, \"schemas\": [ { \"name\": \"TS_dataset\", \"tables\": [ { \"name\": \"CUSTOMER\", \"type\": \"TABLE\", \"description\": \"\", \"selected\": true, \"linked\": true, \"gid\": 0, \"datasetId\": \"-1\", \"subType\": \"\", \"reportId\": \"\", \"viewId\": \"\", \"columns\": [], \"relationships\": [] }, { \"name\": \"tpch5k_falcon_default_schema_users\", \"type\": \"TABLE\", \"description\": \"\", \"selected\": true, \"linked\": true, \"gid\": 0, \"datasetId\": \"-1\", \"subType\": \"\", \"reportId\": \"\", \"viewId\": \"\", \"columns\": [ { \"name\": \"user_id\", \"type\": \"INT64\", \"canImport\": true, \"selected\": true, \"description\": \"\", \"isLinkedActive\": true, \"isAggregate\": false }, { \"name\": \"product_id\", \"type\": \"INT64\", \"canImport\": true, \"selected\": true, \"description\": \"\", \"isLinkedActive\": true, \"isAggregate\": false }, { \"name\": \"user_cost\", \"type\": \"INT64\", \"canImport\": true, \"selected\": true, \"description\": \"\", \"isLinkedActive\": true, \"isAggregate\": false } ], \"relationships\": [] } ] } ] } ], \"configuration\": { \"password\": \"\", \"database\": \"DEVELOPMENT\", \"role\": \"DEV\", \"accountName\": \"thoughtspot_partner\", \"warehouse\": \"DEMO_WH\", \"user\": \"DEV_USER\" } } ``` 3. If you are updating a configuration attribute, connection name, or description, you can set `validate` to `false`. **NOTE:** If the `authentication_type` is anything other than SERVICE_ACCOUNT, you must explicitly provide the authenticationType property in the payload. If you do not specify authenticationType, the API will default to SERVICE_ACCOUNT as the authentication type. * A JSON map of configuration attributes in `data_warehouse_config`. The following example shows the configuration attributes for a Snowflake connection: ``` { \"configuration\":{ \"accountName\":\"thoughtspot_partner\", \"user\":\"tsadmin\", \"password\":\"TestConn123\", \"role\":\"sysadmin\", \"warehouse\":\"MEDIUM_WH\" }, \"externalDatabases\":[ ] } ``` + * @param connectionIdentifier Unique ID or name of the connection. + * @param updateConnectionV2Request + */ + updateConnectionV2(connectionIdentifier, updateConnectionV2Request, _options) { + const result = this.api.updateConnectionV2(connectionIdentifier, updateConnectionV2Request, _options); + return result.toPromise(); + } + /** + * Version: 9.6.0.cl or later Updates a custom action. Requires `DEVELOPER` (**Has Developer privilege**) or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `DEVELOPER` (**Has developer privilege**) privilege is required. #### Usage Guidelines The API allows you to modify the following properties: * Name of the custom action * Action availability to groups * Association to metadata objects * Authentication settings for a URL-based action For more information, see [Custom actions](https://developers.thoughtspot.com/docs/custom-action-intro). + * @param customActionIdentifier Unique ID or name of the custom action. + * @param updateCustomActionRequest + */ + updateCustomAction(customActionIdentifier, updateCustomActionRequest, _options) { + const result = this.api.updateCustomAction(customActionIdentifier, updateCustomActionRequest, _options); + return result.toPromise(); + } + /** + * Version: 9.9.0.cl or later Updates a DBT connection object. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege or `DATAMANAGEMENT` (**Can manage data ThoughtSpot**) privilege, along with an existing DBT connection. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the following data control privileges may be required: - `CAN_MANAGE_CUSTOM_CALENDAR`(**Can manage custom calendars**) - `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) - `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` (**Can manage data models**) #### About update DBT connection You can modify DBT connection object properties such as embrace connection name, embrace database name, import type, account identifier, access token, project identifier and environment (or) embrace connection, embrace database name, import type, file_content settings. + * @param dbtConnectionIdentifier Unique ID of the DBT Connection. + * @param connectionName Name of the connection. + * @param databaseName Name of the Database. + * @param importType Mention type of Import + * @param accessToken Access token is mandatory when Import_Type is DBT_CLOUD. + * @param dbtUrl DBT URL is mandatory when Import_Type is DBT_CLOUD. + * @param accountId Account ID is mandatory when Import_Type is DBT_CLOUD + * @param projectId Project ID is mandatory when Import_Type is DBT_CLOUD + * @param dbtEnvId DBT Environment ID\\\" + * @param projectName Name of the project + * @param fileContent Upload DBT Manifest and Catalog artifact files as a ZIP file. This field is Mandatory when Import Type is \\\'ZIP_FILE\\\' + */ + updateDbtConnection(dbtConnectionIdentifier, connectionName, databaseName, importType, accessToken, dbtUrl, accountId, projectId, dbtEnvId, projectName, fileContent, _options) { + const result = this.api.updateDbtConnection(dbtConnectionIdentifier, connectionName, databaseName, importType, accessToken, dbtUrl, accountId, projectId, dbtEnvId, projectName, fileContent, _options); + return result.toPromise(); + } + /** + * Version: 10.12.0.cl or later Updates a customization configuration for the notification email. #### Pre-requisites Requires `DEVELOPER` (**has developer privilege**) or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `DEVELOPER` (**Has developer privilege**) privilege is required. **NOTE**:This endpoint in currently in beta. Contact ThoughtSpot support to enable this on your instance. #### Usage guidelines To update a custom configuration pass these parameters in your API request: - A JSON map of configuration attributes `template_properties`. The following example shows a sample set of customization configuration: ``` { { \"cta_button_bg_color\": \"#444DEA\", \"cta_text_font_color\": \"#FFFFFF\", \"primary_bg_color\": \"#D3DEF0\", \"logo_url\": \"https://storage.pardot.com/710713/1642089901EbkRibJq/TS_fullworkmark_darkmode.png\", \"font_family\": \"\", \"product_name\": \"ThoughtSpot\", \"footer_address\": \"444 Castro St, Suite 1000 Mountain View, CA 94041\", \"footer_phone\": \"(800) 508-7008\", \"replacement_value_for_liveboard\": \"Dashboard\", \"replacement_value_for_answer\": \"Chart\", \"replacement_value_for_spot_iq\": \"AI Insights\", \"hide_footer_phone\": false, \"hide_footer_address\": false, \"hide_product_name\": false, \"hide_manage_notification\": false, \"hide_mobile_app_nudge\": false, \"hide_privacy_policy\": false, \"hide_ts_vocabulary_definitions\": false, \"hide_error_message\": false, \"hide_unsubscribe_link\": false, \"hide_notification_status\": false, \"hide_modify_alert\": false, \"company_website_url\": \"https://your-website.com/\", \"company_privacy_policy_url\" : \"https://link-to-privacy-policy.com/\", \"contact_support_url\": \"https://link-to-contact-support.com/\", \"hide_contact_support_url\": false, \"hide_logo_url\" : false } } ``` + * @param updateEmailCustomizationRequest + */ + updateEmailCustomization(updateEmailCustomizationRequest, _options) { + const result = this.api.updateEmailCustomization(updateEmailCustomizationRequest, _options); + return result.toPromise(); + } + /** + * Update header attributes for a given list of header objects. Version: 10.6.0.cl or later ## Prerequisites - **Privileges Required:** - `DATAMANAGEMENT` (Can manage data) or `ADMINISTRATION` (Can administer ThoughtSpot). - **Additional Privileges (if RBAC is enabled):** - `ORG_ADMINISTRATION` (Can manage orgs). --- ## Usage Guidelines ### Parameters 1. **headers_update** - **Description:** List of header objects with their attributes to be updated. Each object contains a list of attributes to be updated in the header. - **Usage:** - You must provide either `identifier` or `obj_identifier`, but not both. Both fields cannot be empty. - When `org_identifier` is set to `-1`, only the `identifier` value is accepted; `obj_identifier` is not allowed. 2. **org_identifier** - **Description:** GUID (Globally Unique Identifier) or name of the organization. - **Usage:** - Leaving this field empty assumes that the changes should be applied to the current organization - Provide `org_guid` or `org_name` to uniquely identify the organization where changes need to be applied. . - Provide `-1` if changes have to be applied across all the org. --- ## Note Currently, this API is enabled only for updating the `obj_identifier` attribute. Only `text` will be allowed in attribute\'s value. ## Best Practices 1. **Backup Before Conversion:** Always export metadata as a backup before initiating the update process --- ## Examples ### Only `identifier` is given ```json { \"headers_update\": [ { \"identifier\": \"guid_1\", \"obj_identifier\": \"\", \"type\": \"LOGICAL_COLUMN\", \"attributes\": [ { \"name\": \"obj_id\", \"value\": \"custom_object_id\" } ] } ], \"org_identifier\": \"orgGuid\" } ``` ### Only `obj_identifier` is given ```json { \"headers_update\": [ { \"obj_identifier\": \"custom_object_id\", \"type\": \"ANSWER\", \"attributes\": [ { \"name\": \"obj_id\", \"value\": \"custom_object_id\" } ] } ], \"org_identifier\": \"orgName\" } ``` ### Executing update for all org `-1` ```json { \"headers_update\": [ { \"identifier\": \"guid_1\", \"type\": \"ANSWER\", \"attributes\": [ { \"name\": \"obj_id\", \"value\": \"custom_object_id\" } ] } ], \"org_identifier\": -1 } ``` ### Optional `type` is not provided ```json { \"headers_update\": [ { \"identifier\": \"guid_1\", \"attributes\": [ { \"name\": \"obj_id\", \"value\": \"custom_object_id\" } ] } ], \"org_identifier\": -1 } ``` + * @param updateMetadataHeaderRequest + */ + updateMetadataHeader(updateMetadataHeaderRequest, _options) { + const result = this.api.updateMetadataHeader(updateMetadataHeaderRequest, _options); + return result.toPromise(); + } + /** + * Update object IDs for given metadata objects. Version: 10.8.0.cl or later ## Prerequisites - **Privileges Required:** - `DATAMANAGEMENT` (Can manage data) or `ADMINISTRATION` (Can administer ThoughtSpot). - **Additional Privileges (if RBAC is enabled):** - `ORG_ADMINISTRATION` (Can manage orgs). --- ## Usage Guidelines ### Parameters 1. **metadata** - **Description:** List of metadata objects to update their object IDs. - **Usage:** - Use either `current_obj_id` alone OR use `metadata_identifier` with `type` (when needed). - When using `metadata_identifier`, the `type` field is required if using a name instead of a GUID. - The `new_obj_id` field is always required. --- ## Note This API is specifically designed for updating object IDs of metadata objects. It internally uses the header update mechanism to perform the changes. ## Best Practices 1. **Backup Before Update:** Always export metadata as a backup before initiating the update process. 2. **Validation:** - When using `current_obj_id`, ensure it matches the existing object ID exactly. - When using `metadata_identifier` with a name, ensure the `type` is specified correctly. - Verify that the `new_obj_id` follows your naming conventions and is unique within your system. --- ## Examples ### Using current_obj_id ```json { \"metadata\": [ { \"current_obj_id\": \"existing_object_id\", \"new_obj_id\": \"new_object_id\" } ] } ``` ### Using metadata_identifier with GUID ```json { \"metadata\": [ { \"metadata_identifier\": \"01234567-89ab-cdef-0123-456789abcdef\", \"new_obj_id\": \"new_object_id\" } ] } ``` ### Using metadata_identifier with name and type ```json { \"metadata\": [ { \"metadata_identifier\": \"My Answer\", \"type\": \"ANSWER\", \"new_obj_id\": \"new_object_id\" } ] } ``` ### Multiple objects update ```json { \"metadata\": [ { \"current_obj_id\": \"existing_object_id_1\", \"new_obj_id\": \"new_object_id_1\" }, { \"metadata_identifier\": \"My Worksheet\", \"type\": \"LOGICAL_TABLE\", \"new_obj_id\": \"new_object_id_2\" } ] } ``` + * @param updateMetadataObjIdRequest + */ + updateMetadataObjId(updateMetadataObjIdRequest, _options) { + const result = this.api.updateMetadataObjId(updateMetadataObjIdRequest, _options); + return result.toPromise(); + } + /** + * Version: 9.0.0.cl or later Updates an Org object. You can modify Org properties such as name, description, and user associations. Requires cluster administration (**Can administer Org**) privileges. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `ORG_ADMINISTRATION` (**Can manage Orgs**) privilege is required. + * @param orgIdentifier ID or name of the Org + * @param updateOrgRequest + */ + updateOrg(orgIdentifier, updateOrgRequest, _options) { + const result = this.api.updateOrg(orgIdentifier, updateOrgRequest, _options); + return result.toPromise(); + } + /** + * Version: 9.5.0.cl or later Updates the properties of a Role object. Available only if [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance. To update a Role, the `ROLE_ADMINISTRATION` (**Can manage roles**) privilege is required. + * @param roleIdentifier Unique ID or name of the Role. + * @param updateRoleRequest + */ + updateRole(roleIdentifier, updateRoleRequest, _options) { + const result = this.api.updateRole(roleIdentifier, updateRoleRequest, _options); + return result.toPromise(); + } + /** + * Update schedule. Version: 9.4.0.cl or later Updates a scheduled Liveboard job. Requires at least edit access to Liveboards. To update a schedule on behalf of another user, you need `ADMINISTRATION` (**Can administer Org**) or `JOBSCHEDULING` (**Can schedule for others**) privilege and edit access to the Liveboard. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `JOBSCHEDULING` (**Can schedule for others**) privilege is required. The API endpoint allows you to pause a scheduled job, change the status of a paused job. You can also edit the recipients list, frequency of the job, format of the file to send to the recipients in email notifications, PDF options, and time zone setting. + * @param scheduleIdentifier Unique ID or name of the schedule. + * @param updateScheduleRequest + */ + updateSchedule(scheduleIdentifier, updateScheduleRequest, _options) { + const result = this.api.updateSchedule(scheduleIdentifier, updateScheduleRequest, _options); + return result.toPromise(); + } + /** + * Version: 9.2.0.cl or later Updates the current configuration of the cluster. You must send the configuration data in JSON format. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privileges. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `APPLICATION_ADMINISTRATION` (**Can manage application settings**) privilege is required. + * @param updateSystemConfigRequest + */ + updateSystemConfig(updateSystemConfigRequest, _options) { + const result = this.api.updateSystemConfig(updateSystemConfigRequest, _options); + return result.toPromise(); + } + /** + * Version: 9.0.0.cl or later Updates a tag object. You can modify the `name` and `color` properties of a tag object. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `TAGMANAGEMENT` (**Can manage tags**) privilege is required to create, edit, and delete tags. + * @param tagIdentifier Name or Id of the tag. + * @param updateTagRequest + */ + updateTag(tagIdentifier, updateTagRequest, _options) { + const result = this.api.updateTag(tagIdentifier, updateTagRequest, _options); + return result.toPromise(); + } + /** + * Version: 9.0.0.cl or later Updates the properties of a user object. You can modify user properties such as username, email, and share notification settings. You can also assign new groups and Orgs, remove the user from a group or Org, reset password, and modify user preferences. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `USER_ADMINISTRATION` (**Can manage users**) privilege is required. + * @param userIdentifier GUID / name of the user + * @param updateUserRequest + */ + updateUser(userIdentifier, updateUserRequest, _options) { + const result = this.api.updateUser(userIdentifier, updateUserRequest, _options); + return result.toPromise(); + } + /** + * Version: 9.0.0.cl or later Updates the properties of a group object in ThoughtSpot. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `GROUP_ADMINISTRATION` (**Can manage groups**) privilege is required. #### Supported operations This API endpoint lets you perform the following operations in a single API request: * Edit [privileges](https://developers.thoughtspot.com/docs/?pageid=api-user-management#group-privileges) * Add or remove users * Change sharing visibility settings * Add or remove sub-groups * Assign a default Liveboard or update the existing settings + * @param groupIdentifier GUID or name of the group. + * @param updateUserGroupRequest + */ + updateUserGroup(groupIdentifier, updateUserGroupRequest, _options) { + const result = this.api.updateUserGroup(groupIdentifier, updateUserGroupRequest, _options); + return result.toPromise(); + } + /** + * Update a variable\'s name Version: 26.4.0.cl or later Allows updating a variable\'s name in ThoughtSpot. Requires ADMINISTRATION role and TENANT scope. The CAN_MANAGE_VARIABLES permission allows you to manage Formula Variables in the current organization scope. The API endpoint allows updating: * The variable name + * @param identifier Unique id or name of the variable to update. + * @param updateVariableRequest + */ + updateVariable(identifier, updateVariableRequest, _options) { + const result = this.api.updateVariable(identifier, updateVariableRequest, _options); + return result.toPromise(); + } + /** + * Update values for multiple variables Version: 10.14.0.cl or later **Note:** This API endpoint is deprecated and will be removed from ThoughtSpot in a future release. Use [POST /api/rest/2.0/template/variables/{identifier}/update-values](/api/rest/2.0/template/variables/%7Bidentifier%7D/update-values) instead. Allows updating values for multiple variables in ThoughtSpot. Requires ADMINISTRATION role. The CAN_MANAGE_VARIABLES permission allows you to manage Formula Variables in the current organization scope. The API endpoint allows: * Adding new values to variables * Replacing existing values * Deleting values from variables When updating variable values, you need to specify: * The variable identifiers * The values to add/replace/remove for each variable * The operation to perform (ADD, REPLACE, REMOVE, RESET) Behaviour based on operation type: * ADD - Adds values to the variable if this is a list type variable, else same as replace. * REPLACE - Replaces all values of a given set of constraints with the current set of values. * REMOVE - Removes any values which match the set of conditions of the variables if this is a list type variable, else clears value. * RESET - Removes all constrains for a given variable, scope is ignored + * @param updateVariableValuesRequest + */ + updateVariableValues(updateVariableValuesRequest, _options) { + const result = this.api.updateVariableValues(updateVariableValuesRequest, _options); + return result.toPromise(); + } + /** + * Version: 10.14.0.cl or later Updates an existing webhook configuration by its unique id or name. Only the provided fields will be updated. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) or `DEVELOPER` (**Has developer privilege**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, users with `CAN_MANAGE_WEBHOOKS` (**Can manage webhooks**) privilege are also authorized to perform this action. + * @param webhookIdentifier Unique ID or name of the webhook configuration. + * @param updateWebhookConfigurationRequest + */ + updateWebhookConfiguration(webhookIdentifier, updateWebhookConfigurationRequest, _options) { + const result = this.api.updateWebhookConfiguration(webhookIdentifier, updateWebhookConfigurationRequest, _options); + return result.toPromise(); + } + /** + * Version: 26.4.0.cl or later Validates a communication channel configuration to ensure it is properly set up and can receive events. - Use `channel_type` to specify the type of communication channel to validate (e.g., WEBHOOK). - Use `channel_identifier` to provide the unique identifier or name for the communication channel. - Use `event_type` to specify the event type to validate for this channel. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) or `DEVELOPER` (**Has developer privilege**) privilege. For webhook channels, users with `CAN_MANAGE_WEBHOOKS` (**Can manage webhooks**) privilege are also authorized to perform this action. + * @param validateCommunicationChannelRequest + */ + validateCommunicationChannel(validateCommunicationChannelRequest, _options) { + const result = this.api.validateCommunicationChannel(validateCommunicationChannelRequest, _options); + return result.toPromise(); + } + /** + * Version: 10.10.0.cl or later Validates the email customization configuration if any set for the ThoughtSpot system. #### Pre-requisites Requires `DEVELOPER` (**has developer privilege**) or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `DEVELOPER` (**Has developer privilege**) privilege is required. **NOTE**:This endpoint in currently in beta. Contact ThoughtSpot support to enable this on your instance. + */ + validateEmailCustomization(_options) { + const result = this.api.validateEmailCustomization(_options); + return result.toPromise(); + } + /** + * Version: 9.2.0.cl or later Validates the content of your source branch against the objects in your destination environment. Before merging content from your source branch to the destination branch, run this API operation from your destination environment and ensure that the changes from the source branch function in the destination environment. Requires `DATAMANAGEMENT` (**Can manage data**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance on your instance, the `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` (**Can manage data models**) privilege and edit access to the metadata objects. + * @param validateMergeRequest + */ + validateMerge(validateMergeRequest, _options) { + const result = this.api.validateMerge(validateMergeRequest, _options); + return result.toPromise(); + } + /** + * Version: 9.12.0.cl or later Validates the authentication token specified in the API request. If your token is not valid, [Get a new token](#/http/api-endpoints/authentication/get-full-access-token). + * @param validateTokenRequest + */ + validateToken(validateTokenRequest, _options) { + const result = this.api.validateToken(validateTokenRequest, _options); + return result.toPromise(); + } +}; +var PromiseUsersApi = class { + constructor(configuration, requestFactory, responseProcessor) { + this.api = new ObservableUsersApi(configuration, requestFactory, responseProcessor); + } + /** + * Version: 9.7.0.cl or later Activates a deactivated user account. Requires `ADMINISTRATION` (**Can administer Thoughtspot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `USER_ADMINISTRATION` (**Can manage users**) privilege is required. To activate an inactive user account, the API request body must include the following information: - Username or the GUID of the user account. - Auth token generated for the deactivated user. The auth token is sent in the API response when a user is deactivated. - Password for the user account. + * @param activateUserRequest + */ + activateUser(activateUserRequest, _options) { + const result = this.api.activateUser(activateUserRequest, _options); + return result.toPromise(); + } + /** + * Version: 9.0.0.cl or later Updates the current password of the user. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `USER_ADMINISTRATION` (**Can manage users**) privilege is required. + * @param changeUserPasswordRequest + */ + changeUserPassword(changeUserPasswordRequest, _options) { + const result = this.api.changeUserPassword(changeUserPasswordRequest, _options); + return result.toPromise(); + } + /** + * Version: 9.0.0.cl or later Creates a user in ThoughtSpot. The API endpoint allows you to configure several user properties such as email address, account status, share notification preferences, and sharing visibility. You can provision the user to [groups](https://docs.thoughtspot.com/cloud/latest/groups-privileges) and [Orgs](https://docs.thoughtspot.com/cloud/latest/orgs-overview). You can also add Liveboard, Answer, and Worksheet objects to the user’s favorites list, assign a default Liveboard for the user, and set user preferences. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `USER_ADMINISTRATION` (**Can manage users**) privilege is required. + * @param createUserRequest + */ + createUser(createUserRequest, _options) { + const result = this.api.createUser(createUserRequest, _options); + return result.toPromise(); + } + /** + * Version: 9.7.0.cl or later Deactivates a user account. Requires `ADMINISTRATION` (**Can administer Thoughtspot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `USER_ADMINISTRATION` (**Can manage users**) privilege is required. To deactivate a user account, the API request body must include the following information: - Username or the GUID of the user account - Base URL of the ThoughtSpot instance If the API request is successful, ThoughtSpot returns the activation URL in the response. The activation URL is valid for 14 days and can be used to re-activate the account and reset the password of the deactivated account. + * @param deactivateUserRequest + */ + deactivateUser(deactivateUserRequest, _options) { + const result = this.api.deactivateUser(deactivateUserRequest, _options); + return result.toPromise(); + } + /** + * Version: 9.0.0.cl or later Deletes a user from the ThoughtSpot system. If you want to remove a user from a specific Org but not from ThoughtSpot, update the group and Org mapping properties of the user object via a POST API call to the [/api/rest/2.0/users/{user_identifier}/update](#/http/api-endpoints/users/update-user) endpoint. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `USER_ADMINISTRATION` (**Can manage users**) privilege is required. + * @param userIdentifier GUID / name of the user + */ + deleteUser(userIdentifier, _options) { + const result = this.api.deleteUser(userIdentifier, _options); + return result.toPromise(); + } + /** + * Version: 9.0.0.cl or later Enforces logout on current user sessions. Use this API with caution as it may invalidate active user sessions and force users to re-login. Make sure you specify the usernames or GUIDs. If you pass null values in the API call, all user sessions on your cluster become invalid, and the users are forced to re-login. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `USER_ADMINISTRATION` (**Can manage users**) privilege is required. + * @param forceLogoutUsersRequest + */ + forceLogoutUsers(forceLogoutUsersRequest, _options) { + const result = this.api.forceLogoutUsers(forceLogoutUsersRequest, _options); + return result.toPromise(); + } + /** + * Version: 9.0.0.cl or later Imports user data from external databases into ThoughtSpot. During the user import operation: * If the specified users are not available in ThoughtSpot, the users are created and assigned a default password. Defining a `default_password` in the API request is optional. * If `delete_unspecified_users` is set to `true`, the users not specified in the API request, excluding the `tsadmin`, `guest`, `system` and `su` users, are deleted. * If the specified user objects are already available in ThoughtSpot, the object properties are updated and synchronized as per the input data in the API request. A successful API call returns the object that represents the changes made in the ThoughtSpot system. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `USER_ADMINISTRATION` (**Can manage users**) privilege is required. + * @param importUsersRequest + */ + importUsers(importUsersRequest, _options) { + const result = this.api.importUsers(importUsersRequest, _options); + return result.toPromise(); + } + /** + * Version: 9.0.0.cl or later Resets the password of a user account. Administrators can reset password on behalf of a user. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `USER_ADMINISTRATION` (**Can manage users**) privilege is required. + * @param resetUserPasswordRequest + */ + resetUserPassword(resetUserPasswordRequest, _options) { + const result = this.api.resetUserPassword(resetUserPasswordRequest, _options); + return result.toPromise(); + } + /** + * Version: 9.0.0.cl or later Gets a list of users available on the ThoughtSpot system. To get details of a specific user, specify the user GUID or name. You can also filter the API response based on groups, Org ID, user visibility, account status, user type, and user preference settings and favorites. Available to all users. Users with `ADMINISTRATION` (**Can administer ThoughtSpot**) privileges can view all users properties. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `USER_ADMINISTRATION` (**Can manage users**) privilege is required. **NOTE**: If the API returns an empty list, consider increasing the value of the `record_size` parameter. To search across all available users, set `record_size` to `-1`. + * @param searchUsersRequest + */ + searchUsers(searchUsersRequest, _options) { + const result = this.api.searchUsers(searchUsersRequest, _options); + return result.toPromise(); + } + /** + * Version: 9.0.0.cl or later Updates the properties of a user object. You can modify user properties such as username, email, and share notification settings. You can also assign new groups and Orgs, remove the user from a group or Org, reset password, and modify user preferences. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `USER_ADMINISTRATION` (**Can manage users**) privilege is required. + * @param userIdentifier GUID / name of the user + * @param updateUserRequest + */ + updateUser(userIdentifier, updateUserRequest, _options) { + const result = this.api.updateUser(userIdentifier, updateUserRequest, _options); + return result.toPromise(); + } +}; +var PromiseVariableApi = class { + constructor(configuration, requestFactory, responseProcessor) { + this.api = new ObservableVariableApi(configuration, requestFactory, responseProcessor); + } + /** + * Create a variable which can be used for parameterizing metadata objects Version: 26.4.0.cl or later Allows creating a variable which can be used for parameterizing metadata objects in ThoughtSpot. Requires ADMINISTRATION role and TENANT scope. The CAN_MANAGE_VARIABLES permission allows you to manage Formula Variables in the current organization scope. The API endpoint supports the following types of variables: * CONNECTION_PROPERTY - For connection properties * TABLE_MAPPING - For table mappings * CONNECTION_PROPERTY_PER_PRINCIPAL - For connection properties per principal. In order to use this please contact support to enable this. * FORMULA_VARIABLE - For Formula variables, introduced in 10.15.0.cl When creating a variable, you need to specify: * The variable type * A unique name for the variable * Whether the variable contains sensitive values (defaults to false) * The data type of the variable, only specify for formula variables (defaults to null) The operation will fail if: * The user lacks required permissions * The variable name already exists * The variable type is invalid + * @param createVariableRequest + */ + createVariable(createVariableRequest, _options) { + const result = this.api.createVariable(createVariableRequest, _options); + return result.toPromise(); + } + /** + * Delete a variable Version: 10.14.0.cl or later **Note:** This API endpoint is deprecated and will be removed from ThoughtSpot in a future release. Use [POST /api/rest/2.0/template/variables/delete](/api/rest/2.0/template/variables/delete) instead. Allows deleting a variable from ThoughtSpot. Requires ADMINISTRATION role and TENANT scope. The CAN_MANAGE_VARIABLES permission allows you to manage Formula Variables in the current organization scope. The API endpoint requires: * The variable identifier (ID or name) The operation will fail if: * The user lacks required permissions * The variable doesn\'t exist * The variable is being used by other objects + * @param identifier Unique id or name of the variable + */ + deleteVariable(identifier, _options) { + const result = this.api.deleteVariable(identifier, _options); + return result.toPromise(); + } + /** + * Delete variable(s) Version: 26.4.0.cl or later Allows deleting multiple variables from ThoughtSpot. Requires ADMINISTRATION role and TENANT scope. The CAN_MANAGE_VARIABLES permission allows you to manage Formula Variables in the current organization scope. The API endpoint requires: * The variable identifiers (IDs or names) The operation will fail if: * The user lacks required permissions * Any of the variables don\'t exist * Any of the variables are being used by other objects + * @param deleteVariablesRequest + */ + deleteVariables(deleteVariablesRequest, _options) { + const result = this.api.deleteVariables(deleteVariablesRequest, _options); + return result.toPromise(); + } + /** + * Update values for a variable Version: 26.4.0.cl or later Allows updating values for a specific variable in ThoughtSpot. Requires ADMINISTRATION role. The CAN_MANAGE_VARIABLES permission allows you to manage Formula Variables in the current organization scope. The API endpoint allows: * Adding new values to the variable * Replacing existing values * Deleting values from the variable * Resetting all values When updating variable values, you need to specify: * The variable identifier (ID or name) * The values to add/replace/remove * The operation to perform (ADD, REPLACE, REMOVE, RESET) Behaviour based on operation type: * ADD - Adds values to the variable if this is a list type variable, else same as replace. * REPLACE - Replaces all values of a given set of constraints with the current set of values. * REMOVE - Removes any values which match the set of conditions of the variables if this is a list type variable, else clears value. * RESET - Removes all constraints for the given variable, scope is ignored + * @param identifier Unique ID or name of the variable + * @param putVariableValuesRequest + */ + putVariableValues(identifier, putVariableValuesRequest, _options) { + const result = this.api.putVariableValues(identifier, putVariableValuesRequest, _options); + return result.toPromise(); + } + /** + * Search variables Version: 26.4.0.cl or later Allows searching for variables in ThoughtSpot. Requires ADMINISTRATION role. The CAN_MANAGE_VARIABLES permission allows you to manage Formula Variables in the current organization scope. The API endpoint supports searching variables by: * Variable identifier (ID or name) * Variable type * Name pattern (case-insensitive, supports % for wildcard) The search results can be formatted in three ways: * METADATA - Returns only variable metadata (default) * METADATA_AND_VALUES - Returns variable metadata and values The values can be filtered by scope: * org_identifier * principal_identifier * model_identifier + * @param searchVariablesRequest + */ + searchVariables(searchVariablesRequest, _options) { + const result = this.api.searchVariables(searchVariablesRequest, _options); + return result.toPromise(); + } + /** + * Update a variable\'s name Version: 26.4.0.cl or later Allows updating a variable\'s name in ThoughtSpot. Requires ADMINISTRATION role and TENANT scope. The CAN_MANAGE_VARIABLES permission allows you to manage Formula Variables in the current organization scope. The API endpoint allows updating: * The variable name + * @param identifier Unique id or name of the variable to update. + * @param updateVariableRequest + */ + updateVariable(identifier, updateVariableRequest, _options) { + const result = this.api.updateVariable(identifier, updateVariableRequest, _options); + return result.toPromise(); + } + /** + * Update values for multiple variables Version: 10.14.0.cl or later **Note:** This API endpoint is deprecated and will be removed from ThoughtSpot in a future release. Use [POST /api/rest/2.0/template/variables/{identifier}/update-values](/api/rest/2.0/template/variables/%7Bidentifier%7D/update-values) instead. Allows updating values for multiple variables in ThoughtSpot. Requires ADMINISTRATION role. The CAN_MANAGE_VARIABLES permission allows you to manage Formula Variables in the current organization scope. The API endpoint allows: * Adding new values to variables * Replacing existing values * Deleting values from variables When updating variable values, you need to specify: * The variable identifiers * The values to add/replace/remove for each variable * The operation to perform (ADD, REPLACE, REMOVE, RESET) Behaviour based on operation type: * ADD - Adds values to the variable if this is a list type variable, else same as replace. * REPLACE - Replaces all values of a given set of constraints with the current set of values. * REMOVE - Removes any values which match the set of conditions of the variables if this is a list type variable, else clears value. * RESET - Removes all constrains for a given variable, scope is ignored + * @param updateVariableValuesRequest + */ + updateVariableValues(updateVariableValuesRequest, _options) { + const result = this.api.updateVariableValues(updateVariableValuesRequest, _options); + return result.toPromise(); + } +}; +var PromiseVersionControlApi = class { + constructor(configuration, requestFactory, responseProcessor) { + this.api = new ObservableVersionControlApi(configuration, requestFactory, responseProcessor); + } + /** + * Version: 9.2.0.cl or later Commits TML files of metadata objects to the Git branch configured on your instance. Requires at least edit access to objects used in the commit operation. Before using this endpoint to push your commits: * Enable Git integration on your instance. * Make sure the Git repository and branch details are configured on your instance. For more information, see [Git integration documentation](https://developers.thoughtspot.com/docs/git-integration). + * @param commitBranchRequest + */ + commitBranch(commitBranchRequest, _options) { + const result = this.api.commitBranch(commitBranchRequest, _options); + return result.toPromise(); + } + /** + * Version: 9.2.0.cl or later Allows you to connect a ThoughtSpot instance to a Git repository. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance on your instance, the `CAN_SETUP_VERSION_CONTROL` (**Can set up version control**) privilege. You can use this API endpoint to connect your ThoughtSpot development and production environments to the development and production branches of a Git repository. Before using this endpoint to connect your ThoughtSpot instance to a Git repository, check the following prerequisites: * You have a Git repository. If you are using GitHub, make sure you have a valid account and an access token to connect ThoughtSpot to GitHub. For information about generating a token, see [GitHub Documentation](https://docs.github.com/en/authentication/keeping-your-account-and-data-secure/managing-your-personal-access-tokens). * Your access token has `repo` scope that grants full access to public and private repositories. * Your Git repository has a branch that can be configured as a default branch in ThoughtSpot. For more information, see [Git integration documentation](https://developers.thoughtspot.com/docs/?pageid=git-integration). **Note**: ThoughtSpot supports only GitHub / itHub Enterprise for CI/CD. + * @param createConfigRequest + */ + createConfig(createConfigRequest, _options) { + const result = this.api.createConfig(createConfigRequest, _options); + return result.toPromise(); + } + /** + * Version: 9.2.0.cl or later Deletes Git repository configuration from your ThoughtSpot instance. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance on your instance, the `CAN_SETUP_VERSION_CONTROL` (**Can set up version control**) privilege. + * @param deleteConfigRequest + */ + deleteConfig(deleteConfigRequest, _options) { + const result = this.api.deleteConfig(deleteConfigRequest, _options); + return result.toPromise(); + } + /** + * Version: 9.2.0.cl or later Allows you to deploy a commit and publish TML content to your ThoughtSpot instance. Requires at least edit access to the objects used in the deploy operation. The API deploys the head of the branch unless a `commit_id` is specified in the API request. If the branch name is not defined in the request, the default branch is considered for deploying commits. For more information, see [Git integration documentation](https://developers.thoughtspot.com/docs/git-integration). + * @param deployCommitRequest + */ + deployCommit(deployCommitRequest, _options) { + const result = this.api.deployCommit(deployCommitRequest, _options); + return result.toPromise(); + } + /** + * Version: 9.2.0.cl or later Reverts TML objects to a previous commit specified in the API request. Requires at least edit access to objects. In the API request, specify the `commit_id`. If the branch name is not specified in the request, the API will consider the default branch configured on your instance. By default, the API reverts all objects. If the revert operation fails for one of the objects provided in the commit, the API returns an error and does not revert any object. For more information, see [Git integration documentation](https://developers.thoughtspot.com/docs/git-integration). + * @param commitId Commit id to which the object should be reverted + * @param revertCommitRequest + */ + revertCommit(commitId, revertCommitRequest, _options) { + const result = this.api.revertCommit(commitId, revertCommitRequest, _options); + return result.toPromise(); + } + /** + * Version: 9.2.0.cl or later Gets a list of commits for a given metadata object. Requires `DATAMANAGEMENT` (**Can manage data**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance on your instance, the `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` (**Can manage data models**) privilege and edit access to the metadata objects. + * @param searchCommitsRequest + */ + searchCommits(searchCommitsRequest, _options) { + const result = this.api.searchCommits(searchCommitsRequest, _options); + return result.toPromise(); + } + /** + * Version: 9.2.0.cl or later Gets Git repository connections configured on the ThoughtSpot instance. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance on your instance, the `CAN_SETUP_VERSION_CONTROL` (**Can set up version control**) privilege. + * @param searchConfigRequest + */ + searchConfig(searchConfigRequest, _options) { + const result = this.api.searchConfig(searchConfigRequest, _options); + return result.toPromise(); + } + /** + * Version: 9.2.0.cl or later Updates Git repository configuration settings. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance on your instance, the `CAN_SETUP_VERSION_CONTROL` (**Can set up version control**) privilege. + * @param updateConfigRequest + */ + updateConfig(updateConfigRequest, _options) { + const result = this.api.updateConfig(updateConfigRequest, _options); + return result.toPromise(); + } + /** + * Version: 9.2.0.cl or later Validates the content of your source branch against the objects in your destination environment. Before merging content from your source branch to the destination branch, run this API operation from your destination environment and ensure that the changes from the source branch function in the destination environment. Requires `DATAMANAGEMENT` (**Can manage data**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance on your instance, the `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` (**Can manage data models**) privilege and edit access to the metadata objects. + * @param validateMergeRequest + */ + validateMerge(validateMergeRequest, _options) { + const result = this.api.validateMerge(validateMergeRequest, _options); + return result.toPromise(); + } +}; +var PromiseWebhooksApi = class { + constructor(configuration, requestFactory, responseProcessor) { + this.api = new ObservableWebhooksApi(configuration, requestFactory, responseProcessor); + } + /** + * Version: 10.14.0.cl or later Creates a new webhook configuration to receive notifications for specified events. The webhook will be triggered when the configured events occur in the system. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) or `DEVELOPER` (**Has developer privilege**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, users with `CAN_MANAGE_WEBHOOKS` (**Can manage webhooks**) privilege are also authorized to perform this action. + * @param createWebhookConfigurationRequest + */ + createWebhookConfiguration(createWebhookConfigurationRequest, _options) { + const result = this.api.createWebhookConfiguration(createWebhookConfigurationRequest, _options); + return result.toPromise(); + } + /** + * Version: 10.14.0.cl or later Deletes one or more webhook configurations by their unique id or name. Returns status of each deletion operation, including successfully deleted webhooks and any failures with error details. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) or `DEVELOPER` (**Has developer privilege**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, users with `CAN_MANAGE_WEBHOOKS` (**Can manage webhooks**) privilege are also authorized to perform this action. + * @param deleteWebhookConfigurationsRequest + */ + deleteWebhookConfigurations(deleteWebhookConfigurationsRequest, _options) { + const result = this.api.deleteWebhookConfigurations(deleteWebhookConfigurationsRequest, _options); + return result.toPromise(); + } + /** + * Version: 10.14.0.cl or later Searches for webhook configurations based on various criteria such as Org, webhook identifier, event type, with support for pagination and sorting. Returns matching webhook configurations with their complete details. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) or `DEVELOPER` (**Has developer privilege**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, users with `CAN_MANAGE_WEBHOOKS` (**Can manage webhooks**) privilege are also authorized to perform this action. + * @param searchWebhookConfigurationsRequest + */ + searchWebhookConfigurations(searchWebhookConfigurationsRequest, _options) { + const result = this.api.searchWebhookConfigurations(searchWebhookConfigurationsRequest, _options); + return result.toPromise(); + } + /** + * Version: 10.14.0.cl or later Updates an existing webhook configuration by its unique id or name. Only the provided fields will be updated. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) or `DEVELOPER` (**Has developer privilege**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, users with `CAN_MANAGE_WEBHOOKS` (**Can manage webhooks**) privilege are also authorized to perform this action. + * @param webhookIdentifier Unique ID or name of the webhook configuration. + * @param updateWebhookConfigurationRequest + */ + updateWebhookConfiguration(webhookIdentifier, updateWebhookConfigurationRequest, _options) { + const result = this.api.updateWebhookConfiguration(webhookIdentifier, updateWebhookConfigurationRequest, _options); + return result.toPromise(); + } +}; + +// utils/config.ts +var createAdditionalHeadersMiddleware = (additionalHeaders) => { + return { + /** + * Pre-request middleware to add custom headers to every API call + * @param requestContext - The request context to modify + */ + pre: (requestContext) => { + Object.entries(additionalHeaders).forEach(([headerName, headerValue]) => { + requestContext.setHeaderParam(headerName, headerValue); + }); + return Promise.resolve(requestContext); + }, + /** + * Post-request middleware for response processing + * @param responseContext - The response context + */ + post: (responseContext) => Promise.resolve(responseContext) + }; +}; +var createBearerAuthenticationConfig = (thoughtSpotHost, paramOrTokenProvider, options) => { + const serverConfig = new ServerConfiguration( + thoughtSpotHost, + {} + ); + const additionalHeaders = options == null ? void 0 : options.additionalHeaders; + let middleware = []; + if (additionalHeaders && Object.keys(additionalHeaders).length > 0) { + middleware.push(createAdditionalHeadersMiddleware(additionalHeaders)); + } + const config = createConfiguration({ + baseServer: serverConfig, + promiseMiddleware: middleware + }); + const authApiClient = new PromiseAuthenticationApi(config); + let configTokenProvider; + if (paramOrTokenProvider.hasOwnProperty("username")) { + configTokenProvider = { + getToken: () => __async(void 0, null, function* () { + const token = (yield authApiClient.getFullAccessToken(paramOrTokenProvider)).token; + return token; + }) + }; + } else if (typeof paramOrTokenProvider === "function") { + configTokenProvider = { + getToken: paramOrTokenProvider + }; + } else { + throw new Error("Pass a proper GetFullAccessTokenRequest or a function which returns a token"); + } + const authConfig = { + bearerAuth: { + tokenProvider: configTokenProvider + } + }; + const globalConfig = createConfiguration({ + authMethods: authConfig, + baseServer: serverConfig, + promiseMiddleware: middleware + }); + return globalConfig; +}; +var createBasicConfig = (thoughtSpotHost, options) => { + const thoughtSpotServer = new ServerConfiguration(thoughtSpotHost, {}); + const additionalHeaders = options == null ? void 0 : options.additionalHeaders; + let middleware = []; + if (additionalHeaders && Object.keys(additionalHeaders).length > 0) { + middleware.push(createAdditionalHeadersMiddleware(additionalHeaders)); + } + const basicClientConfig = createConfiguration({ + baseServer: thoughtSpotServer, + promiseMiddleware: middleware + }); + return basicClientConfig; +}; +export { + PromiseAIApi as AIApi, + AIContext, + APIKey, + APIKeyInput, + AccessToken, + ActionConfig, + ActionConfigInput, + ActionConfigInputCreate, + ActionDetails, + ActionDetailsInput, + ActionDetailsInputCreate, + ActivateUserRequest, + AgentConversation, + AnswerContent, + AnswerDataResponse, + AnswerPngOptionsInput, + ApiException, + AssignChangeAuthorRequest, + AssignTagRequest, + AssociateMetadataInput, + AssociateMetadataInputCreate, + AuthClusterPreferences, + AuthClusterPreferencesInput, + AuthOrgInfo, + AuthOrgPreference, + AuthOrgPreferenceInput, + AuthSettingsAccessToken, + Authentication, + PromiseAuthenticationApi as AuthenticationApi, + AuthenticationInput, + Author, + AuthorMetadataTypeInput, + AuthorType, + AwsS3Config, + AwsS3ConfigInput, + BasicAuth, + BasicAuthInput, + BearerAuthAuthentication, + CALLBACK, + CALLBACKInput, + CALLBACKInputMandatory, + CalendarResponse, + ChangeUserPasswordRequest, + ChannelHistoryEventInfo, + ChannelHistoryEventInput, + ChannelHistoryJob, + ChannelValidationAwsS3Info, + ChannelValidationDetail, + ClusterNonEmbedAccess, + ClusterNonEmbedAccessInput, + Collection, + CollectionDeleteResponse, + CollectionDeleteTypeIdentifiers, + CollectionEntityIdentifier, + CollectionMetadataInput, + CollectionMetadataItem, + CollectionSearchResponse, + PromiseCollectionsApi as CollectionsApi, + Column, + ColumnSecurityRule, + ColumnSecurityRuleColumn, + ColumnSecurityRuleGroup, + ColumnSecurityRuleGroupOperation, + ColumnSecurityRuleResponse, + ColumnSecurityRuleSourceTable, + ColumnSecurityRuleTableInput, + ColumnSecurityRuleUpdate, + CommitBranchRequest, + CommitFileType, + CommitHistoryResponse, + CommitResponse, + CommiterType, + CommunicationChannelPreferencesResponse, + CommunicationChannelValidateResponse, + ConfigureAuthSettingsRequest, + ConfigureAuthSettingsRequestClusterPreferences, + ConfigureCommunicationChannelPreferencesRequest, + ConfigureSecuritySettingsRequest, + ConfigureSecuritySettingsRequestClusterPreferences, + ConnectionConfigurationResponse, + ConnectionConfigurationSearchRequest, + PromiseConnectionConfigurationsApi as ConnectionConfigurationsApi, + ConnectionInput, + PromiseConnectionsApi as ConnectionsApi, + ContextPayloadV2Input, + Conversation, + ConversationSettingsInput, + ConvertWorksheetToModelRequest, + CopyObjectRequest, + CreateAgentConversationRequest, + CreateAgentConversationRequestConversationSettings, + CreateAgentConversationRequestMetadataContext, + CreateCalendarRequest, + CreateCalendarRequestTableReference, + CreateCollectionRequest, + CreateConfigRequest, + CreateConnectionConfigurationRequest, + CreateConnectionConfigurationRequestPolicyProcessOptions, + CreateConnectionRequest, + CreateConnectionResponse, + CreateConversationRequest, + CreateCustomActionRequest, + CreateCustomActionRequestActionDetails, + CreateCustomActionRequestDefaultActionConfig, + CreateEmailCustomizationRequest, + CreateEmailCustomizationRequestTemplateProperties, + CreateEmailCustomizationResponse, + CreateOrgRequest, + CreateRoleRequest, + CreateScheduleRequest, + CreateScheduleRequestFrequency, + CreateScheduleRequestLiveboardOptions, + CreateScheduleRequestPdfOptions, + CreateScheduleRequestRecipientDetails, + CreateTagRequest, + CreateUserGroupRequest, + CreateUserRequest, + CreateVariableRequest, + CreateWebhookConfigurationRequest, + CreateWebhookConfigurationRequestAuthentication, + CreateWebhookConfigurationRequestSignatureVerification, + CreateWebhookConfigurationRequestStorageDestination, + CronExpression, + CronExpressionInput, + CspSettings, + CspSettingsInput, + PromiseCustomActionApi as CustomActionApi, + CustomActionMetadataTypeInput, + PromiseCustomCalendarsApi as CustomCalendarsApi, + PromiseDBTApi as DBTApi, + PromiseDataApi as DataApi, + DataSource, + DataSourceContextInput, + DataWarehouseObjectInput, + DataWarehouseObjects, + Database, + DbtSearchResponse, + DeactivateUserRequest, + DefaultActionConfig, + DefaultActionConfigInput, + DefaultActionConfigInputCreate, + DefaultActionConfigSearchInput, + DeleteCollectionRequest, + DeleteConfigRequest, + DeleteConnectionConfigurationRequest, + DeleteConnectionRequest, + DeleteMetadataRequest, + DeleteMetadataTypeInput, + DeleteOrgEmailCustomizationRequest, + DeleteVariablesRequest, + DeleteWebhookConfigurationsRequest, + DeployCommitRequest, + DeployResponse, + PromiseEmailCustomizationApi as EmailCustomizationApi, + EntityHeader, + ErrorResponse, + EurekaDataSourceSuggestionResponse, + EurekaDecomposeQueryResponse, + EurekaGetNLInstructionsResponse, + EurekaGetRelevantQuestionsResponse, + EurekaLLMDecomposeQueryResponse, + EurekaLLMSuggestedQuery, + EurekaRelevantQuestion, + EurekaSetNLInstructionsResponse, + EventChannelConfig, + EventChannelConfigInput, + ExcludeMetadataListItemInput, + ExportAnswerReportRequest, + ExportAnswerReportRequestPngOptions, + ExportAnswerReportRequestRegionalSettings, + ExportLiveboardReportRequest, + ExportLiveboardReportRequestPdfOptions, + ExportLiveboardReportRequestPngOptions, + ExportMetadataTMLBatchedRequest, + ExportMetadataTMLRequest, + ExportMetadataTMLRequestExportOptions, + ExportMetadataTypeInput, + ExportOptions, + ExternalTableInput, + FavoriteMetadataInput, + FavoriteMetadataItem, + FavoriteObjectOptionsInput, + FetchAnswerDataRequest, + FetchAnswerSqlQueryRequest, + FetchAsyncImportTaskStatusRequest, + FetchColumnSecurityRulesRequest, + FetchConnectionDiffStatusResponse, + FetchLiveboardDataRequest, + FetchLiveboardSqlQueryRequest, + FetchLogsRequest, + FetchObjectPrivilegesRequest, + FetchPermissionsOfPrincipalsRequest, + FetchPermissionsOnMetadataRequest, + FilterRules, + ForceLogoutUsersRequest, + Frequency, + FrequencyInput, + GenerateCSVRequest, + GenericInfo, + GetAsyncImportStatusResponse, + GetCustomAccessTokenRequest, + GetDataSourceSuggestionsRequest, + GetFullAccessTokenRequest, + GetFullAccessTokenRequestUserParameters, + GetNLInstructionsRequest, + GetObjectAccessTokenRequest, + GetRelevantQuestionsRequest, + GetRelevantQuestionsRequestAiContext, + GetRelevantQuestionsRequestMetadataContext, + GetTokenResponse, + GroupInfo, + GroupObject, + PromiseGroupsApi as GroupsApi, + GroupsImportListInput, + HeaderAttributeInput, + HeaderUpdateInput, + HttpException, + HttpMethod, + ImportEPackAsyncTaskStatus, + ImportMetadataTMLAsyncRequest, + ImportMetadataTMLRequest, + ImportUser, + ImportUserGroupsRequest, + ImportUserGroupsResponse, + ImportUserType, + ImportUsersRequest, + ImportUsersResponse, + InputEurekaNLSRequest, + IsomorphicFetchHttpLibrary, + JWTMetadataObject, + JWTParameter, + JWTUserOptions, + JWTUserOptionsFull, + JobRecipient, + PromiseJobsApi as JobsApi, + LiveboardContent, + LiveboardDataResponse, + LiveboardOptions, + LiveboardOptionsInput, + PromiseLogApi as LogApi, + LogResponse, + LoginRequest, + ManageObjectPrivilegeRequest, + PromiseMetadataApi as MetadataApi, + MetadataAssociationItem, + MetadataContext, + MetadataInput, + MetadataListItemInput, + MetadataObject, + MetadataResponse, + MetadataSearchResponse, + MetadataSearchSortOptions, + ModelTableList, + NLInstructionsInfo, + NLInstructionsInfoInput, + ObjectIDAndName, + ObjectPrivilegesMetadataInput, + ObjectPrivilegesOfMetadataResponse, + Org, + OrgChannelConfigInput, + OrgChannelConfigResponse, + OrgDetails, + OrgInfo, + OrgNonEmbedAccess, + OrgNonEmbedAccessInput, + OrgPreferenceSearchCriteriaInput, + OrgResponse, + OrgType, + PromiseOrgsApi as OrgsApi, + ParameterValues, + ParameterizeMetadataFieldsRequest, + ParameterizeMetadataRequest, + ParametersListItem, + ParametersListItemInput, + PdfOptions, + PdfOptionsInput, + PermissionInput, + PermissionOfMetadataResponse, + PermissionOfPrincipalsResponse, + PermissionsMetadataTypeInput, + PngOptionsInput, + PolicyProcessOptions, + PolicyProcessOptionsInput, + PrincipalsInput, + PrincipalsListItem, + PrincipalsListItemInput, + PublishMetadataListItem, + PublishMetadataRequest, + PutVariableValuesRequest, + QueryGetDecomposedQueryRequest, + QueryGetDecomposedQueryRequestNlsRequest, + RecipientDetails, + RecipientDetailsInput, + RegionalSettingsInput, + RepoConfigObject, + PromiseReportsApi as ReportsApi, + RequestContext2 as RequestContext, + RequiredError, + ResetUserPasswordRequest, + ResponseActivationURL, + ResponseContext, + ResponseCopyObject, + ResponseCustomAction, + ResponseFailedEntities, + ResponseFailedEntity, + ResponseIncompleteEntities, + ResponseIncompleteEntity, + ResponseMessage, + ResponsePostUpgradeFailedEntities, + ResponsePostUpgradeFailedEntity, + ResponseSchedule, + ResponseScheduleRun, + ResponseSuccessfulEntities, + ResponseSuccessfulEntity, + ResponseWorksheetToModelConversion, + RevertCommitRequest, + RevertResponse, + RevertedMetadata, + RevokeRefreshTokensRequest, + RevokeRefreshTokensResponse, + RevokeTokenRequest, + RiseGQLArgWrapper, + RiseSetter, + Role, + RoleResponse, + PromiseRolesApi as RolesApi, + RuntimeFilter, + RuntimeFilters, + RuntimeParamOverride, + RuntimeParameters, + RuntimeSort, + RuntimeSorts, + ScheduleHistoryRunsOptionsInput, + PromiseSchedulesApi as SchedulesApi, + SchedulesPdfOptionsInput, + SchemaObject, + Scope, + ScriptSrcUrls, + ScriptSrcUrlsInput, + SearchAuthSettingsRequest, + SearchAuthSettingsResponse, + SearchCalendarsRequest, + SearchCalendarsRequestSortOptions, + SearchChannelHistoryRequest, + SearchChannelHistoryResponse, + SearchCollectionsRequest, + SearchCollectionsRequestSortOptions, + SearchCommitsRequest, + SearchCommunicationChannelPreferencesRequest, + SearchConfigRequest, + SearchConnectionRequest, + SearchConnectionRequestSortOptions, + SearchConnectionResponse, + SearchCustomActionsRequest, + SearchCustomActionsRequestDefaultActionConfig, + SearchDataRequest, + SearchDataResponse, + SearchEmailCustomizationRequest, + SearchMetadataRequest, + SearchMetadataRequestFavoriteObjectOptions, + SearchMetadataRequestSortOptions, + SearchOrgsRequest, + SearchRoleResponse, + SearchRolesRequest, + SearchSchedulesRequest, + SearchSchedulesRequestHistoryRunsOptions, + SearchSchedulesRequestSortOptions, + SearchSecuritySettingsRequest, + SearchTagsRequest, + SearchUserGroupsRequest, + SearchUserGroupsRequestSortOptions, + SearchUsersRequest, + SearchVariablesRequest, + SearchWebhookConfigurationsRequest, + SearchWebhookConfigurationsRequestSortOptions, + PromiseSecurityApi as SecurityApi, + SecuritySettingsClusterPreferences, + SecuritySettingsClusterPreferencesInput, + SecuritySettingsOrgDetails, + SecuritySettingsOrgPreferences, + SecuritySettingsOrgPreferencesInput, + SecuritySettingsResponse, + SelfDecodingBody, + SendAgentConversationMessageRequest, + SendAgentConversationMessageStreamingRequest, + SendAgentMessageRequest, + SendAgentMessageResponse, + SendAgentMessageStreamingRequest, + SendMessageRequest, + ServerConfiguration, + SetNLInstructionsRequest, + ShareMetadataRequest, + ShareMetadataTypeInput, + SharePermissionsInput, + SingleAnswerRequest, + SortOption, + SortOptionInput, + SortOptions, + SortingOptions, + SqlQuery, + SqlQueryResponse, + StorageConfig, + StorageConfigInput, + StorageDestination, + StorageDestinationInput, + SyncMetadataRequest, + SyncMetadataResponse, + PromiseSystemApi as SystemApi, + SystemConfig, + SystemInfo, + SystemOverrideInfo, + Table, + Tag, + TagMetadataTypeInput, + PromiseTagsApi as TagsApi, + TemplatePropertiesInputCreate, + PromiseThoughtSpotRestApi as ThoughtSpotRestApi, + Token, + TokenAccessScopeObject, + TokenValidationResponse, + URL2 as URL, + URLInput, + URLInputMandatory, + UnassignTagRequest, + UnparameterizeMetadataRequest, + UnpublishMetadataRequest, + UpdateCalendarRequest, + UpdateCalendarRequestTableReference, + UpdateCollectionRequest, + UpdateColumnSecurityRulesRequest, + UpdateConfigRequest, + UpdateConnectionConfigurationRequest, + UpdateConnectionRequest, + UpdateConnectionStatusRequest, + UpdateConnectionV2Request, + UpdateCustomActionRequest, + UpdateCustomActionRequestActionDetails, + UpdateCustomActionRequestDefaultActionConfig, + UpdateEmailCustomizationRequest, + UpdateMetadataHeaderRequest, + UpdateMetadataObjIdRequest, + UpdateObjIdInput, + UpdateOrgRequest, + UpdateRoleRequest, + UpdateScheduleRequest, + UpdateScheduleRequestFrequency, + UpdateScheduleRequestLiveboardOptions, + UpdateScheduleRequestPdfOptions, + UpdateScheduleRequestRecipientDetails, + UpdateSystemConfigRequest, + UpdateTagRequest, + UpdateUserGroupRequest, + UpdateUserRequest, + UpdateVariableRequest, + UpdateVariableValuesRequest, + UpdateWebhookConfigurationRequest, + User, + UserGroup, + UserGroupResponse, + UserInfo, + UserObject, + UserParameterOptions, + UserPrincipal, + PromiseUsersApi as UsersApi, + ValidateCommunicationChannelRequest, + ValidateMergeRequest, + ValidateTokenRequest, + ValueScopeInput, + Variable, + PromiseVariableApi as VariableApi, + VariableDetailInput, + VariableOrgInfo, + VariablePutAssignmentInput, + VariableUpdateAssignmentInput, + VariableUpdateScopeInput, + VariableValue, + VariableValues, + PromiseVersionControlApi as VersionControlApi, + WebhookAuthApiKey, + WebhookAuthApiKeyInput, + WebhookAuthBasicAuth, + WebhookAuthBasicAuthInput, + WebhookAuthOAuth2, + WebhookAuthOAuth2Input, + WebhookAuthentication, + WebhookAuthenticationInput, + WebhookDeleteFailure, + WebhookDeleteResponse, + WebhookKeyValuePair, + WebhookKeyValuePairInput, + WebhookOrg, + WebhookPagination, + WebhookResponse, + WebhookSearchResponse, + WebhookSignatureVerification, + WebhookSignatureVerificationInput, + WebhookSortOptionsInput, + WebhookUser, + PromiseWebhooksApi as WebhooksApi, + configureAuthMethods, + createBasicConfig, + createBearerAuthenticationConfig, + createConfiguration, + server1, + servers, + wrapHttpLibrary +}; diff --git a/sdks/typescript/git_push.sh b/sdks/typescript/git_push.sh new file mode 100644 index 000000000..b25302975 --- /dev/null +++ b/sdks/typescript/git_push.sh @@ -0,0 +1,51 @@ +#!/bin/sh +# ref: https://help.github.com/articles/adding-an-existing-project-to-github-using-the-command-line/ +# +# Usage example: /bin/sh ./git_push.sh wing328 openapi-petstore-perl "minor update" + +git_user_id=$1 +git_repo_id=$2 +release_note=$3 + +if [ "$git_user_id" = "" ]; then + git_user_id="GIT_USER_ID" + echo "[INFO] No command line input provided. Set \$git_user_id to $git_user_id" +fi + +if [ "$git_repo_id" = "" ]; then + git_repo_id="GIT_REPO_ID" + echo "[INFO] No command line input provided. Set \$git_repo_id to $git_repo_id" +fi + +if [ "$release_note" = "" ]; then + release_note="Minor update" + echo "[INFO] No command line input provided. Set \$release_note to $release_note" +fi + +# Initialize the local directory as a Git repository +git init + +# Adds the files in the local repository and stages them for commit. +git add . + +# Commits the tracked changes and prepares them to be pushed to a remote repository. +git commit -m "$release_note" + +# Sets the new remote +git_remote=$(git remote) +if [ "$git_remote" = "" ]; then # git remote not defined + + if [ "$GIT_TOKEN" = "" ]; then + echo "[INFO] \$GIT_TOKEN (environment variable) is not set. Using the git credential in your environment." + git remote add origin https://github.com/${git_user_id}/${git_repo_id}.git + else + git remote add origin https://${git_user_id}:"${GIT_TOKEN}"@github.com/${git_user_id}/${git_repo_id}.git + fi + +fi + +git pull origin master + +# Pushes (Forces) the changes in the local repository up to the remote repository +echo "Git pushing to https://github.com/${git_user_id}/${git_repo_id}.git" +git push origin master 2>&1 | grep -v 'To https' diff --git a/sdks/typescript/http/http.ts b/sdks/typescript/http/http.ts new file mode 100644 index 000000000..5ec4785ed --- /dev/null +++ b/sdks/typescript/http/http.ts @@ -0,0 +1,232 @@ +import { Observable, from } from '../rxjsStub'; + +export * from './isomorphic-fetch'; + +/** + * Represents an HTTP method. + */ +export enum HttpMethod { + GET = "GET", + HEAD = "HEAD", + POST = "POST", + PUT = "PUT", + DELETE = "DELETE", + CONNECT = "CONNECT", + OPTIONS = "OPTIONS", + TRACE = "TRACE", + PATCH = "PATCH" +} + +/** + * Represents an HTTP file which will be transferred from or to a server. + */ +export type HttpFile = Blob & { readonly name: string }; + +export class HttpException extends Error { + public constructor(msg: string) { + super(msg); + } +} + +/** + * Represents the body of an outgoing HTTP request. + */ +export type RequestBody = undefined | string | FormData | URLSearchParams; + +/** + * Represents an HTTP request context + */ +export class RequestContext { + private headers: { [key: string]: string } = {}; + private body: RequestBody = undefined; + private url: URL; + + /** + * Creates the request context using a http method and request resource url + * + * @param url url of the requested resource + * @param httpMethod http method + */ + public constructor(url: string, private httpMethod: HttpMethod) { + this.url = new URL(url); + } + + /* + * Returns the url set in the constructor including the query string + * + */ + public getUrl(): string { + return this.url.toString().endsWith("/") ? + this.url.toString().slice(0, -1) + : this.url.toString(); + } + + /** + * Replaces the url set in the constructor with this url. + * + */ + public setUrl(url: string) { + this.url = new URL(url); + } + + /** + * Sets the body of the http request either as a string or FormData + * + * Note that setting a body on a HTTP GET, HEAD, DELETE, CONNECT or TRACE + * request is discouraged. + * https://httpwg.org/http-core/draft-ietf-httpbis-semantics-latest.html#rfc.section.7.3.1 + * + * @param body the body of the request + */ + public setBody(body: RequestBody) { + this.body = body; + } + + public getHttpMethod(): HttpMethod { + return this.httpMethod; + } + + public getHeaders(): { [key: string]: string } { + return this.headers; + } + + public getBody(): RequestBody { + return this.body; + } + + public setQueryParam(name: string, value: string) { + this.url.searchParams.set(name, value); + } + + /** + * Sets a cookie with the name and value. NO check for duplicate cookies is performed + * + */ + public addCookie(name: string, value: string): void { + if (!this.headers["Cookie"]) { + this.headers["Cookie"] = ""; + } + this.headers["Cookie"] += name + "=" + value + "; "; + } + + public setHeaderParam(key: string, value: string): void { + this.headers[key] = value; + } +} + +export interface ResponseBody { + text(): Promise; + binary(): Promise; +} + +/** + * Helper class to generate a `ResponseBody` from binary data + */ +export class SelfDecodingBody implements ResponseBody { + constructor(private dataSource: Promise) {} + + binary(): Promise { + return this.dataSource; + } + + async text(): Promise { + const data: Blob = await this.dataSource; + // @ts-ignore + if (data.text) { + // @ts-ignore + return data.text(); + } + + return new Promise((resolve, reject) => { + const reader = new FileReader(); + reader.addEventListener("load", () => resolve(reader.result as string)); + reader.addEventListener("error", () => reject(reader.error)); + reader.readAsText(data); + }); + } +} + +export class ResponseContext { + public constructor( + public httpStatusCode: number, + public headers: { [key: string]: string }, + public body: ResponseBody + ) {} + + /** + * Parse header value in the form `value; param1="value1"` + * + * E.g. for Content-Type or Content-Disposition + * Parameter names are converted to lower case + * The first parameter is returned with the key `""` + */ + public getParsedHeader(headerName: string): { [parameter: string]: string } { + const result: { [parameter: string]: string } = {}; + if (!this.headers[headerName]) { + return result; + } + + const parameters = this.headers[headerName].split(";"); + for (const parameter of parameters) { + let [key, value] = parameter.split("=", 2); + key = key.toLowerCase().trim(); + if (value === undefined) { + result[""] = key; + } else { + value = value.trim(); + if (value.startsWith('"') && value.endsWith('"')) { + value = value.substring(1, value.length - 1); + } + result[key] = value; + } + } + return result; + } + + public async getBodyAsFile(): Promise { + const data = await this.body.binary(); + const fileName = this.getParsedHeader("content-disposition")["filename"] || ""; + const contentType = this.headers["content-type"] || ""; + try { + return new File([data], fileName, { type: contentType }); + } catch (error) { + /** Fallback for when the File constructor is not available */ + return Object.assign(data, { + name: fileName, + type: contentType + }); + } + } + + /** + * Use a heuristic to get a body of unknown data structure. + * Return as string if possible, otherwise as binary. + */ + public getBodyAsAny(): Promise { + try { + return this.body.text(); + } catch {} + + try { + return this.body.binary(); + } catch {} + + return Promise.resolve(undefined); + } +} + +export interface HttpLibrary { + send(request: RequestContext): Observable; +} + +export interface PromiseHttpLibrary { + send(request: RequestContext): Promise; +} + +export function wrapHttpLibrary(promiseHttpLibrary: PromiseHttpLibrary): HttpLibrary { + return { + send(request: RequestContext): Observable { + return from(promiseHttpLibrary.send(request)); + } + } +} diff --git a/sdks/typescript/http/isomorphic-fetch.ts b/sdks/typescript/http/isomorphic-fetch.ts new file mode 100644 index 000000000..5928c8d7c --- /dev/null +++ b/sdks/typescript/http/isomorphic-fetch.ts @@ -0,0 +1,32 @@ +import {HttpLibrary, RequestContext, ResponseContext} from './http'; +import { from, Observable } from '../rxjsStub'; +import "whatwg-fetch"; + +export class IsomorphicFetchHttpLibrary implements HttpLibrary { + + public send(request: RequestContext): Observable { + let method = request.getHttpMethod().toString(); + let body = request.getBody(); + + const resultPromise = fetch(request.getUrl(), { + method: method, + body: body as any, + headers: request.getHeaders(), + credentials: "include" + }).then((resp: any) => { + const headers: { [name: string]: string } = {}; + resp.headers.forEach((value: string, name: string) => { + headers[name] = value; + }); + + const body = { + text: () => resp.text(), + binary: () => resp.blob() + }; + return new ResponseContext(resp.status, headers, body); + }); + + return from>(resultPromise); + + } +} \ No newline at end of file diff --git a/sdks/typescript/index.ts b/sdks/typescript/index.ts new file mode 100644 index 000000000..a3ef54317 --- /dev/null +++ b/sdks/typescript/index.ts @@ -0,0 +1,13 @@ +export * from "./http/http"; +export * from "./auth/auth"; +export * from "./models/all"; +export { createConfiguration } from "./configuration" +export { Configuration } from "./configuration" +export * from "./apis/exception"; +export * from "./servers"; +export { RequiredError } from "./apis/baseapi"; + +export { PromiseMiddleware as Middleware } from './middleware'; +export { PromiseAIApi as AIApi, PromiseAuthenticationApi as AuthenticationApi, PromiseCollectionsApi as CollectionsApi, PromiseConnectionConfigurationsApi as ConnectionConfigurationsApi, PromiseConnectionsApi as ConnectionsApi, PromiseCustomActionApi as CustomActionApi, PromiseCustomCalendarsApi as CustomCalendarsApi, PromiseDBTApi as DBTApi, PromiseDataApi as DataApi, PromiseEmailCustomizationApi as EmailCustomizationApi, PromiseGroupsApi as GroupsApi, PromiseJobsApi as JobsApi, PromiseLogApi as LogApi, PromiseMetadataApi as MetadataApi, PromiseOrgsApi as OrgsApi, PromiseReportsApi as ReportsApi, PromiseRolesApi as RolesApi, PromiseSchedulesApi as SchedulesApi, PromiseSecurityApi as SecurityApi, PromiseSystemApi as SystemApi, PromiseTagsApi as TagsApi, PromiseThoughtSpotRestApi as ThoughtSpotRestApi, PromiseUsersApi as UsersApi, PromiseVariableApi as VariableApi, PromiseVersionControlApi as VersionControlApi, PromiseWebhooksApi as WebhooksApi } from './types/PromiseAPI'; + +export { createBearerAuthenticationConfig, createBasicConfig } from "./utils/config"; \ No newline at end of file diff --git a/sdks/typescript/middleware.ts b/sdks/typescript/middleware.ts new file mode 100644 index 000000000..524f93f01 --- /dev/null +++ b/sdks/typescript/middleware.ts @@ -0,0 +1,66 @@ +import {RequestContext, ResponseContext} from './http/http'; +import { Observable, from } from './rxjsStub'; + +/** + * Defines the contract for a middleware intercepting requests before + * they are sent (but after the RequestContext was created) + * and before the ResponseContext is unwrapped. + * + */ +export interface Middleware { + /** + * Modifies the request before the request is sent. + * + * @param context RequestContext of a request which is about to be sent to the server + * @returns an observable of the updated request context + * + */ + pre(context: RequestContext): Observable; + /** + * Modifies the returned response before it is deserialized. + * + * @param context ResponseContext of a sent request + * @returns an observable of the modified response context + */ + post(context: ResponseContext): Observable; +} + +export class PromiseMiddlewareWrapper implements Middleware { + + public constructor(private middleware: PromiseMiddleware) { + + } + + pre(context: RequestContext): Observable { + return from(this.middleware.pre(context)); + } + + post(context: ResponseContext): Observable { + return from(this.middleware.post(context)); + } + +} + +/** + * Defines the contract for a middleware intercepting requests before + * they are sent (but after the RequestContext was created) + * and before the ResponseContext is unwrapped. + * + */ +export interface PromiseMiddleware { + /** + * Modifies the request before the request is sent. + * + * @param context RequestContext of a request which is about to be sent to the server + * @returns an observable of the updated request context + * + */ + pre(context: RequestContext): Promise; + /** + * Modifies the returned response before it is deserialized. + * + * @param context ResponseContext of a sent request + * @returns an observable of the modified response context + */ + post(context: ResponseContext): Promise; +} diff --git a/sdks/typescript/models/AIContext.ts b/sdks/typescript/models/AIContext.ts new file mode 100644 index 000000000..4fb445085 --- /dev/null +++ b/sdks/typescript/models/AIContext.ts @@ -0,0 +1,48 @@ +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { HttpFile } from '../http/http'; + +export class AIContext { + /** + * User specific text instructions sent to AI system for processing the query. + */ + 'instructions'?: Array | null; + /** + * User provided content like text data, csv data as a string message to provide context & potentially improve the quality of the response. + */ + 'content'?: Array | null; + + static readonly discriminator: string | undefined = undefined; + + static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ + { + "name": "instructions", + "baseName": "instructions", + "type": "Array", + "format": "" + }, + { + "name": "content", + "baseName": "content", + "type": "Array", + "format": "" + } ]; + + static getAttributeTypeMap() { + return AIContext.attributeTypeMap; + } + + public constructor() { + } +} + diff --git a/sdks/typescript/models/APIKey.ts b/sdks/typescript/models/APIKey.ts new file mode 100644 index 000000000..1baee015b --- /dev/null +++ b/sdks/typescript/models/APIKey.ts @@ -0,0 +1,51 @@ +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { HttpFile } from '../http/http'; + +/** +* With API key auth, you send a key-value pair to the API either in the request headers or query parameters. +*/ +export class APIKey { + /** + * Enter your key name + */ + 'key'?: string | null; + /** + * Enter you key value + */ + 'value'?: string | null; + + static readonly discriminator: string | undefined = undefined; + + static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ + { + "name": "key", + "baseName": "key", + "type": "string", + "format": "" + }, + { + "name": "value", + "baseName": "value", + "type": "string", + "format": "" + } ]; + + static getAttributeTypeMap() { + return APIKey.attributeTypeMap; + } + + public constructor() { + } +} + diff --git a/sdks/typescript/models/APIKeyInput.ts b/sdks/typescript/models/APIKeyInput.ts new file mode 100644 index 000000000..b1a663fd3 --- /dev/null +++ b/sdks/typescript/models/APIKeyInput.ts @@ -0,0 +1,51 @@ +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { HttpFile } from '../http/http'; + +/** +* With API key auth, you send a key-value pair to the API either in the request headers or query parameters. +*/ +export class APIKeyInput { + /** + * Enter your key name + */ + 'key'?: string | null; + /** + * Enter you key value + */ + 'value'?: string | null; + + static readonly discriminator: string | undefined = undefined; + + static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ + { + "name": "key", + "baseName": "key", + "type": "string", + "format": "" + }, + { + "name": "value", + "baseName": "value", + "type": "string", + "format": "" + } ]; + + static getAttributeTypeMap() { + return APIKeyInput.attributeTypeMap; + } + + public constructor() { + } +} + diff --git a/sdks/typescript/models/AccessToken.ts b/sdks/typescript/models/AccessToken.ts new file mode 100644 index 000000000..ff6cc69ee --- /dev/null +++ b/sdks/typescript/models/AccessToken.ts @@ -0,0 +1,84 @@ +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { OrgInfo } from '../models/OrgInfo'; +import { UserInfo } from '../models/UserInfo'; +import { HttpFile } from '../http/http'; + +export class AccessToken { + /** + * GUID of the auth token. + */ + 'id'?: string | null; + /** + * Bearer auth token. + */ + 'token': string; + 'org': OrgInfo; + 'user': UserInfo; + /** + * Token creation time in milliseconds. + */ + 'creation_time_in_millis': number; + /** + * Token expiration time in milliseconds. + */ + 'expiration_time_in_millis': number; + + static readonly discriminator: string | undefined = undefined; + + static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ + { + "name": "id", + "baseName": "id", + "type": "string", + "format": "" + }, + { + "name": "token", + "baseName": "token", + "type": "string", + "format": "" + }, + { + "name": "org", + "baseName": "org", + "type": "OrgInfo", + "format": "" + }, + { + "name": "user", + "baseName": "user", + "type": "UserInfo", + "format": "" + }, + { + "name": "creation_time_in_millis", + "baseName": "creation_time_in_millis", + "type": "number", + "format": "float" + }, + { + "name": "expiration_time_in_millis", + "baseName": "expiration_time_in_millis", + "type": "number", + "format": "float" + } ]; + + static getAttributeTypeMap() { + return AccessToken.attributeTypeMap; + } + + public constructor() { + } +} + diff --git a/sdks/typescript/models/ActionConfig.ts b/sdks/typescript/models/ActionConfig.ts new file mode 100644 index 000000000..6ffcd5613 --- /dev/null +++ b/sdks/typescript/models/ActionConfig.ts @@ -0,0 +1,51 @@ +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { HttpFile } from '../http/http'; + +/** +* Specify that the association is enabled for the metadata object +*/ +export class ActionConfig { + /** + * Position of the Custom action on the Metadata object. Earlier naming convention: context. + */ + 'position'?: string | null; + /** + * Visibility of the metadata association with custom action. Earlier naming convention: enabled + */ + 'visibility'?: boolean | null; + + static readonly discriminator: string | undefined = undefined; + + static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ + { + "name": "position", + "baseName": "position", + "type": "string", + "format": "" + }, + { + "name": "visibility", + "baseName": "visibility", + "type": "boolean", + "format": "" + } ]; + + static getAttributeTypeMap() { + return ActionConfig.attributeTypeMap; + } + + public constructor() { + } +} + diff --git a/sdks/typescript/models/ActionConfigInput.ts b/sdks/typescript/models/ActionConfigInput.ts new file mode 100644 index 000000000..d17626efb --- /dev/null +++ b/sdks/typescript/models/ActionConfigInput.ts @@ -0,0 +1,54 @@ +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { HttpFile } from '../http/http'; + +/** +* Specify that the association is enabled for the metadata object Default +*/ +export class ActionConfigInput { + /** + * Position of the Custom action on the Metadata object. Earlier naming convention: context. + */ + 'position'?: ActionConfigInputPositionEnum | null; + /** + * Visibility of the metadata association with custom action. Earlier naming convention: enabled + */ + 'visibility'?: boolean | null; + + static readonly discriminator: string | undefined = undefined; + + static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ + { + "name": "position", + "baseName": "position", + "type": "ActionConfigInputPositionEnum", + "format": "" + }, + { + "name": "visibility", + "baseName": "visibility", + "type": "boolean", + "format": "" + } ]; + + static getAttributeTypeMap() { + return ActionConfigInput.attributeTypeMap; + } + + public constructor() { + } +} + + +export type ActionConfigInputPositionEnum = "MENU" | "PRIMARY" | "CONTEXT_MENU" ; + diff --git a/sdks/typescript/models/ActionConfigInputCreate.ts b/sdks/typescript/models/ActionConfigInputCreate.ts new file mode 100644 index 000000000..42532f740 --- /dev/null +++ b/sdks/typescript/models/ActionConfigInputCreate.ts @@ -0,0 +1,54 @@ +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { HttpFile } from '../http/http'; + +/** +* Specify that the association is enabled for the metadata object Default +*/ +export class ActionConfigInputCreate { + /** + * Position of the Custom action on the Metadata object. Earlier naming convention: context. + */ + 'position'?: ActionConfigInputCreatePositionEnum | null; + /** + * Visibility of the metadata association with custom action. Earlier naming convention: enabled + */ + 'visibility'?: boolean | null; + + static readonly discriminator: string | undefined = undefined; + + static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ + { + "name": "position", + "baseName": "position", + "type": "ActionConfigInputCreatePositionEnum", + "format": "" + }, + { + "name": "visibility", + "baseName": "visibility", + "type": "boolean", + "format": "" + } ]; + + static getAttributeTypeMap() { + return ActionConfigInputCreate.attributeTypeMap; + } + + public constructor() { + } +} + + +export type ActionConfigInputCreatePositionEnum = "MENU" | "PRIMARY" | "CONTEXT_MENU" ; + diff --git a/sdks/typescript/models/ActionDetails.ts b/sdks/typescript/models/ActionDetails.ts new file mode 100644 index 000000000..5e0657f7b --- /dev/null +++ b/sdks/typescript/models/ActionDetails.ts @@ -0,0 +1,47 @@ +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { CALLBACK } from '../models/CALLBACK'; +import { URL } from '../models/URL'; +import { HttpFile } from '../http/http'; + +/** +* Type and Configuration for Custom Actions +*/ +export class ActionDetails { + 'CALLBACK'?: CALLBACK; + 'URL'?: URL; + + static readonly discriminator: string | undefined = undefined; + + static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ + { + "name": "CALLBACK", + "baseName": "CALLBACK", + "type": "CALLBACK", + "format": "" + }, + { + "name": "URL", + "baseName": "URL", + "type": "URL", + "format": "" + } ]; + + static getAttributeTypeMap() { + return ActionDetails.attributeTypeMap; + } + + public constructor() { + } +} + diff --git a/sdks/typescript/models/ActionDetailsInput.ts b/sdks/typescript/models/ActionDetailsInput.ts new file mode 100644 index 000000000..fd11472dc --- /dev/null +++ b/sdks/typescript/models/ActionDetailsInput.ts @@ -0,0 +1,47 @@ +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { CALLBACKInput } from '../models/CALLBACKInput'; +import { URLInput } from '../models/URLInput'; +import { HttpFile } from '../http/http'; + +/** +* Action details includes `Type` and configuration details of Custom Actions. Either Callback or URL is required. +*/ +export class ActionDetailsInput { + 'CALLBACK'?: CALLBACKInput; + 'URL'?: URLInput; + + static readonly discriminator: string | undefined = undefined; + + static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ + { + "name": "CALLBACK", + "baseName": "CALLBACK", + "type": "CALLBACKInput", + "format": "" + }, + { + "name": "URL", + "baseName": "URL", + "type": "URLInput", + "format": "" + } ]; + + static getAttributeTypeMap() { + return ActionDetailsInput.attributeTypeMap; + } + + public constructor() { + } +} + diff --git a/sdks/typescript/models/ActionDetailsInputCreate.ts b/sdks/typescript/models/ActionDetailsInputCreate.ts new file mode 100644 index 000000000..fc86e87a5 --- /dev/null +++ b/sdks/typescript/models/ActionDetailsInputCreate.ts @@ -0,0 +1,47 @@ +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { CALLBACKInputMandatory } from '../models/CALLBACKInputMandatory'; +import { URLInputMandatory } from '../models/URLInputMandatory'; +import { HttpFile } from '../http/http'; + +/** +* Action details includes Type and Configuration for Custom Actions, either Callback or URL is required. When both callback and url are provided, callback would be considered +*/ +export class ActionDetailsInputCreate { + 'CALLBACK'?: CALLBACKInputMandatory; + 'URL'?: URLInputMandatory; + + static readonly discriminator: string | undefined = undefined; + + static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ + { + "name": "CALLBACK", + "baseName": "CALLBACK", + "type": "CALLBACKInputMandatory", + "format": "" + }, + { + "name": "URL", + "baseName": "URL", + "type": "URLInputMandatory", + "format": "" + } ]; + + static getAttributeTypeMap() { + return ActionDetailsInputCreate.attributeTypeMap; + } + + public constructor() { + } +} + diff --git a/sdks/typescript/models/ActivateUserRequest.ts b/sdks/typescript/models/ActivateUserRequest.ts new file mode 100644 index 000000000..436306594 --- /dev/null +++ b/sdks/typescript/models/ActivateUserRequest.ts @@ -0,0 +1,68 @@ +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { HttpFile } from '../http/http'; + +export class ActivateUserRequest { + /** + * Unique ID or name of the user. + */ + 'user_identifier': string; + /** + * Auth token for the user. + */ + 'auth_token': string; + /** + * New password for the user to access the account. + */ + 'password': string; + /** + * Properties of the user. + */ + 'properties'?: string; + + static readonly discriminator: string | undefined = undefined; + + static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ + { + "name": "user_identifier", + "baseName": "user_identifier", + "type": "string", + "format": "" + }, + { + "name": "auth_token", + "baseName": "auth_token", + "type": "string", + "format": "" + }, + { + "name": "password", + "baseName": "password", + "type": "string", + "format": "" + }, + { + "name": "properties", + "baseName": "properties", + "type": "string", + "format": "" + } ]; + + static getAttributeTypeMap() { + return ActivateUserRequest.attributeTypeMap; + } + + public constructor() { + } +} + diff --git a/sdks/typescript/models/AgentConversation.ts b/sdks/typescript/models/AgentConversation.ts new file mode 100644 index 000000000..c30a18788 --- /dev/null +++ b/sdks/typescript/models/AgentConversation.ts @@ -0,0 +1,48 @@ +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { HttpFile } from '../http/http'; + +export class AgentConversation { + /** + * Unique identifier of the conversation. + */ + 'conversation_id': string; + /** + * Unique identifier of the conversation. Version: 26.5.0.cl or later + */ + 'conversation_identifier': string; + + static readonly discriminator: string | undefined = undefined; + + static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ + { + "name": "conversation_id", + "baseName": "conversation_id", + "type": "string", + "format": "" + }, + { + "name": "conversation_identifier", + "baseName": "conversation_identifier", + "type": "string", + "format": "" + } ]; + + static getAttributeTypeMap() { + return AgentConversation.attributeTypeMap; + } + + public constructor() { + } +} + diff --git a/sdks/typescript/models/AnswerContent.ts b/sdks/typescript/models/AnswerContent.ts new file mode 100644 index 000000000..60ad3e7c7 --- /dev/null +++ b/sdks/typescript/models/AnswerContent.ts @@ -0,0 +1,98 @@ +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { HttpFile } from '../http/http'; + +export class AnswerContent { + /** + * Total available data row count. + */ + 'available_data_row_count': number; + /** + * Name of the columns. + */ + 'column_names': Array; + /** + * Rows of data set. + */ + 'data_rows': Array; + /** + * The starting record number from where the records should be included. + */ + 'record_offset': number; + /** + * The number of records that should be included. + */ + 'record_size': number; + /** + * Total returned data row count. + */ + 'returned_data_row_count': number; + /** + * Sampling ratio (0 to 1). If the query was sampled, it is the ratio of keys returned in the data set to the total number of keys expected in the query. If the value is 1.0, this means that the complete result is returned. + */ + 'sampling_ratio': number; + + static readonly discriminator: string | undefined = undefined; + + static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ + { + "name": "available_data_row_count", + "baseName": "available_data_row_count", + "type": "number", + "format": "int32" + }, + { + "name": "column_names", + "baseName": "column_names", + "type": "Array", + "format": "" + }, + { + "name": "data_rows", + "baseName": "data_rows", + "type": "Array", + "format": "" + }, + { + "name": "record_offset", + "baseName": "record_offset", + "type": "number", + "format": "int32" + }, + { + "name": "record_size", + "baseName": "record_size", + "type": "number", + "format": "int32" + }, + { + "name": "returned_data_row_count", + "baseName": "returned_data_row_count", + "type": "number", + "format": "int32" + }, + { + "name": "sampling_ratio", + "baseName": "sampling_ratio", + "type": "number", + "format": "float" + } ]; + + static getAttributeTypeMap() { + return AnswerContent.attributeTypeMap; + } + + public constructor() { + } +} + diff --git a/sdks/typescript/models/AnswerDataResponse.ts b/sdks/typescript/models/AnswerDataResponse.ts new file mode 100644 index 000000000..b58432ea3 --- /dev/null +++ b/sdks/typescript/models/AnswerDataResponse.ts @@ -0,0 +1,62 @@ +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { AnswerContent } from '../models/AnswerContent'; +import { HttpFile } from '../http/http'; + +/** +* Response format associated with fetch data api +*/ +export class AnswerDataResponse { + /** + * The unique identifier of the object + */ + 'metadata_id': string; + /** + * Name of the metadata object + */ + 'metadata_name': string; + /** + * Data content of metadata objects + */ + 'contents': Array; + + static readonly discriminator: string | undefined = undefined; + + static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ + { + "name": "metadata_id", + "baseName": "metadata_id", + "type": "string", + "format": "" + }, + { + "name": "metadata_name", + "baseName": "metadata_name", + "type": "string", + "format": "" + }, + { + "name": "contents", + "baseName": "contents", + "type": "Array", + "format": "" + } ]; + + static getAttributeTypeMap() { + return AnswerDataResponse.attributeTypeMap; + } + + public constructor() { + } +} + diff --git a/sdks/typescript/models/AnswerPngOptionsInput.ts b/sdks/typescript/models/AnswerPngOptionsInput.ts new file mode 100644 index 000000000..eef1a7b11 --- /dev/null +++ b/sdks/typescript/models/AnswerPngOptionsInput.ts @@ -0,0 +1,58 @@ +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { HttpFile } from '../http/http'; + +export class AnswerPngOptionsInput { + /** + * Desired width of the answer image in pixels. Ex. 1920 for Full HD image Version: 26.6.0.cl or later + */ + 'x_resolution'?: number | null; + /** + * Desired height of the answer image in pixels. Ex. 1080 for Full HD image Version: 26.6.0.cl or later + */ + 'y_resolution'?: number | null; + /** + * The scale of the image in percentage. Ex. 100 for 100% scale. Version: 26.6.0.cl or later + */ + 'scaling'?: number | null; + + static readonly discriminator: string | undefined = undefined; + + static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ + { + "name": "x_resolution", + "baseName": "x_resolution", + "type": "number", + "format": "int32" + }, + { + "name": "y_resolution", + "baseName": "y_resolution", + "type": "number", + "format": "int32" + }, + { + "name": "scaling", + "baseName": "scaling", + "type": "number", + "format": "int32" + } ]; + + static getAttributeTypeMap() { + return AnswerPngOptionsInput.attributeTypeMap; + } + + public constructor() { + } +} + diff --git a/sdks/typescript/models/AssignChangeAuthorRequest.ts b/sdks/typescript/models/AssignChangeAuthorRequest.ts new file mode 100644 index 000000000..eff06de13 --- /dev/null +++ b/sdks/typescript/models/AssignChangeAuthorRequest.ts @@ -0,0 +1,59 @@ +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { AuthorMetadataTypeInput } from '../models/AuthorMetadataTypeInput'; +import { HttpFile } from '../http/http'; + +export class AssignChangeAuthorRequest { + /** + * GUID or name of the metadata object. + */ + 'metadata': Array; + /** + * GUID or name of the user who you want to assign as the author. + */ + 'user_identifier': string; + /** + * GUID or name of the current author. When defined, the metadata objects authored by the specified owner are filtered for the API operation. + */ + 'current_owner_identifier'?: string; + + static readonly discriminator: string | undefined = undefined; + + static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ + { + "name": "metadata", + "baseName": "metadata", + "type": "Array", + "format": "" + }, + { + "name": "user_identifier", + "baseName": "user_identifier", + "type": "string", + "format": "" + }, + { + "name": "current_owner_identifier", + "baseName": "current_owner_identifier", + "type": "string", + "format": "" + } ]; + + static getAttributeTypeMap() { + return AssignChangeAuthorRequest.attributeTypeMap; + } + + public constructor() { + } +} + diff --git a/sdks/typescript/models/AssignTagRequest.ts b/sdks/typescript/models/AssignTagRequest.ts new file mode 100644 index 000000000..382c28784 --- /dev/null +++ b/sdks/typescript/models/AssignTagRequest.ts @@ -0,0 +1,49 @@ +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { TagMetadataTypeInput } from '../models/TagMetadataTypeInput'; +import { HttpFile } from '../http/http'; + +export class AssignTagRequest { + /** + * Metadata objects. + */ + 'metadata': Array; + /** + * GUID or name of the tag. + */ + 'tag_identifiers': Array; + + static readonly discriminator: string | undefined = undefined; + + static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ + { + "name": "metadata", + "baseName": "metadata", + "type": "Array", + "format": "" + }, + { + "name": "tag_identifiers", + "baseName": "tag_identifiers", + "type": "Array", + "format": "" + } ]; + + static getAttributeTypeMap() { + return AssignTagRequest.attributeTypeMap; + } + + public constructor() { + } +} + diff --git a/sdks/typescript/models/AssociateMetadataInput.ts b/sdks/typescript/models/AssociateMetadataInput.ts new file mode 100644 index 000000000..4f6c848a3 --- /dev/null +++ b/sdks/typescript/models/AssociateMetadataInput.ts @@ -0,0 +1,59 @@ +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { ActionConfigInput } from '../models/ActionConfigInput'; +import { HttpFile } from '../http/http'; + +export class AssociateMetadataInput { + 'action_config'?: ActionConfigInput; + /** + * Unique ID or name of the metadata. + */ + 'identifier'?: string | null; + /** + * Type of metadata. Required if the name of the object is set as the identifier. This attribute is optional when the object GUID is specified as the identifier. + */ + 'type'?: AssociateMetadataInputTypeEnum | null; + + static readonly discriminator: string | undefined = undefined; + + static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ + { + "name": "action_config", + "baseName": "action_config", + "type": "ActionConfigInput", + "format": "" + }, + { + "name": "identifier", + "baseName": "identifier", + "type": "string", + "format": "" + }, + { + "name": "type", + "baseName": "type", + "type": "AssociateMetadataInputTypeEnum", + "format": "" + } ]; + + static getAttributeTypeMap() { + return AssociateMetadataInput.attributeTypeMap; + } + + public constructor() { + } +} + + +export type AssociateMetadataInputTypeEnum = "VISUALIZATION" | "ANSWER" | "WORKSHEET" ; + diff --git a/sdks/typescript/models/AssociateMetadataInputCreate.ts b/sdks/typescript/models/AssociateMetadataInputCreate.ts new file mode 100644 index 000000000..5936049ca --- /dev/null +++ b/sdks/typescript/models/AssociateMetadataInputCreate.ts @@ -0,0 +1,59 @@ +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { ActionConfigInputCreate } from '../models/ActionConfigInputCreate'; +import { HttpFile } from '../http/http'; + +export class AssociateMetadataInputCreate { + 'action_config'?: ActionConfigInputCreate; + /** + * Unique ID or name of the metadata. + */ + 'identifier': string; + /** + * Type of metadata. Required if the name of the object is set as the identifier. This attribute is optional when the object GUID is specified as the identifier. + */ + 'type'?: AssociateMetadataInputCreateTypeEnum | null; + + static readonly discriminator: string | undefined = undefined; + + static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ + { + "name": "action_config", + "baseName": "action_config", + "type": "ActionConfigInputCreate", + "format": "" + }, + { + "name": "identifier", + "baseName": "identifier", + "type": "string", + "format": "" + }, + { + "name": "type", + "baseName": "type", + "type": "AssociateMetadataInputCreateTypeEnum", + "format": "" + } ]; + + static getAttributeTypeMap() { + return AssociateMetadataInputCreate.attributeTypeMap; + } + + public constructor() { + } +} + + +export type AssociateMetadataInputCreateTypeEnum = "VISUALIZATION" | "ANSWER" | "WORKSHEET" ; + diff --git a/sdks/typescript/models/AuthClusterPreferences.ts b/sdks/typescript/models/AuthClusterPreferences.ts new file mode 100644 index 000000000..80a8759f8 --- /dev/null +++ b/sdks/typescript/models/AuthClusterPreferences.ts @@ -0,0 +1,55 @@ +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { AuthSettingsAccessToken } from '../models/AuthSettingsAccessToken'; +import { HttpFile } from '../http/http'; + +/** +* Cluster-level authentication preferences. +*/ +export class AuthClusterPreferences { + /** + * Whether authentication is enabled or disabled at the cluster level. + */ + 'auth_status'?: AuthClusterPreferencesAuthStatusEnum | null; + /** + * Cluster-level access tokens. Absent when no token is configured. + */ + 'access_tokens'?: Array | null; + + static readonly discriminator: string | undefined = undefined; + + static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ + { + "name": "auth_status", + "baseName": "auth_status", + "type": "AuthClusterPreferencesAuthStatusEnum", + "format": "" + }, + { + "name": "access_tokens", + "baseName": "access_tokens", + "type": "Array", + "format": "" + } ]; + + static getAttributeTypeMap() { + return AuthClusterPreferences.attributeTypeMap; + } + + public constructor() { + } +} + + +export type AuthClusterPreferencesAuthStatusEnum = "ENABLED" | "DISABLED" ; + diff --git a/sdks/typescript/models/AuthClusterPreferencesInput.ts b/sdks/typescript/models/AuthClusterPreferencesInput.ts new file mode 100644 index 000000000..1bb76cd33 --- /dev/null +++ b/sdks/typescript/models/AuthClusterPreferencesInput.ts @@ -0,0 +1,44 @@ +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { HttpFile } from '../http/http'; + +/** +* Input for cluster-level auth configuration. +*/ +export class AuthClusterPreferencesInput { + /** + * Enable or disable authentication at the cluster level. When enabled, a new token is generated if one does not exist. When disabled, the existing token is revoked. + */ + 'auth_status'?: AuthClusterPreferencesInputAuthStatusEnum | null; + + static readonly discriminator: string | undefined = undefined; + + static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ + { + "name": "auth_status", + "baseName": "auth_status", + "type": "AuthClusterPreferencesInputAuthStatusEnum", + "format": "" + } ]; + + static getAttributeTypeMap() { + return AuthClusterPreferencesInput.attributeTypeMap; + } + + public constructor() { + } +} + + +export type AuthClusterPreferencesInputAuthStatusEnum = "ENABLED" | "DISABLED" ; + diff --git a/sdks/typescript/models/AuthOrgInfo.ts b/sdks/typescript/models/AuthOrgInfo.ts new file mode 100644 index 000000000..8db1b9854 --- /dev/null +++ b/sdks/typescript/models/AuthOrgInfo.ts @@ -0,0 +1,51 @@ +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { HttpFile } from '../http/http'; + +/** +* Org identifier returned in auth settings search results. +*/ +export class AuthOrgInfo { + /** + * Unique identifier of the org. + */ + 'id': number; + /** + * Name of the org. + */ + 'name'?: string | null; + + static readonly discriminator: string | undefined = undefined; + + static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ + { + "name": "id", + "baseName": "id", + "type": "number", + "format": "int32" + }, + { + "name": "name", + "baseName": "name", + "type": "string", + "format": "" + } ]; + + static getAttributeTypeMap() { + return AuthOrgInfo.attributeTypeMap; + } + + public constructor() { + } +} + diff --git a/sdks/typescript/models/AuthOrgPreference.ts b/sdks/typescript/models/AuthOrgPreference.ts new file mode 100644 index 000000000..3b272c346 --- /dev/null +++ b/sdks/typescript/models/AuthOrgPreference.ts @@ -0,0 +1,63 @@ +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { AuthOrgInfo } from '../models/AuthOrgInfo'; +import { AuthSettingsAccessToken } from '../models/AuthSettingsAccessToken'; +import { HttpFile } from '../http/http'; + +/** +* Org-level authentication preferences for a single org. +*/ +export class AuthOrgPreference { + 'org'?: AuthOrgInfo; + /** + * Whether authentication is enabled or disabled for this org. + */ + 'auth_status'?: AuthOrgPreferenceAuthStatusEnum | null; + /** + * Org-level access tokens. Absent when no token is configured or the feature flag is off. + */ + 'access_tokens'?: Array | null; + + static readonly discriminator: string | undefined = undefined; + + static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ + { + "name": "org", + "baseName": "org", + "type": "AuthOrgInfo", + "format": "" + }, + { + "name": "auth_status", + "baseName": "auth_status", + "type": "AuthOrgPreferenceAuthStatusEnum", + "format": "" + }, + { + "name": "access_tokens", + "baseName": "access_tokens", + "type": "Array", + "format": "" + } ]; + + static getAttributeTypeMap() { + return AuthOrgPreference.attributeTypeMap; + } + + public constructor() { + } +} + + +export type AuthOrgPreferenceAuthStatusEnum = "ENABLED" | "DISABLED" ; + diff --git a/sdks/typescript/models/AuthOrgPreferenceInput.ts b/sdks/typescript/models/AuthOrgPreferenceInput.ts new file mode 100644 index 000000000..575163b2c --- /dev/null +++ b/sdks/typescript/models/AuthOrgPreferenceInput.ts @@ -0,0 +1,54 @@ +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { HttpFile } from '../http/http'; + +/** +* Input for org-level auth configuration. +*/ +export class AuthOrgPreferenceInput { + /** + * Unique ID or name of the org to configure. + */ + 'org_identifier': string; + /** + * Enable or disable authentication for this org. When enabled, a new token is generated if one does not exist. When disabled, the existing token is revoked. + */ + 'auth_status'?: AuthOrgPreferenceInputAuthStatusEnum | null; + + static readonly discriminator: string | undefined = undefined; + + static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ + { + "name": "org_identifier", + "baseName": "org_identifier", + "type": "string", + "format": "" + }, + { + "name": "auth_status", + "baseName": "auth_status", + "type": "AuthOrgPreferenceInputAuthStatusEnum", + "format": "" + } ]; + + static getAttributeTypeMap() { + return AuthOrgPreferenceInput.attributeTypeMap; + } + + public constructor() { + } +} + + +export type AuthOrgPreferenceInputAuthStatusEnum = "ENABLED" | "DISABLED" ; + diff --git a/sdks/typescript/models/AuthSettingsAccessToken.ts b/sdks/typescript/models/AuthSettingsAccessToken.ts new file mode 100644 index 000000000..203a52bfa --- /dev/null +++ b/sdks/typescript/models/AuthSettingsAccessToken.ts @@ -0,0 +1,41 @@ +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { HttpFile } from '../http/http'; + +/** +* An auth settings access token. +*/ +export class AuthSettingsAccessToken { + /** + * The plaintext token key value. + */ + 'key': string; + + static readonly discriminator: string | undefined = undefined; + + static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ + { + "name": "key", + "baseName": "key", + "type": "string", + "format": "" + } ]; + + static getAttributeTypeMap() { + return AuthSettingsAccessToken.attributeTypeMap; + } + + public constructor() { + } +} + diff --git a/sdks/typescript/models/Authentication.ts b/sdks/typescript/models/Authentication.ts new file mode 100644 index 000000000..96e4e6365 --- /dev/null +++ b/sdks/typescript/models/Authentication.ts @@ -0,0 +1,67 @@ +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { APIKey } from '../models/APIKey'; +import { BasicAuth } from '../models/BasicAuth'; +import { HttpFile } from '../http/http'; + +/** +* Authorization type for the custom action. +*/ +export class Authentication { + 'API_Key'?: APIKey; + 'Basic_Auth'?: BasicAuth; + /** + * Bearer tokens enable requests to authenticate using an access key. + */ + 'Bearer_Token'?: string | null; + /** + * No authorization. If your request doesn\'t require authorization. + */ + 'No_Auth'?: string | null; + + static readonly discriminator: string | undefined = undefined; + + static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ + { + "name": "API_Key", + "baseName": "API_Key", + "type": "APIKey", + "format": "" + }, + { + "name": "Basic_Auth", + "baseName": "Basic_Auth", + "type": "BasicAuth", + "format": "" + }, + { + "name": "Bearer_Token", + "baseName": "Bearer_Token", + "type": "string", + "format": "" + }, + { + "name": "No_Auth", + "baseName": "No_Auth", + "type": "string", + "format": "" + } ]; + + static getAttributeTypeMap() { + return Authentication.attributeTypeMap; + } + + public constructor() { + } +} + diff --git a/sdks/typescript/models/AuthenticationInput.ts b/sdks/typescript/models/AuthenticationInput.ts new file mode 100644 index 000000000..a9954de32 --- /dev/null +++ b/sdks/typescript/models/AuthenticationInput.ts @@ -0,0 +1,67 @@ +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { APIKeyInput } from '../models/APIKeyInput'; +import { BasicAuthInput } from '../models/BasicAuthInput'; +import { HttpFile } from '../http/http'; + +/** +* Authorization type for the custom action. +*/ +export class AuthenticationInput { + 'API_Key'?: APIKeyInput; + 'Basic_Auth'?: BasicAuthInput; + /** + * Bearer tokens enable requests to authenticate using an access key. + */ + 'Bearer_Token'?: string | null; + /** + * No authorization. If your request doesn\'t require authorization. + */ + 'No_Auth'?: string | null; + + static readonly discriminator: string | undefined = undefined; + + static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ + { + "name": "API_Key", + "baseName": "API_Key", + "type": "APIKeyInput", + "format": "" + }, + { + "name": "Basic_Auth", + "baseName": "Basic_Auth", + "type": "BasicAuthInput", + "format": "" + }, + { + "name": "Bearer_Token", + "baseName": "Bearer_Token", + "type": "string", + "format": "" + }, + { + "name": "No_Auth", + "baseName": "No_Auth", + "type": "string", + "format": "" + } ]; + + static getAttributeTypeMap() { + return AuthenticationInput.attributeTypeMap; + } + + public constructor() { + } +} + diff --git a/sdks/typescript/models/Author.ts b/sdks/typescript/models/Author.ts new file mode 100644 index 000000000..069d97999 --- /dev/null +++ b/sdks/typescript/models/Author.ts @@ -0,0 +1,51 @@ +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { HttpFile } from '../http/http'; + +/** +* Author of the schedule. +*/ +export class Author { + /** + * The unique identifier of the object. + */ + 'id': string; + /** + * Name of the object. + */ + 'name': string; + + static readonly discriminator: string | undefined = undefined; + + static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ + { + "name": "id", + "baseName": "id", + "type": "string", + "format": "" + }, + { + "name": "name", + "baseName": "name", + "type": "string", + "format": "" + } ]; + + static getAttributeTypeMap() { + return Author.attributeTypeMap; + } + + public constructor() { + } +} + diff --git a/sdks/typescript/models/AuthorMetadataTypeInput.ts b/sdks/typescript/models/AuthorMetadataTypeInput.ts new file mode 100644 index 000000000..83bd510a0 --- /dev/null +++ b/sdks/typescript/models/AuthorMetadataTypeInput.ts @@ -0,0 +1,54 @@ +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { HttpFile } from '../http/http'; + +/** +* MetadataType InputType used in Author API\'s +*/ +export class AuthorMetadataTypeInput { + /** + * Type of metadata. Required if the name of the object is set as the identifier. This attribute is optional when the object GUID is specified as the identifier. + */ + 'type'?: AuthorMetadataTypeInputTypeEnum | null; + /** + * Unique ID or name of the metadata object. + */ + 'identifier': string; + + static readonly discriminator: string | undefined = undefined; + + static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ + { + "name": "type", + "baseName": "type", + "type": "AuthorMetadataTypeInputTypeEnum", + "format": "" + }, + { + "name": "identifier", + "baseName": "identifier", + "type": "string", + "format": "" + } ]; + + static getAttributeTypeMap() { + return AuthorMetadataTypeInput.attributeTypeMap; + } + + public constructor() { + } +} + + +export type AuthorMetadataTypeInputTypeEnum = "LIVEBOARD" | "ANSWER" | "LOGICAL_TABLE" | "CONNECTION" ; + diff --git a/sdks/typescript/models/AuthorType.ts b/sdks/typescript/models/AuthorType.ts new file mode 100644 index 000000000..5fec4c133 --- /dev/null +++ b/sdks/typescript/models/AuthorType.ts @@ -0,0 +1,48 @@ +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { HttpFile } from '../http/http'; + +export class AuthorType { + /** + * Email id of the committer + */ + 'email'?: string | null; + /** + * Username of the committer + */ + 'username'?: string | null; + + static readonly discriminator: string | undefined = undefined; + + static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ + { + "name": "email", + "baseName": "email", + "type": "string", + "format": "" + }, + { + "name": "username", + "baseName": "username", + "type": "string", + "format": "" + } ]; + + static getAttributeTypeMap() { + return AuthorType.attributeTypeMap; + } + + public constructor() { + } +} + diff --git a/sdks/typescript/models/AwsS3Config.ts b/sdks/typescript/models/AwsS3Config.ts new file mode 100644 index 000000000..b18419dda --- /dev/null +++ b/sdks/typescript/models/AwsS3Config.ts @@ -0,0 +1,81 @@ +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { HttpFile } from '../http/http'; + +/** +* AWS S3 storage configuration details. +*/ +export class AwsS3Config { + /** + * Name of the S3 bucket where webhook payloads are stored. + */ + 'bucket_name': string; + /** + * AWS region where the S3 bucket is located. + */ + 'region': string; + /** + * ARN of the IAM role used for S3 access. + */ + 'role_arn': string; + /** + * External ID for secure cross-account role assumption. + */ + 'external_id'?: string | null; + /** + * Path prefix for organizing objects within the bucket. + */ + 'path_prefix'?: string | null; + + static readonly discriminator: string | undefined = undefined; + + static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ + { + "name": "bucket_name", + "baseName": "bucket_name", + "type": "string", + "format": "" + }, + { + "name": "region", + "baseName": "region", + "type": "string", + "format": "" + }, + { + "name": "role_arn", + "baseName": "role_arn", + "type": "string", + "format": "" + }, + { + "name": "external_id", + "baseName": "external_id", + "type": "string", + "format": "" + }, + { + "name": "path_prefix", + "baseName": "path_prefix", + "type": "string", + "format": "" + } ]; + + static getAttributeTypeMap() { + return AwsS3Config.attributeTypeMap; + } + + public constructor() { + } +} + diff --git a/sdks/typescript/models/AwsS3ConfigInput.ts b/sdks/typescript/models/AwsS3ConfigInput.ts new file mode 100644 index 000000000..457dfeaf2 --- /dev/null +++ b/sdks/typescript/models/AwsS3ConfigInput.ts @@ -0,0 +1,81 @@ +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { HttpFile } from '../http/http'; + +/** +* Input type for AWS S3 storage configuration. +*/ +export class AwsS3ConfigInput { + /** + * Name of the S3 bucket where webhook payloads will be stored. Example: \"my-webhook-files\" + */ + 'bucket_name': string; + /** + * AWS region where the S3 bucket is located. Example: \"us-west-2\" + */ + 'region': string; + /** + * ARN of the IAM role to assume for S3 access. Example: \"arn:aws:iam::123456789012:role/ThoughtSpotDeliveryRole\" + */ + 'role_arn': string; + /** + * External ID for secure cross-account role assumption. Example: \"ts-webhook-a1b2c3d4-7890\" + */ + 'external_id'?: string | null; + /** + * Optional path prefix for organizing objects within the bucket. Example: \"thoughtspot-webhooks/\" + */ + 'path_prefix'?: string | null; + + static readonly discriminator: string | undefined = undefined; + + static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ + { + "name": "bucket_name", + "baseName": "bucket_name", + "type": "string", + "format": "" + }, + { + "name": "region", + "baseName": "region", + "type": "string", + "format": "" + }, + { + "name": "role_arn", + "baseName": "role_arn", + "type": "string", + "format": "" + }, + { + "name": "external_id", + "baseName": "external_id", + "type": "string", + "format": "" + }, + { + "name": "path_prefix", + "baseName": "path_prefix", + "type": "string", + "format": "" + } ]; + + static getAttributeTypeMap() { + return AwsS3ConfigInput.attributeTypeMap; + } + + public constructor() { + } +} + diff --git a/sdks/typescript/models/BasicAuth.ts b/sdks/typescript/models/BasicAuth.ts new file mode 100644 index 000000000..2b9669d21 --- /dev/null +++ b/sdks/typescript/models/BasicAuth.ts @@ -0,0 +1,51 @@ +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { HttpFile } from '../http/http'; + +/** +* Basic Auth: Basic authentication involves sending a verified username and password with your request. +*/ +export class BasicAuth { + /** + * Password for the basic authentication + */ + 'password'?: string | null; + /** + * Username for the basic authentication + */ + 'username'?: string | null; + + static readonly discriminator: string | undefined = undefined; + + static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ + { + "name": "password", + "baseName": "password", + "type": "string", + "format": "" + }, + { + "name": "username", + "baseName": "username", + "type": "string", + "format": "" + } ]; + + static getAttributeTypeMap() { + return BasicAuth.attributeTypeMap; + } + + public constructor() { + } +} + diff --git a/sdks/typescript/models/BasicAuthInput.ts b/sdks/typescript/models/BasicAuthInput.ts new file mode 100644 index 000000000..4eb4bbd7a --- /dev/null +++ b/sdks/typescript/models/BasicAuthInput.ts @@ -0,0 +1,51 @@ +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { HttpFile } from '../http/http'; + +/** +* Basic Auth: Basic authentication involves sending a verified username and password with your request. +*/ +export class BasicAuthInput { + /** + * Password for the basic authentication + */ + 'password'?: string | null; + /** + * Username for the basic authentication + */ + 'username'?: string | null; + + static readonly discriminator: string | undefined = undefined; + + static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ + { + "name": "password", + "baseName": "password", + "type": "string", + "format": "" + }, + { + "name": "username", + "baseName": "username", + "type": "string", + "format": "" + } ]; + + static getAttributeTypeMap() { + return BasicAuthInput.attributeTypeMap; + } + + public constructor() { + } +} + diff --git a/sdks/typescript/models/CALLBACK.ts b/sdks/typescript/models/CALLBACK.ts new file mode 100644 index 000000000..4086b967e --- /dev/null +++ b/sdks/typescript/models/CALLBACK.ts @@ -0,0 +1,41 @@ +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { HttpFile } from '../http/http'; + +/** +* CALLBACK Custom Action Type +*/ +export class CALLBACK { + /** + * Reference name of the SDK. By default, the value will be set to action name. + */ + 'reference'?: string | null; + + static readonly discriminator: string | undefined = undefined; + + static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ + { + "name": "reference", + "baseName": "reference", + "type": "string", + "format": "" + } ]; + + static getAttributeTypeMap() { + return CALLBACK.attributeTypeMap; + } + + public constructor() { + } +} + diff --git a/sdks/typescript/models/CALLBACKInput.ts b/sdks/typescript/models/CALLBACKInput.ts new file mode 100644 index 000000000..7ad16a765 --- /dev/null +++ b/sdks/typescript/models/CALLBACKInput.ts @@ -0,0 +1,41 @@ +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { HttpFile } from '../http/http'; + +/** +* CALLBACK Custom Action Type +*/ +export class CALLBACKInput { + /** + * Reference name. By default, the value will be set to action name. + */ + 'reference'?: string | null; + + static readonly discriminator: string | undefined = undefined; + + static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ + { + "name": "reference", + "baseName": "reference", + "type": "string", + "format": "" + } ]; + + static getAttributeTypeMap() { + return CALLBACKInput.attributeTypeMap; + } + + public constructor() { + } +} + diff --git a/sdks/typescript/models/CALLBACKInputMandatory.ts b/sdks/typescript/models/CALLBACKInputMandatory.ts new file mode 100644 index 000000000..327d9a429 --- /dev/null +++ b/sdks/typescript/models/CALLBACKInputMandatory.ts @@ -0,0 +1,41 @@ +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { HttpFile } from '../http/http'; + +/** +* CALLBACK Custom Action Type +*/ +export class CALLBACKInputMandatory { + /** + * Reference name. By default, the value will be set to action name. + */ + 'reference'?: string | null; + + static readonly discriminator: string | undefined = undefined; + + static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ + { + "name": "reference", + "baseName": "reference", + "type": "string", + "format": "" + } ]; + + static getAttributeTypeMap() { + return CALLBACKInputMandatory.attributeTypeMap; + } + + public constructor() { + } +} + diff --git a/sdks/typescript/models/CalendarResponse.ts b/sdks/typescript/models/CalendarResponse.ts new file mode 100644 index 000000000..be25a04cb --- /dev/null +++ b/sdks/typescript/models/CalendarResponse.ts @@ -0,0 +1,98 @@ +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { HttpFile } from '../http/http'; + +export class CalendarResponse { + /** + * Name of the calendar + */ + 'calendar_name'?: string | null; + /** + * Name of the connection + */ + 'connection_name'?: string | null; + /** + * Type of data warehouse + */ + 'data_warehouse_type'?: string | null; + /** + * Last modification time in milliseconds + */ + 'modification_time_in_millis'?: string | null; + /** + * Name of the author who created the calendar + */ + 'author_name'?: string | null; + /** + * Unique ID of the connection + */ + 'connection_id'?: string | null; + /** + * Unique ID of the calendar + */ + 'calendar_id'?: string | null; + + static readonly discriminator: string | undefined = undefined; + + static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ + { + "name": "calendar_name", + "baseName": "calendar_name", + "type": "string", + "format": "" + }, + { + "name": "connection_name", + "baseName": "connection_name", + "type": "string", + "format": "" + }, + { + "name": "data_warehouse_type", + "baseName": "data_warehouse_type", + "type": "string", + "format": "" + }, + { + "name": "modification_time_in_millis", + "baseName": "modification_time_in_millis", + "type": "string", + "format": "" + }, + { + "name": "author_name", + "baseName": "author_name", + "type": "string", + "format": "" + }, + { + "name": "connection_id", + "baseName": "connection_id", + "type": "string", + "format": "" + }, + { + "name": "calendar_id", + "baseName": "calendar_id", + "type": "string", + "format": "" + } ]; + + static getAttributeTypeMap() { + return CalendarResponse.attributeTypeMap; + } + + public constructor() { + } +} + diff --git a/sdks/typescript/models/ChangeUserPasswordRequest.ts b/sdks/typescript/models/ChangeUserPasswordRequest.ts new file mode 100644 index 000000000..cd6f21499 --- /dev/null +++ b/sdks/typescript/models/ChangeUserPasswordRequest.ts @@ -0,0 +1,58 @@ +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { HttpFile } from '../http/http'; + +export class ChangeUserPasswordRequest { + /** + * Current password of the user. + */ + 'current_password': string; + /** + * New password for the user. + */ + 'new_password': string; + /** + * GUID or name of the user. + */ + 'user_identifier': string; + + static readonly discriminator: string | undefined = undefined; + + static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ + { + "name": "current_password", + "baseName": "current_password", + "type": "string", + "format": "" + }, + { + "name": "new_password", + "baseName": "new_password", + "type": "string", + "format": "" + }, + { + "name": "user_identifier", + "baseName": "user_identifier", + "type": "string", + "format": "" + } ]; + + static getAttributeTypeMap() { + return ChangeUserPasswordRequest.attributeTypeMap; + } + + public constructor() { + } +} + diff --git a/sdks/typescript/models/ChannelHistoryEventInfo.ts b/sdks/typescript/models/ChannelHistoryEventInfo.ts new file mode 100644 index 000000000..bc220328f --- /dev/null +++ b/sdks/typescript/models/ChannelHistoryEventInfo.ts @@ -0,0 +1,74 @@ +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { HttpFile } from '../http/http'; + +/** +* Event metadata for the triggering event associated with a job. +*/ +export class ChannelHistoryEventInfo { + /** + * Type of the event. + */ + 'type': ChannelHistoryEventInfoTypeEnum; + /** + * Unique ID of the event. + */ + 'id': string; + /** + * Name of the event. + */ + 'name'?: string | null; + /** + * Unique run ID for this event execution. + */ + 'run_id'?: string | null; + + static readonly discriminator: string | undefined = undefined; + + static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ + { + "name": "type", + "baseName": "type", + "type": "ChannelHistoryEventInfoTypeEnum", + "format": "" + }, + { + "name": "id", + "baseName": "id", + "type": "string", + "format": "" + }, + { + "name": "name", + "baseName": "name", + "type": "string", + "format": "" + }, + { + "name": "run_id", + "baseName": "run_id", + "type": "string", + "format": "" + } ]; + + static getAttributeTypeMap() { + return ChannelHistoryEventInfo.attributeTypeMap; + } + + public constructor() { + } +} + + +export type ChannelHistoryEventInfoTypeEnum = "LIVEBOARD_SCHEDULE" ; + diff --git a/sdks/typescript/models/ChannelHistoryEventInput.ts b/sdks/typescript/models/ChannelHistoryEventInput.ts new file mode 100644 index 000000000..56b2a6649 --- /dev/null +++ b/sdks/typescript/models/ChannelHistoryEventInput.ts @@ -0,0 +1,54 @@ +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { HttpFile } from '../http/http'; + +/** +* Event specification for channel history search. +*/ +export class ChannelHistoryEventInput { + /** + * Type of the event. + */ + 'type': ChannelHistoryEventInputTypeEnum; + /** + * Unique ID or name of the event. + */ + 'identifier'?: string | null; + + static readonly discriminator: string | undefined = undefined; + + static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ + { + "name": "type", + "baseName": "type", + "type": "ChannelHistoryEventInputTypeEnum", + "format": "" + }, + { + "name": "identifier", + "baseName": "identifier", + "type": "string", + "format": "" + } ]; + + static getAttributeTypeMap() { + return ChannelHistoryEventInput.attributeTypeMap; + } + + public constructor() { + } +} + + +export type ChannelHistoryEventInputTypeEnum = "LIVEBOARD_SCHEDULE" ; + diff --git a/sdks/typescript/models/ChannelHistoryJob.ts b/sdks/typescript/models/ChannelHistoryJob.ts new file mode 100644 index 000000000..6048744aa --- /dev/null +++ b/sdks/typescript/models/ChannelHistoryJob.ts @@ -0,0 +1,103 @@ +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { ChannelHistoryEventInfo } from '../models/ChannelHistoryEventInfo'; +import { JobRecipient } from '../models/JobRecipient'; +import { HttpFile } from '../http/http'; + +/** +* A single job execution record for a channel. +*/ +export class ChannelHistoryJob { + /** + * Unique identifier for this job. + */ + 'id': string; + /** + * Delivery status of this job. + */ + 'status': ChannelHistoryJobStatusEnum; + /** + * Timestamp when this job was created (epoch milliseconds). + */ + 'creation_time_in_millis': number; + 'event'?: ChannelHistoryEventInfo; + /** + * The users, groups or external recipients for this job. + */ + 'recipients'?: Array | null; + /** + * Additional delivery details such as HTTP response code or error message. + */ + 'detail'?: string | null; + /** + * Number of attempts made. 1 indicates first attempt. + */ + 'try_count'?: number | null; + + static readonly discriminator: string | undefined = undefined; + + static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ + { + "name": "id", + "baseName": "id", + "type": "string", + "format": "" + }, + { + "name": "status", + "baseName": "status", + "type": "ChannelHistoryJobStatusEnum", + "format": "" + }, + { + "name": "creation_time_in_millis", + "baseName": "creation_time_in_millis", + "type": "number", + "format": "float" + }, + { + "name": "event", + "baseName": "event", + "type": "ChannelHistoryEventInfo", + "format": "" + }, + { + "name": "recipients", + "baseName": "recipients", + "type": "Array", + "format": "" + }, + { + "name": "detail", + "baseName": "detail", + "type": "string", + "format": "" + }, + { + "name": "try_count", + "baseName": "try_count", + "type": "number", + "format": "int32" + } ]; + + static getAttributeTypeMap() { + return ChannelHistoryJob.attributeTypeMap; + } + + public constructor() { + } +} + + +export type ChannelHistoryJobStatusEnum = "PENDING" | "RETRY" | "SUCCESS" | "FAILED" ; + diff --git a/sdks/typescript/models/ChannelValidationAwsS3Info.ts b/sdks/typescript/models/ChannelValidationAwsS3Info.ts new file mode 100644 index 000000000..d30a0070a --- /dev/null +++ b/sdks/typescript/models/ChannelValidationAwsS3Info.ts @@ -0,0 +1,61 @@ +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { HttpFile } from '../http/http'; + +/** +* AWS S3 storage information returned from a validation step. +*/ +export class ChannelValidationAwsS3Info { + /** + * Name of the S3 bucket. + */ + 'bucket_name'?: string | null; + /** + * Name of the uploaded file. + */ + 'file_name'?: string | null; + /** + * Key of the object in S3 storage. + */ + 'object_key'?: string | null; + + static readonly discriminator: string | undefined = undefined; + + static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ + { + "name": "bucket_name", + "baseName": "bucket_name", + "type": "string", + "format": "" + }, + { + "name": "file_name", + "baseName": "file_name", + "type": "string", + "format": "" + }, + { + "name": "object_key", + "baseName": "object_key", + "type": "string", + "format": "" + } ]; + + static getAttributeTypeMap() { + return ChannelValidationAwsS3Info.attributeTypeMap; + } + + public constructor() { + } +} + diff --git a/sdks/typescript/models/ChannelValidationDetail.ts b/sdks/typescript/models/ChannelValidationDetail.ts new file mode 100644 index 000000000..4bb4b69c6 --- /dev/null +++ b/sdks/typescript/models/ChannelValidationDetail.ts @@ -0,0 +1,83 @@ +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { ChannelValidationAwsS3Info } from '../models/ChannelValidationAwsS3Info'; +import { HttpFile } from '../http/http'; + +/** +* Validation detail result for a sub-step. +*/ +export class ChannelValidationDetail { + /** + * The validation step that was performed. + */ + 'validation_step': ChannelValidationDetailValidationStepEnum; + /** + * Status of this validation step. + */ + 'status': ChannelValidationDetailStatusEnum; + /** + * HTTP status code returned by the channel (if applicable). + */ + 'http_status'?: number | null; + /** + * Error message from the channel or validation process. + */ + 'error_message'?: string | null; + 'aws_s3_info'?: ChannelValidationAwsS3Info; + + static readonly discriminator: string | undefined = undefined; + + static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ + { + "name": "validation_step", + "baseName": "validation_step", + "type": "ChannelValidationDetailValidationStepEnum", + "format": "" + }, + { + "name": "status", + "baseName": "status", + "type": "ChannelValidationDetailStatusEnum", + "format": "" + }, + { + "name": "http_status", + "baseName": "http_status", + "type": "number", + "format": "int32" + }, + { + "name": "error_message", + "baseName": "error_message", + "type": "string", + "format": "" + }, + { + "name": "aws_s3_info", + "baseName": "aws_s3_info", + "type": "ChannelValidationAwsS3Info", + "format": "" + } ]; + + static getAttributeTypeMap() { + return ChannelValidationDetail.attributeTypeMap; + } + + public constructor() { + } +} + + +export type ChannelValidationDetailValidationStepEnum = "HTTP_CONNECTION_CHECK" | "STORAGE_FILE_UPLOAD_CHECK" ; +export type ChannelValidationDetailStatusEnum = "SUCCESS" | "FAILED" ; + diff --git a/sdks/typescript/models/ClusterNonEmbedAccess.ts b/sdks/typescript/models/ClusterNonEmbedAccess.ts new file mode 100644 index 000000000..37011bfee --- /dev/null +++ b/sdks/typescript/models/ClusterNonEmbedAccess.ts @@ -0,0 +1,52 @@ +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { GroupInfo } from '../models/GroupInfo'; +import { HttpFile } from '../http/http'; + +/** +* Cluster-level non-embed access configuration. +*/ +export class ClusterNonEmbedAccess { + /** + * Block full application access for non-embedded usage. + */ + 'block_full_app_access'?: boolean | null; + /** + * Groups that have non-embed full app access. Only applicable when orgs feature is disabled. Use org_preferences when org feature is enabled. + */ + 'groups_with_access'?: Array | null; + + static readonly discriminator: string | undefined = undefined; + + static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ + { + "name": "block_full_app_access", + "baseName": "block_full_app_access", + "type": "boolean", + "format": "" + }, + { + "name": "groups_with_access", + "baseName": "groups_with_access", + "type": "Array", + "format": "" + } ]; + + static getAttributeTypeMap() { + return ClusterNonEmbedAccess.attributeTypeMap; + } + + public constructor() { + } +} + diff --git a/sdks/typescript/models/ClusterNonEmbedAccessInput.ts b/sdks/typescript/models/ClusterNonEmbedAccessInput.ts new file mode 100644 index 000000000..828b8bf1c --- /dev/null +++ b/sdks/typescript/models/ClusterNonEmbedAccessInput.ts @@ -0,0 +1,51 @@ +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { HttpFile } from '../http/http'; + +/** +* Input for cluster-level non-embed access configuration. +*/ +export class ClusterNonEmbedAccessInput { + /** + * Block full application access for non-embedded usage. + */ + 'block_full_app_access'?: boolean | null; + /** + * Group identifiers that are allowed non-embed full app access. Can only be set when orgs feature is disabled and block_full_app_access is true. + */ + 'groups_identifiers_with_access'?: Array | null; + + static readonly discriminator: string | undefined = undefined; + + static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ + { + "name": "block_full_app_access", + "baseName": "block_full_app_access", + "type": "boolean", + "format": "" + }, + { + "name": "groups_identifiers_with_access", + "baseName": "groups_identifiers_with_access", + "type": "Array", + "format": "" + } ]; + + static getAttributeTypeMap() { + return ClusterNonEmbedAccessInput.attributeTypeMap; + } + + public constructor() { + } +} + diff --git a/sdks/typescript/models/Collection.ts b/sdks/typescript/models/Collection.ts new file mode 100644 index 000000000..5cbbb80f1 --- /dev/null +++ b/sdks/typescript/models/Collection.ts @@ -0,0 +1,120 @@ +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { CollectionEntityIdentifier } from '../models/CollectionEntityIdentifier'; +import { CollectionMetadataItem } from '../models/CollectionMetadataItem'; +import { HttpFile } from '../http/http'; + +/** +* Response object for a collection. +*/ +export class Collection { + /** + * Unique identifier of the collection. + */ + 'id': string; + /** + * Name of the collection. + */ + 'name': string; + /** + * Description of the collection. + */ + 'description'?: string | null; + /** + * Metadata objects in the collection. + */ + 'metadata'?: Array | null; + /** + * Creation timestamp in milliseconds. + */ + 'created_at'?: string | null; + /** + * Last updated timestamp in milliseconds. + */ + 'updated_at'?: string | null; + /** + * Name of the author who created the collection. + */ + 'author_name'?: string | null; + /** + * Unique identifier of the author. + */ + 'author_id'?: string | null; + 'org'?: CollectionEntityIdentifier; + + static readonly discriminator: string | undefined = undefined; + + static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ + { + "name": "id", + "baseName": "id", + "type": "string", + "format": "" + }, + { + "name": "name", + "baseName": "name", + "type": "string", + "format": "" + }, + { + "name": "description", + "baseName": "description", + "type": "string", + "format": "" + }, + { + "name": "metadata", + "baseName": "metadata", + "type": "Array", + "format": "" + }, + { + "name": "created_at", + "baseName": "created_at", + "type": "string", + "format": "" + }, + { + "name": "updated_at", + "baseName": "updated_at", + "type": "string", + "format": "" + }, + { + "name": "author_name", + "baseName": "author_name", + "type": "string", + "format": "" + }, + { + "name": "author_id", + "baseName": "author_id", + "type": "string", + "format": "" + }, + { + "name": "org", + "baseName": "org", + "type": "CollectionEntityIdentifier", + "format": "" + } ]; + + static getAttributeTypeMap() { + return Collection.attributeTypeMap; + } + + public constructor() { + } +} + diff --git a/sdks/typescript/models/CollectionDeleteResponse.ts b/sdks/typescript/models/CollectionDeleteResponse.ts new file mode 100644 index 000000000..9b57c4f02 --- /dev/null +++ b/sdks/typescript/models/CollectionDeleteResponse.ts @@ -0,0 +1,52 @@ +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { CollectionDeleteTypeIdentifiers } from '../models/CollectionDeleteTypeIdentifiers'; +import { HttpFile } from '../http/http'; + +/** +* Response object for delete collection operation. +*/ +export class CollectionDeleteResponse { + /** + * List of metadata objects that were successfully deleted. + */ + 'metadata_deleted'?: Array | null; + /** + * List of metadata objects that were skipped during deletion. Objects may be skipped due to lack of permissions, dependencies, or other constraints. + */ + 'metadata_skipped'?: Array | null; + + static readonly discriminator: string | undefined = undefined; + + static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ + { + "name": "metadata_deleted", + "baseName": "metadata_deleted", + "type": "Array", + "format": "" + }, + { + "name": "metadata_skipped", + "baseName": "metadata_skipped", + "type": "Array", + "format": "" + } ]; + + static getAttributeTypeMap() { + return CollectionDeleteResponse.attributeTypeMap; + } + + public constructor() { + } +} + diff --git a/sdks/typescript/models/CollectionDeleteTypeIdentifiers.ts b/sdks/typescript/models/CollectionDeleteTypeIdentifiers.ts new file mode 100644 index 000000000..e4f83cdc1 --- /dev/null +++ b/sdks/typescript/models/CollectionDeleteTypeIdentifiers.ts @@ -0,0 +1,52 @@ +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { GenericInfo } from '../models/GenericInfo'; +import { HttpFile } from '../http/http'; + +/** +* Group of metadata objects identified by type. +*/ +export class CollectionDeleteTypeIdentifiers { + /** + * Type of the metadata object (e.g., Collection, Worksheet, Table). + */ + 'type'?: string | null; + /** + * List of metadata identifiers belonging to the given type. + */ + 'identifiers'?: Array | null; + + static readonly discriminator: string | undefined = undefined; + + static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ + { + "name": "type", + "baseName": "type", + "type": "string", + "format": "" + }, + { + "name": "identifiers", + "baseName": "identifiers", + "type": "Array", + "format": "" + } ]; + + static getAttributeTypeMap() { + return CollectionDeleteTypeIdentifiers.attributeTypeMap; + } + + public constructor() { + } +} + diff --git a/sdks/typescript/models/CollectionEntityIdentifier.ts b/sdks/typescript/models/CollectionEntityIdentifier.ts new file mode 100644 index 000000000..0939da3ec --- /dev/null +++ b/sdks/typescript/models/CollectionEntityIdentifier.ts @@ -0,0 +1,51 @@ +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { HttpFile } from '../http/http'; + +/** +* Entity identifier with name. +*/ +export class CollectionEntityIdentifier { + /** + * Unique identifier of the entity. + */ + 'identifier'?: string | null; + /** + * Name of the entity. + */ + 'name'?: string | null; + + static readonly discriminator: string | undefined = undefined; + + static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ + { + "name": "identifier", + "baseName": "identifier", + "type": "string", + "format": "" + }, + { + "name": "name", + "baseName": "name", + "type": "string", + "format": "" + } ]; + + static getAttributeTypeMap() { + return CollectionEntityIdentifier.attributeTypeMap; + } + + public constructor() { + } +} + diff --git a/sdks/typescript/models/CollectionMetadataInput.ts b/sdks/typescript/models/CollectionMetadataInput.ts new file mode 100644 index 000000000..ac63ef15b --- /dev/null +++ b/sdks/typescript/models/CollectionMetadataInput.ts @@ -0,0 +1,54 @@ +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { HttpFile } from '../http/http'; + +/** +* Input type for metadata to be added to a collection. +*/ +export class CollectionMetadataInput { + /** + * Type of metadata object. + */ + 'type': CollectionMetadataInputTypeEnum; + /** + * List of unique IDs or names of metadata objects. + */ + 'identifiers': Array; + + static readonly discriminator: string | undefined = undefined; + + static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ + { + "name": "type", + "baseName": "type", + "type": "CollectionMetadataInputTypeEnum", + "format": "" + }, + { + "name": "identifiers", + "baseName": "identifiers", + "type": "Array", + "format": "" + } ]; + + static getAttributeTypeMap() { + return CollectionMetadataInput.attributeTypeMap; + } + + public constructor() { + } +} + + +export type CollectionMetadataInputTypeEnum = "LIVEBOARD" | "ANSWER" | "LOGICAL_TABLE" | "COLLECTION" ; + diff --git a/sdks/typescript/models/CollectionMetadataItem.ts b/sdks/typescript/models/CollectionMetadataItem.ts new file mode 100644 index 000000000..38a59c48b --- /dev/null +++ b/sdks/typescript/models/CollectionMetadataItem.ts @@ -0,0 +1,52 @@ +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { CollectionEntityIdentifier } from '../models/CollectionEntityIdentifier'; +import { HttpFile } from '../http/http'; + +/** +* Metadata item in a collection response. +*/ +export class CollectionMetadataItem { + /** + * Type of the metadata object. + */ + 'type'?: string | null; + /** + * List of identifiers for this metadata type. + */ + 'identifiers'?: Array | null; + + static readonly discriminator: string | undefined = undefined; + + static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ + { + "name": "type", + "baseName": "type", + "type": "string", + "format": "" + }, + { + "name": "identifiers", + "baseName": "identifiers", + "type": "Array", + "format": "" + } ]; + + static getAttributeTypeMap() { + return CollectionMetadataItem.attributeTypeMap; + } + + public constructor() { + } +} + diff --git a/sdks/typescript/models/CollectionSearchResponse.ts b/sdks/typescript/models/CollectionSearchResponse.ts new file mode 100644 index 000000000..f7a78e6c1 --- /dev/null +++ b/sdks/typescript/models/CollectionSearchResponse.ts @@ -0,0 +1,82 @@ +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { Collection } from '../models/Collection'; +import { HttpFile } from '../http/http'; + +/** +* Response object for search collections operation. +*/ +export class CollectionSearchResponse { + /** + * List of collections matching the search criteria. + */ + 'collections': Array; + /** + * The starting record number from where the records are included. + */ + 'record_offset'?: number | null; + /** + * The number of records returned. + */ + 'record_size'?: number | null; + /** + * Indicates if this is the last batch of results. + */ + 'is_last_batch'?: boolean | null; + /** + * Total count of records returned. + */ + 'count'?: number | null; + + static readonly discriminator: string | undefined = undefined; + + static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ + { + "name": "collections", + "baseName": "collections", + "type": "Array", + "format": "" + }, + { + "name": "record_offset", + "baseName": "record_offset", + "type": "number", + "format": "int32" + }, + { + "name": "record_size", + "baseName": "record_size", + "type": "number", + "format": "int32" + }, + { + "name": "is_last_batch", + "baseName": "is_last_batch", + "type": "boolean", + "format": "" + }, + { + "name": "count", + "baseName": "count", + "type": "number", + "format": "int32" + } ]; + + static getAttributeTypeMap() { + return CollectionSearchResponse.attributeTypeMap; + } + + public constructor() { + } +} + diff --git a/sdks/typescript/models/Column.ts b/sdks/typescript/models/Column.ts new file mode 100644 index 000000000..2dc77642a --- /dev/null +++ b/sdks/typescript/models/Column.ts @@ -0,0 +1,88 @@ +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { HttpFile } from '../http/http'; + +export class Column { + /** + * Name of the column + */ + 'name': string; + /** + * Data type of the column + */ + 'data_type': string; + /** + * Determines if the column schema is an aggregate + */ + 'is_aggregate'?: string | null; + /** + * Determines if the column schema can be imported + */ + 'can_import'?: boolean | null; + /** + * Determines if the table is selected + */ + 'selected'?: boolean | null; + /** + * Determines if the table is linked + */ + 'is_linked_active'?: boolean | null; + + static readonly discriminator: string | undefined = undefined; + + static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ + { + "name": "name", + "baseName": "name", + "type": "string", + "format": "" + }, + { + "name": "data_type", + "baseName": "data_type", + "type": "string", + "format": "" + }, + { + "name": "is_aggregate", + "baseName": "is_aggregate", + "type": "string", + "format": "" + }, + { + "name": "can_import", + "baseName": "can_import", + "type": "boolean", + "format": "" + }, + { + "name": "selected", + "baseName": "selected", + "type": "boolean", + "format": "" + }, + { + "name": "is_linked_active", + "baseName": "is_linked_active", + "type": "boolean", + "format": "" + } ]; + + static getAttributeTypeMap() { + return Column.attributeTypeMap; + } + + public constructor() { + } +} + diff --git a/sdks/typescript/models/ColumnSecurityRule.ts b/sdks/typescript/models/ColumnSecurityRule.ts new file mode 100644 index 000000000..7f641bb63 --- /dev/null +++ b/sdks/typescript/models/ColumnSecurityRule.ts @@ -0,0 +1,55 @@ +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { ColumnSecurityRuleColumn } from '../models/ColumnSecurityRuleColumn'; +import { ColumnSecurityRuleGroup } from '../models/ColumnSecurityRuleGroup'; +import { ColumnSecurityRuleSourceTable } from '../models/ColumnSecurityRuleSourceTable'; +import { HttpFile } from '../http/http'; + +export class ColumnSecurityRule { + 'column': ColumnSecurityRuleColumn; + /** + * Array of groups that have access to this column + */ + 'groups'?: Array | null; + 'source_table_details'?: ColumnSecurityRuleSourceTable; + + static readonly discriminator: string | undefined = undefined; + + static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ + { + "name": "column", + "baseName": "column", + "type": "ColumnSecurityRuleColumn", + "format": "" + }, + { + "name": "groups", + "baseName": "groups", + "type": "Array", + "format": "" + }, + { + "name": "source_table_details", + "baseName": "source_table_details", + "type": "ColumnSecurityRuleSourceTable", + "format": "" + } ]; + + static getAttributeTypeMap() { + return ColumnSecurityRule.attributeTypeMap; + } + + public constructor() { + } +} + diff --git a/sdks/typescript/models/ColumnSecurityRuleColumn.ts b/sdks/typescript/models/ColumnSecurityRuleColumn.ts new file mode 100644 index 000000000..66dc1e114 --- /dev/null +++ b/sdks/typescript/models/ColumnSecurityRuleColumn.ts @@ -0,0 +1,48 @@ +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { HttpFile } from '../http/http'; + +export class ColumnSecurityRuleColumn { + /** + * The unique identifier of the column + */ + 'id': string; + /** + * The name of the column + */ + 'name': string; + + static readonly discriminator: string | undefined = undefined; + + static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ + { + "name": "id", + "baseName": "id", + "type": "string", + "format": "" + }, + { + "name": "name", + "baseName": "name", + "type": "string", + "format": "" + } ]; + + static getAttributeTypeMap() { + return ColumnSecurityRuleColumn.attributeTypeMap; + } + + public constructor() { + } +} + diff --git a/sdks/typescript/models/ColumnSecurityRuleGroup.ts b/sdks/typescript/models/ColumnSecurityRuleGroup.ts new file mode 100644 index 000000000..383a36005 --- /dev/null +++ b/sdks/typescript/models/ColumnSecurityRuleGroup.ts @@ -0,0 +1,48 @@ +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { HttpFile } from '../http/http'; + +export class ColumnSecurityRuleGroup { + /** + * The unique identifier of the group + */ + 'id': string; + /** + * The name of the group + */ + 'name': string; + + static readonly discriminator: string | undefined = undefined; + + static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ + { + "name": "id", + "baseName": "id", + "type": "string", + "format": "" + }, + { + "name": "name", + "baseName": "name", + "type": "string", + "format": "" + } ]; + + static getAttributeTypeMap() { + return ColumnSecurityRuleGroup.attributeTypeMap; + } + + public constructor() { + } +} + diff --git a/sdks/typescript/models/ColumnSecurityRuleGroupOperation.ts b/sdks/typescript/models/ColumnSecurityRuleGroupOperation.ts new file mode 100644 index 000000000..e80230b14 --- /dev/null +++ b/sdks/typescript/models/ColumnSecurityRuleGroupOperation.ts @@ -0,0 +1,51 @@ +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { HttpFile } from '../http/http'; + +export class ColumnSecurityRuleGroupOperation { + /** + * Type of operation to be performed on the groups + */ + 'operation': ColumnSecurityRuleGroupOperationOperationEnum; + /** + * Array of group identifiers (name or GUID) on which the operation will be performed + */ + 'group_identifiers': Array; + + static readonly discriminator: string | undefined = undefined; + + static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ + { + "name": "operation", + "baseName": "operation", + "type": "ColumnSecurityRuleGroupOperationOperationEnum", + "format": "" + }, + { + "name": "group_identifiers", + "baseName": "group_identifiers", + "type": "Array", + "format": "" + } ]; + + static getAttributeTypeMap() { + return ColumnSecurityRuleGroupOperation.attributeTypeMap; + } + + public constructor() { + } +} + + +export type ColumnSecurityRuleGroupOperationOperationEnum = "ADD" | "REMOVE" | "REPLACE" ; + diff --git a/sdks/typescript/models/ColumnSecurityRuleResponse.ts b/sdks/typescript/models/ColumnSecurityRuleResponse.ts new file mode 100644 index 000000000..a4042156c --- /dev/null +++ b/sdks/typescript/models/ColumnSecurityRuleResponse.ts @@ -0,0 +1,59 @@ +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { ColumnSecurityRule } from '../models/ColumnSecurityRule'; +import { HttpFile } from '../http/http'; + +export class ColumnSecurityRuleResponse { + /** + * GUID of the table for which the column security rules are fetched + */ + 'table_guid'?: string | null; + /** + * Object ID of the table for which the column security rules are fetched + */ + 'obj_id'?: string | null; + /** + * Array containing column security rule objects + */ + 'column_security_rules'?: Array | null; + + static readonly discriminator: string | undefined = undefined; + + static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ + { + "name": "table_guid", + "baseName": "table_guid", + "type": "string", + "format": "" + }, + { + "name": "obj_id", + "baseName": "obj_id", + "type": "string", + "format": "" + }, + { + "name": "column_security_rules", + "baseName": "column_security_rules", + "type": "Array", + "format": "" + } ]; + + static getAttributeTypeMap() { + return ColumnSecurityRuleResponse.attributeTypeMap; + } + + public constructor() { + } +} + diff --git a/sdks/typescript/models/ColumnSecurityRuleSourceTable.ts b/sdks/typescript/models/ColumnSecurityRuleSourceTable.ts new file mode 100644 index 000000000..261865a8b --- /dev/null +++ b/sdks/typescript/models/ColumnSecurityRuleSourceTable.ts @@ -0,0 +1,48 @@ +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { HttpFile } from '../http/http'; + +export class ColumnSecurityRuleSourceTable { + /** + * The unique identifier of the source table + */ + 'id': string; + /** + * The name of the source table + */ + 'name': string; + + static readonly discriminator: string | undefined = undefined; + + static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ + { + "name": "id", + "baseName": "id", + "type": "string", + "format": "" + }, + { + "name": "name", + "baseName": "name", + "type": "string", + "format": "" + } ]; + + static getAttributeTypeMap() { + return ColumnSecurityRuleSourceTable.attributeTypeMap; + } + + public constructor() { + } +} + diff --git a/sdks/typescript/models/ColumnSecurityRuleTableInput.ts b/sdks/typescript/models/ColumnSecurityRuleTableInput.ts new file mode 100644 index 000000000..504844a94 --- /dev/null +++ b/sdks/typescript/models/ColumnSecurityRuleTableInput.ts @@ -0,0 +1,48 @@ +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { HttpFile } from '../http/http'; + +export class ColumnSecurityRuleTableInput { + /** + * Name or GUID of the table + */ + 'identifier'?: string | null; + /** + * Object ID of the table + */ + 'obj_identifier'?: string | null; + + static readonly discriminator: string | undefined = undefined; + + static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ + { + "name": "identifier", + "baseName": "identifier", + "type": "string", + "format": "" + }, + { + "name": "obj_identifier", + "baseName": "obj_identifier", + "type": "string", + "format": "" + } ]; + + static getAttributeTypeMap() { + return ColumnSecurityRuleTableInput.attributeTypeMap; + } + + public constructor() { + } +} + diff --git a/sdks/typescript/models/ColumnSecurityRuleUpdate.ts b/sdks/typescript/models/ColumnSecurityRuleUpdate.ts new file mode 100644 index 000000000..077456bf9 --- /dev/null +++ b/sdks/typescript/models/ColumnSecurityRuleUpdate.ts @@ -0,0 +1,59 @@ +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { ColumnSecurityRuleGroupOperation } from '../models/ColumnSecurityRuleGroupOperation'; +import { HttpFile } from '../http/http'; + +export class ColumnSecurityRuleUpdate { + /** + * Column identifier (col_id or name) + */ + 'column_identifier': string; + /** + * If true, the column will be marked as unprotected and all groups associated with it will be removed + */ + 'is_unsecured'?: boolean | null; + /** + * Array of group operation objects that specifies the actions for groups to be associated with a column + */ + 'group_access'?: Array | null; + + static readonly discriminator: string | undefined = undefined; + + static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ + { + "name": "column_identifier", + "baseName": "column_identifier", + "type": "string", + "format": "" + }, + { + "name": "is_unsecured", + "baseName": "is_unsecured", + "type": "boolean", + "format": "" + }, + { + "name": "group_access", + "baseName": "group_access", + "type": "Array", + "format": "" + } ]; + + static getAttributeTypeMap() { + return ColumnSecurityRuleUpdate.attributeTypeMap; + } + + public constructor() { + } +} + diff --git a/sdks/typescript/models/CommitBranchRequest.ts b/sdks/typescript/models/CommitBranchRequest.ts new file mode 100644 index 000000000..80813a36b --- /dev/null +++ b/sdks/typescript/models/CommitBranchRequest.ts @@ -0,0 +1,69 @@ +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { MetadataObject } from '../models/MetadataObject'; +import { HttpFile } from '../http/http'; + +export class CommitBranchRequest { + /** + * Metadata objects. + */ + 'metadata': Array; + /** + * Delete the tml files from version control repo if it does not exist in the ThoughSpot instance + */ + 'delete_aware'?: boolean | null; + /** + * Name of the remote branch where object should be pushed Note: If no branch_name is specified, then the commit_branch_name will be considered. + */ + 'branch_name'?: string; + /** + * Comment to be added to the commit + */ + 'comment': string; + + static readonly discriminator: string | undefined = undefined; + + static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ + { + "name": "metadata", + "baseName": "metadata", + "type": "Array", + "format": "" + }, + { + "name": "delete_aware", + "baseName": "delete_aware", + "type": "boolean", + "format": "" + }, + { + "name": "branch_name", + "baseName": "branch_name", + "type": "string", + "format": "" + }, + { + "name": "comment", + "baseName": "comment", + "type": "string", + "format": "" + } ]; + + static getAttributeTypeMap() { + return CommitBranchRequest.attributeTypeMap; + } + + public constructor() { + } +} + diff --git a/sdks/typescript/models/CommitFileType.ts b/sdks/typescript/models/CommitFileType.ts new file mode 100644 index 000000000..3b7aeb625 --- /dev/null +++ b/sdks/typescript/models/CommitFileType.ts @@ -0,0 +1,58 @@ +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { HttpFile } from '../http/http'; + +export class CommitFileType { + /** + * Name of the file deployed + */ + 'file_name': string; + /** + * Indicates the status of deployment for the file + */ + 'status_code': string; + /** + * Any error or warning with the deployment + */ + 'status_message'?: string | null; + + static readonly discriminator: string | undefined = undefined; + + static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ + { + "name": "file_name", + "baseName": "file_name", + "type": "string", + "format": "" + }, + { + "name": "status_code", + "baseName": "status_code", + "type": "string", + "format": "" + }, + { + "name": "status_message", + "baseName": "status_message", + "type": "string", + "format": "" + } ]; + + static getAttributeTypeMap() { + return CommitFileType.attributeTypeMap; + } + + public constructor() { + } +} + diff --git a/sdks/typescript/models/CommitHistoryResponse.ts b/sdks/typescript/models/CommitHistoryResponse.ts new file mode 100644 index 000000000..9b49162c4 --- /dev/null +++ b/sdks/typescript/models/CommitHistoryResponse.ts @@ -0,0 +1,84 @@ +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { AuthorType } from '../models/AuthorType'; +import { CommiterType } from '../models/CommiterType'; +import { HttpFile } from '../http/http'; + +export class CommitHistoryResponse { + 'committer': CommiterType; + 'author': AuthorType; + /** + * Comments associated with the commit + */ + 'comment': string; + /** + * Time at which the changes were committed. + */ + 'commit_time': string; + /** + * SHA id associated with the commit + */ + 'commit_id': string; + /** + * Branch where changes were committed + */ + 'branch': string; + + static readonly discriminator: string | undefined = undefined; + + static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ + { + "name": "committer", + "baseName": "committer", + "type": "CommiterType", + "format": "" + }, + { + "name": "author", + "baseName": "author", + "type": "AuthorType", + "format": "" + }, + { + "name": "comment", + "baseName": "comment", + "type": "string", + "format": "" + }, + { + "name": "commit_time", + "baseName": "commit_time", + "type": "string", + "format": "" + }, + { + "name": "commit_id", + "baseName": "commit_id", + "type": "string", + "format": "" + }, + { + "name": "branch", + "baseName": "branch", + "type": "string", + "format": "" + } ]; + + static getAttributeTypeMap() { + return CommitHistoryResponse.attributeTypeMap; + } + + public constructor() { + } +} + diff --git a/sdks/typescript/models/CommitResponse.ts b/sdks/typescript/models/CommitResponse.ts new file mode 100644 index 000000000..7521d34d8 --- /dev/null +++ b/sdks/typescript/models/CommitResponse.ts @@ -0,0 +1,95 @@ +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { AuthorType } from '../models/AuthorType'; +import { CommitFileType } from '../models/CommitFileType'; +import { CommiterType } from '../models/CommiterType'; +import { HttpFile } from '../http/http'; + +export class CommitResponse { + 'committer'?: CommiterType; + 'author'?: AuthorType; + /** + * Comments associated with the commit + */ + 'comment'?: string | null; + /** + * Time at which the changes were committed. + */ + 'commit_time'?: string | null; + /** + * SHA id associated with the commit + */ + 'commit_id'?: string | null; + /** + * Branch where changes were committed + */ + 'branch'?: string | null; + /** + * Files that were pushed as part of this commit + */ + 'committed_files'?: Array | null; + + static readonly discriminator: string | undefined = undefined; + + static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ + { + "name": "committer", + "baseName": "committer", + "type": "CommiterType", + "format": "" + }, + { + "name": "author", + "baseName": "author", + "type": "AuthorType", + "format": "" + }, + { + "name": "comment", + "baseName": "comment", + "type": "string", + "format": "" + }, + { + "name": "commit_time", + "baseName": "commit_time", + "type": "string", + "format": "" + }, + { + "name": "commit_id", + "baseName": "commit_id", + "type": "string", + "format": "" + }, + { + "name": "branch", + "baseName": "branch", + "type": "string", + "format": "" + }, + { + "name": "committed_files", + "baseName": "committed_files", + "type": "Array", + "format": "" + } ]; + + static getAttributeTypeMap() { + return CommitResponse.attributeTypeMap; + } + + public constructor() { + } +} + diff --git a/sdks/typescript/models/CommiterType.ts b/sdks/typescript/models/CommiterType.ts new file mode 100644 index 000000000..32a34c598 --- /dev/null +++ b/sdks/typescript/models/CommiterType.ts @@ -0,0 +1,48 @@ +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { HttpFile } from '../http/http'; + +export class CommiterType { + /** + * Email id of the committer + */ + 'email'?: string | null; + /** + * Username of the committer + */ + 'username'?: string | null; + + static readonly discriminator: string | undefined = undefined; + + static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ + { + "name": "email", + "baseName": "email", + "type": "string", + "format": "" + }, + { + "name": "username", + "baseName": "username", + "type": "string", + "format": "" + } ]; + + static getAttributeTypeMap() { + return CommiterType.attributeTypeMap; + } + + public constructor() { + } +} + diff --git a/sdks/typescript/models/CommunicationChannelPreferencesResponse.ts b/sdks/typescript/models/CommunicationChannelPreferencesResponse.ts new file mode 100644 index 000000000..2e6a67846 --- /dev/null +++ b/sdks/typescript/models/CommunicationChannelPreferencesResponse.ts @@ -0,0 +1,50 @@ +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { EventChannelConfig } from '../models/EventChannelConfig'; +import { OrgChannelConfigResponse } from '../models/OrgChannelConfigResponse'; +import { HttpFile } from '../http/http'; + +export class CommunicationChannelPreferencesResponse { + /** + * Cluster-level default configurations. + */ + 'cluster_preferences'?: Array | null; + /** + * Org-specific configurations. + */ + 'org_preferences'?: Array | null; + + static readonly discriminator: string | undefined = undefined; + + static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ + { + "name": "cluster_preferences", + "baseName": "cluster_preferences", + "type": "Array", + "format": "" + }, + { + "name": "org_preferences", + "baseName": "org_preferences", + "type": "Array", + "format": "" + } ]; + + static getAttributeTypeMap() { + return CommunicationChannelPreferencesResponse.attributeTypeMap; + } + + public constructor() { + } +} + diff --git a/sdks/typescript/models/CommunicationChannelValidateResponse.ts b/sdks/typescript/models/CommunicationChannelValidateResponse.ts new file mode 100644 index 000000000..2015ceaed --- /dev/null +++ b/sdks/typescript/models/CommunicationChannelValidateResponse.ts @@ -0,0 +1,107 @@ +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { ChannelValidationDetail } from '../models/ChannelValidationDetail'; +import { HttpFile } from '../http/http'; + +/** +* Response containing validation results for communication channel configuration. +*/ +export class CommunicationChannelValidateResponse { + /** + * Type of communication channel that was validated. + */ + 'channel_type': CommunicationChannelValidateResponseChannelTypeEnum; + /** + * ID of the communication channel (e.g., webhook_id). + */ + 'channel_id': string; + /** + * Name of the communication channel (e.g., webhook name). + */ + 'channel_name'?: string | null; + /** + * Event type that was validated. + */ + 'event_type': CommunicationChannelValidateResponseEventTypeEnum; + /** + * Unique Job Id of the validation. + */ + 'job_id': string; + /** + * Overall result of the validation. + */ + 'result_code': CommunicationChannelValidateResponseResultCodeEnum; + /** + * Detailed results of various validation sub-steps. + */ + 'details'?: Array | null; + + static readonly discriminator: string | undefined = undefined; + + static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ + { + "name": "channel_type", + "baseName": "channel_type", + "type": "CommunicationChannelValidateResponseChannelTypeEnum", + "format": "" + }, + { + "name": "channel_id", + "baseName": "channel_id", + "type": "string", + "format": "" + }, + { + "name": "channel_name", + "baseName": "channel_name", + "type": "string", + "format": "" + }, + { + "name": "event_type", + "baseName": "event_type", + "type": "CommunicationChannelValidateResponseEventTypeEnum", + "format": "" + }, + { + "name": "job_id", + "baseName": "job_id", + "type": "string", + "format": "" + }, + { + "name": "result_code", + "baseName": "result_code", + "type": "CommunicationChannelValidateResponseResultCodeEnum", + "format": "" + }, + { + "name": "details", + "baseName": "details", + "type": "Array", + "format": "" + } ]; + + static getAttributeTypeMap() { + return CommunicationChannelValidateResponse.attributeTypeMap; + } + + public constructor() { + } +} + + +export type CommunicationChannelValidateResponseChannelTypeEnum = "WEBHOOK" ; +export type CommunicationChannelValidateResponseEventTypeEnum = "LIVEBOARD_SCHEDULE" ; +export type CommunicationChannelValidateResponseResultCodeEnum = "SUCCESS" | "FAILED" | "PARTIAL_SUCCESS" ; + diff --git a/sdks/typescript/models/ConfigureAuthSettingsRequest.ts b/sdks/typescript/models/ConfigureAuthSettingsRequest.ts new file mode 100644 index 000000000..265c570df --- /dev/null +++ b/sdks/typescript/models/ConfigureAuthSettingsRequest.ts @@ -0,0 +1,60 @@ +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { AuthOrgPreferenceInput } from '../models/AuthOrgPreferenceInput'; +import { ConfigureAuthSettingsRequestClusterPreferences } from '../models/ConfigureAuthSettingsRequestClusterPreferences'; +import { HttpFile } from '../http/http'; + +export class ConfigureAuthSettingsRequest { + /** + * Type of authentication mechanism to configure. Currently supports TRUSTED_AUTH. + */ + 'auth_type': ConfigureAuthSettingsRequestAuthTypeEnum; + 'cluster_preferences'?: ConfigureAuthSettingsRequestClusterPreferences; + /** + * Org-level authentication preferences. Each entry identifies an org and the desired status. Omit to leave existing org settings unchanged. + */ + 'org_preferences'?: Array; + + static readonly discriminator: string | undefined = undefined; + + static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ + { + "name": "auth_type", + "baseName": "auth_type", + "type": "ConfigureAuthSettingsRequestAuthTypeEnum", + "format": "" + }, + { + "name": "cluster_preferences", + "baseName": "cluster_preferences", + "type": "ConfigureAuthSettingsRequestClusterPreferences", + "format": "" + }, + { + "name": "org_preferences", + "baseName": "org_preferences", + "type": "Array", + "format": "" + } ]; + + static getAttributeTypeMap() { + return ConfigureAuthSettingsRequest.attributeTypeMap; + } + + public constructor() { + } +} + + +export type ConfigureAuthSettingsRequestAuthTypeEnum = "TRUSTED_AUTH" ; + diff --git a/sdks/typescript/models/ConfigureAuthSettingsRequestClusterPreferences.ts b/sdks/typescript/models/ConfigureAuthSettingsRequestClusterPreferences.ts new file mode 100644 index 000000000..aacd29285 --- /dev/null +++ b/sdks/typescript/models/ConfigureAuthSettingsRequestClusterPreferences.ts @@ -0,0 +1,44 @@ +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { HttpFile } from '../http/http'; + +/** +* Cluster-level authentication preferences. Omit to leave the existing cluster setting unchanged. +*/ +export class ConfigureAuthSettingsRequestClusterPreferences { + /** + * Enable or disable authentication at the cluster level. When enabled, a new token is generated if one does not exist. When disabled, the existing token is revoked. + */ + 'auth_status'?: ConfigureAuthSettingsRequestClusterPreferencesAuthStatusEnum | null; + + static readonly discriminator: string | undefined = undefined; + + static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ + { + "name": "auth_status", + "baseName": "auth_status", + "type": "ConfigureAuthSettingsRequestClusterPreferencesAuthStatusEnum", + "format": "" + } ]; + + static getAttributeTypeMap() { + return ConfigureAuthSettingsRequestClusterPreferences.attributeTypeMap; + } + + public constructor() { + } +} + + +export type ConfigureAuthSettingsRequestClusterPreferencesAuthStatusEnum = "ENABLED" | "DISABLED" ; + diff --git a/sdks/typescript/models/ConfigureCommunicationChannelPreferencesRequest.ts b/sdks/typescript/models/ConfigureCommunicationChannelPreferencesRequest.ts new file mode 100644 index 000000000..5ffe81a4f --- /dev/null +++ b/sdks/typescript/models/ConfigureCommunicationChannelPreferencesRequest.ts @@ -0,0 +1,50 @@ +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { EventChannelConfigInput } from '../models/EventChannelConfigInput'; +import { OrgChannelConfigInput } from '../models/OrgChannelConfigInput'; +import { HttpFile } from '../http/http'; + +export class ConfigureCommunicationChannelPreferencesRequest { + /** + * Cluster-level default configurations. + */ + 'cluster_preferences'?: Array; + /** + * Org-specific configurations. + */ + 'org_preferences'?: Array; + + static readonly discriminator: string | undefined = undefined; + + static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ + { + "name": "cluster_preferences", + "baseName": "cluster_preferences", + "type": "Array", + "format": "" + }, + { + "name": "org_preferences", + "baseName": "org_preferences", + "type": "Array", + "format": "" + } ]; + + static getAttributeTypeMap() { + return ConfigureCommunicationChannelPreferencesRequest.attributeTypeMap; + } + + public constructor() { + } +} + diff --git a/sdks/typescript/models/ConfigureSecuritySettingsRequest.ts b/sdks/typescript/models/ConfigureSecuritySettingsRequest.ts new file mode 100644 index 000000000..31390171f --- /dev/null +++ b/sdks/typescript/models/ConfigureSecuritySettingsRequest.ts @@ -0,0 +1,47 @@ +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { ConfigureSecuritySettingsRequestClusterPreferences } from '../models/ConfigureSecuritySettingsRequestClusterPreferences'; +import { SecuritySettingsOrgPreferencesInput } from '../models/SecuritySettingsOrgPreferencesInput'; +import { HttpFile } from '../http/http'; + +export class ConfigureSecuritySettingsRequest { + 'cluster_preferences'?: ConfigureSecuritySettingsRequestClusterPreferences; + /** + * Org-level security preferences for the current org. + */ + 'org_preferences'?: Array; + + static readonly discriminator: string | undefined = undefined; + + static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ + { + "name": "cluster_preferences", + "baseName": "cluster_preferences", + "type": "ConfigureSecuritySettingsRequestClusterPreferences", + "format": "" + }, + { + "name": "org_preferences", + "baseName": "org_preferences", + "type": "Array", + "format": "" + } ]; + + static getAttributeTypeMap() { + return ConfigureSecuritySettingsRequest.attributeTypeMap; + } + + public constructor() { + } +} + diff --git a/sdks/typescript/models/ConfigureSecuritySettingsRequestClusterPreferences.ts b/sdks/typescript/models/ConfigureSecuritySettingsRequestClusterPreferences.ts new file mode 100644 index 000000000..6211632ac --- /dev/null +++ b/sdks/typescript/models/ConfigureSecuritySettingsRequestClusterPreferences.ts @@ -0,0 +1,77 @@ +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { ClusterNonEmbedAccessInput } from '../models/ClusterNonEmbedAccessInput'; +import { CspSettingsInput } from '../models/CspSettingsInput'; +import { HttpFile } from '../http/http'; + +/** +* Cluster-level security preferences. +*/ +export class ConfigureSecuritySettingsRequestClusterPreferences { + /** + * Support embedded access when third-party cookies are blocked. + */ + 'enable_partitioned_cookies'?: boolean | null; + /** + * Allowed origins for CORS. + */ + 'cors_whitelisted_urls'?: Array | null; + 'csp_settings'?: CspSettingsInput; + /** + * Allowed redirect hosts for SAML login. + */ + 'saml_redirect_urls'?: Array | null; + 'non_embed_access'?: ClusterNonEmbedAccessInput; + + static readonly discriminator: string | undefined = undefined; + + static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ + { + "name": "enable_partitioned_cookies", + "baseName": "enable_partitioned_cookies", + "type": "boolean", + "format": "" + }, + { + "name": "cors_whitelisted_urls", + "baseName": "cors_whitelisted_urls", + "type": "Array", + "format": "" + }, + { + "name": "csp_settings", + "baseName": "csp_settings", + "type": "CspSettingsInput", + "format": "" + }, + { + "name": "saml_redirect_urls", + "baseName": "saml_redirect_urls", + "type": "Array", + "format": "" + }, + { + "name": "non_embed_access", + "baseName": "non_embed_access", + "type": "ClusterNonEmbedAccessInput", + "format": "" + } ]; + + static getAttributeTypeMap() { + return ConfigureSecuritySettingsRequestClusterPreferences.attributeTypeMap; + } + + public constructor() { + } +} + diff --git a/sdks/typescript/models/ConnectionConfigurationResponse.ts b/sdks/typescript/models/ConnectionConfigurationResponse.ts new file mode 100644 index 000000000..9b200a58d --- /dev/null +++ b/sdks/typescript/models/ConnectionConfigurationResponse.ts @@ -0,0 +1,112 @@ +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { PolicyProcessOptions } from '../models/PolicyProcessOptions'; +import { UserPrincipal } from '../models/UserPrincipal'; +import { HttpFile } from '../http/http'; + +export class ConnectionConfigurationResponse { + 'configuration_identifier'?: string | null; + 'name'?: string | null; + 'description'?: string | null; + 'configuration'?: any | null; + 'policy_principals'?: Array | null; + 'policy_processes'?: Array | null; + 'disabled'?: boolean | null; + 'data_warehouse_type'?: ConnectionConfigurationResponseDataWarehouseTypeEnum | null; + 'policy_type'?: ConnectionConfigurationResponsePolicyTypeEnum | null; + 'same_as_parent'?: boolean | null; + 'policy_process_options'?: PolicyProcessOptions; + + static readonly discriminator: string | undefined = undefined; + + static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ + { + "name": "configuration_identifier", + "baseName": "configuration_identifier", + "type": "string", + "format": "" + }, + { + "name": "name", + "baseName": "name", + "type": "string", + "format": "" + }, + { + "name": "description", + "baseName": "description", + "type": "string", + "format": "" + }, + { + "name": "configuration", + "baseName": "configuration", + "type": "any", + "format": "" + }, + { + "name": "policy_principals", + "baseName": "policy_principals", + "type": "Array", + "format": "" + }, + { + "name": "policy_processes", + "baseName": "policy_processes", + "type": "Array", + "format": "" + }, + { + "name": "disabled", + "baseName": "disabled", + "type": "boolean", + "format": "" + }, + { + "name": "data_warehouse_type", + "baseName": "data_warehouse_type", + "type": "ConnectionConfigurationResponseDataWarehouseTypeEnum", + "format": "" + }, + { + "name": "policy_type", + "baseName": "policy_type", + "type": "ConnectionConfigurationResponsePolicyTypeEnum", + "format": "" + }, + { + "name": "same_as_parent", + "baseName": "same_as_parent", + "type": "boolean", + "format": "" + }, + { + "name": "policy_process_options", + "baseName": "policy_process_options", + "type": "PolicyProcessOptions", + "format": "" + } ]; + + static getAttributeTypeMap() { + return ConnectionConfigurationResponse.attributeTypeMap; + } + + public constructor() { + } +} + + +export type ConnectionConfigurationResponsePolicyProcessesEnum = "SAGE_INDEXING" | "ROW_COUNT_STATS" ; +export type ConnectionConfigurationResponseDataWarehouseTypeEnum = "SNOWFLAKE" | "AMAZON_REDSHIFT" | "GOOGLE_BIGQUERY" | "AZURE_SYNAPSE" | "TERADATA" | "SAP_HANA" | "STARBURST" | "ORACLE_ADW" | "DATABRICKS" | "DENODO" | "DREMIO" | "TRINO" | "PRESTO" | "POSTGRES" | "SQLSERVER" | "MYSQL" | "GENERIC_JDBC" | "AMAZON_RDS_POSTGRESQL" | "AMAZON_AURORA_POSTGRESQL" | "AMAZON_RDS_MYSQL" | "AMAZON_AURORA_MYSQL" | "LOOKER" | "AMAZON_ATHENA" | "SINGLESTORE" | "GCP_SQLSERVER" | "GCP_ALLOYDB_POSTGRESQL" | "GCP_POSTGRESQL" | "GCP_MYSQL" | "MODE" | "GOOGLE_SHEETS" | "FALCON" | "FALCON_ONPREM" | "CLICKHOUSE" | "IOMETE" ; +export type ConnectionConfigurationResponsePolicyTypeEnum = "NO_POLICY" | "PRINCIPALS" | "PROCESSES" ; + diff --git a/sdks/typescript/models/ConnectionConfigurationSearchRequest.ts b/sdks/typescript/models/ConnectionConfigurationSearchRequest.ts new file mode 100644 index 000000000..1092f9b23 --- /dev/null +++ b/sdks/typescript/models/ConnectionConfigurationSearchRequest.ts @@ -0,0 +1,61 @@ +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { HttpFile } from '../http/http'; + +export class ConnectionConfigurationSearchRequest { + /** + * Unique ID or name of the connection. + */ + 'connection_identifier': string; + /** + * Unique ID or name of the configuration. + */ + 'configuration_identifier'?: string; + /** + * Type of policy. + */ + 'policy_type'?: ConnectionConfigurationSearchRequestPolicyTypeEnum; + + static readonly discriminator: string | undefined = undefined; + + static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ + { + "name": "connection_identifier", + "baseName": "connection_identifier", + "type": "string", + "format": "" + }, + { + "name": "configuration_identifier", + "baseName": "configuration_identifier", + "type": "string", + "format": "" + }, + { + "name": "policy_type", + "baseName": "policy_type", + "type": "ConnectionConfigurationSearchRequestPolicyTypeEnum", + "format": "" + } ]; + + static getAttributeTypeMap() { + return ConnectionConfigurationSearchRequest.attributeTypeMap; + } + + public constructor() { + } +} + + +export type ConnectionConfigurationSearchRequestPolicyTypeEnum = "NO_POLICY" | "PRINCIPALS" | "PROCESSES" ; + diff --git a/sdks/typescript/models/ConnectionInput.ts b/sdks/typescript/models/ConnectionInput.ts new file mode 100644 index 000000000..6f33a3923 --- /dev/null +++ b/sdks/typescript/models/ConnectionInput.ts @@ -0,0 +1,59 @@ +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { DataWarehouseObjectInput } from '../models/DataWarehouseObjectInput'; +import { HttpFile } from '../http/http'; + +export class ConnectionInput { + /** + * Unique ID or name of the connection. + */ + 'identifier'?: string | null; + /** + * A pattern to match case-insensitive name of the connection object. User `%` for a wildcard match. + */ + 'name_pattern'?: string | null; + /** + * Filter options for databases, schemas, tables and columns. + */ + 'data_warehouse_objects'?: Array | null; + + static readonly discriminator: string | undefined = undefined; + + static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ + { + "name": "identifier", + "baseName": "identifier", + "type": "string", + "format": "" + }, + { + "name": "name_pattern", + "baseName": "name_pattern", + "type": "string", + "format": "" + }, + { + "name": "data_warehouse_objects", + "baseName": "data_warehouse_objects", + "type": "Array", + "format": "" + } ]; + + static getAttributeTypeMap() { + return ConnectionInput.attributeTypeMap; + } + + public constructor() { + } +} + diff --git a/sdks/typescript/models/ContextPayloadV2Input.ts b/sdks/typescript/models/ContextPayloadV2Input.ts new file mode 100644 index 000000000..56ebe4bce --- /dev/null +++ b/sdks/typescript/models/ContextPayloadV2Input.ts @@ -0,0 +1,49 @@ +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { DataSourceContextInput } from '../models/DataSourceContextInput'; +import { HttpFile } from '../http/http'; + +export class ContextPayloadV2Input { + /** + * Type of the context. + */ + 'type'?: ContextPayloadV2InputTypeEnum | null; + 'data_source_context'?: DataSourceContextInput; + + static readonly discriminator: string | undefined = undefined; + + static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ + { + "name": "type", + "baseName": "type", + "type": "ContextPayloadV2InputTypeEnum", + "format": "" + }, + { + "name": "data_source_context", + "baseName": "data_source_context", + "type": "DataSourceContextInput", + "format": "" + } ]; + + static getAttributeTypeMap() { + return ContextPayloadV2Input.attributeTypeMap; + } + + public constructor() { + } +} + + +export type ContextPayloadV2InputTypeEnum = "data_source" | "DATA_SOURCE" | "AUTO_MODE" ; + diff --git a/sdks/typescript/models/Conversation.ts b/sdks/typescript/models/Conversation.ts new file mode 100644 index 000000000..8c68851a3 --- /dev/null +++ b/sdks/typescript/models/Conversation.ts @@ -0,0 +1,38 @@ +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { HttpFile } from '../http/http'; + +export class Conversation { + /** + * Unique identifier of the conversation. + */ + 'conversation_identifier': string; + + static readonly discriminator: string | undefined = undefined; + + static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ + { + "name": "conversation_identifier", + "baseName": "conversation_identifier", + "type": "string", + "format": "" + } ]; + + static getAttributeTypeMap() { + return Conversation.attributeTypeMap; + } + + public constructor() { + } +} + diff --git a/sdks/typescript/models/ConversationSettingsInput.ts b/sdks/typescript/models/ConversationSettingsInput.ts new file mode 100644 index 000000000..5744465c8 --- /dev/null +++ b/sdks/typescript/models/ConversationSettingsInput.ts @@ -0,0 +1,68 @@ +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { HttpFile } from '../http/http'; + +export class ConversationSettingsInput { + /** + * Enable contextual change analysis. Default changed from `false` to `true` in 26.2.0.cl. Ignored on versions >= 26.2.0.cl where it is always enabled. Version: 10.4.0.cl or later + */ + 'enable_contextual_change_analysis'?: boolean | null; + /** + * Enable natural language to answer generation. Default changed from `false` to `true` in 26.2.0.cl. Ignored on versions >= 26.2.0.cl where it is always enabled. Version: 10.4.0.cl or later + */ + 'enable_natural_language_answer_generation'?: boolean | null; + /** + * Enable reasoning. Default changed from `false` to `true` in 26.2.0.cl. Ignored on versions >= 26.2.0.cl where it is always enabled. Version: 10.4.0.cl or later + */ + 'enable_reasoning'?: boolean | null; + /** + * Enable save conversation. When `true`, the conversation is persisted and can be retrieved later via conversation history. Version: 26.5.0.cl or later + */ + 'enable_save_chat'?: boolean | null; + + static readonly discriminator: string | undefined = undefined; + + static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ + { + "name": "enable_contextual_change_analysis", + "baseName": "enable_contextual_change_analysis", + "type": "boolean", + "format": "" + }, + { + "name": "enable_natural_language_answer_generation", + "baseName": "enable_natural_language_answer_generation", + "type": "boolean", + "format": "" + }, + { + "name": "enable_reasoning", + "baseName": "enable_reasoning", + "type": "boolean", + "format": "" + }, + { + "name": "enable_save_chat", + "baseName": "enable_save_chat", + "type": "boolean", + "format": "" + } ]; + + static getAttributeTypeMap() { + return ConversationSettingsInput.attributeTypeMap; + } + + public constructor() { + } +} + diff --git a/sdks/typescript/models/ConvertWorksheetToModelRequest.ts b/sdks/typescript/models/ConvertWorksheetToModelRequest.ts new file mode 100644 index 000000000..f7bda72bc --- /dev/null +++ b/sdks/typescript/models/ConvertWorksheetToModelRequest.ts @@ -0,0 +1,68 @@ +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { HttpFile } from '../http/http'; + +export class ConvertWorksheetToModelRequest { + /** + * List of Worksheet IDs. + */ + 'worksheet_ids'?: Array; + /** + * List of Worksheet IDs to be excluded. + */ + 'exclude_worksheet_ids'?: Array; + /** + * Indicates whether all the worksheet needs to be converted to models. + */ + 'convert_all'?: boolean | null; + /** + * Indicates whether the changes should be applied to database. + */ + 'apply_changes'?: boolean | null; + + static readonly discriminator: string | undefined = undefined; + + static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ + { + "name": "worksheet_ids", + "baseName": "worksheet_ids", + "type": "Array", + "format": "" + }, + { + "name": "exclude_worksheet_ids", + "baseName": "exclude_worksheet_ids", + "type": "Array", + "format": "" + }, + { + "name": "convert_all", + "baseName": "convert_all", + "type": "boolean", + "format": "" + }, + { + "name": "apply_changes", + "baseName": "apply_changes", + "type": "boolean", + "format": "" + } ]; + + static getAttributeTypeMap() { + return ConvertWorksheetToModelRequest.attributeTypeMap; + } + + public constructor() { + } +} + diff --git a/sdks/typescript/models/CopyObjectRequest.ts b/sdks/typescript/models/CopyObjectRequest.ts new file mode 100644 index 000000000..0771a0872 --- /dev/null +++ b/sdks/typescript/models/CopyObjectRequest.ts @@ -0,0 +1,71 @@ +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { HttpFile } from '../http/http'; + +export class CopyObjectRequest { + /** + * Description of the new object + */ + 'description'?: string; + /** + * GUID of metadata object to be copied (answer id or liveboard id) + */ + 'identifier': string; + /** + * Type of metadata object + */ + 'type'?: CopyObjectRequestTypeEnum; + /** + * Title of the new object + */ + 'title'?: string; + + static readonly discriminator: string | undefined = undefined; + + static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ + { + "name": "description", + "baseName": "description", + "type": "string", + "format": "" + }, + { + "name": "identifier", + "baseName": "identifier", + "type": "string", + "format": "" + }, + { + "name": "type", + "baseName": "type", + "type": "CopyObjectRequestTypeEnum", + "format": "" + }, + { + "name": "title", + "baseName": "title", + "type": "string", + "format": "" + } ]; + + static getAttributeTypeMap() { + return CopyObjectRequest.attributeTypeMap; + } + + public constructor() { + } +} + + +export type CopyObjectRequestTypeEnum = "LIVEBOARD" | "ANSWER" ; + diff --git a/sdks/typescript/models/CreateAgentConversationRequest.ts b/sdks/typescript/models/CreateAgentConversationRequest.ts new file mode 100644 index 000000000..a1e7ab9a4 --- /dev/null +++ b/sdks/typescript/models/CreateAgentConversationRequest.ts @@ -0,0 +1,44 @@ +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { CreateAgentConversationRequestConversationSettings } from '../models/CreateAgentConversationRequestConversationSettings'; +import { CreateAgentConversationRequestMetadataContext } from '../models/CreateAgentConversationRequestMetadataContext'; +import { HttpFile } from '../http/http'; + +export class CreateAgentConversationRequest { + 'metadata_context': CreateAgentConversationRequestMetadataContext; + 'conversation_settings': CreateAgentConversationRequestConversationSettings; + + static readonly discriminator: string | undefined = undefined; + + static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ + { + "name": "metadata_context", + "baseName": "metadata_context", + "type": "CreateAgentConversationRequestMetadataContext", + "format": "" + }, + { + "name": "conversation_settings", + "baseName": "conversation_settings", + "type": "CreateAgentConversationRequestConversationSettings", + "format": "" + } ]; + + static getAttributeTypeMap() { + return CreateAgentConversationRequest.attributeTypeMap; + } + + public constructor() { + } +} + diff --git a/sdks/typescript/models/CreateAgentConversationRequestConversationSettings.ts b/sdks/typescript/models/CreateAgentConversationRequestConversationSettings.ts new file mode 100644 index 000000000..0dfec57d0 --- /dev/null +++ b/sdks/typescript/models/CreateAgentConversationRequestConversationSettings.ts @@ -0,0 +1,71 @@ +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { HttpFile } from '../http/http'; + +/** +* Conversation settings. +*/ +export class CreateAgentConversationRequestConversationSettings { + /** + * Enable contextual change analysis. Default changed from `false` to `true` in 26.2.0.cl. Ignored on versions >= 26.2.0.cl where it is always enabled. Version: 10.4.0.cl or later + */ + 'enable_contextual_change_analysis'?: boolean | null; + /** + * Enable natural language to answer generation. Default changed from `false` to `true` in 26.2.0.cl. Ignored on versions >= 26.2.0.cl where it is always enabled. Version: 10.4.0.cl or later + */ + 'enable_natural_language_answer_generation'?: boolean | null; + /** + * Enable reasoning. Default changed from `false` to `true` in 26.2.0.cl. Ignored on versions >= 26.2.0.cl where it is always enabled. Version: 10.4.0.cl or later + */ + 'enable_reasoning'?: boolean | null; + /** + * Enable save conversation. When `true`, the conversation is persisted and can be retrieved later via conversation history. Version: 26.5.0.cl or later + */ + 'enable_save_chat'?: boolean | null; + + static readonly discriminator: string | undefined = undefined; + + static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ + { + "name": "enable_contextual_change_analysis", + "baseName": "enable_contextual_change_analysis", + "type": "boolean", + "format": "" + }, + { + "name": "enable_natural_language_answer_generation", + "baseName": "enable_natural_language_answer_generation", + "type": "boolean", + "format": "" + }, + { + "name": "enable_reasoning", + "baseName": "enable_reasoning", + "type": "boolean", + "format": "" + }, + { + "name": "enable_save_chat", + "baseName": "enable_save_chat", + "type": "boolean", + "format": "" + } ]; + + static getAttributeTypeMap() { + return CreateAgentConversationRequestConversationSettings.attributeTypeMap; + } + + public constructor() { + } +} + diff --git a/sdks/typescript/models/CreateAgentConversationRequestMetadataContext.ts b/sdks/typescript/models/CreateAgentConversationRequestMetadataContext.ts new file mode 100644 index 000000000..34565e81b --- /dev/null +++ b/sdks/typescript/models/CreateAgentConversationRequestMetadataContext.ts @@ -0,0 +1,52 @@ +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { DataSourceContextInput } from '../models/DataSourceContextInput'; +import { HttpFile } from '../http/http'; + +/** +* Context for the conversation. +*/ +export class CreateAgentConversationRequestMetadataContext { + /** + * Type of the context. + */ + 'type'?: CreateAgentConversationRequestMetadataContextTypeEnum | null; + 'data_source_context'?: DataSourceContextInput; + + static readonly discriminator: string | undefined = undefined; + + static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ + { + "name": "type", + "baseName": "type", + "type": "CreateAgentConversationRequestMetadataContextTypeEnum", + "format": "" + }, + { + "name": "data_source_context", + "baseName": "data_source_context", + "type": "DataSourceContextInput", + "format": "" + } ]; + + static getAttributeTypeMap() { + return CreateAgentConversationRequestMetadataContext.attributeTypeMap; + } + + public constructor() { + } +} + + +export type CreateAgentConversationRequestMetadataContextTypeEnum = "data_source" | "DATA_SOURCE" | "AUTO_MODE" ; + diff --git a/sdks/typescript/models/CreateCalendarRequest.ts b/sdks/typescript/models/CreateCalendarRequest.ts new file mode 100644 index 000000000..fa3e7c184 --- /dev/null +++ b/sdks/typescript/models/CreateCalendarRequest.ts @@ -0,0 +1,132 @@ +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { CreateCalendarRequestTableReference } from '../models/CreateCalendarRequestTableReference'; +import { HttpFile } from '../http/http'; + +export class CreateCalendarRequest { + /** + * Name of the custom calendar. + */ + 'name': string; + /** + * Type of create operation. + */ + 'creation_method': CreateCalendarRequestCreationMethodEnum; + 'table_reference': CreateCalendarRequestTableReference; + /** + * Start date for the calendar in `MM/dd/yyyy` format. This parameter is mandatory if `creation_method` is set as `FROM_INPUT_PARAMS`. + */ + 'start_date'?: string; + /** + * End date for the calendar in `MM/dd/yyyy` format. This parameter is mandatory if `creation_method` is set as `FROM_INPUT_PARAMS`. + */ + 'end_date'?: string; + /** + * Type of the calendar. + */ + 'calendar_type'?: CreateCalendarRequestCalendarTypeEnum; + /** + * Specify the month in which the fiscal or custom calendar year should start. For example, if you set `month_offset` to \"April\", the custom calendar will treat \"April\" as the first month of the year, and the related attributes such as quarters and start date will be based on this offset. The default value is `January`, which represents the standard calendar year (January to December). + */ + 'month_offset'?: CreateCalendarRequestMonthOffsetEnum; + /** + * Specify the starting day of the week. + */ + 'start_day_of_week'?: CreateCalendarRequestStartDayOfWeekEnum; + /** + * Prefix to add before the quarter. + */ + 'quarter_name_prefix'?: string; + /** + * Prefix to add before the year. + */ + 'year_name_prefix'?: string; + + static readonly discriminator: string | undefined = undefined; + + static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ + { + "name": "name", + "baseName": "name", + "type": "string", + "format": "" + }, + { + "name": "creation_method", + "baseName": "creation_method", + "type": "CreateCalendarRequestCreationMethodEnum", + "format": "" + }, + { + "name": "table_reference", + "baseName": "table_reference", + "type": "CreateCalendarRequestTableReference", + "format": "" + }, + { + "name": "start_date", + "baseName": "start_date", + "type": "string", + "format": "" + }, + { + "name": "end_date", + "baseName": "end_date", + "type": "string", + "format": "" + }, + { + "name": "calendar_type", + "baseName": "calendar_type", + "type": "CreateCalendarRequestCalendarTypeEnum", + "format": "" + }, + { + "name": "month_offset", + "baseName": "month_offset", + "type": "CreateCalendarRequestMonthOffsetEnum", + "format": "" + }, + { + "name": "start_day_of_week", + "baseName": "start_day_of_week", + "type": "CreateCalendarRequestStartDayOfWeekEnum", + "format": "" + }, + { + "name": "quarter_name_prefix", + "baseName": "quarter_name_prefix", + "type": "string", + "format": "" + }, + { + "name": "year_name_prefix", + "baseName": "year_name_prefix", + "type": "string", + "format": "" + } ]; + + static getAttributeTypeMap() { + return CreateCalendarRequest.attributeTypeMap; + } + + public constructor() { + } +} + + +export type CreateCalendarRequestCreationMethodEnum = "FROM_INPUT_PARAMS" | "FROM_EXISTING_TABLE" ; +export type CreateCalendarRequestCalendarTypeEnum = "MONTH_OFFSET" | "FOUR_FOUR_FIVE" | "FOUR_FIVE_FOUR" | "FIVE_FOUR_FOUR" ; +export type CreateCalendarRequestMonthOffsetEnum = "January" | "February" | "March" | "April" | "May" | "June" | "July" | "August" | "September" | "October" | "November" | "December" ; +export type CreateCalendarRequestStartDayOfWeekEnum = "Sunday" | "Monday" | "Tuesday" | "Wednesday" | "Thursday" | "Friday" | "Saturday" ; + diff --git a/sdks/typescript/models/CreateCalendarRequestTableReference.ts b/sdks/typescript/models/CreateCalendarRequestTableReference.ts new file mode 100644 index 000000000..d4cc2cb09 --- /dev/null +++ b/sdks/typescript/models/CreateCalendarRequestTableReference.ts @@ -0,0 +1,71 @@ +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { HttpFile } from '../http/http'; + +/** +* Table reference containing connection identifier and table details in this format: `{\"connection_identifier\":\"conn1\", \"database_name\":\"db1\", \"schema_name\":\"sc1\", \"table_name\":\"tb1\"}`. The given table will be created if `creation_method` is set as `FROM_INPUT_PARAMS`. +*/ +export class CreateCalendarRequestTableReference { + /** + * Unique ID or name of the connection. + */ + 'connection_identifier': string; + /** + * Name of the database. + */ + 'database_name'?: string | null; + /** + * Name of the schema. + */ + 'schema_name'?: string | null; + /** + * Name of the table. Table names may be case-sensitive depending on the database system. + */ + 'table_name': string; + + static readonly discriminator: string | undefined = undefined; + + static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ + { + "name": "connection_identifier", + "baseName": "connection_identifier", + "type": "string", + "format": "" + }, + { + "name": "database_name", + "baseName": "database_name", + "type": "string", + "format": "" + }, + { + "name": "schema_name", + "baseName": "schema_name", + "type": "string", + "format": "" + }, + { + "name": "table_name", + "baseName": "table_name", + "type": "string", + "format": "" + } ]; + + static getAttributeTypeMap() { + return CreateCalendarRequestTableReference.attributeTypeMap; + } + + public constructor() { + } +} + diff --git a/sdks/typescript/models/CreateCollectionRequest.ts b/sdks/typescript/models/CreateCollectionRequest.ts new file mode 100644 index 000000000..0812a8d2a --- /dev/null +++ b/sdks/typescript/models/CreateCollectionRequest.ts @@ -0,0 +1,59 @@ +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { CollectionMetadataInput } from '../models/CollectionMetadataInput'; +import { HttpFile } from '../http/http'; + +export class CreateCollectionRequest { + /** + * Name of the collection. + */ + 'name': string; + /** + * Description of the collection. + */ + 'description'?: string; + /** + * Metadata objects to add to the collection. + */ + 'metadata'?: Array; + + static readonly discriminator: string | undefined = undefined; + + static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ + { + "name": "name", + "baseName": "name", + "type": "string", + "format": "" + }, + { + "name": "description", + "baseName": "description", + "type": "string", + "format": "" + }, + { + "name": "metadata", + "baseName": "metadata", + "type": "Array", + "format": "" + } ]; + + static getAttributeTypeMap() { + return CreateCollectionRequest.attributeTypeMap; + } + + public constructor() { + } +} + diff --git a/sdks/typescript/models/CreateConfigRequest.ts b/sdks/typescript/models/CreateConfigRequest.ts new file mode 100644 index 000000000..9563ca419 --- /dev/null +++ b/sdks/typescript/models/CreateConfigRequest.ts @@ -0,0 +1,108 @@ +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { HttpFile } from '../http/http'; + +export class CreateConfigRequest { + /** + * URL for connecting to remote repository + */ + 'repository_url': string; + /** + * Username to authenticate connection to remote repository + */ + 'username': string; + /** + * Access token corresponding to the user to authenticate connection to remote repository + */ + 'access_token': string; + /** + * Applicable when Orgs is enabled in the cluster List of Org ids or name. Provide value -1 for cluster level. Example : [\"OrgID1-or-Name1\", \"OrgID2-or-Name2\"] Note: If no value is specified, then the configurations will be returned for all orgs the user has access to Version: 9.5.0.cl or later + */ + 'org_identifier'?: string; + /** + * List the remote branches to configure. Example:[development, production] + */ + 'branch_names'?: Array; + /** + * Name of the remote branch where objects from this Thoughtspot instance will be versioned. Version: 9.7.0.cl or later + */ + 'commit_branch_name'?: string; + /** + * Maintain mapping of guid for the deployment to an instance Version: 9.4.0.cl or later + */ + 'enable_guid_mapping'?: boolean | null; + /** + * Name of the branch where the configuration files related to operations between Thoughtspot and version control repo should be maintained. Note: If no branch name is specified, then by default, ts_config_files branch is considered. Ensure this branch exists before configuration. Version: 9.7.0.cl or later + */ + 'configuration_branch_name'?: string; + + static readonly discriminator: string | undefined = undefined; + + static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ + { + "name": "repository_url", + "baseName": "repository_url", + "type": "string", + "format": "" + }, + { + "name": "username", + "baseName": "username", + "type": "string", + "format": "" + }, + { + "name": "access_token", + "baseName": "access_token", + "type": "string", + "format": "" + }, + { + "name": "org_identifier", + "baseName": "org_identifier", + "type": "string", + "format": "" + }, + { + "name": "branch_names", + "baseName": "branch_names", + "type": "Array", + "format": "" + }, + { + "name": "commit_branch_name", + "baseName": "commit_branch_name", + "type": "string", + "format": "" + }, + { + "name": "enable_guid_mapping", + "baseName": "enable_guid_mapping", + "type": "boolean", + "format": "" + }, + { + "name": "configuration_branch_name", + "baseName": "configuration_branch_name", + "type": "string", + "format": "" + } ]; + + static getAttributeTypeMap() { + return CreateConfigRequest.attributeTypeMap; + } + + public constructor() { + } +} + diff --git a/sdks/typescript/models/CreateConnectionConfigurationRequest.ts b/sdks/typescript/models/CreateConnectionConfigurationRequest.ts new file mode 100644 index 000000000..306f38c7c --- /dev/null +++ b/sdks/typescript/models/CreateConnectionConfigurationRequest.ts @@ -0,0 +1,131 @@ +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { CreateConnectionConfigurationRequestPolicyProcessOptions } from '../models/CreateConnectionConfigurationRequestPolicyProcessOptions'; +import { HttpFile } from '../http/http'; + +export class CreateConnectionConfigurationRequest { + /** + * Unique name for the configuration. + */ + 'name': string; + /** + * Description of the configuration. + */ + 'description'?: string; + /** + * Unique ID or name of the connection. + */ + 'connection_identifier': string; + /** + * Specifies whether the connection configuration should inherit all properties and authentication type from its parent connection. This attribute is only applicable to parameterized connections. When set to true, the configuration uses only the connection properties and authentication type inherited from the parent. Version: 26.2.0.cl or later + */ + 'same_as_parent'?: boolean | null; + 'policy_process_options'?: CreateConnectionConfigurationRequestPolicyProcessOptions; + /** + * Type of authentication used for the connection. + */ + 'authentication_type'?: CreateConnectionConfigurationRequestAuthenticationTypeEnum; + /** + * Configuration properties in JSON. + */ + 'configuration': any; + /** + * Type of policy. + */ + 'policy_type'?: CreateConnectionConfigurationRequestPolicyTypeEnum; + /** + * Unique ID or name of the User and User Groups. + */ + 'policy_principals'?: Array; + /** + * Action that the query performed on the data warehouse, such as SAGE_INDEXING and ROW_COUNT_STATS. + */ + 'policy_processes'?: Array; + + static readonly discriminator: string | undefined = undefined; + + static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ + { + "name": "name", + "baseName": "name", + "type": "string", + "format": "" + }, + { + "name": "description", + "baseName": "description", + "type": "string", + "format": "" + }, + { + "name": "connection_identifier", + "baseName": "connection_identifier", + "type": "string", + "format": "" + }, + { + "name": "same_as_parent", + "baseName": "same_as_parent", + "type": "boolean", + "format": "" + }, + { + "name": "policy_process_options", + "baseName": "policy_process_options", + "type": "CreateConnectionConfigurationRequestPolicyProcessOptions", + "format": "" + }, + { + "name": "authentication_type", + "baseName": "authentication_type", + "type": "CreateConnectionConfigurationRequestAuthenticationTypeEnum", + "format": "" + }, + { + "name": "configuration", + "baseName": "configuration", + "type": "any", + "format": "" + }, + { + "name": "policy_type", + "baseName": "policy_type", + "type": "CreateConnectionConfigurationRequestPolicyTypeEnum", + "format": "" + }, + { + "name": "policy_principals", + "baseName": "policy_principals", + "type": "Array", + "format": "" + }, + { + "name": "policy_processes", + "baseName": "policy_processes", + "type": "Array", + "format": "" + } ]; + + static getAttributeTypeMap() { + return CreateConnectionConfigurationRequest.attributeTypeMap; + } + + public constructor() { + } +} + + +export type CreateConnectionConfigurationRequestAuthenticationTypeEnum = "SERVICE_ACCOUNT" | "KEY_PAIR" | "PERSONAL_ACCESS_TOKEN" | "OAUTH_WITH_SERVICE_PRINCIPAL" | "OAUTH_CLIENT_CREDENTIALS" ; +export type CreateConnectionConfigurationRequestPolicyTypeEnum = "NO_POLICY" | "PRINCIPALS" | "PROCESSES" ; +export type CreateConnectionConfigurationRequestPolicyProcessesEnum = "SAGE_INDEXING" | "ROW_COUNT_STATS" ; + diff --git a/sdks/typescript/models/CreateConnectionConfigurationRequestPolicyProcessOptions.ts b/sdks/typescript/models/CreateConnectionConfigurationRequestPolicyProcessOptions.ts new file mode 100644 index 000000000..9d9abfecd --- /dev/null +++ b/sdks/typescript/models/CreateConnectionConfigurationRequestPolicyProcessOptions.ts @@ -0,0 +1,38 @@ +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { HttpFile } from '../http/http'; + +/** +* This attribute is only applicable to parameterized connections. Ensure that the policy is set to Processes to allow the configuration to be used exclusively for system processes. Version: 26.2.0.cl or later +*/ +export class CreateConnectionConfigurationRequestPolicyProcessOptions { + 'impersonate_user'?: string | null; + + static readonly discriminator: string | undefined = undefined; + + static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ + { + "name": "impersonate_user", + "baseName": "impersonate_user", + "type": "string", + "format": "" + } ]; + + static getAttributeTypeMap() { + return CreateConnectionConfigurationRequestPolicyProcessOptions.attributeTypeMap; + } + + public constructor() { + } +} + diff --git a/sdks/typescript/models/CreateConnectionRequest.ts b/sdks/typescript/models/CreateConnectionRequest.ts new file mode 100644 index 000000000..6715614bf --- /dev/null +++ b/sdks/typescript/models/CreateConnectionRequest.ts @@ -0,0 +1,81 @@ +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { HttpFile } from '../http/http'; + +export class CreateConnectionRequest { + /** + * Unique name for the connection. + */ + 'name': string; + /** + * Description of the connection. + */ + 'description'?: string; + /** + * Type of the data warehouse. + */ + 'data_warehouse_type': CreateConnectionRequestDataWarehouseTypeEnum; + /** + * Connection configuration attributes in JSON format. To create a connection with tables, include table attributes. See the documentation above for sample JSON. + */ + 'data_warehouse_config': any; + /** + * Validates the connection metadata if tables are included. If you are creating a connection without tables, specify `false`. + */ + 'validate'?: boolean | null; + + static readonly discriminator: string | undefined = undefined; + + static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ + { + "name": "name", + "baseName": "name", + "type": "string", + "format": "" + }, + { + "name": "description", + "baseName": "description", + "type": "string", + "format": "" + }, + { + "name": "data_warehouse_type", + "baseName": "data_warehouse_type", + "type": "CreateConnectionRequestDataWarehouseTypeEnum", + "format": "" + }, + { + "name": "data_warehouse_config", + "baseName": "data_warehouse_config", + "type": "any", + "format": "" + }, + { + "name": "validate", + "baseName": "validate", + "type": "boolean", + "format": "" + } ]; + + static getAttributeTypeMap() { + return CreateConnectionRequest.attributeTypeMap; + } + + public constructor() { + } +} + + +export type CreateConnectionRequestDataWarehouseTypeEnum = "SNOWFLAKE" | "AMAZON_REDSHIFT" | "GOOGLE_BIGQUERY" | "AZURE_SYNAPSE" | "TERADATA" | "SAP_HANA" | "STARBURST" | "ORACLE_ADW" | "DATABRICKS" | "DENODO" | "DREMIO" | "TRINO" | "PRESTO" | "POSTGRES" | "SQLSERVER" | "MYSQL" | "GENERIC_JDBC" | "AMAZON_RDS_POSTGRESQL" | "AMAZON_AURORA_POSTGRESQL" | "AMAZON_RDS_MYSQL" | "AMAZON_AURORA_MYSQL" | "LOOKER" | "AMAZON_ATHENA" | "SINGLESTORE" | "GCP_SQLSERVER" | "GCP_ALLOYDB_POSTGRESQL" | "GCP_POSTGRESQL" | "GCP_MYSQL" | "MODE" | "GOOGLE_SHEETS" | "FALCON" | "FALCON_ONPREM" | "CLICKHOUSE" | "IOMETE" ; + diff --git a/sdks/typescript/models/CreateConnectionResponse.ts b/sdks/typescript/models/CreateConnectionResponse.ts new file mode 100644 index 000000000..e1c6c8fa2 --- /dev/null +++ b/sdks/typescript/models/CreateConnectionResponse.ts @@ -0,0 +1,71 @@ +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { HttpFile } from '../http/http'; + +export class CreateConnectionResponse { + /** + * ID of the connection created. + */ + 'id': string; + /** + * Name of the connection. + */ + 'name': string; + /** + * Type of data warehouse. + */ + 'data_warehouse_type': CreateConnectionResponseDataWarehouseTypeEnum; + /** + * Details of the connection. + */ + 'details'?: any | null; + + static readonly discriminator: string | undefined = undefined; + + static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ + { + "name": "id", + "baseName": "id", + "type": "string", + "format": "" + }, + { + "name": "name", + "baseName": "name", + "type": "string", + "format": "" + }, + { + "name": "data_warehouse_type", + "baseName": "data_warehouse_type", + "type": "CreateConnectionResponseDataWarehouseTypeEnum", + "format": "" + }, + { + "name": "details", + "baseName": "details", + "type": "any", + "format": "" + } ]; + + static getAttributeTypeMap() { + return CreateConnectionResponse.attributeTypeMap; + } + + public constructor() { + } +} + + +export type CreateConnectionResponseDataWarehouseTypeEnum = "SNOWFLAKE" | "AMAZON_REDSHIFT" | "GOOGLE_BIGQUERY" | "AZURE_SYNAPSE" | "TERADATA" | "SAP_HANA" | "STARBURST" | "ORACLE_ADW" | "DATABRICKS" | "DENODO" | "DREMIO" | "TRINO" | "PRESTO" | "POSTGRES" | "SQLSERVER" | "MYSQL" | "GENERIC_JDBC" | "AMAZON_RDS_POSTGRESQL" | "AMAZON_AURORA_POSTGRESQL" | "AMAZON_RDS_MYSQL" | "AMAZON_AURORA_MYSQL" | "LOOKER" | "AMAZON_ATHENA" | "SINGLESTORE" | "GCP_SQLSERVER" | "GCP_ALLOYDB_POSTGRESQL" | "GCP_POSTGRESQL" | "GCP_MYSQL" | "MODE" | "GOOGLE_SHEETS" | "FALCON" | "FALCON_ONPREM" | "CLICKHOUSE" | "IOMETE" ; + diff --git a/sdks/typescript/models/CreateConversationRequest.ts b/sdks/typescript/models/CreateConversationRequest.ts new file mode 100644 index 000000000..e8dbc5bf8 --- /dev/null +++ b/sdks/typescript/models/CreateConversationRequest.ts @@ -0,0 +1,48 @@ +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { HttpFile } from '../http/http'; + +export class CreateConversationRequest { + /** + * ID of the metadata object, such as a Worksheet or Model, to use as a data source for the conversation. + */ + 'metadata_identifier': string; + /** + * Token string to set the context for the conversation. For example,`[sales],[item type],[state]`. + */ + 'tokens'?: string; + + static readonly discriminator: string | undefined = undefined; + + static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ + { + "name": "metadata_identifier", + "baseName": "metadata_identifier", + "type": "string", + "format": "" + }, + { + "name": "tokens", + "baseName": "tokens", + "type": "string", + "format": "" + } ]; + + static getAttributeTypeMap() { + return CreateConversationRequest.attributeTypeMap; + } + + public constructor() { + } +} + diff --git a/sdks/typescript/models/CreateCustomActionRequest.ts b/sdks/typescript/models/CreateCustomActionRequest.ts new file mode 100644 index 000000000..978d1c3c3 --- /dev/null +++ b/sdks/typescript/models/CreateCustomActionRequest.ts @@ -0,0 +1,75 @@ +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { AssociateMetadataInputCreate } from '../models/AssociateMetadataInputCreate'; +import { CreateCustomActionRequestActionDetails } from '../models/CreateCustomActionRequestActionDetails'; +import { CreateCustomActionRequestDefaultActionConfig } from '../models/CreateCustomActionRequestDefaultActionConfig'; +import { HttpFile } from '../http/http'; + +export class CreateCustomActionRequest { + /** + * Name of the custom action. The custom action name must be unique. + */ + 'name': string; + 'action_details': CreateCustomActionRequestActionDetails; + /** + * Metadata objects to which the custom action needs to be associated. + */ + 'associate_metadata'?: Array; + 'default_action_config'?: CreateCustomActionRequestDefaultActionConfig; + /** + * Unique ID or name of the groups that can view and access the custom action. + */ + 'group_identifiers'?: Array; + + static readonly discriminator: string | undefined = undefined; + + static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ + { + "name": "name", + "baseName": "name", + "type": "string", + "format": "" + }, + { + "name": "action_details", + "baseName": "action_details", + "type": "CreateCustomActionRequestActionDetails", + "format": "" + }, + { + "name": "associate_metadata", + "baseName": "associate_metadata", + "type": "Array", + "format": "" + }, + { + "name": "default_action_config", + "baseName": "default_action_config", + "type": "CreateCustomActionRequestDefaultActionConfig", + "format": "" + }, + { + "name": "group_identifiers", + "baseName": "group_identifiers", + "type": "Array", + "format": "" + } ]; + + static getAttributeTypeMap() { + return CreateCustomActionRequest.attributeTypeMap; + } + + public constructor() { + } +} + diff --git a/sdks/typescript/models/CreateCustomActionRequestActionDetails.ts b/sdks/typescript/models/CreateCustomActionRequestActionDetails.ts new file mode 100644 index 000000000..94282b845 --- /dev/null +++ b/sdks/typescript/models/CreateCustomActionRequestActionDetails.ts @@ -0,0 +1,47 @@ +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { CALLBACKInputMandatory } from '../models/CALLBACKInputMandatory'; +import { URLInputMandatory } from '../models/URLInputMandatory'; +import { HttpFile } from '../http/http'; + +/** +* Action details includes `Type` and Configuration data for Custom Actions, either Callback or URL is required. +*/ +export class CreateCustomActionRequestActionDetails { + 'CALLBACK'?: CALLBACKInputMandatory; + 'URL'?: URLInputMandatory; + + static readonly discriminator: string | undefined = undefined; + + static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ + { + "name": "CALLBACK", + "baseName": "CALLBACK", + "type": "CALLBACKInputMandatory", + "format": "" + }, + { + "name": "URL", + "baseName": "URL", + "type": "URLInputMandatory", + "format": "" + } ]; + + static getAttributeTypeMap() { + return CreateCustomActionRequestActionDetails.attributeTypeMap; + } + + public constructor() { + } +} + diff --git a/sdks/typescript/models/CreateCustomActionRequestDefaultActionConfig.ts b/sdks/typescript/models/CreateCustomActionRequestDefaultActionConfig.ts new file mode 100644 index 000000000..69610dbf4 --- /dev/null +++ b/sdks/typescript/models/CreateCustomActionRequestDefaultActionConfig.ts @@ -0,0 +1,41 @@ +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { HttpFile } from '../http/http'; + +/** +* Default Custom action configuration. This includes if the custom action is available on all visualizations. By default, a custom action is added to all visualizations and Answers. +*/ +export class CreateCustomActionRequestDefaultActionConfig { + /** + * Custom action is available on all visualizations. Earlier naming convention: LOCAL/GLOBAL. TRUE signifies GLOBAL for backward compatibility. Default: true + */ + 'visibility'?: boolean | null; + + static readonly discriminator: string | undefined = undefined; + + static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ + { + "name": "visibility", + "baseName": "visibility", + "type": "boolean", + "format": "" + } ]; + + static getAttributeTypeMap() { + return CreateCustomActionRequestDefaultActionConfig.attributeTypeMap; + } + + public constructor() { + } +} + diff --git a/sdks/typescript/models/CreateEmailCustomizationRequest.ts b/sdks/typescript/models/CreateEmailCustomizationRequest.ts new file mode 100644 index 000000000..2c46d1aae --- /dev/null +++ b/sdks/typescript/models/CreateEmailCustomizationRequest.ts @@ -0,0 +1,46 @@ +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { CreateEmailCustomizationRequestTemplateProperties } from '../models/CreateEmailCustomizationRequestTemplateProperties'; +import { HttpFile } from '../http/http'; + +export class CreateEmailCustomizationRequest { + 'template_properties': CreateEmailCustomizationRequestTemplateProperties; + /** + * Unique ID or name of org Version: 10.12.0.cl or later + */ + 'org_identifier'?: string; + + static readonly discriminator: string | undefined = undefined; + + static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ + { + "name": "template_properties", + "baseName": "template_properties", + "type": "CreateEmailCustomizationRequestTemplateProperties", + "format": "" + }, + { + "name": "org_identifier", + "baseName": "org_identifier", + "type": "string", + "format": "" + } ]; + + static getAttributeTypeMap() { + return CreateEmailCustomizationRequest.attributeTypeMap; + } + + public constructor() { + } +} + diff --git a/sdks/typescript/models/CreateEmailCustomizationRequestTemplateProperties.ts b/sdks/typescript/models/CreateEmailCustomizationRequestTemplateProperties.ts new file mode 100644 index 000000000..ce815e172 --- /dev/null +++ b/sdks/typescript/models/CreateEmailCustomizationRequestTemplateProperties.ts @@ -0,0 +1,311 @@ +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { HttpFile } from '../http/http'; + +/** +* Email customization configuration as key value pair +*/ +export class CreateEmailCustomizationRequestTemplateProperties { + /** + * Background color for call-to-action button in hex format + */ + 'cta_button_bg_color'?: string | null; + /** + * Text color for call-to-action button in hex format + */ + 'cta_text_font_color'?: string | null; + /** + * Primary background color in hex format + */ + 'primary_bg_color'?: string | null; + /** + * Home page URL (HTTP/HTTPS only) + */ + 'home_url'?: string | null; + /** + * Logo image URL (HTTP/HTTPS only) + */ + 'logo_url'?: string | null; + /** + * Font family for email content (e.g., Arial, sans-serif) + */ + 'font_family'?: string | null; + /** + * Product name to display + */ + 'product_name'?: string | null; + /** + * Footer address text + */ + 'footer_address'?: string | null; + /** + * Footer phone number + */ + 'footer_phone'?: string | null; + /** + * Replacement value for Liveboard + */ + 'replacement_value_for_liveboard'?: string | null; + /** + * Replacement value for Answer + */ + 'replacement_value_for_answer'?: string | null; + /** + * Replacement value for SpotIQ + */ + 'replacement_value_for_spot_iq'?: string | null; + /** + * Whether to hide footer address + */ + 'hide_footer_address'?: boolean | null; + /** + * Whether to hide footer phone number + */ + 'hide_footer_phone'?: boolean | null; + /** + * Whether to hide manage notification link + */ + 'hide_manage_notification'?: boolean | null; + /** + * Whether to hide mobile app nudge + */ + 'hide_mobile_app_nudge'?: boolean | null; + /** + * Whether to hide privacy policy link + */ + 'hide_privacy_policy'?: boolean | null; + /** + * Whether to hide product name + */ + 'hide_product_name'?: boolean | null; + /** + * Whether to hide ThoughtSpot vocabulary definitions + */ + 'hide_ts_vocabulary_definitions'?: boolean | null; + /** + * Whether to hide notification status + */ + 'hide_notification_status'?: boolean | null; + /** + * Whether to hide error message + */ + 'hide_error_message'?: boolean | null; + /** + * Whether to hide unsubscribe link + */ + 'hide_unsubscribe_link'?: boolean | null; + /** + * Whether to hide modify alert + */ + 'hide_modify_alert'?: boolean | null; + /** + * Company privacy policy URL (HTTP/HTTPS only) + */ + 'company_privacy_policy_url'?: string | null; + /** + * Company website URL (HTTP/HTTPS only) + */ + 'company_website_url'?: string | null; + /** + * Contact support url (HTTP/HTTPS only). Version: 26.2.0.cl or later + */ + 'contact_support_url'?: string | null; + /** + * Whether to hide contact support url. Version: 26.2.0.cl or later + */ + 'hide_contact_support_url'?: boolean | null; + /** + * Whether to hide logo Version: 26.4.0.cl or later + */ + 'hide_logo_url'?: boolean | null; + + static readonly discriminator: string | undefined = undefined; + + static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ + { + "name": "cta_button_bg_color", + "baseName": "cta_button_bg_color", + "type": "string", + "format": "" + }, + { + "name": "cta_text_font_color", + "baseName": "cta_text_font_color", + "type": "string", + "format": "" + }, + { + "name": "primary_bg_color", + "baseName": "primary_bg_color", + "type": "string", + "format": "" + }, + { + "name": "home_url", + "baseName": "home_url", + "type": "string", + "format": "" + }, + { + "name": "logo_url", + "baseName": "logo_url", + "type": "string", + "format": "" + }, + { + "name": "font_family", + "baseName": "font_family", + "type": "string", + "format": "" + }, + { + "name": "product_name", + "baseName": "product_name", + "type": "string", + "format": "" + }, + { + "name": "footer_address", + "baseName": "footer_address", + "type": "string", + "format": "" + }, + { + "name": "footer_phone", + "baseName": "footer_phone", + "type": "string", + "format": "" + }, + { + "name": "replacement_value_for_liveboard", + "baseName": "replacement_value_for_liveboard", + "type": "string", + "format": "" + }, + { + "name": "replacement_value_for_answer", + "baseName": "replacement_value_for_answer", + "type": "string", + "format": "" + }, + { + "name": "replacement_value_for_spot_iq", + "baseName": "replacement_value_for_spot_iq", + "type": "string", + "format": "" + }, + { + "name": "hide_footer_address", + "baseName": "hide_footer_address", + "type": "boolean", + "format": "" + }, + { + "name": "hide_footer_phone", + "baseName": "hide_footer_phone", + "type": "boolean", + "format": "" + }, + { + "name": "hide_manage_notification", + "baseName": "hide_manage_notification", + "type": "boolean", + "format": "" + }, + { + "name": "hide_mobile_app_nudge", + "baseName": "hide_mobile_app_nudge", + "type": "boolean", + "format": "" + }, + { + "name": "hide_privacy_policy", + "baseName": "hide_privacy_policy", + "type": "boolean", + "format": "" + }, + { + "name": "hide_product_name", + "baseName": "hide_product_name", + "type": "boolean", + "format": "" + }, + { + "name": "hide_ts_vocabulary_definitions", + "baseName": "hide_ts_vocabulary_definitions", + "type": "boolean", + "format": "" + }, + { + "name": "hide_notification_status", + "baseName": "hide_notification_status", + "type": "boolean", + "format": "" + }, + { + "name": "hide_error_message", + "baseName": "hide_error_message", + "type": "boolean", + "format": "" + }, + { + "name": "hide_unsubscribe_link", + "baseName": "hide_unsubscribe_link", + "type": "boolean", + "format": "" + }, + { + "name": "hide_modify_alert", + "baseName": "hide_modify_alert", + "type": "boolean", + "format": "" + }, + { + "name": "company_privacy_policy_url", + "baseName": "company_privacy_policy_url", + "type": "string", + "format": "" + }, + { + "name": "company_website_url", + "baseName": "company_website_url", + "type": "string", + "format": "" + }, + { + "name": "contact_support_url", + "baseName": "contact_support_url", + "type": "string", + "format": "" + }, + { + "name": "hide_contact_support_url", + "baseName": "hide_contact_support_url", + "type": "boolean", + "format": "" + }, + { + "name": "hide_logo_url", + "baseName": "hide_logo_url", + "type": "boolean", + "format": "" + } ]; + + static getAttributeTypeMap() { + return CreateEmailCustomizationRequestTemplateProperties.attributeTypeMap; + } + + public constructor() { + } +} + diff --git a/sdks/typescript/models/CreateEmailCustomizationResponse.ts b/sdks/typescript/models/CreateEmailCustomizationResponse.ts new file mode 100644 index 000000000..337b42e74 --- /dev/null +++ b/sdks/typescript/models/CreateEmailCustomizationResponse.ts @@ -0,0 +1,66 @@ +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { OrgType } from '../models/OrgType'; +import { HttpFile } from '../http/http'; + +export class CreateEmailCustomizationResponse { + /** + * Tenant ID + */ + 'tenant_id': string; + 'org': OrgType; + /** + * Email customization name. + */ + 'name': string; + /** + * Customization configuration for the email + */ + 'template_properties': any; + + static readonly discriminator: string | undefined = undefined; + + static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ + { + "name": "tenant_id", + "baseName": "tenant_id", + "type": "string", + "format": "" + }, + { + "name": "org", + "baseName": "org", + "type": "OrgType", + "format": "" + }, + { + "name": "name", + "baseName": "name", + "type": "string", + "format": "" + }, + { + "name": "template_properties", + "baseName": "template_properties", + "type": "any", + "format": "" + } ]; + + static getAttributeTypeMap() { + return CreateEmailCustomizationResponse.attributeTypeMap; + } + + public constructor() { + } +} + diff --git a/sdks/typescript/models/CreateOrgRequest.ts b/sdks/typescript/models/CreateOrgRequest.ts new file mode 100644 index 000000000..c9edbc1b6 --- /dev/null +++ b/sdks/typescript/models/CreateOrgRequest.ts @@ -0,0 +1,48 @@ +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { HttpFile } from '../http/http'; + +export class CreateOrgRequest { + /** + * Name of the Org. + */ + 'name': string; + /** + * Description of the Org. + */ + 'description'?: string; + + static readonly discriminator: string | undefined = undefined; + + static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ + { + "name": "name", + "baseName": "name", + "type": "string", + "format": "" + }, + { + "name": "description", + "baseName": "description", + "type": "string", + "format": "" + } ]; + + static getAttributeTypeMap() { + return CreateOrgRequest.attributeTypeMap; + } + + public constructor() { + } +} + diff --git a/sdks/typescript/models/CreateRoleRequest.ts b/sdks/typescript/models/CreateRoleRequest.ts new file mode 100644 index 000000000..c702021df --- /dev/null +++ b/sdks/typescript/models/CreateRoleRequest.ts @@ -0,0 +1,71 @@ +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { HttpFile } from '../http/http'; + +export class CreateRoleRequest { + /** + * Unique name of the Role. + */ + 'name': string; + /** + * Description of the Role. + */ + 'description'?: string; + /** + * Privileges granted to the Role. See [Documentation](https://developers.thoughtspot.com/docs/rbac#_role_categories_and_privileges)for supported roles privileges. + */ + 'privileges'?: Array; + /** + *
Version: 10.5.0.cl or later
Indicates whether the role is read only. A readonly role can neither be updated nor deleted. + */ + 'read_only'?: boolean | null; + + static readonly discriminator: string | undefined = undefined; + + static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ + { + "name": "name", + "baseName": "name", + "type": "string", + "format": "" + }, + { + "name": "description", + "baseName": "description", + "type": "string", + "format": "" + }, + { + "name": "privileges", + "baseName": "privileges", + "type": "Array", + "format": "" + }, + { + "name": "read_only", + "baseName": "read_only", + "type": "boolean", + "format": "" + } ]; + + static getAttributeTypeMap() { + return CreateRoleRequest.attributeTypeMap; + } + + public constructor() { + } +} + + +export type CreateRoleRequestPrivilegesEnum = "USERDATAUPLOADING" | "DATADOWNLOADING" | "DATAMANAGEMENT" | "SHAREWITHALL" | "JOBSCHEDULING" | "A3ANALYSIS" | "BYPASSRLS" | "DISABLE_PINBOARD_CREATION" | "DEVELOPER" | "APPLICATION_ADMINISTRATION" | "USER_ADMINISTRATION" | "GROUP_ADMINISTRATION" | "SYSTEM_INFO_ADMINISTRATION" | "SYNCMANAGEMENT" | "ORG_ADMINISTRATION" | "ROLE_ADMINISTRATION" | "AUTHENTICATION_ADMINISTRATION" | "BILLING_INFO_ADMINISTRATION" | "CONTROL_TRUSTED_AUTH" | "TAGMANAGEMENT" | "LIVEBOARD_VERIFIER" | "CAN_MANAGE_CUSTOM_CALENDAR" | "CAN_CREATE_OR_EDIT_CONNECTIONS" | "CAN_MANAGE_WORKSHEET_VIEWS_TABLES" | "CAN_MANAGE_VERSION_CONTROL" | "THIRDPARTY_ANALYSIS" | "CAN_CREATE_CATALOG" | "ALLOW_NON_EMBED_FULL_APP_ACCESS" | "CAN_ACCESS_ANALYST_STUDIO" | "CAN_MANAGE_ANALYST_STUDIO" | "PREVIEW_DOCUMENT_SEARCH" | "CAN_MANAGE_VARIABLES" | "CAN_MODIFY_FOLDERS" | "CAN_VIEW_FOLDERS" | "CAN_MANAGE_AGENTSPOT" | "CAN_ACCESS_AGENTSPOT" | "CAN_SETUP_VERSION_CONTROL" | "PREVIEW_THOUGHTSPOT_SAGE" | "CAN_MANAGE_WEBHOOKS" | "CAN_DOWNLOAD_VISUALS" | "CAN_DOWNLOAD_DETAILED_DATA" | "CAN_USE_SPOTTER" ; + diff --git a/sdks/typescript/models/CreateScheduleRequest.ts b/sdks/typescript/models/CreateScheduleRequest.ts new file mode 100644 index 000000000..8ce678330 --- /dev/null +++ b/sdks/typescript/models/CreateScheduleRequest.ts @@ -0,0 +1,135 @@ +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { CreateScheduleRequestFrequency } from '../models/CreateScheduleRequestFrequency'; +import { CreateScheduleRequestLiveboardOptions } from '../models/CreateScheduleRequestLiveboardOptions'; +import { CreateScheduleRequestPdfOptions } from '../models/CreateScheduleRequestPdfOptions'; +import { CreateScheduleRequestRecipientDetails } from '../models/CreateScheduleRequestRecipientDetails'; +import { HttpFile } from '../http/http'; + +export class CreateScheduleRequest { + /** + * Name of the scheduled job. + */ + 'name': string; + /** + * Description of the job. + */ + 'description': string; + /** + * Type of the metadata object. + */ + 'metadata_type': CreateScheduleRequestMetadataTypeEnum; + /** + * Unique ID or name of the metadata object. + */ + 'metadata_identifier': string; + /** + * Export file format. + */ + 'file_format'?: CreateScheduleRequestFileFormatEnum; + 'liveboard_options'?: CreateScheduleRequestLiveboardOptions; + 'pdf_options'?: CreateScheduleRequestPdfOptions; + /** + * Time zone + */ + 'time_zone': CreateScheduleRequestTimeZoneEnum; + 'frequency'?: CreateScheduleRequestFrequency; + 'recipient_details': CreateScheduleRequestRecipientDetails; + /** + * Personalised view id of the liveboard to be scheduled. + */ + 'personalised_view_id'?: string; + + static readonly discriminator: string | undefined = undefined; + + static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ + { + "name": "name", + "baseName": "name", + "type": "string", + "format": "" + }, + { + "name": "description", + "baseName": "description", + "type": "string", + "format": "" + }, + { + "name": "metadata_type", + "baseName": "metadata_type", + "type": "CreateScheduleRequestMetadataTypeEnum", + "format": "" + }, + { + "name": "metadata_identifier", + "baseName": "metadata_identifier", + "type": "string", + "format": "" + }, + { + "name": "file_format", + "baseName": "file_format", + "type": "CreateScheduleRequestFileFormatEnum", + "format": "" + }, + { + "name": "liveboard_options", + "baseName": "liveboard_options", + "type": "CreateScheduleRequestLiveboardOptions", + "format": "" + }, + { + "name": "pdf_options", + "baseName": "pdf_options", + "type": "CreateScheduleRequestPdfOptions", + "format": "" + }, + { + "name": "time_zone", + "baseName": "time_zone", + "type": "CreateScheduleRequestTimeZoneEnum", + "format": "" + }, + { + "name": "frequency", + "baseName": "frequency", + "type": "CreateScheduleRequestFrequency", + "format": "" + }, + { + "name": "recipient_details", + "baseName": "recipient_details", + "type": "CreateScheduleRequestRecipientDetails", + "format": "" + }, + { + "name": "personalised_view_id", + "baseName": "personalised_view_id", + "type": "string", + "format": "" + } ]; + + static getAttributeTypeMap() { + return CreateScheduleRequest.attributeTypeMap; + } + + public constructor() { + } +} + + +export type CreateScheduleRequestMetadataTypeEnum = "LIVEBOARD" ; +export type CreateScheduleRequestFileFormatEnum = "CSV" | "PDF" | "XLSX" ; +export type CreateScheduleRequestTimeZoneEnum = "Africa/Abidjan" | "Africa/Accra" | "Africa/Addis_Ababa" | "Africa/Algiers" | "Africa/Asmara" | "Africa/Asmera" | "Africa/Bamako" | "Africa/Bangui" | "Africa/Banjul" | "Africa/Bissau" | "Africa/Blantyre" | "Africa/Brazzaville" | "Africa/Bujumbura" | "Africa/Cairo" | "Africa/Casablanca" | "Africa/Ceuta" | "Africa/Conakry" | "Africa/Dakar" | "Africa/Dar_es_Salaam" | "Africa/Djibouti" | "Africa/Douala" | "Africa/El_Aaiun" | "Africa/Freetown" | "Africa/Gaborone" | "Africa/Harare" | "Africa/Johannesburg" | "Africa/Juba" | "Africa/Kampala" | "Africa/Khartoum" | "Africa/Kigali" | "Africa/Kinshasa" | "Africa/Lagos" | "Africa/Libreville" | "Africa/Lome" | "Africa/Luanda" | "Africa/Lubumbashi" | "Africa/Lusaka" | "Africa/Malabo" | "Africa/Maputo" | "Africa/Maseru" | "Africa/Mbabane" | "Africa/Mogadishu" | "Africa/Monrovia" | "Africa/Nairobi" | "Africa/Ndjamena" | "Africa/Niamey" | "Africa/Nouakchott" | "Africa/Ouagadougou" | "Africa/Porto-Novo" | "Africa/Sao_Tome" | "Africa/Timbuktu" | "Africa/Tripoli" | "Africa/Tunis" | "Africa/Windhoek" | "America/Adak" | "America/Anchorage" | "America/Anguilla" | "America/Antigua" | "America/Araguaina" | "America/Argentina/Buenos_Aires" | "America/Argentina/Catamarca" | "America/Argentina/ComodRivadavia" | "America/Argentina/Cordoba" | "America/Argentina/Jujuy" | "America/Argentina/La_Rioja" | "America/Argentina/Mendoza" | "America/Argentina/Rio_Gallegos" | "America/Argentina/Salta" | "America/Argentina/San_Juan" | "America/Argentina/San_Luis" | "America/Argentina/Tucuman" | "America/Argentina/Ushuaia" | "America/Aruba" | "America/Asuncion" | "America/Atikokan" | "America/Atka" | "America/Bahia" | "America/Bahia_Banderas" | "America/Barbados" | "America/Belem" | "America/Belize" | "America/Blanc-Sablon" | "America/Boa_Vista" | "America/Bogota" | "America/Boise" | "America/Buenos_Aires" | "America/Cambridge_Bay" | "America/Campo_Grande" | "America/Cancun" | "America/Caracas" | "America/Catamarca" | "America/Cayenne" | "America/Cayman" | "America/Chicago" | "America/Chihuahua" | "America/Coral_Harbour" | "America/Cordoba" | "America/Costa_Rica" | "America/Creston" | "America/Cuiaba" | "America/Curacao" | "America/Danmarkshavn" | "America/Dawson" | "America/Dawson_Creek" | "America/Denver" | "America/Detroit" | "America/Dominica" | "America/Edmonton" | "America/Eirunepe" | "America/El_Salvador" | "America/Ensenada" | "America/Fort_Nelson" | "America/Fort_Wayne" | "America/Fortaleza" | "America/Glace_Bay" | "America/Godthab" | "America/Goose_Bay" | "America/Grand_Turk" | "America/Grenada" | "America/Guadeloupe" | "America/Guatemala" | "America/Guayaquil" | "America/Guyana" | "America/Halifax" | "America/Havana" | "America/Hermosillo" | "America/Indiana/Indianapolis" | "America/Indiana/Knox" | "America/Indiana/Marengo" | "America/Indiana/Petersburg" | "America/Indiana/Tell_City" | "America/Indiana/Vevay" | "America/Indiana/Vincennes" | "America/Indiana/Winamac" | "America/Indianapolis" | "America/Inuvik" | "America/Iqaluit" | "America/Jamaica" | "America/Jujuy" | "America/Juneau" | "America/Kentucky/Louisville" | "America/Kentucky/Monticello" | "America/Knox_IN" | "America/Kralendijk" | "America/La_Paz" | "America/Lima" | "America/Los_Angeles" | "America/Louisville" | "America/Lower_Princes" | "America/Maceio" | "America/Managua" | "America/Manaus" | "America/Marigot" | "America/Martinique" | "America/Matamoros" | "America/Mazatlan" | "America/Mendoza" | "America/Menominee" | "America/Merida" | "America/Metlakatla" | "America/Mexico_City" | "America/Miquelon" | "America/Moncton" | "America/Monterrey" | "America/Montevideo" | "America/Montreal" | "America/Montserrat" | "America/Nassau" | "America/New_York" | "America/Nipigon" | "America/Nome" | "America/Noronha" | "America/North_Dakota/Beulah" | "America/North_Dakota/Center" | "America/North_Dakota/New_Salem" | "America/Nuuk" | "America/Ojinaga" | "America/Panama" | "America/Pangnirtung" | "America/Paramaribo" | "America/Phoenix" | "America/Port-au-Prince" | "America/Port_of_Spain" | "America/Porto_Acre" | "America/Porto_Velho" | "America/Puerto_Rico" | "America/Punta_Arenas" | "America/Rainy_River" | "America/Rankin_Inlet" | "America/Recife" | "America/Regina" | "America/Resolute" | "America/Rio_Branco" | "America/Rosario" | "America/Santa_Isabel" | "America/Santarem" | "America/Santiago" | "America/Santo_Domingo" | "America/Sao_Paulo" | "America/Scoresbysund" | "America/Shiprock" | "America/Sitka" | "America/St_Barthelemy" | "America/St_Johns" | "America/St_Kitts" | "America/St_Lucia" | "America/St_Thomas" | "America/St_Vincent" | "America/Swift_Current" | "America/Tegucigalpa" | "America/Thule" | "America/Thunder_Bay" | "America/Tijuana" | "America/Toronto" | "America/Tortola" | "America/Vancouver" | "America/Virgin" | "America/Whitehorse" | "America/Winnipeg" | "America/Yakutat" | "America/Yellowknife" | "Antarctica/Casey" | "Antarctica/Davis" | "Antarctica/DumontDUrville" | "Antarctica/Macquarie" | "Antarctica/Mawson" | "Antarctica/McMurdo" | "Antarctica/Palmer" | "Antarctica/Rothera" | "Antarctica/South_Pole" | "Antarctica/Syowa" | "Antarctica/Troll" | "Antarctica/Vostok" | "Arctic/Longyearbyen" | "Asia/Aden" | "Asia/Almaty" | "Asia/Amman" | "Asia/Anadyr" | "Asia/Aqtau" | "Asia/Aqtobe" | "Asia/Ashgabat" | "Asia/Ashkhabad" | "Asia/Atyrau" | "Asia/Baghdad" | "Asia/Bahrain" | "Asia/Baku" | "Asia/Bangkok" | "Asia/Barnaul" | "Asia/Beirut" | "Asia/Bishkek" | "Asia/Brunei" | "Asia/Calcutta" | "Asia/Chita" | "Asia/Choibalsan" | "Asia/Chongqing" | "Asia/Chungking" | "Asia/Colombo" | "Asia/Dacca" | "Asia/Damascus" | "Asia/Dhaka" | "Asia/Dili" | "Asia/Dubai" | "Asia/Dushanbe" | "Asia/Famagusta" | "Asia/Gaza" | "Asia/Harbin" | "Asia/Hebron" | "Asia/Ho_Chi_Minh" | "Asia/Hong_Kong" | "Asia/Hovd" | "Asia/Irkutsk" | "Asia/Istanbul" | "Asia/Jakarta" | "Asia/Jayapura" | "Asia/Jerusalem" | "Asia/Kabul" | "Asia/Kamchatka" | "Asia/Karachi" | "Asia/Kashgar" | "Asia/Kathmandu" | "Asia/Katmandu" | "Asia/Khandyga" | "Asia/Kolkata" | "Asia/Krasnoyarsk" | "Asia/Kuala_Lumpur" | "Asia/Kuching" | "Asia/Kuwait" | "Asia/Macao" | "Asia/Macau" | "Asia/Magadan" | "Asia/Makassar" | "Asia/Manila" | "Asia/Muscat" | "Asia/Nicosia" | "Asia/Novokuznetsk" | "Asia/Novosibirsk" | "Asia/Omsk" | "Asia/Oral" | "Asia/Phnom_Penh" | "Asia/Pontianak" | "Asia/Pyongyang" | "Asia/Qatar" | "Asia/Qostanay" | "Asia/Qyzylorda" | "Asia/Rangoon" | "Asia/Riyadh" | "Asia/Saigon" | "Asia/Sakhalin" | "Asia/Samarkand" | "Asia/Seoul" | "Asia/Shanghai" | "Asia/Singapore" | "Asia/Srednekolymsk" | "Asia/Taipei" | "Asia/Tashkent" | "Asia/Tbilisi" | "Asia/Tehran" | "Asia/Tel_Aviv" | "Asia/Thimbu" | "Asia/Thimphu" | "Asia/Tokyo" | "Asia/Tomsk" | "Asia/Ujung_Pandang" | "Asia/Ulaanbaatar" | "Asia/Ulan_Bator" | "Asia/Urumqi" | "Asia/Ust-Nera" | "Asia/Vientiane" | "Asia/Vladivostok" | "Asia/Yakutsk" | "Asia/Yangon" | "Asia/Yekaterinburg" | "Asia/Yerevan" | "Atlantic/Azores" | "Atlantic/Bermuda" | "Atlantic/Canary" | "Atlantic/Cape_Verde" | "Atlantic/Faeroe" | "Atlantic/Faroe" | "Atlantic/Jan_Mayen" | "Atlantic/Madeira" | "Atlantic/Reykjavik" | "Atlantic/South_Georgia" | "Atlantic/St_Helena" | "Atlantic/Stanley" | "Australia/ACT" | "Australia/Adelaide" | "Australia/Brisbane" | "Australia/Broken_Hill" | "Australia/Canberra" | "Australia/Currie" | "Australia/Darwin" | "Australia/Eucla" | "Australia/Hobart" | "Australia/LHI" | "Australia/Lindeman" | "Australia/Lord_Howe" | "Australia/Melbourne" | "Australia/NSW" | "Australia/North" | "Australia/Perth" | "Australia/Queensland" | "Australia/South" | "Australia/Sydney" | "Australia/Tasmania" | "Australia/Victoria" | "Australia/West" | "Australia/Yancowinna" | "Brazil/Acre" | "Brazil/DeNoronha" | "Brazil/East" | "Brazil/West" | "CET" | "CST6CDT" | "Canada/Atlantic" | "Canada/Central" | "Canada/Eastern" | "Canada/Mountain" | "Canada/Newfoundland" | "Canada/Pacific" | "Canada/Saskatchewan" | "Canada/Yukon" | "Chile/Continental" | "Chile/EasterIsland" | "Cuba" | "EET" | "EST5EDT" | "Egypt" | "Eire" | "Etc/GMT" | "Etc/GMT+0" | "Etc/GMT+1" | "Etc/GMT+10" | "Etc/GMT+11" | "Etc/GMT+12" | "Etc/GMT+2" | "Etc/GMT+3" | "Etc/GMT+4" | "Etc/GMT+5" | "Etc/GMT+6" | "Etc/GMT+7" | "Etc/GMT+8" | "Etc/GMT+9" | "Etc/GMT-0" | "Etc/GMT-1" | "Etc/GMT-10" | "Etc/GMT-11" | "Etc/GMT-12" | "Etc/GMT-13" | "Etc/GMT-14" | "Etc/GMT-2" | "Etc/GMT-3" | "Etc/GMT-4" | "Etc/GMT-5" | "Etc/GMT-6" | "Etc/GMT-7" | "Etc/GMT-8" | "Etc/GMT-9" | "Etc/GMT0" | "Etc/Greenwich" | "Etc/UCT" | "Etc/UTC" | "Etc/Universal" | "Etc/Zulu" | "Europe/Amsterdam" | "Europe/Andorra" | "Europe/Astrakhan" | "Europe/Athens" | "Europe/Belfast" | "Europe/Belgrade" | "Europe/Berlin" | "Europe/Bratislava" | "Europe/Brussels" | "Europe/Bucharest" | "Europe/Budapest" | "Europe/Busingen" | "Europe/Chisinau" | "Europe/Copenhagen" | "Europe/Dublin" | "Europe/Gibraltar" | "Europe/Guernsey" | "Europe/Helsinki" | "Europe/Isle_of_Man" | "Europe/Istanbul" | "Europe/Jersey" | "Europe/Kaliningrad" | "Europe/Kiev" | "Europe/Kirov" | "Europe/Kyiv" | "Europe/Lisbon" | "Europe/Ljubljana" | "Europe/London" | "Europe/Luxembourg" | "Europe/Madrid" | "Europe/Malta" | "Europe/Mariehamn" | "Europe/Minsk" | "Europe/Monaco" | "Europe/Moscow" | "Europe/Nicosia" | "Europe/Oslo" | "Europe/Paris" | "Europe/Podgorica" | "Europe/Prague" | "Europe/Riga" | "Europe/Rome" | "Europe/Samara" | "Europe/San_Marino" | "Europe/Sarajevo" | "Europe/Saratov" | "Europe/Simferopol" | "Europe/Skopje" | "Europe/Sofia" | "Europe/Stockholm" | "Europe/Tallinn" | "Europe/Tirane" | "Europe/Tiraspol" | "Europe/Ulyanovsk" | "Europe/Uzhgorod" | "Europe/Vaduz" | "Europe/Vatican" | "Europe/Vienna" | "Europe/Vilnius" | "Europe/Volgograd" | "Europe/Warsaw" | "Europe/Zagreb" | "Europe/Zaporozhye" | "Europe/Zurich" | "GB" | "GB-Eire" | "GMT" | "GMT0" | "Greenwich" | "Hongkong" | "Iceland" | "Indian/Antananarivo" | "Indian/Chagos" | "Indian/Christmas" | "Indian/Cocos" | "Indian/Comoro" | "Indian/Kerguelen" | "Indian/Mahe" | "Indian/Maldives" | "Indian/Mauritius" | "Indian/Mayotte" | "Indian/Reunion" | "Iran" | "Israel" | "Jamaica" | "Japan" | "Kwajalein" | "Libya" | "MET" | "MST7MDT" | "Mexico/BajaNorte" | "Mexico/BajaSur" | "Mexico/General" | "NZ" | "NZ-CHAT" | "Navajo" | "PRC" | "PST8PDT" | "Pacific/Apia" | "Pacific/Auckland" | "Pacific/Bougainville" | "Pacific/Chatham" | "Pacific/Chuuk" | "Pacific/Easter" | "Pacific/Efate" | "Pacific/Enderbury" | "Pacific/Fakaofo" | "Pacific/Fiji" | "Pacific/Funafuti" | "Pacific/Galapagos" | "Pacific/Gambier" | "Pacific/Guadalcanal" | "Pacific/Guam" | "Pacific/Honolulu" | "Pacific/Johnston" | "Pacific/Kanton" | "Pacific/Kiritimati" | "Pacific/Kosrae" | "Pacific/Kwajalein" | "Pacific/Majuro" | "Pacific/Marquesas" | "Pacific/Midway" | "Pacific/Nauru" | "Pacific/Niue" | "Pacific/Norfolk" | "Pacific/Noumea" | "Pacific/Pago_Pago" | "Pacific/Palau" | "Pacific/Pitcairn" | "Pacific/Pohnpei" | "Pacific/Ponape" | "Pacific/Port_Moresby" | "Pacific/Rarotonga" | "Pacific/Saipan" | "Pacific/Samoa" | "Pacific/Tahiti" | "Pacific/Tarawa" | "Pacific/Tongatapu" | "Pacific/Truk" | "Pacific/Wake" | "Pacific/Wallis" | "Pacific/Yap" | "Poland" | "Portugal" | "ROK" | "Singapore" | "SystemV/AST4" | "SystemV/AST4ADT" | "SystemV/CST6" | "SystemV/CST6CDT" | "SystemV/EST5" | "SystemV/EST5EDT" | "SystemV/HST10" | "SystemV/MST7" | "SystemV/MST7MDT" | "SystemV/PST8" | "SystemV/PST8PDT" | "SystemV/YST9" | "SystemV/YST9YDT" | "Turkey" | "UCT" | "US/Alaska" | "US/Aleutian" | "US/Arizona" | "US/Central" | "US/East-Indiana" | "US/Eastern" | "US/Hawaii" | "US/Indiana-Starke" | "US/Michigan" | "US/Mountain" | "US/Pacific" | "US/Samoa" | "UTC" | "Universal" | "W-SU" | "WET" | "Zulu" | "EST" | "HST" | "MST" | "ACT" | "AET" | "AGT" | "ART" | "AST" | "BET" | "BST" | "CAT" | "CNT" | "CST" | "CTT" | "EAT" | "ECT" | "IET" | "IST" | "JST" | "MIT" | "NET" | "NST" | "PLT" | "PNT" | "PRT" | "PST" | "SST" | "VST" ; + diff --git a/sdks/typescript/models/CreateScheduleRequestFrequency.ts b/sdks/typescript/models/CreateScheduleRequestFrequency.ts new file mode 100644 index 000000000..765b234e8 --- /dev/null +++ b/sdks/typescript/models/CreateScheduleRequestFrequency.ts @@ -0,0 +1,39 @@ +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { CronExpressionInput } from '../models/CronExpressionInput'; +import { HttpFile } from '../http/http'; + +/** +* Frequency settings for the scheduled job. +*/ +export class CreateScheduleRequestFrequency { + 'cron_expression': CronExpressionInput; + + static readonly discriminator: string | undefined = undefined; + + static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ + { + "name": "cron_expression", + "baseName": "cron_expression", + "type": "CronExpressionInput", + "format": "" + } ]; + + static getAttributeTypeMap() { + return CreateScheduleRequestFrequency.attributeTypeMap; + } + + public constructor() { + } +} + diff --git a/sdks/typescript/models/CreateScheduleRequestLiveboardOptions.ts b/sdks/typescript/models/CreateScheduleRequestLiveboardOptions.ts new file mode 100644 index 000000000..2ef093e79 --- /dev/null +++ b/sdks/typescript/models/CreateScheduleRequestLiveboardOptions.ts @@ -0,0 +1,41 @@ +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { HttpFile } from '../http/http'; + +/** +* Options to specify details of Liveboard. +*/ +export class CreateScheduleRequestLiveboardOptions { + /** + * Unique ID or name of visualizations. + */ + 'visualization_identifiers': Array; + + static readonly discriminator: string | undefined = undefined; + + static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ + { + "name": "visualization_identifiers", + "baseName": "visualization_identifiers", + "type": "Array", + "format": "" + } ]; + + static getAttributeTypeMap() { + return CreateScheduleRequestLiveboardOptions.attributeTypeMap; + } + + public constructor() { + } +} + diff --git a/sdks/typescript/models/CreateScheduleRequestPdfOptions.ts b/sdks/typescript/models/CreateScheduleRequestPdfOptions.ts new file mode 100644 index 000000000..439b28892 --- /dev/null +++ b/sdks/typescript/models/CreateScheduleRequestPdfOptions.ts @@ -0,0 +1,124 @@ +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { HttpFile } from '../http/http'; + +/** +* PDF layout and orientation settings. Applicable only if the `file_format` is specified as `PDF`. +*/ +export class CreateScheduleRequestPdfOptions { + /** + * Indicates whether to include complete Liveboard. + */ + 'complete_liveboard'?: boolean | null; + /** + * Indicates whether to include cover page with the Liveboard title. + */ + 'include_cover_page'?: boolean | null; + /** + * Indicates whether to include customized wide logo in the footer if available. + */ + 'include_custom_logo'?: boolean | null; + /** + * Indicates whether to include a page with all applied filters. + */ + 'include_filter_page'?: boolean | null; + /** + * Indicates whether to include page number in the footer of each page + */ + 'include_page_number'?: boolean | null; + /** + * Text to include in the footer of each page. + */ + 'page_footer_text'?: string | null; + /** + * Page orientation of the PDF. + */ + 'page_orientation'?: string | null; + /** + * Page size. + */ + 'page_size'?: CreateScheduleRequestPdfOptionsPageSizeEnum | null; + /** + * Indicates whether to include only first page of the tables. + */ + 'truncate_table'?: boolean | null; + + static readonly discriminator: string | undefined = undefined; + + static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ + { + "name": "complete_liveboard", + "baseName": "complete_liveboard", + "type": "boolean", + "format": "" + }, + { + "name": "include_cover_page", + "baseName": "include_cover_page", + "type": "boolean", + "format": "" + }, + { + "name": "include_custom_logo", + "baseName": "include_custom_logo", + "type": "boolean", + "format": "" + }, + { + "name": "include_filter_page", + "baseName": "include_filter_page", + "type": "boolean", + "format": "" + }, + { + "name": "include_page_number", + "baseName": "include_page_number", + "type": "boolean", + "format": "" + }, + { + "name": "page_footer_text", + "baseName": "page_footer_text", + "type": "string", + "format": "" + }, + { + "name": "page_orientation", + "baseName": "page_orientation", + "type": "string", + "format": "" + }, + { + "name": "page_size", + "baseName": "page_size", + "type": "CreateScheduleRequestPdfOptionsPageSizeEnum", + "format": "" + }, + { + "name": "truncate_table", + "baseName": "truncate_table", + "type": "boolean", + "format": "" + } ]; + + static getAttributeTypeMap() { + return CreateScheduleRequestPdfOptions.attributeTypeMap; + } + + public constructor() { + } +} + + +export type CreateScheduleRequestPdfOptionsPageSizeEnum = "A4" | "TAB_BASED" ; + diff --git a/sdks/typescript/models/CreateScheduleRequestRecipientDetails.ts b/sdks/typescript/models/CreateScheduleRequestRecipientDetails.ts new file mode 100644 index 000000000..d77198b40 --- /dev/null +++ b/sdks/typescript/models/CreateScheduleRequestRecipientDetails.ts @@ -0,0 +1,52 @@ +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { PrincipalsListItemInput } from '../models/PrincipalsListItemInput'; +import { HttpFile } from '../http/http'; + +/** +* Recipients of the scheduled job notifications. Add the GUID or name of the ThoughtSpot users or groups as recipients in the `principals` array. If a recipient is not a ThoughtSpot user, specify email address. +*/ +export class CreateScheduleRequestRecipientDetails { + /** + * Emails of the recipients. + */ + 'emails'?: Array | null; + /** + * User or groups to be set as recipients of the schedule notifications. + */ + 'principals'?: Array | null; + + static readonly discriminator: string | undefined = undefined; + + static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ + { + "name": "emails", + "baseName": "emails", + "type": "Array", + "format": "" + }, + { + "name": "principals", + "baseName": "principals", + "type": "Array", + "format": "" + } ]; + + static getAttributeTypeMap() { + return CreateScheduleRequestRecipientDetails.attributeTypeMap; + } + + public constructor() { + } +} + diff --git a/sdks/typescript/models/CreateTagRequest.ts b/sdks/typescript/models/CreateTagRequest.ts new file mode 100644 index 000000000..c5fe206d0 --- /dev/null +++ b/sdks/typescript/models/CreateTagRequest.ts @@ -0,0 +1,48 @@ +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { HttpFile } from '../http/http'; + +export class CreateTagRequest { + /** + * Name of the tag. + */ + 'name': string; + /** + * Hex color code to be assigned to the tag. For example, #ff78a9. + */ + 'color'?: string; + + static readonly discriminator: string | undefined = undefined; + + static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ + { + "name": "name", + "baseName": "name", + "type": "string", + "format": "" + }, + { + "name": "color", + "baseName": "color", + "type": "string", + "format": "" + } ]; + + static getAttributeTypeMap() { + return CreateTagRequest.attributeTypeMap; + } + + public constructor() { + } +} + diff --git a/sdks/typescript/models/CreateUserGroupRequest.ts b/sdks/typescript/models/CreateUserGroupRequest.ts new file mode 100644 index 000000000..cdbcbe755 --- /dev/null +++ b/sdks/typescript/models/CreateUserGroupRequest.ts @@ -0,0 +1,133 @@ +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { HttpFile } from '../http/http'; + +export class CreateUserGroupRequest { + /** + * Name of the group. The group name must be unique. + */ + 'name': string; + /** + * Display name for the group. + */ + 'display_name': string; + /** + * GUID of the Liveboards to assign as default Liveboards to the users in the group. + */ + 'default_liveboard_identifiers'?: Array; + /** + * Description of the group + */ + 'description'?: string; + /** + * Privileges to assign to the group + */ + 'privileges'?: Array; + /** + * GUID or name of the sub groups. A subgroup is a group assigned to a parent group. + */ + 'sub_group_identifiers'?: Array; + /** + * Group type. + */ + 'type'?: CreateUserGroupRequestTypeEnum; + /** + * GUID or name of the users to assign to the group. + */ + 'user_identifiers'?: Array; + /** + * Visibility of the group. To make a group visible to other users and groups, set the visibility to SHAREABLE. + */ + 'visibility'?: CreateUserGroupRequestVisibilityEnum; + /** + * Role identifiers of the roles that should be assigned to the group. + */ + 'role_identifiers'?: Array; + + static readonly discriminator: string | undefined = undefined; + + static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ + { + "name": "name", + "baseName": "name", + "type": "string", + "format": "" + }, + { + "name": "display_name", + "baseName": "display_name", + "type": "string", + "format": "" + }, + { + "name": "default_liveboard_identifiers", + "baseName": "default_liveboard_identifiers", + "type": "Array", + "format": "" + }, + { + "name": "description", + "baseName": "description", + "type": "string", + "format": "" + }, + { + "name": "privileges", + "baseName": "privileges", + "type": "Array", + "format": "" + }, + { + "name": "sub_group_identifiers", + "baseName": "sub_group_identifiers", + "type": "Array", + "format": "" + }, + { + "name": "type", + "baseName": "type", + "type": "CreateUserGroupRequestTypeEnum", + "format": "" + }, + { + "name": "user_identifiers", + "baseName": "user_identifiers", + "type": "Array", + "format": "" + }, + { + "name": "visibility", + "baseName": "visibility", + "type": "CreateUserGroupRequestVisibilityEnum", + "format": "" + }, + { + "name": "role_identifiers", + "baseName": "role_identifiers", + "type": "Array", + "format": "" + } ]; + + static getAttributeTypeMap() { + return CreateUserGroupRequest.attributeTypeMap; + } + + public constructor() { + } +} + + +export type CreateUserGroupRequestPrivilegesEnum = "ADMINISTRATION" | "AUTHORING" | "USERDATAUPLOADING" | "DATADOWNLOADING" | "USERMANAGEMENT" | "DATAMANAGEMENT" | "SHAREWITHALL" | "JOBSCHEDULING" | "A3ANALYSIS" | "EXPERIMENTALFEATUREPRIVILEGE" | "BYPASSRLS" | "RANALYSIS" | "DEVELOPER" | "USER_ADMINISTRATION" | "GROUP_ADMINISTRATION" | "SYNCMANAGEMENT" | "CAN_CREATE_CATALOG" | "DISABLE_PINBOARD_CREATION" | "LIVEBOARD_VERIFIER" | "PREVIEW_THOUGHTSPOT_SAGE" | "CAN_MANAGE_VERSION_CONTROL" | "THIRDPARTY_ANALYSIS" | "ALLOW_NON_EMBED_FULL_APP_ACCESS" | "CAN_ACCESS_ANALYST_STUDIO" | "CAN_MANAGE_ANALYST_STUDIO" | "CAN_MODIFY_FOLDERS" | "CAN_MANAGE_VARIABLES" | "CAN_VIEW_FOLDERS" | "CAN_MANAGE_AGENTSPOT" | "CAN_ACCESS_AGENTSPOT" | "PREVIEW_DOCUMENT_SEARCH" | "CAN_SETUP_VERSION_CONTROL" | "CAN_DOWNLOAD_VISUALS" | "CAN_DOWNLOAD_DETAILED_DATA" | "CAN_USE_SPOTTER" ; +export type CreateUserGroupRequestTypeEnum = "LOCAL_GROUP" | "LDAP_GROUP" | "TEAM_GROUP" | "TENANT_GROUP" ; +export type CreateUserGroupRequestVisibilityEnum = "SHARABLE" | "NON_SHARABLE" ; + diff --git a/sdks/typescript/models/CreateUserRequest.ts b/sdks/typescript/models/CreateUserRequest.ts new file mode 100644 index 000000000..77447e27f --- /dev/null +++ b/sdks/typescript/models/CreateUserRequest.ts @@ -0,0 +1,235 @@ +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { FavoriteMetadataInput } from '../models/FavoriteMetadataInput'; +import { HttpFile } from '../http/http'; + +export class CreateUserRequest { + /** + * Name of the user. The username string must be unique. + */ + 'name': string; + /** + * A unique display name string for the user account, usually their first and last name + */ + 'display_name': string; + /** + * Password for the user account. For IAMv2 users, you must set this password if you do not want to trigger an activation email. + */ + 'password'?: string; + /** + * Email of the user account + */ + 'email': string; + /** + * Type of the account. + */ + 'account_type'?: CreateUserRequestAccountTypeEnum; + /** + * Current status of the user account. The `SUSPENDED` user state indicates a transitional state applicable to IAMv2 users only. + */ + 'account_status'?: CreateUserRequestAccountStatusEnum; + /** + * List of Org IDs to which the user belongs. + */ + 'org_identifiers'?: Array; + /** + * GUIDs or names of the groups to which the newly created user belongs. + */ + 'group_identifiers'?: Array; + /** + * Visibility of the users. When set to SHARABLE, the user is visible to other users and groups when they try to share an object. + */ + 'visibility'?: CreateUserRequestVisibilityEnum; + /** + * User preference for receiving email notifications when another ThoughtSpot user shares a metadata object such as Answer, Liveboard, or Worksheet. + */ + 'notify_on_share'?: boolean | null; + /** + * The user preference for revisiting the onboarding experience. + */ + 'show_onboarding_experience'?: boolean | null; + /** + * flag to get the on-boarding experience is completed or not. + */ + 'onboarding_experience_completed'?: boolean | null; + /** + * GUID of the Liveboard to set a default Liveboard for the user. ThoughtSpot displays this Liveboard on the Home page when the user logs in. + */ + 'home_liveboard_identifier'?: string; + /** + * Metadata objects to add to the user\'s favorites list. + */ + 'favorite_metadata'?: Array; + /** + * Locale for the user. When setting this value, do not set use_browser_language to true, otherwise the browser\'s language setting will take precedence and the preferred_locale value will be ignored. + */ + 'preferred_locale'?: CreateUserRequestPreferredLocaleEnum; + /** + * Flag to indicate whether to use the browser locale for the user in the UI. When set to true, the preferred_locale value is unset and the browser\'s language setting takes precedence. Version: 26.3.0.cl or later + */ + 'use_browser_language'?: boolean | null; + /** + * Properties for the user + */ + 'extended_properties'?: any; + /** + * Preferences for the user + */ + 'extended_preferences'?: any; + /** + * Flag to indicate whether welcome email should be sent to user. This parameter is applied only on clusters on which IAM is disabled. + */ + 'trigger_welcome_email'?: boolean | null; + /** + * Flag to indicate whether activation email should be sent to the user. Default value for IAMv2 users is set to true. Users must either set this to false, or enter a valid password if they do not want to trigger an activation email. + */ + 'trigger_activation_email'?: boolean | null; + + static readonly discriminator: string | undefined = undefined; + + static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ + { + "name": "name", + "baseName": "name", + "type": "string", + "format": "" + }, + { + "name": "display_name", + "baseName": "display_name", + "type": "string", + "format": "" + }, + { + "name": "password", + "baseName": "password", + "type": "string", + "format": "" + }, + { + "name": "email", + "baseName": "email", + "type": "string", + "format": "" + }, + { + "name": "account_type", + "baseName": "account_type", + "type": "CreateUserRequestAccountTypeEnum", + "format": "" + }, + { + "name": "account_status", + "baseName": "account_status", + "type": "CreateUserRequestAccountStatusEnum", + "format": "" + }, + { + "name": "org_identifiers", + "baseName": "org_identifiers", + "type": "Array", + "format": "" + }, + { + "name": "group_identifiers", + "baseName": "group_identifiers", + "type": "Array", + "format": "" + }, + { + "name": "visibility", + "baseName": "visibility", + "type": "CreateUserRequestVisibilityEnum", + "format": "" + }, + { + "name": "notify_on_share", + "baseName": "notify_on_share", + "type": "boolean", + "format": "" + }, + { + "name": "show_onboarding_experience", + "baseName": "show_onboarding_experience", + "type": "boolean", + "format": "" + }, + { + "name": "onboarding_experience_completed", + "baseName": "onboarding_experience_completed", + "type": "boolean", + "format": "" + }, + { + "name": "home_liveboard_identifier", + "baseName": "home_liveboard_identifier", + "type": "string", + "format": "" + }, + { + "name": "favorite_metadata", + "baseName": "favorite_metadata", + "type": "Array", + "format": "" + }, + { + "name": "preferred_locale", + "baseName": "preferred_locale", + "type": "CreateUserRequestPreferredLocaleEnum", + "format": "" + }, + { + "name": "use_browser_language", + "baseName": "use_browser_language", + "type": "boolean", + "format": "" + }, + { + "name": "extended_properties", + "baseName": "extended_properties", + "type": "any", + "format": "" + }, + { + "name": "extended_preferences", + "baseName": "extended_preferences", + "type": "any", + "format": "" + }, + { + "name": "trigger_welcome_email", + "baseName": "trigger_welcome_email", + "type": "boolean", + "format": "" + }, + { + "name": "trigger_activation_email", + "baseName": "trigger_activation_email", + "type": "boolean", + "format": "" + } ]; + + static getAttributeTypeMap() { + return CreateUserRequest.attributeTypeMap; + } + + public constructor() { + } +} + + +export type CreateUserRequestAccountTypeEnum = "LOCAL_USER" | "LDAP_USER" | "SAML_USER" | "OIDC_USER" | "REMOTE_USER" ; +export type CreateUserRequestAccountStatusEnum = "ACTIVE" | "INACTIVE" | "EXPIRED" | "LOCKED" | "PENDING" | "SUSPENDED" ; +export type CreateUserRequestVisibilityEnum = "SHARABLE" | "NON_SHARABLE" ; +export type CreateUserRequestPreferredLocaleEnum = "en-CA" | "en-GB" | "en-US" | "de-DE" | "ja-JP" | "zh-CN" | "pt-BR" | "fr-FR" | "fr-CA" | "es-US" | "da-DK" | "es-ES" | "fi-FI" | "sv-SE" | "nb-NO" | "pt-PT" | "nl-NL" | "it-IT" | "ru-RU" | "en-IN" | "de-CH" | "en-NZ" | "es-MX" | "en-AU" | "zh-Hant" | "ko-KR" | "en-DE" ; + diff --git a/sdks/typescript/models/CreateVariableRequest.ts b/sdks/typescript/models/CreateVariableRequest.ts new file mode 100644 index 000000000..b28ab0b3c --- /dev/null +++ b/sdks/typescript/models/CreateVariableRequest.ts @@ -0,0 +1,72 @@ +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { HttpFile } from '../http/http'; + +export class CreateVariableRequest { + /** + * Type of variable + */ + 'type': CreateVariableRequestTypeEnum; + /** + * Name of the variable. This is unique across the cluster. + */ + 'name': string; + /** + * If the variable contains sensitive values like passwords + */ + 'is_sensitive'?: boolean | null; + /** + * Variable Data Type, only for formula_variable type, leave empty for others Version: 10.15.0.cl or later + */ + 'data_type'?: CreateVariableRequestDataTypeEnum; + + static readonly discriminator: string | undefined = undefined; + + static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ + { + "name": "type", + "baseName": "type", + "type": "CreateVariableRequestTypeEnum", + "format": "" + }, + { + "name": "name", + "baseName": "name", + "type": "string", + "format": "" + }, + { + "name": "is_sensitive", + "baseName": "is_sensitive", + "type": "boolean", + "format": "" + }, + { + "name": "data_type", + "baseName": "data_type", + "type": "CreateVariableRequestDataTypeEnum", + "format": "" + } ]; + + static getAttributeTypeMap() { + return CreateVariableRequest.attributeTypeMap; + } + + public constructor() { + } +} + + +export type CreateVariableRequestTypeEnum = "CONNECTION_PROPERTY" | "TABLE_MAPPING" | "CONNECTION_PROPERTY_PER_PRINCIPAL" | "FORMULA_VARIABLE" ; +export type CreateVariableRequestDataTypeEnum = "VARCHAR" | "INT32" | "INT64" | "DOUBLE" | "DATE" | "DATE_TIME" ; + diff --git a/sdks/typescript/models/CreateWebhookConfigurationRequest.ts b/sdks/typescript/models/CreateWebhookConfigurationRequest.ts new file mode 100644 index 000000000..12e5ac2a9 --- /dev/null +++ b/sdks/typescript/models/CreateWebhookConfigurationRequest.ts @@ -0,0 +1,116 @@ +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { CreateWebhookConfigurationRequestAuthentication } from '../models/CreateWebhookConfigurationRequestAuthentication'; +import { CreateWebhookConfigurationRequestSignatureVerification } from '../models/CreateWebhookConfigurationRequestSignatureVerification'; +import { CreateWebhookConfigurationRequestStorageDestination } from '../models/CreateWebhookConfigurationRequestStorageDestination'; +import { WebhookKeyValuePairInput } from '../models/WebhookKeyValuePairInput'; +import { HttpFile } from '../http/http'; + +export class CreateWebhookConfigurationRequest { + /** + * Name of the webhook configuration. + */ + 'name': string; + /** + * Description of the webhook configuration. + */ + 'description'?: string; + /** + * The webhook endpoint URL. + */ + 'url': string; + /** + * Additional URL parameters as key-value pairs. + */ + 'url_params'?: any; + /** + * List of events to subscribe to. + */ + 'events': Array; + 'authentication'?: CreateWebhookConfigurationRequestAuthentication; + 'signature_verification'?: CreateWebhookConfigurationRequestSignatureVerification; + 'storage_destination'?: CreateWebhookConfigurationRequestStorageDestination; + /** + * Additional headers as an array of key-value pairs. Example: [{\"key\": \"X-Custom-Header\", \"value\": \"custom_value\"}] Version: 26.4.0.cl or later + */ + 'additional_headers'?: Array; + + static readonly discriminator: string | undefined = undefined; + + static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ + { + "name": "name", + "baseName": "name", + "type": "string", + "format": "" + }, + { + "name": "description", + "baseName": "description", + "type": "string", + "format": "" + }, + { + "name": "url", + "baseName": "url", + "type": "string", + "format": "" + }, + { + "name": "url_params", + "baseName": "url_params", + "type": "any", + "format": "" + }, + { + "name": "events", + "baseName": "events", + "type": "Array", + "format": "" + }, + { + "name": "authentication", + "baseName": "authentication", + "type": "CreateWebhookConfigurationRequestAuthentication", + "format": "" + }, + { + "name": "signature_verification", + "baseName": "signature_verification", + "type": "CreateWebhookConfigurationRequestSignatureVerification", + "format": "" + }, + { + "name": "storage_destination", + "baseName": "storage_destination", + "type": "CreateWebhookConfigurationRequestStorageDestination", + "format": "" + }, + { + "name": "additional_headers", + "baseName": "additional_headers", + "type": "Array", + "format": "" + } ]; + + static getAttributeTypeMap() { + return CreateWebhookConfigurationRequest.attributeTypeMap; + } + + public constructor() { + } +} + + +export type CreateWebhookConfigurationRequestEventsEnum = "LIVEBOARD_SCHEDULE" ; + diff --git a/sdks/typescript/models/CreateWebhookConfigurationRequestAuthentication.ts b/sdks/typescript/models/CreateWebhookConfigurationRequestAuthentication.ts new file mode 100644 index 000000000..7602d0c87 --- /dev/null +++ b/sdks/typescript/models/CreateWebhookConfigurationRequestAuthentication.ts @@ -0,0 +1,65 @@ +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { WebhookAuthApiKeyInput } from '../models/WebhookAuthApiKeyInput'; +import { WebhookAuthBasicAuthInput } from '../models/WebhookAuthBasicAuthInput'; +import { WebhookAuthOAuth2Input } from '../models/WebhookAuthOAuth2Input'; +import { HttpFile } from '../http/http'; + +/** +* Authorization configuration for the webhook. +*/ +export class CreateWebhookConfigurationRequestAuthentication { + 'API_KEY'?: WebhookAuthApiKeyInput; + 'BASIC_AUTH'?: WebhookAuthBasicAuthInput; + /** + * Bearer token authentication configuration. + */ + 'BEARER_TOKEN'?: string | null; + 'OAUTH2'?: WebhookAuthOAuth2Input; + + static readonly discriminator: string | undefined = undefined; + + static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ + { + "name": "API_KEY", + "baseName": "API_KEY", + "type": "WebhookAuthApiKeyInput", + "format": "" + }, + { + "name": "BASIC_AUTH", + "baseName": "BASIC_AUTH", + "type": "WebhookAuthBasicAuthInput", + "format": "" + }, + { + "name": "BEARER_TOKEN", + "baseName": "BEARER_TOKEN", + "type": "string", + "format": "" + }, + { + "name": "OAUTH2", + "baseName": "OAUTH2", + "type": "WebhookAuthOAuth2Input", + "format": "" + } ]; + + static getAttributeTypeMap() { + return CreateWebhookConfigurationRequestAuthentication.attributeTypeMap; + } + + public constructor() { + } +} + diff --git a/sdks/typescript/models/CreateWebhookConfigurationRequestSignatureVerification.ts b/sdks/typescript/models/CreateWebhookConfigurationRequestSignatureVerification.ts new file mode 100644 index 000000000..80255b2d7 --- /dev/null +++ b/sdks/typescript/models/CreateWebhookConfigurationRequestSignatureVerification.ts @@ -0,0 +1,75 @@ +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { HttpFile } from '../http/http'; + +/** +* Configuration for webhook signature verification. +*/ +export class CreateWebhookConfigurationRequestSignatureVerification { + /** + * Signature verification method type. + */ + 'type': CreateWebhookConfigurationRequestSignatureVerificationTypeEnum; + /** + * HTTP header where the signature is sent. + */ + 'header': string; + /** + * Hash algorithm used for signature verification. + */ + 'algorithm': CreateWebhookConfigurationRequestSignatureVerificationAlgorithmEnum; + /** + * Shared secret used for HMAC signature generation. + */ + 'secret': string; + + static readonly discriminator: string | undefined = undefined; + + static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ + { + "name": "type", + "baseName": "type", + "type": "CreateWebhookConfigurationRequestSignatureVerificationTypeEnum", + "format": "" + }, + { + "name": "header", + "baseName": "header", + "type": "string", + "format": "" + }, + { + "name": "algorithm", + "baseName": "algorithm", + "type": "CreateWebhookConfigurationRequestSignatureVerificationAlgorithmEnum", + "format": "" + }, + { + "name": "secret", + "baseName": "secret", + "type": "string", + "format": "" + } ]; + + static getAttributeTypeMap() { + return CreateWebhookConfigurationRequestSignatureVerification.attributeTypeMap; + } + + public constructor() { + } +} + + +export type CreateWebhookConfigurationRequestSignatureVerificationTypeEnum = "HMAC_SHA256" ; +export type CreateWebhookConfigurationRequestSignatureVerificationAlgorithmEnum = "SHA256" ; + diff --git a/sdks/typescript/models/CreateWebhookConfigurationRequestStorageDestination.ts b/sdks/typescript/models/CreateWebhookConfigurationRequestStorageDestination.ts new file mode 100644 index 000000000..d72730fd6 --- /dev/null +++ b/sdks/typescript/models/CreateWebhookConfigurationRequestStorageDestination.ts @@ -0,0 +1,52 @@ +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { StorageConfigInput } from '../models/StorageConfigInput'; +import { HttpFile } from '../http/http'; + +/** +* Configuration for storage destination. Example: {\"storage_type\": \"AWS_S3\", \"storage_config\": {\"aws_s3_config\": {\"bucket_name\": \"my-webhook-files\", \"region\": \"us-west-2\", \"role_arn\": \"arn:aws:iam::123456789012:role/ThoughtSpotDeliveryRole\", \"external_id\": \"ts-webhook-a1b2c3d4-7890\", \"path_prefix\": \"thoughtspot-webhooks/\"}}} Version: 26.3.0.cl or later +*/ +export class CreateWebhookConfigurationRequestStorageDestination { + /** + * Type of storage destination. Example: \"AWS_S3\" + */ + 'storage_type': CreateWebhookConfigurationRequestStorageDestinationStorageTypeEnum; + 'storage_config': StorageConfigInput; + + static readonly discriminator: string | undefined = undefined; + + static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ + { + "name": "storage_type", + "baseName": "storage_type", + "type": "CreateWebhookConfigurationRequestStorageDestinationStorageTypeEnum", + "format": "" + }, + { + "name": "storage_config", + "baseName": "storage_config", + "type": "StorageConfigInput", + "format": "" + } ]; + + static getAttributeTypeMap() { + return CreateWebhookConfigurationRequestStorageDestination.attributeTypeMap; + } + + public constructor() { + } +} + + +export type CreateWebhookConfigurationRequestStorageDestinationStorageTypeEnum = "AWS_S3" ; + diff --git a/sdks/typescript/models/CronExpression.ts b/sdks/typescript/models/CronExpression.ts new file mode 100644 index 000000000..621ff48cc --- /dev/null +++ b/sdks/typescript/models/CronExpression.ts @@ -0,0 +1,91 @@ +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { HttpFile } from '../http/http'; + +/** +* Schedule selected cron expression. +*/ +export class CronExpression { + /** + * Day of month of the object. + */ + 'day_of_month': string; + /** + * Day of Week of the object. + */ + 'day_of_week': string; + /** + * Hour of the object. + */ + 'hour': string; + /** + * Minute of the object. + */ + 'minute': string; + /** + * Month of the object. + */ + 'month': string; + /** + * Second of the object. + */ + 'second': string; + + static readonly discriminator: string | undefined = undefined; + + static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ + { + "name": "day_of_month", + "baseName": "day_of_month", + "type": "string", + "format": "" + }, + { + "name": "day_of_week", + "baseName": "day_of_week", + "type": "string", + "format": "" + }, + { + "name": "hour", + "baseName": "hour", + "type": "string", + "format": "" + }, + { + "name": "minute", + "baseName": "minute", + "type": "string", + "format": "" + }, + { + "name": "month", + "baseName": "month", + "type": "string", + "format": "" + }, + { + "name": "second", + "baseName": "second", + "type": "string", + "format": "" + } ]; + + static getAttributeTypeMap() { + return CronExpression.attributeTypeMap; + } + + public constructor() { + } +} + diff --git a/sdks/typescript/models/CronExpressionInput.ts b/sdks/typescript/models/CronExpressionInput.ts new file mode 100644 index 000000000..82d1df791 --- /dev/null +++ b/sdks/typescript/models/CronExpressionInput.ts @@ -0,0 +1,91 @@ +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { HttpFile } from '../http/http'; + +/** +* Schedule selected cron expression. +*/ +export class CronExpressionInput { + /** + * Day of month of the object. + */ + 'day_of_month': string; + /** + * Day of Week of the object. + */ + 'day_of_week': string; + /** + * Hour of the object. + */ + 'hour': string; + /** + * Minute of the object. + */ + 'minute': string; + /** + * Month of the object. + */ + 'month': string; + /** + * Second of the object. + */ + 'second': string; + + static readonly discriminator: string | undefined = undefined; + + static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ + { + "name": "day_of_month", + "baseName": "day_of_month", + "type": "string", + "format": "" + }, + { + "name": "day_of_week", + "baseName": "day_of_week", + "type": "string", + "format": "" + }, + { + "name": "hour", + "baseName": "hour", + "type": "string", + "format": "" + }, + { + "name": "minute", + "baseName": "minute", + "type": "string", + "format": "" + }, + { + "name": "month", + "baseName": "month", + "type": "string", + "format": "" + }, + { + "name": "second", + "baseName": "second", + "type": "string", + "format": "" + } ]; + + static getAttributeTypeMap() { + return CronExpressionInput.attributeTypeMap; + } + + public constructor() { + } +} + diff --git a/sdks/typescript/models/CspSettings.ts b/sdks/typescript/models/CspSettings.ts new file mode 100644 index 000000000..8a1e7b366 --- /dev/null +++ b/sdks/typescript/models/CspSettings.ts @@ -0,0 +1,99 @@ +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { ScriptSrcUrls } from '../models/ScriptSrcUrls'; +import { HttpFile } from '../http/http'; + +/** +* CSP (Content Security Policy) settings. +*/ +export class CspSettings { + /** + * Allowed URLs for connect-src directive. + */ + 'connect_src_urls'?: Array | null; + /** + * Allowed URLs for font-src directive. + */ + 'font_src_urls'?: Array | null; + /** + * Allowed hosts for visual embed (frame-ancestors directive). + */ + 'visual_embed_hosts'?: Array | null; + /** + * Allowed URLs for frame-src directive. + */ + 'iframe_src_urls'?: Array | null; + /** + * Allowed URLs for img-src directive. + */ + 'img_src_urls'?: Array | null; + 'script_src_urls'?: ScriptSrcUrls; + /** + * Allowed URLs for style-src directive. + */ + 'style_src_urls'?: Array | null; + + static readonly discriminator: string | undefined = undefined; + + static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ + { + "name": "connect_src_urls", + "baseName": "connect_src_urls", + "type": "Array", + "format": "" + }, + { + "name": "font_src_urls", + "baseName": "font_src_urls", + "type": "Array", + "format": "" + }, + { + "name": "visual_embed_hosts", + "baseName": "visual_embed_hosts", + "type": "Array", + "format": "" + }, + { + "name": "iframe_src_urls", + "baseName": "iframe_src_urls", + "type": "Array", + "format": "" + }, + { + "name": "img_src_urls", + "baseName": "img_src_urls", + "type": "Array", + "format": "" + }, + { + "name": "script_src_urls", + "baseName": "script_src_urls", + "type": "ScriptSrcUrls", + "format": "" + }, + { + "name": "style_src_urls", + "baseName": "style_src_urls", + "type": "Array", + "format": "" + } ]; + + static getAttributeTypeMap() { + return CspSettings.attributeTypeMap; + } + + public constructor() { + } +} + diff --git a/sdks/typescript/models/CspSettingsInput.ts b/sdks/typescript/models/CspSettingsInput.ts new file mode 100644 index 000000000..3834567b9 --- /dev/null +++ b/sdks/typescript/models/CspSettingsInput.ts @@ -0,0 +1,99 @@ +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { ScriptSrcUrlsInput } from '../models/ScriptSrcUrlsInput'; +import { HttpFile } from '../http/http'; + +/** +* Input for CSP (Content Security Policy) settings. +*/ +export class CspSettingsInput { + /** + * Allowed URLs for connect-src directive. + */ + 'connect_src_urls'?: Array | null; + /** + * Allowed URLs for font-src directive. + */ + 'font_src_urls'?: Array | null; + /** + * Allowed hosts for visual embed (frame-ancestors directive). + */ + 'visual_embed_hosts'?: Array | null; + /** + * Allowed URLs for frame-src directive. + */ + 'iframe_src_urls'?: Array | null; + /** + * Allowed URLs for img-src directive. + */ + 'img_src_urls'?: Array | null; + 'script_src_urls'?: ScriptSrcUrlsInput; + /** + * Allowed URLs for style-src directive. + */ + 'style_src_urls'?: Array | null; + + static readonly discriminator: string | undefined = undefined; + + static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ + { + "name": "connect_src_urls", + "baseName": "connect_src_urls", + "type": "Array", + "format": "" + }, + { + "name": "font_src_urls", + "baseName": "font_src_urls", + "type": "Array", + "format": "" + }, + { + "name": "visual_embed_hosts", + "baseName": "visual_embed_hosts", + "type": "Array", + "format": "" + }, + { + "name": "iframe_src_urls", + "baseName": "iframe_src_urls", + "type": "Array", + "format": "" + }, + { + "name": "img_src_urls", + "baseName": "img_src_urls", + "type": "Array", + "format": "" + }, + { + "name": "script_src_urls", + "baseName": "script_src_urls", + "type": "ScriptSrcUrlsInput", + "format": "" + }, + { + "name": "style_src_urls", + "baseName": "style_src_urls", + "type": "Array", + "format": "" + } ]; + + static getAttributeTypeMap() { + return CspSettingsInput.attributeTypeMap; + } + + public constructor() { + } +} + diff --git a/sdks/typescript/models/CustomActionMetadataTypeInput.ts b/sdks/typescript/models/CustomActionMetadataTypeInput.ts new file mode 100644 index 000000000..f57c97c07 --- /dev/null +++ b/sdks/typescript/models/CustomActionMetadataTypeInput.ts @@ -0,0 +1,54 @@ +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { HttpFile } from '../http/http'; + +/** +* MetadataType InputType used in Custom Action API\'s +*/ +export class CustomActionMetadataTypeInput { + /** + * Type of metadata object. Required if the name of the object is set as the identifier. This attribute is optional when the object GUID is specified as the identifier. + */ + 'type'?: CustomActionMetadataTypeInputTypeEnum | null; + /** + * Unique ID or name of the metadata object. + */ + 'identifier': string; + + static readonly discriminator: string | undefined = undefined; + + static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ + { + "name": "type", + "baseName": "type", + "type": "CustomActionMetadataTypeInputTypeEnum", + "format": "" + }, + { + "name": "identifier", + "baseName": "identifier", + "type": "string", + "format": "" + } ]; + + static getAttributeTypeMap() { + return CustomActionMetadataTypeInput.attributeTypeMap; + } + + public constructor() { + } +} + + +export type CustomActionMetadataTypeInputTypeEnum = "VISUALIZATION" | "ANSWER" | "WORKSHEET" ; + diff --git a/sdks/typescript/models/DataSource.ts b/sdks/typescript/models/DataSource.ts new file mode 100644 index 000000000..9b5b27132 --- /dev/null +++ b/sdks/typescript/models/DataSource.ts @@ -0,0 +1,56 @@ +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { EntityHeader } from '../models/EntityHeader'; +import { HttpFile } from '../http/http'; + +export class DataSource { + /** + * Confidence score for the data source suggestion. + */ + 'confidence'?: number | null; + 'details'?: EntityHeader; + /** + * LLM reasoning for the data source. + */ + 'reasoning'?: string | null; + + static readonly discriminator: string | undefined = undefined; + + static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ + { + "name": "confidence", + "baseName": "confidence", + "type": "number", + "format": "float" + }, + { + "name": "details", + "baseName": "details", + "type": "EntityHeader", + "format": "" + }, + { + "name": "reasoning", + "baseName": "reasoning", + "type": "string", + "format": "" + } ]; + + static getAttributeTypeMap() { + return DataSource.attributeTypeMap; + } + + public constructor() { + } +} + diff --git a/sdks/typescript/models/DataSourceContextInput.ts b/sdks/typescript/models/DataSourceContextInput.ts new file mode 100644 index 000000000..8297189df --- /dev/null +++ b/sdks/typescript/models/DataSourceContextInput.ts @@ -0,0 +1,58 @@ +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { HttpFile } from '../http/http'; + +export class DataSourceContextInput { + /** + * Unique identifier of the data source. Required when context type is DATA_SOURCE and `data_source_identifiers` is not provided. At least one of `data_source_identifier` or `data_source_identifiers` must be supplied for DATA_SOURCE context; omit only when context type is AUTO_MODE. Version: 26.5.0.cl or later + */ + 'data_source_identifier'?: string | null; + /** + * Unique identifiers of data sources for multi-data-source context. Required when context type is DATA_SOURCE and `data_source_identifier` is not provided. Version: 26.5.0.cl or later + */ + 'data_source_identifiers'?: Array | null; + /** + * Deprecated. Use `data_source_identifier` instead. Previously required when neither `data_source_identifier` nor `data_source_identifiers` was provided for DATA_SOURCE context. Version: 26.2.0.cl or later + */ + 'guid'?: string | null; + + static readonly discriminator: string | undefined = undefined; + + static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ + { + "name": "data_source_identifier", + "baseName": "data_source_identifier", + "type": "string", + "format": "" + }, + { + "name": "data_source_identifiers", + "baseName": "data_source_identifiers", + "type": "Array", + "format": "" + }, + { + "name": "guid", + "baseName": "guid", + "type": "string", + "format": "" + } ]; + + static getAttributeTypeMap() { + return DataSourceContextInput.attributeTypeMap; + } + + public constructor() { + } +} + diff --git a/sdks/typescript/models/DataWarehouseObjectInput.ts b/sdks/typescript/models/DataWarehouseObjectInput.ts new file mode 100644 index 000000000..0a6b6d8f1 --- /dev/null +++ b/sdks/typescript/models/DataWarehouseObjectInput.ts @@ -0,0 +1,68 @@ +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { HttpFile } from '../http/http'; + +export class DataWarehouseObjectInput { + /** + * Name of the database. + */ + 'database'?: string | null; + /** + * Name of the schema within the database. + */ + 'schema'?: string | null; + /** + * Name of the table within the schema. + */ + 'table'?: string | null; + /** + * Name of the column within the table. + */ + 'column'?: string | null; + + static readonly discriminator: string | undefined = undefined; + + static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ + { + "name": "database", + "baseName": "database", + "type": "string", + "format": "" + }, + { + "name": "schema", + "baseName": "schema", + "type": "string", + "format": "" + }, + { + "name": "table", + "baseName": "table", + "type": "string", + "format": "" + }, + { + "name": "column", + "baseName": "column", + "type": "string", + "format": "" + } ]; + + static getAttributeTypeMap() { + return DataWarehouseObjectInput.attributeTypeMap; + } + + public constructor() { + } +} + diff --git a/sdks/typescript/models/DataWarehouseObjects.ts b/sdks/typescript/models/DataWarehouseObjects.ts new file mode 100644 index 000000000..8717a5bb5 --- /dev/null +++ b/sdks/typescript/models/DataWarehouseObjects.ts @@ -0,0 +1,39 @@ +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { Database } from '../models/Database'; +import { HttpFile } from '../http/http'; + +export class DataWarehouseObjects { + /** + * Databases of the connection. + */ + 'databases': Array; + + static readonly discriminator: string | undefined = undefined; + + static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ + { + "name": "databases", + "baseName": "databases", + "type": "Array", + "format": "" + } ]; + + static getAttributeTypeMap() { + return DataWarehouseObjects.attributeTypeMap; + } + + public constructor() { + } +} + diff --git a/sdks/typescript/models/Database.ts b/sdks/typescript/models/Database.ts new file mode 100644 index 000000000..47f913d95 --- /dev/null +++ b/sdks/typescript/models/Database.ts @@ -0,0 +1,59 @@ +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { SchemaObject } from '../models/SchemaObject'; +import { HttpFile } from '../http/http'; + +export class Database { + /** + * Name of the database. + */ + 'name': string; + /** + * Schemas of the database. + */ + 'schemas'?: Array | null; + /** + * Determines if the object is auto created. + */ + 'auto_created'?: boolean | null; + + static readonly discriminator: string | undefined = undefined; + + static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ + { + "name": "name", + "baseName": "name", + "type": "string", + "format": "" + }, + { + "name": "schemas", + "baseName": "schemas", + "type": "Array", + "format": "" + }, + { + "name": "auto_created", + "baseName": "auto_created", + "type": "boolean", + "format": "" + } ]; + + static getAttributeTypeMap() { + return Database.attributeTypeMap; + } + + public constructor() { + } +} + diff --git a/sdks/typescript/models/DbtSearchResponse.ts b/sdks/typescript/models/DbtSearchResponse.ts new file mode 100644 index 000000000..7a3cdf10d --- /dev/null +++ b/sdks/typescript/models/DbtSearchResponse.ts @@ -0,0 +1,77 @@ +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { HttpFile } from '../http/http'; + +export class DbtSearchResponse { + 'dbt_connection_identifier'?: string | null; + 'project_name'?: string | null; + 'connection_id'?: string | null; + 'connection_name'?: string | null; + 'cdw_database'?: string | null; + 'import_type'?: string | null; + 'author_name'?: string | null; + + static readonly discriminator: string | undefined = undefined; + + static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ + { + "name": "dbt_connection_identifier", + "baseName": "dbt_connection_identifier", + "type": "string", + "format": "" + }, + { + "name": "project_name", + "baseName": "project_name", + "type": "string", + "format": "" + }, + { + "name": "connection_id", + "baseName": "connection_id", + "type": "string", + "format": "" + }, + { + "name": "connection_name", + "baseName": "connection_name", + "type": "string", + "format": "" + }, + { + "name": "cdw_database", + "baseName": "cdw_database", + "type": "string", + "format": "" + }, + { + "name": "import_type", + "baseName": "import_type", + "type": "string", + "format": "" + }, + { + "name": "author_name", + "baseName": "author_name", + "type": "string", + "format": "" + } ]; + + static getAttributeTypeMap() { + return DbtSearchResponse.attributeTypeMap; + } + + public constructor() { + } +} + diff --git a/sdks/typescript/models/DeactivateUserRequest.ts b/sdks/typescript/models/DeactivateUserRequest.ts new file mode 100644 index 000000000..f4f6547be --- /dev/null +++ b/sdks/typescript/models/DeactivateUserRequest.ts @@ -0,0 +1,48 @@ +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { HttpFile } from '../http/http'; + +export class DeactivateUserRequest { + /** + * Unique ID or name of the user. + */ + 'user_identifier': string; + /** + * Base url of the cluster. + */ + 'base_url': string; + + static readonly discriminator: string | undefined = undefined; + + static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ + { + "name": "user_identifier", + "baseName": "user_identifier", + "type": "string", + "format": "" + }, + { + "name": "base_url", + "baseName": "base_url", + "type": "string", + "format": "" + } ]; + + static getAttributeTypeMap() { + return DeactivateUserRequest.attributeTypeMap; + } + + public constructor() { + } +} + diff --git a/sdks/typescript/models/DefaultActionConfig.ts b/sdks/typescript/models/DefaultActionConfig.ts new file mode 100644 index 000000000..6c9f46f5e --- /dev/null +++ b/sdks/typescript/models/DefaultActionConfig.ts @@ -0,0 +1,41 @@ +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { HttpFile } from '../http/http'; + +/** +* Default Custom action configuration. This includes the custom action\'s visibility across all visualizations and Answers. By default, a custom action is added to all visualizations and Answers. +*/ +export class DefaultActionConfig { + /** + * Custom action is available on all visualizations. Earlier , the naming convention: LOCAL/GLOBAL. TRUE signifies GLOBAL for backward compatibility. + */ + 'visibility'?: boolean | null; + + static readonly discriminator: string | undefined = undefined; + + static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ + { + "name": "visibility", + "baseName": "visibility", + "type": "boolean", + "format": "" + } ]; + + static getAttributeTypeMap() { + return DefaultActionConfig.attributeTypeMap; + } + + public constructor() { + } +} + diff --git a/sdks/typescript/models/DefaultActionConfigInput.ts b/sdks/typescript/models/DefaultActionConfigInput.ts new file mode 100644 index 000000000..7cfa6edd5 --- /dev/null +++ b/sdks/typescript/models/DefaultActionConfigInput.ts @@ -0,0 +1,41 @@ +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { HttpFile } from '../http/http'; + +/** +* Default Custom action configuration. This includes the custom action\'s visibility across all visualizations and Answers. By default, a custom action is added to all visualizations and Answers. +*/ +export class DefaultActionConfigInput { + /** + * Custom action is available on all visualizations. Earlier naming convention: LOCAL/GLOBAL. TRUE signifies GLOBAL for backward compatibility. + */ + 'visibility'?: boolean | null; + + static readonly discriminator: string | undefined = undefined; + + static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ + { + "name": "visibility", + "baseName": "visibility", + "type": "boolean", + "format": "" + } ]; + + static getAttributeTypeMap() { + return DefaultActionConfigInput.attributeTypeMap; + } + + public constructor() { + } +} + diff --git a/sdks/typescript/models/DefaultActionConfigInputCreate.ts b/sdks/typescript/models/DefaultActionConfigInputCreate.ts new file mode 100644 index 000000000..7a7e8692b --- /dev/null +++ b/sdks/typescript/models/DefaultActionConfigInputCreate.ts @@ -0,0 +1,41 @@ +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { HttpFile } from '../http/http'; + +/** +* Default Custom action configuration. This includes the custom action\'s visibility across all visualizations and Answers. By default, a custom action is added to all visualizations and Answers. +*/ +export class DefaultActionConfigInputCreate { + /** + * Custom action is available on all visualizations. Earlier naming convention: LOCAL/GLOBAL. TRUE signifies GLOBAL for backward compatibility. Default: true + */ + 'visibility'?: boolean | null; + + static readonly discriminator: string | undefined = undefined; + + static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ + { + "name": "visibility", + "baseName": "visibility", + "type": "boolean", + "format": "" + } ]; + + static getAttributeTypeMap() { + return DefaultActionConfigInputCreate.attributeTypeMap; + } + + public constructor() { + } +} + diff --git a/sdks/typescript/models/DefaultActionConfigSearchInput.ts b/sdks/typescript/models/DefaultActionConfigSearchInput.ts new file mode 100644 index 000000000..65fc05060 --- /dev/null +++ b/sdks/typescript/models/DefaultActionConfigSearchInput.ts @@ -0,0 +1,41 @@ +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { HttpFile } from '../http/http'; + +/** +* Default Custom action configuration. This includes the custom action\'s visibility across all visualizations and Answers. By default, a custom action is added to all visualizations and Answers. +*/ +export class DefaultActionConfigSearchInput { + /** + * Custom action is available on all visualizations. Earlier naming convention: LOCAL/GLOBAL. TRUE signifies GLOBAL for backward compatibility. + */ + 'visibility'?: boolean | null; + + static readonly discriminator: string | undefined = undefined; + + static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ + { + "name": "visibility", + "baseName": "visibility", + "type": "boolean", + "format": "" + } ]; + + static getAttributeTypeMap() { + return DefaultActionConfigSearchInput.attributeTypeMap; + } + + public constructor() { + } +} + diff --git a/sdks/typescript/models/DeleteCollectionRequest.ts b/sdks/typescript/models/DeleteCollectionRequest.ts new file mode 100644 index 000000000..a031016ed --- /dev/null +++ b/sdks/typescript/models/DeleteCollectionRequest.ts @@ -0,0 +1,58 @@ +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { HttpFile } from '../http/http'; + +export class DeleteCollectionRequest { + /** + * Unique GUIDs of collections to delete. Note: Collection names cannot be used as identifiers since duplicate names are allowed. + */ + 'collection_identifiers': Array; + /** + * Flag to delete child objects of the collection that the user has access to. + */ + 'delete_children'?: boolean | null; + /** + * Preview deletion without actually deleting. When set to true, returns what would be deleted without performing the actual deletion. + */ + 'dry_run'?: boolean | null; + + static readonly discriminator: string | undefined = undefined; + + static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ + { + "name": "collection_identifiers", + "baseName": "collection_identifiers", + "type": "Array", + "format": "" + }, + { + "name": "delete_children", + "baseName": "delete_children", + "type": "boolean", + "format": "" + }, + { + "name": "dry_run", + "baseName": "dry_run", + "type": "boolean", + "format": "" + } ]; + + static getAttributeTypeMap() { + return DeleteCollectionRequest.attributeTypeMap; + } + + public constructor() { + } +} + diff --git a/sdks/typescript/models/DeleteConfigRequest.ts b/sdks/typescript/models/DeleteConfigRequest.ts new file mode 100644 index 000000000..7abdc0a35 --- /dev/null +++ b/sdks/typescript/models/DeleteConfigRequest.ts @@ -0,0 +1,38 @@ +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { HttpFile } from '../http/http'; + +export class DeleteConfigRequest { + /** + * Applicable when Orgs is enabled in the cluster Indicator to consider cluster level or org level config. Set it to false to delete configuration from current org. If set to true, then the configuration at cluster level and orgs that inherited the configuration from cluster level will be deleted. Version: 9.5.0.cl or later + */ + 'cluster_level'?: boolean | null; + + static readonly discriminator: string | undefined = undefined; + + static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ + { + "name": "cluster_level", + "baseName": "cluster_level", + "type": "boolean", + "format": "" + } ]; + + static getAttributeTypeMap() { + return DeleteConfigRequest.attributeTypeMap; + } + + public constructor() { + } +} + diff --git a/sdks/typescript/models/DeleteConnectionConfigurationRequest.ts b/sdks/typescript/models/DeleteConnectionConfigurationRequest.ts new file mode 100644 index 000000000..dcf561337 --- /dev/null +++ b/sdks/typescript/models/DeleteConnectionConfigurationRequest.ts @@ -0,0 +1,48 @@ +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { HttpFile } from '../http/http'; + +export class DeleteConnectionConfigurationRequest { + /** + * Unique ID or name of the configuration. + */ + 'configuration_identifier': string; + /** + * Unique ID or name of the connection. + */ + 'connection_identifier': string; + + static readonly discriminator: string | undefined = undefined; + + static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ + { + "name": "configuration_identifier", + "baseName": "configuration_identifier", + "type": "string", + "format": "" + }, + { + "name": "connection_identifier", + "baseName": "connection_identifier", + "type": "string", + "format": "" + } ]; + + static getAttributeTypeMap() { + return DeleteConnectionConfigurationRequest.attributeTypeMap; + } + + public constructor() { + } +} + diff --git a/sdks/typescript/models/DeleteConnectionRequest.ts b/sdks/typescript/models/DeleteConnectionRequest.ts new file mode 100644 index 000000000..e80aad115 --- /dev/null +++ b/sdks/typescript/models/DeleteConnectionRequest.ts @@ -0,0 +1,38 @@ +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { HttpFile } from '../http/http'; + +export class DeleteConnectionRequest { + /** + * Unique ID or name of the connection. + */ + 'connection_identifier': string; + + static readonly discriminator: string | undefined = undefined; + + static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ + { + "name": "connection_identifier", + "baseName": "connection_identifier", + "type": "string", + "format": "" + } ]; + + static getAttributeTypeMap() { + return DeleteConnectionRequest.attributeTypeMap; + } + + public constructor() { + } +} + diff --git a/sdks/typescript/models/DeleteMetadataRequest.ts b/sdks/typescript/models/DeleteMetadataRequest.ts new file mode 100644 index 000000000..2021fe92b --- /dev/null +++ b/sdks/typescript/models/DeleteMetadataRequest.ts @@ -0,0 +1,49 @@ +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { DeleteMetadataTypeInput } from '../models/DeleteMetadataTypeInput'; +import { HttpFile } from '../http/http'; + +export class DeleteMetadataRequest { + /** + * Metadata objects. + */ + 'metadata': Array; + /** + * Indicates whether to delete disabled metadata objects. + */ + 'delete_disabled_objects'?: boolean | null; + + static readonly discriminator: string | undefined = undefined; + + static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ + { + "name": "metadata", + "baseName": "metadata", + "type": "Array", + "format": "" + }, + { + "name": "delete_disabled_objects", + "baseName": "delete_disabled_objects", + "type": "boolean", + "format": "" + } ]; + + static getAttributeTypeMap() { + return DeleteMetadataRequest.attributeTypeMap; + } + + public constructor() { + } +} + diff --git a/sdks/typescript/models/DeleteMetadataTypeInput.ts b/sdks/typescript/models/DeleteMetadataTypeInput.ts new file mode 100644 index 000000000..e59584bcb --- /dev/null +++ b/sdks/typescript/models/DeleteMetadataTypeInput.ts @@ -0,0 +1,54 @@ +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { HttpFile } from '../http/http'; + +/** +* MetadataType InputType used in Delete MetadataType API +*/ +export class DeleteMetadataTypeInput { + /** + * Type of metadata. Required if the name of the object is set as the identifier. This attribute is optional when the object GUID is specified as the identifier. + */ + 'type'?: DeleteMetadataTypeInputTypeEnum | null; + /** + * Unique ID or name of the metadata object. + */ + 'identifier': string; + + static readonly discriminator: string | undefined = undefined; + + static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ + { + "name": "type", + "baseName": "type", + "type": "DeleteMetadataTypeInputTypeEnum", + "format": "" + }, + { + "name": "identifier", + "baseName": "identifier", + "type": "string", + "format": "" + } ]; + + static getAttributeTypeMap() { + return DeleteMetadataTypeInput.attributeTypeMap; + } + + public constructor() { + } +} + + +export type DeleteMetadataTypeInputTypeEnum = "LIVEBOARD" | "ANSWER" | "LOGICAL_TABLE" | "LOGICAL_COLUMN" | "LOGICAL_RELATIONSHIP" ; + diff --git a/sdks/typescript/models/DeleteOrgEmailCustomizationRequest.ts b/sdks/typescript/models/DeleteOrgEmailCustomizationRequest.ts new file mode 100644 index 000000000..9f0ede673 --- /dev/null +++ b/sdks/typescript/models/DeleteOrgEmailCustomizationRequest.ts @@ -0,0 +1,38 @@ +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { HttpFile } from '../http/http'; + +export class DeleteOrgEmailCustomizationRequest { + /** + * Unique identifier of the organization. + */ + 'org_identifiers'?: Array; + + static readonly discriminator: string | undefined = undefined; + + static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ + { + "name": "org_identifiers", + "baseName": "org_identifiers", + "type": "Array", + "format": "" + } ]; + + static getAttributeTypeMap() { + return DeleteOrgEmailCustomizationRequest.attributeTypeMap; + } + + public constructor() { + } +} + diff --git a/sdks/typescript/models/DeleteVariablesRequest.ts b/sdks/typescript/models/DeleteVariablesRequest.ts new file mode 100644 index 000000000..762e6f66f --- /dev/null +++ b/sdks/typescript/models/DeleteVariablesRequest.ts @@ -0,0 +1,38 @@ +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { HttpFile } from '../http/http'; + +export class DeleteVariablesRequest { + /** + * Unique id(s) or name(s) of the variable(s) to delete + */ + 'identifiers': Array; + + static readonly discriminator: string | undefined = undefined; + + static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ + { + "name": "identifiers", + "baseName": "identifiers", + "type": "Array", + "format": "" + } ]; + + static getAttributeTypeMap() { + return DeleteVariablesRequest.attributeTypeMap; + } + + public constructor() { + } +} + diff --git a/sdks/typescript/models/DeleteWebhookConfigurationsRequest.ts b/sdks/typescript/models/DeleteWebhookConfigurationsRequest.ts new file mode 100644 index 000000000..c52b89608 --- /dev/null +++ b/sdks/typescript/models/DeleteWebhookConfigurationsRequest.ts @@ -0,0 +1,38 @@ +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { HttpFile } from '../http/http'; + +export class DeleteWebhookConfigurationsRequest { + /** + * List of webhook identifiers to delete. + */ + 'webhook_identifiers': Array; + + static readonly discriminator: string | undefined = undefined; + + static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ + { + "name": "webhook_identifiers", + "baseName": "webhook_identifiers", + "type": "Array", + "format": "" + } ]; + + static getAttributeTypeMap() { + return DeleteWebhookConfigurationsRequest.attributeTypeMap; + } + + public constructor() { + } +} + diff --git a/sdks/typescript/models/DeployCommitRequest.ts b/sdks/typescript/models/DeployCommitRequest.ts new file mode 100644 index 000000000..a22969148 --- /dev/null +++ b/sdks/typescript/models/DeployCommitRequest.ts @@ -0,0 +1,72 @@ +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { HttpFile } from '../http/http'; + +export class DeployCommitRequest { + /** + * Commit_id against which the files should be picked to deploy. Note: If no commit_id is specified, then the head of the branch is considered. + */ + 'commit_id'?: string; + /** + * Name of the remote branch where changes should be picked + */ + 'branch_name': string; + /** + * Indicates if all files or only modified file at specified commit point should be considered + */ + 'deploy_type'?: DeployCommitRequestDeployTypeEnum; + /** + * Define the policy to follow while importing TML in the ThoughtSpot environment. Use “ALL_OR_NONE” to cancel the deployment of all ThoughtSpot objects if at least one of them fails to import. Use “Partial” to import ThoughtSpot objects that validate successfully even if other objects in the same deploy operations fail to import. + */ + 'deploy_policy'?: DeployCommitRequestDeployPolicyEnum; + + static readonly discriminator: string | undefined = undefined; + + static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ + { + "name": "commit_id", + "baseName": "commit_id", + "type": "string", + "format": "" + }, + { + "name": "branch_name", + "baseName": "branch_name", + "type": "string", + "format": "" + }, + { + "name": "deploy_type", + "baseName": "deploy_type", + "type": "DeployCommitRequestDeployTypeEnum", + "format": "" + }, + { + "name": "deploy_policy", + "baseName": "deploy_policy", + "type": "DeployCommitRequestDeployPolicyEnum", + "format": "" + } ]; + + static getAttributeTypeMap() { + return DeployCommitRequest.attributeTypeMap; + } + + public constructor() { + } +} + + +export type DeployCommitRequestDeployTypeEnum = "FULL" | "DELTA" ; +export type DeployCommitRequestDeployPolicyEnum = "ALL_OR_NONE" | "PARTIAL" | "VALIDATE_ONLY" ; + diff --git a/sdks/typescript/models/DeployResponse.ts b/sdks/typescript/models/DeployResponse.ts new file mode 100644 index 000000000..924daeae7 --- /dev/null +++ b/sdks/typescript/models/DeployResponse.ts @@ -0,0 +1,78 @@ +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { HttpFile } from '../http/http'; + +export class DeployResponse { + /** + * Name of the file deployed + */ + 'file_name'?: string | null; + /** + * Name of the metadata object + */ + 'metadata_name'?: string | null; + /** + * Type of the metadata object + */ + 'metadata_type'?: string | null; + /** + * Indicates the status of deployment for the file + */ + 'status_code'?: string | null; + /** + * Any error or warning with the deployment + */ + 'status_message'?: string | null; + + static readonly discriminator: string | undefined = undefined; + + static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ + { + "name": "file_name", + "baseName": "file_name", + "type": "string", + "format": "" + }, + { + "name": "metadata_name", + "baseName": "metadata_name", + "type": "string", + "format": "" + }, + { + "name": "metadata_type", + "baseName": "metadata_type", + "type": "string", + "format": "" + }, + { + "name": "status_code", + "baseName": "status_code", + "type": "string", + "format": "" + }, + { + "name": "status_message", + "baseName": "status_message", + "type": "string", + "format": "" + } ]; + + static getAttributeTypeMap() { + return DeployResponse.attributeTypeMap; + } + + public constructor() { + } +} + diff --git a/sdks/typescript/models/EntityHeader.ts b/sdks/typescript/models/EntityHeader.ts new file mode 100644 index 000000000..b039dea46 --- /dev/null +++ b/sdks/typescript/models/EntityHeader.ts @@ -0,0 +1,58 @@ +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { HttpFile } from '../http/http'; + +export class EntityHeader { + /** + * Description of the data source. + */ + 'description'?: string | null; + /** + * Display name of the data source. + */ + 'data_source_name'?: string | null; + /** + * Unique identifier of the data source. + */ + 'data_source_identifier'?: string | null; + + static readonly discriminator: string | undefined = undefined; + + static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ + { + "name": "description", + "baseName": "description", + "type": "string", + "format": "" + }, + { + "name": "data_source_name", + "baseName": "data_source_name", + "type": "string", + "format": "" + }, + { + "name": "data_source_identifier", + "baseName": "data_source_identifier", + "type": "string", + "format": "" + } ]; + + static getAttributeTypeMap() { + return EntityHeader.attributeTypeMap; + } + + public constructor() { + } +} + diff --git a/sdks/typescript/models/ErrorResponse.ts b/sdks/typescript/models/ErrorResponse.ts new file mode 100644 index 000000000..585052cda --- /dev/null +++ b/sdks/typescript/models/ErrorResponse.ts @@ -0,0 +1,35 @@ +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { HttpFile } from '../http/http'; + +export class ErrorResponse { + 'error'?: any | null; + + static readonly discriminator: string | undefined = undefined; + + static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ + { + "name": "error", + "baseName": "error", + "type": "any", + "format": "" + } ]; + + static getAttributeTypeMap() { + return ErrorResponse.attributeTypeMap; + } + + public constructor() { + } +} + diff --git a/sdks/typescript/models/EurekaDataSourceSuggestionResponse.ts b/sdks/typescript/models/EurekaDataSourceSuggestionResponse.ts new file mode 100644 index 000000000..43b4c42f4 --- /dev/null +++ b/sdks/typescript/models/EurekaDataSourceSuggestionResponse.ts @@ -0,0 +1,39 @@ +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { DataSource } from '../models/DataSource'; +import { HttpFile } from '../http/http'; + +export class EurekaDataSourceSuggestionResponse { + /** + * List of data sources suggested. + */ + 'data_sources'?: Array | null; + + static readonly discriminator: string | undefined = undefined; + + static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ + { + "name": "data_sources", + "baseName": "data_sources", + "type": "Array", + "format": "" + } ]; + + static getAttributeTypeMap() { + return EurekaDataSourceSuggestionResponse.attributeTypeMap; + } + + public constructor() { + } +} + diff --git a/sdks/typescript/models/EurekaDecomposeQueryResponse.ts b/sdks/typescript/models/EurekaDecomposeQueryResponse.ts new file mode 100644 index 000000000..a39fe427d --- /dev/null +++ b/sdks/typescript/models/EurekaDecomposeQueryResponse.ts @@ -0,0 +1,36 @@ +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { EurekaLLMDecomposeQueryResponse } from '../models/EurekaLLMDecomposeQueryResponse'; +import { HttpFile } from '../http/http'; + +export class EurekaDecomposeQueryResponse { + 'decomposedQueryResponse'?: EurekaLLMDecomposeQueryResponse; + + static readonly discriminator: string | undefined = undefined; + + static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ + { + "name": "decomposedQueryResponse", + "baseName": "decomposedQueryResponse", + "type": "EurekaLLMDecomposeQueryResponse", + "format": "" + } ]; + + static getAttributeTypeMap() { + return EurekaDecomposeQueryResponse.attributeTypeMap; + } + + public constructor() { + } +} + diff --git a/sdks/typescript/models/EurekaGetNLInstructionsResponse.ts b/sdks/typescript/models/EurekaGetNLInstructionsResponse.ts new file mode 100644 index 000000000..ed3e5d62d --- /dev/null +++ b/sdks/typescript/models/EurekaGetNLInstructionsResponse.ts @@ -0,0 +1,39 @@ +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { NLInstructionsInfo } from '../models/NLInstructionsInfo'; +import { HttpFile } from '../http/http'; + +export class EurekaGetNLInstructionsResponse { + /** + * List of NL instructions with their scopes. + */ + 'nl_instructions_info': Array; + + static readonly discriminator: string | undefined = undefined; + + static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ + { + "name": "nl_instructions_info", + "baseName": "nl_instructions_info", + "type": "Array", + "format": "" + } ]; + + static getAttributeTypeMap() { + return EurekaGetNLInstructionsResponse.attributeTypeMap; + } + + public constructor() { + } +} + diff --git a/sdks/typescript/models/EurekaGetRelevantQuestionsResponse.ts b/sdks/typescript/models/EurekaGetRelevantQuestionsResponse.ts new file mode 100644 index 000000000..95f6a5bf9 --- /dev/null +++ b/sdks/typescript/models/EurekaGetRelevantQuestionsResponse.ts @@ -0,0 +1,39 @@ +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { EurekaRelevantQuestion } from '../models/EurekaRelevantQuestion'; +import { HttpFile } from '../http/http'; + +export class EurekaGetRelevantQuestionsResponse { + /** + * List of relevant questions that can be run on their respective data sources. + */ + 'relevant_questions'?: Array | null; + + static readonly discriminator: string | undefined = undefined; + + static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ + { + "name": "relevant_questions", + "baseName": "relevant_questions", + "type": "Array", + "format": "" + } ]; + + static getAttributeTypeMap() { + return EurekaGetRelevantQuestionsResponse.attributeTypeMap; + } + + public constructor() { + } +} + diff --git a/sdks/typescript/models/EurekaLLMDecomposeQueryResponse.ts b/sdks/typescript/models/EurekaLLMDecomposeQueryResponse.ts new file mode 100644 index 000000000..d9ed16b77 --- /dev/null +++ b/sdks/typescript/models/EurekaLLMDecomposeQueryResponse.ts @@ -0,0 +1,39 @@ +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { EurekaLLMSuggestedQuery } from '../models/EurekaLLMSuggestedQuery'; +import { HttpFile } from '../http/http'; + +export class EurekaLLMDecomposeQueryResponse { + /** + * List of analytical questions that can be run on their respective worksheet/data sources. + */ + 'decomposedQueries'?: Array | null; + + static readonly discriminator: string | undefined = undefined; + + static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ + { + "name": "decomposedQueries", + "baseName": "decomposedQueries", + "type": "Array", + "format": "" + } ]; + + static getAttributeTypeMap() { + return EurekaLLMDecomposeQueryResponse.attributeTypeMap; + } + + public constructor() { + } +} + diff --git a/sdks/typescript/models/EurekaLLMSuggestedQuery.ts b/sdks/typescript/models/EurekaLLMSuggestedQuery.ts new file mode 100644 index 000000000..8655ccac4 --- /dev/null +++ b/sdks/typescript/models/EurekaLLMSuggestedQuery.ts @@ -0,0 +1,58 @@ +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { HttpFile } from '../http/http'; + +export class EurekaLLMSuggestedQuery { + /** + * NL query that can be run using spotter aka natural language search to get an AI generated answer. + */ + 'query'?: string | null; + /** + * Unique identifier of the worksheet on which this query can be run on. + */ + 'worksheetId'?: string | null; + /** + * Display name of the worksheet on which this query can be run on. + */ + 'worksheetName'?: string | null; + + static readonly discriminator: string | undefined = undefined; + + static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ + { + "name": "query", + "baseName": "query", + "type": "string", + "format": "" + }, + { + "name": "worksheetId", + "baseName": "worksheetId", + "type": "string", + "format": "" + }, + { + "name": "worksheetName", + "baseName": "worksheetName", + "type": "string", + "format": "" + } ]; + + static getAttributeTypeMap() { + return EurekaLLMSuggestedQuery.attributeTypeMap; + } + + public constructor() { + } +} + diff --git a/sdks/typescript/models/EurekaRelevantQuestion.ts b/sdks/typescript/models/EurekaRelevantQuestion.ts new file mode 100644 index 000000000..5ae7807b9 --- /dev/null +++ b/sdks/typescript/models/EurekaRelevantQuestion.ts @@ -0,0 +1,58 @@ +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { HttpFile } from '../http/http'; + +export class EurekaRelevantQuestion { + /** + * NL query that can be run using spotter aka natural language search to get an AI generated answer. + */ + 'query'?: string | null; + /** + * Unique identifier of the data source on which this query can be run on. + */ + 'data_source_identifier'?: string | null; + /** + * Display name of the data source on which this query can be run on. + */ + 'data_source_name'?: string | null; + + static readonly discriminator: string | undefined = undefined; + + static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ + { + "name": "query", + "baseName": "query", + "type": "string", + "format": "" + }, + { + "name": "data_source_identifier", + "baseName": "data_source_identifier", + "type": "string", + "format": "" + }, + { + "name": "data_source_name", + "baseName": "data_source_name", + "type": "string", + "format": "" + } ]; + + static getAttributeTypeMap() { + return EurekaRelevantQuestion.attributeTypeMap; + } + + public constructor() { + } +} + diff --git a/sdks/typescript/models/EurekaSetNLInstructionsResponse.ts b/sdks/typescript/models/EurekaSetNLInstructionsResponse.ts new file mode 100644 index 000000000..3e5f1e7d8 --- /dev/null +++ b/sdks/typescript/models/EurekaSetNLInstructionsResponse.ts @@ -0,0 +1,38 @@ +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { HttpFile } from '../http/http'; + +export class EurekaSetNLInstructionsResponse { + /** + * Success status of the operation. + */ + 'success': boolean; + + static readonly discriminator: string | undefined = undefined; + + static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ + { + "name": "success", + "baseName": "success", + "type": "boolean", + "format": "" + } ]; + + static getAttributeTypeMap() { + return EurekaSetNLInstructionsResponse.attributeTypeMap; + } + + public constructor() { + } +} + diff --git a/sdks/typescript/models/EventChannelConfig.ts b/sdks/typescript/models/EventChannelConfig.ts new file mode 100644 index 000000000..ea9264537 --- /dev/null +++ b/sdks/typescript/models/EventChannelConfig.ts @@ -0,0 +1,52 @@ +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { HttpFile } from '../http/http'; + +export class EventChannelConfig { + /** + * Type of event for which communication channels are configured + */ + 'event_type': EventChannelConfigEventTypeEnum; + /** + * Communication channels enabled for this event type. Empty array indicates no channels are enabled. + */ + 'channels': Array; + + static readonly discriminator: string | undefined = undefined; + + static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ + { + "name": "event_type", + "baseName": "event_type", + "type": "EventChannelConfigEventTypeEnum", + "format": "" + }, + { + "name": "channels", + "baseName": "channels", + "type": "Array", + "format": "" + } ]; + + static getAttributeTypeMap() { + return EventChannelConfig.attributeTypeMap; + } + + public constructor() { + } +} + + +export type EventChannelConfigEventTypeEnum = "LIVEBOARD_SCHEDULE" ; +export type EventChannelConfigChannelsEnum = "EMAIL" | "WEBHOOK" ; + diff --git a/sdks/typescript/models/EventChannelConfigInput.ts b/sdks/typescript/models/EventChannelConfigInput.ts new file mode 100644 index 000000000..16da8be4e --- /dev/null +++ b/sdks/typescript/models/EventChannelConfigInput.ts @@ -0,0 +1,52 @@ +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { HttpFile } from '../http/http'; + +export class EventChannelConfigInput { + /** + * Type of event for which communication channels are configured + */ + 'event_type': EventChannelConfigInputEventTypeEnum; + /** + * Communication channels enabled for this event type. Empty array disables all channels for this event. + */ + 'channels': Array; + + static readonly discriminator: string | undefined = undefined; + + static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ + { + "name": "event_type", + "baseName": "event_type", + "type": "EventChannelConfigInputEventTypeEnum", + "format": "" + }, + { + "name": "channels", + "baseName": "channels", + "type": "Array", + "format": "" + } ]; + + static getAttributeTypeMap() { + return EventChannelConfigInput.attributeTypeMap; + } + + public constructor() { + } +} + + +export type EventChannelConfigInputEventTypeEnum = "LIVEBOARD_SCHEDULE" ; +export type EventChannelConfigInputChannelsEnum = "EMAIL" | "WEBHOOK" ; + diff --git a/sdks/typescript/models/ExcludeMetadataListItemInput.ts b/sdks/typescript/models/ExcludeMetadataListItemInput.ts new file mode 100644 index 000000000..b0a14786e --- /dev/null +++ b/sdks/typescript/models/ExcludeMetadataListItemInput.ts @@ -0,0 +1,51 @@ +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { HttpFile } from '../http/http'; + +export class ExcludeMetadataListItemInput { + /** + * Unique ID or name of the metadata. + */ + 'identifier': string; + /** + * Type of metadata. Required if the name of the object is set as identifier. This attribute is optional when the object GUID is specified as identifier. 1. Liveboard 2. Answers 3. LOGICAL_TABLE for any data object such as table, worksheet or view 4. LOGICAL_COLUMN for a column of any data object such as table, worksheet or view 5. CONNECTION for connection objects 6. TAG for tag objects 7. USER for user objects 8. USER_GROUP for group objects 9. LOGICAL_RELATIONSHIP for table or worksheet joins. A join combines from one or several data object by using matching values. 10. INSIGHT_SPEC for SpotIQ objects + */ + 'type': ExcludeMetadataListItemInputTypeEnum; + + static readonly discriminator: string | undefined = undefined; + + static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ + { + "name": "identifier", + "baseName": "identifier", + "type": "string", + "format": "" + }, + { + "name": "type", + "baseName": "type", + "type": "ExcludeMetadataListItemInputTypeEnum", + "format": "" + } ]; + + static getAttributeTypeMap() { + return ExcludeMetadataListItemInput.attributeTypeMap; + } + + public constructor() { + } +} + + +export type ExcludeMetadataListItemInputTypeEnum = "LIVEBOARD" | "ANSWER" | "LOGICAL_TABLE" | "LOGICAL_COLUMN" | "CONNECTION" | "TAG" | "USER" | "USER_GROUP" | "LOGICAL_RELATIONSHIP" | "INSIGHT_SPEC" ; + diff --git a/sdks/typescript/models/ExportAnswerReportRequest.ts b/sdks/typescript/models/ExportAnswerReportRequest.ts new file mode 100644 index 000000000..5c9f1186b --- /dev/null +++ b/sdks/typescript/models/ExportAnswerReportRequest.ts @@ -0,0 +1,138 @@ +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { ExportAnswerReportRequestPngOptions } from '../models/ExportAnswerReportRequestPngOptions'; +import { ExportAnswerReportRequestRegionalSettings } from '../models/ExportAnswerReportRequestRegionalSettings'; +import { HttpFile } from '../http/http'; + +export class ExportAnswerReportRequest { + /** + * Unique ID or name of the metadata object. + */ + 'metadata_identifier'?: string; + /** + * Unique ID of the answer session. + */ + 'session_identifier'?: string; + /** + * Generation number of the answer session. + */ + 'generation_number'?: number; + /** + * Export file format. + */ + 'file_format'?: ExportAnswerReportRequestFileFormatEnum; + /** + * JSON string representing runtime filter. { col1:region, op1: EQ, val1: northeast } + */ + 'runtime_filter'?: any; + /** + * JSON string representing runtime sort. { sortCol1: region, asc1 :true, sortCol2 : date } + */ + 'runtime_sort'?: any; + /** + * JSON object for setting values of parameters in runtime. + */ + 'runtime_param_override'?: any; + 'regional_settings'?: ExportAnswerReportRequestRegionalSettings; + 'png_options'?: ExportAnswerReportRequestPngOptions; + /** + * GUID or name of the personalised view of the Answer object. Version: 26.6.0.cl or later + */ + 'personalised_view_identifier'?: string; + /** + * Type of the answer being exported. Version: 26.6.0.cl or later + */ + 'type'?: ExportAnswerReportRequestTypeEnum; + + static readonly discriminator: string | undefined = undefined; + + static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ + { + "name": "metadata_identifier", + "baseName": "metadata_identifier", + "type": "string", + "format": "" + }, + { + "name": "session_identifier", + "baseName": "session_identifier", + "type": "string", + "format": "" + }, + { + "name": "generation_number", + "baseName": "generation_number", + "type": "number", + "format": "int32" + }, + { + "name": "file_format", + "baseName": "file_format", + "type": "ExportAnswerReportRequestFileFormatEnum", + "format": "" + }, + { + "name": "runtime_filter", + "baseName": "runtime_filter", + "type": "any", + "format": "" + }, + { + "name": "runtime_sort", + "baseName": "runtime_sort", + "type": "any", + "format": "" + }, + { + "name": "runtime_param_override", + "baseName": "runtime_param_override", + "type": "any", + "format": "" + }, + { + "name": "regional_settings", + "baseName": "regional_settings", + "type": "ExportAnswerReportRequestRegionalSettings", + "format": "" + }, + { + "name": "png_options", + "baseName": "png_options", + "type": "ExportAnswerReportRequestPngOptions", + "format": "" + }, + { + "name": "personalised_view_identifier", + "baseName": "personalised_view_identifier", + "type": "string", + "format": "" + }, + { + "name": "type", + "baseName": "type", + "type": "ExportAnswerReportRequestTypeEnum", + "format": "" + } ]; + + static getAttributeTypeMap() { + return ExportAnswerReportRequest.attributeTypeMap; + } + + public constructor() { + } +} + + +export type ExportAnswerReportRequestFileFormatEnum = "CSV" | "PDF" | "XLSX" | "PNG" ; +export type ExportAnswerReportRequestTypeEnum = "SAVED" | "PINNED" ; + diff --git a/sdks/typescript/models/ExportAnswerReportRequestPngOptions.ts b/sdks/typescript/models/ExportAnswerReportRequestPngOptions.ts new file mode 100644 index 000000000..6f7b25b69 --- /dev/null +++ b/sdks/typescript/models/ExportAnswerReportRequestPngOptions.ts @@ -0,0 +1,61 @@ +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { HttpFile } from '../http/http'; + +/** +* Options for PNG export. Version: 26.6.0.cl or later +*/ +export class ExportAnswerReportRequestPngOptions { + /** + * Desired width of the answer image in pixels. Ex. 1920 for Full HD image Version: 26.6.0.cl or later + */ + 'x_resolution'?: number | null; + /** + * Desired height of the answer image in pixels. Ex. 1080 for Full HD image Version: 26.6.0.cl or later + */ + 'y_resolution'?: number | null; + /** + * The scale of the image in percentage. Ex. 100 for 100% scale. Version: 26.6.0.cl or later + */ + 'scaling'?: number | null; + + static readonly discriminator: string | undefined = undefined; + + static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ + { + "name": "x_resolution", + "baseName": "x_resolution", + "type": "number", + "format": "int32" + }, + { + "name": "y_resolution", + "baseName": "y_resolution", + "type": "number", + "format": "int32" + }, + { + "name": "scaling", + "baseName": "scaling", + "type": "number", + "format": "int32" + } ]; + + static getAttributeTypeMap() { + return ExportAnswerReportRequestPngOptions.attributeTypeMap; + } + + public constructor() { + } +} + diff --git a/sdks/typescript/models/ExportAnswerReportRequestRegionalSettings.ts b/sdks/typescript/models/ExportAnswerReportRequestRegionalSettings.ts new file mode 100644 index 000000000..8c4c31675 --- /dev/null +++ b/sdks/typescript/models/ExportAnswerReportRequestRegionalSettings.ts @@ -0,0 +1,77 @@ +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { HttpFile } from '../http/http'; + +/** +* Options for specific region specific overrides to support date/number/string/currency formatting. +*/ +export class ExportAnswerReportRequestRegionalSettings { + /** + * ISO code to be appended with currency values. + */ + 'currency_format'?: ExportAnswerReportRequestRegionalSettingsCurrencyFormatEnum | null; + /** + * Indicates the locale to be used for all formattings. + */ + 'user_locale'?: ExportAnswerReportRequestRegionalSettingsUserLocaleEnum | null; + /** + * Indicates the locale to be used for number formatting. + */ + 'number_format_locale'?: ExportAnswerReportRequestRegionalSettingsNumberFormatLocaleEnum | null; + /** + * Indicates the locale to be used for date formatting. + */ + 'date_format_locale'?: ExportAnswerReportRequestRegionalSettingsDateFormatLocaleEnum | null; + + static readonly discriminator: string | undefined = undefined; + + static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ + { + "name": "currency_format", + "baseName": "currency_format", + "type": "ExportAnswerReportRequestRegionalSettingsCurrencyFormatEnum", + "format": "" + }, + { + "name": "user_locale", + "baseName": "user_locale", + "type": "ExportAnswerReportRequestRegionalSettingsUserLocaleEnum", + "format": "" + }, + { + "name": "number_format_locale", + "baseName": "number_format_locale", + "type": "ExportAnswerReportRequestRegionalSettingsNumberFormatLocaleEnum", + "format": "" + }, + { + "name": "date_format_locale", + "baseName": "date_format_locale", + "type": "ExportAnswerReportRequestRegionalSettingsDateFormatLocaleEnum", + "format": "" + } ]; + + static getAttributeTypeMap() { + return ExportAnswerReportRequestRegionalSettings.attributeTypeMap; + } + + public constructor() { + } +} + + +export type ExportAnswerReportRequestRegionalSettingsCurrencyFormatEnum = "ADP" | "AED" | "AFN" | "ALL" | "AMD" | "ANG" | "AOA" | "ARA" | "ARS" | "ATS" | "AUD" | "AWG" | "AZN" | "BAM" | "BBD" | "BDT" | "BEF" | "BGL" | "BGM" | "BGN" | "BHD" | "BIF" | "BMD" | "BND" | "BOB" | "BOP" | "BOV" | "BRL" | "BSD" | "BTN" | "BUK" | "BWP" | "BYN" | "BZD" | "CAD" | "CDF" | "CHE" | "CHF" | "CHW" | "CLE" | "CLP" | "CNX" | "CNY" | "COP" | "COU" | "CRC" | "CSK" | "CUC" | "CUP" | "CVE" | "CYP" | "CZK" | "DDM" | "DEM" | "DJF" | "DKK" | "DOP" | "DZD" | "ECS" | "ECV" | "EEK" | "EGP" | "ERN" | "ESP" | "ETB" | "EUR" | "FIM" | "FJD" | "FKP" | "FRF" | "GBP" | "GEK" | "GEL" | "GHS" | "GIP" | "GMD" | "GNF" | "GNS" | "GQE" | "GRD" | "GTQ" | "GWE" | "GWP" | "GYD" | "HKD" | "HNL" | "HRD" | "HRK" | "HTG" | "HUF" | "IDR" | "IEP" | "ILP" | "ILS" | "INR" | "IQD" | "IRR" | "ISK" | "ITL" | "JMD" | "JOD" | "JPY" | "KES" | "KGS" | "KHR" | "KMF" | "KPW" | "KRW" | "KWD" | "KYD" | "KZT" | "LAK" | "LBP" | "LKR" | "LRD" | "LSL" | "LTL" | "LTT" | "LUC" | "LUF" | "LUL" | "LVL" | "LVR" | "LYD" | "MAD" | "MAF" | "MCF" | "MDC" | "MDL" | "MGA" | "MGF" | "MKD" | "MLF" | "MMK" | "MNT" | "MOP" | "MRU" | "MTL" | "MTP" | "MUR" | "MVR" | "MWK" | "MXN" | "MXV" | "MYR" | "MZE" | "MZN" | "NAD" | "NGN" | "NIO" | "NLG" | "NOK" | "NPR" | "NZD" | "OMR" | "PAB" | "PEI" | "PEN" | "PGK" | "PHP" | "PKR" | "PLN" | "PTE" | "PYG" | "QAR" | "RHD" | "RON" | "RSD" | "RUB" | "RWF" | "SAR" | "SBD" | "SCR" | "SDG" | "SEK" | "SGD" | "SHP" | "SIT" | "SKK" | "SLL" | "SOS" | "SRD" | "SRG" | "SSP" | "STN" | "SUR" | "SVC" | "SYP" | "SZL" | "THB" | "TJR" | "TJS" | "TMT" | "TND" | "TOP" | "TPE" | "TRY" | "TTD" | "TWD" | "TZS" | "UAH" | "UAK" | "UGX" | "USD" | "UYU" | "UYW" | "UZS" | "VES" | "VND" | "VUV" | "WST" | "XAF" | "XAG" | "XAU" | "XBA" | "XBB" | "XCD" | "XDR" | "XEU" | "XFO" | "XFU" | "XOF" | "XPD" | "XPF" | "XPT" | "XRE" | "XSU" | "XTS" | "XUA" | "XXX" | "YDD" | "YER" | "ZAR" | "ZMW" ; +export type ExportAnswerReportRequestRegionalSettingsUserLocaleEnum = "en-CA" | "en-GB" | "en-US" | "de-DE" | "ja-JP" | "zh-CN" | "pt-BR" | "fr-FR" | "fr-CA" | "es-US" | "da-DK" | "es-ES" | "fi-FI" | "sv-SE" | "nb-NO" | "pt-PT" | "nl-NL" | "it-IT" | "ru-RU" | "en-IN" | "de-CH" | "en-NZ" | "es-MX" | "en-AU" | "zh-Hant" | "ko-KR" | "en-DE" ; +export type ExportAnswerReportRequestRegionalSettingsNumberFormatLocaleEnum = "en-CA" | "en-GB" | "en-US" | "de-DE" | "ja-JP" | "zh-CN" | "pt-BR" | "fr-FR" | "fr-CA" | "es-US" | "da-DK" | "es-ES" | "fi-FI" | "sv-SE" | "nb-NO" | "pt-PT" | "nl-NL" | "it-IT" | "ru-RU" | "en-IN" | "de-CH" | "en-NZ" | "es-MX" | "en-AU" | "zh-Hant" | "ko-KR" | "en-DE" ; +export type ExportAnswerReportRequestRegionalSettingsDateFormatLocaleEnum = "en-CA" | "en-GB" | "en-US" | "de-DE" | "ja-JP" | "zh-CN" | "pt-BR" | "fr-FR" | "fr-CA" | "es-US" | "da-DK" | "es-ES" | "fi-FI" | "sv-SE" | "nb-NO" | "pt-PT" | "nl-NL" | "it-IT" | "ru-RU" | "en-IN" | "de-CH" | "en-NZ" | "es-MX" | "en-AU" | "zh-Hant" | "ko-KR" | "en-DE" ; + diff --git a/sdks/typescript/models/ExportLiveboardReportRequest.ts b/sdks/typescript/models/ExportLiveboardReportRequest.ts new file mode 100644 index 000000000..4a24be533 --- /dev/null +++ b/sdks/typescript/models/ExportLiveboardReportRequest.ts @@ -0,0 +1,155 @@ +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { ExportAnswerReportRequestRegionalSettings } from '../models/ExportAnswerReportRequestRegionalSettings'; +import { ExportLiveboardReportRequestPdfOptions } from '../models/ExportLiveboardReportRequestPdfOptions'; +import { ExportLiveboardReportRequestPngOptions } from '../models/ExportLiveboardReportRequestPngOptions'; +import { HttpFile } from '../http/http'; + +export class ExportLiveboardReportRequest { + /** + * GUID or name of the Liveboard object. + */ + 'metadata_identifier': string; + /** + * GUID or name of the tab of the Liveboard object. Version: 10.9.0.cl or later + */ + 'tab_identifiers'?: Array; + /** + * GUID or name of the personalised view of the Liveboard object. Version: 10.9.0.cl or later + */ + 'personalised_view_identifier'?: string; + /** + * GUID or name of visualizations on the Liveboard. If this parameter is not defined, the API returns a report with all visualizations saved on a Liveboard. + */ + 'visualization_identifiers'?: Array; + /** + * Transient content of the Liveboard. + */ + 'transient_content'?: string; + /** + * Export file format. + */ + 'file_format'?: ExportLiveboardReportRequestFileFormatEnum; + /** + * JSON object with representing filter condition to apply filters at runtime. For example, {\"col1\": \"region\", \"op1\": \"EQ\", \"val1\": \"northeast\" }. You can add multiple keys by incrementing the number at the end, for example, col2, op2, val2. For more information, see [API Documentation](https://developers.thoughtspot.com/docs/fetch-data-and-report-apis#_runtime_filters). + */ + 'runtime_filter'?: any; + /** + * Applied to the liveboard and overrides any filters already applied on the same columns in liveboard. Following example illustrate different kinds of filters: { \"override_filters\": [ { \"column_name\": \"Color\", \"generic_filter\": { \"op\": \"IN\", \"values\": [ \"almond\", \"turquoise\" ] }, \"negate\": false }, { \"column_name\": \"Commit Date\", \"date_filter\": { \"datePeriod\": \"HOUR\", \"number\": 3, \"type\": \"LAST_N_PERIOD\", \"op\": \"EQ\" } }, { \"column_name\": \"Sales\", \"generic_filter\": { \"op\": \"BW_INC\", \"values\": [ \"100000\", \"70000\" ] }, \"negate\": true } ] } + */ + 'override_filters'?: any; + /** + * JSON string representing runtime sort. For example, {\"sortCol1\": \"region\", \"asc1\" : true}. For more information, see [API Documentation](https://developers.thoughtspot.com/docs/fetch-data-and-report-apis#_runtime_sort). + */ + 'runtime_sort'?: any; + 'pdf_options'?: ExportLiveboardReportRequestPdfOptions; + 'png_options'?: ExportLiveboardReportRequestPngOptions; + /** + * JSON object for setting values of parameters at runtime. For example, {\"param1\": \"Double List Param\", \"paramVal1\": 0.5}. You can add multiple keys by incrementing the number at the end, for example, param2, paramVal2. For more information, see [API Documentation](https://developers.thoughtspot.com/docs/fetch-data-and-report-apis#_runtime_parameters). + */ + 'runtime_param_override'?: any; + 'regional_settings'?: ExportAnswerReportRequestRegionalSettings; + + static readonly discriminator: string | undefined = undefined; + + static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ + { + "name": "metadata_identifier", + "baseName": "metadata_identifier", + "type": "string", + "format": "" + }, + { + "name": "tab_identifiers", + "baseName": "tab_identifiers", + "type": "Array", + "format": "" + }, + { + "name": "personalised_view_identifier", + "baseName": "personalised_view_identifier", + "type": "string", + "format": "" + }, + { + "name": "visualization_identifiers", + "baseName": "visualization_identifiers", + "type": "Array", + "format": "" + }, + { + "name": "transient_content", + "baseName": "transient_content", + "type": "string", + "format": "" + }, + { + "name": "file_format", + "baseName": "file_format", + "type": "ExportLiveboardReportRequestFileFormatEnum", + "format": "" + }, + { + "name": "runtime_filter", + "baseName": "runtime_filter", + "type": "any", + "format": "" + }, + { + "name": "override_filters", + "baseName": "override_filters", + "type": "any", + "format": "" + }, + { + "name": "runtime_sort", + "baseName": "runtime_sort", + "type": "any", + "format": "" + }, + { + "name": "pdf_options", + "baseName": "pdf_options", + "type": "ExportLiveboardReportRequestPdfOptions", + "format": "" + }, + { + "name": "png_options", + "baseName": "png_options", + "type": "ExportLiveboardReportRequestPngOptions", + "format": "" + }, + { + "name": "runtime_param_override", + "baseName": "runtime_param_override", + "type": "any", + "format": "" + }, + { + "name": "regional_settings", + "baseName": "regional_settings", + "type": "ExportAnswerReportRequestRegionalSettings", + "format": "" + } ]; + + static getAttributeTypeMap() { + return ExportLiveboardReportRequest.attributeTypeMap; + } + + public constructor() { + } +} + + +export type ExportLiveboardReportRequestFileFormatEnum = "PDF" | "PNG" | "CSV" | "XLSX" ; + diff --git a/sdks/typescript/models/ExportLiveboardReportRequestPdfOptions.ts b/sdks/typescript/models/ExportLiveboardReportRequestPdfOptions.ts new file mode 100644 index 000000000..af643505e --- /dev/null +++ b/sdks/typescript/models/ExportLiveboardReportRequestPdfOptions.ts @@ -0,0 +1,125 @@ +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { HttpFile } from '../http/http'; + +/** +* Options for PDF export. +*/ +export class ExportLiveboardReportRequestPdfOptions { + /** + * Size of PDF page. `A4` generates a paginated A4 PDF. `CONTINUOUS` generates a continuous PDF that matches the Liveboard layout. Each Liveboard tab has its own page of variable length. Defaults to `A4` if not specified. Version: 26.5.0.cl or later + */ + 'page_size'?: ExportLiveboardReportRequestPdfOptionsPageSizeEnum | null; + /** + * Zoom level percentage for the PDF. Only applicable when `page_size` is `CONTINUOUS`. Acceptable values are integers in the range [45, 175]. Defaults to 100 if not specified. Version: 26.5.0.cl or later + */ + 'zoom_level'?: number | null; + /** + * Indicates whether to include the cover page with the Liveboard title. + */ + 'include_cover_page'?: boolean | null; + /** + * Indicates whether to include customized wide logo in the footer if available. + */ + 'include_custom_logo'?: boolean | null; + /** + * Indicates whether to include a page with all applied filters. For `CONTINUOUS` page_size, this parameter indicates whether to include the filter header. + */ + 'include_filter_page'?: boolean | null; + /** + * Indicates whether to include page number in the footer of each page. + */ + 'include_page_number'?: boolean | null; + /** + * Page orientation of the PDF. + */ + 'page_orientation'?: ExportLiveboardReportRequestPdfOptionsPageOrientationEnum | null; + /** + * Indicates whether to include only the first page of the tables. + */ + 'truncate_table'?: boolean | null; + /** + * Text to include in the footer of each page. + */ + 'page_footer_text'?: string | null; + + static readonly discriminator: string | undefined = undefined; + + static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ + { + "name": "page_size", + "baseName": "page_size", + "type": "ExportLiveboardReportRequestPdfOptionsPageSizeEnum", + "format": "" + }, + { + "name": "zoom_level", + "baseName": "zoom_level", + "type": "number", + "format": "int32" + }, + { + "name": "include_cover_page", + "baseName": "include_cover_page", + "type": "boolean", + "format": "" + }, + { + "name": "include_custom_logo", + "baseName": "include_custom_logo", + "type": "boolean", + "format": "" + }, + { + "name": "include_filter_page", + "baseName": "include_filter_page", + "type": "boolean", + "format": "" + }, + { + "name": "include_page_number", + "baseName": "include_page_number", + "type": "boolean", + "format": "" + }, + { + "name": "page_orientation", + "baseName": "page_orientation", + "type": "ExportLiveboardReportRequestPdfOptionsPageOrientationEnum", + "format": "" + }, + { + "name": "truncate_table", + "baseName": "truncate_table", + "type": "boolean", + "format": "" + }, + { + "name": "page_footer_text", + "baseName": "page_footer_text", + "type": "string", + "format": "" + } ]; + + static getAttributeTypeMap() { + return ExportLiveboardReportRequestPdfOptions.attributeTypeMap; + } + + public constructor() { + } +} + + +export type ExportLiveboardReportRequestPdfOptionsPageSizeEnum = "A4" | "CONTINUOUS" ; +export type ExportLiveboardReportRequestPdfOptionsPageOrientationEnum = "PORTRAIT" | "LANDSCAPE" ; + diff --git a/sdks/typescript/models/ExportLiveboardReportRequestPngOptions.ts b/sdks/typescript/models/ExportLiveboardReportRequestPngOptions.ts new file mode 100644 index 000000000..a12b1a7ef --- /dev/null +++ b/sdks/typescript/models/ExportLiveboardReportRequestPngOptions.ts @@ -0,0 +1,91 @@ +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { HttpFile } from '../http/http'; + +/** +* Options for PNG export. +*/ +export class ExportLiveboardReportRequestPngOptions { + /** + * Indicates whether to include the cover page with the Liveboard title. + */ + 'include_cover_page'?: boolean | null; + /** + * Indicates whether to include a page with all applied filters. + */ + 'include_filter_page'?: boolean | null; + /** + * Indicates personalised view of the Liveboard in case of png + */ + 'personalised_view_id'?: string | null; + /** + * Desired width of the Liveboard image in pixels. Ex. 1920 for Full HD image Version: 10.9.0.cl or later + */ + 'image_resolution'?: number | null; + /** + * The scale of the image in percentage. Ex. 100 for 100% scale. Version: 10.9.0.cl or later + */ + 'image_scale'?: number | null; + /** + * Indicates whether to include the header of the liveboard. Version: 10.9.0.cl or later + */ + 'include_header'?: boolean | null; + + static readonly discriminator: string | undefined = undefined; + + static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ + { + "name": "include_cover_page", + "baseName": "include_cover_page", + "type": "boolean", + "format": "" + }, + { + "name": "include_filter_page", + "baseName": "include_filter_page", + "type": "boolean", + "format": "" + }, + { + "name": "personalised_view_id", + "baseName": "personalised_view_id", + "type": "string", + "format": "" + }, + { + "name": "image_resolution", + "baseName": "image_resolution", + "type": "number", + "format": "int32" + }, + { + "name": "image_scale", + "baseName": "image_scale", + "type": "number", + "format": "int32" + }, + { + "name": "include_header", + "baseName": "include_header", + "type": "boolean", + "format": "" + } ]; + + static getAttributeTypeMap() { + return ExportLiveboardReportRequestPngOptions.attributeTypeMap; + } + + public constructor() { + } +} + diff --git a/sdks/typescript/models/ExportMetadataTMLBatchedRequest.ts b/sdks/typescript/models/ExportMetadataTMLBatchedRequest.ts new file mode 100644 index 000000000..621f2a00c --- /dev/null +++ b/sdks/typescript/models/ExportMetadataTMLBatchedRequest.ts @@ -0,0 +1,92 @@ +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { HttpFile } from '../http/http'; + +export class ExportMetadataTMLBatchedRequest { + /** + * Type of metadata object to export, can be one of USER | ROLE | USER_GROUP + */ + 'metadata_type': ExportMetadataTMLBatchedRequestMetadataTypeEnum; + /** + * Indicates the position within the complete set from where the API should begin returning objects. + */ + 'batch_offset'?: number; + /** + * Determines the number of objects or items to be retrieved in a single request. + */ + 'batch_size'?: number; + /** + * TML EDOC content format. + */ + 'edoc_format'?: ExportMetadataTMLBatchedRequestEdocFormatEnum; + /** + * Indicates whether to export dependent metadata objects of specified metadata objects. + */ + 'export_dependent'?: boolean | null; + /** + * Indicates whether to export is happening from all orgs context. + */ + 'all_orgs_override'?: boolean | null; + + static readonly discriminator: string | undefined = undefined; + + static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ + { + "name": "metadata_type", + "baseName": "metadata_type", + "type": "ExportMetadataTMLBatchedRequestMetadataTypeEnum", + "format": "" + }, + { + "name": "batch_offset", + "baseName": "batch_offset", + "type": "number", + "format": "int32" + }, + { + "name": "batch_size", + "baseName": "batch_size", + "type": "number", + "format": "int32" + }, + { + "name": "edoc_format", + "baseName": "edoc_format", + "type": "ExportMetadataTMLBatchedRequestEdocFormatEnum", + "format": "" + }, + { + "name": "export_dependent", + "baseName": "export_dependent", + "type": "boolean", + "format": "" + }, + { + "name": "all_orgs_override", + "baseName": "all_orgs_override", + "type": "boolean", + "format": "" + } ]; + + static getAttributeTypeMap() { + return ExportMetadataTMLBatchedRequest.attributeTypeMap; + } + + public constructor() { + } +} + + +export type ExportMetadataTMLBatchedRequestMetadataTypeEnum = "USER" | "USER_GROUP" | "ROLE" ; +export type ExportMetadataTMLBatchedRequestEdocFormatEnum = "JSON" | "YAML" ; + diff --git a/sdks/typescript/models/ExportMetadataTMLRequest.ts b/sdks/typescript/models/ExportMetadataTMLRequest.ts new file mode 100644 index 000000000..40587b45d --- /dev/null +++ b/sdks/typescript/models/ExportMetadataTMLRequest.ts @@ -0,0 +1,121 @@ +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { ExportMetadataTMLRequestExportOptions } from '../models/ExportMetadataTMLRequestExportOptions'; +import { ExportMetadataTypeInput } from '../models/ExportMetadataTypeInput'; +import { HttpFile } from '../http/http'; + +export class ExportMetadataTMLRequest { + /** + * Metadata objects. + */ + 'metadata': Array; + /** + * Indicates whether to export associated metadata objects of specified metadata objects. + */ + 'export_associated'?: boolean | null; + /** + * Adds FQNs of the referenced objects. For example, if you are exporting a Liveboard and its associated objects, the API returns the Liveboard TML data with the FQNs of the referenced worksheet. If the exported TML data includes FQNs, you don\'t need to manually add FQNs of the referenced objects during TML import. + */ + 'export_fqn'?: boolean | null; + /** + * TML EDOC content format. **Note: exporting in YAML format currently requires manual formatting of the output. For more details on the workaround, please click [here](https://developers.thoughtspot.com/docs/known-issues#_version_9_12_0_cl)** + */ + 'edoc_format'?: ExportMetadataTMLRequestEdocFormatEnum; + /** + * Indicates whether to export worksheet TML in DEFAULT or V1 or V2 version. + */ + 'export_schema_version'?: ExportMetadataTMLRequestExportSchemaVersionEnum; + /** + * Indicates whether to export table while exporting connection. + */ + 'export_dependent'?: boolean | null; + /** + * Indicates whether to export connection as dependent while exporting table/worksheet/answer/liveboard. This will only be active when export_associated is true. + */ + 'export_connection_as_dependent'?: boolean | null; + /** + * Indicates whether to export is happening from all orgs context. + */ + 'all_orgs_override'?: boolean | null; + 'export_options'?: ExportMetadataTMLRequestExportOptions; + + static readonly discriminator: string | undefined = undefined; + + static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ + { + "name": "metadata", + "baseName": "metadata", + "type": "Array", + "format": "" + }, + { + "name": "export_associated", + "baseName": "export_associated", + "type": "boolean", + "format": "" + }, + { + "name": "export_fqn", + "baseName": "export_fqn", + "type": "boolean", + "format": "" + }, + { + "name": "edoc_format", + "baseName": "edoc_format", + "type": "ExportMetadataTMLRequestEdocFormatEnum", + "format": "" + }, + { + "name": "export_schema_version", + "baseName": "export_schema_version", + "type": "ExportMetadataTMLRequestExportSchemaVersionEnum", + "format": "" + }, + { + "name": "export_dependent", + "baseName": "export_dependent", + "type": "boolean", + "format": "" + }, + { + "name": "export_connection_as_dependent", + "baseName": "export_connection_as_dependent", + "type": "boolean", + "format": "" + }, + { + "name": "all_orgs_override", + "baseName": "all_orgs_override", + "type": "boolean", + "format": "" + }, + { + "name": "export_options", + "baseName": "export_options", + "type": "ExportMetadataTMLRequestExportOptions", + "format": "" + } ]; + + static getAttributeTypeMap() { + return ExportMetadataTMLRequest.attributeTypeMap; + } + + public constructor() { + } +} + + +export type ExportMetadataTMLRequestEdocFormatEnum = "JSON" | "YAML" ; +export type ExportMetadataTMLRequestExportSchemaVersionEnum = "DEFAULT" | "V1" | "V2" ; + diff --git a/sdks/typescript/models/ExportMetadataTMLRequestExportOptions.ts b/sdks/typescript/models/ExportMetadataTMLRequestExportOptions.ts new file mode 100644 index 000000000..d632369b0 --- /dev/null +++ b/sdks/typescript/models/ExportMetadataTMLRequestExportOptions.ts @@ -0,0 +1,91 @@ +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { HttpFile } from '../http/http'; + +/** +* Flags to specify additional options for export. Version: 10.6.0.cl or later +*/ +export class ExportMetadataTMLRequestExportOptions { + /** + * Boolean Flag to export Object ID of referenced object. This flag will work only after the Object ID feature has been enabled. Please contact support to enable the feature. + */ + 'include_obj_id_ref'?: boolean | null; + /** + * Boolean flag to export guid of the object. This flag will work only after the Object ID feature has been enabled. Please contact support to enable the feature. + */ + 'include_guid'?: boolean | null; + /** + * Boolean flag to export Object ID of the object. This flag will work only after the Object ID feature has been enabled. Please contact support to enable the feature. + */ + 'include_obj_id'?: boolean | null; + /** + * Boolean flag indicating whether to export associated feedbacks of the object. This will only be respected when the object can have feedbacks. Version: 10.7.0.cl or later + */ + 'export_with_associated_feedbacks'?: boolean | null; + /** + * Boolean flag indicating whether to export column security rules of the object. This will only be respected when the object can have column security rules and export_associated is true. Version: 10.12.0.cl or later + */ + 'export_column_security_rules'?: boolean | null; + /** + * Boolean flag indicating whether to export column aliases of the model. This will only be respected when the object can have column aliases. Version: 10.13.0.cl or later + */ + 'export_with_column_aliases'?: boolean | null; + + static readonly discriminator: string | undefined = undefined; + + static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ + { + "name": "include_obj_id_ref", + "baseName": "include_obj_id_ref", + "type": "boolean", + "format": "" + }, + { + "name": "include_guid", + "baseName": "include_guid", + "type": "boolean", + "format": "" + }, + { + "name": "include_obj_id", + "baseName": "include_obj_id", + "type": "boolean", + "format": "" + }, + { + "name": "export_with_associated_feedbacks", + "baseName": "export_with_associated_feedbacks", + "type": "boolean", + "format": "" + }, + { + "name": "export_column_security_rules", + "baseName": "export_column_security_rules", + "type": "boolean", + "format": "" + }, + { + "name": "export_with_column_aliases", + "baseName": "export_with_column_aliases", + "type": "boolean", + "format": "" + } ]; + + static getAttributeTypeMap() { + return ExportMetadataTMLRequestExportOptions.attributeTypeMap; + } + + public constructor() { + } +} + diff --git a/sdks/typescript/models/ExportMetadataTypeInput.ts b/sdks/typescript/models/ExportMetadataTypeInput.ts new file mode 100644 index 000000000..f3689c7d0 --- /dev/null +++ b/sdks/typescript/models/ExportMetadataTypeInput.ts @@ -0,0 +1,74 @@ +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { HttpFile } from '../http/http'; + +/** +* MetadataType InputType used in Export MetadataType API +*/ +export class ExportMetadataTypeInput { + /** + * Type of metadata. Required if the name of the object is set as the identifier. This attribute is optional when the object GUID is specified as the identifier. + */ + 'type'?: ExportMetadataTypeInputTypeEnum | null; + /** + * Unique ID or name of the metadata object. Not required if the metadata type is ANSWER when session_id and generation_number is set. + */ + 'identifier'?: string | null; + /** + * Unique ID of the Answer session. Required if the metadata type is ANSWER and identifier is not set. + */ + 'session_identifier'?: string | null; + /** + * Generation Number of the Answer session. Required if the metadata type is ANSWER and identifier is not set. + */ + 'generation_number'?: number | null; + + static readonly discriminator: string | undefined = undefined; + + static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ + { + "name": "type", + "baseName": "type", + "type": "ExportMetadataTypeInputTypeEnum", + "format": "" + }, + { + "name": "identifier", + "baseName": "identifier", + "type": "string", + "format": "" + }, + { + "name": "session_identifier", + "baseName": "session_identifier", + "type": "string", + "format": "" + }, + { + "name": "generation_number", + "baseName": "generation_number", + "type": "number", + "format": "int32" + } ]; + + static getAttributeTypeMap() { + return ExportMetadataTypeInput.attributeTypeMap; + } + + public constructor() { + } +} + + +export type ExportMetadataTypeInputTypeEnum = "LIVEBOARD" | "ANSWER" | "LOGICAL_TABLE" | "CONNECTION" | "CUSTOM_ACTION" | "USER" | "USER_GROUP" | "ROLE" | "FEEDBACK" ; + diff --git a/sdks/typescript/models/ExportOptions.ts b/sdks/typescript/models/ExportOptions.ts new file mode 100644 index 000000000..cb3ff2d28 --- /dev/null +++ b/sdks/typescript/models/ExportOptions.ts @@ -0,0 +1,91 @@ +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { HttpFile } from '../http/http'; + +/** +* Flags to specify additional options for export. This will only be active when UserDefinedId in TML is enabled. +*/ +export class ExportOptions { + /** + * Boolean Flag to export Object ID of referenced object. This flag will work only after the Object ID feature has been enabled. Please contact support to enable the feature. + */ + 'include_obj_id_ref'?: boolean | null; + /** + * Boolean flag to export guid of the object. This flag will work only after the Object ID feature has been enabled. Please contact support to enable the feature. + */ + 'include_guid'?: boolean | null; + /** + * Boolean flag to export Object ID of the object. This flag will work only after the Object ID feature has been enabled. Please contact support to enable the feature. + */ + 'include_obj_id'?: boolean | null; + /** + * Boolean flag indicating whether to export associated feedbacks of the object. This will only be respected when the object can have feedbacks. Version: 10.7.0.cl or later + */ + 'export_with_associated_feedbacks'?: boolean | null; + /** + * Boolean flag indicating whether to export column security rules of the object. This will only be respected when the object can have column security rules and export_associated is true. Version: 10.12.0.cl or later + */ + 'export_column_security_rules'?: boolean | null; + /** + * Boolean flag indicating whether to export column aliases of the model. This will only be respected when the object can have column aliases. Version: 10.13.0.cl or later + */ + 'export_with_column_aliases'?: boolean | null; + + static readonly discriminator: string | undefined = undefined; + + static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ + { + "name": "include_obj_id_ref", + "baseName": "include_obj_id_ref", + "type": "boolean", + "format": "" + }, + { + "name": "include_guid", + "baseName": "include_guid", + "type": "boolean", + "format": "" + }, + { + "name": "include_obj_id", + "baseName": "include_obj_id", + "type": "boolean", + "format": "" + }, + { + "name": "export_with_associated_feedbacks", + "baseName": "export_with_associated_feedbacks", + "type": "boolean", + "format": "" + }, + { + "name": "export_column_security_rules", + "baseName": "export_column_security_rules", + "type": "boolean", + "format": "" + }, + { + "name": "export_with_column_aliases", + "baseName": "export_with_column_aliases", + "type": "boolean", + "format": "" + } ]; + + static getAttributeTypeMap() { + return ExportOptions.attributeTypeMap; + } + + public constructor() { + } +} + diff --git a/sdks/typescript/models/ExternalTableInput.ts b/sdks/typescript/models/ExternalTableInput.ts new file mode 100644 index 000000000..e10f596bd --- /dev/null +++ b/sdks/typescript/models/ExternalTableInput.ts @@ -0,0 +1,68 @@ +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { HttpFile } from '../http/http'; + +export class ExternalTableInput { + /** + * Unique ID or name of the connection. + */ + 'connection_identifier': string; + /** + * Name of the database. + */ + 'database_name'?: string | null; + /** + * Name of the schema. + */ + 'schema_name'?: string | null; + /** + * Name of the table. Table names may be case-sensitive depending on the database system. + */ + 'table_name': string; + + static readonly discriminator: string | undefined = undefined; + + static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ + { + "name": "connection_identifier", + "baseName": "connection_identifier", + "type": "string", + "format": "" + }, + { + "name": "database_name", + "baseName": "database_name", + "type": "string", + "format": "" + }, + { + "name": "schema_name", + "baseName": "schema_name", + "type": "string", + "format": "" + }, + { + "name": "table_name", + "baseName": "table_name", + "type": "string", + "format": "" + } ]; + + static getAttributeTypeMap() { + return ExternalTableInput.attributeTypeMap; + } + + public constructor() { + } +} + diff --git a/sdks/typescript/models/FavoriteMetadataInput.ts b/sdks/typescript/models/FavoriteMetadataInput.ts new file mode 100644 index 000000000..c05084141 --- /dev/null +++ b/sdks/typescript/models/FavoriteMetadataInput.ts @@ -0,0 +1,51 @@ +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { HttpFile } from '../http/http'; + +export class FavoriteMetadataInput { + /** + * Unique ID or name of the metadata object. + */ + 'identifier'?: string | null; + /** + * Type of metadata object. Required if the name of the object is set as the identifier. This attribute is optional when the object GUID is specified as the identifier. + */ + 'type'?: FavoriteMetadataInputTypeEnum | null; + + static readonly discriminator: string | undefined = undefined; + + static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ + { + "name": "identifier", + "baseName": "identifier", + "type": "string", + "format": "" + }, + { + "name": "type", + "baseName": "type", + "type": "FavoriteMetadataInputTypeEnum", + "format": "" + } ]; + + static getAttributeTypeMap() { + return FavoriteMetadataInput.attributeTypeMap; + } + + public constructor() { + } +} + + +export type FavoriteMetadataInputTypeEnum = "LIVEBOARD" | "ANSWER" ; + diff --git a/sdks/typescript/models/FavoriteMetadataItem.ts b/sdks/typescript/models/FavoriteMetadataItem.ts new file mode 100644 index 000000000..7159fa0f8 --- /dev/null +++ b/sdks/typescript/models/FavoriteMetadataItem.ts @@ -0,0 +1,61 @@ +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { HttpFile } from '../http/http'; + +export class FavoriteMetadataItem { + /** + * Unique ID of the metadata object. + */ + 'id': string; + /** + * name of the metadata object. + */ + 'name': string; + /** + * Type of metadata object. Required if the name of the object is set as the identifier. This attribute is optional when the object GUID is specified as the identifier. + */ + 'type': FavoriteMetadataItemTypeEnum; + + static readonly discriminator: string | undefined = undefined; + + static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ + { + "name": "id", + "baseName": "id", + "type": "string", + "format": "" + }, + { + "name": "name", + "baseName": "name", + "type": "string", + "format": "" + }, + { + "name": "type", + "baseName": "type", + "type": "FavoriteMetadataItemTypeEnum", + "format": "" + } ]; + + static getAttributeTypeMap() { + return FavoriteMetadataItem.attributeTypeMap; + } + + public constructor() { + } +} + + +export type FavoriteMetadataItemTypeEnum = "LIVEBOARD" | "ANSWER" | "LOGICAL_TABLE" | "LOGICAL_COLUMN" | "CONNECTION" | "TAG" | "USER" | "USER_GROUP" | "LOGICAL_RELATIONSHIP" ; + diff --git a/sdks/typescript/models/FavoriteObjectOptionsInput.ts b/sdks/typescript/models/FavoriteObjectOptionsInput.ts new file mode 100644 index 000000000..9784341e8 --- /dev/null +++ b/sdks/typescript/models/FavoriteObjectOptionsInput.ts @@ -0,0 +1,51 @@ +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { HttpFile } from '../http/http'; + +/** +* Favorite object options. +*/ +export class FavoriteObjectOptionsInput { + /** + * Includes objects marked as favorite for the specified users. + */ + 'include'?: boolean | null; + /** + * Unique ID or name of the users. If not specified, the favorite objects of current logged in user are returned. + */ + 'user_identifiers'?: Array | null; + + static readonly discriminator: string | undefined = undefined; + + static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ + { + "name": "include", + "baseName": "include", + "type": "boolean", + "format": "" + }, + { + "name": "user_identifiers", + "baseName": "user_identifiers", + "type": "Array", + "format": "" + } ]; + + static getAttributeTypeMap() { + return FavoriteObjectOptionsInput.attributeTypeMap; + } + + public constructor() { + } +} + diff --git a/sdks/typescript/models/FetchAnswerDataRequest.ts b/sdks/typescript/models/FetchAnswerDataRequest.ts new file mode 100644 index 000000000..d708441e6 --- /dev/null +++ b/sdks/typescript/models/FetchAnswerDataRequest.ts @@ -0,0 +1,101 @@ +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { HttpFile } from '../http/http'; + +export class FetchAnswerDataRequest { + /** + * GUID or name of the Answer. + */ + 'metadata_identifier': string; + /** + * JSON output in compact or full format. The FULL option is available in 9.12.5.cl or later. + */ + 'data_format'?: FetchAnswerDataRequestDataFormatEnum; + /** + * The starting record number from where the records should be included. + */ + 'record_offset'?: number; + /** + * The number of records to include in a batch. + */ + 'record_size'?: number; + /** + * JSON object with representing filter condition to apply filters at runtime. For example, {\"col1\": \"item type\", \"op1\": \"EQ\", \"val1\": \"Bags\"} . You can add multiple keys by incrementing the number at the end, for example, col2, op2, val2, and col3, op3, val3. For more information, see [API Documentation](https://developers.thoughtspot.com/docs/fetch-data-and-report-apis#_runtime_filters). + */ + 'runtime_filter'?: any; + /** + * JSON object representing columns to sort data at runtime. For example, {\"sortCol1\": \"sales\", \"asc1\": true} . You can add multiple keys by incrementing the number at the end, for example, sortCol1, asc2. For more information, see [API Documentation](https://developers.thoughtspot.com/docs/fetch-data-and-report-apis#_runtime_sort). + */ + 'runtime_sort'?: any; + /** + * JSON object for setting values of parameters at runtime. For example, {\"param1\": \"Double List Param\", \"paramVal1\": 0.5}. You can add multiple keys by incrementing the number at the end, for example, param2, paramVal2. For more information, see [API Documentation](https://developers.thoughtspot.com/docs/fetch-data-and-report-apis#_runtime_parameters). + */ + 'runtime_param_override'?: any; + + static readonly discriminator: string | undefined = undefined; + + static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ + { + "name": "metadata_identifier", + "baseName": "metadata_identifier", + "type": "string", + "format": "" + }, + { + "name": "data_format", + "baseName": "data_format", + "type": "FetchAnswerDataRequestDataFormatEnum", + "format": "" + }, + { + "name": "record_offset", + "baseName": "record_offset", + "type": "number", + "format": "int32" + }, + { + "name": "record_size", + "baseName": "record_size", + "type": "number", + "format": "int32" + }, + { + "name": "runtime_filter", + "baseName": "runtime_filter", + "type": "any", + "format": "" + }, + { + "name": "runtime_sort", + "baseName": "runtime_sort", + "type": "any", + "format": "" + }, + { + "name": "runtime_param_override", + "baseName": "runtime_param_override", + "type": "any", + "format": "" + } ]; + + static getAttributeTypeMap() { + return FetchAnswerDataRequest.attributeTypeMap; + } + + public constructor() { + } +} + + +export type FetchAnswerDataRequestDataFormatEnum = "FULL" | "COMPACT" ; + diff --git a/sdks/typescript/models/FetchAnswerSqlQueryRequest.ts b/sdks/typescript/models/FetchAnswerSqlQueryRequest.ts new file mode 100644 index 000000000..461e2df89 --- /dev/null +++ b/sdks/typescript/models/FetchAnswerSqlQueryRequest.ts @@ -0,0 +1,38 @@ +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { HttpFile } from '../http/http'; + +export class FetchAnswerSqlQueryRequest { + /** + * ID or name of an Answer. + */ + 'metadata_identifier': string; + + static readonly discriminator: string | undefined = undefined; + + static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ + { + "name": "metadata_identifier", + "baseName": "metadata_identifier", + "type": "string", + "format": "" + } ]; + + static getAttributeTypeMap() { + return FetchAnswerSqlQueryRequest.attributeTypeMap; + } + + public constructor() { + } +} + diff --git a/sdks/typescript/models/FetchAsyncImportTaskStatusRequest.ts b/sdks/typescript/models/FetchAsyncImportTaskStatusRequest.ts new file mode 100644 index 000000000..a77164f1d --- /dev/null +++ b/sdks/typescript/models/FetchAsyncImportTaskStatusRequest.ts @@ -0,0 +1,91 @@ +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { HttpFile } from '../http/http'; + +export class FetchAsyncImportTaskStatusRequest { + /** + * List of task IDs to fetch status for. + */ + 'task_ids'?: Array; + /** + * List of task statuses to filter on. Valid values: [IN_QUEUE, IN_PROGRESS, COMPLETED, FAILED] + */ + 'task_status'?: Array; + /** + * Author GUID or name of async import tasks to filter on. + */ + 'author_identifier'?: string; + /** + * The offset point, starting from where the task status should be included in the response. + */ + 'record_offset'?: number; + /** + * The number of task statuses that should be included in the response starting from offset position. + */ + 'record_size'?: number; + /** + * Boolean flag to specify whether to include import response in the task status objects. + */ + 'include_import_response'?: boolean | null; + + static readonly discriminator: string | undefined = undefined; + + static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ + { + "name": "task_ids", + "baseName": "task_ids", + "type": "Array", + "format": "" + }, + { + "name": "task_status", + "baseName": "task_status", + "type": "Array", + "format": "" + }, + { + "name": "author_identifier", + "baseName": "author_identifier", + "type": "string", + "format": "" + }, + { + "name": "record_offset", + "baseName": "record_offset", + "type": "number", + "format": "int32" + }, + { + "name": "record_size", + "baseName": "record_size", + "type": "number", + "format": "int32" + }, + { + "name": "include_import_response", + "baseName": "include_import_response", + "type": "boolean", + "format": "" + } ]; + + static getAttributeTypeMap() { + return FetchAsyncImportTaskStatusRequest.attributeTypeMap; + } + + public constructor() { + } +} + + +export type FetchAsyncImportTaskStatusRequestTaskStatusEnum = "COMPLETED" | "IN_QUEUE" | "IN_PROGRESS" | "FAILED" ; + diff --git a/sdks/typescript/models/FetchColumnSecurityRulesRequest.ts b/sdks/typescript/models/FetchColumnSecurityRulesRequest.ts new file mode 100644 index 000000000..e4c643387 --- /dev/null +++ b/sdks/typescript/models/FetchColumnSecurityRulesRequest.ts @@ -0,0 +1,39 @@ +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { ColumnSecurityRuleTableInput } from '../models/ColumnSecurityRuleTableInput'; +import { HttpFile } from '../http/http'; + +export class FetchColumnSecurityRulesRequest { + /** + * Array of table identifier objects for which to fetch column security rules + */ + 'tables': Array; + + static readonly discriminator: string | undefined = undefined; + + static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ + { + "name": "tables", + "baseName": "tables", + "type": "Array", + "format": "" + } ]; + + static getAttributeTypeMap() { + return FetchColumnSecurityRulesRequest.attributeTypeMap; + } + + public constructor() { + } +} + diff --git a/sdks/typescript/models/FetchConnectionDiffStatusResponse.ts b/sdks/typescript/models/FetchConnectionDiffStatusResponse.ts new file mode 100644 index 000000000..19894cecf --- /dev/null +++ b/sdks/typescript/models/FetchConnectionDiffStatusResponse.ts @@ -0,0 +1,38 @@ +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { HttpFile } from '../http/http'; + +export class FetchConnectionDiffStatusResponse { + /** + * Status of the connection diff. + */ + 'status'?: boolean | null; + + static readonly discriminator: string | undefined = undefined; + + static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ + { + "name": "status", + "baseName": "status", + "type": "boolean", + "format": "" + } ]; + + static getAttributeTypeMap() { + return FetchConnectionDiffStatusResponse.attributeTypeMap; + } + + public constructor() { + } +} + diff --git a/sdks/typescript/models/FetchLiveboardDataRequest.ts b/sdks/typescript/models/FetchLiveboardDataRequest.ts new file mode 100644 index 000000000..5cc18991c --- /dev/null +++ b/sdks/typescript/models/FetchLiveboardDataRequest.ts @@ -0,0 +1,121 @@ +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { HttpFile } from '../http/http'; + +export class FetchLiveboardDataRequest { + /** + * GUID or name of the Liveboard. + */ + 'metadata_identifier': string; + /** + * GUIDs or names of the visualizations on the Liveboard. + */ + 'visualization_identifiers'?: Array; + /** + * Transient content of the Liveboard. + */ + 'transient_content'?: string; + /** + * JSON output in compact or full format. The FULL option is available in 9.12.5.cl or later. + */ + 'data_format'?: FetchLiveboardDataRequestDataFormatEnum; + /** + * The starting record number from where the records should be included. + */ + 'record_offset'?: number; + /** + * The number of records to include in a batch. + */ + 'record_size'?: number; + /** + * JSON object with representing filter condition to apply filters at runtime. For example, {\"col1\": \"item type\", \"op1\": \"EQ\", \"val1\": \"Bags\"} . You can add multiple keys by incrementing the number at the end, for example, col2, op2, val2, and col3, op3, val3. For more information, see [API Documentation](https://developers.thoughtspot.com/docs/fetch-data-and-report-apis#_runtime_filters). + */ + 'runtime_filter'?: any; + /** + * JSON object representing columns to sort data at runtime. For example, {\"sortCol1\": \"sales\", \"asc1\": true} . You can add multiple keys by incrementing the number at the end, for example, sortCol1, asc2. For more information, see [API Documentation](https://developers.thoughtspot.com/docs/fetch-data-and-report-apis#_runtime_sort). + */ + 'runtime_sort'?: any; + /** + * JSON object for setting values of parameters at runtime. For example, {\"param1\": \"Double List Param\", \"paramVal1\": 0.5}. You can add multiple keys by incrementing the number at the end, for example, param2, paramVal2. For more information, see [API Documentation](https://developers.thoughtspot.com/docs/fetch-data-and-report-apis#_runtime_parameters). + */ + 'runtime_param_override'?: any; + + static readonly discriminator: string | undefined = undefined; + + static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ + { + "name": "metadata_identifier", + "baseName": "metadata_identifier", + "type": "string", + "format": "" + }, + { + "name": "visualization_identifiers", + "baseName": "visualization_identifiers", + "type": "Array", + "format": "" + }, + { + "name": "transient_content", + "baseName": "transient_content", + "type": "string", + "format": "" + }, + { + "name": "data_format", + "baseName": "data_format", + "type": "FetchLiveboardDataRequestDataFormatEnum", + "format": "" + }, + { + "name": "record_offset", + "baseName": "record_offset", + "type": "number", + "format": "int32" + }, + { + "name": "record_size", + "baseName": "record_size", + "type": "number", + "format": "int32" + }, + { + "name": "runtime_filter", + "baseName": "runtime_filter", + "type": "any", + "format": "" + }, + { + "name": "runtime_sort", + "baseName": "runtime_sort", + "type": "any", + "format": "" + }, + { + "name": "runtime_param_override", + "baseName": "runtime_param_override", + "type": "any", + "format": "" + } ]; + + static getAttributeTypeMap() { + return FetchLiveboardDataRequest.attributeTypeMap; + } + + public constructor() { + } +} + + +export type FetchLiveboardDataRequestDataFormatEnum = "FULL" | "COMPACT" ; + diff --git a/sdks/typescript/models/FetchLiveboardSqlQueryRequest.ts b/sdks/typescript/models/FetchLiveboardSqlQueryRequest.ts new file mode 100644 index 000000000..b818a9050 --- /dev/null +++ b/sdks/typescript/models/FetchLiveboardSqlQueryRequest.ts @@ -0,0 +1,48 @@ +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { HttpFile } from '../http/http'; + +export class FetchLiveboardSqlQueryRequest { + /** + * ID or name of the Liveboard. + */ + 'metadata_identifier': string; + /** + * Unique ID or name of visualizations. + */ + 'visualization_identifiers'?: Array; + + static readonly discriminator: string | undefined = undefined; + + static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ + { + "name": "metadata_identifier", + "baseName": "metadata_identifier", + "type": "string", + "format": "" + }, + { + "name": "visualization_identifiers", + "baseName": "visualization_identifiers", + "type": "Array", + "format": "" + } ]; + + static getAttributeTypeMap() { + return FetchLiveboardSqlQueryRequest.attributeTypeMap; + } + + public constructor() { + } +} + diff --git a/sdks/typescript/models/FetchLogsRequest.ts b/sdks/typescript/models/FetchLogsRequest.ts new file mode 100644 index 000000000..5659308ee --- /dev/null +++ b/sdks/typescript/models/FetchLogsRequest.ts @@ -0,0 +1,71 @@ +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { HttpFile } from '../http/http'; + +export class FetchLogsRequest { + /** + * Name of the log type + */ + 'log_type': FetchLogsRequestLogTypeEnum; + /** + * Start time in EPOCH format + */ + 'start_epoch_time_in_millis'?: number; + /** + * End time in EPOCH format + */ + 'end_epoch_time_in_millis'?: number; + /** + * Fetch all the logs. This is available from 9.10.5.cl + */ + 'get_all_logs'?: boolean | null; + + static readonly discriminator: string | undefined = undefined; + + static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ + { + "name": "log_type", + "baseName": "log_type", + "type": "FetchLogsRequestLogTypeEnum", + "format": "" + }, + { + "name": "start_epoch_time_in_millis", + "baseName": "start_epoch_time_in_millis", + "type": "number", + "format": "float" + }, + { + "name": "end_epoch_time_in_millis", + "baseName": "end_epoch_time_in_millis", + "type": "number", + "format": "float" + }, + { + "name": "get_all_logs", + "baseName": "get_all_logs", + "type": "boolean", + "format": "" + } ]; + + static getAttributeTypeMap() { + return FetchLogsRequest.attributeTypeMap; + } + + public constructor() { + } +} + + +export type FetchLogsRequestLogTypeEnum = "SECURITY_AUDIT" ; + diff --git a/sdks/typescript/models/FetchObjectPrivilegesRequest.ts b/sdks/typescript/models/FetchObjectPrivilegesRequest.ts new file mode 100644 index 000000000..035b9a02d --- /dev/null +++ b/sdks/typescript/models/FetchObjectPrivilegesRequest.ts @@ -0,0 +1,70 @@ +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { ObjectPrivilegesMetadataInput } from '../models/ObjectPrivilegesMetadataInput'; +import { PrincipalsInput } from '../models/PrincipalsInput'; +import { HttpFile } from '../http/http'; + +export class FetchObjectPrivilegesRequest { + /** + * Metadata objects for which you want to fetch object privileges. For now only LOGICAL_TABLE is supported. It may be extended to other metadata types in the future. + */ + 'metadata': Array; + /** + * User or group objects for which you want to fetch object privileges. If not specified, the API returns all users and groups that have object privileges on the specified metadata objects. + */ + 'principals'?: Array; + /** + * The starting record number from where the records should be included for each metadata type. + */ + 'record_offset'?: number; + /** + * The number of records that should be included for each metadata type. + */ + 'record_size'?: number; + + static readonly discriminator: string | undefined = undefined; + + static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ + { + "name": "metadata", + "baseName": "metadata", + "type": "Array", + "format": "" + }, + { + "name": "principals", + "baseName": "principals", + "type": "Array", + "format": "" + }, + { + "name": "record_offset", + "baseName": "record_offset", + "type": "number", + "format": "int32" + }, + { + "name": "record_size", + "baseName": "record_size", + "type": "number", + "format": "int32" + } ]; + + static getAttributeTypeMap() { + return FetchObjectPrivilegesRequest.attributeTypeMap; + } + + public constructor() { + } +} + diff --git a/sdks/typescript/models/FetchPermissionsOfPrincipalsRequest.ts b/sdks/typescript/models/FetchPermissionsOfPrincipalsRequest.ts new file mode 100644 index 000000000..41ebbf76e --- /dev/null +++ b/sdks/typescript/models/FetchPermissionsOfPrincipalsRequest.ts @@ -0,0 +1,83 @@ +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { PermissionsMetadataTypeInput } from '../models/PermissionsMetadataTypeInput'; +import { PrincipalsInput } from '../models/PrincipalsInput'; +import { HttpFile } from '../http/http'; + +export class FetchPermissionsOfPrincipalsRequest { + /** + * GUID or name of the user or group. + */ + 'principals': Array; + /** + * Metadata objects for which you want to fetch permission details. If not specified, the API returns permission details for all metadata objects that the specified users and groups can access. + */ + 'metadata'?: Array; + /** + * The starting record number from where the records should be included for each metadata type. + */ + 'record_offset'?: number; + /** + * The number of records that should be included for each metadata type. + */ + 'record_size'?: number; + /** + * When no metadata objects input is passed, metadata objects of this type are fetched. + */ + 'default_metadata_type'?: FetchPermissionsOfPrincipalsRequestDefaultMetadataTypeEnum; + + static readonly discriminator: string | undefined = undefined; + + static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ + { + "name": "principals", + "baseName": "principals", + "type": "Array", + "format": "" + }, + { + "name": "metadata", + "baseName": "metadata", + "type": "Array", + "format": "" + }, + { + "name": "record_offset", + "baseName": "record_offset", + "type": "number", + "format": "int32" + }, + { + "name": "record_size", + "baseName": "record_size", + "type": "number", + "format": "int32" + }, + { + "name": "default_metadata_type", + "baseName": "default_metadata_type", + "type": "FetchPermissionsOfPrincipalsRequestDefaultMetadataTypeEnum", + "format": "" + } ]; + + static getAttributeTypeMap() { + return FetchPermissionsOfPrincipalsRequest.attributeTypeMap; + } + + public constructor() { + } +} + + +export type FetchPermissionsOfPrincipalsRequestDefaultMetadataTypeEnum = "ALL" | "LIVEBOARD" | "ANSWER" | "LOGICAL_TABLE" | "LOGICAL_COLUMN" | "CONNECTION" | "COLLECTION" ; + diff --git a/sdks/typescript/models/FetchPermissionsOnMetadataRequest.ts b/sdks/typescript/models/FetchPermissionsOnMetadataRequest.ts new file mode 100644 index 000000000..7c48cc16c --- /dev/null +++ b/sdks/typescript/models/FetchPermissionsOnMetadataRequest.ts @@ -0,0 +1,90 @@ +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { PermissionsMetadataTypeInput } from '../models/PermissionsMetadataTypeInput'; +import { PrincipalsInput } from '../models/PrincipalsInput'; +import { HttpFile } from '../http/http'; + +export class FetchPermissionsOnMetadataRequest { + /** + * GUID or name of the metadata object. + */ + 'metadata': Array; + /** + * User or group objects for which you want to fetch permissions. If not specified, the API returns all users and groups that can access the specified metadata objects. + */ + 'principals'?: Array; + /** + * Indicates whether to fetch permissions of dependent metadata objects. + */ + 'include_dependent_objects'?: boolean | null; + /** + * The starting record number from where the records should be included for each metadata type. + */ + 'record_offset'?: number; + /** + * The number of records that should be included for each metadata type. + */ + 'record_size'?: number; + /** + *
Version: 10.3.0.cl or later
Specifies the type of permission. Valid values are: EFFECTIVE - If the user permission to the metadata objects is granted by the privileges assigned to the groups to which they belong. DEFINED - If a user or user group received access to metadata objects via object sharing by another user. + */ + 'permission_type'?: string; + + static readonly discriminator: string | undefined = undefined; + + static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ + { + "name": "metadata", + "baseName": "metadata", + "type": "Array", + "format": "" + }, + { + "name": "principals", + "baseName": "principals", + "type": "Array", + "format": "" + }, + { + "name": "include_dependent_objects", + "baseName": "include_dependent_objects", + "type": "boolean", + "format": "" + }, + { + "name": "record_offset", + "baseName": "record_offset", + "type": "number", + "format": "int32" + }, + { + "name": "record_size", + "baseName": "record_size", + "type": "number", + "format": "int32" + }, + { + "name": "permission_type", + "baseName": "permission_type", + "type": "string", + "format": "" + } ]; + + static getAttributeTypeMap() { + return FetchPermissionsOnMetadataRequest.attributeTypeMap; + } + + public constructor() { + } +} + diff --git a/sdks/typescript/models/FilterRules.ts b/sdks/typescript/models/FilterRules.ts new file mode 100644 index 000000000..537778c95 --- /dev/null +++ b/sdks/typescript/models/FilterRules.ts @@ -0,0 +1,64 @@ +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { HttpFile } from '../http/http'; + +/** +* Filter Rules to be applied on Objects. +*/ +export class FilterRules { + /** + * The name of the column to apply the filter on. + */ + 'column_name': string; + /** + * The operator to use for filtering. Example: EQ (equals), GT(greater than), etc. + */ + 'operator': FilterRulesOperatorEnum; + /** + * The values to filter on. To get all records, use TS_WILDCARD_ALL as values. + */ + 'values': Array; + + static readonly discriminator: string | undefined = undefined; + + static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ + { + "name": "column_name", + "baseName": "column_name", + "type": "string", + "format": "" + }, + { + "name": "operator", + "baseName": "operator", + "type": "FilterRulesOperatorEnum", + "format": "" + }, + { + "name": "values", + "baseName": "values", + "type": "Array", + "format": "" + } ]; + + static getAttributeTypeMap() { + return FilterRules.attributeTypeMap; + } + + public constructor() { + } +} + + +export type FilterRulesOperatorEnum = "EQ" | "NE" | "LT" | "LE" | "GT" | "GE" | "IN" | "BW" | "CONTAINS" | "BEGINS_WITH" | "ENDS_WITH" | "BW_INC" | "BW_INC_MIN" | "BW_INC_MAX" | "LIKE" | "NOT_IN" ; + diff --git a/sdks/typescript/models/ForceLogoutUsersRequest.ts b/sdks/typescript/models/ForceLogoutUsersRequest.ts new file mode 100644 index 000000000..7ff0710f4 --- /dev/null +++ b/sdks/typescript/models/ForceLogoutUsersRequest.ts @@ -0,0 +1,38 @@ +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { HttpFile } from '../http/http'; + +export class ForceLogoutUsersRequest { + /** + * GUID or name of the users for force logging out their sessions. + */ + 'user_identifiers'?: Array; + + static readonly discriminator: string | undefined = undefined; + + static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ + { + "name": "user_identifiers", + "baseName": "user_identifiers", + "type": "Array", + "format": "" + } ]; + + static getAttributeTypeMap() { + return ForceLogoutUsersRequest.attributeTypeMap; + } + + public constructor() { + } +} + diff --git a/sdks/typescript/models/Frequency.ts b/sdks/typescript/models/Frequency.ts new file mode 100644 index 000000000..aa1ff072b --- /dev/null +++ b/sdks/typescript/models/Frequency.ts @@ -0,0 +1,39 @@ +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { CronExpression } from '../models/CronExpression'; +import { HttpFile } from '../http/http'; + +/** +* Configuration of schedule with cron expression +*/ +export class Frequency { + 'cron_expression': CronExpression; + + static readonly discriminator: string | undefined = undefined; + + static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ + { + "name": "cron_expression", + "baseName": "cron_expression", + "type": "CronExpression", + "format": "" + } ]; + + static getAttributeTypeMap() { + return Frequency.attributeTypeMap; + } + + public constructor() { + } +} + diff --git a/sdks/typescript/models/FrequencyInput.ts b/sdks/typescript/models/FrequencyInput.ts new file mode 100644 index 000000000..298934ff5 --- /dev/null +++ b/sdks/typescript/models/FrequencyInput.ts @@ -0,0 +1,39 @@ +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { CronExpressionInput } from '../models/CronExpressionInput'; +import { HttpFile } from '../http/http'; + +/** +* Configuration of schedule with cron expression +*/ +export class FrequencyInput { + 'cron_expression': CronExpressionInput; + + static readonly discriminator: string | undefined = undefined; + + static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ + { + "name": "cron_expression", + "baseName": "cron_expression", + "type": "CronExpressionInput", + "format": "" + } ]; + + static getAttributeTypeMap() { + return FrequencyInput.attributeTypeMap; + } + + public constructor() { + } +} + diff --git a/sdks/typescript/models/GenerateCSVRequest.ts b/sdks/typescript/models/GenerateCSVRequest.ts new file mode 100644 index 000000000..4e59d05e8 --- /dev/null +++ b/sdks/typescript/models/GenerateCSVRequest.ts @@ -0,0 +1,103 @@ +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { HttpFile } from '../http/http'; + +export class GenerateCSVRequest { + /** + * Start date for the calendar in `MM/dd/yyyy` format. + */ + 'start_date': string; + /** + * End date for the calendar in `MM/dd/yyyy` format. + */ + 'end_date': string; + /** + * Type of the calendar. + */ + 'calendar_type'?: GenerateCSVRequestCalendarTypeEnum; + /** + * Month offset to start calendar from `January`. + */ + 'month_offset'?: GenerateCSVRequestMonthOffsetEnum; + /** + * Specify the starting day of the week. + */ + 'start_day_of_week'?: GenerateCSVRequestStartDayOfWeekEnum; + /** + * Prefix to add before the quarter. + */ + 'quarter_name_prefix'?: string; + /** + * Prefix to add before the year. + */ + 'year_name_prefix'?: string; + + static readonly discriminator: string | undefined = undefined; + + static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ + { + "name": "start_date", + "baseName": "start_date", + "type": "string", + "format": "" + }, + { + "name": "end_date", + "baseName": "end_date", + "type": "string", + "format": "" + }, + { + "name": "calendar_type", + "baseName": "calendar_type", + "type": "GenerateCSVRequestCalendarTypeEnum", + "format": "" + }, + { + "name": "month_offset", + "baseName": "month_offset", + "type": "GenerateCSVRequestMonthOffsetEnum", + "format": "" + }, + { + "name": "start_day_of_week", + "baseName": "start_day_of_week", + "type": "GenerateCSVRequestStartDayOfWeekEnum", + "format": "" + }, + { + "name": "quarter_name_prefix", + "baseName": "quarter_name_prefix", + "type": "string", + "format": "" + }, + { + "name": "year_name_prefix", + "baseName": "year_name_prefix", + "type": "string", + "format": "" + } ]; + + static getAttributeTypeMap() { + return GenerateCSVRequest.attributeTypeMap; + } + + public constructor() { + } +} + + +export type GenerateCSVRequestCalendarTypeEnum = "MONTH_OFFSET" | "FOUR_FOUR_FIVE" | "FOUR_FIVE_FOUR" | "FIVE_FOUR_FOUR" ; +export type GenerateCSVRequestMonthOffsetEnum = "January" | "February" | "March" | "April" | "May" | "June" | "July" | "August" | "September" | "October" | "November" | "December" ; +export type GenerateCSVRequestStartDayOfWeekEnum = "Sunday" | "Monday" | "Tuesday" | "Wednesday" | "Thursday" | "Friday" | "Saturday" ; + diff --git a/sdks/typescript/models/GenericInfo.ts b/sdks/typescript/models/GenericInfo.ts new file mode 100644 index 000000000..2fd65eae8 --- /dev/null +++ b/sdks/typescript/models/GenericInfo.ts @@ -0,0 +1,42 @@ +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { HttpFile } from '../http/http'; + +export class GenericInfo { + 'id'?: string | null; + 'name'?: string | null; + + static readonly discriminator: string | undefined = undefined; + + static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ + { + "name": "id", + "baseName": "id", + "type": "string", + "format": "" + }, + { + "name": "name", + "baseName": "name", + "type": "string", + "format": "" + } ]; + + static getAttributeTypeMap() { + return GenericInfo.attributeTypeMap; + } + + public constructor() { + } +} + diff --git a/sdks/typescript/models/GetAsyncImportStatusResponse.ts b/sdks/typescript/models/GetAsyncImportStatusResponse.ts new file mode 100644 index 000000000..9b4ffaac0 --- /dev/null +++ b/sdks/typescript/models/GetAsyncImportStatusResponse.ts @@ -0,0 +1,49 @@ +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { ImportEPackAsyncTaskStatus } from '../models/ImportEPackAsyncTaskStatus'; +import { HttpFile } from '../http/http'; + +export class GetAsyncImportStatusResponse { + /** + * List of task statuses. + */ + 'status_list'?: Array | null; + /** + * Indicates whether there are more task statuses to fetch. + */ + 'last_batch'?: boolean | null; + + static readonly discriminator: string | undefined = undefined; + + static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ + { + "name": "status_list", + "baseName": "status_list", + "type": "Array", + "format": "" + }, + { + "name": "last_batch", + "baseName": "last_batch", + "type": "boolean", + "format": "" + } ]; + + static getAttributeTypeMap() { + return GetAsyncImportStatusResponse.attributeTypeMap; + } + + public constructor() { + } +} + diff --git a/sdks/typescript/models/GetCustomAccessTokenRequest.ts b/sdks/typescript/models/GetCustomAccessTokenRequest.ts new file mode 100644 index 000000000..893d663a2 --- /dev/null +++ b/sdks/typescript/models/GetCustomAccessTokenRequest.ts @@ -0,0 +1,176 @@ +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { FilterRules } from '../models/FilterRules'; +import { GroupObject } from '../models/GroupObject'; +import { ParameterValues } from '../models/ParameterValues'; +import { TokenAccessScopeObject } from '../models/TokenAccessScopeObject'; +import { VariableValues } from '../models/VariableValues'; +import { HttpFile } from '../http/http'; + +export class GetCustomAccessTokenRequest { + /** + * Username of the ThoughtSpot user. The username is stored in the `name` attribute of the user object. + */ + 'username': string; + /** + * Password of the user account + */ + 'password'?: string; + /** + * The secret key string provided by the ThoughtSpot application server. ThoughtSpot generates a secret key when Trusted authentication is enabled. + */ + 'secret_key'?: string; + /** + * Token validity duration in seconds + */ + 'validity_time_in_sec'?: number; + /** + * ID or name of the Org context to log in to. If the Org ID or name is not specified but a secret key is provided, the user will be logged into the Org associated with the secret key. If neither the Org ID/name nor the secret key is provided, the user will be logged into the Org context from their previous login session. + */ + 'org_identifier'?: string; + /** + * Indicates whether the specified attributes should be persisted or not. RESET and NONE are not applicable if you are setting variable_values. + */ + 'persist_option': GetCustomAccessTokenRequestPersistOptionEnum; + /** + * Filter rules. + */ + 'filter_rules'?: Array; + /** + * Allows developers to assign parameter values for existing parameters to a user at login. Note: Using parameter values for row level security use cases will ultimately be deprecated. Developers can still pass data security values via the Custom Access token via the variable_values field and create RLS rules based on custom variables. Please refer to the [ABAC via RLS documentation](https://developers.thoughtspot.com/docs/abac-user-parameters) for more details. + */ + 'parameter_values'?: Array; + /** + * List of variable values where `name` references an existing formula variable and `values` is any value from the corresponding column. Version: 10.14.0.cl or later + */ + 'variable_values'?: Array; + /** + * Objects on which the parameter and variable values should be applied to + */ + 'objects'?: Array; + /** + * (just-in-time (JIT) provisioning)Email address of the user. Specify this attribute when creating a new user. + */ + 'email'?: string; + /** + * (just-in-time (JIT) provisioning) Indicates display name of the user. Specify this attribute when creating a new user. + */ + 'display_name'?: string; + /** + * (just-in-time (JIT) provisioning) ID or name of the groups to which the newly created user belongs. Specify this attribute when creating a new user. + */ + 'groups'?: Array; + /** + * Creates a new user if the specified username does not exist in ThoughtSpot. To provision a user just-in-time (JIT), set this attribute to true. Note: For JIT provisioning of a user, the secret_key is required. New formula variables won\'t be created. Version: 10.5.0.cl or later + */ + 'auto_create'?: boolean | null; + + static readonly discriminator: string | undefined = undefined; + + static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ + { + "name": "username", + "baseName": "username", + "type": "string", + "format": "" + }, + { + "name": "password", + "baseName": "password", + "type": "string", + "format": "" + }, + { + "name": "secret_key", + "baseName": "secret_key", + "type": "string", + "format": "" + }, + { + "name": "validity_time_in_sec", + "baseName": "validity_time_in_sec", + "type": "number", + "format": "int32" + }, + { + "name": "org_identifier", + "baseName": "org_identifier", + "type": "string", + "format": "" + }, + { + "name": "persist_option", + "baseName": "persist_option", + "type": "GetCustomAccessTokenRequestPersistOptionEnum", + "format": "" + }, + { + "name": "filter_rules", + "baseName": "filter_rules", + "type": "Array", + "format": "" + }, + { + "name": "parameter_values", + "baseName": "parameter_values", + "type": "Array", + "format": "" + }, + { + "name": "variable_values", + "baseName": "variable_values", + "type": "Array", + "format": "" + }, + { + "name": "objects", + "baseName": "objects", + "type": "Array", + "format": "" + }, + { + "name": "email", + "baseName": "email", + "type": "string", + "format": "" + }, + { + "name": "display_name", + "baseName": "display_name", + "type": "string", + "format": "" + }, + { + "name": "groups", + "baseName": "groups", + "type": "Array", + "format": "" + }, + { + "name": "auto_create", + "baseName": "auto_create", + "type": "boolean", + "format": "" + } ]; + + static getAttributeTypeMap() { + return GetCustomAccessTokenRequest.attributeTypeMap; + } + + public constructor() { + } +} + + +export type GetCustomAccessTokenRequestPersistOptionEnum = "REPLACE" | "APPEND" | "NONE" | "RESET" ; + diff --git a/sdks/typescript/models/GetDataSourceSuggestionsRequest.ts b/sdks/typescript/models/GetDataSourceSuggestionsRequest.ts new file mode 100644 index 000000000..7b18bad67 --- /dev/null +++ b/sdks/typescript/models/GetDataSourceSuggestionsRequest.ts @@ -0,0 +1,38 @@ +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { HttpFile } from '../http/http'; + +export class GetDataSourceSuggestionsRequest { + /** + * User query used to suggest data sources. + */ + 'query': string; + + static readonly discriminator: string | undefined = undefined; + + static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ + { + "name": "query", + "baseName": "query", + "type": "string", + "format": "" + } ]; + + static getAttributeTypeMap() { + return GetDataSourceSuggestionsRequest.attributeTypeMap; + } + + public constructor() { + } +} + diff --git a/sdks/typescript/models/GetFullAccessTokenRequest.ts b/sdks/typescript/models/GetFullAccessTokenRequest.ts new file mode 100644 index 000000000..73fd7aa3b --- /dev/null +++ b/sdks/typescript/models/GetFullAccessTokenRequest.ts @@ -0,0 +1,126 @@ +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { GetFullAccessTokenRequestUserParameters } from '../models/GetFullAccessTokenRequestUserParameters'; +import { HttpFile } from '../http/http'; + +export class GetFullAccessTokenRequest { + /** + * Username of the ThoughtSpot user. The username is stored in the `name` attribute of the user object. + */ + 'username': string; + /** + * Password of the user account + */ + 'password'?: string; + /** + * The secret key string provided by the ThoughtSpot application server. ThoughtSpot generates a secret key when Trusted authentication is enabled. + */ + 'secret_key'?: string; + /** + * Token validity duration in seconds + */ + 'validity_time_in_sec'?: number; + /** + * ID of the Org context to log in to. If the Org ID is not specified and secret key is provided then user will be logged into the org corresponding to the secret key, and if secret key is not provided then user will be logged in to the Org context of their previous login session. + */ + 'org_id'?: number; + /** + * Email address of the user. Specify this attribute when creating a new user (just-in-time (JIT) provisioning). + */ + 'email'?: string; + /** + * Indicates display name of the user. Use this parameter to provision a user just-in-time (JIT). + */ + 'display_name'?: string; + /** + * Creates a new user if the specified username does not already exist in ThoughtSpot. To provision a user just-in-time (JIT), set this attribute to true. Note: For JIT provisioning of a user, the secret_key is required. + */ + 'auto_create'?: boolean | null; + /** + * ID or name of the groups to which the newly created user belongs. Use this parameter to provision a user just-in-time (JIT). + */ + 'group_identifiers'?: Array; + 'user_parameters'?: GetFullAccessTokenRequestUserParameters; + + static readonly discriminator: string | undefined = undefined; + + static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ + { + "name": "username", + "baseName": "username", + "type": "string", + "format": "" + }, + { + "name": "password", + "baseName": "password", + "type": "string", + "format": "" + }, + { + "name": "secret_key", + "baseName": "secret_key", + "type": "string", + "format": "" + }, + { + "name": "validity_time_in_sec", + "baseName": "validity_time_in_sec", + "type": "number", + "format": "int32" + }, + { + "name": "org_id", + "baseName": "org_id", + "type": "number", + "format": "int32" + }, + { + "name": "email", + "baseName": "email", + "type": "string", + "format": "" + }, + { + "name": "display_name", + "baseName": "display_name", + "type": "string", + "format": "" + }, + { + "name": "auto_create", + "baseName": "auto_create", + "type": "boolean", + "format": "" + }, + { + "name": "group_identifiers", + "baseName": "group_identifiers", + "type": "Array", + "format": "" + }, + { + "name": "user_parameters", + "baseName": "user_parameters", + "type": "GetFullAccessTokenRequestUserParameters", + "format": "" + } ]; + + static getAttributeTypeMap() { + return GetFullAccessTokenRequest.attributeTypeMap; + } + + public constructor() { + } +} + diff --git a/sdks/typescript/models/GetFullAccessTokenRequestUserParameters.ts b/sdks/typescript/models/GetFullAccessTokenRequestUserParameters.ts new file mode 100644 index 000000000..74960a2c7 --- /dev/null +++ b/sdks/typescript/models/GetFullAccessTokenRequestUserParameters.ts @@ -0,0 +1,72 @@ +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { RuntimeFilters } from '../models/RuntimeFilters'; +import { RuntimeParameters } from '../models/RuntimeParameters'; +import { RuntimeSorts } from '../models/RuntimeSorts'; +import { UserObject } from '../models/UserObject'; +import { HttpFile } from '../http/http'; + +/** +*
Deprecated: 10.4.0.cl and later
Define attributes such as Runtime filters and Runtime parameters to send security entitlements to a user session. For more information, see [Documentation](https://developers.thoughtspot.com/docs/abac-user-parameters). +*/ +export class GetFullAccessTokenRequestUserParameters { + 'objects'?: Array | null; + /** + * Objects to apply the User_Runtime_Filters. Examples to set the `runtime_filters` : ```json { \"column_name\": \"Color\", \"operator\": \"EQ\", \"values\": [\"red\"], \"persist\": false } ``` + */ + 'runtime_filters'?: Array | null; + /** + * Objects to apply the User_Runtime_Sorts. Examples to set the `runtime_sorts` : ```json { \"column_name\": \"Color\", \"order\": \"ASC\", \"persist\": false } ``` + */ + 'runtime_sorts'?: Array | null; + /** + * Objects to apply the Runtime_Parameters. Examples to set the `parameters` : ```json { \"name\": \"Color\", \"values\": [\"Blue\"], \"persist\": false } ``` + */ + 'parameters'?: Array | null; + + static readonly discriminator: string | undefined = undefined; + + static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ + { + "name": "objects", + "baseName": "objects", + "type": "Array", + "format": "" + }, + { + "name": "runtime_filters", + "baseName": "runtime_filters", + "type": "Array", + "format": "" + }, + { + "name": "runtime_sorts", + "baseName": "runtime_sorts", + "type": "Array", + "format": "" + }, + { + "name": "parameters", + "baseName": "parameters", + "type": "Array", + "format": "" + } ]; + + static getAttributeTypeMap() { + return GetFullAccessTokenRequestUserParameters.attributeTypeMap; + } + + public constructor() { + } +} + diff --git a/sdks/typescript/models/GetNLInstructionsRequest.ts b/sdks/typescript/models/GetNLInstructionsRequest.ts new file mode 100644 index 000000000..bc88d92f0 --- /dev/null +++ b/sdks/typescript/models/GetNLInstructionsRequest.ts @@ -0,0 +1,38 @@ +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { HttpFile } from '../http/http'; + +export class GetNLInstructionsRequest { + /** + * Unique ID or name of the data-model for which to retrieve NL instructions. + */ + 'data_source_identifier': string; + + static readonly discriminator: string | undefined = undefined; + + static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ + { + "name": "data_source_identifier", + "baseName": "data_source_identifier", + "type": "string", + "format": "" + } ]; + + static getAttributeTypeMap() { + return GetNLInstructionsRequest.attributeTypeMap; + } + + public constructor() { + } +} + diff --git a/sdks/typescript/models/GetObjectAccessTokenRequest.ts b/sdks/typescript/models/GetObjectAccessTokenRequest.ts new file mode 100644 index 000000000..64f52ce2e --- /dev/null +++ b/sdks/typescript/models/GetObjectAccessTokenRequest.ts @@ -0,0 +1,136 @@ +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { GetFullAccessTokenRequestUserParameters } from '../models/GetFullAccessTokenRequestUserParameters'; +import { HttpFile } from '../http/http'; + +export class GetObjectAccessTokenRequest { + /** + * Username of the ThoughtSpot user. The username is stored in the `name` attribute of the user object. + */ + 'username': string; + /** + * GUID of the ThoughtSpot metadata object that the user can access. The bearer will only have access to the object specified in the API request. + */ + 'object_id'?: string; + /** + * Password of the user account + */ + 'password'?: string; + /** + * The secret key string provided by the ThoughtSpot application server. ThoughtSpot generates a secret key when Trusted authentication is enabled. + */ + 'secret_key'?: string; + /** + * Token validity duration in seconds + */ + 'validity_time_in_sec'?: number; + /** + * ID of the Org context to log in to. If the Org ID is not specified and secret key is provided then user will be logged into the org corresponding to the secret key, and if secret key is not provided then user will be logged in to the Org context of their previous login session. + */ + 'org_id'?: number; + /** + * Email address of the user. Specify this attribute when creating a new user (just-in-time (JIT) provisioning). + */ + 'email'?: string; + /** + * Display name of the user. Specify this attribute when creating a new user (just-in-time (JIT) provisioning). + */ + 'display_name'?: string; + /** + * Creates a new user if the specified username does not exist in ThoughtSpot. To provision a user just-in-time (JIT), set this attribute to true. Note: For JIT provisioning of a user, the secret_key is required. + */ + 'auto_create'?: boolean | null; + /** + * Unique ID or name of the groups to which you want to assign the new user. You can specify this attribute to dynamically assign privileges during just-in-time (JIT) provisioning. + */ + 'group_identifiers'?: Array; + 'user_parameters'?: GetFullAccessTokenRequestUserParameters; + + static readonly discriminator: string | undefined = undefined; + + static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ + { + "name": "username", + "baseName": "username", + "type": "string", + "format": "" + }, + { + "name": "object_id", + "baseName": "object_id", + "type": "string", + "format": "" + }, + { + "name": "password", + "baseName": "password", + "type": "string", + "format": "" + }, + { + "name": "secret_key", + "baseName": "secret_key", + "type": "string", + "format": "" + }, + { + "name": "validity_time_in_sec", + "baseName": "validity_time_in_sec", + "type": "number", + "format": "int32" + }, + { + "name": "org_id", + "baseName": "org_id", + "type": "number", + "format": "int32" + }, + { + "name": "email", + "baseName": "email", + "type": "string", + "format": "" + }, + { + "name": "display_name", + "baseName": "display_name", + "type": "string", + "format": "" + }, + { + "name": "auto_create", + "baseName": "auto_create", + "type": "boolean", + "format": "" + }, + { + "name": "group_identifiers", + "baseName": "group_identifiers", + "type": "Array", + "format": "" + }, + { + "name": "user_parameters", + "baseName": "user_parameters", + "type": "GetFullAccessTokenRequestUserParameters", + "format": "" + } ]; + + static getAttributeTypeMap() { + return GetObjectAccessTokenRequest.attributeTypeMap; + } + + public constructor() { + } +} + diff --git a/sdks/typescript/models/GetRelevantQuestionsRequest.ts b/sdks/typescript/models/GetRelevantQuestionsRequest.ts new file mode 100644 index 000000000..d44af2ea6 --- /dev/null +++ b/sdks/typescript/models/GetRelevantQuestionsRequest.ts @@ -0,0 +1,74 @@ +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { GetRelevantQuestionsRequestAiContext } from '../models/GetRelevantQuestionsRequestAiContext'; +import { GetRelevantQuestionsRequestMetadataContext } from '../models/GetRelevantQuestionsRequestMetadataContext'; +import { HttpFile } from '../http/http'; + +export class GetRelevantQuestionsRequest { + 'metadata_context': GetRelevantQuestionsRequestMetadataContext; + /** + * Maximum number of relevant questions that is allowed in the response, default = 5. + */ + 'limit_relevant_questions'?: number; + /** + * If true, results are not returned from cache & calculated every time. + */ + 'bypass_cache'?: boolean | null; + /** + * A user query that requires breaking down into smaller, more manageable analytical questions to facilitate better understanding and analysis. + */ + 'query': string; + 'ai_context'?: GetRelevantQuestionsRequestAiContext; + + static readonly discriminator: string | undefined = undefined; + + static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ + { + "name": "metadata_context", + "baseName": "metadata_context", + "type": "GetRelevantQuestionsRequestMetadataContext", + "format": "" + }, + { + "name": "limit_relevant_questions", + "baseName": "limit_relevant_questions", + "type": "number", + "format": "int32" + }, + { + "name": "bypass_cache", + "baseName": "bypass_cache", + "type": "boolean", + "format": "" + }, + { + "name": "query", + "baseName": "query", + "type": "string", + "format": "" + }, + { + "name": "ai_context", + "baseName": "ai_context", + "type": "GetRelevantQuestionsRequestAiContext", + "format": "" + } ]; + + static getAttributeTypeMap() { + return GetRelevantQuestionsRequest.attributeTypeMap; + } + + public constructor() { + } +} + diff --git a/sdks/typescript/models/GetRelevantQuestionsRequestAiContext.ts b/sdks/typescript/models/GetRelevantQuestionsRequestAiContext.ts new file mode 100644 index 000000000..a1624814c --- /dev/null +++ b/sdks/typescript/models/GetRelevantQuestionsRequestAiContext.ts @@ -0,0 +1,51 @@ +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { HttpFile } from '../http/http'; + +/** +* Additional context to guide the response. +*/ +export class GetRelevantQuestionsRequestAiContext { + /** + * User specific text instructions sent to AI system for processing the query. + */ + 'instructions'?: Array | null; + /** + * User provided content like text data, csv data as a string message to provide context & potentially improve the quality of the response. + */ + 'content'?: Array | null; + + static readonly discriminator: string | undefined = undefined; + + static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ + { + "name": "instructions", + "baseName": "instructions", + "type": "Array", + "format": "" + }, + { + "name": "content", + "baseName": "content", + "type": "Array", + "format": "" + } ]; + + static getAttributeTypeMap() { + return GetRelevantQuestionsRequestAiContext.attributeTypeMap; + } + + public constructor() { + } +} + diff --git a/sdks/typescript/models/GetRelevantQuestionsRequestMetadataContext.ts b/sdks/typescript/models/GetRelevantQuestionsRequestMetadataContext.ts new file mode 100644 index 000000000..0f04b0d6c --- /dev/null +++ b/sdks/typescript/models/GetRelevantQuestionsRequestMetadataContext.ts @@ -0,0 +1,71 @@ +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { HttpFile } from '../http/http'; + +/** +* metadata for the query to enable generation of relevant sub-questions; at least one context identifier is required. +*/ +export class GetRelevantQuestionsRequestMetadataContext { + /** + * List of data_source_identifiers to provide context for breaking down user query into analytical queries that can be run on them. + */ + 'data_source_identifiers'?: Array | null; + /** + * List of answer unique identifiers (GUIDs) whose data will be used to guide the response. + */ + 'answer_identifiers'?: Array | null; + /** + * Unique identifier to denote current conversation. + */ + 'conversation_identifier'?: string | null; + /** + * List of liveboard unique identifiers (GUIDs) whose data will be used to guide the response. + */ + 'liveboard_identifiers'?: Array | null; + + static readonly discriminator: string | undefined = undefined; + + static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ + { + "name": "data_source_identifiers", + "baseName": "data_source_identifiers", + "type": "Array", + "format": "" + }, + { + "name": "answer_identifiers", + "baseName": "answer_identifiers", + "type": "Array", + "format": "" + }, + { + "name": "conversation_identifier", + "baseName": "conversation_identifier", + "type": "string", + "format": "" + }, + { + "name": "liveboard_identifiers", + "baseName": "liveboard_identifiers", + "type": "Array", + "format": "" + } ]; + + static getAttributeTypeMap() { + return GetRelevantQuestionsRequestMetadataContext.attributeTypeMap; + } + + public constructor() { + } +} + diff --git a/sdks/typescript/models/GetTokenResponse.ts b/sdks/typescript/models/GetTokenResponse.ts new file mode 100644 index 000000000..cdf3359aa --- /dev/null +++ b/sdks/typescript/models/GetTokenResponse.ts @@ -0,0 +1,78 @@ +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { HttpFile } from '../http/http'; + +export class GetTokenResponse { + /** + * Bearer auth token. + */ + 'token': string; + /** + * Token creation time in milliseconds. + */ + 'creation_time_in_millis': number; + /** + * Token expiration time in milliseconds. + */ + 'expiration_time_in_millis': number; + /** + * Username to whom the token is issued. + */ + 'valid_for_user_id': string; + /** + * Unique identifier of the user to whom the token is issued. + */ + 'valid_for_username': string; + + static readonly discriminator: string | undefined = undefined; + + static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ + { + "name": "token", + "baseName": "token", + "type": "string", + "format": "" + }, + { + "name": "creation_time_in_millis", + "baseName": "creation_time_in_millis", + "type": "number", + "format": "float" + }, + { + "name": "expiration_time_in_millis", + "baseName": "expiration_time_in_millis", + "type": "number", + "format": "float" + }, + { + "name": "valid_for_user_id", + "baseName": "valid_for_user_id", + "type": "string", + "format": "" + }, + { + "name": "valid_for_username", + "baseName": "valid_for_username", + "type": "string", + "format": "" + } ]; + + static getAttributeTypeMap() { + return GetTokenResponse.attributeTypeMap; + } + + public constructor() { + } +} + diff --git a/sdks/typescript/models/GroupInfo.ts b/sdks/typescript/models/GroupInfo.ts new file mode 100644 index 000000000..dac1a4a8a --- /dev/null +++ b/sdks/typescript/models/GroupInfo.ts @@ -0,0 +1,51 @@ +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { HttpFile } from '../http/http'; + +/** +* Group information for non-embed access. +*/ +export class GroupInfo { + /** + * Unique identifier of the group. + */ + 'id'?: string | null; + /** + * Name of the group. + */ + 'name'?: string | null; + + static readonly discriminator: string | undefined = undefined; + + static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ + { + "name": "id", + "baseName": "id", + "type": "string", + "format": "" + }, + { + "name": "name", + "baseName": "name", + "type": "string", + "format": "" + } ]; + + static getAttributeTypeMap() { + return GroupInfo.attributeTypeMap; + } + + public constructor() { + } +} + diff --git a/sdks/typescript/models/GroupObject.ts b/sdks/typescript/models/GroupObject.ts new file mode 100644 index 000000000..08dfdd52a --- /dev/null +++ b/sdks/typescript/models/GroupObject.ts @@ -0,0 +1,38 @@ +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { HttpFile } from '../http/http'; + +/** +* Groups objects. +*/ +export class GroupObject { + 'identifier'?: string | null; + + static readonly discriminator: string | undefined = undefined; + + static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ + { + "name": "identifier", + "baseName": "identifier", + "type": "string", + "format": "" + } ]; + + static getAttributeTypeMap() { + return GroupObject.attributeTypeMap; + } + + public constructor() { + } +} + diff --git a/sdks/typescript/models/GroupsImportListInput.ts b/sdks/typescript/models/GroupsImportListInput.ts new file mode 100644 index 000000000..14be85604 --- /dev/null +++ b/sdks/typescript/models/GroupsImportListInput.ts @@ -0,0 +1,123 @@ +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { HttpFile } from '../http/http'; + +export class GroupsImportListInput { + /** + * Unique display name of the group. + */ + 'display_name': string; + /** + * Unique ID or name of the group. + */ + 'group_identifier': string; + /** + * Unique ID of Liveboards that will be assigned as default Liveboards to the users in the group. + */ + 'default_liveboard_identifiers'?: Array | null; + /** + * Description of the group. + */ + 'description'?: string | null; + /** + * Privileges that will be assigned to the group. + */ + 'privileges'?: Array | null; + /** + * Unique ID or name of the sub-groups to add to the group. + */ + 'sub_group_identifiers'?: Array | null; + /** + * Type of the group. + */ + 'type'?: GroupsImportListInputTypeEnum | null; + /** + * Unique ID or name of the users to assign to the group. + */ + 'user_identifiers'?: Array | null; + /** + * Visibility of the group. The SHARABLE makes a group visible to other users and groups, and thus allows them to share objects. + */ + 'visibility'?: GroupsImportListInputVisibilityEnum | null; + + static readonly discriminator: string | undefined = undefined; + + static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ + { + "name": "display_name", + "baseName": "display_name", + "type": "string", + "format": "" + }, + { + "name": "group_identifier", + "baseName": "group_identifier", + "type": "string", + "format": "" + }, + { + "name": "default_liveboard_identifiers", + "baseName": "default_liveboard_identifiers", + "type": "Array", + "format": "" + }, + { + "name": "description", + "baseName": "description", + "type": "string", + "format": "" + }, + { + "name": "privileges", + "baseName": "privileges", + "type": "Array", + "format": "" + }, + { + "name": "sub_group_identifiers", + "baseName": "sub_group_identifiers", + "type": "Array", + "format": "" + }, + { + "name": "type", + "baseName": "type", + "type": "GroupsImportListInputTypeEnum", + "format": "" + }, + { + "name": "user_identifiers", + "baseName": "user_identifiers", + "type": "Array", + "format": "" + }, + { + "name": "visibility", + "baseName": "visibility", + "type": "GroupsImportListInputVisibilityEnum", + "format": "" + } ]; + + static getAttributeTypeMap() { + return GroupsImportListInput.attributeTypeMap; + } + + public constructor() { + } +} + + +export type GroupsImportListInputPrivilegesEnum = "ADMINISTRATION" | "AUTHORING" | "USERDATAUPLOADING" | "DATADOWNLOADING" | "USERMANAGEMENT" | "DATAMANAGEMENT" | "SHAREWITHALL" | "JOBSCHEDULING" | "A3ANALYSIS" | "EXPERIMENTALFEATUREPRIVILEGE" | "BYPASSRLS" | "RANALYSIS" | "DEVELOPER" | "USER_ADMINISTRATION" | "GROUP_ADMINISTRATION" | "SYNCMANAGEMENT" | "CAN_CREATE_CATALOG" | "DISABLE_PINBOARD_CREATION" | "LIVEBOARD_VERIFIER" | "PREVIEW_THOUGHTSPOT_SAGE" | "CAN_MANAGE_VERSION_CONTROL" | "THIRDPARTY_ANALYSIS" | "ALLOW_NON_EMBED_FULL_APP_ACCESS" | "CAN_ACCESS_ANALYST_STUDIO" | "CAN_MANAGE_ANALYST_STUDIO" | "CAN_MODIFY_FOLDERS" | "CAN_MANAGE_VARIABLES" | "CAN_VIEW_FOLDERS" | "CAN_MANAGE_AGENTSPOT" | "CAN_ACCESS_AGENTSPOT" | "PREVIEW_DOCUMENT_SEARCH" | "CAN_SETUP_VERSION_CONTROL" | "CAN_DOWNLOAD_VISUALS" | "CAN_DOWNLOAD_DETAILED_DATA" | "CAN_USE_SPOTTER" ; +export type GroupsImportListInputTypeEnum = "LOCAL_GROUP" | "LDAP_GROUP" | "TEAM_GROUP" | "TENANT_GROUP" ; +export type GroupsImportListInputVisibilityEnum = "SHARABLE" | "NON_SHARABLE" ; + diff --git a/sdks/typescript/models/HeaderAttributeInput.ts b/sdks/typescript/models/HeaderAttributeInput.ts new file mode 100644 index 000000000..05390cea3 --- /dev/null +++ b/sdks/typescript/models/HeaderAttributeInput.ts @@ -0,0 +1,51 @@ +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { HttpFile } from '../http/http'; + +/** +* Attribute to update in a header. +*/ +export class HeaderAttributeInput { + /** + * Attribute name to be updated. + */ + 'name': string; + /** + * Attribute\'s new value. + */ + 'value': string; + + static readonly discriminator: string | undefined = undefined; + + static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ + { + "name": "name", + "baseName": "name", + "type": "string", + "format": "" + }, + { + "name": "value", + "baseName": "value", + "type": "string", + "format": "" + } ]; + + static getAttributeTypeMap() { + return HeaderAttributeInput.attributeTypeMap; + } + + public constructor() { + } +} + diff --git a/sdks/typescript/models/HeaderUpdateInput.ts b/sdks/typescript/models/HeaderUpdateInput.ts new file mode 100644 index 000000000..d794074e4 --- /dev/null +++ b/sdks/typescript/models/HeaderUpdateInput.ts @@ -0,0 +1,75 @@ +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { HeaderAttributeInput } from '../models/HeaderAttributeInput'; +import { HttpFile } from '../http/http'; + +/** +* Favorite object options. +*/ +export class HeaderUpdateInput { + /** + * Unique ID of a specified type to identify the header. + */ + 'identifier'?: string | null; + /** + * Custom object identifier to uniquely identify header. + */ + 'obj_identifier'?: string | null; + /** + * Optional type of the header object. + */ + 'type'?: HeaderUpdateInputTypeEnum | null; + /** + * List of attributes to update + */ + 'attributes': Array; + + static readonly discriminator: string | undefined = undefined; + + static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ + { + "name": "identifier", + "baseName": "identifier", + "type": "string", + "format": "" + }, + { + "name": "obj_identifier", + "baseName": "obj_identifier", + "type": "string", + "format": "" + }, + { + "name": "type", + "baseName": "type", + "type": "HeaderUpdateInputTypeEnum", + "format": "" + }, + { + "name": "attributes", + "baseName": "attributes", + "type": "Array", + "format": "" + } ]; + + static getAttributeTypeMap() { + return HeaderUpdateInput.attributeTypeMap; + } + + public constructor() { + } +} + + +export type HeaderUpdateInputTypeEnum = "ANSWER" | "LOGICAL_TABLE" | "LOGICAL_COLUMN" | "LIVEBOARD" | "ACTION_OBJECT" | "DATA_SOURCE" | "USER" | "USER_GROUP" ; + diff --git a/sdks/typescript/models/ImportEPackAsyncTaskStatus.ts b/sdks/typescript/models/ImportEPackAsyncTaskStatus.ts new file mode 100644 index 000000000..f1a6d883a --- /dev/null +++ b/sdks/typescript/models/ImportEPackAsyncTaskStatus.ts @@ -0,0 +1,182 @@ +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { HttpFile } from '../http/http'; + +export class ImportEPackAsyncTaskStatus { + /** + * GUID of tenant from which the task is initiated. + */ + 'tenant_id'?: string | null; + /** + * Organisation ID of the user who initiated the task. + */ + 'org_id'?: number | null; + /** + * Unique identifier for the task. + */ + 'task_id'?: string | null; + /** + * Name of the task. + */ + 'task_name'?: string | null; + /** + * Response of imported objects so far. + */ + 'import_response'?: any | null; + /** + * Current status of the task. + */ + 'task_status'?: ImportEPackAsyncTaskStatusTaskStatusEnum | null; + /** + * ID of the user who initiated the task. + */ + 'author_id'?: string | null; + /** + * Policy used for the import task. + */ + 'import_policy'?: ImportEPackAsyncTaskStatusImportPolicyEnum | null; + /** + * Time when the task was created (in ms since epoch). + */ + 'created_at'?: number | null; + /** + * Time when the task started (in ms since epoch). + */ + 'in_progress_at'?: number | null; + /** + * Time when the task was completed (in ms since epoch). + */ + 'completed_at'?: number | null; + /** + * Total number of objects to process. + */ + 'total_object_count'?: number | null; + /** + * Number of objects processed so far. + */ + 'object_processed_count'?: number | null; + /** + * Last time the task status was updated (in ms since epoch). + */ + 'modified_at'?: number | null; + /** + * Display name of the user who initiated the task. + */ + 'author_display_name'?: string | null; + + static readonly discriminator: string | undefined = undefined; + + static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ + { + "name": "tenant_id", + "baseName": "tenant_id", + "type": "string", + "format": "" + }, + { + "name": "org_id", + "baseName": "org_id", + "type": "number", + "format": "int32" + }, + { + "name": "task_id", + "baseName": "task_id", + "type": "string", + "format": "" + }, + { + "name": "task_name", + "baseName": "task_name", + "type": "string", + "format": "" + }, + { + "name": "import_response", + "baseName": "import_response", + "type": "any", + "format": "" + }, + { + "name": "task_status", + "baseName": "task_status", + "type": "ImportEPackAsyncTaskStatusTaskStatusEnum", + "format": "" + }, + { + "name": "author_id", + "baseName": "author_id", + "type": "string", + "format": "" + }, + { + "name": "import_policy", + "baseName": "import_policy", + "type": "ImportEPackAsyncTaskStatusImportPolicyEnum", + "format": "" + }, + { + "name": "created_at", + "baseName": "created_at", + "type": "number", + "format": "float" + }, + { + "name": "in_progress_at", + "baseName": "in_progress_at", + "type": "number", + "format": "float" + }, + { + "name": "completed_at", + "baseName": "completed_at", + "type": "number", + "format": "float" + }, + { + "name": "total_object_count", + "baseName": "total_object_count", + "type": "number", + "format": "int32" + }, + { + "name": "object_processed_count", + "baseName": "object_processed_count", + "type": "number", + "format": "int32" + }, + { + "name": "modified_at", + "baseName": "modified_at", + "type": "number", + "format": "float" + }, + { + "name": "author_display_name", + "baseName": "author_display_name", + "type": "string", + "format": "" + } ]; + + static getAttributeTypeMap() { + return ImportEPackAsyncTaskStatus.attributeTypeMap; + } + + public constructor() { + } +} + + +export type ImportEPackAsyncTaskStatusTaskStatusEnum = "COMPLETED" | "IN_QUEUE" | "IN_PROGRESS" | "FAILED" ; +export type ImportEPackAsyncTaskStatusImportPolicyEnum = "PARTIAL" | "ALL_OR_NONE" | "VALIDATE_ONLY" | "PARTIAL_OBJECT" ; + diff --git a/sdks/typescript/models/ImportMetadataTMLAsyncRequest.ts b/sdks/typescript/models/ImportMetadataTMLAsyncRequest.ts new file mode 100644 index 000000000..fb43f551b --- /dev/null +++ b/sdks/typescript/models/ImportMetadataTMLAsyncRequest.ts @@ -0,0 +1,91 @@ +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { HttpFile } from '../http/http'; + +export class ImportMetadataTMLAsyncRequest { + /** + * Details of TML objects. + */ + 'metadata_tmls': Array; + /** + * If selected, creates TML objects with new GUIDs. + */ + 'create_new'?: boolean | null; + /** + * If import is happening from all orgs context. + */ + 'all_orgs_override'?: boolean | null; + /** + *
Version: 10.5.0.cl or later
Policy to be followed while importing the TML. Valid values are [PARTIAL_OBJECT, PARTIAL, VALIDATE_ONLY, ALL_OR_NONE] + */ + 'import_policy'?: ImportMetadataTMLAsyncRequestImportPolicyEnum; + /** + *
Version: 10.6.0.cl or later
Boolean Flag to skip TML diff check before processing object TMLs. + */ + 'skip_diff_check'?: boolean | null; + /** + *
Version: 10.5.0.cl or later
Boolean to indicate if the large metadata validation should be enabled. + */ + 'enable_large_metadata_validation'?: boolean | null; + + static readonly discriminator: string | undefined = undefined; + + static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ + { + "name": "metadata_tmls", + "baseName": "metadata_tmls", + "type": "Array", + "format": "" + }, + { + "name": "create_new", + "baseName": "create_new", + "type": "boolean", + "format": "" + }, + { + "name": "all_orgs_override", + "baseName": "all_orgs_override", + "type": "boolean", + "format": "" + }, + { + "name": "import_policy", + "baseName": "import_policy", + "type": "ImportMetadataTMLAsyncRequestImportPolicyEnum", + "format": "" + }, + { + "name": "skip_diff_check", + "baseName": "skip_diff_check", + "type": "boolean", + "format": "" + }, + { + "name": "enable_large_metadata_validation", + "baseName": "enable_large_metadata_validation", + "type": "boolean", + "format": "" + } ]; + + static getAttributeTypeMap() { + return ImportMetadataTMLAsyncRequest.attributeTypeMap; + } + + public constructor() { + } +} + + +export type ImportMetadataTMLAsyncRequestImportPolicyEnum = "PARTIAL" | "ALL_OR_NONE" | "VALIDATE_ONLY" | "PARTIAL_OBJECT" ; + diff --git a/sdks/typescript/models/ImportMetadataTMLRequest.ts b/sdks/typescript/models/ImportMetadataTMLRequest.ts new file mode 100644 index 000000000..09be9f4c9 --- /dev/null +++ b/sdks/typescript/models/ImportMetadataTMLRequest.ts @@ -0,0 +1,91 @@ +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { HttpFile } from '../http/http'; + +export class ImportMetadataTMLRequest { + /** + * Details of TML objects. **Note: importing TML in YAML format, when coming directly from our Playground, is currently requires manual formatting. For more details on the workaround, please click [here](https://developers.thoughtspot.com/docs/known-issues#_version_9_12_0_cl)** + */ + 'metadata_tmls': Array; + /** + * Specifies the import policy for the TML import. + */ + 'import_policy'?: ImportMetadataTMLRequestImportPolicyEnum; + /** + * If selected, creates TML objects with new GUIDs. + */ + 'create_new'?: boolean | null; + /** + * If import is happening from all orgs context. + */ + 'all_orgs_override'?: boolean | null; + /** + *
Version: 10.6.0.cl or later
Boolean Flag to skip TML diff check before processing object TMLs. + */ + 'skip_diff_check'?: boolean | null; + /** + *
Version: 10.5.0.cl or later
Boolean to indicate if the large metadata validation should be enabled. + */ + 'enable_large_metadata_validation'?: boolean | null; + + static readonly discriminator: string | undefined = undefined; + + static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ + { + "name": "metadata_tmls", + "baseName": "metadata_tmls", + "type": "Array", + "format": "" + }, + { + "name": "import_policy", + "baseName": "import_policy", + "type": "ImportMetadataTMLRequestImportPolicyEnum", + "format": "" + }, + { + "name": "create_new", + "baseName": "create_new", + "type": "boolean", + "format": "" + }, + { + "name": "all_orgs_override", + "baseName": "all_orgs_override", + "type": "boolean", + "format": "" + }, + { + "name": "skip_diff_check", + "baseName": "skip_diff_check", + "type": "boolean", + "format": "" + }, + { + "name": "enable_large_metadata_validation", + "baseName": "enable_large_metadata_validation", + "type": "boolean", + "format": "" + } ]; + + static getAttributeTypeMap() { + return ImportMetadataTMLRequest.attributeTypeMap; + } + + public constructor() { + } +} + + +export type ImportMetadataTMLRequestImportPolicyEnum = "PARTIAL" | "ALL_OR_NONE" | "VALIDATE_ONLY" | "PARTIAL_OBJECT" ; + diff --git a/sdks/typescript/models/ImportUser.ts b/sdks/typescript/models/ImportUser.ts new file mode 100644 index 000000000..883422920 --- /dev/null +++ b/sdks/typescript/models/ImportUser.ts @@ -0,0 +1,195 @@ +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { FavoriteMetadataInput } from '../models/FavoriteMetadataInput'; +import { HttpFile } from '../http/http'; + +export class ImportUser { + /** + * Unique ID or name of the user. + */ + 'user_identifier': string; + /** + * Display name of the user. + */ + 'display_name': string; + /** + * Password of the user. + */ + 'password'?: string | null; + /** + * Type of the user account. + */ + 'account_type'?: ImportUserAccountTypeEnum | null; + /** + * Status of the user account. + */ + 'account_status'?: ImportUserAccountStatusEnum | null; + /** + * Email address of the user. + */ + 'email'?: string | null; + /** + * ID or name of the Orgs to which the user belongs. + */ + 'org_identifiers'?: Array | null; + /** + * ID or name of the groups to which the user belongs. + */ + 'group_identifiers'?: Array | null; + /** + * Visibility of the users. The SHARABLE property makes a user visible to other users and group, who can share objects with the user. + */ + 'visibility'?: ImportUserVisibilityEnum | null; + /** + * Notify user when other users or groups share metadata objects + */ + 'notify_on_share'?: boolean | null; + /** + * Show or hide the new user onboarding walkthroughs + */ + 'show_onboarding_experience'?: boolean | null; + /** + * Revisit the new user onboarding walkthroughs + */ + 'onboarding_experience_completed'?: boolean | null; + /** + * Unique ID or name of the default Liveboard assigned to the user. + */ + 'home_liveboard_identifier'?: string | null; + /** + * Metadata objects to add to the user\'s favorites list. + */ + 'favorite_metadata'?: Array | null; + /** + * Locale for the user. When setting this value, do not set use_browser_language to true, otherwise the browser\'s language setting will take precedence and the preferred_locale value will be ignored. + */ + 'preferred_locale'?: ImportUserPreferredLocaleEnum | null; + /** + * Flag to indicate whether to use the browser locale for the user in the UI. When set to true, the preferred_locale value is unset and the browser\'s language setting takes precedence. Version: 26.3.0.cl or later + */ + 'use_browser_language'?: boolean | null; + + static readonly discriminator: string | undefined = undefined; + + static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ + { + "name": "user_identifier", + "baseName": "user_identifier", + "type": "string", + "format": "" + }, + { + "name": "display_name", + "baseName": "display_name", + "type": "string", + "format": "" + }, + { + "name": "password", + "baseName": "password", + "type": "string", + "format": "" + }, + { + "name": "account_type", + "baseName": "account_type", + "type": "ImportUserAccountTypeEnum", + "format": "" + }, + { + "name": "account_status", + "baseName": "account_status", + "type": "ImportUserAccountStatusEnum", + "format": "" + }, + { + "name": "email", + "baseName": "email", + "type": "string", + "format": "" + }, + { + "name": "org_identifiers", + "baseName": "org_identifiers", + "type": "Array", + "format": "" + }, + { + "name": "group_identifiers", + "baseName": "group_identifiers", + "type": "Array", + "format": "" + }, + { + "name": "visibility", + "baseName": "visibility", + "type": "ImportUserVisibilityEnum", + "format": "" + }, + { + "name": "notify_on_share", + "baseName": "notify_on_share", + "type": "boolean", + "format": "" + }, + { + "name": "show_onboarding_experience", + "baseName": "show_onboarding_experience", + "type": "boolean", + "format": "" + }, + { + "name": "onboarding_experience_completed", + "baseName": "onboarding_experience_completed", + "type": "boolean", + "format": "" + }, + { + "name": "home_liveboard_identifier", + "baseName": "home_liveboard_identifier", + "type": "string", + "format": "" + }, + { + "name": "favorite_metadata", + "baseName": "favorite_metadata", + "type": "Array", + "format": "" + }, + { + "name": "preferred_locale", + "baseName": "preferred_locale", + "type": "ImportUserPreferredLocaleEnum", + "format": "" + }, + { + "name": "use_browser_language", + "baseName": "use_browser_language", + "type": "boolean", + "format": "" + } ]; + + static getAttributeTypeMap() { + return ImportUser.attributeTypeMap; + } + + public constructor() { + } +} + + +export type ImportUserAccountTypeEnum = "LOCAL_USER" | "LDAP_USER" | "SAML_USER" | "OIDC_USER" | "REMOTE_USER" ; +export type ImportUserAccountStatusEnum = "ACTIVE" | "INACTIVE" | "EXPIRED" | "LOCKED" | "PENDING" | "SUSPENDED" ; +export type ImportUserVisibilityEnum = "SHARABLE" | "NON_SHARABLE" ; +export type ImportUserPreferredLocaleEnum = "en-CA" | "en-GB" | "en-US" | "de-DE" | "ja-JP" | "zh-CN" | "pt-BR" | "fr-FR" | "fr-CA" | "es-US" | "da-DK" | "es-ES" | "fi-FI" | "sv-SE" | "nb-NO" | "pt-PT" | "nl-NL" | "it-IT" | "ru-RU" | "en-IN" | "de-CH" | "en-NZ" | "es-MX" | "en-AU" | "zh-Hant" | "ko-KR" | "en-DE" ; + diff --git a/sdks/typescript/models/ImportUserGroupsRequest.ts b/sdks/typescript/models/ImportUserGroupsRequest.ts new file mode 100644 index 000000000..990bc1903 --- /dev/null +++ b/sdks/typescript/models/ImportUserGroupsRequest.ts @@ -0,0 +1,59 @@ +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { GroupsImportListInput } from '../models/GroupsImportListInput'; +import { HttpFile } from '../http/http'; + +export class ImportUserGroupsRequest { + /** + * Details of groups which are to be imported + */ + 'groups'?: Array; + /** + * If set to true, removes groups that are not specified in the API request. + */ + 'delete_unspecified_groups'?: boolean | null; + /** + * If true, the API performs a test operation and returns user IDs whose data will be edited after the import. + */ + 'dry_run'?: boolean | null; + + static readonly discriminator: string | undefined = undefined; + + static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ + { + "name": "groups", + "baseName": "groups", + "type": "Array", + "format": "" + }, + { + "name": "delete_unspecified_groups", + "baseName": "delete_unspecified_groups", + "type": "boolean", + "format": "" + }, + { + "name": "dry_run", + "baseName": "dry_run", + "type": "boolean", + "format": "" + } ]; + + static getAttributeTypeMap() { + return ImportUserGroupsRequest.attributeTypeMap; + } + + public constructor() { + } +} + diff --git a/sdks/typescript/models/ImportUserGroupsResponse.ts b/sdks/typescript/models/ImportUserGroupsResponse.ts new file mode 100644 index 000000000..5cebbf7b9 --- /dev/null +++ b/sdks/typescript/models/ImportUserGroupsResponse.ts @@ -0,0 +1,59 @@ +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { UserGroup } from '../models/UserGroup'; +import { HttpFile } from '../http/http'; + +export class ImportUserGroupsResponse { + /** + * The groups which are added into the system. + */ + 'groups_added': Array; + /** + * The groups which are deleted from the system. + */ + 'groups_deleted': Array; + /** + * The groups which are updated in the system. + */ + 'groups_updated': Array; + + static readonly discriminator: string | undefined = undefined; + + static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ + { + "name": "groups_added", + "baseName": "groups_added", + "type": "Array", + "format": "" + }, + { + "name": "groups_deleted", + "baseName": "groups_deleted", + "type": "Array", + "format": "" + }, + { + "name": "groups_updated", + "baseName": "groups_updated", + "type": "Array", + "format": "" + } ]; + + static getAttributeTypeMap() { + return ImportUserGroupsResponse.attributeTypeMap; + } + + public constructor() { + } +} + diff --git a/sdks/typescript/models/ImportUserType.ts b/sdks/typescript/models/ImportUserType.ts new file mode 100644 index 000000000..c7f8c0c63 --- /dev/null +++ b/sdks/typescript/models/ImportUserType.ts @@ -0,0 +1,48 @@ +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { HttpFile } from '../http/http'; + +export class ImportUserType { + /** + * Unique identifier of the user. + */ + 'id'?: string | null; + /** + * Name of the user. + */ + 'name': string; + + static readonly discriminator: string | undefined = undefined; + + static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ + { + "name": "id", + "baseName": "id", + "type": "string", + "format": "" + }, + { + "name": "name", + "baseName": "name", + "type": "string", + "format": "" + } ]; + + static getAttributeTypeMap() { + return ImportUserType.attributeTypeMap; + } + + public constructor() { + } +} + diff --git a/sdks/typescript/models/ImportUsersRequest.ts b/sdks/typescript/models/ImportUsersRequest.ts new file mode 100644 index 000000000..0bd26cdff --- /dev/null +++ b/sdks/typescript/models/ImportUsersRequest.ts @@ -0,0 +1,69 @@ +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { ImportUser } from '../models/ImportUser'; +import { HttpFile } from '../http/http'; + +export class ImportUsersRequest { + /** + * List of users needs to be imported. + */ + 'users': Array; + /** + * The default password to assign to users if they do not have a password assigned in ThoughtSpot. + */ + 'default_password'?: string; + /** + * If true, the API performs a test operation and returns user IDs whose data will be edited after the import. + */ + 'dry_run'?: boolean | null; + /** + * If set to true, removes the users that are not specified in the API request. + */ + 'delete_unspecified_users'?: boolean | null; + + static readonly discriminator: string | undefined = undefined; + + static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ + { + "name": "users", + "baseName": "users", + "type": "Array", + "format": "" + }, + { + "name": "default_password", + "baseName": "default_password", + "type": "string", + "format": "" + }, + { + "name": "dry_run", + "baseName": "dry_run", + "type": "boolean", + "format": "" + }, + { + "name": "delete_unspecified_users", + "baseName": "delete_unspecified_users", + "type": "boolean", + "format": "" + } ]; + + static getAttributeTypeMap() { + return ImportUsersRequest.attributeTypeMap; + } + + public constructor() { + } +} + diff --git a/sdks/typescript/models/ImportUsersResponse.ts b/sdks/typescript/models/ImportUsersResponse.ts new file mode 100644 index 000000000..79f929b0e --- /dev/null +++ b/sdks/typescript/models/ImportUsersResponse.ts @@ -0,0 +1,50 @@ +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { ImportUserType } from '../models/ImportUserType'; +import { HttpFile } from '../http/http'; + +export class ImportUsersResponse { + 'users_added'?: Array | null; + 'users_updated'?: Array | null; + 'users_deleted'?: Array | null; + + static readonly discriminator: string | undefined = undefined; + + static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ + { + "name": "users_added", + "baseName": "users_added", + "type": "Array", + "format": "" + }, + { + "name": "users_updated", + "baseName": "users_updated", + "type": "Array", + "format": "" + }, + { + "name": "users_deleted", + "baseName": "users_deleted", + "type": "Array", + "format": "" + } ]; + + static getAttributeTypeMap() { + return ImportUsersResponse.attributeTypeMap; + } + + public constructor() { + } +} + diff --git a/sdks/typescript/models/InputEurekaNLSRequest.ts b/sdks/typescript/models/InputEurekaNLSRequest.ts new file mode 100644 index 000000000..e12c4c7ef --- /dev/null +++ b/sdks/typescript/models/InputEurekaNLSRequest.ts @@ -0,0 +1,68 @@ +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { HttpFile } from '../http/http'; + +export class InputEurekaNLSRequest { + /** + * Cluster version like 10.4.0.cl, 10.5.0.cl, so on. + */ + 'agentVersion'?: number | null; + /** + * If true, results are not returned from cache & calculated every time. Can incur high costs & latency. + */ + 'bypassCache'?: boolean | null; + /** + * User specific instructions for processing the @query. + */ + 'instructions'?: Array | null; + /** + * User query which is a topical/goal oriented question that needs to be broken down into smaller simple analytical questions. + */ + 'query'?: string | null; + + static readonly discriminator: string | undefined = undefined; + + static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ + { + "name": "agentVersion", + "baseName": "agentVersion", + "type": "number", + "format": "int32" + }, + { + "name": "bypassCache", + "baseName": "bypassCache", + "type": "boolean", + "format": "" + }, + { + "name": "instructions", + "baseName": "instructions", + "type": "Array", + "format": "" + }, + { + "name": "query", + "baseName": "query", + "type": "string", + "format": "" + } ]; + + static getAttributeTypeMap() { + return InputEurekaNLSRequest.attributeTypeMap; + } + + public constructor() { + } +} + diff --git a/sdks/typescript/models/JWTMetadataObject.ts b/sdks/typescript/models/JWTMetadataObject.ts new file mode 100644 index 000000000..1a3d49ea1 --- /dev/null +++ b/sdks/typescript/models/JWTMetadataObject.ts @@ -0,0 +1,48 @@ +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { HttpFile } from '../http/http'; + +/** +* Metadata objects. +*/ +export class JWTMetadataObject { + 'identifier'?: string | null; + 'type'?: JWTMetadataObjectTypeEnum | null; + + static readonly discriminator: string | undefined = undefined; + + static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ + { + "name": "identifier", + "baseName": "identifier", + "type": "string", + "format": "" + }, + { + "name": "type", + "baseName": "type", + "type": "JWTMetadataObjectTypeEnum", + "format": "" + } ]; + + static getAttributeTypeMap() { + return JWTMetadataObject.attributeTypeMap; + } + + public constructor() { + } +} + + +export type JWTMetadataObjectTypeEnum = "LOGICAL_TABLE" ; + diff --git a/sdks/typescript/models/JWTParameter.ts b/sdks/typescript/models/JWTParameter.ts new file mode 100644 index 000000000..17ed82ca9 --- /dev/null +++ b/sdks/typescript/models/JWTParameter.ts @@ -0,0 +1,61 @@ +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { HttpFile } from '../http/http'; + +/** +* List of runtime parameters need to set during the session. +*/ +export class JWTParameter { + /** + * Runtime filter parameter type in JWT. + */ + 'runtime_filter'?: any | null; + /** + * Runtime sort parameter type in JWT. + */ + 'runtime_sort'?: any | null; + /** + * Runtime param override type in JWT. + */ + 'runtime_param_override'?: any | null; + + static readonly discriminator: string | undefined = undefined; + + static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ + { + "name": "runtime_filter", + "baseName": "runtime_filter", + "type": "any", + "format": "" + }, + { + "name": "runtime_sort", + "baseName": "runtime_sort", + "type": "any", + "format": "" + }, + { + "name": "runtime_param_override", + "baseName": "runtime_param_override", + "type": "any", + "format": "" + } ]; + + static getAttributeTypeMap() { + return JWTParameter.attributeTypeMap; + } + + public constructor() { + } +} + diff --git a/sdks/typescript/models/JWTUserOptions.ts b/sdks/typescript/models/JWTUserOptions.ts new file mode 100644 index 000000000..d2ca3ef54 --- /dev/null +++ b/sdks/typescript/models/JWTUserOptions.ts @@ -0,0 +1,46 @@ +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { JWTMetadataObject } from '../models/JWTMetadataObject'; +import { HttpFile } from '../http/http'; + +/** +* JWT user options to create a JWT token given the payload. *Deprecated in 9.12.0.cl. Use user_parameters instead.* +*/ +export class JWTUserOptions { + 'parameters'?: Array; + 'metadata'?: Array | null; + + static readonly discriminator: string | undefined = undefined; + + static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ + { + "name": "parameters", + "baseName": "parameters", + "type": "Array", + "format": "" + }, + { + "name": "metadata", + "baseName": "metadata", + "type": "Array", + "format": "" + } ]; + + static getAttributeTypeMap() { + return JWTUserOptions.attributeTypeMap; + } + + public constructor() { + } +} + diff --git a/sdks/typescript/models/JWTUserOptionsFull.ts b/sdks/typescript/models/JWTUserOptionsFull.ts new file mode 100644 index 000000000..2aacb2bbe --- /dev/null +++ b/sdks/typescript/models/JWTUserOptionsFull.ts @@ -0,0 +1,39 @@ +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { JWTParameter } from '../models/JWTParameter'; +import { HttpFile } from '../http/http'; + +/** +* JWT user options to create a JWT token given the payload. *Deprecated in 9.12.0.cl. Use user_parameters instead.* +*/ +export class JWTUserOptionsFull { + 'parameters'?: Array | null; + + static readonly discriminator: string | undefined = undefined; + + static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ + { + "name": "parameters", + "baseName": "parameters", + "type": "Array", + "format": "" + } ]; + + static getAttributeTypeMap() { + return JWTUserOptionsFull.attributeTypeMap; + } + + public constructor() { + } +} + diff --git a/sdks/typescript/models/JobRecipient.ts b/sdks/typescript/models/JobRecipient.ts new file mode 100644 index 000000000..c0a9ceb17 --- /dev/null +++ b/sdks/typescript/models/JobRecipient.ts @@ -0,0 +1,74 @@ +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { HttpFile } from '../http/http'; + +/** +* A recipient (user, group, or external) for a job execution. +*/ +export class JobRecipient { + /** + * Type of the recipient. + */ + 'type': JobRecipientTypeEnum; + /** + * Unique ID of the recipient. + */ + 'id'?: string | null; + /** + * Name of the recipient. + */ + 'name'?: string | null; + /** + * Email of the recipient. + */ + 'email'?: string | null; + + static readonly discriminator: string | undefined = undefined; + + static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ + { + "name": "type", + "baseName": "type", + "type": "JobRecipientTypeEnum", + "format": "" + }, + { + "name": "id", + "baseName": "id", + "type": "string", + "format": "" + }, + { + "name": "name", + "baseName": "name", + "type": "string", + "format": "" + }, + { + "name": "email", + "baseName": "email", + "type": "string", + "format": "" + } ]; + + static getAttributeTypeMap() { + return JobRecipient.attributeTypeMap; + } + + public constructor() { + } +} + + +export type JobRecipientTypeEnum = "USER" | "EXTERNAL" ; + diff --git a/sdks/typescript/models/LiveboardContent.ts b/sdks/typescript/models/LiveboardContent.ts new file mode 100644 index 000000000..d6770353d --- /dev/null +++ b/sdks/typescript/models/LiveboardContent.ts @@ -0,0 +1,118 @@ +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { HttpFile } from '../http/http'; + +export class LiveboardContent { + /** + * Total available data row count. + */ + 'available_data_row_count': number; + /** + * Name of the columns. + */ + 'column_names': Array; + /** + * Rows of data set. + */ + 'data_rows': Array; + /** + * The starting record number from where the records should be included. + */ + 'record_offset': number; + /** + * The number of records that should be included. + */ + 'record_size': number; + /** + * Total returned data row count. + */ + 'returned_data_row_count': number; + /** + * Sampling ratio (0 to 1). If the query was sampled, it is the ratio of keys returned in the data set to the total number of keys expected in the query. If the value is 1.0, this means that the complete result is returned. + */ + 'sampling_ratio': number; + /** + * Unique ID of the visualization. + */ + 'visualization_id'?: string | null; + /** + * Name of the visualization. + */ + 'visualization_name'?: string | null; + + static readonly discriminator: string | undefined = undefined; + + static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ + { + "name": "available_data_row_count", + "baseName": "available_data_row_count", + "type": "number", + "format": "int32" + }, + { + "name": "column_names", + "baseName": "column_names", + "type": "Array", + "format": "" + }, + { + "name": "data_rows", + "baseName": "data_rows", + "type": "Array", + "format": "" + }, + { + "name": "record_offset", + "baseName": "record_offset", + "type": "number", + "format": "int32" + }, + { + "name": "record_size", + "baseName": "record_size", + "type": "number", + "format": "int32" + }, + { + "name": "returned_data_row_count", + "baseName": "returned_data_row_count", + "type": "number", + "format": "int32" + }, + { + "name": "sampling_ratio", + "baseName": "sampling_ratio", + "type": "number", + "format": "float" + }, + { + "name": "visualization_id", + "baseName": "visualization_id", + "type": "string", + "format": "" + }, + { + "name": "visualization_name", + "baseName": "visualization_name", + "type": "string", + "format": "" + } ]; + + static getAttributeTypeMap() { + return LiveboardContent.attributeTypeMap; + } + + public constructor() { + } +} + diff --git a/sdks/typescript/models/LiveboardDataResponse.ts b/sdks/typescript/models/LiveboardDataResponse.ts new file mode 100644 index 000000000..c6ec6c21d --- /dev/null +++ b/sdks/typescript/models/LiveboardDataResponse.ts @@ -0,0 +1,59 @@ +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { LiveboardContent } from '../models/LiveboardContent'; +import { HttpFile } from '../http/http'; + +export class LiveboardDataResponse { + /** + * The unique identifier of the object + */ + 'metadata_id': string; + /** + * Name of the metadata object + */ + 'metadata_name': string; + /** + * Data content of metadata objects + */ + 'contents': Array; + + static readonly discriminator: string | undefined = undefined; + + static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ + { + "name": "metadata_id", + "baseName": "metadata_id", + "type": "string", + "format": "" + }, + { + "name": "metadata_name", + "baseName": "metadata_name", + "type": "string", + "format": "" + }, + { + "name": "contents", + "baseName": "contents", + "type": "Array", + "format": "" + } ]; + + static getAttributeTypeMap() { + return LiveboardDataResponse.attributeTypeMap; + } + + public constructor() { + } +} + diff --git a/sdks/typescript/models/LiveboardOptions.ts b/sdks/typescript/models/LiveboardOptions.ts new file mode 100644 index 000000000..840dc5689 --- /dev/null +++ b/sdks/typescript/models/LiveboardOptions.ts @@ -0,0 +1,41 @@ +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { HttpFile } from '../http/http'; + +/** +* Options to specify details of Liveboard. +*/ +export class LiveboardOptions { + /** + * Unique ID or name of visualizations. + */ + 'visualization_identifiers': Array; + + static readonly discriminator: string | undefined = undefined; + + static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ + { + "name": "visualization_identifiers", + "baseName": "visualization_identifiers", + "type": "Array", + "format": "" + } ]; + + static getAttributeTypeMap() { + return LiveboardOptions.attributeTypeMap; + } + + public constructor() { + } +} + diff --git a/sdks/typescript/models/LiveboardOptionsInput.ts b/sdks/typescript/models/LiveboardOptionsInput.ts new file mode 100644 index 000000000..c235e9853 --- /dev/null +++ b/sdks/typescript/models/LiveboardOptionsInput.ts @@ -0,0 +1,41 @@ +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { HttpFile } from '../http/http'; + +/** +* Options to specify details of Liveboard. +*/ +export class LiveboardOptionsInput { + /** + * Unique ID or name of visualizations. + */ + 'visualization_identifiers': Array; + + static readonly discriminator: string | undefined = undefined; + + static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ + { + "name": "visualization_identifiers", + "baseName": "visualization_identifiers", + "type": "Array", + "format": "" + } ]; + + static getAttributeTypeMap() { + return LiveboardOptionsInput.attributeTypeMap; + } + + public constructor() { + } +} + diff --git a/sdks/typescript/models/LogResponse.ts b/sdks/typescript/models/LogResponse.ts new file mode 100644 index 000000000..227080612 --- /dev/null +++ b/sdks/typescript/models/LogResponse.ts @@ -0,0 +1,48 @@ +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { HttpFile } from '../http/http'; + +export class LogResponse { + /** + * Date timestamp of the log entry + */ + 'date': string; + /** + * Log data + */ + 'log': string; + + static readonly discriminator: string | undefined = undefined; + + static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ + { + "name": "date", + "baseName": "date", + "type": "string", + "format": "" + }, + { + "name": "log", + "baseName": "log", + "type": "string", + "format": "" + } ]; + + static getAttributeTypeMap() { + return LogResponse.attributeTypeMap; + } + + public constructor() { + } +} + diff --git a/sdks/typescript/models/LoginRequest.ts b/sdks/typescript/models/LoginRequest.ts new file mode 100644 index 000000000..3ee0b5632 --- /dev/null +++ b/sdks/typescript/models/LoginRequest.ts @@ -0,0 +1,68 @@ +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { HttpFile } from '../http/http'; + +export class LoginRequest { + /** + * Username of the ThoughtSpot user + */ + 'username'?: string; + /** + * Password of the user account + */ + 'password'?: string; + /** + * ID of the Org context to log in to. If Org ID is not specified, the user will be logged in to the Org context of their previous login session. + */ + 'org_identifier'?: string; + /** + * A flag to remember the user session. When set to true, a session cookie is created and used in subsequent API requests. + */ + 'remember_me'?: boolean | null; + + static readonly discriminator: string | undefined = undefined; + + static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ + { + "name": "username", + "baseName": "username", + "type": "string", + "format": "" + }, + { + "name": "password", + "baseName": "password", + "type": "string", + "format": "" + }, + { + "name": "org_identifier", + "baseName": "org_identifier", + "type": "string", + "format": "" + }, + { + "name": "remember_me", + "baseName": "remember_me", + "type": "boolean", + "format": "" + } ]; + + static getAttributeTypeMap() { + return LoginRequest.attributeTypeMap; + } + + public constructor() { + } +} + diff --git a/sdks/typescript/models/ManageObjectPrivilegeRequest.ts b/sdks/typescript/models/ManageObjectPrivilegeRequest.ts new file mode 100644 index 000000000..9d93974b9 --- /dev/null +++ b/sdks/typescript/models/ManageObjectPrivilegeRequest.ts @@ -0,0 +1,84 @@ +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { PrincipalsInput } from '../models/PrincipalsInput'; +import { HttpFile } from '../http/http'; + +export class ManageObjectPrivilegeRequest { + /** + * Operation to perform to manage object privileges. Available operations are: `ADD`, `REMOVE`. + */ + 'operation': ManageObjectPrivilegeRequestOperationEnum; + /** + * Type of metadata objects on which you want to perform the operation. For now only LOGICAL_TABLE is supported. It may be extended to other metadata types in the future. + */ + 'metadata_type': ManageObjectPrivilegeRequestMetadataTypeEnum; + /** + * List of object privilege types on which you want to perform the operation. + */ + 'object_privilege_types': Array; + /** + * List of metadata identifiers (GUID or name) on which you want to perform the operation. + */ + 'metadata_identifiers': Array; + /** + * User or group objects (GUID or name) to which you want to apply the given operation and given object privileges. + */ + 'principals': Array; + + static readonly discriminator: string | undefined = undefined; + + static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ + { + "name": "operation", + "baseName": "operation", + "type": "ManageObjectPrivilegeRequestOperationEnum", + "format": "" + }, + { + "name": "metadata_type", + "baseName": "metadata_type", + "type": "ManageObjectPrivilegeRequestMetadataTypeEnum", + "format": "" + }, + { + "name": "object_privilege_types", + "baseName": "object_privilege_types", + "type": "Array", + "format": "" + }, + { + "name": "metadata_identifiers", + "baseName": "metadata_identifiers", + "type": "Array", + "format": "" + }, + { + "name": "principals", + "baseName": "principals", + "type": "Array", + "format": "" + } ]; + + static getAttributeTypeMap() { + return ManageObjectPrivilegeRequest.attributeTypeMap; + } + + public constructor() { + } +} + + +export type ManageObjectPrivilegeRequestOperationEnum = "ADD" | "REMOVE" ; +export type ManageObjectPrivilegeRequestMetadataTypeEnum = "LOGICAL_TABLE" ; +export type ManageObjectPrivilegeRequestObjectPrivilegeTypesEnum = "SPOTTER_COACHING_PRIVILEGE" ; + diff --git a/sdks/typescript/models/MetadataAssociationItem.ts b/sdks/typescript/models/MetadataAssociationItem.ts new file mode 100644 index 000000000..6dd3f4204 --- /dev/null +++ b/sdks/typescript/models/MetadataAssociationItem.ts @@ -0,0 +1,56 @@ +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { ActionConfig } from '../models/ActionConfig'; +import { HttpFile } from '../http/http'; + +export class MetadataAssociationItem { + 'action_config': ActionConfig; + /** + * Unique ID or name of the metadata. + */ + 'identifier': string; + /** + * Type of metadata. Required if the name of the object is set as the identifier. This attribute is optional when the object GUID is specified as the identifier. + */ + 'type': string; + + static readonly discriminator: string | undefined = undefined; + + static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ + { + "name": "action_config", + "baseName": "action_config", + "type": "ActionConfig", + "format": "" + }, + { + "name": "identifier", + "baseName": "identifier", + "type": "string", + "format": "" + }, + { + "name": "type", + "baseName": "type", + "type": "string", + "format": "" + } ]; + + static getAttributeTypeMap() { + return MetadataAssociationItem.attributeTypeMap; + } + + public constructor() { + } +} + diff --git a/sdks/typescript/models/MetadataContext.ts b/sdks/typescript/models/MetadataContext.ts new file mode 100644 index 000000000..44cca3ab8 --- /dev/null +++ b/sdks/typescript/models/MetadataContext.ts @@ -0,0 +1,68 @@ +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { HttpFile } from '../http/http'; + +export class MetadataContext { + /** + * List of data_source_identifiers to provide context for breaking down user query into analytical queries that can be run on them. + */ + 'data_source_identifiers'?: Array | null; + /** + * List of answer unique identifiers (GUIDs) whose data will be used to guide the response. + */ + 'answer_identifiers'?: Array | null; + /** + * Unique identifier to denote current conversation. + */ + 'conversation_identifier'?: string | null; + /** + * List of liveboard unique identifiers (GUIDs) whose data will be used to guide the response. + */ + 'liveboard_identifiers'?: Array | null; + + static readonly discriminator: string | undefined = undefined; + + static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ + { + "name": "data_source_identifiers", + "baseName": "data_source_identifiers", + "type": "Array", + "format": "" + }, + { + "name": "answer_identifiers", + "baseName": "answer_identifiers", + "type": "Array", + "format": "" + }, + { + "name": "conversation_identifier", + "baseName": "conversation_identifier", + "type": "string", + "format": "" + }, + { + "name": "liveboard_identifiers", + "baseName": "liveboard_identifiers", + "type": "Array", + "format": "" + } ]; + + static getAttributeTypeMap() { + return MetadataContext.attributeTypeMap; + } + + public constructor() { + } +} + diff --git a/sdks/typescript/models/MetadataInput.ts b/sdks/typescript/models/MetadataInput.ts new file mode 100644 index 000000000..73d5fbec9 --- /dev/null +++ b/sdks/typescript/models/MetadataInput.ts @@ -0,0 +1,45 @@ +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { HttpFile } from '../http/http'; + +export class MetadataInput { + 'identifier'?: string | null; + 'type'?: MetadataInputTypeEnum | null; + + static readonly discriminator: string | undefined = undefined; + + static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ + { + "name": "identifier", + "baseName": "identifier", + "type": "string", + "format": "" + }, + { + "name": "type", + "baseName": "type", + "type": "MetadataInputTypeEnum", + "format": "" + } ]; + + static getAttributeTypeMap() { + return MetadataInput.attributeTypeMap; + } + + public constructor() { + } +} + + +export type MetadataInputTypeEnum = "LIVEBOARD" ; + diff --git a/sdks/typescript/models/MetadataListItemInput.ts b/sdks/typescript/models/MetadataListItemInput.ts new file mode 100644 index 000000000..be846f805 --- /dev/null +++ b/sdks/typescript/models/MetadataListItemInput.ts @@ -0,0 +1,82 @@ +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { HttpFile } from '../http/http'; + +export class MetadataListItemInput { + /** + * Unique ID or name of the metadata. + */ + 'identifier'?: string | null; + /** + * CustomObjectId of the metadata. + */ + 'obj_identifier'?: string | null; + /** + * A pattern to match the case-insensitive name of the metadata object. User % for a wildcard match. + */ + 'name_pattern'?: string | null; + /** + * Type of metadata. Required if the name of the object is set as identifier. This attribute is optional when the object GUID is specified as identifier. 1. Liveboard 2. Answers 3. LOGICAL_TABLE for any data object such as table, worksheet or view. 4. LOGICAL_COLUMN for a column of any data object such as table, worksheet or view. 5. CONNECTION for creating or modify data connections. 6. TAG for tag objects. 7. USER for user objects. 8. USER_GROUP for group objects. 9. LOGICAL_RELATIONSHIP for table or worksheet joins. A join combines from one or several data object by using matching values 10. INSIGHT_SPEC for SpotIQ objects + */ + 'type'?: MetadataListItemInputTypeEnum | null; + /** + * List of subtype of metadata. Applies for LOGICAL_TABLE type with the following valid values. 1. ONE_TO_ONE_LOGICAL 2. WORKSHEET 3. PRIVATE_WORKSHEET. 4. USER_DEFINED. 5. AGGR_WORKSHEET. 6. SQL_VIEW Version: 10.11.0.cl or later + */ + 'subtypes'?: Array | null; + + static readonly discriminator: string | undefined = undefined; + + static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ + { + "name": "identifier", + "baseName": "identifier", + "type": "string", + "format": "" + }, + { + "name": "obj_identifier", + "baseName": "obj_identifier", + "type": "string", + "format": "" + }, + { + "name": "name_pattern", + "baseName": "name_pattern", + "type": "string", + "format": "" + }, + { + "name": "type", + "baseName": "type", + "type": "MetadataListItemInputTypeEnum", + "format": "" + }, + { + "name": "subtypes", + "baseName": "subtypes", + "type": "Array", + "format": "" + } ]; + + static getAttributeTypeMap() { + return MetadataListItemInput.attributeTypeMap; + } + + public constructor() { + } +} + + +export type MetadataListItemInputTypeEnum = "LIVEBOARD" | "ANSWER" | "LOGICAL_TABLE" | "LOGICAL_COLUMN" | "CONNECTION" | "TAG" | "USER" | "USER_GROUP" | "LOGICAL_RELATIONSHIP" | "INSIGHT_SPEC" ; +export type MetadataListItemInputSubtypesEnum = "ONE_TO_ONE_LOGICAL" | "WORKSHEET" | "PRIVATE_WORKSHEET" | "USER_DEFINED" | "AGGR_WORKSHEET" | "SQL_VIEW" ; + diff --git a/sdks/typescript/models/MetadataObject.ts b/sdks/typescript/models/MetadataObject.ts new file mode 100644 index 000000000..febfefaf3 --- /dev/null +++ b/sdks/typescript/models/MetadataObject.ts @@ -0,0 +1,51 @@ +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { HttpFile } from '../http/http'; + +export class MetadataObject { + /** + * Unique ID or name of the metadata + */ + 'identifier': string; + /** + * Type of metadata. Required if the name of the object is set as the identifier. This attribute is optional when the object GUID is specified as the identifier. + */ + 'type'?: MetadataObjectTypeEnum | null; + + static readonly discriminator: string | undefined = undefined; + + static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ + { + "name": "identifier", + "baseName": "identifier", + "type": "string", + "format": "" + }, + { + "name": "type", + "baseName": "type", + "type": "MetadataObjectTypeEnum", + "format": "" + } ]; + + static getAttributeTypeMap() { + return MetadataObject.attributeTypeMap; + } + + public constructor() { + } +} + + +export type MetadataObjectTypeEnum = "LIVEBOARD" | "ANSWER" | "LOGICAL_TABLE" | "CUSTOM_ACTION" ; + diff --git a/sdks/typescript/models/MetadataResponse.ts b/sdks/typescript/models/MetadataResponse.ts new file mode 100644 index 000000000..cc7bdc566 --- /dev/null +++ b/sdks/typescript/models/MetadataResponse.ts @@ -0,0 +1,52 @@ +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { HttpFile } from '../http/http'; + +export class MetadataResponse { + 'name'?: string | null; + 'id': string; + 'type': MetadataResponseTypeEnum; + + static readonly discriminator: string | undefined = undefined; + + static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ + { + "name": "name", + "baseName": "name", + "type": "string", + "format": "" + }, + { + "name": "id", + "baseName": "id", + "type": "string", + "format": "" + }, + { + "name": "type", + "baseName": "type", + "type": "MetadataResponseTypeEnum", + "format": "" + } ]; + + static getAttributeTypeMap() { + return MetadataResponse.attributeTypeMap; + } + + public constructor() { + } +} + + +export type MetadataResponseTypeEnum = "LIVEBOARD" ; + diff --git a/sdks/typescript/models/MetadataSearchResponse.ts b/sdks/typescript/models/MetadataSearchResponse.ts new file mode 100644 index 000000000..d650b10da --- /dev/null +++ b/sdks/typescript/models/MetadataSearchResponse.ts @@ -0,0 +1,134 @@ +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { HttpFile } from '../http/http'; + +/** +* Metadata Search Response Object. +*/ +export class MetadataSearchResponse { + /** + * Unique identifier of the metadata. + */ + 'metadata_id'?: string | null; + /** + * Name of the metadata. + */ + 'metadata_name'?: string | null; + /** + * Type of the metadata. + */ + 'metadata_type': MetadataSearchResponseMetadataTypeEnum; + /** + * Custom identifier of the metadata. (Available from 10.8.0.cl onwards) + */ + 'metadata_obj_id'?: string | null; + /** + * Details of dependent objects of the metadata objects. + */ + 'dependent_objects'?: any | null; + /** + * Details of incomplete information of the metadata objects if any. + */ + 'incomplete_objects'?: Array | null; + /** + * Complete details of the metadata objects. + */ + 'metadata_detail'?: any | null; + /** + * Header information of the metadata objects. + */ + 'metadata_header'?: any | null; + /** + * Visualization header information of the metadata objects. + */ + 'visualization_headers'?: Array | null; + /** + * Stats of the metadata object. Includes views, favorites, last_accessed. + */ + 'stats'?: any | null; + + static readonly discriminator: string | undefined = undefined; + + static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ + { + "name": "metadata_id", + "baseName": "metadata_id", + "type": "string", + "format": "" + }, + { + "name": "metadata_name", + "baseName": "metadata_name", + "type": "string", + "format": "" + }, + { + "name": "metadata_type", + "baseName": "metadata_type", + "type": "MetadataSearchResponseMetadataTypeEnum", + "format": "" + }, + { + "name": "metadata_obj_id", + "baseName": "metadata_obj_id", + "type": "string", + "format": "" + }, + { + "name": "dependent_objects", + "baseName": "dependent_objects", + "type": "any", + "format": "" + }, + { + "name": "incomplete_objects", + "baseName": "incomplete_objects", + "type": "Array", + "format": "" + }, + { + "name": "metadata_detail", + "baseName": "metadata_detail", + "type": "any", + "format": "" + }, + { + "name": "metadata_header", + "baseName": "metadata_header", + "type": "any", + "format": "" + }, + { + "name": "visualization_headers", + "baseName": "visualization_headers", + "type": "Array", + "format": "" + }, + { + "name": "stats", + "baseName": "stats", + "type": "any", + "format": "" + } ]; + + static getAttributeTypeMap() { + return MetadataSearchResponse.attributeTypeMap; + } + + public constructor() { + } +} + + +export type MetadataSearchResponseMetadataTypeEnum = "LIVEBOARD" | "ANSWER" | "LOGICAL_TABLE" | "LOGICAL_COLUMN" | "CONNECTION" | "TAG" | "USER" | "USER_GROUP" | "LOGICAL_RELATIONSHIP" | "INSIGHT_SPEC" ; + diff --git a/sdks/typescript/models/MetadataSearchSortOptions.ts b/sdks/typescript/models/MetadataSearchSortOptions.ts new file mode 100644 index 000000000..4ab756117 --- /dev/null +++ b/sdks/typescript/models/MetadataSearchSortOptions.ts @@ -0,0 +1,55 @@ +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { HttpFile } from '../http/http'; + +/** +* Sort options. +*/ +export class MetadataSearchSortOptions { + /** + * Name of the field to apply the sort on. + */ + 'field_name'?: MetadataSearchSortOptionsFieldNameEnum | null; + /** + * Sort order : ASC(Ascending) or DESC(Descending). + */ + 'order'?: MetadataSearchSortOptionsOrderEnum | null; + + static readonly discriminator: string | undefined = undefined; + + static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ + { + "name": "field_name", + "baseName": "field_name", + "type": "MetadataSearchSortOptionsFieldNameEnum", + "format": "" + }, + { + "name": "order", + "baseName": "order", + "type": "MetadataSearchSortOptionsOrderEnum", + "format": "" + } ]; + + static getAttributeTypeMap() { + return MetadataSearchSortOptions.attributeTypeMap; + } + + public constructor() { + } +} + + +export type MetadataSearchSortOptionsFieldNameEnum = "NAME" | "DISPLAY_NAME" | "AUTHOR" | "CREATED" | "MODIFIED" | "VIEWS" | "FAVORITES" | "LAST_ACCESSED" ; +export type MetadataSearchSortOptionsOrderEnum = "ASC" | "DESC" ; + diff --git a/sdks/typescript/models/ModelTableList.ts b/sdks/typescript/models/ModelTableList.ts new file mode 100644 index 000000000..d6f271898 --- /dev/null +++ b/sdks/typescript/models/ModelTableList.ts @@ -0,0 +1,58 @@ +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { HttpFile } from '../http/http'; + +export class ModelTableList { + /** + * Name of the Model. + */ + 'model_name': string; + /** + * Model directory path, this is optional param and required if there are duplicate models with the same name. + */ + 'model_path'?: string | null; + /** + * List of Tables. + */ + 'tables': Array; + + static readonly discriminator: string | undefined = undefined; + + static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ + { + "name": "model_name", + "baseName": "model_name", + "type": "string", + "format": "" + }, + { + "name": "model_path", + "baseName": "model_path", + "type": "string", + "format": "" + }, + { + "name": "tables", + "baseName": "tables", + "type": "Array", + "format": "" + } ]; + + static getAttributeTypeMap() { + return ModelTableList.attributeTypeMap; + } + + public constructor() { + } +} + diff --git a/sdks/typescript/models/NLInstructionsInfo.ts b/sdks/typescript/models/NLInstructionsInfo.ts new file mode 100644 index 000000000..2ee2837cd --- /dev/null +++ b/sdks/typescript/models/NLInstructionsInfo.ts @@ -0,0 +1,51 @@ +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { HttpFile } from '../http/http'; + +export class NLInstructionsInfo { + /** + * User instructions for natural language processing. + */ + 'instructions': Array; + /** + * Scope of the instruction. + */ + 'scope': NLInstructionsInfoScopeEnum; + + static readonly discriminator: string | undefined = undefined; + + static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ + { + "name": "instructions", + "baseName": "instructions", + "type": "Array", + "format": "" + }, + { + "name": "scope", + "baseName": "scope", + "type": "NLInstructionsInfoScopeEnum", + "format": "" + } ]; + + static getAttributeTypeMap() { + return NLInstructionsInfo.attributeTypeMap; + } + + public constructor() { + } +} + + +export type NLInstructionsInfoScopeEnum = "GLOBAL" ; + diff --git a/sdks/typescript/models/NLInstructionsInfoInput.ts b/sdks/typescript/models/NLInstructionsInfoInput.ts new file mode 100644 index 000000000..8bacb84ef --- /dev/null +++ b/sdks/typescript/models/NLInstructionsInfoInput.ts @@ -0,0 +1,51 @@ +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { HttpFile } from '../http/http'; + +export class NLInstructionsInfoInput { + /** + * User instructions for natural language processing. + */ + 'instructions': Array; + /** + * Scope of the instruction (USER or GLOBAL). Defaults to GLOBAL. + */ + 'scope': NLInstructionsInfoInputScopeEnum; + + static readonly discriminator: string | undefined = undefined; + + static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ + { + "name": "instructions", + "baseName": "instructions", + "type": "Array", + "format": "" + }, + { + "name": "scope", + "baseName": "scope", + "type": "NLInstructionsInfoInputScopeEnum", + "format": "" + } ]; + + static getAttributeTypeMap() { + return NLInstructionsInfoInput.attributeTypeMap; + } + + public constructor() { + } +} + + +export type NLInstructionsInfoInputScopeEnum = "GLOBAL" ; + diff --git a/sdks/typescript/models/ObjectIDAndName.ts b/sdks/typescript/models/ObjectIDAndName.ts new file mode 100644 index 000000000..c15105aef --- /dev/null +++ b/sdks/typescript/models/ObjectIDAndName.ts @@ -0,0 +1,51 @@ +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { HttpFile } from '../http/http'; + +/** +* The object representation with ID and Name. +*/ +export class ObjectIDAndName { + /** + * The unique identifier of the object. + */ + 'id'?: string | null; + /** + * Name of the object. + */ + 'name'?: string | null; + + static readonly discriminator: string | undefined = undefined; + + static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ + { + "name": "id", + "baseName": "id", + "type": "string", + "format": "" + }, + { + "name": "name", + "baseName": "name", + "type": "string", + "format": "" + } ]; + + static getAttributeTypeMap() { + return ObjectIDAndName.attributeTypeMap; + } + + public constructor() { + } +} + diff --git a/sdks/typescript/models/ObjectPrivilegesMetadataInput.ts b/sdks/typescript/models/ObjectPrivilegesMetadataInput.ts new file mode 100644 index 000000000..a5de634e4 --- /dev/null +++ b/sdks/typescript/models/ObjectPrivilegesMetadataInput.ts @@ -0,0 +1,51 @@ +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { HttpFile } from '../http/http'; + +export class ObjectPrivilegesMetadataInput { + /** + * Type of metadata object. Required if the name of the object is set as the identifier. This attribute is optional when the object GUID is specified as the identifier. + */ + 'type'?: ObjectPrivilegesMetadataInputTypeEnum | null; + /** + * Unique ID or name of the metadata object. + */ + 'identifier': string; + + static readonly discriminator: string | undefined = undefined; + + static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ + { + "name": "type", + "baseName": "type", + "type": "ObjectPrivilegesMetadataInputTypeEnum", + "format": "" + }, + { + "name": "identifier", + "baseName": "identifier", + "type": "string", + "format": "" + } ]; + + static getAttributeTypeMap() { + return ObjectPrivilegesMetadataInput.attributeTypeMap; + } + + public constructor() { + } +} + + +export type ObjectPrivilegesMetadataInputTypeEnum = "LOGICAL_TABLE" ; + diff --git a/sdks/typescript/models/ObjectPrivilegesOfMetadataResponse.ts b/sdks/typescript/models/ObjectPrivilegesOfMetadataResponse.ts new file mode 100644 index 000000000..572f8054e --- /dev/null +++ b/sdks/typescript/models/ObjectPrivilegesOfMetadataResponse.ts @@ -0,0 +1,35 @@ +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { HttpFile } from '../http/http'; + +export class ObjectPrivilegesOfMetadataResponse { + 'metadata_object_privileges'?: any | null; + + static readonly discriminator: string | undefined = undefined; + + static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ + { + "name": "metadata_object_privileges", + "baseName": "metadata_object_privileges", + "type": "any", + "format": "" + } ]; + + static getAttributeTypeMap() { + return ObjectPrivilegesOfMetadataResponse.attributeTypeMap; + } + + public constructor() { + } +} + diff --git a/sdks/typescript/models/ObjectSerializer.ts b/sdks/typescript/models/ObjectSerializer.ts new file mode 100644 index 000000000..64448ef91 --- /dev/null +++ b/sdks/typescript/models/ObjectSerializer.ts @@ -0,0 +1,1878 @@ +export * from '../models/AIContext'; +export * from '../models/APIKey'; +export * from '../models/APIKeyInput'; +export * from '../models/AccessToken'; +export * from '../models/ActionConfig'; +export * from '../models/ActionConfigInput'; +export * from '../models/ActionConfigInputCreate'; +export * from '../models/ActionDetails'; +export * from '../models/ActionDetailsInput'; +export * from '../models/ActionDetailsInputCreate'; +export * from '../models/ActivateUserRequest'; +export * from '../models/AgentConversation'; +export * from '../models/AnswerContent'; +export * from '../models/AnswerDataResponse'; +export * from '../models/AnswerPngOptionsInput'; +export * from '../models/AssignChangeAuthorRequest'; +export * from '../models/AssignTagRequest'; +export * from '../models/AssociateMetadataInput'; +export * from '../models/AssociateMetadataInputCreate'; +export * from '../models/AuthClusterPreferences'; +export * from '../models/AuthClusterPreferencesInput'; +export * from '../models/AuthOrgInfo'; +export * from '../models/AuthOrgPreference'; +export * from '../models/AuthOrgPreferenceInput'; +export * from '../models/AuthSettingsAccessToken'; +export * from '../models/Authentication'; +export * from '../models/AuthenticationInput'; +export * from '../models/Author'; +export * from '../models/AuthorMetadataTypeInput'; +export * from '../models/AuthorType'; +export * from '../models/AwsS3Config'; +export * from '../models/AwsS3ConfigInput'; +export * from '../models/BasicAuth'; +export * from '../models/BasicAuthInput'; +export * from '../models/CALLBACK'; +export * from '../models/CALLBACKInput'; +export * from '../models/CALLBACKInputMandatory'; +export * from '../models/CalendarResponse'; +export * from '../models/ChangeUserPasswordRequest'; +export * from '../models/ChannelHistoryEventInfo'; +export * from '../models/ChannelHistoryEventInput'; +export * from '../models/ChannelHistoryJob'; +export * from '../models/ChannelValidationAwsS3Info'; +export * from '../models/ChannelValidationDetail'; +export * from '../models/ClusterNonEmbedAccess'; +export * from '../models/ClusterNonEmbedAccessInput'; +export * from '../models/Collection'; +export * from '../models/CollectionDeleteResponse'; +export * from '../models/CollectionDeleteTypeIdentifiers'; +export * from '../models/CollectionEntityIdentifier'; +export * from '../models/CollectionMetadataInput'; +export * from '../models/CollectionMetadataItem'; +export * from '../models/CollectionSearchResponse'; +export * from '../models/Column'; +export * from '../models/ColumnSecurityRule'; +export * from '../models/ColumnSecurityRuleColumn'; +export * from '../models/ColumnSecurityRuleGroup'; +export * from '../models/ColumnSecurityRuleGroupOperation'; +export * from '../models/ColumnSecurityRuleResponse'; +export * from '../models/ColumnSecurityRuleSourceTable'; +export * from '../models/ColumnSecurityRuleTableInput'; +export * from '../models/ColumnSecurityRuleUpdate'; +export * from '../models/CommitBranchRequest'; +export * from '../models/CommitFileType'; +export * from '../models/CommitHistoryResponse'; +export * from '../models/CommitResponse'; +export * from '../models/CommiterType'; +export * from '../models/CommunicationChannelPreferencesResponse'; +export * from '../models/CommunicationChannelValidateResponse'; +export * from '../models/ConfigureAuthSettingsRequest'; +export * from '../models/ConfigureAuthSettingsRequestClusterPreferences'; +export * from '../models/ConfigureCommunicationChannelPreferencesRequest'; +export * from '../models/ConfigureSecuritySettingsRequest'; +export * from '../models/ConfigureSecuritySettingsRequestClusterPreferences'; +export * from '../models/ConnectionConfigurationResponse'; +export * from '../models/ConnectionConfigurationSearchRequest'; +export * from '../models/ConnectionInput'; +export * from '../models/ContextPayloadV2Input'; +export * from '../models/Conversation'; +export * from '../models/ConversationSettingsInput'; +export * from '../models/ConvertWorksheetToModelRequest'; +export * from '../models/CopyObjectRequest'; +export * from '../models/CreateAgentConversationRequest'; +export * from '../models/CreateAgentConversationRequestConversationSettings'; +export * from '../models/CreateAgentConversationRequestMetadataContext'; +export * from '../models/CreateCalendarRequest'; +export * from '../models/CreateCalendarRequestTableReference'; +export * from '../models/CreateCollectionRequest'; +export * from '../models/CreateConfigRequest'; +export * from '../models/CreateConnectionConfigurationRequest'; +export * from '../models/CreateConnectionConfigurationRequestPolicyProcessOptions'; +export * from '../models/CreateConnectionRequest'; +export * from '../models/CreateConnectionResponse'; +export * from '../models/CreateConversationRequest'; +export * from '../models/CreateCustomActionRequest'; +export * from '../models/CreateCustomActionRequestActionDetails'; +export * from '../models/CreateCustomActionRequestDefaultActionConfig'; +export * from '../models/CreateEmailCustomizationRequest'; +export * from '../models/CreateEmailCustomizationRequestTemplateProperties'; +export * from '../models/CreateEmailCustomizationResponse'; +export * from '../models/CreateOrgRequest'; +export * from '../models/CreateRoleRequest'; +export * from '../models/CreateScheduleRequest'; +export * from '../models/CreateScheduleRequestFrequency'; +export * from '../models/CreateScheduleRequestLiveboardOptions'; +export * from '../models/CreateScheduleRequestPdfOptions'; +export * from '../models/CreateScheduleRequestRecipientDetails'; +export * from '../models/CreateTagRequest'; +export * from '../models/CreateUserGroupRequest'; +export * from '../models/CreateUserRequest'; +export * from '../models/CreateVariableRequest'; +export * from '../models/CreateWebhookConfigurationRequest'; +export * from '../models/CreateWebhookConfigurationRequestAuthentication'; +export * from '../models/CreateWebhookConfigurationRequestSignatureVerification'; +export * from '../models/CreateWebhookConfigurationRequestStorageDestination'; +export * from '../models/CronExpression'; +export * from '../models/CronExpressionInput'; +export * from '../models/CspSettings'; +export * from '../models/CspSettingsInput'; +export * from '../models/CustomActionMetadataTypeInput'; +export * from '../models/DataSource'; +export * from '../models/DataSourceContextInput'; +export * from '../models/DataWarehouseObjectInput'; +export * from '../models/DataWarehouseObjects'; +export * from '../models/Database'; +export * from '../models/DbtSearchResponse'; +export * from '../models/DeactivateUserRequest'; +export * from '../models/DefaultActionConfig'; +export * from '../models/DefaultActionConfigInput'; +export * from '../models/DefaultActionConfigInputCreate'; +export * from '../models/DefaultActionConfigSearchInput'; +export * from '../models/DeleteCollectionRequest'; +export * from '../models/DeleteConfigRequest'; +export * from '../models/DeleteConnectionConfigurationRequest'; +export * from '../models/DeleteConnectionRequest'; +export * from '../models/DeleteMetadataRequest'; +export * from '../models/DeleteMetadataTypeInput'; +export * from '../models/DeleteOrgEmailCustomizationRequest'; +export * from '../models/DeleteVariablesRequest'; +export * from '../models/DeleteWebhookConfigurationsRequest'; +export * from '../models/DeployCommitRequest'; +export * from '../models/DeployResponse'; +export * from '../models/EntityHeader'; +export * from '../models/ErrorResponse'; +export * from '../models/EurekaDataSourceSuggestionResponse'; +export * from '../models/EurekaDecomposeQueryResponse'; +export * from '../models/EurekaGetNLInstructionsResponse'; +export * from '../models/EurekaGetRelevantQuestionsResponse'; +export * from '../models/EurekaLLMDecomposeQueryResponse'; +export * from '../models/EurekaLLMSuggestedQuery'; +export * from '../models/EurekaRelevantQuestion'; +export * from '../models/EurekaSetNLInstructionsResponse'; +export * from '../models/EventChannelConfig'; +export * from '../models/EventChannelConfigInput'; +export * from '../models/ExcludeMetadataListItemInput'; +export * from '../models/ExportAnswerReportRequest'; +export * from '../models/ExportAnswerReportRequestPngOptions'; +export * from '../models/ExportAnswerReportRequestRegionalSettings'; +export * from '../models/ExportLiveboardReportRequest'; +export * from '../models/ExportLiveboardReportRequestPdfOptions'; +export * from '../models/ExportLiveboardReportRequestPngOptions'; +export * from '../models/ExportMetadataTMLBatchedRequest'; +export * from '../models/ExportMetadataTMLRequest'; +export * from '../models/ExportMetadataTMLRequestExportOptions'; +export * from '../models/ExportMetadataTypeInput'; +export * from '../models/ExportOptions'; +export * from '../models/ExternalTableInput'; +export * from '../models/FavoriteMetadataInput'; +export * from '../models/FavoriteMetadataItem'; +export * from '../models/FavoriteObjectOptionsInput'; +export * from '../models/FetchAnswerDataRequest'; +export * from '../models/FetchAnswerSqlQueryRequest'; +export * from '../models/FetchAsyncImportTaskStatusRequest'; +export * from '../models/FetchColumnSecurityRulesRequest'; +export * from '../models/FetchConnectionDiffStatusResponse'; +export * from '../models/FetchLiveboardDataRequest'; +export * from '../models/FetchLiveboardSqlQueryRequest'; +export * from '../models/FetchLogsRequest'; +export * from '../models/FetchObjectPrivilegesRequest'; +export * from '../models/FetchPermissionsOfPrincipalsRequest'; +export * from '../models/FetchPermissionsOnMetadataRequest'; +export * from '../models/FilterRules'; +export * from '../models/ForceLogoutUsersRequest'; +export * from '../models/Frequency'; +export * from '../models/FrequencyInput'; +export * from '../models/GenerateCSVRequest'; +export * from '../models/GenericInfo'; +export * from '../models/GetAsyncImportStatusResponse'; +export * from '../models/GetCustomAccessTokenRequest'; +export * from '../models/GetDataSourceSuggestionsRequest'; +export * from '../models/GetFullAccessTokenRequest'; +export * from '../models/GetFullAccessTokenRequestUserParameters'; +export * from '../models/GetNLInstructionsRequest'; +export * from '../models/GetObjectAccessTokenRequest'; +export * from '../models/GetRelevantQuestionsRequest'; +export * from '../models/GetRelevantQuestionsRequestAiContext'; +export * from '../models/GetRelevantQuestionsRequestMetadataContext'; +export * from '../models/GetTokenResponse'; +export * from '../models/GroupInfo'; +export * from '../models/GroupObject'; +export * from '../models/GroupsImportListInput'; +export * from '../models/HeaderAttributeInput'; +export * from '../models/HeaderUpdateInput'; +export * from '../models/ImportEPackAsyncTaskStatus'; +export * from '../models/ImportMetadataTMLAsyncRequest'; +export * from '../models/ImportMetadataTMLRequest'; +export * from '../models/ImportUser'; +export * from '../models/ImportUserGroupsRequest'; +export * from '../models/ImportUserGroupsResponse'; +export * from '../models/ImportUserType'; +export * from '../models/ImportUsersRequest'; +export * from '../models/ImportUsersResponse'; +export * from '../models/InputEurekaNLSRequest'; +export * from '../models/JWTMetadataObject'; +export * from '../models/JWTParameter'; +export * from '../models/JWTUserOptions'; +export * from '../models/JWTUserOptionsFull'; +export * from '../models/JobRecipient'; +export * from '../models/LiveboardContent'; +export * from '../models/LiveboardDataResponse'; +export * from '../models/LiveboardOptions'; +export * from '../models/LiveboardOptionsInput'; +export * from '../models/LogResponse'; +export * from '../models/LoginRequest'; +export * from '../models/ManageObjectPrivilegeRequest'; +export * from '../models/MetadataAssociationItem'; +export * from '../models/MetadataContext'; +export * from '../models/MetadataInput'; +export * from '../models/MetadataListItemInput'; +export * from '../models/MetadataObject'; +export * from '../models/MetadataResponse'; +export * from '../models/MetadataSearchResponse'; +export * from '../models/MetadataSearchSortOptions'; +export * from '../models/ModelTableList'; +export * from '../models/NLInstructionsInfo'; +export * from '../models/NLInstructionsInfoInput'; +export * from '../models/ObjectIDAndName'; +export * from '../models/ObjectPrivilegesMetadataInput'; +export * from '../models/ObjectPrivilegesOfMetadataResponse'; +export * from '../models/Org'; +export * from '../models/OrgChannelConfigInput'; +export * from '../models/OrgChannelConfigResponse'; +export * from '../models/OrgDetails'; +export * from '../models/OrgInfo'; +export * from '../models/OrgNonEmbedAccess'; +export * from '../models/OrgNonEmbedAccessInput'; +export * from '../models/OrgPreferenceSearchCriteriaInput'; +export * from '../models/OrgResponse'; +export * from '../models/OrgType'; +export * from '../models/ParameterValues'; +export * from '../models/ParameterizeMetadataFieldsRequest'; +export * from '../models/ParameterizeMetadataRequest'; +export * from '../models/ParametersListItem'; +export * from '../models/ParametersListItemInput'; +export * from '../models/PdfOptions'; +export * from '../models/PdfOptionsInput'; +export * from '../models/PermissionInput'; +export * from '../models/PermissionOfMetadataResponse'; +export * from '../models/PermissionOfPrincipalsResponse'; +export * from '../models/PermissionsMetadataTypeInput'; +export * from '../models/PngOptionsInput'; +export * from '../models/PolicyProcessOptions'; +export * from '../models/PolicyProcessOptionsInput'; +export * from '../models/PrincipalsInput'; +export * from '../models/PrincipalsListItem'; +export * from '../models/PrincipalsListItemInput'; +export * from '../models/PublishMetadataListItem'; +export * from '../models/PublishMetadataRequest'; +export * from '../models/PutVariableValuesRequest'; +export * from '../models/QueryGetDecomposedQueryRequest'; +export * from '../models/QueryGetDecomposedQueryRequestNlsRequest'; +export * from '../models/RecipientDetails'; +export * from '../models/RecipientDetailsInput'; +export * from '../models/RegionalSettingsInput'; +export * from '../models/RepoConfigObject'; +export * from '../models/ResetUserPasswordRequest'; +export * from '../models/ResponseActivationURL'; +export * from '../models/ResponseCopyObject'; +export * from '../models/ResponseCustomAction'; +export * from '../models/ResponseFailedEntities'; +export * from '../models/ResponseFailedEntity'; +export * from '../models/ResponseIncompleteEntities'; +export * from '../models/ResponseIncompleteEntity'; +export * from '../models/ResponseMessage'; +export * from '../models/ResponsePostUpgradeFailedEntities'; +export * from '../models/ResponsePostUpgradeFailedEntity'; +export * from '../models/ResponseSchedule'; +export * from '../models/ResponseScheduleRun'; +export * from '../models/ResponseSuccessfulEntities'; +export * from '../models/ResponseSuccessfulEntity'; +export * from '../models/ResponseWorksheetToModelConversion'; +export * from '../models/RevertCommitRequest'; +export * from '../models/RevertResponse'; +export * from '../models/RevertedMetadata'; +export * from '../models/RevokeRefreshTokensRequest'; +export * from '../models/RevokeRefreshTokensResponse'; +export * from '../models/RevokeTokenRequest'; +export * from '../models/RiseGQLArgWrapper'; +export * from '../models/RiseSetter'; +export * from '../models/Role'; +export * from '../models/RoleResponse'; +export * from '../models/RuntimeFilter'; +export * from '../models/RuntimeFilters'; +export * from '../models/RuntimeParamOverride'; +export * from '../models/RuntimeParameters'; +export * from '../models/RuntimeSort'; +export * from '../models/RuntimeSorts'; +export * from '../models/ScheduleHistoryRunsOptionsInput'; +export * from '../models/SchedulesPdfOptionsInput'; +export * from '../models/SchemaObject'; +export * from '../models/Scope'; +export * from '../models/ScriptSrcUrls'; +export * from '../models/ScriptSrcUrlsInput'; +export * from '../models/SearchAuthSettingsRequest'; +export * from '../models/SearchAuthSettingsResponse'; +export * from '../models/SearchCalendarsRequest'; +export * from '../models/SearchCalendarsRequestSortOptions'; +export * from '../models/SearchChannelHistoryRequest'; +export * from '../models/SearchChannelHistoryResponse'; +export * from '../models/SearchCollectionsRequest'; +export * from '../models/SearchCollectionsRequestSortOptions'; +export * from '../models/SearchCommitsRequest'; +export * from '../models/SearchCommunicationChannelPreferencesRequest'; +export * from '../models/SearchConfigRequest'; +export * from '../models/SearchConnectionRequest'; +export * from '../models/SearchConnectionRequestSortOptions'; +export * from '../models/SearchConnectionResponse'; +export * from '../models/SearchCustomActionsRequest'; +export * from '../models/SearchCustomActionsRequestDefaultActionConfig'; +export * from '../models/SearchDataRequest'; +export * from '../models/SearchDataResponse'; +export * from '../models/SearchEmailCustomizationRequest'; +export * from '../models/SearchMetadataRequest'; +export * from '../models/SearchMetadataRequestFavoriteObjectOptions'; +export * from '../models/SearchMetadataRequestSortOptions'; +export * from '../models/SearchOrgsRequest'; +export * from '../models/SearchRoleResponse'; +export * from '../models/SearchRolesRequest'; +export * from '../models/SearchSchedulesRequest'; +export * from '../models/SearchSchedulesRequestHistoryRunsOptions'; +export * from '../models/SearchSchedulesRequestSortOptions'; +export * from '../models/SearchSecuritySettingsRequest'; +export * from '../models/SearchTagsRequest'; +export * from '../models/SearchUserGroupsRequest'; +export * from '../models/SearchUserGroupsRequestSortOptions'; +export * from '../models/SearchUsersRequest'; +export * from '../models/SearchVariablesRequest'; +export * from '../models/SearchWebhookConfigurationsRequest'; +export * from '../models/SearchWebhookConfigurationsRequestSortOptions'; +export * from '../models/SecuritySettingsClusterPreferences'; +export * from '../models/SecuritySettingsClusterPreferencesInput'; +export * from '../models/SecuritySettingsOrgDetails'; +export * from '../models/SecuritySettingsOrgPreferences'; +export * from '../models/SecuritySettingsOrgPreferencesInput'; +export * from '../models/SecuritySettingsResponse'; +export * from '../models/SendAgentConversationMessageRequest'; +export * from '../models/SendAgentConversationMessageStreamingRequest'; +export * from '../models/SendAgentMessageRequest'; +export * from '../models/SendAgentMessageResponse'; +export * from '../models/SendAgentMessageStreamingRequest'; +export * from '../models/SendMessageRequest'; +export * from '../models/SetNLInstructionsRequest'; +export * from '../models/ShareMetadataRequest'; +export * from '../models/ShareMetadataTypeInput'; +export * from '../models/SharePermissionsInput'; +export * from '../models/SingleAnswerRequest'; +export * from '../models/SortOption'; +export * from '../models/SortOptionInput'; +export * from '../models/SortOptions'; +export * from '../models/SortingOptions'; +export * from '../models/SqlQuery'; +export * from '../models/SqlQueryResponse'; +export * from '../models/StorageConfig'; +export * from '../models/StorageConfigInput'; +export * from '../models/StorageDestination'; +export * from '../models/StorageDestinationInput'; +export * from '../models/SyncMetadataRequest'; +export * from '../models/SyncMetadataResponse'; +export * from '../models/SystemConfig'; +export * from '../models/SystemInfo'; +export * from '../models/SystemOverrideInfo'; +export * from '../models/Table'; +export * from '../models/Tag'; +export * from '../models/TagMetadataTypeInput'; +export * from '../models/TemplatePropertiesInputCreate'; +export * from '../models/Token'; +export * from '../models/TokenAccessScopeObject'; +export * from '../models/TokenValidationResponse'; +export * from '../models/URL'; +export * from '../models/URLInput'; +export * from '../models/URLInputMandatory'; +export * from '../models/UnassignTagRequest'; +export * from '../models/UnparameterizeMetadataRequest'; +export * from '../models/UnpublishMetadataRequest'; +export * from '../models/UpdateCalendarRequest'; +export * from '../models/UpdateCalendarRequestTableReference'; +export * from '../models/UpdateCollectionRequest'; +export * from '../models/UpdateColumnSecurityRulesRequest'; +export * from '../models/UpdateConfigRequest'; +export * from '../models/UpdateConnectionConfigurationRequest'; +export * from '../models/UpdateConnectionRequest'; +export * from '../models/UpdateConnectionStatusRequest'; +export * from '../models/UpdateConnectionV2Request'; +export * from '../models/UpdateCustomActionRequest'; +export * from '../models/UpdateCustomActionRequestActionDetails'; +export * from '../models/UpdateCustomActionRequestDefaultActionConfig'; +export * from '../models/UpdateEmailCustomizationRequest'; +export * from '../models/UpdateMetadataHeaderRequest'; +export * from '../models/UpdateMetadataObjIdRequest'; +export * from '../models/UpdateObjIdInput'; +export * from '../models/UpdateOrgRequest'; +export * from '../models/UpdateRoleRequest'; +export * from '../models/UpdateScheduleRequest'; +export * from '../models/UpdateScheduleRequestFrequency'; +export * from '../models/UpdateScheduleRequestLiveboardOptions'; +export * from '../models/UpdateScheduleRequestPdfOptions'; +export * from '../models/UpdateScheduleRequestRecipientDetails'; +export * from '../models/UpdateSystemConfigRequest'; +export * from '../models/UpdateTagRequest'; +export * from '../models/UpdateUserGroupRequest'; +export * from '../models/UpdateUserRequest'; +export * from '../models/UpdateVariableRequest'; +export * from '../models/UpdateVariableValuesRequest'; +export * from '../models/UpdateWebhookConfigurationRequest'; +export * from '../models/User'; +export * from '../models/UserGroup'; +export * from '../models/UserGroupResponse'; +export * from '../models/UserInfo'; +export * from '../models/UserObject'; +export * from '../models/UserParameterOptions'; +export * from '../models/UserPrincipal'; +export * from '../models/ValidateCommunicationChannelRequest'; +export * from '../models/ValidateMergeRequest'; +export * from '../models/ValidateTokenRequest'; +export * from '../models/ValueScopeInput'; +export * from '../models/Variable'; +export * from '../models/VariableDetailInput'; +export * from '../models/VariableOrgInfo'; +export * from '../models/VariablePutAssignmentInput'; +export * from '../models/VariableUpdateAssignmentInput'; +export * from '../models/VariableUpdateScopeInput'; +export * from '../models/VariableValue'; +export * from '../models/VariableValues'; +export * from '../models/WebhookAuthApiKey'; +export * from '../models/WebhookAuthApiKeyInput'; +export * from '../models/WebhookAuthBasicAuth'; +export * from '../models/WebhookAuthBasicAuthInput'; +export * from '../models/WebhookAuthOAuth2'; +export * from '../models/WebhookAuthOAuth2Input'; +export * from '../models/WebhookAuthentication'; +export * from '../models/WebhookAuthenticationInput'; +export * from '../models/WebhookDeleteFailure'; +export * from '../models/WebhookDeleteResponse'; +export * from '../models/WebhookKeyValuePair'; +export * from '../models/WebhookKeyValuePairInput'; +export * from '../models/WebhookOrg'; +export * from '../models/WebhookPagination'; +export * from '../models/WebhookResponse'; +export * from '../models/WebhookSearchResponse'; +export * from '../models/WebhookSignatureVerification'; +export * from '../models/WebhookSignatureVerificationInput'; +export * from '../models/WebhookSortOptionsInput'; +export * from '../models/WebhookUser'; + +import { AIContext } from '../models/AIContext'; +import { APIKey } from '../models/APIKey'; +import { APIKeyInput } from '../models/APIKeyInput'; +import { AccessToken } from '../models/AccessToken'; +import { ActionConfig } from '../models/ActionConfig'; +import { ActionConfigInput, ActionConfigInputPositionEnum } from '../models/ActionConfigInput'; +import { ActionConfigInputCreate, ActionConfigInputCreatePositionEnum } from '../models/ActionConfigInputCreate'; +import { ActionDetails } from '../models/ActionDetails'; +import { ActionDetailsInput } from '../models/ActionDetailsInput'; +import { ActionDetailsInputCreate } from '../models/ActionDetailsInputCreate'; +import { ActivateUserRequest } from '../models/ActivateUserRequest'; +import { AgentConversation } from '../models/AgentConversation'; +import { AnswerContent } from '../models/AnswerContent'; +import { AnswerDataResponse } from '../models/AnswerDataResponse'; +import { AnswerPngOptionsInput } from '../models/AnswerPngOptionsInput'; +import { AssignChangeAuthorRequest } from '../models/AssignChangeAuthorRequest'; +import { AssignTagRequest } from '../models/AssignTagRequest'; +import { AssociateMetadataInput , AssociateMetadataInputTypeEnum } from '../models/AssociateMetadataInput'; +import { AssociateMetadataInputCreate , AssociateMetadataInputCreateTypeEnum } from '../models/AssociateMetadataInputCreate'; +import { AuthClusterPreferences, AuthClusterPreferencesAuthStatusEnum } from '../models/AuthClusterPreferences'; +import { AuthClusterPreferencesInput, AuthClusterPreferencesInputAuthStatusEnum } from '../models/AuthClusterPreferencesInput'; +import { AuthOrgInfo } from '../models/AuthOrgInfo'; +import { AuthOrgPreference , AuthOrgPreferenceAuthStatusEnum } from '../models/AuthOrgPreference'; +import { AuthOrgPreferenceInput , AuthOrgPreferenceInputAuthStatusEnum } from '../models/AuthOrgPreferenceInput'; +import { AuthSettingsAccessToken } from '../models/AuthSettingsAccessToken'; +import { Authentication } from '../models/Authentication'; +import { AuthenticationInput } from '../models/AuthenticationInput'; +import { Author } from '../models/Author'; +import { AuthorMetadataTypeInput, AuthorMetadataTypeInputTypeEnum } from '../models/AuthorMetadataTypeInput'; +import { AuthorType } from '../models/AuthorType'; +import { AwsS3Config } from '../models/AwsS3Config'; +import { AwsS3ConfigInput } from '../models/AwsS3ConfigInput'; +import { BasicAuth } from '../models/BasicAuth'; +import { BasicAuthInput } from '../models/BasicAuthInput'; +import { CALLBACK } from '../models/CALLBACK'; +import { CALLBACKInput } from '../models/CALLBACKInput'; +import { CALLBACKInputMandatory } from '../models/CALLBACKInputMandatory'; +import { CalendarResponse } from '../models/CalendarResponse'; +import { ChangeUserPasswordRequest } from '../models/ChangeUserPasswordRequest'; +import { ChannelHistoryEventInfo, ChannelHistoryEventInfoTypeEnum } from '../models/ChannelHistoryEventInfo'; +import { ChannelHistoryEventInput, ChannelHistoryEventInputTypeEnum } from '../models/ChannelHistoryEventInput'; +import { ChannelHistoryJob , ChannelHistoryJobStatusEnum } from '../models/ChannelHistoryJob'; +import { ChannelValidationAwsS3Info } from '../models/ChannelValidationAwsS3Info'; +import { ChannelValidationDetail, ChannelValidationDetailValidationStepEnum , ChannelValidationDetailStatusEnum } from '../models/ChannelValidationDetail'; +import { ClusterNonEmbedAccess } from '../models/ClusterNonEmbedAccess'; +import { ClusterNonEmbedAccessInput } from '../models/ClusterNonEmbedAccessInput'; +import { Collection } from '../models/Collection'; +import { CollectionDeleteResponse } from '../models/CollectionDeleteResponse'; +import { CollectionDeleteTypeIdentifiers } from '../models/CollectionDeleteTypeIdentifiers'; +import { CollectionEntityIdentifier } from '../models/CollectionEntityIdentifier'; +import { CollectionMetadataInput, CollectionMetadataInputTypeEnum } from '../models/CollectionMetadataInput'; +import { CollectionMetadataItem } from '../models/CollectionMetadataItem'; +import { CollectionSearchResponse } from '../models/CollectionSearchResponse'; +import { Column } from '../models/Column'; +import { ColumnSecurityRule } from '../models/ColumnSecurityRule'; +import { ColumnSecurityRuleColumn } from '../models/ColumnSecurityRuleColumn'; +import { ColumnSecurityRuleGroup } from '../models/ColumnSecurityRuleGroup'; +import { ColumnSecurityRuleGroupOperation, ColumnSecurityRuleGroupOperationOperationEnum } from '../models/ColumnSecurityRuleGroupOperation'; +import { ColumnSecurityRuleResponse } from '../models/ColumnSecurityRuleResponse'; +import { ColumnSecurityRuleSourceTable } from '../models/ColumnSecurityRuleSourceTable'; +import { ColumnSecurityRuleTableInput } from '../models/ColumnSecurityRuleTableInput'; +import { ColumnSecurityRuleUpdate } from '../models/ColumnSecurityRuleUpdate'; +import { CommitBranchRequest } from '../models/CommitBranchRequest'; +import { CommitFileType } from '../models/CommitFileType'; +import { CommitHistoryResponse } from '../models/CommitHistoryResponse'; +import { CommitResponse } from '../models/CommitResponse'; +import { CommiterType } from '../models/CommiterType'; +import { CommunicationChannelPreferencesResponse } from '../models/CommunicationChannelPreferencesResponse'; +import { CommunicationChannelValidateResponse, CommunicationChannelValidateResponseChannelTypeEnum , CommunicationChannelValidateResponseEventTypeEnum , CommunicationChannelValidateResponseResultCodeEnum } from '../models/CommunicationChannelValidateResponse'; +import { ConfigureAuthSettingsRequest, ConfigureAuthSettingsRequestAuthTypeEnum } from '../models/ConfigureAuthSettingsRequest'; +import { ConfigureAuthSettingsRequestClusterPreferences, ConfigureAuthSettingsRequestClusterPreferencesAuthStatusEnum } from '../models/ConfigureAuthSettingsRequestClusterPreferences'; +import { ConfigureCommunicationChannelPreferencesRequest } from '../models/ConfigureCommunicationChannelPreferencesRequest'; +import { ConfigureSecuritySettingsRequest } from '../models/ConfigureSecuritySettingsRequest'; +import { ConfigureSecuritySettingsRequestClusterPreferences } from '../models/ConfigureSecuritySettingsRequestClusterPreferences'; +import { ConnectionConfigurationResponse , ConnectionConfigurationResponsePolicyProcessesEnum , ConnectionConfigurationResponseDataWarehouseTypeEnum , ConnectionConfigurationResponsePolicyTypeEnum } from '../models/ConnectionConfigurationResponse'; +import { ConnectionConfigurationSearchRequest , ConnectionConfigurationSearchRequestPolicyTypeEnum } from '../models/ConnectionConfigurationSearchRequest'; +import { ConnectionInput } from '../models/ConnectionInput'; +import { ContextPayloadV2Input, ContextPayloadV2InputTypeEnum } from '../models/ContextPayloadV2Input'; +import { Conversation } from '../models/Conversation'; +import { ConversationSettingsInput } from '../models/ConversationSettingsInput'; +import { ConvertWorksheetToModelRequest } from '../models/ConvertWorksheetToModelRequest'; +import { CopyObjectRequest , CopyObjectRequestTypeEnum } from '../models/CopyObjectRequest'; +import { CreateAgentConversationRequest } from '../models/CreateAgentConversationRequest'; +import { CreateAgentConversationRequestConversationSettings } from '../models/CreateAgentConversationRequestConversationSettings'; +import { CreateAgentConversationRequestMetadataContext, CreateAgentConversationRequestMetadataContextTypeEnum } from '../models/CreateAgentConversationRequestMetadataContext'; +import { CreateCalendarRequest , CreateCalendarRequestCreationMethodEnum , CreateCalendarRequestCalendarTypeEnum , CreateCalendarRequestMonthOffsetEnum , CreateCalendarRequestStartDayOfWeekEnum } from '../models/CreateCalendarRequest'; +import { CreateCalendarRequestTableReference } from '../models/CreateCalendarRequestTableReference'; +import { CreateCollectionRequest } from '../models/CreateCollectionRequest'; +import { CreateConfigRequest } from '../models/CreateConfigRequest'; +import { CreateConnectionConfigurationRequest , CreateConnectionConfigurationRequestAuthenticationTypeEnum , CreateConnectionConfigurationRequestPolicyTypeEnum , CreateConnectionConfigurationRequestPolicyProcessesEnum } from '../models/CreateConnectionConfigurationRequest'; +import { CreateConnectionConfigurationRequestPolicyProcessOptions } from '../models/CreateConnectionConfigurationRequestPolicyProcessOptions'; +import { CreateConnectionRequest , CreateConnectionRequestDataWarehouseTypeEnum } from '../models/CreateConnectionRequest'; +import { CreateConnectionResponse , CreateConnectionResponseDataWarehouseTypeEnum } from '../models/CreateConnectionResponse'; +import { CreateConversationRequest } from '../models/CreateConversationRequest'; +import { CreateCustomActionRequest } from '../models/CreateCustomActionRequest'; +import { CreateCustomActionRequestActionDetails } from '../models/CreateCustomActionRequestActionDetails'; +import { CreateCustomActionRequestDefaultActionConfig } from '../models/CreateCustomActionRequestDefaultActionConfig'; +import { CreateEmailCustomizationRequest } from '../models/CreateEmailCustomizationRequest'; +import { CreateEmailCustomizationRequestTemplateProperties } from '../models/CreateEmailCustomizationRequestTemplateProperties'; +import { CreateEmailCustomizationResponse } from '../models/CreateEmailCustomizationResponse'; +import { CreateOrgRequest } from '../models/CreateOrgRequest'; +import { CreateRoleRequest , CreateRoleRequestPrivilegesEnum } from '../models/CreateRoleRequest'; +import { CreateScheduleRequest , CreateScheduleRequestMetadataTypeEnum , CreateScheduleRequestFileFormatEnum , CreateScheduleRequestTimeZoneEnum } from '../models/CreateScheduleRequest'; +import { CreateScheduleRequestFrequency } from '../models/CreateScheduleRequestFrequency'; +import { CreateScheduleRequestLiveboardOptions } from '../models/CreateScheduleRequestLiveboardOptions'; +import { CreateScheduleRequestPdfOptions , CreateScheduleRequestPdfOptionsPageSizeEnum } from '../models/CreateScheduleRequestPdfOptions'; +import { CreateScheduleRequestRecipientDetails } from '../models/CreateScheduleRequestRecipientDetails'; +import { CreateTagRequest } from '../models/CreateTagRequest'; +import { CreateUserGroupRequest , CreateUserGroupRequestPrivilegesEnum , CreateUserGroupRequestTypeEnum , CreateUserGroupRequestVisibilityEnum } from '../models/CreateUserGroupRequest'; +import { CreateUserRequest , CreateUserRequestAccountTypeEnum , CreateUserRequestAccountStatusEnum , CreateUserRequestVisibilityEnum , CreateUserRequestPreferredLocaleEnum } from '../models/CreateUserRequest'; +import { CreateVariableRequest, CreateVariableRequestTypeEnum , CreateVariableRequestDataTypeEnum } from '../models/CreateVariableRequest'; +import { CreateWebhookConfigurationRequest , CreateWebhookConfigurationRequestEventsEnum } from '../models/CreateWebhookConfigurationRequest'; +import { CreateWebhookConfigurationRequestAuthentication } from '../models/CreateWebhookConfigurationRequestAuthentication'; +import { CreateWebhookConfigurationRequestSignatureVerification, CreateWebhookConfigurationRequestSignatureVerificationTypeEnum , CreateWebhookConfigurationRequestSignatureVerificationAlgorithmEnum } from '../models/CreateWebhookConfigurationRequestSignatureVerification'; +import { CreateWebhookConfigurationRequestStorageDestination, CreateWebhookConfigurationRequestStorageDestinationStorageTypeEnum } from '../models/CreateWebhookConfigurationRequestStorageDestination'; +import { CronExpression } from '../models/CronExpression'; +import { CronExpressionInput } from '../models/CronExpressionInput'; +import { CspSettings } from '../models/CspSettings'; +import { CspSettingsInput } from '../models/CspSettingsInput'; +import { CustomActionMetadataTypeInput, CustomActionMetadataTypeInputTypeEnum } from '../models/CustomActionMetadataTypeInput'; +import { DataSource } from '../models/DataSource'; +import { DataSourceContextInput } from '../models/DataSourceContextInput'; +import { DataWarehouseObjectInput } from '../models/DataWarehouseObjectInput'; +import { DataWarehouseObjects } from '../models/DataWarehouseObjects'; +import { Database } from '../models/Database'; +import { DbtSearchResponse } from '../models/DbtSearchResponse'; +import { DeactivateUserRequest } from '../models/DeactivateUserRequest'; +import { DefaultActionConfig } from '../models/DefaultActionConfig'; +import { DefaultActionConfigInput } from '../models/DefaultActionConfigInput'; +import { DefaultActionConfigInputCreate } from '../models/DefaultActionConfigInputCreate'; +import { DefaultActionConfigSearchInput } from '../models/DefaultActionConfigSearchInput'; +import { DeleteCollectionRequest } from '../models/DeleteCollectionRequest'; +import { DeleteConfigRequest } from '../models/DeleteConfigRequest'; +import { DeleteConnectionConfigurationRequest } from '../models/DeleteConnectionConfigurationRequest'; +import { DeleteConnectionRequest } from '../models/DeleteConnectionRequest'; +import { DeleteMetadataRequest } from '../models/DeleteMetadataRequest'; +import { DeleteMetadataTypeInput, DeleteMetadataTypeInputTypeEnum } from '../models/DeleteMetadataTypeInput'; +import { DeleteOrgEmailCustomizationRequest } from '../models/DeleteOrgEmailCustomizationRequest'; +import { DeleteVariablesRequest } from '../models/DeleteVariablesRequest'; +import { DeleteWebhookConfigurationsRequest } from '../models/DeleteWebhookConfigurationsRequest'; +import { DeployCommitRequest , DeployCommitRequestDeployTypeEnum , DeployCommitRequestDeployPolicyEnum } from '../models/DeployCommitRequest'; +import { DeployResponse } from '../models/DeployResponse'; +import { EntityHeader } from '../models/EntityHeader'; +import { ErrorResponse } from '../models/ErrorResponse'; +import { EurekaDataSourceSuggestionResponse } from '../models/EurekaDataSourceSuggestionResponse'; +import { EurekaDecomposeQueryResponse } from '../models/EurekaDecomposeQueryResponse'; +import { EurekaGetNLInstructionsResponse } from '../models/EurekaGetNLInstructionsResponse'; +import { EurekaGetRelevantQuestionsResponse } from '../models/EurekaGetRelevantQuestionsResponse'; +import { EurekaLLMDecomposeQueryResponse } from '../models/EurekaLLMDecomposeQueryResponse'; +import { EurekaLLMSuggestedQuery } from '../models/EurekaLLMSuggestedQuery'; +import { EurekaRelevantQuestion } from '../models/EurekaRelevantQuestion'; +import { EurekaSetNLInstructionsResponse } from '../models/EurekaSetNLInstructionsResponse'; +import { EventChannelConfig, EventChannelConfigEventTypeEnum , EventChannelConfigChannelsEnum } from '../models/EventChannelConfig'; +import { EventChannelConfigInput, EventChannelConfigInputEventTypeEnum , EventChannelConfigInputChannelsEnum } from '../models/EventChannelConfigInput'; +import { ExcludeMetadataListItemInput , ExcludeMetadataListItemInputTypeEnum } from '../models/ExcludeMetadataListItemInput'; +import { ExportAnswerReportRequest , ExportAnswerReportRequestFileFormatEnum , ExportAnswerReportRequestTypeEnum } from '../models/ExportAnswerReportRequest'; +import { ExportAnswerReportRequestPngOptions } from '../models/ExportAnswerReportRequestPngOptions'; +import { ExportAnswerReportRequestRegionalSettings, ExportAnswerReportRequestRegionalSettingsCurrencyFormatEnum , ExportAnswerReportRequestRegionalSettingsUserLocaleEnum , ExportAnswerReportRequestRegionalSettingsNumberFormatLocaleEnum , ExportAnswerReportRequestRegionalSettingsDateFormatLocaleEnum } from '../models/ExportAnswerReportRequestRegionalSettings'; +import { ExportLiveboardReportRequest , ExportLiveboardReportRequestFileFormatEnum } from '../models/ExportLiveboardReportRequest'; +import { ExportLiveboardReportRequestPdfOptions, ExportLiveboardReportRequestPdfOptionsPageSizeEnum , ExportLiveboardReportRequestPdfOptionsPageOrientationEnum } from '../models/ExportLiveboardReportRequestPdfOptions'; +import { ExportLiveboardReportRequestPngOptions } from '../models/ExportLiveboardReportRequestPngOptions'; +import { ExportMetadataTMLBatchedRequest, ExportMetadataTMLBatchedRequestMetadataTypeEnum , ExportMetadataTMLBatchedRequestEdocFormatEnum } from '../models/ExportMetadataTMLBatchedRequest'; +import { ExportMetadataTMLRequest , ExportMetadataTMLRequestEdocFormatEnum , ExportMetadataTMLRequestExportSchemaVersionEnum } from '../models/ExportMetadataTMLRequest'; +import { ExportMetadataTMLRequestExportOptions } from '../models/ExportMetadataTMLRequestExportOptions'; +import { ExportMetadataTypeInput, ExportMetadataTypeInputTypeEnum } from '../models/ExportMetadataTypeInput'; +import { ExportOptions } from '../models/ExportOptions'; +import { ExternalTableInput } from '../models/ExternalTableInput'; +import { FavoriteMetadataInput , FavoriteMetadataInputTypeEnum } from '../models/FavoriteMetadataInput'; +import { FavoriteMetadataItem , FavoriteMetadataItemTypeEnum } from '../models/FavoriteMetadataItem'; +import { FavoriteObjectOptionsInput } from '../models/FavoriteObjectOptionsInput'; +import { FetchAnswerDataRequest , FetchAnswerDataRequestDataFormatEnum } from '../models/FetchAnswerDataRequest'; +import { FetchAnswerSqlQueryRequest } from '../models/FetchAnswerSqlQueryRequest'; +import { FetchAsyncImportTaskStatusRequest , FetchAsyncImportTaskStatusRequestTaskStatusEnum } from '../models/FetchAsyncImportTaskStatusRequest'; +import { FetchColumnSecurityRulesRequest } from '../models/FetchColumnSecurityRulesRequest'; +import { FetchConnectionDiffStatusResponse } from '../models/FetchConnectionDiffStatusResponse'; +import { FetchLiveboardDataRequest , FetchLiveboardDataRequestDataFormatEnum } from '../models/FetchLiveboardDataRequest'; +import { FetchLiveboardSqlQueryRequest } from '../models/FetchLiveboardSqlQueryRequest'; +import { FetchLogsRequest, FetchLogsRequestLogTypeEnum } from '../models/FetchLogsRequest'; +import { FetchObjectPrivilegesRequest } from '../models/FetchObjectPrivilegesRequest'; +import { FetchPermissionsOfPrincipalsRequest , FetchPermissionsOfPrincipalsRequestDefaultMetadataTypeEnum } from '../models/FetchPermissionsOfPrincipalsRequest'; +import { FetchPermissionsOnMetadataRequest } from '../models/FetchPermissionsOnMetadataRequest'; +import { FilterRules , FilterRulesOperatorEnum } from '../models/FilterRules'; +import { ForceLogoutUsersRequest } from '../models/ForceLogoutUsersRequest'; +import { Frequency } from '../models/Frequency'; +import { FrequencyInput } from '../models/FrequencyInput'; +import { GenerateCSVRequest , GenerateCSVRequestCalendarTypeEnum , GenerateCSVRequestMonthOffsetEnum , GenerateCSVRequestStartDayOfWeekEnum } from '../models/GenerateCSVRequest'; +import { GenericInfo } from '../models/GenericInfo'; +import { GetAsyncImportStatusResponse } from '../models/GetAsyncImportStatusResponse'; +import { GetCustomAccessTokenRequest , GetCustomAccessTokenRequestPersistOptionEnum } from '../models/GetCustomAccessTokenRequest'; +import { GetDataSourceSuggestionsRequest } from '../models/GetDataSourceSuggestionsRequest'; +import { GetFullAccessTokenRequest } from '../models/GetFullAccessTokenRequest'; +import { GetFullAccessTokenRequestUserParameters } from '../models/GetFullAccessTokenRequestUserParameters'; +import { GetNLInstructionsRequest } from '../models/GetNLInstructionsRequest'; +import { GetObjectAccessTokenRequest } from '../models/GetObjectAccessTokenRequest'; +import { GetRelevantQuestionsRequest } from '../models/GetRelevantQuestionsRequest'; +import { GetRelevantQuestionsRequestAiContext } from '../models/GetRelevantQuestionsRequestAiContext'; +import { GetRelevantQuestionsRequestMetadataContext } from '../models/GetRelevantQuestionsRequestMetadataContext'; +import { GetTokenResponse } from '../models/GetTokenResponse'; +import { GroupInfo } from '../models/GroupInfo'; +import { GroupObject } from '../models/GroupObject'; +import { GroupsImportListInput , GroupsImportListInputPrivilegesEnum , GroupsImportListInputTypeEnum , GroupsImportListInputVisibilityEnum } from '../models/GroupsImportListInput'; +import { HeaderAttributeInput } from '../models/HeaderAttributeInput'; +import { HeaderUpdateInput , HeaderUpdateInputTypeEnum } from '../models/HeaderUpdateInput'; +import { ImportEPackAsyncTaskStatus , ImportEPackAsyncTaskStatusTaskStatusEnum , ImportEPackAsyncTaskStatusImportPolicyEnum } from '../models/ImportEPackAsyncTaskStatus'; +import { ImportMetadataTMLAsyncRequest , ImportMetadataTMLAsyncRequestImportPolicyEnum } from '../models/ImportMetadataTMLAsyncRequest'; +import { ImportMetadataTMLRequest , ImportMetadataTMLRequestImportPolicyEnum } from '../models/ImportMetadataTMLRequest'; +import { ImportUser , ImportUserAccountTypeEnum , ImportUserAccountStatusEnum , ImportUserVisibilityEnum , ImportUserPreferredLocaleEnum } from '../models/ImportUser'; +import { ImportUserGroupsRequest } from '../models/ImportUserGroupsRequest'; +import { ImportUserGroupsResponse } from '../models/ImportUserGroupsResponse'; +import { ImportUserType } from '../models/ImportUserType'; +import { ImportUsersRequest } from '../models/ImportUsersRequest'; +import { ImportUsersResponse } from '../models/ImportUsersResponse'; +import { InputEurekaNLSRequest } from '../models/InputEurekaNLSRequest'; +import { JWTMetadataObject , JWTMetadataObjectTypeEnum } from '../models/JWTMetadataObject'; +import { JWTParameter } from '../models/JWTParameter'; +import { JWTUserOptions } from '../models/JWTUserOptions'; +import { JWTUserOptionsFull } from '../models/JWTUserOptionsFull'; +import { JobRecipient, JobRecipientTypeEnum } from '../models/JobRecipient'; +import { LiveboardContent } from '../models/LiveboardContent'; +import { LiveboardDataResponse } from '../models/LiveboardDataResponse'; +import { LiveboardOptions } from '../models/LiveboardOptions'; +import { LiveboardOptionsInput } from '../models/LiveboardOptionsInput'; +import { LogResponse } from '../models/LogResponse'; +import { LoginRequest } from '../models/LoginRequest'; +import { ManageObjectPrivilegeRequest, ManageObjectPrivilegeRequestOperationEnum , ManageObjectPrivilegeRequestMetadataTypeEnum , ManageObjectPrivilegeRequestObjectPrivilegeTypesEnum } from '../models/ManageObjectPrivilegeRequest'; +import { MetadataAssociationItem } from '../models/MetadataAssociationItem'; +import { MetadataContext } from '../models/MetadataContext'; +import { MetadataInput , MetadataInputTypeEnum } from '../models/MetadataInput'; +import { MetadataListItemInput , MetadataListItemInputTypeEnum , MetadataListItemInputSubtypesEnum } from '../models/MetadataListItemInput'; +import { MetadataObject , MetadataObjectTypeEnum } from '../models/MetadataObject'; +import { MetadataResponse , MetadataResponseTypeEnum } from '../models/MetadataResponse'; +import { MetadataSearchResponse , MetadataSearchResponseMetadataTypeEnum } from '../models/MetadataSearchResponse'; +import { MetadataSearchSortOptions, MetadataSearchSortOptionsFieldNameEnum , MetadataSearchSortOptionsOrderEnum } from '../models/MetadataSearchSortOptions'; +import { ModelTableList } from '../models/ModelTableList'; +import { NLInstructionsInfo , NLInstructionsInfoScopeEnum } from '../models/NLInstructionsInfo'; +import { NLInstructionsInfoInput , NLInstructionsInfoInputScopeEnum } from '../models/NLInstructionsInfoInput'; +import { ObjectIDAndName } from '../models/ObjectIDAndName'; +import { ObjectPrivilegesMetadataInput, ObjectPrivilegesMetadataInputTypeEnum } from '../models/ObjectPrivilegesMetadataInput'; +import { ObjectPrivilegesOfMetadataResponse } from '../models/ObjectPrivilegesOfMetadataResponse'; +import { Org } from '../models/Org'; +import { OrgChannelConfigInput , OrgChannelConfigInputOperationEnum , OrgChannelConfigInputResetEventsEnum } from '../models/OrgChannelConfigInput'; +import { OrgChannelConfigResponse } from '../models/OrgChannelConfigResponse'; +import { OrgDetails } from '../models/OrgDetails'; +import { OrgInfo } from '../models/OrgInfo'; +import { OrgNonEmbedAccess } from '../models/OrgNonEmbedAccess'; +import { OrgNonEmbedAccessInput } from '../models/OrgNonEmbedAccessInput'; +import { OrgPreferenceSearchCriteriaInput , OrgPreferenceSearchCriteriaInputEventTypesEnum } from '../models/OrgPreferenceSearchCriteriaInput'; +import { OrgResponse , OrgResponseStatusEnum , OrgResponseVisibilityEnum } from '../models/OrgResponse'; +import { OrgType } from '../models/OrgType'; +import { ParameterValues } from '../models/ParameterValues'; +import { ParameterizeMetadataFieldsRequest, ParameterizeMetadataFieldsRequestMetadataTypeEnum , ParameterizeMetadataFieldsRequestFieldTypeEnum } from '../models/ParameterizeMetadataFieldsRequest'; +import { ParameterizeMetadataRequest, ParameterizeMetadataRequestMetadataTypeEnum , ParameterizeMetadataRequestFieldTypeEnum } from '../models/ParameterizeMetadataRequest'; +import { ParametersListItem } from '../models/ParametersListItem'; +import { ParametersListItemInput } from '../models/ParametersListItemInput'; +import { PdfOptions , PdfOptionsPageSizeEnum } from '../models/PdfOptions'; +import { PdfOptionsInput, PdfOptionsInputPageSizeEnum , PdfOptionsInputPageOrientationEnum } from '../models/PdfOptionsInput'; +import { PermissionInput , PermissionInputShareModeEnum } from '../models/PermissionInput'; +import { PermissionOfMetadataResponse } from '../models/PermissionOfMetadataResponse'; +import { PermissionOfPrincipalsResponse } from '../models/PermissionOfPrincipalsResponse'; +import { PermissionsMetadataTypeInput, PermissionsMetadataTypeInputTypeEnum } from '../models/PermissionsMetadataTypeInput'; +import { PngOptionsInput } from '../models/PngOptionsInput'; +import { PolicyProcessOptions } from '../models/PolicyProcessOptions'; +import { PolicyProcessOptionsInput } from '../models/PolicyProcessOptionsInput'; +import { PrincipalsInput , PrincipalsInputTypeEnum } from '../models/PrincipalsInput'; +import { PrincipalsListItem } from '../models/PrincipalsListItem'; +import { PrincipalsListItemInput } from '../models/PrincipalsListItemInput'; +import { PublishMetadataListItem , PublishMetadataListItemTypeEnum } from '../models/PublishMetadataListItem'; +import { PublishMetadataRequest } from '../models/PublishMetadataRequest'; +import { PutVariableValuesRequest, PutVariableValuesRequestOperationEnum } from '../models/PutVariableValuesRequest'; +import { QueryGetDecomposedQueryRequest } from '../models/QueryGetDecomposedQueryRequest'; +import { QueryGetDecomposedQueryRequestNlsRequest } from '../models/QueryGetDecomposedQueryRequestNlsRequest'; +import { RecipientDetails } from '../models/RecipientDetails'; +import { RecipientDetailsInput } from '../models/RecipientDetailsInput'; +import { RegionalSettingsInput, RegionalSettingsInputCurrencyFormatEnum , RegionalSettingsInputUserLocaleEnum , RegionalSettingsInputNumberFormatLocaleEnum , RegionalSettingsInputDateFormatLocaleEnum } from '../models/RegionalSettingsInput'; +import { RepoConfigObject } from '../models/RepoConfigObject'; +import { ResetUserPasswordRequest } from '../models/ResetUserPasswordRequest'; +import { ResponseActivationURL } from '../models/ResponseActivationURL'; +import { ResponseCopyObject } from '../models/ResponseCopyObject'; +import { ResponseCustomAction } from '../models/ResponseCustomAction'; +import { ResponseFailedEntities } from '../models/ResponseFailedEntities'; +import { ResponseFailedEntity } from '../models/ResponseFailedEntity'; +import { ResponseIncompleteEntities } from '../models/ResponseIncompleteEntities'; +import { ResponseIncompleteEntity } from '../models/ResponseIncompleteEntity'; +import { ResponseMessage , ResponseMessageMessageTypeEnum , ResponseMessageVisualizationTypeEnum } from '../models/ResponseMessage'; +import { ResponsePostUpgradeFailedEntities } from '../models/ResponsePostUpgradeFailedEntities'; +import { ResponsePostUpgradeFailedEntity } from '../models/ResponsePostUpgradeFailedEntity'; +import { ResponseSchedule } from '../models/ResponseSchedule'; +import { ResponseScheduleRun } from '../models/ResponseScheduleRun'; +import { ResponseSuccessfulEntities } from '../models/ResponseSuccessfulEntities'; +import { ResponseSuccessfulEntity } from '../models/ResponseSuccessfulEntity'; +import { ResponseWorksheetToModelConversion } from '../models/ResponseWorksheetToModelConversion'; +import { RevertCommitRequest , RevertCommitRequestRevertPolicyEnum } from '../models/RevertCommitRequest'; +import { RevertResponse } from '../models/RevertResponse'; +import { RevertedMetadata } from '../models/RevertedMetadata'; +import { RevokeRefreshTokensRequest } from '../models/RevokeRefreshTokensRequest'; +import { RevokeRefreshTokensResponse } from '../models/RevokeRefreshTokensResponse'; +import { RevokeTokenRequest } from '../models/RevokeTokenRequest'; +import { RiseGQLArgWrapper } from '../models/RiseGQLArgWrapper'; +import { RiseSetter } from '../models/RiseSetter'; +import { Role } from '../models/Role'; +import { RoleResponse , RoleResponsePrivilegesEnum , RoleResponsePermissionEnum } from '../models/RoleResponse'; +import { RuntimeFilter } from '../models/RuntimeFilter'; +import { RuntimeFilters , RuntimeFiltersOperatorEnum } from '../models/RuntimeFilters'; +import { RuntimeParamOverride } from '../models/RuntimeParamOverride'; +import { RuntimeParameters } from '../models/RuntimeParameters'; +import { RuntimeSort } from '../models/RuntimeSort'; +import { RuntimeSorts , RuntimeSortsOrderEnum } from '../models/RuntimeSorts'; +import { ScheduleHistoryRunsOptionsInput } from '../models/ScheduleHistoryRunsOptionsInput'; +import { SchedulesPdfOptionsInput , SchedulesPdfOptionsInputPageSizeEnum } from '../models/SchedulesPdfOptionsInput'; +import { SchemaObject } from '../models/SchemaObject'; +import { Scope } from '../models/Scope'; +import { ScriptSrcUrls } from '../models/ScriptSrcUrls'; +import { ScriptSrcUrlsInput } from '../models/ScriptSrcUrlsInput'; +import { SearchAuthSettingsRequest, SearchAuthSettingsRequestAuthTypeEnum , SearchAuthSettingsRequestScopeEnum } from '../models/SearchAuthSettingsRequest'; +import { SearchAuthSettingsResponse, SearchAuthSettingsResponseAuthTypeEnum } from '../models/SearchAuthSettingsResponse'; +import { SearchCalendarsRequest } from '../models/SearchCalendarsRequest'; +import { SearchCalendarsRequestSortOptions, SearchCalendarsRequestSortOptionsFieldNameEnum , SearchCalendarsRequestSortOptionsOrderEnum } from '../models/SearchCalendarsRequestSortOptions'; +import { SearchChannelHistoryRequest, SearchChannelHistoryRequestChannelTypeEnum , SearchChannelHistoryRequestChannelStatusEnum } from '../models/SearchChannelHistoryRequest'; +import { SearchChannelHistoryResponse } from '../models/SearchChannelHistoryResponse'; +import { SearchCollectionsRequest } from '../models/SearchCollectionsRequest'; +import { SearchCollectionsRequestSortOptions, SearchCollectionsRequestSortOptionsFieldNameEnum , SearchCollectionsRequestSortOptionsOrderEnum } from '../models/SearchCollectionsRequestSortOptions'; +import { SearchCommitsRequest , SearchCommitsRequestMetadataTypeEnum } from '../models/SearchCommitsRequest'; +import { SearchCommunicationChannelPreferencesRequest, SearchCommunicationChannelPreferencesRequestClusterPreferencesEnum } from '../models/SearchCommunicationChannelPreferencesRequest'; +import { SearchConfigRequest } from '../models/SearchConfigRequest'; +import { SearchConnectionRequest , SearchConnectionRequestDataWarehouseTypesEnum , SearchConnectionRequestDataWarehouseObjectTypeEnum , SearchConnectionRequestAuthenticationTypeEnum } from '../models/SearchConnectionRequest'; +import { SearchConnectionRequestSortOptions, SearchConnectionRequestSortOptionsFieldNameEnum , SearchConnectionRequestSortOptionsOrderEnum } from '../models/SearchConnectionRequestSortOptions'; +import { SearchConnectionResponse , SearchConnectionResponseDataWarehouseTypeEnum } from '../models/SearchConnectionResponse'; +import { SearchCustomActionsRequest , SearchCustomActionsRequestTypeEnum } from '../models/SearchCustomActionsRequest'; +import { SearchCustomActionsRequestDefaultActionConfig } from '../models/SearchCustomActionsRequestDefaultActionConfig'; +import { SearchDataRequest , SearchDataRequestDataFormatEnum } from '../models/SearchDataRequest'; +import { SearchDataResponse } from '../models/SearchDataResponse'; +import { SearchEmailCustomizationRequest } from '../models/SearchEmailCustomizationRequest'; +import { SearchMetadataRequest , SearchMetadataRequestDependentObjectVersionEnum , SearchMetadataRequestLiveboardResponseVersionEnum } from '../models/SearchMetadataRequest'; +import { SearchMetadataRequestFavoriteObjectOptions } from '../models/SearchMetadataRequestFavoriteObjectOptions'; +import { SearchMetadataRequestSortOptions, SearchMetadataRequestSortOptionsFieldNameEnum , SearchMetadataRequestSortOptionsOrderEnum } from '../models/SearchMetadataRequestSortOptions'; +import { SearchOrgsRequest , SearchOrgsRequestVisibilityEnum , SearchOrgsRequestStatusEnum } from '../models/SearchOrgsRequest'; +import { SearchRoleResponse , SearchRoleResponsePrivilegesEnum , SearchRoleResponsePermissionEnum } from '../models/SearchRoleResponse'; +import { SearchRolesRequest , SearchRolesRequestPrivilegesEnum , SearchRolesRequestPermissionsEnum } from '../models/SearchRolesRequest'; +import { SearchSchedulesRequest } from '../models/SearchSchedulesRequest'; +import { SearchSchedulesRequestHistoryRunsOptions } from '../models/SearchSchedulesRequestHistoryRunsOptions'; +import { SearchSchedulesRequestSortOptions } from '../models/SearchSchedulesRequestSortOptions'; +import { SearchSecuritySettingsRequest, SearchSecuritySettingsRequestScopeEnum } from '../models/SearchSecuritySettingsRequest'; +import { SearchTagsRequest } from '../models/SearchTagsRequest'; +import { SearchUserGroupsRequest , SearchUserGroupsRequestPrivilegesEnum , SearchUserGroupsRequestTypeEnum , SearchUserGroupsRequestVisibilityEnum } from '../models/SearchUserGroupsRequest'; +import { SearchUserGroupsRequestSortOptions, SearchUserGroupsRequestSortOptionsFieldNameEnum , SearchUserGroupsRequestSortOptionsOrderEnum } from '../models/SearchUserGroupsRequestSortOptions'; +import { SearchUsersRequest , SearchUsersRequestVisibilityEnum , SearchUsersRequestPrivilegesEnum , SearchUsersRequestAccountTypeEnum , SearchUsersRequestAccountStatusEnum } from '../models/SearchUsersRequest'; +import { SearchVariablesRequest , SearchVariablesRequestResponseContentEnum } from '../models/SearchVariablesRequest'; +import { SearchWebhookConfigurationsRequest , SearchWebhookConfigurationsRequestEventTypeEnum } from '../models/SearchWebhookConfigurationsRequest'; +import { SearchWebhookConfigurationsRequestSortOptions, SearchWebhookConfigurationsRequestSortOptionsFieldNameEnum , SearchWebhookConfigurationsRequestSortOptionsOrderEnum } from '../models/SearchWebhookConfigurationsRequestSortOptions'; +import { SecuritySettingsClusterPreferences , SecuritySettingsClusterPreferencesTrustedAuthStatusEnum } from '../models/SecuritySettingsClusterPreferences'; +import { SecuritySettingsClusterPreferencesInput } from '../models/SecuritySettingsClusterPreferencesInput'; +import { SecuritySettingsOrgDetails } from '../models/SecuritySettingsOrgDetails'; +import { SecuritySettingsOrgPreferences , SecuritySettingsOrgPreferencesTrustedAuthStatusEnum } from '../models/SecuritySettingsOrgPreferences'; +import { SecuritySettingsOrgPreferencesInput } from '../models/SecuritySettingsOrgPreferencesInput'; +import { SecuritySettingsResponse } from '../models/SecuritySettingsResponse'; +import { SendAgentConversationMessageRequest } from '../models/SendAgentConversationMessageRequest'; +import { SendAgentConversationMessageStreamingRequest } from '../models/SendAgentConversationMessageStreamingRequest'; +import { SendAgentMessageRequest } from '../models/SendAgentMessageRequest'; +import { SendAgentMessageResponse } from '../models/SendAgentMessageResponse'; +import { SendAgentMessageStreamingRequest } from '../models/SendAgentMessageStreamingRequest'; +import { SendMessageRequest } from '../models/SendMessageRequest'; +import { SetNLInstructionsRequest } from '../models/SetNLInstructionsRequest'; +import { ShareMetadataRequest, ShareMetadataRequestMetadataTypeEnum } from '../models/ShareMetadataRequest'; +import { ShareMetadataTypeInput, ShareMetadataTypeInputTypeEnum } from '../models/ShareMetadataTypeInput'; +import { SharePermissionsInput , SharePermissionsInputShareModeEnum , SharePermissionsInputContentShareModeEnum } from '../models/SharePermissionsInput'; +import { SingleAnswerRequest } from '../models/SingleAnswerRequest'; +import { SortOption, SortOptionFieldNameEnum , SortOptionOrderEnum } from '../models/SortOption'; +import { SortOptionInput, SortOptionInputFieldNameEnum , SortOptionInputOrderEnum } from '../models/SortOptionInput'; +import { SortOptions, SortOptionsFieldNameEnum , SortOptionsOrderEnum } from '../models/SortOptions'; +import { SortingOptions } from '../models/SortingOptions'; +import { SqlQuery } from '../models/SqlQuery'; +import { SqlQueryResponse , SqlQueryResponseMetadataTypeEnum } from '../models/SqlQueryResponse'; +import { StorageConfig } from '../models/StorageConfig'; +import { StorageConfigInput } from '../models/StorageConfigInput'; +import { StorageDestination, StorageDestinationStorageTypeEnum } from '../models/StorageDestination'; +import { StorageDestinationInput, StorageDestinationInputStorageTypeEnum } from '../models/StorageDestinationInput'; +import { SyncMetadataRequest , SyncMetadataRequestSyncAttributesEnum } from '../models/SyncMetadataRequest'; +import { SyncMetadataResponse, SyncMetadataResponseStatusEnum } from '../models/SyncMetadataResponse'; +import { SystemConfig } from '../models/SystemConfig'; +import { SystemInfo } from '../models/SystemInfo'; +import { SystemOverrideInfo } from '../models/SystemOverrideInfo'; +import { Table } from '../models/Table'; +import { Tag } from '../models/Tag'; +import { TagMetadataTypeInput, TagMetadataTypeInputTypeEnum } from '../models/TagMetadataTypeInput'; +import { TemplatePropertiesInputCreate } from '../models/TemplatePropertiesInputCreate'; +import { Token } from '../models/Token'; +import { TokenAccessScopeObject, TokenAccessScopeObjectTypeEnum } from '../models/TokenAccessScopeObject'; +import { TokenValidationResponse } from '../models/TokenValidationResponse'; +import { URL } from '../models/URL'; +import { URLInput } from '../models/URLInput'; +import { URLInputMandatory } from '../models/URLInputMandatory'; +import { UnassignTagRequest } from '../models/UnassignTagRequest'; +import { UnparameterizeMetadataRequest, UnparameterizeMetadataRequestMetadataTypeEnum , UnparameterizeMetadataRequestFieldTypeEnum } from '../models/UnparameterizeMetadataRequest'; +import { UnpublishMetadataRequest } from '../models/UnpublishMetadataRequest'; +import { UpdateCalendarRequest, UpdateCalendarRequestUpdateMethodEnum , UpdateCalendarRequestCalendarTypeEnum , UpdateCalendarRequestMonthOffsetEnum , UpdateCalendarRequestStartDayOfWeekEnum } from '../models/UpdateCalendarRequest'; +import { UpdateCalendarRequestTableReference } from '../models/UpdateCalendarRequestTableReference'; +import { UpdateCollectionRequest , UpdateCollectionRequestOperationEnum } from '../models/UpdateCollectionRequest'; +import { UpdateColumnSecurityRulesRequest } from '../models/UpdateColumnSecurityRulesRequest'; +import { UpdateConfigRequest } from '../models/UpdateConfigRequest'; +import { UpdateConnectionConfigurationRequest , UpdateConnectionConfigurationRequestAuthenticationTypeEnum , UpdateConnectionConfigurationRequestPolicyTypeEnum , UpdateConnectionConfigurationRequestPolicyProcessesEnum } from '../models/UpdateConnectionConfigurationRequest'; +import { UpdateConnectionRequest } from '../models/UpdateConnectionRequest'; +import { UpdateConnectionStatusRequest, UpdateConnectionStatusRequestStatusEnum } from '../models/UpdateConnectionStatusRequest'; +import { UpdateConnectionV2Request } from '../models/UpdateConnectionV2Request'; +import { UpdateCustomActionRequest , UpdateCustomActionRequestOperationEnum } from '../models/UpdateCustomActionRequest'; +import { UpdateCustomActionRequestActionDetails } from '../models/UpdateCustomActionRequestActionDetails'; +import { UpdateCustomActionRequestDefaultActionConfig } from '../models/UpdateCustomActionRequestDefaultActionConfig'; +import { UpdateEmailCustomizationRequest } from '../models/UpdateEmailCustomizationRequest'; +import { UpdateMetadataHeaderRequest } from '../models/UpdateMetadataHeaderRequest'; +import { UpdateMetadataObjIdRequest } from '../models/UpdateMetadataObjIdRequest'; +import { UpdateObjIdInput , UpdateObjIdInputTypeEnum } from '../models/UpdateObjIdInput'; +import { UpdateOrgRequest , UpdateOrgRequestOperationEnum } from '../models/UpdateOrgRequest'; +import { UpdateRoleRequest , UpdateRoleRequestPrivilegesEnum } from '../models/UpdateRoleRequest'; +import { UpdateScheduleRequest , UpdateScheduleRequestMetadataTypeEnum , UpdateScheduleRequestFileFormatEnum , UpdateScheduleRequestTimeZoneEnum , UpdateScheduleRequestStatusEnum } from '../models/UpdateScheduleRequest'; +import { UpdateScheduleRequestFrequency } from '../models/UpdateScheduleRequestFrequency'; +import { UpdateScheduleRequestLiveboardOptions } from '../models/UpdateScheduleRequestLiveboardOptions'; +import { UpdateScheduleRequestPdfOptions , UpdateScheduleRequestPdfOptionsPageSizeEnum } from '../models/UpdateScheduleRequestPdfOptions'; +import { UpdateScheduleRequestRecipientDetails } from '../models/UpdateScheduleRequestRecipientDetails'; +import { UpdateSystemConfigRequest } from '../models/UpdateSystemConfigRequest'; +import { UpdateTagRequest } from '../models/UpdateTagRequest'; +import { UpdateUserGroupRequest , UpdateUserGroupRequestPrivilegesEnum , UpdateUserGroupRequestTypeEnum , UpdateUserGroupRequestVisibilityEnum , UpdateUserGroupRequestOperationEnum } from '../models/UpdateUserGroupRequest'; +import { UpdateUserRequest , UpdateUserRequestVisibilityEnum , UpdateUserRequestAccountStatusEnum , UpdateUserRequestAccountTypeEnum , UpdateUserRequestOperationEnum , UpdateUserRequestPreferredLocaleEnum } from '../models/UpdateUserRequest'; +import { UpdateVariableRequest } from '../models/UpdateVariableRequest'; +import { UpdateVariableValuesRequest } from '../models/UpdateVariableValuesRequest'; +import { UpdateWebhookConfigurationRequest , UpdateWebhookConfigurationRequestEventsEnum } from '../models/UpdateWebhookConfigurationRequest'; +import { User , UserVisibilityEnum , UserAccountTypeEnum , UserAccountStatusEnum , UserParentTypeEnum } from '../models/User'; +import { UserGroup } from '../models/UserGroup'; +import { UserGroupResponse , UserGroupResponseParentTypeEnum , UserGroupResponseTypeEnum , UserGroupResponseVisibilityEnum } from '../models/UserGroupResponse'; +import { UserInfo } from '../models/UserInfo'; +import { UserObject, UserObjectTypeEnum } from '../models/UserObject'; +import { UserParameterOptions } from '../models/UserParameterOptions'; +import { UserPrincipal } from '../models/UserPrincipal'; +import { ValidateCommunicationChannelRequest, ValidateCommunicationChannelRequestChannelTypeEnum , ValidateCommunicationChannelRequestEventTypeEnum } from '../models/ValidateCommunicationChannelRequest'; +import { ValidateMergeRequest } from '../models/ValidateMergeRequest'; +import { ValidateTokenRequest } from '../models/ValidateTokenRequest'; +import { ValueScopeInput , ValueScopeInputPrincipalTypeEnum } from '../models/ValueScopeInput'; +import { Variable , VariableVariableTypeEnum } from '../models/Variable'; +import { VariableDetailInput , VariableDetailInputTypeEnum } from '../models/VariableDetailInput'; +import { VariableOrgInfo } from '../models/VariableOrgInfo'; +import { VariablePutAssignmentInput , VariablePutAssignmentInputPrincipalTypeEnum } from '../models/VariablePutAssignmentInput'; +import { VariableUpdateAssignmentInput , VariableUpdateAssignmentInputOperationEnum } from '../models/VariableUpdateAssignmentInput'; +import { VariableUpdateScopeInput , VariableUpdateScopeInputPrincipalTypeEnum } from '../models/VariableUpdateScopeInput'; +import { VariableValue , VariableValuePrincipalTypeEnum } from '../models/VariableValue'; +import { VariableValues } from '../models/VariableValues'; +import { WebhookAuthApiKey } from '../models/WebhookAuthApiKey'; +import { WebhookAuthApiKeyInput } from '../models/WebhookAuthApiKeyInput'; +import { WebhookAuthBasicAuth } from '../models/WebhookAuthBasicAuth'; +import { WebhookAuthBasicAuthInput } from '../models/WebhookAuthBasicAuthInput'; +import { WebhookAuthOAuth2 } from '../models/WebhookAuthOAuth2'; +import { WebhookAuthOAuth2Input } from '../models/WebhookAuthOAuth2Input'; +import { WebhookAuthentication } from '../models/WebhookAuthentication'; +import { WebhookAuthenticationInput } from '../models/WebhookAuthenticationInput'; +import { WebhookDeleteFailure } from '../models/WebhookDeleteFailure'; +import { WebhookDeleteResponse } from '../models/WebhookDeleteResponse'; +import { WebhookKeyValuePair } from '../models/WebhookKeyValuePair'; +import { WebhookKeyValuePairInput } from '../models/WebhookKeyValuePairInput'; +import { WebhookOrg } from '../models/WebhookOrg'; +import { WebhookPagination } from '../models/WebhookPagination'; +import { WebhookResponse , WebhookResponseEventsEnum } from '../models/WebhookResponse'; +import { WebhookSearchResponse } from '../models/WebhookSearchResponse'; +import { WebhookSignatureVerification, WebhookSignatureVerificationTypeEnum , WebhookSignatureVerificationAlgorithmEnum } from '../models/WebhookSignatureVerification'; +import { WebhookSignatureVerificationInput, WebhookSignatureVerificationInputTypeEnum , WebhookSignatureVerificationInputAlgorithmEnum } from '../models/WebhookSignatureVerificationInput'; +import { WebhookSortOptionsInput, WebhookSortOptionsInputFieldNameEnum , WebhookSortOptionsInputOrderEnum } from '../models/WebhookSortOptionsInput'; +import { WebhookUser } from '../models/WebhookUser'; + +/* tslint:disable:no-unused-variable */ +let primitives = [ + "string", + "boolean", + "double", + "integer", + "long", + "float", + "number", + "any" + ]; + +const supportedMediaTypes: { [mediaType: string]: number } = { + "application/json": Infinity, + "application/octet-stream": 0, + "application/x-www-form-urlencoded": 0 +} + + +let enumsMap: Set = new Set([ + "ActionConfigInputPositionEnum", + "ActionConfigInputCreatePositionEnum", + "AssociateMetadataInputTypeEnum", + "AssociateMetadataInputCreateTypeEnum", + "AuthClusterPreferencesAuthStatusEnum", + "AuthClusterPreferencesInputAuthStatusEnum", + "AuthOrgPreferenceAuthStatusEnum", + "AuthOrgPreferenceInputAuthStatusEnum", + "AuthorMetadataTypeInputTypeEnum", + "ChannelHistoryEventInfoTypeEnum", + "ChannelHistoryEventInputTypeEnum", + "ChannelHistoryJobStatusEnum", + "ChannelValidationDetailValidationStepEnum", + "ChannelValidationDetailStatusEnum", + "CollectionMetadataInputTypeEnum", + "ColumnSecurityRuleGroupOperationOperationEnum", + "CommunicationChannelValidateResponseChannelTypeEnum", + "CommunicationChannelValidateResponseEventTypeEnum", + "CommunicationChannelValidateResponseResultCodeEnum", + "ConfigureAuthSettingsRequestAuthTypeEnum", + "ConfigureAuthSettingsRequestClusterPreferencesAuthStatusEnum", + "ConnectionConfigurationResponsePolicyProcessesEnum", + "ConnectionConfigurationResponseDataWarehouseTypeEnum", + "ConnectionConfigurationResponsePolicyTypeEnum", + "ConnectionConfigurationSearchRequestPolicyTypeEnum", + "ContextPayloadV2InputTypeEnum", + "CopyObjectRequestTypeEnum", + "CreateAgentConversationRequestMetadataContextTypeEnum", + "CreateCalendarRequestCreationMethodEnum", + "CreateCalendarRequestCalendarTypeEnum", + "CreateCalendarRequestMonthOffsetEnum", + "CreateCalendarRequestStartDayOfWeekEnum", + "CreateConnectionConfigurationRequestAuthenticationTypeEnum", + "CreateConnectionConfigurationRequestPolicyTypeEnum", + "CreateConnectionConfigurationRequestPolicyProcessesEnum", + "CreateConnectionRequestDataWarehouseTypeEnum", + "CreateConnectionResponseDataWarehouseTypeEnum", + "CreateRoleRequestPrivilegesEnum", + "CreateScheduleRequestMetadataTypeEnum", + "CreateScheduleRequestFileFormatEnum", + "CreateScheduleRequestTimeZoneEnum", + "CreateScheduleRequestPdfOptionsPageSizeEnum", + "CreateUserGroupRequestPrivilegesEnum", + "CreateUserGroupRequestTypeEnum", + "CreateUserGroupRequestVisibilityEnum", + "CreateUserRequestAccountTypeEnum", + "CreateUserRequestAccountStatusEnum", + "CreateUserRequestVisibilityEnum", + "CreateUserRequestPreferredLocaleEnum", + "CreateVariableRequestTypeEnum", + "CreateVariableRequestDataTypeEnum", + "CreateWebhookConfigurationRequestEventsEnum", + "CreateWebhookConfigurationRequestSignatureVerificationTypeEnum", + "CreateWebhookConfigurationRequestSignatureVerificationAlgorithmEnum", + "CreateWebhookConfigurationRequestStorageDestinationStorageTypeEnum", + "CustomActionMetadataTypeInputTypeEnum", + "DeleteMetadataTypeInputTypeEnum", + "DeployCommitRequestDeployTypeEnum", + "DeployCommitRequestDeployPolicyEnum", + "EventChannelConfigEventTypeEnum", + "EventChannelConfigChannelsEnum", + "EventChannelConfigInputEventTypeEnum", + "EventChannelConfigInputChannelsEnum", + "ExcludeMetadataListItemInputTypeEnum", + "ExportAnswerReportRequestFileFormatEnum", + "ExportAnswerReportRequestTypeEnum", + "ExportAnswerReportRequestRegionalSettingsCurrencyFormatEnum", + "ExportAnswerReportRequestRegionalSettingsUserLocaleEnum", + "ExportAnswerReportRequestRegionalSettingsNumberFormatLocaleEnum", + "ExportAnswerReportRequestRegionalSettingsDateFormatLocaleEnum", + "ExportLiveboardReportRequestFileFormatEnum", + "ExportLiveboardReportRequestPdfOptionsPageSizeEnum", + "ExportLiveboardReportRequestPdfOptionsPageOrientationEnum", + "ExportMetadataTMLBatchedRequestMetadataTypeEnum", + "ExportMetadataTMLBatchedRequestEdocFormatEnum", + "ExportMetadataTMLRequestEdocFormatEnum", + "ExportMetadataTMLRequestExportSchemaVersionEnum", + "ExportMetadataTypeInputTypeEnum", + "FavoriteMetadataInputTypeEnum", + "FavoriteMetadataItemTypeEnum", + "FetchAnswerDataRequestDataFormatEnum", + "FetchAsyncImportTaskStatusRequestTaskStatusEnum", + "FetchLiveboardDataRequestDataFormatEnum", + "FetchLogsRequestLogTypeEnum", + "FetchPermissionsOfPrincipalsRequestDefaultMetadataTypeEnum", + "FilterRulesOperatorEnum", + "GenerateCSVRequestCalendarTypeEnum", + "GenerateCSVRequestMonthOffsetEnum", + "GenerateCSVRequestStartDayOfWeekEnum", + "GetCustomAccessTokenRequestPersistOptionEnum", + "GroupsImportListInputPrivilegesEnum", + "GroupsImportListInputTypeEnum", + "GroupsImportListInputVisibilityEnum", + "HeaderUpdateInputTypeEnum", + "ImportEPackAsyncTaskStatusTaskStatusEnum", + "ImportEPackAsyncTaskStatusImportPolicyEnum", + "ImportMetadataTMLAsyncRequestImportPolicyEnum", + "ImportMetadataTMLRequestImportPolicyEnum", + "ImportUserAccountTypeEnum", + "ImportUserAccountStatusEnum", + "ImportUserVisibilityEnum", + "ImportUserPreferredLocaleEnum", + "JWTMetadataObjectTypeEnum", + "JobRecipientTypeEnum", + "ManageObjectPrivilegeRequestOperationEnum", + "ManageObjectPrivilegeRequestMetadataTypeEnum", + "ManageObjectPrivilegeRequestObjectPrivilegeTypesEnum", + "MetadataInputTypeEnum", + "MetadataListItemInputTypeEnum", + "MetadataListItemInputSubtypesEnum", + "MetadataObjectTypeEnum", + "MetadataResponseTypeEnum", + "MetadataSearchResponseMetadataTypeEnum", + "MetadataSearchSortOptionsFieldNameEnum", + "MetadataSearchSortOptionsOrderEnum", + "NLInstructionsInfoScopeEnum", + "NLInstructionsInfoInputScopeEnum", + "ObjectPrivilegesMetadataInputTypeEnum", + "OrgChannelConfigInputOperationEnum", + "OrgChannelConfigInputResetEventsEnum", + "OrgPreferenceSearchCriteriaInputEventTypesEnum", + "OrgResponseStatusEnum", + "OrgResponseVisibilityEnum", + "ParameterizeMetadataFieldsRequestMetadataTypeEnum", + "ParameterizeMetadataFieldsRequestFieldTypeEnum", + "ParameterizeMetadataRequestMetadataTypeEnum", + "ParameterizeMetadataRequestFieldTypeEnum", + "PdfOptionsPageSizeEnum", + "PdfOptionsInputPageSizeEnum", + "PdfOptionsInputPageOrientationEnum", + "PermissionInputShareModeEnum", + "PermissionsMetadataTypeInputTypeEnum", + "PrincipalsInputTypeEnum", + "PublishMetadataListItemTypeEnum", + "PutVariableValuesRequestOperationEnum", + "RegionalSettingsInputCurrencyFormatEnum", + "RegionalSettingsInputUserLocaleEnum", + "RegionalSettingsInputNumberFormatLocaleEnum", + "RegionalSettingsInputDateFormatLocaleEnum", + "ResponseMessageMessageTypeEnum", + "ResponseMessageVisualizationTypeEnum", + "RevertCommitRequestRevertPolicyEnum", + "RoleResponsePrivilegesEnum", + "RoleResponsePermissionEnum", + "RuntimeFiltersOperatorEnum", + "RuntimeSortsOrderEnum", + "SchedulesPdfOptionsInputPageSizeEnum", + "SearchAuthSettingsRequestAuthTypeEnum", + "SearchAuthSettingsRequestScopeEnum", + "SearchAuthSettingsResponseAuthTypeEnum", + "SearchCalendarsRequestSortOptionsFieldNameEnum", + "SearchCalendarsRequestSortOptionsOrderEnum", + "SearchChannelHistoryRequestChannelTypeEnum", + "SearchChannelHistoryRequestChannelStatusEnum", + "SearchCollectionsRequestSortOptionsFieldNameEnum", + "SearchCollectionsRequestSortOptionsOrderEnum", + "SearchCommitsRequestMetadataTypeEnum", + "SearchCommunicationChannelPreferencesRequestClusterPreferencesEnum", + "SearchConnectionRequestDataWarehouseTypesEnum", + "SearchConnectionRequestDataWarehouseObjectTypeEnum", + "SearchConnectionRequestAuthenticationTypeEnum", + "SearchConnectionRequestSortOptionsFieldNameEnum", + "SearchConnectionRequestSortOptionsOrderEnum", + "SearchConnectionResponseDataWarehouseTypeEnum", + "SearchCustomActionsRequestTypeEnum", + "SearchDataRequestDataFormatEnum", + "SearchMetadataRequestDependentObjectVersionEnum", + "SearchMetadataRequestLiveboardResponseVersionEnum", + "SearchMetadataRequestSortOptionsFieldNameEnum", + "SearchMetadataRequestSortOptionsOrderEnum", + "SearchOrgsRequestVisibilityEnum", + "SearchOrgsRequestStatusEnum", + "SearchRoleResponsePrivilegesEnum", + "SearchRoleResponsePermissionEnum", + "SearchRolesRequestPrivilegesEnum", + "SearchRolesRequestPermissionsEnum", + "SearchSecuritySettingsRequestScopeEnum", + "SearchUserGroupsRequestPrivilegesEnum", + "SearchUserGroupsRequestTypeEnum", + "SearchUserGroupsRequestVisibilityEnum", + "SearchUserGroupsRequestSortOptionsFieldNameEnum", + "SearchUserGroupsRequestSortOptionsOrderEnum", + "SearchUsersRequestVisibilityEnum", + "SearchUsersRequestPrivilegesEnum", + "SearchUsersRequestAccountTypeEnum", + "SearchUsersRequestAccountStatusEnum", + "SearchVariablesRequestResponseContentEnum", + "SearchWebhookConfigurationsRequestEventTypeEnum", + "SearchWebhookConfigurationsRequestSortOptionsFieldNameEnum", + "SearchWebhookConfigurationsRequestSortOptionsOrderEnum", + "SecuritySettingsClusterPreferencesTrustedAuthStatusEnum", + "SecuritySettingsOrgPreferencesTrustedAuthStatusEnum", + "ShareMetadataRequestMetadataTypeEnum", + "ShareMetadataTypeInputTypeEnum", + "SharePermissionsInputShareModeEnum", + "SharePermissionsInputContentShareModeEnum", + "SortOptionFieldNameEnum", + "SortOptionOrderEnum", + "SortOptionInputFieldNameEnum", + "SortOptionInputOrderEnum", + "SortOptionsFieldNameEnum", + "SortOptionsOrderEnum", + "SqlQueryResponseMetadataTypeEnum", + "StorageDestinationStorageTypeEnum", + "StorageDestinationInputStorageTypeEnum", + "SyncMetadataRequestSyncAttributesEnum", + "SyncMetadataResponseStatusEnum", + "TagMetadataTypeInputTypeEnum", + "TokenAccessScopeObjectTypeEnum", + "UnparameterizeMetadataRequestMetadataTypeEnum", + "UnparameterizeMetadataRequestFieldTypeEnum", + "UpdateCalendarRequestUpdateMethodEnum", + "UpdateCalendarRequestCalendarTypeEnum", + "UpdateCalendarRequestMonthOffsetEnum", + "UpdateCalendarRequestStartDayOfWeekEnum", + "UpdateCollectionRequestOperationEnum", + "UpdateConnectionConfigurationRequestAuthenticationTypeEnum", + "UpdateConnectionConfigurationRequestPolicyTypeEnum", + "UpdateConnectionConfigurationRequestPolicyProcessesEnum", + "UpdateConnectionStatusRequestStatusEnum", + "UpdateCustomActionRequestOperationEnum", + "UpdateObjIdInputTypeEnum", + "UpdateOrgRequestOperationEnum", + "UpdateRoleRequestPrivilegesEnum", + "UpdateScheduleRequestMetadataTypeEnum", + "UpdateScheduleRequestFileFormatEnum", + "UpdateScheduleRequestTimeZoneEnum", + "UpdateScheduleRequestStatusEnum", + "UpdateScheduleRequestPdfOptionsPageSizeEnum", + "UpdateUserGroupRequestPrivilegesEnum", + "UpdateUserGroupRequestTypeEnum", + "UpdateUserGroupRequestVisibilityEnum", + "UpdateUserGroupRequestOperationEnum", + "UpdateUserRequestVisibilityEnum", + "UpdateUserRequestAccountStatusEnum", + "UpdateUserRequestAccountTypeEnum", + "UpdateUserRequestOperationEnum", + "UpdateUserRequestPreferredLocaleEnum", + "UpdateWebhookConfigurationRequestEventsEnum", + "UserVisibilityEnum", + "UserAccountTypeEnum", + "UserAccountStatusEnum", + "UserParentTypeEnum", + "UserGroupResponseParentTypeEnum", + "UserGroupResponseTypeEnum", + "UserGroupResponseVisibilityEnum", + "UserObjectTypeEnum", + "ValidateCommunicationChannelRequestChannelTypeEnum", + "ValidateCommunicationChannelRequestEventTypeEnum", + "ValueScopeInputPrincipalTypeEnum", + "VariableVariableTypeEnum", + "VariableDetailInputTypeEnum", + "VariablePutAssignmentInputPrincipalTypeEnum", + "VariableUpdateAssignmentInputOperationEnum", + "VariableUpdateScopeInputPrincipalTypeEnum", + "VariableValuePrincipalTypeEnum", + "WebhookResponseEventsEnum", + "WebhookSignatureVerificationTypeEnum", + "WebhookSignatureVerificationAlgorithmEnum", + "WebhookSignatureVerificationInputTypeEnum", + "WebhookSignatureVerificationInputAlgorithmEnum", + "WebhookSortOptionsInputFieldNameEnum", + "WebhookSortOptionsInputOrderEnum", +]); + +let typeMap: {[index: string]: any} = { + "AIContext": AIContext, + "APIKey": APIKey, + "APIKeyInput": APIKeyInput, + "AccessToken": AccessToken, + "ActionConfig": ActionConfig, + "ActionConfigInput": ActionConfigInput, + "ActionConfigInputCreate": ActionConfigInputCreate, + "ActionDetails": ActionDetails, + "ActionDetailsInput": ActionDetailsInput, + "ActionDetailsInputCreate": ActionDetailsInputCreate, + "ActivateUserRequest": ActivateUserRequest, + "AgentConversation": AgentConversation, + "AnswerContent": AnswerContent, + "AnswerDataResponse": AnswerDataResponse, + "AnswerPngOptionsInput": AnswerPngOptionsInput, + "AssignChangeAuthorRequest": AssignChangeAuthorRequest, + "AssignTagRequest": AssignTagRequest, + "AssociateMetadataInput": AssociateMetadataInput, + "AssociateMetadataInputCreate": AssociateMetadataInputCreate, + "AuthClusterPreferences": AuthClusterPreferences, + "AuthClusterPreferencesInput": AuthClusterPreferencesInput, + "AuthOrgInfo": AuthOrgInfo, + "AuthOrgPreference": AuthOrgPreference, + "AuthOrgPreferenceInput": AuthOrgPreferenceInput, + "AuthSettingsAccessToken": AuthSettingsAccessToken, + "Authentication": Authentication, + "AuthenticationInput": AuthenticationInput, + "Author": Author, + "AuthorMetadataTypeInput": AuthorMetadataTypeInput, + "AuthorType": AuthorType, + "AwsS3Config": AwsS3Config, + "AwsS3ConfigInput": AwsS3ConfigInput, + "BasicAuth": BasicAuth, + "BasicAuthInput": BasicAuthInput, + "CALLBACK": CALLBACK, + "CALLBACKInput": CALLBACKInput, + "CALLBACKInputMandatory": CALLBACKInputMandatory, + "CalendarResponse": CalendarResponse, + "ChangeUserPasswordRequest": ChangeUserPasswordRequest, + "ChannelHistoryEventInfo": ChannelHistoryEventInfo, + "ChannelHistoryEventInput": ChannelHistoryEventInput, + "ChannelHistoryJob": ChannelHistoryJob, + "ChannelValidationAwsS3Info": ChannelValidationAwsS3Info, + "ChannelValidationDetail": ChannelValidationDetail, + "ClusterNonEmbedAccess": ClusterNonEmbedAccess, + "ClusterNonEmbedAccessInput": ClusterNonEmbedAccessInput, + "Collection": Collection, + "CollectionDeleteResponse": CollectionDeleteResponse, + "CollectionDeleteTypeIdentifiers": CollectionDeleteTypeIdentifiers, + "CollectionEntityIdentifier": CollectionEntityIdentifier, + "CollectionMetadataInput": CollectionMetadataInput, + "CollectionMetadataItem": CollectionMetadataItem, + "CollectionSearchResponse": CollectionSearchResponse, + "Column": Column, + "ColumnSecurityRule": ColumnSecurityRule, + "ColumnSecurityRuleColumn": ColumnSecurityRuleColumn, + "ColumnSecurityRuleGroup": ColumnSecurityRuleGroup, + "ColumnSecurityRuleGroupOperation": ColumnSecurityRuleGroupOperation, + "ColumnSecurityRuleResponse": ColumnSecurityRuleResponse, + "ColumnSecurityRuleSourceTable": ColumnSecurityRuleSourceTable, + "ColumnSecurityRuleTableInput": ColumnSecurityRuleTableInput, + "ColumnSecurityRuleUpdate": ColumnSecurityRuleUpdate, + "CommitBranchRequest": CommitBranchRequest, + "CommitFileType": CommitFileType, + "CommitHistoryResponse": CommitHistoryResponse, + "CommitResponse": CommitResponse, + "CommiterType": CommiterType, + "CommunicationChannelPreferencesResponse": CommunicationChannelPreferencesResponse, + "CommunicationChannelValidateResponse": CommunicationChannelValidateResponse, + "ConfigureAuthSettingsRequest": ConfigureAuthSettingsRequest, + "ConfigureAuthSettingsRequestClusterPreferences": ConfigureAuthSettingsRequestClusterPreferences, + "ConfigureCommunicationChannelPreferencesRequest": ConfigureCommunicationChannelPreferencesRequest, + "ConfigureSecuritySettingsRequest": ConfigureSecuritySettingsRequest, + "ConfigureSecuritySettingsRequestClusterPreferences": ConfigureSecuritySettingsRequestClusterPreferences, + "ConnectionConfigurationResponse": ConnectionConfigurationResponse, + "ConnectionConfigurationSearchRequest": ConnectionConfigurationSearchRequest, + "ConnectionInput": ConnectionInput, + "ContextPayloadV2Input": ContextPayloadV2Input, + "Conversation": Conversation, + "ConversationSettingsInput": ConversationSettingsInput, + "ConvertWorksheetToModelRequest": ConvertWorksheetToModelRequest, + "CopyObjectRequest": CopyObjectRequest, + "CreateAgentConversationRequest": CreateAgentConversationRequest, + "CreateAgentConversationRequestConversationSettings": CreateAgentConversationRequestConversationSettings, + "CreateAgentConversationRequestMetadataContext": CreateAgentConversationRequestMetadataContext, + "CreateCalendarRequest": CreateCalendarRequest, + "CreateCalendarRequestTableReference": CreateCalendarRequestTableReference, + "CreateCollectionRequest": CreateCollectionRequest, + "CreateConfigRequest": CreateConfigRequest, + "CreateConnectionConfigurationRequest": CreateConnectionConfigurationRequest, + "CreateConnectionConfigurationRequestPolicyProcessOptions": CreateConnectionConfigurationRequestPolicyProcessOptions, + "CreateConnectionRequest": CreateConnectionRequest, + "CreateConnectionResponse": CreateConnectionResponse, + "CreateConversationRequest": CreateConversationRequest, + "CreateCustomActionRequest": CreateCustomActionRequest, + "CreateCustomActionRequestActionDetails": CreateCustomActionRequestActionDetails, + "CreateCustomActionRequestDefaultActionConfig": CreateCustomActionRequestDefaultActionConfig, + "CreateEmailCustomizationRequest": CreateEmailCustomizationRequest, + "CreateEmailCustomizationRequestTemplateProperties": CreateEmailCustomizationRequestTemplateProperties, + "CreateEmailCustomizationResponse": CreateEmailCustomizationResponse, + "CreateOrgRequest": CreateOrgRequest, + "CreateRoleRequest": CreateRoleRequest, + "CreateScheduleRequest": CreateScheduleRequest, + "CreateScheduleRequestFrequency": CreateScheduleRequestFrequency, + "CreateScheduleRequestLiveboardOptions": CreateScheduleRequestLiveboardOptions, + "CreateScheduleRequestPdfOptions": CreateScheduleRequestPdfOptions, + "CreateScheduleRequestRecipientDetails": CreateScheduleRequestRecipientDetails, + "CreateTagRequest": CreateTagRequest, + "CreateUserGroupRequest": CreateUserGroupRequest, + "CreateUserRequest": CreateUserRequest, + "CreateVariableRequest": CreateVariableRequest, + "CreateWebhookConfigurationRequest": CreateWebhookConfigurationRequest, + "CreateWebhookConfigurationRequestAuthentication": CreateWebhookConfigurationRequestAuthentication, + "CreateWebhookConfigurationRequestSignatureVerification": CreateWebhookConfigurationRequestSignatureVerification, + "CreateWebhookConfigurationRequestStorageDestination": CreateWebhookConfigurationRequestStorageDestination, + "CronExpression": CronExpression, + "CronExpressionInput": CronExpressionInput, + "CspSettings": CspSettings, + "CspSettingsInput": CspSettingsInput, + "CustomActionMetadataTypeInput": CustomActionMetadataTypeInput, + "DataSource": DataSource, + "DataSourceContextInput": DataSourceContextInput, + "DataWarehouseObjectInput": DataWarehouseObjectInput, + "DataWarehouseObjects": DataWarehouseObjects, + "Database": Database, + "DbtSearchResponse": DbtSearchResponse, + "DeactivateUserRequest": DeactivateUserRequest, + "DefaultActionConfig": DefaultActionConfig, + "DefaultActionConfigInput": DefaultActionConfigInput, + "DefaultActionConfigInputCreate": DefaultActionConfigInputCreate, + "DefaultActionConfigSearchInput": DefaultActionConfigSearchInput, + "DeleteCollectionRequest": DeleteCollectionRequest, + "DeleteConfigRequest": DeleteConfigRequest, + "DeleteConnectionConfigurationRequest": DeleteConnectionConfigurationRequest, + "DeleteConnectionRequest": DeleteConnectionRequest, + "DeleteMetadataRequest": DeleteMetadataRequest, + "DeleteMetadataTypeInput": DeleteMetadataTypeInput, + "DeleteOrgEmailCustomizationRequest": DeleteOrgEmailCustomizationRequest, + "DeleteVariablesRequest": DeleteVariablesRequest, + "DeleteWebhookConfigurationsRequest": DeleteWebhookConfigurationsRequest, + "DeployCommitRequest": DeployCommitRequest, + "DeployResponse": DeployResponse, + "EntityHeader": EntityHeader, + "ErrorResponse": ErrorResponse, + "EurekaDataSourceSuggestionResponse": EurekaDataSourceSuggestionResponse, + "EurekaDecomposeQueryResponse": EurekaDecomposeQueryResponse, + "EurekaGetNLInstructionsResponse": EurekaGetNLInstructionsResponse, + "EurekaGetRelevantQuestionsResponse": EurekaGetRelevantQuestionsResponse, + "EurekaLLMDecomposeQueryResponse": EurekaLLMDecomposeQueryResponse, + "EurekaLLMSuggestedQuery": EurekaLLMSuggestedQuery, + "EurekaRelevantQuestion": EurekaRelevantQuestion, + "EurekaSetNLInstructionsResponse": EurekaSetNLInstructionsResponse, + "EventChannelConfig": EventChannelConfig, + "EventChannelConfigInput": EventChannelConfigInput, + "ExcludeMetadataListItemInput": ExcludeMetadataListItemInput, + "ExportAnswerReportRequest": ExportAnswerReportRequest, + "ExportAnswerReportRequestPngOptions": ExportAnswerReportRequestPngOptions, + "ExportAnswerReportRequestRegionalSettings": ExportAnswerReportRequestRegionalSettings, + "ExportLiveboardReportRequest": ExportLiveboardReportRequest, + "ExportLiveboardReportRequestPdfOptions": ExportLiveboardReportRequestPdfOptions, + "ExportLiveboardReportRequestPngOptions": ExportLiveboardReportRequestPngOptions, + "ExportMetadataTMLBatchedRequest": ExportMetadataTMLBatchedRequest, + "ExportMetadataTMLRequest": ExportMetadataTMLRequest, + "ExportMetadataTMLRequestExportOptions": ExportMetadataTMLRequestExportOptions, + "ExportMetadataTypeInput": ExportMetadataTypeInput, + "ExportOptions": ExportOptions, + "ExternalTableInput": ExternalTableInput, + "FavoriteMetadataInput": FavoriteMetadataInput, + "FavoriteMetadataItem": FavoriteMetadataItem, + "FavoriteObjectOptionsInput": FavoriteObjectOptionsInput, + "FetchAnswerDataRequest": FetchAnswerDataRequest, + "FetchAnswerSqlQueryRequest": FetchAnswerSqlQueryRequest, + "FetchAsyncImportTaskStatusRequest": FetchAsyncImportTaskStatusRequest, + "FetchColumnSecurityRulesRequest": FetchColumnSecurityRulesRequest, + "FetchConnectionDiffStatusResponse": FetchConnectionDiffStatusResponse, + "FetchLiveboardDataRequest": FetchLiveboardDataRequest, + "FetchLiveboardSqlQueryRequest": FetchLiveboardSqlQueryRequest, + "FetchLogsRequest": FetchLogsRequest, + "FetchObjectPrivilegesRequest": FetchObjectPrivilegesRequest, + "FetchPermissionsOfPrincipalsRequest": FetchPermissionsOfPrincipalsRequest, + "FetchPermissionsOnMetadataRequest": FetchPermissionsOnMetadataRequest, + "FilterRules": FilterRules, + "ForceLogoutUsersRequest": ForceLogoutUsersRequest, + "Frequency": Frequency, + "FrequencyInput": FrequencyInput, + "GenerateCSVRequest": GenerateCSVRequest, + "GenericInfo": GenericInfo, + "GetAsyncImportStatusResponse": GetAsyncImportStatusResponse, + "GetCustomAccessTokenRequest": GetCustomAccessTokenRequest, + "GetDataSourceSuggestionsRequest": GetDataSourceSuggestionsRequest, + "GetFullAccessTokenRequest": GetFullAccessTokenRequest, + "GetFullAccessTokenRequestUserParameters": GetFullAccessTokenRequestUserParameters, + "GetNLInstructionsRequest": GetNLInstructionsRequest, + "GetObjectAccessTokenRequest": GetObjectAccessTokenRequest, + "GetRelevantQuestionsRequest": GetRelevantQuestionsRequest, + "GetRelevantQuestionsRequestAiContext": GetRelevantQuestionsRequestAiContext, + "GetRelevantQuestionsRequestMetadataContext": GetRelevantQuestionsRequestMetadataContext, + "GetTokenResponse": GetTokenResponse, + "GroupInfo": GroupInfo, + "GroupObject": GroupObject, + "GroupsImportListInput": GroupsImportListInput, + "HeaderAttributeInput": HeaderAttributeInput, + "HeaderUpdateInput": HeaderUpdateInput, + "ImportEPackAsyncTaskStatus": ImportEPackAsyncTaskStatus, + "ImportMetadataTMLAsyncRequest": ImportMetadataTMLAsyncRequest, + "ImportMetadataTMLRequest": ImportMetadataTMLRequest, + "ImportUser": ImportUser, + "ImportUserGroupsRequest": ImportUserGroupsRequest, + "ImportUserGroupsResponse": ImportUserGroupsResponse, + "ImportUserType": ImportUserType, + "ImportUsersRequest": ImportUsersRequest, + "ImportUsersResponse": ImportUsersResponse, + "InputEurekaNLSRequest": InputEurekaNLSRequest, + "JWTMetadataObject": JWTMetadataObject, + "JWTParameter": JWTParameter, + "JWTUserOptions": JWTUserOptions, + "JWTUserOptionsFull": JWTUserOptionsFull, + "JobRecipient": JobRecipient, + "LiveboardContent": LiveboardContent, + "LiveboardDataResponse": LiveboardDataResponse, + "LiveboardOptions": LiveboardOptions, + "LiveboardOptionsInput": LiveboardOptionsInput, + "LogResponse": LogResponse, + "LoginRequest": LoginRequest, + "ManageObjectPrivilegeRequest": ManageObjectPrivilegeRequest, + "MetadataAssociationItem": MetadataAssociationItem, + "MetadataContext": MetadataContext, + "MetadataInput": MetadataInput, + "MetadataListItemInput": MetadataListItemInput, + "MetadataObject": MetadataObject, + "MetadataResponse": MetadataResponse, + "MetadataSearchResponse": MetadataSearchResponse, + "MetadataSearchSortOptions": MetadataSearchSortOptions, + "ModelTableList": ModelTableList, + "NLInstructionsInfo": NLInstructionsInfo, + "NLInstructionsInfoInput": NLInstructionsInfoInput, + "ObjectIDAndName": ObjectIDAndName, + "ObjectPrivilegesMetadataInput": ObjectPrivilegesMetadataInput, + "ObjectPrivilegesOfMetadataResponse": ObjectPrivilegesOfMetadataResponse, + "Org": Org, + "OrgChannelConfigInput": OrgChannelConfigInput, + "OrgChannelConfigResponse": OrgChannelConfigResponse, + "OrgDetails": OrgDetails, + "OrgInfo": OrgInfo, + "OrgNonEmbedAccess": OrgNonEmbedAccess, + "OrgNonEmbedAccessInput": OrgNonEmbedAccessInput, + "OrgPreferenceSearchCriteriaInput": OrgPreferenceSearchCriteriaInput, + "OrgResponse": OrgResponse, + "OrgType": OrgType, + "ParameterValues": ParameterValues, + "ParameterizeMetadataFieldsRequest": ParameterizeMetadataFieldsRequest, + "ParameterizeMetadataRequest": ParameterizeMetadataRequest, + "ParametersListItem": ParametersListItem, + "ParametersListItemInput": ParametersListItemInput, + "PdfOptions": PdfOptions, + "PdfOptionsInput": PdfOptionsInput, + "PermissionInput": PermissionInput, + "PermissionOfMetadataResponse": PermissionOfMetadataResponse, + "PermissionOfPrincipalsResponse": PermissionOfPrincipalsResponse, + "PermissionsMetadataTypeInput": PermissionsMetadataTypeInput, + "PngOptionsInput": PngOptionsInput, + "PolicyProcessOptions": PolicyProcessOptions, + "PolicyProcessOptionsInput": PolicyProcessOptionsInput, + "PrincipalsInput": PrincipalsInput, + "PrincipalsListItem": PrincipalsListItem, + "PrincipalsListItemInput": PrincipalsListItemInput, + "PublishMetadataListItem": PublishMetadataListItem, + "PublishMetadataRequest": PublishMetadataRequest, + "PutVariableValuesRequest": PutVariableValuesRequest, + "QueryGetDecomposedQueryRequest": QueryGetDecomposedQueryRequest, + "QueryGetDecomposedQueryRequestNlsRequest": QueryGetDecomposedQueryRequestNlsRequest, + "RecipientDetails": RecipientDetails, + "RecipientDetailsInput": RecipientDetailsInput, + "RegionalSettingsInput": RegionalSettingsInput, + "RepoConfigObject": RepoConfigObject, + "ResetUserPasswordRequest": ResetUserPasswordRequest, + "ResponseActivationURL": ResponseActivationURL, + "ResponseCopyObject": ResponseCopyObject, + "ResponseCustomAction": ResponseCustomAction, + "ResponseFailedEntities": ResponseFailedEntities, + "ResponseFailedEntity": ResponseFailedEntity, + "ResponseIncompleteEntities": ResponseIncompleteEntities, + "ResponseIncompleteEntity": ResponseIncompleteEntity, + "ResponseMessage": ResponseMessage, + "ResponsePostUpgradeFailedEntities": ResponsePostUpgradeFailedEntities, + "ResponsePostUpgradeFailedEntity": ResponsePostUpgradeFailedEntity, + "ResponseSchedule": ResponseSchedule, + "ResponseScheduleRun": ResponseScheduleRun, + "ResponseSuccessfulEntities": ResponseSuccessfulEntities, + "ResponseSuccessfulEntity": ResponseSuccessfulEntity, + "ResponseWorksheetToModelConversion": ResponseWorksheetToModelConversion, + "RevertCommitRequest": RevertCommitRequest, + "RevertResponse": RevertResponse, + "RevertedMetadata": RevertedMetadata, + "RevokeRefreshTokensRequest": RevokeRefreshTokensRequest, + "RevokeRefreshTokensResponse": RevokeRefreshTokensResponse, + "RevokeTokenRequest": RevokeTokenRequest, + "RiseGQLArgWrapper": RiseGQLArgWrapper, + "RiseSetter": RiseSetter, + "Role": Role, + "RoleResponse": RoleResponse, + "RuntimeFilter": RuntimeFilter, + "RuntimeFilters": RuntimeFilters, + "RuntimeParamOverride": RuntimeParamOverride, + "RuntimeParameters": RuntimeParameters, + "RuntimeSort": RuntimeSort, + "RuntimeSorts": RuntimeSorts, + "ScheduleHistoryRunsOptionsInput": ScheduleHistoryRunsOptionsInput, + "SchedulesPdfOptionsInput": SchedulesPdfOptionsInput, + "SchemaObject": SchemaObject, + "Scope": Scope, + "ScriptSrcUrls": ScriptSrcUrls, + "ScriptSrcUrlsInput": ScriptSrcUrlsInput, + "SearchAuthSettingsRequest": SearchAuthSettingsRequest, + "SearchAuthSettingsResponse": SearchAuthSettingsResponse, + "SearchCalendarsRequest": SearchCalendarsRequest, + "SearchCalendarsRequestSortOptions": SearchCalendarsRequestSortOptions, + "SearchChannelHistoryRequest": SearchChannelHistoryRequest, + "SearchChannelHistoryResponse": SearchChannelHistoryResponse, + "SearchCollectionsRequest": SearchCollectionsRequest, + "SearchCollectionsRequestSortOptions": SearchCollectionsRequestSortOptions, + "SearchCommitsRequest": SearchCommitsRequest, + "SearchCommunicationChannelPreferencesRequest": SearchCommunicationChannelPreferencesRequest, + "SearchConfigRequest": SearchConfigRequest, + "SearchConnectionRequest": SearchConnectionRequest, + "SearchConnectionRequestSortOptions": SearchConnectionRequestSortOptions, + "SearchConnectionResponse": SearchConnectionResponse, + "SearchCustomActionsRequest": SearchCustomActionsRequest, + "SearchCustomActionsRequestDefaultActionConfig": SearchCustomActionsRequestDefaultActionConfig, + "SearchDataRequest": SearchDataRequest, + "SearchDataResponse": SearchDataResponse, + "SearchEmailCustomizationRequest": SearchEmailCustomizationRequest, + "SearchMetadataRequest": SearchMetadataRequest, + "SearchMetadataRequestFavoriteObjectOptions": SearchMetadataRequestFavoriteObjectOptions, + "SearchMetadataRequestSortOptions": SearchMetadataRequestSortOptions, + "SearchOrgsRequest": SearchOrgsRequest, + "SearchRoleResponse": SearchRoleResponse, + "SearchRolesRequest": SearchRolesRequest, + "SearchSchedulesRequest": SearchSchedulesRequest, + "SearchSchedulesRequestHistoryRunsOptions": SearchSchedulesRequestHistoryRunsOptions, + "SearchSchedulesRequestSortOptions": SearchSchedulesRequestSortOptions, + "SearchSecuritySettingsRequest": SearchSecuritySettingsRequest, + "SearchTagsRequest": SearchTagsRequest, + "SearchUserGroupsRequest": SearchUserGroupsRequest, + "SearchUserGroupsRequestSortOptions": SearchUserGroupsRequestSortOptions, + "SearchUsersRequest": SearchUsersRequest, + "SearchVariablesRequest": SearchVariablesRequest, + "SearchWebhookConfigurationsRequest": SearchWebhookConfigurationsRequest, + "SearchWebhookConfigurationsRequestSortOptions": SearchWebhookConfigurationsRequestSortOptions, + "SecuritySettingsClusterPreferences": SecuritySettingsClusterPreferences, + "SecuritySettingsClusterPreferencesInput": SecuritySettingsClusterPreferencesInput, + "SecuritySettingsOrgDetails": SecuritySettingsOrgDetails, + "SecuritySettingsOrgPreferences": SecuritySettingsOrgPreferences, + "SecuritySettingsOrgPreferencesInput": SecuritySettingsOrgPreferencesInput, + "SecuritySettingsResponse": SecuritySettingsResponse, + "SendAgentConversationMessageRequest": SendAgentConversationMessageRequest, + "SendAgentConversationMessageStreamingRequest": SendAgentConversationMessageStreamingRequest, + "SendAgentMessageRequest": SendAgentMessageRequest, + "SendAgentMessageResponse": SendAgentMessageResponse, + "SendAgentMessageStreamingRequest": SendAgentMessageStreamingRequest, + "SendMessageRequest": SendMessageRequest, + "SetNLInstructionsRequest": SetNLInstructionsRequest, + "ShareMetadataRequest": ShareMetadataRequest, + "ShareMetadataTypeInput": ShareMetadataTypeInput, + "SharePermissionsInput": SharePermissionsInput, + "SingleAnswerRequest": SingleAnswerRequest, + "SortOption": SortOption, + "SortOptionInput": SortOptionInput, + "SortOptions": SortOptions, + "SortingOptions": SortingOptions, + "SqlQuery": SqlQuery, + "SqlQueryResponse": SqlQueryResponse, + "StorageConfig": StorageConfig, + "StorageConfigInput": StorageConfigInput, + "StorageDestination": StorageDestination, + "StorageDestinationInput": StorageDestinationInput, + "SyncMetadataRequest": SyncMetadataRequest, + "SyncMetadataResponse": SyncMetadataResponse, + "SystemConfig": SystemConfig, + "SystemInfo": SystemInfo, + "SystemOverrideInfo": SystemOverrideInfo, + "Table": Table, + "Tag": Tag, + "TagMetadataTypeInput": TagMetadataTypeInput, + "TemplatePropertiesInputCreate": TemplatePropertiesInputCreate, + "Token": Token, + "TokenAccessScopeObject": TokenAccessScopeObject, + "TokenValidationResponse": TokenValidationResponse, + "URL": URL, + "URLInput": URLInput, + "URLInputMandatory": URLInputMandatory, + "UnassignTagRequest": UnassignTagRequest, + "UnparameterizeMetadataRequest": UnparameterizeMetadataRequest, + "UnpublishMetadataRequest": UnpublishMetadataRequest, + "UpdateCalendarRequest": UpdateCalendarRequest, + "UpdateCalendarRequestTableReference": UpdateCalendarRequestTableReference, + "UpdateCollectionRequest": UpdateCollectionRequest, + "UpdateColumnSecurityRulesRequest": UpdateColumnSecurityRulesRequest, + "UpdateConfigRequest": UpdateConfigRequest, + "UpdateConnectionConfigurationRequest": UpdateConnectionConfigurationRequest, + "UpdateConnectionRequest": UpdateConnectionRequest, + "UpdateConnectionStatusRequest": UpdateConnectionStatusRequest, + "UpdateConnectionV2Request": UpdateConnectionV2Request, + "UpdateCustomActionRequest": UpdateCustomActionRequest, + "UpdateCustomActionRequestActionDetails": UpdateCustomActionRequestActionDetails, + "UpdateCustomActionRequestDefaultActionConfig": UpdateCustomActionRequestDefaultActionConfig, + "UpdateEmailCustomizationRequest": UpdateEmailCustomizationRequest, + "UpdateMetadataHeaderRequest": UpdateMetadataHeaderRequest, + "UpdateMetadataObjIdRequest": UpdateMetadataObjIdRequest, + "UpdateObjIdInput": UpdateObjIdInput, + "UpdateOrgRequest": UpdateOrgRequest, + "UpdateRoleRequest": UpdateRoleRequest, + "UpdateScheduleRequest": UpdateScheduleRequest, + "UpdateScheduleRequestFrequency": UpdateScheduleRequestFrequency, + "UpdateScheduleRequestLiveboardOptions": UpdateScheduleRequestLiveboardOptions, + "UpdateScheduleRequestPdfOptions": UpdateScheduleRequestPdfOptions, + "UpdateScheduleRequestRecipientDetails": UpdateScheduleRequestRecipientDetails, + "UpdateSystemConfigRequest": UpdateSystemConfigRequest, + "UpdateTagRequest": UpdateTagRequest, + "UpdateUserGroupRequest": UpdateUserGroupRequest, + "UpdateUserRequest": UpdateUserRequest, + "UpdateVariableRequest": UpdateVariableRequest, + "UpdateVariableValuesRequest": UpdateVariableValuesRequest, + "UpdateWebhookConfigurationRequest": UpdateWebhookConfigurationRequest, + "User": User, + "UserGroup": UserGroup, + "UserGroupResponse": UserGroupResponse, + "UserInfo": UserInfo, + "UserObject": UserObject, + "UserParameterOptions": UserParameterOptions, + "UserPrincipal": UserPrincipal, + "ValidateCommunicationChannelRequest": ValidateCommunicationChannelRequest, + "ValidateMergeRequest": ValidateMergeRequest, + "ValidateTokenRequest": ValidateTokenRequest, + "ValueScopeInput": ValueScopeInput, + "Variable": Variable, + "VariableDetailInput": VariableDetailInput, + "VariableOrgInfo": VariableOrgInfo, + "VariablePutAssignmentInput": VariablePutAssignmentInput, + "VariableUpdateAssignmentInput": VariableUpdateAssignmentInput, + "VariableUpdateScopeInput": VariableUpdateScopeInput, + "VariableValue": VariableValue, + "VariableValues": VariableValues, + "WebhookAuthApiKey": WebhookAuthApiKey, + "WebhookAuthApiKeyInput": WebhookAuthApiKeyInput, + "WebhookAuthBasicAuth": WebhookAuthBasicAuth, + "WebhookAuthBasicAuthInput": WebhookAuthBasicAuthInput, + "WebhookAuthOAuth2": WebhookAuthOAuth2, + "WebhookAuthOAuth2Input": WebhookAuthOAuth2Input, + "WebhookAuthentication": WebhookAuthentication, + "WebhookAuthenticationInput": WebhookAuthenticationInput, + "WebhookDeleteFailure": WebhookDeleteFailure, + "WebhookDeleteResponse": WebhookDeleteResponse, + "WebhookKeyValuePair": WebhookKeyValuePair, + "WebhookKeyValuePairInput": WebhookKeyValuePairInput, + "WebhookOrg": WebhookOrg, + "WebhookPagination": WebhookPagination, + "WebhookResponse": WebhookResponse, + "WebhookSearchResponse": WebhookSearchResponse, + "WebhookSignatureVerification": WebhookSignatureVerification, + "WebhookSignatureVerificationInput": WebhookSignatureVerificationInput, + "WebhookSortOptionsInput": WebhookSortOptionsInput, + "WebhookUser": WebhookUser, +} + +export class ObjectSerializer { + public static findCorrectType(data: any, expectedType: string) { + if (data == undefined) { + return expectedType; + } else if (primitives.indexOf(expectedType.toLowerCase()) !== -1) { + return expectedType; + } else if (expectedType === "Date") { + return expectedType; + } else { + if (enumsMap.has(expectedType)) { + return expectedType; + } + + if (!typeMap[expectedType]) { + return expectedType; // w/e we don't know the type + } + + // Check the discriminator + let discriminatorProperty = typeMap[expectedType].discriminator; + if (discriminatorProperty == null) { + return expectedType; // the type does not have a discriminator. use it. + } else { + if (data[discriminatorProperty]) { + var discriminatorType = data[discriminatorProperty]; + if(typeMap[discriminatorType]){ + return discriminatorType; // use the type given in the discriminator + } else { + return expectedType; // discriminator did not map to a type + } + } else { + return expectedType; // discriminator was not present (or an empty string) + } + } + } + } + + public static serialize(data: any, type: string, format: string) { + if (data == undefined) { + return data; + } else if (primitives.indexOf(type.toLowerCase()) !== -1) { + return data; + } else if (type.lastIndexOf("Array<", 0) === 0) { // string.startsWith pre es6 + let subType: string = type.replace("Array<", ""); // Array => Type> + subType = subType.substring(0, subType.length - 1); // Type> => Type + let transformedData: any[] = []; + for (let date of data) { + transformedData.push(ObjectSerializer.serialize(date, subType, format)); + } + return transformedData; + } else if (type === "Date") { + if (format == "date") { + let month = data.getMonth()+1 + month = month < 10 ? "0" + month.toString() : month.toString() + let day = data.getDate(); + day = day < 10 ? "0" + day.toString() : day.toString(); + + return data.getFullYear() + "-" + month + "-" + day; + } else { + return data.toISOString(); + } + } else { + if (enumsMap.has(type)) { + return data; + } + if (!typeMap[type]) { // in case we dont know the type + return data; + } + + // Get the actual type of this object + type = this.findCorrectType(data, type); + + // get the map for the correct type. + let attributeTypes = typeMap[type].getAttributeTypeMap(); + let instance: {[index: string]: any} = {}; + for (let attributeType of attributeTypes) { + instance[attributeType.baseName] = ObjectSerializer.serialize(data[attributeType.name], attributeType.type, attributeType.format); + } + return instance; + } + } + + public static deserialize(data: any, type: string, format: string) { + // polymorphism may change the actual type. + type = ObjectSerializer.findCorrectType(data, type); + if (data == undefined) { + return data; + } else if (primitives.indexOf(type.toLowerCase()) !== -1) { + return data; + } else if (type.lastIndexOf("Array<", 0) === 0) { // string.startsWith pre es6 + let subType: string = type.replace("Array<", ""); // Array => Type> + subType = subType.substring(0, subType.length - 1); // Type> => Type + let transformedData: any[] = []; + for (let date of data) { + transformedData.push(ObjectSerializer.deserialize(date, subType, format)); + } + return transformedData; + } else if (type === "Date") { + return new Date(data); + } else { + if (enumsMap.has(type)) {// is Enum + return data; + } + + if (!typeMap[type]) { // dont know the type + return data; + } + let instance = new typeMap[type](); + let attributeTypes = typeMap[type].getAttributeTypeMap(); + for (let attributeType of attributeTypes) { + let value = ObjectSerializer.deserialize(data[attributeType.baseName], attributeType.type, attributeType.format); + if (value !== undefined) { + instance[attributeType.name] = value; + } + } + return instance; + } + } + + + /** + * Normalize media type + * + * We currently do not handle any media types attributes, i.e. anything + * after a semicolon. All content is assumed to be UTF-8 compatible. + */ + public static normalizeMediaType(mediaType: string | undefined): string | undefined { + if (mediaType === undefined) { + return undefined; + } + return mediaType.split(";")[0].trim().toLowerCase(); + } + + /** + * From a list of possible media types, choose the one we can handle best. + * + * The order of the given media types does not have any impact on the choice + * made. + */ + public static getPreferredMediaType(mediaTypes: Array): string { + /** According to OAS 3 we should default to json */ + if (!mediaTypes) { + return "application/json"; + } + + const normalMediaTypes = mediaTypes.map(this.normalizeMediaType); + let selectedMediaType: string | undefined = undefined; + let selectedRank: number = -Infinity; + for (const mediaType of normalMediaTypes) { + if (supportedMediaTypes[mediaType!] > selectedRank) { + selectedMediaType = mediaType; + selectedRank = supportedMediaTypes[mediaType!]; + } + } + + if (selectedMediaType === undefined) { + throw new Error("None of the given media types are supported: " + mediaTypes.join(", ")); + } + + return selectedMediaType!; + } + + /** + * Convert data to a string according the given media type + */ + public static stringify(data: any, mediaType: string): string { + if (mediaType === "text/plain") { + return String(data); + } + + if (mediaType === "application/json") { + return JSON.stringify(data); + } + + throw new Error("The mediaType " + mediaType + " is not supported by ObjectSerializer.stringify."); + } + + /** + * Parse data from a string according to the given media type + */ + public static parse(rawData: string, mediaType: string | undefined) { + if (mediaType === undefined) { + throw new Error("Cannot parse content. No Content-Type defined."); + } + + if (mediaType === "text/plain") { + return rawData; + } + + if (mediaType === "application/json") { + return JSON.parse(rawData); + } + + if (mediaType === "text/html") { + return rawData; + } + + throw new Error("The mediaType " + mediaType + " is not supported by ObjectSerializer.parse."); + } +} diff --git a/sdks/typescript/models/Org.ts b/sdks/typescript/models/Org.ts new file mode 100644 index 000000000..1bcafdfeb --- /dev/null +++ b/sdks/typescript/models/Org.ts @@ -0,0 +1,51 @@ +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { HttpFile } from '../http/http'; + +/** +* The current Org context of the user. +*/ +export class Org { + /** + * The ID of the object. + */ + 'id': number; + /** + * Name of the object. + */ + 'name': string; + + static readonly discriminator: string | undefined = undefined; + + static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ + { + "name": "id", + "baseName": "id", + "type": "number", + "format": "int32" + }, + { + "name": "name", + "baseName": "name", + "type": "string", + "format": "" + } ]; + + static getAttributeTypeMap() { + return Org.attributeTypeMap; + } + + public constructor() { + } +} + diff --git a/sdks/typescript/models/OrgChannelConfigInput.ts b/sdks/typescript/models/OrgChannelConfigInput.ts new file mode 100644 index 000000000..85fe76d15 --- /dev/null +++ b/sdks/typescript/models/OrgChannelConfigInput.ts @@ -0,0 +1,73 @@ +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { EventChannelConfigInput } from '../models/EventChannelConfigInput'; +import { HttpFile } from '../http/http'; + +export class OrgChannelConfigInput { + /** + * Unique identifier or name of the org + */ + 'org_identifier': string; + /** + * Operation to perform. REPLACE: Update preferences (default). RESET: Remove org-specific configurations, causing fallback to cluster-level preferences. + */ + 'operation'?: OrgChannelConfigInputOperationEnum | null; + /** + * Event-specific configurations. Required for REPLACE operation. + */ + 'preferences'?: Array | null; + /** + * Event types to reset. Required for RESET operation. Org-specific configurations for these events will be removed, causing fallback to cluster-level preferences. + */ + 'reset_events'?: Array | null; + + static readonly discriminator: string | undefined = undefined; + + static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ + { + "name": "org_identifier", + "baseName": "org_identifier", + "type": "string", + "format": "" + }, + { + "name": "operation", + "baseName": "operation", + "type": "OrgChannelConfigInputOperationEnum", + "format": "" + }, + { + "name": "preferences", + "baseName": "preferences", + "type": "Array", + "format": "" + }, + { + "name": "reset_events", + "baseName": "reset_events", + "type": "Array", + "format": "" + } ]; + + static getAttributeTypeMap() { + return OrgChannelConfigInput.attributeTypeMap; + } + + public constructor() { + } +} + + +export type OrgChannelConfigInputOperationEnum = "REPLACE" | "RESET" ; +export type OrgChannelConfigInputResetEventsEnum = "LIVEBOARD_SCHEDULE" ; + diff --git a/sdks/typescript/models/OrgChannelConfigResponse.ts b/sdks/typescript/models/OrgChannelConfigResponse.ts new file mode 100644 index 000000000..6519119ce --- /dev/null +++ b/sdks/typescript/models/OrgChannelConfigResponse.ts @@ -0,0 +1,47 @@ +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { EventChannelConfig } from '../models/EventChannelConfig'; +import { OrgDetails } from '../models/OrgDetails'; +import { HttpFile } from '../http/http'; + +export class OrgChannelConfigResponse { + 'org': OrgDetails; + /** + * Event-specific communication channel configurations for this org + */ + 'preferences': Array; + + static readonly discriminator: string | undefined = undefined; + + static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ + { + "name": "org", + "baseName": "org", + "type": "OrgDetails", + "format": "" + }, + { + "name": "preferences", + "baseName": "preferences", + "type": "Array", + "format": "" + } ]; + + static getAttributeTypeMap() { + return OrgChannelConfigResponse.attributeTypeMap; + } + + public constructor() { + } +} + diff --git a/sdks/typescript/models/OrgDetails.ts b/sdks/typescript/models/OrgDetails.ts new file mode 100644 index 000000000..56afe019a --- /dev/null +++ b/sdks/typescript/models/OrgDetails.ts @@ -0,0 +1,48 @@ +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { HttpFile } from '../http/http'; + +export class OrgDetails { + /** + * Unique id of the org + */ + 'id': string; + /** + * Name of the org + */ + 'name': string; + + static readonly discriminator: string | undefined = undefined; + + static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ + { + "name": "id", + "baseName": "id", + "type": "string", + "format": "" + }, + { + "name": "name", + "baseName": "name", + "type": "string", + "format": "" + } ]; + + static getAttributeTypeMap() { + return OrgDetails.attributeTypeMap; + } + + public constructor() { + } +} + diff --git a/sdks/typescript/models/OrgInfo.ts b/sdks/typescript/models/OrgInfo.ts new file mode 100644 index 000000000..492be66a8 --- /dev/null +++ b/sdks/typescript/models/OrgInfo.ts @@ -0,0 +1,48 @@ +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { HttpFile } from '../http/http'; + +export class OrgInfo { + /** + * Id. + */ + 'id': number; + /** + * Name. + */ + 'name'?: string | null; + + static readonly discriminator: string | undefined = undefined; + + static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ + { + "name": "id", + "baseName": "id", + "type": "number", + "format": "int32" + }, + { + "name": "name", + "baseName": "name", + "type": "string", + "format": "" + } ]; + + static getAttributeTypeMap() { + return OrgInfo.attributeTypeMap; + } + + public constructor() { + } +} + diff --git a/sdks/typescript/models/OrgNonEmbedAccess.ts b/sdks/typescript/models/OrgNonEmbedAccess.ts new file mode 100644 index 000000000..a72c20898 --- /dev/null +++ b/sdks/typescript/models/OrgNonEmbedAccess.ts @@ -0,0 +1,52 @@ +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { GroupInfo } from '../models/GroupInfo'; +import { HttpFile } from '../http/http'; + +/** +* Org-level non-embed access configuration. +*/ +export class OrgNonEmbedAccess { + /** + * Block full application access for non-embedded usage. + */ + 'block_full_app_access'?: boolean | null; + /** + * Groups that have non-embed full app access. + */ + 'groups_with_access'?: Array | null; + + static readonly discriminator: string | undefined = undefined; + + static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ + { + "name": "block_full_app_access", + "baseName": "block_full_app_access", + "type": "boolean", + "format": "" + }, + { + "name": "groups_with_access", + "baseName": "groups_with_access", + "type": "Array", + "format": "" + } ]; + + static getAttributeTypeMap() { + return OrgNonEmbedAccess.attributeTypeMap; + } + + public constructor() { + } +} + diff --git a/sdks/typescript/models/OrgNonEmbedAccessInput.ts b/sdks/typescript/models/OrgNonEmbedAccessInput.ts new file mode 100644 index 000000000..6a911ef60 --- /dev/null +++ b/sdks/typescript/models/OrgNonEmbedAccessInput.ts @@ -0,0 +1,51 @@ +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { HttpFile } from '../http/http'; + +/** +* Input for org-level non-embed access configuration. +*/ +export class OrgNonEmbedAccessInput { + /** + * Block full application access for non-embedded usage. + */ + 'block_full_app_access'?: boolean | null; + /** + * Group identifiers that are allowed non-embed full app access. Can only be set if block_full_app_access is true. + */ + 'groups_identifiers_with_access'?: Array | null; + + static readonly discriminator: string | undefined = undefined; + + static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ + { + "name": "block_full_app_access", + "baseName": "block_full_app_access", + "type": "boolean", + "format": "" + }, + { + "name": "groups_identifiers_with_access", + "baseName": "groups_identifiers_with_access", + "type": "Array", + "format": "" + } ]; + + static getAttributeTypeMap() { + return OrgNonEmbedAccessInput.attributeTypeMap; + } + + public constructor() { + } +} + diff --git a/sdks/typescript/models/OrgPreferenceSearchCriteriaInput.ts b/sdks/typescript/models/OrgPreferenceSearchCriteriaInput.ts new file mode 100644 index 000000000..33927a3a0 --- /dev/null +++ b/sdks/typescript/models/OrgPreferenceSearchCriteriaInput.ts @@ -0,0 +1,51 @@ +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { HttpFile } from '../http/http'; + +export class OrgPreferenceSearchCriteriaInput { + /** + * Unique identifier or name of the org + */ + 'org_identifier': string; + /** + * Event types to search for. If not provided, all event types for this org are returned. + */ + 'event_types'?: Array | null; + + static readonly discriminator: string | undefined = undefined; + + static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ + { + "name": "org_identifier", + "baseName": "org_identifier", + "type": "string", + "format": "" + }, + { + "name": "event_types", + "baseName": "event_types", + "type": "Array", + "format": "" + } ]; + + static getAttributeTypeMap() { + return OrgPreferenceSearchCriteriaInput.attributeTypeMap; + } + + public constructor() { + } +} + + +export type OrgPreferenceSearchCriteriaInputEventTypesEnum = "LIVEBOARD_SCHEDULE" ; + diff --git a/sdks/typescript/models/OrgResponse.ts b/sdks/typescript/models/OrgResponse.ts new file mode 100644 index 000000000..627cb0d91 --- /dev/null +++ b/sdks/typescript/models/OrgResponse.ts @@ -0,0 +1,82 @@ +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { HttpFile } from '../http/http'; + +export class OrgResponse { + /** + * Unique identifier of the Org. + */ + 'id'?: number | null; + /** + * Name of the Org. + */ + 'name'?: string | null; + /** + * Status of the Org. + */ + 'status'?: OrgResponseStatusEnum | null; + /** + * Description of the Org. + */ + 'description'?: string | null; + /** + * Visibility of the Org. + */ + 'visibility'?: OrgResponseVisibilityEnum | null; + + static readonly discriminator: string | undefined = undefined; + + static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ + { + "name": "id", + "baseName": "id", + "type": "number", + "format": "int32" + }, + { + "name": "name", + "baseName": "name", + "type": "string", + "format": "" + }, + { + "name": "status", + "baseName": "status", + "type": "OrgResponseStatusEnum", + "format": "" + }, + { + "name": "description", + "baseName": "description", + "type": "string", + "format": "" + }, + { + "name": "visibility", + "baseName": "visibility", + "type": "OrgResponseVisibilityEnum", + "format": "" + } ]; + + static getAttributeTypeMap() { + return OrgResponse.attributeTypeMap; + } + + public constructor() { + } +} + + +export type OrgResponseStatusEnum = "ACTIVE" | "IN_ACTIVE" ; +export type OrgResponseVisibilityEnum = "SHOW" | "HIDDEN" ; + diff --git a/sdks/typescript/models/OrgType.ts b/sdks/typescript/models/OrgType.ts new file mode 100644 index 000000000..235e64844 --- /dev/null +++ b/sdks/typescript/models/OrgType.ts @@ -0,0 +1,42 @@ +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { HttpFile } from '../http/http'; + +export class OrgType { + 'name'?: string | null; + 'id'?: number | null; + + static readonly discriminator: string | undefined = undefined; + + static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ + { + "name": "name", + "baseName": "name", + "type": "string", + "format": "" + }, + { + "name": "id", + "baseName": "id", + "type": "number", + "format": "int32" + } ]; + + static getAttributeTypeMap() { + return OrgType.attributeTypeMap; + } + + public constructor() { + } +} + diff --git a/sdks/typescript/models/ParameterValues.ts b/sdks/typescript/models/ParameterValues.ts new file mode 100644 index 000000000..f71882856 --- /dev/null +++ b/sdks/typescript/models/ParameterValues.ts @@ -0,0 +1,51 @@ +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { HttpFile } from '../http/http'; + +/** +* Filter Rules to be applied on Objects. +*/ +export class ParameterValues { + /** + * The name of the column to apply the filter on. + */ + 'name': string; + /** + * The values to filter on. Only single value is supported currently. + */ + 'values': Array; + + static readonly discriminator: string | undefined = undefined; + + static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ + { + "name": "name", + "baseName": "name", + "type": "string", + "format": "" + }, + { + "name": "values", + "baseName": "values", + "type": "Array", + "format": "" + } ]; + + static getAttributeTypeMap() { + return ParameterValues.attributeTypeMap; + } + + public constructor() { + } +} + diff --git a/sdks/typescript/models/ParameterizeMetadataFieldsRequest.ts b/sdks/typescript/models/ParameterizeMetadataFieldsRequest.ts new file mode 100644 index 000000000..08e8495dd --- /dev/null +++ b/sdks/typescript/models/ParameterizeMetadataFieldsRequest.ts @@ -0,0 +1,82 @@ +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { HttpFile } from '../http/http'; + +export class ParameterizeMetadataFieldsRequest { + /** + * Type of metadata object to parameterize. + */ + 'metadata_type'?: ParameterizeMetadataFieldsRequestMetadataTypeEnum; + /** + * Unique ID or name of the metadata object to parameterize. + */ + 'metadata_identifier': string; + /** + * Type of field in the metadata to parameterize. + */ + 'field_type': ParameterizeMetadataFieldsRequestFieldTypeEnum; + /** + * JSON array of field names to parameterize. Example: [schemaName, databaseName, tableName] + */ + 'field_names': Array; + /** + * Unique ID or name of the variable to use for parameterization of these fields. + */ + 'variable_identifier': string; + + static readonly discriminator: string | undefined = undefined; + + static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ + { + "name": "metadata_type", + "baseName": "metadata_type", + "type": "ParameterizeMetadataFieldsRequestMetadataTypeEnum", + "format": "" + }, + { + "name": "metadata_identifier", + "baseName": "metadata_identifier", + "type": "string", + "format": "" + }, + { + "name": "field_type", + "baseName": "field_type", + "type": "ParameterizeMetadataFieldsRequestFieldTypeEnum", + "format": "" + }, + { + "name": "field_names", + "baseName": "field_names", + "type": "Array", + "format": "" + }, + { + "name": "variable_identifier", + "baseName": "variable_identifier", + "type": "string", + "format": "" + } ]; + + static getAttributeTypeMap() { + return ParameterizeMetadataFieldsRequest.attributeTypeMap; + } + + public constructor() { + } +} + + +export type ParameterizeMetadataFieldsRequestMetadataTypeEnum = "LOGICAL_TABLE" | "CONNECTION" | "CONNECTION_CONFIG" ; +export type ParameterizeMetadataFieldsRequestFieldTypeEnum = "ATTRIBUTE" | "CONNECTION_PROPERTY" ; + diff --git a/sdks/typescript/models/ParameterizeMetadataRequest.ts b/sdks/typescript/models/ParameterizeMetadataRequest.ts new file mode 100644 index 000000000..dc840b348 --- /dev/null +++ b/sdks/typescript/models/ParameterizeMetadataRequest.ts @@ -0,0 +1,82 @@ +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { HttpFile } from '../http/http'; + +export class ParameterizeMetadataRequest { + /** + * Type of metadata object to parameterize. + */ + 'metadata_type'?: ParameterizeMetadataRequestMetadataTypeEnum; + /** + * Unique ID or name of the metadata object to parameterize. + */ + 'metadata_identifier': string; + /** + * Type of field in the metadata to parameterize. + */ + 'field_type': ParameterizeMetadataRequestFieldTypeEnum; + /** + * Name of the field which needs to be parameterized. + */ + 'field_name': string; + /** + * Unique ID or name of the variable to use for parameterization + */ + 'variable_identifier': string; + + static readonly discriminator: string | undefined = undefined; + + static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ + { + "name": "metadata_type", + "baseName": "metadata_type", + "type": "ParameterizeMetadataRequestMetadataTypeEnum", + "format": "" + }, + { + "name": "metadata_identifier", + "baseName": "metadata_identifier", + "type": "string", + "format": "" + }, + { + "name": "field_type", + "baseName": "field_type", + "type": "ParameterizeMetadataRequestFieldTypeEnum", + "format": "" + }, + { + "name": "field_name", + "baseName": "field_name", + "type": "string", + "format": "" + }, + { + "name": "variable_identifier", + "baseName": "variable_identifier", + "type": "string", + "format": "" + } ]; + + static getAttributeTypeMap() { + return ParameterizeMetadataRequest.attributeTypeMap; + } + + public constructor() { + } +} + + +export type ParameterizeMetadataRequestMetadataTypeEnum = "LOGICAL_TABLE" | "CONNECTION" | "CONNECTION_CONFIG" ; +export type ParameterizeMetadataRequestFieldTypeEnum = "ATTRIBUTE" | "CONNECTION_PROPERTY" ; + diff --git a/sdks/typescript/models/ParametersListItem.ts b/sdks/typescript/models/ParametersListItem.ts new file mode 100644 index 000000000..3c11d263d --- /dev/null +++ b/sdks/typescript/models/ParametersListItem.ts @@ -0,0 +1,48 @@ +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { HttpFile } from '../http/http'; + +export class ParametersListItem { + /** + * Key for the url query parameter + */ + 'key'?: string | null; + /** + * Value for the url query parameter + */ + 'value'?: string | null; + + static readonly discriminator: string | undefined = undefined; + + static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ + { + "name": "key", + "baseName": "key", + "type": "string", + "format": "" + }, + { + "name": "value", + "baseName": "value", + "type": "string", + "format": "" + } ]; + + static getAttributeTypeMap() { + return ParametersListItem.attributeTypeMap; + } + + public constructor() { + } +} + diff --git a/sdks/typescript/models/ParametersListItemInput.ts b/sdks/typescript/models/ParametersListItemInput.ts new file mode 100644 index 000000000..64a3a9d0b --- /dev/null +++ b/sdks/typescript/models/ParametersListItemInput.ts @@ -0,0 +1,48 @@ +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { HttpFile } from '../http/http'; + +export class ParametersListItemInput { + /** + * Key for the url query parameter + */ + 'key'?: string | null; + /** + * Value for the url query parameter + */ + 'value'?: string | null; + + static readonly discriminator: string | undefined = undefined; + + static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ + { + "name": "key", + "baseName": "key", + "type": "string", + "format": "" + }, + { + "name": "value", + "baseName": "value", + "type": "string", + "format": "" + } ]; + + static getAttributeTypeMap() { + return ParametersListItemInput.attributeTypeMap; + } + + public constructor() { + } +} + diff --git a/sdks/typescript/models/PdfOptions.ts b/sdks/typescript/models/PdfOptions.ts new file mode 100644 index 000000000..1bd3c5511 --- /dev/null +++ b/sdks/typescript/models/PdfOptions.ts @@ -0,0 +1,124 @@ +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { HttpFile } from '../http/http'; + +/** +* Options for PDF export. +*/ +export class PdfOptions { + /** + * Indicates whether to include complete Liveboard. + */ + 'complete_liveboard'?: boolean | null; + /** + * Indicates whether to include cover page with the Liveboard title. + */ + 'include_cover_page'?: boolean | null; + /** + * Indicates whether to include customized wide logo in the footer if available. + */ + 'include_custom_logo'?: boolean | null; + /** + * Indicates whether to include a page with all applied filters. + */ + 'include_filter_page'?: boolean | null; + /** + * Indicates whether to include page number in the footer of each page + */ + 'include_page_number'?: boolean | null; + /** + * Text to include in the footer of each page. + */ + 'page_footer_text'?: string | null; + /** + * Page orientation of the PDF. + */ + 'page_orientation'?: string | null; + /** + * Page size. + */ + 'page_size'?: PdfOptionsPageSizeEnum | null; + /** + * Indicates whether to include only first page of the tables. + */ + 'truncate_table'?: boolean | null; + + static readonly discriminator: string | undefined = undefined; + + static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ + { + "name": "complete_liveboard", + "baseName": "complete_liveboard", + "type": "boolean", + "format": "" + }, + { + "name": "include_cover_page", + "baseName": "include_cover_page", + "type": "boolean", + "format": "" + }, + { + "name": "include_custom_logo", + "baseName": "include_custom_logo", + "type": "boolean", + "format": "" + }, + { + "name": "include_filter_page", + "baseName": "include_filter_page", + "type": "boolean", + "format": "" + }, + { + "name": "include_page_number", + "baseName": "include_page_number", + "type": "boolean", + "format": "" + }, + { + "name": "page_footer_text", + "baseName": "page_footer_text", + "type": "string", + "format": "" + }, + { + "name": "page_orientation", + "baseName": "page_orientation", + "type": "string", + "format": "" + }, + { + "name": "page_size", + "baseName": "page_size", + "type": "PdfOptionsPageSizeEnum", + "format": "" + }, + { + "name": "truncate_table", + "baseName": "truncate_table", + "type": "boolean", + "format": "" + } ]; + + static getAttributeTypeMap() { + return PdfOptions.attributeTypeMap; + } + + public constructor() { + } +} + + +export type PdfOptionsPageSizeEnum = "A4" | "TAB_BASED" ; + diff --git a/sdks/typescript/models/PdfOptionsInput.ts b/sdks/typescript/models/PdfOptionsInput.ts new file mode 100644 index 000000000..3887a83de --- /dev/null +++ b/sdks/typescript/models/PdfOptionsInput.ts @@ -0,0 +1,122 @@ +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { HttpFile } from '../http/http'; + +export class PdfOptionsInput { + /** + * Size of PDF page. `A4` generates a paginated A4 PDF. `CONTINUOUS` generates a continuous PDF that matches the Liveboard layout. Each Liveboard tab has its own page of variable length. Defaults to `A4` if not specified. Version: 26.5.0.cl or later + */ + 'page_size'?: PdfOptionsInputPageSizeEnum | null; + /** + * Zoom level percentage for the PDF. Only applicable when `page_size` is `CONTINUOUS`. Acceptable values are integers in the range [45, 175]. Defaults to 100 if not specified. Version: 26.5.0.cl or later + */ + 'zoom_level'?: number | null; + /** + * Indicates whether to include the cover page with the Liveboard title. + */ + 'include_cover_page'?: boolean | null; + /** + * Indicates whether to include customized wide logo in the footer if available. + */ + 'include_custom_logo'?: boolean | null; + /** + * Indicates whether to include a page with all applied filters. For `CONTINUOUS` page_size, this parameter indicates whether to include the filter header. + */ + 'include_filter_page'?: boolean | null; + /** + * Indicates whether to include page number in the footer of each page. + */ + 'include_page_number'?: boolean | null; + /** + * Page orientation of the PDF. + */ + 'page_orientation'?: PdfOptionsInputPageOrientationEnum | null; + /** + * Indicates whether to include only the first page of the tables. + */ + 'truncate_table'?: boolean | null; + /** + * Text to include in the footer of each page. + */ + 'page_footer_text'?: string | null; + + static readonly discriminator: string | undefined = undefined; + + static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ + { + "name": "page_size", + "baseName": "page_size", + "type": "PdfOptionsInputPageSizeEnum", + "format": "" + }, + { + "name": "zoom_level", + "baseName": "zoom_level", + "type": "number", + "format": "int32" + }, + { + "name": "include_cover_page", + "baseName": "include_cover_page", + "type": "boolean", + "format": "" + }, + { + "name": "include_custom_logo", + "baseName": "include_custom_logo", + "type": "boolean", + "format": "" + }, + { + "name": "include_filter_page", + "baseName": "include_filter_page", + "type": "boolean", + "format": "" + }, + { + "name": "include_page_number", + "baseName": "include_page_number", + "type": "boolean", + "format": "" + }, + { + "name": "page_orientation", + "baseName": "page_orientation", + "type": "PdfOptionsInputPageOrientationEnum", + "format": "" + }, + { + "name": "truncate_table", + "baseName": "truncate_table", + "type": "boolean", + "format": "" + }, + { + "name": "page_footer_text", + "baseName": "page_footer_text", + "type": "string", + "format": "" + } ]; + + static getAttributeTypeMap() { + return PdfOptionsInput.attributeTypeMap; + } + + public constructor() { + } +} + + +export type PdfOptionsInputPageSizeEnum = "A4" | "CONTINUOUS" ; +export type PdfOptionsInputPageOrientationEnum = "PORTRAIT" | "LANDSCAPE" ; + diff --git a/sdks/typescript/models/PermissionInput.ts b/sdks/typescript/models/PermissionInput.ts new file mode 100644 index 000000000..3ea2e469e --- /dev/null +++ b/sdks/typescript/models/PermissionInput.ts @@ -0,0 +1,52 @@ +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { PrincipalsInput } from '../models/PrincipalsInput'; +import { HttpFile } from '../http/http'; + +/** +* Details of users or groups. +*/ +export class PermissionInput { + 'principal': PrincipalsInput; + /** + * Object share mode. + */ + 'share_mode': PermissionInputShareModeEnum; + + static readonly discriminator: string | undefined = undefined; + + static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ + { + "name": "principal", + "baseName": "principal", + "type": "PrincipalsInput", + "format": "" + }, + { + "name": "share_mode", + "baseName": "share_mode", + "type": "PermissionInputShareModeEnum", + "format": "" + } ]; + + static getAttributeTypeMap() { + return PermissionInput.attributeTypeMap; + } + + public constructor() { + } +} + + +export type PermissionInputShareModeEnum = "READ_ONLY" | "MODIFY" | "NO_ACCESS" ; + diff --git a/sdks/typescript/models/PermissionOfMetadataResponse.ts b/sdks/typescript/models/PermissionOfMetadataResponse.ts new file mode 100644 index 000000000..1be4ef6e4 --- /dev/null +++ b/sdks/typescript/models/PermissionOfMetadataResponse.ts @@ -0,0 +1,35 @@ +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { HttpFile } from '../http/http'; + +export class PermissionOfMetadataResponse { + 'metadata_permission_details'?: any | null; + + static readonly discriminator: string | undefined = undefined; + + static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ + { + "name": "metadata_permission_details", + "baseName": "metadata_permission_details", + "type": "any", + "format": "" + } ]; + + static getAttributeTypeMap() { + return PermissionOfMetadataResponse.attributeTypeMap; + } + + public constructor() { + } +} + diff --git a/sdks/typescript/models/PermissionOfPrincipalsResponse.ts b/sdks/typescript/models/PermissionOfPrincipalsResponse.ts new file mode 100644 index 000000000..6907fc437 --- /dev/null +++ b/sdks/typescript/models/PermissionOfPrincipalsResponse.ts @@ -0,0 +1,35 @@ +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { HttpFile } from '../http/http'; + +export class PermissionOfPrincipalsResponse { + 'principal_permission_details'?: any | null; + + static readonly discriminator: string | undefined = undefined; + + static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ + { + "name": "principal_permission_details", + "baseName": "principal_permission_details", + "type": "any", + "format": "" + } ]; + + static getAttributeTypeMap() { + return PermissionOfPrincipalsResponse.attributeTypeMap; + } + + public constructor() { + } +} + diff --git a/sdks/typescript/models/PermissionsMetadataTypeInput.ts b/sdks/typescript/models/PermissionsMetadataTypeInput.ts new file mode 100644 index 000000000..788fd0f9f --- /dev/null +++ b/sdks/typescript/models/PermissionsMetadataTypeInput.ts @@ -0,0 +1,54 @@ +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { HttpFile } from '../http/http'; + +/** +* MetadataType InputType used in Permission API\'s +*/ +export class PermissionsMetadataTypeInput { + /** + * Type of metadata object. Required if the name of the object is set as the identifier. This attribute is optional when the object GUID is specified as the identifier. + */ + 'type'?: PermissionsMetadataTypeInputTypeEnum | null; + /** + * Unique ID or name of the metadata object. + */ + 'identifier': string; + + static readonly discriminator: string | undefined = undefined; + + static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ + { + "name": "type", + "baseName": "type", + "type": "PermissionsMetadataTypeInputTypeEnum", + "format": "" + }, + { + "name": "identifier", + "baseName": "identifier", + "type": "string", + "format": "" + } ]; + + static getAttributeTypeMap() { + return PermissionsMetadataTypeInput.attributeTypeMap; + } + + public constructor() { + } +} + + +export type PermissionsMetadataTypeInputTypeEnum = "LIVEBOARD" | "ANSWER" | "LOGICAL_TABLE" | "LOGICAL_COLUMN" | "CONNECTION" | "COLLECTION" ; + diff --git a/sdks/typescript/models/PngOptionsInput.ts b/sdks/typescript/models/PngOptionsInput.ts new file mode 100644 index 000000000..4f7bf3093 --- /dev/null +++ b/sdks/typescript/models/PngOptionsInput.ts @@ -0,0 +1,88 @@ +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { HttpFile } from '../http/http'; + +export class PngOptionsInput { + /** + * Indicates whether to include the cover page with the Liveboard title. + */ + 'include_cover_page'?: boolean | null; + /** + * Indicates whether to include a page with all applied filters. + */ + 'include_filter_page'?: boolean | null; + /** + * Indicates personalised view of the Liveboard in case of png + */ + 'personalised_view_id'?: string | null; + /** + * Desired width of the Liveboard image in pixels. Ex. 1920 for Full HD image Version: 10.9.0.cl or later + */ + 'image_resolution'?: number | null; + /** + * The scale of the image in percentage. Ex. 100 for 100% scale. Version: 10.9.0.cl or later + */ + 'image_scale'?: number | null; + /** + * Indicates whether to include the header of the liveboard. Version: 10.9.0.cl or later + */ + 'include_header'?: boolean | null; + + static readonly discriminator: string | undefined = undefined; + + static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ + { + "name": "include_cover_page", + "baseName": "include_cover_page", + "type": "boolean", + "format": "" + }, + { + "name": "include_filter_page", + "baseName": "include_filter_page", + "type": "boolean", + "format": "" + }, + { + "name": "personalised_view_id", + "baseName": "personalised_view_id", + "type": "string", + "format": "" + }, + { + "name": "image_resolution", + "baseName": "image_resolution", + "type": "number", + "format": "int32" + }, + { + "name": "image_scale", + "baseName": "image_scale", + "type": "number", + "format": "int32" + }, + { + "name": "include_header", + "baseName": "include_header", + "type": "boolean", + "format": "" + } ]; + + static getAttributeTypeMap() { + return PngOptionsInput.attributeTypeMap; + } + + public constructor() { + } +} + diff --git a/sdks/typescript/models/PolicyProcessOptions.ts b/sdks/typescript/models/PolicyProcessOptions.ts new file mode 100644 index 000000000..1b474c58f --- /dev/null +++ b/sdks/typescript/models/PolicyProcessOptions.ts @@ -0,0 +1,35 @@ +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { HttpFile } from '../http/http'; + +export class PolicyProcessOptions { + 'impersonate_user'?: string | null; + + static readonly discriminator: string | undefined = undefined; + + static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ + { + "name": "impersonate_user", + "baseName": "impersonate_user", + "type": "string", + "format": "" + } ]; + + static getAttributeTypeMap() { + return PolicyProcessOptions.attributeTypeMap; + } + + public constructor() { + } +} + diff --git a/sdks/typescript/models/PolicyProcessOptionsInput.ts b/sdks/typescript/models/PolicyProcessOptionsInput.ts new file mode 100644 index 000000000..f0a544923 --- /dev/null +++ b/sdks/typescript/models/PolicyProcessOptionsInput.ts @@ -0,0 +1,35 @@ +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { HttpFile } from '../http/http'; + +export class PolicyProcessOptionsInput { + 'impersonate_user'?: string | null; + + static readonly discriminator: string | undefined = undefined; + + static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ + { + "name": "impersonate_user", + "baseName": "impersonate_user", + "type": "string", + "format": "" + } ]; + + static getAttributeTypeMap() { + return PolicyProcessOptionsInput.attributeTypeMap; + } + + public constructor() { + } +} + diff --git a/sdks/typescript/models/PrincipalsInput.ts b/sdks/typescript/models/PrincipalsInput.ts new file mode 100644 index 000000000..8bfafe8c8 --- /dev/null +++ b/sdks/typescript/models/PrincipalsInput.ts @@ -0,0 +1,51 @@ +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { HttpFile } from '../http/http'; + +export class PrincipalsInput { + /** + * Unique ID or name of the principal object such as a user or group. + */ + 'identifier': string; + /** + * Principal type. + */ + 'type'?: PrincipalsInputTypeEnum | null; + + static readonly discriminator: string | undefined = undefined; + + static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ + { + "name": "identifier", + "baseName": "identifier", + "type": "string", + "format": "" + }, + { + "name": "type", + "baseName": "type", + "type": "PrincipalsInputTypeEnum", + "format": "" + } ]; + + static getAttributeTypeMap() { + return PrincipalsInput.attributeTypeMap; + } + + public constructor() { + } +} + + +export type PrincipalsInputTypeEnum = "USER" | "USER_GROUP" ; + diff --git a/sdks/typescript/models/PrincipalsListItem.ts b/sdks/typescript/models/PrincipalsListItem.ts new file mode 100644 index 000000000..e308cf56c --- /dev/null +++ b/sdks/typescript/models/PrincipalsListItem.ts @@ -0,0 +1,48 @@ +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { HttpFile } from '../http/http'; + +export class PrincipalsListItem { + /** + * Unique ID or name of the user or group. + */ + 'identifier': string; + /** + * Principal type. Valid values are + */ + 'type': string; + + static readonly discriminator: string | undefined = undefined; + + static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ + { + "name": "identifier", + "baseName": "identifier", + "type": "string", + "format": "" + }, + { + "name": "type", + "baseName": "type", + "type": "string", + "format": "" + } ]; + + static getAttributeTypeMap() { + return PrincipalsListItem.attributeTypeMap; + } + + public constructor() { + } +} + diff --git a/sdks/typescript/models/PrincipalsListItemInput.ts b/sdks/typescript/models/PrincipalsListItemInput.ts new file mode 100644 index 000000000..276a2fda2 --- /dev/null +++ b/sdks/typescript/models/PrincipalsListItemInput.ts @@ -0,0 +1,48 @@ +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { HttpFile } from '../http/http'; + +export class PrincipalsListItemInput { + /** + * Unique ID or name of the user or group. + */ + 'identifier': string; + /** + * Principal type. + */ + 'type': string; + + static readonly discriminator: string | undefined = undefined; + + static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ + { + "name": "identifier", + "baseName": "identifier", + "type": "string", + "format": "" + }, + { + "name": "type", + "baseName": "type", + "type": "string", + "format": "" + } ]; + + static getAttributeTypeMap() { + return PrincipalsListItemInput.attributeTypeMap; + } + + public constructor() { + } +} + diff --git a/sdks/typescript/models/PublishMetadataListItem.ts b/sdks/typescript/models/PublishMetadataListItem.ts new file mode 100644 index 000000000..de5a502dd --- /dev/null +++ b/sdks/typescript/models/PublishMetadataListItem.ts @@ -0,0 +1,51 @@ +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { HttpFile } from '../http/http'; + +export class PublishMetadataListItem { + /** + * Unique ID or name of the metadata. + */ + 'identifier': string; + /** + * Type of metadata. Required if identifier is name. + */ + 'type'?: PublishMetadataListItemTypeEnum | null; + + static readonly discriminator: string | undefined = undefined; + + static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ + { + "name": "identifier", + "baseName": "identifier", + "type": "string", + "format": "" + }, + { + "name": "type", + "baseName": "type", + "type": "PublishMetadataListItemTypeEnum", + "format": "" + } ]; + + static getAttributeTypeMap() { + return PublishMetadataListItem.attributeTypeMap; + } + + public constructor() { + } +} + + +export type PublishMetadataListItemTypeEnum = "LIVEBOARD" | "ANSWER" | "LOGICAL_TABLE" ; + diff --git a/sdks/typescript/models/PublishMetadataRequest.ts b/sdks/typescript/models/PublishMetadataRequest.ts new file mode 100644 index 000000000..81ed18433 --- /dev/null +++ b/sdks/typescript/models/PublishMetadataRequest.ts @@ -0,0 +1,59 @@ +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { PublishMetadataListItem } from '../models/PublishMetadataListItem'; +import { HttpFile } from '../http/http'; + +export class PublishMetadataRequest { + /** + * Metadata objects to be published. + */ + 'metadata': Array; + /** + * Unique ID or name of orgs to which metadata objects should be published. + */ + 'org_identifiers': Array; + /** + * Skip validations of objects to be published. + */ + 'skip_validation'?: boolean | null; + + static readonly discriminator: string | undefined = undefined; + + static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ + { + "name": "metadata", + "baseName": "metadata", + "type": "Array", + "format": "" + }, + { + "name": "org_identifiers", + "baseName": "org_identifiers", + "type": "Array", + "format": "" + }, + { + "name": "skip_validation", + "baseName": "skip_validation", + "type": "boolean", + "format": "" + } ]; + + static getAttributeTypeMap() { + return PublishMetadataRequest.attributeTypeMap; + } + + public constructor() { + } +} + diff --git a/sdks/typescript/models/PutVariableValuesRequest.ts b/sdks/typescript/models/PutVariableValuesRequest.ts new file mode 100644 index 000000000..00916b4c6 --- /dev/null +++ b/sdks/typescript/models/PutVariableValuesRequest.ts @@ -0,0 +1,52 @@ +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { VariablePutAssignmentInput } from '../models/VariablePutAssignmentInput'; +import { HttpFile } from '../http/http'; + +export class PutVariableValuesRequest { + /** + * Operation to perform + */ + 'operation'?: PutVariableValuesRequestOperationEnum; + /** + * Variable assignments + */ + 'variable_assignment': Array; + + static readonly discriminator: string | undefined = undefined; + + static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ + { + "name": "operation", + "baseName": "operation", + "type": "PutVariableValuesRequestOperationEnum", + "format": "" + }, + { + "name": "variable_assignment", + "baseName": "variable_assignment", + "type": "Array", + "format": "" + } ]; + + static getAttributeTypeMap() { + return PutVariableValuesRequest.attributeTypeMap; + } + + public constructor() { + } +} + + +export type PutVariableValuesRequestOperationEnum = "ADD" | "REMOVE" | "REPLACE" | "RESET" ; + diff --git a/sdks/typescript/models/QueryGetDecomposedQueryRequest.ts b/sdks/typescript/models/QueryGetDecomposedQueryRequest.ts new file mode 100644 index 000000000..8f5bcaaf2 --- /dev/null +++ b/sdks/typescript/models/QueryGetDecomposedQueryRequest.ts @@ -0,0 +1,96 @@ +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { QueryGetDecomposedQueryRequestNlsRequest } from '../models/QueryGetDecomposedQueryRequestNlsRequest'; +import { HttpFile } from '../http/http'; + +export class QueryGetDecomposedQueryRequest { + /** + * List of answer unique identifiers (GUIDs) whose data will be used to guide the response. + */ + 'answerIds'?: Array; + /** + * User provided content like text data, csv data as a string message to provide context & potentially improve the quality of the response. + */ + 'content'?: Array; + /** + * Unique identifier to denote current conversation. + */ + 'conversationId'?: string; + /** + * List of liveboard unique identifiers (GUIDs) whose data will be used to guide the response. + */ + 'liveboardIds'?: Array; + /** + * Maximum number of decomposed queries that is allowed in the response, default = 5. + */ + 'maxDecomposedQueries'?: number; + 'nlsRequest'?: QueryGetDecomposedQueryRequestNlsRequest; + /** + * List of worksheetIds to provide context for decomposing user query into analytical queries that can be run on them. + */ + 'worksheetIds'?: Array; + + static readonly discriminator: string | undefined = undefined; + + static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ + { + "name": "answerIds", + "baseName": "answerIds", + "type": "Array", + "format": "" + }, + { + "name": "content", + "baseName": "content", + "type": "Array", + "format": "" + }, + { + "name": "conversationId", + "baseName": "conversationId", + "type": "string", + "format": "" + }, + { + "name": "liveboardIds", + "baseName": "liveboardIds", + "type": "Array", + "format": "" + }, + { + "name": "maxDecomposedQueries", + "baseName": "maxDecomposedQueries", + "type": "number", + "format": "int32" + }, + { + "name": "nlsRequest", + "baseName": "nlsRequest", + "type": "QueryGetDecomposedQueryRequestNlsRequest", + "format": "" + }, + { + "name": "worksheetIds", + "baseName": "worksheetIds", + "type": "Array", + "format": "" + } ]; + + static getAttributeTypeMap() { + return QueryGetDecomposedQueryRequest.attributeTypeMap; + } + + public constructor() { + } +} + diff --git a/sdks/typescript/models/QueryGetDecomposedQueryRequestNlsRequest.ts b/sdks/typescript/models/QueryGetDecomposedQueryRequestNlsRequest.ts new file mode 100644 index 000000000..c86e2959f --- /dev/null +++ b/sdks/typescript/models/QueryGetDecomposedQueryRequestNlsRequest.ts @@ -0,0 +1,71 @@ +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { HttpFile } from '../http/http'; + +/** +* NLSRequest object containing user query & instructions. +*/ +export class QueryGetDecomposedQueryRequestNlsRequest { + /** + * Cluster version like 10.4.0.cl, 10.5.0.cl, so on. + */ + 'agentVersion'?: number | null; + /** + * If true, results are not returned from cache & calculated every time. Can incur high costs & latency. + */ + 'bypassCache'?: boolean | null; + /** + * User specific instructions for processing the @query. + */ + 'instructions'?: Array | null; + /** + * User query which is a topical/goal oriented question that needs to be broken down into smaller simple analytical questions. + */ + 'query'?: string | null; + + static readonly discriminator: string | undefined = undefined; + + static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ + { + "name": "agentVersion", + "baseName": "agentVersion", + "type": "number", + "format": "int32" + }, + { + "name": "bypassCache", + "baseName": "bypassCache", + "type": "boolean", + "format": "" + }, + { + "name": "instructions", + "baseName": "instructions", + "type": "Array", + "format": "" + }, + { + "name": "query", + "baseName": "query", + "type": "string", + "format": "" + } ]; + + static getAttributeTypeMap() { + return QueryGetDecomposedQueryRequestNlsRequest.attributeTypeMap; + } + + public constructor() { + } +} + diff --git a/sdks/typescript/models/RecipientDetails.ts b/sdks/typescript/models/RecipientDetails.ts new file mode 100644 index 000000000..55088f3c3 --- /dev/null +++ b/sdks/typescript/models/RecipientDetails.ts @@ -0,0 +1,52 @@ +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { PrincipalsListItem } from '../models/PrincipalsListItem'; +import { HttpFile } from '../http/http'; + +/** +* Recipient configuration which includes email address, ID or name of the users and groups. +*/ +export class RecipientDetails { + /** + * Emails of the recipients. Specify email address if the recipient is not a ThoughtSpot user. + */ + 'emails'?: Array | null; + /** + * List of user or groups to subscribe for the scheduled job notifications. + */ + 'principals'?: Array | null; + + static readonly discriminator: string | undefined = undefined; + + static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ + { + "name": "emails", + "baseName": "emails", + "type": "Array", + "format": "" + }, + { + "name": "principals", + "baseName": "principals", + "type": "Array", + "format": "" + } ]; + + static getAttributeTypeMap() { + return RecipientDetails.attributeTypeMap; + } + + public constructor() { + } +} + diff --git a/sdks/typescript/models/RecipientDetailsInput.ts b/sdks/typescript/models/RecipientDetailsInput.ts new file mode 100644 index 000000000..2a1f628d2 --- /dev/null +++ b/sdks/typescript/models/RecipientDetailsInput.ts @@ -0,0 +1,52 @@ +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { PrincipalsListItemInput } from '../models/PrincipalsListItemInput'; +import { HttpFile } from '../http/http'; + +/** +* Recipients of the scheduled job notification. +*/ +export class RecipientDetailsInput { + /** + * Emails of the recipients. + */ + 'emails'?: Array | null; + /** + * User or groups to be set as recipients of the schedule notifications. + */ + 'principals'?: Array | null; + + static readonly discriminator: string | undefined = undefined; + + static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ + { + "name": "emails", + "baseName": "emails", + "type": "Array", + "format": "" + }, + { + "name": "principals", + "baseName": "principals", + "type": "Array", + "format": "" + } ]; + + static getAttributeTypeMap() { + return RecipientDetailsInput.attributeTypeMap; + } + + public constructor() { + } +} + diff --git a/sdks/typescript/models/RegionalSettingsInput.ts b/sdks/typescript/models/RegionalSettingsInput.ts new file mode 100644 index 000000000..c7e77a6eb --- /dev/null +++ b/sdks/typescript/models/RegionalSettingsInput.ts @@ -0,0 +1,74 @@ +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { HttpFile } from '../http/http'; + +export class RegionalSettingsInput { + /** + * ISO code to be appended with currency values. + */ + 'currency_format'?: RegionalSettingsInputCurrencyFormatEnum | null; + /** + * Indicates the locale to be used for all formattings. + */ + 'user_locale'?: RegionalSettingsInputUserLocaleEnum | null; + /** + * Indicates the locale to be used for number formatting. + */ + 'number_format_locale'?: RegionalSettingsInputNumberFormatLocaleEnum | null; + /** + * Indicates the locale to be used for date formatting. + */ + 'date_format_locale'?: RegionalSettingsInputDateFormatLocaleEnum | null; + + static readonly discriminator: string | undefined = undefined; + + static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ + { + "name": "currency_format", + "baseName": "currency_format", + "type": "RegionalSettingsInputCurrencyFormatEnum", + "format": "" + }, + { + "name": "user_locale", + "baseName": "user_locale", + "type": "RegionalSettingsInputUserLocaleEnum", + "format": "" + }, + { + "name": "number_format_locale", + "baseName": "number_format_locale", + "type": "RegionalSettingsInputNumberFormatLocaleEnum", + "format": "" + }, + { + "name": "date_format_locale", + "baseName": "date_format_locale", + "type": "RegionalSettingsInputDateFormatLocaleEnum", + "format": "" + } ]; + + static getAttributeTypeMap() { + return RegionalSettingsInput.attributeTypeMap; + } + + public constructor() { + } +} + + +export type RegionalSettingsInputCurrencyFormatEnum = "ADP" | "AED" | "AFN" | "ALL" | "AMD" | "ANG" | "AOA" | "ARA" | "ARS" | "ATS" | "AUD" | "AWG" | "AZN" | "BAM" | "BBD" | "BDT" | "BEF" | "BGL" | "BGM" | "BGN" | "BHD" | "BIF" | "BMD" | "BND" | "BOB" | "BOP" | "BOV" | "BRL" | "BSD" | "BTN" | "BUK" | "BWP" | "BYN" | "BZD" | "CAD" | "CDF" | "CHE" | "CHF" | "CHW" | "CLE" | "CLP" | "CNX" | "CNY" | "COP" | "COU" | "CRC" | "CSK" | "CUC" | "CUP" | "CVE" | "CYP" | "CZK" | "DDM" | "DEM" | "DJF" | "DKK" | "DOP" | "DZD" | "ECS" | "ECV" | "EEK" | "EGP" | "ERN" | "ESP" | "ETB" | "EUR" | "FIM" | "FJD" | "FKP" | "FRF" | "GBP" | "GEK" | "GEL" | "GHS" | "GIP" | "GMD" | "GNF" | "GNS" | "GQE" | "GRD" | "GTQ" | "GWE" | "GWP" | "GYD" | "HKD" | "HNL" | "HRD" | "HRK" | "HTG" | "HUF" | "IDR" | "IEP" | "ILP" | "ILS" | "INR" | "IQD" | "IRR" | "ISK" | "ITL" | "JMD" | "JOD" | "JPY" | "KES" | "KGS" | "KHR" | "KMF" | "KPW" | "KRW" | "KWD" | "KYD" | "KZT" | "LAK" | "LBP" | "LKR" | "LRD" | "LSL" | "LTL" | "LTT" | "LUC" | "LUF" | "LUL" | "LVL" | "LVR" | "LYD" | "MAD" | "MAF" | "MCF" | "MDC" | "MDL" | "MGA" | "MGF" | "MKD" | "MLF" | "MMK" | "MNT" | "MOP" | "MRU" | "MTL" | "MTP" | "MUR" | "MVR" | "MWK" | "MXN" | "MXV" | "MYR" | "MZE" | "MZN" | "NAD" | "NGN" | "NIO" | "NLG" | "NOK" | "NPR" | "NZD" | "OMR" | "PAB" | "PEI" | "PEN" | "PGK" | "PHP" | "PKR" | "PLN" | "PTE" | "PYG" | "QAR" | "RHD" | "RON" | "RSD" | "RUB" | "RWF" | "SAR" | "SBD" | "SCR" | "SDG" | "SEK" | "SGD" | "SHP" | "SIT" | "SKK" | "SLL" | "SOS" | "SRD" | "SRG" | "SSP" | "STN" | "SUR" | "SVC" | "SYP" | "SZL" | "THB" | "TJR" | "TJS" | "TMT" | "TND" | "TOP" | "TPE" | "TRY" | "TTD" | "TWD" | "TZS" | "UAH" | "UAK" | "UGX" | "USD" | "UYU" | "UYW" | "UZS" | "VES" | "VND" | "VUV" | "WST" | "XAF" | "XAG" | "XAU" | "XBA" | "XBB" | "XCD" | "XDR" | "XEU" | "XFO" | "XFU" | "XOF" | "XPD" | "XPF" | "XPT" | "XRE" | "XSU" | "XTS" | "XUA" | "XXX" | "YDD" | "YER" | "ZAR" | "ZMW" ; +export type RegionalSettingsInputUserLocaleEnum = "en-CA" | "en-GB" | "en-US" | "de-DE" | "ja-JP" | "zh-CN" | "pt-BR" | "fr-FR" | "fr-CA" | "es-US" | "da-DK" | "es-ES" | "fi-FI" | "sv-SE" | "nb-NO" | "pt-PT" | "nl-NL" | "it-IT" | "ru-RU" | "en-IN" | "de-CH" | "en-NZ" | "es-MX" | "en-AU" | "zh-Hant" | "ko-KR" | "en-DE" ; +export type RegionalSettingsInputNumberFormatLocaleEnum = "en-CA" | "en-GB" | "en-US" | "de-DE" | "ja-JP" | "zh-CN" | "pt-BR" | "fr-FR" | "fr-CA" | "es-US" | "da-DK" | "es-ES" | "fi-FI" | "sv-SE" | "nb-NO" | "pt-PT" | "nl-NL" | "it-IT" | "ru-RU" | "en-IN" | "de-CH" | "en-NZ" | "es-MX" | "en-AU" | "zh-Hant" | "ko-KR" | "en-DE" ; +export type RegionalSettingsInputDateFormatLocaleEnum = "en-CA" | "en-GB" | "en-US" | "de-DE" | "ja-JP" | "zh-CN" | "pt-BR" | "fr-FR" | "fr-CA" | "es-US" | "da-DK" | "es-ES" | "fi-FI" | "sv-SE" | "nb-NO" | "pt-PT" | "nl-NL" | "it-IT" | "ru-RU" | "en-IN" | "de-CH" | "en-NZ" | "es-MX" | "en-AU" | "zh-Hant" | "ko-KR" | "en-DE" ; + diff --git a/sdks/typescript/models/RepoConfigObject.ts b/sdks/typescript/models/RepoConfigObject.ts new file mode 100644 index 000000000..558518e65 --- /dev/null +++ b/sdks/typescript/models/RepoConfigObject.ts @@ -0,0 +1,96 @@ +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { Org } from '../models/Org'; +import { HttpFile } from '../http/http'; + +export class RepoConfigObject { + /** + * Remote repository URL configured + */ + 'repository_url'?: string | null; + /** + * Username to authenticate connection to the version control system + */ + 'username'?: string | null; + /** + * Name of the remote branch where objects from this Thoughtspot instance will be versioned. + */ + 'commit_branch_name'?: string | null; + /** + * Branches that have been pulled in local repository + */ + 'branches'?: Array | null; + /** + * Maintain mapping of guid for the deployment to an instance + */ + 'enable_guid_mapping'?: boolean | null; + /** + * Name of the branch where the configuration files related to operations between Thoughtspot and version control repo should be maintained. + */ + 'configuration_branch_name'?: string | null; + 'org'?: Org; + + static readonly discriminator: string | undefined = undefined; + + static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ + { + "name": "repository_url", + "baseName": "repository_url", + "type": "string", + "format": "" + }, + { + "name": "username", + "baseName": "username", + "type": "string", + "format": "" + }, + { + "name": "commit_branch_name", + "baseName": "commit_branch_name", + "type": "string", + "format": "" + }, + { + "name": "branches", + "baseName": "branches", + "type": "Array", + "format": "" + }, + { + "name": "enable_guid_mapping", + "baseName": "enable_guid_mapping", + "type": "boolean", + "format": "" + }, + { + "name": "configuration_branch_name", + "baseName": "configuration_branch_name", + "type": "string", + "format": "" + }, + { + "name": "org", + "baseName": "org", + "type": "Org", + "format": "" + } ]; + + static getAttributeTypeMap() { + return RepoConfigObject.attributeTypeMap; + } + + public constructor() { + } +} + diff --git a/sdks/typescript/models/ResetUserPasswordRequest.ts b/sdks/typescript/models/ResetUserPasswordRequest.ts new file mode 100644 index 000000000..804544bcc --- /dev/null +++ b/sdks/typescript/models/ResetUserPasswordRequest.ts @@ -0,0 +1,48 @@ +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { HttpFile } from '../http/http'; + +export class ResetUserPasswordRequest { + /** + * New password for the user. + */ + 'new_password': string; + /** + * GUID or name of the user. + */ + 'user_identifier': string; + + static readonly discriminator: string | undefined = undefined; + + static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ + { + "name": "new_password", + "baseName": "new_password", + "type": "string", + "format": "" + }, + { + "name": "user_identifier", + "baseName": "user_identifier", + "type": "string", + "format": "" + } ]; + + static getAttributeTypeMap() { + return ResetUserPasswordRequest.attributeTypeMap; + } + + public constructor() { + } +} + diff --git a/sdks/typescript/models/ResponseActivationURL.ts b/sdks/typescript/models/ResponseActivationURL.ts new file mode 100644 index 000000000..8b8f32023 --- /dev/null +++ b/sdks/typescript/models/ResponseActivationURL.ts @@ -0,0 +1,41 @@ +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { HttpFile } from '../http/http'; + +/** +* The object representation with activation link. +*/ +export class ResponseActivationURL { + /** + * Activation link to activate the user. + */ + 'activation_link'?: string | null; + + static readonly discriminator: string | undefined = undefined; + + static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ + { + "name": "activation_link", + "baseName": "activation_link", + "type": "string", + "format": "" + } ]; + + static getAttributeTypeMap() { + return ResponseActivationURL.attributeTypeMap; + } + + public constructor() { + } +} + diff --git a/sdks/typescript/models/ResponseCopyObject.ts b/sdks/typescript/models/ResponseCopyObject.ts new file mode 100644 index 000000000..9ccada734 --- /dev/null +++ b/sdks/typescript/models/ResponseCopyObject.ts @@ -0,0 +1,38 @@ +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { HttpFile } from '../http/http'; + +export class ResponseCopyObject { + /** + * The unique identifier of the object. + */ + 'metadata_id'?: string | null; + + static readonly discriminator: string | undefined = undefined; + + static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ + { + "name": "metadata_id", + "baseName": "metadata_id", + "type": "string", + "format": "" + } ]; + + static getAttributeTypeMap() { + return ResponseCopyObject.attributeTypeMap; + } + + public constructor() { + } +} + diff --git a/sdks/typescript/models/ResponseCustomAction.ts b/sdks/typescript/models/ResponseCustomAction.ts new file mode 100644 index 000000000..adb0563d9 --- /dev/null +++ b/sdks/typescript/models/ResponseCustomAction.ts @@ -0,0 +1,89 @@ +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { ActionDetails } from '../models/ActionDetails'; +import { DefaultActionConfig } from '../models/DefaultActionConfig'; +import { MetadataAssociationItem } from '../models/MetadataAssociationItem'; +import { ObjectIDAndName } from '../models/ObjectIDAndName'; +import { HttpFile } from '../http/http'; + +/** +* Custom action details +*/ +export class ResponseCustomAction { + 'action_details': ActionDetails; + 'default_action_config': DefaultActionConfig; + /** + * Unique Id of the custom action. + */ + 'id': string; + /** + * Metadata objects to assign the the custom action to. + */ + 'metadata_association'?: Array | null; + /** + * Unique name of the custom action. + */ + 'name': string; + /** + * Unique ID or name of the User groups which are associated with the custom action. + */ + 'user_groups'?: Array | null; + + static readonly discriminator: string | undefined = undefined; + + static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ + { + "name": "action_details", + "baseName": "action_details", + "type": "ActionDetails", + "format": "" + }, + { + "name": "default_action_config", + "baseName": "default_action_config", + "type": "DefaultActionConfig", + "format": "" + }, + { + "name": "id", + "baseName": "id", + "type": "string", + "format": "" + }, + { + "name": "metadata_association", + "baseName": "metadata_association", + "type": "Array", + "format": "" + }, + { + "name": "name", + "baseName": "name", + "type": "string", + "format": "" + }, + { + "name": "user_groups", + "baseName": "user_groups", + "type": "Array", + "format": "" + } ]; + + static getAttributeTypeMap() { + return ResponseCustomAction.attributeTypeMap; + } + + public constructor() { + } +} + diff --git a/sdks/typescript/models/ResponseFailedEntities.ts b/sdks/typescript/models/ResponseFailedEntities.ts new file mode 100644 index 000000000..8a67a722c --- /dev/null +++ b/sdks/typescript/models/ResponseFailedEntities.ts @@ -0,0 +1,39 @@ +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { ResponseFailedEntity } from '../models/ResponseFailedEntity'; +import { HttpFile } from '../http/http'; + +/** +* Wrapper for the failed entities, as they are inside a \'data\' field in the response. +*/ +export class ResponseFailedEntities { + 'data': Array; + + static readonly discriminator: string | undefined = undefined; + + static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ + { + "name": "data", + "baseName": "data", + "type": "Array", + "format": "" + } ]; + + static getAttributeTypeMap() { + return ResponseFailedEntities.attributeTypeMap; + } + + public constructor() { + } +} + diff --git a/sdks/typescript/models/ResponseFailedEntity.ts b/sdks/typescript/models/ResponseFailedEntity.ts new file mode 100644 index 000000000..55558fa17 --- /dev/null +++ b/sdks/typescript/models/ResponseFailedEntity.ts @@ -0,0 +1,58 @@ +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { HttpFile } from '../http/http'; + +/** +* Unique ID of the failed worksheet. +*/ +export class ResponseFailedEntity { + 'id': string; + /** + * Name of the worksheet that failed to convert. + */ + 'name': string; + /** + * Error details related to the failed conversion. + */ + 'error': string; + + static readonly discriminator: string | undefined = undefined; + + static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ + { + "name": "id", + "baseName": "id", + "type": "string", + "format": "" + }, + { + "name": "name", + "baseName": "name", + "type": "string", + "format": "" + }, + { + "name": "error", + "baseName": "error", + "type": "string", + "format": "" + } ]; + + static getAttributeTypeMap() { + return ResponseFailedEntity.attributeTypeMap; + } + + public constructor() { + } +} + diff --git a/sdks/typescript/models/ResponseIncompleteEntities.ts b/sdks/typescript/models/ResponseIncompleteEntities.ts new file mode 100644 index 000000000..8548da926 --- /dev/null +++ b/sdks/typescript/models/ResponseIncompleteEntities.ts @@ -0,0 +1,39 @@ +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { ResponseIncompleteEntity } from '../models/ResponseIncompleteEntity'; +import { HttpFile } from '../http/http'; + +/** +* Wrapper for the incomplete entities, as they are inside a \'data\' field in the response. +*/ +export class ResponseIncompleteEntities { + 'data': Array; + + static readonly discriminator: string | undefined = undefined; + + static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ + { + "name": "data", + "baseName": "data", + "type": "Array", + "format": "" + } ]; + + static getAttributeTypeMap() { + return ResponseIncompleteEntities.attributeTypeMap; + } + + public constructor() { + } +} + diff --git a/sdks/typescript/models/ResponseIncompleteEntity.ts b/sdks/typescript/models/ResponseIncompleteEntity.ts new file mode 100644 index 000000000..11764d230 --- /dev/null +++ b/sdks/typescript/models/ResponseIncompleteEntity.ts @@ -0,0 +1,58 @@ +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { HttpFile } from '../http/http'; + +/** +* Unique ID of the incomplete worksheet. +*/ +export class ResponseIncompleteEntity { + 'id': string; + /** + * Name of the incomplete worksheet. + */ + 'name': string; + /** + * Error details related to the incomplete conversion. + */ + 'error': string; + + static readonly discriminator: string | undefined = undefined; + + static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ + { + "name": "id", + "baseName": "id", + "type": "string", + "format": "" + }, + { + "name": "name", + "baseName": "name", + "type": "string", + "format": "" + }, + { + "name": "error", + "baseName": "error", + "type": "string", + "format": "" + } ]; + + static getAttributeTypeMap() { + return ResponseIncompleteEntity.attributeTypeMap; + } + + public constructor() { + } +} + diff --git a/sdks/typescript/models/ResponseMessage.ts b/sdks/typescript/models/ResponseMessage.ts new file mode 100644 index 000000000..3c7cb6239 --- /dev/null +++ b/sdks/typescript/models/ResponseMessage.ts @@ -0,0 +1,92 @@ +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { HttpFile } from '../http/http'; + +export class ResponseMessage { + /** + * Unique identifier of the generated response. + */ + 'session_identifier'?: string | null; + /** + * Generate number of the response. + */ + 'generation_number'?: number | null; + /** + * Type of the generated response. + */ + 'message_type': ResponseMessageMessageTypeEnum; + /** + * Generated visualization type. + */ + 'visualization_type'?: ResponseMessageVisualizationTypeEnum | null; + /** + * Tokens for the response. + */ + 'tokens'?: string | null; + /** + * User friendly tokens for the response. + */ + 'display_tokens'?: string | null; + + static readonly discriminator: string | undefined = undefined; + + static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ + { + "name": "session_identifier", + "baseName": "session_identifier", + "type": "string", + "format": "" + }, + { + "name": "generation_number", + "baseName": "generation_number", + "type": "number", + "format": "int32" + }, + { + "name": "message_type", + "baseName": "message_type", + "type": "ResponseMessageMessageTypeEnum", + "format": "" + }, + { + "name": "visualization_type", + "baseName": "visualization_type", + "type": "ResponseMessageVisualizationTypeEnum", + "format": "" + }, + { + "name": "tokens", + "baseName": "tokens", + "type": "string", + "format": "" + }, + { + "name": "display_tokens", + "baseName": "display_tokens", + "type": "string", + "format": "" + } ]; + + static getAttributeTypeMap() { + return ResponseMessage.attributeTypeMap; + } + + public constructor() { + } +} + + +export type ResponseMessageMessageTypeEnum = "TSAnswer" ; +export type ResponseMessageVisualizationTypeEnum = "Chart" | "Table" | "Undefined" ; + diff --git a/sdks/typescript/models/ResponsePostUpgradeFailedEntities.ts b/sdks/typescript/models/ResponsePostUpgradeFailedEntities.ts new file mode 100644 index 000000000..3e2c538e4 --- /dev/null +++ b/sdks/typescript/models/ResponsePostUpgradeFailedEntities.ts @@ -0,0 +1,39 @@ +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { ResponsePostUpgradeFailedEntity } from '../models/ResponsePostUpgradeFailedEntity'; +import { HttpFile } from '../http/http'; + +/** +* Wrapper for the post-upgrade failed entities, as they are inside a \'data\' field in the response. +*/ +export class ResponsePostUpgradeFailedEntities { + 'data': Array; + + static readonly discriminator: string | undefined = undefined; + + static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ + { + "name": "data", + "baseName": "data", + "type": "Array", + "format": "" + } ]; + + static getAttributeTypeMap() { + return ResponsePostUpgradeFailedEntities.attributeTypeMap; + } + + public constructor() { + } +} + diff --git a/sdks/typescript/models/ResponsePostUpgradeFailedEntity.ts b/sdks/typescript/models/ResponsePostUpgradeFailedEntity.ts new file mode 100644 index 000000000..d1ba37c64 --- /dev/null +++ b/sdks/typescript/models/ResponsePostUpgradeFailedEntity.ts @@ -0,0 +1,58 @@ +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { HttpFile } from '../http/http'; + +/** +* Unique ID of the worksheet that failed post-upgrade. +*/ +export class ResponsePostUpgradeFailedEntity { + 'id': string; + /** + * Name of the worksheet that failed post-upgrade. + */ + 'name': string; + /** + * Error details related to the post-upgrade failure. + */ + 'error': string; + + static readonly discriminator: string | undefined = undefined; + + static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ + { + "name": "id", + "baseName": "id", + "type": "string", + "format": "" + }, + { + "name": "name", + "baseName": "name", + "type": "string", + "format": "" + }, + { + "name": "error", + "baseName": "error", + "type": "string", + "format": "" + } ]; + + static getAttributeTypeMap() { + return ResponsePostUpgradeFailedEntity.attributeTypeMap; + } + + public constructor() { + } +} + diff --git a/sdks/typescript/models/ResponseSchedule.ts b/sdks/typescript/models/ResponseSchedule.ts new file mode 100644 index 000000000..0b40ea752 --- /dev/null +++ b/sdks/typescript/models/ResponseSchedule.ts @@ -0,0 +1,167 @@ +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { Author } from '../models/Author'; +import { Frequency } from '../models/Frequency'; +import { LiveboardOptions } from '../models/LiveboardOptions'; +import { MetadataResponse } from '../models/MetadataResponse'; +import { PdfOptions } from '../models/PdfOptions'; +import { RecipientDetails } from '../models/RecipientDetails'; +import { ResponseScheduleRun } from '../models/ResponseScheduleRun'; +import { HttpFile } from '../http/http'; + +export class ResponseSchedule { + 'author': Author; + /** + * Schedule creation time in milliseconds. + */ + 'creation_time_in_millis': any; + /** + * Description of the job. + */ + 'description'?: string | null; + /** + * Export file format. + */ + 'file_format': string; + 'frequency': Frequency; + /** + * GUID of the scheduled job. + */ + 'id': string; + 'liveboard_options'?: LiveboardOptions; + 'metadata': MetadataResponse; + /** + * Name of the scheduled job. + */ + 'name': string; + 'pdf_options'?: PdfOptions; + 'recipient_details': RecipientDetails; + /** + * Status of the job + */ + 'status'?: string | null; + /** + * Time zone + */ + 'time_zone': string; + /** + * Schedule runs history records. + */ + 'history_runs'?: Array | null; + /** + * Personalised view id of the liveboard to be scheduled. + */ + 'personalised_view_id'?: string | null; + + static readonly discriminator: string | undefined = undefined; + + static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ + { + "name": "author", + "baseName": "author", + "type": "Author", + "format": "" + }, + { + "name": "creation_time_in_millis", + "baseName": "creation_time_in_millis", + "type": "any", + "format": "" + }, + { + "name": "description", + "baseName": "description", + "type": "string", + "format": "" + }, + { + "name": "file_format", + "baseName": "file_format", + "type": "string", + "format": "" + }, + { + "name": "frequency", + "baseName": "frequency", + "type": "Frequency", + "format": "" + }, + { + "name": "id", + "baseName": "id", + "type": "string", + "format": "" + }, + { + "name": "liveboard_options", + "baseName": "liveboard_options", + "type": "LiveboardOptions", + "format": "" + }, + { + "name": "metadata", + "baseName": "metadata", + "type": "MetadataResponse", + "format": "" + }, + { + "name": "name", + "baseName": "name", + "type": "string", + "format": "" + }, + { + "name": "pdf_options", + "baseName": "pdf_options", + "type": "PdfOptions", + "format": "" + }, + { + "name": "recipient_details", + "baseName": "recipient_details", + "type": "RecipientDetails", + "format": "" + }, + { + "name": "status", + "baseName": "status", + "type": "string", + "format": "" + }, + { + "name": "time_zone", + "baseName": "time_zone", + "type": "string", + "format": "" + }, + { + "name": "history_runs", + "baseName": "history_runs", + "type": "Array", + "format": "" + }, + { + "name": "personalised_view_id", + "baseName": "personalised_view_id", + "type": "string", + "format": "" + } ]; + + static getAttributeTypeMap() { + return ResponseSchedule.attributeTypeMap; + } + + public constructor() { + } +} + diff --git a/sdks/typescript/models/ResponseScheduleRun.ts b/sdks/typescript/models/ResponseScheduleRun.ts new file mode 100644 index 000000000..25704ce85 --- /dev/null +++ b/sdks/typescript/models/ResponseScheduleRun.ts @@ -0,0 +1,81 @@ +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { HttpFile } from '../http/http'; + +/** +* Schedule run response object +*/ +export class ResponseScheduleRun { + /** + * GUID of the scheduled job. + */ + 'id': string; + /** + * Schedule run start time in milliseconds. + */ + 'start_time_in_millis': number; + /** + * Schedule run end time in milliseconds. + */ + 'end_time_in_millis': number; + /** + * Status of the schedule run. + */ + 'status': string; + /** + * Message details related to the schedule run. + */ + 'detail'?: string | null; + + static readonly discriminator: string | undefined = undefined; + + static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ + { + "name": "id", + "baseName": "id", + "type": "string", + "format": "" + }, + { + "name": "start_time_in_millis", + "baseName": "start_time_in_millis", + "type": "number", + "format": "int32" + }, + { + "name": "end_time_in_millis", + "baseName": "end_time_in_millis", + "type": "number", + "format": "int32" + }, + { + "name": "status", + "baseName": "status", + "type": "string", + "format": "" + }, + { + "name": "detail", + "baseName": "detail", + "type": "string", + "format": "" + } ]; + + static getAttributeTypeMap() { + return ResponseScheduleRun.attributeTypeMap; + } + + public constructor() { + } +} + diff --git a/sdks/typescript/models/ResponseSuccessfulEntities.ts b/sdks/typescript/models/ResponseSuccessfulEntities.ts new file mode 100644 index 000000000..00ab6e4f0 --- /dev/null +++ b/sdks/typescript/models/ResponseSuccessfulEntities.ts @@ -0,0 +1,39 @@ +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { ResponseSuccessfulEntity } from '../models/ResponseSuccessfulEntity'; +import { HttpFile } from '../http/http'; + +/** +* Wrapper for the successful entities, as they are inside a \'data\' field in the response. +*/ +export class ResponseSuccessfulEntities { + 'data': Array; + + static readonly discriminator: string | undefined = undefined; + + static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ + { + "name": "data", + "baseName": "data", + "type": "Array", + "format": "" + } ]; + + static getAttributeTypeMap() { + return ResponseSuccessfulEntities.attributeTypeMap; + } + + public constructor() { + } +} + diff --git a/sdks/typescript/models/ResponseSuccessfulEntity.ts b/sdks/typescript/models/ResponseSuccessfulEntity.ts new file mode 100644 index 000000000..6a7303dbc --- /dev/null +++ b/sdks/typescript/models/ResponseSuccessfulEntity.ts @@ -0,0 +1,48 @@ +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { HttpFile } from '../http/http'; + +/** +* Unique ID of the worksheet. +*/ +export class ResponseSuccessfulEntity { + 'id': string; + /** + * Name of the worksheet. + */ + 'name': string; + + static readonly discriminator: string | undefined = undefined; + + static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ + { + "name": "id", + "baseName": "id", + "type": "string", + "format": "" + }, + { + "name": "name", + "baseName": "name", + "type": "string", + "format": "" + } ]; + + static getAttributeTypeMap() { + return ResponseSuccessfulEntity.attributeTypeMap; + } + + public constructor() { + } +} + diff --git a/sdks/typescript/models/ResponseWorksheetToModelConversion.ts b/sdks/typescript/models/ResponseWorksheetToModelConversion.ts new file mode 100644 index 000000000..f068df4de --- /dev/null +++ b/sdks/typescript/models/ResponseWorksheetToModelConversion.ts @@ -0,0 +1,120 @@ +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { ResponseFailedEntities } from '../models/ResponseFailedEntities'; +import { ResponseIncompleteEntities } from '../models/ResponseIncompleteEntities'; +import { ResponsePostUpgradeFailedEntities } from '../models/ResponsePostUpgradeFailedEntities'; +import { ResponseSuccessfulEntities } from '../models/ResponseSuccessfulEntities'; +import { HttpFile } from '../http/http'; + +/** +* Name of the conversion process, which involves converting worksheets to models. +*/ +export class ResponseWorksheetToModelConversion { + 'name': string; + /** + * The number of worksheets successfully converted to models. + */ + 'success_count': number; + /** + * The number of worksheets that failed to convert. + */ + 'failure_count': number; + /** + * The number of worksheets that were incomplete during the conversion process. + */ + 'incomplete_count': number; + /** + * The number of worksheets that failed after an upgrade during the conversion process. + */ + 'post_upgrade_failed_count': number; + /** + * The total time taken to complete the conversion process in milliseconds. + */ + 'total_time_in_millis': number; + 'successful_entities': ResponseSuccessfulEntities; + 'failed_entities': ResponseFailedEntities; + 'incomplete_entities': ResponseIncompleteEntities; + 'post_upgrade_failed_entities': ResponsePostUpgradeFailedEntities; + + static readonly discriminator: string | undefined = undefined; + + static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ + { + "name": "name", + "baseName": "name", + "type": "string", + "format": "" + }, + { + "name": "success_count", + "baseName": "success_count", + "type": "number", + "format": "int32" + }, + { + "name": "failure_count", + "baseName": "failure_count", + "type": "number", + "format": "int32" + }, + { + "name": "incomplete_count", + "baseName": "incomplete_count", + "type": "number", + "format": "int32" + }, + { + "name": "post_upgrade_failed_count", + "baseName": "post_upgrade_failed_count", + "type": "number", + "format": "int32" + }, + { + "name": "total_time_in_millis", + "baseName": "total_time_in_millis", + "type": "number", + "format": "int32" + }, + { + "name": "successful_entities", + "baseName": "successful_entities", + "type": "ResponseSuccessfulEntities", + "format": "" + }, + { + "name": "failed_entities", + "baseName": "failed_entities", + "type": "ResponseFailedEntities", + "format": "" + }, + { + "name": "incomplete_entities", + "baseName": "incomplete_entities", + "type": "ResponseIncompleteEntities", + "format": "" + }, + { + "name": "post_upgrade_failed_entities", + "baseName": "post_upgrade_failed_entities", + "type": "ResponsePostUpgradeFailedEntities", + "format": "" + } ]; + + static getAttributeTypeMap() { + return ResponseWorksheetToModelConversion.attributeTypeMap; + } + + public constructor() { + } +} + diff --git a/sdks/typescript/models/RevertCommitRequest.ts b/sdks/typescript/models/RevertCommitRequest.ts new file mode 100644 index 000000000..b8a33d6f1 --- /dev/null +++ b/sdks/typescript/models/RevertCommitRequest.ts @@ -0,0 +1,62 @@ +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { MetadataObject } from '../models/MetadataObject'; +import { HttpFile } from '../http/http'; + +export class RevertCommitRequest { + /** + * Metadata objects. + */ + 'metadata'?: Array; + /** + * Name of the branch where the reverted version should be committed Note: If no branch_name is specified, then the commit_branch_name will be considered. + */ + 'branch_name'?: string; + /** + * Policy to apply when reverting a commit. Valid values: [ALL_OR_NONE, PARTIAL] + */ + 'revert_policy'?: RevertCommitRequestRevertPolicyEnum; + + static readonly discriminator: string | undefined = undefined; + + static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ + { + "name": "metadata", + "baseName": "metadata", + "type": "Array", + "format": "" + }, + { + "name": "branch_name", + "baseName": "branch_name", + "type": "string", + "format": "" + }, + { + "name": "revert_policy", + "baseName": "revert_policy", + "type": "RevertCommitRequestRevertPolicyEnum", + "format": "" + } ]; + + static getAttributeTypeMap() { + return RevertCommitRequest.attributeTypeMap; + } + + public constructor() { + } +} + + +export type RevertCommitRequestRevertPolicyEnum = "ALL_OR_NONE" | "PARTIAL" ; + diff --git a/sdks/typescript/models/RevertResponse.ts b/sdks/typescript/models/RevertResponse.ts new file mode 100644 index 000000000..30dce1aa9 --- /dev/null +++ b/sdks/typescript/models/RevertResponse.ts @@ -0,0 +1,106 @@ +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { AuthorType } from '../models/AuthorType'; +import { CommitFileType } from '../models/CommitFileType'; +import { CommiterType } from '../models/CommiterType'; +import { RevertedMetadata } from '../models/RevertedMetadata'; +import { HttpFile } from '../http/http'; + +export class RevertResponse { + 'committer'?: CommiterType; + 'author'?: AuthorType; + /** + * Comments associated with the commit + */ + 'comment'?: string | null; + /** + * Time at which the changes were committed. + */ + 'commit_time'?: string | null; + /** + * SHA id associated with the commit + */ + 'commit_id'?: string | null; + /** + * Branch where changes were committed + */ + 'branch'?: string | null; + /** + * Files that were pushed as part of this commit + */ + 'committed_files'?: Array | null; + /** + * Metadata of reverted file of this commit + */ + 'reverted_metadata'?: Array | null; + + static readonly discriminator: string | undefined = undefined; + + static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ + { + "name": "committer", + "baseName": "committer", + "type": "CommiterType", + "format": "" + }, + { + "name": "author", + "baseName": "author", + "type": "AuthorType", + "format": "" + }, + { + "name": "comment", + "baseName": "comment", + "type": "string", + "format": "" + }, + { + "name": "commit_time", + "baseName": "commit_time", + "type": "string", + "format": "" + }, + { + "name": "commit_id", + "baseName": "commit_id", + "type": "string", + "format": "" + }, + { + "name": "branch", + "baseName": "branch", + "type": "string", + "format": "" + }, + { + "name": "committed_files", + "baseName": "committed_files", + "type": "Array", + "format": "" + }, + { + "name": "reverted_metadata", + "baseName": "reverted_metadata", + "type": "Array", + "format": "" + } ]; + + static getAttributeTypeMap() { + return RevertResponse.attributeTypeMap; + } + + public constructor() { + } +} + diff --git a/sdks/typescript/models/RevertedMetadata.ts b/sdks/typescript/models/RevertedMetadata.ts new file mode 100644 index 000000000..9dfeb4f0a --- /dev/null +++ b/sdks/typescript/models/RevertedMetadata.ts @@ -0,0 +1,78 @@ +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { HttpFile } from '../http/http'; + +export class RevertedMetadata { + /** + * Name of the file deployed + */ + 'file_name': string; + /** + * Name of the metadata object + */ + 'metadata_name': string; + /** + * Type of the metadata object + */ + 'metadata_type': string; + /** + * Indicates the status of deployment for the file + */ + 'status_code': string; + /** + * Any error or warning with the deployment + */ + 'status_message': string; + + static readonly discriminator: string | undefined = undefined; + + static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ + { + "name": "file_name", + "baseName": "file_name", + "type": "string", + "format": "" + }, + { + "name": "metadata_name", + "baseName": "metadata_name", + "type": "string", + "format": "" + }, + { + "name": "metadata_type", + "baseName": "metadata_type", + "type": "string", + "format": "" + }, + { + "name": "status_code", + "baseName": "status_code", + "type": "string", + "format": "" + }, + { + "name": "status_message", + "baseName": "status_message", + "type": "string", + "format": "" + } ]; + + static getAttributeTypeMap() { + return RevertedMetadata.attributeTypeMap; + } + + public constructor() { + } +} + diff --git a/sdks/typescript/models/RevokeRefreshTokensRequest.ts b/sdks/typescript/models/RevokeRefreshTokensRequest.ts new file mode 100644 index 000000000..59bff9b92 --- /dev/null +++ b/sdks/typescript/models/RevokeRefreshTokensRequest.ts @@ -0,0 +1,58 @@ +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { HttpFile } from '../http/http'; + +export class RevokeRefreshTokensRequest { + /** + * Unique ID or name of the configuration. When provided, the refresh tokens of the users associated with the connection configuration will be revoked. + */ + 'configuration_identifiers'?: Array; + /** + * Unique ID or name of the users. When provided, the refresh tokens of the specified users will be revoked. If the request includes the user ID or name of the connection author, their token will also be revoked. + */ + 'user_identifiers'?: Array; + /** + * Unique ID or name of the Org. When provided, the refresh tokens of all users associated with the published connection in the Org will be revoked. This parameter is valid only for published connections. Using it with unpublished connections will result in an error. + */ + 'org_identifiers'?: Array; + + static readonly discriminator: string | undefined = undefined; + + static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ + { + "name": "configuration_identifiers", + "baseName": "configuration_identifiers", + "type": "Array", + "format": "" + }, + { + "name": "user_identifiers", + "baseName": "user_identifiers", + "type": "Array", + "format": "" + }, + { + "name": "org_identifiers", + "baseName": "org_identifiers", + "type": "Array", + "format": "" + } ]; + + static getAttributeTypeMap() { + return RevokeRefreshTokensRequest.attributeTypeMap; + } + + public constructor() { + } +} + diff --git a/sdks/typescript/models/RevokeRefreshTokensResponse.ts b/sdks/typescript/models/RevokeRefreshTokensResponse.ts new file mode 100644 index 000000000..68222986f --- /dev/null +++ b/sdks/typescript/models/RevokeRefreshTokensResponse.ts @@ -0,0 +1,38 @@ +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { HttpFile } from '../http/http'; + +export class RevokeRefreshTokensResponse { + /** + * Result message describing the outcome of the refresh token revocation operation. + */ + 'data': string; + + static readonly discriminator: string | undefined = undefined; + + static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ + { + "name": "data", + "baseName": "data", + "type": "string", + "format": "" + } ]; + + static getAttributeTypeMap() { + return RevokeRefreshTokensResponse.attributeTypeMap; + } + + public constructor() { + } +} + diff --git a/sdks/typescript/models/RevokeTokenRequest.ts b/sdks/typescript/models/RevokeTokenRequest.ts new file mode 100644 index 000000000..2c6bfa59c --- /dev/null +++ b/sdks/typescript/models/RevokeTokenRequest.ts @@ -0,0 +1,42 @@ +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { HttpFile } from '../http/http'; + +export class RevokeTokenRequest { + 'user_identifier'?: string; + 'token'?: string; + + static readonly discriminator: string | undefined = undefined; + + static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ + { + "name": "user_identifier", + "baseName": "user_identifier", + "type": "string", + "format": "" + }, + { + "name": "token", + "baseName": "token", + "type": "string", + "format": "" + } ]; + + static getAttributeTypeMap() { + return RevokeTokenRequest.attributeTypeMap; + } + + public constructor() { + } +} + diff --git a/sdks/typescript/models/RiseGQLArgWrapper.ts b/sdks/typescript/models/RiseGQLArgWrapper.ts new file mode 100644 index 000000000..39466f930 --- /dev/null +++ b/sdks/typescript/models/RiseGQLArgWrapper.ts @@ -0,0 +1,42 @@ +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { HttpFile } from '../http/http'; + +export class RiseGQLArgWrapper { + 'name': string; + 'type': string; + + static readonly discriminator: string | undefined = undefined; + + static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ + { + "name": "name", + "baseName": "name", + "type": "string", + "format": "" + }, + { + "name": "type", + "baseName": "type", + "type": "string", + "format": "" + } ]; + + static getAttributeTypeMap() { + return RiseGQLArgWrapper.attributeTypeMap; + } + + public constructor() { + } +} + diff --git a/sdks/typescript/models/RiseSetter.ts b/sdks/typescript/models/RiseSetter.ts new file mode 100644 index 000000000..f586fa4ec --- /dev/null +++ b/sdks/typescript/models/RiseSetter.ts @@ -0,0 +1,42 @@ +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { HttpFile } from '../http/http'; + +export class RiseSetter { + 'field': string; + 'path': string; + + static readonly discriminator: string | undefined = undefined; + + static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ + { + "name": "field", + "baseName": "field", + "type": "string", + "format": "" + }, + { + "name": "path", + "baseName": "path", + "type": "string", + "format": "" + } ]; + + static getAttributeTypeMap() { + return RiseSetter.attributeTypeMap; + } + + public constructor() { + } +} + diff --git a/sdks/typescript/models/Role.ts b/sdks/typescript/models/Role.ts new file mode 100644 index 000000000..4172c0527 --- /dev/null +++ b/sdks/typescript/models/Role.ts @@ -0,0 +1,48 @@ +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { HttpFile } from '../http/http'; + +export class Role { + /** + * id of the role + */ + 'id'?: string | null; + /** + * name of the role + */ + 'name'?: string | null; + + static readonly discriminator: string | undefined = undefined; + + static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ + { + "name": "id", + "baseName": "id", + "type": "string", + "format": "" + }, + { + "name": "name", + "baseName": "name", + "type": "string", + "format": "" + } ]; + + static getAttributeTypeMap() { + return Role.attributeTypeMap; + } + + public constructor() { + } +} + diff --git a/sdks/typescript/models/RoleResponse.ts b/sdks/typescript/models/RoleResponse.ts new file mode 100644 index 000000000..9a5f88ddb --- /dev/null +++ b/sdks/typescript/models/RoleResponse.ts @@ -0,0 +1,203 @@ +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { GenericInfo } from '../models/GenericInfo'; +import { HttpFile } from '../http/http'; + +export class RoleResponse { + /** + * Unique Id of the role. + */ + 'id': string; + /** + * Name of the role + */ + 'name': string; + /** + * Description of the role + */ + 'description': string; + /** + * number of groups assigned with this role + */ + 'groups_assigned_count'?: number | null; + /** + * Orgs in which role exists. + */ + 'orgs'?: Array | null; + /** + * Details of groups assigned with this role + */ + 'groups'?: Array | null; + /** + * Privileges granted to the role. + */ + 'privileges': Array; + /** + * Permission details of the Role + */ + 'permission'?: RoleResponsePermissionEnum | null; + /** + * Unique identifier of author of the role. + */ + 'author_id'?: string | null; + /** + * Unique identifier of modifier of the role. + */ + 'modifier_id'?: string | null; + /** + * Creation time of the role in milliseconds. + */ + 'creation_time_in_millis'?: any | null; + /** + * Last modified time of the role in milliseconds. + */ + 'modification_time_in_millis'?: any | null; + /** + * Indicates whether the role is deleted. + */ + 'deleted'?: boolean | null; + /** + * Indicates whether the role is deprecated. + */ + 'deprecated'?: boolean | null; + /** + * Indicates whether the role is external. + */ + 'external'?: boolean | null; + /** + * Indicates whether the role is hidden. + */ + 'hidden'?: boolean | null; + /** + * Indicates whether the role is shared via connection + */ + 'shared_via_connection'?: boolean | null; + + static readonly discriminator: string | undefined = undefined; + + static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ + { + "name": "id", + "baseName": "id", + "type": "string", + "format": "" + }, + { + "name": "name", + "baseName": "name", + "type": "string", + "format": "" + }, + { + "name": "description", + "baseName": "description", + "type": "string", + "format": "" + }, + { + "name": "groups_assigned_count", + "baseName": "groups_assigned_count", + "type": "number", + "format": "int32" + }, + { + "name": "orgs", + "baseName": "orgs", + "type": "Array", + "format": "" + }, + { + "name": "groups", + "baseName": "groups", + "type": "Array", + "format": "" + }, + { + "name": "privileges", + "baseName": "privileges", + "type": "Array", + "format": "" + }, + { + "name": "permission", + "baseName": "permission", + "type": "RoleResponsePermissionEnum", + "format": "" + }, + { + "name": "author_id", + "baseName": "author_id", + "type": "string", + "format": "" + }, + { + "name": "modifier_id", + "baseName": "modifier_id", + "type": "string", + "format": "" + }, + { + "name": "creation_time_in_millis", + "baseName": "creation_time_in_millis", + "type": "any", + "format": "" + }, + { + "name": "modification_time_in_millis", + "baseName": "modification_time_in_millis", + "type": "any", + "format": "" + }, + { + "name": "deleted", + "baseName": "deleted", + "type": "boolean", + "format": "" + }, + { + "name": "deprecated", + "baseName": "deprecated", + "type": "boolean", + "format": "" + }, + { + "name": "external", + "baseName": "external", + "type": "boolean", + "format": "" + }, + { + "name": "hidden", + "baseName": "hidden", + "type": "boolean", + "format": "" + }, + { + "name": "shared_via_connection", + "baseName": "shared_via_connection", + "type": "boolean", + "format": "" + } ]; + + static getAttributeTypeMap() { + return RoleResponse.attributeTypeMap; + } + + public constructor() { + } +} + + +export type RoleResponsePrivilegesEnum = "USERDATAUPLOADING" | "DATADOWNLOADING" | "DATAMANAGEMENT" | "SHAREWITHALL" | "JOBSCHEDULING" | "A3ANALYSIS" | "BYPASSRLS" | "DISABLE_PINBOARD_CREATION" | "DEVELOPER" | "APPLICATION_ADMINISTRATION" | "USER_ADMINISTRATION" | "GROUP_ADMINISTRATION" | "SYSTEM_INFO_ADMINISTRATION" | "SYNCMANAGEMENT" | "ORG_ADMINISTRATION" | "ROLE_ADMINISTRATION" | "AUTHENTICATION_ADMINISTRATION" | "BILLING_INFO_ADMINISTRATION" | "CONTROL_TRUSTED_AUTH" | "TAGMANAGEMENT" | "LIVEBOARD_VERIFIER" | "CAN_MANAGE_CUSTOM_CALENDAR" | "CAN_CREATE_OR_EDIT_CONNECTIONS" | "CAN_MANAGE_WORKSHEET_VIEWS_TABLES" | "CAN_MANAGE_VERSION_CONTROL" | "THIRDPARTY_ANALYSIS" | "CAN_CREATE_CATALOG" | "ALLOW_NON_EMBED_FULL_APP_ACCESS" | "CAN_ACCESS_ANALYST_STUDIO" | "CAN_MANAGE_ANALYST_STUDIO" | "PREVIEW_DOCUMENT_SEARCH" | "CAN_MANAGE_VARIABLES" | "CAN_MODIFY_FOLDERS" | "CAN_VIEW_FOLDERS" | "CAN_MANAGE_AGENTSPOT" | "CAN_ACCESS_AGENTSPOT" | "CAN_SETUP_VERSION_CONTROL" | "PREVIEW_THOUGHTSPOT_SAGE" | "CAN_MANAGE_WEBHOOKS" | "CAN_DOWNLOAD_VISUALS" | "CAN_DOWNLOAD_DETAILED_DATA" | "CAN_USE_SPOTTER" ; +export type RoleResponsePermissionEnum = "READ_ONLY" | "MODIFY" | "NO_ACCESS" ; + diff --git a/sdks/typescript/models/RuntimeFilter.ts b/sdks/typescript/models/RuntimeFilter.ts new file mode 100644 index 000000000..6f3d5cd64 --- /dev/null +++ b/sdks/typescript/models/RuntimeFilter.ts @@ -0,0 +1,41 @@ +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { HttpFile } from '../http/http'; + +/** +* List of runtime parameters need to set during the session. +*/ +export class RuntimeFilter { + /** + * Runtime filter parameter type in JWT. + */ + 'runtime_filter'?: any; + + static readonly discriminator: string | undefined = undefined; + + static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ + { + "name": "runtime_filter", + "baseName": "runtime_filter", + "type": "any", + "format": "" + } ]; + + static getAttributeTypeMap() { + return RuntimeFilter.attributeTypeMap; + } + + public constructor() { + } +} + diff --git a/sdks/typescript/models/RuntimeFilters.ts b/sdks/typescript/models/RuntimeFilters.ts new file mode 100644 index 000000000..ae4c25502 --- /dev/null +++ b/sdks/typescript/models/RuntimeFilters.ts @@ -0,0 +1,85 @@ +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { UserObject } from '../models/UserObject'; +import { HttpFile } from '../http/http'; + +/** +* Objects to apply the Runtime_Filters. +*/ +export class RuntimeFilters { + /** + * The column name to apply filter. + */ + 'column_name': string; + /** + * Value of the filters. + */ + 'values': Array; + /** + * Operator value. Example: EQ + */ + 'operator': RuntimeFiltersOperatorEnum; + /** + * Flag to persist the runtime filters. Version: 9.12.0.cl or later + */ + 'persist'?: boolean | null; + /** + * Object to apply the runtime filter. + */ + 'objects'?: Array | null; + + static readonly discriminator: string | undefined = undefined; + + static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ + { + "name": "column_name", + "baseName": "column_name", + "type": "string", + "format": "" + }, + { + "name": "values", + "baseName": "values", + "type": "Array", + "format": "" + }, + { + "name": "operator", + "baseName": "operator", + "type": "RuntimeFiltersOperatorEnum", + "format": "" + }, + { + "name": "persist", + "baseName": "persist", + "type": "boolean", + "format": "" + }, + { + "name": "objects", + "baseName": "objects", + "type": "Array", + "format": "" + } ]; + + static getAttributeTypeMap() { + return RuntimeFilters.attributeTypeMap; + } + + public constructor() { + } +} + + +export type RuntimeFiltersOperatorEnum = "EQ" | "NE" | "LT" | "LE" | "GT" | "GE" | "IN" | "BW" | "CONTAINS" | "BEGINS_WITH" | "ENDS_WITH" | "BW_INC" | "BW_INC_MIN" | "BW_INC_MAX" | "LIKE" | "NOT_IN" ; + diff --git a/sdks/typescript/models/RuntimeParamOverride.ts b/sdks/typescript/models/RuntimeParamOverride.ts new file mode 100644 index 000000000..1340e24d6 --- /dev/null +++ b/sdks/typescript/models/RuntimeParamOverride.ts @@ -0,0 +1,41 @@ +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { HttpFile } from '../http/http'; + +/** +* List of runtime parameters need to set during the session. +*/ +export class RuntimeParamOverride { + /** + * Runtime param override type in JWT. + */ + 'runtime_param_override'?: any; + + static readonly discriminator: string | undefined = undefined; + + static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ + { + "name": "runtime_param_override", + "baseName": "runtime_param_override", + "type": "any", + "format": "" + } ]; + + static getAttributeTypeMap() { + return RuntimeParamOverride.attributeTypeMap; + } + + public constructor() { + } +} + diff --git a/sdks/typescript/models/RuntimeParameters.ts b/sdks/typescript/models/RuntimeParameters.ts new file mode 100644 index 000000000..96b4cb93e --- /dev/null +++ b/sdks/typescript/models/RuntimeParameters.ts @@ -0,0 +1,72 @@ +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { UserObject } from '../models/UserObject'; +import { HttpFile } from '../http/http'; + +/** +* Objects to apply the Runtime_Parameters. +*/ +export class RuntimeParameters { + /** + * The name of the parameter. + */ + 'name': string; + /** + * The array of values. + */ + 'values': Array; + /** + * Flag to persist the parameters. Version: 9.12.0.cl or later + */ + 'persist'?: boolean | null; + /** + * Object to apply the runtime parameter. + */ + 'objects'?: Array | null; + + static readonly discriminator: string | undefined = undefined; + + static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ + { + "name": "name", + "baseName": "name", + "type": "string", + "format": "" + }, + { + "name": "values", + "baseName": "values", + "type": "Array", + "format": "" + }, + { + "name": "persist", + "baseName": "persist", + "type": "boolean", + "format": "" + }, + { + "name": "objects", + "baseName": "objects", + "type": "Array", + "format": "" + } ]; + + static getAttributeTypeMap() { + return RuntimeParameters.attributeTypeMap; + } + + public constructor() { + } +} + diff --git a/sdks/typescript/models/RuntimeSort.ts b/sdks/typescript/models/RuntimeSort.ts new file mode 100644 index 000000000..60c64d581 --- /dev/null +++ b/sdks/typescript/models/RuntimeSort.ts @@ -0,0 +1,41 @@ +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { HttpFile } from '../http/http'; + +/** +* List of runtime parameters need to set during the session. +*/ +export class RuntimeSort { + /** + * Runtime sort parameter type in JWT. + */ + 'runtime_sort'?: any; + + static readonly discriminator: string | undefined = undefined; + + static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ + { + "name": "runtime_sort", + "baseName": "runtime_sort", + "type": "any", + "format": "" + } ]; + + static getAttributeTypeMap() { + return RuntimeSort.attributeTypeMap; + } + + public constructor() { + } +} + diff --git a/sdks/typescript/models/RuntimeSorts.ts b/sdks/typescript/models/RuntimeSorts.ts new file mode 100644 index 000000000..409f97d11 --- /dev/null +++ b/sdks/typescript/models/RuntimeSorts.ts @@ -0,0 +1,75 @@ +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { UserObject } from '../models/UserObject'; +import { HttpFile } from '../http/http'; + +/** +* Objects to apply the Runtime_Sorts. +*/ +export class RuntimeSorts { + /** + * The column name to apply filter. + */ + 'column_name'?: string | null; + /** + * Order for the sort. + */ + 'order'?: RuntimeSortsOrderEnum | null; + /** + * Flag to persist the runtime sorts. Version: 9.12.0.cl or later + */ + 'persist'?: boolean | null; + /** + * Object to apply the runtime sort. + */ + 'objects'?: Array | null; + + static readonly discriminator: string | undefined = undefined; + + static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ + { + "name": "column_name", + "baseName": "column_name", + "type": "string", + "format": "" + }, + { + "name": "order", + "baseName": "order", + "type": "RuntimeSortsOrderEnum", + "format": "" + }, + { + "name": "persist", + "baseName": "persist", + "type": "boolean", + "format": "" + }, + { + "name": "objects", + "baseName": "objects", + "type": "Array", + "format": "" + } ]; + + static getAttributeTypeMap() { + return RuntimeSorts.attributeTypeMap; + } + + public constructor() { + } +} + + +export type RuntimeSortsOrderEnum = "ASC" | "DESC" ; + diff --git a/sdks/typescript/models/ScheduleHistoryRunsOptionsInput.ts b/sdks/typescript/models/ScheduleHistoryRunsOptionsInput.ts new file mode 100644 index 000000000..05ba08a6b --- /dev/null +++ b/sdks/typescript/models/ScheduleHistoryRunsOptionsInput.ts @@ -0,0 +1,58 @@ +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { HttpFile } from '../http/http'; + +export class ScheduleHistoryRunsOptionsInput { + /** + * Indicates whether to fetch history runs for the scheduled notification. + */ + 'include_history_runs'?: boolean | null; + /** + * Indicates the max number of records that can be fetched as past runs of any scheduled job. + */ + 'record_size'?: number | null; + /** + * Indicates the starting record number from where history runs records should be fetched. + */ + 'record_offset'?: number | null; + + static readonly discriminator: string | undefined = undefined; + + static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ + { + "name": "include_history_runs", + "baseName": "include_history_runs", + "type": "boolean", + "format": "" + }, + { + "name": "record_size", + "baseName": "record_size", + "type": "number", + "format": "int32" + }, + { + "name": "record_offset", + "baseName": "record_offset", + "type": "number", + "format": "int32" + } ]; + + static getAttributeTypeMap() { + return ScheduleHistoryRunsOptionsInput.attributeTypeMap; + } + + public constructor() { + } +} + diff --git a/sdks/typescript/models/SchedulesPdfOptionsInput.ts b/sdks/typescript/models/SchedulesPdfOptionsInput.ts new file mode 100644 index 000000000..6d9a09342 --- /dev/null +++ b/sdks/typescript/models/SchedulesPdfOptionsInput.ts @@ -0,0 +1,124 @@ +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { HttpFile } from '../http/http'; + +/** +* Options for PDF export. +*/ +export class SchedulesPdfOptionsInput { + /** + * Indicates whether to include complete Liveboard. + */ + 'complete_liveboard'?: boolean | null; + /** + * Indicates whether to include cover page with the Liveboard title. + */ + 'include_cover_page'?: boolean | null; + /** + * Indicates whether to include customized wide logo in the footer if available. + */ + 'include_custom_logo'?: boolean | null; + /** + * Indicates whether to include a page with all applied filters. + */ + 'include_filter_page'?: boolean | null; + /** + * Indicates whether to include page number in the footer of each page + */ + 'include_page_number'?: boolean | null; + /** + * Text to include in the footer of each page. + */ + 'page_footer_text'?: string | null; + /** + * Page orientation of the PDF. + */ + 'page_orientation'?: string | null; + /** + * Page size. + */ + 'page_size'?: SchedulesPdfOptionsInputPageSizeEnum | null; + /** + * Indicates whether to include only first page of the tables. + */ + 'truncate_table'?: boolean | null; + + static readonly discriminator: string | undefined = undefined; + + static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ + { + "name": "complete_liveboard", + "baseName": "complete_liveboard", + "type": "boolean", + "format": "" + }, + { + "name": "include_cover_page", + "baseName": "include_cover_page", + "type": "boolean", + "format": "" + }, + { + "name": "include_custom_logo", + "baseName": "include_custom_logo", + "type": "boolean", + "format": "" + }, + { + "name": "include_filter_page", + "baseName": "include_filter_page", + "type": "boolean", + "format": "" + }, + { + "name": "include_page_number", + "baseName": "include_page_number", + "type": "boolean", + "format": "" + }, + { + "name": "page_footer_text", + "baseName": "page_footer_text", + "type": "string", + "format": "" + }, + { + "name": "page_orientation", + "baseName": "page_orientation", + "type": "string", + "format": "" + }, + { + "name": "page_size", + "baseName": "page_size", + "type": "SchedulesPdfOptionsInputPageSizeEnum", + "format": "" + }, + { + "name": "truncate_table", + "baseName": "truncate_table", + "type": "boolean", + "format": "" + } ]; + + static getAttributeTypeMap() { + return SchedulesPdfOptionsInput.attributeTypeMap; + } + + public constructor() { + } +} + + +export type SchedulesPdfOptionsInputPageSizeEnum = "A4" | "TAB_BASED" ; + diff --git a/sdks/typescript/models/SchemaObject.ts b/sdks/typescript/models/SchemaObject.ts new file mode 100644 index 000000000..4eda8969d --- /dev/null +++ b/sdks/typescript/models/SchemaObject.ts @@ -0,0 +1,49 @@ +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { Table } from '../models/Table'; +import { HttpFile } from '../http/http'; + +export class SchemaObject { + /** + * Name of the schema. + */ + 'name': string; + /** + * Tables in the schema. + */ + 'tables'?: Array
| null; + + static readonly discriminator: string | undefined = undefined; + + static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ + { + "name": "name", + "baseName": "name", + "type": "string", + "format": "" + }, + { + "name": "tables", + "baseName": "tables", + "type": "Array
", + "format": "" + } ]; + + static getAttributeTypeMap() { + return SchemaObject.attributeTypeMap; + } + + public constructor() { + } +} + diff --git a/sdks/typescript/models/Scope.ts b/sdks/typescript/models/Scope.ts new file mode 100644 index 000000000..0a52b23b6 --- /dev/null +++ b/sdks/typescript/models/Scope.ts @@ -0,0 +1,58 @@ +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { HttpFile } from '../http/http'; + +export class Scope { + /** + * Object access scope type. + */ + 'access_type': string; + /** + * Unique identifier of the metadata. + */ + 'org_id'?: number | null; + /** + * Unique identifier of the Org. + */ + 'metadata_id'?: string | null; + + static readonly discriminator: string | undefined = undefined; + + static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ + { + "name": "access_type", + "baseName": "access_type", + "type": "string", + "format": "" + }, + { + "name": "org_id", + "baseName": "org_id", + "type": "number", + "format": "int32" + }, + { + "name": "metadata_id", + "baseName": "metadata_id", + "type": "string", + "format": "" + } ]; + + static getAttributeTypeMap() { + return Scope.attributeTypeMap; + } + + public constructor() { + } +} + diff --git a/sdks/typescript/models/ScriptSrcUrls.ts b/sdks/typescript/models/ScriptSrcUrls.ts new file mode 100644 index 000000000..ec954b504 --- /dev/null +++ b/sdks/typescript/models/ScriptSrcUrls.ts @@ -0,0 +1,51 @@ +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { HttpFile } from '../http/http'; + +/** +* Script-src CSP settings. +*/ +export class ScriptSrcUrls { + /** + * Whether script-src customization is enabled. + */ + 'enabled'?: boolean | null; + /** + * Allowed URLs for script-src directive. Can only be set if enabled is true. + */ + 'urls'?: Array | null; + + static readonly discriminator: string | undefined = undefined; + + static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ + { + "name": "enabled", + "baseName": "enabled", + "type": "boolean", + "format": "" + }, + { + "name": "urls", + "baseName": "urls", + "type": "Array", + "format": "" + } ]; + + static getAttributeTypeMap() { + return ScriptSrcUrls.attributeTypeMap; + } + + public constructor() { + } +} + diff --git a/sdks/typescript/models/ScriptSrcUrlsInput.ts b/sdks/typescript/models/ScriptSrcUrlsInput.ts new file mode 100644 index 000000000..3f5a0dc9b --- /dev/null +++ b/sdks/typescript/models/ScriptSrcUrlsInput.ts @@ -0,0 +1,51 @@ +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { HttpFile } from '../http/http'; + +/** +* Input for script-src CSP settings. +*/ +export class ScriptSrcUrlsInput { + /** + * Whether script-src customization is enabled. + */ + 'enabled'?: boolean | null; + /** + * Allowed URLs for script-src directive. Can only be set if enabled is true. + */ + 'urls'?: Array | null; + + static readonly discriminator: string | undefined = undefined; + + static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ + { + "name": "enabled", + "baseName": "enabled", + "type": "boolean", + "format": "" + }, + { + "name": "urls", + "baseName": "urls", + "type": "Array", + "format": "" + } ]; + + static getAttributeTypeMap() { + return ScriptSrcUrlsInput.attributeTypeMap; + } + + public constructor() { + } +} + diff --git a/sdks/typescript/models/SearchAuthSettingsRequest.ts b/sdks/typescript/models/SearchAuthSettingsRequest.ts new file mode 100644 index 000000000..5114dfec6 --- /dev/null +++ b/sdks/typescript/models/SearchAuthSettingsRequest.ts @@ -0,0 +1,52 @@ +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { HttpFile } from '../http/http'; + +export class SearchAuthSettingsRequest { + /** + * Type of authentication mechanism to retrieve settings for. Currently supports TRUSTED_AUTH. + */ + 'auth_type': SearchAuthSettingsRequestAuthTypeEnum; + /** + * Scope of auth settings to retrieve. When absent, both cluster and org settings are returned (subject to caller privileges). Set to CLUSTER to retrieve only cluster-level settings, or ORG to retrieve only org-level settings. + */ + 'scope'?: SearchAuthSettingsRequestScopeEnum; + + static readonly discriminator: string | undefined = undefined; + + static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ + { + "name": "auth_type", + "baseName": "auth_type", + "type": "SearchAuthSettingsRequestAuthTypeEnum", + "format": "" + }, + { + "name": "scope", + "baseName": "scope", + "type": "SearchAuthSettingsRequestScopeEnum", + "format": "" + } ]; + + static getAttributeTypeMap() { + return SearchAuthSettingsRequest.attributeTypeMap; + } + + public constructor() { + } +} + + +export type SearchAuthSettingsRequestAuthTypeEnum = "TRUSTED_AUTH" ; +export type SearchAuthSettingsRequestScopeEnum = "CLUSTER" | "ORG" ; + diff --git a/sdks/typescript/models/SearchAuthSettingsResponse.ts b/sdks/typescript/models/SearchAuthSettingsResponse.ts new file mode 100644 index 000000000..0b8346715 --- /dev/null +++ b/sdks/typescript/models/SearchAuthSettingsResponse.ts @@ -0,0 +1,63 @@ +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { AuthClusterPreferences } from '../models/AuthClusterPreferences'; +import { AuthOrgPreference } from '../models/AuthOrgPreference'; +import { HttpFile } from '../http/http'; + +/** +* Response for searchAuthSettings. Contains auth type and cluster/org-level preferences. +*/ +export class SearchAuthSettingsResponse { + /** + * Type of authentication mechanism returned. + */ + 'auth_type'?: SearchAuthSettingsResponseAuthTypeEnum | null; + 'cluster_preferences'?: AuthClusterPreferences; + /** + * Org-level authentication configurations. Present when org scope was requested and per-org auth feature is enabled. + */ + 'org_preferences'?: Array | null; + + static readonly discriminator: string | undefined = undefined; + + static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ + { + "name": "auth_type", + "baseName": "auth_type", + "type": "SearchAuthSettingsResponseAuthTypeEnum", + "format": "" + }, + { + "name": "cluster_preferences", + "baseName": "cluster_preferences", + "type": "AuthClusterPreferences", + "format": "" + }, + { + "name": "org_preferences", + "baseName": "org_preferences", + "type": "Array", + "format": "" + } ]; + + static getAttributeTypeMap() { + return SearchAuthSettingsResponse.attributeTypeMap; + } + + public constructor() { + } +} + + +export type SearchAuthSettingsResponseAuthTypeEnum = "TRUSTED_AUTH" ; + diff --git a/sdks/typescript/models/SearchCalendarsRequest.ts b/sdks/typescript/models/SearchCalendarsRequest.ts new file mode 100644 index 000000000..e57dfe970 --- /dev/null +++ b/sdks/typescript/models/SearchCalendarsRequest.ts @@ -0,0 +1,76 @@ +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { SearchCalendarsRequestSortOptions } from '../models/SearchCalendarsRequestSortOptions'; +import { HttpFile } from '../http/http'; + +export class SearchCalendarsRequest { + /** + * Unique ID or name of the connection. + */ + 'connection_identifier'?: string; + /** + * Pattern to match for calendar names (use \'%\' for wildcard match). + */ + 'name_pattern'?: string; + /** + * The starting record number from where the records should be included. + */ + 'record_offset'?: number; + /** + * The number of records that should be included. + */ + 'record_size'?: number; + 'sort_options'?: SearchCalendarsRequestSortOptions; + + static readonly discriminator: string | undefined = undefined; + + static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ + { + "name": "connection_identifier", + "baseName": "connection_identifier", + "type": "string", + "format": "" + }, + { + "name": "name_pattern", + "baseName": "name_pattern", + "type": "string", + "format": "" + }, + { + "name": "record_offset", + "baseName": "record_offset", + "type": "number", + "format": "int32" + }, + { + "name": "record_size", + "baseName": "record_size", + "type": "number", + "format": "int32" + }, + { + "name": "sort_options", + "baseName": "sort_options", + "type": "SearchCalendarsRequestSortOptions", + "format": "" + } ]; + + static getAttributeTypeMap() { + return SearchCalendarsRequest.attributeTypeMap; + } + + public constructor() { + } +} + diff --git a/sdks/typescript/models/SearchCalendarsRequestSortOptions.ts b/sdks/typescript/models/SearchCalendarsRequestSortOptions.ts new file mode 100644 index 000000000..d245ed88d --- /dev/null +++ b/sdks/typescript/models/SearchCalendarsRequestSortOptions.ts @@ -0,0 +1,55 @@ +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { HttpFile } from '../http/http'; + +/** +* Sort options. +*/ +export class SearchCalendarsRequestSortOptions { + /** + * Name of the field to apply the sort on. + */ + 'field_name'?: SearchCalendarsRequestSortOptionsFieldNameEnum | null; + /** + * Sort order : ASC(Ascending) or DESC(Descending). + */ + 'order'?: SearchCalendarsRequestSortOptionsOrderEnum | null; + + static readonly discriminator: string | undefined = undefined; + + static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ + { + "name": "field_name", + "baseName": "field_name", + "type": "SearchCalendarsRequestSortOptionsFieldNameEnum", + "format": "" + }, + { + "name": "order", + "baseName": "order", + "type": "SearchCalendarsRequestSortOptionsOrderEnum", + "format": "" + } ]; + + static getAttributeTypeMap() { + return SearchCalendarsRequestSortOptions.attributeTypeMap; + } + + public constructor() { + } +} + + +export type SearchCalendarsRequestSortOptionsFieldNameEnum = "DEFAULT" | "NAME" | "DISPLAY_NAME" | "AUTHOR" | "CREATED" | "MODIFIED" ; +export type SearchCalendarsRequestSortOptionsOrderEnum = "ASC" | "DESC" ; + diff --git a/sdks/typescript/models/SearchChannelHistoryRequest.ts b/sdks/typescript/models/SearchChannelHistoryRequest.ts new file mode 100644 index 000000000..8b8b12a51 --- /dev/null +++ b/sdks/typescript/models/SearchChannelHistoryRequest.ts @@ -0,0 +1,93 @@ +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { ChannelHistoryEventInput } from '../models/ChannelHistoryEventInput'; +import { HttpFile } from '../http/http'; + +export class SearchChannelHistoryRequest { + /** + * Type of communication channel to search history for. + */ + 'channel_type': SearchChannelHistoryRequestChannelTypeEnum; + /** + * List of job execution record IDs to retrieve. + */ + 'job_ids'?: Array; + /** + * List of channel IDs or names to filter by. + */ + 'channel_identifiers'?: Array; + /** + * Filter by channel delivery status. + */ + 'channel_status'?: SearchChannelHistoryRequestChannelStatusEnum; + /** + * Filter by events that triggered the channel. + */ + 'events'?: Array; + /** + * Filter records created on or after this time (epoch milliseconds). + */ + 'start_epoch_time_in_millis'?: number; + + static readonly discriminator: string | undefined = undefined; + + static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ + { + "name": "channel_type", + "baseName": "channel_type", + "type": "SearchChannelHistoryRequestChannelTypeEnum", + "format": "" + }, + { + "name": "job_ids", + "baseName": "job_ids", + "type": "Array", + "format": "" + }, + { + "name": "channel_identifiers", + "baseName": "channel_identifiers", + "type": "Array", + "format": "" + }, + { + "name": "channel_status", + "baseName": "channel_status", + "type": "SearchChannelHistoryRequestChannelStatusEnum", + "format": "" + }, + { + "name": "events", + "baseName": "events", + "type": "Array", + "format": "" + }, + { + "name": "start_epoch_time_in_millis", + "baseName": "start_epoch_time_in_millis", + "type": "number", + "format": "float" + } ]; + + static getAttributeTypeMap() { + return SearchChannelHistoryRequest.attributeTypeMap; + } + + public constructor() { + } +} + + +export type SearchChannelHistoryRequestChannelTypeEnum = "WEBHOOK" ; +export type SearchChannelHistoryRequestChannelStatusEnum = "PENDING" | "RETRY" | "SUCCESS" | "FAILED" ; + diff --git a/sdks/typescript/models/SearchChannelHistoryResponse.ts b/sdks/typescript/models/SearchChannelHistoryResponse.ts new file mode 100644 index 000000000..3fb562a07 --- /dev/null +++ b/sdks/typescript/models/SearchChannelHistoryResponse.ts @@ -0,0 +1,42 @@ +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { ChannelHistoryJob } from '../models/ChannelHistoryJob'; +import { HttpFile } from '../http/http'; + +/** +* Response wrapper for channel delivery history. +*/ +export class SearchChannelHistoryResponse { + /** + * List of job execution records. + */ + 'jobs': Array; + + static readonly discriminator: string | undefined = undefined; + + static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ + { + "name": "jobs", + "baseName": "jobs", + "type": "Array", + "format": "" + } ]; + + static getAttributeTypeMap() { + return SearchChannelHistoryResponse.attributeTypeMap; + } + + public constructor() { + } +} + diff --git a/sdks/typescript/models/SearchCollectionsRequest.ts b/sdks/typescript/models/SearchCollectionsRequest.ts new file mode 100644 index 000000000..217f49eee --- /dev/null +++ b/sdks/typescript/models/SearchCollectionsRequest.ts @@ -0,0 +1,96 @@ +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { SearchCollectionsRequestSortOptions } from '../models/SearchCollectionsRequestSortOptions'; +import { HttpFile } from '../http/http'; + +export class SearchCollectionsRequest { + /** + * A pattern to match case-insensitive name of the Collection object. Use \'%\' for wildcard match. + */ + 'name_pattern'?: string; + /** + * The starting record number from where the records should be included. + */ + 'record_offset'?: number; + /** + * The number of records that should be included. -1 implies no pagination. + */ + 'record_size'?: number; + /** + * Unique GUIDs of collections to search. Note: Collection names cannot be used as identifiers since duplicate names are allowed. + */ + 'collection_identifiers'?: Array; + /** + * Filter collections by author. Provide unique IDs or names of users who created the collections. + */ + 'created_by_user_identifiers'?: Array; + /** + * Include collection metadata items in the response. + */ + 'include_metadata'?: boolean | null; + 'sort_options'?: SearchCollectionsRequestSortOptions; + + static readonly discriminator: string | undefined = undefined; + + static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ + { + "name": "name_pattern", + "baseName": "name_pattern", + "type": "string", + "format": "" + }, + { + "name": "record_offset", + "baseName": "record_offset", + "type": "number", + "format": "int32" + }, + { + "name": "record_size", + "baseName": "record_size", + "type": "number", + "format": "int32" + }, + { + "name": "collection_identifiers", + "baseName": "collection_identifiers", + "type": "Array", + "format": "" + }, + { + "name": "created_by_user_identifiers", + "baseName": "created_by_user_identifiers", + "type": "Array", + "format": "" + }, + { + "name": "include_metadata", + "baseName": "include_metadata", + "type": "boolean", + "format": "" + }, + { + "name": "sort_options", + "baseName": "sort_options", + "type": "SearchCollectionsRequestSortOptions", + "format": "" + } ]; + + static getAttributeTypeMap() { + return SearchCollectionsRequest.attributeTypeMap; + } + + public constructor() { + } +} + diff --git a/sdks/typescript/models/SearchCollectionsRequestSortOptions.ts b/sdks/typescript/models/SearchCollectionsRequestSortOptions.ts new file mode 100644 index 000000000..6acc37a15 --- /dev/null +++ b/sdks/typescript/models/SearchCollectionsRequestSortOptions.ts @@ -0,0 +1,55 @@ +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { HttpFile } from '../http/http'; + +/** +* Sort options. +*/ +export class SearchCollectionsRequestSortOptions { + /** + * Name of the field to apply the sort on. + */ + 'field_name'?: SearchCollectionsRequestSortOptionsFieldNameEnum | null; + /** + * Sort order : ASC(Ascending) or DESC(Descending). + */ + 'order'?: SearchCollectionsRequestSortOptionsOrderEnum | null; + + static readonly discriminator: string | undefined = undefined; + + static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ + { + "name": "field_name", + "baseName": "field_name", + "type": "SearchCollectionsRequestSortOptionsFieldNameEnum", + "format": "" + }, + { + "name": "order", + "baseName": "order", + "type": "SearchCollectionsRequestSortOptionsOrderEnum", + "format": "" + } ]; + + static getAttributeTypeMap() { + return SearchCollectionsRequestSortOptions.attributeTypeMap; + } + + public constructor() { + } +} + + +export type SearchCollectionsRequestSortOptionsFieldNameEnum = "NAME" | "DISPLAY_NAME" | "AUTHOR" | "CREATED" | "MODIFIED" ; +export type SearchCollectionsRequestSortOptionsOrderEnum = "ASC" | "DESC" ; + diff --git a/sdks/typescript/models/SearchCommitsRequest.ts b/sdks/typescript/models/SearchCommitsRequest.ts new file mode 100644 index 000000000..2eaedf9df --- /dev/null +++ b/sdks/typescript/models/SearchCommitsRequest.ts @@ -0,0 +1,81 @@ +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { HttpFile } from '../http/http'; + +export class SearchCommitsRequest { + /** + * Unique ID or name of the metadata. + */ + 'metadata_identifier': string; + /** + * Type of metadata. + */ + 'metadata_type'?: SearchCommitsRequestMetadataTypeEnum; + /** + * Name of the branch from which commit history needs to be displayed. Note: If no branch_name is specified, then commits will be returned for the default branch for this configuration. + */ + 'branch_name'?: string; + /** + * Record offset point in the commit history to display the response. Note: If no record offset is specified, the beginning of the record will be considered. + */ + 'record_offset'?: number; + /** + * Number of history records from record offset point to be displayed in the response. Note: If no record size is specified, then all the records will be considered. + */ + 'record_size'?: number; + + static readonly discriminator: string | undefined = undefined; + + static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ + { + "name": "metadata_identifier", + "baseName": "metadata_identifier", + "type": "string", + "format": "" + }, + { + "name": "metadata_type", + "baseName": "metadata_type", + "type": "SearchCommitsRequestMetadataTypeEnum", + "format": "" + }, + { + "name": "branch_name", + "baseName": "branch_name", + "type": "string", + "format": "" + }, + { + "name": "record_offset", + "baseName": "record_offset", + "type": "number", + "format": "int32" + }, + { + "name": "record_size", + "baseName": "record_size", + "type": "number", + "format": "int32" + } ]; + + static getAttributeTypeMap() { + return SearchCommitsRequest.attributeTypeMap; + } + + public constructor() { + } +} + + +export type SearchCommitsRequestMetadataTypeEnum = "LIVEBOARD" | "ANSWER" | "LOGICAL_TABLE" | "CUSTOM_ACTION" ; + diff --git a/sdks/typescript/models/SearchCommunicationChannelPreferencesRequest.ts b/sdks/typescript/models/SearchCommunicationChannelPreferencesRequest.ts new file mode 100644 index 000000000..a8d8ce715 --- /dev/null +++ b/sdks/typescript/models/SearchCommunicationChannelPreferencesRequest.ts @@ -0,0 +1,52 @@ +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { OrgPreferenceSearchCriteriaInput } from '../models/OrgPreferenceSearchCriteriaInput'; +import { HttpFile } from '../http/http'; + +export class SearchCommunicationChannelPreferencesRequest { + /** + * Event types to search for in cluster-level preferences. + */ + 'cluster_preferences'?: Array; + /** + * Org-specific search criteria. + */ + 'org_preferences'?: Array; + + static readonly discriminator: string | undefined = undefined; + + static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ + { + "name": "cluster_preferences", + "baseName": "cluster_preferences", + "type": "Array", + "format": "" + }, + { + "name": "org_preferences", + "baseName": "org_preferences", + "type": "Array", + "format": "" + } ]; + + static getAttributeTypeMap() { + return SearchCommunicationChannelPreferencesRequest.attributeTypeMap; + } + + public constructor() { + } +} + + +export type SearchCommunicationChannelPreferencesRequestClusterPreferencesEnum = "LIVEBOARD_SCHEDULE" ; + diff --git a/sdks/typescript/models/SearchConfigRequest.ts b/sdks/typescript/models/SearchConfigRequest.ts new file mode 100644 index 000000000..6dc66f279 --- /dev/null +++ b/sdks/typescript/models/SearchConfigRequest.ts @@ -0,0 +1,38 @@ +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { HttpFile } from '../http/http'; + +export class SearchConfigRequest { + /** + * Applicable when Orgs is enabled in the cluster List of Org ids or name. Provide value -1 for cluster level. Example : [\"OrgID1-or-Name1\", \"OrgID2-or-Name2\"] Note: If no value is specified, then the configurations will be returned for all orgs the user has access to Version: 9.5.0.cl or later + */ + 'org_identifiers'?: Array; + + static readonly discriminator: string | undefined = undefined; + + static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ + { + "name": "org_identifiers", + "baseName": "org_identifiers", + "type": "Array", + "format": "" + } ]; + + static getAttributeTypeMap() { + return SearchConfigRequest.attributeTypeMap; + } + + public constructor() { + } +} + diff --git a/sdks/typescript/models/SearchConnectionRequest.ts b/sdks/typescript/models/SearchConnectionRequest.ts new file mode 100644 index 000000000..f9cfec32f --- /dev/null +++ b/sdks/typescript/models/SearchConnectionRequest.ts @@ -0,0 +1,142 @@ +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { ConnectionInput } from '../models/ConnectionInput'; +import { SearchConnectionRequestSortOptions } from '../models/SearchConnectionRequestSortOptions'; +import { HttpFile } from '../http/http'; + +export class SearchConnectionRequest { + /** + * List of connections and name pattern + */ + 'connections'?: Array; + /** + * Array of types of data warehouse defined for the connection. + */ + 'data_warehouse_types'?: Array; + /** + * The starting record number from where the records should be included. + */ + 'record_offset'?: number; + /** + * The number of records that should be included. + */ + 'record_size'?: number; + /** + * Unique ID or name of tags. + */ + 'tag_identifiers'?: Array; + /** + * Data warehouse object type. + */ + 'data_warehouse_object_type'?: SearchConnectionRequestDataWarehouseObjectTypeEnum; + 'sort_options'?: SearchConnectionRequestSortOptions; + /** + * Indicates whether to include complete details of the connection objects. + */ + 'include_details'?: boolean | null; + /** + * Configuration values. If empty we are fetching configuration from datasource based on given connection id. If required you can provide config details to fetch specific details. Example input: {}, {\"warehouse\":\"SMALL_WH\",\"database\":\"DEVELOPMENT\"}. This is only applicable when data_warehouse_object_type is selected. + */ + 'configuration'?: any; + /** + * List of authentication types to fetch data_ware_house_objects from external Data warehouse. This is only applicable when data_warehouse_object_type is selected. + */ + 'authentication_type'?: SearchConnectionRequestAuthenticationTypeEnum; + /** + *
Version: 10.9.0.cl or later
Indicates whether to show resolved parameterised values. + */ + 'show_resolved_parameters'?: boolean | null; + + static readonly discriminator: string | undefined = undefined; + + static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ + { + "name": "connections", + "baseName": "connections", + "type": "Array", + "format": "" + }, + { + "name": "data_warehouse_types", + "baseName": "data_warehouse_types", + "type": "Array", + "format": "" + }, + { + "name": "record_offset", + "baseName": "record_offset", + "type": "number", + "format": "int32" + }, + { + "name": "record_size", + "baseName": "record_size", + "type": "number", + "format": "int32" + }, + { + "name": "tag_identifiers", + "baseName": "tag_identifiers", + "type": "Array", + "format": "" + }, + { + "name": "data_warehouse_object_type", + "baseName": "data_warehouse_object_type", + "type": "SearchConnectionRequestDataWarehouseObjectTypeEnum", + "format": "" + }, + { + "name": "sort_options", + "baseName": "sort_options", + "type": "SearchConnectionRequestSortOptions", + "format": "" + }, + { + "name": "include_details", + "baseName": "include_details", + "type": "boolean", + "format": "" + }, + { + "name": "configuration", + "baseName": "configuration", + "type": "any", + "format": "" + }, + { + "name": "authentication_type", + "baseName": "authentication_type", + "type": "SearchConnectionRequestAuthenticationTypeEnum", + "format": "" + }, + { + "name": "show_resolved_parameters", + "baseName": "show_resolved_parameters", + "type": "boolean", + "format": "" + } ]; + + static getAttributeTypeMap() { + return SearchConnectionRequest.attributeTypeMap; + } + + public constructor() { + } +} + + +export type SearchConnectionRequestDataWarehouseTypesEnum = "SNOWFLAKE" | "AMAZON_REDSHIFT" | "GOOGLE_BIGQUERY" | "AZURE_SYNAPSE" | "TERADATA" | "SAP_HANA" | "STARBURST" | "ORACLE_ADW" | "DATABRICKS" | "DENODO" | "DREMIO" | "TRINO" | "PRESTO" | "POSTGRES" | "SQLSERVER" | "MYSQL" | "GENERIC_JDBC" | "AMAZON_RDS_POSTGRESQL" | "AMAZON_AURORA_POSTGRESQL" | "AMAZON_RDS_MYSQL" | "AMAZON_AURORA_MYSQL" | "LOOKER" | "AMAZON_ATHENA" | "SINGLESTORE" | "GCP_SQLSERVER" | "GCP_ALLOYDB_POSTGRESQL" | "GCP_POSTGRESQL" | "GCP_MYSQL" | "MODE" | "GOOGLE_SHEETS" | "FALCON" | "FALCON_ONPREM" | "CLICKHOUSE" | "IOMETE" ; +export type SearchConnectionRequestDataWarehouseObjectTypeEnum = "DATABASE" | "SCHEMA" | "TABLE" | "COLUMN" ; +export type SearchConnectionRequestAuthenticationTypeEnum = "SERVICE_ACCOUNT" | "OAUTH" | "IAM" | "EXTOAUTH" | "OAUTH_WITH_SERVICE_PRINCIPAL" | "PERSONAL_ACCESS_TOKEN" | "KEY_PAIR" | "OAUTH_WITH_PKCE" | "EXTOAUTH_WITH_PKCE" | "OAUTH_WITH_PEZ" | "OAUTH_CLIENT_CREDENTIALS" ; + diff --git a/sdks/typescript/models/SearchConnectionRequestSortOptions.ts b/sdks/typescript/models/SearchConnectionRequestSortOptions.ts new file mode 100644 index 000000000..36605dabf --- /dev/null +++ b/sdks/typescript/models/SearchConnectionRequestSortOptions.ts @@ -0,0 +1,55 @@ +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { HttpFile } from '../http/http'; + +/** +* Sort options. +*/ +export class SearchConnectionRequestSortOptions { + /** + * Name of the field to apply the sort on. + */ + 'field_name'?: SearchConnectionRequestSortOptionsFieldNameEnum | null; + /** + * Sort order : ASC(Ascending) or DESC(Descending). + */ + 'order'?: SearchConnectionRequestSortOptionsOrderEnum | null; + + static readonly discriminator: string | undefined = undefined; + + static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ + { + "name": "field_name", + "baseName": "field_name", + "type": "SearchConnectionRequestSortOptionsFieldNameEnum", + "format": "" + }, + { + "name": "order", + "baseName": "order", + "type": "SearchConnectionRequestSortOptionsOrderEnum", + "format": "" + } ]; + + static getAttributeTypeMap() { + return SearchConnectionRequestSortOptions.attributeTypeMap; + } + + public constructor() { + } +} + + +export type SearchConnectionRequestSortOptionsFieldNameEnum = "NAME" | "DISPLAY_NAME" | "AUTHOR" | "CREATED" | "MODIFIED" | "LAST_ACCESSED" | "SYNCED" | "VIEWS" | "USER_STATE" | "ROW_COUNT" ; +export type SearchConnectionRequestSortOptionsOrderEnum = "ASC" | "DESC" ; + diff --git a/sdks/typescript/models/SearchConnectionResponse.ts b/sdks/typescript/models/SearchConnectionResponse.ts new file mode 100644 index 000000000..23ee98506 --- /dev/null +++ b/sdks/typescript/models/SearchConnectionResponse.ts @@ -0,0 +1,89 @@ +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { DataWarehouseObjects } from '../models/DataWarehouseObjects'; +import { HttpFile } from '../http/http'; + +export class SearchConnectionResponse { + /** + * Unique ID of the connection. + */ + 'id': string; + /** + * Name of the connection. + */ + 'name': string; + /** + * Description of the connection. + */ + 'description'?: string | null; + /** + * Type of data warehouse. + */ + 'data_warehouse_type': SearchConnectionResponseDataWarehouseTypeEnum; + 'data_warehouse_objects'?: DataWarehouseObjects; + /** + * Details of the connection. + */ + 'details'?: any | null; + + static readonly discriminator: string | undefined = undefined; + + static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ + { + "name": "id", + "baseName": "id", + "type": "string", + "format": "" + }, + { + "name": "name", + "baseName": "name", + "type": "string", + "format": "" + }, + { + "name": "description", + "baseName": "description", + "type": "string", + "format": "" + }, + { + "name": "data_warehouse_type", + "baseName": "data_warehouse_type", + "type": "SearchConnectionResponseDataWarehouseTypeEnum", + "format": "" + }, + { + "name": "data_warehouse_objects", + "baseName": "data_warehouse_objects", + "type": "DataWarehouseObjects", + "format": "" + }, + { + "name": "details", + "baseName": "details", + "type": "any", + "format": "" + } ]; + + static getAttributeTypeMap() { + return SearchConnectionResponse.attributeTypeMap; + } + + public constructor() { + } +} + + +export type SearchConnectionResponseDataWarehouseTypeEnum = "SNOWFLAKE" | "AMAZON_REDSHIFT" | "GOOGLE_BIGQUERY" | "AZURE_SYNAPSE" | "TERADATA" | "SAP_HANA" | "STARBURST" | "ORACLE_ADW" | "DATABRICKS" | "DENODO" | "DREMIO" | "TRINO" | "PRESTO" | "POSTGRES" | "SQLSERVER" | "MYSQL" | "GENERIC_JDBC" | "AMAZON_RDS_POSTGRESQL" | "AMAZON_AURORA_POSTGRESQL" | "AMAZON_RDS_MYSQL" | "AMAZON_AURORA_MYSQL" | "LOOKER" | "AMAZON_ATHENA" | "SINGLESTORE" | "GCP_SQLSERVER" | "GCP_ALLOYDB_POSTGRESQL" | "GCP_POSTGRESQL" | "GCP_MYSQL" | "MODE" | "GOOGLE_SHEETS" | "FALCON" | "FALCON_ONPREM" | "CLICKHOUSE" | "IOMETE" ; + diff --git a/sdks/typescript/models/SearchCustomActionsRequest.ts b/sdks/typescript/models/SearchCustomActionsRequest.ts new file mode 100644 index 000000000..64b8660da --- /dev/null +++ b/sdks/typescript/models/SearchCustomActionsRequest.ts @@ -0,0 +1,100 @@ +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { CustomActionMetadataTypeInput } from '../models/CustomActionMetadataTypeInput'; +import { SearchCustomActionsRequestDefaultActionConfig } from '../models/SearchCustomActionsRequestDefaultActionConfig'; +import { HttpFile } from '../http/http'; + +export class SearchCustomActionsRequest { + /** + * Name or ID of the custom action. + */ + 'custom_action_identifier'?: string; + /** + * A pattern to match case-insensitive name of the custom-action object. + */ + 'name_pattern'?: string; + 'default_action_config'?: SearchCustomActionsRequestDefaultActionConfig; + /** + * When set to true, returns the associated groups for a custom action. + */ + 'include_group_associations'?: boolean | null; + /** + * When set to true, returns the associated metadata for a custom action. + */ + 'include_metadata_associations'?: boolean | null; + /** + * Search with a given metadata identifier. + */ + 'metadata'?: Array; + /** + * Filter the action objects based on type + */ + 'type'?: SearchCustomActionsRequestTypeEnum; + + static readonly discriminator: string | undefined = undefined; + + static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ + { + "name": "custom_action_identifier", + "baseName": "custom_action_identifier", + "type": "string", + "format": "" + }, + { + "name": "name_pattern", + "baseName": "name_pattern", + "type": "string", + "format": "" + }, + { + "name": "default_action_config", + "baseName": "default_action_config", + "type": "SearchCustomActionsRequestDefaultActionConfig", + "format": "" + }, + { + "name": "include_group_associations", + "baseName": "include_group_associations", + "type": "boolean", + "format": "" + }, + { + "name": "include_metadata_associations", + "baseName": "include_metadata_associations", + "type": "boolean", + "format": "" + }, + { + "name": "metadata", + "baseName": "metadata", + "type": "Array", + "format": "" + }, + { + "name": "type", + "baseName": "type", + "type": "SearchCustomActionsRequestTypeEnum", + "format": "" + } ]; + + static getAttributeTypeMap() { + return SearchCustomActionsRequest.attributeTypeMap; + } + + public constructor() { + } +} + + +export type SearchCustomActionsRequestTypeEnum = "CALLBACK" | "URL" ; + diff --git a/sdks/typescript/models/SearchCustomActionsRequestDefaultActionConfig.ts b/sdks/typescript/models/SearchCustomActionsRequestDefaultActionConfig.ts new file mode 100644 index 000000000..2f1362afa --- /dev/null +++ b/sdks/typescript/models/SearchCustomActionsRequestDefaultActionConfig.ts @@ -0,0 +1,41 @@ +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { HttpFile } from '../http/http'; + +/** +* Default Custom action configuration. This includes if the custom action is available on all visualizations. By default, a custom action is added to all visualizations and Answers. +*/ +export class SearchCustomActionsRequestDefaultActionConfig { + /** + * Custom action is available on all visualizations. Earlier naming convention: LOCAL/GLOBAL. TRUE signifies GLOBAL for backward compatibility. + */ + 'visibility'?: boolean | null; + + static readonly discriminator: string | undefined = undefined; + + static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ + { + "name": "visibility", + "baseName": "visibility", + "type": "boolean", + "format": "" + } ]; + + static getAttributeTypeMap() { + return SearchCustomActionsRequestDefaultActionConfig.attributeTypeMap; + } + + public constructor() { + } +} + diff --git a/sdks/typescript/models/SearchDataRequest.ts b/sdks/typescript/models/SearchDataRequest.ts new file mode 100644 index 000000000..166314ba9 --- /dev/null +++ b/sdks/typescript/models/SearchDataRequest.ts @@ -0,0 +1,111 @@ +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { HttpFile } from '../http/http'; + +export class SearchDataRequest { + /** + * Query string with search tokens. For example, [Sales][Region]. See [API Documentation](https://developers.thoughtspot.com/docs/fetch-data-and-report-apis#_search_data_api) + */ + 'query_string': string; + /** + * GUID of the data source object, such as a Worksheet, View, or Table. You can find the GUID of a data object from the UI or via API. See [API Documentation](https://developers.thoughtspot.com/docs/fetch-data-and-report-apis#_search_query) for more details. + */ + 'logical_table_identifier': string; + /** + * JSON output in compact or full format. The FULL option is available in 9.12.5.cl or later. + */ + 'data_format'?: SearchDataRequestDataFormatEnum; + /** + * The starting record number from where the records should be included. + */ + 'record_offset'?: number; + /** + * The number of records to include in a batch. + */ + 'record_size'?: number; + /** + * JSON object with representing filter condition to apply filters at runtime. For example, {\"col1\": \"item type\", \"op1\": \"EQ\", \"val1\": \"Bags\"} . You can add multiple keys by incrementing the number at the end, for example, col2, op2, val2, and col3, op3, val3. For more information, see [API Documentation](https://developers.thoughtspot.com/docs/fetch-data-and-report-apis#_runtime_filters). + */ + 'runtime_filter'?: any; + /** + * JSON object representing columns to sort data at runtime. For example, {\"sortCol1\": \"sales\", \"asc1\": true} . You can add multiple keys by incrementing the number at the end, for example, sortCol1, asc2. For more information, see [API Documentation](https://developers.thoughtspot.com/docs/fetch-data-and-report-apis#_runtime_sort). + */ + 'runtime_sort'?: any; + /** + * JSON object for setting values of parameters at runtime. For example, {\"param1\": \"Double List Param\", \"paramVal1\": 0.5}. You can add multiple keys by incrementing the number at the end, for example, param2, paramVal2. For more information, see [API Documentation](https://developers.thoughtspot.com/docs/fetch-data-and-report-apis#_runtime_parameters). + */ + 'runtime_param_override'?: any; + + static readonly discriminator: string | undefined = undefined; + + static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ + { + "name": "query_string", + "baseName": "query_string", + "type": "string", + "format": "" + }, + { + "name": "logical_table_identifier", + "baseName": "logical_table_identifier", + "type": "string", + "format": "" + }, + { + "name": "data_format", + "baseName": "data_format", + "type": "SearchDataRequestDataFormatEnum", + "format": "" + }, + { + "name": "record_offset", + "baseName": "record_offset", + "type": "number", + "format": "int32" + }, + { + "name": "record_size", + "baseName": "record_size", + "type": "number", + "format": "int32" + }, + { + "name": "runtime_filter", + "baseName": "runtime_filter", + "type": "any", + "format": "" + }, + { + "name": "runtime_sort", + "baseName": "runtime_sort", + "type": "any", + "format": "" + }, + { + "name": "runtime_param_override", + "baseName": "runtime_param_override", + "type": "any", + "format": "" + } ]; + + static getAttributeTypeMap() { + return SearchDataRequest.attributeTypeMap; + } + + public constructor() { + } +} + + +export type SearchDataRequestDataFormatEnum = "FULL" | "COMPACT" ; + diff --git a/sdks/typescript/models/SearchDataResponse.ts b/sdks/typescript/models/SearchDataResponse.ts new file mode 100644 index 000000000..0b0013b1c --- /dev/null +++ b/sdks/typescript/models/SearchDataResponse.ts @@ -0,0 +1,42 @@ +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { AnswerContent } from '../models/AnswerContent'; +import { HttpFile } from '../http/http'; + +/** +* Response format associated with the search data API. +*/ +export class SearchDataResponse { + /** + * Data content of metadata objects + */ + 'contents': Array; + + static readonly discriminator: string | undefined = undefined; + + static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ + { + "name": "contents", + "baseName": "contents", + "type": "Array", + "format": "" + } ]; + + static getAttributeTypeMap() { + return SearchDataResponse.attributeTypeMap; + } + + public constructor() { + } +} + diff --git a/sdks/typescript/models/SearchEmailCustomizationRequest.ts b/sdks/typescript/models/SearchEmailCustomizationRequest.ts new file mode 100644 index 000000000..7b09fbe77 --- /dev/null +++ b/sdks/typescript/models/SearchEmailCustomizationRequest.ts @@ -0,0 +1,38 @@ +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { HttpFile } from '../http/http'; + +export class SearchEmailCustomizationRequest { + /** + * Unique ID or name of org Version: 10.12.0.cl or later + */ + 'org_identifiers'?: Array; + + static readonly discriminator: string | undefined = undefined; + + static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ + { + "name": "org_identifiers", + "baseName": "org_identifiers", + "type": "Array", + "format": "" + } ]; + + static getAttributeTypeMap() { + return SearchEmailCustomizationRequest.attributeTypeMap; + } + + public constructor() { + } +} + diff --git a/sdks/typescript/models/SearchMetadataRequest.ts b/sdks/typescript/models/SearchMetadataRequest.ts new file mode 100644 index 000000000..0b980bbb6 --- /dev/null +++ b/sdks/typescript/models/SearchMetadataRequest.ts @@ -0,0 +1,291 @@ +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { ExcludeMetadataListItemInput } from '../models/ExcludeMetadataListItemInput'; +import { MetadataListItemInput } from '../models/MetadataListItemInput'; +import { PermissionInput } from '../models/PermissionInput'; +import { SearchMetadataRequestFavoriteObjectOptions } from '../models/SearchMetadataRequestFavoriteObjectOptions'; +import { SearchMetadataRequestSortOptions } from '../models/SearchMetadataRequestSortOptions'; +import { HttpFile } from '../http/http'; + +export class SearchMetadataRequest { + /** + * Metadata objects such as Liveboards, Answers, and Worksheets. + */ + 'metadata'?: Array; + /** + * Object permission details to search by. + */ + 'permissions'?: Array; + /** + * GUID or name of user who created the metadata object. + */ + 'created_by_user_identifiers'?: Array; + /** + * Version of the dependent table of the metadata objects like Worksheets. + */ + 'dependent_object_version'?: SearchMetadataRequestDependentObjectVersionEnum; + /** + * List of metadata objects to exclude from search. + */ + 'exclude_objects'?: Array; + 'favorite_object_options'?: SearchMetadataRequestFavoriteObjectOptions; + /** + * Includes system-generated metadata objects. + */ + 'include_auto_created_objects'?: boolean | null; + /** + * Includes dependents of the metadata object specified in the API request. For example, a worksheet can consist of dependent objects such as Liveboards or Answers. + */ + 'include_dependent_objects'?: boolean | null; + /** + * The maximum number of dependents to include per metadata object. + */ + 'dependent_objects_record_size'?: number; + /** + * Includes complete details of the metadata objects. + */ + 'include_details'?: boolean | null; + /** + * When set to true and include_details is also true, includes personalised views in the metadata_detail for LIVEBOARD objects. + */ + 'include_personalised_views'?: boolean | null; + /** + * Includes headers of the metadata objects. + */ + 'include_headers'?: boolean | null; + /** + * Includes details of the hidden objects, such as a column in a worksheet or a table. + */ + 'include_hidden_objects'?: boolean | null; + /** + * Includes objects with incomplete metadata. + */ + 'include_incomplete_objects'?: boolean | null; + /** + * Includes visualization headers of the specified Liveboard object. + */ + 'include_visualization_headers'?: boolean | null; + /** + * If search assistance lessons are configured on a worksheet, the API returns the search assist data for Worksheet objects. + */ + 'include_worksheet_search_assist_data'?: boolean | null; + /** + * Includes ID or names of the users who modified the metadata object. + */ + 'modified_by_user_identifiers'?: Array; + /** + * The starting record number from where the records should be included. + */ + 'record_offset'?: number; + /** + * The number of records that should be included. It is recommended to use a smaller `record_size` when fetching dependent objects or any of the additional metadata detail options. + */ + 'record_size'?: number; + 'sort_options'?: SearchMetadataRequestSortOptions; + /** + * Tags to filter metadata objects by + */ + 'tag_identifiers'?: Array; + /** + * Indicates whether to include stats of the metadata objects. + */ + 'include_stats'?: boolean | null; + /** + *
Version: 10.7.0.cl or later
Boolean to indicate whether to include discoverable metadata objects. + */ + 'include_discoverable_objects'?: boolean | null; + /** + *
Version: 10.9.0.cl or later
Indicates whether to show resolved parameterised values. + */ + 'show_resolved_parameters'?: boolean | null; + /** + * Indicates the model version of Liveboard to be attached in metadata detail. + */ + 'liveboard_response_version'?: SearchMetadataRequestLiveboardResponseVersionEnum; + /** + *
Version: 10.11.0.cl or later
If only published objects should be returned + */ + 'include_only_published_objects'?: boolean | null; + + static readonly discriminator: string | undefined = undefined; + + static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ + { + "name": "metadata", + "baseName": "metadata", + "type": "Array", + "format": "" + }, + { + "name": "permissions", + "baseName": "permissions", + "type": "Array", + "format": "" + }, + { + "name": "created_by_user_identifiers", + "baseName": "created_by_user_identifiers", + "type": "Array", + "format": "" + }, + { + "name": "dependent_object_version", + "baseName": "dependent_object_version", + "type": "SearchMetadataRequestDependentObjectVersionEnum", + "format": "" + }, + { + "name": "exclude_objects", + "baseName": "exclude_objects", + "type": "Array", + "format": "" + }, + { + "name": "favorite_object_options", + "baseName": "favorite_object_options", + "type": "SearchMetadataRequestFavoriteObjectOptions", + "format": "" + }, + { + "name": "include_auto_created_objects", + "baseName": "include_auto_created_objects", + "type": "boolean", + "format": "" + }, + { + "name": "include_dependent_objects", + "baseName": "include_dependent_objects", + "type": "boolean", + "format": "" + }, + { + "name": "dependent_objects_record_size", + "baseName": "dependent_objects_record_size", + "type": "number", + "format": "int32" + }, + { + "name": "include_details", + "baseName": "include_details", + "type": "boolean", + "format": "" + }, + { + "name": "include_personalised_views", + "baseName": "include_personalised_views", + "type": "boolean", + "format": "" + }, + { + "name": "include_headers", + "baseName": "include_headers", + "type": "boolean", + "format": "" + }, + { + "name": "include_hidden_objects", + "baseName": "include_hidden_objects", + "type": "boolean", + "format": "" + }, + { + "name": "include_incomplete_objects", + "baseName": "include_incomplete_objects", + "type": "boolean", + "format": "" + }, + { + "name": "include_visualization_headers", + "baseName": "include_visualization_headers", + "type": "boolean", + "format": "" + }, + { + "name": "include_worksheet_search_assist_data", + "baseName": "include_worksheet_search_assist_data", + "type": "boolean", + "format": "" + }, + { + "name": "modified_by_user_identifiers", + "baseName": "modified_by_user_identifiers", + "type": "Array", + "format": "" + }, + { + "name": "record_offset", + "baseName": "record_offset", + "type": "number", + "format": "int32" + }, + { + "name": "record_size", + "baseName": "record_size", + "type": "number", + "format": "int32" + }, + { + "name": "sort_options", + "baseName": "sort_options", + "type": "SearchMetadataRequestSortOptions", + "format": "" + }, + { + "name": "tag_identifiers", + "baseName": "tag_identifiers", + "type": "Array", + "format": "" + }, + { + "name": "include_stats", + "baseName": "include_stats", + "type": "boolean", + "format": "" + }, + { + "name": "include_discoverable_objects", + "baseName": "include_discoverable_objects", + "type": "boolean", + "format": "" + }, + { + "name": "show_resolved_parameters", + "baseName": "show_resolved_parameters", + "type": "boolean", + "format": "" + }, + { + "name": "liveboard_response_version", + "baseName": "liveboard_response_version", + "type": "SearchMetadataRequestLiveboardResponseVersionEnum", + "format": "" + }, + { + "name": "include_only_published_objects", + "baseName": "include_only_published_objects", + "type": "boolean", + "format": "" + } ]; + + static getAttributeTypeMap() { + return SearchMetadataRequest.attributeTypeMap; + } + + public constructor() { + } +} + + +export type SearchMetadataRequestDependentObjectVersionEnum = "V1" | "V2" ; +export type SearchMetadataRequestLiveboardResponseVersionEnum = "V1" | "V2" ; + diff --git a/sdks/typescript/models/SearchMetadataRequestFavoriteObjectOptions.ts b/sdks/typescript/models/SearchMetadataRequestFavoriteObjectOptions.ts new file mode 100644 index 000000000..3e0c5556c --- /dev/null +++ b/sdks/typescript/models/SearchMetadataRequestFavoriteObjectOptions.ts @@ -0,0 +1,51 @@ +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { HttpFile } from '../http/http'; + +/** +* Options to sort the API response by objects set as favorites for the logged-in user or the users specified in the API request. +*/ +export class SearchMetadataRequestFavoriteObjectOptions { + /** + * Includes objects marked as favorite for the specified users. + */ + 'include'?: boolean | null; + /** + * Unique ID or name of the users. If not specified, the favorite objects of current logged in user are returned. + */ + 'user_identifiers'?: Array | null; + + static readonly discriminator: string | undefined = undefined; + + static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ + { + "name": "include", + "baseName": "include", + "type": "boolean", + "format": "" + }, + { + "name": "user_identifiers", + "baseName": "user_identifiers", + "type": "Array", + "format": "" + } ]; + + static getAttributeTypeMap() { + return SearchMetadataRequestFavoriteObjectOptions.attributeTypeMap; + } + + public constructor() { + } +} + diff --git a/sdks/typescript/models/SearchMetadataRequestSortOptions.ts b/sdks/typescript/models/SearchMetadataRequestSortOptions.ts new file mode 100644 index 000000000..cf68e585b --- /dev/null +++ b/sdks/typescript/models/SearchMetadataRequestSortOptions.ts @@ -0,0 +1,55 @@ +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { HttpFile } from '../http/http'; + +/** +* Sort options to filter metadata details. +*/ +export class SearchMetadataRequestSortOptions { + /** + * Name of the field to apply the sort on. + */ + 'field_name'?: SearchMetadataRequestSortOptionsFieldNameEnum | null; + /** + * Sort order : ASC(Ascending) or DESC(Descending). + */ + 'order'?: SearchMetadataRequestSortOptionsOrderEnum | null; + + static readonly discriminator: string | undefined = undefined; + + static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ + { + "name": "field_name", + "baseName": "field_name", + "type": "SearchMetadataRequestSortOptionsFieldNameEnum", + "format": "" + }, + { + "name": "order", + "baseName": "order", + "type": "SearchMetadataRequestSortOptionsOrderEnum", + "format": "" + } ]; + + static getAttributeTypeMap() { + return SearchMetadataRequestSortOptions.attributeTypeMap; + } + + public constructor() { + } +} + + +export type SearchMetadataRequestSortOptionsFieldNameEnum = "NAME" | "DISPLAY_NAME" | "AUTHOR" | "CREATED" | "MODIFIED" | "VIEWS" | "FAVORITES" | "LAST_ACCESSED" ; +export type SearchMetadataRequestSortOptionsOrderEnum = "ASC" | "DESC" ; + diff --git a/sdks/typescript/models/SearchOrgsRequest.ts b/sdks/typescript/models/SearchOrgsRequest.ts new file mode 100644 index 000000000..f29bff373 --- /dev/null +++ b/sdks/typescript/models/SearchOrgsRequest.ts @@ -0,0 +1,82 @@ +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { HttpFile } from '../http/http'; + +export class SearchOrgsRequest { + /** + * ID or name of the Org + */ + 'org_identifier'?: string; + /** + * Description of the Org + */ + 'description'?: string; + /** + * Visibility of the Org + */ + 'visibility'?: SearchOrgsRequestVisibilityEnum; + /** + * Status of the Org + */ + 'status'?: SearchOrgsRequestStatusEnum; + /** + * GUIDs or names of the users for which you want to retrieve the Orgs data + */ + 'user_identifiers'?: Array; + + static readonly discriminator: string | undefined = undefined; + + static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ + { + "name": "org_identifier", + "baseName": "org_identifier", + "type": "string", + "format": "" + }, + { + "name": "description", + "baseName": "description", + "type": "string", + "format": "" + }, + { + "name": "visibility", + "baseName": "visibility", + "type": "SearchOrgsRequestVisibilityEnum", + "format": "" + }, + { + "name": "status", + "baseName": "status", + "type": "SearchOrgsRequestStatusEnum", + "format": "" + }, + { + "name": "user_identifiers", + "baseName": "user_identifiers", + "type": "Array", + "format": "" + } ]; + + static getAttributeTypeMap() { + return SearchOrgsRequest.attributeTypeMap; + } + + public constructor() { + } +} + + +export type SearchOrgsRequestVisibilityEnum = "SHOW" | "HIDDEN" ; +export type SearchOrgsRequestStatusEnum = "ACTIVE" | "IN_ACTIVE" ; + diff --git a/sdks/typescript/models/SearchRoleResponse.ts b/sdks/typescript/models/SearchRoleResponse.ts new file mode 100644 index 000000000..887d059fa --- /dev/null +++ b/sdks/typescript/models/SearchRoleResponse.ts @@ -0,0 +1,206 @@ +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { GenericInfo } from '../models/GenericInfo'; +import { HttpFile } from '../http/http'; + +/** +* Response for search role api should handle hidden privileges as well. +*/ +export class SearchRoleResponse { + /** + * Unique Id of the role. + */ + 'id': string; + /** + * Name of the role + */ + 'name': string; + /** + * Description of the role + */ + 'description': string; + /** + * number of groups assigned with this role + */ + 'groups_assigned_count'?: number | null; + /** + * Orgs in which role exists. + */ + 'orgs'?: Array | null; + /** + * Details of groups assigned with this role + */ + 'groups'?: Array | null; + /** + * Privileges granted to the role. + */ + 'privileges': Array; + /** + * Permission details of the Role + */ + 'permission'?: SearchRoleResponsePermissionEnum | null; + /** + * Unique identifier of author of the role. + */ + 'author_id'?: string | null; + /** + * Unique identifier of modifier of the role. + */ + 'modifier_id'?: string | null; + /** + * Creation time of the role in milliseconds. + */ + 'creation_time_in_millis'?: any | null; + /** + * Last modified time of the role in milliseconds. + */ + 'modification_time_in_millis'?: any | null; + /** + * Indicates whether the role is deleted. + */ + 'deleted'?: boolean | null; + /** + * Indicates whether the role is deprecated. + */ + 'deprecated'?: boolean | null; + /** + * Indicates whether the role is external. + */ + 'external'?: boolean | null; + /** + * Indicates whether the role is hidden. + */ + 'hidden'?: boolean | null; + /** + * Indicates whether the role is shared via connection + */ + 'shared_via_connection'?: boolean | null; + + static readonly discriminator: string | undefined = undefined; + + static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ + { + "name": "id", + "baseName": "id", + "type": "string", + "format": "" + }, + { + "name": "name", + "baseName": "name", + "type": "string", + "format": "" + }, + { + "name": "description", + "baseName": "description", + "type": "string", + "format": "" + }, + { + "name": "groups_assigned_count", + "baseName": "groups_assigned_count", + "type": "number", + "format": "int32" + }, + { + "name": "orgs", + "baseName": "orgs", + "type": "Array", + "format": "" + }, + { + "name": "groups", + "baseName": "groups", + "type": "Array", + "format": "" + }, + { + "name": "privileges", + "baseName": "privileges", + "type": "Array", + "format": "" + }, + { + "name": "permission", + "baseName": "permission", + "type": "SearchRoleResponsePermissionEnum", + "format": "" + }, + { + "name": "author_id", + "baseName": "author_id", + "type": "string", + "format": "" + }, + { + "name": "modifier_id", + "baseName": "modifier_id", + "type": "string", + "format": "" + }, + { + "name": "creation_time_in_millis", + "baseName": "creation_time_in_millis", + "type": "any", + "format": "" + }, + { + "name": "modification_time_in_millis", + "baseName": "modification_time_in_millis", + "type": "any", + "format": "" + }, + { + "name": "deleted", + "baseName": "deleted", + "type": "boolean", + "format": "" + }, + { + "name": "deprecated", + "baseName": "deprecated", + "type": "boolean", + "format": "" + }, + { + "name": "external", + "baseName": "external", + "type": "boolean", + "format": "" + }, + { + "name": "hidden", + "baseName": "hidden", + "type": "boolean", + "format": "" + }, + { + "name": "shared_via_connection", + "baseName": "shared_via_connection", + "type": "boolean", + "format": "" + } ]; + + static getAttributeTypeMap() { + return SearchRoleResponse.attributeTypeMap; + } + + public constructor() { + } +} + + +export type SearchRoleResponsePrivilegesEnum = "UNKNOWN" | "ADMINISTRATION" | "AUTHORING" | "USERDATAUPLOADING" | "DATADOWNLOADING" | "USERMANAGEMENT" | "SECURITYMANAGEMENT" | "LOGICALMODELING" | "DATAMANAGEMENT" | "TAGMANAGEMENT" | "SHAREWITHALL" | "SYSTEMMANAGEMENT" | "JOBSCHEDULING" | "A3ANALYSIS" | "EXPERIMENTALFEATUREPRIVILEGE" | "BYPASSRLS" | "RANALYSIS" | "DISABLE_PINBOARD_CREATION" | "DEVELOPER" | "APPLICATION_ADMINISTRATION" | "USER_ADMINISTRATION" | "GROUP_ADMINISTRATION" | "BACKUP_ADMINISTRATION" | "SYSTEM_INFO_ADMINISTRATION" | "ENABLESPOTAPPCREATION" | "SYNCMANAGEMENT" | "ORG_ADMINISTRATION" | "ROLE_ADMINISTRATION" | "AUTHENTICATION_ADMINISTRATION" | "BILLING_INFO_ADMINISTRATION" | "PREVIEW_THOUGHTSPOT_SAGE" | "LIVEBOARD_VERIFIER" | "CAN_MANAGE_CUSTOM_CALENDAR" | "CAN_CREATE_OR_EDIT_CONNECTIONS" | "CAN_CONFIGURE_CONNECTIONS" | "CAN_MANAGE_WORKSHEET_VIEWS_TABLES" | "CAN_MANAGE_VERSION_CONTROL" | "THIRDPARTY_ANALYSIS" | "CONTROL_TRUSTED_AUTH" | "CAN_CREATE_CATALOG" | "ALLOW_NON_EMBED_FULL_APP_ACCESS" | "CAN_ACCESS_ANALYST_STUDIO" | "CAN_MANAGE_ANALYST_STUDIO" | "CAN_VIEW_FOLDERS" | "CAN_MODIDY_FOLDERS" | "CAN_MANAGE_VARIABLES" | "CAN_MANAGE_AGENTSPOT" | "CAN_ACCESS_AGENTSPOT" | "PREVIEW_DOCUMENT_SEARCH" | "CAN_SETUP_VERSION_CONTROL" | "CAN_MANAGE_WEBHOOKS" | "CAN_DOWNLOAD_VISUALS" | "CAN_DOWNLOAD_DETAILED_DATA" | "CAN_USE_SPOTTER" ; +export type SearchRoleResponsePermissionEnum = "READ_ONLY" | "MODIFY" | "NO_ACCESS" ; + diff --git a/sdks/typescript/models/SearchRolesRequest.ts b/sdks/typescript/models/SearchRolesRequest.ts new file mode 100644 index 000000000..b5db4bd12 --- /dev/null +++ b/sdks/typescript/models/SearchRolesRequest.ts @@ -0,0 +1,112 @@ +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { HttpFile } from '../http/http'; + +export class SearchRolesRequest { + /** + * unique ID or name of the Roles + */ + 'role_identifiers'?: Array; + /** + * Unique Id or name of the Organisation + */ + 'org_identifiers'?: Array; + /** + * Unique Id or name of the User Group + */ + 'group_identifiers'?: Array; + /** + * Privileges assigned to the Role. See [Documentation](https://developers.thoughtspot.com/docs/rbac#_role_categories_and_privileges)for supported roles privileges. + */ + 'privileges'?: Array; + /** + * Indicates whether the Role is deprecated. + */ + 'deprecated'?: boolean | null; + /** + * Indicates whether the Role is external + */ + 'external'?: boolean | null; + /** + * Indicates whether the Role is shared via connection + */ + 'shared_via_connection'?: boolean | null; + /** + * Permission details of the Role + */ + 'permissions'?: Array; + + static readonly discriminator: string | undefined = undefined; + + static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ + { + "name": "role_identifiers", + "baseName": "role_identifiers", + "type": "Array", + "format": "" + }, + { + "name": "org_identifiers", + "baseName": "org_identifiers", + "type": "Array", + "format": "" + }, + { + "name": "group_identifiers", + "baseName": "group_identifiers", + "type": "Array", + "format": "" + }, + { + "name": "privileges", + "baseName": "privileges", + "type": "Array", + "format": "" + }, + { + "name": "deprecated", + "baseName": "deprecated", + "type": "boolean", + "format": "" + }, + { + "name": "external", + "baseName": "external", + "type": "boolean", + "format": "" + }, + { + "name": "shared_via_connection", + "baseName": "shared_via_connection", + "type": "boolean", + "format": "" + }, + { + "name": "permissions", + "baseName": "permissions", + "type": "Array", + "format": "" + } ]; + + static getAttributeTypeMap() { + return SearchRolesRequest.attributeTypeMap; + } + + public constructor() { + } +} + + +export type SearchRolesRequestPrivilegesEnum = "UNKNOWN" | "ADMINISTRATION" | "AUTHORING" | "USERDATAUPLOADING" | "DATADOWNLOADING" | "USERMANAGEMENT" | "SECURITYMANAGEMENT" | "LOGICALMODELING" | "DATAMANAGEMENT" | "TAGMANAGEMENT" | "SHAREWITHALL" | "SYSTEMMANAGEMENT" | "JOBSCHEDULING" | "A3ANALYSIS" | "EXPERIMENTALFEATUREPRIVILEGE" | "BYPASSRLS" | "RANALYSIS" | "DISABLE_PINBOARD_CREATION" | "DEVELOPER" | "APPLICATION_ADMINISTRATION" | "USER_ADMINISTRATION" | "GROUP_ADMINISTRATION" | "BACKUP_ADMINISTRATION" | "SYSTEM_INFO_ADMINISTRATION" | "ENABLESPOTAPPCREATION" | "SYNCMANAGEMENT" | "ORG_ADMINISTRATION" | "ROLE_ADMINISTRATION" | "AUTHENTICATION_ADMINISTRATION" | "BILLING_INFO_ADMINISTRATION" | "PREVIEW_THOUGHTSPOT_SAGE" | "LIVEBOARD_VERIFIER" | "CAN_MANAGE_CUSTOM_CALENDAR" | "CAN_CREATE_OR_EDIT_CONNECTIONS" | "CAN_CONFIGURE_CONNECTIONS" | "CAN_MANAGE_WORKSHEET_VIEWS_TABLES" | "CAN_MANAGE_VERSION_CONTROL" | "THIRDPARTY_ANALYSIS" | "CONTROL_TRUSTED_AUTH" | "CAN_CREATE_CATALOG" | "ALLOW_NON_EMBED_FULL_APP_ACCESS" | "CAN_ACCESS_ANALYST_STUDIO" | "CAN_MANAGE_ANALYST_STUDIO" | "CAN_VIEW_FOLDERS" | "CAN_MODIDY_FOLDERS" | "CAN_MANAGE_VARIABLES" | "CAN_MANAGE_AGENTSPOT" | "CAN_ACCESS_AGENTSPOT" | "PREVIEW_DOCUMENT_SEARCH" | "CAN_SETUP_VERSION_CONTROL" | "CAN_MANAGE_WEBHOOKS" | "CAN_DOWNLOAD_VISUALS" | "CAN_DOWNLOAD_DETAILED_DATA" | "CAN_USE_SPOTTER" ; +export type SearchRolesRequestPermissionsEnum = "READ_ONLY" | "MODIFY" | "NO_ACCESS" ; + diff --git a/sdks/typescript/models/SearchSchedulesRequest.ts b/sdks/typescript/models/SearchSchedulesRequest.ts new file mode 100644 index 000000000..c79dd9ee8 --- /dev/null +++ b/sdks/typescript/models/SearchSchedulesRequest.ts @@ -0,0 +1,85 @@ +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { MetadataInput } from '../models/MetadataInput'; +import { SearchSchedulesRequestHistoryRunsOptions } from '../models/SearchSchedulesRequestHistoryRunsOptions'; +import { SearchSchedulesRequestSortOptions } from '../models/SearchSchedulesRequestSortOptions'; +import { HttpFile } from '../http/http'; + +export class SearchSchedulesRequest { + /** + * Metadata objects associated with the scheduled jobs. + */ + 'metadata'?: Array; + /** + * The starting record number from where the records should be included. + */ + 'record_offset'?: number; + /** + * The number of records that should be included. + */ + 'record_size'?: number; + 'sort_options'?: SearchSchedulesRequestSortOptions; + 'history_runs_options'?: SearchSchedulesRequestHistoryRunsOptions; + /** + * unique ID or name of the Schedule + */ + 'schedule_identifiers'?: Array; + + static readonly discriminator: string | undefined = undefined; + + static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ + { + "name": "metadata", + "baseName": "metadata", + "type": "Array", + "format": "" + }, + { + "name": "record_offset", + "baseName": "record_offset", + "type": "number", + "format": "int32" + }, + { + "name": "record_size", + "baseName": "record_size", + "type": "number", + "format": "int32" + }, + { + "name": "sort_options", + "baseName": "sort_options", + "type": "SearchSchedulesRequestSortOptions", + "format": "" + }, + { + "name": "history_runs_options", + "baseName": "history_runs_options", + "type": "SearchSchedulesRequestHistoryRunsOptions", + "format": "" + }, + { + "name": "schedule_identifiers", + "baseName": "schedule_identifiers", + "type": "Array", + "format": "" + } ]; + + static getAttributeTypeMap() { + return SearchSchedulesRequest.attributeTypeMap; + } + + public constructor() { + } +} + diff --git a/sdks/typescript/models/SearchSchedulesRequestHistoryRunsOptions.ts b/sdks/typescript/models/SearchSchedulesRequestHistoryRunsOptions.ts new file mode 100644 index 000000000..88069f5b1 --- /dev/null +++ b/sdks/typescript/models/SearchSchedulesRequestHistoryRunsOptions.ts @@ -0,0 +1,61 @@ +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { HttpFile } from '../http/http'; + +/** +* Options while fetching history runs for the schedule. +*/ +export class SearchSchedulesRequestHistoryRunsOptions { + /** + * Indicates whether to fetch history runs for the scheduled notification. + */ + 'include_history_runs'?: boolean | null; + /** + * Indicates the max number of records that can be fetched as past runs of any scheduled job. + */ + 'record_size'?: number | null; + /** + * Indicates the starting record number from where history runs records should be fetched. + */ + 'record_offset'?: number | null; + + static readonly discriminator: string | undefined = undefined; + + static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ + { + "name": "include_history_runs", + "baseName": "include_history_runs", + "type": "boolean", + "format": "" + }, + { + "name": "record_size", + "baseName": "record_size", + "type": "number", + "format": "int32" + }, + { + "name": "record_offset", + "baseName": "record_offset", + "type": "number", + "format": "int32" + } ]; + + static getAttributeTypeMap() { + return SearchSchedulesRequestHistoryRunsOptions.attributeTypeMap; + } + + public constructor() { + } +} + diff --git a/sdks/typescript/models/SearchSchedulesRequestSortOptions.ts b/sdks/typescript/models/SearchSchedulesRequestSortOptions.ts new file mode 100644 index 000000000..dd6960f4a --- /dev/null +++ b/sdks/typescript/models/SearchSchedulesRequestSortOptions.ts @@ -0,0 +1,51 @@ +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { HttpFile } from '../http/http'; + +/** +* Sort options. +*/ +export class SearchSchedulesRequestSortOptions { + /** + * Name of the field to apply the sort on. + */ + 'field_name'?: string | null; + /** + * Sort order : ASC(Ascending) or DESC(Descending). + */ + 'order'?: string | null; + + static readonly discriminator: string | undefined = undefined; + + static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ + { + "name": "field_name", + "baseName": "field_name", + "type": "string", + "format": "" + }, + { + "name": "order", + "baseName": "order", + "type": "string", + "format": "" + } ]; + + static getAttributeTypeMap() { + return SearchSchedulesRequestSortOptions.attributeTypeMap; + } + + public constructor() { + } +} + diff --git a/sdks/typescript/models/SearchSecuritySettingsRequest.ts b/sdks/typescript/models/SearchSecuritySettingsRequest.ts new file mode 100644 index 000000000..2a361dfad --- /dev/null +++ b/sdks/typescript/models/SearchSecuritySettingsRequest.ts @@ -0,0 +1,41 @@ +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { HttpFile } from '../http/http'; + +export class SearchSecuritySettingsRequest { + /** + * Scope of security settings to retrieve. CLUSTER returns cluster-level settings, ORG returns org-level settings for the current org. If not specified, returns both cluster and org settings based on user privileges. + */ + 'scope'?: SearchSecuritySettingsRequestScopeEnum; + + static readonly discriminator: string | undefined = undefined; + + static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ + { + "name": "scope", + "baseName": "scope", + "type": "SearchSecuritySettingsRequestScopeEnum", + "format": "" + } ]; + + static getAttributeTypeMap() { + return SearchSecuritySettingsRequest.attributeTypeMap; + } + + public constructor() { + } +} + + +export type SearchSecuritySettingsRequestScopeEnum = "CLUSTER" | "ORG" ; + diff --git a/sdks/typescript/models/SearchTagsRequest.ts b/sdks/typescript/models/SearchTagsRequest.ts new file mode 100644 index 000000000..dbf806779 --- /dev/null +++ b/sdks/typescript/models/SearchTagsRequest.ts @@ -0,0 +1,58 @@ +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { HttpFile } from '../http/http'; + +export class SearchTagsRequest { + /** + * Name or Id of the tag. + */ + 'tag_identifier'?: string; + /** + * A pattern to match case-insensitive name of the Tag object. + */ + 'name_pattern'?: string; + /** + * Color of the tag. + */ + 'color'?: string; + + static readonly discriminator: string | undefined = undefined; + + static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ + { + "name": "tag_identifier", + "baseName": "tag_identifier", + "type": "string", + "format": "" + }, + { + "name": "name_pattern", + "baseName": "name_pattern", + "type": "string", + "format": "" + }, + { + "name": "color", + "baseName": "color", + "type": "string", + "format": "" + } ]; + + static getAttributeTypeMap() { + return SearchTagsRequest.attributeTypeMap; + } + + public constructor() { + } +} + diff --git a/sdks/typescript/models/SearchUserGroupsRequest.ts b/sdks/typescript/models/SearchUserGroupsRequest.ts new file mode 100644 index 000000000..760ef4ce6 --- /dev/null +++ b/sdks/typescript/models/SearchUserGroupsRequest.ts @@ -0,0 +1,201 @@ +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { SearchUserGroupsRequestSortOptions } from '../models/SearchUserGroupsRequestSortOptions'; +import { HttpFile } from '../http/http'; + +export class SearchUserGroupsRequest { + /** + * GUID of Liveboards that are assigned as default Liveboards to the users in the group. + */ + 'default_liveboard_identifiers'?: Array; + /** + * Description of the group + */ + 'description'?: string; + /** + * Display name of the group + */ + 'display_name'?: string; + /** + * A pattern to match case-insensitive name of the Group object. + */ + 'name_pattern'?: string; + /** + * GUID or name of the group + */ + 'group_identifier'?: string; + /** + * ID or name of the Org to which the group belongs + */ + 'org_identifiers'?: Array; + /** + * Privileges assigned to the group. + */ + 'privileges'?: Array; + /** + * GUID or name of the sub groups. A subgroup is a group assigned to a parent group. + */ + 'sub_group_identifiers'?: Array; + /** + * Group type. + */ + 'type'?: SearchUserGroupsRequestTypeEnum; + /** + * GUID or name of the users assigned to the group. + */ + 'user_identifiers'?: Array; + /** + * Visibility of the group. To make a group visible to other users and groups, set the visibility to SHAREABLE. + */ + 'visibility'?: SearchUserGroupsRequestVisibilityEnum; + /** + * Filter groups with a list of Roles assigned to a group + */ + 'role_identifiers'?: Array; + /** + * The starting record number from where the records should be included. + */ + 'record_offset'?: number; + /** + * The number of records that should be included. + */ + 'record_size'?: number; + 'sort_options'?: SearchUserGroupsRequestSortOptions; + /** + *
Version: 10.10.0.cl or later
Define Parameter to consider if the users should be included in group search response. + */ + 'include_users'?: boolean | null; + /** + *
Version: 10.10.0.cl or later
Define Parameter to consider if the sub groups should be included in group search response. + */ + 'include_sub_groups'?: boolean | null; + + static readonly discriminator: string | undefined = undefined; + + static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ + { + "name": "default_liveboard_identifiers", + "baseName": "default_liveboard_identifiers", + "type": "Array", + "format": "" + }, + { + "name": "description", + "baseName": "description", + "type": "string", + "format": "" + }, + { + "name": "display_name", + "baseName": "display_name", + "type": "string", + "format": "" + }, + { + "name": "name_pattern", + "baseName": "name_pattern", + "type": "string", + "format": "" + }, + { + "name": "group_identifier", + "baseName": "group_identifier", + "type": "string", + "format": "" + }, + { + "name": "org_identifiers", + "baseName": "org_identifiers", + "type": "Array", + "format": "" + }, + { + "name": "privileges", + "baseName": "privileges", + "type": "Array", + "format": "" + }, + { + "name": "sub_group_identifiers", + "baseName": "sub_group_identifiers", + "type": "Array", + "format": "" + }, + { + "name": "type", + "baseName": "type", + "type": "SearchUserGroupsRequestTypeEnum", + "format": "" + }, + { + "name": "user_identifiers", + "baseName": "user_identifiers", + "type": "Array", + "format": "" + }, + { + "name": "visibility", + "baseName": "visibility", + "type": "SearchUserGroupsRequestVisibilityEnum", + "format": "" + }, + { + "name": "role_identifiers", + "baseName": "role_identifiers", + "type": "Array", + "format": "" + }, + { + "name": "record_offset", + "baseName": "record_offset", + "type": "number", + "format": "int32" + }, + { + "name": "record_size", + "baseName": "record_size", + "type": "number", + "format": "int32" + }, + { + "name": "sort_options", + "baseName": "sort_options", + "type": "SearchUserGroupsRequestSortOptions", + "format": "" + }, + { + "name": "include_users", + "baseName": "include_users", + "type": "boolean", + "format": "" + }, + { + "name": "include_sub_groups", + "baseName": "include_sub_groups", + "type": "boolean", + "format": "" + } ]; + + static getAttributeTypeMap() { + return SearchUserGroupsRequest.attributeTypeMap; + } + + public constructor() { + } +} + + +export type SearchUserGroupsRequestPrivilegesEnum = "ADMINISTRATION" | "AUTHORING" | "USERDATAUPLOADING" | "DATADOWNLOADING" | "USERMANAGEMENT" | "DATAMANAGEMENT" | "SHAREWITHALL" | "JOBSCHEDULING" | "A3ANALYSIS" | "EXPERIMENTALFEATUREPRIVILEGE" | "BYPASSRLS" | "RANALYSIS" | "DEVELOPER" | "USER_ADMINISTRATION" | "GROUP_ADMINISTRATION" | "SYNCMANAGEMENT" | "CAN_CREATE_CATALOG" | "DISABLE_PINBOARD_CREATION" | "LIVEBOARD_VERIFIER" | "PREVIEW_THOUGHTSPOT_SAGE" | "APPLICATION_ADMINISTRATION" | "SYSTEM_INFO_ADMINISTRATION" | "ORG_ADMINISTRATION" | "ROLE_ADMINISTRATION" | "AUTHENTICATION_ADMINISTRATION" | "BILLING_INFO_ADMINISTRATION" | "CAN_MANAGE_CUSTOM_CALENDAR" | "CAN_CREATE_OR_EDIT_CONNECTIONS" | "CAN_MANAGE_WORKSHEET_VIEWS_TABLES" | "CAN_MANAGE_VERSION_CONTROL" | "THIRDPARTY_ANALYSIS" | "ALLOW_NON_EMBED_FULL_APP_ACCESS" | "CAN_ACCESS_ANALYST_STUDIO" | "CAN_MANAGE_ANALYST_STUDIO" | "PREVIEW_DOCUMENT_SEARCH" | "CAN_MODIFY_FOLDERS" | "CAN_MANAGE_VARIABLES" | "CAN_VIEW_FOLDERS" | "CAN_MANAGE_AGENTSPOT" | "CAN_ACCESS_AGENTSPOT" | "CAN_SETUP_VERSION_CONTROL" | "CAN_MANAGE_WEBHOOKS" | "CAN_DOWNLOAD_VISUALS" | "CAN_DOWNLOAD_DETAILED_DATA" | "CAN_USE_SPOTTER" ; +export type SearchUserGroupsRequestTypeEnum = "LOCAL_GROUP" | "LDAP_GROUP" | "TEAM_GROUP" | "TENANT_GROUP" ; +export type SearchUserGroupsRequestVisibilityEnum = "SHARABLE" | "NON_SHARABLE" ; + diff --git a/sdks/typescript/models/SearchUserGroupsRequestSortOptions.ts b/sdks/typescript/models/SearchUserGroupsRequestSortOptions.ts new file mode 100644 index 000000000..ba87578fd --- /dev/null +++ b/sdks/typescript/models/SearchUserGroupsRequestSortOptions.ts @@ -0,0 +1,55 @@ +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { HttpFile } from '../http/http'; + +/** +* Sort options to filter group details. +*/ +export class SearchUserGroupsRequestSortOptions { + /** + * Name of the field to apply the sort on. + */ + 'field_name'?: SearchUserGroupsRequestSortOptionsFieldNameEnum | null; + /** + * Sort order : ASC(Ascending) or DESC(Descending). + */ + 'order'?: SearchUserGroupsRequestSortOptionsOrderEnum | null; + + static readonly discriminator: string | undefined = undefined; + + static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ + { + "name": "field_name", + "baseName": "field_name", + "type": "SearchUserGroupsRequestSortOptionsFieldNameEnum", + "format": "" + }, + { + "name": "order", + "baseName": "order", + "type": "SearchUserGroupsRequestSortOptionsOrderEnum", + "format": "" + } ]; + + static getAttributeTypeMap() { + return SearchUserGroupsRequestSortOptions.attributeTypeMap; + } + + public constructor() { + } +} + + +export type SearchUserGroupsRequestSortOptionsFieldNameEnum = "NAME" | "DISPLAY_NAME" | "AUTHOR" | "CREATED" | "MODIFIED" ; +export type SearchUserGroupsRequestSortOptionsOrderEnum = "ASC" | "DESC" ; + diff --git a/sdks/typescript/models/SearchUsersRequest.ts b/sdks/typescript/models/SearchUsersRequest.ts new file mode 100644 index 000000000..b69824ec9 --- /dev/null +++ b/sdks/typescript/models/SearchUsersRequest.ts @@ -0,0 +1,243 @@ +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { FavoriteMetadataInput } from '../models/FavoriteMetadataInput'; +import { SearchCollectionsRequestSortOptions } from '../models/SearchCollectionsRequestSortOptions'; +import { HttpFile } from '../http/http'; + +export class SearchUsersRequest { + /** + * GUID / name of the user to search + */ + 'user_identifier'?: string; + /** + * A unique display name string for the user account, usually their first and last name + */ + 'display_name'?: string; + /** + * A pattern to match case-insensitive name of the User object. + */ + 'name_pattern'?: string; + /** + * Visibility of the user + */ + 'visibility'?: SearchUsersRequestVisibilityEnum; + /** + * Email of the user account + */ + 'email'?: string; + /** + * GUID or name of the group to which the user belongs + */ + 'group_identifiers'?: Array; + /** + * Privileges assigned to the user + */ + 'privileges'?: Array; + /** + * Type of the account + */ + 'account_type'?: SearchUsersRequestAccountTypeEnum; + /** + * Current status of the user account. + */ + 'account_status'?: SearchUsersRequestAccountStatusEnum; + /** + * User preference for receiving email notifications when another ThoughtSpot user shares a metadata object such as Answer, Liveboard, or Worksheet. + */ + 'notify_on_share'?: boolean | null; + /** + * The user preference for revisiting the onboarding experience + */ + 'show_onboarding_experience'?: boolean | null; + /** + * Indicates if the user has completed the onboarding walkthrough + */ + 'onboarding_experience_completed'?: boolean | null; + /** + * IDs or names of the Orgs to which the user belongs + */ + 'org_identifiers'?: Array; + /** + * Unique ID or name of the user\'s home Liveboard. + */ + 'home_liveboard_identifier'?: string; + /** + * Metadata objects which are assigned as favorites of the user. + */ + 'favorite_metadata'?: Array; + /** + * The starting record number from where the records should be included. + */ + 'record_offset'?: number; + /** + * The number of records that should be included. + */ + 'record_size'?: number; + 'sort_options'?: SearchCollectionsRequestSortOptions; + /** + * Filters by the role assigned to the user. + */ + 'role_identifiers'?: Array; + /** + * Indicates if the user\'s favorite objects should be displayed. + */ + 'include_favorite_metadata'?: boolean | null; + /** + * Indicates if the user\'s formula variable values should be included in the response. + */ + 'include_variable_values'?: boolean | null; + + static readonly discriminator: string | undefined = undefined; + + static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ + { + "name": "user_identifier", + "baseName": "user_identifier", + "type": "string", + "format": "" + }, + { + "name": "display_name", + "baseName": "display_name", + "type": "string", + "format": "" + }, + { + "name": "name_pattern", + "baseName": "name_pattern", + "type": "string", + "format": "" + }, + { + "name": "visibility", + "baseName": "visibility", + "type": "SearchUsersRequestVisibilityEnum", + "format": "" + }, + { + "name": "email", + "baseName": "email", + "type": "string", + "format": "" + }, + { + "name": "group_identifiers", + "baseName": "group_identifiers", + "type": "Array", + "format": "" + }, + { + "name": "privileges", + "baseName": "privileges", + "type": "Array", + "format": "" + }, + { + "name": "account_type", + "baseName": "account_type", + "type": "SearchUsersRequestAccountTypeEnum", + "format": "" + }, + { + "name": "account_status", + "baseName": "account_status", + "type": "SearchUsersRequestAccountStatusEnum", + "format": "" + }, + { + "name": "notify_on_share", + "baseName": "notify_on_share", + "type": "boolean", + "format": "" + }, + { + "name": "show_onboarding_experience", + "baseName": "show_onboarding_experience", + "type": "boolean", + "format": "" + }, + { + "name": "onboarding_experience_completed", + "baseName": "onboarding_experience_completed", + "type": "boolean", + "format": "" + }, + { + "name": "org_identifiers", + "baseName": "org_identifiers", + "type": "Array", + "format": "" + }, + { + "name": "home_liveboard_identifier", + "baseName": "home_liveboard_identifier", + "type": "string", + "format": "" + }, + { + "name": "favorite_metadata", + "baseName": "favorite_metadata", + "type": "Array", + "format": "" + }, + { + "name": "record_offset", + "baseName": "record_offset", + "type": "number", + "format": "int32" + }, + { + "name": "record_size", + "baseName": "record_size", + "type": "number", + "format": "int32" + }, + { + "name": "sort_options", + "baseName": "sort_options", + "type": "SearchCollectionsRequestSortOptions", + "format": "" + }, + { + "name": "role_identifiers", + "baseName": "role_identifiers", + "type": "Array", + "format": "" + }, + { + "name": "include_favorite_metadata", + "baseName": "include_favorite_metadata", + "type": "boolean", + "format": "" + }, + { + "name": "include_variable_values", + "baseName": "include_variable_values", + "type": "boolean", + "format": "" + } ]; + + static getAttributeTypeMap() { + return SearchUsersRequest.attributeTypeMap; + } + + public constructor() { + } +} + + +export type SearchUsersRequestVisibilityEnum = "SHARABLE" | "NON_SHARABLE" ; +export type SearchUsersRequestPrivilegesEnum = "ADMINISTRATION" | "AUTHORING" | "USERDATAUPLOADING" | "DATADOWNLOADING" | "USERMANAGEMENT" | "DATAMANAGEMENT" | "SHAREWITHALL" | "JOBSCHEDULING" | "A3ANALYSIS" | "EXPERIMENTALFEATUREPRIVILEGE" | "BYPASSRLS" | "RANALYSIS" | "DEVELOPER" | "USER_ADMINISTRATION" | "GROUP_ADMINISTRATION" | "SYNCMANAGEMENT" | "CAN_CREATE_CATALOG" | "DISABLE_PINBOARD_CREATION" | "LIVEBOARD_VERIFIER" | "PREVIEW_THOUGHTSPOT_SAGE" | "APPLICATION_ADMINISTRATION" | "SYSTEM_INFO_ADMINISTRATION" | "ORG_ADMINISTRATION" | "ROLE_ADMINISTRATION" | "AUTHENTICATION_ADMINISTRATION" | "BILLING_INFO_ADMINISTRATION" | "CAN_MANAGE_CUSTOM_CALENDAR" | "CAN_CREATE_OR_EDIT_CONNECTIONS" | "CAN_MANAGE_WORKSHEET_VIEWS_TABLES" | "CAN_MANAGE_VERSION_CONTROL" | "THIRDPARTY_ANALYSIS" | "ALLOW_NON_EMBED_FULL_APP_ACCESS" | "CAN_ACCESS_ANALYST_STUDIO" | "CAN_MANAGE_ANALYST_STUDIO" | "PREVIEW_DOCUMENT_SEARCH" | "CAN_MODIFY_FOLDERS" | "CAN_MANAGE_VARIABLES" | "CAN_VIEW_FOLDERS" | "CAN_MANAGE_AGENTSPOT" | "CAN_ACCESS_AGENTSPOT" | "CAN_SETUP_VERSION_CONTROL" | "CAN_MANAGE_WEBHOOKS" | "CAN_DOWNLOAD_VISUALS" | "CAN_DOWNLOAD_DETAILED_DATA" | "CAN_USE_SPOTTER" ; +export type SearchUsersRequestAccountTypeEnum = "LOCAL_USER" | "LDAP_USER" | "SAML_USER" | "OIDC_USER" | "REMOTE_USER" ; +export type SearchUsersRequestAccountStatusEnum = "ACTIVE" | "INACTIVE" | "EXPIRED" | "LOCKED" | "PENDING" | "SUSPENDED" ; + diff --git a/sdks/typescript/models/SearchVariablesRequest.ts b/sdks/typescript/models/SearchVariablesRequest.ts new file mode 100644 index 000000000..c4836e4a2 --- /dev/null +++ b/sdks/typescript/models/SearchVariablesRequest.ts @@ -0,0 +1,83 @@ +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { ValueScopeInput } from '../models/ValueScopeInput'; +import { VariableDetailInput } from '../models/VariableDetailInput'; +import { HttpFile } from '../http/http'; + +export class SearchVariablesRequest { + /** + * Variable details + */ + 'variable_details'?: Array; + /** + * Array of scope filters + */ + 'value_scope'?: Array; + /** + * The starting record number from where the records should be included + */ + 'record_offset'?: number; + /** + * The number of records that should be included + */ + 'record_size'?: number; + /** + * Format in which we want the output + */ + 'response_content'?: SearchVariablesRequestResponseContentEnum; + + static readonly discriminator: string | undefined = undefined; + + static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ + { + "name": "variable_details", + "baseName": "variable_details", + "type": "Array", + "format": "" + }, + { + "name": "value_scope", + "baseName": "value_scope", + "type": "Array", + "format": "" + }, + { + "name": "record_offset", + "baseName": "record_offset", + "type": "number", + "format": "int32" + }, + { + "name": "record_size", + "baseName": "record_size", + "type": "number", + "format": "int32" + }, + { + "name": "response_content", + "baseName": "response_content", + "type": "SearchVariablesRequestResponseContentEnum", + "format": "" + } ]; + + static getAttributeTypeMap() { + return SearchVariablesRequest.attributeTypeMap; + } + + public constructor() { + } +} + + +export type SearchVariablesRequestResponseContentEnum = "METADATA" | "METADATA_AND_VALUES" ; + diff --git a/sdks/typescript/models/SearchWebhookConfigurationsRequest.ts b/sdks/typescript/models/SearchWebhookConfigurationsRequest.ts new file mode 100644 index 000000000..9ca2aa84e --- /dev/null +++ b/sdks/typescript/models/SearchWebhookConfigurationsRequest.ts @@ -0,0 +1,89 @@ +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { SearchWebhookConfigurationsRequestSortOptions } from '../models/SearchWebhookConfigurationsRequestSortOptions'; +import { HttpFile } from '../http/http'; + +export class SearchWebhookConfigurationsRequest { + /** + * Unique ID or name of the org. + */ + 'org_identifier'?: string; + /** + * Unique ID or name of the webhook. + */ + 'webhook_identifier'?: string; + /** + * Type of webhook event to filter by. + */ + 'event_type'?: SearchWebhookConfigurationsRequestEventTypeEnum; + /** + * The offset point, starting from where the webhooks should be included in the response. + */ + 'record_offset'?: number; + /** + * The number of webhooks that should be included in the response starting from offset position. + */ + 'record_size'?: number; + 'sort_options'?: SearchWebhookConfigurationsRequestSortOptions; + + static readonly discriminator: string | undefined = undefined; + + static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ + { + "name": "org_identifier", + "baseName": "org_identifier", + "type": "string", + "format": "" + }, + { + "name": "webhook_identifier", + "baseName": "webhook_identifier", + "type": "string", + "format": "" + }, + { + "name": "event_type", + "baseName": "event_type", + "type": "SearchWebhookConfigurationsRequestEventTypeEnum", + "format": "" + }, + { + "name": "record_offset", + "baseName": "record_offset", + "type": "number", + "format": "int32" + }, + { + "name": "record_size", + "baseName": "record_size", + "type": "number", + "format": "int32" + }, + { + "name": "sort_options", + "baseName": "sort_options", + "type": "SearchWebhookConfigurationsRequestSortOptions", + "format": "" + } ]; + + static getAttributeTypeMap() { + return SearchWebhookConfigurationsRequest.attributeTypeMap; + } + + public constructor() { + } +} + + +export type SearchWebhookConfigurationsRequestEventTypeEnum = "LIVEBOARD_SCHEDULE" ; + diff --git a/sdks/typescript/models/SearchWebhookConfigurationsRequestSortOptions.ts b/sdks/typescript/models/SearchWebhookConfigurationsRequestSortOptions.ts new file mode 100644 index 000000000..b63e1e451 --- /dev/null +++ b/sdks/typescript/models/SearchWebhookConfigurationsRequestSortOptions.ts @@ -0,0 +1,55 @@ +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { HttpFile } from '../http/http'; + +/** +* Sort option includes sort field and sort order. +*/ +export class SearchWebhookConfigurationsRequestSortOptions { + /** + * Name of the field to apply the sort on. + */ + 'field_name'?: SearchWebhookConfigurationsRequestSortOptionsFieldNameEnum | null; + /** + * Sort order: ASC (Ascending) or DESC (Descending). + */ + 'order'?: SearchWebhookConfigurationsRequestSortOptionsOrderEnum | null; + + static readonly discriminator: string | undefined = undefined; + + static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ + { + "name": "field_name", + "baseName": "field_name", + "type": "SearchWebhookConfigurationsRequestSortOptionsFieldNameEnum", + "format": "" + }, + { + "name": "order", + "baseName": "order", + "type": "SearchWebhookConfigurationsRequestSortOptionsOrderEnum", + "format": "" + } ]; + + static getAttributeTypeMap() { + return SearchWebhookConfigurationsRequestSortOptions.attributeTypeMap; + } + + public constructor() { + } +} + + +export type SearchWebhookConfigurationsRequestSortOptionsFieldNameEnum = "CREATED" | "MODIFIED" | "NAME" ; +export type SearchWebhookConfigurationsRequestSortOptionsOrderEnum = "ASC" | "DESC" ; + diff --git a/sdks/typescript/models/SecuritySettingsClusterPreferences.ts b/sdks/typescript/models/SecuritySettingsClusterPreferences.ts new file mode 100644 index 000000000..d8d052efa --- /dev/null +++ b/sdks/typescript/models/SecuritySettingsClusterPreferences.ts @@ -0,0 +1,90 @@ +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { ClusterNonEmbedAccess } from '../models/ClusterNonEmbedAccess'; +import { CspSettings } from '../models/CspSettings'; +import { HttpFile } from '../http/http'; + +/** +* Cluster-level security preferences. +*/ +export class SecuritySettingsClusterPreferences { + /** + * Support embedded access when third-party cookies are blocked. + */ + 'enable_partitioned_cookies'?: boolean | null; + /** + * Allowed origins for CORS. + */ + 'cors_whitelisted_urls'?: Array | null; + 'csp_settings'?: CspSettings; + /** + * Allowed redirect hosts for SAML login. + */ + 'saml_redirect_urls'?: Array | null; + 'non_embed_access'?: ClusterNonEmbedAccess; + /** + * Trusted authentication status at the cluster level. Version: 26.6.0.cl or later + */ + 'trusted_auth_status'?: SecuritySettingsClusterPreferencesTrustedAuthStatusEnum | null; + + static readonly discriminator: string | undefined = undefined; + + static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ + { + "name": "enable_partitioned_cookies", + "baseName": "enable_partitioned_cookies", + "type": "boolean", + "format": "" + }, + { + "name": "cors_whitelisted_urls", + "baseName": "cors_whitelisted_urls", + "type": "Array", + "format": "" + }, + { + "name": "csp_settings", + "baseName": "csp_settings", + "type": "CspSettings", + "format": "" + }, + { + "name": "saml_redirect_urls", + "baseName": "saml_redirect_urls", + "type": "Array", + "format": "" + }, + { + "name": "non_embed_access", + "baseName": "non_embed_access", + "type": "ClusterNonEmbedAccess", + "format": "" + }, + { + "name": "trusted_auth_status", + "baseName": "trusted_auth_status", + "type": "SecuritySettingsClusterPreferencesTrustedAuthStatusEnum", + "format": "" + } ]; + + static getAttributeTypeMap() { + return SecuritySettingsClusterPreferences.attributeTypeMap; + } + + public constructor() { + } +} + + +export type SecuritySettingsClusterPreferencesTrustedAuthStatusEnum = "ENABLED" | "DISABLED" ; + diff --git a/sdks/typescript/models/SecuritySettingsClusterPreferencesInput.ts b/sdks/typescript/models/SecuritySettingsClusterPreferencesInput.ts new file mode 100644 index 000000000..56d8fbbde --- /dev/null +++ b/sdks/typescript/models/SecuritySettingsClusterPreferencesInput.ts @@ -0,0 +1,77 @@ +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { ClusterNonEmbedAccessInput } from '../models/ClusterNonEmbedAccessInput'; +import { CspSettingsInput } from '../models/CspSettingsInput'; +import { HttpFile } from '../http/http'; + +/** +* Input for cluster-level security preferences configuration. +*/ +export class SecuritySettingsClusterPreferencesInput { + /** + * Support embedded access when third-party cookies are blocked. + */ + 'enable_partitioned_cookies'?: boolean | null; + /** + * Allowed origins for CORS. + */ + 'cors_whitelisted_urls'?: Array | null; + 'csp_settings'?: CspSettingsInput; + /** + * Allowed redirect hosts for SAML login. + */ + 'saml_redirect_urls'?: Array | null; + 'non_embed_access'?: ClusterNonEmbedAccessInput; + + static readonly discriminator: string | undefined = undefined; + + static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ + { + "name": "enable_partitioned_cookies", + "baseName": "enable_partitioned_cookies", + "type": "boolean", + "format": "" + }, + { + "name": "cors_whitelisted_urls", + "baseName": "cors_whitelisted_urls", + "type": "Array", + "format": "" + }, + { + "name": "csp_settings", + "baseName": "csp_settings", + "type": "CspSettingsInput", + "format": "" + }, + { + "name": "saml_redirect_urls", + "baseName": "saml_redirect_urls", + "type": "Array", + "format": "" + }, + { + "name": "non_embed_access", + "baseName": "non_embed_access", + "type": "ClusterNonEmbedAccessInput", + "format": "" + } ]; + + static getAttributeTypeMap() { + return SecuritySettingsClusterPreferencesInput.attributeTypeMap; + } + + public constructor() { + } +} + diff --git a/sdks/typescript/models/SecuritySettingsOrgDetails.ts b/sdks/typescript/models/SecuritySettingsOrgDetails.ts new file mode 100644 index 000000000..4e969f67a --- /dev/null +++ b/sdks/typescript/models/SecuritySettingsOrgDetails.ts @@ -0,0 +1,51 @@ +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { HttpFile } from '../http/http'; + +/** +* Org details for security settings. +*/ +export class SecuritySettingsOrgDetails { + /** + * Unique identifier of the org. + */ + 'id'?: number | null; + /** + * Name of the org. + */ + 'name'?: string | null; + + static readonly discriminator: string | undefined = undefined; + + static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ + { + "name": "id", + "baseName": "id", + "type": "number", + "format": "int32" + }, + { + "name": "name", + "baseName": "name", + "type": "string", + "format": "" + } ]; + + static getAttributeTypeMap() { + return SecuritySettingsOrgDetails.attributeTypeMap; + } + + public constructor() { + } +} + diff --git a/sdks/typescript/models/SecuritySettingsOrgPreferences.ts b/sdks/typescript/models/SecuritySettingsOrgPreferences.ts new file mode 100644 index 000000000..c34c90b2b --- /dev/null +++ b/sdks/typescript/models/SecuritySettingsOrgPreferences.ts @@ -0,0 +1,70 @@ +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { OrgNonEmbedAccess } from '../models/OrgNonEmbedAccess'; +import { SecuritySettingsOrgDetails } from '../models/SecuritySettingsOrgDetails'; +import { HttpFile } from '../http/http'; + +/** +* Org-level security preferences. +*/ +export class SecuritySettingsOrgPreferences { + 'org'?: SecuritySettingsOrgDetails; + /** + * Allowed origins for CORS for this org. + */ + 'cors_whitelisted_urls'?: Array | null; + 'non_embed_access'?: OrgNonEmbedAccess; + /** + * Trusted authentication status for this org. Version: 26.6.0.cl or later + */ + 'trusted_auth_status'?: SecuritySettingsOrgPreferencesTrustedAuthStatusEnum | null; + + static readonly discriminator: string | undefined = undefined; + + static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ + { + "name": "org", + "baseName": "org", + "type": "SecuritySettingsOrgDetails", + "format": "" + }, + { + "name": "cors_whitelisted_urls", + "baseName": "cors_whitelisted_urls", + "type": "Array", + "format": "" + }, + { + "name": "non_embed_access", + "baseName": "non_embed_access", + "type": "OrgNonEmbedAccess", + "format": "" + }, + { + "name": "trusted_auth_status", + "baseName": "trusted_auth_status", + "type": "SecuritySettingsOrgPreferencesTrustedAuthStatusEnum", + "format": "" + } ]; + + static getAttributeTypeMap() { + return SecuritySettingsOrgPreferences.attributeTypeMap; + } + + public constructor() { + } +} + + +export type SecuritySettingsOrgPreferencesTrustedAuthStatusEnum = "ENABLED" | "DISABLED" ; + diff --git a/sdks/typescript/models/SecuritySettingsOrgPreferencesInput.ts b/sdks/typescript/models/SecuritySettingsOrgPreferencesInput.ts new file mode 100644 index 000000000..1d9fff071 --- /dev/null +++ b/sdks/typescript/models/SecuritySettingsOrgPreferencesInput.ts @@ -0,0 +1,59 @@ +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { OrgNonEmbedAccessInput } from '../models/OrgNonEmbedAccessInput'; +import { HttpFile } from '../http/http'; + +/** +* Input for org-level security preferences configuration. Note: cross-org operations are not supported currently. +*/ +export class SecuritySettingsOrgPreferencesInput { + /** + * Unique identifier or name of the org + */ + 'org_identifier': string; + /** + * Allowed origins for CORS for this org. + */ + 'cors_whitelisted_urls'?: Array | null; + 'non_embed_access'?: OrgNonEmbedAccessInput; + + static readonly discriminator: string | undefined = undefined; + + static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ + { + "name": "org_identifier", + "baseName": "org_identifier", + "type": "string", + "format": "" + }, + { + "name": "cors_whitelisted_urls", + "baseName": "cors_whitelisted_urls", + "type": "Array", + "format": "" + }, + { + "name": "non_embed_access", + "baseName": "non_embed_access", + "type": "OrgNonEmbedAccessInput", + "format": "" + } ]; + + static getAttributeTypeMap() { + return SecuritySettingsOrgPreferencesInput.attributeTypeMap; + } + + public constructor() { + } +} + diff --git a/sdks/typescript/models/SecuritySettingsResponse.ts b/sdks/typescript/models/SecuritySettingsResponse.ts new file mode 100644 index 000000000..237d46fce --- /dev/null +++ b/sdks/typescript/models/SecuritySettingsResponse.ts @@ -0,0 +1,50 @@ +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { SecuritySettingsClusterPreferences } from '../models/SecuritySettingsClusterPreferences'; +import { SecuritySettingsOrgPreferences } from '../models/SecuritySettingsOrgPreferences'; +import { HttpFile } from '../http/http'; + +/** +* Response type for security settings search. +*/ +export class SecuritySettingsResponse { + 'cluster_preferences'?: SecuritySettingsClusterPreferences; + /** + * Org-level security preferences. + */ + 'org_preferences'?: Array | null; + + static readonly discriminator: string | undefined = undefined; + + static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ + { + "name": "cluster_preferences", + "baseName": "cluster_preferences", + "type": "SecuritySettingsClusterPreferences", + "format": "" + }, + { + "name": "org_preferences", + "baseName": "org_preferences", + "type": "Array", + "format": "" + } ]; + + static getAttributeTypeMap() { + return SecuritySettingsResponse.attributeTypeMap; + } + + public constructor() { + } +} + diff --git a/sdks/typescript/models/SendAgentConversationMessageRequest.ts b/sdks/typescript/models/SendAgentConversationMessageRequest.ts new file mode 100644 index 000000000..7a4ffdb0f --- /dev/null +++ b/sdks/typescript/models/SendAgentConversationMessageRequest.ts @@ -0,0 +1,38 @@ +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { HttpFile } from '../http/http'; + +export class SendAgentConversationMessageRequest { + /** + * messages to be sent to the agent + */ + 'messages': Array; + + static readonly discriminator: string | undefined = undefined; + + static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ + { + "name": "messages", + "baseName": "messages", + "type": "Array", + "format": "" + } ]; + + static getAttributeTypeMap() { + return SendAgentConversationMessageRequest.attributeTypeMap; + } + + public constructor() { + } +} + diff --git a/sdks/typescript/models/SendAgentConversationMessageStreamingRequest.ts b/sdks/typescript/models/SendAgentConversationMessageStreamingRequest.ts new file mode 100644 index 000000000..85159c2ca --- /dev/null +++ b/sdks/typescript/models/SendAgentConversationMessageStreamingRequest.ts @@ -0,0 +1,38 @@ +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { HttpFile } from '../http/http'; + +export class SendAgentConversationMessageStreamingRequest { + /** + * messages to be sent to the agent + */ + 'messages': Array; + + static readonly discriminator: string | undefined = undefined; + + static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ + { + "name": "messages", + "baseName": "messages", + "type": "Array", + "format": "" + } ]; + + static getAttributeTypeMap() { + return SendAgentConversationMessageStreamingRequest.attributeTypeMap; + } + + public constructor() { + } +} + diff --git a/sdks/typescript/models/SendAgentMessageRequest.ts b/sdks/typescript/models/SendAgentMessageRequest.ts new file mode 100644 index 000000000..42eadd42b --- /dev/null +++ b/sdks/typescript/models/SendAgentMessageRequest.ts @@ -0,0 +1,38 @@ +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { HttpFile } from '../http/http'; + +export class SendAgentMessageRequest { + /** + * messages to be sent to the agent + */ + 'messages': Array; + + static readonly discriminator: string | undefined = undefined; + + static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ + { + "name": "messages", + "baseName": "messages", + "type": "Array", + "format": "" + } ]; + + static getAttributeTypeMap() { + return SendAgentMessageRequest.attributeTypeMap; + } + + public constructor() { + } +} + diff --git a/sdks/typescript/models/SendAgentMessageResponse.ts b/sdks/typescript/models/SendAgentMessageResponse.ts new file mode 100644 index 000000000..728280f0a --- /dev/null +++ b/sdks/typescript/models/SendAgentMessageResponse.ts @@ -0,0 +1,48 @@ +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { HttpFile } from '../http/http'; + +export class SendAgentMessageResponse { + /** + * Indicates whether the agent response was received and processed successfully. + */ + 'success': boolean; + /** + * Optional message providing additional context about the operation outcome. + */ + 'message'?: string | null; + + static readonly discriminator: string | undefined = undefined; + + static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ + { + "name": "success", + "baseName": "success", + "type": "boolean", + "format": "" + }, + { + "name": "message", + "baseName": "message", + "type": "string", + "format": "" + } ]; + + static getAttributeTypeMap() { + return SendAgentMessageResponse.attributeTypeMap; + } + + public constructor() { + } +} + diff --git a/sdks/typescript/models/SendAgentMessageStreamingRequest.ts b/sdks/typescript/models/SendAgentMessageStreamingRequest.ts new file mode 100644 index 000000000..eae6f0582 --- /dev/null +++ b/sdks/typescript/models/SendAgentMessageStreamingRequest.ts @@ -0,0 +1,48 @@ +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { HttpFile } from '../http/http'; + +export class SendAgentMessageStreamingRequest { + /** + * Unique identifier for the conversation (used to track context) + */ + 'conversation_identifier': string; + /** + * messages to be sent to the agent + */ + 'messages': Array; + + static readonly discriminator: string | undefined = undefined; + + static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ + { + "name": "conversation_identifier", + "baseName": "conversation_identifier", + "type": "string", + "format": "" + }, + { + "name": "messages", + "baseName": "messages", + "type": "Array", + "format": "" + } ]; + + static getAttributeTypeMap() { + return SendAgentMessageStreamingRequest.attributeTypeMap; + } + + public constructor() { + } +} + diff --git a/sdks/typescript/models/SendMessageRequest.ts b/sdks/typescript/models/SendMessageRequest.ts new file mode 100644 index 000000000..9e40d2c32 --- /dev/null +++ b/sdks/typescript/models/SendMessageRequest.ts @@ -0,0 +1,48 @@ +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { HttpFile } from '../http/http'; + +export class SendMessageRequest { + /** + * ID of the metadata object, such as a Worksheet or Model, to use as a data source for the conversation. + */ + 'metadata_identifier': string; + /** + * A message string with the follow-up question to continue the conversation. + */ + 'message': string; + + static readonly discriminator: string | undefined = undefined; + + static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ + { + "name": "metadata_identifier", + "baseName": "metadata_identifier", + "type": "string", + "format": "" + }, + { + "name": "message", + "baseName": "message", + "type": "string", + "format": "" + } ]; + + static getAttributeTypeMap() { + return SendMessageRequest.attributeTypeMap; + } + + public constructor() { + } +} + diff --git a/sdks/typescript/models/SetNLInstructionsRequest.ts b/sdks/typescript/models/SetNLInstructionsRequest.ts new file mode 100644 index 000000000..042767d1e --- /dev/null +++ b/sdks/typescript/models/SetNLInstructionsRequest.ts @@ -0,0 +1,49 @@ +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { NLInstructionsInfoInput } from '../models/NLInstructionsInfoInput'; +import { HttpFile } from '../http/http'; + +export class SetNLInstructionsRequest { + /** + * Unique ID or name of the data-model for which to set NL instructions. + */ + 'data_source_identifier': string; + /** + * List of NL instructions to set for the data-model. + */ + 'nl_instructions_info': Array; + + static readonly discriminator: string | undefined = undefined; + + static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ + { + "name": "data_source_identifier", + "baseName": "data_source_identifier", + "type": "string", + "format": "" + }, + { + "name": "nl_instructions_info", + "baseName": "nl_instructions_info", + "type": "Array", + "format": "" + } ]; + + static getAttributeTypeMap() { + return SetNLInstructionsRequest.attributeTypeMap; + } + + public constructor() { + } +} + diff --git a/sdks/typescript/models/ShareMetadataRequest.ts b/sdks/typescript/models/ShareMetadataRequest.ts new file mode 100644 index 000000000..3e63d4c48 --- /dev/null +++ b/sdks/typescript/models/ShareMetadataRequest.ts @@ -0,0 +1,133 @@ +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { ShareMetadataTypeInput } from '../models/ShareMetadataTypeInput'; +import { SharePermissionsInput } from '../models/SharePermissionsInput'; +import { HttpFile } from '../http/http'; + +export class ShareMetadataRequest { + /** + * Type of metadata. Required if identifier in metadata_identifies is a name. 1. Liveboard 2. Answers 3. LOGICAL_TABLE for any data object such as table, worksheet or view. 4. LOGICAL_COLUMN 5. Connection 6. Collection + */ + 'metadata_type'?: ShareMetadataRequestMetadataTypeEnum; + /** + * Unique ID or name of metadata objects. Note: All the names should belong to same metadata_type + */ + 'metadata_identifiers'?: Array; + /** + * Metadata details for sharing objects. + */ + 'metadata'?: Array; + /** + * Permission details for sharing the objects. + */ + 'permissions': Array; + /** + * Options to specify details of Liveboard. First Liveboard encountered in payload is considered to be the corresponding Liveboard. + */ + 'visualization_identifiers'?: Array; + /** + * Email IDs to which notifications will be sent. + */ + 'emails'?: Array; + /** + * Message to be included in notification. + */ + 'message': string; + /** + * Sends object URLs in the customized format in email notifications. + */ + 'enable_custom_url'?: boolean | null; + /** + * Flag to notify user when any object is shared. + */ + 'notify_on_share'?: boolean | null; + /** + * Flag to make the object discoverable. + */ + 'has_lenient_discoverability'?: boolean | null; + + static readonly discriminator: string | undefined = undefined; + + static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ + { + "name": "metadata_type", + "baseName": "metadata_type", + "type": "ShareMetadataRequestMetadataTypeEnum", + "format": "" + }, + { + "name": "metadata_identifiers", + "baseName": "metadata_identifiers", + "type": "Array", + "format": "" + }, + { + "name": "metadata", + "baseName": "metadata", + "type": "Array", + "format": "" + }, + { + "name": "permissions", + "baseName": "permissions", + "type": "Array", + "format": "" + }, + { + "name": "visualization_identifiers", + "baseName": "visualization_identifiers", + "type": "Array", + "format": "" + }, + { + "name": "emails", + "baseName": "emails", + "type": "Array", + "format": "" + }, + { + "name": "message", + "baseName": "message", + "type": "string", + "format": "" + }, + { + "name": "enable_custom_url", + "baseName": "enable_custom_url", + "type": "boolean", + "format": "" + }, + { + "name": "notify_on_share", + "baseName": "notify_on_share", + "type": "boolean", + "format": "" + }, + { + "name": "has_lenient_discoverability", + "baseName": "has_lenient_discoverability", + "type": "boolean", + "format": "" + } ]; + + static getAttributeTypeMap() { + return ShareMetadataRequest.attributeTypeMap; + } + + public constructor() { + } +} + + +export type ShareMetadataRequestMetadataTypeEnum = "LIVEBOARD" | "ANSWER" | "LOGICAL_TABLE" | "LOGICAL_COLUMN" | "CONNECTION" | "COLLECTION" ; + diff --git a/sdks/typescript/models/ShareMetadataTypeInput.ts b/sdks/typescript/models/ShareMetadataTypeInput.ts new file mode 100644 index 000000000..74f5f7633 --- /dev/null +++ b/sdks/typescript/models/ShareMetadataTypeInput.ts @@ -0,0 +1,51 @@ +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { HttpFile } from '../http/http'; + +export class ShareMetadataTypeInput { + /** + * Type of metadata. Type of metadata. Required if the name of the object is set as the identifier. This attribute is optional when the object GUID is specified as the identifier. + */ + 'type'?: ShareMetadataTypeInputTypeEnum | null; + /** + * Unique ID or name of the metadata object. + */ + 'identifier': string; + + static readonly discriminator: string | undefined = undefined; + + static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ + { + "name": "type", + "baseName": "type", + "type": "ShareMetadataTypeInputTypeEnum", + "format": "" + }, + { + "name": "identifier", + "baseName": "identifier", + "type": "string", + "format": "" + } ]; + + static getAttributeTypeMap() { + return ShareMetadataTypeInput.attributeTypeMap; + } + + public constructor() { + } +} + + +export type ShareMetadataTypeInputTypeEnum = "LIVEBOARD" | "ANSWER" | "LOGICAL_TABLE" | "LOGICAL_COLUMN" | "CONNECTION" | "COLLECTION" ; + diff --git a/sdks/typescript/models/SharePermissionsInput.ts b/sdks/typescript/models/SharePermissionsInput.ts new file mode 100644 index 000000000..e45135d3b --- /dev/null +++ b/sdks/typescript/models/SharePermissionsInput.ts @@ -0,0 +1,60 @@ +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { PrincipalsInput } from '../models/PrincipalsInput'; +import { HttpFile } from '../http/http'; + +export class SharePermissionsInput { + 'principal': PrincipalsInput; + /** + * Type of access to the shared object + */ + 'share_mode': SharePermissionsInputShareModeEnum; + /** + * Content share mode for collections. Controls access to objects within the collection. Only applicable when sharing COLLECTION metadata type. + */ + 'content_share_mode'?: SharePermissionsInputContentShareModeEnum | null; + + static readonly discriminator: string | undefined = undefined; + + static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ + { + "name": "principal", + "baseName": "principal", + "type": "PrincipalsInput", + "format": "" + }, + { + "name": "share_mode", + "baseName": "share_mode", + "type": "SharePermissionsInputShareModeEnum", + "format": "" + }, + { + "name": "content_share_mode", + "baseName": "content_share_mode", + "type": "SharePermissionsInputContentShareModeEnum", + "format": "" + } ]; + + static getAttributeTypeMap() { + return SharePermissionsInput.attributeTypeMap; + } + + public constructor() { + } +} + + +export type SharePermissionsInputShareModeEnum = "READ_ONLY" | "MODIFY" | "NO_ACCESS" ; +export type SharePermissionsInputContentShareModeEnum = "READ_ONLY" | "MODIFY" ; + diff --git a/sdks/typescript/models/SingleAnswerRequest.ts b/sdks/typescript/models/SingleAnswerRequest.ts new file mode 100644 index 000000000..0d877fabc --- /dev/null +++ b/sdks/typescript/models/SingleAnswerRequest.ts @@ -0,0 +1,48 @@ +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { HttpFile } from '../http/http'; + +export class SingleAnswerRequest { + /** + * A natural language query string to generate the Answer. + */ + 'query': string; + /** + * ID of the metadata object, such as a Worksheet or Model, to use as a data source for the query. + */ + 'metadata_identifier': string; + + static readonly discriminator: string | undefined = undefined; + + static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ + { + "name": "query", + "baseName": "query", + "type": "string", + "format": "" + }, + { + "name": "metadata_identifier", + "baseName": "metadata_identifier", + "type": "string", + "format": "" + } ]; + + static getAttributeTypeMap() { + return SingleAnswerRequest.attributeTypeMap; + } + + public constructor() { + } +} + diff --git a/sdks/typescript/models/SortOption.ts b/sdks/typescript/models/SortOption.ts new file mode 100644 index 000000000..e8d467d04 --- /dev/null +++ b/sdks/typescript/models/SortOption.ts @@ -0,0 +1,52 @@ +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { HttpFile } from '../http/http'; + +export class SortOption { + /** + * Name of the field to apply the sort on. + */ + 'field_name'?: SortOptionFieldNameEnum | null; + /** + * Sort order : ASC(Ascending) or DESC(Descending). + */ + 'order'?: SortOptionOrderEnum | null; + + static readonly discriminator: string | undefined = undefined; + + static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ + { + "name": "field_name", + "baseName": "field_name", + "type": "SortOptionFieldNameEnum", + "format": "" + }, + { + "name": "order", + "baseName": "order", + "type": "SortOptionOrderEnum", + "format": "" + } ]; + + static getAttributeTypeMap() { + return SortOption.attributeTypeMap; + } + + public constructor() { + } +} + + +export type SortOptionFieldNameEnum = "DEFAULT" | "NAME" | "DISPLAY_NAME" | "AUTHOR" | "CREATED" | "MODIFIED" ; +export type SortOptionOrderEnum = "ASC" | "DESC" ; + diff --git a/sdks/typescript/models/SortOptionInput.ts b/sdks/typescript/models/SortOptionInput.ts new file mode 100644 index 000000000..646f6fcf0 --- /dev/null +++ b/sdks/typescript/models/SortOptionInput.ts @@ -0,0 +1,52 @@ +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { HttpFile } from '../http/http'; + +export class SortOptionInput { + /** + * Name of the field to apply the sort on. + */ + 'field_name'?: SortOptionInputFieldNameEnum | null; + /** + * Sort order : ASC(Ascending) or DESC(Descending). + */ + 'order'?: SortOptionInputOrderEnum | null; + + static readonly discriminator: string | undefined = undefined; + + static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ + { + "name": "field_name", + "baseName": "field_name", + "type": "SortOptionInputFieldNameEnum", + "format": "" + }, + { + "name": "order", + "baseName": "order", + "type": "SortOptionInputOrderEnum", + "format": "" + } ]; + + static getAttributeTypeMap() { + return SortOptionInput.attributeTypeMap; + } + + public constructor() { + } +} + + +export type SortOptionInputFieldNameEnum = "NAME" | "DISPLAY_NAME" | "AUTHOR" | "CREATED" | "MODIFIED" | "LAST_ACCESSED" | "SYNCED" | "VIEWS" | "USER_STATE" | "ROW_COUNT" ; +export type SortOptionInputOrderEnum = "ASC" | "DESC" ; + diff --git a/sdks/typescript/models/SortOptions.ts b/sdks/typescript/models/SortOptions.ts new file mode 100644 index 000000000..7cf013e6f --- /dev/null +++ b/sdks/typescript/models/SortOptions.ts @@ -0,0 +1,55 @@ +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { HttpFile } from '../http/http'; + +/** +* Sort options. +*/ +export class SortOptions { + /** + * Name of the field to apply the sort on. + */ + 'field_name'?: SortOptionsFieldNameEnum | null; + /** + * Sort order : ASC(Ascending) or DESC(Descending). + */ + 'order'?: SortOptionsOrderEnum | null; + + static readonly discriminator: string | undefined = undefined; + + static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ + { + "name": "field_name", + "baseName": "field_name", + "type": "SortOptionsFieldNameEnum", + "format": "" + }, + { + "name": "order", + "baseName": "order", + "type": "SortOptionsOrderEnum", + "format": "" + } ]; + + static getAttributeTypeMap() { + return SortOptions.attributeTypeMap; + } + + public constructor() { + } +} + + +export type SortOptionsFieldNameEnum = "NAME" | "DISPLAY_NAME" | "AUTHOR" | "CREATED" | "MODIFIED" ; +export type SortOptionsOrderEnum = "ASC" | "DESC" ; + diff --git a/sdks/typescript/models/SortingOptions.ts b/sdks/typescript/models/SortingOptions.ts new file mode 100644 index 000000000..ce1494561 --- /dev/null +++ b/sdks/typescript/models/SortingOptions.ts @@ -0,0 +1,51 @@ +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { HttpFile } from '../http/http'; + +/** +* Sort options. +*/ +export class SortingOptions { + /** + * Name of the field to apply the sort on. + */ + 'field_name'?: string | null; + /** + * Sort order : ASC(Ascending) or DESC(Descending). + */ + 'order'?: string | null; + + static readonly discriminator: string | undefined = undefined; + + static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ + { + "name": "field_name", + "baseName": "field_name", + "type": "string", + "format": "" + }, + { + "name": "order", + "baseName": "order", + "type": "string", + "format": "" + } ]; + + static getAttributeTypeMap() { + return SortingOptions.attributeTypeMap; + } + + public constructor() { + } +} + diff --git a/sdks/typescript/models/SqlQuery.ts b/sdks/typescript/models/SqlQuery.ts new file mode 100644 index 000000000..574db90b7 --- /dev/null +++ b/sdks/typescript/models/SqlQuery.ts @@ -0,0 +1,61 @@ +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { HttpFile } from '../http/http'; + +/** +* Response format associated with fetch SQL query api +*/ +export class SqlQuery { + /** + * Unique identifier of the metadata. + */ + 'metadata_id': string; + /** + * Name of the metadata. + */ + 'metadata_name': string; + /** + * SQL query of a metadata object. + */ + 'sql_query': string; + + static readonly discriminator: string | undefined = undefined; + + static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ + { + "name": "metadata_id", + "baseName": "metadata_id", + "type": "string", + "format": "" + }, + { + "name": "metadata_name", + "baseName": "metadata_name", + "type": "string", + "format": "" + }, + { + "name": "sql_query", + "baseName": "sql_query", + "type": "string", + "format": "" + } ]; + + static getAttributeTypeMap() { + return SqlQuery.attributeTypeMap; + } + + public constructor() { + } +} + diff --git a/sdks/typescript/models/SqlQueryResponse.ts b/sdks/typescript/models/SqlQueryResponse.ts new file mode 100644 index 000000000..4939d01f2 --- /dev/null +++ b/sdks/typescript/models/SqlQueryResponse.ts @@ -0,0 +1,72 @@ +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { SqlQuery } from '../models/SqlQuery'; +import { HttpFile } from '../http/http'; + +export class SqlQueryResponse { + /** + * Unique identifier of the metadata. + */ + 'metadata_id': string; + /** + * Name of the metadata. + */ + 'metadata_name': string; + /** + * Type of the metadata. + */ + 'metadata_type': SqlQueryResponseMetadataTypeEnum; + /** + * SQL query details of metadata objects. + */ + 'sql_queries': Array; + + static readonly discriminator: string | undefined = undefined; + + static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ + { + "name": "metadata_id", + "baseName": "metadata_id", + "type": "string", + "format": "" + }, + { + "name": "metadata_name", + "baseName": "metadata_name", + "type": "string", + "format": "" + }, + { + "name": "metadata_type", + "baseName": "metadata_type", + "type": "SqlQueryResponseMetadataTypeEnum", + "format": "" + }, + { + "name": "sql_queries", + "baseName": "sql_queries", + "type": "Array", + "format": "" + } ]; + + static getAttributeTypeMap() { + return SqlQueryResponse.attributeTypeMap; + } + + public constructor() { + } +} + + +export type SqlQueryResponseMetadataTypeEnum = "LIVEBOARD" | "ANSWER" | "LOGICAL_TABLE" | "LOGICAL_COLUMN" | "CONNECTION" | "TAG" | "USER" | "USER_GROUP" | "LOGICAL_RELATIONSHIP" ; + diff --git a/sdks/typescript/models/StorageConfig.ts b/sdks/typescript/models/StorageConfig.ts new file mode 100644 index 000000000..99c0f1d6a --- /dev/null +++ b/sdks/typescript/models/StorageConfig.ts @@ -0,0 +1,39 @@ +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { AwsS3Config } from '../models/AwsS3Config'; +import { HttpFile } from '../http/http'; + +/** +* Storage configuration containing provider-specific settings. +*/ +export class StorageConfig { + 'aws_s3_config'?: AwsS3Config; + + static readonly discriminator: string | undefined = undefined; + + static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ + { + "name": "aws_s3_config", + "baseName": "aws_s3_config", + "type": "AwsS3Config", + "format": "" + } ]; + + static getAttributeTypeMap() { + return StorageConfig.attributeTypeMap; + } + + public constructor() { + } +} + diff --git a/sdks/typescript/models/StorageConfigInput.ts b/sdks/typescript/models/StorageConfigInput.ts new file mode 100644 index 000000000..45bb8a32a --- /dev/null +++ b/sdks/typescript/models/StorageConfigInput.ts @@ -0,0 +1,39 @@ +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { AwsS3ConfigInput } from '../models/AwsS3ConfigInput'; +import { HttpFile } from '../http/http'; + +/** +* Input type for storage configuration. +*/ +export class StorageConfigInput { + 'aws_s3_config'?: AwsS3ConfigInput; + + static readonly discriminator: string | undefined = undefined; + + static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ + { + "name": "aws_s3_config", + "baseName": "aws_s3_config", + "type": "AwsS3ConfigInput", + "format": "" + } ]; + + static getAttributeTypeMap() { + return StorageConfigInput.attributeTypeMap; + } + + public constructor() { + } +} + diff --git a/sdks/typescript/models/StorageDestination.ts b/sdks/typescript/models/StorageDestination.ts new file mode 100644 index 000000000..8c9c135a5 --- /dev/null +++ b/sdks/typescript/models/StorageDestination.ts @@ -0,0 +1,52 @@ +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { StorageConfig } from '../models/StorageConfig'; +import { HttpFile } from '../http/http'; + +/** +* Storage destination configuration for webhook payload delivery. +*/ +export class StorageDestination { + /** + * Type of storage destination (e.g., AWS_S3). + */ + 'storage_type': StorageDestinationStorageTypeEnum; + 'storage_config': StorageConfig; + + static readonly discriminator: string | undefined = undefined; + + static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ + { + "name": "storage_type", + "baseName": "storage_type", + "type": "StorageDestinationStorageTypeEnum", + "format": "" + }, + { + "name": "storage_config", + "baseName": "storage_config", + "type": "StorageConfig", + "format": "" + } ]; + + static getAttributeTypeMap() { + return StorageDestination.attributeTypeMap; + } + + public constructor() { + } +} + + +export type StorageDestinationStorageTypeEnum = "AWS_S3" ; + diff --git a/sdks/typescript/models/StorageDestinationInput.ts b/sdks/typescript/models/StorageDestinationInput.ts new file mode 100644 index 000000000..71a37219a --- /dev/null +++ b/sdks/typescript/models/StorageDestinationInput.ts @@ -0,0 +1,52 @@ +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { StorageConfigInput } from '../models/StorageConfigInput'; +import { HttpFile } from '../http/http'; + +/** +* Input type for storage destination configuration. +*/ +export class StorageDestinationInput { + /** + * Type of storage destination. Example: \"AWS_S3\" + */ + 'storage_type': StorageDestinationInputStorageTypeEnum; + 'storage_config': StorageConfigInput; + + static readonly discriminator: string | undefined = undefined; + + static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ + { + "name": "storage_type", + "baseName": "storage_type", + "type": "StorageDestinationInputStorageTypeEnum", + "format": "" + }, + { + "name": "storage_config", + "baseName": "storage_config", + "type": "StorageConfigInput", + "format": "" + } ]; + + static getAttributeTypeMap() { + return StorageDestinationInput.attributeTypeMap; + } + + public constructor() { + } +} + + +export type StorageDestinationInputStorageTypeEnum = "AWS_S3" ; + diff --git a/sdks/typescript/models/SyncMetadataRequest.ts b/sdks/typescript/models/SyncMetadataRequest.ts new file mode 100644 index 000000000..2ca20d501 --- /dev/null +++ b/sdks/typescript/models/SyncMetadataRequest.ts @@ -0,0 +1,51 @@ +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { HttpFile } from '../http/http'; + +export class SyncMetadataRequest { + /** + * Array of tables to sync. Each element can be: - String: Table identifier (GUID or name) to sync all columns for that table. - Object: {tableId: [columnIds]} to sync specific columns. If not provided, syncs all tables in the connection. + */ + 'tables'?: any; + /** + * List of sync_attributes to sync from CDW. The default value is DESCRIPTION. + */ + 'sync_attributes'?: Array; + + static readonly discriminator: string | undefined = undefined; + + static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ + { + "name": "tables", + "baseName": "tables", + "type": "any", + "format": "" + }, + { + "name": "sync_attributes", + "baseName": "sync_attributes", + "type": "Array", + "format": "" + } ]; + + static getAttributeTypeMap() { + return SyncMetadataRequest.attributeTypeMap; + } + + public constructor() { + } +} + + +export type SyncMetadataRequestSyncAttributesEnum = "DESCRIPTION" ; + diff --git a/sdks/typescript/models/SyncMetadataResponse.ts b/sdks/typescript/models/SyncMetadataResponse.ts new file mode 100644 index 000000000..a403adf39 --- /dev/null +++ b/sdks/typescript/models/SyncMetadataResponse.ts @@ -0,0 +1,94 @@ +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { HttpFile } from '../http/http'; + +/** +* Response from sync metadata operation. +*/ +export class SyncMetadataResponse { + /** + * Overall status of the sync operation. + */ + 'status'?: SyncMetadataResponseStatusEnum | null; + /** + * Number of tables with metadata updates. + */ + 'tables_updated'?: number | null; + /** + * Number of columns with metadata updates. + */ + 'columns_updated'?: number | null; + /** + * Number of tables that failed to sync (for PARTIAL_SUCCESS). + */ + 'tables_failed'?: number | null; + /** + * Number of columns that failed to sync (for PARTIAL_SUCCESS). + */ + 'columns_failed'?: number | null; + /** + * Message describing the result. + */ + 'message'?: string | null; + + static readonly discriminator: string | undefined = undefined; + + static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ + { + "name": "status", + "baseName": "status", + "type": "SyncMetadataResponseStatusEnum", + "format": "" + }, + { + "name": "tables_updated", + "baseName": "tables_updated", + "type": "number", + "format": "int32" + }, + { + "name": "columns_updated", + "baseName": "columns_updated", + "type": "number", + "format": "int32" + }, + { + "name": "tables_failed", + "baseName": "tables_failed", + "type": "number", + "format": "int32" + }, + { + "name": "columns_failed", + "baseName": "columns_failed", + "type": "number", + "format": "int32" + }, + { + "name": "message", + "baseName": "message", + "type": "string", + "format": "" + } ]; + + static getAttributeTypeMap() { + return SyncMetadataResponse.attributeTypeMap; + } + + public constructor() { + } +} + + +export type SyncMetadataResponseStatusEnum = "SUCCESS" | "PARTIAL_SUCCESS" | "NO_UPDATE" ; + diff --git a/sdks/typescript/models/SystemConfig.ts b/sdks/typescript/models/SystemConfig.ts new file mode 100644 index 000000000..0855a99a6 --- /dev/null +++ b/sdks/typescript/models/SystemConfig.ts @@ -0,0 +1,49 @@ +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { HttpFile } from '../http/http'; + +export class SystemConfig { + 'onboarding_content_url'?: string | null; + 'saml_enabled'?: boolean | null; + 'okta_enabled'?: boolean | null; + + static readonly discriminator: string | undefined = undefined; + + static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ + { + "name": "onboarding_content_url", + "baseName": "onboarding_content_url", + "type": "string", + "format": "" + }, + { + "name": "saml_enabled", + "baseName": "saml_enabled", + "type": "boolean", + "format": "" + }, + { + "name": "okta_enabled", + "baseName": "okta_enabled", + "type": "boolean", + "format": "" + } ]; + + static getAttributeTypeMap() { + return SystemConfig.attributeTypeMap; + } + + public constructor() { + } +} + diff --git a/sdks/typescript/models/SystemInfo.ts b/sdks/typescript/models/SystemInfo.ts new file mode 100644 index 000000000..877050977 --- /dev/null +++ b/sdks/typescript/models/SystemInfo.ts @@ -0,0 +1,258 @@ +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { HttpFile } from '../http/http'; + +export class SystemInfo { + /** + * The unique identifier of the object + */ + 'id'?: string | null; + /** + * Name of the cluster. + */ + 'name'?: string | null; + /** + * The release version of the cluster. + */ + 'release_version'?: string | null; + /** + * The timezone of the cluster. + */ + 'time_zone'?: string | null; + /** + * The default locale of the cluster. + */ + 'locale'?: string | null; + /** + * The default date format representation of the cluster. + */ + 'date_format'?: string | null; + /** + * The API version of the cluster. + */ + 'api_version'?: string | null; + /** + * The deployment type of the cluster. + */ + 'type'?: string | null; + /** + * The deployed environment of the cluster. + */ + 'environment'?: string | null; + /** + * The license applied to the cluster. + */ + 'license'?: string | null; + /** + * The default date time format representation of the cluster. + */ + 'date_time_format'?: string | null; + /** + * The default time format representation of the cluster. + */ + 'time_format'?: string | null; + /** + * The unique identifier of system user. + */ + 'system_user_id'?: string | null; + /** + * The unique identifier of super user. + */ + 'super_user_id'?: string | null; + /** + * The unique identifier of hidden object. + */ + 'hidden_object_id'?: string | null; + /** + * The unique identifier of system group. + */ + 'system_group_id'?: string | null; + /** + * The unique identifier of tsadmin user. + */ + 'tsadmin_user_id'?: string | null; + /** + * The unique identifier of admin group. + */ + 'admin_group_id'?: string | null; + /** + * The unique identifier of all tables connection. + */ + 'all_tables_connection_id'?: string | null; + /** + * The unique identifier of ALL group. + */ + 'all_user_group_id'?: string | null; + /** + * The supported accept language by the cluster. + */ + 'accept_language'?: string | null; + /** + * The count of users of ALL group. + */ + 'all_user_group_member_user_count'?: number | null; + /** + * The version number of logical model of the cluster. + */ + 'logical_model_version'?: number | null; + + static readonly discriminator: string | undefined = undefined; + + static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ + { + "name": "id", + "baseName": "id", + "type": "string", + "format": "" + }, + { + "name": "name", + "baseName": "name", + "type": "string", + "format": "" + }, + { + "name": "release_version", + "baseName": "release_version", + "type": "string", + "format": "" + }, + { + "name": "time_zone", + "baseName": "time_zone", + "type": "string", + "format": "" + }, + { + "name": "locale", + "baseName": "locale", + "type": "string", + "format": "" + }, + { + "name": "date_format", + "baseName": "date_format", + "type": "string", + "format": "" + }, + { + "name": "api_version", + "baseName": "api_version", + "type": "string", + "format": "" + }, + { + "name": "type", + "baseName": "type", + "type": "string", + "format": "" + }, + { + "name": "environment", + "baseName": "environment", + "type": "string", + "format": "" + }, + { + "name": "license", + "baseName": "license", + "type": "string", + "format": "" + }, + { + "name": "date_time_format", + "baseName": "date_time_format", + "type": "string", + "format": "" + }, + { + "name": "time_format", + "baseName": "time_format", + "type": "string", + "format": "" + }, + { + "name": "system_user_id", + "baseName": "system_user_id", + "type": "string", + "format": "" + }, + { + "name": "super_user_id", + "baseName": "super_user_id", + "type": "string", + "format": "" + }, + { + "name": "hidden_object_id", + "baseName": "hidden_object_id", + "type": "string", + "format": "" + }, + { + "name": "system_group_id", + "baseName": "system_group_id", + "type": "string", + "format": "" + }, + { + "name": "tsadmin_user_id", + "baseName": "tsadmin_user_id", + "type": "string", + "format": "" + }, + { + "name": "admin_group_id", + "baseName": "admin_group_id", + "type": "string", + "format": "" + }, + { + "name": "all_tables_connection_id", + "baseName": "all_tables_connection_id", + "type": "string", + "format": "" + }, + { + "name": "all_user_group_id", + "baseName": "all_user_group_id", + "type": "string", + "format": "" + }, + { + "name": "accept_language", + "baseName": "accept_language", + "type": "string", + "format": "" + }, + { + "name": "all_user_group_member_user_count", + "baseName": "all_user_group_member_user_count", + "type": "number", + "format": "int32" + }, + { + "name": "logical_model_version", + "baseName": "logical_model_version", + "type": "number", + "format": "int32" + } ]; + + static getAttributeTypeMap() { + return SystemInfo.attributeTypeMap; + } + + public constructor() { + } +} + diff --git a/sdks/typescript/models/SystemOverrideInfo.ts b/sdks/typescript/models/SystemOverrideInfo.ts new file mode 100644 index 000000000..28a7d2a1a --- /dev/null +++ b/sdks/typescript/models/SystemOverrideInfo.ts @@ -0,0 +1,35 @@ +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { HttpFile } from '../http/http'; + +export class SystemOverrideInfo { + 'config_override_info'?: any | null; + + static readonly discriminator: string | undefined = undefined; + + static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ + { + "name": "config_override_info", + "baseName": "config_override_info", + "type": "any", + "format": "" + } ]; + + static getAttributeTypeMap() { + return SystemOverrideInfo.attributeTypeMap; + } + + public constructor() { + } +} + diff --git a/sdks/typescript/models/Table.ts b/sdks/typescript/models/Table.ts new file mode 100644 index 000000000..fa33bbb7f --- /dev/null +++ b/sdks/typescript/models/Table.ts @@ -0,0 +1,99 @@ +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { Column } from '../models/Column'; +import { HttpFile } from '../http/http'; + +export class Table { + /** + * Name of the table. + */ + 'name': string; + /** + * Columns of the table. + */ + 'columns'?: Array | null; + /** + * Type of table. Either view or table + */ + 'type'?: string | null; + /** + * Description of the table + */ + 'description'?: string | null; + /** + * Determines if the table is selected + */ + 'selected'?: boolean | null; + /** + * Determines if the table is linked + */ + 'linked'?: boolean | null; + /** + * List of relationships for the table + */ + 'relationships'?: Array | null; + + static readonly discriminator: string | undefined = undefined; + + static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ + { + "name": "name", + "baseName": "name", + "type": "string", + "format": "" + }, + { + "name": "columns", + "baseName": "columns", + "type": "Array", + "format": "" + }, + { + "name": "type", + "baseName": "type", + "type": "string", + "format": "" + }, + { + "name": "description", + "baseName": "description", + "type": "string", + "format": "" + }, + { + "name": "selected", + "baseName": "selected", + "type": "boolean", + "format": "" + }, + { + "name": "linked", + "baseName": "linked", + "type": "boolean", + "format": "" + }, + { + "name": "relationships", + "baseName": "relationships", + "type": "Array", + "format": "" + } ]; + + static getAttributeTypeMap() { + return Table.attributeTypeMap; + } + + public constructor() { + } +} + diff --git a/sdks/typescript/models/Tag.ts b/sdks/typescript/models/Tag.ts new file mode 100644 index 000000000..3a01ed320 --- /dev/null +++ b/sdks/typescript/models/Tag.ts @@ -0,0 +1,112 @@ +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { HttpFile } from '../http/http'; + +export class Tag { + 'name': string; + 'id': string; + 'color'?: string | null; + 'deleted'?: boolean | null; + 'hidden'?: boolean | null; + 'external'?: boolean | null; + 'deprecated'?: boolean | null; + 'creation_time_in_millis'?: number | null; + 'modification_time_in_millis'?: number | null; + 'author_id'?: string | null; + 'modifier_id'?: string | null; + 'owner_id'?: string | null; + + static readonly discriminator: string | undefined = undefined; + + static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ + { + "name": "name", + "baseName": "name", + "type": "string", + "format": "" + }, + { + "name": "id", + "baseName": "id", + "type": "string", + "format": "" + }, + { + "name": "color", + "baseName": "color", + "type": "string", + "format": "" + }, + { + "name": "deleted", + "baseName": "deleted", + "type": "boolean", + "format": "" + }, + { + "name": "hidden", + "baseName": "hidden", + "type": "boolean", + "format": "" + }, + { + "name": "external", + "baseName": "external", + "type": "boolean", + "format": "" + }, + { + "name": "deprecated", + "baseName": "deprecated", + "type": "boolean", + "format": "" + }, + { + "name": "creation_time_in_millis", + "baseName": "creation_time_in_millis", + "type": "number", + "format": "float" + }, + { + "name": "modification_time_in_millis", + "baseName": "modification_time_in_millis", + "type": "number", + "format": "float" + }, + { + "name": "author_id", + "baseName": "author_id", + "type": "string", + "format": "" + }, + { + "name": "modifier_id", + "baseName": "modifier_id", + "type": "string", + "format": "" + }, + { + "name": "owner_id", + "baseName": "owner_id", + "type": "string", + "format": "" + } ]; + + static getAttributeTypeMap() { + return Tag.attributeTypeMap; + } + + public constructor() { + } +} + diff --git a/sdks/typescript/models/TagMetadataTypeInput.ts b/sdks/typescript/models/TagMetadataTypeInput.ts new file mode 100644 index 000000000..c467dcf3c --- /dev/null +++ b/sdks/typescript/models/TagMetadataTypeInput.ts @@ -0,0 +1,51 @@ +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { HttpFile } from '../http/http'; + +export class TagMetadataTypeInput { + /** + * Type of metadata. Required if the name of the object is set as the identifier. This attribute is optional when the object GUID is specified as the identifier. 1. LIVEBOARD 2. ANSWERS 3. LOGICAL_TABLE for any data object such as table, worksheet or view. 4. LOGICAL_COLUMN for a column of any data object such as tables, worksheets or views. + */ + 'type'?: TagMetadataTypeInputTypeEnum | null; + /** + * Unique ID or name of the metadata. + */ + 'identifier': string; + + static readonly discriminator: string | undefined = undefined; + + static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ + { + "name": "type", + "baseName": "type", + "type": "TagMetadataTypeInputTypeEnum", + "format": "" + }, + { + "name": "identifier", + "baseName": "identifier", + "type": "string", + "format": "" + } ]; + + static getAttributeTypeMap() { + return TagMetadataTypeInput.attributeTypeMap; + } + + public constructor() { + } +} + + +export type TagMetadataTypeInputTypeEnum = "LIVEBOARD" | "ANSWER" | "LOGICAL_TABLE" | "LOGICAL_COLUMN" | "CONNECTION" | "COLLECTION" ; + diff --git a/sdks/typescript/models/TemplatePropertiesInputCreate.ts b/sdks/typescript/models/TemplatePropertiesInputCreate.ts new file mode 100644 index 000000000..e002395fa --- /dev/null +++ b/sdks/typescript/models/TemplatePropertiesInputCreate.ts @@ -0,0 +1,311 @@ +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { HttpFile } from '../http/http'; + +/** +* Email customization configuration properties +*/ +export class TemplatePropertiesInputCreate { + /** + * Background color for call-to-action button in hex format + */ + 'cta_button_bg_color'?: string | null; + /** + * Text color for call-to-action button in hex format + */ + 'cta_text_font_color'?: string | null; + /** + * Primary background color in hex format + */ + 'primary_bg_color'?: string | null; + /** + * Home page URL (HTTP/HTTPS only) + */ + 'home_url'?: string | null; + /** + * Logo image URL (HTTP/HTTPS only) + */ + 'logo_url'?: string | null; + /** + * Font family for email content (e.g., Arial, sans-serif) + */ + 'font_family'?: string | null; + /** + * Product name to display + */ + 'product_name'?: string | null; + /** + * Footer address text + */ + 'footer_address'?: string | null; + /** + * Footer phone number + */ + 'footer_phone'?: string | null; + /** + * Replacement value for Liveboard + */ + 'replacement_value_for_liveboard'?: string | null; + /** + * Replacement value for Answer + */ + 'replacement_value_for_answer'?: string | null; + /** + * Replacement value for SpotIQ + */ + 'replacement_value_for_spot_iq'?: string | null; + /** + * Whether to hide footer address + */ + 'hide_footer_address'?: boolean | null; + /** + * Whether to hide footer phone number + */ + 'hide_footer_phone'?: boolean | null; + /** + * Whether to hide manage notification link + */ + 'hide_manage_notification'?: boolean | null; + /** + * Whether to hide mobile app nudge + */ + 'hide_mobile_app_nudge'?: boolean | null; + /** + * Whether to hide privacy policy link + */ + 'hide_privacy_policy'?: boolean | null; + /** + * Whether to hide product name + */ + 'hide_product_name'?: boolean | null; + /** + * Whether to hide ThoughtSpot vocabulary definitions + */ + 'hide_ts_vocabulary_definitions'?: boolean | null; + /** + * Whether to hide notification status + */ + 'hide_notification_status'?: boolean | null; + /** + * Whether to hide error message + */ + 'hide_error_message'?: boolean | null; + /** + * Whether to hide unsubscribe link + */ + 'hide_unsubscribe_link'?: boolean | null; + /** + * Whether to hide modify alert + */ + 'hide_modify_alert'?: boolean | null; + /** + * Company privacy policy URL (HTTP/HTTPS only) + */ + 'company_privacy_policy_url'?: string | null; + /** + * Company website URL (HTTP/HTTPS only) + */ + 'company_website_url'?: string | null; + /** + * Contact support url (HTTP/HTTPS only). Version: 26.2.0.cl or later + */ + 'contact_support_url'?: string | null; + /** + * Whether to hide contact support url. Version: 26.2.0.cl or later + */ + 'hide_contact_support_url'?: boolean | null; + /** + * Whether to hide logo Version: 26.4.0.cl or later + */ + 'hide_logo_url'?: boolean | null; + + static readonly discriminator: string | undefined = undefined; + + static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ + { + "name": "cta_button_bg_color", + "baseName": "cta_button_bg_color", + "type": "string", + "format": "" + }, + { + "name": "cta_text_font_color", + "baseName": "cta_text_font_color", + "type": "string", + "format": "" + }, + { + "name": "primary_bg_color", + "baseName": "primary_bg_color", + "type": "string", + "format": "" + }, + { + "name": "home_url", + "baseName": "home_url", + "type": "string", + "format": "" + }, + { + "name": "logo_url", + "baseName": "logo_url", + "type": "string", + "format": "" + }, + { + "name": "font_family", + "baseName": "font_family", + "type": "string", + "format": "" + }, + { + "name": "product_name", + "baseName": "product_name", + "type": "string", + "format": "" + }, + { + "name": "footer_address", + "baseName": "footer_address", + "type": "string", + "format": "" + }, + { + "name": "footer_phone", + "baseName": "footer_phone", + "type": "string", + "format": "" + }, + { + "name": "replacement_value_for_liveboard", + "baseName": "replacement_value_for_liveboard", + "type": "string", + "format": "" + }, + { + "name": "replacement_value_for_answer", + "baseName": "replacement_value_for_answer", + "type": "string", + "format": "" + }, + { + "name": "replacement_value_for_spot_iq", + "baseName": "replacement_value_for_spot_iq", + "type": "string", + "format": "" + }, + { + "name": "hide_footer_address", + "baseName": "hide_footer_address", + "type": "boolean", + "format": "" + }, + { + "name": "hide_footer_phone", + "baseName": "hide_footer_phone", + "type": "boolean", + "format": "" + }, + { + "name": "hide_manage_notification", + "baseName": "hide_manage_notification", + "type": "boolean", + "format": "" + }, + { + "name": "hide_mobile_app_nudge", + "baseName": "hide_mobile_app_nudge", + "type": "boolean", + "format": "" + }, + { + "name": "hide_privacy_policy", + "baseName": "hide_privacy_policy", + "type": "boolean", + "format": "" + }, + { + "name": "hide_product_name", + "baseName": "hide_product_name", + "type": "boolean", + "format": "" + }, + { + "name": "hide_ts_vocabulary_definitions", + "baseName": "hide_ts_vocabulary_definitions", + "type": "boolean", + "format": "" + }, + { + "name": "hide_notification_status", + "baseName": "hide_notification_status", + "type": "boolean", + "format": "" + }, + { + "name": "hide_error_message", + "baseName": "hide_error_message", + "type": "boolean", + "format": "" + }, + { + "name": "hide_unsubscribe_link", + "baseName": "hide_unsubscribe_link", + "type": "boolean", + "format": "" + }, + { + "name": "hide_modify_alert", + "baseName": "hide_modify_alert", + "type": "boolean", + "format": "" + }, + { + "name": "company_privacy_policy_url", + "baseName": "company_privacy_policy_url", + "type": "string", + "format": "" + }, + { + "name": "company_website_url", + "baseName": "company_website_url", + "type": "string", + "format": "" + }, + { + "name": "contact_support_url", + "baseName": "contact_support_url", + "type": "string", + "format": "" + }, + { + "name": "hide_contact_support_url", + "baseName": "hide_contact_support_url", + "type": "boolean", + "format": "" + }, + { + "name": "hide_logo_url", + "baseName": "hide_logo_url", + "type": "boolean", + "format": "" + } ]; + + static getAttributeTypeMap() { + return TemplatePropertiesInputCreate.attributeTypeMap; + } + + public constructor() { + } +} + diff --git a/sdks/typescript/models/Token.ts b/sdks/typescript/models/Token.ts new file mode 100644 index 000000000..60f66e3a0 --- /dev/null +++ b/sdks/typescript/models/Token.ts @@ -0,0 +1,86 @@ +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { Scope } from '../models/Scope'; +import { HttpFile } from '../http/http'; + +export class Token { + /** + * Bearer auth token. + */ + 'token': string; + /** + * Token creation time in milliseconds. + */ + 'creation_time_in_millis': number; + /** + * Token expiration time in milliseconds. + */ + 'expiration_time_in_millis': number; + 'scope': Scope; + /** + * Username to whom the token is issued. + */ + 'valid_for_user_id': string; + /** + * Unique identifier of the user to whom the token is issued. + */ + 'valid_for_username': string; + + static readonly discriminator: string | undefined = undefined; + + static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ + { + "name": "token", + "baseName": "token", + "type": "string", + "format": "" + }, + { + "name": "creation_time_in_millis", + "baseName": "creation_time_in_millis", + "type": "number", + "format": "float" + }, + { + "name": "expiration_time_in_millis", + "baseName": "expiration_time_in_millis", + "type": "number", + "format": "float" + }, + { + "name": "scope", + "baseName": "scope", + "type": "Scope", + "format": "" + }, + { + "name": "valid_for_user_id", + "baseName": "valid_for_user_id", + "type": "string", + "format": "" + }, + { + "name": "valid_for_username", + "baseName": "valid_for_username", + "type": "string", + "format": "" + } ]; + + static getAttributeTypeMap() { + return Token.attributeTypeMap; + } + + public constructor() { + } +} + diff --git a/sdks/typescript/models/TokenAccessScopeObject.ts b/sdks/typescript/models/TokenAccessScopeObject.ts new file mode 100644 index 000000000..fee4693fa --- /dev/null +++ b/sdks/typescript/models/TokenAccessScopeObject.ts @@ -0,0 +1,54 @@ +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { HttpFile } from '../http/http'; + +/** +* Objects on which the filter rules and parameters values should be applied to +*/ +export class TokenAccessScopeObject { + /** + * Type of object. Required if the name of the object is set as the identifier. This attribute is optional when the object GUID is specified as the identifier. Specify the object type as `LOGICAL_TABLE`. + */ + 'type'?: TokenAccessScopeObjectTypeEnum | null; + /** + * Unique name/id of the object. + */ + 'identifier': string; + + static readonly discriminator: string | undefined = undefined; + + static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ + { + "name": "type", + "baseName": "type", + "type": "TokenAccessScopeObjectTypeEnum", + "format": "" + }, + { + "name": "identifier", + "baseName": "identifier", + "type": "string", + "format": "" + } ]; + + static getAttributeTypeMap() { + return TokenAccessScopeObject.attributeTypeMap; + } + + public constructor() { + } +} + + +export type TokenAccessScopeObjectTypeEnum = "LOGICAL_TABLE" ; + diff --git a/sdks/typescript/models/TokenValidationResponse.ts b/sdks/typescript/models/TokenValidationResponse.ts new file mode 100644 index 000000000..daaf1b4a4 --- /dev/null +++ b/sdks/typescript/models/TokenValidationResponse.ts @@ -0,0 +1,76 @@ +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { Scope } from '../models/Scope'; +import { HttpFile } from '../http/http'; + +export class TokenValidationResponse { + /** + * Token creation time in milliseconds. + */ + 'creation_time_in_millis': number; + /** + * Token expiration time in milliseconds. + */ + 'expiration_time_in_millis': number; + 'scope': Scope; + /** + * Username to whom the token is issued. + */ + 'valid_for_user_id': string; + /** + * Type of token. + */ + 'token_type': string; + + static readonly discriminator: string | undefined = undefined; + + static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ + { + "name": "creation_time_in_millis", + "baseName": "creation_time_in_millis", + "type": "number", + "format": "float" + }, + { + "name": "expiration_time_in_millis", + "baseName": "expiration_time_in_millis", + "type": "number", + "format": "float" + }, + { + "name": "scope", + "baseName": "scope", + "type": "Scope", + "format": "" + }, + { + "name": "valid_for_user_id", + "baseName": "valid_for_user_id", + "type": "string", + "format": "" + }, + { + "name": "token_type", + "baseName": "token_type", + "type": "string", + "format": "" + } ]; + + static getAttributeTypeMap() { + return TokenValidationResponse.attributeTypeMap; + } + + public constructor() { + } +} + diff --git a/sdks/typescript/models/URL.ts b/sdks/typescript/models/URL.ts new file mode 100644 index 000000000..18804ca32 --- /dev/null +++ b/sdks/typescript/models/URL.ts @@ -0,0 +1,70 @@ +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { Authentication } from '../models/Authentication'; +import { ParametersListItem } from '../models/ParametersListItem'; +import { HttpFile } from '../http/http'; + +/** +* URL Custom Action Type +*/ +export class URL { + 'authentication'?: Authentication; + /** + * Query parameters for url. + */ + 'parameters'?: Array | null; + /** + * Request Url for the Custom action. + */ + 'url': string; + /** + * Reference name of the SDK. By default, the value will be set to action name. + */ + 'reference'?: string | null; + + static readonly discriminator: string | undefined = undefined; + + static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ + { + "name": "authentication", + "baseName": "authentication", + "type": "Authentication", + "format": "" + }, + { + "name": "parameters", + "baseName": "parameters", + "type": "Array", + "format": "" + }, + { + "name": "url", + "baseName": "url", + "type": "string", + "format": "" + }, + { + "name": "reference", + "baseName": "reference", + "type": "string", + "format": "" + } ]; + + static getAttributeTypeMap() { + return URL.attributeTypeMap; + } + + public constructor() { + } +} + diff --git a/sdks/typescript/models/URLInput.ts b/sdks/typescript/models/URLInput.ts new file mode 100644 index 000000000..7064c5089 --- /dev/null +++ b/sdks/typescript/models/URLInput.ts @@ -0,0 +1,70 @@ +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { AuthenticationInput } from '../models/AuthenticationInput'; +import { ParametersListItemInput } from '../models/ParametersListItemInput'; +import { HttpFile } from '../http/http'; + +/** +* URL Custom Action Type +*/ +export class URLInput { + 'authentication'?: AuthenticationInput; + /** + * Query parameters for url. + */ + 'parameters'?: Array | null; + /** + * Request Url for the Custom action. + */ + 'url'?: string | null; + /** + * Reference name. By default the value will be set to action name + */ + 'reference'?: string | null; + + static readonly discriminator: string | undefined = undefined; + + static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ + { + "name": "authentication", + "baseName": "authentication", + "type": "AuthenticationInput", + "format": "" + }, + { + "name": "parameters", + "baseName": "parameters", + "type": "Array", + "format": "" + }, + { + "name": "url", + "baseName": "url", + "type": "string", + "format": "" + }, + { + "name": "reference", + "baseName": "reference", + "type": "string", + "format": "" + } ]; + + static getAttributeTypeMap() { + return URLInput.attributeTypeMap; + } + + public constructor() { + } +} + diff --git a/sdks/typescript/models/URLInputMandatory.ts b/sdks/typescript/models/URLInputMandatory.ts new file mode 100644 index 000000000..6c86354cc --- /dev/null +++ b/sdks/typescript/models/URLInputMandatory.ts @@ -0,0 +1,70 @@ +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { AuthenticationInput } from '../models/AuthenticationInput'; +import { ParametersListItemInput } from '../models/ParametersListItemInput'; +import { HttpFile } from '../http/http'; + +/** +* URL Custom Action Type +*/ +export class URLInputMandatory { + 'authentication'?: AuthenticationInput; + /** + * Query parameters for url. + */ + 'parameters'?: Array | null; + /** + * Request Url for the Custom action. + */ + 'url': string; + /** + * Reference name. By default the value will be set to action name + */ + 'reference'?: string | null; + + static readonly discriminator: string | undefined = undefined; + + static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ + { + "name": "authentication", + "baseName": "authentication", + "type": "AuthenticationInput", + "format": "" + }, + { + "name": "parameters", + "baseName": "parameters", + "type": "Array", + "format": "" + }, + { + "name": "url", + "baseName": "url", + "type": "string", + "format": "" + }, + { + "name": "reference", + "baseName": "reference", + "type": "string", + "format": "" + } ]; + + static getAttributeTypeMap() { + return URLInputMandatory.attributeTypeMap; + } + + public constructor() { + } +} + diff --git a/sdks/typescript/models/UnassignTagRequest.ts b/sdks/typescript/models/UnassignTagRequest.ts new file mode 100644 index 000000000..728bce824 --- /dev/null +++ b/sdks/typescript/models/UnassignTagRequest.ts @@ -0,0 +1,49 @@ +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { TagMetadataTypeInput } from '../models/TagMetadataTypeInput'; +import { HttpFile } from '../http/http'; + +export class UnassignTagRequest { + /** + * Metadata objects. + */ + 'metadata': Array; + /** + * GUID or name of the tag. + */ + 'tag_identifiers': Array; + + static readonly discriminator: string | undefined = undefined; + + static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ + { + "name": "metadata", + "baseName": "metadata", + "type": "Array", + "format": "" + }, + { + "name": "tag_identifiers", + "baseName": "tag_identifiers", + "type": "Array", + "format": "" + } ]; + + static getAttributeTypeMap() { + return UnassignTagRequest.attributeTypeMap; + } + + public constructor() { + } +} + diff --git a/sdks/typescript/models/UnparameterizeMetadataRequest.ts b/sdks/typescript/models/UnparameterizeMetadataRequest.ts new file mode 100644 index 000000000..af4612892 --- /dev/null +++ b/sdks/typescript/models/UnparameterizeMetadataRequest.ts @@ -0,0 +1,82 @@ +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { HttpFile } from '../http/http'; + +export class UnparameterizeMetadataRequest { + /** + * Type of metadata object to unparameterize. + */ + 'metadata_type'?: UnparameterizeMetadataRequestMetadataTypeEnum; + /** + * Unique ID or name of the metadata object to unparameterize. + */ + 'metadata_identifier': string; + /** + * Type of field in the metadata to unparameterize. + */ + 'field_type': UnparameterizeMetadataRequestFieldTypeEnum; + /** + * Name of the field which needs to be unparameterized. + */ + 'field_name': string; + /** + * The value to use in place of the variable for the field + */ + 'value': string; + + static readonly discriminator: string | undefined = undefined; + + static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ + { + "name": "metadata_type", + "baseName": "metadata_type", + "type": "UnparameterizeMetadataRequestMetadataTypeEnum", + "format": "" + }, + { + "name": "metadata_identifier", + "baseName": "metadata_identifier", + "type": "string", + "format": "" + }, + { + "name": "field_type", + "baseName": "field_type", + "type": "UnparameterizeMetadataRequestFieldTypeEnum", + "format": "" + }, + { + "name": "field_name", + "baseName": "field_name", + "type": "string", + "format": "" + }, + { + "name": "value", + "baseName": "value", + "type": "string", + "format": "" + } ]; + + static getAttributeTypeMap() { + return UnparameterizeMetadataRequest.attributeTypeMap; + } + + public constructor() { + } +} + + +export type UnparameterizeMetadataRequestMetadataTypeEnum = "LOGICAL_TABLE" | "CONNECTION" | "CONNECTION_CONFIG" ; +export type UnparameterizeMetadataRequestFieldTypeEnum = "ATTRIBUTE" | "CONNECTION_PROPERTY" ; + diff --git a/sdks/typescript/models/UnpublishMetadataRequest.ts b/sdks/typescript/models/UnpublishMetadataRequest.ts new file mode 100644 index 000000000..d5a068bbc --- /dev/null +++ b/sdks/typescript/models/UnpublishMetadataRequest.ts @@ -0,0 +1,69 @@ +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { PublishMetadataListItem } from '../models/PublishMetadataListItem'; +import { HttpFile } from '../http/http'; + +export class UnpublishMetadataRequest { + /** + * Force unpublishes the object. This will break all the dependent objects in the unpublished orgs. + */ + 'force'?: boolean | null; + /** + * Should we unpublish all the dependencies for the objects specified. The dependencies will be unpublished if no other published object is using it. + */ + 'include_dependencies': boolean; + /** + * Metadata objects. + */ + 'metadata': Array; + /** + * Unique ID or name of orgs. + */ + 'org_identifiers': Array; + + static readonly discriminator: string | undefined = undefined; + + static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ + { + "name": "force", + "baseName": "force", + "type": "boolean", + "format": "" + }, + { + "name": "include_dependencies", + "baseName": "include_dependencies", + "type": "boolean", + "format": "" + }, + { + "name": "metadata", + "baseName": "metadata", + "type": "Array", + "format": "" + }, + { + "name": "org_identifiers", + "baseName": "org_identifiers", + "type": "Array", + "format": "" + } ]; + + static getAttributeTypeMap() { + return UnpublishMetadataRequest.attributeTypeMap; + } + + public constructor() { + } +} + diff --git a/sdks/typescript/models/UpdateCalendarRequest.ts b/sdks/typescript/models/UpdateCalendarRequest.ts new file mode 100644 index 000000000..af3cb41d7 --- /dev/null +++ b/sdks/typescript/models/UpdateCalendarRequest.ts @@ -0,0 +1,122 @@ +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { UpdateCalendarRequestTableReference } from '../models/UpdateCalendarRequestTableReference'; +import { HttpFile } from '../http/http'; + +export class UpdateCalendarRequest { + /** + * Type of update operation. + */ + 'update_method'?: UpdateCalendarRequestUpdateMethodEnum; + 'table_reference': UpdateCalendarRequestTableReference; + /** + * Start date for the calendar in `MM/dd/yyyy` format. This parameter is mandatory if `update_method` is set as `FROM_INPUT_PARAMS`. + */ + 'start_date'?: string; + /** + * End date for the calendar in `MM/dd/yyyy` format. This parameter is mandatory if `update_method` is set as `FROM_INPUT_PARAMS`. + */ + 'end_date'?: string; + /** + * Type of the calendar. + */ + 'calendar_type'?: UpdateCalendarRequestCalendarTypeEnum; + /** + * Specify the month in which the fiscal or custom calendar year should start. For example, if you set `month_offset` to \"April\", the custom calendar will treat \"April\" as the first month of the year, and the related attributes such as quarters and start date will be based on this offset. The default value is `January`, which represents the standard calendar year (January to December). + */ + 'month_offset'?: UpdateCalendarRequestMonthOffsetEnum; + /** + * Specify the starting day of the week + */ + 'start_day_of_week'?: UpdateCalendarRequestStartDayOfWeekEnum; + /** + * Prefix to add before the quarter. + */ + 'quarter_name_prefix'?: string; + /** + * Prefix to add before the year. + */ + 'year_name_prefix'?: string; + + static readonly discriminator: string | undefined = undefined; + + static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ + { + "name": "update_method", + "baseName": "update_method", + "type": "UpdateCalendarRequestUpdateMethodEnum", + "format": "" + }, + { + "name": "table_reference", + "baseName": "table_reference", + "type": "UpdateCalendarRequestTableReference", + "format": "" + }, + { + "name": "start_date", + "baseName": "start_date", + "type": "string", + "format": "" + }, + { + "name": "end_date", + "baseName": "end_date", + "type": "string", + "format": "" + }, + { + "name": "calendar_type", + "baseName": "calendar_type", + "type": "UpdateCalendarRequestCalendarTypeEnum", + "format": "" + }, + { + "name": "month_offset", + "baseName": "month_offset", + "type": "UpdateCalendarRequestMonthOffsetEnum", + "format": "" + }, + { + "name": "start_day_of_week", + "baseName": "start_day_of_week", + "type": "UpdateCalendarRequestStartDayOfWeekEnum", + "format": "" + }, + { + "name": "quarter_name_prefix", + "baseName": "quarter_name_prefix", + "type": "string", + "format": "" + }, + { + "name": "year_name_prefix", + "baseName": "year_name_prefix", + "type": "string", + "format": "" + } ]; + + static getAttributeTypeMap() { + return UpdateCalendarRequest.attributeTypeMap; + } + + public constructor() { + } +} + + +export type UpdateCalendarRequestUpdateMethodEnum = "FROM_INPUT_PARAMS" | "FROM_EXISTING_TABLE" ; +export type UpdateCalendarRequestCalendarTypeEnum = "MONTH_OFFSET" | "FOUR_FOUR_FIVE" | "FOUR_FIVE_FOUR" | "FIVE_FOUR_FOUR" ; +export type UpdateCalendarRequestMonthOffsetEnum = "January" | "February" | "March" | "April" | "May" | "June" | "July" | "August" | "September" | "October" | "November" | "December" ; +export type UpdateCalendarRequestStartDayOfWeekEnum = "Sunday" | "Monday" | "Tuesday" | "Wednesday" | "Thursday" | "Friday" | "Saturday" ; + diff --git a/sdks/typescript/models/UpdateCalendarRequestTableReference.ts b/sdks/typescript/models/UpdateCalendarRequestTableReference.ts new file mode 100644 index 000000000..d10319a78 --- /dev/null +++ b/sdks/typescript/models/UpdateCalendarRequestTableReference.ts @@ -0,0 +1,71 @@ +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { HttpFile } from '../http/http'; + +/** +* Table reference containing connection identifier and table details in this format: `{\"connection_identifier\":\"conn1\", \"database_name\":\"db1\", \"schema_name\":\"sc1\", \"table_name\":\"tb1\"}`. +*/ +export class UpdateCalendarRequestTableReference { + /** + * Unique ID or name of the connection. + */ + 'connection_identifier': string; + /** + * Name of the database. + */ + 'database_name'?: string | null; + /** + * Name of the schema. + */ + 'schema_name'?: string | null; + /** + * Name of the table. Table names may be case-sensitive depending on the database system. + */ + 'table_name': string; + + static readonly discriminator: string | undefined = undefined; + + static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ + { + "name": "connection_identifier", + "baseName": "connection_identifier", + "type": "string", + "format": "" + }, + { + "name": "database_name", + "baseName": "database_name", + "type": "string", + "format": "" + }, + { + "name": "schema_name", + "baseName": "schema_name", + "type": "string", + "format": "" + }, + { + "name": "table_name", + "baseName": "table_name", + "type": "string", + "format": "" + } ]; + + static getAttributeTypeMap() { + return UpdateCalendarRequestTableReference.attributeTypeMap; + } + + public constructor() { + } +} + diff --git a/sdks/typescript/models/UpdateCollectionRequest.ts b/sdks/typescript/models/UpdateCollectionRequest.ts new file mode 100644 index 000000000..abf0a645e --- /dev/null +++ b/sdks/typescript/models/UpdateCollectionRequest.ts @@ -0,0 +1,72 @@ +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { CollectionMetadataInput } from '../models/CollectionMetadataInput'; +import { HttpFile } from '../http/http'; + +export class UpdateCollectionRequest { + /** + * Name of the collection. + */ + 'name'?: string; + /** + * Description of the collection. + */ + 'description'?: string; + /** + * Metadata objects to add, remove, or replace in the collection. + */ + 'metadata'?: Array; + /** + * Type of update operation. Default operation type is REPLACE. + */ + 'operation'?: UpdateCollectionRequestOperationEnum; + + static readonly discriminator: string | undefined = undefined; + + static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ + { + "name": "name", + "baseName": "name", + "type": "string", + "format": "" + }, + { + "name": "description", + "baseName": "description", + "type": "string", + "format": "" + }, + { + "name": "metadata", + "baseName": "metadata", + "type": "Array", + "format": "" + }, + { + "name": "operation", + "baseName": "operation", + "type": "UpdateCollectionRequestOperationEnum", + "format": "" + } ]; + + static getAttributeTypeMap() { + return UpdateCollectionRequest.attributeTypeMap; + } + + public constructor() { + } +} + + +export type UpdateCollectionRequestOperationEnum = "ADD" | "REMOVE" | "REPLACE" ; + diff --git a/sdks/typescript/models/UpdateColumnSecurityRulesRequest.ts b/sdks/typescript/models/UpdateColumnSecurityRulesRequest.ts new file mode 100644 index 000000000..5062cbc6b --- /dev/null +++ b/sdks/typescript/models/UpdateColumnSecurityRulesRequest.ts @@ -0,0 +1,69 @@ +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { ColumnSecurityRuleUpdate } from '../models/ColumnSecurityRuleUpdate'; +import { HttpFile } from '../http/http'; + +export class UpdateColumnSecurityRulesRequest { + /** + * GUID or name of the table for which we want to create column security rules + */ + 'identifier'?: string; + /** + * The object ID of the table + */ + 'obj_identifier'?: string; + /** + * If true, then all the secured columns will be marked as unprotected, and all the group associations will be removed + */ + 'clear_csr'?: boolean | null; + /** + * Array where each object defines the security rule for a specific column + */ + 'column_security_rules': Array; + + static readonly discriminator: string | undefined = undefined; + + static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ + { + "name": "identifier", + "baseName": "identifier", + "type": "string", + "format": "" + }, + { + "name": "obj_identifier", + "baseName": "obj_identifier", + "type": "string", + "format": "" + }, + { + "name": "clear_csr", + "baseName": "clear_csr", + "type": "boolean", + "format": "" + }, + { + "name": "column_security_rules", + "baseName": "column_security_rules", + "type": "Array", + "format": "" + } ]; + + static getAttributeTypeMap() { + return UpdateColumnSecurityRulesRequest.attributeTypeMap; + } + + public constructor() { + } +} + diff --git a/sdks/typescript/models/UpdateConfigRequest.ts b/sdks/typescript/models/UpdateConfigRequest.ts new file mode 100644 index 000000000..9312d4ee7 --- /dev/null +++ b/sdks/typescript/models/UpdateConfigRequest.ts @@ -0,0 +1,98 @@ +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { HttpFile } from '../http/http'; + +export class UpdateConfigRequest { + /** + * Username to authenticate connection to version control system + */ + 'username'?: string; + /** + * Access token corresponding to the user to authenticate connection to version control system + */ + 'access_token'?: string; + /** + * Applicable when Orgs is enabled in the cluster List of Org ids or name. Provide value -1 for cluster level. Example : [\"OrgID1-or-Name1\", \"OrgID2-or-Name2\"] Note: If no value is specified, then the configurations will be returned for all orgs the user has access to Version: 9.5.0.cl or later + */ + 'org_identifier'?: string; + /** + * List the remote branches to configure. Example:[development, production] + */ + 'branch_names'?: Array; + /** + * Name of the remote branch where objects from this Thoughtspot instance will be versioned. Version: 9.7.0.cl or later + */ + 'commit_branch_name'?: string; + /** + * Maintain mapping of guid for the deployment to an instance Version: 9.4.0.cl or later + */ + 'enable_guid_mapping'?: boolean | null; + /** + * Name of the branch where the configuration files related to operations between Thoughtspot and version control repo should be maintained. Version: 9.7.0.cl or later + */ + 'configuration_branch_name'?: string; + + static readonly discriminator: string | undefined = undefined; + + static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ + { + "name": "username", + "baseName": "username", + "type": "string", + "format": "" + }, + { + "name": "access_token", + "baseName": "access_token", + "type": "string", + "format": "" + }, + { + "name": "org_identifier", + "baseName": "org_identifier", + "type": "string", + "format": "" + }, + { + "name": "branch_names", + "baseName": "branch_names", + "type": "Array", + "format": "" + }, + { + "name": "commit_branch_name", + "baseName": "commit_branch_name", + "type": "string", + "format": "" + }, + { + "name": "enable_guid_mapping", + "baseName": "enable_guid_mapping", + "type": "boolean", + "format": "" + }, + { + "name": "configuration_branch_name", + "baseName": "configuration_branch_name", + "type": "string", + "format": "" + } ]; + + static getAttributeTypeMap() { + return UpdateConfigRequest.attributeTypeMap; + } + + public constructor() { + } +} + diff --git a/sdks/typescript/models/UpdateConnectionConfigurationRequest.ts b/sdks/typescript/models/UpdateConnectionConfigurationRequest.ts new file mode 100644 index 000000000..29bbd8d0a --- /dev/null +++ b/sdks/typescript/models/UpdateConnectionConfigurationRequest.ts @@ -0,0 +1,141 @@ +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { CreateConnectionConfigurationRequestPolicyProcessOptions } from '../models/CreateConnectionConfigurationRequestPolicyProcessOptions'; +import { HttpFile } from '../http/http'; + +export class UpdateConnectionConfigurationRequest { + /** + * Unique ID or name of the connection. + */ + 'connection_identifier': string; + /** + * Name of the configuration to update. + */ + 'name'?: string; + /** + * Description of the configuration. + */ + 'description'?: string; + /** + * Specifies whether the connection configuration should inherit all properties and authentication type from its parent connection. This attribute is only applicable to parameterized connections. When set to true, the configuration uses only the connection properties and authentication type inherited from the parent. Version: 26.2.0.cl or later + */ + 'same_as_parent'?: boolean | null; + 'policy_process_options'?: CreateConnectionConfigurationRequestPolicyProcessOptions; + /** + * Type of authentication. + */ + 'authentication_type'?: UpdateConnectionConfigurationRequestAuthenticationTypeEnum; + /** + * Configuration properties in JSON. + */ + 'configuration'?: any; + /** + * Type of policy. + */ + 'policy_type'?: UpdateConnectionConfigurationRequestPolicyTypeEnum; + /** + * Unique ID or name of the User and User Groups. + */ + 'policy_principals'?: Array; + /** + * Action that the query performed on the data warehouse, such as SAGE_INDEXING and ROW_COUNT_STATS. + */ + 'policy_processes'?: Array; + /** + * Indicates whether the configuration enable/disable. + */ + 'disable'?: boolean | null; + + static readonly discriminator: string | undefined = undefined; + + static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ + { + "name": "connection_identifier", + "baseName": "connection_identifier", + "type": "string", + "format": "" + }, + { + "name": "name", + "baseName": "name", + "type": "string", + "format": "" + }, + { + "name": "description", + "baseName": "description", + "type": "string", + "format": "" + }, + { + "name": "same_as_parent", + "baseName": "same_as_parent", + "type": "boolean", + "format": "" + }, + { + "name": "policy_process_options", + "baseName": "policy_process_options", + "type": "CreateConnectionConfigurationRequestPolicyProcessOptions", + "format": "" + }, + { + "name": "authentication_type", + "baseName": "authentication_type", + "type": "UpdateConnectionConfigurationRequestAuthenticationTypeEnum", + "format": "" + }, + { + "name": "configuration", + "baseName": "configuration", + "type": "any", + "format": "" + }, + { + "name": "policy_type", + "baseName": "policy_type", + "type": "UpdateConnectionConfigurationRequestPolicyTypeEnum", + "format": "" + }, + { + "name": "policy_principals", + "baseName": "policy_principals", + "type": "Array", + "format": "" + }, + { + "name": "policy_processes", + "baseName": "policy_processes", + "type": "Array", + "format": "" + }, + { + "name": "disable", + "baseName": "disable", + "type": "boolean", + "format": "" + } ]; + + static getAttributeTypeMap() { + return UpdateConnectionConfigurationRequest.attributeTypeMap; + } + + public constructor() { + } +} + + +export type UpdateConnectionConfigurationRequestAuthenticationTypeEnum = "SERVICE_ACCOUNT" | "OAUTH" | "OAUTH_WITH_SERVICE_PRINCIPAL" | "EXTOAUTH" | "KEY_PAIR" | "EXTOAUTH_WITH_PKCE" | "OAUTH_WITH_PKCE" | "PERSONAL_ACCESS_TOKEN" | "OAUTH_CLIENT_CREDENTIALS" ; +export type UpdateConnectionConfigurationRequestPolicyTypeEnum = "NO_POLICY" | "PRINCIPALS" | "PROCESSES" ; +export type UpdateConnectionConfigurationRequestPolicyProcessesEnum = "SAGE_INDEXING" | "ROW_COUNT_STATS" ; + diff --git a/sdks/typescript/models/UpdateConnectionRequest.ts b/sdks/typescript/models/UpdateConnectionRequest.ts new file mode 100644 index 000000000..027c89cdd --- /dev/null +++ b/sdks/typescript/models/UpdateConnectionRequest.ts @@ -0,0 +1,78 @@ +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { HttpFile } from '../http/http'; + +export class UpdateConnectionRequest { + /** + * Unique ID or name of the connection. + */ + 'connection_identifier': string; + /** + * Updated name of the connection. + */ + 'name'?: string; + /** + * Updated description of the connection. + */ + 'description'?: string; + /** + * Configuration of the data warehouse in JSON. + */ + 'data_warehouse_config'?: any; + /** + * Indicates whether to validate the connection details. + */ + 'validate'?: boolean | null; + + static readonly discriminator: string | undefined = undefined; + + static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ + { + "name": "connection_identifier", + "baseName": "connection_identifier", + "type": "string", + "format": "" + }, + { + "name": "name", + "baseName": "name", + "type": "string", + "format": "" + }, + { + "name": "description", + "baseName": "description", + "type": "string", + "format": "" + }, + { + "name": "data_warehouse_config", + "baseName": "data_warehouse_config", + "type": "any", + "format": "" + }, + { + "name": "validate", + "baseName": "validate", + "type": "boolean", + "format": "" + } ]; + + static getAttributeTypeMap() { + return UpdateConnectionRequest.attributeTypeMap; + } + + public constructor() { + } +} + diff --git a/sdks/typescript/models/UpdateConnectionStatusRequest.ts b/sdks/typescript/models/UpdateConnectionStatusRequest.ts new file mode 100644 index 000000000..32c595855 --- /dev/null +++ b/sdks/typescript/models/UpdateConnectionStatusRequest.ts @@ -0,0 +1,41 @@ +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { HttpFile } from '../http/http'; + +export class UpdateConnectionStatusRequest { + /** + * Status to set for the connection. Use ACTIVATED to enable the connection or DEACTIVATED to disable it. + */ + 'status'?: UpdateConnectionStatusRequestStatusEnum; + + static readonly discriminator: string | undefined = undefined; + + static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ + { + "name": "status", + "baseName": "status", + "type": "UpdateConnectionStatusRequestStatusEnum", + "format": "" + } ]; + + static getAttributeTypeMap() { + return UpdateConnectionStatusRequest.attributeTypeMap; + } + + public constructor() { + } +} + + +export type UpdateConnectionStatusRequestStatusEnum = "ACTIVATED" | "DEACTIVATED" ; + diff --git a/sdks/typescript/models/UpdateConnectionV2Request.ts b/sdks/typescript/models/UpdateConnectionV2Request.ts new file mode 100644 index 000000000..e6dddd16b --- /dev/null +++ b/sdks/typescript/models/UpdateConnectionV2Request.ts @@ -0,0 +1,68 @@ +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { HttpFile } from '../http/http'; + +export class UpdateConnectionV2Request { + /** + * Updated name of the connection. + */ + 'name'?: string; + /** + * Updated description of the connection. + */ + 'description'?: string; + /** + * Configuration of the data warehouse in JSON. + */ + 'data_warehouse_config'?: any; + /** + * Indicates whether to validate the connection details. + */ + 'validate'?: boolean | null; + + static readonly discriminator: string | undefined = undefined; + + static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ + { + "name": "name", + "baseName": "name", + "type": "string", + "format": "" + }, + { + "name": "description", + "baseName": "description", + "type": "string", + "format": "" + }, + { + "name": "data_warehouse_config", + "baseName": "data_warehouse_config", + "type": "any", + "format": "" + }, + { + "name": "validate", + "baseName": "validate", + "type": "boolean", + "format": "" + } ]; + + static getAttributeTypeMap() { + return UpdateConnectionV2Request.attributeTypeMap; + } + + public constructor() { + } +} + diff --git a/sdks/typescript/models/UpdateCustomActionRequest.ts b/sdks/typescript/models/UpdateCustomActionRequest.ts new file mode 100644 index 000000000..4251025ff --- /dev/null +++ b/sdks/typescript/models/UpdateCustomActionRequest.ts @@ -0,0 +1,88 @@ +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { AssociateMetadataInput } from '../models/AssociateMetadataInput'; +import { UpdateCustomActionRequestActionDetails } from '../models/UpdateCustomActionRequestActionDetails'; +import { UpdateCustomActionRequestDefaultActionConfig } from '../models/UpdateCustomActionRequestDefaultActionConfig'; +import { HttpFile } from '../http/http'; + +export class UpdateCustomActionRequest { + 'action_details'?: UpdateCustomActionRequestActionDetails; + /** + * Metadata objects to which the custom action needs to be associated. + */ + 'associate_metadata'?: Array; + 'default_action_config'?: UpdateCustomActionRequestDefaultActionConfig; + /** + * Unique ID or name of the groups that can view and access the custom action. + */ + 'group_identifiers'?: Array; + /** + * Name of the custom action. The custom action name must be unique. + */ + 'name'?: string; + /** + * Type of update operation. Default operation type is ADD + */ + 'operation'?: UpdateCustomActionRequestOperationEnum; + + static readonly discriminator: string | undefined = undefined; + + static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ + { + "name": "action_details", + "baseName": "action_details", + "type": "UpdateCustomActionRequestActionDetails", + "format": "" + }, + { + "name": "associate_metadata", + "baseName": "associate_metadata", + "type": "Array", + "format": "" + }, + { + "name": "default_action_config", + "baseName": "default_action_config", + "type": "UpdateCustomActionRequestDefaultActionConfig", + "format": "" + }, + { + "name": "group_identifiers", + "baseName": "group_identifiers", + "type": "Array", + "format": "" + }, + { + "name": "name", + "baseName": "name", + "type": "string", + "format": "" + }, + { + "name": "operation", + "baseName": "operation", + "type": "UpdateCustomActionRequestOperationEnum", + "format": "" + } ]; + + static getAttributeTypeMap() { + return UpdateCustomActionRequest.attributeTypeMap; + } + + public constructor() { + } +} + + +export type UpdateCustomActionRequestOperationEnum = "ADD" | "REMOVE" ; + diff --git a/sdks/typescript/models/UpdateCustomActionRequestActionDetails.ts b/sdks/typescript/models/UpdateCustomActionRequestActionDetails.ts new file mode 100644 index 000000000..f7a5c6774 --- /dev/null +++ b/sdks/typescript/models/UpdateCustomActionRequestActionDetails.ts @@ -0,0 +1,47 @@ +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { CALLBACKInput } from '../models/CALLBACKInput'; +import { URLInput } from '../models/URLInput'; +import { HttpFile } from '../http/http'; + +/** +* Action details includes `Type` and Configuration for Custom Actions, either Callback or URL is required. +*/ +export class UpdateCustomActionRequestActionDetails { + 'CALLBACK'?: CALLBACKInput; + 'URL'?: URLInput; + + static readonly discriminator: string | undefined = undefined; + + static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ + { + "name": "CALLBACK", + "baseName": "CALLBACK", + "type": "CALLBACKInput", + "format": "" + }, + { + "name": "URL", + "baseName": "URL", + "type": "URLInput", + "format": "" + } ]; + + static getAttributeTypeMap() { + return UpdateCustomActionRequestActionDetails.attributeTypeMap; + } + + public constructor() { + } +} + diff --git a/sdks/typescript/models/UpdateCustomActionRequestDefaultActionConfig.ts b/sdks/typescript/models/UpdateCustomActionRequestDefaultActionConfig.ts new file mode 100644 index 000000000..59d8b5cc5 --- /dev/null +++ b/sdks/typescript/models/UpdateCustomActionRequestDefaultActionConfig.ts @@ -0,0 +1,41 @@ +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { HttpFile } from '../http/http'; + +/** +* Default Custom action configuration. This includes if the custom action available on visualizations and Answers. By default, a custom action is added to all visualizations and Answers. +*/ +export class UpdateCustomActionRequestDefaultActionConfig { + /** + * Custom action is available on all visualizations. Earlier naming convention: LOCAL/GLOBAL. TRUE signifies GLOBAL for backward compatibility. + */ + 'visibility'?: boolean | null; + + static readonly discriminator: string | undefined = undefined; + + static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ + { + "name": "visibility", + "baseName": "visibility", + "type": "boolean", + "format": "" + } ]; + + static getAttributeTypeMap() { + return UpdateCustomActionRequestDefaultActionConfig.attributeTypeMap; + } + + public constructor() { + } +} + diff --git a/sdks/typescript/models/UpdateEmailCustomizationRequest.ts b/sdks/typescript/models/UpdateEmailCustomizationRequest.ts new file mode 100644 index 000000000..e75c829d3 --- /dev/null +++ b/sdks/typescript/models/UpdateEmailCustomizationRequest.ts @@ -0,0 +1,46 @@ +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { CreateEmailCustomizationRequestTemplateProperties } from '../models/CreateEmailCustomizationRequestTemplateProperties'; +import { HttpFile } from '../http/http'; + +export class UpdateEmailCustomizationRequest { + 'template_properties': CreateEmailCustomizationRequestTemplateProperties; + /** + * Unique ID or name of org + */ + 'org_identifier'?: string; + + static readonly discriminator: string | undefined = undefined; + + static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ + { + "name": "template_properties", + "baseName": "template_properties", + "type": "CreateEmailCustomizationRequestTemplateProperties", + "format": "" + }, + { + "name": "org_identifier", + "baseName": "org_identifier", + "type": "string", + "format": "" + } ]; + + static getAttributeTypeMap() { + return UpdateEmailCustomizationRequest.attributeTypeMap; + } + + public constructor() { + } +} + diff --git a/sdks/typescript/models/UpdateMetadataHeaderRequest.ts b/sdks/typescript/models/UpdateMetadataHeaderRequest.ts new file mode 100644 index 000000000..76a975700 --- /dev/null +++ b/sdks/typescript/models/UpdateMetadataHeaderRequest.ts @@ -0,0 +1,49 @@ +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { HeaderUpdateInput } from '../models/HeaderUpdateInput'; +import { HttpFile } from '../http/http'; + +export class UpdateMetadataHeaderRequest { + /** + * List of header objects to update. + */ + 'headers_update': Array; + /** + * Unique ID or name of the organization. + */ + 'org_identifier'?: string; + + static readonly discriminator: string | undefined = undefined; + + static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ + { + "name": "headers_update", + "baseName": "headers_update", + "type": "Array", + "format": "" + }, + { + "name": "org_identifier", + "baseName": "org_identifier", + "type": "string", + "format": "" + } ]; + + static getAttributeTypeMap() { + return UpdateMetadataHeaderRequest.attributeTypeMap; + } + + public constructor() { + } +} + diff --git a/sdks/typescript/models/UpdateMetadataObjIdRequest.ts b/sdks/typescript/models/UpdateMetadataObjIdRequest.ts new file mode 100644 index 000000000..4f48e5eac --- /dev/null +++ b/sdks/typescript/models/UpdateMetadataObjIdRequest.ts @@ -0,0 +1,39 @@ +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { UpdateObjIdInput } from '../models/UpdateObjIdInput'; +import { HttpFile } from '../http/http'; + +export class UpdateMetadataObjIdRequest { + /** + * List of metadata objects to update their object IDs. + */ + 'metadata': Array; + + static readonly discriminator: string | undefined = undefined; + + static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ + { + "name": "metadata", + "baseName": "metadata", + "type": "Array", + "format": "" + } ]; + + static getAttributeTypeMap() { + return UpdateMetadataObjIdRequest.attributeTypeMap; + } + + public constructor() { + } +} + diff --git a/sdks/typescript/models/UpdateObjIdInput.ts b/sdks/typescript/models/UpdateObjIdInput.ts new file mode 100644 index 000000000..981b3693d --- /dev/null +++ b/sdks/typescript/models/UpdateObjIdInput.ts @@ -0,0 +1,74 @@ +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { HttpFile } from '../http/http'; + +/** +* Input for updating object ID of a metadata object. +*/ +export class UpdateObjIdInput { + /** + * GUID or name of the metadata object. + */ + 'metadata_identifier'?: string | null; + /** + * Type of metadata. Required if metadata_identifier is name of the object. + */ + 'type'?: UpdateObjIdInputTypeEnum | null; + /** + * Current object ID value. + */ + 'current_obj_id'?: string | null; + /** + * New object ID value to set. + */ + 'new_obj_id': string; + + static readonly discriminator: string | undefined = undefined; + + static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ + { + "name": "metadata_identifier", + "baseName": "metadata_identifier", + "type": "string", + "format": "" + }, + { + "name": "type", + "baseName": "type", + "type": "UpdateObjIdInputTypeEnum", + "format": "" + }, + { + "name": "current_obj_id", + "baseName": "current_obj_id", + "type": "string", + "format": "" + }, + { + "name": "new_obj_id", + "baseName": "new_obj_id", + "type": "string", + "format": "" + } ]; + + static getAttributeTypeMap() { + return UpdateObjIdInput.attributeTypeMap; + } + + public constructor() { + } +} + + +export type UpdateObjIdInputTypeEnum = "ANSWER" | "LOGICAL_TABLE" | "LOGICAL_COLUMN" | "LIVEBOARD" | "ACTION_OBJECT" | "DATA_SOURCE" | "USER" | "USER_GROUP" ; + diff --git a/sdks/typescript/models/UpdateOrgRequest.ts b/sdks/typescript/models/UpdateOrgRequest.ts new file mode 100644 index 000000000..2a877818b --- /dev/null +++ b/sdks/typescript/models/UpdateOrgRequest.ts @@ -0,0 +1,81 @@ +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { HttpFile } from '../http/http'; + +export class UpdateOrgRequest { + /** + * Name of the Org + */ + 'name'?: string; + /** + * Description of the Org + */ + 'description'?: string; + /** + * Add Users to an Org + */ + 'user_identifiers'?: Array; + /** + * Add Default Groups to an Org + */ + 'group_identifiers'?: Array; + /** + * Type of update operation. Default operation type is ADD + */ + 'operation'?: UpdateOrgRequestOperationEnum; + + static readonly discriminator: string | undefined = undefined; + + static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ + { + "name": "name", + "baseName": "name", + "type": "string", + "format": "" + }, + { + "name": "description", + "baseName": "description", + "type": "string", + "format": "" + }, + { + "name": "user_identifiers", + "baseName": "user_identifiers", + "type": "Array", + "format": "" + }, + { + "name": "group_identifiers", + "baseName": "group_identifiers", + "type": "Array", + "format": "" + }, + { + "name": "operation", + "baseName": "operation", + "type": "UpdateOrgRequestOperationEnum", + "format": "" + } ]; + + static getAttributeTypeMap() { + return UpdateOrgRequest.attributeTypeMap; + } + + public constructor() { + } +} + + +export type UpdateOrgRequestOperationEnum = "ADD" | "REMOVE" | "REPLACE" ; + diff --git a/sdks/typescript/models/UpdateRoleRequest.ts b/sdks/typescript/models/UpdateRoleRequest.ts new file mode 100644 index 000000000..479842af8 --- /dev/null +++ b/sdks/typescript/models/UpdateRoleRequest.ts @@ -0,0 +1,61 @@ +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { HttpFile } from '../http/http'; + +export class UpdateRoleRequest { + /** + * Name of the Role. + */ + 'name': string; + /** + * Description of the Role. + */ + 'description'?: string; + /** + * Privileges granted to the role. See [Documentation](https://developers.thoughtspot.com/docs/rbac#_role_categories_and_privileges)for supported roles privileges. + */ + 'privileges'?: Array; + + static readonly discriminator: string | undefined = undefined; + + static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ + { + "name": "name", + "baseName": "name", + "type": "string", + "format": "" + }, + { + "name": "description", + "baseName": "description", + "type": "string", + "format": "" + }, + { + "name": "privileges", + "baseName": "privileges", + "type": "Array", + "format": "" + } ]; + + static getAttributeTypeMap() { + return UpdateRoleRequest.attributeTypeMap; + } + + public constructor() { + } +} + + +export type UpdateRoleRequestPrivilegesEnum = "USERDATAUPLOADING" | "DATADOWNLOADING" | "DATAMANAGEMENT" | "SHAREWITHALL" | "JOBSCHEDULING" | "A3ANALYSIS" | "BYPASSRLS" | "DISABLE_PINBOARD_CREATION" | "DEVELOPER" | "APPLICATION_ADMINISTRATION" | "USER_ADMINISTRATION" | "GROUP_ADMINISTRATION" | "SYSTEM_INFO_ADMINISTRATION" | "SYNCMANAGEMENT" | "ORG_ADMINISTRATION" | "ROLE_ADMINISTRATION" | "AUTHENTICATION_ADMINISTRATION" | "BILLING_INFO_ADMINISTRATION" | "CONTROL_TRUSTED_AUTH" | "TAGMANAGEMENT" | "LIVEBOARD_VERIFIER" | "CAN_MANAGE_CUSTOM_CALENDAR" | "CAN_CREATE_OR_EDIT_CONNECTIONS" | "CAN_MANAGE_WORKSHEET_VIEWS_TABLES" | "CAN_MANAGE_VERSION_CONTROL" | "THIRDPARTY_ANALYSIS" | "CAN_CREATE_CATALOG" | "CAN_ACCESS_ANALYST_STUDIO" | "CAN_MANAGE_ANALYST_STUDIO" | "CAN_MODIFY_FOLDERS" | "CAN_MANAGE_VARIABLES" | "CAN_VIEW_FOLDERS" | "CAN_MANAGE_AGENTSPOT" | "CAN_ACCESS_AGENTSPOT" | "PREVIEW_DOCUMENT_SEARCH" | "PREVIEW_THOUGHTSPOT_SAGE" | "CAN_MANAGE_WEBHOOKS" | "CAN_DOWNLOAD_VISUALS" | "CAN_DOWNLOAD_DETAILED_DATA" | "CAN_USE_SPOTTER" ; + diff --git a/sdks/typescript/models/UpdateScheduleRequest.ts b/sdks/typescript/models/UpdateScheduleRequest.ts new file mode 100644 index 000000000..501074a30 --- /dev/null +++ b/sdks/typescript/models/UpdateScheduleRequest.ts @@ -0,0 +1,146 @@ +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { UpdateScheduleRequestFrequency } from '../models/UpdateScheduleRequestFrequency'; +import { UpdateScheduleRequestLiveboardOptions } from '../models/UpdateScheduleRequestLiveboardOptions'; +import { UpdateScheduleRequestPdfOptions } from '../models/UpdateScheduleRequestPdfOptions'; +import { UpdateScheduleRequestRecipientDetails } from '../models/UpdateScheduleRequestRecipientDetails'; +import { HttpFile } from '../http/http'; + +export class UpdateScheduleRequest { + /** + * Name of the scheduled job. + */ + 'name'?: string; + /** + * Description of the scheduled job. + */ + 'description'?: string; + /** + * Type of metadata object. + */ + 'metadata_type'?: UpdateScheduleRequestMetadataTypeEnum; + /** + * Unique ID or name of the metadata object. + */ + 'metadata_identifier'?: string; + /** + * Export file format. + */ + 'file_format'?: UpdateScheduleRequestFileFormatEnum; + 'liveboard_options'?: UpdateScheduleRequestLiveboardOptions; + 'pdf_options'?: UpdateScheduleRequestPdfOptions; + /** + * Time zone + */ + 'time_zone'?: UpdateScheduleRequestTimeZoneEnum; + 'frequency'?: UpdateScheduleRequestFrequency; + 'recipient_details'?: UpdateScheduleRequestRecipientDetails; + /** + * Status of the schedule + */ + 'status'?: UpdateScheduleRequestStatusEnum; + /** + * Personalised view id of the liveboard to be scheduled. + */ + 'personalised_view_id'?: string; + + static readonly discriminator: string | undefined = undefined; + + static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ + { + "name": "name", + "baseName": "name", + "type": "string", + "format": "" + }, + { + "name": "description", + "baseName": "description", + "type": "string", + "format": "" + }, + { + "name": "metadata_type", + "baseName": "metadata_type", + "type": "UpdateScheduleRequestMetadataTypeEnum", + "format": "" + }, + { + "name": "metadata_identifier", + "baseName": "metadata_identifier", + "type": "string", + "format": "" + }, + { + "name": "file_format", + "baseName": "file_format", + "type": "UpdateScheduleRequestFileFormatEnum", + "format": "" + }, + { + "name": "liveboard_options", + "baseName": "liveboard_options", + "type": "UpdateScheduleRequestLiveboardOptions", + "format": "" + }, + { + "name": "pdf_options", + "baseName": "pdf_options", + "type": "UpdateScheduleRequestPdfOptions", + "format": "" + }, + { + "name": "time_zone", + "baseName": "time_zone", + "type": "UpdateScheduleRequestTimeZoneEnum", + "format": "" + }, + { + "name": "frequency", + "baseName": "frequency", + "type": "UpdateScheduleRequestFrequency", + "format": "" + }, + { + "name": "recipient_details", + "baseName": "recipient_details", + "type": "UpdateScheduleRequestRecipientDetails", + "format": "" + }, + { + "name": "status", + "baseName": "status", + "type": "UpdateScheduleRequestStatusEnum", + "format": "" + }, + { + "name": "personalised_view_id", + "baseName": "personalised_view_id", + "type": "string", + "format": "" + } ]; + + static getAttributeTypeMap() { + return UpdateScheduleRequest.attributeTypeMap; + } + + public constructor() { + } +} + + +export type UpdateScheduleRequestMetadataTypeEnum = "LIVEBOARD" ; +export type UpdateScheduleRequestFileFormatEnum = "CSV" | "PDF" | "XLSX" ; +export type UpdateScheduleRequestTimeZoneEnum = "Africa/Abidjan" | "Africa/Accra" | "Africa/Addis_Ababa" | "Africa/Algiers" | "Africa/Asmara" | "Africa/Asmera" | "Africa/Bamako" | "Africa/Bangui" | "Africa/Banjul" | "Africa/Bissau" | "Africa/Blantyre" | "Africa/Brazzaville" | "Africa/Bujumbura" | "Africa/Cairo" | "Africa/Casablanca" | "Africa/Ceuta" | "Africa/Conakry" | "Africa/Dakar" | "Africa/Dar_es_Salaam" | "Africa/Djibouti" | "Africa/Douala" | "Africa/El_Aaiun" | "Africa/Freetown" | "Africa/Gaborone" | "Africa/Harare" | "Africa/Johannesburg" | "Africa/Juba" | "Africa/Kampala" | "Africa/Khartoum" | "Africa/Kigali" | "Africa/Kinshasa" | "Africa/Lagos" | "Africa/Libreville" | "Africa/Lome" | "Africa/Luanda" | "Africa/Lubumbashi" | "Africa/Lusaka" | "Africa/Malabo" | "Africa/Maputo" | "Africa/Maseru" | "Africa/Mbabane" | "Africa/Mogadishu" | "Africa/Monrovia" | "Africa/Nairobi" | "Africa/Ndjamena" | "Africa/Niamey" | "Africa/Nouakchott" | "Africa/Ouagadougou" | "Africa/Porto-Novo" | "Africa/Sao_Tome" | "Africa/Timbuktu" | "Africa/Tripoli" | "Africa/Tunis" | "Africa/Windhoek" | "America/Adak" | "America/Anchorage" | "America/Anguilla" | "America/Antigua" | "America/Araguaina" | "America/Argentina/Buenos_Aires" | "America/Argentina/Catamarca" | "America/Argentina/ComodRivadavia" | "America/Argentina/Cordoba" | "America/Argentina/Jujuy" | "America/Argentina/La_Rioja" | "America/Argentina/Mendoza" | "America/Argentina/Rio_Gallegos" | "America/Argentina/Salta" | "America/Argentina/San_Juan" | "America/Argentina/San_Luis" | "America/Argentina/Tucuman" | "America/Argentina/Ushuaia" | "America/Aruba" | "America/Asuncion" | "America/Atikokan" | "America/Atka" | "America/Bahia" | "America/Bahia_Banderas" | "America/Barbados" | "America/Belem" | "America/Belize" | "America/Blanc-Sablon" | "America/Boa_Vista" | "America/Bogota" | "America/Boise" | "America/Buenos_Aires" | "America/Cambridge_Bay" | "America/Campo_Grande" | "America/Cancun" | "America/Caracas" | "America/Catamarca" | "America/Cayenne" | "America/Cayman" | "America/Chicago" | "America/Chihuahua" | "America/Coral_Harbour" | "America/Cordoba" | "America/Costa_Rica" | "America/Creston" | "America/Cuiaba" | "America/Curacao" | "America/Danmarkshavn" | "America/Dawson" | "America/Dawson_Creek" | "America/Denver" | "America/Detroit" | "America/Dominica" | "America/Edmonton" | "America/Eirunepe" | "America/El_Salvador" | "America/Ensenada" | "America/Fort_Nelson" | "America/Fort_Wayne" | "America/Fortaleza" | "America/Glace_Bay" | "America/Godthab" | "America/Goose_Bay" | "America/Grand_Turk" | "America/Grenada" | "America/Guadeloupe" | "America/Guatemala" | "America/Guayaquil" | "America/Guyana" | "America/Halifax" | "America/Havana" | "America/Hermosillo" | "America/Indiana/Indianapolis" | "America/Indiana/Knox" | "America/Indiana/Marengo" | "America/Indiana/Petersburg" | "America/Indiana/Tell_City" | "America/Indiana/Vevay" | "America/Indiana/Vincennes" | "America/Indiana/Winamac" | "America/Indianapolis" | "America/Inuvik" | "America/Iqaluit" | "America/Jamaica" | "America/Jujuy" | "America/Juneau" | "America/Kentucky/Louisville" | "America/Kentucky/Monticello" | "America/Knox_IN" | "America/Kralendijk" | "America/La_Paz" | "America/Lima" | "America/Los_Angeles" | "America/Louisville" | "America/Lower_Princes" | "America/Maceio" | "America/Managua" | "America/Manaus" | "America/Marigot" | "America/Martinique" | "America/Matamoros" | "America/Mazatlan" | "America/Mendoza" | "America/Menominee" | "America/Merida" | "America/Metlakatla" | "America/Mexico_City" | "America/Miquelon" | "America/Moncton" | "America/Monterrey" | "America/Montevideo" | "America/Montreal" | "America/Montserrat" | "America/Nassau" | "America/New_York" | "America/Nipigon" | "America/Nome" | "America/Noronha" | "America/North_Dakota/Beulah" | "America/North_Dakota/Center" | "America/North_Dakota/New_Salem" | "America/Nuuk" | "America/Ojinaga" | "America/Panama" | "America/Pangnirtung" | "America/Paramaribo" | "America/Phoenix" | "America/Port-au-Prince" | "America/Port_of_Spain" | "America/Porto_Acre" | "America/Porto_Velho" | "America/Puerto_Rico" | "America/Punta_Arenas" | "America/Rainy_River" | "America/Rankin_Inlet" | "America/Recife" | "America/Regina" | "America/Resolute" | "America/Rio_Branco" | "America/Rosario" | "America/Santa_Isabel" | "America/Santarem" | "America/Santiago" | "America/Santo_Domingo" | "America/Sao_Paulo" | "America/Scoresbysund" | "America/Shiprock" | "America/Sitka" | "America/St_Barthelemy" | "America/St_Johns" | "America/St_Kitts" | "America/St_Lucia" | "America/St_Thomas" | "America/St_Vincent" | "America/Swift_Current" | "America/Tegucigalpa" | "America/Thule" | "America/Thunder_Bay" | "America/Tijuana" | "America/Toronto" | "America/Tortola" | "America/Vancouver" | "America/Virgin" | "America/Whitehorse" | "America/Winnipeg" | "America/Yakutat" | "America/Yellowknife" | "Antarctica/Casey" | "Antarctica/Davis" | "Antarctica/DumontDUrville" | "Antarctica/Macquarie" | "Antarctica/Mawson" | "Antarctica/McMurdo" | "Antarctica/Palmer" | "Antarctica/Rothera" | "Antarctica/South_Pole" | "Antarctica/Syowa" | "Antarctica/Troll" | "Antarctica/Vostok" | "Arctic/Longyearbyen" | "Asia/Aden" | "Asia/Almaty" | "Asia/Amman" | "Asia/Anadyr" | "Asia/Aqtau" | "Asia/Aqtobe" | "Asia/Ashgabat" | "Asia/Ashkhabad" | "Asia/Atyrau" | "Asia/Baghdad" | "Asia/Bahrain" | "Asia/Baku" | "Asia/Bangkok" | "Asia/Barnaul" | "Asia/Beirut" | "Asia/Bishkek" | "Asia/Brunei" | "Asia/Calcutta" | "Asia/Chita" | "Asia/Choibalsan" | "Asia/Chongqing" | "Asia/Chungking" | "Asia/Colombo" | "Asia/Dacca" | "Asia/Damascus" | "Asia/Dhaka" | "Asia/Dili" | "Asia/Dubai" | "Asia/Dushanbe" | "Asia/Famagusta" | "Asia/Gaza" | "Asia/Harbin" | "Asia/Hebron" | "Asia/Ho_Chi_Minh" | "Asia/Hong_Kong" | "Asia/Hovd" | "Asia/Irkutsk" | "Asia/Istanbul" | "Asia/Jakarta" | "Asia/Jayapura" | "Asia/Jerusalem" | "Asia/Kabul" | "Asia/Kamchatka" | "Asia/Karachi" | "Asia/Kashgar" | "Asia/Kathmandu" | "Asia/Katmandu" | "Asia/Khandyga" | "Asia/Kolkata" | "Asia/Krasnoyarsk" | "Asia/Kuala_Lumpur" | "Asia/Kuching" | "Asia/Kuwait" | "Asia/Macao" | "Asia/Macau" | "Asia/Magadan" | "Asia/Makassar" | "Asia/Manila" | "Asia/Muscat" | "Asia/Nicosia" | "Asia/Novokuznetsk" | "Asia/Novosibirsk" | "Asia/Omsk" | "Asia/Oral" | "Asia/Phnom_Penh" | "Asia/Pontianak" | "Asia/Pyongyang" | "Asia/Qatar" | "Asia/Qostanay" | "Asia/Qyzylorda" | "Asia/Rangoon" | "Asia/Riyadh" | "Asia/Saigon" | "Asia/Sakhalin" | "Asia/Samarkand" | "Asia/Seoul" | "Asia/Shanghai" | "Asia/Singapore" | "Asia/Srednekolymsk" | "Asia/Taipei" | "Asia/Tashkent" | "Asia/Tbilisi" | "Asia/Tehran" | "Asia/Tel_Aviv" | "Asia/Thimbu" | "Asia/Thimphu" | "Asia/Tokyo" | "Asia/Tomsk" | "Asia/Ujung_Pandang" | "Asia/Ulaanbaatar" | "Asia/Ulan_Bator" | "Asia/Urumqi" | "Asia/Ust-Nera" | "Asia/Vientiane" | "Asia/Vladivostok" | "Asia/Yakutsk" | "Asia/Yangon" | "Asia/Yekaterinburg" | "Asia/Yerevan" | "Atlantic/Azores" | "Atlantic/Bermuda" | "Atlantic/Canary" | "Atlantic/Cape_Verde" | "Atlantic/Faeroe" | "Atlantic/Faroe" | "Atlantic/Jan_Mayen" | "Atlantic/Madeira" | "Atlantic/Reykjavik" | "Atlantic/South_Georgia" | "Atlantic/St_Helena" | "Atlantic/Stanley" | "Australia/ACT" | "Australia/Adelaide" | "Australia/Brisbane" | "Australia/Broken_Hill" | "Australia/Canberra" | "Australia/Currie" | "Australia/Darwin" | "Australia/Eucla" | "Australia/Hobart" | "Australia/LHI" | "Australia/Lindeman" | "Australia/Lord_Howe" | "Australia/Melbourne" | "Australia/NSW" | "Australia/North" | "Australia/Perth" | "Australia/Queensland" | "Australia/South" | "Australia/Sydney" | "Australia/Tasmania" | "Australia/Victoria" | "Australia/West" | "Australia/Yancowinna" | "Brazil/Acre" | "Brazil/DeNoronha" | "Brazil/East" | "Brazil/West" | "CET" | "CST6CDT" | "Canada/Atlantic" | "Canada/Central" | "Canada/Eastern" | "Canada/Mountain" | "Canada/Newfoundland" | "Canada/Pacific" | "Canada/Saskatchewan" | "Canada/Yukon" | "Chile/Continental" | "Chile/EasterIsland" | "Cuba" | "EET" | "EST5EDT" | "Egypt" | "Eire" | "Etc/GMT" | "Etc/GMT+0" | "Etc/GMT+1" | "Etc/GMT+10" | "Etc/GMT+11" | "Etc/GMT+12" | "Etc/GMT+2" | "Etc/GMT+3" | "Etc/GMT+4" | "Etc/GMT+5" | "Etc/GMT+6" | "Etc/GMT+7" | "Etc/GMT+8" | "Etc/GMT+9" | "Etc/GMT-0" | "Etc/GMT-1" | "Etc/GMT-10" | "Etc/GMT-11" | "Etc/GMT-12" | "Etc/GMT-13" | "Etc/GMT-14" | "Etc/GMT-2" | "Etc/GMT-3" | "Etc/GMT-4" | "Etc/GMT-5" | "Etc/GMT-6" | "Etc/GMT-7" | "Etc/GMT-8" | "Etc/GMT-9" | "Etc/GMT0" | "Etc/Greenwich" | "Etc/UCT" | "Etc/UTC" | "Etc/Universal" | "Etc/Zulu" | "Europe/Amsterdam" | "Europe/Andorra" | "Europe/Astrakhan" | "Europe/Athens" | "Europe/Belfast" | "Europe/Belgrade" | "Europe/Berlin" | "Europe/Bratislava" | "Europe/Brussels" | "Europe/Bucharest" | "Europe/Budapest" | "Europe/Busingen" | "Europe/Chisinau" | "Europe/Copenhagen" | "Europe/Dublin" | "Europe/Gibraltar" | "Europe/Guernsey" | "Europe/Helsinki" | "Europe/Isle_of_Man" | "Europe/Istanbul" | "Europe/Jersey" | "Europe/Kaliningrad" | "Europe/Kiev" | "Europe/Kirov" | "Europe/Kyiv" | "Europe/Lisbon" | "Europe/Ljubljana" | "Europe/London" | "Europe/Luxembourg" | "Europe/Madrid" | "Europe/Malta" | "Europe/Mariehamn" | "Europe/Minsk" | "Europe/Monaco" | "Europe/Moscow" | "Europe/Nicosia" | "Europe/Oslo" | "Europe/Paris" | "Europe/Podgorica" | "Europe/Prague" | "Europe/Riga" | "Europe/Rome" | "Europe/Samara" | "Europe/San_Marino" | "Europe/Sarajevo" | "Europe/Saratov" | "Europe/Simferopol" | "Europe/Skopje" | "Europe/Sofia" | "Europe/Stockholm" | "Europe/Tallinn" | "Europe/Tirane" | "Europe/Tiraspol" | "Europe/Ulyanovsk" | "Europe/Uzhgorod" | "Europe/Vaduz" | "Europe/Vatican" | "Europe/Vienna" | "Europe/Vilnius" | "Europe/Volgograd" | "Europe/Warsaw" | "Europe/Zagreb" | "Europe/Zaporozhye" | "Europe/Zurich" | "GB" | "GB-Eire" | "GMT" | "GMT0" | "Greenwich" | "Hongkong" | "Iceland" | "Indian/Antananarivo" | "Indian/Chagos" | "Indian/Christmas" | "Indian/Cocos" | "Indian/Comoro" | "Indian/Kerguelen" | "Indian/Mahe" | "Indian/Maldives" | "Indian/Mauritius" | "Indian/Mayotte" | "Indian/Reunion" | "Iran" | "Israel" | "Jamaica" | "Japan" | "Kwajalein" | "Libya" | "MET" | "MST7MDT" | "Mexico/BajaNorte" | "Mexico/BajaSur" | "Mexico/General" | "NZ" | "NZ-CHAT" | "Navajo" | "PRC" | "PST8PDT" | "Pacific/Apia" | "Pacific/Auckland" | "Pacific/Bougainville" | "Pacific/Chatham" | "Pacific/Chuuk" | "Pacific/Easter" | "Pacific/Efate" | "Pacific/Enderbury" | "Pacific/Fakaofo" | "Pacific/Fiji" | "Pacific/Funafuti" | "Pacific/Galapagos" | "Pacific/Gambier" | "Pacific/Guadalcanal" | "Pacific/Guam" | "Pacific/Honolulu" | "Pacific/Johnston" | "Pacific/Kanton" | "Pacific/Kiritimati" | "Pacific/Kosrae" | "Pacific/Kwajalein" | "Pacific/Majuro" | "Pacific/Marquesas" | "Pacific/Midway" | "Pacific/Nauru" | "Pacific/Niue" | "Pacific/Norfolk" | "Pacific/Noumea" | "Pacific/Pago_Pago" | "Pacific/Palau" | "Pacific/Pitcairn" | "Pacific/Pohnpei" | "Pacific/Ponape" | "Pacific/Port_Moresby" | "Pacific/Rarotonga" | "Pacific/Saipan" | "Pacific/Samoa" | "Pacific/Tahiti" | "Pacific/Tarawa" | "Pacific/Tongatapu" | "Pacific/Truk" | "Pacific/Wake" | "Pacific/Wallis" | "Pacific/Yap" | "Poland" | "Portugal" | "ROK" | "Singapore" | "SystemV/AST4" | "SystemV/AST4ADT" | "SystemV/CST6" | "SystemV/CST6CDT" | "SystemV/EST5" | "SystemV/EST5EDT" | "SystemV/HST10" | "SystemV/MST7" | "SystemV/MST7MDT" | "SystemV/PST8" | "SystemV/PST8PDT" | "SystemV/YST9" | "SystemV/YST9YDT" | "Turkey" | "UCT" | "US/Alaska" | "US/Aleutian" | "US/Arizona" | "US/Central" | "US/East-Indiana" | "US/Eastern" | "US/Hawaii" | "US/Indiana-Starke" | "US/Michigan" | "US/Mountain" | "US/Pacific" | "US/Samoa" | "UTC" | "Universal" | "W-SU" | "WET" | "Zulu" | "EST" | "HST" | "MST" | "ACT" | "AET" | "AGT" | "ART" | "AST" | "BET" | "BST" | "CAT" | "CNT" | "CST" | "CTT" | "EAT" | "ECT" | "IET" | "IST" | "JST" | "MIT" | "NET" | "NST" | "PLT" | "PNT" | "PRT" | "PST" | "SST" | "VST" ; +export type UpdateScheduleRequestStatusEnum = "ACTIVE" | "PAUSE" ; + diff --git a/sdks/typescript/models/UpdateScheduleRequestFrequency.ts b/sdks/typescript/models/UpdateScheduleRequestFrequency.ts new file mode 100644 index 000000000..4bf68272a --- /dev/null +++ b/sdks/typescript/models/UpdateScheduleRequestFrequency.ts @@ -0,0 +1,39 @@ +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { CronExpressionInput } from '../models/CronExpressionInput'; +import { HttpFile } from '../http/http'; + +/** +* Frequency of the scheduled job run. +*/ +export class UpdateScheduleRequestFrequency { + 'cron_expression': CronExpressionInput; + + static readonly discriminator: string | undefined = undefined; + + static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ + { + "name": "cron_expression", + "baseName": "cron_expression", + "type": "CronExpressionInput", + "format": "" + } ]; + + static getAttributeTypeMap() { + return UpdateScheduleRequestFrequency.attributeTypeMap; + } + + public constructor() { + } +} + diff --git a/sdks/typescript/models/UpdateScheduleRequestLiveboardOptions.ts b/sdks/typescript/models/UpdateScheduleRequestLiveboardOptions.ts new file mode 100644 index 000000000..57556f67d --- /dev/null +++ b/sdks/typescript/models/UpdateScheduleRequestLiveboardOptions.ts @@ -0,0 +1,41 @@ +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { HttpFile } from '../http/http'; + +/** +* Options to specify the details of a Liveboard. +*/ +export class UpdateScheduleRequestLiveboardOptions { + /** + * Unique ID or name of visualizations. + */ + 'visualization_identifiers': Array; + + static readonly discriminator: string | undefined = undefined; + + static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ + { + "name": "visualization_identifiers", + "baseName": "visualization_identifiers", + "type": "Array", + "format": "" + } ]; + + static getAttributeTypeMap() { + return UpdateScheduleRequestLiveboardOptions.attributeTypeMap; + } + + public constructor() { + } +} + diff --git a/sdks/typescript/models/UpdateScheduleRequestPdfOptions.ts b/sdks/typescript/models/UpdateScheduleRequestPdfOptions.ts new file mode 100644 index 000000000..f06057ecf --- /dev/null +++ b/sdks/typescript/models/UpdateScheduleRequestPdfOptions.ts @@ -0,0 +1,124 @@ +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { HttpFile } from '../http/http'; + +/** +* Options for PDF export. +*/ +export class UpdateScheduleRequestPdfOptions { + /** + * Indicates whether to include complete Liveboard. + */ + 'complete_liveboard'?: boolean | null; + /** + * Indicates whether to include cover page with the Liveboard title. + */ + 'include_cover_page'?: boolean | null; + /** + * Indicates whether to include customized wide logo in the footer if available. + */ + 'include_custom_logo'?: boolean | null; + /** + * Indicates whether to include a page with all applied filters. + */ + 'include_filter_page'?: boolean | null; + /** + * Indicates whether to include page number in the footer of each page + */ + 'include_page_number'?: boolean | null; + /** + * Text to include in the footer of each page. + */ + 'page_footer_text'?: string | null; + /** + * Page orientation of the PDF. + */ + 'page_orientation'?: string | null; + /** + * Page size. + */ + 'page_size'?: UpdateScheduleRequestPdfOptionsPageSizeEnum | null; + /** + * Indicates whether to include only first page of the tables. + */ + 'truncate_table'?: boolean | null; + + static readonly discriminator: string | undefined = undefined; + + static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ + { + "name": "complete_liveboard", + "baseName": "complete_liveboard", + "type": "boolean", + "format": "" + }, + { + "name": "include_cover_page", + "baseName": "include_cover_page", + "type": "boolean", + "format": "" + }, + { + "name": "include_custom_logo", + "baseName": "include_custom_logo", + "type": "boolean", + "format": "" + }, + { + "name": "include_filter_page", + "baseName": "include_filter_page", + "type": "boolean", + "format": "" + }, + { + "name": "include_page_number", + "baseName": "include_page_number", + "type": "boolean", + "format": "" + }, + { + "name": "page_footer_text", + "baseName": "page_footer_text", + "type": "string", + "format": "" + }, + { + "name": "page_orientation", + "baseName": "page_orientation", + "type": "string", + "format": "" + }, + { + "name": "page_size", + "baseName": "page_size", + "type": "UpdateScheduleRequestPdfOptionsPageSizeEnum", + "format": "" + }, + { + "name": "truncate_table", + "baseName": "truncate_table", + "type": "boolean", + "format": "" + } ]; + + static getAttributeTypeMap() { + return UpdateScheduleRequestPdfOptions.attributeTypeMap; + } + + public constructor() { + } +} + + +export type UpdateScheduleRequestPdfOptionsPageSizeEnum = "A4" | "TAB_BASED" ; + diff --git a/sdks/typescript/models/UpdateScheduleRequestRecipientDetails.ts b/sdks/typescript/models/UpdateScheduleRequestRecipientDetails.ts new file mode 100644 index 000000000..5d34c399d --- /dev/null +++ b/sdks/typescript/models/UpdateScheduleRequestRecipientDetails.ts @@ -0,0 +1,52 @@ +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { PrincipalsListItemInput } from '../models/PrincipalsListItemInput'; +import { HttpFile } from '../http/http'; + +/** +* Recipients of the scheduled job notifications. You can add the ID or name of the ThoughtSpot users or groups as recipients in the `principals` array. If a recipient is not a ThoughtSpot user, specify email address. +*/ +export class UpdateScheduleRequestRecipientDetails { + /** + * Emails of the recipients. + */ + 'emails'?: Array | null; + /** + * User or groups to be set as recipients of the schedule notifications. + */ + 'principals'?: Array | null; + + static readonly discriminator: string | undefined = undefined; + + static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ + { + "name": "emails", + "baseName": "emails", + "type": "Array", + "format": "" + }, + { + "name": "principals", + "baseName": "principals", + "type": "Array", + "format": "" + } ]; + + static getAttributeTypeMap() { + return UpdateScheduleRequestRecipientDetails.attributeTypeMap; + } + + public constructor() { + } +} + diff --git a/sdks/typescript/models/UpdateSystemConfigRequest.ts b/sdks/typescript/models/UpdateSystemConfigRequest.ts new file mode 100644 index 000000000..bb13bbf03 --- /dev/null +++ b/sdks/typescript/models/UpdateSystemConfigRequest.ts @@ -0,0 +1,38 @@ +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { HttpFile } from '../http/http'; + +export class UpdateSystemConfigRequest { + /** + * Configuration JSON with the key-value pair of configuration attributes to be updated. + */ + 'configuration': any; + + static readonly discriminator: string | undefined = undefined; + + static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ + { + "name": "configuration", + "baseName": "configuration", + "type": "any", + "format": "" + } ]; + + static getAttributeTypeMap() { + return UpdateSystemConfigRequest.attributeTypeMap; + } + + public constructor() { + } +} + diff --git a/sdks/typescript/models/UpdateTagRequest.ts b/sdks/typescript/models/UpdateTagRequest.ts new file mode 100644 index 000000000..e6eface7e --- /dev/null +++ b/sdks/typescript/models/UpdateTagRequest.ts @@ -0,0 +1,48 @@ +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { HttpFile } from '../http/http'; + +export class UpdateTagRequest { + /** + * Name of the tag. + */ + 'name'?: string; + /** + * Hex color code to be assigned to the tag. For example, #ff78a9. + */ + 'color'?: string; + + static readonly discriminator: string | undefined = undefined; + + static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ + { + "name": "name", + "baseName": "name", + "type": "string", + "format": "" + }, + { + "name": "color", + "baseName": "color", + "type": "string", + "format": "" + } ]; + + static getAttributeTypeMap() { + return UpdateTagRequest.attributeTypeMap; + } + + public constructor() { + } +} + diff --git a/sdks/typescript/models/UpdateUserGroupRequest.ts b/sdks/typescript/models/UpdateUserGroupRequest.ts new file mode 100644 index 000000000..d7c2cde0f --- /dev/null +++ b/sdks/typescript/models/UpdateUserGroupRequest.ts @@ -0,0 +1,144 @@ +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { HttpFile } from '../http/http'; + +export class UpdateUserGroupRequest { + /** + * Name of the group to modify. + */ + 'name'?: string; + /** + * ID of the Liveboards to be assigned as default Liveboards to the users in the group. + */ + 'default_liveboard_identifiers'?: Array; + /** + * Description for the group. + */ + 'description'?: string; + /** + * Display name of the group. + */ + 'display_name'?: string; + /** + * Privileges to assign to the group. + */ + 'privileges'?: Array; + /** + * GUID or name of the sub groups. A subgroup is a group assigned to a parent group. + */ + 'sub_group_identifiers'?: Array; + /** + * Type of the group + */ + 'type'?: UpdateUserGroupRequestTypeEnum; + /** + * GUID or name of the users to assign to the group. + */ + 'user_identifiers'?: Array; + /** + * Visibility of the group. To make a group visible to other users and groups, set the visibility to SHAREABLE. + */ + 'visibility'?: UpdateUserGroupRequestVisibilityEnum; + /** + * Role identifiers of the Roles that should be assigned to the group. + */ + 'role_identifiers'?: Array; + /** + * Type of update operation. Default operation type is REPLACE + */ + 'operation'?: UpdateUserGroupRequestOperationEnum; + + static readonly discriminator: string | undefined = undefined; + + static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ + { + "name": "name", + "baseName": "name", + "type": "string", + "format": "" + }, + { + "name": "default_liveboard_identifiers", + "baseName": "default_liveboard_identifiers", + "type": "Array", + "format": "" + }, + { + "name": "description", + "baseName": "description", + "type": "string", + "format": "" + }, + { + "name": "display_name", + "baseName": "display_name", + "type": "string", + "format": "" + }, + { + "name": "privileges", + "baseName": "privileges", + "type": "Array", + "format": "" + }, + { + "name": "sub_group_identifiers", + "baseName": "sub_group_identifiers", + "type": "Array", + "format": "" + }, + { + "name": "type", + "baseName": "type", + "type": "UpdateUserGroupRequestTypeEnum", + "format": "" + }, + { + "name": "user_identifiers", + "baseName": "user_identifiers", + "type": "Array", + "format": "" + }, + { + "name": "visibility", + "baseName": "visibility", + "type": "UpdateUserGroupRequestVisibilityEnum", + "format": "" + }, + { + "name": "role_identifiers", + "baseName": "role_identifiers", + "type": "Array", + "format": "" + }, + { + "name": "operation", + "baseName": "operation", + "type": "UpdateUserGroupRequestOperationEnum", + "format": "" + } ]; + + static getAttributeTypeMap() { + return UpdateUserGroupRequest.attributeTypeMap; + } + + public constructor() { + } +} + + +export type UpdateUserGroupRequestPrivilegesEnum = "ADMINISTRATION" | "AUTHORING" | "USERDATAUPLOADING" | "DATADOWNLOADING" | "USERMANAGEMENT" | "DATAMANAGEMENT" | "SHAREWITHALL" | "JOBSCHEDULING" | "A3ANALYSIS" | "EXPERIMENTALFEATUREPRIVILEGE" | "BYPASSRLS" | "RANALYSIS" | "DEVELOPER" | "USER_ADMINISTRATION" | "GROUP_ADMINISTRATION" | "SYNCMANAGEMENT" | "CAN_CREATE_CATALOG" | "DISABLE_PINBOARD_CREATION" | "LIVEBOARD_VERIFIER" | "PREVIEW_THOUGHTSPOT_SAGE" | "CAN_MANAGE_VERSION_CONTROL" | "THIRDPARTY_ANALYSIS" | "ALLOW_NON_EMBED_FULL_APP_ACCESS" | "CAN_ACCESS_ANALYST_STUDIO" | "CAN_MANAGE_ANALYST_STUDIO" | "CAN_MODIFY_FOLDERS" | "CAN_MANAGE_VARIABLES" | "CAN_VIEW_FOLDERS" | "CAN_MANAGE_AGENTSPOT" | "CAN_ACCESS_AGENTSPOT" | "PREVIEW_DOCUMENT_SEARCH" | "CAN_SETUP_VERSION_CONTROL" | "CAN_DOWNLOAD_VISUALS" | "CAN_DOWNLOAD_DETAILED_DATA" | "CAN_USE_SPOTTER" ; +export type UpdateUserGroupRequestTypeEnum = "LOCAL_GROUP" | "LDAP_GROUP" | "TEAM_GROUP" | "TENANT_GROUP" ; +export type UpdateUserGroupRequestVisibilityEnum = "SHARABLE" | "NON_SHARABLE" ; +export type UpdateUserGroupRequestOperationEnum = "ADD" | "REMOVE" | "REPLACE" ; + diff --git a/sdks/typescript/models/UpdateUserRequest.ts b/sdks/typescript/models/UpdateUserRequest.ts new file mode 100644 index 000000000..bb6953b89 --- /dev/null +++ b/sdks/typescript/models/UpdateUserRequest.ts @@ -0,0 +1,216 @@ +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { FavoriteMetadataInput } from '../models/FavoriteMetadataInput'; +import { HttpFile } from '../http/http'; + +export class UpdateUserRequest { + /** + * Name of the user. The username string must be unique. + */ + 'name'?: string; + /** + * A unique display name string for the user account, usually their first and last name + */ + 'display_name'?: string; + /** + * Visibility of the users. When set to SHARABLE, the user is visible to other users and groups when they try to share an object. + */ + 'visibility'?: UpdateUserRequestVisibilityEnum; + /** + * Email of the user account + */ + 'email'?: string; + /** + * Current status of the user account. The `SUSPENDED` user state indicates a transitional state applicable to IAMv2 users only. + */ + 'account_status'?: UpdateUserRequestAccountStatusEnum; + /** + * User preference for receiving email notifications when another ThoughtSpot user shares a metadata object such as Answer, Liveboard, or Worksheet. + */ + 'notify_on_share'?: boolean | null; + /** + * The user preference for revisiting the onboarding experience. + */ + 'show_onboarding_experience'?: boolean | null; + /** + * Indicates if the user has completed the onboarding and allows turning off the onboarding walkthrough. + */ + 'onboarding_experience_completed'?: boolean | null; + /** + * Type of the account. + */ + 'account_type'?: UpdateUserRequestAccountTypeEnum; + /** + * GUIDs or names of the groups. + */ + 'group_identifiers'?: Array; + /** + * GUID of the Liveboard to set a default Liveboard for the user. ThoughtSpot displays this Liveboard on the Home page when the user logs in. + */ + 'home_liveboard_identifier'?: string; + /** + * Metadata objects to add to the user\'s favorites list. + */ + 'favorite_metadata'?: Array; + /** + * IDs of the Orgs. + */ + 'org_identifiers'?: Array; + /** + * Type of update operation. Default operation type is REPLACE + */ + 'operation'?: UpdateUserRequestOperationEnum; + /** + * Locale for the user. When setting this value, do not set use_browser_language to true, otherwise the browser\'s language setting will take precedence and the preferred_locale value will be ignored. + */ + 'preferred_locale'?: UpdateUserRequestPreferredLocaleEnum; + /** + * Flag to indicate whether to use the browser locale for the user in the UI. When set to true, the preferred_locale value is unset and the browser\'s language setting takes precedence. Version: 26.3.0.cl or later + */ + 'use_browser_language'?: boolean | null; + /** + * Properties for the user + */ + 'extended_properties'?: any; + /** + * Preferences for the user + */ + 'extended_preferences'?: any; + + static readonly discriminator: string | undefined = undefined; + + static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ + { + "name": "name", + "baseName": "name", + "type": "string", + "format": "" + }, + { + "name": "display_name", + "baseName": "display_name", + "type": "string", + "format": "" + }, + { + "name": "visibility", + "baseName": "visibility", + "type": "UpdateUserRequestVisibilityEnum", + "format": "" + }, + { + "name": "email", + "baseName": "email", + "type": "string", + "format": "" + }, + { + "name": "account_status", + "baseName": "account_status", + "type": "UpdateUserRequestAccountStatusEnum", + "format": "" + }, + { + "name": "notify_on_share", + "baseName": "notify_on_share", + "type": "boolean", + "format": "" + }, + { + "name": "show_onboarding_experience", + "baseName": "show_onboarding_experience", + "type": "boolean", + "format": "" + }, + { + "name": "onboarding_experience_completed", + "baseName": "onboarding_experience_completed", + "type": "boolean", + "format": "" + }, + { + "name": "account_type", + "baseName": "account_type", + "type": "UpdateUserRequestAccountTypeEnum", + "format": "" + }, + { + "name": "group_identifiers", + "baseName": "group_identifiers", + "type": "Array", + "format": "" + }, + { + "name": "home_liveboard_identifier", + "baseName": "home_liveboard_identifier", + "type": "string", + "format": "" + }, + { + "name": "favorite_metadata", + "baseName": "favorite_metadata", + "type": "Array", + "format": "" + }, + { + "name": "org_identifiers", + "baseName": "org_identifiers", + "type": "Array", + "format": "" + }, + { + "name": "operation", + "baseName": "operation", + "type": "UpdateUserRequestOperationEnum", + "format": "" + }, + { + "name": "preferred_locale", + "baseName": "preferred_locale", + "type": "UpdateUserRequestPreferredLocaleEnum", + "format": "" + }, + { + "name": "use_browser_language", + "baseName": "use_browser_language", + "type": "boolean", + "format": "" + }, + { + "name": "extended_properties", + "baseName": "extended_properties", + "type": "any", + "format": "" + }, + { + "name": "extended_preferences", + "baseName": "extended_preferences", + "type": "any", + "format": "" + } ]; + + static getAttributeTypeMap() { + return UpdateUserRequest.attributeTypeMap; + } + + public constructor() { + } +} + + +export type UpdateUserRequestVisibilityEnum = "SHARABLE" | "NON_SHARABLE" ; +export type UpdateUserRequestAccountStatusEnum = "ACTIVE" | "INACTIVE" | "EXPIRED" | "LOCKED" | "PENDING" | "SUSPENDED" ; +export type UpdateUserRequestAccountTypeEnum = "LOCAL_USER" | "LDAP_USER" | "SAML_USER" | "OIDC_USER" | "REMOTE_USER" ; +export type UpdateUserRequestOperationEnum = "ADD" | "REMOVE" | "REPLACE" ; +export type UpdateUserRequestPreferredLocaleEnum = "en-CA" | "en-GB" | "en-US" | "de-DE" | "ja-JP" | "zh-CN" | "pt-BR" | "fr-FR" | "fr-CA" | "es-US" | "da-DK" | "es-ES" | "fi-FI" | "sv-SE" | "nb-NO" | "pt-PT" | "nl-NL" | "it-IT" | "ru-RU" | "en-IN" | "de-CH" | "en-NZ" | "es-MX" | "en-AU" | "zh-Hant" | "ko-KR" | "en-DE" ; + diff --git a/sdks/typescript/models/UpdateVariableRequest.ts b/sdks/typescript/models/UpdateVariableRequest.ts new file mode 100644 index 000000000..b8f4287f7 --- /dev/null +++ b/sdks/typescript/models/UpdateVariableRequest.ts @@ -0,0 +1,38 @@ +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { HttpFile } from '../http/http'; + +export class UpdateVariableRequest { + /** + * New name of the variable. + */ + 'name': string; + + static readonly discriminator: string | undefined = undefined; + + static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ + { + "name": "name", + "baseName": "name", + "type": "string", + "format": "" + } ]; + + static getAttributeTypeMap() { + return UpdateVariableRequest.attributeTypeMap; + } + + public constructor() { + } +} + diff --git a/sdks/typescript/models/UpdateVariableValuesRequest.ts b/sdks/typescript/models/UpdateVariableValuesRequest.ts new file mode 100644 index 000000000..9a170e018 --- /dev/null +++ b/sdks/typescript/models/UpdateVariableValuesRequest.ts @@ -0,0 +1,50 @@ +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { VariableUpdateAssignmentInput } from '../models/VariableUpdateAssignmentInput'; +import { VariableUpdateScopeInput } from '../models/VariableUpdateScopeInput'; +import { HttpFile } from '../http/http'; + +export class UpdateVariableValuesRequest { + /** + * Array of variable assignment objects specifying the variable identifier, values to assign, and the operation type (ADD, REMOVE, REPLACE, or RESET) to perform on each variable. + */ + 'variable_assignment': Array; + /** + * Array of scope objects defining where the variable values apply, including organization context, optional principal constraints (user or group), model reference for formula variables, and priority for conflict resolution. + */ + 'variable_value_scope': Array; + + static readonly discriminator: string | undefined = undefined; + + static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ + { + "name": "variable_assignment", + "baseName": "variable_assignment", + "type": "Array", + "format": "" + }, + { + "name": "variable_value_scope", + "baseName": "variable_value_scope", + "type": "Array", + "format": "" + } ]; + + static getAttributeTypeMap() { + return UpdateVariableValuesRequest.attributeTypeMap; + } + + public constructor() { + } +} + diff --git a/sdks/typescript/models/UpdateWebhookConfigurationRequest.ts b/sdks/typescript/models/UpdateWebhookConfigurationRequest.ts new file mode 100644 index 000000000..8590ccd3b --- /dev/null +++ b/sdks/typescript/models/UpdateWebhookConfigurationRequest.ts @@ -0,0 +1,116 @@ +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { CreateWebhookConfigurationRequestAuthentication } from '../models/CreateWebhookConfigurationRequestAuthentication'; +import { CreateWebhookConfigurationRequestSignatureVerification } from '../models/CreateWebhookConfigurationRequestSignatureVerification'; +import { CreateWebhookConfigurationRequestStorageDestination } from '../models/CreateWebhookConfigurationRequestStorageDestination'; +import { WebhookKeyValuePairInput } from '../models/WebhookKeyValuePairInput'; +import { HttpFile } from '../http/http'; + +export class UpdateWebhookConfigurationRequest { + /** + * Name of the webhook configuration. + */ + 'name'?: string; + /** + * Description of the webhook configuration. + */ + 'description'?: string; + /** + * The webhook endpoint URL. + */ + 'url'?: string; + /** + * Additional URL parameters as key-value pairs. + */ + 'url_params'?: any; + /** + * List of events to subscribe to. + */ + 'events'?: Array; + 'authentication'?: CreateWebhookConfigurationRequestAuthentication; + 'signature_verification'?: CreateWebhookConfigurationRequestSignatureVerification; + 'storage_destination'?: CreateWebhookConfigurationRequestStorageDestination; + /** + * Additional headers as an array of key-value pairs. Example: [{\"key\": \"X-Custom-Header\", \"value\": \"custom_value\"}] Version: 26.4.0.cl or later + */ + 'additional_headers'?: Array; + + static readonly discriminator: string | undefined = undefined; + + static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ + { + "name": "name", + "baseName": "name", + "type": "string", + "format": "" + }, + { + "name": "description", + "baseName": "description", + "type": "string", + "format": "" + }, + { + "name": "url", + "baseName": "url", + "type": "string", + "format": "" + }, + { + "name": "url_params", + "baseName": "url_params", + "type": "any", + "format": "" + }, + { + "name": "events", + "baseName": "events", + "type": "Array", + "format": "" + }, + { + "name": "authentication", + "baseName": "authentication", + "type": "CreateWebhookConfigurationRequestAuthentication", + "format": "" + }, + { + "name": "signature_verification", + "baseName": "signature_verification", + "type": "CreateWebhookConfigurationRequestSignatureVerification", + "format": "" + }, + { + "name": "storage_destination", + "baseName": "storage_destination", + "type": "CreateWebhookConfigurationRequestStorageDestination", + "format": "" + }, + { + "name": "additional_headers", + "baseName": "additional_headers", + "type": "Array", + "format": "" + } ]; + + static getAttributeTypeMap() { + return UpdateWebhookConfigurationRequest.attributeTypeMap; + } + + public constructor() { + } +} + + +export type UpdateWebhookConfigurationRequestEventsEnum = "LIVEBOARD_SCHEDULE" ; + diff --git a/sdks/typescript/models/User.ts b/sdks/typescript/models/User.ts new file mode 100644 index 000000000..6fcd7a08d --- /dev/null +++ b/sdks/typescript/models/User.ts @@ -0,0 +1,501 @@ +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { FavoriteMetadataItem } from '../models/FavoriteMetadataItem'; +import { ObjectIDAndName } from '../models/ObjectIDAndName'; +import { Org } from '../models/Org'; +import { HttpFile } from '../http/http'; + +export class User { + /** + * Unique identifier of the user. + */ + 'id': string; + /** + * Name of the user. + */ + 'name': string; + /** + * Display name of the user. + */ + 'display_name': string; + /** + * Visibility of the users. The `SHARABLE` property makes a user visible to other users and group, who can share objects with the user. + */ + 'visibility': UserVisibilityEnum; + /** + * Unique identifier of author of the user. + */ + 'author_id'?: string | null; + /** + * Defines whether the user can change their password. + */ + 'can_change_password'?: boolean | null; + /** + * Defines whether the response has complete detail of the user. + */ + 'complete_detail'?: boolean | null; + /** + * Creation time of the user in milliseconds. + */ + 'creation_time_in_millis'?: number | null; + 'current_org'?: Org; + /** + * Indicates whether the user is deleted. + */ + 'deleted'?: boolean | null; + /** + * Indicates whether the user is deprecated. + */ + 'deprecated'?: boolean | null; + /** + * Type of the user account. + */ + 'account_type'?: UserAccountTypeEnum | null; + /** + * Status of the user account. + */ + 'account_status'?: UserAccountStatusEnum | null; + /** + * Email of the user. + */ + 'email'?: string | null; + /** + * Expiration time of the user in milliseconds. + */ + 'expiration_time_in_millis'?: number | null; + /** + * Indicates whether the user is external. + */ + 'external'?: boolean | null; + /** + * Metadata objects to add to the users\' favorites list. + */ + 'favorite_metadata'?: Array | null; + /** + * Timestamp of the first login session of the user in milliseconds. + */ + 'first_login_time_in_millis'?: number | null; + /** + * Group mask of the user. + */ + 'group_mask'?: number | null; + /** + * Indicates whether the user is hidden. + */ + 'hidden'?: boolean | null; + 'home_liveboard'?: ObjectIDAndName; + /** + * Incomplete details of user if any present. + */ + 'incomplete_details'?: any | null; + /** + * Indicates whether it is first login of the user. + */ + 'is_first_login'?: boolean | null; + /** + * Last modified time of the user in milliseconds. + */ + 'modification_time_in_millis'?: number | null; + /** + * Unique identifier of modifier of the user. + */ + 'modifier_id'?: string | null; + /** + * User preference for receiving email notifications on shared Answers or Liveboard. + */ + 'notify_on_share'?: boolean | null; + /** + * The user preference for turning off the onboarding experience. + */ + 'onboarding_experience_completed'?: boolean | null; + /** + * Orgs to which the user belongs. + */ + 'orgs'?: Array | null; + /** + * Unique identifier of owner of the user. + */ + 'owner_id'?: string | null; + /** + * Parent type of the user. + */ + 'parent_type'?: UserParentTypeEnum | null; + /** + * Privileges which are assigned to the user. + */ + 'privileges'?: Array | null; + /** + * User\'s preference to revisit the new user onboarding experience. + */ + 'show_onboarding_experience'?: boolean | null; + /** + * Indicates whether the user is a super user. + */ + 'super_user'?: boolean | null; + /** + * Indicates whether the user is a system user. + */ + 'system_user'?: boolean | null; + /** + * Tags associated with the user. + */ + 'tags'?: Array | null; + /** + * Unique identifier of tenant of the user. + */ + 'tenant_id'?: string | null; + /** + * Groups to which the user is assigned. + */ + 'user_groups'?: Array | null; + /** + * Inherited User Groups which the user is part of. + */ + 'user_inherited_groups'?: Array | null; + /** + * Indicates whether welcome email is sent for the user. + */ + 'welcome_email_sent'?: boolean | null; + /** + * Privileges which are assigned to the user with org. + */ + 'org_privileges'?: any | null; + /** + * Locale for the user. + */ + 'preferred_locale'?: string | null; + /** + * Flag to indicate whether to use the browser locale for the user in the UI. When set to true, the preferred_locale value is unset and the browser\'s language setting takes precedence. Version: 26.3.0.cl or later + */ + 'use_browser_language'?: boolean | null; + /** + * Properties for the user + */ + 'extended_properties'?: any | null; + /** + * Preferences for the user + */ + 'extended_preferences'?: any | null; + /** + * User Parameters which are specified for the user via JWToken + */ + 'user_parameters'?: any | null; + /** + * Access Control Properties which are specified for the user via JWToken + */ + 'access_control_properties'?: any | null; + /** + * Formula Variables which are specified for the user via JWToken + */ + 'variable_values'?: any | null; + + static readonly discriminator: string | undefined = undefined; + + static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ + { + "name": "id", + "baseName": "id", + "type": "string", + "format": "" + }, + { + "name": "name", + "baseName": "name", + "type": "string", + "format": "" + }, + { + "name": "display_name", + "baseName": "display_name", + "type": "string", + "format": "" + }, + { + "name": "visibility", + "baseName": "visibility", + "type": "UserVisibilityEnum", + "format": "" + }, + { + "name": "author_id", + "baseName": "author_id", + "type": "string", + "format": "" + }, + { + "name": "can_change_password", + "baseName": "can_change_password", + "type": "boolean", + "format": "" + }, + { + "name": "complete_detail", + "baseName": "complete_detail", + "type": "boolean", + "format": "" + }, + { + "name": "creation_time_in_millis", + "baseName": "creation_time_in_millis", + "type": "number", + "format": "float" + }, + { + "name": "current_org", + "baseName": "current_org", + "type": "Org", + "format": "" + }, + { + "name": "deleted", + "baseName": "deleted", + "type": "boolean", + "format": "" + }, + { + "name": "deprecated", + "baseName": "deprecated", + "type": "boolean", + "format": "" + }, + { + "name": "account_type", + "baseName": "account_type", + "type": "UserAccountTypeEnum", + "format": "" + }, + { + "name": "account_status", + "baseName": "account_status", + "type": "UserAccountStatusEnum", + "format": "" + }, + { + "name": "email", + "baseName": "email", + "type": "string", + "format": "" + }, + { + "name": "expiration_time_in_millis", + "baseName": "expiration_time_in_millis", + "type": "number", + "format": "float" + }, + { + "name": "external", + "baseName": "external", + "type": "boolean", + "format": "" + }, + { + "name": "favorite_metadata", + "baseName": "favorite_metadata", + "type": "Array", + "format": "" + }, + { + "name": "first_login_time_in_millis", + "baseName": "first_login_time_in_millis", + "type": "number", + "format": "float" + }, + { + "name": "group_mask", + "baseName": "group_mask", + "type": "number", + "format": "int32" + }, + { + "name": "hidden", + "baseName": "hidden", + "type": "boolean", + "format": "" + }, + { + "name": "home_liveboard", + "baseName": "home_liveboard", + "type": "ObjectIDAndName", + "format": "" + }, + { + "name": "incomplete_details", + "baseName": "incomplete_details", + "type": "any", + "format": "" + }, + { + "name": "is_first_login", + "baseName": "is_first_login", + "type": "boolean", + "format": "" + }, + { + "name": "modification_time_in_millis", + "baseName": "modification_time_in_millis", + "type": "number", + "format": "float" + }, + { + "name": "modifier_id", + "baseName": "modifier_id", + "type": "string", + "format": "" + }, + { + "name": "notify_on_share", + "baseName": "notify_on_share", + "type": "boolean", + "format": "" + }, + { + "name": "onboarding_experience_completed", + "baseName": "onboarding_experience_completed", + "type": "boolean", + "format": "" + }, + { + "name": "orgs", + "baseName": "orgs", + "type": "Array", + "format": "" + }, + { + "name": "owner_id", + "baseName": "owner_id", + "type": "string", + "format": "" + }, + { + "name": "parent_type", + "baseName": "parent_type", + "type": "UserParentTypeEnum", + "format": "" + }, + { + "name": "privileges", + "baseName": "privileges", + "type": "Array", + "format": "" + }, + { + "name": "show_onboarding_experience", + "baseName": "show_onboarding_experience", + "type": "boolean", + "format": "" + }, + { + "name": "super_user", + "baseName": "super_user", + "type": "boolean", + "format": "" + }, + { + "name": "system_user", + "baseName": "system_user", + "type": "boolean", + "format": "" + }, + { + "name": "tags", + "baseName": "tags", + "type": "Array", + "format": "" + }, + { + "name": "tenant_id", + "baseName": "tenant_id", + "type": "string", + "format": "" + }, + { + "name": "user_groups", + "baseName": "user_groups", + "type": "Array", + "format": "" + }, + { + "name": "user_inherited_groups", + "baseName": "user_inherited_groups", + "type": "Array", + "format": "" + }, + { + "name": "welcome_email_sent", + "baseName": "welcome_email_sent", + "type": "boolean", + "format": "" + }, + { + "name": "org_privileges", + "baseName": "org_privileges", + "type": "any", + "format": "" + }, + { + "name": "preferred_locale", + "baseName": "preferred_locale", + "type": "string", + "format": "" + }, + { + "name": "use_browser_language", + "baseName": "use_browser_language", + "type": "boolean", + "format": "" + }, + { + "name": "extended_properties", + "baseName": "extended_properties", + "type": "any", + "format": "" + }, + { + "name": "extended_preferences", + "baseName": "extended_preferences", + "type": "any", + "format": "" + }, + { + "name": "user_parameters", + "baseName": "user_parameters", + "type": "any", + "format": "" + }, + { + "name": "access_control_properties", + "baseName": "access_control_properties", + "type": "any", + "format": "" + }, + { + "name": "variable_values", + "baseName": "variable_values", + "type": "any", + "format": "" + } ]; + + static getAttributeTypeMap() { + return User.attributeTypeMap; + } + + public constructor() { + } +} + + +export type UserVisibilityEnum = "SHARABLE" | "NON_SHARABLE" ; +export type UserAccountTypeEnum = "LOCAL_USER" | "LDAP_USER" | "SAML_USER" | "OIDC_USER" | "REMOTE_USER" ; +export type UserAccountStatusEnum = "ACTIVE" | "INACTIVE" | "EXPIRED" | "LOCKED" | "PENDING" | "SUSPENDED" ; +export type UserParentTypeEnum = "USER" | "GROUP" ; + diff --git a/sdks/typescript/models/UserGroup.ts b/sdks/typescript/models/UserGroup.ts new file mode 100644 index 000000000..718a541dc --- /dev/null +++ b/sdks/typescript/models/UserGroup.ts @@ -0,0 +1,42 @@ +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { HttpFile } from '../http/http'; + +export class UserGroup { + 'id'?: string | null; + 'name'?: string | null; + + static readonly discriminator: string | undefined = undefined; + + static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ + { + "name": "id", + "baseName": "id", + "type": "string", + "format": "" + }, + { + "name": "name", + "baseName": "name", + "type": "string", + "format": "" + } ]; + + static getAttributeTypeMap() { + return UserGroup.attributeTypeMap; + } + + public constructor() { + } +} + diff --git a/sdks/typescript/models/UserGroupResponse.ts b/sdks/typescript/models/UserGroupResponse.ts new file mode 100644 index 000000000..623d5f06c --- /dev/null +++ b/sdks/typescript/models/UserGroupResponse.ts @@ -0,0 +1,335 @@ +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { Role } from '../models/Role'; +import { UserGroup } from '../models/UserGroup'; +import { HttpFile } from '../http/http'; + +export class UserGroupResponse { + /** + * The unique identifier of the object + */ + 'author_id'?: string | null; + /** + * Indicates whether the response has complete detail of the group. + */ + 'complete_detail'?: boolean | null; + /** + * Content details of the group + */ + 'content'?: any | null; + /** + * Creation time of the group in milliseconds + */ + 'creation_time_in_millis'?: number | null; + /** + * Liveboards that are assigned as default Liveboards to the group. + */ + 'default_liveboards'?: Array | null; + /** + * Indicates whether the group is deleted + */ + 'deleted'?: boolean | null; + /** + * Indicates whether the group is deprecated + */ + 'deprecated'?: boolean | null; + /** + * Description of the group + */ + 'description'?: string | null; + /** + * Display name of the group. + */ + 'display_name': string; + /** + * Indicates whether the group is external + */ + 'external'?: boolean | null; + /** + * Generation number of the group + */ + 'generation_number'?: number | null; + /** + * Indicates whether the group is hidden + */ + 'hidden'?: boolean | null; + /** + * The unique identifier of the object + */ + 'id': string; + /** + * Index number of the group + */ + 'index'?: number | null; + /** + * Index version number of the group + */ + 'index_version'?: number | null; + /** + * Metadata version number of the group + */ + 'metadata_version'?: number | null; + /** + * Last modified time of the group in milliseconds. + */ + 'modification_time_in_millis'?: number | null; + /** + * The unique identifier of the object + */ + 'modifier_id'?: string | null; + /** + * Name of the group. + */ + 'name': string; + /** + * Orgs in which group exists. + */ + 'orgs'?: Array | null; + /** + * The unique identifier of the object + */ + 'owner_id'?: string | null; + /** + * Parent type of the group. + */ + 'parent_type'?: UserGroupResponseParentTypeEnum | null; + /** + * Privileges which are assigned to the group + */ + 'privileges'?: Array | null; + /** + * Groups who are part of the group + */ + 'sub_groups'?: Array | null; + /** + * Indicates whether the group is a system group. + */ + 'system_group'?: boolean | null; + /** + * Tags associated with the group. + */ + 'tags'?: Array | null; + /** + * Type of the group. + */ + 'type'?: UserGroupResponseTypeEnum | null; + /** + * Users who are part of the group. + */ + 'users'?: Array | null; + /** + * Visibility of the group. The SHARABLE makes a group visible to other users and groups, and thus allows them to share objects. + */ + 'visibility': UserGroupResponseVisibilityEnum; + /** + * List of roles assgined to the user + */ + 'roles'?: Array | null; + + static readonly discriminator: string | undefined = undefined; + + static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ + { + "name": "author_id", + "baseName": "author_id", + "type": "string", + "format": "" + }, + { + "name": "complete_detail", + "baseName": "complete_detail", + "type": "boolean", + "format": "" + }, + { + "name": "content", + "baseName": "content", + "type": "any", + "format": "" + }, + { + "name": "creation_time_in_millis", + "baseName": "creation_time_in_millis", + "type": "number", + "format": "float" + }, + { + "name": "default_liveboards", + "baseName": "default_liveboards", + "type": "Array", + "format": "" + }, + { + "name": "deleted", + "baseName": "deleted", + "type": "boolean", + "format": "" + }, + { + "name": "deprecated", + "baseName": "deprecated", + "type": "boolean", + "format": "" + }, + { + "name": "description", + "baseName": "description", + "type": "string", + "format": "" + }, + { + "name": "display_name", + "baseName": "display_name", + "type": "string", + "format": "" + }, + { + "name": "external", + "baseName": "external", + "type": "boolean", + "format": "" + }, + { + "name": "generation_number", + "baseName": "generation_number", + "type": "number", + "format": "int32" + }, + { + "name": "hidden", + "baseName": "hidden", + "type": "boolean", + "format": "" + }, + { + "name": "id", + "baseName": "id", + "type": "string", + "format": "" + }, + { + "name": "index", + "baseName": "index", + "type": "number", + "format": "int32" + }, + { + "name": "index_version", + "baseName": "index_version", + "type": "number", + "format": "int32" + }, + { + "name": "metadata_version", + "baseName": "metadata_version", + "type": "number", + "format": "int32" + }, + { + "name": "modification_time_in_millis", + "baseName": "modification_time_in_millis", + "type": "number", + "format": "float" + }, + { + "name": "modifier_id", + "baseName": "modifier_id", + "type": "string", + "format": "" + }, + { + "name": "name", + "baseName": "name", + "type": "string", + "format": "" + }, + { + "name": "orgs", + "baseName": "orgs", + "type": "Array", + "format": "" + }, + { + "name": "owner_id", + "baseName": "owner_id", + "type": "string", + "format": "" + }, + { + "name": "parent_type", + "baseName": "parent_type", + "type": "UserGroupResponseParentTypeEnum", + "format": "" + }, + { + "name": "privileges", + "baseName": "privileges", + "type": "Array", + "format": "" + }, + { + "name": "sub_groups", + "baseName": "sub_groups", + "type": "Array", + "format": "" + }, + { + "name": "system_group", + "baseName": "system_group", + "type": "boolean", + "format": "" + }, + { + "name": "tags", + "baseName": "tags", + "type": "Array", + "format": "" + }, + { + "name": "type", + "baseName": "type", + "type": "UserGroupResponseTypeEnum", + "format": "" + }, + { + "name": "users", + "baseName": "users", + "type": "Array", + "format": "" + }, + { + "name": "visibility", + "baseName": "visibility", + "type": "UserGroupResponseVisibilityEnum", + "format": "" + }, + { + "name": "roles", + "baseName": "roles", + "type": "Array", + "format": "" + } ]; + + static getAttributeTypeMap() { + return UserGroupResponse.attributeTypeMap; + } + + public constructor() { + } +} + + +export type UserGroupResponseParentTypeEnum = "USER" | "GROUP" ; +export type UserGroupResponseTypeEnum = "LOCAL_GROUP" | "LDAP_GROUP" | "TEAM_GROUP" | "TENANT_GROUP" ; +export type UserGroupResponseVisibilityEnum = "SHARABLE" | "NON_SHARABLE" ; + diff --git a/sdks/typescript/models/UserInfo.ts b/sdks/typescript/models/UserInfo.ts new file mode 100644 index 000000000..fa77e160f --- /dev/null +++ b/sdks/typescript/models/UserInfo.ts @@ -0,0 +1,48 @@ +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { HttpFile } from '../http/http'; + +export class UserInfo { + /** + * Id. + */ + 'id': string; + /** + * Name. + */ + 'name'?: string | null; + + static readonly discriminator: string | undefined = undefined; + + static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ + { + "name": "id", + "baseName": "id", + "type": "string", + "format": "" + }, + { + "name": "name", + "baseName": "name", + "type": "string", + "format": "" + } ]; + + static getAttributeTypeMap() { + return UserInfo.attributeTypeMap; + } + + public constructor() { + } +} + diff --git a/sdks/typescript/models/UserObject.ts b/sdks/typescript/models/UserObject.ts new file mode 100644 index 000000000..e059a0b83 --- /dev/null +++ b/sdks/typescript/models/UserObject.ts @@ -0,0 +1,54 @@ +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { HttpFile } from '../http/http'; + +/** +* Objects to apply the User_Object. +*/ +export class UserObject { + /** + * Type of object. Required if the name of the object is set as the identifier. This attribute is optional when the object GUID is specified as the identifier. Specify the object type as `LOGICAL_TABLE`. + */ + 'type'?: UserObjectTypeEnum | null; + /** + * Unique name/id of the object. + */ + 'identifier': string; + + static readonly discriminator: string | undefined = undefined; + + static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ + { + "name": "type", + "baseName": "type", + "type": "UserObjectTypeEnum", + "format": "" + }, + { + "name": "identifier", + "baseName": "identifier", + "type": "string", + "format": "" + } ]; + + static getAttributeTypeMap() { + return UserObject.attributeTypeMap; + } + + public constructor() { + } +} + + +export type UserObjectTypeEnum = "LOGICAL_TABLE" ; + diff --git a/sdks/typescript/models/UserParameterOptions.ts b/sdks/typescript/models/UserParameterOptions.ts new file mode 100644 index 000000000..4523bdf0d --- /dev/null +++ b/sdks/typescript/models/UserParameterOptions.ts @@ -0,0 +1,72 @@ +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { RuntimeFilters } from '../models/RuntimeFilters'; +import { RuntimeParameters } from '../models/RuntimeParameters'; +import { RuntimeSorts } from '../models/RuntimeSorts'; +import { UserObject } from '../models/UserObject'; +import { HttpFile } from '../http/http'; + +/** +* Define attributes such as Runtime filters and Runtime parameters to send security entitlements to a user session. For more information, see [Documentation](https://developers.thoughtspot.com/docs/abac-user-parameters). +*/ +export class UserParameterOptions { + 'objects'?: Array | null; + /** + * Objects to apply the User_Runtime_Filters. Examples to set the `runtime_filters` : ```json { \"column_name\": \"Color\", \"operator\": \"EQ\", \"values\": [\"red\"], \"persist\": false } ``` + */ + 'runtime_filters'?: Array | null; + /** + * Objects to apply the User_Runtime_Sorts. Examples to set the `runtime_sorts` : ```json { \"column_name\": \"Color\", \"order\": \"ASC\", \"persist\": false } ``` + */ + 'runtime_sorts'?: Array | null; + /** + * Objects to apply the Runtime_Parameters. Examples to set the `parameters` : ```json { \"name\": \"Color\", \"values\": [\"Blue\"], \"persist\": false } ``` + */ + 'parameters'?: Array | null; + + static readonly discriminator: string | undefined = undefined; + + static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ + { + "name": "objects", + "baseName": "objects", + "type": "Array", + "format": "" + }, + { + "name": "runtime_filters", + "baseName": "runtime_filters", + "type": "Array", + "format": "" + }, + { + "name": "runtime_sorts", + "baseName": "runtime_sorts", + "type": "Array", + "format": "" + }, + { + "name": "parameters", + "baseName": "parameters", + "type": "Array", + "format": "" + } ]; + + static getAttributeTypeMap() { + return UserParameterOptions.attributeTypeMap; + } + + public constructor() { + } +} + diff --git a/sdks/typescript/models/UserPrincipal.ts b/sdks/typescript/models/UserPrincipal.ts new file mode 100644 index 000000000..97a1a6e9b --- /dev/null +++ b/sdks/typescript/models/UserPrincipal.ts @@ -0,0 +1,49 @@ +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { HttpFile } from '../http/http'; + +export class UserPrincipal { + 'id'?: string | null; + 'name'?: string | null; + 'type'?: string | null; + + static readonly discriminator: string | undefined = undefined; + + static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ + { + "name": "id", + "baseName": "id", + "type": "string", + "format": "" + }, + { + "name": "name", + "baseName": "name", + "type": "string", + "format": "" + }, + { + "name": "type", + "baseName": "type", + "type": "string", + "format": "" + } ]; + + static getAttributeTypeMap() { + return UserPrincipal.attributeTypeMap; + } + + public constructor() { + } +} + diff --git a/sdks/typescript/models/ValidateCommunicationChannelRequest.ts b/sdks/typescript/models/ValidateCommunicationChannelRequest.ts new file mode 100644 index 000000000..9b44a4694 --- /dev/null +++ b/sdks/typescript/models/ValidateCommunicationChannelRequest.ts @@ -0,0 +1,62 @@ +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { HttpFile } from '../http/http'; + +export class ValidateCommunicationChannelRequest { + /** + * Type of communication channel to validate (e.g., WEBHOOK). + */ + 'channel_type': ValidateCommunicationChannelRequestChannelTypeEnum; + /** + * Unique identifier or name for the communication channel. + */ + 'channel_identifier': string; + /** + * Event type to validate for this channel. + */ + 'event_type': ValidateCommunicationChannelRequestEventTypeEnum; + + static readonly discriminator: string | undefined = undefined; + + static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ + { + "name": "channel_type", + "baseName": "channel_type", + "type": "ValidateCommunicationChannelRequestChannelTypeEnum", + "format": "" + }, + { + "name": "channel_identifier", + "baseName": "channel_identifier", + "type": "string", + "format": "" + }, + { + "name": "event_type", + "baseName": "event_type", + "type": "ValidateCommunicationChannelRequestEventTypeEnum", + "format": "" + } ]; + + static getAttributeTypeMap() { + return ValidateCommunicationChannelRequest.attributeTypeMap; + } + + public constructor() { + } +} + + +export type ValidateCommunicationChannelRequestChannelTypeEnum = "WEBHOOK" ; +export type ValidateCommunicationChannelRequestEventTypeEnum = "LIVEBOARD_SCHEDULE" ; + diff --git a/sdks/typescript/models/ValidateMergeRequest.ts b/sdks/typescript/models/ValidateMergeRequest.ts new file mode 100644 index 000000000..e8a1f882a --- /dev/null +++ b/sdks/typescript/models/ValidateMergeRequest.ts @@ -0,0 +1,48 @@ +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { HttpFile } from '../http/http'; + +export class ValidateMergeRequest { + /** + * Name of the branch from which changes need to be picked for validation + */ + 'source_branch_name': string; + /** + * Name of the branch where files will be merged + */ + 'target_branch_name': string; + + static readonly discriminator: string | undefined = undefined; + + static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ + { + "name": "source_branch_name", + "baseName": "source_branch_name", + "type": "string", + "format": "" + }, + { + "name": "target_branch_name", + "baseName": "target_branch_name", + "type": "string", + "format": "" + } ]; + + static getAttributeTypeMap() { + return ValidateMergeRequest.attributeTypeMap; + } + + public constructor() { + } +} + diff --git a/sdks/typescript/models/ValidateTokenRequest.ts b/sdks/typescript/models/ValidateTokenRequest.ts new file mode 100644 index 000000000..351797578 --- /dev/null +++ b/sdks/typescript/models/ValidateTokenRequest.ts @@ -0,0 +1,35 @@ +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { HttpFile } from '../http/http'; + +export class ValidateTokenRequest { + 'token': string; + + static readonly discriminator: string | undefined = undefined; + + static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ + { + "name": "token", + "baseName": "token", + "type": "string", + "format": "" + } ]; + + static getAttributeTypeMap() { + return ValidateTokenRequest.attributeTypeMap; + } + + public constructor() { + } +} + diff --git a/sdks/typescript/models/ValueScopeInput.ts b/sdks/typescript/models/ValueScopeInput.ts new file mode 100644 index 000000000..03a58b14c --- /dev/null +++ b/sdks/typescript/models/ValueScopeInput.ts @@ -0,0 +1,74 @@ +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { HttpFile } from '../http/http'; + +/** +* Input for filtering variable values by scope in search operations +*/ +export class ValueScopeInput { + /** + * The unique name of the org + */ + 'org_identifier'?: string | null; + /** + * Type of principal to filter by. Use USER to filter values assigned to specific users, or USER_GROUP to filter values assigned to groups. + */ + 'principal_type'?: ValueScopeInputPrincipalTypeEnum | null; + /** + * Unique ID or name of the principal + */ + 'principal_identifier'?: string | null; + /** + * Unique ID or name of the model to filter by. Applicable only for FORMULA_VARIABLE type. + */ + 'model_identifier'?: string | null; + + static readonly discriminator: string | undefined = undefined; + + static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ + { + "name": "org_identifier", + "baseName": "org_identifier", + "type": "string", + "format": "" + }, + { + "name": "principal_type", + "baseName": "principal_type", + "type": "ValueScopeInputPrincipalTypeEnum", + "format": "" + }, + { + "name": "principal_identifier", + "baseName": "principal_identifier", + "type": "string", + "format": "" + }, + { + "name": "model_identifier", + "baseName": "model_identifier", + "type": "string", + "format": "" + } ]; + + static getAttributeTypeMap() { + return ValueScopeInput.attributeTypeMap; + } + + public constructor() { + } +} + + +export type ValueScopeInputPrincipalTypeEnum = "USER" | "USER_GROUP" ; + diff --git a/sdks/typescript/models/Variable.ts b/sdks/typescript/models/Variable.ts new file mode 100644 index 000000000..e4361eb9d --- /dev/null +++ b/sdks/typescript/models/Variable.ts @@ -0,0 +1,93 @@ +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { VariableOrgInfo } from '../models/VariableOrgInfo'; +import { VariableValue } from '../models/VariableValue'; +import { HttpFile } from '../http/http'; + +/** +* Variable object +*/ +export class Variable { + /** + * Unique identifier of the variable + */ + 'id': string; + /** + * Name of the variable + */ + 'name': string; + /** + * Type of the variable + */ + 'variable_type'?: VariableVariableTypeEnum | null; + /** + * If the variable is sensitive + */ + 'sensitive'?: boolean | null; + /** + * Values of the variable + */ + 'values'?: Array | null; + 'org'?: VariableOrgInfo; + + static readonly discriminator: string | undefined = undefined; + + static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ + { + "name": "id", + "baseName": "id", + "type": "string", + "format": "" + }, + { + "name": "name", + "baseName": "name", + "type": "string", + "format": "" + }, + { + "name": "variable_type", + "baseName": "variable_type", + "type": "VariableVariableTypeEnum", + "format": "" + }, + { + "name": "sensitive", + "baseName": "sensitive", + "type": "boolean", + "format": "" + }, + { + "name": "values", + "baseName": "values", + "type": "Array", + "format": "" + }, + { + "name": "org", + "baseName": "org", + "type": "VariableOrgInfo", + "format": "" + } ]; + + static getAttributeTypeMap() { + return Variable.attributeTypeMap; + } + + public constructor() { + } +} + + +export type VariableVariableTypeEnum = "CONNECTION_PROPERTY" | "TABLE_MAPPING" | "CONNECTION_PROPERTY_PER_PRINCIPAL" | "FORMULA_VARIABLE" | "USER_PROPERTY" ; + diff --git a/sdks/typescript/models/VariableDetailInput.ts b/sdks/typescript/models/VariableDetailInput.ts new file mode 100644 index 000000000..2deab311f --- /dev/null +++ b/sdks/typescript/models/VariableDetailInput.ts @@ -0,0 +1,64 @@ +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { HttpFile } from '../http/http'; + +/** +* Input for variable details in search +*/ +export class VariableDetailInput { + /** + * Unique ID or name of the variable + */ + 'identifier'?: string | null; + /** + * Type of variable + */ + 'type'?: VariableDetailInputTypeEnum | null; + /** + * A pattern to match case-insensitive name of the variable. User % for a wildcard match + */ + 'name_pattern'?: string | null; + + static readonly discriminator: string | undefined = undefined; + + static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ + { + "name": "identifier", + "baseName": "identifier", + "type": "string", + "format": "" + }, + { + "name": "type", + "baseName": "type", + "type": "VariableDetailInputTypeEnum", + "format": "" + }, + { + "name": "name_pattern", + "baseName": "name_pattern", + "type": "string", + "format": "" + } ]; + + static getAttributeTypeMap() { + return VariableDetailInput.attributeTypeMap; + } + + public constructor() { + } +} + + +export type VariableDetailInputTypeEnum = "CONNECTION_PROPERTY" | "TABLE_MAPPING" | "CONNECTION_PROPERTY_PER_PRINCIPAL" | "FORMULA_VARIABLE" | "USER_PROPERTY" ; + diff --git a/sdks/typescript/models/VariableOrgInfo.ts b/sdks/typescript/models/VariableOrgInfo.ts new file mode 100644 index 000000000..f719f5cbd --- /dev/null +++ b/sdks/typescript/models/VariableOrgInfo.ts @@ -0,0 +1,48 @@ +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { HttpFile } from '../http/http'; + +export class VariableOrgInfo { + /** + * ID of the Org. + */ + 'id': number; + /** + * Name of the Org. + */ + 'name': string; + + static readonly discriminator: string | undefined = undefined; + + static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ + { + "name": "id", + "baseName": "id", + "type": "number", + "format": "int32" + }, + { + "name": "name", + "baseName": "name", + "type": "string", + "format": "" + } ]; + + static getAttributeTypeMap() { + return VariableOrgInfo.attributeTypeMap; + } + + public constructor() { + } +} + diff --git a/sdks/typescript/models/VariablePutAssignmentInput.ts b/sdks/typescript/models/VariablePutAssignmentInput.ts new file mode 100644 index 000000000..14d4fcd2a --- /dev/null +++ b/sdks/typescript/models/VariablePutAssignmentInput.ts @@ -0,0 +1,94 @@ +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { HttpFile } from '../http/http'; + +/** +* Input for variable value put operations +*/ +export class VariablePutAssignmentInput { + /** + * Values of the variable + */ + 'assigned_values': Array; + /** + * The unique name of the org + */ + 'org_identifier'?: string | null; + /** + * Principal type + */ + 'principal_type'?: VariablePutAssignmentInputPrincipalTypeEnum | null; + /** + * Unique ID or name of the principal + */ + 'principal_identifier'?: string | null; + /** + * Unique ID of the model + */ + 'model_identifier'?: string | null; + /** + * Priority level + */ + 'priority'?: number | null; + + static readonly discriminator: string | undefined = undefined; + + static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ + { + "name": "assigned_values", + "baseName": "assigned_values", + "type": "Array", + "format": "" + }, + { + "name": "org_identifier", + "baseName": "org_identifier", + "type": "string", + "format": "" + }, + { + "name": "principal_type", + "baseName": "principal_type", + "type": "VariablePutAssignmentInputPrincipalTypeEnum", + "format": "" + }, + { + "name": "principal_identifier", + "baseName": "principal_identifier", + "type": "string", + "format": "" + }, + { + "name": "model_identifier", + "baseName": "model_identifier", + "type": "string", + "format": "" + }, + { + "name": "priority", + "baseName": "priority", + "type": "number", + "format": "int32" + } ]; + + static getAttributeTypeMap() { + return VariablePutAssignmentInput.attributeTypeMap; + } + + public constructor() { + } +} + + +export type VariablePutAssignmentInputPrincipalTypeEnum = "USER" | "USER_GROUP" ; + diff --git a/sdks/typescript/models/VariableUpdateAssignmentInput.ts b/sdks/typescript/models/VariableUpdateAssignmentInput.ts new file mode 100644 index 000000000..61e436a23 --- /dev/null +++ b/sdks/typescript/models/VariableUpdateAssignmentInput.ts @@ -0,0 +1,64 @@ +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { HttpFile } from '../http/http'; + +/** +* Input for variable value update in batch operations +*/ +export class VariableUpdateAssignmentInput { + /** + * ID or Name of the variable + */ + 'variable_identifier': string; + /** + * Values of the variable + */ + 'variable_values': Array; + /** + * Operation to perform + */ + 'operation': VariableUpdateAssignmentInputOperationEnum; + + static readonly discriminator: string | undefined = undefined; + + static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ + { + "name": "variable_identifier", + "baseName": "variable_identifier", + "type": "string", + "format": "" + }, + { + "name": "variable_values", + "baseName": "variable_values", + "type": "Array", + "format": "" + }, + { + "name": "operation", + "baseName": "operation", + "type": "VariableUpdateAssignmentInputOperationEnum", + "format": "" + } ]; + + static getAttributeTypeMap() { + return VariableUpdateAssignmentInput.attributeTypeMap; + } + + public constructor() { + } +} + + +export type VariableUpdateAssignmentInputOperationEnum = "ADD" | "REMOVE" | "REPLACE" | "RESET" ; + diff --git a/sdks/typescript/models/VariableUpdateScopeInput.ts b/sdks/typescript/models/VariableUpdateScopeInput.ts new file mode 100644 index 000000000..f89fe8fda --- /dev/null +++ b/sdks/typescript/models/VariableUpdateScopeInput.ts @@ -0,0 +1,84 @@ +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { HttpFile } from '../http/http'; + +/** +* Input for defining the scope of variable value assignments in batch update operations +*/ +export class VariableUpdateScopeInput { + /** + * The unique name of the org + */ + 'org_identifier': string; + /** + * Type of principal to which the variable value applies. Use USER to assign values to a specific user, or USER_GROUP to assign values to a group. + */ + 'principal_type'?: VariableUpdateScopeInputPrincipalTypeEnum | null; + /** + * Unique ID or name of the principal + */ + 'principal_identifier'?: string | null; + /** + * Unique ID or name of the model. Required for FORMULA_VARIABLE type to scope the variable value to a specific worksheet. + */ + 'model_identifier'?: string | null; + /** + * The priority level for this scope assignment, used for conflict resolution when multiple values match. Higher priority values (larger numbers) take precedence. + */ + 'priority'?: number | null; + + static readonly discriminator: string | undefined = undefined; + + static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ + { + "name": "org_identifier", + "baseName": "org_identifier", + "type": "string", + "format": "" + }, + { + "name": "principal_type", + "baseName": "principal_type", + "type": "VariableUpdateScopeInputPrincipalTypeEnum", + "format": "" + }, + { + "name": "principal_identifier", + "baseName": "principal_identifier", + "type": "string", + "format": "" + }, + { + "name": "model_identifier", + "baseName": "model_identifier", + "type": "string", + "format": "" + }, + { + "name": "priority", + "baseName": "priority", + "type": "number", + "format": "int32" + } ]; + + static getAttributeTypeMap() { + return VariableUpdateScopeInput.attributeTypeMap; + } + + public constructor() { + } +} + + +export type VariableUpdateScopeInputPrincipalTypeEnum = "USER" | "USER_GROUP" ; + diff --git a/sdks/typescript/models/VariableValue.ts b/sdks/typescript/models/VariableValue.ts new file mode 100644 index 000000000..b02e9fadc --- /dev/null +++ b/sdks/typescript/models/VariableValue.ts @@ -0,0 +1,101 @@ +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { HttpFile } from '../http/http'; + +export class VariableValue { + /** + * The value of the variable + */ + 'value'?: string | null; + /** + * The value of the variable if it is a list type + */ + 'value_list'?: Array | null; + /** + * The unique name of the org + */ + 'org_identifier': string; + /** + * Type of principal to which this value applies. Use USER to assign the value to a specific user, or USER_GROUP to assign it to a group. + */ + 'principal_type'?: VariableValuePrincipalTypeEnum | null; + /** + * Unique ID or name of the principal + */ + 'principal_identifier'?: string | null; + /** + * Unique ID of the model Version: 26.3.0.cl or later + */ + 'model_identifier'?: string | null; + /** + * The priority assigned to this value. If there are 2 matching values, the one with the higher priority will be picked. + */ + 'priority'?: number | null; + + static readonly discriminator: string | undefined = undefined; + + static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ + { + "name": "value", + "baseName": "value", + "type": "string", + "format": "" + }, + { + "name": "value_list", + "baseName": "value_list", + "type": "Array", + "format": "" + }, + { + "name": "org_identifier", + "baseName": "org_identifier", + "type": "string", + "format": "" + }, + { + "name": "principal_type", + "baseName": "principal_type", + "type": "VariableValuePrincipalTypeEnum", + "format": "" + }, + { + "name": "principal_identifier", + "baseName": "principal_identifier", + "type": "string", + "format": "" + }, + { + "name": "model_identifier", + "baseName": "model_identifier", + "type": "string", + "format": "" + }, + { + "name": "priority", + "baseName": "priority", + "type": "number", + "format": "int32" + } ]; + + static getAttributeTypeMap() { + return VariableValue.attributeTypeMap; + } + + public constructor() { + } +} + + +export type VariableValuePrincipalTypeEnum = "USER" | "USER_GROUP" ; + diff --git a/sdks/typescript/models/VariableValues.ts b/sdks/typescript/models/VariableValues.ts new file mode 100644 index 000000000..aee74c642 --- /dev/null +++ b/sdks/typescript/models/VariableValues.ts @@ -0,0 +1,51 @@ +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { HttpFile } from '../http/http'; + +/** +* Variable values. +*/ +export class VariableValues { + /** + * The name of the existing formula variable. + */ + 'name': string; + /** + * The values to filter on. + */ + 'values': Array; + + static readonly discriminator: string | undefined = undefined; + + static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ + { + "name": "name", + "baseName": "name", + "type": "string", + "format": "" + }, + { + "name": "values", + "baseName": "values", + "type": "Array", + "format": "" + } ]; + + static getAttributeTypeMap() { + return VariableValues.attributeTypeMap; + } + + public constructor() { + } +} + diff --git a/sdks/typescript/models/WebhookAuthApiKey.ts b/sdks/typescript/models/WebhookAuthApiKey.ts new file mode 100644 index 000000000..64f8ce193 --- /dev/null +++ b/sdks/typescript/models/WebhookAuthApiKey.ts @@ -0,0 +1,48 @@ +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { HttpFile } from '../http/http'; + +export class WebhookAuthApiKey { + /** + * The header or query parameter name for the API key. + */ + 'key': string; + /** + * The API key value. + */ + 'value': string; + + static readonly discriminator: string | undefined = undefined; + + static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ + { + "name": "key", + "baseName": "key", + "type": "string", + "format": "" + }, + { + "name": "value", + "baseName": "value", + "type": "string", + "format": "" + } ]; + + static getAttributeTypeMap() { + return WebhookAuthApiKey.attributeTypeMap; + } + + public constructor() { + } +} + diff --git a/sdks/typescript/models/WebhookAuthApiKeyInput.ts b/sdks/typescript/models/WebhookAuthApiKeyInput.ts new file mode 100644 index 000000000..8b5ff6836 --- /dev/null +++ b/sdks/typescript/models/WebhookAuthApiKeyInput.ts @@ -0,0 +1,48 @@ +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { HttpFile } from '../http/http'; + +export class WebhookAuthApiKeyInput { + /** + * The header or query parameter name for the API key. + */ + 'key': string; + /** + * The API key value. + */ + 'value': string; + + static readonly discriminator: string | undefined = undefined; + + static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ + { + "name": "key", + "baseName": "key", + "type": "string", + "format": "" + }, + { + "name": "value", + "baseName": "value", + "type": "string", + "format": "" + } ]; + + static getAttributeTypeMap() { + return WebhookAuthApiKeyInput.attributeTypeMap; + } + + public constructor() { + } +} + diff --git a/sdks/typescript/models/WebhookAuthBasicAuth.ts b/sdks/typescript/models/WebhookAuthBasicAuth.ts new file mode 100644 index 000000000..f14a5d47a --- /dev/null +++ b/sdks/typescript/models/WebhookAuthBasicAuth.ts @@ -0,0 +1,48 @@ +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { HttpFile } from '../http/http'; + +export class WebhookAuthBasicAuth { + /** + * Username for basic authentication. + */ + 'username': string; + /** + * Password for basic authentication. + */ + 'password': string; + + static readonly discriminator: string | undefined = undefined; + + static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ + { + "name": "username", + "baseName": "username", + "type": "string", + "format": "" + }, + { + "name": "password", + "baseName": "password", + "type": "string", + "format": "" + } ]; + + static getAttributeTypeMap() { + return WebhookAuthBasicAuth.attributeTypeMap; + } + + public constructor() { + } +} + diff --git a/sdks/typescript/models/WebhookAuthBasicAuthInput.ts b/sdks/typescript/models/WebhookAuthBasicAuthInput.ts new file mode 100644 index 000000000..99e8bbebd --- /dev/null +++ b/sdks/typescript/models/WebhookAuthBasicAuthInput.ts @@ -0,0 +1,48 @@ +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { HttpFile } from '../http/http'; + +export class WebhookAuthBasicAuthInput { + /** + * Username for basic authentication. + */ + 'username': string; + /** + * Password for basic authentication. + */ + 'password': string; + + static readonly discriminator: string | undefined = undefined; + + static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ + { + "name": "username", + "baseName": "username", + "type": "string", + "format": "" + }, + { + "name": "password", + "baseName": "password", + "type": "string", + "format": "" + } ]; + + static getAttributeTypeMap() { + return WebhookAuthBasicAuthInput.attributeTypeMap; + } + + public constructor() { + } +} + diff --git a/sdks/typescript/models/WebhookAuthOAuth2.ts b/sdks/typescript/models/WebhookAuthOAuth2.ts new file mode 100644 index 000000000..926b8b06c --- /dev/null +++ b/sdks/typescript/models/WebhookAuthOAuth2.ts @@ -0,0 +1,58 @@ +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { HttpFile } from '../http/http'; + +export class WebhookAuthOAuth2 { + /** + * OAuth2 authorization server URL. + */ + 'authorization_url': string; + /** + * OAuth2 client identifier. + */ + 'client_id': string; + /** + * OAuth2 client secret key. + */ + 'client_secret': string; + + static readonly discriminator: string | undefined = undefined; + + static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ + { + "name": "authorization_url", + "baseName": "authorization_url", + "type": "string", + "format": "" + }, + { + "name": "client_id", + "baseName": "client_id", + "type": "string", + "format": "" + }, + { + "name": "client_secret", + "baseName": "client_secret", + "type": "string", + "format": "" + } ]; + + static getAttributeTypeMap() { + return WebhookAuthOAuth2.attributeTypeMap; + } + + public constructor() { + } +} + diff --git a/sdks/typescript/models/WebhookAuthOAuth2Input.ts b/sdks/typescript/models/WebhookAuthOAuth2Input.ts new file mode 100644 index 000000000..9f5da720c --- /dev/null +++ b/sdks/typescript/models/WebhookAuthOAuth2Input.ts @@ -0,0 +1,58 @@ +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { HttpFile } from '../http/http'; + +export class WebhookAuthOAuth2Input { + /** + * OAuth2 authorization server URL. + */ + 'authorization_url': string; + /** + * OAuth2 client identifier. + */ + 'client_id': string; + /** + * OAuth2 client secret key. + */ + 'client_secret': string; + + static readonly discriminator: string | undefined = undefined; + + static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ + { + "name": "authorization_url", + "baseName": "authorization_url", + "type": "string", + "format": "" + }, + { + "name": "client_id", + "baseName": "client_id", + "type": "string", + "format": "" + }, + { + "name": "client_secret", + "baseName": "client_secret", + "type": "string", + "format": "" + } ]; + + static getAttributeTypeMap() { + return WebhookAuthOAuth2Input.attributeTypeMap; + } + + public constructor() { + } +} + diff --git a/sdks/typescript/models/WebhookAuthentication.ts b/sdks/typescript/models/WebhookAuthentication.ts new file mode 100644 index 000000000..20a7e388a --- /dev/null +++ b/sdks/typescript/models/WebhookAuthentication.ts @@ -0,0 +1,62 @@ +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { WebhookAuthApiKey } from '../models/WebhookAuthApiKey'; +import { WebhookAuthBasicAuth } from '../models/WebhookAuthBasicAuth'; +import { WebhookAuthOAuth2 } from '../models/WebhookAuthOAuth2'; +import { HttpFile } from '../http/http'; + +export class WebhookAuthentication { + 'API_KEY'?: WebhookAuthApiKey; + 'BASIC_AUTH'?: WebhookAuthBasicAuth; + /** + * Redacted Bearer token authentication configuration. + */ + 'BEARER_TOKEN'?: string | null; + 'OAUTH2'?: WebhookAuthOAuth2; + + static readonly discriminator: string | undefined = undefined; + + static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ + { + "name": "API_KEY", + "baseName": "API_KEY", + "type": "WebhookAuthApiKey", + "format": "" + }, + { + "name": "BASIC_AUTH", + "baseName": "BASIC_AUTH", + "type": "WebhookAuthBasicAuth", + "format": "" + }, + { + "name": "BEARER_TOKEN", + "baseName": "BEARER_TOKEN", + "type": "string", + "format": "" + }, + { + "name": "OAUTH2", + "baseName": "OAUTH2", + "type": "WebhookAuthOAuth2", + "format": "" + } ]; + + static getAttributeTypeMap() { + return WebhookAuthentication.attributeTypeMap; + } + + public constructor() { + } +} + diff --git a/sdks/typescript/models/WebhookAuthenticationInput.ts b/sdks/typescript/models/WebhookAuthenticationInput.ts new file mode 100644 index 000000000..1c646daba --- /dev/null +++ b/sdks/typescript/models/WebhookAuthenticationInput.ts @@ -0,0 +1,62 @@ +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { WebhookAuthApiKeyInput } from '../models/WebhookAuthApiKeyInput'; +import { WebhookAuthBasicAuthInput } from '../models/WebhookAuthBasicAuthInput'; +import { WebhookAuthOAuth2Input } from '../models/WebhookAuthOAuth2Input'; +import { HttpFile } from '../http/http'; + +export class WebhookAuthenticationInput { + 'API_KEY'?: WebhookAuthApiKeyInput; + 'BASIC_AUTH'?: WebhookAuthBasicAuthInput; + /** + * Bearer token authentication configuration. + */ + 'BEARER_TOKEN'?: string | null; + 'OAUTH2'?: WebhookAuthOAuth2Input; + + static readonly discriminator: string | undefined = undefined; + + static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ + { + "name": "API_KEY", + "baseName": "API_KEY", + "type": "WebhookAuthApiKeyInput", + "format": "" + }, + { + "name": "BASIC_AUTH", + "baseName": "BASIC_AUTH", + "type": "WebhookAuthBasicAuthInput", + "format": "" + }, + { + "name": "BEARER_TOKEN", + "baseName": "BEARER_TOKEN", + "type": "string", + "format": "" + }, + { + "name": "OAUTH2", + "baseName": "OAUTH2", + "type": "WebhookAuthOAuth2Input", + "format": "" + } ]; + + static getAttributeTypeMap() { + return WebhookAuthenticationInput.attributeTypeMap; + } + + public constructor() { + } +} + diff --git a/sdks/typescript/models/WebhookDeleteFailure.ts b/sdks/typescript/models/WebhookDeleteFailure.ts new file mode 100644 index 000000000..caa196a0d --- /dev/null +++ b/sdks/typescript/models/WebhookDeleteFailure.ts @@ -0,0 +1,58 @@ +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { HttpFile } from '../http/http'; + +export class WebhookDeleteFailure { + /** + * Unique identifier of the webhook that failed to delete. + */ + 'id': string; + /** + * Name of the webhook that failed to delete. + */ + 'name': string; + /** + * Error message describing why the deletion failed. + */ + 'error': string; + + static readonly discriminator: string | undefined = undefined; + + static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ + { + "name": "id", + "baseName": "id", + "type": "string", + "format": "" + }, + { + "name": "name", + "baseName": "name", + "type": "string", + "format": "" + }, + { + "name": "error", + "baseName": "error", + "type": "string", + "format": "" + } ]; + + static getAttributeTypeMap() { + return WebhookDeleteFailure.attributeTypeMap; + } + + public constructor() { + } +} + diff --git a/sdks/typescript/models/WebhookDeleteResponse.ts b/sdks/typescript/models/WebhookDeleteResponse.ts new file mode 100644 index 000000000..83a30729f --- /dev/null +++ b/sdks/typescript/models/WebhookDeleteResponse.ts @@ -0,0 +1,70 @@ +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { WebhookDeleteFailure } from '../models/WebhookDeleteFailure'; +import { WebhookResponse } from '../models/WebhookResponse'; +import { HttpFile } from '../http/http'; + +export class WebhookDeleteResponse { + /** + * Number of webhooks successfully deleted. + */ + 'deleted_count': number; + /** + * Number of webhooks that failed to delete. + */ + 'failed_count': number; + /** + * List of successfully deleted webhooks. + */ + 'deleted_webhooks': Array; + /** + * List of webhooks that failed to delete with error details. + */ + 'failed_webhooks': Array; + + static readonly discriminator: string | undefined = undefined; + + static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ + { + "name": "deleted_count", + "baseName": "deleted_count", + "type": "number", + "format": "int32" + }, + { + "name": "failed_count", + "baseName": "failed_count", + "type": "number", + "format": "int32" + }, + { + "name": "deleted_webhooks", + "baseName": "deleted_webhooks", + "type": "Array", + "format": "" + }, + { + "name": "failed_webhooks", + "baseName": "failed_webhooks", + "type": "Array", + "format": "" + } ]; + + static getAttributeTypeMap() { + return WebhookDeleteResponse.attributeTypeMap; + } + + public constructor() { + } +} + diff --git a/sdks/typescript/models/WebhookKeyValuePair.ts b/sdks/typescript/models/WebhookKeyValuePair.ts new file mode 100644 index 000000000..4c750f7ae --- /dev/null +++ b/sdks/typescript/models/WebhookKeyValuePair.ts @@ -0,0 +1,51 @@ +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { HttpFile } from '../http/http'; + +/** +* Key-value pair for additional webhook headers. +*/ +export class WebhookKeyValuePair { + /** + * Header name. + */ + 'key': string; + /** + * Header value. + */ + 'value': string; + + static readonly discriminator: string | undefined = undefined; + + static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ + { + "name": "key", + "baseName": "key", + "type": "string", + "format": "" + }, + { + "name": "value", + "baseName": "value", + "type": "string", + "format": "" + } ]; + + static getAttributeTypeMap() { + return WebhookKeyValuePair.attributeTypeMap; + } + + public constructor() { + } +} + diff --git a/sdks/typescript/models/WebhookKeyValuePairInput.ts b/sdks/typescript/models/WebhookKeyValuePairInput.ts new file mode 100644 index 000000000..442c8a00c --- /dev/null +++ b/sdks/typescript/models/WebhookKeyValuePairInput.ts @@ -0,0 +1,51 @@ +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { HttpFile } from '../http/http'; + +/** +* Key-value pair input for additional webhook headers. +*/ +export class WebhookKeyValuePairInput { + /** + * Header name. + */ + 'key': string; + /** + * Header value. + */ + 'value': string; + + static readonly discriminator: string | undefined = undefined; + + static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ + { + "name": "key", + "baseName": "key", + "type": "string", + "format": "" + }, + { + "name": "value", + "baseName": "value", + "type": "string", + "format": "" + } ]; + + static getAttributeTypeMap() { + return WebhookKeyValuePairInput.attributeTypeMap; + } + + public constructor() { + } +} + diff --git a/sdks/typescript/models/WebhookOrg.ts b/sdks/typescript/models/WebhookOrg.ts new file mode 100644 index 000000000..0a7058164 --- /dev/null +++ b/sdks/typescript/models/WebhookOrg.ts @@ -0,0 +1,48 @@ +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { HttpFile } from '../http/http'; + +export class WebhookOrg { + /** + * Unique identifier of the org. + */ + 'id': string; + /** + * Name of the org. + */ + 'name': string; + + static readonly discriminator: string | undefined = undefined; + + static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ + { + "name": "id", + "baseName": "id", + "type": "string", + "format": "" + }, + { + "name": "name", + "baseName": "name", + "type": "string", + "format": "" + } ]; + + static getAttributeTypeMap() { + return WebhookOrg.attributeTypeMap; + } + + public constructor() { + } +} + diff --git a/sdks/typescript/models/WebhookPagination.ts b/sdks/typescript/models/WebhookPagination.ts new file mode 100644 index 000000000..d126caf20 --- /dev/null +++ b/sdks/typescript/models/WebhookPagination.ts @@ -0,0 +1,68 @@ +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { HttpFile } from '../http/http'; + +export class WebhookPagination { + /** + * The starting record number from where the records are included. + */ + 'record_offset': number; + /** + * The number of records included in the response. + */ + 'record_size': number; + /** + * Total number of webhook configurations available. + */ + 'total_count': number; + /** + * Indicates whether more records are available beyond the current response. + */ + 'has_more': boolean; + + static readonly discriminator: string | undefined = undefined; + + static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ + { + "name": "record_offset", + "baseName": "record_offset", + "type": "number", + "format": "int32" + }, + { + "name": "record_size", + "baseName": "record_size", + "type": "number", + "format": "int32" + }, + { + "name": "total_count", + "baseName": "total_count", + "type": "number", + "format": "int32" + }, + { + "name": "has_more", + "baseName": "has_more", + "type": "boolean", + "format": "" + } ]; + + static getAttributeTypeMap() { + return WebhookPagination.attributeTypeMap; + } + + public constructor() { + } +} + diff --git a/sdks/typescript/models/WebhookResponse.ts b/sdks/typescript/models/WebhookResponse.ts new file mode 100644 index 000000000..96a7ca1ed --- /dev/null +++ b/sdks/typescript/models/WebhookResponse.ts @@ -0,0 +1,169 @@ +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { StorageDestination } from '../models/StorageDestination'; +import { WebhookAuthentication } from '../models/WebhookAuthentication'; +import { WebhookKeyValuePair } from '../models/WebhookKeyValuePair'; +import { WebhookOrg } from '../models/WebhookOrg'; +import { WebhookSignatureVerification } from '../models/WebhookSignatureVerification'; +import { WebhookUser } from '../models/WebhookUser'; +import { HttpFile } from '../http/http'; + +export class WebhookResponse { + /** + * Unique identifier of the webhook configuration. + */ + 'id': string; + /** + * Name of the webhook configuration. + */ + 'name': string; + /** + * Description of the webhook configuration. + */ + 'description'?: string | null; + 'org'?: WebhookOrg; + /** + * The webhook endpoint URL. + */ + 'url': string; + /** + * Additional URL parameters as key-value pairs. + */ + 'url_params'?: any | null; + /** + * List of events this webhook subscribes to. + */ + 'events': Array; + 'authentication'?: WebhookAuthentication; + 'signature_verification'?: WebhookSignatureVerification; + /** + * Additional headers as an array of key-value pairs. Version: 26.4.0.cl or later + */ + 'additional_headers'?: Array | null; + /** + * Creation time of the webhook configuration in milliseconds. + */ + 'creation_time_in_millis': number; + /** + * Last modified time of the webhook configuration in milliseconds. + */ + 'modification_time_in_millis': number; + 'created_by'?: WebhookUser; + 'last_modified_by'?: WebhookUser; + 'storage_destination'?: StorageDestination; + + static readonly discriminator: string | undefined = undefined; + + static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ + { + "name": "id", + "baseName": "id", + "type": "string", + "format": "" + }, + { + "name": "name", + "baseName": "name", + "type": "string", + "format": "" + }, + { + "name": "description", + "baseName": "description", + "type": "string", + "format": "" + }, + { + "name": "org", + "baseName": "org", + "type": "WebhookOrg", + "format": "" + }, + { + "name": "url", + "baseName": "url", + "type": "string", + "format": "" + }, + { + "name": "url_params", + "baseName": "url_params", + "type": "any", + "format": "" + }, + { + "name": "events", + "baseName": "events", + "type": "Array", + "format": "" + }, + { + "name": "authentication", + "baseName": "authentication", + "type": "WebhookAuthentication", + "format": "" + }, + { + "name": "signature_verification", + "baseName": "signature_verification", + "type": "WebhookSignatureVerification", + "format": "" + }, + { + "name": "additional_headers", + "baseName": "additional_headers", + "type": "Array", + "format": "" + }, + { + "name": "creation_time_in_millis", + "baseName": "creation_time_in_millis", + "type": "number", + "format": "float" + }, + { + "name": "modification_time_in_millis", + "baseName": "modification_time_in_millis", + "type": "number", + "format": "float" + }, + { + "name": "created_by", + "baseName": "created_by", + "type": "WebhookUser", + "format": "" + }, + { + "name": "last_modified_by", + "baseName": "last_modified_by", + "type": "WebhookUser", + "format": "" + }, + { + "name": "storage_destination", + "baseName": "storage_destination", + "type": "StorageDestination", + "format": "" + } ]; + + static getAttributeTypeMap() { + return WebhookResponse.attributeTypeMap; + } + + public constructor() { + } +} + + +export type WebhookResponseEventsEnum = "LIVEBOARD_SCHEDULE" ; + diff --git a/sdks/typescript/models/WebhookSearchResponse.ts b/sdks/typescript/models/WebhookSearchResponse.ts new file mode 100644 index 000000000..0611aaf60 --- /dev/null +++ b/sdks/typescript/models/WebhookSearchResponse.ts @@ -0,0 +1,47 @@ +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { WebhookPagination } from '../models/WebhookPagination'; +import { WebhookResponse } from '../models/WebhookResponse'; +import { HttpFile } from '../http/http'; + +export class WebhookSearchResponse { + /** + * List of webhook configurations matching the search criteria. + */ + 'webhooks': Array; + 'pagination': WebhookPagination; + + static readonly discriminator: string | undefined = undefined; + + static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ + { + "name": "webhooks", + "baseName": "webhooks", + "type": "Array", + "format": "" + }, + { + "name": "pagination", + "baseName": "pagination", + "type": "WebhookPagination", + "format": "" + } ]; + + static getAttributeTypeMap() { + return WebhookSearchResponse.attributeTypeMap; + } + + public constructor() { + } +} + diff --git a/sdks/typescript/models/WebhookSignatureVerification.ts b/sdks/typescript/models/WebhookSignatureVerification.ts new file mode 100644 index 000000000..fbbee7812 --- /dev/null +++ b/sdks/typescript/models/WebhookSignatureVerification.ts @@ -0,0 +1,72 @@ +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { HttpFile } from '../http/http'; + +export class WebhookSignatureVerification { + /** + * Signature verification method type. + */ + 'type': WebhookSignatureVerificationTypeEnum; + /** + * HTTP header where the signature is sent. + */ + 'header': string; + /** + * Hash algorithm used for signature verification. + */ + 'algorithm': WebhookSignatureVerificationAlgorithmEnum; + /** + * Shared secret used for HMAC signature generation. + */ + 'secret': string; + + static readonly discriminator: string | undefined = undefined; + + static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ + { + "name": "type", + "baseName": "type", + "type": "WebhookSignatureVerificationTypeEnum", + "format": "" + }, + { + "name": "header", + "baseName": "header", + "type": "string", + "format": "" + }, + { + "name": "algorithm", + "baseName": "algorithm", + "type": "WebhookSignatureVerificationAlgorithmEnum", + "format": "" + }, + { + "name": "secret", + "baseName": "secret", + "type": "string", + "format": "" + } ]; + + static getAttributeTypeMap() { + return WebhookSignatureVerification.attributeTypeMap; + } + + public constructor() { + } +} + + +export type WebhookSignatureVerificationTypeEnum = "HMAC_SHA256" ; +export type WebhookSignatureVerificationAlgorithmEnum = "SHA256" ; + diff --git a/sdks/typescript/models/WebhookSignatureVerificationInput.ts b/sdks/typescript/models/WebhookSignatureVerificationInput.ts new file mode 100644 index 000000000..b48449e29 --- /dev/null +++ b/sdks/typescript/models/WebhookSignatureVerificationInput.ts @@ -0,0 +1,72 @@ +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { HttpFile } from '../http/http'; + +export class WebhookSignatureVerificationInput { + /** + * Signature verification method type. + */ + 'type': WebhookSignatureVerificationInputTypeEnum; + /** + * HTTP header where the signature is sent. + */ + 'header': string; + /** + * Hash algorithm used for signature verification. + */ + 'algorithm': WebhookSignatureVerificationInputAlgorithmEnum; + /** + * Shared secret used for HMAC signature generation. + */ + 'secret': string; + + static readonly discriminator: string | undefined = undefined; + + static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ + { + "name": "type", + "baseName": "type", + "type": "WebhookSignatureVerificationInputTypeEnum", + "format": "" + }, + { + "name": "header", + "baseName": "header", + "type": "string", + "format": "" + }, + { + "name": "algorithm", + "baseName": "algorithm", + "type": "WebhookSignatureVerificationInputAlgorithmEnum", + "format": "" + }, + { + "name": "secret", + "baseName": "secret", + "type": "string", + "format": "" + } ]; + + static getAttributeTypeMap() { + return WebhookSignatureVerificationInput.attributeTypeMap; + } + + public constructor() { + } +} + + +export type WebhookSignatureVerificationInputTypeEnum = "HMAC_SHA256" ; +export type WebhookSignatureVerificationInputAlgorithmEnum = "SHA256" ; + diff --git a/sdks/typescript/models/WebhookSortOptionsInput.ts b/sdks/typescript/models/WebhookSortOptionsInput.ts new file mode 100644 index 000000000..c84a08019 --- /dev/null +++ b/sdks/typescript/models/WebhookSortOptionsInput.ts @@ -0,0 +1,52 @@ +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { HttpFile } from '../http/http'; + +export class WebhookSortOptionsInput { + /** + * Name of the field to apply the sort on. + */ + 'field_name'?: WebhookSortOptionsInputFieldNameEnum | null; + /** + * Sort order: ASC (Ascending) or DESC (Descending). + */ + 'order'?: WebhookSortOptionsInputOrderEnum | null; + + static readonly discriminator: string | undefined = undefined; + + static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ + { + "name": "field_name", + "baseName": "field_name", + "type": "WebhookSortOptionsInputFieldNameEnum", + "format": "" + }, + { + "name": "order", + "baseName": "order", + "type": "WebhookSortOptionsInputOrderEnum", + "format": "" + } ]; + + static getAttributeTypeMap() { + return WebhookSortOptionsInput.attributeTypeMap; + } + + public constructor() { + } +} + + +export type WebhookSortOptionsInputFieldNameEnum = "CREATED" | "MODIFIED" | "NAME" ; +export type WebhookSortOptionsInputOrderEnum = "ASC" | "DESC" ; + diff --git a/sdks/typescript/models/WebhookUser.ts b/sdks/typescript/models/WebhookUser.ts new file mode 100644 index 000000000..fbadaf88b --- /dev/null +++ b/sdks/typescript/models/WebhookUser.ts @@ -0,0 +1,48 @@ +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { HttpFile } from '../http/http'; + +export class WebhookUser { + /** + * Unique identifier of the user. + */ + 'id': string; + /** + * Name of the user. + */ + 'name': string; + + static readonly discriminator: string | undefined = undefined; + + static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ + { + "name": "id", + "baseName": "id", + "type": "string", + "format": "" + }, + { + "name": "name", + "baseName": "name", + "type": "string", + "format": "" + } ]; + + static getAttributeTypeMap() { + return WebhookUser.attributeTypeMap; + } + + public constructor() { + } +} + diff --git a/sdks/typescript/models/all.ts b/sdks/typescript/models/all.ts new file mode 100644 index 000000000..efce2ed49 --- /dev/null +++ b/sdks/typescript/models/all.ts @@ -0,0 +1,463 @@ +export * from '../models/AIContext' +export * from '../models/APIKey' +export * from '../models/APIKeyInput' +export * from '../models/AccessToken' +export * from '../models/ActionConfig' +export * from '../models/ActionConfigInput' +export * from '../models/ActionConfigInputCreate' +export * from '../models/ActionDetails' +export * from '../models/ActionDetailsInput' +export * from '../models/ActionDetailsInputCreate' +export * from '../models/ActivateUserRequest' +export * from '../models/AgentConversation' +export * from '../models/AnswerContent' +export * from '../models/AnswerDataResponse' +export * from '../models/AnswerPngOptionsInput' +export * from '../models/AssignChangeAuthorRequest' +export * from '../models/AssignTagRequest' +export * from '../models/AssociateMetadataInput' +export * from '../models/AssociateMetadataInputCreate' +export * from '../models/AuthClusterPreferences' +export * from '../models/AuthClusterPreferencesInput' +export * from '../models/AuthOrgInfo' +export * from '../models/AuthOrgPreference' +export * from '../models/AuthOrgPreferenceInput' +export * from '../models/AuthSettingsAccessToken' +export * from '../models/Authentication' +export * from '../models/AuthenticationInput' +export * from '../models/Author' +export * from '../models/AuthorMetadataTypeInput' +export * from '../models/AuthorType' +export * from '../models/AwsS3Config' +export * from '../models/AwsS3ConfigInput' +export * from '../models/BasicAuth' +export * from '../models/BasicAuthInput' +export * from '../models/CALLBACK' +export * from '../models/CALLBACKInput' +export * from '../models/CALLBACKInputMandatory' +export * from '../models/CalendarResponse' +export * from '../models/ChangeUserPasswordRequest' +export * from '../models/ChannelHistoryEventInfo' +export * from '../models/ChannelHistoryEventInput' +export * from '../models/ChannelHistoryJob' +export * from '../models/ChannelValidationAwsS3Info' +export * from '../models/ChannelValidationDetail' +export * from '../models/ClusterNonEmbedAccess' +export * from '../models/ClusterNonEmbedAccessInput' +export * from '../models/Collection' +export * from '../models/CollectionDeleteResponse' +export * from '../models/CollectionDeleteTypeIdentifiers' +export * from '../models/CollectionEntityIdentifier' +export * from '../models/CollectionMetadataInput' +export * from '../models/CollectionMetadataItem' +export * from '../models/CollectionSearchResponse' +export * from '../models/Column' +export * from '../models/ColumnSecurityRule' +export * from '../models/ColumnSecurityRuleColumn' +export * from '../models/ColumnSecurityRuleGroup' +export * from '../models/ColumnSecurityRuleGroupOperation' +export * from '../models/ColumnSecurityRuleResponse' +export * from '../models/ColumnSecurityRuleSourceTable' +export * from '../models/ColumnSecurityRuleTableInput' +export * from '../models/ColumnSecurityRuleUpdate' +export * from '../models/CommitBranchRequest' +export * from '../models/CommitFileType' +export * from '../models/CommitHistoryResponse' +export * from '../models/CommitResponse' +export * from '../models/CommiterType' +export * from '../models/CommunicationChannelPreferencesResponse' +export * from '../models/CommunicationChannelValidateResponse' +export * from '../models/ConfigureAuthSettingsRequest' +export * from '../models/ConfigureAuthSettingsRequestClusterPreferences' +export * from '../models/ConfigureCommunicationChannelPreferencesRequest' +export * from '../models/ConfigureSecuritySettingsRequest' +export * from '../models/ConfigureSecuritySettingsRequestClusterPreferences' +export * from '../models/ConnectionConfigurationResponse' +export * from '../models/ConnectionConfigurationSearchRequest' +export * from '../models/ConnectionInput' +export * from '../models/ContextPayloadV2Input' +export * from '../models/Conversation' +export * from '../models/ConversationSettingsInput' +export * from '../models/ConvertWorksheetToModelRequest' +export * from '../models/CopyObjectRequest' +export * from '../models/CreateAgentConversationRequest' +export * from '../models/CreateAgentConversationRequestConversationSettings' +export * from '../models/CreateAgentConversationRequestMetadataContext' +export * from '../models/CreateCalendarRequest' +export * from '../models/CreateCalendarRequestTableReference' +export * from '../models/CreateCollectionRequest' +export * from '../models/CreateConfigRequest' +export * from '../models/CreateConnectionConfigurationRequest' +export * from '../models/CreateConnectionConfigurationRequestPolicyProcessOptions' +export * from '../models/CreateConnectionRequest' +export * from '../models/CreateConnectionResponse' +export * from '../models/CreateConversationRequest' +export * from '../models/CreateCustomActionRequest' +export * from '../models/CreateCustomActionRequestActionDetails' +export * from '../models/CreateCustomActionRequestDefaultActionConfig' +export * from '../models/CreateEmailCustomizationRequest' +export * from '../models/CreateEmailCustomizationRequestTemplateProperties' +export * from '../models/CreateEmailCustomizationResponse' +export * from '../models/CreateOrgRequest' +export * from '../models/CreateRoleRequest' +export * from '../models/CreateScheduleRequest' +export * from '../models/CreateScheduleRequestFrequency' +export * from '../models/CreateScheduleRequestLiveboardOptions' +export * from '../models/CreateScheduleRequestPdfOptions' +export * from '../models/CreateScheduleRequestRecipientDetails' +export * from '../models/CreateTagRequest' +export * from '../models/CreateUserGroupRequest' +export * from '../models/CreateUserRequest' +export * from '../models/CreateVariableRequest' +export * from '../models/CreateWebhookConfigurationRequest' +export * from '../models/CreateWebhookConfigurationRequestAuthentication' +export * from '../models/CreateWebhookConfigurationRequestSignatureVerification' +export * from '../models/CreateWebhookConfigurationRequestStorageDestination' +export * from '../models/CronExpression' +export * from '../models/CronExpressionInput' +export * from '../models/CspSettings' +export * from '../models/CspSettingsInput' +export * from '../models/CustomActionMetadataTypeInput' +export * from '../models/DataSource' +export * from '../models/DataSourceContextInput' +export * from '../models/DataWarehouseObjectInput' +export * from '../models/DataWarehouseObjects' +export * from '../models/Database' +export * from '../models/DbtSearchResponse' +export * from '../models/DeactivateUserRequest' +export * from '../models/DefaultActionConfig' +export * from '../models/DefaultActionConfigInput' +export * from '../models/DefaultActionConfigInputCreate' +export * from '../models/DefaultActionConfigSearchInput' +export * from '../models/DeleteCollectionRequest' +export * from '../models/DeleteConfigRequest' +export * from '../models/DeleteConnectionConfigurationRequest' +export * from '../models/DeleteConnectionRequest' +export * from '../models/DeleteMetadataRequest' +export * from '../models/DeleteMetadataTypeInput' +export * from '../models/DeleteOrgEmailCustomizationRequest' +export * from '../models/DeleteVariablesRequest' +export * from '../models/DeleteWebhookConfigurationsRequest' +export * from '../models/DeployCommitRequest' +export * from '../models/DeployResponse' +export * from '../models/EntityHeader' +export * from '../models/ErrorResponse' +export * from '../models/EurekaDataSourceSuggestionResponse' +export * from '../models/EurekaDecomposeQueryResponse' +export * from '../models/EurekaGetNLInstructionsResponse' +export * from '../models/EurekaGetRelevantQuestionsResponse' +export * from '../models/EurekaLLMDecomposeQueryResponse' +export * from '../models/EurekaLLMSuggestedQuery' +export * from '../models/EurekaRelevantQuestion' +export * from '../models/EurekaSetNLInstructionsResponse' +export * from '../models/EventChannelConfig' +export * from '../models/EventChannelConfigInput' +export * from '../models/ExcludeMetadataListItemInput' +export * from '../models/ExportAnswerReportRequest' +export * from '../models/ExportAnswerReportRequestPngOptions' +export * from '../models/ExportAnswerReportRequestRegionalSettings' +export * from '../models/ExportLiveboardReportRequest' +export * from '../models/ExportLiveboardReportRequestPdfOptions' +export * from '../models/ExportLiveboardReportRequestPngOptions' +export * from '../models/ExportMetadataTMLBatchedRequest' +export * from '../models/ExportMetadataTMLRequest' +export * from '../models/ExportMetadataTMLRequestExportOptions' +export * from '../models/ExportMetadataTypeInput' +export * from '../models/ExportOptions' +export * from '../models/ExternalTableInput' +export * from '../models/FavoriteMetadataInput' +export * from '../models/FavoriteMetadataItem' +export * from '../models/FavoriteObjectOptionsInput' +export * from '../models/FetchAnswerDataRequest' +export * from '../models/FetchAnswerSqlQueryRequest' +export * from '../models/FetchAsyncImportTaskStatusRequest' +export * from '../models/FetchColumnSecurityRulesRequest' +export * from '../models/FetchConnectionDiffStatusResponse' +export * from '../models/FetchLiveboardDataRequest' +export * from '../models/FetchLiveboardSqlQueryRequest' +export * from '../models/FetchLogsRequest' +export * from '../models/FetchObjectPrivilegesRequest' +export * from '../models/FetchPermissionsOfPrincipalsRequest' +export * from '../models/FetchPermissionsOnMetadataRequest' +export * from '../models/FilterRules' +export * from '../models/ForceLogoutUsersRequest' +export * from '../models/Frequency' +export * from '../models/FrequencyInput' +export * from '../models/GenerateCSVRequest' +export * from '../models/GenericInfo' +export * from '../models/GetAsyncImportStatusResponse' +export * from '../models/GetCustomAccessTokenRequest' +export * from '../models/GetDataSourceSuggestionsRequest' +export * from '../models/GetFullAccessTokenRequest' +export * from '../models/GetFullAccessTokenRequestUserParameters' +export * from '../models/GetNLInstructionsRequest' +export * from '../models/GetObjectAccessTokenRequest' +export * from '../models/GetRelevantQuestionsRequest' +export * from '../models/GetRelevantQuestionsRequestAiContext' +export * from '../models/GetRelevantQuestionsRequestMetadataContext' +export * from '../models/GetTokenResponse' +export * from '../models/GroupInfo' +export * from '../models/GroupObject' +export * from '../models/GroupsImportListInput' +export * from '../models/HeaderAttributeInput' +export * from '../models/HeaderUpdateInput' +export * from '../models/ImportEPackAsyncTaskStatus' +export * from '../models/ImportMetadataTMLAsyncRequest' +export * from '../models/ImportMetadataTMLRequest' +export * from '../models/ImportUser' +export * from '../models/ImportUserGroupsRequest' +export * from '../models/ImportUserGroupsResponse' +export * from '../models/ImportUserType' +export * from '../models/ImportUsersRequest' +export * from '../models/ImportUsersResponse' +export * from '../models/InputEurekaNLSRequest' +export * from '../models/JWTMetadataObject' +export * from '../models/JWTParameter' +export * from '../models/JWTUserOptions' +export * from '../models/JWTUserOptionsFull' +export * from '../models/JobRecipient' +export * from '../models/LiveboardContent' +export * from '../models/LiveboardDataResponse' +export * from '../models/LiveboardOptions' +export * from '../models/LiveboardOptionsInput' +export * from '../models/LogResponse' +export * from '../models/LoginRequest' +export * from '../models/ManageObjectPrivilegeRequest' +export * from '../models/MetadataAssociationItem' +export * from '../models/MetadataContext' +export * from '../models/MetadataInput' +export * from '../models/MetadataListItemInput' +export * from '../models/MetadataObject' +export * from '../models/MetadataResponse' +export * from '../models/MetadataSearchResponse' +export * from '../models/MetadataSearchSortOptions' +export * from '../models/ModelTableList' +export * from '../models/NLInstructionsInfo' +export * from '../models/NLInstructionsInfoInput' +export * from '../models/ObjectIDAndName' +export * from '../models/ObjectPrivilegesMetadataInput' +export * from '../models/ObjectPrivilegesOfMetadataResponse' +export * from '../models/Org' +export * from '../models/OrgChannelConfigInput' +export * from '../models/OrgChannelConfigResponse' +export * from '../models/OrgDetails' +export * from '../models/OrgInfo' +export * from '../models/OrgNonEmbedAccess' +export * from '../models/OrgNonEmbedAccessInput' +export * from '../models/OrgPreferenceSearchCriteriaInput' +export * from '../models/OrgResponse' +export * from '../models/OrgType' +export * from '../models/ParameterValues' +export * from '../models/ParameterizeMetadataFieldsRequest' +export * from '../models/ParameterizeMetadataRequest' +export * from '../models/ParametersListItem' +export * from '../models/ParametersListItemInput' +export * from '../models/PdfOptions' +export * from '../models/PdfOptionsInput' +export * from '../models/PermissionInput' +export * from '../models/PermissionOfMetadataResponse' +export * from '../models/PermissionOfPrincipalsResponse' +export * from '../models/PermissionsMetadataTypeInput' +export * from '../models/PngOptionsInput' +export * from '../models/PolicyProcessOptions' +export * from '../models/PolicyProcessOptionsInput' +export * from '../models/PrincipalsInput' +export * from '../models/PrincipalsListItem' +export * from '../models/PrincipalsListItemInput' +export * from '../models/PublishMetadataListItem' +export * from '../models/PublishMetadataRequest' +export * from '../models/PutVariableValuesRequest' +export * from '../models/QueryGetDecomposedQueryRequest' +export * from '../models/QueryGetDecomposedQueryRequestNlsRequest' +export * from '../models/RecipientDetails' +export * from '../models/RecipientDetailsInput' +export * from '../models/RegionalSettingsInput' +export * from '../models/RepoConfigObject' +export * from '../models/ResetUserPasswordRequest' +export * from '../models/ResponseActivationURL' +export * from '../models/ResponseCopyObject' +export * from '../models/ResponseCustomAction' +export * from '../models/ResponseFailedEntities' +export * from '../models/ResponseFailedEntity' +export * from '../models/ResponseIncompleteEntities' +export * from '../models/ResponseIncompleteEntity' +export * from '../models/ResponseMessage' +export * from '../models/ResponsePostUpgradeFailedEntities' +export * from '../models/ResponsePostUpgradeFailedEntity' +export * from '../models/ResponseSchedule' +export * from '../models/ResponseScheduleRun' +export * from '../models/ResponseSuccessfulEntities' +export * from '../models/ResponseSuccessfulEntity' +export * from '../models/ResponseWorksheetToModelConversion' +export * from '../models/RevertCommitRequest' +export * from '../models/RevertResponse' +export * from '../models/RevertedMetadata' +export * from '../models/RevokeRefreshTokensRequest' +export * from '../models/RevokeRefreshTokensResponse' +export * from '../models/RevokeTokenRequest' +export * from '../models/RiseGQLArgWrapper' +export * from '../models/RiseSetter' +export * from '../models/Role' +export * from '../models/RoleResponse' +export * from '../models/RuntimeFilter' +export * from '../models/RuntimeFilters' +export * from '../models/RuntimeParamOverride' +export * from '../models/RuntimeParameters' +export * from '../models/RuntimeSort' +export * from '../models/RuntimeSorts' +export * from '../models/ScheduleHistoryRunsOptionsInput' +export * from '../models/SchedulesPdfOptionsInput' +export * from '../models/SchemaObject' +export * from '../models/Scope' +export * from '../models/ScriptSrcUrls' +export * from '../models/ScriptSrcUrlsInput' +export * from '../models/SearchAuthSettingsRequest' +export * from '../models/SearchAuthSettingsResponse' +export * from '../models/SearchCalendarsRequest' +export * from '../models/SearchCalendarsRequestSortOptions' +export * from '../models/SearchChannelHistoryRequest' +export * from '../models/SearchChannelHistoryResponse' +export * from '../models/SearchCollectionsRequest' +export * from '../models/SearchCollectionsRequestSortOptions' +export * from '../models/SearchCommitsRequest' +export * from '../models/SearchCommunicationChannelPreferencesRequest' +export * from '../models/SearchConfigRequest' +export * from '../models/SearchConnectionRequest' +export * from '../models/SearchConnectionRequestSortOptions' +export * from '../models/SearchConnectionResponse' +export * from '../models/SearchCustomActionsRequest' +export * from '../models/SearchCustomActionsRequestDefaultActionConfig' +export * from '../models/SearchDataRequest' +export * from '../models/SearchDataResponse' +export * from '../models/SearchEmailCustomizationRequest' +export * from '../models/SearchMetadataRequest' +export * from '../models/SearchMetadataRequestFavoriteObjectOptions' +export * from '../models/SearchMetadataRequestSortOptions' +export * from '../models/SearchOrgsRequest' +export * from '../models/SearchRoleResponse' +export * from '../models/SearchRolesRequest' +export * from '../models/SearchSchedulesRequest' +export * from '../models/SearchSchedulesRequestHistoryRunsOptions' +export * from '../models/SearchSchedulesRequestSortOptions' +export * from '../models/SearchSecuritySettingsRequest' +export * from '../models/SearchTagsRequest' +export * from '../models/SearchUserGroupsRequest' +export * from '../models/SearchUserGroupsRequestSortOptions' +export * from '../models/SearchUsersRequest' +export * from '../models/SearchVariablesRequest' +export * from '../models/SearchWebhookConfigurationsRequest' +export * from '../models/SearchWebhookConfigurationsRequestSortOptions' +export * from '../models/SecuritySettingsClusterPreferences' +export * from '../models/SecuritySettingsClusterPreferencesInput' +export * from '../models/SecuritySettingsOrgDetails' +export * from '../models/SecuritySettingsOrgPreferences' +export * from '../models/SecuritySettingsOrgPreferencesInput' +export * from '../models/SecuritySettingsResponse' +export * from '../models/SendAgentConversationMessageRequest' +export * from '../models/SendAgentConversationMessageStreamingRequest' +export * from '../models/SendAgentMessageRequest' +export * from '../models/SendAgentMessageResponse' +export * from '../models/SendAgentMessageStreamingRequest' +export * from '../models/SendMessageRequest' +export * from '../models/SetNLInstructionsRequest' +export * from '../models/ShareMetadataRequest' +export * from '../models/ShareMetadataTypeInput' +export * from '../models/SharePermissionsInput' +export * from '../models/SingleAnswerRequest' +export * from '../models/SortOption' +export * from '../models/SortOptionInput' +export * from '../models/SortOptions' +export * from '../models/SortingOptions' +export * from '../models/SqlQuery' +export * from '../models/SqlQueryResponse' +export * from '../models/StorageConfig' +export * from '../models/StorageConfigInput' +export * from '../models/StorageDestination' +export * from '../models/StorageDestinationInput' +export * from '../models/SyncMetadataRequest' +export * from '../models/SyncMetadataResponse' +export * from '../models/SystemConfig' +export * from '../models/SystemInfo' +export * from '../models/SystemOverrideInfo' +export * from '../models/Table' +export * from '../models/Tag' +export * from '../models/TagMetadataTypeInput' +export * from '../models/TemplatePropertiesInputCreate' +export * from '../models/Token' +export * from '../models/TokenAccessScopeObject' +export * from '../models/TokenValidationResponse' +export * from '../models/URL' +export * from '../models/URLInput' +export * from '../models/URLInputMandatory' +export * from '../models/UnassignTagRequest' +export * from '../models/UnparameterizeMetadataRequest' +export * from '../models/UnpublishMetadataRequest' +export * from '../models/UpdateCalendarRequest' +export * from '../models/UpdateCalendarRequestTableReference' +export * from '../models/UpdateCollectionRequest' +export * from '../models/UpdateColumnSecurityRulesRequest' +export * from '../models/UpdateConfigRequest' +export * from '../models/UpdateConnectionConfigurationRequest' +export * from '../models/UpdateConnectionRequest' +export * from '../models/UpdateConnectionStatusRequest' +export * from '../models/UpdateConnectionV2Request' +export * from '../models/UpdateCustomActionRequest' +export * from '../models/UpdateCustomActionRequestActionDetails' +export * from '../models/UpdateCustomActionRequestDefaultActionConfig' +export * from '../models/UpdateEmailCustomizationRequest' +export * from '../models/UpdateMetadataHeaderRequest' +export * from '../models/UpdateMetadataObjIdRequest' +export * from '../models/UpdateObjIdInput' +export * from '../models/UpdateOrgRequest' +export * from '../models/UpdateRoleRequest' +export * from '../models/UpdateScheduleRequest' +export * from '../models/UpdateScheduleRequestFrequency' +export * from '../models/UpdateScheduleRequestLiveboardOptions' +export * from '../models/UpdateScheduleRequestPdfOptions' +export * from '../models/UpdateScheduleRequestRecipientDetails' +export * from '../models/UpdateSystemConfigRequest' +export * from '../models/UpdateTagRequest' +export * from '../models/UpdateUserGroupRequest' +export * from '../models/UpdateUserRequest' +export * from '../models/UpdateVariableRequest' +export * from '../models/UpdateVariableValuesRequest' +export * from '../models/UpdateWebhookConfigurationRequest' +export * from '../models/User' +export * from '../models/UserGroup' +export * from '../models/UserGroupResponse' +export * from '../models/UserInfo' +export * from '../models/UserObject' +export * from '../models/UserParameterOptions' +export * from '../models/UserPrincipal' +export * from '../models/ValidateCommunicationChannelRequest' +export * from '../models/ValidateMergeRequest' +export * from '../models/ValidateTokenRequest' +export * from '../models/ValueScopeInput' +export * from '../models/Variable' +export * from '../models/VariableDetailInput' +export * from '../models/VariableOrgInfo' +export * from '../models/VariablePutAssignmentInput' +export * from '../models/VariableUpdateAssignmentInput' +export * from '../models/VariableUpdateScopeInput' +export * from '../models/VariableValue' +export * from '../models/VariableValues' +export * from '../models/WebhookAuthApiKey' +export * from '../models/WebhookAuthApiKeyInput' +export * from '../models/WebhookAuthBasicAuth' +export * from '../models/WebhookAuthBasicAuthInput' +export * from '../models/WebhookAuthOAuth2' +export * from '../models/WebhookAuthOAuth2Input' +export * from '../models/WebhookAuthentication' +export * from '../models/WebhookAuthenticationInput' +export * from '../models/WebhookDeleteFailure' +export * from '../models/WebhookDeleteResponse' +export * from '../models/WebhookKeyValuePair' +export * from '../models/WebhookKeyValuePairInput' +export * from '../models/WebhookOrg' +export * from '../models/WebhookPagination' +export * from '../models/WebhookResponse' +export * from '../models/WebhookSearchResponse' +export * from '../models/WebhookSignatureVerification' +export * from '../models/WebhookSignatureVerificationInput' +export * from '../models/WebhookSortOptionsInput' +export * from '../models/WebhookUser' diff --git a/sdks/typescript/package-lock.json b/sdks/typescript/package-lock.json new file mode 100644 index 000000000..2579483c3 --- /dev/null +++ b/sdks/typescript/package-lock.json @@ -0,0 +1,3486 @@ +{ + "name": "@thoughtspot/rest-api-sdk", + "version": "2.25.0", + "lockfileVersion": 3, + "requires": true, + "packages": { + "": { + "name": "@thoughtspot/rest-api-sdk", + "version": "2.25.0", + "license": "ThoughtSpot Development Tools End User License Agreement", + "dependencies": { + "es6-promise": "^4.2.4", + "url-parse": "^1.4.3", + "whatwg-fetch": "^3.0.0" + }, + "devDependencies": { + "@swc/core": "^1.3.88", + "@types/chai": "^4.3.5", + "@types/chai-as-promised": "^7.1.5", + "@types/expect": "^24.3.0", + "@types/mocha": "^10.0.1", + "@types/url-parse": "1.4.4", + "chai": "^4.3.7", + "chai-as-promised": "^7.1.1", + "mocha": "^10.2.0", + "ts-mocha": "^10.0.0", + "tsup": "^7.2.0", + "typescript": "^4.0" + } + }, + "node_modules/@babel/code-frame": { + "version": "7.29.7", + "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.29.7.tgz", + "integrity": "sha512-Aup7aUOfpbAUg2ROOJN6Iw5f9DMBlzu0mIkm/malLQFN/YQgO48wCj0Kxa3sEHJvPVFg7siR+qRInwXd2qhQKw==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/helper-validator-identifier": "^7.29.7", + "js-tokens": "^4.0.0", + "picocolors": "^1.1.1" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/helper-validator-identifier": { + "version": "7.29.7", + "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.29.7.tgz", + "integrity": "sha512-qehxGkRj55h/ff8EMaJ+cYhyaKlHIxqYDn682wQD7RNp9UujOQsHog2uS0r2vzr4pW+sXf90NeeayjcNaX3fFg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@cspotcode/source-map-support": { + "version": "0.8.1", + "resolved": "https://registry.npmjs.org/@cspotcode/source-map-support/-/source-map-support-0.8.1.tgz", + "integrity": "sha512-IchNf6dN4tHoMFIn/7OE8LWZ19Y6q/67Bmf6vnGREv8RSbBVb9LPJxEcnwrcwX6ixSvaiGoomAUvu4YSxXrVgw==", + "dev": true, + "license": "MIT", + "optional": true, + "peer": true, + "dependencies": { + "@jridgewell/trace-mapping": "0.3.9" + }, + "engines": { + "node": ">=12" + } + }, + "node_modules/@cspotcode/source-map-support/node_modules/@jridgewell/trace-mapping": { + "version": "0.3.9", + "resolved": "https://registry.npmjs.org/@jridgewell/trace-mapping/-/trace-mapping-0.3.9.tgz", + "integrity": "sha512-3Belt6tdc8bPgAtbcmdtNJlirVoTmEb5e2gC94PnkwEW9jI6CAHUeoG85tjWP5WquqfavoMtMwiG4P926ZKKuQ==", + "dev": true, + "license": "MIT", + "optional": true, + "peer": true, + "dependencies": { + "@jridgewell/resolve-uri": "^3.0.3", + "@jridgewell/sourcemap-codec": "^1.4.10" + } + }, + "node_modules/@esbuild/android-arm": { + "version": "0.18.20", + "resolved": "https://registry.npmjs.org/@esbuild/android-arm/-/android-arm-0.18.20.tgz", + "integrity": "sha512-fyi7TDI/ijKKNZTUJAQqiG5T7YjJXgnzkURqmGj13C6dCqckZBLdl4h7bkhHt/t0WP+zO9/zwroDvANaOqO5Sw==", + "cpu": [ + "arm" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "android" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/android-arm64": { + "version": "0.18.20", + "resolved": "https://registry.npmjs.org/@esbuild/android-arm64/-/android-arm64-0.18.20.tgz", + "integrity": "sha512-Nz4rJcchGDtENV0eMKUNa6L12zz2zBDXuhj/Vjh18zGqB44Bi7MBMSXjgunJgjRhCmKOjnPuZp4Mb6OKqtMHLQ==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "android" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/android-x64": { + "version": "0.18.20", + "resolved": "https://registry.npmjs.org/@esbuild/android-x64/-/android-x64-0.18.20.tgz", + "integrity": "sha512-8GDdlePJA8D6zlZYJV/jnrRAi6rOiNaCC/JclcXpB+KIuvfBN4owLtgzY2bsxnx666XjJx2kDPUmnTtR8qKQUg==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "android" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/darwin-arm64": { + "version": "0.18.20", + "resolved": "https://registry.npmjs.org/@esbuild/darwin-arm64/-/darwin-arm64-0.18.20.tgz", + "integrity": "sha512-bxRHW5kHU38zS2lPTPOyuyTm+S+eobPUnTNkdJEfAddYgEcll4xkT8DB9d2008DtTbl7uJag2HuE5NZAZgnNEA==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/darwin-x64": { + "version": "0.18.20", + "resolved": "https://registry.npmjs.org/@esbuild/darwin-x64/-/darwin-x64-0.18.20.tgz", + "integrity": "sha512-pc5gxlMDxzm513qPGbCbDukOdsGtKhfxD1zJKXjCCcU7ju50O7MeAZ8c4krSJcOIJGFR+qx21yMMVYwiQvyTyQ==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/freebsd-arm64": { + "version": "0.18.20", + "resolved": "https://registry.npmjs.org/@esbuild/freebsd-arm64/-/freebsd-arm64-0.18.20.tgz", + "integrity": "sha512-yqDQHy4QHevpMAaxhhIwYPMv1NECwOvIpGCZkECn8w2WFHXjEwrBn3CeNIYsibZ/iZEUemj++M26W3cNR5h+Tw==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "freebsd" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/freebsd-x64": { + "version": "0.18.20", + "resolved": "https://registry.npmjs.org/@esbuild/freebsd-x64/-/freebsd-x64-0.18.20.tgz", + "integrity": "sha512-tgWRPPuQsd3RmBZwarGVHZQvtzfEBOreNuxEMKFcd5DaDn2PbBxfwLcj4+aenoh7ctXcbXmOQIn8HI6mCSw5MQ==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "freebsd" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/linux-arm": { + "version": "0.18.20", + "resolved": "https://registry.npmjs.org/@esbuild/linux-arm/-/linux-arm-0.18.20.tgz", + "integrity": "sha512-/5bHkMWnq1EgKr1V+Ybz3s1hWXok7mDFUMQ4cG10AfW3wL02PSZi5kFpYKrptDsgb2WAJIvRcDm+qIvXf/apvg==", + "cpu": [ + "arm" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/linux-arm64": { + "version": "0.18.20", + "resolved": "https://registry.npmjs.org/@esbuild/linux-arm64/-/linux-arm64-0.18.20.tgz", + "integrity": "sha512-2YbscF+UL7SQAVIpnWvYwM+3LskyDmPhe31pE7/aoTMFKKzIc9lLbyGUpmmb8a8AixOL61sQ/mFh3jEjHYFvdA==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/linux-ia32": { + "version": "0.18.20", + "resolved": "https://registry.npmjs.org/@esbuild/linux-ia32/-/linux-ia32-0.18.20.tgz", + "integrity": "sha512-P4etWwq6IsReT0E1KHU40bOnzMHoH73aXp96Fs8TIT6z9Hu8G6+0SHSw9i2isWrD2nbx2qo5yUqACgdfVGx7TA==", + "cpu": [ + "ia32" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/linux-loong64": { + "version": "0.18.20", + "resolved": "https://registry.npmjs.org/@esbuild/linux-loong64/-/linux-loong64-0.18.20.tgz", + "integrity": "sha512-nXW8nqBTrOpDLPgPY9uV+/1DjxoQ7DoB2N8eocyq8I9XuqJ7BiAMDMf9n1xZM9TgW0J8zrquIb/A7s3BJv7rjg==", + "cpu": [ + "loong64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/linux-mips64el": { + "version": "0.18.20", + "resolved": "https://registry.npmjs.org/@esbuild/linux-mips64el/-/linux-mips64el-0.18.20.tgz", + "integrity": "sha512-d5NeaXZcHp8PzYy5VnXV3VSd2D328Zb+9dEq5HE6bw6+N86JVPExrA6O68OPwobntbNJ0pzCpUFZTo3w0GyetQ==", + "cpu": [ + "mips64el" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/linux-ppc64": { + "version": "0.18.20", + "resolved": "https://registry.npmjs.org/@esbuild/linux-ppc64/-/linux-ppc64-0.18.20.tgz", + "integrity": "sha512-WHPyeScRNcmANnLQkq6AfyXRFr5D6N2sKgkFo2FqguP44Nw2eyDlbTdZwd9GYk98DZG9QItIiTlFLHJHjxP3FA==", + "cpu": [ + "ppc64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/linux-riscv64": { + "version": "0.18.20", + "resolved": "https://registry.npmjs.org/@esbuild/linux-riscv64/-/linux-riscv64-0.18.20.tgz", + "integrity": "sha512-WSxo6h5ecI5XH34KC7w5veNnKkju3zBRLEQNY7mv5mtBmrP/MjNBCAlsM2u5hDBlS3NGcTQpoBvRzqBcRtpq1A==", + "cpu": [ + "riscv64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/linux-s390x": { + "version": "0.18.20", + "resolved": "https://registry.npmjs.org/@esbuild/linux-s390x/-/linux-s390x-0.18.20.tgz", + "integrity": "sha512-+8231GMs3mAEth6Ja1iK0a1sQ3ohfcpzpRLH8uuc5/KVDFneH6jtAJLFGafpzpMRO6DzJ6AvXKze9LfFMrIHVQ==", + "cpu": [ + "s390x" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/linux-x64": { + "version": "0.18.20", + "resolved": "https://registry.npmjs.org/@esbuild/linux-x64/-/linux-x64-0.18.20.tgz", + "integrity": "sha512-UYqiqemphJcNsFEskc73jQ7B9jgwjWrSayxawS6UVFZGWrAAtkzjxSqnoclCXxWtfwLdzU+vTpcNYhpn43uP1w==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/netbsd-x64": { + "version": "0.18.20", + "resolved": "https://registry.npmjs.org/@esbuild/netbsd-x64/-/netbsd-x64-0.18.20.tgz", + "integrity": "sha512-iO1c++VP6xUBUmltHZoMtCUdPlnPGdBom6IrO4gyKPFFVBKioIImVooR5I83nTew5UOYrk3gIJhbZh8X44y06A==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "netbsd" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/openbsd-x64": { + "version": "0.18.20", + "resolved": "https://registry.npmjs.org/@esbuild/openbsd-x64/-/openbsd-x64-0.18.20.tgz", + "integrity": "sha512-e5e4YSsuQfX4cxcygw/UCPIEP6wbIL+se3sxPdCiMbFLBWu0eiZOJ7WoD+ptCLrmjZBK1Wk7I6D/I3NglUGOxg==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "openbsd" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/sunos-x64": { + "version": "0.18.20", + "resolved": "https://registry.npmjs.org/@esbuild/sunos-x64/-/sunos-x64-0.18.20.tgz", + "integrity": "sha512-kDbFRFp0YpTQVVrqUd5FTYmWo45zGaXe0X8E1G/LKFC0v8x0vWrhOWSLITcCn63lmZIxfOMXtCfti/RxN/0wnQ==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "sunos" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/win32-arm64": { + "version": "0.18.20", + "resolved": "https://registry.npmjs.org/@esbuild/win32-arm64/-/win32-arm64-0.18.20.tgz", + "integrity": "sha512-ddYFR6ItYgoaq4v4JmQQaAI5s7npztfV4Ag6NrhiaW0RrnOXqBkgwZLofVTlq1daVTQNhtI5oieTvkRPfZrePg==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/win32-ia32": { + "version": "0.18.20", + "resolved": "https://registry.npmjs.org/@esbuild/win32-ia32/-/win32-ia32-0.18.20.tgz", + "integrity": "sha512-Wv7QBi3ID/rROT08SABTS7eV4hX26sVduqDOTe1MvGMjNd3EjOz4b7zeexIR62GTIEKrfJXKL9LFxTYgkyeu7g==", + "cpu": [ + "ia32" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/win32-x64": { + "version": "0.18.20", + "resolved": "https://registry.npmjs.org/@esbuild/win32-x64/-/win32-x64-0.18.20.tgz", + "integrity": "sha512-kTdfRcSiDfQca/y9QIkng02avJ+NCaQvrMejlsB3RRv5sE9rRoeBPISaZpKxHELzRxZyLvNts1P27W3wV+8geQ==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@jest/diff-sequences": { + "version": "30.4.0", + "resolved": "https://registry.npmjs.org/@jest/diff-sequences/-/diff-sequences-30.4.0.tgz", + "integrity": "sha512-zOpzlfUs45l6u7jm39qr87JCHUDsaeCtvL+kQe/Vn9jSnRB4/5IPXISm0h9I1vZW/o00Kn4UTJ2MOlhnUGwv3g==", + "dev": true, + "license": "MIT", + "engines": { + "node": "^18.14.0 || ^20.0.0 || ^22.0.0 || >=24.0.0" + } + }, + "node_modules/@jest/expect-utils": { + "version": "30.4.1", + "resolved": "https://registry.npmjs.org/@jest/expect-utils/-/expect-utils-30.4.1.tgz", + "integrity": "sha512-ZBn5CglH8fBsQsvs4VWNzD4aWfUYks+IdOOQU3MEK71ol/BcVm+P+rtb1KpiFBpSWSCE27uOahyyf1vfqOVbcQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "@jest/get-type": "30.1.0" + }, + "engines": { + "node": "^18.14.0 || ^20.0.0 || ^22.0.0 || >=24.0.0" + } + }, + "node_modules/@jest/get-type": { + "version": "30.1.0", + "resolved": "https://registry.npmjs.org/@jest/get-type/-/get-type-30.1.0.tgz", + "integrity": "sha512-eMbZE2hUnx1WV0pmURZY9XoXPkUYjpc55mb0CrhtdWLtzMQPFvu/rZkTLZFTsdaVQa+Tr4eWAteqcUzoawq/uA==", + "dev": true, + "license": "MIT", + "engines": { + "node": "^18.14.0 || ^20.0.0 || ^22.0.0 || >=24.0.0" + } + }, + "node_modules/@jest/pattern": { + "version": "30.4.0", + "resolved": "https://registry.npmjs.org/@jest/pattern/-/pattern-30.4.0.tgz", + "integrity": "sha512-RAWn3+f9u8BsHijKJ71uHcFp6vmyEt6VvoWXkl6hKF3qVIuWNmudVjg12DlBPGup/frIl5UcUlH5HfEuvHpEXg==", + "dev": true, + "license": "MIT", + "dependencies": { + "@types/node": "*", + "jest-regex-util": "30.4.0" + }, + "engines": { + "node": "^18.14.0 || ^20.0.0 || ^22.0.0 || >=24.0.0" + } + }, + "node_modules/@jest/schemas": { + "version": "30.4.1", + "resolved": "https://registry.npmjs.org/@jest/schemas/-/schemas-30.4.1.tgz", + "integrity": "sha512-i6b4qw5qnP8c5FEeBJg/uZQ4ddrkN6Ca8qISJh0pr7a5hfn3h3v5x60BEbOC7OYAGZNMs1LfFLwnW2CuK8F57Q==", + "dev": true, + "license": "MIT", + "dependencies": { + "@sinclair/typebox": "^0.34.0" + }, + "engines": { + "node": "^18.14.0 || ^20.0.0 || ^22.0.0 || >=24.0.0" + } + }, + "node_modules/@jest/types": { + "version": "30.4.1", + "resolved": "https://registry.npmjs.org/@jest/types/-/types-30.4.1.tgz", + "integrity": "sha512-f1x/vJXIfjOlEmejYpbkbgw1gOqpPECwMvMEtBqe47j7H2Hg8h8w3o3ikhSXq3MI15kg+oQ0exWO0uCtTNJLoQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "@jest/pattern": "30.4.0", + "@jest/schemas": "30.4.1", + "@types/istanbul-lib-coverage": "^2.0.6", + "@types/istanbul-reports": "^3.0.4", + "@types/node": "*", + "@types/yargs": "^17.0.33", + "chalk": "^4.1.2" + }, + "engines": { + "node": "^18.14.0 || ^20.0.0 || ^22.0.0 || >=24.0.0" + } + }, + "node_modules/@jridgewell/gen-mapping": { + "version": "0.3.13", + "resolved": "https://registry.npmjs.org/@jridgewell/gen-mapping/-/gen-mapping-0.3.13.tgz", + "integrity": "sha512-2kkt/7niJ6MgEPxF0bYdQ6etZaA+fQvDcLKckhy1yIQOzaoKjBBjSj63/aLVjYE3qhRt5dvM+uUyfCg6UKCBbA==", + "dev": true, + "license": "MIT", + "dependencies": { + "@jridgewell/sourcemap-codec": "^1.5.0", + "@jridgewell/trace-mapping": "^0.3.24" + } + }, + "node_modules/@jridgewell/resolve-uri": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/@jridgewell/resolve-uri/-/resolve-uri-3.1.2.tgz", + "integrity": "sha512-bRISgCIjP20/tbWSPWMEi54QVPRZExkuD9lJL+UIxUKtwVJA8wW1Trb1jMs1RFXo1CBTNZ/5hpC9QvmKWdopKw==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6.0.0" + } + }, + "node_modules/@jridgewell/sourcemap-codec": { + "version": "1.5.5", + "resolved": "https://registry.npmjs.org/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.5.5.tgz", + "integrity": "sha512-cYQ9310grqxueWbl+WuIUIaiUaDcj7WOq5fVhEljNVgRfOUhY9fy2zTvfoqWsnebh8Sl70VScFbICvJnLKB0Og==", + "dev": true, + "license": "MIT" + }, + "node_modules/@jridgewell/trace-mapping": { + "version": "0.3.31", + "resolved": "https://registry.npmjs.org/@jridgewell/trace-mapping/-/trace-mapping-0.3.31.tgz", + "integrity": "sha512-zzNR+SdQSDJzc8joaeP8QQoCQr8NuYx2dIIytl1QeBEZHJ9uW6hebsrYgbz8hJwUQao3TWCMtmfV8Nu1twOLAw==", + "dev": true, + "license": "MIT", + "dependencies": { + "@jridgewell/resolve-uri": "^3.1.0", + "@jridgewell/sourcemap-codec": "^1.4.14" + } + }, + "node_modules/@nodelib/fs.scandir": { + "version": "2.1.5", + "resolved": "https://registry.npmjs.org/@nodelib/fs.scandir/-/fs.scandir-2.1.5.tgz", + "integrity": "sha512-vq24Bq3ym5HEQm2NKCr3yXDwjc7vTsEThRDnkp2DK9p1uqLR+DHurm/NOTo0KG7HYHU7eppKZj3MyqYuMBf62g==", + "dev": true, + "license": "MIT", + "dependencies": { + "@nodelib/fs.stat": "2.0.5", + "run-parallel": "^1.1.9" + }, + "engines": { + "node": ">= 8" + } + }, + "node_modules/@nodelib/fs.stat": { + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/@nodelib/fs.stat/-/fs.stat-2.0.5.tgz", + "integrity": "sha512-RkhPPp2zrqDAQA/2jNhnztcPAlv64XdhIp7a7454A5ovI7Bukxgt7MX7udwAu3zg1DcpPU0rz3VV1SeaqvY4+A==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 8" + } + }, + "node_modules/@nodelib/fs.walk": { + "version": "1.2.8", + "resolved": "https://registry.npmjs.org/@nodelib/fs.walk/-/fs.walk-1.2.8.tgz", + "integrity": "sha512-oGB+UxlgWcgQkgwo8GcEGwemoTFt3FIO9ababBmaGwXIoBKZ+GTy0pP185beGg7Llih/NSHSV2XAs1lnznocSg==", + "dev": true, + "license": "MIT", + "dependencies": { + "@nodelib/fs.scandir": "2.1.5", + "fastq": "^1.6.0" + }, + "engines": { + "node": ">= 8" + } + }, + "node_modules/@sinclair/typebox": { + "version": "0.34.49", + "resolved": "https://registry.npmjs.org/@sinclair/typebox/-/typebox-0.34.49.tgz", + "integrity": "sha512-brySQQs7Jtn0joV8Xh9ZV/hZb9Ozb0pmazDIASBkYKCjXrXU3mpcFahmK/z4YDhGkQvP9mWJbVyahdtU5wQA+A==", + "dev": true, + "license": "MIT" + }, + "node_modules/@swc/core": { + "version": "1.15.40", + "resolved": "https://registry.npmjs.org/@swc/core/-/core-1.15.40.tgz", + "integrity": "sha512-2kwzJikRvgtNAG7MwVZY2vEzZjTxKIq5jXOihuSV/8U+Hej8Va22t65aKnJZs3P+NwojZvR8Mf8kyM7O+V8sQg==", + "dev": true, + "hasInstallScript": true, + "license": "Apache-2.0", + "dependencies": { + "@swc/counter": "^0.1.3", + "@swc/types": "^0.1.26" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/swc" + }, + "optionalDependencies": { + "@swc/core-darwin-arm64": "1.15.40", + "@swc/core-darwin-x64": "1.15.40", + "@swc/core-linux-arm-gnueabihf": "1.15.40", + "@swc/core-linux-arm64-gnu": "1.15.40", + "@swc/core-linux-arm64-musl": "1.15.40", + "@swc/core-linux-ppc64-gnu": "1.15.40", + "@swc/core-linux-s390x-gnu": "1.15.40", + "@swc/core-linux-x64-gnu": "1.15.40", + "@swc/core-linux-x64-musl": "1.15.40", + "@swc/core-win32-arm64-msvc": "1.15.40", + "@swc/core-win32-ia32-msvc": "1.15.40", + "@swc/core-win32-x64-msvc": "1.15.40" + }, + "peerDependencies": { + "@swc/helpers": ">=0.5.17" + }, + "peerDependenciesMeta": { + "@swc/helpers": { + "optional": true + } + } + }, + "node_modules/@swc/core-darwin-arm64": { + "version": "1.15.40", + "resolved": "https://registry.npmjs.org/@swc/core-darwin-arm64/-/core-darwin-arm64-1.15.40.tgz", + "integrity": "sha512-PaYyclfmQ++77D8ityYvmmVzHv9aG8ROwt2GfG6/ccloy4Hgf80qtOnzb9VYvPsUT7Ty1uhuDRhv3XYpf62qhQ==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "Apache-2.0 AND MIT", + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": ">=10" + } + }, + "node_modules/@swc/core-darwin-x64": { + "version": "1.15.40", + "resolved": "https://registry.npmjs.org/@swc/core-darwin-x64/-/core-darwin-x64-1.15.40.tgz", + "integrity": "sha512-HbbPzvfLBUXjIB1Ezks+//lNUjmLjfyd63XSwprJgrZaXYdm70kohXPJUWdqKZozolFxbPaO+xtBaiUp6BoueA==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "Apache-2.0 AND MIT", + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": ">=10" + } + }, + "node_modules/@swc/core-linux-arm-gnueabihf": { + "version": "1.15.40", + "resolved": "https://registry.npmjs.org/@swc/core-linux-arm-gnueabihf/-/core-linux-arm-gnueabihf-1.15.40.tgz", + "integrity": "sha512-SlRZsCjOCPR2LvFs0Ri/Xrx/5o5TCt8vl4gW6mX1hEZOG0a625RxzRHpHdAQNGykmAN/7IeaFAJG+QnNmxlHcA==", + "cpu": [ + "arm" + ], + "dev": true, + "license": "Apache-2.0", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=10" + } + }, + "node_modules/@swc/core-linux-arm64-gnu": { + "version": "1.15.40", + "resolved": "https://registry.npmjs.org/@swc/core-linux-arm64-gnu/-/core-linux-arm64-gnu-1.15.40.tgz", + "integrity": "sha512-Q8byxJt2fh8CR3EUX6snBpy47AoBVm+In/+Z3rjDHMjC38ZvR9/gtUUNCT0tfrn4EdVsO8/QPi59nxrxvqxvBQ==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "Apache-2.0 AND MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=10" + } + }, + "node_modules/@swc/core-linux-arm64-musl": { + "version": "1.15.40", + "resolved": "https://registry.npmjs.org/@swc/core-linux-arm64-musl/-/core-linux-arm64-musl-1.15.40.tgz", + "integrity": "sha512-4z0MgHU+7M0pZDqBN1El7mFXDI1SBwinfcUkAyA4v8QrhOIUOZltySt2aStQLZGrdXVXM4Y4ylfiTC04ED+MoQ==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "Apache-2.0 AND MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=10" + } + }, + "node_modules/@swc/core-linux-ppc64-gnu": { + "version": "1.15.40", + "resolved": "https://registry.npmjs.org/@swc/core-linux-ppc64-gnu/-/core-linux-ppc64-gnu-1.15.40.tgz", + "integrity": "sha512-fLI4iUgeSZu0eRWUXwe6YzPFx9gHbFiPkl8Rp3mJfP8OpNR3nTQCGPvHdDh9xniW7mVvgMY4ni7A4VzqI1KrpA==", + "cpu": [ + "ppc64" + ], + "dev": true, + "license": "Apache-2.0 AND MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=10" + } + }, + "node_modules/@swc/core-linux-s390x-gnu": { + "version": "1.15.40", + "resolved": "https://registry.npmjs.org/@swc/core-linux-s390x-gnu/-/core-linux-s390x-gnu-1.15.40.tgz", + "integrity": "sha512-YqeKMAb7d4nQSGMJQ454IlaCENpzcDqhvBE9+CPfdnYpnUXxd+BSrB6Xk0YjW8UyoEhUj4p6quATCxbsp6J3jg==", + "cpu": [ + "s390x" + ], + "dev": true, + "license": "Apache-2.0 AND MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=10" + } + }, + "node_modules/@swc/core-linux-x64-gnu": { + "version": "1.15.40", + "resolved": "https://registry.npmjs.org/@swc/core-linux-x64-gnu/-/core-linux-x64-gnu-1.15.40.tgz", + "integrity": "sha512-7HOuS1iGcme/j/TuL1TfmmLGiMQrjv/GmjyZeydl00FKPtpGXEldwqfI56xgd1YzrzoB2svWjxbGGyQ0TEASxg==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "Apache-2.0 AND MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=10" + } + }, + "node_modules/@swc/core-linux-x64-musl": { + "version": "1.15.40", + "resolved": "https://registry.npmjs.org/@swc/core-linux-x64-musl/-/core-linux-x64-musl-1.15.40.tgz", + "integrity": "sha512-h4kZYHc7dpc9P9u4brRJaS8Pl7tPVHAeiLSzw7T5RfIJgAoSdaCMKzI/2Uay9gFhaw8uyCDl0L5q37r0EpAfIA==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "Apache-2.0 AND MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=10" + } + }, + "node_modules/@swc/core-win32-arm64-msvc": { + "version": "1.15.40", + "resolved": "https://registry.npmjs.org/@swc/core-win32-arm64-msvc/-/core-win32-arm64-msvc-1.15.40.tgz", + "integrity": "sha512-+mQgKZXSj6mV38Zh05QaxSjUDmGP/R2JWlXZTDLSPkDzHU6p3GxN9eeSf5dfyDVU86946fmCvSzyl/ucImx8+A==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "Apache-2.0 AND MIT", + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">=10" + } + }, + "node_modules/@swc/core-win32-ia32-msvc": { + "version": "1.15.40", + "resolved": "https://registry.npmjs.org/@swc/core-win32-ia32-msvc/-/core-win32-ia32-msvc-1.15.40.tgz", + "integrity": "sha512-yvwdPLGd25mcj/mNatjNQ0lZujtQD6psH3v9PNmMb+fSzjbNG8KIDxjFWrcV+fsFVLOkyOmdJsFmX7NAFjVyPw==", + "cpu": [ + "ia32" + ], + "dev": true, + "license": "Apache-2.0 AND MIT", + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">=10" + } + }, + "node_modules/@swc/core-win32-x64-msvc": { + "version": "1.15.40", + "resolved": "https://registry.npmjs.org/@swc/core-win32-x64-msvc/-/core-win32-x64-msvc-1.15.40.tgz", + "integrity": "sha512-OXtKsLU1bVtInzzDEAY2sYiF/rl4tvAnLLLpuMp3HzAOQZ5A+i69AKDhA1YLQTaMAqO3vzyYNVAYVRMPtSYD4w==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "Apache-2.0 AND MIT", + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">=10" + } + }, + "node_modules/@swc/counter": { + "version": "0.1.3", + "resolved": "https://registry.npmjs.org/@swc/counter/-/counter-0.1.3.tgz", + "integrity": "sha512-e2BR4lsJkkRlKZ/qCHPw9ZaSxc0MVUd7gtbtaB7aMvHeJVYe8sOB8DBZkP2DtISHGSku9sCK6T6cnY0CtXrOCQ==", + "dev": true, + "license": "Apache-2.0" + }, + "node_modules/@swc/types": { + "version": "0.1.26", + "resolved": "https://registry.npmjs.org/@swc/types/-/types-0.1.26.tgz", + "integrity": "sha512-lyMwd7WGgG79RS7EERZV3T8wMdmPq3xwyg+1nmAM64kIhx5yl+juO2PYIHb7vTiPgPCj8LYjsNV2T5wiQHUEaw==", + "dev": true, + "license": "Apache-2.0", + "dependencies": { + "@swc/counter": "^0.1.3" + } + }, + "node_modules/@tsconfig/node10": { + "version": "1.0.12", + "resolved": "https://registry.npmjs.org/@tsconfig/node10/-/node10-1.0.12.tgz", + "integrity": "sha512-UCYBaeFvM11aU2y3YPZ//O5Rhj+xKyzy7mvcIoAjASbigy8mHMryP5cK7dgjlz2hWxh1g5pLw084E0a/wlUSFQ==", + "dev": true, + "license": "MIT", + "optional": true, + "peer": true + }, + "node_modules/@tsconfig/node12": { + "version": "1.0.11", + "resolved": "https://registry.npmjs.org/@tsconfig/node12/-/node12-1.0.11.tgz", + "integrity": "sha512-cqefuRsh12pWyGsIoBKJA9luFu3mRxCA+ORZvA4ktLSzIuCUtWVxGIuXigEwO5/ywWFMZ2QEGKWvkZG1zDMTag==", + "dev": true, + "license": "MIT", + "optional": true, + "peer": true + }, + "node_modules/@tsconfig/node14": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/@tsconfig/node14/-/node14-1.0.3.tgz", + "integrity": "sha512-ysT8mhdixWK6Hw3i1V2AeRqZ5WfXg1G43mqoYlM2nc6388Fq5jcXyr5mRsqViLx/GJYdoL0bfXD8nmF+Zn/Iow==", + "dev": true, + "license": "MIT", + "optional": true, + "peer": true + }, + "node_modules/@tsconfig/node16": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/@tsconfig/node16/-/node16-1.0.4.tgz", + "integrity": "sha512-vxhUy4J8lyeyinH7Azl1pdd43GJhZH/tP2weN8TntQblOY+A0XbT8DJk1/oCPuOOyg/Ja757rG0CgHcWC8OfMA==", + "dev": true, + "license": "MIT", + "optional": true, + "peer": true + }, + "node_modules/@types/chai": { + "version": "4.3.20", + "resolved": "https://registry.npmjs.org/@types/chai/-/chai-4.3.20.tgz", + "integrity": "sha512-/pC9HAB5I/xMlc5FP77qjCnI16ChlJfW0tGa0IUcFn38VJrTV6DeZ60NU5KZBtaOZqjdpwTWohz5HU1RrhiYxQ==", + "dev": true, + "license": "MIT" + }, + "node_modules/@types/chai-as-promised": { + "version": "7.1.8", + "resolved": "https://registry.npmjs.org/@types/chai-as-promised/-/chai-as-promised-7.1.8.tgz", + "integrity": "sha512-ThlRVIJhr69FLlh6IctTXFkmhtP3NpMZ2QGq69StYLyKZFp/HOp1VdKZj7RvfNWYYcJ1xlbLGLLWj1UvP5u/Gw==", + "dev": true, + "license": "MIT", + "dependencies": { + "@types/chai": "*" + } + }, + "node_modules/@types/expect": { + "version": "24.3.2", + "resolved": "https://registry.npmjs.org/@types/expect/-/expect-24.3.2.tgz", + "integrity": "sha512-5ev4tL5eBuX9wyC/SFHku1Sizyerg457LiwMgde3sq61TMHbnKjikzwsBLxLpFMflvKuWXfWVW0w3hZg4qml9w==", + "deprecated": "This is a stub types definition. expect provides its own type definitions, so you do not need this installed.", + "dev": true, + "license": "MIT", + "dependencies": { + "expect": "*" + } + }, + "node_modules/@types/istanbul-lib-coverage": { + "version": "2.0.6", + "resolved": "https://registry.npmjs.org/@types/istanbul-lib-coverage/-/istanbul-lib-coverage-2.0.6.tgz", + "integrity": "sha512-2QF/t/auWm0lsy8XtKVPG19v3sSOQlJe/YHZgfjb/KBBHOGSV+J2q/S671rcq9uTBrLAXmZpqJiaQbMT+zNU1w==", + "dev": true, + "license": "MIT" + }, + "node_modules/@types/istanbul-lib-report": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/@types/istanbul-lib-report/-/istanbul-lib-report-3.0.3.tgz", + "integrity": "sha512-NQn7AHQnk/RSLOxrBbGyJM/aVQ+pjj5HCgasFxc0K/KhoATfQ/47AyUl15I2yBUpihjmas+a+VJBOqecrFH+uA==", + "dev": true, + "license": "MIT", + "dependencies": { + "@types/istanbul-lib-coverage": "*" + } + }, + "node_modules/@types/istanbul-reports": { + "version": "3.0.4", + "resolved": "https://registry.npmjs.org/@types/istanbul-reports/-/istanbul-reports-3.0.4.tgz", + "integrity": "sha512-pk2B1NWalF9toCRu6gjBzR69syFjP4Od8WRAX+0mmf9lAjCRicLOWc+ZrxZHx/0XRjotgkF9t6iaMJ+aXcOdZQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "@types/istanbul-lib-report": "*" + } + }, + "node_modules/@types/json5": { + "version": "0.0.29", + "resolved": "https://registry.npmjs.org/@types/json5/-/json5-0.0.29.tgz", + "integrity": "sha512-dRLjCWHYg4oaA77cxO64oO+7JwCwnIzkZPdrrC71jQmQtlhM556pwKo5bUzqvZndkVbeFLIIi+9TC40JNF5hNQ==", + "dev": true, + "license": "MIT", + "optional": true + }, + "node_modules/@types/mocha": { + "version": "10.0.10", + "resolved": "https://registry.npmjs.org/@types/mocha/-/mocha-10.0.10.tgz", + "integrity": "sha512-xPyYSz1cMPnJQhl0CLMH68j3gprKZaTjG3s5Vi+fDgx+uhG9NOXwbVt52eFS8ECyXhyKcjDLCBEqBExKuiZb7Q==", + "dev": true, + "license": "MIT" + }, + "node_modules/@types/node": { + "version": "25.9.1", + "resolved": "https://registry.npmjs.org/@types/node/-/node-25.9.1.tgz", + "integrity": "sha512-xfrlY7UD5rMJk3ZVJP8BNzS28J36YJg+xp+LPXV1TdWxr8uMH5A860QNxYDGQe/ylDSgjxE52Q9VnO7p75tJxg==", + "dev": true, + "license": "MIT", + "dependencies": { + "undici-types": ">=7.24.0 <7.24.7" + } + }, + "node_modules/@types/stack-utils": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/@types/stack-utils/-/stack-utils-2.0.3.tgz", + "integrity": "sha512-9aEbYZ3TbYMznPdcdr3SmIrLXwC/AKZXQeCf9Pgao5CKb8CyHuEX5jzWPTkvregvhRJHcpRO6BFoGW9ycaOkYw==", + "dev": true, + "license": "MIT" + }, + "node_modules/@types/url-parse": { + "version": "1.4.4", + "resolved": "https://registry.npmjs.org/@types/url-parse/-/url-parse-1.4.4.tgz", + "integrity": "sha512-KtQLad12+4T/NfSxpoDhmr22+fig3T7/08QCgmutYA6QSznSRmEtuL95GrhVV40/0otTEdFc+etRcCTqhh1q5Q==", + "dev": true, + "license": "MIT" + }, + "node_modules/@types/yargs": { + "version": "17.0.35", + "resolved": "https://registry.npmjs.org/@types/yargs/-/yargs-17.0.35.tgz", + "integrity": "sha512-qUHkeCyQFxMXg79wQfTtfndEC+N9ZZg76HJftDJp+qH2tV7Gj4OJi7l+PiWwJ+pWtW8GwSmqsDj/oymhrTWXjg==", + "dev": true, + "license": "MIT", + "dependencies": { + "@types/yargs-parser": "*" + } + }, + "node_modules/@types/yargs-parser": { + "version": "21.0.3", + "resolved": "https://registry.npmjs.org/@types/yargs-parser/-/yargs-parser-21.0.3.tgz", + "integrity": "sha512-I4q9QU9MQv4oEOz4tAHJtNz1cwuLxn2F3xcc2iV5WdqLPpUnj30aUuxt1mAxYTG+oe8CZMV/+6rU4S4gRDzqtQ==", + "dev": true, + "license": "MIT" + }, + "node_modules/acorn": { + "version": "8.16.0", + "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.16.0.tgz", + "integrity": "sha512-UVJyE9MttOsBQIDKw1skb9nAwQuR5wuGD3+82K6JgJlm/Y+KI92oNsMNGZCYdDsVtRHSak0pcV5Dno5+4jh9sw==", + "dev": true, + "license": "MIT", + "optional": true, + "peer": true, + "bin": { + "acorn": "bin/acorn" + }, + "engines": { + "node": ">=0.4.0" + } + }, + "node_modules/acorn-walk": { + "version": "8.3.5", + "resolved": "https://registry.npmjs.org/acorn-walk/-/acorn-walk-8.3.5.tgz", + "integrity": "sha512-HEHNfbars9v4pgpW6SO1KSPkfoS0xVOM/9UzkJltjlsHZmJasxg8aXkuZa7SMf8vKGIBhpUsPluQSqhJFCqebw==", + "dev": true, + "license": "MIT", + "optional": true, + "peer": true, + "dependencies": { + "acorn": "^8.11.0" + }, + "engines": { + "node": ">=0.4.0" + } + }, + "node_modules/ansi-colors": { + "version": "4.1.3", + "resolved": "https://registry.npmjs.org/ansi-colors/-/ansi-colors-4.1.3.tgz", + "integrity": "sha512-/6w/C21Pm1A7aZitlI5Ni/2J6FFQN8i1Cvz3kHABAAbw93v/NlvKdVOqz7CCWz/3iv/JplRSEEZ83XION15ovw==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6" + } + }, + "node_modules/ansi-regex": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz", + "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/ansi-styles": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", + "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", + "dev": true, + "license": "MIT", + "dependencies": { + "color-convert": "^2.0.1" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/chalk/ansi-styles?sponsor=1" + } + }, + "node_modules/any-promise": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/any-promise/-/any-promise-1.3.0.tgz", + "integrity": "sha512-7UvmKalWRt1wgjL1RrGxoSJW/0QZFIegpeGvZG9kjp8vrRu55XTHbwnqq2GpXm9uLbcuhxm3IqX9OB4MZR1b2A==", + "dev": true, + "license": "MIT" + }, + "node_modules/anymatch": { + "version": "3.1.3", + "resolved": "https://registry.npmjs.org/anymatch/-/anymatch-3.1.3.tgz", + "integrity": "sha512-KMReFUr0B4t+D+OBkjR3KYqvocp2XaSzO55UcB6mgQMd3KbcE+mWTyvVV7D/zsdEbNnV6acZUutkiHQXvTr1Rw==", + "dev": true, + "license": "ISC", + "dependencies": { + "normalize-path": "^3.0.0", + "picomatch": "^2.0.4" + }, + "engines": { + "node": ">= 8" + } + }, + "node_modules/anymatch/node_modules/picomatch": { + "version": "2.3.2", + "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.3.2.tgz", + "integrity": "sha512-V7+vQEJ06Z+c5tSye8S+nHUfI51xoXIXjHQ99cQtKUkQqqO1kO/KCJUfZXuB47h/YBlDhah2H3hdUGXn8ie0oA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8.6" + }, + "funding": { + "url": "https://github.com/sponsors/jonschlinkert" + } + }, + "node_modules/arg": { + "version": "4.1.3", + "resolved": "https://registry.npmjs.org/arg/-/arg-4.1.3.tgz", + "integrity": "sha512-58S9QDqG0Xx27YwPSt9fJxivjYl432YCwfDMfZ+71RAqUrZef7LrKQZ3LHLOwCS4FLNBplP533Zx895SeOCHvA==", + "dev": true, + "license": "MIT", + "optional": true, + "peer": true + }, + "node_modules/argparse": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/argparse/-/argparse-2.0.1.tgz", + "integrity": "sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==", + "dev": true, + "license": "Python-2.0" + }, + "node_modules/array-union": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/array-union/-/array-union-2.1.0.tgz", + "integrity": "sha512-HGyxoOTYUyCM6stUe6EJgnd4EoewAI7zMdfqO+kGjnlZmBDz/cR5pf8r/cR4Wq60sL/p0IkcjUEEPwS3GFrIyw==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/arrify": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/arrify/-/arrify-1.0.1.tgz", + "integrity": "sha512-3CYzex9M9FGQjCGMGyi6/31c8GJbgb0qGyrx5HWxPd0aCwh4cB2YjMb2Xf9UuoogrMrlO9cTqnB5rI5GHZTcUA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/assertion-error": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/assertion-error/-/assertion-error-1.1.0.tgz", + "integrity": "sha512-jgsaNduz+ndvGyFt3uSuWqvy4lCnIJiovtouQN5JZHOKCS2QuhEdbcQHFhVksz2N2U9hXJo8odG7ETyWlEeuDw==", + "dev": true, + "license": "MIT", + "engines": { + "node": "*" + } + }, + "node_modules/balanced-match": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz", + "integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==", + "dev": true, + "license": "MIT" + }, + "node_modules/binary-extensions": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/binary-extensions/-/binary-extensions-2.3.0.tgz", + "integrity": "sha512-Ceh+7ox5qe7LJuLHoY0feh3pHuUDHAcRUeyL2VYghZwfpkNIy/+8Ocg0a3UuSoYzavmylwuLWQOf3hl0jjMMIw==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/brace-expansion": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.1.1.tgz", + "integrity": "sha512-WR1cURNjuvBLMZBMbqM0UoE+WAfdUcEV1ccD8PVBVOI+Z3ND4+SZbN8RsfT2bMuG1qwz5RFvPukSZm5fF2D5eA==", + "dev": true, + "license": "MIT", + "dependencies": { + "balanced-match": "^1.0.0" + } + }, + "node_modules/braces": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/braces/-/braces-3.0.3.tgz", + "integrity": "sha512-yQbXgO/OSZVD2IsiLlro+7Hf6Q18EJrKSEsdoMzKePKXct3gvD8oLcOQdIzGupr5Fj+EDe8gO/lxc1BzfMpxvA==", + "dev": true, + "license": "MIT", + "dependencies": { + "fill-range": "^7.1.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/browser-stdout": { + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/browser-stdout/-/browser-stdout-1.3.1.tgz", + "integrity": "sha512-qhAVI1+Av2X7qelOfAIYwXONood6XlZE/fXaBSmW/T5SzLAmCgzi+eiWE7fUvbHaeNBQH13UftjpXxsfLkMpgw==", + "dev": true, + "license": "ISC" + }, + "node_modules/buffer-from": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/buffer-from/-/buffer-from-1.1.2.tgz", + "integrity": "sha512-E+XQCRwSbaaiChtv6k6Dwgc+bx+Bs6vuKJHHl5kox/BaKbhiXzqQOwK4cO22yElGp2OCmjwVhT3HmxgyPGnJfQ==", + "dev": true, + "license": "MIT" + }, + "node_modules/bundle-require": { + "version": "4.2.1", + "resolved": "https://registry.npmjs.org/bundle-require/-/bundle-require-4.2.1.tgz", + "integrity": "sha512-7Q/6vkyYAwOmQNRw75x+4yRtZCZJXUDmHHlFdkiV0wgv/reNjtJwpu1jPJ0w2kbEpIM0uoKI3S4/f39dU7AjSA==", + "dev": true, + "license": "MIT", + "dependencies": { + "load-tsconfig": "^0.2.3" + }, + "engines": { + "node": "^12.20.0 || ^14.13.1 || >=16.0.0" + }, + "peerDependencies": { + "esbuild": ">=0.17" + } + }, + "node_modules/cac": { + "version": "6.7.14", + "resolved": "https://registry.npmjs.org/cac/-/cac-6.7.14.tgz", + "integrity": "sha512-b6Ilus+c3RrdDk+JhLKUAQfzzgLEPy6wcXqS7f/xe1EETvsDP6GORG7SFuOs6cID5YkqchW/LXZbX5bc8j7ZcQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/camelcase": { + "version": "6.3.0", + "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-6.3.0.tgz", + "integrity": "sha512-Gmy6FhYlCY7uOElZUSbxo2UCDH8owEk996gkbrpsgGtrJLM3J7jGxl9Ic7Qwwj4ivOE5AWZWRMecDdF7hqGjFA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/chai": { + "version": "4.5.0", + "resolved": "https://registry.npmjs.org/chai/-/chai-4.5.0.tgz", + "integrity": "sha512-RITGBfijLkBddZvnn8jdqoTypxvqbOLYQkGGxXzeFjVHvudaPw0HNFD9x928/eUwYWd2dPCugVqspGALTZZQKw==", + "dev": true, + "license": "MIT", + "dependencies": { + "assertion-error": "^1.1.0", + "check-error": "^1.0.3", + "deep-eql": "^4.1.3", + "get-func-name": "^2.0.2", + "loupe": "^2.3.6", + "pathval": "^1.1.1", + "type-detect": "^4.1.0" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/chai-as-promised": { + "version": "7.1.2", + "resolved": "https://registry.npmjs.org/chai-as-promised/-/chai-as-promised-7.1.2.tgz", + "integrity": "sha512-aBDHZxRzYnUYuIAIPBH2s511DjlKPzXNlXSGFC8CwmroWQLfrW0LtE1nK3MAwwNhJPa9raEjNCmRoFpG0Hurdw==", + "dev": true, + "license": "WTFPL", + "dependencies": { + "check-error": "^1.0.2" + }, + "peerDependencies": { + "chai": ">= 2.1.2 < 6" + } + }, + "node_modules/chalk": { + "version": "4.1.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", + "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", + "dev": true, + "license": "MIT", + "dependencies": { + "ansi-styles": "^4.1.0", + "supports-color": "^7.1.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/chalk/chalk?sponsor=1" + } + }, + "node_modules/check-error": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/check-error/-/check-error-1.0.3.tgz", + "integrity": "sha512-iKEoDYaRmd1mxM90a2OEfWhjsjPpYPuQ+lMYsoxB126+t8fw7ySEO48nmDg5COTjxDI65/Y2OWpeEHk3ZOe8zg==", + "dev": true, + "license": "MIT", + "dependencies": { + "get-func-name": "^2.0.2" + }, + "engines": { + "node": "*" + } + }, + "node_modules/chokidar": { + "version": "3.6.0", + "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-3.6.0.tgz", + "integrity": "sha512-7VT13fmjotKpGipCW9JEQAusEPE+Ei8nl6/g4FBAmIm0GOOLMua9NDDo/DWp0ZAxCr3cPq5ZpBqmPAQgDda2Pw==", + "dev": true, + "license": "MIT", + "dependencies": { + "anymatch": "~3.1.2", + "braces": "~3.0.2", + "glob-parent": "~5.1.2", + "is-binary-path": "~2.1.0", + "is-glob": "~4.0.1", + "normalize-path": "~3.0.0", + "readdirp": "~3.6.0" + }, + "engines": { + "node": ">= 8.10.0" + }, + "funding": { + "url": "https://paulmillr.com/funding/" + }, + "optionalDependencies": { + "fsevents": "~2.3.2" + } + }, + "node_modules/ci-info": { + "version": "4.4.0", + "resolved": "https://registry.npmjs.org/ci-info/-/ci-info-4.4.0.tgz", + "integrity": "sha512-77PSwercCZU2Fc4sX94eF8k8Pxte6JAwL4/ICZLFjJLqegs7kCuAsqqj/70NQF6TvDpgFjkubQB2FW2ZZddvQg==", + "dev": true, + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/sibiraj-s" + } + ], + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/cliui": { + "version": "7.0.4", + "resolved": "https://registry.npmjs.org/cliui/-/cliui-7.0.4.tgz", + "integrity": "sha512-OcRE68cOsVMXp1Yvonl/fzkQOyjLSu/8bhPDfQt0e0/Eb283TKP20Fs2MqoPsr9SwA595rRCA+QMzYc9nBP+JQ==", + "dev": true, + "license": "ISC", + "dependencies": { + "string-width": "^4.2.0", + "strip-ansi": "^6.0.0", + "wrap-ansi": "^7.0.0" + } + }, + "node_modules/color-convert": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", + "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "color-name": "~1.1.4" + }, + "engines": { + "node": ">=7.0.0" + } + }, + "node_modules/color-name": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", + "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", + "dev": true, + "license": "MIT" + }, + "node_modules/commander": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/commander/-/commander-4.1.1.tgz", + "integrity": "sha512-NOKm8xhkzAjzFx8B2v5OAHT+u5pRQc2UCa2Vq9jYL/31o2wi9mxBA7LIFs3sV5VSC49z6pEhfbMULvShKj26WA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 6" + } + }, + "node_modules/create-require": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/create-require/-/create-require-1.1.1.tgz", + "integrity": "sha512-dcKFX3jn0MpIaXjisoRvexIJVEKzaq7z2rZKxf+MSr9TkdmHmsU4m2lcLojrj/FHl8mk5VxMmYA+ftRkP/3oKQ==", + "dev": true, + "license": "MIT", + "optional": true, + "peer": true + }, + "node_modules/cross-spawn": { + "version": "7.0.6", + "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.6.tgz", + "integrity": "sha512-uV2QOWP2nWzsy2aMp8aRibhi9dlzF5Hgh5SHaB9OiTGEyDTiJJyx0uy51QXdyWbtAHNua4XJzUKca3OzKUd3vA==", + "dev": true, + "license": "MIT", + "dependencies": { + "path-key": "^3.1.0", + "shebang-command": "^2.0.0", + "which": "^2.0.1" + }, + "engines": { + "node": ">= 8" + } + }, + "node_modules/debug": { + "version": "4.4.3", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.4.3.tgz", + "integrity": "sha512-RGwwWnwQvkVfavKVt22FGLw+xYSdzARwm0ru6DhTVA3umU5hZc28V3kO4stgYryrTlLpuvgI9GiijltAjNbcqA==", + "dev": true, + "license": "MIT", + "dependencies": { + "ms": "^2.1.3" + }, + "engines": { + "node": ">=6.0" + }, + "peerDependenciesMeta": { + "supports-color": { + "optional": true + } + } + }, + "node_modules/decamelize": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/decamelize/-/decamelize-4.0.0.tgz", + "integrity": "sha512-9iE1PgSik9HeIIw2JO94IidnE3eBoQrFJ3w7sFuzSX4DpmZ3v5sZpUiV5Swcf6mQEF+Y0ru8Neo+p+nyh2J+hQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/deep-eql": { + "version": "4.1.4", + "resolved": "https://registry.npmjs.org/deep-eql/-/deep-eql-4.1.4.tgz", + "integrity": "sha512-SUwdGfqdKOwxCPeVYjwSyRpJ7Z+fhpwIAtmCUdZIWZ/YP5R9WAsyuSgpLVDi9bjWoN2LXHNss/dk3urXtdQxGg==", + "dev": true, + "license": "MIT", + "dependencies": { + "type-detect": "^4.0.0" + }, + "engines": { + "node": ">=6" + } + }, + "node_modules/diff": { + "version": "5.2.2", + "resolved": "https://registry.npmjs.org/diff/-/diff-5.2.2.tgz", + "integrity": "sha512-vtcDfH3TOjP8UekytvnHH1o1P4FcUdt4eQ1Y+Abap1tk/OB2MWQvcwS2ClCd1zuIhc3JKOx6p3kod8Vfys3E+A==", + "dev": true, + "license": "BSD-3-Clause", + "engines": { + "node": ">=0.3.1" + } + }, + "node_modules/dir-glob": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/dir-glob/-/dir-glob-3.0.1.tgz", + "integrity": "sha512-WkrWp9GR4KXfKGYzOLmTuGVi1UWFfws377n9cc55/tb6DuqyF6pcQ5AbiHEshaDpY9v6oaSr2XCDidGmMwdzIA==", + "dev": true, + "license": "MIT", + "dependencies": { + "path-type": "^4.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/emoji-regex": { + "version": "8.0.0", + "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz", + "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==", + "dev": true, + "license": "MIT" + }, + "node_modules/es6-promise": { + "version": "4.2.8", + "resolved": "https://registry.npmjs.org/es6-promise/-/es6-promise-4.2.8.tgz", + "integrity": "sha512-HJDGx5daxeIvxdBxvG2cb9g4tEvwIk3i8+nhX0yGrYmZUzbkdg8QbDevheDB8gd0//uPj4c1EQua8Q+MViT0/w==", + "license": "MIT" + }, + "node_modules/esbuild": { + "version": "0.18.20", + "resolved": "https://registry.npmjs.org/esbuild/-/esbuild-0.18.20.tgz", + "integrity": "sha512-ceqxoedUrcayh7Y7ZX6NdbbDzGROiyVBgC4PriJThBKSVPWnnFHZAkfI1lJT8QFkOwH4qOS2SJkS4wvpGl8BpA==", + "dev": true, + "hasInstallScript": true, + "license": "MIT", + "bin": { + "esbuild": "bin/esbuild" + }, + "engines": { + "node": ">=12" + }, + "optionalDependencies": { + "@esbuild/android-arm": "0.18.20", + "@esbuild/android-arm64": "0.18.20", + "@esbuild/android-x64": "0.18.20", + "@esbuild/darwin-arm64": "0.18.20", + "@esbuild/darwin-x64": "0.18.20", + "@esbuild/freebsd-arm64": "0.18.20", + "@esbuild/freebsd-x64": "0.18.20", + "@esbuild/linux-arm": "0.18.20", + "@esbuild/linux-arm64": "0.18.20", + "@esbuild/linux-ia32": "0.18.20", + "@esbuild/linux-loong64": "0.18.20", + "@esbuild/linux-mips64el": "0.18.20", + "@esbuild/linux-ppc64": "0.18.20", + "@esbuild/linux-riscv64": "0.18.20", + "@esbuild/linux-s390x": "0.18.20", + "@esbuild/linux-x64": "0.18.20", + "@esbuild/netbsd-x64": "0.18.20", + "@esbuild/openbsd-x64": "0.18.20", + "@esbuild/sunos-x64": "0.18.20", + "@esbuild/win32-arm64": "0.18.20", + "@esbuild/win32-ia32": "0.18.20", + "@esbuild/win32-x64": "0.18.20" + } + }, + "node_modules/escalade": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/escalade/-/escalade-3.2.0.tgz", + "integrity": "sha512-WUj2qlxaQtO4g6Pq5c29GTcWGDyd8itL8zTlipgECz3JesAiiOKotd8JU6otB3PACgG6xkJUyVhboMS+bje/jA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6" + } + }, + "node_modules/escape-string-regexp": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-4.0.0.tgz", + "integrity": "sha512-TtpcNJ3XAzx3Gq8sWRzJaVajRs0uVxA2YAkdb1jm2YkPz4G6egUFAyA3n5vtEIZefPk5Wa4UXbKuS5fKkJWdgA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/execa": { + "version": "5.1.1", + "resolved": "https://registry.npmjs.org/execa/-/execa-5.1.1.tgz", + "integrity": "sha512-8uSpZZocAZRBAPIEINJj3Lo9HyGitllczc27Eh5YYojjMFMn8yHMDMaUHE2Jqfq05D/wucwI4JGURyXt1vchyg==", + "dev": true, + "license": "MIT", + "dependencies": { + "cross-spawn": "^7.0.3", + "get-stream": "^6.0.0", + "human-signals": "^2.1.0", + "is-stream": "^2.0.0", + "merge-stream": "^2.0.0", + "npm-run-path": "^4.0.1", + "onetime": "^5.1.2", + "signal-exit": "^3.0.3", + "strip-final-newline": "^2.0.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sindresorhus/execa?sponsor=1" + } + }, + "node_modules/expect": { + "version": "30.4.1", + "resolved": "https://registry.npmjs.org/expect/-/expect-30.4.1.tgz", + "integrity": "sha512-PMARsyh/JtqC20HoGqlFcIlQAyqUtW4PlI1rup1uhYJtKuwAjbvWi3GQMAn+STdHum/dk8xrKfUM1+5SAwpolA==", + "dev": true, + "license": "MIT", + "dependencies": { + "@jest/expect-utils": "30.4.1", + "@jest/get-type": "30.1.0", + "jest-matcher-utils": "30.4.1", + "jest-message-util": "30.4.1", + "jest-mock": "30.4.1", + "jest-util": "30.4.1" + }, + "engines": { + "node": "^18.14.0 || ^20.0.0 || ^22.0.0 || >=24.0.0" + } + }, + "node_modules/fast-glob": { + "version": "3.3.3", + "resolved": "https://registry.npmjs.org/fast-glob/-/fast-glob-3.3.3.tgz", + "integrity": "sha512-7MptL8U0cqcFdzIzwOTHoilX9x5BrNqye7Z/LuC7kCMRio1EMSyqRK3BEAUD7sXRq4iT4AzTVuZdhgQ2TCvYLg==", + "dev": true, + "license": "MIT", + "dependencies": { + "@nodelib/fs.stat": "^2.0.2", + "@nodelib/fs.walk": "^1.2.3", + "glob-parent": "^5.1.2", + "merge2": "^1.3.0", + "micromatch": "^4.0.8" + }, + "engines": { + "node": ">=8.6.0" + } + }, + "node_modules/fastq": { + "version": "1.20.1", + "resolved": "https://registry.npmjs.org/fastq/-/fastq-1.20.1.tgz", + "integrity": "sha512-GGToxJ/w1x32s/D2EKND7kTil4n8OVk/9mycTc4VDza13lOvpUZTGX3mFSCtV9ksdGBVzvsyAVLM6mHFThxXxw==", + "dev": true, + "license": "ISC", + "dependencies": { + "reusify": "^1.0.4" + } + }, + "node_modules/fdir": { + "version": "6.5.0", + "resolved": "https://registry.npmjs.org/fdir/-/fdir-6.5.0.tgz", + "integrity": "sha512-tIbYtZbucOs0BRGqPJkshJUYdL+SDH7dVM8gjy+ERp3WAUjLEFJE+02kanyHtwjWOnwrKYBiwAmM0p4kLJAnXg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=12.0.0" + }, + "peerDependencies": { + "picomatch": "^3 || ^4" + }, + "peerDependenciesMeta": { + "picomatch": { + "optional": true + } + } + }, + "node_modules/fill-range": { + "version": "7.1.1", + "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.1.1.tgz", + "integrity": "sha512-YsGpe3WHLK8ZYi4tWDg2Jy3ebRz2rXowDxnld4bkQB00cc/1Zw9AWnC0i9ztDJitivtQvaI9KaLyKrc+hBW0yg==", + "dev": true, + "license": "MIT", + "dependencies": { + "to-regex-range": "^5.0.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/find-up": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/find-up/-/find-up-5.0.0.tgz", + "integrity": "sha512-78/PXT1wlLLDgTzDs7sjq9hzz0vXD+zn+7wypEe4fXQxCmdmqfGsEPQxmiCSQI3ajFV91bVSsvNtrJRiW6nGng==", + "dev": true, + "license": "MIT", + "dependencies": { + "locate-path": "^6.0.0", + "path-exists": "^4.0.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/flat": { + "version": "5.0.2", + "resolved": "https://registry.npmjs.org/flat/-/flat-5.0.2.tgz", + "integrity": "sha512-b6suED+5/3rTpUBdG1gupIl8MPFCAMA0QXwmljLhvCUKcUvdE4gWky9zpuGCcXHOsz4J9wPGNWq6OKpmIzz3hQ==", + "dev": true, + "license": "BSD-3-Clause", + "bin": { + "flat": "cli.js" + } + }, + "node_modules/fs.realpath": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz", + "integrity": "sha512-OO0pH2lK6a0hZnAdau5ItzHPI6pUlvI7jMVnxUQRtw4owF2wk8lOSabtGDCTP4Ggrg2MbGnWO9X8K1t4+fGMDw==", + "dev": true, + "license": "ISC" + }, + "node_modules/fsevents": { + "version": "2.3.3", + "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.3.3.tgz", + "integrity": "sha512-5xoDfX+fL7faATnagmWPpbFtwh/R77WmMMqqHGS65C3vvB0YHrgF+B1YmZ3441tMj5n63k0212XNoJwzlhffQw==", + "dev": true, + "hasInstallScript": true, + "license": "MIT", + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": "^8.16.0 || ^10.6.0 || >=11.0.0" + } + }, + "node_modules/get-caller-file": { + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/get-caller-file/-/get-caller-file-2.0.5.tgz", + "integrity": "sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg==", + "dev": true, + "license": "ISC", + "engines": { + "node": "6.* || 8.* || >= 10.*" + } + }, + "node_modules/get-func-name": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/get-func-name/-/get-func-name-2.0.2.tgz", + "integrity": "sha512-8vXOvuE167CtIc3OyItco7N/dpRtBbYOsPsXCz7X/PMnlGjYjSGuZJgM1Y7mmew7BKf9BqvLX2tnOVy1BBUsxQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": "*" + } + }, + "node_modules/get-stream": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-6.0.1.tgz", + "integrity": "sha512-ts6Wi+2j3jQjqi70w5AlN8DFnkSwC+MqmxEzdEALB2qXZYV3X/b1CTfgPLGJNMeAWxdPfU8FO1ms3NUfaHCPYg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/glob": { + "version": "8.1.0", + "resolved": "https://registry.npmjs.org/glob/-/glob-8.1.0.tgz", + "integrity": "sha512-r8hpEjiQEYlF2QU0df3dS+nxxSIreXQS1qRhMJM0Q5NDdR386C7jb7Hwwod8Fgiuex+k0GFjgft18yvxm5XoCQ==", + "deprecated": "Old versions of glob are not supported, and contain widely publicized security vulnerabilities, which have been fixed in the current version. Please update. Support for old versions may be purchased (at exorbitant rates) by contacting i@izs.me", + "dev": true, + "license": "ISC", + "dependencies": { + "fs.realpath": "^1.0.0", + "inflight": "^1.0.4", + "inherits": "2", + "minimatch": "^5.0.1", + "once": "^1.3.0" + }, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/glob-parent": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.2.tgz", + "integrity": "sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==", + "dev": true, + "license": "ISC", + "dependencies": { + "is-glob": "^4.0.1" + }, + "engines": { + "node": ">= 6" + } + }, + "node_modules/globby": { + "version": "11.1.0", + "resolved": "https://registry.npmjs.org/globby/-/globby-11.1.0.tgz", + "integrity": "sha512-jhIXaOzy1sb8IyocaruWSn1TjmnBVs8Ayhcy83rmxNJ8q2uWKCAj3CnJY+KpGSXCueAPc0i05kVvVKtP1t9S3g==", + "dev": true, + "license": "MIT", + "dependencies": { + "array-union": "^2.1.0", + "dir-glob": "^3.0.1", + "fast-glob": "^3.2.9", + "ignore": "^5.2.0", + "merge2": "^1.4.1", + "slash": "^3.0.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/graceful-fs": { + "version": "4.2.11", + "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.11.tgz", + "integrity": "sha512-RbJ5/jmFcNNCcDV5o9eTnBLJ/HszWV0P73bc+Ff4nS/rJj+YaS6IGyiOL0VoBYX+l1Wrl3k63h/KrH+nhJ0XvQ==", + "dev": true, + "license": "ISC" + }, + "node_modules/has-flag": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", + "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/he": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/he/-/he-1.2.0.tgz", + "integrity": "sha512-F/1DnUGPopORZi0ni+CvrCgHQ5FyEAHRLSApuYWMmrbSwoN2Mn/7k+Gl38gJnR7yyDZk6WLXwiGod1JOWNDKGw==", + "dev": true, + "license": "MIT", + "bin": { + "he": "bin/he" + } + }, + "node_modules/human-signals": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/human-signals/-/human-signals-2.1.0.tgz", + "integrity": "sha512-B4FFZ6q/T2jhhksgkbEW3HBvWIfDW85snkQgawt07S7J5QXTk6BkNV+0yAeZrM5QpMAdYlocGoljn0sJ/WQkFw==", + "dev": true, + "license": "Apache-2.0", + "engines": { + "node": ">=10.17.0" + } + }, + "node_modules/ignore": { + "version": "5.3.2", + "resolved": "https://registry.npmjs.org/ignore/-/ignore-5.3.2.tgz", + "integrity": "sha512-hsBTNUqQTDwkWtcdYI2i06Y/nUBEsNEDJKjWdigLvegy8kDuJAS8uRlpkkcQpyEXL0Z/pjDy5HBmMjRCJ2gq+g==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 4" + } + }, + "node_modules/inflight": { + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz", + "integrity": "sha512-k92I/b08q4wvFscXCLvqfsHCrjrF7yiXsQuIVvVE7N82W3+aqpzuUdBbfhWcy/FZR3/4IgflMgKLOsvPDrGCJA==", + "deprecated": "This module is not supported, and leaks memory. Do not use it. Check out lru-cache if you want a good and tested way to coalesce async requests by a key value, which is much more comprehensive and powerful.", + "dev": true, + "license": "ISC", + "dependencies": { + "once": "^1.3.0", + "wrappy": "1" + } + }, + "node_modules/inherits": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz", + "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==", + "dev": true, + "license": "ISC" + }, + "node_modules/is-binary-path": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/is-binary-path/-/is-binary-path-2.1.0.tgz", + "integrity": "sha512-ZMERYes6pDydyuGidse7OsHxtbI7WVeUEozgR/g7rd0xUimYNlvZRE/K2MgZTjWy725IfelLeVcEM97mmtRGXw==", + "dev": true, + "license": "MIT", + "dependencies": { + "binary-extensions": "^2.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/is-extglob": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz", + "integrity": "sha512-SbKbANkN603Vi4jEZv49LeVJMn4yGwsbzZworEoyEiutsN3nJYdbO36zfhGJ6QEDpOZIFkDtnq5JRxmvl3jsoQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/is-fullwidth-code-point": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz", + "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/is-glob": { + "version": "4.0.3", + "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.3.tgz", + "integrity": "sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg==", + "dev": true, + "license": "MIT", + "dependencies": { + "is-extglob": "^2.1.1" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/is-number": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/is-number/-/is-number-7.0.0.tgz", + "integrity": "sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.12.0" + } + }, + "node_modules/is-plain-obj": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/is-plain-obj/-/is-plain-obj-2.1.0.tgz", + "integrity": "sha512-YWnfyRwxL/+SsrWYfOpUtz5b3YD+nyfkHvjbcanzk8zgyO4ASD67uVMRt8k5bM4lLMDnXfriRhOpemw+NfT1eA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/is-stream": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/is-stream/-/is-stream-2.0.1.tgz", + "integrity": "sha512-hFoiJiTl63nn+kstHGBtewWSKnQLpyb155KHheA1l39uvtO9nWIop1p3udqPcUd/xbF1VLMO4n7OI6p7RbngDg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/is-unicode-supported": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/is-unicode-supported/-/is-unicode-supported-0.1.0.tgz", + "integrity": "sha512-knxG2q4UC3u8stRGyAVJCOdxFmv5DZiRcdlIaAQXAbSfJya+OhopNotLQrstBhququ4ZpuKbDc/8S6mgXgPFPw==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/isexe": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz", + "integrity": "sha512-RHxMLp9lnKHGHRng9QFhRCMbYAcVpn69smSGcq3f36xjgVVWThj4qqLbTLlq7Ssj8B+fIQ1EuCEGI2lKsyQeIw==", + "dev": true, + "license": "ISC" + }, + "node_modules/jest-diff": { + "version": "30.4.1", + "resolved": "https://registry.npmjs.org/jest-diff/-/jest-diff-30.4.1.tgz", + "integrity": "sha512-CRpFK0RtLriVDGcPPAnR6HMVI8bSR2jnUIgralhauzYQZIb4RH9AtEInTuQr65LmmGggGcRT6HIASxwqsVsmlA==", + "dev": true, + "license": "MIT", + "dependencies": { + "@jest/diff-sequences": "30.4.0", + "@jest/get-type": "30.1.0", + "chalk": "^4.1.2", + "pretty-format": "30.4.1" + }, + "engines": { + "node": "^18.14.0 || ^20.0.0 || ^22.0.0 || >=24.0.0" + } + }, + "node_modules/jest-matcher-utils": { + "version": "30.4.1", + "resolved": "https://registry.npmjs.org/jest-matcher-utils/-/jest-matcher-utils-30.4.1.tgz", + "integrity": "sha512-zvYfX5CaeEkFrrLS9suWe9rvJrm9J1Iv3ua8kIBv9GEPzcnsfBf0bob37la7s67fs0nlBC3EuvkOLnXQKxtx4A==", + "dev": true, + "license": "MIT", + "dependencies": { + "@jest/get-type": "30.1.0", + "chalk": "^4.1.2", + "jest-diff": "30.4.1", + "pretty-format": "30.4.1" + }, + "engines": { + "node": "^18.14.0 || ^20.0.0 || ^22.0.0 || >=24.0.0" + } + }, + "node_modules/jest-message-util": { + "version": "30.4.1", + "resolved": "https://registry.npmjs.org/jest-message-util/-/jest-message-util-30.4.1.tgz", + "integrity": "sha512-kwCKIvq0MCW1HzLoGola9Te6JUdzgV0loyKJ3Qghrkz9i5/RRIHsL95BMQc2HBBhlBKC4j22K9p11TGHH8RBpQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/code-frame": "^7.27.1", + "@jest/types": "30.4.1", + "@types/stack-utils": "^2.0.3", + "chalk": "^4.1.2", + "graceful-fs": "^4.2.11", + "jest-util": "30.4.1", + "picomatch": "^4.0.3", + "pretty-format": "30.4.1", + "slash": "^3.0.0", + "stack-utils": "^2.0.6" + }, + "engines": { + "node": "^18.14.0 || ^20.0.0 || ^22.0.0 || >=24.0.0" + } + }, + "node_modules/jest-mock": { + "version": "30.4.1", + "resolved": "https://registry.npmjs.org/jest-mock/-/jest-mock-30.4.1.tgz", + "integrity": "sha512-/i8SVb8/NSB7RfNi8gfqu8gxLV23KaL5EpAttyb9iz8qWRIqXRLflycz/32wXsYkOnaUlx8NAKnJYtpsmXUmfw==", + "dev": true, + "license": "MIT", + "dependencies": { + "@jest/types": "30.4.1", + "@types/node": "*", + "jest-util": "30.4.1" + }, + "engines": { + "node": "^18.14.0 || ^20.0.0 || ^22.0.0 || >=24.0.0" + } + }, + "node_modules/jest-regex-util": { + "version": "30.4.0", + "resolved": "https://registry.npmjs.org/jest-regex-util/-/jest-regex-util-30.4.0.tgz", + "integrity": "sha512-mWlvLviKIgIQ8VCuM1xRdD0TWp3zlzionlmDBjuXVBs+VkmXq6FgW9T4Emr7oGz/Rk6feDCGyiugolcQEyp3mg==", + "dev": true, + "license": "MIT", + "engines": { + "node": "^18.14.0 || ^20.0.0 || ^22.0.0 || >=24.0.0" + } + }, + "node_modules/jest-util": { + "version": "30.4.1", + "resolved": "https://registry.npmjs.org/jest-util/-/jest-util-30.4.1.tgz", + "integrity": "sha512-vjQb1sACEiv13DKJMDToJpzVW0joCsIQrmbg0fi7CyOOt+g9jTuQl2A216pWRBYhOVt53XbL/2LbMKg1BECWOw==", + "dev": true, + "license": "MIT", + "dependencies": { + "@jest/types": "30.4.1", + "@types/node": "*", + "chalk": "^4.1.2", + "ci-info": "^4.2.0", + "graceful-fs": "^4.2.11", + "picomatch": "^4.0.3" + }, + "engines": { + "node": "^18.14.0 || ^20.0.0 || ^22.0.0 || >=24.0.0" + } + }, + "node_modules/joycon": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/joycon/-/joycon-3.1.1.tgz", + "integrity": "sha512-34wB/Y7MW7bzjKRjUKTa46I2Z7eV62Rkhva+KkopW7Qvv/OSWBqvkSY7vusOPrNuZcUG3tApvdVgNB8POj3SPw==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=10" + } + }, + "node_modules/js-tokens": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-4.0.0.tgz", + "integrity": "sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ==", + "dev": true, + "license": "MIT" + }, + "node_modules/js-yaml": { + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-4.2.0.tgz", + "integrity": "sha512-ePWsvanv0DWuDRsW8dnt+R4jQ31SCRCQ7hhNcPXZPsoBZiemuZNYGf7adZdqX2D86j6rvKp3RpCxVTSb8WQlOw==", + "dev": true, + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/puzrin" + }, + { + "type": "github", + "url": "https://github.com/sponsors/nodeca" + } + ], + "license": "MIT", + "dependencies": { + "argparse": "^2.0.1" + }, + "bin": { + "js-yaml": "bin/js-yaml.js" + } + }, + "node_modules/json5": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/json5/-/json5-1.0.2.tgz", + "integrity": "sha512-g1MWMLBiz8FKi1e4w0UyVL3w+iJceWAFBAaBnnGKOpNa5f8TLktkbre1+s6oICydWAm+HRUGTmI+//xv2hvXYA==", + "dev": true, + "license": "MIT", + "optional": true, + "dependencies": { + "minimist": "^1.2.0" + }, + "bin": { + "json5": "lib/cli.js" + } + }, + "node_modules/lilconfig": { + "version": "3.1.3", + "resolved": "https://registry.npmjs.org/lilconfig/-/lilconfig-3.1.3.tgz", + "integrity": "sha512-/vlFKAoH5Cgt3Ie+JLhRbwOsCQePABiU3tJ1egGvyQ+33R/vcwM2Zl2QR/LzjsBeItPt3oSVXapn+m4nQDvpzw==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=14" + }, + "funding": { + "url": "https://github.com/sponsors/antonk52" + } + }, + "node_modules/lines-and-columns": { + "version": "1.2.4", + "resolved": "https://registry.npmjs.org/lines-and-columns/-/lines-and-columns-1.2.4.tgz", + "integrity": "sha512-7ylylesZQ/PV29jhEDl3Ufjo6ZX7gCqJr5F7PKrqc93v7fzSymt1BpwEU8nAUXs8qzzvqhbjhK5QZg6Mt/HkBg==", + "dev": true, + "license": "MIT" + }, + "node_modules/load-tsconfig": { + "version": "0.2.5", + "resolved": "https://registry.npmjs.org/load-tsconfig/-/load-tsconfig-0.2.5.tgz", + "integrity": "sha512-IXO6OCs9yg8tMKzfPZ1YmheJbZCiEsnBdcB03l0OcfK9prKnJb96siuHCr5Fl37/yo9DnKU+TLpxzTUspw9shg==", + "dev": true, + "license": "MIT", + "engines": { + "node": "^12.20.0 || ^14.13.1 || >=16.0.0" + } + }, + "node_modules/locate-path": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-6.0.0.tgz", + "integrity": "sha512-iPZK6eYjbxRu3uB4/WZ3EsEIMJFMqAoopl3R+zuq0UjcAm/MO6KCweDgPfP3elTztoKP3KtnVHxTn2NHBSDVUw==", + "dev": true, + "license": "MIT", + "dependencies": { + "p-locate": "^5.0.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/lodash.sortby": { + "version": "4.7.0", + "resolved": "https://registry.npmjs.org/lodash.sortby/-/lodash.sortby-4.7.0.tgz", + "integrity": "sha512-HDWXG8isMntAyRF5vZ7xKuEvOhT4AhlRt/3czTSjvGUxjYCBVRQY48ViDHyfYz9VIoBkW4TMGQNapx+l3RUwdA==", + "dev": true, + "license": "MIT" + }, + "node_modules/log-symbols": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/log-symbols/-/log-symbols-4.1.0.tgz", + "integrity": "sha512-8XPvpAA8uyhfteu8pIvQxpJZ7SYYdpUivZpGy6sFsBuKRY/7rQGavedeB8aK+Zkyq6upMFVL/9AW6vOYzfRyLg==", + "dev": true, + "license": "MIT", + "dependencies": { + "chalk": "^4.1.0", + "is-unicode-supported": "^0.1.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/loupe": { + "version": "2.3.7", + "resolved": "https://registry.npmjs.org/loupe/-/loupe-2.3.7.tgz", + "integrity": "sha512-zSMINGVYkdpYSOBmLi0D1Uo7JU9nVdQKrHxC8eYlV+9YKK9WePqAlL7lSlorG/U2Fw1w0hTBmaa/jrQ3UbPHtA==", + "dev": true, + "license": "MIT", + "dependencies": { + "get-func-name": "^2.0.1" + } + }, + "node_modules/make-error": { + "version": "1.3.6", + "resolved": "https://registry.npmjs.org/make-error/-/make-error-1.3.6.tgz", + "integrity": "sha512-s8UhlNe7vPKomQhC1qFelMokr/Sc3AgNbso3n74mVPA5LTZwkB9NlXf4XPamLxJE8h0gh73rM94xvwRT2CVInw==", + "dev": true, + "license": "ISC" + }, + "node_modules/merge-stream": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/merge-stream/-/merge-stream-2.0.0.tgz", + "integrity": "sha512-abv/qOcuPfk3URPfDzmZU1LKmuw8kT+0nIHvKrKgFrwifol/doWcdA4ZqsWQ8ENrFKkd67Mfpo/LovbIUsbt3w==", + "dev": true, + "license": "MIT" + }, + "node_modules/merge2": { + "version": "1.4.1", + "resolved": "https://registry.npmjs.org/merge2/-/merge2-1.4.1.tgz", + "integrity": "sha512-8q7VEgMJW4J8tcfVPy8g09NcQwZdbwFEqhe/WZkoIzjn/3TGDwtOCYtXGxA3O8tPzpczCCDgv+P2P5y00ZJOOg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 8" + } + }, + "node_modules/micromatch": { + "version": "4.0.8", + "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-4.0.8.tgz", + "integrity": "sha512-PXwfBhYu0hBCPw8Dn0E+WDYb7af3dSLVWKi3HGv84IdF4TyFoC0ysxFd0Goxw7nSv4T/PzEJQxsYsEiFCKo2BA==", + "dev": true, + "license": "MIT", + "dependencies": { + "braces": "^3.0.3", + "picomatch": "^2.3.1" + }, + "engines": { + "node": ">=8.6" + } + }, + "node_modules/micromatch/node_modules/picomatch": { + "version": "2.3.2", + "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.3.2.tgz", + "integrity": "sha512-V7+vQEJ06Z+c5tSye8S+nHUfI51xoXIXjHQ99cQtKUkQqqO1kO/KCJUfZXuB47h/YBlDhah2H3hdUGXn8ie0oA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8.6" + }, + "funding": { + "url": "https://github.com/sponsors/jonschlinkert" + } + }, + "node_modules/mimic-fn": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/mimic-fn/-/mimic-fn-2.1.0.tgz", + "integrity": "sha512-OqbOk5oEQeAZ8WXWydlu9HJjz9WVdEIvamMCcXmuqUYjTknH/sqsWvhQ3vgwKFRR1HpjvNBKQ37nbJgYzGqGcg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6" + } + }, + "node_modules/minimatch": { + "version": "5.1.9", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-5.1.9.tgz", + "integrity": "sha512-7o1wEA2RyMP7Iu7GNba9vc0RWWGACJOCZBJX2GJWip0ikV+wcOsgVuY9uE8CPiyQhkGFSlhuSkZPavN7u1c2Fw==", + "dev": true, + "license": "ISC", + "dependencies": { + "brace-expansion": "^2.0.1" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/minimist": { + "version": "1.2.8", + "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.8.tgz", + "integrity": "sha512-2yyAR8qBkN3YuheJanUpWC5U3bb5osDywNB8RzDVlDwDHbocAJveqqj1u8+SVD7jkWT4yvsHCpWqqWqAxb0zCA==", + "dev": true, + "license": "MIT", + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/mkdirp": { + "version": "0.5.6", + "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.6.tgz", + "integrity": "sha512-FP+p8RB8OWpF3YZBCrP5gtADmtXApB5AMLn+vdyA+PyxCjrCs00mjyUozssO33cwDeT3wNGdLxJ5M//YqtHAJw==", + "dev": true, + "license": "MIT", + "dependencies": { + "minimist": "^1.2.6" + }, + "bin": { + "mkdirp": "bin/cmd.js" + } + }, + "node_modules/mocha": { + "version": "10.8.2", + "resolved": "https://registry.npmjs.org/mocha/-/mocha-10.8.2.tgz", + "integrity": "sha512-VZlYo/WE8t1tstuRmqgeyBgCbJc/lEdopaa+axcKzTBJ+UIdlAB9XnmvTCAH4pwR4ElNInaedhEBmZD8iCSVEg==", + "dev": true, + "license": "MIT", + "dependencies": { + "ansi-colors": "^4.1.3", + "browser-stdout": "^1.3.1", + "chokidar": "^3.5.3", + "debug": "^4.3.5", + "diff": "^5.2.0", + "escape-string-regexp": "^4.0.0", + "find-up": "^5.0.0", + "glob": "^8.1.0", + "he": "^1.2.0", + "js-yaml": "^4.1.0", + "log-symbols": "^4.1.0", + "minimatch": "^5.1.6", + "ms": "^2.1.3", + "serialize-javascript": "^6.0.2", + "strip-json-comments": "^3.1.1", + "supports-color": "^8.1.1", + "workerpool": "^6.5.1", + "yargs": "^16.2.0", + "yargs-parser": "^20.2.9", + "yargs-unparser": "^2.0.0" + }, + "bin": { + "_mocha": "bin/_mocha", + "mocha": "bin/mocha.js" + }, + "engines": { + "node": ">= 14.0.0" + } + }, + "node_modules/mocha/node_modules/supports-color": { + "version": "8.1.1", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-8.1.1.tgz", + "integrity": "sha512-MpUEN2OodtUzxvKQl72cUF7RQ5EiHsGvSsVG0ia9c5RbWGL2CI4C7EpPS8UTBIplnlzZiNuV56w+FuNxy3ty2Q==", + "dev": true, + "license": "MIT", + "dependencies": { + "has-flag": "^4.0.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/chalk/supports-color?sponsor=1" + } + }, + "node_modules/ms": { + "version": "2.1.3", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz", + "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==", + "dev": true, + "license": "MIT" + }, + "node_modules/mz": { + "version": "2.7.0", + "resolved": "https://registry.npmjs.org/mz/-/mz-2.7.0.tgz", + "integrity": "sha512-z81GNO7nnYMEhrGh9LeymoE4+Yr0Wn5McHIZMK5cfQCl+NDX08sCZgUc9/6MHni9IWuFLm1Z3HTCXu2z9fN62Q==", + "dev": true, + "license": "MIT", + "dependencies": { + "any-promise": "^1.0.0", + "object-assign": "^4.0.1", + "thenify-all": "^1.0.0" + } + }, + "node_modules/normalize-path": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-3.0.0.tgz", + "integrity": "sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/npm-run-path": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/npm-run-path/-/npm-run-path-4.0.1.tgz", + "integrity": "sha512-S48WzZW777zhNIrn7gxOlISNAqi9ZC/uQFnRdbeIHhZhCA6UqpkOT8T1G7BvfdgP4Er8gF4sUbaS0i7QvIfCWw==", + "dev": true, + "license": "MIT", + "dependencies": { + "path-key": "^3.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/object-assign": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/object-assign/-/object-assign-4.1.1.tgz", + "integrity": "sha512-rJgTQnkUnH1sFw8yT6VSU3zD3sWmu6sZhIseY8VX+GRu3P6F7Fu+JNDoXfklElbLJSnc3FUQHVe4cU5hj+BcUg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/once": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", + "integrity": "sha512-lNaJgI+2Q5URQBkccEKHTQOPaXdUxnZZElQTZY0MFUAuaEqe1E+Nyvgdz/aIyNi6Z9MzO5dv1H8n58/GELp3+w==", + "dev": true, + "license": "ISC", + "dependencies": { + "wrappy": "1" + } + }, + "node_modules/onetime": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/onetime/-/onetime-5.1.2.tgz", + "integrity": "sha512-kbpaSSGJTWdAY5KPVeMOKXSrPtr8C8C7wodJbcsd51jRnmD+GZu8Y0VoU6Dm5Z4vWr0Ig/1NKuWRKf7j5aaYSg==", + "dev": true, + "license": "MIT", + "dependencies": { + "mimic-fn": "^2.1.0" + }, + "engines": { + "node": ">=6" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/p-limit": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-3.1.0.tgz", + "integrity": "sha512-TYOanM3wGwNGsZN2cVTYPArw454xnXj5qmWF1bEoAc4+cU/ol7GVh7odevjp1FNHduHc3KZMcFduxU5Xc6uJRQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "yocto-queue": "^0.1.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/p-locate": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-5.0.0.tgz", + "integrity": "sha512-LaNjtRWUBY++zB5nE/NwcaoMylSPk+S+ZHNB1TzdbMJMny6dynpAGt7X/tl/QYq3TIeE6nxHppbo2LGymrG5Pw==", + "dev": true, + "license": "MIT", + "dependencies": { + "p-limit": "^3.0.2" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/path-exists": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-4.0.0.tgz", + "integrity": "sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/path-key": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/path-key/-/path-key-3.1.1.tgz", + "integrity": "sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/path-type": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/path-type/-/path-type-4.0.0.tgz", + "integrity": "sha512-gDKb8aZMDeD/tZWs9P6+q0J9Mwkdl6xMV8TjnGP3qJVJ06bdMgkbBlLU8IdfOsIsFz2BW1rNVT3XuNEl8zPAvw==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/pathval": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/pathval/-/pathval-1.1.1.tgz", + "integrity": "sha512-Dp6zGqpTdETdR63lehJYPeIOqpiNBNtc7BpWSLrOje7UaIsE5aY92r/AunQA7rsXvet3lrJ3JnZX29UPTKXyKQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": "*" + } + }, + "node_modules/picocolors": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/picocolors/-/picocolors-1.1.1.tgz", + "integrity": "sha512-xceH2snhtb5M9liqDsmEw56le376mTZkEX/jEb/RxNFyegNul7eNslCXP9FDj/Lcu0X8KEyMceP2ntpaHrDEVA==", + "dev": true, + "license": "ISC" + }, + "node_modules/picomatch": { + "version": "4.0.4", + "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-4.0.4.tgz", + "integrity": "sha512-QP88BAKvMam/3NxH6vj2o21R6MjxZUAd6nlwAS/pnGvN9IVLocLHxGYIzFhg6fUQ+5th6P4dv4eW9jX3DSIj7A==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/jonschlinkert" + } + }, + "node_modules/pirates": { + "version": "4.0.7", + "resolved": "https://registry.npmjs.org/pirates/-/pirates-4.0.7.tgz", + "integrity": "sha512-TfySrs/5nm8fQJDcBDuUng3VOUKsd7S+zqvbOTiGXHfxX4wK31ard+hoNuvkicM/2YFzlpDgABOevKSsB4G/FA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 6" + } + }, + "node_modules/pretty-format": { + "version": "30.4.1", + "resolved": "https://registry.npmjs.org/pretty-format/-/pretty-format-30.4.1.tgz", + "integrity": "sha512-K6KiKMHTL4jjX4u3Kir2EW07nRfcqVTXIImx50wbjHQTcZPgg+gjVeNTIT3l3L1Rd4UefxfogquC9J37SoFyyw==", + "dev": true, + "license": "MIT", + "dependencies": { + "@jest/schemas": "30.4.1", + "ansi-styles": "^5.2.0", + "react-is-18": "npm:react-is@^18.3.1", + "react-is-19": "npm:react-is@^19.2.5" + }, + "engines": { + "node": "^18.14.0 || ^20.0.0 || ^22.0.0 || >=24.0.0" + } + }, + "node_modules/pretty-format/node_modules/ansi-styles": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-5.2.0.tgz", + "integrity": "sha512-Cxwpt2SfTzTtXcfOlzGEee8O+c+MmUgGrNiBcXnuWxuFJHe6a5Hz7qwhwe5OgaSYI0IJvkLqWX1ASG+cJOkEiA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/chalk/ansi-styles?sponsor=1" + } + }, + "node_modules/punycode": { + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.3.1.tgz", + "integrity": "sha512-vYt7UD1U9Wg6138shLtLOvdAu+8DsC/ilFtEVHcH+wydcSpNE20AfSOduf6MkRFahL5FY7X1oU7nKVZFtfq8Fg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6" + } + }, + "node_modules/querystringify": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/querystringify/-/querystringify-2.2.0.tgz", + "integrity": "sha512-FIqgj2EUvTa7R50u0rGsyTftzjYmv/a3hO345bZNrqabNqjtgiDMgmo4mkUjd+nzU5oF3dClKqFIPUKybUyqoQ==", + "license": "MIT" + }, + "node_modules/queue-microtask": { + "version": "1.2.3", + "resolved": "https://registry.npmjs.org/queue-microtask/-/queue-microtask-1.2.3.tgz", + "integrity": "sha512-NuaNSa6flKT5JaSYQzJok04JzTL1CA6aGhv5rfLW3PgqA+M2ChpZQnAC8h8i4ZFkBS8X5RqkDBHA7r4hej3K9A==", + "dev": true, + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ], + "license": "MIT" + }, + "node_modules/randombytes": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/randombytes/-/randombytes-2.1.0.tgz", + "integrity": "sha512-vYl3iOX+4CKUWuxGi9Ukhie6fsqXqS9FE2Zaic4tNFD2N2QQaXOMFbuKK4QmDHC0JO6B1Zp41J0LpT0oR68amQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "safe-buffer": "^5.1.0" + } + }, + "node_modules/react-is-18": { + "name": "react-is", + "version": "18.3.1", + "resolved": "https://registry.npmjs.org/react-is/-/react-is-18.3.1.tgz", + "integrity": "sha512-/LLMVyas0ljjAtoYiPqYiL8VWXzUUdThrmU5+n20DZv+a+ClRoevUzw5JxU+Ieh5/c87ytoTBV9G1FiKfNJdmg==", + "dev": true, + "license": "MIT" + }, + "node_modules/react-is-19": { + "name": "react-is", + "version": "19.2.6", + "resolved": "https://registry.npmjs.org/react-is/-/react-is-19.2.6.tgz", + "integrity": "sha512-XjBR15BhXuylgWGuslhDKqlSayuqvqBX91BP8pauG8kd1zY8kotkNWbXksTCNRarse4kuGbe2kIY05ARtwNIvw==", + "dev": true, + "license": "MIT" + }, + "node_modules/readdirp": { + "version": "3.6.0", + "resolved": "https://registry.npmjs.org/readdirp/-/readdirp-3.6.0.tgz", + "integrity": "sha512-hOS089on8RduqdbhvQ5Z37A0ESjsqz6qnRcffsMU3495FuTdqSm+7bhJ29JvIOsBDEEnan5DPu9t3To9VRlMzA==", + "dev": true, + "license": "MIT", + "dependencies": { + "picomatch": "^2.2.1" + }, + "engines": { + "node": ">=8.10.0" + } + }, + "node_modules/readdirp/node_modules/picomatch": { + "version": "2.3.2", + "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.3.2.tgz", + "integrity": "sha512-V7+vQEJ06Z+c5tSye8S+nHUfI51xoXIXjHQ99cQtKUkQqqO1kO/KCJUfZXuB47h/YBlDhah2H3hdUGXn8ie0oA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8.6" + }, + "funding": { + "url": "https://github.com/sponsors/jonschlinkert" + } + }, + "node_modules/require-directory": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/require-directory/-/require-directory-2.1.1.tgz", + "integrity": "sha512-fGxEI7+wsG9xrvdjsrlmL22OMTTiHRwAMroiEeMgq8gzoLC/PQr7RsRDSTLUg/bZAZtF+TVIkHc6/4RIKrui+Q==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/requires-port": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/requires-port/-/requires-port-1.0.0.tgz", + "integrity": "sha512-KigOCHcocU3XODJxsu8i/j8T9tzT4adHiecwORRQ0ZZFcp7ahwXuRU1m+yuO90C5ZUyGeGfocHDI14M3L3yDAQ==", + "license": "MIT" + }, + "node_modules/resolve-from": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-5.0.0.tgz", + "integrity": "sha512-qYg9KP24dD5qka9J47d0aVky0N+b4fTU89LN9iDnjB5waksiC49rvMB0PrUJQGoTmH50XPiqOvAjDfaijGxYZw==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/reusify": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/reusify/-/reusify-1.1.0.tgz", + "integrity": "sha512-g6QUff04oZpHs0eG5p83rFLhHeV00ug/Yf9nZM6fLeUrPguBTkTQOdpAWWspMh55TZfVQDPaN3NQJfbVRAxdIw==", + "dev": true, + "license": "MIT", + "engines": { + "iojs": ">=1.0.0", + "node": ">=0.10.0" + } + }, + "node_modules/rollup": { + "version": "3.30.0", + "resolved": "https://registry.npmjs.org/rollup/-/rollup-3.30.0.tgz", + "integrity": "sha512-kQvGasUgN+AlWGliFn2POSajRQEsULVYFGTvOZmK06d7vCD+YhZztt70kGk3qaeAXeWYL5eO7zx+rAubBc55eA==", + "dev": true, + "license": "MIT", + "bin": { + "rollup": "dist/bin/rollup" + }, + "engines": { + "node": ">=14.18.0", + "npm": ">=8.0.0" + }, + "optionalDependencies": { + "fsevents": "~2.3.2" + } + }, + "node_modules/run-parallel": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/run-parallel/-/run-parallel-1.2.0.tgz", + "integrity": "sha512-5l4VyZR86LZ/lDxZTR6jqL8AFE2S0IFLMP26AbjsLVADxHdhB/c0GUsH+y39UfCi3dzz8OlQuPmnaJOMoDHQBA==", + "dev": true, + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ], + "license": "MIT", + "dependencies": { + "queue-microtask": "^1.2.2" + } + }, + "node_modules/safe-buffer": { + "version": "5.2.1", + "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.1.tgz", + "integrity": "sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==", + "dev": true, + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ], + "license": "MIT" + }, + "node_modules/serialize-javascript": { + "version": "6.0.2", + "resolved": "https://registry.npmjs.org/serialize-javascript/-/serialize-javascript-6.0.2.tgz", + "integrity": "sha512-Saa1xPByTTq2gdeFZYLLo+RFE35NHZkAbqZeWNd3BpzppeVisAqpDjcp8dyf6uIvEqJRd46jemmyA4iFIeVk8g==", + "dev": true, + "license": "BSD-3-Clause", + "dependencies": { + "randombytes": "^2.1.0" + } + }, + "node_modules/shebang-command": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-2.0.0.tgz", + "integrity": "sha512-kHxr2zZpYtdmrN1qDjrrX/Z1rR1kG8Dx+gkpK1G4eXmvXswmcE1hTWBWYUzlraYw1/yZp6YuDY77YtvbN0dmDA==", + "dev": true, + "license": "MIT", + "dependencies": { + "shebang-regex": "^3.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/shebang-regex": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-3.0.0.tgz", + "integrity": "sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/signal-exit": { + "version": "3.0.7", + "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.7.tgz", + "integrity": "sha512-wnD2ZE+l+SPC/uoS0vXeE9L1+0wuaMqKlfz9AMUo38JsyLSBWSFcHR1Rri62LZc12vLr1gb3jl7iwQhgwpAbGQ==", + "dev": true, + "license": "ISC" + }, + "node_modules/slash": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/slash/-/slash-3.0.0.tgz", + "integrity": "sha512-g9Q1haeby36OSStwb4ntCGGGaKsaVSjQ68fBxoQcutl5fS1vuY18H3wSt3jFyFtrkx+Kz0V1G85A4MyAdDMi2Q==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/source-map": { + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", + "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", + "dev": true, + "license": "BSD-3-Clause", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/source-map-support": { + "version": "0.5.21", + "resolved": "https://registry.npmjs.org/source-map-support/-/source-map-support-0.5.21.tgz", + "integrity": "sha512-uBHU3L3czsIyYXKX88fdrGovxdSCoTGDRZ6SYXtSRxLZUzHg5P/66Ht6uoUlHu9EZod+inXhKo3qQgwXUT/y1w==", + "dev": true, + "license": "MIT", + "dependencies": { + "buffer-from": "^1.0.0", + "source-map": "^0.6.0" + } + }, + "node_modules/stack-utils": { + "version": "2.0.6", + "resolved": "https://registry.npmjs.org/stack-utils/-/stack-utils-2.0.6.tgz", + "integrity": "sha512-XlkWvfIm6RmsWtNJx+uqtKLS8eqFbxUg0ZzLXqY0caEy9l7hruX8IpiDnjsLavoBgqCCR71TqWO8MaXYheJ3RQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "escape-string-regexp": "^2.0.0" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/stack-utils/node_modules/escape-string-regexp": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-2.0.0.tgz", + "integrity": "sha512-UpzcLCXolUWcNu5HtVMHYdXJjArjsF9C0aNnquZYY4uW/Vu0miy5YoWvbV345HauVvcAUnpRuhMMcqTcGOY2+w==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/string-width": { + "version": "4.2.3", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz", + "integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==", + "dev": true, + "license": "MIT", + "dependencies": { + "emoji-regex": "^8.0.0", + "is-fullwidth-code-point": "^3.0.0", + "strip-ansi": "^6.0.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/strip-ansi": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", + "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", + "dev": true, + "license": "MIT", + "dependencies": { + "ansi-regex": "^5.0.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/strip-bom": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/strip-bom/-/strip-bom-3.0.0.tgz", + "integrity": "sha512-vavAMRXOgBVNF6nyEEmL3DBK19iRpDcoIwW+swQ+CbGiu7lju6t+JklA1MHweoWtadgt4ISVUsXLyDq34ddcwA==", + "dev": true, + "license": "MIT", + "optional": true, + "engines": { + "node": ">=4" + } + }, + "node_modules/strip-final-newline": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/strip-final-newline/-/strip-final-newline-2.0.0.tgz", + "integrity": "sha512-BrpvfNAE3dcvq7ll3xVumzjKjZQ5tI1sEUIKr3Uoks0XUl45St3FlatVqef9prk4jRDzhW6WZg+3bk93y6pLjA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6" + } + }, + "node_modules/strip-json-comments": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-3.1.1.tgz", + "integrity": "sha512-6fPc+R4ihwqP6N/aIv2f1gMH8lOVtWQHoqC4yK6oSDVVocumAsfCqjkXnqiYMhmMwS/mEHLp7Vehlt3ql6lEig==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/sucrase": { + "version": "3.35.1", + "resolved": "https://registry.npmjs.org/sucrase/-/sucrase-3.35.1.tgz", + "integrity": "sha512-DhuTmvZWux4H1UOnWMB3sk0sbaCVOoQZjv8u1rDoTV0HTdGem9hkAZtl4JZy8P2z4Bg0nT+YMeOFyVr4zcG5Tw==", + "dev": true, + "license": "MIT", + "dependencies": { + "@jridgewell/gen-mapping": "^0.3.2", + "commander": "^4.0.0", + "lines-and-columns": "^1.1.6", + "mz": "^2.7.0", + "pirates": "^4.0.1", + "tinyglobby": "^0.2.11", + "ts-interface-checker": "^0.1.9" + }, + "bin": { + "sucrase": "bin/sucrase", + "sucrase-node": "bin/sucrase-node" + }, + "engines": { + "node": ">=16 || 14 >=14.17" + } + }, + "node_modules/supports-color": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", + "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", + "dev": true, + "license": "MIT", + "dependencies": { + "has-flag": "^4.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/thenify": { + "version": "3.3.1", + "resolved": "https://registry.npmjs.org/thenify/-/thenify-3.3.1.tgz", + "integrity": "sha512-RVZSIV5IG10Hk3enotrhvz0T9em6cyHBLkH/YAZuKqd8hRkKhSfCGIcP2KUY0EPxndzANBmNllzWPwak+bheSw==", + "dev": true, + "license": "MIT", + "dependencies": { + "any-promise": "^1.0.0" + } + }, + "node_modules/thenify-all": { + "version": "1.6.0", + "resolved": "https://registry.npmjs.org/thenify-all/-/thenify-all-1.6.0.tgz", + "integrity": "sha512-RNxQH/qI8/t3thXJDwcstUO4zeqo64+Uy/+sNVRBx4Xn2OX+OZ9oP+iJnNFqplFra2ZUVeKCSa2oVWi3T4uVmA==", + "dev": true, + "license": "MIT", + "dependencies": { + "thenify": ">= 3.1.0 < 4" + }, + "engines": { + "node": ">=0.8" + } + }, + "node_modules/tinyglobby": { + "version": "0.2.17", + "resolved": "https://registry.npmjs.org/tinyglobby/-/tinyglobby-0.2.17.tgz", + "integrity": "sha512-wXR/dYpcqKmfWpEdZjiKJOwCNFndD0DMnrW/cYjVGttEkBfVgcLFHoNrlj47mjOVic9yyNu65alsgF4NQyTa2g==", + "dev": true, + "license": "MIT", + "dependencies": { + "fdir": "^6.5.0", + "picomatch": "^4.0.4" + }, + "engines": { + "node": ">=12.0.0" + }, + "funding": { + "url": "https://github.com/sponsors/SuperchupuDev" + } + }, + "node_modules/to-regex-range": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-5.0.1.tgz", + "integrity": "sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "is-number": "^7.0.0" + }, + "engines": { + "node": ">=8.0" + } + }, + "node_modules/tr46": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/tr46/-/tr46-1.0.1.tgz", + "integrity": "sha512-dTpowEjclQ7Kgx5SdBkqRzVhERQXov8/l9Ft9dVM9fmg0W0KQSVaXX9T4i6twCPNtYiZM53lpSSUAwJbFPOHxA==", + "dev": true, + "license": "MIT", + "dependencies": { + "punycode": "^2.1.0" + } + }, + "node_modules/tree-kill": { + "version": "1.2.2", + "resolved": "https://registry.npmjs.org/tree-kill/-/tree-kill-1.2.2.tgz", + "integrity": "sha512-L0Orpi8qGpRG//Nd+H90vFB+3iHnue1zSSGmNOOCh1GLJ7rUKVwV2HvijphGQS2UmhUZewS9VgvxYIdgr+fG1A==", + "dev": true, + "license": "MIT", + "bin": { + "tree-kill": "cli.js" + } + }, + "node_modules/ts-interface-checker": { + "version": "0.1.13", + "resolved": "https://registry.npmjs.org/ts-interface-checker/-/ts-interface-checker-0.1.13.tgz", + "integrity": "sha512-Y/arvbn+rrz3JCKl9C4kVNfTfSm2/mEp5FSz5EsZSANGPSlQrpRI5M4PKF+mJnE52jOO90PnPSc3Ur3bTQw0gA==", + "dev": true, + "license": "Apache-2.0" + }, + "node_modules/ts-mocha": { + "version": "10.1.0", + "resolved": "https://registry.npmjs.org/ts-mocha/-/ts-mocha-10.1.0.tgz", + "integrity": "sha512-T0C0Xm3/WqCuF2tpa0GNGESTBoKZaiqdUP8guNv4ZY316AFXlyidnrzQ1LUrCT0Wb1i3J0zFTgOh/55Un44WdA==", + "dev": true, + "license": "MIT", + "dependencies": { + "ts-node": "7.0.1" + }, + "bin": { + "ts-mocha": "bin/ts-mocha" + }, + "engines": { + "node": ">= 6.X.X" + }, + "optionalDependencies": { + "tsconfig-paths": "^3.5.0" + }, + "peerDependencies": { + "mocha": "^3.X.X || ^4.X.X || ^5.X.X || ^6.X.X || ^7.X.X || ^8.X.X || ^9.X.X || ^10.X.X || ^11.X.X" + } + }, + "node_modules/ts-node": { + "version": "7.0.1", + "resolved": "https://registry.npmjs.org/ts-node/-/ts-node-7.0.1.tgz", + "integrity": "sha512-BVwVbPJRspzNh2yfslyT1PSbl5uIk03EZlb493RKHN4qej/D06n1cEhjlOJG69oFsE7OT8XjpTUcYf6pKTLMhw==", + "dev": true, + "license": "MIT", + "dependencies": { + "arrify": "^1.0.0", + "buffer-from": "^1.1.0", + "diff": "^3.1.0", + "make-error": "^1.1.1", + "minimist": "^1.2.0", + "mkdirp": "^0.5.1", + "source-map-support": "^0.5.6", + "yn": "^2.0.0" + }, + "bin": { + "ts-node": "dist/bin.js" + }, + "engines": { + "node": ">=4.2.0" + } + }, + "node_modules/ts-node/node_modules/diff": { + "version": "3.5.1", + "resolved": "https://registry.npmjs.org/diff/-/diff-3.5.1.tgz", + "integrity": "sha512-Z3u54A8qGyqFOSr2pk0ijYs8mOE9Qz8kTvtKeBI+upoG9j04Sq+oI7W8zAJiQybDcESET8/uIdHzs0p3k4fZlw==", + "dev": true, + "license": "BSD-3-Clause", + "engines": { + "node": ">=0.3.1" + } + }, + "node_modules/tsconfig-paths": { + "version": "3.15.0", + "resolved": "https://registry.npmjs.org/tsconfig-paths/-/tsconfig-paths-3.15.0.tgz", + "integrity": "sha512-2Ac2RgzDe/cn48GvOe3M+o82pEFewD3UPbyoUHHdKasHwJKjds4fLXWf/Ux5kATBKN20oaFGu+jbElp1pos0mg==", + "dev": true, + "license": "MIT", + "optional": true, + "dependencies": { + "@types/json5": "^0.0.29", + "json5": "^1.0.2", + "minimist": "^1.2.6", + "strip-bom": "^3.0.0" + } + }, + "node_modules/tsup": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/tsup/-/tsup-7.2.0.tgz", + "integrity": "sha512-vDHlczXbgUvY3rWvqFEbSqmC1L7woozbzngMqTtL2PGBODTtWlRwGDDawhvWzr5c1QjKe4OAKqJGfE1xeXUvtQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "bundle-require": "^4.0.0", + "cac": "^6.7.12", + "chokidar": "^3.5.1", + "debug": "^4.3.1", + "esbuild": "^0.18.2", + "execa": "^5.0.0", + "globby": "^11.0.3", + "joycon": "^3.0.1", + "postcss-load-config": "^4.0.1", + "resolve-from": "^5.0.0", + "rollup": "^3.2.5", + "source-map": "0.8.0-beta.0", + "sucrase": "^3.20.3", + "tree-kill": "^1.2.2" + }, + "bin": { + "tsup": "dist/cli-default.js", + "tsup-node": "dist/cli-node.js" + }, + "engines": { + "node": ">=16.14" + }, + "peerDependencies": { + "@swc/core": "^1", + "postcss": "^8.4.12", + "typescript": ">=4.1.0" + }, + "peerDependenciesMeta": { + "@swc/core": { + "optional": true + }, + "postcss": { + "optional": true + }, + "typescript": { + "optional": true + } + } + }, + "node_modules/tsup/node_modules/diff": { + "version": "4.0.4", + "resolved": "https://registry.npmjs.org/diff/-/diff-4.0.4.tgz", + "integrity": "sha512-X07nttJQkwkfKfvTPG/KSnE2OMdcUCao6+eXF3wmnIQRn2aPAHH3VxDbDOdegkd6JbPsXqShpvEOHfAT+nCNwQ==", + "dev": true, + "license": "BSD-3-Clause", + "optional": true, + "peer": true, + "engines": { + "node": ">=0.3.1" + } + }, + "node_modules/tsup/node_modules/postcss-load-config": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/postcss-load-config/-/postcss-load-config-4.0.2.tgz", + "integrity": "sha512-bSVhyJGL00wMVoPUzAVAnbEoWyqRxkjv64tUl427SKnPrENtq6hJwUojroMz2VB+Q1edmi4IfrAPpami5VVgMQ==", + "dev": true, + "funding": [ + { + "type": "opencollective", + "url": "https://opencollective.com/postcss/" + }, + { + "type": "github", + "url": "https://github.com/sponsors/ai" + } + ], + "license": "MIT", + "dependencies": { + "lilconfig": "^3.0.0", + "yaml": "^2.3.4" + }, + "engines": { + "node": ">= 14" + }, + "peerDependencies": { + "postcss": ">=8.0.9", + "ts-node": ">=9.0.0" + }, + "peerDependenciesMeta": { + "postcss": { + "optional": true + }, + "ts-node": { + "optional": true + } + } + }, + "node_modules/tsup/node_modules/source-map": { + "version": "0.8.0-beta.0", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.8.0-beta.0.tgz", + "integrity": "sha512-2ymg6oRBpebeZi9UUNsgQ89bhx01TcTkmNTGnNO88imTmbSgy4nfujrgVEFKWpMTEGA11EDkTt7mqObTPdigIA==", + "deprecated": "The work that was done in this beta branch won't be included in future versions", + "dev": true, + "license": "BSD-3-Clause", + "dependencies": { + "whatwg-url": "^7.0.0" + }, + "engines": { + "node": ">= 8" + } + }, + "node_modules/tsup/node_modules/ts-node": { + "version": "10.9.2", + "resolved": "https://registry.npmjs.org/ts-node/-/ts-node-10.9.2.tgz", + "integrity": "sha512-f0FFpIdcHgn8zcPSbf1dRevwt047YMnaiJM3u2w2RewrB+fob/zePZcrOyQoLMMO7aBIddLcQIEK5dYjkLnGrQ==", + "dev": true, + "license": "MIT", + "optional": true, + "peer": true, + "dependencies": { + "@cspotcode/source-map-support": "^0.8.0", + "@tsconfig/node10": "^1.0.7", + "@tsconfig/node12": "^1.0.7", + "@tsconfig/node14": "^1.0.0", + "@tsconfig/node16": "^1.0.2", + "acorn": "^8.4.1", + "acorn-walk": "^8.1.1", + "arg": "^4.1.0", + "create-require": "^1.1.0", + "diff": "^4.0.1", + "make-error": "^1.1.1", + "v8-compile-cache-lib": "^3.0.1", + "yn": "3.1.1" + }, + "bin": { + "ts-node": "dist/bin.js", + "ts-node-cwd": "dist/bin-cwd.js", + "ts-node-esm": "dist/bin-esm.js", + "ts-node-script": "dist/bin-script.js", + "ts-node-transpile-only": "dist/bin-transpile.js", + "ts-script": "dist/bin-script-deprecated.js" + }, + "peerDependencies": { + "@swc/core": ">=1.2.50", + "@swc/wasm": ">=1.2.50", + "@types/node": "*", + "typescript": ">=2.7" + }, + "peerDependenciesMeta": { + "@swc/core": { + "optional": true + }, + "@swc/wasm": { + "optional": true + } + } + }, + "node_modules/tsup/node_modules/yn": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/yn/-/yn-3.1.1.tgz", + "integrity": "sha512-Ux4ygGWsu2c7isFWe8Yu1YluJmqVhxqK2cLXNQA5AcC3QfbGNpM7fu0Y8b/z16pXLnFxZYvWhd3fhBY9DLmC6Q==", + "dev": true, + "license": "MIT", + "optional": true, + "peer": true, + "engines": { + "node": ">=6" + } + }, + "node_modules/type-detect": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/type-detect/-/type-detect-4.1.0.tgz", + "integrity": "sha512-Acylog8/luQ8L7il+geoSxhEkazvkslg7PSNKOX59mbB9cOveP5aq9h74Y7YU8yDpJwetzQQrfIwtf4Wp4LKcw==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=4" + } + }, + "node_modules/typescript": { + "version": "4.9.5", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-4.9.5.tgz", + "integrity": "sha512-1FXk9E2Hm+QzZQ7z+McJiHL4NW1F2EzMu9Nq9i3zAaGqibafqYwCVU6WyWAuyQRRzOlxou8xZSyXLEN8oKj24g==", + "dev": true, + "license": "Apache-2.0", + "bin": { + "tsc": "bin/tsc", + "tsserver": "bin/tsserver" + }, + "engines": { + "node": ">=4.2.0" + } + }, + "node_modules/undici-types": { + "version": "7.24.6", + "resolved": "https://registry.npmjs.org/undici-types/-/undici-types-7.24.6.tgz", + "integrity": "sha512-WRNW+sJgj5OBN4/0JpHFqtqzhpbnV0GuB+OozA9gCL7a993SmU+1JBZCzLNxYsbMfIeDL+lTsphD5jN5N+n0zg==", + "dev": true, + "license": "MIT" + }, + "node_modules/url-parse": { + "version": "1.5.10", + "resolved": "https://registry.npmjs.org/url-parse/-/url-parse-1.5.10.tgz", + "integrity": "sha512-WypcfiRhfeUP9vvF0j6rw0J3hrWrw6iZv3+22h6iRMJ/8z1Tj6XfLP4DsUix5MhMPnXpiHDoKyoZ/bdCkwBCiQ==", + "license": "MIT", + "dependencies": { + "querystringify": "^2.1.1", + "requires-port": "^1.0.0" + } + }, + "node_modules/v8-compile-cache-lib": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/v8-compile-cache-lib/-/v8-compile-cache-lib-3.0.1.tgz", + "integrity": "sha512-wa7YjyUGfNZngI/vtK0UHAN+lgDCxBPCylVXGp0zu59Fz5aiGtNXaq3DhIov063MorB+VfufLh3JlF2KdTK3xg==", + "dev": true, + "license": "MIT", + "optional": true, + "peer": true + }, + "node_modules/webidl-conversions": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/webidl-conversions/-/webidl-conversions-4.0.2.tgz", + "integrity": "sha512-YQ+BmxuTgd6UXZW3+ICGfyqRyHXVlD5GtQr5+qjiNW7bF0cqrzX500HVXPBOvgXb5YnzDd+h0zqyv61KUD7+Sg==", + "dev": true, + "license": "BSD-2-Clause" + }, + "node_modules/whatwg-fetch": { + "version": "3.6.20", + "resolved": "https://registry.npmjs.org/whatwg-fetch/-/whatwg-fetch-3.6.20.tgz", + "integrity": "sha512-EqhiFU6daOA8kpjOWTL0olhVOF3i7OrFzSYiGsEMB8GcXS+RrzauAERX65xMeNWVqxA6HXH2m69Z9LaKKdisfg==", + "license": "MIT" + }, + "node_modules/whatwg-url": { + "version": "7.1.0", + "resolved": "https://registry.npmjs.org/whatwg-url/-/whatwg-url-7.1.0.tgz", + "integrity": "sha512-WUu7Rg1DroM7oQvGWfOiAK21n74Gg+T4elXEQYkOhtyLeWiJFoOGLXPKI/9gzIie9CtwVLm8wtw6YJdKyxSjeg==", + "dev": true, + "license": "MIT", + "dependencies": { + "lodash.sortby": "^4.7.0", + "tr46": "^1.0.1", + "webidl-conversions": "^4.0.2" + } + }, + "node_modules/which": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/which/-/which-2.0.2.tgz", + "integrity": "sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA==", + "dev": true, + "license": "ISC", + "dependencies": { + "isexe": "^2.0.0" + }, + "bin": { + "node-which": "bin/node-which" + }, + "engines": { + "node": ">= 8" + } + }, + "node_modules/workerpool": { + "version": "6.5.1", + "resolved": "https://registry.npmjs.org/workerpool/-/workerpool-6.5.1.tgz", + "integrity": "sha512-Fs4dNYcsdpYSAfVxhnl1L5zTksjvOJxtC5hzMNl+1t9B8hTJTdKDyZ5ju7ztgPy+ft9tBFXoOlDNiOT9WUXZlA==", + "dev": true, + "license": "Apache-2.0" + }, + "node_modules/wrap-ansi": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-7.0.0.tgz", + "integrity": "sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==", + "dev": true, + "license": "MIT", + "dependencies": { + "ansi-styles": "^4.0.0", + "string-width": "^4.1.0", + "strip-ansi": "^6.0.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/chalk/wrap-ansi?sponsor=1" + } + }, + "node_modules/wrappy": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", + "integrity": "sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ==", + "dev": true, + "license": "ISC" + }, + "node_modules/y18n": { + "version": "5.0.8", + "resolved": "https://registry.npmjs.org/y18n/-/y18n-5.0.8.tgz", + "integrity": "sha512-0pfFzegeDWJHJIAmTLRP2DwHjdF5s7jo9tuztdQxAhINCdvS+3nGINqPd00AphqJR/0LhANUS6/+7SCb98YOfA==", + "dev": true, + "license": "ISC", + "engines": { + "node": ">=10" + } + }, + "node_modules/yaml": { + "version": "2.9.0", + "resolved": "https://registry.npmjs.org/yaml/-/yaml-2.9.0.tgz", + "integrity": "sha512-2AvhNX3mb8zd6Zy7INTtSpl1F15HW6Wnqj0srWlkKLcpYl/gMIMJiyuGq2KeI2YFxUPjdlB+3Lc10seMLtL4cA==", + "dev": true, + "license": "ISC", + "bin": { + "yaml": "bin.mjs" + }, + "engines": { + "node": ">= 14.6" + }, + "funding": { + "url": "https://github.com/sponsors/eemeli" + } + }, + "node_modules/yargs": { + "version": "16.2.0", + "resolved": "https://registry.npmjs.org/yargs/-/yargs-16.2.0.tgz", + "integrity": "sha512-D1mvvtDG0L5ft/jGWkLpG1+m0eQxOfaBvTNELraWj22wSVUMWxZUvYgJYcKh6jGGIkJFhH4IZPQhR4TKpc8mBw==", + "dev": true, + "license": "MIT", + "dependencies": { + "cliui": "^7.0.2", + "escalade": "^3.1.1", + "get-caller-file": "^2.0.5", + "require-directory": "^2.1.1", + "string-width": "^4.2.0", + "y18n": "^5.0.5", + "yargs-parser": "^20.2.2" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/yargs-parser": { + "version": "20.2.9", + "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-20.2.9.tgz", + "integrity": "sha512-y11nGElTIV+CT3Zv9t7VKl+Q3hTQoT9a1Qzezhhl6Rp21gJ/IVTW7Z3y9EWXhuUBC2Shnf+DX0antecpAwSP8w==", + "dev": true, + "license": "ISC", + "engines": { + "node": ">=10" + } + }, + "node_modules/yargs-unparser": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/yargs-unparser/-/yargs-unparser-2.0.0.tgz", + "integrity": "sha512-7pRTIA9Qc1caZ0bZ6RYRGbHJthJWuakf+WmHK0rVeLkNrrGhfoabBNdue6kdINI6r4if7ocq9aD/n7xwKOdzOA==", + "dev": true, + "license": "MIT", + "dependencies": { + "camelcase": "^6.0.0", + "decamelize": "^4.0.0", + "flat": "^5.0.2", + "is-plain-obj": "^2.1.0" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/yn": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/yn/-/yn-2.0.0.tgz", + "integrity": "sha512-uTv8J/wiWTgUTg+9vLTi//leUl5vDQS6uii/emeTb2ssY7vl6QWf2fFbIIGjnhjvbdKlU0ed7QPgY1htTC86jQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=4" + } + }, + "node_modules/yocto-queue": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/yocto-queue/-/yocto-queue-0.1.0.tgz", + "integrity": "sha512-rVksvsnNCdJ/ohGc6xgPwyN8eheCxsiLM8mxuE/t/mOVqJewPuO1miLpTHQiRgTKCLexL4MeAFVagts7HmNZ2Q==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + } + } +} diff --git a/sdks/typescript/package.json b/sdks/typescript/package.json new file mode 100644 index 000000000..cc89442be --- /dev/null +++ b/sdks/typescript/package.json @@ -0,0 +1,58 @@ +{ + "name": "@thoughtspot/rest-api-sdk", + "version": "2.25.0", + "description": "Api sdk for thoughtspot's public v2 rest api", + "keywords": [ + "fetch", + "typescript", + "rest", + "api", + "Thoughtspot" + ], + "author": "ThoughtSpot", + "email": "support@thoughtspot.com", + "license": "ThoughtSpot Development Tools End User License Agreement", + "main": "./dist/index.js", + "types": "./dist/index.d.ts", + "type": "module", + "module": "./dist/index.js", + "exports": { + ".": { + "import": "./dist/index.js", + "require": "./dist/index.cjs", + "types": "./dist/index.d.js" + } + }, + "typings": "./dist/index.d.ts", + "scripts": { + "build": "tsup index.ts --format esm,cjs --dts", + "test" : "ts-mocha ./tests/ThoughtSpotRestApiTest.ts --timeout 6000", + "prepublishOnly": "npm run build" + }, + "dependencies": { + "whatwg-fetch": "^3.0.0", + "es6-promise": "^4.2.4", + "url-parse": "^1.4.3" + }, + "devDependencies": { + "typescript": "^4.0", + "@types/url-parse": "1.4.4", + "@types/chai": "^4.3.5", + "@types/mocha": "^10.0.1", + "ts-mocha": "^10.0.0", + "@types/expect": "^24.3.0", + "@types/chai-as-promised": "^7.1.5", + "chai-as-promised": "^7.1.1", + "tsup": "^7.2.0", + "@swc/core": "^1.3.88", + "chai": "^4.3.7", + "mocha": "^10.2.0" + }, + "repository": { + "type": "git", + "url": "git+https://github.com/thoughtspot/rest-api-sdk.git" + }, + "publishConfig":{ + "registry":"https://registry.npmjs.org" + } +} \ No newline at end of file diff --git a/sdks/typescript/rxjsStub.ts b/sdks/typescript/rxjsStub.ts new file mode 100644 index 000000000..4c73715a2 --- /dev/null +++ b/sdks/typescript/rxjsStub.ts @@ -0,0 +1,27 @@ +export class Observable { + constructor(private promise: Promise) {} + + toPromise() { + return this.promise; + } + + pipe(callback: (value: T) => S | Promise): Observable { + return new Observable(this.promise.then(callback)); + } +} + +export function from(promise: Promise) { + return new Observable(promise); +} + +export function of(value: T) { + return new Observable(Promise.resolve(value)); +} + +export function mergeMap(callback: (value: T) => Observable) { + return (value: T) => callback(value).toPromise(); +} + +export function map(callback: any) { + return callback; +} diff --git a/sdks/typescript/servers.ts b/sdks/typescript/servers.ts new file mode 100644 index 000000000..fde37ac97 --- /dev/null +++ b/sdks/typescript/servers.ts @@ -0,0 +1,55 @@ +import { RequestContext, HttpMethod } from "./http/http"; + +export interface BaseServerConfiguration { + makeRequestContext(endpoint: string, httpMethod: HttpMethod): RequestContext; +} + +/** + * + * Represents the configuration of a server including its + * url template and variable configuration based on the url. + * + */ +export class ServerConfiguration implements BaseServerConfiguration { + public constructor(private url: string, private variableConfiguration: T) {} + + /** + * Sets the value of the variables of this server. Variables are included in + * the `url` of this ServerConfiguration in the form `{variableName}` + * + * @param variableConfiguration a partial variable configuration for the + * variables contained in the url + */ + public setVariables(variableConfiguration: Partial) { + Object.assign(this.variableConfiguration, variableConfiguration); + } + + public getConfiguration(): T { + return this.variableConfiguration + } + + private getUrl() { + let replacedUrl = this.url; + for (const key in this.variableConfiguration) { + var re = new RegExp("{" + key + "}","g"); + replacedUrl = replacedUrl.replace(re, this.variableConfiguration[key]); + } + return replacedUrl + } + + /** + * Creates a new request context for this server using the url with variables + * replaced with their respective values and the endpoint of the request appended. + * + * @param endpoint the endpoint to be queried on the server + * @param httpMethod httpMethod to be used + * + */ + public makeRequestContext(endpoint: string, httpMethod: HttpMethod): RequestContext { + return new RequestContext(this.getUrl() + endpoint, httpMethod); + } +} + +export const server1 = new ServerConfiguration<{ "base-url": string }>("{base-url}", { "base-url": "https://localhost:443" }) + +export const servers = [server1]; diff --git a/sdks/typescript/tests/AIApiTest.ts b/sdks/typescript/tests/AIApiTest.ts new file mode 100644 index 000000000..00513be3d --- /dev/null +++ b/sdks/typescript/tests/AIApiTest.ts @@ -0,0 +1,488 @@ +import chai from "chai"; +import chaiAsPromised from "chai-as-promised"; +import { createBearerAuthenticationConfig } from "../utils/config"; +import { PromiseAIApi } from "../types/PromiseAPI"; +import requestBodies from "./testDataUpdated.json"; + +chai.use(chaiAsPromised); +const expect = chai.expect; + + + +const baseUrlFromCli = process.argv.filter(s => s.startsWith("--baseUrl="))?.[0]?.split("=")?.[1] +const BASE_URL = baseUrlFromCli || "http://127.0.0.1:4123" +const config = createBearerAuthenticationConfig(BASE_URL, { + username: "tsadmin", + password: "admin", +}); + + +const instance = new PromiseAIApi(config); + +describe('AIApi', function() { + + + describe('createAgentConversation', function() { + + const testReqBodies = requestBodies.filter( + (body: any) => body.Metadata.operationId === "createAgentConversation" + ); + testReqBodies.forEach(async (test: any) => { + it(`${test.Metadata.operationId} - ${test.Metadata.scenario} : Testid - ${test.Metadata.testId}`, async function () { + + if (test.Metadata.scenario === "positive") { + var data; + try { + data = await instance.createAgentConversation( + // createAgentConversationRequest CreateAgentConversationRequest + test.Body + ) + } catch (er) { + console.error(er, "Response", data) + expect(er).to.be.undefined + } + } else { + await expect( + instance.createAgentConversation( + // createAgentConversationRequest CreateAgentConversationRequest + test.Body + ) + ).to.be.rejectedWith(Error); + } + + }); + }); + }); + + describe('createConversation', function() { + + const testReqBodies = requestBodies.filter( + (body: any) => body.Metadata.operationId === "createConversation" + ); + testReqBodies.forEach(async (test: any) => { + it(`${test.Metadata.operationId} - ${test.Metadata.scenario} : Testid - ${test.Metadata.testId}`, async function () { + + if (test.Metadata.scenario === "positive") { + var data; + try { + data = await instance.createConversation( + // createConversationRequest CreateConversationRequest + test.Body + ) + } catch (er) { + console.error(er, "Response", data) + expect(er).to.be.undefined + } + } else { + await expect( + instance.createConversation( + // createConversationRequest CreateConversationRequest + test.Body + ) + ).to.be.rejectedWith(Error); + } + + }); + }); + }); + + describe('getDataSourceSuggestions', function() { + + const testReqBodies = requestBodies.filter( + (body: any) => body.Metadata.operationId === "getDataSourceSuggestions" + ); + testReqBodies.forEach(async (test: any) => { + it(`${test.Metadata.operationId} - ${test.Metadata.scenario} : Testid - ${test.Metadata.testId}`, async function () { + + if (test.Metadata.scenario === "positive") { + var data; + try { + data = await instance.getDataSourceSuggestions( + // getDataSourceSuggestionsRequest GetDataSourceSuggestionsRequest + test.Body + ) + } catch (er) { + console.error(er, "Response", data) + expect(er).to.be.undefined + } + } else { + await expect( + instance.getDataSourceSuggestions( + // getDataSourceSuggestionsRequest GetDataSourceSuggestionsRequest + test.Body + ) + ).to.be.rejectedWith(Error); + } + + }); + }); + }); + + describe('getNLInstructions', function() { + + const testReqBodies = requestBodies.filter( + (body: any) => body.Metadata.operationId === "getNLInstructions" + ); + testReqBodies.forEach(async (test: any) => { + it(`${test.Metadata.operationId} - ${test.Metadata.scenario} : Testid - ${test.Metadata.testId}`, async function () { + + if (test.Metadata.scenario === "positive") { + var data; + try { + data = await instance.getNLInstructions( + // getNLInstructionsRequest GetNLInstructionsRequest + test.Body + ) + } catch (er) { + console.error(er, "Response", data) + expect(er).to.be.undefined + } + } else { + await expect( + instance.getNLInstructions( + // getNLInstructionsRequest GetNLInstructionsRequest + test.Body + ) + ).to.be.rejectedWith(Error); + } + + }); + }); + }); + + describe('getRelevantQuestions', function() { + + const testReqBodies = requestBodies.filter( + (body: any) => body.Metadata.operationId === "getRelevantQuestions" + ); + testReqBodies.forEach(async (test: any) => { + it(`${test.Metadata.operationId} - ${test.Metadata.scenario} : Testid - ${test.Metadata.testId}`, async function () { + + if (test.Metadata.scenario === "positive") { + var data; + try { + data = await instance.getRelevantQuestions( + // getRelevantQuestionsRequest GetRelevantQuestionsRequest + test.Body + ) + } catch (er) { + console.error(er, "Response", data) + expect(er).to.be.undefined + } + } else { + await expect( + instance.getRelevantQuestions( + // getRelevantQuestionsRequest GetRelevantQuestionsRequest + test.Body + ) + ).to.be.rejectedWith(Error); + } + + }); + }); + }); + + describe('queryGetDecomposedQuery', function() { + + const testReqBodies = requestBodies.filter( + (body: any) => body.Metadata.operationId === "queryGetDecomposedQuery" + ); + testReqBodies.forEach(async (test: any) => { + it(`${test.Metadata.operationId} - ${test.Metadata.scenario} : Testid - ${test.Metadata.testId}`, async function () { + + if (test.Metadata.scenario === "positive") { + var data; + try { + data = await instance.queryGetDecomposedQuery( + // queryGetDecomposedQueryRequest QueryGetDecomposedQueryRequest + test.Body + ) + } catch (er) { + console.error(er, "Response", data) + expect(er).to.be.undefined + } + } else { + await expect( + instance.queryGetDecomposedQuery( + // queryGetDecomposedQueryRequest QueryGetDecomposedQueryRequest + test.Body + ) + ).to.be.rejectedWith(Error); + } + + }); + }); + }); + + describe('sendAgentConversationMessage', function() { + + const testReqBodies = requestBodies.filter( + (body: any) => body.Metadata.operationId === "sendAgentConversationMessage" + ); + testReqBodies.forEach(async (test: any) => { + it(`${test.Metadata.operationId} - ${test.Metadata.scenario} : Testid - ${test.Metadata.testId}`, async function () { + + if (test.Metadata.scenario === "positive") { + var data; + try { + data = await instance.sendAgentConversationMessage( + // conversationIdentifier conversation_identifier + test.Path_Variables.conversation_identifier , + // sendAgentConversationMessageRequest SendAgentConversationMessageRequest + test.Body + ) + } catch (er) { + console.error(er, "Response", data) + expect(er).to.be.undefined + } + } else { + await expect( + instance.sendAgentConversationMessage( + // conversationIdentifier conversation_identifier + test.Path_Variables.conversation_identifier , + // sendAgentConversationMessageRequest SendAgentConversationMessageRequest + test.Body + ) + ).to.be.rejectedWith(Error); + } + + }); + }); + }); + + describe('sendAgentConversationMessageStreaming', function() { + + const testReqBodies = requestBodies.filter( + (body: any) => body.Metadata.operationId === "sendAgentConversationMessageStreaming" + ); + testReqBodies.forEach(async (test: any) => { + it(`${test.Metadata.operationId} - ${test.Metadata.scenario} : Testid - ${test.Metadata.testId}`, async function () { + + if (test.Metadata.scenario === "positive") { + var data; + try { + data = await instance.sendAgentConversationMessageStreaming( + // conversationIdentifier conversation_identifier + test.Path_Variables.conversation_identifier , + // sendAgentConversationMessageStreamingRequest SendAgentConversationMessageStreamingRequest + test.Body + ) + } catch (er) { + console.error(er, "Response", data) + expect(er).to.be.undefined + } + } else { + await expect( + instance.sendAgentConversationMessageStreaming( + // conversationIdentifier conversation_identifier + test.Path_Variables.conversation_identifier , + // sendAgentConversationMessageStreamingRequest SendAgentConversationMessageStreamingRequest + test.Body + ) + ).to.be.rejectedWith(Error); + } + + }); + }); + }); + + describe('sendAgentMessage', function() { + + const testReqBodies = requestBodies.filter( + (body: any) => body.Metadata.operationId === "sendAgentMessage" + ); + testReqBodies.forEach(async (test: any) => { + it(`${test.Metadata.operationId} - ${test.Metadata.scenario} : Testid - ${test.Metadata.testId}`, async function () { + + if (test.Metadata.scenario === "positive") { + var data; + try { + data = await instance.sendAgentMessage( + // conversationIdentifier conversation_identifier + test.Path_Variables.conversation_identifier , + // sendAgentMessageRequest SendAgentMessageRequest + test.Body + ) + } catch (er) { + console.error(er, "Response", data) + expect(er).to.be.undefined + } + } else { + await expect( + instance.sendAgentMessage( + // conversationIdentifier conversation_identifier + test.Path_Variables.conversation_identifier , + // sendAgentMessageRequest SendAgentMessageRequest + test.Body + ) + ).to.be.rejectedWith(Error); + } + + }); + }); + }); + + describe('sendAgentMessageStreaming', function() { + + const testReqBodies = requestBodies.filter( + (body: any) => body.Metadata.operationId === "sendAgentMessageStreaming" + ); + testReqBodies.forEach(async (test: any) => { + it(`${test.Metadata.operationId} - ${test.Metadata.scenario} : Testid - ${test.Metadata.testId}`, async function () { + + if (test.Metadata.scenario === "positive") { + var data; + try { + data = await instance.sendAgentMessageStreaming( + // sendAgentMessageStreamingRequest SendAgentMessageStreamingRequest + test.Body + ) + } catch (er) { + console.error(er, "Response", data) + expect(er).to.be.undefined + } + } else { + await expect( + instance.sendAgentMessageStreaming( + // sendAgentMessageStreamingRequest SendAgentMessageStreamingRequest + test.Body + ) + ).to.be.rejectedWith(Error); + } + + }); + }); + }); + + describe('sendMessage', function() { + + const testReqBodies = requestBodies.filter( + (body: any) => body.Metadata.operationId === "sendMessage" + ); + testReqBodies.forEach(async (test: any) => { + it(`${test.Metadata.operationId} - ${test.Metadata.scenario} : Testid - ${test.Metadata.testId}`, async function () { + + if (test.Metadata.scenario === "positive") { + var data; + try { + data = await instance.sendMessage( + // conversationIdentifier conversation_identifier + test.Path_Variables.conversation_identifier , + // sendMessageRequest SendMessageRequest + test.Body + ) + } catch (er) { + console.error(er, "Response", data) + expect(er).to.be.undefined + } + } else { + await expect( + instance.sendMessage( + // conversationIdentifier conversation_identifier + test.Path_Variables.conversation_identifier , + // sendMessageRequest SendMessageRequest + test.Body + ) + ).to.be.rejectedWith(Error); + } + + }); + }); + }); + + describe('setNLInstructions', function() { + + const testReqBodies = requestBodies.filter( + (body: any) => body.Metadata.operationId === "setNLInstructions" + ); + testReqBodies.forEach(async (test: any) => { + it(`${test.Metadata.operationId} - ${test.Metadata.scenario} : Testid - ${test.Metadata.testId}`, async function () { + + if (test.Metadata.scenario === "positive") { + var data; + try { + data = await instance.setNLInstructions( + // setNLInstructionsRequest SetNLInstructionsRequest + test.Body + ) + } catch (er) { + console.error(er, "Response", data) + expect(er).to.be.undefined + } + } else { + await expect( + instance.setNLInstructions( + // setNLInstructionsRequest SetNLInstructionsRequest + test.Body + ) + ).to.be.rejectedWith(Error); + } + + }); + }); + }); + + describe('singleAnswer', function() { + + const testReqBodies = requestBodies.filter( + (body: any) => body.Metadata.operationId === "singleAnswer" + ); + testReqBodies.forEach(async (test: any) => { + it(`${test.Metadata.operationId} - ${test.Metadata.scenario} : Testid - ${test.Metadata.testId}`, async function () { + + if (test.Metadata.scenario === "positive") { + var data; + try { + data = await instance.singleAnswer( + // singleAnswerRequest SingleAnswerRequest + test.Body + ) + } catch (er) { + console.error(er, "Response", data) + expect(er).to.be.undefined + } + } else { + await expect( + instance.singleAnswer( + // singleAnswerRequest SingleAnswerRequest + test.Body + ) + ).to.be.rejectedWith(Error); + } + + }); + }); + }); + + describe('stopConversation', function() { + + const testReqBodies = requestBodies.filter( + (body: any) => body.Metadata.operationId === "stopConversation" + ); + testReqBodies.forEach(async (test: any) => { + it(`${test.Metadata.operationId} - ${test.Metadata.scenario} : Testid - ${test.Metadata.testId}`, async function () { + + if (test.Metadata.scenario === "positive") { + var data; + try { + data = await instance.stopConversation( + // conversationIdentifier conversation_identifier + test.Path_Variables.conversation_identifier + ) + } catch (er) { + console.error(er, "Response", data) + expect(er).to.be.undefined + } + } else { + await expect( + instance.stopConversation( + // conversationIdentifier conversation_identifier + test.Path_Variables.conversation_identifier + ) + ).to.be.rejectedWith(Error); + } + + }); + }); + }); +}); diff --git a/sdks/typescript/tests/AuthenticationApiTest.ts b/sdks/typescript/tests/AuthenticationApiTest.ts new file mode 100644 index 000000000..6cb234374 --- /dev/null +++ b/sdks/typescript/tests/AuthenticationApiTest.ts @@ -0,0 +1,364 @@ +import chai from "chai"; +import chaiAsPromised from "chai-as-promised"; +import { createBearerAuthenticationConfig } from "../utils/config"; +import { PromiseAuthenticationApi } from "../types/PromiseAPI"; +import requestBodies from "./testDataUpdated.json"; + +chai.use(chaiAsPromised); +const expect = chai.expect; + + + +const baseUrlFromCli = process.argv.filter(s => s.startsWith("--baseUrl="))?.[0]?.split("=")?.[1] +const BASE_URL = baseUrlFromCli || "http://127.0.0.1:4123" +const config = createBearerAuthenticationConfig(BASE_URL, { + username: "tsadmin", + password: "admin", +}); + + +const instance = new PromiseAuthenticationApi(config); + +describe('AuthenticationApi', function() { + + + describe('configureAuthSettings', function() { + + const testReqBodies = requestBodies.filter( + (body: any) => body.Metadata.operationId === "configureAuthSettings" + ); + testReqBodies.forEach(async (test: any) => { + it(`${test.Metadata.operationId} - ${test.Metadata.scenario} : Testid - ${test.Metadata.testId}`, async function () { + + if (test.Metadata.scenario === "positive") { + var data; + try { + data = await instance.configureAuthSettings( + // configureAuthSettingsRequest ConfigureAuthSettingsRequest + test.Body + ) + } catch (er) { + console.error(er, "Response", data) + expect(er).to.be.undefined + } + } else { + await expect( + instance.configureAuthSettings( + // configureAuthSettingsRequest ConfigureAuthSettingsRequest + test.Body + ) + ).to.be.rejectedWith(Error); + } + + }); + }); + }); + + describe('getCurrentUserInfo', function() { + + const testReqBodies = requestBodies.filter( + (body: any) => body.Metadata.operationId === "getCurrentUserInfo" + ); + testReqBodies.forEach(async (test: any) => { + it(`${test.Metadata.operationId} - ${test.Metadata.scenario} : Testid - ${test.Metadata.testId}`, async function () { + + if (test.Metadata.scenario === "positive") { + var data; + try { + data = await instance.getCurrentUserInfo( + ) + } catch (er) { + console.error(er, "Response", data) + expect(er).to.be.undefined + } + } else { + await expect( + instance.getCurrentUserInfo( + ) + ).to.be.rejectedWith(Error); + } + + }); + }); + }); + + describe('getCurrentUserToken', function() { + + const testReqBodies = requestBodies.filter( + (body: any) => body.Metadata.operationId === "getCurrentUserToken" + ); + testReqBodies.forEach(async (test: any) => { + it(`${test.Metadata.operationId} - ${test.Metadata.scenario} : Testid - ${test.Metadata.testId}`, async function () { + + if (test.Metadata.scenario === "positive") { + var data; + try { + data = await instance.getCurrentUserToken( + ) + } catch (er) { + console.error(er, "Response", data) + expect(er).to.be.undefined + } + } else { + await expect( + instance.getCurrentUserToken( + ) + ).to.be.rejectedWith(Error); + } + + }); + }); + }); + + describe('getCustomAccessToken', function() { + + const testReqBodies = requestBodies.filter( + (body: any) => body.Metadata.operationId === "getCustomAccessToken" + ); + testReqBodies.forEach(async (test: any) => { + it(`${test.Metadata.operationId} - ${test.Metadata.scenario} : Testid - ${test.Metadata.testId}`, async function () { + + if (test.Metadata.scenario === "positive") { + var data; + try { + data = await instance.getCustomAccessToken( + // getCustomAccessTokenRequest GetCustomAccessTokenRequest + test.Body + ) + } catch (er) { + console.error(er, "Response", data) + expect(er).to.be.undefined + } + } else { + await expect( + instance.getCustomAccessToken( + // getCustomAccessTokenRequest GetCustomAccessTokenRequest + test.Body + ) + ).to.be.rejectedWith(Error); + } + + }); + }); + }); + + describe('getFullAccessToken', function() { + + const testReqBodies = requestBodies.filter( + (body: any) => body.Metadata.operationId === "getFullAccessToken" + ); + testReqBodies.forEach(async (test: any) => { + it(`${test.Metadata.operationId} - ${test.Metadata.scenario} : Testid - ${test.Metadata.testId}`, async function () { + + if (test.Metadata.scenario === "positive") { + var data; + try { + data = await instance.getFullAccessToken( + // getFullAccessTokenRequest GetFullAccessTokenRequest + test.Body + ) + } catch (er) { + console.error(er, "Response", data) + expect(er).to.be.undefined + } + } else { + await expect( + instance.getFullAccessToken( + // getFullAccessTokenRequest GetFullAccessTokenRequest + test.Body + ) + ).to.be.rejectedWith(Error); + } + + }); + }); + }); + + describe('getObjectAccessToken', function() { + + const testReqBodies = requestBodies.filter( + (body: any) => body.Metadata.operationId === "getObjectAccessToken" + ); + testReqBodies.forEach(async (test: any) => { + it(`${test.Metadata.operationId} - ${test.Metadata.scenario} : Testid - ${test.Metadata.testId}`, async function () { + + if (test.Metadata.scenario === "positive") { + var data; + try { + data = await instance.getObjectAccessToken( + // getObjectAccessTokenRequest GetObjectAccessTokenRequest + test.Body + ) + } catch (er) { + console.error(er, "Response", data) + expect(er).to.be.undefined + } + } else { + await expect( + instance.getObjectAccessToken( + // getObjectAccessTokenRequest GetObjectAccessTokenRequest + test.Body + ) + ).to.be.rejectedWith(Error); + } + + }); + }); + }); + + describe('login', function() { + + const testReqBodies = requestBodies.filter( + (body: any) => body.Metadata.operationId === "login" + ); + testReqBodies.forEach(async (test: any) => { + it(`${test.Metadata.operationId} - ${test.Metadata.scenario} : Testid - ${test.Metadata.testId}`, async function () { + + if (test.Metadata.scenario === "positive") { + var data; + try { + data = await instance.login( + // loginRequest LoginRequest + test.Body + ) + } catch (er) { + console.error(er, "Response", data) + expect(er).to.be.undefined + } + } else { + await expect( + instance.login( + // loginRequest LoginRequest + test.Body + ) + ).to.be.rejectedWith(Error); + } + + }); + }); + }); + + describe('logout', function() { + + const testReqBodies = requestBodies.filter( + (body: any) => body.Metadata.operationId === "logout" + ); + testReqBodies.forEach(async (test: any) => { + it(`${test.Metadata.operationId} - ${test.Metadata.scenario} : Testid - ${test.Metadata.testId}`, async function () { + + if (test.Metadata.scenario === "positive") { + var data; + try { + data = await instance.logout( + ) + } catch (er) { + console.error(er, "Response", data) + expect(er).to.be.undefined + } + } else { + await expect( + instance.logout( + ) + ).to.be.rejectedWith(Error); + } + + }); + }); + }); + + describe('revokeToken', function() { + + const testReqBodies = requestBodies.filter( + (body: any) => body.Metadata.operationId === "revokeToken" + ); + testReqBodies.forEach(async (test: any) => { + it(`${test.Metadata.operationId} - ${test.Metadata.scenario} : Testid - ${test.Metadata.testId}`, async function () { + + if (test.Metadata.scenario === "positive") { + var data; + try { + data = await instance.revokeToken( + // revokeTokenRequest RevokeTokenRequest + test.Body + ) + } catch (er) { + console.error(er, "Response", data) + expect(er).to.be.undefined + } + } else { + await expect( + instance.revokeToken( + // revokeTokenRequest RevokeTokenRequest + test.Body + ) + ).to.be.rejectedWith(Error); + } + + }); + }); + }); + + describe('searchAuthSettings', function() { + + const testReqBodies = requestBodies.filter( + (body: any) => body.Metadata.operationId === "searchAuthSettings" + ); + testReqBodies.forEach(async (test: any) => { + it(`${test.Metadata.operationId} - ${test.Metadata.scenario} : Testid - ${test.Metadata.testId}`, async function () { + + if (test.Metadata.scenario === "positive") { + var data; + try { + data = await instance.searchAuthSettings( + // searchAuthSettingsRequest SearchAuthSettingsRequest + test.Body + ) + } catch (er) { + console.error(er, "Response", data) + expect(er).to.be.undefined + } + } else { + await expect( + instance.searchAuthSettings( + // searchAuthSettingsRequest SearchAuthSettingsRequest + test.Body + ) + ).to.be.rejectedWith(Error); + } + + }); + }); + }); + + describe('validateToken', function() { + + const testReqBodies = requestBodies.filter( + (body: any) => body.Metadata.operationId === "validateToken" + ); + testReqBodies.forEach(async (test: any) => { + it(`${test.Metadata.operationId} - ${test.Metadata.scenario} : Testid - ${test.Metadata.testId}`, async function () { + + if (test.Metadata.scenario === "positive") { + var data; + try { + data = await instance.validateToken( + // validateTokenRequest ValidateTokenRequest + test.Body + ) + } catch (er) { + console.error(er, "Response", data) + expect(er).to.be.undefined + } + } else { + await expect( + instance.validateToken( + // validateTokenRequest ValidateTokenRequest + test.Body + ) + ).to.be.rejectedWith(Error); + } + + }); + }); + }); +}); diff --git a/sdks/typescript/tests/CollectionsApiTest.ts b/sdks/typescript/tests/CollectionsApiTest.ts new file mode 100644 index 000000000..c044d646e --- /dev/null +++ b/sdks/typescript/tests/CollectionsApiTest.ts @@ -0,0 +1,156 @@ +import chai from "chai"; +import chaiAsPromised from "chai-as-promised"; +import { createBearerAuthenticationConfig } from "../utils/config"; +import { PromiseCollectionsApi } from "../types/PromiseAPI"; +import requestBodies from "./testDataUpdated.json"; + +chai.use(chaiAsPromised); +const expect = chai.expect; + + + +const baseUrlFromCli = process.argv.filter(s => s.startsWith("--baseUrl="))?.[0]?.split("=")?.[1] +const BASE_URL = baseUrlFromCli || "http://127.0.0.1:4123" +const config = createBearerAuthenticationConfig(BASE_URL, { + username: "tsadmin", + password: "admin", +}); + + +const instance = new PromiseCollectionsApi(config); + +describe('CollectionsApi', function() { + + + describe('createCollection', function() { + + const testReqBodies = requestBodies.filter( + (body: any) => body.Metadata.operationId === "createCollection" + ); + testReqBodies.forEach(async (test: any) => { + it(`${test.Metadata.operationId} - ${test.Metadata.scenario} : Testid - ${test.Metadata.testId}`, async function () { + + if (test.Metadata.scenario === "positive") { + var data; + try { + data = await instance.createCollection( + // createCollectionRequest CreateCollectionRequest + test.Body + ) + } catch (er) { + console.error(er, "Response", data) + expect(er).to.be.undefined + } + } else { + await expect( + instance.createCollection( + // createCollectionRequest CreateCollectionRequest + test.Body + ) + ).to.be.rejectedWith(Error); + } + + }); + }); + }); + + describe('deleteCollection', function() { + + const testReqBodies = requestBodies.filter( + (body: any) => body.Metadata.operationId === "deleteCollection" + ); + testReqBodies.forEach(async (test: any) => { + it(`${test.Metadata.operationId} - ${test.Metadata.scenario} : Testid - ${test.Metadata.testId}`, async function () { + + if (test.Metadata.scenario === "positive") { + var data; + try { + data = await instance.deleteCollection( + // deleteCollectionRequest DeleteCollectionRequest + test.Body + ) + } catch (er) { + console.error(er, "Response", data) + expect(er).to.be.undefined + } + } else { + await expect( + instance.deleteCollection( + // deleteCollectionRequest DeleteCollectionRequest + test.Body + ) + ).to.be.rejectedWith(Error); + } + + }); + }); + }); + + describe('searchCollections', function() { + + const testReqBodies = requestBodies.filter( + (body: any) => body.Metadata.operationId === "searchCollections" + ); + testReqBodies.forEach(async (test: any) => { + it(`${test.Metadata.operationId} - ${test.Metadata.scenario} : Testid - ${test.Metadata.testId}`, async function () { + + if (test.Metadata.scenario === "positive") { + var data; + try { + data = await instance.searchCollections( + // searchCollectionsRequest SearchCollectionsRequest + test.Body + ) + } catch (er) { + console.error(er, "Response", data) + expect(er).to.be.undefined + } + } else { + await expect( + instance.searchCollections( + // searchCollectionsRequest SearchCollectionsRequest + test.Body + ) + ).to.be.rejectedWith(Error); + } + + }); + }); + }); + + describe('updateCollection', function() { + + const testReqBodies = requestBodies.filter( + (body: any) => body.Metadata.operationId === "updateCollection" + ); + testReqBodies.forEach(async (test: any) => { + it(`${test.Metadata.operationId} - ${test.Metadata.scenario} : Testid - ${test.Metadata.testId}`, async function () { + + if (test.Metadata.scenario === "positive") { + var data; + try { + data = await instance.updateCollection( + // collectionIdentifier collection_identifier + test.Path_Variables.collection_identifier , + // updateCollectionRequest UpdateCollectionRequest + test.Body + ) + } catch (er) { + console.error(er, "Response", data) + expect(er).to.be.undefined + } + } else { + await expect( + instance.updateCollection( + // collectionIdentifier collection_identifier + test.Path_Variables.collection_identifier , + // updateCollectionRequest UpdateCollectionRequest + test.Body + ) + ).to.be.rejectedWith(Error); + } + + }); + }); + }); +}); diff --git a/sdks/typescript/tests/ConnectionConfigurationsApiTest.ts b/sdks/typescript/tests/ConnectionConfigurationsApiTest.ts new file mode 100644 index 000000000..8701cc5bd --- /dev/null +++ b/sdks/typescript/tests/ConnectionConfigurationsApiTest.ts @@ -0,0 +1,156 @@ +import chai from "chai"; +import chaiAsPromised from "chai-as-promised"; +import { createBearerAuthenticationConfig } from "../utils/config"; +import { PromiseConnectionConfigurationsApi } from "../types/PromiseAPI"; +import requestBodies from "./testDataUpdated.json"; + +chai.use(chaiAsPromised); +const expect = chai.expect; + + + +const baseUrlFromCli = process.argv.filter(s => s.startsWith("--baseUrl="))?.[0]?.split("=")?.[1] +const BASE_URL = baseUrlFromCli || "http://127.0.0.1:4123" +const config = createBearerAuthenticationConfig(BASE_URL, { + username: "tsadmin", + password: "admin", +}); + + +const instance = new PromiseConnectionConfigurationsApi(config); + +describe('ConnectionConfigurationsApi', function() { + + + describe('connectionConfigurationSearch', function() { + + const testReqBodies = requestBodies.filter( + (body: any) => body.Metadata.operationId === "connectionConfigurationSearch" + ); + testReqBodies.forEach(async (test: any) => { + it(`${test.Metadata.operationId} - ${test.Metadata.scenario} : Testid - ${test.Metadata.testId}`, async function () { + + if (test.Metadata.scenario === "positive") { + var data; + try { + data = await instance.connectionConfigurationSearch( + // connectionConfigurationSearchRequest ConnectionConfigurationSearchRequest + test.Body + ) + } catch (er) { + console.error(er, "Response", data) + expect(er).to.be.undefined + } + } else { + await expect( + instance.connectionConfigurationSearch( + // connectionConfigurationSearchRequest ConnectionConfigurationSearchRequest + test.Body + ) + ).to.be.rejectedWith(Error); + } + + }); + }); + }); + + describe('createConnectionConfiguration', function() { + + const testReqBodies = requestBodies.filter( + (body: any) => body.Metadata.operationId === "createConnectionConfiguration" + ); + testReqBodies.forEach(async (test: any) => { + it(`${test.Metadata.operationId} - ${test.Metadata.scenario} : Testid - ${test.Metadata.testId}`, async function () { + + if (test.Metadata.scenario === "positive") { + var data; + try { + data = await instance.createConnectionConfiguration( + // createConnectionConfigurationRequest CreateConnectionConfigurationRequest + test.Body + ) + } catch (er) { + console.error(er, "Response", data) + expect(er).to.be.undefined + } + } else { + await expect( + instance.createConnectionConfiguration( + // createConnectionConfigurationRequest CreateConnectionConfigurationRequest + test.Body + ) + ).to.be.rejectedWith(Error); + } + + }); + }); + }); + + describe('deleteConnectionConfiguration', function() { + + const testReqBodies = requestBodies.filter( + (body: any) => body.Metadata.operationId === "deleteConnectionConfiguration" + ); + testReqBodies.forEach(async (test: any) => { + it(`${test.Metadata.operationId} - ${test.Metadata.scenario} : Testid - ${test.Metadata.testId}`, async function () { + + if (test.Metadata.scenario === "positive") { + var data; + try { + data = await instance.deleteConnectionConfiguration( + // deleteConnectionConfigurationRequest DeleteConnectionConfigurationRequest + test.Body + ) + } catch (er) { + console.error(er, "Response", data) + expect(er).to.be.undefined + } + } else { + await expect( + instance.deleteConnectionConfiguration( + // deleteConnectionConfigurationRequest DeleteConnectionConfigurationRequest + test.Body + ) + ).to.be.rejectedWith(Error); + } + + }); + }); + }); + + describe('updateConnectionConfiguration', function() { + + const testReqBodies = requestBodies.filter( + (body: any) => body.Metadata.operationId === "updateConnectionConfiguration" + ); + testReqBodies.forEach(async (test: any) => { + it(`${test.Metadata.operationId} - ${test.Metadata.scenario} : Testid - ${test.Metadata.testId}`, async function () { + + if (test.Metadata.scenario === "positive") { + var data; + try { + data = await instance.updateConnectionConfiguration( + // configurationIdentifier configuration_identifier + test.Path_Variables.configuration_identifier , + // updateConnectionConfigurationRequest UpdateConnectionConfigurationRequest + test.Body + ) + } catch (er) { + console.error(er, "Response", data) + expect(er).to.be.undefined + } + } else { + await expect( + instance.updateConnectionConfiguration( + // configurationIdentifier configuration_identifier + test.Path_Variables.configuration_identifier , + // updateConnectionConfigurationRequest UpdateConnectionConfigurationRequest + test.Body + ) + ).to.be.rejectedWith(Error); + } + + }); + }); + }); +}); diff --git a/sdks/typescript/tests/ConnectionsApiTest.ts b/sdks/typescript/tests/ConnectionsApiTest.ts new file mode 100644 index 000000000..eb7bfc7a2 --- /dev/null +++ b/sdks/typescript/tests/ConnectionsApiTest.ts @@ -0,0 +1,392 @@ +import chai from "chai"; +import chaiAsPromised from "chai-as-promised"; +import { createBearerAuthenticationConfig } from "../utils/config"; +import { PromiseConnectionsApi } from "../types/PromiseAPI"; +import requestBodies from "./testDataUpdated.json"; + +chai.use(chaiAsPromised); +const expect = chai.expect; + + + +const baseUrlFromCli = process.argv.filter(s => s.startsWith("--baseUrl="))?.[0]?.split("=")?.[1] +const BASE_URL = baseUrlFromCli || "http://127.0.0.1:4123" +const config = createBearerAuthenticationConfig(BASE_URL, { + username: "tsadmin", + password: "admin", +}); + + +const instance = new PromiseConnectionsApi(config); + +describe('ConnectionsApi', function() { + + + describe('createConnection', function() { + + const testReqBodies = requestBodies.filter( + (body: any) => body.Metadata.operationId === "createConnection" + ); + testReqBodies.forEach(async (test: any) => { + it(`${test.Metadata.operationId} - ${test.Metadata.scenario} : Testid - ${test.Metadata.testId}`, async function () { + + if (test.Metadata.scenario === "positive") { + var data; + try { + data = await instance.createConnection( + // createConnectionRequest CreateConnectionRequest + test.Body + ) + } catch (er) { + console.error(er, "Response", data) + expect(er).to.be.undefined + } + } else { + await expect( + instance.createConnection( + // createConnectionRequest CreateConnectionRequest + test.Body + ) + ).to.be.rejectedWith(Error); + } + + }); + }); + }); + + describe('deleteConnection', function() { + + const testReqBodies = requestBodies.filter( + (body: any) => body.Metadata.operationId === "deleteConnection" + ); + testReqBodies.forEach(async (test: any) => { + it(`${test.Metadata.operationId} - ${test.Metadata.scenario} : Testid - ${test.Metadata.testId}`, async function () { + + if (test.Metadata.scenario === "positive") { + var data; + try { + data = await instance.deleteConnection( + // deleteConnectionRequest DeleteConnectionRequest + test.Body + ) + } catch (er) { + console.error(er, "Response", data) + expect(er).to.be.undefined + } + } else { + await expect( + instance.deleteConnection( + // deleteConnectionRequest DeleteConnectionRequest + test.Body + ) + ).to.be.rejectedWith(Error); + } + + }); + }); + }); + + describe('deleteConnectionV2', function() { + + const testReqBodies = requestBodies.filter( + (body: any) => body.Metadata.operationId === "deleteConnectionV2" + ); + testReqBodies.forEach(async (test: any) => { + it(`${test.Metadata.operationId} - ${test.Metadata.scenario} : Testid - ${test.Metadata.testId}`, async function () { + + if (test.Metadata.scenario === "positive") { + var data; + try { + data = await instance.deleteConnectionV2( + // connectionIdentifier connection_identifier + test.Path_Variables.connection_identifier + ) + } catch (er) { + console.error(er, "Response", data) + expect(er).to.be.undefined + } + } else { + await expect( + instance.deleteConnectionV2( + // connectionIdentifier connection_identifier + test.Path_Variables.connection_identifier + ) + ).to.be.rejectedWith(Error); + } + + }); + }); + }); + + describe('downloadConnectionMetadataChanges', function() { + + const testReqBodies = requestBodies.filter( + (body: any) => body.Metadata.operationId === "downloadConnectionMetadataChanges" + ); + testReqBodies.forEach(async (test: any) => { + it(`${test.Metadata.operationId} - ${test.Metadata.scenario} : Testid - ${test.Metadata.testId}`, async function () { + + if (test.Metadata.scenario === "positive") { + var data; + try { + data = await instance.downloadConnectionMetadataChanges( + // connectionIdentifier connection_identifier + test.Path_Variables.connection_identifier + ) + } catch (er) { + console.error(er, "Response", data) + expect(er).to.be.undefined + } + } else { + await expect( + instance.downloadConnectionMetadataChanges( + // connectionIdentifier connection_identifier + test.Path_Variables.connection_identifier + ) + ).to.be.rejectedWith(Error); + } + + }); + }); + }); + + describe('fetchConnectionDiffStatus', function() { + + const testReqBodies = requestBodies.filter( + (body: any) => body.Metadata.operationId === "fetchConnectionDiffStatus" + ); + testReqBodies.forEach(async (test: any) => { + it(`${test.Metadata.operationId} - ${test.Metadata.scenario} : Testid - ${test.Metadata.testId}`, async function () { + + if (test.Metadata.scenario === "positive") { + var data; + try { + data = await instance.fetchConnectionDiffStatus( + // connectionIdentifier connection_identifier + test.Path_Variables.connection_identifier + ) + } catch (er) { + console.error(er, "Response", data) + expect(er).to.be.undefined + } + } else { + await expect( + instance.fetchConnectionDiffStatus( + // connectionIdentifier connection_identifier + test.Path_Variables.connection_identifier + ) + ).to.be.rejectedWith(Error); + } + + }); + }); + }); + + describe('revokeRefreshTokens', function() { + + const testReqBodies = requestBodies.filter( + (body: any) => body.Metadata.operationId === "revokeRefreshTokens" + ); + testReqBodies.forEach(async (test: any) => { + it(`${test.Metadata.operationId} - ${test.Metadata.scenario} : Testid - ${test.Metadata.testId}`, async function () { + + if (test.Metadata.scenario === "positive") { + var data; + try { + data = await instance.revokeRefreshTokens( + // connectionIdentifier connection_identifier + test.Path_Variables.connection_identifier , + // revokeRefreshTokensRequest RevokeRefreshTokensRequest + test.Body + ) + } catch (er) { + console.error(er, "Response", data) + expect(er).to.be.undefined + } + } else { + await expect( + instance.revokeRefreshTokens( + // connectionIdentifier connection_identifier + test.Path_Variables.connection_identifier , + // revokeRefreshTokensRequest RevokeRefreshTokensRequest + test.Body + ) + ).to.be.rejectedWith(Error); + } + + }); + }); + }); + + describe('searchConnection', function() { + + const testReqBodies = requestBodies.filter( + (body: any) => body.Metadata.operationId === "searchConnection" + ); + testReqBodies.forEach(async (test: any) => { + it(`${test.Metadata.operationId} - ${test.Metadata.scenario} : Testid - ${test.Metadata.testId}`, async function () { + + if (test.Metadata.scenario === "positive") { + var data; + try { + data = await instance.searchConnection( + // searchConnectionRequest SearchConnectionRequest + test.Body + ) + } catch (er) { + console.error(er, "Response", data) + expect(er).to.be.undefined + } + } else { + await expect( + instance.searchConnection( + // searchConnectionRequest SearchConnectionRequest + test.Body + ) + ).to.be.rejectedWith(Error); + } + + }); + }); + }); + + describe('syncMetadata', function() { + + const testReqBodies = requestBodies.filter( + (body: any) => body.Metadata.operationId === "syncMetadata" + ); + testReqBodies.forEach(async (test: any) => { + it(`${test.Metadata.operationId} - ${test.Metadata.scenario} : Testid - ${test.Metadata.testId}`, async function () { + + if (test.Metadata.scenario === "positive") { + var data; + try { + data = await instance.syncMetadata( + // connectionIdentifier connection_identifier + test.Path_Variables.connection_identifier , + // syncMetadataRequest SyncMetadataRequest + test.Body + ) + } catch (er) { + console.error(er, "Response", data) + expect(er).to.be.undefined + } + } else { + await expect( + instance.syncMetadata( + // connectionIdentifier connection_identifier + test.Path_Variables.connection_identifier , + // syncMetadataRequest SyncMetadataRequest + test.Body + ) + ).to.be.rejectedWith(Error); + } + + }); + }); + }); + + describe('updateConnection', function() { + + const testReqBodies = requestBodies.filter( + (body: any) => body.Metadata.operationId === "updateConnection" + ); + testReqBodies.forEach(async (test: any) => { + it(`${test.Metadata.operationId} - ${test.Metadata.scenario} : Testid - ${test.Metadata.testId}`, async function () { + + if (test.Metadata.scenario === "positive") { + var data; + try { + data = await instance.updateConnection( + // updateConnectionRequest UpdateConnectionRequest + test.Body + ) + } catch (er) { + console.error(er, "Response", data) + expect(er).to.be.undefined + } + } else { + await expect( + instance.updateConnection( + // updateConnectionRequest UpdateConnectionRequest + test.Body + ) + ).to.be.rejectedWith(Error); + } + + }); + }); + }); + + describe('updateConnectionStatus', function() { + + const testReqBodies = requestBodies.filter( + (body: any) => body.Metadata.operationId === "updateConnectionStatus" + ); + testReqBodies.forEach(async (test: any) => { + it(`${test.Metadata.operationId} - ${test.Metadata.scenario} : Testid - ${test.Metadata.testId}`, async function () { + + if (test.Metadata.scenario === "positive") { + var data; + try { + data = await instance.updateConnectionStatus( + // connectionIdentifier connection_identifier + test.Path_Variables.connection_identifier , + // updateConnectionStatusRequest UpdateConnectionStatusRequest + test.Body + ) + } catch (er) { + console.error(er, "Response", data) + expect(er).to.be.undefined + } + } else { + await expect( + instance.updateConnectionStatus( + // connectionIdentifier connection_identifier + test.Path_Variables.connection_identifier , + // updateConnectionStatusRequest UpdateConnectionStatusRequest + test.Body + ) + ).to.be.rejectedWith(Error); + } + + }); + }); + }); + + describe('updateConnectionV2', function() { + + const testReqBodies = requestBodies.filter( + (body: any) => body.Metadata.operationId === "updateConnectionV2" + ); + testReqBodies.forEach(async (test: any) => { + it(`${test.Metadata.operationId} - ${test.Metadata.scenario} : Testid - ${test.Metadata.testId}`, async function () { + + if (test.Metadata.scenario === "positive") { + var data; + try { + data = await instance.updateConnectionV2( + // connectionIdentifier connection_identifier + test.Path_Variables.connection_identifier , + // updateConnectionV2Request UpdateConnectionV2Request + test.Body + ) + } catch (er) { + console.error(er, "Response", data) + expect(er).to.be.undefined + } + } else { + await expect( + instance.updateConnectionV2( + // connectionIdentifier connection_identifier + test.Path_Variables.connection_identifier , + // updateConnectionV2Request UpdateConnectionV2Request + test.Body + ) + ).to.be.rejectedWith(Error); + } + + }); + }); + }); +}); diff --git a/sdks/typescript/tests/CustomActionApiTest.ts b/sdks/typescript/tests/CustomActionApiTest.ts new file mode 100644 index 000000000..86934b659 --- /dev/null +++ b/sdks/typescript/tests/CustomActionApiTest.ts @@ -0,0 +1,156 @@ +import chai from "chai"; +import chaiAsPromised from "chai-as-promised"; +import { createBearerAuthenticationConfig } from "../utils/config"; +import { PromiseCustomActionApi } from "../types/PromiseAPI"; +import requestBodies from "./testDataUpdated.json"; + +chai.use(chaiAsPromised); +const expect = chai.expect; + + + +const baseUrlFromCli = process.argv.filter(s => s.startsWith("--baseUrl="))?.[0]?.split("=")?.[1] +const BASE_URL = baseUrlFromCli || "http://127.0.0.1:4123" +const config = createBearerAuthenticationConfig(BASE_URL, { + username: "tsadmin", + password: "admin", +}); + + +const instance = new PromiseCustomActionApi(config); + +describe('CustomActionApi', function() { + + + describe('createCustomAction', function() { + + const testReqBodies = requestBodies.filter( + (body: any) => body.Metadata.operationId === "createCustomAction" + ); + testReqBodies.forEach(async (test: any) => { + it(`${test.Metadata.operationId} - ${test.Metadata.scenario} : Testid - ${test.Metadata.testId}`, async function () { + + if (test.Metadata.scenario === "positive") { + var data; + try { + data = await instance.createCustomAction( + // createCustomActionRequest CreateCustomActionRequest + test.Body + ) + } catch (er) { + console.error(er, "Response", data) + expect(er).to.be.undefined + } + } else { + await expect( + instance.createCustomAction( + // createCustomActionRequest CreateCustomActionRequest + test.Body + ) + ).to.be.rejectedWith(Error); + } + + }); + }); + }); + + describe('deleteCustomAction', function() { + + const testReqBodies = requestBodies.filter( + (body: any) => body.Metadata.operationId === "deleteCustomAction" + ); + testReqBodies.forEach(async (test: any) => { + it(`${test.Metadata.operationId} - ${test.Metadata.scenario} : Testid - ${test.Metadata.testId}`, async function () { + + if (test.Metadata.scenario === "positive") { + var data; + try { + data = await instance.deleteCustomAction( + // customActionIdentifier custom_action_identifier + test.Path_Variables.custom_action_identifier + ) + } catch (er) { + console.error(er, "Response", data) + expect(er).to.be.undefined + } + } else { + await expect( + instance.deleteCustomAction( + // customActionIdentifier custom_action_identifier + test.Path_Variables.custom_action_identifier + ) + ).to.be.rejectedWith(Error); + } + + }); + }); + }); + + describe('searchCustomActions', function() { + + const testReqBodies = requestBodies.filter( + (body: any) => body.Metadata.operationId === "searchCustomActions" + ); + testReqBodies.forEach(async (test: any) => { + it(`${test.Metadata.operationId} - ${test.Metadata.scenario} : Testid - ${test.Metadata.testId}`, async function () { + + if (test.Metadata.scenario === "positive") { + var data; + try { + data = await instance.searchCustomActions( + // searchCustomActionsRequest SearchCustomActionsRequest + test.Body + ) + } catch (er) { + console.error(er, "Response", data) + expect(er).to.be.undefined + } + } else { + await expect( + instance.searchCustomActions( + // searchCustomActionsRequest SearchCustomActionsRequest + test.Body + ) + ).to.be.rejectedWith(Error); + } + + }); + }); + }); + + describe('updateCustomAction', function() { + + const testReqBodies = requestBodies.filter( + (body: any) => body.Metadata.operationId === "updateCustomAction" + ); + testReqBodies.forEach(async (test: any) => { + it(`${test.Metadata.operationId} - ${test.Metadata.scenario} : Testid - ${test.Metadata.testId}`, async function () { + + if (test.Metadata.scenario === "positive") { + var data; + try { + data = await instance.updateCustomAction( + // customActionIdentifier custom_action_identifier + test.Path_Variables.custom_action_identifier , + // updateCustomActionRequest UpdateCustomActionRequest + test.Body + ) + } catch (er) { + console.error(er, "Response", data) + expect(er).to.be.undefined + } + } else { + await expect( + instance.updateCustomAction( + // customActionIdentifier custom_action_identifier + test.Path_Variables.custom_action_identifier , + // updateCustomActionRequest UpdateCustomActionRequest + test.Body + ) + ).to.be.rejectedWith(Error); + } + + }); + }); + }); +}); diff --git a/sdks/typescript/tests/CustomCalendarsApiTest.ts b/sdks/typescript/tests/CustomCalendarsApiTest.ts new file mode 100644 index 000000000..9c4ccaa88 --- /dev/null +++ b/sdks/typescript/tests/CustomCalendarsApiTest.ts @@ -0,0 +1,188 @@ +import chai from "chai"; +import chaiAsPromised from "chai-as-promised"; +import { createBearerAuthenticationConfig } from "../utils/config"; +import { PromiseCustomCalendarsApi } from "../types/PromiseAPI"; +import requestBodies from "./testDataUpdated.json"; + +chai.use(chaiAsPromised); +const expect = chai.expect; + + + +const baseUrlFromCli = process.argv.filter(s => s.startsWith("--baseUrl="))?.[0]?.split("=")?.[1] +const BASE_URL = baseUrlFromCli || "http://127.0.0.1:4123" +const config = createBearerAuthenticationConfig(BASE_URL, { + username: "tsadmin", + password: "admin", +}); + + +const instance = new PromiseCustomCalendarsApi(config); + +describe('CustomCalendarsApi', function() { + + + describe('createCalendar', function() { + + const testReqBodies = requestBodies.filter( + (body: any) => body.Metadata.operationId === "createCalendar" + ); + testReqBodies.forEach(async (test: any) => { + it(`${test.Metadata.operationId} - ${test.Metadata.scenario} : Testid - ${test.Metadata.testId}`, async function () { + + if (test.Metadata.scenario === "positive") { + var data; + try { + data = await instance.createCalendar( + // createCalendarRequest CreateCalendarRequest + test.Body + ) + } catch (er) { + console.error(er, "Response", data) + expect(er).to.be.undefined + } + } else { + await expect( + instance.createCalendar( + // createCalendarRequest CreateCalendarRequest + test.Body + ) + ).to.be.rejectedWith(Error); + } + + }); + }); + }); + + describe('deleteCalendar', function() { + + const testReqBodies = requestBodies.filter( + (body: any) => body.Metadata.operationId === "deleteCalendar" + ); + testReqBodies.forEach(async (test: any) => { + it(`${test.Metadata.operationId} - ${test.Metadata.scenario} : Testid - ${test.Metadata.testId}`, async function () { + + if (test.Metadata.scenario === "positive") { + var data; + try { + data = await instance.deleteCalendar( + // calendarIdentifier calendar_identifier + test.Path_Variables.calendar_identifier + ) + } catch (er) { + console.error(er, "Response", data) + expect(er).to.be.undefined + } + } else { + await expect( + instance.deleteCalendar( + // calendarIdentifier calendar_identifier + test.Path_Variables.calendar_identifier + ) + ).to.be.rejectedWith(Error); + } + + }); + }); + }); + + describe('generateCSV', function() { + + const testReqBodies = requestBodies.filter( + (body: any) => body.Metadata.operationId === "generateCSV" + ); + testReqBodies.forEach(async (test: any) => { + it(`${test.Metadata.operationId} - ${test.Metadata.scenario} : Testid - ${test.Metadata.testId}`, async function () { + + if (test.Metadata.scenario === "positive") { + var data; + try { + data = await instance.generateCSV( + // generateCSVRequest GenerateCSVRequest + test.Body + ) + } catch (er) { + console.error(er, "Response", data) + expect(er).to.be.undefined + } + } else { + await expect( + instance.generateCSV( + // generateCSVRequest GenerateCSVRequest + test.Body + ) + ).to.be.rejectedWith(Error); + } + + }); + }); + }); + + describe('searchCalendars', function() { + + const testReqBodies = requestBodies.filter( + (body: any) => body.Metadata.operationId === "searchCalendars" + ); + testReqBodies.forEach(async (test: any) => { + it(`${test.Metadata.operationId} - ${test.Metadata.scenario} : Testid - ${test.Metadata.testId}`, async function () { + + if (test.Metadata.scenario === "positive") { + var data; + try { + data = await instance.searchCalendars( + // searchCalendarsRequest SearchCalendarsRequest + test.Body + ) + } catch (er) { + console.error(er, "Response", data) + expect(er).to.be.undefined + } + } else { + await expect( + instance.searchCalendars( + // searchCalendarsRequest SearchCalendarsRequest + test.Body + ) + ).to.be.rejectedWith(Error); + } + + }); + }); + }); + + describe('updateCalendar', function() { + + const testReqBodies = requestBodies.filter( + (body: any) => body.Metadata.operationId === "updateCalendar" + ); + testReqBodies.forEach(async (test: any) => { + it(`${test.Metadata.operationId} - ${test.Metadata.scenario} : Testid - ${test.Metadata.testId}`, async function () { + + if (test.Metadata.scenario === "positive") { + var data; + try { + data = await instance.updateCalendar( + // calendarIdentifier calendar_identifier + test.Path_Variables.calendar_identifier , + // updateCalendarRequest UpdateCalendarRequest + test.Body + ) + } catch (er) { + console.error(er, "Response", data) + expect(er).to.be.undefined + } + } else { + await expect( + instance.updateCalendar( + // calendarIdentifier calendar_identifier + test.Path_Variables.calendar_identifier , + // updateCalendarRequest UpdateCalendarRequest + test.Body + ) + ).to.be.rejectedWith(Error); + } + + }); + }); + }); +}); diff --git a/sdks/typescript/tests/DBTApiTest.ts b/sdks/typescript/tests/DBTApiTest.ts new file mode 100644 index 000000000..6522acb47 --- /dev/null +++ b/sdks/typescript/tests/DBTApiTest.ts @@ -0,0 +1,308 @@ +import chai from "chai"; +import chaiAsPromised from "chai-as-promised"; +import { createBearerAuthenticationConfig } from "../utils/config"; +import { PromiseDBTApi } from "../types/PromiseAPI"; +import requestBodies from "./testDataUpdated.json"; + +chai.use(chaiAsPromised); +const expect = chai.expect; + + + +const baseUrlFromCli = process.argv.filter(s => s.startsWith("--baseUrl="))?.[0]?.split("=")?.[1] +const BASE_URL = baseUrlFromCli || "http://127.0.0.1:4123" +const config = createBearerAuthenticationConfig(BASE_URL, { + username: "tsadmin", + password: "admin", +}); + + +const instance = new PromiseDBTApi(config); + +describe('DBTApi', function() { + + + describe('dbtConnection', function() { + + const testReqBodies = requestBodies.filter( + (body: any) => body.Metadata.operationId === "dbtConnection" + ); + testReqBodies.forEach(async (test: any) => { + it(`${test.Metadata.operationId} - ${test.Metadata.scenario} : Testid - ${test.Metadata.testId}`, async function () { + + if (test.Metadata.scenario === "positive") { + var data; + try { + data = await instance.dbtConnection( + // connectionName connection_name + , + // databaseName database_name + , + // importType import_type + , + // accessToken access_token + , + // dbtUrl dbt_url + , + // accountId account_id + , + // projectId project_id + , + // dbtEnvId dbt_env_id + , + // projectName project_name + , + // fileContent file_content + + ) + } catch (er) { + console.error(er, "Response", data) + expect(er).to.be.undefined + } + } else { + await expect( + instance.dbtConnection( + // connectionName connection_name + , + // databaseName database_name + , + // importType import_type + , + // accessToken access_token + , + // dbtUrl dbt_url + , + // accountId account_id + , + // projectId project_id + , + // dbtEnvId dbt_env_id + , + // projectName project_name + , + // fileContent file_content + + ) + ).to.be.rejectedWith(Error); + } + + }); + }); + }); + + describe('dbtGenerateSyncTml', function() { + + const testReqBodies = requestBodies.filter( + (body: any) => body.Metadata.operationId === "dbtGenerateSyncTml" + ); + testReqBodies.forEach(async (test: any) => { + it(`${test.Metadata.operationId} - ${test.Metadata.scenario} : Testid - ${test.Metadata.testId}`, async function () { + + if (test.Metadata.scenario === "positive") { + var data; + try { + data = await instance.dbtGenerateSyncTml( + // dbtConnectionIdentifier dbt_connection_identifier + , + // fileContent file_content + + ) + } catch (er) { + console.error(er, "Response", data) + expect(er).to.be.undefined + } + } else { + await expect( + instance.dbtGenerateSyncTml( + // dbtConnectionIdentifier dbt_connection_identifier + , + // fileContent file_content + + ) + ).to.be.rejectedWith(Error); + } + + }); + }); + }); + + describe('dbtGenerateTml', function() { + + const testReqBodies = requestBodies.filter( + (body: any) => body.Metadata.operationId === "dbtGenerateTml" + ); + testReqBodies.forEach(async (test: any) => { + it(`${test.Metadata.operationId} - ${test.Metadata.scenario} : Testid - ${test.Metadata.testId}`, async function () { + + if (test.Metadata.scenario === "positive") { + var data; + try { + data = await instance.dbtGenerateTml( + // dbtConnectionIdentifier dbt_connection_identifier + , + // modelTables model_tables + , + // importWorksheets import_worksheets + , + // worksheets worksheets + , + // fileContent file_content + + ) + } catch (er) { + console.error(er, "Response", data) + expect(er).to.be.undefined + } + } else { + await expect( + instance.dbtGenerateTml( + // dbtConnectionIdentifier dbt_connection_identifier + , + // modelTables model_tables + , + // importWorksheets import_worksheets + , + // worksheets worksheets + , + // fileContent file_content + + ) + ).to.be.rejectedWith(Error); + } + + }); + }); + }); + + describe('dbtSearch', function() { + + const testReqBodies = requestBodies.filter( + (body: any) => body.Metadata.operationId === "dbtSearch" + ); + testReqBodies.forEach(async (test: any) => { + it(`${test.Metadata.operationId} - ${test.Metadata.scenario} : Testid - ${test.Metadata.testId}`, async function () { + + if (test.Metadata.scenario === "positive") { + var data; + try { + data = await instance.dbtSearch( + ) + } catch (er) { + console.error(er, "Response", data) + expect(er).to.be.undefined + } + } else { + await expect( + instance.dbtSearch( + ) + ).to.be.rejectedWith(Error); + } + + }); + }); + }); + + describe('deleteDbtConnection', function() { + + const testReqBodies = requestBodies.filter( + (body: any) => body.Metadata.operationId === "deleteDbtConnection" + ); + testReqBodies.forEach(async (test: any) => { + it(`${test.Metadata.operationId} - ${test.Metadata.scenario} : Testid - ${test.Metadata.testId}`, async function () { + + if (test.Metadata.scenario === "positive") { + var data; + try { + data = await instance.deleteDbtConnection( + // dbtConnectionIdentifier dbt_connection_identifier + test.Path_Variables.dbt_connection_identifier + ) + } catch (er) { + console.error(er, "Response", data) + expect(er).to.be.undefined + } + } else { + await expect( + instance.deleteDbtConnection( + // dbtConnectionIdentifier dbt_connection_identifier + test.Path_Variables.dbt_connection_identifier + ) + ).to.be.rejectedWith(Error); + } + + }); + }); + }); + + describe('updateDbtConnection', function() { + + const testReqBodies = requestBodies.filter( + (body: any) => body.Metadata.operationId === "updateDbtConnection" + ); + testReqBodies.forEach(async (test: any) => { + it(`${test.Metadata.operationId} - ${test.Metadata.scenario} : Testid - ${test.Metadata.testId}`, async function () { + + if (test.Metadata.scenario === "positive") { + var data; + try { + data = await instance.updateDbtConnection( + // dbtConnectionIdentifier dbt_connection_identifier + , + // connectionName connection_name + , + // databaseName database_name + , + // importType import_type + , + // accessToken access_token + , + // dbtUrl dbt_url + , + // accountId account_id + , + // projectId project_id + , + // dbtEnvId dbt_env_id + , + // projectName project_name + , + // fileContent file_content + + ) + } catch (er) { + console.error(er, "Response", data) + expect(er).to.be.undefined + } + } else { + await expect( + instance.updateDbtConnection( + // dbtConnectionIdentifier dbt_connection_identifier + , + // connectionName connection_name + , + // databaseName database_name + , + // importType import_type + , + // accessToken access_token + , + // dbtUrl dbt_url + , + // accountId account_id + , + // projectId project_id + , + // dbtEnvId dbt_env_id + , + // projectName project_name + , + // fileContent file_content + + ) + ).to.be.rejectedWith(Error); + } + + }); + }); + }); +}); diff --git a/sdks/typescript/tests/DataApiTest.ts b/sdks/typescript/tests/DataApiTest.ts new file mode 100644 index 000000000..55e26d318 --- /dev/null +++ b/sdks/typescript/tests/DataApiTest.ts @@ -0,0 +1,120 @@ +import chai from "chai"; +import chaiAsPromised from "chai-as-promised"; +import { createBearerAuthenticationConfig } from "../utils/config"; +import { PromiseDataApi } from "../types/PromiseAPI"; +import requestBodies from "./testDataUpdated.json"; + +chai.use(chaiAsPromised); +const expect = chai.expect; + + + +const baseUrlFromCli = process.argv.filter(s => s.startsWith("--baseUrl="))?.[0]?.split("=")?.[1] +const BASE_URL = baseUrlFromCli || "http://127.0.0.1:4123" +const config = createBearerAuthenticationConfig(BASE_URL, { + username: "tsadmin", + password: "admin", +}); + + +const instance = new PromiseDataApi(config); + +describe('DataApi', function() { + + + describe('fetchAnswerData', function() { + + const testReqBodies = requestBodies.filter( + (body: any) => body.Metadata.operationId === "fetchAnswerData" + ); + testReqBodies.forEach(async (test: any) => { + it(`${test.Metadata.operationId} - ${test.Metadata.scenario} : Testid - ${test.Metadata.testId}`, async function () { + + if (test.Metadata.scenario === "positive") { + var data; + try { + data = await instance.fetchAnswerData( + // fetchAnswerDataRequest FetchAnswerDataRequest + test.Body + ) + } catch (er) { + console.error(er, "Response", data) + expect(er).to.be.undefined + } + } else { + await expect( + instance.fetchAnswerData( + // fetchAnswerDataRequest FetchAnswerDataRequest + test.Body + ) + ).to.be.rejectedWith(Error); + } + + }); + }); + }); + + describe('fetchLiveboardData', function() { + + const testReqBodies = requestBodies.filter( + (body: any) => body.Metadata.operationId === "fetchLiveboardData" + ); + testReqBodies.forEach(async (test: any) => { + it(`${test.Metadata.operationId} - ${test.Metadata.scenario} : Testid - ${test.Metadata.testId}`, async function () { + + if (test.Metadata.scenario === "positive") { + var data; + try { + data = await instance.fetchLiveboardData( + // fetchLiveboardDataRequest FetchLiveboardDataRequest + test.Body + ) + } catch (er) { + console.error(er, "Response", data) + expect(er).to.be.undefined + } + } else { + await expect( + instance.fetchLiveboardData( + // fetchLiveboardDataRequest FetchLiveboardDataRequest + test.Body + ) + ).to.be.rejectedWith(Error); + } + + }); + }); + }); + + describe('searchData', function() { + + const testReqBodies = requestBodies.filter( + (body: any) => body.Metadata.operationId === "searchData" + ); + testReqBodies.forEach(async (test: any) => { + it(`${test.Metadata.operationId} - ${test.Metadata.scenario} : Testid - ${test.Metadata.testId}`, async function () { + + if (test.Metadata.scenario === "positive") { + var data; + try { + data = await instance.searchData( + // searchDataRequest SearchDataRequest + test.Body + ) + } catch (er) { + console.error(er, "Response", data) + expect(er).to.be.undefined + } + } else { + await expect( + instance.searchData( + // searchDataRequest SearchDataRequest + test.Body + ) + ).to.be.rejectedWith(Error); + } + + }); + }); + }); +}); diff --git a/sdks/typescript/tests/EmailCustomizationApiTest.ts b/sdks/typescript/tests/EmailCustomizationApiTest.ts new file mode 100644 index 000000000..e86f96140 --- /dev/null +++ b/sdks/typescript/tests/EmailCustomizationApiTest.ts @@ -0,0 +1,212 @@ +import chai from "chai"; +import chaiAsPromised from "chai-as-promised"; +import { createBearerAuthenticationConfig } from "../utils/config"; +import { PromiseEmailCustomizationApi } from "../types/PromiseAPI"; +import requestBodies from "./testDataUpdated.json"; + +chai.use(chaiAsPromised); +const expect = chai.expect; + + + +const baseUrlFromCli = process.argv.filter(s => s.startsWith("--baseUrl="))?.[0]?.split("=")?.[1] +const BASE_URL = baseUrlFromCli || "http://127.0.0.1:4123" +const config = createBearerAuthenticationConfig(BASE_URL, { + username: "tsadmin", + password: "admin", +}); + + +const instance = new PromiseEmailCustomizationApi(config); + +describe('EmailCustomizationApi', function() { + + + describe('createEmailCustomization', function() { + + const testReqBodies = requestBodies.filter( + (body: any) => body.Metadata.operationId === "createEmailCustomization" + ); + testReqBodies.forEach(async (test: any) => { + it(`${test.Metadata.operationId} - ${test.Metadata.scenario} : Testid - ${test.Metadata.testId}`, async function () { + + if (test.Metadata.scenario === "positive") { + var data; + try { + data = await instance.createEmailCustomization( + // createEmailCustomizationRequest CreateEmailCustomizationRequest + test.Body + ) + } catch (er) { + console.error(er, "Response", data) + expect(er).to.be.undefined + } + } else { + await expect( + instance.createEmailCustomization( + // createEmailCustomizationRequest CreateEmailCustomizationRequest + test.Body + ) + ).to.be.rejectedWith(Error); + } + + }); + }); + }); + + describe('deleteEmailCustomization', function() { + + const testReqBodies = requestBodies.filter( + (body: any) => body.Metadata.operationId === "deleteEmailCustomization" + ); + testReqBodies.forEach(async (test: any) => { + it(`${test.Metadata.operationId} - ${test.Metadata.scenario} : Testid - ${test.Metadata.testId}`, async function () { + + if (test.Metadata.scenario === "positive") { + var data; + try { + data = await instance.deleteEmailCustomization( + // templateIdentifier template_identifier + test.Path_Variables.template_identifier + ) + } catch (er) { + console.error(er, "Response", data) + expect(er).to.be.undefined + } + } else { + await expect( + instance.deleteEmailCustomization( + // templateIdentifier template_identifier + test.Path_Variables.template_identifier + ) + ).to.be.rejectedWith(Error); + } + + }); + }); + }); + + describe('deleteOrgEmailCustomization', function() { + + const testReqBodies = requestBodies.filter( + (body: any) => body.Metadata.operationId === "deleteOrgEmailCustomization" + ); + testReqBodies.forEach(async (test: any) => { + it(`${test.Metadata.operationId} - ${test.Metadata.scenario} : Testid - ${test.Metadata.testId}`, async function () { + + if (test.Metadata.scenario === "positive") { + var data; + try { + data = await instance.deleteOrgEmailCustomization( + // deleteOrgEmailCustomizationRequest DeleteOrgEmailCustomizationRequest + test.Body + ) + } catch (er) { + console.error(er, "Response", data) + expect(er).to.be.undefined + } + } else { + await expect( + instance.deleteOrgEmailCustomization( + // deleteOrgEmailCustomizationRequest DeleteOrgEmailCustomizationRequest + test.Body + ) + ).to.be.rejectedWith(Error); + } + + }); + }); + }); + + describe('searchEmailCustomization', function() { + + const testReqBodies = requestBodies.filter( + (body: any) => body.Metadata.operationId === "searchEmailCustomization" + ); + testReqBodies.forEach(async (test: any) => { + it(`${test.Metadata.operationId} - ${test.Metadata.scenario} : Testid - ${test.Metadata.testId}`, async function () { + + if (test.Metadata.scenario === "positive") { + var data; + try { + data = await instance.searchEmailCustomization( + // searchEmailCustomizationRequest SearchEmailCustomizationRequest + test.Body + ) + } catch (er) { + console.error(er, "Response", data) + expect(er).to.be.undefined + } + } else { + await expect( + instance.searchEmailCustomization( + // searchEmailCustomizationRequest SearchEmailCustomizationRequest + test.Body + ) + ).to.be.rejectedWith(Error); + } + + }); + }); + }); + + describe('updateEmailCustomization', function() { + + const testReqBodies = requestBodies.filter( + (body: any) => body.Metadata.operationId === "updateEmailCustomization" + ); + testReqBodies.forEach(async (test: any) => { + it(`${test.Metadata.operationId} - ${test.Metadata.scenario} : Testid - ${test.Metadata.testId}`, async function () { + + if (test.Metadata.scenario === "positive") { + var data; + try { + data = await instance.updateEmailCustomization( + // updateEmailCustomizationRequest UpdateEmailCustomizationRequest + test.Body + ) + } catch (er) { + console.error(er, "Response", data) + expect(er).to.be.undefined + } + } else { + await expect( + instance.updateEmailCustomization( + // updateEmailCustomizationRequest UpdateEmailCustomizationRequest + test.Body + ) + ).to.be.rejectedWith(Error); + } + + }); + }); + }); + + describe('validateEmailCustomization', function() { + + const testReqBodies = requestBodies.filter( + (body: any) => body.Metadata.operationId === "validateEmailCustomization" + ); + testReqBodies.forEach(async (test: any) => { + it(`${test.Metadata.operationId} - ${test.Metadata.scenario} : Testid - ${test.Metadata.testId}`, async function () { + + if (test.Metadata.scenario === "positive") { + var data; + try { + data = await instance.validateEmailCustomization( + ) + } catch (er) { + console.error(er, "Response", data) + expect(er).to.be.undefined + } + } else { + await expect( + instance.validateEmailCustomization( + ) + ).to.be.rejectedWith(Error); + } + + }); + }); + }); +}); diff --git a/sdks/typescript/tests/GroupsApiTest.ts b/sdks/typescript/tests/GroupsApiTest.ts new file mode 100644 index 000000000..7d9a5abaa --- /dev/null +++ b/sdks/typescript/tests/GroupsApiTest.ts @@ -0,0 +1,188 @@ +import chai from "chai"; +import chaiAsPromised from "chai-as-promised"; +import { createBearerAuthenticationConfig } from "../utils/config"; +import { PromiseGroupsApi } from "../types/PromiseAPI"; +import requestBodies from "./testDataUpdated.json"; + +chai.use(chaiAsPromised); +const expect = chai.expect; + + + +const baseUrlFromCli = process.argv.filter(s => s.startsWith("--baseUrl="))?.[0]?.split("=")?.[1] +const BASE_URL = baseUrlFromCli || "http://127.0.0.1:4123" +const config = createBearerAuthenticationConfig(BASE_URL, { + username: "tsadmin", + password: "admin", +}); + + +const instance = new PromiseGroupsApi(config); + +describe('GroupsApi', function() { + + + describe('createUserGroup', function() { + + const testReqBodies = requestBodies.filter( + (body: any) => body.Metadata.operationId === "createUserGroup" + ); + testReqBodies.forEach(async (test: any) => { + it(`${test.Metadata.operationId} - ${test.Metadata.scenario} : Testid - ${test.Metadata.testId}`, async function () { + + if (test.Metadata.scenario === "positive") { + var data; + try { + data = await instance.createUserGroup( + // createUserGroupRequest CreateUserGroupRequest + test.Body + ) + } catch (er) { + console.error(er, "Response", data) + expect(er).to.be.undefined + } + } else { + await expect( + instance.createUserGroup( + // createUserGroupRequest CreateUserGroupRequest + test.Body + ) + ).to.be.rejectedWith(Error); + } + + }); + }); + }); + + describe('deleteUserGroup', function() { + + const testReqBodies = requestBodies.filter( + (body: any) => body.Metadata.operationId === "deleteUserGroup" + ); + testReqBodies.forEach(async (test: any) => { + it(`${test.Metadata.operationId} - ${test.Metadata.scenario} : Testid - ${test.Metadata.testId}`, async function () { + + if (test.Metadata.scenario === "positive") { + var data; + try { + data = await instance.deleteUserGroup( + // groupIdentifier group_identifier + test.Path_Variables.group_identifier + ) + } catch (er) { + console.error(er, "Response", data) + expect(er).to.be.undefined + } + } else { + await expect( + instance.deleteUserGroup( + // groupIdentifier group_identifier + test.Path_Variables.group_identifier + ) + ).to.be.rejectedWith(Error); + } + + }); + }); + }); + + describe('importUserGroups', function() { + + const testReqBodies = requestBodies.filter( + (body: any) => body.Metadata.operationId === "importUserGroups" + ); + testReqBodies.forEach(async (test: any) => { + it(`${test.Metadata.operationId} - ${test.Metadata.scenario} : Testid - ${test.Metadata.testId}`, async function () { + + if (test.Metadata.scenario === "positive") { + var data; + try { + data = await instance.importUserGroups( + // importUserGroupsRequest ImportUserGroupsRequest + test.Body + ) + } catch (er) { + console.error(er, "Response", data) + expect(er).to.be.undefined + } + } else { + await expect( + instance.importUserGroups( + // importUserGroupsRequest ImportUserGroupsRequest + test.Body + ) + ).to.be.rejectedWith(Error); + } + + }); + }); + }); + + describe('searchUserGroups', function() { + + const testReqBodies = requestBodies.filter( + (body: any) => body.Metadata.operationId === "searchUserGroups" + ); + testReqBodies.forEach(async (test: any) => { + it(`${test.Metadata.operationId} - ${test.Metadata.scenario} : Testid - ${test.Metadata.testId}`, async function () { + + if (test.Metadata.scenario === "positive") { + var data; + try { + data = await instance.searchUserGroups( + // searchUserGroupsRequest SearchUserGroupsRequest + test.Body + ) + } catch (er) { + console.error(er, "Response", data) + expect(er).to.be.undefined + } + } else { + await expect( + instance.searchUserGroups( + // searchUserGroupsRequest SearchUserGroupsRequest + test.Body + ) + ).to.be.rejectedWith(Error); + } + + }); + }); + }); + + describe('updateUserGroup', function() { + + const testReqBodies = requestBodies.filter( + (body: any) => body.Metadata.operationId === "updateUserGroup" + ); + testReqBodies.forEach(async (test: any) => { + it(`${test.Metadata.operationId} - ${test.Metadata.scenario} : Testid - ${test.Metadata.testId}`, async function () { + + if (test.Metadata.scenario === "positive") { + var data; + try { + data = await instance.updateUserGroup( + // groupIdentifier group_identifier + test.Path_Variables.group_identifier , + // updateUserGroupRequest UpdateUserGroupRequest + test.Body + ) + } catch (er) { + console.error(er, "Response", data) + expect(er).to.be.undefined + } + } else { + await expect( + instance.updateUserGroup( + // groupIdentifier group_identifier + test.Path_Variables.group_identifier , + // updateUserGroupRequest UpdateUserGroupRequest + test.Body + ) + ).to.be.rejectedWith(Error); + } + + }); + }); + }); +}); diff --git a/sdks/typescript/tests/JobsApiTest.ts b/sdks/typescript/tests/JobsApiTest.ts new file mode 100644 index 000000000..59161b1d1 --- /dev/null +++ b/sdks/typescript/tests/JobsApiTest.ts @@ -0,0 +1,56 @@ +import chai from "chai"; +import chaiAsPromised from "chai-as-promised"; +import { createBearerAuthenticationConfig } from "../utils/config"; +import { PromiseJobsApi } from "../types/PromiseAPI"; +import requestBodies from "./testDataUpdated.json"; + +chai.use(chaiAsPromised); +const expect = chai.expect; + + + +const baseUrlFromCli = process.argv.filter(s => s.startsWith("--baseUrl="))?.[0]?.split("=")?.[1] +const BASE_URL = baseUrlFromCli || "http://127.0.0.1:4123" +const config = createBearerAuthenticationConfig(BASE_URL, { + username: "tsadmin", + password: "admin", +}); + + +const instance = new PromiseJobsApi(config); + +describe('JobsApi', function() { + + + describe('searchChannelHistory', function() { + + const testReqBodies = requestBodies.filter( + (body: any) => body.Metadata.operationId === "searchChannelHistory" + ); + testReqBodies.forEach(async (test: any) => { + it(`${test.Metadata.operationId} - ${test.Metadata.scenario} : Testid - ${test.Metadata.testId}`, async function () { + + if (test.Metadata.scenario === "positive") { + var data; + try { + data = await instance.searchChannelHistory( + // searchChannelHistoryRequest SearchChannelHistoryRequest + test.Body + ) + } catch (er) { + console.error(er, "Response", data) + expect(er).to.be.undefined + } + } else { + await expect( + instance.searchChannelHistory( + // searchChannelHistoryRequest SearchChannelHistoryRequest + test.Body + ) + ).to.be.rejectedWith(Error); + } + + }); + }); + }); +}); diff --git a/sdks/typescript/tests/LogApiTest.ts b/sdks/typescript/tests/LogApiTest.ts new file mode 100644 index 000000000..02c0fee42 --- /dev/null +++ b/sdks/typescript/tests/LogApiTest.ts @@ -0,0 +1,56 @@ +import chai from "chai"; +import chaiAsPromised from "chai-as-promised"; +import { createBearerAuthenticationConfig } from "../utils/config"; +import { PromiseLogApi } from "../types/PromiseAPI"; +import requestBodies from "./testDataUpdated.json"; + +chai.use(chaiAsPromised); +const expect = chai.expect; + + + +const baseUrlFromCli = process.argv.filter(s => s.startsWith("--baseUrl="))?.[0]?.split("=")?.[1] +const BASE_URL = baseUrlFromCli || "http://127.0.0.1:4123" +const config = createBearerAuthenticationConfig(BASE_URL, { + username: "tsadmin", + password: "admin", +}); + + +const instance = new PromiseLogApi(config); + +describe('LogApi', function() { + + + describe('fetchLogs', function() { + + const testReqBodies = requestBodies.filter( + (body: any) => body.Metadata.operationId === "fetchLogs" + ); + testReqBodies.forEach(async (test: any) => { + it(`${test.Metadata.operationId} - ${test.Metadata.scenario} : Testid - ${test.Metadata.testId}`, async function () { + + if (test.Metadata.scenario === "positive") { + var data; + try { + data = await instance.fetchLogs( + // fetchLogsRequest FetchLogsRequest + test.Body + ) + } catch (er) { + console.error(er, "Response", data) + expect(er).to.be.undefined + } + } else { + await expect( + instance.fetchLogs( + // fetchLogsRequest FetchLogsRequest + test.Body + ) + ).to.be.rejectedWith(Error); + } + + }); + }); + }); +}); diff --git a/sdks/typescript/tests/MetadataApiTest.ts b/sdks/typescript/tests/MetadataApiTest.ts new file mode 100644 index 000000000..9e16e425f --- /dev/null +++ b/sdks/typescript/tests/MetadataApiTest.ts @@ -0,0 +1,536 @@ +import chai from "chai"; +import chaiAsPromised from "chai-as-promised"; +import { createBearerAuthenticationConfig } from "../utils/config"; +import { PromiseMetadataApi } from "../types/PromiseAPI"; +import requestBodies from "./testDataUpdated.json"; + +chai.use(chaiAsPromised); +const expect = chai.expect; + + + +const baseUrlFromCli = process.argv.filter(s => s.startsWith("--baseUrl="))?.[0]?.split("=")?.[1] +const BASE_URL = baseUrlFromCli || "http://127.0.0.1:4123" +const config = createBearerAuthenticationConfig(BASE_URL, { + username: "tsadmin", + password: "admin", +}); + + +const instance = new PromiseMetadataApi(config); + +describe('MetadataApi', function() { + + + describe('convertWorksheetToModel', function() { + + const testReqBodies = requestBodies.filter( + (body: any) => body.Metadata.operationId === "convertWorksheetToModel" + ); + testReqBodies.forEach(async (test: any) => { + it(`${test.Metadata.operationId} - ${test.Metadata.scenario} : Testid - ${test.Metadata.testId}`, async function () { + + if (test.Metadata.scenario === "positive") { + var data; + try { + data = await instance.convertWorksheetToModel( + // convertWorksheetToModelRequest ConvertWorksheetToModelRequest + test.Body + ) + } catch (er) { + console.error(er, "Response", data) + expect(er).to.be.undefined + } + } else { + await expect( + instance.convertWorksheetToModel( + // convertWorksheetToModelRequest ConvertWorksheetToModelRequest + test.Body + ) + ).to.be.rejectedWith(Error); + } + + }); + }); + }); + + describe('copyObject', function() { + + const testReqBodies = requestBodies.filter( + (body: any) => body.Metadata.operationId === "copyObject" + ); + testReqBodies.forEach(async (test: any) => { + it(`${test.Metadata.operationId} - ${test.Metadata.scenario} : Testid - ${test.Metadata.testId}`, async function () { + + if (test.Metadata.scenario === "positive") { + var data; + try { + data = await instance.copyObject( + // copyObjectRequest CopyObjectRequest + test.Body + ) + } catch (er) { + console.error(er, "Response", data) + expect(er).to.be.undefined + } + } else { + await expect( + instance.copyObject( + // copyObjectRequest CopyObjectRequest + test.Body + ) + ).to.be.rejectedWith(Error); + } + + }); + }); + }); + + describe('deleteMetadata', function() { + + const testReqBodies = requestBodies.filter( + (body: any) => body.Metadata.operationId === "deleteMetadata" + ); + testReqBodies.forEach(async (test: any) => { + it(`${test.Metadata.operationId} - ${test.Metadata.scenario} : Testid - ${test.Metadata.testId}`, async function () { + + if (test.Metadata.scenario === "positive") { + var data; + try { + data = await instance.deleteMetadata( + // deleteMetadataRequest DeleteMetadataRequest + test.Body + ) + } catch (er) { + console.error(er, "Response", data) + expect(er).to.be.undefined + } + } else { + await expect( + instance.deleteMetadata( + // deleteMetadataRequest DeleteMetadataRequest + test.Body + ) + ).to.be.rejectedWith(Error); + } + + }); + }); + }); + + describe('exportMetadataTML', function() { + + const testReqBodies = requestBodies.filter( + (body: any) => body.Metadata.operationId === "exportMetadataTML" + ); + testReqBodies.forEach(async (test: any) => { + it(`${test.Metadata.operationId} - ${test.Metadata.scenario} : Testid - ${test.Metadata.testId}`, async function () { + + if (test.Metadata.scenario === "positive") { + var data; + try { + data = await instance.exportMetadataTML( + // exportMetadataTMLRequest ExportMetadataTMLRequest + test.Body + ) + } catch (er) { + console.error(er, "Response", data) + expect(er).to.be.undefined + } + } else { + await expect( + instance.exportMetadataTML( + // exportMetadataTMLRequest ExportMetadataTMLRequest + test.Body + ) + ).to.be.rejectedWith(Error); + } + + }); + }); + }); + + describe('exportMetadataTMLBatched', function() { + + const testReqBodies = requestBodies.filter( + (body: any) => body.Metadata.operationId === "exportMetadataTMLBatched" + ); + testReqBodies.forEach(async (test: any) => { + it(`${test.Metadata.operationId} - ${test.Metadata.scenario} : Testid - ${test.Metadata.testId}`, async function () { + + if (test.Metadata.scenario === "positive") { + var data; + try { + data = await instance.exportMetadataTMLBatched( + // exportMetadataTMLBatchedRequest ExportMetadataTMLBatchedRequest + test.Body + ) + } catch (er) { + console.error(er, "Response", data) + expect(er).to.be.undefined + } + } else { + await expect( + instance.exportMetadataTMLBatched( + // exportMetadataTMLBatchedRequest ExportMetadataTMLBatchedRequest + test.Body + ) + ).to.be.rejectedWith(Error); + } + + }); + }); + }); + + describe('fetchAnswerSqlQuery', function() { + + const testReqBodies = requestBodies.filter( + (body: any) => body.Metadata.operationId === "fetchAnswerSqlQuery" + ); + testReqBodies.forEach(async (test: any) => { + it(`${test.Metadata.operationId} - ${test.Metadata.scenario} : Testid - ${test.Metadata.testId}`, async function () { + + if (test.Metadata.scenario === "positive") { + var data; + try { + data = await instance.fetchAnswerSqlQuery( + // fetchAnswerSqlQueryRequest FetchAnswerSqlQueryRequest + test.Body + ) + } catch (er) { + console.error(er, "Response", data) + expect(er).to.be.undefined + } + } else { + await expect( + instance.fetchAnswerSqlQuery( + // fetchAnswerSqlQueryRequest FetchAnswerSqlQueryRequest + test.Body + ) + ).to.be.rejectedWith(Error); + } + + }); + }); + }); + + describe('fetchAsyncImportTaskStatus', function() { + + const testReqBodies = requestBodies.filter( + (body: any) => body.Metadata.operationId === "fetchAsyncImportTaskStatus" + ); + testReqBodies.forEach(async (test: any) => { + it(`${test.Metadata.operationId} - ${test.Metadata.scenario} : Testid - ${test.Metadata.testId}`, async function () { + + if (test.Metadata.scenario === "positive") { + var data; + try { + data = await instance.fetchAsyncImportTaskStatus( + // fetchAsyncImportTaskStatusRequest FetchAsyncImportTaskStatusRequest + test.Body + ) + } catch (er) { + console.error(er, "Response", data) + expect(er).to.be.undefined + } + } else { + await expect( + instance.fetchAsyncImportTaskStatus( + // fetchAsyncImportTaskStatusRequest FetchAsyncImportTaskStatusRequest + test.Body + ) + ).to.be.rejectedWith(Error); + } + + }); + }); + }); + + describe('fetchLiveboardSqlQuery', function() { + + const testReqBodies = requestBodies.filter( + (body: any) => body.Metadata.operationId === "fetchLiveboardSqlQuery" + ); + testReqBodies.forEach(async (test: any) => { + it(`${test.Metadata.operationId} - ${test.Metadata.scenario} : Testid - ${test.Metadata.testId}`, async function () { + + if (test.Metadata.scenario === "positive") { + var data; + try { + data = await instance.fetchLiveboardSqlQuery( + // fetchLiveboardSqlQueryRequest FetchLiveboardSqlQueryRequest + test.Body + ) + } catch (er) { + console.error(er, "Response", data) + expect(er).to.be.undefined + } + } else { + await expect( + instance.fetchLiveboardSqlQuery( + // fetchLiveboardSqlQueryRequest FetchLiveboardSqlQueryRequest + test.Body + ) + ).to.be.rejectedWith(Error); + } + + }); + }); + }); + + describe('importMetadataTML', function() { + + const testReqBodies = requestBodies.filter( + (body: any) => body.Metadata.operationId === "importMetadataTML" + ); + testReqBodies.forEach(async (test: any) => { + it(`${test.Metadata.operationId} - ${test.Metadata.scenario} : Testid - ${test.Metadata.testId}`, async function () { + + if (test.Metadata.scenario === "positive") { + var data; + try { + data = await instance.importMetadataTML( + // importMetadataTMLRequest ImportMetadataTMLRequest + test.Body + ) + } catch (er) { + console.error(er, "Response", data) + expect(er).to.be.undefined + } + } else { + await expect( + instance.importMetadataTML( + // importMetadataTMLRequest ImportMetadataTMLRequest + test.Body + ) + ).to.be.rejectedWith(Error); + } + + }); + }); + }); + + describe('importMetadataTMLAsync', function() { + + const testReqBodies = requestBodies.filter( + (body: any) => body.Metadata.operationId === "importMetadataTMLAsync" + ); + testReqBodies.forEach(async (test: any) => { + it(`${test.Metadata.operationId} - ${test.Metadata.scenario} : Testid - ${test.Metadata.testId}`, async function () { + + if (test.Metadata.scenario === "positive") { + var data; + try { + data = await instance.importMetadataTMLAsync( + // importMetadataTMLAsyncRequest ImportMetadataTMLAsyncRequest + test.Body + ) + } catch (er) { + console.error(er, "Response", data) + expect(er).to.be.undefined + } + } else { + await expect( + instance.importMetadataTMLAsync( + // importMetadataTMLAsyncRequest ImportMetadataTMLAsyncRequest + test.Body + ) + ).to.be.rejectedWith(Error); + } + + }); + }); + }); + + describe('parameterizeMetadata', function() { + + const testReqBodies = requestBodies.filter( + (body: any) => body.Metadata.operationId === "parameterizeMetadata" + ); + testReqBodies.forEach(async (test: any) => { + it(`${test.Metadata.operationId} - ${test.Metadata.scenario} : Testid - ${test.Metadata.testId}`, async function () { + + if (test.Metadata.scenario === "positive") { + var data; + try { + data = await instance.parameterizeMetadata( + // parameterizeMetadataRequest ParameterizeMetadataRequest + test.Body + ) + } catch (er) { + console.error(er, "Response", data) + expect(er).to.be.undefined + } + } else { + await expect( + instance.parameterizeMetadata( + // parameterizeMetadataRequest ParameterizeMetadataRequest + test.Body + ) + ).to.be.rejectedWith(Error); + } + + }); + }); + }); + + describe('parameterizeMetadataFields', function() { + + const testReqBodies = requestBodies.filter( + (body: any) => body.Metadata.operationId === "parameterizeMetadataFields" + ); + testReqBodies.forEach(async (test: any) => { + it(`${test.Metadata.operationId} - ${test.Metadata.scenario} : Testid - ${test.Metadata.testId}`, async function () { + + if (test.Metadata.scenario === "positive") { + var data; + try { + data = await instance.parameterizeMetadataFields( + // parameterizeMetadataFieldsRequest ParameterizeMetadataFieldsRequest + test.Body + ) + } catch (er) { + console.error(er, "Response", data) + expect(er).to.be.undefined + } + } else { + await expect( + instance.parameterizeMetadataFields( + // parameterizeMetadataFieldsRequest ParameterizeMetadataFieldsRequest + test.Body + ) + ).to.be.rejectedWith(Error); + } + + }); + }); + }); + + describe('searchMetadata', function() { + + const testReqBodies = requestBodies.filter( + (body: any) => body.Metadata.operationId === "searchMetadata" + ); + testReqBodies.forEach(async (test: any) => { + it(`${test.Metadata.operationId} - ${test.Metadata.scenario} : Testid - ${test.Metadata.testId}`, async function () { + + if (test.Metadata.scenario === "positive") { + var data; + try { + data = await instance.searchMetadata( + // searchMetadataRequest SearchMetadataRequest + test.Body + ) + } catch (er) { + console.error(er, "Response", data) + expect(er).to.be.undefined + } + } else { + await expect( + instance.searchMetadata( + // searchMetadataRequest SearchMetadataRequest + test.Body + ) + ).to.be.rejectedWith(Error); + } + + }); + }); + }); + + describe('unparameterizeMetadata', function() { + + const testReqBodies = requestBodies.filter( + (body: any) => body.Metadata.operationId === "unparameterizeMetadata" + ); + testReqBodies.forEach(async (test: any) => { + it(`${test.Metadata.operationId} - ${test.Metadata.scenario} : Testid - ${test.Metadata.testId}`, async function () { + + if (test.Metadata.scenario === "positive") { + var data; + try { + data = await instance.unparameterizeMetadata( + // unparameterizeMetadataRequest UnparameterizeMetadataRequest + test.Body + ) + } catch (er) { + console.error(er, "Response", data) + expect(er).to.be.undefined + } + } else { + await expect( + instance.unparameterizeMetadata( + // unparameterizeMetadataRequest UnparameterizeMetadataRequest + test.Body + ) + ).to.be.rejectedWith(Error); + } + + }); + }); + }); + + describe('updateMetadataHeader', function() { + + const testReqBodies = requestBodies.filter( + (body: any) => body.Metadata.operationId === "updateMetadataHeader" + ); + testReqBodies.forEach(async (test: any) => { + it(`${test.Metadata.operationId} - ${test.Metadata.scenario} : Testid - ${test.Metadata.testId}`, async function () { + + if (test.Metadata.scenario === "positive") { + var data; + try { + data = await instance.updateMetadataHeader( + // updateMetadataHeaderRequest UpdateMetadataHeaderRequest + test.Body + ) + } catch (er) { + console.error(er, "Response", data) + expect(er).to.be.undefined + } + } else { + await expect( + instance.updateMetadataHeader( + // updateMetadataHeaderRequest UpdateMetadataHeaderRequest + test.Body + ) + ).to.be.rejectedWith(Error); + } + + }); + }); + }); + + describe('updateMetadataObjId', function() { + + const testReqBodies = requestBodies.filter( + (body: any) => body.Metadata.operationId === "updateMetadataObjId" + ); + testReqBodies.forEach(async (test: any) => { + it(`${test.Metadata.operationId} - ${test.Metadata.scenario} : Testid - ${test.Metadata.testId}`, async function () { + + if (test.Metadata.scenario === "positive") { + var data; + try { + data = await instance.updateMetadataObjId( + // updateMetadataObjIdRequest UpdateMetadataObjIdRequest + test.Body + ) + } catch (er) { + console.error(er, "Response", data) + expect(er).to.be.undefined + } + } else { + await expect( + instance.updateMetadataObjId( + // updateMetadataObjIdRequest UpdateMetadataObjIdRequest + test.Body + ) + ).to.be.rejectedWith(Error); + } + + }); + }); + }); +}); diff --git a/sdks/typescript/tests/OrgsApiTest.ts b/sdks/typescript/tests/OrgsApiTest.ts new file mode 100644 index 000000000..a4d043534 --- /dev/null +++ b/sdks/typescript/tests/OrgsApiTest.ts @@ -0,0 +1,156 @@ +import chai from "chai"; +import chaiAsPromised from "chai-as-promised"; +import { createBearerAuthenticationConfig } from "../utils/config"; +import { PromiseOrgsApi } from "../types/PromiseAPI"; +import requestBodies from "./testDataUpdated.json"; + +chai.use(chaiAsPromised); +const expect = chai.expect; + + + +const baseUrlFromCli = process.argv.filter(s => s.startsWith("--baseUrl="))?.[0]?.split("=")?.[1] +const BASE_URL = baseUrlFromCli || "http://127.0.0.1:4123" +const config = createBearerAuthenticationConfig(BASE_URL, { + username: "tsadmin", + password: "admin", +}); + + +const instance = new PromiseOrgsApi(config); + +describe('OrgsApi', function() { + + + describe('createOrg', function() { + + const testReqBodies = requestBodies.filter( + (body: any) => body.Metadata.operationId === "createOrg" + ); + testReqBodies.forEach(async (test: any) => { + it(`${test.Metadata.operationId} - ${test.Metadata.scenario} : Testid - ${test.Metadata.testId}`, async function () { + + if (test.Metadata.scenario === "positive") { + var data; + try { + data = await instance.createOrg( + // createOrgRequest CreateOrgRequest + test.Body + ) + } catch (er) { + console.error(er, "Response", data) + expect(er).to.be.undefined + } + } else { + await expect( + instance.createOrg( + // createOrgRequest CreateOrgRequest + test.Body + ) + ).to.be.rejectedWith(Error); + } + + }); + }); + }); + + describe('deleteOrg', function() { + + const testReqBodies = requestBodies.filter( + (body: any) => body.Metadata.operationId === "deleteOrg" + ); + testReqBodies.forEach(async (test: any) => { + it(`${test.Metadata.operationId} - ${test.Metadata.scenario} : Testid - ${test.Metadata.testId}`, async function () { + + if (test.Metadata.scenario === "positive") { + var data; + try { + data = await instance.deleteOrg( + // orgIdentifier org_identifier + test.Path_Variables.org_identifier + ) + } catch (er) { + console.error(er, "Response", data) + expect(er).to.be.undefined + } + } else { + await expect( + instance.deleteOrg( + // orgIdentifier org_identifier + test.Path_Variables.org_identifier + ) + ).to.be.rejectedWith(Error); + } + + }); + }); + }); + + describe('searchOrgs', function() { + + const testReqBodies = requestBodies.filter( + (body: any) => body.Metadata.operationId === "searchOrgs" + ); + testReqBodies.forEach(async (test: any) => { + it(`${test.Metadata.operationId} - ${test.Metadata.scenario} : Testid - ${test.Metadata.testId}`, async function () { + + if (test.Metadata.scenario === "positive") { + var data; + try { + data = await instance.searchOrgs( + // searchOrgsRequest SearchOrgsRequest + test.Body + ) + } catch (er) { + console.error(er, "Response", data) + expect(er).to.be.undefined + } + } else { + await expect( + instance.searchOrgs( + // searchOrgsRequest SearchOrgsRequest + test.Body + ) + ).to.be.rejectedWith(Error); + } + + }); + }); + }); + + describe('updateOrg', function() { + + const testReqBodies = requestBodies.filter( + (body: any) => body.Metadata.operationId === "updateOrg" + ); + testReqBodies.forEach(async (test: any) => { + it(`${test.Metadata.operationId} - ${test.Metadata.scenario} : Testid - ${test.Metadata.testId}`, async function () { + + if (test.Metadata.scenario === "positive") { + var data; + try { + data = await instance.updateOrg( + // orgIdentifier org_identifier + test.Path_Variables.org_identifier , + // updateOrgRequest UpdateOrgRequest + test.Body + ) + } catch (er) { + console.error(er, "Response", data) + expect(er).to.be.undefined + } + } else { + await expect( + instance.updateOrg( + // orgIdentifier org_identifier + test.Path_Variables.org_identifier , + // updateOrgRequest UpdateOrgRequest + test.Body + ) + ).to.be.rejectedWith(Error); + } + + }); + }); + }); +}); diff --git a/sdks/typescript/tests/ReportsApiTest.ts b/sdks/typescript/tests/ReportsApiTest.ts new file mode 100644 index 000000000..ec256e64a --- /dev/null +++ b/sdks/typescript/tests/ReportsApiTest.ts @@ -0,0 +1,88 @@ +import chai from "chai"; +import chaiAsPromised from "chai-as-promised"; +import { createBearerAuthenticationConfig } from "../utils/config"; +import { PromiseReportsApi } from "../types/PromiseAPI"; +import requestBodies from "./testDataUpdated.json"; + +chai.use(chaiAsPromised); +const expect = chai.expect; + + + +const baseUrlFromCli = process.argv.filter(s => s.startsWith("--baseUrl="))?.[0]?.split("=")?.[1] +const BASE_URL = baseUrlFromCli || "http://127.0.0.1:4123" +const config = createBearerAuthenticationConfig(BASE_URL, { + username: "tsadmin", + password: "admin", +}); + + +const instance = new PromiseReportsApi(config); + +describe('ReportsApi', function() { + + + describe('exportAnswerReport', function() { + + const testReqBodies = requestBodies.filter( + (body: any) => body.Metadata.operationId === "exportAnswerReport" + ); + testReqBodies.forEach(async (test: any) => { + it(`${test.Metadata.operationId} - ${test.Metadata.scenario} : Testid - ${test.Metadata.testId}`, async function () { + + if (test.Metadata.scenario === "positive") { + var data; + try { + data = await instance.exportAnswerReport( + // exportAnswerReportRequest ExportAnswerReportRequest + test.Body + ) + } catch (er) { + console.error(er, "Response", data) + expect(er).to.be.undefined + } + } else { + await expect( + instance.exportAnswerReport( + // exportAnswerReportRequest ExportAnswerReportRequest + test.Body + ) + ).to.be.rejectedWith(Error); + } + + }); + }); + }); + + describe('exportLiveboardReport', function() { + + const testReqBodies = requestBodies.filter( + (body: any) => body.Metadata.operationId === "exportLiveboardReport" + ); + testReqBodies.forEach(async (test: any) => { + it(`${test.Metadata.operationId} - ${test.Metadata.scenario} : Testid - ${test.Metadata.testId}`, async function () { + + if (test.Metadata.scenario === "positive") { + var data; + try { + data = await instance.exportLiveboardReport( + // exportLiveboardReportRequest ExportLiveboardReportRequest + test.Body + ) + } catch (er) { + console.error(er, "Response", data) + expect(er).to.be.undefined + } + } else { + await expect( + instance.exportLiveboardReport( + // exportLiveboardReportRequest ExportLiveboardReportRequest + test.Body + ) + ).to.be.rejectedWith(Error); + } + + }); + }); + }); +}); diff --git a/sdks/typescript/tests/RolesApiTest.ts b/sdks/typescript/tests/RolesApiTest.ts new file mode 100644 index 000000000..a19e2e12a --- /dev/null +++ b/sdks/typescript/tests/RolesApiTest.ts @@ -0,0 +1,156 @@ +import chai from "chai"; +import chaiAsPromised from "chai-as-promised"; +import { createBearerAuthenticationConfig } from "../utils/config"; +import { PromiseRolesApi } from "../types/PromiseAPI"; +import requestBodies from "./testDataUpdated.json"; + +chai.use(chaiAsPromised); +const expect = chai.expect; + + + +const baseUrlFromCli = process.argv.filter(s => s.startsWith("--baseUrl="))?.[0]?.split("=")?.[1] +const BASE_URL = baseUrlFromCli || "http://127.0.0.1:4123" +const config = createBearerAuthenticationConfig(BASE_URL, { + username: "tsadmin", + password: "admin", +}); + + +const instance = new PromiseRolesApi(config); + +describe('RolesApi', function() { + + + describe('createRole', function() { + + const testReqBodies = requestBodies.filter( + (body: any) => body.Metadata.operationId === "createRole" + ); + testReqBodies.forEach(async (test: any) => { + it(`${test.Metadata.operationId} - ${test.Metadata.scenario} : Testid - ${test.Metadata.testId}`, async function () { + + if (test.Metadata.scenario === "positive") { + var data; + try { + data = await instance.createRole( + // createRoleRequest CreateRoleRequest + test.Body + ) + } catch (er) { + console.error(er, "Response", data) + expect(er).to.be.undefined + } + } else { + await expect( + instance.createRole( + // createRoleRequest CreateRoleRequest + test.Body + ) + ).to.be.rejectedWith(Error); + } + + }); + }); + }); + + describe('deleteRole', function() { + + const testReqBodies = requestBodies.filter( + (body: any) => body.Metadata.operationId === "deleteRole" + ); + testReqBodies.forEach(async (test: any) => { + it(`${test.Metadata.operationId} - ${test.Metadata.scenario} : Testid - ${test.Metadata.testId}`, async function () { + + if (test.Metadata.scenario === "positive") { + var data; + try { + data = await instance.deleteRole( + // roleIdentifier role_identifier + test.Path_Variables.role_identifier + ) + } catch (er) { + console.error(er, "Response", data) + expect(er).to.be.undefined + } + } else { + await expect( + instance.deleteRole( + // roleIdentifier role_identifier + test.Path_Variables.role_identifier + ) + ).to.be.rejectedWith(Error); + } + + }); + }); + }); + + describe('searchRoles', function() { + + const testReqBodies = requestBodies.filter( + (body: any) => body.Metadata.operationId === "searchRoles" + ); + testReqBodies.forEach(async (test: any) => { + it(`${test.Metadata.operationId} - ${test.Metadata.scenario} : Testid - ${test.Metadata.testId}`, async function () { + + if (test.Metadata.scenario === "positive") { + var data; + try { + data = await instance.searchRoles( + // searchRolesRequest SearchRolesRequest + test.Body + ) + } catch (er) { + console.error(er, "Response", data) + expect(er).to.be.undefined + } + } else { + await expect( + instance.searchRoles( + // searchRolesRequest SearchRolesRequest + test.Body + ) + ).to.be.rejectedWith(Error); + } + + }); + }); + }); + + describe('updateRole', function() { + + const testReqBodies = requestBodies.filter( + (body: any) => body.Metadata.operationId === "updateRole" + ); + testReqBodies.forEach(async (test: any) => { + it(`${test.Metadata.operationId} - ${test.Metadata.scenario} : Testid - ${test.Metadata.testId}`, async function () { + + if (test.Metadata.scenario === "positive") { + var data; + try { + data = await instance.updateRole( + // roleIdentifier role_identifier + test.Path_Variables.role_identifier , + // updateRoleRequest UpdateRoleRequest + test.Body + ) + } catch (er) { + console.error(er, "Response", data) + expect(er).to.be.undefined + } + } else { + await expect( + instance.updateRole( + // roleIdentifier role_identifier + test.Path_Variables.role_identifier , + // updateRoleRequest UpdateRoleRequest + test.Body + ) + ).to.be.rejectedWith(Error); + } + + }); + }); + }); +}); diff --git a/sdks/typescript/tests/SchedulesApiTest.ts b/sdks/typescript/tests/SchedulesApiTest.ts new file mode 100644 index 000000000..4a165772b --- /dev/null +++ b/sdks/typescript/tests/SchedulesApiTest.ts @@ -0,0 +1,156 @@ +import chai from "chai"; +import chaiAsPromised from "chai-as-promised"; +import { createBearerAuthenticationConfig } from "../utils/config"; +import { PromiseSchedulesApi } from "../types/PromiseAPI"; +import requestBodies from "./testDataUpdated.json"; + +chai.use(chaiAsPromised); +const expect = chai.expect; + + + +const baseUrlFromCli = process.argv.filter(s => s.startsWith("--baseUrl="))?.[0]?.split("=")?.[1] +const BASE_URL = baseUrlFromCli || "http://127.0.0.1:4123" +const config = createBearerAuthenticationConfig(BASE_URL, { + username: "tsadmin", + password: "admin", +}); + + +const instance = new PromiseSchedulesApi(config); + +describe('SchedulesApi', function() { + + + describe('createSchedule', function() { + + const testReqBodies = requestBodies.filter( + (body: any) => body.Metadata.operationId === "createSchedule" + ); + testReqBodies.forEach(async (test: any) => { + it(`${test.Metadata.operationId} - ${test.Metadata.scenario} : Testid - ${test.Metadata.testId}`, async function () { + + if (test.Metadata.scenario === "positive") { + var data; + try { + data = await instance.createSchedule( + // createScheduleRequest CreateScheduleRequest + test.Body + ) + } catch (er) { + console.error(er, "Response", data) + expect(er).to.be.undefined + } + } else { + await expect( + instance.createSchedule( + // createScheduleRequest CreateScheduleRequest + test.Body + ) + ).to.be.rejectedWith(Error); + } + + }); + }); + }); + + describe('deleteSchedule', function() { + + const testReqBodies = requestBodies.filter( + (body: any) => body.Metadata.operationId === "deleteSchedule" + ); + testReqBodies.forEach(async (test: any) => { + it(`${test.Metadata.operationId} - ${test.Metadata.scenario} : Testid - ${test.Metadata.testId}`, async function () { + + if (test.Metadata.scenario === "positive") { + var data; + try { + data = await instance.deleteSchedule( + // scheduleIdentifier schedule_identifier + test.Path_Variables.schedule_identifier + ) + } catch (er) { + console.error(er, "Response", data) + expect(er).to.be.undefined + } + } else { + await expect( + instance.deleteSchedule( + // scheduleIdentifier schedule_identifier + test.Path_Variables.schedule_identifier + ) + ).to.be.rejectedWith(Error); + } + + }); + }); + }); + + describe('searchSchedules', function() { + + const testReqBodies = requestBodies.filter( + (body: any) => body.Metadata.operationId === "searchSchedules" + ); + testReqBodies.forEach(async (test: any) => { + it(`${test.Metadata.operationId} - ${test.Metadata.scenario} : Testid - ${test.Metadata.testId}`, async function () { + + if (test.Metadata.scenario === "positive") { + var data; + try { + data = await instance.searchSchedules( + // searchSchedulesRequest SearchSchedulesRequest + test.Body + ) + } catch (er) { + console.error(er, "Response", data) + expect(er).to.be.undefined + } + } else { + await expect( + instance.searchSchedules( + // searchSchedulesRequest SearchSchedulesRequest + test.Body + ) + ).to.be.rejectedWith(Error); + } + + }); + }); + }); + + describe('updateSchedule', function() { + + const testReqBodies = requestBodies.filter( + (body: any) => body.Metadata.operationId === "updateSchedule" + ); + testReqBodies.forEach(async (test: any) => { + it(`${test.Metadata.operationId} - ${test.Metadata.scenario} : Testid - ${test.Metadata.testId}`, async function () { + + if (test.Metadata.scenario === "positive") { + var data; + try { + data = await instance.updateSchedule( + // scheduleIdentifier schedule_identifier + test.Path_Variables.schedule_identifier , + // updateScheduleRequest UpdateScheduleRequest + test.Body + ) + } catch (er) { + console.error(er, "Response", data) + expect(er).to.be.undefined + } + } else { + await expect( + instance.updateSchedule( + // scheduleIdentifier schedule_identifier + test.Path_Variables.schedule_identifier , + // updateScheduleRequest UpdateScheduleRequest + test.Body + ) + ).to.be.rejectedWith(Error); + } + + }); + }); + }); +}); diff --git a/sdks/typescript/tests/SecurityApiTest.ts b/sdks/typescript/tests/SecurityApiTest.ts new file mode 100644 index 000000000..9e68d01da --- /dev/null +++ b/sdks/typescript/tests/SecurityApiTest.ts @@ -0,0 +1,344 @@ +import chai from "chai"; +import chaiAsPromised from "chai-as-promised"; +import { createBearerAuthenticationConfig } from "../utils/config"; +import { PromiseSecurityApi } from "../types/PromiseAPI"; +import requestBodies from "./testDataUpdated.json"; + +chai.use(chaiAsPromised); +const expect = chai.expect; + + + +const baseUrlFromCli = process.argv.filter(s => s.startsWith("--baseUrl="))?.[0]?.split("=")?.[1] +const BASE_URL = baseUrlFromCli || "http://127.0.0.1:4123" +const config = createBearerAuthenticationConfig(BASE_URL, { + username: "tsadmin", + password: "admin", +}); + + +const instance = new PromiseSecurityApi(config); + +describe('SecurityApi', function() { + + + describe('assignChangeAuthor', function() { + + const testReqBodies = requestBodies.filter( + (body: any) => body.Metadata.operationId === "assignChangeAuthor" + ); + testReqBodies.forEach(async (test: any) => { + it(`${test.Metadata.operationId} - ${test.Metadata.scenario} : Testid - ${test.Metadata.testId}`, async function () { + + if (test.Metadata.scenario === "positive") { + var data; + try { + data = await instance.assignChangeAuthor( + // assignChangeAuthorRequest AssignChangeAuthorRequest + test.Body + ) + } catch (er) { + console.error(er, "Response", data) + expect(er).to.be.undefined + } + } else { + await expect( + instance.assignChangeAuthor( + // assignChangeAuthorRequest AssignChangeAuthorRequest + test.Body + ) + ).to.be.rejectedWith(Error); + } + + }); + }); + }); + + describe('fetchColumnSecurityRules', function() { + + const testReqBodies = requestBodies.filter( + (body: any) => body.Metadata.operationId === "fetchColumnSecurityRules" + ); + testReqBodies.forEach(async (test: any) => { + it(`${test.Metadata.operationId} - ${test.Metadata.scenario} : Testid - ${test.Metadata.testId}`, async function () { + + if (test.Metadata.scenario === "positive") { + var data; + try { + data = await instance.fetchColumnSecurityRules( + // fetchColumnSecurityRulesRequest FetchColumnSecurityRulesRequest + test.Body + ) + } catch (er) { + console.error(er, "Response", data) + expect(er).to.be.undefined + } + } else { + await expect( + instance.fetchColumnSecurityRules( + // fetchColumnSecurityRulesRequest FetchColumnSecurityRulesRequest + test.Body + ) + ).to.be.rejectedWith(Error); + } + + }); + }); + }); + + describe('fetchObjectPrivileges', function() { + + const testReqBodies = requestBodies.filter( + (body: any) => body.Metadata.operationId === "fetchObjectPrivileges" + ); + testReqBodies.forEach(async (test: any) => { + it(`${test.Metadata.operationId} - ${test.Metadata.scenario} : Testid - ${test.Metadata.testId}`, async function () { + + if (test.Metadata.scenario === "positive") { + var data; + try { + data = await instance.fetchObjectPrivileges( + // fetchObjectPrivilegesRequest FetchObjectPrivilegesRequest + test.Body + ) + } catch (er) { + console.error(er, "Response", data) + expect(er).to.be.undefined + } + } else { + await expect( + instance.fetchObjectPrivileges( + // fetchObjectPrivilegesRequest FetchObjectPrivilegesRequest + test.Body + ) + ).to.be.rejectedWith(Error); + } + + }); + }); + }); + + describe('fetchPermissionsOfPrincipals', function() { + + const testReqBodies = requestBodies.filter( + (body: any) => body.Metadata.operationId === "fetchPermissionsOfPrincipals" + ); + testReqBodies.forEach(async (test: any) => { + it(`${test.Metadata.operationId} - ${test.Metadata.scenario} : Testid - ${test.Metadata.testId}`, async function () { + + if (test.Metadata.scenario === "positive") { + var data; + try { + data = await instance.fetchPermissionsOfPrincipals( + // fetchPermissionsOfPrincipalsRequest FetchPermissionsOfPrincipalsRequest + test.Body + ) + } catch (er) { + console.error(er, "Response", data) + expect(er).to.be.undefined + } + } else { + await expect( + instance.fetchPermissionsOfPrincipals( + // fetchPermissionsOfPrincipalsRequest FetchPermissionsOfPrincipalsRequest + test.Body + ) + ).to.be.rejectedWith(Error); + } + + }); + }); + }); + + describe('fetchPermissionsOnMetadata', function() { + + const testReqBodies = requestBodies.filter( + (body: any) => body.Metadata.operationId === "fetchPermissionsOnMetadata" + ); + testReqBodies.forEach(async (test: any) => { + it(`${test.Metadata.operationId} - ${test.Metadata.scenario} : Testid - ${test.Metadata.testId}`, async function () { + + if (test.Metadata.scenario === "positive") { + var data; + try { + data = await instance.fetchPermissionsOnMetadata( + // fetchPermissionsOnMetadataRequest FetchPermissionsOnMetadataRequest + test.Body + ) + } catch (er) { + console.error(er, "Response", data) + expect(er).to.be.undefined + } + } else { + await expect( + instance.fetchPermissionsOnMetadata( + // fetchPermissionsOnMetadataRequest FetchPermissionsOnMetadataRequest + test.Body + ) + ).to.be.rejectedWith(Error); + } + + }); + }); + }); + + describe('manageObjectPrivilege', function() { + + const testReqBodies = requestBodies.filter( + (body: any) => body.Metadata.operationId === "manageObjectPrivilege" + ); + testReqBodies.forEach(async (test: any) => { + it(`${test.Metadata.operationId} - ${test.Metadata.scenario} : Testid - ${test.Metadata.testId}`, async function () { + + if (test.Metadata.scenario === "positive") { + var data; + try { + data = await instance.manageObjectPrivilege( + // manageObjectPrivilegeRequest ManageObjectPrivilegeRequest + test.Body + ) + } catch (er) { + console.error(er, "Response", data) + expect(er).to.be.undefined + } + } else { + await expect( + instance.manageObjectPrivilege( + // manageObjectPrivilegeRequest ManageObjectPrivilegeRequest + test.Body + ) + ).to.be.rejectedWith(Error); + } + + }); + }); + }); + + describe('publishMetadata', function() { + + const testReqBodies = requestBodies.filter( + (body: any) => body.Metadata.operationId === "publishMetadata" + ); + testReqBodies.forEach(async (test: any) => { + it(`${test.Metadata.operationId} - ${test.Metadata.scenario} : Testid - ${test.Metadata.testId}`, async function () { + + if (test.Metadata.scenario === "positive") { + var data; + try { + data = await instance.publishMetadata( + // publishMetadataRequest PublishMetadataRequest + test.Body + ) + } catch (er) { + console.error(er, "Response", data) + expect(er).to.be.undefined + } + } else { + await expect( + instance.publishMetadata( + // publishMetadataRequest PublishMetadataRequest + test.Body + ) + ).to.be.rejectedWith(Error); + } + + }); + }); + }); + + describe('shareMetadata', function() { + + const testReqBodies = requestBodies.filter( + (body: any) => body.Metadata.operationId === "shareMetadata" + ); + testReqBodies.forEach(async (test: any) => { + it(`${test.Metadata.operationId} - ${test.Metadata.scenario} : Testid - ${test.Metadata.testId}`, async function () { + + if (test.Metadata.scenario === "positive") { + var data; + try { + data = await instance.shareMetadata( + // shareMetadataRequest ShareMetadataRequest + test.Body + ) + } catch (er) { + console.error(er, "Response", data) + expect(er).to.be.undefined + } + } else { + await expect( + instance.shareMetadata( + // shareMetadataRequest ShareMetadataRequest + test.Body + ) + ).to.be.rejectedWith(Error); + } + + }); + }); + }); + + describe('unpublishMetadata', function() { + + const testReqBodies = requestBodies.filter( + (body: any) => body.Metadata.operationId === "unpublishMetadata" + ); + testReqBodies.forEach(async (test: any) => { + it(`${test.Metadata.operationId} - ${test.Metadata.scenario} : Testid - ${test.Metadata.testId}`, async function () { + + if (test.Metadata.scenario === "positive") { + var data; + try { + data = await instance.unpublishMetadata( + // unpublishMetadataRequest UnpublishMetadataRequest + test.Body + ) + } catch (er) { + console.error(er, "Response", data) + expect(er).to.be.undefined + } + } else { + await expect( + instance.unpublishMetadata( + // unpublishMetadataRequest UnpublishMetadataRequest + test.Body + ) + ).to.be.rejectedWith(Error); + } + + }); + }); + }); + + describe('updateColumnSecurityRules', function() { + + const testReqBodies = requestBodies.filter( + (body: any) => body.Metadata.operationId === "updateColumnSecurityRules" + ); + testReqBodies.forEach(async (test: any) => { + it(`${test.Metadata.operationId} - ${test.Metadata.scenario} : Testid - ${test.Metadata.testId}`, async function () { + + if (test.Metadata.scenario === "positive") { + var data; + try { + data = await instance.updateColumnSecurityRules( + // updateColumnSecurityRulesRequest UpdateColumnSecurityRulesRequest + test.Body + ) + } catch (er) { + console.error(er, "Response", data) + expect(er).to.be.undefined + } + } else { + await expect( + instance.updateColumnSecurityRules( + // updateColumnSecurityRulesRequest UpdateColumnSecurityRulesRequest + test.Body + ) + ).to.be.rejectedWith(Error); + } + + }); + }); + }); +}); diff --git a/sdks/typescript/tests/SystemApiTest.ts b/sdks/typescript/tests/SystemApiTest.ts new file mode 100644 index 000000000..7e77dc726 --- /dev/null +++ b/sdks/typescript/tests/SystemApiTest.ts @@ -0,0 +1,300 @@ +import chai from "chai"; +import chaiAsPromised from "chai-as-promised"; +import { createBearerAuthenticationConfig } from "../utils/config"; +import { PromiseSystemApi } from "../types/PromiseAPI"; +import requestBodies from "./testDataUpdated.json"; + +chai.use(chaiAsPromised); +const expect = chai.expect; + + + +const baseUrlFromCli = process.argv.filter(s => s.startsWith("--baseUrl="))?.[0]?.split("=")?.[1] +const BASE_URL = baseUrlFromCli || "http://127.0.0.1:4123" +const config = createBearerAuthenticationConfig(BASE_URL, { + username: "tsadmin", + password: "admin", +}); + + +const instance = new PromiseSystemApi(config); + +describe('SystemApi', function() { + + + describe('configureCommunicationChannelPreferences', function() { + + const testReqBodies = requestBodies.filter( + (body: any) => body.Metadata.operationId === "configureCommunicationChannelPreferences" + ); + testReqBodies.forEach(async (test: any) => { + it(`${test.Metadata.operationId} - ${test.Metadata.scenario} : Testid - ${test.Metadata.testId}`, async function () { + + if (test.Metadata.scenario === "positive") { + var data; + try { + data = await instance.configureCommunicationChannelPreferences( + // configureCommunicationChannelPreferencesRequest ConfigureCommunicationChannelPreferencesRequest + test.Body + ) + } catch (er) { + console.error(er, "Response", data) + expect(er).to.be.undefined + } + } else { + await expect( + instance.configureCommunicationChannelPreferences( + // configureCommunicationChannelPreferencesRequest ConfigureCommunicationChannelPreferencesRequest + test.Body + ) + ).to.be.rejectedWith(Error); + } + + }); + }); + }); + + describe('configureSecuritySettings', function() { + + const testReqBodies = requestBodies.filter( + (body: any) => body.Metadata.operationId === "configureSecuritySettings" + ); + testReqBodies.forEach(async (test: any) => { + it(`${test.Metadata.operationId} - ${test.Metadata.scenario} : Testid - ${test.Metadata.testId}`, async function () { + + if (test.Metadata.scenario === "positive") { + var data; + try { + data = await instance.configureSecuritySettings( + // configureSecuritySettingsRequest ConfigureSecuritySettingsRequest + test.Body + ) + } catch (er) { + console.error(er, "Response", data) + expect(er).to.be.undefined + } + } else { + await expect( + instance.configureSecuritySettings( + // configureSecuritySettingsRequest ConfigureSecuritySettingsRequest + test.Body + ) + ).to.be.rejectedWith(Error); + } + + }); + }); + }); + + describe('getSystemConfig', function() { + + const testReqBodies = requestBodies.filter( + (body: any) => body.Metadata.operationId === "getSystemConfig" + ); + testReqBodies.forEach(async (test: any) => { + it(`${test.Metadata.operationId} - ${test.Metadata.scenario} : Testid - ${test.Metadata.testId}`, async function () { + + if (test.Metadata.scenario === "positive") { + var data; + try { + data = await instance.getSystemConfig( + ) + } catch (er) { + console.error(er, "Response", data) + expect(er).to.be.undefined + } + } else { + await expect( + instance.getSystemConfig( + ) + ).to.be.rejectedWith(Error); + } + + }); + }); + }); + + describe('getSystemInformation', function() { + + const testReqBodies = requestBodies.filter( + (body: any) => body.Metadata.operationId === "getSystemInformation" + ); + testReqBodies.forEach(async (test: any) => { + it(`${test.Metadata.operationId} - ${test.Metadata.scenario} : Testid - ${test.Metadata.testId}`, async function () { + + if (test.Metadata.scenario === "positive") { + var data; + try { + data = await instance.getSystemInformation( + ) + } catch (er) { + console.error(er, "Response", data) + expect(er).to.be.undefined + } + } else { + await expect( + instance.getSystemInformation( + ) + ).to.be.rejectedWith(Error); + } + + }); + }); + }); + + describe('getSystemOverrideInfo', function() { + + const testReqBodies = requestBodies.filter( + (body: any) => body.Metadata.operationId === "getSystemOverrideInfo" + ); + testReqBodies.forEach(async (test: any) => { + it(`${test.Metadata.operationId} - ${test.Metadata.scenario} : Testid - ${test.Metadata.testId}`, async function () { + + if (test.Metadata.scenario === "positive") { + var data; + try { + data = await instance.getSystemOverrideInfo( + ) + } catch (er) { + console.error(er, "Response", data) + expect(er).to.be.undefined + } + } else { + await expect( + instance.getSystemOverrideInfo( + ) + ).to.be.rejectedWith(Error); + } + + }); + }); + }); + + describe('searchCommunicationChannelPreferences', function() { + + const testReqBodies = requestBodies.filter( + (body: any) => body.Metadata.operationId === "searchCommunicationChannelPreferences" + ); + testReqBodies.forEach(async (test: any) => { + it(`${test.Metadata.operationId} - ${test.Metadata.scenario} : Testid - ${test.Metadata.testId}`, async function () { + + if (test.Metadata.scenario === "positive") { + var data; + try { + data = await instance.searchCommunicationChannelPreferences( + // searchCommunicationChannelPreferencesRequest SearchCommunicationChannelPreferencesRequest + test.Body + ) + } catch (er) { + console.error(er, "Response", data) + expect(er).to.be.undefined + } + } else { + await expect( + instance.searchCommunicationChannelPreferences( + // searchCommunicationChannelPreferencesRequest SearchCommunicationChannelPreferencesRequest + test.Body + ) + ).to.be.rejectedWith(Error); + } + + }); + }); + }); + + describe('searchSecuritySettings', function() { + + const testReqBodies = requestBodies.filter( + (body: any) => body.Metadata.operationId === "searchSecuritySettings" + ); + testReqBodies.forEach(async (test: any) => { + it(`${test.Metadata.operationId} - ${test.Metadata.scenario} : Testid - ${test.Metadata.testId}`, async function () { + + if (test.Metadata.scenario === "positive") { + var data; + try { + data = await instance.searchSecuritySettings( + // searchSecuritySettingsRequest SearchSecuritySettingsRequest + test.Body + ) + } catch (er) { + console.error(er, "Response", data) + expect(er).to.be.undefined + } + } else { + await expect( + instance.searchSecuritySettings( + // searchSecuritySettingsRequest SearchSecuritySettingsRequest + test.Body + ) + ).to.be.rejectedWith(Error); + } + + }); + }); + }); + + describe('updateSystemConfig', function() { + + const testReqBodies = requestBodies.filter( + (body: any) => body.Metadata.operationId === "updateSystemConfig" + ); + testReqBodies.forEach(async (test: any) => { + it(`${test.Metadata.operationId} - ${test.Metadata.scenario} : Testid - ${test.Metadata.testId}`, async function () { + + if (test.Metadata.scenario === "positive") { + var data; + try { + data = await instance.updateSystemConfig( + // updateSystemConfigRequest UpdateSystemConfigRequest + test.Body + ) + } catch (er) { + console.error(er, "Response", data) + expect(er).to.be.undefined + } + } else { + await expect( + instance.updateSystemConfig( + // updateSystemConfigRequest UpdateSystemConfigRequest + test.Body + ) + ).to.be.rejectedWith(Error); + } + + }); + }); + }); + + describe('validateCommunicationChannel', function() { + + const testReqBodies = requestBodies.filter( + (body: any) => body.Metadata.operationId === "validateCommunicationChannel" + ); + testReqBodies.forEach(async (test: any) => { + it(`${test.Metadata.operationId} - ${test.Metadata.scenario} : Testid - ${test.Metadata.testId}`, async function () { + + if (test.Metadata.scenario === "positive") { + var data; + try { + data = await instance.validateCommunicationChannel( + // validateCommunicationChannelRequest ValidateCommunicationChannelRequest + test.Body + ) + } catch (er) { + console.error(er, "Response", data) + expect(er).to.be.undefined + } + } else { + await expect( + instance.validateCommunicationChannel( + // validateCommunicationChannelRequest ValidateCommunicationChannelRequest + test.Body + ) + ).to.be.rejectedWith(Error); + } + + }); + }); + }); +}); diff --git a/sdks/typescript/tests/TagsApiTest.ts b/sdks/typescript/tests/TagsApiTest.ts new file mode 100644 index 000000000..dd7002d41 --- /dev/null +++ b/sdks/typescript/tests/TagsApiTest.ts @@ -0,0 +1,220 @@ +import chai from "chai"; +import chaiAsPromised from "chai-as-promised"; +import { createBearerAuthenticationConfig } from "../utils/config"; +import { PromiseTagsApi } from "../types/PromiseAPI"; +import requestBodies from "./testDataUpdated.json"; + +chai.use(chaiAsPromised); +const expect = chai.expect; + + + +const baseUrlFromCli = process.argv.filter(s => s.startsWith("--baseUrl="))?.[0]?.split("=")?.[1] +const BASE_URL = baseUrlFromCli || "http://127.0.0.1:4123" +const config = createBearerAuthenticationConfig(BASE_URL, { + username: "tsadmin", + password: "admin", +}); + + +const instance = new PromiseTagsApi(config); + +describe('TagsApi', function() { + + + describe('assignTag', function() { + + const testReqBodies = requestBodies.filter( + (body: any) => body.Metadata.operationId === "assignTag" + ); + testReqBodies.forEach(async (test: any) => { + it(`${test.Metadata.operationId} - ${test.Metadata.scenario} : Testid - ${test.Metadata.testId}`, async function () { + + if (test.Metadata.scenario === "positive") { + var data; + try { + data = await instance.assignTag( + // assignTagRequest AssignTagRequest + test.Body + ) + } catch (er) { + console.error(er, "Response", data) + expect(er).to.be.undefined + } + } else { + await expect( + instance.assignTag( + // assignTagRequest AssignTagRequest + test.Body + ) + ).to.be.rejectedWith(Error); + } + + }); + }); + }); + + describe('createTag', function() { + + const testReqBodies = requestBodies.filter( + (body: any) => body.Metadata.operationId === "createTag" + ); + testReqBodies.forEach(async (test: any) => { + it(`${test.Metadata.operationId} - ${test.Metadata.scenario} : Testid - ${test.Metadata.testId}`, async function () { + + if (test.Metadata.scenario === "positive") { + var data; + try { + data = await instance.createTag( + // createTagRequest CreateTagRequest + test.Body + ) + } catch (er) { + console.error(er, "Response", data) + expect(er).to.be.undefined + } + } else { + await expect( + instance.createTag( + // createTagRequest CreateTagRequest + test.Body + ) + ).to.be.rejectedWith(Error); + } + + }); + }); + }); + + describe('deleteTag', function() { + + const testReqBodies = requestBodies.filter( + (body: any) => body.Metadata.operationId === "deleteTag" + ); + testReqBodies.forEach(async (test: any) => { + it(`${test.Metadata.operationId} - ${test.Metadata.scenario} : Testid - ${test.Metadata.testId}`, async function () { + + if (test.Metadata.scenario === "positive") { + var data; + try { + data = await instance.deleteTag( + // tagIdentifier tag_identifier + test.Path_Variables.tag_identifier + ) + } catch (er) { + console.error(er, "Response", data) + expect(er).to.be.undefined + } + } else { + await expect( + instance.deleteTag( + // tagIdentifier tag_identifier + test.Path_Variables.tag_identifier + ) + ).to.be.rejectedWith(Error); + } + + }); + }); + }); + + describe('searchTags', function() { + + const testReqBodies = requestBodies.filter( + (body: any) => body.Metadata.operationId === "searchTags" + ); + testReqBodies.forEach(async (test: any) => { + it(`${test.Metadata.operationId} - ${test.Metadata.scenario} : Testid - ${test.Metadata.testId}`, async function () { + + if (test.Metadata.scenario === "positive") { + var data; + try { + data = await instance.searchTags( + // searchTagsRequest SearchTagsRequest + test.Body + ) + } catch (er) { + console.error(er, "Response", data) + expect(er).to.be.undefined + } + } else { + await expect( + instance.searchTags( + // searchTagsRequest SearchTagsRequest + test.Body + ) + ).to.be.rejectedWith(Error); + } + + }); + }); + }); + + describe('unassignTag', function() { + + const testReqBodies = requestBodies.filter( + (body: any) => body.Metadata.operationId === "unassignTag" + ); + testReqBodies.forEach(async (test: any) => { + it(`${test.Metadata.operationId} - ${test.Metadata.scenario} : Testid - ${test.Metadata.testId}`, async function () { + + if (test.Metadata.scenario === "positive") { + var data; + try { + data = await instance.unassignTag( + // unassignTagRequest UnassignTagRequest + test.Body + ) + } catch (er) { + console.error(er, "Response", data) + expect(er).to.be.undefined + } + } else { + await expect( + instance.unassignTag( + // unassignTagRequest UnassignTagRequest + test.Body + ) + ).to.be.rejectedWith(Error); + } + + }); + }); + }); + + describe('updateTag', function() { + + const testReqBodies = requestBodies.filter( + (body: any) => body.Metadata.operationId === "updateTag" + ); + testReqBodies.forEach(async (test: any) => { + it(`${test.Metadata.operationId} - ${test.Metadata.scenario} : Testid - ${test.Metadata.testId}`, async function () { + + if (test.Metadata.scenario === "positive") { + var data; + try { + data = await instance.updateTag( + // tagIdentifier tag_identifier + test.Path_Variables.tag_identifier , + // updateTagRequest UpdateTagRequest + test.Body + ) + } catch (er) { + console.error(er, "Response", data) + expect(er).to.be.undefined + } + } else { + await expect( + instance.updateTag( + // tagIdentifier tag_identifier + test.Path_Variables.tag_identifier , + // updateTagRequest UpdateTagRequest + test.Body + ) + ).to.be.rejectedWith(Error); + } + + }); + }); + }); +}); diff --git a/sdks/typescript/tests/ThoughtSpotRestApiTest.ts b/sdks/typescript/tests/ThoughtSpotRestApiTest.ts new file mode 100644 index 000000000..b747d9400 --- /dev/null +++ b/sdks/typescript/tests/ThoughtSpotRestApiTest.ts @@ -0,0 +1,5296 @@ +import chai from "chai"; +import chaiAsPromised from "chai-as-promised"; +import { createBearerAuthenticationConfig } from "../utils/config"; +import { PromiseThoughtSpotRestApi } from "../types/PromiseAPI"; +import requestBodies from "./testDataUpdated.json"; + +chai.use(chaiAsPromised); +const expect = chai.expect; + + + +const baseUrlFromCli = process.argv.filter(s => s.startsWith("--baseUrl="))?.[0]?.split("=")?.[1] +const BASE_URL = baseUrlFromCli || "http://127.0.0.1:4123" +const config = createBearerAuthenticationConfig(BASE_URL, { + username: "tsadmin", + password: "admin", +}); + + +const instance = new PromiseThoughtSpotRestApi(config); + +describe('ThoughtSpotRestApi', function() { + + + describe('activateUser', function() { + + const testReqBodies = requestBodies.filter( + (body: any) => body.Metadata.operationId === "activateUser" + ); + testReqBodies.forEach(async (test: any) => { + it(`${test.Metadata.operationId} - ${test.Metadata.scenario} : Testid - ${test.Metadata.testId}`, async function () { + + if (test.Metadata.scenario === "positive") { + var data; + try { + data = await instance.activateUser( + // activateUserRequest ActivateUserRequest + test.Body + ) + } catch (er) { + console.error(er, "Response", data) + expect(er).to.be.undefined + } + } else { + await expect( + instance.activateUser( + // activateUserRequest ActivateUserRequest + test.Body + ) + ).to.be.rejectedWith(Error); + } + + }); + }); + }); + + describe('assignChangeAuthor', function() { + + const testReqBodies = requestBodies.filter( + (body: any) => body.Metadata.operationId === "assignChangeAuthor" + ); + testReqBodies.forEach(async (test: any) => { + it(`${test.Metadata.operationId} - ${test.Metadata.scenario} : Testid - ${test.Metadata.testId}`, async function () { + + if (test.Metadata.scenario === "positive") { + var data; + try { + data = await instance.assignChangeAuthor( + // assignChangeAuthorRequest AssignChangeAuthorRequest + test.Body + ) + } catch (er) { + console.error(er, "Response", data) + expect(er).to.be.undefined + } + } else { + await expect( + instance.assignChangeAuthor( + // assignChangeAuthorRequest AssignChangeAuthorRequest + test.Body + ) + ).to.be.rejectedWith(Error); + } + + }); + }); + }); + + describe('assignTag', function() { + + const testReqBodies = requestBodies.filter( + (body: any) => body.Metadata.operationId === "assignTag" + ); + testReqBodies.forEach(async (test: any) => { + it(`${test.Metadata.operationId} - ${test.Metadata.scenario} : Testid - ${test.Metadata.testId}`, async function () { + + if (test.Metadata.scenario === "positive") { + var data; + try { + data = await instance.assignTag( + // assignTagRequest AssignTagRequest + test.Body + ) + } catch (er) { + console.error(er, "Response", data) + expect(er).to.be.undefined + } + } else { + await expect( + instance.assignTag( + // assignTagRequest AssignTagRequest + test.Body + ) + ).to.be.rejectedWith(Error); + } + + }); + }); + }); + + describe('changeUserPassword', function() { + + const testReqBodies = requestBodies.filter( + (body: any) => body.Metadata.operationId === "changeUserPassword" + ); + testReqBodies.forEach(async (test: any) => { + it(`${test.Metadata.operationId} - ${test.Metadata.scenario} : Testid - ${test.Metadata.testId}`, async function () { + + if (test.Metadata.scenario === "positive") { + var data; + try { + data = await instance.changeUserPassword( + // changeUserPasswordRequest ChangeUserPasswordRequest + test.Body + ) + } catch (er) { + console.error(er, "Response", data) + expect(er).to.be.undefined + } + } else { + await expect( + instance.changeUserPassword( + // changeUserPasswordRequest ChangeUserPasswordRequest + test.Body + ) + ).to.be.rejectedWith(Error); + } + + }); + }); + }); + + describe('commitBranch', function() { + + const testReqBodies = requestBodies.filter( + (body: any) => body.Metadata.operationId === "commitBranch" + ); + testReqBodies.forEach(async (test: any) => { + it(`${test.Metadata.operationId} - ${test.Metadata.scenario} : Testid - ${test.Metadata.testId}`, async function () { + + if (test.Metadata.scenario === "positive") { + var data; + try { + data = await instance.commitBranch( + // commitBranchRequest CommitBranchRequest + test.Body + ) + } catch (er) { + console.error(er, "Response", data) + expect(er).to.be.undefined + } + } else { + await expect( + instance.commitBranch( + // commitBranchRequest CommitBranchRequest + test.Body + ) + ).to.be.rejectedWith(Error); + } + + }); + }); + }); + + describe('configureAuthSettings', function() { + + const testReqBodies = requestBodies.filter( + (body: any) => body.Metadata.operationId === "configureAuthSettings" + ); + testReqBodies.forEach(async (test: any) => { + it(`${test.Metadata.operationId} - ${test.Metadata.scenario} : Testid - ${test.Metadata.testId}`, async function () { + + if (test.Metadata.scenario === "positive") { + var data; + try { + data = await instance.configureAuthSettings( + // configureAuthSettingsRequest ConfigureAuthSettingsRequest + test.Body + ) + } catch (er) { + console.error(er, "Response", data) + expect(er).to.be.undefined + } + } else { + await expect( + instance.configureAuthSettings( + // configureAuthSettingsRequest ConfigureAuthSettingsRequest + test.Body + ) + ).to.be.rejectedWith(Error); + } + + }); + }); + }); + + describe('configureCommunicationChannelPreferences', function() { + + const testReqBodies = requestBodies.filter( + (body: any) => body.Metadata.operationId === "configureCommunicationChannelPreferences" + ); + testReqBodies.forEach(async (test: any) => { + it(`${test.Metadata.operationId} - ${test.Metadata.scenario} : Testid - ${test.Metadata.testId}`, async function () { + + if (test.Metadata.scenario === "positive") { + var data; + try { + data = await instance.configureCommunicationChannelPreferences( + // configureCommunicationChannelPreferencesRequest ConfigureCommunicationChannelPreferencesRequest + test.Body + ) + } catch (er) { + console.error(er, "Response", data) + expect(er).to.be.undefined + } + } else { + await expect( + instance.configureCommunicationChannelPreferences( + // configureCommunicationChannelPreferencesRequest ConfigureCommunicationChannelPreferencesRequest + test.Body + ) + ).to.be.rejectedWith(Error); + } + + }); + }); + }); + + describe('configureSecuritySettings', function() { + + const testReqBodies = requestBodies.filter( + (body: any) => body.Metadata.operationId === "configureSecuritySettings" + ); + testReqBodies.forEach(async (test: any) => { + it(`${test.Metadata.operationId} - ${test.Metadata.scenario} : Testid - ${test.Metadata.testId}`, async function () { + + if (test.Metadata.scenario === "positive") { + var data; + try { + data = await instance.configureSecuritySettings( + // configureSecuritySettingsRequest ConfigureSecuritySettingsRequest + test.Body + ) + } catch (er) { + console.error(er, "Response", data) + expect(er).to.be.undefined + } + } else { + await expect( + instance.configureSecuritySettings( + // configureSecuritySettingsRequest ConfigureSecuritySettingsRequest + test.Body + ) + ).to.be.rejectedWith(Error); + } + + }); + }); + }); + + describe('connectionConfigurationSearch', function() { + + const testReqBodies = requestBodies.filter( + (body: any) => body.Metadata.operationId === "connectionConfigurationSearch" + ); + testReqBodies.forEach(async (test: any) => { + it(`${test.Metadata.operationId} - ${test.Metadata.scenario} : Testid - ${test.Metadata.testId}`, async function () { + + if (test.Metadata.scenario === "positive") { + var data; + try { + data = await instance.connectionConfigurationSearch( + // connectionConfigurationSearchRequest ConnectionConfigurationSearchRequest + test.Body + ) + } catch (er) { + console.error(er, "Response", data) + expect(er).to.be.undefined + } + } else { + await expect( + instance.connectionConfigurationSearch( + // connectionConfigurationSearchRequest ConnectionConfigurationSearchRequest + test.Body + ) + ).to.be.rejectedWith(Error); + } + + }); + }); + }); + + describe('convertWorksheetToModel', function() { + + const testReqBodies = requestBodies.filter( + (body: any) => body.Metadata.operationId === "convertWorksheetToModel" + ); + testReqBodies.forEach(async (test: any) => { + it(`${test.Metadata.operationId} - ${test.Metadata.scenario} : Testid - ${test.Metadata.testId}`, async function () { + + if (test.Metadata.scenario === "positive") { + var data; + try { + data = await instance.convertWorksheetToModel( + // convertWorksheetToModelRequest ConvertWorksheetToModelRequest + test.Body + ) + } catch (er) { + console.error(er, "Response", data) + expect(er).to.be.undefined + } + } else { + await expect( + instance.convertWorksheetToModel( + // convertWorksheetToModelRequest ConvertWorksheetToModelRequest + test.Body + ) + ).to.be.rejectedWith(Error); + } + + }); + }); + }); + + describe('copyObject', function() { + + const testReqBodies = requestBodies.filter( + (body: any) => body.Metadata.operationId === "copyObject" + ); + testReqBodies.forEach(async (test: any) => { + it(`${test.Metadata.operationId} - ${test.Metadata.scenario} : Testid - ${test.Metadata.testId}`, async function () { + + if (test.Metadata.scenario === "positive") { + var data; + try { + data = await instance.copyObject( + // copyObjectRequest CopyObjectRequest + test.Body + ) + } catch (er) { + console.error(er, "Response", data) + expect(er).to.be.undefined + } + } else { + await expect( + instance.copyObject( + // copyObjectRequest CopyObjectRequest + test.Body + ) + ).to.be.rejectedWith(Error); + } + + }); + }); + }); + + describe('createAgentConversation', function() { + + const testReqBodies = requestBodies.filter( + (body: any) => body.Metadata.operationId === "createAgentConversation" + ); + testReqBodies.forEach(async (test: any) => { + it(`${test.Metadata.operationId} - ${test.Metadata.scenario} : Testid - ${test.Metadata.testId}`, async function () { + + if (test.Metadata.scenario === "positive") { + var data; + try { + data = await instance.createAgentConversation( + // createAgentConversationRequest CreateAgentConversationRequest + test.Body + ) + } catch (er) { + console.error(er, "Response", data) + expect(er).to.be.undefined + } + } else { + await expect( + instance.createAgentConversation( + // createAgentConversationRequest CreateAgentConversationRequest + test.Body + ) + ).to.be.rejectedWith(Error); + } + + }); + }); + }); + + describe('createCalendar', function() { + + const testReqBodies = requestBodies.filter( + (body: any) => body.Metadata.operationId === "createCalendar" + ); + testReqBodies.forEach(async (test: any) => { + it(`${test.Metadata.operationId} - ${test.Metadata.scenario} : Testid - ${test.Metadata.testId}`, async function () { + + if (test.Metadata.scenario === "positive") { + var data; + try { + data = await instance.createCalendar( + // createCalendarRequest CreateCalendarRequest + test.Body + ) + } catch (er) { + console.error(er, "Response", data) + expect(er).to.be.undefined + } + } else { + await expect( + instance.createCalendar( + // createCalendarRequest CreateCalendarRequest + test.Body + ) + ).to.be.rejectedWith(Error); + } + + }); + }); + }); + + describe('createCollection', function() { + + const testReqBodies = requestBodies.filter( + (body: any) => body.Metadata.operationId === "createCollection" + ); + testReqBodies.forEach(async (test: any) => { + it(`${test.Metadata.operationId} - ${test.Metadata.scenario} : Testid - ${test.Metadata.testId}`, async function () { + + if (test.Metadata.scenario === "positive") { + var data; + try { + data = await instance.createCollection( + // createCollectionRequest CreateCollectionRequest + test.Body + ) + } catch (er) { + console.error(er, "Response", data) + expect(er).to.be.undefined + } + } else { + await expect( + instance.createCollection( + // createCollectionRequest CreateCollectionRequest + test.Body + ) + ).to.be.rejectedWith(Error); + } + + }); + }); + }); + + describe('createConfig', function() { + + const testReqBodies = requestBodies.filter( + (body: any) => body.Metadata.operationId === "createConfig" + ); + testReqBodies.forEach(async (test: any) => { + it(`${test.Metadata.operationId} - ${test.Metadata.scenario} : Testid - ${test.Metadata.testId}`, async function () { + + if (test.Metadata.scenario === "positive") { + var data; + try { + data = await instance.createConfig( + // createConfigRequest CreateConfigRequest + test.Body + ) + } catch (er) { + console.error(er, "Response", data) + expect(er).to.be.undefined + } + } else { + await expect( + instance.createConfig( + // createConfigRequest CreateConfigRequest + test.Body + ) + ).to.be.rejectedWith(Error); + } + + }); + }); + }); + + describe('createConnection', function() { + + const testReqBodies = requestBodies.filter( + (body: any) => body.Metadata.operationId === "createConnection" + ); + testReqBodies.forEach(async (test: any) => { + it(`${test.Metadata.operationId} - ${test.Metadata.scenario} : Testid - ${test.Metadata.testId}`, async function () { + + if (test.Metadata.scenario === "positive") { + var data; + try { + data = await instance.createConnection( + // createConnectionRequest CreateConnectionRequest + test.Body + ) + } catch (er) { + console.error(er, "Response", data) + expect(er).to.be.undefined + } + } else { + await expect( + instance.createConnection( + // createConnectionRequest CreateConnectionRequest + test.Body + ) + ).to.be.rejectedWith(Error); + } + + }); + }); + }); + + describe('createConnectionConfiguration', function() { + + const testReqBodies = requestBodies.filter( + (body: any) => body.Metadata.operationId === "createConnectionConfiguration" + ); + testReqBodies.forEach(async (test: any) => { + it(`${test.Metadata.operationId} - ${test.Metadata.scenario} : Testid - ${test.Metadata.testId}`, async function () { + + if (test.Metadata.scenario === "positive") { + var data; + try { + data = await instance.createConnectionConfiguration( + // createConnectionConfigurationRequest CreateConnectionConfigurationRequest + test.Body + ) + } catch (er) { + console.error(er, "Response", data) + expect(er).to.be.undefined + } + } else { + await expect( + instance.createConnectionConfiguration( + // createConnectionConfigurationRequest CreateConnectionConfigurationRequest + test.Body + ) + ).to.be.rejectedWith(Error); + } + + }); + }); + }); + + describe('createConversation', function() { + + const testReqBodies = requestBodies.filter( + (body: any) => body.Metadata.operationId === "createConversation" + ); + testReqBodies.forEach(async (test: any) => { + it(`${test.Metadata.operationId} - ${test.Metadata.scenario} : Testid - ${test.Metadata.testId}`, async function () { + + if (test.Metadata.scenario === "positive") { + var data; + try { + data = await instance.createConversation( + // createConversationRequest CreateConversationRequest + test.Body + ) + } catch (er) { + console.error(er, "Response", data) + expect(er).to.be.undefined + } + } else { + await expect( + instance.createConversation( + // createConversationRequest CreateConversationRequest + test.Body + ) + ).to.be.rejectedWith(Error); + } + + }); + }); + }); + + describe('createCustomAction', function() { + + const testReqBodies = requestBodies.filter( + (body: any) => body.Metadata.operationId === "createCustomAction" + ); + testReqBodies.forEach(async (test: any) => { + it(`${test.Metadata.operationId} - ${test.Metadata.scenario} : Testid - ${test.Metadata.testId}`, async function () { + + if (test.Metadata.scenario === "positive") { + var data; + try { + data = await instance.createCustomAction( + // createCustomActionRequest CreateCustomActionRequest + test.Body + ) + } catch (er) { + console.error(er, "Response", data) + expect(er).to.be.undefined + } + } else { + await expect( + instance.createCustomAction( + // createCustomActionRequest CreateCustomActionRequest + test.Body + ) + ).to.be.rejectedWith(Error); + } + + }); + }); + }); + + describe('createEmailCustomization', function() { + + const testReqBodies = requestBodies.filter( + (body: any) => body.Metadata.operationId === "createEmailCustomization" + ); + testReqBodies.forEach(async (test: any) => { + it(`${test.Metadata.operationId} - ${test.Metadata.scenario} : Testid - ${test.Metadata.testId}`, async function () { + + if (test.Metadata.scenario === "positive") { + var data; + try { + data = await instance.createEmailCustomization( + // createEmailCustomizationRequest CreateEmailCustomizationRequest + test.Body + ) + } catch (er) { + console.error(er, "Response", data) + expect(er).to.be.undefined + } + } else { + await expect( + instance.createEmailCustomization( + // createEmailCustomizationRequest CreateEmailCustomizationRequest + test.Body + ) + ).to.be.rejectedWith(Error); + } + + }); + }); + }); + + describe('createOrg', function() { + + const testReqBodies = requestBodies.filter( + (body: any) => body.Metadata.operationId === "createOrg" + ); + testReqBodies.forEach(async (test: any) => { + it(`${test.Metadata.operationId} - ${test.Metadata.scenario} : Testid - ${test.Metadata.testId}`, async function () { + + if (test.Metadata.scenario === "positive") { + var data; + try { + data = await instance.createOrg( + // createOrgRequest CreateOrgRequest + test.Body + ) + } catch (er) { + console.error(er, "Response", data) + expect(er).to.be.undefined + } + } else { + await expect( + instance.createOrg( + // createOrgRequest CreateOrgRequest + test.Body + ) + ).to.be.rejectedWith(Error); + } + + }); + }); + }); + + describe('createRole', function() { + + const testReqBodies = requestBodies.filter( + (body: any) => body.Metadata.operationId === "createRole" + ); + testReqBodies.forEach(async (test: any) => { + it(`${test.Metadata.operationId} - ${test.Metadata.scenario} : Testid - ${test.Metadata.testId}`, async function () { + + if (test.Metadata.scenario === "positive") { + var data; + try { + data = await instance.createRole( + // createRoleRequest CreateRoleRequest + test.Body + ) + } catch (er) { + console.error(er, "Response", data) + expect(er).to.be.undefined + } + } else { + await expect( + instance.createRole( + // createRoleRequest CreateRoleRequest + test.Body + ) + ).to.be.rejectedWith(Error); + } + + }); + }); + }); + + describe('createSchedule', function() { + + const testReqBodies = requestBodies.filter( + (body: any) => body.Metadata.operationId === "createSchedule" + ); + testReqBodies.forEach(async (test: any) => { + it(`${test.Metadata.operationId} - ${test.Metadata.scenario} : Testid - ${test.Metadata.testId}`, async function () { + + if (test.Metadata.scenario === "positive") { + var data; + try { + data = await instance.createSchedule( + // createScheduleRequest CreateScheduleRequest + test.Body + ) + } catch (er) { + console.error(er, "Response", data) + expect(er).to.be.undefined + } + } else { + await expect( + instance.createSchedule( + // createScheduleRequest CreateScheduleRequest + test.Body + ) + ).to.be.rejectedWith(Error); + } + + }); + }); + }); + + describe('createTag', function() { + + const testReqBodies = requestBodies.filter( + (body: any) => body.Metadata.operationId === "createTag" + ); + testReqBodies.forEach(async (test: any) => { + it(`${test.Metadata.operationId} - ${test.Metadata.scenario} : Testid - ${test.Metadata.testId}`, async function () { + + if (test.Metadata.scenario === "positive") { + var data; + try { + data = await instance.createTag( + // createTagRequest CreateTagRequest + test.Body + ) + } catch (er) { + console.error(er, "Response", data) + expect(er).to.be.undefined + } + } else { + await expect( + instance.createTag( + // createTagRequest CreateTagRequest + test.Body + ) + ).to.be.rejectedWith(Error); + } + + }); + }); + }); + + describe('createUser', function() { + + const testReqBodies = requestBodies.filter( + (body: any) => body.Metadata.operationId === "createUser" + ); + testReqBodies.forEach(async (test: any) => { + it(`${test.Metadata.operationId} - ${test.Metadata.scenario} : Testid - ${test.Metadata.testId}`, async function () { + + if (test.Metadata.scenario === "positive") { + var data; + try { + data = await instance.createUser( + // createUserRequest CreateUserRequest + test.Body + ) + } catch (er) { + console.error(er, "Response", data) + expect(er).to.be.undefined + } + } else { + await expect( + instance.createUser( + // createUserRequest CreateUserRequest + test.Body + ) + ).to.be.rejectedWith(Error); + } + + }); + }); + }); + + describe('createUserGroup', function() { + + const testReqBodies = requestBodies.filter( + (body: any) => body.Metadata.operationId === "createUserGroup" + ); + testReqBodies.forEach(async (test: any) => { + it(`${test.Metadata.operationId} - ${test.Metadata.scenario} : Testid - ${test.Metadata.testId}`, async function () { + + if (test.Metadata.scenario === "positive") { + var data; + try { + data = await instance.createUserGroup( + // createUserGroupRequest CreateUserGroupRequest + test.Body + ) + } catch (er) { + console.error(er, "Response", data) + expect(er).to.be.undefined + } + } else { + await expect( + instance.createUserGroup( + // createUserGroupRequest CreateUserGroupRequest + test.Body + ) + ).to.be.rejectedWith(Error); + } + + }); + }); + }); + + describe('createVariable', function() { + + const testReqBodies = requestBodies.filter( + (body: any) => body.Metadata.operationId === "createVariable" + ); + testReqBodies.forEach(async (test: any) => { + it(`${test.Metadata.operationId} - ${test.Metadata.scenario} : Testid - ${test.Metadata.testId}`, async function () { + + if (test.Metadata.scenario === "positive") { + var data; + try { + data = await instance.createVariable( + // createVariableRequest CreateVariableRequest + test.Body + ) + } catch (er) { + console.error(er, "Response", data) + expect(er).to.be.undefined + } + } else { + await expect( + instance.createVariable( + // createVariableRequest CreateVariableRequest + test.Body + ) + ).to.be.rejectedWith(Error); + } + + }); + }); + }); + + describe('createWebhookConfiguration', function() { + + const testReqBodies = requestBodies.filter( + (body: any) => body.Metadata.operationId === "createWebhookConfiguration" + ); + testReqBodies.forEach(async (test: any) => { + it(`${test.Metadata.operationId} - ${test.Metadata.scenario} : Testid - ${test.Metadata.testId}`, async function () { + + if (test.Metadata.scenario === "positive") { + var data; + try { + data = await instance.createWebhookConfiguration( + // createWebhookConfigurationRequest CreateWebhookConfigurationRequest + test.Body + ) + } catch (er) { + console.error(er, "Response", data) + expect(er).to.be.undefined + } + } else { + await expect( + instance.createWebhookConfiguration( + // createWebhookConfigurationRequest CreateWebhookConfigurationRequest + test.Body + ) + ).to.be.rejectedWith(Error); + } + + }); + }); + }); + + describe('dbtConnection', function() { + + const testReqBodies = requestBodies.filter( + (body: any) => body.Metadata.operationId === "dbtConnection" + ); + testReqBodies.forEach(async (test: any) => { + it(`${test.Metadata.operationId} - ${test.Metadata.scenario} : Testid - ${test.Metadata.testId}`, async function () { + + if (test.Metadata.scenario === "positive") { + var data; + try { + data = await instance.dbtConnection( + // connectionName connection_name + , + // databaseName database_name + , + // importType import_type + , + // accessToken access_token + , + // dbtUrl dbt_url + , + // accountId account_id + , + // projectId project_id + , + // dbtEnvId dbt_env_id + , + // projectName project_name + , + // fileContent file_content + + ) + } catch (er) { + console.error(er, "Response", data) + expect(er).to.be.undefined + } + } else { + await expect( + instance.dbtConnection( + // connectionName connection_name + , + // databaseName database_name + , + // importType import_type + , + // accessToken access_token + , + // dbtUrl dbt_url + , + // accountId account_id + , + // projectId project_id + , + // dbtEnvId dbt_env_id + , + // projectName project_name + , + // fileContent file_content + + ) + ).to.be.rejectedWith(Error); + } + + }); + }); + }); + + describe('dbtGenerateSyncTml', function() { + + const testReqBodies = requestBodies.filter( + (body: any) => body.Metadata.operationId === "dbtGenerateSyncTml" + ); + testReqBodies.forEach(async (test: any) => { + it(`${test.Metadata.operationId} - ${test.Metadata.scenario} : Testid - ${test.Metadata.testId}`, async function () { + + if (test.Metadata.scenario === "positive") { + var data; + try { + data = await instance.dbtGenerateSyncTml( + // dbtConnectionIdentifier dbt_connection_identifier + , + // fileContent file_content + + ) + } catch (er) { + console.error(er, "Response", data) + expect(er).to.be.undefined + } + } else { + await expect( + instance.dbtGenerateSyncTml( + // dbtConnectionIdentifier dbt_connection_identifier + , + // fileContent file_content + + ) + ).to.be.rejectedWith(Error); + } + + }); + }); + }); + + describe('dbtGenerateTml', function() { + + const testReqBodies = requestBodies.filter( + (body: any) => body.Metadata.operationId === "dbtGenerateTml" + ); + testReqBodies.forEach(async (test: any) => { + it(`${test.Metadata.operationId} - ${test.Metadata.scenario} : Testid - ${test.Metadata.testId}`, async function () { + + if (test.Metadata.scenario === "positive") { + var data; + try { + data = await instance.dbtGenerateTml( + // dbtConnectionIdentifier dbt_connection_identifier + , + // modelTables model_tables + , + // importWorksheets import_worksheets + , + // worksheets worksheets + , + // fileContent file_content + + ) + } catch (er) { + console.error(er, "Response", data) + expect(er).to.be.undefined + } + } else { + await expect( + instance.dbtGenerateTml( + // dbtConnectionIdentifier dbt_connection_identifier + , + // modelTables model_tables + , + // importWorksheets import_worksheets + , + // worksheets worksheets + , + // fileContent file_content + + ) + ).to.be.rejectedWith(Error); + } + + }); + }); + }); + + describe('dbtSearch', function() { + + const testReqBodies = requestBodies.filter( + (body: any) => body.Metadata.operationId === "dbtSearch" + ); + testReqBodies.forEach(async (test: any) => { + it(`${test.Metadata.operationId} - ${test.Metadata.scenario} : Testid - ${test.Metadata.testId}`, async function () { + + if (test.Metadata.scenario === "positive") { + var data; + try { + data = await instance.dbtSearch( + ) + } catch (er) { + console.error(er, "Response", data) + expect(er).to.be.undefined + } + } else { + await expect( + instance.dbtSearch( + ) + ).to.be.rejectedWith(Error); + } + + }); + }); + }); + + describe('deactivateUser', function() { + + const testReqBodies = requestBodies.filter( + (body: any) => body.Metadata.operationId === "deactivateUser" + ); + testReqBodies.forEach(async (test: any) => { + it(`${test.Metadata.operationId} - ${test.Metadata.scenario} : Testid - ${test.Metadata.testId}`, async function () { + + if (test.Metadata.scenario === "positive") { + var data; + try { + data = await instance.deactivateUser( + // deactivateUserRequest DeactivateUserRequest + test.Body + ) + } catch (er) { + console.error(er, "Response", data) + expect(er).to.be.undefined + } + } else { + await expect( + instance.deactivateUser( + // deactivateUserRequest DeactivateUserRequest + test.Body + ) + ).to.be.rejectedWith(Error); + } + + }); + }); + }); + + describe('deleteCalendar', function() { + + const testReqBodies = requestBodies.filter( + (body: any) => body.Metadata.operationId === "deleteCalendar" + ); + testReqBodies.forEach(async (test: any) => { + it(`${test.Metadata.operationId} - ${test.Metadata.scenario} : Testid - ${test.Metadata.testId}`, async function () { + + if (test.Metadata.scenario === "positive") { + var data; + try { + data = await instance.deleteCalendar( + // calendarIdentifier calendar_identifier + test.Path_Variables.calendar_identifier + ) + } catch (er) { + console.error(er, "Response", data) + expect(er).to.be.undefined + } + } else { + await expect( + instance.deleteCalendar( + // calendarIdentifier calendar_identifier + test.Path_Variables.calendar_identifier + ) + ).to.be.rejectedWith(Error); + } + + }); + }); + }); + + describe('deleteCollection', function() { + + const testReqBodies = requestBodies.filter( + (body: any) => body.Metadata.operationId === "deleteCollection" + ); + testReqBodies.forEach(async (test: any) => { + it(`${test.Metadata.operationId} - ${test.Metadata.scenario} : Testid - ${test.Metadata.testId}`, async function () { + + if (test.Metadata.scenario === "positive") { + var data; + try { + data = await instance.deleteCollection( + // deleteCollectionRequest DeleteCollectionRequest + test.Body + ) + } catch (er) { + console.error(er, "Response", data) + expect(er).to.be.undefined + } + } else { + await expect( + instance.deleteCollection( + // deleteCollectionRequest DeleteCollectionRequest + test.Body + ) + ).to.be.rejectedWith(Error); + } + + }); + }); + }); + + describe('deleteConfig', function() { + + const testReqBodies = requestBodies.filter( + (body: any) => body.Metadata.operationId === "deleteConfig" + ); + testReqBodies.forEach(async (test: any) => { + it(`${test.Metadata.operationId} - ${test.Metadata.scenario} : Testid - ${test.Metadata.testId}`, async function () { + + if (test.Metadata.scenario === "positive") { + var data; + try { + data = await instance.deleteConfig( + // deleteConfigRequest DeleteConfigRequest + test.Body + ) + } catch (er) { + console.error(er, "Response", data) + expect(er).to.be.undefined + } + } else { + await expect( + instance.deleteConfig( + // deleteConfigRequest DeleteConfigRequest + test.Body + ) + ).to.be.rejectedWith(Error); + } + + }); + }); + }); + + describe('deleteConnection', function() { + + const testReqBodies = requestBodies.filter( + (body: any) => body.Metadata.operationId === "deleteConnection" + ); + testReqBodies.forEach(async (test: any) => { + it(`${test.Metadata.operationId} - ${test.Metadata.scenario} : Testid - ${test.Metadata.testId}`, async function () { + + if (test.Metadata.scenario === "positive") { + var data; + try { + data = await instance.deleteConnection( + // deleteConnectionRequest DeleteConnectionRequest + test.Body + ) + } catch (er) { + console.error(er, "Response", data) + expect(er).to.be.undefined + } + } else { + await expect( + instance.deleteConnection( + // deleteConnectionRequest DeleteConnectionRequest + test.Body + ) + ).to.be.rejectedWith(Error); + } + + }); + }); + }); + + describe('deleteConnectionConfiguration', function() { + + const testReqBodies = requestBodies.filter( + (body: any) => body.Metadata.operationId === "deleteConnectionConfiguration" + ); + testReqBodies.forEach(async (test: any) => { + it(`${test.Metadata.operationId} - ${test.Metadata.scenario} : Testid - ${test.Metadata.testId}`, async function () { + + if (test.Metadata.scenario === "positive") { + var data; + try { + data = await instance.deleteConnectionConfiguration( + // deleteConnectionConfigurationRequest DeleteConnectionConfigurationRequest + test.Body + ) + } catch (er) { + console.error(er, "Response", data) + expect(er).to.be.undefined + } + } else { + await expect( + instance.deleteConnectionConfiguration( + // deleteConnectionConfigurationRequest DeleteConnectionConfigurationRequest + test.Body + ) + ).to.be.rejectedWith(Error); + } + + }); + }); + }); + + describe('deleteConnectionV2', function() { + + const testReqBodies = requestBodies.filter( + (body: any) => body.Metadata.operationId === "deleteConnectionV2" + ); + testReqBodies.forEach(async (test: any) => { + it(`${test.Metadata.operationId} - ${test.Metadata.scenario} : Testid - ${test.Metadata.testId}`, async function () { + + if (test.Metadata.scenario === "positive") { + var data; + try { + data = await instance.deleteConnectionV2( + // connectionIdentifier connection_identifier + test.Path_Variables.connection_identifier + ) + } catch (er) { + console.error(er, "Response", data) + expect(er).to.be.undefined + } + } else { + await expect( + instance.deleteConnectionV2( + // connectionIdentifier connection_identifier + test.Path_Variables.connection_identifier + ) + ).to.be.rejectedWith(Error); + } + + }); + }); + }); + + describe('deleteCustomAction', function() { + + const testReqBodies = requestBodies.filter( + (body: any) => body.Metadata.operationId === "deleteCustomAction" + ); + testReqBodies.forEach(async (test: any) => { + it(`${test.Metadata.operationId} - ${test.Metadata.scenario} : Testid - ${test.Metadata.testId}`, async function () { + + if (test.Metadata.scenario === "positive") { + var data; + try { + data = await instance.deleteCustomAction( + // customActionIdentifier custom_action_identifier + test.Path_Variables.custom_action_identifier + ) + } catch (er) { + console.error(er, "Response", data) + expect(er).to.be.undefined + } + } else { + await expect( + instance.deleteCustomAction( + // customActionIdentifier custom_action_identifier + test.Path_Variables.custom_action_identifier + ) + ).to.be.rejectedWith(Error); + } + + }); + }); + }); + + describe('deleteDbtConnection', function() { + + const testReqBodies = requestBodies.filter( + (body: any) => body.Metadata.operationId === "deleteDbtConnection" + ); + testReqBodies.forEach(async (test: any) => { + it(`${test.Metadata.operationId} - ${test.Metadata.scenario} : Testid - ${test.Metadata.testId}`, async function () { + + if (test.Metadata.scenario === "positive") { + var data; + try { + data = await instance.deleteDbtConnection( + // dbtConnectionIdentifier dbt_connection_identifier + test.Path_Variables.dbt_connection_identifier + ) + } catch (er) { + console.error(er, "Response", data) + expect(er).to.be.undefined + } + } else { + await expect( + instance.deleteDbtConnection( + // dbtConnectionIdentifier dbt_connection_identifier + test.Path_Variables.dbt_connection_identifier + ) + ).to.be.rejectedWith(Error); + } + + }); + }); + }); + + describe('deleteEmailCustomization', function() { + + const testReqBodies = requestBodies.filter( + (body: any) => body.Metadata.operationId === "deleteEmailCustomization" + ); + testReqBodies.forEach(async (test: any) => { + it(`${test.Metadata.operationId} - ${test.Metadata.scenario} : Testid - ${test.Metadata.testId}`, async function () { + + if (test.Metadata.scenario === "positive") { + var data; + try { + data = await instance.deleteEmailCustomization( + // templateIdentifier template_identifier + test.Path_Variables.template_identifier + ) + } catch (er) { + console.error(er, "Response", data) + expect(er).to.be.undefined + } + } else { + await expect( + instance.deleteEmailCustomization( + // templateIdentifier template_identifier + test.Path_Variables.template_identifier + ) + ).to.be.rejectedWith(Error); + } + + }); + }); + }); + + describe('deleteMetadata', function() { + + const testReqBodies = requestBodies.filter( + (body: any) => body.Metadata.operationId === "deleteMetadata" + ); + testReqBodies.forEach(async (test: any) => { + it(`${test.Metadata.operationId} - ${test.Metadata.scenario} : Testid - ${test.Metadata.testId}`, async function () { + + if (test.Metadata.scenario === "positive") { + var data; + try { + data = await instance.deleteMetadata( + // deleteMetadataRequest DeleteMetadataRequest + test.Body + ) + } catch (er) { + console.error(er, "Response", data) + expect(er).to.be.undefined + } + } else { + await expect( + instance.deleteMetadata( + // deleteMetadataRequest DeleteMetadataRequest + test.Body + ) + ).to.be.rejectedWith(Error); + } + + }); + }); + }); + + describe('deleteOrg', function() { + + const testReqBodies = requestBodies.filter( + (body: any) => body.Metadata.operationId === "deleteOrg" + ); + testReqBodies.forEach(async (test: any) => { + it(`${test.Metadata.operationId} - ${test.Metadata.scenario} : Testid - ${test.Metadata.testId}`, async function () { + + if (test.Metadata.scenario === "positive") { + var data; + try { + data = await instance.deleteOrg( + // orgIdentifier org_identifier + test.Path_Variables.org_identifier + ) + } catch (er) { + console.error(er, "Response", data) + expect(er).to.be.undefined + } + } else { + await expect( + instance.deleteOrg( + // orgIdentifier org_identifier + test.Path_Variables.org_identifier + ) + ).to.be.rejectedWith(Error); + } + + }); + }); + }); + + describe('deleteOrgEmailCustomization', function() { + + const testReqBodies = requestBodies.filter( + (body: any) => body.Metadata.operationId === "deleteOrgEmailCustomization" + ); + testReqBodies.forEach(async (test: any) => { + it(`${test.Metadata.operationId} - ${test.Metadata.scenario} : Testid - ${test.Metadata.testId}`, async function () { + + if (test.Metadata.scenario === "positive") { + var data; + try { + data = await instance.deleteOrgEmailCustomization( + // deleteOrgEmailCustomizationRequest DeleteOrgEmailCustomizationRequest + test.Body + ) + } catch (er) { + console.error(er, "Response", data) + expect(er).to.be.undefined + } + } else { + await expect( + instance.deleteOrgEmailCustomization( + // deleteOrgEmailCustomizationRequest DeleteOrgEmailCustomizationRequest + test.Body + ) + ).to.be.rejectedWith(Error); + } + + }); + }); + }); + + describe('deleteRole', function() { + + const testReqBodies = requestBodies.filter( + (body: any) => body.Metadata.operationId === "deleteRole" + ); + testReqBodies.forEach(async (test: any) => { + it(`${test.Metadata.operationId} - ${test.Metadata.scenario} : Testid - ${test.Metadata.testId}`, async function () { + + if (test.Metadata.scenario === "positive") { + var data; + try { + data = await instance.deleteRole( + // roleIdentifier role_identifier + test.Path_Variables.role_identifier + ) + } catch (er) { + console.error(er, "Response", data) + expect(er).to.be.undefined + } + } else { + await expect( + instance.deleteRole( + // roleIdentifier role_identifier + test.Path_Variables.role_identifier + ) + ).to.be.rejectedWith(Error); + } + + }); + }); + }); + + describe('deleteSchedule', function() { + + const testReqBodies = requestBodies.filter( + (body: any) => body.Metadata.operationId === "deleteSchedule" + ); + testReqBodies.forEach(async (test: any) => { + it(`${test.Metadata.operationId} - ${test.Metadata.scenario} : Testid - ${test.Metadata.testId}`, async function () { + + if (test.Metadata.scenario === "positive") { + var data; + try { + data = await instance.deleteSchedule( + // scheduleIdentifier schedule_identifier + test.Path_Variables.schedule_identifier + ) + } catch (er) { + console.error(er, "Response", data) + expect(er).to.be.undefined + } + } else { + await expect( + instance.deleteSchedule( + // scheduleIdentifier schedule_identifier + test.Path_Variables.schedule_identifier + ) + ).to.be.rejectedWith(Error); + } + + }); + }); + }); + + describe('deleteTag', function() { + + const testReqBodies = requestBodies.filter( + (body: any) => body.Metadata.operationId === "deleteTag" + ); + testReqBodies.forEach(async (test: any) => { + it(`${test.Metadata.operationId} - ${test.Metadata.scenario} : Testid - ${test.Metadata.testId}`, async function () { + + if (test.Metadata.scenario === "positive") { + var data; + try { + data = await instance.deleteTag( + // tagIdentifier tag_identifier + test.Path_Variables.tag_identifier + ) + } catch (er) { + console.error(er, "Response", data) + expect(er).to.be.undefined + } + } else { + await expect( + instance.deleteTag( + // tagIdentifier tag_identifier + test.Path_Variables.tag_identifier + ) + ).to.be.rejectedWith(Error); + } + + }); + }); + }); + + describe('deleteUser', function() { + + const testReqBodies = requestBodies.filter( + (body: any) => body.Metadata.operationId === "deleteUser" + ); + testReqBodies.forEach(async (test: any) => { + it(`${test.Metadata.operationId} - ${test.Metadata.scenario} : Testid - ${test.Metadata.testId}`, async function () { + + if (test.Metadata.scenario === "positive") { + var data; + try { + data = await instance.deleteUser( + // userIdentifier user_identifier + test.Path_Variables.user_identifier + ) + } catch (er) { + console.error(er, "Response", data) + expect(er).to.be.undefined + } + } else { + await expect( + instance.deleteUser( + // userIdentifier user_identifier + test.Path_Variables.user_identifier + ) + ).to.be.rejectedWith(Error); + } + + }); + }); + }); + + describe('deleteUserGroup', function() { + + const testReqBodies = requestBodies.filter( + (body: any) => body.Metadata.operationId === "deleteUserGroup" + ); + testReqBodies.forEach(async (test: any) => { + it(`${test.Metadata.operationId} - ${test.Metadata.scenario} : Testid - ${test.Metadata.testId}`, async function () { + + if (test.Metadata.scenario === "positive") { + var data; + try { + data = await instance.deleteUserGroup( + // groupIdentifier group_identifier + test.Path_Variables.group_identifier + ) + } catch (er) { + console.error(er, "Response", data) + expect(er).to.be.undefined + } + } else { + await expect( + instance.deleteUserGroup( + // groupIdentifier group_identifier + test.Path_Variables.group_identifier + ) + ).to.be.rejectedWith(Error); + } + + }); + }); + }); + + describe('deleteVariable', function() { + + const testReqBodies = requestBodies.filter( + (body: any) => body.Metadata.operationId === "deleteVariable" + ); + testReqBodies.forEach(async (test: any) => { + it(`${test.Metadata.operationId} - ${test.Metadata.scenario} : Testid - ${test.Metadata.testId}`, async function () { + + if (test.Metadata.scenario === "positive") { + var data; + try { + data = await instance.deleteVariable( + // identifier identifier + test.Path_Variables.identifier + ) + } catch (er) { + console.error(er, "Response", data) + expect(er).to.be.undefined + } + } else { + await expect( + instance.deleteVariable( + // identifier identifier + test.Path_Variables.identifier + ) + ).to.be.rejectedWith(Error); + } + + }); + }); + }); + + describe('deleteVariables', function() { + + const testReqBodies = requestBodies.filter( + (body: any) => body.Metadata.operationId === "deleteVariables" + ); + testReqBodies.forEach(async (test: any) => { + it(`${test.Metadata.operationId} - ${test.Metadata.scenario} : Testid - ${test.Metadata.testId}`, async function () { + + if (test.Metadata.scenario === "positive") { + var data; + try { + data = await instance.deleteVariables( + // deleteVariablesRequest DeleteVariablesRequest + test.Body + ) + } catch (er) { + console.error(er, "Response", data) + expect(er).to.be.undefined + } + } else { + await expect( + instance.deleteVariables( + // deleteVariablesRequest DeleteVariablesRequest + test.Body + ) + ).to.be.rejectedWith(Error); + } + + }); + }); + }); + + describe('deleteWebhookConfigurations', function() { + + const testReqBodies = requestBodies.filter( + (body: any) => body.Metadata.operationId === "deleteWebhookConfigurations" + ); + testReqBodies.forEach(async (test: any) => { + it(`${test.Metadata.operationId} - ${test.Metadata.scenario} : Testid - ${test.Metadata.testId}`, async function () { + + if (test.Metadata.scenario === "positive") { + var data; + try { + data = await instance.deleteWebhookConfigurations( + // deleteWebhookConfigurationsRequest DeleteWebhookConfigurationsRequest + test.Body + ) + } catch (er) { + console.error(er, "Response", data) + expect(er).to.be.undefined + } + } else { + await expect( + instance.deleteWebhookConfigurations( + // deleteWebhookConfigurationsRequest DeleteWebhookConfigurationsRequest + test.Body + ) + ).to.be.rejectedWith(Error); + } + + }); + }); + }); + + describe('deployCommit', function() { + + const testReqBodies = requestBodies.filter( + (body: any) => body.Metadata.operationId === "deployCommit" + ); + testReqBodies.forEach(async (test: any) => { + it(`${test.Metadata.operationId} - ${test.Metadata.scenario} : Testid - ${test.Metadata.testId}`, async function () { + + if (test.Metadata.scenario === "positive") { + var data; + try { + data = await instance.deployCommit( + // deployCommitRequest DeployCommitRequest + test.Body + ) + } catch (er) { + console.error(er, "Response", data) + expect(er).to.be.undefined + } + } else { + await expect( + instance.deployCommit( + // deployCommitRequest DeployCommitRequest + test.Body + ) + ).to.be.rejectedWith(Error); + } + + }); + }); + }); + + describe('downloadConnectionMetadataChanges', function() { + + const testReqBodies = requestBodies.filter( + (body: any) => body.Metadata.operationId === "downloadConnectionMetadataChanges" + ); + testReqBodies.forEach(async (test: any) => { + it(`${test.Metadata.operationId} - ${test.Metadata.scenario} : Testid - ${test.Metadata.testId}`, async function () { + + if (test.Metadata.scenario === "positive") { + var data; + try { + data = await instance.downloadConnectionMetadataChanges( + // connectionIdentifier connection_identifier + test.Path_Variables.connection_identifier + ) + } catch (er) { + console.error(er, "Response", data) + expect(er).to.be.undefined + } + } else { + await expect( + instance.downloadConnectionMetadataChanges( + // connectionIdentifier connection_identifier + test.Path_Variables.connection_identifier + ) + ).to.be.rejectedWith(Error); + } + + }); + }); + }); + + describe('exportAnswerReport', function() { + + const testReqBodies = requestBodies.filter( + (body: any) => body.Metadata.operationId === "exportAnswerReport" + ); + testReqBodies.forEach(async (test: any) => { + it(`${test.Metadata.operationId} - ${test.Metadata.scenario} : Testid - ${test.Metadata.testId}`, async function () { + + if (test.Metadata.scenario === "positive") { + var data; + try { + data = await instance.exportAnswerReport( + // exportAnswerReportRequest ExportAnswerReportRequest + test.Body + ) + } catch (er) { + console.error(er, "Response", data) + expect(er).to.be.undefined + } + } else { + await expect( + instance.exportAnswerReport( + // exportAnswerReportRequest ExportAnswerReportRequest + test.Body + ) + ).to.be.rejectedWith(Error); + } + + }); + }); + }); + + describe('exportLiveboardReport', function() { + + const testReqBodies = requestBodies.filter( + (body: any) => body.Metadata.operationId === "exportLiveboardReport" + ); + testReqBodies.forEach(async (test: any) => { + it(`${test.Metadata.operationId} - ${test.Metadata.scenario} : Testid - ${test.Metadata.testId}`, async function () { + + if (test.Metadata.scenario === "positive") { + var data; + try { + data = await instance.exportLiveboardReport( + // exportLiveboardReportRequest ExportLiveboardReportRequest + test.Body + ) + } catch (er) { + console.error(er, "Response", data) + expect(er).to.be.undefined + } + } else { + await expect( + instance.exportLiveboardReport( + // exportLiveboardReportRequest ExportLiveboardReportRequest + test.Body + ) + ).to.be.rejectedWith(Error); + } + + }); + }); + }); + + describe('exportMetadataTML', function() { + + const testReqBodies = requestBodies.filter( + (body: any) => body.Metadata.operationId === "exportMetadataTML" + ); + testReqBodies.forEach(async (test: any) => { + it(`${test.Metadata.operationId} - ${test.Metadata.scenario} : Testid - ${test.Metadata.testId}`, async function () { + + if (test.Metadata.scenario === "positive") { + var data; + try { + data = await instance.exportMetadataTML( + // exportMetadataTMLRequest ExportMetadataTMLRequest + test.Body + ) + } catch (er) { + console.error(er, "Response", data) + expect(er).to.be.undefined + } + } else { + await expect( + instance.exportMetadataTML( + // exportMetadataTMLRequest ExportMetadataTMLRequest + test.Body + ) + ).to.be.rejectedWith(Error); + } + + }); + }); + }); + + describe('exportMetadataTMLBatched', function() { + + const testReqBodies = requestBodies.filter( + (body: any) => body.Metadata.operationId === "exportMetadataTMLBatched" + ); + testReqBodies.forEach(async (test: any) => { + it(`${test.Metadata.operationId} - ${test.Metadata.scenario} : Testid - ${test.Metadata.testId}`, async function () { + + if (test.Metadata.scenario === "positive") { + var data; + try { + data = await instance.exportMetadataTMLBatched( + // exportMetadataTMLBatchedRequest ExportMetadataTMLBatchedRequest + test.Body + ) + } catch (er) { + console.error(er, "Response", data) + expect(er).to.be.undefined + } + } else { + await expect( + instance.exportMetadataTMLBatched( + // exportMetadataTMLBatchedRequest ExportMetadataTMLBatchedRequest + test.Body + ) + ).to.be.rejectedWith(Error); + } + + }); + }); + }); + + describe('fetchAnswerData', function() { + + const testReqBodies = requestBodies.filter( + (body: any) => body.Metadata.operationId === "fetchAnswerData" + ); + testReqBodies.forEach(async (test: any) => { + it(`${test.Metadata.operationId} - ${test.Metadata.scenario} : Testid - ${test.Metadata.testId}`, async function () { + + if (test.Metadata.scenario === "positive") { + var data; + try { + data = await instance.fetchAnswerData( + // fetchAnswerDataRequest FetchAnswerDataRequest + test.Body + ) + } catch (er) { + console.error(er, "Response", data) + expect(er).to.be.undefined + } + } else { + await expect( + instance.fetchAnswerData( + // fetchAnswerDataRequest FetchAnswerDataRequest + test.Body + ) + ).to.be.rejectedWith(Error); + } + + }); + }); + }); + + describe('fetchAnswerSqlQuery', function() { + + const testReqBodies = requestBodies.filter( + (body: any) => body.Metadata.operationId === "fetchAnswerSqlQuery" + ); + testReqBodies.forEach(async (test: any) => { + it(`${test.Metadata.operationId} - ${test.Metadata.scenario} : Testid - ${test.Metadata.testId}`, async function () { + + if (test.Metadata.scenario === "positive") { + var data; + try { + data = await instance.fetchAnswerSqlQuery( + // fetchAnswerSqlQueryRequest FetchAnswerSqlQueryRequest + test.Body + ) + } catch (er) { + console.error(er, "Response", data) + expect(er).to.be.undefined + } + } else { + await expect( + instance.fetchAnswerSqlQuery( + // fetchAnswerSqlQueryRequest FetchAnswerSqlQueryRequest + test.Body + ) + ).to.be.rejectedWith(Error); + } + + }); + }); + }); + + describe('fetchAsyncImportTaskStatus', function() { + + const testReqBodies = requestBodies.filter( + (body: any) => body.Metadata.operationId === "fetchAsyncImportTaskStatus" + ); + testReqBodies.forEach(async (test: any) => { + it(`${test.Metadata.operationId} - ${test.Metadata.scenario} : Testid - ${test.Metadata.testId}`, async function () { + + if (test.Metadata.scenario === "positive") { + var data; + try { + data = await instance.fetchAsyncImportTaskStatus( + // fetchAsyncImportTaskStatusRequest FetchAsyncImportTaskStatusRequest + test.Body + ) + } catch (er) { + console.error(er, "Response", data) + expect(er).to.be.undefined + } + } else { + await expect( + instance.fetchAsyncImportTaskStatus( + // fetchAsyncImportTaskStatusRequest FetchAsyncImportTaskStatusRequest + test.Body + ) + ).to.be.rejectedWith(Error); + } + + }); + }); + }); + + describe('fetchColumnSecurityRules', function() { + + const testReqBodies = requestBodies.filter( + (body: any) => body.Metadata.operationId === "fetchColumnSecurityRules" + ); + testReqBodies.forEach(async (test: any) => { + it(`${test.Metadata.operationId} - ${test.Metadata.scenario} : Testid - ${test.Metadata.testId}`, async function () { + + if (test.Metadata.scenario === "positive") { + var data; + try { + data = await instance.fetchColumnSecurityRules( + // fetchColumnSecurityRulesRequest FetchColumnSecurityRulesRequest + test.Body + ) + } catch (er) { + console.error(er, "Response", data) + expect(er).to.be.undefined + } + } else { + await expect( + instance.fetchColumnSecurityRules( + // fetchColumnSecurityRulesRequest FetchColumnSecurityRulesRequest + test.Body + ) + ).to.be.rejectedWith(Error); + } + + }); + }); + }); + + describe('fetchConnectionDiffStatus', function() { + + const testReqBodies = requestBodies.filter( + (body: any) => body.Metadata.operationId === "fetchConnectionDiffStatus" + ); + testReqBodies.forEach(async (test: any) => { + it(`${test.Metadata.operationId} - ${test.Metadata.scenario} : Testid - ${test.Metadata.testId}`, async function () { + + if (test.Metadata.scenario === "positive") { + var data; + try { + data = await instance.fetchConnectionDiffStatus( + // connectionIdentifier connection_identifier + test.Path_Variables.connection_identifier + ) + } catch (er) { + console.error(er, "Response", data) + expect(er).to.be.undefined + } + } else { + await expect( + instance.fetchConnectionDiffStatus( + // connectionIdentifier connection_identifier + test.Path_Variables.connection_identifier + ) + ).to.be.rejectedWith(Error); + } + + }); + }); + }); + + describe('fetchLiveboardData', function() { + + const testReqBodies = requestBodies.filter( + (body: any) => body.Metadata.operationId === "fetchLiveboardData" + ); + testReqBodies.forEach(async (test: any) => { + it(`${test.Metadata.operationId} - ${test.Metadata.scenario} : Testid - ${test.Metadata.testId}`, async function () { + + if (test.Metadata.scenario === "positive") { + var data; + try { + data = await instance.fetchLiveboardData( + // fetchLiveboardDataRequest FetchLiveboardDataRequest + test.Body + ) + } catch (er) { + console.error(er, "Response", data) + expect(er).to.be.undefined + } + } else { + await expect( + instance.fetchLiveboardData( + // fetchLiveboardDataRequest FetchLiveboardDataRequest + test.Body + ) + ).to.be.rejectedWith(Error); + } + + }); + }); + }); + + describe('fetchLiveboardSqlQuery', function() { + + const testReqBodies = requestBodies.filter( + (body: any) => body.Metadata.operationId === "fetchLiveboardSqlQuery" + ); + testReqBodies.forEach(async (test: any) => { + it(`${test.Metadata.operationId} - ${test.Metadata.scenario} : Testid - ${test.Metadata.testId}`, async function () { + + if (test.Metadata.scenario === "positive") { + var data; + try { + data = await instance.fetchLiveboardSqlQuery( + // fetchLiveboardSqlQueryRequest FetchLiveboardSqlQueryRequest + test.Body + ) + } catch (er) { + console.error(er, "Response", data) + expect(er).to.be.undefined + } + } else { + await expect( + instance.fetchLiveboardSqlQuery( + // fetchLiveboardSqlQueryRequest FetchLiveboardSqlQueryRequest + test.Body + ) + ).to.be.rejectedWith(Error); + } + + }); + }); + }); + + describe('fetchLogs', function() { + + const testReqBodies = requestBodies.filter( + (body: any) => body.Metadata.operationId === "fetchLogs" + ); + testReqBodies.forEach(async (test: any) => { + it(`${test.Metadata.operationId} - ${test.Metadata.scenario} : Testid - ${test.Metadata.testId}`, async function () { + + if (test.Metadata.scenario === "positive") { + var data; + try { + data = await instance.fetchLogs( + // fetchLogsRequest FetchLogsRequest + test.Body + ) + } catch (er) { + console.error(er, "Response", data) + expect(er).to.be.undefined + } + } else { + await expect( + instance.fetchLogs( + // fetchLogsRequest FetchLogsRequest + test.Body + ) + ).to.be.rejectedWith(Error); + } + + }); + }); + }); + + describe('fetchObjectPrivileges', function() { + + const testReqBodies = requestBodies.filter( + (body: any) => body.Metadata.operationId === "fetchObjectPrivileges" + ); + testReqBodies.forEach(async (test: any) => { + it(`${test.Metadata.operationId} - ${test.Metadata.scenario} : Testid - ${test.Metadata.testId}`, async function () { + + if (test.Metadata.scenario === "positive") { + var data; + try { + data = await instance.fetchObjectPrivileges( + // fetchObjectPrivilegesRequest FetchObjectPrivilegesRequest + test.Body + ) + } catch (er) { + console.error(er, "Response", data) + expect(er).to.be.undefined + } + } else { + await expect( + instance.fetchObjectPrivileges( + // fetchObjectPrivilegesRequest FetchObjectPrivilegesRequest + test.Body + ) + ).to.be.rejectedWith(Error); + } + + }); + }); + }); + + describe('fetchPermissionsOfPrincipals', function() { + + const testReqBodies = requestBodies.filter( + (body: any) => body.Metadata.operationId === "fetchPermissionsOfPrincipals" + ); + testReqBodies.forEach(async (test: any) => { + it(`${test.Metadata.operationId} - ${test.Metadata.scenario} : Testid - ${test.Metadata.testId}`, async function () { + + if (test.Metadata.scenario === "positive") { + var data; + try { + data = await instance.fetchPermissionsOfPrincipals( + // fetchPermissionsOfPrincipalsRequest FetchPermissionsOfPrincipalsRequest + test.Body + ) + } catch (er) { + console.error(er, "Response", data) + expect(er).to.be.undefined + } + } else { + await expect( + instance.fetchPermissionsOfPrincipals( + // fetchPermissionsOfPrincipalsRequest FetchPermissionsOfPrincipalsRequest + test.Body + ) + ).to.be.rejectedWith(Error); + } + + }); + }); + }); + + describe('fetchPermissionsOnMetadata', function() { + + const testReqBodies = requestBodies.filter( + (body: any) => body.Metadata.operationId === "fetchPermissionsOnMetadata" + ); + testReqBodies.forEach(async (test: any) => { + it(`${test.Metadata.operationId} - ${test.Metadata.scenario} : Testid - ${test.Metadata.testId}`, async function () { + + if (test.Metadata.scenario === "positive") { + var data; + try { + data = await instance.fetchPermissionsOnMetadata( + // fetchPermissionsOnMetadataRequest FetchPermissionsOnMetadataRequest + test.Body + ) + } catch (er) { + console.error(er, "Response", data) + expect(er).to.be.undefined + } + } else { + await expect( + instance.fetchPermissionsOnMetadata( + // fetchPermissionsOnMetadataRequest FetchPermissionsOnMetadataRequest + test.Body + ) + ).to.be.rejectedWith(Error); + } + + }); + }); + }); + + describe('forceLogoutUsers', function() { + + const testReqBodies = requestBodies.filter( + (body: any) => body.Metadata.operationId === "forceLogoutUsers" + ); + testReqBodies.forEach(async (test: any) => { + it(`${test.Metadata.operationId} - ${test.Metadata.scenario} : Testid - ${test.Metadata.testId}`, async function () { + + if (test.Metadata.scenario === "positive") { + var data; + try { + data = await instance.forceLogoutUsers( + // forceLogoutUsersRequest ForceLogoutUsersRequest + test.Body + ) + } catch (er) { + console.error(er, "Response", data) + expect(er).to.be.undefined + } + } else { + await expect( + instance.forceLogoutUsers( + // forceLogoutUsersRequest ForceLogoutUsersRequest + test.Body + ) + ).to.be.rejectedWith(Error); + } + + }); + }); + }); + + describe('generateCSV', function() { + + const testReqBodies = requestBodies.filter( + (body: any) => body.Metadata.operationId === "generateCSV" + ); + testReqBodies.forEach(async (test: any) => { + it(`${test.Metadata.operationId} - ${test.Metadata.scenario} : Testid - ${test.Metadata.testId}`, async function () { + + if (test.Metadata.scenario === "positive") { + var data; + try { + data = await instance.generateCSV( + // generateCSVRequest GenerateCSVRequest + test.Body + ) + } catch (er) { + console.error(er, "Response", data) + expect(er).to.be.undefined + } + } else { + await expect( + instance.generateCSV( + // generateCSVRequest GenerateCSVRequest + test.Body + ) + ).to.be.rejectedWith(Error); + } + + }); + }); + }); + + describe('getCurrentUserInfo', function() { + + const testReqBodies = requestBodies.filter( + (body: any) => body.Metadata.operationId === "getCurrentUserInfo" + ); + testReqBodies.forEach(async (test: any) => { + it(`${test.Metadata.operationId} - ${test.Metadata.scenario} : Testid - ${test.Metadata.testId}`, async function () { + + if (test.Metadata.scenario === "positive") { + var data; + try { + data = await instance.getCurrentUserInfo( + ) + } catch (er) { + console.error(er, "Response", data) + expect(er).to.be.undefined + } + } else { + await expect( + instance.getCurrentUserInfo( + ) + ).to.be.rejectedWith(Error); + } + + }); + }); + }); + + describe('getCurrentUserToken', function() { + + const testReqBodies = requestBodies.filter( + (body: any) => body.Metadata.operationId === "getCurrentUserToken" + ); + testReqBodies.forEach(async (test: any) => { + it(`${test.Metadata.operationId} - ${test.Metadata.scenario} : Testid - ${test.Metadata.testId}`, async function () { + + if (test.Metadata.scenario === "positive") { + var data; + try { + data = await instance.getCurrentUserToken( + ) + } catch (er) { + console.error(er, "Response", data) + expect(er).to.be.undefined + } + } else { + await expect( + instance.getCurrentUserToken( + ) + ).to.be.rejectedWith(Error); + } + + }); + }); + }); + + describe('getCustomAccessToken', function() { + + const testReqBodies = requestBodies.filter( + (body: any) => body.Metadata.operationId === "getCustomAccessToken" + ); + testReqBodies.forEach(async (test: any) => { + it(`${test.Metadata.operationId} - ${test.Metadata.scenario} : Testid - ${test.Metadata.testId}`, async function () { + + if (test.Metadata.scenario === "positive") { + var data; + try { + data = await instance.getCustomAccessToken( + // getCustomAccessTokenRequest GetCustomAccessTokenRequest + test.Body + ) + } catch (er) { + console.error(er, "Response", data) + expect(er).to.be.undefined + } + } else { + await expect( + instance.getCustomAccessToken( + // getCustomAccessTokenRequest GetCustomAccessTokenRequest + test.Body + ) + ).to.be.rejectedWith(Error); + } + + }); + }); + }); + + describe('getDataSourceSuggestions', function() { + + const testReqBodies = requestBodies.filter( + (body: any) => body.Metadata.operationId === "getDataSourceSuggestions" + ); + testReqBodies.forEach(async (test: any) => { + it(`${test.Metadata.operationId} - ${test.Metadata.scenario} : Testid - ${test.Metadata.testId}`, async function () { + + if (test.Metadata.scenario === "positive") { + var data; + try { + data = await instance.getDataSourceSuggestions( + // getDataSourceSuggestionsRequest GetDataSourceSuggestionsRequest + test.Body + ) + } catch (er) { + console.error(er, "Response", data) + expect(er).to.be.undefined + } + } else { + await expect( + instance.getDataSourceSuggestions( + // getDataSourceSuggestionsRequest GetDataSourceSuggestionsRequest + test.Body + ) + ).to.be.rejectedWith(Error); + } + + }); + }); + }); + + describe('getFullAccessToken', function() { + + const testReqBodies = requestBodies.filter( + (body: any) => body.Metadata.operationId === "getFullAccessToken" + ); + testReqBodies.forEach(async (test: any) => { + it(`${test.Metadata.operationId} - ${test.Metadata.scenario} : Testid - ${test.Metadata.testId}`, async function () { + + if (test.Metadata.scenario === "positive") { + var data; + try { + data = await instance.getFullAccessToken( + // getFullAccessTokenRequest GetFullAccessTokenRequest + test.Body + ) + } catch (er) { + console.error(er, "Response", data) + expect(er).to.be.undefined + } + } else { + await expect( + instance.getFullAccessToken( + // getFullAccessTokenRequest GetFullAccessTokenRequest + test.Body + ) + ).to.be.rejectedWith(Error); + } + + }); + }); + }); + + describe('getNLInstructions', function() { + + const testReqBodies = requestBodies.filter( + (body: any) => body.Metadata.operationId === "getNLInstructions" + ); + testReqBodies.forEach(async (test: any) => { + it(`${test.Metadata.operationId} - ${test.Metadata.scenario} : Testid - ${test.Metadata.testId}`, async function () { + + if (test.Metadata.scenario === "positive") { + var data; + try { + data = await instance.getNLInstructions( + // getNLInstructionsRequest GetNLInstructionsRequest + test.Body + ) + } catch (er) { + console.error(er, "Response", data) + expect(er).to.be.undefined + } + } else { + await expect( + instance.getNLInstructions( + // getNLInstructionsRequest GetNLInstructionsRequest + test.Body + ) + ).to.be.rejectedWith(Error); + } + + }); + }); + }); + + describe('getObjectAccessToken', function() { + + const testReqBodies = requestBodies.filter( + (body: any) => body.Metadata.operationId === "getObjectAccessToken" + ); + testReqBodies.forEach(async (test: any) => { + it(`${test.Metadata.operationId} - ${test.Metadata.scenario} : Testid - ${test.Metadata.testId}`, async function () { + + if (test.Metadata.scenario === "positive") { + var data; + try { + data = await instance.getObjectAccessToken( + // getObjectAccessTokenRequest GetObjectAccessTokenRequest + test.Body + ) + } catch (er) { + console.error(er, "Response", data) + expect(er).to.be.undefined + } + } else { + await expect( + instance.getObjectAccessToken( + // getObjectAccessTokenRequest GetObjectAccessTokenRequest + test.Body + ) + ).to.be.rejectedWith(Error); + } + + }); + }); + }); + + describe('getRelevantQuestions', function() { + + const testReqBodies = requestBodies.filter( + (body: any) => body.Metadata.operationId === "getRelevantQuestions" + ); + testReqBodies.forEach(async (test: any) => { + it(`${test.Metadata.operationId} - ${test.Metadata.scenario} : Testid - ${test.Metadata.testId}`, async function () { + + if (test.Metadata.scenario === "positive") { + var data; + try { + data = await instance.getRelevantQuestions( + // getRelevantQuestionsRequest GetRelevantQuestionsRequest + test.Body + ) + } catch (er) { + console.error(er, "Response", data) + expect(er).to.be.undefined + } + } else { + await expect( + instance.getRelevantQuestions( + // getRelevantQuestionsRequest GetRelevantQuestionsRequest + test.Body + ) + ).to.be.rejectedWith(Error); + } + + }); + }); + }); + + describe('getSystemConfig', function() { + + const testReqBodies = requestBodies.filter( + (body: any) => body.Metadata.operationId === "getSystemConfig" + ); + testReqBodies.forEach(async (test: any) => { + it(`${test.Metadata.operationId} - ${test.Metadata.scenario} : Testid - ${test.Metadata.testId}`, async function () { + + if (test.Metadata.scenario === "positive") { + var data; + try { + data = await instance.getSystemConfig( + ) + } catch (er) { + console.error(er, "Response", data) + expect(er).to.be.undefined + } + } else { + await expect( + instance.getSystemConfig( + ) + ).to.be.rejectedWith(Error); + } + + }); + }); + }); + + describe('getSystemInformation', function() { + + const testReqBodies = requestBodies.filter( + (body: any) => body.Metadata.operationId === "getSystemInformation" + ); + testReqBodies.forEach(async (test: any) => { + it(`${test.Metadata.operationId} - ${test.Metadata.scenario} : Testid - ${test.Metadata.testId}`, async function () { + + if (test.Metadata.scenario === "positive") { + var data; + try { + data = await instance.getSystemInformation( + ) + } catch (er) { + console.error(er, "Response", data) + expect(er).to.be.undefined + } + } else { + await expect( + instance.getSystemInformation( + ) + ).to.be.rejectedWith(Error); + } + + }); + }); + }); + + describe('getSystemOverrideInfo', function() { + + const testReqBodies = requestBodies.filter( + (body: any) => body.Metadata.operationId === "getSystemOverrideInfo" + ); + testReqBodies.forEach(async (test: any) => { + it(`${test.Metadata.operationId} - ${test.Metadata.scenario} : Testid - ${test.Metadata.testId}`, async function () { + + if (test.Metadata.scenario === "positive") { + var data; + try { + data = await instance.getSystemOverrideInfo( + ) + } catch (er) { + console.error(er, "Response", data) + expect(er).to.be.undefined + } + } else { + await expect( + instance.getSystemOverrideInfo( + ) + ).to.be.rejectedWith(Error); + } + + }); + }); + }); + + describe('importMetadataTML', function() { + + const testReqBodies = requestBodies.filter( + (body: any) => body.Metadata.operationId === "importMetadataTML" + ); + testReqBodies.forEach(async (test: any) => { + it(`${test.Metadata.operationId} - ${test.Metadata.scenario} : Testid - ${test.Metadata.testId}`, async function () { + + if (test.Metadata.scenario === "positive") { + var data; + try { + data = await instance.importMetadataTML( + // importMetadataTMLRequest ImportMetadataTMLRequest + test.Body + ) + } catch (er) { + console.error(er, "Response", data) + expect(er).to.be.undefined + } + } else { + await expect( + instance.importMetadataTML( + // importMetadataTMLRequest ImportMetadataTMLRequest + test.Body + ) + ).to.be.rejectedWith(Error); + } + + }); + }); + }); + + describe('importMetadataTMLAsync', function() { + + const testReqBodies = requestBodies.filter( + (body: any) => body.Metadata.operationId === "importMetadataTMLAsync" + ); + testReqBodies.forEach(async (test: any) => { + it(`${test.Metadata.operationId} - ${test.Metadata.scenario} : Testid - ${test.Metadata.testId}`, async function () { + + if (test.Metadata.scenario === "positive") { + var data; + try { + data = await instance.importMetadataTMLAsync( + // importMetadataTMLAsyncRequest ImportMetadataTMLAsyncRequest + test.Body + ) + } catch (er) { + console.error(er, "Response", data) + expect(er).to.be.undefined + } + } else { + await expect( + instance.importMetadataTMLAsync( + // importMetadataTMLAsyncRequest ImportMetadataTMLAsyncRequest + test.Body + ) + ).to.be.rejectedWith(Error); + } + + }); + }); + }); + + describe('importUserGroups', function() { + + const testReqBodies = requestBodies.filter( + (body: any) => body.Metadata.operationId === "importUserGroups" + ); + testReqBodies.forEach(async (test: any) => { + it(`${test.Metadata.operationId} - ${test.Metadata.scenario} : Testid - ${test.Metadata.testId}`, async function () { + + if (test.Metadata.scenario === "positive") { + var data; + try { + data = await instance.importUserGroups( + // importUserGroupsRequest ImportUserGroupsRequest + test.Body + ) + } catch (er) { + console.error(er, "Response", data) + expect(er).to.be.undefined + } + } else { + await expect( + instance.importUserGroups( + // importUserGroupsRequest ImportUserGroupsRequest + test.Body + ) + ).to.be.rejectedWith(Error); + } + + }); + }); + }); + + describe('importUsers', function() { + + const testReqBodies = requestBodies.filter( + (body: any) => body.Metadata.operationId === "importUsers" + ); + testReqBodies.forEach(async (test: any) => { + it(`${test.Metadata.operationId} - ${test.Metadata.scenario} : Testid - ${test.Metadata.testId}`, async function () { + + if (test.Metadata.scenario === "positive") { + var data; + try { + data = await instance.importUsers( + // importUsersRequest ImportUsersRequest + test.Body + ) + } catch (er) { + console.error(er, "Response", data) + expect(er).to.be.undefined + } + } else { + await expect( + instance.importUsers( + // importUsersRequest ImportUsersRequest + test.Body + ) + ).to.be.rejectedWith(Error); + } + + }); + }); + }); + + describe('login', function() { + + const testReqBodies = requestBodies.filter( + (body: any) => body.Metadata.operationId === "login" + ); + testReqBodies.forEach(async (test: any) => { + it(`${test.Metadata.operationId} - ${test.Metadata.scenario} : Testid - ${test.Metadata.testId}`, async function () { + + if (test.Metadata.scenario === "positive") { + var data; + try { + data = await instance.login( + // loginRequest LoginRequest + test.Body + ) + } catch (er) { + console.error(er, "Response", data) + expect(er).to.be.undefined + } + } else { + await expect( + instance.login( + // loginRequest LoginRequest + test.Body + ) + ).to.be.rejectedWith(Error); + } + + }); + }); + }); + + describe('logout', function() { + + const testReqBodies = requestBodies.filter( + (body: any) => body.Metadata.operationId === "logout" + ); + testReqBodies.forEach(async (test: any) => { + it(`${test.Metadata.operationId} - ${test.Metadata.scenario} : Testid - ${test.Metadata.testId}`, async function () { + + if (test.Metadata.scenario === "positive") { + var data; + try { + data = await instance.logout( + ) + } catch (er) { + console.error(er, "Response", data) + expect(er).to.be.undefined + } + } else { + await expect( + instance.logout( + ) + ).to.be.rejectedWith(Error); + } + + }); + }); + }); + + describe('manageObjectPrivilege', function() { + + const testReqBodies = requestBodies.filter( + (body: any) => body.Metadata.operationId === "manageObjectPrivilege" + ); + testReqBodies.forEach(async (test: any) => { + it(`${test.Metadata.operationId} - ${test.Metadata.scenario} : Testid - ${test.Metadata.testId}`, async function () { + + if (test.Metadata.scenario === "positive") { + var data; + try { + data = await instance.manageObjectPrivilege( + // manageObjectPrivilegeRequest ManageObjectPrivilegeRequest + test.Body + ) + } catch (er) { + console.error(er, "Response", data) + expect(er).to.be.undefined + } + } else { + await expect( + instance.manageObjectPrivilege( + // manageObjectPrivilegeRequest ManageObjectPrivilegeRequest + test.Body + ) + ).to.be.rejectedWith(Error); + } + + }); + }); + }); + + describe('parameterizeMetadata', function() { + + const testReqBodies = requestBodies.filter( + (body: any) => body.Metadata.operationId === "parameterizeMetadata" + ); + testReqBodies.forEach(async (test: any) => { + it(`${test.Metadata.operationId} - ${test.Metadata.scenario} : Testid - ${test.Metadata.testId}`, async function () { + + if (test.Metadata.scenario === "positive") { + var data; + try { + data = await instance.parameterizeMetadata( + // parameterizeMetadataRequest ParameterizeMetadataRequest + test.Body + ) + } catch (er) { + console.error(er, "Response", data) + expect(er).to.be.undefined + } + } else { + await expect( + instance.parameterizeMetadata( + // parameterizeMetadataRequest ParameterizeMetadataRequest + test.Body + ) + ).to.be.rejectedWith(Error); + } + + }); + }); + }); + + describe('parameterizeMetadataFields', function() { + + const testReqBodies = requestBodies.filter( + (body: any) => body.Metadata.operationId === "parameterizeMetadataFields" + ); + testReqBodies.forEach(async (test: any) => { + it(`${test.Metadata.operationId} - ${test.Metadata.scenario} : Testid - ${test.Metadata.testId}`, async function () { + + if (test.Metadata.scenario === "positive") { + var data; + try { + data = await instance.parameterizeMetadataFields( + // parameterizeMetadataFieldsRequest ParameterizeMetadataFieldsRequest + test.Body + ) + } catch (er) { + console.error(er, "Response", data) + expect(er).to.be.undefined + } + } else { + await expect( + instance.parameterizeMetadataFields( + // parameterizeMetadataFieldsRequest ParameterizeMetadataFieldsRequest + test.Body + ) + ).to.be.rejectedWith(Error); + } + + }); + }); + }); + + describe('publishMetadata', function() { + + const testReqBodies = requestBodies.filter( + (body: any) => body.Metadata.operationId === "publishMetadata" + ); + testReqBodies.forEach(async (test: any) => { + it(`${test.Metadata.operationId} - ${test.Metadata.scenario} : Testid - ${test.Metadata.testId}`, async function () { + + if (test.Metadata.scenario === "positive") { + var data; + try { + data = await instance.publishMetadata( + // publishMetadataRequest PublishMetadataRequest + test.Body + ) + } catch (er) { + console.error(er, "Response", data) + expect(er).to.be.undefined + } + } else { + await expect( + instance.publishMetadata( + // publishMetadataRequest PublishMetadataRequest + test.Body + ) + ).to.be.rejectedWith(Error); + } + + }); + }); + }); + + describe('putVariableValues', function() { + + const testReqBodies = requestBodies.filter( + (body: any) => body.Metadata.operationId === "putVariableValues" + ); + testReqBodies.forEach(async (test: any) => { + it(`${test.Metadata.operationId} - ${test.Metadata.scenario} : Testid - ${test.Metadata.testId}`, async function () { + + if (test.Metadata.scenario === "positive") { + var data; + try { + data = await instance.putVariableValues( + // identifier identifier + test.Path_Variables.identifier , + // putVariableValuesRequest PutVariableValuesRequest + test.Body + ) + } catch (er) { + console.error(er, "Response", data) + expect(er).to.be.undefined + } + } else { + await expect( + instance.putVariableValues( + // identifier identifier + test.Path_Variables.identifier , + // putVariableValuesRequest PutVariableValuesRequest + test.Body + ) + ).to.be.rejectedWith(Error); + } + + }); + }); + }); + + describe('queryGetDecomposedQuery', function() { + + const testReqBodies = requestBodies.filter( + (body: any) => body.Metadata.operationId === "queryGetDecomposedQuery" + ); + testReqBodies.forEach(async (test: any) => { + it(`${test.Metadata.operationId} - ${test.Metadata.scenario} : Testid - ${test.Metadata.testId}`, async function () { + + if (test.Metadata.scenario === "positive") { + var data; + try { + data = await instance.queryGetDecomposedQuery( + // queryGetDecomposedQueryRequest QueryGetDecomposedQueryRequest + test.Body + ) + } catch (er) { + console.error(er, "Response", data) + expect(er).to.be.undefined + } + } else { + await expect( + instance.queryGetDecomposedQuery( + // queryGetDecomposedQueryRequest QueryGetDecomposedQueryRequest + test.Body + ) + ).to.be.rejectedWith(Error); + } + + }); + }); + }); + + describe('resetUserPassword', function() { + + const testReqBodies = requestBodies.filter( + (body: any) => body.Metadata.operationId === "resetUserPassword" + ); + testReqBodies.forEach(async (test: any) => { + it(`${test.Metadata.operationId} - ${test.Metadata.scenario} : Testid - ${test.Metadata.testId}`, async function () { + + if (test.Metadata.scenario === "positive") { + var data; + try { + data = await instance.resetUserPassword( + // resetUserPasswordRequest ResetUserPasswordRequest + test.Body + ) + } catch (er) { + console.error(er, "Response", data) + expect(er).to.be.undefined + } + } else { + await expect( + instance.resetUserPassword( + // resetUserPasswordRequest ResetUserPasswordRequest + test.Body + ) + ).to.be.rejectedWith(Error); + } + + }); + }); + }); + + describe('revertCommit', function() { + + const testReqBodies = requestBodies.filter( + (body: any) => body.Metadata.operationId === "revertCommit" + ); + testReqBodies.forEach(async (test: any) => { + it(`${test.Metadata.operationId} - ${test.Metadata.scenario} : Testid - ${test.Metadata.testId}`, async function () { + + if (test.Metadata.scenario === "positive") { + var data; + try { + data = await instance.revertCommit( + // commitId commit_id + test.Path_Variables.commit_id , + // revertCommitRequest RevertCommitRequest + test.Body + ) + } catch (er) { + console.error(er, "Response", data) + expect(er).to.be.undefined + } + } else { + await expect( + instance.revertCommit( + // commitId commit_id + test.Path_Variables.commit_id , + // revertCommitRequest RevertCommitRequest + test.Body + ) + ).to.be.rejectedWith(Error); + } + + }); + }); + }); + + describe('revokeRefreshTokens', function() { + + const testReqBodies = requestBodies.filter( + (body: any) => body.Metadata.operationId === "revokeRefreshTokens" + ); + testReqBodies.forEach(async (test: any) => { + it(`${test.Metadata.operationId} - ${test.Metadata.scenario} : Testid - ${test.Metadata.testId}`, async function () { + + if (test.Metadata.scenario === "positive") { + var data; + try { + data = await instance.revokeRefreshTokens( + // connectionIdentifier connection_identifier + test.Path_Variables.connection_identifier , + // revokeRefreshTokensRequest RevokeRefreshTokensRequest + test.Body + ) + } catch (er) { + console.error(er, "Response", data) + expect(er).to.be.undefined + } + } else { + await expect( + instance.revokeRefreshTokens( + // connectionIdentifier connection_identifier + test.Path_Variables.connection_identifier , + // revokeRefreshTokensRequest RevokeRefreshTokensRequest + test.Body + ) + ).to.be.rejectedWith(Error); + } + + }); + }); + }); + + describe('revokeToken', function() { + + const testReqBodies = requestBodies.filter( + (body: any) => body.Metadata.operationId === "revokeToken" + ); + testReqBodies.forEach(async (test: any) => { + it(`${test.Metadata.operationId} - ${test.Metadata.scenario} : Testid - ${test.Metadata.testId}`, async function () { + + if (test.Metadata.scenario === "positive") { + var data; + try { + data = await instance.revokeToken( + // revokeTokenRequest RevokeTokenRequest + test.Body + ) + } catch (er) { + console.error(er, "Response", data) + expect(er).to.be.undefined + } + } else { + await expect( + instance.revokeToken( + // revokeTokenRequest RevokeTokenRequest + test.Body + ) + ).to.be.rejectedWith(Error); + } + + }); + }); + }); + + describe('searchAuthSettings', function() { + + const testReqBodies = requestBodies.filter( + (body: any) => body.Metadata.operationId === "searchAuthSettings" + ); + testReqBodies.forEach(async (test: any) => { + it(`${test.Metadata.operationId} - ${test.Metadata.scenario} : Testid - ${test.Metadata.testId}`, async function () { + + if (test.Metadata.scenario === "positive") { + var data; + try { + data = await instance.searchAuthSettings( + // searchAuthSettingsRequest SearchAuthSettingsRequest + test.Body + ) + } catch (er) { + console.error(er, "Response", data) + expect(er).to.be.undefined + } + } else { + await expect( + instance.searchAuthSettings( + // searchAuthSettingsRequest SearchAuthSettingsRequest + test.Body + ) + ).to.be.rejectedWith(Error); + } + + }); + }); + }); + + describe('searchCalendars', function() { + + const testReqBodies = requestBodies.filter( + (body: any) => body.Metadata.operationId === "searchCalendars" + ); + testReqBodies.forEach(async (test: any) => { + it(`${test.Metadata.operationId} - ${test.Metadata.scenario} : Testid - ${test.Metadata.testId}`, async function () { + + if (test.Metadata.scenario === "positive") { + var data; + try { + data = await instance.searchCalendars( + // searchCalendarsRequest SearchCalendarsRequest + test.Body + ) + } catch (er) { + console.error(er, "Response", data) + expect(er).to.be.undefined + } + } else { + await expect( + instance.searchCalendars( + // searchCalendarsRequest SearchCalendarsRequest + test.Body + ) + ).to.be.rejectedWith(Error); + } + + }); + }); + }); + + describe('searchChannelHistory', function() { + + const testReqBodies = requestBodies.filter( + (body: any) => body.Metadata.operationId === "searchChannelHistory" + ); + testReqBodies.forEach(async (test: any) => { + it(`${test.Metadata.operationId} - ${test.Metadata.scenario} : Testid - ${test.Metadata.testId}`, async function () { + + if (test.Metadata.scenario === "positive") { + var data; + try { + data = await instance.searchChannelHistory( + // searchChannelHistoryRequest SearchChannelHistoryRequest + test.Body + ) + } catch (er) { + console.error(er, "Response", data) + expect(er).to.be.undefined + } + } else { + await expect( + instance.searchChannelHistory( + // searchChannelHistoryRequest SearchChannelHistoryRequest + test.Body + ) + ).to.be.rejectedWith(Error); + } + + }); + }); + }); + + describe('searchCollections', function() { + + const testReqBodies = requestBodies.filter( + (body: any) => body.Metadata.operationId === "searchCollections" + ); + testReqBodies.forEach(async (test: any) => { + it(`${test.Metadata.operationId} - ${test.Metadata.scenario} : Testid - ${test.Metadata.testId}`, async function () { + + if (test.Metadata.scenario === "positive") { + var data; + try { + data = await instance.searchCollections( + // searchCollectionsRequest SearchCollectionsRequest + test.Body + ) + } catch (er) { + console.error(er, "Response", data) + expect(er).to.be.undefined + } + } else { + await expect( + instance.searchCollections( + // searchCollectionsRequest SearchCollectionsRequest + test.Body + ) + ).to.be.rejectedWith(Error); + } + + }); + }); + }); + + describe('searchCommits', function() { + + const testReqBodies = requestBodies.filter( + (body: any) => body.Metadata.operationId === "searchCommits" + ); + testReqBodies.forEach(async (test: any) => { + it(`${test.Metadata.operationId} - ${test.Metadata.scenario} : Testid - ${test.Metadata.testId}`, async function () { + + if (test.Metadata.scenario === "positive") { + var data; + try { + data = await instance.searchCommits( + // searchCommitsRequest SearchCommitsRequest + test.Body + ) + } catch (er) { + console.error(er, "Response", data) + expect(er).to.be.undefined + } + } else { + await expect( + instance.searchCommits( + // searchCommitsRequest SearchCommitsRequest + test.Body + ) + ).to.be.rejectedWith(Error); + } + + }); + }); + }); + + describe('searchCommunicationChannelPreferences', function() { + + const testReqBodies = requestBodies.filter( + (body: any) => body.Metadata.operationId === "searchCommunicationChannelPreferences" + ); + testReqBodies.forEach(async (test: any) => { + it(`${test.Metadata.operationId} - ${test.Metadata.scenario} : Testid - ${test.Metadata.testId}`, async function () { + + if (test.Metadata.scenario === "positive") { + var data; + try { + data = await instance.searchCommunicationChannelPreferences( + // searchCommunicationChannelPreferencesRequest SearchCommunicationChannelPreferencesRequest + test.Body + ) + } catch (er) { + console.error(er, "Response", data) + expect(er).to.be.undefined + } + } else { + await expect( + instance.searchCommunicationChannelPreferences( + // searchCommunicationChannelPreferencesRequest SearchCommunicationChannelPreferencesRequest + test.Body + ) + ).to.be.rejectedWith(Error); + } + + }); + }); + }); + + describe('searchConfig', function() { + + const testReqBodies = requestBodies.filter( + (body: any) => body.Metadata.operationId === "searchConfig" + ); + testReqBodies.forEach(async (test: any) => { + it(`${test.Metadata.operationId} - ${test.Metadata.scenario} : Testid - ${test.Metadata.testId}`, async function () { + + if (test.Metadata.scenario === "positive") { + var data; + try { + data = await instance.searchConfig( + // searchConfigRequest SearchConfigRequest + test.Body + ) + } catch (er) { + console.error(er, "Response", data) + expect(er).to.be.undefined + } + } else { + await expect( + instance.searchConfig( + // searchConfigRequest SearchConfigRequest + test.Body + ) + ).to.be.rejectedWith(Error); + } + + }); + }); + }); + + describe('searchConnection', function() { + + const testReqBodies = requestBodies.filter( + (body: any) => body.Metadata.operationId === "searchConnection" + ); + testReqBodies.forEach(async (test: any) => { + it(`${test.Metadata.operationId} - ${test.Metadata.scenario} : Testid - ${test.Metadata.testId}`, async function () { + + if (test.Metadata.scenario === "positive") { + var data; + try { + data = await instance.searchConnection( + // searchConnectionRequest SearchConnectionRequest + test.Body + ) + } catch (er) { + console.error(er, "Response", data) + expect(er).to.be.undefined + } + } else { + await expect( + instance.searchConnection( + // searchConnectionRequest SearchConnectionRequest + test.Body + ) + ).to.be.rejectedWith(Error); + } + + }); + }); + }); + + describe('searchCustomActions', function() { + + const testReqBodies = requestBodies.filter( + (body: any) => body.Metadata.operationId === "searchCustomActions" + ); + testReqBodies.forEach(async (test: any) => { + it(`${test.Metadata.operationId} - ${test.Metadata.scenario} : Testid - ${test.Metadata.testId}`, async function () { + + if (test.Metadata.scenario === "positive") { + var data; + try { + data = await instance.searchCustomActions( + // searchCustomActionsRequest SearchCustomActionsRequest + test.Body + ) + } catch (er) { + console.error(er, "Response", data) + expect(er).to.be.undefined + } + } else { + await expect( + instance.searchCustomActions( + // searchCustomActionsRequest SearchCustomActionsRequest + test.Body + ) + ).to.be.rejectedWith(Error); + } + + }); + }); + }); + + describe('searchData', function() { + + const testReqBodies = requestBodies.filter( + (body: any) => body.Metadata.operationId === "searchData" + ); + testReqBodies.forEach(async (test: any) => { + it(`${test.Metadata.operationId} - ${test.Metadata.scenario} : Testid - ${test.Metadata.testId}`, async function () { + + if (test.Metadata.scenario === "positive") { + var data; + try { + data = await instance.searchData( + // searchDataRequest SearchDataRequest + test.Body + ) + } catch (er) { + console.error(er, "Response", data) + expect(er).to.be.undefined + } + } else { + await expect( + instance.searchData( + // searchDataRequest SearchDataRequest + test.Body + ) + ).to.be.rejectedWith(Error); + } + + }); + }); + }); + + describe('searchEmailCustomization', function() { + + const testReqBodies = requestBodies.filter( + (body: any) => body.Metadata.operationId === "searchEmailCustomization" + ); + testReqBodies.forEach(async (test: any) => { + it(`${test.Metadata.operationId} - ${test.Metadata.scenario} : Testid - ${test.Metadata.testId}`, async function () { + + if (test.Metadata.scenario === "positive") { + var data; + try { + data = await instance.searchEmailCustomization( + // searchEmailCustomizationRequest SearchEmailCustomizationRequest + test.Body + ) + } catch (er) { + console.error(er, "Response", data) + expect(er).to.be.undefined + } + } else { + await expect( + instance.searchEmailCustomization( + // searchEmailCustomizationRequest SearchEmailCustomizationRequest + test.Body + ) + ).to.be.rejectedWith(Error); + } + + }); + }); + }); + + describe('searchMetadata', function() { + + const testReqBodies = requestBodies.filter( + (body: any) => body.Metadata.operationId === "searchMetadata" + ); + testReqBodies.forEach(async (test: any) => { + it(`${test.Metadata.operationId} - ${test.Metadata.scenario} : Testid - ${test.Metadata.testId}`, async function () { + + if (test.Metadata.scenario === "positive") { + var data; + try { + data = await instance.searchMetadata( + // searchMetadataRequest SearchMetadataRequest + test.Body + ) + } catch (er) { + console.error(er, "Response", data) + expect(er).to.be.undefined + } + } else { + await expect( + instance.searchMetadata( + // searchMetadataRequest SearchMetadataRequest + test.Body + ) + ).to.be.rejectedWith(Error); + } + + }); + }); + }); + + describe('searchOrgs', function() { + + const testReqBodies = requestBodies.filter( + (body: any) => body.Metadata.operationId === "searchOrgs" + ); + testReqBodies.forEach(async (test: any) => { + it(`${test.Metadata.operationId} - ${test.Metadata.scenario} : Testid - ${test.Metadata.testId}`, async function () { + + if (test.Metadata.scenario === "positive") { + var data; + try { + data = await instance.searchOrgs( + // searchOrgsRequest SearchOrgsRequest + test.Body + ) + } catch (er) { + console.error(er, "Response", data) + expect(er).to.be.undefined + } + } else { + await expect( + instance.searchOrgs( + // searchOrgsRequest SearchOrgsRequest + test.Body + ) + ).to.be.rejectedWith(Error); + } + + }); + }); + }); + + describe('searchRoles', function() { + + const testReqBodies = requestBodies.filter( + (body: any) => body.Metadata.operationId === "searchRoles" + ); + testReqBodies.forEach(async (test: any) => { + it(`${test.Metadata.operationId} - ${test.Metadata.scenario} : Testid - ${test.Metadata.testId}`, async function () { + + if (test.Metadata.scenario === "positive") { + var data; + try { + data = await instance.searchRoles( + // searchRolesRequest SearchRolesRequest + test.Body + ) + } catch (er) { + console.error(er, "Response", data) + expect(er).to.be.undefined + } + } else { + await expect( + instance.searchRoles( + // searchRolesRequest SearchRolesRequest + test.Body + ) + ).to.be.rejectedWith(Error); + } + + }); + }); + }); + + describe('searchSchedules', function() { + + const testReqBodies = requestBodies.filter( + (body: any) => body.Metadata.operationId === "searchSchedules" + ); + testReqBodies.forEach(async (test: any) => { + it(`${test.Metadata.operationId} - ${test.Metadata.scenario} : Testid - ${test.Metadata.testId}`, async function () { + + if (test.Metadata.scenario === "positive") { + var data; + try { + data = await instance.searchSchedules( + // searchSchedulesRequest SearchSchedulesRequest + test.Body + ) + } catch (er) { + console.error(er, "Response", data) + expect(er).to.be.undefined + } + } else { + await expect( + instance.searchSchedules( + // searchSchedulesRequest SearchSchedulesRequest + test.Body + ) + ).to.be.rejectedWith(Error); + } + + }); + }); + }); + + describe('searchSecuritySettings', function() { + + const testReqBodies = requestBodies.filter( + (body: any) => body.Metadata.operationId === "searchSecuritySettings" + ); + testReqBodies.forEach(async (test: any) => { + it(`${test.Metadata.operationId} - ${test.Metadata.scenario} : Testid - ${test.Metadata.testId}`, async function () { + + if (test.Metadata.scenario === "positive") { + var data; + try { + data = await instance.searchSecuritySettings( + // searchSecuritySettingsRequest SearchSecuritySettingsRequest + test.Body + ) + } catch (er) { + console.error(er, "Response", data) + expect(er).to.be.undefined + } + } else { + await expect( + instance.searchSecuritySettings( + // searchSecuritySettingsRequest SearchSecuritySettingsRequest + test.Body + ) + ).to.be.rejectedWith(Error); + } + + }); + }); + }); + + describe('searchTags', function() { + + const testReqBodies = requestBodies.filter( + (body: any) => body.Metadata.operationId === "searchTags" + ); + testReqBodies.forEach(async (test: any) => { + it(`${test.Metadata.operationId} - ${test.Metadata.scenario} : Testid - ${test.Metadata.testId}`, async function () { + + if (test.Metadata.scenario === "positive") { + var data; + try { + data = await instance.searchTags( + // searchTagsRequest SearchTagsRequest + test.Body + ) + } catch (er) { + console.error(er, "Response", data) + expect(er).to.be.undefined + } + } else { + await expect( + instance.searchTags( + // searchTagsRequest SearchTagsRequest + test.Body + ) + ).to.be.rejectedWith(Error); + } + + }); + }); + }); + + describe('searchUserGroups', function() { + + const testReqBodies = requestBodies.filter( + (body: any) => body.Metadata.operationId === "searchUserGroups" + ); + testReqBodies.forEach(async (test: any) => { + it(`${test.Metadata.operationId} - ${test.Metadata.scenario} : Testid - ${test.Metadata.testId}`, async function () { + + if (test.Metadata.scenario === "positive") { + var data; + try { + data = await instance.searchUserGroups( + // searchUserGroupsRequest SearchUserGroupsRequest + test.Body + ) + } catch (er) { + console.error(er, "Response", data) + expect(er).to.be.undefined + } + } else { + await expect( + instance.searchUserGroups( + // searchUserGroupsRequest SearchUserGroupsRequest + test.Body + ) + ).to.be.rejectedWith(Error); + } + + }); + }); + }); + + describe('searchUsers', function() { + + const testReqBodies = requestBodies.filter( + (body: any) => body.Metadata.operationId === "searchUsers" + ); + testReqBodies.forEach(async (test: any) => { + it(`${test.Metadata.operationId} - ${test.Metadata.scenario} : Testid - ${test.Metadata.testId}`, async function () { + + if (test.Metadata.scenario === "positive") { + var data; + try { + data = await instance.searchUsers( + // searchUsersRequest SearchUsersRequest + test.Body + ) + } catch (er) { + console.error(er, "Response", data) + expect(er).to.be.undefined + } + } else { + await expect( + instance.searchUsers( + // searchUsersRequest SearchUsersRequest + test.Body + ) + ).to.be.rejectedWith(Error); + } + + }); + }); + }); + + describe('searchVariables', function() { + + const testReqBodies = requestBodies.filter( + (body: any) => body.Metadata.operationId === "searchVariables" + ); + testReqBodies.forEach(async (test: any) => { + it(`${test.Metadata.operationId} - ${test.Metadata.scenario} : Testid - ${test.Metadata.testId}`, async function () { + + if (test.Metadata.scenario === "positive") { + var data; + try { + data = await instance.searchVariables( + // searchVariablesRequest SearchVariablesRequest + test.Body + ) + } catch (er) { + console.error(er, "Response", data) + expect(er).to.be.undefined + } + } else { + await expect( + instance.searchVariables( + // searchVariablesRequest SearchVariablesRequest + test.Body + ) + ).to.be.rejectedWith(Error); + } + + }); + }); + }); + + describe('searchWebhookConfigurations', function() { + + const testReqBodies = requestBodies.filter( + (body: any) => body.Metadata.operationId === "searchWebhookConfigurations" + ); + testReqBodies.forEach(async (test: any) => { + it(`${test.Metadata.operationId} - ${test.Metadata.scenario} : Testid - ${test.Metadata.testId}`, async function () { + + if (test.Metadata.scenario === "positive") { + var data; + try { + data = await instance.searchWebhookConfigurations( + // searchWebhookConfigurationsRequest SearchWebhookConfigurationsRequest + test.Body + ) + } catch (er) { + console.error(er, "Response", data) + expect(er).to.be.undefined + } + } else { + await expect( + instance.searchWebhookConfigurations( + // searchWebhookConfigurationsRequest SearchWebhookConfigurationsRequest + test.Body + ) + ).to.be.rejectedWith(Error); + } + + }); + }); + }); + + describe('sendAgentConversationMessage', function() { + + const testReqBodies = requestBodies.filter( + (body: any) => body.Metadata.operationId === "sendAgentConversationMessage" + ); + testReqBodies.forEach(async (test: any) => { + it(`${test.Metadata.operationId} - ${test.Metadata.scenario} : Testid - ${test.Metadata.testId}`, async function () { + + if (test.Metadata.scenario === "positive") { + var data; + try { + data = await instance.sendAgentConversationMessage( + // conversationIdentifier conversation_identifier + test.Path_Variables.conversation_identifier , + // sendAgentConversationMessageRequest SendAgentConversationMessageRequest + test.Body + ) + } catch (er) { + console.error(er, "Response", data) + expect(er).to.be.undefined + } + } else { + await expect( + instance.sendAgentConversationMessage( + // conversationIdentifier conversation_identifier + test.Path_Variables.conversation_identifier , + // sendAgentConversationMessageRequest SendAgentConversationMessageRequest + test.Body + ) + ).to.be.rejectedWith(Error); + } + + }); + }); + }); + + describe('sendAgentConversationMessageStreaming', function() { + + const testReqBodies = requestBodies.filter( + (body: any) => body.Metadata.operationId === "sendAgentConversationMessageStreaming" + ); + testReqBodies.forEach(async (test: any) => { + it(`${test.Metadata.operationId} - ${test.Metadata.scenario} : Testid - ${test.Metadata.testId}`, async function () { + + if (test.Metadata.scenario === "positive") { + var data; + try { + data = await instance.sendAgentConversationMessageStreaming( + // conversationIdentifier conversation_identifier + test.Path_Variables.conversation_identifier , + // sendAgentConversationMessageStreamingRequest SendAgentConversationMessageStreamingRequest + test.Body + ) + } catch (er) { + console.error(er, "Response", data) + expect(er).to.be.undefined + } + } else { + await expect( + instance.sendAgentConversationMessageStreaming( + // conversationIdentifier conversation_identifier + test.Path_Variables.conversation_identifier , + // sendAgentConversationMessageStreamingRequest SendAgentConversationMessageStreamingRequest + test.Body + ) + ).to.be.rejectedWith(Error); + } + + }); + }); + }); + + describe('sendAgentMessage', function() { + + const testReqBodies = requestBodies.filter( + (body: any) => body.Metadata.operationId === "sendAgentMessage" + ); + testReqBodies.forEach(async (test: any) => { + it(`${test.Metadata.operationId} - ${test.Metadata.scenario} : Testid - ${test.Metadata.testId}`, async function () { + + if (test.Metadata.scenario === "positive") { + var data; + try { + data = await instance.sendAgentMessage( + // conversationIdentifier conversation_identifier + test.Path_Variables.conversation_identifier , + // sendAgentMessageRequest SendAgentMessageRequest + test.Body + ) + } catch (er) { + console.error(er, "Response", data) + expect(er).to.be.undefined + } + } else { + await expect( + instance.sendAgentMessage( + // conversationIdentifier conversation_identifier + test.Path_Variables.conversation_identifier , + // sendAgentMessageRequest SendAgentMessageRequest + test.Body + ) + ).to.be.rejectedWith(Error); + } + + }); + }); + }); + + describe('sendAgentMessageStreaming', function() { + + const testReqBodies = requestBodies.filter( + (body: any) => body.Metadata.operationId === "sendAgentMessageStreaming" + ); + testReqBodies.forEach(async (test: any) => { + it(`${test.Metadata.operationId} - ${test.Metadata.scenario} : Testid - ${test.Metadata.testId}`, async function () { + + if (test.Metadata.scenario === "positive") { + var data; + try { + data = await instance.sendAgentMessageStreaming( + // sendAgentMessageStreamingRequest SendAgentMessageStreamingRequest + test.Body + ) + } catch (er) { + console.error(er, "Response", data) + expect(er).to.be.undefined + } + } else { + await expect( + instance.sendAgentMessageStreaming( + // sendAgentMessageStreamingRequest SendAgentMessageStreamingRequest + test.Body + ) + ).to.be.rejectedWith(Error); + } + + }); + }); + }); + + describe('sendMessage', function() { + + const testReqBodies = requestBodies.filter( + (body: any) => body.Metadata.operationId === "sendMessage" + ); + testReqBodies.forEach(async (test: any) => { + it(`${test.Metadata.operationId} - ${test.Metadata.scenario} : Testid - ${test.Metadata.testId}`, async function () { + + if (test.Metadata.scenario === "positive") { + var data; + try { + data = await instance.sendMessage( + // conversationIdentifier conversation_identifier + test.Path_Variables.conversation_identifier , + // sendMessageRequest SendMessageRequest + test.Body + ) + } catch (er) { + console.error(er, "Response", data) + expect(er).to.be.undefined + } + } else { + await expect( + instance.sendMessage( + // conversationIdentifier conversation_identifier + test.Path_Variables.conversation_identifier , + // sendMessageRequest SendMessageRequest + test.Body + ) + ).to.be.rejectedWith(Error); + } + + }); + }); + }); + + describe('setNLInstructions', function() { + + const testReqBodies = requestBodies.filter( + (body: any) => body.Metadata.operationId === "setNLInstructions" + ); + testReqBodies.forEach(async (test: any) => { + it(`${test.Metadata.operationId} - ${test.Metadata.scenario} : Testid - ${test.Metadata.testId}`, async function () { + + if (test.Metadata.scenario === "positive") { + var data; + try { + data = await instance.setNLInstructions( + // setNLInstructionsRequest SetNLInstructionsRequest + test.Body + ) + } catch (er) { + console.error(er, "Response", data) + expect(er).to.be.undefined + } + } else { + await expect( + instance.setNLInstructions( + // setNLInstructionsRequest SetNLInstructionsRequest + test.Body + ) + ).to.be.rejectedWith(Error); + } + + }); + }); + }); + + describe('shareMetadata', function() { + + const testReqBodies = requestBodies.filter( + (body: any) => body.Metadata.operationId === "shareMetadata" + ); + testReqBodies.forEach(async (test: any) => { + it(`${test.Metadata.operationId} - ${test.Metadata.scenario} : Testid - ${test.Metadata.testId}`, async function () { + + if (test.Metadata.scenario === "positive") { + var data; + try { + data = await instance.shareMetadata( + // shareMetadataRequest ShareMetadataRequest + test.Body + ) + } catch (er) { + console.error(er, "Response", data) + expect(er).to.be.undefined + } + } else { + await expect( + instance.shareMetadata( + // shareMetadataRequest ShareMetadataRequest + test.Body + ) + ).to.be.rejectedWith(Error); + } + + }); + }); + }); + + describe('singleAnswer', function() { + + const testReqBodies = requestBodies.filter( + (body: any) => body.Metadata.operationId === "singleAnswer" + ); + testReqBodies.forEach(async (test: any) => { + it(`${test.Metadata.operationId} - ${test.Metadata.scenario} : Testid - ${test.Metadata.testId}`, async function () { + + if (test.Metadata.scenario === "positive") { + var data; + try { + data = await instance.singleAnswer( + // singleAnswerRequest SingleAnswerRequest + test.Body + ) + } catch (er) { + console.error(er, "Response", data) + expect(er).to.be.undefined + } + } else { + await expect( + instance.singleAnswer( + // singleAnswerRequest SingleAnswerRequest + test.Body + ) + ).to.be.rejectedWith(Error); + } + + }); + }); + }); + + describe('stopConversation', function() { + + const testReqBodies = requestBodies.filter( + (body: any) => body.Metadata.operationId === "stopConversation" + ); + testReqBodies.forEach(async (test: any) => { + it(`${test.Metadata.operationId} - ${test.Metadata.scenario} : Testid - ${test.Metadata.testId}`, async function () { + + if (test.Metadata.scenario === "positive") { + var data; + try { + data = await instance.stopConversation( + // conversationIdentifier conversation_identifier + test.Path_Variables.conversation_identifier + ) + } catch (er) { + console.error(er, "Response", data) + expect(er).to.be.undefined + } + } else { + await expect( + instance.stopConversation( + // conversationIdentifier conversation_identifier + test.Path_Variables.conversation_identifier + ) + ).to.be.rejectedWith(Error); + } + + }); + }); + }); + + describe('syncMetadata', function() { + + const testReqBodies = requestBodies.filter( + (body: any) => body.Metadata.operationId === "syncMetadata" + ); + testReqBodies.forEach(async (test: any) => { + it(`${test.Metadata.operationId} - ${test.Metadata.scenario} : Testid - ${test.Metadata.testId}`, async function () { + + if (test.Metadata.scenario === "positive") { + var data; + try { + data = await instance.syncMetadata( + // connectionIdentifier connection_identifier + test.Path_Variables.connection_identifier , + // syncMetadataRequest SyncMetadataRequest + test.Body + ) + } catch (er) { + console.error(er, "Response", data) + expect(er).to.be.undefined + } + } else { + await expect( + instance.syncMetadata( + // connectionIdentifier connection_identifier + test.Path_Variables.connection_identifier , + // syncMetadataRequest SyncMetadataRequest + test.Body + ) + ).to.be.rejectedWith(Error); + } + + }); + }); + }); + + describe('unassignTag', function() { + + const testReqBodies = requestBodies.filter( + (body: any) => body.Metadata.operationId === "unassignTag" + ); + testReqBodies.forEach(async (test: any) => { + it(`${test.Metadata.operationId} - ${test.Metadata.scenario} : Testid - ${test.Metadata.testId}`, async function () { + + if (test.Metadata.scenario === "positive") { + var data; + try { + data = await instance.unassignTag( + // unassignTagRequest UnassignTagRequest + test.Body + ) + } catch (er) { + console.error(er, "Response", data) + expect(er).to.be.undefined + } + } else { + await expect( + instance.unassignTag( + // unassignTagRequest UnassignTagRequest + test.Body + ) + ).to.be.rejectedWith(Error); + } + + }); + }); + }); + + describe('unparameterizeMetadata', function() { + + const testReqBodies = requestBodies.filter( + (body: any) => body.Metadata.operationId === "unparameterizeMetadata" + ); + testReqBodies.forEach(async (test: any) => { + it(`${test.Metadata.operationId} - ${test.Metadata.scenario} : Testid - ${test.Metadata.testId}`, async function () { + + if (test.Metadata.scenario === "positive") { + var data; + try { + data = await instance.unparameterizeMetadata( + // unparameterizeMetadataRequest UnparameterizeMetadataRequest + test.Body + ) + } catch (er) { + console.error(er, "Response", data) + expect(er).to.be.undefined + } + } else { + await expect( + instance.unparameterizeMetadata( + // unparameterizeMetadataRequest UnparameterizeMetadataRequest + test.Body + ) + ).to.be.rejectedWith(Error); + } + + }); + }); + }); + + describe('unpublishMetadata', function() { + + const testReqBodies = requestBodies.filter( + (body: any) => body.Metadata.operationId === "unpublishMetadata" + ); + testReqBodies.forEach(async (test: any) => { + it(`${test.Metadata.operationId} - ${test.Metadata.scenario} : Testid - ${test.Metadata.testId}`, async function () { + + if (test.Metadata.scenario === "positive") { + var data; + try { + data = await instance.unpublishMetadata( + // unpublishMetadataRequest UnpublishMetadataRequest + test.Body + ) + } catch (er) { + console.error(er, "Response", data) + expect(er).to.be.undefined + } + } else { + await expect( + instance.unpublishMetadata( + // unpublishMetadataRequest UnpublishMetadataRequest + test.Body + ) + ).to.be.rejectedWith(Error); + } + + }); + }); + }); + + describe('updateCalendar', function() { + + const testReqBodies = requestBodies.filter( + (body: any) => body.Metadata.operationId === "updateCalendar" + ); + testReqBodies.forEach(async (test: any) => { + it(`${test.Metadata.operationId} - ${test.Metadata.scenario} : Testid - ${test.Metadata.testId}`, async function () { + + if (test.Metadata.scenario === "positive") { + var data; + try { + data = await instance.updateCalendar( + // calendarIdentifier calendar_identifier + test.Path_Variables.calendar_identifier , + // updateCalendarRequest UpdateCalendarRequest + test.Body + ) + } catch (er) { + console.error(er, "Response", data) + expect(er).to.be.undefined + } + } else { + await expect( + instance.updateCalendar( + // calendarIdentifier calendar_identifier + test.Path_Variables.calendar_identifier , + // updateCalendarRequest UpdateCalendarRequest + test.Body + ) + ).to.be.rejectedWith(Error); + } + + }); + }); + }); + + describe('updateCollection', function() { + + const testReqBodies = requestBodies.filter( + (body: any) => body.Metadata.operationId === "updateCollection" + ); + testReqBodies.forEach(async (test: any) => { + it(`${test.Metadata.operationId} - ${test.Metadata.scenario} : Testid - ${test.Metadata.testId}`, async function () { + + if (test.Metadata.scenario === "positive") { + var data; + try { + data = await instance.updateCollection( + // collectionIdentifier collection_identifier + test.Path_Variables.collection_identifier , + // updateCollectionRequest UpdateCollectionRequest + test.Body + ) + } catch (er) { + console.error(er, "Response", data) + expect(er).to.be.undefined + } + } else { + await expect( + instance.updateCollection( + // collectionIdentifier collection_identifier + test.Path_Variables.collection_identifier , + // updateCollectionRequest UpdateCollectionRequest + test.Body + ) + ).to.be.rejectedWith(Error); + } + + }); + }); + }); + + describe('updateColumnSecurityRules', function() { + + const testReqBodies = requestBodies.filter( + (body: any) => body.Metadata.operationId === "updateColumnSecurityRules" + ); + testReqBodies.forEach(async (test: any) => { + it(`${test.Metadata.operationId} - ${test.Metadata.scenario} : Testid - ${test.Metadata.testId}`, async function () { + + if (test.Metadata.scenario === "positive") { + var data; + try { + data = await instance.updateColumnSecurityRules( + // updateColumnSecurityRulesRequest UpdateColumnSecurityRulesRequest + test.Body + ) + } catch (er) { + console.error(er, "Response", data) + expect(er).to.be.undefined + } + } else { + await expect( + instance.updateColumnSecurityRules( + // updateColumnSecurityRulesRequest UpdateColumnSecurityRulesRequest + test.Body + ) + ).to.be.rejectedWith(Error); + } + + }); + }); + }); + + describe('updateConfig', function() { + + const testReqBodies = requestBodies.filter( + (body: any) => body.Metadata.operationId === "updateConfig" + ); + testReqBodies.forEach(async (test: any) => { + it(`${test.Metadata.operationId} - ${test.Metadata.scenario} : Testid - ${test.Metadata.testId}`, async function () { + + if (test.Metadata.scenario === "positive") { + var data; + try { + data = await instance.updateConfig( + // updateConfigRequest UpdateConfigRequest + test.Body + ) + } catch (er) { + console.error(er, "Response", data) + expect(er).to.be.undefined + } + } else { + await expect( + instance.updateConfig( + // updateConfigRequest UpdateConfigRequest + test.Body + ) + ).to.be.rejectedWith(Error); + } + + }); + }); + }); + + describe('updateConnection', function() { + + const testReqBodies = requestBodies.filter( + (body: any) => body.Metadata.operationId === "updateConnection" + ); + testReqBodies.forEach(async (test: any) => { + it(`${test.Metadata.operationId} - ${test.Metadata.scenario} : Testid - ${test.Metadata.testId}`, async function () { + + if (test.Metadata.scenario === "positive") { + var data; + try { + data = await instance.updateConnection( + // updateConnectionRequest UpdateConnectionRequest + test.Body + ) + } catch (er) { + console.error(er, "Response", data) + expect(er).to.be.undefined + } + } else { + await expect( + instance.updateConnection( + // updateConnectionRequest UpdateConnectionRequest + test.Body + ) + ).to.be.rejectedWith(Error); + } + + }); + }); + }); + + describe('updateConnectionConfiguration', function() { + + const testReqBodies = requestBodies.filter( + (body: any) => body.Metadata.operationId === "updateConnectionConfiguration" + ); + testReqBodies.forEach(async (test: any) => { + it(`${test.Metadata.operationId} - ${test.Metadata.scenario} : Testid - ${test.Metadata.testId}`, async function () { + + if (test.Metadata.scenario === "positive") { + var data; + try { + data = await instance.updateConnectionConfiguration( + // configurationIdentifier configuration_identifier + test.Path_Variables.configuration_identifier , + // updateConnectionConfigurationRequest UpdateConnectionConfigurationRequest + test.Body + ) + } catch (er) { + console.error(er, "Response", data) + expect(er).to.be.undefined + } + } else { + await expect( + instance.updateConnectionConfiguration( + // configurationIdentifier configuration_identifier + test.Path_Variables.configuration_identifier , + // updateConnectionConfigurationRequest UpdateConnectionConfigurationRequest + test.Body + ) + ).to.be.rejectedWith(Error); + } + + }); + }); + }); + + describe('updateConnectionStatus', function() { + + const testReqBodies = requestBodies.filter( + (body: any) => body.Metadata.operationId === "updateConnectionStatus" + ); + testReqBodies.forEach(async (test: any) => { + it(`${test.Metadata.operationId} - ${test.Metadata.scenario} : Testid - ${test.Metadata.testId}`, async function () { + + if (test.Metadata.scenario === "positive") { + var data; + try { + data = await instance.updateConnectionStatus( + // connectionIdentifier connection_identifier + test.Path_Variables.connection_identifier , + // updateConnectionStatusRequest UpdateConnectionStatusRequest + test.Body + ) + } catch (er) { + console.error(er, "Response", data) + expect(er).to.be.undefined + } + } else { + await expect( + instance.updateConnectionStatus( + // connectionIdentifier connection_identifier + test.Path_Variables.connection_identifier , + // updateConnectionStatusRequest UpdateConnectionStatusRequest + test.Body + ) + ).to.be.rejectedWith(Error); + } + + }); + }); + }); + + describe('updateConnectionV2', function() { + + const testReqBodies = requestBodies.filter( + (body: any) => body.Metadata.operationId === "updateConnectionV2" + ); + testReqBodies.forEach(async (test: any) => { + it(`${test.Metadata.operationId} - ${test.Metadata.scenario} : Testid - ${test.Metadata.testId}`, async function () { + + if (test.Metadata.scenario === "positive") { + var data; + try { + data = await instance.updateConnectionV2( + // connectionIdentifier connection_identifier + test.Path_Variables.connection_identifier , + // updateConnectionV2Request UpdateConnectionV2Request + test.Body + ) + } catch (er) { + console.error(er, "Response", data) + expect(er).to.be.undefined + } + } else { + await expect( + instance.updateConnectionV2( + // connectionIdentifier connection_identifier + test.Path_Variables.connection_identifier , + // updateConnectionV2Request UpdateConnectionV2Request + test.Body + ) + ).to.be.rejectedWith(Error); + } + + }); + }); + }); + + describe('updateCustomAction', function() { + + const testReqBodies = requestBodies.filter( + (body: any) => body.Metadata.operationId === "updateCustomAction" + ); + testReqBodies.forEach(async (test: any) => { + it(`${test.Metadata.operationId} - ${test.Metadata.scenario} : Testid - ${test.Metadata.testId}`, async function () { + + if (test.Metadata.scenario === "positive") { + var data; + try { + data = await instance.updateCustomAction( + // customActionIdentifier custom_action_identifier + test.Path_Variables.custom_action_identifier , + // updateCustomActionRequest UpdateCustomActionRequest + test.Body + ) + } catch (er) { + console.error(er, "Response", data) + expect(er).to.be.undefined + } + } else { + await expect( + instance.updateCustomAction( + // customActionIdentifier custom_action_identifier + test.Path_Variables.custom_action_identifier , + // updateCustomActionRequest UpdateCustomActionRequest + test.Body + ) + ).to.be.rejectedWith(Error); + } + + }); + }); + }); + + describe('updateDbtConnection', function() { + + const testReqBodies = requestBodies.filter( + (body: any) => body.Metadata.operationId === "updateDbtConnection" + ); + testReqBodies.forEach(async (test: any) => { + it(`${test.Metadata.operationId} - ${test.Metadata.scenario} : Testid - ${test.Metadata.testId}`, async function () { + + if (test.Metadata.scenario === "positive") { + var data; + try { + data = await instance.updateDbtConnection( + // dbtConnectionIdentifier dbt_connection_identifier + , + // connectionName connection_name + , + // databaseName database_name + , + // importType import_type + , + // accessToken access_token + , + // dbtUrl dbt_url + , + // accountId account_id + , + // projectId project_id + , + // dbtEnvId dbt_env_id + , + // projectName project_name + , + // fileContent file_content + + ) + } catch (er) { + console.error(er, "Response", data) + expect(er).to.be.undefined + } + } else { + await expect( + instance.updateDbtConnection( + // dbtConnectionIdentifier dbt_connection_identifier + , + // connectionName connection_name + , + // databaseName database_name + , + // importType import_type + , + // accessToken access_token + , + // dbtUrl dbt_url + , + // accountId account_id + , + // projectId project_id + , + // dbtEnvId dbt_env_id + , + // projectName project_name + , + // fileContent file_content + + ) + ).to.be.rejectedWith(Error); + } + + }); + }); + }); + + describe('updateEmailCustomization', function() { + + const testReqBodies = requestBodies.filter( + (body: any) => body.Metadata.operationId === "updateEmailCustomization" + ); + testReqBodies.forEach(async (test: any) => { + it(`${test.Metadata.operationId} - ${test.Metadata.scenario} : Testid - ${test.Metadata.testId}`, async function () { + + if (test.Metadata.scenario === "positive") { + var data; + try { + data = await instance.updateEmailCustomization( + // updateEmailCustomizationRequest UpdateEmailCustomizationRequest + test.Body + ) + } catch (er) { + console.error(er, "Response", data) + expect(er).to.be.undefined + } + } else { + await expect( + instance.updateEmailCustomization( + // updateEmailCustomizationRequest UpdateEmailCustomizationRequest + test.Body + ) + ).to.be.rejectedWith(Error); + } + + }); + }); + }); + + describe('updateMetadataHeader', function() { + + const testReqBodies = requestBodies.filter( + (body: any) => body.Metadata.operationId === "updateMetadataHeader" + ); + testReqBodies.forEach(async (test: any) => { + it(`${test.Metadata.operationId} - ${test.Metadata.scenario} : Testid - ${test.Metadata.testId}`, async function () { + + if (test.Metadata.scenario === "positive") { + var data; + try { + data = await instance.updateMetadataHeader( + // updateMetadataHeaderRequest UpdateMetadataHeaderRequest + test.Body + ) + } catch (er) { + console.error(er, "Response", data) + expect(er).to.be.undefined + } + } else { + await expect( + instance.updateMetadataHeader( + // updateMetadataHeaderRequest UpdateMetadataHeaderRequest + test.Body + ) + ).to.be.rejectedWith(Error); + } + + }); + }); + }); + + describe('updateMetadataObjId', function() { + + const testReqBodies = requestBodies.filter( + (body: any) => body.Metadata.operationId === "updateMetadataObjId" + ); + testReqBodies.forEach(async (test: any) => { + it(`${test.Metadata.operationId} - ${test.Metadata.scenario} : Testid - ${test.Metadata.testId}`, async function () { + + if (test.Metadata.scenario === "positive") { + var data; + try { + data = await instance.updateMetadataObjId( + // updateMetadataObjIdRequest UpdateMetadataObjIdRequest + test.Body + ) + } catch (er) { + console.error(er, "Response", data) + expect(er).to.be.undefined + } + } else { + await expect( + instance.updateMetadataObjId( + // updateMetadataObjIdRequest UpdateMetadataObjIdRequest + test.Body + ) + ).to.be.rejectedWith(Error); + } + + }); + }); + }); + + describe('updateOrg', function() { + + const testReqBodies = requestBodies.filter( + (body: any) => body.Metadata.operationId === "updateOrg" + ); + testReqBodies.forEach(async (test: any) => { + it(`${test.Metadata.operationId} - ${test.Metadata.scenario} : Testid - ${test.Metadata.testId}`, async function () { + + if (test.Metadata.scenario === "positive") { + var data; + try { + data = await instance.updateOrg( + // orgIdentifier org_identifier + test.Path_Variables.org_identifier , + // updateOrgRequest UpdateOrgRequest + test.Body + ) + } catch (er) { + console.error(er, "Response", data) + expect(er).to.be.undefined + } + } else { + await expect( + instance.updateOrg( + // orgIdentifier org_identifier + test.Path_Variables.org_identifier , + // updateOrgRequest UpdateOrgRequest + test.Body + ) + ).to.be.rejectedWith(Error); + } + + }); + }); + }); + + describe('updateRole', function() { + + const testReqBodies = requestBodies.filter( + (body: any) => body.Metadata.operationId === "updateRole" + ); + testReqBodies.forEach(async (test: any) => { + it(`${test.Metadata.operationId} - ${test.Metadata.scenario} : Testid - ${test.Metadata.testId}`, async function () { + + if (test.Metadata.scenario === "positive") { + var data; + try { + data = await instance.updateRole( + // roleIdentifier role_identifier + test.Path_Variables.role_identifier , + // updateRoleRequest UpdateRoleRequest + test.Body + ) + } catch (er) { + console.error(er, "Response", data) + expect(er).to.be.undefined + } + } else { + await expect( + instance.updateRole( + // roleIdentifier role_identifier + test.Path_Variables.role_identifier , + // updateRoleRequest UpdateRoleRequest + test.Body + ) + ).to.be.rejectedWith(Error); + } + + }); + }); + }); + + describe('updateSchedule', function() { + + const testReqBodies = requestBodies.filter( + (body: any) => body.Metadata.operationId === "updateSchedule" + ); + testReqBodies.forEach(async (test: any) => { + it(`${test.Metadata.operationId} - ${test.Metadata.scenario} : Testid - ${test.Metadata.testId}`, async function () { + + if (test.Metadata.scenario === "positive") { + var data; + try { + data = await instance.updateSchedule( + // scheduleIdentifier schedule_identifier + test.Path_Variables.schedule_identifier , + // updateScheduleRequest UpdateScheduleRequest + test.Body + ) + } catch (er) { + console.error(er, "Response", data) + expect(er).to.be.undefined + } + } else { + await expect( + instance.updateSchedule( + // scheduleIdentifier schedule_identifier + test.Path_Variables.schedule_identifier , + // updateScheduleRequest UpdateScheduleRequest + test.Body + ) + ).to.be.rejectedWith(Error); + } + + }); + }); + }); + + describe('updateSystemConfig', function() { + + const testReqBodies = requestBodies.filter( + (body: any) => body.Metadata.operationId === "updateSystemConfig" + ); + testReqBodies.forEach(async (test: any) => { + it(`${test.Metadata.operationId} - ${test.Metadata.scenario} : Testid - ${test.Metadata.testId}`, async function () { + + if (test.Metadata.scenario === "positive") { + var data; + try { + data = await instance.updateSystemConfig( + // updateSystemConfigRequest UpdateSystemConfigRequest + test.Body + ) + } catch (er) { + console.error(er, "Response", data) + expect(er).to.be.undefined + } + } else { + await expect( + instance.updateSystemConfig( + // updateSystemConfigRequest UpdateSystemConfigRequest + test.Body + ) + ).to.be.rejectedWith(Error); + } + + }); + }); + }); + + describe('updateTag', function() { + + const testReqBodies = requestBodies.filter( + (body: any) => body.Metadata.operationId === "updateTag" + ); + testReqBodies.forEach(async (test: any) => { + it(`${test.Metadata.operationId} - ${test.Metadata.scenario} : Testid - ${test.Metadata.testId}`, async function () { + + if (test.Metadata.scenario === "positive") { + var data; + try { + data = await instance.updateTag( + // tagIdentifier tag_identifier + test.Path_Variables.tag_identifier , + // updateTagRequest UpdateTagRequest + test.Body + ) + } catch (er) { + console.error(er, "Response", data) + expect(er).to.be.undefined + } + } else { + await expect( + instance.updateTag( + // tagIdentifier tag_identifier + test.Path_Variables.tag_identifier , + // updateTagRequest UpdateTagRequest + test.Body + ) + ).to.be.rejectedWith(Error); + } + + }); + }); + }); + + describe('updateUser', function() { + + const testReqBodies = requestBodies.filter( + (body: any) => body.Metadata.operationId === "updateUser" + ); + testReqBodies.forEach(async (test: any) => { + it(`${test.Metadata.operationId} - ${test.Metadata.scenario} : Testid - ${test.Metadata.testId}`, async function () { + + if (test.Metadata.scenario === "positive") { + var data; + try { + data = await instance.updateUser( + // userIdentifier user_identifier + test.Path_Variables.user_identifier , + // updateUserRequest UpdateUserRequest + test.Body + ) + } catch (er) { + console.error(er, "Response", data) + expect(er).to.be.undefined + } + } else { + await expect( + instance.updateUser( + // userIdentifier user_identifier + test.Path_Variables.user_identifier , + // updateUserRequest UpdateUserRequest + test.Body + ) + ).to.be.rejectedWith(Error); + } + + }); + }); + }); + + describe('updateUserGroup', function() { + + const testReqBodies = requestBodies.filter( + (body: any) => body.Metadata.operationId === "updateUserGroup" + ); + testReqBodies.forEach(async (test: any) => { + it(`${test.Metadata.operationId} - ${test.Metadata.scenario} : Testid - ${test.Metadata.testId}`, async function () { + + if (test.Metadata.scenario === "positive") { + var data; + try { + data = await instance.updateUserGroup( + // groupIdentifier group_identifier + test.Path_Variables.group_identifier , + // updateUserGroupRequest UpdateUserGroupRequest + test.Body + ) + } catch (er) { + console.error(er, "Response", data) + expect(er).to.be.undefined + } + } else { + await expect( + instance.updateUserGroup( + // groupIdentifier group_identifier + test.Path_Variables.group_identifier , + // updateUserGroupRequest UpdateUserGroupRequest + test.Body + ) + ).to.be.rejectedWith(Error); + } + + }); + }); + }); + + describe('updateVariable', function() { + + const testReqBodies = requestBodies.filter( + (body: any) => body.Metadata.operationId === "updateVariable" + ); + testReqBodies.forEach(async (test: any) => { + it(`${test.Metadata.operationId} - ${test.Metadata.scenario} : Testid - ${test.Metadata.testId}`, async function () { + + if (test.Metadata.scenario === "positive") { + var data; + try { + data = await instance.updateVariable( + // identifier identifier + test.Path_Variables.identifier , + // updateVariableRequest UpdateVariableRequest + test.Body + ) + } catch (er) { + console.error(er, "Response", data) + expect(er).to.be.undefined + } + } else { + await expect( + instance.updateVariable( + // identifier identifier + test.Path_Variables.identifier , + // updateVariableRequest UpdateVariableRequest + test.Body + ) + ).to.be.rejectedWith(Error); + } + + }); + }); + }); + + describe('updateVariableValues', function() { + + const testReqBodies = requestBodies.filter( + (body: any) => body.Metadata.operationId === "updateVariableValues" + ); + testReqBodies.forEach(async (test: any) => { + it(`${test.Metadata.operationId} - ${test.Metadata.scenario} : Testid - ${test.Metadata.testId}`, async function () { + + if (test.Metadata.scenario === "positive") { + var data; + try { + data = await instance.updateVariableValues( + // updateVariableValuesRequest UpdateVariableValuesRequest + test.Body + ) + } catch (er) { + console.error(er, "Response", data) + expect(er).to.be.undefined + } + } else { + await expect( + instance.updateVariableValues( + // updateVariableValuesRequest UpdateVariableValuesRequest + test.Body + ) + ).to.be.rejectedWith(Error); + } + + }); + }); + }); + + describe('updateWebhookConfiguration', function() { + + const testReqBodies = requestBodies.filter( + (body: any) => body.Metadata.operationId === "updateWebhookConfiguration" + ); + testReqBodies.forEach(async (test: any) => { + it(`${test.Metadata.operationId} - ${test.Metadata.scenario} : Testid - ${test.Metadata.testId}`, async function () { + + if (test.Metadata.scenario === "positive") { + var data; + try { + data = await instance.updateWebhookConfiguration( + // webhookIdentifier webhook_identifier + test.Path_Variables.webhook_identifier , + // updateWebhookConfigurationRequest UpdateWebhookConfigurationRequest + test.Body + ) + } catch (er) { + console.error(er, "Response", data) + expect(er).to.be.undefined + } + } else { + await expect( + instance.updateWebhookConfiguration( + // webhookIdentifier webhook_identifier + test.Path_Variables.webhook_identifier , + // updateWebhookConfigurationRequest UpdateWebhookConfigurationRequest + test.Body + ) + ).to.be.rejectedWith(Error); + } + + }); + }); + }); + + describe('validateCommunicationChannel', function() { + + const testReqBodies = requestBodies.filter( + (body: any) => body.Metadata.operationId === "validateCommunicationChannel" + ); + testReqBodies.forEach(async (test: any) => { + it(`${test.Metadata.operationId} - ${test.Metadata.scenario} : Testid - ${test.Metadata.testId}`, async function () { + + if (test.Metadata.scenario === "positive") { + var data; + try { + data = await instance.validateCommunicationChannel( + // validateCommunicationChannelRequest ValidateCommunicationChannelRequest + test.Body + ) + } catch (er) { + console.error(er, "Response", data) + expect(er).to.be.undefined + } + } else { + await expect( + instance.validateCommunicationChannel( + // validateCommunicationChannelRequest ValidateCommunicationChannelRequest + test.Body + ) + ).to.be.rejectedWith(Error); + } + + }); + }); + }); + + describe('validateEmailCustomization', function() { + + const testReqBodies = requestBodies.filter( + (body: any) => body.Metadata.operationId === "validateEmailCustomization" + ); + testReqBodies.forEach(async (test: any) => { + it(`${test.Metadata.operationId} - ${test.Metadata.scenario} : Testid - ${test.Metadata.testId}`, async function () { + + if (test.Metadata.scenario === "positive") { + var data; + try { + data = await instance.validateEmailCustomization( + ) + } catch (er) { + console.error(er, "Response", data) + expect(er).to.be.undefined + } + } else { + await expect( + instance.validateEmailCustomization( + ) + ).to.be.rejectedWith(Error); + } + + }); + }); + }); + + describe('validateMerge', function() { + + const testReqBodies = requestBodies.filter( + (body: any) => body.Metadata.operationId === "validateMerge" + ); + testReqBodies.forEach(async (test: any) => { + it(`${test.Metadata.operationId} - ${test.Metadata.scenario} : Testid - ${test.Metadata.testId}`, async function () { + + if (test.Metadata.scenario === "positive") { + var data; + try { + data = await instance.validateMerge( + // validateMergeRequest ValidateMergeRequest + test.Body + ) + } catch (er) { + console.error(er, "Response", data) + expect(er).to.be.undefined + } + } else { + await expect( + instance.validateMerge( + // validateMergeRequest ValidateMergeRequest + test.Body + ) + ).to.be.rejectedWith(Error); + } + + }); + }); + }); + + describe('validateToken', function() { + + const testReqBodies = requestBodies.filter( + (body: any) => body.Metadata.operationId === "validateToken" + ); + testReqBodies.forEach(async (test: any) => { + it(`${test.Metadata.operationId} - ${test.Metadata.scenario} : Testid - ${test.Metadata.testId}`, async function () { + + if (test.Metadata.scenario === "positive") { + var data; + try { + data = await instance.validateToken( + // validateTokenRequest ValidateTokenRequest + test.Body + ) + } catch (er) { + console.error(er, "Response", data) + expect(er).to.be.undefined + } + } else { + await expect( + instance.validateToken( + // validateTokenRequest ValidateTokenRequest + test.Body + ) + ).to.be.rejectedWith(Error); + } + + }); + }); + }); +}); diff --git a/sdks/typescript/tests/UsersApiTest.ts b/sdks/typescript/tests/UsersApiTest.ts new file mode 100644 index 000000000..4c3e0b997 --- /dev/null +++ b/sdks/typescript/tests/UsersApiTest.ts @@ -0,0 +1,348 @@ +import chai from "chai"; +import chaiAsPromised from "chai-as-promised"; +import { createBearerAuthenticationConfig } from "../utils/config"; +import { PromiseUsersApi } from "../types/PromiseAPI"; +import requestBodies from "./testDataUpdated.json"; + +chai.use(chaiAsPromised); +const expect = chai.expect; + + + +const baseUrlFromCli = process.argv.filter(s => s.startsWith("--baseUrl="))?.[0]?.split("=")?.[1] +const BASE_URL = baseUrlFromCli || "http://127.0.0.1:4123" +const config = createBearerAuthenticationConfig(BASE_URL, { + username: "tsadmin", + password: "admin", +}); + + +const instance = new PromiseUsersApi(config); + +describe('UsersApi', function() { + + + describe('activateUser', function() { + + const testReqBodies = requestBodies.filter( + (body: any) => body.Metadata.operationId === "activateUser" + ); + testReqBodies.forEach(async (test: any) => { + it(`${test.Metadata.operationId} - ${test.Metadata.scenario} : Testid - ${test.Metadata.testId}`, async function () { + + if (test.Metadata.scenario === "positive") { + var data; + try { + data = await instance.activateUser( + // activateUserRequest ActivateUserRequest + test.Body + ) + } catch (er) { + console.error(er, "Response", data) + expect(er).to.be.undefined + } + } else { + await expect( + instance.activateUser( + // activateUserRequest ActivateUserRequest + test.Body + ) + ).to.be.rejectedWith(Error); + } + + }); + }); + }); + + describe('changeUserPassword', function() { + + const testReqBodies = requestBodies.filter( + (body: any) => body.Metadata.operationId === "changeUserPassword" + ); + testReqBodies.forEach(async (test: any) => { + it(`${test.Metadata.operationId} - ${test.Metadata.scenario} : Testid - ${test.Metadata.testId}`, async function () { + + if (test.Metadata.scenario === "positive") { + var data; + try { + data = await instance.changeUserPassword( + // changeUserPasswordRequest ChangeUserPasswordRequest + test.Body + ) + } catch (er) { + console.error(er, "Response", data) + expect(er).to.be.undefined + } + } else { + await expect( + instance.changeUserPassword( + // changeUserPasswordRequest ChangeUserPasswordRequest + test.Body + ) + ).to.be.rejectedWith(Error); + } + + }); + }); + }); + + describe('createUser', function() { + + const testReqBodies = requestBodies.filter( + (body: any) => body.Metadata.operationId === "createUser" + ); + testReqBodies.forEach(async (test: any) => { + it(`${test.Metadata.operationId} - ${test.Metadata.scenario} : Testid - ${test.Metadata.testId}`, async function () { + + if (test.Metadata.scenario === "positive") { + var data; + try { + data = await instance.createUser( + // createUserRequest CreateUserRequest + test.Body + ) + } catch (er) { + console.error(er, "Response", data) + expect(er).to.be.undefined + } + } else { + await expect( + instance.createUser( + // createUserRequest CreateUserRequest + test.Body + ) + ).to.be.rejectedWith(Error); + } + + }); + }); + }); + + describe('deactivateUser', function() { + + const testReqBodies = requestBodies.filter( + (body: any) => body.Metadata.operationId === "deactivateUser" + ); + testReqBodies.forEach(async (test: any) => { + it(`${test.Metadata.operationId} - ${test.Metadata.scenario} : Testid - ${test.Metadata.testId}`, async function () { + + if (test.Metadata.scenario === "positive") { + var data; + try { + data = await instance.deactivateUser( + // deactivateUserRequest DeactivateUserRequest + test.Body + ) + } catch (er) { + console.error(er, "Response", data) + expect(er).to.be.undefined + } + } else { + await expect( + instance.deactivateUser( + // deactivateUserRequest DeactivateUserRequest + test.Body + ) + ).to.be.rejectedWith(Error); + } + + }); + }); + }); + + describe('deleteUser', function() { + + const testReqBodies = requestBodies.filter( + (body: any) => body.Metadata.operationId === "deleteUser" + ); + testReqBodies.forEach(async (test: any) => { + it(`${test.Metadata.operationId} - ${test.Metadata.scenario} : Testid - ${test.Metadata.testId}`, async function () { + + if (test.Metadata.scenario === "positive") { + var data; + try { + data = await instance.deleteUser( + // userIdentifier user_identifier + test.Path_Variables.user_identifier + ) + } catch (er) { + console.error(er, "Response", data) + expect(er).to.be.undefined + } + } else { + await expect( + instance.deleteUser( + // userIdentifier user_identifier + test.Path_Variables.user_identifier + ) + ).to.be.rejectedWith(Error); + } + + }); + }); + }); + + describe('forceLogoutUsers', function() { + + const testReqBodies = requestBodies.filter( + (body: any) => body.Metadata.operationId === "forceLogoutUsers" + ); + testReqBodies.forEach(async (test: any) => { + it(`${test.Metadata.operationId} - ${test.Metadata.scenario} : Testid - ${test.Metadata.testId}`, async function () { + + if (test.Metadata.scenario === "positive") { + var data; + try { + data = await instance.forceLogoutUsers( + // forceLogoutUsersRequest ForceLogoutUsersRequest + test.Body + ) + } catch (er) { + console.error(er, "Response", data) + expect(er).to.be.undefined + } + } else { + await expect( + instance.forceLogoutUsers( + // forceLogoutUsersRequest ForceLogoutUsersRequest + test.Body + ) + ).to.be.rejectedWith(Error); + } + + }); + }); + }); + + describe('importUsers', function() { + + const testReqBodies = requestBodies.filter( + (body: any) => body.Metadata.operationId === "importUsers" + ); + testReqBodies.forEach(async (test: any) => { + it(`${test.Metadata.operationId} - ${test.Metadata.scenario} : Testid - ${test.Metadata.testId}`, async function () { + + if (test.Metadata.scenario === "positive") { + var data; + try { + data = await instance.importUsers( + // importUsersRequest ImportUsersRequest + test.Body + ) + } catch (er) { + console.error(er, "Response", data) + expect(er).to.be.undefined + } + } else { + await expect( + instance.importUsers( + // importUsersRequest ImportUsersRequest + test.Body + ) + ).to.be.rejectedWith(Error); + } + + }); + }); + }); + + describe('resetUserPassword', function() { + + const testReqBodies = requestBodies.filter( + (body: any) => body.Metadata.operationId === "resetUserPassword" + ); + testReqBodies.forEach(async (test: any) => { + it(`${test.Metadata.operationId} - ${test.Metadata.scenario} : Testid - ${test.Metadata.testId}`, async function () { + + if (test.Metadata.scenario === "positive") { + var data; + try { + data = await instance.resetUserPassword( + // resetUserPasswordRequest ResetUserPasswordRequest + test.Body + ) + } catch (er) { + console.error(er, "Response", data) + expect(er).to.be.undefined + } + } else { + await expect( + instance.resetUserPassword( + // resetUserPasswordRequest ResetUserPasswordRequest + test.Body + ) + ).to.be.rejectedWith(Error); + } + + }); + }); + }); + + describe('searchUsers', function() { + + const testReqBodies = requestBodies.filter( + (body: any) => body.Metadata.operationId === "searchUsers" + ); + testReqBodies.forEach(async (test: any) => { + it(`${test.Metadata.operationId} - ${test.Metadata.scenario} : Testid - ${test.Metadata.testId}`, async function () { + + if (test.Metadata.scenario === "positive") { + var data; + try { + data = await instance.searchUsers( + // searchUsersRequest SearchUsersRequest + test.Body + ) + } catch (er) { + console.error(er, "Response", data) + expect(er).to.be.undefined + } + } else { + await expect( + instance.searchUsers( + // searchUsersRequest SearchUsersRequest + test.Body + ) + ).to.be.rejectedWith(Error); + } + + }); + }); + }); + + describe('updateUser', function() { + + const testReqBodies = requestBodies.filter( + (body: any) => body.Metadata.operationId === "updateUser" + ); + testReqBodies.forEach(async (test: any) => { + it(`${test.Metadata.operationId} - ${test.Metadata.scenario} : Testid - ${test.Metadata.testId}`, async function () { + + if (test.Metadata.scenario === "positive") { + var data; + try { + data = await instance.updateUser( + // userIdentifier user_identifier + test.Path_Variables.user_identifier , + // updateUserRequest UpdateUserRequest + test.Body + ) + } catch (er) { + console.error(er, "Response", data) + expect(er).to.be.undefined + } + } else { + await expect( + instance.updateUser( + // userIdentifier user_identifier + test.Path_Variables.user_identifier , + // updateUserRequest UpdateUserRequest + test.Body + ) + ).to.be.rejectedWith(Error); + } + + }); + }); + }); +}); diff --git a/sdks/typescript/tests/VariableApiTest.ts b/sdks/typescript/tests/VariableApiTest.ts new file mode 100644 index 000000000..b2363def0 --- /dev/null +++ b/sdks/typescript/tests/VariableApiTest.ts @@ -0,0 +1,256 @@ +import chai from "chai"; +import chaiAsPromised from "chai-as-promised"; +import { createBearerAuthenticationConfig } from "../utils/config"; +import { PromiseVariableApi } from "../types/PromiseAPI"; +import requestBodies from "./testDataUpdated.json"; + +chai.use(chaiAsPromised); +const expect = chai.expect; + + + +const baseUrlFromCli = process.argv.filter(s => s.startsWith("--baseUrl="))?.[0]?.split("=")?.[1] +const BASE_URL = baseUrlFromCli || "http://127.0.0.1:4123" +const config = createBearerAuthenticationConfig(BASE_URL, { + username: "tsadmin", + password: "admin", +}); + + +const instance = new PromiseVariableApi(config); + +describe('VariableApi', function() { + + + describe('createVariable', function() { + + const testReqBodies = requestBodies.filter( + (body: any) => body.Metadata.operationId === "createVariable" + ); + testReqBodies.forEach(async (test: any) => { + it(`${test.Metadata.operationId} - ${test.Metadata.scenario} : Testid - ${test.Metadata.testId}`, async function () { + + if (test.Metadata.scenario === "positive") { + var data; + try { + data = await instance.createVariable( + // createVariableRequest CreateVariableRequest + test.Body + ) + } catch (er) { + console.error(er, "Response", data) + expect(er).to.be.undefined + } + } else { + await expect( + instance.createVariable( + // createVariableRequest CreateVariableRequest + test.Body + ) + ).to.be.rejectedWith(Error); + } + + }); + }); + }); + + describe('deleteVariable', function() { + + const testReqBodies = requestBodies.filter( + (body: any) => body.Metadata.operationId === "deleteVariable" + ); + testReqBodies.forEach(async (test: any) => { + it(`${test.Metadata.operationId} - ${test.Metadata.scenario} : Testid - ${test.Metadata.testId}`, async function () { + + if (test.Metadata.scenario === "positive") { + var data; + try { + data = await instance.deleteVariable( + // identifier identifier + test.Path_Variables.identifier + ) + } catch (er) { + console.error(er, "Response", data) + expect(er).to.be.undefined + } + } else { + await expect( + instance.deleteVariable( + // identifier identifier + test.Path_Variables.identifier + ) + ).to.be.rejectedWith(Error); + } + + }); + }); + }); + + describe('deleteVariables', function() { + + const testReqBodies = requestBodies.filter( + (body: any) => body.Metadata.operationId === "deleteVariables" + ); + testReqBodies.forEach(async (test: any) => { + it(`${test.Metadata.operationId} - ${test.Metadata.scenario} : Testid - ${test.Metadata.testId}`, async function () { + + if (test.Metadata.scenario === "positive") { + var data; + try { + data = await instance.deleteVariables( + // deleteVariablesRequest DeleteVariablesRequest + test.Body + ) + } catch (er) { + console.error(er, "Response", data) + expect(er).to.be.undefined + } + } else { + await expect( + instance.deleteVariables( + // deleteVariablesRequest DeleteVariablesRequest + test.Body + ) + ).to.be.rejectedWith(Error); + } + + }); + }); + }); + + describe('putVariableValues', function() { + + const testReqBodies = requestBodies.filter( + (body: any) => body.Metadata.operationId === "putVariableValues" + ); + testReqBodies.forEach(async (test: any) => { + it(`${test.Metadata.operationId} - ${test.Metadata.scenario} : Testid - ${test.Metadata.testId}`, async function () { + + if (test.Metadata.scenario === "positive") { + var data; + try { + data = await instance.putVariableValues( + // identifier identifier + test.Path_Variables.identifier , + // putVariableValuesRequest PutVariableValuesRequest + test.Body + ) + } catch (er) { + console.error(er, "Response", data) + expect(er).to.be.undefined + } + } else { + await expect( + instance.putVariableValues( + // identifier identifier + test.Path_Variables.identifier , + // putVariableValuesRequest PutVariableValuesRequest + test.Body + ) + ).to.be.rejectedWith(Error); + } + + }); + }); + }); + + describe('searchVariables', function() { + + const testReqBodies = requestBodies.filter( + (body: any) => body.Metadata.operationId === "searchVariables" + ); + testReqBodies.forEach(async (test: any) => { + it(`${test.Metadata.operationId} - ${test.Metadata.scenario} : Testid - ${test.Metadata.testId}`, async function () { + + if (test.Metadata.scenario === "positive") { + var data; + try { + data = await instance.searchVariables( + // searchVariablesRequest SearchVariablesRequest + test.Body + ) + } catch (er) { + console.error(er, "Response", data) + expect(er).to.be.undefined + } + } else { + await expect( + instance.searchVariables( + // searchVariablesRequest SearchVariablesRequest + test.Body + ) + ).to.be.rejectedWith(Error); + } + + }); + }); + }); + + describe('updateVariable', function() { + + const testReqBodies = requestBodies.filter( + (body: any) => body.Metadata.operationId === "updateVariable" + ); + testReqBodies.forEach(async (test: any) => { + it(`${test.Metadata.operationId} - ${test.Metadata.scenario} : Testid - ${test.Metadata.testId}`, async function () { + + if (test.Metadata.scenario === "positive") { + var data; + try { + data = await instance.updateVariable( + // identifier identifier + test.Path_Variables.identifier , + // updateVariableRequest UpdateVariableRequest + test.Body + ) + } catch (er) { + console.error(er, "Response", data) + expect(er).to.be.undefined + } + } else { + await expect( + instance.updateVariable( + // identifier identifier + test.Path_Variables.identifier , + // updateVariableRequest UpdateVariableRequest + test.Body + ) + ).to.be.rejectedWith(Error); + } + + }); + }); + }); + + describe('updateVariableValues', function() { + + const testReqBodies = requestBodies.filter( + (body: any) => body.Metadata.operationId === "updateVariableValues" + ); + testReqBodies.forEach(async (test: any) => { + it(`${test.Metadata.operationId} - ${test.Metadata.scenario} : Testid - ${test.Metadata.testId}`, async function () { + + if (test.Metadata.scenario === "positive") { + var data; + try { + data = await instance.updateVariableValues( + // updateVariableValuesRequest UpdateVariableValuesRequest + test.Body + ) + } catch (er) { + console.error(er, "Response", data) + expect(er).to.be.undefined + } + } else { + await expect( + instance.updateVariableValues( + // updateVariableValuesRequest UpdateVariableValuesRequest + test.Body + ) + ).to.be.rejectedWith(Error); + } + + }); + }); + }); +}); diff --git a/sdks/typescript/tests/VersionControlApiTest.ts b/sdks/typescript/tests/VersionControlApiTest.ts new file mode 100644 index 000000000..ba2002e97 --- /dev/null +++ b/sdks/typescript/tests/VersionControlApiTest.ts @@ -0,0 +1,316 @@ +import chai from "chai"; +import chaiAsPromised from "chai-as-promised"; +import { createBearerAuthenticationConfig } from "../utils/config"; +import { PromiseVersionControlApi } from "../types/PromiseAPI"; +import requestBodies from "./testDataUpdated.json"; + +chai.use(chaiAsPromised); +const expect = chai.expect; + + + +const baseUrlFromCli = process.argv.filter(s => s.startsWith("--baseUrl="))?.[0]?.split("=")?.[1] +const BASE_URL = baseUrlFromCli || "http://127.0.0.1:4123" +const config = createBearerAuthenticationConfig(BASE_URL, { + username: "tsadmin", + password: "admin", +}); + + +const instance = new PromiseVersionControlApi(config); + +describe('VersionControlApi', function() { + + + describe('commitBranch', function() { + + const testReqBodies = requestBodies.filter( + (body: any) => body.Metadata.operationId === "commitBranch" + ); + testReqBodies.forEach(async (test: any) => { + it(`${test.Metadata.operationId} - ${test.Metadata.scenario} : Testid - ${test.Metadata.testId}`, async function () { + + if (test.Metadata.scenario === "positive") { + var data; + try { + data = await instance.commitBranch( + // commitBranchRequest CommitBranchRequest + test.Body + ) + } catch (er) { + console.error(er, "Response", data) + expect(er).to.be.undefined + } + } else { + await expect( + instance.commitBranch( + // commitBranchRequest CommitBranchRequest + test.Body + ) + ).to.be.rejectedWith(Error); + } + + }); + }); + }); + + describe('createConfig', function() { + + const testReqBodies = requestBodies.filter( + (body: any) => body.Metadata.operationId === "createConfig" + ); + testReqBodies.forEach(async (test: any) => { + it(`${test.Metadata.operationId} - ${test.Metadata.scenario} : Testid - ${test.Metadata.testId}`, async function () { + + if (test.Metadata.scenario === "positive") { + var data; + try { + data = await instance.createConfig( + // createConfigRequest CreateConfigRequest + test.Body + ) + } catch (er) { + console.error(er, "Response", data) + expect(er).to.be.undefined + } + } else { + await expect( + instance.createConfig( + // createConfigRequest CreateConfigRequest + test.Body + ) + ).to.be.rejectedWith(Error); + } + + }); + }); + }); + + describe('deleteConfig', function() { + + const testReqBodies = requestBodies.filter( + (body: any) => body.Metadata.operationId === "deleteConfig" + ); + testReqBodies.forEach(async (test: any) => { + it(`${test.Metadata.operationId} - ${test.Metadata.scenario} : Testid - ${test.Metadata.testId}`, async function () { + + if (test.Metadata.scenario === "positive") { + var data; + try { + data = await instance.deleteConfig( + // deleteConfigRequest DeleteConfigRequest + test.Body + ) + } catch (er) { + console.error(er, "Response", data) + expect(er).to.be.undefined + } + } else { + await expect( + instance.deleteConfig( + // deleteConfigRequest DeleteConfigRequest + test.Body + ) + ).to.be.rejectedWith(Error); + } + + }); + }); + }); + + describe('deployCommit', function() { + + const testReqBodies = requestBodies.filter( + (body: any) => body.Metadata.operationId === "deployCommit" + ); + testReqBodies.forEach(async (test: any) => { + it(`${test.Metadata.operationId} - ${test.Metadata.scenario} : Testid - ${test.Metadata.testId}`, async function () { + + if (test.Metadata.scenario === "positive") { + var data; + try { + data = await instance.deployCommit( + // deployCommitRequest DeployCommitRequest + test.Body + ) + } catch (er) { + console.error(er, "Response", data) + expect(er).to.be.undefined + } + } else { + await expect( + instance.deployCommit( + // deployCommitRequest DeployCommitRequest + test.Body + ) + ).to.be.rejectedWith(Error); + } + + }); + }); + }); + + describe('revertCommit', function() { + + const testReqBodies = requestBodies.filter( + (body: any) => body.Metadata.operationId === "revertCommit" + ); + testReqBodies.forEach(async (test: any) => { + it(`${test.Metadata.operationId} - ${test.Metadata.scenario} : Testid - ${test.Metadata.testId}`, async function () { + + if (test.Metadata.scenario === "positive") { + var data; + try { + data = await instance.revertCommit( + // commitId commit_id + test.Path_Variables.commit_id , + // revertCommitRequest RevertCommitRequest + test.Body + ) + } catch (er) { + console.error(er, "Response", data) + expect(er).to.be.undefined + } + } else { + await expect( + instance.revertCommit( + // commitId commit_id + test.Path_Variables.commit_id , + // revertCommitRequest RevertCommitRequest + test.Body + ) + ).to.be.rejectedWith(Error); + } + + }); + }); + }); + + describe('searchCommits', function() { + + const testReqBodies = requestBodies.filter( + (body: any) => body.Metadata.operationId === "searchCommits" + ); + testReqBodies.forEach(async (test: any) => { + it(`${test.Metadata.operationId} - ${test.Metadata.scenario} : Testid - ${test.Metadata.testId}`, async function () { + + if (test.Metadata.scenario === "positive") { + var data; + try { + data = await instance.searchCommits( + // searchCommitsRequest SearchCommitsRequest + test.Body + ) + } catch (er) { + console.error(er, "Response", data) + expect(er).to.be.undefined + } + } else { + await expect( + instance.searchCommits( + // searchCommitsRequest SearchCommitsRequest + test.Body + ) + ).to.be.rejectedWith(Error); + } + + }); + }); + }); + + describe('searchConfig', function() { + + const testReqBodies = requestBodies.filter( + (body: any) => body.Metadata.operationId === "searchConfig" + ); + testReqBodies.forEach(async (test: any) => { + it(`${test.Metadata.operationId} - ${test.Metadata.scenario} : Testid - ${test.Metadata.testId}`, async function () { + + if (test.Metadata.scenario === "positive") { + var data; + try { + data = await instance.searchConfig( + // searchConfigRequest SearchConfigRequest + test.Body + ) + } catch (er) { + console.error(er, "Response", data) + expect(er).to.be.undefined + } + } else { + await expect( + instance.searchConfig( + // searchConfigRequest SearchConfigRequest + test.Body + ) + ).to.be.rejectedWith(Error); + } + + }); + }); + }); + + describe('updateConfig', function() { + + const testReqBodies = requestBodies.filter( + (body: any) => body.Metadata.operationId === "updateConfig" + ); + testReqBodies.forEach(async (test: any) => { + it(`${test.Metadata.operationId} - ${test.Metadata.scenario} : Testid - ${test.Metadata.testId}`, async function () { + + if (test.Metadata.scenario === "positive") { + var data; + try { + data = await instance.updateConfig( + // updateConfigRequest UpdateConfigRequest + test.Body + ) + } catch (er) { + console.error(er, "Response", data) + expect(er).to.be.undefined + } + } else { + await expect( + instance.updateConfig( + // updateConfigRequest UpdateConfigRequest + test.Body + ) + ).to.be.rejectedWith(Error); + } + + }); + }); + }); + + describe('validateMerge', function() { + + const testReqBodies = requestBodies.filter( + (body: any) => body.Metadata.operationId === "validateMerge" + ); + testReqBodies.forEach(async (test: any) => { + it(`${test.Metadata.operationId} - ${test.Metadata.scenario} : Testid - ${test.Metadata.testId}`, async function () { + + if (test.Metadata.scenario === "positive") { + var data; + try { + data = await instance.validateMerge( + // validateMergeRequest ValidateMergeRequest + test.Body + ) + } catch (er) { + console.error(er, "Response", data) + expect(er).to.be.undefined + } + } else { + await expect( + instance.validateMerge( + // validateMergeRequest ValidateMergeRequest + test.Body + ) + ).to.be.rejectedWith(Error); + } + + }); + }); + }); +}); diff --git a/sdks/typescript/tests/WebhooksApiTest.ts b/sdks/typescript/tests/WebhooksApiTest.ts new file mode 100644 index 000000000..d575f46f6 --- /dev/null +++ b/sdks/typescript/tests/WebhooksApiTest.ts @@ -0,0 +1,156 @@ +import chai from "chai"; +import chaiAsPromised from "chai-as-promised"; +import { createBearerAuthenticationConfig } from "../utils/config"; +import { PromiseWebhooksApi } from "../types/PromiseAPI"; +import requestBodies from "./testDataUpdated.json"; + +chai.use(chaiAsPromised); +const expect = chai.expect; + + + +const baseUrlFromCli = process.argv.filter(s => s.startsWith("--baseUrl="))?.[0]?.split("=")?.[1] +const BASE_URL = baseUrlFromCli || "http://127.0.0.1:4123" +const config = createBearerAuthenticationConfig(BASE_URL, { + username: "tsadmin", + password: "admin", +}); + + +const instance = new PromiseWebhooksApi(config); + +describe('WebhooksApi', function() { + + + describe('createWebhookConfiguration', function() { + + const testReqBodies = requestBodies.filter( + (body: any) => body.Metadata.operationId === "createWebhookConfiguration" + ); + testReqBodies.forEach(async (test: any) => { + it(`${test.Metadata.operationId} - ${test.Metadata.scenario} : Testid - ${test.Metadata.testId}`, async function () { + + if (test.Metadata.scenario === "positive") { + var data; + try { + data = await instance.createWebhookConfiguration( + // createWebhookConfigurationRequest CreateWebhookConfigurationRequest + test.Body + ) + } catch (er) { + console.error(er, "Response", data) + expect(er).to.be.undefined + } + } else { + await expect( + instance.createWebhookConfiguration( + // createWebhookConfigurationRequest CreateWebhookConfigurationRequest + test.Body + ) + ).to.be.rejectedWith(Error); + } + + }); + }); + }); + + describe('deleteWebhookConfigurations', function() { + + const testReqBodies = requestBodies.filter( + (body: any) => body.Metadata.operationId === "deleteWebhookConfigurations" + ); + testReqBodies.forEach(async (test: any) => { + it(`${test.Metadata.operationId} - ${test.Metadata.scenario} : Testid - ${test.Metadata.testId}`, async function () { + + if (test.Metadata.scenario === "positive") { + var data; + try { + data = await instance.deleteWebhookConfigurations( + // deleteWebhookConfigurationsRequest DeleteWebhookConfigurationsRequest + test.Body + ) + } catch (er) { + console.error(er, "Response", data) + expect(er).to.be.undefined + } + } else { + await expect( + instance.deleteWebhookConfigurations( + // deleteWebhookConfigurationsRequest DeleteWebhookConfigurationsRequest + test.Body + ) + ).to.be.rejectedWith(Error); + } + + }); + }); + }); + + describe('searchWebhookConfigurations', function() { + + const testReqBodies = requestBodies.filter( + (body: any) => body.Metadata.operationId === "searchWebhookConfigurations" + ); + testReqBodies.forEach(async (test: any) => { + it(`${test.Metadata.operationId} - ${test.Metadata.scenario} : Testid - ${test.Metadata.testId}`, async function () { + + if (test.Metadata.scenario === "positive") { + var data; + try { + data = await instance.searchWebhookConfigurations( + // searchWebhookConfigurationsRequest SearchWebhookConfigurationsRequest + test.Body + ) + } catch (er) { + console.error(er, "Response", data) + expect(er).to.be.undefined + } + } else { + await expect( + instance.searchWebhookConfigurations( + // searchWebhookConfigurationsRequest SearchWebhookConfigurationsRequest + test.Body + ) + ).to.be.rejectedWith(Error); + } + + }); + }); + }); + + describe('updateWebhookConfiguration', function() { + + const testReqBodies = requestBodies.filter( + (body: any) => body.Metadata.operationId === "updateWebhookConfiguration" + ); + testReqBodies.forEach(async (test: any) => { + it(`${test.Metadata.operationId} - ${test.Metadata.scenario} : Testid - ${test.Metadata.testId}`, async function () { + + if (test.Metadata.scenario === "positive") { + var data; + try { + data = await instance.updateWebhookConfiguration( + // webhookIdentifier webhook_identifier + test.Path_Variables.webhook_identifier , + // updateWebhookConfigurationRequest UpdateWebhookConfigurationRequest + test.Body + ) + } catch (er) { + console.error(er, "Response", data) + expect(er).to.be.undefined + } + } else { + await expect( + instance.updateWebhookConfiguration( + // webhookIdentifier webhook_identifier + test.Path_Variables.webhook_identifier , + // updateWebhookConfigurationRequest UpdateWebhookConfigurationRequest + test.Body + ) + ).to.be.rejectedWith(Error); + } + + }); + }); + }); +}); diff --git a/sdks/typescript/tests/testDataUpdated.json b/sdks/typescript/tests/testDataUpdated.json new file mode 100644 index 000000000..54e04cc53 --- /dev/null +++ b/sdks/typescript/tests/testDataUpdated.json @@ -0,0 +1,66888 @@ +[ + { + "Metadata": { + "path": "/api/rest/2.0/auth/session/login", + "operationId": "login", + "scenario": "positive", + "type": "MANUAL", + "testId": 0 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": {} + }, + { + "Metadata": { + "path": "/api/rest/2.0/auth/session/login", + "operationId": "login", + "scenario": "negative", + "type": "MANUAL", + "testId": 1 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "username": "hgfhg" + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/auth/token/object", + "operationId": "getObjectAccessToken", + "scenario": "positive", + "type": "MANUAL", + "testId": 2 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "username": "tsadmin", + "object_id": "061457a2-27bc-43a9-9754-0cd873691bf0", + "password": "admin" + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/auth/token/full", + "operationId": "getFullAccessToken", + "scenario": "positive", + "type": "MANUAL", + "testId": 3 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "username": "tsadmin", + "password": "admin" + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/auth/token/full", + "operationId": "getFullAccessToken", + "scenario": "negative", + "type": "MANUAL", + "testId": 4 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "username": "", + "password": "admin" + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/auth/token/full", + "operationId": "getFullAccessToken", + "scenario": "negative", + "type": "MANUAL", + "testId": 5 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "username": "tsadmin", + "password": "" + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/auth/token/full", + "operationId": "getFullAccessToken", + "scenario": "negative", + "type": "MANUAL", + "testId": 6 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "username": "", + "password": "" + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/auth/token/full", + "operationId": "getFullAccessToken", + "scenario": "negative", + "type": "MANUAL", + "testId": 7 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "username": "tsin", + "password": "admin" + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/auth/token/full", + "operationId": "getFullAccessToken", + "scenario": "negative", + "type": "MANUAL", + "testId": 8 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "username": "tsadmin", + "password": "adn" + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/auth/session/logout", + "operationId": "logout", + "scenario": "positive", + "type": "MANUAL", + "testId": 9 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": {} + }, + { + "Metadata": { + "path": "/api/rest/2.0/auth/session/logout", + "operationId": "logout", + "scenario": "negative", + "type": "MANUAL", + "testId": 10 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": {} + }, + { + "Metadata": { + "path": "/api/rest/2.0/auth/token/revoke", + "operationId": "revokeToken", + "scenario": "positive", + "type": "MANUAL", + "testId": 11 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "user_identifier": "tsadmin" + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/auth/token/revoke", + "operationId": "revokeToken", + "scenario": "negative", + "type": "MANUAL", + "testId": 12 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "user_identifier": "", + "token": "dHNhZG1pbjpKSE5vYVhKdk1TUlRTRUV0TWpVMkpEVXdNREF3TUNSTWVtVlNXSGd3TWpadVQzUnRXU3NyU1doU1dWaDNQVDBrWW5keUsyTkhkbmhKUzNwRVRpdHVLM1UxVlhSVlFuRlNZa2t2U1dWbmJXZHNSMDVFYW1SWEswYzBRVDA=" + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/auth/token/revoke", + "operationId": "revokeToken", + "scenario": "negative", + "type": "MANUAL", + "testId": 13 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "user_identifier": "tsadmin", + "token": "" + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/auth/token/revoke", + "operationId": "revokeToken", + "scenario": "negative", + "type": "MANUAL", + "testId": 14 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "user_identifier": "", + "token": "" + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/auth/token/revoke", + "operationId": "revokeToken", + "scenario": "negative", + "type": "MANUAL", + "testId": 15 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "user_identifier": "ts", + "token": "ghfgjkhljdtfygukhugchfjgkhl" + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/auth/token/revoke", + "operationId": "revokeToken", + "scenario": "negative", + "type": "MANUAL", + "testId": 16 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "user_identifier": "", + "token": "dHNhZG1pbjpKSE5vYVhKdk1TUlRTRUV0TWpVMkpEVXdNREF3TUNSTWVtVlNXSGd3TWpadVQzUnRXU3NyU1doU1dWaDNQVDBrWW5keUsyTkhkbmhKUzNwRVRpdHVLM1UxVlhSVlFuRlNZa2t2U1dWbmJXZHNSMDVFYW1SWEswYzBRVDA=" + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/system/config-update", + "operationId": "updateSystemConfig", + "scenario": "positive", + "type": "MANUAL", + "testId": 17 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "configuration": {} + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/system/config-update", + "operationId": "updateSystemConfig", + "scenario": "negative", + "type": "MANUAL", + "testId": 18 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": {} + }, + { + "Metadata": { + "path": "/api/rest/2.0/users/create", + "operationId": "createUser", + "scenario": "positive", + "type": "MANUAL", + "testId": 19 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "name": "abcdef", + "display_name": "abcdef_abcdef", + "password": "Thoughtspot@2023", + "email": "abcde@thoughtspot.com" + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/users/create", + "operationId": "createUser", + "scenario": "positive", + "type": "MANUAL", + "testId": 20 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "name": "test1", + "display_name": "test1_test1", + "password": "Thoughtspot@2023", + "email": "test1@thoughtspot.com" + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/users/create", + "operationId": "createUser", + "scenario": "positive", + "type": "MANUAL", + "testId": 21 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "name": "test2", + "display_name": "test2_test2", + "password": "Thoughtspot@2023", + "email": "test2@thoughtspot.com" + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/users/create", + "operationId": "createUser", + "scenario": "positive", + "type": "MANUAL", + "testId": 22 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "name": "test3", + "display_name": "test3_test3", + "password": "Thoughtspot@2023", + "email": "test3@thoughtspot.com" + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/users/create", + "operationId": "createUser", + "scenario": "positive", + "type": "MANUAL", + "testId": 23 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "name": "test4", + "display_name": "test4_test4", + "password": "Thoughtspot@2023", + "email": "test4@thoughtspot.com" + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/users/create", + "operationId": "createUser", + "scenario": "positive", + "type": "MANUAL", + "testId": 24 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "name": "test5", + "display_name": "test5_test5", + "password": "Thoughtspot@2023", + "email": "test5@thoughtspot.com" + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/users/create", + "operationId": "createUser", + "scenario": "negative", + "type": "MANUAL", + "testId": 25 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "name": "", + "display_name": "abcdefabcdef", + "password": "Thoughtspot@2023", + "email": "abcde@thoughtspot.com" + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/users/create", + "operationId": "createUser", + "scenario": "negative", + "type": "MANUAL", + "testId": 26 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "name": "abc1", + "display_name": "", + "password": "Thoughtspot@2023", + "email": "abcde@thoughtspot.com" + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/users/create", + "operationId": "createUser", + "scenario": "negative", + "type": "MANUAL", + "testId": 27 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "name": "abc2", + "display_name": "abc2abc2", + "password": "", + "email": "abcde@thoughtspot.com" + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/users/create", + "operationId": "createUser", + "scenario": "negative", + "type": "MANUAL", + "testId": 28 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "name": "abc3", + "display_name": "abc3abc3", + "password": "Thoughtspot@2023", + "email": "" + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/users/create", + "operationId": "createUser", + "scenario": "negative", + "type": "MANUAL", + "testId": 29 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "name": "", + "display_name": "", + "password": "", + "email": "" + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/users/{user_identifier}/update", + "operationId": "updateUser", + "scenario": "positive", + "type": "MANUAL", + "testId": 30 + }, + "Path_Variables": { + "user_identifier": "abcdef" + }, + "Query_Variables": {}, + "Body": {} + }, + { + "Metadata": { + "path": "/api/rest/2.0/users/{user_identifier}/update", + "operationId": "updateUser", + "scenario": "positive", + "type": "MANUAL", + "testId": 31 + }, + "Path_Variables": { + "user_identifier": "test1" + }, + "Query_Variables": {}, + "Body": {} + }, + { + "Metadata": { + "path": "/api/rest/2.0/users/{user_identifier}/update", + "operationId": "updateUser", + "scenario": "positive", + "type": "MANUAL", + "testId": 32 + }, + "Path_Variables": { + "user_identifier": "test2" + }, + "Query_Variables": {}, + "Body": {} + }, + { + "Metadata": { + "path": "/api/rest/2.0/users/{user_identifier}/update", + "operationId": "updateUser", + "scenario": "positive", + "type": "MANUAL", + "testId": 33 + }, + "Path_Variables": { + "user_identifier": "test3" + }, + "Query_Variables": {}, + "Body": {} + }, + { + "Metadata": { + "path": "/api/rest/2.0/users/{user_identifier}/update", + "operationId": "updateUser", + "scenario": "positive", + "type": "MANUAL", + "testId": 34 + }, + "Path_Variables": { + "user_identifier": "test4" + }, + "Query_Variables": {}, + "Body": {} + }, + { + "Metadata": { + "path": "/api/rest/2.0/users/{user_identifier}/update", + "operationId": "updateUser", + "scenario": "positive", + "type": "MANUAL", + "testId": 35 + }, + "Path_Variables": { + "user_identifier": "test5" + }, + "Query_Variables": {}, + "Body": {} + }, + { + "Metadata": { + "path": "/api/rest/2.0/users/{user_identifier}/update", + "operationId": "updateUser", + "scenario": "negative", + "type": "MANUAL", + "testId": 36 + }, + "Path_Variables": { + "user_identifier": 34 + }, + "Query_Variables": {}, + "Body": {} + }, + { + "Metadata": { + "path": "/api/rest/2.0/users/{user_identifier}/update", + "operationId": "updateUser", + "scenario": "negative", + "type": "MANUAL", + "testId": 37 + }, + "Path_Variables": { + "user_identifier": "random" + }, + "Query_Variables": {}, + "Body": {} + }, + { + "Metadata": { + "path": "/api/rest/2.0/users/{user_identifier}/update", + "operationId": "updateUser", + "scenario": "negative", + "type": "MANUAL", + "testId": 38 + }, + "Path_Variables": { + "user_identifier": "" + }, + "Query_Variables": {}, + "Body": {} + }, + { + "Metadata": { + "path": "/api/rest/2.0/users/change-password", + "operationId": "changeUserPassword", + "scenario": "positive", + "type": "MANUAL", + "testId": 39 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "current_password": "Thoughtspot@2023", + "new_password": "THOUGHTspot_testing", + "user_identifier": "abcdef" + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/users/change-password", + "operationId": "changeUserPassword", + "scenario": "positive", + "type": "MANUAL", + "testId": 40 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "current_password": "Thoughtspot@2023", + "new_password": "THOUGHTspot_testing", + "user_identifier": "test1" + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/users/change-password", + "operationId": "changeUserPassword", + "scenario": "positive", + "type": "MANUAL", + "testId": 41 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "current_password": "Thoughtspot@2023", + "new_password": "THOUGHTspot_testing", + "user_identifier": "test2" + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/users/change-password", + "operationId": "changeUserPassword", + "scenario": "positive", + "type": "MANUAL", + "testId": 42 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "current_password": "Thoughtspot@2023", + "new_password": "THOUGHTspot_testing", + "user_identifier": "test3" + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/users/change-password", + "operationId": "changeUserPassword", + "scenario": "positive", + "type": "MANUAL", + "testId": 43 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "current_password": "Thoughtspot@2023", + "new_password": "THOUGHTspot_testing", + "user_identifier": "test4" + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/users/change-password", + "operationId": "changeUserPassword", + "scenario": "positive", + "type": "MANUAL", + "testId": 44 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "current_password": "Thoughtspot@2023", + "new_password": "THOUGHTspot_testing", + "user_identifier": "test5" + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/users/change-password", + "operationId": "changeUserPassword", + "scenario": "negative", + "type": "MANUAL", + "testId": 45 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "current_password": "Thoughtspot@2023", + "new_password": "THOUGHTspot_testing", + "user_identifier": "" + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/users/change-password", + "operationId": "changeUserPassword", + "scenario": "negative", + "type": "MANUAL", + "testId": 46 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "current_password": "Thoughtspot@2023", + "new_password": "", + "user_identifier": "test1" + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/users/change-password", + "operationId": "changeUserPassword", + "scenario": "negative", + "type": "MANUAL", + "testId": 47 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "current_password": "", + "new_password": "THOUGHTspot_testing", + "user_identifier": "test2" + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/users/change-password", + "operationId": "changeUserPassword", + "scenario": "negative", + "type": "MANUAL", + "testId": 48 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "current_password": "", + "new_password": "", + "user_identifier": "test3" + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/users/change-password", + "operationId": "changeUserPassword", + "scenario": "negative", + "type": "MANUAL", + "testId": 49 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "current_password": "", + "new_password": "THOUGHTspot_testing", + "user_identifier": "" + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/users/change-password", + "operationId": "changeUserPassword", + "scenario": "negative", + "type": "MANUAL", + "testId": 50 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "current_password": "Thoughtspot@2023", + "new_password": "", + "user_identifier": "" + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/users/search", + "operationId": "searchUsers", + "scenario": "positive", + "type": "MANUAL", + "testId": 51 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": {} + }, + { + "Metadata": { + "path": "/api/rest/2.0/orgs/create", + "operationId": "createOrg", + "scenario": "positive", + "type": "MANUAL", + "testId": 52 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "name": "test_org" + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/orgs/create", + "operationId": "createOrg", + "scenario": "positive", + "type": "MANUAL", + "testId": 53 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "name": "test1_org" + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/orgs/create", + "operationId": "createOrg", + "scenario": "positive", + "type": "MANUAL", + "testId": 54 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "name": "test2_org" + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/orgs/create", + "operationId": "createOrg", + "scenario": "positive", + "type": "MANUAL", + "testId": 55 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "name": "test3_org" + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/orgs/create", + "operationId": "createOrg", + "scenario": "positive", + "type": "MANUAL", + "testId": 56 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "name": "test4_org" + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/orgs/create", + "operationId": "createOrg", + "scenario": "positive", + "type": "MANUAL", + "testId": 57 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "name": "test5_org" + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/orgs/create", + "operationId": "createOrg", + "scenario": "negative", + "type": "MANUAL", + "testId": 58 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "name": {} + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/orgs/create", + "operationId": "createOrg", + "scenario": "negative", + "type": "MANUAL", + "testId": 59 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "name": [] + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/orgs/{org_identifier}/update", + "operationId": "updateOrg", + "scenario": "positive", + "type": "MANUAL", + "testId": 60 + }, + "Path_Variables": { + "org_identifier": "test_org" + }, + "Query_Variables": {}, + "Body": {} + }, + { + "Metadata": { + "path": "/api/rest/2.0/orgs/{org_identifier}/update", + "operationId": "updateOrg", + "scenario": "positive", + "type": "MANUAL", + "testId": 61 + }, + "Path_Variables": { + "org_identifier": "test1_org" + }, + "Query_Variables": {}, + "Body": {} + }, + { + "Metadata": { + "path": "/api/rest/2.0/orgs/{org_identifier}/update", + "operationId": "updateOrg", + "scenario": "positive", + "type": "MANUAL", + "testId": 62 + }, + "Path_Variables": { + "org_identifier": "test2_org" + }, + "Query_Variables": {}, + "Body": {} + }, + { + "Metadata": { + "path": "/api/rest/2.0/orgs/{org_identifier}/update", + "operationId": "updateOrg", + "scenario": "positive", + "type": "MANUAL", + "testId": 63 + }, + "Path_Variables": { + "org_identifier": "test3_org" + }, + "Query_Variables": {}, + "Body": {} + }, + { + "Metadata": { + "path": "/api/rest/2.0/orgs/{org_identifier}/update", + "operationId": "updateOrg", + "scenario": "positive", + "type": "MANUAL", + "testId": 64 + }, + "Path_Variables": { + "org_identifier": "test4_org" + }, + "Query_Variables": {}, + "Body": {} + }, + { + "Metadata": { + "path": "/api/rest/2.0/orgs/{org_identifier}/update", + "operationId": "updateOrg", + "scenario": "positive", + "type": "MANUAL", + "testId": 65 + }, + "Path_Variables": { + "org_identifier": "test5_org" + }, + "Query_Variables": {}, + "Body": {} + }, + { + "Metadata": { + "path": "/api/rest/2.0/orgs/{org_identifier}/update", + "operationId": "updateOrg", + "scenario": "negative", + "type": "MANUAL", + "testId": 66 + }, + "Path_Variables": { + "org_identifier": "tesrg" + }, + "Query_Variables": {}, + "Body": {} + }, + { + "Metadata": { + "path": "/api/rest/2.0/orgs/{org_identifier}/update", + "operationId": "updateOrg", + "scenario": "negative", + "type": "MANUAL", + "testId": 67 + }, + "Path_Variables": { + "org_identifier": "" + }, + "Query_Variables": {}, + "Body": {} + }, + { + "Metadata": { + "path": "/api/rest/2.0/orgs/{org_identifier}/update", + "operationId": "updateOrg", + "scenario": "negative", + "type": "MANUAL", + "testId": 68 + }, + "Path_Variables": { + "org_identifier": "tt2_org" + }, + "Query_Variables": {}, + "Body": {} + }, + { + "Metadata": { + "path": "/api/rest/2.0/orgs/{org_identifier}/update", + "operationId": "updateOrg", + "scenario": "negative", + "type": "MANUAL", + "testId": 69 + }, + "Path_Variables": { + "org_identifier": "tst3_org" + }, + "Query_Variables": {}, + "Body": {} + }, + { + "Metadata": { + "path": "/api/rest/2.0/orgs/{org_identifier}/update", + "operationId": "updateOrg", + "scenario": "negative", + "type": "MANUAL", + "testId": 70 + }, + "Path_Variables": { + "org_identifier": "test4_og" + }, + "Query_Variables": {}, + "Body": {} + }, + { + "Metadata": { + "path": "/api/rest/2.0/orgs/{org_identifier}/update", + "operationId": "updateOrg", + "scenario": "negative", + "type": "MANUAL", + "testId": 71 + }, + "Path_Variables": { + "org_identifier": "tet5_org" + }, + "Query_Variables": {}, + "Body": {} + }, + { + "Metadata": { + "path": "/api/rest/2.0/orgs/search", + "operationId": "searchOrgs", + "scenario": "positive", + "type": "MANUAL", + "testId": 72 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": {} + }, + { + "Metadata": { + "path": "/api/rest/2.0/tags/create", + "operationId": "createTag", + "scenario": "positive", + "type": "MANUAL", + "testId": 73 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "name": "test6", + "color": "#342323" + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/tags/create", + "operationId": "createTag", + "scenario": "positive", + "type": "MANUAL", + "testId": 74 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "name": "test1", + "color": "#342323" + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/tags/create", + "operationId": "createTag", + "scenario": "positive", + "type": "MANUAL", + "testId": 75 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "name": "test2", + "color": "#342323" + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/tags/create", + "operationId": "createTag", + "scenario": "positive", + "type": "MANUAL", + "testId": 76 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "name": "test3", + "color": "#342323" + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/tags/create", + "operationId": "createTag", + "scenario": "positive", + "type": "MANUAL", + "testId": 77 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "name": "test4", + "color": "#342323" + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/tags/create", + "operationId": "createTag", + "scenario": "positive", + "type": "MANUAL", + "testId": 78 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "name": "test5", + "color": "#342323" + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/tags/create", + "operationId": "createTag", + "scenario": "negative", + "type": "MANUAL", + "testId": 79 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "name": "", + "color": "#342323" + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/tags/create", + "operationId": "createTag", + "scenario": "negative", + "type": "MANUAL", + "testId": 80 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "name": "test1", + "color": "" + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/tags/create", + "operationId": "createTag", + "scenario": "negative", + "type": "MANUAL", + "testId": 81 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "name": "", + "color": "" + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/tags/create", + "operationId": "createTag", + "scenario": "negative", + "type": "MANUAL", + "testId": 82 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "name": "tt3", + "color": "#342323" + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/tags/create", + "operationId": "createTag", + "scenario": "negative", + "type": "MANUAL", + "testId": 83 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "name": "test4", + "color": "2323" + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/tags/create", + "operationId": "createTag", + "scenario": "negative", + "type": "MANUAL", + "testId": 84 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "name": "test5", + "color": "34223" + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/tags/{tag_identifier}/update", + "operationId": "updateTag", + "scenario": "positive", + "type": "MANUAL", + "testId": 85 + }, + "Path_Variables": { + "tag_identifier": "test6" + }, + "Query_Variables": {}, + "Body": {} + }, + { + "Metadata": { + "path": "/api/rest/2.0/tags/{tag_identifier}/update", + "operationId": "updateTag", + "scenario": "positive", + "type": "MANUAL", + "testId": 86 + }, + "Path_Variables": { + "tag_identifier": "test1" + }, + "Query_Variables": {}, + "Body": {} + }, + { + "Metadata": { + "path": "/api/rest/2.0/tags/{tag_identifier}/update", + "operationId": "updateTag", + "scenario": "positive", + "type": "MANUAL", + "testId": 87 + }, + "Path_Variables": { + "tag_identifier": "test2" + }, + "Query_Variables": {}, + "Body": {} + }, + { + "Metadata": { + "path": "/api/rest/2.0/tags/{tag_identifier}/update", + "operationId": "updateTag", + "scenario": "positive", + "type": "MANUAL", + "testId": 88 + }, + "Path_Variables": { + "tag_identifier": "test3" + }, + "Query_Variables": {}, + "Body": {} + }, + { + "Metadata": { + "path": "/api/rest/2.0/tags/{tag_identifier}/update", + "operationId": "updateTag", + "scenario": "positive", + "type": "MANUAL", + "testId": 89 + }, + "Path_Variables": { + "tag_identifier": "test4" + }, + "Query_Variables": {}, + "Body": {} + }, + { + "Metadata": { + "path": "/api/rest/2.0/tags/{tag_identifier}/update", + "operationId": "updateTag", + "scenario": "positive", + "type": "MANUAL", + "testId": 90 + }, + "Path_Variables": { + "tag_identifier": "test5" + }, + "Query_Variables": {}, + "Body": {} + }, + { + "Metadata": { + "path": "/api/rest/2.0/tags/{tag_identifier}/update", + "operationId": "updateTag", + "scenario": "negative", + "type": "MANUAL", + "testId": 91 + }, + "Path_Variables": { + "tag_identifier": "tst6" + }, + "Query_Variables": {}, + "Body": {} + }, + { + "Metadata": { + "path": "/api/rest/2.0/tags/{tag_identifier}/update", + "operationId": "updateTag", + "scenario": "negative", + "type": "MANUAL", + "testId": 92 + }, + "Path_Variables": { + "tag_identifier": "" + }, + "Query_Variables": {}, + "Body": {} + }, + { + "Metadata": { + "path": "/api/rest/2.0/tags/{tag_identifier}/update", + "operationId": "updateTag", + "scenario": "negative", + "type": "MANUAL", + "testId": 93 + }, + "Path_Variables": { + "tag_identifier": "tet2" + }, + "Query_Variables": {}, + "Body": {} + }, + { + "Metadata": { + "path": "/api/rest/2.0/tags/{tag_identifier}/update", + "operationId": "updateTag", + "scenario": "negative", + "type": "MANUAL", + "testId": 94 + }, + "Path_Variables": { + "tag_identifier": "tt3" + }, + "Query_Variables": {}, + "Body": {} + }, + { + "Metadata": { + "path": "/api/rest/2.0/tags/{tag_identifier}/update", + "operationId": "updateTag", + "scenario": "negative", + "type": "MANUAL", + "testId": 95 + }, + "Path_Variables": { + "tag_identifier": "t" + }, + "Query_Variables": {}, + "Body": {} + }, + { + "Metadata": { + "path": "/api/rest/2.0/tags/{tag_identifier}/update", + "operationId": "updateTag", + "scenario": "negative", + "type": "MANUAL", + "testId": 96 + }, + "Path_Variables": { + "tag_identifier": "t5" + }, + "Query_Variables": {}, + "Body": {} + }, + { + "Metadata": { + "path": "/api/rest/2.0/tags/assign", + "operationId": "assignTag", + "scenario": "positive", + "type": "MANUAL", + "testId": 97 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "metadata": [ + { + "type": "LIVEBOARD", + "identifier": "KPI Currency Pinboard" + } + ], + "tag_identifiers": [ + "test6" + ] + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/tags/assign", + "operationId": "assignTag", + "scenario": "positive", + "type": "MANUAL", + "testId": 98 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "metadata": [ + { + "type": "LIVEBOARD", + "identifier": "Headline Pinboard" + } + ], + "tag_identifiers": [ + "test1" + ] + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/tags/assign", + "operationId": "assignTag", + "scenario": "positive", + "type": "MANUAL", + "testId": 99 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "metadata": [ + { + "type": "LIVEBOARD", + "identifier": "Basic Pinboard 2" + } + ], + "tag_identifiers": [ + "test2" + ] + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/tags/assign", + "operationId": "assignTag", + "scenario": "positive", + "type": "MANUAL", + "testId": 100 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "metadata": [ + { + "type": "ANSWER", + "identifier": "Pivot table with multiple measures " + } + ], + "tag_identifiers": [ + "test3" + ] + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/tags/assign", + "operationId": "assignTag", + "scenario": "positive", + "type": "MANUAL", + "testId": 101 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "metadata": [ + { + "type": "ANSWER", + "identifier": "2Lines-1Bar Chart" + } + ], + "tag_identifiers": [ + "test4" + ] + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/tags/assign", + "operationId": "assignTag", + "scenario": "positive", + "type": "MANUAL", + "testId": 102 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "metadata": [ + { + "type": "LOGICAL_TABLE", + "identifier": "agency" + } + ], + "tag_identifiers": [ + "test5" + ] + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/tags/assign", + "operationId": "assignTag", + "scenario": "negative", + "type": "MANUAL", + "testId": 103 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "metadata": [ + { + "identifier": "601be8e5-140e-477c-8812495306438" + } + ], + "tag_identifiers": [ + "test6" + ] + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/tags/assign", + "operationId": "assignTag", + "scenario": "negative", + "type": "MANUAL", + "testId": 104 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "metadata": [ + { + "type": "LIVEBOARD" + } + ], + "tag_identifiers": [ + "test1" + ] + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/tags/assign", + "operationId": "assignTag", + "scenario": "negative", + "type": "MANUAL", + "testId": 105 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "metadata": [ + { + "type": "LIVEBOARD", + "identifier": "c836ad16-0d-4d28-a3a0-e07cb9eb6ab1" + } + ] + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/tags/assign", + "operationId": "assignTag", + "scenario": "negative", + "type": "MANUAL", + "testId": 106 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "metadata": [ + { + "type": "", + "identifier": "1e930169-e47ef0-bb6-83baa7198826" + } + ], + "tag_identifiers": [ + "test3" + ] + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/tags/assign", + "operationId": "assignTag", + "scenario": "negative", + "type": "MANUAL", + "testId": 107 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "metadata": [ + { + "type": "ANSWER", + "identifier": "" + } + ], + "tag_identifiers": [ + "test4" + ] + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/tags/assign", + "operationId": "assignTag", + "scenario": "negative", + "type": "MANUAL", + "testId": 108 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "metadata": [ + { + "type": "LOGICAL_TABLE", + "identifier": "-95a5-44b9--9cc5fad495ee" + } + ], + "tag_identifiers": [ + "test5" + ] + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/tags/unassign", + "operationId": "unassignTag", + "scenario": "positive", + "type": "MANUAL", + "testId": 109 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "metadata": [ + { + "identifier": "KPI Currency Pinboard" + } + ], + "tag_identifiers": [ + "test6" + ] + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/tags/unassign", + "operationId": "unassignTag", + "scenario": "positive", + "type": "MANUAL", + "testId": 110 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "metadata": [ + { + "identifier": "Headline Pinboard" + } + ], + "tag_identifiers": [ + "test1" + ] + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/tags/unassign", + "operationId": "unassignTag", + "scenario": "positive", + "type": "MANUAL", + "testId": 111 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "metadata": [ + { + "identifier": "Basic Pinboard 2" + } + ], + "tag_identifiers": [ + "test2" + ] + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/tags/unassign", + "operationId": "unassignTag", + "scenario": "positive", + "type": "MANUAL", + "testId": 112 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "metadata": [ + { + "identifier": "Pivot table with multiple measures" + } + ], + "tag_identifiers": [ + "test3" + ] + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/tags/unassign", + "operationId": "unassignTag", + "scenario": "positive", + "type": "MANUAL", + "testId": 113 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "metadata": [ + { + "identifier": "2Lines-1Bar Chart" + } + ], + "tag_identifiers": [ + "test4" + ] + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/tags/unassign", + "operationId": "unassignTag", + "scenario": "positive", + "type": "MANUAL", + "testId": 114 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "metadata": [ + { + "identifier": "agency" + } + ], + "tag_identifiers": [ + "test5" + ] + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/tags/unassign", + "operationId": "unassignTag", + "scenario": "negative", + "type": "MANUAL", + "testId": 115 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "metadata": [ + { + "identifier": "" + } + ], + "tag_identifiers": [ + "test6" + ] + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/tags/unassign", + "operationId": "unassignTag", + "scenario": "negative", + "type": "MANUAL", + "testId": 116 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "metadata": [ + { + "identifier": "9bd202f5-d431-44bf-9a07-b4f7be372125" + } + ], + "tag_identifiers": [] + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/tags/unassign", + "operationId": "unassignTag", + "scenario": "negative", + "type": "MANUAL", + "testId": 117 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "tag_identifiers": [ + "test2" + ] + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/tags/unassign", + "operationId": "unassignTag", + "scenario": "negative", + "type": "MANUAL", + "testId": 118 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "metadata": [ + { + "identifier": "1e930169-e47e-4af0-b0b6-83baa7198826" + } + ] + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/tags/unassign", + "operationId": "unassignTag", + "scenario": "negative", + "type": "MANUAL", + "testId": 119 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "metadata": [], + "tag_identifiers": [] + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/tags/unassign", + "operationId": "unassignTag", + "scenario": "negative", + "type": "MANUAL", + "testId": 120 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "metadata": [ + { + "identifier": "7466f3c5-9cc5fad495ee" + } + ], + "tag_identifiers": [ + "test5" + ] + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/tags/search", + "operationId": "searchTags", + "scenario": "positive", + "type": "MANUAL", + "testId": 121 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": {} + }, + { + "Metadata": { + "path": "/api/rest/2.0/groups/create", + "operationId": "createUserGroup", + "scenario": "positive", + "type": "MANUAL", + "testId": 122 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "name": "test6", + "display_name": "test6_test6" + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/groups/create", + "operationId": "createUserGroup", + "scenario": "positive", + "type": "MANUAL", + "testId": 123 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "name": "test1", + "display_name": "test1_test1" + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/groups/create", + "operationId": "createUserGroup", + "scenario": "positive", + "type": "MANUAL", + "testId": 124 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "name": "test2", + "display_name": "test2_test2" + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/groups/create", + "operationId": "createUserGroup", + "scenario": "positive", + "type": "MANUAL", + "testId": 125 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "name": "test3", + "display_name": "test3_test3" + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/groups/create", + "operationId": "createUserGroup", + "scenario": "positive", + "type": "MANUAL", + "testId": 126 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "name": "test4", + "display_name": "test4_test4" + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/groups/create", + "operationId": "createUserGroup", + "scenario": "positive", + "type": "MANUAL", + "testId": 127 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "name": "test5", + "display_name": "test5_test5" + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/groups/create", + "operationId": "createUserGroup", + "scenario": "negative", + "type": "MANUAL", + "testId": 128 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "name": "", + "display_name": "test6_test6" + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/groups/create", + "operationId": "createUserGroup", + "scenario": "negative", + "type": "MANUAL", + "testId": 129 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "name": "test1", + "display_name": "" + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/groups/create", + "operationId": "createUserGroup", + "scenario": "negative", + "type": "MANUAL", + "testId": 130 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "name": "", + "display_name": "" + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/groups/create", + "operationId": "createUserGroup", + "scenario": "negative", + "type": "MANUAL", + "testId": 131 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "name": "test3", + "display_name": "" + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/groups/create", + "operationId": "createUserGroup", + "scenario": "negative", + "type": "MANUAL", + "testId": 132 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "name": "", + "display_name": "test4_test4" + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/groups/create", + "operationId": "createUserGroup", + "scenario": "negative", + "type": "MANUAL", + "testId": 133 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "name": "test5", + "display_name": "" + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/groups/{group_identifier}/update", + "operationId": "updateUserGroup", + "scenario": "positive", + "type": "MANUAL", + "testId": 134 + }, + "Path_Variables": { + "group_identifier": "test6" + }, + "Query_Variables": {}, + "Body": {} + }, + { + "Metadata": { + "path": "/api/rest/2.0/groups/{group_identifier}/update", + "operationId": "updateUserGroup", + "scenario": "positive", + "type": "MANUAL", + "testId": 135 + }, + "Path_Variables": { + "group_identifier": "test1" + }, + "Query_Variables": {}, + "Body": {} + }, + { + "Metadata": { + "path": "/api/rest/2.0/groups/{group_identifier}/update", + "operationId": "updateUserGroup", + "scenario": "positive", + "type": "MANUAL", + "testId": 136 + }, + "Path_Variables": { + "group_identifier": "test2" + }, + "Query_Variables": {}, + "Body": {} + }, + { + "Metadata": { + "path": "/api/rest/2.0/groups/{group_identifier}/update", + "operationId": "updateUserGroup", + "scenario": "positive", + "type": "MANUAL", + "testId": 137 + }, + "Path_Variables": { + "group_identifier": "test3" + }, + "Query_Variables": {}, + "Body": {} + }, + { + "Metadata": { + "path": "/api/rest/2.0/groups/{group_identifier}/update", + "operationId": "updateUserGroup", + "scenario": "positive", + "type": "MANUAL", + "testId": 138 + }, + "Path_Variables": { + "group_identifier": "test4" + }, + "Query_Variables": {}, + "Body": {} + }, + { + "Metadata": { + "path": "/api/rest/2.0/groups/{group_identifier}/update", + "operationId": "updateUserGroup", + "scenario": "positive", + "type": "MANUAL", + "testId": 139 + }, + "Path_Variables": { + "group_identifier": "test5" + }, + "Query_Variables": {}, + "Body": {} + }, + { + "Metadata": { + "path": "/api/rest/2.0/groups/{group_identifier}/update", + "operationId": "updateUserGroup", + "scenario": "negative", + "type": "MANUAL", + "testId": 140 + }, + "Path_Variables": { + "group_identifier": "" + }, + "Query_Variables": {}, + "Body": {} + }, + { + "Metadata": { + "path": "/api/rest/2.0/groups/{group_identifier}/update", + "operationId": "updateUserGroup", + "scenario": "negative", + "type": "MANUAL", + "testId": 141 + }, + "Path_Variables": { + "group_identifier": "1" + }, + "Query_Variables": {}, + "Body": {} + }, + { + "Metadata": { + "path": "/api/rest/2.0/groups/{group_identifier}/update", + "operationId": "updateUserGroup", + "scenario": "negative", + "type": "MANUAL", + "testId": 142 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": {} + }, + { + "Metadata": { + "path": "/api/rest/2.0/groups/{group_identifier}/update", + "operationId": "updateUserGroup", + "scenario": "negative", + "type": "MANUAL", + "testId": 143 + }, + "Path_Variables": { + "group_identifier": "tes3" + }, + "Query_Variables": {}, + "Body": {} + }, + { + "Metadata": { + "path": "/api/rest/2.0/groups/{group_identifier}/update", + "operationId": "updateUserGroup", + "scenario": "negative", + "type": "MANUAL", + "testId": 144 + }, + "Path_Variables": { + "group_identifier": "test" + }, + "Query_Variables": {}, + "Body": {} + }, + { + "Metadata": { + "path": "/api/rest/2.0/groups/{group_identifier}/update", + "operationId": "updateUserGroup", + "scenario": "negative", + "type": "MANUAL", + "testId": 145 + }, + "Path_Variables": { + "group_identifier": "tt5" + }, + "Query_Variables": {}, + "Body": {} + }, + { + "Metadata": { + "path": "/api/rest/2.0/groups/search", + "operationId": "searchUserGroups", + "scenario": "positive", + "type": "MANUAL", + "testId": 146 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": {} + }, + { + "Metadata": { + "path": "/api/rest/2.0/report/liveboard", + "operationId": "exportLiveboardReport", + "scenario": "positive", + "type": "MANUAL", + "testId": 147 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "metadata_identifier": "b2d68a4f-cf67-4723-966f-8a592fdbf8b9" + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/report/liveboard", + "operationId": "exportLiveboardReport", + "scenario": "positive", + "type": "MANUAL", + "testId": 148 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "metadata_identifier": "KPI Currency Pinboard" + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/report/liveboard", + "operationId": "exportLiveboardReport", + "scenario": "positive", + "type": "MANUAL", + "testId": 149 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "metadata_identifier": "Headline Pinboard" + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/report/liveboard", + "operationId": "exportLiveboardReport", + "scenario": "positive", + "type": "MANUAL", + "testId": 150 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "metadata_identifier": "Revenue Trends" + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/report/liveboard", + "operationId": "exportLiveboardReport", + "scenario": "positive", + "type": "MANUAL", + "testId": 151 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "metadata_identifier": "Basic Pinboard 2" + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/report/liveboard", + "operationId": "exportLiveboardReport", + "scenario": "positive", + "type": "MANUAL", + "testId": 152 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "metadata_identifier": "Basic Pinboard 1" + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/report/liveboard", + "operationId": "exportLiveboardReport", + "scenario": "negative", + "type": "MANUAL", + "testId": 153 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "metadata_identifier": "-44bf-9a07-b4f7be372125" + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/report/liveboard", + "operationId": "exportLiveboardReport", + "scenario": "negative", + "type": "MANUAL", + "testId": 154 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "metadata_identifier": "-d431-44bf-9a07-b4f7be372125" + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/report/liveboard", + "operationId": "exportLiveboardReport", + "scenario": "negative", + "type": "MANUAL", + "testId": 155 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "metadata_identifier": "-d431-44bf-9a07-b2d68a4f-cf67-4723-966f-8a592fdbf8b" + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/report/liveboard", + "operationId": "exportLiveboardReport", + "scenario": "negative", + "type": "MANUAL", + "testId": 156 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "metadata_identifier": "" + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/report/liveboard", + "operationId": "exportLiveboardReport", + "scenario": "negative", + "type": "MANUAL", + "testId": 157 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "metadata_identifier": "0fb54198-868d-45de-8929-139b0089e964" + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/report/liveboard", + "operationId": "exportLiveboardReport", + "scenario": "negative", + "type": "MANUAL", + "testId": 158 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": {} + }, + { + "Metadata": { + "path": "/api/rest/2.0/report/answer", + "operationId": "exportAnswerReport", + "scenario": "positive", + "type": "MANUAL", + "testId": 159 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "metadata_identifier": "2Lines-1Bar Chart", + "file_format": "CSV" + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/report/answer", + "operationId": "exportAnswerReport", + "scenario": "positive", + "type": "MANUAL", + "testId": 160 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "metadata_identifier": "Stacked chart with line", + "file_format": "CSV" + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/report/answer", + "operationId": "exportAnswerReport", + "scenario": "positive", + "type": "MANUAL", + "testId": 161 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "metadata_identifier": "Geo Area -Total Poverty Estimate by State", + "file_format": "CSV" + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/report/answer", + "operationId": "exportAnswerReport", + "scenario": "positive", + "type": "MANUAL", + "testId": 162 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "metadata_identifier": "Pivot table with multiple measures", + "file_format": "CSV" + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/report/answer", + "operationId": "exportAnswerReport", + "scenario": "positive", + "type": "MANUAL", + "testId": 163 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "metadata_identifier": "Basic Answer 1", + "file_format": "CSV" + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/report/answer", + "operationId": "exportAnswerReport", + "scenario": "negative", + "type": "MANUAL", + "testId": 164 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "metadata_identifier": "-868d-45de-8929-139b0089e964" + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/report/answer", + "operationId": "exportAnswerReport", + "scenario": "negative", + "type": "MANUAL", + "testId": 165 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "metadata_identifier": "-d431-44bf-9a07-b4f7be372125" + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/report/answer", + "operationId": "exportAnswerReport", + "scenario": "negative", + "type": "MANUAL", + "testId": 166 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "metadata_identifier": "-d431-44bf-9a07-b2d68a4f-cf67-4723-966f-8a592fdbf8b" + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/report/answer", + "operationId": "exportAnswerReport", + "scenario": "negative", + "type": "MANUAL", + "testId": 167 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "metadata_identifier": "kjhafsdlfhjskl" + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/report/answer", + "operationId": "exportAnswerReport", + "scenario": "negative", + "type": "MANUAL", + "testId": 168 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "metadata_identifier": "0fb54198-868d-45de-8929-139b0089e964" + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/report/answer", + "operationId": "exportAnswerReport", + "scenario": "negative", + "type": "MANUAL", + "testId": 169 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": {} + }, + { + "Metadata": { + "path": "/api/rest/2.0/security/principals/fetch-permissions", + "operationId": "fetchPermissionsOfPrincipals", + "scenario": "positive", + "type": "MANUAL", + "testId": 170 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "principals": [ + { + "identifier": "abcdef", + "type": "USER" + } + ] + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/security/principals/fetch-permissions", + "operationId": "fetchPermissionsOfPrincipals", + "scenario": "positive", + "type": "MANUAL", + "testId": 171 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "principals": [ + { + "identifier": "test1", + "type": "USER" + } + ] + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/security/principals/fetch-permissions", + "operationId": "fetchPermissionsOfPrincipals", + "scenario": "positive", + "type": "MANUAL", + "testId": 172 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "principals": [ + { + "identifier": "test2", + "type": "USER" + } + ] + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/security/principals/fetch-permissions", + "operationId": "fetchPermissionsOfPrincipals", + "scenario": "positive", + "type": "MANUAL", + "testId": 173 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "principals": [ + { + "identifier": "test1", + "type": "USER_GROUP" + } + ] + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/security/principals/fetch-permissions", + "operationId": "fetchPermissionsOfPrincipals", + "scenario": "positive", + "type": "MANUAL", + "testId": 174 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "principals": [ + { + "identifier": "test2", + "type": "USER_GROUP" + } + ] + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/security/principals/fetch-permissions", + "operationId": "fetchPermissionsOfPrincipals", + "scenario": "positive", + "type": "MANUAL", + "testId": 175 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "principals": [ + { + "identifier": "test3", + "type": "USER_GROUP" + } + ] + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/security/principals/fetch-permissions", + "operationId": "fetchPermissionsOfPrincipals", + "scenario": "negative", + "type": "MANUAL", + "testId": 176 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "principals": [ + { + "identifier": "" + } + ] + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/security/principals/fetch-permissions", + "operationId": "fetchPermissionsOfPrincipals", + "scenario": "negative", + "type": "MANUAL", + "testId": 177 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "principals": [ + { + "type": "USER" + } + ] + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/security/principals/fetch-permissions", + "operationId": "fetchPermissionsOfPrincipals", + "scenario": "negative", + "type": "MANUAL", + "testId": 178 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "principals": [ + { + "identifier": "test2" + } + ] + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/security/principals/fetch-permissions", + "operationId": "fetchPermissionsOfPrincipals", + "scenario": "negative", + "type": "MANUAL", + "testId": 179 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "principals": [] + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/security/principals/fetch-permissions", + "operationId": "fetchPermissionsOfPrincipals", + "scenario": "negative", + "type": "MANUAL", + "testId": 180 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "principals": [ + { + "identifier": "", + "type": "USER_GROUP" + } + ] + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/security/principals/fetch-permissions", + "operationId": "fetchPermissionsOfPrincipals", + "scenario": "negative", + "type": "MANUAL", + "testId": 181 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "principals": [ + { + "identifier": "test3", + "type": "" + } + ] + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/security/metadata/fetch-permissions", + "operationId": "fetchPermissionsOnMetadata", + "scenario": "positive", + "type": "MANUAL", + "testId": 182 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "metadata": [ + { + "type": "LIVEBOARD", + "identifier": "KPI Currency Pinboard" + } + ] + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/security/metadata/fetch-permissions", + "operationId": "fetchPermissionsOnMetadata", + "scenario": "positive", + "type": "MANUAL", + "testId": 183 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "metadata": [ + { + "type": "LIVEBOARD", + "identifier": "Headline Pinboard" + } + ] + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/security/metadata/fetch-permissions", + "operationId": "fetchPermissionsOnMetadata", + "scenario": "positive", + "type": "MANUAL", + "testId": 184 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "metadata": [ + { + "type": "LIVEBOARD", + "identifier": "Basic Pinboard 2" + } + ] + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/security/metadata/fetch-permissions", + "operationId": "fetchPermissionsOnMetadata", + "scenario": "positive", + "type": "MANUAL", + "testId": 185 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "metadata": [ + { + "type": "ANSWER", + "identifier": "2Lines-1Bar Chart" + } + ] + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/security/metadata/fetch-permissions", + "operationId": "fetchPermissionsOnMetadata", + "scenario": "positive", + "type": "MANUAL", + "testId": 186 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "metadata": [ + { + "type": "LOGICAL_TABLE", + "identifier": "agency" + } + ] + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/security/metadata/fetch-permissions", + "operationId": "fetchPermissionsOnMetadata", + "scenario": "positive", + "type": "MANUAL", + "testId": 187 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "metadata": [ + { + "type": "LOGICAL_TABLE", + "identifier": "date" + } + ] + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/security/metadata/fetch-permissions", + "operationId": "fetchPermissionsOnMetadata", + "scenario": "negative", + "type": "MANUAL", + "testId": 188 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "metadata": [ + { + "identifier": "a62a5bf3-9f16-45b2-a174-7d30b3b577a9" + } + ], + "principals": [ + { + "type": "USER" + } + ] + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/security/metadata/fetch-permissions", + "operationId": "fetchPermissionsOnMetadata", + "scenario": "negative", + "type": "MANUAL", + "testId": 189 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "metadata": [ + { + "identifier": "" + } + ], + "principals": [ + { + "type": "USER" + } + ] + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/security/metadata/fetch-permissions", + "operationId": "fetchPermissionsOnMetadata", + "scenario": "negative", + "type": "MANUAL", + "testId": 190 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "metadata": [], + "principals": [ + { + "type": "USER" + } + ] + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/security/metadata/fetch-permissions", + "operationId": "fetchPermissionsOnMetadata", + "scenario": "negative", + "type": "MANUAL", + "testId": 191 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "metadata": [ + { + "identifier": "a62a5bf3-9f16-45b2-a174-7d30b3b577a9" + } + ] + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/security/metadata/fetch-permissions", + "operationId": "fetchPermissionsOnMetadata", + "scenario": "negative", + "type": "MANUAL", + "testId": 192 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "metadata": "", + "principals": "" + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/security/metadata/assign", + "operationId": "assignChangeAuthor", + "scenario": "positive", + "type": "MANUAL", + "testId": 193 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "metadata": [ + { + "type": "LOGICAL_TABLE", + "identifier": "agency" + } + ], + "user_identifier": "tsadmin" + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/security/metadata/assign", + "operationId": "assignChangeAuthor", + "scenario": "positive", + "type": "MANUAL", + "testId": 194 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "metadata": [ + { + "type": "LIVEBOARD", + "identifier": "KPI Currency Pinboard" + } + ], + "user_identifier": "test1" + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/security/metadata/assign", + "operationId": "assignChangeAuthor", + "scenario": "positive", + "type": "MANUAL", + "testId": 195 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "metadata": [ + { + "type": "LIVEBOARD", + "identifier": "Headline Pinboard" + } + ], + "user_identifier": "test2" + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/security/metadata/assign", + "operationId": "assignChangeAuthor", + "scenario": "positive", + "type": "MANUAL", + "testId": 196 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "metadata": [ + { + "type": "ANSWER", + "identifier": "2Lines-1Bar Chart" + } + ], + "user_identifier": "test3" + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/security/metadata/assign", + "operationId": "assignChangeAuthor", + "scenario": "positive", + "type": "MANUAL", + "testId": 197 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "metadata": [ + { + "type": "ANSWER", + "identifier": "Stacked chart with line " + } + ], + "user_identifier": "test4" + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/security/metadata/assign", + "operationId": "assignChangeAuthor", + "scenario": "positive", + "type": "MANUAL", + "testId": 198 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "metadata": [ + { + "type": "LOGICAL_TABLE", + "identifier": "date" + } + ], + "user_identifier": "test5" + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/security/metadata/assign", + "operationId": "assignChangeAuthor", + "scenario": "negative", + "type": "MANUAL", + "testId": 199 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "metadata": [ + { + "type": "LOGICAL" + } + ] + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/security/metadata/assign", + "operationId": "assignChangeAuthor", + "scenario": "negative", + "type": "MANUAL", + "testId": 200 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "metadata": [ + { + "identifier": "9bd202f5-d431-44bf-9a07-b4f7be372125" + } + ], + "user_identifier": "test1" + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/security/metadata/assign", + "operationId": "assignChangeAuthor", + "scenario": "negative", + "type": "MANUAL", + "testId": 201 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "metadata": [ + { + "type": "LIVEBOARD" + } + ], + "user_identifier": "test2" + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/security/metadata/assign", + "operationId": "assignChangeAuthor", + "scenario": "negative", + "type": "MANUAL", + "testId": 202 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "metadata": [ + { + "type": "ANSWER", + "identifier": "1e930169-e47e-4af0-b0b6-83baa7198826" + } + ] + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/security/metadata/assign", + "operationId": "assignChangeAuthor", + "scenario": "negative", + "type": "MANUAL", + "testId": 203 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "metadata": [ + { + "type": "", + "identifier": "0fb54198-868d-45de-8929-139b0089e964" + } + ], + "user_identifier": "test4" + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/security/metadata/assign", + "operationId": "assignChangeAuthor", + "scenario": "negative", + "type": "MANUAL", + "testId": 204 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "metadata": [ + { + "type": "LOGICAL_TABLE", + "identifier": "" + } + ], + "user_identifier": "test5" + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/security/metadata/share", + "operationId": "shareMetadata", + "scenario": "positive", + "type": "MANUAL", + "testId": 205 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "metadata_type": "LIVEBOARD", + "metadata_identifiers": [ + "KPI Currency Pinboard" + ], + "permissions": [ + { + "principal": { + "identifier": "test1", + "type": "USER" + }, + "share_mode": "READ_ONLY" + } + ], + "emails": [ + "test1@thoughtspot.com" + ], + "message": "done" + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/security/metadata/share", + "operationId": "shareMetadata", + "scenario": "positive", + "type": "MANUAL", + "testId": 206 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "metadata_type": "LIVEBOARD", + "metadata_identifiers": [ + "Headline Pinboard" + ], + "permissions": [ + { + "principal": { + "identifier": "test2", + "type": "USER" + }, + "share_mode": "READ_ONLY" + } + ], + "emails": [ + "test2@thoughtspot.com" + ], + "message": "done" + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/security/metadata/share", + "operationId": "shareMetadata", + "scenario": "positive", + "type": "MANUAL", + "testId": 207 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "metadata_type": "ANSWER", + "metadata_identifiers": [ + "2Lines-1Bar Chart " + ], + "permissions": [ + { + "principal": { + "identifier": "test3", + "type": "USER" + }, + "share_mode": "READ_ONLY" + } + ], + "emails": [ + "test3@thoughtspot.com" + ], + "message": "done" + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/security/metadata/share", + "operationId": "shareMetadata", + "scenario": "positive", + "type": "MANUAL", + "testId": 208 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "metadata_type": "ANSWER", + "metadata_identifiers": [ + "Stacked chart with line" + ], + "permissions": [ + { + "principal": { + "identifier": "test4", + "type": "USER" + }, + "share_mode": "READ_ONLY" + } + ], + "emails": [ + "test4@thoughtspot.com" + ], + "message": "done" + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/security/metadata/share", + "operationId": "shareMetadata", + "scenario": "positive", + "type": "MANUAL", + "testId": 209 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "metadata_type": "LOGICAL_TABLE", + "metadata_identifiers": [ + "agency" + ], + "permissions": [ + { + "principal": { + "identifier": "test5", + "type": "USER" + }, + "share_mode": "READ_ONLY" + } + ], + "emails": [ + "test5@thoughtspot.com" + ], + "message": "done" + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/security/metadata/share", + "operationId": "shareMetadata", + "scenario": "negative", + "type": "MANUAL", + "testId": 210 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "metadata_type": "", + "metadata_identifiers": [], + "permissions": [], + "emails": [], + "message": "message6" + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/security/metadata/share", + "operationId": "shareMetadata", + "scenario": "negative", + "type": "MANUAL", + "testId": 211 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "metadata_type": "", + "metadata_identifiers": [ + "c836ad16-660d-4d28-a3a0-e07cb9eb6ab1" + ], + "permissions": [ + { + "principal": { + "identifier": "test1", + "type": "USER" + }, + "share_mode": "READ_ONLY" + } + ], + "emails": [ + "test1@thoughtspot.com" + ], + "message": "done" + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/security/metadata/share", + "operationId": "shareMetadata", + "scenario": "negative", + "type": "MANUAL", + "testId": 212 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "metadata_type": "LIVEBOARD", + "metadata_identifiers": [ + "7752fa9e-db22-415e" + ], + "permissions": [ + { + "principal": { + "identifier": "test2", + "type": "USER" + }, + "share_mode": "READ_ONLY" + } + ], + "emails": [ + "test2@thoughtspot.com" + ], + "message": "done" + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/security/metadata/share", + "operationId": "shareMetadata", + "scenario": "negative", + "type": "MANUAL", + "testId": 213 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "metadata_type": "ANSWER", + "metadata_identifiers": [ + "12289fad-f230-485e-8c65-e36082eebf44" + ], + "permissions": [ + { + "principal": { + "identifier": "", + "type": "USER" + }, + "share_mode": "READ_ONLY" + } + ], + "emails": [ + "test3@thoughtspot.com" + ], + "message": "done" + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/security/metadata/share", + "operationId": "shareMetadata", + "scenario": "negative", + "type": "MANUAL", + "testId": 214 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "metadata_type": "ANSWER", + "metadata_identifiers": [ + "d305bc51-688b-414f-badc-94579d48308c" + ], + "permissions": [ + { + "principal": { + "identifier": "test4", + "type": "" + }, + "share_mode": "READ_ONLY" + } + ], + "emails": [ + "test4@thoughtspot.com" + ], + "message": "done" + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/security/metadata/share", + "operationId": "shareMetadata", + "scenario": "negative", + "type": "MANUAL", + "testId": 215 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "metadata_type": "LOGICAL_TABLE", + "metadata_identifiers": [ + "7466f3c5-95a5-44b9-a17d-9cc5fad495ee" + ], + "permissions": [ + { + "principal": { + "identifier": "test5", + "type": "USER" + }, + "share_mode": "READ_ONLY" + } + ], + "message": "done" + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/searchdata", + "operationId": "searchData", + "scenario": "positive", + "type": "MANUAL", + "testId": 216 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "query_string": "[PRODUCT_DETAIL_ID] > 3", + "logical_table_identifier": "rls_products_detail_general" + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/searchdata", + "operationId": "searchData", + "scenario": "positive", + "type": "MANUAL", + "testId": 217 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "query_string": "[Employee_Age] > 10", + "logical_table_identifier": "employee" + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/searchdata", + "operationId": "searchData", + "scenario": "positive", + "type": "MANUAL", + "testId": 218 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "query_string": "[Customer_Zip] > 54", + "logical_table_identifier": "customer" + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/searchdata", + "operationId": "searchData", + "scenario": "positive", + "type": "MANUAL", + "testId": 219 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "query_string": "[C1] > 45", + "logical_table_identifier": "TESTINT" + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/searchdata", + "operationId": "searchData", + "scenario": "positive", + "type": "MANUAL", + "testId": 220 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "query_string": "[ITEMCOUNT] > 50", + "logical_table_identifier": "PURCHASETRANSACTIONS" + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/searchdata", + "operationId": "searchData", + "scenario": "positive", + "type": "MANUAL", + "testId": 221 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "query_string": "[Item_ID] > 10", + "logical_table_identifier": "item" + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/searchdata", + "operationId": "searchData", + "scenario": "negative", + "type": "MANUAL", + "testId": 222 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "query_string": "", + "logical_table_identifier": "ad6efa03-a659-4f56-9db7-c6bc07248f2d" + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/searchdata", + "operationId": "searchData", + "scenario": "negative", + "type": "MANUAL", + "testId": 223 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "query_string": "[DATE_HOLIDAY_FL] > 20", + "logical_table_identifier": "-4da6-aad2-ed9dc01bec20" + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/searchdata", + "operationId": "searchData", + "scenario": "negative", + "type": "MANUAL", + "testId": 224 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "query_string": "", + "logical_table_identifier": "ae4e4b7d-5760-4ced-a4e3-b2c99cb50cf1" + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/searchdata", + "operationId": "searchData", + "scenario": "negative", + "type": "MANUAL", + "testId": 225 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "query_string": "[CHANNEL_ID] > 54", + "logical_table_identifier": "" + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/searchdata", + "operationId": "searchData", + "scenario": "negative", + "type": "MANUAL", + "testId": 226 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "query_string": "", + "logical_table_identifier": "" + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/searchdata", + "operationId": "searchData", + "scenario": "negative", + "type": "MANUAL", + "testId": 227 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "query_string": "[]", + "logical_table_identifier": "3b7ca126-7eea-4575-bb72-4bd4bc1e39ba" + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/searchdata", + "operationId": "searchData", + "scenario": "negative", + "type": "MANUAL", + "testId": 228 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": {} + }, + { + "Metadata": { + "path": "/api/rest/2.0/metadata/liveboard/data", + "operationId": "fetchLiveboardData", + "scenario": "positive", + "type": "MANUAL", + "testId": 229 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "metadata_identifier": "KPI Currency Pinboard" + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/metadata/liveboard/data", + "operationId": "fetchLiveboardData", + "scenario": "positive", + "type": "MANUAL", + "testId": 230 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "metadata_identifier": "Headline Pinboard" + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/metadata/liveboard/data", + "operationId": "fetchLiveboardData", + "scenario": "positive", + "type": "MANUAL", + "testId": 231 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "metadata_identifier": "Basic Pinboard 2" + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/metadata/liveboard/data", + "operationId": "fetchLiveboardData", + "scenario": "positive", + "type": "MANUAL", + "testId": 232 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "metadata_identifier": "Basic Pinboard 1" + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/metadata/liveboard/data", + "operationId": "fetchLiveboardData", + "scenario": "positive", + "type": "MANUAL", + "testId": 233 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "metadata_identifier": "Revenue Trends" + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/metadata/liveboard/data", + "operationId": "fetchLiveboardData", + "scenario": "negative", + "type": "MANUAL", + "testId": 234 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "metadata_identifier": "-d431-44bf-9a07-b4f7be372125" + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/metadata/liveboard/data", + "operationId": "fetchLiveboardData", + "scenario": "negative", + "type": "MANUAL", + "testId": 235 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "metadata_identifier": "-d431-44bf-9a07-b4f7be372125" + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/metadata/liveboard/data", + "operationId": "fetchLiveboardData", + "scenario": "negative", + "type": "MANUAL", + "testId": 236 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "metadata_identifier": "-d431-44bf-9a07-b2d68a4f-cf67-4723-966f-8a592fdbf8b" + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/metadata/liveboard/data", + "operationId": "fetchLiveboardData", + "scenario": "negative", + "type": "MANUAL", + "testId": 237 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "metadata_identifier": "" + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/metadata/liveboard/data", + "operationId": "fetchLiveboardData", + "scenario": "negative", + "type": "MANUAL", + "testId": 238 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "metadata_identifier": "0fb54198-868d-45de-8929-139b0089e964" + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/metadata/liveboard/data", + "operationId": "fetchLiveboardData", + "scenario": "negative", + "type": "MANUAL", + "testId": 239 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": {} + }, + { + "Metadata": { + "path": "/api/rest/2.0/metadata/answer/data", + "operationId": "fetchAnswerData", + "scenario": "positive", + "type": "MANUAL", + "testId": 240 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "metadata_identifier": "2Lines-1Bar Chart" + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/metadata/answer/data", + "operationId": "fetchAnswerData", + "scenario": "positive", + "type": "MANUAL", + "testId": 241 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "metadata_identifier": "Basic Answer 1" + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/metadata/answer/data", + "operationId": "fetchAnswerData", + "scenario": "positive", + "type": "MANUAL", + "testId": 242 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "metadata_identifier": "Stacked chart with line" + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/metadata/answer/data", + "operationId": "fetchAnswerData", + "scenario": "positive", + "type": "MANUAL", + "testId": 243 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "metadata_identifier": "Geo Area -Total Poverty Estimate by State" + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/metadata/answer/data", + "operationId": "fetchAnswerData", + "scenario": "positive", + "type": "MANUAL", + "testId": 244 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "metadata_identifier": "Pivot table with multiple measures" + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/metadata/answer/data", + "operationId": "fetchAnswerData", + "scenario": "negative", + "type": "MANUAL", + "testId": 245 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "metadata_identifier": "-868d-45de-8929-139b0089e964" + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/metadata/answer/data", + "operationId": "fetchAnswerData", + "scenario": "negative", + "type": "MANUAL", + "testId": 246 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "metadata_identifier": "-d431-44bf-9a07-b4f7be372125" + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/metadata/answer/data", + "operationId": "fetchAnswerData", + "scenario": "negative", + "type": "MANUAL", + "testId": 247 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "metadata_identifier": "-d431-44bf-9a07-b2d68a4f-cf67-4723-966f-8a592fdbf8b" + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/metadata/answer/data", + "operationId": "fetchAnswerData", + "scenario": "negative", + "type": "MANUAL", + "testId": 248 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "metadata_identifier": "" + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/metadata/answer/data", + "operationId": "fetchAnswerData", + "scenario": "negative", + "type": "MANUAL", + "testId": 249 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "metadata_identifier": "0fb54198-868d-45de-8929-139b0089e964" + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/metadata/answer/data", + "operationId": "fetchAnswerData", + "scenario": "negative", + "type": "MANUAL", + "testId": 250 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": {} + }, + { + "Metadata": { + "path": "/api/rest/2.0/metadata/tml/import", + "operationId": "importMetadata", + "scenario": "positive", + "type": "MANUAL", + "testId": 251 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "metadata_tmls": [ + "{\"guid\": \"b2d68a4f-cf67-4723-966f-8a592fdbf8b9\",\"liveboard\": {\"name\": \"KPI Currency Pinboard\",\"visualizations\": [{\"id\": \"Viz_1\",\"answer\": {\"name\": \"KPI Currency\",\"tables\": [{\"id\": \"Tea Sales\",\"name\": \"Tea Sales\"}],\"search_query\": \"[Revenue] [Sales] [Tea]\",\"answer_columns\": [{\"name\": \"Total Revenue\"},{\"name\": \"Total Sales\"},{\"name\": \"Tea\"},{\"name\": \"Currency Code\"}],\"table\": {\"table_columns\": [{\"column_id\": \"Tea\",\"headline_aggregation\": \"COUNT_DISTINCT\"},{\"column_id\": \"Currency Code\",\"headline_aggregation\": \"COUNT_DISTINCT\"},{\"column_id\": \"Total Revenue\",\"headline_aggregation\": \"SUM\"},{\"column_id\": \"Total Sales\",\"headline_aggregation\": \"SUM\"}],\"ordered_column_ids\": [\"Tea\",\"Currency Code\",\"Total Revenue\",\"Total Sales\"],\"client_state\": \"{\\\"dataOffset\\\":0.0,\\\"wrapTableHeader\\\":true}\"},\"chart\": {\"type\": \"COLUMN\",\"chart_columns\": [{\"column_id\": \"Tea\"},{\"column_id\": \"Currency Code\"},{\"column_id\": \"Total Revenue\",\"conditional_formatting\": {\"rule\": [{\"range\": {\"max\": 500.0},\"color\": \"#0500ff\",\"plotAsBand\": false}]}},{\"column_id\": \"Total Sales\"}],\"axis_configs\": [{\"x\": [\"Currency Code\"],\"y\": [\"Total Revenue\",\"Total Sales\"]}],\"client_state\": \"{\\\"systemMultiColorSeriesColors\\\":{},\\\"multiColorSeriesColors\\\":{},\\\"seriesColors\\\":{\\\"Total Revenue\\\":\\\"#a174c1\\\"},\\\"chartProperties\\\":{\\\"gridLines\\\":{},\\\"showRoundedNumbers\\\":true,\\\"chartSpecific\\\":{}},\\\"axisProperties\\\":{\\\"85e60979-5d8c-442c-8c8f-c9ebe35d3014\\\":{\\\"linkedColumns\\\":[\\\"Total Revenue\\\"],\\\"axisType\\\":\\\"Y\\\",\\\"isOpposite\\\":false},\\\"d9008ca8-b3da-481f-9589-56f1a3972fc4\\\":{\\\"linkedColumns\\\":[\\\"Total Sales\\\"],\\\"axisType\\\":\\\"Y\\\",\\\"isOpposite\\\":true},\\\"a74dbfd6-dc7c-4f37-a836-4df095302d91\\\":{\\\"linkedColumns\\\":[\\\"Currency Code\\\"],\\\"axisType\\\":\\\"X\\\"}},\\\"systemSeriesColors\\\":{\\\"Total Revenue\\\":\\\"#a174c1\\\",\\\"Total Sales\\\":\\\"#e3394a\\\"},\\\"yAxisShared\\\":false,\\\"visibleSeriesNames\\\":[\\\"Total Revenue\\\",\\\"Total Sales\\\"],\\\"version\\\":\\\"V2.1\\\",\\\"columnProperties\\\":{\\\"Tea\\\":{},\\\"Currency Code\\\":{},\\\"Total Revenue\\\":{},\\\"Total Sales\\\":{}}}\"},\"display_mode\": \"CHART_MODE\"},\"viz_guid\": \"247574e4-3577-4dd9-9994-8479eb0291f6\"}],\"layout\": {\"tiles\": [{\"visualization_id\": \"Viz_1\",\"size\": \"LARGE\"}]}}}" + ] + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/metadata/tml/import", + "operationId": "importMetadata", + "scenario": "positive", + "type": "MANUAL", + "testId": 252 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "metadata_tmls": [ + "{\"guid\": \"6715f768-8930-4180-9a3d-1efdbfaa8e7f\",\"liveboard\": {\"name\": \"Headline Pinboard\",\"visualizations\": [{\"id\": \"Viz_1\",\"answer\": {\"name\": \"Headline Currency - All datatype\",\"tables\": [{\"id\": \"Tea Sales\",\"name\": \"Tea Sales\"}],\"search_query\": \"[Revenue] [Sales] [Tea] [Date] [Date].hourly [Type]\",\"answer_columns\": [{\"name\": \"Total Revenue\"},{\"name\": \"Total Sales\"},{\"name\": \"Tea\"},{\"name\": \"Hour(Date)\"},{\"name\": \"Type\"},{\"name\": \"Currency Code\"}],\"table\": {\"table_columns\": [{\"column_id\": \"Tea\",\"headline_aggregation\": \"COUNT_DISTINCT\"},{\"column_id\": \"Hour(Date)\",\"headline_aggregation\": \"MIN-MAX\"},{\"column_id\": \"Type\",\"headline_aggregation\": \"COUNT_DISTINCT\"},{\"column_id\": \"Currency Code\",\"headline_aggregation\": \"COUNT_DISTINCT\"},{\"column_id\": \"Total Revenue\",\"conditional_formatting\": {},\"headline_aggregation\": \"AVERAGE\"},{\"column_id\": \"Total Sales\",\"headline_aggregation\": \"SUM\"}],\"ordered_column_ids\": [\"Tea\",\"Hour(Date)\",\"Type\",\"Currency Code\",\"Total Revenue\",\"Total Sales\"],\"client_state\": \"{\\\"dataOffset\\\":0.0,\\\"widthState\\\":{},\\\"wrapTableHeader\\\":true}\"},\"chart\": {\"type\": \"LINE\",\"chart_columns\": [{\"column_id\": \"Tea\"},{\"column_id\": \"Hour(Date)\"},{\"column_id\": \"Type\"},{\"column_id\": \"Currency Code\"},{\"column_id\": \"Total Revenue\",\"conditional_formatting\": {\"rule\": [{\"range\": {\"max\": 500.0},\"color\": \"#0500ff\",\"plotAsBand\": false}]}},{\"column_id\": \"Total Sales\"}],\"axis_configs\": [{\"x\": [\"Hour(Date)\"],\"y\": [\"Total Revenue\",\"Total Sales\"]}],\"client_state\": \"{\\\"multiColorSeriesColors\\\":{},\\\"seriesColors\\\":{\\\"Total Revenue\\\":\\\"#a174c1\\\"},\\\"chartProperties\\\":{\\\"visibleSeriesNames\\\":[\\\"Total Revenue\\\",\\\"Total Sales\\\"],\\\"gridLines\\\":{},\\\"showRoundedNumbers\\\":true,\\\"chartSpecific\\\":{}},\\\"axisProperties\\\":{\\\"837ffc1e-2c19-4aff-963d-beb2cb6142b7\\\":{\\\"linkedColumns\\\":[],\\\"axisType\\\":\\\"X\\\"}},\\\"yAxisShared\\\":false,\\\"visibleSeriesNames\\\":[\\\"Total Revenue\\\",\\\"Total Sales\\\"],\\\"version\\\":\\\"V2.1\\\",\\\"columnProperties\\\":{\\\"Tea\\\":{},\\\"Hour(Date)\\\":{},\\\"Type\\\":{},\\\"Currency Code\\\":{},\\\"Total Revenue\\\":{},\\\"Total Sales\\\":{}}}\"},\"display_mode\": \"TABLE_MODE\"},\"viz_guid\": \"121726ab-6f6e-4fdf-8536-4e844bde11af\"},{\"id\": \"Viz_2\",\"answer\": {\"name\": \"Tea\",\"tables\": [{\"id\": \"Tea Sales\",\"name\": \"Tea Sales\"}],\"search_query\": \"[Revenue] [Sales] [Tea] [Date] [Date].hourly [Type]\",\"answer_columns\": [{\"name\": \"Total Revenue\"},{\"name\": \"Total Sales\"},{\"name\": \"Tea\"},{\"name\": \"Hour(Date)\"},{\"name\": \"Type\"},{\"name\": \"Currency Code\"}],\"table\": {\"table_columns\": [{\"column_id\": \"Tea\",\"headline_aggregation\": \"COUNT_DISTINCT\"},{\"column_id\": \"Hour(Date)\",\"headline_aggregation\": \"MIN-MAX\"},{\"column_id\": \"Type\",\"headline_aggregation\": \"COUNT_DISTINCT\"},{\"column_id\": \"Currency Code\",\"headline_aggregation\": \"COUNT_DISTINCT\"},{\"column_id\": \"Total Revenue\",\"conditional_formatting\": {},\"headline_aggregation\": \"AVERAGE\"},{\"column_id\": \"Total Sales\",\"headline_aggregation\": \"SUM\"}],\"ordered_column_ids\": [\"Tea\",\"Hour(Date)\",\"Type\",\"Currency Code\",\"Total Revenue\",\"Total Sales\"],\"client_state\": \"{\\\"dataOffset\\\":0.0,\\\"widthState\\\":{},\\\"wrapTableHeader\\\":true}\"},\"chart\": {\"type\": \"LINE\",\"chart_columns\": [{\"column_id\": \"Tea\"},{\"column_id\": \"Hour(Date)\"},{\"column_id\": \"Type\"},{\"column_id\": \"Currency Code\"},{\"column_id\": \"Total Revenue\",\"conditional_formatting\": {\"rule\": [{\"range\": {\"max\": 500.0},\"color\": \"#0500ff\",\"plotAsBand\": false}]}},{\"column_id\": \"Total Sales\"}],\"axis_configs\": [{\"x\": [\"Hour(Date)\"],\"y\": [\"Total Revenue\",\"Total Sales\"]}],\"client_state\": \"{\\\"multiColorSeriesColors\\\":{},\\\"seriesColors\\\":{\\\"Total Revenue\\\":\\\"#a174c1\\\"},\\\"chartProperties\\\":{\\\"visibleSeriesNames\\\":[\\\"Total Revenue\\\",\\\"Total Sales\\\"],\\\"gridLines\\\":{},\\\"showRoundedNumbers\\\":true,\\\"chartSpecific\\\":{}},\\\"axisProperties\\\":{\\\"f012d8d7-6c32-4a85-bd3b-e5edcfd79917\\\":{\\\"linkedColumns\\\":[],\\\"axisType\\\":\\\"X\\\"}},\\\"yAxisShared\\\":false,\\\"visibleSeriesNames\\\":[\\\"Total Revenue\\\",\\\"Total Sales\\\"],\\\"version\\\":\\\"V2.1\\\",\\\"columnProperties\\\":{\\\"Tea\\\":{},\\\"Hour(Date)\\\":{},\\\"Type\\\":{},\\\"Currency Code\\\":{},\\\"Total Revenue\\\":{},\\\"Total Sales\\\":{}}}\"},\"display_mode\": \"TABLE_MODE\"},\"display_headline_column\": \"Tea\",\"viz_guid\": \"bcd0ca7b-b1ac-4c52-af04-0249b1b56a23\"},{\"id\": \"Viz_3\",\"answer\": {\"name\": \"Hour(Date)\",\"tables\": [{\"id\": \"Tea Sales\",\"name\": \"Tea Sales\"}],\"search_query\": \"[Revenue] [Sales] [Tea] [Date] [Date].hourly [Type]\",\"answer_columns\": [{\"name\": \"Total Revenue\"},{\"name\": \"Total Sales\"},{\"name\": \"Tea\"},{\"name\": \"Hour(Date)\"},{\"name\": \"Type\"},{\"name\": \"Currency Code\"}],\"table\": {\"table_columns\": [{\"column_id\": \"Tea\",\"headline_aggregation\": \"COUNT_DISTINCT\"},{\"column_id\": \"Hour(Date)\",\"headline_aggregation\": \"MIN-MAX\"},{\"column_id\": \"Type\",\"headline_aggregation\": \"COUNT_DISTINCT\"},{\"column_id\": \"Currency Code\",\"headline_aggregation\": \"COUNT_DISTINCT\"},{\"column_id\": \"Total Revenue\",\"conditional_formatting\": {},\"headline_aggregation\": \"AVERAGE\"},{\"column_id\": \"Total Sales\",\"headline_aggregation\": \"SUM\"}],\"ordered_column_ids\": [\"Tea\",\"Hour(Date)\",\"Type\",\"Currency Code\",\"Total Revenue\",\"Total Sales\"],\"client_state\": \"{\\\"dataOffset\\\":0.0,\\\"widthState\\\":{},\\\"wrapTableHeader\\\":true}\"},\"chart\": {\"type\": \"LINE\",\"chart_columns\": [{\"column_id\": \"Tea\"},{\"column_id\": \"Hour(Date)\"},{\"column_id\": \"Type\"},{\"column_id\": \"Currency Code\"},{\"column_id\": \"Total Revenue\",\"conditional_formatting\": {\"rule\": [{\"range\": {\"max\": 500.0},\"color\": \"#0500ff\",\"plotAsBand\": false}]}},{\"column_id\": \"Total Sales\"}],\"axis_configs\": [{\"x\": [\"Hour(Date)\"],\"y\": [\"Total Revenue\",\"Total Sales\"]}],\"client_state\": \"{\\\"multiColorSeriesColors\\\":{},\\\"seriesColors\\\":{\\\"Total Revenue\\\":\\\"#a174c1\\\"},\\\"chartProperties\\\":{\\\"visibleSeriesNames\\\":[\\\"Total Revenue\\\",\\\"Total Sales\\\"],\\\"gridLines\\\":{},\\\"showRoundedNumbers\\\":true,\\\"chartSpecific\\\":{}},\\\"axisProperties\\\":{\\\"368c9d8d-bf7d-4e34-ad80-a06184ca6af3\\\":{\\\"linkedColumns\\\":[],\\\"axisType\\\":\\\"X\\\"}},\\\"yAxisShared\\\":false,\\\"visibleSeriesNames\\\":[\\\"Total Revenue\\\",\\\"Total Sales\\\"],\\\"version\\\":\\\"V2.1\\\",\\\"columnProperties\\\":{\\\"Tea\\\":{},\\\"Hour(Date)\\\":{},\\\"Type\\\":{},\\\"Currency Code\\\":{},\\\"Total Revenue\\\":{},\\\"Total Sales\\\":{}}}\"},\"display_mode\": \"TABLE_MODE\"},\"display_headline_column\": \"Hour(Date)\",\"viz_guid\": \"e0bbdbbb-dd63-4f3e-8515-d66793c1d731\"},{\"id\": \"Viz_4\",\"answer\": {\"name\": \"Total Sales\",\"tables\": [{\"id\": \"Tea Sales\",\"name\": \"Tea Sales\"}],\"search_query\": \"[Revenue] [Sales] [Tea] [Date] [Date].hourly [Type]\",\"answer_columns\": [{\"name\": \"Total Revenue\"},{\"name\": \"Total Sales\"},{\"name\": \"Tea\"},{\"name\": \"Hour(Date)\"},{\"name\": \"Type\"},{\"name\": \"Currency Code\"}],\"table\": {\"table_columns\": [{\"column_id\": \"Tea\",\"headline_aggregation\": \"COUNT_DISTINCT\"},{\"column_id\": \"Hour(Date)\",\"headline_aggregation\": \"MIN-MAX\"},{\"column_id\": \"Type\",\"headline_aggregation\": \"COUNT_DISTINCT\"},{\"column_id\": \"Currency Code\",\"headline_aggregation\": \"COUNT_DISTINCT\"},{\"column_id\": \"Total Revenue\",\"conditional_formatting\": {},\"headline_aggregation\": \"AVERAGE\"},{\"column_id\": \"Total Sales\",\"headline_aggregation\": \"SUM\"}],\"ordered_column_ids\": [\"Tea\",\"Hour(Date)\",\"Type\",\"Currency Code\",\"Total Revenue\",\"Total Sales\"],\"client_state\": \"{\\\"dataOffset\\\":0.0,\\\"widthState\\\":{},\\\"wrapTableHeader\\\":true}\"},\"chart\": {\"type\": \"LINE\",\"chart_columns\": [{\"column_id\": \"Tea\"},{\"column_id\": \"Hour(Date)\"},{\"column_id\": \"Type\"},{\"column_id\": \"Currency Code\"},{\"column_id\": \"Total Revenue\",\"conditional_formatting\": {\"rule\": [{\"range\": {\"max\": 500.0},\"color\": \"#0500ff\",\"plotAsBand\": false}]}},{\"column_id\": \"Total Sales\"}],\"axis_configs\": [{\"x\": [\"Hour(Date)\"],\"y\": [\"Total Revenue\",\"Total Sales\"]}],\"client_state\": \"{\\\"multiColorSeriesColors\\\":{},\\\"seriesColors\\\":{\\\"Total Revenue\\\":\\\"#a174c1\\\"},\\\"chartProperties\\\":{\\\"visibleSeriesNames\\\":[\\\"Total Revenue\\\",\\\"Total Sales\\\"],\\\"gridLines\\\":{},\\\"showRoundedNumbers\\\":true,\\\"chartSpecific\\\":{}},\\\"axisProperties\\\":{\\\"a2323387-dc8b-48c6-85ff-172b604b58d2\\\":{\\\"linkedColumns\\\":[],\\\"axisType\\\":\\\"X\\\"}},\\\"yAxisShared\\\":false,\\\"visibleSeriesNames\\\":[\\\"Total Revenue\\\",\\\"Total Sales\\\"],\\\"version\\\":\\\"V2.1\\\",\\\"columnProperties\\\":{\\\"Tea\\\":{},\\\"Hour(Date)\\\":{},\\\"Type\\\":{},\\\"Currency Code\\\":{},\\\"Total Revenue\\\":{},\\\"Total Sales\\\":{}}}\"},\"display_mode\": \"TABLE_MODE\"},\"display_headline_column\": \"Total Sales\",\"viz_guid\": \"70b6a359-e93b-4ada-a276-f8a33c949e1f\"},{\"id\": \"Viz_5\",\"answer\": {\"name\": \"Total Revenue\",\"tables\": [{\"id\": \"Tea Sales\",\"name\": \"Tea Sales\"}],\"search_query\": \"[Revenue] [Sales] [Tea] [Date] [Date].hourly [Type]\",\"answer_columns\": [{\"name\": \"Total Revenue\"},{\"name\": \"Total Sales\"},{\"name\": \"Tea\"},{\"name\": \"Hour(Date)\"},{\"name\": \"Type\"},{\"name\": \"Currency Code\"}],\"table\": {\"table_columns\": [{\"column_id\": \"Tea\",\"headline_aggregation\": \"COUNT_DISTINCT\"},{\"column_id\": \"Hour(Date)\",\"headline_aggregation\": \"MIN-MAX\"},{\"column_id\": \"Type\",\"headline_aggregation\": \"COUNT_DISTINCT\"},{\"column_id\": \"Currency Code\",\"headline_aggregation\": \"COUNT_DISTINCT\"},{\"column_id\": \"Total Revenue\",\"conditional_formatting\": {},\"headline_aggregation\": \"AVERAGE\"},{\"column_id\": \"Total Sales\",\"headline_aggregation\": \"SUM\"}],\"ordered_column_ids\": [\"Tea\",\"Hour(Date)\",\"Type\",\"Currency Code\",\"Total Revenue\",\"Total Sales\"],\"client_state\": \"{\\\"dataOffset\\\":0.0,\\\"widthState\\\":{},\\\"wrapTableHeader\\\":true}\"},\"chart\": {\"type\": \"LINE\",\"chart_columns\": [{\"column_id\": \"Tea\"},{\"column_id\": \"Hour(Date)\"},{\"column_id\": \"Type\"},{\"column_id\": \"Currency Code\"},{\"column_id\": \"Total Revenue\",\"conditional_formatting\": {\"rule\": [{\"range\": {\"max\": 500.0},\"color\": \"#0500ff\",\"plotAsBand\": false}]}},{\"column_id\": \"Total Sales\"}],\"axis_configs\": [{\"x\": [\"Hour(Date)\"],\"y\": [\"Total Revenue\",\"Total Sales\"]}],\"client_state\": \"{\\\"multiColorSeriesColors\\\":{},\\\"seriesColors\\\":{\\\"Total Revenue\\\":\\\"#a174c1\\\"},\\\"chartProperties\\\":{\\\"visibleSeriesNames\\\":[\\\"Total Revenue\\\",\\\"Total Sales\\\"],\\\"gridLines\\\":{},\\\"showRoundedNumbers\\\":true,\\\"chartSpecific\\\":{}},\\\"axisProperties\\\":{\\\"1897ae34-ae05-41a9-ae1b-a0aca788494e\\\":{\\\"linkedColumns\\\":[],\\\"axisType\\\":\\\"X\\\"}},\\\"yAxisShared\\\":false,\\\"visibleSeriesNames\\\":[\\\"Total Revenue\\\",\\\"Total Sales\\\"],\\\"version\\\":\\\"V2.1\\\",\\\"columnProperties\\\":{\\\"Tea\\\":{},\\\"Hour(Date)\\\":{},\\\"Type\\\":{},\\\"Currency Code\\\":{},\\\"Total Revenue\\\":{},\\\"Total Sales\\\":{}}}\"},\"display_mode\": \"TABLE_MODE\"},\"display_headline_column\": \"Total Revenue\",\"viz_guid\": \"6df94eda-64f4-4c51-a72b-5ce6284dc184\"}],\"layout\": {\"tiles\": [{\"visualization_id\": \"Viz_2\",\"size\": \"EXTRA_SMALL\"},{\"visualization_id\": \"Viz_3\",\"size\": \"EXTRA_SMALL\"},{\"visualization_id\": \"Viz_5\",\"size\": \"EXTRA_SMALL\"},{\"visualization_id\": \"Viz_1\",\"size\": \"MEDIUM\"},{\"visualization_id\": \"Viz_4\",\"size\": \"EXTRA_SMALL\"}]}}}" + ] + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/metadata/tml/import", + "operationId": "importMetadata", + "scenario": "positive", + "type": "MANUAL", + "testId": 253 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "metadata_tmls": [ + "{\"guid\": \"33248a57-cc70-4e39-9199-fb5092283381\",\"liveboard\": {\"name\": \"Basic Pinboard 2\",\"description\": \"This pinboard contains a chart, a table and a headline visualization based on TPCH.\",\"visualizations\": [{\"id\": \"Viz_1\",\"answer\": {\"name\": \"Visualization 1\",\"tables\": [{\"id\": \"LINEORDER\",\"name\": \"LINEORDER\"},{\"id\": \"PART\",\"name\": \"PART\"}],\"joins\": [{\"id\": \"Lineorder PartKey - Part PartKey\",\"name\": \"Lineorder PartKey - Part PartKey\",\"source\": \"LINEORDER\",\"destination\": \"PART\"}],\"table_paths\": [{\"id\": \"LINEORDER_1\",\"table\": \"LINEORDER\",\"join_path\": [{}]},{\"id\": \"PART_1\",\"table\": \"PART\",\"join_path\": [{\"join\": [\"Lineorder PartKey - Part PartKey\"]}]}],\"search_query\": \"[LINEORDER_1::Revenue] [PART_1::Color]\",\"answer_columns\": [{\"name\": \"Total Revenue\"},{\"name\": \"Color\"}],\"table\": {\"table_columns\": [{\"column_id\": \"Color\",\"headline_aggregation\": \"COUNT_DISTINCT\"},{\"column_id\": \"Total Revenue\",\"headline_aggregation\": \"SUM\"}],\"ordered_column_ids\": [\"Color\",\"Total Revenue\"],\"client_state\": \"{\\\"dataOffset\\\":0.0,\\\"wrapTableHeader\\\":true}\"},\"chart\": {\"type\": \"COLUMN\",\"chart_columns\": [{\"column_id\": \"Color\"},{\"column_id\": \"Total Revenue\"}],\"axis_configs\": [{\"x\": [\"Color\"],\"y\": [\"Total Revenue\"]}],\"client_state\": \"{\\\"chartProperties\\\":{\\\"gridLines\\\":{},\\\"showRoundedNumbers\\\":true,\\\"chartSpecific\\\":{}},\\\"axisProperties\\\":{\\\"a9154db9-b7f5-4482-b97d-af415ecb3e68\\\":{\\\"linkedColumns\\\":[\\\"Total Revenue\\\"],\\\"axisType\\\":\\\"Y\\\",\\\"isOpposite\\\":false},\\\"37c51130-8786-4c2e-ab80-e2abc783ed0e\\\":{\\\"linkedColumns\\\":[\\\"Color\\\"],\\\"axisType\\\":\\\"X\\\"}},\\\"systemSeriesColors\\\":{\\\"Total Revenue\\\":\\\"#8C62F5\\\"},\\\"version\\\":\\\"V2.1\\\",\\\"columnProperties\\\":{\\\"Color\\\":{},\\\"Total Revenue\\\":{}}}\"},\"display_mode\": \"CHART_MODE\"},\"viz_guid\": \"730496d6-6903-4601-937e-2c691821af3c\"},{\"id\": \"Viz_2\",\"answer\": {\"name\": \"Basic Answer 1\",\"description\": \"This is basic answer with table and headline visualizations.\",\"tables\": [{\"id\": \"LINEORDER\",\"name\": \"LINEORDER\"},{\"id\": \"PART\",\"name\": \"PART\"}],\"joins\": [{\"id\": \"Lineorder PartKey - Part PartKey\",\"name\": \"Lineorder PartKey - Part PartKey\",\"source\": \"LINEORDER\",\"destination\": \"PART\"}],\"table_paths\": [{\"id\": \"LINEORDER_1\",\"table\": \"LINEORDER\",\"join_path\": [{}]},{\"id\": \"PART_1\",\"table\": \"PART\",\"join_path\": [{\"join\": [\"Lineorder PartKey - Part PartKey\"]}]}],\"search_query\": \"[LINEORDER_1::Revenue] [PART_1::Color]\",\"answer_columns\": [{\"name\": \"Total Revenue\"},{\"name\": \"Color\"}],\"table\": {\"table_columns\": [{\"column_id\": \"Color\",\"headline_aggregation\": \"COUNT_DISTINCT\"},{\"column_id\": \"Total Revenue\",\"headline_aggregation\": \"SUM\"}],\"ordered_column_ids\": [\"Color\",\"Total Revenue\"],\"client_state\": \"{\\\"widthState\\\":{},\\\"wrapTableHeader\\\":true}\"},\"chart\": {\"type\": \"COLUMN\",\"chart_columns\": [{\"column_id\": \"Color\"},{\"column_id\": \"Total Revenue\"}],\"axis_configs\": [{\"x\": [\"Color\"],\"y\": [\"Total Revenue\"]}],\"client_state\": \"{\\\"chartProperties\\\":{\\\"gridLines\\\":{},\\\"showRoundedNumbers\\\":true,\\\"chartSpecific\\\":{}},\\\"axisProperties\\\":{\\\"ac3af31a-2b0c-40e1-99ff-ccae22364e29\\\":{\\\"linkedColumns\\\":[\\\"Total Revenue\\\"],\\\"axisType\\\":\\\"Y\\\",\\\"isOpposite\\\":false},\\\"531a375b-6c61-4414-80b7-7ac740ca49b8\\\":{\\\"linkedColumns\\\":[\\\"Color\\\"],\\\"axisType\\\":\\\"X\\\"}},\\\"version\\\":\\\"V2.1\\\",\\\"columnProperties\\\":{\\\"Color\\\":{},\\\"Total Revenue\\\":{}}}\"},\"display_mode\": \"TABLE_MODE\"},\"viz_guid\": \"20d65652-a25e-4238-a934-7cb2cc97e75b\"},{\"id\": \"Viz_3\",\"answer\": {\"name\": \"Color\",\"description\": \"This is basic answer with table and headline visualizations.\",\"tables\": [{\"id\": \"LINEORDER\",\"name\": \"LINEORDER\"},{\"id\": \"PART\",\"name\": \"PART\"}],\"joins\": [{\"id\": \"Lineorder PartKey - Part PartKey\",\"name\": \"Lineorder PartKey - Part PartKey\",\"source\": \"LINEORDER\",\"destination\": \"PART\"}],\"table_paths\": [{\"id\": \"LINEORDER_1\",\"table\": \"LINEORDER\",\"join_path\": [{}]},{\"id\": \"PART_1\",\"table\": \"PART\",\"join_path\": [{\"join\": [\"Lineorder PartKey - Part PartKey\"]}]}],\"search_query\": \"[LINEORDER_1::Revenue] [PART_1::Color]\",\"answer_columns\": [{\"name\": \"Total Revenue\"},{\"name\": \"Color\"}],\"table\": {\"table_columns\": [{\"column_id\": \"Color\",\"headline_aggregation\": \"COUNT_DISTINCT\"},{\"column_id\": \"Total Revenue\",\"headline_aggregation\": \"SUM\"}],\"ordered_column_ids\": [\"Color\",\"Total Revenue\"],\"client_state\": \"{\\\"widthState\\\":{},\\\"wrapTableHeader\\\":true}\"},\"chart\": {\"type\": \"COLUMN\",\"chart_columns\": [{\"column_id\": \"Color\"},{\"column_id\": \"Total Revenue\"}],\"axis_configs\": [{\"x\": [\"Color\"],\"y\": [\"Total Revenue\"]}],\"client_state\": \"{\\\"chartProperties\\\":{\\\"gridLines\\\":{},\\\"showRoundedNumbers\\\":true,\\\"chartSpecific\\\":{}},\\\"axisProperties\\\":{\\\"8e088ee2-88c0-457f-ac66-1aefc258cae6\\\":{\\\"linkedColumns\\\":[\\\"Total Revenue\\\"],\\\"axisType\\\":\\\"Y\\\",\\\"isOpposite\\\":false},\\\"340f988a-7768-4976-9bd0-e2c281cd1ea0\\\":{\\\"linkedColumns\\\":[\\\"Color\\\"],\\\"axisType\\\":\\\"X\\\"}},\\\"version\\\":\\\"V2.1\\\",\\\"columnProperties\\\":{\\\"Color\\\":{},\\\"Total Revenue\\\":{}}}\"},\"display_mode\": \"TABLE_MODE\"},\"display_headline_column\": \"Color\",\"viz_guid\": \"c89fda22-329f-492c-a027-2256cc3e6933\"}],\"layout\": {\"tiles\": [{\"visualization_id\": \"Viz_1\",\"size\": \"LARGE\"},{\"visualization_id\": \"Viz_2\",\"size\": \"MEDIUM\"},{\"visualization_id\": \"Viz_3\",\"size\": \"EXTRA_SMALL\"}]}}}" + ] + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/metadata/tml/import", + "operationId": "importMetadata", + "scenario": "positive", + "type": "MANUAL", + "testId": 254 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "metadata_tmls": [ + "{\"guid\": \"7752fa9e-db22-415e-bf34-e082c4bc41c3\",\"liveboard\": {\"name\": \"Basic Pinboard 1\",\"description\": \"This pinboard contains one TPCH based visualization\",\"visualizations\": [{\"id\": \"Viz_1\",\"answer\": {\"name\": \"Visualization 1\",\"tables\": [{\"id\": \"LINEORDER\",\"name\": \"LINEORDER\"},{\"id\": \"PART\",\"name\": \"PART\"}],\"joins\": [{\"id\": \"Lineorder PartKey - Part PartKey\",\"name\": \"Lineorder PartKey - Part PartKey\",\"source\": \"LINEORDER\",\"destination\": \"PART\"}],\"table_paths\": [{\"id\": \"LINEORDER_1\",\"table\": \"LINEORDER\",\"join_path\": [{}]},{\"id\": \"PART_1\",\"table\": \"PART\",\"join_path\": [{\"join\": [\"Lineorder PartKey - Part PartKey\"]}]}],\"search_query\": \"[LINEORDER_1::Revenue] [PART_1::Color]\",\"answer_columns\": [{\"name\": \"Total Revenue\"},{\"name\": \"Color\"}],\"table\": {\"table_columns\": [{\"column_id\": \"Color\",\"headline_aggregation\": \"COUNT_DISTINCT\"},{\"column_id\": \"Total Revenue\",\"headline_aggregation\": \"SUM\"}],\"ordered_column_ids\": [\"Color\",\"Total Revenue\"],\"client_state\": \"{\\\"dataOffset\\\":0.0,\\\"wrapTableHeader\\\":true}\"},\"chart\": {\"type\": \"COLUMN\",\"chart_columns\": [{\"column_id\": \"Color\"},{\"column_id\": \"Total Revenue\"}],\"axis_configs\": [{\"x\": [\"Color\"],\"y\": [\"Total Revenue\"]}],\"client_state\": \"{\\\"chartProperties\\\":{\\\"gridLines\\\":{},\\\"showRoundedNumbers\\\":true,\\\"chartSpecific\\\":{}},\\\"axisProperties\\\":{\\\"328ec9db-b11b-46e1-8796-3e0fe11abe2b\\\":{\\\"linkedColumns\\\":[\\\"Total Revenue\\\"],\\\"axisType\\\":\\\"Y\\\",\\\"isOpposite\\\":false},\\\"0489741c-2062-41c2-9e02-d02155200d28\\\":{\\\"linkedColumns\\\":[\\\"Color\\\"],\\\"axisType\\\":\\\"X\\\"}},\\\"systemSeriesColors\\\":{\\\"Total Revenue\\\":\\\"#06BF7F\\\"},\\\"version\\\":\\\"V2.1\\\",\\\"columnProperties\\\":{\\\"Color\\\":{},\\\"Total Revenue\\\":{}}}\"},\"display_mode\": \"CHART_MODE\"},\"viz_guid\": \"1e99d70f-c1dc-4a52-9980-cfd4d14ba6d6\"}],\"layout\": {\"tiles\": [{\"visualization_id\": \"Viz_1\",\"size\": \"DEFAULT\"}]}}}" + ] + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/metadata/tml/import", + "operationId": "importMetadata", + "scenario": "positive", + "type": "MANUAL", + "testId": 255 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "metadata_tmls": [ + "{\"guid\": \"1e930169-e47e-4af0-b0b6-83baa7198826\",\"answer\": {\"name\": \"2Lines-1Bar Chart\",\"tables\": [{\"id\": \"CUSTOMER\",\"name\": \"CUSTOMER\"},{\"id\": \"LINEORDER\",\"name\": \"LINEORDER\"}],\"joins\": [{\"id\": \"Lineorder CustKey - Customer CustKey\",\"name\": \"Lineorder CustKey - Customer CustKey\",\"source\": \"LINEORDER\",\"destination\": \"CUSTOMER\"}],\"table_paths\": [{\"id\": \"CUSTOMER_1\",\"table\": \"CUSTOMER\",\"join_path\": [{\"join\": [\"Lineorder CustKey - Customer CustKey\"]}]},{\"id\": \"LINEORDER_1\",\"table\": \"LINEORDER\",\"join_path\": [{}]}],\"search_query\": \"[LINEORDER_1::Revenue] [LINEORDER_1::Tax] [CUSTOMER_1::Customer Region] [CUSTOMER_1::Customer Phone] [LINEORDER_1::Discount]\",\"answer_columns\": [{\"name\": \"Total Revenue\"},{\"name\": \"Total Tax\"},{\"name\": \"Customer Region\"},{\"name\": \"Customer Phone\"},{\"name\": \"Total Discount\"}],\"table\": {\"table_columns\": [{\"column_id\": \"Customer Region\",\"headline_aggregation\": \"COUNT_DISTINCT\"},{\"column_id\": \"Customer Phone\",\"headline_aggregation\": \"COUNT_DISTINCT\"},{\"column_id\": \"Total Revenue\",\"headline_aggregation\": \"SUM\"},{\"column_id\": \"Total Tax\",\"headline_aggregation\": \"SUM\"},{\"column_id\": \"Total Discount\",\"headline_aggregation\": \"SUM\"}],\"ordered_column_ids\": [\"Customer Region\",\"Customer Phone\",\"Total Revenue\",\"Total Tax\",\"Total Discount\"],\"client_state\": \"{\\\"wrapTableHeader\\\":true}\"},\"chart\": {\"type\": \"LINE_COLUMN\",\"chart_columns\": [{\"column_id\": \"Customer Region\"},{\"column_id\": \"Customer Phone\"},{\"column_id\": \"Total Revenue\"},{\"column_id\": \"Total Tax\"},{\"column_id\": \"Total Discount\"}],\"axis_configs\": [{\"x\": [\"Customer Region\"],\"y\": [\"Total Revenue\",\"Total Tax\",\"Total Discount\"]}],\"client_state\": \"{\\\"chartProperties\\\":{\\\"gridLines\\\":{\\\"xGridlineEnabled\\\":true,\\\"yGridlineEnabled\\\":true},\\\"showRoundedNumbers\\\":true,\\\"chartSpecific\\\":{}},\\\"axisProperties\\\":{\\\"d31a3cae-a157-49b3-a657-f0b1409d51e3\\\":{\\\"linkedColumns\\\":[\\\"Total Revenue\\\"],\\\"axisType\\\":\\\"Y\\\",\\\"isOpposite\\\":false},\\\"97b8b422-1fc3-4547-aeef-b10e41828ddd\\\":{\\\"linkedColumns\\\":[\\\"Total Tax\\\"],\\\"axisType\\\":\\\"Y\\\",\\\"isOpposite\\\":true},\\\"1b001fc1-a54f-46b0-b743-03127e14dfdd\\\":{\\\"linkedColumns\\\":[\\\"Total Discount\\\"],\\\"axisType\\\":\\\"Y\\\",\\\"isOpposite\\\":true},\\\"28e25b57-9a3b-4beb-a992-33c6765c9f6e\\\":{\\\"linkedColumns\\\":[\\\"Customer Region\\\"],\\\"axisType\\\":\\\"X\\\"}},\\\"systemSeriesColors\\\":{\\\"Total Revenue\\\":\\\"#68b8e3\\\",\\\"Total Tax\\\":\\\"#e3394a\\\",\\\"Total Discount\\\":\\\"#f5cb4e\\\"},\\\"yAxisShared\\\":false,\\\"gridLineConfig\\\":{\\\"xGridlineEnabled\\\":true,\\\"yGridlineEnabled\\\":true},\\\"version\\\":\\\"V2.1\\\",\\\"columnProperties\\\":{\\\"Customer Region\\\":{},\\\"Customer Phone\\\":{},\\\"Total Revenue\\\":{},\\\"Total Tax\\\":{},\\\"Total Discount\\\":{}}}\"},\"display_mode\": \"CHART_MODE\"}}" + ] + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/metadata/tml/import", + "operationId": "importMetadata", + "scenario": "negative", + "type": "MANUAL", + "testId": 256 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "metadata_tmls": [] + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/metadata/tml/export", + "operationId": "exportMetadata", + "scenario": "positive", + "type": "MANUAL", + "testId": 257 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "metadata": [ + { + "type": "ANSWER", + "identifier": "Pivot table with multiple measures" + } + ] + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/metadata/tml/export", + "operationId": "exportMetadata", + "scenario": "positive", + "type": "MANUAL", + "testId": 258 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "metadata": [ + { + "type": "LIVEBOARD", + "identifier": "KPI Currency Pinboard" + } + ] + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/metadata/tml/export", + "operationId": "exportMetadata", + "scenario": "positive", + "type": "MANUAL", + "testId": 259 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "metadata": [ + { + "type": "LIVEBOARD", + "identifier": "Headline Pinboard" + } + ] + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/metadata/tml/export", + "operationId": "exportMetadata", + "scenario": "positive", + "type": "MANUAL", + "testId": 260 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "metadata": [ + { + "type": "ANSWER", + "identifier": "2Lines-1Bar Chart" + } + ] + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/metadata/tml/export", + "operationId": "exportMetadata", + "scenario": "positive", + "type": "MANUAL", + "testId": 261 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "metadata": [ + { + "type": "ANSWER", + "identifier": "Geo Area -Total Poverty Estimate by State" + } + ] + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/metadata/tml/export", + "operationId": "exportMetadata", + "scenario": "negative", + "type": "MANUAL", + "testId": 262 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "metadata": "" + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/metadata/tml/export", + "operationId": "exportMetadata", + "scenario": "negative", + "type": "MANUAL", + "testId": 263 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "metadata": [ + { + "type": "LIVEBOARD" + } + ] + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/metadata/tml/export", + "operationId": "exportMetadata", + "scenario": "negative", + "type": "MANUAL", + "testId": 264 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "metadata": [ + { + "identifier": "b2d68a4f-cf67-4723-966f-8a592fdbf8b9" + } + ] + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/metadata/tml/export", + "operationId": "exportMetadata", + "scenario": "negative", + "type": "MANUAL", + "testId": 265 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "metadata": [ + { + "type": "ANSWER", + "identifier": "1e930-83baa7198826" + } + ] + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/metadata/tml/export", + "operationId": "exportMetadata", + "scenario": "negative", + "type": "MANUAL", + "testId": 266 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "metadata": [ + { + "type": "ANSWER", + "identifier": "" + } + ] + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/metadata/search", + "operationId": "searchMetadata", + "scenario": "positive", + "type": "MANUAL", + "testId": 267 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": {} + }, + { + "Metadata": { + "path": "/api/rest/2.0/metadata/search", + "operationId": "searchMetadata", + "scenario": "negative", + "type": "MANUAL", + "testId": 268 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "metadata": "abc" + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/metadata/liveboard/sql", + "operationId": "fetchLiveboardSqlQuery", + "scenario": "positive", + "type": "MANUAL", + "testId": 269 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "metadata_identifier": "KPI Currency Pinboard" + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/metadata/liveboard/sql", + "operationId": "fetchLiveboardSqlQuery", + "scenario": "positive", + "type": "MANUAL", + "testId": 270 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "metadata_identifier": "Headline Pinboard" + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/metadata/liveboard/sql", + "operationId": "fetchLiveboardSqlQuery", + "scenario": "positive", + "type": "MANUAL", + "testId": 271 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "metadata_identifier": "Basic Pinboard 2" + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/metadata/liveboard/sql", + "operationId": "fetchLiveboardSqlQuery", + "scenario": "positive", + "type": "MANUAL", + "testId": 272 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "metadata_identifier": "Basic Pinboard 1" + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/metadata/liveboard/sql", + "operationId": "fetchLiveboardSqlQuery", + "scenario": "positive", + "type": "MANUAL", + "testId": 273 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "metadata_identifier": "Revenue Trends" + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/metadata/liveboard/sql", + "operationId": "fetchLiveboardSqlQuery", + "scenario": "negative", + "type": "MANUAL", + "testId": 274 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "metadata_identifier": "" + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/metadata/liveboard/sql", + "operationId": "fetchLiveboardSqlQuery", + "scenario": "negative", + "type": "MANUAL", + "testId": 275 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "metadata_identifier": "c836aa0-e07cb9eb6ab1" + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/metadata/liveboard/sql", + "operationId": "fetchLiveboardSqlQuery", + "scenario": "negative", + "type": "MANUAL", + "testId": 276 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": {} + }, + { + "Metadata": { + "path": "/api/rest/2.0/metadata/liveboard/sql", + "operationId": "fetchLiveboardSqlQuery", + "scenario": "negative", + "type": "MANUAL", + "testId": 277 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "metadata_identifier": "775-bf34-e082c4bc41c3" + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/metadata/liveboard/sql", + "operationId": "fetchLiveboardSqlQuery", + "scenario": "negative", + "type": "MANUAL", + "testId": 278 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "metadata_identifier": "6715f768-8930-4180-dbfaa8e7f" + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/metadata/liveboard/sql", + "operationId": "fetchLiveboardSqlQuery", + "scenario": "negative", + "type": "MANUAL", + "testId": 279 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "metadata_identifier": "0fb54198-868d-45de-8929-139b0089e964" + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/metadata/answer/sql", + "operationId": "fetchAnswerSqlQuery", + "scenario": "positive", + "type": "MANUAL", + "testId": 280 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "metadata_identifier": "2Lines-1Bar Chart" + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/metadata/answer/sql", + "operationId": "fetchAnswerSqlQuery", + "scenario": "positive", + "type": "MANUAL", + "testId": 281 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "metadata_identifier": "Basic Answer 1" + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/metadata/answer/sql", + "operationId": "fetchAnswerSqlQuery", + "scenario": "positive", + "type": "MANUAL", + "testId": 282 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "metadata_identifier": "Stacked chart with line" + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/metadata/answer/sql", + "operationId": "fetchAnswerSqlQuery", + "scenario": "positive", + "type": "MANUAL", + "testId": 283 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "metadata_identifier": "Geo Area -Total Poverty Estimate by State" + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/metadata/answer/sql", + "operationId": "fetchAnswerSqlQuery", + "scenario": "positive", + "type": "MANUAL", + "testId": 284 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "metadata_identifier": "Pivot table with multiple measures" + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/metadata/answer/sql", + "operationId": "fetchAnswerSqlQuery", + "scenario": "negative", + "type": "MANUAL", + "testId": 285 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "metadata_identifier": "" + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/metadata/answer/sql", + "operationId": "fetchAnswerSqlQuery", + "scenario": "negative", + "type": "MANUAL", + "testId": 286 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "metadata_identifier": "c836aa0-e07cb9eb6ab1" + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/metadata/answer/sql", + "operationId": "fetchAnswerSqlQuery", + "scenario": "negative", + "type": "MANUAL", + "testId": 287 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": {} + }, + { + "Metadata": { + "path": "/api/rest/2.0/metadata/answer/sql", + "operationId": "fetchAnswerSqlQuery", + "scenario": "negative", + "type": "MANUAL", + "testId": 288 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "metadata_identifier": "775-bf34-e082c4bc41c3" + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/metadata/answer/sql", + "operationId": "fetchAnswerSqlQuery", + "scenario": "negative", + "type": "MANUAL", + "testId": 289 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "metadata_identifier": "6715f768-8930-4180-dbfaa8e7f" + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/metadata/answer/sql", + "operationId": "fetchAnswerSqlQuery", + "scenario": "negative", + "type": "MANUAL", + "testId": 290 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "metadata_identifier": "0fb54198-868d-45de-8929-139b0089e964" + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/vcs/git/config/create", + "operationId": "createConfig", + "scenario": "positive", + "type": "MANUAL", + "testId": 291 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "repository_url": "https://github.com/ravishah2312/test-api", + "username": "ravishah2312", + "access_token": "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" + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/vcs/git/config/create", + "operationId": "createConfig", + "scenario": "positive", + "type": "MANUAL", + "testId": 292 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "repository_url": "https://github.com/ravishah2312/test-api2", + "username": "ravishah2312", + "access_token": "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" + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/vcs/git/config/create", + "operationId": "createConfig", + "scenario": "positive", + "type": "MANUAL", + "testId": 293 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "repository_url": "https://github.com/ravishah2312/test-api3", + "username": "ravishah2312", + "access_token": "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" + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/vcs/git/config/create", + "operationId": "createConfig", + "scenario": "positive", + "type": "MANUAL", + "testId": 294 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "repository_url": "https://github.com/ravishah2312/test-api4", + "username": "ravishah2312", + "access_token": "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" + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/vcs/git/config/create", + "operationId": "createConfig", + "scenario": "positive", + "type": "MANUAL", + "testId": 295 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "repository_url": "https://github.com/ravishah2312/test-api5", + "username": "ravishah2312", + "access_token": "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" + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/vcs/git/config/create", + "operationId": "createConfig", + "scenario": "negative", + "type": "MANUAL", + "testId": 296 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "repository_url": "https://.com/jishnup007/test-repo.git", + "username": "jishnup007", + "access_token": "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" + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/vcs/git/config/create", + "operationId": "createConfig", + "scenario": "negative", + "type": "MANUAL", + "testId": 297 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "repository_url": "https://github.com/ravishah2312/-api", + "username": "ravishah2312", + "access_token": "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" + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/vcs/git/config/create", + "operationId": "createConfig", + "scenario": "negative", + "type": "MANUAL", + "testId": 298 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "repository_url": "https://github.com/ravishah2312/test-api2", + "username": "ravishah-", + "access_token": "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" + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/vcs/git/config/create", + "operationId": "createConfig", + "scenario": "negative", + "type": "MANUAL", + "testId": 299 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "repository_url": "https://github.com/ravishah2312/test-api3", + "username": "ravishah2312", + "access_token": "qG3diqXxyiO7YqQyYdmDbJ519R4Ybe0En4US" + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/vcs/git/config/create", + "operationId": "createConfig", + "scenario": "negative", + "type": "MANUAL", + "testId": 300 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "repository_url": "https://github.com/ravishah2312/test-api4", + "access_token": "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" + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/vcs/git/config/create", + "operationId": "createConfig", + "scenario": "negative", + "type": "MANUAL", + "testId": 301 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "repository_url": "https://github.com/ravishah2312/test-api5", + "username": "ravishah2312" + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/vcs/git/config/update", + "operationId": "updateConfig", + "scenario": "positive", + "type": "MANUAL", + "testId": 302 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "username": "ravishah2312", + "access_token": "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" + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/vcs/git/config/update", + "operationId": "updateConfig", + "scenario": "negative", + "type": "MANUAL", + "testId": 303 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "username": "jishnup007", + "access_token": "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" + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/vcs/git/config/search", + "operationId": "searchConfig", + "scenario": "positive", + "type": "MANUAL", + "testId": 304 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": {} + }, + { + "Metadata": { + "path": "/api/rest/2.0/vcs/git/config/search", + "operationId": "searchConfig", + "scenario": "positive", + "type": "MANUAL", + "testId": 305 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": {} + }, + { + "Metadata": { + "path": "/api/rest/2.0/vcs/git/config/search", + "operationId": "searchConfig", + "scenario": "positive", + "type": "MANUAL", + "testId": 306 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": {} + }, + { + "Metadata": { + "path": "/api/rest/2.0/vcs/git/config/search", + "operationId": "searchConfig", + "scenario": "positive", + "type": "MANUAL", + "testId": 307 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": {} + }, + { + "Metadata": { + "path": "/api/rest/2.0/vcs/git/config/search", + "operationId": "searchConfig", + "scenario": "positive", + "type": "MANUAL", + "testId": 308 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": {} + }, + { + "Metadata": { + "path": "/api/rest/2.0/vcs/git/config/search", + "operationId": "searchConfig", + "scenario": "negative", + "type": "MANUAL", + "testId": 309 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "org_identifiers": 123 + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/vcs/git/commits/search", + "operationId": "searchCommits", + "scenario": "positive", + "type": "MANUAL", + "testId": 310 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "metadata_identifier": "KPI Currency Pinboard", + "metadata_type": "LIVEBOARD", + "branch_name": "main" + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/vcs/git/commits/search", + "operationId": "searchCommits", + "scenario": "positive", + "type": "MANUAL", + "testId": 311 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "metadata_identifier": "Headline Pinboard", + "metadata_type": "LIVEBOARD", + "branch_name": "main" + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/vcs/git/commits/search", + "operationId": "searchCommits", + "scenario": "positive", + "type": "MANUAL", + "testId": 312 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "metadata_identifier": "Revenue Trends", + "metadata_type": "LIVEBOARD", + "branch_name": "main" + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/vcs/git/commits/search", + "operationId": "searchCommits", + "scenario": "positive", + "type": "MANUAL", + "testId": 313 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "metadata_identifier": "2Lines-1Bar Chart", + "metadata_type": "ANSWER", + "branch_name": "main" + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/vcs/git/commits/search", + "operationId": "searchCommits", + "scenario": "positive", + "type": "MANUAL", + "testId": 314 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "metadata_identifier": "Stacked chart with line ", + "metadata_type": "ANSWER", + "branch_name": "main" + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/vcs/git/commits/search", + "operationId": "searchCommits", + "scenario": "positive", + "type": "MANUAL", + "testId": 315 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "metadata_identifier": "agency", + "metadata_type": "LOGICAL_TABLE", + "branch_name": "main" + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/vcs/git/commits/search", + "operationId": "searchCommits", + "scenario": "negative", + "type": "MANUAL", + "testId": 316 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "metadata_identifier": "9bd2f5-d431-44bf-9a07-b4f7be372125", + "metadata_type": "LIVEBOARD" + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/vcs/git/commits/search", + "operationId": "searchCommits", + "scenario": "negative", + "type": "MANUAL", + "testId": 317 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "metadata_identifier": "b2d68a4f-c-8a592fdbf8b9", + "metadata_type": "LIVEBOARD" + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/vcs/git/commits/search", + "operationId": "searchCommits", + "scenario": "negative", + "type": "MANUAL", + "testId": 318 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "metadata_identifier": "6715f768-8930-4180-9a3d-1efdbfaa8e7f", + "metadata_type": "" + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/vcs/git/commits/search", + "operationId": "searchCommits", + "scenario": "negative", + "type": "MANUAL", + "testId": 319 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "metadata_identifier": "", + "metadata_type": "ANSWER" + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/vcs/git/commits/search", + "operationId": "searchCommits", + "scenario": "negative", + "type": "MANUAL", + "testId": 320 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "metadata_identifier": "d305bc51-688b-414f-badc-94579d48308c" + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/vcs/git/commits/search", + "operationId": "searchCommits", + "scenario": "negative", + "type": "MANUAL", + "testId": 321 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "metadata_identifier": "", + "metadata_type": "LOGICAL_TABLE" + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/vcs/git/branches/commit", + "operationId": "commitBranch", + "scenario": "positive", + "type": "MANUAL", + "testId": 322 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "metadata": [ + { + "identifier": "Supplier Worksheet", + "type": "LOGICAL_TABLE" + } + ], + "comment": "test comment", + "branch_name": "main" + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/vcs/git/branches/commit", + "operationId": "commitBranch", + "scenario": "positive", + "type": "MANUAL", + "testId": 323 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "metadata": [ + { + "type": "LIVEBOARD", + "identifier": "Headline Pinboard" + } + ], + "comment": "test comment", + "branch_name": "main" + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/vcs/git/branches/commit", + "operationId": "commitBranch", + "scenario": "positive", + "type": "MANUAL", + "testId": 324 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "metadata": [ + { + "type": "LIVEBOARD", + "identifier": "KPI Currency Pinboard" + } + ], + "comment": "test comment", + "branch_name": "main" + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/vcs/git/branches/commit", + "operationId": "commitBranch", + "scenario": "positive", + "type": "MANUAL", + "testId": 325 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "metadata": [ + { + "identifier": "agency", + "type": "LOGICAL_TABLE" + } + ], + "comment": "test comment", + "branch_name": "main" + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/vcs/git/branches/commit", + "operationId": "commitBranch", + "scenario": "positive", + "type": "MANUAL", + "testId": 326 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "metadata": [ + { + "type": "ANSWER", + "identifier": "Basic Answer 1" + } + ], + "comment": "test comment", + "branch_name": "main" + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/vcs/git/branches/commit", + "operationId": "commitBranch", + "scenario": "positive", + "type": "MANUAL", + "testId": 327 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "metadata": [ + { + "type": "ANSWER", + "identifier": "2Lines-1Bar Chart" + } + ], + "comment": "test comment", + "branch_name": "main" + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/vcs/git/branches/commit", + "operationId": "commitBranch", + "scenario": "negative", + "type": "MANUAL", + "testId": 328 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "metadata": [ + { + "identifier": "", + "type": "LOGICAL_TABLE" + } + ], + "comment": "" + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/vcs/git/branches/commit", + "operationId": "commitBranch", + "scenario": "negative", + "type": "MANUAL", + "testId": 329 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "metadata": [ + { + "identifier": "c836ad16-660d-4d28-a3a0-e07cb9eb6ab1" + } + ], + "comment": "test comment", + "branch_name": "main" + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/vcs/git/branches/commit", + "operationId": "commitBranch", + "scenario": "negative", + "type": "MANUAL", + "testId": 330 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "metadata": [ + { + "type": "LIVEBOARD", + "identifier": "b2d68-8a592fdbf8b9" + } + ], + "comment": "test comment", + "branch_name": "main" + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/vcs/git/branches/commit", + "operationId": "commitBranch", + "scenario": "negative", + "type": "MANUAL", + "testId": 331 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "comment": "test comment", + "branch_name": "main" + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/vcs/git/branches/commit", + "operationId": "commitBranch", + "scenario": "negative", + "type": "MANUAL", + "testId": 332 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "metadata": [ + { + "type": "ANSWER", + "identifier": "1e930169-e47e-4af0-b0b6-83baa7198826" + } + ], + "branch_name": "main" + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/vcs/git/branches/commit", + "operationId": "commitBranch", + "scenario": "negative", + "type": "MANUAL", + "testId": 333 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "metadata": [ + { + "type": "ANSWER", + "identifier": "d305bc51-688b-414f-badc-94579d48308c" + } + ], + "comment": "test comment" + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/vcs/git/branches/validate", + "operationId": "validateMerge", + "scenario": "positive", + "type": "MANUAL", + "testId": 334 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "source_branch_name": "main-test", + "target_branch_name": "main-test2" + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/vcs/git/branches/validate", + "operationId": "validateMerge", + "scenario": "positive", + "type": "MANUAL", + "testId": 335 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "source_branch_name": "main-test", + "target_branch_name": "main-test5" + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/vcs/git/branches/validate", + "operationId": "validateMerge", + "scenario": "positive", + "type": "MANUAL", + "testId": 336 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "source_branch_name": "main-test3", + "target_branch_name": "main-test4" + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/vcs/git/branches/validate", + "operationId": "validateMerge", + "scenario": "positive", + "type": "MANUAL", + "testId": 337 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "source_branch_name": "main-test2", + "target_branch_name": "main-test5" + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/vcs/git/branches/validate", + "operationId": "validateMerge", + "scenario": "positive", + "type": "MANUAL", + "testId": 338 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "source_branch_name": "main-test3", + "target_branch_name": "main-test" + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/vcs/git/branches/validate", + "operationId": "validateMerge", + "scenario": "negative", + "type": "MANUAL", + "testId": 339 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "source_branch_name": "main", + "target_branch_name": "" + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/vcs/git/branches/validate", + "operationId": "validateMerge", + "scenario": "negative", + "type": "MANUAL", + "testId": 340 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "source_branch_name": "", + "target_branch_name": "main-test2" + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/vcs/git/branches/validate", + "operationId": "validateMerge", + "scenario": "negative", + "type": "MANUAL", + "testId": 341 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "source_branch_name": "main-test", + "target_branch_name": "" + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/vcs/git/branches/validate", + "operationId": "validateMerge", + "scenario": "negative", + "type": "MANUAL", + "testId": 342 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "target_branch_name": "main-test4" + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/vcs/git/branches/validate", + "operationId": "validateMerge", + "scenario": "negative", + "type": "MANUAL", + "testId": 343 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "source_branch_name": "main-test2" + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/vcs/git/branches/validate", + "operationId": "validateMerge", + "scenario": "negative", + "type": "MANUAL", + "testId": 344 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "source_branch_name": "", + "target_branch_name": "" + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/vcs/git/commits/deploy", + "operationId": "deployCommit", + "scenario": "positive", + "type": "MANUAL", + "testId": 345 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": {} + }, + { + "Metadata": { + "path": "/api/rest/2.0/vcs/git/commits/deploy", + "operationId": "deployCommit", + "scenario": "positive", + "type": "MANUAL", + "testId": 346 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": {} + }, + { + "Metadata": { + "path": "/api/rest/2.0/vcs/git/commits/deploy", + "operationId": "deployCommit", + "scenario": "positive", + "type": "MANUAL", + "testId": 347 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": {} + }, + { + "Metadata": { + "path": "/api/rest/2.0/vcs/git/commits/deploy", + "operationId": "deployCommit", + "scenario": "positive", + "type": "MANUAL", + "testId": 348 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": {} + }, + { + "Metadata": { + "path": "/api/rest/2.0/vcs/git/commits/deploy", + "operationId": "deployCommit", + "scenario": "positive", + "type": "MANUAL", + "testId": 349 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": {} + }, + { + "Metadata": { + "path": "/api/rest/2.0/vcs/git/commits/deploy", + "operationId": "deployCommit", + "scenario": "negative", + "type": "MANUAL", + "testId": 350 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "file_name": "" + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/connection/create", + "operationId": "createConnection", + "scenario": "positive", + "type": "MANUAL", + "testId": 351 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "name": "Testconnection - 4", + "data_warehouse_type": "TERADATA", + "data_warehouse_config": { + "configuration": { + "accountName": "thoughtspot_partner", + "user": "tsadmin", + "password": "TestConn123", + "role": "sysadmin", + "warehouse": "MEDIUM_WH" + }, + "externalDatabases": [ + { + "name": "AllDatatypes", + "isAutoCreated": false, + "schemas": [ + { + "name": "alldatatypes", + "tables": [ + { + "name": "allDatatypes", + "type": "TABLE", + "description": "", + "selected": true, + "linked": true, + "columns": [ + { + "name": "CNUMBER", + "type": "INT64", + "canImport": true, + "selected": true, + "isLinkedActive": true, + "isImported": false, + "tableName": "allDatatypes", + "schemaName": "alldatatypes", + "dbName": "AllDatatypes" + }, + { + "name": "CDECIMAL", + "type": "INT64", + "canImport": true, + "selected": true, + "isLinkedActive": true, + "isImported": false, + "tableName": "allDatatypes", + "schemaName": "alldatatypes", + "dbName": "AllDatatypes" + } + ] + } + ] + } + ] + } + ] + } + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/connection/create", + "operationId": "createConnection", + "scenario": "positive", + "type": "MANUAL", + "testId": 352 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "name": "Testconnection - 5", + "data_warehouse_type": "TERADATA", + "data_warehouse_config": { + "configuration": { + "accountName": "thoughtspot_partner", + "user": "tsadmin", + "password": "TestConn123", + "role": "sysadmin", + "warehouse": "MEDIUM_WH" + }, + "externalDatabases": [ + { + "name": "AllDatatypes", + "isAutoCreated": false, + "schemas": [ + { + "name": "alldatatypes", + "tables": [ + { + "name": "allDatatypes", + "type": "TABLE", + "description": "", + "selected": true, + "linked": true, + "columns": [ + { + "name": "CNUMBER", + "type": "INT64", + "canImport": true, + "selected": true, + "isLinkedActive": true, + "isImported": false, + "tableName": "allDatatypes", + "schemaName": "alldatatypes", + "dbName": "AllDatatypes" + }, + { + "name": "CDECIMAL", + "type": "INT64", + "canImport": true, + "selected": true, + "isLinkedActive": true, + "isImported": false, + "tableName": "allDatatypes", + "schemaName": "alldatatypes", + "dbName": "AllDatatypes" + } + ] + } + ] + } + ] + } + ] + } + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/connection/create", + "operationId": "createConnection", + "scenario": "positive", + "type": "MANUAL", + "testId": 353 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "name": "Testconnection - 6", + "data_warehouse_type": "TERADATA", + "data_warehouse_config": { + "configuration": { + "accountName": "thoughtspot_partner", + "user": "tsadmin", + "password": "TestConn123", + "role": "sysadmin", + "warehouse": "MEDIUM_WH" + }, + "externalDatabases": [ + { + "name": "AllDatatypes", + "isAutoCreated": false, + "schemas": [ + { + "name": "alldatatypes", + "tables": [ + { + "name": "allDatatypes", + "type": "TABLE", + "description": "", + "selected": true, + "linked": true, + "columns": [ + { + "name": "CNUMBER", + "type": "INT64", + "canImport": true, + "selected": true, + "isLinkedActive": true, + "isImported": false, + "tableName": "allDatatypes", + "schemaName": "alldatatypes", + "dbName": "AllDatatypes" + }, + { + "name": "CDECIMAL", + "type": "INT64", + "canImport": true, + "selected": true, + "isLinkedActive": true, + "isImported": false, + "tableName": "allDatatypes", + "schemaName": "alldatatypes", + "dbName": "AllDatatypes" + } + ] + } + ] + } + ] + } + ] + } + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/connection/create", + "operationId": "createConnection", + "scenario": "positive", + "type": "MANUAL", + "testId": 354 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "name": "Testconnection - 7", + "data_warehouse_type": "TERADATA", + "data_warehouse_config": { + "configuration": { + "accountName": "thoughtspot_partner", + "user": "tsadmin", + "password": "TestConn123", + "role": "sysadmin", + "warehouse": "MEDIUM_WH" + }, + "externalDatabases": [ + { + "name": "AllDatatypes", + "isAutoCreated": false, + "schemas": [ + { + "name": "alldatatypes", + "tables": [ + { + "name": "allDatatypes", + "type": "TABLE", + "description": "", + "selected": true, + "linked": true, + "columns": [ + { + "name": "CNUMBER", + "type": "INT64", + "canImport": true, + "selected": true, + "isLinkedActive": true, + "isImported": false, + "tableName": "allDatatypes", + "schemaName": "alldatatypes", + "dbName": "AllDatatypes" + }, + { + "name": "CDECIMAL", + "type": "INT64", + "canImport": true, + "selected": true, + "isLinkedActive": true, + "isImported": false, + "tableName": "allDatatypes", + "schemaName": "alldatatypes", + "dbName": "AllDatatypes" + } + ] + } + ] + } + ] + } + ] + } + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/connection/create", + "operationId": "createConnection", + "scenario": "positive", + "type": "MANUAL", + "testId": 355 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "name": "Testconnection - 8", + "data_warehouse_type": "TERADATA", + "data_warehouse_config": { + "configuration": { + "accountName": "thoughtspot_partner", + "user": "tsadmin", + "password": "TestConn123", + "role": "sysadmin", + "warehouse": "MEDIUM_WH" + }, + "externalDatabases": [ + { + "name": "AllDatatypes", + "isAutoCreated": false, + "schemas": [ + { + "name": "alldatatypes", + "tables": [ + { + "name": "allDatatypes", + "type": "TABLE", + "description": "", + "selected": true, + "linked": true, + "columns": [ + { + "name": "CNUMBER", + "type": "INT64", + "canImport": true, + "selected": true, + "isLinkedActive": true, + "isImported": false, + "tableName": "allDatatypes", + "schemaName": "alldatatypes", + "dbName": "AllDatatypes" + }, + { + "name": "CDECIMAL", + "type": "INT64", + "canImport": true, + "selected": true, + "isLinkedActive": true, + "isImported": false, + "tableName": "allDatatypes", + "schemaName": "alldatatypes", + "dbName": "AllDatatypes" + } + ] + } + ] + } + ] + } + ] + } + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/connection/create", + "operationId": "createConnection", + "scenario": "positive", + "type": "MANUAL", + "testId": 356 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "name": "Testconnection - 9", + "data_warehouse_type": "TERADATA", + "data_warehouse_config": { + "configuration": { + "accountName": "thoughtspot_partner", + "user": "tsadmin", + "password": "TestConn123", + "role": "sysadmin", + "warehouse": "MEDIUM_WH" + }, + "externalDatabases": [ + { + "name": "AllDatatypes", + "isAutoCreated": false, + "schemas": [ + { + "name": "alldatatypes", + "tables": [ + { + "name": "allDatatypes", + "type": "TABLE", + "description": "", + "selected": true, + "linked": true, + "columns": [ + { + "name": "CNUMBER", + "type": "INT64", + "canImport": true, + "selected": true, + "isLinkedActive": true, + "isImported": false, + "tableName": "allDatatypes", + "schemaName": "alldatatypes", + "dbName": "AllDatatypes" + }, + { + "name": "CDECIMAL", + "type": "INT64", + "canImport": true, + "selected": true, + "isLinkedActive": true, + "isImported": false, + "tableName": "allDatatypes", + "schemaName": "alldatatypes", + "dbName": "AllDatatypes" + } + ] + } + ] + } + ] + } + ] + } + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/connection/create", + "operationId": "createConnection", + "scenario": "positive", + "type": "MANUAL", + "testId": 357 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "name": "Testconnection - 10", + "data_warehouse_type": "TERADATA", + "data_warehouse_config": { + "configuration": { + "accountName": "thoughtspot_partner", + "user": "tsadmin", + "password": "TestConn123", + "role": "sysadmin", + "warehouse": "MEDIUM_WH" + }, + "externalDatabases": [ + { + "name": "AllDatatypes", + "isAutoCreated": false, + "schemas": [ + { + "name": "alldatatypes", + "tables": [ + { + "name": "allDatatypes", + "type": "TABLE", + "description": "", + "selected": true, + "linked": true, + "columns": [ + { + "name": "CNUMBER", + "type": "INT64", + "canImport": true, + "selected": true, + "isLinkedActive": true, + "isImported": false, + "tableName": "allDatatypes", + "schemaName": "alldatatypes", + "dbName": "AllDatatypes" + }, + { + "name": "CDECIMAL", + "type": "INT64", + "canImport": true, + "selected": true, + "isLinkedActive": true, + "isImported": false, + "tableName": "allDatatypes", + "schemaName": "alldatatypes", + "dbName": "AllDatatypes" + } + ] + } + ] + } + ] + } + ] + } + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/connection/create", + "operationId": "createConnection", + "scenario": "negative", + "type": "MANUAL", + "testId": 358 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "name": "abc", + "data_warehouse_type": "", + "data_warehouse_config": {} + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/connection/create", + "operationId": "createConnection", + "scenario": "negative", + "type": "MANUAL", + "testId": 359 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "name": "", + "data_warehouse_type": "TERADATA", + "data_warehouse_config": {} + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/connection/create", + "operationId": "createConnection", + "scenario": "negative", + "type": "MANUAL", + "testId": 360 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "name": "abc", + "data_warehouse_type": "TERADATA", + "data_warehouse_config": "" + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/connection/create", + "operationId": "createConnection", + "scenario": "negative", + "type": "MANUAL", + "testId": 361 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "name": "", + "data_warehouse_type": "TERADATA", + "data_warehouse_config": {} + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/connection/create", + "operationId": "createConnection", + "scenario": "negative", + "type": "MANUAL", + "testId": 362 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "name": "abc" + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/connection/create", + "operationId": "createConnection", + "scenario": "negative", + "type": "MANUAL", + "testId": 363 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "data_warehouse_type": "TERADATA" + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/connection/update", + "operationId": "updateConnection", + "scenario": "positive", + "type": "MANUAL", + "testId": 364 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "connection_identifier": "Testconnection - 4" + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/connection/update", + "operationId": "updateConnection", + "scenario": "positive", + "type": "MANUAL", + "testId": 365 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "connection_identifier": "Testconnection - 5" + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/connection/update", + "operationId": "updateConnection", + "scenario": "positive", + "type": "MANUAL", + "testId": 366 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "connection_identifier": "Testconnection - 6" + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/connection/update", + "operationId": "updateConnection", + "scenario": "positive", + "type": "MANUAL", + "testId": 367 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "connection_identifier": "Testconnection - 7" + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/connection/update", + "operationId": "updateConnection", + "scenario": "positive", + "type": "MANUAL", + "testId": 368 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "connection_identifier": "Testconnection - 8" + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/connection/update", + "operationId": "updateConnection", + "scenario": "positive", + "type": "MANUAL", + "testId": 369 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "connection_identifier": "Testconnection - 9" + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/connection/update", + "operationId": "updateConnection", + "scenario": "positive", + "type": "MANUAL", + "testId": 370 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "connection_identifier": "Testconnection - 10" + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/connection/update", + "operationId": "updateConnection", + "scenario": "negative", + "type": "MANUAL", + "testId": 371 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "connection_identifier": "Testconnection - 2" + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/connection/update", + "operationId": "updateConnection", + "scenario": "negative", + "type": "MANUAL", + "testId": 372 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": {} + }, + { + "Metadata": { + "path": "/api/rest/2.0/connection/update", + "operationId": "updateConnection", + "scenario": "negative", + "type": "MANUAL", + "testId": 373 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "connection_identifier": "Testconnection - 2" + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/connection/update", + "operationId": "updateConnection", + "scenario": "negative", + "type": "MANUAL", + "testId": 374 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "connection_identifier": "" + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/connection/update", + "operationId": "updateConnection", + "scenario": "negative", + "type": "MANUAL", + "testId": 375 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "connection_identifier": 123 + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/roles/create", + "operationId": "createRole", + "scenario": "positive", + "type": "MANUAL", + "testId": 376 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "name": "testing1" + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/roles/create", + "operationId": "createRole", + "scenario": "positive", + "type": "MANUAL", + "testId": 377 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "name": "testing2" + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/roles/create", + "operationId": "createRole", + "scenario": "positive", + "type": "MANUAL", + "testId": 378 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "name": "testing3" + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/roles/create", + "operationId": "createRole", + "scenario": "positive", + "type": "MANUAL", + "testId": 379 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "name": "testing4" + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/roles/create", + "operationId": "createRole", + "scenario": "positive", + "type": "MANUAL", + "testId": 380 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "name": "testing5" + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/roles/create", + "operationId": "createRole", + "scenario": "negative", + "type": "MANUAL", + "testId": 381 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "name": "" + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/roles/create", + "operationId": "createRole", + "scenario": "negative", + "type": "MANUAL", + "testId": 382 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "description": "TESTING" + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/roles/create", + "operationId": "createRole", + "scenario": "negative", + "type": "MANUAL", + "testId": 383 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": {} + }, + { + "Metadata": { + "path": "/api/rest/2.0/roles/create", + "operationId": "createRole", + "scenario": "negative", + "type": "MANUAL", + "testId": 384 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "name": "testing_user", + "privileges": [ + "random" + ] + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/roles/create", + "operationId": "createRole", + "scenario": "negative", + "type": "MANUAL", + "testId": 385 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "name": "testing_user", + "privileges": [ + null + ] + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/roles/{role_identifier}/update", + "operationId": "updateRole", + "scenario": "positive", + "type": "MANUAL", + "testId": 386 + }, + "Path_Variables": { + "role_identifier": "testing1" + }, + "Query_Variables": {}, + "Body": { + "name": "updated_testing1" + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/roles/{role_identifier}/update", + "operationId": "updateRole", + "scenario": "positive", + "type": "MANUAL", + "testId": 387 + }, + "Path_Variables": { + "role_identifier": "testing2" + }, + "Query_Variables": {}, + "Body": { + "name": "updated_testing2", + "description": "testing" + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/roles/{role_identifier}/update", + "operationId": "updateRole", + "scenario": "positive", + "type": "MANUAL", + "testId": 388 + }, + "Path_Variables": { + "role_identifier": "testing3" + }, + "Query_Variables": {}, + "Body": { + "name": "updated_testing3", + "privileges": [ + "USERDATAUPLOADING" + ] + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/roles/{role_identifier}/update", + "operationId": "updateRole", + "scenario": "positive", + "type": "MANUAL", + "testId": 389 + }, + "Path_Variables": { + "role_identifier": "testing4" + }, + "Query_Variables": {}, + "Body": { + "name": "updated_testing4", + "privileges": [ + "USERDATAUPLOADING" + ], + "description": "testing" + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/roles/{role_identifier}/update", + "operationId": "updateRole", + "scenario": "positive", + "type": "MANUAL", + "testId": 390 + }, + "Path_Variables": { + "role_identifier": "testing5" + }, + "Query_Variables": {}, + "Body": { + "name": "updated_testing5" + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/roles/{role_identifier}/update", + "operationId": "updateRole", + "scenario": "negative", + "type": "MANUAL", + "testId": 391 + }, + "Path_Variables": { + "role_identifier": "testing5" + }, + "Query_Variables": {}, + "Body": { + "privileges": [ + "random" + ] + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/roles/{role_identifier}/update", + "operationId": "updateRole", + "scenario": "negative", + "type": "MANUAL", + "testId": 392 + }, + "Path_Variables": { + "role_identifier": "" + }, + "Query_Variables": {}, + "Body": { + "name": "testing", + "privileges": [ + "random" + ] + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/roles/{role_identifier}/update", + "operationId": "updateRole", + "scenario": "negative", + "type": "MANUAL", + "testId": 393 + }, + "Path_Variables": { + "role_identifier": "random" + }, + "Query_Variables": {}, + "Body": { + "privileges": [ + "USERDATAUPLOADING" + ] + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/roles/{role_identifier}/update", + "operationId": "updateRole", + "scenario": "negative", + "type": "MANUAL", + "testId": 394 + }, + "Path_Variables": { + "role_identifier": "random" + }, + "Query_Variables": {}, + "Body": {} + }, + { + "Metadata": { + "path": "/api/rest/2.0/roles/{role_identifier}/update", + "operationId": "updateRole", + "scenario": "negative", + "type": "MANUAL", + "testId": 395 + }, + "Path_Variables": { + "role_identifier": "random" + }, + "Query_Variables": {}, + "Body": { + "description": "ranodm" + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/roles/search", + "operationId": "searchRoles", + "scenario": "positive", + "type": "MANUAL", + "testId": 396 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": {} + }, + { + "Metadata": { + "path": "/api/rest/2.0/roles/search", + "operationId": "searchRoles", + "scenario": "positive", + "type": "MANUAL", + "testId": 397 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "role_identifiers": [ + "testing1" + ] + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/roles/search", + "operationId": "searchRoles", + "scenario": "positive", + "type": "MANUAL", + "testId": 398 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "privileges": [ + "ADMINISTRATION" + ] + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/roles/search", + "operationId": "searchRoles", + "scenario": "positive", + "type": "MANUAL", + "testId": 399 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "permissions": [ + "MODIFY" + ] + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/roles/search", + "operationId": "searchRoles", + "scenario": "positive", + "type": "MANUAL", + "testId": 400 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "external": true, + "shared_via_connection": true + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/roles/search", + "operationId": "searchRoles", + "scenario": "negative", + "type": "MANUAL", + "testId": 401 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "privileges": [ + "random" + ] + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/roles/search", + "operationId": "searchRoles", + "scenario": "negative", + "type": "MANUAL", + "testId": 402 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "permissions": [ + "random" + ] + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/roles/search", + "operationId": "searchRoles", + "scenario": "negative", + "type": "MANUAL", + "testId": 403 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "permissions": [ + null + ] + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/roles/search", + "operationId": "searchRoles", + "scenario": "negative", + "type": "MANUAL", + "testId": 404 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "privileges": [ + null + ] + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/schedules/create", + "operationId": "createSchedule", + "scenario": "positive", + "type": "MANUAL", + "testId": 405 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "name": "testing9", + "description": "testing9", + "metadata_type": "LIVEBOARD", + "metadata_identifier": "KPI Currency Pinboard", + "time_zone": "America/Los_Angeles", + "recipient_details": { + "emails": [ + "testuser9@thoughtspot.com" + ] + } + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/schedules/create", + "operationId": "createSchedule", + "scenario": "positive", + "type": "MANUAL", + "testId": 406 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "name": "testing8", + "description": "testing9", + "metadata_type": "LIVEBOARD", + "metadata_identifier": "Headline Pinboard", + "time_zone": "America/Los_Angeles", + "recipient_details": { + "emails": [ + "testuser8@thoughtspot.com" + ] + } + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/schedules/create", + "operationId": "createSchedule", + "scenario": "positive", + "type": "MANUAL", + "testId": 407 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "name": "testing7", + "description": "testing7", + "metadata_type": "LIVEBOARD", + "metadata_identifier": "9Basic Pinboard 2", + "time_zone": "America/Los_Angeles", + "recipient_details": { + "emails": [ + "testuser7@thoughtspot.com" + ] + } + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/schedules/create", + "operationId": "createSchedule", + "scenario": "positive", + "type": "MANUAL", + "testId": 408 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "name": "testing6", + "description": "testing6", + "metadata_type": "LIVEBOARD", + "metadata_identifier": "Basic Pinboard 1", + "time_zone": "America/Los_Angeles", + "recipient_details": { + "emails": [ + "testuser6@thoughtspot.com" + ] + } + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/schedules/create", + "operationId": "createSchedule", + "scenario": "positive", + "type": "MANUAL", + "testId": 409 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "name": "testing5", + "description": "testing5", + "metadata_type": "LIVEBOARD", + "metadata_identifier": "Revenue Trends", + "time_zone": "America/Los_Angeles", + "recipient_details": { + "emails": [ + "testuser5@thoughtspot.com" + ] + } + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/schedules/create", + "operationId": "createSchedule", + "scenario": "negative", + "type": "MANUAL", + "testId": 410 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "description": "testing2", + "metadata_type": "LIVEBOARD", + "metadata_identifier": "testing", + "time_zone": "America/Los_Angeles", + "recipient_details": { + "emails": [ + "testuser@thoughtspot.com" + ] + } + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/schedules/create", + "operationId": "createSchedule", + "scenario": "negative", + "type": "MANUAL", + "testId": 411 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "name": "testing9", + "metadata_type": "LIVEBOARD", + "metadata_identifier": "testing", + "time_zone": "America/Los_Angeles", + "recipient_details": { + "emails": [ + "testuser@thoughtspot.com" + ] + } + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/schedules/create", + "operationId": "createSchedule", + "scenario": "negative", + "type": "MANUAL", + "testId": 412 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "name": "testing9", + "description": "testing9", + "metadata_type": "LIVEBOARD", + "time_zone": "America/Los_Angeles", + "recipient_details": { + "emails": [ + "testuser@thoughtspot.com" + ] + } + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/schedules/create", + "operationId": "createSchedule", + "scenario": "negative", + "type": "MANUAL", + "testId": 413 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "name": "testing9", + "description": "testing9", + "metadata_identifier": "testing", + "time_zone": "America/Los_Angeles", + "recipient_details": { + "emails": [ + "testuser@thoughtspot.com" + ] + } + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/schedules/create", + "operationId": "createSchedule", + "scenario": "negative", + "type": "MANUAL", + "testId": 414 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "name": "testing9", + "description": "testing9", + "metadata_type": "LIVEBOARD", + "metadata_identifier": "testing", + "recipient_details": { + "emails": [ + "testuser@thoughtspot.com" + ] + } + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/schedules/create", + "operationId": "createSchedule", + "scenario": "negative", + "type": "MANUAL", + "testId": 415 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "name": "testing9", + "description": "testing9", + "metadata_type": "LIVEBOARD", + "metadata_identifier": "testing", + "time_zone": "America/Los_Angeles" + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/schedules/{schedule_identifier}/update", + "operationId": "updateSchedule", + "scenario": "positive", + "type": "MANUAL", + "testId": 416 + }, + "Path_Variables": { + "schedule_identifier": "KPI Currency Pinboard" + }, + "Query_Variables": {}, + "Body": { + "frequency": { + "cron_expression": { + "day_of_month": "1", + "day_of_week": "1", + "hour": "1", + "minute": "1", + "month": "1", + "second": "1" + } + } + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/schedules/{schedule_identifier}/update", + "operationId": "updateSchedule", + "scenario": "positive", + "type": "MANUAL", + "testId": 417 + }, + "Path_Variables": { + "schedule_identifier": "Revenue Trends" + }, + "Query_Variables": {}, + "Body": {} + }, + { + "Metadata": { + "path": "/api/rest/2.0/schedules/{schedule_identifier}/update", + "operationId": "updateSchedule", + "scenario": "negative", + "type": "MANUAL", + "testId": 418 + }, + "Path_Variables": { + "schedule_identifier": "random" + }, + "Query_Variables": {}, + "Body": {} + }, + { + "Metadata": { + "path": "/api/rest/2.0/schedules/{schedule_identifier}/update", + "operationId": "updateSchedule", + "scenario": "negative", + "type": "MANUAL", + "testId": 419 + }, + "Path_Variables": { + "schedule_identifier": "4a365f3a-100e-47ea-925e-7d20581398af" + }, + "Query_Variables": {}, + "Body": { + "metadata_type": "random" + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/schedules/{schedule_identifier}/update", + "operationId": "updateSchedule", + "scenario": "negative", + "type": "MANUAL", + "testId": 420 + }, + "Path_Variables": { + "schedule_identifier": "4a365f3a-100e-47ea-925e-7d20581398af" + }, + "Query_Variables": {}, + "Body": { + "frequency": {} + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/schedules/{schedule_identifier}/update", + "operationId": "updateSchedule", + "scenario": "negative", + "type": "MANUAL", + "testId": 421 + }, + "Path_Variables": { + "schedule_identifier": "4a365f3a-100e-47ea-925e-7d20581398af" + }, + "Query_Variables": {}, + "Body": { + "frequency": { + "cron_expression": { + "day_of_week": "1", + "hour": "1", + "minute": "1", + "month": "1", + "second": "1" + } + } + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/schedules/{schedule_identifier}/update", + "operationId": "updateSchedule", + "scenario": "negative", + "type": "MANUAL", + "testId": 422 + }, + "Path_Variables": { + "schedule_identifier": "4a365f3a-100e-47ea-925e-7d20581398af" + }, + "Query_Variables": {}, + "Body": { + "status": "random" + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/schedules/search", + "operationId": "searchSchedules", + "scenario": "positive", + "type": "MANUAL", + "testId": 423 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "sort_options": { + "order": "ASC" + } + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/schedules/search", + "operationId": "searchSchedules", + "scenario": "positive", + "type": "MANUAL", + "testId": 424 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": {} + }, + { + "Metadata": { + "path": "/api/rest/2.0/schedules/search", + "operationId": "searchSchedules", + "scenario": "negative", + "type": "MANUAL", + "testId": 425 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "sort_options": { + "field_name": "random", + "order": "xyz" + } + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/schedules/search", + "operationId": "searchSchedules", + "scenario": "negative", + "type": "MANUAL", + "testId": 426 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "metadata": [ + { + "identifier": "testing9", + "type": "random" + } + ] + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/schedules/search", + "operationId": "searchSchedules", + "scenario": "negative", + "type": "MANUAL", + "testId": 427 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "metadata": [ + {} + ] + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/users/{user_identifier}/delete", + "operationId": "deleteUser", + "scenario": "positive", + "type": "MANUAL", + "testId": 428 + }, + "Path_Variables": { + "user_identifier": "abcdef" + }, + "Query_Variables": {}, + "Body": {} + }, + { + "Metadata": { + "path": "/api/rest/2.0/users/{user_identifier}/delete", + "operationId": "deleteUser", + "scenario": "positive", + "type": "MANUAL", + "testId": 429 + }, + "Path_Variables": { + "user_identifier": "test1" + }, + "Query_Variables": {}, + "Body": {} + }, + { + "Metadata": { + "path": "/api/rest/2.0/users/{user_identifier}/delete", + "operationId": "deleteUser", + "scenario": "positive", + "type": "MANUAL", + "testId": 430 + }, + "Path_Variables": { + "user_identifier": "test2" + }, + "Query_Variables": {}, + "Body": {} + }, + { + "Metadata": { + "path": "/api/rest/2.0/users/{user_identifier}/delete", + "operationId": "deleteUser", + "scenario": "positive", + "type": "MANUAL", + "testId": 431 + }, + "Path_Variables": { + "user_identifier": "test3" + }, + "Query_Variables": {}, + "Body": {} + }, + { + "Metadata": { + "path": "/api/rest/2.0/users/{user_identifier}/delete", + "operationId": "deleteUser", + "scenario": "positive", + "type": "MANUAL", + "testId": 432 + }, + "Path_Variables": { + "user_identifier": "test4" + }, + "Query_Variables": {}, + "Body": {} + }, + { + "Metadata": { + "path": "/api/rest/2.0/users/{user_identifier}/delete", + "operationId": "deleteUser", + "scenario": "positive", + "type": "MANUAL", + "testId": 433 + }, + "Path_Variables": { + "user_identifier": "test5" + }, + "Query_Variables": {}, + "Body": {} + }, + { + "Metadata": { + "path": "/api/rest/2.0/users/{user_identifier}/delete", + "operationId": "deleteUser", + "scenario": "negative", + "type": "MANUAL", + "testId": 434 + }, + "Path_Variables": { + "user_identifier": "" + }, + "Query_Variables": {}, + "Body": {} + }, + { + "Metadata": { + "path": "/api/rest/2.0/users/{user_identifier}/delete", + "operationId": "deleteUser", + "scenario": "negative", + "type": "MANUAL", + "testId": 435 + }, + "Path_Variables": { + "user_identifier": "t" + }, + "Query_Variables": {}, + "Body": {} + }, + { + "Metadata": { + "path": "/api/rest/2.0/users/{user_identifier}/delete", + "operationId": "deleteUser", + "scenario": "negative", + "type": "MANUAL", + "testId": 436 + }, + "Path_Variables": { + "user_identifier": "tt2" + }, + "Query_Variables": {}, + "Body": {} + }, + { + "Metadata": { + "path": "/api/rest/2.0/users/import", + "operationId": "importUsers", + "scenario": "positive", + "type": "MANUAL", + "testId": 437 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "users": [ + { + "user_identifier": "abcdef", + "display_name": "abcdef_abcdef" + } + ] + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/users/import", + "operationId": "importUsers", + "scenario": "positive", + "type": "MANUAL", + "testId": 438 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "users": [ + { + "user_identifier": "test1", + "display_name": "test1_test1" + } + ] + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/users/import", + "operationId": "importUsers", + "scenario": "positive", + "type": "MANUAL", + "testId": 439 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "users": [ + { + "user_identifier": "test2", + "display_name": "test2_test2" + } + ] + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/users/import", + "operationId": "importUsers", + "scenario": "positive", + "type": "MANUAL", + "testId": 440 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "users": [ + { + "user_identifier": "test3", + "display_name": "test3_test3" + } + ] + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/users/import", + "operationId": "importUsers", + "scenario": "positive", + "type": "MANUAL", + "testId": 441 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "users": [ + { + "user_identifier": "test4", + "display_name": "test4_test4" + } + ] + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/users/import", + "operationId": "importUsers", + "scenario": "positive", + "type": "MANUAL", + "testId": 442 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "users": [ + { + "user_identifier": "test5", + "display_name": "test5_test5" + } + ] + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/users/import", + "operationId": "importUsers", + "scenario": "negative", + "type": "MANUAL", + "testId": 443 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "users": [ + { + "user_identifier": "t1", + "display_name": "t1_tet1" + } + ] + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/users/import", + "operationId": "importUsers", + "scenario": "negative", + "type": "MANUAL", + "testId": 444 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "users": [ + { + "user_identifier": "", + "display_name": "test2_test2" + } + ] + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/users/import", + "operationId": "importUsers", + "scenario": "negative", + "type": "MANUAL", + "testId": 445 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "users": [ + { + "user_identifier": "test3", + "display_name": "" + } + ] + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/users/import", + "operationId": "importUsers", + "scenario": "negative", + "type": "MANUAL", + "testId": 446 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "users": [ + { + "display_name": "test4_test4" + } + ] + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/users/import", + "operationId": "importUsers", + "scenario": "negative", + "type": "MANUAL", + "testId": 447 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "users": [ + { + "user_identifier": "test5" + } + ] + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/orgs/{org_identifier}/delete", + "operationId": "deleteOrg", + "scenario": "positive", + "type": "MANUAL", + "testId": 448 + }, + "Path_Variables": { + "org_identifier": "test_org" + }, + "Query_Variables": {}, + "Body": {} + }, + { + "Metadata": { + "path": "/api/rest/2.0/orgs/{org_identifier}/delete", + "operationId": "deleteOrg", + "scenario": "positive", + "type": "MANUAL", + "testId": 449 + }, + "Path_Variables": { + "org_identifier": "test1_org" + }, + "Query_Variables": {}, + "Body": {} + }, + { + "Metadata": { + "path": "/api/rest/2.0/orgs/{org_identifier}/delete", + "operationId": "deleteOrg", + "scenario": "positive", + "type": "MANUAL", + "testId": 450 + }, + "Path_Variables": { + "org_identifier": "test2_org" + }, + "Query_Variables": {}, + "Body": {} + }, + { + "Metadata": { + "path": "/api/rest/2.0/orgs/{org_identifier}/delete", + "operationId": "deleteOrg", + "scenario": "positive", + "type": "MANUAL", + "testId": 451 + }, + "Path_Variables": { + "org_identifier": "test3_org" + }, + "Query_Variables": {}, + "Body": {} + }, + { + "Metadata": { + "path": "/api/rest/2.0/orgs/{org_identifier}/delete", + "operationId": "deleteOrg", + "scenario": "positive", + "type": "MANUAL", + "testId": 452 + }, + "Path_Variables": { + "org_identifier": "test4_org" + }, + "Query_Variables": {}, + "Body": {} + }, + { + "Metadata": { + "path": "/api/rest/2.0/orgs/{org_identifier}/delete", + "operationId": "deleteOrg", + "scenario": "positive", + "type": "MANUAL", + "testId": 453 + }, + "Path_Variables": { + "org_identifier": "test5_org" + }, + "Query_Variables": {}, + "Body": {} + }, + { + "Metadata": { + "path": "/api/rest/2.0/orgs/{org_identifier}/delete", + "operationId": "deleteOrg", + "scenario": "negative", + "type": "MANUAL", + "testId": 454 + }, + "Path_Variables": { + "org_identifier": "tesrg" + }, + "Query_Variables": {}, + "Body": {} + }, + { + "Metadata": { + "path": "/api/rest/2.0/orgs/{org_identifier}/delete", + "operationId": "deleteOrg", + "scenario": "negative", + "type": "MANUAL", + "testId": 455 + }, + "Path_Variables": { + "org_identifier": "" + }, + "Query_Variables": {}, + "Body": {} + }, + { + "Metadata": { + "path": "/api/rest/2.0/orgs/{org_identifier}/delete", + "operationId": "deleteOrg", + "scenario": "negative", + "type": "MANUAL", + "testId": 456 + }, + "Path_Variables": { + "org_identifier": "tt2_org" + }, + "Query_Variables": {}, + "Body": {} + }, + { + "Metadata": { + "path": "/api/rest/2.0/orgs/{org_identifier}/delete", + "operationId": "deleteOrg", + "scenario": "negative", + "type": "MANUAL", + "testId": 457 + }, + "Path_Variables": { + "org_identifier": "tst3_org" + }, + "Query_Variables": {}, + "Body": {} + }, + { + "Metadata": { + "path": "/api/rest/2.0/orgs/{org_identifier}/delete", + "operationId": "deleteOrg", + "scenario": "negative", + "type": "MANUAL", + "testId": 458 + }, + "Path_Variables": { + "org_identifier": "test4_og" + }, + "Query_Variables": {}, + "Body": {} + }, + { + "Metadata": { + "path": "/api/rest/2.0/orgs/{org_identifier}/delete", + "operationId": "deleteOrg", + "scenario": "negative", + "type": "MANUAL", + "testId": 459 + }, + "Path_Variables": { + "org_identifier": "tet5_org" + }, + "Query_Variables": {}, + "Body": {} + }, + { + "Metadata": { + "path": "/api/rest/2.0/tags/{tag_identifier}/delete", + "operationId": "deleteTag", + "scenario": "positive", + "type": "MANUAL", + "testId": 460 + }, + "Path_Variables": { + "tag_identifier": "test6" + }, + "Query_Variables": {}, + "Body": {} + }, + { + "Metadata": { + "path": "/api/rest/2.0/tags/{tag_identifier}/delete", + "operationId": "deleteTag", + "scenario": "positive", + "type": "MANUAL", + "testId": 461 + }, + "Path_Variables": { + "tag_identifier": "test1" + }, + "Query_Variables": {}, + "Body": {} + }, + { + "Metadata": { + "path": "/api/rest/2.0/tags/{tag_identifier}/delete", + "operationId": "deleteTag", + "scenario": "positive", + "type": "MANUAL", + "testId": 462 + }, + "Path_Variables": { + "tag_identifier": "test2" + }, + "Query_Variables": {}, + "Body": {} + }, + { + "Metadata": { + "path": "/api/rest/2.0/tags/{tag_identifier}/delete", + "operationId": "deleteTag", + "scenario": "positive", + "type": "MANUAL", + "testId": 463 + }, + "Path_Variables": { + "tag_identifier": "test3" + }, + "Query_Variables": {}, + "Body": {} + }, + { + "Metadata": { + "path": "/api/rest/2.0/tags/{tag_identifier}/delete", + "operationId": "deleteTag", + "scenario": "positive", + "type": "MANUAL", + "testId": 464 + }, + "Path_Variables": { + "tag_identifier": "test4" + }, + "Query_Variables": {}, + "Body": {} + }, + { + "Metadata": { + "path": "/api/rest/2.0/tags/{tag_identifier}/delete", + "operationId": "deleteTag", + "scenario": "positive", + "type": "MANUAL", + "testId": 465 + }, + "Path_Variables": { + "tag_identifier": "test5" + }, + "Query_Variables": {}, + "Body": {} + }, + { + "Metadata": { + "path": "/api/rest/2.0/tags/{tag_identifier}/delete", + "operationId": "deleteTag", + "scenario": "negative", + "type": "MANUAL", + "testId": 466 + }, + "Path_Variables": { + "tag_identifier": "" + }, + "Query_Variables": {}, + "Body": {} + }, + { + "Metadata": { + "path": "/api/rest/2.0/tags/{tag_identifier}/delete", + "operationId": "deleteTag", + "scenario": "negative", + "type": "MANUAL", + "testId": 467 + }, + "Path_Variables": { + "tag_identifier": "te1" + }, + "Query_Variables": {}, + "Body": {} + }, + { + "Metadata": { + "path": "/api/rest/2.0/tags/{tag_identifier}/delete", + "operationId": "deleteTag", + "scenario": "negative", + "type": "MANUAL", + "testId": 468 + }, + "Path_Variables": { + "tag_identifier": "tet2" + }, + "Query_Variables": {}, + "Body": {} + }, + { + "Metadata": { + "path": "/api/rest/2.0/tags/{tag_identifier}/delete", + "operationId": "deleteTag", + "scenario": "negative", + "type": "MANUAL", + "testId": 469 + }, + "Path_Variables": { + "tag_identifier": "3" + }, + "Query_Variables": {}, + "Body": {} + }, + { + "Metadata": { + "path": "/api/rest/2.0/tags/{tag_identifier}/delete", + "operationId": "deleteTag", + "scenario": "negative", + "type": "MANUAL", + "testId": 470 + }, + "Path_Variables": { + "tag_identifier": "tet4" + }, + "Query_Variables": {}, + "Body": {} + }, + { + "Metadata": { + "path": "/api/rest/2.0/tags/{tag_identifier}/delete", + "operationId": "deleteTag", + "scenario": "negative", + "type": "MANUAL", + "testId": 471 + }, + "Path_Variables": { + "tag_identifier": "test" + }, + "Query_Variables": {}, + "Body": {} + }, + { + "Metadata": { + "path": "/api/rest/2.0/groups/{group_identifier}/delete", + "operationId": "deleteUserGroup", + "scenario": "positive", + "type": "MANUAL", + "testId": 472 + }, + "Path_Variables": { + "group_identifier": "test6" + }, + "Query_Variables": {}, + "Body": {} + }, + { + "Metadata": { + "path": "/api/rest/2.0/groups/{group_identifier}/delete", + "operationId": "deleteUserGroup", + "scenario": "positive", + "type": "MANUAL", + "testId": 473 + }, + "Path_Variables": { + "group_identifier": "test1" + }, + "Query_Variables": {}, + "Body": {} + }, + { + "Metadata": { + "path": "/api/rest/2.0/groups/{group_identifier}/delete", + "operationId": "deleteUserGroup", + "scenario": "positive", + "type": "MANUAL", + "testId": 474 + }, + "Path_Variables": { + "group_identifier": "test2" + }, + "Query_Variables": {}, + "Body": {} + }, + { + "Metadata": { + "path": "/api/rest/2.0/groups/{group_identifier}/delete", + "operationId": "deleteUserGroup", + "scenario": "positive", + "type": "MANUAL", + "testId": 475 + }, + "Path_Variables": { + "group_identifier": "test3" + }, + "Query_Variables": {}, + "Body": {} + }, + { + "Metadata": { + "path": "/api/rest/2.0/groups/{group_identifier}/delete", + "operationId": "deleteUserGroup", + "scenario": "positive", + "type": "MANUAL", + "testId": 476 + }, + "Path_Variables": { + "group_identifier": "test4" + }, + "Query_Variables": {}, + "Body": {} + }, + { + "Metadata": { + "path": "/api/rest/2.0/groups/{group_identifier}/delete", + "operationId": "deleteUserGroup", + "scenario": "positive", + "type": "MANUAL", + "testId": 477 + }, + "Path_Variables": { + "group_identifier": "test5" + }, + "Query_Variables": {}, + "Body": {} + }, + { + "Metadata": { + "path": "/api/rest/2.0/groups/{group_identifier}/delete", + "operationId": "deleteUserGroup", + "scenario": "negative", + "type": "MANUAL", + "testId": 478 + }, + "Path_Variables": { + "group_identifier": "" + }, + "Query_Variables": {}, + "Body": {} + }, + { + "Metadata": { + "path": "/api/rest/2.0/groups/{group_identifier}/delete", + "operationId": "deleteUserGroup", + "scenario": "negative", + "type": "MANUAL", + "testId": 479 + }, + "Path_Variables": { + "group_identifier": "tt1" + }, + "Query_Variables": {}, + "Body": {} + }, + { + "Metadata": { + "path": "/api/rest/2.0/groups/{group_identifier}/delete", + "operationId": "deleteUserGroup", + "scenario": "negative", + "type": "MANUAL", + "testId": 480 + }, + "Path_Variables": { + "group_identifier": "test" + }, + "Query_Variables": {}, + "Body": {} + }, + { + "Metadata": { + "path": "/api/rest/2.0/groups/{group_identifier}/delete", + "operationId": "deleteUserGroup", + "scenario": "negative", + "type": "MANUAL", + "testId": 481 + }, + "Path_Variables": { + "group_identifier": "tes" + }, + "Query_Variables": {}, + "Body": {} + }, + { + "Metadata": { + "path": "/api/rest/2.0/groups/{group_identifier}/delete", + "operationId": "deleteUserGroup", + "scenario": "negative", + "type": "MANUAL", + "testId": 482 + }, + "Path_Variables": { + "group_identifier": "te" + }, + "Query_Variables": {}, + "Body": {} + }, + { + "Metadata": { + "path": "/api/rest/2.0/groups/{group_identifier}/delete", + "operationId": "deleteUserGroup", + "scenario": "negative", + "type": "MANUAL", + "testId": 483 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": {} + }, + { + "Metadata": { + "path": "/api/rest/2.0/vcs/git/config/delete", + "operationId": "deleteConfig", + "scenario": "positive", + "type": "MANUAL", + "testId": 484 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": {} + }, + { + "Metadata": { + "path": "/api/rest/2.0/vcs/git/config/delete", + "operationId": "deleteConfig", + "scenario": "positive", + "type": "MANUAL", + "testId": 485 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": {} + }, + { + "Metadata": { + "path": "/api/rest/2.0/vcs/git/config/delete", + "operationId": "deleteConfig", + "scenario": "positive", + "type": "MANUAL", + "testId": 486 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": {} + }, + { + "Metadata": { + "path": "/api/rest/2.0/vcs/git/config/delete", + "operationId": "deleteConfig", + "scenario": "positive", + "type": "MANUAL", + "testId": 487 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": {} + }, + { + "Metadata": { + "path": "/api/rest/2.0/vcs/git/config/delete", + "operationId": "deleteConfig", + "scenario": "positive", + "type": "MANUAL", + "testId": 488 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": {} + }, + { + "Metadata": { + "path": "/api/rest/2.0/vcs/git/config/delete", + "operationId": "deleteConfig", + "scenario": "negative", + "type": "MANUAL", + "testId": 489 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": {} + }, + { + "Metadata": { + "path": "/api/rest/2.0/connection/delete", + "operationId": "deleteConnection", + "scenario": "positive", + "type": "MANUAL", + "testId": 490 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "connection_identifier": "Testconnection - 4" + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/connection/delete", + "operationId": "deleteConnection", + "scenario": "positive", + "type": "MANUAL", + "testId": 491 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "connection_identifier": "Testconnection - 5" + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/connection/delete", + "operationId": "deleteConnection", + "scenario": "positive", + "type": "MANUAL", + "testId": 492 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "connection_identifier": "Testconnection - 6" + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/connection/delete", + "operationId": "deleteConnection", + "scenario": "positive", + "type": "MANUAL", + "testId": 493 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "connection_identifier": "Testconnection - 7" + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/connection/delete", + "operationId": "deleteConnection", + "scenario": "positive", + "type": "MANUAL", + "testId": 494 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "connection_identifier": "Testconnection - 8" + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/connection/delete", + "operationId": "deleteConnection", + "scenario": "positive", + "type": "MANUAL", + "testId": 495 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "connection_identifier": "Testconnection - 9" + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/connection/delete", + "operationId": "deleteConnection", + "scenario": "positive", + "type": "MANUAL", + "testId": 496 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "connection_identifier": "Testconnection - 10" + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/connection/delete", + "operationId": "deleteConnection", + "scenario": "negative", + "type": "MANUAL", + "testId": 497 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": {} + }, + { + "Metadata": { + "path": "/api/rest/2.0/connection/delete", + "operationId": "deleteConnection", + "scenario": "negative", + "type": "MANUAL", + "testId": 498 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "connection_identifier": "Testconnection - 2" + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/connection/delete", + "operationId": "deleteConnection", + "scenario": "negative", + "type": "MANUAL", + "testId": 499 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "connection_identifier": "" + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/connection/delete", + "operationId": "deleteConnection", + "scenario": "negative", + "type": "MANUAL", + "testId": 500 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "connection_identifier": 123 + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/roles/{role_identifier}/delete", + "operationId": "deleteRole", + "scenario": "positive", + "type": "MANUAL", + "testId": 501 + }, + "Path_Variables": { + "role_identifier": "updated_testing1" + }, + "Query_Variables": {}, + "Body": {} + }, + { + "Metadata": { + "path": "/api/rest/2.0/roles/{role_identifier}/delete", + "operationId": "deleteRole", + "scenario": "positive", + "type": "MANUAL", + "testId": 502 + }, + "Path_Variables": { + "role_identifier": "updated_testing2" + }, + "Query_Variables": {}, + "Body": {} + }, + { + "Metadata": { + "path": "/api/rest/2.0/roles/{role_identifier}/delete", + "operationId": "deleteRole", + "scenario": "positive", + "type": "MANUAL", + "testId": 503 + }, + "Path_Variables": { + "role_identifier": "updated_testing3" + }, + "Query_Variables": {}, + "Body": {} + }, + { + "Metadata": { + "path": "/api/rest/2.0/roles/{role_identifier}/delete", + "operationId": "deleteRole", + "scenario": "positive", + "type": "MANUAL", + "testId": 504 + }, + "Path_Variables": { + "role_identifier": "updated_testing4" + }, + "Query_Variables": {}, + "Body": {} + }, + { + "Metadata": { + "path": "/api/rest/2.0/roles/{role_identifier}/delete", + "operationId": "deleteRole", + "scenario": "positive", + "type": "MANUAL", + "testId": 505 + }, + "Path_Variables": { + "role_identifier": "updated_testing5" + }, + "Query_Variables": {}, + "Body": {} + }, + { + "Metadata": { + "path": "/api/rest/2.0/roles/{role_identifier}/delete", + "operationId": "deleteRole", + "scenario": "negative", + "type": "MANUAL", + "testId": 506 + }, + "Path_Variables": { + "role_identifier": "random6" + }, + "Query_Variables": {}, + "Body": {} + }, + { + "Metadata": { + "path": "/api/rest/2.0/roles/{role_identifier}/delete", + "operationId": "deleteRole", + "scenario": "negative", + "type": "MANUAL", + "testId": 507 + }, + "Path_Variables": { + "role_identifier": "random7" + }, + "Query_Variables": {}, + "Body": {} + }, + { + "Metadata": { + "path": "/api/rest/2.0/roles/{role_identifier}/delete", + "operationId": "deleteRole", + "scenario": "negative", + "type": "MANUAL", + "testId": 508 + }, + "Path_Variables": { + "role_identifier": "random8" + }, + "Query_Variables": {}, + "Body": {} + }, + { + "Metadata": { + "path": "/api/rest/2.0/roles/{role_identifier}/delete", + "operationId": "deleteRole", + "scenario": "negative", + "type": "MANUAL", + "testId": 509 + }, + "Path_Variables": { + "role_identifier": "random9" + }, + "Query_Variables": {}, + "Body": {} + }, + { + "Metadata": { + "path": "/api/rest/2.0/roles/{role_identifier}/delete", + "operationId": "deleteRole", + "scenario": "negative", + "type": "MANUAL", + "testId": 510 + }, + "Path_Variables": { + "role_identifier": "random10" + }, + "Query_Variables": {}, + "Body": {} + }, + { + "Metadata": { + "path": "/api/rest/2.0/schedules/{schedule_identifier}/delete", + "operationId": "deleteSchedule", + "scenario": "positive", + "type": "MANUAL", + "testId": 511 + }, + "Path_Variables": { + "schedule_identifier": "testing9" + }, + "Query_Variables": {}, + "Body": {} + }, + { + "Metadata": { + "path": "/api/rest/2.0/schedules/{schedule_identifier}/delete", + "operationId": "deleteSchedule", + "scenario": "positive", + "type": "MANUAL", + "testId": 512 + }, + "Path_Variables": { + "schedule_identifier": "testing8" + }, + "Query_Variables": {}, + "Body": {} + }, + { + "Metadata": { + "path": "/api/rest/2.0/schedules/{schedule_identifier}/delete", + "operationId": "deleteSchedule", + "scenario": "positive", + "type": "MANUAL", + "testId": 513 + }, + "Path_Variables": { + "schedule_identifier": "testing7" + }, + "Query_Variables": {}, + "Body": {} + }, + { + "Metadata": { + "path": "/api/rest/2.0/schedules/{schedule_identifier}/delete", + "operationId": "deleteSchedule", + "scenario": "positive", + "type": "MANUAL", + "testId": 514 + }, + "Path_Variables": { + "schedule_identifier": "testing6" + }, + "Query_Variables": {}, + "Body": {} + }, + { + "Metadata": { + "path": "/api/rest/2.0/schedules/{schedule_identifier}/delete", + "operationId": "deleteSchedule", + "scenario": "positive", + "type": "MANUAL", + "testId": 515 + }, + "Path_Variables": { + "schedule_identifier": "testing5" + }, + "Query_Variables": {}, + "Body": {} + }, + { + "Metadata": { + "path": "/api/rest/2.0/schedules/{schedule_identifier}/delete", + "operationId": "deleteSchedule", + "scenario": "negative", + "type": "MANUAL", + "testId": 516 + }, + "Path_Variables": { + "schedule_identifier": "random9" + }, + "Query_Variables": {}, + "Body": {} + }, + { + "Metadata": { + "path": "/api/rest/2.0/schedules/{schedule_identifier}/delete", + "operationId": "deleteSchedule", + "scenario": "negative", + "type": "MANUAL", + "testId": 517 + }, + "Path_Variables": { + "schedule_identifier": "random8" + }, + "Query_Variables": {}, + "Body": {} + }, + { + "Metadata": { + "path": "/api/rest/2.0/schedules/{schedule_identifier}/delete", + "operationId": "deleteSchedule", + "scenario": "negative", + "type": "MANUAL", + "testId": 518 + }, + "Path_Variables": { + "schedule_identifier": "random7" + }, + "Query_Variables": {}, + "Body": {} + }, + { + "Metadata": { + "path": "/api/rest/2.0/schedules/{schedule_identifier}/delete", + "operationId": "deleteSchedule", + "scenario": "negative", + "type": "MANUAL", + "testId": 519 + }, + "Path_Variables": { + "schedule_identifier": "random6" + }, + "Query_Variables": {}, + "Body": {} + }, + { + "Metadata": { + "path": "/api/rest/2.0/schedules/{schedule_identifier}/delete", + "operationId": "deleteSchedule", + "scenario": "negative", + "type": "MANUAL", + "testId": 520 + }, + "Path_Variables": { + "schedule_identifier": "random5" + }, + "Query_Variables": {}, + "Body": {} + }, + { + "Metadata": { + "path": "/api/rest/2.0/metadata/delete", + "operationId": "deleteMetadata", + "scenario": "positive", + "type": "MANUAL", + "testId": 521 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "metadata": [ + { + "type": "ANSWER", + "identifier": "2Lines-1Bar Chart" + } + ] + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/metadata/delete", + "operationId": "deleteMetadata", + "scenario": "positive", + "type": "MANUAL", + "testId": 522 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "metadata": [ + { + "type": "LIVEBOARD", + "identifier": "KPI Currency Pinboard" + } + ] + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/metadata/delete", + "operationId": "deleteMetadata", + "scenario": "positive", + "type": "MANUAL", + "testId": 523 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "metadata": [ + { + "type": "LIVEBOARD", + "identifier": "Headline Pinboard" + } + ] + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/metadata/delete", + "operationId": "deleteMetadata", + "scenario": "positive", + "type": "MANUAL", + "testId": 524 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "metadata": [ + { + "type": "ANSWER", + "identifier": "Geo Area -Total Poverty Estimate by State" + } + ] + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/metadata/delete", + "operationId": "deleteMetadata", + "scenario": "positive", + "type": "MANUAL", + "testId": 525 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "metadata": [ + { + "type": "ANSWER", + "identifier": "Pivot table with multiple measures" + } + ] + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/metadata/delete", + "operationId": "deleteMetadata", + "scenario": "negative", + "type": "MANUAL", + "testId": 526 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "metadata": "" + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/metadata/delete", + "operationId": "deleteMetadata", + "scenario": "negative", + "type": "MANUAL", + "testId": 527 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "metadata": [ + { + "type": "LIVEBOARD" + } + ] + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/metadata/delete", + "operationId": "deleteMetadata", + "scenario": "negative", + "type": "MANUAL", + "testId": 528 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "metadata": [ + { + "identifier": "b2d68a4f-cf67-4723-966f-8a592fdbf8b9" + } + ] + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/metadata/delete", + "operationId": "deleteMetadata", + "scenario": "negative", + "type": "MANUAL", + "testId": 529 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "metadata": [ + { + "type": "ANSWER", + "identifier": "1e930-83baa7198826" + } + ] + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/metadata/delete", + "operationId": "deleteMetadata", + "scenario": "negative", + "type": "MANUAL", + "testId": 530 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "metadata": [ + { + "type": "ANSWER", + "identifier": "" + } + ] + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/users/create", + "operationId": "createUser", + "scenario": "positive", + "type": "AUTOMATIC", + "testId": 531 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "name": "eseago01688027208501", + "display_name": "Erma", + "password": "bQ8\\\"'Dr\"", + "email": "ecokly0@mac.com", + "account_status": "INACTIVE", + "group_identifiers": [ + "cfa01dd9-9605-422d-b7de-a37afff63647" + ], + "show_onboarding_experience": false, + "onboarding_experience_completed": true + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/users/create", + "operationId": "createUser", + "scenario": "positive", + "type": "AUTOMATIC", + "testId": 532 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "name": "zessam11688027208529", + "display_name": "Zitella", + "password": "pJ5}7>dMEh(N", + "email": "zcotterill1@digg.com", + "org_identifiers": [ + "0", + "0" + ], + "group_identifiers": [ + "cfa01dd9-9605-422d-b7de-a37afff63647" + ], + "visibility": "NON_SHARABLE", + "notify_on_share": false, + "onboarding_experience_completed": false + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/users/create", + "operationId": "createUser", + "scenario": "positive", + "type": "AUTOMATIC", + "testId": 533 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "name": "cbower21688027208531", + "display_name": "Clementina", + "password": "rC8>Aed*&ZJ1c", + "email": "csimmans2@eepurl.com", + "account_status": "EXPIRED", + "org_identifiers": [ + "0", + "0", + "0" + ], + "notify_on_share": true, + "onboarding_experience_completed": false + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/users/create", + "operationId": "createUser", + "scenario": "positive", + "type": "AUTOMATIC", + "testId": 534 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "name": "tleverage31688027208533", + "display_name": "Tamiko", + "password": "jJ4|nZ41!UBEeci", + "email": "toutlaw3@nydailynews.com", + "account_status": "LOCKED", + "org_identifiers": [ + "0" + ], + "group_identifiers": [ + "cfa01dd9-9605-422d-b7de-a37afff63647", + "280a2235-3721-43fc-aa25-5d33549ecc90" + ], + "visibility": "SHARABLE", + "notify_on_share": false, + "onboarding_experience_completed": false + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/users/create", + "operationId": "createUser", + "scenario": "positive", + "type": "AUTOMATIC", + "testId": 535 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "name": "enel41688027208536", + "display_name": "Eli", + "password": "iI8~Z3MTr", + "email": "epaxeford4@independent.co.uk", + "account_type": "LDAP_USER", + "group_identifiers": [ + "cfa01dd9-9605-422d-b7de-a37afff63647" + ], + "visibility": "NON_SHARABLE", + "notify_on_share": true, + "show_onboarding_experience": true, + "onboarding_experience_completed": false + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/users/create", + "operationId": "createUser", + "scenario": "positive", + "type": "AUTOMATIC", + "testId": 536 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "name": "bcroix51688027208538", + "display_name": "Bibbye", + "password": "jV5|38TUv,$q", + "email": "bscantlebury5@meetup.com", + "account_type": "OIDC_USER", + "account_status": "EXPIRED", + "org_identifiers": [ + "0", + "0", + "0" + ], + "notify_on_share": true, + "onboarding_experience_completed": false, + "favorite_metadata": [ + { + "type": "ANSWER", + "identifier": "10a69d10-e455-4473-b1c6-de1da8cc1ad5" + } + ] + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/users/create", + "operationId": "createUser", + "scenario": "positive", + "type": "AUTOMATIC", + "testId": 537 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "name": "sknappen61688027208541", + "display_name": "Sinclare", + "password": "nZ8&5~_`\\Q|{Zb'", + "email": "scoppens6@alexa.com", + "account_type": "REMOTE_USER", + "account_status": "ACTIVE", + "org_identifiers": [ + "0", + "0", + "0" + ], + "group_identifiers": [ + "cfa01dd9-9605-422d-b7de-a37afff63647", + "280a2235-3721-43fc-aa25-5d33549ecc90", + "f827545e-a592-4280-8ceb-318bd673d04c" + ], + "notify_on_share": true, + "onboarding_experience_completed": false, + "home_liveboard_identifier": "2ff57a24-cf90-485f-8b4b-45fc17474c6f", + "favorite_metadata": [ + { + "type": "ANSWER", + "identifier": "10a69d10-e455-4473-b1c6-de1da8cc1ad5" + }, + { + "type": "ANSWER", + "identifier": "48d27aee-59c3-4a0c-8d2c-5a8989c55bb1" + } + ] + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/users/create", + "operationId": "createUser", + "scenario": "positive", + "type": "AUTOMATIC", + "testId": 538 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "name": "wbignal71688027208543", + "display_name": "Web", + "password": "jU5~Ek#2", + "email": "wrudinger7@nbcnews.com", + "account_type": "SAML_USER", + "org_identifiers": [ + "0" + ], + "group_identifiers": [ + "cfa01dd9-9605-422d-b7de-a37afff63647", + "280a2235-3721-43fc-aa25-5d33549ecc90", + "f827545e-a592-4280-8ceb-318bd673d04c" + ], + "visibility": "NON_SHARABLE", + "home_liveboard_identifier": "2ff57a24-cf90-485f-8b4b-45fc17474c6f", + "favorite_metadata": [ + { + "type": "ANSWER", + "identifier": "10a69d10-e455-4473-b1c6-de1da8cc1ad5" + } + ] + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/users/create", + "operationId": "createUser", + "scenario": "positive", + "type": "AUTOMATIC", + "testId": 539 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "name": "zivory81688027208546", + "display_name": "Zia", + "password": "qD6*$MC#(f21$", + "email": "zwhordley8@stanford.edu", + "org_identifiers": [ + "0", + "0" + ], + "group_identifiers": [ + "cfa01dd9-9605-422d-b7de-a37afff63647" + ], + "visibility": "SHARABLE", + "show_onboarding_experience": false, + "onboarding_experience_completed": true, + "favorite_metadata": [ + { + "type": "ANSWER", + "identifier": "10a69d10-e455-4473-b1c6-de1da8cc1ad5" + } + ] + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/users/create", + "operationId": "createUser", + "scenario": "positive", + "type": "AUTOMATIC", + "testId": 540 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "name": "ltunesi91688027208548", + "display_name": "Loren", + "password": "tP9/um}D3+wCo36*", + "email": "lsutherby9@smugmug.com", + "org_identifiers": [ + "0", + "0" + ], + "notify_on_share": false, + "onboarding_experience_completed": true, + "home_liveboard_identifier": "061457a2-27bc-43a9-9754-0cd873691bf0", + "favorite_metadata": [ + { + "type": "ANSWER", + "identifier": "10a69d10-e455-4473-b1c6-de1da8cc1ad5" + } + ] + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/users/create", + "operationId": "createUser", + "scenario": "positive", + "type": "AUTOMATIC", + "testId": 541 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "name": "owaliszewskia1688027208550", + "display_name": "Onida", + "password": "lB7`?o'8OXA\"#1B", + "email": "othicketta@ebay.com", + "account_type": "REMOTE_USER", + "account_status": "EXPIRED", + "org_identifiers": [ + "0", + "0" + ], + "group_identifiers": [ + "cfa01dd9-9605-422d-b7de-a37afff63647", + "280a2235-3721-43fc-aa25-5d33549ecc90", + "f827545e-a592-4280-8ceb-318bd673d04c" + ], + "visibility": "NON_SHARABLE", + "favorite_metadata": [ + { + "type": "ANSWER", + "identifier": "10a69d10-e455-4473-b1c6-de1da8cc1ad5" + }, + { + "type": "ANSWER", + "identifier": "48d27aee-59c3-4a0c-8d2c-5a8989c55bb1" + } + ] + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/users/create", + "operationId": "createUser", + "scenario": "positive", + "type": "AUTOMATIC", + "testId": 542 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "name": "dfrancklinb1688027208553", + "display_name": "Duncan", + "password": "kB4<18wi'&CDB*(T", + "email": "dleatonb@jimdo.com", + "account_status": "LOCKED", + "notify_on_share": false, + "show_onboarding_experience": true, + "onboarding_experience_completed": false, + "home_liveboard_identifier": "c836ad16-660d-4d28-a3a0-e07cb9eb6ab1", + "favorite_metadata": [ + { + "type": "ANSWER", + "identifier": "10a69d10-e455-4473-b1c6-de1da8cc1ad5" + } + ] + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/users/create", + "operationId": "createUser", + "scenario": "positive", + "type": "AUTOMATIC", + "testId": 543 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "name": "baronstamc1688027208555", + "display_name": "Brynn", + "password": "aE7,3'8j}HLtP*jG", + "email": "bchidlerc@deliciousdays.com", + "account_type": "LDAP_USER", + "account_status": "PENDING", + "group_identifiers": [ + "cfa01dd9-9605-422d-b7de-a37afff63647", + "280a2235-3721-43fc-aa25-5d33549ecc90" + ], + "notify_on_share": true, + "show_onboarding_experience": true, + "home_liveboard_identifier": "6715f768-8930-4180-9a3d-1efdbfaa8e7f", + "favorite_metadata": [ + { + "type": "ANSWER", + "identifier": "10a69d10-e455-4473-b1c6-de1da8cc1ad5" + }, + { + "type": "ANSWER", + "identifier": "48d27aee-59c3-4a0c-8d2c-5a8989c55bb1" + }, + { + "type": "LIVEBOARD", + "identifier": "262abdac-b00f-4f5f-ad33-fcf10154184f" + } + ] + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/users/create", + "operationId": "createUser", + "scenario": "positive", + "type": "AUTOMATIC", + "testId": 544 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "name": "bparringtond1688027208558", + "display_name": "Berny", + "password": "jX3|`%Jw", + "email": "bmatyushonokd@cafepress.com", + "org_identifiers": [ + "0", + "0", + "0" + ], + "notify_on_share": true, + "show_onboarding_experience": true, + "favorite_metadata": [ + { + "type": "ANSWER", + "identifier": "10a69d10-e455-4473-b1c6-de1da8cc1ad5" + } + ] + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/users/create", + "operationId": "createUser", + "scenario": "positive", + "type": "AUTOMATIC", + "testId": 545 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "name": "ulapworthe1688027208560", + "display_name": "Udall", + "password": "aC6=lYmFc|kkBZ", + "email": "ubenedikte@nytimes.com", + "account_status": "PENDING", + "org_identifiers": [ + "0" + ], + "visibility": "SHARABLE", + "notify_on_share": true, + "show_onboarding_experience": false, + "onboarding_experience_completed": true + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/users/create", + "operationId": "createUser", + "scenario": "positive", + "type": "AUTOMATIC", + "testId": 546 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "name": "jocurriganf1688027208562", + "display_name": "Jone", + "password": "iD7$q|9RW)JxIx", + "email": "jcornilf@phoca.cz", + "account_status": "ACTIVE", + "org_identifiers": [ + "0", + "0", + "0" + ], + "group_identifiers": [ + "cfa01dd9-9605-422d-b7de-a37afff63647" + ] + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/users/create", + "operationId": "createUser", + "scenario": "positive", + "type": "AUTOMATIC", + "testId": 547 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "name": "iwinckworthg1688027208564", + "display_name": "Ilaire", + "password": "vX0*3ITBa,?+x", + "email": "ibutlandg@biblegateway.com", + "account_type": "OIDC_USER", + "org_identifiers": [ + "0", + "0", + "0" + ], + "notify_on_share": true, + "show_onboarding_experience": true, + "onboarding_experience_completed": false + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/users/create", + "operationId": "createUser", + "scenario": "positive", + "type": "AUTOMATIC", + "testId": 548 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "name": "weckersleyh1688027208566", + "display_name": "Wake", + "password": "yP9>yKAV_", + "email": "wshervilh@ning.com", + "visibility": "NON_SHARABLE", + "notify_on_share": false, + "home_liveboard_identifier": "33248a57-cc70-4e39-9199-fb5092283381" + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/users/create", + "operationId": "createUser", + "scenario": "positive", + "type": "AUTOMATIC", + "testId": 549 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "name": "icastrii1688027208568", + "display_name": "Inger", + "password": "qU0,_Bae|iF$PVo3", + "email": "itrekeri@earthlink.net", + "group_identifiers": [ + "cfa01dd9-9605-422d-b7de-a37afff63647", + "280a2235-3721-43fc-aa25-5d33549ecc90" + ], + "visibility": "SHARABLE", + "notify_on_share": false, + "onboarding_experience_completed": true, + "favorite_metadata": [ + { + "type": "ANSWER", + "identifier": "10a69d10-e455-4473-b1c6-de1da8cc1ad5" + } + ] + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/users/create", + "operationId": "createUser", + "scenario": "positive", + "type": "AUTOMATIC", + "testId": 550 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "name": "nsarchwellj1688027208571", + "display_name": "Neysa", + "password": "sV4/GYX$Ip?%", + "email": "nstrutherj@opera.com", + "account_status": "ACTIVE", + "org_identifiers": [ + "0", + "0", + "0" + ], + "group_identifiers": [ + "cfa01dd9-9605-422d-b7de-a37afff63647", + "280a2235-3721-43fc-aa25-5d33549ecc90", + "f827545e-a592-4280-8ceb-318bd673d04c" + ], + "notify_on_share": true, + "onboarding_experience_completed": true, + "home_liveboard_identifier": "6715f768-8930-4180-9a3d-1efdbfaa8e7f" + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/users/create", + "operationId": "createUser", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 551 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "name": null, + "display_name": "Loren", + "password": "tP9/um}D3+wCo36*", + "email": "lsutherby9@smugmug.com", + "org_identifiers": [ + "0", + "0" + ], + "notify_on_share": false, + "onboarding_experience_completed": true, + "home_liveboard_identifier": "061457a2-27bc-43a9-9754-0cd873691bf0", + "favorite_metadata": [ + { + "type": "ANSWER", + "identifier": "10a69d10-e455-4473-b1c6-de1da8cc1ad5" + } + ] + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/users/create", + "operationId": "createUser", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 552 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "name": null, + "display_name": "Duncan", + "password": "kB4<18wi'&CDB*(T", + "email": "dleatonb@jimdo.com", + "account_status": "LOCKED", + "notify_on_share": false, + "show_onboarding_experience": true, + "onboarding_experience_completed": false, + "home_liveboard_identifier": "c836ad16-660d-4d28-a3a0-e07cb9eb6ab1", + "favorite_metadata": [ + { + "type": "ANSWER", + "identifier": "10a69d10-e455-4473-b1c6-de1da8cc1ad5" + } + ] + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/users/create", + "operationId": "createUser", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 553 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "name": "jocurriganf1688027208562", + "display_name": "Jone", + "password": null, + "email": "jcornilf@phoca.cz", + "account_status": "ACTIVE", + "org_identifiers": [ + "0", + "0", + "0" + ], + "group_identifiers": [ + "cfa01dd9-9605-422d-b7de-a37afff63647" + ] + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/users/create", + "operationId": "createUser", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 554 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "name": "bparringtond1688027208558", + "display_name": null, + "password": "jX3|`%Jw", + "email": "bmatyushonokd@cafepress.com", + "org_identifiers": [ + "0", + "0", + "0" + ], + "notify_on_share": true, + "show_onboarding_experience": true, + "favorite_metadata": [ + { + "type": "ANSWER", + "identifier": "10a69d10-e455-4473-b1c6-de1da8cc1ad5" + } + ] + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/users/create", + "operationId": "createUser", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 555 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "name": "bparringtond1688027208558", + "display_name": null, + "password": "jX3|`%Jw", + "email": "bmatyushonokd@cafepress.com", + "org_identifiers": [ + "0", + "0", + "0" + ], + "notify_on_share": true, + "show_onboarding_experience": true, + "favorite_metadata": [ + { + "type": "ANSWER", + "identifier": "10a69d10-e455-4473-b1c6-de1da8cc1ad5" + } + ] + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/users/create", + "operationId": "createUser", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 556 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "name": "nsarchwellj1688027208571", + "display_name": null, + "password": "sV4/GYX$Ip?%", + "email": "nstrutherj@opera.com", + "account_status": "ACTIVE", + "org_identifiers": [ + "0", + "0", + "0" + ], + "group_identifiers": [ + "cfa01dd9-9605-422d-b7de-a37afff63647", + "280a2235-3721-43fc-aa25-5d33549ecc90", + "f827545e-a592-4280-8ceb-318bd673d04c" + ], + "notify_on_share": true, + "onboarding_experience_completed": true, + "home_liveboard_identifier": "6715f768-8930-4180-9a3d-1efdbfaa8e7f" + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/users/create", + "operationId": "createUser", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 557 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "name": null, + "display_name": "Loren", + "password": "tP9/um}D3+wCo36*", + "email": "lsutherby9@smugmug.com", + "org_identifiers": [ + "0", + "0" + ], + "notify_on_share": false, + "onboarding_experience_completed": true, + "home_liveboard_identifier": "061457a2-27bc-43a9-9754-0cd873691bf0", + "favorite_metadata": [ + { + "type": "ANSWER", + "identifier": "10a69d10-e455-4473-b1c6-de1da8cc1ad5" + } + ] + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/users/create", + "operationId": "createUser", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 558 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "name": "nsarchwellj1688027208571", + "display_name": null, + "password": "sV4/GYX$Ip?%", + "email": "nstrutherj@opera.com", + "account_status": "ACTIVE", + "org_identifiers": [ + "0", + "0", + "0" + ], + "group_identifiers": [ + "cfa01dd9-9605-422d-b7de-a37afff63647", + "280a2235-3721-43fc-aa25-5d33549ecc90", + "f827545e-a592-4280-8ceb-318bd673d04c" + ], + "notify_on_share": true, + "onboarding_experience_completed": true, + "home_liveboard_identifier": "6715f768-8930-4180-9a3d-1efdbfaa8e7f" + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/users/create", + "operationId": "createUser", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 559 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "name": "ulapworthe1688027208560", + "display_name": "Udall", + "password": "aC6=lYmFc|kkBZ", + "email": null, + "account_status": "PENDING", + "org_identifiers": [ + "0" + ], + "visibility": "SHARABLE", + "notify_on_share": true, + "show_onboarding_experience": false, + "onboarding_experience_completed": true + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/users/create", + "operationId": "createUser", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 560 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "name": null, + "display_name": "Inger", + "password": "qU0,_Bae|iF$PVo3", + "email": "itrekeri@earthlink.net", + "group_identifiers": [ + "cfa01dd9-9605-422d-b7de-a37afff63647", + "280a2235-3721-43fc-aa25-5d33549ecc90" + ], + "visibility": "SHARABLE", + "notify_on_share": false, + "onboarding_experience_completed": true, + "favorite_metadata": [ + { + "type": "ANSWER", + "identifier": "10a69d10-e455-4473-b1c6-de1da8cc1ad5" + } + ] + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/users/create", + "operationId": "createUser", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 561 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "name": "icastrii1688027208568", + "display_name": "Inger", + "password": null, + "email": "itrekeri@earthlink.net", + "group_identifiers": [ + "cfa01dd9-9605-422d-b7de-a37afff63647", + "280a2235-3721-43fc-aa25-5d33549ecc90" + ], + "visibility": "SHARABLE", + "notify_on_share": false, + "onboarding_experience_completed": true, + "favorite_metadata": [ + { + "type": "ANSWER", + "identifier": "10a69d10-e455-4473-b1c6-de1da8cc1ad5" + } + ] + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/users/create", + "operationId": "createUser", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 562 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "name": "bcroix51688027208538", + "display_name": "Bibbye", + "password": null, + "email": "bscantlebury5@meetup.com", + "account_type": "OIDC_USER", + "account_status": "EXPIRED", + "org_identifiers": [ + "0", + "0", + "0" + ], + "notify_on_share": true, + "onboarding_experience_completed": false, + "favorite_metadata": [ + { + "type": "ANSWER", + "identifier": "10a69d10-e455-4473-b1c6-de1da8cc1ad5" + } + ] + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/users/create", + "operationId": "createUser", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 563 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "name": "enel41688027208536", + "display_name": null, + "password": "iI8~Z3MTr", + "email": "epaxeford4@independent.co.uk", + "account_type": "LDAP_USER", + "group_identifiers": [ + "cfa01dd9-9605-422d-b7de-a37afff63647" + ], + "visibility": "NON_SHARABLE", + "notify_on_share": true, + "show_onboarding_experience": true, + "onboarding_experience_completed": false + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/users/create", + "operationId": "createUser", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 564 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "name": "nsarchwellj1688027208571", + "display_name": "Neysa", + "password": null, + "email": "nstrutherj@opera.com", + "account_status": "ACTIVE", + "org_identifiers": [ + "0", + "0", + "0" + ], + "group_identifiers": [ + "cfa01dd9-9605-422d-b7de-a37afff63647", + "280a2235-3721-43fc-aa25-5d33549ecc90", + "f827545e-a592-4280-8ceb-318bd673d04c" + ], + "notify_on_share": true, + "onboarding_experience_completed": true, + "home_liveboard_identifier": "6715f768-8930-4180-9a3d-1efdbfaa8e7f" + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/users/create", + "operationId": "createUser", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 565 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "name": "nsarchwellj1688027208571", + "display_name": "Neysa", + "password": "sV4/GYX$Ip?%", + "email": null, + "account_status": "ACTIVE", + "org_identifiers": [ + "0", + "0", + "0" + ], + "group_identifiers": [ + "cfa01dd9-9605-422d-b7de-a37afff63647", + "280a2235-3721-43fc-aa25-5d33549ecc90", + "f827545e-a592-4280-8ceb-318bd673d04c" + ], + "notify_on_share": true, + "onboarding_experience_completed": true, + "home_liveboard_identifier": "6715f768-8930-4180-9a3d-1efdbfaa8e7f" + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/users/create", + "operationId": "createUser", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 566 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "name": null, + "display_name": "Inger", + "password": "qU0,_Bae|iF$PVo3", + "email": "itrekeri@earthlink.net", + "group_identifiers": [ + "cfa01dd9-9605-422d-b7de-a37afff63647", + "280a2235-3721-43fc-aa25-5d33549ecc90" + ], + "visibility": "SHARABLE", + "notify_on_share": false, + "onboarding_experience_completed": true, + "favorite_metadata": [ + { + "type": "ANSWER", + "identifier": "10a69d10-e455-4473-b1c6-de1da8cc1ad5" + } + ] + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/users/create", + "operationId": "createUser", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 567 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "name": [ + "iwinckworthg1688027208564" + ], + "display_name": "Ilaire", + "password": "vX0*3ITBa,?+x", + "email": "ibutlandg@biblegateway.com", + "account_type": "OIDC_USER", + "org_identifiers": [ + "0", + "0", + "0" + ], + "notify_on_share": true, + "show_onboarding_experience": true, + "onboarding_experience_completed": false + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/users/create", + "operationId": "createUser", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 568 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "name": "cbower21688027208531", + "display_name": [ + "Clementina" + ], + "password": "rC8>Aed*&ZJ1c", + "email": "csimmans2@eepurl.com", + "account_status": "EXPIRED", + "org_identifiers": [ + "0", + "0", + "0" + ], + "notify_on_share": true, + "onboarding_experience_completed": false + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/users/create", + "operationId": "createUser", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 569 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "name": "icastrii1688027208568", + "display_name": "Inger", + "password": null, + "email": "itrekeri@earthlink.net", + "group_identifiers": [ + "cfa01dd9-9605-422d-b7de-a37afff63647", + "280a2235-3721-43fc-aa25-5d33549ecc90" + ], + "visibility": "SHARABLE", + "notify_on_share": false, + "onboarding_experience_completed": true, + "favorite_metadata": [ + { + "type": "ANSWER", + "identifier": "10a69d10-e455-4473-b1c6-de1da8cc1ad5" + } + ] + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/users/create", + "operationId": "createUser", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 570 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "name": "enel41688027208536", + "display_name": "Eli", + "password": "iI8~Z3MTr", + "email": [ + "epaxeford4@independent.co.uk" + ], + "account_type": "LDAP_USER", + "group_identifiers": [ + "cfa01dd9-9605-422d-b7de-a37afff63647" + ], + "visibility": "NON_SHARABLE", + "notify_on_share": true, + "show_onboarding_experience": true, + "onboarding_experience_completed": false + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/users/create", + "operationId": "createUser", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 571 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "name": "owaliszewskia1688027208550", + "display_name": "Onida", + "password": "lB7`?o'8OXA\"#1B", + "email": "othicketta@ebay.com", + "account_type": "REMOTE_USER", + "account_status": [ + "EXPIRED" + ], + "org_identifiers": [ + "0", + "0" + ], + "group_identifiers": [ + "cfa01dd9-9605-422d-b7de-a37afff63647", + "280a2235-3721-43fc-aa25-5d33549ecc90", + "f827545e-a592-4280-8ceb-318bd673d04c" + ], + "visibility": "NON_SHARABLE", + "favorite_metadata": [ + { + "type": "ANSWER", + "identifier": "10a69d10-e455-4473-b1c6-de1da8cc1ad5" + }, + { + "type": "ANSWER", + "identifier": "48d27aee-59c3-4a0c-8d2c-5a8989c55bb1" + } + ] + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/users/create", + "operationId": "createUser", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 572 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "name": "bparringtond1688027208558", + "display_name": "Berny", + "password": "jX3|`%Jw", + "email": "bmatyushonokd@cafepress.com", + "org_identifiers": "VeCnvORKONLgNHE", + "notify_on_share": true, + "show_onboarding_experience": true, + "favorite_metadata": [ + { + "type": "ANSWER", + "identifier": "10a69d10-e455-4473-b1c6-de1da8cc1ad5" + } + ] + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/users/create", + "operationId": "createUser", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 573 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "name": "nsarchwellj1688027208571", + "display_name": "Neysa", + "password": "sV4/GYX$Ip?%", + "email": [ + "nstrutherj@opera.com" + ], + "account_status": "ACTIVE", + "org_identifiers": [ + "0", + "0", + "0" + ], + "group_identifiers": [ + "cfa01dd9-9605-422d-b7de-a37afff63647", + "280a2235-3721-43fc-aa25-5d33549ecc90", + "f827545e-a592-4280-8ceb-318bd673d04c" + ], + "notify_on_share": true, + "onboarding_experience_completed": true, + "home_liveboard_identifier": "6715f768-8930-4180-9a3d-1efdbfaa8e7f" + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/users/create", + "operationId": "createUser", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 574 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "name": "weckersleyh1688027208566", + "display_name": "Wake", + "password": "yP9>yKAV_", + "email": [ + "wshervilh@ning.com" + ], + "visibility": "NON_SHARABLE", + "notify_on_share": false, + "home_liveboard_identifier": "33248a57-cc70-4e39-9199-fb5092283381" + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/users/create", + "operationId": "createUser", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 575 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "name": "enel41688027208536", + "display_name": "Eli", + "password": "iI8~Z3MTr", + "email": [ + "epaxeford4@independent.co.uk" + ], + "account_type": "LDAP_USER", + "group_identifiers": [ + "cfa01dd9-9605-422d-b7de-a37afff63647" + ], + "visibility": "NON_SHARABLE", + "notify_on_share": true, + "show_onboarding_experience": true, + "onboarding_experience_completed": false + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/users/create", + "operationId": "createUser", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 576 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "name": null, + "display_name": "Ilaire", + "password": "vX0*3ITBa,?+x", + "email": "ibutlandg@biblegateway.com", + "account_type": "OIDC_USER", + "org_identifiers": [ + "0", + "0", + "0" + ], + "notify_on_share": true, + "show_onboarding_experience": true, + "onboarding_experience_completed": false + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/users/create", + "operationId": "createUser", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 577 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "name": "eseago01688027208501", + "display_name": "Erma", + "password": [ + "bQ8\\\"'Dr\"" + ], + "email": "ecokly0@mac.com", + "account_status": "INACTIVE", + "group_identifiers": [ + "cfa01dd9-9605-422d-b7de-a37afff63647" + ], + "show_onboarding_experience": false, + "onboarding_experience_completed": true + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/users/create", + "operationId": "createUser", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 578 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "name": "icastrii1688027208568", + "display_name": "Inger", + "password": "qU0,_Bae|iF$PVo3", + "email": [ + "itrekeri@earthlink.net" + ], + "group_identifiers": [ + "cfa01dd9-9605-422d-b7de-a37afff63647", + "280a2235-3721-43fc-aa25-5d33549ecc90" + ], + "visibility": "SHARABLE", + "notify_on_share": false, + "onboarding_experience_completed": true, + "favorite_metadata": [ + { + "type": "ANSWER", + "identifier": "10a69d10-e455-4473-b1c6-de1da8cc1ad5" + } + ] + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/users/create", + "operationId": "createUser", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 579 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "name": [ + "zessam11688027208529" + ], + "display_name": "Zitella", + "password": "pJ5}7>dMEh(N", + "email": "zcotterill1@digg.com", + "org_identifiers": [ + "0", + "0" + ], + "group_identifiers": [ + "cfa01dd9-9605-422d-b7de-a37afff63647" + ], + "visibility": "NON_SHARABLE", + "notify_on_share": false, + "onboarding_experience_completed": false + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/users/create", + "operationId": "createUser", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 580 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "name": "zessam11688027208529", + "display_name": "Zitella", + "password": "pJ5}7>dMEh(N", + "email": [ + "zcotterill1@digg.com" + ], + "org_identifiers": [ + "0", + "0" + ], + "group_identifiers": [ + "cfa01dd9-9605-422d-b7de-a37afff63647" + ], + "visibility": "NON_SHARABLE", + "notify_on_share": false, + "onboarding_experience_completed": false + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/users/{user_identifier}/update", + "operationId": "updateUser", + "scenario": "positive", + "type": "AUTOMATIC", + "testId": 581 + }, + "Path_Variables": { + "user_identifier": "eseago01688027208501" + }, + "Query_Variables": {}, + "Body": { + "name": "Consalve1688027210072", + "display_name": "Consalve1688027210072 Gisborne", + "favorite_metadata": [ + { + "identifier": "10a69d10-e455-4473-b1c6-de1da8cc1ad5", + "type": "ANSWER" + } + ], + "org_identifiers": [ + "0", + "0" + ] + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/users/{user_identifier}/update", + "operationId": "updateUser", + "scenario": "positive", + "type": "AUTOMATIC", + "testId": 582 + }, + "Path_Variables": { + "user_identifier": "zessam11688027208529" + }, + "Query_Variables": {}, + "Body": { + "name": "Alayne1688027210121", + "display_name": "Alayne1688027210121 Paddell", + "email": "apaddell1@gizmodo.com", + "show_onboarding_experience": true, + "account_type": "LDAP_USER", + "group_identifiers": [ + "cfa01dd9-9605-422d-b7de-a37afff63647" + ], + "home_liveboard_identifier": "33248a57-cc70-4e39-9199-fb5092283381", + "favorite_metadata": [ + { + "identifier": "10a69d10-e455-4473-b1c6-de1da8cc1ad5", + "type": "ANSWER" + } + ], + "operation": "REPLACE" + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/users/{user_identifier}/update", + "operationId": "updateUser", + "scenario": "positive", + "type": "AUTOMATIC", + "testId": 583 + }, + "Path_Variables": { + "user_identifier": "cbower21688027208531" + }, + "Query_Variables": {}, + "Body": { + "display_name": "Town Pyrke", + "notify_on_share": false, + "onboarding_experience_completed": true, + "account_type": "SAML_USER", + "home_liveboard_identifier": "c836ad16-660d-4d28-a3a0-e07cb9eb6ab1", + "org_identifiers": [ + "0" + ] + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/users/{user_identifier}/update", + "operationId": "updateUser", + "scenario": "positive", + "type": "AUTOMATIC", + "testId": 584 + }, + "Path_Variables": { + "user_identifier": "tleverage31688027208533" + }, + "Query_Variables": {}, + "Body": { + "email": "lkenningham3@yale.edu", + "show_onboarding_experience": true, + "onboarding_experience_completed": true, + "group_identifiers": [ + "cfa01dd9-9605-422d-b7de-a37afff63647", + "280a2235-3721-43fc-aa25-5d33549ecc90" + ], + "home_liveboard_identifier": "e36ee65e-64be-436b-a29a-22d8998c4fae", + "favorite_metadata": [ + { + "identifier": "10a69d10-e455-4473-b1c6-de1da8cc1ad5", + "type": "ANSWER" + }, + { + "identifier": "48d27aee-59c3-4a0c-8d2c-5a8989c55bb1", + "type": null + }, + { + "identifier": "262abdac-b00f-4f5f-ad33-fcf10154184f", + "type": "LIVEBOARD" + } + ] + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/users/{user_identifier}/update", + "operationId": "updateUser", + "scenario": "positive", + "type": "AUTOMATIC", + "testId": 585 + }, + "Path_Variables": { + "user_identifier": "enel41688027208536" + }, + "Query_Variables": {}, + "Body": { + "display_name": "Clarke Millin", + "visibility": "SHARABLE", + "email": "cmillin4@opensource.org", + "account_status": "LOCKED", + "notify_on_share": true + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/users/{user_identifier}/update", + "operationId": "updateUser", + "scenario": "positive", + "type": "AUTOMATIC", + "testId": 586 + }, + "Path_Variables": { + "user_identifier": "bcroix51688027208538" + }, + "Query_Variables": {}, + "Body": { + "name": "Breanne1688027210134", + "email": "bwigfall5@devhub.com", + "onboarding_experience_completed": true, + "operation": "ADD" + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/users/{user_identifier}/update", + "operationId": "updateUser", + "scenario": "positive", + "type": "AUTOMATIC", + "testId": 587 + }, + "Path_Variables": { + "user_identifier": "sknappen61688027208541" + }, + "Query_Variables": {}, + "Body": { + "name": "Eddie1688027210137", + "display_name": "Eddie1688027210137 Eva", + "visibility": "SHARABLE", + "show_onboarding_experience": false, + "onboarding_experience_completed": true, + "account_type": "SAML_USER", + "group_identifiers": [ + "cfa01dd9-9605-422d-b7de-a37afff63647" + ], + "home_liveboard_identifier": "6715f768-8930-4180-9a3d-1efdbfaa8e7f", + "favorite_metadata": [ + { + "identifier": "10a69d10-e455-4473-b1c6-de1da8cc1ad5", + "type": null + }, + { + "identifier": "48d27aee-59c3-4a0c-8d2c-5a8989c55bb1", + "type": "ANSWER" + } + ], + "org_identifiers": [ + "0", + "0", + "0" + ], + "operation": "REPLACE" + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/users/{user_identifier}/update", + "operationId": "updateUser", + "scenario": "positive", + "type": "AUTOMATIC", + "testId": 588 + }, + "Path_Variables": { + "user_identifier": "wbignal71688027208543" + }, + "Query_Variables": {}, + "Body": { + "display_name": "Barb Lanfranchi", + "visibility": "SHARABLE", + "email": "blanfranchi7@scribd.com", + "account_status": "ACTIVE", + "notify_on_share": false, + "show_onboarding_experience": false, + "account_type": "REMOTE_USER", + "group_identifiers": [ + "cfa01dd9-9605-422d-b7de-a37afff63647" + ], + "favorite_metadata": [ + { + "identifier": "10a69d10-e455-4473-b1c6-de1da8cc1ad5", + "type": null + }, + { + "identifier": "48d27aee-59c3-4a0c-8d2c-5a8989c55bb1", + "type": null + }, + { + "identifier": "262abdac-b00f-4f5f-ad33-fcf10154184f", + "type": "LIVEBOARD" + } + ], + "org_identifiers": [ + "0", + "0", + "0" + ], + "operation": "REMOVE" + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/users/{user_identifier}/update", + "operationId": "updateUser", + "scenario": "positive", + "type": "AUTOMATIC", + "testId": 589 + }, + "Path_Variables": { + "user_identifier": "zivory81688027208546" + }, + "Query_Variables": {}, + "Body": { + "name": "Pren1688027210145", + "visibility": "SHARABLE", + "email": "pmarkushkin8@photobucket.com", + "onboarding_experience_completed": false, + "account_type": "LDAP_USER", + "group_identifiers": [ + "cfa01dd9-9605-422d-b7de-a37afff63647", + "280a2235-3721-43fc-aa25-5d33549ecc90" + ], + "favorite_metadata": [ + { + "identifier": "10a69d10-e455-4473-b1c6-de1da8cc1ad5", + "type": "ANSWER" + }, + { + "identifier": "48d27aee-59c3-4a0c-8d2c-5a8989c55bb1", + "type": "ANSWER" + } + ], + "org_identifiers": [ + "0", + "0", + "0" + ], + "operation": "REPLACE" + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/users/{user_identifier}/update", + "operationId": "updateUser", + "scenario": "positive", + "type": "AUTOMATIC", + "testId": 590 + }, + "Path_Variables": { + "user_identifier": "ltunesi91688027208548" + }, + "Query_Variables": {}, + "Body": { + "visibility": "NON_SHARABLE", + "email": "ygoane9@redcross.org", + "onboarding_experience_completed": false, + "account_type": "LDAP_USER", + "home_liveboard_identifier": "33248a57-cc70-4e39-9199-fb5092283381", + "favorite_metadata": [ + { + "identifier": "10a69d10-e455-4473-b1c6-de1da8cc1ad5", + "type": null + }, + { + "identifier": "48d27aee-59c3-4a0c-8d2c-5a8989c55bb1", + "type": "ANSWER" + } + ], + "operation": "REPLACE" + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/users/{user_identifier}/update", + "operationId": "updateUser", + "scenario": "positive", + "type": "AUTOMATIC", + "testId": 591 + }, + "Path_Variables": { + "user_identifier": "owaliszewskia1688027208550" + }, + "Query_Variables": {}, + "Body": { + "display_name": "Oliviero Viles", + "visibility": "NON_SHARABLE", + "email": "ovilesa@studiopress.com", + "notify_on_share": false, + "account_type": "OIDC_USER", + "home_liveboard_identifier": "6715f768-8930-4180-9a3d-1efdbfaa8e7f", + "org_identifiers": [ + "0", + "0" + ], + "operation": "REPLACE" + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/users/{user_identifier}/update", + "operationId": "updateUser", + "scenario": "positive", + "type": "AUTOMATIC", + "testId": 592 + }, + "Path_Variables": { + "user_identifier": "dfrancklinb1688027208553" + }, + "Query_Variables": {}, + "Body": { + "visibility": "SHARABLE", + "email": "afetherstoneb@cnn.com", + "account_status": "INACTIVE", + "group_identifiers": [ + "cfa01dd9-9605-422d-b7de-a37afff63647" + ], + "home_liveboard_identifier": "061457a2-27bc-43a9-9754-0cd873691bf0", + "favorite_metadata": [ + { + "identifier": "10a69d10-e455-4473-b1c6-de1da8cc1ad5", + "type": "ANSWER" + }, + { + "identifier": "48d27aee-59c3-4a0c-8d2c-5a8989c55bb1", + "type": null + }, + { + "identifier": "262abdac-b00f-4f5f-ad33-fcf10154184f", + "type": null + } + ], + "org_identifiers": [ + "0", + "0" + ], + "operation": "REPLACE" + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/users/{user_identifier}/update", + "operationId": "updateUser", + "scenario": "positive", + "type": "AUTOMATIC", + "testId": 593 + }, + "Path_Variables": { + "user_identifier": "baronstamc1688027208555" + }, + "Query_Variables": {}, + "Body": { + "name": "Rahel1688027210159", + "onboarding_experience_completed": true, + "home_liveboard_identifier": "601be8e5-140e-477c-8812-843795306438", + "favorite_metadata": [ + { + "identifier": "10a69d10-e455-4473-b1c6-de1da8cc1ad5", + "type": "ANSWER" + }, + { + "identifier": "48d27aee-59c3-4a0c-8d2c-5a8989c55bb1", + "type": null + } + ], + "org_identifiers": [ + "0", + "0", + "0" + ] + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/users/{user_identifier}/update", + "operationId": "updateUser", + "scenario": "positive", + "type": "AUTOMATIC", + "testId": 594 + }, + "Path_Variables": { + "user_identifier": "bparringtond1688027208558" + }, + "Query_Variables": {}, + "Body": { + "name": "Demetre1688027210162", + "visibility": "SHARABLE", + "account_status": "ACTIVE", + "onboarding_experience_completed": false + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/users/{user_identifier}/update", + "operationId": "updateUser", + "scenario": "positive", + "type": "AUTOMATIC", + "testId": 595 + }, + "Path_Variables": { + "user_identifier": "ulapworthe1688027208560" + }, + "Query_Variables": {}, + "Body": { + "name": "Dex1688027210165", + "display_name": "Dex1688027210165 Becaris", + "account_status": "INACTIVE", + "notify_on_share": false, + "group_identifiers": [ + "cfa01dd9-9605-422d-b7de-a37afff63647" + ], + "home_liveboard_identifier": "6715f768-8930-4180-9a3d-1efdbfaa8e7f", + "favorite_metadata": [ + { + "identifier": "10a69d10-e455-4473-b1c6-de1da8cc1ad5", + "type": "ANSWER" + }, + { + "identifier": "48d27aee-59c3-4a0c-8d2c-5a8989c55bb1", + "type": null + }, + { + "identifier": "262abdac-b00f-4f5f-ad33-fcf10154184f", + "type": null + } + ], + "operation": "REPLACE" + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/users/{user_identifier}/update", + "operationId": "updateUser", + "scenario": "positive", + "type": "AUTOMATIC", + "testId": 596 + }, + "Path_Variables": { + "user_identifier": "jocurriganf1688027208562" + }, + "Query_Variables": {}, + "Body": { + "visibility": "NON_SHARABLE", + "email": "scarlissof@nymag.com", + "account_status": "EXPIRED", + "show_onboarding_experience": true, + "onboarding_experience_completed": false, + "account_type": "REMOTE_USER", + "home_liveboard_identifier": "2ff57a24-cf90-485f-8b4b-45fc17474c6f", + "org_identifiers": [ + "0", + "0", + "0" + ], + "operation": "ADD" + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/users/{user_identifier}/update", + "operationId": "updateUser", + "scenario": "positive", + "type": "AUTOMATIC", + "testId": 597 + }, + "Path_Variables": { + "user_identifier": "iwinckworthg1688027208564" + }, + "Query_Variables": {}, + "Body": { + "name": "Harvey1688027210173", + "display_name": "Harvey1688027210173 Covil", + "email": "hcovilg@t-online.de", + "notify_on_share": true, + "group_identifiers": [ + "cfa01dd9-9605-422d-b7de-a37afff63647" + ], + "home_liveboard_identifier": "c836ad16-660d-4d28-a3a0-e07cb9eb6ab1", + "favorite_metadata": [ + { + "identifier": "10a69d10-e455-4473-b1c6-de1da8cc1ad5", + "type": null + }, + { + "identifier": "48d27aee-59c3-4a0c-8d2c-5a8989c55bb1", + "type": "ANSWER" + } + ], + "org_identifiers": [ + "0", + "0" + ] + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/users/{user_identifier}/update", + "operationId": "updateUser", + "scenario": "positive", + "type": "AUTOMATIC", + "testId": 598 + }, + "Path_Variables": { + "user_identifier": "weckersleyh1688027208566" + }, + "Query_Variables": {}, + "Body": { + "name": "Rickie1688027210176", + "email": "rstartinh@nbcnews.com", + "notify_on_share": false, + "show_onboarding_experience": true + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/users/{user_identifier}/update", + "operationId": "updateUser", + "scenario": "positive", + "type": "AUTOMATIC", + "testId": 599 + }, + "Path_Variables": { + "user_identifier": "icastrii1688027208568" + }, + "Query_Variables": {}, + "Body": { + "name": "Chanda1688027210179", + "display_name": "Chanda1688027210179 Mozzi", + "visibility": "SHARABLE", + "notify_on_share": true, + "show_onboarding_experience": true, + "onboarding_experience_completed": false, + "account_type": "LDAP_USER", + "group_identifiers": [ + "cfa01dd9-9605-422d-b7de-a37afff63647", + "280a2235-3721-43fc-aa25-5d33549ecc90" + ], + "home_liveboard_identifier": "061457a2-27bc-43a9-9754-0cd873691bf0", + "org_identifiers": [ + "0", + "0", + "0" + ], + "operation": "REMOVE" + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/users/{user_identifier}/update", + "operationId": "updateUser", + "scenario": "positive", + "type": "AUTOMATIC", + "testId": 600 + }, + "Path_Variables": { + "user_identifier": "nsarchwellj1688027208571" + }, + "Query_Variables": {}, + "Body": { + "name": "Ive1688027210182", + "email": "ineevej@home.pl", + "notify_on_share": false, + "onboarding_experience_completed": true, + "account_type": "LOCAL_USER", + "group_identifiers": [ + "cfa01dd9-9605-422d-b7de-a37afff63647", + "280a2235-3721-43fc-aa25-5d33549ecc90" + ], + "favorite_metadata": [ + { + "identifier": "10a69d10-e455-4473-b1c6-de1da8cc1ad5", + "type": null + }, + { + "identifier": "48d27aee-59c3-4a0c-8d2c-5a8989c55bb1", + "type": "ANSWER" + }, + { + "identifier": "262abdac-b00f-4f5f-ad33-fcf10154184f", + "type": null + } + ], + "org_identifiers": [ + "0", + "0", + "0" + ] + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/users/{user_identifier}/update", + "operationId": "updateUser", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 601 + }, + "Path_Variables": { + "user_identifier": null + }, + "Query_Variables": {}, + "Body": { + "display_name": "Barb Lanfranchi", + "visibility": "SHARABLE", + "email": "blanfranchi7@scribd.com", + "account_status": "ACTIVE", + "notify_on_share": false, + "show_onboarding_experience": false, + "account_type": "REMOTE_USER", + "group_identifiers": [ + "cfa01dd9-9605-422d-b7de-a37afff63647" + ], + "favorite_metadata": [ + { + "identifier": "10a69d10-e455-4473-b1c6-de1da8cc1ad5", + "type": null + }, + { + "identifier": "48d27aee-59c3-4a0c-8d2c-5a8989c55bb1", + "type": null + }, + { + "identifier": "262abdac-b00f-4f5f-ad33-fcf10154184f", + "type": "LIVEBOARD" + } + ], + "org_identifiers": [ + "0", + "0", + "0" + ], + "operation": "REMOVE" + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/users/{user_identifier}/update", + "operationId": "updateUser", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 602 + }, + "Path_Variables": { + "user_identifier": null + }, + "Query_Variables": {}, + "Body": { + "display_name": "Barb Lanfranchi", + "visibility": "SHARABLE", + "email": "blanfranchi7@scribd.com", + "account_status": "ACTIVE", + "notify_on_share": false, + "show_onboarding_experience": false, + "account_type": "REMOTE_USER", + "group_identifiers": [ + "cfa01dd9-9605-422d-b7de-a37afff63647" + ], + "favorite_metadata": [ + { + "identifier": "10a69d10-e455-4473-b1c6-de1da8cc1ad5", + "type": null + }, + { + "identifier": "48d27aee-59c3-4a0c-8d2c-5a8989c55bb1", + "type": null + }, + { + "identifier": "262abdac-b00f-4f5f-ad33-fcf10154184f", + "type": "LIVEBOARD" + } + ], + "org_identifiers": [ + "0", + "0", + "0" + ], + "operation": "REMOVE" + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/users/{user_identifier}/update", + "operationId": "updateUser", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 603 + }, + "Path_Variables": { + "user_identifier": null + }, + "Query_Variables": {}, + "Body": { + "email": "lkenningham3@yale.edu", + "show_onboarding_experience": true, + "onboarding_experience_completed": true, + "group_identifiers": [ + "cfa01dd9-9605-422d-b7de-a37afff63647", + "280a2235-3721-43fc-aa25-5d33549ecc90" + ], + "home_liveboard_identifier": "e36ee65e-64be-436b-a29a-22d8998c4fae", + "favorite_metadata": [ + { + "identifier": "10a69d10-e455-4473-b1c6-de1da8cc1ad5", + "type": "ANSWER" + }, + { + "identifier": "48d27aee-59c3-4a0c-8d2c-5a8989c55bb1", + "type": null + }, + { + "identifier": "262abdac-b00f-4f5f-ad33-fcf10154184f", + "type": "LIVEBOARD" + } + ] + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/users/{user_identifier}/update", + "operationId": "updateUser", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 604 + }, + "Path_Variables": { + "user_identifier": null + }, + "Query_Variables": {}, + "Body": { + "visibility": "SHARABLE", + "email": "afetherstoneb@cnn.com", + "account_status": "INACTIVE", + "group_identifiers": [ + "cfa01dd9-9605-422d-b7de-a37afff63647" + ], + "home_liveboard_identifier": "061457a2-27bc-43a9-9754-0cd873691bf0", + "favorite_metadata": [ + { + "identifier": "10a69d10-e455-4473-b1c6-de1da8cc1ad5", + "type": "ANSWER" + }, + { + "identifier": "48d27aee-59c3-4a0c-8d2c-5a8989c55bb1", + "type": null + }, + { + "identifier": "262abdac-b00f-4f5f-ad33-fcf10154184f", + "type": null + } + ], + "org_identifiers": [ + "0", + "0" + ], + "operation": "REPLACE" + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/users/{user_identifier}/update", + "operationId": "updateUser", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 605 + }, + "Path_Variables": { + "user_identifier": null + }, + "Query_Variables": {}, + "Body": { + "visibility": "SHARABLE", + "email": "afetherstoneb@cnn.com", + "account_status": "INACTIVE", + "group_identifiers": [ + "cfa01dd9-9605-422d-b7de-a37afff63647" + ], + "home_liveboard_identifier": "061457a2-27bc-43a9-9754-0cd873691bf0", + "favorite_metadata": [ + { + "identifier": "10a69d10-e455-4473-b1c6-de1da8cc1ad5", + "type": "ANSWER" + }, + { + "identifier": "48d27aee-59c3-4a0c-8d2c-5a8989c55bb1", + "type": null + }, + { + "identifier": "262abdac-b00f-4f5f-ad33-fcf10154184f", + "type": null + } + ], + "org_identifiers": [ + "0", + "0" + ], + "operation": "REPLACE" + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/users/{user_identifier}/update", + "operationId": "updateUser", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 606 + }, + "Path_Variables": { + "user_identifier": null + }, + "Query_Variables": {}, + "Body": { + "name": "Alayne1688027210121", + "display_name": "Alayne1688027210121 Paddell", + "email": "apaddell1@gizmodo.com", + "show_onboarding_experience": true, + "account_type": "LDAP_USER", + "group_identifiers": [ + "cfa01dd9-9605-422d-b7de-a37afff63647" + ], + "home_liveboard_identifier": "33248a57-cc70-4e39-9199-fb5092283381", + "favorite_metadata": [ + { + "identifier": "10a69d10-e455-4473-b1c6-de1da8cc1ad5", + "type": "ANSWER" + } + ], + "operation": "REPLACE" + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/users/{user_identifier}/update", + "operationId": "updateUser", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 607 + }, + "Path_Variables": { + "user_identifier": null + }, + "Query_Variables": {}, + "Body": { + "name": "Chanda1688027210179", + "display_name": "Chanda1688027210179 Mozzi", + "visibility": "SHARABLE", + "notify_on_share": true, + "show_onboarding_experience": true, + "onboarding_experience_completed": false, + "account_type": "LDAP_USER", + "group_identifiers": [ + "cfa01dd9-9605-422d-b7de-a37afff63647", + "280a2235-3721-43fc-aa25-5d33549ecc90" + ], + "home_liveboard_identifier": "061457a2-27bc-43a9-9754-0cd873691bf0", + "org_identifiers": [ + "0", + "0", + "0" + ], + "operation": "REMOVE" + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/users/{user_identifier}/update", + "operationId": "updateUser", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 608 + }, + "Path_Variables": { + "user_identifier": null + }, + "Query_Variables": {}, + "Body": { + "name": "Harvey1688027210173", + "display_name": "Harvey1688027210173 Covil", + "email": "hcovilg@t-online.de", + "notify_on_share": true, + "group_identifiers": [ + "cfa01dd9-9605-422d-b7de-a37afff63647" + ], + "home_liveboard_identifier": "c836ad16-660d-4d28-a3a0-e07cb9eb6ab1", + "favorite_metadata": [ + { + "identifier": "10a69d10-e455-4473-b1c6-de1da8cc1ad5", + "type": null + }, + { + "identifier": "48d27aee-59c3-4a0c-8d2c-5a8989c55bb1", + "type": "ANSWER" + } + ], + "org_identifiers": [ + "0", + "0" + ] + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/users/{user_identifier}/update", + "operationId": "updateUser", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 609 + }, + "Path_Variables": { + "user_identifier": null + }, + "Query_Variables": {}, + "Body": { + "name": "Alayne1688027210121", + "display_name": "Alayne1688027210121 Paddell", + "email": "apaddell1@gizmodo.com", + "show_onboarding_experience": true, + "account_type": "LDAP_USER", + "group_identifiers": [ + "cfa01dd9-9605-422d-b7de-a37afff63647" + ], + "home_liveboard_identifier": "33248a57-cc70-4e39-9199-fb5092283381", + "favorite_metadata": [ + { + "identifier": "10a69d10-e455-4473-b1c6-de1da8cc1ad5", + "type": "ANSWER" + } + ], + "operation": "REPLACE" + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/users/{user_identifier}/update", + "operationId": "updateUser", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 610 + }, + "Path_Variables": { + "user_identifier": null + }, + "Query_Variables": {}, + "Body": { + "name": "Ive1688027210182", + "email": "ineevej@home.pl", + "notify_on_share": false, + "onboarding_experience_completed": true, + "account_type": "LOCAL_USER", + "group_identifiers": [ + "cfa01dd9-9605-422d-b7de-a37afff63647", + "280a2235-3721-43fc-aa25-5d33549ecc90" + ], + "favorite_metadata": [ + { + "identifier": "10a69d10-e455-4473-b1c6-de1da8cc1ad5", + "type": null + }, + { + "identifier": "48d27aee-59c3-4a0c-8d2c-5a8989c55bb1", + "type": "ANSWER" + }, + { + "identifier": "262abdac-b00f-4f5f-ad33-fcf10154184f", + "type": null + } + ], + "org_identifiers": [ + "0", + "0", + "0" + ] + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/users/{user_identifier}/update", + "operationId": "updateUser", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 611 + }, + "Path_Variables": { + "user_identifier": null + }, + "Query_Variables": {}, + "Body": { + "name": "Alayne1688027210121", + "display_name": "Alayne1688027210121 Paddell", + "email": "apaddell1@gizmodo.com", + "show_onboarding_experience": true, + "account_type": "LDAP_USER", + "group_identifiers": [ + "cfa01dd9-9605-422d-b7de-a37afff63647" + ], + "home_liveboard_identifier": "33248a57-cc70-4e39-9199-fb5092283381", + "favorite_metadata": [ + { + "identifier": "10a69d10-e455-4473-b1c6-de1da8cc1ad5", + "type": "ANSWER" + } + ], + "operation": "REPLACE" + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/users/{user_identifier}/update", + "operationId": "updateUser", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 612 + }, + "Path_Variables": { + "user_identifier": null + }, + "Query_Variables": {}, + "Body": { + "name": "Rahel1688027210159", + "onboarding_experience_completed": true, + "home_liveboard_identifier": "601be8e5-140e-477c-8812-843795306438", + "favorite_metadata": [ + { + "identifier": "10a69d10-e455-4473-b1c6-de1da8cc1ad5", + "type": "ANSWER" + }, + { + "identifier": "48d27aee-59c3-4a0c-8d2c-5a8989c55bb1", + "type": null + } + ], + "org_identifiers": [ + "0", + "0", + "0" + ] + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/users/{user_identifier}/update", + "operationId": "updateUser", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 613 + }, + "Path_Variables": { + "user_identifier": null + }, + "Query_Variables": {}, + "Body": { + "name": "Dex1688027210165", + "display_name": "Dex1688027210165 Becaris", + "account_status": "INACTIVE", + "notify_on_share": false, + "group_identifiers": [ + "cfa01dd9-9605-422d-b7de-a37afff63647" + ], + "home_liveboard_identifier": "6715f768-8930-4180-9a3d-1efdbfaa8e7f", + "favorite_metadata": [ + { + "identifier": "10a69d10-e455-4473-b1c6-de1da8cc1ad5", + "type": "ANSWER" + }, + { + "identifier": "48d27aee-59c3-4a0c-8d2c-5a8989c55bb1", + "type": null + }, + { + "identifier": "262abdac-b00f-4f5f-ad33-fcf10154184f", + "type": null + } + ], + "operation": "REPLACE" + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/users/{user_identifier}/update", + "operationId": "updateUser", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 614 + }, + "Path_Variables": { + "user_identifier": null + }, + "Query_Variables": {}, + "Body": { + "name": "Rahel1688027210159", + "onboarding_experience_completed": true, + "home_liveboard_identifier": "601be8e5-140e-477c-8812-843795306438", + "favorite_metadata": [ + { + "identifier": "10a69d10-e455-4473-b1c6-de1da8cc1ad5", + "type": "ANSWER" + }, + { + "identifier": "48d27aee-59c3-4a0c-8d2c-5a8989c55bb1", + "type": null + } + ], + "org_identifiers": [ + "0", + "0", + "0" + ] + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/users/{user_identifier}/update", + "operationId": "updateUser", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 615 + }, + "Path_Variables": { + "user_identifier": null + }, + "Query_Variables": {}, + "Body": { + "name": "Pren1688027210145", + "visibility": "SHARABLE", + "email": "pmarkushkin8@photobucket.com", + "onboarding_experience_completed": false, + "account_type": "LDAP_USER", + "group_identifiers": [ + "cfa01dd9-9605-422d-b7de-a37afff63647", + "280a2235-3721-43fc-aa25-5d33549ecc90" + ], + "favorite_metadata": [ + { + "identifier": "10a69d10-e455-4473-b1c6-de1da8cc1ad5", + "type": "ANSWER" + }, + { + "identifier": "48d27aee-59c3-4a0c-8d2c-5a8989c55bb1", + "type": "ANSWER" + } + ], + "org_identifiers": [ + "0", + "0", + "0" + ], + "operation": "REPLACE" + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/users/{user_identifier}/update", + "operationId": "updateUser", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 616 + }, + "Path_Variables": { + "user_identifier": "zivory81688027208546" + }, + "Query_Variables": {}, + "Body": { + "name": "Pren1688027210145", + "visibility": "SHARABLE", + "email": [ + "pmarkushkin8@photobucket.com" + ], + "onboarding_experience_completed": false, + "account_type": "LDAP_USER", + "group_identifiers": [ + "cfa01dd9-9605-422d-b7de-a37afff63647", + "280a2235-3721-43fc-aa25-5d33549ecc90" + ], + "favorite_metadata": [ + { + "identifier": "10a69d10-e455-4473-b1c6-de1da8cc1ad5", + "type": "ANSWER" + }, + { + "identifier": "48d27aee-59c3-4a0c-8d2c-5a8989c55bb1", + "type": "ANSWER" + } + ], + "org_identifiers": [ + "0", + "0", + "0" + ], + "operation": "REPLACE" + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/users/{user_identifier}/update", + "operationId": "updateUser", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 617 + }, + "Path_Variables": { + "user_identifier": "baronstamc1688027208555" + }, + "Query_Variables": {}, + "Body": { + "name": "Rahel1688027210159", + "onboarding_experience_completed": true, + "home_liveboard_identifier": "601be8e5-140e-477c-8812-843795306438", + "favorite_metadata": "NQWHGPBBQbXGbYu", + "org_identifiers": [ + "0", + "0", + "0" + ] + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/users/{user_identifier}/update", + "operationId": "updateUser", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 618 + }, + "Path_Variables": { + "user_identifier": [ + "icastrii1688027208568" + ] + }, + "Query_Variables": {}, + "Body": { + "name": "Chanda1688027210179", + "display_name": "Chanda1688027210179 Mozzi", + "visibility": "SHARABLE", + "notify_on_share": true, + "show_onboarding_experience": true, + "onboarding_experience_completed": false, + "account_type": "LDAP_USER", + "group_identifiers": [ + "cfa01dd9-9605-422d-b7de-a37afff63647", + "280a2235-3721-43fc-aa25-5d33549ecc90" + ], + "home_liveboard_identifier": "061457a2-27bc-43a9-9754-0cd873691bf0", + "org_identifiers": [ + "0", + "0", + "0" + ], + "operation": "REMOVE" + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/users/{user_identifier}/update", + "operationId": "updateUser", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 619 + }, + "Path_Variables": { + "user_identifier": "ltunesi91688027208548" + }, + "Query_Variables": {}, + "Body": { + "visibility": "NON_SHARABLE", + "email": "ygoane9@redcross.org", + "onboarding_experience_completed": false, + "account_type": "LDAP_USER", + "home_liveboard_identifier": "33248a57-cc70-4e39-9199-fb5092283381", + "favorite_metadata": "drYsVSxBkRpOMeW", + "operation": "REPLACE" + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/users/{user_identifier}/update", + "operationId": "updateUser", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 620 + }, + "Path_Variables": { + "user_identifier": "cbower21688027208531" + }, + "Query_Variables": {}, + "Body": { + "display_name": "Town Pyrke", + "notify_on_share": false, + "onboarding_experience_completed": true, + "account_type": "SAML_USER", + "home_liveboard_identifier": "c836ad16-660d-4d28-a3a0-e07cb9eb6ab1", + "org_identifiers": "ukfllndIjMgftSD" + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/users/{user_identifier}/update", + "operationId": "updateUser", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 621 + }, + "Path_Variables": { + "user_identifier": "icastrii1688027208568" + }, + "Query_Variables": {}, + "Body": { + "name": "Chanda1688027210179", + "display_name": "Chanda1688027210179 Mozzi", + "visibility": [ + "SHARABLE" + ], + "notify_on_share": true, + "show_onboarding_experience": true, + "onboarding_experience_completed": false, + "account_type": "LDAP_USER", + "group_identifiers": [ + "cfa01dd9-9605-422d-b7de-a37afff63647", + "280a2235-3721-43fc-aa25-5d33549ecc90" + ], + "home_liveboard_identifier": "061457a2-27bc-43a9-9754-0cd873691bf0", + "org_identifiers": [ + "0", + "0", + "0" + ], + "operation": "REMOVE" + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/users/{user_identifier}/update", + "operationId": "updateUser", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 622 + }, + "Path_Variables": { + "user_identifier": "icastrii1688027208568" + }, + "Query_Variables": {}, + "Body": { + "name": "Chanda1688027210179", + "display_name": "Chanda1688027210179 Mozzi", + "visibility": "SHARABLE", + "notify_on_share": true, + "show_onboarding_experience": true, + "onboarding_experience_completed": false, + "account_type": [ + "LDAP_USER" + ], + "group_identifiers": [ + "cfa01dd9-9605-422d-b7de-a37afff63647", + "280a2235-3721-43fc-aa25-5d33549ecc90" + ], + "home_liveboard_identifier": "061457a2-27bc-43a9-9754-0cd873691bf0", + "org_identifiers": [ + "0", + "0", + "0" + ], + "operation": "REMOVE" + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/users/{user_identifier}/update", + "operationId": "updateUser", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 623 + }, + "Path_Variables": { + "user_identifier": "nsarchwellj1688027208571" + }, + "Query_Variables": {}, + "Body": { + "name": "Ive1688027210182", + "email": [ + "ineevej@home.pl" + ], + "notify_on_share": false, + "onboarding_experience_completed": true, + "account_type": "LOCAL_USER", + "group_identifiers": [ + "cfa01dd9-9605-422d-b7de-a37afff63647", + "280a2235-3721-43fc-aa25-5d33549ecc90" + ], + "favorite_metadata": [ + { + "identifier": "10a69d10-e455-4473-b1c6-de1da8cc1ad5", + "type": null + }, + { + "identifier": "48d27aee-59c3-4a0c-8d2c-5a8989c55bb1", + "type": "ANSWER" + }, + { + "identifier": "262abdac-b00f-4f5f-ad33-fcf10154184f", + "type": null + } + ], + "org_identifiers": [ + "0", + "0", + "0" + ] + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/users/{user_identifier}/update", + "operationId": "updateUser", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 624 + }, + "Path_Variables": { + "user_identifier": "iwinckworthg1688027208564" + }, + "Query_Variables": {}, + "Body": { + "name": "Harvey1688027210173", + "display_name": "Harvey1688027210173 Covil", + "email": "hcovilg@t-online.de", + "notify_on_share": true, + "group_identifiers": [ + "cfa01dd9-9605-422d-b7de-a37afff63647" + ], + "home_liveboard_identifier": [ + "c836ad16-660d-4d28-a3a0-e07cb9eb6ab1" + ], + "favorite_metadata": [ + { + "identifier": "10a69d10-e455-4473-b1c6-de1da8cc1ad5", + "type": null + }, + { + "identifier": "48d27aee-59c3-4a0c-8d2c-5a8989c55bb1", + "type": "ANSWER" + } + ], + "org_identifiers": [ + "0", + "0" + ] + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/users/{user_identifier}/update", + "operationId": "updateUser", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 625 + }, + "Path_Variables": { + "user_identifier": "bparringtond1688027208558" + }, + "Query_Variables": {}, + "Body": { + "name": [ + "Demetre1688027210162" + ], + "visibility": "SHARABLE", + "account_status": "ACTIVE", + "onboarding_experience_completed": false + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/users/{user_identifier}/update", + "operationId": "updateUser", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 626 + }, + "Path_Variables": { + "user_identifier": "dfrancklinb1688027208553" + }, + "Query_Variables": {}, + "Body": { + "visibility": "SHARABLE", + "email": [ + "afetherstoneb@cnn.com" + ], + "account_status": "INACTIVE", + "group_identifiers": [ + "cfa01dd9-9605-422d-b7de-a37afff63647" + ], + "home_liveboard_identifier": "061457a2-27bc-43a9-9754-0cd873691bf0", + "favorite_metadata": [ + { + "identifier": "10a69d10-e455-4473-b1c6-de1da8cc1ad5", + "type": "ANSWER" + }, + { + "identifier": "48d27aee-59c3-4a0c-8d2c-5a8989c55bb1", + "type": null + }, + { + "identifier": "262abdac-b00f-4f5f-ad33-fcf10154184f", + "type": null + } + ], + "org_identifiers": [ + "0", + "0" + ], + "operation": "REPLACE" + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/users/{user_identifier}/update", + "operationId": "updateUser", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 627 + }, + "Path_Variables": { + "user_identifier": "icastrii1688027208568" + }, + "Query_Variables": {}, + "Body": { + "name": [ + "Chanda1688027210179" + ], + "display_name": "Chanda1688027210179 Mozzi", + "visibility": "SHARABLE", + "notify_on_share": true, + "show_onboarding_experience": true, + "onboarding_experience_completed": false, + "account_type": "LDAP_USER", + "group_identifiers": [ + "cfa01dd9-9605-422d-b7de-a37afff63647", + "280a2235-3721-43fc-aa25-5d33549ecc90" + ], + "home_liveboard_identifier": "061457a2-27bc-43a9-9754-0cd873691bf0", + "org_identifiers": [ + "0", + "0", + "0" + ], + "operation": "REMOVE" + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/users/{user_identifier}/update", + "operationId": "updateUser", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 628 + }, + "Path_Variables": { + "user_identifier": null + }, + "Query_Variables": {}, + "Body": { + "name": "Eddie1688027210137", + "display_name": "Eddie1688027210137 Eva", + "visibility": "SHARABLE", + "show_onboarding_experience": false, + "onboarding_experience_completed": true, + "account_type": "SAML_USER", + "group_identifiers": [ + "cfa01dd9-9605-422d-b7de-a37afff63647" + ], + "home_liveboard_identifier": "6715f768-8930-4180-9a3d-1efdbfaa8e7f", + "favorite_metadata": [ + { + "identifier": "10a69d10-e455-4473-b1c6-de1da8cc1ad5", + "type": null + }, + { + "identifier": "48d27aee-59c3-4a0c-8d2c-5a8989c55bb1", + "type": "ANSWER" + } + ], + "org_identifiers": [ + "0", + "0", + "0" + ], + "operation": "REPLACE" + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/users/{user_identifier}/update", + "operationId": "updateUser", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 629 + }, + "Path_Variables": { + "user_identifier": null + }, + "Query_Variables": {}, + "Body": { + "name": "Rickie1688027210176", + "email": "rstartinh@nbcnews.com", + "notify_on_share": false, + "show_onboarding_experience": true + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/users/{user_identifier}/update", + "operationId": "updateUser", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 630 + }, + "Path_Variables": { + "user_identifier": null + }, + "Query_Variables": {}, + "Body": { + "display_name": "Town Pyrke", + "notify_on_share": false, + "onboarding_experience_completed": true, + "account_type": "SAML_USER", + "home_liveboard_identifier": "c836ad16-660d-4d28-a3a0-e07cb9eb6ab1", + "org_identifiers": [ + "0" + ] + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/users/{user_identifier}/update", + "operationId": "updateUser", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 631 + }, + "Path_Variables": { + "user_identifier": "YVETwsrlWlKYeld" + }, + "Query_Variables": {}, + "Body": { + "name": "Harvey1688027210173", + "display_name": "Harvey1688027210173 Covil", + "email": "hcovilg@t-online.de", + "notify_on_share": true, + "group_identifiers": [ + "cfa01dd9-9605-422d-b7de-a37afff63647" + ], + "home_liveboard_identifier": "c836ad16-660d-4d28-a3a0-e07cb9eb6ab1", + "favorite_metadata": [ + { + "identifier": "10a69d10-e455-4473-b1c6-de1da8cc1ad5", + "type": null + }, + { + "identifier": "48d27aee-59c3-4a0c-8d2c-5a8989c55bb1", + "type": "ANSWER" + } + ], + "org_identifiers": [ + "0", + "0" + ] + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/users/{user_identifier}/update", + "operationId": "updateUser", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 632 + }, + "Path_Variables": { + "user_identifier": "XWztPNKPEzDYLII" + }, + "Query_Variables": {}, + "Body": { + "name": "Breanne1688027210134", + "email": "bwigfall5@devhub.com", + "onboarding_experience_completed": true, + "operation": "ADD" + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/users/{user_identifier}/update", + "operationId": "updateUser", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 633 + }, + "Path_Variables": { + "user_identifier": "WQhlWqCDVzBDZPw" + }, + "Query_Variables": {}, + "Body": { + "name": "Demetre1688027210162", + "visibility": "SHARABLE", + "account_status": "ACTIVE", + "onboarding_experience_completed": false + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/users/{user_identifier}/update", + "operationId": "updateUser", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 634 + }, + "Path_Variables": { + "user_identifier": "cDxPdQOnLKEKzAW" + }, + "Query_Variables": {}, + "Body": { + "name": "Breanne1688027210134", + "email": "bwigfall5@devhub.com", + "onboarding_experience_completed": true, + "operation": "ADD" + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/users/{user_identifier}/update", + "operationId": "updateUser", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 635 + }, + "Path_Variables": { + "user_identifier": "UglVJgULnCpzIke" + }, + "Query_Variables": {}, + "Body": { + "display_name": "Oliviero Viles", + "visibility": "NON_SHARABLE", + "email": "ovilesa@studiopress.com", + "notify_on_share": false, + "account_type": "OIDC_USER", + "home_liveboard_identifier": "6715f768-8930-4180-9a3d-1efdbfaa8e7f", + "org_identifiers": [ + "0", + "0" + ], + "operation": "REPLACE" + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/users/{user_identifier}/update", + "operationId": "updateUser", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 636 + }, + "Path_Variables": { + "user_identifier": "pCUhMOAhrDPKsBa" + }, + "Query_Variables": {}, + "Body": { + "name": "Dex1688027210165", + "display_name": "Dex1688027210165 Becaris", + "account_status": "INACTIVE", + "notify_on_share": false, + "group_identifiers": [ + "cfa01dd9-9605-422d-b7de-a37afff63647" + ], + "home_liveboard_identifier": "6715f768-8930-4180-9a3d-1efdbfaa8e7f", + "favorite_metadata": [ + { + "identifier": "10a69d10-e455-4473-b1c6-de1da8cc1ad5", + "type": "ANSWER" + }, + { + "identifier": "48d27aee-59c3-4a0c-8d2c-5a8989c55bb1", + "type": null + }, + { + "identifier": "262abdac-b00f-4f5f-ad33-fcf10154184f", + "type": null + } + ], + "operation": "REPLACE" + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/users/{user_identifier}/update", + "operationId": "updateUser", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 637 + }, + "Path_Variables": { + "user_identifier": "zoZDnrhThWOfmqE" + }, + "Query_Variables": {}, + "Body": { + "name": "Chanda1688027210179", + "display_name": "Chanda1688027210179 Mozzi", + "visibility": "SHARABLE", + "notify_on_share": true, + "show_onboarding_experience": true, + "onboarding_experience_completed": false, + "account_type": "LDAP_USER", + "group_identifiers": [ + "cfa01dd9-9605-422d-b7de-a37afff63647", + "280a2235-3721-43fc-aa25-5d33549ecc90" + ], + "home_liveboard_identifier": "061457a2-27bc-43a9-9754-0cd873691bf0", + "org_identifiers": [ + "0", + "0", + "0" + ], + "operation": "REMOVE" + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/users/{user_identifier}/update", + "operationId": "updateUser", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 638 + }, + "Path_Variables": { + "user_identifier": "phuWIbxmDHddDoZ" + }, + "Query_Variables": {}, + "Body": { + "visibility": "SHARABLE", + "email": "afetherstoneb@cnn.com", + "account_status": "INACTIVE", + "group_identifiers": [ + "cfa01dd9-9605-422d-b7de-a37afff63647" + ], + "home_liveboard_identifier": "061457a2-27bc-43a9-9754-0cd873691bf0", + "favorite_metadata": [ + { + "identifier": "10a69d10-e455-4473-b1c6-de1da8cc1ad5", + "type": "ANSWER" + }, + { + "identifier": "48d27aee-59c3-4a0c-8d2c-5a8989c55bb1", + "type": null + }, + { + "identifier": "262abdac-b00f-4f5f-ad33-fcf10154184f", + "type": null + } + ], + "org_identifiers": [ + "0", + "0" + ], + "operation": "REPLACE" + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/users/{user_identifier}/update", + "operationId": "updateUser", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 639 + }, + "Path_Variables": { + "user_identifier": "eMyaeoLcxlwuHbT" + }, + "Query_Variables": {}, + "Body": { + "name": "Demetre1688027210162", + "visibility": "SHARABLE", + "account_status": "ACTIVE", + "onboarding_experience_completed": false + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/users/{user_identifier}/update", + "operationId": "updateUser", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 640 + }, + "Path_Variables": { + "user_identifier": "RYznyIkarnvxLFp" + }, + "Query_Variables": {}, + "Body": { + "name": "Demetre1688027210162", + "visibility": "SHARABLE", + "account_status": "ACTIVE", + "onboarding_experience_completed": false + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/users/{user_identifier}/update", + "operationId": "updateUser", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 641 + }, + "Path_Variables": { + "user_identifier": "lbXcSuXhcNgUsOC" + }, + "Query_Variables": {}, + "Body": { + "name": "Rickie1688027210176", + "email": "rstartinh@nbcnews.com", + "notify_on_share": false, + "show_onboarding_experience": true + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/users/{user_identifier}/update", + "operationId": "updateUser", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 642 + }, + "Path_Variables": { + "user_identifier": "YoyngYRMzYLTPhU" + }, + "Query_Variables": {}, + "Body": { + "name": "Consalve1688027210072", + "display_name": "Consalve1688027210072 Gisborne", + "favorite_metadata": [ + { + "identifier": "10a69d10-e455-4473-b1c6-de1da8cc1ad5", + "type": "ANSWER" + } + ], + "org_identifiers": [ + "0", + "0" + ] + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/users/{user_identifier}/update", + "operationId": "updateUser", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 643 + }, + "Path_Variables": { + "user_identifier": "fRyMPnQLBJZXGMK" + }, + "Query_Variables": {}, + "Body": { + "name": "Alayne1688027210121", + "display_name": "Alayne1688027210121 Paddell", + "email": "apaddell1@gizmodo.com", + "show_onboarding_experience": true, + "account_type": "LDAP_USER", + "group_identifiers": [ + "cfa01dd9-9605-422d-b7de-a37afff63647" + ], + "home_liveboard_identifier": "33248a57-cc70-4e39-9199-fb5092283381", + "favorite_metadata": [ + { + "identifier": "10a69d10-e455-4473-b1c6-de1da8cc1ad5", + "type": "ANSWER" + } + ], + "operation": "REPLACE" + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/users/{user_identifier}/update", + "operationId": "updateUser", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 644 + }, + "Path_Variables": { + "user_identifier": "wUKVNPBFbWQBTzc" + }, + "Query_Variables": {}, + "Body": { + "name": "Harvey1688027210173", + "display_name": "Harvey1688027210173 Covil", + "email": "hcovilg@t-online.de", + "notify_on_share": true, + "group_identifiers": [ + "cfa01dd9-9605-422d-b7de-a37afff63647" + ], + "home_liveboard_identifier": "c836ad16-660d-4d28-a3a0-e07cb9eb6ab1", + "favorite_metadata": [ + { + "identifier": "10a69d10-e455-4473-b1c6-de1da8cc1ad5", + "type": null + }, + { + "identifier": "48d27aee-59c3-4a0c-8d2c-5a8989c55bb1", + "type": "ANSWER" + } + ], + "org_identifiers": [ + "0", + "0" + ] + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/users/{user_identifier}/update", + "operationId": "updateUser", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 645 + }, + "Path_Variables": { + "user_identifier": "wPdaWKRUaBxEnVn" + }, + "Query_Variables": {}, + "Body": { + "name": "Chanda1688027210179", + "display_name": "Chanda1688027210179 Mozzi", + "visibility": "SHARABLE", + "notify_on_share": true, + "show_onboarding_experience": true, + "onboarding_experience_completed": false, + "account_type": "LDAP_USER", + "group_identifiers": [ + "cfa01dd9-9605-422d-b7de-a37afff63647", + "280a2235-3721-43fc-aa25-5d33549ecc90" + ], + "home_liveboard_identifier": "061457a2-27bc-43a9-9754-0cd873691bf0", + "org_identifiers": [ + "0", + "0", + "0" + ], + "operation": "REMOVE" + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/users/change-password", + "operationId": "changeUserPassword", + "scenario": "positive", + "type": "AUTOMATIC", + "testId": 646 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "user_identifier": "Consalve1688027210072", + "current_password": "bQ8\\\"'Dr\"", + "new_password": "iK8}zYn~." + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/users/change-password", + "operationId": "changeUserPassword", + "scenario": "positive", + "type": "AUTOMATIC", + "testId": 647 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "user_identifier": "Alayne1688027210121", + "current_password": "pJ5}7>dMEh(N", + "new_password": "iZ4+H5fz|/" + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/users/change-password", + "operationId": "changeUserPassword", + "scenario": "positive", + "type": "AUTOMATIC", + "testId": 648 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "user_identifier": "cbower21688027208531", + "current_password": "rC8>Aed*&ZJ1c", + "new_password": "qS4)NyN`" + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/users/change-password", + "operationId": "changeUserPassword", + "scenario": "positive", + "type": "AUTOMATIC", + "testId": 649 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "user_identifier": "tleverage31688027208533", + "current_password": "jJ4|nZ41!UBEeci", + "new_password": "eD7\"RGWr~c`@" + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/users/change-password", + "operationId": "changeUserPassword", + "scenario": "positive", + "type": "AUTOMATIC", + "testId": 650 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "user_identifier": "enel41688027208536", + "current_password": "iI8~Z3MTr", + "new_password": "kZ6|Cjv+\"'=Y{S}" + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/users/change-password", + "operationId": "changeUserPassword", + "scenario": "positive", + "type": "AUTOMATIC", + "testId": 651 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "user_identifier": "Breanne1688027210134", + "current_password": "jV5|38TUv,$q", + "new_password": "tN1,.h|{mp*DSB\"@" + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/users/change-password", + "operationId": "changeUserPassword", + "scenario": "positive", + "type": "AUTOMATIC", + "testId": 652 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "user_identifier": "Eddie1688027210137", + "current_password": "nZ8&5~_`\\Q|{Zb'", + "new_password": "aF1$$ycE@GQK?/g" + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/users/change-password", + "operationId": "changeUserPassword", + "scenario": "positive", + "type": "AUTOMATIC", + "testId": 653 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "user_identifier": "wbignal71688027208543", + "current_password": "jU5~Ek#2", + "new_password": "jI8\\99`=qadgf" + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/users/change-password", + "operationId": "changeUserPassword", + "scenario": "positive", + "type": "AUTOMATIC", + "testId": 654 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "user_identifier": "Pren1688027210145", + "current_password": "qD6*$MC#(f21$", + "new_password": "rH0(P8f{'n,Px/rV" + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/users/change-password", + "operationId": "changeUserPassword", + "scenario": "positive", + "type": "AUTOMATIC", + "testId": 655 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "user_identifier": "ltunesi91688027208548", + "current_password": "tP9/um}D3+wCo36*", + "new_password": "fE8$B5Z`|F" + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/users/change-password", + "operationId": "changeUserPassword", + "scenario": "positive", + "type": "AUTOMATIC", + "testId": 656 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "user_identifier": "owaliszewskia1688027208550", + "current_password": "lB7`?o'8OXA\"#1B", + "new_password": "uR1/ju<044$$b" + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/users/change-password", + "operationId": "changeUserPassword", + "scenario": "positive", + "type": "AUTOMATIC", + "testId": 657 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "user_identifier": "dfrancklinb1688027208553", + "current_password": "kB4<18wi'&CDB*(T", + "new_password": "cU3.9y8Xd9wQ" + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/users/change-password", + "operationId": "changeUserPassword", + "scenario": "positive", + "type": "AUTOMATIC", + "testId": 658 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "user_identifier": "Rahel1688027210159", + "current_password": "aE7,3'8j}HLtP*jG", + "new_password": "qW1\"K=N7B!+dfY6" + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/users/change-password", + "operationId": "changeUserPassword", + "scenario": "positive", + "type": "AUTOMATIC", + "testId": 659 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "user_identifier": "Demetre1688027210162", + "current_password": "jX3|`%Jw", + "new_password": "kK1<3ZY/" + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/users/change-password", + "operationId": "changeUserPassword", + "scenario": "positive", + "type": "AUTOMATIC", + "testId": 660 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "user_identifier": "Dex1688027210165", + "current_password": "aC6=lYmFc|kkBZ", + "new_password": "jH2%UanNv7" + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/users/change-password", + "operationId": "changeUserPassword", + "scenario": "positive", + "type": "AUTOMATIC", + "testId": 661 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "user_identifier": "jocurriganf1688027208562", + "current_password": "iD7$q|9RW)JxIx", + "new_password": "iE6(8l1YW>,SX'a" + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/users/change-password", + "operationId": "changeUserPassword", + "scenario": "positive", + "type": "AUTOMATIC", + "testId": 662 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "user_identifier": "Harvey1688027210173", + "current_password": "vX0*3ITBa,?+x", + "new_password": "gZ8#blcmBZ\"" + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/users/change-password", + "operationId": "changeUserPassword", + "scenario": "positive", + "type": "AUTOMATIC", + "testId": 663 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "user_identifier": "Rickie1688027210176", + "current_password": "yP9>yKAV_", + "new_password": "iL4{9\\yk$#BK" + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/users/change-password", + "operationId": "changeUserPassword", + "scenario": "positive", + "type": "AUTOMATIC", + "testId": 664 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "user_identifier": "Chanda1688027210179", + "current_password": "qU0,_Bae|iF$PVo3", + "new_password": "sB8}UvG4,nMru." + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/users/change-password", + "operationId": "changeUserPassword", + "scenario": "positive", + "type": "AUTOMATIC", + "testId": 665 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "user_identifier": "Ive1688027210182", + "current_password": "sV4/GYX$Ip?%", + "new_password": "xL3}g.e0" + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/users/change-password", + "operationId": "changeUserPassword", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 666 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "user_identifier": "owaliszewskia1688027208550", + "current_password": null, + "new_password": "uR1/ju<044$$b" + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/users/change-password", + "operationId": "changeUserPassword", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 667 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "user_identifier": "enel41688027208536", + "current_password": "iI8~Z3MTr", + "new_password": null + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/users/change-password", + "operationId": "changeUserPassword", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 668 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "user_identifier": null, + "current_password": "aE7,3'8j}HLtP*jG", + "new_password": "qW1\"K=N7B!+dfY6" + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/users/change-password", + "operationId": "changeUserPassword", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 669 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "user_identifier": "Chanda1688027210179", + "current_password": null, + "new_password": "sB8}UvG4,nMru." + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/users/change-password", + "operationId": "changeUserPassword", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 670 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "user_identifier": "Harvey1688027210173", + "current_password": "vX0*3ITBa,?+x", + "new_password": null + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/users/change-password", + "operationId": "changeUserPassword", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 671 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "user_identifier": "Breanne1688027210134", + "current_password": "jV5|38TUv,$q", + "new_password": null + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/users/change-password", + "operationId": "changeUserPassword", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 672 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "user_identifier": "owaliszewskia1688027208550", + "current_password": "lB7`?o'8OXA\"#1B", + "new_password": null + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/users/change-password", + "operationId": "changeUserPassword", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 673 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "user_identifier": null, + "current_password": "jJ4|nZ41!UBEeci", + "new_password": "eD7\"RGWr~c`@" + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/users/change-password", + "operationId": "changeUserPassword", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 674 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "user_identifier": "Ive1688027210182", + "current_password": null, + "new_password": "xL3}g.e0" + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/users/change-password", + "operationId": "changeUserPassword", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 675 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "user_identifier": null, + "current_password": "qU0,_Bae|iF$PVo3", + "new_password": "sB8}UvG4,nMru." + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/users/change-password", + "operationId": "changeUserPassword", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 676 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "user_identifier": "enel41688027208536", + "current_password": null, + "new_password": "kZ6|Cjv+\"'=Y{S}" + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/users/change-password", + "operationId": "changeUserPassword", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 677 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "user_identifier": "enel41688027208536", + "current_password": "iI8~Z3MTr", + "new_password": null + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/users/change-password", + "operationId": "changeUserPassword", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 678 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "user_identifier": "Eddie1688027210137", + "current_password": null, + "new_password": "aF1$$ycE@GQK?/g" + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/users/change-password", + "operationId": "changeUserPassword", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 679 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "user_identifier": null, + "current_password": "qD6*$MC#(f21$", + "new_password": "rH0(P8f{'n,Px/rV" + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/users/change-password", + "operationId": "changeUserPassword", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 680 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "user_identifier": null, + "current_password": "nZ8&5~_`\\Q|{Zb'", + "new_password": "aF1$$ycE@GQK?/g" + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/users/change-password", + "operationId": "changeUserPassword", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 681 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "user_identifier": [ + "Rahel1688027210159" + ], + "current_password": "aE7,3'8j}HLtP*jG", + "new_password": "qW1\"K=N7B!+dfY6" + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/users/change-password", + "operationId": "changeUserPassword", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 682 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "user_identifier": "Breanne1688027210134", + "current_password": [ + "jV5|38TUv,$q" + ], + "new_password": "tN1,.h|{mp*DSB\"@" + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/users/change-password", + "operationId": "changeUserPassword", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 683 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "user_identifier": "tleverage31688027208533", + "current_password": "jJ4|nZ41!UBEeci", + "new_password": [ + "eD7\"RGWr~c`@" + ] + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/users/change-password", + "operationId": "changeUserPassword", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 684 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "user_identifier": [ + "owaliszewskia1688027208550" + ], + "current_password": "lB7`?o'8OXA\"#1B", + "new_password": "uR1/ju<044$$b" + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/users/change-password", + "operationId": "changeUserPassword", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 685 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "user_identifier": [ + "Ive1688027210182" + ], + "current_password": "sV4/GYX$Ip?%", + "new_password": "xL3}g.e0" + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/users/change-password", + "operationId": "changeUserPassword", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 686 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "user_identifier": "cbower21688027208531", + "current_password": "rC8>Aed*&ZJ1c", + "new_password": [ + "qS4)NyN`" + ] + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/users/change-password", + "operationId": "changeUserPassword", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 687 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "user_identifier": [ + "Ive1688027210182" + ], + "current_password": "sV4/GYX$Ip?%", + "new_password": "xL3}g.e0" + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/users/change-password", + "operationId": "changeUserPassword", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 688 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "user_identifier": "Alayne1688027210121", + "current_password": [ + "pJ5}7>dMEh(N" + ], + "new_password": "iZ4+H5fz|/" + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/users/change-password", + "operationId": "changeUserPassword", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 689 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "user_identifier": "Dex1688027210165", + "current_password": [ + "aC6=lYmFc|kkBZ" + ], + "new_password": "jH2%UanNv7" + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/users/change-password", + "operationId": "changeUserPassword", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 690 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "user_identifier": "Rahel1688027210159", + "current_password": "aE7,3'8j}HLtP*jG", + "new_password": [ + "qW1\"K=N7B!+dfY6" + ] + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/users/change-password", + "operationId": "changeUserPassword", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 691 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "user_identifier": "Alayne1688027210121", + "current_password": "pJ5}7>dMEh(N", + "new_password": [ + "iZ4+H5fz|/" + ] + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/users/change-password", + "operationId": "changeUserPassword", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 692 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "user_identifier": "Demetre1688027210162", + "current_password": "jX3|`%Jw", + "new_password": [ + "kK1<3ZY/" + ] + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/users/change-password", + "operationId": "changeUserPassword", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 693 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "user_identifier": "Ive1688027210182", + "current_password": [ + "sV4/GYX$Ip?%" + ], + "new_password": "xL3}g.e0" + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/users/change-password", + "operationId": "changeUserPassword", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 694 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "user_identifier": "owaliszewskia1688027208550", + "current_password": [ + "lB7`?o'8OXA\"#1B" + ], + "new_password": "uR1/ju<044$$b" + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/users/change-password", + "operationId": "changeUserPassword", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 695 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "user_identifier": "owaliszewskia1688027208550", + "current_password": [ + "lB7`?o'8OXA\"#1B" + ], + "new_password": "uR1/ju<044$$b" + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/users/change-password", + "operationId": "changeUserPassword", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 696 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "user_identifier": "PIMySNQVjjZhqDc", + "current_password": "iD7$q|9RW)JxIx", + "new_password": "iE6(8l1YW>,SX'a" + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/users/change-password", + "operationId": "changeUserPassword", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 697 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "user_identifier": "npGhdXasbDsaNhc", + "current_password": "iI8~Z3MTr", + "new_password": "kZ6|Cjv+\"'=Y{S}" + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/users/change-password", + "operationId": "changeUserPassword", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 698 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "user_identifier": "wMhQwiGKhgMolCV", + "current_password": "bQ8\\\"'Dr\"", + "new_password": "iK8}zYn~." + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/users/change-password", + "operationId": "changeUserPassword", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 699 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "user_identifier": "FNmsWuyoqXybsur", + "current_password": "rC8>Aed*&ZJ1c", + "new_password": "qS4)NyN`" + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/users/change-password", + "operationId": "changeUserPassword", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 700 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "user_identifier": "FCAtCoBLOmwIrjc", + "current_password": "nZ8&5~_`\\Q|{Zb'", + "new_password": "aF1$$ycE@GQK?/g" + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/users/change-password", + "operationId": "changeUserPassword", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 701 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "user_identifier": "WntcJAhFnocdLEN", + "current_password": "aE7,3'8j}HLtP*jG", + "new_password": "qW1\"K=N7B!+dfY6" + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/users/change-password", + "operationId": "changeUserPassword", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 702 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "user_identifier": "gPauuuJIODdqEah", + "current_password": "lB7`?o'8OXA\"#1B", + "new_password": "uR1/ju<044$$b" + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/users/change-password", + "operationId": "changeUserPassword", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 703 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "user_identifier": "SxBEkCtbxtvnurH", + "current_password": "qU0,_Bae|iF$PVo3", + "new_password": "sB8}UvG4,nMru." + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/users/change-password", + "operationId": "changeUserPassword", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 704 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "user_identifier": "QXFOTeHOIkivJaU", + "current_password": "bQ8\\\"'Dr\"", + "new_password": "iK8}zYn~." + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/users/change-password", + "operationId": "changeUserPassword", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 705 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "user_identifier": "hzaSAfSWDEDTdxF", + "current_password": "vX0*3ITBa,?+x", + "new_password": "gZ8#blcmBZ\"" + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/users/change-password", + "operationId": "changeUserPassword", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 706 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "user_identifier": "VmGbBBVJJepjyaD", + "current_password": "sV4/GYX$Ip?%", + "new_password": "xL3}g.e0" + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/users/change-password", + "operationId": "changeUserPassword", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 707 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "user_identifier": "rudMCceJaoGtmrZ", + "current_password": "vX0*3ITBa,?+x", + "new_password": "gZ8#blcmBZ\"" + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/users/change-password", + "operationId": "changeUserPassword", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 708 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "user_identifier": "mLuduYbhRYgTtyb", + "current_password": "lB7`?o'8OXA\"#1B", + "new_password": "uR1/ju<044$$b" + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/users/change-password", + "operationId": "changeUserPassword", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 709 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "user_identifier": "rigJzliTNpXhdNV", + "current_password": "jX3|`%Jw", + "new_password": "kK1<3ZY/" + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/users/change-password", + "operationId": "changeUserPassword", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 710 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "user_identifier": "dqQDBpFHbaifmMg", + "current_password": "pJ5}7>dMEh(N", + "new_password": "iZ4+H5fz|/" + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/users/reset-password", + "operationId": "resetUserPassword", + "scenario": "positive", + "type": "AUTOMATIC", + "testId": 711 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "new_password": "jP8!_LRk", + "user_identifier": "Consalve1688027210072" + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/users/reset-password", + "operationId": "resetUserPassword", + "scenario": "positive", + "type": "AUTOMATIC", + "testId": 712 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "new_password": "eJ6<=)'QiZpy", + "user_identifier": "Alayne1688027210121" + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/users/reset-password", + "operationId": "resetUserPassword", + "scenario": "positive", + "type": "AUTOMATIC", + "testId": 713 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "new_password": "lG8#F,", + "user_identifier": "Chanda1688027210179" + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/users/reset-password", + "operationId": "resetUserPassword", + "scenario": "positive", + "type": "AUTOMATIC", + "testId": 730 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "new_password": "oV1$1s)qY1.n", + "user_identifier": "Ive1688027210182" + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/users/reset-password", + "operationId": "resetUserPassword", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 731 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "new_password": null, + "user_identifier": "Pren1688027210145" + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/users/reset-password", + "operationId": "resetUserPassword", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 732 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "new_password": null, + "user_identifier": "Dex1688027210165" + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/users/reset-password", + "operationId": "resetUserPassword", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 733 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "new_password": null, + "user_identifier": "Dex1688027210165" + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/users/reset-password", + "operationId": "resetUserPassword", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 734 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "new_password": "jP8!_LRk", + "user_identifier": null + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/users/reset-password", + "operationId": "resetUserPassword", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 735 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "new_password": null, + "user_identifier": "Pren1688027210145" + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/users/reset-password", + "operationId": "resetUserPassword", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 736 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "new_password": null, + "user_identifier": "Rahel1688027210159" + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/users/reset-password", + "operationId": "resetUserPassword", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 737 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "new_password": null, + "user_identifier": "Pren1688027210145" + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/users/reset-password", + "operationId": "resetUserPassword", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 738 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "new_password": null, + "user_identifier": "cbower21688027208531" + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/users/reset-password", + "operationId": "resetUserPassword", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 739 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "new_password": "lY0**Tj5", + "user_identifier": null + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/users/reset-password", + "operationId": "resetUserPassword", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 740 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "new_password": null, + "user_identifier": "jocurriganf1688027208562" + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/users/reset-password", + "operationId": "resetUserPassword", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 741 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "new_password": "lY0**Tj5", + "user_identifier": null + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/users/reset-password", + "operationId": "resetUserPassword", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 742 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "new_password": "lY0**Tj5", + "user_identifier": null + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/users/reset-password", + "operationId": "resetUserPassword", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 743 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "new_password": null, + "user_identifier": "Breanne1688027210134" + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/users/reset-password", + "operationId": "resetUserPassword", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 744 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "new_password": null, + "user_identifier": "Rahel1688027210159" + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/users/reset-password", + "operationId": "resetUserPassword", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 745 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "new_password": "qC4~MDe3Qxg'", + "user_identifier": null + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/users/reset-password", + "operationId": "resetUserPassword", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 746 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "new_password": [ + "qC4~MDe3Qxg'" + ], + "user_identifier": "Eddie1688027210137" + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/users/reset-password", + "operationId": "resetUserPassword", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 747 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "new_password": "oV1$1s)qY1.n", + "user_identifier": [ + "Ive1688027210182" + ] + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/users/reset-password", + "operationId": "resetUserPassword", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 748 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "new_password": [ + "yM6*9#D_G\\C.m<" + ], + "user_identifier": "owaliszewskia1688027208550" + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/users/reset-password", + "operationId": "resetUserPassword", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 749 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "new_password": [ + "cB0.|\\fx\"L!<" + ], + "user_identifier": "Pren1688027210145" + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/users/reset-password", + "operationId": "resetUserPassword", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 750 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "new_password": [ + "jP8!_LRk" + ], + "user_identifier": "Consalve1688027210072" + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/users/reset-password", + "operationId": "resetUserPassword", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 751 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "new_password": [ + "yM6*9#D_G\\C.m<" + ], + "user_identifier": "owaliszewskia1688027208550" + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/users/reset-password", + "operationId": "resetUserPassword", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 752 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "new_password": "nT9/.=mXhd7qt", + "user_identifier": [ + "enel41688027208536" + ] + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/users/reset-password", + "operationId": "resetUserPassword", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 753 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "new_password": "zQ6_q{IDF,", + "user_identifier": "nWnrVOwwJuHpMET" + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/users/reset-password", + "operationId": "resetUserPassword", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 770 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "new_password": "lN7,bn2hidIcU,", + "user_identifier": "MjypfywaxPGGZpC" + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/users/reset-password", + "operationId": "resetUserPassword", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 771 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "new_password": "yM6*9#D_G\\C.m<", + "user_identifier": "imXJYMJHmvEDGxc" + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/users/reset-password", + "operationId": "resetUserPassword", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 772 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "new_password": "mJ4?cTsZ\"n", + "user_identifier": "DoMcSFcQBQUwUcJ" + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/users/reset-password", + "operationId": "resetUserPassword", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 773 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "new_password": "qC4~MDe3Qxg'", + "user_identifier": "qUwUEAJhesbzQgJ" + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/users/reset-password", + "operationId": "resetUserPassword", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 774 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "new_password": "jP8!_LRk", + "user_identifier": "egTMvplDwiUPQAc" + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/users/reset-password", + "operationId": "resetUserPassword", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 775 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "new_password": "jP8!_LRk", + "user_identifier": "ZHQAYFVhzFdwIuH" + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/users/search", + "operationId": "searchUsers", + "scenario": "positive", + "type": "AUTOMATIC", + "testId": 776 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "user_identifier": "Consalve1688027210072", + "visibility": "SHARABLE", + "email": "ppavlovic0@acquirethisname.com", + "group_identifiers": [ + "cfa01dd9-9605-422d-b7de-a37afff63647", + "280a2235-3721-43fc-aa25-5d33549ecc90", + "f827545e-a592-4280-8ceb-318bd673d04c" + ], + "privileges": [ + "PREVIEW_THOUGHTSPOT_SAGE", + "JOBSCHEDULING", + "USERDATAUPLOADING" + ], + "account_type": "OIDC_USER", + "favorite_metadata": [ + { + "identifier": "10a69d10-e455-4473-b1c6-de1da8cc1ad5", + "type": null + }, + { + "identifier": "48d27aee-59c3-4a0c-8d2c-5a8989c55bb1", + "type": null + }, + { + "identifier": "262abdac-b00f-4f5f-ad33-fcf10154184f", + "type": null + } + ], + "record_offset": 9, + "record_size": 6, + "sort_options": { + "field_name": "MODIFIED" + }, + "role_identifiers": [ + "e164d067-1e37-4199-8404-787b08d42dc5", + "94f1caf1-ebf7-4bf4-801d-89519b5d17c4" + ] + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/users/search", + "operationId": "searchUsers", + "scenario": "positive", + "type": "AUTOMATIC", + "testId": 777 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "display_name": "Alayne1688027210121 Paddell", + "email": "sallnutt1@hud.gov", + "group_identifiers": [ + "cfa01dd9-9605-422d-b7de-a37afff63647", + "280a2235-3721-43fc-aa25-5d33549ecc90", + "f827545e-a592-4280-8ceb-318bd673d04c" + ], + "privileges": [ + "A3ANALYSIS" + ], + "account_status": "PENDING", + "notify_on_share": false, + "onboarding_experience_completed": false, + "org_identifiers": [ + "0", + "0" + ], + "record_offset": 2, + "record_size": 9, + "sort_options": { + "field_name": "NAME" + }, + "include_favorite_metadata": true + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/users/search", + "operationId": "searchUsers", + "scenario": "positive", + "type": "AUTOMATIC", + "testId": 778 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "user_identifier": "cbower21688027208531", + "email": "tspaingower2@cmu.edu", + "group_identifiers": [ + "cfa01dd9-9605-422d-b7de-a37afff63647" + ], + "privileges": [ + "USER_ADMINISTRATION" + ], + "show_onboarding_experience": true, + "onboarding_experience_completed": false, + "org_identifiers": [ + "0", + "0", + "0" + ], + "home_liveboard_identifier": "33248a57-cc70-4e39-9199-fb5092283381", + "record_offset": 2, + "record_size": 6 + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/users/search", + "operationId": "searchUsers", + "scenario": "positive", + "type": "AUTOMATIC", + "testId": 779 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "user_identifier": "tleverage31688027208533", + "visibility": "SHARABLE", + "email": "ewastell3@apache.org", + "group_identifiers": [ + "cfa01dd9-9605-422d-b7de-a37afff63647", + "280a2235-3721-43fc-aa25-5d33549ecc90" + ], + "account_status": "LOCKED", + "onboarding_experience_completed": false, + "home_liveboard_identifier": "e36ee65e-64be-436b-a29a-22d8998c4fae", + "favorite_metadata": [ + { + "identifier": "10a69d10-e455-4473-b1c6-de1da8cc1ad5", + "type": null + } + ], + "record_offset": 9, + "record_size": 3 + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/users/search", + "operationId": "searchUsers", + "scenario": "positive", + "type": "AUTOMATIC", + "testId": 780 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "user_identifier": "enel41688027208536", + "privileges": [ + "BYPASSRLS", + "CAN_CREATE_CATALOG", + "USERDATAUPLOADING" + ], + "account_type": "LOCAL_USER", + "notify_on_share": true, + "org_identifiers": [ + "0" + ], + "record_offset": 2, + "record_size": 8, + "sort_options": { + "field_name": "MODIFIED" + }, + "role_identifiers": [ + "b0abd5c7-6da6-4006-aec8-0a26c1f8db9d" + ], + "include_favorite_metadata": false + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/users/search", + "operationId": "searchUsers", + "scenario": "positive", + "type": "AUTOMATIC", + "testId": 781 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "user_identifier": "Breanne1688027210134", + "display_name": "Bibbye", + "email": "rbalden5@scientificamerican.com", + "group_identifiers": [ + "cfa01dd9-9605-422d-b7de-a37afff63647", + "280a2235-3721-43fc-aa25-5d33549ecc90" + ], + "notify_on_share": false, + "onboarding_experience_completed": false, + "org_identifiers": [ + "0", + "0", + "0" + ], + "favorite_metadata": [ + { + "identifier": "10a69d10-e455-4473-b1c6-de1da8cc1ad5", + "type": "ANSWER" + }, + { + "identifier": "48d27aee-59c3-4a0c-8d2c-5a8989c55bb1", + "type": "ANSWER" + }, + { + "identifier": "262abdac-b00f-4f5f-ad33-fcf10154184f", + "type": "LIVEBOARD" + } + ], + "record_offset": 9, + "record_size": 7, + "sort_options": { + "field_name": "NAME", + "order": "DESC" + }, + "role_identifiers": [ + "1bcf8761-4b58-4378-95c2-60fbff14b0c3", + "f219d327-52c5-4d80-aaaa-15272dfb88bf" + ], + "include_favorite_metadata": false + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/users/search", + "operationId": "searchUsers", + "scenario": "positive", + "type": "AUTOMATIC", + "testId": 782 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "user_identifier": "Eddie1688027210137", + "visibility": "NON_SHARABLE", + "email": "sbelderfield6@dedecms.com", + "onboarding_experience_completed": true, + "org_identifiers": [ + "0", + "0", + "0" + ], + "favorite_metadata": [ + { + "identifier": "10a69d10-e455-4473-b1c6-de1da8cc1ad5", + "type": null + }, + { + "identifier": "48d27aee-59c3-4a0c-8d2c-5a8989c55bb1", + "type": "ANSWER" + } + ], + "record_offset": 2, + "record_size": 9, + "role_identifiers": [ + "5ded814b-347b-4d4e-b652-65769036ab8c" + ], + "include_favorite_metadata": true + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/users/search", + "operationId": "searchUsers", + "scenario": "positive", + "type": "AUTOMATIC", + "testId": 783 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "display_name": "Barb Lanfranchi", + "group_identifiers": [ + "cfa01dd9-9605-422d-b7de-a37afff63647" + ], + "privileges": [ + "DATAMANAGEMENT", + "DISABLE_PINBOARD_CREATION" + ], + "account_type": "OIDC_USER", + "account_status": "PENDING", + "notify_on_share": true, + "show_onboarding_experience": false, + "org_identifiers": [ + "0", + "0", + "0" + ], + "home_liveboard_identifier": "2ff57a24-cf90-485f-8b4b-45fc17474c6f", + "favorite_metadata": [ + { + "identifier": "10a69d10-e455-4473-b1c6-de1da8cc1ad5", + "type": "ANSWER" + } + ], + "record_offset": 6, + "record_size": 5, + "sort_options": { + "order": "ASC" + }, + "role_identifiers": [ + "c4b6b807-9533-4d18-b95f-b5e7bfd92555", + "609c1780-77f5-4c65-83f3-e5d18b4ace64" + ] + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/users/search", + "operationId": "searchUsers", + "scenario": "positive", + "type": "AUTOMATIC", + "testId": 784 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "email": "pcaps8@europa.eu", + "privileges": [ + "JOBSCHEDULING", + "BYPASSRLS", + "USER_ADMINISTRATION" + ], + "account_status": "PENDING", + "org_identifiers": [ + "0", + "0", + "0" + ], + "record_offset": 1, + "record_size": 2, + "sort_options": { + "order": "ASC" + }, + "include_favorite_metadata": true + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/users/search", + "operationId": "searchUsers", + "scenario": "positive", + "type": "AUTOMATIC", + "testId": 785 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "display_name": "Loren", + "group_identifiers": [ + "cfa01dd9-9605-422d-b7de-a37afff63647", + "280a2235-3721-43fc-aa25-5d33549ecc90" + ], + "privileges": [ + "ADMINISTRATION", + "ENABLESPOTAPPCREATION" + ], + "account_type": "LDAP_USER", + "account_status": "INACTIVE", + "notify_on_share": false, + "show_onboarding_experience": true, + "org_identifiers": [ + "0", + "0" + ], + "home_liveboard_identifier": "33248a57-cc70-4e39-9199-fb5092283381", + "favorite_metadata": [ + { + "identifier": "10a69d10-e455-4473-b1c6-de1da8cc1ad5", + "type": "ANSWER" + }, + { + "identifier": "48d27aee-59c3-4a0c-8d2c-5a8989c55bb1", + "type": null + }, + { + "identifier": "262abdac-b00f-4f5f-ad33-fcf10154184f", + "type": null + } + ], + "record_offset": 3, + "record_size": 2, + "sort_options": { + "order": "DESC" + }, + "include_favorite_metadata": false + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/users/search", + "operationId": "searchUsers", + "scenario": "positive", + "type": "AUTOMATIC", + "testId": 786 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "display_name": "Oliviero Viles", + "visibility": "NON_SHARABLE", + "privileges": [ + "AUTHORING", + "GROUP_ADMINISTRATION", + "DATAMANAGEMENT" + ], + "show_onboarding_experience": true, + "home_liveboard_identifier": "2ff57a24-cf90-485f-8b4b-45fc17474c6f", + "favorite_metadata": [ + { + "identifier": "10a69d10-e455-4473-b1c6-de1da8cc1ad5", + "type": null + }, + { + "identifier": "48d27aee-59c3-4a0c-8d2c-5a8989c55bb1", + "type": null + }, + { + "identifier": "262abdac-b00f-4f5f-ad33-fcf10154184f", + "type": null + } + ], + "record_offset": 4, + "record_size": 4, + "sort_options": { + "field_name": "NAME" + }, + "include_favorite_metadata": true + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/users/search", + "operationId": "searchUsers", + "scenario": "positive", + "type": "AUTOMATIC", + "testId": 787 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "display_name": "Duncan", + "group_identifiers": [ + "cfa01dd9-9605-422d-b7de-a37afff63647", + "280a2235-3721-43fc-aa25-5d33549ecc90" + ], + "privileges": [ + "A3ANALYSIS" + ], + "account_type": "SAML_USER", + "notify_on_share": false, + "home_liveboard_identifier": "327f4d60-c502-43b0-b1d4-c73df5031a2e", + "favorite_metadata": [ + { + "identifier": "10a69d10-e455-4473-b1c6-de1da8cc1ad5", + "type": "ANSWER" + } + ], + "record_offset": 2, + "record_size": 8, + "sort_options": { + "field_name": "DISPLAY_NAME", + "order": "DESC" + }, + "role_identifiers": [ + "37d9807d-26a1-4365-952c-a7230938265f", + "57096b92-9e85-4393-b22d-8122907292f8" + ] + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/users/search", + "operationId": "searchUsers", + "scenario": "positive", + "type": "AUTOMATIC", + "testId": 788 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "display_name": "Brynn", + "visibility": "NON_SHARABLE", + "group_identifiers": [ + "cfa01dd9-9605-422d-b7de-a37afff63647" + ], + "privileges": [ + "DATADOWNLOADING" + ], + "account_type": "SAML_USER", + "account_status": "EXPIRED", + "notify_on_share": false, + "onboarding_experience_completed": true, + "home_liveboard_identifier": "33248a57-cc70-4e39-9199-fb5092283381", + "favorite_metadata": [ + { + "identifier": "10a69d10-e455-4473-b1c6-de1da8cc1ad5", + "type": null + }, + { + "identifier": "48d27aee-59c3-4a0c-8d2c-5a8989c55bb1", + "type": "ANSWER" + }, + { + "identifier": "262abdac-b00f-4f5f-ad33-fcf10154184f", + "type": "LIVEBOARD" + } + ], + "record_offset": 1, + "record_size": 9, + "role_identifiers": [ + "9fe70fa0-360c-415b-856f-006af2741931" + ], + "include_favorite_metadata": false + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/users/search", + "operationId": "searchUsers", + "scenario": "positive", + "type": "AUTOMATIC", + "testId": 789 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "user_identifier": "Demetre1688027210162", + "display_name": "Berny", + "email": "calflatd@miibeian.gov.cn", + "privileges": [ + "BYPASSRLS" + ], + "account_type": "SAML_USER", + "account_status": "ACTIVE", + "show_onboarding_experience": false, + "home_liveboard_identifier": "2ff57a24-cf90-485f-8b4b-45fc17474c6f", + "record_offset": 1, + "record_size": 7 + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/users/search", + "operationId": "searchUsers", + "scenario": "positive", + "type": "AUTOMATIC", + "testId": 790 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "user_identifier": "Dex1688027210165", + "display_name": "Dex1688027210165 Becaris", + "visibility": "SHARABLE", + "group_identifiers": [ + "cfa01dd9-9605-422d-b7de-a37afff63647", + "280a2235-3721-43fc-aa25-5d33549ecc90" + ], + "privileges": [ + "CAN_CREATE_CATALOG", + "DISABLE_PINBOARD_CREATION" + ], + "account_type": "SAML_USER", + "notify_on_share": true, + "show_onboarding_experience": false, + "onboarding_experience_completed": true, + "record_offset": 2, + "record_size": 2, + "sort_options": { + "order": "DESC" + }, + "role_identifiers": [ + "27a42179-7e8b-4090-abe9-643003cfb0df" + ], + "include_favorite_metadata": true + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/users/search", + "operationId": "searchUsers", + "scenario": "positive", + "type": "AUTOMATIC", + "testId": 791 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "user_identifier": "jocurriganf1688027208562", + "visibility": "SHARABLE", + "group_identifiers": [ + "cfa01dd9-9605-422d-b7de-a37afff63647" + ], + "privileges": [ + "ADMINISTRATION" + ], + "notify_on_share": false, + "onboarding_experience_completed": false, + "org_identifiers": [ + "0", + "0", + "0" + ], + "record_offset": 9, + "record_size": 10, + "sort_options": { + "order": "ASC" + }, + "include_favorite_metadata": false + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/users/search", + "operationId": "searchUsers", + "scenario": "positive", + "type": "AUTOMATIC", + "testId": 792 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "user_identifier": "Harvey1688027210173", + "display_name": "Harvey1688027210173 Covil", + "email": "cdamperg@netscape.com", + "group_identifiers": [ + "cfa01dd9-9605-422d-b7de-a37afff63647", + "280a2235-3721-43fc-aa25-5d33549ecc90" + ], + "privileges": [ + "BYPASSRLS" + ], + "account_type": "REMOTE_USER", + "account_status": "INACTIVE", + "notify_on_share": true, + "onboarding_experience_completed": false, + "org_identifiers": [ + "0" + ], + "home_liveboard_identifier": "c836ad16-660d-4d28-a3a0-e07cb9eb6ab1", + "record_offset": 4, + "record_size": 3, + "sort_options": { + "field_name": "CREATED", + "order": "ASC" + }, + "role_identifiers": [ + "237697c3-fa17-422a-a223-d68cb438de0e" + ], + "include_favorite_metadata": false + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/users/search", + "operationId": "searchUsers", + "scenario": "positive", + "type": "AUTOMATIC", + "testId": 793 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "user_identifier": "Rickie1688027210176", + "display_name": "Wake", + "visibility": "NON_SHARABLE", + "privileges": [ + "USERDATAUPLOADING", + "AUTHORING", + "GROUP_ADMINISTRATION" + ], + "account_type": "LOCAL_USER", + "notify_on_share": true, + "show_onboarding_experience": false, + "onboarding_experience_completed": true, + "home_liveboard_identifier": "c836ad16-660d-4d28-a3a0-e07cb9eb6ab1", + "record_offset": 3, + "record_size": 5, + "sort_options": { + "order": "ASC" + } + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/users/search", + "operationId": "searchUsers", + "scenario": "positive", + "type": "AUTOMATIC", + "testId": 794 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "user_identifier": "Chanda1688027210179", + "email": "gangeari@barnesandnoble.com", + "group_identifiers": [ + "cfa01dd9-9605-422d-b7de-a37afff63647", + "280a2235-3721-43fc-aa25-5d33549ecc90" + ], + "privileges": [ + "GROUP_ADMINISTRATION", + "EXPERIMENTALFEATUREPRIVILEGE", + "SYNCMANAGEMENT" + ], + "show_onboarding_experience": true, + "onboarding_experience_completed": true, + "favorite_metadata": [ + { + "identifier": "10a69d10-e455-4473-b1c6-de1da8cc1ad5", + "type": "ANSWER" + }, + { + "identifier": "48d27aee-59c3-4a0c-8d2c-5a8989c55bb1", + "type": "ANSWER" + }, + { + "identifier": "262abdac-b00f-4f5f-ad33-fcf10154184f", + "type": "LIVEBOARD" + } + ], + "record_offset": 10, + "record_size": 9, + "sort_options": { + "field_name": "MODIFIED", + "order": "ASC" + }, + "include_favorite_metadata": false + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/users/search", + "operationId": "searchUsers", + "scenario": "positive", + "type": "AUTOMATIC", + "testId": 795 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "user_identifier": "Ive1688027210182", + "visibility": "SHARABLE", + "email": "ldelacroixj@bravesites.com", + "group_identifiers": [ + "cfa01dd9-9605-422d-b7de-a37afff63647", + "280a2235-3721-43fc-aa25-5d33549ecc90", + "f827545e-a592-4280-8ceb-318bd673d04c" + ], + "account_status": "INACTIVE", + "notify_on_share": true, + "show_onboarding_experience": false, + "onboarding_experience_completed": true, + "home_liveboard_identifier": "061457a2-27bc-43a9-9754-0cd873691bf0", + "record_offset": 2, + "record_size": 7, + "role_identifiers": [ + "a5459c63-622c-42c4-a0a1-e8a2973a4d57" + ], + "include_favorite_metadata": true + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/users/search", + "operationId": "searchUsers", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 796 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "user_identifier": "Rickie1688027210176", + "display_name": "Wake", + "visibility": "NON_SHARABLE", + "privileges": [ + "USERDATAUPLOADING", + "AUTHORING", + "GROUP_ADMINISTRATION" + ], + "account_type": "LOCAL_USER", + "notify_on_share": true, + "show_onboarding_experience": false, + "onboarding_experience_completed": true, + "home_liveboard_identifier": "c836ad16-660d-4d28-a3a0-e07cb9eb6ab1", + "record_offset": 3, + "record_size": 5, + "sort_options": { + "order": "ASC" + } + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/users/search", + "operationId": "searchUsers", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 797 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "user_identifier": "jocurriganf1688027208562", + "visibility": [ + "SHARABLE" + ], + "group_identifiers": [ + "cfa01dd9-9605-422d-b7de-a37afff63647" + ], + "privileges": [ + "ADMINISTRATION" + ], + "notify_on_share": false, + "onboarding_experience_completed": false, + "org_identifiers": [ + "0", + "0", + "0" + ], + "record_offset": 9, + "record_size": 10, + "sort_options": { + "order": "ASC" + }, + "include_favorite_metadata": false + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/users/search", + "operationId": "searchUsers", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 798 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "user_identifier": "jocurriganf1688027208562", + "visibility": "SHARABLE", + "group_identifiers": [ + "cfa01dd9-9605-422d-b7de-a37afff63647" + ], + "privileges": [ + "ADMINISTRATION" + ], + "notify_on_share": false, + "onboarding_experience_completed": false, + "org_identifiers": [ + "0", + "0", + "0" + ], + "record_offset": 9, + "record_size": 10, + "sort_options": [ + [ + "order", + "ASC" + ] + ], + "include_favorite_metadata": false + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/users/search", + "operationId": "searchUsers", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 799 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "user_identifier": "enel41688027208536", + "privileges": [ + "BYPASSRLS", + "CAN_CREATE_CATALOG", + "USERDATAUPLOADING" + ], + "account_type": "LOCAL_USER", + "notify_on_share": true, + "org_identifiers": [ + "0" + ], + "record_offset": 2, + "record_size": 8, + "sort_options": { + "field_name": "MODIFIED" + }, + "role_identifiers": [ + "b0abd5c7-6da6-4006-aec8-0a26c1f8db9d" + ], + "include_favorite_metadata": false + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/users/search", + "operationId": "searchUsers", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 800 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "display_name": "Alayne1688027210121 Paddell", + "email": "sallnutt1@hud.gov", + "group_identifiers": [ + "cfa01dd9-9605-422d-b7de-a37afff63647", + "280a2235-3721-43fc-aa25-5d33549ecc90", + "f827545e-a592-4280-8ceb-318bd673d04c" + ], + "privileges": [ + "A3ANALYSIS" + ], + "account_status": "PENDING", + "notify_on_share": false, + "onboarding_experience_completed": false, + "org_identifiers": [ + "0", + "0" + ], + "record_offset": 2, + "record_size": 9, + "sort_options": { + "field_name": "NAME" + }, + "include_favorite_metadata": true + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/users/search", + "operationId": "searchUsers", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 801 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "user_identifier": "Breanne1688027210134", + "display_name": [ + "Bibbye" + ], + "email": "rbalden5@scientificamerican.com", + "group_identifiers": [ + "cfa01dd9-9605-422d-b7de-a37afff63647", + "280a2235-3721-43fc-aa25-5d33549ecc90" + ], + "notify_on_share": false, + "onboarding_experience_completed": false, + "org_identifiers": [ + "0", + "0", + "0" + ], + "favorite_metadata": [ + { + "identifier": "10a69d10-e455-4473-b1c6-de1da8cc1ad5", + "type": "ANSWER" + }, + { + "identifier": "48d27aee-59c3-4a0c-8d2c-5a8989c55bb1", + "type": "ANSWER" + }, + { + "identifier": "262abdac-b00f-4f5f-ad33-fcf10154184f", + "type": "LIVEBOARD" + } + ], + "record_offset": 9, + "record_size": 7, + "sort_options": { + "field_name": "NAME", + "order": "DESC" + }, + "role_identifiers": [ + "1bcf8761-4b58-4378-95c2-60fbff14b0c3", + "f219d327-52c5-4d80-aaaa-15272dfb88bf" + ], + "include_favorite_metadata": false + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/users/search", + "operationId": "searchUsers", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 802 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "user_identifier": "Eddie1688027210137", + "visibility": "NON_SHARABLE", + "email": "sbelderfield6@dedecms.com", + "onboarding_experience_completed": true, + "org_identifiers": "gjVrsIhXOdYQFmR", + "favorite_metadata": [ + { + "identifier": "10a69d10-e455-4473-b1c6-de1da8cc1ad5", + "type": null + }, + { + "identifier": "48d27aee-59c3-4a0c-8d2c-5a8989c55bb1", + "type": "ANSWER" + } + ], + "record_offset": 2, + "record_size": 9, + "role_identifiers": [ + "5ded814b-347b-4d4e-b652-65769036ab8c" + ], + "include_favorite_metadata": true + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/users/search", + "operationId": "searchUsers", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 803 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "email": "pcaps8@europa.eu", + "privileges": [ + "JOBSCHEDULING", + "BYPASSRLS", + "USER_ADMINISTRATION" + ], + "account_status": "PENDING", + "org_identifiers": [ + "0", + "0", + "0" + ], + "record_offset": 1, + "record_size": 2, + "sort_options": { + "order": "ASC" + }, + "include_favorite_metadata": true + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/users/search", + "operationId": "searchUsers", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 804 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "user_identifier": "Dex1688027210165", + "display_name": "Dex1688027210165 Becaris", + "visibility": "SHARABLE", + "group_identifiers": [ + "cfa01dd9-9605-422d-b7de-a37afff63647", + "280a2235-3721-43fc-aa25-5d33549ecc90" + ], + "privileges": [ + "CAN_CREATE_CATALOG", + "DISABLE_PINBOARD_CREATION" + ], + "account_type": "SAML_USER", + "notify_on_share": true, + "show_onboarding_experience": false, + "onboarding_experience_completed": true, + "record_offset": 2, + "record_size": 2, + "sort_options": { + "order": "DESC" + }, + "role_identifiers": [ + "27a42179-7e8b-4090-abe9-643003cfb0df" + ], + "include_favorite_metadata": true + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/users/search", + "operationId": "searchUsers", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 805 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "user_identifier": "Demetre1688027210162", + "display_name": "Berny", + "email": "calflatd@miibeian.gov.cn", + "privileges": [ + "BYPASSRLS" + ], + "account_type": "SAML_USER", + "account_status": "ACTIVE", + "show_onboarding_experience": false, + "home_liveboard_identifier": "2ff57a24-cf90-485f-8b4b-45fc17474c6f", + "record_offset": 1, + "record_size": 7 + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/users/search", + "operationId": "searchUsers", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 806 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "user_identifier": "Ive1688027210182", + "visibility": "SHARABLE", + "email": "ldelacroixj@bravesites.com", + "group_identifiers": [ + "cfa01dd9-9605-422d-b7de-a37afff63647", + "280a2235-3721-43fc-aa25-5d33549ecc90", + "f827545e-a592-4280-8ceb-318bd673d04c" + ], + "account_status": "INACTIVE", + "notify_on_share": true, + "show_onboarding_experience": false, + "onboarding_experience_completed": true, + "home_liveboard_identifier": "061457a2-27bc-43a9-9754-0cd873691bf0", + "record_offset": 2, + "record_size": 7, + "role_identifiers": "hCDijojbYLMYVEF", + "include_favorite_metadata": true + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/users/search", + "operationId": "searchUsers", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 807 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "display_name": "Barb Lanfranchi", + "group_identifiers": [ + "cfa01dd9-9605-422d-b7de-a37afff63647" + ], + "privileges": [ + "DATAMANAGEMENT", + "DISABLE_PINBOARD_CREATION" + ], + "account_type": "OIDC_USER", + "account_status": "PENDING", + "notify_on_share": true, + "show_onboarding_experience": false, + "org_identifiers": [ + "0", + "0", + "0" + ], + "home_liveboard_identifier": [ + "2ff57a24-cf90-485f-8b4b-45fc17474c6f" + ], + "favorite_metadata": [ + { + "identifier": "10a69d10-e455-4473-b1c6-de1da8cc1ad5", + "type": "ANSWER" + } + ], + "record_offset": 6, + "record_size": 5, + "sort_options": { + "order": "ASC" + }, + "role_identifiers": [ + "c4b6b807-9533-4d18-b95f-b5e7bfd92555", + "609c1780-77f5-4c65-83f3-e5d18b4ace64" + ] + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/users/search", + "operationId": "searchUsers", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 808 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "display_name": "Barb Lanfranchi", + "group_identifiers": [ + "cfa01dd9-9605-422d-b7de-a37afff63647" + ], + "privileges": [ + "DATAMANAGEMENT", + "DISABLE_PINBOARD_CREATION" + ], + "account_type": "OIDC_USER", + "account_status": "PENDING", + "notify_on_share": true, + "show_onboarding_experience": false, + "org_identifiers": [ + "0", + "0", + "0" + ], + "home_liveboard_identifier": "2ff57a24-cf90-485f-8b4b-45fc17474c6f", + "favorite_metadata": [ + { + "identifier": "10a69d10-e455-4473-b1c6-de1da8cc1ad5", + "type": "ANSWER" + } + ], + "record_offset": 6, + "record_size": 5, + "sort_options": { + "order": "ASC" + }, + "role_identifiers": "cUmPuKTLfEhaSux" + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/users/search", + "operationId": "searchUsers", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 809 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "user_identifier": "Ive1688027210182", + "visibility": "SHARABLE", + "email": "ldelacroixj@bravesites.com", + "group_identifiers": [ + "cfa01dd9-9605-422d-b7de-a37afff63647", + "280a2235-3721-43fc-aa25-5d33549ecc90", + "f827545e-a592-4280-8ceb-318bd673d04c" + ], + "account_status": "INACTIVE", + "notify_on_share": true, + "show_onboarding_experience": false, + "onboarding_experience_completed": true, + "home_liveboard_identifier": "061457a2-27bc-43a9-9754-0cd873691bf0", + "record_offset": 2, + "record_size": 7, + "role_identifiers": [ + "a5459c63-622c-42c4-a0a1-e8a2973a4d57" + ], + "include_favorite_metadata": true + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/users/search", + "operationId": "searchUsers", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 810 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "user_identifier": "Chanda1688027210179", + "email": "gangeari@barnesandnoble.com", + "group_identifiers": [ + "cfa01dd9-9605-422d-b7de-a37afff63647", + "280a2235-3721-43fc-aa25-5d33549ecc90" + ], + "privileges": [ + "GROUP_ADMINISTRATION", + "EXPERIMENTALFEATUREPRIVILEGE", + "SYNCMANAGEMENT" + ], + "show_onboarding_experience": true, + "onboarding_experience_completed": true, + "favorite_metadata": [ + { + "identifier": "10a69d10-e455-4473-b1c6-de1da8cc1ad5", + "type": "ANSWER" + }, + { + "identifier": "48d27aee-59c3-4a0c-8d2c-5a8989c55bb1", + "type": "ANSWER" + }, + { + "identifier": "262abdac-b00f-4f5f-ad33-fcf10154184f", + "type": "LIVEBOARD" + } + ], + "record_offset": 10, + "record_size": 9, + "sort_options": { + "field_name": "MODIFIED", + "order": "ASC" + }, + "include_favorite_metadata": false + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/orgs/create", + "operationId": "createOrg", + "scenario": "positive", + "type": "AUTOMATIC", + "testId": 811 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "name": "sducrow01688027224683" + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/orgs/create", + "operationId": "createOrg", + "scenario": "positive", + "type": "AUTOMATIC", + "testId": 812 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "name": "cradclyffe11688027224688" + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/orgs/create", + "operationId": "createOrg", + "scenario": "positive", + "type": "AUTOMATIC", + "testId": 813 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "name": "orevans21688027224689", + "description": "posuere" + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/orgs/create", + "operationId": "createOrg", + "scenario": "positive", + "type": "AUTOMATIC", + "testId": 814 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "name": "tbowdler31688027224690", + "description": "imperdiet" + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/orgs/create", + "operationId": "createOrg", + "scenario": "positive", + "type": "AUTOMATIC", + "testId": 815 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "name": "cdugood41688027224690" + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/orgs/create", + "operationId": "createOrg", + "scenario": "positive", + "type": "AUTOMATIC", + "testId": 816 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "name": "jstrangwood51688027224691", + "description": "turpis integer" + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/orgs/create", + "operationId": "createOrg", + "scenario": "positive", + "type": "AUTOMATIC", + "testId": 817 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "name": "ckemish61688027224691" + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/orgs/create", + "operationId": "createOrg", + "scenario": "positive", + "type": "AUTOMATIC", + "testId": 818 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "name": "rantognetti71688027224692" + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/orgs/create", + "operationId": "createOrg", + "scenario": "positive", + "type": "AUTOMATIC", + "testId": 819 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "name": "mdunridge81688027224693", + "description": "nullam sit" + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/orgs/create", + "operationId": "createOrg", + "scenario": "positive", + "type": "AUTOMATIC", + "testId": 820 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "name": "knovak91688027224693" + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/orgs/create", + "operationId": "createOrg", + "scenario": "positive", + "type": "AUTOMATIC", + "testId": 821 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "name": "joregana1688027224694", + "description": "tincidunt ante" + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/orgs/create", + "operationId": "createOrg", + "scenario": "positive", + "type": "AUTOMATIC", + "testId": 822 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "name": "bmangonb1688027224694", + "description": "nam" + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/orgs/create", + "operationId": "createOrg", + "scenario": "positive", + "type": "AUTOMATIC", + "testId": 823 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "name": "gvarfalameevc1688027224695", + "description": "felis" + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/orgs/create", + "operationId": "createOrg", + "scenario": "positive", + "type": "AUTOMATIC", + "testId": 824 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "name": "mbartholomieud1688027224695", + "description": "turpis adipiscing" + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/orgs/create", + "operationId": "createOrg", + "scenario": "positive", + "type": "AUTOMATIC", + "testId": 825 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "name": "bhenrichsene1688027224696", + "description": "in" + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/orgs/create", + "operationId": "createOrg", + "scenario": "positive", + "type": "AUTOMATIC", + "testId": 826 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "name": "ybuckwellf1688027224696" + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/orgs/create", + "operationId": "createOrg", + "scenario": "positive", + "type": "AUTOMATIC", + "testId": 827 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "name": "meverardg1688027224697" + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/orgs/create", + "operationId": "createOrg", + "scenario": "positive", + "type": "AUTOMATIC", + "testId": 828 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "name": "jgrinyovh1688027224698", + "description": "porttitor lacus" + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/orgs/create", + "operationId": "createOrg", + "scenario": "positive", + "type": "AUTOMATIC", + "testId": 829 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "name": "uatyeoi1688027224698", + "description": "odio porttitor" + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/orgs/create", + "operationId": "createOrg", + "scenario": "positive", + "type": "AUTOMATIC", + "testId": 830 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "name": "croadsj1688027224699" + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/orgs/create", + "operationId": "createOrg", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 831 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "name": null, + "description": "porttitor lacus" + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/orgs/create", + "operationId": "createOrg", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 832 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "name": null, + "description": "in" + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/orgs/create", + "operationId": "createOrg", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 833 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "name": null, + "description": "odio porttitor" + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/orgs/create", + "operationId": "createOrg", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 834 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "name": null, + "description": "felis" + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/orgs/create", + "operationId": "createOrg", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 835 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "name": null + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/orgs/create", + "operationId": "createOrg", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 836 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "name": null + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/orgs/create", + "operationId": "createOrg", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 837 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "name": null, + "description": "posuere" + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/orgs/create", + "operationId": "createOrg", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 838 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "name": null, + "description": "nam" + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/orgs/create", + "operationId": "createOrg", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 839 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "name": null + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/orgs/create", + "operationId": "createOrg", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 840 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "name": null + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/orgs/create", + "operationId": "createOrg", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 841 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "name": null + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/orgs/create", + "operationId": "createOrg", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 842 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "name": null + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/orgs/create", + "operationId": "createOrg", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 843 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "name": null + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/orgs/create", + "operationId": "createOrg", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 844 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "name": null, + "description": "odio porttitor" + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/orgs/create", + "operationId": "createOrg", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 845 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "name": null + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/orgs/create", + "operationId": "createOrg", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 846 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "name": "jstrangwood51688027224691", + "description": [ + "turpis", + "integer" + ] + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/orgs/create", + "operationId": "createOrg", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 847 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "name": [ + "bhenrichsene1688027224696" + ], + "description": "in" + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/orgs/create", + "operationId": "createOrg", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 848 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "name": [ + "joregana1688027224694" + ], + "description": "tincidunt ante" + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/orgs/create", + "operationId": "createOrg", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 849 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "name": [ + "sducrow01688027224683" + ] + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/orgs/create", + "operationId": "createOrg", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 850 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "name": "uatyeoi1688027224698", + "description": [ + "odio", + "porttitor" + ] + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/orgs/create", + "operationId": "createOrg", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 851 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "name": [ + "ybuckwellf1688027224696" + ] + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/orgs/create", + "operationId": "createOrg", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 852 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "name": [ + "jgrinyovh1688027224698" + ], + "description": "porttitor lacus" + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/orgs/create", + "operationId": "createOrg", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 853 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "name": "orevans21688027224689", + "description": [ + "posuere" + ] + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/orgs/create", + "operationId": "createOrg", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 854 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "name": "uatyeoi1688027224698", + "description": [ + "odio", + "porttitor" + ] + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/orgs/create", + "operationId": "createOrg", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 855 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "name": [ + "mbartholomieud1688027224695" + ], + "description": "turpis adipiscing" + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/orgs/create", + "operationId": "createOrg", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 856 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "name": [ + "meverardg1688027224697" + ] + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/orgs/create", + "operationId": "createOrg", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 857 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "name": "tbowdler31688027224690", + "description": [ + "imperdiet" + ] + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/orgs/create", + "operationId": "createOrg", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 858 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "name": [ + "orevans21688027224689" + ], + "description": "posuere" + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/orgs/create", + "operationId": "createOrg", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 859 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "name": "jgrinyovh1688027224698", + "description": [ + "porttitor", + "lacus" + ] + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/orgs/create", + "operationId": "createOrg", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 860 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "name": [ + "meverardg1688027224697" + ] + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/orgs/{org_identifier}/update", + "operationId": "updateOrg", + "scenario": "positive", + "type": "AUTOMATIC", + "testId": 861 + }, + "Path_Variables": { + "org_identifier": "sducrow01688027224683" + }, + "Query_Variables": {}, + "Body": { + "name": "Noemi O'Fallon", + "operation": "REMOVE", + "user_identifiers": [] + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/orgs/{org_identifier}/update", + "operationId": "updateOrg", + "scenario": "positive", + "type": "AUTOMATIC", + "testId": 862 + }, + "Path_Variables": { + "org_identifier": "cradclyffe11688027224688" + }, + "Query_Variables": {}, + "Body": { + "operation": "ADD", + "description": "concept" + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/orgs/{org_identifier}/update", + "operationId": "updateOrg", + "scenario": "positive", + "type": "AUTOMATIC", + "testId": 863 + }, + "Path_Variables": { + "org_identifier": "orevans21688027224689" + }, + "Query_Variables": {}, + "Body": { + "name": "Frazier Tivenan", + "user_identifiers": [], + "description": "actuating" + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/orgs/{org_identifier}/update", + "operationId": "updateOrg", + "scenario": "positive", + "type": "AUTOMATIC", + "testId": 864 + }, + "Path_Variables": { + "org_identifier": "tbowdler31688027224690" + }, + "Query_Variables": {}, + "Body": { + "name": "Josi Barribal", + "user_identifiers": [], + "description": "Multi-channelled" + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/orgs/{org_identifier}/update", + "operationId": "updateOrg", + "scenario": "positive", + "type": "AUTOMATIC", + "testId": 865 + }, + "Path_Variables": { + "org_identifier": "cdugood41688027224690" + }, + "Query_Variables": {}, + "Body": { + "operation": "ADD", + "user_identifiers": [] + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/orgs/{org_identifier}/update", + "operationId": "updateOrg", + "scenario": "positive", + "type": "AUTOMATIC", + "testId": 866 + }, + "Path_Variables": { + "org_identifier": "jstrangwood51688027224691" + }, + "Query_Variables": {}, + "Body": { + "name": "Calida Elliss", + "operation": "ADD" + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/orgs/{org_identifier}/update", + "operationId": "updateOrg", + "scenario": "positive", + "type": "AUTOMATIC", + "testId": 867 + }, + "Path_Variables": { + "org_identifier": "ckemish61688027224691" + }, + "Query_Variables": {}, + "Body": { + "operation": "ADD", + "user_identifiers": [], + "description": "Sharable" + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/orgs/{org_identifier}/update", + "operationId": "updateOrg", + "scenario": "positive", + "type": "AUTOMATIC", + "testId": 868 + }, + "Path_Variables": { + "org_identifier": "rantognetti71688027224692" + }, + "Query_Variables": {}, + "Body": { + "name": "Loise Lumby", + "description": "optimizing" + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/orgs/{org_identifier}/update", + "operationId": "updateOrg", + "scenario": "positive", + "type": "AUTOMATIC", + "testId": 869 + }, + "Path_Variables": { + "org_identifier": "mdunridge81688027224693" + }, + "Query_Variables": {}, + "Body": { + "user_identifiers": [], + "description": "Extended" + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/orgs/{org_identifier}/update", + "operationId": "updateOrg", + "scenario": "positive", + "type": "AUTOMATIC", + "testId": 870 + }, + "Path_Variables": { + "org_identifier": "knovak91688027224693" + }, + "Query_Variables": {}, + "Body": { + "name": "Stevy Guymer", + "operation": "REPLACE" + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/orgs/{org_identifier}/update", + "operationId": "updateOrg", + "scenario": "positive", + "type": "AUTOMATIC", + "testId": 871 + }, + "Path_Variables": { + "org_identifier": "joregana1688027224694" + }, + "Query_Variables": {}, + "Body": {} + }, + { + "Metadata": { + "path": "/api/rest/2.0/orgs/{org_identifier}/update", + "operationId": "updateOrg", + "scenario": "positive", + "type": "AUTOMATIC", + "testId": 872 + }, + "Path_Variables": { + "org_identifier": "bmangonb1688027224694" + }, + "Query_Variables": {}, + "Body": { + "name": "Jeffry Flores", + "user_identifiers": [] + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/orgs/{org_identifier}/update", + "operationId": "updateOrg", + "scenario": "positive", + "type": "AUTOMATIC", + "testId": 873 + }, + "Path_Variables": { + "org_identifier": "gvarfalameevc1688027224695" + }, + "Query_Variables": {}, + "Body": { + "operation": "REMOVE", + "user_identifiers": [] + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/orgs/{org_identifier}/update", + "operationId": "updateOrg", + "scenario": "positive", + "type": "AUTOMATIC", + "testId": 874 + }, + "Path_Variables": { + "org_identifier": "mbartholomieud1688027224695" + }, + "Query_Variables": {}, + "Body": { + "name": "Findlay Hakonsen", + "user_identifiers": [], + "description": "Networked" + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/orgs/{org_identifier}/update", + "operationId": "updateOrg", + "scenario": "positive", + "type": "AUTOMATIC", + "testId": 875 + }, + "Path_Variables": { + "org_identifier": "bhenrichsene1688027224696" + }, + "Query_Variables": {}, + "Body": { + "description": "multi-state" + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/orgs/{org_identifier}/update", + "operationId": "updateOrg", + "scenario": "positive", + "type": "AUTOMATIC", + "testId": 876 + }, + "Path_Variables": { + "org_identifier": "ybuckwellf1688027224696" + }, + "Query_Variables": {}, + "Body": { + "name": "Dilly Mynett", + "user_identifiers": [] + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/orgs/{org_identifier}/update", + "operationId": "updateOrg", + "scenario": "positive", + "type": "AUTOMATIC", + "testId": 877 + }, + "Path_Variables": { + "org_identifier": "meverardg1688027224697" + }, + "Query_Variables": {}, + "Body": { + "name": "Camella Judge", + "user_identifiers": [], + "description": "next generation" + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/orgs/{org_identifier}/update", + "operationId": "updateOrg", + "scenario": "positive", + "type": "AUTOMATIC", + "testId": 878 + }, + "Path_Variables": { + "org_identifier": "jgrinyovh1688027224698" + }, + "Query_Variables": {}, + "Body": { + "operation": "ADD", + "user_identifiers": [] + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/orgs/{org_identifier}/update", + "operationId": "updateOrg", + "scenario": "positive", + "type": "AUTOMATIC", + "testId": 879 + }, + "Path_Variables": { + "org_identifier": "uatyeoi1688027224698" + }, + "Query_Variables": {}, + "Body": { + "user_identifiers": [], + "description": "mobile" + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/orgs/{org_identifier}/update", + "operationId": "updateOrg", + "scenario": "positive", + "type": "AUTOMATIC", + "testId": 880 + }, + "Path_Variables": { + "org_identifier": "croadsj1688027224699" + }, + "Query_Variables": {}, + "Body": { + "name": "Nolly Haker", + "description": "asymmetric" + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/orgs/{org_identifier}/update", + "operationId": "updateOrg", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 881 + }, + "Path_Variables": { + "org_identifier": null + }, + "Query_Variables": {}, + "Body": { + "operation": "ADD", + "user_identifiers": [] + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/orgs/{org_identifier}/update", + "operationId": "updateOrg", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 882 + }, + "Path_Variables": { + "org_identifier": null + }, + "Query_Variables": {}, + "Body": { + "operation": "REMOVE", + "user_identifiers": [] + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/orgs/{org_identifier}/update", + "operationId": "updateOrg", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 883 + }, + "Path_Variables": { + "org_identifier": null + }, + "Query_Variables": {}, + "Body": { + "name": "Jeffry Flores", + "user_identifiers": [] + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/orgs/{org_identifier}/update", + "operationId": "updateOrg", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 884 + }, + "Path_Variables": { + "org_identifier": null + }, + "Query_Variables": {}, + "Body": { + "name": "Camella Judge", + "user_identifiers": [], + "description": "next generation" + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/orgs/{org_identifier}/update", + "operationId": "updateOrg", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 885 + }, + "Path_Variables": { + "org_identifier": null + }, + "Query_Variables": {}, + "Body": { + "name": "Camella Judge", + "user_identifiers": [], + "description": "next generation" + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/orgs/{org_identifier}/update", + "operationId": "updateOrg", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 886 + }, + "Path_Variables": { + "org_identifier": null + }, + "Query_Variables": {}, + "Body": { + "operation": "REMOVE", + "user_identifiers": [] + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/orgs/{org_identifier}/update", + "operationId": "updateOrg", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 887 + }, + "Path_Variables": { + "org_identifier": null + }, + "Query_Variables": {}, + "Body": { + "operation": "ADD", + "user_identifiers": [] + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/orgs/{org_identifier}/update", + "operationId": "updateOrg", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 888 + }, + "Path_Variables": { + "org_identifier": null + }, + "Query_Variables": {}, + "Body": { + "name": "Camella Judge", + "user_identifiers": [], + "description": "next generation" + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/orgs/{org_identifier}/update", + "operationId": "updateOrg", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 889 + }, + "Path_Variables": { + "org_identifier": null + }, + "Query_Variables": {}, + "Body": { + "operation": "ADD", + "description": "concept" + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/orgs/{org_identifier}/update", + "operationId": "updateOrg", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 890 + }, + "Path_Variables": { + "org_identifier": null + }, + "Query_Variables": {}, + "Body": { + "name": "Camella Judge", + "user_identifiers": [], + "description": "next generation" + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/orgs/{org_identifier}/update", + "operationId": "updateOrg", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 891 + }, + "Path_Variables": { + "org_identifier": null + }, + "Query_Variables": {}, + "Body": { + "name": "Dilly Mynett", + "user_identifiers": [] + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/orgs/{org_identifier}/update", + "operationId": "updateOrg", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 892 + }, + "Path_Variables": { + "org_identifier": null + }, + "Query_Variables": {}, + "Body": { + "name": "Loise Lumby", + "description": "optimizing" + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/orgs/{org_identifier}/update", + "operationId": "updateOrg", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 893 + }, + "Path_Variables": { + "org_identifier": null + }, + "Query_Variables": {}, + "Body": { + "description": "multi-state" + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/orgs/{org_identifier}/update", + "operationId": "updateOrg", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 894 + }, + "Path_Variables": { + "org_identifier": null + }, + "Query_Variables": {}, + "Body": {} + }, + { + "Metadata": { + "path": "/api/rest/2.0/orgs/{org_identifier}/update", + "operationId": "updateOrg", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 895 + }, + "Path_Variables": { + "org_identifier": null + }, + "Query_Variables": {}, + "Body": { + "description": "multi-state" + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/orgs/{org_identifier}/update", + "operationId": "updateOrg", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 896 + }, + "Path_Variables": { + "org_identifier": "cdugood41688027224690" + }, + "Query_Variables": {}, + "Body": { + "operation": [ + "ADD" + ], + "user_identifiers": [] + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/orgs/{org_identifier}/update", + "operationId": "updateOrg", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 897 + }, + "Path_Variables": { + "org_identifier": "tbowdler31688027224690" + }, + "Query_Variables": {}, + "Body": { + "name": "Josi Barribal", + "user_identifiers": [], + "description": [ + "Multi-channelled" + ] + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/orgs/{org_identifier}/update", + "operationId": "updateOrg", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 898 + }, + "Path_Variables": { + "org_identifier": [ + "knovak91688027224693" + ] + }, + "Query_Variables": {}, + "Body": { + "name": "Stevy Guymer", + "operation": "REPLACE" + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/orgs/{org_identifier}/update", + "operationId": "updateOrg", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 899 + }, + "Path_Variables": { + "org_identifier": "ckemish61688027224691" + }, + "Query_Variables": {}, + "Body": { + "operation": [ + "ADD" + ], + "user_identifiers": [], + "description": "Sharable" + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/orgs/{org_identifier}/update", + "operationId": "updateOrg", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 900 + }, + "Path_Variables": { + "org_identifier": "jgrinyovh1688027224698" + }, + "Query_Variables": {}, + "Body": { + "operation": [ + "ADD" + ], + "user_identifiers": [] + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/orgs/{org_identifier}/update", + "operationId": "updateOrg", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 901 + }, + "Path_Variables": { + "org_identifier": "gvarfalameevc1688027224695" + }, + "Query_Variables": {}, + "Body": { + "operation": [ + "REMOVE" + ], + "user_identifiers": [] + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/orgs/{org_identifier}/update", + "operationId": "updateOrg", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 902 + }, + "Path_Variables": { + "org_identifier": "jgrinyovh1688027224698" + }, + "Query_Variables": {}, + "Body": { + "operation": "ADD", + "user_identifiers": "JLIvBDSpjaILFjM" + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/orgs/{org_identifier}/update", + "operationId": "updateOrg", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 903 + }, + "Path_Variables": { + "org_identifier": "bmangonb1688027224694" + }, + "Query_Variables": {}, + "Body": { + "name": "Jeffry Flores", + "user_identifiers": "QMKcwUWzLeOxnsQ" + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/orgs/{org_identifier}/update", + "operationId": "updateOrg", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 904 + }, + "Path_Variables": { + "org_identifier": "bhenrichsene1688027224696" + }, + "Query_Variables": {}, + "Body": { + "description": [ + "multi-state" + ] + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/orgs/{org_identifier}/update", + "operationId": "updateOrg", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 905 + }, + "Path_Variables": { + "org_identifier": [ + "cradclyffe11688027224688" + ] + }, + "Query_Variables": {}, + "Body": { + "operation": "ADD", + "description": "concept" + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/orgs/{org_identifier}/update", + "operationId": "updateOrg", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 906 + }, + "Path_Variables": { + "org_identifier": "mdunridge81688027224693" + }, + "Query_Variables": {}, + "Body": { + "user_identifiers": [], + "description": [ + "Extended" + ] + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/orgs/{org_identifier}/update", + "operationId": "updateOrg", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 907 + }, + "Path_Variables": { + "org_identifier": "jgrinyovh1688027224698" + }, + "Query_Variables": {}, + "Body": { + "operation": [ + "ADD" + ], + "user_identifiers": [] + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/orgs/{org_identifier}/update", + "operationId": "updateOrg", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 908 + }, + "Path_Variables": { + "org_identifier": "jgrinyovh1688027224698" + }, + "Query_Variables": {}, + "Body": { + "operation": [ + "ADD" + ], + "user_identifiers": [] + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/orgs/{org_identifier}/update", + "operationId": "updateOrg", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 909 + }, + "Path_Variables": { + "org_identifier": [ + "uatyeoi1688027224698" + ] + }, + "Query_Variables": {}, + "Body": { + "user_identifiers": [], + "description": "mobile" + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/orgs/{org_identifier}/update", + "operationId": "updateOrg", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 910 + }, + "Path_Variables": { + "org_identifier": "jstrangwood51688027224691" + }, + "Query_Variables": {}, + "Body": { + "name": "Calida Elliss", + "operation": [ + "ADD" + ] + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/orgs/{org_identifier}/update", + "operationId": "updateOrg", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 911 + }, + "Path_Variables": { + "org_identifier": "DIxZrxLTArHDiuu" + }, + "Query_Variables": {}, + "Body": { + "name": "Calida Elliss", + "operation": "ADD" + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/orgs/{org_identifier}/update", + "operationId": "updateOrg", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 912 + }, + "Path_Variables": { + "org_identifier": "YiOONIcNokprxmC" + }, + "Query_Variables": {}, + "Body": { + "operation": "ADD", + "description": "concept" + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/orgs/{org_identifier}/update", + "operationId": "updateOrg", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 913 + }, + "Path_Variables": { + "org_identifier": "PhdTrHXPncJucPF" + }, + "Query_Variables": {}, + "Body": { + "name": "Loise Lumby", + "description": "optimizing" + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/orgs/{org_identifier}/update", + "operationId": "updateOrg", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 914 + }, + "Path_Variables": { + "org_identifier": "aSJOYnsPIYTyIaY" + }, + "Query_Variables": {}, + "Body": { + "name": "Loise Lumby", + "description": "optimizing" + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/orgs/{org_identifier}/update", + "operationId": "updateOrg", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 915 + }, + "Path_Variables": { + "org_identifier": "IDbvMEoJHjmiRLx" + }, + "Query_Variables": {}, + "Body": { + "user_identifiers": [], + "description": "Extended" + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/orgs/{org_identifier}/update", + "operationId": "updateOrg", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 916 + }, + "Path_Variables": { + "org_identifier": "POVHSCNEUYdfJjZ" + }, + "Query_Variables": {}, + "Body": {} + }, + { + "Metadata": { + "path": "/api/rest/2.0/orgs/{org_identifier}/update", + "operationId": "updateOrg", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 917 + }, + "Path_Variables": { + "org_identifier": "oPqBqwzartCXFmD" + }, + "Query_Variables": {}, + "Body": { + "name": "Nolly Haker", + "description": "asymmetric" + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/orgs/{org_identifier}/update", + "operationId": "updateOrg", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 918 + }, + "Path_Variables": { + "org_identifier": "ApwEitHYZdPBqhm" + }, + "Query_Variables": {}, + "Body": { + "name": "Calida Elliss", + "operation": "ADD" + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/orgs/{org_identifier}/update", + "operationId": "updateOrg", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 919 + }, + "Path_Variables": { + "org_identifier": "SySkpQDGcPfhguX" + }, + "Query_Variables": {}, + "Body": { + "name": "Frazier Tivenan", + "user_identifiers": [], + "description": "actuating" + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/orgs/{org_identifier}/update", + "operationId": "updateOrg", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 920 + }, + "Path_Variables": { + "org_identifier": "iVaIRoDskwfgMAF" + }, + "Query_Variables": {}, + "Body": { + "operation": "REMOVE", + "user_identifiers": [] + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/orgs/{org_identifier}/update", + "operationId": "updateOrg", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 921 + }, + "Path_Variables": { + "org_identifier": "okGsgcDtaFscvOZ" + }, + "Query_Variables": {}, + "Body": { + "name": "Josi Barribal", + "user_identifiers": [], + "description": "Multi-channelled" + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/orgs/{org_identifier}/update", + "operationId": "updateOrg", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 922 + }, + "Path_Variables": { + "org_identifier": "TEQhYNdfxaxXGJD" + }, + "Query_Variables": {}, + "Body": { + "name": "Josi Barribal", + "user_identifiers": [], + "description": "Multi-channelled" + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/orgs/{org_identifier}/update", + "operationId": "updateOrg", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 923 + }, + "Path_Variables": { + "org_identifier": "GvDPBxqPEdpdIwh" + }, + "Query_Variables": {}, + "Body": { + "name": "Jeffry Flores", + "user_identifiers": [] + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/orgs/{org_identifier}/update", + "operationId": "updateOrg", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 924 + }, + "Path_Variables": { + "org_identifier": "GQdhQSLRgpiOuss" + }, + "Query_Variables": {}, + "Body": { + "name": "Noemi O'Fallon", + "operation": "REMOVE", + "user_identifiers": [] + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/orgs/{org_identifier}/update", + "operationId": "updateOrg", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 925 + }, + "Path_Variables": { + "org_identifier": "CGtiTloLjoyGIQu" + }, + "Query_Variables": {}, + "Body": { + "operation": "ADD", + "user_identifiers": [] + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/orgs/search", + "operationId": "searchOrgs", + "scenario": "positive", + "type": "AUTOMATIC", + "testId": 926 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "org_identifier": "Noemi O'Fallon", + "description": "venenatis tristique", + "user_identifiers": "67e15c06-d153-4924-a4cd-ff615393b60f" + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/orgs/search", + "operationId": "searchOrgs", + "scenario": "positive", + "type": "AUTOMATIC", + "testId": 927 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "org_identifier": "cradclyffe11688027224688", + "description": "congue etiam", + "status": "IN_ACTIVE", + "user_identifiers": "0f0dd0f7-7411-4195-a4aa-0dc6b58413c9" + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/orgs/search", + "operationId": "searchOrgs", + "scenario": "positive", + "type": "AUTOMATIC", + "testId": 928 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "org_identifier": "Frazier Tivenan", + "visibility": "HIDDEN", + "user_identifiers": "0f0dd0f7-7411-4195-a4aa-0dc6b58413c9" + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/orgs/search", + "operationId": "searchOrgs", + "scenario": "positive", + "type": "AUTOMATIC", + "testId": 929 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "org_identifier": "Josi Barribal", + "description": "congue diam", + "visibility": "SHOW", + "user_identifiers": "4391d676-2dd8-4248-b6db-d973811f0122" + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/orgs/search", + "operationId": "searchOrgs", + "scenario": "positive", + "type": "AUTOMATIC", + "testId": 930 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "org_identifier": "cdugood41688027224690", + "description": "sit amet", + "visibility": "HIDDEN" + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/orgs/search", + "operationId": "searchOrgs", + "scenario": "positive", + "type": "AUTOMATIC", + "testId": 931 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "description": "accumsan odio", + "org_identifier": "Calida Elliss" + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/orgs/search", + "operationId": "searchOrgs", + "scenario": "positive", + "type": "AUTOMATIC", + "testId": 932 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "description": "tempus vivamus", + "status": "IN_ACTIVE", + "user_identifiers": "0f0dd0f7-7411-4195-a4aa-0dc6b58413c9", + "org_identifier": "ckemish61688027224691" + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/orgs/search", + "operationId": "searchOrgs", + "scenario": "positive", + "type": "AUTOMATIC", + "testId": 933 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "visibility": "SHOW", + "status": "ACTIVE", + "user_identifiers": "67e15c06-d153-4924-a4cd-ff615393b60f", + "org_identifier": "Loise Lumby" + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/orgs/search", + "operationId": "searchOrgs", + "scenario": "positive", + "type": "AUTOMATIC", + "testId": 934 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "org_identifier": "mdunridge81688027224693", + "visibility": "SHOW", + "status": "ACTIVE" + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/orgs/search", + "operationId": "searchOrgs", + "scenario": "positive", + "type": "AUTOMATIC", + "testId": 935 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "description": "metus arcu", + "visibility": "HIDDEN", + "status": "IN_ACTIVE", + "user_identifiers": "0f0dd0f7-7411-4195-a4aa-0dc6b58413c9", + "org_identifier": "Stevy Guymer" + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/orgs/search", + "operationId": "searchOrgs", + "scenario": "positive", + "type": "AUTOMATIC", + "testId": 936 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "description": "nisl", + "visibility": "HIDDEN", + "user_identifiers": "67e15c06-d153-4924-a4cd-ff615393b60f", + "org_identifier": "joregana1688027224694" + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/orgs/search", + "operationId": "searchOrgs", + "scenario": "positive", + "type": "AUTOMATIC", + "testId": 937 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "org_identifier": "Jeffry Flores", + "visibility": "SHOW", + "user_identifiers": "4391d676-2dd8-4248-b6db-d973811f0122" + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/orgs/search", + "operationId": "searchOrgs", + "scenario": "positive", + "type": "AUTOMATIC", + "testId": 938 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "visibility": "HIDDEN", + "org_identifier": "gvarfalameevc1688027224695" + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/orgs/search", + "operationId": "searchOrgs", + "scenario": "positive", + "type": "AUTOMATIC", + "testId": 939 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "description": "suscipit ligula", + "status": "IN_ACTIVE", + "org_identifier": "Findlay Hakonsen" + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/orgs/search", + "operationId": "searchOrgs", + "scenario": "positive", + "type": "AUTOMATIC", + "testId": 940 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "user_identifiers": "4391d676-2dd8-4248-b6db-d973811f0122", + "org_identifier": "bhenrichsene1688027224696" + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/orgs/search", + "operationId": "searchOrgs", + "scenario": "positive", + "type": "AUTOMATIC", + "testId": 941 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "org_identifier": "Dilly Mynett", + "description": "eu est", + "visibility": "SHOW", + "status": "ACTIVE", + "user_identifiers": "67e15c06-d153-4924-a4cd-ff615393b60f" + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/orgs/search", + "operationId": "searchOrgs", + "scenario": "positive", + "type": "AUTOMATIC", + "testId": 942 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "description": "lectus pellentesque", + "status": "ACTIVE", + "org_identifier": "Camella Judge" + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/orgs/search", + "operationId": "searchOrgs", + "scenario": "positive", + "type": "AUTOMATIC", + "testId": 943 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "org_identifier": "jgrinyovh1688027224698", + "description": "in", + "visibility": "SHOW", + "user_identifiers": "0f0dd0f7-7411-4195-a4aa-0dc6b58413c9" + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/orgs/search", + "operationId": "searchOrgs", + "scenario": "positive", + "type": "AUTOMATIC", + "testId": 944 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "description": "dictumst etiam", + "visibility": "HIDDEN", + "status": "IN_ACTIVE", + "org_identifier": "uatyeoi1688027224698" + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/orgs/search", + "operationId": "searchOrgs", + "scenario": "positive", + "type": "AUTOMATIC", + "testId": 945 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "org_identifier": "Nolly Haker", + "visibility": "SHOW" + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/orgs/search", + "operationId": "searchOrgs", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 946 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "visibility": "HIDDEN", + "org_identifier": [ + "gvarfalameevc1688027224695" + ] + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/orgs/search", + "operationId": "searchOrgs", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 947 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "description": [ + "tempus", + "vivamus" + ], + "status": "IN_ACTIVE", + "user_identifiers": "0f0dd0f7-7411-4195-a4aa-0dc6b58413c9", + "org_identifier": "ckemish61688027224691" + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/orgs/search", + "operationId": "searchOrgs", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 948 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "description": "metus arcu", + "visibility": "HIDDEN", + "status": [ + "IN_ACTIVE" + ], + "user_identifiers": "0f0dd0f7-7411-4195-a4aa-0dc6b58413c9", + "org_identifier": "Stevy Guymer" + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/orgs/search", + "operationId": "searchOrgs", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 949 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "org_identifier": "Noemi O'Fallon", + "description": [ + "venenatis", + "tristique" + ], + "user_identifiers": "67e15c06-d153-4924-a4cd-ff615393b60f" + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/orgs/search", + "operationId": "searchOrgs", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 950 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "org_identifier": "Josi Barribal", + "description": "congue diam", + "visibility": [ + "SHOW" + ], + "user_identifiers": "4391d676-2dd8-4248-b6db-d973811f0122" + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/orgs/search", + "operationId": "searchOrgs", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 951 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "org_identifier": [ + "Josi", + "Barribal" + ], + "description": "congue diam", + "visibility": "SHOW", + "user_identifiers": "4391d676-2dd8-4248-b6db-d973811f0122" + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/orgs/search", + "operationId": "searchOrgs", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 952 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "org_identifier": [ + "Nolly", + "Haker" + ], + "visibility": "SHOW" + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/orgs/search", + "operationId": "searchOrgs", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 953 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "visibility": "SHOW", + "status": "ACTIVE", + "user_identifiers": "67e15c06-d153-4924-a4cd-ff615393b60f", + "org_identifier": [ + "Loise", + "Lumby" + ] + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/orgs/search", + "operationId": "searchOrgs", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 954 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "description": [ + "suscipit", + "ligula" + ], + "status": "IN_ACTIVE", + "org_identifier": "Findlay Hakonsen" + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/orgs/search", + "operationId": "searchOrgs", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 955 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "org_identifier": "Josi Barribal", + "description": [ + "congue", + "diam" + ], + "visibility": "SHOW", + "user_identifiers": "4391d676-2dd8-4248-b6db-d973811f0122" + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/orgs/search", + "operationId": "searchOrgs", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 956 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "visibility": "SHOW", + "status": "ACTIVE", + "user_identifiers": "67e15c06-d153-4924-a4cd-ff615393b60f", + "org_identifier": [ + "Loise", + "Lumby" + ] + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/orgs/search", + "operationId": "searchOrgs", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 957 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "description": "accumsan odio", + "org_identifier": [ + "Calida", + "Elliss" + ] + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/orgs/search", + "operationId": "searchOrgs", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 958 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "org_identifier": "jgrinyovh1688027224698", + "description": "in", + "visibility": "SHOW", + "user_identifiers": [ + "0f0dd0f7-7411-4195-a4aa-0dc6b58413c9" + ] + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/orgs/search", + "operationId": "searchOrgs", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 959 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "description": "lectus pellentesque", + "status": "ACTIVE", + "org_identifier": [ + "Camella", + "Judge" + ] + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/orgs/search", + "operationId": "searchOrgs", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 960 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "org_identifier": "Josi Barribal", + "description": [ + "congue", + "diam" + ], + "visibility": "SHOW", + "user_identifiers": "4391d676-2dd8-4248-b6db-d973811f0122" + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/tags/create", + "operationId": "createTag", + "scenario": "positive", + "type": "AUTOMATIC", + "testId": 961 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "name": "morbi1688027229850" + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/tags/create", + "operationId": "createTag", + "scenario": "positive", + "type": "AUTOMATIC", + "testId": 962 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "name": "fusce1688027229854", + "color": "#a3a2c1" + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/tags/create", + "operationId": "createTag", + "scenario": "positive", + "type": "AUTOMATIC", + "testId": 963 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "name": "tristique1688027229854", + "color": "#e0f027" + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/tags/create", + "operationId": "createTag", + "scenario": "positive", + "type": "AUTOMATIC", + "testId": 964 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "name": "enim1688027229855" + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/tags/create", + "operationId": "createTag", + "scenario": "positive", + "type": "AUTOMATIC", + "testId": 965 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "name": "pede1688027229855", + "color": "#99df95" + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/tags/create", + "operationId": "createTag", + "scenario": "positive", + "type": "AUTOMATIC", + "testId": 966 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "name": "turpis1688027229856", + "color": "#2916ed" + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/tags/create", + "operationId": "createTag", + "scenario": "positive", + "type": "AUTOMATIC", + "testId": 967 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "name": "ipsum1688027229856", + "color": "#bde25a" + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/tags/create", + "operationId": "createTag", + "scenario": "positive", + "type": "AUTOMATIC", + "testId": 968 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "name": "ut erat1688027229857", + "color": "#de5985" + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/tags/create", + "operationId": "createTag", + "scenario": "positive", + "type": "AUTOMATIC", + "testId": 969 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "name": "mauris ullamcorper1688027229857" + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/tags/create", + "operationId": "createTag", + "scenario": "positive", + "type": "AUTOMATIC", + "testId": 970 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "name": "vel1688027229857" + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/tags/create", + "operationId": "createTag", + "scenario": "positive", + "type": "AUTOMATIC", + "testId": 971 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "name": "pede ac1688027229858" + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/tags/create", + "operationId": "createTag", + "scenario": "positive", + "type": "AUTOMATIC", + "testId": 972 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "name": "cursus id1688027229858" + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/tags/create", + "operationId": "createTag", + "scenario": "positive", + "type": "AUTOMATIC", + "testId": 973 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "name": "rhoncus1688027229859", + "color": "#04f838" + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/tags/create", + "operationId": "createTag", + "scenario": "positive", + "type": "AUTOMATIC", + "testId": 974 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "name": "nulla1688027229859", + "color": "#f1cbfd" + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/tags/create", + "operationId": "createTag", + "scenario": "positive", + "type": "AUTOMATIC", + "testId": 975 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "name": "neque1688027229860" + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/tags/create", + "operationId": "createTag", + "scenario": "positive", + "type": "AUTOMATIC", + "testId": 976 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "name": "donec quis1688027229860", + "color": "#093683" + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/tags/create", + "operationId": "createTag", + "scenario": "positive", + "type": "AUTOMATIC", + "testId": 977 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "name": "ut1688027229860", + "color": "#311d99" + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/tags/create", + "operationId": "createTag", + "scenario": "positive", + "type": "AUTOMATIC", + "testId": 978 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "name": "pede1688027229861", + "color": "#5a282c" + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/tags/create", + "operationId": "createTag", + "scenario": "positive", + "type": "AUTOMATIC", + "testId": 979 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "name": "morbi1688027229861", + "color": "#d4cb2b" + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/tags/create", + "operationId": "createTag", + "scenario": "positive", + "type": "AUTOMATIC", + "testId": 980 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "name": "convallis1688027229862" + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/tags/create", + "operationId": "createTag", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 981 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "name": null, + "color": "#311d99" + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/tags/create", + "operationId": "createTag", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 982 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "name": null, + "color": "#e0f027" + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/tags/create", + "operationId": "createTag", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 983 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "name": null + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/tags/create", + "operationId": "createTag", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 984 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "name": null + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/tags/create", + "operationId": "createTag", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 985 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "name": null + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/tags/create", + "operationId": "createTag", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 986 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "name": null, + "color": "#a3a2c1" + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/tags/create", + "operationId": "createTag", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 987 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "name": null, + "color": "#bde25a" + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/tags/create", + "operationId": "createTag", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 988 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "name": null, + "color": "#04f838" + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/tags/create", + "operationId": "createTag", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 989 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "name": null + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/tags/create", + "operationId": "createTag", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 990 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "name": null, + "color": "#bde25a" + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/tags/create", + "operationId": "createTag", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 991 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "name": null, + "color": "#311d99" + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/tags/create", + "operationId": "createTag", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 992 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "name": null, + "color": "#093683" + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/tags/create", + "operationId": "createTag", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 993 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "name": null + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/tags/create", + "operationId": "createTag", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 994 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "name": null, + "color": "#f1cbfd" + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/tags/create", + "operationId": "createTag", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 995 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "name": null, + "color": "#e0f027" + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/tags/create", + "operationId": "createTag", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 996 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "name": "tristique1688027229854", + "color": [ + "#e0f027" + ] + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/tags/create", + "operationId": "createTag", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 997 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "name": [ + "nulla1688027229859" + ], + "color": "#f1cbfd" + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/tags/create", + "operationId": "createTag", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 998 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "name": [ + "vel1688027229857" + ] + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/tags/create", + "operationId": "createTag", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 999 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "name": [ + "morbi1688027229850" + ] + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/tags/create", + "operationId": "createTag", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 1000 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "name": [ + "morbi1688027229850" + ] + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/tags/create", + "operationId": "createTag", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 1001 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "name": [ + "fusce1688027229854" + ], + "color": "#a3a2c1" + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/tags/create", + "operationId": "createTag", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 1002 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "name": "tristique1688027229854", + "color": [ + "#e0f027" + ] + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/tags/create", + "operationId": "createTag", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 1003 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "name": [ + "tristique1688027229854" + ], + "color": "#e0f027" + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/tags/create", + "operationId": "createTag", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 1004 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "name": [ + "convallis1688027229862" + ] + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/tags/create", + "operationId": "createTag", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 1005 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "name": "morbi1688027229861", + "color": [ + "#d4cb2b" + ] + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/tags/create", + "operationId": "createTag", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 1006 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "name": [ + "donec", + "quis1688027229860" + ], + "color": "#093683" + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/tags/create", + "operationId": "createTag", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 1007 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "name": [ + "morbi1688027229850" + ] + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/tags/create", + "operationId": "createTag", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 1008 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "name": [ + "neque1688027229860" + ] + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/tags/create", + "operationId": "createTag", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 1009 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "name": [ + "fusce1688027229854" + ], + "color": "#a3a2c1" + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/tags/create", + "operationId": "createTag", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 1010 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "name": [ + "morbi1688027229850" + ] + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/tags/{tag_identifier}/update", + "operationId": "updateTag", + "scenario": "positive", + "type": "AUTOMATIC", + "testId": 1011 + }, + "Path_Variables": { + "tag_identifier": "morbi1688027229850" + }, + "Query_Variables": {}, + "Body": { + "color": "#5dadac" + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/tags/{tag_identifier}/update", + "operationId": "updateTag", + "scenario": "positive", + "type": "AUTOMATIC", + "testId": 1012 + }, + "Path_Variables": { + "tag_identifier": "fusce1688027229854" + }, + "Query_Variables": {}, + "Body": {} + }, + { + "Metadata": { + "path": "/api/rest/2.0/tags/{tag_identifier}/update", + "operationId": "updateTag", + "scenario": "positive", + "type": "AUTOMATIC", + "testId": 1013 + }, + "Path_Variables": { + "tag_identifier": "tristique1688027229854" + }, + "Query_Variables": {}, + "Body": { + "color": "#44d167", + "operation": "REMOVE" + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/tags/{tag_identifier}/update", + "operationId": "updateTag", + "scenario": "positive", + "type": "AUTOMATIC", + "testId": 1014 + }, + "Path_Variables": { + "tag_identifier": "enim1688027229855" + }, + "Query_Variables": {}, + "Body": { + "color": "#8f9931" + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/tags/{tag_identifier}/update", + "operationId": "updateTag", + "scenario": "positive", + "type": "AUTOMATIC", + "testId": 1015 + }, + "Path_Variables": { + "tag_identifier": "pede1688027229855" + }, + "Query_Variables": {}, + "Body": { + "color": "#62787b" + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/tags/{tag_identifier}/update", + "operationId": "updateTag", + "scenario": "positive", + "type": "AUTOMATIC", + "testId": 1016 + }, + "Path_Variables": { + "tag_identifier": "turpis1688027229856" + }, + "Query_Variables": {}, + "Body": {} + }, + { + "Metadata": { + "path": "/api/rest/2.0/tags/{tag_identifier}/update", + "operationId": "updateTag", + "scenario": "positive", + "type": "AUTOMATIC", + "testId": 1017 + }, + "Path_Variables": { + "tag_identifier": "ipsum1688027229856" + }, + "Query_Variables": {}, + "Body": { + "name": "gdries6" + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/tags/{tag_identifier}/update", + "operationId": "updateTag", + "scenario": "positive", + "type": "AUTOMATIC", + "testId": 1018 + }, + "Path_Variables": { + "tag_identifier": "ut erat1688027229857" + }, + "Query_Variables": {}, + "Body": { + "name": "msollime7", + "color": "#96a51d" + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/tags/{tag_identifier}/update", + "operationId": "updateTag", + "scenario": "positive", + "type": "AUTOMATIC", + "testId": 1019 + }, + "Path_Variables": { + "tag_identifier": "mauris ullamcorper1688027229857" + }, + "Query_Variables": {}, + "Body": { + "operation": "REMOVE" + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/tags/{tag_identifier}/update", + "operationId": "updateTag", + "scenario": "positive", + "type": "AUTOMATIC", + "testId": 1020 + }, + "Path_Variables": { + "tag_identifier": "vel1688027229857" + }, + "Query_Variables": {}, + "Body": { + "name": "sskeat9", + "operation": "REMOVE" + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/tags/{tag_identifier}/update", + "operationId": "updateTag", + "scenario": "positive", + "type": "AUTOMATIC", + "testId": 1021 + }, + "Path_Variables": { + "tag_identifier": "pede ac1688027229858" + }, + "Query_Variables": {}, + "Body": { + "name": "cdaymenta", + "color": "#a53438" + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/tags/{tag_identifier}/update", + "operationId": "updateTag", + "scenario": "positive", + "type": "AUTOMATIC", + "testId": 1022 + }, + "Path_Variables": { + "tag_identifier": "cursus id1688027229858" + }, + "Query_Variables": {}, + "Body": {} + }, + { + "Metadata": { + "path": "/api/rest/2.0/tags/{tag_identifier}/update", + "operationId": "updateTag", + "scenario": "positive", + "type": "AUTOMATIC", + "testId": 1023 + }, + "Path_Variables": { + "tag_identifier": "rhoncus1688027229859" + }, + "Query_Variables": {}, + "Body": { + "color": "#6e487b" + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/tags/{tag_identifier}/update", + "operationId": "updateTag", + "scenario": "positive", + "type": "AUTOMATIC", + "testId": 1024 + }, + "Path_Variables": { + "tag_identifier": "nulla1688027229859" + }, + "Query_Variables": {}, + "Body": { + "operation": "REMOVE" + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/tags/{tag_identifier}/update", + "operationId": "updateTag", + "scenario": "positive", + "type": "AUTOMATIC", + "testId": 1025 + }, + "Path_Variables": { + "tag_identifier": "neque1688027229860" + }, + "Query_Variables": {}, + "Body": { + "operation": "ADD" + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/tags/{tag_identifier}/update", + "operationId": "updateTag", + "scenario": "positive", + "type": "AUTOMATIC", + "testId": 1026 + }, + "Path_Variables": { + "tag_identifier": "donec quis1688027229860" + }, + "Query_Variables": {}, + "Body": { + "name": "oduetschensf", + "color": "#9db2d8", + "operation": "REMOVE" + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/tags/{tag_identifier}/update", + "operationId": "updateTag", + "scenario": "positive", + "type": "AUTOMATIC", + "testId": 1027 + }, + "Path_Variables": { + "tag_identifier": "ut1688027229860" + }, + "Query_Variables": {}, + "Body": { + "color": "#e22df6", + "operation": "REMOVE" + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/tags/{tag_identifier}/update", + "operationId": "updateTag", + "scenario": "positive", + "type": "AUTOMATIC", + "testId": 1028 + }, + "Path_Variables": { + "tag_identifier": "pede1688027229861" + }, + "Query_Variables": {}, + "Body": { + "name": "rmaccoughenh" + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/tags/{tag_identifier}/update", + "operationId": "updateTag", + "scenario": "positive", + "type": "AUTOMATIC", + "testId": 1029 + }, + "Path_Variables": { + "tag_identifier": "morbi1688027229861" + }, + "Query_Variables": {}, + "Body": { + "color": "#48f2d3" + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/tags/{tag_identifier}/update", + "operationId": "updateTag", + "scenario": "positive", + "type": "AUTOMATIC", + "testId": 1030 + }, + "Path_Variables": { + "tag_identifier": "convallis1688027229862" + }, + "Query_Variables": {}, + "Body": { + "name": "apaydonj" + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/tags/{tag_identifier}/update", + "operationId": "updateTag", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 1031 + }, + "Path_Variables": { + "tag_identifier": null + }, + "Query_Variables": {}, + "Body": { + "name": "apaydonj" + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/tags/{tag_identifier}/update", + "operationId": "updateTag", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 1032 + }, + "Path_Variables": { + "tag_identifier": null + }, + "Query_Variables": {}, + "Body": {} + }, + { + "Metadata": { + "path": "/api/rest/2.0/tags/{tag_identifier}/update", + "operationId": "updateTag", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 1033 + }, + "Path_Variables": { + "tag_identifier": null + }, + "Query_Variables": {}, + "Body": {} + }, + { + "Metadata": { + "path": "/api/rest/2.0/tags/{tag_identifier}/update", + "operationId": "updateTag", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 1034 + }, + "Path_Variables": { + "tag_identifier": null + }, + "Query_Variables": {}, + "Body": { + "name": "gdries6" + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/tags/{tag_identifier}/update", + "operationId": "updateTag", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 1035 + }, + "Path_Variables": { + "tag_identifier": null + }, + "Query_Variables": {}, + "Body": { + "color": "#48f2d3" + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/tags/{tag_identifier}/update", + "operationId": "updateTag", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 1036 + }, + "Path_Variables": { + "tag_identifier": null + }, + "Query_Variables": {}, + "Body": { + "color": "#8f9931" + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/tags/{tag_identifier}/update", + "operationId": "updateTag", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 1037 + }, + "Path_Variables": { + "tag_identifier": null + }, + "Query_Variables": {}, + "Body": { + "name": "msollime7", + "color": "#96a51d" + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/tags/{tag_identifier}/update", + "operationId": "updateTag", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 1038 + }, + "Path_Variables": { + "tag_identifier": null + }, + "Query_Variables": {}, + "Body": { + "name": "rmaccoughenh" + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/tags/{tag_identifier}/update", + "operationId": "updateTag", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 1039 + }, + "Path_Variables": { + "tag_identifier": null + }, + "Query_Variables": {}, + "Body": { + "operation": "REMOVE" + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/tags/{tag_identifier}/update", + "operationId": "updateTag", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 1040 + }, + "Path_Variables": { + "tag_identifier": null + }, + "Query_Variables": {}, + "Body": { + "operation": "REMOVE" + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/tags/{tag_identifier}/update", + "operationId": "updateTag", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 1041 + }, + "Path_Variables": { + "tag_identifier": null + }, + "Query_Variables": {}, + "Body": { + "color": "#62787b" + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/tags/{tag_identifier}/update", + "operationId": "updateTag", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 1042 + }, + "Path_Variables": { + "tag_identifier": null + }, + "Query_Variables": {}, + "Body": { + "name": "msollime7", + "color": "#96a51d" + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/tags/{tag_identifier}/update", + "operationId": "updateTag", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 1043 + }, + "Path_Variables": { + "tag_identifier": null + }, + "Query_Variables": {}, + "Body": { + "operation": "REMOVE" + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/tags/{tag_identifier}/update", + "operationId": "updateTag", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 1044 + }, + "Path_Variables": { + "tag_identifier": null + }, + "Query_Variables": {}, + "Body": { + "name": "sskeat9", + "operation": "REMOVE" + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/tags/{tag_identifier}/update", + "operationId": "updateTag", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 1045 + }, + "Path_Variables": { + "tag_identifier": null + }, + "Query_Variables": {}, + "Body": { + "operation": "ADD" + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/tags/{tag_identifier}/update", + "operationId": "updateTag", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 1046 + }, + "Path_Variables": { + "tag_identifier": [ + "fusce1688027229854" + ] + }, + "Query_Variables": {}, + "Body": {} + }, + { + "Metadata": { + "path": "/api/rest/2.0/tags/{tag_identifier}/update", + "operationId": "updateTag", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 1047 + }, + "Path_Variables": { + "tag_identifier": [ + "vel1688027229857" + ] + }, + "Query_Variables": {}, + "Body": { + "name": "sskeat9", + "operation": "REMOVE" + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/tags/{tag_identifier}/update", + "operationId": "updateTag", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 1048 + }, + "Path_Variables": { + "tag_identifier": [ + "ipsum1688027229856" + ] + }, + "Query_Variables": {}, + "Body": { + "name": "gdries6" + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/tags/{tag_identifier}/update", + "operationId": "updateTag", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 1049 + }, + "Path_Variables": { + "tag_identifier": "ut erat1688027229857" + }, + "Query_Variables": {}, + "Body": { + "name": [ + "msollime7" + ], + "color": "#96a51d" + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/tags/{tag_identifier}/update", + "operationId": "updateTag", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 1050 + }, + "Path_Variables": { + "tag_identifier": "ipsum1688027229856" + }, + "Query_Variables": {}, + "Body": { + "name": [ + "gdries6" + ] + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/tags/{tag_identifier}/update", + "operationId": "updateTag", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 1051 + }, + "Path_Variables": { + "tag_identifier": [ + "tristique1688027229854" + ] + }, + "Query_Variables": {}, + "Body": { + "color": "#44d167", + "operation": "REMOVE" + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/tags/{tag_identifier}/update", + "operationId": "updateTag", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 1052 + }, + "Path_Variables": { + "tag_identifier": [ + "vel1688027229857" + ] + }, + "Query_Variables": {}, + "Body": { + "name": "sskeat9", + "operation": "REMOVE" + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/tags/{tag_identifier}/update", + "operationId": "updateTag", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 1053 + }, + "Path_Variables": { + "tag_identifier": "pede1688027229855" + }, + "Query_Variables": {}, + "Body": { + "color": [ + "#62787b" + ] + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/tags/{tag_identifier}/update", + "operationId": "updateTag", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 1054 + }, + "Path_Variables": { + "tag_identifier": [ + "rhoncus1688027229859" + ] + }, + "Query_Variables": {}, + "Body": { + "color": "#6e487b" + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/tags/{tag_identifier}/update", + "operationId": "updateTag", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 1055 + }, + "Path_Variables": { + "tag_identifier": [ + "pede1688027229855" + ] + }, + "Query_Variables": {}, + "Body": { + "color": "#62787b" + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/tags/{tag_identifier}/update", + "operationId": "updateTag", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 1056 + }, + "Path_Variables": { + "tag_identifier": [ + "morbi1688027229850" + ] + }, + "Query_Variables": {}, + "Body": { + "color": "#5dadac" + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/tags/{tag_identifier}/update", + "operationId": "updateTag", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 1057 + }, + "Path_Variables": { + "tag_identifier": "ut1688027229860" + }, + "Query_Variables": {}, + "Body": { + "color": "#e22df6", + "operation": [ + "REMOVE" + ] + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/tags/{tag_identifier}/update", + "operationId": "updateTag", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 1058 + }, + "Path_Variables": { + "tag_identifier": [ + "cursus", + "id1688027229858" + ] + }, + "Query_Variables": {}, + "Body": {} + }, + { + "Metadata": { + "path": "/api/rest/2.0/tags/{tag_identifier}/update", + "operationId": "updateTag", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 1059 + }, + "Path_Variables": { + "tag_identifier": [ + "ut1688027229860" + ] + }, + "Query_Variables": {}, + "Body": { + "color": "#e22df6", + "operation": "REMOVE" + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/tags/{tag_identifier}/update", + "operationId": "updateTag", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 1060 + }, + "Path_Variables": { + "tag_identifier": "tristique1688027229854" + }, + "Query_Variables": {}, + "Body": { + "color": "#44d167", + "operation": [ + "REMOVE" + ] + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/tags/{tag_identifier}/update", + "operationId": "updateTag", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 1061 + }, + "Path_Variables": { + "tag_identifier": "kAaIgUFFmYCxkeN" + }, + "Query_Variables": {}, + "Body": { + "color": "#5dadac" + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/tags/{tag_identifier}/update", + "operationId": "updateTag", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 1062 + }, + "Path_Variables": { + "tag_identifier": "QndcpbISJMYsAxf" + }, + "Query_Variables": {}, + "Body": {} + }, + { + "Metadata": { + "path": "/api/rest/2.0/tags/{tag_identifier}/update", + "operationId": "updateTag", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 1063 + }, + "Path_Variables": { + "tag_identifier": "LtBNGQGMGCFTmTr" + }, + "Query_Variables": {}, + "Body": { + "name": "cdaymenta", + "color": "#a53438" + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/tags/{tag_identifier}/update", + "operationId": "updateTag", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 1064 + }, + "Path_Variables": { + "tag_identifier": "KXgEaUvDqRCOoJg" + }, + "Query_Variables": {}, + "Body": { + "operation": "REMOVE" + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/tags/{tag_identifier}/update", + "operationId": "updateTag", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 1065 + }, + "Path_Variables": { + "tag_identifier": "LBxblODiigLBdOm" + }, + "Query_Variables": {}, + "Body": { + "color": "#44d167", + "operation": "REMOVE" + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/tags/{tag_identifier}/update", + "operationId": "updateTag", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 1066 + }, + "Path_Variables": { + "tag_identifier": "RZDcQyLtdRzrjYO" + }, + "Query_Variables": {}, + "Body": { + "color": "#62787b" + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/tags/{tag_identifier}/update", + "operationId": "updateTag", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 1067 + }, + "Path_Variables": { + "tag_identifier": "CUiDTtbdOuEVgtD" + }, + "Query_Variables": {}, + "Body": { + "name": "sskeat9", + "operation": "REMOVE" + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/tags/{tag_identifier}/update", + "operationId": "updateTag", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 1068 + }, + "Path_Variables": { + "tag_identifier": "dQacbEjAGMziqtS" + }, + "Query_Variables": {}, + "Body": { + "color": "#44d167", + "operation": "REMOVE" + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/tags/{tag_identifier}/update", + "operationId": "updateTag", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 1069 + }, + "Path_Variables": { + "tag_identifier": "WVvbRiDJdXnVVfg" + }, + "Query_Variables": {}, + "Body": { + "color": "#8f9931" + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/tags/{tag_identifier}/update", + "operationId": "updateTag", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 1070 + }, + "Path_Variables": { + "tag_identifier": "abZVYuleBLkRRiQ" + }, + "Query_Variables": {}, + "Body": { + "color": "#6e487b" + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/tags/{tag_identifier}/update", + "operationId": "updateTag", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 1071 + }, + "Path_Variables": { + "tag_identifier": "fVKtIueWxGIZLaB" + }, + "Query_Variables": {}, + "Body": { + "name": "gdries6" + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/tags/{tag_identifier}/update", + "operationId": "updateTag", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 1072 + }, + "Path_Variables": { + "tag_identifier": "ebcJmRCptDTIycv" + }, + "Query_Variables": {}, + "Body": { + "color": "#48f2d3" + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/tags/{tag_identifier}/update", + "operationId": "updateTag", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 1073 + }, + "Path_Variables": { + "tag_identifier": "TfSyTpAgezhmEAk" + }, + "Query_Variables": {}, + "Body": { + "name": "cdaymenta", + "color": "#a53438" + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/tags/{tag_identifier}/update", + "operationId": "updateTag", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 1074 + }, + "Path_Variables": { + "tag_identifier": "LtnqMNIyQfwSynX" + }, + "Query_Variables": {}, + "Body": { + "name": "oduetschensf", + "color": "#9db2d8", + "operation": "REMOVE" + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/tags/{tag_identifier}/update", + "operationId": "updateTag", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 1075 + }, + "Path_Variables": { + "tag_identifier": "IDmOaBOKtQiEVyr" + }, + "Query_Variables": {}, + "Body": { + "name": "oduetschensf", + "color": "#9db2d8", + "operation": "REMOVE" + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/tags/assign", + "operationId": "assignTag", + "scenario": "positive", + "type": "AUTOMATIC", + "testId": 1076 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "metadata": [ + { + "type": "LOGICAL_TABLE", + "identifier": "6e884096-20f3-4298-9463-19b7d39c1224" + }, + { + "type": "LIVEBOARD", + "identifier": "c836ad16-660d-4d28-a3a0-e07cb9eb6ab1" + }, + { + "type": "LIVEBOARD", + "identifier": "e36ee65e-64be-436b-a29a-22d8998c4fae" + } + ], + "tag_identifiers": [ + "morbi1688027229850", + "fusce1688027229854", + "tristique1688027229854" + ] + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/tags/assign", + "operationId": "assignTag", + "scenario": "positive", + "type": "AUTOMATIC", + "testId": 1077 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "metadata": [ + { + "type": "LOGICAL_TABLE", + "identifier": "6e884096-20f3-4298-9463-19b7d39c1224" + }, + { + "type": "LIVEBOARD", + "identifier": "c836ad16-660d-4d28-a3a0-e07cb9eb6ab1" + }, + { + "type": "LIVEBOARD", + "identifier": "e36ee65e-64be-436b-a29a-22d8998c4fae" + } + ], + "tag_identifiers": [ + "morbi1688027229850", + "fusce1688027229854" + ] + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/tags/assign", + "operationId": "assignTag", + "scenario": "positive", + "type": "AUTOMATIC", + "testId": 1078 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "metadata": [ + { + "type": "LOGICAL_TABLE", + "identifier": "6e884096-20f3-4298-9463-19b7d39c1224" + }, + { + "type": "LIVEBOARD", + "identifier": "c836ad16-660d-4d28-a3a0-e07cb9eb6ab1" + } + ], + "tag_identifiers": [ + "morbi1688027229850" + ] + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/tags/assign", + "operationId": "assignTag", + "scenario": "positive", + "type": "AUTOMATIC", + "testId": 1079 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "metadata": [ + { + "type": "LOGICAL_TABLE", + "identifier": "6e884096-20f3-4298-9463-19b7d39c1224" + }, + { + "type": "LIVEBOARD", + "identifier": "c836ad16-660d-4d28-a3a0-e07cb9eb6ab1" + } + ], + "tag_identifiers": [ + "morbi1688027229850" + ] + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/tags/assign", + "operationId": "assignTag", + "scenario": "positive", + "type": "AUTOMATIC", + "testId": 1080 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "metadata": [ + { + "type": "LOGICAL_TABLE", + "identifier": "6e884096-20f3-4298-9463-19b7d39c1224" + }, + { + "type": "LIVEBOARD", + "identifier": "c836ad16-660d-4d28-a3a0-e07cb9eb6ab1" + }, + { + "type": "LIVEBOARD", + "identifier": "e36ee65e-64be-436b-a29a-22d8998c4fae" + } + ], + "tag_identifiers": [ + "morbi1688027229850", + "fusce1688027229854", + "tristique1688027229854" + ] + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/tags/assign", + "operationId": "assignTag", + "scenario": "positive", + "type": "AUTOMATIC", + "testId": 1081 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "metadata": [ + { + "type": "LOGICAL_TABLE", + "identifier": "6e884096-20f3-4298-9463-19b7d39c1224" + }, + { + "type": "LIVEBOARD", + "identifier": "c836ad16-660d-4d28-a3a0-e07cb9eb6ab1" + }, + { + "type": "LIVEBOARD", + "identifier": "e36ee65e-64be-436b-a29a-22d8998c4fae" + } + ], + "tag_identifiers": [ + "morbi1688027229850", + "fusce1688027229854", + "tristique1688027229854" + ] + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/tags/assign", + "operationId": "assignTag", + "scenario": "positive", + "type": "AUTOMATIC", + "testId": 1082 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "metadata": [ + { + "type": "LOGICAL_TABLE", + "identifier": "6e884096-20f3-4298-9463-19b7d39c1224" + }, + { + "type": "LIVEBOARD", + "identifier": "c836ad16-660d-4d28-a3a0-e07cb9eb6ab1" + }, + { + "type": "LIVEBOARD", + "identifier": "e36ee65e-64be-436b-a29a-22d8998c4fae" + } + ], + "tag_identifiers": [ + "morbi1688027229850", + "fusce1688027229854" + ] + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/tags/assign", + "operationId": "assignTag", + "scenario": "positive", + "type": "AUTOMATIC", + "testId": 1083 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "metadata": [ + { + "type": "LOGICAL_TABLE", + "identifier": "6e884096-20f3-4298-9463-19b7d39c1224" + }, + { + "type": "LIVEBOARD", + "identifier": "c836ad16-660d-4d28-a3a0-e07cb9eb6ab1" + }, + { + "type": "LIVEBOARD", + "identifier": "e36ee65e-64be-436b-a29a-22d8998c4fae" + } + ], + "tag_identifiers": [ + "morbi1688027229850", + "fusce1688027229854" + ] + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/tags/assign", + "operationId": "assignTag", + "scenario": "positive", + "type": "AUTOMATIC", + "testId": 1084 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "metadata": [ + { + "type": "LOGICAL_TABLE", + "identifier": "6e884096-20f3-4298-9463-19b7d39c1224" + }, + { + "type": "LIVEBOARD", + "identifier": "c836ad16-660d-4d28-a3a0-e07cb9eb6ab1" + } + ], + "tag_identifiers": [ + "morbi1688027229850", + "fusce1688027229854", + "tristique1688027229854" + ] + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/tags/assign", + "operationId": "assignTag", + "scenario": "positive", + "type": "AUTOMATIC", + "testId": 1085 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "metadata": [ + { + "type": "LOGICAL_TABLE", + "identifier": "6e884096-20f3-4298-9463-19b7d39c1224" + }, + { + "type": "LIVEBOARD", + "identifier": "c836ad16-660d-4d28-a3a0-e07cb9eb6ab1" + } + ], + "tag_identifiers": [ + "morbi1688027229850", + "fusce1688027229854", + "tristique1688027229854" + ] + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/tags/assign", + "operationId": "assignTag", + "scenario": "positive", + "type": "AUTOMATIC", + "testId": 1086 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "metadata": [ + { + "type": "LOGICAL_TABLE", + "identifier": "6e884096-20f3-4298-9463-19b7d39c1224" + }, + { + "type": "LIVEBOARD", + "identifier": "c836ad16-660d-4d28-a3a0-e07cb9eb6ab1" + }, + { + "type": "LIVEBOARD", + "identifier": "e36ee65e-64be-436b-a29a-22d8998c4fae" + } + ], + "tag_identifiers": [ + "morbi1688027229850", + "fusce1688027229854", + "tristique1688027229854" + ] + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/tags/assign", + "operationId": "assignTag", + "scenario": "positive", + "type": "AUTOMATIC", + "testId": 1087 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "metadata": [ + { + "type": "LOGICAL_TABLE", + "identifier": "6e884096-20f3-4298-9463-19b7d39c1224" + }, + { + "type": "LIVEBOARD", + "identifier": "c836ad16-660d-4d28-a3a0-e07cb9eb6ab1" + } + ], + "tag_identifiers": [ + "morbi1688027229850" + ] + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/tags/assign", + "operationId": "assignTag", + "scenario": "positive", + "type": "AUTOMATIC", + "testId": 1088 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "metadata": [ + { + "type": "LOGICAL_TABLE", + "identifier": "6e884096-20f3-4298-9463-19b7d39c1224" + } + ], + "tag_identifiers": [ + "morbi1688027229850", + "fusce1688027229854" + ] + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/tags/assign", + "operationId": "assignTag", + "scenario": "positive", + "type": "AUTOMATIC", + "testId": 1089 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "metadata": [ + { + "type": "LOGICAL_TABLE", + "identifier": "6e884096-20f3-4298-9463-19b7d39c1224" + } + ], + "tag_identifiers": [ + "morbi1688027229850", + "fusce1688027229854" + ] + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/tags/assign", + "operationId": "assignTag", + "scenario": "positive", + "type": "AUTOMATIC", + "testId": 1090 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "metadata": [ + { + "type": "LOGICAL_TABLE", + "identifier": "6e884096-20f3-4298-9463-19b7d39c1224" + } + ], + "tag_identifiers": [ + "morbi1688027229850", + "fusce1688027229854" + ] + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/tags/assign", + "operationId": "assignTag", + "scenario": "positive", + "type": "AUTOMATIC", + "testId": 1091 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "metadata": [ + { + "type": "LOGICAL_TABLE", + "identifier": "6e884096-20f3-4298-9463-19b7d39c1224" + } + ], + "tag_identifiers": [ + "morbi1688027229850", + "fusce1688027229854", + "tristique1688027229854" + ] + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/tags/assign", + "operationId": "assignTag", + "scenario": "positive", + "type": "AUTOMATIC", + "testId": 1092 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "metadata": [ + { + "type": "LOGICAL_TABLE", + "identifier": "6e884096-20f3-4298-9463-19b7d39c1224" + }, + { + "type": "LIVEBOARD", + "identifier": "c836ad16-660d-4d28-a3a0-e07cb9eb6ab1" + } + ], + "tag_identifiers": [ + "morbi1688027229850" + ] + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/tags/assign", + "operationId": "assignTag", + "scenario": "positive", + "type": "AUTOMATIC", + "testId": 1093 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "metadata": [ + { + "type": "LOGICAL_TABLE", + "identifier": "6e884096-20f3-4298-9463-19b7d39c1224" + } + ], + "tag_identifiers": [ + "morbi1688027229850", + "fusce1688027229854" + ] + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/tags/assign", + "operationId": "assignTag", + "scenario": "positive", + "type": "AUTOMATIC", + "testId": 1094 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "metadata": [ + { + "type": "LOGICAL_TABLE", + "identifier": "6e884096-20f3-4298-9463-19b7d39c1224" + } + ], + "tag_identifiers": [ + "morbi1688027229850", + "fusce1688027229854", + "tristique1688027229854" + ] + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/tags/assign", + "operationId": "assignTag", + "scenario": "positive", + "type": "AUTOMATIC", + "testId": 1095 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "metadata": [ + { + "type": "LOGICAL_TABLE", + "identifier": "6e884096-20f3-4298-9463-19b7d39c1224" + } + ], + "tag_identifiers": [ + "morbi1688027229850", + "fusce1688027229854", + "tristique1688027229854" + ] + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/tags/assign", + "operationId": "assignTag", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 1096 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "metadata": [ + { + "type": "LOGICAL_TABLE", + "identifier": "6e884096-20f3-4298-9463-19b7d39c1224" + }, + { + "type": "LIVEBOARD", + "identifier": "c836ad16-660d-4d28-a3a0-e07cb9eb6ab1" + }, + { + "type": "LIVEBOARD", + "identifier": "e36ee65e-64be-436b-a29a-22d8998c4fae" + } + ], + "tag_identifiers": null + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/tags/assign", + "operationId": "assignTag", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 1097 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "metadata": null, + "tag_identifiers": [ + "morbi1688027229850" + ] + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/tags/assign", + "operationId": "assignTag", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 1098 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "metadata": null, + "tag_identifiers": [ + "morbi1688027229850", + "fusce1688027229854", + "tristique1688027229854" + ] + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/tags/assign", + "operationId": "assignTag", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 1099 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "metadata": [ + { + "type": "LOGICAL_TABLE", + "identifier": "6e884096-20f3-4298-9463-19b7d39c1224" + }, + { + "type": "LIVEBOARD", + "identifier": "c836ad16-660d-4d28-a3a0-e07cb9eb6ab1" + }, + { + "type": "LIVEBOARD", + "identifier": "e36ee65e-64be-436b-a29a-22d8998c4fae" + } + ], + "tag_identifiers": null + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/tags/assign", + "operationId": "assignTag", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 1100 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "metadata": null, + "tag_identifiers": [ + "morbi1688027229850", + "fusce1688027229854", + "tristique1688027229854" + ] + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/tags/assign", + "operationId": "assignTag", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 1101 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "metadata": null, + "tag_identifiers": [ + "morbi1688027229850", + "fusce1688027229854", + "tristique1688027229854" + ] + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/tags/assign", + "operationId": "assignTag", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 1102 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "metadata": [ + { + "type": "LOGICAL_TABLE", + "identifier": "6e884096-20f3-4298-9463-19b7d39c1224" + }, + { + "type": "LIVEBOARD", + "identifier": "c836ad16-660d-4d28-a3a0-e07cb9eb6ab1" + }, + { + "type": "LIVEBOARD", + "identifier": "e36ee65e-64be-436b-a29a-22d8998c4fae" + } + ], + "tag_identifiers": null + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/tags/assign", + "operationId": "assignTag", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 1103 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "metadata": null, + "tag_identifiers": [ + "morbi1688027229850" + ] + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/tags/assign", + "operationId": "assignTag", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 1104 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "metadata": null, + "tag_identifiers": [ + "morbi1688027229850", + "fusce1688027229854", + "tristique1688027229854" + ] + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/tags/assign", + "operationId": "assignTag", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 1105 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "metadata": [ + { + "type": "LOGICAL_TABLE", + "identifier": "6e884096-20f3-4298-9463-19b7d39c1224" + }, + { + "type": "LIVEBOARD", + "identifier": "c836ad16-660d-4d28-a3a0-e07cb9eb6ab1" + } + ], + "tag_identifiers": null + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/tags/assign", + "operationId": "assignTag", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 1106 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "metadata": null, + "tag_identifiers": [ + "morbi1688027229850" + ] + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/tags/assign", + "operationId": "assignTag", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 1107 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "metadata": [ + { + "type": "LOGICAL_TABLE", + "identifier": "6e884096-20f3-4298-9463-19b7d39c1224" + }, + { + "type": "LIVEBOARD", + "identifier": "c836ad16-660d-4d28-a3a0-e07cb9eb6ab1" + } + ], + "tag_identifiers": null + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/tags/assign", + "operationId": "assignTag", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 1108 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "metadata": null, + "tag_identifiers": [ + "morbi1688027229850", + "fusce1688027229854" + ] + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/tags/assign", + "operationId": "assignTag", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 1109 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "metadata": null, + "tag_identifiers": [ + "morbi1688027229850", + "fusce1688027229854" + ] + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/tags/assign", + "operationId": "assignTag", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 1110 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "metadata": [ + { + "type": "LOGICAL_TABLE", + "identifier": "6e884096-20f3-4298-9463-19b7d39c1224" + }, + { + "type": "LIVEBOARD", + "identifier": "c836ad16-660d-4d28-a3a0-e07cb9eb6ab1" + } + ], + "tag_identifiers": null + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/tags/assign", + "operationId": "assignTag", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 1111 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "metadata": "dKFDNouiSdeoBPa", + "tag_identifiers": [ + "morbi1688027229850", + "fusce1688027229854" + ] + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/tags/assign", + "operationId": "assignTag", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 1112 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "metadata": "BAfNMujOTyREMwI", + "tag_identifiers": [ + "morbi1688027229850", + "fusce1688027229854", + "tristique1688027229854" + ] + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/tags/assign", + "operationId": "assignTag", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 1113 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "metadata": "vPcsCCXUUZnsfUP", + "tag_identifiers": [ + "morbi1688027229850", + "fusce1688027229854", + "tristique1688027229854" + ] + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/tags/assign", + "operationId": "assignTag", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 1114 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "metadata": "UwaDAnRrQtsfiNm", + "tag_identifiers": [ + "morbi1688027229850" + ] + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/tags/assign", + "operationId": "assignTag", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 1115 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "metadata": "tEdSrZbVGTRjjQs", + "tag_identifiers": [ + "morbi1688027229850", + "fusce1688027229854", + "tristique1688027229854" + ] + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/tags/assign", + "operationId": "assignTag", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 1116 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "metadata": "XwhSxIagWubMnmz", + "tag_identifiers": [ + "morbi1688027229850", + "fusce1688027229854", + "tristique1688027229854" + ] + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/tags/assign", + "operationId": "assignTag", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 1117 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "metadata": [ + { + "type": "LOGICAL_TABLE", + "identifier": "6e884096-20f3-4298-9463-19b7d39c1224" + }, + { + "type": "LIVEBOARD", + "identifier": "c836ad16-660d-4d28-a3a0-e07cb9eb6ab1" + }, + { + "type": "LIVEBOARD", + "identifier": "e36ee65e-64be-436b-a29a-22d8998c4fae" + } + ], + "tag_identifiers": "xxupUCGVgPKrbqk" + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/tags/assign", + "operationId": "assignTag", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 1118 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "metadata": "lffrjphLAfLuBOX", + "tag_identifiers": [ + "morbi1688027229850", + "fusce1688027229854" + ] + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/tags/assign", + "operationId": "assignTag", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 1119 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "metadata": [ + { + "type": "LOGICAL_TABLE", + "identifier": "6e884096-20f3-4298-9463-19b7d39c1224" + }, + { + "type": "LIVEBOARD", + "identifier": "c836ad16-660d-4d28-a3a0-e07cb9eb6ab1" + }, + { + "type": "LIVEBOARD", + "identifier": "e36ee65e-64be-436b-a29a-22d8998c4fae" + } + ], + "tag_identifiers": "zTqEAuKZLjgKSNZ" + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/tags/assign", + "operationId": "assignTag", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 1120 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "metadata": "ewAXYzWcOquMani", + "tag_identifiers": [ + "morbi1688027229850" + ] + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/tags/assign", + "operationId": "assignTag", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 1121 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "metadata": [ + { + "type": "LOGICAL_TABLE", + "identifier": "6e884096-20f3-4298-9463-19b7d39c1224" + } + ], + "tag_identifiers": "tvFGecFttPnJGRI" + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/tags/assign", + "operationId": "assignTag", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 1122 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "metadata": [ + { + "type": "LOGICAL_TABLE", + "identifier": "6e884096-20f3-4298-9463-19b7d39c1224" + }, + { + "type": "LIVEBOARD", + "identifier": "c836ad16-660d-4d28-a3a0-e07cb9eb6ab1" + }, + { + "type": "LIVEBOARD", + "identifier": "e36ee65e-64be-436b-a29a-22d8998c4fae" + } + ], + "tag_identifiers": "yRaZGnksWQdyimH" + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/tags/assign", + "operationId": "assignTag", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 1123 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "metadata": [ + { + "type": "LOGICAL_TABLE", + "identifier": "6e884096-20f3-4298-9463-19b7d39c1224" + }, + { + "type": "LIVEBOARD", + "identifier": "c836ad16-660d-4d28-a3a0-e07cb9eb6ab1" + }, + { + "type": "LIVEBOARD", + "identifier": "e36ee65e-64be-436b-a29a-22d8998c4fae" + } + ], + "tag_identifiers": "YwvsmCrOpVZtFsw" + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/tags/assign", + "operationId": "assignTag", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 1124 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "metadata": "MvsXUzKRoTlYwfs", + "tag_identifiers": [ + "morbi1688027229850", + "fusce1688027229854" + ] + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/tags/assign", + "operationId": "assignTag", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 1125 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "metadata": [ + { + "type": "LOGICAL_TABLE", + "identifier": "6e884096-20f3-4298-9463-19b7d39c1224" + }, + { + "type": "LIVEBOARD", + "identifier": "c836ad16-660d-4d28-a3a0-e07cb9eb6ab1" + } + ], + "tag_identifiers": "GWyrqVBYdGBfbJW" + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/tags/assign", + "operationId": "assignTag", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 1126 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "metadata": [ + { + "type": "LOGICAL_TABLE", + "identifier": "6e884096-20f3-4298-9463-19b7d39c1224" + } + ], + "tag_identifiers": [ + "zlUQbDkRIuGIIgF", + "NjXzZUbZhougVLq" + ] + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/tags/assign", + "operationId": "assignTag", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 1127 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "metadata": [ + { + "type": "LOGICAL_TABLE", + "identifier": "6e884096-20f3-4298-9463-19b7d39c1224" + }, + { + "type": "LIVEBOARD", + "identifier": "c836ad16-660d-4d28-a3a0-e07cb9eb6ab1" + }, + { + "type": "LIVEBOARD", + "identifier": "e36ee65e-64be-436b-a29a-22d8998c4fae" + } + ], + "tag_identifiers": [ + "uVUPEoGpyMgPNQR", + "KEHnfJnpfuHqLUo" + ] + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/tags/assign", + "operationId": "assignTag", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 1128 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "metadata": [ + { + "type": "LOGICAL_TABLE", + "identifier": "6e884096-20f3-4298-9463-19b7d39c1224" + }, + { + "type": "LIVEBOARD", + "identifier": "c836ad16-660d-4d28-a3a0-e07cb9eb6ab1" + }, + { + "type": "LIVEBOARD", + "identifier": "e36ee65e-64be-436b-a29a-22d8998c4fae" + } + ], + "tag_identifiers": [ + "AoQXaOWRWySodnO", + "QrhIzEucDytPXVD", + "spGBSXigeUUKtmF" + ] + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/tags/assign", + "operationId": "assignTag", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 1129 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "metadata": [ + { + "type": "LOGICAL_TABLE", + "identifier": "6e884096-20f3-4298-9463-19b7d39c1224" + } + ], + "tag_identifiers": [ + "QEsYpFWSvTnuFMu", + "XHRgGSMQxZfrgzu" + ] + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/tags/assign", + "operationId": "assignTag", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 1130 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "metadata": [ + { + "type": "LOGICAL_TABLE", + "identifier": "6e884096-20f3-4298-9463-19b7d39c1224" + }, + { + "type": "LIVEBOARD", + "identifier": "c836ad16-660d-4d28-a3a0-e07cb9eb6ab1" + }, + { + "type": "LIVEBOARD", + "identifier": "e36ee65e-64be-436b-a29a-22d8998c4fae" + } + ], + "tag_identifiers": [ + "FXHMlfXvdxGXAmW", + "MYDcwNdcWzivYeY" + ] + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/tags/assign", + "operationId": "assignTag", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 1131 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "metadata": [ + { + "type": "LOGICAL_TABLE", + "identifier": "6e884096-20f3-4298-9463-19b7d39c1224" + } + ], + "tag_identifiers": [ + "zrEFOPMdJfDBELD", + "KrKXKIsybkHNRCY" + ] + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/tags/assign", + "operationId": "assignTag", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 1132 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "metadata": [ + { + "type": "LOGICAL_TABLE", + "identifier": "6e884096-20f3-4298-9463-19b7d39c1224" + }, + { + "type": "LIVEBOARD", + "identifier": "c836ad16-660d-4d28-a3a0-e07cb9eb6ab1" + }, + { + "type": "LIVEBOARD", + "identifier": "e36ee65e-64be-436b-a29a-22d8998c4fae" + } + ], + "tag_identifiers": [ + "RfHhXsvhEWSJSHn", + "ZOmypJHpnPSjUya" + ] + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/tags/assign", + "operationId": "assignTag", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 1133 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "metadata": [ + { + "type": "LOGICAL_TABLE", + "identifier": "6e884096-20f3-4298-9463-19b7d39c1224" + }, + { + "type": "LIVEBOARD", + "identifier": "c836ad16-660d-4d28-a3a0-e07cb9eb6ab1" + }, + { + "type": "LIVEBOARD", + "identifier": "e36ee65e-64be-436b-a29a-22d8998c4fae" + } + ], + "tag_identifiers": [ + "wyrVakNcEySIVoS", + "HrfHhaOljbnMNtN", + "wDgDgeAxEecqTYt" + ] + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/tags/assign", + "operationId": "assignTag", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 1134 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "metadata": [ + { + "type": "LOGICAL_TABLE", + "identifier": "6e884096-20f3-4298-9463-19b7d39c1224" + }, + { + "type": "LIVEBOARD", + "identifier": "c836ad16-660d-4d28-a3a0-e07cb9eb6ab1" + }, + { + "type": "LIVEBOARD", + "identifier": "e36ee65e-64be-436b-a29a-22d8998c4fae" + } + ], + "tag_identifiers": [ + "OHJaJUuyUMmBvQM", + "MwCTFZhuyuxpEKo" + ] + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/tags/assign", + "operationId": "assignTag", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 1135 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "metadata": [ + { + "type": "LOGICAL_TABLE", + "identifier": "6e884096-20f3-4298-9463-19b7d39c1224" + } + ], + "tag_identifiers": [ + "HTJlkLAYpDGqywr", + "YjGlFeLPvEfBJqM" + ] + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/tags/assign", + "operationId": "assignTag", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 1136 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "metadata": [ + { + "type": "LOGICAL_TABLE", + "identifier": "6e884096-20f3-4298-9463-19b7d39c1224" + }, + { + "type": "LIVEBOARD", + "identifier": "c836ad16-660d-4d28-a3a0-e07cb9eb6ab1" + }, + { + "type": "LIVEBOARD", + "identifier": "e36ee65e-64be-436b-a29a-22d8998c4fae" + } + ], + "tag_identifiers": [ + "EgltRktkjxZuQUW", + "mOURmrkSiaIUQqd", + "AGDUhcthTbRcLQF" + ] + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/tags/assign", + "operationId": "assignTag", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 1137 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "metadata": [ + { + "type": "LOGICAL_TABLE", + "identifier": "6e884096-20f3-4298-9463-19b7d39c1224" + } + ], + "tag_identifiers": [ + "FrWBtwOGyLNCLdj", + "eewLhkKbBpntqYj" + ] + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/tags/assign", + "operationId": "assignTag", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 1138 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "metadata": [ + { + "type": "LOGICAL_TABLE", + "identifier": "6e884096-20f3-4298-9463-19b7d39c1224" + }, + { + "type": "LIVEBOARD", + "identifier": "c836ad16-660d-4d28-a3a0-e07cb9eb6ab1" + } + ], + "tag_identifiers": [ + "RsgUGWOCnPENLPA", + "qSEhMLndlzYszfo", + "bQysVAJZytOSyGc" + ] + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/tags/assign", + "operationId": "assignTag", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 1139 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "metadata": [ + { + "type": "LOGICAL_TABLE", + "identifier": "6e884096-20f3-4298-9463-19b7d39c1224" + }, + { + "type": "LIVEBOARD", + "identifier": "c836ad16-660d-4d28-a3a0-e07cb9eb6ab1" + }, + { + "type": "LIVEBOARD", + "identifier": "e36ee65e-64be-436b-a29a-22d8998c4fae" + } + ], + "tag_identifiers": [ + "SzqjCmOfYpUbLMP", + "RHeUsIxOkydtDkE", + "aCERBMkezBQLFst" + ] + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/tags/assign", + "operationId": "assignTag", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 1140 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "metadata": [ + { + "type": "LOGICAL_TABLE", + "identifier": "6e884096-20f3-4298-9463-19b7d39c1224" + }, + { + "type": "LIVEBOARD", + "identifier": "c836ad16-660d-4d28-a3a0-e07cb9eb6ab1" + } + ], + "tag_identifiers": [ + "MeQrLcpfdLEgMFt", + "HXFLlKPHyouQqTo", + "faQjybABHyxMrhm" + ] + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/tags/unassign", + "operationId": "unassignTag", + "scenario": "positive", + "type": "AUTOMATIC", + "testId": 1141 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "metadata": [ + { + "identifier": "6e884096-20f3-4298-9463-19b7d39c1224", + "type": "LOGICAL_TABLE" + }, + { + "identifier": "c836ad16-660d-4d28-a3a0-e07cb9eb6ab1", + "type": "LIVEBOARD" + }, + { + "identifier": "e36ee65e-64be-436b-a29a-22d8998c4fae", + "type": "LIVEBOARD" + } + ], + "tag_identifiers": [ + "morbi1688027229850", + "fusce1688027229854", + "tristique1688027229854" + ] + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/tags/unassign", + "operationId": "unassignTag", + "scenario": "positive", + "type": "AUTOMATIC", + "testId": 1142 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "metadata": [ + { + "identifier": "6e884096-20f3-4298-9463-19b7d39c1224", + "type": "LOGICAL_TABLE" + }, + { + "identifier": "c836ad16-660d-4d28-a3a0-e07cb9eb6ab1", + "type": "LIVEBOARD" + } + ], + "tag_identifiers": [ + "morbi1688027229850", + "fusce1688027229854", + "tristique1688027229854" + ] + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/tags/unassign", + "operationId": "unassignTag", + "scenario": "positive", + "type": "AUTOMATIC", + "testId": 1143 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "metadata": [ + { + "identifier": "6e884096-20f3-4298-9463-19b7d39c1224", + "type": "LOGICAL_TABLE" + }, + { + "identifier": "c836ad16-660d-4d28-a3a0-e07cb9eb6ab1", + "type": "LIVEBOARD" + }, + { + "identifier": "e36ee65e-64be-436b-a29a-22d8998c4fae", + "type": "LIVEBOARD" + } + ], + "tag_identifiers": [ + "morbi1688027229850", + "fusce1688027229854", + "tristique1688027229854" + ] + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/tags/unassign", + "operationId": "unassignTag", + "scenario": "positive", + "type": "AUTOMATIC", + "testId": 1144 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "metadata": [ + { + "identifier": "6e884096-20f3-4298-9463-19b7d39c1224", + "type": "LOGICAL_TABLE" + }, + { + "identifier": "c836ad16-660d-4d28-a3a0-e07cb9eb6ab1", + "type": "LIVEBOARD" + } + ], + "tag_identifiers": [ + "morbi1688027229850" + ] + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/tags/unassign", + "operationId": "unassignTag", + "scenario": "positive", + "type": "AUTOMATIC", + "testId": 1145 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "metadata": [ + { + "identifier": "6e884096-20f3-4298-9463-19b7d39c1224", + "type": "LOGICAL_TABLE" + }, + { + "identifier": "c836ad16-660d-4d28-a3a0-e07cb9eb6ab1", + "type": "LIVEBOARD" + }, + { + "identifier": "e36ee65e-64be-436b-a29a-22d8998c4fae", + "type": "LIVEBOARD" + } + ], + "tag_identifiers": [ + "morbi1688027229850" + ] + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/tags/unassign", + "operationId": "unassignTag", + "scenario": "positive", + "type": "AUTOMATIC", + "testId": 1146 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "metadata": [ + { + "identifier": "6e884096-20f3-4298-9463-19b7d39c1224", + "type": "LOGICAL_TABLE" + }, + { + "identifier": "c836ad16-660d-4d28-a3a0-e07cb9eb6ab1", + "type": "LIVEBOARD" + }, + { + "identifier": "e36ee65e-64be-436b-a29a-22d8998c4fae", + "type": "LIVEBOARD" + } + ], + "tag_identifiers": [ + "morbi1688027229850" + ] + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/tags/unassign", + "operationId": "unassignTag", + "scenario": "positive", + "type": "AUTOMATIC", + "testId": 1147 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "metadata": [ + { + "identifier": "6e884096-20f3-4298-9463-19b7d39c1224", + "type": "LOGICAL_TABLE" + }, + { + "identifier": "c836ad16-660d-4d28-a3a0-e07cb9eb6ab1", + "type": "LIVEBOARD" + }, + { + "identifier": "e36ee65e-64be-436b-a29a-22d8998c4fae", + "type": "LIVEBOARD" + } + ], + "tag_identifiers": [ + "morbi1688027229850", + "fusce1688027229854" + ] + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/tags/unassign", + "operationId": "unassignTag", + "scenario": "positive", + "type": "AUTOMATIC", + "testId": 1148 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "metadata": [ + { + "identifier": "6e884096-20f3-4298-9463-19b7d39c1224", + "type": "LOGICAL_TABLE" + } + ], + "tag_identifiers": [ + "morbi1688027229850", + "fusce1688027229854", + "tristique1688027229854" + ] + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/tags/unassign", + "operationId": "unassignTag", + "scenario": "positive", + "type": "AUTOMATIC", + "testId": 1149 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "metadata": [ + { + "identifier": "6e884096-20f3-4298-9463-19b7d39c1224", + "type": "LOGICAL_TABLE" + }, + { + "identifier": "c836ad16-660d-4d28-a3a0-e07cb9eb6ab1", + "type": "LIVEBOARD" + }, + { + "identifier": "e36ee65e-64be-436b-a29a-22d8998c4fae", + "type": "LIVEBOARD" + } + ], + "tag_identifiers": [ + "morbi1688027229850", + "fusce1688027229854" + ] + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/tags/unassign", + "operationId": "unassignTag", + "scenario": "positive", + "type": "AUTOMATIC", + "testId": 1150 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "metadata": [ + { + "identifier": "6e884096-20f3-4298-9463-19b7d39c1224", + "type": "LOGICAL_TABLE" + }, + { + "identifier": "c836ad16-660d-4d28-a3a0-e07cb9eb6ab1", + "type": "LIVEBOARD" + }, + { + "identifier": "e36ee65e-64be-436b-a29a-22d8998c4fae", + "type": "LIVEBOARD" + } + ], + "tag_identifiers": [ + "morbi1688027229850" + ] + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/tags/unassign", + "operationId": "unassignTag", + "scenario": "positive", + "type": "AUTOMATIC", + "testId": 1151 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "metadata": [ + { + "identifier": "6e884096-20f3-4298-9463-19b7d39c1224", + "type": "LOGICAL_TABLE" + }, + { + "identifier": "c836ad16-660d-4d28-a3a0-e07cb9eb6ab1", + "type": "LIVEBOARD" + }, + { + "identifier": "e36ee65e-64be-436b-a29a-22d8998c4fae", + "type": "LIVEBOARD" + } + ], + "tag_identifiers": [ + "morbi1688027229850", + "fusce1688027229854", + "tristique1688027229854" + ] + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/tags/unassign", + "operationId": "unassignTag", + "scenario": "positive", + "type": "AUTOMATIC", + "testId": 1152 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "metadata": [ + { + "identifier": "6e884096-20f3-4298-9463-19b7d39c1224", + "type": "LOGICAL_TABLE" + } + ], + "tag_identifiers": [ + "morbi1688027229850", + "fusce1688027229854", + "tristique1688027229854" + ] + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/tags/unassign", + "operationId": "unassignTag", + "scenario": "positive", + "type": "AUTOMATIC", + "testId": 1153 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "metadata": [ + { + "identifier": "6e884096-20f3-4298-9463-19b7d39c1224", + "type": "LOGICAL_TABLE" + }, + { + "identifier": "c836ad16-660d-4d28-a3a0-e07cb9eb6ab1", + "type": "LIVEBOARD" + } + ], + "tag_identifiers": [ + "morbi1688027229850", + "fusce1688027229854" + ] + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/tags/unassign", + "operationId": "unassignTag", + "scenario": "positive", + "type": "AUTOMATIC", + "testId": 1154 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "metadata": [ + { + "identifier": "6e884096-20f3-4298-9463-19b7d39c1224", + "type": "LOGICAL_TABLE" + }, + { + "identifier": "c836ad16-660d-4d28-a3a0-e07cb9eb6ab1", + "type": "LIVEBOARD" + }, + { + "identifier": "e36ee65e-64be-436b-a29a-22d8998c4fae", + "type": "LIVEBOARD" + } + ], + "tag_identifiers": [ + "morbi1688027229850", + "fusce1688027229854", + "tristique1688027229854" + ] + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/tags/unassign", + "operationId": "unassignTag", + "scenario": "positive", + "type": "AUTOMATIC", + "testId": 1155 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "metadata": [ + { + "identifier": "6e884096-20f3-4298-9463-19b7d39c1224", + "type": "LOGICAL_TABLE" + }, + { + "identifier": "c836ad16-660d-4d28-a3a0-e07cb9eb6ab1", + "type": "LIVEBOARD" + } + ], + "tag_identifiers": [ + "morbi1688027229850", + "fusce1688027229854" + ] + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/tags/unassign", + "operationId": "unassignTag", + "scenario": "positive", + "type": "AUTOMATIC", + "testId": 1156 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "metadata": [ + { + "identifier": "6e884096-20f3-4298-9463-19b7d39c1224", + "type": "LOGICAL_TABLE" + }, + { + "identifier": "c836ad16-660d-4d28-a3a0-e07cb9eb6ab1", + "type": "LIVEBOARD" + } + ], + "tag_identifiers": [ + "morbi1688027229850" + ] + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/tags/unassign", + "operationId": "unassignTag", + "scenario": "positive", + "type": "AUTOMATIC", + "testId": 1157 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "metadata": [ + { + "identifier": "6e884096-20f3-4298-9463-19b7d39c1224", + "type": "LOGICAL_TABLE" + }, + { + "identifier": "c836ad16-660d-4d28-a3a0-e07cb9eb6ab1", + "type": "LIVEBOARD" + } + ], + "tag_identifiers": [ + "morbi1688027229850", + "fusce1688027229854" + ] + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/tags/unassign", + "operationId": "unassignTag", + "scenario": "positive", + "type": "AUTOMATIC", + "testId": 1158 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "metadata": [ + { + "identifier": "6e884096-20f3-4298-9463-19b7d39c1224", + "type": "LOGICAL_TABLE" + }, + { + "identifier": "c836ad16-660d-4d28-a3a0-e07cb9eb6ab1", + "type": "LIVEBOARD" + }, + { + "identifier": "e36ee65e-64be-436b-a29a-22d8998c4fae", + "type": "LIVEBOARD" + } + ], + "tag_identifiers": [ + "morbi1688027229850", + "fusce1688027229854" + ] + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/tags/unassign", + "operationId": "unassignTag", + "scenario": "positive", + "type": "AUTOMATIC", + "testId": 1159 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "metadata": [ + { + "identifier": "6e884096-20f3-4298-9463-19b7d39c1224", + "type": "LOGICAL_TABLE" + }, + { + "identifier": "c836ad16-660d-4d28-a3a0-e07cb9eb6ab1", + "type": "LIVEBOARD" + } + ], + "tag_identifiers": [ + "morbi1688027229850", + "fusce1688027229854", + "tristique1688027229854" + ] + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/tags/unassign", + "operationId": "unassignTag", + "scenario": "positive", + "type": "AUTOMATIC", + "testId": 1160 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "metadata": [ + { + "identifier": "6e884096-20f3-4298-9463-19b7d39c1224", + "type": "LOGICAL_TABLE" + } + ], + "tag_identifiers": [ + "morbi1688027229850", + "fusce1688027229854", + "tristique1688027229854" + ] + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/tags/unassign", + "operationId": "unassignTag", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 1161 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "metadata": null, + "tag_identifiers": [ + "morbi1688027229850" + ] + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/tags/unassign", + "operationId": "unassignTag", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 1162 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "metadata": [ + { + "identifier": "6e884096-20f3-4298-9463-19b7d39c1224", + "type": "LOGICAL_TABLE" + }, + { + "identifier": "c836ad16-660d-4d28-a3a0-e07cb9eb6ab1", + "type": "LIVEBOARD" + }, + { + "identifier": "e36ee65e-64be-436b-a29a-22d8998c4fae", + "type": "LIVEBOARD" + } + ], + "tag_identifiers": null + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/tags/unassign", + "operationId": "unassignTag", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 1163 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "metadata": [ + { + "identifier": "6e884096-20f3-4298-9463-19b7d39c1224", + "type": "LOGICAL_TABLE" + }, + { + "identifier": "c836ad16-660d-4d28-a3a0-e07cb9eb6ab1", + "type": "LIVEBOARD" + }, + { + "identifier": "e36ee65e-64be-436b-a29a-22d8998c4fae", + "type": "LIVEBOARD" + } + ], + "tag_identifiers": null + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/tags/unassign", + "operationId": "unassignTag", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 1164 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "metadata": [ + { + "identifier": "6e884096-20f3-4298-9463-19b7d39c1224", + "type": "LOGICAL_TABLE" + }, + { + "identifier": "c836ad16-660d-4d28-a3a0-e07cb9eb6ab1", + "type": "LIVEBOARD" + }, + { + "identifier": "e36ee65e-64be-436b-a29a-22d8998c4fae", + "type": "LIVEBOARD" + } + ], + "tag_identifiers": null + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/tags/unassign", + "operationId": "unassignTag", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 1165 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "metadata": [ + { + "identifier": "6e884096-20f3-4298-9463-19b7d39c1224", + "type": "LOGICAL_TABLE" + } + ], + "tag_identifiers": null + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/tags/unassign", + "operationId": "unassignTag", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 1166 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "metadata": null, + "tag_identifiers": [ + "morbi1688027229850", + "fusce1688027229854" + ] + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/tags/unassign", + "operationId": "unassignTag", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 1167 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "metadata": null, + "tag_identifiers": [ + "morbi1688027229850", + "fusce1688027229854" + ] + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/tags/unassign", + "operationId": "unassignTag", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 1168 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "metadata": null, + "tag_identifiers": [ + "morbi1688027229850", + "fusce1688027229854" + ] + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/tags/unassign", + "operationId": "unassignTag", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 1169 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "metadata": null, + "tag_identifiers": [ + "morbi1688027229850", + "fusce1688027229854" + ] + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/tags/unassign", + "operationId": "unassignTag", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 1170 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "metadata": null, + "tag_identifiers": [ + "morbi1688027229850", + "fusce1688027229854", + "tristique1688027229854" + ] + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/tags/unassign", + "operationId": "unassignTag", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 1171 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "metadata": null, + "tag_identifiers": [ + "morbi1688027229850", + "fusce1688027229854", + "tristique1688027229854" + ] + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/tags/unassign", + "operationId": "unassignTag", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 1172 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "metadata": null, + "tag_identifiers": [ + "morbi1688027229850", + "fusce1688027229854" + ] + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/tags/unassign", + "operationId": "unassignTag", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 1173 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "metadata": null, + "tag_identifiers": [ + "morbi1688027229850" + ] + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/tags/unassign", + "operationId": "unassignTag", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 1174 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "metadata": [ + { + "identifier": "6e884096-20f3-4298-9463-19b7d39c1224", + "type": "LOGICAL_TABLE" + } + ], + "tag_identifiers": null + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/tags/unassign", + "operationId": "unassignTag", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 1175 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "metadata": [ + { + "identifier": "6e884096-20f3-4298-9463-19b7d39c1224", + "type": "LOGICAL_TABLE" + }, + { + "identifier": "c836ad16-660d-4d28-a3a0-e07cb9eb6ab1", + "type": "LIVEBOARD" + } + ], + "tag_identifiers": null + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/tags/unassign", + "operationId": "unassignTag", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 1176 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "metadata": [ + { + "identifier": "6e884096-20f3-4298-9463-19b7d39c1224", + "type": "LOGICAL_TABLE" + }, + { + "identifier": "c836ad16-660d-4d28-a3a0-e07cb9eb6ab1", + "type": "LIVEBOARD" + }, + { + "identifier": "e36ee65e-64be-436b-a29a-22d8998c4fae", + "type": "LIVEBOARD" + } + ], + "tag_identifiers": "vDDoxEUUjSebhTI" + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/tags/unassign", + "operationId": "unassignTag", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 1177 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "metadata": [ + { + "identifier": "6e884096-20f3-4298-9463-19b7d39c1224", + "type": "LOGICAL_TABLE" + } + ], + "tag_identifiers": "PelkiDQWCaFkyWv" + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/tags/unassign", + "operationId": "unassignTag", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 1178 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "metadata": "NlpXeTyCVMeDnIt", + "tag_identifiers": [ + "morbi1688027229850", + "fusce1688027229854" + ] + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/tags/unassign", + "operationId": "unassignTag", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 1179 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "metadata": [ + { + "identifier": "6e884096-20f3-4298-9463-19b7d39c1224", + "type": "LOGICAL_TABLE" + } + ], + "tag_identifiers": "qXbmqlDqhUaVavU" + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/tags/unassign", + "operationId": "unassignTag", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 1180 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "metadata": "HqCDxaxEGERugaM", + "tag_identifiers": [ + "morbi1688027229850" + ] + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/tags/unassign", + "operationId": "unassignTag", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 1181 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "metadata": [ + { + "identifier": "6e884096-20f3-4298-9463-19b7d39c1224", + "type": "LOGICAL_TABLE" + }, + { + "identifier": "c836ad16-660d-4d28-a3a0-e07cb9eb6ab1", + "type": "LIVEBOARD" + }, + { + "identifier": "e36ee65e-64be-436b-a29a-22d8998c4fae", + "type": "LIVEBOARD" + } + ], + "tag_identifiers": "DxbkRayiXpqlLos" + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/tags/unassign", + "operationId": "unassignTag", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 1182 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "metadata": "lGNxSHktHClDIYB", + "tag_identifiers": [ + "morbi1688027229850" + ] + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/tags/unassign", + "operationId": "unassignTag", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 1183 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "metadata": [ + { + "identifier": "6e884096-20f3-4298-9463-19b7d39c1224", + "type": "LOGICAL_TABLE" + } + ], + "tag_identifiers": "eqPeYJKwjlqzsQe" + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/tags/unassign", + "operationId": "unassignTag", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 1184 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "metadata": "aeCyQwRDvMHztQL", + "tag_identifiers": [ + "morbi1688027229850", + "fusce1688027229854", + "tristique1688027229854" + ] + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/tags/unassign", + "operationId": "unassignTag", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 1185 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "metadata": "xEzbcjZFerFKtQd", + "tag_identifiers": [ + "morbi1688027229850" + ] + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/tags/unassign", + "operationId": "unassignTag", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 1186 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "metadata": "kPwXwbGLgpweYxU", + "tag_identifiers": [ + "morbi1688027229850", + "fusce1688027229854", + "tristique1688027229854" + ] + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/tags/unassign", + "operationId": "unassignTag", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 1187 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "metadata": [ + { + "identifier": "6e884096-20f3-4298-9463-19b7d39c1224", + "type": "LOGICAL_TABLE" + }, + { + "identifier": "c836ad16-660d-4d28-a3a0-e07cb9eb6ab1", + "type": "LIVEBOARD" + }, + { + "identifier": "e36ee65e-64be-436b-a29a-22d8998c4fae", + "type": "LIVEBOARD" + } + ], + "tag_identifiers": "KxQCtupxzWTWJFI" + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/tags/unassign", + "operationId": "unassignTag", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 1188 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "metadata": [ + { + "identifier": "6e884096-20f3-4298-9463-19b7d39c1224", + "type": "LOGICAL_TABLE" + }, + { + "identifier": "c836ad16-660d-4d28-a3a0-e07cb9eb6ab1", + "type": "LIVEBOARD" + }, + { + "identifier": "e36ee65e-64be-436b-a29a-22d8998c4fae", + "type": "LIVEBOARD" + } + ], + "tag_identifiers": "yQWehYjKKCPmjRL" + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/tags/unassign", + "operationId": "unassignTag", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 1189 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "metadata": [ + { + "identifier": "6e884096-20f3-4298-9463-19b7d39c1224", + "type": "LOGICAL_TABLE" + }, + { + "identifier": "c836ad16-660d-4d28-a3a0-e07cb9eb6ab1", + "type": "LIVEBOARD" + } + ], + "tag_identifiers": "TNVxsNNaauKhFen" + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/tags/unassign", + "operationId": "unassignTag", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 1190 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "metadata": "fBPGzgWexkETWSu", + "tag_identifiers": [ + "morbi1688027229850" + ] + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/tags/unassign", + "operationId": "unassignTag", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 1191 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "metadata": [ + { + "identifier": "6e884096-20f3-4298-9463-19b7d39c1224", + "type": "LOGICAL_TABLE" + }, + { + "identifier": "c836ad16-660d-4d28-a3a0-e07cb9eb6ab1", + "type": "LIVEBOARD" + }, + { + "identifier": "e36ee65e-64be-436b-a29a-22d8998c4fae", + "type": "LIVEBOARD" + } + ], + "tag_identifiers": [ + "eftaEFNAtzMroum", + "MevHaKtZTGfxahl", + "qBgvqxoLSDvULuV" + ] + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/tags/unassign", + "operationId": "unassignTag", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 1192 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "metadata": [ + { + "identifier": "6e884096-20f3-4298-9463-19b7d39c1224", + "type": "LOGICAL_TABLE" + }, + { + "identifier": "c836ad16-660d-4d28-a3a0-e07cb9eb6ab1", + "type": "LIVEBOARD" + }, + { + "identifier": "e36ee65e-64be-436b-a29a-22d8998c4fae", + "type": "LIVEBOARD" + } + ], + "tag_identifiers": [ + "kUpOhSybIRbhwEr" + ] + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/tags/unassign", + "operationId": "unassignTag", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 1193 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "metadata": [ + { + "identifier": "6e884096-20f3-4298-9463-19b7d39c1224", + "type": "LOGICAL_TABLE" + }, + { + "identifier": "c836ad16-660d-4d28-a3a0-e07cb9eb6ab1", + "type": "LIVEBOARD" + }, + { + "identifier": "e36ee65e-64be-436b-a29a-22d8998c4fae", + "type": "LIVEBOARD" + } + ], + "tag_identifiers": [ + "oKbwNGbUIfsqnvK", + "MXJGtPHuSZUVWQf", + "SfANakwQvVQwdGq" + ] + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/tags/unassign", + "operationId": "unassignTag", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 1194 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "metadata": [ + { + "identifier": "6e884096-20f3-4298-9463-19b7d39c1224", + "type": "LOGICAL_TABLE" + }, + { + "identifier": "c836ad16-660d-4d28-a3a0-e07cb9eb6ab1", + "type": "LIVEBOARD" + }, + { + "identifier": "e36ee65e-64be-436b-a29a-22d8998c4fae", + "type": "LIVEBOARD" + } + ], + "tag_identifiers": [ + "hvuncQMUQFvczuD" + ] + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/tags/unassign", + "operationId": "unassignTag", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 1195 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "metadata": [ + { + "identifier": "6e884096-20f3-4298-9463-19b7d39c1224", + "type": "LOGICAL_TABLE" + }, + { + "identifier": "c836ad16-660d-4d28-a3a0-e07cb9eb6ab1", + "type": "LIVEBOARD" + } + ], + "tag_identifiers": [ + "AWUDacgZLDNDftN", + "sxjChHzEnConevT", + "japfOZmLTvzAfbR" + ] + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/tags/unassign", + "operationId": "unassignTag", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 1196 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "metadata": [ + { + "identifier": "6e884096-20f3-4298-9463-19b7d39c1224", + "type": "LOGICAL_TABLE" + } + ], + "tag_identifiers": [ + "lNzhcnDdWjZqadt", + "bDpHjFKgKmbxPAa", + "ELaTqyTMZKUtbwq" + ] + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/tags/unassign", + "operationId": "unassignTag", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 1197 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "metadata": [ + { + "identifier": "6e884096-20f3-4298-9463-19b7d39c1224", + "type": "LOGICAL_TABLE" + } + ], + "tag_identifiers": [ + "oXeWrQZIjvGfAMk", + "fzBUPhDVLGAuENi", + "XILlzRtLIOtPZtF" + ] + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/tags/unassign", + "operationId": "unassignTag", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 1198 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "metadata": [ + { + "identifier": "6e884096-20f3-4298-9463-19b7d39c1224", + "type": "LOGICAL_TABLE" + }, + { + "identifier": "c836ad16-660d-4d28-a3a0-e07cb9eb6ab1", + "type": "LIVEBOARD" + }, + { + "identifier": "e36ee65e-64be-436b-a29a-22d8998c4fae", + "type": "LIVEBOARD" + } + ], + "tag_identifiers": [ + "bQeTGIOpwQiSezA", + "oopKqrQsJTJQWyn", + "hSrsuUWSJRLbaEV" + ] + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/tags/unassign", + "operationId": "unassignTag", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 1199 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "metadata": [ + { + "identifier": "6e884096-20f3-4298-9463-19b7d39c1224", + "type": "LOGICAL_TABLE" + }, + { + "identifier": "c836ad16-660d-4d28-a3a0-e07cb9eb6ab1", + "type": "LIVEBOARD" + }, + { + "identifier": "e36ee65e-64be-436b-a29a-22d8998c4fae", + "type": "LIVEBOARD" + } + ], + "tag_identifiers": [ + "uBpLgvYCdeBNMCC", + "bquceDlvJLNkDqK", + "LAponLnlOmSUefB" + ] + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/tags/unassign", + "operationId": "unassignTag", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 1200 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "metadata": [ + { + "identifier": "6e884096-20f3-4298-9463-19b7d39c1224", + "type": "LOGICAL_TABLE" + }, + { + "identifier": "c836ad16-660d-4d28-a3a0-e07cb9eb6ab1", + "type": "LIVEBOARD" + }, + { + "identifier": "e36ee65e-64be-436b-a29a-22d8998c4fae", + "type": "LIVEBOARD" + } + ], + "tag_identifiers": [ + "mMLfzNHfNuPGMml" + ] + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/tags/unassign", + "operationId": "unassignTag", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 1201 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "metadata": [ + { + "identifier": "6e884096-20f3-4298-9463-19b7d39c1224", + "type": "LOGICAL_TABLE" + }, + { + "identifier": "c836ad16-660d-4d28-a3a0-e07cb9eb6ab1", + "type": "LIVEBOARD" + } + ], + "tag_identifiers": [ + "lBTvnvqUSQPzKxO" + ] + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/tags/unassign", + "operationId": "unassignTag", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 1202 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "metadata": [ + { + "identifier": "6e884096-20f3-4298-9463-19b7d39c1224", + "type": "LOGICAL_TABLE" + }, + { + "identifier": "c836ad16-660d-4d28-a3a0-e07cb9eb6ab1", + "type": "LIVEBOARD" + }, + { + "identifier": "e36ee65e-64be-436b-a29a-22d8998c4fae", + "type": "LIVEBOARD" + } + ], + "tag_identifiers": [ + "YfXkRRKSQFjrdIv", + "LnstEsqxTcoamAs", + "mHmjAZuyRkPGPWo" + ] + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/tags/unassign", + "operationId": "unassignTag", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 1203 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "metadata": [ + { + "identifier": "6e884096-20f3-4298-9463-19b7d39c1224", + "type": "LOGICAL_TABLE" + }, + { + "identifier": "c836ad16-660d-4d28-a3a0-e07cb9eb6ab1", + "type": "LIVEBOARD" + }, + { + "identifier": "e36ee65e-64be-436b-a29a-22d8998c4fae", + "type": "LIVEBOARD" + } + ], + "tag_identifiers": [ + "oDekraFTeaWFybH", + "PczHcpJeqzheatI" + ] + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/tags/unassign", + "operationId": "unassignTag", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 1204 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "metadata": [ + { + "identifier": "6e884096-20f3-4298-9463-19b7d39c1224", + "type": "LOGICAL_TABLE" + } + ], + "tag_identifiers": [ + "BnLHlbNrmLWMDTV", + "DnvfTBJSxDOboSC", + "sHsAFmbLntWrGfn" + ] + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/tags/unassign", + "operationId": "unassignTag", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 1205 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "metadata": [ + { + "identifier": "6e884096-20f3-4298-9463-19b7d39c1224", + "type": "LOGICAL_TABLE" + }, + { + "identifier": "c836ad16-660d-4d28-a3a0-e07cb9eb6ab1", + "type": "LIVEBOARD" + } + ], + "tag_identifiers": [ + "HfpUClGWTWZgYcZ", + "iGZFlwjxdyHNaFr" + ] + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/tags/search", + "operationId": "searchTags", + "scenario": "positive", + "type": "AUTOMATIC", + "testId": 1206 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": {} + }, + { + "Metadata": { + "path": "/api/rest/2.0/tags/search", + "operationId": "searchTags", + "scenario": "positive", + "type": "AUTOMATIC", + "testId": 1207 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": {} + }, + { + "Metadata": { + "path": "/api/rest/2.0/tags/search", + "operationId": "searchTags", + "scenario": "positive", + "type": "AUTOMATIC", + "testId": 1208 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": {} + }, + { + "Metadata": { + "path": "/api/rest/2.0/tags/search", + "operationId": "searchTags", + "scenario": "positive", + "type": "AUTOMATIC", + "testId": 1209 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "color": "#62787b" + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/tags/search", + "operationId": "searchTags", + "scenario": "positive", + "type": "AUTOMATIC", + "testId": 1210 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "tag_identifier": "pede1688027229855", + "color": "#96a51d" + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/tags/search", + "operationId": "searchTags", + "scenario": "positive", + "type": "AUTOMATIC", + "testId": 1211 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": {} + }, + { + "Metadata": { + "path": "/api/rest/2.0/tags/search", + "operationId": "searchTags", + "scenario": "positive", + "type": "AUTOMATIC", + "testId": 1212 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": {} + }, + { + "Metadata": { + "path": "/api/rest/2.0/tags/search", + "operationId": "searchTags", + "scenario": "positive", + "type": "AUTOMATIC", + "testId": 1213 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "tag_identifier": "msollime7" + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/tags/search", + "operationId": "searchTags", + "scenario": "positive", + "type": "AUTOMATIC", + "testId": 1214 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "tag_identifier": "mauris ullamcorper1688027229857", + "color": "#e22df6" + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/tags/search", + "operationId": "searchTags", + "scenario": "positive", + "type": "AUTOMATIC", + "testId": 1215 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "tag_identifier": "sskeat9" + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/tags/search", + "operationId": "searchTags", + "scenario": "positive", + "type": "AUTOMATIC", + "testId": 1216 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": {} + }, + { + "Metadata": { + "path": "/api/rest/2.0/tags/search", + "operationId": "searchTags", + "scenario": "positive", + "type": "AUTOMATIC", + "testId": 1217 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "tag_identifier": "cursus id1688027229858", + "color": "#44d167" + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/tags/search", + "operationId": "searchTags", + "scenario": "positive", + "type": "AUTOMATIC", + "testId": 1218 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "tag_identifier": "rhoncus1688027229859", + "color": "#8f9931" + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/tags/search", + "operationId": "searchTags", + "scenario": "positive", + "type": "AUTOMATIC", + "testId": 1219 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "color": "#62787b" + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/tags/search", + "operationId": "searchTags", + "scenario": "positive", + "type": "AUTOMATIC", + "testId": 1220 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "tag_identifier": "neque1688027229860", + "color": "#96a51d" + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/tags/search", + "operationId": "searchTags", + "scenario": "positive", + "type": "AUTOMATIC", + "testId": 1221 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": {} + }, + { + "Metadata": { + "path": "/api/rest/2.0/tags/search", + "operationId": "searchTags", + "scenario": "positive", + "type": "AUTOMATIC", + "testId": 1222 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "color": "#6e487b" + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/tags/search", + "operationId": "searchTags", + "scenario": "positive", + "type": "AUTOMATIC", + "testId": 1223 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": {} + }, + { + "Metadata": { + "path": "/api/rest/2.0/tags/search", + "operationId": "searchTags", + "scenario": "positive", + "type": "AUTOMATIC", + "testId": 1224 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": {} + }, + { + "Metadata": { + "path": "/api/rest/2.0/tags/search", + "operationId": "searchTags", + "scenario": "positive", + "type": "AUTOMATIC", + "testId": 1225 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": {} + }, + { + "Metadata": { + "path": "/api/rest/2.0/tags/search", + "operationId": "searchTags", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 1226 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "tag_identifier": "rhoncus1688027229859", + "color": [ + "#8f9931" + ] + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/tags/search", + "operationId": "searchTags", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 1227 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "tag_identifier": "pede1688027229855", + "color": [ + "#96a51d" + ] + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/tags/search", + "operationId": "searchTags", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 1228 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "tag_identifier": [ + "cursus", + "id1688027229858" + ], + "color": "#44d167" + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/tags/search", + "operationId": "searchTags", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 1229 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "color": [ + "#62787b" + ] + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/tags/search", + "operationId": "searchTags", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 1230 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "color": [ + "#62787b" + ] + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/tags/search", + "operationId": "searchTags", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 1231 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "tag_identifier": [ + "sskeat9" + ] + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/tags/search", + "operationId": "searchTags", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 1232 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "tag_identifier": [ + "cursus", + "id1688027229858" + ], + "color": "#44d167" + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/tags/search", + "operationId": "searchTags", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 1233 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "tag_identifier": [ + "cursus", + "id1688027229858" + ], + "color": "#44d167" + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/tags/search", + "operationId": "searchTags", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 1234 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "tag_identifier": "pede1688027229855", + "color": [ + "#96a51d" + ] + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/groups/create", + "operationId": "createUserGroup", + "scenario": "positive", + "type": "AUTOMATIC", + "testId": 1235 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "name": "Natassia Geertz1688027238969", + "display_name": "Natassia", + "description": "error: undefined method `/' for nil:NilClass", + "sub_group_identifiers": [], + "type": "LOCAL_GROUP", + "user_identifiers": [ + "3b4740ec-3626-4d54-8b7e-ebda45510fb6", + "994cdad7-2143-4936-a35f-8dd0f852e4d6", + "5dc626e5-1921-4758-a7bf-8501605aa59f" + ], + "group_identifiers": [] + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/groups/create", + "operationId": "createUserGroup", + "scenario": "positive", + "type": "AUTOMATIC", + "testId": 1236 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "name": "Danna Stopps1688027238995", + "display_name": "Danna", + "sub_group_identifiers": [ + "Natassia Geertz1688027238969", + "Natassia Geertz1688027238969" + ], + "type": "LOCAL_GROUP", + "user_identifiers": [ + "3b4740ec-3626-4d54-8b7e-ebda45510fb6", + "994cdad7-2143-4936-a35f-8dd0f852e4d6", + "5dc626e5-1921-4758-a7bf-8501605aa59f" + ], + "default_liveboard_identifiers": [ + "e36ee65e-64be-436b-a29a-22d8998c4fae", + "327f4d60-c502-43b0-b1d4-c73df5031a2e", + "2ff57a24-cf90-485f-8b4b-45fc17474c6f" + ] + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/groups/create", + "operationId": "createUserGroup", + "scenario": "positive", + "type": "AUTOMATIC", + "testId": 1237 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "name": "Cybil Bolduc1688027238998", + "display_name": "Cybil", + "description": "error: undefined method `/' for nil:NilClass", + "privileges": null, + "visibility": "SHARABLE", + "role_identifiers": [ + "c21686a7-686c-468f-a2a2-8e7ce0b6f0f7" + ], + "default_liveboard_identifiers": [ + "e36ee65e-64be-436b-a29a-22d8998c4fae", + "327f4d60-c502-43b0-b1d4-c73df5031a2e", + "2ff57a24-cf90-485f-8b4b-45fc17474c6f" + ] + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/groups/create", + "operationId": "createUserGroup", + "scenario": "positive", + "type": "AUTOMATIC", + "testId": 1238 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "name": "Brana Ducastel1688027239002", + "display_name": "Brana", + "description": "error: undefined method `/' for nil:NilClass", + "privileges": null, + "user_identifiers": [ + "3b4740ec-3626-4d54-8b7e-ebda45510fb6", + "994cdad7-2143-4936-a35f-8dd0f852e4d6" + ], + "visibility": "NON_SHARABLE", + "role_identifiers": [ + "c21686a7-686c-468f-a2a2-8e7ce0b6f0f7", + "3eee6388-030a-4a11-8f2f-ea5a70ca6a9e", + "84d12fa8-f88b-4171-bb2a-26ab1bd68e6e" + ] + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/groups/create", + "operationId": "createUserGroup", + "scenario": "positive", + "type": "AUTOMATIC", + "testId": 1239 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "name": "Rayshell McKerron1688027239005", + "display_name": "Rayshell", + "sub_group_identifiers": [ + "Natassia Geertz1688027238969" + ], + "type": "LDAP_GROUP", + "user_identifiers": [ + "3b4740ec-3626-4d54-8b7e-ebda45510fb6" + ], + "visibility": "NON_SHARABLE", + "role_identifiers": [ + "c21686a7-686c-468f-a2a2-8e7ce0b6f0f7", + "3eee6388-030a-4a11-8f2f-ea5a70ca6a9e", + "84d12fa8-f88b-4171-bb2a-26ab1bd68e6e" + ], + "default_liveboard_identifiers": [ + "e36ee65e-64be-436b-a29a-22d8998c4fae", + "327f4d60-c502-43b0-b1d4-c73df5031a2e" + ] + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/groups/create", + "operationId": "createUserGroup", + "scenario": "positive", + "type": "AUTOMATIC", + "testId": 1240 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "name": "Irina Bromwich1688027239008", + "display_name": "Irina", + "description": "error: undefined method `/' for nil:NilClass", + "sub_group_identifiers": [ + "Natassia Geertz1688027238969" + ], + "type": "LDAP_GROUP", + "role_identifiers": [ + "c21686a7-686c-468f-a2a2-8e7ce0b6f0f7" + ] + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/groups/create", + "operationId": "createUserGroup", + "scenario": "positive", + "type": "AUTOMATIC", + "testId": 1241 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "name": "Rickard Sibbald1688027239010", + "display_name": "Rickard", + "description": "error: undefined method `/' for nil:NilClass", + "type": "LDAP_GROUP", + "user_identifiers": [ + "3b4740ec-3626-4d54-8b7e-ebda45510fb6" + ], + "role_identifiers": [ + "c21686a7-686c-468f-a2a2-8e7ce0b6f0f7", + "3eee6388-030a-4a11-8f2f-ea5a70ca6a9e" + ] + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/groups/create", + "operationId": "createUserGroup", + "scenario": "positive", + "type": "AUTOMATIC", + "testId": 1242 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "name": "Bernette Curthoys1688027239012", + "display_name": "Bernette", + "privileges": null, + "type": "LDAP_GROUP", + "user_identifiers": [ + "3b4740ec-3626-4d54-8b7e-ebda45510fb6" + ], + "default_liveboard_identifiers": [ + "e36ee65e-64be-436b-a29a-22d8998c4fae" + ] + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/groups/create", + "operationId": "createUserGroup", + "scenario": "positive", + "type": "AUTOMATIC", + "testId": 1243 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "name": "Warden Pelz1688027239013", + "display_name": "Warden", + "type": "LDAP_GROUP", + "user_identifiers": [ + "3b4740ec-3626-4d54-8b7e-ebda45510fb6", + "994cdad7-2143-4936-a35f-8dd0f852e4d6", + "5dc626e5-1921-4758-a7bf-8501605aa59f" + ], + "visibility": "SHARABLE", + "default_liveboard_identifiers": [ + "e36ee65e-64be-436b-a29a-22d8998c4fae", + "327f4d60-c502-43b0-b1d4-c73df5031a2e", + "2ff57a24-cf90-485f-8b4b-45fc17474c6f" + ] + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/groups/create", + "operationId": "createUserGroup", + "scenario": "positive", + "type": "AUTOMATIC", + "testId": 1244 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "name": "Hansiain Capoun1688027239015", + "display_name": "Hansiain", + "visibility": "NON_SHARABLE", + "role_identifiers": [ + "c21686a7-686c-468f-a2a2-8e7ce0b6f0f7", + "3eee6388-030a-4a11-8f2f-ea5a70ca6a9e", + "84d12fa8-f88b-4171-bb2a-26ab1bd68e6e" + ] + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/groups/create", + "operationId": "createUserGroup", + "scenario": "positive", + "type": "AUTOMATIC", + "testId": 1245 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "name": "Sacha Piffe1688027239017", + "display_name": "Sacha", + "description": "error: undefined method `/' for nil:NilClass", + "sub_group_identifiers": [ + "Natassia Geertz1688027238969", + "Danna Stopps1688027238995" + ], + "user_identifiers": [ + "3b4740ec-3626-4d54-8b7e-ebda45510fb6", + "994cdad7-2143-4936-a35f-8dd0f852e4d6", + "5dc626e5-1921-4758-a7bf-8501605aa59f" + ], + "visibility": "NON_SHARABLE", + "role_identifiers": [ + "c21686a7-686c-468f-a2a2-8e7ce0b6f0f7", + "3eee6388-030a-4a11-8f2f-ea5a70ca6a9e" + ], + "default_liveboard_identifiers": [ + "e36ee65e-64be-436b-a29a-22d8998c4fae" + ] + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/groups/create", + "operationId": "createUserGroup", + "scenario": "positive", + "type": "AUTOMATIC", + "testId": 1246 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "name": "Jackelyn Luker1688027239019", + "display_name": "Jackelyn", + "description": "error: undefined method `/' for nil:NilClass", + "privileges": null, + "sub_group_identifiers": [ + "Natassia Geertz1688027238969", + "Danna Stopps1688027238995", + "Cybil Bolduc1688027238998" + ], + "type": "LDAP_GROUP", + "user_identifiers": [ + "3b4740ec-3626-4d54-8b7e-ebda45510fb6", + "994cdad7-2143-4936-a35f-8dd0f852e4d6" + ], + "visibility": "NON_SHARABLE", + "default_liveboard_identifiers": [ + "e36ee65e-64be-436b-a29a-22d8998c4fae" + ] + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/groups/create", + "operationId": "createUserGroup", + "scenario": "positive", + "type": "AUTOMATIC", + "testId": 1247 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "name": "Kare Buy1688027239021", + "display_name": "Kare", + "privileges": null, + "type": "LOCAL_GROUP", + "visibility": "NON_SHARABLE" + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/groups/create", + "operationId": "createUserGroup", + "scenario": "positive", + "type": "AUTOMATIC", + "testId": 1248 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "name": "Kenyon Killen1688027239022", + "display_name": "Kenyon", + "description": "error: undefined method `/' for nil:NilClass", + "privileges": null, + "sub_group_identifiers": [ + "Natassia Geertz1688027238969" + ], + "user_identifiers": [ + "3b4740ec-3626-4d54-8b7e-ebda45510fb6", + "994cdad7-2143-4936-a35f-8dd0f852e4d6", + "5dc626e5-1921-4758-a7bf-8501605aa59f" + ] + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/groups/create", + "operationId": "createUserGroup", + "scenario": "positive", + "type": "AUTOMATIC", + "testId": 1249 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "name": "Lilyan Ongin1688027239024", + "display_name": "Lilyan", + "sub_group_identifiers": [ + "Natassia Geertz1688027238969", + "Danna Stopps1688027238995", + "Cybil Bolduc1688027238998" + ], + "type": "LOCAL_GROUP", + "user_identifiers": [ + "3b4740ec-3626-4d54-8b7e-ebda45510fb6", + "994cdad7-2143-4936-a35f-8dd0f852e4d6", + "5dc626e5-1921-4758-a7bf-8501605aa59f" + ] + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/groups/create", + "operationId": "createUserGroup", + "scenario": "positive", + "type": "AUTOMATIC", + "testId": 1250 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "name": "Filmer Ridesdale1688027239026", + "display_name": "Filmer", + "description": "error: undefined method `/' for nil:NilClass", + "visibility": "NON_SHARABLE", + "default_liveboard_identifiers": [ + "e36ee65e-64be-436b-a29a-22d8998c4fae", + "327f4d60-c502-43b0-b1d4-c73df5031a2e" + ] + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/groups/create", + "operationId": "createUserGroup", + "scenario": "positive", + "type": "AUTOMATIC", + "testId": 1251 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "name": "Tarra Kissack1688027239027", + "display_name": "Tarra", + "description": "error: undefined method `/' for nil:NilClass", + "sub_group_identifiers": [ + "Natassia Geertz1688027238969", + "Danna Stopps1688027238995", + "Cybil Bolduc1688027238998" + ], + "type": "LDAP_GROUP", + "user_identifiers": [ + "3b4740ec-3626-4d54-8b7e-ebda45510fb6" + ], + "role_identifiers": [ + "c21686a7-686c-468f-a2a2-8e7ce0b6f0f7", + "3eee6388-030a-4a11-8f2f-ea5a70ca6a9e", + "84d12fa8-f88b-4171-bb2a-26ab1bd68e6e" + ] + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/groups/create", + "operationId": "createUserGroup", + "scenario": "positive", + "type": "AUTOMATIC", + "testId": 1252 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "name": "Brittani Thames1688027239029", + "display_name": "Brittani", + "privileges": null, + "user_identifiers": [ + "3b4740ec-3626-4d54-8b7e-ebda45510fb6" + ], + "visibility": "NON_SHARABLE", + "role_identifiers": [ + "c21686a7-686c-468f-a2a2-8e7ce0b6f0f7" + ], + "default_liveboard_identifiers": [ + "e36ee65e-64be-436b-a29a-22d8998c4fae" + ] + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/groups/create", + "operationId": "createUserGroup", + "scenario": "positive", + "type": "AUTOMATIC", + "testId": 1253 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "name": "Elena Byatt1688027239031", + "display_name": "Elena", + "privileges": null, + "role_identifiers": [ + "c21686a7-686c-468f-a2a2-8e7ce0b6f0f7", + "3eee6388-030a-4a11-8f2f-ea5a70ca6a9e" + ], + "default_liveboard_identifiers": [ + "e36ee65e-64be-436b-a29a-22d8998c4fae", + "327f4d60-c502-43b0-b1d4-c73df5031a2e", + "2ff57a24-cf90-485f-8b4b-45fc17474c6f" + ] + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/groups/create", + "operationId": "createUserGroup", + "scenario": "positive", + "type": "AUTOMATIC", + "testId": 1254 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "name": "Isadora Cowsby1688027239033", + "display_name": "Isadora", + "privileges": null, + "sub_group_identifiers": [ + "Natassia Geertz1688027238969" + ], + "user_identifiers": [ + "3b4740ec-3626-4d54-8b7e-ebda45510fb6", + "994cdad7-2143-4936-a35f-8dd0f852e4d6" + ] + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/groups/create", + "operationId": "createUserGroup", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 1255 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "name": "Lilyan Ongin1688027239024", + "display_name": null, + "sub_group_identifiers": [ + "Natassia Geertz1688027238969", + "Danna Stopps1688027238995", + "Cybil Bolduc1688027238998" + ], + "type": "LOCAL_GROUP", + "user_identifiers": [ + "3b4740ec-3626-4d54-8b7e-ebda45510fb6", + "994cdad7-2143-4936-a35f-8dd0f852e4d6", + "5dc626e5-1921-4758-a7bf-8501605aa59f" + ] + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/groups/create", + "operationId": "createUserGroup", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 1256 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "name": "Tarra Kissack1688027239027", + "display_name": null, + "description": "error: undefined method `/' for nil:NilClass", + "sub_group_identifiers": [ + "Natassia Geertz1688027238969", + "Danna Stopps1688027238995", + "Cybil Bolduc1688027238998" + ], + "type": "LDAP_GROUP", + "user_identifiers": [ + "3b4740ec-3626-4d54-8b7e-ebda45510fb6" + ], + "role_identifiers": [ + "c21686a7-686c-468f-a2a2-8e7ce0b6f0f7", + "3eee6388-030a-4a11-8f2f-ea5a70ca6a9e", + "84d12fa8-f88b-4171-bb2a-26ab1bd68e6e" + ] + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/groups/create", + "operationId": "createUserGroup", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 1257 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "name": "Danna Stopps1688027238995", + "display_name": null, + "sub_group_identifiers": [ + "Natassia Geertz1688027238969", + "Natassia Geertz1688027238969" + ], + "type": "LOCAL_GROUP", + "user_identifiers": [ + "3b4740ec-3626-4d54-8b7e-ebda45510fb6", + "994cdad7-2143-4936-a35f-8dd0f852e4d6", + "5dc626e5-1921-4758-a7bf-8501605aa59f" + ], + "default_liveboard_identifiers": [ + "e36ee65e-64be-436b-a29a-22d8998c4fae", + "327f4d60-c502-43b0-b1d4-c73df5031a2e", + "2ff57a24-cf90-485f-8b4b-45fc17474c6f" + ] + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/groups/create", + "operationId": "createUserGroup", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 1258 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "name": null, + "display_name": "Kenyon", + "description": "error: undefined method `/' for nil:NilClass", + "privileges": null, + "sub_group_identifiers": [ + "Natassia Geertz1688027238969" + ], + "user_identifiers": [ + "3b4740ec-3626-4d54-8b7e-ebda45510fb6", + "994cdad7-2143-4936-a35f-8dd0f852e4d6", + "5dc626e5-1921-4758-a7bf-8501605aa59f" + ] + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/groups/create", + "operationId": "createUserGroup", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 1259 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "name": "Irina Bromwich1688027239008", + "display_name": null, + "description": "error: undefined method `/' for nil:NilClass", + "sub_group_identifiers": [ + "Natassia Geertz1688027238969" + ], + "type": "LDAP_GROUP", + "role_identifiers": [ + "c21686a7-686c-468f-a2a2-8e7ce0b6f0f7" + ] + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/groups/create", + "operationId": "createUserGroup", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 1260 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "name": "Danna Stopps1688027238995", + "display_name": null, + "sub_group_identifiers": [ + "Natassia Geertz1688027238969", + "Natassia Geertz1688027238969" + ], + "type": "LOCAL_GROUP", + "user_identifiers": [ + "3b4740ec-3626-4d54-8b7e-ebda45510fb6", + "994cdad7-2143-4936-a35f-8dd0f852e4d6", + "5dc626e5-1921-4758-a7bf-8501605aa59f" + ], + "default_liveboard_identifiers": [ + "e36ee65e-64be-436b-a29a-22d8998c4fae", + "327f4d60-c502-43b0-b1d4-c73df5031a2e", + "2ff57a24-cf90-485f-8b4b-45fc17474c6f" + ] + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/groups/create", + "operationId": "createUserGroup", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 1261 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "name": "Irina Bromwich1688027239008", + "display_name": null, + "description": "error: undefined method `/' for nil:NilClass", + "sub_group_identifiers": [ + "Natassia Geertz1688027238969" + ], + "type": "LDAP_GROUP", + "role_identifiers": [ + "c21686a7-686c-468f-a2a2-8e7ce0b6f0f7" + ] + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/groups/create", + "operationId": "createUserGroup", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 1262 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "name": "Isadora Cowsby1688027239033", + "display_name": null, + "privileges": null, + "sub_group_identifiers": [ + "Natassia Geertz1688027238969" + ], + "user_identifiers": [ + "3b4740ec-3626-4d54-8b7e-ebda45510fb6", + "994cdad7-2143-4936-a35f-8dd0f852e4d6" + ] + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/groups/create", + "operationId": "createUserGroup", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 1263 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "name": null, + "display_name": "Jackelyn", + "description": "error: undefined method `/' for nil:NilClass", + "privileges": null, + "sub_group_identifiers": [ + "Natassia Geertz1688027238969", + "Danna Stopps1688027238995", + "Cybil Bolduc1688027238998" + ], + "type": "LDAP_GROUP", + "user_identifiers": [ + "3b4740ec-3626-4d54-8b7e-ebda45510fb6", + "994cdad7-2143-4936-a35f-8dd0f852e4d6" + ], + "visibility": "NON_SHARABLE", + "default_liveboard_identifiers": [ + "e36ee65e-64be-436b-a29a-22d8998c4fae" + ] + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/groups/create", + "operationId": "createUserGroup", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 1264 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "name": "Natassia Geertz1688027238969", + "display_name": null, + "description": "error: undefined method `/' for nil:NilClass", + "sub_group_identifiers": [], + "type": "LOCAL_GROUP", + "user_identifiers": [ + "3b4740ec-3626-4d54-8b7e-ebda45510fb6", + "994cdad7-2143-4936-a35f-8dd0f852e4d6", + "5dc626e5-1921-4758-a7bf-8501605aa59f" + ], + "group_identifiers": [] + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/groups/create", + "operationId": "createUserGroup", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 1265 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "name": null, + "display_name": "Warden", + "type": "LDAP_GROUP", + "user_identifiers": [ + "3b4740ec-3626-4d54-8b7e-ebda45510fb6", + "994cdad7-2143-4936-a35f-8dd0f852e4d6", + "5dc626e5-1921-4758-a7bf-8501605aa59f" + ], + "visibility": "SHARABLE", + "default_liveboard_identifiers": [ + "e36ee65e-64be-436b-a29a-22d8998c4fae", + "327f4d60-c502-43b0-b1d4-c73df5031a2e", + "2ff57a24-cf90-485f-8b4b-45fc17474c6f" + ] + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/groups/create", + "operationId": "createUserGroup", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 1266 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "name": "Rayshell McKerron1688027239005", + "display_name": null, + "sub_group_identifiers": [ + "Natassia Geertz1688027238969" + ], + "type": "LDAP_GROUP", + "user_identifiers": [ + "3b4740ec-3626-4d54-8b7e-ebda45510fb6" + ], + "visibility": "NON_SHARABLE", + "role_identifiers": [ + "c21686a7-686c-468f-a2a2-8e7ce0b6f0f7", + "3eee6388-030a-4a11-8f2f-ea5a70ca6a9e", + "84d12fa8-f88b-4171-bb2a-26ab1bd68e6e" + ], + "default_liveboard_identifiers": [ + "e36ee65e-64be-436b-a29a-22d8998c4fae", + "327f4d60-c502-43b0-b1d4-c73df5031a2e" + ] + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/groups/create", + "operationId": "createUserGroup", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 1267 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "name": null, + "display_name": "Kare", + "privileges": null, + "type": "LOCAL_GROUP", + "visibility": "NON_SHARABLE" + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/groups/create", + "operationId": "createUserGroup", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 1268 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "name": null, + "display_name": "Brana", + "description": "error: undefined method `/' for nil:NilClass", + "privileges": null, + "user_identifiers": [ + "3b4740ec-3626-4d54-8b7e-ebda45510fb6", + "994cdad7-2143-4936-a35f-8dd0f852e4d6" + ], + "visibility": "NON_SHARABLE", + "role_identifiers": [ + "c21686a7-686c-468f-a2a2-8e7ce0b6f0f7", + "3eee6388-030a-4a11-8f2f-ea5a70ca6a9e", + "84d12fa8-f88b-4171-bb2a-26ab1bd68e6e" + ] + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/groups/create", + "operationId": "createUserGroup", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 1269 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "name": "Hansiain Capoun1688027239015", + "display_name": null, + "visibility": "NON_SHARABLE", + "role_identifiers": [ + "c21686a7-686c-468f-a2a2-8e7ce0b6f0f7", + "3eee6388-030a-4a11-8f2f-ea5a70ca6a9e", + "84d12fa8-f88b-4171-bb2a-26ab1bd68e6e" + ] + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/groups/create", + "operationId": "createUserGroup", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 1270 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "name": "Hansiain Capoun1688027239015", + "display_name": [ + "Hansiain" + ], + "visibility": "NON_SHARABLE", + "role_identifiers": [ + "c21686a7-686c-468f-a2a2-8e7ce0b6f0f7", + "3eee6388-030a-4a11-8f2f-ea5a70ca6a9e", + "84d12fa8-f88b-4171-bb2a-26ab1bd68e6e" + ] + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/groups/create", + "operationId": "createUserGroup", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 1271 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "name": "Jackelyn Luker1688027239019", + "display_name": "Jackelyn", + "description": "error: undefined method `/' for nil:NilClass", + "privileges": null, + "sub_group_identifiers": [ + "Natassia Geertz1688027238969", + "Danna Stopps1688027238995", + "Cybil Bolduc1688027238998" + ], + "type": "LDAP_GROUP", + "user_identifiers": [ + "3b4740ec-3626-4d54-8b7e-ebda45510fb6", + "994cdad7-2143-4936-a35f-8dd0f852e4d6" + ], + "visibility": [ + "NON_SHARABLE" + ], + "default_liveboard_identifiers": [ + "e36ee65e-64be-436b-a29a-22d8998c4fae" + ] + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/groups/create", + "operationId": "createUserGroup", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 1272 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "name": "Rayshell McKerron1688027239005", + "display_name": "Rayshell", + "sub_group_identifiers": "vkMpMFqXajAknLd", + "type": "LDAP_GROUP", + "user_identifiers": [ + "3b4740ec-3626-4d54-8b7e-ebda45510fb6" + ], + "visibility": "NON_SHARABLE", + "role_identifiers": [ + "c21686a7-686c-468f-a2a2-8e7ce0b6f0f7", + "3eee6388-030a-4a11-8f2f-ea5a70ca6a9e", + "84d12fa8-f88b-4171-bb2a-26ab1bd68e6e" + ], + "default_liveboard_identifiers": [ + "e36ee65e-64be-436b-a29a-22d8998c4fae", + "327f4d60-c502-43b0-b1d4-c73df5031a2e" + ] + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/groups/create", + "operationId": "createUserGroup", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 1273 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "name": "Lilyan Ongin1688027239024", + "display_name": "Lilyan", + "sub_group_identifiers": [ + "Natassia Geertz1688027238969", + "Danna Stopps1688027238995", + "Cybil Bolduc1688027238998" + ], + "type": [ + "LOCAL_GROUP" + ], + "user_identifiers": [ + "3b4740ec-3626-4d54-8b7e-ebda45510fb6", + "994cdad7-2143-4936-a35f-8dd0f852e4d6", + "5dc626e5-1921-4758-a7bf-8501605aa59f" + ] + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/groups/create", + "operationId": "createUserGroup", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 1274 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "name": "Kenyon Killen1688027239022", + "display_name": "Kenyon", + "description": "error: undefined method `/' for nil:NilClass", + "privileges": null, + "sub_group_identifiers": [ + "Natassia Geertz1688027238969" + ], + "user_identifiers": "lDlXtFdbDWKvhvK" + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/groups/create", + "operationId": "createUserGroup", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 1275 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "name": [ + "Irina", + "Bromwich1688027239008" + ], + "display_name": "Irina", + "description": "error: undefined method `/' for nil:NilClass", + "sub_group_identifiers": [ + "Natassia Geertz1688027238969" + ], + "type": "LDAP_GROUP", + "role_identifiers": [ + "c21686a7-686c-468f-a2a2-8e7ce0b6f0f7" + ] + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/groups/create", + "operationId": "createUserGroup", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 1276 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "name": "Brittani Thames1688027239029", + "display_name": "Brittani", + "privileges": null, + "user_identifiers": [ + "3b4740ec-3626-4d54-8b7e-ebda45510fb6" + ], + "visibility": "NON_SHARABLE", + "role_identifiers": "vymDyjUPeEDUoKE", + "default_liveboard_identifiers": [ + "e36ee65e-64be-436b-a29a-22d8998c4fae" + ] + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/groups/create", + "operationId": "createUserGroup", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 1277 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "name": "Natassia Geertz1688027238969", + "display_name": "Natassia", + "description": "error: undefined method `/' for nil:NilClass", + "sub_group_identifiers": [], + "type": [ + "LOCAL_GROUP" + ], + "user_identifiers": [ + "3b4740ec-3626-4d54-8b7e-ebda45510fb6", + "994cdad7-2143-4936-a35f-8dd0f852e4d6", + "5dc626e5-1921-4758-a7bf-8501605aa59f" + ], + "group_identifiers": [] + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/groups/create", + "operationId": "createUserGroup", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 1278 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "name": "Cybil Bolduc1688027238998", + "display_name": "Cybil", + "description": [ + "error:", + "undefined", + "method", + "`/'", + "for", + "nil:NilClass" + ], + "privileges": null, + "visibility": "SHARABLE", + "role_identifiers": [ + "c21686a7-686c-468f-a2a2-8e7ce0b6f0f7" + ], + "default_liveboard_identifiers": [ + "e36ee65e-64be-436b-a29a-22d8998c4fae", + "327f4d60-c502-43b0-b1d4-c73df5031a2e", + "2ff57a24-cf90-485f-8b4b-45fc17474c6f" + ] + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/groups/create", + "operationId": "createUserGroup", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 1279 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "name": "Isadora Cowsby1688027239033", + "display_name": [ + "Isadora" + ], + "privileges": null, + "sub_group_identifiers": [ + "Natassia Geertz1688027238969" + ], + "user_identifiers": [ + "3b4740ec-3626-4d54-8b7e-ebda45510fb6", + "994cdad7-2143-4936-a35f-8dd0f852e4d6" + ] + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/groups/create", + "operationId": "createUserGroup", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 1280 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "name": [ + "Brana", + "Ducastel1688027239002" + ], + "display_name": "Brana", + "description": "error: undefined method `/' for nil:NilClass", + "privileges": null, + "user_identifiers": [ + "3b4740ec-3626-4d54-8b7e-ebda45510fb6", + "994cdad7-2143-4936-a35f-8dd0f852e4d6" + ], + "visibility": "NON_SHARABLE", + "role_identifiers": [ + "c21686a7-686c-468f-a2a2-8e7ce0b6f0f7", + "3eee6388-030a-4a11-8f2f-ea5a70ca6a9e", + "84d12fa8-f88b-4171-bb2a-26ab1bd68e6e" + ] + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/groups/create", + "operationId": "createUserGroup", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 1281 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "name": "Danna Stopps1688027238995", + "display_name": "Danna", + "sub_group_identifiers": [ + "Natassia Geertz1688027238969", + "Natassia Geertz1688027238969" + ], + "type": "LOCAL_GROUP", + "user_identifiers": [ + "3b4740ec-3626-4d54-8b7e-ebda45510fb6", + "994cdad7-2143-4936-a35f-8dd0f852e4d6", + "5dc626e5-1921-4758-a7bf-8501605aa59f" + ], + "default_liveboard_identifiers": "oHtjMKbzcKakILt" + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/groups/create", + "operationId": "createUserGroup", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 1282 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "name": "Filmer Ridesdale1688027239026", + "display_name": "Filmer", + "description": "error: undefined method `/' for nil:NilClass", + "visibility": "NON_SHARABLE", + "default_liveboard_identifiers": "TltaiimtkZULjBo" + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/groups/create", + "operationId": "createUserGroup", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 1283 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "name": "Rayshell McKerron1688027239005", + "display_name": "Rayshell", + "sub_group_identifiers": [ + "Natassia Geertz1688027238969" + ], + "type": "LDAP_GROUP", + "user_identifiers": "HdWOndvPAlpcZKY", + "visibility": "NON_SHARABLE", + "role_identifiers": [ + "c21686a7-686c-468f-a2a2-8e7ce0b6f0f7", + "3eee6388-030a-4a11-8f2f-ea5a70ca6a9e", + "84d12fa8-f88b-4171-bb2a-26ab1bd68e6e" + ], + "default_liveboard_identifiers": [ + "e36ee65e-64be-436b-a29a-22d8998c4fae", + "327f4d60-c502-43b0-b1d4-c73df5031a2e" + ] + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/groups/create", + "operationId": "createUserGroup", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 1284 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "name": "Brittani Thames1688027239029", + "display_name": "Brittani", + "privileges": null, + "user_identifiers": [ + "3b4740ec-3626-4d54-8b7e-ebda45510fb6" + ], + "visibility": "NON_SHARABLE", + "role_identifiers": [ + "c21686a7-686c-468f-a2a2-8e7ce0b6f0f7" + ], + "default_liveboard_identifiers": [ + "e36ee65e-64be-436b-a29a-22d8998c4fae" + ] + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/groups/{group_identifier}/update", + "operationId": "updateUserGroup", + "scenario": "positive", + "type": "AUTOMATIC", + "testId": 1285 + }, + "Path_Variables": { + "group_identifier": "Natassia Geertz1688027238969" + }, + "Query_Variables": {}, + "Body": { + "operation": "REPLACE", + "display_name": "Rubia", + "privileges": null, + "sub_group_identifiers": [], + "user_identifiers": [ + "3b4740ec-3626-4d54-8b7e-ebda45510fb6" + ], + "role_identifiers": [ + "c21686a7-686c-468f-a2a2-8e7ce0b6f0f7", + "3eee6388-030a-4a11-8f2f-ea5a70ca6a9e", + "84d12fa8-f88b-4171-bb2a-26ab1bd68e6e" + ], + "default_liveboard_identifiers": [ + "e36ee65e-64be-436b-a29a-22d8998c4fae", + "327f4d60-c502-43b0-b1d4-c73df5031a2e", + "2ff57a24-cf90-485f-8b4b-45fc17474c6f" + ] + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/groups/{group_identifier}/update", + "operationId": "updateUserGroup", + "scenario": "positive", + "type": "AUTOMATIC", + "testId": 1286 + }, + "Path_Variables": { + "group_identifier": "Danna Stopps1688027238995" + }, + "Query_Variables": {}, + "Body": { + "description": "Pellentesque at nulla. Suspendisse potenti. Cras in purus eu magna vulputate luctus.", + "privileges": null, + "sub_group_identifiers": [ + "Natassia Geertz1688027238969", + "Natassia Geertz1688027238969", + "Natassia Geertz1688027238969" + ], + "type": "LOCAL_GROUP", + "user_identifiers": [ + "3b4740ec-3626-4d54-8b7e-ebda45510fb6", + "994cdad7-2143-4936-a35f-8dd0f852e4d6", + "5dc626e5-1921-4758-a7bf-8501605aa59f" + ], + "role_identifiers": [ + "c21686a7-686c-468f-a2a2-8e7ce0b6f0f7", + "3eee6388-030a-4a11-8f2f-ea5a70ca6a9e" + ], + "default_liveboard_identifiers": [ + "e36ee65e-64be-436b-a29a-22d8998c4fae", + "327f4d60-c502-43b0-b1d4-c73df5031a2e" + ] + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/groups/{group_identifier}/update", + "operationId": "updateUserGroup", + "scenario": "positive", + "type": "AUTOMATIC", + "testId": 1287 + }, + "Path_Variables": { + "group_identifier": "Cybil Bolduc1688027238998" + }, + "Query_Variables": {}, + "Body": { + "operation": "REPLACE", + "name": "Shayne Tewnion1688027240686", + "display_name": "Shayne", + "privileges": null, + "type": "LDAP_GROUP", + "user_identifiers": [ + "3b4740ec-3626-4d54-8b7e-ebda45510fb6", + "994cdad7-2143-4936-a35f-8dd0f852e4d6", + "5dc626e5-1921-4758-a7bf-8501605aa59f" + ], + "default_liveboard_identifiers": [ + "e36ee65e-64be-436b-a29a-22d8998c4fae" + ] + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/groups/{group_identifier}/update", + "operationId": "updateUserGroup", + "scenario": "positive", + "type": "AUTOMATIC", + "testId": 1288 + }, + "Path_Variables": { + "group_identifier": "Brana Ducastel1688027239002" + }, + "Query_Variables": {}, + "Body": { + "operation": "ADD", + "name": "Owen Hindmoor1688027240689", + "display_name": "Owen", + "privileges": null, + "user_identifiers": [ + "3b4740ec-3626-4d54-8b7e-ebda45510fb6" + ], + "visibility": "SHARABLE", + "role_identifiers": [ + "c21686a7-686c-468f-a2a2-8e7ce0b6f0f7", + "3eee6388-030a-4a11-8f2f-ea5a70ca6a9e" + ] + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/groups/{group_identifier}/update", + "operationId": "updateUserGroup", + "scenario": "positive", + "type": "AUTOMATIC", + "testId": 1289 + }, + "Path_Variables": { + "group_identifier": "Rayshell McKerron1688027239005" + }, + "Query_Variables": {}, + "Body": { + "name": "Edy Janowski1688027240691", + "privileges": null, + "sub_group_identifiers": [ + "Natassia Geertz1688027238969", + "Danna Stopps1688027238995" + ], + "type": "LOCAL_GROUP", + "user_identifiers": [ + "3b4740ec-3626-4d54-8b7e-ebda45510fb6" + ] + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/groups/{group_identifier}/update", + "operationId": "updateUserGroup", + "scenario": "positive", + "type": "AUTOMATIC", + "testId": 1290 + }, + "Path_Variables": { + "group_identifier": "Irina Bromwich1688027239008" + }, + "Query_Variables": {}, + "Body": { + "operation": "REPLACE", + "name": "Tomi Lishmund1688027240693", + "display_name": "Tomi", + "description": "Aenean lectus. Pellentesque eget nunc. Donec quis orci eget orci vehicula condimentum.", + "privileges": null, + "sub_group_identifiers": [ + "Natassia Geertz1688027238969" + ], + "user_identifiers": [ + "3b4740ec-3626-4d54-8b7e-ebda45510fb6", + "994cdad7-2143-4936-a35f-8dd0f852e4d6", + "5dc626e5-1921-4758-a7bf-8501605aa59f" + ], + "visibility": "NON_SHARABLE", + "role_identifiers": [ + "c21686a7-686c-468f-a2a2-8e7ce0b6f0f7" + ], + "default_liveboard_identifiers": [ + "e36ee65e-64be-436b-a29a-22d8998c4fae" + ] + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/groups/{group_identifier}/update", + "operationId": "updateUserGroup", + "scenario": "positive", + "type": "AUTOMATIC", + "testId": 1291 + }, + "Path_Variables": { + "group_identifier": "Rickard Sibbald1688027239010" + }, + "Query_Variables": {}, + "Body": { + "privileges": null, + "user_identifiers": [ + "3b4740ec-3626-4d54-8b7e-ebda45510fb6" + ], + "visibility": "NON_SHARABLE", + "role_identifiers": [ + "c21686a7-686c-468f-a2a2-8e7ce0b6f0f7" + ] + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/groups/{group_identifier}/update", + "operationId": "updateUserGroup", + "scenario": "positive", + "type": "AUTOMATIC", + "testId": 1292 + }, + "Path_Variables": { + "group_identifier": "Bernette Curthoys1688027239012" + }, + "Query_Variables": {}, + "Body": { + "display_name": "Frazier", + "privileges": null, + "sub_group_identifiers": [ + "Natassia Geertz1688027238969", + "Danna Stopps1688027238995" + ], + "user_identifiers": [ + "3b4740ec-3626-4d54-8b7e-ebda45510fb6" + ], + "role_identifiers": [ + "c21686a7-686c-468f-a2a2-8e7ce0b6f0f7", + "3eee6388-030a-4a11-8f2f-ea5a70ca6a9e", + "84d12fa8-f88b-4171-bb2a-26ab1bd68e6e" + ], + "default_liveboard_identifiers": [ + "e36ee65e-64be-436b-a29a-22d8998c4fae", + "327f4d60-c502-43b0-b1d4-c73df5031a2e", + "2ff57a24-cf90-485f-8b4b-45fc17474c6f" + ] + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/groups/{group_identifier}/update", + "operationId": "updateUserGroup", + "scenario": "positive", + "type": "AUTOMATIC", + "testId": 1293 + }, + "Path_Variables": { + "group_identifier": "Warden Pelz1688027239013" + }, + "Query_Variables": {}, + "Body": { + "display_name": "Willi", + "privileges": null, + "type": "LOCAL_GROUP", + "role_identifiers": [ + "c21686a7-686c-468f-a2a2-8e7ce0b6f0f7", + "3eee6388-030a-4a11-8f2f-ea5a70ca6a9e", + "84d12fa8-f88b-4171-bb2a-26ab1bd68e6e" + ], + "default_liveboard_identifiers": [ + "e36ee65e-64be-436b-a29a-22d8998c4fae", + "327f4d60-c502-43b0-b1d4-c73df5031a2e", + "2ff57a24-cf90-485f-8b4b-45fc17474c6f" + ] + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/groups/{group_identifier}/update", + "operationId": "updateUserGroup", + "scenario": "positive", + "type": "AUTOMATIC", + "testId": 1294 + }, + "Path_Variables": { + "group_identifier": "Hansiain Capoun1688027239015" + }, + "Query_Variables": {}, + "Body": { + "operation": "ADD", + "description": "In hac habitasse platea dictumst. Morbi vestibulum, velit id pretium iaculis, diam erat fermentum justo, nec condimentum neque sapien placerat ante. Nulla justo.", + "sub_group_identifiers": [ + "Natassia Geertz1688027238969", + "Danna Stopps1688027238995", + "Shayne Tewnion1688027240686" + ], + "user_identifiers": [ + "3b4740ec-3626-4d54-8b7e-ebda45510fb6", + "994cdad7-2143-4936-a35f-8dd0f852e4d6", + "5dc626e5-1921-4758-a7bf-8501605aa59f" + ], + "default_liveboard_identifiers": [ + "e36ee65e-64be-436b-a29a-22d8998c4fae", + "327f4d60-c502-43b0-b1d4-c73df5031a2e" + ] + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/groups/{group_identifier}/update", + "operationId": "updateUserGroup", + "scenario": "positive", + "type": "AUTOMATIC", + "testId": 1295 + }, + "Path_Variables": { + "group_identifier": "Sacha Piffe1688027239017" + }, + "Query_Variables": {}, + "Body": { + "operation": "REPLACE", + "privileges": null, + "type": "LDAP_GROUP", + "visibility": "NON_SHARABLE", + "role_identifiers": [ + "c21686a7-686c-468f-a2a2-8e7ce0b6f0f7", + "3eee6388-030a-4a11-8f2f-ea5a70ca6a9e", + "84d12fa8-f88b-4171-bb2a-26ab1bd68e6e" + ], + "default_liveboard_identifiers": [ + "e36ee65e-64be-436b-a29a-22d8998c4fae", + "327f4d60-c502-43b0-b1d4-c73df5031a2e" + ] + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/groups/{group_identifier}/update", + "operationId": "updateUserGroup", + "scenario": "positive", + "type": "AUTOMATIC", + "testId": 1296 + }, + "Path_Variables": { + "group_identifier": "Jackelyn Luker1688027239019" + }, + "Query_Variables": {}, + "Body": { + "operation": "REMOVE", + "name": "Caritta Joisce1688027240706", + "display_name": "Caritta", + "description": "Sed ante. Vivamus tortor. Duis mattis egestas metus.", + "privileges": null, + "sub_group_identifiers": [ + "Natassia Geertz1688027238969", + "Danna Stopps1688027238995" + ], + "user_identifiers": [ + "3b4740ec-3626-4d54-8b7e-ebda45510fb6" + ], + "default_liveboard_identifiers": [ + "e36ee65e-64be-436b-a29a-22d8998c4fae", + "327f4d60-c502-43b0-b1d4-c73df5031a2e" + ] + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/groups/{group_identifier}/update", + "operationId": "updateUserGroup", + "scenario": "positive", + "type": "AUTOMATIC", + "testId": 1297 + }, + "Path_Variables": { + "group_identifier": "Kare Buy1688027239021" + }, + "Query_Variables": {}, + "Body": { + "operation": "REPLACE", + "name": "Hazel Sturdy1688027240709", + "sub_group_identifiers": [ + "Natassia Geertz1688027238969", + "Danna Stopps1688027238995" + ], + "default_liveboard_identifiers": [ + "e36ee65e-64be-436b-a29a-22d8998c4fae" + ] + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/groups/{group_identifier}/update", + "operationId": "updateUserGroup", + "scenario": "positive", + "type": "AUTOMATIC", + "testId": 1298 + }, + "Path_Variables": { + "group_identifier": "Kenyon Killen1688027239022" + }, + "Query_Variables": {}, + "Body": { + "operation": "REPLACE", + "name": "Linnie Schult1688027240710", + "privileges": null, + "sub_group_identifiers": [ + "Natassia Geertz1688027238969", + "Danna Stopps1688027238995", + "Shayne Tewnion1688027240686" + ], + "type": "LDAP_GROUP", + "user_identifiers": [ + "3b4740ec-3626-4d54-8b7e-ebda45510fb6", + "994cdad7-2143-4936-a35f-8dd0f852e4d6", + "5dc626e5-1921-4758-a7bf-8501605aa59f" + ], + "role_identifiers": [ + "c21686a7-686c-468f-a2a2-8e7ce0b6f0f7", + "3eee6388-030a-4a11-8f2f-ea5a70ca6a9e" + ] + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/groups/{group_identifier}/update", + "operationId": "updateUserGroup", + "scenario": "positive", + "type": "AUTOMATIC", + "testId": 1299 + }, + "Path_Variables": { + "group_identifier": "Lilyan Ongin1688027239024" + }, + "Query_Variables": {}, + "Body": { + "description": "Sed sagittis. Nam congue, risus semper porta volutpat, quam pede lobortis ligula, sit amet eleifend pede libero quis orci. Nullam molestie nibh in lectus.", + "type": "LDAP_GROUP", + "visibility": "SHARABLE", + "role_identifiers": [ + "c21686a7-686c-468f-a2a2-8e7ce0b6f0f7" + ], + "default_liveboard_identifiers": [ + "e36ee65e-64be-436b-a29a-22d8998c4fae", + "327f4d60-c502-43b0-b1d4-c73df5031a2e", + "2ff57a24-cf90-485f-8b4b-45fc17474c6f" + ] + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/groups/{group_identifier}/update", + "operationId": "updateUserGroup", + "scenario": "positive", + "type": "AUTOMATIC", + "testId": 1300 + }, + "Path_Variables": { + "group_identifier": "Filmer Ridesdale1688027239026" + }, + "Query_Variables": {}, + "Body": { + "privileges": null, + "sub_group_identifiers": [ + "Natassia Geertz1688027238969", + "Danna Stopps1688027238995" + ], + "type": "LDAP_GROUP", + "user_identifiers": [ + "3b4740ec-3626-4d54-8b7e-ebda45510fb6", + "994cdad7-2143-4936-a35f-8dd0f852e4d6", + "5dc626e5-1921-4758-a7bf-8501605aa59f" + ], + "role_identifiers": [ + "c21686a7-686c-468f-a2a2-8e7ce0b6f0f7", + "3eee6388-030a-4a11-8f2f-ea5a70ca6a9e" + ] + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/groups/{group_identifier}/update", + "operationId": "updateUserGroup", + "scenario": "positive", + "type": "AUTOMATIC", + "testId": 1301 + }, + "Path_Variables": { + "group_identifier": "Tarra Kissack1688027239027" + }, + "Query_Variables": {}, + "Body": { + "name": "Dorella Beagen1688027240717", + "display_name": "Dorella", + "visibility": "NON_SHARABLE", + "role_identifiers": [ + "c21686a7-686c-468f-a2a2-8e7ce0b6f0f7" + ] + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/groups/{group_identifier}/update", + "operationId": "updateUserGroup", + "scenario": "positive", + "type": "AUTOMATIC", + "testId": 1302 + }, + "Path_Variables": { + "group_identifier": "Brittani Thames1688027239029" + }, + "Query_Variables": {}, + "Body": { + "operation": "ADD", + "name": "Granthem Marcam1688027240719", + "display_name": "Granthem", + "sub_group_identifiers": [ + "Natassia Geertz1688027238969" + ], + "type": "LDAP_GROUP", + "visibility": "SHARABLE", + "role_identifiers": [ + "c21686a7-686c-468f-a2a2-8e7ce0b6f0f7", + "3eee6388-030a-4a11-8f2f-ea5a70ca6a9e", + "84d12fa8-f88b-4171-bb2a-26ab1bd68e6e" + ], + "default_liveboard_identifiers": [ + "e36ee65e-64be-436b-a29a-22d8998c4fae" + ] + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/groups/{group_identifier}/update", + "operationId": "updateUserGroup", + "scenario": "positive", + "type": "AUTOMATIC", + "testId": 1303 + }, + "Path_Variables": { + "group_identifier": "Elena Byatt1688027239031" + }, + "Query_Variables": {}, + "Body": { + "name": "Gabe Delyth1688027240721", + "display_name": "Gabe", + "description": "In quis justo. Maecenas rhoncus aliquam lacus. Morbi quis tortor id nulla ultrices aliquet.", + "privileges": null, + "sub_group_identifiers": [ + "Natassia Geertz1688027238969", + "Danna Stopps1688027238995" + ], + "type": "LOCAL_GROUP", + "default_liveboard_identifiers": [ + "e36ee65e-64be-436b-a29a-22d8998c4fae", + "327f4d60-c502-43b0-b1d4-c73df5031a2e", + "2ff57a24-cf90-485f-8b4b-45fc17474c6f" + ] + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/groups/{group_identifier}/update", + "operationId": "updateUserGroup", + "scenario": "positive", + "type": "AUTOMATIC", + "testId": 1304 + }, + "Path_Variables": { + "group_identifier": "Isadora Cowsby1688027239033" + }, + "Query_Variables": {}, + "Body": { + "operation": "REPLACE", + "name": "Justinian Franey1688027240723", + "display_name": "Justinian", + "description": "Integer ac leo. Pellentesque ultrices mattis odio. Donec vitae nisi.", + "privileges": null, + "sub_group_identifiers": [ + "Natassia Geertz1688027238969", + "Danna Stopps1688027238995" + ], + "type": "LOCAL_GROUP", + "user_identifiers": [ + "3b4740ec-3626-4d54-8b7e-ebda45510fb6", + "994cdad7-2143-4936-a35f-8dd0f852e4d6", + "5dc626e5-1921-4758-a7bf-8501605aa59f" + ], + "visibility": "SHARABLE", + "role_identifiers": [ + "c21686a7-686c-468f-a2a2-8e7ce0b6f0f7", + "3eee6388-030a-4a11-8f2f-ea5a70ca6a9e" + ] + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/groups/{group_identifier}/update", + "operationId": "updateUserGroup", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 1305 + }, + "Path_Variables": { + "group_identifier": null + }, + "Query_Variables": {}, + "Body": { + "name": "Gabe Delyth1688027240721", + "display_name": "Gabe", + "description": "In quis justo. Maecenas rhoncus aliquam lacus. Morbi quis tortor id nulla ultrices aliquet.", + "privileges": null, + "sub_group_identifiers": [ + "Natassia Geertz1688027238969", + "Danna Stopps1688027238995" + ], + "type": "LOCAL_GROUP", + "default_liveboard_identifiers": [ + "e36ee65e-64be-436b-a29a-22d8998c4fae", + "327f4d60-c502-43b0-b1d4-c73df5031a2e", + "2ff57a24-cf90-485f-8b4b-45fc17474c6f" + ] + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/groups/{group_identifier}/update", + "operationId": "updateUserGroup", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 1306 + }, + "Path_Variables": { + "group_identifier": null + }, + "Query_Variables": {}, + "Body": { + "operation": "REPLACE", + "name": "Linnie Schult1688027240710", + "privileges": null, + "sub_group_identifiers": [ + "Natassia Geertz1688027238969", + "Danna Stopps1688027238995", + "Shayne Tewnion1688027240686" + ], + "type": "LDAP_GROUP", + "user_identifiers": [ + "3b4740ec-3626-4d54-8b7e-ebda45510fb6", + "994cdad7-2143-4936-a35f-8dd0f852e4d6", + "5dc626e5-1921-4758-a7bf-8501605aa59f" + ], + "role_identifiers": [ + "c21686a7-686c-468f-a2a2-8e7ce0b6f0f7", + "3eee6388-030a-4a11-8f2f-ea5a70ca6a9e" + ] + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/groups/{group_identifier}/update", + "operationId": "updateUserGroup", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 1307 + }, + "Path_Variables": { + "group_identifier": null + }, + "Query_Variables": {}, + "Body": { + "operation": "REPLACE", + "name": "Hazel Sturdy1688027240709", + "sub_group_identifiers": [ + "Natassia Geertz1688027238969", + "Danna Stopps1688027238995" + ], + "default_liveboard_identifiers": [ + "e36ee65e-64be-436b-a29a-22d8998c4fae" + ] + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/groups/{group_identifier}/update", + "operationId": "updateUserGroup", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 1308 + }, + "Path_Variables": { + "group_identifier": null + }, + "Query_Variables": {}, + "Body": { + "privileges": null, + "sub_group_identifiers": [ + "Natassia Geertz1688027238969", + "Danna Stopps1688027238995" + ], + "type": "LDAP_GROUP", + "user_identifiers": [ + "3b4740ec-3626-4d54-8b7e-ebda45510fb6", + "994cdad7-2143-4936-a35f-8dd0f852e4d6", + "5dc626e5-1921-4758-a7bf-8501605aa59f" + ], + "role_identifiers": [ + "c21686a7-686c-468f-a2a2-8e7ce0b6f0f7", + "3eee6388-030a-4a11-8f2f-ea5a70ca6a9e" + ] + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/groups/{group_identifier}/update", + "operationId": "updateUserGroup", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 1309 + }, + "Path_Variables": { + "group_identifier": null + }, + "Query_Variables": {}, + "Body": { + "privileges": null, + "sub_group_identifiers": [ + "Natassia Geertz1688027238969", + "Danna Stopps1688027238995" + ], + "type": "LDAP_GROUP", + "user_identifiers": [ + "3b4740ec-3626-4d54-8b7e-ebda45510fb6", + "994cdad7-2143-4936-a35f-8dd0f852e4d6", + "5dc626e5-1921-4758-a7bf-8501605aa59f" + ], + "role_identifiers": [ + "c21686a7-686c-468f-a2a2-8e7ce0b6f0f7", + "3eee6388-030a-4a11-8f2f-ea5a70ca6a9e" + ] + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/groups/{group_identifier}/update", + "operationId": "updateUserGroup", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 1310 + }, + "Path_Variables": { + "group_identifier": null + }, + "Query_Variables": {}, + "Body": { + "operation": "REMOVE", + "name": "Caritta Joisce1688027240706", + "display_name": "Caritta", + "description": "Sed ante. Vivamus tortor. Duis mattis egestas metus.", + "privileges": null, + "sub_group_identifiers": [ + "Natassia Geertz1688027238969", + "Danna Stopps1688027238995" + ], + "user_identifiers": [ + "3b4740ec-3626-4d54-8b7e-ebda45510fb6" + ], + "default_liveboard_identifiers": [ + "e36ee65e-64be-436b-a29a-22d8998c4fae", + "327f4d60-c502-43b0-b1d4-c73df5031a2e" + ] + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/groups/{group_identifier}/update", + "operationId": "updateUserGroup", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 1311 + }, + "Path_Variables": { + "group_identifier": null + }, + "Query_Variables": {}, + "Body": { + "operation": "REPLACE", + "name": "Tomi Lishmund1688027240693", + "display_name": "Tomi", + "description": "Aenean lectus. Pellentesque eget nunc. Donec quis orci eget orci vehicula condimentum.", + "privileges": null, + "sub_group_identifiers": [ + "Natassia Geertz1688027238969" + ], + "user_identifiers": [ + "3b4740ec-3626-4d54-8b7e-ebda45510fb6", + "994cdad7-2143-4936-a35f-8dd0f852e4d6", + "5dc626e5-1921-4758-a7bf-8501605aa59f" + ], + "visibility": "NON_SHARABLE", + "role_identifiers": [ + "c21686a7-686c-468f-a2a2-8e7ce0b6f0f7" + ], + "default_liveboard_identifiers": [ + "e36ee65e-64be-436b-a29a-22d8998c4fae" + ] + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/groups/{group_identifier}/update", + "operationId": "updateUserGroup", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 1312 + }, + "Path_Variables": { + "group_identifier": null + }, + "Query_Variables": {}, + "Body": { + "operation": "REPLACE", + "name": "Hazel Sturdy1688027240709", + "sub_group_identifiers": [ + "Natassia Geertz1688027238969", + "Danna Stopps1688027238995" + ], + "default_liveboard_identifiers": [ + "e36ee65e-64be-436b-a29a-22d8998c4fae" + ] + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/groups/{group_identifier}/update", + "operationId": "updateUserGroup", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 1313 + }, + "Path_Variables": { + "group_identifier": null + }, + "Query_Variables": {}, + "Body": { + "name": "Dorella Beagen1688027240717", + "display_name": "Dorella", + "visibility": "NON_SHARABLE", + "role_identifiers": [ + "c21686a7-686c-468f-a2a2-8e7ce0b6f0f7" + ] + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/groups/{group_identifier}/update", + "operationId": "updateUserGroup", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 1314 + }, + "Path_Variables": { + "group_identifier": null + }, + "Query_Variables": {}, + "Body": { + "operation": "REPLACE", + "privileges": null, + "type": "LDAP_GROUP", + "visibility": "NON_SHARABLE", + "role_identifiers": [ + "c21686a7-686c-468f-a2a2-8e7ce0b6f0f7", + "3eee6388-030a-4a11-8f2f-ea5a70ca6a9e", + "84d12fa8-f88b-4171-bb2a-26ab1bd68e6e" + ], + "default_liveboard_identifiers": [ + "e36ee65e-64be-436b-a29a-22d8998c4fae", + "327f4d60-c502-43b0-b1d4-c73df5031a2e" + ] + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/groups/{group_identifier}/update", + "operationId": "updateUserGroup", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 1315 + }, + "Path_Variables": { + "group_identifier": null + }, + "Query_Variables": {}, + "Body": { + "privileges": null, + "user_identifiers": [ + "3b4740ec-3626-4d54-8b7e-ebda45510fb6" + ], + "visibility": "NON_SHARABLE", + "role_identifiers": [ + "c21686a7-686c-468f-a2a2-8e7ce0b6f0f7" + ] + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/groups/{group_identifier}/update", + "operationId": "updateUserGroup", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 1316 + }, + "Path_Variables": { + "group_identifier": null + }, + "Query_Variables": {}, + "Body": { + "operation": "REPLACE", + "name": "Shayne Tewnion1688027240686", + "display_name": "Shayne", + "privileges": null, + "type": "LDAP_GROUP", + "user_identifiers": [ + "3b4740ec-3626-4d54-8b7e-ebda45510fb6", + "994cdad7-2143-4936-a35f-8dd0f852e4d6", + "5dc626e5-1921-4758-a7bf-8501605aa59f" + ], + "default_liveboard_identifiers": [ + "e36ee65e-64be-436b-a29a-22d8998c4fae" + ] + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/groups/{group_identifier}/update", + "operationId": "updateUserGroup", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 1317 + }, + "Path_Variables": { + "group_identifier": null + }, + "Query_Variables": {}, + "Body": { + "privileges": null, + "user_identifiers": [ + "3b4740ec-3626-4d54-8b7e-ebda45510fb6" + ], + "visibility": "NON_SHARABLE", + "role_identifiers": [ + "c21686a7-686c-468f-a2a2-8e7ce0b6f0f7" + ] + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/groups/{group_identifier}/update", + "operationId": "updateUserGroup", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 1318 + }, + "Path_Variables": { + "group_identifier": null + }, + "Query_Variables": {}, + "Body": { + "operation": "REMOVE", + "name": "Caritta Joisce1688027240706", + "display_name": "Caritta", + "description": "Sed ante. Vivamus tortor. Duis mattis egestas metus.", + "privileges": null, + "sub_group_identifiers": [ + "Natassia Geertz1688027238969", + "Danna Stopps1688027238995" + ], + "user_identifiers": [ + "3b4740ec-3626-4d54-8b7e-ebda45510fb6" + ], + "default_liveboard_identifiers": [ + "e36ee65e-64be-436b-a29a-22d8998c4fae", + "327f4d60-c502-43b0-b1d4-c73df5031a2e" + ] + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/groups/{group_identifier}/update", + "operationId": "updateUserGroup", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 1319 + }, + "Path_Variables": { + "group_identifier": null + }, + "Query_Variables": {}, + "Body": { + "privileges": null, + "sub_group_identifiers": [ + "Natassia Geertz1688027238969", + "Danna Stopps1688027238995" + ], + "type": "LDAP_GROUP", + "user_identifiers": [ + "3b4740ec-3626-4d54-8b7e-ebda45510fb6", + "994cdad7-2143-4936-a35f-8dd0f852e4d6", + "5dc626e5-1921-4758-a7bf-8501605aa59f" + ], + "role_identifiers": [ + "c21686a7-686c-468f-a2a2-8e7ce0b6f0f7", + "3eee6388-030a-4a11-8f2f-ea5a70ca6a9e" + ] + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/groups/{group_identifier}/update", + "operationId": "updateUserGroup", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 1320 + }, + "Path_Variables": { + "group_identifier": "Warden Pelz1688027239013" + }, + "Query_Variables": {}, + "Body": { + "display_name": [ + "Willi" + ], + "privileges": null, + "type": "LOCAL_GROUP", + "role_identifiers": [ + "c21686a7-686c-468f-a2a2-8e7ce0b6f0f7", + "3eee6388-030a-4a11-8f2f-ea5a70ca6a9e", + "84d12fa8-f88b-4171-bb2a-26ab1bd68e6e" + ], + "default_liveboard_identifiers": [ + "e36ee65e-64be-436b-a29a-22d8998c4fae", + "327f4d60-c502-43b0-b1d4-c73df5031a2e", + "2ff57a24-cf90-485f-8b4b-45fc17474c6f" + ] + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/groups/{group_identifier}/update", + "operationId": "updateUserGroup", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 1321 + }, + "Path_Variables": { + "group_identifier": [ + "Warden", + "Pelz1688027239013" + ] + }, + "Query_Variables": {}, + "Body": { + "display_name": "Willi", + "privileges": null, + "type": "LOCAL_GROUP", + "role_identifiers": [ + "c21686a7-686c-468f-a2a2-8e7ce0b6f0f7", + "3eee6388-030a-4a11-8f2f-ea5a70ca6a9e", + "84d12fa8-f88b-4171-bb2a-26ab1bd68e6e" + ], + "default_liveboard_identifiers": [ + "e36ee65e-64be-436b-a29a-22d8998c4fae", + "327f4d60-c502-43b0-b1d4-c73df5031a2e", + "2ff57a24-cf90-485f-8b4b-45fc17474c6f" + ] + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/groups/{group_identifier}/update", + "operationId": "updateUserGroup", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 1322 + }, + "Path_Variables": { + "group_identifier": "Jackelyn Luker1688027239019" + }, + "Query_Variables": {}, + "Body": { + "operation": "REMOVE", + "name": "Caritta Joisce1688027240706", + "display_name": "Caritta", + "description": "Sed ante. Vivamus tortor. Duis mattis egestas metus.", + "privileges": null, + "sub_group_identifiers": [ + "Natassia Geertz1688027238969", + "Danna Stopps1688027238995" + ], + "user_identifiers": [ + "3b4740ec-3626-4d54-8b7e-ebda45510fb6" + ], + "default_liveboard_identifiers": "bNDdZwLhIGwzpuy" + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/groups/{group_identifier}/update", + "operationId": "updateUserGroup", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 1323 + }, + "Path_Variables": { + "group_identifier": "Elena Byatt1688027239031" + }, + "Query_Variables": {}, + "Body": { + "name": [ + "Gabe", + "Delyth1688027240721" + ], + "display_name": "Gabe", + "description": "In quis justo. Maecenas rhoncus aliquam lacus. Morbi quis tortor id nulla ultrices aliquet.", + "privileges": null, + "sub_group_identifiers": [ + "Natassia Geertz1688027238969", + "Danna Stopps1688027238995" + ], + "type": "LOCAL_GROUP", + "default_liveboard_identifiers": [ + "e36ee65e-64be-436b-a29a-22d8998c4fae", + "327f4d60-c502-43b0-b1d4-c73df5031a2e", + "2ff57a24-cf90-485f-8b4b-45fc17474c6f" + ] + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/groups/{group_identifier}/update", + "operationId": "updateUserGroup", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 1324 + }, + "Path_Variables": { + "group_identifier": "Bernette Curthoys1688027239012" + }, + "Query_Variables": {}, + "Body": { + "display_name": "Frazier", + "privileges": null, + "sub_group_identifiers": [ + "Natassia Geertz1688027238969", + "Danna Stopps1688027238995" + ], + "user_identifiers": "qXaEPdqsghuncwN", + "role_identifiers": [ + "c21686a7-686c-468f-a2a2-8e7ce0b6f0f7", + "3eee6388-030a-4a11-8f2f-ea5a70ca6a9e", + "84d12fa8-f88b-4171-bb2a-26ab1bd68e6e" + ], + "default_liveboard_identifiers": [ + "e36ee65e-64be-436b-a29a-22d8998c4fae", + "327f4d60-c502-43b0-b1d4-c73df5031a2e", + "2ff57a24-cf90-485f-8b4b-45fc17474c6f" + ] + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/groups/{group_identifier}/update", + "operationId": "updateUserGroup", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 1325 + }, + "Path_Variables": { + "group_identifier": "Rayshell McKerron1688027239005" + }, + "Query_Variables": {}, + "Body": { + "name": "Edy Janowski1688027240691", + "privileges": null, + "sub_group_identifiers": [ + "Natassia Geertz1688027238969", + "Danna Stopps1688027238995" + ], + "type": "LOCAL_GROUP", + "user_identifiers": "sdaARpuHVsYRTvK" + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/groups/{group_identifier}/update", + "operationId": "updateUserGroup", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 1326 + }, + "Path_Variables": { + "group_identifier": "Rayshell McKerron1688027239005" + }, + "Query_Variables": {}, + "Body": { + "name": [ + "Edy", + "Janowski1688027240691" + ], + "privileges": null, + "sub_group_identifiers": [ + "Natassia Geertz1688027238969", + "Danna Stopps1688027238995" + ], + "type": "LOCAL_GROUP", + "user_identifiers": [ + "3b4740ec-3626-4d54-8b7e-ebda45510fb6" + ] + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/groups/{group_identifier}/update", + "operationId": "updateUserGroup", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 1327 + }, + "Path_Variables": { + "group_identifier": "Elena Byatt1688027239031" + }, + "Query_Variables": {}, + "Body": { + "name": "Gabe Delyth1688027240721", + "display_name": "Gabe", + "description": "In quis justo. Maecenas rhoncus aliquam lacus. Morbi quis tortor id nulla ultrices aliquet.", + "privileges": null, + "sub_group_identifiers": [ + "Natassia Geertz1688027238969", + "Danna Stopps1688027238995" + ], + "type": "LOCAL_GROUP", + "default_liveboard_identifiers": "mqRmmLAxDtLFlCL" + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/groups/{group_identifier}/update", + "operationId": "updateUserGroup", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 1328 + }, + "Path_Variables": { + "group_identifier": "Cybil Bolduc1688027238998" + }, + "Query_Variables": {}, + "Body": { + "operation": "REPLACE", + "name": "Shayne Tewnion1688027240686", + "display_name": "Shayne", + "privileges": null, + "type": [ + "LDAP_GROUP" + ], + "user_identifiers": [ + "3b4740ec-3626-4d54-8b7e-ebda45510fb6", + "994cdad7-2143-4936-a35f-8dd0f852e4d6", + "5dc626e5-1921-4758-a7bf-8501605aa59f" + ], + "default_liveboard_identifiers": [ + "e36ee65e-64be-436b-a29a-22d8998c4fae" + ] + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/groups/{group_identifier}/update", + "operationId": "updateUserGroup", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 1329 + }, + "Path_Variables": { + "group_identifier": "Rickard Sibbald1688027239010" + }, + "Query_Variables": {}, + "Body": { + "privileges": null, + "user_identifiers": "OlhtGyRroJIIWJg", + "visibility": "NON_SHARABLE", + "role_identifiers": [ + "c21686a7-686c-468f-a2a2-8e7ce0b6f0f7" + ] + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/groups/{group_identifier}/update", + "operationId": "updateUserGroup", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 1330 + }, + "Path_Variables": { + "group_identifier": [ + "Cybil", + "Bolduc1688027238998" + ] + }, + "Query_Variables": {}, + "Body": { + "operation": "REPLACE", + "name": "Shayne Tewnion1688027240686", + "display_name": "Shayne", + "privileges": null, + "type": "LDAP_GROUP", + "user_identifiers": [ + "3b4740ec-3626-4d54-8b7e-ebda45510fb6", + "994cdad7-2143-4936-a35f-8dd0f852e4d6", + "5dc626e5-1921-4758-a7bf-8501605aa59f" + ], + "default_liveboard_identifiers": [ + "e36ee65e-64be-436b-a29a-22d8998c4fae" + ] + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/groups/{group_identifier}/update", + "operationId": "updateUserGroup", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 1331 + }, + "Path_Variables": { + "group_identifier": "Brana Ducastel1688027239002" + }, + "Query_Variables": {}, + "Body": { + "operation": "ADD", + "name": "Owen Hindmoor1688027240689", + "display_name": [ + "Owen" + ], + "privileges": null, + "user_identifiers": [ + "3b4740ec-3626-4d54-8b7e-ebda45510fb6" + ], + "visibility": "SHARABLE", + "role_identifiers": [ + "c21686a7-686c-468f-a2a2-8e7ce0b6f0f7", + "3eee6388-030a-4a11-8f2f-ea5a70ca6a9e" + ] + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/groups/{group_identifier}/update", + "operationId": "updateUserGroup", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 1332 + }, + "Path_Variables": { + "group_identifier": "Kare Buy1688027239021" + }, + "Query_Variables": {}, + "Body": { + "operation": "REPLACE", + "name": [ + "Hazel", + "Sturdy1688027240709" + ], + "sub_group_identifiers": [ + "Natassia Geertz1688027238969", + "Danna Stopps1688027238995" + ], + "default_liveboard_identifiers": [ + "e36ee65e-64be-436b-a29a-22d8998c4fae" + ] + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/groups/{group_identifier}/update", + "operationId": "updateUserGroup", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 1333 + }, + "Path_Variables": { + "group_identifier": "Cybil Bolduc1688027238998" + }, + "Query_Variables": {}, + "Body": { + "operation": "REPLACE", + "name": [ + "Shayne", + "Tewnion1688027240686" + ], + "display_name": "Shayne", + "privileges": null, + "type": "LDAP_GROUP", + "user_identifiers": [ + "3b4740ec-3626-4d54-8b7e-ebda45510fb6", + "994cdad7-2143-4936-a35f-8dd0f852e4d6", + "5dc626e5-1921-4758-a7bf-8501605aa59f" + ], + "default_liveboard_identifiers": [ + "e36ee65e-64be-436b-a29a-22d8998c4fae" + ] + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/groups/{group_identifier}/update", + "operationId": "updateUserGroup", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 1334 + }, + "Path_Variables": { + "group_identifier": "Tarra Kissack1688027239027" + }, + "Query_Variables": {}, + "Body": { + "name": "Dorella Beagen1688027240717", + "display_name": [ + "Dorella" + ], + "visibility": "NON_SHARABLE", + "role_identifiers": [ + "c21686a7-686c-468f-a2a2-8e7ce0b6f0f7" + ] + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/groups/{group_identifier}/update", + "operationId": "updateUserGroup", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 1335 + }, + "Path_Variables": { + "group_identifier": "oCmRTRwVlENhNEk" + }, + "Query_Variables": {}, + "Body": { + "description": "Sed sagittis. Nam congue, risus semper porta volutpat, quam pede lobortis ligula, sit amet eleifend pede libero quis orci. Nullam molestie nibh in lectus.", + "type": "LDAP_GROUP", + "visibility": "SHARABLE", + "role_identifiers": [ + "c21686a7-686c-468f-a2a2-8e7ce0b6f0f7" + ], + "default_liveboard_identifiers": [ + "e36ee65e-64be-436b-a29a-22d8998c4fae", + "327f4d60-c502-43b0-b1d4-c73df5031a2e", + "2ff57a24-cf90-485f-8b4b-45fc17474c6f" + ] + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/groups/{group_identifier}/update", + "operationId": "updateUserGroup", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 1336 + }, + "Path_Variables": { + "group_identifier": "TafHajMywBQlhlR" + }, + "Query_Variables": {}, + "Body": { + "description": "Pellentesque at nulla. Suspendisse potenti. Cras in purus eu magna vulputate luctus.", + "privileges": null, + "sub_group_identifiers": [ + "Natassia Geertz1688027238969", + "Natassia Geertz1688027238969", + "Natassia Geertz1688027238969" + ], + "type": "LOCAL_GROUP", + "user_identifiers": [ + "3b4740ec-3626-4d54-8b7e-ebda45510fb6", + "994cdad7-2143-4936-a35f-8dd0f852e4d6", + "5dc626e5-1921-4758-a7bf-8501605aa59f" + ], + "role_identifiers": [ + "c21686a7-686c-468f-a2a2-8e7ce0b6f0f7", + "3eee6388-030a-4a11-8f2f-ea5a70ca6a9e" + ], + "default_liveboard_identifiers": [ + "e36ee65e-64be-436b-a29a-22d8998c4fae", + "327f4d60-c502-43b0-b1d4-c73df5031a2e" + ] + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/groups/{group_identifier}/update", + "operationId": "updateUserGroup", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 1337 + }, + "Path_Variables": { + "group_identifier": "odqQNKnYwAVOAYv" + }, + "Query_Variables": {}, + "Body": { + "operation": "REPLACE", + "name": "Hazel Sturdy1688027240709", + "sub_group_identifiers": [ + "Natassia Geertz1688027238969", + "Danna Stopps1688027238995" + ], + "default_liveboard_identifiers": [ + "e36ee65e-64be-436b-a29a-22d8998c4fae" + ] + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/groups/{group_identifier}/update", + "operationId": "updateUserGroup", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 1338 + }, + "Path_Variables": { + "group_identifier": "OPqjkgMIcEjPZrr" + }, + "Query_Variables": {}, + "Body": { + "name": "Gabe Delyth1688027240721", + "display_name": "Gabe", + "description": "In quis justo. Maecenas rhoncus aliquam lacus. Morbi quis tortor id nulla ultrices aliquet.", + "privileges": null, + "sub_group_identifiers": [ + "Natassia Geertz1688027238969", + "Danna Stopps1688027238995" + ], + "type": "LOCAL_GROUP", + "default_liveboard_identifiers": [ + "e36ee65e-64be-436b-a29a-22d8998c4fae", + "327f4d60-c502-43b0-b1d4-c73df5031a2e", + "2ff57a24-cf90-485f-8b4b-45fc17474c6f" + ] + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/groups/{group_identifier}/update", + "operationId": "updateUserGroup", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 1339 + }, + "Path_Variables": { + "group_identifier": "zUGunQOKMESYwHI" + }, + "Query_Variables": {}, + "Body": { + "operation": "REPLACE", + "display_name": "Rubia", + "privileges": null, + "sub_group_identifiers": [], + "user_identifiers": [ + "3b4740ec-3626-4d54-8b7e-ebda45510fb6" + ], + "role_identifiers": [ + "c21686a7-686c-468f-a2a2-8e7ce0b6f0f7", + "3eee6388-030a-4a11-8f2f-ea5a70ca6a9e", + "84d12fa8-f88b-4171-bb2a-26ab1bd68e6e" + ], + "default_liveboard_identifiers": [ + "e36ee65e-64be-436b-a29a-22d8998c4fae", + "327f4d60-c502-43b0-b1d4-c73df5031a2e", + "2ff57a24-cf90-485f-8b4b-45fc17474c6f" + ] + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/groups/{group_identifier}/update", + "operationId": "updateUserGroup", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 1340 + }, + "Path_Variables": { + "group_identifier": "TOYpzDxpqDRWauM" + }, + "Query_Variables": {}, + "Body": { + "operation": "REPLACE", + "display_name": "Rubia", + "privileges": null, + "sub_group_identifiers": [], + "user_identifiers": [ + "3b4740ec-3626-4d54-8b7e-ebda45510fb6" + ], + "role_identifiers": [ + "c21686a7-686c-468f-a2a2-8e7ce0b6f0f7", + "3eee6388-030a-4a11-8f2f-ea5a70ca6a9e", + "84d12fa8-f88b-4171-bb2a-26ab1bd68e6e" + ], + "default_liveboard_identifiers": [ + "e36ee65e-64be-436b-a29a-22d8998c4fae", + "327f4d60-c502-43b0-b1d4-c73df5031a2e", + "2ff57a24-cf90-485f-8b4b-45fc17474c6f" + ] + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/groups/{group_identifier}/update", + "operationId": "updateUserGroup", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 1341 + }, + "Path_Variables": { + "group_identifier": "vCRBxrWYLPnABgW" + }, + "Query_Variables": {}, + "Body": { + "operation": "REPLACE", + "name": "Tomi Lishmund1688027240693", + "display_name": "Tomi", + "description": "Aenean lectus. Pellentesque eget nunc. Donec quis orci eget orci vehicula condimentum.", + "privileges": null, + "sub_group_identifiers": [ + "Natassia Geertz1688027238969" + ], + "user_identifiers": [ + "3b4740ec-3626-4d54-8b7e-ebda45510fb6", + "994cdad7-2143-4936-a35f-8dd0f852e4d6", + "5dc626e5-1921-4758-a7bf-8501605aa59f" + ], + "visibility": "NON_SHARABLE", + "role_identifiers": [ + "c21686a7-686c-468f-a2a2-8e7ce0b6f0f7" + ], + "default_liveboard_identifiers": [ + "e36ee65e-64be-436b-a29a-22d8998c4fae" + ] + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/groups/{group_identifier}/update", + "operationId": "updateUserGroup", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 1342 + }, + "Path_Variables": { + "group_identifier": "qdZzCKXPOwadOnr" + }, + "Query_Variables": {}, + "Body": { + "description": "Pellentesque at nulla. Suspendisse potenti. Cras in purus eu magna vulputate luctus.", + "privileges": null, + "sub_group_identifiers": [ + "Natassia Geertz1688027238969", + "Natassia Geertz1688027238969", + "Natassia Geertz1688027238969" + ], + "type": "LOCAL_GROUP", + "user_identifiers": [ + "3b4740ec-3626-4d54-8b7e-ebda45510fb6", + "994cdad7-2143-4936-a35f-8dd0f852e4d6", + "5dc626e5-1921-4758-a7bf-8501605aa59f" + ], + "role_identifiers": [ + "c21686a7-686c-468f-a2a2-8e7ce0b6f0f7", + "3eee6388-030a-4a11-8f2f-ea5a70ca6a9e" + ], + "default_liveboard_identifiers": [ + "e36ee65e-64be-436b-a29a-22d8998c4fae", + "327f4d60-c502-43b0-b1d4-c73df5031a2e" + ] + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/groups/{group_identifier}/update", + "operationId": "updateUserGroup", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 1343 + }, + "Path_Variables": { + "group_identifier": "FYnFebwRfECHwEM" + }, + "Query_Variables": {}, + "Body": { + "operation": "REMOVE", + "name": "Caritta Joisce1688027240706", + "display_name": "Caritta", + "description": "Sed ante. Vivamus tortor. Duis mattis egestas metus.", + "privileges": null, + "sub_group_identifiers": [ + "Natassia Geertz1688027238969", + "Danna Stopps1688027238995" + ], + "user_identifiers": [ + "3b4740ec-3626-4d54-8b7e-ebda45510fb6" + ], + "default_liveboard_identifiers": [ + "e36ee65e-64be-436b-a29a-22d8998c4fae", + "327f4d60-c502-43b0-b1d4-c73df5031a2e" + ] + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/groups/{group_identifier}/update", + "operationId": "updateUserGroup", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 1344 + }, + "Path_Variables": { + "group_identifier": "vjxairiOziwoMDS" + }, + "Query_Variables": {}, + "Body": { + "operation": "ADD", + "name": "Granthem Marcam1688027240719", + "display_name": "Granthem", + "sub_group_identifiers": [ + "Natassia Geertz1688027238969" + ], + "type": "LDAP_GROUP", + "visibility": "SHARABLE", + "role_identifiers": [ + "c21686a7-686c-468f-a2a2-8e7ce0b6f0f7", + "3eee6388-030a-4a11-8f2f-ea5a70ca6a9e", + "84d12fa8-f88b-4171-bb2a-26ab1bd68e6e" + ], + "default_liveboard_identifiers": [ + "e36ee65e-64be-436b-a29a-22d8998c4fae" + ] + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/groups/{group_identifier}/update", + "operationId": "updateUserGroup", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 1345 + }, + "Path_Variables": { + "group_identifier": "XlMEBXnuPFowOCR" + }, + "Query_Variables": {}, + "Body": { + "operation": "REPLACE", + "name": "Linnie Schult1688027240710", + "privileges": null, + "sub_group_identifiers": [ + "Natassia Geertz1688027238969", + "Danna Stopps1688027238995", + "Shayne Tewnion1688027240686" + ], + "type": "LDAP_GROUP", + "user_identifiers": [ + "3b4740ec-3626-4d54-8b7e-ebda45510fb6", + "994cdad7-2143-4936-a35f-8dd0f852e4d6", + "5dc626e5-1921-4758-a7bf-8501605aa59f" + ], + "role_identifiers": [ + "c21686a7-686c-468f-a2a2-8e7ce0b6f0f7", + "3eee6388-030a-4a11-8f2f-ea5a70ca6a9e" + ] + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/groups/{group_identifier}/update", + "operationId": "updateUserGroup", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 1346 + }, + "Path_Variables": { + "group_identifier": "JcRkzqBvQPuhvAk" + }, + "Query_Variables": {}, + "Body": { + "name": "Edy Janowski1688027240691", + "privileges": null, + "sub_group_identifiers": [ + "Natassia Geertz1688027238969", + "Danna Stopps1688027238995" + ], + "type": "LOCAL_GROUP", + "user_identifiers": [ + "3b4740ec-3626-4d54-8b7e-ebda45510fb6" + ] + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/groups/{group_identifier}/update", + "operationId": "updateUserGroup", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 1347 + }, + "Path_Variables": { + "group_identifier": "YPdpMqurYmSosEt" + }, + "Query_Variables": {}, + "Body": { + "operation": "REPLACE", + "name": "Linnie Schult1688027240710", + "privileges": null, + "sub_group_identifiers": [ + "Natassia Geertz1688027238969", + "Danna Stopps1688027238995", + "Shayne Tewnion1688027240686" + ], + "type": "LDAP_GROUP", + "user_identifiers": [ + "3b4740ec-3626-4d54-8b7e-ebda45510fb6", + "994cdad7-2143-4936-a35f-8dd0f852e4d6", + "5dc626e5-1921-4758-a7bf-8501605aa59f" + ], + "role_identifiers": [ + "c21686a7-686c-468f-a2a2-8e7ce0b6f0f7", + "3eee6388-030a-4a11-8f2f-ea5a70ca6a9e" + ] + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/groups/{group_identifier}/update", + "operationId": "updateUserGroup", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 1348 + }, + "Path_Variables": { + "group_identifier": "GiDnoxjcGDOGofk" + }, + "Query_Variables": {}, + "Body": { + "operation": "ADD", + "name": "Granthem Marcam1688027240719", + "display_name": "Granthem", + "sub_group_identifiers": [ + "Natassia Geertz1688027238969" + ], + "type": "LDAP_GROUP", + "visibility": "SHARABLE", + "role_identifiers": [ + "c21686a7-686c-468f-a2a2-8e7ce0b6f0f7", + "3eee6388-030a-4a11-8f2f-ea5a70ca6a9e", + "84d12fa8-f88b-4171-bb2a-26ab1bd68e6e" + ], + "default_liveboard_identifiers": [ + "e36ee65e-64be-436b-a29a-22d8998c4fae" + ] + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/groups/{group_identifier}/update", + "operationId": "updateUserGroup", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 1349 + }, + "Path_Variables": { + "group_identifier": "XITtSLPwrUJJBhg" + }, + "Query_Variables": {}, + "Body": { + "operation": "REPLACE", + "privileges": null, + "type": "LDAP_GROUP", + "visibility": "NON_SHARABLE", + "role_identifiers": [ + "c21686a7-686c-468f-a2a2-8e7ce0b6f0f7", + "3eee6388-030a-4a11-8f2f-ea5a70ca6a9e", + "84d12fa8-f88b-4171-bb2a-26ab1bd68e6e" + ], + "default_liveboard_identifiers": [ + "e36ee65e-64be-436b-a29a-22d8998c4fae", + "327f4d60-c502-43b0-b1d4-c73df5031a2e" + ] + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/groups/search", + "operationId": "searchUserGroups", + "scenario": "positive", + "type": "AUTOMATIC", + "testId": 1350 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "default_liveboard_identifiers": [ + "e36ee65e-64be-436b-a29a-22d8998c4fae", + "327f4d60-c502-43b0-b1d4-c73df5031a2e" + ], + "description": "Quisque ut erat. Curabitur gravida nisi at nibh.", + "group_identifier": "Natassia Geertz1688027238969", + "org_identifiers": [ + "0", + "0", + "0" + ], + "privileges": [ + "USERMANAGEMENT", + "AUTHORING" + ], + "sub_group_identifiers": [ + "Natassia Geertz1688027238969" + ], + "user_identifiers": [ + "3b4740ec-3626-4d54-8b7e-ebda45510fb6", + "994cdad7-2143-4936-a35f-8dd0f852e4d6", + "5dc626e5-1921-4758-a7bf-8501605aa59f" + ], + "visibility": "NON_SHARABLE", + "record_offset": 1, + "record_size": 8 + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/groups/search", + "operationId": "searchUserGroups", + "scenario": "positive", + "type": "AUTOMATIC", + "testId": 1351 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "default_liveboard_identifiers": [ + "e36ee65e-64be-436b-a29a-22d8998c4fae" + ], + "description": "Proin interdum mauris non ligula pellentesque ultrices. Phasellus id sapien in sapien iaculis congue. Vivamus metus arcu, adipiscing molestie, hendrerit at, vulputate vitae, nisl. Aenean lectus. Pellentesque eget nunc.", + "display_name": "csaintepaul1", + "group_identifier": "Danna Stopps1688027238995", + "org_identifiers": [ + "0", + "0", + "0" + ], + "record_offset": 4, + "record_size": 10, + "sort_options": { + "field_name": "NAME" + } + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/groups/search", + "operationId": "searchUserGroups", + "scenario": "positive", + "type": "AUTOMATIC", + "testId": 1352 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "default_liveboard_identifiers": [ + "e36ee65e-64be-436b-a29a-22d8998c4fae", + "327f4d60-c502-43b0-b1d4-c73df5031a2e" + ], + "description": "Integer ac leo. Pellentesque ultrices mattis odio. Donec vitae nisi. Nam ultrices, libero non mattis pulvinar, nulla pede ullamcorper augue, a suscipit nulla elit ac nulla.", + "group_identifier": "Shayne Tewnion1688027240686", + "org_identifiers": [ + "0", + "0", + "0" + ], + "privileges": [ + "PREVIEW_THOUGHTSPOT_SAGE", + "RANALYSIS" + ], + "sub_group_identifiers": [ + "Natassia Geertz1688027238969", + "Danna Stopps1688027238995" + ], + "type": "LDAP_GROUP", + "user_identifiers": [ + "3b4740ec-3626-4d54-8b7e-ebda45510fb6", + "994cdad7-2143-4936-a35f-8dd0f852e4d6" + ], + "record_offset": 1, + "record_size": 6, + "sort_options": { + "field_name": "CREATED", + "order": "DESC" + } + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/groups/search", + "operationId": "searchUserGroups", + "scenario": "positive", + "type": "AUTOMATIC", + "testId": 1353 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "description": "Donec odio justo, sollicitudin ut, suscipit a, feugiat et, eros. Vestibulum ac est lacinia nisi venenatis tristique. Fusce congue, diam id ornare imperdiet, sapien urna pretium nisl, ut volutpat sapien arcu sed augue. Aliquam erat volutpat. In congue.", + "org_identifiers": [ + "0" + ], + "privileges": [ + "USERMANAGEMENT" + ], + "sub_group_identifiers": [ + "Natassia Geertz1688027238969", + "Danna Stopps1688027238995", + "Shayne Tewnion1688027240686" + ], + "user_identifiers": [ + "3b4740ec-3626-4d54-8b7e-ebda45510fb6", + "994cdad7-2143-4936-a35f-8dd0f852e4d6" + ], + "record_offset": 3, + "record_size": 4, + "sort_options": { + "order": "DESC" + } + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/groups/search", + "operationId": "searchUserGroups", + "scenario": "positive", + "type": "AUTOMATIC", + "testId": 1354 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "display_name": "sramme4", + "group_identifier": "Edy Janowski1688027240691", + "privileges": [ + "USERMANAGEMENT", + "DATAMANAGEMENT" + ], + "sub_group_identifiers": [ + "Natassia Geertz1688027238969", + "Danna Stopps1688027238995", + "Shayne Tewnion1688027240686" + ], + "type": "LOCAL_GROUP", + "user_identifiers": [ + "3b4740ec-3626-4d54-8b7e-ebda45510fb6", + "994cdad7-2143-4936-a35f-8dd0f852e4d6" + ], + "record_offset": 5, + "record_size": 6, + "sort_options": { + "order": "ASC" + } + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/groups/search", + "operationId": "searchUserGroups", + "scenario": "positive", + "type": "AUTOMATIC", + "testId": 1355 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "default_liveboard_identifiers": [ + "e36ee65e-64be-436b-a29a-22d8998c4fae", + "327f4d60-c502-43b0-b1d4-c73df5031a2e", + "2ff57a24-cf90-485f-8b4b-45fc17474c6f" + ], + "description": "Aliquam augue quam, sollicitudin vitae, consectetuer eget, rutrum at, lorem. Integer tincidunt ante vel ipsum. Praesent blandit lacinia erat.", + "display_name": "rbernardot5", + "group_identifier": "Tomi Lishmund1688027240693", + "org_identifiers": [ + "0", + "0", + "0" + ], + "privileges": [ + "USER_ADMINISTRATION" + ], + "sub_group_identifiers": [ + "Natassia Geertz1688027238969" + ], + "type": "LDAP_GROUP", + "user_identifiers": [ + "3b4740ec-3626-4d54-8b7e-ebda45510fb6", + "994cdad7-2143-4936-a35f-8dd0f852e4d6" + ], + "visibility": "SHARABLE", + "record_offset": 9, + "record_size": 1 + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/groups/search", + "operationId": "searchUserGroups", + "scenario": "positive", + "type": "AUTOMATIC", + "testId": 1356 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "default_liveboard_identifiers": [ + "e36ee65e-64be-436b-a29a-22d8998c4fae", + "327f4d60-c502-43b0-b1d4-c73df5031a2e", + "2ff57a24-cf90-485f-8b4b-45fc17474c6f" + ], + "display_name": "wgidney6", + "group_identifier": "Rickard Sibbald1688027239010", + "org_identifiers": [ + "0", + "0" + ], + "sub_group_identifiers": [ + "Natassia Geertz1688027238969", + "Danna Stopps1688027238995", + "Shayne Tewnion1688027240686" + ], + "user_identifiers": [ + "3b4740ec-3626-4d54-8b7e-ebda45510fb6" + ], + "visibility": "NON_SHARABLE", + "role_identifiers": [ + "c21686a7-686c-468f-a2a2-8e7ce0b6f0f7" + ], + "record_offset": 8, + "record_size": 4, + "sort_options": { + "field_name": "NAME" + } + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/groups/search", + "operationId": "searchUserGroups", + "scenario": "positive", + "type": "AUTOMATIC", + "testId": 1357 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "default_liveboard_identifiers": [ + "e36ee65e-64be-436b-a29a-22d8998c4fae", + "327f4d60-c502-43b0-b1d4-c73df5031a2e" + ], + "description": "Mauris ullamcorper purus sit amet nulla.", + "display_name": "cpavlasek7", + "group_identifier": "Bernette Curthoys1688027239012", + "org_identifiers": [ + "0", + "0", + "0" + ], + "privileges": [ + "SYNCMANAGEMENT" + ], + "sub_group_identifiers": [ + "Natassia Geertz1688027238969", + "Danna Stopps1688027238995", + "Shayne Tewnion1688027240686" + ], + "type": "LDAP_GROUP", + "user_identifiers": [ + "3b4740ec-3626-4d54-8b7e-ebda45510fb6", + "994cdad7-2143-4936-a35f-8dd0f852e4d6", + "5dc626e5-1921-4758-a7bf-8501605aa59f" + ], + "visibility": "NON_SHARABLE", + "record_offset": 7, + "record_size": 6 + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/groups/search", + "operationId": "searchUserGroups", + "scenario": "positive", + "type": "AUTOMATIC", + "testId": 1358 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "description": "In est risus, auctor sed, tristique in, tempus sit amet, sem. Fusce consequat. Nulla nisl. Nunc nisl.", + "display_name": "jlesmonde8", + "group_identifier": "Warden Pelz1688027239013", + "privileges": [ + "DATADOWNLOADING", + "SHAREWITHALL", + "PREVIEW_THOUGHTSPOT_SAGE" + ], + "role_identifiers": [ + "c21686a7-686c-468f-a2a2-8e7ce0b6f0f7", + "3eee6388-030a-4a11-8f2f-ea5a70ca6a9e", + "84d12fa8-f88b-4171-bb2a-26ab1bd68e6e" + ], + "record_offset": 6, + "record_size": 5, + "sort_options": { + "order": "DESC" + } + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/groups/search", + "operationId": "searchUserGroups", + "scenario": "positive", + "type": "AUTOMATIC", + "testId": 1359 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "default_liveboard_identifiers": [ + "e36ee65e-64be-436b-a29a-22d8998c4fae", + "327f4d60-c502-43b0-b1d4-c73df5031a2e", + "2ff57a24-cf90-485f-8b4b-45fc17474c6f" + ], + "group_identifier": "Hansiain Capoun1688027239015", + "org_identifiers": [ + "0", + "0", + "0" + ], + "privileges": [ + "SYNCMANAGEMENT", + "ADMINISTRATION", + "DEVELOPER" + ], + "sub_group_identifiers": [ + "Natassia Geertz1688027238969", + "Danna Stopps1688027238995", + "Shayne Tewnion1688027240686" + ], + "record_offset": 7, + "record_size": 3, + "sort_options": { + "field_name": "CREATED" + } + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/groups/search", + "operationId": "searchUserGroups", + "scenario": "positive", + "type": "AUTOMATIC", + "testId": 1360 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "default_liveboard_identifiers": [ + "e36ee65e-64be-436b-a29a-22d8998c4fae", + "327f4d60-c502-43b0-b1d4-c73df5031a2e" + ], + "description": "Aliquam augue quam, sollicitudin vitae, consectetuer eget, rutrum at, lorem.", + "group_identifier": "Sacha Piffe1688027239017", + "sub_group_identifiers": [ + "Natassia Geertz1688027238969", + "Danna Stopps1688027238995" + ], + "visibility": "NON_SHARABLE", + "record_offset": 9, + "record_size": 10 + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/groups/search", + "operationId": "searchUserGroups", + "scenario": "positive", + "type": "AUTOMATIC", + "testId": 1361 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "display_name": "wfitzerb", + "type": "LOCAL_GROUP", + "visibility": "SHARABLE", + "record_offset": 5, + "record_size": 8 + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/groups/search", + "operationId": "searchUserGroups", + "scenario": "positive", + "type": "AUTOMATIC", + "testId": 1362 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "org_identifiers": [ + "0", + "0" + ], + "privileges": [ + "USERDATAUPLOADING", + "RANALYSIS", + "AUTHORING" + ], + "sub_group_identifiers": [ + "Natassia Geertz1688027238969", + "Danna Stopps1688027238995", + "Shayne Tewnion1688027240686" + ], + "visibility": "SHARABLE", + "role_identifiers": [ + "c21686a7-686c-468f-a2a2-8e7ce0b6f0f7", + "3eee6388-030a-4a11-8f2f-ea5a70ca6a9e" + ], + "record_offset": 2, + "record_size": 9, + "sort_options": { + "field_name": "AUTHOR" + } + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/groups/search", + "operationId": "searchUserGroups", + "scenario": "positive", + "type": "AUTOMATIC", + "testId": 1363 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "description": "Donec odio justo, sollicitudin ut, suscipit a, feugiat et, eros. Vestibulum ac est lacinia nisi venenatis tristique. Fusce congue, diam id ornare imperdiet, sapien urna pretium nisl, ut volutpat sapien arcu sed augue. Aliquam erat volutpat.", + "display_name": "gteasd", + "group_identifier": "Linnie Schult1688027240710", + "sub_group_identifiers": [ + "Natassia Geertz1688027238969", + "Danna Stopps1688027238995", + "Shayne Tewnion1688027240686" + ], + "type": "LDAP_GROUP", + "visibility": "NON_SHARABLE", + "role_identifiers": [ + "c21686a7-686c-468f-a2a2-8e7ce0b6f0f7", + "3eee6388-030a-4a11-8f2f-ea5a70ca6a9e", + "84d12fa8-f88b-4171-bb2a-26ab1bd68e6e" + ], + "record_offset": 9, + "record_size": 8, + "sort_options": { + "field_name": "CREATED", + "order": "ASC" + } + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/groups/search", + "operationId": "searchUserGroups", + "scenario": "positive", + "type": "AUTOMATIC", + "testId": 1364 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "group_identifier": "Lilyan Ongin1688027239024", + "privileges": [ + "LIVEBOARD_VERIFIER" + ], + "sub_group_identifiers": [ + "Natassia Geertz1688027238969", + "Danna Stopps1688027238995", + "Shayne Tewnion1688027240686" + ], + "type": "LOCAL_GROUP", + "visibility": "NON_SHARABLE", + "role_identifiers": [ + "c21686a7-686c-468f-a2a2-8e7ce0b6f0f7" + ], + "record_offset": 2, + "record_size": 3, + "sort_options": { + "order": "ASC" + } + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/groups/search", + "operationId": "searchUserGroups", + "scenario": "positive", + "type": "AUTOMATIC", + "testId": 1365 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "default_liveboard_identifiers": [ + "e36ee65e-64be-436b-a29a-22d8998c4fae", + "327f4d60-c502-43b0-b1d4-c73df5031a2e", + "2ff57a24-cf90-485f-8b4b-45fc17474c6f" + ], + "description": "Cras pellentesque volutpat dui. Maecenas tristique, est et tempus semper, est quam pharetra magna, ac consequat metus sapien ut nunc. Vestibulum ante ipsum primis in faucibus orci luctus et ultrices posuere cubilia Curae; Mauris viverra diam vitae quam. Suspendisse potenti. Nullam porttitor lacus at turpis.", + "display_name": "bblissittf", + "group_identifier": "Filmer Ridesdale1688027239026", + "privileges": [ + "A3ANALYSIS", + "DEVELOPER" + ], + "sub_group_identifiers": [ + "Natassia Geertz1688027238969", + "Danna Stopps1688027238995" + ], + "type": "LDAP_GROUP", + "visibility": "NON_SHARABLE", + "role_identifiers": [ + "c21686a7-686c-468f-a2a2-8e7ce0b6f0f7", + "3eee6388-030a-4a11-8f2f-ea5a70ca6a9e" + ], + "record_offset": 1, + "record_size": 2 + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/groups/search", + "operationId": "searchUserGroups", + "scenario": "positive", + "type": "AUTOMATIC", + "testId": 1366 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "org_identifiers": [ + "0" + ], + "type": "LOCAL_GROUP", + "user_identifiers": [ + "3b4740ec-3626-4d54-8b7e-ebda45510fb6", + "994cdad7-2143-4936-a35f-8dd0f852e4d6", + "5dc626e5-1921-4758-a7bf-8501605aa59f" + ], + "visibility": "SHARABLE", + "record_offset": 8, + "record_size": 2, + "sort_options": { + "field_name": "AUTHOR", + "order": "DESC" + } + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/groups/search", + "operationId": "searchUserGroups", + "scenario": "positive", + "type": "AUTOMATIC", + "testId": 1367 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "default_liveboard_identifiers": [ + "e36ee65e-64be-436b-a29a-22d8998c4fae" + ], + "display_name": "sstutteh", + "group_identifier": "Granthem Marcam1688027240719", + "org_identifiers": [ + "0", + "0" + ], + "sub_group_identifiers": [ + "Natassia Geertz1688027238969" + ], + "role_identifiers": [ + "c21686a7-686c-468f-a2a2-8e7ce0b6f0f7", + "3eee6388-030a-4a11-8f2f-ea5a70ca6a9e" + ], + "record_offset": 10, + "record_size": 9, + "sort_options": { + "order": "DESC" + } + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/groups/search", + "operationId": "searchUserGroups", + "scenario": "positive", + "type": "AUTOMATIC", + "testId": 1368 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "default_liveboard_identifiers": [ + "e36ee65e-64be-436b-a29a-22d8998c4fae" + ], + "privileges": [ + "RANALYSIS", + "GROUP_ADMINISTRATION" + ], + "sub_group_identifiers": [ + "Natassia Geertz1688027238969" + ], + "type": "LDAP_GROUP", + "role_identifiers": [ + "c21686a7-686c-468f-a2a2-8e7ce0b6f0f7", + "3eee6388-030a-4a11-8f2f-ea5a70ca6a9e" + ], + "record_offset": 9, + "record_size": 9, + "sort_options": { + "order": "ASC" + } + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/groups/search", + "operationId": "searchUserGroups", + "scenario": "positive", + "type": "AUTOMATIC", + "testId": 1369 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "description": "Nullam molestie nibh in lectus.", + "display_name": "pcorsanj", + "group_identifier": "Justinian Franey1688027240723", + "org_identifiers": [ + "0", + "0" + ], + "sub_group_identifiers": [ + "Natassia Geertz1688027238969", + "Danna Stopps1688027238995", + "Shayne Tewnion1688027240686" + ], + "type": "LOCAL_GROUP", + "user_identifiers": [ + "3b4740ec-3626-4d54-8b7e-ebda45510fb6" + ], + "record_offset": 8, + "record_size": 7, + "sort_options": { + "field_name": "CREATED", + "order": "DESC" + } + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/groups/search", + "operationId": "searchUserGroups", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 1370 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "default_liveboard_identifiers": [ + "e36ee65e-64be-436b-a29a-22d8998c4fae", + "327f4d60-c502-43b0-b1d4-c73df5031a2e", + "2ff57a24-cf90-485f-8b4b-45fc17474c6f" + ], + "display_name": "wgidney6", + "group_identifier": "Rickard Sibbald1688027239010", + "org_identifiers": "DYYHYlWKeSmNdoe", + "sub_group_identifiers": [ + "Natassia Geertz1688027238969", + "Danna Stopps1688027238995", + "Shayne Tewnion1688027240686" + ], + "user_identifiers": [ + "3b4740ec-3626-4d54-8b7e-ebda45510fb6" + ], + "visibility": "NON_SHARABLE", + "role_identifiers": [ + "c21686a7-686c-468f-a2a2-8e7ce0b6f0f7" + ], + "record_offset": 8, + "record_size": 4, + "sort_options": { + "field_name": "NAME" + } + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/groups/search", + "operationId": "searchUserGroups", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 1371 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "default_liveboard_identifiers": "QqNJiStueSOcCyU", + "description": "Cras pellentesque volutpat dui. Maecenas tristique, est et tempus semper, est quam pharetra magna, ac consequat metus sapien ut nunc. Vestibulum ante ipsum primis in faucibus orci luctus et ultrices posuere cubilia Curae; Mauris viverra diam vitae quam. Suspendisse potenti. Nullam porttitor lacus at turpis.", + "display_name": "bblissittf", + "group_identifier": "Filmer Ridesdale1688027239026", + "privileges": [ + "A3ANALYSIS", + "DEVELOPER" + ], + "sub_group_identifiers": [ + "Natassia Geertz1688027238969", + "Danna Stopps1688027238995" + ], + "type": "LDAP_GROUP", + "visibility": "NON_SHARABLE", + "role_identifiers": [ + "c21686a7-686c-468f-a2a2-8e7ce0b6f0f7", + "3eee6388-030a-4a11-8f2f-ea5a70ca6a9e" + ], + "record_offset": 1, + "record_size": 2 + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/groups/search", + "operationId": "searchUserGroups", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 1372 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "default_liveboard_identifiers": "mqUigGdpTUWVHor", + "description": "Mauris ullamcorper purus sit amet nulla.", + "display_name": "cpavlasek7", + "group_identifier": "Bernette Curthoys1688027239012", + "org_identifiers": [ + "0", + "0", + "0" + ], + "privileges": [ + "SYNCMANAGEMENT" + ], + "sub_group_identifiers": [ + "Natassia Geertz1688027238969", + "Danna Stopps1688027238995", + "Shayne Tewnion1688027240686" + ], + "type": "LDAP_GROUP", + "user_identifiers": [ + "3b4740ec-3626-4d54-8b7e-ebda45510fb6", + "994cdad7-2143-4936-a35f-8dd0f852e4d6", + "5dc626e5-1921-4758-a7bf-8501605aa59f" + ], + "visibility": "NON_SHARABLE", + "record_offset": 7, + "record_size": 6 + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/groups/search", + "operationId": "searchUserGroups", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 1373 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "display_name": "wfitzerb", + "type": [ + "LOCAL_GROUP" + ], + "visibility": "SHARABLE", + "record_offset": 5, + "record_size": 8 + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/groups/search", + "operationId": "searchUserGroups", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 1374 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "default_liveboard_identifiers": [ + "e36ee65e-64be-436b-a29a-22d8998c4fae" + ], + "privileges": [ + "RANALYSIS", + "GROUP_ADMINISTRATION" + ], + "sub_group_identifiers": "NmOwUgJDpoAPHZs", + "type": "LDAP_GROUP", + "role_identifiers": [ + "c21686a7-686c-468f-a2a2-8e7ce0b6f0f7", + "3eee6388-030a-4a11-8f2f-ea5a70ca6a9e" + ], + "record_offset": 9, + "record_size": 9, + "sort_options": { + "order": "ASC" + } + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/groups/search", + "operationId": "searchUserGroups", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 1375 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "default_liveboard_identifiers": [ + "e36ee65e-64be-436b-a29a-22d8998c4fae" + ], + "display_name": "sstutteh", + "group_identifier": "Granthem Marcam1688027240719", + "org_identifiers": "kcBhpEIZyiwzYQc", + "sub_group_identifiers": [ + "Natassia Geertz1688027238969" + ], + "role_identifiers": [ + "c21686a7-686c-468f-a2a2-8e7ce0b6f0f7", + "3eee6388-030a-4a11-8f2f-ea5a70ca6a9e" + ], + "record_offset": 10, + "record_size": 9, + "sort_options": { + "order": "DESC" + } + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/groups/search", + "operationId": "searchUserGroups", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 1376 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "description": "In est risus, auctor sed, tristique in, tempus sit amet, sem. Fusce consequat. Nulla nisl. Nunc nisl.", + "display_name": "jlesmonde8", + "group_identifier": "Warden Pelz1688027239013", + "privileges": [ + "DATADOWNLOADING", + "SHAREWITHALL", + "PREVIEW_THOUGHTSPOT_SAGE" + ], + "role_identifiers": [ + "c21686a7-686c-468f-a2a2-8e7ce0b6f0f7", + "3eee6388-030a-4a11-8f2f-ea5a70ca6a9e", + "84d12fa8-f88b-4171-bb2a-26ab1bd68e6e" + ], + "record_offset": 6, + "record_size": 5, + "sort_options": [ + [ + "order", + "DESC" + ] + ] + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/groups/search", + "operationId": "searchUserGroups", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 1377 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "default_liveboard_identifiers": [ + "e36ee65e-64be-436b-a29a-22d8998c4fae", + "327f4d60-c502-43b0-b1d4-c73df5031a2e" + ], + "description": "Integer ac leo. Pellentesque ultrices mattis odio. Donec vitae nisi. Nam ultrices, libero non mattis pulvinar, nulla pede ullamcorper augue, a suscipit nulla elit ac nulla.", + "group_identifier": "Shayne Tewnion1688027240686", + "org_identifiers": [ + "0", + "0", + "0" + ], + "privileges": "DtipuHnyalMBJUY", + "sub_group_identifiers": [ + "Natassia Geertz1688027238969", + "Danna Stopps1688027238995" + ], + "type": "LDAP_GROUP", + "user_identifiers": [ + "3b4740ec-3626-4d54-8b7e-ebda45510fb6", + "994cdad7-2143-4936-a35f-8dd0f852e4d6" + ], + "record_offset": 1, + "record_size": 6, + "sort_options": { + "field_name": "CREATED", + "order": "DESC" + } + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/groups/search", + "operationId": "searchUserGroups", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 1378 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "default_liveboard_identifiers": [ + "e36ee65e-64be-436b-a29a-22d8998c4fae", + "327f4d60-c502-43b0-b1d4-c73df5031a2e" + ], + "description": "Mauris ullamcorper purus sit amet nulla.", + "display_name": "cpavlasek7", + "group_identifier": "Bernette Curthoys1688027239012", + "org_identifiers": [ + "0", + "0", + "0" + ], + "privileges": [ + "SYNCMANAGEMENT" + ], + "sub_group_identifiers": [ + "Natassia Geertz1688027238969", + "Danna Stopps1688027238995", + "Shayne Tewnion1688027240686" + ], + "type": "LDAP_GROUP", + "user_identifiers": [ + "3b4740ec-3626-4d54-8b7e-ebda45510fb6", + "994cdad7-2143-4936-a35f-8dd0f852e4d6", + "5dc626e5-1921-4758-a7bf-8501605aa59f" + ], + "visibility": [ + "NON_SHARABLE" + ], + "record_offset": 7, + "record_size": 6 + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/groups/search", + "operationId": "searchUserGroups", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 1379 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "org_identifiers": [ + "0" + ], + "type": "LOCAL_GROUP", + "user_identifiers": [ + "3b4740ec-3626-4d54-8b7e-ebda45510fb6", + "994cdad7-2143-4936-a35f-8dd0f852e4d6", + "5dc626e5-1921-4758-a7bf-8501605aa59f" + ], + "visibility": "SHARABLE", + "record_offset": 8, + "record_size": 2, + "sort_options": { + "field_name": "AUTHOR", + "order": "DESC" + } + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/groups/search", + "operationId": "searchUserGroups", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 1380 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "default_liveboard_identifiers": [ + "e36ee65e-64be-436b-a29a-22d8998c4fae", + "327f4d60-c502-43b0-b1d4-c73df5031a2e" + ], + "description": "Aliquam augue quam, sollicitudin vitae, consectetuer eget, rutrum at, lorem.", + "group_identifier": "Sacha Piffe1688027239017", + "sub_group_identifiers": [ + "Natassia Geertz1688027238969", + "Danna Stopps1688027238995" + ], + "visibility": "NON_SHARABLE", + "record_offset": 9, + "record_size": 10 + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/groups/search", + "operationId": "searchUserGroups", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 1381 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "default_liveboard_identifiers": [ + "e36ee65e-64be-436b-a29a-22d8998c4fae", + "327f4d60-c502-43b0-b1d4-c73df5031a2e" + ], + "description": "Quisque ut erat. Curabitur gravida nisi at nibh.", + "group_identifier": "Natassia Geertz1688027238969", + "org_identifiers": [ + "0", + "0", + "0" + ], + "privileges": "dogbYRrNGriOehJ", + "sub_group_identifiers": [ + "Natassia Geertz1688027238969" + ], + "user_identifiers": [ + "3b4740ec-3626-4d54-8b7e-ebda45510fb6", + "994cdad7-2143-4936-a35f-8dd0f852e4d6", + "5dc626e5-1921-4758-a7bf-8501605aa59f" + ], + "visibility": "NON_SHARABLE", + "record_offset": 1, + "record_size": 8 + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/groups/search", + "operationId": "searchUserGroups", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 1382 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "default_liveboard_identifiers": "bAdFkpIYzKnFWCs", + "description": "Proin interdum mauris non ligula pellentesque ultrices. Phasellus id sapien in sapien iaculis congue. Vivamus metus arcu, adipiscing molestie, hendrerit at, vulputate vitae, nisl. Aenean lectus. Pellentesque eget nunc.", + "display_name": "csaintepaul1", + "group_identifier": "Danna Stopps1688027238995", + "org_identifiers": [ + "0", + "0", + "0" + ], + "record_offset": 4, + "record_size": 10, + "sort_options": { + "field_name": "NAME" + } + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/groups/search", + "operationId": "searchUserGroups", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 1383 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "default_liveboard_identifiers": [ + "e36ee65e-64be-436b-a29a-22d8998c4fae" + ], + "description": "Proin interdum mauris non ligula pellentesque ultrices. Phasellus id sapien in sapien iaculis congue. Vivamus metus arcu, adipiscing molestie, hendrerit at, vulputate vitae, nisl. Aenean lectus. Pellentesque eget nunc.", + "display_name": "csaintepaul1", + "group_identifier": [ + "Danna", + "Stopps1688027238995" + ], + "org_identifiers": [ + "0", + "0", + "0" + ], + "record_offset": 4, + "record_size": 10, + "sort_options": { + "field_name": "NAME" + } + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/groups/search", + "operationId": "searchUserGroups", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 1384 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "default_liveboard_identifiers": [ + "e36ee65e-64be-436b-a29a-22d8998c4fae", + "327f4d60-c502-43b0-b1d4-c73df5031a2e" + ], + "description": "Quisque ut erat. Curabitur gravida nisi at nibh.", + "group_identifier": [ + "Natassia", + "Geertz1688027238969" + ], + "org_identifiers": [ + "0", + "0", + "0" + ], + "privileges": [ + "USERMANAGEMENT", + "AUTHORING" + ], + "sub_group_identifiers": [ + "Natassia Geertz1688027238969" + ], + "user_identifiers": [ + "3b4740ec-3626-4d54-8b7e-ebda45510fb6", + "994cdad7-2143-4936-a35f-8dd0f852e4d6", + "5dc626e5-1921-4758-a7bf-8501605aa59f" + ], + "visibility": "NON_SHARABLE", + "record_offset": 1, + "record_size": 8 + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/report/liveboard", + "operationId": "exportLiveboardReport", + "scenario": "positive", + "type": "AUTOMATIC", + "testId": 1385 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "metadata_identifier": "2ff57a24-cf90-485f-8b4b-45fc17474c6f", + "visualization_identifiers": null, + "transient_content": "Douglass Baldrick", + "pdf_options": { + "include_cover_page": false, + "truncate_table": false + }, + "png_options": { + "include_filter_page": false + } + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/report/liveboard", + "operationId": "exportLiveboardReport", + "scenario": "positive", + "type": "AUTOMATIC", + "testId": 1386 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "metadata_identifier": "33248a57-cc70-4e39-9199-fb5092283381", + "visualization_identifiers": null, + "file_format": "XLSX", + "pdf_options": { + "include_cover_page": false, + "include_custom_logo": false, + "include_filter_page": false, + "include_page_number": false, + "page_orientation": "PORTRAIT" + }, + "png_options": { + "include_cover_page": false + } + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/report/liveboard", + "operationId": "exportLiveboardReport", + "scenario": "positive", + "type": "AUTOMATIC", + "testId": 1387 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "metadata_identifier": "6715f768-8930-4180-9a3d-1efdbfaa8e7f", + "visualization_identifiers": null, + "transient_content": "Waiter Speere", + "file_format": "PNG", + "pdf_options": { + "include_cover_page": true, + "include_custom_logo": true, + "page_footer_text": "luctus" + }, + "png_options": { + "include_cover_page": true, + "include_filter_page": false + } + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/report/liveboard", + "operationId": "exportLiveboardReport", + "scenario": "positive", + "type": "AUTOMATIC", + "testId": 1388 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "metadata_identifier": "b2d68a4f-cf67-4723-966f-8a592fdbf8b9", + "visualization_identifiers": null, + "pdf_options": { + "include_cover_page": false, + "include_custom_logo": true, + "include_filter_page": false, + "page_orientation": "LANDSCAPE", + "truncate_table": true, + "page_footer_text": "in eleifend" + } + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/report/liveboard", + "operationId": "exportLiveboardReport", + "scenario": "positive", + "type": "AUTOMATIC", + "testId": 1389 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "metadata_identifier": "262abdac-b00f-4f5f-ad33-fcf10154184f", + "visualization_identifiers": null, + "transient_content": "Kaile Labon", + "pdf_options": { + "include_cover_page": false, + "include_filter_page": false, + "include_page_number": false, + "page_orientation": "PORTRAIT" + }, + "png_options": { + "include_filter_page": true + } + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/report/liveboard", + "operationId": "exportLiveboardReport", + "scenario": "positive", + "type": "AUTOMATIC", + "testId": 1390 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "metadata_identifier": "327f4d60-c502-43b0-b1d4-c73df5031a2e", + "file_format": "XLSX", + "pdf_options": { + "include_cover_page": false, + "include_filter_page": false, + "page_orientation": "PORTRAIT" + }, + "png_options": { + "include_cover_page": true + } + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/report/liveboard", + "operationId": "exportLiveboardReport", + "scenario": "positive", + "type": "AUTOMATIC", + "testId": 1391 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "metadata_identifier": "601be8e5-140e-477c-8812-843795306438", + "transient_content": "Sayre Percival", + "pdf_options": { + "include_custom_logo": true, + "include_page_number": false, + "page_orientation": "PORTRAIT", + "truncate_table": false + }, + "png_options": { + "include_cover_page": true + } + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/report/liveboard", + "operationId": "exportLiveboardReport", + "scenario": "positive", + "type": "AUTOMATIC", + "testId": 1392 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "metadata_identifier": "061457a2-27bc-43a9-9754-0cd873691bf0", + "transient_content": "Cleon Kleinfeld", + "pdf_options": { + "include_cover_page": true, + "page_orientation": "PORTRAIT", + "page_footer_text": "ante" + }, + "png_options": { + "include_cover_page": false + } + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/report/liveboard", + "operationId": "exportLiveboardReport", + "scenario": "positive", + "type": "AUTOMATIC", + "testId": 1393 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "metadata_identifier": "e36ee65e-64be-436b-a29a-22d8998c4fae", + "visualization_identifiers": null, + "file_format": "PNG", + "pdf_options": { + "include_filter_page": false, + "page_orientation": "LANDSCAPE", + "truncate_table": false + } + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/report/liveboard", + "operationId": "exportLiveboardReport", + "scenario": "positive", + "type": "AUTOMATIC", + "testId": 1394 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "metadata_identifier": "c836ad16-660d-4d28-a3a0-e07cb9eb6ab1", + "transient_content": "Rozele Binns", + "file_format": "PNG", + "pdf_options": { + "include_filter_page": true, + "include_page_number": false, + "truncate_table": true + }, + "png_options": { + "include_cover_page": false + } + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/report/liveboard", + "operationId": "exportLiveboardReport", + "scenario": "positive", + "type": "AUTOMATIC", + "testId": 1395 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "metadata_identifier": "2ff57a24-cf90-485f-8b4b-45fc17474c6f", + "visualization_identifiers": null, + "pdf_options": { + "include_page_number": true, + "page_orientation": "LANDSCAPE", + "truncate_table": false + } + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/report/liveboard", + "operationId": "exportLiveboardReport", + "scenario": "positive", + "type": "AUTOMATIC", + "testId": 1396 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "metadata_identifier": "33248a57-cc70-4e39-9199-fb5092283381", + "transient_content": "Linn Peregrine", + "file_format": "PDF", + "pdf_options": { + "include_cover_page": true, + "include_custom_logo": false, + "page_orientation": "LANDSCAPE", + "truncate_table": true + }, + "png_options": { + "include_filter_page": false + } + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/report/liveboard", + "operationId": "exportLiveboardReport", + "scenario": "positive", + "type": "AUTOMATIC", + "testId": 1397 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "metadata_identifier": "6715f768-8930-4180-9a3d-1efdbfaa8e7f", + "visualization_identifiers": null, + "pdf_options": { + "include_cover_page": false, + "include_custom_logo": false, + "include_filter_page": true, + "page_orientation": "PORTRAIT" + }, + "png_options": { + "include_filter_page": true + } + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/report/liveboard", + "operationId": "exportLiveboardReport", + "scenario": "positive", + "type": "AUTOMATIC", + "testId": 1398 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "metadata_identifier": "b2d68a4f-cf67-4723-966f-8a592fdbf8b9", + "visualization_identifiers": null, + "transient_content": "Tobe Merrigans", + "file_format": "CSV", + "pdf_options": { + "include_custom_logo": false, + "include_page_number": true, + "truncate_table": true, + "page_footer_text": "maecenas tristique" + } + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/report/liveboard", + "operationId": "exportLiveboardReport", + "scenario": "positive", + "type": "AUTOMATIC", + "testId": 1399 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "metadata_identifier": "262abdac-b00f-4f5f-ad33-fcf10154184f", + "visualization_identifiers": null, + "pdf_options": { + "include_cover_page": false, + "include_custom_logo": true, + "page_orientation": "LANDSCAPE", + "page_footer_text": "tempor turpis" + } + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/report/liveboard", + "operationId": "exportLiveboardReport", + "scenario": "positive", + "type": "AUTOMATIC", + "testId": 1400 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "metadata_identifier": "327f4d60-c502-43b0-b1d4-c73df5031a2e", + "visualization_identifiers": null, + "pdf_options": { + "include_cover_page": false, + "include_custom_logo": true, + "include_filter_page": true, + "include_page_number": false, + "truncate_table": true, + "page_footer_text": "phasellus id" + }, + "png_options": { + "include_cover_page": false, + "include_filter_page": true + } + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/report/liveboard", + "operationId": "exportLiveboardReport", + "scenario": "positive", + "type": "AUTOMATIC", + "testId": 1401 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "metadata_identifier": "601be8e5-140e-477c-8812-843795306438", + "pdf_options": { + "include_cover_page": false, + "truncate_table": true, + "page_footer_text": "consectetuer adipiscing" + }, + "png_options": { + "include_cover_page": true, + "include_filter_page": false + } + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/report/liveboard", + "operationId": "exportLiveboardReport", + "scenario": "positive", + "type": "AUTOMATIC", + "testId": 1402 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "metadata_identifier": "061457a2-27bc-43a9-9754-0cd873691bf0", + "visualization_identifiers": null, + "file_format": "PDF", + "pdf_options": { + "include_filter_page": false, + "include_page_number": false, + "page_orientation": "PORTRAIT", + "truncate_table": true + }, + "png_options": { + "include_cover_page": false, + "include_filter_page": false + } + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/report/liveboard", + "operationId": "exportLiveboardReport", + "scenario": "positive", + "type": "AUTOMATIC", + "testId": 1403 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "metadata_identifier": "e36ee65e-64be-436b-a29a-22d8998c4fae", + "visualization_identifiers": null, + "file_format": "CSV", + "pdf_options": { + "include_filter_page": true, + "include_page_number": false, + "page_footer_text": "amet" + }, + "png_options": { + "include_filter_page": false + } + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/report/liveboard", + "operationId": "exportLiveboardReport", + "scenario": "positive", + "type": "AUTOMATIC", + "testId": 1404 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "metadata_identifier": "c836ad16-660d-4d28-a3a0-e07cb9eb6ab1", + "visualization_identifiers": null, + "transient_content": "Kermie Janning", + "file_format": "PDF", + "pdf_options": { + "include_page_number": false, + "truncate_table": false + }, + "png_options": { + "include_cover_page": false + } + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/report/liveboard", + "operationId": "exportLiveboardReport", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 1405 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "metadata_identifier": null, + "visualization_identifiers": null, + "file_format": "CSV", + "pdf_options": { + "include_filter_page": true, + "include_page_number": false, + "page_footer_text": "amet" + }, + "png_options": { + "include_filter_page": false + } + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/report/liveboard", + "operationId": "exportLiveboardReport", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 1406 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "metadata_identifier": null, + "visualization_identifiers": null, + "pdf_options": { + "include_page_number": true, + "page_orientation": "LANDSCAPE", + "truncate_table": false + } + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/report/liveboard", + "operationId": "exportLiveboardReport", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 1407 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "metadata_identifier": null, + "visualization_identifiers": null, + "file_format": "PNG", + "pdf_options": { + "include_filter_page": false, + "page_orientation": "LANDSCAPE", + "truncate_table": false + } + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/report/liveboard", + "operationId": "exportLiveboardReport", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 1408 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "metadata_identifier": null, + "transient_content": "Linn Peregrine", + "file_format": "PDF", + "pdf_options": { + "include_cover_page": true, + "include_custom_logo": false, + "page_orientation": "LANDSCAPE", + "truncate_table": true + }, + "png_options": { + "include_filter_page": false + } + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/report/liveboard", + "operationId": "exportLiveboardReport", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 1409 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "metadata_identifier": null, + "visualization_identifiers": null, + "pdf_options": { + "include_cover_page": false, + "include_custom_logo": false, + "include_filter_page": true, + "page_orientation": "PORTRAIT" + }, + "png_options": { + "include_filter_page": true + } + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/report/liveboard", + "operationId": "exportLiveboardReport", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 1410 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "metadata_identifier": null, + "transient_content": "Linn Peregrine", + "file_format": "PDF", + "pdf_options": { + "include_cover_page": true, + "include_custom_logo": false, + "page_orientation": "LANDSCAPE", + "truncate_table": true + }, + "png_options": { + "include_filter_page": false + } + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/report/liveboard", + "operationId": "exportLiveboardReport", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 1411 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "metadata_identifier": null, + "visualization_identifiers": null, + "transient_content": "Tobe Merrigans", + "file_format": "CSV", + "pdf_options": { + "include_custom_logo": false, + "include_page_number": true, + "truncate_table": true, + "page_footer_text": "maecenas tristique" + } + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/report/liveboard", + "operationId": "exportLiveboardReport", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 1412 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "metadata_identifier": null, + "visualization_identifiers": null, + "transient_content": "Kaile Labon", + "pdf_options": { + "include_cover_page": false, + "include_filter_page": false, + "include_page_number": false, + "page_orientation": "PORTRAIT" + }, + "png_options": { + "include_filter_page": true + } + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/report/liveboard", + "operationId": "exportLiveboardReport", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 1413 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "metadata_identifier": null, + "visualization_identifiers": null, + "transient_content": "Kermie Janning", + "file_format": "PDF", + "pdf_options": { + "include_page_number": false, + "truncate_table": false + }, + "png_options": { + "include_cover_page": false + } + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/report/liveboard", + "operationId": "exportLiveboardReport", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 1414 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "metadata_identifier": null, + "visualization_identifiers": null, + "file_format": "PDF", + "pdf_options": { + "include_filter_page": false, + "include_page_number": false, + "page_orientation": "PORTRAIT", + "truncate_table": true + }, + "png_options": { + "include_cover_page": false, + "include_filter_page": false + } + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/report/liveboard", + "operationId": "exportLiveboardReport", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 1415 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "metadata_identifier": null, + "visualization_identifiers": null, + "file_format": "PNG", + "pdf_options": { + "include_filter_page": false, + "page_orientation": "LANDSCAPE", + "truncate_table": false + } + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/report/liveboard", + "operationId": "exportLiveboardReport", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 1416 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "metadata_identifier": null, + "visualization_identifiers": null, + "transient_content": "Kaile Labon", + "pdf_options": { + "include_cover_page": false, + "include_filter_page": false, + "include_page_number": false, + "page_orientation": "PORTRAIT" + }, + "png_options": { + "include_filter_page": true + } + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/report/liveboard", + "operationId": "exportLiveboardReport", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 1417 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "metadata_identifier": null, + "visualization_identifiers": null, + "pdf_options": { + "include_page_number": true, + "page_orientation": "LANDSCAPE", + "truncate_table": false + } + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/report/liveboard", + "operationId": "exportLiveboardReport", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 1418 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "metadata_identifier": null, + "visualization_identifiers": null, + "transient_content": "Kermie Janning", + "file_format": "PDF", + "pdf_options": { + "include_page_number": false, + "truncate_table": false + }, + "png_options": { + "include_cover_page": false + } + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/report/liveboard", + "operationId": "exportLiveboardReport", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 1419 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "metadata_identifier": null, + "visualization_identifiers": null, + "pdf_options": { + "include_cover_page": false, + "include_custom_logo": true, + "include_filter_page": false, + "page_orientation": "LANDSCAPE", + "truncate_table": true, + "page_footer_text": "in eleifend" + } + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/report/liveboard", + "operationId": "exportLiveboardReport", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 1420 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "metadata_identifier": "601be8e5-140e-477c-8812-843795306438", + "pdf_options": [ + [ + "include_cover_page", + false + ], + [ + "truncate_table", + true + ], + [ + "page_footer_text", + "consectetuer adipiscing" + ] + ], + "png_options": { + "include_cover_page": true, + "include_filter_page": false + } + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/report/liveboard", + "operationId": "exportLiveboardReport", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 1421 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "metadata_identifier": "c836ad16-660d-4d28-a3a0-e07cb9eb6ab1", + "transient_content": "Rozele Binns", + "file_format": "PNG", + "pdf_options": [ + [ + "include_filter_page", + true + ], + [ + "include_page_number", + false + ], + [ + "truncate_table", + true + ] + ], + "png_options": { + "include_cover_page": false + } + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/report/liveboard", + "operationId": "exportLiveboardReport", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 1422 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "metadata_identifier": "262abdac-b00f-4f5f-ad33-fcf10154184f", + "visualization_identifiers": null, + "transient_content": "Kaile Labon", + "pdf_options": [ + [ + "include_cover_page", + false + ], + [ + "include_filter_page", + false + ], + [ + "include_page_number", + false + ], + [ + "page_orientation", + "PORTRAIT" + ] + ], + "png_options": { + "include_filter_page": true + } + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/report/liveboard", + "operationId": "exportLiveboardReport", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 1423 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "metadata_identifier": "c836ad16-660d-4d28-a3a0-e07cb9eb6ab1", + "transient_content": [ + "Rozele", + "Binns" + ], + "file_format": "PNG", + "pdf_options": { + "include_filter_page": true, + "include_page_number": false, + "truncate_table": true + }, + "png_options": { + "include_cover_page": false + } + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/report/liveboard", + "operationId": "exportLiveboardReport", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 1424 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "metadata_identifier": "2ff57a24-cf90-485f-8b4b-45fc17474c6f", + "visualization_identifiers": null, + "transient_content": "Douglass Baldrick", + "pdf_options": [ + [ + "include_cover_page", + false + ], + [ + "truncate_table", + false + ] + ], + "png_options": { + "include_filter_page": false + } + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/report/liveboard", + "operationId": "exportLiveboardReport", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 1425 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "metadata_identifier": "6715f768-8930-4180-9a3d-1efdbfaa8e7f", + "visualization_identifiers": null, + "pdf_options": { + "include_cover_page": false, + "include_custom_logo": false, + "include_filter_page": true, + "page_orientation": "PORTRAIT" + }, + "png_options": { + "include_filter_page": true + } + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/report/liveboard", + "operationId": "exportLiveboardReport", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 1426 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "metadata_identifier": [ + "2ff57a24-cf90-485f-8b4b-45fc17474c6f" + ], + "visualization_identifiers": null, + "pdf_options": { + "include_page_number": true, + "page_orientation": "LANDSCAPE", + "truncate_table": false + } + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/report/liveboard", + "operationId": "exportLiveboardReport", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 1427 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "metadata_identifier": "327f4d60-c502-43b0-b1d4-c73df5031a2e", + "visualization_identifiers": null, + "pdf_options": [ + [ + "include_cover_page", + false + ], + [ + "include_custom_logo", + true + ], + [ + "include_filter_page", + true + ], + [ + "include_page_number", + false + ], + [ + "truncate_table", + true + ], + [ + "page_footer_text", + "phasellus id" + ] + ], + "png_options": { + "include_cover_page": false, + "include_filter_page": true + } + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/report/liveboard", + "operationId": "exportLiveboardReport", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 1428 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "metadata_identifier": "b2d68a4f-cf67-4723-966f-8a592fdbf8b9", + "visualization_identifiers": null, + "pdf_options": [ + [ + "include_cover_page", + false + ], + [ + "include_custom_logo", + true + ], + [ + "include_filter_page", + false + ], + [ + "page_orientation", + "LANDSCAPE" + ], + [ + "truncate_table", + true + ], + [ + "page_footer_text", + "in eleifend" + ] + ] + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/report/liveboard", + "operationId": "exportLiveboardReport", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 1429 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "metadata_identifier": [ + "601be8e5-140e-477c-8812-843795306438" + ], + "transient_content": "Sayre Percival", + "pdf_options": { + "include_custom_logo": true, + "include_page_number": false, + "page_orientation": "PORTRAIT", + "truncate_table": false + }, + "png_options": { + "include_cover_page": true + } + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/report/liveboard", + "operationId": "exportLiveboardReport", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 1430 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "metadata_identifier": "262abdac-b00f-4f5f-ad33-fcf10154184f", + "visualization_identifiers": null, + "transient_content": "Kaile Labon", + "pdf_options": { + "include_cover_page": false, + "include_filter_page": false, + "include_page_number": false, + "page_orientation": "PORTRAIT" + }, + "png_options": { + "include_filter_page": true + } + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/report/liveboard", + "operationId": "exportLiveboardReport", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 1431 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "metadata_identifier": [ + "262abdac-b00f-4f5f-ad33-fcf10154184f" + ], + "visualization_identifiers": null, + "pdf_options": { + "include_cover_page": false, + "include_custom_logo": true, + "page_orientation": "LANDSCAPE", + "page_footer_text": "tempor turpis" + } + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/report/liveboard", + "operationId": "exportLiveboardReport", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 1432 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "metadata_identifier": "6715f768-8930-4180-9a3d-1efdbfaa8e7f", + "visualization_identifiers": null, + "pdf_options": { + "include_cover_page": false, + "include_custom_logo": false, + "include_filter_page": true, + "page_orientation": "PORTRAIT" + }, + "png_options": [ + [ + "include_filter_page", + true + ] + ] + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/report/liveboard", + "operationId": "exportLiveboardReport", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 1433 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "metadata_identifier": [ + "601be8e5-140e-477c-8812-843795306438" + ], + "pdf_options": { + "include_cover_page": false, + "truncate_table": true, + "page_footer_text": "consectetuer adipiscing" + }, + "png_options": { + "include_cover_page": true, + "include_filter_page": false + } + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/report/liveboard", + "operationId": "exportLiveboardReport", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 1434 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "metadata_identifier": "e36ee65e-64be-436b-a29a-22d8998c4fae", + "visualization_identifiers": null, + "file_format": "PNG", + "pdf_options": [ + [ + "include_filter_page", + false + ], + [ + "page_orientation", + "LANDSCAPE" + ], + [ + "truncate_table", + false + ] + ] + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/report/liveboard", + "operationId": "exportLiveboardReport", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 1435 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "metadata_identifier": "qoitmurSiAGitok", + "transient_content": "Cleon Kleinfeld", + "pdf_options": { + "include_cover_page": true, + "page_orientation": "PORTRAIT", + "page_footer_text": "ante" + }, + "png_options": { + "include_cover_page": false + } + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/report/liveboard", + "operationId": "exportLiveboardReport", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 1436 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "metadata_identifier": "hFWxirWcQqaqNuH", + "visualization_identifiers": null, + "pdf_options": { + "include_cover_page": false, + "include_custom_logo": true, + "page_orientation": "LANDSCAPE", + "page_footer_text": "tempor turpis" + } + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/report/liveboard", + "operationId": "exportLiveboardReport", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 1437 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "metadata_identifier": "wIAZyACDLlfcAbv", + "visualization_identifiers": null, + "pdf_options": { + "include_cover_page": false, + "include_custom_logo": true, + "include_filter_page": false, + "page_orientation": "LANDSCAPE", + "truncate_table": true, + "page_footer_text": "in eleifend" + } + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/report/liveboard", + "operationId": "exportLiveboardReport", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 1438 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "metadata_identifier": "xIKmxROPwKhQhav", + "visualization_identifiers": null, + "file_format": "PNG", + "pdf_options": { + "include_filter_page": false, + "page_orientation": "LANDSCAPE", + "truncate_table": false + } + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/report/liveboard", + "operationId": "exportLiveboardReport", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 1439 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "metadata_identifier": "fOvhqgaNoAJUnGT", + "pdf_options": { + "include_cover_page": false, + "truncate_table": true, + "page_footer_text": "consectetuer adipiscing" + }, + "png_options": { + "include_cover_page": true, + "include_filter_page": false + } + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/report/liveboard", + "operationId": "exportLiveboardReport", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 1440 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "metadata_identifier": "tVFqCVEIItuNVLZ", + "visualization_identifiers": null, + "transient_content": "Kermie Janning", + "file_format": "PDF", + "pdf_options": { + "include_page_number": false, + "truncate_table": false + }, + "png_options": { + "include_cover_page": false + } + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/report/liveboard", + "operationId": "exportLiveboardReport", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 1441 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "metadata_identifier": "XIvwqsTahGvSlkb", + "file_format": "XLSX", + "pdf_options": { + "include_cover_page": false, + "include_filter_page": false, + "page_orientation": "PORTRAIT" + }, + "png_options": { + "include_cover_page": true + } + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/report/liveboard", + "operationId": "exportLiveboardReport", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 1442 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "metadata_identifier": "NEReCFxTlUVoHsb", + "visualization_identifiers": null, + "file_format": "CSV", + "pdf_options": { + "include_filter_page": true, + "include_page_number": false, + "page_footer_text": "amet" + }, + "png_options": { + "include_filter_page": false + } + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/report/liveboard", + "operationId": "exportLiveboardReport", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 1443 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "metadata_identifier": "yaHjGdDVJoHUWqN", + "visualization_identifiers": null, + "transient_content": "Douglass Baldrick", + "pdf_options": { + "include_cover_page": false, + "truncate_table": false + }, + "png_options": { + "include_filter_page": false + } + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/report/liveboard", + "operationId": "exportLiveboardReport", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 1444 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "metadata_identifier": "bwvZFhvbmAgbfQm", + "transient_content": "Cleon Kleinfeld", + "pdf_options": { + "include_cover_page": true, + "page_orientation": "PORTRAIT", + "page_footer_text": "ante" + }, + "png_options": { + "include_cover_page": false + } + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/report/liveboard", + "operationId": "exportLiveboardReport", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 1445 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "metadata_identifier": "OONDoQIVRQrznzV", + "visualization_identifiers": null, + "transient_content": "Kermie Janning", + "file_format": "PDF", + "pdf_options": { + "include_page_number": false, + "truncate_table": false + }, + "png_options": { + "include_cover_page": false + } + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/report/liveboard", + "operationId": "exportLiveboardReport", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 1446 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "metadata_identifier": "fJaXfTvxgZkDEft", + "visualization_identifiers": null, + "transient_content": "Kermie Janning", + "file_format": "PDF", + "pdf_options": { + "include_page_number": false, + "truncate_table": false + }, + "png_options": { + "include_cover_page": false + } + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/report/liveboard", + "operationId": "exportLiveboardReport", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 1447 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "metadata_identifier": "nmntuoKyWdNtFnr", + "visualization_identifiers": null, + "file_format": "XLSX", + "pdf_options": { + "include_cover_page": false, + "include_custom_logo": false, + "include_filter_page": false, + "include_page_number": false, + "page_orientation": "PORTRAIT" + }, + "png_options": { + "include_cover_page": false + } + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/report/liveboard", + "operationId": "exportLiveboardReport", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 1448 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "metadata_identifier": "UzWJYYxOXLckJGY", + "transient_content": "Sayre Percival", + "pdf_options": { + "include_custom_logo": true, + "include_page_number": false, + "page_orientation": "PORTRAIT", + "truncate_table": false + }, + "png_options": { + "include_cover_page": true + } + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/report/liveboard", + "operationId": "exportLiveboardReport", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 1449 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "metadata_identifier": "OghYonXLDeNrIpW", + "visualization_identifiers": null, + "pdf_options": { + "include_cover_page": false, + "include_custom_logo": true, + "page_orientation": "LANDSCAPE", + "page_footer_text": "tempor turpis" + } + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/report/answer", + "operationId": "exportAnswerReport", + "scenario": "positive", + "type": "AUTOMATIC", + "testId": 1450 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "metadata_identifier": "7ca13c1d-51de-477e-94c8-f9372a8e30e3", + "file_format": null, + "runtime_filter": null, + "runtime_sort": null, + "visualization_identifiers": null + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/report/answer", + "operationId": "exportAnswerReport", + "scenario": "positive", + "type": "AUTOMATIC", + "testId": 1451 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "metadata_identifier": "a7826fd7-cca0-4e75-9c55-9bfbb18b7454", + "file_format": null, + "runtime_filter": null, + "runtime_sort": null, + "visualization_identifiers": null + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/report/answer", + "operationId": "exportAnswerReport", + "scenario": "positive", + "type": "AUTOMATIC", + "testId": 1452 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "metadata_identifier": "e4cd9bf1-4f77-4762-9035-543b3a00c294", + "file_format": null, + "runtime_filter": null, + "runtime_sort": null, + "visualization_identifiers": null + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/report/answer", + "operationId": "exportAnswerReport", + "scenario": "positive", + "type": "AUTOMATIC", + "testId": 1453 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "metadata_identifier": "21f35c49-c1f8-4f3d-a124-a0fbe5c978aa", + "file_format": null, + "runtime_filter": null, + "runtime_sort": null, + "visualization_identifiers": null + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/report/answer", + "operationId": "exportAnswerReport", + "scenario": "positive", + "type": "AUTOMATIC", + "testId": 1454 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "metadata_identifier": "73df2632-37ec-4e64-9f9c-c53e5efe2432", + "file_format": "XLSX", + "runtime_filter": null, + "runtime_sort": null, + "visualization_identifiers": null + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/report/answer", + "operationId": "exportAnswerReport", + "scenario": "positive", + "type": "AUTOMATIC", + "testId": 1455 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "metadata_identifier": "1be3019c-aa6e-47cf-a79e-3b7de02f25b4", + "file_format": "CSV", + "runtime_filter": null, + "runtime_sort": null, + "visualization_identifiers": null + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/report/answer", + "operationId": "exportAnswerReport", + "scenario": "positive", + "type": "AUTOMATIC", + "testId": 1456 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "metadata_identifier": "47294d3a-5dc4-44d3-bee5-7a586c606ed8", + "file_format": null, + "runtime_filter": null, + "runtime_sort": null, + "visualization_identifiers": null + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/report/answer", + "operationId": "exportAnswerReport", + "scenario": "positive", + "type": "AUTOMATIC", + "testId": 1457 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "metadata_identifier": "48d27aee-59c3-4a0c-8d2c-5a8989c55bb1", + "file_format": null, + "runtime_filter": null, + "runtime_sort": null, + "visualization_identifiers": null + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/report/answer", + "operationId": "exportAnswerReport", + "scenario": "positive", + "type": "AUTOMATIC", + "testId": 1458 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "metadata_identifier": "d343362c-0b26-41d4-bade-403c87b62ef3", + "file_format": null, + "runtime_filter": null, + "runtime_sort": null, + "visualization_identifiers": null + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/report/answer", + "operationId": "exportAnswerReport", + "scenario": "positive", + "type": "AUTOMATIC", + "testId": 1459 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "metadata_identifier": "10a69d10-e455-4473-b1c6-de1da8cc1ad5", + "file_format": null, + "runtime_filter": null, + "runtime_sort": null, + "visualization_identifiers": null + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/report/answer", + "operationId": "exportAnswerReport", + "scenario": "positive", + "type": "AUTOMATIC", + "testId": 1460 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "metadata_identifier": "7ca13c1d-51de-477e-94c8-f9372a8e30e3", + "file_format": null, + "runtime_filter": null, + "runtime_sort": null, + "visualization_identifiers": null + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/report/answer", + "operationId": "exportAnswerReport", + "scenario": "positive", + "type": "AUTOMATIC", + "testId": 1461 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "metadata_identifier": "a7826fd7-cca0-4e75-9c55-9bfbb18b7454", + "file_format": null, + "runtime_filter": null, + "runtime_sort": null, + "visualization_identifiers": null + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/report/answer", + "operationId": "exportAnswerReport", + "scenario": "positive", + "type": "AUTOMATIC", + "testId": 1462 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "metadata_identifier": "e4cd9bf1-4f77-4762-9035-543b3a00c294", + "file_format": null, + "runtime_filter": null, + "runtime_sort": null, + "visualization_identifiers": null + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/report/answer", + "operationId": "exportAnswerReport", + "scenario": "positive", + "type": "AUTOMATIC", + "testId": 1463 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "metadata_identifier": "21f35c49-c1f8-4f3d-a124-a0fbe5c978aa", + "file_format": null, + "runtime_filter": null, + "runtime_sort": null, + "visualization_identifiers": null + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/report/answer", + "operationId": "exportAnswerReport", + "scenario": "positive", + "type": "AUTOMATIC", + "testId": 1464 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "metadata_identifier": "73df2632-37ec-4e64-9f9c-c53e5efe2432", + "file_format": null, + "runtime_filter": null, + "runtime_sort": null, + "visualization_identifiers": null + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/report/answer", + "operationId": "exportAnswerReport", + "scenario": "positive", + "type": "AUTOMATIC", + "testId": 1465 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "metadata_identifier": "1be3019c-aa6e-47cf-a79e-3b7de02f25b4", + "file_format": "PNG", + "runtime_filter": null, + "runtime_sort": null, + "visualization_identifiers": null + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/report/answer", + "operationId": "exportAnswerReport", + "scenario": "positive", + "type": "AUTOMATIC", + "testId": 1466 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "metadata_identifier": "47294d3a-5dc4-44d3-bee5-7a586c606ed8", + "file_format": "PNG", + "runtime_filter": null, + "runtime_sort": null, + "visualization_identifiers": null + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/report/answer", + "operationId": "exportAnswerReport", + "scenario": "positive", + "type": "AUTOMATIC", + "testId": 1467 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "metadata_identifier": "48d27aee-59c3-4a0c-8d2c-5a8989c55bb1", + "file_format": "PNG", + "runtime_filter": null, + "runtime_sort": null, + "visualization_identifiers": null + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/report/answer", + "operationId": "exportAnswerReport", + "scenario": "positive", + "type": "AUTOMATIC", + "testId": 1468 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "metadata_identifier": "d343362c-0b26-41d4-bade-403c87b62ef3", + "file_format": null, + "runtime_filter": null, + "runtime_sort": null, + "visualization_identifiers": null + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/report/answer", + "operationId": "exportAnswerReport", + "scenario": "positive", + "type": "AUTOMATIC", + "testId": 1469 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "metadata_identifier": "10a69d10-e455-4473-b1c6-de1da8cc1ad5", + "file_format": null, + "runtime_filter": null, + "runtime_sort": null, + "visualization_identifiers": null + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/report/answer", + "operationId": "exportAnswerReport", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 1470 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "metadata_identifier": null, + "file_format": "PNG", + "runtime_filter": null, + "runtime_sort": null, + "visualization_identifiers": null + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/report/answer", + "operationId": "exportAnswerReport", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 1471 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "metadata_identifier": null, + "file_format": null, + "runtime_filter": null, + "runtime_sort": null, + "visualization_identifiers": null + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/report/answer", + "operationId": "exportAnswerReport", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 1472 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "metadata_identifier": null, + "file_format": null, + "runtime_filter": null, + "runtime_sort": null, + "visualization_identifiers": null + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/report/answer", + "operationId": "exportAnswerReport", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 1473 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "metadata_identifier": null, + "file_format": null, + "runtime_filter": null, + "runtime_sort": null, + "visualization_identifiers": null + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/report/answer", + "operationId": "exportAnswerReport", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 1474 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "metadata_identifier": null, + "file_format": null, + "runtime_filter": null, + "runtime_sort": null, + "visualization_identifiers": null + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/report/answer", + "operationId": "exportAnswerReport", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 1475 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "metadata_identifier": null, + "file_format": null, + "runtime_filter": null, + "runtime_sort": null, + "visualization_identifiers": null + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/report/answer", + "operationId": "exportAnswerReport", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 1476 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "metadata_identifier": null, + "file_format": "PNG", + "runtime_filter": null, + "runtime_sort": null, + "visualization_identifiers": null + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/report/answer", + "operationId": "exportAnswerReport", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 1477 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "metadata_identifier": null, + "file_format": null, + "runtime_filter": null, + "runtime_sort": null, + "visualization_identifiers": null + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/report/answer", + "operationId": "exportAnswerReport", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 1478 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "metadata_identifier": null, + "file_format": null, + "runtime_filter": null, + "runtime_sort": null, + "visualization_identifiers": null + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/report/answer", + "operationId": "exportAnswerReport", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 1479 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "metadata_identifier": null, + "file_format": null, + "runtime_filter": null, + "runtime_sort": null, + "visualization_identifiers": null + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/report/answer", + "operationId": "exportAnswerReport", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 1480 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "metadata_identifier": null, + "file_format": null, + "runtime_filter": null, + "runtime_sort": null, + "visualization_identifiers": null + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/report/answer", + "operationId": "exportAnswerReport", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 1481 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "metadata_identifier": null, + "file_format": null, + "runtime_filter": null, + "runtime_sort": null, + "visualization_identifiers": null + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/report/answer", + "operationId": "exportAnswerReport", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 1482 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "metadata_identifier": null, + "file_format": null, + "runtime_filter": null, + "runtime_sort": null, + "visualization_identifiers": null + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/report/answer", + "operationId": "exportAnswerReport", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 1483 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "metadata_identifier": null, + "file_format": null, + "runtime_filter": null, + "runtime_sort": null, + "visualization_identifiers": null + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/report/answer", + "operationId": "exportAnswerReport", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 1484 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "metadata_identifier": null, + "file_format": "PNG", + "runtime_filter": null, + "runtime_sort": null, + "visualization_identifiers": null + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/report/answer", + "operationId": "exportAnswerReport", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 1485 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "metadata_identifier": "21f35c49-c1f8-4f3d-a124-a0fbe5c978aa", + "file_format": null, + "runtime_filter": null, + "runtime_sort": null, + "visualization_identifiers": null + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/report/answer", + "operationId": "exportAnswerReport", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 1486 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "metadata_identifier": [ + "10a69d10-e455-4473-b1c6-de1da8cc1ad5" + ], + "file_format": null, + "runtime_filter": null, + "runtime_sort": null, + "visualization_identifiers": null + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/report/answer", + "operationId": "exportAnswerReport", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 1487 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "metadata_identifier": [ + "e4cd9bf1-4f77-4762-9035-543b3a00c294" + ], + "file_format": null, + "runtime_filter": null, + "runtime_sort": null, + "visualization_identifiers": null + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/report/answer", + "operationId": "exportAnswerReport", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 1488 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "metadata_identifier": "10a69d10-e455-4473-b1c6-de1da8cc1ad5", + "file_format": null, + "runtime_filter": null, + "runtime_sort": null, + "visualization_identifiers": null + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/report/answer", + "operationId": "exportAnswerReport", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 1489 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "metadata_identifier": [ + "d343362c-0b26-41d4-bade-403c87b62ef3" + ], + "file_format": null, + "runtime_filter": null, + "runtime_sort": null, + "visualization_identifiers": null + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/report/answer", + "operationId": "exportAnswerReport", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 1490 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "metadata_identifier": "1be3019c-aa6e-47cf-a79e-3b7de02f25b4", + "file_format": [ + "CSV" + ], + "runtime_filter": null, + "runtime_sort": null, + "visualization_identifiers": null + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/report/answer", + "operationId": "exportAnswerReport", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 1491 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "metadata_identifier": "21f35c49-c1f8-4f3d-a124-a0fbe5c978aa", + "file_format": null, + "runtime_filter": null, + "runtime_sort": null, + "visualization_identifiers": null + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/report/answer", + "operationId": "exportAnswerReport", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 1492 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "metadata_identifier": "48d27aee-59c3-4a0c-8d2c-5a8989c55bb1", + "file_format": null, + "runtime_filter": null, + "runtime_sort": null, + "visualization_identifiers": null + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/report/answer", + "operationId": "exportAnswerReport", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 1493 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "metadata_identifier": "a7826fd7-cca0-4e75-9c55-9bfbb18b7454", + "file_format": null, + "runtime_filter": null, + "runtime_sort": null, + "visualization_identifiers": null + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/report/answer", + "operationId": "exportAnswerReport", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 1494 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "metadata_identifier": "47294d3a-5dc4-44d3-bee5-7a586c606ed8", + "file_format": "PNG", + "runtime_filter": null, + "runtime_sort": null, + "visualization_identifiers": null + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/report/answer", + "operationId": "exportAnswerReport", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 1495 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "metadata_identifier": "21f35c49-c1f8-4f3d-a124-a0fbe5c978aa", + "file_format": null, + "runtime_filter": null, + "runtime_sort": null, + "visualization_identifiers": null + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/report/answer", + "operationId": "exportAnswerReport", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 1496 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "metadata_identifier": "d343362c-0b26-41d4-bade-403c87b62ef3", + "file_format": null, + "runtime_filter": null, + "runtime_sort": null, + "visualization_identifiers": null + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/report/answer", + "operationId": "exportAnswerReport", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 1497 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "metadata_identifier": "47294d3a-5dc4-44d3-bee5-7a586c606ed8", + "file_format": [ + "PNG" + ], + "runtime_filter": null, + "runtime_sort": null, + "visualization_identifiers": null + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/report/answer", + "operationId": "exportAnswerReport", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 1498 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "metadata_identifier": "73df2632-37ec-4e64-9f9c-c53e5efe2432", + "file_format": "XLSX", + "runtime_filter": null, + "runtime_sort": null, + "visualization_identifiers": null + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/report/answer", + "operationId": "exportAnswerReport", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 1499 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "metadata_identifier": "73df2632-37ec-4e64-9f9c-c53e5efe2432", + "file_format": null, + "runtime_filter": null, + "runtime_sort": null, + "visualization_identifiers": null + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/report/answer", + "operationId": "exportAnswerReport", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 1500 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "metadata_identifier": "qHBaELkmcedRlmR", + "file_format": "XLSX", + "runtime_filter": null, + "runtime_sort": null, + "visualization_identifiers": null + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/report/answer", + "operationId": "exportAnswerReport", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 1501 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "metadata_identifier": "fJAGtZZfuegwluu", + "file_format": "PNG", + "runtime_filter": null, + "runtime_sort": null, + "visualization_identifiers": null + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/report/answer", + "operationId": "exportAnswerReport", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 1502 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "metadata_identifier": "fVaHLAzwLEXtQrk", + "file_format": null, + "runtime_filter": null, + "runtime_sort": null, + "visualization_identifiers": null + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/report/answer", + "operationId": "exportAnswerReport", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 1503 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "metadata_identifier": "FkOtAVAnioSVJsd", + "file_format": null, + "runtime_filter": null, + "runtime_sort": null, + "visualization_identifiers": null + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/report/answer", + "operationId": "exportAnswerReport", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 1504 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "metadata_identifier": "AobdFVZfkufDsCp", + "file_format": "XLSX", + "runtime_filter": null, + "runtime_sort": null, + "visualization_identifiers": null + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/report/answer", + "operationId": "exportAnswerReport", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 1505 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "metadata_identifier": "tsRiLrWMNYnLOob", + "file_format": null, + "runtime_filter": null, + "runtime_sort": null, + "visualization_identifiers": null + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/report/answer", + "operationId": "exportAnswerReport", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 1506 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "metadata_identifier": "MChOWZauOAZlEty", + "file_format": "XLSX", + "runtime_filter": null, + "runtime_sort": null, + "visualization_identifiers": null + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/report/answer", + "operationId": "exportAnswerReport", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 1507 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "metadata_identifier": "dwfNtawThneYFUi", + "file_format": null, + "runtime_filter": null, + "runtime_sort": null, + "visualization_identifiers": null + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/report/answer", + "operationId": "exportAnswerReport", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 1508 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "metadata_identifier": "OMBcaGEmLyoxhrB", + "file_format": null, + "runtime_filter": null, + "runtime_sort": null, + "visualization_identifiers": null + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/report/answer", + "operationId": "exportAnswerReport", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 1509 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "metadata_identifier": "DrFPhAdgwEwVbIR", + "file_format": null, + "runtime_filter": null, + "runtime_sort": null, + "visualization_identifiers": null + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/report/answer", + "operationId": "exportAnswerReport", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 1510 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "metadata_identifier": "JBNiHxmKzlNCoqB", + "file_format": null, + "runtime_filter": null, + "runtime_sort": null, + "visualization_identifiers": null + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/report/answer", + "operationId": "exportAnswerReport", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 1511 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "metadata_identifier": "QzxizIFGXtfjcnf", + "file_format": null, + "runtime_filter": null, + "runtime_sort": null, + "visualization_identifiers": null + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/report/answer", + "operationId": "exportAnswerReport", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 1512 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "metadata_identifier": "OVJOInjIwyncAcZ", + "file_format": "XLSX", + "runtime_filter": null, + "runtime_sort": null, + "visualization_identifiers": null + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/report/answer", + "operationId": "exportAnswerReport", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 1513 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "metadata_identifier": "wcPWUcfHapETgMN", + "file_format": "CSV", + "runtime_filter": null, + "runtime_sort": null, + "visualization_identifiers": null + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/report/answer", + "operationId": "exportAnswerReport", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 1514 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "metadata_identifier": "GHrTfihNBdrCiYU", + "file_format": "PNG", + "runtime_filter": null, + "runtime_sort": null, + "visualization_identifiers": null + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/security/principals/fetch-permissions", + "operationId": "fetchPermissionsOfPrincipals", + "scenario": "positive", + "type": "AUTOMATIC", + "testId": 1515 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "principals": [ + { + "identifier": "4391d676-2dd8-4248-b6db-d973811f0122", + "type": "USER" + }, + { + "identifier": "314ac3fe-c5e1-4898-9cf7-29d9d455f052", + "type": "USER_GROUP" + } + ], + "metadata": [ + { + "type": "LOGICAL_TABLE", + "identifier": "d43d53ab-e8f3-4658-84bb-e61144e05616" + }, + { + "type": "ANSWER", + "identifier": "7ca13c1d-51de-477e-94c8-f9372a8e30e3" + }, + { + "type": "LOGICAL_TABLE", + "identifier": "af251fbc-8053-487d-8011-84686d97d1f4" + }, + { + "type": "ANSWER", + "identifier": "73df2632-37ec-4e64-9f9c-c53e5efe2432" + }, + { + "type": "LOGICAL_COLUMN", + "identifier": "7c365f4e-fe69-4cc0-8f04-23cd41a1c3b9" + } + ] + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/security/principals/fetch-permissions", + "operationId": "fetchPermissionsOfPrincipals", + "scenario": "positive", + "type": "AUTOMATIC", + "testId": 1516 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "principals": [ + { + "identifier": "4391d676-2dd8-4248-b6db-d973811f0122", + "type": "USER" + }, + { + "identifier": "314ac3fe-c5e1-4898-9cf7-29d9d455f052", + "type": "USER_GROUP" + }, + { + "identifier": "983ddaab-15cf-4c95-a21e-67383a67b6d1", + "type": "USER_GROUP" + } + ], + "metadata": [ + { + "type": "LOGICAL_TABLE", + "identifier": "d43d53ab-e8f3-4658-84bb-e61144e05616" + }, + { + "type": "ANSWER", + "identifier": "7ca13c1d-51de-477e-94c8-f9372a8e30e3" + } + ] + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/security/principals/fetch-permissions", + "operationId": "fetchPermissionsOfPrincipals", + "scenario": "positive", + "type": "AUTOMATIC", + "testId": 1517 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "principals": [ + { + "identifier": "4391d676-2dd8-4248-b6db-d973811f0122", + "type": "USER" + }, + { + "identifier": "314ac3fe-c5e1-4898-9cf7-29d9d455f052", + "type": "USER_GROUP" + }, + { + "identifier": "983ddaab-15cf-4c95-a21e-67383a67b6d1", + "type": "USER_GROUP" + } + ], + "metadata": [ + { + "type": "LOGICAL_TABLE", + "identifier": "d43d53ab-e8f3-4658-84bb-e61144e05616" + } + ] + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/security/principals/fetch-permissions", + "operationId": "fetchPermissionsOfPrincipals", + "scenario": "positive", + "type": "AUTOMATIC", + "testId": 1518 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "principals": [ + { + "identifier": "4391d676-2dd8-4248-b6db-d973811f0122", + "type": "USER" + }, + { + "identifier": "314ac3fe-c5e1-4898-9cf7-29d9d455f052", + "type": "USER_GROUP" + } + ] + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/security/principals/fetch-permissions", + "operationId": "fetchPermissionsOfPrincipals", + "scenario": "positive", + "type": "AUTOMATIC", + "testId": 1519 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "principals": [ + { + "identifier": "4391d676-2dd8-4248-b6db-d973811f0122", + "type": "USER" + }, + { + "identifier": "314ac3fe-c5e1-4898-9cf7-29d9d455f052", + "type": "USER_GROUP" + } + ], + "metadata": [ + { + "type": "LOGICAL_TABLE", + "identifier": "d43d53ab-e8f3-4658-84bb-e61144e05616" + }, + { + "type": "ANSWER", + "identifier": "7ca13c1d-51de-477e-94c8-f9372a8e30e3" + }, + { + "type": "LOGICAL_TABLE", + "identifier": "af251fbc-8053-487d-8011-84686d97d1f4" + } + ] + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/security/principals/fetch-permissions", + "operationId": "fetchPermissionsOfPrincipals", + "scenario": "positive", + "type": "AUTOMATIC", + "testId": 1520 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "principals": [ + { + "identifier": "4391d676-2dd8-4248-b6db-d973811f0122", + "type": "USER" + }, + { + "identifier": "314ac3fe-c5e1-4898-9cf7-29d9d455f052", + "type": "USER_GROUP" + } + ] + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/security/principals/fetch-permissions", + "operationId": "fetchPermissionsOfPrincipals", + "scenario": "positive", + "type": "AUTOMATIC", + "testId": 1521 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "principals": [ + { + "identifier": "4391d676-2dd8-4248-b6db-d973811f0122", + "type": "USER" + }, + { + "identifier": "314ac3fe-c5e1-4898-9cf7-29d9d455f052", + "type": "USER_GROUP" + }, + { + "identifier": "983ddaab-15cf-4c95-a21e-67383a67b6d1", + "type": "USER_GROUP" + } + ], + "metadata": [ + { + "type": "LOGICAL_TABLE", + "identifier": "d43d53ab-e8f3-4658-84bb-e61144e05616" + }, + { + "type": "ANSWER", + "identifier": "7ca13c1d-51de-477e-94c8-f9372a8e30e3" + }, + { + "type": "LOGICAL_TABLE", + "identifier": "af251fbc-8053-487d-8011-84686d97d1f4" + } + ] + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/security/principals/fetch-permissions", + "operationId": "fetchPermissionsOfPrincipals", + "scenario": "positive", + "type": "AUTOMATIC", + "testId": 1522 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "principals": [ + { + "identifier": "4391d676-2dd8-4248-b6db-d973811f0122", + "type": "USER" + }, + { + "identifier": "314ac3fe-c5e1-4898-9cf7-29d9d455f052", + "type": "USER_GROUP" + }, + { + "identifier": "983ddaab-15cf-4c95-a21e-67383a67b6d1", + "type": "USER_GROUP" + } + ] + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/security/principals/fetch-permissions", + "operationId": "fetchPermissionsOfPrincipals", + "scenario": "positive", + "type": "AUTOMATIC", + "testId": 1523 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "principals": [ + { + "identifier": "4391d676-2dd8-4248-b6db-d973811f0122", + "type": "USER" + } + ], + "metadata": [ + { + "type": "LOGICAL_TABLE", + "identifier": "d43d53ab-e8f3-4658-84bb-e61144e05616" + }, + { + "type": "ANSWER", + "identifier": "7ca13c1d-51de-477e-94c8-f9372a8e30e3" + }, + { + "type": "LOGICAL_TABLE", + "identifier": "af251fbc-8053-487d-8011-84686d97d1f4" + }, + { + "type": "ANSWER", + "identifier": "73df2632-37ec-4e64-9f9c-c53e5efe2432" + } + ] + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/security/principals/fetch-permissions", + "operationId": "fetchPermissionsOfPrincipals", + "scenario": "positive", + "type": "AUTOMATIC", + "testId": 1524 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "principals": [ + { + "identifier": "4391d676-2dd8-4248-b6db-d973811f0122", + "type": "USER" + } + ], + "metadata": [ + { + "type": "LOGICAL_TABLE", + "identifier": "d43d53ab-e8f3-4658-84bb-e61144e05616" + }, + { + "type": "ANSWER", + "identifier": "7ca13c1d-51de-477e-94c8-f9372a8e30e3" + }, + { + "type": "LOGICAL_TABLE", + "identifier": "af251fbc-8053-487d-8011-84686d97d1f4" + }, + { + "type": "ANSWER", + "identifier": "73df2632-37ec-4e64-9f9c-c53e5efe2432" + }, + { + "type": "LOGICAL_COLUMN", + "identifier": "7c365f4e-fe69-4cc0-8f04-23cd41a1c3b9" + } + ] + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/security/principals/fetch-permissions", + "operationId": "fetchPermissionsOfPrincipals", + "scenario": "positive", + "type": "AUTOMATIC", + "testId": 1525 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "principals": [ + { + "identifier": "4391d676-2dd8-4248-b6db-d973811f0122", + "type": "USER" + } + ], + "metadata": [ + { + "type": "LOGICAL_TABLE", + "identifier": "d43d53ab-e8f3-4658-84bb-e61144e05616" + }, + { + "type": "ANSWER", + "identifier": "7ca13c1d-51de-477e-94c8-f9372a8e30e3" + } + ] + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/security/principals/fetch-permissions", + "operationId": "fetchPermissionsOfPrincipals", + "scenario": "positive", + "type": "AUTOMATIC", + "testId": 1526 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "principals": [ + { + "identifier": "4391d676-2dd8-4248-b6db-d973811f0122", + "type": "USER" + } + ], + "metadata": [ + { + "type": "LOGICAL_TABLE", + "identifier": "d43d53ab-e8f3-4658-84bb-e61144e05616" + }, + { + "type": "ANSWER", + "identifier": "7ca13c1d-51de-477e-94c8-f9372a8e30e3" + }, + { + "type": "LOGICAL_TABLE", + "identifier": "af251fbc-8053-487d-8011-84686d97d1f4" + }, + { + "type": "ANSWER", + "identifier": "73df2632-37ec-4e64-9f9c-c53e5efe2432" + }, + { + "type": "LOGICAL_COLUMN", + "identifier": "7c365f4e-fe69-4cc0-8f04-23cd41a1c3b9" + } + ] + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/security/principals/fetch-permissions", + "operationId": "fetchPermissionsOfPrincipals", + "scenario": "positive", + "type": "AUTOMATIC", + "testId": 1527 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "principals": [ + { + "identifier": "4391d676-2dd8-4248-b6db-d973811f0122", + "type": "USER" + }, + { + "identifier": "314ac3fe-c5e1-4898-9cf7-29d9d455f052", + "type": "USER_GROUP" + } + ], + "metadata": [ + { + "type": "LOGICAL_TABLE", + "identifier": "d43d53ab-e8f3-4658-84bb-e61144e05616" + }, + { + "type": "ANSWER", + "identifier": "7ca13c1d-51de-477e-94c8-f9372a8e30e3" + } + ] + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/security/principals/fetch-permissions", + "operationId": "fetchPermissionsOfPrincipals", + "scenario": "positive", + "type": "AUTOMATIC", + "testId": 1528 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "principals": [ + { + "identifier": "4391d676-2dd8-4248-b6db-d973811f0122", + "type": "USER" + }, + { + "identifier": "314ac3fe-c5e1-4898-9cf7-29d9d455f052", + "type": "USER_GROUP" + }, + { + "identifier": "983ddaab-15cf-4c95-a21e-67383a67b6d1", + "type": "USER_GROUP" + } + ] + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/security/principals/fetch-permissions", + "operationId": "fetchPermissionsOfPrincipals", + "scenario": "positive", + "type": "AUTOMATIC", + "testId": 1529 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "principals": [ + { + "identifier": "4391d676-2dd8-4248-b6db-d973811f0122", + "type": "USER" + } + ] + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/security/principals/fetch-permissions", + "operationId": "fetchPermissionsOfPrincipals", + "scenario": "positive", + "type": "AUTOMATIC", + "testId": 1530 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "principals": [ + { + "identifier": "4391d676-2dd8-4248-b6db-d973811f0122", + "type": "USER" + }, + { + "identifier": "314ac3fe-c5e1-4898-9cf7-29d9d455f052", + "type": "USER_GROUP" + } + ] + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/security/principals/fetch-permissions", + "operationId": "fetchPermissionsOfPrincipals", + "scenario": "positive", + "type": "AUTOMATIC", + "testId": 1531 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "principals": [ + { + "identifier": "4391d676-2dd8-4248-b6db-d973811f0122", + "type": "USER" + } + ], + "metadata": [ + { + "type": "LOGICAL_TABLE", + "identifier": "d43d53ab-e8f3-4658-84bb-e61144e05616" + }, + { + "type": "ANSWER", + "identifier": "7ca13c1d-51de-477e-94c8-f9372a8e30e3" + }, + { + "type": "LOGICAL_TABLE", + "identifier": "af251fbc-8053-487d-8011-84686d97d1f4" + }, + { + "type": "ANSWER", + "identifier": "73df2632-37ec-4e64-9f9c-c53e5efe2432" + }, + { + "type": "LOGICAL_COLUMN", + "identifier": "7c365f4e-fe69-4cc0-8f04-23cd41a1c3b9" + } + ] + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/security/principals/fetch-permissions", + "operationId": "fetchPermissionsOfPrincipals", + "scenario": "positive", + "type": "AUTOMATIC", + "testId": 1532 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "principals": [ + { + "identifier": "4391d676-2dd8-4248-b6db-d973811f0122", + "type": "USER" + }, + { + "identifier": "314ac3fe-c5e1-4898-9cf7-29d9d455f052", + "type": "USER_GROUP" + } + ] + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/security/principals/fetch-permissions", + "operationId": "fetchPermissionsOfPrincipals", + "scenario": "positive", + "type": "AUTOMATIC", + "testId": 1533 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "principals": [ + { + "identifier": "4391d676-2dd8-4248-b6db-d973811f0122", + "type": "USER" + }, + { + "identifier": "314ac3fe-c5e1-4898-9cf7-29d9d455f052", + "type": "USER_GROUP" + } + ] + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/security/principals/fetch-permissions", + "operationId": "fetchPermissionsOfPrincipals", + "scenario": "positive", + "type": "AUTOMATIC", + "testId": 1534 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "principals": [ + { + "identifier": "4391d676-2dd8-4248-b6db-d973811f0122", + "type": "USER" + }, + { + "identifier": "314ac3fe-c5e1-4898-9cf7-29d9d455f052", + "type": "USER_GROUP" + }, + { + "identifier": "983ddaab-15cf-4c95-a21e-67383a67b6d1", + "type": "USER_GROUP" + } + ], + "metadata": [] + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/security/principals/fetch-permissions", + "operationId": "fetchPermissionsOfPrincipals", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 1535 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "principals": null + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/security/principals/fetch-permissions", + "operationId": "fetchPermissionsOfPrincipals", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 1536 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "principals": null, + "metadata": [] + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/security/principals/fetch-permissions", + "operationId": "fetchPermissionsOfPrincipals", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 1537 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "principals": null, + "metadata": [ + { + "type": "LOGICAL_TABLE", + "identifier": "d43d53ab-e8f3-4658-84bb-e61144e05616" + }, + { + "type": "ANSWER", + "identifier": "7ca13c1d-51de-477e-94c8-f9372a8e30e3" + }, + { + "type": "LOGICAL_TABLE", + "identifier": "af251fbc-8053-487d-8011-84686d97d1f4" + }, + { + "type": "ANSWER", + "identifier": "73df2632-37ec-4e64-9f9c-c53e5efe2432" + }, + { + "type": "LOGICAL_COLUMN", + "identifier": "7c365f4e-fe69-4cc0-8f04-23cd41a1c3b9" + } + ] + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/security/principals/fetch-permissions", + "operationId": "fetchPermissionsOfPrincipals", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 1538 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "principals": null, + "metadata": [ + { + "type": "LOGICAL_TABLE", + "identifier": "d43d53ab-e8f3-4658-84bb-e61144e05616" + }, + { + "type": "ANSWER", + "identifier": "7ca13c1d-51de-477e-94c8-f9372a8e30e3" + }, + { + "type": "LOGICAL_TABLE", + "identifier": "af251fbc-8053-487d-8011-84686d97d1f4" + } + ] + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/security/principals/fetch-permissions", + "operationId": "fetchPermissionsOfPrincipals", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 1539 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "principals": null + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/security/principals/fetch-permissions", + "operationId": "fetchPermissionsOfPrincipals", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 1540 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "principals": null + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/security/principals/fetch-permissions", + "operationId": "fetchPermissionsOfPrincipals", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 1541 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "principals": null, + "metadata": [ + { + "type": "LOGICAL_TABLE", + "identifier": "d43d53ab-e8f3-4658-84bb-e61144e05616" + }, + { + "type": "ANSWER", + "identifier": "7ca13c1d-51de-477e-94c8-f9372a8e30e3" + }, + { + "type": "LOGICAL_TABLE", + "identifier": "af251fbc-8053-487d-8011-84686d97d1f4" + } + ] + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/security/principals/fetch-permissions", + "operationId": "fetchPermissionsOfPrincipals", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 1542 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "principals": null + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/security/principals/fetch-permissions", + "operationId": "fetchPermissionsOfPrincipals", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 1543 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "principals": null + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/security/principals/fetch-permissions", + "operationId": "fetchPermissionsOfPrincipals", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 1544 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "principals": null, + "metadata": [ + { + "type": "LOGICAL_TABLE", + "identifier": "d43d53ab-e8f3-4658-84bb-e61144e05616" + }, + { + "type": "ANSWER", + "identifier": "7ca13c1d-51de-477e-94c8-f9372a8e30e3" + }, + { + "type": "LOGICAL_TABLE", + "identifier": "af251fbc-8053-487d-8011-84686d97d1f4" + } + ] + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/security/principals/fetch-permissions", + "operationId": "fetchPermissionsOfPrincipals", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 1545 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "principals": null, + "metadata": [ + { + "type": "LOGICAL_TABLE", + "identifier": "d43d53ab-e8f3-4658-84bb-e61144e05616" + }, + { + "type": "ANSWER", + "identifier": "7ca13c1d-51de-477e-94c8-f9372a8e30e3" + }, + { + "type": "LOGICAL_TABLE", + "identifier": "af251fbc-8053-487d-8011-84686d97d1f4" + }, + { + "type": "ANSWER", + "identifier": "73df2632-37ec-4e64-9f9c-c53e5efe2432" + }, + { + "type": "LOGICAL_COLUMN", + "identifier": "7c365f4e-fe69-4cc0-8f04-23cd41a1c3b9" + } + ] + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/security/principals/fetch-permissions", + "operationId": "fetchPermissionsOfPrincipals", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 1546 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "principals": null, + "metadata": [ + { + "type": "LOGICAL_TABLE", + "identifier": "d43d53ab-e8f3-4658-84bb-e61144e05616" + }, + { + "type": "ANSWER", + "identifier": "7ca13c1d-51de-477e-94c8-f9372a8e30e3" + }, + { + "type": "LOGICAL_TABLE", + "identifier": "af251fbc-8053-487d-8011-84686d97d1f4" + } + ] + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/security/principals/fetch-permissions", + "operationId": "fetchPermissionsOfPrincipals", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 1547 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "principals": null, + "metadata": [ + { + "type": "LOGICAL_TABLE", + "identifier": "d43d53ab-e8f3-4658-84bb-e61144e05616" + }, + { + "type": "ANSWER", + "identifier": "7ca13c1d-51de-477e-94c8-f9372a8e30e3" + }, + { + "type": "LOGICAL_TABLE", + "identifier": "af251fbc-8053-487d-8011-84686d97d1f4" + }, + { + "type": "ANSWER", + "identifier": "73df2632-37ec-4e64-9f9c-c53e5efe2432" + }, + { + "type": "LOGICAL_COLUMN", + "identifier": "7c365f4e-fe69-4cc0-8f04-23cd41a1c3b9" + } + ] + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/security/principals/fetch-permissions", + "operationId": "fetchPermissionsOfPrincipals", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 1548 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "principals": null, + "metadata": [ + { + "type": "LOGICAL_TABLE", + "identifier": "d43d53ab-e8f3-4658-84bb-e61144e05616" + }, + { + "type": "ANSWER", + "identifier": "7ca13c1d-51de-477e-94c8-f9372a8e30e3" + }, + { + "type": "LOGICAL_TABLE", + "identifier": "af251fbc-8053-487d-8011-84686d97d1f4" + }, + { + "type": "ANSWER", + "identifier": "73df2632-37ec-4e64-9f9c-c53e5efe2432" + } + ] + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/security/principals/fetch-permissions", + "operationId": "fetchPermissionsOfPrincipals", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 1549 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "principals": null, + "metadata": [ + { + "type": "LOGICAL_TABLE", + "identifier": "d43d53ab-e8f3-4658-84bb-e61144e05616" + }, + { + "type": "ANSWER", + "identifier": "7ca13c1d-51de-477e-94c8-f9372a8e30e3" + }, + { + "type": "LOGICAL_TABLE", + "identifier": "af251fbc-8053-487d-8011-84686d97d1f4" + }, + { + "type": "ANSWER", + "identifier": "73df2632-37ec-4e64-9f9c-c53e5efe2432" + }, + { + "type": "LOGICAL_COLUMN", + "identifier": "7c365f4e-fe69-4cc0-8f04-23cd41a1c3b9" + } + ] + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/security/principals/fetch-permissions", + "operationId": "fetchPermissionsOfPrincipals", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 1550 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "principals": "ghntoQzyEtuMxDe" + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/security/principals/fetch-permissions", + "operationId": "fetchPermissionsOfPrincipals", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 1551 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "principals": "ZnWxcKYgxdUiWvb", + "metadata": [ + { + "type": "LOGICAL_TABLE", + "identifier": "d43d53ab-e8f3-4658-84bb-e61144e05616" + }, + { + "type": "ANSWER", + "identifier": "7ca13c1d-51de-477e-94c8-f9372a8e30e3" + }, + { + "type": "LOGICAL_TABLE", + "identifier": "af251fbc-8053-487d-8011-84686d97d1f4" + }, + { + "type": "ANSWER", + "identifier": "73df2632-37ec-4e64-9f9c-c53e5efe2432" + }, + { + "type": "LOGICAL_COLUMN", + "identifier": "7c365f4e-fe69-4cc0-8f04-23cd41a1c3b9" + } + ] + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/security/principals/fetch-permissions", + "operationId": "fetchPermissionsOfPrincipals", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 1552 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "principals": "ersDcbamLjpAgOt", + "metadata": [ + { + "type": "LOGICAL_TABLE", + "identifier": "d43d53ab-e8f3-4658-84bb-e61144e05616" + }, + { + "type": "ANSWER", + "identifier": "7ca13c1d-51de-477e-94c8-f9372a8e30e3" + }, + { + "type": "LOGICAL_TABLE", + "identifier": "af251fbc-8053-487d-8011-84686d97d1f4" + } + ] + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/security/principals/fetch-permissions", + "operationId": "fetchPermissionsOfPrincipals", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 1553 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "principals": "FRjYNDfRnzoAwZQ" + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/security/principals/fetch-permissions", + "operationId": "fetchPermissionsOfPrincipals", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 1554 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "principals": [ + { + "identifier": "4391d676-2dd8-4248-b6db-d973811f0122", + "type": "USER" + } + ], + "metadata": "XooZIxcywHBNGMG" + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/security/principals/fetch-permissions", + "operationId": "fetchPermissionsOfPrincipals", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 1555 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "principals": "tZOvuCnBjJoOlIm" + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/security/principals/fetch-permissions", + "operationId": "fetchPermissionsOfPrincipals", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 1556 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "principals": [ + { + "identifier": "4391d676-2dd8-4248-b6db-d973811f0122", + "type": "USER" + }, + { + "identifier": "314ac3fe-c5e1-4898-9cf7-29d9d455f052", + "type": "USER_GROUP" + }, + { + "identifier": "983ddaab-15cf-4c95-a21e-67383a67b6d1", + "type": "USER_GROUP" + } + ], + "metadata": "RmgYxVfaJqrUMhj" + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/security/principals/fetch-permissions", + "operationId": "fetchPermissionsOfPrincipals", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 1557 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "principals": "rYkYqeeYnVTyMAF", + "metadata": [ + { + "type": "LOGICAL_TABLE", + "identifier": "d43d53ab-e8f3-4658-84bb-e61144e05616" + }, + { + "type": "ANSWER", + "identifier": "7ca13c1d-51de-477e-94c8-f9372a8e30e3" + }, + { + "type": "LOGICAL_TABLE", + "identifier": "af251fbc-8053-487d-8011-84686d97d1f4" + } + ] + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/security/principals/fetch-permissions", + "operationId": "fetchPermissionsOfPrincipals", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 1558 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "principals": "AzGTOomTmjdGYbf", + "metadata": [ + { + "type": "LOGICAL_TABLE", + "identifier": "d43d53ab-e8f3-4658-84bb-e61144e05616" + }, + { + "type": "ANSWER", + "identifier": "7ca13c1d-51de-477e-94c8-f9372a8e30e3" + }, + { + "type": "LOGICAL_TABLE", + "identifier": "af251fbc-8053-487d-8011-84686d97d1f4" + }, + { + "type": "ANSWER", + "identifier": "73df2632-37ec-4e64-9f9c-c53e5efe2432" + } + ] + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/security/principals/fetch-permissions", + "operationId": "fetchPermissionsOfPrincipals", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 1559 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "principals": [ + { + "identifier": "4391d676-2dd8-4248-b6db-d973811f0122", + "type": "USER" + }, + { + "identifier": "314ac3fe-c5e1-4898-9cf7-29d9d455f052", + "type": "USER_GROUP" + } + ], + "metadata": "HGEZQHHlMjMoOCh" + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/security/principals/fetch-permissions", + "operationId": "fetchPermissionsOfPrincipals", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 1560 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "principals": [ + { + "identifier": "4391d676-2dd8-4248-b6db-d973811f0122", + "type": "USER" + } + ], + "metadata": "dcrGskgfLcaqoqS" + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/security/principals/fetch-permissions", + "operationId": "fetchPermissionsOfPrincipals", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 1561 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "principals": [ + { + "identifier": "4391d676-2dd8-4248-b6db-d973811f0122", + "type": "USER" + } + ], + "metadata": "PuTQNhlhSpdIzaG" + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/security/principals/fetch-permissions", + "operationId": "fetchPermissionsOfPrincipals", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 1562 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "principals": [ + { + "identifier": "4391d676-2dd8-4248-b6db-d973811f0122", + "type": "USER" + }, + { + "identifier": "314ac3fe-c5e1-4898-9cf7-29d9d455f052", + "type": "USER_GROUP" + } + ], + "metadata": "xMZdhRINETnkuyH" + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/security/principals/fetch-permissions", + "operationId": "fetchPermissionsOfPrincipals", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 1563 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "principals": "NxBMThwnWjYJCAv", + "metadata": [ + { + "type": "LOGICAL_TABLE", + "identifier": "d43d53ab-e8f3-4658-84bb-e61144e05616" + }, + { + "type": "ANSWER", + "identifier": "7ca13c1d-51de-477e-94c8-f9372a8e30e3" + }, + { + "type": "LOGICAL_TABLE", + "identifier": "af251fbc-8053-487d-8011-84686d97d1f4" + } + ] + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/security/principals/fetch-permissions", + "operationId": "fetchPermissionsOfPrincipals", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 1564 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "principals": [ + { + "identifier": "4391d676-2dd8-4248-b6db-d973811f0122", + "type": "USER" + } + ], + "metadata": "XmpCnttEDuRuttO" + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/security/metadata/fetch-permissions", + "operationId": "fetchPermissionsOnMetadata", + "scenario": "positive", + "type": "AUTOMATIC", + "testId": 1565 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "metadata": [ + { + "type": "LOGICAL_TABLE", + "identifier": "d43d53ab-e8f3-4658-84bb-e61144e05616" + }, + { + "type": "ANSWER", + "identifier": "7ca13c1d-51de-477e-94c8-f9372a8e30e3" + }, + { + "type": "LOGICAL_TABLE", + "identifier": "af251fbc-8053-487d-8011-84686d97d1f4" + }, + { + "type": "ANSWER", + "identifier": "73df2632-37ec-4e64-9f9c-c53e5efe2432" + } + ] + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/security/metadata/fetch-permissions", + "operationId": "fetchPermissionsOnMetadata", + "scenario": "positive", + "type": "AUTOMATIC", + "testId": 1566 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "metadata": [ + { + "type": "LOGICAL_TABLE", + "identifier": "d43d53ab-e8f3-4658-84bb-e61144e05616" + }, + { + "type": "ANSWER", + "identifier": "7ca13c1d-51de-477e-94c8-f9372a8e30e3" + }, + { + "type": "LOGICAL_TABLE", + "identifier": "af251fbc-8053-487d-8011-84686d97d1f4" + } + ], + "principals": [ + { + "identifier": "4391d676-2dd8-4248-b6db-d973811f0122", + "type": "USER" + } + ] + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/security/metadata/fetch-permissions", + "operationId": "fetchPermissionsOnMetadata", + "scenario": "positive", + "type": "AUTOMATIC", + "testId": 1567 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "metadata": [ + { + "type": "LOGICAL_TABLE", + "identifier": "d43d53ab-e8f3-4658-84bb-e61144e05616" + }, + { + "type": "ANSWER", + "identifier": "7ca13c1d-51de-477e-94c8-f9372a8e30e3" + }, + { + "type": "LOGICAL_TABLE", + "identifier": "af251fbc-8053-487d-8011-84686d97d1f4" + } + ], + "include_dependent_objects": true + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/security/metadata/fetch-permissions", + "operationId": "fetchPermissionsOnMetadata", + "scenario": "positive", + "type": "AUTOMATIC", + "testId": 1568 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "metadata": [ + { + "type": "LOGICAL_TABLE", + "identifier": "d43d53ab-e8f3-4658-84bb-e61144e05616" + }, + { + "type": "ANSWER", + "identifier": "7ca13c1d-51de-477e-94c8-f9372a8e30e3" + }, + { + "type": "LOGICAL_TABLE", + "identifier": "af251fbc-8053-487d-8011-84686d97d1f4" + } + ], + "principals": [ + { + "identifier": "4391d676-2dd8-4248-b6db-d973811f0122", + "type": "USER" + } + ] + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/security/metadata/fetch-permissions", + "operationId": "fetchPermissionsOnMetadata", + "scenario": "positive", + "type": "AUTOMATIC", + "testId": 1569 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "metadata": [ + { + "type": "LOGICAL_TABLE", + "identifier": "d43d53ab-e8f3-4658-84bb-e61144e05616" + }, + { + "type": "ANSWER", + "identifier": "7ca13c1d-51de-477e-94c8-f9372a8e30e3" + }, + { + "type": "LOGICAL_TABLE", + "identifier": "af251fbc-8053-487d-8011-84686d97d1f4" + } + ], + "include_dependent_objects": true + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/security/metadata/fetch-permissions", + "operationId": "fetchPermissionsOnMetadata", + "scenario": "positive", + "type": "AUTOMATIC", + "testId": 1570 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "metadata": [ + { + "type": "LOGICAL_TABLE", + "identifier": "d43d53ab-e8f3-4658-84bb-e61144e05616" + } + ] + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/security/metadata/fetch-permissions", + "operationId": "fetchPermissionsOnMetadata", + "scenario": "positive", + "type": "AUTOMATIC", + "testId": 1571 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "metadata": [ + { + "type": "LOGICAL_TABLE", + "identifier": "d43d53ab-e8f3-4658-84bb-e61144e05616" + } + ] + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/security/metadata/fetch-permissions", + "operationId": "fetchPermissionsOnMetadata", + "scenario": "positive", + "type": "AUTOMATIC", + "testId": 1572 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "metadata": [ + { + "type": "LOGICAL_TABLE", + "identifier": "d43d53ab-e8f3-4658-84bb-e61144e05616" + }, + { + "type": "ANSWER", + "identifier": "7ca13c1d-51de-477e-94c8-f9372a8e30e3" + }, + { + "type": "LOGICAL_TABLE", + "identifier": "af251fbc-8053-487d-8011-84686d97d1f4" + } + ] + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/security/metadata/fetch-permissions", + "operationId": "fetchPermissionsOnMetadata", + "scenario": "positive", + "type": "AUTOMATIC", + "testId": 1573 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "metadata": [ + { + "type": "LOGICAL_TABLE", + "identifier": "d43d53ab-e8f3-4658-84bb-e61144e05616" + }, + { + "type": "ANSWER", + "identifier": "7ca13c1d-51de-477e-94c8-f9372a8e30e3" + }, + { + "type": "LOGICAL_TABLE", + "identifier": "af251fbc-8053-487d-8011-84686d97d1f4" + } + ], + "principals": [ + { + "identifier": "4391d676-2dd8-4248-b6db-d973811f0122", + "type": "USER" + }, + { + "identifier": "314ac3fe-c5e1-4898-9cf7-29d9d455f052", + "type": "USER_GROUP" + }, + { + "identifier": "983ddaab-15cf-4c95-a21e-67383a67b6d1", + "type": "USER_GROUP" + }, + { + "identifier": "5dc626e5-1921-4758-a7bf-8501605aa59f", + "type": "USER" + }, + { + "identifier": "b25ee394-9d13-49e3-9385-cd97f5b253b4", + "type": "USER_GROUP" + } + ], + "include_dependent_objects": false + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/security/metadata/fetch-permissions", + "operationId": "fetchPermissionsOnMetadata", + "scenario": "positive", + "type": "AUTOMATIC", + "testId": 1574 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "metadata": [ + { + "type": "LOGICAL_TABLE", + "identifier": "d43d53ab-e8f3-4658-84bb-e61144e05616" + }, + { + "type": "ANSWER", + "identifier": "7ca13c1d-51de-477e-94c8-f9372a8e30e3" + }, + { + "type": "LOGICAL_TABLE", + "identifier": "af251fbc-8053-487d-8011-84686d97d1f4" + }, + { + "type": "ANSWER", + "identifier": "73df2632-37ec-4e64-9f9c-c53e5efe2432" + }, + { + "type": "LOGICAL_COLUMN", + "identifier": "7c365f4e-fe69-4cc0-8f04-23cd41a1c3b9" + } + ], + "principals": [ + { + "identifier": "4391d676-2dd8-4248-b6db-d973811f0122", + "type": "USER" + }, + { + "identifier": "314ac3fe-c5e1-4898-9cf7-29d9d455f052", + "type": "USER_GROUP" + }, + { + "identifier": "983ddaab-15cf-4c95-a21e-67383a67b6d1", + "type": "USER_GROUP" + }, + { + "identifier": "5dc626e5-1921-4758-a7bf-8501605aa59f", + "type": "USER" + }, + { + "identifier": "b25ee394-9d13-49e3-9385-cd97f5b253b4", + "type": "USER_GROUP" + } + ], + "include_dependent_objects": false + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/security/metadata/fetch-permissions", + "operationId": "fetchPermissionsOnMetadata", + "scenario": "positive", + "type": "AUTOMATIC", + "testId": 1575 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "metadata": [ + { + "type": "LOGICAL_TABLE", + "identifier": "d43d53ab-e8f3-4658-84bb-e61144e05616" + }, + { + "type": "ANSWER", + "identifier": "7ca13c1d-51de-477e-94c8-f9372a8e30e3" + } + ], + "principals": [] + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/security/metadata/fetch-permissions", + "operationId": "fetchPermissionsOnMetadata", + "scenario": "positive", + "type": "AUTOMATIC", + "testId": 1576 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "metadata": [ + { + "type": "LOGICAL_TABLE", + "identifier": "d43d53ab-e8f3-4658-84bb-e61144e05616" + }, + { + "type": "ANSWER", + "identifier": "7ca13c1d-51de-477e-94c8-f9372a8e30e3" + } + ], + "principals": [ + { + "identifier": "4391d676-2dd8-4248-b6db-d973811f0122", + "type": "USER" + }, + { + "identifier": "314ac3fe-c5e1-4898-9cf7-29d9d455f052", + "type": "USER_GROUP" + }, + { + "identifier": "983ddaab-15cf-4c95-a21e-67383a67b6d1", + "type": "USER_GROUP" + }, + { + "identifier": "5dc626e5-1921-4758-a7bf-8501605aa59f", + "type": "USER" + }, + { + "identifier": "b25ee394-9d13-49e3-9385-cd97f5b253b4", + "type": "USER_GROUP" + } + ], + "include_dependent_objects": false + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/security/metadata/fetch-permissions", + "operationId": "fetchPermissionsOnMetadata", + "scenario": "positive", + "type": "AUTOMATIC", + "testId": 1577 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "metadata": [ + { + "type": "LOGICAL_TABLE", + "identifier": "d43d53ab-e8f3-4658-84bb-e61144e05616" + } + ], + "principals": [] + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/security/metadata/fetch-permissions", + "operationId": "fetchPermissionsOnMetadata", + "scenario": "positive", + "type": "AUTOMATIC", + "testId": 1578 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "metadata": [ + { + "type": "LOGICAL_TABLE", + "identifier": "d43d53ab-e8f3-4658-84bb-e61144e05616" + }, + { + "type": "ANSWER", + "identifier": "7ca13c1d-51de-477e-94c8-f9372a8e30e3" + } + ], + "principals": [ + { + "identifier": "4391d676-2dd8-4248-b6db-d973811f0122", + "type": "USER" + }, + { + "identifier": "314ac3fe-c5e1-4898-9cf7-29d9d455f052", + "type": "USER_GROUP" + } + ] + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/security/metadata/fetch-permissions", + "operationId": "fetchPermissionsOnMetadata", + "scenario": "positive", + "type": "AUTOMATIC", + "testId": 1579 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "metadata": [ + { + "type": "LOGICAL_TABLE", + "identifier": "d43d53ab-e8f3-4658-84bb-e61144e05616" + } + ], + "principals": [ + { + "identifier": "4391d676-2dd8-4248-b6db-d973811f0122", + "type": "USER" + }, + { + "identifier": "314ac3fe-c5e1-4898-9cf7-29d9d455f052", + "type": "USER_GROUP" + }, + { + "identifier": "983ddaab-15cf-4c95-a21e-67383a67b6d1", + "type": "USER_GROUP" + }, + { + "identifier": "5dc626e5-1921-4758-a7bf-8501605aa59f", + "type": "USER" + }, + { + "identifier": "b25ee394-9d13-49e3-9385-cd97f5b253b4", + "type": "USER_GROUP" + } + ] + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/security/metadata/fetch-permissions", + "operationId": "fetchPermissionsOnMetadata", + "scenario": "positive", + "type": "AUTOMATIC", + "testId": 1580 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "metadata": [ + { + "type": "LOGICAL_TABLE", + "identifier": "d43d53ab-e8f3-4658-84bb-e61144e05616" + }, + { + "type": "ANSWER", + "identifier": "7ca13c1d-51de-477e-94c8-f9372a8e30e3" + }, + { + "type": "LOGICAL_TABLE", + "identifier": "af251fbc-8053-487d-8011-84686d97d1f4" + } + ], + "principals": [ + { + "identifier": "4391d676-2dd8-4248-b6db-d973811f0122", + "type": "USER" + }, + { + "identifier": "314ac3fe-c5e1-4898-9cf7-29d9d455f052", + "type": "USER_GROUP" + }, + { + "identifier": "983ddaab-15cf-4c95-a21e-67383a67b6d1", + "type": "USER_GROUP" + } + ] + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/security/metadata/fetch-permissions", + "operationId": "fetchPermissionsOnMetadata", + "scenario": "positive", + "type": "AUTOMATIC", + "testId": 1581 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "metadata": [ + { + "type": "LOGICAL_TABLE", + "identifier": "d43d53ab-e8f3-4658-84bb-e61144e05616" + }, + { + "type": "ANSWER", + "identifier": "7ca13c1d-51de-477e-94c8-f9372a8e30e3" + }, + { + "type": "LOGICAL_TABLE", + "identifier": "af251fbc-8053-487d-8011-84686d97d1f4" + }, + { + "type": "ANSWER", + "identifier": "73df2632-37ec-4e64-9f9c-c53e5efe2432" + } + ] + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/security/metadata/fetch-permissions", + "operationId": "fetchPermissionsOnMetadata", + "scenario": "positive", + "type": "AUTOMATIC", + "testId": 1582 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "metadata": [ + { + "type": "LOGICAL_TABLE", + "identifier": "d43d53ab-e8f3-4658-84bb-e61144e05616" + } + ], + "principals": [ + { + "identifier": "4391d676-2dd8-4248-b6db-d973811f0122", + "type": "USER" + }, + { + "identifier": "314ac3fe-c5e1-4898-9cf7-29d9d455f052", + "type": "USER_GROUP" + }, + { + "identifier": "983ddaab-15cf-4c95-a21e-67383a67b6d1", + "type": "USER_GROUP" + }, + { + "identifier": "5dc626e5-1921-4758-a7bf-8501605aa59f", + "type": "USER" + } + ] + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/security/metadata/fetch-permissions", + "operationId": "fetchPermissionsOnMetadata", + "scenario": "positive", + "type": "AUTOMATIC", + "testId": 1583 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "metadata": [ + { + "type": "LOGICAL_TABLE", + "identifier": "d43d53ab-e8f3-4658-84bb-e61144e05616" + }, + { + "type": "ANSWER", + "identifier": "7ca13c1d-51de-477e-94c8-f9372a8e30e3" + }, + { + "type": "LOGICAL_TABLE", + "identifier": "af251fbc-8053-487d-8011-84686d97d1f4" + }, + { + "type": "ANSWER", + "identifier": "73df2632-37ec-4e64-9f9c-c53e5efe2432" + } + ], + "principals": [ + { + "identifier": "4391d676-2dd8-4248-b6db-d973811f0122", + "type": "USER" + }, + { + "identifier": "314ac3fe-c5e1-4898-9cf7-29d9d455f052", + "type": "USER_GROUP" + }, + { + "identifier": "983ddaab-15cf-4c95-a21e-67383a67b6d1", + "type": "USER_GROUP" + }, + { + "identifier": "5dc626e5-1921-4758-a7bf-8501605aa59f", + "type": "USER" + }, + { + "identifier": "b25ee394-9d13-49e3-9385-cd97f5b253b4", + "type": "USER_GROUP" + } + ], + "include_dependent_objects": false + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/security/metadata/fetch-permissions", + "operationId": "fetchPermissionsOnMetadata", + "scenario": "positive", + "type": "AUTOMATIC", + "testId": 1584 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "metadata": [ + { + "type": "LOGICAL_TABLE", + "identifier": "d43d53ab-e8f3-4658-84bb-e61144e05616" + }, + { + "type": "ANSWER", + "identifier": "7ca13c1d-51de-477e-94c8-f9372a8e30e3" + } + ] + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/security/metadata/fetch-permissions", + "operationId": "fetchPermissionsOnMetadata", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 1585 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "metadata": null + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/security/metadata/fetch-permissions", + "operationId": "fetchPermissionsOnMetadata", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 1586 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "metadata": null + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/security/metadata/fetch-permissions", + "operationId": "fetchPermissionsOnMetadata", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 1587 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "metadata": null, + "principals": [ + { + "identifier": "4391d676-2dd8-4248-b6db-d973811f0122", + "type": "USER" + }, + { + "identifier": "314ac3fe-c5e1-4898-9cf7-29d9d455f052", + "type": "USER_GROUP" + }, + { + "identifier": "983ddaab-15cf-4c95-a21e-67383a67b6d1", + "type": "USER_GROUP" + }, + { + "identifier": "5dc626e5-1921-4758-a7bf-8501605aa59f", + "type": "USER" + }, + { + "identifier": "b25ee394-9d13-49e3-9385-cd97f5b253b4", + "type": "USER_GROUP" + } + ], + "include_dependent_objects": false + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/security/metadata/fetch-permissions", + "operationId": "fetchPermissionsOnMetadata", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 1588 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "metadata": null, + "principals": [ + { + "identifier": "4391d676-2dd8-4248-b6db-d973811f0122", + "type": "USER" + }, + { + "identifier": "314ac3fe-c5e1-4898-9cf7-29d9d455f052", + "type": "USER_GROUP" + }, + { + "identifier": "983ddaab-15cf-4c95-a21e-67383a67b6d1", + "type": "USER_GROUP" + }, + { + "identifier": "5dc626e5-1921-4758-a7bf-8501605aa59f", + "type": "USER" + } + ] + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/security/metadata/fetch-permissions", + "operationId": "fetchPermissionsOnMetadata", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 1589 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "metadata": null, + "principals": [] + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/security/metadata/fetch-permissions", + "operationId": "fetchPermissionsOnMetadata", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 1590 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "metadata": null, + "principals": [ + { + "identifier": "4391d676-2dd8-4248-b6db-d973811f0122", + "type": "USER" + }, + { + "identifier": "314ac3fe-c5e1-4898-9cf7-29d9d455f052", + "type": "USER_GROUP" + }, + { + "identifier": "983ddaab-15cf-4c95-a21e-67383a67b6d1", + "type": "USER_GROUP" + }, + { + "identifier": "5dc626e5-1921-4758-a7bf-8501605aa59f", + "type": "USER" + }, + { + "identifier": "b25ee394-9d13-49e3-9385-cd97f5b253b4", + "type": "USER_GROUP" + } + ], + "include_dependent_objects": false + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/security/metadata/fetch-permissions", + "operationId": "fetchPermissionsOnMetadata", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 1591 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "metadata": null, + "principals": [ + { + "identifier": "4391d676-2dd8-4248-b6db-d973811f0122", + "type": "USER" + }, + { + "identifier": "314ac3fe-c5e1-4898-9cf7-29d9d455f052", + "type": "USER_GROUP" + }, + { + "identifier": "983ddaab-15cf-4c95-a21e-67383a67b6d1", + "type": "USER_GROUP" + }, + { + "identifier": "5dc626e5-1921-4758-a7bf-8501605aa59f", + "type": "USER" + }, + { + "identifier": "b25ee394-9d13-49e3-9385-cd97f5b253b4", + "type": "USER_GROUP" + } + ], + "include_dependent_objects": false + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/security/metadata/fetch-permissions", + "operationId": "fetchPermissionsOnMetadata", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 1592 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "metadata": null, + "principals": [ + { + "identifier": "4391d676-2dd8-4248-b6db-d973811f0122", + "type": "USER" + }, + { + "identifier": "314ac3fe-c5e1-4898-9cf7-29d9d455f052", + "type": "USER_GROUP" + }, + { + "identifier": "983ddaab-15cf-4c95-a21e-67383a67b6d1", + "type": "USER_GROUP" + }, + { + "identifier": "5dc626e5-1921-4758-a7bf-8501605aa59f", + "type": "USER" + }, + { + "identifier": "b25ee394-9d13-49e3-9385-cd97f5b253b4", + "type": "USER_GROUP" + } + ], + "include_dependent_objects": false + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/security/metadata/fetch-permissions", + "operationId": "fetchPermissionsOnMetadata", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 1593 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "metadata": null, + "principals": [] + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/security/metadata/fetch-permissions", + "operationId": "fetchPermissionsOnMetadata", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 1594 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "metadata": null + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/security/metadata/fetch-permissions", + "operationId": "fetchPermissionsOnMetadata", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 1595 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "metadata": null, + "principals": [ + { + "identifier": "4391d676-2dd8-4248-b6db-d973811f0122", + "type": "USER" + }, + { + "identifier": "314ac3fe-c5e1-4898-9cf7-29d9d455f052", + "type": "USER_GROUP" + }, + { + "identifier": "983ddaab-15cf-4c95-a21e-67383a67b6d1", + "type": "USER_GROUP" + }, + { + "identifier": "5dc626e5-1921-4758-a7bf-8501605aa59f", + "type": "USER" + }, + { + "identifier": "b25ee394-9d13-49e3-9385-cd97f5b253b4", + "type": "USER_GROUP" + } + ], + "include_dependent_objects": false + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/security/metadata/fetch-permissions", + "operationId": "fetchPermissionsOnMetadata", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 1596 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "metadata": null + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/security/metadata/fetch-permissions", + "operationId": "fetchPermissionsOnMetadata", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 1597 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "metadata": null, + "principals": [ + { + "identifier": "4391d676-2dd8-4248-b6db-d973811f0122", + "type": "USER" + }, + { + "identifier": "314ac3fe-c5e1-4898-9cf7-29d9d455f052", + "type": "USER_GROUP" + }, + { + "identifier": "983ddaab-15cf-4c95-a21e-67383a67b6d1", + "type": "USER_GROUP" + }, + { + "identifier": "5dc626e5-1921-4758-a7bf-8501605aa59f", + "type": "USER" + }, + { + "identifier": "b25ee394-9d13-49e3-9385-cd97f5b253b4", + "type": "USER_GROUP" + } + ], + "include_dependent_objects": false + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/security/metadata/fetch-permissions", + "operationId": "fetchPermissionsOnMetadata", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 1598 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "metadata": null, + "principals": [] + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/security/metadata/fetch-permissions", + "operationId": "fetchPermissionsOnMetadata", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 1599 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "metadata": null + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/security/metadata/fetch-permissions", + "operationId": "fetchPermissionsOnMetadata", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 1600 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "metadata": null, + "principals": [ + { + "identifier": "4391d676-2dd8-4248-b6db-d973811f0122", + "type": "USER" + }, + { + "identifier": "314ac3fe-c5e1-4898-9cf7-29d9d455f052", + "type": "USER_GROUP" + }, + { + "identifier": "983ddaab-15cf-4c95-a21e-67383a67b6d1", + "type": "USER_GROUP" + }, + { + "identifier": "5dc626e5-1921-4758-a7bf-8501605aa59f", + "type": "USER" + }, + { + "identifier": "b25ee394-9d13-49e3-9385-cd97f5b253b4", + "type": "USER_GROUP" + } + ], + "include_dependent_objects": false + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/security/metadata/fetch-permissions", + "operationId": "fetchPermissionsOnMetadata", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 1601 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "metadata": "mpzMzVdtEayldzA" + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/security/metadata/fetch-permissions", + "operationId": "fetchPermissionsOnMetadata", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 1602 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "metadata": [ + { + "type": "LOGICAL_TABLE", + "identifier": "d43d53ab-e8f3-4658-84bb-e61144e05616" + }, + { + "type": "ANSWER", + "identifier": "7ca13c1d-51de-477e-94c8-f9372a8e30e3" + }, + { + "type": "LOGICAL_TABLE", + "identifier": "af251fbc-8053-487d-8011-84686d97d1f4" + }, + { + "type": "ANSWER", + "identifier": "73df2632-37ec-4e64-9f9c-c53e5efe2432" + }, + { + "type": "LOGICAL_COLUMN", + "identifier": "7c365f4e-fe69-4cc0-8f04-23cd41a1c3b9" + } + ], + "principals": "ZBHvxVHcSDebglm", + "include_dependent_objects": false + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/security/metadata/fetch-permissions", + "operationId": "fetchPermissionsOnMetadata", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 1603 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "metadata": null, + "include_dependent_objects": true + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/security/metadata/fetch-permissions", + "operationId": "fetchPermissionsOnMetadata", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 1604 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "metadata": "SLqPtWQhAdDPiwn" + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/security/metadata/fetch-permissions", + "operationId": "fetchPermissionsOnMetadata", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 1605 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "metadata": "fjsUHDpjSPOPtEI" + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/security/metadata/fetch-permissions", + "operationId": "fetchPermissionsOnMetadata", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 1606 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "metadata": "MKtjzecZiqwQCcR", + "principals": [ + { + "identifier": "4391d676-2dd8-4248-b6db-d973811f0122", + "type": "USER" + }, + { + "identifier": "314ac3fe-c5e1-4898-9cf7-29d9d455f052", + "type": "USER_GROUP" + }, + { + "identifier": "983ddaab-15cf-4c95-a21e-67383a67b6d1", + "type": "USER_GROUP" + }, + { + "identifier": "5dc626e5-1921-4758-a7bf-8501605aa59f", + "type": "USER" + } + ] + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/security/metadata/fetch-permissions", + "operationId": "fetchPermissionsOnMetadata", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 1607 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "metadata": "liMcNBWTYzhnhzw", + "principals": [ + { + "identifier": "4391d676-2dd8-4248-b6db-d973811f0122", + "type": "USER" + }, + { + "identifier": "314ac3fe-c5e1-4898-9cf7-29d9d455f052", + "type": "USER_GROUP" + }, + { + "identifier": "983ddaab-15cf-4c95-a21e-67383a67b6d1", + "type": "USER_GROUP" + }, + { + "identifier": "5dc626e5-1921-4758-a7bf-8501605aa59f", + "type": "USER" + }, + { + "identifier": "b25ee394-9d13-49e3-9385-cd97f5b253b4", + "type": "USER_GROUP" + } + ] + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/security/metadata/fetch-permissions", + "operationId": "fetchPermissionsOnMetadata", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 1608 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "metadata": null, + "include_dependent_objects": true + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/security/metadata/fetch-permissions", + "operationId": "fetchPermissionsOnMetadata", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 1609 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "metadata": "KtieoSAuoIRoLSr", + "principals": [ + { + "identifier": "4391d676-2dd8-4248-b6db-d973811f0122", + "type": "USER" + }, + { + "identifier": "314ac3fe-c5e1-4898-9cf7-29d9d455f052", + "type": "USER_GROUP" + }, + { + "identifier": "983ddaab-15cf-4c95-a21e-67383a67b6d1", + "type": "USER_GROUP" + }, + { + "identifier": "5dc626e5-1921-4758-a7bf-8501605aa59f", + "type": "USER" + }, + { + "identifier": "b25ee394-9d13-49e3-9385-cd97f5b253b4", + "type": "USER_GROUP" + } + ] + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/security/metadata/fetch-permissions", + "operationId": "fetchPermissionsOnMetadata", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 1610 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "metadata": "MqKGNvXTuzElZfr" + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/security/metadata/fetch-permissions", + "operationId": "fetchPermissionsOnMetadata", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 1611 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "metadata": [ + { + "type": "LOGICAL_TABLE", + "identifier": "d43d53ab-e8f3-4658-84bb-e61144e05616" + }, + { + "type": "ANSWER", + "identifier": "7ca13c1d-51de-477e-94c8-f9372a8e30e3" + } + ], + "principals": "dbOtSMRMFWCEKqS" + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/security/metadata/fetch-permissions", + "operationId": "fetchPermissionsOnMetadata", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 1612 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "metadata": "YJWcjpaYMwmgFBJ", + "principals": [] + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/security/metadata/fetch-permissions", + "operationId": "fetchPermissionsOnMetadata", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 1613 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "metadata": "HjXNMSIeKgceNXi", + "principals": [ + { + "identifier": "4391d676-2dd8-4248-b6db-d973811f0122", + "type": "USER" + }, + { + "identifier": "314ac3fe-c5e1-4898-9cf7-29d9d455f052", + "type": "USER_GROUP" + }, + { + "identifier": "983ddaab-15cf-4c95-a21e-67383a67b6d1", + "type": "USER_GROUP" + }, + { + "identifier": "5dc626e5-1921-4758-a7bf-8501605aa59f", + "type": "USER" + }, + { + "identifier": "b25ee394-9d13-49e3-9385-cd97f5b253b4", + "type": "USER_GROUP" + } + ], + "include_dependent_objects": false + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/security/metadata/fetch-permissions", + "operationId": "fetchPermissionsOnMetadata", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 1614 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "metadata": "uGDonGJgGPygBho" + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/security/metadata/assign", + "operationId": "assignChangeAuthor", + "scenario": "positive", + "type": "AUTOMATIC", + "testId": 1615 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "metadata": [ + { + "type": "ANSWER", + "identifier": "c0dbb0e0-ac2e-4cf6-8718-7c661bb033a5" + } + ], + "user_identifier": "59481331-ee53-42be-a548-bd87be6ddd4a", + "current_owner_identifier": "59481331-ee53-42be-a548-bd87be6ddd4a" + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/security/metadata/assign", + "operationId": "assignChangeAuthor", + "scenario": "positive", + "type": "AUTOMATIC", + "testId": 1616 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "metadata": [ + { + "type": "ANSWER", + "identifier": "c0dbb0e0-ac2e-4cf6-8718-7c661bb033a5" + } + ], + "user_identifier": "59481331-ee53-42be-a548-bd87be6ddd4a" + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/security/metadata/assign", + "operationId": "assignChangeAuthor", + "scenario": "positive", + "type": "AUTOMATIC", + "testId": 1617 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "metadata": [ + { + "type": "ANSWER", + "identifier": "c0dbb0e0-ac2e-4cf6-8718-7c661bb033a5" + } + ], + "user_identifier": "59481331-ee53-42be-a548-bd87be6ddd4a", + "current_owner_identifier": "59481331-ee53-42be-a548-bd87be6ddd4a" + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/security/metadata/assign", + "operationId": "assignChangeAuthor", + "scenario": "positive", + "type": "AUTOMATIC", + "testId": 1618 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "metadata": [ + { + "type": "ANSWER", + "identifier": "c0dbb0e0-ac2e-4cf6-8718-7c661bb033a5" + }, + { + "type": "LIVEBOARD", + "identifier": "6246c548-985b-4dcf-9b62-196314a404b3" + } + ], + "user_identifier": "59481331-ee53-42be-a548-bd87be6ddd4a", + "current_owner_identifier": "59481331-ee53-42be-a548-bd87be6ddd4a" + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/security/metadata/assign", + "operationId": "assignChangeAuthor", + "scenario": "positive", + "type": "AUTOMATIC", + "testId": 1619 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "metadata": [ + { + "type": "LIVEBOARD", + "identifier": "c0dbb0e0-ac2e-4cf6-8718-7c661bb033a5" + } + ], + "user_identifier": "59481331-ee53-42be-a548-bd87be6ddd4a" + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/security/metadata/assign", + "operationId": "assignChangeAuthor", + "scenario": "positive", + "type": "AUTOMATIC", + "testId": 1620 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "metadata": [ + { + "type": "LIVEBOARD", + "identifier": "c0dbb0e0-ac2e-4cf6-8718-7c661bb033a5" + }, + { + "type": "ANSWER", + "identifier": "6246c548-985b-4dcf-9b62-196314a404b3" + } + ], + "user_identifier": "59481331-ee53-42be-a548-bd87be6ddd4a", + "current_owner_identifier": "59481331-ee53-42be-a548-bd87be6ddd4a" + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/security/metadata/assign", + "operationId": "assignChangeAuthor", + "scenario": "positive", + "type": "AUTOMATIC", + "testId": 1621 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "metadata": [ + { + "type": "LOGICAL_TABLE", + "identifier": "c0dbb0e0-ac2e-4cf6-8718-7c661bb033a5" + } + ], + "user_identifier": "59481331-ee53-42be-a548-bd87be6ddd4a" + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/security/metadata/assign", + "operationId": "assignChangeAuthor", + "scenario": "positive", + "type": "AUTOMATIC", + "testId": 1622 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "metadata": [ + { + "type": "LOGICAL_TABLE", + "identifier": "c0dbb0e0-ac2e-4cf6-8718-7c661bb033a5" + } + ], + "user_identifier": "59481331-ee53-42be-a548-bd87be6ddd4a", + "current_owner_identifier": "59481331-ee53-42be-a548-bd87be6ddd4a" + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/security/metadata/assign", + "operationId": "assignChangeAuthor", + "scenario": "positive", + "type": "AUTOMATIC", + "testId": 1623 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "metadata": [ + { + "type": "LOGICAL_TABLE", + "identifier": "c0dbb0e0-ac2e-4cf6-8718-7c661bb033a5" + }, + { + "type": "LOGICAL_TABLE", + "identifier": "6246c548-985b-4dcf-9b62-196314a404b3" + }, + { + "type": "ANSWER", + "identifier": "21f35c49-c1f8-4f3d-a124-a0fbe5c978aa" + } + ], + "user_identifier": "59481331-ee53-42be-a548-bd87be6ddd4a", + "current_owner_identifier": "59481331-ee53-42be-a548-bd87be6ddd4a" + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/security/metadata/assign", + "operationId": "assignChangeAuthor", + "scenario": "positive", + "type": "AUTOMATIC", + "testId": 1624 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "metadata": [ + { + "type": "ANSWER", + "identifier": "c0dbb0e0-ac2e-4cf6-8718-7c661bb033a5" + } + ], + "user_identifier": "59481331-ee53-42be-a548-bd87be6ddd4a", + "current_owner_identifier": "59481331-ee53-42be-a548-bd87be6ddd4a" + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/security/metadata/assign", + "operationId": "assignChangeAuthor", + "scenario": "positive", + "type": "AUTOMATIC", + "testId": 1625 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "metadata": [ + { + "type": "LIVEBOARD", + "identifier": "c0dbb0e0-ac2e-4cf6-8718-7c661bb033a5" + }, + { + "type": "ANSWER", + "identifier": "6246c548-985b-4dcf-9b62-196314a404b3" + } + ], + "user_identifier": "59481331-ee53-42be-a548-bd87be6ddd4a" + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/security/metadata/assign", + "operationId": "assignChangeAuthor", + "scenario": "positive", + "type": "AUTOMATIC", + "testId": 1626 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "metadata": [ + { + "type": "LOGICAL_TABLE", + "identifier": "c0dbb0e0-ac2e-4cf6-8718-7c661bb033a5" + }, + { + "type": "ANSWER", + "identifier": "6246c548-985b-4dcf-9b62-196314a404b3" + }, + { + "type": "LOGICAL_TABLE", + "identifier": "21f35c49-c1f8-4f3d-a124-a0fbe5c978aa" + } + ], + "user_identifier": "59481331-ee53-42be-a548-bd87be6ddd4a", + "current_owner_identifier": "59481331-ee53-42be-a548-bd87be6ddd4a" + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/security/metadata/assign", + "operationId": "assignChangeAuthor", + "scenario": "positive", + "type": "AUTOMATIC", + "testId": 1627 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "metadata": [ + { + "type": "LOGICAL_TABLE", + "identifier": "c0dbb0e0-ac2e-4cf6-8718-7c661bb033a5" + }, + { + "type": "LIVEBOARD", + "identifier": "6246c548-985b-4dcf-9b62-196314a404b3" + }, + { + "type": "LIVEBOARD", + "identifier": "21f35c49-c1f8-4f3d-a124-a0fbe5c978aa" + } + ], + "user_identifier": "59481331-ee53-42be-a548-bd87be6ddd4a", + "current_owner_identifier": "59481331-ee53-42be-a548-bd87be6ddd4a" + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/security/metadata/assign", + "operationId": "assignChangeAuthor", + "scenario": "positive", + "type": "AUTOMATIC", + "testId": 1628 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "metadata": [ + { + "type": "ANSWER", + "identifier": "c0dbb0e0-ac2e-4cf6-8718-7c661bb033a5" + }, + { + "type": "LIVEBOARD", + "identifier": "6246c548-985b-4dcf-9b62-196314a404b3" + } + ], + "user_identifier": "59481331-ee53-42be-a548-bd87be6ddd4a", + "current_owner_identifier": "59481331-ee53-42be-a548-bd87be6ddd4a" + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/security/metadata/assign", + "operationId": "assignChangeAuthor", + "scenario": "positive", + "type": "AUTOMATIC", + "testId": 1629 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "metadata": [ + { + "type": "LOGICAL_TABLE", + "identifier": "c0dbb0e0-ac2e-4cf6-8718-7c661bb033a5" + }, + { + "type": "LIVEBOARD", + "identifier": "6246c548-985b-4dcf-9b62-196314a404b3" + }, + { + "type": "ANSWER", + "identifier": "21f35c49-c1f8-4f3d-a124-a0fbe5c978aa" + } + ], + "user_identifier": "59481331-ee53-42be-a548-bd87be6ddd4a", + "current_owner_identifier": "59481331-ee53-42be-a548-bd87be6ddd4a" + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/security/metadata/assign", + "operationId": "assignChangeAuthor", + "scenario": "positive", + "type": "AUTOMATIC", + "testId": 1630 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "metadata": [ + { + "type": "LIVEBOARD", + "identifier": "c0dbb0e0-ac2e-4cf6-8718-7c661bb033a5" + }, + { + "type": "ANSWER", + "identifier": "6246c548-985b-4dcf-9b62-196314a404b3" + } + ], + "user_identifier": "59481331-ee53-42be-a548-bd87be6ddd4a", + "current_owner_identifier": "59481331-ee53-42be-a548-bd87be6ddd4a" + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/security/metadata/assign", + "operationId": "assignChangeAuthor", + "scenario": "positive", + "type": "AUTOMATIC", + "testId": 1631 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "metadata": [ + { + "type": "LIVEBOARD", + "identifier": "c0dbb0e0-ac2e-4cf6-8718-7c661bb033a5" + }, + { + "type": "ANSWER", + "identifier": "6246c548-985b-4dcf-9b62-196314a404b3" + }, + { + "type": "LIVEBOARD", + "identifier": "21f35c49-c1f8-4f3d-a124-a0fbe5c978aa" + } + ], + "user_identifier": "59481331-ee53-42be-a548-bd87be6ddd4a" + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/security/metadata/assign", + "operationId": "assignChangeAuthor", + "scenario": "positive", + "type": "AUTOMATIC", + "testId": 1632 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "metadata": [ + { + "type": "ANSWER", + "identifier": "c0dbb0e0-ac2e-4cf6-8718-7c661bb033a5" + }, + { + "type": "LIVEBOARD", + "identifier": "6246c548-985b-4dcf-9b62-196314a404b3" + }, + { + "type": "LIVEBOARD", + "identifier": "21f35c49-c1f8-4f3d-a124-a0fbe5c978aa" + } + ], + "user_identifier": "59481331-ee53-42be-a548-bd87be6ddd4a" + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/security/metadata/assign", + "operationId": "assignChangeAuthor", + "scenario": "positive", + "type": "AUTOMATIC", + "testId": 1633 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "metadata": [ + { + "type": "LIVEBOARD", + "identifier": "c0dbb0e0-ac2e-4cf6-8718-7c661bb033a5" + } + ], + "user_identifier": "59481331-ee53-42be-a548-bd87be6ddd4a", + "current_owner_identifier": "59481331-ee53-42be-a548-bd87be6ddd4a" + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/security/metadata/assign", + "operationId": "assignChangeAuthor", + "scenario": "positive", + "type": "AUTOMATIC", + "testId": 1634 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "metadata": [ + { + "type": "LOGICAL_TABLE", + "identifier": "c0dbb0e0-ac2e-4cf6-8718-7c661bb033a5" + }, + { + "type": "ANSWER", + "identifier": "6246c548-985b-4dcf-9b62-196314a404b3" + } + ], + "user_identifier": "59481331-ee53-42be-a548-bd87be6ddd4a" + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/security/metadata/assign", + "operationId": "assignChangeAuthor", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 1635 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "metadata": [ + { + "type": "LIVEBOARD", + "identifier": "c0dbb0e0-ac2e-4cf6-8718-7c661bb033a5" + } + ], + "user_identifier": null + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/security/metadata/assign", + "operationId": "assignChangeAuthor", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 1636 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "metadata": [ + { + "type": "ANSWER", + "identifier": "c0dbb0e0-ac2e-4cf6-8718-7c661bb033a5" + } + ], + "user_identifier": null, + "current_owner_identifier": "59481331-ee53-42be-a548-bd87be6ddd4a" + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/security/metadata/assign", + "operationId": "assignChangeAuthor", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 1637 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "metadata": null, + "user_identifier": "59481331-ee53-42be-a548-bd87be6ddd4a" + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/security/metadata/assign", + "operationId": "assignChangeAuthor", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 1638 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "metadata": null, + "user_identifier": "59481331-ee53-42be-a548-bd87be6ddd4a", + "current_owner_identifier": "59481331-ee53-42be-a548-bd87be6ddd4a" + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/security/metadata/assign", + "operationId": "assignChangeAuthor", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 1639 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "metadata": [ + { + "type": "LIVEBOARD", + "identifier": "c0dbb0e0-ac2e-4cf6-8718-7c661bb033a5" + } + ], + "user_identifier": null, + "current_owner_identifier": "59481331-ee53-42be-a548-bd87be6ddd4a" + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/security/metadata/assign", + "operationId": "assignChangeAuthor", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 1640 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "metadata": null, + "user_identifier": "59481331-ee53-42be-a548-bd87be6ddd4a" + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/security/metadata/assign", + "operationId": "assignChangeAuthor", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 1641 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "metadata": [ + { + "type": "ANSWER", + "identifier": "c0dbb0e0-ac2e-4cf6-8718-7c661bb033a5" + } + ], + "user_identifier": null + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/security/metadata/assign", + "operationId": "assignChangeAuthor", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 1642 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "metadata": [ + { + "type": "ANSWER", + "identifier": "c0dbb0e0-ac2e-4cf6-8718-7c661bb033a5" + }, + { + "type": "LIVEBOARD", + "identifier": "6246c548-985b-4dcf-9b62-196314a404b3" + } + ], + "user_identifier": null, + "current_owner_identifier": "59481331-ee53-42be-a548-bd87be6ddd4a" + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/security/metadata/assign", + "operationId": "assignChangeAuthor", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 1643 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "metadata": null, + "user_identifier": "59481331-ee53-42be-a548-bd87be6ddd4a" + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/security/metadata/assign", + "operationId": "assignChangeAuthor", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 1644 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "metadata": [ + { + "type": "ANSWER", + "identifier": "c0dbb0e0-ac2e-4cf6-8718-7c661bb033a5" + } + ], + "user_identifier": null + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/security/metadata/assign", + "operationId": "assignChangeAuthor", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 1645 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "metadata": [ + { + "type": "LOGICAL_TABLE", + "identifier": "c0dbb0e0-ac2e-4cf6-8718-7c661bb033a5" + }, + { + "type": "LIVEBOARD", + "identifier": "6246c548-985b-4dcf-9b62-196314a404b3" + }, + { + "type": "ANSWER", + "identifier": "21f35c49-c1f8-4f3d-a124-a0fbe5c978aa" + } + ], + "user_identifier": null, + "current_owner_identifier": "59481331-ee53-42be-a548-bd87be6ddd4a" + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/security/metadata/assign", + "operationId": "assignChangeAuthor", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 1646 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "metadata": [ + { + "type": "LOGICAL_TABLE", + "identifier": "c0dbb0e0-ac2e-4cf6-8718-7c661bb033a5" + }, + { + "type": "ANSWER", + "identifier": "6246c548-985b-4dcf-9b62-196314a404b3" + } + ], + "user_identifier": null + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/security/metadata/assign", + "operationId": "assignChangeAuthor", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 1647 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "metadata": [ + { + "type": "LOGICAL_TABLE", + "identifier": "c0dbb0e0-ac2e-4cf6-8718-7c661bb033a5" + }, + { + "type": "LIVEBOARD", + "identifier": "6246c548-985b-4dcf-9b62-196314a404b3" + }, + { + "type": "ANSWER", + "identifier": "21f35c49-c1f8-4f3d-a124-a0fbe5c978aa" + } + ], + "user_identifier": null, + "current_owner_identifier": "59481331-ee53-42be-a548-bd87be6ddd4a" + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/security/metadata/assign", + "operationId": "assignChangeAuthor", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 1648 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "metadata": null, + "user_identifier": "59481331-ee53-42be-a548-bd87be6ddd4a" + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/security/metadata/assign", + "operationId": "assignChangeAuthor", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 1649 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "metadata": null, + "user_identifier": "59481331-ee53-42be-a548-bd87be6ddd4a", + "current_owner_identifier": "59481331-ee53-42be-a548-bd87be6ddd4a" + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/security/metadata/assign", + "operationId": "assignChangeAuthor", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 1650 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "metadata": [ + { + "type": "ANSWER", + "identifier": "c0dbb0e0-ac2e-4cf6-8718-7c661bb033a5" + }, + { + "type": "LIVEBOARD", + "identifier": "6246c548-985b-4dcf-9b62-196314a404b3" + } + ], + "user_identifier": [ + "59481331-ee53-42be-a548-bd87be6ddd4a" + ], + "current_owner_identifier": "59481331-ee53-42be-a548-bd87be6ddd4a" + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/security/metadata/assign", + "operationId": "assignChangeAuthor", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 1651 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "metadata": [ + { + "type": "LIVEBOARD", + "identifier": "c0dbb0e0-ac2e-4cf6-8718-7c661bb033a5" + }, + { + "type": "ANSWER", + "identifier": "6246c548-985b-4dcf-9b62-196314a404b3" + } + ], + "user_identifier": [ + "59481331-ee53-42be-a548-bd87be6ddd4a" + ], + "current_owner_identifier": "59481331-ee53-42be-a548-bd87be6ddd4a" + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/security/metadata/assign", + "operationId": "assignChangeAuthor", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 1652 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "metadata": "iPDIrCndPfLYQVZ", + "user_identifier": "59481331-ee53-42be-a548-bd87be6ddd4a" + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/security/metadata/assign", + "operationId": "assignChangeAuthor", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 1653 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "metadata": "uxKTFLSXAihfuoP", + "user_identifier": "59481331-ee53-42be-a548-bd87be6ddd4a" + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/security/metadata/assign", + "operationId": "assignChangeAuthor", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 1654 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "metadata": [ + { + "type": "LIVEBOARD", + "identifier": "c0dbb0e0-ac2e-4cf6-8718-7c661bb033a5" + }, + { + "type": "ANSWER", + "identifier": "6246c548-985b-4dcf-9b62-196314a404b3" + }, + { + "type": "LIVEBOARD", + "identifier": "21f35c49-c1f8-4f3d-a124-a0fbe5c978aa" + } + ], + "user_identifier": [ + "59481331-ee53-42be-a548-bd87be6ddd4a" + ] + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/security/metadata/assign", + "operationId": "assignChangeAuthor", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 1655 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "metadata": "rRCKhyLCoYBTPlU", + "user_identifier": "59481331-ee53-42be-a548-bd87be6ddd4a", + "current_owner_identifier": "59481331-ee53-42be-a548-bd87be6ddd4a" + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/security/metadata/assign", + "operationId": "assignChangeAuthor", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 1656 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "metadata": [ + { + "type": "LIVEBOARD", + "identifier": "c0dbb0e0-ac2e-4cf6-8718-7c661bb033a5" + }, + { + "type": "ANSWER", + "identifier": "6246c548-985b-4dcf-9b62-196314a404b3" + } + ], + "user_identifier": [ + "59481331-ee53-42be-a548-bd87be6ddd4a" + ], + "current_owner_identifier": "59481331-ee53-42be-a548-bd87be6ddd4a" + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/security/metadata/assign", + "operationId": "assignChangeAuthor", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 1657 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "metadata": [ + { + "type": "LOGICAL_TABLE", + "identifier": "c0dbb0e0-ac2e-4cf6-8718-7c661bb033a5" + }, + { + "type": "LOGICAL_TABLE", + "identifier": "6246c548-985b-4dcf-9b62-196314a404b3" + }, + { + "type": "ANSWER", + "identifier": "21f35c49-c1f8-4f3d-a124-a0fbe5c978aa" + } + ], + "user_identifier": "59481331-ee53-42be-a548-bd87be6ddd4a", + "current_owner_identifier": [ + "59481331-ee53-42be-a548-bd87be6ddd4a" + ] + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/security/metadata/assign", + "operationId": "assignChangeAuthor", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 1658 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "metadata": [ + { + "type": "LOGICAL_TABLE", + "identifier": "c0dbb0e0-ac2e-4cf6-8718-7c661bb033a5" + }, + { + "type": "ANSWER", + "identifier": "6246c548-985b-4dcf-9b62-196314a404b3" + }, + { + "type": "LOGICAL_TABLE", + "identifier": "21f35c49-c1f8-4f3d-a124-a0fbe5c978aa" + } + ], + "user_identifier": "59481331-ee53-42be-a548-bd87be6ddd4a", + "current_owner_identifier": [ + "59481331-ee53-42be-a548-bd87be6ddd4a" + ] + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/security/metadata/assign", + "operationId": "assignChangeAuthor", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 1659 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "metadata": [ + { + "type": "ANSWER", + "identifier": "c0dbb0e0-ac2e-4cf6-8718-7c661bb033a5" + }, + { + "type": "LIVEBOARD", + "identifier": "6246c548-985b-4dcf-9b62-196314a404b3" + }, + { + "type": "LIVEBOARD", + "identifier": "21f35c49-c1f8-4f3d-a124-a0fbe5c978aa" + } + ], + "user_identifier": [ + "59481331-ee53-42be-a548-bd87be6ddd4a" + ] + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/security/metadata/assign", + "operationId": "assignChangeAuthor", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 1660 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "metadata": "AyXBrmRAMmpwhDz", + "user_identifier": "59481331-ee53-42be-a548-bd87be6ddd4a" + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/security/metadata/assign", + "operationId": "assignChangeAuthor", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 1661 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "metadata": "SliBnjeqymDEiko", + "user_identifier": "59481331-ee53-42be-a548-bd87be6ddd4a", + "current_owner_identifier": "59481331-ee53-42be-a548-bd87be6ddd4a" + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/security/metadata/assign", + "operationId": "assignChangeAuthor", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 1662 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "metadata": [ + { + "type": "LIVEBOARD", + "identifier": "c0dbb0e0-ac2e-4cf6-8718-7c661bb033a5" + }, + { + "type": "ANSWER", + "identifier": "6246c548-985b-4dcf-9b62-196314a404b3" + } + ], + "user_identifier": [ + "59481331-ee53-42be-a548-bd87be6ddd4a" + ] + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/security/metadata/assign", + "operationId": "assignChangeAuthor", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 1663 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "metadata": [ + { + "type": "ANSWER", + "identifier": "c0dbb0e0-ac2e-4cf6-8718-7c661bb033a5" + } + ], + "user_identifier": "59481331-ee53-42be-a548-bd87be6ddd4a", + "current_owner_identifier": [ + "59481331-ee53-42be-a548-bd87be6ddd4a" + ] + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/security/metadata/assign", + "operationId": "assignChangeAuthor", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 1664 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "metadata": [ + { + "type": "LIVEBOARD", + "identifier": "c0dbb0e0-ac2e-4cf6-8718-7c661bb033a5" + } + ], + "user_identifier": [ + "59481331-ee53-42be-a548-bd87be6ddd4a" + ] + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/security/metadata/assign", + "operationId": "assignChangeAuthor", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 1665 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "metadata": [ + { + "type": "ANSWER", + "identifier": "c0dbb0e0-ac2e-4cf6-8718-7c661bb033a5" + }, + { + "type": "LIVEBOARD", + "identifier": "6246c548-985b-4dcf-9b62-196314a404b3" + }, + { + "type": "LIVEBOARD", + "identifier": "21f35c49-c1f8-4f3d-a124-a0fbe5c978aa" + } + ], + "user_identifier": "vXTQPxzkpALhFSQ" + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/security/metadata/assign", + "operationId": "assignChangeAuthor", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 1666 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "metadata": [ + { + "type": "ANSWER", + "identifier": "c0dbb0e0-ac2e-4cf6-8718-7c661bb033a5" + } + ], + "user_identifier": "MSEwTUmmECRHzGF" + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/security/metadata/assign", + "operationId": "assignChangeAuthor", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 1667 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "metadata": [ + { + "type": "LOGICAL_TABLE", + "identifier": "c0dbb0e0-ac2e-4cf6-8718-7c661bb033a5" + }, + { + "type": "LOGICAL_TABLE", + "identifier": "6246c548-985b-4dcf-9b62-196314a404b3" + }, + { + "type": "ANSWER", + "identifier": "21f35c49-c1f8-4f3d-a124-a0fbe5c978aa" + } + ], + "user_identifier": "HMcMXRaoiKLfcdt", + "current_owner_identifier": "59481331-ee53-42be-a548-bd87be6ddd4a" + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/security/metadata/assign", + "operationId": "assignChangeAuthor", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 1668 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "metadata": [ + { + "type": "ANSWER", + "identifier": "c0dbb0e0-ac2e-4cf6-8718-7c661bb033a5" + }, + { + "type": "LIVEBOARD", + "identifier": "6246c548-985b-4dcf-9b62-196314a404b3" + } + ], + "user_identifier": "GGVVFZWSoXcGrlk", + "current_owner_identifier": "59481331-ee53-42be-a548-bd87be6ddd4a" + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/security/metadata/assign", + "operationId": "assignChangeAuthor", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 1669 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "metadata": [ + { + "type": "ANSWER", + "identifier": "c0dbb0e0-ac2e-4cf6-8718-7c661bb033a5" + } + ], + "user_identifier": "arrjXtKcQVMssJG" + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/security/metadata/assign", + "operationId": "assignChangeAuthor", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 1670 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "metadata": [ + { + "type": "LIVEBOARD", + "identifier": "c0dbb0e0-ac2e-4cf6-8718-7c661bb033a5" + } + ], + "user_identifier": "QdwPjvCecoXRwKi" + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/security/metadata/assign", + "operationId": "assignChangeAuthor", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 1671 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "metadata": [ + { + "type": "LOGICAL_TABLE", + "identifier": "c0dbb0e0-ac2e-4cf6-8718-7c661bb033a5" + }, + { + "type": "LOGICAL_TABLE", + "identifier": "6246c548-985b-4dcf-9b62-196314a404b3" + }, + { + "type": "ANSWER", + "identifier": "21f35c49-c1f8-4f3d-a124-a0fbe5c978aa" + } + ], + "user_identifier": "KOouRhKxzLHuOIJ", + "current_owner_identifier": "59481331-ee53-42be-a548-bd87be6ddd4a" + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/security/metadata/assign", + "operationId": "assignChangeAuthor", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 1672 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "metadata": [ + { + "type": "LIVEBOARD", + "identifier": "c0dbb0e0-ac2e-4cf6-8718-7c661bb033a5" + } + ], + "user_identifier": "xYUXMkbjQZOvKln", + "current_owner_identifier": "59481331-ee53-42be-a548-bd87be6ddd4a" + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/security/metadata/assign", + "operationId": "assignChangeAuthor", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 1673 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "metadata": [ + { + "type": "LIVEBOARD", + "identifier": "c0dbb0e0-ac2e-4cf6-8718-7c661bb033a5" + }, + { + "type": "ANSWER", + "identifier": "6246c548-985b-4dcf-9b62-196314a404b3" + } + ], + "user_identifier": "EVLTWFzVyNzuOVR" + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/security/metadata/assign", + "operationId": "assignChangeAuthor", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 1674 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "metadata": [ + { + "type": "ANSWER", + "identifier": "c0dbb0e0-ac2e-4cf6-8718-7c661bb033a5" + }, + { + "type": "LIVEBOARD", + "identifier": "6246c548-985b-4dcf-9b62-196314a404b3" + }, + { + "type": "LIVEBOARD", + "identifier": "21f35c49-c1f8-4f3d-a124-a0fbe5c978aa" + } + ], + "user_identifier": "lVGsBXdQwyPXWmf" + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/security/metadata/assign", + "operationId": "assignChangeAuthor", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 1675 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "metadata": [ + { + "type": "LIVEBOARD", + "identifier": "c0dbb0e0-ac2e-4cf6-8718-7c661bb033a5" + } + ], + "user_identifier": "tbXSpFMeyxPNReR" + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/security/metadata/assign", + "operationId": "assignChangeAuthor", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 1676 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "metadata": [ + { + "type": "ANSWER", + "identifier": "c0dbb0e0-ac2e-4cf6-8718-7c661bb033a5" + } + ], + "user_identifier": "kMBlNotQMtiMbDR", + "current_owner_identifier": "59481331-ee53-42be-a548-bd87be6ddd4a" + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/security/metadata/assign", + "operationId": "assignChangeAuthor", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 1677 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "metadata": [ + { + "type": "LOGICAL_TABLE", + "identifier": "c0dbb0e0-ac2e-4cf6-8718-7c661bb033a5" + }, + { + "type": "ANSWER", + "identifier": "6246c548-985b-4dcf-9b62-196314a404b3" + } + ], + "user_identifier": "SIRDpuERbiyjyqR" + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/security/metadata/assign", + "operationId": "assignChangeAuthor", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 1678 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "metadata": [ + { + "type": "LIVEBOARD", + "identifier": "c0dbb0e0-ac2e-4cf6-8718-7c661bb033a5" + }, + { + "type": "ANSWER", + "identifier": "6246c548-985b-4dcf-9b62-196314a404b3" + } + ], + "user_identifier": "fBxEIaAIRFVffiD" + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/security/metadata/assign", + "operationId": "assignChangeAuthor", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 1679 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "metadata": [ + { + "type": "ANSWER", + "identifier": "c0dbb0e0-ac2e-4cf6-8718-7c661bb033a5" + }, + { + "type": "LIVEBOARD", + "identifier": "6246c548-985b-4dcf-9b62-196314a404b3" + }, + { + "type": "LIVEBOARD", + "identifier": "21f35c49-c1f8-4f3d-a124-a0fbe5c978aa" + } + ], + "user_identifier": "FUKtxrXivcBQCHf" + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/security/metadata/share", + "operationId": "shareMetadata", + "scenario": "positive", + "type": "AUTOMATIC", + "testId": 1680 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "metadata_type": "ANSWER", + "metadata_identifiers": [ + "97be839e-71b6-42ad-a980-20c38b4d6db5", + "33052ef8-5296-4aa8-8c57-7499ef0cb282" + ], + "visualization_identifiers": null, + "emails": [ + "kcoultous0@reference.com", + "ipaling0@techcrunch.com", + "bbroadbere0@cnet.com" + ], + "message": "In sagittis dui vel nisl. Duis ac nibh. Fusce lacus purus, aliquet at, feugiat non, pretium quis, lectus. Suspendisse potenti. In eleifend quam a odio.", + "enable_custom_url": null, + "permissions": [ + { + "principal": { + "identifier": "4391d676-2dd8-4248-b6db-d973811f0122", + "type": "USER" + }, + "share_mode": "MODIFY" + } + ] + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/security/metadata/share", + "operationId": "shareMetadata", + "scenario": "positive", + "type": "AUTOMATIC", + "testId": 1681 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "metadata_type": "LIVEBOARD", + "metadata_identifiers": [ + "e82fe65a-7ac0-4282-a783-7a35c01b8dbd", + "78950be9-0717-449e-be26-64ea42617dd1", + "2ff57a24-cf90-485f-8b4b-45fc17474c6f", + "4145513c-c9bd-4e48-af44-8dc001b5f955" + ], + "visualization_identifiers": null, + "emails": [ + "ccloute1@salon.com", + "jlintin1@exblog.jp" + ], + "message": "Fusce congue, diam id ornare imperdiet, sapien urna pretium nisl, ut volutpat sapien arcu sed augue. Aliquam erat volutpat. In congue. Etiam justo. Etiam pretium iaculis justo. In hac habitasse platea dictumst. Etiam faucibus cursus urna.", + "enable_custom_url": null, + "permissions": [ + { + "principal": { + "identifier": "4391d676-2dd8-4248-b6db-d973811f0122", + "type": "USER" + }, + "share_mode": "MODIFY" + }, + { + "principal": { + "identifier": "314ac3fe-c5e1-4898-9cf7-29d9d455f052", + "type": "USER_GROUP" + }, + "share_mode": "READ_ONLY" + } + ] + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/security/metadata/share", + "operationId": "shareMetadata", + "scenario": "positive", + "type": "AUTOMATIC", + "testId": 1682 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "metadata_type": "ANSWER", + "metadata_identifiers": [ + "97be839e-71b6-42ad-a980-20c38b4d6db5", + "33052ef8-5296-4aa8-8c57-7499ef0cb282", + "617dcf56-5bb3-46f3-b802-fdfe2e94ff64", + "7ca13c1d-51de-477e-94c8-f9372a8e30e3", + "a7826fd7-cca0-4e75-9c55-9bfbb18b7454" + ], + "visualization_identifiers": null, + "emails": [ + "ezorzini2@storify.com", + "fingham2@theatlantic.com" + ], + "message": "Pellentesque at nulla. Suspendisse potenti.", + "enable_custom_url": true, + "permissions": [ + { + "principal": { + "identifier": "4391d676-2dd8-4248-b6db-d973811f0122", + "type": "USER" + }, + "share_mode": "READ_ONLY" + } + ] + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/security/metadata/share", + "operationId": "shareMetadata", + "scenario": "positive", + "type": "AUTOMATIC", + "testId": 1683 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "metadata_type": "LOGICAL_TABLE", + "metadata_identifiers": [ + "1ac1a13a-0eea-479c-9bd6-25f16cf3ce70", + "bfa7e411-2232-42f6-9db7-ab51e1d6e9d2", + "6246c548-985b-4dcf-9b62-196314a404b3", + "c0dbb0e0-ac2e-4cf6-8718-7c661bb033a5", + "be94b6dc-f58c-4645-858e-bbe4be53a654" + ], + "visualization_identifiers": null, + "emails": [ + "rclashe3@imgur.com" + ], + "message": "In est risus, auctor sed, tristique in, tempus sit amet, sem. Fusce consequat. Nulla nisl. Nunc nisl. Duis bibendum, felis sed interdum venenatis, turpis enim blandit mi, in porttitor pede justo eu massa. Donec dapibus. Duis at velit eu est congue elementum. In hac habitasse platea dictumst. Morbi vestibulum, velit id pretium iaculis, diam erat fermentum justo, nec condimentum neque sapien placerat ante.", + "enable_custom_url": true, + "permissions": [ + { + "principal": { + "identifier": "4391d676-2dd8-4248-b6db-d973811f0122", + "type": "USER" + }, + "share_mode": "READ_ONLY" + }, + { + "principal": { + "identifier": "314ac3fe-c5e1-4898-9cf7-29d9d455f052", + "type": "USER_GROUP" + }, + "share_mode": "NO_ACCESS" + } + ] + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/security/metadata/share", + "operationId": "shareMetadata", + "scenario": "positive", + "type": "AUTOMATIC", + "testId": 1684 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "metadata_type": "LOGICAL_TABLE", + "metadata_identifiers": [ + "1ac1a13a-0eea-479c-9bd6-25f16cf3ce70", + "bfa7e411-2232-42f6-9db7-ab51e1d6e9d2", + "6246c548-985b-4dcf-9b62-196314a404b3" + ], + "visualization_identifiers": null, + "emails": [ + "dfarn4@amazonaws.com" + ], + "message": "Morbi quis tortor id nulla ultrices aliquet. Maecenas leo odio, condimentum id, luctus nec, molestie sed, justo. Pellentesque viverra pede ac diam.", + "enable_custom_url": null, + "permissions": [ + { + "principal": { + "identifier": "4391d676-2dd8-4248-b6db-d973811f0122", + "type": "USER" + }, + "share_mode": "MODIFY" + } + ] + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/security/metadata/share", + "operationId": "shareMetadata", + "scenario": "positive", + "type": "AUTOMATIC", + "testId": 1685 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "metadata_type": "LIVEBOARD", + "metadata_identifiers": [ + "e82fe65a-7ac0-4282-a783-7a35c01b8dbd", + "78950be9-0717-449e-be26-64ea42617dd1", + "2ff57a24-cf90-485f-8b4b-45fc17474c6f", + "4145513c-c9bd-4e48-af44-8dc001b5f955", + "33248a57-cc70-4e39-9199-fb5092283381" + ], + "visualization_identifiers": null, + "emails": [ + "bspat5@springer.com" + ], + "message": "Etiam justo. Etiam pretium iaculis justo. In hac habitasse platea dictumst. Etiam faucibus cursus urna. Ut tellus. Nulla ut erat id mauris vulputate elementum. Nullam varius. Nulla facilisi.", + "enable_custom_url": null, + "permissions": [ + { + "principal": { + "identifier": "4391d676-2dd8-4248-b6db-d973811f0122", + "type": "USER" + }, + "share_mode": "NO_ACCESS" + } + ] + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/security/metadata/share", + "operationId": "shareMetadata", + "scenario": "positive", + "type": "AUTOMATIC", + "testId": 1686 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "metadata_type": "LOGICAL_TABLE", + "metadata_identifiers": [ + "1ac1a13a-0eea-479c-9bd6-25f16cf3ce70", + "bfa7e411-2232-42f6-9db7-ab51e1d6e9d2", + "6246c548-985b-4dcf-9b62-196314a404b3", + "c0dbb0e0-ac2e-4cf6-8718-7c661bb033a5" + ], + "visualization_identifiers": null, + "emails": [ + "msacks6@plala.or.jp", + "rshitliffe6@utexas.edu" + ], + "message": "Nunc nisl.", + "enable_custom_url": true, + "permissions": [ + { + "principal": { + "identifier": "4391d676-2dd8-4248-b6db-d973811f0122", + "type": "USER" + }, + "share_mode": "MODIFY" + }, + { + "principal": { + "identifier": "314ac3fe-c5e1-4898-9cf7-29d9d455f052", + "type": "USER_GROUP" + }, + "share_mode": "NO_ACCESS" + }, + { + "principal": { + "identifier": "983ddaab-15cf-4c95-a21e-67383a67b6d1", + "type": "USER_GROUP" + }, + "share_mode": "READ_ONLY" + } + ] + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/security/metadata/share", + "operationId": "shareMetadata", + "scenario": "positive", + "type": "AUTOMATIC", + "testId": 1687 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "metadata_type": "LOGICAL_TABLE", + "metadata_identifiers": [ + "1ac1a13a-0eea-479c-9bd6-25f16cf3ce70", + "bfa7e411-2232-42f6-9db7-ab51e1d6e9d2" + ], + "visualization_identifiers": null, + "emails": [ + "jscottini7@java.com", + "dpratley7@wikimedia.org" + ], + "message": "Etiam justo. Etiam pretium iaculis justo. In hac habitasse platea dictumst.", + "enable_custom_url": true, + "permissions": [ + { + "principal": { + "identifier": "4391d676-2dd8-4248-b6db-d973811f0122", + "type": "USER" + }, + "share_mode": "READ_ONLY" + }, + { + "principal": { + "identifier": "314ac3fe-c5e1-4898-9cf7-29d9d455f052", + "type": "USER_GROUP" + }, + "share_mode": "READ_ONLY" + }, + { + "principal": { + "identifier": "983ddaab-15cf-4c95-a21e-67383a67b6d1", + "type": "USER_GROUP" + }, + "share_mode": "MODIFY" + } + ] + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/security/metadata/share", + "operationId": "shareMetadata", + "scenario": "positive", + "type": "AUTOMATIC", + "testId": 1688 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "metadata_type": "LOGICAL_TABLE", + "metadata_identifiers": [ + "1ac1a13a-0eea-479c-9bd6-25f16cf3ce70", + "bfa7e411-2232-42f6-9db7-ab51e1d6e9d2" + ], + "visualization_identifiers": null, + "emails": [ + "talfuso8@istockphoto.com", + "blorenc8@simplemachines.org", + "owitham8@tinypic.com" + ], + "message": "Morbi ut odio. Cras mi pede, malesuada in, imperdiet et, commodo vulputate, justo. In blandit ultrices enim. Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Proin interdum mauris non ligula pellentesque ultrices.", + "enable_custom_url": null, + "permissions": [ + { + "principal": { + "identifier": "4391d676-2dd8-4248-b6db-d973811f0122", + "type": "USER" + }, + "share_mode": "NO_ACCESS" + } + ] + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/security/metadata/share", + "operationId": "shareMetadata", + "scenario": "positive", + "type": "AUTOMATIC", + "testId": 1689 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "metadata_type": "ANSWER", + "metadata_identifiers": [ + "97be839e-71b6-42ad-a980-20c38b4d6db5" + ], + "visualization_identifiers": null, + "emails": [ + "ajacobsson9@cnbc.com", + "amclean9@chron.com", + "tferreo9@yale.edu" + ], + "message": "Proin risus. Praesent lectus. Vestibulum quam sapien, varius ut, blandit non, interdum in, ante. Vestibulum ante ipsum primis in faucibus orci luctus et ultrices posuere cubilia Curae; Duis faucibus accumsan odio. Curabitur convallis. Duis consequat dui nec nisi volutpat eleifend. Donec ut dolor. Morbi vel lectus in quam fringilla rhoncus. Mauris enim leo, rhoncus sed, vestibulum sit amet, cursus id, turpis.", + "enable_custom_url": null, + "permissions": [ + { + "principal": { + "identifier": "4391d676-2dd8-4248-b6db-d973811f0122", + "type": "USER" + }, + "share_mode": "MODIFY" + } + ] + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/security/metadata/share", + "operationId": "shareMetadata", + "scenario": "positive", + "type": "AUTOMATIC", + "testId": 1690 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "metadata_type": "ANSWER", + "metadata_identifiers": [ + "97be839e-71b6-42ad-a980-20c38b4d6db5", + "33052ef8-5296-4aa8-8c57-7499ef0cb282" + ], + "visualization_identifiers": null, + "emails": [ + "dcorsellesa@cpanel.net", + "idavida@wordpress.com" + ], + "message": "In tempor, turpis nec euismod scelerisque, quam turpis adipiscing lorem, vitae mattis nibh ligula nec sem. Duis aliquam convallis nunc. Proin at turpis a pede posuere nonummy. Integer non velit. Donec diam neque, vestibulum eget, vulputate ut, ultrices vel, augue.", + "enable_custom_url": false, + "permissions": [ + { + "principal": { + "identifier": "4391d676-2dd8-4248-b6db-d973811f0122", + "type": "USER" + }, + "share_mode": "READ_ONLY" + } + ] + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/security/metadata/share", + "operationId": "shareMetadata", + "scenario": "positive", + "type": "AUTOMATIC", + "testId": 1691 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "metadata_type": "ANSWER", + "metadata_identifiers": [ + "97be839e-71b6-42ad-a980-20c38b4d6db5", + "33052ef8-5296-4aa8-8c57-7499ef0cb282" + ], + "visualization_identifiers": null, + "emails": [ + "jlethburyb@amazon.co.jp", + "lpannamanb@uol.com.br", + "cnicholesb@networkadvertising.org" + ], + "message": "Integer aliquet, massa id lobortis convallis, tortor risus dapibus augue, vel accumsan tellus nisi eu orci. Mauris lacinia sapien quis libero.", + "enable_custom_url": true, + "permissions": [ + { + "principal": { + "identifier": "4391d676-2dd8-4248-b6db-d973811f0122", + "type": "USER" + }, + "share_mode": "NO_ACCESS" + }, + { + "principal": { + "identifier": "314ac3fe-c5e1-4898-9cf7-29d9d455f052", + "type": "USER_GROUP" + }, + "share_mode": "READ_ONLY" + }, + { + "principal": { + "identifier": "983ddaab-15cf-4c95-a21e-67383a67b6d1", + "type": "USER_GROUP" + }, + "share_mode": "READ_ONLY" + } + ] + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/security/metadata/share", + "operationId": "shareMetadata", + "scenario": "positive", + "type": "AUTOMATIC", + "testId": 1692 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "metadata_type": "LOGICAL_TABLE", + "metadata_identifiers": [ + "1ac1a13a-0eea-479c-9bd6-25f16cf3ce70", + "bfa7e411-2232-42f6-9db7-ab51e1d6e9d2", + "6246c548-985b-4dcf-9b62-196314a404b3" + ], + "visualization_identifiers": null, + "emails": [ + "kfarrentc@prweb.com" + ], + "message": "Nunc nisl.", + "enable_custom_url": true, + "permissions": [ + { + "principal": { + "identifier": "4391d676-2dd8-4248-b6db-d973811f0122", + "type": "USER" + }, + "share_mode": "MODIFY" + }, + { + "principal": { + "identifier": "314ac3fe-c5e1-4898-9cf7-29d9d455f052", + "type": "USER_GROUP" + }, + "share_mode": "MODIFY" + } + ] + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/security/metadata/share", + "operationId": "shareMetadata", + "scenario": "positive", + "type": "AUTOMATIC", + "testId": 1693 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "metadata_type": "ANSWER", + "metadata_identifiers": [ + "97be839e-71b6-42ad-a980-20c38b4d6db5" + ], + "visualization_identifiers": null, + "emails": [ + "scoccid@phpbb.com" + ], + "message": "Nullam molestie nibh in lectus. Pellentesque at nulla. Suspendisse potenti. Cras in purus eu magna vulputate luctus. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Vivamus vestibulum sagittis sapien. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus.", + "enable_custom_url": null, + "permissions": [ + { + "principal": { + "identifier": "4391d676-2dd8-4248-b6db-d973811f0122", + "type": "USER" + }, + "share_mode": "NO_ACCESS" + }, + { + "principal": { + "identifier": "314ac3fe-c5e1-4898-9cf7-29d9d455f052", + "type": "USER_GROUP" + }, + "share_mode": "READ_ONLY" + }, + { + "principal": { + "identifier": "983ddaab-15cf-4c95-a21e-67383a67b6d1", + "type": "USER_GROUP" + }, + "share_mode": "MODIFY" + } + ] + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/security/metadata/share", + "operationId": "shareMetadata", + "scenario": "positive", + "type": "AUTOMATIC", + "testId": 1694 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "metadata_type": "ANSWER", + "metadata_identifiers": [ + "97be839e-71b6-42ad-a980-20c38b4d6db5", + "33052ef8-5296-4aa8-8c57-7499ef0cb282", + "617dcf56-5bb3-46f3-b802-fdfe2e94ff64" + ], + "visualization_identifiers": null, + "emails": [ + "dsnadene@twitter.com", + "emccraye@statcounter.com", + "rcannye@howstuffworks.com" + ], + "message": "Nulla mollis molestie lorem. Quisque ut erat. Curabitur gravida nisi at nibh. In hac habitasse platea dictumst. Aliquam augue quam, sollicitudin vitae, consectetuer eget, rutrum at, lorem. Integer tincidunt ante vel ipsum. Praesent blandit lacinia erat. Vestibulum sed magna at nunc commodo placerat.", + "enable_custom_url": false, + "permissions": [ + { + "principal": { + "identifier": "4391d676-2dd8-4248-b6db-d973811f0122", + "type": "USER" + }, + "share_mode": "MODIFY" + }, + { + "principal": { + "identifier": "314ac3fe-c5e1-4898-9cf7-29d9d455f052", + "type": "USER_GROUP" + }, + "share_mode": "READ_ONLY" + } + ] + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/security/metadata/share", + "operationId": "shareMetadata", + "scenario": "positive", + "type": "AUTOMATIC", + "testId": 1695 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "metadata_type": "LOGICAL_TABLE", + "metadata_identifiers": [ + "1ac1a13a-0eea-479c-9bd6-25f16cf3ce70", + "bfa7e411-2232-42f6-9db7-ab51e1d6e9d2", + "6246c548-985b-4dcf-9b62-196314a404b3", + "c0dbb0e0-ac2e-4cf6-8718-7c661bb033a5", + "be94b6dc-f58c-4645-858e-bbe4be53a654" + ], + "visualization_identifiers": null, + "emails": [ + "ggammagef@statcounter.com", + "npringerf@pcworld.com", + "dedef@i2i.jp" + ], + "message": "Mauris sit amet eros. Suspendisse accumsan tortor quis turpis. Sed ante. Vivamus tortor. Duis mattis egestas metus. Aenean fermentum. Donec ut mauris eget massa tempor convallis. Nulla neque libero, convallis eget, eleifend luctus, ultricies eu, nibh. Quisque id justo sit amet sapien dignissim vestibulum.", + "enable_custom_url": false, + "permissions": [ + { + "principal": { + "identifier": "4391d676-2dd8-4248-b6db-d973811f0122", + "type": "USER" + }, + "share_mode": "MODIFY" + }, + { + "principal": { + "identifier": "314ac3fe-c5e1-4898-9cf7-29d9d455f052", + "type": "USER_GROUP" + }, + "share_mode": "NO_ACCESS" + } + ] + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/security/metadata/share", + "operationId": "shareMetadata", + "scenario": "positive", + "type": "AUTOMATIC", + "testId": 1696 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "metadata_type": "LIVEBOARD", + "metadata_identifiers": [ + "e82fe65a-7ac0-4282-a783-7a35c01b8dbd", + "78950be9-0717-449e-be26-64ea42617dd1", + "2ff57a24-cf90-485f-8b4b-45fc17474c6f", + "4145513c-c9bd-4e48-af44-8dc001b5f955", + "33248a57-cc70-4e39-9199-fb5092283381" + ], + "visualization_identifiers": null, + "emails": [ + "saggisg@vinaora.com", + "jkarelg@nifty.com", + "foverillg@bloomberg.com" + ], + "message": "Nam dui. Proin leo odio, porttitor id, consequat in, consequat ut, nulla. Sed accumsan felis. Ut at dolor quis odio consequat varius. Integer ac leo. Pellentesque ultrices mattis odio. Donec vitae nisi. Nam ultrices, libero non mattis pulvinar, nulla pede ullamcorper augue, a suscipit nulla elit ac nulla. Sed vel enim sit amet nunc viverra dapibus. Nulla suscipit ligula in lacus.", + "enable_custom_url": null, + "permissions": [ + { + "principal": { + "identifier": "4391d676-2dd8-4248-b6db-d973811f0122", + "type": "USER" + }, + "share_mode": "READ_ONLY" + }, + { + "principal": { + "identifier": "314ac3fe-c5e1-4898-9cf7-29d9d455f052", + "type": "USER_GROUP" + }, + "share_mode": "NO_ACCESS" + } + ] + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/security/metadata/share", + "operationId": "shareMetadata", + "scenario": "positive", + "type": "AUTOMATIC", + "testId": 1697 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "metadata_type": "LIVEBOARD", + "metadata_identifiers": [ + "e82fe65a-7ac0-4282-a783-7a35c01b8dbd", + "78950be9-0717-449e-be26-64ea42617dd1", + "2ff57a24-cf90-485f-8b4b-45fc17474c6f", + "4145513c-c9bd-4e48-af44-8dc001b5f955" + ], + "visualization_identifiers": null, + "emails": [ + "kgoshawkh@tinypic.com" + ], + "message": "Maecenas tristique, est et tempus semper, est quam pharetra magna, ac consequat metus sapien ut nunc. Vestibulum ante ipsum primis in faucibus orci luctus et ultrices posuere cubilia Curae; Mauris viverra diam vitae quam.", + "enable_custom_url": false, + "permissions": [ + { + "principal": { + "identifier": "4391d676-2dd8-4248-b6db-d973811f0122", + "type": "USER" + }, + "share_mode": "READ_ONLY" + }, + { + "principal": { + "identifier": "314ac3fe-c5e1-4898-9cf7-29d9d455f052", + "type": "USER_GROUP" + }, + "share_mode": "MODIFY" + }, + { + "principal": { + "identifier": "983ddaab-15cf-4c95-a21e-67383a67b6d1", + "type": "USER_GROUP" + }, + "share_mode": "READ_ONLY" + } + ] + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/security/metadata/share", + "operationId": "shareMetadata", + "scenario": "positive", + "type": "AUTOMATIC", + "testId": 1698 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "metadata_type": "ANSWER", + "metadata_identifiers": [ + "97be839e-71b6-42ad-a980-20c38b4d6db5", + "33052ef8-5296-4aa8-8c57-7499ef0cb282", + "617dcf56-5bb3-46f3-b802-fdfe2e94ff64", + "7ca13c1d-51de-477e-94c8-f9372a8e30e3", + "a7826fd7-cca0-4e75-9c55-9bfbb18b7454" + ], + "visualization_identifiers": null, + "emails": [ + "sfranzolii@microsoft.com" + ], + "message": "Quisque erat eros, viverra eget, congue eget, semper rutrum, nulla. Nunc purus.", + "enable_custom_url": true, + "permissions": [ + { + "principal": { + "identifier": "4391d676-2dd8-4248-b6db-d973811f0122", + "type": "USER" + }, + "share_mode": "NO_ACCESS" + }, + { + "principal": { + "identifier": "314ac3fe-c5e1-4898-9cf7-29d9d455f052", + "type": "USER_GROUP" + }, + "share_mode": "READ_ONLY" + } + ] + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/security/metadata/share", + "operationId": "shareMetadata", + "scenario": "positive", + "type": "AUTOMATIC", + "testId": 1699 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "metadata_type": "ANSWER", + "metadata_identifiers": [ + "97be839e-71b6-42ad-a980-20c38b4d6db5", + "33052ef8-5296-4aa8-8c57-7499ef0cb282", + "617dcf56-5bb3-46f3-b802-fdfe2e94ff64", + "7ca13c1d-51de-477e-94c8-f9372a8e30e3" + ], + "visualization_identifiers": null, + "emails": [ + "tmatysikj@mysql.com", + "awilsteadj@google.co.jp" + ], + "message": "In quis justo. Maecenas rhoncus aliquam lacus. Morbi quis tortor id nulla ultrices aliquet. Maecenas leo odio, condimentum id, luctus nec, molestie sed, justo. Pellentesque viverra pede ac diam. Cras pellentesque volutpat dui. Maecenas tristique, est et tempus semper, est quam pharetra magna, ac consequat metus sapien ut nunc. Vestibulum ante ipsum primis in faucibus orci luctus et ultrices posuere cubilia Curae; Mauris viverra diam vitae quam. Suspendisse potenti.", + "enable_custom_url": null, + "permissions": [ + { + "principal": { + "identifier": "4391d676-2dd8-4248-b6db-d973811f0122", + "type": "USER" + }, + "share_mode": "MODIFY" + } + ] + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/security/metadata/share", + "operationId": "shareMetadata", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 1700 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "metadata_type": "ANSWER", + "metadata_identifiers": [ + "97be839e-71b6-42ad-a980-20c38b4d6db5" + ], + "visualization_identifiers": null, + "emails": [ + "ajacobsson9@cnbc.com", + "amclean9@chron.com", + "tferreo9@yale.edu" + ], + "message": "Proin risus. Praesent lectus. Vestibulum quam sapien, varius ut, blandit non, interdum in, ante. Vestibulum ante ipsum primis in faucibus orci luctus et ultrices posuere cubilia Curae; Duis faucibus accumsan odio. Curabitur convallis. Duis consequat dui nec nisi volutpat eleifend. Donec ut dolor. Morbi vel lectus in quam fringilla rhoncus. Mauris enim leo, rhoncus sed, vestibulum sit amet, cursus id, turpis.", + "enable_custom_url": null, + "permissions": null + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/security/metadata/share", + "operationId": "shareMetadata", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 1701 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "metadata_type": "ANSWER", + "metadata_identifiers": [ + "97be839e-71b6-42ad-a980-20c38b4d6db5", + "33052ef8-5296-4aa8-8c57-7499ef0cb282" + ], + "visualization_identifiers": null, + "emails": [ + "jlethburyb@amazon.co.jp", + "lpannamanb@uol.com.br", + "cnicholesb@networkadvertising.org" + ], + "message": null, + "enable_custom_url": true, + "permissions": [ + { + "principal": { + "identifier": "4391d676-2dd8-4248-b6db-d973811f0122", + "type": "USER" + }, + "share_mode": "NO_ACCESS" + }, + { + "principal": { + "identifier": "314ac3fe-c5e1-4898-9cf7-29d9d455f052", + "type": "USER_GROUP" + }, + "share_mode": "READ_ONLY" + }, + { + "principal": { + "identifier": "983ddaab-15cf-4c95-a21e-67383a67b6d1", + "type": "USER_GROUP" + }, + "share_mode": "READ_ONLY" + } + ] + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/security/metadata/share", + "operationId": "shareMetadata", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 1702 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "metadata_type": null, + "metadata_identifiers": [ + "97be839e-71b6-42ad-a980-20c38b4d6db5", + "33052ef8-5296-4aa8-8c57-7499ef0cb282", + "617dcf56-5bb3-46f3-b802-fdfe2e94ff64", + "7ca13c1d-51de-477e-94c8-f9372a8e30e3" + ], + "visualization_identifiers": null, + "emails": [ + "tmatysikj@mysql.com", + "awilsteadj@google.co.jp" + ], + "message": "In quis justo. Maecenas rhoncus aliquam lacus. Morbi quis tortor id nulla ultrices aliquet. Maecenas leo odio, condimentum id, luctus nec, molestie sed, justo. Pellentesque viverra pede ac diam. Cras pellentesque volutpat dui. Maecenas tristique, est et tempus semper, est quam pharetra magna, ac consequat metus sapien ut nunc. Vestibulum ante ipsum primis in faucibus orci luctus et ultrices posuere cubilia Curae; Mauris viverra diam vitae quam. Suspendisse potenti.", + "enable_custom_url": null, + "permissions": [ + { + "principal": { + "identifier": "4391d676-2dd8-4248-b6db-d973811f0122", + "type": "USER" + }, + "share_mode": "MODIFY" + } + ] + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/security/metadata/share", + "operationId": "shareMetadata", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 1703 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "metadata_type": "LOGICAL_TABLE", + "metadata_identifiers": [ + "1ac1a13a-0eea-479c-9bd6-25f16cf3ce70", + "bfa7e411-2232-42f6-9db7-ab51e1d6e9d2" + ], + "visualization_identifiers": null, + "emails": [ + "talfuso8@istockphoto.com", + "blorenc8@simplemachines.org", + "owitham8@tinypic.com" + ], + "message": null, + "enable_custom_url": null, + "permissions": [ + { + "principal": { + "identifier": "4391d676-2dd8-4248-b6db-d973811f0122", + "type": "USER" + }, + "share_mode": "NO_ACCESS" + } + ] + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/security/metadata/share", + "operationId": "shareMetadata", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 1704 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "metadata_type": null, + "metadata_identifiers": [ + "e82fe65a-7ac0-4282-a783-7a35c01b8dbd", + "78950be9-0717-449e-be26-64ea42617dd1", + "2ff57a24-cf90-485f-8b4b-45fc17474c6f", + "4145513c-c9bd-4e48-af44-8dc001b5f955", + "33248a57-cc70-4e39-9199-fb5092283381" + ], + "visualization_identifiers": null, + "emails": [ + "bspat5@springer.com" + ], + "message": "Etiam justo. Etiam pretium iaculis justo. In hac habitasse platea dictumst. Etiam faucibus cursus urna. Ut tellus. Nulla ut erat id mauris vulputate elementum. Nullam varius. Nulla facilisi.", + "enable_custom_url": null, + "permissions": [ + { + "principal": { + "identifier": "4391d676-2dd8-4248-b6db-d973811f0122", + "type": "USER" + }, + "share_mode": "NO_ACCESS" + } + ] + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/security/metadata/share", + "operationId": "shareMetadata", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 1705 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "metadata_type": "LOGICAL_TABLE", + "metadata_identifiers": [ + "1ac1a13a-0eea-479c-9bd6-25f16cf3ce70", + "bfa7e411-2232-42f6-9db7-ab51e1d6e9d2", + "6246c548-985b-4dcf-9b62-196314a404b3", + "c0dbb0e0-ac2e-4cf6-8718-7c661bb033a5", + "be94b6dc-f58c-4645-858e-bbe4be53a654" + ], + "visualization_identifiers": null, + "emails": [ + "ggammagef@statcounter.com", + "npringerf@pcworld.com", + "dedef@i2i.jp" + ], + "message": "Mauris sit amet eros. Suspendisse accumsan tortor quis turpis. Sed ante. Vivamus tortor. Duis mattis egestas metus. Aenean fermentum. Donec ut mauris eget massa tempor convallis. Nulla neque libero, convallis eget, eleifend luctus, ultricies eu, nibh. Quisque id justo sit amet sapien dignissim vestibulum.", + "enable_custom_url": false, + "permissions": null + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/security/metadata/share", + "operationId": "shareMetadata", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 1706 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "metadata_type": null, + "metadata_identifiers": [ + "97be839e-71b6-42ad-a980-20c38b4d6db5", + "33052ef8-5296-4aa8-8c57-7499ef0cb282", + "617dcf56-5bb3-46f3-b802-fdfe2e94ff64", + "7ca13c1d-51de-477e-94c8-f9372a8e30e3", + "a7826fd7-cca0-4e75-9c55-9bfbb18b7454" + ], + "visualization_identifiers": null, + "emails": [ + "sfranzolii@microsoft.com" + ], + "message": "Quisque erat eros, viverra eget, congue eget, semper rutrum, nulla. Nunc purus.", + "enable_custom_url": true, + "permissions": [ + { + "principal": { + "identifier": "4391d676-2dd8-4248-b6db-d973811f0122", + "type": "USER" + }, + "share_mode": "NO_ACCESS" + }, + { + "principal": { + "identifier": "314ac3fe-c5e1-4898-9cf7-29d9d455f052", + "type": "USER_GROUP" + }, + "share_mode": "READ_ONLY" + } + ] + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/security/metadata/share", + "operationId": "shareMetadata", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 1707 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "metadata_type": "LIVEBOARD", + "metadata_identifiers": [ + "e82fe65a-7ac0-4282-a783-7a35c01b8dbd", + "78950be9-0717-449e-be26-64ea42617dd1", + "2ff57a24-cf90-485f-8b4b-45fc17474c6f", + "4145513c-c9bd-4e48-af44-8dc001b5f955", + "33248a57-cc70-4e39-9199-fb5092283381" + ], + "visualization_identifiers": null, + "emails": [ + "bspat5@springer.com" + ], + "message": null, + "enable_custom_url": null, + "permissions": [ + { + "principal": { + "identifier": "4391d676-2dd8-4248-b6db-d973811f0122", + "type": "USER" + }, + "share_mode": "NO_ACCESS" + } + ] + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/security/metadata/share", + "operationId": "shareMetadata", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 1708 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "metadata_type": null, + "metadata_identifiers": [ + "97be839e-71b6-42ad-a980-20c38b4d6db5", + "33052ef8-5296-4aa8-8c57-7499ef0cb282" + ], + "visualization_identifiers": null, + "emails": [ + "dcorsellesa@cpanel.net", + "idavida@wordpress.com" + ], + "message": "In tempor, turpis nec euismod scelerisque, quam turpis adipiscing lorem, vitae mattis nibh ligula nec sem. Duis aliquam convallis nunc. Proin at turpis a pede posuere nonummy. Integer non velit. Donec diam neque, vestibulum eget, vulputate ut, ultrices vel, augue.", + "enable_custom_url": false, + "permissions": [ + { + "principal": { + "identifier": "4391d676-2dd8-4248-b6db-d973811f0122", + "type": "USER" + }, + "share_mode": "READ_ONLY" + } + ] + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/security/metadata/share", + "operationId": "shareMetadata", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 1709 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "metadata_type": null, + "metadata_identifiers": [ + "e82fe65a-7ac0-4282-a783-7a35c01b8dbd", + "78950be9-0717-449e-be26-64ea42617dd1", + "2ff57a24-cf90-485f-8b4b-45fc17474c6f", + "4145513c-c9bd-4e48-af44-8dc001b5f955", + "33248a57-cc70-4e39-9199-fb5092283381" + ], + "visualization_identifiers": null, + "emails": [ + "bspat5@springer.com" + ], + "message": "Etiam justo. Etiam pretium iaculis justo. In hac habitasse platea dictumst. Etiam faucibus cursus urna. Ut tellus. Nulla ut erat id mauris vulputate elementum. Nullam varius. Nulla facilisi.", + "enable_custom_url": null, + "permissions": [ + { + "principal": { + "identifier": "4391d676-2dd8-4248-b6db-d973811f0122", + "type": "USER" + }, + "share_mode": "NO_ACCESS" + } + ] + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/security/metadata/share", + "operationId": "shareMetadata", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 1710 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "metadata_type": "LOGICAL_TABLE", + "metadata_identifiers": [ + "1ac1a13a-0eea-479c-9bd6-25f16cf3ce70", + "bfa7e411-2232-42f6-9db7-ab51e1d6e9d2", + "6246c548-985b-4dcf-9b62-196314a404b3", + "c0dbb0e0-ac2e-4cf6-8718-7c661bb033a5", + "be94b6dc-f58c-4645-858e-bbe4be53a654" + ], + "visualization_identifiers": null, + "emails": null, + "message": "Mauris sit amet eros. Suspendisse accumsan tortor quis turpis. Sed ante. Vivamus tortor. Duis mattis egestas metus. Aenean fermentum. Donec ut mauris eget massa tempor convallis. Nulla neque libero, convallis eget, eleifend luctus, ultricies eu, nibh. Quisque id justo sit amet sapien dignissim vestibulum.", + "enable_custom_url": false, + "permissions": [ + { + "principal": { + "identifier": "4391d676-2dd8-4248-b6db-d973811f0122", + "type": "USER" + }, + "share_mode": "MODIFY" + }, + { + "principal": { + "identifier": "314ac3fe-c5e1-4898-9cf7-29d9d455f052", + "type": "USER_GROUP" + }, + "share_mode": "NO_ACCESS" + } + ] + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/security/metadata/share", + "operationId": "shareMetadata", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 1711 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "metadata_type": "ANSWER", + "metadata_identifiers": null, + "visualization_identifiers": null, + "emails": [ + "kcoultous0@reference.com", + "ipaling0@techcrunch.com", + "bbroadbere0@cnet.com" + ], + "message": "In sagittis dui vel nisl. Duis ac nibh. Fusce lacus purus, aliquet at, feugiat non, pretium quis, lectus. Suspendisse potenti. In eleifend quam a odio.", + "enable_custom_url": null, + "permissions": [ + { + "principal": { + "identifier": "4391d676-2dd8-4248-b6db-d973811f0122", + "type": "USER" + }, + "share_mode": "MODIFY" + } + ] + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/security/metadata/share", + "operationId": "shareMetadata", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 1712 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "metadata_type": null, + "metadata_identifiers": [ + "97be839e-71b6-42ad-a980-20c38b4d6db5", + "33052ef8-5296-4aa8-8c57-7499ef0cb282" + ], + "visualization_identifiers": null, + "emails": [ + "kcoultous0@reference.com", + "ipaling0@techcrunch.com", + "bbroadbere0@cnet.com" + ], + "message": "In sagittis dui vel nisl. Duis ac nibh. Fusce lacus purus, aliquet at, feugiat non, pretium quis, lectus. Suspendisse potenti. In eleifend quam a odio.", + "enable_custom_url": null, + "permissions": [ + { + "principal": { + "identifier": "4391d676-2dd8-4248-b6db-d973811f0122", + "type": "USER" + }, + "share_mode": "MODIFY" + } + ] + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/security/metadata/share", + "operationId": "shareMetadata", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 1713 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "metadata_type": null, + "metadata_identifiers": [ + "97be839e-71b6-42ad-a980-20c38b4d6db5" + ], + "visualization_identifiers": null, + "emails": [ + "ajacobsson9@cnbc.com", + "amclean9@chron.com", + "tferreo9@yale.edu" + ], + "message": "Proin risus. Praesent lectus. Vestibulum quam sapien, varius ut, blandit non, interdum in, ante. Vestibulum ante ipsum primis in faucibus orci luctus et ultrices posuere cubilia Curae; Duis faucibus accumsan odio. Curabitur convallis. Duis consequat dui nec nisi volutpat eleifend. Donec ut dolor. Morbi vel lectus in quam fringilla rhoncus. Mauris enim leo, rhoncus sed, vestibulum sit amet, cursus id, turpis.", + "enable_custom_url": null, + "permissions": [ + { + "principal": { + "identifier": "4391d676-2dd8-4248-b6db-d973811f0122", + "type": "USER" + }, + "share_mode": "MODIFY" + } + ] + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/security/metadata/share", + "operationId": "shareMetadata", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 1714 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "metadata_type": "ANSWER", + "metadata_identifiers": [ + "97be839e-71b6-42ad-a980-20c38b4d6db5", + "33052ef8-5296-4aa8-8c57-7499ef0cb282", + "617dcf56-5bb3-46f3-b802-fdfe2e94ff64", + "7ca13c1d-51de-477e-94c8-f9372a8e30e3" + ], + "visualization_identifiers": null, + "emails": [ + "tmatysikj@mysql.com", + "awilsteadj@google.co.jp" + ], + "message": null, + "enable_custom_url": null, + "permissions": [ + { + "principal": { + "identifier": "4391d676-2dd8-4248-b6db-d973811f0122", + "type": "USER" + }, + "share_mode": "MODIFY" + } + ] + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/security/metadata/share", + "operationId": "shareMetadata", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 1715 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "metadata_type": "LIVEBOARD", + "metadata_identifiers": "kaezjDwWQFrIica", + "visualization_identifiers": null, + "emails": [ + "kgoshawkh@tinypic.com" + ], + "message": "Maecenas tristique, est et tempus semper, est quam pharetra magna, ac consequat metus sapien ut nunc. Vestibulum ante ipsum primis in faucibus orci luctus et ultrices posuere cubilia Curae; Mauris viverra diam vitae quam.", + "enable_custom_url": false, + "permissions": [ + { + "principal": { + "identifier": "4391d676-2dd8-4248-b6db-d973811f0122", + "type": "USER" + }, + "share_mode": "READ_ONLY" + }, + { + "principal": { + "identifier": "314ac3fe-c5e1-4898-9cf7-29d9d455f052", + "type": "USER_GROUP" + }, + "share_mode": "MODIFY" + }, + { + "principal": { + "identifier": "983ddaab-15cf-4c95-a21e-67383a67b6d1", + "type": "USER_GROUP" + }, + "share_mode": "READ_ONLY" + } + ] + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/security/metadata/share", + "operationId": "shareMetadata", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 1716 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "metadata_type": "LOGICAL_TABLE", + "metadata_identifiers": [ + "1ac1a13a-0eea-479c-9bd6-25f16cf3ce70", + "bfa7e411-2232-42f6-9db7-ab51e1d6e9d2", + "6246c548-985b-4dcf-9b62-196314a404b3", + "c0dbb0e0-ac2e-4cf6-8718-7c661bb033a5", + "be94b6dc-f58c-4645-858e-bbe4be53a654" + ], + "visualization_identifiers": null, + "emails": "eblMEyrqbpLZors", + "message": "Mauris sit amet eros. Suspendisse accumsan tortor quis turpis. Sed ante. Vivamus tortor. Duis mattis egestas metus. Aenean fermentum. Donec ut mauris eget massa tempor convallis. Nulla neque libero, convallis eget, eleifend luctus, ultricies eu, nibh. Quisque id justo sit amet sapien dignissim vestibulum.", + "enable_custom_url": false, + "permissions": [ + { + "principal": { + "identifier": "4391d676-2dd8-4248-b6db-d973811f0122", + "type": "USER" + }, + "share_mode": "MODIFY" + }, + { + "principal": { + "identifier": "314ac3fe-c5e1-4898-9cf7-29d9d455f052", + "type": "USER_GROUP" + }, + "share_mode": "NO_ACCESS" + } + ] + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/security/metadata/share", + "operationId": "shareMetadata", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 1717 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "metadata_type": "ANSWER", + "metadata_identifiers": "WChvigEOKNhdKEx", + "visualization_identifiers": null, + "emails": [ + "scoccid@phpbb.com" + ], + "message": "Nullam molestie nibh in lectus. Pellentesque at nulla. Suspendisse potenti. Cras in purus eu magna vulputate luctus. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Vivamus vestibulum sagittis sapien. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus.", + "enable_custom_url": null, + "permissions": [ + { + "principal": { + "identifier": "4391d676-2dd8-4248-b6db-d973811f0122", + "type": "USER" + }, + "share_mode": "NO_ACCESS" + }, + { + "principal": { + "identifier": "314ac3fe-c5e1-4898-9cf7-29d9d455f052", + "type": "USER_GROUP" + }, + "share_mode": "READ_ONLY" + }, + { + "principal": { + "identifier": "983ddaab-15cf-4c95-a21e-67383a67b6d1", + "type": "USER_GROUP" + }, + "share_mode": "MODIFY" + } + ] + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/security/metadata/share", + "operationId": "shareMetadata", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 1718 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "metadata_type": "ANSWER", + "metadata_identifiers": [ + "97be839e-71b6-42ad-a980-20c38b4d6db5", + "33052ef8-5296-4aa8-8c57-7499ef0cb282" + ], + "visualization_identifiers": null, + "emails": [ + "kcoultous0@reference.com", + "ipaling0@techcrunch.com", + "bbroadbere0@cnet.com" + ], + "message": "In sagittis dui vel nisl. Duis ac nibh. Fusce lacus purus, aliquet at, feugiat non, pretium quis, lectus. Suspendisse potenti. In eleifend quam a odio.", + "enable_custom_url": null, + "permissions": [ + { + "principal": { + "identifier": "4391d676-2dd8-4248-b6db-d973811f0122", + "type": "USER" + }, + "share_mode": "MODIFY" + } + ] + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/security/metadata/share", + "operationId": "shareMetadata", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 1719 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "metadata_type": "LOGICAL_TABLE", + "metadata_identifiers": [ + "1ac1a13a-0eea-479c-9bd6-25f16cf3ce70", + "bfa7e411-2232-42f6-9db7-ab51e1d6e9d2", + "6246c548-985b-4dcf-9b62-196314a404b3", + "c0dbb0e0-ac2e-4cf6-8718-7c661bb033a5" + ], + "visualization_identifiers": null, + "emails": [ + "msacks6@plala.or.jp", + "rshitliffe6@utexas.edu" + ], + "message": "Nunc nisl.", + "enable_custom_url": true, + "permissions": "LlWrJWQMGoiOzcL" + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/security/metadata/share", + "operationId": "shareMetadata", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 1720 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "metadata_type": "LOGICAL_TABLE", + "metadata_identifiers": [ + "1ac1a13a-0eea-479c-9bd6-25f16cf3ce70", + "bfa7e411-2232-42f6-9db7-ab51e1d6e9d2", + "6246c548-985b-4dcf-9b62-196314a404b3", + "c0dbb0e0-ac2e-4cf6-8718-7c661bb033a5", + "be94b6dc-f58c-4645-858e-bbe4be53a654" + ], + "visualization_identifiers": null, + "emails": [ + "ggammagef@statcounter.com", + "npringerf@pcworld.com", + "dedef@i2i.jp" + ], + "message": "Mauris sit amet eros. Suspendisse accumsan tortor quis turpis. Sed ante. Vivamus tortor. Duis mattis egestas metus. Aenean fermentum. Donec ut mauris eget massa tempor convallis. Nulla neque libero, convallis eget, eleifend luctus, ultricies eu, nibh. Quisque id justo sit amet sapien dignissim vestibulum.", + "enable_custom_url": false, + "permissions": [ + { + "principal": { + "identifier": "4391d676-2dd8-4248-b6db-d973811f0122", + "type": "USER" + }, + "share_mode": "MODIFY" + }, + { + "principal": { + "identifier": "314ac3fe-c5e1-4898-9cf7-29d9d455f052", + "type": "USER_GROUP" + }, + "share_mode": "NO_ACCESS" + } + ] + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/security/metadata/share", + "operationId": "shareMetadata", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 1721 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "metadata_type": [ + "LIVEBOARD" + ], + "metadata_identifiers": [ + "e82fe65a-7ac0-4282-a783-7a35c01b8dbd", + "78950be9-0717-449e-be26-64ea42617dd1", + "2ff57a24-cf90-485f-8b4b-45fc17474c6f", + "4145513c-c9bd-4e48-af44-8dc001b5f955", + "33248a57-cc70-4e39-9199-fb5092283381" + ], + "visualization_identifiers": null, + "emails": [ + "saggisg@vinaora.com", + "jkarelg@nifty.com", + "foverillg@bloomberg.com" + ], + "message": "Nam dui. Proin leo odio, porttitor id, consequat in, consequat ut, nulla. Sed accumsan felis. Ut at dolor quis odio consequat varius. Integer ac leo. Pellentesque ultrices mattis odio. Donec vitae nisi. Nam ultrices, libero non mattis pulvinar, nulla pede ullamcorper augue, a suscipit nulla elit ac nulla. Sed vel enim sit amet nunc viverra dapibus. Nulla suscipit ligula in lacus.", + "enable_custom_url": null, + "permissions": [ + { + "principal": { + "identifier": "4391d676-2dd8-4248-b6db-d973811f0122", + "type": "USER" + }, + "share_mode": "READ_ONLY" + }, + { + "principal": { + "identifier": "314ac3fe-c5e1-4898-9cf7-29d9d455f052", + "type": "USER_GROUP" + }, + "share_mode": "NO_ACCESS" + } + ] + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/security/metadata/share", + "operationId": "shareMetadata", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 1722 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "metadata_type": "ANSWER", + "metadata_identifiers": [ + "97be839e-71b6-42ad-a980-20c38b4d6db5" + ], + "visualization_identifiers": null, + "emails": [ + "scoccid@phpbb.com" + ], + "message": "Nullam molestie nibh in lectus. Pellentesque at nulla. Suspendisse potenti. Cras in purus eu magna vulputate luctus. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Vivamus vestibulum sagittis sapien. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus.", + "enable_custom_url": null, + "permissions": [ + { + "principal": { + "identifier": "4391d676-2dd8-4248-b6db-d973811f0122", + "type": "USER" + }, + "share_mode": "NO_ACCESS" + }, + { + "principal": { + "identifier": "314ac3fe-c5e1-4898-9cf7-29d9d455f052", + "type": "USER_GROUP" + }, + "share_mode": "READ_ONLY" + }, + { + "principal": { + "identifier": "983ddaab-15cf-4c95-a21e-67383a67b6d1", + "type": "USER_GROUP" + }, + "share_mode": "MODIFY" + } + ] + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/security/metadata/share", + "operationId": "shareMetadata", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 1723 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "metadata_type": "ANSWER", + "metadata_identifiers": [ + "97be839e-71b6-42ad-a980-20c38b4d6db5" + ], + "visualization_identifiers": null, + "emails": [ + "ajacobsson9@cnbc.com", + "amclean9@chron.com", + "tferreo9@yale.edu" + ], + "message": "Proin risus. Praesent lectus. Vestibulum quam sapien, varius ut, blandit non, interdum in, ante. Vestibulum ante ipsum primis in faucibus orci luctus et ultrices posuere cubilia Curae; Duis faucibus accumsan odio. Curabitur convallis. Duis consequat dui nec nisi volutpat eleifend. Donec ut dolor. Morbi vel lectus in quam fringilla rhoncus. Mauris enim leo, rhoncus sed, vestibulum sit amet, cursus id, turpis.", + "enable_custom_url": null, + "permissions": "KypZjjyBEWgWdXZ" + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/security/metadata/share", + "operationId": "shareMetadata", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 1724 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "metadata_type": "LOGICAL_TABLE", + "metadata_identifiers": [ + "1ac1a13a-0eea-479c-9bd6-25f16cf3ce70", + "bfa7e411-2232-42f6-9db7-ab51e1d6e9d2" + ], + "visualization_identifiers": null, + "emails": [ + "jscottini7@java.com", + "dpratley7@wikimedia.org" + ], + "message": [ + "Etiam", + "justo.", + "Etiam", + "pretium", + "iaculis", + "justo.", + "In", + "hac", + "habitasse", + "platea", + "dictumst." + ], + "enable_custom_url": true, + "permissions": [ + { + "principal": { + "identifier": "4391d676-2dd8-4248-b6db-d973811f0122", + "type": "USER" + }, + "share_mode": "READ_ONLY" + }, + { + "principal": { + "identifier": "314ac3fe-c5e1-4898-9cf7-29d9d455f052", + "type": "USER_GROUP" + }, + "share_mode": "READ_ONLY" + }, + { + "principal": { + "identifier": "983ddaab-15cf-4c95-a21e-67383a67b6d1", + "type": "USER_GROUP" + }, + "share_mode": "MODIFY" + } + ] + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/security/metadata/share", + "operationId": "shareMetadata", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 1725 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "metadata_type": [ + "LIVEBOARD" + ], + "metadata_identifiers": [ + "e82fe65a-7ac0-4282-a783-7a35c01b8dbd", + "78950be9-0717-449e-be26-64ea42617dd1", + "2ff57a24-cf90-485f-8b4b-45fc17474c6f", + "4145513c-c9bd-4e48-af44-8dc001b5f955", + "33248a57-cc70-4e39-9199-fb5092283381" + ], + "visualization_identifiers": null, + "emails": [ + "bspat5@springer.com" + ], + "message": "Etiam justo. Etiam pretium iaculis justo. In hac habitasse platea dictumst. Etiam faucibus cursus urna. Ut tellus. Nulla ut erat id mauris vulputate elementum. Nullam varius. Nulla facilisi.", + "enable_custom_url": null, + "permissions": [ + { + "principal": { + "identifier": "4391d676-2dd8-4248-b6db-d973811f0122", + "type": "USER" + }, + "share_mode": "NO_ACCESS" + } + ] + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/security/metadata/share", + "operationId": "shareMetadata", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 1726 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "metadata_type": "ANSWER", + "metadata_identifiers": [ + "97be839e-71b6-42ad-a980-20c38b4d6db5", + "33052ef8-5296-4aa8-8c57-7499ef0cb282" + ], + "visualization_identifiers": null, + "emails": "OnmLYEgxBnhGCrP", + "message": "In tempor, turpis nec euismod scelerisque, quam turpis adipiscing lorem, vitae mattis nibh ligula nec sem. Duis aliquam convallis nunc. Proin at turpis a pede posuere nonummy. Integer non velit. Donec diam neque, vestibulum eget, vulputate ut, ultrices vel, augue.", + "enable_custom_url": false, + "permissions": [ + { + "principal": { + "identifier": "4391d676-2dd8-4248-b6db-d973811f0122", + "type": "USER" + }, + "share_mode": "READ_ONLY" + } + ] + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/security/metadata/share", + "operationId": "shareMetadata", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 1727 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "metadata_type": [ + "ANSWER" + ], + "metadata_identifiers": [ + "97be839e-71b6-42ad-a980-20c38b4d6db5", + "33052ef8-5296-4aa8-8c57-7499ef0cb282", + "617dcf56-5bb3-46f3-b802-fdfe2e94ff64", + "7ca13c1d-51de-477e-94c8-f9372a8e30e3", + "a7826fd7-cca0-4e75-9c55-9bfbb18b7454" + ], + "visualization_identifiers": null, + "emails": [ + "sfranzolii@microsoft.com" + ], + "message": "Quisque erat eros, viverra eget, congue eget, semper rutrum, nulla. Nunc purus.", + "enable_custom_url": true, + "permissions": [ + { + "principal": { + "identifier": "4391d676-2dd8-4248-b6db-d973811f0122", + "type": "USER" + }, + "share_mode": "NO_ACCESS" + }, + { + "principal": { + "identifier": "314ac3fe-c5e1-4898-9cf7-29d9d455f052", + "type": "USER_GROUP" + }, + "share_mode": "READ_ONLY" + } + ] + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/security/metadata/share", + "operationId": "shareMetadata", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 1728 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "metadata_type": "ANSWER", + "metadata_identifiers": [ + "97be839e-71b6-42ad-a980-20c38b4d6db5", + "33052ef8-5296-4aa8-8c57-7499ef0cb282", + "617dcf56-5bb3-46f3-b802-fdfe2e94ff64", + "7ca13c1d-51de-477e-94c8-f9372a8e30e3", + "a7826fd7-cca0-4e75-9c55-9bfbb18b7454" + ], + "visualization_identifiers": null, + "emails": "cXnzUSkcbbPWsiA", + "message": "Pellentesque at nulla. Suspendisse potenti.", + "enable_custom_url": true, + "permissions": [ + { + "principal": { + "identifier": "4391d676-2dd8-4248-b6db-d973811f0122", + "type": "USER" + }, + "share_mode": "READ_ONLY" + } + ] + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/security/metadata/share", + "operationId": "shareMetadata", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 1729 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "metadata_type": "LIVEBOARD", + "metadata_identifiers": [ + "e82fe65a-7ac0-4282-a783-7a35c01b8dbd", + "78950be9-0717-449e-be26-64ea42617dd1", + "2ff57a24-cf90-485f-8b4b-45fc17474c6f", + "4145513c-c9bd-4e48-af44-8dc001b5f955", + "33248a57-cc70-4e39-9199-fb5092283381" + ], + "visualization_identifiers": null, + "emails": [ + "saggisg@vinaora.com", + "jkarelg@nifty.com", + "foverillg@bloomberg.com" + ], + "message": "Nam dui. Proin leo odio, porttitor id, consequat in, consequat ut, nulla. Sed accumsan felis. Ut at dolor quis odio consequat varius. Integer ac leo. Pellentesque ultrices mattis odio. Donec vitae nisi. Nam ultrices, libero non mattis pulvinar, nulla pede ullamcorper augue, a suscipit nulla elit ac nulla. Sed vel enim sit amet nunc viverra dapibus. Nulla suscipit ligula in lacus.", + "enable_custom_url": null, + "permissions": [ + { + "principal": { + "identifier": "4391d676-2dd8-4248-b6db-d973811f0122", + "type": "USER" + }, + "share_mode": "READ_ONLY" + }, + { + "principal": { + "identifier": "314ac3fe-c5e1-4898-9cf7-29d9d455f052", + "type": "USER_GROUP" + }, + "share_mode": "NO_ACCESS" + } + ] + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/security/metadata/share", + "operationId": "shareMetadata", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 1730 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "metadata_type": "ANSWER", + "metadata_identifiers": [ + "mQObbyBAZAyCeyo" + ], + "visualization_identifiers": null, + "emails": [ + "ajacobsson9@cnbc.com", + "amclean9@chron.com", + "tferreo9@yale.edu" + ], + "message": "Proin risus. Praesent lectus. Vestibulum quam sapien, varius ut, blandit non, interdum in, ante. Vestibulum ante ipsum primis in faucibus orci luctus et ultrices posuere cubilia Curae; Duis faucibus accumsan odio. Curabitur convallis. Duis consequat dui nec nisi volutpat eleifend. Donec ut dolor. Morbi vel lectus in quam fringilla rhoncus. Mauris enim leo, rhoncus sed, vestibulum sit amet, cursus id, turpis.", + "enable_custom_url": null, + "permissions": [ + { + "principal": { + "identifier": "4391d676-2dd8-4248-b6db-d973811f0122", + "type": "USER" + }, + "share_mode": "MODIFY" + } + ] + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/security/metadata/share", + "operationId": "shareMetadata", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 1731 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "metadata_type": "ANSWER", + "metadata_identifiers": [ + "jkSqpwBncBZasBE", + "NtFdDLmekBlaEYh", + "LUWowhmoKhlAhLI", + "eTQonHDgfUvkUBL", + "IUaRgizWTLUohhd" + ], + "visualization_identifiers": null, + "emails": [ + "ezorzini2@storify.com", + "fingham2@theatlantic.com" + ], + "message": "Pellentesque at nulla. Suspendisse potenti.", + "enable_custom_url": true, + "permissions": [ + { + "principal": { + "identifier": "4391d676-2dd8-4248-b6db-d973811f0122", + "type": "USER" + }, + "share_mode": "READ_ONLY" + } + ] + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/security/metadata/share", + "operationId": "shareMetadata", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 1732 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "metadata_type": "ANSWER", + "metadata_identifiers": [ + "BkgjAcCEuuihgvW", + "lNSHxauhaWHozxT" + ], + "visualization_identifiers": null, + "emails": [ + "kcoultous0@reference.com", + "ipaling0@techcrunch.com", + "bbroadbere0@cnet.com" + ], + "message": "In sagittis dui vel nisl. Duis ac nibh. Fusce lacus purus, aliquet at, feugiat non, pretium quis, lectus. Suspendisse potenti. In eleifend quam a odio.", + "enable_custom_url": null, + "permissions": [ + { + "principal": { + "identifier": "4391d676-2dd8-4248-b6db-d973811f0122", + "type": "USER" + }, + "share_mode": "MODIFY" + } + ] + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/security/metadata/share", + "operationId": "shareMetadata", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 1733 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "metadata_type": "LOGICAL_TABLE", + "metadata_identifiers": [ + "kpuFwmPxAfVmrff", + "SjgkrWdkneoZqUR", + "vGEMtLbnkDhXIWj" + ], + "visualization_identifiers": null, + "emails": [ + "kfarrentc@prweb.com" + ], + "message": "Nunc nisl.", + "enable_custom_url": true, + "permissions": [ + { + "principal": { + "identifier": "4391d676-2dd8-4248-b6db-d973811f0122", + "type": "USER" + }, + "share_mode": "MODIFY" + }, + { + "principal": { + "identifier": "314ac3fe-c5e1-4898-9cf7-29d9d455f052", + "type": "USER_GROUP" + }, + "share_mode": "MODIFY" + } + ] + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/security/metadata/share", + "operationId": "shareMetadata", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 1734 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "metadata_type": "ANSWER", + "metadata_identifiers": [ + "QihkLVlyggKpTnH", + "HCHBlbBijXebJYY" + ], + "visualization_identifiers": null, + "emails": [ + "kcoultous0@reference.com", + "ipaling0@techcrunch.com", + "bbroadbere0@cnet.com" + ], + "message": "In sagittis dui vel nisl. Duis ac nibh. Fusce lacus purus, aliquet at, feugiat non, pretium quis, lectus. Suspendisse potenti. In eleifend quam a odio.", + "enable_custom_url": null, + "permissions": [ + { + "principal": { + "identifier": "4391d676-2dd8-4248-b6db-d973811f0122", + "type": "USER" + }, + "share_mode": "MODIFY" + } + ] + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/security/metadata/share", + "operationId": "shareMetadata", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 1735 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "metadata_type": "LIVEBOARD", + "metadata_identifiers": [ + "RJKfubDcZmMWemU", + "tPwRJtILyGcjFPG", + "iASOgFBBmThpqEm", + "QdunBkANCayWedt" + ], + "visualization_identifiers": null, + "emails": [ + "kgoshawkh@tinypic.com" + ], + "message": "Maecenas tristique, est et tempus semper, est quam pharetra magna, ac consequat metus sapien ut nunc. Vestibulum ante ipsum primis in faucibus orci luctus et ultrices posuere cubilia Curae; Mauris viverra diam vitae quam.", + "enable_custom_url": false, + "permissions": [ + { + "principal": { + "identifier": "4391d676-2dd8-4248-b6db-d973811f0122", + "type": "USER" + }, + "share_mode": "READ_ONLY" + }, + { + "principal": { + "identifier": "314ac3fe-c5e1-4898-9cf7-29d9d455f052", + "type": "USER_GROUP" + }, + "share_mode": "MODIFY" + }, + { + "principal": { + "identifier": "983ddaab-15cf-4c95-a21e-67383a67b6d1", + "type": "USER_GROUP" + }, + "share_mode": "READ_ONLY" + } + ] + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/security/metadata/share", + "operationId": "shareMetadata", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 1736 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "metadata_type": "LOGICAL_TABLE", + "metadata_identifiers": [ + "oNPCVKqNPUjtrqw", + "lZpSzQAHXNRYmAf", + "hQhHrpeFKEOyfSp" + ], + "visualization_identifiers": null, + "emails": [ + "kfarrentc@prweb.com" + ], + "message": "Nunc nisl.", + "enable_custom_url": true, + "permissions": [ + { + "principal": { + "identifier": "4391d676-2dd8-4248-b6db-d973811f0122", + "type": "USER" + }, + "share_mode": "MODIFY" + }, + { + "principal": { + "identifier": "314ac3fe-c5e1-4898-9cf7-29d9d455f052", + "type": "USER_GROUP" + }, + "share_mode": "MODIFY" + } + ] + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/security/metadata/share", + "operationId": "shareMetadata", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 1737 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "metadata_type": "LOGICAL_TABLE", + "metadata_identifiers": [ + "StHckSrhVYjhlab", + "ORWuysRwtwCIkDr", + "gOZlApoAOhKvxjv", + "RHLLfvGKfQqzBoc" + ], + "visualization_identifiers": null, + "emails": [ + "msacks6@plala.or.jp", + "rshitliffe6@utexas.edu" + ], + "message": "Nunc nisl.", + "enable_custom_url": true, + "permissions": [ + { + "principal": { + "identifier": "4391d676-2dd8-4248-b6db-d973811f0122", + "type": "USER" + }, + "share_mode": "MODIFY" + }, + { + "principal": { + "identifier": "314ac3fe-c5e1-4898-9cf7-29d9d455f052", + "type": "USER_GROUP" + }, + "share_mode": "NO_ACCESS" + }, + { + "principal": { + "identifier": "983ddaab-15cf-4c95-a21e-67383a67b6d1", + "type": "USER_GROUP" + }, + "share_mode": "READ_ONLY" + } + ] + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/security/metadata/share", + "operationId": "shareMetadata", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 1738 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "metadata_type": "ANSWER", + "metadata_identifiers": [ + "DYGQHvCeGDdYxrC", + "TiWstoieOoIujaH", + "wonjNOoLPTXrpwc" + ], + "visualization_identifiers": null, + "emails": [ + "dsnadene@twitter.com", + "emccraye@statcounter.com", + "rcannye@howstuffworks.com" + ], + "message": "Nulla mollis molestie lorem. Quisque ut erat. Curabitur gravida nisi at nibh. In hac habitasse platea dictumst. Aliquam augue quam, sollicitudin vitae, consectetuer eget, rutrum at, lorem. Integer tincidunt ante vel ipsum. Praesent blandit lacinia erat. Vestibulum sed magna at nunc commodo placerat.", + "enable_custom_url": false, + "permissions": [ + { + "principal": { + "identifier": "4391d676-2dd8-4248-b6db-d973811f0122", + "type": "USER" + }, + "share_mode": "MODIFY" + }, + { + "principal": { + "identifier": "314ac3fe-c5e1-4898-9cf7-29d9d455f052", + "type": "USER_GROUP" + }, + "share_mode": "READ_ONLY" + } + ] + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/security/metadata/share", + "operationId": "shareMetadata", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 1739 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "metadata_type": "LOGICAL_TABLE", + "metadata_identifiers": [ + "bPiibkaqFuRrNNR", + "TXDsPutqoxGMiWs" + ], + "visualization_identifiers": null, + "emails": [ + "jscottini7@java.com", + "dpratley7@wikimedia.org" + ], + "message": "Etiam justo. Etiam pretium iaculis justo. In hac habitasse platea dictumst.", + "enable_custom_url": true, + "permissions": [ + { + "principal": { + "identifier": "4391d676-2dd8-4248-b6db-d973811f0122", + "type": "USER" + }, + "share_mode": "READ_ONLY" + }, + { + "principal": { + "identifier": "314ac3fe-c5e1-4898-9cf7-29d9d455f052", + "type": "USER_GROUP" + }, + "share_mode": "READ_ONLY" + }, + { + "principal": { + "identifier": "983ddaab-15cf-4c95-a21e-67383a67b6d1", + "type": "USER_GROUP" + }, + "share_mode": "MODIFY" + } + ] + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/security/metadata/share", + "operationId": "shareMetadata", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 1740 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "metadata_type": "ANSWER", + "metadata_identifiers": [ + "NxvAbBHwwfmxoRg", + "NrZNQpLDxcLeqjN", + "uLjwwjrlacYvaCa", + "geiiXsuTwAiAUZX" + ], + "visualization_identifiers": null, + "emails": [ + "tmatysikj@mysql.com", + "awilsteadj@google.co.jp" + ], + "message": "In quis justo. Maecenas rhoncus aliquam lacus. Morbi quis tortor id nulla ultrices aliquet. Maecenas leo odio, condimentum id, luctus nec, molestie sed, justo. Pellentesque viverra pede ac diam. Cras pellentesque volutpat dui. Maecenas tristique, est et tempus semper, est quam pharetra magna, ac consequat metus sapien ut nunc. Vestibulum ante ipsum primis in faucibus orci luctus et ultrices posuere cubilia Curae; Mauris viverra diam vitae quam. Suspendisse potenti.", + "enable_custom_url": null, + "permissions": [ + { + "principal": { + "identifier": "4391d676-2dd8-4248-b6db-d973811f0122", + "type": "USER" + }, + "share_mode": "MODIFY" + } + ] + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/security/metadata/share", + "operationId": "shareMetadata", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 1741 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "metadata_type": "ANSWER", + "metadata_identifiers": [ + "JmEBFXumWEXkpgM", + "lrCllVqCHfMavKV" + ], + "visualization_identifiers": null, + "emails": [ + "kcoultous0@reference.com", + "ipaling0@techcrunch.com", + "bbroadbere0@cnet.com" + ], + "message": "In sagittis dui vel nisl. Duis ac nibh. Fusce lacus purus, aliquet at, feugiat non, pretium quis, lectus. Suspendisse potenti. In eleifend quam a odio.", + "enable_custom_url": null, + "permissions": [ + { + "principal": { + "identifier": "4391d676-2dd8-4248-b6db-d973811f0122", + "type": "USER" + }, + "share_mode": "MODIFY" + } + ] + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/security/metadata/share", + "operationId": "shareMetadata", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 1742 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "metadata_type": "ANSWER", + "metadata_identifiers": [ + "dwyLXdjUPcSBHmH", + "nXFMFntdYrcxTBK" + ], + "visualization_identifiers": null, + "emails": [ + "dcorsellesa@cpanel.net", + "idavida@wordpress.com" + ], + "message": "In tempor, turpis nec euismod scelerisque, quam turpis adipiscing lorem, vitae mattis nibh ligula nec sem. Duis aliquam convallis nunc. Proin at turpis a pede posuere nonummy. Integer non velit. Donec diam neque, vestibulum eget, vulputate ut, ultrices vel, augue.", + "enable_custom_url": false, + "permissions": [ + { + "principal": { + "identifier": "4391d676-2dd8-4248-b6db-d973811f0122", + "type": "USER" + }, + "share_mode": "READ_ONLY" + } + ] + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/security/metadata/share", + "operationId": "shareMetadata", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 1743 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "metadata_type": "LOGICAL_TABLE", + "metadata_identifiers": [ + "wYNLNidatDDzHod", + "mhKAakDjvYgtVqG", + "IxplUwebeolKgyO" + ], + "visualization_identifiers": null, + "emails": [ + "kfarrentc@prweb.com" + ], + "message": "Nunc nisl.", + "enable_custom_url": true, + "permissions": [ + { + "principal": { + "identifier": "4391d676-2dd8-4248-b6db-d973811f0122", + "type": "USER" + }, + "share_mode": "MODIFY" + }, + { + "principal": { + "identifier": "314ac3fe-c5e1-4898-9cf7-29d9d455f052", + "type": "USER_GROUP" + }, + "share_mode": "MODIFY" + } + ] + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/security/metadata/share", + "operationId": "shareMetadata", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 1744 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "metadata_type": "LOGICAL_TABLE", + "metadata_identifiers": [ + "YgkfljREwGUPlop", + "mwOgiFbRvpMOeLo" + ], + "visualization_identifiers": null, + "emails": [ + "jscottini7@java.com", + "dpratley7@wikimedia.org" + ], + "message": "Etiam justo. Etiam pretium iaculis justo. In hac habitasse platea dictumst.", + "enable_custom_url": true, + "permissions": [ + { + "principal": { + "identifier": "4391d676-2dd8-4248-b6db-d973811f0122", + "type": "USER" + }, + "share_mode": "READ_ONLY" + }, + { + "principal": { + "identifier": "314ac3fe-c5e1-4898-9cf7-29d9d455f052", + "type": "USER_GROUP" + }, + "share_mode": "READ_ONLY" + }, + { + "principal": { + "identifier": "983ddaab-15cf-4c95-a21e-67383a67b6d1", + "type": "USER_GROUP" + }, + "share_mode": "MODIFY" + } + ] + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/metadata/liveboard/data", + "operationId": "fetchLiveboardData", + "scenario": "positive", + "type": "AUTOMATIC", + "testId": 1745 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "metadata_identifier": "2ff57a24-cf90-485f-8b4b-45fc17474c6f", + "visualization_identifiers": null, + "transient_content": "Synchronised", + "data_format": "COMPACT", + "record_size": 1 + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/metadata/liveboard/data", + "operationId": "fetchLiveboardData", + "scenario": "positive", + "type": "AUTOMATIC", + "testId": 1746 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "metadata_identifier": "33248a57-cc70-4e39-9199-fb5092283381", + "data_format": "COMPACT", + "record_offset": 2, + "record_size": 2, + "runtime_sort": null + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/metadata/liveboard/data", + "operationId": "fetchLiveboardData", + "scenario": "positive", + "type": "AUTOMATIC", + "testId": 1747 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "metadata_identifier": "6715f768-8930-4180-9a3d-1efdbfaa8e7f", + "transient_content": "interface", + "data_format": "COMPACT", + "record_offset": 3, + "runtime_filter": null + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/metadata/liveboard/data", + "operationId": "fetchLiveboardData", + "scenario": "positive", + "type": "AUTOMATIC", + "testId": 1748 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "metadata_identifier": "b2d68a4f-cf67-4723-966f-8a592fdbf8b9", + "transient_content": "context-sensitive", + "data_format": "COMPACT", + "record_offset": 4, + "runtime_filter": null + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/metadata/liveboard/data", + "operationId": "fetchLiveboardData", + "scenario": "positive", + "type": "AUTOMATIC", + "testId": 1749 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "metadata_identifier": "262abdac-b00f-4f5f-ad33-fcf10154184f", + "transient_content": "web-enabled", + "data_format": "COMPACT", + "record_offset": 5 + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/metadata/liveboard/data", + "operationId": "fetchLiveboardData", + "scenario": "positive", + "type": "AUTOMATIC", + "testId": 1750 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "metadata_identifier": "327f4d60-c502-43b0-b1d4-c73df5031a2e", + "visualization_identifiers": null, + "transient_content": "definition", + "data_format": "COMPACT", + "record_offset": 6, + "runtime_sort": null + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/metadata/liveboard/data", + "operationId": "fetchLiveboardData", + "scenario": "positive", + "type": "AUTOMATIC", + "testId": 1751 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "metadata_identifier": "601be8e5-140e-477c-8812-843795306438", + "transient_content": "Visionary", + "data_format": "COMPACT", + "record_offset": 7, + "runtime_filter": null + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/metadata/liveboard/data", + "operationId": "fetchLiveboardData", + "scenario": "positive", + "type": "AUTOMATIC", + "testId": 1752 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "metadata_identifier": "061457a2-27bc-43a9-9754-0cd873691bf0", + "transient_content": "neutral", + "data_format": "COMPACT", + "record_offset": 8, + "record_size": 8, + "runtime_filter": null, + "runtime_sort": null + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/metadata/liveboard/data", + "operationId": "fetchLiveboardData", + "scenario": "positive", + "type": "AUTOMATIC", + "testId": 1753 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "metadata_identifier": "e36ee65e-64be-436b-a29a-22d8998c4fae", + "visualization_identifiers": null, + "transient_content": "process improvement", + "record_offset": 9, + "record_size": 9 + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/metadata/liveboard/data", + "operationId": "fetchLiveboardData", + "scenario": "positive", + "type": "AUTOMATIC", + "testId": 1754 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "metadata_identifier": "c836ad16-660d-4d28-a3a0-e07cb9eb6ab1", + "transient_content": "adapter", + "record_offset": 10, + "runtime_filter": null + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/metadata/liveboard/data", + "operationId": "fetchLiveboardData", + "scenario": "positive", + "type": "AUTOMATIC", + "testId": 1755 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "metadata_identifier": "2ff57a24-cf90-485f-8b4b-45fc17474c6f", + "transient_content": "zero administration", + "data_format": "COMPACT", + "record_size": 11 + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/metadata/liveboard/data", + "operationId": "fetchLiveboardData", + "scenario": "positive", + "type": "AUTOMATIC", + "testId": 1756 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "metadata_identifier": "33248a57-cc70-4e39-9199-fb5092283381", + "data_format": "COMPACT", + "record_offset": 12, + "record_size": 12, + "runtime_sort": null + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/metadata/liveboard/data", + "operationId": "fetchLiveboardData", + "scenario": "positive", + "type": "AUTOMATIC", + "testId": 1757 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "metadata_identifier": "6715f768-8930-4180-9a3d-1efdbfaa8e7f", + "transient_content": "Reduced", + "data_format": "COMPACT", + "record_offset": 13, + "record_size": 13, + "runtime_filter": null, + "runtime_sort": null + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/metadata/liveboard/data", + "operationId": "fetchLiveboardData", + "scenario": "positive", + "type": "AUTOMATIC", + "testId": 1758 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "metadata_identifier": "b2d68a4f-cf67-4723-966f-8a592fdbf8b9", + "data_format": "COMPACT", + "record_size": 14, + "runtime_filter": null, + "runtime_sort": null + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/metadata/liveboard/data", + "operationId": "fetchLiveboardData", + "scenario": "positive", + "type": "AUTOMATIC", + "testId": 1759 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "metadata_identifier": "262abdac-b00f-4f5f-ad33-fcf10154184f", + "transient_content": "migration", + "data_format": "COMPACT", + "record_offset": 15, + "record_size": 15, + "runtime_sort": null + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/metadata/liveboard/data", + "operationId": "fetchLiveboardData", + "scenario": "positive", + "type": "AUTOMATIC", + "testId": 1760 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "metadata_identifier": "327f4d60-c502-43b0-b1d4-c73df5031a2e", + "record_offset": 16, + "record_size": 16 + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/metadata/liveboard/data", + "operationId": "fetchLiveboardData", + "scenario": "positive", + "type": "AUTOMATIC", + "testId": 1761 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "metadata_identifier": "601be8e5-140e-477c-8812-843795306438", + "transient_content": "Cross-platform", + "data_format": "COMPACT", + "runtime_filter": null, + "runtime_sort": null + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/metadata/liveboard/data", + "operationId": "fetchLiveboardData", + "scenario": "positive", + "type": "AUTOMATIC", + "testId": 1762 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "metadata_identifier": "061457a2-27bc-43a9-9754-0cd873691bf0", + "data_format": "COMPACT", + "record_offset": 18, + "runtime_filter": null, + "runtime_sort": null + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/metadata/liveboard/data", + "operationId": "fetchLiveboardData", + "scenario": "positive", + "type": "AUTOMATIC", + "testId": 1763 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "metadata_identifier": "e36ee65e-64be-436b-a29a-22d8998c4fae", + "record_offset": 19, + "record_size": 19 + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/metadata/liveboard/data", + "operationId": "fetchLiveboardData", + "scenario": "positive", + "type": "AUTOMATIC", + "testId": 1764 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "metadata_identifier": "c836ad16-660d-4d28-a3a0-e07cb9eb6ab1", + "record_offset": 20, + "record_size": 20, + "runtime_filter": null + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/metadata/liveboard/data", + "operationId": "fetchLiveboardData", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 1765 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "metadata_identifier": null, + "visualization_identifiers": null, + "transient_content": "definition", + "data_format": "COMPACT", + "record_offset": 6, + "runtime_sort": null + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/metadata/liveboard/data", + "operationId": "fetchLiveboardData", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 1766 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "metadata_identifier": null, + "record_offset": 19, + "record_size": 19 + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/metadata/liveboard/data", + "operationId": "fetchLiveboardData", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 1767 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "metadata_identifier": null, + "visualization_identifiers": null, + "transient_content": "definition", + "data_format": "COMPACT", + "record_offset": 6, + "runtime_sort": null + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/metadata/liveboard/data", + "operationId": "fetchLiveboardData", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 1768 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "metadata_identifier": null, + "data_format": "COMPACT", + "record_offset": 18, + "runtime_filter": null, + "runtime_sort": null + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/metadata/liveboard/data", + "operationId": "fetchLiveboardData", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 1769 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "metadata_identifier": null, + "transient_content": "context-sensitive", + "data_format": "COMPACT", + "record_offset": 4, + "runtime_filter": null + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/metadata/liveboard/data", + "operationId": "fetchLiveboardData", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 1770 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "metadata_identifier": null, + "transient_content": "Visionary", + "data_format": "COMPACT", + "record_offset": 7, + "runtime_filter": null + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/metadata/liveboard/data", + "operationId": "fetchLiveboardData", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 1771 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "metadata_identifier": null, + "data_format": "COMPACT", + "record_offset": 2, + "record_size": 2, + "runtime_sort": null + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/metadata/liveboard/data", + "operationId": "fetchLiveboardData", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 1772 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "metadata_identifier": null, + "record_offset": 20, + "record_size": 20, + "runtime_filter": null + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/metadata/liveboard/data", + "operationId": "fetchLiveboardData", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 1773 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "metadata_identifier": null, + "record_offset": 16, + "record_size": 16 + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/metadata/liveboard/data", + "operationId": "fetchLiveboardData", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 1774 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "metadata_identifier": null, + "transient_content": "Reduced", + "data_format": "COMPACT", + "record_offset": 13, + "record_size": 13, + "runtime_filter": null, + "runtime_sort": null + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/metadata/liveboard/data", + "operationId": "fetchLiveboardData", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 1775 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "metadata_identifier": null, + "visualization_identifiers": null, + "transient_content": "process improvement", + "record_offset": 9, + "record_size": 9 + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/metadata/liveboard/data", + "operationId": "fetchLiveboardData", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 1776 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "metadata_identifier": null, + "data_format": "COMPACT", + "record_size": 14, + "runtime_filter": null, + "runtime_sort": null + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/metadata/liveboard/data", + "operationId": "fetchLiveboardData", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 1777 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "metadata_identifier": null, + "visualization_identifiers": null, + "transient_content": "definition", + "data_format": "COMPACT", + "record_offset": 6, + "runtime_sort": null + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/metadata/liveboard/data", + "operationId": "fetchLiveboardData", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 1778 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "metadata_identifier": null, + "visualization_identifiers": null, + "transient_content": "process improvement", + "record_offset": 9, + "record_size": 9 + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/metadata/liveboard/data", + "operationId": "fetchLiveboardData", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 1779 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "metadata_identifier": null, + "data_format": "COMPACT", + "record_offset": 12, + "record_size": 12, + "runtime_sort": null + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/metadata/liveboard/data", + "operationId": "fetchLiveboardData", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 1780 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "metadata_identifier": "061457a2-27bc-43a9-9754-0cd873691bf0", + "transient_content": "neutral", + "data_format": "COMPACT", + "record_offset": 8, + "record_size": 8, + "runtime_filter": null, + "runtime_sort": null + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/metadata/liveboard/data", + "operationId": "fetchLiveboardData", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 1781 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "metadata_identifier": "061457a2-27bc-43a9-9754-0cd873691bf0", + "transient_content": "neutral", + "data_format": "COMPACT", + "record_offset": 8, + "record_size": 8, + "runtime_filter": null, + "runtime_sort": null + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/metadata/liveboard/data", + "operationId": "fetchLiveboardData", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 1782 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "metadata_identifier": "6715f768-8930-4180-9a3d-1efdbfaa8e7f", + "transient_content": "Reduced", + "data_format": [ + "COMPACT" + ], + "record_offset": 13, + "record_size": 13, + "runtime_filter": null, + "runtime_sort": null + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/metadata/liveboard/data", + "operationId": "fetchLiveboardData", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 1783 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "metadata_identifier": "601be8e5-140e-477c-8812-843795306438", + "transient_content": "Cross-platform", + "data_format": [ + "COMPACT" + ], + "runtime_filter": null, + "runtime_sort": null + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/metadata/liveboard/data", + "operationId": "fetchLiveboardData", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 1784 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "metadata_identifier": [ + "6715f768-8930-4180-9a3d-1efdbfaa8e7f" + ], + "transient_content": "interface", + "data_format": "COMPACT", + "record_offset": 3, + "runtime_filter": null + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/metadata/liveboard/data", + "operationId": "fetchLiveboardData", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 1785 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "metadata_identifier": "061457a2-27bc-43a9-9754-0cd873691bf0", + "transient_content": "neutral", + "data_format": "COMPACT", + "record_offset": 8, + "record_size": 8, + "runtime_filter": null, + "runtime_sort": null + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/metadata/liveboard/data", + "operationId": "fetchLiveboardData", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 1786 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "metadata_identifier": [ + "262abdac-b00f-4f5f-ad33-fcf10154184f" + ], + "transient_content": "web-enabled", + "data_format": "COMPACT", + "record_offset": 5 + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/metadata/liveboard/data", + "operationId": "fetchLiveboardData", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 1787 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "metadata_identifier": "601be8e5-140e-477c-8812-843795306438", + "transient_content": "Visionary", + "data_format": "COMPACT", + "record_offset": 7, + "runtime_filter": null + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/metadata/liveboard/data", + "operationId": "fetchLiveboardData", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 1788 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "metadata_identifier": "601be8e5-140e-477c-8812-843795306438", + "transient_content": "Visionary", + "data_format": "COMPACT", + "record_offset": 7, + "runtime_filter": null + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/metadata/liveboard/data", + "operationId": "fetchLiveboardData", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 1789 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "metadata_identifier": [ + "061457a2-27bc-43a9-9754-0cd873691bf0" + ], + "data_format": "COMPACT", + "record_offset": 18, + "runtime_filter": null, + "runtime_sort": null + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/metadata/liveboard/data", + "operationId": "fetchLiveboardData", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 1790 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "metadata_identifier": "061457a2-27bc-43a9-9754-0cd873691bf0", + "data_format": "COMPACT", + "record_offset": 18, + "runtime_filter": null, + "runtime_sort": null + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/metadata/liveboard/data", + "operationId": "fetchLiveboardData", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 1791 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "metadata_identifier": "2ff57a24-cf90-485f-8b4b-45fc17474c6f", + "visualization_identifiers": null, + "transient_content": "Synchronised", + "data_format": "COMPACT", + "record_size": 1 + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/metadata/liveboard/data", + "operationId": "fetchLiveboardData", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 1792 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "metadata_identifier": "6715f768-8930-4180-9a3d-1efdbfaa8e7f", + "transient_content": "Reduced", + "data_format": "COMPACT", + "record_offset": 13, + "record_size": 13, + "runtime_filter": null, + "runtime_sort": null + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/metadata/liveboard/data", + "operationId": "fetchLiveboardData", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 1793 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "metadata_identifier": "6715f768-8930-4180-9a3d-1efdbfaa8e7f", + "transient_content": "interface", + "data_format": [ + "COMPACT" + ], + "record_offset": 3, + "runtime_filter": null + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/metadata/liveboard/data", + "operationId": "fetchLiveboardData", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 1794 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "metadata_identifier": "b2d68a4f-cf67-4723-966f-8a592fdbf8b9", + "data_format": "COMPACT", + "record_size": 14, + "runtime_filter": null, + "runtime_sort": null + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/metadata/liveboard/data", + "operationId": "fetchLiveboardData", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 1795 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "metadata_identifier": "BykRPhBPPfQoDIP", + "transient_content": "interface", + "data_format": "COMPACT", + "record_offset": 3, + "runtime_filter": null + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/metadata/liveboard/data", + "operationId": "fetchLiveboardData", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 1796 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "metadata_identifier": "dtzNcxViRSWeDJw", + "transient_content": "migration", + "data_format": "COMPACT", + "record_offset": 15, + "record_size": 15, + "runtime_sort": null + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/metadata/liveboard/data", + "operationId": "fetchLiveboardData", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 1797 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "metadata_identifier": "QjxdsjTAfiKwykw", + "data_format": "COMPACT", + "record_size": 14, + "runtime_filter": null, + "runtime_sort": null + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/metadata/liveboard/data", + "operationId": "fetchLiveboardData", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 1798 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "metadata_identifier": "CPyXuZNBvWSSyIy", + "visualization_identifiers": null, + "transient_content": "definition", + "data_format": "COMPACT", + "record_offset": 6, + "runtime_sort": null + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/metadata/liveboard/data", + "operationId": "fetchLiveboardData", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 1799 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "metadata_identifier": "wNFfzcxbNIlZxRc", + "record_offset": 20, + "record_size": 20, + "runtime_filter": null + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/metadata/liveboard/data", + "operationId": "fetchLiveboardData", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 1800 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "metadata_identifier": "AcqIikLwYxgprnd", + "transient_content": "web-enabled", + "data_format": "COMPACT", + "record_offset": 5 + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/metadata/liveboard/data", + "operationId": "fetchLiveboardData", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 1801 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "metadata_identifier": "UPCxVhHXvhocIbr", + "data_format": "COMPACT", + "record_offset": 2, + "record_size": 2, + "runtime_sort": null + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/metadata/liveboard/data", + "operationId": "fetchLiveboardData", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 1802 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "metadata_identifier": "qlFzbdCUdYrTAKa", + "data_format": "COMPACT", + "record_offset": 12, + "record_size": 12, + "runtime_sort": null + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/metadata/liveboard/data", + "operationId": "fetchLiveboardData", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 1803 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "metadata_identifier": "HYSfWWKLlYrZipV", + "transient_content": "migration", + "data_format": "COMPACT", + "record_offset": 15, + "record_size": 15, + "runtime_sort": null + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/metadata/liveboard/data", + "operationId": "fetchLiveboardData", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 1804 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "metadata_identifier": "oKEKHNWOgIjjZMX", + "visualization_identifiers": null, + "transient_content": "process improvement", + "record_offset": 9, + "record_size": 9 + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/metadata/liveboard/data", + "operationId": "fetchLiveboardData", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 1805 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "metadata_identifier": "DvdnOVvkcNeVSjr", + "record_offset": 20, + "record_size": 20, + "runtime_filter": null + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/metadata/liveboard/data", + "operationId": "fetchLiveboardData", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 1806 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "metadata_identifier": "jLSeFkzLiiVeEMH", + "transient_content": "migration", + "data_format": "COMPACT", + "record_offset": 15, + "record_size": 15, + "runtime_sort": null + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/metadata/liveboard/data", + "operationId": "fetchLiveboardData", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 1807 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "metadata_identifier": "KlDxQQFFhKUvxiO", + "record_offset": 16, + "record_size": 16 + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/metadata/liveboard/data", + "operationId": "fetchLiveboardData", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 1808 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "metadata_identifier": "wuKwNHxuelHzYnU", + "data_format": "COMPACT", + "record_offset": 18, + "runtime_filter": null, + "runtime_sort": null + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/metadata/liveboard/data", + "operationId": "fetchLiveboardData", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 1809 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "metadata_identifier": "JIJZwoRnhINkWsE", + "data_format": "COMPACT", + "record_offset": 18, + "runtime_filter": null, + "runtime_sort": null + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/metadata/answer/data", + "operationId": "fetchAnswerData", + "scenario": "positive", + "type": "AUTOMATIC", + "testId": 1810 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "metadata_identifier": "7ca13c1d-51de-477e-94c8-f9372a8e30e3", + "data_format": "COMPACT", + "record_offset": 1, + "runtime_sort": null + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/metadata/answer/data", + "operationId": "fetchAnswerData", + "scenario": "positive", + "type": "AUTOMATIC", + "testId": 1811 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "metadata_identifier": "a7826fd7-cca0-4e75-9c55-9bfbb18b7454", + "data_format": "COMPACT", + "record_size": 2, + "runtime_sort": null + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/metadata/answer/data", + "operationId": "fetchAnswerData", + "scenario": "positive", + "type": "AUTOMATIC", + "testId": 1812 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "metadata_identifier": "e4cd9bf1-4f77-4762-9035-543b3a00c294", + "record_offset": 3, + "runtime_sort": null + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/metadata/answer/data", + "operationId": "fetchAnswerData", + "scenario": "positive", + "type": "AUTOMATIC", + "testId": 1813 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "metadata_identifier": "21f35c49-c1f8-4f3d-a124-a0fbe5c978aa", + "record_offset": 4, + "runtime_sort": null + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/metadata/answer/data", + "operationId": "fetchAnswerData", + "scenario": "positive", + "type": "AUTOMATIC", + "testId": 1814 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "metadata_identifier": "73df2632-37ec-4e64-9f9c-c53e5efe2432", + "record_offset": 5, + "runtime_filter": null + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/metadata/answer/data", + "operationId": "fetchAnswerData", + "scenario": "positive", + "type": "AUTOMATIC", + "testId": 1815 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "metadata_identifier": "1be3019c-aa6e-47cf-a79e-3b7de02f25b4", + "data_format": "COMPACT", + "runtime_filter": null, + "runtime_sort": null + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/metadata/answer/data", + "operationId": "fetchAnswerData", + "scenario": "positive", + "type": "AUTOMATIC", + "testId": 1816 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "metadata_identifier": "47294d3a-5dc4-44d3-bee5-7a586c606ed8", + "data_format": "COMPACT", + "runtime_filter": null + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/metadata/answer/data", + "operationId": "fetchAnswerData", + "scenario": "positive", + "type": "AUTOMATIC", + "testId": 1817 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "metadata_identifier": "48d27aee-59c3-4a0c-8d2c-5a8989c55bb1", + "data_format": "COMPACT", + "runtime_filter": null + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/metadata/answer/data", + "operationId": "fetchAnswerData", + "scenario": "positive", + "type": "AUTOMATIC", + "testId": 1818 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "metadata_identifier": "d343362c-0b26-41d4-bade-403c87b62ef3", + "data_format": "COMPACT", + "record_size": 9, + "runtime_filter": null, + "runtime_sort": null + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/metadata/answer/data", + "operationId": "fetchAnswerData", + "scenario": "positive", + "type": "AUTOMATIC", + "testId": 1819 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "metadata_identifier": "10a69d10-e455-4473-b1c6-de1da8cc1ad5", + "data_format": "COMPACT" + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/metadata/answer/data", + "operationId": "fetchAnswerData", + "scenario": "positive", + "type": "AUTOMATIC", + "testId": 1820 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "metadata_identifier": "7ca13c1d-51de-477e-94c8-f9372a8e30e3", + "runtime_sort": null + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/metadata/answer/data", + "operationId": "fetchAnswerData", + "scenario": "positive", + "type": "AUTOMATIC", + "testId": 1821 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "metadata_identifier": "a7826fd7-cca0-4e75-9c55-9bfbb18b7454", + "data_format": "COMPACT", + "record_offset": 12, + "runtime_sort": null + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/metadata/answer/data", + "operationId": "fetchAnswerData", + "scenario": "positive", + "type": "AUTOMATIC", + "testId": 1822 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "metadata_identifier": "e4cd9bf1-4f77-4762-9035-543b3a00c294", + "data_format": "COMPACT", + "record_size": 13 + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/metadata/answer/data", + "operationId": "fetchAnswerData", + "scenario": "positive", + "type": "AUTOMATIC", + "testId": 1823 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "metadata_identifier": "21f35c49-c1f8-4f3d-a124-a0fbe5c978aa", + "record_size": 14 + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/metadata/answer/data", + "operationId": "fetchAnswerData", + "scenario": "positive", + "type": "AUTOMATIC", + "testId": 1824 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "metadata_identifier": "73df2632-37ec-4e64-9f9c-c53e5efe2432", + "runtime_filter": null, + "runtime_sort": null + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/metadata/answer/data", + "operationId": "fetchAnswerData", + "scenario": "positive", + "type": "AUTOMATIC", + "testId": 1825 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "metadata_identifier": "1be3019c-aa6e-47cf-a79e-3b7de02f25b4", + "data_format": "COMPACT", + "record_offset": 16, + "runtime_sort": null + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/metadata/answer/data", + "operationId": "fetchAnswerData", + "scenario": "positive", + "type": "AUTOMATIC", + "testId": 1826 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "metadata_identifier": "47294d3a-5dc4-44d3-bee5-7a586c606ed8", + "data_format": "COMPACT", + "runtime_filter": null, + "runtime_sort": null + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/metadata/answer/data", + "operationId": "fetchAnswerData", + "scenario": "positive", + "type": "AUTOMATIC", + "testId": 1827 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "metadata_identifier": "48d27aee-59c3-4a0c-8d2c-5a8989c55bb1", + "data_format": "COMPACT", + "record_offset": 18, + "runtime_sort": null + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/metadata/answer/data", + "operationId": "fetchAnswerData", + "scenario": "positive", + "type": "AUTOMATIC", + "testId": 1828 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "metadata_identifier": "d343362c-0b26-41d4-bade-403c87b62ef3", + "runtime_filter": null, + "runtime_sort": null + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/metadata/answer/data", + "operationId": "fetchAnswerData", + "scenario": "positive", + "type": "AUTOMATIC", + "testId": 1829 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "metadata_identifier": "10a69d10-e455-4473-b1c6-de1da8cc1ad5", + "data_format": "COMPACT", + "runtime_filter": null + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/metadata/answer/data", + "operationId": "fetchAnswerData", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 1830 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "metadata_identifier": null, + "record_offset": 4, + "runtime_sort": null + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/metadata/answer/data", + "operationId": "fetchAnswerData", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 1831 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "metadata_identifier": null, + "data_format": "COMPACT", + "record_offset": 16, + "runtime_sort": null + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/metadata/answer/data", + "operationId": "fetchAnswerData", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 1832 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "metadata_identifier": null, + "data_format": "COMPACT", + "runtime_filter": null + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/metadata/answer/data", + "operationId": "fetchAnswerData", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 1833 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "metadata_identifier": null, + "runtime_sort": null + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/metadata/answer/data", + "operationId": "fetchAnswerData", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 1834 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "metadata_identifier": null, + "data_format": "COMPACT", + "record_size": 13 + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/metadata/answer/data", + "operationId": "fetchAnswerData", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 1835 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "metadata_identifier": null, + "runtime_sort": null + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/metadata/answer/data", + "operationId": "fetchAnswerData", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 1836 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "metadata_identifier": null, + "record_offset": 4, + "runtime_sort": null + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/metadata/answer/data", + "operationId": "fetchAnswerData", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 1837 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "metadata_identifier": null, + "data_format": "COMPACT", + "record_offset": 12, + "runtime_sort": null + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/metadata/answer/data", + "operationId": "fetchAnswerData", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 1838 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "metadata_identifier": null, + "data_format": "COMPACT", + "runtime_filter": null + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/metadata/answer/data", + "operationId": "fetchAnswerData", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 1839 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "metadata_identifier": null, + "record_offset": 3, + "runtime_sort": null + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/metadata/answer/data", + "operationId": "fetchAnswerData", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 1840 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "metadata_identifier": null, + "data_format": "COMPACT", + "record_offset": 12, + "runtime_sort": null + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/metadata/answer/data", + "operationId": "fetchAnswerData", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 1841 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "metadata_identifier": null, + "record_offset": 5, + "runtime_filter": null + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/metadata/answer/data", + "operationId": "fetchAnswerData", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 1842 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "metadata_identifier": null, + "data_format": "COMPACT", + "runtime_filter": null + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/metadata/answer/data", + "operationId": "fetchAnswerData", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 1843 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "metadata_identifier": null, + "record_offset": 5, + "runtime_filter": null + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/metadata/answer/data", + "operationId": "fetchAnswerData", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 1844 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "metadata_identifier": null, + "data_format": "COMPACT", + "record_size": 2, + "runtime_sort": null + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/metadata/answer/data", + "operationId": "fetchAnswerData", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 1845 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "metadata_identifier": "73df2632-37ec-4e64-9f9c-c53e5efe2432", + "record_offset": 5, + "runtime_filter": null + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/metadata/answer/data", + "operationId": "fetchAnswerData", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 1846 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "metadata_identifier": [ + "e4cd9bf1-4f77-4762-9035-543b3a00c294" + ], + "record_offset": 3, + "runtime_sort": null + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/metadata/answer/data", + "operationId": "fetchAnswerData", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 1847 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "metadata_identifier": "a7826fd7-cca0-4e75-9c55-9bfbb18b7454", + "data_format": [ + "COMPACT" + ], + "record_size": 2, + "runtime_sort": null + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/metadata/answer/data", + "operationId": "fetchAnswerData", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 1848 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "metadata_identifier": [ + "1be3019c-aa6e-47cf-a79e-3b7de02f25b4" + ], + "data_format": "COMPACT", + "record_offset": 16, + "runtime_sort": null + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/metadata/answer/data", + "operationId": "fetchAnswerData", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 1849 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "metadata_identifier": "a7826fd7-cca0-4e75-9c55-9bfbb18b7454", + "data_format": "COMPACT", + "record_offset": 12, + "runtime_sort": null + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/metadata/answer/data", + "operationId": "fetchAnswerData", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 1850 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "metadata_identifier": "1be3019c-aa6e-47cf-a79e-3b7de02f25b4", + "data_format": "COMPACT", + "runtime_filter": null, + "runtime_sort": null + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/metadata/answer/data", + "operationId": "fetchAnswerData", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 1851 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "metadata_identifier": "73df2632-37ec-4e64-9f9c-c53e5efe2432", + "record_offset": 5, + "runtime_filter": null + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/metadata/answer/data", + "operationId": "fetchAnswerData", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 1852 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "metadata_identifier": "1be3019c-aa6e-47cf-a79e-3b7de02f25b4", + "data_format": "COMPACT", + "record_offset": 16, + "runtime_sort": null + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/metadata/answer/data", + "operationId": "fetchAnswerData", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 1853 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "metadata_identifier": "a7826fd7-cca0-4e75-9c55-9bfbb18b7454", + "data_format": "COMPACT", + "record_offset": 12, + "runtime_sort": null + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/metadata/answer/data", + "operationId": "fetchAnswerData", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 1854 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "metadata_identifier": [ + "d343362c-0b26-41d4-bade-403c87b62ef3" + ], + "runtime_filter": null, + "runtime_sort": null + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/metadata/answer/data", + "operationId": "fetchAnswerData", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 1855 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "metadata_identifier": "7ca13c1d-51de-477e-94c8-f9372a8e30e3", + "data_format": [ + "COMPACT" + ], + "record_offset": 1, + "runtime_sort": null + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/metadata/answer/data", + "operationId": "fetchAnswerData", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 1856 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "metadata_identifier": "73df2632-37ec-4e64-9f9c-c53e5efe2432", + "record_offset": 5, + "runtime_filter": null + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/metadata/answer/data", + "operationId": "fetchAnswerData", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 1857 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "metadata_identifier": "10a69d10-e455-4473-b1c6-de1da8cc1ad5", + "data_format": "COMPACT", + "runtime_filter": null + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/metadata/answer/data", + "operationId": "fetchAnswerData", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 1858 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "metadata_identifier": "d343362c-0b26-41d4-bade-403c87b62ef3", + "data_format": [ + "COMPACT" + ], + "record_size": 9, + "runtime_filter": null, + "runtime_sort": null + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/metadata/answer/data", + "operationId": "fetchAnswerData", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 1859 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "metadata_identifier": [ + "10a69d10-e455-4473-b1c6-de1da8cc1ad5" + ], + "data_format": "COMPACT" + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/metadata/answer/data", + "operationId": "fetchAnswerData", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 1860 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "metadata_identifier": "oOVFvGvgXRgSknd", + "record_offset": 4, + "runtime_sort": null + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/metadata/answer/data", + "operationId": "fetchAnswerData", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 1861 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "metadata_identifier": "uFClCEGQmPKqavd", + "record_offset": 4, + "runtime_sort": null + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/metadata/answer/data", + "operationId": "fetchAnswerData", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 1862 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "metadata_identifier": "zpiKeunChUFvuFS", + "data_format": "COMPACT", + "record_size": 13 + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/metadata/answer/data", + "operationId": "fetchAnswerData", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 1863 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "metadata_identifier": "MBfgKyQRGMfbjHC", + "data_format": "COMPACT", + "runtime_filter": null, + "runtime_sort": null + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/metadata/answer/data", + "operationId": "fetchAnswerData", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 1864 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "metadata_identifier": "VpwZjMAjGQttgKE", + "runtime_filter": null, + "runtime_sort": null + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/metadata/answer/data", + "operationId": "fetchAnswerData", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 1865 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "metadata_identifier": "ZYIqQPOkkueElgM", + "data_format": "COMPACT", + "record_size": 9, + "runtime_filter": null, + "runtime_sort": null + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/metadata/answer/data", + "operationId": "fetchAnswerData", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 1866 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "metadata_identifier": "uIHgqruRYeKjtLV", + "data_format": "COMPACT", + "record_offset": 16, + "runtime_sort": null + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/metadata/answer/data", + "operationId": "fetchAnswerData", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 1867 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "metadata_identifier": "VaCRqBSxNsYNHQg", + "data_format": "COMPACT", + "runtime_filter": null + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/metadata/answer/data", + "operationId": "fetchAnswerData", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 1868 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "metadata_identifier": "MxQgBthSSkxIFZc", + "data_format": "COMPACT", + "runtime_filter": null + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/metadata/answer/data", + "operationId": "fetchAnswerData", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 1869 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "metadata_identifier": "IKCqAMVRAlmYSar", + "data_format": "COMPACT", + "record_offset": 12, + "runtime_sort": null + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/metadata/answer/data", + "operationId": "fetchAnswerData", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 1870 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "metadata_identifier": "osuHWpYxwdVnESN", + "record_offset": 5, + "runtime_filter": null + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/metadata/answer/data", + "operationId": "fetchAnswerData", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 1871 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "metadata_identifier": "xdHfhvwNaSUEqCx", + "runtime_sort": null + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/metadata/answer/data", + "operationId": "fetchAnswerData", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 1872 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "metadata_identifier": "gSDFhAZHXGPgees", + "data_format": "COMPACT", + "runtime_filter": null, + "runtime_sort": null + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/metadata/answer/data", + "operationId": "fetchAnswerData", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 1873 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "metadata_identifier": "bzuKCelhjbkkzkB", + "data_format": "COMPACT", + "record_offset": 18, + "runtime_sort": null + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/metadata/answer/data", + "operationId": "fetchAnswerData", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 1874 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "metadata_identifier": "dlHdIQLvSDNmwTN", + "data_format": "COMPACT", + "runtime_filter": null + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/metadata/tml/export", + "operationId": "exportMetadata", + "scenario": "positive", + "type": "AUTOMATIC", + "testId": 1875 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "metadata": [ + { + "type": "ANSWER", + "identifier": "47294d3a-5dc4-44d3-bee5-7a586c606ed8" + }, + { + "type": "LIVEBOARD", + "identifier": "e36ee65e-64be-436b-a29a-22d8998c4fae" + } + ], + "export_associated": false, + "export_fqn": false, + "edoc_format": "JSON" + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/metadata/tml/export", + "operationId": "exportMetadata", + "scenario": "positive", + "type": "AUTOMATIC", + "testId": 1876 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "metadata": [ + { + "type": "ANSWER", + "identifier": "47294d3a-5dc4-44d3-bee5-7a586c606ed8" + }, + { + "type": "LIVEBOARD", + "identifier": "e36ee65e-64be-436b-a29a-22d8998c4fae" + } + ], + "edoc_format": "JSON" + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/metadata/tml/export", + "operationId": "exportMetadata", + "scenario": "positive", + "type": "AUTOMATIC", + "testId": 1877 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "metadata": [ + { + "type": "ANSWER", + "identifier": "47294d3a-5dc4-44d3-bee5-7a586c606ed8" + } + ], + "export_associated": true, + "edoc_format": "YAML" + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/metadata/tml/export", + "operationId": "exportMetadata", + "scenario": "positive", + "type": "AUTOMATIC", + "testId": 1878 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "metadata": [ + { + "type": "ANSWER", + "identifier": "47294d3a-5dc4-44d3-bee5-7a586c606ed8" + }, + { + "type": "LIVEBOARD", + "identifier": "e36ee65e-64be-436b-a29a-22d8998c4fae" + }, + { + "type": "LOGICAL_TABLE", + "identifier": "8d44ed81-3fbf-45c8-9eb2-042942e3d416" + } + ], + "export_associated": true, + "edoc_format": "YAML" + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/metadata/tml/export", + "operationId": "exportMetadata", + "scenario": "positive", + "type": "AUTOMATIC", + "testId": 1879 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "metadata": [ + { + "type": "ANSWER", + "identifier": "47294d3a-5dc4-44d3-bee5-7a586c606ed8" + }, + { + "type": "LIVEBOARD", + "identifier": "e36ee65e-64be-436b-a29a-22d8998c4fae" + }, + { + "type": "LOGICAL_TABLE", + "identifier": "8d44ed81-3fbf-45c8-9eb2-042942e3d416" + } + ], + "export_fqn": true + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/metadata/tml/export", + "operationId": "exportMetadata", + "scenario": "positive", + "type": "AUTOMATIC", + "testId": 1880 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "metadata": [ + { + "type": "ANSWER", + "identifier": "47294d3a-5dc4-44d3-bee5-7a586c606ed8" + }, + { + "type": "LIVEBOARD", + "identifier": "e36ee65e-64be-436b-a29a-22d8998c4fae" + }, + { + "type": "LOGICAL_TABLE", + "identifier": "8d44ed81-3fbf-45c8-9eb2-042942e3d416" + } + ] + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/metadata/tml/export", + "operationId": "exportMetadata", + "scenario": "positive", + "type": "AUTOMATIC", + "testId": 1881 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "metadata": [ + { + "type": "ANSWER", + "identifier": "47294d3a-5dc4-44d3-bee5-7a586c606ed8" + }, + { + "type": "LIVEBOARD", + "identifier": "e36ee65e-64be-436b-a29a-22d8998c4fae" + } + ], + "export_fqn": true, + "edoc_format": "JSON" + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/metadata/tml/export", + "operationId": "exportMetadata", + "scenario": "positive", + "type": "AUTOMATIC", + "testId": 1882 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "metadata": [ + { + "type": "ANSWER", + "identifier": "47294d3a-5dc4-44d3-bee5-7a586c606ed8" + }, + { + "type": "LIVEBOARD", + "identifier": "e36ee65e-64be-436b-a29a-22d8998c4fae" + } + ], + "export_fqn": false, + "edoc_format": "YAML" + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/metadata/tml/export", + "operationId": "exportMetadata", + "scenario": "positive", + "type": "AUTOMATIC", + "testId": 1883 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "metadata": [ + { + "type": "ANSWER", + "identifier": "47294d3a-5dc4-44d3-bee5-7a586c606ed8" + }, + { + "type": "LIVEBOARD", + "identifier": "e36ee65e-64be-436b-a29a-22d8998c4fae" + }, + { + "type": "LOGICAL_TABLE", + "identifier": "8d44ed81-3fbf-45c8-9eb2-042942e3d416" + } + ], + "export_fqn": true + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/metadata/tml/export", + "operationId": "exportMetadata", + "scenario": "positive", + "type": "AUTOMATIC", + "testId": 1884 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "metadata": [ + { + "type": "ANSWER", + "identifier": "47294d3a-5dc4-44d3-bee5-7a586c606ed8" + }, + { + "type": "LIVEBOARD", + "identifier": "e36ee65e-64be-436b-a29a-22d8998c4fae" + } + ], + "export_associated": false, + "export_fqn": true, + "edoc_format": "JSON" + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/metadata/tml/export", + "operationId": "exportMetadata", + "scenario": "positive", + "type": "AUTOMATIC", + "testId": 1885 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "metadata": [ + { + "type": "ANSWER", + "identifier": "47294d3a-5dc4-44d3-bee5-7a586c606ed8" + } + ], + "export_associated": false, + "export_fqn": true + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/metadata/tml/export", + "operationId": "exportMetadata", + "scenario": "positive", + "type": "AUTOMATIC", + "testId": 1886 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "metadata": [ + { + "type": "ANSWER", + "identifier": "47294d3a-5dc4-44d3-bee5-7a586c606ed8" + }, + { + "type": "LIVEBOARD", + "identifier": "e36ee65e-64be-436b-a29a-22d8998c4fae" + }, + { + "type": "LOGICAL_TABLE", + "identifier": "8d44ed81-3fbf-45c8-9eb2-042942e3d416" + } + ], + "export_associated": true, + "export_fqn": false + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/metadata/tml/export", + "operationId": "exportMetadata", + "scenario": "positive", + "type": "AUTOMATIC", + "testId": 1887 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "metadata": [ + { + "type": "ANSWER", + "identifier": "47294d3a-5dc4-44d3-bee5-7a586c606ed8" + }, + { + "type": "LIVEBOARD", + "identifier": "e36ee65e-64be-436b-a29a-22d8998c4fae" + } + ], + "export_fqn": false, + "edoc_format": "YAML" + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/metadata/tml/export", + "operationId": "exportMetadata", + "scenario": "positive", + "type": "AUTOMATIC", + "testId": 1888 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "metadata": [ + { + "type": "ANSWER", + "identifier": "47294d3a-5dc4-44d3-bee5-7a586c606ed8" + }, + { + "type": "LIVEBOARD", + "identifier": "e36ee65e-64be-436b-a29a-22d8998c4fae" + }, + { + "type": "LOGICAL_TABLE", + "identifier": "8d44ed81-3fbf-45c8-9eb2-042942e3d416" + } + ], + "export_fqn": false + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/metadata/tml/export", + "operationId": "exportMetadata", + "scenario": "positive", + "type": "AUTOMATIC", + "testId": 1889 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "metadata": [ + { + "type": "ANSWER", + "identifier": "47294d3a-5dc4-44d3-bee5-7a586c606ed8" + }, + { + "type": "LIVEBOARD", + "identifier": "e36ee65e-64be-436b-a29a-22d8998c4fae" + }, + { + "type": "LOGICAL_TABLE", + "identifier": "8d44ed81-3fbf-45c8-9eb2-042942e3d416" + } + ], + "export_fqn": false + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/metadata/tml/export", + "operationId": "exportMetadata", + "scenario": "positive", + "type": "AUTOMATIC", + "testId": 1890 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "metadata": [ + { + "type": "ANSWER", + "identifier": "47294d3a-5dc4-44d3-bee5-7a586c606ed8" + }, + { + "type": "LIVEBOARD", + "identifier": "e36ee65e-64be-436b-a29a-22d8998c4fae" + } + ], + "export_associated": true + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/metadata/tml/export", + "operationId": "exportMetadata", + "scenario": "positive", + "type": "AUTOMATIC", + "testId": 1891 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "metadata": [ + { + "type": "ANSWER", + "identifier": "47294d3a-5dc4-44d3-bee5-7a586c606ed8" + }, + { + "type": "LIVEBOARD", + "identifier": "e36ee65e-64be-436b-a29a-22d8998c4fae" + } + ], + "export_associated": true, + "edoc_format": "JSON" + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/metadata/tml/export", + "operationId": "exportMetadata", + "scenario": "positive", + "type": "AUTOMATIC", + "testId": 1892 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "metadata": [ + { + "type": "ANSWER", + "identifier": "47294d3a-5dc4-44d3-bee5-7a586c606ed8" + } + ], + "export_associated": false + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/metadata/tml/export", + "operationId": "exportMetadata", + "scenario": "positive", + "type": "AUTOMATIC", + "testId": 1893 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "metadata": [ + { + "type": "ANSWER", + "identifier": "47294d3a-5dc4-44d3-bee5-7a586c606ed8" + }, + { + "type": "LIVEBOARD", + "identifier": "e36ee65e-64be-436b-a29a-22d8998c4fae" + }, + { + "type": "LOGICAL_TABLE", + "identifier": "8d44ed81-3fbf-45c8-9eb2-042942e3d416" + } + ], + "export_associated": true, + "export_fqn": true, + "edoc_format": "YAML" + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/metadata/tml/export", + "operationId": "exportMetadata", + "scenario": "positive", + "type": "AUTOMATIC", + "testId": 1894 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "metadata": [ + { + "type": "ANSWER", + "identifier": "47294d3a-5dc4-44d3-bee5-7a586c606ed8" + } + ] + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/metadata/tml/export", + "operationId": "exportMetadata", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 1895 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "metadata": null, + "export_fqn": true + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/metadata/tml/export", + "operationId": "exportMetadata", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 1896 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "metadata": null, + "export_associated": true + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/metadata/tml/export", + "operationId": "exportMetadata", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 1897 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "metadata": null, + "export_associated": false, + "export_fqn": false, + "edoc_format": "JSON" + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/metadata/tml/export", + "operationId": "exportMetadata", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 1898 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "metadata": null, + "export_associated": false, + "export_fqn": true + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/metadata/tml/export", + "operationId": "exportMetadata", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 1899 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "metadata": null, + "export_associated": true, + "edoc_format": "JSON" + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/metadata/tml/export", + "operationId": "exportMetadata", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 1900 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "metadata": null, + "export_associated": false, + "export_fqn": false, + "edoc_format": "JSON" + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/metadata/tml/export", + "operationId": "exportMetadata", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 1901 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "metadata": null, + "export_fqn": false, + "edoc_format": "YAML" + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/metadata/tml/export", + "operationId": "exportMetadata", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 1902 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "metadata": null + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/metadata/tml/export", + "operationId": "exportMetadata", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 1903 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "metadata": null, + "export_associated": true, + "edoc_format": "YAML" + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/metadata/tml/export", + "operationId": "exportMetadata", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 1904 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "metadata": null, + "export_associated": false + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/metadata/tml/export", + "operationId": "exportMetadata", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 1905 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "metadata": null, + "export_associated": true, + "export_fqn": false + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/metadata/tml/export", + "operationId": "exportMetadata", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 1906 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "metadata": null, + "export_fqn": false, + "edoc_format": "YAML" + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/metadata/tml/export", + "operationId": "exportMetadata", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 1907 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "metadata": null, + "export_associated": true, + "edoc_format": "YAML" + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/metadata/tml/export", + "operationId": "exportMetadata", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 1908 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "metadata": null, + "export_fqn": false + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/metadata/tml/export", + "operationId": "exportMetadata", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 1909 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "metadata": null, + "export_associated": true, + "edoc_format": "YAML" + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/metadata/tml/export", + "operationId": "exportMetadata", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 1910 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "metadata": [ + { + "type": "ANSWER", + "identifier": "47294d3a-5dc4-44d3-bee5-7a586c606ed8" + }, + { + "type": "LIVEBOARD", + "identifier": "e36ee65e-64be-436b-a29a-22d8998c4fae" + } + ], + "export_fqn": false, + "edoc_format": [ + "YAML" + ] + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/metadata/tml/export", + "operationId": "exportMetadata", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 1911 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "metadata": "ktEPhOYrinRUiws" + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/metadata/tml/export", + "operationId": "exportMetadata", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 1912 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "metadata": null, + "export_associated": true, + "edoc_format": "YAML" + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/metadata/tml/export", + "operationId": "exportMetadata", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 1913 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "metadata": [ + { + "type": "ANSWER", + "identifier": "47294d3a-5dc4-44d3-bee5-7a586c606ed8" + }, + { + "type": "LIVEBOARD", + "identifier": "e36ee65e-64be-436b-a29a-22d8998c4fae" + } + ], + "export_associated": false, + "export_fqn": false, + "edoc_format": [ + "JSON" + ] + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/metadata/tml/export", + "operationId": "exportMetadata", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 1914 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "metadata": "evZDAiIKHBIKFQF" + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/metadata/tml/export", + "operationId": "exportMetadata", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 1915 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "metadata": [ + { + "type": "ANSWER", + "identifier": "47294d3a-5dc4-44d3-bee5-7a586c606ed8" + }, + { + "type": "LIVEBOARD", + "identifier": "e36ee65e-64be-436b-a29a-22d8998c4fae" + }, + { + "type": "LOGICAL_TABLE", + "identifier": "8d44ed81-3fbf-45c8-9eb2-042942e3d416" + } + ], + "export_associated": true, + "edoc_format": [ + "YAML" + ] + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/metadata/tml/export", + "operationId": "exportMetadata", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 1916 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "metadata": [ + { + "type": "ANSWER", + "identifier": "47294d3a-5dc4-44d3-bee5-7a586c606ed8" + }, + { + "type": "LIVEBOARD", + "identifier": "e36ee65e-64be-436b-a29a-22d8998c4fae" + } + ], + "export_fqn": false, + "edoc_format": [ + "YAML" + ] + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/metadata/tml/export", + "operationId": "exportMetadata", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 1917 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "metadata": null, + "export_fqn": true + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/metadata/tml/export", + "operationId": "exportMetadata", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 1918 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "metadata": "nnZGbrODkhxxZZx", + "export_fqn": false, + "edoc_format": "YAML" + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/metadata/tml/export", + "operationId": "exportMetadata", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 1919 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "metadata": "HeXShAhwdkQvEnR", + "export_fqn": false, + "edoc_format": "YAML" + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/metadata/tml/export", + "operationId": "exportMetadata", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 1920 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "metadata": "YKFTjReaybGtVVQ", + "export_fqn": true + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/metadata/tml/export", + "operationId": "exportMetadata", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 1921 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "metadata": [ + { + "type": "ANSWER", + "identifier": "47294d3a-5dc4-44d3-bee5-7a586c606ed8" + }, + { + "type": "LIVEBOARD", + "identifier": "e36ee65e-64be-436b-a29a-22d8998c4fae" + } + ], + "export_fqn": true, + "edoc_format": [ + "JSON" + ] + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/metadata/tml/export", + "operationId": "exportMetadata", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 1922 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "metadata": "cMPNOUgXgGdHvNa", + "export_fqn": false + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/metadata/tml/export", + "operationId": "exportMetadata", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 1923 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "metadata": "XfufHRyPKMQjZKe", + "export_fqn": false, + "edoc_format": "YAML" + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/metadata/tml/export", + "operationId": "exportMetadata", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 1924 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "metadata": "yZwAUjRBoCTckpg", + "edoc_format": "JSON" + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/metadata/search", + "operationId": "searchMetadata", + "scenario": "positive", + "type": "AUTOMATIC", + "testId": 1925 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "permissions": [ + { + "principal": { + "identifier": "046760d3-c0be-47d0-a9e7-a1b37c4e4432", + "type": "USER_GROUP" + }, + "share_mode": "NO_ACCESS" + }, + { + "principal": { + "identifier": "179d8867-cf36-4a8d-a019-63a226fd3196", + "type": "USER_GROUP" + }, + "share_mode": "MODIFY" + } + ], + "created_by_user_identifiers": [ + "0f0dd0f7-7411-4195-a4aa-0dc6b58413c9" + ], + "dependent_object_version": "V2", + "favorite_object_options": { + "include": true + }, + "include_auto_created_objects": true, + "include_dependent_objects": false, + "include_details": true, + "include_incomplete_objects": true, + "modified_by_user_identifiers": [ + "0f0dd0f7-7411-4195-a4aa-0dc6b58413c9", + "3b4740ec-3626-4d54-8b7e-ebda45510fb6" + ], + "record_offset": 6, + "record_size": 2, + "sort_options": { + "order": "DESC" + }, + "tag_identifiers": [ + "2d435d7c-a696-450d-897a-5fd734c17f9a" + ], + "include_stats": false + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/metadata/search", + "operationId": "searchMetadata", + "scenario": "positive", + "type": "AUTOMATIC", + "testId": 1926 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "permissions": [ + { + "principal": { + "identifier": "046760d3-c0be-47d0-a9e7-a1b37c4e4432", + "type": "USER_GROUP" + }, + "share_mode": "MODIFY" + }, + { + "principal": { + "identifier": "179d8867-cf36-4a8d-a019-63a226fd3196", + "type": "USER_GROUP" + }, + "share_mode": "READ_ONLY" + }, + { + "principal": { + "identifier": "280a2235-3721-43fc-aa25-5d33549ecc90", + "type": "USER_GROUP" + }, + "share_mode": "NO_ACCESS" + } + ], + "exclude_objects": [ + { + "identifier": "7ca13c1d-51de-477e-94c8-f9372a8e30e3", + "type": "ANSWER" + } + ], + "favorite_object_options": { + "user_identifiers": [ + "0f0dd0f7-7411-4195-a4aa-0dc6b58413c9" + ] + }, + "include_auto_created_objects": true, + "include_dependent_objects": true, + "include_headers": true, + "include_incomplete_objects": false, + "include_visualization_headers": true, + "modified_by_user_identifiers": [ + "0f0dd0f7-7411-4195-a4aa-0dc6b58413c9", + "3b4740ec-3626-4d54-8b7e-ebda45510fb6" + ], + "record_offset": 4, + "record_size": 10, + "tag_identifiers": [ + "2d435d7c-a696-450d-897a-5fd734c17f9a", + "409fc8b1-7960-47a1-b387-7c260c10701d", + "b3650d5f-0c96-425f-bd25-daeb6c773f8e" + ] + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/metadata/search", + "operationId": "searchMetadata", + "scenario": "positive", + "type": "AUTOMATIC", + "testId": 1927 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "metadata": [ + { + "identifier": null, + "name_pattern": null, + "type": "ANSWER" + } + ], + "permissions": [ + { + "principal": { + "identifier": "046760d3-c0be-47d0-a9e7-a1b37c4e4432", + "type": "USER_GROUP" + }, + "share_mode": "READ_ONLY" + }, + { + "principal": { + "identifier": "179d8867-cf36-4a8d-a019-63a226fd3196", + "type": "USER_GROUP" + }, + "share_mode": "MODIFY" + }, + { + "principal": { + "identifier": "280a2235-3721-43fc-aa25-5d33549ecc90", + "type": "USER_GROUP" + }, + "share_mode": "NO_ACCESS" + } + ], + "created_by_user_identifiers": [ + "0f0dd0f7-7411-4195-a4aa-0dc6b58413c9", + "3b4740ec-3626-4d54-8b7e-ebda45510fb6" + ], + "favorite_object_options": { + "user_identifiers": [ + "0f0dd0f7-7411-4195-a4aa-0dc6b58413c9" + ] + }, + "include_auto_created_objects": false, + "include_hidden_objects": false, + "include_incomplete_objects": false, + "modified_by_user_identifiers": [ + "0f0dd0f7-7411-4195-a4aa-0dc6b58413c9", + "3b4740ec-3626-4d54-8b7e-ebda45510fb6" + ], + "record_offset": 8, + "record_size": 6, + "sort_options": { + "order": "ASC" + } + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/metadata/search", + "operationId": "searchMetadata", + "scenario": "positive", + "type": "AUTOMATIC", + "testId": 1928 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "metadata": [ + { + "identifier": null, + "name_pattern": "Ward Ansley", + "type": "ANSWER" + } + ], + "exclude_objects": [ + { + "identifier": "7ca13c1d-51de-477e-94c8-f9372a8e30e3", + "type": "ANSWER" + }, + { + "identifier": "a7826fd7-cca0-4e75-9c55-9bfbb18b7454", + "type": "ANSWER" + } + ], + "favorite_object_options": { + "include": false, + "user_identifiers": [ + "0f0dd0f7-7411-4195-a4aa-0dc6b58413c9", + "3b4740ec-3626-4d54-8b7e-ebda45510fb6", + "4391d676-2dd8-4248-b6db-d973811f0122" + ] + }, + "include_auto_created_objects": true, + "include_worksheet_search_assist_data": false, + "record_offset": 4, + "record_size": 9, + "sort_options": { + "order": "ASC" + }, + "tag_identifiers": [ + "2d435d7c-a696-450d-897a-5fd734c17f9a", + "409fc8b1-7960-47a1-b387-7c260c10701d" + ], + "include_stats": true + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/metadata/search", + "operationId": "searchMetadata", + "scenario": "positive", + "type": "AUTOMATIC", + "testId": 1929 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "metadata": [ + { + "identifier": "7ca13c1d-51de-477e-94c8-f9372a8e30e3", + "name_pattern": null, + "type": null + }, + { + "identifier": "a7826fd7-cca0-4e75-9c55-9bfbb18b7454", + "name_pattern": "Killian Lyte", + "type": "ANSWER" + }, + { + "identifier": null, + "name_pattern": "Averell Goodredge", + "type": null + } + ], + "permissions": [ + { + "principal": { + "identifier": "046760d3-c0be-47d0-a9e7-a1b37c4e4432", + "type": "USER_GROUP" + }, + "share_mode": "NO_ACCESS" + }, + { + "principal": { + "identifier": "179d8867-cf36-4a8d-a019-63a226fd3196", + "type": "USER_GROUP" + }, + "share_mode": "READ_ONLY" + }, + { + "principal": { + "identifier": "280a2235-3721-43fc-aa25-5d33549ecc90", + "type": "USER_GROUP" + }, + "share_mode": "NO_ACCESS" + } + ], + "created_by_user_identifiers": [ + "0f0dd0f7-7411-4195-a4aa-0dc6b58413c9", + "3b4740ec-3626-4d54-8b7e-ebda45510fb6" + ], + "dependent_object_version": "V1", + "exclude_objects": [ + { + "identifier": "7ca13c1d-51de-477e-94c8-f9372a8e30e3", + "type": "ANSWER" + }, + { + "identifier": "a7826fd7-cca0-4e75-9c55-9bfbb18b7454", + "type": "ANSWER" + }, + { + "identifier": "e4cd9bf1-4f77-4762-9035-543b3a00c294", + "type": "ANSWER" + } + ], + "favorite_object_options": { + "user_identifiers": [ + "0f0dd0f7-7411-4195-a4aa-0dc6b58413c9", + "3b4740ec-3626-4d54-8b7e-ebda45510fb6" + ] + }, + "include_auto_created_objects": false, + "include_hidden_objects": false, + "include_visualization_headers": false, + "include_worksheet_search_assist_data": true, + "modified_by_user_identifiers": [ + "0f0dd0f7-7411-4195-a4aa-0dc6b58413c9" + ], + "record_offset": 7, + "record_size": 4, + "sort_options": { + "order": "ASC" + }, + "tag_identifiers": [ + "2d435d7c-a696-450d-897a-5fd734c17f9a", + "409fc8b1-7960-47a1-b387-7c260c10701d", + "b3650d5f-0c96-425f-bd25-daeb6c773f8e" + ] + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/metadata/search", + "operationId": "searchMetadata", + "scenario": "positive", + "type": "AUTOMATIC", + "testId": 1930 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "metadata": [ + { + "identifier": "7ca13c1d-51de-477e-94c8-f9372a8e30e3", + "name_pattern": "Morganica Loding", + "type": "ANSWER" + } + ], + "permissions": [ + { + "principal": { + "identifier": "046760d3-c0be-47d0-a9e7-a1b37c4e4432", + "type": "USER_GROUP" + }, + "share_mode": "MODIFY" + } + ], + "exclude_objects": [ + { + "identifier": "7ca13c1d-51de-477e-94c8-f9372a8e30e3", + "type": "ANSWER" + }, + { + "identifier": "a7826fd7-cca0-4e75-9c55-9bfbb18b7454", + "type": "ANSWER" + } + ], + "favorite_object_options": { + "include": false + }, + "include_auto_created_objects": false, + "include_details": false, + "include_hidden_objects": true, + "include_incomplete_objects": false, + "include_visualization_headers": true, + "include_worksheet_search_assist_data": true, + "record_offset": 4, + "record_size": 7, + "sort_options": { + "field_name": "VIEWS", + "order": "DESC" + }, + "include_stats": true + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/metadata/search", + "operationId": "searchMetadata", + "scenario": "positive", + "type": "AUTOMATIC", + "testId": 1931 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "metadata": [ + { + "identifier": null, + "name_pattern": null, + "type": "ANSWER" + }, + { + "identifier": "a7826fd7-cca0-4e75-9c55-9bfbb18b7454", + "name_pattern": null, + "type": "ANSWER" + } + ], + "permissions": [ + { + "principal": { + "identifier": "046760d3-c0be-47d0-a9e7-a1b37c4e4432", + "type": "USER_GROUP" + }, + "share_mode": "NO_ACCESS" + } + ], + "exclude_objects": [ + { + "identifier": "7ca13c1d-51de-477e-94c8-f9372a8e30e3", + "type": "ANSWER" + } + ], + "favorite_object_options": { + "user_identifiers": [ + "0f0dd0f7-7411-4195-a4aa-0dc6b58413c9", + "3b4740ec-3626-4d54-8b7e-ebda45510fb6" + ] + }, + "include_auto_created_objects": false, + "include_details": true, + "include_headers": false, + "include_visualization_headers": true, + "modified_by_user_identifiers": [ + "0f0dd0f7-7411-4195-a4aa-0dc6b58413c9" + ], + "record_offset": 6, + "record_size": 1, + "sort_options": { + "field_name": "DISPLAY_NAME" + }, + "include_stats": true + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/metadata/search", + "operationId": "searchMetadata", + "scenario": "positive", + "type": "AUTOMATIC", + "testId": 1932 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "created_by_user_identifiers": [ + "0f0dd0f7-7411-4195-a4aa-0dc6b58413c9", + "3b4740ec-3626-4d54-8b7e-ebda45510fb6" + ], + "exclude_objects": [ + { + "identifier": "7ca13c1d-51de-477e-94c8-f9372a8e30e3", + "type": "ANSWER" + } + ], + "favorite_object_options": { + "include": false, + "user_identifiers": [ + "0f0dd0f7-7411-4195-a4aa-0dc6b58413c9", + "3b4740ec-3626-4d54-8b7e-ebda45510fb6", + "4391d676-2dd8-4248-b6db-d973811f0122" + ] + }, + "include_details": false, + "include_hidden_objects": false, + "include_visualization_headers": false, + "modified_by_user_identifiers": [ + "0f0dd0f7-7411-4195-a4aa-0dc6b58413c9", + "3b4740ec-3626-4d54-8b7e-ebda45510fb6" + ], + "record_offset": 5, + "record_size": 1, + "sort_options": { + "order": "DESC" + }, + "tag_identifiers": [ + "2d435d7c-a696-450d-897a-5fd734c17f9a", + "409fc8b1-7960-47a1-b387-7c260c10701d", + "b3650d5f-0c96-425f-bd25-daeb6c773f8e" + ] + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/metadata/search", + "operationId": "searchMetadata", + "scenario": "positive", + "type": "AUTOMATIC", + "testId": 1933 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "permissions": [ + { + "principal": { + "identifier": "046760d3-c0be-47d0-a9e7-a1b37c4e4432", + "type": "USER_GROUP" + }, + "share_mode": "READ_ONLY" + } + ], + "exclude_objects": [ + { + "identifier": "7ca13c1d-51de-477e-94c8-f9372a8e30e3", + "type": "ANSWER" + }, + { + "identifier": "a7826fd7-cca0-4e75-9c55-9bfbb18b7454", + "type": "ANSWER" + }, + { + "identifier": "e4cd9bf1-4f77-4762-9035-543b3a00c294", + "type": "ANSWER" + } + ], + "favorite_object_options": { + "include": true, + "user_identifiers": [ + "0f0dd0f7-7411-4195-a4aa-0dc6b58413c9", + "3b4740ec-3626-4d54-8b7e-ebda45510fb6" + ] + }, + "include_dependent_objects": true, + "include_details": false, + "include_headers": false, + "include_hidden_objects": false, + "include_incomplete_objects": true, + "include_worksheet_search_assist_data": true, + "record_offset": 7, + "record_size": 8, + "sort_options": { + "order": "ASC" + }, + "include_stats": false + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/metadata/search", + "operationId": "searchMetadata", + "scenario": "positive", + "type": "AUTOMATIC", + "testId": 1934 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "metadata": [ + { + "identifier": "7ca13c1d-51de-477e-94c8-f9372a8e30e3", + "name_pattern": "Inessa Dallimore", + "type": "ANSWER" + }, + { + "identifier": "a7826fd7-cca0-4e75-9c55-9bfbb18b7454", + "name_pattern": null, + "type": null + } + ], + "created_by_user_identifiers": [ + "0f0dd0f7-7411-4195-a4aa-0dc6b58413c9" + ], + "exclude_objects": [ + { + "identifier": "7ca13c1d-51de-477e-94c8-f9372a8e30e3", + "type": "ANSWER" + }, + { + "identifier": "a7826fd7-cca0-4e75-9c55-9bfbb18b7454", + "type": "ANSWER" + } + ], + "favorite_object_options": { + "user_identifiers": [ + "0f0dd0f7-7411-4195-a4aa-0dc6b58413c9" + ] + }, + "include_auto_created_objects": true, + "include_dependent_objects": true, + "include_details": false, + "include_hidden_objects": false, + "include_incomplete_objects": true, + "record_offset": 3, + "record_size": 6, + "sort_options": { + "field_name": "FAVORITES" + }, + "tag_identifiers": [ + "2d435d7c-a696-450d-897a-5fd734c17f9a" + ] + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/metadata/search", + "operationId": "searchMetadata", + "scenario": "positive", + "type": "AUTOMATIC", + "testId": 1935 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "metadata": [ + { + "identifier": null, + "name_pattern": null, + "type": "ANSWER" + }, + { + "identifier": null, + "name_pattern": null, + "type": null + }, + { + "identifier": "e4cd9bf1-4f77-4762-9035-543b3a00c294", + "name_pattern": "Emelen Snook", + "type": "ANSWER" + } + ], + "created_by_user_identifiers": [ + "0f0dd0f7-7411-4195-a4aa-0dc6b58413c9", + "3b4740ec-3626-4d54-8b7e-ebda45510fb6" + ], + "favorite_object_options": { + "user_identifiers": [ + "0f0dd0f7-7411-4195-a4aa-0dc6b58413c9", + "3b4740ec-3626-4d54-8b7e-ebda45510fb6", + "4391d676-2dd8-4248-b6db-d973811f0122" + ] + }, + "include_details": false, + "include_headers": false, + "include_hidden_objects": false, + "include_incomplete_objects": false, + "record_offset": 3, + "record_size": 5, + "sort_options": { + "field_name": "VIEWS" + } + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/metadata/search", + "operationId": "searchMetadata", + "scenario": "positive", + "type": "AUTOMATIC", + "testId": 1936 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "metadata": [ + { + "identifier": "7ca13c1d-51de-477e-94c8-f9372a8e30e3", + "name_pattern": null, + "type": "ANSWER" + }, + { + "identifier": "a7826fd7-cca0-4e75-9c55-9bfbb18b7454", + "name_pattern": null, + "type": null + } + ], + "permissions": [ + { + "principal": { + "identifier": "046760d3-c0be-47d0-a9e7-a1b37c4e4432", + "type": "USER_GROUP" + }, + "share_mode": "READ_ONLY" + }, + { + "principal": { + "identifier": "179d8867-cf36-4a8d-a019-63a226fd3196", + "type": "USER_GROUP" + }, + "share_mode": "MODIFY" + } + ], + "created_by_user_identifiers": [ + "0f0dd0f7-7411-4195-a4aa-0dc6b58413c9", + "3b4740ec-3626-4d54-8b7e-ebda45510fb6" + ], + "dependent_object_version": "V2", + "exclude_objects": [ + { + "identifier": "7ca13c1d-51de-477e-94c8-f9372a8e30e3", + "type": "ANSWER" + }, + { + "identifier": "a7826fd7-cca0-4e75-9c55-9bfbb18b7454", + "type": "ANSWER" + }, + { + "identifier": "e4cd9bf1-4f77-4762-9035-543b3a00c294", + "type": "ANSWER" + } + ], + "favorite_object_options": { + "include": true, + "user_identifiers": [ + "0f0dd0f7-7411-4195-a4aa-0dc6b58413c9", + "3b4740ec-3626-4d54-8b7e-ebda45510fb6", + "4391d676-2dd8-4248-b6db-d973811f0122" + ] + }, + "include_auto_created_objects": true, + "include_dependent_objects": false, + "include_hidden_objects": true, + "include_incomplete_objects": false, + "include_visualization_headers": false, + "include_worksheet_search_assist_data": true, + "modified_by_user_identifiers": [ + "0f0dd0f7-7411-4195-a4aa-0dc6b58413c9", + "3b4740ec-3626-4d54-8b7e-ebda45510fb6", + "4391d676-2dd8-4248-b6db-d973811f0122" + ], + "record_offset": 6, + "record_size": 3, + "sort_options": { + "field_name": "AUTHOR", + "order": "ASC" + }, + "tag_identifiers": [ + "2d435d7c-a696-450d-897a-5fd734c17f9a", + "409fc8b1-7960-47a1-b387-7c260c10701d", + "b3650d5f-0c96-425f-bd25-daeb6c773f8e" + ], + "include_stats": true + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/metadata/search", + "operationId": "searchMetadata", + "scenario": "positive", + "type": "AUTOMATIC", + "testId": 1937 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "permissions": [ + { + "principal": { + "identifier": "046760d3-c0be-47d0-a9e7-a1b37c4e4432", + "type": "USER_GROUP" + }, + "share_mode": "NO_ACCESS" + }, + { + "principal": { + "identifier": "179d8867-cf36-4a8d-a019-63a226fd3196", + "type": "USER_GROUP" + }, + "share_mode": "READ_ONLY" + } + ], + "created_by_user_identifiers": [ + "0f0dd0f7-7411-4195-a4aa-0dc6b58413c9" + ], + "include_auto_created_objects": true, + "include_details": false, + "include_headers": true, + "include_incomplete_objects": false, + "include_visualization_headers": true, + "modified_by_user_identifiers": [ + "0f0dd0f7-7411-4195-a4aa-0dc6b58413c9", + "3b4740ec-3626-4d54-8b7e-ebda45510fb6", + "4391d676-2dd8-4248-b6db-d973811f0122" + ], + "record_offset": 9, + "record_size": 4, + "sort_options": { + "order": "ASC" + }, + "include_stats": false + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/metadata/search", + "operationId": "searchMetadata", + "scenario": "positive", + "type": "AUTOMATIC", + "testId": 1938 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "metadata": [ + { + "identifier": "7ca13c1d-51de-477e-94c8-f9372a8e30e3", + "name_pattern": null, + "type": null + } + ], + "permissions": [ + { + "principal": { + "identifier": "046760d3-c0be-47d0-a9e7-a1b37c4e4432", + "type": "USER_GROUP" + }, + "share_mode": "READ_ONLY" + }, + { + "principal": { + "identifier": "179d8867-cf36-4a8d-a019-63a226fd3196", + "type": "USER_GROUP" + }, + "share_mode": "MODIFY" + } + ], + "favorite_object_options": { + "user_identifiers": [ + "0f0dd0f7-7411-4195-a4aa-0dc6b58413c9" + ] + }, + "include_auto_created_objects": false, + "include_headers": true, + "include_worksheet_search_assist_data": true, + "modified_by_user_identifiers": [ + "0f0dd0f7-7411-4195-a4aa-0dc6b58413c9" + ], + "record_offset": 9, + "record_size": 7, + "tag_identifiers": [ + "2d435d7c-a696-450d-897a-5fd734c17f9a", + "409fc8b1-7960-47a1-b387-7c260c10701d", + "b3650d5f-0c96-425f-bd25-daeb6c773f8e" + ] + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/metadata/search", + "operationId": "searchMetadata", + "scenario": "positive", + "type": "AUTOMATIC", + "testId": 1939 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "created_by_user_identifiers": [ + "0f0dd0f7-7411-4195-a4aa-0dc6b58413c9", + "3b4740ec-3626-4d54-8b7e-ebda45510fb6" + ], + "dependent_object_version": "V2", + "favorite_object_options": { + "user_identifiers": [ + "0f0dd0f7-7411-4195-a4aa-0dc6b58413c9" + ] + }, + "include_visualization_headers": true, + "include_worksheet_search_assist_data": true, + "record_offset": 5, + "record_size": 2 + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/metadata/search", + "operationId": "searchMetadata", + "scenario": "positive", + "type": "AUTOMATIC", + "testId": 1940 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "metadata": [ + { + "identifier": null, + "name_pattern": null, + "type": null + }, + { + "identifier": "a7826fd7-cca0-4e75-9c55-9bfbb18b7454", + "name_pattern": null, + "type": "ANSWER" + }, + { + "identifier": null, + "name_pattern": "Anatole Pirelli", + "type": null + } + ], + "permissions": [ + { + "principal": { + "identifier": "046760d3-c0be-47d0-a9e7-a1b37c4e4432", + "type": "USER_GROUP" + }, + "share_mode": "NO_ACCESS" + }, + { + "principal": { + "identifier": "179d8867-cf36-4a8d-a019-63a226fd3196", + "type": "USER_GROUP" + }, + "share_mode": "READ_ONLY" + } + ], + "dependent_object_version": "V2", + "include_dependent_objects": true, + "include_details": false, + "include_headers": true, + "include_hidden_objects": true, + "include_visualization_headers": true, + "record_offset": 3, + "record_size": 10, + "sort_options": { + "field_name": "NAME", + "order": "ASC" + }, + "tag_identifiers": [ + "2d435d7c-a696-450d-897a-5fd734c17f9a" + ], + "include_stats": true + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/metadata/search", + "operationId": "searchMetadata", + "scenario": "positive", + "type": "AUTOMATIC", + "testId": 1941 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "metadata": [ + { + "identifier": null, + "name_pattern": "Allsun De Fries", + "type": null + }, + { + "identifier": null, + "name_pattern": "Alexandr Tolworthie", + "type": null + } + ], + "created_by_user_identifiers": [ + "0f0dd0f7-7411-4195-a4aa-0dc6b58413c9", + "3b4740ec-3626-4d54-8b7e-ebda45510fb6" + ], + "exclude_objects": [ + { + "identifier": "7ca13c1d-51de-477e-94c8-f9372a8e30e3", + "type": "ANSWER" + }, + { + "identifier": "a7826fd7-cca0-4e75-9c55-9bfbb18b7454", + "type": "ANSWER" + }, + { + "identifier": "e4cd9bf1-4f77-4762-9035-543b3a00c294", + "type": "ANSWER" + } + ], + "favorite_object_options": { + "include": false, + "user_identifiers": [ + "0f0dd0f7-7411-4195-a4aa-0dc6b58413c9", + "3b4740ec-3626-4d54-8b7e-ebda45510fb6" + ] + }, + "include_headers": true, + "include_incomplete_objects": true, + "include_visualization_headers": false, + "modified_by_user_identifiers": [ + "0f0dd0f7-7411-4195-a4aa-0dc6b58413c9" + ], + "record_offset": 2, + "record_size": 3, + "sort_options": { + "field_name": "MODIFIED", + "order": "ASC" + } + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/metadata/search", + "operationId": "searchMetadata", + "scenario": "positive", + "type": "AUTOMATIC", + "testId": 1942 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "metadata": [ + { + "identifier": "7ca13c1d-51de-477e-94c8-f9372a8e30e3", + "name_pattern": null, + "type": null + }, + { + "identifier": null, + "name_pattern": null, + "type": "ANSWER" + }, + { + "identifier": "e4cd9bf1-4f77-4762-9035-543b3a00c294", + "name_pattern": "Francene Housbey", + "type": null + } + ], + "permissions": [ + { + "principal": { + "identifier": "046760d3-c0be-47d0-a9e7-a1b37c4e4432", + "type": "USER_GROUP" + }, + "share_mode": "NO_ACCESS" + }, + { + "principal": { + "identifier": "179d8867-cf36-4a8d-a019-63a226fd3196", + "type": "USER_GROUP" + }, + "share_mode": "NO_ACCESS" + } + ], + "favorite_object_options": { + "user_identifiers": [ + "0f0dd0f7-7411-4195-a4aa-0dc6b58413c9", + "3b4740ec-3626-4d54-8b7e-ebda45510fb6", + "4391d676-2dd8-4248-b6db-d973811f0122" + ] + }, + "include_auto_created_objects": true, + "include_dependent_objects": true, + "include_details": false, + "include_hidden_objects": false, + "include_visualization_headers": true, + "include_worksheet_search_assist_data": false, + "record_offset": 4, + "record_size": 6, + "tag_identifiers": [ + "2d435d7c-a696-450d-897a-5fd734c17f9a", + "409fc8b1-7960-47a1-b387-7c260c10701d" + ], + "include_stats": true + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/metadata/search", + "operationId": "searchMetadata", + "scenario": "positive", + "type": "AUTOMATIC", + "testId": 1943 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "metadata": [ + { + "identifier": "7ca13c1d-51de-477e-94c8-f9372a8e30e3", + "name_pattern": "Franky Foddy", + "type": "ANSWER" + }, + { + "identifier": "a7826fd7-cca0-4e75-9c55-9bfbb18b7454", + "name_pattern": "Lurline Gonoude", + "type": null + }, + { + "identifier": null, + "name_pattern": null, + "type": null + } + ], + "dependent_object_version": "V2", + "favorite_object_options": { + "user_identifiers": [ + "0f0dd0f7-7411-4195-a4aa-0dc6b58413c9", + "3b4740ec-3626-4d54-8b7e-ebda45510fb6" + ] + }, + "include_auto_created_objects": true, + "include_hidden_objects": true, + "include_incomplete_objects": false, + "include_visualization_headers": true, + "modified_by_user_identifiers": [ + "0f0dd0f7-7411-4195-a4aa-0dc6b58413c9", + "3b4740ec-3626-4d54-8b7e-ebda45510fb6" + ], + "record_offset": 8, + "record_size": 3, + "sort_options": { + "field_name": "FAVORITES" + }, + "include_stats": true + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/metadata/search", + "operationId": "searchMetadata", + "scenario": "positive", + "type": "AUTOMATIC", + "testId": 1944 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "metadata": [ + { + "identifier": "7ca13c1d-51de-477e-94c8-f9372a8e30e3", + "name_pattern": "Eugine McTrustrie", + "type": "ANSWER" + }, + { + "identifier": "a7826fd7-cca0-4e75-9c55-9bfbb18b7454", + "name_pattern": "Ruggiero Terrington", + "type": null + } + ], + "dependent_object_version": "V2", + "favorite_object_options": { + "include": false, + "user_identifiers": [ + "0f0dd0f7-7411-4195-a4aa-0dc6b58413c9" + ] + }, + "include_details": false, + "include_worksheet_search_assist_data": false, + "record_offset": 10, + "record_size": 10, + "sort_options": { + "order": "ASC" + }, + "include_stats": true + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/metadata/search", + "operationId": "searchMetadata", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 1945 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "metadata": [ + { + "identifier": "7ca13c1d-51de-477e-94c8-f9372a8e30e3", + "name_pattern": "Franky Foddy", + "type": "ANSWER" + }, + { + "identifier": "a7826fd7-cca0-4e75-9c55-9bfbb18b7454", + "name_pattern": "Lurline Gonoude", + "type": null + }, + { + "identifier": null, + "name_pattern": null, + "type": null + } + ], + "dependent_object_version": "V2", + "favorite_object_options": { + "user_identifiers": [ + "0f0dd0f7-7411-4195-a4aa-0dc6b58413c9", + "3b4740ec-3626-4d54-8b7e-ebda45510fb6" + ] + }, + "include_auto_created_objects": true, + "include_hidden_objects": true, + "include_incomplete_objects": false, + "include_visualization_headers": true, + "modified_by_user_identifiers": [ + "0f0dd0f7-7411-4195-a4aa-0dc6b58413c9", + "3b4740ec-3626-4d54-8b7e-ebda45510fb6" + ], + "record_offset": 8, + "record_size": 3, + "sort_options": { + "field_name": "FAVORITES" + }, + "include_stats": true + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/metadata/search", + "operationId": "searchMetadata", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 1946 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "metadata": [ + { + "identifier": null, + "name_pattern": null, + "type": "ANSWER" + }, + { + "identifier": null, + "name_pattern": null, + "type": null + }, + { + "identifier": "e4cd9bf1-4f77-4762-9035-543b3a00c294", + "name_pattern": "Emelen Snook", + "type": "ANSWER" + } + ], + "created_by_user_identifiers": [ + "0f0dd0f7-7411-4195-a4aa-0dc6b58413c9", + "3b4740ec-3626-4d54-8b7e-ebda45510fb6" + ], + "favorite_object_options": [ + [ + "user_identifiers", + [ + "0f0dd0f7-7411-4195-a4aa-0dc6b58413c9", + "3b4740ec-3626-4d54-8b7e-ebda45510fb6", + "4391d676-2dd8-4248-b6db-d973811f0122" + ] + ] + ], + "include_details": false, + "include_headers": false, + "include_hidden_objects": false, + "include_incomplete_objects": false, + "record_offset": 3, + "record_size": 5, + "sort_options": { + "field_name": "VIEWS" + } + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/metadata/search", + "operationId": "searchMetadata", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 1947 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "created_by_user_identifiers": [ + "0f0dd0f7-7411-4195-a4aa-0dc6b58413c9", + "3b4740ec-3626-4d54-8b7e-ebda45510fb6" + ], + "exclude_objects": [ + { + "identifier": "7ca13c1d-51de-477e-94c8-f9372a8e30e3", + "type": "ANSWER" + } + ], + "favorite_object_options": { + "include": false, + "user_identifiers": [ + "0f0dd0f7-7411-4195-a4aa-0dc6b58413c9", + "3b4740ec-3626-4d54-8b7e-ebda45510fb6", + "4391d676-2dd8-4248-b6db-d973811f0122" + ] + }, + "include_details": false, + "include_hidden_objects": false, + "include_visualization_headers": false, + "modified_by_user_identifiers": [ + "0f0dd0f7-7411-4195-a4aa-0dc6b58413c9", + "3b4740ec-3626-4d54-8b7e-ebda45510fb6" + ], + "record_offset": 5, + "record_size": 1, + "sort_options": { + "order": "DESC" + }, + "tag_identifiers": [ + "2d435d7c-a696-450d-897a-5fd734c17f9a", + "409fc8b1-7960-47a1-b387-7c260c10701d", + "b3650d5f-0c96-425f-bd25-daeb6c773f8e" + ] + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/metadata/search", + "operationId": "searchMetadata", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 1948 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "metadata": [ + { + "identifier": null, + "name_pattern": null, + "type": null + }, + { + "identifier": "a7826fd7-cca0-4e75-9c55-9bfbb18b7454", + "name_pattern": null, + "type": "ANSWER" + }, + { + "identifier": null, + "name_pattern": "Anatole Pirelli", + "type": null + } + ], + "permissions": [ + { + "principal": { + "identifier": "046760d3-c0be-47d0-a9e7-a1b37c4e4432", + "type": "USER_GROUP" + }, + "share_mode": "NO_ACCESS" + }, + { + "principal": { + "identifier": "179d8867-cf36-4a8d-a019-63a226fd3196", + "type": "USER_GROUP" + }, + "share_mode": "READ_ONLY" + } + ], + "dependent_object_version": [ + "V2" + ], + "include_dependent_objects": true, + "include_details": false, + "include_headers": true, + "include_hidden_objects": true, + "include_visualization_headers": true, + "record_offset": 3, + "record_size": 10, + "sort_options": { + "field_name": "NAME", + "order": "ASC" + }, + "tag_identifiers": [ + "2d435d7c-a696-450d-897a-5fd734c17f9a" + ], + "include_stats": true + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/metadata/search", + "operationId": "searchMetadata", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 1949 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "metadata": [ + { + "identifier": null, + "name_pattern": null, + "type": "ANSWER" + }, + { + "identifier": null, + "name_pattern": null, + "type": null + }, + { + "identifier": "e4cd9bf1-4f77-4762-9035-543b3a00c294", + "name_pattern": "Emelen Snook", + "type": "ANSWER" + } + ], + "created_by_user_identifiers": [ + "0f0dd0f7-7411-4195-a4aa-0dc6b58413c9", + "3b4740ec-3626-4d54-8b7e-ebda45510fb6" + ], + "favorite_object_options": { + "user_identifiers": [ + "0f0dd0f7-7411-4195-a4aa-0dc6b58413c9", + "3b4740ec-3626-4d54-8b7e-ebda45510fb6", + "4391d676-2dd8-4248-b6db-d973811f0122" + ] + }, + "include_details": false, + "include_headers": false, + "include_hidden_objects": false, + "include_incomplete_objects": false, + "record_offset": 3, + "record_size": 5, + "sort_options": { + "field_name": "VIEWS" + } + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/metadata/search", + "operationId": "searchMetadata", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 1950 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "permissions": "oOdMraGfVefzvZs", + "exclude_objects": [ + { + "identifier": "7ca13c1d-51de-477e-94c8-f9372a8e30e3", + "type": "ANSWER" + } + ], + "favorite_object_options": { + "user_identifiers": [ + "0f0dd0f7-7411-4195-a4aa-0dc6b58413c9" + ] + }, + "include_auto_created_objects": true, + "include_dependent_objects": true, + "include_headers": true, + "include_incomplete_objects": false, + "include_visualization_headers": true, + "modified_by_user_identifiers": [ + "0f0dd0f7-7411-4195-a4aa-0dc6b58413c9", + "3b4740ec-3626-4d54-8b7e-ebda45510fb6" + ], + "record_offset": 4, + "record_size": 10, + "tag_identifiers": [ + "2d435d7c-a696-450d-897a-5fd734c17f9a", + "409fc8b1-7960-47a1-b387-7c260c10701d", + "b3650d5f-0c96-425f-bd25-daeb6c773f8e" + ] + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/metadata/search", + "operationId": "searchMetadata", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 1951 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "metadata": "lmFesoIJKLVxEXQ", + "dependent_object_version": "V2", + "favorite_object_options": { + "include": false, + "user_identifiers": [ + "0f0dd0f7-7411-4195-a4aa-0dc6b58413c9" + ] + }, + "include_details": false, + "include_worksheet_search_assist_data": false, + "record_offset": 10, + "record_size": 10, + "sort_options": { + "order": "ASC" + }, + "include_stats": true + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/metadata/search", + "operationId": "searchMetadata", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 1952 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "created_by_user_identifiers": [ + "0f0dd0f7-7411-4195-a4aa-0dc6b58413c9", + "3b4740ec-3626-4d54-8b7e-ebda45510fb6" + ], + "dependent_object_version": "V2", + "favorite_object_options": { + "user_identifiers": [ + "0f0dd0f7-7411-4195-a4aa-0dc6b58413c9" + ] + }, + "include_visualization_headers": true, + "include_worksheet_search_assist_data": true, + "record_offset": 5, + "record_size": 2 + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/metadata/search", + "operationId": "searchMetadata", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 1953 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "metadata": [ + { + "identifier": "7ca13c1d-51de-477e-94c8-f9372a8e30e3", + "name_pattern": "Eugine McTrustrie", + "type": "ANSWER" + }, + { + "identifier": "a7826fd7-cca0-4e75-9c55-9bfbb18b7454", + "name_pattern": "Ruggiero Terrington", + "type": null + } + ], + "dependent_object_version": "V2", + "favorite_object_options": [ + [ + "include", + false + ], + [ + "user_identifiers", + [ + "0f0dd0f7-7411-4195-a4aa-0dc6b58413c9" + ] + ] + ], + "include_details": false, + "include_worksheet_search_assist_data": false, + "record_offset": 10, + "record_size": 10, + "sort_options": { + "order": "ASC" + }, + "include_stats": true + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/metadata/search", + "operationId": "searchMetadata", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 1954 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "metadata": [ + { + "identifier": "7ca13c1d-51de-477e-94c8-f9372a8e30e3", + "name_pattern": "Inessa Dallimore", + "type": "ANSWER" + }, + { + "identifier": "a7826fd7-cca0-4e75-9c55-9bfbb18b7454", + "name_pattern": null, + "type": null + } + ], + "created_by_user_identifiers": [ + "0f0dd0f7-7411-4195-a4aa-0dc6b58413c9" + ], + "exclude_objects": [ + { + "identifier": "7ca13c1d-51de-477e-94c8-f9372a8e30e3", + "type": "ANSWER" + }, + { + "identifier": "a7826fd7-cca0-4e75-9c55-9bfbb18b7454", + "type": "ANSWER" + } + ], + "favorite_object_options": { + "user_identifiers": [ + "0f0dd0f7-7411-4195-a4aa-0dc6b58413c9" + ] + }, + "include_auto_created_objects": true, + "include_dependent_objects": true, + "include_details": false, + "include_hidden_objects": false, + "include_incomplete_objects": true, + "record_offset": 3, + "record_size": 6, + "sort_options": { + "field_name": "FAVORITES" + }, + "tag_identifiers": [ + "2d435d7c-a696-450d-897a-5fd734c17f9a" + ] + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/metadata/search", + "operationId": "searchMetadata", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 1955 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "metadata": [ + { + "identifier": "7ca13c1d-51de-477e-94c8-f9372a8e30e3", + "name_pattern": null, + "type": null + } + ], + "permissions": [ + { + "principal": { + "identifier": "046760d3-c0be-47d0-a9e7-a1b37c4e4432", + "type": "USER_GROUP" + }, + "share_mode": "READ_ONLY" + }, + { + "principal": { + "identifier": "179d8867-cf36-4a8d-a019-63a226fd3196", + "type": "USER_GROUP" + }, + "share_mode": "MODIFY" + } + ], + "favorite_object_options": { + "user_identifiers": [ + "0f0dd0f7-7411-4195-a4aa-0dc6b58413c9" + ] + }, + "include_auto_created_objects": false, + "include_headers": true, + "include_worksheet_search_assist_data": true, + "modified_by_user_identifiers": [ + "0f0dd0f7-7411-4195-a4aa-0dc6b58413c9" + ], + "record_offset": 9, + "record_size": 7, + "tag_identifiers": [ + "2d435d7c-a696-450d-897a-5fd734c17f9a", + "409fc8b1-7960-47a1-b387-7c260c10701d", + "b3650d5f-0c96-425f-bd25-daeb6c773f8e" + ] + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/metadata/search", + "operationId": "searchMetadata", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 1956 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "metadata": [ + { + "identifier": "7ca13c1d-51de-477e-94c8-f9372a8e30e3", + "name_pattern": null, + "type": null + }, + { + "identifier": null, + "name_pattern": null, + "type": "ANSWER" + }, + { + "identifier": "e4cd9bf1-4f77-4762-9035-543b3a00c294", + "name_pattern": "Francene Housbey", + "type": null + } + ], + "permissions": [ + { + "principal": { + "identifier": "046760d3-c0be-47d0-a9e7-a1b37c4e4432", + "type": "USER_GROUP" + }, + "share_mode": "NO_ACCESS" + }, + { + "principal": { + "identifier": "179d8867-cf36-4a8d-a019-63a226fd3196", + "type": "USER_GROUP" + }, + "share_mode": "NO_ACCESS" + } + ], + "favorite_object_options": [ + [ + "user_identifiers", + [ + "0f0dd0f7-7411-4195-a4aa-0dc6b58413c9", + "3b4740ec-3626-4d54-8b7e-ebda45510fb6", + "4391d676-2dd8-4248-b6db-d973811f0122" + ] + ] + ], + "include_auto_created_objects": true, + "include_dependent_objects": true, + "include_details": false, + "include_hidden_objects": false, + "include_visualization_headers": true, + "include_worksheet_search_assist_data": false, + "record_offset": 4, + "record_size": 6, + "tag_identifiers": [ + "2d435d7c-a696-450d-897a-5fd734c17f9a", + "409fc8b1-7960-47a1-b387-7c260c10701d" + ], + "include_stats": true + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/metadata/search", + "operationId": "searchMetadata", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 1957 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "metadata": [ + { + "identifier": "7ca13c1d-51de-477e-94c8-f9372a8e30e3", + "name_pattern": "Inessa Dallimore", + "type": "ANSWER" + }, + { + "identifier": "a7826fd7-cca0-4e75-9c55-9bfbb18b7454", + "name_pattern": null, + "type": null + } + ], + "created_by_user_identifiers": [ + "0f0dd0f7-7411-4195-a4aa-0dc6b58413c9" + ], + "exclude_objects": [ + { + "identifier": "7ca13c1d-51de-477e-94c8-f9372a8e30e3", + "type": "ANSWER" + }, + { + "identifier": "a7826fd7-cca0-4e75-9c55-9bfbb18b7454", + "type": "ANSWER" + } + ], + "favorite_object_options": { + "user_identifiers": [ + "0f0dd0f7-7411-4195-a4aa-0dc6b58413c9" + ] + }, + "include_auto_created_objects": true, + "include_dependent_objects": true, + "include_details": false, + "include_hidden_objects": false, + "include_incomplete_objects": true, + "record_offset": 3, + "record_size": 6, + "sort_options": { + "field_name": "FAVORITES" + }, + "tag_identifiers": "HneMpNQmjuCyCYH" + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/metadata/search", + "operationId": "searchMetadata", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 1958 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "permissions": [ + { + "principal": { + "identifier": "046760d3-c0be-47d0-a9e7-a1b37c4e4432", + "type": "USER_GROUP" + }, + "share_mode": "READ_ONLY" + } + ], + "exclude_objects": [ + { + "identifier": "7ca13c1d-51de-477e-94c8-f9372a8e30e3", + "type": "ANSWER" + }, + { + "identifier": "a7826fd7-cca0-4e75-9c55-9bfbb18b7454", + "type": "ANSWER" + }, + { + "identifier": "e4cd9bf1-4f77-4762-9035-543b3a00c294", + "type": "ANSWER" + } + ], + "favorite_object_options": [ + [ + "include", + true + ], + [ + "user_identifiers", + [ + "0f0dd0f7-7411-4195-a4aa-0dc6b58413c9", + "3b4740ec-3626-4d54-8b7e-ebda45510fb6" + ] + ] + ], + "include_dependent_objects": true, + "include_details": false, + "include_headers": false, + "include_hidden_objects": false, + "include_incomplete_objects": true, + "include_worksheet_search_assist_data": true, + "record_offset": 7, + "record_size": 8, + "sort_options": { + "order": "ASC" + }, + "include_stats": false + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/metadata/search", + "operationId": "searchMetadata", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 1959 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "metadata": [ + { + "identifier": null, + "name_pattern": null, + "type": "ANSWER" + }, + { + "identifier": null, + "name_pattern": null, + "type": null + }, + { + "identifier": "e4cd9bf1-4f77-4762-9035-543b3a00c294", + "name_pattern": "Emelen Snook", + "type": "ANSWER" + } + ], + "created_by_user_identifiers": [ + "0f0dd0f7-7411-4195-a4aa-0dc6b58413c9", + "3b4740ec-3626-4d54-8b7e-ebda45510fb6" + ], + "favorite_object_options": { + "user_identifiers": [ + "0f0dd0f7-7411-4195-a4aa-0dc6b58413c9", + "3b4740ec-3626-4d54-8b7e-ebda45510fb6", + "4391d676-2dd8-4248-b6db-d973811f0122" + ] + }, + "include_details": false, + "include_headers": false, + "include_hidden_objects": false, + "include_incomplete_objects": false, + "record_offset": 3, + "record_size": 5, + "sort_options": { + "field_name": "VIEWS" + } + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/metadata/liveboard/sql", + "operationId": "fetchLiveboardSqlQuery", + "scenario": "positive", + "type": "AUTOMATIC", + "testId": 1960 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "metadata_identifier": "2ff57a24-cf90-485f-8b4b-45fc17474c6f" + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/metadata/liveboard/sql", + "operationId": "fetchLiveboardSqlQuery", + "scenario": "positive", + "type": "AUTOMATIC", + "testId": 1961 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "metadata_identifier": "262abdac-b00f-4f5f-ad33-fcf10154184f" + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/metadata/liveboard/sql", + "operationId": "fetchLiveboardSqlQuery", + "scenario": "positive", + "type": "AUTOMATIC", + "testId": 1962 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "metadata_identifier": "327f4d60-c502-43b0-b1d4-c73df5031a2e" + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/metadata/liveboard/sql", + "operationId": "fetchLiveboardSqlQuery", + "scenario": "positive", + "type": "AUTOMATIC", + "testId": 1963 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "metadata_identifier": "601be8e5-140e-477c-8812-843795306438", + "visualization_identifiers": null + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/metadata/liveboard/sql", + "operationId": "fetchLiveboardSqlQuery", + "scenario": "positive", + "type": "AUTOMATIC", + "testId": 1964 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "metadata_identifier": "061457a2-27bc-43a9-9754-0cd873691bf0", + "visualization_identifiers": null + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/metadata/liveboard/sql", + "operationId": "fetchLiveboardSqlQuery", + "scenario": "positive", + "type": "AUTOMATIC", + "testId": 1965 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "metadata_identifier": "e36ee65e-64be-436b-a29a-22d8998c4fae", + "visualization_identifiers": null + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/metadata/liveboard/sql", + "operationId": "fetchLiveboardSqlQuery", + "scenario": "positive", + "type": "AUTOMATIC", + "testId": 1966 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "metadata_identifier": "c836ad16-660d-4d28-a3a0-e07cb9eb6ab1" + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/metadata/liveboard/sql", + "operationId": "fetchLiveboardSqlQuery", + "scenario": "positive", + "type": "AUTOMATIC", + "testId": 1967 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "metadata_identifier": "9bd202f5-d431-44bf-9a07-b4f7be372125", + "visualization_identifiers": null + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/metadata/liveboard/sql", + "operationId": "fetchLiveboardSqlQuery", + "scenario": "positive", + "type": "AUTOMATIC", + "testId": 1968 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "metadata_identifier": "33248a57-cc70-4e39-9199-fb5092283381", + "visualization_identifiers": null + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/metadata/liveboard/sql", + "operationId": "fetchLiveboardSqlQuery", + "scenario": "positive", + "type": "AUTOMATIC", + "testId": 1969 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "metadata_identifier": "7752fa9e-db22-415e-bf34-e082c4bc41c3" + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/metadata/liveboard/sql", + "operationId": "fetchLiveboardSqlQuery", + "scenario": "positive", + "type": "AUTOMATIC", + "testId": 1970 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "metadata_identifier": "2ff57a24-cf90-485f-8b4b-45fc17474c6f" + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/metadata/liveboard/sql", + "operationId": "fetchLiveboardSqlQuery", + "scenario": "positive", + "type": "AUTOMATIC", + "testId": 1971 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "metadata_identifier": "262abdac-b00f-4f5f-ad33-fcf10154184f", + "visualization_identifiers": null + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/metadata/liveboard/sql", + "operationId": "fetchLiveboardSqlQuery", + "scenario": "positive", + "type": "AUTOMATIC", + "testId": 1972 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "metadata_identifier": "327f4d60-c502-43b0-b1d4-c73df5031a2e" + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/metadata/liveboard/sql", + "operationId": "fetchLiveboardSqlQuery", + "scenario": "positive", + "type": "AUTOMATIC", + "testId": 1973 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "metadata_identifier": "601be8e5-140e-477c-8812-843795306438" + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/metadata/liveboard/sql", + "operationId": "fetchLiveboardSqlQuery", + "scenario": "positive", + "type": "AUTOMATIC", + "testId": 1974 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "metadata_identifier": "061457a2-27bc-43a9-9754-0cd873691bf0", + "visualization_identifiers": null + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/metadata/liveboard/sql", + "operationId": "fetchLiveboardSqlQuery", + "scenario": "positive", + "type": "AUTOMATIC", + "testId": 1975 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "metadata_identifier": "e36ee65e-64be-436b-a29a-22d8998c4fae" + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/metadata/liveboard/sql", + "operationId": "fetchLiveboardSqlQuery", + "scenario": "positive", + "type": "AUTOMATIC", + "testId": 1976 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "metadata_identifier": "c836ad16-660d-4d28-a3a0-e07cb9eb6ab1" + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/metadata/liveboard/sql", + "operationId": "fetchLiveboardSqlQuery", + "scenario": "positive", + "type": "AUTOMATIC", + "testId": 1977 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "metadata_identifier": "9bd202f5-d431-44bf-9a07-b4f7be372125", + "visualization_identifiers": null + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/metadata/liveboard/sql", + "operationId": "fetchLiveboardSqlQuery", + "scenario": "positive", + "type": "AUTOMATIC", + "testId": 1978 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "metadata_identifier": "33248a57-cc70-4e39-9199-fb5092283381" + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/metadata/liveboard/sql", + "operationId": "fetchLiveboardSqlQuery", + "scenario": "positive", + "type": "AUTOMATIC", + "testId": 1979 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "metadata_identifier": "7752fa9e-db22-415e-bf34-e082c4bc41c3", + "visualization_identifiers": null + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/metadata/liveboard/sql", + "operationId": "fetchLiveboardSqlQuery", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 1980 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "metadata_identifier": null, + "visualization_identifiers": null + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/metadata/liveboard/sql", + "operationId": "fetchLiveboardSqlQuery", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 1981 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "metadata_identifier": null + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/metadata/liveboard/sql", + "operationId": "fetchLiveboardSqlQuery", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 1982 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "metadata_identifier": null + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/metadata/liveboard/sql", + "operationId": "fetchLiveboardSqlQuery", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 1983 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "metadata_identifier": null, + "visualization_identifiers": null + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/metadata/liveboard/sql", + "operationId": "fetchLiveboardSqlQuery", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 1984 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "metadata_identifier": null + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/metadata/liveboard/sql", + "operationId": "fetchLiveboardSqlQuery", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 1985 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "metadata_identifier": null + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/metadata/liveboard/sql", + "operationId": "fetchLiveboardSqlQuery", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 1986 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "metadata_identifier": null, + "visualization_identifiers": null + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/metadata/liveboard/sql", + "operationId": "fetchLiveboardSqlQuery", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 1987 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "metadata_identifier": null + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/metadata/liveboard/sql", + "operationId": "fetchLiveboardSqlQuery", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 1988 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "metadata_identifier": null + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/metadata/liveboard/sql", + "operationId": "fetchLiveboardSqlQuery", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 1989 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "metadata_identifier": null + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/metadata/liveboard/sql", + "operationId": "fetchLiveboardSqlQuery", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 1990 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "metadata_identifier": null, + "visualization_identifiers": null + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/metadata/liveboard/sql", + "operationId": "fetchLiveboardSqlQuery", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 1991 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "metadata_identifier": null, + "visualization_identifiers": null + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/metadata/liveboard/sql", + "operationId": "fetchLiveboardSqlQuery", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 1992 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "metadata_identifier": null, + "visualization_identifiers": null + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/metadata/liveboard/sql", + "operationId": "fetchLiveboardSqlQuery", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 1993 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "metadata_identifier": null, + "visualization_identifiers": null + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/metadata/liveboard/sql", + "operationId": "fetchLiveboardSqlQuery", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 1994 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "metadata_identifier": null + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/metadata/liveboard/sql", + "operationId": "fetchLiveboardSqlQuery", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 1995 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "metadata_identifier": [ + "9bd202f5-d431-44bf-9a07-b4f7be372125" + ], + "visualization_identifiers": null + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/metadata/liveboard/sql", + "operationId": "fetchLiveboardSqlQuery", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 1996 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "metadata_identifier": "9bd202f5-d431-44bf-9a07-b4f7be372125", + "visualization_identifiers": null + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/metadata/liveboard/sql", + "operationId": "fetchLiveboardSqlQuery", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 1997 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "metadata_identifier": [ + "327f4d60-c502-43b0-b1d4-c73df5031a2e" + ] + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/metadata/liveboard/sql", + "operationId": "fetchLiveboardSqlQuery", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 1998 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "metadata_identifier": [ + "327f4d60-c502-43b0-b1d4-c73df5031a2e" + ] + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/metadata/liveboard/sql", + "operationId": "fetchLiveboardSqlQuery", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 1999 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "metadata_identifier": [ + "601be8e5-140e-477c-8812-843795306438" + ] + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/metadata/liveboard/sql", + "operationId": "fetchLiveboardSqlQuery", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 2000 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "metadata_identifier": "601be8e5-140e-477c-8812-843795306438", + "visualization_identifiers": null + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/metadata/liveboard/sql", + "operationId": "fetchLiveboardSqlQuery", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 2001 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "metadata_identifier": "601be8e5-140e-477c-8812-843795306438", + "visualization_identifiers": null + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/metadata/liveboard/sql", + "operationId": "fetchLiveboardSqlQuery", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 2002 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "metadata_identifier": [ + "601be8e5-140e-477c-8812-843795306438" + ] + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/metadata/liveboard/sql", + "operationId": "fetchLiveboardSqlQuery", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 2003 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "metadata_identifier": [ + "601be8e5-140e-477c-8812-843795306438" + ] + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/metadata/liveboard/sql", + "operationId": "fetchLiveboardSqlQuery", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 2004 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "metadata_identifier": [ + "2ff57a24-cf90-485f-8b4b-45fc17474c6f" + ] + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/metadata/liveboard/sql", + "operationId": "fetchLiveboardSqlQuery", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 2005 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "metadata_identifier": [ + "c836ad16-660d-4d28-a3a0-e07cb9eb6ab1" + ] + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/metadata/liveboard/sql", + "operationId": "fetchLiveboardSqlQuery", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 2006 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "metadata_identifier": [ + "327f4d60-c502-43b0-b1d4-c73df5031a2e" + ] + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/metadata/liveboard/sql", + "operationId": "fetchLiveboardSqlQuery", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 2007 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "metadata_identifier": [ + "e36ee65e-64be-436b-a29a-22d8998c4fae" + ] + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/metadata/liveboard/sql", + "operationId": "fetchLiveboardSqlQuery", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 2008 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "metadata_identifier": "061457a2-27bc-43a9-9754-0cd873691bf0", + "visualization_identifiers": null + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/metadata/liveboard/sql", + "operationId": "fetchLiveboardSqlQuery", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 2009 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "metadata_identifier": [ + "262abdac-b00f-4f5f-ad33-fcf10154184f" + ] + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/metadata/liveboard/sql", + "operationId": "fetchLiveboardSqlQuery", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 2010 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "metadata_identifier": "CCvSQalcrLXmMVm" + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/metadata/liveboard/sql", + "operationId": "fetchLiveboardSqlQuery", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 2011 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "metadata_identifier": "BwAnyhqDAApixwk" + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/metadata/liveboard/sql", + "operationId": "fetchLiveboardSqlQuery", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 2012 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "metadata_identifier": "UuydaTQRhKZYjHZ", + "visualization_identifiers": null + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/metadata/liveboard/sql", + "operationId": "fetchLiveboardSqlQuery", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 2013 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "metadata_identifier": "bksLNjGPOpKQbfO" + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/metadata/liveboard/sql", + "operationId": "fetchLiveboardSqlQuery", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 2014 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "metadata_identifier": "kZDyWSAPptscLnr", + "visualization_identifiers": null + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/metadata/liveboard/sql", + "operationId": "fetchLiveboardSqlQuery", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 2015 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "metadata_identifier": "wAatLiOfVUuJXMz" + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/metadata/liveboard/sql", + "operationId": "fetchLiveboardSqlQuery", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 2016 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "metadata_identifier": "lRmwIdHHPnjdlRY", + "visualization_identifiers": null + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/metadata/liveboard/sql", + "operationId": "fetchLiveboardSqlQuery", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 2017 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "metadata_identifier": "GCtXeHzhAZLmfhD", + "visualization_identifiers": null + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/metadata/liveboard/sql", + "operationId": "fetchLiveboardSqlQuery", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 2018 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "metadata_identifier": "PAYVXtWtctawCYJ", + "visualization_identifiers": null + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/metadata/liveboard/sql", + "operationId": "fetchLiveboardSqlQuery", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 2019 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "metadata_identifier": "fySrhPmhlnnuNFW" + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/metadata/liveboard/sql", + "operationId": "fetchLiveboardSqlQuery", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 2020 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "metadata_identifier": "fBgItWwcTarZAej" + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/metadata/liveboard/sql", + "operationId": "fetchLiveboardSqlQuery", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 2021 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "metadata_identifier": "GEgrSHJlYopCfwG", + "visualization_identifiers": null + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/metadata/liveboard/sql", + "operationId": "fetchLiveboardSqlQuery", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 2022 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "metadata_identifier": "oZBypTdMqBTImKX", + "visualization_identifiers": null + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/metadata/liveboard/sql", + "operationId": "fetchLiveboardSqlQuery", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 2023 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "metadata_identifier": "SerZUWJSJNFWcIL" + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/metadata/liveboard/sql", + "operationId": "fetchLiveboardSqlQuery", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 2024 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "metadata_identifier": "LbCTUgEdVIoCYBE" + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/metadata/answer/sql", + "operationId": "fetchAnswerSqlQuery", + "scenario": "positive", + "type": "AUTOMATIC", + "testId": 2025 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "metadata_identifier": "7ca13c1d-51de-477e-94c8-f9372a8e30e3" + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/metadata/answer/sql", + "operationId": "fetchAnswerSqlQuery", + "scenario": "positive", + "type": "AUTOMATIC", + "testId": 2026 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "metadata_identifier": "a7826fd7-cca0-4e75-9c55-9bfbb18b7454" + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/metadata/answer/sql", + "operationId": "fetchAnswerSqlQuery", + "scenario": "positive", + "type": "AUTOMATIC", + "testId": 2027 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "metadata_identifier": "e4cd9bf1-4f77-4762-9035-543b3a00c294" + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/metadata/answer/sql", + "operationId": "fetchAnswerSqlQuery", + "scenario": "positive", + "type": "AUTOMATIC", + "testId": 2028 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "metadata_identifier": "21f35c49-c1f8-4f3d-a124-a0fbe5c978aa" + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/metadata/answer/sql", + "operationId": "fetchAnswerSqlQuery", + "scenario": "positive", + "type": "AUTOMATIC", + "testId": 2029 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "metadata_identifier": "73df2632-37ec-4e64-9f9c-c53e5efe2432" + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/metadata/answer/sql", + "operationId": "fetchAnswerSqlQuery", + "scenario": "positive", + "type": "AUTOMATIC", + "testId": 2030 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "metadata_identifier": "1be3019c-aa6e-47cf-a79e-3b7de02f25b4" + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/metadata/answer/sql", + "operationId": "fetchAnswerSqlQuery", + "scenario": "positive", + "type": "AUTOMATIC", + "testId": 2031 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "metadata_identifier": "47294d3a-5dc4-44d3-bee5-7a586c606ed8" + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/metadata/answer/sql", + "operationId": "fetchAnswerSqlQuery", + "scenario": "positive", + "type": "AUTOMATIC", + "testId": 2032 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "metadata_identifier": "48d27aee-59c3-4a0c-8d2c-5a8989c55bb1" + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/metadata/answer/sql", + "operationId": "fetchAnswerSqlQuery", + "scenario": "positive", + "type": "AUTOMATIC", + "testId": 2033 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "metadata_identifier": "d343362c-0b26-41d4-bade-403c87b62ef3" + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/metadata/answer/sql", + "operationId": "fetchAnswerSqlQuery", + "scenario": "positive", + "type": "AUTOMATIC", + "testId": 2034 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "metadata_identifier": "10a69d10-e455-4473-b1c6-de1da8cc1ad5" + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/metadata/answer/sql", + "operationId": "fetchAnswerSqlQuery", + "scenario": "positive", + "type": "AUTOMATIC", + "testId": 2035 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "metadata_identifier": "7ca13c1d-51de-477e-94c8-f9372a8e30e3" + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/metadata/answer/sql", + "operationId": "fetchAnswerSqlQuery", + "scenario": "positive", + "type": "AUTOMATIC", + "testId": 2036 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "metadata_identifier": "a7826fd7-cca0-4e75-9c55-9bfbb18b7454" + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/metadata/answer/sql", + "operationId": "fetchAnswerSqlQuery", + "scenario": "positive", + "type": "AUTOMATIC", + "testId": 2037 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "metadata_identifier": "e4cd9bf1-4f77-4762-9035-543b3a00c294" + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/metadata/answer/sql", + "operationId": "fetchAnswerSqlQuery", + "scenario": "positive", + "type": "AUTOMATIC", + "testId": 2038 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "metadata_identifier": "21f35c49-c1f8-4f3d-a124-a0fbe5c978aa" + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/metadata/answer/sql", + "operationId": "fetchAnswerSqlQuery", + "scenario": "positive", + "type": "AUTOMATIC", + "testId": 2039 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "metadata_identifier": "73df2632-37ec-4e64-9f9c-c53e5efe2432" + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/metadata/answer/sql", + "operationId": "fetchAnswerSqlQuery", + "scenario": "positive", + "type": "AUTOMATIC", + "testId": 2040 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "metadata_identifier": "1be3019c-aa6e-47cf-a79e-3b7de02f25b4" + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/metadata/answer/sql", + "operationId": "fetchAnswerSqlQuery", + "scenario": "positive", + "type": "AUTOMATIC", + "testId": 2041 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "metadata_identifier": "47294d3a-5dc4-44d3-bee5-7a586c606ed8" + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/metadata/answer/sql", + "operationId": "fetchAnswerSqlQuery", + "scenario": "positive", + "type": "AUTOMATIC", + "testId": 2042 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "metadata_identifier": "48d27aee-59c3-4a0c-8d2c-5a8989c55bb1" + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/metadata/answer/sql", + "operationId": "fetchAnswerSqlQuery", + "scenario": "positive", + "type": "AUTOMATIC", + "testId": 2043 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "metadata_identifier": "d343362c-0b26-41d4-bade-403c87b62ef3" + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/metadata/answer/sql", + "operationId": "fetchAnswerSqlQuery", + "scenario": "positive", + "type": "AUTOMATIC", + "testId": 2044 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "metadata_identifier": "10a69d10-e455-4473-b1c6-de1da8cc1ad5" + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/metadata/answer/sql", + "operationId": "fetchAnswerSqlQuery", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 2045 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "metadata_identifier": null + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/metadata/answer/sql", + "operationId": "fetchAnswerSqlQuery", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 2046 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "metadata_identifier": null + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/metadata/answer/sql", + "operationId": "fetchAnswerSqlQuery", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 2047 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "metadata_identifier": null + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/metadata/answer/sql", + "operationId": "fetchAnswerSqlQuery", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 2048 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "metadata_identifier": null + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/metadata/answer/sql", + "operationId": "fetchAnswerSqlQuery", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 2049 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "metadata_identifier": null + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/metadata/answer/sql", + "operationId": "fetchAnswerSqlQuery", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 2050 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "metadata_identifier": null + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/metadata/answer/sql", + "operationId": "fetchAnswerSqlQuery", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 2051 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "metadata_identifier": null + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/metadata/answer/sql", + "operationId": "fetchAnswerSqlQuery", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 2052 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "metadata_identifier": null + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/metadata/answer/sql", + "operationId": "fetchAnswerSqlQuery", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 2053 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "metadata_identifier": null + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/metadata/answer/sql", + "operationId": "fetchAnswerSqlQuery", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 2054 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "metadata_identifier": null + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/metadata/answer/sql", + "operationId": "fetchAnswerSqlQuery", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 2055 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "metadata_identifier": null + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/metadata/answer/sql", + "operationId": "fetchAnswerSqlQuery", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 2056 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "metadata_identifier": null + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/metadata/answer/sql", + "operationId": "fetchAnswerSqlQuery", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 2057 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "metadata_identifier": null + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/metadata/answer/sql", + "operationId": "fetchAnswerSqlQuery", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 2058 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "metadata_identifier": null + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/metadata/answer/sql", + "operationId": "fetchAnswerSqlQuery", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 2059 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "metadata_identifier": null + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/metadata/answer/sql", + "operationId": "fetchAnswerSqlQuery", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 2060 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "metadata_identifier": [ + "a7826fd7-cca0-4e75-9c55-9bfbb18b7454" + ] + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/metadata/answer/sql", + "operationId": "fetchAnswerSqlQuery", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 2061 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "metadata_identifier": [ + "21f35c49-c1f8-4f3d-a124-a0fbe5c978aa" + ] + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/metadata/answer/sql", + "operationId": "fetchAnswerSqlQuery", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 2062 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "metadata_identifier": [ + "e4cd9bf1-4f77-4762-9035-543b3a00c294" + ] + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/metadata/answer/sql", + "operationId": "fetchAnswerSqlQuery", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 2063 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "metadata_identifier": [ + "e4cd9bf1-4f77-4762-9035-543b3a00c294" + ] + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/metadata/answer/sql", + "operationId": "fetchAnswerSqlQuery", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 2064 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "metadata_identifier": [ + "47294d3a-5dc4-44d3-bee5-7a586c606ed8" + ] + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/metadata/answer/sql", + "operationId": "fetchAnswerSqlQuery", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 2065 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "metadata_identifier": [ + "47294d3a-5dc4-44d3-bee5-7a586c606ed8" + ] + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/metadata/answer/sql", + "operationId": "fetchAnswerSqlQuery", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 2066 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "metadata_identifier": [ + "d343362c-0b26-41d4-bade-403c87b62ef3" + ] + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/metadata/answer/sql", + "operationId": "fetchAnswerSqlQuery", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 2067 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "metadata_identifier": [ + "7ca13c1d-51de-477e-94c8-f9372a8e30e3" + ] + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/metadata/answer/sql", + "operationId": "fetchAnswerSqlQuery", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 2068 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "metadata_identifier": [ + "1be3019c-aa6e-47cf-a79e-3b7de02f25b4" + ] + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/metadata/answer/sql", + "operationId": "fetchAnswerSqlQuery", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 2069 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "metadata_identifier": [ + "e4cd9bf1-4f77-4762-9035-543b3a00c294" + ] + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/metadata/answer/sql", + "operationId": "fetchAnswerSqlQuery", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 2070 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "metadata_identifier": [ + "48d27aee-59c3-4a0c-8d2c-5a8989c55bb1" + ] + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/metadata/answer/sql", + "operationId": "fetchAnswerSqlQuery", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 2071 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "metadata_identifier": [ + "7ca13c1d-51de-477e-94c8-f9372a8e30e3" + ] + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/metadata/answer/sql", + "operationId": "fetchAnswerSqlQuery", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 2072 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "metadata_identifier": [ + "21f35c49-c1f8-4f3d-a124-a0fbe5c978aa" + ] + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/metadata/answer/sql", + "operationId": "fetchAnswerSqlQuery", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 2073 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "metadata_identifier": [ + "a7826fd7-cca0-4e75-9c55-9bfbb18b7454" + ] + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/metadata/answer/sql", + "operationId": "fetchAnswerSqlQuery", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 2074 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "metadata_identifier": [ + "1be3019c-aa6e-47cf-a79e-3b7de02f25b4" + ] + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/metadata/answer/sql", + "operationId": "fetchAnswerSqlQuery", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 2075 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "metadata_identifier": "efsOjcExjmjTjki" + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/metadata/answer/sql", + "operationId": "fetchAnswerSqlQuery", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 2076 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "metadata_identifier": "ALgiLKqDmNBlhjK" + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/metadata/answer/sql", + "operationId": "fetchAnswerSqlQuery", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 2077 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "metadata_identifier": "ndabOrhrEjWGItE" + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/metadata/answer/sql", + "operationId": "fetchAnswerSqlQuery", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 2078 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "metadata_identifier": "baFFIWFurDVLHUy" + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/metadata/answer/sql", + "operationId": "fetchAnswerSqlQuery", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 2079 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "metadata_identifier": "gmQGtqwsbqRVJHZ" + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/metadata/answer/sql", + "operationId": "fetchAnswerSqlQuery", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 2080 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "metadata_identifier": "arsLvWPmJzqoHTh" + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/metadata/answer/sql", + "operationId": "fetchAnswerSqlQuery", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 2081 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "metadata_identifier": "EyIvsEERlVDbCka" + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/metadata/answer/sql", + "operationId": "fetchAnswerSqlQuery", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 2082 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "metadata_identifier": "OrjhhKXzKtaIDNE" + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/metadata/answer/sql", + "operationId": "fetchAnswerSqlQuery", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 2083 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "metadata_identifier": "NQVLZSHWJbXEYAZ" + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/metadata/answer/sql", + "operationId": "fetchAnswerSqlQuery", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 2084 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "metadata_identifier": "rJyrcRzACugocdW" + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/metadata/answer/sql", + "operationId": "fetchAnswerSqlQuery", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 2085 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "metadata_identifier": "PouRHTyTFOLlfIa" + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/metadata/answer/sql", + "operationId": "fetchAnswerSqlQuery", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 2086 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "metadata_identifier": "cWbbthrpkIhMcYD" + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/metadata/answer/sql", + "operationId": "fetchAnswerSqlQuery", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 2087 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "metadata_identifier": "hturKWvJwtKnTMa" + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/metadata/answer/sql", + "operationId": "fetchAnswerSqlQuery", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 2088 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "metadata_identifier": "jLYqEsQFkzBHQpo" + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/metadata/answer/sql", + "operationId": "fetchAnswerSqlQuery", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 2089 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "metadata_identifier": "UscxRYaOCoEriRt" + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/roles/create", + "operationId": "createRole", + "scenario": "positive", + "type": "AUTOMATIC", + "testId": 2090 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "name": "Universal1688027296774", + "privileges": [ + "SYSTEM_INFO_ADMINISTRATION", + "BILLING_INFO_ADMINISTRATION" + ] + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/roles/create", + "operationId": "createRole", + "scenario": "positive", + "type": "AUTOMATIC", + "testId": 2091 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "name": "non-volatile1688027296781", + "privileges": [ + "SYSTEM_INFO_ADMINISTRATION", + "USER_ADMINISTRATION", + "AUTHENTICATION_ADMINISTRATION" + ] + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/roles/create", + "operationId": "createRole", + "scenario": "positive", + "type": "AUTOMATIC", + "testId": 2092 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "name": "hub1688027296783" + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/roles/create", + "operationId": "createRole", + "scenario": "positive", + "type": "AUTOMATIC", + "testId": 2093 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "name": "Open-source1688027296784" + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/roles/create", + "operationId": "createRole", + "scenario": "positive", + "type": "AUTOMATIC", + "testId": 2094 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "name": "challenge1688027296784", + "description": "sit amet", + "privileges": [ + "GROUP_ADMINISTRATION" + ] + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/roles/create", + "operationId": "createRole", + "scenario": "positive", + "type": "AUTOMATIC", + "testId": 2095 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "name": "Up-sized1688027296785", + "privileges": [ + "JOBSCHEDULING", + "A3ANALYSIS" + ] + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/roles/create", + "operationId": "createRole", + "scenario": "positive", + "type": "AUTOMATIC", + "testId": 2096 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "name": "Optional1688027296787", + "description": "diam", + "privileges": [ + "BYPASSRLS", + "SYSTEM_INFO_ADMINISTRATION" + ] + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/roles/create", + "operationId": "createRole", + "scenario": "positive", + "type": "AUTOMATIC", + "testId": 2097 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "name": "cohesive1688027296788" + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/roles/create", + "operationId": "createRole", + "scenario": "positive", + "type": "AUTOMATIC", + "testId": 2098 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "name": "focus group1688027296789" + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/roles/create", + "operationId": "createRole", + "scenario": "positive", + "type": "AUTOMATIC", + "testId": 2099 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "name": "standardization1688027296789", + "description": "dolor vel est donec odio", + "privileges": [ + "AUTHENTICATION_ADMINISTRATION", + "DISABLE_PINBOARD_CREATION" + ] + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/roles/create", + "operationId": "createRole", + "scenario": "positive", + "type": "AUTOMATIC", + "testId": 2100 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "name": "adapter1688027296790", + "privileges": [ + "EXPERIMENTALFEATUREPRIVILEGE" + ] + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/roles/create", + "operationId": "createRole", + "scenario": "positive", + "type": "AUTOMATIC", + "testId": 2101 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "name": "real-time1688027296791", + "description": "scelerisque mauris sit", + "privileges": [ + "GROUP_ADMINISTRATION", + "ORG_ADMINISTRATION" + ] + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/roles/create", + "operationId": "createRole", + "scenario": "positive", + "type": "AUTOMATIC", + "testId": 2102 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "name": "support1688027296792", + "privileges": [ + "GROUP_ADMINISTRATION" + ] + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/roles/create", + "operationId": "createRole", + "scenario": "positive", + "type": "AUTOMATIC", + "testId": 2103 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "name": "regional1688027296793", + "description": "nisl nunc rhoncus dui" + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/roles/create", + "operationId": "createRole", + "scenario": "positive", + "type": "AUTOMATIC", + "testId": 2104 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "name": "well-modulated1688027296793", + "privileges": [ + "DATAMANAGEMENT" + ] + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/roles/create", + "operationId": "createRole", + "scenario": "positive", + "type": "AUTOMATIC", + "testId": 2105 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "name": "Multi-channelled1688027296794", + "description": "orci vehicula condimentum", + "privileges": [ + "JOBSCHEDULING", + "DATAMANAGEMENT" + ] + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/roles/create", + "operationId": "createRole", + "scenario": "positive", + "type": "AUTOMATIC", + "testId": 2106 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "name": "contextually-based1688027296795", + "description": "magna bibendum imperdiet", + "privileges": [ + "ROLE_ADMINISTRATION" + ] + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/roles/create", + "operationId": "createRole", + "scenario": "positive", + "type": "AUTOMATIC", + "testId": 2107 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "name": "Secured1688027296796" + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/roles/create", + "operationId": "createRole", + "scenario": "positive", + "type": "AUTOMATIC", + "testId": 2108 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "name": "complexity1688027296797", + "privileges": [ + "BILLING_INFO_ADMINISTRATION", + "DISABLE_PINBOARD_CREATION", + "APPLICATION_ADMINISTRATION" + ] + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/roles/create", + "operationId": "createRole", + "scenario": "positive", + "type": "AUTOMATIC", + "testId": 2109 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "name": "Re-contextualized1688027296798", + "description": "nulla ultrices", + "privileges": [ + "A3ANALYSIS" + ] + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/roles/create", + "operationId": "createRole", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 2110 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "name": null, + "description": "sit amet", + "privileges": [ + "GROUP_ADMINISTRATION" + ] + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/roles/create", + "operationId": "createRole", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 2111 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "name": null + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/roles/create", + "operationId": "createRole", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 2112 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "name": null, + "description": "magna bibendum imperdiet", + "privileges": [ + "ROLE_ADMINISTRATION" + ] + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/roles/create", + "operationId": "createRole", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 2113 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "name": null, + "privileges": [ + "GROUP_ADMINISTRATION" + ] + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/roles/create", + "operationId": "createRole", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 2114 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "name": null, + "privileges": [ + "SYSTEM_INFO_ADMINISTRATION", + "USER_ADMINISTRATION", + "AUTHENTICATION_ADMINISTRATION" + ] + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/roles/create", + "operationId": "createRole", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 2115 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "name": null, + "privileges": [ + "JOBSCHEDULING", + "A3ANALYSIS" + ] + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/roles/create", + "operationId": "createRole", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 2116 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "name": null, + "privileges": [ + "BILLING_INFO_ADMINISTRATION", + "DISABLE_PINBOARD_CREATION", + "APPLICATION_ADMINISTRATION" + ] + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/roles/create", + "operationId": "createRole", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 2117 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "name": null, + "description": "sit amet", + "privileges": [ + "GROUP_ADMINISTRATION" + ] + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/roles/create", + "operationId": "createRole", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 2118 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "name": null, + "privileges": [ + "SYSTEM_INFO_ADMINISTRATION", + "USER_ADMINISTRATION", + "AUTHENTICATION_ADMINISTRATION" + ] + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/roles/create", + "operationId": "createRole", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 2119 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "name": null + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/roles/create", + "operationId": "createRole", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 2120 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "name": null, + "description": "dolor vel est donec odio", + "privileges": [ + "AUTHENTICATION_ADMINISTRATION", + "DISABLE_PINBOARD_CREATION" + ] + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/roles/create", + "operationId": "createRole", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 2121 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "name": null + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/roles/create", + "operationId": "createRole", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 2122 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "name": null, + "privileges": [ + "SYSTEM_INFO_ADMINISTRATION", + "BILLING_INFO_ADMINISTRATION" + ] + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/roles/create", + "operationId": "createRole", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 2123 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "name": null, + "description": "nulla ultrices", + "privileges": [ + "A3ANALYSIS" + ] + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/roles/create", + "operationId": "createRole", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 2124 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "name": null + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/roles/create", + "operationId": "createRole", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 2125 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "name": [ + "non-volatile1688027296781" + ], + "privileges": [ + "SYSTEM_INFO_ADMINISTRATION", + "USER_ADMINISTRATION", + "AUTHENTICATION_ADMINISTRATION" + ] + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/roles/create", + "operationId": "createRole", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 2126 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "name": "regional1688027296793", + "description": [ + "nisl", + "nunc", + "rhoncus", + "dui" + ] + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/roles/create", + "operationId": "createRole", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 2127 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "name": [ + "hub1688027296783" + ] + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/roles/create", + "operationId": "createRole", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 2128 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "name": "well-modulated1688027296793", + "privileges": "ltiAiAQeYfHxVrP" + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/roles/create", + "operationId": "createRole", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 2129 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "name": [ + "standardization1688027296789" + ], + "description": "dolor vel est donec odio", + "privileges": [ + "AUTHENTICATION_ADMINISTRATION", + "DISABLE_PINBOARD_CREATION" + ] + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/roles/create", + "operationId": "createRole", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 2130 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "name": "challenge1688027296784", + "description": "sit amet", + "privileges": "WkvbgFDQEuTsBQH" + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/roles/create", + "operationId": "createRole", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 2131 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "name": "Optional1688027296787", + "description": [ + "diam" + ], + "privileges": [ + "BYPASSRLS", + "SYSTEM_INFO_ADMINISTRATION" + ] + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/roles/create", + "operationId": "createRole", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 2132 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "name": "Universal1688027296774", + "privileges": "qfWKzCNffHGABIi" + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/roles/create", + "operationId": "createRole", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 2133 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "name": [ + "Optional1688027296787" + ], + "description": "diam", + "privileges": [ + "BYPASSRLS", + "SYSTEM_INFO_ADMINISTRATION" + ] + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/roles/create", + "operationId": "createRole", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 2134 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "name": "Universal1688027296774", + "privileges": "whWLtqsTdhTWbqP" + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/roles/create", + "operationId": "createRole", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 2135 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "name": "Universal1688027296774", + "privileges": "BFJgdXGuRkswqey" + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/roles/create", + "operationId": "createRole", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 2136 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "name": "contextually-based1688027296795", + "description": "magna bibendum imperdiet", + "privileges": "nlTLiBZBGExAvZA" + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/roles/create", + "operationId": "createRole", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 2137 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "name": "Optional1688027296787", + "description": "diam", + "privileges": "wnZOjEpcFpcxcPJ" + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/roles/create", + "operationId": "createRole", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 2138 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "name": "adapter1688027296790", + "privileges": "HxtayUoYqbXLuPF" + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/roles/create", + "operationId": "createRole", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 2139 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "name": "real-time1688027296791", + "description": [ + "scelerisque", + "mauris", + "sit" + ], + "privileges": [ + "GROUP_ADMINISTRATION", + "ORG_ADMINISTRATION" + ] + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/roles/{role_identifier}/update", + "operationId": "updateRole", + "scenario": "positive", + "type": "AUTOMATIC", + "testId": 2140 + }, + "Path_Variables": { + "role_identifier": "Universal1688027296774" + }, + "Query_Variables": {}, + "Body": { + "name": "Synchronised1688027298048" + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/roles/{role_identifier}/update", + "operationId": "updateRole", + "scenario": "positive", + "type": "AUTOMATIC", + "testId": 2141 + }, + "Path_Variables": { + "role_identifier": "non-volatile1688027296781" + }, + "Query_Variables": {}, + "Body": { + "name": "info-mediaries1688027298055", + "description": "eu interdum eu tincidunt in", + "privileges": [ + "AUTHENTICATION_ADMINISTRATION" + ] + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/roles/{role_identifier}/update", + "operationId": "updateRole", + "scenario": "positive", + "type": "AUTOMATIC", + "testId": 2142 + }, + "Path_Variables": { + "role_identifier": "hub1688027296783" + }, + "Query_Variables": {}, + "Body": { + "name": "Robust1688027298057", + "privileges": [ + "GROUP_ADMINISTRATION" + ] + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/roles/{role_identifier}/update", + "operationId": "updateRole", + "scenario": "positive", + "type": "AUTOMATIC", + "testId": 2143 + }, + "Path_Variables": { + "role_identifier": "Open-source1688027296784" + }, + "Query_Variables": {}, + "Body": { + "name": "Automated1688027298059" + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/roles/{role_identifier}/update", + "operationId": "updateRole", + "scenario": "positive", + "type": "AUTOMATIC", + "testId": 2144 + }, + "Path_Variables": { + "role_identifier": "challenge1688027296784" + }, + "Query_Variables": {}, + "Body": { + "name": "capacity1688027298060" + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/roles/{role_identifier}/update", + "operationId": "updateRole", + "scenario": "positive", + "type": "AUTOMATIC", + "testId": 2145 + }, + "Path_Variables": { + "role_identifier": "Up-sized1688027296785" + }, + "Query_Variables": {}, + "Body": { + "name": "portal1688027298061", + "privileges": [ + "BILLING_INFO_ADMINISTRATION" + ] + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/roles/{role_identifier}/update", + "operationId": "updateRole", + "scenario": "positive", + "type": "AUTOMATIC", + "testId": 2146 + }, + "Path_Variables": { + "role_identifier": "Optional1688027296787" + }, + "Query_Variables": {}, + "Body": { + "name": "Programmable1688027298062", + "privileges": [ + "JOBSCHEDULING", + "AUTHENTICATION_ADMINISTRATION" + ] + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/roles/{role_identifier}/update", + "operationId": "updateRole", + "scenario": "positive", + "type": "AUTOMATIC", + "testId": 2147 + }, + "Path_Variables": { + "role_identifier": "cohesive1688027296788" + }, + "Query_Variables": {}, + "Body": { + "name": "Cross-group1688027298063", + "description": "nullam varius nulla facilisi cras", + "privileges": [ + "JOBSCHEDULING", + "USERDATAUPLOADING" + ] + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/roles/{role_identifier}/update", + "operationId": "updateRole", + "scenario": "positive", + "type": "AUTOMATIC", + "testId": 2148 + }, + "Path_Variables": { + "role_identifier": "focus group1688027296789" + }, + "Query_Variables": {}, + "Body": { + "name": "Operative1688027298065", + "description": "dis parturient", + "privileges": [ + "DEVELOPER", + "SYSTEM_INFO_ADMINISTRATION", + "JOBSCHEDULING" + ] + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/roles/{role_identifier}/update", + "operationId": "updateRole", + "scenario": "positive", + "type": "AUTOMATIC", + "testId": 2149 + }, + "Path_Variables": { + "role_identifier": "standardization1688027296789" + }, + "Query_Variables": {}, + "Body": { + "name": "client-server1688027298066", + "description": "curabitur" + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/roles/{role_identifier}/update", + "operationId": "updateRole", + "scenario": "positive", + "type": "AUTOMATIC", + "testId": 2150 + }, + "Path_Variables": { + "role_identifier": "adapter1688027296790" + }, + "Query_Variables": {}, + "Body": { + "name": "archive1688027298067", + "privileges": [ + "USERDATAUPLOADING" + ] + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/roles/{role_identifier}/update", + "operationId": "updateRole", + "scenario": "positive", + "type": "AUTOMATIC", + "testId": 2151 + }, + "Path_Variables": { + "role_identifier": "real-time1688027296791" + }, + "Query_Variables": {}, + "Body": { + "name": "Intuitive1688027298068" + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/roles/{role_identifier}/update", + "operationId": "updateRole", + "scenario": "positive", + "type": "AUTOMATIC", + "testId": 2152 + }, + "Path_Variables": { + "role_identifier": "support1688027296792" + }, + "Query_Variables": {}, + "Body": { + "name": "analyzing1688027298069", + "description": "nunc rhoncus dui", + "privileges": [ + "DEVELOPER" + ] + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/roles/{role_identifier}/update", + "operationId": "updateRole", + "scenario": "positive", + "type": "AUTOMATIC", + "testId": 2153 + }, + "Path_Variables": { + "role_identifier": "regional1688027296793" + }, + "Query_Variables": {}, + "Body": { + "name": "Reactive1688027298071", + "description": "sapien cursus vestibulum proin eu" + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/roles/{role_identifier}/update", + "operationId": "updateRole", + "scenario": "positive", + "type": "AUTOMATIC", + "testId": 2154 + }, + "Path_Variables": { + "role_identifier": "well-modulated1688027296793" + }, + "Query_Variables": {}, + "Body": { + "name": "directional1688027298071", + "description": "eget vulputate", + "privileges": [ + "USER_ADMINISTRATION", + "SYNCMANAGEMENT", + "BYPASSRLS" + ] + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/roles/{role_identifier}/update", + "operationId": "updateRole", + "scenario": "positive", + "type": "AUTOMATIC", + "testId": 2155 + }, + "Path_Variables": { + "role_identifier": "Multi-channelled1688027296794" + }, + "Query_Variables": {}, + "Body": { + "name": "matrices1688027298072", + "description": "ultrices posuere cubilia curae" + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/roles/{role_identifier}/update", + "operationId": "updateRole", + "scenario": "positive", + "type": "AUTOMATIC", + "testId": 2156 + }, + "Path_Variables": { + "role_identifier": "contextually-based1688027296795" + }, + "Query_Variables": {}, + "Body": { + "name": "mobile1688027298073", + "privileges": [ + "DATADOWNLOADING", + "A3ANALYSIS" + ] + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/roles/{role_identifier}/update", + "operationId": "updateRole", + "scenario": "positive", + "type": "AUTOMATIC", + "testId": 2157 + }, + "Path_Variables": { + "role_identifier": "Secured1688027296796" + }, + "Query_Variables": {}, + "Body": { + "name": "Object-based1688027298074", + "description": "elementum" + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/roles/{role_identifier}/update", + "operationId": "updateRole", + "scenario": "positive", + "type": "AUTOMATIC", + "testId": 2158 + }, + "Path_Variables": { + "role_identifier": "complexity1688027296797" + }, + "Query_Variables": {}, + "Body": { + "name": "Expanded1688027298074", + "privileges": [ + "GROUP_ADMINISTRATION" + ] + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/roles/{role_identifier}/update", + "operationId": "updateRole", + "scenario": "positive", + "type": "AUTOMATIC", + "testId": 2159 + }, + "Path_Variables": { + "role_identifier": "Re-contextualized1688027296798" + }, + "Query_Variables": {}, + "Body": { + "name": "encryption1688027298075", + "privileges": [ + "JOBSCHEDULING" + ] + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/roles/{role_identifier}/update", + "operationId": "updateRole", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 2160 + }, + "Path_Variables": { + "role_identifier": "non-volatile1688027296781" + }, + "Query_Variables": {}, + "Body": { + "name": null, + "description": "eu interdum eu tincidunt in", + "privileges": [ + "AUTHENTICATION_ADMINISTRATION" + ] + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/roles/{role_identifier}/update", + "operationId": "updateRole", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 2161 + }, + "Path_Variables": { + "role_identifier": null + }, + "Query_Variables": {}, + "Body": { + "name": "Robust1688027298057", + "privileges": [ + "GROUP_ADMINISTRATION" + ] + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/roles/{role_identifier}/update", + "operationId": "updateRole", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 2162 + }, + "Path_Variables": { + "role_identifier": null + }, + "Query_Variables": {}, + "Body": { + "name": "Operative1688027298065", + "description": "dis parturient", + "privileges": [ + "DEVELOPER", + "SYSTEM_INFO_ADMINISTRATION", + "JOBSCHEDULING" + ] + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/roles/{role_identifier}/update", + "operationId": "updateRole", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 2163 + }, + "Path_Variables": { + "role_identifier": "adapter1688027296790" + }, + "Query_Variables": {}, + "Body": { + "name": null, + "privileges": [ + "USERDATAUPLOADING" + ] + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/roles/{role_identifier}/update", + "operationId": "updateRole", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 2164 + }, + "Path_Variables": { + "role_identifier": null + }, + "Query_Variables": {}, + "Body": { + "name": "Cross-group1688027298063", + "description": "nullam varius nulla facilisi cras", + "privileges": [ + "JOBSCHEDULING", + "USERDATAUPLOADING" + ] + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/roles/{role_identifier}/update", + "operationId": "updateRole", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 2165 + }, + "Path_Variables": { + "role_identifier": null + }, + "Query_Variables": {}, + "Body": { + "name": "Robust1688027298057", + "privileges": [ + "GROUP_ADMINISTRATION" + ] + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/roles/{role_identifier}/update", + "operationId": "updateRole", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 2166 + }, + "Path_Variables": { + "role_identifier": "regional1688027296793" + }, + "Query_Variables": {}, + "Body": { + "name": null, + "description": "sapien cursus vestibulum proin eu" + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/roles/{role_identifier}/update", + "operationId": "updateRole", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 2167 + }, + "Path_Variables": { + "role_identifier": "regional1688027296793" + }, + "Query_Variables": {}, + "Body": { + "name": null, + "description": "sapien cursus vestibulum proin eu" + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/roles/{role_identifier}/update", + "operationId": "updateRole", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 2168 + }, + "Path_Variables": { + "role_identifier": null + }, + "Query_Variables": {}, + "Body": { + "name": "Reactive1688027298071", + "description": "sapien cursus vestibulum proin eu" + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/roles/{role_identifier}/update", + "operationId": "updateRole", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 2169 + }, + "Path_Variables": { + "role_identifier": "Optional1688027296787" + }, + "Query_Variables": {}, + "Body": { + "name": null, + "privileges": [ + "JOBSCHEDULING", + "AUTHENTICATION_ADMINISTRATION" + ] + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/roles/{role_identifier}/update", + "operationId": "updateRole", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 2170 + }, + "Path_Variables": { + "role_identifier": null + }, + "Query_Variables": {}, + "Body": { + "name": "Operative1688027298065", + "description": "dis parturient", + "privileges": [ + "DEVELOPER", + "SYSTEM_INFO_ADMINISTRATION", + "JOBSCHEDULING" + ] + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/roles/{role_identifier}/update", + "operationId": "updateRole", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 2171 + }, + "Path_Variables": { + "role_identifier": null + }, + "Query_Variables": {}, + "Body": { + "name": "portal1688027298061", + "privileges": [ + "BILLING_INFO_ADMINISTRATION" + ] + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/roles/{role_identifier}/update", + "operationId": "updateRole", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 2172 + }, + "Path_Variables": { + "role_identifier": null + }, + "Query_Variables": {}, + "Body": { + "name": "Robust1688027298057", + "privileges": [ + "GROUP_ADMINISTRATION" + ] + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/roles/{role_identifier}/update", + "operationId": "updateRole", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 2173 + }, + "Path_Variables": { + "role_identifier": "real-time1688027296791" + }, + "Query_Variables": {}, + "Body": { + "name": null + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/roles/{role_identifier}/update", + "operationId": "updateRole", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 2174 + }, + "Path_Variables": { + "role_identifier": null + }, + "Query_Variables": {}, + "Body": { + "name": "analyzing1688027298069", + "description": "nunc rhoncus dui", + "privileges": [ + "DEVELOPER" + ] + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/roles/{role_identifier}/update", + "operationId": "updateRole", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 2175 + }, + "Path_Variables": { + "role_identifier": [ + "Up-sized1688027296785" + ] + }, + "Query_Variables": {}, + "Body": { + "name": "portal1688027298061", + "privileges": [ + "BILLING_INFO_ADMINISTRATION" + ] + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/roles/{role_identifier}/update", + "operationId": "updateRole", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 2176 + }, + "Path_Variables": { + "role_identifier": "well-modulated1688027296793" + }, + "Query_Variables": {}, + "Body": { + "name": [ + "directional1688027298071" + ], + "description": "eget vulputate", + "privileges": [ + "USER_ADMINISTRATION", + "SYNCMANAGEMENT", + "BYPASSRLS" + ] + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/roles/{role_identifier}/update", + "operationId": "updateRole", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 2177 + }, + "Path_Variables": { + "role_identifier": [ + "hub1688027296783" + ] + }, + "Query_Variables": {}, + "Body": { + "name": "Robust1688027298057", + "privileges": [ + "GROUP_ADMINISTRATION" + ] + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/roles/{role_identifier}/update", + "operationId": "updateRole", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 2178 + }, + "Path_Variables": { + "role_identifier": [ + "challenge1688027296784" + ] + }, + "Query_Variables": {}, + "Body": { + "name": "capacity1688027298060" + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/roles/{role_identifier}/update", + "operationId": "updateRole", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 2179 + }, + "Path_Variables": { + "role_identifier": [ + "Optional1688027296787" + ] + }, + "Query_Variables": {}, + "Body": { + "name": "Programmable1688027298062", + "privileges": [ + "JOBSCHEDULING", + "AUTHENTICATION_ADMINISTRATION" + ] + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/roles/{role_identifier}/update", + "operationId": "updateRole", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 2180 + }, + "Path_Variables": { + "role_identifier": [ + "focus", + "group1688027296789" + ] + }, + "Query_Variables": {}, + "Body": { + "name": "Operative1688027298065", + "description": "dis parturient", + "privileges": [ + "DEVELOPER", + "SYSTEM_INFO_ADMINISTRATION", + "JOBSCHEDULING" + ] + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/roles/{role_identifier}/update", + "operationId": "updateRole", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 2181 + }, + "Path_Variables": { + "role_identifier": "Open-source1688027296784" + }, + "Query_Variables": {}, + "Body": { + "name": [ + "Automated1688027298059" + ] + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/roles/{role_identifier}/update", + "operationId": "updateRole", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 2182 + }, + "Path_Variables": { + "role_identifier": "complexity1688027296797" + }, + "Query_Variables": {}, + "Body": { + "name": "Expanded1688027298074", + "privileges": "utXyEqpFqTPkxrp" + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/roles/{role_identifier}/update", + "operationId": "updateRole", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 2183 + }, + "Path_Variables": { + "role_identifier": [ + "hub1688027296783" + ] + }, + "Query_Variables": {}, + "Body": { + "name": "Robust1688027298057", + "privileges": [ + "GROUP_ADMINISTRATION" + ] + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/roles/{role_identifier}/update", + "operationId": "updateRole", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 2184 + }, + "Path_Variables": { + "role_identifier": "Universal1688027296774" + }, + "Query_Variables": {}, + "Body": { + "name": [ + "Synchronised1688027298048" + ] + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/roles/{role_identifier}/update", + "operationId": "updateRole", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 2185 + }, + "Path_Variables": { + "role_identifier": "contextually-based1688027296795" + }, + "Query_Variables": {}, + "Body": { + "name": "mobile1688027298073", + "privileges": "rteAHOduCGfHYDz" + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/roles/{role_identifier}/update", + "operationId": "updateRole", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 2186 + }, + "Path_Variables": { + "role_identifier": "support1688027296792" + }, + "Query_Variables": {}, + "Body": { + "name": [ + "analyzing1688027298069" + ], + "description": "nunc rhoncus dui", + "privileges": [ + "DEVELOPER" + ] + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/roles/{role_identifier}/update", + "operationId": "updateRole", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 2187 + }, + "Path_Variables": { + "role_identifier": "Open-source1688027296784" + }, + "Query_Variables": {}, + "Body": { + "name": [ + "Automated1688027298059" + ] + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/roles/{role_identifier}/update", + "operationId": "updateRole", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 2188 + }, + "Path_Variables": { + "role_identifier": "Re-contextualized1688027296798" + }, + "Query_Variables": {}, + "Body": { + "name": [ + "encryption1688027298075" + ], + "privileges": [ + "JOBSCHEDULING" + ] + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/roles/{role_identifier}/update", + "operationId": "updateRole", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 2189 + }, + "Path_Variables": { + "role_identifier": "real-time1688027296791" + }, + "Query_Variables": {}, + "Body": { + "name": [ + "Intuitive1688027298068" + ] + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/roles/{role_identifier}/update", + "operationId": "updateRole", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 2190 + }, + "Path_Variables": { + "role_identifier": "MxxOEyozoNoNwxm" + }, + "Query_Variables": {}, + "Body": { + "name": "Automated1688027298059" + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/roles/{role_identifier}/update", + "operationId": "updateRole", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 2191 + }, + "Path_Variables": { + "role_identifier": "PDARpivaaCKigFe" + }, + "Query_Variables": {}, + "Body": { + "name": "matrices1688027298072", + "description": "ultrices posuere cubilia curae" + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/roles/{role_identifier}/update", + "operationId": "updateRole", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 2192 + }, + "Path_Variables": { + "role_identifier": "VAbutgVURWZaKiS" + }, + "Query_Variables": {}, + "Body": { + "name": "capacity1688027298060" + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/roles/{role_identifier}/update", + "operationId": "updateRole", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 2193 + }, + "Path_Variables": { + "role_identifier": "CHCLAxejfATwRzb" + }, + "Query_Variables": {}, + "Body": { + "name": "Cross-group1688027298063", + "description": "nullam varius nulla facilisi cras", + "privileges": [ + "JOBSCHEDULING", + "USERDATAUPLOADING" + ] + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/roles/{role_identifier}/update", + "operationId": "updateRole", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 2194 + }, + "Path_Variables": { + "role_identifier": "oaftJpUiIfJzBKc" + }, + "Query_Variables": {}, + "Body": { + "name": "Intuitive1688027298068" + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/roles/{role_identifier}/update", + "operationId": "updateRole", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 2195 + }, + "Path_Variables": { + "role_identifier": "sWJHiCjWUcWTEKQ" + }, + "Query_Variables": {}, + "Body": { + "name": "encryption1688027298075", + "privileges": [ + "JOBSCHEDULING" + ] + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/roles/{role_identifier}/update", + "operationId": "updateRole", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 2196 + }, + "Path_Variables": { + "role_identifier": "hAqSzzRgdoCMOXW" + }, + "Query_Variables": {}, + "Body": { + "name": "Operative1688027298065", + "description": "dis parturient", + "privileges": [ + "DEVELOPER", + "SYSTEM_INFO_ADMINISTRATION", + "JOBSCHEDULING" + ] + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/roles/{role_identifier}/update", + "operationId": "updateRole", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 2197 + }, + "Path_Variables": { + "role_identifier": "VdrWVwejxyhBNoU" + }, + "Query_Variables": {}, + "Body": { + "name": "Object-based1688027298074", + "description": "elementum" + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/roles/{role_identifier}/update", + "operationId": "updateRole", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 2198 + }, + "Path_Variables": { + "role_identifier": "nTzjPknEThPrEcV" + }, + "Query_Variables": {}, + "Body": { + "name": "Expanded1688027298074", + "privileges": [ + "GROUP_ADMINISTRATION" + ] + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/roles/{role_identifier}/update", + "operationId": "updateRole", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 2199 + }, + "Path_Variables": { + "role_identifier": "AuGwcEutXkeLbvg" + }, + "Query_Variables": {}, + "Body": { + "name": "Intuitive1688027298068" + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/roles/{role_identifier}/update", + "operationId": "updateRole", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 2200 + }, + "Path_Variables": { + "role_identifier": "JXROdtVAQGeueJS" + }, + "Query_Variables": {}, + "Body": { + "name": "Object-based1688027298074", + "description": "elementum" + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/roles/{role_identifier}/update", + "operationId": "updateRole", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 2201 + }, + "Path_Variables": { + "role_identifier": "XWLacSckBEUTdII" + }, + "Query_Variables": {}, + "Body": { + "name": "Expanded1688027298074", + "privileges": [ + "GROUP_ADMINISTRATION" + ] + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/roles/{role_identifier}/update", + "operationId": "updateRole", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 2202 + }, + "Path_Variables": { + "role_identifier": "OuCzPVAtJjKzmYB" + }, + "Query_Variables": {}, + "Body": { + "name": "Automated1688027298059" + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/roles/{role_identifier}/update", + "operationId": "updateRole", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 2203 + }, + "Path_Variables": { + "role_identifier": "FocruJSQKdRteNe" + }, + "Query_Variables": {}, + "Body": { + "name": "Object-based1688027298074", + "description": "elementum" + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/roles/{role_identifier}/update", + "operationId": "updateRole", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 2204 + }, + "Path_Variables": { + "role_identifier": "QMAUDCfTbPaTBys" + }, + "Query_Variables": {}, + "Body": { + "name": "directional1688027298071", + "description": "eget vulputate", + "privileges": [ + "USER_ADMINISTRATION", + "SYNCMANAGEMENT", + "BYPASSRLS" + ] + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/roles/search", + "operationId": "searchRoles", + "scenario": "positive", + "type": "AUTOMATIC", + "testId": 2205 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "role_identifiers": null, + "name": null, + "description": "tristique fusce congue diam", + "org_identifiers": null, + "group_identifiers": [ + "c241143a-0e2b-44b6-9cbc-c2b3cff8c57d", + "f3649858-e11b-4ddf-ae51-3eea21c9ada5" + ], + "privileges": "SHAREWITHALL", + "deprecated": true, + "external": null, + "shared_via_connection": false, + "permissions": null + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/roles/search", + "operationId": "searchRoles", + "scenario": "positive", + "type": "AUTOMATIC", + "testId": 2206 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "role_identifiers": [ + "Synchronised1688027298048" + ], + "name": null, + "description": "sit amet sapien dignissim vestibulum", + "org_identifiers": [ + "0" + ], + "group_identifiers": [ + "c241143a-0e2b-44b6-9cbc-c2b3cff8c57d", + "f3649858-e11b-4ddf-ae51-3eea21c9ada5", + "df3a5cd4-333d-47d8-bec2-12b0e916fed5" + ], + "privileges": "DATADOWNLOADING", + "deprecated": null, + "external": null, + "shared_via_connection": false, + "permissions": "MODIFY" + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/roles/search", + "operationId": "searchRoles", + "scenario": "positive", + "type": "AUTOMATIC", + "testId": 2207 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "role_identifiers": [ + "Synchronised1688027298048" + ], + "name": "stable", + "description": null, + "org_identifiers": [ + "0", + "0" + ], + "group_identifiers": [ + "c241143a-0e2b-44b6-9cbc-c2b3cff8c57d" + ], + "privileges": null, + "deprecated": false, + "external": true, + "shared_via_connection": null, + "permissions": null + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/roles/search", + "operationId": "searchRoles", + "scenario": "positive", + "type": "AUTOMATIC", + "testId": 2208 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "role_identifiers": [ + "Synchronised1688027298048" + ], + "name": "local", + "description": "rutrum ac lobortis", + "org_identifiers": [ + "0", + "0", + "0" + ], + "group_identifiers": [ + "c241143a-0e2b-44b6-9cbc-c2b3cff8c57d", + "f3649858-e11b-4ddf-ae51-3eea21c9ada5", + "df3a5cd4-333d-47d8-bec2-12b0e916fed5" + ], + "privileges": null, + "deprecated": null, + "external": false, + "shared_via_connection": null, + "permissions": null + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/roles/search", + "operationId": "searchRoles", + "scenario": "positive", + "type": "AUTOMATIC", + "testId": 2209 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "role_identifiers": [ + "Synchronised1688027298048", + "info-mediaries1688027298055", + "Robust1688027298057", + "Automated1688027298059" + ], + "name": null, + "description": null, + "org_identifiers": null, + "group_identifiers": null, + "privileges": "SHAREWITHALL", + "deprecated": null, + "external": true, + "shared_via_connection": null, + "permissions": null + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/roles/search", + "operationId": "searchRoles", + "scenario": "positive", + "type": "AUTOMATIC", + "testId": 2210 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "role_identifiers": [ + "Synchronised1688027298048", + "info-mediaries1688027298055" + ], + "name": null, + "description": "cursus urna ut tellus nulla", + "org_identifiers": [ + "0", + "0", + "0" + ], + "group_identifiers": [ + "c241143a-0e2b-44b6-9cbc-c2b3cff8c57d", + "f3649858-e11b-4ddf-ae51-3eea21c9ada5" + ], + "privileges": null, + "deprecated": true, + "external": null, + "shared_via_connection": true, + "permissions": null + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/roles/search", + "operationId": "searchRoles", + "scenario": "positive", + "type": "AUTOMATIC", + "testId": 2211 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "role_identifiers": [ + "Synchronised1688027298048", + "info-mediaries1688027298055" + ], + "name": "high-level", + "description": "nisl duis", + "org_identifiers": [ + "0" + ], + "group_identifiers": [ + "c241143a-0e2b-44b6-9cbc-c2b3cff8c57d" + ], + "privileges": "SYSTEM_INFO_ADMINISTRATION", + "deprecated": null, + "external": null, + "shared_via_connection": false, + "permissions": null + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/roles/search", + "operationId": "searchRoles", + "scenario": "positive", + "type": "AUTOMATIC", + "testId": 2212 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "role_identifiers": null, + "name": "concept", + "description": "est quam pharetra magna ac", + "org_identifiers": [ + "0", + "0", + "0" + ], + "group_identifiers": null, + "privileges": "AUTHENTICATION_ADMINISTRATION", + "deprecated": true, + "external": null, + "shared_via_connection": false, + "permissions": null + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/roles/search", + "operationId": "searchRoles", + "scenario": "positive", + "type": "AUTOMATIC", + "testId": 2213 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "role_identifiers": [ + "Synchronised1688027298048" + ], + "name": "static", + "description": null, + "org_identifiers": [ + "0" + ], + "group_identifiers": [ + "c241143a-0e2b-44b6-9cbc-c2b3cff8c57d", + "f3649858-e11b-4ddf-ae51-3eea21c9ada5" + ], + "privileges": "SHAREWITHALL", + "deprecated": false, + "external": null, + "shared_via_connection": false, + "permissions": "NO_ACCESS" + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/roles/search", + "operationId": "searchRoles", + "scenario": "positive", + "type": "AUTOMATIC", + "testId": 2214 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "role_identifiers": [ + "Synchronised1688027298048" + ], + "name": null, + "description": "lacus morbi quis tortor id", + "org_identifiers": [ + "0" + ], + "group_identifiers": [ + "c241143a-0e2b-44b6-9cbc-c2b3cff8c57d", + "f3649858-e11b-4ddf-ae51-3eea21c9ada5", + "df3a5cd4-333d-47d8-bec2-12b0e916fed5" + ], + "privileges": "APPLICATION_ADMINISTRATION", + "deprecated": false, + "external": true, + "shared_via_connection": true, + "permissions": null + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/roles/search", + "operationId": "searchRoles", + "scenario": "positive", + "type": "AUTOMATIC", + "testId": 2215 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "role_identifiers": [ + "Synchronised1688027298048" + ], + "name": "Versatile", + "description": null, + "org_identifiers": [ + "0", + "0", + "0" + ], + "group_identifiers": [ + "c241143a-0e2b-44b6-9cbc-c2b3cff8c57d" + ], + "privileges": "JOBSCHEDULING", + "deprecated": false, + "external": false, + "shared_via_connection": true, + "permissions": null + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/roles/search", + "operationId": "searchRoles", + "scenario": "positive", + "type": "AUTOMATIC", + "testId": 2216 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "role_identifiers": [ + "Synchronised1688027298048", + "info-mediaries1688027298055", + "Robust1688027298057", + "Automated1688027298059" + ], + "name": null, + "description": "vulputate", + "org_identifiers": [ + "0", + "0" + ], + "group_identifiers": null, + "privileges": null, + "deprecated": null, + "external": null, + "shared_via_connection": true, + "permissions": "MODIFY" + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/roles/search", + "operationId": "searchRoles", + "scenario": "positive", + "type": "AUTOMATIC", + "testId": 2217 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "role_identifiers": [ + "Synchronised1688027298048", + "info-mediaries1688027298055", + "Robust1688027298057", + "Automated1688027298059" + ], + "name": "archive", + "description": null, + "org_identifiers": [ + "0", + "0", + "0" + ], + "group_identifiers": [ + "c241143a-0e2b-44b6-9cbc-c2b3cff8c57d", + "f3649858-e11b-4ddf-ae51-3eea21c9ada5", + "df3a5cd4-333d-47d8-bec2-12b0e916fed5" + ], + "privileges": "GROUP_ADMINISTRATION", + "deprecated": false, + "external": null, + "shared_via_connection": null, + "permissions": "MODIFY" + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/roles/search", + "operationId": "searchRoles", + "scenario": "positive", + "type": "AUTOMATIC", + "testId": 2218 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "role_identifiers": null, + "name": null, + "description": null, + "org_identifiers": null, + "group_identifiers": null, + "privileges": "DEVELOPER", + "deprecated": false, + "external": false, + "shared_via_connection": null, + "permissions": "READ_ONLY" + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/roles/search", + "operationId": "searchRoles", + "scenario": "positive", + "type": "AUTOMATIC", + "testId": 2219 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "role_identifiers": [ + "Synchronised1688027298048", + "info-mediaries1688027298055", + "Robust1688027298057", + "Automated1688027298059" + ], + "name": null, + "description": null, + "org_identifiers": null, + "group_identifiers": [ + "c241143a-0e2b-44b6-9cbc-c2b3cff8c57d", + "f3649858-e11b-4ddf-ae51-3eea21c9ada5", + "df3a5cd4-333d-47d8-bec2-12b0e916fed5" + ], + "privileges": "SYNCMANAGEMENT", + "deprecated": null, + "external": false, + "shared_via_connection": null, + "permissions": null + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/roles/search", + "operationId": "searchRoles", + "scenario": "positive", + "type": "AUTOMATIC", + "testId": 2220 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "role_identifiers": [ + "Synchronised1688027298048" + ], + "name": null, + "description": "ante", + "org_identifiers": [ + "0", + "0", + "0" + ], + "group_identifiers": null, + "privileges": null, + "deprecated": null, + "external": null, + "shared_via_connection": true, + "permissions": null + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/roles/search", + "operationId": "searchRoles", + "scenario": "positive", + "type": "AUTOMATIC", + "testId": 2221 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "role_identifiers": null, + "name": "Configurable", + "description": "consequat metus sapien ut nunc", + "org_identifiers": null, + "group_identifiers": [ + "c241143a-0e2b-44b6-9cbc-c2b3cff8c57d" + ], + "privileges": null, + "deprecated": true, + "external": true, + "shared_via_connection": null, + "permissions": "NO_ACCESS" + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/roles/search", + "operationId": "searchRoles", + "scenario": "positive", + "type": "AUTOMATIC", + "testId": 2222 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "role_identifiers": null, + "name": "algorithm", + "description": "mattis nibh ligula nec", + "org_identifiers": [ + "0", + "0" + ], + "group_identifiers": null, + "privileges": "A3ANALYSIS", + "deprecated": null, + "external": true, + "shared_via_connection": false, + "permissions": "READ_ONLY" + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/roles/search", + "operationId": "searchRoles", + "scenario": "positive", + "type": "AUTOMATIC", + "testId": 2223 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "role_identifiers": [ + "Synchronised1688027298048", + "info-mediaries1688027298055" + ], + "name": null, + "description": null, + "org_identifiers": [ + "0", + "0", + "0" + ], + "group_identifiers": null, + "privileges": null, + "deprecated": false, + "external": null, + "shared_via_connection": null, + "permissions": null + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/roles/search", + "operationId": "searchRoles", + "scenario": "positive", + "type": "AUTOMATIC", + "testId": 2224 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "role_identifiers": [ + "Synchronised1688027298048", + "info-mediaries1688027298055", + "Robust1688027298057" + ], + "name": null, + "description": null, + "org_identifiers": null, + "group_identifiers": [ + "c241143a-0e2b-44b6-9cbc-c2b3cff8c57d" + ], + "privileges": "A3ANALYSIS", + "deprecated": true, + "external": null, + "shared_via_connection": false, + "permissions": "READ_ONLY" + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/roles/search", + "operationId": "searchRoles", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 2225 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "role_identifiers": null, + "name": "concept", + "description": "est quam pharetra magna ac", + "org_identifiers": [ + "0", + "0", + "0" + ], + "group_identifiers": null, + "privileges": "AUTHENTICATION_ADMINISTRATION", + "deprecated": true, + "external": null, + "shared_via_connection": false, + "permissions": null + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/roles/search", + "operationId": "searchRoles", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 2226 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "role_identifiers": [ + "Synchronised1688027298048" + ], + "name": "Versatile", + "description": null, + "org_identifiers": "JKXrrXfxvcWcBOM", + "group_identifiers": [ + "c241143a-0e2b-44b6-9cbc-c2b3cff8c57d" + ], + "privileges": "JOBSCHEDULING", + "deprecated": false, + "external": false, + "shared_via_connection": true, + "permissions": null + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/roles/search", + "operationId": "searchRoles", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 2227 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "role_identifiers": null, + "name": "Configurable", + "description": "consequat metus sapien ut nunc", + "org_identifiers": null, + "group_identifiers": [ + "c241143a-0e2b-44b6-9cbc-c2b3cff8c57d" + ], + "privileges": null, + "deprecated": true, + "external": true, + "shared_via_connection": null, + "permissions": "NO_ACCESS" + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/roles/search", + "operationId": "searchRoles", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 2228 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "role_identifiers": [ + "Synchronised1688027298048", + "info-mediaries1688027298055" + ], + "name": null, + "description": "cursus urna ut tellus nulla", + "org_identifiers": [ + "0", + "0", + "0" + ], + "group_identifiers": [ + "c241143a-0e2b-44b6-9cbc-c2b3cff8c57d", + "f3649858-e11b-4ddf-ae51-3eea21c9ada5" + ], + "privileges": null, + "deprecated": true, + "external": null, + "shared_via_connection": true, + "permissions": null + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/roles/search", + "operationId": "searchRoles", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 2229 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "role_identifiers": [ + "Synchronised1688027298048" + ], + "name": "stable", + "description": null, + "org_identifiers": [ + "0", + "0" + ], + "group_identifiers": [ + "c241143a-0e2b-44b6-9cbc-c2b3cff8c57d" + ], + "privileges": null, + "deprecated": false, + "external": true, + "shared_via_connection": null, + "permissions": null + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/roles/search", + "operationId": "searchRoles", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 2230 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "role_identifiers": [ + "Synchronised1688027298048" + ], + "name": null, + "description": "lacus morbi quis tortor id", + "org_identifiers": "PLsYCnSSLyYAyIs", + "group_identifiers": [ + "c241143a-0e2b-44b6-9cbc-c2b3cff8c57d", + "f3649858-e11b-4ddf-ae51-3eea21c9ada5", + "df3a5cd4-333d-47d8-bec2-12b0e916fed5" + ], + "privileges": "APPLICATION_ADMINISTRATION", + "deprecated": false, + "external": true, + "shared_via_connection": true, + "permissions": null + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/roles/search", + "operationId": "searchRoles", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 2231 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "role_identifiers": "UfOEiMcIFOZFJCa", + "name": "archive", + "description": null, + "org_identifiers": [ + "0", + "0", + "0" + ], + "group_identifiers": [ + "c241143a-0e2b-44b6-9cbc-c2b3cff8c57d", + "f3649858-e11b-4ddf-ae51-3eea21c9ada5", + "df3a5cd4-333d-47d8-bec2-12b0e916fed5" + ], + "privileges": "GROUP_ADMINISTRATION", + "deprecated": false, + "external": null, + "shared_via_connection": null, + "permissions": "MODIFY" + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/roles/search", + "operationId": "searchRoles", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 2232 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "role_identifiers": [ + "Synchronised1688027298048", + "info-mediaries1688027298055", + "Robust1688027298057", + "Automated1688027298059" + ], + "name": "archive", + "description": null, + "org_identifiers": [ + "0", + "0", + "0" + ], + "group_identifiers": [ + "c241143a-0e2b-44b6-9cbc-c2b3cff8c57d", + "f3649858-e11b-4ddf-ae51-3eea21c9ada5", + "df3a5cd4-333d-47d8-bec2-12b0e916fed5" + ], + "privileges": "GROUP_ADMINISTRATION", + "deprecated": false, + "external": null, + "shared_via_connection": null, + "permissions": "MODIFY" + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/roles/search", + "operationId": "searchRoles", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 2233 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "role_identifiers": [ + "Synchronised1688027298048", + "info-mediaries1688027298055" + ], + "name": null, + "description": "cursus urna ut tellus nulla", + "org_identifiers": [ + "0", + "0", + "0" + ], + "group_identifiers": [ + "c241143a-0e2b-44b6-9cbc-c2b3cff8c57d", + "f3649858-e11b-4ddf-ae51-3eea21c9ada5" + ], + "privileges": null, + "deprecated": true, + "external": null, + "shared_via_connection": true, + "permissions": null + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/roles/search", + "operationId": "searchRoles", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 2234 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "role_identifiers": [ + "Synchronised1688027298048", + "info-mediaries1688027298055", + "Robust1688027298057", + "Automated1688027298059" + ], + "name": null, + "description": null, + "org_identifiers": null, + "group_identifiers": [ + "c241143a-0e2b-44b6-9cbc-c2b3cff8c57d", + "f3649858-e11b-4ddf-ae51-3eea21c9ada5", + "df3a5cd4-333d-47d8-bec2-12b0e916fed5" + ], + "privileges": "SYNCMANAGEMENT", + "deprecated": null, + "external": false, + "shared_via_connection": null, + "permissions": null + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/roles/search", + "operationId": "searchRoles", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 2235 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "role_identifiers": [ + "Synchronised1688027298048", + "info-mediaries1688027298055", + "Robust1688027298057", + "Automated1688027298059" + ], + "name": null, + "description": null, + "org_identifiers": null, + "group_identifiers": null, + "privileges": "SHAREWITHALL", + "deprecated": null, + "external": true, + "shared_via_connection": null, + "permissions": null + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/roles/search", + "operationId": "searchRoles", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 2236 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "role_identifiers": [ + "Synchronised1688027298048" + ], + "name": null, + "description": "lacus morbi quis tortor id", + "org_identifiers": [ + "0" + ], + "group_identifiers": [ + "c241143a-0e2b-44b6-9cbc-c2b3cff8c57d", + "f3649858-e11b-4ddf-ae51-3eea21c9ada5", + "df3a5cd4-333d-47d8-bec2-12b0e916fed5" + ], + "privileges": "APPLICATION_ADMINISTRATION", + "deprecated": false, + "external": true, + "shared_via_connection": true, + "permissions": null + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/roles/search", + "operationId": "searchRoles", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 2237 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "role_identifiers": [ + "Synchronised1688027298048", + "info-mediaries1688027298055", + "Robust1688027298057", + "Automated1688027298059" + ], + "name": null, + "description": "vulputate", + "org_identifiers": [ + "0", + "0" + ], + "group_identifiers": null, + "privileges": null, + "deprecated": null, + "external": null, + "shared_via_connection": true, + "permissions": "MODIFY" + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/roles/search", + "operationId": "searchRoles", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 2238 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "role_identifiers": null, + "name": null, + "description": [ + "tristique", + "fusce", + "congue", + "diam" + ], + "org_identifiers": null, + "group_identifiers": [ + "c241143a-0e2b-44b6-9cbc-c2b3cff8c57d", + "f3649858-e11b-4ddf-ae51-3eea21c9ada5" + ], + "privileges": "SHAREWITHALL", + "deprecated": true, + "external": null, + "shared_via_connection": false, + "permissions": null + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/roles/search", + "operationId": "searchRoles", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 2239 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "role_identifiers": "hxTxAxTrBrMAYMf", + "name": null, + "description": "sit amet sapien dignissim vestibulum", + "org_identifiers": [ + "0" + ], + "group_identifiers": [ + "c241143a-0e2b-44b6-9cbc-c2b3cff8c57d", + "f3649858-e11b-4ddf-ae51-3eea21c9ada5", + "df3a5cd4-333d-47d8-bec2-12b0e916fed5" + ], + "privileges": "DATADOWNLOADING", + "deprecated": null, + "external": null, + "shared_via_connection": false, + "permissions": "MODIFY" + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/schedules/create", + "operationId": "createSchedule", + "scenario": "positive", + "type": "AUTOMATIC", + "testId": 2240 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "name": "trushton01688027300763", + "description": "Nullam porttitor lacus at turpis. Donec posuere metus vitae ipsum. Aliquam non mauris. Morbi non lectus. Aliquam sit amet diam in magna bibendum imperdiet.", + "metadata_type": "LIVEBOARD", + "metadata_identifier": "e82fe65a-7ac0-4282-a783-7a35c01b8dbd", + "file_format": "CSV", + "liveboard_options": { + "visualization_identifiers": [] + }, + "pdf_options": { + "complete_liveboard": true, + "include_cover_page": true, + "include_custom_logo": true, + "include_filter_page": false, + "include_page_number": true, + "page_footer_text": "mleverich0", + "page_orientation": "PORTRAIT", + "page_size": "A4", + "truncate_table": false + }, + "time_zone": "Europe/Warsaw", + "frequency": { + "cron_expression": { + "day_of_month": "9", + "day_of_week": "5", + "hour": "18", + "month": "5", + "minute": "20", + "second": "23" + } + }, + "recipient_details": { + "emails": [ + "msach0@guardian.co.uk", + "ocreenan0@ucoz.ru" + ], + "principals": [ + { + "identifier": "046760d3-c0be-47d0-a9e7-a1b37c4e4432", + "type": "USER_GROUP" + } + ] + } + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/schedules/create", + "operationId": "createSchedule", + "scenario": "positive", + "type": "AUTOMATIC", + "testId": 2241 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "name": "glewing11688027300801", + "description": "Donec posuere metus vitae ipsum. Aliquam non mauris. Morbi non lectus. Aliquam sit amet diam in magna bibendum imperdiet.", + "metadata_type": "LIVEBOARD", + "metadata_identifier": "78950be9-0717-449e-be26-64ea42617dd1", + "file_format": "PDF", + "liveboard_options": { + "visualization_identifiers": [] + }, + "pdf_options": { + "complete_liveboard": true, + "include_cover_page": false, + "include_custom_logo": true, + "include_filter_page": true, + "include_page_number": false, + "page_footer_text": "cgowar1", + "page_orientation": "LANDSCAPE", + "page_size": "A4", + "truncate_table": false + }, + "time_zone": "Asia/Manila", + "frequency": { + "cron_expression": { + "day_of_month": "4", + "day_of_week": "3", + "hour": "10", + "month": "7", + "minute": "14", + "second": "15" + } + }, + "recipient_details": { + "emails": [ + "alapley1@gov.uk" + ], + "principals": [ + { + "identifier": "046760d3-c0be-47d0-a9e7-a1b37c4e4432", + "type": "USER_GROUP" + }, + { + "identifier": "160b8fa4-4028-4ffe-a559-cbaf33c0a9b3", + "type": "USER" + }, + { + "identifier": "5dc626e5-1921-4758-a7bf-8501605aa59f", + "type": "USER" + } + ] + } + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/schedules/create", + "operationId": "createSchedule", + "scenario": "positive", + "type": "AUTOMATIC", + "testId": 2242 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "name": "gpavlitschek21688027300807", + "description": "Sed ante. Vivamus tortor. Duis mattis egestas metus. Aenean fermentum. Donec ut mauris eget massa tempor convallis.", + "metadata_type": "LIVEBOARD", + "metadata_identifier": "2ff57a24-cf90-485f-8b4b-45fc17474c6f", + "file_format": "PDF", + "liveboard_options": { + "visualization_identifiers": [] + }, + "pdf_options": { + "complete_liveboard": true, + "include_cover_page": true, + "include_custom_logo": true, + "include_filter_page": true, + "include_page_number": true, + "page_footer_text": "hcumes2", + "page_orientation": "LANDSCAPE", + "page_size": "A4", + "truncate_table": false + }, + "time_zone": "America/Sao_Paulo", + "frequency": { + "cron_expression": { + "day_of_month": "14", + "day_of_week": "1", + "hour": "18", + "month": "4", + "minute": "11", + "second": "57" + } + }, + "recipient_details": { + "emails": [ + "sgosnoll2@amazon.co.uk", + "mwyldish2@addthis.com", + "cding2@telegraph.co.uk" + ], + "principals": [ + { + "identifier": "046760d3-c0be-47d0-a9e7-a1b37c4e4432", + "type": "USER_GROUP" + }, + { + "identifier": "160b8fa4-4028-4ffe-a559-cbaf33c0a9b3", + "type": "USER" + }, + { + "identifier": "5dc626e5-1921-4758-a7bf-8501605aa59f", + "type": "USER" + } + ] + } + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/schedules/create", + "operationId": "createSchedule", + "scenario": "positive", + "type": "AUTOMATIC", + "testId": 2243 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "name": "slonglands31688027300811", + "description": "In eleifend quam a odio. In hac habitasse platea dictumst. Maecenas ut massa quis augue luctus tincidunt.", + "metadata_type": "LIVEBOARD", + "metadata_identifier": "4145513c-c9bd-4e48-af44-8dc001b5f955", + "file_format": "CSV", + "liveboard_options": { + "visualization_identifiers": [] + }, + "pdf_options": { + "complete_liveboard": true, + "include_cover_page": false, + "include_custom_logo": true, + "include_filter_page": false, + "include_page_number": true, + "page_footer_text": "drasmus3", + "page_orientation": "PORTRAIT", + "page_size": "A4", + "truncate_table": true + }, + "time_zone": "Asia/Jakarta", + "frequency": { + "cron_expression": { + "day_of_month": "13", + "day_of_week": "4", + "hour": "22", + "month": "10", + "minute": "43", + "second": "7" + } + }, + "recipient_details": { + "emails": [ + "gleatherbarrow3@hatena.ne.jp" + ], + "principals": [ + { + "identifier": "046760d3-c0be-47d0-a9e7-a1b37c4e4432", + "type": "USER_GROUP" + }, + { + "identifier": "160b8fa4-4028-4ffe-a559-cbaf33c0a9b3", + "type": "USER" + } + ] + } + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/schedules/create", + "operationId": "createSchedule", + "scenario": "positive", + "type": "AUTOMATIC", + "testId": 2244 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "name": "kfullick41688027300814", + "description": "Vestibulum ante ipsum primis in faucibus orci luctus et ultrices posuere cubilia Curae; Nulla dapibus dolor vel est. Donec odio justo, sollicitudin ut, suscipit a, feugiat et, eros. Vestibulum ac est lacinia nisi venenatis tristique.", + "metadata_type": "LIVEBOARD", + "metadata_identifier": "33248a57-cc70-4e39-9199-fb5092283381", + "file_format": "CSV", + "liveboard_options": { + "visualization_identifiers": [] + }, + "pdf_options": { + "complete_liveboard": false, + "include_cover_page": true, + "include_custom_logo": true, + "include_filter_page": true, + "include_page_number": true, + "page_footer_text": "pjurasek4", + "page_orientation": "LANDSCAPE", + "page_size": "A4", + "truncate_table": true + }, + "time_zone": "Europe/Prague", + "frequency": { + "cron_expression": { + "day_of_month": "21", + "day_of_week": "1", + "hour": "2", + "month": "4", + "minute": "19", + "second": "5" + } + }, + "recipient_details": { + "emails": [ + "bpiola4@jalbum.net" + ], + "principals": [ + { + "identifier": "046760d3-c0be-47d0-a9e7-a1b37c4e4432", + "type": "USER_GROUP" + }, + { + "identifier": "160b8fa4-4028-4ffe-a559-cbaf33c0a9b3", + "type": "USER" + }, + { + "identifier": "5dc626e5-1921-4758-a7bf-8501605aa59f", + "type": "USER" + } + ] + } + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/schedules/create", + "operationId": "createSchedule", + "scenario": "positive", + "type": "AUTOMATIC", + "testId": 2245 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "name": "ntrendle51688027300818", + "description": "Nulla facilisi. Cras non velit nec nisi vulputate nonummy. Maecenas tincidunt lacus at velit. Vivamus vel nulla eget eros elementum pellentesque. Quisque porta volutpat erat.", + "metadata_type": "LIVEBOARD", + "metadata_identifier": "6715f768-8930-4180-9a3d-1efdbfaa8e7f", + "file_format": "PDF", + "liveboard_options": { + "visualization_identifiers": [] + }, + "pdf_options": { + "complete_liveboard": true, + "include_cover_page": false, + "include_custom_logo": true, + "include_filter_page": false, + "include_page_number": true, + "page_footer_text": "lgoranov5", + "page_orientation": "LANDSCAPE", + "page_size": "A4", + "truncate_table": true + }, + "time_zone": "Asia/Chongqing", + "frequency": { + "cron_expression": { + "day_of_month": "14", + "day_of_week": "0", + "hour": "15", + "month": "8", + "minute": "16", + "second": "33" + } + }, + "recipient_details": { + "emails": [ + "bgrabb5@mtv.com", + "rturville5@163.com", + "gmccobb5@w3.org" + ], + "principals": [ + { + "identifier": "046760d3-c0be-47d0-a9e7-a1b37c4e4432", + "type": "USER_GROUP" + }, + { + "identifier": "160b8fa4-4028-4ffe-a559-cbaf33c0a9b3", + "type": "USER" + }, + { + "identifier": "5dc626e5-1921-4758-a7bf-8501605aa59f", + "type": "USER" + } + ] + } + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/schedules/create", + "operationId": "createSchedule", + "scenario": "positive", + "type": "AUTOMATIC", + "testId": 2246 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "name": "cpedracci61688027300822", + "description": "Vestibulum rutrum rutrum neque.", + "metadata_type": "LIVEBOARD", + "metadata_identifier": "b2d68a4f-cf67-4723-966f-8a592fdbf8b9", + "file_format": "PDF", + "liveboard_options": { + "visualization_identifiers": [] + }, + "pdf_options": { + "complete_liveboard": false, + "include_cover_page": true, + "include_custom_logo": true, + "include_filter_page": false, + "include_page_number": false, + "page_footer_text": "rchevalier6", + "page_orientation": "LANDSCAPE", + "page_size": "A4", + "truncate_table": true + }, + "time_zone": "Asia/Manila", + "frequency": { + "cron_expression": { + "day_of_month": "9", + "day_of_week": "1", + "hour": "7", + "month": "3", + "minute": "41", + "second": "26" + } + }, + "recipient_details": { + "emails": [ + "ccromly6@canalblog.com", + "dbleier6@economist.com" + ], + "principals": [ + { + "identifier": "046760d3-c0be-47d0-a9e7-a1b37c4e4432", + "type": "USER_GROUP" + } + ] + } + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/schedules/create", + "operationId": "createSchedule", + "scenario": "positive", + "type": "AUTOMATIC", + "testId": 2247 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "name": "mhoyes71688027300825", + "description": "Nunc nisl. Duis bibendum, felis sed interdum venenatis, turpis enim blandit mi, in porttitor pede justo eu massa. Donec dapibus. Duis at velit eu est congue elementum. In hac habitasse platea dictumst.", + "metadata_type": "LIVEBOARD", + "metadata_identifier": "262abdac-b00f-4f5f-ad33-fcf10154184f", + "file_format": "PDF", + "liveboard_options": { + "visualization_identifiers": [] + }, + "pdf_options": { + "complete_liveboard": true, + "include_cover_page": false, + "include_custom_logo": true, + "include_filter_page": true, + "include_page_number": false, + "page_footer_text": "abovaird7", + "page_orientation": "LANDSCAPE", + "page_size": "A4", + "truncate_table": false + }, + "time_zone": "Europe/Brussels", + "frequency": { + "cron_expression": { + "day_of_month": "4", + "day_of_week": "6", + "hour": "22", + "month": "2", + "minute": "18", + "second": "41" + } + }, + "recipient_details": { + "emails": [ + "dgrishinov7@harvard.edu", + "janstead7@51.la", + "tmeharg7@mediafire.com" + ], + "principals": [ + { + "identifier": "046760d3-c0be-47d0-a9e7-a1b37c4e4432", + "type": "USER_GROUP" + }, + { + "identifier": "160b8fa4-4028-4ffe-a559-cbaf33c0a9b3", + "type": "USER" + }, + { + "identifier": "5dc626e5-1921-4758-a7bf-8501605aa59f", + "type": "USER" + } + ] + } + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/schedules/create", + "operationId": "createSchedule", + "scenario": "positive", + "type": "AUTOMATIC", + "testId": 2248 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "name": "ncavan81688027300829", + "description": "Phasellus id sapien in sapien iaculis congue. Vivamus metus arcu, adipiscing molestie, hendrerit at, vulputate vitae, nisl. Aenean lectus.", + "metadata_type": "LIVEBOARD", + "metadata_identifier": "327f4d60-c502-43b0-b1d4-c73df5031a2e", + "file_format": "CSV", + "liveboard_options": { + "visualization_identifiers": [] + }, + "pdf_options": { + "complete_liveboard": false, + "include_cover_page": false, + "include_custom_logo": false, + "include_filter_page": true, + "include_page_number": false, + "page_footer_text": "mallery8", + "page_orientation": "LANDSCAPE", + "page_size": "A4", + "truncate_table": false + }, + "time_zone": "Asia/Nicosia", + "frequency": { + "cron_expression": { + "day_of_month": "13", + "day_of_week": "2", + "hour": "9", + "month": "12", + "minute": "27", + "second": "2" + } + }, + "recipient_details": { + "emails": [ + "tstathers8@ucla.edu" + ], + "principals": [ + { + "identifier": "046760d3-c0be-47d0-a9e7-a1b37c4e4432", + "type": "USER_GROUP" + }, + { + "identifier": "160b8fa4-4028-4ffe-a559-cbaf33c0a9b3", + "type": "USER" + }, + { + "identifier": "5dc626e5-1921-4758-a7bf-8501605aa59f", + "type": "USER" + } + ] + } + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/schedules/create", + "operationId": "createSchedule", + "scenario": "positive", + "type": "AUTOMATIC", + "testId": 2249 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "name": "syokley91688027300833", + "description": "Morbi ut odio. Cras mi pede, malesuada in, imperdiet et, commodo vulputate, justo.", + "metadata_type": "LIVEBOARD", + "metadata_identifier": "601be8e5-140e-477c-8812-843795306438", + "file_format": "PDF", + "liveboard_options": { + "visualization_identifiers": [] + }, + "pdf_options": { + "complete_liveboard": false, + "include_cover_page": false, + "include_custom_logo": false, + "include_filter_page": true, + "include_page_number": false, + "page_footer_text": "hernshaw9", + "page_orientation": "LANDSCAPE", + "page_size": "A4", + "truncate_table": false + }, + "time_zone": "Europe/Athens", + "frequency": { + "cron_expression": { + "day_of_month": "28", + "day_of_week": "0", + "hour": "2", + "month": "9", + "minute": "51", + "second": "33" + } + }, + "recipient_details": { + "emails": [ + "acattanach9@umich.edu", + "bvandenhof9@ibm.com" + ], + "principals": [ + { + "identifier": "046760d3-c0be-47d0-a9e7-a1b37c4e4432", + "type": "USER_GROUP" + }, + { + "identifier": "160b8fa4-4028-4ffe-a559-cbaf33c0a9b3", + "type": "USER" + } + ] + } + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/schedules/create", + "operationId": "createSchedule", + "scenario": "positive", + "type": "AUTOMATIC", + "testId": 2250 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "name": "rgantzmana1688027300855", + "description": "Fusce consequat.", + "metadata_type": "LIVEBOARD", + "metadata_identifier": "e82fe65a-7ac0-4282-a783-7a35c01b8dbd", + "file_format": "CSV", + "liveboard_options": { + "visualization_identifiers": [] + }, + "pdf_options": { + "complete_liveboard": true, + "include_cover_page": false, + "include_custom_logo": false, + "include_filter_page": true, + "include_page_number": false, + "page_footer_text": "lcasarolia", + "page_orientation": "LANDSCAPE", + "page_size": "A4", + "truncate_table": true + }, + "time_zone": "Europe/Lisbon", + "frequency": { + "cron_expression": { + "day_of_month": "12", + "day_of_week": "1", + "hour": "7", + "month": "2", + "minute": "9", + "second": "16" + } + }, + "recipient_details": { + "emails": [ + "jmarlera@economist.com" + ], + "principals": [ + { + "identifier": "046760d3-c0be-47d0-a9e7-a1b37c4e4432", + "type": "USER_GROUP" + } + ] + } + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/schedules/create", + "operationId": "createSchedule", + "scenario": "positive", + "type": "AUTOMATIC", + "testId": 2251 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "name": "hstoggellb1688027300858", + "description": "In est risus, auctor sed, tristique in, tempus sit amet, sem. Fusce consequat.", + "metadata_type": "LIVEBOARD", + "metadata_identifier": "78950be9-0717-449e-be26-64ea42617dd1", + "file_format": "CSV", + "liveboard_options": { + "visualization_identifiers": [] + }, + "pdf_options": { + "complete_liveboard": false, + "include_cover_page": true, + "include_custom_logo": false, + "include_filter_page": false, + "include_page_number": false, + "page_footer_text": "taudenisb", + "page_orientation": "LANDSCAPE", + "page_size": "A4", + "truncate_table": false + }, + "time_zone": "Asia/Chongqing", + "frequency": { + "cron_expression": { + "day_of_month": "25", + "day_of_week": "2", + "hour": "13", + "month": "1", + "minute": "58", + "second": "7" + } + }, + "recipient_details": { + "emails": [ + "mmcjarrowb@seesaa.net", + "bsmallpieceb@imageshack.us" + ], + "principals": [ + { + "identifier": "046760d3-c0be-47d0-a9e7-a1b37c4e4432", + "type": "USER_GROUP" + } + ] + } + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/schedules/create", + "operationId": "createSchedule", + "scenario": "positive", + "type": "AUTOMATIC", + "testId": 2252 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "name": "cmatteolic1688027300861", + "description": "Vivamus vestibulum sagittis sapien. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus.", + "metadata_type": "LIVEBOARD", + "metadata_identifier": "2ff57a24-cf90-485f-8b4b-45fc17474c6f", + "file_format": "PDF", + "liveboard_options": { + "visualization_identifiers": [] + }, + "pdf_options": { + "complete_liveboard": true, + "include_cover_page": true, + "include_custom_logo": false, + "include_filter_page": true, + "include_page_number": true, + "page_footer_text": "djacobssonc", + "page_orientation": "PORTRAIT", + "page_size": "A4", + "truncate_table": true + }, + "time_zone": "America/Argentina/Buenos_Aires", + "frequency": { + "cron_expression": { + "day_of_month": "18", + "day_of_week": "6", + "hour": "15", + "month": "1", + "minute": "5", + "second": "3" + } + }, + "recipient_details": { + "emails": [ + "cmattackc@sun.com", + "ecoutthartc@1688.com" + ], + "principals": [ + { + "identifier": "046760d3-c0be-47d0-a9e7-a1b37c4e4432", + "type": "USER_GROUP" + }, + { + "identifier": "160b8fa4-4028-4ffe-a559-cbaf33c0a9b3", + "type": "USER" + } + ] + } + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/schedules/create", + "operationId": "createSchedule", + "scenario": "positive", + "type": "AUTOMATIC", + "testId": 2253 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "name": "escadd1688027300865", + "description": "In congue. Etiam justo. Etiam pretium iaculis justo.", + "metadata_type": "LIVEBOARD", + "metadata_identifier": "4145513c-c9bd-4e48-af44-8dc001b5f955", + "file_format": "CSV", + "liveboard_options": { + "visualization_identifiers": [] + }, + "pdf_options": { + "complete_liveboard": true, + "include_cover_page": false, + "include_custom_logo": true, + "include_filter_page": true, + "include_page_number": true, + "page_footer_text": "swaplesd", + "page_orientation": "PORTRAIT", + "page_size": "A4", + "truncate_table": false + }, + "time_zone": "Asia/Harbin", + "frequency": { + "cron_expression": { + "day_of_month": "11", + "day_of_week": "6", + "hour": "22", + "month": "1", + "minute": "44", + "second": "0" + } + }, + "recipient_details": { + "emails": [ + "sfeverd@theatlantic.com" + ], + "principals": [ + { + "identifier": "046760d3-c0be-47d0-a9e7-a1b37c4e4432", + "type": "USER_GROUP" + }, + { + "identifier": "160b8fa4-4028-4ffe-a559-cbaf33c0a9b3", + "type": "USER" + }, + { + "identifier": "5dc626e5-1921-4758-a7bf-8501605aa59f", + "type": "USER" + } + ] + } + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/schedules/create", + "operationId": "createSchedule", + "scenario": "positive", + "type": "AUTOMATIC", + "testId": 2254 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "name": "dpeakmane1688027300868", + "description": "Morbi quis tortor id nulla ultrices aliquet. Maecenas leo odio, condimentum id, luctus nec, molestie sed, justo. Pellentesque viverra pede ac diam. Cras pellentesque volutpat dui.", + "metadata_type": "LIVEBOARD", + "metadata_identifier": "33248a57-cc70-4e39-9199-fb5092283381", + "file_format": "PDF", + "liveboard_options": { + "visualization_identifiers": [] + }, + "pdf_options": { + "complete_liveboard": true, + "include_cover_page": true, + "include_custom_logo": true, + "include_filter_page": false, + "include_page_number": true, + "page_footer_text": "dstannere", + "page_orientation": "LANDSCAPE", + "page_size": "A4", + "truncate_table": true + }, + "time_zone": "Africa/Lagos", + "frequency": { + "cron_expression": { + "day_of_month": "14", + "day_of_week": "3", + "hour": "21", + "month": "5", + "minute": "28", + "second": "56" + } + }, + "recipient_details": { + "emails": [ + "hmacaleesee@liveinternet.ru" + ], + "principals": [ + { + "identifier": "046760d3-c0be-47d0-a9e7-a1b37c4e4432", + "type": "USER_GROUP" + } + ] + } + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/schedules/create", + "operationId": "createSchedule", + "scenario": "positive", + "type": "AUTOMATIC", + "testId": 2255 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "name": "ktroyesf1688027300871", + "description": "Nunc rhoncus dui vel sem. Sed sagittis.", + "metadata_type": "LIVEBOARD", + "metadata_identifier": "6715f768-8930-4180-9a3d-1efdbfaa8e7f", + "file_format": "PDF", + "liveboard_options": { + "visualization_identifiers": [] + }, + "pdf_options": { + "complete_liveboard": true, + "include_cover_page": false, + "include_custom_logo": true, + "include_filter_page": false, + "include_page_number": true, + "page_footer_text": "omealiffef", + "page_orientation": "LANDSCAPE", + "page_size": "A4", + "truncate_table": true + }, + "time_zone": "Asia/Shanghai", + "frequency": { + "cron_expression": { + "day_of_month": "23", + "day_of_week": "5", + "hour": "8", + "month": "12", + "minute": "46", + "second": "57" + } + }, + "recipient_details": { + "emails": [ + "spratif@taobao.com", + "mhanrottf@cafepress.com" + ], + "principals": [ + { + "identifier": "046760d3-c0be-47d0-a9e7-a1b37c4e4432", + "type": "USER_GROUP" + } + ] + } + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/schedules/create", + "operationId": "createSchedule", + "scenario": "positive", + "type": "AUTOMATIC", + "testId": 2256 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "name": "bhartshorneg1688027300874", + "description": "Proin at turpis a pede posuere nonummy. Integer non velit.", + "metadata_type": "LIVEBOARD", + "metadata_identifier": "b2d68a4f-cf67-4723-966f-8a592fdbf8b9", + "file_format": "CSV", + "liveboard_options": { + "visualization_identifiers": [] + }, + "pdf_options": { + "complete_liveboard": false, + "include_cover_page": false, + "include_custom_logo": true, + "include_filter_page": false, + "include_page_number": true, + "page_footer_text": "klarverg", + "page_orientation": "LANDSCAPE", + "page_size": "A4", + "truncate_table": true + }, + "time_zone": "Asia/Karachi", + "frequency": { + "cron_expression": { + "day_of_month": "26", + "day_of_week": "0", + "hour": "20", + "month": "3", + "minute": "15", + "second": "1" + } + }, + "recipient_details": { + "emails": [ + "dpiesoldg@archive.org", + "nmedcraftg@umich.edu" + ], + "principals": [ + { + "identifier": "046760d3-c0be-47d0-a9e7-a1b37c4e4432", + "type": "USER_GROUP" + } + ] + } + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/schedules/create", + "operationId": "createSchedule", + "scenario": "positive", + "type": "AUTOMATIC", + "testId": 2257 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "name": "mmcmychemh1688027300877", + "description": "Pellentesque viverra pede ac diam. Cras pellentesque volutpat dui. Maecenas tristique, est et tempus semper, est quam pharetra magna, ac consequat metus sapien ut nunc.", + "metadata_type": "LIVEBOARD", + "metadata_identifier": "262abdac-b00f-4f5f-ad33-fcf10154184f", + "file_format": "PDF", + "liveboard_options": { + "visualization_identifiers": [] + }, + "pdf_options": { + "complete_liveboard": true, + "include_cover_page": true, + "include_custom_logo": true, + "include_filter_page": false, + "include_page_number": true, + "page_footer_text": "scharlwoodh", + "page_orientation": "LANDSCAPE", + "page_size": "A4", + "truncate_table": false + }, + "time_zone": "Europe/Moscow", + "frequency": { + "cron_expression": { + "day_of_month": "12", + "day_of_week": "5", + "hour": "19", + "month": "12", + "minute": "25", + "second": "0" + } + }, + "recipient_details": { + "emails": [ + "cfulgerh@unesco.org" + ], + "principals": [ + { + "identifier": "046760d3-c0be-47d0-a9e7-a1b37c4e4432", + "type": "USER_GROUP" + } + ] + } + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/schedules/create", + "operationId": "createSchedule", + "scenario": "positive", + "type": "AUTOMATIC", + "testId": 2258 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "name": "daustoni1688027300880", + "description": "Maecenas tincidunt lacus at velit. Vivamus vel nulla eget eros elementum pellentesque. Quisque porta volutpat erat. Quisque erat eros, viverra eget, congue eget, semper rutrum, nulla.", + "metadata_type": "LIVEBOARD", + "metadata_identifier": "327f4d60-c502-43b0-b1d4-c73df5031a2e", + "file_format": "CSV", + "liveboard_options": { + "visualization_identifiers": [] + }, + "pdf_options": { + "complete_liveboard": true, + "include_cover_page": true, + "include_custom_logo": true, + "include_filter_page": true, + "include_page_number": false, + "page_footer_text": "vmacgregori", + "page_orientation": "LANDSCAPE", + "page_size": "A4", + "truncate_table": true + }, + "time_zone": "Asia/Shanghai", + "frequency": { + "cron_expression": { + "day_of_month": "22", + "day_of_week": "4", + "hour": "6", + "month": "9", + "minute": "50", + "second": "29" + } + }, + "recipient_details": { + "emails": [ + "ebanburyi@e-recht24.de" + ], + "principals": [ + { + "identifier": "046760d3-c0be-47d0-a9e7-a1b37c4e4432", + "type": "USER_GROUP" + } + ] + } + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/schedules/create", + "operationId": "createSchedule", + "scenario": "positive", + "type": "AUTOMATIC", + "testId": 2259 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "name": "theinekingj1688027300883", + "description": "Maecenas rhoncus aliquam lacus. Morbi quis tortor id nulla ultrices aliquet. Maecenas leo odio, condimentum id, luctus nec, molestie sed, justo. Pellentesque viverra pede ac diam.", + "metadata_type": "LIVEBOARD", + "metadata_identifier": "601be8e5-140e-477c-8812-843795306438", + "file_format": "CSV", + "liveboard_options": { + "visualization_identifiers": [] + }, + "pdf_options": { + "complete_liveboard": true, + "include_cover_page": false, + "include_custom_logo": true, + "include_filter_page": false, + "include_page_number": true, + "page_footer_text": "vneedsj", + "page_orientation": "LANDSCAPE", + "page_size": "A4", + "truncate_table": false + }, + "time_zone": "Asia/Bangkok", + "frequency": { + "cron_expression": { + "day_of_month": "10", + "day_of_week": "5", + "hour": "20", + "month": "8", + "minute": "30", + "second": "41" + } + }, + "recipient_details": { + "emails": [ + "dbressonj@creativecommons.org" + ], + "principals": [ + { + "identifier": "046760d3-c0be-47d0-a9e7-a1b37c4e4432", + "type": "USER_GROUP" + }, + { + "identifier": "160b8fa4-4028-4ffe-a559-cbaf33c0a9b3", + "type": "USER" + }, + { + "identifier": "5dc626e5-1921-4758-a7bf-8501605aa59f", + "type": "USER" + } + ] + } + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/schedules/create", + "operationId": "createSchedule", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 2260 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "name": "dpeakmane1688027300868", + "description": null, + "metadata_type": "LIVEBOARD", + "metadata_identifier": "33248a57-cc70-4e39-9199-fb5092283381", + "file_format": "PDF", + "liveboard_options": { + "visualization_identifiers": [] + }, + "pdf_options": { + "complete_liveboard": true, + "include_cover_page": true, + "include_custom_logo": true, + "include_filter_page": false, + "include_page_number": true, + "page_footer_text": "dstannere", + "page_orientation": "LANDSCAPE", + "page_size": "A4", + "truncate_table": true + }, + "time_zone": "Africa/Lagos", + "frequency": { + "cron_expression": { + "day_of_month": "14", + "day_of_week": "3", + "hour": "21", + "month": "5", + "minute": "28", + "second": "56" + } + }, + "recipient_details": { + "emails": [ + "hmacaleesee@liveinternet.ru" + ], + "principals": [ + { + "identifier": "046760d3-c0be-47d0-a9e7-a1b37c4e4432", + "type": "USER_GROUP" + } + ] + } + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/schedules/create", + "operationId": "createSchedule", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 2261 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "name": "gpavlitschek21688027300807", + "description": "Sed ante. Vivamus tortor. Duis mattis egestas metus. Aenean fermentum. Donec ut mauris eget massa tempor convallis.", + "metadata_type": "LIVEBOARD", + "metadata_identifier": "2ff57a24-cf90-485f-8b4b-45fc17474c6f", + "file_format": "PDF", + "liveboard_options": { + "visualization_identifiers": [] + }, + "pdf_options": { + "complete_liveboard": true, + "include_cover_page": true, + "include_custom_logo": true, + "include_filter_page": true, + "include_page_number": true, + "page_footer_text": "hcumes2", + "page_orientation": "LANDSCAPE", + "page_size": "A4", + "truncate_table": false + }, + "time_zone": "America/Sao_Paulo", + "frequency": { + "cron_expression": { + "day_of_month": "14", + "day_of_week": "1", + "hour": "18", + "month": "4", + "minute": "11", + "second": "57" + } + }, + "recipient_details": null + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/schedules/create", + "operationId": "createSchedule", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 2262 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "name": "hstoggellb1688027300858", + "description": "In est risus, auctor sed, tristique in, tempus sit amet, sem. Fusce consequat.", + "metadata_type": "LIVEBOARD", + "metadata_identifier": "78950be9-0717-449e-be26-64ea42617dd1", + "file_format": "CSV", + "liveboard_options": { + "visualization_identifiers": [] + }, + "pdf_options": { + "complete_liveboard": false, + "include_cover_page": true, + "include_custom_logo": false, + "include_filter_page": false, + "include_page_number": false, + "page_footer_text": "taudenisb", + "page_orientation": "LANDSCAPE", + "page_size": "A4", + "truncate_table": false + }, + "time_zone": "Asia/Chongqing", + "frequency": { + "cron_expression": { + "day_of_month": "25", + "day_of_week": "2", + "hour": "13", + "month": "1", + "minute": "58", + "second": "7" + } + }, + "recipient_details": null + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/schedules/create", + "operationId": "createSchedule", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 2263 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "name": null, + "description": "Nulla facilisi. Cras non velit nec nisi vulputate nonummy. Maecenas tincidunt lacus at velit. Vivamus vel nulla eget eros elementum pellentesque. Quisque porta volutpat erat.", + "metadata_type": "LIVEBOARD", + "metadata_identifier": "6715f768-8930-4180-9a3d-1efdbfaa8e7f", + "file_format": "PDF", + "liveboard_options": { + "visualization_identifiers": [] + }, + "pdf_options": { + "complete_liveboard": true, + "include_cover_page": false, + "include_custom_logo": true, + "include_filter_page": false, + "include_page_number": true, + "page_footer_text": "lgoranov5", + "page_orientation": "LANDSCAPE", + "page_size": "A4", + "truncate_table": true + }, + "time_zone": "Asia/Chongqing", + "frequency": { + "cron_expression": { + "day_of_month": "14", + "day_of_week": "0", + "hour": "15", + "month": "8", + "minute": "16", + "second": "33" + } + }, + "recipient_details": { + "emails": [ + "bgrabb5@mtv.com", + "rturville5@163.com", + "gmccobb5@w3.org" + ], + "principals": [ + { + "identifier": "046760d3-c0be-47d0-a9e7-a1b37c4e4432", + "type": "USER_GROUP" + }, + { + "identifier": "160b8fa4-4028-4ffe-a559-cbaf33c0a9b3", + "type": "USER" + }, + { + "identifier": "5dc626e5-1921-4758-a7bf-8501605aa59f", + "type": "USER" + } + ] + } + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/schedules/create", + "operationId": "createSchedule", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 2264 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "name": "mhoyes71688027300825", + "description": "Nunc nisl. Duis bibendum, felis sed interdum venenatis, turpis enim blandit mi, in porttitor pede justo eu massa. Donec dapibus. Duis at velit eu est congue elementum. In hac habitasse platea dictumst.", + "metadata_type": "LIVEBOARD", + "metadata_identifier": null, + "file_format": "PDF", + "liveboard_options": { + "visualization_identifiers": [] + }, + "pdf_options": { + "complete_liveboard": true, + "include_cover_page": false, + "include_custom_logo": true, + "include_filter_page": true, + "include_page_number": false, + "page_footer_text": "abovaird7", + "page_orientation": "LANDSCAPE", + "page_size": "A4", + "truncate_table": false + }, + "time_zone": "Europe/Brussels", + "frequency": { + "cron_expression": { + "day_of_month": "4", + "day_of_week": "6", + "hour": "22", + "month": "2", + "minute": "18", + "second": "41" + } + }, + "recipient_details": { + "emails": [ + "dgrishinov7@harvard.edu", + "janstead7@51.la", + "tmeharg7@mediafire.com" + ], + "principals": [ + { + "identifier": "046760d3-c0be-47d0-a9e7-a1b37c4e4432", + "type": "USER_GROUP" + }, + { + "identifier": "160b8fa4-4028-4ffe-a559-cbaf33c0a9b3", + "type": "USER" + }, + { + "identifier": "5dc626e5-1921-4758-a7bf-8501605aa59f", + "type": "USER" + } + ] + } + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/schedules/create", + "operationId": "createSchedule", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 2265 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "name": "dpeakmane1688027300868", + "description": "Morbi quis tortor id nulla ultrices aliquet. Maecenas leo odio, condimentum id, luctus nec, molestie sed, justo. Pellentesque viverra pede ac diam. Cras pellentesque volutpat dui.", + "metadata_type": "LIVEBOARD", + "metadata_identifier": "33248a57-cc70-4e39-9199-fb5092283381", + "file_format": "PDF", + "liveboard_options": { + "visualization_identifiers": [] + }, + "pdf_options": { + "complete_liveboard": true, + "include_cover_page": true, + "include_custom_logo": true, + "include_filter_page": false, + "include_page_number": true, + "page_footer_text": "dstannere", + "page_orientation": "LANDSCAPE", + "page_size": "A4", + "truncate_table": true + }, + "time_zone": null, + "frequency": { + "cron_expression": { + "day_of_month": "14", + "day_of_week": "3", + "hour": "21", + "month": "5", + "minute": "28", + "second": "56" + } + }, + "recipient_details": { + "emails": [ + "hmacaleesee@liveinternet.ru" + ], + "principals": [ + { + "identifier": "046760d3-c0be-47d0-a9e7-a1b37c4e4432", + "type": "USER_GROUP" + } + ] + } + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/schedules/create", + "operationId": "createSchedule", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 2266 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "name": "ncavan81688027300829", + "description": "Phasellus id sapien in sapien iaculis congue. Vivamus metus arcu, adipiscing molestie, hendrerit at, vulputate vitae, nisl. Aenean lectus.", + "metadata_type": "LIVEBOARD", + "metadata_identifier": "327f4d60-c502-43b0-b1d4-c73df5031a2e", + "file_format": "CSV", + "liveboard_options": { + "visualization_identifiers": [] + }, + "pdf_options": { + "complete_liveboard": false, + "include_cover_page": false, + "include_custom_logo": false, + "include_filter_page": true, + "include_page_number": false, + "page_footer_text": "mallery8", + "page_orientation": "LANDSCAPE", + "page_size": "A4", + "truncate_table": false + }, + "time_zone": null, + "frequency": { + "cron_expression": { + "day_of_month": "13", + "day_of_week": "2", + "hour": "9", + "month": "12", + "minute": "27", + "second": "2" + } + }, + "recipient_details": { + "emails": [ + "tstathers8@ucla.edu" + ], + "principals": [ + { + "identifier": "046760d3-c0be-47d0-a9e7-a1b37c4e4432", + "type": "USER_GROUP" + }, + { + "identifier": "160b8fa4-4028-4ffe-a559-cbaf33c0a9b3", + "type": "USER" + }, + { + "identifier": "5dc626e5-1921-4758-a7bf-8501605aa59f", + "type": "USER" + } + ] + } + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/schedules/create", + "operationId": "createSchedule", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 2267 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "name": "cmatteolic1688027300861", + "description": "Vivamus vestibulum sagittis sapien. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus.", + "metadata_type": "LIVEBOARD", + "metadata_identifier": null, + "file_format": "PDF", + "liveboard_options": { + "visualization_identifiers": [] + }, + "pdf_options": { + "complete_liveboard": true, + "include_cover_page": true, + "include_custom_logo": false, + "include_filter_page": true, + "include_page_number": true, + "page_footer_text": "djacobssonc", + "page_orientation": "PORTRAIT", + "page_size": "A4", + "truncate_table": true + }, + "time_zone": "America/Argentina/Buenos_Aires", + "frequency": { + "cron_expression": { + "day_of_month": "18", + "day_of_week": "6", + "hour": "15", + "month": "1", + "minute": "5", + "second": "3" + } + }, + "recipient_details": { + "emails": [ + "cmattackc@sun.com", + "ecoutthartc@1688.com" + ], + "principals": [ + { + "identifier": "046760d3-c0be-47d0-a9e7-a1b37c4e4432", + "type": "USER_GROUP" + }, + { + "identifier": "160b8fa4-4028-4ffe-a559-cbaf33c0a9b3", + "type": "USER" + } + ] + } + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/schedules/create", + "operationId": "createSchedule", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 2268 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "name": "glewing11688027300801", + "description": null, + "metadata_type": "LIVEBOARD", + "metadata_identifier": "78950be9-0717-449e-be26-64ea42617dd1", + "file_format": "PDF", + "liveboard_options": { + "visualization_identifiers": [] + }, + "pdf_options": { + "complete_liveboard": true, + "include_cover_page": false, + "include_custom_logo": true, + "include_filter_page": true, + "include_page_number": false, + "page_footer_text": "cgowar1", + "page_orientation": "LANDSCAPE", + "page_size": "A4", + "truncate_table": false + }, + "time_zone": "Asia/Manila", + "frequency": { + "cron_expression": { + "day_of_month": "4", + "day_of_week": "3", + "hour": "10", + "month": "7", + "minute": "14", + "second": "15" + } + }, + "recipient_details": { + "emails": [ + "alapley1@gov.uk" + ], + "principals": [ + { + "identifier": "046760d3-c0be-47d0-a9e7-a1b37c4e4432", + "type": "USER_GROUP" + }, + { + "identifier": "160b8fa4-4028-4ffe-a559-cbaf33c0a9b3", + "type": "USER" + }, + { + "identifier": "5dc626e5-1921-4758-a7bf-8501605aa59f", + "type": "USER" + } + ] + } + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/schedules/create", + "operationId": "createSchedule", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 2269 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "name": "hstoggellb1688027300858", + "description": "In est risus, auctor sed, tristique in, tempus sit amet, sem. Fusce consequat.", + "metadata_type": "LIVEBOARD", + "metadata_identifier": null, + "file_format": "CSV", + "liveboard_options": { + "visualization_identifiers": [] + }, + "pdf_options": { + "complete_liveboard": false, + "include_cover_page": true, + "include_custom_logo": false, + "include_filter_page": false, + "include_page_number": false, + "page_footer_text": "taudenisb", + "page_orientation": "LANDSCAPE", + "page_size": "A4", + "truncate_table": false + }, + "time_zone": "Asia/Chongqing", + "frequency": { + "cron_expression": { + "day_of_month": "25", + "day_of_week": "2", + "hour": "13", + "month": "1", + "minute": "58", + "second": "7" + } + }, + "recipient_details": { + "emails": [ + "mmcjarrowb@seesaa.net", + "bsmallpieceb@imageshack.us" + ], + "principals": [ + { + "identifier": "046760d3-c0be-47d0-a9e7-a1b37c4e4432", + "type": "USER_GROUP" + } + ] + } + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/schedules/create", + "operationId": "createSchedule", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 2270 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "name": "cpedracci61688027300822", + "description": "Vestibulum rutrum rutrum neque.", + "metadata_type": "LIVEBOARD", + "metadata_identifier": "b2d68a4f-cf67-4723-966f-8a592fdbf8b9", + "file_format": "PDF", + "liveboard_options": { + "visualization_identifiers": [] + }, + "pdf_options": { + "complete_liveboard": false, + "include_cover_page": true, + "include_custom_logo": true, + "include_filter_page": false, + "include_page_number": false, + "page_footer_text": "rchevalier6", + "page_orientation": "LANDSCAPE", + "page_size": "A4", + "truncate_table": true + }, + "time_zone": null, + "frequency": { + "cron_expression": { + "day_of_month": "9", + "day_of_week": "1", + "hour": "7", + "month": "3", + "minute": "41", + "second": "26" + } + }, + "recipient_details": { + "emails": [ + "ccromly6@canalblog.com", + "dbleier6@economist.com" + ], + "principals": [ + { + "identifier": "046760d3-c0be-47d0-a9e7-a1b37c4e4432", + "type": "USER_GROUP" + } + ] + } + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/schedules/create", + "operationId": "createSchedule", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 2271 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "name": null, + "description": "Nullam porttitor lacus at turpis. Donec posuere metus vitae ipsum. Aliquam non mauris. Morbi non lectus. Aliquam sit amet diam in magna bibendum imperdiet.", + "metadata_type": "LIVEBOARD", + "metadata_identifier": "e82fe65a-7ac0-4282-a783-7a35c01b8dbd", + "file_format": "CSV", + "liveboard_options": { + "visualization_identifiers": [] + }, + "pdf_options": { + "complete_liveboard": true, + "include_cover_page": true, + "include_custom_logo": true, + "include_filter_page": false, + "include_page_number": true, + "page_footer_text": "mleverich0", + "page_orientation": "PORTRAIT", + "page_size": "A4", + "truncate_table": false + }, + "time_zone": "Europe/Warsaw", + "frequency": { + "cron_expression": { + "day_of_month": "9", + "day_of_week": "5", + "hour": "18", + "month": "5", + "minute": "20", + "second": "23" + } + }, + "recipient_details": { + "emails": [ + "msach0@guardian.co.uk", + "ocreenan0@ucoz.ru" + ], + "principals": [ + { + "identifier": "046760d3-c0be-47d0-a9e7-a1b37c4e4432", + "type": "USER_GROUP" + } + ] + } + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/schedules/create", + "operationId": "createSchedule", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 2272 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "name": "bhartshorneg1688027300874", + "description": "Proin at turpis a pede posuere nonummy. Integer non velit.", + "metadata_type": "LIVEBOARD", + "metadata_identifier": "b2d68a4f-cf67-4723-966f-8a592fdbf8b9", + "file_format": "CSV", + "liveboard_options": { + "visualization_identifiers": [] + }, + "pdf_options": { + "complete_liveboard": false, + "include_cover_page": false, + "include_custom_logo": true, + "include_filter_page": false, + "include_page_number": true, + "page_footer_text": "klarverg", + "page_orientation": "LANDSCAPE", + "page_size": "A4", + "truncate_table": true + }, + "time_zone": null, + "frequency": { + "cron_expression": { + "day_of_month": "26", + "day_of_week": "0", + "hour": "20", + "month": "3", + "minute": "15", + "second": "1" + } + }, + "recipient_details": { + "emails": [ + "dpiesoldg@archive.org", + "nmedcraftg@umich.edu" + ], + "principals": [ + { + "identifier": "046760d3-c0be-47d0-a9e7-a1b37c4e4432", + "type": "USER_GROUP" + } + ] + } + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/schedules/create", + "operationId": "createSchedule", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 2273 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "name": "daustoni1688027300880", + "description": "Maecenas tincidunt lacus at velit. Vivamus vel nulla eget eros elementum pellentesque. Quisque porta volutpat erat. Quisque erat eros, viverra eget, congue eget, semper rutrum, nulla.", + "metadata_type": "LIVEBOARD", + "metadata_identifier": "327f4d60-c502-43b0-b1d4-c73df5031a2e", + "file_format": "CSV", + "liveboard_options": { + "visualization_identifiers": [] + }, + "pdf_options": { + "complete_liveboard": true, + "include_cover_page": true, + "include_custom_logo": true, + "include_filter_page": true, + "include_page_number": false, + "page_footer_text": "vmacgregori", + "page_orientation": "LANDSCAPE", + "page_size": "A4", + "truncate_table": true + }, + "time_zone": "Asia/Shanghai", + "frequency": { + "cron_expression": { + "day_of_month": "22", + "day_of_week": "4", + "hour": "6", + "month": "9", + "minute": "50", + "second": "29" + } + }, + "recipient_details": null + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/schedules/create", + "operationId": "createSchedule", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 2274 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "name": "trushton01688027300763", + "description": "Nullam porttitor lacus at turpis. Donec posuere metus vitae ipsum. Aliquam non mauris. Morbi non lectus. Aliquam sit amet diam in magna bibendum imperdiet.", + "metadata_type": "LIVEBOARD", + "metadata_identifier": "e82fe65a-7ac0-4282-a783-7a35c01b8dbd", + "file_format": "CSV", + "liveboard_options": { + "visualization_identifiers": [] + }, + "pdf_options": { + "complete_liveboard": true, + "include_cover_page": true, + "include_custom_logo": true, + "include_filter_page": false, + "include_page_number": true, + "page_footer_text": "mleverich0", + "page_orientation": "PORTRAIT", + "page_size": "A4", + "truncate_table": false + }, + "time_zone": "Europe/Warsaw", + "frequency": { + "cron_expression": { + "day_of_month": "9", + "day_of_week": "5", + "hour": "18", + "month": "5", + "minute": "20", + "second": "23" + } + }, + "recipient_details": null + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/schedules/create", + "operationId": "createSchedule", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 2275 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "name": "ktroyesf1688027300871", + "description": [ + "Nunc", + "rhoncus", + "dui", + "vel", + "sem.", + "Sed", + "sagittis." + ], + "metadata_type": "LIVEBOARD", + "metadata_identifier": "6715f768-8930-4180-9a3d-1efdbfaa8e7f", + "file_format": "PDF", + "liveboard_options": { + "visualization_identifiers": [] + }, + "pdf_options": { + "complete_liveboard": true, + "include_cover_page": false, + "include_custom_logo": true, + "include_filter_page": false, + "include_page_number": true, + "page_footer_text": "omealiffef", + "page_orientation": "LANDSCAPE", + "page_size": "A4", + "truncate_table": true + }, + "time_zone": "Asia/Shanghai", + "frequency": { + "cron_expression": { + "day_of_month": "23", + "day_of_week": "5", + "hour": "8", + "month": "12", + "minute": "46", + "second": "57" + } + }, + "recipient_details": { + "emails": [ + "spratif@taobao.com", + "mhanrottf@cafepress.com" + ], + "principals": [ + { + "identifier": "046760d3-c0be-47d0-a9e7-a1b37c4e4432", + "type": "USER_GROUP" + } + ] + } + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/schedules/create", + "operationId": "createSchedule", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 2276 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "name": [ + "syokley91688027300833" + ], + "description": "Morbi ut odio. Cras mi pede, malesuada in, imperdiet et, commodo vulputate, justo.", + "metadata_type": "LIVEBOARD", + "metadata_identifier": "601be8e5-140e-477c-8812-843795306438", + "file_format": "PDF", + "liveboard_options": { + "visualization_identifiers": [] + }, + "pdf_options": { + "complete_liveboard": false, + "include_cover_page": false, + "include_custom_logo": false, + "include_filter_page": true, + "include_page_number": false, + "page_footer_text": "hernshaw9", + "page_orientation": "LANDSCAPE", + "page_size": "A4", + "truncate_table": false + }, + "time_zone": "Europe/Athens", + "frequency": { + "cron_expression": { + "day_of_month": "28", + "day_of_week": "0", + "hour": "2", + "month": "9", + "minute": "51", + "second": "33" + } + }, + "recipient_details": { + "emails": [ + "acattanach9@umich.edu", + "bvandenhof9@ibm.com" + ], + "principals": [ + { + "identifier": "046760d3-c0be-47d0-a9e7-a1b37c4e4432", + "type": "USER_GROUP" + }, + { + "identifier": "160b8fa4-4028-4ffe-a559-cbaf33c0a9b3", + "type": "USER" + } + ] + } + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/schedules/create", + "operationId": "createSchedule", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 2277 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "name": "gpavlitschek21688027300807", + "description": "Sed ante. Vivamus tortor. Duis mattis egestas metus. Aenean fermentum. Donec ut mauris eget massa tempor convallis.", + "metadata_type": [ + "LIVEBOARD" + ], + "metadata_identifier": "2ff57a24-cf90-485f-8b4b-45fc17474c6f", + "file_format": "PDF", + "liveboard_options": { + "visualization_identifiers": [] + }, + "pdf_options": { + "complete_liveboard": true, + "include_cover_page": true, + "include_custom_logo": true, + "include_filter_page": true, + "include_page_number": true, + "page_footer_text": "hcumes2", + "page_orientation": "LANDSCAPE", + "page_size": "A4", + "truncate_table": false + }, + "time_zone": "America/Sao_Paulo", + "frequency": { + "cron_expression": { + "day_of_month": "14", + "day_of_week": "1", + "hour": "18", + "month": "4", + "minute": "11", + "second": "57" + } + }, + "recipient_details": { + "emails": [ + "sgosnoll2@amazon.co.uk", + "mwyldish2@addthis.com", + "cding2@telegraph.co.uk" + ], + "principals": [ + { + "identifier": "046760d3-c0be-47d0-a9e7-a1b37c4e4432", + "type": "USER_GROUP" + }, + { + "identifier": "160b8fa4-4028-4ffe-a559-cbaf33c0a9b3", + "type": "USER" + }, + { + "identifier": "5dc626e5-1921-4758-a7bf-8501605aa59f", + "type": "USER" + } + ] + } + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/schedules/create", + "operationId": "createSchedule", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 2278 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "name": "cmatteolic1688027300861", + "description": "Vivamus vestibulum sagittis sapien. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus.", + "metadata_type": "LIVEBOARD", + "metadata_identifier": "2ff57a24-cf90-485f-8b4b-45fc17474c6f", + "file_format": [ + "PDF" + ], + "liveboard_options": { + "visualization_identifiers": [] + }, + "pdf_options": { + "complete_liveboard": true, + "include_cover_page": true, + "include_custom_logo": false, + "include_filter_page": true, + "include_page_number": true, + "page_footer_text": "djacobssonc", + "page_orientation": "PORTRAIT", + "page_size": "A4", + "truncate_table": true + }, + "time_zone": "America/Argentina/Buenos_Aires", + "frequency": { + "cron_expression": { + "day_of_month": "18", + "day_of_week": "6", + "hour": "15", + "month": "1", + "minute": "5", + "second": "3" + } + }, + "recipient_details": { + "emails": [ + "cmattackc@sun.com", + "ecoutthartc@1688.com" + ], + "principals": [ + { + "identifier": "046760d3-c0be-47d0-a9e7-a1b37c4e4432", + "type": "USER_GROUP" + }, + { + "identifier": "160b8fa4-4028-4ffe-a559-cbaf33c0a9b3", + "type": "USER" + } + ] + } + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/schedules/create", + "operationId": "createSchedule", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 2279 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "name": "ncavan81688027300829", + "description": [ + "Phasellus", + "id", + "sapien", + "in", + "sapien", + "iaculis", + "congue.", + "Vivamus", + "metus", + "arcu,", + "adipiscing", + "molestie,", + "hendrerit", + "at,", + "vulputate", + "vitae,", + "nisl.", + "Aenean", + "lectus." + ], + "metadata_type": "LIVEBOARD", + "metadata_identifier": "327f4d60-c502-43b0-b1d4-c73df5031a2e", + "file_format": "CSV", + "liveboard_options": { + "visualization_identifiers": [] + }, + "pdf_options": { + "complete_liveboard": false, + "include_cover_page": false, + "include_custom_logo": false, + "include_filter_page": true, + "include_page_number": false, + "page_footer_text": "mallery8", + "page_orientation": "LANDSCAPE", + "page_size": "A4", + "truncate_table": false + }, + "time_zone": "Asia/Nicosia", + "frequency": { + "cron_expression": { + "day_of_month": "13", + "day_of_week": "2", + "hour": "9", + "month": "12", + "minute": "27", + "second": "2" + } + }, + "recipient_details": { + "emails": [ + "tstathers8@ucla.edu" + ], + "principals": [ + { + "identifier": "046760d3-c0be-47d0-a9e7-a1b37c4e4432", + "type": "USER_GROUP" + }, + { + "identifier": "160b8fa4-4028-4ffe-a559-cbaf33c0a9b3", + "type": "USER" + }, + { + "identifier": "5dc626e5-1921-4758-a7bf-8501605aa59f", + "type": "USER" + } + ] + } + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/schedules/create", + "operationId": "createSchedule", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 2280 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "name": "mhoyes71688027300825", + "description": "Nunc nisl. Duis bibendum, felis sed interdum venenatis, turpis enim blandit mi, in porttitor pede justo eu massa. Donec dapibus. Duis at velit eu est congue elementum. In hac habitasse platea dictumst.", + "metadata_type": [ + "LIVEBOARD" + ], + "metadata_identifier": "262abdac-b00f-4f5f-ad33-fcf10154184f", + "file_format": "PDF", + "liveboard_options": { + "visualization_identifiers": [] + }, + "pdf_options": { + "complete_liveboard": true, + "include_cover_page": false, + "include_custom_logo": true, + "include_filter_page": true, + "include_page_number": false, + "page_footer_text": "abovaird7", + "page_orientation": "LANDSCAPE", + "page_size": "A4", + "truncate_table": false + }, + "time_zone": "Europe/Brussels", + "frequency": { + "cron_expression": { + "day_of_month": "4", + "day_of_week": "6", + "hour": "22", + "month": "2", + "minute": "18", + "second": "41" + } + }, + "recipient_details": { + "emails": [ + "dgrishinov7@harvard.edu", + "janstead7@51.la", + "tmeharg7@mediafire.com" + ], + "principals": [ + { + "identifier": "046760d3-c0be-47d0-a9e7-a1b37c4e4432", + "type": "USER_GROUP" + }, + { + "identifier": "160b8fa4-4028-4ffe-a559-cbaf33c0a9b3", + "type": "USER" + }, + { + "identifier": "5dc626e5-1921-4758-a7bf-8501605aa59f", + "type": "USER" + } + ] + } + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/schedules/create", + "operationId": "createSchedule", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 2281 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "name": "slonglands31688027300811", + "description": "In eleifend quam a odio. In hac habitasse platea dictumst. Maecenas ut massa quis augue luctus tincidunt.", + "metadata_type": [ + "LIVEBOARD" + ], + "metadata_identifier": "4145513c-c9bd-4e48-af44-8dc001b5f955", + "file_format": "CSV", + "liveboard_options": { + "visualization_identifiers": [] + }, + "pdf_options": { + "complete_liveboard": true, + "include_cover_page": false, + "include_custom_logo": true, + "include_filter_page": false, + "include_page_number": true, + "page_footer_text": "drasmus3", + "page_orientation": "PORTRAIT", + "page_size": "A4", + "truncate_table": true + }, + "time_zone": "Asia/Jakarta", + "frequency": { + "cron_expression": { + "day_of_month": "13", + "day_of_week": "4", + "hour": "22", + "month": "10", + "minute": "43", + "second": "7" + } + }, + "recipient_details": { + "emails": [ + "gleatherbarrow3@hatena.ne.jp" + ], + "principals": [ + { + "identifier": "046760d3-c0be-47d0-a9e7-a1b37c4e4432", + "type": "USER_GROUP" + }, + { + "identifier": "160b8fa4-4028-4ffe-a559-cbaf33c0a9b3", + "type": "USER" + } + ] + } + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/schedules/create", + "operationId": "createSchedule", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 2282 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "name": "slonglands31688027300811", + "description": "In eleifend quam a odio. In hac habitasse platea dictumst. Maecenas ut massa quis augue luctus tincidunt.", + "metadata_type": [ + "LIVEBOARD" + ], + "metadata_identifier": "4145513c-c9bd-4e48-af44-8dc001b5f955", + "file_format": "CSV", + "liveboard_options": { + "visualization_identifiers": [] + }, + "pdf_options": { + "complete_liveboard": true, + "include_cover_page": false, + "include_custom_logo": true, + "include_filter_page": false, + "include_page_number": true, + "page_footer_text": "drasmus3", + "page_orientation": "PORTRAIT", + "page_size": "A4", + "truncate_table": true + }, + "time_zone": "Asia/Jakarta", + "frequency": { + "cron_expression": { + "day_of_month": "13", + "day_of_week": "4", + "hour": "22", + "month": "10", + "minute": "43", + "second": "7" + } + }, + "recipient_details": { + "emails": [ + "gleatherbarrow3@hatena.ne.jp" + ], + "principals": [ + { + "identifier": "046760d3-c0be-47d0-a9e7-a1b37c4e4432", + "type": "USER_GROUP" + }, + { + "identifier": "160b8fa4-4028-4ffe-a559-cbaf33c0a9b3", + "type": "USER" + } + ] + } + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/schedules/create", + "operationId": "createSchedule", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 2283 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "name": "escadd1688027300865", + "description": "In congue. Etiam justo. Etiam pretium iaculis justo.", + "metadata_type": "LIVEBOARD", + "metadata_identifier": [ + "4145513c-c9bd-4e48-af44-8dc001b5f955" + ], + "file_format": "CSV", + "liveboard_options": { + "visualization_identifiers": [] + }, + "pdf_options": { + "complete_liveboard": true, + "include_cover_page": false, + "include_custom_logo": true, + "include_filter_page": true, + "include_page_number": true, + "page_footer_text": "swaplesd", + "page_orientation": "PORTRAIT", + "page_size": "A4", + "truncate_table": false + }, + "time_zone": "Asia/Harbin", + "frequency": { + "cron_expression": { + "day_of_month": "11", + "day_of_week": "6", + "hour": "22", + "month": "1", + "minute": "44", + "second": "0" + } + }, + "recipient_details": { + "emails": [ + "sfeverd@theatlantic.com" + ], + "principals": [ + { + "identifier": "046760d3-c0be-47d0-a9e7-a1b37c4e4432", + "type": "USER_GROUP" + }, + { + "identifier": "160b8fa4-4028-4ffe-a559-cbaf33c0a9b3", + "type": "USER" + }, + { + "identifier": "5dc626e5-1921-4758-a7bf-8501605aa59f", + "type": "USER" + } + ] + } + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/schedules/create", + "operationId": "createSchedule", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 2284 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "name": [ + "mmcmychemh1688027300877" + ], + "description": "Pellentesque viverra pede ac diam. Cras pellentesque volutpat dui. Maecenas tristique, est et tempus semper, est quam pharetra magna, ac consequat metus sapien ut nunc.", + "metadata_type": "LIVEBOARD", + "metadata_identifier": "262abdac-b00f-4f5f-ad33-fcf10154184f", + "file_format": "PDF", + "liveboard_options": { + "visualization_identifiers": [] + }, + "pdf_options": { + "complete_liveboard": true, + "include_cover_page": true, + "include_custom_logo": true, + "include_filter_page": false, + "include_page_number": true, + "page_footer_text": "scharlwoodh", + "page_orientation": "LANDSCAPE", + "page_size": "A4", + "truncate_table": false + }, + "time_zone": "Europe/Moscow", + "frequency": { + "cron_expression": { + "day_of_month": "12", + "day_of_week": "5", + "hour": "19", + "month": "12", + "minute": "25", + "second": "0" + } + }, + "recipient_details": { + "emails": [ + "cfulgerh@unesco.org" + ], + "principals": [ + { + "identifier": "046760d3-c0be-47d0-a9e7-a1b37c4e4432", + "type": "USER_GROUP" + } + ] + } + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/schedules/create", + "operationId": "createSchedule", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 2285 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "name": "escadd1688027300865", + "description": "In congue. Etiam justo. Etiam pretium iaculis justo.", + "metadata_type": "LIVEBOARD", + "metadata_identifier": "4145513c-c9bd-4e48-af44-8dc001b5f955", + "file_format": "CSV", + "liveboard_options": [ + [ + "visualization_identifiers", + [] + ] + ], + "pdf_options": { + "complete_liveboard": true, + "include_cover_page": false, + "include_custom_logo": true, + "include_filter_page": true, + "include_page_number": true, + "page_footer_text": "swaplesd", + "page_orientation": "PORTRAIT", + "page_size": "A4", + "truncate_table": false + }, + "time_zone": "Asia/Harbin", + "frequency": { + "cron_expression": { + "day_of_month": "11", + "day_of_week": "6", + "hour": "22", + "month": "1", + "minute": "44", + "second": "0" + } + }, + "recipient_details": { + "emails": [ + "sfeverd@theatlantic.com" + ], + "principals": [ + { + "identifier": "046760d3-c0be-47d0-a9e7-a1b37c4e4432", + "type": "USER_GROUP" + }, + { + "identifier": "160b8fa4-4028-4ffe-a559-cbaf33c0a9b3", + "type": "USER" + }, + { + "identifier": "5dc626e5-1921-4758-a7bf-8501605aa59f", + "type": "USER" + } + ] + } + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/schedules/create", + "operationId": "createSchedule", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 2286 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "name": "rgantzmana1688027300855", + "description": "Fusce consequat.", + "metadata_type": "LIVEBOARD", + "metadata_identifier": "e82fe65a-7ac0-4282-a783-7a35c01b8dbd", + "file_format": "CSV", + "liveboard_options": { + "visualization_identifiers": [] + }, + "pdf_options": [ + [ + "complete_liveboard", + true + ], + [ + "include_cover_page", + false + ], + [ + "include_custom_logo", + false + ], + [ + "include_filter_page", + true + ], + [ + "include_page_number", + false + ], + [ + "page_footer_text", + "lcasarolia" + ], + [ + "page_orientation", + "LANDSCAPE" + ], + [ + "page_size", + "A4" + ], + [ + "truncate_table", + true + ] + ], + "time_zone": "Europe/Lisbon", + "frequency": { + "cron_expression": { + "day_of_month": "12", + "day_of_week": "1", + "hour": "7", + "month": "2", + "minute": "9", + "second": "16" + } + }, + "recipient_details": { + "emails": [ + "jmarlera@economist.com" + ], + "principals": [ + { + "identifier": "046760d3-c0be-47d0-a9e7-a1b37c4e4432", + "type": "USER_GROUP" + } + ] + } + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/schedules/create", + "operationId": "createSchedule", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 2287 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "name": "syokley91688027300833", + "description": [ + "Morbi", + "ut", + "odio.", + "Cras", + "mi", + "pede,", + "malesuada", + "in,", + "imperdiet", + "et,", + "commodo", + "vulputate,", + "justo." + ], + "metadata_type": "LIVEBOARD", + "metadata_identifier": "601be8e5-140e-477c-8812-843795306438", + "file_format": "PDF", + "liveboard_options": { + "visualization_identifiers": [] + }, + "pdf_options": { + "complete_liveboard": false, + "include_cover_page": false, + "include_custom_logo": false, + "include_filter_page": true, + "include_page_number": false, + "page_footer_text": "hernshaw9", + "page_orientation": "LANDSCAPE", + "page_size": "A4", + "truncate_table": false + }, + "time_zone": "Europe/Athens", + "frequency": { + "cron_expression": { + "day_of_month": "28", + "day_of_week": "0", + "hour": "2", + "month": "9", + "minute": "51", + "second": "33" + } + }, + "recipient_details": { + "emails": [ + "acattanach9@umich.edu", + "bvandenhof9@ibm.com" + ], + "principals": [ + { + "identifier": "046760d3-c0be-47d0-a9e7-a1b37c4e4432", + "type": "USER_GROUP" + }, + { + "identifier": "160b8fa4-4028-4ffe-a559-cbaf33c0a9b3", + "type": "USER" + } + ] + } + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/schedules/create", + "operationId": "createSchedule", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 2288 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "name": "glewing11688027300801", + "description": "Donec posuere metus vitae ipsum. Aliquam non mauris. Morbi non lectus. Aliquam sit amet diam in magna bibendum imperdiet.", + "metadata_type": "LIVEBOARD", + "metadata_identifier": "78950be9-0717-449e-be26-64ea42617dd1", + "file_format": "PDF", + "liveboard_options": { + "visualization_identifiers": [] + }, + "pdf_options": { + "complete_liveboard": true, + "include_cover_page": false, + "include_custom_logo": true, + "include_filter_page": true, + "include_page_number": false, + "page_footer_text": "cgowar1", + "page_orientation": "LANDSCAPE", + "page_size": "A4", + "truncate_table": false + }, + "time_zone": [ + "Asia/Manila" + ], + "frequency": { + "cron_expression": { + "day_of_month": "4", + "day_of_week": "3", + "hour": "10", + "month": "7", + "minute": "14", + "second": "15" + } + }, + "recipient_details": { + "emails": [ + "alapley1@gov.uk" + ], + "principals": [ + { + "identifier": "046760d3-c0be-47d0-a9e7-a1b37c4e4432", + "type": "USER_GROUP" + }, + { + "identifier": "160b8fa4-4028-4ffe-a559-cbaf33c0a9b3", + "type": "USER" + }, + { + "identifier": "5dc626e5-1921-4758-a7bf-8501605aa59f", + "type": "USER" + } + ] + } + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/schedules/create", + "operationId": "createSchedule", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 2289 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "name": "ktroyesf1688027300871", + "description": "Nunc rhoncus dui vel sem. Sed sagittis.", + "metadata_type": "LIVEBOARD", + "metadata_identifier": "6715f768-8930-4180-9a3d-1efdbfaa8e7f", + "file_format": "PDF", + "liveboard_options": { + "visualization_identifiers": [] + }, + "pdf_options": [ + [ + "complete_liveboard", + true + ], + [ + "include_cover_page", + false + ], + [ + "include_custom_logo", + true + ], + [ + "include_filter_page", + false + ], + [ + "include_page_number", + true + ], + [ + "page_footer_text", + "omealiffef" + ], + [ + "page_orientation", + "LANDSCAPE" + ], + [ + "page_size", + "A4" + ], + [ + "truncate_table", + true + ] + ], + "time_zone": "Asia/Shanghai", + "frequency": { + "cron_expression": { + "day_of_month": "23", + "day_of_week": "5", + "hour": "8", + "month": "12", + "minute": "46", + "second": "57" + } + }, + "recipient_details": { + "emails": [ + "spratif@taobao.com", + "mhanrottf@cafepress.com" + ], + "principals": [ + { + "identifier": "046760d3-c0be-47d0-a9e7-a1b37c4e4432", + "type": "USER_GROUP" + } + ] + } + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/schedules/create", + "operationId": "createSchedule", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 2290 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "name": "slonglands31688027300811", + "description": "In eleifend quam a odio. In hac habitasse platea dictumst. Maecenas ut massa quis augue luctus tincidunt.", + "metadata_type": "LIVEBOARD", + "metadata_identifier": "zUhbKrmNcNpAjZB", + "file_format": "CSV", + "liveboard_options": { + "visualization_identifiers": [] + }, + "pdf_options": { + "complete_liveboard": true, + "include_cover_page": false, + "include_custom_logo": true, + "include_filter_page": false, + "include_page_number": true, + "page_footer_text": "drasmus3", + "page_orientation": "PORTRAIT", + "page_size": "A4", + "truncate_table": true + }, + "time_zone": "Asia/Jakarta", + "frequency": { + "cron_expression": { + "day_of_month": "13", + "day_of_week": "4", + "hour": "22", + "month": "10", + "minute": "43", + "second": "7" + } + }, + "recipient_details": { + "emails": [ + "gleatherbarrow3@hatena.ne.jp" + ], + "principals": [ + { + "identifier": "046760d3-c0be-47d0-a9e7-a1b37c4e4432", + "type": "USER_GROUP" + }, + { + "identifier": "160b8fa4-4028-4ffe-a559-cbaf33c0a9b3", + "type": "USER" + } + ] + } + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/schedules/create", + "operationId": "createSchedule", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 2291 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "name": "kfullick41688027300814", + "description": "Vestibulum ante ipsum primis in faucibus orci luctus et ultrices posuere cubilia Curae; Nulla dapibus dolor vel est. Donec odio justo, sollicitudin ut, suscipit a, feugiat et, eros. Vestibulum ac est lacinia nisi venenatis tristique.", + "metadata_type": "LIVEBOARD", + "metadata_identifier": "mcLhvWeMtjaYLRO", + "file_format": "CSV", + "liveboard_options": { + "visualization_identifiers": [] + }, + "pdf_options": { + "complete_liveboard": false, + "include_cover_page": true, + "include_custom_logo": true, + "include_filter_page": true, + "include_page_number": true, + "page_footer_text": "pjurasek4", + "page_orientation": "LANDSCAPE", + "page_size": "A4", + "truncate_table": true + }, + "time_zone": "Europe/Prague", + "frequency": { + "cron_expression": { + "day_of_month": "21", + "day_of_week": "1", + "hour": "2", + "month": "4", + "minute": "19", + "second": "5" + } + }, + "recipient_details": { + "emails": [ + "bpiola4@jalbum.net" + ], + "principals": [ + { + "identifier": "046760d3-c0be-47d0-a9e7-a1b37c4e4432", + "type": "USER_GROUP" + }, + { + "identifier": "160b8fa4-4028-4ffe-a559-cbaf33c0a9b3", + "type": "USER" + }, + { + "identifier": "5dc626e5-1921-4758-a7bf-8501605aa59f", + "type": "USER" + } + ] + } + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/schedules/create", + "operationId": "createSchedule", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 2292 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "name": "ktroyesf1688027300871", + "description": "Nunc rhoncus dui vel sem. Sed sagittis.", + "metadata_type": "LIVEBOARD", + "metadata_identifier": "svvZaMHQlqGgzxM", + "file_format": "PDF", + "liveboard_options": { + "visualization_identifiers": [] + }, + "pdf_options": { + "complete_liveboard": true, + "include_cover_page": false, + "include_custom_logo": true, + "include_filter_page": false, + "include_page_number": true, + "page_footer_text": "omealiffef", + "page_orientation": "LANDSCAPE", + "page_size": "A4", + "truncate_table": true + }, + "time_zone": "Asia/Shanghai", + "frequency": { + "cron_expression": { + "day_of_month": "23", + "day_of_week": "5", + "hour": "8", + "month": "12", + "minute": "46", + "second": "57" + } + }, + "recipient_details": { + "emails": [ + "spratif@taobao.com", + "mhanrottf@cafepress.com" + ], + "principals": [ + { + "identifier": "046760d3-c0be-47d0-a9e7-a1b37c4e4432", + "type": "USER_GROUP" + } + ] + } + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/schedules/create", + "operationId": "createSchedule", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 2293 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "name": "glewing11688027300801", + "description": "Donec posuere metus vitae ipsum. Aliquam non mauris. Morbi non lectus. Aliquam sit amet diam in magna bibendum imperdiet.", + "metadata_type": "LIVEBOARD", + "metadata_identifier": "PvLNIgdpPeHkuJn", + "file_format": "PDF", + "liveboard_options": { + "visualization_identifiers": [] + }, + "pdf_options": { + "complete_liveboard": true, + "include_cover_page": false, + "include_custom_logo": true, + "include_filter_page": true, + "include_page_number": false, + "page_footer_text": "cgowar1", + "page_orientation": "LANDSCAPE", + "page_size": "A4", + "truncate_table": false + }, + "time_zone": "Asia/Manila", + "frequency": { + "cron_expression": { + "day_of_month": "4", + "day_of_week": "3", + "hour": "10", + "month": "7", + "minute": "14", + "second": "15" + } + }, + "recipient_details": { + "emails": [ + "alapley1@gov.uk" + ], + "principals": [ + { + "identifier": "046760d3-c0be-47d0-a9e7-a1b37c4e4432", + "type": "USER_GROUP" + }, + { + "identifier": "160b8fa4-4028-4ffe-a559-cbaf33c0a9b3", + "type": "USER" + }, + { + "identifier": "5dc626e5-1921-4758-a7bf-8501605aa59f", + "type": "USER" + } + ] + } + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/schedules/create", + "operationId": "createSchedule", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 2294 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "name": "trushton01688027300763", + "description": "Nullam porttitor lacus at turpis. Donec posuere metus vitae ipsum. Aliquam non mauris. Morbi non lectus. Aliquam sit amet diam in magna bibendum imperdiet.", + "metadata_type": "LIVEBOARD", + "metadata_identifier": "HxbgvCZPGxDLawB", + "file_format": "CSV", + "liveboard_options": { + "visualization_identifiers": [] + }, + "pdf_options": { + "complete_liveboard": true, + "include_cover_page": true, + "include_custom_logo": true, + "include_filter_page": false, + "include_page_number": true, + "page_footer_text": "mleverich0", + "page_orientation": "PORTRAIT", + "page_size": "A4", + "truncate_table": false + }, + "time_zone": "Europe/Warsaw", + "frequency": { + "cron_expression": { + "day_of_month": "9", + "day_of_week": "5", + "hour": "18", + "month": "5", + "minute": "20", + "second": "23" + } + }, + "recipient_details": { + "emails": [ + "msach0@guardian.co.uk", + "ocreenan0@ucoz.ru" + ], + "principals": [ + { + "identifier": "046760d3-c0be-47d0-a9e7-a1b37c4e4432", + "type": "USER_GROUP" + } + ] + } + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/schedules/create", + "operationId": "createSchedule", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 2295 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "name": "gpavlitschek21688027300807", + "description": "Sed ante. Vivamus tortor. Duis mattis egestas metus. Aenean fermentum. Donec ut mauris eget massa tempor convallis.", + "metadata_type": "LIVEBOARD", + "metadata_identifier": "cdruqGOUmFORRna", + "file_format": "PDF", + "liveboard_options": { + "visualization_identifiers": [] + }, + "pdf_options": { + "complete_liveboard": true, + "include_cover_page": true, + "include_custom_logo": true, + "include_filter_page": true, + "include_page_number": true, + "page_footer_text": "hcumes2", + "page_orientation": "LANDSCAPE", + "page_size": "A4", + "truncate_table": false + }, + "time_zone": "America/Sao_Paulo", + "frequency": { + "cron_expression": { + "day_of_month": "14", + "day_of_week": "1", + "hour": "18", + "month": "4", + "minute": "11", + "second": "57" + } + }, + "recipient_details": { + "emails": [ + "sgosnoll2@amazon.co.uk", + "mwyldish2@addthis.com", + "cding2@telegraph.co.uk" + ], + "principals": [ + { + "identifier": "046760d3-c0be-47d0-a9e7-a1b37c4e4432", + "type": "USER_GROUP" + }, + { + "identifier": "160b8fa4-4028-4ffe-a559-cbaf33c0a9b3", + "type": "USER" + }, + { + "identifier": "5dc626e5-1921-4758-a7bf-8501605aa59f", + "type": "USER" + } + ] + } + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/schedules/create", + "operationId": "createSchedule", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 2296 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "name": "mhoyes71688027300825", + "description": "Nunc nisl. Duis bibendum, felis sed interdum venenatis, turpis enim blandit mi, in porttitor pede justo eu massa. Donec dapibus. Duis at velit eu est congue elementum. In hac habitasse platea dictumst.", + "metadata_type": "LIVEBOARD", + "metadata_identifier": "oZHjvLEpeaERTpO", + "file_format": "PDF", + "liveboard_options": { + "visualization_identifiers": [] + }, + "pdf_options": { + "complete_liveboard": true, + "include_cover_page": false, + "include_custom_logo": true, + "include_filter_page": true, + "include_page_number": false, + "page_footer_text": "abovaird7", + "page_orientation": "LANDSCAPE", + "page_size": "A4", + "truncate_table": false + }, + "time_zone": "Europe/Brussels", + "frequency": { + "cron_expression": { + "day_of_month": "4", + "day_of_week": "6", + "hour": "22", + "month": "2", + "minute": "18", + "second": "41" + } + }, + "recipient_details": { + "emails": [ + "dgrishinov7@harvard.edu", + "janstead7@51.la", + "tmeharg7@mediafire.com" + ], + "principals": [ + { + "identifier": "046760d3-c0be-47d0-a9e7-a1b37c4e4432", + "type": "USER_GROUP" + }, + { + "identifier": "160b8fa4-4028-4ffe-a559-cbaf33c0a9b3", + "type": "USER" + }, + { + "identifier": "5dc626e5-1921-4758-a7bf-8501605aa59f", + "type": "USER" + } + ] + } + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/schedules/create", + "operationId": "createSchedule", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 2297 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "name": "syokley91688027300833", + "description": "Morbi ut odio. Cras mi pede, malesuada in, imperdiet et, commodo vulputate, justo.", + "metadata_type": "LIVEBOARD", + "metadata_identifier": "zXbjuJULeuGvwhd", + "file_format": "PDF", + "liveboard_options": { + "visualization_identifiers": [] + }, + "pdf_options": { + "complete_liveboard": false, + "include_cover_page": false, + "include_custom_logo": false, + "include_filter_page": true, + "include_page_number": false, + "page_footer_text": "hernshaw9", + "page_orientation": "LANDSCAPE", + "page_size": "A4", + "truncate_table": false + }, + "time_zone": "Europe/Athens", + "frequency": { + "cron_expression": { + "day_of_month": "28", + "day_of_week": "0", + "hour": "2", + "month": "9", + "minute": "51", + "second": "33" + } + }, + "recipient_details": { + "emails": [ + "acattanach9@umich.edu", + "bvandenhof9@ibm.com" + ], + "principals": [ + { + "identifier": "046760d3-c0be-47d0-a9e7-a1b37c4e4432", + "type": "USER_GROUP" + }, + { + "identifier": "160b8fa4-4028-4ffe-a559-cbaf33c0a9b3", + "type": "USER" + } + ] + } + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/schedules/create", + "operationId": "createSchedule", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 2298 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "name": "dpeakmane1688027300868", + "description": "Morbi quis tortor id nulla ultrices aliquet. Maecenas leo odio, condimentum id, luctus nec, molestie sed, justo. Pellentesque viverra pede ac diam. Cras pellentesque volutpat dui.", + "metadata_type": "LIVEBOARD", + "metadata_identifier": "PxyjCKuPAVKMpaQ", + "file_format": "PDF", + "liveboard_options": { + "visualization_identifiers": [] + }, + "pdf_options": { + "complete_liveboard": true, + "include_cover_page": true, + "include_custom_logo": true, + "include_filter_page": false, + "include_page_number": true, + "page_footer_text": "dstannere", + "page_orientation": "LANDSCAPE", + "page_size": "A4", + "truncate_table": true + }, + "time_zone": "Africa/Lagos", + "frequency": { + "cron_expression": { + "day_of_month": "14", + "day_of_week": "3", + "hour": "21", + "month": "5", + "minute": "28", + "second": "56" + } + }, + "recipient_details": { + "emails": [ + "hmacaleesee@liveinternet.ru" + ], + "principals": [ + { + "identifier": "046760d3-c0be-47d0-a9e7-a1b37c4e4432", + "type": "USER_GROUP" + } + ] + } + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/schedules/create", + "operationId": "createSchedule", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 2299 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "name": "gpavlitschek21688027300807", + "description": "Sed ante. Vivamus tortor. Duis mattis egestas metus. Aenean fermentum. Donec ut mauris eget massa tempor convallis.", + "metadata_type": "LIVEBOARD", + "metadata_identifier": "IsKtrtffBDoIPxJ", + "file_format": "PDF", + "liveboard_options": { + "visualization_identifiers": [] + }, + "pdf_options": { + "complete_liveboard": true, + "include_cover_page": true, + "include_custom_logo": true, + "include_filter_page": true, + "include_page_number": true, + "page_footer_text": "hcumes2", + "page_orientation": "LANDSCAPE", + "page_size": "A4", + "truncate_table": false + }, + "time_zone": "America/Sao_Paulo", + "frequency": { + "cron_expression": { + "day_of_month": "14", + "day_of_week": "1", + "hour": "18", + "month": "4", + "minute": "11", + "second": "57" + } + }, + "recipient_details": { + "emails": [ + "sgosnoll2@amazon.co.uk", + "mwyldish2@addthis.com", + "cding2@telegraph.co.uk" + ], + "principals": [ + { + "identifier": "046760d3-c0be-47d0-a9e7-a1b37c4e4432", + "type": "USER_GROUP" + }, + { + "identifier": "160b8fa4-4028-4ffe-a559-cbaf33c0a9b3", + "type": "USER" + }, + { + "identifier": "5dc626e5-1921-4758-a7bf-8501605aa59f", + "type": "USER" + } + ] + } + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/schedules/create", + "operationId": "createSchedule", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 2300 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "name": "ncavan81688027300829", + "description": "Phasellus id sapien in sapien iaculis congue. Vivamus metus arcu, adipiscing molestie, hendrerit at, vulputate vitae, nisl. Aenean lectus.", + "metadata_type": "LIVEBOARD", + "metadata_identifier": "GxkUJFTUhfWsqmC", + "file_format": "CSV", + "liveboard_options": { + "visualization_identifiers": [] + }, + "pdf_options": { + "complete_liveboard": false, + "include_cover_page": false, + "include_custom_logo": false, + "include_filter_page": true, + "include_page_number": false, + "page_footer_text": "mallery8", + "page_orientation": "LANDSCAPE", + "page_size": "A4", + "truncate_table": false + }, + "time_zone": "Asia/Nicosia", + "frequency": { + "cron_expression": { + "day_of_month": "13", + "day_of_week": "2", + "hour": "9", + "month": "12", + "minute": "27", + "second": "2" + } + }, + "recipient_details": { + "emails": [ + "tstathers8@ucla.edu" + ], + "principals": [ + { + "identifier": "046760d3-c0be-47d0-a9e7-a1b37c4e4432", + "type": "USER_GROUP" + }, + { + "identifier": "160b8fa4-4028-4ffe-a559-cbaf33c0a9b3", + "type": "USER" + }, + { + "identifier": "5dc626e5-1921-4758-a7bf-8501605aa59f", + "type": "USER" + } + ] + } + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/schedules/create", + "operationId": "createSchedule", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 2301 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "name": "hstoggellb1688027300858", + "description": "In est risus, auctor sed, tristique in, tempus sit amet, sem. Fusce consequat.", + "metadata_type": "LIVEBOARD", + "metadata_identifier": "nIvpFoGCFKgGrxL", + "file_format": "CSV", + "liveboard_options": { + "visualization_identifiers": [] + }, + "pdf_options": { + "complete_liveboard": false, + "include_cover_page": true, + "include_custom_logo": false, + "include_filter_page": false, + "include_page_number": false, + "page_footer_text": "taudenisb", + "page_orientation": "LANDSCAPE", + "page_size": "A4", + "truncate_table": false + }, + "time_zone": "Asia/Chongqing", + "frequency": { + "cron_expression": { + "day_of_month": "25", + "day_of_week": "2", + "hour": "13", + "month": "1", + "minute": "58", + "second": "7" + } + }, + "recipient_details": { + "emails": [ + "mmcjarrowb@seesaa.net", + "bsmallpieceb@imageshack.us" + ], + "principals": [ + { + "identifier": "046760d3-c0be-47d0-a9e7-a1b37c4e4432", + "type": "USER_GROUP" + } + ] + } + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/schedules/create", + "operationId": "createSchedule", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 2302 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "name": "hstoggellb1688027300858", + "description": "In est risus, auctor sed, tristique in, tempus sit amet, sem. Fusce consequat.", + "metadata_type": "LIVEBOARD", + "metadata_identifier": "axmkouAFLOBZlSc", + "file_format": "CSV", + "liveboard_options": { + "visualization_identifiers": [] + }, + "pdf_options": { + "complete_liveboard": false, + "include_cover_page": true, + "include_custom_logo": false, + "include_filter_page": false, + "include_page_number": false, + "page_footer_text": "taudenisb", + "page_orientation": "LANDSCAPE", + "page_size": "A4", + "truncate_table": false + }, + "time_zone": "Asia/Chongqing", + "frequency": { + "cron_expression": { + "day_of_month": "25", + "day_of_week": "2", + "hour": "13", + "month": "1", + "minute": "58", + "second": "7" + } + }, + "recipient_details": { + "emails": [ + "mmcjarrowb@seesaa.net", + "bsmallpieceb@imageshack.us" + ], + "principals": [ + { + "identifier": "046760d3-c0be-47d0-a9e7-a1b37c4e4432", + "type": "USER_GROUP" + } + ] + } + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/schedules/create", + "operationId": "createSchedule", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 2303 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "name": "kfullick41688027300814", + "description": "Vestibulum ante ipsum primis in faucibus orci luctus et ultrices posuere cubilia Curae; Nulla dapibus dolor vel est. Donec odio justo, sollicitudin ut, suscipit a, feugiat et, eros. Vestibulum ac est lacinia nisi venenatis tristique.", + "metadata_type": "LIVEBOARD", + "metadata_identifier": "DnaSdplHGsIfdhp", + "file_format": "CSV", + "liveboard_options": { + "visualization_identifiers": [] + }, + "pdf_options": { + "complete_liveboard": false, + "include_cover_page": true, + "include_custom_logo": true, + "include_filter_page": true, + "include_page_number": true, + "page_footer_text": "pjurasek4", + "page_orientation": "LANDSCAPE", + "page_size": "A4", + "truncate_table": true + }, + "time_zone": "Europe/Prague", + "frequency": { + "cron_expression": { + "day_of_month": "21", + "day_of_week": "1", + "hour": "2", + "month": "4", + "minute": "19", + "second": "5" + } + }, + "recipient_details": { + "emails": [ + "bpiola4@jalbum.net" + ], + "principals": [ + { + "identifier": "046760d3-c0be-47d0-a9e7-a1b37c4e4432", + "type": "USER_GROUP" + }, + { + "identifier": "160b8fa4-4028-4ffe-a559-cbaf33c0a9b3", + "type": "USER" + }, + { + "identifier": "5dc626e5-1921-4758-a7bf-8501605aa59f", + "type": "USER" + } + ] + } + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/schedules/create", + "operationId": "createSchedule", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 2304 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "name": "kfullick41688027300814", + "description": "Vestibulum ante ipsum primis in faucibus orci luctus et ultrices posuere cubilia Curae; Nulla dapibus dolor vel est. Donec odio justo, sollicitudin ut, suscipit a, feugiat et, eros. Vestibulum ac est lacinia nisi venenatis tristique.", + "metadata_type": "LIVEBOARD", + "metadata_identifier": "sEClviILNKzIOZh", + "file_format": "CSV", + "liveboard_options": { + "visualization_identifiers": [] + }, + "pdf_options": { + "complete_liveboard": false, + "include_cover_page": true, + "include_custom_logo": true, + "include_filter_page": true, + "include_page_number": true, + "page_footer_text": "pjurasek4", + "page_orientation": "LANDSCAPE", + "page_size": "A4", + "truncate_table": true + }, + "time_zone": "Europe/Prague", + "frequency": { + "cron_expression": { + "day_of_month": "21", + "day_of_week": "1", + "hour": "2", + "month": "4", + "minute": "19", + "second": "5" + } + }, + "recipient_details": { + "emails": [ + "bpiola4@jalbum.net" + ], + "principals": [ + { + "identifier": "046760d3-c0be-47d0-a9e7-a1b37c4e4432", + "type": "USER_GROUP" + }, + { + "identifier": "160b8fa4-4028-4ffe-a559-cbaf33c0a9b3", + "type": "USER" + }, + { + "identifier": "5dc626e5-1921-4758-a7bf-8501605aa59f", + "type": "USER" + } + ] + } + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/schedules/{schedule_identifier}/update", + "operationId": "updateSchedule", + "scenario": "positive", + "type": "AUTOMATIC", + "testId": 2305 + }, + "Path_Variables": { + "schedule_identifier": "trushton01688027300763" + }, + "Query_Variables": {}, + "Body": { + "name": "dwimlett01688027305017", + "description": "Morbi odio odio, elementum eu, interdum eu, tincidunt in, leo. Maecenas pulvinar lobortis est.", + "file_format": "PDF", + "liveboard_options": { + "visualization_identifiers": [] + }, + "pdf_options": { + "include_cover_page": false, + "include_filter_page": true, + "page_footer_text": "lwoolen0", + "page_size": "A4", + "truncate_table": true + }, + "time_zone": "America/El_Salvador", + "frequency": { + "cron_expression": { + "day_of_month": "12", + "day_of_week": "3", + "hour": "9", + "month": "11", + "minute": "26", + "second": "49" + } + }, + "recipient_details": { + "emails": [ + "apitkin0@jimdo.com", + "mocrowley0@va.gov", + "tpatrie0@unblog.fr" + ], + "principals": [ + { + "identifier": "046760d3-c0be-47d0-a9e7-a1b37c4e4432", + "type": "USER_GROUP" + } + ] + }, + "metadata_identifier": "e82fe65a-7ac0-4282-a783-7a35c01b8dbd" + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/schedules/{schedule_identifier}/update", + "operationId": "updateSchedule", + "scenario": "positive", + "type": "AUTOMATIC", + "testId": 2306 + }, + "Path_Variables": { + "schedule_identifier": "glewing11688027300801" + }, + "Query_Variables": {}, + "Body": { + "name": "atreweek11688027305113", + "description": "Morbi a ipsum. Integer a nibh. In quis justo.", + "metadata_type": "LIVEBOARD", + "file_format": "CSV", + "liveboard_options": { + "visualization_identifiers": [] + }, + "pdf_options": { + "include_custom_logo": false, + "include_filter_page": true, + "include_page_number": true, + "page_orientation": "LANDSCAPE", + "truncate_table": true + }, + "time_zone": "Europe/Lisbon", + "frequency": { + "cron_expression": { + "day_of_month": "14", + "day_of_week": "6", + "hour": "8", + "month": "8", + "minute": "34", + "second": "46" + } + }, + "recipient_details": { + "emails": [ + "areadwing1@goo.ne.jp" + ], + "principals": [ + { + "identifier": "046760d3-c0be-47d0-a9e7-a1b37c4e4432", + "type": "USER_GROUP" + }, + { + "identifier": "160b8fa4-4028-4ffe-a559-cbaf33c0a9b3", + "type": "USER" + } + ] + }, + "metadata_identifier": "78950be9-0717-449e-be26-64ea42617dd1" + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/schedules/{schedule_identifier}/update", + "operationId": "updateSchedule", + "scenario": "positive", + "type": "AUTOMATIC", + "testId": 2307 + }, + "Path_Variables": { + "schedule_identifier": "gpavlitschek21688027300807" + }, + "Query_Variables": {}, + "Body": { + "description": "Etiam justo. Etiam pretium iaculis justo. In hac habitasse platea dictumst.", + "metadata_identifier": "2ff57a24-cf90-485f-8b4b-45fc17474c6f", + "liveboard_options": { + "visualization_identifiers": [] + }, + "pdf_options": { + "page_size": "A4" + }, + "frequency": { + "cron_expression": { + "day_of_month": "6", + "day_of_week": "5", + "hour": "2", + "month": "10", + "minute": "58", + "second": "9" + } + }, + "recipient_details": { + "emails": [ + "smaceveley2@wired.com", + "flympany2@economist.com" + ], + "principals": [ + { + "identifier": "046760d3-c0be-47d0-a9e7-a1b37c4e4432", + "type": "USER_GROUP" + } + ] + } + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/schedules/{schedule_identifier}/update", + "operationId": "updateSchedule", + "scenario": "positive", + "type": "AUTOMATIC", + "testId": 2308 + }, + "Path_Variables": { + "schedule_identifier": "slonglands31688027300811" + }, + "Query_Variables": {}, + "Body": { + "metadata_type": "LIVEBOARD", + "metadata_identifier": "4145513c-c9bd-4e48-af44-8dc001b5f955", + "file_format": "CSV", + "liveboard_options": { + "visualization_identifiers": [] + }, + "pdf_options": { + "include_custom_logo": false, + "include_page_number": true, + "page_footer_text": "rcattow3", + "page_size": "A4" + }, + "time_zone": "Asia/Chongqing", + "frequency": { + "cron_expression": { + "day_of_month": "27", + "day_of_week": "3", + "hour": "14", + "month": "12", + "minute": "43", + "second": "53" + } + }, + "recipient_details": { + "emails": [ + "jarnald3@tinyurl.com", + "adraisey3@friendfeed.com", + "jpendrey3@cornell.edu" + ], + "principals": [ + { + "identifier": "046760d3-c0be-47d0-a9e7-a1b37c4e4432", + "type": "USER_GROUP" + } + ] + } + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/schedules/{schedule_identifier}/update", + "operationId": "updateSchedule", + "scenario": "positive", + "type": "AUTOMATIC", + "testId": 2309 + }, + "Path_Variables": { + "schedule_identifier": "kfullick41688027300814" + }, + "Query_Variables": {}, + "Body": { + "description": "Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Proin risus. Praesent lectus. Vestibulum quam sapien, varius ut, blandit non, interdum in, ante. Vestibulum ante ipsum primis in faucibus orci luctus et ultrices posuere cubilia Curae; Duis faucibus accumsan odio.", + "metadata_type": "LIVEBOARD", + "file_format": "CSV", + "liveboard_options": { + "visualization_identifiers": [] + }, + "pdf_options": { + "include_cover_page": true, + "include_custom_logo": true, + "include_filter_page": false, + "include_page_number": false, + "page_size": "A4" + }, + "frequency": { + "cron_expression": { + "day_of_month": "17", + "day_of_week": "0", + "hour": "18", + "month": "4", + "minute": "34", + "second": "22" + } + }, + "recipient_details": { + "emails": [ + "mbolino4@acquirethisname.com", + "mfreestone4@bloglovin.com", + "rtison4@ihg.com" + ], + "principals": [ + { + "identifier": "046760d3-c0be-47d0-a9e7-a1b37c4e4432", + "type": "USER_GROUP" + } + ] + }, + "metadata_identifier": "33248a57-cc70-4e39-9199-fb5092283381" + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/schedules/{schedule_identifier}/update", + "operationId": "updateSchedule", + "scenario": "positive", + "type": "AUTOMATIC", + "testId": 2310 + }, + "Path_Variables": { + "schedule_identifier": "ntrendle51688027300818" + }, + "Query_Variables": {}, + "Body": { + "name": "ftwiggins51688027305134", + "description": "Suspendisse ornare consequat lectus.", + "file_format": "CSV", + "liveboard_options": { + "visualization_identifiers": [] + }, + "pdf_options": { + "include_cover_page": true, + "include_page_number": false, + "page_footer_text": "rcreany5" + }, + "frequency": { + "cron_expression": { + "day_of_month": "20", + "day_of_week": "1", + "hour": "19", + "month": "4", + "minute": "24", + "second": "59" + } + }, + "recipient_details": { + "emails": [ + "sbonsale5@theglobeandmail.com", + "ipassby5@merriam-webster.com" + ], + "principals": [ + { + "identifier": "046760d3-c0be-47d0-a9e7-a1b37c4e4432", + "type": "USER_GROUP" + }, + { + "identifier": "160b8fa4-4028-4ffe-a559-cbaf33c0a9b3", + "type": "USER" + } + ] + }, + "metadata_identifier": "6715f768-8930-4180-9a3d-1efdbfaa8e7f" + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/schedules/{schedule_identifier}/update", + "operationId": "updateSchedule", + "scenario": "positive", + "type": "AUTOMATIC", + "testId": 2311 + }, + "Path_Variables": { + "schedule_identifier": "cpedracci61688027300822" + }, + "Query_Variables": {}, + "Body": { + "description": "Curabitur gravida nisi at nibh. In hac habitasse platea dictumst. Aliquam augue quam, sollicitudin vitae, consectetuer eget, rutrum at, lorem. Integer tincidunt ante vel ipsum.", + "metadata_type": "LIVEBOARD", + "liveboard_options": { + "visualization_identifiers": [] + }, + "pdf_options": { + "include_cover_page": false, + "include_custom_logo": true, + "include_filter_page": true, + "include_page_number": true, + "page_footer_text": "cgodman6", + "page_size": "A4" + }, + "time_zone": "Europe/Warsaw", + "frequency": { + "cron_expression": { + "day_of_month": "19", + "day_of_week": "0", + "hour": "20", + "month": "8", + "minute": "30", + "second": "40" + } + }, + "recipient_details": { + "emails": [ + "rwhellams6@tripadvisor.com", + "maujean6@businessinsider.com" + ], + "principals": [ + { + "identifier": "046760d3-c0be-47d0-a9e7-a1b37c4e4432", + "type": "USER_GROUP" + }, + { + "identifier": "160b8fa4-4028-4ffe-a559-cbaf33c0a9b3", + "type": "USER" + } + ] + }, + "metadata_identifier": "b2d68a4f-cf67-4723-966f-8a592fdbf8b9" + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/schedules/{schedule_identifier}/update", + "operationId": "updateSchedule", + "scenario": "positive", + "type": "AUTOMATIC", + "testId": 2312 + }, + "Path_Variables": { + "schedule_identifier": "mhoyes71688027300825" + }, + "Query_Variables": {}, + "Body": { + "metadata_type": "LIVEBOARD", + "file_format": "CSV", + "liveboard_options": { + "visualization_identifiers": [] + }, + "pdf_options": { + "include_custom_logo": true, + "include_filter_page": true, + "page_footer_text": "eeckh7", + "truncate_table": true + }, + "time_zone": "America/Costa_Rica", + "frequency": { + "cron_expression": { + "day_of_month": "3", + "day_of_week": "5", + "hour": "2", + "month": "3", + "minute": "4", + "second": "0" + } + }, + "recipient_details": { + "emails": [ + "adargavel7@cloudflare.com", + "rcolter7@blogs.com", + "ccrossby7@quantcast.com" + ], + "principals": [ + { + "identifier": "046760d3-c0be-47d0-a9e7-a1b37c4e4432", + "type": "USER_GROUP" + } + ] + }, + "metadata_identifier": "262abdac-b00f-4f5f-ad33-fcf10154184f" + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/schedules/{schedule_identifier}/update", + "operationId": "updateSchedule", + "scenario": "positive", + "type": "AUTOMATIC", + "testId": 2313 + }, + "Path_Variables": { + "schedule_identifier": "ncavan81688027300829" + }, + "Query_Variables": {}, + "Body": { + "metadata_type": "LIVEBOARD", + "metadata_identifier": "327f4d60-c502-43b0-b1d4-c73df5031a2e", + "file_format": "PDF", + "liveboard_options": { + "visualization_identifiers": [] + }, + "pdf_options": { + "include_cover_page": false, + "include_custom_logo": true, + "include_page_number": false, + "page_orientation": "LANDSCAPE", + "truncate_table": true + }, + "frequency": { + "cron_expression": { + "day_of_month": "7", + "day_of_week": "5", + "hour": "18", + "month": "10", + "minute": "13", + "second": "13" + } + }, + "recipient_details": { + "emails": [ + "pstidson8@cocolog-nifty.com" + ], + "principals": [ + { + "identifier": "046760d3-c0be-47d0-a9e7-a1b37c4e4432", + "type": "USER_GROUP" + }, + { + "identifier": "160b8fa4-4028-4ffe-a559-cbaf33c0a9b3", + "type": "USER" + }, + { + "identifier": "5dc626e5-1921-4758-a7bf-8501605aa59f", + "type": "USER" + } + ] + } + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/schedules/{schedule_identifier}/update", + "operationId": "updateSchedule", + "scenario": "positive", + "type": "AUTOMATIC", + "testId": 2314 + }, + "Path_Variables": { + "schedule_identifier": "syokley91688027300833" + }, + "Query_Variables": {}, + "Body": { + "name": "agoodson91688027305153", + "metadata_type": "LIVEBOARD", + "metadata_identifier": "601be8e5-140e-477c-8812-843795306438", + "liveboard_options": { + "visualization_identifiers": [] + }, + "pdf_options": { + "include_custom_logo": false, + "include_filter_page": false, + "truncate_table": true + }, + "frequency": { + "cron_expression": { + "day_of_month": "6", + "day_of_week": "2", + "hour": "22", + "month": "3", + "minute": "26", + "second": "38" + } + }, + "recipient_details": { + "emails": [ + "rclive9@go.com", + "sfochs9@jimdo.com", + "efrier9@mozilla.org" + ], + "principals": [ + { + "identifier": "046760d3-c0be-47d0-a9e7-a1b37c4e4432", + "type": "USER_GROUP" + }, + { + "identifier": "160b8fa4-4028-4ffe-a559-cbaf33c0a9b3", + "type": "USER" + }, + { + "identifier": "5dc626e5-1921-4758-a7bf-8501605aa59f", + "type": "USER" + } + ] + } + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/schedules/{schedule_identifier}/update", + "operationId": "updateSchedule", + "scenario": "positive", + "type": "AUTOMATIC", + "testId": 2315 + }, + "Path_Variables": { + "schedule_identifier": "rgantzmana1688027300855" + }, + "Query_Variables": {}, + "Body": { + "name": "csolmana1688027305159", + "description": "Nullam orci pede, venenatis non, sodales sed, tincidunt eu, felis. Fusce posuere felis sed lacus. Morbi sem mauris, laoreet ut, rhoncus aliquet, pulvinar sed, nisl. Nunc rhoncus dui vel sem.", + "metadata_type": "LIVEBOARD", + "file_format": "CSV", + "liveboard_options": { + "visualization_identifiers": [] + }, + "pdf_options": { + "include_cover_page": false, + "include_custom_logo": false, + "include_filter_page": true + }, + "time_zone": "Europe/Moscow", + "frequency": { + "cron_expression": { + "day_of_month": "12", + "day_of_week": "1", + "hour": "3", + "month": "4", + "minute": "8", + "second": "22" + } + }, + "recipient_details": { + "emails": [ + "jgravellsa@twitter.com" + ], + "principals": [ + { + "identifier": "046760d3-c0be-47d0-a9e7-a1b37c4e4432", + "type": "USER_GROUP" + }, + { + "identifier": "160b8fa4-4028-4ffe-a559-cbaf33c0a9b3", + "type": "USER" + }, + { + "identifier": "5dc626e5-1921-4758-a7bf-8501605aa59f", + "type": "USER" + } + ] + }, + "metadata_identifier": "e82fe65a-7ac0-4282-a783-7a35c01b8dbd" + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/schedules/{schedule_identifier}/update", + "operationId": "updateSchedule", + "scenario": "positive", + "type": "AUTOMATIC", + "testId": 2316 + }, + "Path_Variables": { + "schedule_identifier": "hstoggellb1688027300858" + }, + "Query_Variables": {}, + "Body": { + "file_format": "CSV", + "liveboard_options": { + "visualization_identifiers": [] + }, + "pdf_options": { + "include_custom_logo": true, + "include_page_number": true, + "page_footer_text": "skillockb", + "page_orientation": "PORTRAIT", + "page_size": "A4" + }, + "frequency": { + "cron_expression": { + "day_of_month": "4", + "day_of_week": "6", + "hour": "10", + "month": "10", + "minute": "25", + "second": "2" + } + }, + "recipient_details": { + "emails": [ + "bendleb@1688.com", + "ksaddingtonb@ucoz.ru", + "lcasinab@washingtonpost.com" + ], + "principals": [ + { + "identifier": "046760d3-c0be-47d0-a9e7-a1b37c4e4432", + "type": "USER_GROUP" + } + ] + }, + "metadata_identifier": "78950be9-0717-449e-be26-64ea42617dd1" + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/schedules/{schedule_identifier}/update", + "operationId": "updateSchedule", + "scenario": "positive", + "type": "AUTOMATIC", + "testId": 2317 + }, + "Path_Variables": { + "schedule_identifier": "cmatteolic1688027300861" + }, + "Query_Variables": {}, + "Body": { + "metadata_type": "LIVEBOARD", + "metadata_identifier": "2ff57a24-cf90-485f-8b4b-45fc17474c6f", + "file_format": "PDF", + "liveboard_options": { + "visualization_identifiers": [] + }, + "pdf_options": { + "page_footer_text": "jspehrc", + "page_orientation": "PORTRAIT", + "page_size": "A4", + "truncate_table": true + }, + "time_zone": "Asia/Harbin", + "frequency": { + "cron_expression": { + "day_of_month": "24", + "day_of_week": "6", + "hour": "2", + "month": "12", + "minute": "49", + "second": "29" + } + }, + "recipient_details": { + "emails": [ + "efancyc@yellowbook.com", + "vdickenc@prlog.org", + "dlowdec@cnbc.com" + ], + "principals": [ + { + "identifier": "046760d3-c0be-47d0-a9e7-a1b37c4e4432", + "type": "USER_GROUP" + }, + { + "identifier": "160b8fa4-4028-4ffe-a559-cbaf33c0a9b3", + "type": "USER" + } + ] + } + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/schedules/{schedule_identifier}/update", + "operationId": "updateSchedule", + "scenario": "positive", + "type": "AUTOMATIC", + "testId": 2318 + }, + "Path_Variables": { + "schedule_identifier": "escadd1688027300865" + }, + "Query_Variables": {}, + "Body": { + "name": "dkaveneyd1688027305173", + "metadata_identifier": "4145513c-c9bd-4e48-af44-8dc001b5f955", + "file_format": "PDF", + "liveboard_options": { + "visualization_identifiers": [] + }, + "pdf_options": { + "page_orientation": "LANDSCAPE", + "page_size": "A4" + }, + "time_zone": "America/Montevideo", + "frequency": { + "cron_expression": { + "day_of_month": "8", + "day_of_week": "2", + "hour": "8", + "month": "1", + "minute": "37", + "second": "23" + } + }, + "recipient_details": { + "emails": [ + "cwinstoned@cdbaby.com", + "aneubiggingd@google.com.br" + ], + "principals": [ + { + "identifier": "046760d3-c0be-47d0-a9e7-a1b37c4e4432", + "type": "USER_GROUP" + } + ] + } + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/schedules/{schedule_identifier}/update", + "operationId": "updateSchedule", + "scenario": "positive", + "type": "AUTOMATIC", + "testId": 2319 + }, + "Path_Variables": { + "schedule_identifier": "dpeakmane1688027300868" + }, + "Query_Variables": {}, + "Body": { + "name": "cshillabere1688027305178", + "description": "Phasellus in felis. Donec semper sapien a libero.", + "file_format": "CSV", + "liveboard_options": { + "visualization_identifiers": [] + }, + "pdf_options": { + "include_custom_logo": true, + "include_filter_page": true, + "truncate_table": true + }, + "frequency": { + "cron_expression": { + "day_of_month": "15", + "day_of_week": "3", + "hour": "2", + "month": "8", + "minute": "6", + "second": "44" + } + }, + "recipient_details": { + "emails": [ + "gcattermolee@icio.us", + "esteablere@studiopress.com", + "kbuiste@vinaora.com" + ], + "principals": [ + { + "identifier": "046760d3-c0be-47d0-a9e7-a1b37c4e4432", + "type": "USER_GROUP" + }, + { + "identifier": "160b8fa4-4028-4ffe-a559-cbaf33c0a9b3", + "type": "USER" + }, + { + "identifier": "5dc626e5-1921-4758-a7bf-8501605aa59f", + "type": "USER" + } + ] + }, + "metadata_identifier": "33248a57-cc70-4e39-9199-fb5092283381" + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/schedules/{schedule_identifier}/update", + "operationId": "updateSchedule", + "scenario": "positive", + "type": "AUTOMATIC", + "testId": 2320 + }, + "Path_Variables": { + "schedule_identifier": "ktroyesf1688027300871" + }, + "Query_Variables": {}, + "Body": { + "name": "afissendenf1688027305183", + "description": "Nam ultrices, libero non mattis pulvinar, nulla pede ullamcorper augue, a suscipit nulla elit ac nulla. Sed vel enim sit amet nunc viverra dapibus. Nulla suscipit ligula in lacus. Curabitur at ipsum ac tellus semper interdum. Mauris ullamcorper purus sit amet nulla.", + "file_format": "PDF", + "liveboard_options": { + "visualization_identifiers": [] + }, + "pdf_options": { + "include_filter_page": false, + "include_page_number": true, + "page_orientation": "PORTRAIT", + "truncate_table": true + }, + "frequency": { + "cron_expression": { + "day_of_month": "18", + "day_of_week": "4", + "hour": "18", + "month": "3", + "minute": "49", + "second": "15" + } + }, + "recipient_details": { + "emails": [ + "krossboroughf@cdbaby.com", + "rscorrerf@ebay.co.uk", + "cbortolettif@a8.net" + ], + "principals": [ + { + "identifier": "046760d3-c0be-47d0-a9e7-a1b37c4e4432", + "type": "USER_GROUP" + }, + { + "identifier": "160b8fa4-4028-4ffe-a559-cbaf33c0a9b3", + "type": "USER" + }, + { + "identifier": "5dc626e5-1921-4758-a7bf-8501605aa59f", + "type": "USER" + } + ] + }, + "metadata_identifier": "6715f768-8930-4180-9a3d-1efdbfaa8e7f" + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/schedules/{schedule_identifier}/update", + "operationId": "updateSchedule", + "scenario": "positive", + "type": "AUTOMATIC", + "testId": 2321 + }, + "Path_Variables": { + "schedule_identifier": "bhartshorneg1688027300874" + }, + "Query_Variables": {}, + "Body": { + "description": "Maecenas pulvinar lobortis est. Phasellus sit amet erat. Nulla tempus.", + "metadata_type": "LIVEBOARD", + "metadata_identifier": "b2d68a4f-cf67-4723-966f-8a592fdbf8b9", + "file_format": "CSV", + "liveboard_options": { + "visualization_identifiers": [] + }, + "pdf_options": { + "include_cover_page": true, + "include_custom_logo": true, + "page_orientation": "PORTRAIT", + "truncate_table": true + }, + "frequency": { + "cron_expression": { + "day_of_month": "28", + "day_of_week": "4", + "hour": "22", + "month": "11", + "minute": "24", + "second": "28" + } + }, + "recipient_details": { + "emails": [ + "jhastingsg@shutterfly.com" + ], + "principals": [ + { + "identifier": "046760d3-c0be-47d0-a9e7-a1b37c4e4432", + "type": "USER_GROUP" + }, + { + "identifier": "160b8fa4-4028-4ffe-a559-cbaf33c0a9b3", + "type": "USER" + }, + { + "identifier": "5dc626e5-1921-4758-a7bf-8501605aa59f", + "type": "USER" + } + ] + } + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/schedules/{schedule_identifier}/update", + "operationId": "updateSchedule", + "scenario": "positive", + "type": "AUTOMATIC", + "testId": 2322 + }, + "Path_Variables": { + "schedule_identifier": "mmcmychemh1688027300877" + }, + "Query_Variables": {}, + "Body": { + "liveboard_options": { + "visualization_identifiers": [] + }, + "pdf_options": { + "include_cover_page": true, + "include_custom_logo": false, + "include_filter_page": false, + "page_footer_text": "sbonninh", + "truncate_table": false + }, + "frequency": { + "cron_expression": { + "day_of_month": "24", + "day_of_week": "5", + "hour": "0", + "month": "12", + "minute": "0", + "second": "10" + } + }, + "recipient_details": { + "emails": [ + "ksacazeh@wufoo.com", + "ifirmanh@github.io" + ], + "principals": [ + { + "identifier": "046760d3-c0be-47d0-a9e7-a1b37c4e4432", + "type": "USER_GROUP" + }, + { + "identifier": "160b8fa4-4028-4ffe-a559-cbaf33c0a9b3", + "type": "USER" + }, + { + "identifier": "5dc626e5-1921-4758-a7bf-8501605aa59f", + "type": "USER" + } + ] + }, + "metadata_identifier": "262abdac-b00f-4f5f-ad33-fcf10154184f" + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/schedules/{schedule_identifier}/update", + "operationId": "updateSchedule", + "scenario": "positive", + "type": "AUTOMATIC", + "testId": 2323 + }, + "Path_Variables": { + "schedule_identifier": "daustoni1688027300880" + }, + "Query_Variables": {}, + "Body": { + "name": "mchallicei1688027305206", + "description": "Integer tincidunt ante vel ipsum. Praesent blandit lacinia erat. Vestibulum sed magna at nunc commodo placerat. Praesent blandit. Nam nulla.", + "metadata_type": "LIVEBOARD", + "file_format": "PDF", + "liveboard_options": { + "visualization_identifiers": [] + }, + "pdf_options": { + "include_custom_logo": false, + "include_page_number": true, + "page_footer_text": "tpattersoni", + "page_orientation": "PORTRAIT", + "page_size": "A4", + "truncate_table": false + }, + "time_zone": "Asia/Manila", + "frequency": { + "cron_expression": { + "day_of_month": "21", + "day_of_week": "3", + "hour": "5", + "month": "11", + "minute": "50", + "second": "6" + } + }, + "recipient_details": { + "emails": [ + "llomaxi@goo.gl", + "gvasyukhini@dmoz.org" + ], + "principals": [ + { + "identifier": "046760d3-c0be-47d0-a9e7-a1b37c4e4432", + "type": "USER_GROUP" + } + ] + }, + "metadata_identifier": "327f4d60-c502-43b0-b1d4-c73df5031a2e" + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/schedules/{schedule_identifier}/update", + "operationId": "updateSchedule", + "scenario": "positive", + "type": "AUTOMATIC", + "testId": 2324 + }, + "Path_Variables": { + "schedule_identifier": "theinekingj1688027300883" + }, + "Query_Variables": {}, + "Body": { + "name": "apietrzykj1688027305211", + "description": "Pellentesque viverra pede ac diam.", + "metadata_type": "LIVEBOARD", + "metadata_identifier": "601be8e5-140e-477c-8812-843795306438", + "liveboard_options": { + "visualization_identifiers": [] + }, + "pdf_options": { + "include_filter_page": false, + "page_footer_text": "sdrueryj" + }, + "time_zone": "America/New_York", + "frequency": { + "cron_expression": { + "day_of_month": "1", + "day_of_week": "0", + "hour": "8", + "month": "10", + "minute": "43", + "second": "40" + } + }, + "recipient_details": { + "emails": [ + "ccharrettj@google.ca", + "pballingj@livejournal.com" + ], + "principals": [ + { + "identifier": "046760d3-c0be-47d0-a9e7-a1b37c4e4432", + "type": "USER_GROUP" + }, + { + "identifier": "160b8fa4-4028-4ffe-a559-cbaf33c0a9b3", + "type": "USER" + }, + { + "identifier": "5dc626e5-1921-4758-a7bf-8501605aa59f", + "type": "USER" + } + ] + } + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/schedules/{schedule_identifier}/update", + "operationId": "updateSchedule", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 2325 + }, + "Path_Variables": { + "schedule_identifier": null + }, + "Query_Variables": {}, + "Body": { + "description": "Etiam justo. Etiam pretium iaculis justo. In hac habitasse platea dictumst.", + "metadata_identifier": "2ff57a24-cf90-485f-8b4b-45fc17474c6f", + "liveboard_options": { + "visualization_identifiers": [] + }, + "pdf_options": { + "page_size": "A4" + }, + "frequency": { + "cron_expression": { + "day_of_month": "6", + "day_of_week": "5", + "hour": "2", + "month": "10", + "minute": "58", + "second": "9" + } + }, + "recipient_details": { + "emails": [ + "smaceveley2@wired.com", + "flympany2@economist.com" + ], + "principals": [ + { + "identifier": "046760d3-c0be-47d0-a9e7-a1b37c4e4432", + "type": "USER_GROUP" + } + ] + } + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/schedules/{schedule_identifier}/update", + "operationId": "updateSchedule", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 2326 + }, + "Path_Variables": { + "schedule_identifier": null + }, + "Query_Variables": {}, + "Body": { + "name": "dkaveneyd1688027305173", + "metadata_identifier": "4145513c-c9bd-4e48-af44-8dc001b5f955", + "file_format": "PDF", + "liveboard_options": { + "visualization_identifiers": [] + }, + "pdf_options": { + "page_orientation": "LANDSCAPE", + "page_size": "A4" + }, + "time_zone": "America/Montevideo", + "frequency": { + "cron_expression": { + "day_of_month": "8", + "day_of_week": "2", + "hour": "8", + "month": "1", + "minute": "37", + "second": "23" + } + }, + "recipient_details": { + "emails": [ + "cwinstoned@cdbaby.com", + "aneubiggingd@google.com.br" + ], + "principals": [ + { + "identifier": "046760d3-c0be-47d0-a9e7-a1b37c4e4432", + "type": "USER_GROUP" + } + ] + } + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/schedules/{schedule_identifier}/update", + "operationId": "updateSchedule", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 2327 + }, + "Path_Variables": { + "schedule_identifier": null + }, + "Query_Variables": {}, + "Body": { + "name": "dwimlett01688027305017", + "description": "Morbi odio odio, elementum eu, interdum eu, tincidunt in, leo. Maecenas pulvinar lobortis est.", + "file_format": "PDF", + "liveboard_options": { + "visualization_identifiers": [] + }, + "pdf_options": { + "include_cover_page": false, + "include_filter_page": true, + "page_footer_text": "lwoolen0", + "page_size": "A4", + "truncate_table": true + }, + "time_zone": "America/El_Salvador", + "frequency": { + "cron_expression": { + "day_of_month": "12", + "day_of_week": "3", + "hour": "9", + "month": "11", + "minute": "26", + "second": "49" + } + }, + "recipient_details": { + "emails": [ + "apitkin0@jimdo.com", + "mocrowley0@va.gov", + "tpatrie0@unblog.fr" + ], + "principals": [ + { + "identifier": "046760d3-c0be-47d0-a9e7-a1b37c4e4432", + "type": "USER_GROUP" + } + ] + }, + "metadata_identifier": "e82fe65a-7ac0-4282-a783-7a35c01b8dbd" + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/schedules/{schedule_identifier}/update", + "operationId": "updateSchedule", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 2328 + }, + "Path_Variables": { + "schedule_identifier": null + }, + "Query_Variables": {}, + "Body": { + "file_format": "CSV", + "liveboard_options": { + "visualization_identifiers": [] + }, + "pdf_options": { + "include_custom_logo": true, + "include_page_number": true, + "page_footer_text": "skillockb", + "page_orientation": "PORTRAIT", + "page_size": "A4" + }, + "frequency": { + "cron_expression": { + "day_of_month": "4", + "day_of_week": "6", + "hour": "10", + "month": "10", + "minute": "25", + "second": "2" + } + }, + "recipient_details": { + "emails": [ + "bendleb@1688.com", + "ksaddingtonb@ucoz.ru", + "lcasinab@washingtonpost.com" + ], + "principals": [ + { + "identifier": "046760d3-c0be-47d0-a9e7-a1b37c4e4432", + "type": "USER_GROUP" + } + ] + }, + "metadata_identifier": "78950be9-0717-449e-be26-64ea42617dd1" + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/schedules/{schedule_identifier}/update", + "operationId": "updateSchedule", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 2329 + }, + "Path_Variables": { + "schedule_identifier": null + }, + "Query_Variables": {}, + "Body": { + "name": "dwimlett01688027305017", + "description": "Morbi odio odio, elementum eu, interdum eu, tincidunt in, leo. Maecenas pulvinar lobortis est.", + "file_format": "PDF", + "liveboard_options": { + "visualization_identifiers": [] + }, + "pdf_options": { + "include_cover_page": false, + "include_filter_page": true, + "page_footer_text": "lwoolen0", + "page_size": "A4", + "truncate_table": true + }, + "time_zone": "America/El_Salvador", + "frequency": { + "cron_expression": { + "day_of_month": "12", + "day_of_week": "3", + "hour": "9", + "month": "11", + "minute": "26", + "second": "49" + } + }, + "recipient_details": { + "emails": [ + "apitkin0@jimdo.com", + "mocrowley0@va.gov", + "tpatrie0@unblog.fr" + ], + "principals": [ + { + "identifier": "046760d3-c0be-47d0-a9e7-a1b37c4e4432", + "type": "USER_GROUP" + } + ] + }, + "metadata_identifier": "e82fe65a-7ac0-4282-a783-7a35c01b8dbd" + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/schedules/{schedule_identifier}/update", + "operationId": "updateSchedule", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 2330 + }, + "Path_Variables": { + "schedule_identifier": null + }, + "Query_Variables": {}, + "Body": { + "name": "csolmana1688027305159", + "description": "Nullam orci pede, venenatis non, sodales sed, tincidunt eu, felis. Fusce posuere felis sed lacus. Morbi sem mauris, laoreet ut, rhoncus aliquet, pulvinar sed, nisl. Nunc rhoncus dui vel sem.", + "metadata_type": "LIVEBOARD", + "file_format": "CSV", + "liveboard_options": { + "visualization_identifiers": [] + }, + "pdf_options": { + "include_cover_page": false, + "include_custom_logo": false, + "include_filter_page": true + }, + "time_zone": "Europe/Moscow", + "frequency": { + "cron_expression": { + "day_of_month": "12", + "day_of_week": "1", + "hour": "3", + "month": "4", + "minute": "8", + "second": "22" + } + }, + "recipient_details": { + "emails": [ + "jgravellsa@twitter.com" + ], + "principals": [ + { + "identifier": "046760d3-c0be-47d0-a9e7-a1b37c4e4432", + "type": "USER_GROUP" + }, + { + "identifier": "160b8fa4-4028-4ffe-a559-cbaf33c0a9b3", + "type": "USER" + }, + { + "identifier": "5dc626e5-1921-4758-a7bf-8501605aa59f", + "type": "USER" + } + ] + }, + "metadata_identifier": "e82fe65a-7ac0-4282-a783-7a35c01b8dbd" + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/schedules/{schedule_identifier}/update", + "operationId": "updateSchedule", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 2331 + }, + "Path_Variables": { + "schedule_identifier": null + }, + "Query_Variables": {}, + "Body": { + "description": "Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Proin risus. Praesent lectus. Vestibulum quam sapien, varius ut, blandit non, interdum in, ante. Vestibulum ante ipsum primis in faucibus orci luctus et ultrices posuere cubilia Curae; Duis faucibus accumsan odio.", + "metadata_type": "LIVEBOARD", + "file_format": "CSV", + "liveboard_options": { + "visualization_identifiers": [] + }, + "pdf_options": { + "include_cover_page": true, + "include_custom_logo": true, + "include_filter_page": false, + "include_page_number": false, + "page_size": "A4" + }, + "frequency": { + "cron_expression": { + "day_of_month": "17", + "day_of_week": "0", + "hour": "18", + "month": "4", + "minute": "34", + "second": "22" + } + }, + "recipient_details": { + "emails": [ + "mbolino4@acquirethisname.com", + "mfreestone4@bloglovin.com", + "rtison4@ihg.com" + ], + "principals": [ + { + "identifier": "046760d3-c0be-47d0-a9e7-a1b37c4e4432", + "type": "USER_GROUP" + } + ] + }, + "metadata_identifier": "33248a57-cc70-4e39-9199-fb5092283381" + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/schedules/{schedule_identifier}/update", + "operationId": "updateSchedule", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 2332 + }, + "Path_Variables": { + "schedule_identifier": null + }, + "Query_Variables": {}, + "Body": { + "name": "apietrzykj1688027305211", + "description": "Pellentesque viverra pede ac diam.", + "metadata_type": "LIVEBOARD", + "metadata_identifier": "601be8e5-140e-477c-8812-843795306438", + "liveboard_options": { + "visualization_identifiers": [] + }, + "pdf_options": { + "include_filter_page": false, + "page_footer_text": "sdrueryj" + }, + "time_zone": "America/New_York", + "frequency": { + "cron_expression": { + "day_of_month": "1", + "day_of_week": "0", + "hour": "8", + "month": "10", + "minute": "43", + "second": "40" + } + }, + "recipient_details": { + "emails": [ + "ccharrettj@google.ca", + "pballingj@livejournal.com" + ], + "principals": [ + { + "identifier": "046760d3-c0be-47d0-a9e7-a1b37c4e4432", + "type": "USER_GROUP" + }, + { + "identifier": "160b8fa4-4028-4ffe-a559-cbaf33c0a9b3", + "type": "USER" + }, + { + "identifier": "5dc626e5-1921-4758-a7bf-8501605aa59f", + "type": "USER" + } + ] + } + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/schedules/{schedule_identifier}/update", + "operationId": "updateSchedule", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 2333 + }, + "Path_Variables": { + "schedule_identifier": null + }, + "Query_Variables": {}, + "Body": { + "metadata_type": "LIVEBOARD", + "file_format": "CSV", + "liveboard_options": { + "visualization_identifiers": [] + }, + "pdf_options": { + "include_custom_logo": true, + "include_filter_page": true, + "page_footer_text": "eeckh7", + "truncate_table": true + }, + "time_zone": "America/Costa_Rica", + "frequency": { + "cron_expression": { + "day_of_month": "3", + "day_of_week": "5", + "hour": "2", + "month": "3", + "minute": "4", + "second": "0" + } + }, + "recipient_details": { + "emails": [ + "adargavel7@cloudflare.com", + "rcolter7@blogs.com", + "ccrossby7@quantcast.com" + ], + "principals": [ + { + "identifier": "046760d3-c0be-47d0-a9e7-a1b37c4e4432", + "type": "USER_GROUP" + } + ] + }, + "metadata_identifier": "262abdac-b00f-4f5f-ad33-fcf10154184f" + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/schedules/{schedule_identifier}/update", + "operationId": "updateSchedule", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 2334 + }, + "Path_Variables": { + "schedule_identifier": null + }, + "Query_Variables": {}, + "Body": { + "name": "agoodson91688027305153", + "metadata_type": "LIVEBOARD", + "metadata_identifier": "601be8e5-140e-477c-8812-843795306438", + "liveboard_options": { + "visualization_identifiers": [] + }, + "pdf_options": { + "include_custom_logo": false, + "include_filter_page": false, + "truncate_table": true + }, + "frequency": { + "cron_expression": { + "day_of_month": "6", + "day_of_week": "2", + "hour": "22", + "month": "3", + "minute": "26", + "second": "38" + } + }, + "recipient_details": { + "emails": [ + "rclive9@go.com", + "sfochs9@jimdo.com", + "efrier9@mozilla.org" + ], + "principals": [ + { + "identifier": "046760d3-c0be-47d0-a9e7-a1b37c4e4432", + "type": "USER_GROUP" + }, + { + "identifier": "160b8fa4-4028-4ffe-a559-cbaf33c0a9b3", + "type": "USER" + }, + { + "identifier": "5dc626e5-1921-4758-a7bf-8501605aa59f", + "type": "USER" + } + ] + } + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/schedules/{schedule_identifier}/update", + "operationId": "updateSchedule", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 2335 + }, + "Path_Variables": { + "schedule_identifier": null + }, + "Query_Variables": {}, + "Body": { + "metadata_type": "LIVEBOARD", + "metadata_identifier": "2ff57a24-cf90-485f-8b4b-45fc17474c6f", + "file_format": "PDF", + "liveboard_options": { + "visualization_identifiers": [] + }, + "pdf_options": { + "page_footer_text": "jspehrc", + "page_orientation": "PORTRAIT", + "page_size": "A4", + "truncate_table": true + }, + "time_zone": "Asia/Harbin", + "frequency": { + "cron_expression": { + "day_of_month": "24", + "day_of_week": "6", + "hour": "2", + "month": "12", + "minute": "49", + "second": "29" + } + }, + "recipient_details": { + "emails": [ + "efancyc@yellowbook.com", + "vdickenc@prlog.org", + "dlowdec@cnbc.com" + ], + "principals": [ + { + "identifier": "046760d3-c0be-47d0-a9e7-a1b37c4e4432", + "type": "USER_GROUP" + }, + { + "identifier": "160b8fa4-4028-4ffe-a559-cbaf33c0a9b3", + "type": "USER" + } + ] + } + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/schedules/{schedule_identifier}/update", + "operationId": "updateSchedule", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 2336 + }, + "Path_Variables": { + "schedule_identifier": null + }, + "Query_Variables": {}, + "Body": { + "name": "cshillabere1688027305178", + "description": "Phasellus in felis. Donec semper sapien a libero.", + "file_format": "CSV", + "liveboard_options": { + "visualization_identifiers": [] + }, + "pdf_options": { + "include_custom_logo": true, + "include_filter_page": true, + "truncate_table": true + }, + "frequency": { + "cron_expression": { + "day_of_month": "15", + "day_of_week": "3", + "hour": "2", + "month": "8", + "minute": "6", + "second": "44" + } + }, + "recipient_details": { + "emails": [ + "gcattermolee@icio.us", + "esteablere@studiopress.com", + "kbuiste@vinaora.com" + ], + "principals": [ + { + "identifier": "046760d3-c0be-47d0-a9e7-a1b37c4e4432", + "type": "USER_GROUP" + }, + { + "identifier": "160b8fa4-4028-4ffe-a559-cbaf33c0a9b3", + "type": "USER" + }, + { + "identifier": "5dc626e5-1921-4758-a7bf-8501605aa59f", + "type": "USER" + } + ] + }, + "metadata_identifier": "33248a57-cc70-4e39-9199-fb5092283381" + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/schedules/{schedule_identifier}/update", + "operationId": "updateSchedule", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 2337 + }, + "Path_Variables": { + "schedule_identifier": null + }, + "Query_Variables": {}, + "Body": { + "liveboard_options": { + "visualization_identifiers": [] + }, + "pdf_options": { + "include_cover_page": true, + "include_custom_logo": false, + "include_filter_page": false, + "page_footer_text": "sbonninh", + "truncate_table": false + }, + "frequency": { + "cron_expression": { + "day_of_month": "24", + "day_of_week": "5", + "hour": "0", + "month": "12", + "minute": "0", + "second": "10" + } + }, + "recipient_details": { + "emails": [ + "ksacazeh@wufoo.com", + "ifirmanh@github.io" + ], + "principals": [ + { + "identifier": "046760d3-c0be-47d0-a9e7-a1b37c4e4432", + "type": "USER_GROUP" + }, + { + "identifier": "160b8fa4-4028-4ffe-a559-cbaf33c0a9b3", + "type": "USER" + }, + { + "identifier": "5dc626e5-1921-4758-a7bf-8501605aa59f", + "type": "USER" + } + ] + }, + "metadata_identifier": "262abdac-b00f-4f5f-ad33-fcf10154184f" + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/schedules/{schedule_identifier}/update", + "operationId": "updateSchedule", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 2338 + }, + "Path_Variables": { + "schedule_identifier": null + }, + "Query_Variables": {}, + "Body": { + "description": "Curabitur gravida nisi at nibh. In hac habitasse platea dictumst. Aliquam augue quam, sollicitudin vitae, consectetuer eget, rutrum at, lorem. Integer tincidunt ante vel ipsum.", + "metadata_type": "LIVEBOARD", + "liveboard_options": { + "visualization_identifiers": [] + }, + "pdf_options": { + "include_cover_page": false, + "include_custom_logo": true, + "include_filter_page": true, + "include_page_number": true, + "page_footer_text": "cgodman6", + "page_size": "A4" + }, + "time_zone": "Europe/Warsaw", + "frequency": { + "cron_expression": { + "day_of_month": "19", + "day_of_week": "0", + "hour": "20", + "month": "8", + "minute": "30", + "second": "40" + } + }, + "recipient_details": { + "emails": [ + "rwhellams6@tripadvisor.com", + "maujean6@businessinsider.com" + ], + "principals": [ + { + "identifier": "046760d3-c0be-47d0-a9e7-a1b37c4e4432", + "type": "USER_GROUP" + }, + { + "identifier": "160b8fa4-4028-4ffe-a559-cbaf33c0a9b3", + "type": "USER" + } + ] + }, + "metadata_identifier": "b2d68a4f-cf67-4723-966f-8a592fdbf8b9" + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/schedules/{schedule_identifier}/update", + "operationId": "updateSchedule", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 2339 + }, + "Path_Variables": { + "schedule_identifier": null + }, + "Query_Variables": {}, + "Body": { + "name": "cshillabere1688027305178", + "description": "Phasellus in felis. Donec semper sapien a libero.", + "file_format": "CSV", + "liveboard_options": { + "visualization_identifiers": [] + }, + "pdf_options": { + "include_custom_logo": true, + "include_filter_page": true, + "truncate_table": true + }, + "frequency": { + "cron_expression": { + "day_of_month": "15", + "day_of_week": "3", + "hour": "2", + "month": "8", + "minute": "6", + "second": "44" + } + }, + "recipient_details": { + "emails": [ + "gcattermolee@icio.us", + "esteablere@studiopress.com", + "kbuiste@vinaora.com" + ], + "principals": [ + { + "identifier": "046760d3-c0be-47d0-a9e7-a1b37c4e4432", + "type": "USER_GROUP" + }, + { + "identifier": "160b8fa4-4028-4ffe-a559-cbaf33c0a9b3", + "type": "USER" + }, + { + "identifier": "5dc626e5-1921-4758-a7bf-8501605aa59f", + "type": "USER" + } + ] + }, + "metadata_identifier": "33248a57-cc70-4e39-9199-fb5092283381" + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/schedules/{schedule_identifier}/update", + "operationId": "updateSchedule", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 2340 + }, + "Path_Variables": { + "schedule_identifier": "slonglands31688027300811" + }, + "Query_Variables": {}, + "Body": { + "metadata_type": "LIVEBOARD", + "metadata_identifier": "4145513c-c9bd-4e48-af44-8dc001b5f955", + "file_format": "CSV", + "liveboard_options": { + "visualization_identifiers": [] + }, + "pdf_options": { + "include_custom_logo": false, + "include_page_number": true, + "page_footer_text": "rcattow3", + "page_size": "A4" + }, + "time_zone": "Asia/Chongqing", + "frequency": { + "cron_expression": { + "day_of_month": "27", + "day_of_week": "3", + "hour": "14", + "month": "12", + "minute": "43", + "second": "53" + } + }, + "recipient_details": [ + [ + "emails", + [ + "jarnald3@tinyurl.com", + "adraisey3@friendfeed.com", + "jpendrey3@cornell.edu" + ] + ], + [ + "principals", + [ + { + "identifier": "046760d3-c0be-47d0-a9e7-a1b37c4e4432", + "type": "USER_GROUP" + } + ] + ] + ] + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/schedules/{schedule_identifier}/update", + "operationId": "updateSchedule", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 2341 + }, + "Path_Variables": { + "schedule_identifier": "bhartshorneg1688027300874" + }, + "Query_Variables": {}, + "Body": { + "description": "Maecenas pulvinar lobortis est. Phasellus sit amet erat. Nulla tempus.", + "metadata_type": "LIVEBOARD", + "metadata_identifier": "b2d68a4f-cf67-4723-966f-8a592fdbf8b9", + "file_format": "CSV", + "liveboard_options": { + "visualization_identifiers": [] + }, + "pdf_options": { + "include_cover_page": true, + "include_custom_logo": true, + "page_orientation": "PORTRAIT", + "truncate_table": true + }, + "frequency": [ + [ + "cron_expression", + { + "day_of_month": "28", + "day_of_week": "4", + "hour": "22", + "month": "11", + "minute": "24", + "second": "28" + } + ] + ], + "recipient_details": { + "emails": [ + "jhastingsg@shutterfly.com" + ], + "principals": [ + { + "identifier": "046760d3-c0be-47d0-a9e7-a1b37c4e4432", + "type": "USER_GROUP" + }, + { + "identifier": "160b8fa4-4028-4ffe-a559-cbaf33c0a9b3", + "type": "USER" + }, + { + "identifier": "5dc626e5-1921-4758-a7bf-8501605aa59f", + "type": "USER" + } + ] + } + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/schedules/{schedule_identifier}/update", + "operationId": "updateSchedule", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 2342 + }, + "Path_Variables": { + "schedule_identifier": "cpedracci61688027300822" + }, + "Query_Variables": {}, + "Body": { + "description": "Curabitur gravida nisi at nibh. In hac habitasse platea dictumst. Aliquam augue quam, sollicitudin vitae, consectetuer eget, rutrum at, lorem. Integer tincidunt ante vel ipsum.", + "metadata_type": "LIVEBOARD", + "liveboard_options": { + "visualization_identifiers": [] + }, + "pdf_options": { + "include_cover_page": false, + "include_custom_logo": true, + "include_filter_page": true, + "include_page_number": true, + "page_footer_text": "cgodman6", + "page_size": "A4" + }, + "time_zone": "Europe/Warsaw", + "frequency": { + "cron_expression": { + "day_of_month": "19", + "day_of_week": "0", + "hour": "20", + "month": "8", + "minute": "30", + "second": "40" + } + }, + "recipient_details": [ + [ + "emails", + [ + "rwhellams6@tripadvisor.com", + "maujean6@businessinsider.com" + ] + ], + [ + "principals", + [ + { + "identifier": "046760d3-c0be-47d0-a9e7-a1b37c4e4432", + "type": "USER_GROUP" + }, + { + "identifier": "160b8fa4-4028-4ffe-a559-cbaf33c0a9b3", + "type": "USER" + } + ] + ] + ], + "metadata_identifier": "b2d68a4f-cf67-4723-966f-8a592fdbf8b9" + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/schedules/{schedule_identifier}/update", + "operationId": "updateSchedule", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 2343 + }, + "Path_Variables": { + "schedule_identifier": "trushton01688027300763" + }, + "Query_Variables": {}, + "Body": { + "name": "dwimlett01688027305017", + "description": "Morbi odio odio, elementum eu, interdum eu, tincidunt in, leo. Maecenas pulvinar lobortis est.", + "file_format": "PDF", + "liveboard_options": { + "visualization_identifiers": [] + }, + "pdf_options": { + "include_cover_page": false, + "include_filter_page": true, + "page_footer_text": "lwoolen0", + "page_size": "A4", + "truncate_table": true + }, + "time_zone": [ + "America/El_Salvador" + ], + "frequency": { + "cron_expression": { + "day_of_month": "12", + "day_of_week": "3", + "hour": "9", + "month": "11", + "minute": "26", + "second": "49" + } + }, + "recipient_details": { + "emails": [ + "apitkin0@jimdo.com", + "mocrowley0@va.gov", + "tpatrie0@unblog.fr" + ], + "principals": [ + { + "identifier": "046760d3-c0be-47d0-a9e7-a1b37c4e4432", + "type": "USER_GROUP" + } + ] + }, + "metadata_identifier": "e82fe65a-7ac0-4282-a783-7a35c01b8dbd" + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/schedules/{schedule_identifier}/update", + "operationId": "updateSchedule", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 2344 + }, + "Path_Variables": { + "schedule_identifier": "rgantzmana1688027300855" + }, + "Query_Variables": {}, + "Body": { + "name": "csolmana1688027305159", + "description": [ + "Nullam", + "orci", + "pede,", + "venenatis", + "non,", + "sodales", + "sed,", + "tincidunt", + "eu,", + "felis.", + "Fusce", + "posuere", + "felis", + "sed", + "lacus.", + "Morbi", + "sem", + "mauris,", + "laoreet", + "ut,", + "rhoncus", + "aliquet,", + "pulvinar", + "sed,", + "nisl.", + "Nunc", + "rhoncus", + "dui", + "vel", + "sem." + ], + "metadata_type": "LIVEBOARD", + "file_format": "CSV", + "liveboard_options": { + "visualization_identifiers": [] + }, + "pdf_options": { + "include_cover_page": false, + "include_custom_logo": false, + "include_filter_page": true + }, + "time_zone": "Europe/Moscow", + "frequency": { + "cron_expression": { + "day_of_month": "12", + "day_of_week": "1", + "hour": "3", + "month": "4", + "minute": "8", + "second": "22" + } + }, + "recipient_details": { + "emails": [ + "jgravellsa@twitter.com" + ], + "principals": [ + { + "identifier": "046760d3-c0be-47d0-a9e7-a1b37c4e4432", + "type": "USER_GROUP" + }, + { + "identifier": "160b8fa4-4028-4ffe-a559-cbaf33c0a9b3", + "type": "USER" + }, + { + "identifier": "5dc626e5-1921-4758-a7bf-8501605aa59f", + "type": "USER" + } + ] + }, + "metadata_identifier": "e82fe65a-7ac0-4282-a783-7a35c01b8dbd" + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/schedules/{schedule_identifier}/update", + "operationId": "updateSchedule", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 2345 + }, + "Path_Variables": { + "schedule_identifier": "bhartshorneg1688027300874" + }, + "Query_Variables": {}, + "Body": { + "description": "Maecenas pulvinar lobortis est. Phasellus sit amet erat. Nulla tempus.", + "metadata_type": "LIVEBOARD", + "metadata_identifier": "b2d68a4f-cf67-4723-966f-8a592fdbf8b9", + "file_format": [ + "CSV" + ], + "liveboard_options": { + "visualization_identifiers": [] + }, + "pdf_options": { + "include_cover_page": true, + "include_custom_logo": true, + "page_orientation": "PORTRAIT", + "truncate_table": true + }, + "frequency": { + "cron_expression": { + "day_of_month": "28", + "day_of_week": "4", + "hour": "22", + "month": "11", + "minute": "24", + "second": "28" + } + }, + "recipient_details": { + "emails": [ + "jhastingsg@shutterfly.com" + ], + "principals": [ + { + "identifier": "046760d3-c0be-47d0-a9e7-a1b37c4e4432", + "type": "USER_GROUP" + }, + { + "identifier": "160b8fa4-4028-4ffe-a559-cbaf33c0a9b3", + "type": "USER" + }, + { + "identifier": "5dc626e5-1921-4758-a7bf-8501605aa59f", + "type": "USER" + } + ] + } + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/schedules/{schedule_identifier}/update", + "operationId": "updateSchedule", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 2346 + }, + "Path_Variables": { + "schedule_identifier": "bhartshorneg1688027300874" + }, + "Query_Variables": {}, + "Body": { + "description": "Maecenas pulvinar lobortis est. Phasellus sit amet erat. Nulla tempus.", + "metadata_type": "LIVEBOARD", + "metadata_identifier": "b2d68a4f-cf67-4723-966f-8a592fdbf8b9", + "file_format": [ + "CSV" + ], + "liveboard_options": { + "visualization_identifiers": [] + }, + "pdf_options": { + "include_cover_page": true, + "include_custom_logo": true, + "page_orientation": "PORTRAIT", + "truncate_table": true + }, + "frequency": { + "cron_expression": { + "day_of_month": "28", + "day_of_week": "4", + "hour": "22", + "month": "11", + "minute": "24", + "second": "28" + } + }, + "recipient_details": { + "emails": [ + "jhastingsg@shutterfly.com" + ], + "principals": [ + { + "identifier": "046760d3-c0be-47d0-a9e7-a1b37c4e4432", + "type": "USER_GROUP" + }, + { + "identifier": "160b8fa4-4028-4ffe-a559-cbaf33c0a9b3", + "type": "USER" + }, + { + "identifier": "5dc626e5-1921-4758-a7bf-8501605aa59f", + "type": "USER" + } + ] + } + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/schedules/{schedule_identifier}/update", + "operationId": "updateSchedule", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 2347 + }, + "Path_Variables": { + "schedule_identifier": "rgantzmana1688027300855" + }, + "Query_Variables": {}, + "Body": { + "name": "csolmana1688027305159", + "description": "Nullam orci pede, venenatis non, sodales sed, tincidunt eu, felis. Fusce posuere felis sed lacus. Morbi sem mauris, laoreet ut, rhoncus aliquet, pulvinar sed, nisl. Nunc rhoncus dui vel sem.", + "metadata_type": [ + "LIVEBOARD" + ], + "file_format": "CSV", + "liveboard_options": { + "visualization_identifiers": [] + }, + "pdf_options": { + "include_cover_page": false, + "include_custom_logo": false, + "include_filter_page": true + }, + "time_zone": "Europe/Moscow", + "frequency": { + "cron_expression": { + "day_of_month": "12", + "day_of_week": "1", + "hour": "3", + "month": "4", + "minute": "8", + "second": "22" + } + }, + "recipient_details": { + "emails": [ + "jgravellsa@twitter.com" + ], + "principals": [ + { + "identifier": "046760d3-c0be-47d0-a9e7-a1b37c4e4432", + "type": "USER_GROUP" + }, + { + "identifier": "160b8fa4-4028-4ffe-a559-cbaf33c0a9b3", + "type": "USER" + }, + { + "identifier": "5dc626e5-1921-4758-a7bf-8501605aa59f", + "type": "USER" + } + ] + }, + "metadata_identifier": "e82fe65a-7ac0-4282-a783-7a35c01b8dbd" + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/schedules/{schedule_identifier}/update", + "operationId": "updateSchedule", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 2348 + }, + "Path_Variables": { + "schedule_identifier": "glewing11688027300801" + }, + "Query_Variables": {}, + "Body": { + "name": "atreweek11688027305113", + "description": [ + "Morbi", + "a", + "ipsum.", + "Integer", + "a", + "nibh.", + "In", + "quis", + "justo." + ], + "metadata_type": "LIVEBOARD", + "file_format": "CSV", + "liveboard_options": { + "visualization_identifiers": [] + }, + "pdf_options": { + "include_custom_logo": false, + "include_filter_page": true, + "include_page_number": true, + "page_orientation": "LANDSCAPE", + "truncate_table": true + }, + "time_zone": "Europe/Lisbon", + "frequency": { + "cron_expression": { + "day_of_month": "14", + "day_of_week": "6", + "hour": "8", + "month": "8", + "minute": "34", + "second": "46" + } + }, + "recipient_details": { + "emails": [ + "areadwing1@goo.ne.jp" + ], + "principals": [ + { + "identifier": "046760d3-c0be-47d0-a9e7-a1b37c4e4432", + "type": "USER_GROUP" + }, + { + "identifier": "160b8fa4-4028-4ffe-a559-cbaf33c0a9b3", + "type": "USER" + } + ] + }, + "metadata_identifier": "78950be9-0717-449e-be26-64ea42617dd1" + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/schedules/{schedule_identifier}/update", + "operationId": "updateSchedule", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 2349 + }, + "Path_Variables": { + "schedule_identifier": "rgantzmana1688027300855" + }, + "Query_Variables": {}, + "Body": { + "name": "csolmana1688027305159", + "description": "Nullam orci pede, venenatis non, sodales sed, tincidunt eu, felis. Fusce posuere felis sed lacus. Morbi sem mauris, laoreet ut, rhoncus aliquet, pulvinar sed, nisl. Nunc rhoncus dui vel sem.", + "metadata_type": "LIVEBOARD", + "file_format": "CSV", + "liveboard_options": { + "visualization_identifiers": [] + }, + "pdf_options": { + "include_cover_page": false, + "include_custom_logo": false, + "include_filter_page": true + }, + "time_zone": "Europe/Moscow", + "frequency": { + "cron_expression": { + "day_of_month": "12", + "day_of_week": "1", + "hour": "3", + "month": "4", + "minute": "8", + "second": "22" + } + }, + "recipient_details": { + "emails": [ + "jgravellsa@twitter.com" + ], + "principals": [ + { + "identifier": "046760d3-c0be-47d0-a9e7-a1b37c4e4432", + "type": "USER_GROUP" + }, + { + "identifier": "160b8fa4-4028-4ffe-a559-cbaf33c0a9b3", + "type": "USER" + }, + { + "identifier": "5dc626e5-1921-4758-a7bf-8501605aa59f", + "type": "USER" + } + ] + }, + "metadata_identifier": [ + "e82fe65a-7ac0-4282-a783-7a35c01b8dbd" + ] + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/schedules/{schedule_identifier}/update", + "operationId": "updateSchedule", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 2350 + }, + "Path_Variables": { + "schedule_identifier": "cpedracci61688027300822" + }, + "Query_Variables": {}, + "Body": { + "description": "Curabitur gravida nisi at nibh. In hac habitasse platea dictumst. Aliquam augue quam, sollicitudin vitae, consectetuer eget, rutrum at, lorem. Integer tincidunt ante vel ipsum.", + "metadata_type": [ + "LIVEBOARD" + ], + "liveboard_options": { + "visualization_identifiers": [] + }, + "pdf_options": { + "include_cover_page": false, + "include_custom_logo": true, + "include_filter_page": true, + "include_page_number": true, + "page_footer_text": "cgodman6", + "page_size": "A4" + }, + "time_zone": "Europe/Warsaw", + "frequency": { + "cron_expression": { + "day_of_month": "19", + "day_of_week": "0", + "hour": "20", + "month": "8", + "minute": "30", + "second": "40" + } + }, + "recipient_details": { + "emails": [ + "rwhellams6@tripadvisor.com", + "maujean6@businessinsider.com" + ], + "principals": [ + { + "identifier": "046760d3-c0be-47d0-a9e7-a1b37c4e4432", + "type": "USER_GROUP" + }, + { + "identifier": "160b8fa4-4028-4ffe-a559-cbaf33c0a9b3", + "type": "USER" + } + ] + }, + "metadata_identifier": "b2d68a4f-cf67-4723-966f-8a592fdbf8b9" + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/schedules/{schedule_identifier}/update", + "operationId": "updateSchedule", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 2351 + }, + "Path_Variables": { + "schedule_identifier": "mmcmychemh1688027300877" + }, + "Query_Variables": {}, + "Body": { + "liveboard_options": { + "visualization_identifiers": [] + }, + "pdf_options": { + "include_cover_page": true, + "include_custom_logo": false, + "include_filter_page": false, + "page_footer_text": "sbonninh", + "truncate_table": false + }, + "frequency": [ + [ + "cron_expression", + { + "day_of_month": "24", + "day_of_week": "5", + "hour": "0", + "month": "12", + "minute": "0", + "second": "10" + } + ] + ], + "recipient_details": { + "emails": [ + "ksacazeh@wufoo.com", + "ifirmanh@github.io" + ], + "principals": [ + { + "identifier": "046760d3-c0be-47d0-a9e7-a1b37c4e4432", + "type": "USER_GROUP" + }, + { + "identifier": "160b8fa4-4028-4ffe-a559-cbaf33c0a9b3", + "type": "USER" + }, + { + "identifier": "5dc626e5-1921-4758-a7bf-8501605aa59f", + "type": "USER" + } + ] + }, + "metadata_identifier": "262abdac-b00f-4f5f-ad33-fcf10154184f" + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/schedules/{schedule_identifier}/update", + "operationId": "updateSchedule", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 2352 + }, + "Path_Variables": { + "schedule_identifier": "hstoggellb1688027300858" + }, + "Query_Variables": {}, + "Body": { + "file_format": "CSV", + "liveboard_options": { + "visualization_identifiers": [] + }, + "pdf_options": { + "include_custom_logo": true, + "include_page_number": true, + "page_footer_text": "skillockb", + "page_orientation": "PORTRAIT", + "page_size": "A4" + }, + "frequency": { + "cron_expression": { + "day_of_month": "4", + "day_of_week": "6", + "hour": "10", + "month": "10", + "minute": "25", + "second": "2" + } + }, + "recipient_details": { + "emails": [ + "bendleb@1688.com", + "ksaddingtonb@ucoz.ru", + "lcasinab@washingtonpost.com" + ], + "principals": [ + { + "identifier": "046760d3-c0be-47d0-a9e7-a1b37c4e4432", + "type": "USER_GROUP" + } + ] + }, + "metadata_identifier": [ + "78950be9-0717-449e-be26-64ea42617dd1" + ] + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/schedules/{schedule_identifier}/update", + "operationId": "updateSchedule", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 2353 + }, + "Path_Variables": { + "schedule_identifier": "kfullick41688027300814" + }, + "Query_Variables": {}, + "Body": { + "description": [ + "Lorem", + "ipsum", + "dolor", + "sit", + "amet,", + "consectetuer", + "adipiscing", + "elit.", + "Proin", + "risus.", + "Praesent", + "lectus.", + "Vestibulum", + "quam", + "sapien,", + "varius", + "ut,", + "blandit", + "non,", + "interdum", + "in,", + "ante.", + "Vestibulum", + "ante", + "ipsum", + "primis", + "in", + "faucibus", + "orci", + "luctus", + "et", + "ultrices", + "posuere", + "cubilia", + "Curae;", + "Duis", + "faucibus", + "accumsan", + "odio." + ], + "metadata_type": "LIVEBOARD", + "file_format": "CSV", + "liveboard_options": { + "visualization_identifiers": [] + }, + "pdf_options": { + "include_cover_page": true, + "include_custom_logo": true, + "include_filter_page": false, + "include_page_number": false, + "page_size": "A4" + }, + "frequency": { + "cron_expression": { + "day_of_month": "17", + "day_of_week": "0", + "hour": "18", + "month": "4", + "minute": "34", + "second": "22" + } + }, + "recipient_details": { + "emails": [ + "mbolino4@acquirethisname.com", + "mfreestone4@bloglovin.com", + "rtison4@ihg.com" + ], + "principals": [ + { + "identifier": "046760d3-c0be-47d0-a9e7-a1b37c4e4432", + "type": "USER_GROUP" + } + ] + }, + "metadata_identifier": "33248a57-cc70-4e39-9199-fb5092283381" + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/schedules/{schedule_identifier}/update", + "operationId": "updateSchedule", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 2354 + }, + "Path_Variables": { + "schedule_identifier": "rgantzmana1688027300855" + }, + "Query_Variables": {}, + "Body": { + "name": [ + "csolmana1688027305159" + ], + "description": "Nullam orci pede, venenatis non, sodales sed, tincidunt eu, felis. Fusce posuere felis sed lacus. Morbi sem mauris, laoreet ut, rhoncus aliquet, pulvinar sed, nisl. Nunc rhoncus dui vel sem.", + "metadata_type": "LIVEBOARD", + "file_format": "CSV", + "liveboard_options": { + "visualization_identifiers": [] + }, + "pdf_options": { + "include_cover_page": false, + "include_custom_logo": false, + "include_filter_page": true + }, + "time_zone": "Europe/Moscow", + "frequency": { + "cron_expression": { + "day_of_month": "12", + "day_of_week": "1", + "hour": "3", + "month": "4", + "minute": "8", + "second": "22" + } + }, + "recipient_details": { + "emails": [ + "jgravellsa@twitter.com" + ], + "principals": [ + { + "identifier": "046760d3-c0be-47d0-a9e7-a1b37c4e4432", + "type": "USER_GROUP" + }, + { + "identifier": "160b8fa4-4028-4ffe-a559-cbaf33c0a9b3", + "type": "USER" + }, + { + "identifier": "5dc626e5-1921-4758-a7bf-8501605aa59f", + "type": "USER" + } + ] + }, + "metadata_identifier": "e82fe65a-7ac0-4282-a783-7a35c01b8dbd" + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/schedules/{schedule_identifier}/update", + "operationId": "updateSchedule", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 2355 + }, + "Path_Variables": { + "schedule_identifier": "kWIBzACxbzkEIlz" + }, + "Query_Variables": {}, + "Body": { + "metadata_type": "LIVEBOARD", + "metadata_identifier": "4145513c-c9bd-4e48-af44-8dc001b5f955", + "file_format": "CSV", + "liveboard_options": { + "visualization_identifiers": [] + }, + "pdf_options": { + "include_custom_logo": false, + "include_page_number": true, + "page_footer_text": "rcattow3", + "page_size": "A4" + }, + "time_zone": "Asia/Chongqing", + "frequency": { + "cron_expression": { + "day_of_month": "27", + "day_of_week": "3", + "hour": "14", + "month": "12", + "minute": "43", + "second": "53" + } + }, + "recipient_details": { + "emails": [ + "jarnald3@tinyurl.com", + "adraisey3@friendfeed.com", + "jpendrey3@cornell.edu" + ], + "principals": [ + { + "identifier": "046760d3-c0be-47d0-a9e7-a1b37c4e4432", + "type": "USER_GROUP" + } + ] + } + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/schedules/{schedule_identifier}/update", + "operationId": "updateSchedule", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 2356 + }, + "Path_Variables": { + "schedule_identifier": "oAkpfQEPRpBAgYN" + }, + "Query_Variables": {}, + "Body": { + "name": "afissendenf1688027305183", + "description": "Nam ultrices, libero non mattis pulvinar, nulla pede ullamcorper augue, a suscipit nulla elit ac nulla. Sed vel enim sit amet nunc viverra dapibus. Nulla suscipit ligula in lacus. Curabitur at ipsum ac tellus semper interdum. Mauris ullamcorper purus sit amet nulla.", + "file_format": "PDF", + "liveboard_options": { + "visualization_identifiers": [] + }, + "pdf_options": { + "include_filter_page": false, + "include_page_number": true, + "page_orientation": "PORTRAIT", + "truncate_table": true + }, + "frequency": { + "cron_expression": { + "day_of_month": "18", + "day_of_week": "4", + "hour": "18", + "month": "3", + "minute": "49", + "second": "15" + } + }, + "recipient_details": { + "emails": [ + "krossboroughf@cdbaby.com", + "rscorrerf@ebay.co.uk", + "cbortolettif@a8.net" + ], + "principals": [ + { + "identifier": "046760d3-c0be-47d0-a9e7-a1b37c4e4432", + "type": "USER_GROUP" + }, + { + "identifier": "160b8fa4-4028-4ffe-a559-cbaf33c0a9b3", + "type": "USER" + }, + { + "identifier": "5dc626e5-1921-4758-a7bf-8501605aa59f", + "type": "USER" + } + ] + }, + "metadata_identifier": "6715f768-8930-4180-9a3d-1efdbfaa8e7f" + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/schedules/{schedule_identifier}/update", + "operationId": "updateSchedule", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 2357 + }, + "Path_Variables": { + "schedule_identifier": "dXlvrDpiLkFeeCO" + }, + "Query_Variables": {}, + "Body": { + "name": "afissendenf1688027305183", + "description": "Nam ultrices, libero non mattis pulvinar, nulla pede ullamcorper augue, a suscipit nulla elit ac nulla. Sed vel enim sit amet nunc viverra dapibus. Nulla suscipit ligula in lacus. Curabitur at ipsum ac tellus semper interdum. Mauris ullamcorper purus sit amet nulla.", + "file_format": "PDF", + "liveboard_options": { + "visualization_identifiers": [] + }, + "pdf_options": { + "include_filter_page": false, + "include_page_number": true, + "page_orientation": "PORTRAIT", + "truncate_table": true + }, + "frequency": { + "cron_expression": { + "day_of_month": "18", + "day_of_week": "4", + "hour": "18", + "month": "3", + "minute": "49", + "second": "15" + } + }, + "recipient_details": { + "emails": [ + "krossboroughf@cdbaby.com", + "rscorrerf@ebay.co.uk", + "cbortolettif@a8.net" + ], + "principals": [ + { + "identifier": "046760d3-c0be-47d0-a9e7-a1b37c4e4432", + "type": "USER_GROUP" + }, + { + "identifier": "160b8fa4-4028-4ffe-a559-cbaf33c0a9b3", + "type": "USER" + }, + { + "identifier": "5dc626e5-1921-4758-a7bf-8501605aa59f", + "type": "USER" + } + ] + }, + "metadata_identifier": "6715f768-8930-4180-9a3d-1efdbfaa8e7f" + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/schedules/{schedule_identifier}/update", + "operationId": "updateSchedule", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 2358 + }, + "Path_Variables": { + "schedule_identifier": "kqVjarkArHbAyhD" + }, + "Query_Variables": {}, + "Body": { + "liveboard_options": { + "visualization_identifiers": [] + }, + "pdf_options": { + "include_cover_page": true, + "include_custom_logo": false, + "include_filter_page": false, + "page_footer_text": "sbonninh", + "truncate_table": false + }, + "frequency": { + "cron_expression": { + "day_of_month": "24", + "day_of_week": "5", + "hour": "0", + "month": "12", + "minute": "0", + "second": "10" + } + }, + "recipient_details": { + "emails": [ + "ksacazeh@wufoo.com", + "ifirmanh@github.io" + ], + "principals": [ + { + "identifier": "046760d3-c0be-47d0-a9e7-a1b37c4e4432", + "type": "USER_GROUP" + }, + { + "identifier": "160b8fa4-4028-4ffe-a559-cbaf33c0a9b3", + "type": "USER" + }, + { + "identifier": "5dc626e5-1921-4758-a7bf-8501605aa59f", + "type": "USER" + } + ] + }, + "metadata_identifier": "262abdac-b00f-4f5f-ad33-fcf10154184f" + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/schedules/{schedule_identifier}/update", + "operationId": "updateSchedule", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 2359 + }, + "Path_Variables": { + "schedule_identifier": "fxedMluYeIAigof" + }, + "Query_Variables": {}, + "Body": { + "description": "Maecenas pulvinar lobortis est. Phasellus sit amet erat. Nulla tempus.", + "metadata_type": "LIVEBOARD", + "metadata_identifier": "b2d68a4f-cf67-4723-966f-8a592fdbf8b9", + "file_format": "CSV", + "liveboard_options": { + "visualization_identifiers": [] + }, + "pdf_options": { + "include_cover_page": true, + "include_custom_logo": true, + "page_orientation": "PORTRAIT", + "truncate_table": true + }, + "frequency": { + "cron_expression": { + "day_of_month": "28", + "day_of_week": "4", + "hour": "22", + "month": "11", + "minute": "24", + "second": "28" + } + }, + "recipient_details": { + "emails": [ + "jhastingsg@shutterfly.com" + ], + "principals": [ + { + "identifier": "046760d3-c0be-47d0-a9e7-a1b37c4e4432", + "type": "USER_GROUP" + }, + { + "identifier": "160b8fa4-4028-4ffe-a559-cbaf33c0a9b3", + "type": "USER" + }, + { + "identifier": "5dc626e5-1921-4758-a7bf-8501605aa59f", + "type": "USER" + } + ] + } + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/schedules/{schedule_identifier}/update", + "operationId": "updateSchedule", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 2360 + }, + "Path_Variables": { + "schedule_identifier": "LBuRetrNNLCwVpH" + }, + "Query_Variables": {}, + "Body": { + "metadata_type": "LIVEBOARD", + "file_format": "CSV", + "liveboard_options": { + "visualization_identifiers": [] + }, + "pdf_options": { + "include_custom_logo": true, + "include_filter_page": true, + "page_footer_text": "eeckh7", + "truncate_table": true + }, + "time_zone": "America/Costa_Rica", + "frequency": { + "cron_expression": { + "day_of_month": "3", + "day_of_week": "5", + "hour": "2", + "month": "3", + "minute": "4", + "second": "0" + } + }, + "recipient_details": { + "emails": [ + "adargavel7@cloudflare.com", + "rcolter7@blogs.com", + "ccrossby7@quantcast.com" + ], + "principals": [ + { + "identifier": "046760d3-c0be-47d0-a9e7-a1b37c4e4432", + "type": "USER_GROUP" + } + ] + }, + "metadata_identifier": "262abdac-b00f-4f5f-ad33-fcf10154184f" + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/schedules/{schedule_identifier}/update", + "operationId": "updateSchedule", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 2361 + }, + "Path_Variables": { + "schedule_identifier": "XyULTAEmfTOyYtZ" + }, + "Query_Variables": {}, + "Body": { + "name": "atreweek11688027305113", + "description": "Morbi a ipsum. Integer a nibh. In quis justo.", + "metadata_type": "LIVEBOARD", + "file_format": "CSV", + "liveboard_options": { + "visualization_identifiers": [] + }, + "pdf_options": { + "include_custom_logo": false, + "include_filter_page": true, + "include_page_number": true, + "page_orientation": "LANDSCAPE", + "truncate_table": true + }, + "time_zone": "Europe/Lisbon", + "frequency": { + "cron_expression": { + "day_of_month": "14", + "day_of_week": "6", + "hour": "8", + "month": "8", + "minute": "34", + "second": "46" + } + }, + "recipient_details": { + "emails": [ + "areadwing1@goo.ne.jp" + ], + "principals": [ + { + "identifier": "046760d3-c0be-47d0-a9e7-a1b37c4e4432", + "type": "USER_GROUP" + }, + { + "identifier": "160b8fa4-4028-4ffe-a559-cbaf33c0a9b3", + "type": "USER" + } + ] + }, + "metadata_identifier": "78950be9-0717-449e-be26-64ea42617dd1" + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/schedules/{schedule_identifier}/update", + "operationId": "updateSchedule", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 2362 + }, + "Path_Variables": { + "schedule_identifier": "PaYYoRFLAwPekUy" + }, + "Query_Variables": {}, + "Body": { + "name": "ftwiggins51688027305134", + "description": "Suspendisse ornare consequat lectus.", + "file_format": "CSV", + "liveboard_options": { + "visualization_identifiers": [] + }, + "pdf_options": { + "include_cover_page": true, + "include_page_number": false, + "page_footer_text": "rcreany5" + }, + "frequency": { + "cron_expression": { + "day_of_month": "20", + "day_of_week": "1", + "hour": "19", + "month": "4", + "minute": "24", + "second": "59" + } + }, + "recipient_details": { + "emails": [ + "sbonsale5@theglobeandmail.com", + "ipassby5@merriam-webster.com" + ], + "principals": [ + { + "identifier": "046760d3-c0be-47d0-a9e7-a1b37c4e4432", + "type": "USER_GROUP" + }, + { + "identifier": "160b8fa4-4028-4ffe-a559-cbaf33c0a9b3", + "type": "USER" + } + ] + }, + "metadata_identifier": "6715f768-8930-4180-9a3d-1efdbfaa8e7f" + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/schedules/{schedule_identifier}/update", + "operationId": "updateSchedule", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 2363 + }, + "Path_Variables": { + "schedule_identifier": "GMrEqYHkLCKCfsE" + }, + "Query_Variables": {}, + "Body": { + "metadata_type": "LIVEBOARD", + "metadata_identifier": "327f4d60-c502-43b0-b1d4-c73df5031a2e", + "file_format": "PDF", + "liveboard_options": { + "visualization_identifiers": [] + }, + "pdf_options": { + "include_cover_page": false, + "include_custom_logo": true, + "include_page_number": false, + "page_orientation": "LANDSCAPE", + "truncate_table": true + }, + "frequency": { + "cron_expression": { + "day_of_month": "7", + "day_of_week": "5", + "hour": "18", + "month": "10", + "minute": "13", + "second": "13" + } + }, + "recipient_details": { + "emails": [ + "pstidson8@cocolog-nifty.com" + ], + "principals": [ + { + "identifier": "046760d3-c0be-47d0-a9e7-a1b37c4e4432", + "type": "USER_GROUP" + }, + { + "identifier": "160b8fa4-4028-4ffe-a559-cbaf33c0a9b3", + "type": "USER" + }, + { + "identifier": "5dc626e5-1921-4758-a7bf-8501605aa59f", + "type": "USER" + } + ] + } + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/schedules/{schedule_identifier}/update", + "operationId": "updateSchedule", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 2364 + }, + "Path_Variables": { + "schedule_identifier": "xykKCaqUJZtdrUA" + }, + "Query_Variables": {}, + "Body": { + "name": "dwimlett01688027305017", + "description": "Morbi odio odio, elementum eu, interdum eu, tincidunt in, leo. Maecenas pulvinar lobortis est.", + "file_format": "PDF", + "liveboard_options": { + "visualization_identifiers": [] + }, + "pdf_options": { + "include_cover_page": false, + "include_filter_page": true, + "page_footer_text": "lwoolen0", + "page_size": "A4", + "truncate_table": true + }, + "time_zone": "America/El_Salvador", + "frequency": { + "cron_expression": { + "day_of_month": "12", + "day_of_week": "3", + "hour": "9", + "month": "11", + "minute": "26", + "second": "49" + } + }, + "recipient_details": { + "emails": [ + "apitkin0@jimdo.com", + "mocrowley0@va.gov", + "tpatrie0@unblog.fr" + ], + "principals": [ + { + "identifier": "046760d3-c0be-47d0-a9e7-a1b37c4e4432", + "type": "USER_GROUP" + } + ] + }, + "metadata_identifier": "e82fe65a-7ac0-4282-a783-7a35c01b8dbd" + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/schedules/{schedule_identifier}/update", + "operationId": "updateSchedule", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 2365 + }, + "Path_Variables": { + "schedule_identifier": "EkvphpPVpbvOGYD" + }, + "Query_Variables": {}, + "Body": { + "name": "mchallicei1688027305206", + "description": "Integer tincidunt ante vel ipsum. Praesent blandit lacinia erat. Vestibulum sed magna at nunc commodo placerat. Praesent blandit. Nam nulla.", + "metadata_type": "LIVEBOARD", + "file_format": "PDF", + "liveboard_options": { + "visualization_identifiers": [] + }, + "pdf_options": { + "include_custom_logo": false, + "include_page_number": true, + "page_footer_text": "tpattersoni", + "page_orientation": "PORTRAIT", + "page_size": "A4", + "truncate_table": false + }, + "time_zone": "Asia/Manila", + "frequency": { + "cron_expression": { + "day_of_month": "21", + "day_of_week": "3", + "hour": "5", + "month": "11", + "minute": "50", + "second": "6" + } + }, + "recipient_details": { + "emails": [ + "llomaxi@goo.gl", + "gvasyukhini@dmoz.org" + ], + "principals": [ + { + "identifier": "046760d3-c0be-47d0-a9e7-a1b37c4e4432", + "type": "USER_GROUP" + } + ] + }, + "metadata_identifier": "327f4d60-c502-43b0-b1d4-c73df5031a2e" + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/schedules/{schedule_identifier}/update", + "operationId": "updateSchedule", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 2366 + }, + "Path_Variables": { + "schedule_identifier": "IXMgpOmEskKWlln" + }, + "Query_Variables": {}, + "Body": { + "metadata_type": "LIVEBOARD", + "metadata_identifier": "2ff57a24-cf90-485f-8b4b-45fc17474c6f", + "file_format": "PDF", + "liveboard_options": { + "visualization_identifiers": [] + }, + "pdf_options": { + "page_footer_text": "jspehrc", + "page_orientation": "PORTRAIT", + "page_size": "A4", + "truncate_table": true + }, + "time_zone": "Asia/Harbin", + "frequency": { + "cron_expression": { + "day_of_month": "24", + "day_of_week": "6", + "hour": "2", + "month": "12", + "minute": "49", + "second": "29" + } + }, + "recipient_details": { + "emails": [ + "efancyc@yellowbook.com", + "vdickenc@prlog.org", + "dlowdec@cnbc.com" + ], + "principals": [ + { + "identifier": "046760d3-c0be-47d0-a9e7-a1b37c4e4432", + "type": "USER_GROUP" + }, + { + "identifier": "160b8fa4-4028-4ffe-a559-cbaf33c0a9b3", + "type": "USER" + } + ] + } + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/schedules/{schedule_identifier}/update", + "operationId": "updateSchedule", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 2367 + }, + "Path_Variables": { + "schedule_identifier": "xoymZCRycwWKNbe" + }, + "Query_Variables": {}, + "Body": { + "name": "cshillabere1688027305178", + "description": "Phasellus in felis. Donec semper sapien a libero.", + "file_format": "CSV", + "liveboard_options": { + "visualization_identifiers": [] + }, + "pdf_options": { + "include_custom_logo": true, + "include_filter_page": true, + "truncate_table": true + }, + "frequency": { + "cron_expression": { + "day_of_month": "15", + "day_of_week": "3", + "hour": "2", + "month": "8", + "minute": "6", + "second": "44" + } + }, + "recipient_details": { + "emails": [ + "gcattermolee@icio.us", + "esteablere@studiopress.com", + "kbuiste@vinaora.com" + ], + "principals": [ + { + "identifier": "046760d3-c0be-47d0-a9e7-a1b37c4e4432", + "type": "USER_GROUP" + }, + { + "identifier": "160b8fa4-4028-4ffe-a559-cbaf33c0a9b3", + "type": "USER" + }, + { + "identifier": "5dc626e5-1921-4758-a7bf-8501605aa59f", + "type": "USER" + } + ] + }, + "metadata_identifier": "33248a57-cc70-4e39-9199-fb5092283381" + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/schedules/{schedule_identifier}/update", + "operationId": "updateSchedule", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 2368 + }, + "Path_Variables": { + "schedule_identifier": "MNzYkHMSZGwUSSe" + }, + "Query_Variables": {}, + "Body": { + "name": "cshillabere1688027305178", + "description": "Phasellus in felis. Donec semper sapien a libero.", + "file_format": "CSV", + "liveboard_options": { + "visualization_identifiers": [] + }, + "pdf_options": { + "include_custom_logo": true, + "include_filter_page": true, + "truncate_table": true + }, + "frequency": { + "cron_expression": { + "day_of_month": "15", + "day_of_week": "3", + "hour": "2", + "month": "8", + "minute": "6", + "second": "44" + } + }, + "recipient_details": { + "emails": [ + "gcattermolee@icio.us", + "esteablere@studiopress.com", + "kbuiste@vinaora.com" + ], + "principals": [ + { + "identifier": "046760d3-c0be-47d0-a9e7-a1b37c4e4432", + "type": "USER_GROUP" + }, + { + "identifier": "160b8fa4-4028-4ffe-a559-cbaf33c0a9b3", + "type": "USER" + }, + { + "identifier": "5dc626e5-1921-4758-a7bf-8501605aa59f", + "type": "USER" + } + ] + }, + "metadata_identifier": "33248a57-cc70-4e39-9199-fb5092283381" + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/schedules/{schedule_identifier}/update", + "operationId": "updateSchedule", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 2369 + }, + "Path_Variables": { + "schedule_identifier": "sqCSZaDNQjLvBgf" + }, + "Query_Variables": {}, + "Body": { + "description": "Etiam justo. Etiam pretium iaculis justo. In hac habitasse platea dictumst.", + "metadata_identifier": "2ff57a24-cf90-485f-8b4b-45fc17474c6f", + "liveboard_options": { + "visualization_identifiers": [] + }, + "pdf_options": { + "page_size": "A4" + }, + "frequency": { + "cron_expression": { + "day_of_month": "6", + "day_of_week": "5", + "hour": "2", + "month": "10", + "minute": "58", + "second": "9" + } + }, + "recipient_details": { + "emails": [ + "smaceveley2@wired.com", + "flympany2@economist.com" + ], + "principals": [ + { + "identifier": "046760d3-c0be-47d0-a9e7-a1b37c4e4432", + "type": "USER_GROUP" + } + ] + } + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/schedules/search", + "operationId": "searchSchedules", + "scenario": "positive", + "type": "AUTOMATIC", + "testId": 2370 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "metadata": [ + { + "identifier": "e82fe65a-7ac0-4282-a783-7a35c01b8dbd", + "type": "LIVEBOARD" + } + ], + "record_offset": 5, + "record_size": 9, + "sort_options": { + "order": "DESC" + } + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/schedules/search", + "operationId": "searchSchedules", + "scenario": "positive", + "type": "AUTOMATIC", + "testId": 2371 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "metadata": [ + { + "identifier": "e82fe65a-7ac0-4282-a783-7a35c01b8dbd", + "type": "LIVEBOARD" + }, + { + "identifier": "78950be9-0717-449e-be26-64ea42617dd1", + "type": null + }, + { + "identifier": "2ff57a24-cf90-485f-8b4b-45fc17474c6f", + "type": "LIVEBOARD" + } + ], + "record_offset": 5, + "record_size": 10, + "sort_options": { + "field_name": "NAME" + } + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/schedules/search", + "operationId": "searchSchedules", + "scenario": "positive", + "type": "AUTOMATIC", + "testId": 2372 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "metadata": [ + { + "identifier": "e82fe65a-7ac0-4282-a783-7a35c01b8dbd", + "type": null + }, + { + "identifier": "78950be9-0717-449e-be26-64ea42617dd1", + "type": null + }, + { + "identifier": "2ff57a24-cf90-485f-8b4b-45fc17474c6f", + "type": "LIVEBOARD" + } + ], + "record_offset": 6, + "record_size": 1, + "sort_options": { + "field_name": "AUTHOR" + } + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/schedules/search", + "operationId": "searchSchedules", + "scenario": "positive", + "type": "AUTOMATIC", + "testId": 2373 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "record_offset": 3, + "record_size": 10, + "sort_options": { + "order": "ASC" + } + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/schedules/search", + "operationId": "searchSchedules", + "scenario": "positive", + "type": "AUTOMATIC", + "testId": 2374 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "metadata": [ + { + "identifier": "e82fe65a-7ac0-4282-a783-7a35c01b8dbd", + "type": null + }, + { + "identifier": "78950be9-0717-449e-be26-64ea42617dd1", + "type": null + } + ], + "record_offset": 7, + "record_size": 8, + "sort_options": { + "order": "ASC" + } + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/schedules/search", + "operationId": "searchSchedules", + "scenario": "positive", + "type": "AUTOMATIC", + "testId": 2375 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "metadata": [ + { + "identifier": "e82fe65a-7ac0-4282-a783-7a35c01b8dbd", + "type": "LIVEBOARD" + } + ], + "record_offset": 8, + "record_size": 1, + "sort_options": { + "field_name": "MODIFIED" + } + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/schedules/search", + "operationId": "searchSchedules", + "scenario": "positive", + "type": "AUTOMATIC", + "testId": 2376 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "metadata": [ + { + "identifier": "e82fe65a-7ac0-4282-a783-7a35c01b8dbd", + "type": null + } + ], + "record_offset": 4, + "record_size": 2 + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/schedules/search", + "operationId": "searchSchedules", + "scenario": "positive", + "type": "AUTOMATIC", + "testId": 2377 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "metadata": [ + { + "identifier": "e82fe65a-7ac0-4282-a783-7a35c01b8dbd", + "type": null + }, + { + "identifier": "78950be9-0717-449e-be26-64ea42617dd1", + "type": "LIVEBOARD" + } + ], + "record_offset": 5, + "record_size": 7, + "sort_options": { + "order": "DESC" + } + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/schedules/search", + "operationId": "searchSchedules", + "scenario": "positive", + "type": "AUTOMATIC", + "testId": 2378 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "metadata": [ + { + "identifier": "e82fe65a-7ac0-4282-a783-7a35c01b8dbd", + "type": null + } + ], + "record_offset": 5, + "record_size": 2, + "sort_options": { + "field_name": "DISPLAY_NAME", + "order": "DESC" + } + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/schedules/search", + "operationId": "searchSchedules", + "scenario": "positive", + "type": "AUTOMATIC", + "testId": 2379 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "metadata": [ + { + "identifier": "e82fe65a-7ac0-4282-a783-7a35c01b8dbd", + "type": null + }, + { + "identifier": "78950be9-0717-449e-be26-64ea42617dd1", + "type": "LIVEBOARD" + }, + { + "identifier": "2ff57a24-cf90-485f-8b4b-45fc17474c6f", + "type": null + } + ], + "record_offset": 8, + "record_size": 4, + "sort_options": { + "field_name": "NAME", + "order": "DESC" + } + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/schedules/search", + "operationId": "searchSchedules", + "scenario": "positive", + "type": "AUTOMATIC", + "testId": 2380 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "record_offset": 3, + "record_size": 2, + "sort_options": { + "field_name": "MODIFIED", + "order": "ASC" + } + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/schedules/search", + "operationId": "searchSchedules", + "scenario": "positive", + "type": "AUTOMATIC", + "testId": 2381 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "metadata": [ + { + "identifier": "e82fe65a-7ac0-4282-a783-7a35c01b8dbd", + "type": "LIVEBOARD" + }, + { + "identifier": "78950be9-0717-449e-be26-64ea42617dd1", + "type": null + }, + { + "identifier": "2ff57a24-cf90-485f-8b4b-45fc17474c6f", + "type": null + } + ], + "record_offset": 3, + "record_size": 7, + "sort_options": { + "field_name": "AUTHOR" + } + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/schedules/search", + "operationId": "searchSchedules", + "scenario": "positive", + "type": "AUTOMATIC", + "testId": 2382 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "metadata": [ + { + "identifier": "e82fe65a-7ac0-4282-a783-7a35c01b8dbd", + "type": "LIVEBOARD" + }, + { + "identifier": "78950be9-0717-449e-be26-64ea42617dd1", + "type": "LIVEBOARD" + }, + { + "identifier": "2ff57a24-cf90-485f-8b4b-45fc17474c6f", + "type": "LIVEBOARD" + } + ], + "record_offset": 9, + "record_size": 7 + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/schedules/search", + "operationId": "searchSchedules", + "scenario": "positive", + "type": "AUTOMATIC", + "testId": 2383 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "metadata": [ + { + "identifier": "e82fe65a-7ac0-4282-a783-7a35c01b8dbd", + "type": "LIVEBOARD" + }, + { + "identifier": "78950be9-0717-449e-be26-64ea42617dd1", + "type": "LIVEBOARD" + }, + { + "identifier": "2ff57a24-cf90-485f-8b4b-45fc17474c6f", + "type": null + } + ], + "record_offset": 8, + "record_size": 8 + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/schedules/search", + "operationId": "searchSchedules", + "scenario": "positive", + "type": "AUTOMATIC", + "testId": 2384 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "metadata": [ + { + "identifier": "e82fe65a-7ac0-4282-a783-7a35c01b8dbd", + "type": "LIVEBOARD" + }, + { + "identifier": "78950be9-0717-449e-be26-64ea42617dd1", + "type": null + } + ], + "record_offset": 10, + "record_size": 6, + "sort_options": { + "field_name": "NAME", + "order": "DESC" + } + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/schedules/search", + "operationId": "searchSchedules", + "scenario": "positive", + "type": "AUTOMATIC", + "testId": 2385 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "metadata": [ + { + "identifier": "e82fe65a-7ac0-4282-a783-7a35c01b8dbd", + "type": null + }, + { + "identifier": "78950be9-0717-449e-be26-64ea42617dd1", + "type": null + } + ], + "record_offset": 2, + "record_size": 7, + "sort_options": { + "field_name": "DISPLAY_NAME", + "order": "DESC" + } + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/schedules/search", + "operationId": "searchSchedules", + "scenario": "positive", + "type": "AUTOMATIC", + "testId": 2386 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "record_offset": 6, + "record_size": 4, + "sort_options": { + "field_name": "MODIFIED", + "order": "DESC" + } + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/schedules/search", + "operationId": "searchSchedules", + "scenario": "positive", + "type": "AUTOMATIC", + "testId": 2387 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "record_offset": 8, + "record_size": 2, + "sort_options": { + "field_name": "MODIFIED" + } + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/schedules/search", + "operationId": "searchSchedules", + "scenario": "positive", + "type": "AUTOMATIC", + "testId": 2388 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "record_offset": 6, + "record_size": 9 + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/schedules/search", + "operationId": "searchSchedules", + "scenario": "positive", + "type": "AUTOMATIC", + "testId": 2389 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "record_offset": 2, + "record_size": 4, + "sort_options": { + "field_name": "DISPLAY_NAME", + "order": "ASC" + } + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/schedules/search", + "operationId": "searchSchedules", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 2390 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "record_offset": 3, + "record_size": 2, + "sort_options": { + "field_name": "MODIFIED", + "order": "ASC" + } + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/schedules/search", + "operationId": "searchSchedules", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 2391 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "metadata": [ + { + "identifier": "e82fe65a-7ac0-4282-a783-7a35c01b8dbd", + "type": null + }, + { + "identifier": "78950be9-0717-449e-be26-64ea42617dd1", + "type": null + }, + { + "identifier": "2ff57a24-cf90-485f-8b4b-45fc17474c6f", + "type": "LIVEBOARD" + } + ], + "record_offset": 6, + "record_size": 1, + "sort_options": { + "field_name": "AUTHOR" + } + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/schedules/search", + "operationId": "searchSchedules", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 2392 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "metadata": "OCpicFHjcYBKgZM", + "record_offset": 3, + "record_size": 7, + "sort_options": { + "field_name": "AUTHOR" + } + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/schedules/search", + "operationId": "searchSchedules", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 2393 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "metadata": "eQWGuWsKpCybFYt", + "record_offset": 5, + "record_size": 7, + "sort_options": { + "order": "DESC" + } + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/schedules/search", + "operationId": "searchSchedules", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 2394 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "metadata": "qsAAIIGOsEXRKvu", + "record_offset": 5, + "record_size": 10, + "sort_options": { + "field_name": "NAME" + } + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/schedules/search", + "operationId": "searchSchedules", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 2395 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "metadata": [ + { + "identifier": "e82fe65a-7ac0-4282-a783-7a35c01b8dbd", + "type": "LIVEBOARD" + } + ], + "record_offset": 8, + "record_size": 1, + "sort_options": { + "field_name": "MODIFIED" + } + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/schedules/search", + "operationId": "searchSchedules", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 2396 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "metadata": [ + { + "identifier": "e82fe65a-7ac0-4282-a783-7a35c01b8dbd", + "type": "LIVEBOARD" + }, + { + "identifier": "78950be9-0717-449e-be26-64ea42617dd1", + "type": null + }, + { + "identifier": "2ff57a24-cf90-485f-8b4b-45fc17474c6f", + "type": null + } + ], + "record_offset": 3, + "record_size": 7, + "sort_options": { + "field_name": "AUTHOR" + } + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/schedules/search", + "operationId": "searchSchedules", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 2397 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "metadata": [ + { + "identifier": "e82fe65a-7ac0-4282-a783-7a35c01b8dbd", + "type": null + }, + { + "identifier": "78950be9-0717-449e-be26-64ea42617dd1", + "type": "LIVEBOARD" + }, + { + "identifier": "2ff57a24-cf90-485f-8b4b-45fc17474c6f", + "type": null + } + ], + "record_offset": 8, + "record_size": 4, + "sort_options": { + "field_name": "NAME", + "order": "DESC" + } + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/schedules/search", + "operationId": "searchSchedules", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 2398 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "record_offset": 6, + "record_size": 9 + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/schedules/search", + "operationId": "searchSchedules", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 2399 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "record_offset": 6, + "record_size": 9 + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/schedules/search", + "operationId": "searchSchedules", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 2400 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "metadata": [ + { + "identifier": "e82fe65a-7ac0-4282-a783-7a35c01b8dbd", + "type": null + } + ], + "record_offset": 4, + "record_size": 2 + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/schedules/search", + "operationId": "searchSchedules", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 2401 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "metadata": "QhRGAxJJSVuHfUq", + "record_offset": 5, + "record_size": 9, + "sort_options": { + "order": "DESC" + } + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/schedules/search", + "operationId": "searchSchedules", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 2402 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "record_offset": 3, + "record_size": 2, + "sort_options": { + "field_name": "MODIFIED", + "order": "ASC" + } + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/schedules/search", + "operationId": "searchSchedules", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 2403 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "metadata": [ + { + "identifier": "e82fe65a-7ac0-4282-a783-7a35c01b8dbd", + "type": null + }, + { + "identifier": "78950be9-0717-449e-be26-64ea42617dd1", + "type": null + }, + { + "identifier": "2ff57a24-cf90-485f-8b4b-45fc17474c6f", + "type": "LIVEBOARD" + } + ], + "record_offset": 6, + "record_size": 1, + "sort_options": { + "field_name": "AUTHOR" + } + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/schedules/search", + "operationId": "searchSchedules", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 2404 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "metadata": "qbiYCXKwGYwAXTq", + "record_offset": 5, + "record_size": 2, + "sort_options": { + "field_name": "DISPLAY_NAME", + "order": "DESC" + } + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/users/{user_identifier}/delete", + "operationId": "deleteUser", + "scenario": "positive", + "type": "AUTOMATIC", + "testId": 2405 + }, + "Path_Variables": { + "user_identifier": "Consalve1688027210072" + }, + "Query_Variables": {}, + "Body": {} + }, + { + "Metadata": { + "path": "/api/rest/2.0/users/{user_identifier}/delete", + "operationId": "deleteUser", + "scenario": "positive", + "type": "AUTOMATIC", + "testId": 2406 + }, + "Path_Variables": { + "user_identifier": "Alayne1688027210121" + }, + "Query_Variables": {}, + "Body": {} + }, + { + "Metadata": { + "path": "/api/rest/2.0/users/{user_identifier}/delete", + "operationId": "deleteUser", + "scenario": "positive", + "type": "AUTOMATIC", + "testId": 2407 + }, + "Path_Variables": { + "user_identifier": "cbower21688027208531" + }, + "Query_Variables": {}, + "Body": {} + }, + { + "Metadata": { + "path": "/api/rest/2.0/users/{user_identifier}/delete", + "operationId": "deleteUser", + "scenario": "positive", + "type": "AUTOMATIC", + "testId": 2408 + }, + "Path_Variables": { + "user_identifier": "tleverage31688027208533" + }, + "Query_Variables": {}, + "Body": {} + }, + { + "Metadata": { + "path": "/api/rest/2.0/users/{user_identifier}/delete", + "operationId": "deleteUser", + "scenario": "positive", + "type": "AUTOMATIC", + "testId": 2409 + }, + "Path_Variables": { + "user_identifier": "enel41688027208536" + }, + "Query_Variables": {}, + "Body": {} + }, + { + "Metadata": { + "path": "/api/rest/2.0/users/{user_identifier}/delete", + "operationId": "deleteUser", + "scenario": "positive", + "type": "AUTOMATIC", + "testId": 2410 + }, + "Path_Variables": { + "user_identifier": "Breanne1688027210134" + }, + "Query_Variables": {}, + "Body": {} + }, + { + "Metadata": { + "path": "/api/rest/2.0/users/{user_identifier}/delete", + "operationId": "deleteUser", + "scenario": "positive", + "type": "AUTOMATIC", + "testId": 2411 + }, + "Path_Variables": { + "user_identifier": "Eddie1688027210137" + }, + "Query_Variables": {}, + "Body": {} + }, + { + "Metadata": { + "path": "/api/rest/2.0/users/{user_identifier}/delete", + "operationId": "deleteUser", + "scenario": "positive", + "type": "AUTOMATIC", + "testId": 2412 + }, + "Path_Variables": { + "user_identifier": "wbignal71688027208543" + }, + "Query_Variables": {}, + "Body": {} + }, + { + "Metadata": { + "path": "/api/rest/2.0/users/{user_identifier}/delete", + "operationId": "deleteUser", + "scenario": "positive", + "type": "AUTOMATIC", + "testId": 2413 + }, + "Path_Variables": { + "user_identifier": "Pren1688027210145" + }, + "Query_Variables": {}, + "Body": {} + }, + { + "Metadata": { + "path": "/api/rest/2.0/users/{user_identifier}/delete", + "operationId": "deleteUser", + "scenario": "positive", + "type": "AUTOMATIC", + "testId": 2414 + }, + "Path_Variables": { + "user_identifier": "ltunesi91688027208548" + }, + "Query_Variables": {}, + "Body": {} + }, + { + "Metadata": { + "path": "/api/rest/2.0/users/{user_identifier}/delete", + "operationId": "deleteUser", + "scenario": "positive", + "type": "AUTOMATIC", + "testId": 2415 + }, + "Path_Variables": { + "user_identifier": "owaliszewskia1688027208550" + }, + "Query_Variables": {}, + "Body": {} + }, + { + "Metadata": { + "path": "/api/rest/2.0/users/{user_identifier}/delete", + "operationId": "deleteUser", + "scenario": "positive", + "type": "AUTOMATIC", + "testId": 2416 + }, + "Path_Variables": { + "user_identifier": "dfrancklinb1688027208553" + }, + "Query_Variables": {}, + "Body": {} + }, + { + "Metadata": { + "path": "/api/rest/2.0/users/{user_identifier}/delete", + "operationId": "deleteUser", + "scenario": "positive", + "type": "AUTOMATIC", + "testId": 2417 + }, + "Path_Variables": { + "user_identifier": "Rahel1688027210159" + }, + "Query_Variables": {}, + "Body": {} + }, + { + "Metadata": { + "path": "/api/rest/2.0/users/{user_identifier}/delete", + "operationId": "deleteUser", + "scenario": "positive", + "type": "AUTOMATIC", + "testId": 2418 + }, + "Path_Variables": { + "user_identifier": "Demetre1688027210162" + }, + "Query_Variables": {}, + "Body": {} + }, + { + "Metadata": { + "path": "/api/rest/2.0/users/{user_identifier}/delete", + "operationId": "deleteUser", + "scenario": "positive", + "type": "AUTOMATIC", + "testId": 2419 + }, + "Path_Variables": { + "user_identifier": "Dex1688027210165" + }, + "Query_Variables": {}, + "Body": {} + }, + { + "Metadata": { + "path": "/api/rest/2.0/users/{user_identifier}/delete", + "operationId": "deleteUser", + "scenario": "positive", + "type": "AUTOMATIC", + "testId": 2420 + }, + "Path_Variables": { + "user_identifier": "jocurriganf1688027208562" + }, + "Query_Variables": {}, + "Body": {} + }, + { + "Metadata": { + "path": "/api/rest/2.0/users/{user_identifier}/delete", + "operationId": "deleteUser", + "scenario": "positive", + "type": "AUTOMATIC", + "testId": 2421 + }, + "Path_Variables": { + "user_identifier": "Harvey1688027210173" + }, + "Query_Variables": {}, + "Body": {} + }, + { + "Metadata": { + "path": "/api/rest/2.0/users/{user_identifier}/delete", + "operationId": "deleteUser", + "scenario": "positive", + "type": "AUTOMATIC", + "testId": 2422 + }, + "Path_Variables": { + "user_identifier": "Rickie1688027210176" + }, + "Query_Variables": {}, + "Body": {} + }, + { + "Metadata": { + "path": "/api/rest/2.0/users/{user_identifier}/delete", + "operationId": "deleteUser", + "scenario": "positive", + "type": "AUTOMATIC", + "testId": 2423 + }, + "Path_Variables": { + "user_identifier": "Chanda1688027210179" + }, + "Query_Variables": {}, + "Body": {} + }, + { + "Metadata": { + "path": "/api/rest/2.0/users/{user_identifier}/delete", + "operationId": "deleteUser", + "scenario": "positive", + "type": "AUTOMATIC", + "testId": 2424 + }, + "Path_Variables": { + "user_identifier": "Ive1688027210182" + }, + "Query_Variables": {}, + "Body": {} + }, + { + "Metadata": { + "path": "/api/rest/2.0/users/{user_identifier}/delete", + "operationId": "deleteUser", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 2425 + }, + "Path_Variables": { + "user_identifier": null + }, + "Query_Variables": {}, + "Body": {} + }, + { + "Metadata": { + "path": "/api/rest/2.0/users/{user_identifier}/delete", + "operationId": "deleteUser", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 2426 + }, + "Path_Variables": { + "user_identifier": null + }, + "Query_Variables": {}, + "Body": {} + }, + { + "Metadata": { + "path": "/api/rest/2.0/users/{user_identifier}/delete", + "operationId": "deleteUser", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 2427 + }, + "Path_Variables": { + "user_identifier": null + }, + "Query_Variables": {}, + "Body": {} + }, + { + "Metadata": { + "path": "/api/rest/2.0/users/{user_identifier}/delete", + "operationId": "deleteUser", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 2428 + }, + "Path_Variables": { + "user_identifier": null + }, + "Query_Variables": {}, + "Body": {} + }, + { + "Metadata": { + "path": "/api/rest/2.0/users/{user_identifier}/delete", + "operationId": "deleteUser", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 2429 + }, + "Path_Variables": { + "user_identifier": null + }, + "Query_Variables": {}, + "Body": {} + }, + { + "Metadata": { + "path": "/api/rest/2.0/users/{user_identifier}/delete", + "operationId": "deleteUser", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 2430 + }, + "Path_Variables": { + "user_identifier": null + }, + "Query_Variables": {}, + "Body": {} + }, + { + "Metadata": { + "path": "/api/rest/2.0/users/{user_identifier}/delete", + "operationId": "deleteUser", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 2431 + }, + "Path_Variables": { + "user_identifier": null + }, + "Query_Variables": {}, + "Body": {} + }, + { + "Metadata": { + "path": "/api/rest/2.0/users/{user_identifier}/delete", + "operationId": "deleteUser", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 2432 + }, + "Path_Variables": { + "user_identifier": null + }, + "Query_Variables": {}, + "Body": {} + }, + { + "Metadata": { + "path": "/api/rest/2.0/users/{user_identifier}/delete", + "operationId": "deleteUser", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 2433 + }, + "Path_Variables": { + "user_identifier": null + }, + "Query_Variables": {}, + "Body": {} + }, + { + "Metadata": { + "path": "/api/rest/2.0/users/{user_identifier}/delete", + "operationId": "deleteUser", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 2434 + }, + "Path_Variables": { + "user_identifier": null + }, + "Query_Variables": {}, + "Body": {} + }, + { + "Metadata": { + "path": "/api/rest/2.0/users/{user_identifier}/delete", + "operationId": "deleteUser", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 2435 + }, + "Path_Variables": { + "user_identifier": null + }, + "Query_Variables": {}, + "Body": {} + }, + { + "Metadata": { + "path": "/api/rest/2.0/users/{user_identifier}/delete", + "operationId": "deleteUser", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 2436 + }, + "Path_Variables": { + "user_identifier": null + }, + "Query_Variables": {}, + "Body": {} + }, + { + "Metadata": { + "path": "/api/rest/2.0/users/{user_identifier}/delete", + "operationId": "deleteUser", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 2437 + }, + "Path_Variables": { + "user_identifier": null + }, + "Query_Variables": {}, + "Body": {} + }, + { + "Metadata": { + "path": "/api/rest/2.0/users/{user_identifier}/delete", + "operationId": "deleteUser", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 2438 + }, + "Path_Variables": { + "user_identifier": null + }, + "Query_Variables": {}, + "Body": {} + }, + { + "Metadata": { + "path": "/api/rest/2.0/users/{user_identifier}/delete", + "operationId": "deleteUser", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 2439 + }, + "Path_Variables": { + "user_identifier": null + }, + "Query_Variables": {}, + "Body": {} + }, + { + "Metadata": { + "path": "/api/rest/2.0/users/{user_identifier}/delete", + "operationId": "deleteUser", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 2440 + }, + "Path_Variables": { + "user_identifier": [ + "tleverage31688027208533" + ] + }, + "Query_Variables": {}, + "Body": {} + }, + { + "Metadata": { + "path": "/api/rest/2.0/users/{user_identifier}/delete", + "operationId": "deleteUser", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 2441 + }, + "Path_Variables": { + "user_identifier": [ + "Chanda1688027210179" + ] + }, + "Query_Variables": {}, + "Body": {} + }, + { + "Metadata": { + "path": "/api/rest/2.0/users/{user_identifier}/delete", + "operationId": "deleteUser", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 2442 + }, + "Path_Variables": { + "user_identifier": [ + "Alayne1688027210121" + ] + }, + "Query_Variables": {}, + "Body": {} + }, + { + "Metadata": { + "path": "/api/rest/2.0/users/{user_identifier}/delete", + "operationId": "deleteUser", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 2443 + }, + "Path_Variables": { + "user_identifier": [ + "Demetre1688027210162" + ] + }, + "Query_Variables": {}, + "Body": {} + }, + { + "Metadata": { + "path": "/api/rest/2.0/users/{user_identifier}/delete", + "operationId": "deleteUser", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 2444 + }, + "Path_Variables": { + "user_identifier": [ + "cbower21688027208531" + ] + }, + "Query_Variables": {}, + "Body": {} + }, + { + "Metadata": { + "path": "/api/rest/2.0/users/{user_identifier}/delete", + "operationId": "deleteUser", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 2445 + }, + "Path_Variables": { + "user_identifier": [ + "tleverage31688027208533" + ] + }, + "Query_Variables": {}, + "Body": {} + }, + { + "Metadata": { + "path": "/api/rest/2.0/users/{user_identifier}/delete", + "operationId": "deleteUser", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 2446 + }, + "Path_Variables": { + "user_identifier": [ + "Demetre1688027210162" + ] + }, + "Query_Variables": {}, + "Body": {} + }, + { + "Metadata": { + "path": "/api/rest/2.0/users/{user_identifier}/delete", + "operationId": "deleteUser", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 2447 + }, + "Path_Variables": { + "user_identifier": [ + "Pren1688027210145" + ] + }, + "Query_Variables": {}, + "Body": {} + }, + { + "Metadata": { + "path": "/api/rest/2.0/users/{user_identifier}/delete", + "operationId": "deleteUser", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 2448 + }, + "Path_Variables": { + "user_identifier": [ + "enel41688027208536" + ] + }, + "Query_Variables": {}, + "Body": {} + }, + { + "Metadata": { + "path": "/api/rest/2.0/users/{user_identifier}/delete", + "operationId": "deleteUser", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 2449 + }, + "Path_Variables": { + "user_identifier": [ + "Alayne1688027210121" + ] + }, + "Query_Variables": {}, + "Body": {} + }, + { + "Metadata": { + "path": "/api/rest/2.0/users/{user_identifier}/delete", + "operationId": "deleteUser", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 2450 + }, + "Path_Variables": { + "user_identifier": [ + "Ive1688027210182" + ] + }, + "Query_Variables": {}, + "Body": {} + }, + { + "Metadata": { + "path": "/api/rest/2.0/users/{user_identifier}/delete", + "operationId": "deleteUser", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 2451 + }, + "Path_Variables": { + "user_identifier": [ + "Rickie1688027210176" + ] + }, + "Query_Variables": {}, + "Body": {} + }, + { + "Metadata": { + "path": "/api/rest/2.0/users/{user_identifier}/delete", + "operationId": "deleteUser", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 2452 + }, + "Path_Variables": { + "user_identifier": [ + "Pren1688027210145" + ] + }, + "Query_Variables": {}, + "Body": {} + }, + { + "Metadata": { + "path": "/api/rest/2.0/users/{user_identifier}/delete", + "operationId": "deleteUser", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 2453 + }, + "Path_Variables": { + "user_identifier": [ + "Demetre1688027210162" + ] + }, + "Query_Variables": {}, + "Body": {} + }, + { + "Metadata": { + "path": "/api/rest/2.0/users/{user_identifier}/delete", + "operationId": "deleteUser", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 2454 + }, + "Path_Variables": { + "user_identifier": [ + "tleverage31688027208533" + ] + }, + "Query_Variables": {}, + "Body": {} + }, + { + "Metadata": { + "path": "/api/rest/2.0/users/{user_identifier}/delete", + "operationId": "deleteUser", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 2455 + }, + "Path_Variables": { + "user_identifier": "kwARVxzllyGVkfA" + }, + "Query_Variables": {}, + "Body": {} + }, + { + "Metadata": { + "path": "/api/rest/2.0/users/{user_identifier}/delete", + "operationId": "deleteUser", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 2456 + }, + "Path_Variables": { + "user_identifier": "EOyDajSMFpoViCj" + }, + "Query_Variables": {}, + "Body": {} + }, + { + "Metadata": { + "path": "/api/rest/2.0/users/{user_identifier}/delete", + "operationId": "deleteUser", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 2457 + }, + "Path_Variables": { + "user_identifier": "oWwnnQyEeLWrPzp" + }, + "Query_Variables": {}, + "Body": {} + }, + { + "Metadata": { + "path": "/api/rest/2.0/users/{user_identifier}/delete", + "operationId": "deleteUser", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 2458 + }, + "Path_Variables": { + "user_identifier": "wOAeEnxwTBQlqgd" + }, + "Query_Variables": {}, + "Body": {} + }, + { + "Metadata": { + "path": "/api/rest/2.0/users/{user_identifier}/delete", + "operationId": "deleteUser", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 2459 + }, + "Path_Variables": { + "user_identifier": "JlgvlVBIHnxmDLm" + }, + "Query_Variables": {}, + "Body": {} + }, + { + "Metadata": { + "path": "/api/rest/2.0/users/{user_identifier}/delete", + "operationId": "deleteUser", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 2460 + }, + "Path_Variables": { + "user_identifier": "dhigWuQHRVKOmhF" + }, + "Query_Variables": {}, + "Body": {} + }, + { + "Metadata": { + "path": "/api/rest/2.0/users/{user_identifier}/delete", + "operationId": "deleteUser", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 2461 + }, + "Path_Variables": { + "user_identifier": "SKMViUgonuhzwNb" + }, + "Query_Variables": {}, + "Body": {} + }, + { + "Metadata": { + "path": "/api/rest/2.0/users/{user_identifier}/delete", + "operationId": "deleteUser", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 2462 + }, + "Path_Variables": { + "user_identifier": "cMWNvWeHJkeuoOG" + }, + "Query_Variables": {}, + "Body": {} + }, + { + "Metadata": { + "path": "/api/rest/2.0/users/{user_identifier}/delete", + "operationId": "deleteUser", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 2463 + }, + "Path_Variables": { + "user_identifier": "PGvGcTJpJAEkwJl" + }, + "Query_Variables": {}, + "Body": {} + }, + { + "Metadata": { + "path": "/api/rest/2.0/users/{user_identifier}/delete", + "operationId": "deleteUser", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 2464 + }, + "Path_Variables": { + "user_identifier": "JOqWhoeuHsBPhxg" + }, + "Query_Variables": {}, + "Body": {} + }, + { + "Metadata": { + "path": "/api/rest/2.0/users/{user_identifier}/delete", + "operationId": "deleteUser", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 2465 + }, + "Path_Variables": { + "user_identifier": "LaiBZwYukKEkhYu" + }, + "Query_Variables": {}, + "Body": {} + }, + { + "Metadata": { + "path": "/api/rest/2.0/users/{user_identifier}/delete", + "operationId": "deleteUser", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 2466 + }, + "Path_Variables": { + "user_identifier": "CRLhsoVprRHrxos" + }, + "Query_Variables": {}, + "Body": {} + }, + { + "Metadata": { + "path": "/api/rest/2.0/users/{user_identifier}/delete", + "operationId": "deleteUser", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 2467 + }, + "Path_Variables": { + "user_identifier": "EUKeOEkdhFGGEZW" + }, + "Query_Variables": {}, + "Body": {} + }, + { + "Metadata": { + "path": "/api/rest/2.0/users/{user_identifier}/delete", + "operationId": "deleteUser", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 2468 + }, + "Path_Variables": { + "user_identifier": "HdETFRUadkfSZrg" + }, + "Query_Variables": {}, + "Body": {} + }, + { + "Metadata": { + "path": "/api/rest/2.0/users/{user_identifier}/delete", + "operationId": "deleteUser", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 2469 + }, + "Path_Variables": { + "user_identifier": "WalFcVdcxsnXhtm" + }, + "Query_Variables": {}, + "Body": {} + }, + { + "Metadata": { + "path": "/api/rest/2.0/users/import", + "operationId": "importUsers", + "scenario": "positive", + "type": "AUTOMATIC", + "testId": 2470 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "users": [ + { + "user_identifier": "Dallon1688027212782", + "display_name": "in tempus", + "password": null, + "account_type": null, + "account_status": null, + "email": null, + "org_identifiers": [ + "0", + "0", + "0" + ], + "group_identifiers": null, + "visibility": "NON_SHARABLE", + "notify_on_share": true, + "show_onboarding_experience": null, + "onboarding_experience_completed": null, + "home_liveboard_identifier": null, + "favorite_metadata": null + }, + { + "user_identifier": "Stevy1688027212821", + "display_name": "pellentesque", + "password": "nO3@2~IbW#).T6", + "account_type": null, + "account_status": "ACTIVE", + "email": null, + "org_identifiers": [ + "0", + "0" + ], + "group_identifiers": [ + "cfa01dd9-9605-422d-b7de-a37afff63647", + "280a2235-3721-43fc-aa25-5d33549ecc90" + ], + "visibility": null, + "notify_on_share": false, + "show_onboarding_experience": false, + "onboarding_experience_completed": null, + "home_liveboard_identifier": "327f4d60-c502-43b0-b1d4-c73df5031a2e", + "favorite_metadata": null + }, + { + "user_identifier": "Walliw1688027212824", + "display_name": "vestibulum", + "password": null, + "account_type": "LOCAL_USER", + "account_status": null, + "email": null, + "org_identifiers": null, + "group_identifiers": [ + "cfa01dd9-9605-422d-b7de-a37afff63647", + "280a2235-3721-43fc-aa25-5d33549ecc90" + ], + "visibility": null, + "notify_on_share": true, + "show_onboarding_experience": null, + "onboarding_experience_completed": null, + "home_liveboard_identifier": "601be8e5-140e-477c-8812-843795306438", + "favorite_metadata": [ + { + "identifier": "10a69d10-e455-4473-b1c6-de1da8cc1ad5", + "type": null + }, + { + "identifier": "48d27aee-59c3-4a0c-8d2c-5a8989c55bb1", + "type": "ANSWER" + }, + { + "identifier": "262abdac-b00f-4f5f-ad33-fcf10154184f", + "type": null + } + ] + }, + { + "user_identifier": "Shanta1688027212832", + "display_name": "sit", + "password": "oD0&Df_Caf", + "account_type": "LOCAL_USER", + "account_status": "PENDING", + "email": "swederell3@livejournal.com", + "org_identifiers": null, + "group_identifiers": null, + "visibility": null, + "notify_on_share": false, + "show_onboarding_experience": false, + "onboarding_experience_completed": null, + "home_liveboard_identifier": null, + "favorite_metadata": [ + { + "identifier": "10a69d10-e455-4473-b1c6-de1da8cc1ad5", + "type": null + } + ] + }, + { + "user_identifier": "Sheri1688027212835", + "display_name": "magna", + "password": "yU0/$FBb%", + "account_type": null, + "account_status": null, + "email": null, + "org_identifiers": [ + "0", + "0", + "0" + ], + "group_identifiers": [ + "cfa01dd9-9605-422d-b7de-a37afff63647" + ], + "visibility": null, + "notify_on_share": true, + "show_onboarding_experience": true, + "onboarding_experience_completed": false, + "home_liveboard_identifier": null, + "favorite_metadata": [ + { + "identifier": "10a69d10-e455-4473-b1c6-de1da8cc1ad5", + "type": null + }, + { + "identifier": "48d27aee-59c3-4a0c-8d2c-5a8989c55bb1", + "type": null + } + ] + }, + { + "user_identifier": "Nana1688027212838", + "display_name": "suscipit a", + "password": null, + "account_type": "LOCAL_USER", + "account_status": "ACTIVE", + "email": null, + "org_identifiers": [ + "0", + "0" + ], + "group_identifiers": [ + "cfa01dd9-9605-422d-b7de-a37afff63647", + "280a2235-3721-43fc-aa25-5d33549ecc90", + "f827545e-a592-4280-8ceb-318bd673d04c" + ], + "visibility": null, + "notify_on_share": null, + "show_onboarding_experience": false, + "onboarding_experience_completed": true, + "home_liveboard_identifier": null, + "favorite_metadata": [ + { + "identifier": "10a69d10-e455-4473-b1c6-de1da8cc1ad5", + "type": "ANSWER" + }, + { + "identifier": "48d27aee-59c3-4a0c-8d2c-5a8989c55bb1", + "type": "ANSWER" + }, + { + "identifier": "262abdac-b00f-4f5f-ad33-fcf10154184f", + "type": null + } + ] + } + ], + "dry_run": false, + "default_password": "fI7?/(zs9m" + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/users/import", + "operationId": "importUsers", + "scenario": "positive", + "type": "AUTOMATIC", + "testId": 2471 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "users": [ + { + "user_identifier": "Nady1688027212852", + "display_name": "in", + "password": "eK4`CGAgHzC,Mh", + "account_type": null, + "account_status": "PENDING", + "email": null, + "org_identifiers": null, + "group_identifiers": [ + "cfa01dd9-9605-422d-b7de-a37afff63647", + "280a2235-3721-43fc-aa25-5d33549ecc90", + "f827545e-a592-4280-8ceb-318bd673d04c" + ], + "visibility": "SHARABLE", + "notify_on_share": null, + "show_onboarding_experience": true, + "onboarding_experience_completed": null, + "home_liveboard_identifier": null, + "favorite_metadata": null + } + ], + "dry_run": true, + "delete_unspecified_users": false, + "default_password": "iC1\"egL4\\E" + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/users/import", + "operationId": "importUsers", + "scenario": "positive", + "type": "AUTOMATIC", + "testId": 2472 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "users": [ + { + "user_identifier": "Karlee1688027212856", + "display_name": "risus auctor", + "password": null, + "account_type": null, + "account_status": null, + "email": "kbeaver0@telegraph.co.uk", + "org_identifiers": [ + "0", + "0" + ], + "group_identifiers": null, + "visibility": null, + "notify_on_share": null, + "show_onboarding_experience": null, + "onboarding_experience_completed": false, + "home_liveboard_identifier": null, + "favorite_metadata": [ + { + "identifier": "10a69d10-e455-4473-b1c6-de1da8cc1ad5", + "type": null + }, + { + "identifier": "48d27aee-59c3-4a0c-8d2c-5a8989c55bb1", + "type": "ANSWER" + }, + { + "identifier": "262abdac-b00f-4f5f-ad33-fcf10154184f", + "type": null + } + ] + }, + { + "user_identifier": "Brucie1688027212859", + "display_name": "mus etiam", + "password": null, + "account_type": "LOCAL_USER", + "account_status": null, + "email": null, + "org_identifiers": [ + "0", + "0", + "0" + ], + "group_identifiers": [ + "cfa01dd9-9605-422d-b7de-a37afff63647", + "280a2235-3721-43fc-aa25-5d33549ecc90", + "f827545e-a592-4280-8ceb-318bd673d04c" + ], + "visibility": "SHARABLE", + "notify_on_share": null, + "show_onboarding_experience": null, + "onboarding_experience_completed": true, + "home_liveboard_identifier": null, + "favorite_metadata": null + } + ], + "dry_run": false + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/users/import", + "operationId": "importUsers", + "scenario": "positive", + "type": "AUTOMATIC", + "testId": 2473 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "users": [ + { + "user_identifier": "Normand1688027212862", + "display_name": "sem sed", + "password": "tQ6`'3s#", + "account_type": null, + "account_status": "ACTIVE", + "email": null, + "org_identifiers": [ + "0" + ], + "group_identifiers": [ + "cfa01dd9-9605-422d-b7de-a37afff63647", + "280a2235-3721-43fc-aa25-5d33549ecc90", + "f827545e-a592-4280-8ceb-318bd673d04c" + ], + "visibility": "NON_SHARABLE", + "notify_on_share": false, + "show_onboarding_experience": null, + "onboarding_experience_completed": null, + "home_liveboard_identifier": "061457a2-27bc-43a9-9754-0cd873691bf0", + "favorite_metadata": [ + { + "identifier": "10a69d10-e455-4473-b1c6-de1da8cc1ad5", + "type": null + } + ] + }, + { + "user_identifier": "Carlin1688027212865", + "display_name": "ac nibh", + "password": "dU3@L`RPIMeU/by", + "account_type": "LOCAL_USER", + "account_status": "PENDING", + "email": null, + "org_identifiers": [ + "0" + ], + "group_identifiers": [ + "cfa01dd9-9605-422d-b7de-a37afff63647", + "280a2235-3721-43fc-aa25-5d33549ecc90" + ], + "visibility": "SHARABLE", + "notify_on_share": false, + "show_onboarding_experience": false, + "onboarding_experience_completed": false, + "home_liveboard_identifier": "061457a2-27bc-43a9-9754-0cd873691bf0", + "favorite_metadata": [ + { + "identifier": "10a69d10-e455-4473-b1c6-de1da8cc1ad5", + "type": null + }, + { + "identifier": "48d27aee-59c3-4a0c-8d2c-5a8989c55bb1", + "type": null + } + ] + } + ], + "delete_unspecified_users": false + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/users/import", + "operationId": "importUsers", + "scenario": "positive", + "type": "AUTOMATIC", + "testId": 2474 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "users": [ + { + "user_identifier": "Johnette1688027212869", + "display_name": "non mi", + "password": null, + "account_type": "REMOTE_USER", + "account_status": "PENDING", + "email": "jsowood0@lulu.com", + "org_identifiers": [ + "0", + "0", + "0" + ], + "group_identifiers": null, + "visibility": null, + "notify_on_share": null, + "show_onboarding_experience": null, + "onboarding_experience_completed": true, + "home_liveboard_identifier": "2ff57a24-cf90-485f-8b4b-45fc17474c6f", + "favorite_metadata": [ + { + "identifier": "10a69d10-e455-4473-b1c6-de1da8cc1ad5", + "type": "ANSWER" + } + ] + }, + { + "user_identifier": "Trixi1688027212872", + "display_name": "suscipit a", + "password": null, + "account_type": null, + "account_status": "ACTIVE", + "email": null, + "org_identifiers": [ + "0", + "0", + "0" + ], + "group_identifiers": [ + "cfa01dd9-9605-422d-b7de-a37afff63647", + "280a2235-3721-43fc-aa25-5d33549ecc90" + ], + "visibility": "SHARABLE", + "notify_on_share": false, + "show_onboarding_experience": true, + "onboarding_experience_completed": true, + "home_liveboard_identifier": null, + "favorite_metadata": [ + { + "identifier": "10a69d10-e455-4473-b1c6-de1da8cc1ad5", + "type": "ANSWER" + }, + { + "identifier": "48d27aee-59c3-4a0c-8d2c-5a8989c55bb1", + "type": null + } + ] + } + ], + "dry_run": false + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/users/import", + "operationId": "importUsers", + "scenario": "positive", + "type": "AUTOMATIC", + "testId": 2475 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "users": [ + { + "user_identifier": "Palmer1688027212876", + "display_name": "vel lectus", + "password": null, + "account_type": null, + "account_status": null, + "email": null, + "org_identifiers": [ + "0", + "0" + ], + "group_identifiers": [ + "cfa01dd9-9605-422d-b7de-a37afff63647", + "280a2235-3721-43fc-aa25-5d33549ecc90" + ], + "visibility": null, + "notify_on_share": true, + "show_onboarding_experience": false, + "onboarding_experience_completed": null, + "home_liveboard_identifier": "2ff57a24-cf90-485f-8b4b-45fc17474c6f", + "favorite_metadata": [ + { + "identifier": "10a69d10-e455-4473-b1c6-de1da8cc1ad5", + "type": null + }, + { + "identifier": "48d27aee-59c3-4a0c-8d2c-5a8989c55bb1", + "type": null + } + ] + }, + { + "user_identifier": "Gay1688027212879", + "display_name": "ut mauris", + "password": "sR8/Ua}yY2NvB!YB", + "account_type": null, + "account_status": "INACTIVE", + "email": null, + "org_identifiers": [ + "0" + ], + "group_identifiers": null, + "visibility": null, + "notify_on_share": null, + "show_onboarding_experience": true, + "onboarding_experience_completed": null, + "home_liveboard_identifier": null, + "favorite_metadata": [ + { + "identifier": "10a69d10-e455-4473-b1c6-de1da8cc1ad5", + "type": null + } + ] + }, + { + "user_identifier": "Natassia1688027212882", + "display_name": "laoreet", + "password": "gA0.SwYf", + "account_type": null, + "account_status": "EXPIRED", + "email": "njoanic2@abc.net.au", + "org_identifiers": null, + "group_identifiers": [ + "cfa01dd9-9605-422d-b7de-a37afff63647" + ], + "visibility": null, + "notify_on_share": null, + "show_onboarding_experience": false, + "onboarding_experience_completed": false, + "home_liveboard_identifier": null, + "favorite_metadata": null + }, + { + "user_identifier": "Levy1688027212885", + "display_name": "condimentum curabitur", + "password": null, + "account_type": null, + "account_status": "INACTIVE", + "email": "lverheijden3@photobucket.com", + "org_identifiers": [ + "0", + "0" + ], + "group_identifiers": null, + "visibility": null, + "notify_on_share": true, + "show_onboarding_experience": null, + "onboarding_experience_completed": null, + "home_liveboard_identifier": "33248a57-cc70-4e39-9199-fb5092283381", + "favorite_metadata": [ + { + "identifier": "10a69d10-e455-4473-b1c6-de1da8cc1ad5", + "type": "ANSWER" + } + ] + }, + { + "user_identifier": "Tamarra1688027212887", + "display_name": "pede", + "password": null, + "account_type": "OIDC_USER", + "account_status": null, + "email": null, + "org_identifiers": [ + "0" + ], + "group_identifiers": [ + "cfa01dd9-9605-422d-b7de-a37afff63647", + "280a2235-3721-43fc-aa25-5d33549ecc90", + "f827545e-a592-4280-8ceb-318bd673d04c" + ], + "visibility": "SHARABLE", + "notify_on_share": null, + "show_onboarding_experience": null, + "onboarding_experience_completed": false, + "home_liveboard_identifier": null, + "favorite_metadata": [ + { + "identifier": "10a69d10-e455-4473-b1c6-de1da8cc1ad5", + "type": null + }, + { + "identifier": "48d27aee-59c3-4a0c-8d2c-5a8989c55bb1", + "type": "ANSWER" + }, + { + "identifier": "262abdac-b00f-4f5f-ad33-fcf10154184f", + "type": null + } + ] + }, + { + "user_identifier": "Maynard1688027212891", + "display_name": "mauris ullamcorper", + "password": null, + "account_type": "LOCAL_USER", + "account_status": "ACTIVE", + "email": null, + "org_identifiers": [ + "0", + "0", + "0" + ], + "group_identifiers": [ + "cfa01dd9-9605-422d-b7de-a37afff63647", + "280a2235-3721-43fc-aa25-5d33549ecc90" + ], + "visibility": null, + "notify_on_share": true, + "show_onboarding_experience": false, + "onboarding_experience_completed": null, + "home_liveboard_identifier": "6715f768-8930-4180-9a3d-1efdbfaa8e7f", + "favorite_metadata": null + } + ], + "default_password": "hH5`pWxsFqNwz" + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/users/import", + "operationId": "importUsers", + "scenario": "positive", + "type": "AUTOMATIC", + "testId": 2476 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "users": [ + { + "user_identifier": "Alta1688027212895", + "display_name": "nullam", + "password": "sH3|A(ji(he0Vxwwt<'aR", + "account_type": "SAML_USER", + "account_status": null, + "email": "esymper7@lycos.com", + "org_identifiers": [ + "0" + ], + "group_identifiers": null, + "visibility": null, + "notify_on_share": false, + "show_onboarding_experience": null, + "onboarding_experience_completed": null, + "home_liveboard_identifier": null, + "favorite_metadata": null + }, + { + "user_identifier": "Micky1688027212933", + "display_name": "nulla suscipit", + "password": null, + "account_type": "LDAP_USER", + "account_status": null, + "email": "mlaffin8@berkeley.edu", + "org_identifiers": [ + "0", + "0", + "0" + ], + "group_identifiers": [ + "cfa01dd9-9605-422d-b7de-a37afff63647", + "280a2235-3721-43fc-aa25-5d33549ecc90", + "f827545e-a592-4280-8ceb-318bd673d04c" + ], + "visibility": null, + "notify_on_share": null, + "show_onboarding_experience": true, + "onboarding_experience_completed": null, + "home_liveboard_identifier": "601be8e5-140e-477c-8812-843795306438", + "favorite_metadata": [ + { + "identifier": "10a69d10-e455-4473-b1c6-de1da8cc1ad5", + "type": null + }, + { + "identifier": "48d27aee-59c3-4a0c-8d2c-5a8989c55bb1", + "type": "ANSWER" + } + ] + } + ], + "default_password": "dZ1/K{e\\" + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/users/import", + "operationId": "importUsers", + "scenario": "positive", + "type": "AUTOMATIC", + "testId": 2478 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "users": [ + { + "user_identifier": "Lind1688027212938", + "display_name": "pretium quis", + "password": "iA5'{WY}", + "account_type": null, + "account_status": null, + "email": null, + "org_identifiers": [ + "0" + ], + "group_identifiers": [ + "cfa01dd9-9605-422d-b7de-a37afff63647" + ], + "visibility": null, + "notify_on_share": null, + "show_onboarding_experience": false, + "onboarding_experience_completed": null, + "home_liveboard_identifier": null, + "favorite_metadata": [ + { + "identifier": "10a69d10-e455-4473-b1c6-de1da8cc1ad5", + "type": "ANSWER" + }, + { + "identifier": "48d27aee-59c3-4a0c-8d2c-5a8989c55bb1", + "type": "ANSWER" + } + ] + }, + { + "user_identifier": "Corabelle1688027213060", + "display_name": "nam", + "password": null, + "account_type": "LDAP_USER", + "account_status": null, + "email": null, + "org_identifiers": null, + "group_identifiers": [ + "cfa01dd9-9605-422d-b7de-a37afff63647", + "280a2235-3721-43fc-aa25-5d33549ecc90" + ], + "visibility": "NON_SHARABLE", + "notify_on_share": null, + "show_onboarding_experience": false, + "onboarding_experience_completed": null, + "home_liveboard_identifier": "e36ee65e-64be-436b-a29a-22d8998c4fae", + "favorite_metadata": null + }, + { + "user_identifier": "Karlotte1688027213062", + "display_name": "nibh", + "password": null, + "account_type": "OIDC_USER", + "account_status": null, + "email": null, + "org_identifiers": [ + "0", + "0", + "0" + ], + "group_identifiers": [ + "cfa01dd9-9605-422d-b7de-a37afff63647", + "280a2235-3721-43fc-aa25-5d33549ecc90", + "f827545e-a592-4280-8ceb-318bd673d04c" + ], + "visibility": "SHARABLE", + "notify_on_share": true, + "show_onboarding_experience": null, + "onboarding_experience_completed": false, + "home_liveboard_identifier": "061457a2-27bc-43a9-9754-0cd873691bf0", + "favorite_metadata": [ + { + "identifier": "10a69d10-e455-4473-b1c6-de1da8cc1ad5", + "type": "ANSWER" + }, + { + "identifier": "48d27aee-59c3-4a0c-8d2c-5a8989c55bb1", + "type": null + } + ] + } + ], + "dry_run": true, + "default_password": "gC1_ReL$" + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/users/import", + "operationId": "importUsers", + "scenario": "positive", + "type": "AUTOMATIC", + "testId": 2486 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "users": [ + { + "user_identifier": "Grissel1688027213067", + "display_name": "ante ipsum", + "password": null, + "account_type": null, + "account_status": "INACTIVE", + "email": "ggreensmith0@tmall.com", + "org_identifiers": [ + "0", + "0", + "0" + ], + "group_identifiers": [ + "cfa01dd9-9605-422d-b7de-a37afff63647", + "280a2235-3721-43fc-aa25-5d33549ecc90", + "f827545e-a592-4280-8ceb-318bd673d04c" + ], + "visibility": null, + "notify_on_share": null, + "show_onboarding_experience": true, + "onboarding_experience_completed": false, + "home_liveboard_identifier": "b2d68a4f-cf67-4723-966f-8a592fdbf8b9", + "favorite_metadata": [ + { + "identifier": "10a69d10-e455-4473-b1c6-de1da8cc1ad5", + "type": null + }, + { + "identifier": "48d27aee-59c3-4a0c-8d2c-5a8989c55bb1", + "type": "ANSWER" + }, + { + "identifier": "262abdac-b00f-4f5f-ad33-fcf10154184f", + "type": "LIVEBOARD" + } + ] + }, + { + "user_identifier": "Davon1688027213070", + "display_name": "lacus", + "password": "rJ7<8Xr'!~N", + "account_type": null, + "account_status": null, + "email": "dsygroves1@ft.com", + "org_identifiers": [ + "0", + "0", + "0" + ], + "group_identifiers": null, + "visibility": null, + "notify_on_share": null, + "show_onboarding_experience": null, + "onboarding_experience_completed": null, + "home_liveboard_identifier": null, + "favorite_metadata": [ + { + "identifier": "10a69d10-e455-4473-b1c6-de1da8cc1ad5", + "type": null + }, + { + "identifier": "48d27aee-59c3-4a0c-8d2c-5a8989c55bb1", + "type": null + }, + { + "identifier": "262abdac-b00f-4f5f-ad33-fcf10154184f", + "type": "LIVEBOARD" + } + ] + } + ], + "dry_run": true, + "default_password": "xY1\"{Ag6'0)w65" + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/users/import", + "operationId": "importUsers", + "scenario": "positive", + "type": "AUTOMATIC", + "testId": 2487 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "users": [ + { + "user_identifier": "Dill1688027213074", + "display_name": "odio consequat", + "password": "bC9@%'*u$!})c8k", + "account_type": "SAML_USER", + "account_status": "PENDING", + "email": null, + "org_identifiers": null, + "group_identifiers": [ + "cfa01dd9-9605-422d-b7de-a37afff63647", + "280a2235-3721-43fc-aa25-5d33549ecc90", + "f827545e-a592-4280-8ceb-318bd673d04c" + ], + "visibility": null, + "notify_on_share": null, + "show_onboarding_experience": null, + "onboarding_experience_completed": null, + "home_liveboard_identifier": null, + "favorite_metadata": [ + { + "identifier": "10a69d10-e455-4473-b1c6-de1da8cc1ad5", + "type": null + }, + { + "identifier": "48d27aee-59c3-4a0c-8d2c-5a8989c55bb1", + "type": "ANSWER" + } + ] + }, + { + "user_identifier": "Mildrid1688027213078", + "display_name": "libero quis", + "password": "eT8$~_o\"\\k0", + "account_type": null, + "account_status": null, + "email": "mbovingdon1@gnu.org", + "org_identifiers": null, + "group_identifiers": [ + "cfa01dd9-9605-422d-b7de-a37afff63647", + "280a2235-3721-43fc-aa25-5d33549ecc90", + "f827545e-a592-4280-8ceb-318bd673d04c" + ], + "visibility": null, + "notify_on_share": null, + "show_onboarding_experience": null, + "onboarding_experience_completed": true, + "home_liveboard_identifier": "061457a2-27bc-43a9-9754-0cd873691bf0", + "favorite_metadata": null + }, + { + "user_identifier": "Bail1688027213080", + "display_name": "proin leo", + "password": "uU0|'<'/8", + "account_type": null, + "account_status": null, + "email": null, + "org_identifiers": [ + "0" + ], + "group_identifiers": [ + "cfa01dd9-9605-422d-b7de-a37afff63647" + ], + "visibility": "NON_SHARABLE", + "notify_on_share": false, + "show_onboarding_experience": true, + "onboarding_experience_completed": null, + "home_liveboard_identifier": "b2d68a4f-cf67-4723-966f-8a592fdbf8b9", + "favorite_metadata": null + }, + { + "user_identifier": "Bonni1688027213083", + "display_name": "lobortis convallis", + "password": null, + "account_type": "LOCAL_USER", + "account_status": "LOCKED", + "email": "bfairnie3@over-blog.com", + "org_identifiers": [ + "0", + "0" + ], + "group_identifiers": [ + "cfa01dd9-9605-422d-b7de-a37afff63647", + "280a2235-3721-43fc-aa25-5d33549ecc90" + ], + "visibility": "SHARABLE", + "notify_on_share": false, + "show_onboarding_experience": null, + "onboarding_experience_completed": true, + "home_liveboard_identifier": null, + "favorite_metadata": null + }, + { + "user_identifier": "Almira1688027213085", + "display_name": "ac", + "password": "dC5%1*&RZ4", + "account_type": "SAML_USER", + "account_status": null, + "email": null, + "org_identifiers": [ + "0" + ], + "group_identifiers": null, + "visibility": null, + "notify_on_share": null, + "show_onboarding_experience": null, + "onboarding_experience_completed": null, + "home_liveboard_identifier": "e36ee65e-64be-436b-a29a-22d8998c4fae", + "favorite_metadata": null + }, + { + "user_identifier": "Druci1688027213087", + "display_name": "tortor", + "password": "iV1}LXX4S&=", + "account_type": null, + "account_status": "EXPIRED", + "email": null, + "org_identifiers": null, + "group_identifiers": [ + "cfa01dd9-9605-422d-b7de-a37afff63647" + ], + "visibility": null, + "notify_on_share": null, + "show_onboarding_experience": false, + "onboarding_experience_completed": true, + "home_liveboard_identifier": "262abdac-b00f-4f5f-ad33-fcf10154184f", + "favorite_metadata": [ + { + "identifier": "10a69d10-e455-4473-b1c6-de1da8cc1ad5", + "type": "ANSWER" + }, + { + "identifier": "48d27aee-59c3-4a0c-8d2c-5a8989c55bb1", + "type": null + }, + { + "identifier": "262abdac-b00f-4f5f-ad33-fcf10154184f", + "type": null + } + ] + }, + { + "user_identifier": "Meridel1688027213091", + "display_name": "consequat", + "password": null, + "account_type": null, + "account_status": "EXPIRED", + "email": "mviel6@soundcloud.com", + "org_identifiers": [ + "0", + "0", + "0" + ], + "group_identifiers": null, + "visibility": "NON_SHARABLE", + "notify_on_share": null, + "show_onboarding_experience": false, + "onboarding_experience_completed": true, + "home_liveboard_identifier": null, + "favorite_metadata": null + }, + { + "user_identifier": "Evan1688027213093", + "display_name": "vitae mattis", + "password": "pP1=/Jz.#36QA.e", + "account_type": "LDAP_USER", + "account_status": null, + "email": "edripps7@xrea.com", + "org_identifiers": null, + "group_identifiers": [ + "cfa01dd9-9605-422d-b7de-a37afff63647" + ], + "visibility": "NON_SHARABLE", + "notify_on_share": null, + "show_onboarding_experience": null, + "onboarding_experience_completed": true, + "home_liveboard_identifier": null, + "favorite_metadata": [ + { + "identifier": "10a69d10-e455-4473-b1c6-de1da8cc1ad5", + "type": "ANSWER" + }, + { + "identifier": "48d27aee-59c3-4a0c-8d2c-5a8989c55bb1", + "type": null + } + ] + } + ], + "delete_unspecified_users": true, + "default_password": "kJ7}!ApTNf|c5fv" + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/users/import", + "operationId": "importUsers", + "scenario": "positive", + "type": "AUTOMATIC", + "testId": 2488 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "users": [ + { + "user_identifier": "Nonie1688027213097", + "display_name": "erat quisque", + "password": null, + "account_type": "LOCAL_USER", + "account_status": null, + "email": null, + "org_identifiers": [ + "0", + "0" + ], + "group_identifiers": [ + "cfa01dd9-9605-422d-b7de-a37afff63647" + ], + "visibility": null, + "notify_on_share": null, + "show_onboarding_experience": false, + "onboarding_experience_completed": true, + "home_liveboard_identifier": "061457a2-27bc-43a9-9754-0cd873691bf0", + "favorite_metadata": [ + { + "identifier": "10a69d10-e455-4473-b1c6-de1da8cc1ad5", + "type": "ANSWER" + }, + { + "identifier": "48d27aee-59c3-4a0c-8d2c-5a8989c55bb1", + "type": null + }, + { + "identifier": "262abdac-b00f-4f5f-ad33-fcf10154184f", + "type": "LIVEBOARD" + } + ] + }, + { + "user_identifier": "Alia1688027213100", + "display_name": "nulla mollis", + "password": "aL0(b\\',*", + "account_type": null, + "account_status": "ACTIVE", + "email": null, + "org_identifiers": [ + "0", + "0", + "0" + ], + "group_identifiers": [ + "cfa01dd9-9605-422d-b7de-a37afff63647" + ], + "visibility": "SHARABLE", + "notify_on_share": false, + "show_onboarding_experience": false, + "onboarding_experience_completed": null, + "home_liveboard_identifier": null, + "favorite_metadata": [ + { + "identifier": "10a69d10-e455-4473-b1c6-de1da8cc1ad5", + "type": "ANSWER" + }, + { + "identifier": "48d27aee-59c3-4a0c-8d2c-5a8989c55bb1", + "type": "ANSWER" + } + ] + }, + { + "user_identifier": "Normie1688027213104", + "display_name": "vulputate", + "password": "fM1?1F}$G)6", + "account_type": null, + "account_status": "LOCKED", + "email": "ngiamuzzo2@eepurl.com", + "org_identifiers": [ + "0" + ], + "group_identifiers": [ + "cfa01dd9-9605-422d-b7de-a37afff63647" + ], + "visibility": "NON_SHARABLE", + "notify_on_share": null, + "show_onboarding_experience": false, + "onboarding_experience_completed": false, + "home_liveboard_identifier": null, + "favorite_metadata": [ + { + "identifier": "10a69d10-e455-4473-b1c6-de1da8cc1ad5", + "type": "ANSWER" + }, + { + "identifier": "48d27aee-59c3-4a0c-8d2c-5a8989c55bb1", + "type": "ANSWER" + }, + { + "identifier": "262abdac-b00f-4f5f-ad33-fcf10154184f", + "type": null + } + ] + }, + { + "user_identifier": "Cassy1688027213107", + "display_name": "sed accumsan", + "password": "xL8$G8saR*r4'", + "account_type": "OIDC_USER", + "account_status": "EXPIRED", + "email": null, + "org_identifiers": null, + "group_identifiers": [ + "cfa01dd9-9605-422d-b7de-a37afff63647" + ], + "visibility": "SHARABLE", + "notify_on_share": true, + "show_onboarding_experience": true, + "onboarding_experience_completed": false, + "home_liveboard_identifier": null, + "favorite_metadata": null + }, + { + "user_identifier": "Celia1688027213110", + "display_name": "viverra", + "password": null, + "account_type": "SAML_USER", + "account_status": "PENDING", + "email": "clyard4@psu.edu", + "org_identifiers": [ + "0", + "0" + ], + "group_identifiers": [ + "cfa01dd9-9605-422d-b7de-a37afff63647" + ], + "visibility": "SHARABLE", + "notify_on_share": false, + "show_onboarding_experience": false, + "onboarding_experience_completed": null, + "home_liveboard_identifier": "262abdac-b00f-4f5f-ad33-fcf10154184f", + "favorite_metadata": [ + { + "identifier": "10a69d10-e455-4473-b1c6-de1da8cc1ad5", + "type": null + }, + { + "identifier": "48d27aee-59c3-4a0c-8d2c-5a8989c55bb1", + "type": null + }, + { + "identifier": "262abdac-b00f-4f5f-ad33-fcf10154184f", + "type": null + } + ] + } + ], + "dry_run": true, + "delete_unspecified_users": true + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/users/import", + "operationId": "importUsers", + "scenario": "positive", + "type": "AUTOMATIC", + "testId": 2489 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "users": [ + { + "user_identifier": "Lorenza1688027213114", + "display_name": "hac habitasse", + "password": null, + "account_type": "SAML_USER", + "account_status": null, + "email": null, + "org_identifiers": [ + "0", + "0" + ], + "group_identifiers": null, + "visibility": "NON_SHARABLE", + "notify_on_share": true, + "show_onboarding_experience": true, + "onboarding_experience_completed": false, + "home_liveboard_identifier": null, + "favorite_metadata": null + } + ], + "delete_unspecified_users": false, + "default_password": "pV9)_{oFR4)'" + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/users/import", + "operationId": "importUsers", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 2490 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "users": null, + "dry_run": true, + "delete_unspecified_users": false, + "default_password": "iC1\"egL4\\E" + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/users/import", + "operationId": "importUsers", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 2491 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "users": null, + "dry_run": false + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/users/import", + "operationId": "importUsers", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 2492 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "users": null, + "dry_run": false, + "delete_unspecified_users": false, + "default_password": "wU2/k,U{Giy" + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/users/import", + "operationId": "importUsers", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 2493 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "users": null, + "delete_unspecified_users": false + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/users/import", + "operationId": "importUsers", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 2494 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "users": null, + "delete_unspecified_users": false + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/users/import", + "operationId": "importUsers", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 2495 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "users": null, + "dry_run": false + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/users/import", + "operationId": "importUsers", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 2496 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "users": null, + "delete_unspecified_users": false, + "default_password": "eA4%tcIgg" + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/users/import", + "operationId": "importUsers", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 2497 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "users": null, + "dry_run": false, + "delete_unspecified_users": false, + "default_password": "wU2/k,U{Giy" + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/users/import", + "operationId": "importUsers", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 2498 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "users": null, + "default_password": "bN6!e'JnEW|od5QL" + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/users/import", + "operationId": "importUsers", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 2499 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "users": null, + "dry_run": true, + "default_password": "xY1\"{Ag6'0)w65" + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/users/import", + "operationId": "importUsers", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 2500 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "users": null, + "delete_unspecified_users": false + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/users/import", + "operationId": "importUsers", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 2501 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "users": null, + "dry_run": true, + "delete_unspecified_users": false, + "default_password": "uP0*#cfr(\\1bqq" + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/users/import", + "operationId": "importUsers", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 2502 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "users": null, + "dry_run": false + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/users/import", + "operationId": "importUsers", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 2503 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "users": null, + "delete_unspecified_users": false, + "default_password": "eA4%tcIgg" + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/users/import", + "operationId": "importUsers", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 2504 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "users": null, + "dry_run": false, + "default_password": "fI7?/(zs9m" + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/users/import", + "operationId": "importUsers", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 2505 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "users": null, + "dry_run": false + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/users/import", + "operationId": "importUsers", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 2506 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "users": null, + "dry_run": true, + "delete_unspecified_users": true + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/users/import", + "operationId": "importUsers", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 2507 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "users": "jnadtijJQVRSyul" + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/users/import", + "operationId": "importUsers", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 2508 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "users": [ + { + "user_identifier": "Dallon1688027212782", + "display_name": "in tempus", + "password": null, + "account_type": null, + "account_status": null, + "email": null, + "org_identifiers": [ + "0", + "0", + "0" + ], + "group_identifiers": null, + "visibility": "NON_SHARABLE", + "notify_on_share": true, + "show_onboarding_experience": null, + "onboarding_experience_completed": null, + "home_liveboard_identifier": null, + "favorite_metadata": null + }, + { + "user_identifier": "Stevy1688027212821", + "display_name": "pellentesque", + "password": "nO3@2~IbW#).T6", + "account_type": null, + "account_status": "ACTIVE", + "email": null, + "org_identifiers": [ + "0", + "0" + ], + "group_identifiers": [ + "cfa01dd9-9605-422d-b7de-a37afff63647", + "280a2235-3721-43fc-aa25-5d33549ecc90" + ], + "visibility": null, + "notify_on_share": false, + "show_onboarding_experience": false, + "onboarding_experience_completed": null, + "home_liveboard_identifier": "327f4d60-c502-43b0-b1d4-c73df5031a2e", + "favorite_metadata": null + }, + { + "user_identifier": "Walliw1688027212824", + "display_name": "vestibulum", + "password": null, + "account_type": "LOCAL_USER", + "account_status": null, + "email": null, + "org_identifiers": null, + "group_identifiers": [ + "cfa01dd9-9605-422d-b7de-a37afff63647", + "280a2235-3721-43fc-aa25-5d33549ecc90" + ], + "visibility": null, + "notify_on_share": true, + "show_onboarding_experience": null, + "onboarding_experience_completed": null, + "home_liveboard_identifier": "601be8e5-140e-477c-8812-843795306438", + "favorite_metadata": [ + { + "identifier": "10a69d10-e455-4473-b1c6-de1da8cc1ad5", + "type": null + }, + { + "identifier": "48d27aee-59c3-4a0c-8d2c-5a8989c55bb1", + "type": "ANSWER" + }, + { + "identifier": "262abdac-b00f-4f5f-ad33-fcf10154184f", + "type": null + } + ] + }, + { + "user_identifier": "Shanta1688027212832", + "display_name": "sit", + "password": "oD0&Df_Caf", + "account_type": "LOCAL_USER", + "account_status": "PENDING", + "email": "swederell3@livejournal.com", + "org_identifiers": null, + "group_identifiers": null, + "visibility": null, + "notify_on_share": false, + "show_onboarding_experience": false, + "onboarding_experience_completed": null, + "home_liveboard_identifier": null, + "favorite_metadata": [ + { + "identifier": "10a69d10-e455-4473-b1c6-de1da8cc1ad5", + "type": null + } + ] + }, + { + "user_identifier": "Sheri1688027212835", + "display_name": "magna", + "password": "yU0/$FBb%", + "account_type": null, + "account_status": null, + "email": null, + "org_identifiers": [ + "0", + "0", + "0" + ], + "group_identifiers": [ + "cfa01dd9-9605-422d-b7de-a37afff63647" + ], + "visibility": null, + "notify_on_share": true, + "show_onboarding_experience": true, + "onboarding_experience_completed": false, + "home_liveboard_identifier": null, + "favorite_metadata": [ + { + "identifier": "10a69d10-e455-4473-b1c6-de1da8cc1ad5", + "type": null + }, + { + "identifier": "48d27aee-59c3-4a0c-8d2c-5a8989c55bb1", + "type": null + } + ] + }, + { + "user_identifier": "Nana1688027212838", + "display_name": "suscipit a", + "password": null, + "account_type": "LOCAL_USER", + "account_status": "ACTIVE", + "email": null, + "org_identifiers": [ + "0", + "0" + ], + "group_identifiers": [ + "cfa01dd9-9605-422d-b7de-a37afff63647", + "280a2235-3721-43fc-aa25-5d33549ecc90", + "f827545e-a592-4280-8ceb-318bd673d04c" + ], + "visibility": null, + "notify_on_share": null, + "show_onboarding_experience": false, + "onboarding_experience_completed": true, + "home_liveboard_identifier": null, + "favorite_metadata": [ + { + "identifier": "10a69d10-e455-4473-b1c6-de1da8cc1ad5", + "type": "ANSWER" + }, + { + "identifier": "48d27aee-59c3-4a0c-8d2c-5a8989c55bb1", + "type": "ANSWER" + }, + { + "identifier": "262abdac-b00f-4f5f-ad33-fcf10154184f", + "type": null + } + ] + } + ], + "dry_run": false, + "default_password": [ + "fI7?/(zs9m" + ] + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/users/import", + "operationId": "importUsers", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 2509 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "users": "FULApCNfyfmmSuo", + "dry_run": false + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/users/import", + "operationId": "importUsers", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 2510 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "users": "DLSiClLTSxOWyiJ", + "default_password": "bN6!e'JnEW|od5QL" + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/users/import", + "operationId": "importUsers", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 2511 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "users": "hPxRhvUfWVebBNL", + "dry_run": true, + "default_password": "xY1\"{Ag6'0)w65" + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/users/import", + "operationId": "importUsers", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 2512 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "users": [ + { + "user_identifier": "Leicester1688027213010", + "display_name": "odio", + "password": "zY9,EfbM", + "account_type": "OIDC_USER", + "account_status": "INACTIVE", + "email": "lmatskiv0@blog.com", + "org_identifiers": null, + "group_identifiers": [ + "cfa01dd9-9605-422d-b7de-a37afff63647", + "280a2235-3721-43fc-aa25-5d33549ecc90", + "f827545e-a592-4280-8ceb-318bd673d04c" + ], + "visibility": null, + "notify_on_share": false, + "show_onboarding_experience": false, + "onboarding_experience_completed": false, + "home_liveboard_identifier": "33248a57-cc70-4e39-9199-fb5092283381", + "favorite_metadata": [ + { + "identifier": "10a69d10-e455-4473-b1c6-de1da8cc1ad5", + "type": "ANSWER" + }, + { + "identifier": "48d27aee-59c3-4a0c-8d2c-5a8989c55bb1", + "type": "ANSWER" + } + ] + }, + { + "user_identifier": "Gayleen1688027213013", + "display_name": "id justo", + "password": null, + "account_type": "LOCAL_USER", + "account_status": null, + "email": "gbertenshaw1@sciencedaily.com", + "org_identifiers": [ + "0", + "0" + ], + "group_identifiers": [ + "cfa01dd9-9605-422d-b7de-a37afff63647", + "280a2235-3721-43fc-aa25-5d33549ecc90" + ], + "visibility": null, + "notify_on_share": false, + "show_onboarding_experience": false, + "onboarding_experience_completed": false, + "home_liveboard_identifier": null, + "favorite_metadata": [ + { + "identifier": "10a69d10-e455-4473-b1c6-de1da8cc1ad5", + "type": "ANSWER" + }, + { + "identifier": "48d27aee-59c3-4a0c-8d2c-5a8989c55bb1", + "type": null + }, + { + "identifier": "262abdac-b00f-4f5f-ad33-fcf10154184f", + "type": "LIVEBOARD" + } + ] + }, + { + "user_identifier": "Les1688027213017", + "display_name": "ligula", + "password": null, + "account_type": "LOCAL_USER", + "account_status": null, + "email": "lcarlton2@engadget.com", + "org_identifiers": [ + "0", + "0", + "0" + ], + "group_identifiers": null, + "visibility": null, + "notify_on_share": null, + "show_onboarding_experience": true, + "onboarding_experience_completed": false, + "home_liveboard_identifier": null, + "favorite_metadata": null + } + ], + "default_password": [ + "bN6!e'JnEW|od5QL" + ] + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/users/import", + "operationId": "importUsers", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 2513 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "users": [ + { + "user_identifier": "Newton1688027213020", + "display_name": "duis ac", + "password": null, + "account_type": "LOCAL_USER", + "account_status": null, + "email": null, + "org_identifiers": null, + "group_identifiers": null, + "visibility": null, + "notify_on_share": true, + "show_onboarding_experience": null, + "onboarding_experience_completed": true, + "home_liveboard_identifier": "c836ad16-660d-4d28-a3a0-e07cb9eb6ab1", + "favorite_metadata": null + }, + { + "user_identifier": "Margot1688027213022", + "display_name": "quis orci", + "password": null, + "account_type": null, + "account_status": "PENDING", + "email": null, + "org_identifiers": [ + "0", + "0", + "0" + ], + "group_identifiers": [ + "cfa01dd9-9605-422d-b7de-a37afff63647" + ], + "visibility": "SHARABLE", + "notify_on_share": null, + "show_onboarding_experience": false, + "onboarding_experience_completed": null, + "home_liveboard_identifier": null, + "favorite_metadata": null + }, + { + "user_identifier": "Benton1688027213024", + "display_name": "vestibulum", + "password": null, + "account_type": "LOCAL_USER", + "account_status": null, + "email": "bstout2@biblegateway.com", + "org_identifiers": [ + "0" + ], + "group_identifiers": [ + "cfa01dd9-9605-422d-b7de-a37afff63647", + "280a2235-3721-43fc-aa25-5d33549ecc90" + ], + "visibility": null, + "notify_on_share": true, + "show_onboarding_experience": null, + "onboarding_experience_completed": false, + "home_liveboard_identifier": null, + "favorite_metadata": [ + { + "identifier": "10a69d10-e455-4473-b1c6-de1da8cc1ad5", + "type": null + } + ] + }, + { + "user_identifier": "Kylynn1688027213027", + "display_name": "velit donec", + "password": "jJ1|mm@eHWkRD", + "account_type": null, + "account_status": "LOCKED", + "email": "ksarfas3@china.com.cn", + "org_identifiers": [ + "0", + "0", + "0" + ], + "group_identifiers": [ + "cfa01dd9-9605-422d-b7de-a37afff63647", + "280a2235-3721-43fc-aa25-5d33549ecc90", + "f827545e-a592-4280-8ceb-318bd673d04c" + ], + "visibility": "SHARABLE", + "notify_on_share": null, + "show_onboarding_experience": false, + "onboarding_experience_completed": null, + "home_liveboard_identifier": null, + "favorite_metadata": [ + { + "identifier": "10a69d10-e455-4473-b1c6-de1da8cc1ad5", + "type": null + } + ] + }, + { + "user_identifier": "Peyton1688027213030", + "display_name": "ac", + "password": "oD1*)5ey/p}P&&", + "account_type": null, + "account_status": "ACTIVE", + "email": null, + "org_identifiers": [ + "0", + "0", + "0" + ], + "group_identifiers": [ + "cfa01dd9-9605-422d-b7de-a37afff63647", + "280a2235-3721-43fc-aa25-5d33549ecc90", + "f827545e-a592-4280-8ceb-318bd673d04c" + ], + "visibility": "SHARABLE", + "notify_on_share": false, + "show_onboarding_experience": false, + "onboarding_experience_completed": true, + "home_liveboard_identifier": "061457a2-27bc-43a9-9754-0cd873691bf0", + "favorite_metadata": [ + { + "identifier": "10a69d10-e455-4473-b1c6-de1da8cc1ad5", + "type": "ANSWER" + }, + { + "identifier": "48d27aee-59c3-4a0c-8d2c-5a8989c55bb1", + "type": null + } + ] + }, + { + "user_identifier": "Basil1688027213033", + "display_name": "semper interdum", + "password": null, + "account_type": null, + "account_status": null, + "email": null, + "org_identifiers": [ + "0" + ], + "group_identifiers": [ + "cfa01dd9-9605-422d-b7de-a37afff63647", + "280a2235-3721-43fc-aa25-5d33549ecc90" + ], + "visibility": "NON_SHARABLE", + "notify_on_share": null, + "show_onboarding_experience": null, + "onboarding_experience_completed": false, + "home_liveboard_identifier": null, + "favorite_metadata": [ + { + "identifier": "10a69d10-e455-4473-b1c6-de1da8cc1ad5", + "type": "ANSWER" + } + ] + }, + { + "user_identifier": "Yank1688027213036", + "display_name": "pellentesque", + "password": "rR8{s5Ph(nR6hF", + "account_type": null, + "account_status": "LOCKED", + "email": "yizaks6@domainmarket.com", + "org_identifiers": null, + "group_identifiers": null, + "visibility": "NON_SHARABLE", + "notify_on_share": false, + "show_onboarding_experience": false, + "onboarding_experience_completed": false, + "home_liveboard_identifier": "33248a57-cc70-4e39-9199-fb5092283381", + "favorite_metadata": [ + { + "identifier": "10a69d10-e455-4473-b1c6-de1da8cc1ad5", + "type": null + }, + { + "identifier": "48d27aee-59c3-4a0c-8d2c-5a8989c55bb1", + "type": "ANSWER" + }, + { + "identifier": "262abdac-b00f-4f5f-ad33-fcf10154184f", + "type": null + } + ] + }, + { + "user_identifier": "Reta1688027213039", + "display_name": "eu pede", + "password": "sL6\"K7'H/", + "account_type": "SAML_USER", + "account_status": "LOCKED", + "email": null, + "org_identifiers": [ + "0" + ], + "group_identifiers": [ + "cfa01dd9-9605-422d-b7de-a37afff63647" + ], + "visibility": null, + "notify_on_share": null, + "show_onboarding_experience": null, + "onboarding_experience_completed": null, + "home_liveboard_identifier": null, + "favorite_metadata": [ + { + "identifier": "10a69d10-e455-4473-b1c6-de1da8cc1ad5", + "type": "ANSWER" + }, + { + "identifier": "48d27aee-59c3-4a0c-8d2c-5a8989c55bb1", + "type": null + }, + { + "identifier": "262abdac-b00f-4f5f-ad33-fcf10154184f", + "type": "LIVEBOARD" + } + ] + } + ], + "delete_unspecified_users": false, + "default_password": [ + "eA4%tcIgg" + ] + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/users/import", + "operationId": "importUsers", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 2514 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "users": "fXRiEEnscCSWPig", + "dry_run": false + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/users/import", + "operationId": "importUsers", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 2515 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "users": null, + "delete_unspecified_users": false + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/users/import", + "operationId": "importUsers", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 2516 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "users": "hpdxlHCHbtqeuTS", + "dry_run": true, + "delete_unspecified_users": false, + "default_password": "uP0*#cfr(\\1bqq" + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/users/import", + "operationId": "importUsers", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 2517 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "users": null, + "dry_run": false + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/users/import", + "operationId": "importUsers", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 2518 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "users": [ + { + "user_identifier": "Armando1688027212911", + "display_name": "pulvinar nulla", + "password": null, + "account_type": "LOCAL_USER", + "account_status": "ACTIVE", + "email": null, + "org_identifiers": [ + "0" + ], + "group_identifiers": [ + "cfa01dd9-9605-422d-b7de-a37afff63647", + "280a2235-3721-43fc-aa25-5d33549ecc90", + "f827545e-a592-4280-8ceb-318bd673d04c" + ], + "visibility": null, + "notify_on_share": true, + "show_onboarding_experience": null, + "onboarding_experience_completed": false, + "home_liveboard_identifier": null, + "favorite_metadata": [ + { + "identifier": "10a69d10-e455-4473-b1c6-de1da8cc1ad5", + "type": "ANSWER" + }, + { + "identifier": "48d27aee-59c3-4a0c-8d2c-5a8989c55bb1", + "type": "ANSWER" + } + ] + }, + { + "user_identifier": "Mindy1688027212914", + "display_name": "eu", + "password": null, + "account_type": "OIDC_USER", + "account_status": null, + "email": "mgoschalk1@google.it", + "org_identifiers": [ + "0", + "0", + "0" + ], + "group_identifiers": [ + "cfa01dd9-9605-422d-b7de-a37afff63647", + "280a2235-3721-43fc-aa25-5d33549ecc90" + ], + "visibility": null, + "notify_on_share": null, + "show_onboarding_experience": null, + "onboarding_experience_completed": null, + "home_liveboard_identifier": null, + "favorite_metadata": [ + { + "identifier": "10a69d10-e455-4473-b1c6-de1da8cc1ad5", + "type": null + }, + { + "identifier": "48d27aee-59c3-4a0c-8d2c-5a8989c55bb1", + "type": "ANSWER" + }, + { + "identifier": "262abdac-b00f-4f5f-ad33-fcf10154184f", + "type": null + } + ] + }, + { + "user_identifier": "Jerrylee1688027212918", + "display_name": "augue", + "password": null, + "account_type": null, + "account_status": null, + "email": null, + "org_identifiers": [ + "0" + ], + "group_identifiers": null, + "visibility": null, + "notify_on_share": false, + "show_onboarding_experience": null, + "onboarding_experience_completed": true, + "home_liveboard_identifier": "061457a2-27bc-43a9-9754-0cd873691bf0", + "favorite_metadata": null + }, + { + "user_identifier": "Dore1688027212920", + "display_name": "eget nunc", + "password": "eL2%2}h/ZtQHFC}\"", + "account_type": null, + "account_status": null, + "email": null, + "org_identifiers": [ + "0", + "0", + "0" + ], + "group_identifiers": [ + "cfa01dd9-9605-422d-b7de-a37afff63647", + "280a2235-3721-43fc-aa25-5d33549ecc90" + ], + "visibility": null, + "notify_on_share": true, + "show_onboarding_experience": false, + "onboarding_experience_completed": true, + "home_liveboard_identifier": null, + "favorite_metadata": null + }, + { + "user_identifier": "Torrence1688027212923", + "display_name": "maecenas", + "password": "lP2)7Nr3", + "account_type": "LDAP_USER", + "account_status": null, + "email": null, + "org_identifiers": [ + "0", + "0" + ], + "group_identifiers": [ + "cfa01dd9-9605-422d-b7de-a37afff63647" + ], + "visibility": "SHARABLE", + "notify_on_share": true, + "show_onboarding_experience": null, + "onboarding_experience_completed": false, + "home_liveboard_identifier": "c836ad16-660d-4d28-a3a0-e07cb9eb6ab1", + "favorite_metadata": null + }, + { + "user_identifier": "Frederic1688027212925", + "display_name": "leo rhoncus", + "password": "hY9'47!UB+3#n&9y", + "account_type": null, + "account_status": "ACTIVE", + "email": "fkedward5@businessweek.com", + "org_identifiers": [ + "0", + "0", + "0" + ], + "group_identifiers": null, + "visibility": null, + "notify_on_share": null, + "show_onboarding_experience": null, + "onboarding_experience_completed": true, + "home_liveboard_identifier": null, + "favorite_metadata": [ + { + "identifier": "10a69d10-e455-4473-b1c6-de1da8cc1ad5", + "type": null + } + ] + }, + { + "user_identifier": "Sawyer1688027212928", + "display_name": "lectus", + "password": "eL2\"IZ*L", + "account_type": "REMOTE_USER", + "account_status": "PENDING", + "email": null, + "org_identifiers": [ + "0", + "0" + ], + "group_identifiers": [ + "cfa01dd9-9605-422d-b7de-a37afff63647", + "280a2235-3721-43fc-aa25-5d33549ecc90" + ], + "visibility": null, + "notify_on_share": false, + "show_onboarding_experience": false, + "onboarding_experience_completed": null, + "home_liveboard_identifier": null, + "favorite_metadata": [ + { + "identifier": "10a69d10-e455-4473-b1c6-de1da8cc1ad5", + "type": null + } + ] + }, + { + "user_identifier": "Em1688027212931", + "display_name": "lectus", + "password": "bV4>0Vxwwt<'aR", + "account_type": "SAML_USER", + "account_status": null, + "email": "esymper7@lycos.com", + "org_identifiers": [ + "0" + ], + "group_identifiers": null, + "visibility": null, + "notify_on_share": false, + "show_onboarding_experience": null, + "onboarding_experience_completed": null, + "home_liveboard_identifier": null, + "favorite_metadata": null + }, + { + "user_identifier": "Micky1688027212933", + "display_name": "nulla suscipit", + "password": null, + "account_type": "LDAP_USER", + "account_status": null, + "email": "mlaffin8@berkeley.edu", + "org_identifiers": [ + "0", + "0", + "0" + ], + "group_identifiers": [ + "cfa01dd9-9605-422d-b7de-a37afff63647", + "280a2235-3721-43fc-aa25-5d33549ecc90", + "f827545e-a592-4280-8ceb-318bd673d04c" + ], + "visibility": null, + "notify_on_share": null, + "show_onboarding_experience": true, + "onboarding_experience_completed": null, + "home_liveboard_identifier": "601be8e5-140e-477c-8812-843795306438", + "favorite_metadata": [ + { + "identifier": "10a69d10-e455-4473-b1c6-de1da8cc1ad5", + "type": null + }, + { + "identifier": "48d27aee-59c3-4a0c-8d2c-5a8989c55bb1", + "type": "ANSWER" + } + ] + } + ], + "default_password": [ + "dZ1/K{e\\" + ] + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/users/import", + "operationId": "importUsers", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 2519 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "users": null, + "dry_run": false + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/orgs/{org_identifier}/delete", + "operationId": "deleteOrg", + "scenario": "positive", + "type": "AUTOMATIC", + "testId": 2520 + }, + "Path_Variables": { + "org_identifier": "Noemi O'Fallon" + }, + "Query_Variables": {}, + "Body": {} + }, + { + "Metadata": { + "path": "/api/rest/2.0/orgs/{org_identifier}/delete", + "operationId": "deleteOrg", + "scenario": "positive", + "type": "AUTOMATIC", + "testId": 2521 + }, + "Path_Variables": { + "org_identifier": "cradclyffe11688027224688" + }, + "Query_Variables": {}, + "Body": {} + }, + { + "Metadata": { + "path": "/api/rest/2.0/orgs/{org_identifier}/delete", + "operationId": "deleteOrg", + "scenario": "positive", + "type": "AUTOMATIC", + "testId": 2522 + }, + "Path_Variables": { + "org_identifier": "Frazier Tivenan" + }, + "Query_Variables": {}, + "Body": {} + }, + { + "Metadata": { + "path": "/api/rest/2.0/orgs/{org_identifier}/delete", + "operationId": "deleteOrg", + "scenario": "positive", + "type": "AUTOMATIC", + "testId": 2523 + }, + "Path_Variables": { + "org_identifier": "Josi Barribal" + }, + "Query_Variables": {}, + "Body": {} + }, + { + "Metadata": { + "path": "/api/rest/2.0/orgs/{org_identifier}/delete", + "operationId": "deleteOrg", + "scenario": "positive", + "type": "AUTOMATIC", + "testId": 2524 + }, + "Path_Variables": { + "org_identifier": "cdugood41688027224690" + }, + "Query_Variables": {}, + "Body": {} + }, + { + "Metadata": { + "path": "/api/rest/2.0/orgs/{org_identifier}/delete", + "operationId": "deleteOrg", + "scenario": "positive", + "type": "AUTOMATIC", + "testId": 2525 + }, + "Path_Variables": { + "org_identifier": "Calida Elliss" + }, + "Query_Variables": {}, + "Body": {} + }, + { + "Metadata": { + "path": "/api/rest/2.0/orgs/{org_identifier}/delete", + "operationId": "deleteOrg", + "scenario": "positive", + "type": "AUTOMATIC", + "testId": 2526 + }, + "Path_Variables": { + "org_identifier": "ckemish61688027224691" + }, + "Query_Variables": {}, + "Body": {} + }, + { + "Metadata": { + "path": "/api/rest/2.0/orgs/{org_identifier}/delete", + "operationId": "deleteOrg", + "scenario": "positive", + "type": "AUTOMATIC", + "testId": 2527 + }, + "Path_Variables": { + "org_identifier": "Loise Lumby" + }, + "Query_Variables": {}, + "Body": {} + }, + { + "Metadata": { + "path": "/api/rest/2.0/orgs/{org_identifier}/delete", + "operationId": "deleteOrg", + "scenario": "positive", + "type": "AUTOMATIC", + "testId": 2528 + }, + "Path_Variables": { + "org_identifier": "mdunridge81688027224693" + }, + "Query_Variables": {}, + "Body": {} + }, + { + "Metadata": { + "path": "/api/rest/2.0/orgs/{org_identifier}/delete", + "operationId": "deleteOrg", + "scenario": "positive", + "type": "AUTOMATIC", + "testId": 2529 + }, + "Path_Variables": { + "org_identifier": "Stevy Guymer" + }, + "Query_Variables": {}, + "Body": {} + }, + { + "Metadata": { + "path": "/api/rest/2.0/orgs/{org_identifier}/delete", + "operationId": "deleteOrg", + "scenario": "positive", + "type": "AUTOMATIC", + "testId": 2530 + }, + "Path_Variables": { + "org_identifier": "joregana1688027224694" + }, + "Query_Variables": {}, + "Body": {} + }, + { + "Metadata": { + "path": "/api/rest/2.0/orgs/{org_identifier}/delete", + "operationId": "deleteOrg", + "scenario": "positive", + "type": "AUTOMATIC", + "testId": 2531 + }, + "Path_Variables": { + "org_identifier": "Jeffry Flores" + }, + "Query_Variables": {}, + "Body": {} + }, + { + "Metadata": { + "path": "/api/rest/2.0/orgs/{org_identifier}/delete", + "operationId": "deleteOrg", + "scenario": "positive", + "type": "AUTOMATIC", + "testId": 2532 + }, + "Path_Variables": { + "org_identifier": "gvarfalameevc1688027224695" + }, + "Query_Variables": {}, + "Body": {} + }, + { + "Metadata": { + "path": "/api/rest/2.0/orgs/{org_identifier}/delete", + "operationId": "deleteOrg", + "scenario": "positive", + "type": "AUTOMATIC", + "testId": 2533 + }, + "Path_Variables": { + "org_identifier": "Findlay Hakonsen" + }, + "Query_Variables": {}, + "Body": {} + }, + { + "Metadata": { + "path": "/api/rest/2.0/orgs/{org_identifier}/delete", + "operationId": "deleteOrg", + "scenario": "positive", + "type": "AUTOMATIC", + "testId": 2534 + }, + "Path_Variables": { + "org_identifier": "bhenrichsene1688027224696" + }, + "Query_Variables": {}, + "Body": {} + }, + { + "Metadata": { + "path": "/api/rest/2.0/orgs/{org_identifier}/delete", + "operationId": "deleteOrg", + "scenario": "positive", + "type": "AUTOMATIC", + "testId": 2535 + }, + "Path_Variables": { + "org_identifier": "Dilly Mynett" + }, + "Query_Variables": {}, + "Body": {} + }, + { + "Metadata": { + "path": "/api/rest/2.0/orgs/{org_identifier}/delete", + "operationId": "deleteOrg", + "scenario": "positive", + "type": "AUTOMATIC", + "testId": 2536 + }, + "Path_Variables": { + "org_identifier": "Camella Judge" + }, + "Query_Variables": {}, + "Body": {} + }, + { + "Metadata": { + "path": "/api/rest/2.0/orgs/{org_identifier}/delete", + "operationId": "deleteOrg", + "scenario": "positive", + "type": "AUTOMATIC", + "testId": 2537 + }, + "Path_Variables": { + "org_identifier": "jgrinyovh1688027224698" + }, + "Query_Variables": {}, + "Body": {} + }, + { + "Metadata": { + "path": "/api/rest/2.0/orgs/{org_identifier}/delete", + "operationId": "deleteOrg", + "scenario": "positive", + "type": "AUTOMATIC", + "testId": 2538 + }, + "Path_Variables": { + "org_identifier": "uatyeoi1688027224698" + }, + "Query_Variables": {}, + "Body": {} + }, + { + "Metadata": { + "path": "/api/rest/2.0/orgs/{org_identifier}/delete", + "operationId": "deleteOrg", + "scenario": "positive", + "type": "AUTOMATIC", + "testId": 2539 + }, + "Path_Variables": { + "org_identifier": "Nolly Haker" + }, + "Query_Variables": {}, + "Body": {} + }, + { + "Metadata": { + "path": "/api/rest/2.0/orgs/{org_identifier}/delete", + "operationId": "deleteOrg", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 2540 + }, + "Path_Variables": { + "org_identifier": null + }, + "Query_Variables": {}, + "Body": {} + }, + { + "Metadata": { + "path": "/api/rest/2.0/orgs/{org_identifier}/delete", + "operationId": "deleteOrg", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 2541 + }, + "Path_Variables": { + "org_identifier": null + }, + "Query_Variables": {}, + "Body": {} + }, + { + "Metadata": { + "path": "/api/rest/2.0/orgs/{org_identifier}/delete", + "operationId": "deleteOrg", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 2542 + }, + "Path_Variables": { + "org_identifier": null + }, + "Query_Variables": {}, + "Body": {} + }, + { + "Metadata": { + "path": "/api/rest/2.0/orgs/{org_identifier}/delete", + "operationId": "deleteOrg", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 2543 + }, + "Path_Variables": { + "org_identifier": null + }, + "Query_Variables": {}, + "Body": {} + }, + { + "Metadata": { + "path": "/api/rest/2.0/orgs/{org_identifier}/delete", + "operationId": "deleteOrg", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 2544 + }, + "Path_Variables": { + "org_identifier": null + }, + "Query_Variables": {}, + "Body": {} + }, + { + "Metadata": { + "path": "/api/rest/2.0/orgs/{org_identifier}/delete", + "operationId": "deleteOrg", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 2545 + }, + "Path_Variables": { + "org_identifier": null + }, + "Query_Variables": {}, + "Body": {} + }, + { + "Metadata": { + "path": "/api/rest/2.0/orgs/{org_identifier}/delete", + "operationId": "deleteOrg", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 2546 + }, + "Path_Variables": { + "org_identifier": null + }, + "Query_Variables": {}, + "Body": {} + }, + { + "Metadata": { + "path": "/api/rest/2.0/orgs/{org_identifier}/delete", + "operationId": "deleteOrg", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 2547 + }, + "Path_Variables": { + "org_identifier": null + }, + "Query_Variables": {}, + "Body": {} + }, + { + "Metadata": { + "path": "/api/rest/2.0/orgs/{org_identifier}/delete", + "operationId": "deleteOrg", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 2548 + }, + "Path_Variables": { + "org_identifier": null + }, + "Query_Variables": {}, + "Body": {} + }, + { + "Metadata": { + "path": "/api/rest/2.0/orgs/{org_identifier}/delete", + "operationId": "deleteOrg", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 2549 + }, + "Path_Variables": { + "org_identifier": null + }, + "Query_Variables": {}, + "Body": {} + }, + { + "Metadata": { + "path": "/api/rest/2.0/orgs/{org_identifier}/delete", + "operationId": "deleteOrg", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 2550 + }, + "Path_Variables": { + "org_identifier": null + }, + "Query_Variables": {}, + "Body": {} + }, + { + "Metadata": { + "path": "/api/rest/2.0/orgs/{org_identifier}/delete", + "operationId": "deleteOrg", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 2551 + }, + "Path_Variables": { + "org_identifier": null + }, + "Query_Variables": {}, + "Body": {} + }, + { + "Metadata": { + "path": "/api/rest/2.0/orgs/{org_identifier}/delete", + "operationId": "deleteOrg", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 2552 + }, + "Path_Variables": { + "org_identifier": null + }, + "Query_Variables": {}, + "Body": {} + }, + { + "Metadata": { + "path": "/api/rest/2.0/orgs/{org_identifier}/delete", + "operationId": "deleteOrg", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 2553 + }, + "Path_Variables": { + "org_identifier": null + }, + "Query_Variables": {}, + "Body": {} + }, + { + "Metadata": { + "path": "/api/rest/2.0/orgs/{org_identifier}/delete", + "operationId": "deleteOrg", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 2554 + }, + "Path_Variables": { + "org_identifier": null + }, + "Query_Variables": {}, + "Body": {} + }, + { + "Metadata": { + "path": "/api/rest/2.0/orgs/{org_identifier}/delete", + "operationId": "deleteOrg", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 2555 + }, + "Path_Variables": { + "org_identifier": [ + "cradclyffe11688027224688" + ] + }, + "Query_Variables": {}, + "Body": {} + }, + { + "Metadata": { + "path": "/api/rest/2.0/orgs/{org_identifier}/delete", + "operationId": "deleteOrg", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 2556 + }, + "Path_Variables": { + "org_identifier": [ + "Josi", + "Barribal" + ] + }, + "Query_Variables": {}, + "Body": {} + }, + { + "Metadata": { + "path": "/api/rest/2.0/orgs/{org_identifier}/delete", + "operationId": "deleteOrg", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 2557 + }, + "Path_Variables": { + "org_identifier": [ + "mdunridge81688027224693" + ] + }, + "Query_Variables": {}, + "Body": {} + }, + { + "Metadata": { + "path": "/api/rest/2.0/orgs/{org_identifier}/delete", + "operationId": "deleteOrg", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 2558 + }, + "Path_Variables": { + "org_identifier": [ + "cradclyffe11688027224688" + ] + }, + "Query_Variables": {}, + "Body": {} + }, + { + "Metadata": { + "path": "/api/rest/2.0/orgs/{org_identifier}/delete", + "operationId": "deleteOrg", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 2559 + }, + "Path_Variables": { + "org_identifier": [ + "Nolly", + "Haker" + ] + }, + "Query_Variables": {}, + "Body": {} + }, + { + "Metadata": { + "path": "/api/rest/2.0/orgs/{org_identifier}/delete", + "operationId": "deleteOrg", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 2560 + }, + "Path_Variables": { + "org_identifier": [ + "Dilly", + "Mynett" + ] + }, + "Query_Variables": {}, + "Body": {} + }, + { + "Metadata": { + "path": "/api/rest/2.0/orgs/{org_identifier}/delete", + "operationId": "deleteOrg", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 2561 + }, + "Path_Variables": { + "org_identifier": [ + "Camella", + "Judge" + ] + }, + "Query_Variables": {}, + "Body": {} + }, + { + "Metadata": { + "path": "/api/rest/2.0/orgs/{org_identifier}/delete", + "operationId": "deleteOrg", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 2562 + }, + "Path_Variables": { + "org_identifier": [ + "Findlay", + "Hakonsen" + ] + }, + "Query_Variables": {}, + "Body": {} + }, + { + "Metadata": { + "path": "/api/rest/2.0/orgs/{org_identifier}/delete", + "operationId": "deleteOrg", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 2563 + }, + "Path_Variables": { + "org_identifier": [ + "Loise", + "Lumby" + ] + }, + "Query_Variables": {}, + "Body": {} + }, + { + "Metadata": { + "path": "/api/rest/2.0/orgs/{org_identifier}/delete", + "operationId": "deleteOrg", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 2564 + }, + "Path_Variables": { + "org_identifier": [ + "cdugood41688027224690" + ] + }, + "Query_Variables": {}, + "Body": {} + }, + { + "Metadata": { + "path": "/api/rest/2.0/orgs/{org_identifier}/delete", + "operationId": "deleteOrg", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 2565 + }, + "Path_Variables": { + "org_identifier": [ + "Noemi", + "O'Fallon" + ] + }, + "Query_Variables": {}, + "Body": {} + }, + { + "Metadata": { + "path": "/api/rest/2.0/orgs/{org_identifier}/delete", + "operationId": "deleteOrg", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 2566 + }, + "Path_Variables": { + "org_identifier": [ + "bhenrichsene1688027224696" + ] + }, + "Query_Variables": {}, + "Body": {} + }, + { + "Metadata": { + "path": "/api/rest/2.0/orgs/{org_identifier}/delete", + "operationId": "deleteOrg", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 2567 + }, + "Path_Variables": { + "org_identifier": [ + "Frazier", + "Tivenan" + ] + }, + "Query_Variables": {}, + "Body": {} + }, + { + "Metadata": { + "path": "/api/rest/2.0/orgs/{org_identifier}/delete", + "operationId": "deleteOrg", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 2568 + }, + "Path_Variables": { + "org_identifier": [ + "joregana1688027224694" + ] + }, + "Query_Variables": {}, + "Body": {} + }, + { + "Metadata": { + "path": "/api/rest/2.0/orgs/{org_identifier}/delete", + "operationId": "deleteOrg", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 2569 + }, + "Path_Variables": { + "org_identifier": [ + "Dilly", + "Mynett" + ] + }, + "Query_Variables": {}, + "Body": {} + }, + { + "Metadata": { + "path": "/api/rest/2.0/orgs/{org_identifier}/delete", + "operationId": "deleteOrg", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 2570 + }, + "Path_Variables": { + "org_identifier": "CMGmufQuVQkZzkQ" + }, + "Query_Variables": {}, + "Body": {} + }, + { + "Metadata": { + "path": "/api/rest/2.0/orgs/{org_identifier}/delete", + "operationId": "deleteOrg", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 2571 + }, + "Path_Variables": { + "org_identifier": "dHMIrXvckTpzSXi" + }, + "Query_Variables": {}, + "Body": {} + }, + { + "Metadata": { + "path": "/api/rest/2.0/orgs/{org_identifier}/delete", + "operationId": "deleteOrg", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 2572 + }, + "Path_Variables": { + "org_identifier": "QxQrFXzPgqVPksp" + }, + "Query_Variables": {}, + "Body": {} + }, + { + "Metadata": { + "path": "/api/rest/2.0/orgs/{org_identifier}/delete", + "operationId": "deleteOrg", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 2573 + }, + "Path_Variables": { + "org_identifier": "YpZaIwMeflbSkiJ" + }, + "Query_Variables": {}, + "Body": {} + }, + { + "Metadata": { + "path": "/api/rest/2.0/orgs/{org_identifier}/delete", + "operationId": "deleteOrg", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 2574 + }, + "Path_Variables": { + "org_identifier": "RWkEWsQYaJiRMKc" + }, + "Query_Variables": {}, + "Body": {} + }, + { + "Metadata": { + "path": "/api/rest/2.0/orgs/{org_identifier}/delete", + "operationId": "deleteOrg", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 2575 + }, + "Path_Variables": { + "org_identifier": "YcsqnEalkHgPKNo" + }, + "Query_Variables": {}, + "Body": {} + }, + { + "Metadata": { + "path": "/api/rest/2.0/orgs/{org_identifier}/delete", + "operationId": "deleteOrg", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 2576 + }, + "Path_Variables": { + "org_identifier": "zjJvvcUdgSfhXhn" + }, + "Query_Variables": {}, + "Body": {} + }, + { + "Metadata": { + "path": "/api/rest/2.0/orgs/{org_identifier}/delete", + "operationId": "deleteOrg", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 2577 + }, + "Path_Variables": { + "org_identifier": "ioIOIhfMYNJxrIe" + }, + "Query_Variables": {}, + "Body": {} + }, + { + "Metadata": { + "path": "/api/rest/2.0/orgs/{org_identifier}/delete", + "operationId": "deleteOrg", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 2578 + }, + "Path_Variables": { + "org_identifier": "lNWGHmArKIMuVWV" + }, + "Query_Variables": {}, + "Body": {} + }, + { + "Metadata": { + "path": "/api/rest/2.0/orgs/{org_identifier}/delete", + "operationId": "deleteOrg", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 2579 + }, + "Path_Variables": { + "org_identifier": "LxTMhkGEbKledpJ" + }, + "Query_Variables": {}, + "Body": {} + }, + { + "Metadata": { + "path": "/api/rest/2.0/orgs/{org_identifier}/delete", + "operationId": "deleteOrg", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 2580 + }, + "Path_Variables": { + "org_identifier": "cGvifeWiOwuIaoy" + }, + "Query_Variables": {}, + "Body": {} + }, + { + "Metadata": { + "path": "/api/rest/2.0/orgs/{org_identifier}/delete", + "operationId": "deleteOrg", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 2581 + }, + "Path_Variables": { + "org_identifier": "fOPkVOBnYVFqthW" + }, + "Query_Variables": {}, + "Body": {} + }, + { + "Metadata": { + "path": "/api/rest/2.0/orgs/{org_identifier}/delete", + "operationId": "deleteOrg", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 2582 + }, + "Path_Variables": { + "org_identifier": "OazPJeqsgrMLiEq" + }, + "Query_Variables": {}, + "Body": {} + }, + { + "Metadata": { + "path": "/api/rest/2.0/orgs/{org_identifier}/delete", + "operationId": "deleteOrg", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 2583 + }, + "Path_Variables": { + "org_identifier": "APDRjigDaXPxBgp" + }, + "Query_Variables": {}, + "Body": {} + }, + { + "Metadata": { + "path": "/api/rest/2.0/orgs/{org_identifier}/delete", + "operationId": "deleteOrg", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 2584 + }, + "Path_Variables": { + "org_identifier": "avpaGfEOwrUSing" + }, + "Query_Variables": {}, + "Body": {} + }, + { + "Metadata": { + "path": "/api/rest/2.0/tags/{tag_identifier}/delete", + "operationId": "deleteTag", + "scenario": "positive", + "type": "AUTOMATIC", + "testId": 2585 + }, + "Path_Variables": { + "tag_identifier": "morbi1688027229850" + }, + "Query_Variables": {}, + "Body": {} + }, + { + "Metadata": { + "path": "/api/rest/2.0/tags/{tag_identifier}/delete", + "operationId": "deleteTag", + "scenario": "positive", + "type": "AUTOMATIC", + "testId": 2586 + }, + "Path_Variables": { + "tag_identifier": "fusce1688027229854" + }, + "Query_Variables": {}, + "Body": {} + }, + { + "Metadata": { + "path": "/api/rest/2.0/tags/{tag_identifier}/delete", + "operationId": "deleteTag", + "scenario": "positive", + "type": "AUTOMATIC", + "testId": 2587 + }, + "Path_Variables": { + "tag_identifier": "tristique1688027229854" + }, + "Query_Variables": {}, + "Body": {} + }, + { + "Metadata": { + "path": "/api/rest/2.0/tags/{tag_identifier}/delete", + "operationId": "deleteTag", + "scenario": "positive", + "type": "AUTOMATIC", + "testId": 2588 + }, + "Path_Variables": { + "tag_identifier": "enim1688027229855" + }, + "Query_Variables": {}, + "Body": {} + }, + { + "Metadata": { + "path": "/api/rest/2.0/tags/{tag_identifier}/delete", + "operationId": "deleteTag", + "scenario": "positive", + "type": "AUTOMATIC", + "testId": 2589 + }, + "Path_Variables": { + "tag_identifier": "pede1688027229855" + }, + "Query_Variables": {}, + "Body": {} + }, + { + "Metadata": { + "path": "/api/rest/2.0/tags/{tag_identifier}/delete", + "operationId": "deleteTag", + "scenario": "positive", + "type": "AUTOMATIC", + "testId": 2590 + }, + "Path_Variables": { + "tag_identifier": "turpis1688027229856" + }, + "Query_Variables": {}, + "Body": {} + }, + { + "Metadata": { + "path": "/api/rest/2.0/tags/{tag_identifier}/delete", + "operationId": "deleteTag", + "scenario": "positive", + "type": "AUTOMATIC", + "testId": 2591 + }, + "Path_Variables": { + "tag_identifier": "gdries6" + }, + "Query_Variables": {}, + "Body": {} + }, + { + "Metadata": { + "path": "/api/rest/2.0/tags/{tag_identifier}/delete", + "operationId": "deleteTag", + "scenario": "positive", + "type": "AUTOMATIC", + "testId": 2592 + }, + "Path_Variables": { + "tag_identifier": "msollime7" + }, + "Query_Variables": {}, + "Body": {} + }, + { + "Metadata": { + "path": "/api/rest/2.0/tags/{tag_identifier}/delete", + "operationId": "deleteTag", + "scenario": "positive", + "type": "AUTOMATIC", + "testId": 2593 + }, + "Path_Variables": { + "tag_identifier": "mauris ullamcorper1688027229857" + }, + "Query_Variables": {}, + "Body": {} + }, + { + "Metadata": { + "path": "/api/rest/2.0/tags/{tag_identifier}/delete", + "operationId": "deleteTag", + "scenario": "positive", + "type": "AUTOMATIC", + "testId": 2594 + }, + "Path_Variables": { + "tag_identifier": "sskeat9" + }, + "Query_Variables": {}, + "Body": {} + }, + { + "Metadata": { + "path": "/api/rest/2.0/tags/{tag_identifier}/delete", + "operationId": "deleteTag", + "scenario": "positive", + "type": "AUTOMATIC", + "testId": 2595 + }, + "Path_Variables": { + "tag_identifier": "cdaymenta" + }, + "Query_Variables": {}, + "Body": {} + }, + { + "Metadata": { + "path": "/api/rest/2.0/tags/{tag_identifier}/delete", + "operationId": "deleteTag", + "scenario": "positive", + "type": "AUTOMATIC", + "testId": 2596 + }, + "Path_Variables": { + "tag_identifier": "cursus id1688027229858" + }, + "Query_Variables": {}, + "Body": {} + }, + { + "Metadata": { + "path": "/api/rest/2.0/tags/{tag_identifier}/delete", + "operationId": "deleteTag", + "scenario": "positive", + "type": "AUTOMATIC", + "testId": 2597 + }, + "Path_Variables": { + "tag_identifier": "rhoncus1688027229859" + }, + "Query_Variables": {}, + "Body": {} + }, + { + "Metadata": { + "path": "/api/rest/2.0/tags/{tag_identifier}/delete", + "operationId": "deleteTag", + "scenario": "positive", + "type": "AUTOMATIC", + "testId": 2598 + }, + "Path_Variables": { + "tag_identifier": "nulla1688027229859" + }, + "Query_Variables": {}, + "Body": {} + }, + { + "Metadata": { + "path": "/api/rest/2.0/tags/{tag_identifier}/delete", + "operationId": "deleteTag", + "scenario": "positive", + "type": "AUTOMATIC", + "testId": 2599 + }, + "Path_Variables": { + "tag_identifier": "neque1688027229860" + }, + "Query_Variables": {}, + "Body": {} + }, + { + "Metadata": { + "path": "/api/rest/2.0/tags/{tag_identifier}/delete", + "operationId": "deleteTag", + "scenario": "positive", + "type": "AUTOMATIC", + "testId": 2600 + }, + "Path_Variables": { + "tag_identifier": "oduetschensf" + }, + "Query_Variables": {}, + "Body": {} + }, + { + "Metadata": { + "path": "/api/rest/2.0/tags/{tag_identifier}/delete", + "operationId": "deleteTag", + "scenario": "positive", + "type": "AUTOMATIC", + "testId": 2601 + }, + "Path_Variables": { + "tag_identifier": "ut1688027229860" + }, + "Query_Variables": {}, + "Body": {} + }, + { + "Metadata": { + "path": "/api/rest/2.0/tags/{tag_identifier}/delete", + "operationId": "deleteTag", + "scenario": "positive", + "type": "AUTOMATIC", + "testId": 2602 + }, + "Path_Variables": { + "tag_identifier": "rmaccoughenh" + }, + "Query_Variables": {}, + "Body": {} + }, + { + "Metadata": { + "path": "/api/rest/2.0/tags/{tag_identifier}/delete", + "operationId": "deleteTag", + "scenario": "positive", + "type": "AUTOMATIC", + "testId": 2603 + }, + "Path_Variables": { + "tag_identifier": "morbi1688027229861" + }, + "Query_Variables": {}, + "Body": {} + }, + { + "Metadata": { + "path": "/api/rest/2.0/tags/{tag_identifier}/delete", + "operationId": "deleteTag", + "scenario": "positive", + "type": "AUTOMATIC", + "testId": 2604 + }, + "Path_Variables": { + "tag_identifier": "apaydonj" + }, + "Query_Variables": {}, + "Body": {} + }, + { + "Metadata": { + "path": "/api/rest/2.0/tags/{tag_identifier}/delete", + "operationId": "deleteTag", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 2605 + }, + "Path_Variables": { + "tag_identifier": null + }, + "Query_Variables": {}, + "Body": {} + }, + { + "Metadata": { + "path": "/api/rest/2.0/tags/{tag_identifier}/delete", + "operationId": "deleteTag", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 2606 + }, + "Path_Variables": { + "tag_identifier": null + }, + "Query_Variables": {}, + "Body": {} + }, + { + "Metadata": { + "path": "/api/rest/2.0/tags/{tag_identifier}/delete", + "operationId": "deleteTag", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 2607 + }, + "Path_Variables": { + "tag_identifier": null + }, + "Query_Variables": {}, + "Body": {} + }, + { + "Metadata": { + "path": "/api/rest/2.0/tags/{tag_identifier}/delete", + "operationId": "deleteTag", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 2608 + }, + "Path_Variables": { + "tag_identifier": null + }, + "Query_Variables": {}, + "Body": {} + }, + { + "Metadata": { + "path": "/api/rest/2.0/tags/{tag_identifier}/delete", + "operationId": "deleteTag", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 2609 + }, + "Path_Variables": { + "tag_identifier": null + }, + "Query_Variables": {}, + "Body": {} + }, + { + "Metadata": { + "path": "/api/rest/2.0/tags/{tag_identifier}/delete", + "operationId": "deleteTag", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 2610 + }, + "Path_Variables": { + "tag_identifier": null + }, + "Query_Variables": {}, + "Body": {} + }, + { + "Metadata": { + "path": "/api/rest/2.0/tags/{tag_identifier}/delete", + "operationId": "deleteTag", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 2611 + }, + "Path_Variables": { + "tag_identifier": null + }, + "Query_Variables": {}, + "Body": {} + }, + { + "Metadata": { + "path": "/api/rest/2.0/tags/{tag_identifier}/delete", + "operationId": "deleteTag", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 2612 + }, + "Path_Variables": { + "tag_identifier": null + }, + "Query_Variables": {}, + "Body": {} + }, + { + "Metadata": { + "path": "/api/rest/2.0/tags/{tag_identifier}/delete", + "operationId": "deleteTag", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 2613 + }, + "Path_Variables": { + "tag_identifier": null + }, + "Query_Variables": {}, + "Body": {} + }, + { + "Metadata": { + "path": "/api/rest/2.0/tags/{tag_identifier}/delete", + "operationId": "deleteTag", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 2614 + }, + "Path_Variables": { + "tag_identifier": null + }, + "Query_Variables": {}, + "Body": {} + }, + { + "Metadata": { + "path": "/api/rest/2.0/tags/{tag_identifier}/delete", + "operationId": "deleteTag", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 2615 + }, + "Path_Variables": { + "tag_identifier": null + }, + "Query_Variables": {}, + "Body": {} + }, + { + "Metadata": { + "path": "/api/rest/2.0/tags/{tag_identifier}/delete", + "operationId": "deleteTag", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 2616 + }, + "Path_Variables": { + "tag_identifier": null + }, + "Query_Variables": {}, + "Body": {} + }, + { + "Metadata": { + "path": "/api/rest/2.0/tags/{tag_identifier}/delete", + "operationId": "deleteTag", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 2617 + }, + "Path_Variables": { + "tag_identifier": null + }, + "Query_Variables": {}, + "Body": {} + }, + { + "Metadata": { + "path": "/api/rest/2.0/tags/{tag_identifier}/delete", + "operationId": "deleteTag", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 2618 + }, + "Path_Variables": { + "tag_identifier": null + }, + "Query_Variables": {}, + "Body": {} + }, + { + "Metadata": { + "path": "/api/rest/2.0/tags/{tag_identifier}/delete", + "operationId": "deleteTag", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 2619 + }, + "Path_Variables": { + "tag_identifier": null + }, + "Query_Variables": {}, + "Body": {} + }, + { + "Metadata": { + "path": "/api/rest/2.0/tags/{tag_identifier}/delete", + "operationId": "deleteTag", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 2620 + }, + "Path_Variables": { + "tag_identifier": [ + "cdaymenta" + ] + }, + "Query_Variables": {}, + "Body": {} + }, + { + "Metadata": { + "path": "/api/rest/2.0/tags/{tag_identifier}/delete", + "operationId": "deleteTag", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 2621 + }, + "Path_Variables": { + "tag_identifier": [ + "tristique1688027229854" + ] + }, + "Query_Variables": {}, + "Body": {} + }, + { + "Metadata": { + "path": "/api/rest/2.0/tags/{tag_identifier}/delete", + "operationId": "deleteTag", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 2622 + }, + "Path_Variables": { + "tag_identifier": [ + "ut1688027229860" + ] + }, + "Query_Variables": {}, + "Body": {} + }, + { + "Metadata": { + "path": "/api/rest/2.0/tags/{tag_identifier}/delete", + "operationId": "deleteTag", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 2623 + }, + "Path_Variables": { + "tag_identifier": [ + "ut1688027229860" + ] + }, + "Query_Variables": {}, + "Body": {} + }, + { + "Metadata": { + "path": "/api/rest/2.0/tags/{tag_identifier}/delete", + "operationId": "deleteTag", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 2624 + }, + "Path_Variables": { + "tag_identifier": [ + "enim1688027229855" + ] + }, + "Query_Variables": {}, + "Body": {} + }, + { + "Metadata": { + "path": "/api/rest/2.0/tags/{tag_identifier}/delete", + "operationId": "deleteTag", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 2625 + }, + "Path_Variables": { + "tag_identifier": [ + "nulla1688027229859" + ] + }, + "Query_Variables": {}, + "Body": {} + }, + { + "Metadata": { + "path": "/api/rest/2.0/tags/{tag_identifier}/delete", + "operationId": "deleteTag", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 2626 + }, + "Path_Variables": { + "tag_identifier": [ + "cdaymenta" + ] + }, + "Query_Variables": {}, + "Body": {} + }, + { + "Metadata": { + "path": "/api/rest/2.0/tags/{tag_identifier}/delete", + "operationId": "deleteTag", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 2627 + }, + "Path_Variables": { + "tag_identifier": [ + "mauris", + "ullamcorper1688027229857" + ] + }, + "Query_Variables": {}, + "Body": {} + }, + { + "Metadata": { + "path": "/api/rest/2.0/tags/{tag_identifier}/delete", + "operationId": "deleteTag", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 2628 + }, + "Path_Variables": { + "tag_identifier": [ + "turpis1688027229856" + ] + }, + "Query_Variables": {}, + "Body": {} + }, + { + "Metadata": { + "path": "/api/rest/2.0/tags/{tag_identifier}/delete", + "operationId": "deleteTag", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 2629 + }, + "Path_Variables": { + "tag_identifier": [ + "tristique1688027229854" + ] + }, + "Query_Variables": {}, + "Body": {} + }, + { + "Metadata": { + "path": "/api/rest/2.0/tags/{tag_identifier}/delete", + "operationId": "deleteTag", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 2630 + }, + "Path_Variables": { + "tag_identifier": [ + "rhoncus1688027229859" + ] + }, + "Query_Variables": {}, + "Body": {} + }, + { + "Metadata": { + "path": "/api/rest/2.0/tags/{tag_identifier}/delete", + "operationId": "deleteTag", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 2631 + }, + "Path_Variables": { + "tag_identifier": [ + "nulla1688027229859" + ] + }, + "Query_Variables": {}, + "Body": {} + }, + { + "Metadata": { + "path": "/api/rest/2.0/tags/{tag_identifier}/delete", + "operationId": "deleteTag", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 2632 + }, + "Path_Variables": { + "tag_identifier": [ + "morbi1688027229861" + ] + }, + "Query_Variables": {}, + "Body": {} + }, + { + "Metadata": { + "path": "/api/rest/2.0/tags/{tag_identifier}/delete", + "operationId": "deleteTag", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 2633 + }, + "Path_Variables": { + "tag_identifier": [ + "cursus", + "id1688027229858" + ] + }, + "Query_Variables": {}, + "Body": {} + }, + { + "Metadata": { + "path": "/api/rest/2.0/tags/{tag_identifier}/delete", + "operationId": "deleteTag", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 2634 + }, + "Path_Variables": { + "tag_identifier": [ + "tristique1688027229854" + ] + }, + "Query_Variables": {}, + "Body": {} + }, + { + "Metadata": { + "path": "/api/rest/2.0/tags/{tag_identifier}/delete", + "operationId": "deleteTag", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 2635 + }, + "Path_Variables": { + "tag_identifier": "ISKbYDIoWDYTmBd" + }, + "Query_Variables": {}, + "Body": {} + }, + { + "Metadata": { + "path": "/api/rest/2.0/tags/{tag_identifier}/delete", + "operationId": "deleteTag", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 2636 + }, + "Path_Variables": { + "tag_identifier": "IMnIstlesHesWSg" + }, + "Query_Variables": {}, + "Body": {} + }, + { + "Metadata": { + "path": "/api/rest/2.0/tags/{tag_identifier}/delete", + "operationId": "deleteTag", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 2637 + }, + "Path_Variables": { + "tag_identifier": "YNYmSJVwScovOJa" + }, + "Query_Variables": {}, + "Body": {} + }, + { + "Metadata": { + "path": "/api/rest/2.0/tags/{tag_identifier}/delete", + "operationId": "deleteTag", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 2638 + }, + "Path_Variables": { + "tag_identifier": "BPPNPJVNGXJZZns" + }, + "Query_Variables": {}, + "Body": {} + }, + { + "Metadata": { + "path": "/api/rest/2.0/tags/{tag_identifier}/delete", + "operationId": "deleteTag", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 2639 + }, + "Path_Variables": { + "tag_identifier": "mprBclICpfpIeWL" + }, + "Query_Variables": {}, + "Body": {} + }, + { + "Metadata": { + "path": "/api/rest/2.0/tags/{tag_identifier}/delete", + "operationId": "deleteTag", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 2640 + }, + "Path_Variables": { + "tag_identifier": "FbgdtdEeVgpElST" + }, + "Query_Variables": {}, + "Body": {} + }, + { + "Metadata": { + "path": "/api/rest/2.0/tags/{tag_identifier}/delete", + "operationId": "deleteTag", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 2641 + }, + "Path_Variables": { + "tag_identifier": "zdlIbQkDMDCgCgO" + }, + "Query_Variables": {}, + "Body": {} + }, + { + "Metadata": { + "path": "/api/rest/2.0/tags/{tag_identifier}/delete", + "operationId": "deleteTag", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 2642 + }, + "Path_Variables": { + "tag_identifier": "tOYVgqYjGzwIVUT" + }, + "Query_Variables": {}, + "Body": {} + }, + { + "Metadata": { + "path": "/api/rest/2.0/tags/{tag_identifier}/delete", + "operationId": "deleteTag", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 2643 + }, + "Path_Variables": { + "tag_identifier": "BrbraikchtIymck" + }, + "Query_Variables": {}, + "Body": {} + }, + { + "Metadata": { + "path": "/api/rest/2.0/tags/{tag_identifier}/delete", + "operationId": "deleteTag", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 2644 + }, + "Path_Variables": { + "tag_identifier": "vSbXLFDOozLYuqS" + }, + "Query_Variables": {}, + "Body": {} + }, + { + "Metadata": { + "path": "/api/rest/2.0/tags/{tag_identifier}/delete", + "operationId": "deleteTag", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 2645 + }, + "Path_Variables": { + "tag_identifier": "MkJWazpKgycBTVP" + }, + "Query_Variables": {}, + "Body": {} + }, + { + "Metadata": { + "path": "/api/rest/2.0/tags/{tag_identifier}/delete", + "operationId": "deleteTag", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 2646 + }, + "Path_Variables": { + "tag_identifier": "AdqbsWLQUpImfHh" + }, + "Query_Variables": {}, + "Body": {} + }, + { + "Metadata": { + "path": "/api/rest/2.0/tags/{tag_identifier}/delete", + "operationId": "deleteTag", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 2647 + }, + "Path_Variables": { + "tag_identifier": "ediVbCEAbhIrHlk" + }, + "Query_Variables": {}, + "Body": {} + }, + { + "Metadata": { + "path": "/api/rest/2.0/tags/{tag_identifier}/delete", + "operationId": "deleteTag", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 2648 + }, + "Path_Variables": { + "tag_identifier": "spzplkkTpnFOBcQ" + }, + "Query_Variables": {}, + "Body": {} + }, + { + "Metadata": { + "path": "/api/rest/2.0/tags/{tag_identifier}/delete", + "operationId": "deleteTag", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 2649 + }, + "Path_Variables": { + "tag_identifier": "DRhbUjCrDyddSjl" + }, + "Query_Variables": {}, + "Body": {} + }, + { + "Metadata": { + "path": "/api/rest/2.0/groups/{group_identifier}/delete", + "operationId": "deleteUserGroup", + "scenario": "positive", + "type": "AUTOMATIC", + "testId": 2650 + }, + "Path_Variables": { + "group_identifier": "Natassia Geertz1688027238969" + }, + "Query_Variables": {}, + "Body": {} + }, + { + "Metadata": { + "path": "/api/rest/2.0/groups/{group_identifier}/delete", + "operationId": "deleteUserGroup", + "scenario": "positive", + "type": "AUTOMATIC", + "testId": 2651 + }, + "Path_Variables": { + "group_identifier": "Danna Stopps1688027238995" + }, + "Query_Variables": {}, + "Body": {} + }, + { + "Metadata": { + "path": "/api/rest/2.0/groups/{group_identifier}/delete", + "operationId": "deleteUserGroup", + "scenario": "positive", + "type": "AUTOMATIC", + "testId": 2652 + }, + "Path_Variables": { + "group_identifier": "Shayne Tewnion1688027240686" + }, + "Query_Variables": {}, + "Body": {} + }, + { + "Metadata": { + "path": "/api/rest/2.0/groups/{group_identifier}/delete", + "operationId": "deleteUserGroup", + "scenario": "positive", + "type": "AUTOMATIC", + "testId": 2653 + }, + "Path_Variables": { + "group_identifier": "Owen Hindmoor1688027240689" + }, + "Query_Variables": {}, + "Body": {} + }, + { + "Metadata": { + "path": "/api/rest/2.0/groups/{group_identifier}/delete", + "operationId": "deleteUserGroup", + "scenario": "positive", + "type": "AUTOMATIC", + "testId": 2654 + }, + "Path_Variables": { + "group_identifier": "Edy Janowski1688027240691" + }, + "Query_Variables": {}, + "Body": {} + }, + { + "Metadata": { + "path": "/api/rest/2.0/groups/{group_identifier}/delete", + "operationId": "deleteUserGroup", + "scenario": "positive", + "type": "AUTOMATIC", + "testId": 2655 + }, + "Path_Variables": { + "group_identifier": "Tomi Lishmund1688027240693" + }, + "Query_Variables": {}, + "Body": {} + }, + { + "Metadata": { + "path": "/api/rest/2.0/groups/{group_identifier}/delete", + "operationId": "deleteUserGroup", + "scenario": "positive", + "type": "AUTOMATIC", + "testId": 2656 + }, + "Path_Variables": { + "group_identifier": "Rickard Sibbald1688027239010" + }, + "Query_Variables": {}, + "Body": {} + }, + { + "Metadata": { + "path": "/api/rest/2.0/groups/{group_identifier}/delete", + "operationId": "deleteUserGroup", + "scenario": "positive", + "type": "AUTOMATIC", + "testId": 2657 + }, + "Path_Variables": { + "group_identifier": "Bernette Curthoys1688027239012" + }, + "Query_Variables": {}, + "Body": {} + }, + { + "Metadata": { + "path": "/api/rest/2.0/groups/{group_identifier}/delete", + "operationId": "deleteUserGroup", + "scenario": "positive", + "type": "AUTOMATIC", + "testId": 2658 + }, + "Path_Variables": { + "group_identifier": "Warden Pelz1688027239013" + }, + "Query_Variables": {}, + "Body": {} + }, + { + "Metadata": { + "path": "/api/rest/2.0/groups/{group_identifier}/delete", + "operationId": "deleteUserGroup", + "scenario": "positive", + "type": "AUTOMATIC", + "testId": 2659 + }, + "Path_Variables": { + "group_identifier": "Hansiain Capoun1688027239015" + }, + "Query_Variables": {}, + "Body": {} + }, + { + "Metadata": { + "path": "/api/rest/2.0/groups/{group_identifier}/delete", + "operationId": "deleteUserGroup", + "scenario": "positive", + "type": "AUTOMATIC", + "testId": 2660 + }, + "Path_Variables": { + "group_identifier": "Sacha Piffe1688027239017" + }, + "Query_Variables": {}, + "Body": {} + }, + { + "Metadata": { + "path": "/api/rest/2.0/groups/{group_identifier}/delete", + "operationId": "deleteUserGroup", + "scenario": "positive", + "type": "AUTOMATIC", + "testId": 2661 + }, + "Path_Variables": { + "group_identifier": "Caritta Joisce1688027240706" + }, + "Query_Variables": {}, + "Body": {} + }, + { + "Metadata": { + "path": "/api/rest/2.0/groups/{group_identifier}/delete", + "operationId": "deleteUserGroup", + "scenario": "positive", + "type": "AUTOMATIC", + "testId": 2662 + }, + "Path_Variables": { + "group_identifier": "Hazel Sturdy1688027240709" + }, + "Query_Variables": {}, + "Body": {} + }, + { + "Metadata": { + "path": "/api/rest/2.0/groups/{group_identifier}/delete", + "operationId": "deleteUserGroup", + "scenario": "positive", + "type": "AUTOMATIC", + "testId": 2663 + }, + "Path_Variables": { + "group_identifier": "Linnie Schult1688027240710" + }, + "Query_Variables": {}, + "Body": {} + }, + { + "Metadata": { + "path": "/api/rest/2.0/groups/{group_identifier}/delete", + "operationId": "deleteUserGroup", + "scenario": "positive", + "type": "AUTOMATIC", + "testId": 2664 + }, + "Path_Variables": { + "group_identifier": "Lilyan Ongin1688027239024" + }, + "Query_Variables": {}, + "Body": {} + }, + { + "Metadata": { + "path": "/api/rest/2.0/groups/{group_identifier}/delete", + "operationId": "deleteUserGroup", + "scenario": "positive", + "type": "AUTOMATIC", + "testId": 2665 + }, + "Path_Variables": { + "group_identifier": "Filmer Ridesdale1688027239026" + }, + "Query_Variables": {}, + "Body": {} + }, + { + "Metadata": { + "path": "/api/rest/2.0/groups/{group_identifier}/delete", + "operationId": "deleteUserGroup", + "scenario": "positive", + "type": "AUTOMATIC", + "testId": 2666 + }, + "Path_Variables": { + "group_identifier": "Dorella Beagen1688027240717" + }, + "Query_Variables": {}, + "Body": {} + }, + { + "Metadata": { + "path": "/api/rest/2.0/groups/{group_identifier}/delete", + "operationId": "deleteUserGroup", + "scenario": "positive", + "type": "AUTOMATIC", + "testId": 2667 + }, + "Path_Variables": { + "group_identifier": "Granthem Marcam1688027240719" + }, + "Query_Variables": {}, + "Body": {} + }, + { + "Metadata": { + "path": "/api/rest/2.0/groups/{group_identifier}/delete", + "operationId": "deleteUserGroup", + "scenario": "positive", + "type": "AUTOMATIC", + "testId": 2668 + }, + "Path_Variables": { + "group_identifier": "Gabe Delyth1688027240721" + }, + "Query_Variables": {}, + "Body": {} + }, + { + "Metadata": { + "path": "/api/rest/2.0/groups/{group_identifier}/delete", + "operationId": "deleteUserGroup", + "scenario": "positive", + "type": "AUTOMATIC", + "testId": 2669 + }, + "Path_Variables": { + "group_identifier": "Justinian Franey1688027240723" + }, + "Query_Variables": {}, + "Body": {} + }, + { + "Metadata": { + "path": "/api/rest/2.0/groups/{group_identifier}/delete", + "operationId": "deleteUserGroup", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 2670 + }, + "Path_Variables": { + "group_identifier": null + }, + "Query_Variables": {}, + "Body": {} + }, + { + "Metadata": { + "path": "/api/rest/2.0/groups/{group_identifier}/delete", + "operationId": "deleteUserGroup", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 2671 + }, + "Path_Variables": { + "group_identifier": null + }, + "Query_Variables": {}, + "Body": {} + }, + { + "Metadata": { + "path": "/api/rest/2.0/groups/{group_identifier}/delete", + "operationId": "deleteUserGroup", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 2672 + }, + "Path_Variables": { + "group_identifier": null + }, + "Query_Variables": {}, + "Body": {} + }, + { + "Metadata": { + "path": "/api/rest/2.0/groups/{group_identifier}/delete", + "operationId": "deleteUserGroup", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 2673 + }, + "Path_Variables": { + "group_identifier": null + }, + "Query_Variables": {}, + "Body": {} + }, + { + "Metadata": { + "path": "/api/rest/2.0/groups/{group_identifier}/delete", + "operationId": "deleteUserGroup", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 2674 + }, + "Path_Variables": { + "group_identifier": null + }, + "Query_Variables": {}, + "Body": {} + }, + { + "Metadata": { + "path": "/api/rest/2.0/groups/{group_identifier}/delete", + "operationId": "deleteUserGroup", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 2675 + }, + "Path_Variables": { + "group_identifier": null + }, + "Query_Variables": {}, + "Body": {} + }, + { + "Metadata": { + "path": "/api/rest/2.0/groups/{group_identifier}/delete", + "operationId": "deleteUserGroup", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 2676 + }, + "Path_Variables": { + "group_identifier": null + }, + "Query_Variables": {}, + "Body": {} + }, + { + "Metadata": { + "path": "/api/rest/2.0/groups/{group_identifier}/delete", + "operationId": "deleteUserGroup", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 2677 + }, + "Path_Variables": { + "group_identifier": null + }, + "Query_Variables": {}, + "Body": {} + }, + { + "Metadata": { + "path": "/api/rest/2.0/groups/{group_identifier}/delete", + "operationId": "deleteUserGroup", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 2678 + }, + "Path_Variables": { + "group_identifier": null + }, + "Query_Variables": {}, + "Body": {} + }, + { + "Metadata": { + "path": "/api/rest/2.0/groups/{group_identifier}/delete", + "operationId": "deleteUserGroup", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 2679 + }, + "Path_Variables": { + "group_identifier": null + }, + "Query_Variables": {}, + "Body": {} + }, + { + "Metadata": { + "path": "/api/rest/2.0/groups/{group_identifier}/delete", + "operationId": "deleteUserGroup", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 2680 + }, + "Path_Variables": { + "group_identifier": null + }, + "Query_Variables": {}, + "Body": {} + }, + { + "Metadata": { + "path": "/api/rest/2.0/groups/{group_identifier}/delete", + "operationId": "deleteUserGroup", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 2681 + }, + "Path_Variables": { + "group_identifier": null + }, + "Query_Variables": {}, + "Body": {} + }, + { + "Metadata": { + "path": "/api/rest/2.0/groups/{group_identifier}/delete", + "operationId": "deleteUserGroup", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 2682 + }, + "Path_Variables": { + "group_identifier": null + }, + "Query_Variables": {}, + "Body": {} + }, + { + "Metadata": { + "path": "/api/rest/2.0/groups/{group_identifier}/delete", + "operationId": "deleteUserGroup", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 2683 + }, + "Path_Variables": { + "group_identifier": null + }, + "Query_Variables": {}, + "Body": {} + }, + { + "Metadata": { + "path": "/api/rest/2.0/groups/{group_identifier}/delete", + "operationId": "deleteUserGroup", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 2684 + }, + "Path_Variables": { + "group_identifier": null + }, + "Query_Variables": {}, + "Body": {} + }, + { + "Metadata": { + "path": "/api/rest/2.0/groups/{group_identifier}/delete", + "operationId": "deleteUserGroup", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 2685 + }, + "Path_Variables": { + "group_identifier": [ + "Gabe", + "Delyth1688027240721" + ] + }, + "Query_Variables": {}, + "Body": {} + }, + { + "Metadata": { + "path": "/api/rest/2.0/groups/{group_identifier}/delete", + "operationId": "deleteUserGroup", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 2686 + }, + "Path_Variables": { + "group_identifier": [ + "Hazel", + "Sturdy1688027240709" + ] + }, + "Query_Variables": {}, + "Body": {} + }, + { + "Metadata": { + "path": "/api/rest/2.0/groups/{group_identifier}/delete", + "operationId": "deleteUserGroup", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 2687 + }, + "Path_Variables": { + "group_identifier": [ + "Lilyan", + "Ongin1688027239024" + ] + }, + "Query_Variables": {}, + "Body": {} + }, + { + "Metadata": { + "path": "/api/rest/2.0/groups/{group_identifier}/delete", + "operationId": "deleteUserGroup", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 2688 + }, + "Path_Variables": { + "group_identifier": [ + "Natassia", + "Geertz1688027238969" + ] + }, + "Query_Variables": {}, + "Body": {} + }, + { + "Metadata": { + "path": "/api/rest/2.0/groups/{group_identifier}/delete", + "operationId": "deleteUserGroup", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 2689 + }, + "Path_Variables": { + "group_identifier": [ + "Justinian", + "Franey1688027240723" + ] + }, + "Query_Variables": {}, + "Body": {} + }, + { + "Metadata": { + "path": "/api/rest/2.0/groups/{group_identifier}/delete", + "operationId": "deleteUserGroup", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 2690 + }, + "Path_Variables": { + "group_identifier": [ + "Caritta", + "Joisce1688027240706" + ] + }, + "Query_Variables": {}, + "Body": {} + }, + { + "Metadata": { + "path": "/api/rest/2.0/groups/{group_identifier}/delete", + "operationId": "deleteUserGroup", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 2691 + }, + "Path_Variables": { + "group_identifier": [ + "Lilyan", + "Ongin1688027239024" + ] + }, + "Query_Variables": {}, + "Body": {} + }, + { + "Metadata": { + "path": "/api/rest/2.0/groups/{group_identifier}/delete", + "operationId": "deleteUserGroup", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 2692 + }, + "Path_Variables": { + "group_identifier": [ + "Dorella", + "Beagen1688027240717" + ] + }, + "Query_Variables": {}, + "Body": {} + }, + { + "Metadata": { + "path": "/api/rest/2.0/groups/{group_identifier}/delete", + "operationId": "deleteUserGroup", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 2693 + }, + "Path_Variables": { + "group_identifier": [ + "Lilyan", + "Ongin1688027239024" + ] + }, + "Query_Variables": {}, + "Body": {} + }, + { + "Metadata": { + "path": "/api/rest/2.0/groups/{group_identifier}/delete", + "operationId": "deleteUserGroup", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 2694 + }, + "Path_Variables": { + "group_identifier": [ + "Rickard", + "Sibbald1688027239010" + ] + }, + "Query_Variables": {}, + "Body": {} + }, + { + "Metadata": { + "path": "/api/rest/2.0/groups/{group_identifier}/delete", + "operationId": "deleteUserGroup", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 2695 + }, + "Path_Variables": { + "group_identifier": [ + "Granthem", + "Marcam1688027240719" + ] + }, + "Query_Variables": {}, + "Body": {} + }, + { + "Metadata": { + "path": "/api/rest/2.0/groups/{group_identifier}/delete", + "operationId": "deleteUserGroup", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 2696 + }, + "Path_Variables": { + "group_identifier": [ + "Sacha", + "Piffe1688027239017" + ] + }, + "Query_Variables": {}, + "Body": {} + }, + { + "Metadata": { + "path": "/api/rest/2.0/groups/{group_identifier}/delete", + "operationId": "deleteUserGroup", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 2697 + }, + "Path_Variables": { + "group_identifier": [ + "Hansiain", + "Capoun1688027239015" + ] + }, + "Query_Variables": {}, + "Body": {} + }, + { + "Metadata": { + "path": "/api/rest/2.0/groups/{group_identifier}/delete", + "operationId": "deleteUserGroup", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 2698 + }, + "Path_Variables": { + "group_identifier": [ + "Warden", + "Pelz1688027239013" + ] + }, + "Query_Variables": {}, + "Body": {} + }, + { + "Metadata": { + "path": "/api/rest/2.0/groups/{group_identifier}/delete", + "operationId": "deleteUserGroup", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 2699 + }, + "Path_Variables": { + "group_identifier": [ + "Rickard", + "Sibbald1688027239010" + ] + }, + "Query_Variables": {}, + "Body": {} + }, + { + "Metadata": { + "path": "/api/rest/2.0/groups/{group_identifier}/delete", + "operationId": "deleteUserGroup", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 2700 + }, + "Path_Variables": { + "group_identifier": "QWqgnXHEMuBkSyx" + }, + "Query_Variables": {}, + "Body": {} + }, + { + "Metadata": { + "path": "/api/rest/2.0/groups/{group_identifier}/delete", + "operationId": "deleteUserGroup", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 2701 + }, + "Path_Variables": { + "group_identifier": "UEDLhovQfbZvCuV" + }, + "Query_Variables": {}, + "Body": {} + }, + { + "Metadata": { + "path": "/api/rest/2.0/groups/{group_identifier}/delete", + "operationId": "deleteUserGroup", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 2702 + }, + "Path_Variables": { + "group_identifier": "UvHLCzmtosnjbgQ" + }, + "Query_Variables": {}, + "Body": {} + }, + { + "Metadata": { + "path": "/api/rest/2.0/groups/{group_identifier}/delete", + "operationId": "deleteUserGroup", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 2703 + }, + "Path_Variables": { + "group_identifier": "yZBBxiyAizabEhT" + }, + "Query_Variables": {}, + "Body": {} + }, + { + "Metadata": { + "path": "/api/rest/2.0/groups/{group_identifier}/delete", + "operationId": "deleteUserGroup", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 2704 + }, + "Path_Variables": { + "group_identifier": "GygbFztTONdJSKf" + }, + "Query_Variables": {}, + "Body": {} + }, + { + "Metadata": { + "path": "/api/rest/2.0/groups/{group_identifier}/delete", + "operationId": "deleteUserGroup", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 2705 + }, + "Path_Variables": { + "group_identifier": "bUbiyDceemprXgT" + }, + "Query_Variables": {}, + "Body": {} + }, + { + "Metadata": { + "path": "/api/rest/2.0/groups/{group_identifier}/delete", + "operationId": "deleteUserGroup", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 2706 + }, + "Path_Variables": { + "group_identifier": "JfFBWFYYqFRVaZI" + }, + "Query_Variables": {}, + "Body": {} + }, + { + "Metadata": { + "path": "/api/rest/2.0/groups/{group_identifier}/delete", + "operationId": "deleteUserGroup", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 2707 + }, + "Path_Variables": { + "group_identifier": "PcwCrQaTqfsmjMP" + }, + "Query_Variables": {}, + "Body": {} + }, + { + "Metadata": { + "path": "/api/rest/2.0/groups/{group_identifier}/delete", + "operationId": "deleteUserGroup", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 2708 + }, + "Path_Variables": { + "group_identifier": "XWwFIcRhvfuzkZD" + }, + "Query_Variables": {}, + "Body": {} + }, + { + "Metadata": { + "path": "/api/rest/2.0/groups/{group_identifier}/delete", + "operationId": "deleteUserGroup", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 2709 + }, + "Path_Variables": { + "group_identifier": "YslAweNYduNTDjM" + }, + "Query_Variables": {}, + "Body": {} + }, + { + "Metadata": { + "path": "/api/rest/2.0/groups/{group_identifier}/delete", + "operationId": "deleteUserGroup", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 2710 + }, + "Path_Variables": { + "group_identifier": "EhhFDttrHUUZKFE" + }, + "Query_Variables": {}, + "Body": {} + }, + { + "Metadata": { + "path": "/api/rest/2.0/groups/{group_identifier}/delete", + "operationId": "deleteUserGroup", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 2711 + }, + "Path_Variables": { + "group_identifier": "NjxkbgqYVrzhzTn" + }, + "Query_Variables": {}, + "Body": {} + }, + { + "Metadata": { + "path": "/api/rest/2.0/groups/{group_identifier}/delete", + "operationId": "deleteUserGroup", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 2712 + }, + "Path_Variables": { + "group_identifier": "qMLRItuyHjuCKGC" + }, + "Query_Variables": {}, + "Body": {} + }, + { + "Metadata": { + "path": "/api/rest/2.0/groups/{group_identifier}/delete", + "operationId": "deleteUserGroup", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 2713 + }, + "Path_Variables": { + "group_identifier": "twJJDtEwfLoLMvY" + }, + "Query_Variables": {}, + "Body": {} + }, + { + "Metadata": { + "path": "/api/rest/2.0/groups/{group_identifier}/delete", + "operationId": "deleteUserGroup", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 2714 + }, + "Path_Variables": { + "group_identifier": "NOmgsrNtAuiHejV" + }, + "Query_Variables": {}, + "Body": {} + }, + { + "Metadata": { + "path": "/api/rest/2.0/roles/{role_identifier}/delete", + "operationId": "deleteRole", + "scenario": "positive", + "type": "AUTOMATIC", + "testId": 2715 + }, + "Path_Variables": { + "role_identifier": "Synchronised1688027298048" + }, + "Query_Variables": {}, + "Body": {} + }, + { + "Metadata": { + "path": "/api/rest/2.0/roles/{role_identifier}/delete", + "operationId": "deleteRole", + "scenario": "positive", + "type": "AUTOMATIC", + "testId": 2716 + }, + "Path_Variables": { + "role_identifier": "info-mediaries1688027298055" + }, + "Query_Variables": {}, + "Body": {} + }, + { + "Metadata": { + "path": "/api/rest/2.0/roles/{role_identifier}/delete", + "operationId": "deleteRole", + "scenario": "positive", + "type": "AUTOMATIC", + "testId": 2717 + }, + "Path_Variables": { + "role_identifier": "Robust1688027298057" + }, + "Query_Variables": {}, + "Body": {} + }, + { + "Metadata": { + "path": "/api/rest/2.0/roles/{role_identifier}/delete", + "operationId": "deleteRole", + "scenario": "positive", + "type": "AUTOMATIC", + "testId": 2718 + }, + "Path_Variables": { + "role_identifier": "Automated1688027298059" + }, + "Query_Variables": {}, + "Body": {} + }, + { + "Metadata": { + "path": "/api/rest/2.0/roles/{role_identifier}/delete", + "operationId": "deleteRole", + "scenario": "positive", + "type": "AUTOMATIC", + "testId": 2719 + }, + "Path_Variables": { + "role_identifier": "capacity1688027298060" + }, + "Query_Variables": {}, + "Body": {} + }, + { + "Metadata": { + "path": "/api/rest/2.0/roles/{role_identifier}/delete", + "operationId": "deleteRole", + "scenario": "positive", + "type": "AUTOMATIC", + "testId": 2720 + }, + "Path_Variables": { + "role_identifier": "portal1688027298061" + }, + "Query_Variables": {}, + "Body": {} + }, + { + "Metadata": { + "path": "/api/rest/2.0/roles/{role_identifier}/delete", + "operationId": "deleteRole", + "scenario": "positive", + "type": "AUTOMATIC", + "testId": 2721 + }, + "Path_Variables": { + "role_identifier": "Programmable1688027298062" + }, + "Query_Variables": {}, + "Body": {} + }, + { + "Metadata": { + "path": "/api/rest/2.0/roles/{role_identifier}/delete", + "operationId": "deleteRole", + "scenario": "positive", + "type": "AUTOMATIC", + "testId": 2722 + }, + "Path_Variables": { + "role_identifier": "Cross-group1688027298063" + }, + "Query_Variables": {}, + "Body": {} + }, + { + "Metadata": { + "path": "/api/rest/2.0/roles/{role_identifier}/delete", + "operationId": "deleteRole", + "scenario": "positive", + "type": "AUTOMATIC", + "testId": 2723 + }, + "Path_Variables": { + "role_identifier": "Operative1688027298065" + }, + "Query_Variables": {}, + "Body": {} + }, + { + "Metadata": { + "path": "/api/rest/2.0/roles/{role_identifier}/delete", + "operationId": "deleteRole", + "scenario": "positive", + "type": "AUTOMATIC", + "testId": 2724 + }, + "Path_Variables": { + "role_identifier": "client-server1688027298066" + }, + "Query_Variables": {}, + "Body": {} + }, + { + "Metadata": { + "path": "/api/rest/2.0/roles/{role_identifier}/delete", + "operationId": "deleteRole", + "scenario": "positive", + "type": "AUTOMATIC", + "testId": 2725 + }, + "Path_Variables": { + "role_identifier": "archive1688027298067" + }, + "Query_Variables": {}, + "Body": {} + }, + { + "Metadata": { + "path": "/api/rest/2.0/roles/{role_identifier}/delete", + "operationId": "deleteRole", + "scenario": "positive", + "type": "AUTOMATIC", + "testId": 2726 + }, + "Path_Variables": { + "role_identifier": "Intuitive1688027298068" + }, + "Query_Variables": {}, + "Body": {} + }, + { + "Metadata": { + "path": "/api/rest/2.0/roles/{role_identifier}/delete", + "operationId": "deleteRole", + "scenario": "positive", + "type": "AUTOMATIC", + "testId": 2727 + }, + "Path_Variables": { + "role_identifier": "analyzing1688027298069" + }, + "Query_Variables": {}, + "Body": {} + }, + { + "Metadata": { + "path": "/api/rest/2.0/roles/{role_identifier}/delete", + "operationId": "deleteRole", + "scenario": "positive", + "type": "AUTOMATIC", + "testId": 2728 + }, + "Path_Variables": { + "role_identifier": "Reactive1688027298071" + }, + "Query_Variables": {}, + "Body": {} + }, + { + "Metadata": { + "path": "/api/rest/2.0/roles/{role_identifier}/delete", + "operationId": "deleteRole", + "scenario": "positive", + "type": "AUTOMATIC", + "testId": 2729 + }, + "Path_Variables": { + "role_identifier": "directional1688027298071" + }, + "Query_Variables": {}, + "Body": {} + }, + { + "Metadata": { + "path": "/api/rest/2.0/roles/{role_identifier}/delete", + "operationId": "deleteRole", + "scenario": "positive", + "type": "AUTOMATIC", + "testId": 2730 + }, + "Path_Variables": { + "role_identifier": "matrices1688027298072" + }, + "Query_Variables": {}, + "Body": {} + }, + { + "Metadata": { + "path": "/api/rest/2.0/roles/{role_identifier}/delete", + "operationId": "deleteRole", + "scenario": "positive", + "type": "AUTOMATIC", + "testId": 2731 + }, + "Path_Variables": { + "role_identifier": "mobile1688027298073" + }, + "Query_Variables": {}, + "Body": {} + }, + { + "Metadata": { + "path": "/api/rest/2.0/roles/{role_identifier}/delete", + "operationId": "deleteRole", + "scenario": "positive", + "type": "AUTOMATIC", + "testId": 2732 + }, + "Path_Variables": { + "role_identifier": "Object-based1688027298074" + }, + "Query_Variables": {}, + "Body": {} + }, + { + "Metadata": { + "path": "/api/rest/2.0/roles/{role_identifier}/delete", + "operationId": "deleteRole", + "scenario": "positive", + "type": "AUTOMATIC", + "testId": 2733 + }, + "Path_Variables": { + "role_identifier": "Expanded1688027298074" + }, + "Query_Variables": {}, + "Body": {} + }, + { + "Metadata": { + "path": "/api/rest/2.0/roles/{role_identifier}/delete", + "operationId": "deleteRole", + "scenario": "positive", + "type": "AUTOMATIC", + "testId": 2734 + }, + "Path_Variables": { + "role_identifier": "encryption1688027298075" + }, + "Query_Variables": {}, + "Body": {} + }, + { + "Metadata": { + "path": "/api/rest/2.0/roles/{role_identifier}/delete", + "operationId": "deleteRole", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 2735 + }, + "Path_Variables": { + "role_identifier": null + }, + "Query_Variables": {}, + "Body": {} + }, + { + "Metadata": { + "path": "/api/rest/2.0/roles/{role_identifier}/delete", + "operationId": "deleteRole", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 2736 + }, + "Path_Variables": { + "role_identifier": null + }, + "Query_Variables": {}, + "Body": {} + }, + { + "Metadata": { + "path": "/api/rest/2.0/roles/{role_identifier}/delete", + "operationId": "deleteRole", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 2737 + }, + "Path_Variables": { + "role_identifier": null + }, + "Query_Variables": {}, + "Body": {} + }, + { + "Metadata": { + "path": "/api/rest/2.0/roles/{role_identifier}/delete", + "operationId": "deleteRole", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 2738 + }, + "Path_Variables": { + "role_identifier": null + }, + "Query_Variables": {}, + "Body": {} + }, + { + "Metadata": { + "path": "/api/rest/2.0/roles/{role_identifier}/delete", + "operationId": "deleteRole", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 2739 + }, + "Path_Variables": { + "role_identifier": null + }, + "Query_Variables": {}, + "Body": {} + }, + { + "Metadata": { + "path": "/api/rest/2.0/roles/{role_identifier}/delete", + "operationId": "deleteRole", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 2740 + }, + "Path_Variables": { + "role_identifier": null + }, + "Query_Variables": {}, + "Body": {} + }, + { + "Metadata": { + "path": "/api/rest/2.0/roles/{role_identifier}/delete", + "operationId": "deleteRole", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 2741 + }, + "Path_Variables": { + "role_identifier": null + }, + "Query_Variables": {}, + "Body": {} + }, + { + "Metadata": { + "path": "/api/rest/2.0/roles/{role_identifier}/delete", + "operationId": "deleteRole", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 2742 + }, + "Path_Variables": { + "role_identifier": null + }, + "Query_Variables": {}, + "Body": {} + }, + { + "Metadata": { + "path": "/api/rest/2.0/roles/{role_identifier}/delete", + "operationId": "deleteRole", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 2743 + }, + "Path_Variables": { + "role_identifier": null + }, + "Query_Variables": {}, + "Body": {} + }, + { + "Metadata": { + "path": "/api/rest/2.0/roles/{role_identifier}/delete", + "operationId": "deleteRole", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 2744 + }, + "Path_Variables": { + "role_identifier": null + }, + "Query_Variables": {}, + "Body": {} + }, + { + "Metadata": { + "path": "/api/rest/2.0/roles/{role_identifier}/delete", + "operationId": "deleteRole", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 2745 + }, + "Path_Variables": { + "role_identifier": null + }, + "Query_Variables": {}, + "Body": {} + }, + { + "Metadata": { + "path": "/api/rest/2.0/roles/{role_identifier}/delete", + "operationId": "deleteRole", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 2746 + }, + "Path_Variables": { + "role_identifier": null + }, + "Query_Variables": {}, + "Body": {} + }, + { + "Metadata": { + "path": "/api/rest/2.0/roles/{role_identifier}/delete", + "operationId": "deleteRole", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 2747 + }, + "Path_Variables": { + "role_identifier": null + }, + "Query_Variables": {}, + "Body": {} + }, + { + "Metadata": { + "path": "/api/rest/2.0/roles/{role_identifier}/delete", + "operationId": "deleteRole", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 2748 + }, + "Path_Variables": { + "role_identifier": null + }, + "Query_Variables": {}, + "Body": {} + }, + { + "Metadata": { + "path": "/api/rest/2.0/roles/{role_identifier}/delete", + "operationId": "deleteRole", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 2749 + }, + "Path_Variables": { + "role_identifier": null + }, + "Query_Variables": {}, + "Body": {} + }, + { + "Metadata": { + "path": "/api/rest/2.0/roles/{role_identifier}/delete", + "operationId": "deleteRole", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 2750 + }, + "Path_Variables": { + "role_identifier": [ + "analyzing1688027298069" + ] + }, + "Query_Variables": {}, + "Body": {} + }, + { + "Metadata": { + "path": "/api/rest/2.0/roles/{role_identifier}/delete", + "operationId": "deleteRole", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 2751 + }, + "Path_Variables": { + "role_identifier": [ + "encryption1688027298075" + ] + }, + "Query_Variables": {}, + "Body": {} + }, + { + "Metadata": { + "path": "/api/rest/2.0/roles/{role_identifier}/delete", + "operationId": "deleteRole", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 2752 + }, + "Path_Variables": { + "role_identifier": [ + "info-mediaries1688027298055" + ] + }, + "Query_Variables": {}, + "Body": {} + }, + { + "Metadata": { + "path": "/api/rest/2.0/roles/{role_identifier}/delete", + "operationId": "deleteRole", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 2753 + }, + "Path_Variables": { + "role_identifier": [ + "info-mediaries1688027298055" + ] + }, + "Query_Variables": {}, + "Body": {} + }, + { + "Metadata": { + "path": "/api/rest/2.0/roles/{role_identifier}/delete", + "operationId": "deleteRole", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 2754 + }, + "Path_Variables": { + "role_identifier": [ + "capacity1688027298060" + ] + }, + "Query_Variables": {}, + "Body": {} + }, + { + "Metadata": { + "path": "/api/rest/2.0/roles/{role_identifier}/delete", + "operationId": "deleteRole", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 2755 + }, + "Path_Variables": { + "role_identifier": [ + "client-server1688027298066" + ] + }, + "Query_Variables": {}, + "Body": {} + }, + { + "Metadata": { + "path": "/api/rest/2.0/roles/{role_identifier}/delete", + "operationId": "deleteRole", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 2756 + }, + "Path_Variables": { + "role_identifier": [ + "matrices1688027298072" + ] + }, + "Query_Variables": {}, + "Body": {} + }, + { + "Metadata": { + "path": "/api/rest/2.0/roles/{role_identifier}/delete", + "operationId": "deleteRole", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 2757 + }, + "Path_Variables": { + "role_identifier": [ + "Object-based1688027298074" + ] + }, + "Query_Variables": {}, + "Body": {} + }, + { + "Metadata": { + "path": "/api/rest/2.0/roles/{role_identifier}/delete", + "operationId": "deleteRole", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 2758 + }, + "Path_Variables": { + "role_identifier": [ + "Programmable1688027298062" + ] + }, + "Query_Variables": {}, + "Body": {} + }, + { + "Metadata": { + "path": "/api/rest/2.0/roles/{role_identifier}/delete", + "operationId": "deleteRole", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 2759 + }, + "Path_Variables": { + "role_identifier": [ + "Intuitive1688027298068" + ] + }, + "Query_Variables": {}, + "Body": {} + }, + { + "Metadata": { + "path": "/api/rest/2.0/roles/{role_identifier}/delete", + "operationId": "deleteRole", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 2760 + }, + "Path_Variables": { + "role_identifier": [ + "Operative1688027298065" + ] + }, + "Query_Variables": {}, + "Body": {} + }, + { + "Metadata": { + "path": "/api/rest/2.0/roles/{role_identifier}/delete", + "operationId": "deleteRole", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 2761 + }, + "Path_Variables": { + "role_identifier": [ + "Robust1688027298057" + ] + }, + "Query_Variables": {}, + "Body": {} + }, + { + "Metadata": { + "path": "/api/rest/2.0/roles/{role_identifier}/delete", + "operationId": "deleteRole", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 2762 + }, + "Path_Variables": { + "role_identifier": [ + "Object-based1688027298074" + ] + }, + "Query_Variables": {}, + "Body": {} + }, + { + "Metadata": { + "path": "/api/rest/2.0/roles/{role_identifier}/delete", + "operationId": "deleteRole", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 2763 + }, + "Path_Variables": { + "role_identifier": [ + "Expanded1688027298074" + ] + }, + "Query_Variables": {}, + "Body": {} + }, + { + "Metadata": { + "path": "/api/rest/2.0/roles/{role_identifier}/delete", + "operationId": "deleteRole", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 2764 + }, + "Path_Variables": { + "role_identifier": [ + "Robust1688027298057" + ] + }, + "Query_Variables": {}, + "Body": {} + }, + { + "Metadata": { + "path": "/api/rest/2.0/roles/{role_identifier}/delete", + "operationId": "deleteRole", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 2765 + }, + "Path_Variables": { + "role_identifier": "QmGPXYWpCiEBmyW" + }, + "Query_Variables": {}, + "Body": {} + }, + { + "Metadata": { + "path": "/api/rest/2.0/roles/{role_identifier}/delete", + "operationId": "deleteRole", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 2766 + }, + "Path_Variables": { + "role_identifier": "UpIXHYlxBcZKcID" + }, + "Query_Variables": {}, + "Body": {} + }, + { + "Metadata": { + "path": "/api/rest/2.0/roles/{role_identifier}/delete", + "operationId": "deleteRole", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 2767 + }, + "Path_Variables": { + "role_identifier": "YjmXlHVuzESnqXA" + }, + "Query_Variables": {}, + "Body": {} + }, + { + "Metadata": { + "path": "/api/rest/2.0/roles/{role_identifier}/delete", + "operationId": "deleteRole", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 2768 + }, + "Path_Variables": { + "role_identifier": "kZRRsvzahixiWVG" + }, + "Query_Variables": {}, + "Body": {} + }, + { + "Metadata": { + "path": "/api/rest/2.0/roles/{role_identifier}/delete", + "operationId": "deleteRole", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 2769 + }, + "Path_Variables": { + "role_identifier": "jSswBSjNQiLoaXX" + }, + "Query_Variables": {}, + "Body": {} + }, + { + "Metadata": { + "path": "/api/rest/2.0/roles/{role_identifier}/delete", + "operationId": "deleteRole", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 2770 + }, + "Path_Variables": { + "role_identifier": "odUFDMoaqfkocZb" + }, + "Query_Variables": {}, + "Body": {} + }, + { + "Metadata": { + "path": "/api/rest/2.0/roles/{role_identifier}/delete", + "operationId": "deleteRole", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 2771 + }, + "Path_Variables": { + "role_identifier": "dxUENJCQnvEmROy" + }, + "Query_Variables": {}, + "Body": {} + }, + { + "Metadata": { + "path": "/api/rest/2.0/roles/{role_identifier}/delete", + "operationId": "deleteRole", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 2772 + }, + "Path_Variables": { + "role_identifier": "xEbqPlXvIvNfzPi" + }, + "Query_Variables": {}, + "Body": {} + }, + { + "Metadata": { + "path": "/api/rest/2.0/roles/{role_identifier}/delete", + "operationId": "deleteRole", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 2773 + }, + "Path_Variables": { + "role_identifier": "xIgFdRaGGvqKkPJ" + }, + "Query_Variables": {}, + "Body": {} + }, + { + "Metadata": { + "path": "/api/rest/2.0/roles/{role_identifier}/delete", + "operationId": "deleteRole", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 2774 + }, + "Path_Variables": { + "role_identifier": "oFpWyDXECYnlxPl" + }, + "Query_Variables": {}, + "Body": {} + }, + { + "Metadata": { + "path": "/api/rest/2.0/roles/{role_identifier}/delete", + "operationId": "deleteRole", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 2775 + }, + "Path_Variables": { + "role_identifier": "YMiqDIkVCwxhBoj" + }, + "Query_Variables": {}, + "Body": {} + }, + { + "Metadata": { + "path": "/api/rest/2.0/roles/{role_identifier}/delete", + "operationId": "deleteRole", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 2776 + }, + "Path_Variables": { + "role_identifier": "SvyGUqPmZImMKHd" + }, + "Query_Variables": {}, + "Body": {} + }, + { + "Metadata": { + "path": "/api/rest/2.0/roles/{role_identifier}/delete", + "operationId": "deleteRole", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 2777 + }, + "Path_Variables": { + "role_identifier": "cqOpRdoesmMkyGh" + }, + "Query_Variables": {}, + "Body": {} + }, + { + "Metadata": { + "path": "/api/rest/2.0/roles/{role_identifier}/delete", + "operationId": "deleteRole", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 2778 + }, + "Path_Variables": { + "role_identifier": "VQqfCdHPHJwKYGQ" + }, + "Query_Variables": {}, + "Body": {} + }, + { + "Metadata": { + "path": "/api/rest/2.0/roles/{role_identifier}/delete", + "operationId": "deleteRole", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 2779 + }, + "Path_Variables": { + "role_identifier": "jGpNaxAJskHoSyb" + }, + "Query_Variables": {}, + "Body": {} + }, + { + "Metadata": { + "path": "/api/rest/2.0/schedules/{schedule_identifier}/delete", + "operationId": "deleteSchedule", + "scenario": "positive", + "type": "AUTOMATIC", + "testId": 2780 + }, + "Path_Variables": { + "schedule_identifier": "dwimlett01688027305017" + }, + "Query_Variables": {}, + "Body": {} + }, + { + "Metadata": { + "path": "/api/rest/2.0/schedules/{schedule_identifier}/delete", + "operationId": "deleteSchedule", + "scenario": "positive", + "type": "AUTOMATIC", + "testId": 2781 + }, + "Path_Variables": { + "schedule_identifier": "atreweek11688027305113" + }, + "Query_Variables": {}, + "Body": {} + }, + { + "Metadata": { + "path": "/api/rest/2.0/schedules/{schedule_identifier}/delete", + "operationId": "deleteSchedule", + "scenario": "positive", + "type": "AUTOMATIC", + "testId": 2782 + }, + "Path_Variables": { + "schedule_identifier": "gpavlitschek21688027300807" + }, + "Query_Variables": {}, + "Body": {} + }, + { + "Metadata": { + "path": "/api/rest/2.0/schedules/{schedule_identifier}/delete", + "operationId": "deleteSchedule", + "scenario": "positive", + "type": "AUTOMATIC", + "testId": 2783 + }, + "Path_Variables": { + "schedule_identifier": "slonglands31688027300811" + }, + "Query_Variables": {}, + "Body": {} + }, + { + "Metadata": { + "path": "/api/rest/2.0/schedules/{schedule_identifier}/delete", + "operationId": "deleteSchedule", + "scenario": "positive", + "type": "AUTOMATIC", + "testId": 2784 + }, + "Path_Variables": { + "schedule_identifier": "kfullick41688027300814" + }, + "Query_Variables": {}, + "Body": {} + }, + { + "Metadata": { + "path": "/api/rest/2.0/schedules/{schedule_identifier}/delete", + "operationId": "deleteSchedule", + "scenario": "positive", + "type": "AUTOMATIC", + "testId": 2785 + }, + "Path_Variables": { + "schedule_identifier": "ftwiggins51688027305134" + }, + "Query_Variables": {}, + "Body": {} + }, + { + "Metadata": { + "path": "/api/rest/2.0/schedules/{schedule_identifier}/delete", + "operationId": "deleteSchedule", + "scenario": "positive", + "type": "AUTOMATIC", + "testId": 2786 + }, + "Path_Variables": { + "schedule_identifier": "cpedracci61688027300822" + }, + "Query_Variables": {}, + "Body": {} + }, + { + "Metadata": { + "path": "/api/rest/2.0/schedules/{schedule_identifier}/delete", + "operationId": "deleteSchedule", + "scenario": "positive", + "type": "AUTOMATIC", + "testId": 2787 + }, + "Path_Variables": { + "schedule_identifier": "mhoyes71688027300825" + }, + "Query_Variables": {}, + "Body": {} + }, + { + "Metadata": { + "path": "/api/rest/2.0/schedules/{schedule_identifier}/delete", + "operationId": "deleteSchedule", + "scenario": "positive", + "type": "AUTOMATIC", + "testId": 2788 + }, + "Path_Variables": { + "schedule_identifier": "ncavan81688027300829" + }, + "Query_Variables": {}, + "Body": {} + }, + { + "Metadata": { + "path": "/api/rest/2.0/schedules/{schedule_identifier}/delete", + "operationId": "deleteSchedule", + "scenario": "positive", + "type": "AUTOMATIC", + "testId": 2789 + }, + "Path_Variables": { + "schedule_identifier": "agoodson91688027305153" + }, + "Query_Variables": {}, + "Body": {} + }, + { + "Metadata": { + "path": "/api/rest/2.0/schedules/{schedule_identifier}/delete", + "operationId": "deleteSchedule", + "scenario": "positive", + "type": "AUTOMATIC", + "testId": 2790 + }, + "Path_Variables": { + "schedule_identifier": "csolmana1688027305159" + }, + "Query_Variables": {}, + "Body": {} + }, + { + "Metadata": { + "path": "/api/rest/2.0/schedules/{schedule_identifier}/delete", + "operationId": "deleteSchedule", + "scenario": "positive", + "type": "AUTOMATIC", + "testId": 2791 + }, + "Path_Variables": { + "schedule_identifier": "hstoggellb1688027300858" + }, + "Query_Variables": {}, + "Body": {} + }, + { + "Metadata": { + "path": "/api/rest/2.0/schedules/{schedule_identifier}/delete", + "operationId": "deleteSchedule", + "scenario": "positive", + "type": "AUTOMATIC", + "testId": 2792 + }, + "Path_Variables": { + "schedule_identifier": "cmatteolic1688027300861" + }, + "Query_Variables": {}, + "Body": {} + }, + { + "Metadata": { + "path": "/api/rest/2.0/schedules/{schedule_identifier}/delete", + "operationId": "deleteSchedule", + "scenario": "positive", + "type": "AUTOMATIC", + "testId": 2793 + }, + "Path_Variables": { + "schedule_identifier": "dkaveneyd1688027305173" + }, + "Query_Variables": {}, + "Body": {} + }, + { + "Metadata": { + "path": "/api/rest/2.0/schedules/{schedule_identifier}/delete", + "operationId": "deleteSchedule", + "scenario": "positive", + "type": "AUTOMATIC", + "testId": 2794 + }, + "Path_Variables": { + "schedule_identifier": "cshillabere1688027305178" + }, + "Query_Variables": {}, + "Body": {} + }, + { + "Metadata": { + "path": "/api/rest/2.0/schedules/{schedule_identifier}/delete", + "operationId": "deleteSchedule", + "scenario": "positive", + "type": "AUTOMATIC", + "testId": 2795 + }, + "Path_Variables": { + "schedule_identifier": "afissendenf1688027305183" + }, + "Query_Variables": {}, + "Body": {} + }, + { + "Metadata": { + "path": "/api/rest/2.0/schedules/{schedule_identifier}/delete", + "operationId": "deleteSchedule", + "scenario": "positive", + "type": "AUTOMATIC", + "testId": 2796 + }, + "Path_Variables": { + "schedule_identifier": "bhartshorneg1688027300874" + }, + "Query_Variables": {}, + "Body": {} + }, + { + "Metadata": { + "path": "/api/rest/2.0/schedules/{schedule_identifier}/delete", + "operationId": "deleteSchedule", + "scenario": "positive", + "type": "AUTOMATIC", + "testId": 2797 + }, + "Path_Variables": { + "schedule_identifier": "mmcmychemh1688027300877" + }, + "Query_Variables": {}, + "Body": {} + }, + { + "Metadata": { + "path": "/api/rest/2.0/schedules/{schedule_identifier}/delete", + "operationId": "deleteSchedule", + "scenario": "positive", + "type": "AUTOMATIC", + "testId": 2798 + }, + "Path_Variables": { + "schedule_identifier": "mchallicei1688027305206" + }, + "Query_Variables": {}, + "Body": {} + }, + { + "Metadata": { + "path": "/api/rest/2.0/schedules/{schedule_identifier}/delete", + "operationId": "deleteSchedule", + "scenario": "positive", + "type": "AUTOMATIC", + "testId": 2799 + }, + "Path_Variables": { + "schedule_identifier": "apietrzykj1688027305211" + }, + "Query_Variables": {}, + "Body": {} + }, + { + "Metadata": { + "path": "/api/rest/2.0/schedules/{schedule_identifier}/delete", + "operationId": "deleteSchedule", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 2800 + }, + "Path_Variables": { + "schedule_identifier": null + }, + "Query_Variables": {}, + "Body": {} + }, + { + "Metadata": { + "path": "/api/rest/2.0/schedules/{schedule_identifier}/delete", + "operationId": "deleteSchedule", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 2801 + }, + "Path_Variables": { + "schedule_identifier": null + }, + "Query_Variables": {}, + "Body": {} + }, + { + "Metadata": { + "path": "/api/rest/2.0/schedules/{schedule_identifier}/delete", + "operationId": "deleteSchedule", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 2802 + }, + "Path_Variables": { + "schedule_identifier": null + }, + "Query_Variables": {}, + "Body": {} + }, + { + "Metadata": { + "path": "/api/rest/2.0/schedules/{schedule_identifier}/delete", + "operationId": "deleteSchedule", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 2803 + }, + "Path_Variables": { + "schedule_identifier": null + }, + "Query_Variables": {}, + "Body": {} + }, + { + "Metadata": { + "path": "/api/rest/2.0/schedules/{schedule_identifier}/delete", + "operationId": "deleteSchedule", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 2804 + }, + "Path_Variables": { + "schedule_identifier": null + }, + "Query_Variables": {}, + "Body": {} + }, + { + "Metadata": { + "path": "/api/rest/2.0/schedules/{schedule_identifier}/delete", + "operationId": "deleteSchedule", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 2805 + }, + "Path_Variables": { + "schedule_identifier": null + }, + "Query_Variables": {}, + "Body": {} + }, + { + "Metadata": { + "path": "/api/rest/2.0/schedules/{schedule_identifier}/delete", + "operationId": "deleteSchedule", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 2806 + }, + "Path_Variables": { + "schedule_identifier": null + }, + "Query_Variables": {}, + "Body": {} + }, + { + "Metadata": { + "path": "/api/rest/2.0/schedules/{schedule_identifier}/delete", + "operationId": "deleteSchedule", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 2807 + }, + "Path_Variables": { + "schedule_identifier": null + }, + "Query_Variables": {}, + "Body": {} + }, + { + "Metadata": { + "path": "/api/rest/2.0/schedules/{schedule_identifier}/delete", + "operationId": "deleteSchedule", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 2808 + }, + "Path_Variables": { + "schedule_identifier": null + }, + "Query_Variables": {}, + "Body": {} + }, + { + "Metadata": { + "path": "/api/rest/2.0/schedules/{schedule_identifier}/delete", + "operationId": "deleteSchedule", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 2809 + }, + "Path_Variables": { + "schedule_identifier": null + }, + "Query_Variables": {}, + "Body": {} + }, + { + "Metadata": { + "path": "/api/rest/2.0/schedules/{schedule_identifier}/delete", + "operationId": "deleteSchedule", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 2810 + }, + "Path_Variables": { + "schedule_identifier": null + }, + "Query_Variables": {}, + "Body": {} + }, + { + "Metadata": { + "path": "/api/rest/2.0/schedules/{schedule_identifier}/delete", + "operationId": "deleteSchedule", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 2811 + }, + "Path_Variables": { + "schedule_identifier": null + }, + "Query_Variables": {}, + "Body": {} + }, + { + "Metadata": { + "path": "/api/rest/2.0/schedules/{schedule_identifier}/delete", + "operationId": "deleteSchedule", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 2812 + }, + "Path_Variables": { + "schedule_identifier": null + }, + "Query_Variables": {}, + "Body": {} + }, + { + "Metadata": { + "path": "/api/rest/2.0/schedules/{schedule_identifier}/delete", + "operationId": "deleteSchedule", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 2813 + }, + "Path_Variables": { + "schedule_identifier": null + }, + "Query_Variables": {}, + "Body": {} + }, + { + "Metadata": { + "path": "/api/rest/2.0/schedules/{schedule_identifier}/delete", + "operationId": "deleteSchedule", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 2814 + }, + "Path_Variables": { + "schedule_identifier": null + }, + "Query_Variables": {}, + "Body": {} + }, + { + "Metadata": { + "path": "/api/rest/2.0/schedules/{schedule_identifier}/delete", + "operationId": "deleteSchedule", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 2815 + }, + "Path_Variables": { + "schedule_identifier": [ + "apietrzykj1688027305211" + ] + }, + "Query_Variables": {}, + "Body": {} + }, + { + "Metadata": { + "path": "/api/rest/2.0/schedules/{schedule_identifier}/delete", + "operationId": "deleteSchedule", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 2816 + }, + "Path_Variables": { + "schedule_identifier": [ + "agoodson91688027305153" + ] + }, + "Query_Variables": {}, + "Body": {} + }, + { + "Metadata": { + "path": "/api/rest/2.0/schedules/{schedule_identifier}/delete", + "operationId": "deleteSchedule", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 2817 + }, + "Path_Variables": { + "schedule_identifier": [ + "hstoggellb1688027300858" + ] + }, + "Query_Variables": {}, + "Body": {} + }, + { + "Metadata": { + "path": "/api/rest/2.0/schedules/{schedule_identifier}/delete", + "operationId": "deleteSchedule", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 2818 + }, + "Path_Variables": { + "schedule_identifier": [ + "atreweek11688027305113" + ] + }, + "Query_Variables": {}, + "Body": {} + }, + { + "Metadata": { + "path": "/api/rest/2.0/schedules/{schedule_identifier}/delete", + "operationId": "deleteSchedule", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 2819 + }, + "Path_Variables": { + "schedule_identifier": [ + "cmatteolic1688027300861" + ] + }, + "Query_Variables": {}, + "Body": {} + }, + { + "Metadata": { + "path": "/api/rest/2.0/schedules/{schedule_identifier}/delete", + "operationId": "deleteSchedule", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 2820 + }, + "Path_Variables": { + "schedule_identifier": [ + "cmatteolic1688027300861" + ] + }, + "Query_Variables": {}, + "Body": {} + }, + { + "Metadata": { + "path": "/api/rest/2.0/schedules/{schedule_identifier}/delete", + "operationId": "deleteSchedule", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 2821 + }, + "Path_Variables": { + "schedule_identifier": [ + "afissendenf1688027305183" + ] + }, + "Query_Variables": {}, + "Body": {} + }, + { + "Metadata": { + "path": "/api/rest/2.0/schedules/{schedule_identifier}/delete", + "operationId": "deleteSchedule", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 2822 + }, + "Path_Variables": { + "schedule_identifier": [ + "mmcmychemh1688027300877" + ] + }, + "Query_Variables": {}, + "Body": {} + }, + { + "Metadata": { + "path": "/api/rest/2.0/schedules/{schedule_identifier}/delete", + "operationId": "deleteSchedule", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 2823 + }, + "Path_Variables": { + "schedule_identifier": [ + "cmatteolic1688027300861" + ] + }, + "Query_Variables": {}, + "Body": {} + }, + { + "Metadata": { + "path": "/api/rest/2.0/schedules/{schedule_identifier}/delete", + "operationId": "deleteSchedule", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 2824 + }, + "Path_Variables": { + "schedule_identifier": [ + "agoodson91688027305153" + ] + }, + "Query_Variables": {}, + "Body": {} + }, + { + "Metadata": { + "path": "/api/rest/2.0/schedules/{schedule_identifier}/delete", + "operationId": "deleteSchedule", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 2825 + }, + "Path_Variables": { + "schedule_identifier": [ + "cpedracci61688027300822" + ] + }, + "Query_Variables": {}, + "Body": {} + }, + { + "Metadata": { + "path": "/api/rest/2.0/schedules/{schedule_identifier}/delete", + "operationId": "deleteSchedule", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 2826 + }, + "Path_Variables": { + "schedule_identifier": [ + "cmatteolic1688027300861" + ] + }, + "Query_Variables": {}, + "Body": {} + }, + { + "Metadata": { + "path": "/api/rest/2.0/schedules/{schedule_identifier}/delete", + "operationId": "deleteSchedule", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 2827 + }, + "Path_Variables": { + "schedule_identifier": [ + "ftwiggins51688027305134" + ] + }, + "Query_Variables": {}, + "Body": {} + }, + { + "Metadata": { + "path": "/api/rest/2.0/schedules/{schedule_identifier}/delete", + "operationId": "deleteSchedule", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 2828 + }, + "Path_Variables": { + "schedule_identifier": [ + "csolmana1688027305159" + ] + }, + "Query_Variables": {}, + "Body": {} + }, + { + "Metadata": { + "path": "/api/rest/2.0/schedules/{schedule_identifier}/delete", + "operationId": "deleteSchedule", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 2829 + }, + "Path_Variables": { + "schedule_identifier": [ + "cshillabere1688027305178" + ] + }, + "Query_Variables": {}, + "Body": {} + }, + { + "Metadata": { + "path": "/api/rest/2.0/schedules/{schedule_identifier}/delete", + "operationId": "deleteSchedule", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 2830 + }, + "Path_Variables": { + "schedule_identifier": "nmvjkChEyAwPIKy" + }, + "Query_Variables": {}, + "Body": {} + }, + { + "Metadata": { + "path": "/api/rest/2.0/schedules/{schedule_identifier}/delete", + "operationId": "deleteSchedule", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 2831 + }, + "Path_Variables": { + "schedule_identifier": "MPewRcsDivhCBNQ" + }, + "Query_Variables": {}, + "Body": {} + }, + { + "Metadata": { + "path": "/api/rest/2.0/schedules/{schedule_identifier}/delete", + "operationId": "deleteSchedule", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 2832 + }, + "Path_Variables": { + "schedule_identifier": "ByfGiwBMxabDoFK" + }, + "Query_Variables": {}, + "Body": {} + }, + { + "Metadata": { + "path": "/api/rest/2.0/schedules/{schedule_identifier}/delete", + "operationId": "deleteSchedule", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 2833 + }, + "Path_Variables": { + "schedule_identifier": "HSbVKXJSCIcWaGt" + }, + "Query_Variables": {}, + "Body": {} + }, + { + "Metadata": { + "path": "/api/rest/2.0/schedules/{schedule_identifier}/delete", + "operationId": "deleteSchedule", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 2834 + }, + "Path_Variables": { + "schedule_identifier": "FNSQjwJTdsQSBux" + }, + "Query_Variables": {}, + "Body": {} + }, + { + "Metadata": { + "path": "/api/rest/2.0/schedules/{schedule_identifier}/delete", + "operationId": "deleteSchedule", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 2835 + }, + "Path_Variables": { + "schedule_identifier": "wKTHKyEMLakSKTJ" + }, + "Query_Variables": {}, + "Body": {} + }, + { + "Metadata": { + "path": "/api/rest/2.0/schedules/{schedule_identifier}/delete", + "operationId": "deleteSchedule", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 2836 + }, + "Path_Variables": { + "schedule_identifier": "cxpsdNOLRltNWPV" + }, + "Query_Variables": {}, + "Body": {} + }, + { + "Metadata": { + "path": "/api/rest/2.0/schedules/{schedule_identifier}/delete", + "operationId": "deleteSchedule", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 2837 + }, + "Path_Variables": { + "schedule_identifier": "JhXMVeMhnqpzaZi" + }, + "Query_Variables": {}, + "Body": {} + }, + { + "Metadata": { + "path": "/api/rest/2.0/schedules/{schedule_identifier}/delete", + "operationId": "deleteSchedule", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 2838 + }, + "Path_Variables": { + "schedule_identifier": "EHdxxkbNkmyVQCN" + }, + "Query_Variables": {}, + "Body": {} + }, + { + "Metadata": { + "path": "/api/rest/2.0/schedules/{schedule_identifier}/delete", + "operationId": "deleteSchedule", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 2839 + }, + "Path_Variables": { + "schedule_identifier": "ySrrBlKYlERHVZm" + }, + "Query_Variables": {}, + "Body": {} + }, + { + "Metadata": { + "path": "/api/rest/2.0/schedules/{schedule_identifier}/delete", + "operationId": "deleteSchedule", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 2840 + }, + "Path_Variables": { + "schedule_identifier": "UUWKEICBMlnmYgJ" + }, + "Query_Variables": {}, + "Body": {} + }, + { + "Metadata": { + "path": "/api/rest/2.0/schedules/{schedule_identifier}/delete", + "operationId": "deleteSchedule", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 2841 + }, + "Path_Variables": { + "schedule_identifier": "GHJDluYsoxyEpYa" + }, + "Query_Variables": {}, + "Body": {} + }, + { + "Metadata": { + "path": "/api/rest/2.0/schedules/{schedule_identifier}/delete", + "operationId": "deleteSchedule", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 2842 + }, + "Path_Variables": { + "schedule_identifier": "QraNQPxoerdZCII" + }, + "Query_Variables": {}, + "Body": {} + }, + { + "Metadata": { + "path": "/api/rest/2.0/schedules/{schedule_identifier}/delete", + "operationId": "deleteSchedule", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 2843 + }, + "Path_Variables": { + "schedule_identifier": "HXVmqUnDRJrVOTs" + }, + "Query_Variables": {}, + "Body": {} + }, + { + "Metadata": { + "path": "/api/rest/2.0/schedules/{schedule_identifier}/delete", + "operationId": "deleteSchedule", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 2844 + }, + "Path_Variables": { + "schedule_identifier": "feqkAFXabFlBSEQ" + }, + "Query_Variables": {}, + "Body": {} + }, + { + "Metadata": { + "path": "/api/rest/2.0/metadata/delete", + "operationId": "deleteMetadata", + "scenario": "positive", + "type": "AUTOMATIC", + "testId": 2845 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "metadata": [ + { + "type": "LOGICAL_RELATIONSHIP", + "identifier": "0772f18f-2c2a-4d6a-9227-c714d66222b4" + }, + { + "type": "LIVEBOARD", + "identifier": "6715f768-8930-4180-9a3d-1efdbfaa8e7f" + } + ] + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/metadata/delete", + "operationId": "deleteMetadata", + "scenario": "positive", + "type": "AUTOMATIC", + "testId": 2846 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "metadata": [ + { + "type": "ANSWER", + "identifier": "21f35c49-c1f8-4f3d-a124-a0fbe5c978aa" + }, + { + "type": "LOGICAL_COLUMN", + "identifier": "9e1138d5-f612-4c46-9908-a082c2f71a21" + }, + { + "type": "LOGICAL_COLUMN", + "identifier": "414b25f8-ce19-47d9-bb23-eb58e51b101a" + } + ], + "delete_disabled_objects": false + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/metadata/delete", + "operationId": "deleteMetadata", + "scenario": "positive", + "type": "AUTOMATIC", + "testId": 2847 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "metadata": [ + { + "type": "LOGICAL_COLUMN", + "identifier": "37e3414e-4c1d-4a12-b2fc-0062fb990de9" + }, + { + "type": "LIVEBOARD", + "identifier": "601be8e5-140e-477c-8812-843795306438" + } + ], + "delete_disabled_objects": false + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/metadata/delete", + "operationId": "deleteMetadata", + "scenario": "positive", + "type": "AUTOMATIC", + "testId": 2848 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "metadata": [ + { + "type": "LOGICAL_TABLE", + "identifier": "1ac1a13a-0eea-479c-9bd6-25f16cf3ce70" + }, + { + "type": "LOGICAL_TABLE", + "identifier": "07a8af30-cd9d-4ab0-a58a-544a818ddac7" + } + ] + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/metadata/delete", + "operationId": "deleteMetadata", + "scenario": "positive", + "type": "AUTOMATIC", + "testId": 2849 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "metadata": [ + { + "type": "ANSWER", + "identifier": "73df2632-37ec-4e64-9f9c-c53e5efe2432" + }, + { + "type": "LOGICAL_TABLE", + "identifier": "286933b5-fc30-46b8-9216-31f669f46a15" + }, + { + "type": "LIVEBOARD", + "identifier": "327f4d60-c502-43b0-b1d4-c73df5031a2e" + } + ], + "delete_disabled_objects": false + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/metadata/delete", + "operationId": "deleteMetadata", + "scenario": "positive", + "type": "AUTOMATIC", + "testId": 2850 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "metadata": [ + { + "type": "LIVEBOARD", + "identifier": "262abdac-b00f-4f5f-ad33-fcf10154184f" + } + ] + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/metadata/delete", + "operationId": "deleteMetadata", + "scenario": "positive", + "type": "AUTOMATIC", + "testId": 2851 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "metadata": [ + { + "type": "ANSWER", + "identifier": "e4cd9bf1-4f77-4762-9035-543b3a00c294" + } + ] + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/metadata/delete", + "operationId": "deleteMetadata", + "scenario": "positive", + "type": "AUTOMATIC", + "testId": 2852 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "metadata": [ + { + "type": "ANSWER", + "identifier": "47294d3a-5dc4-44d3-bee5-7a586c606ed8" + }, + { + "type": "LOGICAL_TABLE", + "identifier": "8d44ed81-3fbf-45c8-9eb2-042942e3d416" + } + ] + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/metadata/delete", + "operationId": "deleteMetadata", + "scenario": "positive", + "type": "AUTOMATIC", + "testId": 2853 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "metadata": [ + { + "type": "LOGICAL_TABLE", + "identifier": "2cb8dea0-1f97-461b-b1fe-29e104b194a7" + }, + { + "type": "LOGICAL_RELATIONSHIP", + "identifier": "8284e1fb-bd64-4b24-8caf-65ac79274979" + } + ] + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/metadata/delete", + "operationId": "deleteMetadata", + "scenario": "positive", + "type": "AUTOMATIC", + "testId": 2854 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "metadata": [ + { + "type": "LIVEBOARD", + "identifier": "b2d68a4f-cf67-4723-966f-8a592fdbf8b9" + } + ] + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/metadata/delete", + "operationId": "deleteMetadata", + "scenario": "positive", + "type": "AUTOMATIC", + "testId": 2855 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "metadata": [ + { + "type": "LOGICAL_COLUMN", + "identifier": "6ffd9cb6-60e3-428e-8590-4c13259bb426" + }, + { + "type": "ANSWER", + "identifier": "a7826fd7-cca0-4e75-9c55-9bfbb18b7454" + }, + { + "type": "ANSWER", + "identifier": "d343362c-0b26-41d4-bade-403c87b62ef3" + } + ] + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/metadata/delete", + "operationId": "deleteMetadata", + "scenario": "positive", + "type": "AUTOMATIC", + "testId": 2856 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "metadata": [ + { + "type": "ANSWER", + "identifier": "10a69d10-e455-4473-b1c6-de1da8cc1ad5" + }, + { + "type": "LOGICAL_RELATIONSHIP", + "identifier": "55c02e62-2ff7-405e-912f-c5d213aae1ee" + }, + { + "type": "LOGICAL_TABLE", + "identifier": "92989633-79bf-4efd-b240-00aaadc8d20e" + } + ] + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/metadata/delete", + "operationId": "deleteMetadata", + "scenario": "positive", + "type": "AUTOMATIC", + "testId": 2857 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "metadata": [ + { + "type": "LOGICAL_RELATIONSHIP", + "identifier": "d167f2b1-a4bf-41f8-9a0e-23ca08a621ba" + }, + { + "type": "LOGICAL_RELATIONSHIP", + "identifier": "28c4f114-67d0-4261-9fa2-79c483ce478c" + }, + { + "type": "LIVEBOARD", + "identifier": "2ff57a24-cf90-485f-8b4b-45fc17474c6f" + } + ] + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/metadata/delete", + "operationId": "deleteMetadata", + "scenario": "positive", + "type": "AUTOMATIC", + "testId": 2858 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "metadata": [ + { + "type": "LOGICAL_COLUMN", + "identifier": "b76b42e2-313a-4d39-8d7a-0fd095bd382a" + }, + { + "type": "ANSWER", + "identifier": "7ca13c1d-51de-477e-94c8-f9372a8e30e3" + } + ], + "delete_disabled_objects": true + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/metadata/delete", + "operationId": "deleteMetadata", + "scenario": "positive", + "type": "AUTOMATIC", + "testId": 2859 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "metadata": [ + { + "type": "LIVEBOARD", + "identifier": "061457a2-27bc-43a9-9754-0cd873691bf0" + }, + { + "type": "LOGICAL_COLUMN", + "identifier": "2582b42d-2ea9-4751-9300-f7a50875ba28" + }, + { + "type": "ANSWER", + "identifier": "48d27aee-59c3-4a0c-8d2c-5a8989c55bb1" + } + ] + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/metadata/delete", + "operationId": "deleteMetadata", + "scenario": "positive", + "type": "AUTOMATIC", + "testId": 2860 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "metadata": [ + { + "type": "LOGICAL_COLUMN", + "identifier": "0e2ccbd2-8ffe-4bfd-84bf-0bb02a348fa2" + } + ] + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/metadata/delete", + "operationId": "deleteMetadata", + "scenario": "positive", + "type": "AUTOMATIC", + "testId": 2861 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "metadata": [ + { + "type": "ANSWER", + "identifier": "1be3019c-aa6e-47cf-a79e-3b7de02f25b4" + }, + { + "type": "LOGICAL_TABLE", + "identifier": "bfa7e411-2232-42f6-9db7-ab51e1d6e9d2" + }, + { + "type": "LOGICAL_RELATIONSHIP", + "identifier": "bf74dd0e-f04a-4f1a-a1a2-979a3d66ec70" + } + ], + "delete_disabled_objects": true + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/metadata/delete", + "operationId": "deleteMetadata", + "scenario": "positive", + "type": "AUTOMATIC", + "testId": 2862 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "metadata": [ + { + "type": "LOGICAL_COLUMN", + "identifier": "87f3f935-9750-45a9-9359-5f8f8b1755b8" + }, + { + "type": "LIVEBOARD", + "identifier": "e36ee65e-64be-436b-a29a-22d8998c4fae" + } + ], + "delete_disabled_objects": false + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/metadata/delete", + "operationId": "deleteMetadata", + "scenario": "positive", + "type": "AUTOMATIC", + "testId": 2863 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "metadata": [ + { + "type": "LOGICAL_TABLE", + "identifier": "7d2fbbc1-d3bb-4ee4-9218-ec6421958c62" + } + ], + "delete_disabled_objects": false + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/metadata/delete", + "operationId": "deleteMetadata", + "scenario": "positive", + "type": "AUTOMATIC", + "testId": 2864 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "metadata": [ + { + "type": "LOGICAL_RELATIONSHIP", + "identifier": "60c36d7d-7b12-4237-a5ad-4738ca6381d1" + }, + { + "type": "LIVEBOARD", + "identifier": "c836ad16-660d-4d28-a3a0-e07cb9eb6ab1" + } + ], + "delete_disabled_objects": true + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/metadata/delete", + "operationId": "deleteMetadata", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 2865 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "metadata": null + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/metadata/delete", + "operationId": "deleteMetadata", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 2866 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "metadata": null, + "delete_disabled_objects": true + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/metadata/delete", + "operationId": "deleteMetadata", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 2867 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "metadata": null + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/metadata/delete", + "operationId": "deleteMetadata", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 2868 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "metadata": null + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/metadata/delete", + "operationId": "deleteMetadata", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 2869 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "metadata": null + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/metadata/delete", + "operationId": "deleteMetadata", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 2870 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "metadata": null + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/metadata/delete", + "operationId": "deleteMetadata", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 2871 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "metadata": null + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/metadata/delete", + "operationId": "deleteMetadata", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 2872 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "metadata": null, + "delete_disabled_objects": false + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/metadata/delete", + "operationId": "deleteMetadata", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 2873 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "metadata": null + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/metadata/delete", + "operationId": "deleteMetadata", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 2874 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "metadata": null, + "delete_disabled_objects": true + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/metadata/delete", + "operationId": "deleteMetadata", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 2875 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "metadata": null + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/metadata/delete", + "operationId": "deleteMetadata", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 2876 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "metadata": null + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/metadata/delete", + "operationId": "deleteMetadata", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 2877 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "metadata": null + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/metadata/delete", + "operationId": "deleteMetadata", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 2878 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "metadata": null + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/metadata/delete", + "operationId": "deleteMetadata", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 2879 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "metadata": null + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/metadata/delete", + "operationId": "deleteMetadata", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 2880 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "metadata": "tRcStiGJFppxkYl" + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/metadata/delete", + "operationId": "deleteMetadata", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 2881 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "metadata": "JNGHwPZZxgfRrVB" + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/metadata/delete", + "operationId": "deleteMetadata", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 2882 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "metadata": null, + "delete_disabled_objects": false + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/metadata/delete", + "operationId": "deleteMetadata", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 2883 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "metadata": "lgUGqyAqWzRsDbt" + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/metadata/delete", + "operationId": "deleteMetadata", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 2884 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "metadata": "UcaspgHmeUbaKCc" + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/metadata/delete", + "operationId": "deleteMetadata", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 2885 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "metadata": "WplpntFQYNJdzwd" + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/metadata/delete", + "operationId": "deleteMetadata", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 2886 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "metadata": null, + "delete_disabled_objects": false + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/metadata/delete", + "operationId": "deleteMetadata", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 2887 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "metadata": "xiLNhfRloetDaSW" + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/metadata/delete", + "operationId": "deleteMetadata", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 2888 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "metadata": "yCvfZsKkqbPkLaf", + "delete_disabled_objects": false + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/metadata/delete", + "operationId": "deleteMetadata", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 2889 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "metadata": "OzmYmSScdHyllRF" + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/metadata/delete", + "operationId": "deleteMetadata", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 2890 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "metadata": "mneitzRFfaxAIWi", + "delete_disabled_objects": false + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/metadata/delete", + "operationId": "deleteMetadata", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 2891 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "metadata": null, + "delete_disabled_objects": false + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/metadata/delete", + "operationId": "deleteMetadata", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 2892 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "metadata": "tZGZBRYhKDQvfEk" + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/metadata/delete", + "operationId": "deleteMetadata", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 2893 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "metadata": "PafobQCYBsQOloV", + "delete_disabled_objects": false + } + }, + { + "Metadata": { + "path": "/api/rest/2.0/metadata/delete", + "operationId": "deleteMetadata", + "scenario": "negative", + "type": "AUTOMATIC", + "testId": 2894 + }, + "Path_Variables": {}, + "Query_Variables": {}, + "Body": { + "metadata": null, + "delete_disabled_objects": true + } + } +] \ No newline at end of file diff --git a/sdks/typescript/tsconfig.json b/sdks/typescript/tsconfig.json new file mode 100644 index 000000000..8840f1362 --- /dev/null +++ b/sdks/typescript/tsconfig.json @@ -0,0 +1,30 @@ +{ + "compilerOptions": { + "strict": true, + /* Basic Options */ + "target": "es6", + "esModuleInterop": true, + "moduleResolution": "node", + "declaration": true, + + /* Additional Checks */ + "noUnusedLocals": false, /* Report errors on unused locals. */ // TODO: reenable (unused imports!) + "noUnusedParameters": false, /* Report errors on unused parameters. */ // TODO: set to true again + "noImplicitReturns": true, /* Report error when not all code paths in function return a value. */ + "noFallthroughCasesInSwitch": true, /* Report errors for fallthrough cases in switch statement. */ + + "removeComments": false, + "sourceMap": true, + "outDir": "./dist", + "noLib": false, + "lib": [ "es6", "dom" ], + "resolveJsonModule": true + }, + "exclude": [ + "dist", + "node_modules" + ], + "filesGlob": [ + "./**/*.ts", + ] +} \ No newline at end of file diff --git a/sdks/typescript/types/ObjectParamAPI.ts b/sdks/typescript/types/ObjectParamAPI.ts new file mode 100644 index 000000000..9db9280fc --- /dev/null +++ b/sdks/typescript/types/ObjectParamAPI.ts @@ -0,0 +1,6674 @@ +import { ResponseContext, RequestContext, HttpFile } from '../http/http'; +import { Configuration} from '../configuration' + +import { AIContext } from '../models/AIContext'; +import { APIKey } from '../models/APIKey'; +import { APIKeyInput } from '../models/APIKeyInput'; +import { AccessToken } from '../models/AccessToken'; +import { ActionConfig } from '../models/ActionConfig'; +import { ActionConfigInput } from '../models/ActionConfigInput'; +import { ActionConfigInputCreate } from '../models/ActionConfigInputCreate'; +import { ActionDetails } from '../models/ActionDetails'; +import { ActionDetailsInput } from '../models/ActionDetailsInput'; +import { ActionDetailsInputCreate } from '../models/ActionDetailsInputCreate'; +import { ActivateUserRequest } from '../models/ActivateUserRequest'; +import { AgentConversation } from '../models/AgentConversation'; +import { AnswerContent } from '../models/AnswerContent'; +import { AnswerDataResponse } from '../models/AnswerDataResponse'; +import { AnswerPngOptionsInput } from '../models/AnswerPngOptionsInput'; +import { AssignChangeAuthorRequest } from '../models/AssignChangeAuthorRequest'; +import { AssignTagRequest } from '../models/AssignTagRequest'; +import { AssociateMetadataInput } from '../models/AssociateMetadataInput'; +import { AssociateMetadataInputCreate } from '../models/AssociateMetadataInputCreate'; +import { AuthClusterPreferences } from '../models/AuthClusterPreferences'; +import { AuthClusterPreferencesInput } from '../models/AuthClusterPreferencesInput'; +import { AuthOrgInfo } from '../models/AuthOrgInfo'; +import { AuthOrgPreference } from '../models/AuthOrgPreference'; +import { AuthOrgPreferenceInput } from '../models/AuthOrgPreferenceInput'; +import { AuthSettingsAccessToken } from '../models/AuthSettingsAccessToken'; +import { Authentication } from '../models/Authentication'; +import { AuthenticationInput } from '../models/AuthenticationInput'; +import { Author } from '../models/Author'; +import { AuthorMetadataTypeInput } from '../models/AuthorMetadataTypeInput'; +import { AuthorType } from '../models/AuthorType'; +import { AwsS3Config } from '../models/AwsS3Config'; +import { AwsS3ConfigInput } from '../models/AwsS3ConfigInput'; +import { BasicAuth } from '../models/BasicAuth'; +import { BasicAuthInput } from '../models/BasicAuthInput'; +import { CALLBACK } from '../models/CALLBACK'; +import { CALLBACKInput } from '../models/CALLBACKInput'; +import { CALLBACKInputMandatory } from '../models/CALLBACKInputMandatory'; +import { CalendarResponse } from '../models/CalendarResponse'; +import { ChangeUserPasswordRequest } from '../models/ChangeUserPasswordRequest'; +import { ChannelHistoryEventInfo } from '../models/ChannelHistoryEventInfo'; +import { ChannelHistoryEventInput } from '../models/ChannelHistoryEventInput'; +import { ChannelHistoryJob } from '../models/ChannelHistoryJob'; +import { ChannelValidationAwsS3Info } from '../models/ChannelValidationAwsS3Info'; +import { ChannelValidationDetail } from '../models/ChannelValidationDetail'; +import { ClusterNonEmbedAccess } from '../models/ClusterNonEmbedAccess'; +import { ClusterNonEmbedAccessInput } from '../models/ClusterNonEmbedAccessInput'; +import { Collection } from '../models/Collection'; +import { CollectionDeleteResponse } from '../models/CollectionDeleteResponse'; +import { CollectionDeleteTypeIdentifiers } from '../models/CollectionDeleteTypeIdentifiers'; +import { CollectionEntityIdentifier } from '../models/CollectionEntityIdentifier'; +import { CollectionMetadataInput } from '../models/CollectionMetadataInput'; +import { CollectionMetadataItem } from '../models/CollectionMetadataItem'; +import { CollectionSearchResponse } from '../models/CollectionSearchResponse'; +import { Column } from '../models/Column'; +import { ColumnSecurityRule } from '../models/ColumnSecurityRule'; +import { ColumnSecurityRuleColumn } from '../models/ColumnSecurityRuleColumn'; +import { ColumnSecurityRuleGroup } from '../models/ColumnSecurityRuleGroup'; +import { ColumnSecurityRuleGroupOperation } from '../models/ColumnSecurityRuleGroupOperation'; +import { ColumnSecurityRuleResponse } from '../models/ColumnSecurityRuleResponse'; +import { ColumnSecurityRuleSourceTable } from '../models/ColumnSecurityRuleSourceTable'; +import { ColumnSecurityRuleTableInput } from '../models/ColumnSecurityRuleTableInput'; +import { ColumnSecurityRuleUpdate } from '../models/ColumnSecurityRuleUpdate'; +import { CommitBranchRequest } from '../models/CommitBranchRequest'; +import { CommitFileType } from '../models/CommitFileType'; +import { CommitHistoryResponse } from '../models/CommitHistoryResponse'; +import { CommitResponse } from '../models/CommitResponse'; +import { CommiterType } from '../models/CommiterType'; +import { CommunicationChannelPreferencesResponse } from '../models/CommunicationChannelPreferencesResponse'; +import { CommunicationChannelValidateResponse } from '../models/CommunicationChannelValidateResponse'; +import { ConfigureAuthSettingsRequest } from '../models/ConfigureAuthSettingsRequest'; +import { ConfigureAuthSettingsRequestClusterPreferences } from '../models/ConfigureAuthSettingsRequestClusterPreferences'; +import { ConfigureCommunicationChannelPreferencesRequest } from '../models/ConfigureCommunicationChannelPreferencesRequest'; +import { ConfigureSecuritySettingsRequest } from '../models/ConfigureSecuritySettingsRequest'; +import { ConfigureSecuritySettingsRequestClusterPreferences } from '../models/ConfigureSecuritySettingsRequestClusterPreferences'; +import { ConnectionConfigurationResponse } from '../models/ConnectionConfigurationResponse'; +import { ConnectionConfigurationSearchRequest } from '../models/ConnectionConfigurationSearchRequest'; +import { ConnectionInput } from '../models/ConnectionInput'; +import { ContextPayloadV2Input } from '../models/ContextPayloadV2Input'; +import { Conversation } from '../models/Conversation'; +import { ConversationSettingsInput } from '../models/ConversationSettingsInput'; +import { ConvertWorksheetToModelRequest } from '../models/ConvertWorksheetToModelRequest'; +import { CopyObjectRequest } from '../models/CopyObjectRequest'; +import { CreateAgentConversationRequest } from '../models/CreateAgentConversationRequest'; +import { CreateAgentConversationRequestConversationSettings } from '../models/CreateAgentConversationRequestConversationSettings'; +import { CreateAgentConversationRequestMetadataContext } from '../models/CreateAgentConversationRequestMetadataContext'; +import { CreateCalendarRequest } from '../models/CreateCalendarRequest'; +import { CreateCalendarRequestTableReference } from '../models/CreateCalendarRequestTableReference'; +import { CreateCollectionRequest } from '../models/CreateCollectionRequest'; +import { CreateConfigRequest } from '../models/CreateConfigRequest'; +import { CreateConnectionConfigurationRequest } from '../models/CreateConnectionConfigurationRequest'; +import { CreateConnectionConfigurationRequestPolicyProcessOptions } from '../models/CreateConnectionConfigurationRequestPolicyProcessOptions'; +import { CreateConnectionRequest } from '../models/CreateConnectionRequest'; +import { CreateConnectionResponse } from '../models/CreateConnectionResponse'; +import { CreateConversationRequest } from '../models/CreateConversationRequest'; +import { CreateCustomActionRequest } from '../models/CreateCustomActionRequest'; +import { CreateCustomActionRequestActionDetails } from '../models/CreateCustomActionRequestActionDetails'; +import { CreateCustomActionRequestDefaultActionConfig } from '../models/CreateCustomActionRequestDefaultActionConfig'; +import { CreateEmailCustomizationRequest } from '../models/CreateEmailCustomizationRequest'; +import { CreateEmailCustomizationRequestTemplateProperties } from '../models/CreateEmailCustomizationRequestTemplateProperties'; +import { CreateEmailCustomizationResponse } from '../models/CreateEmailCustomizationResponse'; +import { CreateOrgRequest } from '../models/CreateOrgRequest'; +import { CreateRoleRequest } from '../models/CreateRoleRequest'; +import { CreateScheduleRequest } from '../models/CreateScheduleRequest'; +import { CreateScheduleRequestFrequency } from '../models/CreateScheduleRequestFrequency'; +import { CreateScheduleRequestLiveboardOptions } from '../models/CreateScheduleRequestLiveboardOptions'; +import { CreateScheduleRequestPdfOptions } from '../models/CreateScheduleRequestPdfOptions'; +import { CreateScheduleRequestRecipientDetails } from '../models/CreateScheduleRequestRecipientDetails'; +import { CreateTagRequest } from '../models/CreateTagRequest'; +import { CreateUserGroupRequest } from '../models/CreateUserGroupRequest'; +import { CreateUserRequest } from '../models/CreateUserRequest'; +import { CreateVariableRequest } from '../models/CreateVariableRequest'; +import { CreateWebhookConfigurationRequest } from '../models/CreateWebhookConfigurationRequest'; +import { CreateWebhookConfigurationRequestAuthentication } from '../models/CreateWebhookConfigurationRequestAuthentication'; +import { CreateWebhookConfigurationRequestSignatureVerification } from '../models/CreateWebhookConfigurationRequestSignatureVerification'; +import { CreateWebhookConfigurationRequestStorageDestination } from '../models/CreateWebhookConfigurationRequestStorageDestination'; +import { CronExpression } from '../models/CronExpression'; +import { CronExpressionInput } from '../models/CronExpressionInput'; +import { CspSettings } from '../models/CspSettings'; +import { CspSettingsInput } from '../models/CspSettingsInput'; +import { CustomActionMetadataTypeInput } from '../models/CustomActionMetadataTypeInput'; +import { DataSource } from '../models/DataSource'; +import { DataSourceContextInput } from '../models/DataSourceContextInput'; +import { DataWarehouseObjectInput } from '../models/DataWarehouseObjectInput'; +import { DataWarehouseObjects } from '../models/DataWarehouseObjects'; +import { Database } from '../models/Database'; +import { DbtSearchResponse } from '../models/DbtSearchResponse'; +import { DeactivateUserRequest } from '../models/DeactivateUserRequest'; +import { DefaultActionConfig } from '../models/DefaultActionConfig'; +import { DefaultActionConfigInput } from '../models/DefaultActionConfigInput'; +import { DefaultActionConfigInputCreate } from '../models/DefaultActionConfigInputCreate'; +import { DefaultActionConfigSearchInput } from '../models/DefaultActionConfigSearchInput'; +import { DeleteCollectionRequest } from '../models/DeleteCollectionRequest'; +import { DeleteConfigRequest } from '../models/DeleteConfigRequest'; +import { DeleteConnectionConfigurationRequest } from '../models/DeleteConnectionConfigurationRequest'; +import { DeleteConnectionRequest } from '../models/DeleteConnectionRequest'; +import { DeleteMetadataRequest } from '../models/DeleteMetadataRequest'; +import { DeleteMetadataTypeInput } from '../models/DeleteMetadataTypeInput'; +import { DeleteOrgEmailCustomizationRequest } from '../models/DeleteOrgEmailCustomizationRequest'; +import { DeleteVariablesRequest } from '../models/DeleteVariablesRequest'; +import { DeleteWebhookConfigurationsRequest } from '../models/DeleteWebhookConfigurationsRequest'; +import { DeployCommitRequest } from '../models/DeployCommitRequest'; +import { DeployResponse } from '../models/DeployResponse'; +import { EntityHeader } from '../models/EntityHeader'; +import { ErrorResponse } from '../models/ErrorResponse'; +import { EurekaDataSourceSuggestionResponse } from '../models/EurekaDataSourceSuggestionResponse'; +import { EurekaDecomposeQueryResponse } from '../models/EurekaDecomposeQueryResponse'; +import { EurekaGetNLInstructionsResponse } from '../models/EurekaGetNLInstructionsResponse'; +import { EurekaGetRelevantQuestionsResponse } from '../models/EurekaGetRelevantQuestionsResponse'; +import { EurekaLLMDecomposeQueryResponse } from '../models/EurekaLLMDecomposeQueryResponse'; +import { EurekaLLMSuggestedQuery } from '../models/EurekaLLMSuggestedQuery'; +import { EurekaRelevantQuestion } from '../models/EurekaRelevantQuestion'; +import { EurekaSetNLInstructionsResponse } from '../models/EurekaSetNLInstructionsResponse'; +import { EventChannelConfig } from '../models/EventChannelConfig'; +import { EventChannelConfigInput } from '../models/EventChannelConfigInput'; +import { ExcludeMetadataListItemInput } from '../models/ExcludeMetadataListItemInput'; +import { ExportAnswerReportRequest } from '../models/ExportAnswerReportRequest'; +import { ExportAnswerReportRequestPngOptions } from '../models/ExportAnswerReportRequestPngOptions'; +import { ExportAnswerReportRequestRegionalSettings } from '../models/ExportAnswerReportRequestRegionalSettings'; +import { ExportLiveboardReportRequest } from '../models/ExportLiveboardReportRequest'; +import { ExportLiveboardReportRequestPdfOptions } from '../models/ExportLiveboardReportRequestPdfOptions'; +import { ExportLiveboardReportRequestPngOptions } from '../models/ExportLiveboardReportRequestPngOptions'; +import { ExportMetadataTMLBatchedRequest } from '../models/ExportMetadataTMLBatchedRequest'; +import { ExportMetadataTMLRequest } from '../models/ExportMetadataTMLRequest'; +import { ExportMetadataTMLRequestExportOptions } from '../models/ExportMetadataTMLRequestExportOptions'; +import { ExportMetadataTypeInput } from '../models/ExportMetadataTypeInput'; +import { ExportOptions } from '../models/ExportOptions'; +import { ExternalTableInput } from '../models/ExternalTableInput'; +import { FavoriteMetadataInput } from '../models/FavoriteMetadataInput'; +import { FavoriteMetadataItem } from '../models/FavoriteMetadataItem'; +import { FavoriteObjectOptionsInput } from '../models/FavoriteObjectOptionsInput'; +import { FetchAnswerDataRequest } from '../models/FetchAnswerDataRequest'; +import { FetchAnswerSqlQueryRequest } from '../models/FetchAnswerSqlQueryRequest'; +import { FetchAsyncImportTaskStatusRequest } from '../models/FetchAsyncImportTaskStatusRequest'; +import { FetchColumnSecurityRulesRequest } from '../models/FetchColumnSecurityRulesRequest'; +import { FetchConnectionDiffStatusResponse } from '../models/FetchConnectionDiffStatusResponse'; +import { FetchLiveboardDataRequest } from '../models/FetchLiveboardDataRequest'; +import { FetchLiveboardSqlQueryRequest } from '../models/FetchLiveboardSqlQueryRequest'; +import { FetchLogsRequest } from '../models/FetchLogsRequest'; +import { FetchObjectPrivilegesRequest } from '../models/FetchObjectPrivilegesRequest'; +import { FetchPermissionsOfPrincipalsRequest } from '../models/FetchPermissionsOfPrincipalsRequest'; +import { FetchPermissionsOnMetadataRequest } from '../models/FetchPermissionsOnMetadataRequest'; +import { FilterRules } from '../models/FilterRules'; +import { ForceLogoutUsersRequest } from '../models/ForceLogoutUsersRequest'; +import { Frequency } from '../models/Frequency'; +import { FrequencyInput } from '../models/FrequencyInput'; +import { GenerateCSVRequest } from '../models/GenerateCSVRequest'; +import { GenericInfo } from '../models/GenericInfo'; +import { GetAsyncImportStatusResponse } from '../models/GetAsyncImportStatusResponse'; +import { GetCustomAccessTokenRequest } from '../models/GetCustomAccessTokenRequest'; +import { GetDataSourceSuggestionsRequest } from '../models/GetDataSourceSuggestionsRequest'; +import { GetFullAccessTokenRequest } from '../models/GetFullAccessTokenRequest'; +import { GetFullAccessTokenRequestUserParameters } from '../models/GetFullAccessTokenRequestUserParameters'; +import { GetNLInstructionsRequest } from '../models/GetNLInstructionsRequest'; +import { GetObjectAccessTokenRequest } from '../models/GetObjectAccessTokenRequest'; +import { GetRelevantQuestionsRequest } from '../models/GetRelevantQuestionsRequest'; +import { GetRelevantQuestionsRequestAiContext } from '../models/GetRelevantQuestionsRequestAiContext'; +import { GetRelevantQuestionsRequestMetadataContext } from '../models/GetRelevantQuestionsRequestMetadataContext'; +import { GetTokenResponse } from '../models/GetTokenResponse'; +import { GroupInfo } from '../models/GroupInfo'; +import { GroupObject } from '../models/GroupObject'; +import { GroupsImportListInput } from '../models/GroupsImportListInput'; +import { HeaderAttributeInput } from '../models/HeaderAttributeInput'; +import { HeaderUpdateInput } from '../models/HeaderUpdateInput'; +import { ImportEPackAsyncTaskStatus } from '../models/ImportEPackAsyncTaskStatus'; +import { ImportMetadataTMLAsyncRequest } from '../models/ImportMetadataTMLAsyncRequest'; +import { ImportMetadataTMLRequest } from '../models/ImportMetadataTMLRequest'; +import { ImportUser } from '../models/ImportUser'; +import { ImportUserGroupsRequest } from '../models/ImportUserGroupsRequest'; +import { ImportUserGroupsResponse } from '../models/ImportUserGroupsResponse'; +import { ImportUserType } from '../models/ImportUserType'; +import { ImportUsersRequest } from '../models/ImportUsersRequest'; +import { ImportUsersResponse } from '../models/ImportUsersResponse'; +import { InputEurekaNLSRequest } from '../models/InputEurekaNLSRequest'; +import { JWTMetadataObject } from '../models/JWTMetadataObject'; +import { JWTParameter } from '../models/JWTParameter'; +import { JWTUserOptions } from '../models/JWTUserOptions'; +import { JWTUserOptionsFull } from '../models/JWTUserOptionsFull'; +import { JobRecipient } from '../models/JobRecipient'; +import { LiveboardContent } from '../models/LiveboardContent'; +import { LiveboardDataResponse } from '../models/LiveboardDataResponse'; +import { LiveboardOptions } from '../models/LiveboardOptions'; +import { LiveboardOptionsInput } from '../models/LiveboardOptionsInput'; +import { LogResponse } from '../models/LogResponse'; +import { LoginRequest } from '../models/LoginRequest'; +import { ManageObjectPrivilegeRequest } from '../models/ManageObjectPrivilegeRequest'; +import { MetadataAssociationItem } from '../models/MetadataAssociationItem'; +import { MetadataContext } from '../models/MetadataContext'; +import { MetadataInput } from '../models/MetadataInput'; +import { MetadataListItemInput } from '../models/MetadataListItemInput'; +import { MetadataObject } from '../models/MetadataObject'; +import { MetadataResponse } from '../models/MetadataResponse'; +import { MetadataSearchResponse } from '../models/MetadataSearchResponse'; +import { MetadataSearchSortOptions } from '../models/MetadataSearchSortOptions'; +import { ModelTableList } from '../models/ModelTableList'; +import { NLInstructionsInfo } from '../models/NLInstructionsInfo'; +import { NLInstructionsInfoInput } from '../models/NLInstructionsInfoInput'; +import { ObjectIDAndName } from '../models/ObjectIDAndName'; +import { ObjectPrivilegesMetadataInput } from '../models/ObjectPrivilegesMetadataInput'; +import { ObjectPrivilegesOfMetadataResponse } from '../models/ObjectPrivilegesOfMetadataResponse'; +import { Org } from '../models/Org'; +import { OrgChannelConfigInput } from '../models/OrgChannelConfigInput'; +import { OrgChannelConfigResponse } from '../models/OrgChannelConfigResponse'; +import { OrgDetails } from '../models/OrgDetails'; +import { OrgInfo } from '../models/OrgInfo'; +import { OrgNonEmbedAccess } from '../models/OrgNonEmbedAccess'; +import { OrgNonEmbedAccessInput } from '../models/OrgNonEmbedAccessInput'; +import { OrgPreferenceSearchCriteriaInput } from '../models/OrgPreferenceSearchCriteriaInput'; +import { OrgResponse } from '../models/OrgResponse'; +import { OrgType } from '../models/OrgType'; +import { ParameterValues } from '../models/ParameterValues'; +import { ParameterizeMetadataFieldsRequest } from '../models/ParameterizeMetadataFieldsRequest'; +import { ParameterizeMetadataRequest } from '../models/ParameterizeMetadataRequest'; +import { ParametersListItem } from '../models/ParametersListItem'; +import { ParametersListItemInput } from '../models/ParametersListItemInput'; +import { PdfOptions } from '../models/PdfOptions'; +import { PdfOptionsInput } from '../models/PdfOptionsInput'; +import { PermissionInput } from '../models/PermissionInput'; +import { PermissionOfMetadataResponse } from '../models/PermissionOfMetadataResponse'; +import { PermissionOfPrincipalsResponse } from '../models/PermissionOfPrincipalsResponse'; +import { PermissionsMetadataTypeInput } from '../models/PermissionsMetadataTypeInput'; +import { PngOptionsInput } from '../models/PngOptionsInput'; +import { PolicyProcessOptions } from '../models/PolicyProcessOptions'; +import { PolicyProcessOptionsInput } from '../models/PolicyProcessOptionsInput'; +import { PrincipalsInput } from '../models/PrincipalsInput'; +import { PrincipalsListItem } from '../models/PrincipalsListItem'; +import { PrincipalsListItemInput } from '../models/PrincipalsListItemInput'; +import { PublishMetadataListItem } from '../models/PublishMetadataListItem'; +import { PublishMetadataRequest } from '../models/PublishMetadataRequest'; +import { PutVariableValuesRequest } from '../models/PutVariableValuesRequest'; +import { QueryGetDecomposedQueryRequest } from '../models/QueryGetDecomposedQueryRequest'; +import { QueryGetDecomposedQueryRequestNlsRequest } from '../models/QueryGetDecomposedQueryRequestNlsRequest'; +import { RecipientDetails } from '../models/RecipientDetails'; +import { RecipientDetailsInput } from '../models/RecipientDetailsInput'; +import { RegionalSettingsInput } from '../models/RegionalSettingsInput'; +import { RepoConfigObject } from '../models/RepoConfigObject'; +import { ResetUserPasswordRequest } from '../models/ResetUserPasswordRequest'; +import { ResponseActivationURL } from '../models/ResponseActivationURL'; +import { ResponseCopyObject } from '../models/ResponseCopyObject'; +import { ResponseCustomAction } from '../models/ResponseCustomAction'; +import { ResponseFailedEntities } from '../models/ResponseFailedEntities'; +import { ResponseFailedEntity } from '../models/ResponseFailedEntity'; +import { ResponseIncompleteEntities } from '../models/ResponseIncompleteEntities'; +import { ResponseIncompleteEntity } from '../models/ResponseIncompleteEntity'; +import { ResponseMessage } from '../models/ResponseMessage'; +import { ResponsePostUpgradeFailedEntities } from '../models/ResponsePostUpgradeFailedEntities'; +import { ResponsePostUpgradeFailedEntity } from '../models/ResponsePostUpgradeFailedEntity'; +import { ResponseSchedule } from '../models/ResponseSchedule'; +import { ResponseScheduleRun } from '../models/ResponseScheduleRun'; +import { ResponseSuccessfulEntities } from '../models/ResponseSuccessfulEntities'; +import { ResponseSuccessfulEntity } from '../models/ResponseSuccessfulEntity'; +import { ResponseWorksheetToModelConversion } from '../models/ResponseWorksheetToModelConversion'; +import { RevertCommitRequest } from '../models/RevertCommitRequest'; +import { RevertResponse } from '../models/RevertResponse'; +import { RevertedMetadata } from '../models/RevertedMetadata'; +import { RevokeRefreshTokensRequest } from '../models/RevokeRefreshTokensRequest'; +import { RevokeRefreshTokensResponse } from '../models/RevokeRefreshTokensResponse'; +import { RevokeTokenRequest } from '../models/RevokeTokenRequest'; +import { RiseGQLArgWrapper } from '../models/RiseGQLArgWrapper'; +import { RiseSetter } from '../models/RiseSetter'; +import { Role } from '../models/Role'; +import { RoleResponse } from '../models/RoleResponse'; +import { RuntimeFilter } from '../models/RuntimeFilter'; +import { RuntimeFilters } from '../models/RuntimeFilters'; +import { RuntimeParamOverride } from '../models/RuntimeParamOverride'; +import { RuntimeParameters } from '../models/RuntimeParameters'; +import { RuntimeSort } from '../models/RuntimeSort'; +import { RuntimeSorts } from '../models/RuntimeSorts'; +import { ScheduleHistoryRunsOptionsInput } from '../models/ScheduleHistoryRunsOptionsInput'; +import { SchedulesPdfOptionsInput } from '../models/SchedulesPdfOptionsInput'; +import { SchemaObject } from '../models/SchemaObject'; +import { Scope } from '../models/Scope'; +import { ScriptSrcUrls } from '../models/ScriptSrcUrls'; +import { ScriptSrcUrlsInput } from '../models/ScriptSrcUrlsInput'; +import { SearchAuthSettingsRequest } from '../models/SearchAuthSettingsRequest'; +import { SearchAuthSettingsResponse } from '../models/SearchAuthSettingsResponse'; +import { SearchCalendarsRequest } from '../models/SearchCalendarsRequest'; +import { SearchCalendarsRequestSortOptions } from '../models/SearchCalendarsRequestSortOptions'; +import { SearchChannelHistoryRequest } from '../models/SearchChannelHistoryRequest'; +import { SearchChannelHistoryResponse } from '../models/SearchChannelHistoryResponse'; +import { SearchCollectionsRequest } from '../models/SearchCollectionsRequest'; +import { SearchCollectionsRequestSortOptions } from '../models/SearchCollectionsRequestSortOptions'; +import { SearchCommitsRequest } from '../models/SearchCommitsRequest'; +import { SearchCommunicationChannelPreferencesRequest } from '../models/SearchCommunicationChannelPreferencesRequest'; +import { SearchConfigRequest } from '../models/SearchConfigRequest'; +import { SearchConnectionRequest } from '../models/SearchConnectionRequest'; +import { SearchConnectionRequestSortOptions } from '../models/SearchConnectionRequestSortOptions'; +import { SearchConnectionResponse } from '../models/SearchConnectionResponse'; +import { SearchCustomActionsRequest } from '../models/SearchCustomActionsRequest'; +import { SearchCustomActionsRequestDefaultActionConfig } from '../models/SearchCustomActionsRequestDefaultActionConfig'; +import { SearchDataRequest } from '../models/SearchDataRequest'; +import { SearchDataResponse } from '../models/SearchDataResponse'; +import { SearchEmailCustomizationRequest } from '../models/SearchEmailCustomizationRequest'; +import { SearchMetadataRequest } from '../models/SearchMetadataRequest'; +import { SearchMetadataRequestFavoriteObjectOptions } from '../models/SearchMetadataRequestFavoriteObjectOptions'; +import { SearchMetadataRequestSortOptions } from '../models/SearchMetadataRequestSortOptions'; +import { SearchOrgsRequest } from '../models/SearchOrgsRequest'; +import { SearchRoleResponse } from '../models/SearchRoleResponse'; +import { SearchRolesRequest } from '../models/SearchRolesRequest'; +import { SearchSchedulesRequest } from '../models/SearchSchedulesRequest'; +import { SearchSchedulesRequestHistoryRunsOptions } from '../models/SearchSchedulesRequestHistoryRunsOptions'; +import { SearchSchedulesRequestSortOptions } from '../models/SearchSchedulesRequestSortOptions'; +import { SearchSecuritySettingsRequest } from '../models/SearchSecuritySettingsRequest'; +import { SearchTagsRequest } from '../models/SearchTagsRequest'; +import { SearchUserGroupsRequest } from '../models/SearchUserGroupsRequest'; +import { SearchUserGroupsRequestSortOptions } from '../models/SearchUserGroupsRequestSortOptions'; +import { SearchUsersRequest } from '../models/SearchUsersRequest'; +import { SearchVariablesRequest } from '../models/SearchVariablesRequest'; +import { SearchWebhookConfigurationsRequest } from '../models/SearchWebhookConfigurationsRequest'; +import { SearchWebhookConfigurationsRequestSortOptions } from '../models/SearchWebhookConfigurationsRequestSortOptions'; +import { SecuritySettingsClusterPreferences } from '../models/SecuritySettingsClusterPreferences'; +import { SecuritySettingsClusterPreferencesInput } from '../models/SecuritySettingsClusterPreferencesInput'; +import { SecuritySettingsOrgDetails } from '../models/SecuritySettingsOrgDetails'; +import { SecuritySettingsOrgPreferences } from '../models/SecuritySettingsOrgPreferences'; +import { SecuritySettingsOrgPreferencesInput } from '../models/SecuritySettingsOrgPreferencesInput'; +import { SecuritySettingsResponse } from '../models/SecuritySettingsResponse'; +import { SendAgentConversationMessageRequest } from '../models/SendAgentConversationMessageRequest'; +import { SendAgentConversationMessageStreamingRequest } from '../models/SendAgentConversationMessageStreamingRequest'; +import { SendAgentMessageRequest } from '../models/SendAgentMessageRequest'; +import { SendAgentMessageResponse } from '../models/SendAgentMessageResponse'; +import { SendAgentMessageStreamingRequest } from '../models/SendAgentMessageStreamingRequest'; +import { SendMessageRequest } from '../models/SendMessageRequest'; +import { SetNLInstructionsRequest } from '../models/SetNLInstructionsRequest'; +import { ShareMetadataRequest } from '../models/ShareMetadataRequest'; +import { ShareMetadataTypeInput } from '../models/ShareMetadataTypeInput'; +import { SharePermissionsInput } from '../models/SharePermissionsInput'; +import { SingleAnswerRequest } from '../models/SingleAnswerRequest'; +import { SortOption } from '../models/SortOption'; +import { SortOptionInput } from '../models/SortOptionInput'; +import { SortOptions } from '../models/SortOptions'; +import { SortingOptions } from '../models/SortingOptions'; +import { SqlQuery } from '../models/SqlQuery'; +import { SqlQueryResponse } from '../models/SqlQueryResponse'; +import { StorageConfig } from '../models/StorageConfig'; +import { StorageConfigInput } from '../models/StorageConfigInput'; +import { StorageDestination } from '../models/StorageDestination'; +import { StorageDestinationInput } from '../models/StorageDestinationInput'; +import { SyncMetadataRequest } from '../models/SyncMetadataRequest'; +import { SyncMetadataResponse } from '../models/SyncMetadataResponse'; +import { SystemConfig } from '../models/SystemConfig'; +import { SystemInfo } from '../models/SystemInfo'; +import { SystemOverrideInfo } from '../models/SystemOverrideInfo'; +import { Table } from '../models/Table'; +import { Tag } from '../models/Tag'; +import { TagMetadataTypeInput } from '../models/TagMetadataTypeInput'; +import { TemplatePropertiesInputCreate } from '../models/TemplatePropertiesInputCreate'; +import { Token } from '../models/Token'; +import { TokenAccessScopeObject } from '../models/TokenAccessScopeObject'; +import { TokenValidationResponse } from '../models/TokenValidationResponse'; +import { URL } from '../models/URL'; +import { URLInput } from '../models/URLInput'; +import { URLInputMandatory } from '../models/URLInputMandatory'; +import { UnassignTagRequest } from '../models/UnassignTagRequest'; +import { UnparameterizeMetadataRequest } from '../models/UnparameterizeMetadataRequest'; +import { UnpublishMetadataRequest } from '../models/UnpublishMetadataRequest'; +import { UpdateCalendarRequest } from '../models/UpdateCalendarRequest'; +import { UpdateCalendarRequestTableReference } from '../models/UpdateCalendarRequestTableReference'; +import { UpdateCollectionRequest } from '../models/UpdateCollectionRequest'; +import { UpdateColumnSecurityRulesRequest } from '../models/UpdateColumnSecurityRulesRequest'; +import { UpdateConfigRequest } from '../models/UpdateConfigRequest'; +import { UpdateConnectionConfigurationRequest } from '../models/UpdateConnectionConfigurationRequest'; +import { UpdateConnectionRequest } from '../models/UpdateConnectionRequest'; +import { UpdateConnectionStatusRequest } from '../models/UpdateConnectionStatusRequest'; +import { UpdateConnectionV2Request } from '../models/UpdateConnectionV2Request'; +import { UpdateCustomActionRequest } from '../models/UpdateCustomActionRequest'; +import { UpdateCustomActionRequestActionDetails } from '../models/UpdateCustomActionRequestActionDetails'; +import { UpdateCustomActionRequestDefaultActionConfig } from '../models/UpdateCustomActionRequestDefaultActionConfig'; +import { UpdateEmailCustomizationRequest } from '../models/UpdateEmailCustomizationRequest'; +import { UpdateMetadataHeaderRequest } from '../models/UpdateMetadataHeaderRequest'; +import { UpdateMetadataObjIdRequest } from '../models/UpdateMetadataObjIdRequest'; +import { UpdateObjIdInput } from '../models/UpdateObjIdInput'; +import { UpdateOrgRequest } from '../models/UpdateOrgRequest'; +import { UpdateRoleRequest } from '../models/UpdateRoleRequest'; +import { UpdateScheduleRequest } from '../models/UpdateScheduleRequest'; +import { UpdateScheduleRequestFrequency } from '../models/UpdateScheduleRequestFrequency'; +import { UpdateScheduleRequestLiveboardOptions } from '../models/UpdateScheduleRequestLiveboardOptions'; +import { UpdateScheduleRequestPdfOptions } from '../models/UpdateScheduleRequestPdfOptions'; +import { UpdateScheduleRequestRecipientDetails } from '../models/UpdateScheduleRequestRecipientDetails'; +import { UpdateSystemConfigRequest } from '../models/UpdateSystemConfigRequest'; +import { UpdateTagRequest } from '../models/UpdateTagRequest'; +import { UpdateUserGroupRequest } from '../models/UpdateUserGroupRequest'; +import { UpdateUserRequest } from '../models/UpdateUserRequest'; +import { UpdateVariableRequest } from '../models/UpdateVariableRequest'; +import { UpdateVariableValuesRequest } from '../models/UpdateVariableValuesRequest'; +import { UpdateWebhookConfigurationRequest } from '../models/UpdateWebhookConfigurationRequest'; +import { User } from '../models/User'; +import { UserGroup } from '../models/UserGroup'; +import { UserGroupResponse } from '../models/UserGroupResponse'; +import { UserInfo } from '../models/UserInfo'; +import { UserObject } from '../models/UserObject'; +import { UserParameterOptions } from '../models/UserParameterOptions'; +import { UserPrincipal } from '../models/UserPrincipal'; +import { ValidateCommunicationChannelRequest } from '../models/ValidateCommunicationChannelRequest'; +import { ValidateMergeRequest } from '../models/ValidateMergeRequest'; +import { ValidateTokenRequest } from '../models/ValidateTokenRequest'; +import { ValueScopeInput } from '../models/ValueScopeInput'; +import { Variable } from '../models/Variable'; +import { VariableDetailInput } from '../models/VariableDetailInput'; +import { VariableOrgInfo } from '../models/VariableOrgInfo'; +import { VariablePutAssignmentInput } from '../models/VariablePutAssignmentInput'; +import { VariableUpdateAssignmentInput } from '../models/VariableUpdateAssignmentInput'; +import { VariableUpdateScopeInput } from '../models/VariableUpdateScopeInput'; +import { VariableValue } from '../models/VariableValue'; +import { VariableValues } from '../models/VariableValues'; +import { WebhookAuthApiKey } from '../models/WebhookAuthApiKey'; +import { WebhookAuthApiKeyInput } from '../models/WebhookAuthApiKeyInput'; +import { WebhookAuthBasicAuth } from '../models/WebhookAuthBasicAuth'; +import { WebhookAuthBasicAuthInput } from '../models/WebhookAuthBasicAuthInput'; +import { WebhookAuthOAuth2 } from '../models/WebhookAuthOAuth2'; +import { WebhookAuthOAuth2Input } from '../models/WebhookAuthOAuth2Input'; +import { WebhookAuthentication } from '../models/WebhookAuthentication'; +import { WebhookAuthenticationInput } from '../models/WebhookAuthenticationInput'; +import { WebhookDeleteFailure } from '../models/WebhookDeleteFailure'; +import { WebhookDeleteResponse } from '../models/WebhookDeleteResponse'; +import { WebhookKeyValuePair } from '../models/WebhookKeyValuePair'; +import { WebhookKeyValuePairInput } from '../models/WebhookKeyValuePairInput'; +import { WebhookOrg } from '../models/WebhookOrg'; +import { WebhookPagination } from '../models/WebhookPagination'; +import { WebhookResponse } from '../models/WebhookResponse'; +import { WebhookSearchResponse } from '../models/WebhookSearchResponse'; +import { WebhookSignatureVerification } from '../models/WebhookSignatureVerification'; +import { WebhookSignatureVerificationInput } from '../models/WebhookSignatureVerificationInput'; +import { WebhookSortOptionsInput } from '../models/WebhookSortOptionsInput'; +import { WebhookUser } from '../models/WebhookUser'; + +import { ObservableAIApi } from "./ObservableAPI"; +import { AIApiRequestFactory, AIApiResponseProcessor} from "../apis/AIApi"; + +export interface AIApiCreateAgentConversationRequest { + /** + * + * @type CreateAgentConversationRequest + * @memberof AIApicreateAgentConversation + */ + createAgentConversationRequest: CreateAgentConversationRequest +} + +export interface AIApiCreateConversationRequest { + /** + * + * @type CreateConversationRequest + * @memberof AIApicreateConversation + */ + createConversationRequest: CreateConversationRequest +} + +export interface AIApiGetDataSourceSuggestionsRequest { + /** + * + * @type GetDataSourceSuggestionsRequest + * @memberof AIApigetDataSourceSuggestions + */ + getDataSourceSuggestionsRequest: GetDataSourceSuggestionsRequest +} + +export interface AIApiGetNLInstructionsRequest { + /** + * + * @type GetNLInstructionsRequest + * @memberof AIApigetNLInstructions + */ + getNLInstructionsRequest: GetNLInstructionsRequest +} + +export interface AIApiGetRelevantQuestionsRequest { + /** + * + * @type GetRelevantQuestionsRequest + * @memberof AIApigetRelevantQuestions + */ + getRelevantQuestionsRequest: GetRelevantQuestionsRequest +} + +export interface AIApiQueryGetDecomposedQueryRequest { + /** + * + * @type QueryGetDecomposedQueryRequest + * @memberof AIApiqueryGetDecomposedQuery + */ + queryGetDecomposedQueryRequest: QueryGetDecomposedQueryRequest +} + +export interface AIApiSendAgentConversationMessageRequest { + /** + * Unique identifier for the conversation (used to track context) + * @type string + * @memberof AIApisendAgentConversationMessage + */ + conversationIdentifier: string + /** + * + * @type SendAgentConversationMessageRequest + * @memberof AIApisendAgentConversationMessage + */ + sendAgentConversationMessageRequest: SendAgentConversationMessageRequest +} + +export interface AIApiSendAgentConversationMessageStreamingRequest { + /** + * Unique identifier for the conversation (used to track context) + * @type string + * @memberof AIApisendAgentConversationMessageStreaming + */ + conversationIdentifier: string + /** + * + * @type SendAgentConversationMessageStreamingRequest + * @memberof AIApisendAgentConversationMessageStreaming + */ + sendAgentConversationMessageStreamingRequest: SendAgentConversationMessageStreamingRequest +} + +export interface AIApiSendAgentMessageRequest { + /** + * Unique identifier for the conversation (used to track context) + * @type string + * @memberof AIApisendAgentMessage + */ + conversationIdentifier: string + /** + * + * @type SendAgentMessageRequest + * @memberof AIApisendAgentMessage + */ + sendAgentMessageRequest: SendAgentMessageRequest +} + +export interface AIApiSendAgentMessageStreamingRequest { + /** + * + * @type SendAgentMessageStreamingRequest + * @memberof AIApisendAgentMessageStreaming + */ + sendAgentMessageStreamingRequest: SendAgentMessageStreamingRequest +} + +export interface AIApiSendMessageRequest { + /** + * Unique identifier of the conversation. + * @type string + * @memberof AIApisendMessage + */ + conversationIdentifier: string + /** + * + * @type SendMessageRequest + * @memberof AIApisendMessage + */ + sendMessageRequest: SendMessageRequest +} + +export interface AIApiSetNLInstructionsRequest { + /** + * + * @type SetNLInstructionsRequest + * @memberof AIApisetNLInstructions + */ + setNLInstructionsRequest: SetNLInstructionsRequest +} + +export interface AIApiSingleAnswerRequest { + /** + * + * @type SingleAnswerRequest + * @memberof AIApisingleAnswer + */ + singleAnswerRequest: SingleAnswerRequest +} + +export interface AIApiStopConversationRequest { + /** + * Unique identifier of the conversation to stop. + * @type string + * @memberof AIApistopConversation + */ + conversationIdentifier: string +} + +export class ObjectAIApi { + private api: ObservableAIApi + + public constructor(configuration: Configuration, requestFactory?: AIApiRequestFactory, responseProcessor?: AIApiResponseProcessor) { + this.api = new ObservableAIApi(configuration, requestFactory, responseProcessor); + } + + /** + * Version: 26.2.0.cl or later Creates a new Spotter agent conversation based on the provided context and settings. The endpoint was in Beta from 26.2.0.cl through 26.4.0.cl. Requires `CAN_USE_SPOTTER` privilege and at least view access to the metadata object specified in the request. #### Usage guidelines The request must include the `metadata_context` parameter to define the conversation context. The context type can be one of: - `DATA_SOURCE` *(available from 26.5.0.cl)*: targets a specific data source. Provide `data_source_identifier` in `data_source_context` for a single data source, or `data_source_identifiers` for multi-data-source context. The deprecated `guid` field is accepted for backwards compatibility. - `AUTO_MODE` *(available from 26.5.0.cl)*: automatically discovers and selects the most relevant datasets for the user\'s queries. > **Note for callers on versions 26.2.0.cl – 26.4.0.cl (Beta):** use the lowercase `data_source` enum value with the `guid` field instead of the above. Example: `{ \"type\": \"data_source\", \"data_source_context\": { \"guid\": \"\" } }`. The `conversation_settings` parameter controls which Spotter capabilities are enabled for the conversation: - `enable_contextual_change_analysis` (default: `true`, **deprecated from 26.2.0.cl**) — always enabled in Spotter 3; setting this to `false` has no effect on versions >= 26.2.0.cl - `enable_natural_language_answer_generation` (default: `true`, **deprecated from 26.2.0.cl**) — always enabled in Spotter 3; setting this to `false` has no effect on versions >= 26.2.0.cl - `enable_reasoning` (default: `true`, **deprecated from 26.2.0.cl**) — always enabled in Spotter 3; setting this to `false` has no effect on versions >= 26.2.0.cl - `enable_save_chat` (default: `false`, *available from 26.5.0.cl*) — enables saving the conversation for later retrieval via conversation history If the request is successful, the response includes a unique `conversation_identifier` that must be passed to `sendAgentConversationMessage` or `sendAgentConversationMessageStreaming` to send messages within this conversation. The response also includes `conversation_id` with the same value for backwards compatibility; use `conversation_identifier` for new integrations. #### Example request ```json { \"metadata_context\": { \"type\": \"DATA_SOURCE\", \"data_source_context\": { \"data_source_identifier\": \"a1b2c3d4-e5f6-7890-abcd-ef1234567890\" } }, \"conversation_settings\": {} } ``` #### Error responses | Code | Description | | ---- | --------------------------------------------------------------------------------------------------------------------------------------- | | 401 | Unauthorized — authentication token is missing, expired, or invalid. | | 403 | Forbidden — the authenticated user does not have `CAN_USE_SPOTTER` privilege or lacks view permission on the specified metadata object. | > ###### Note: > > - This endpoint was in Beta from 26.2.0.cl through 26.4.0.cl and is Generally Available from version 26.5.0.cl. > - This endpoint requires Spotter - please contact ThoughtSpot support to enable Spotter on your cluster. + * @param param the request object + */ + public createAgentConversation(param: AIApiCreateAgentConversationRequest, options?: Configuration): Promise { + return this.api.createAgentConversation(param.createAgentConversationRequest, options).toPromise(); + } + + /** + * Version: 10.4.0.cl or later Creates a new conversation session tied to a specific data model for AI-driven natural language querying. Requires `CAN_USE_SPOTTER` privilege and at least view access to the metadata object specified in the request. #### Usage guidelines The request must include: - `metadata_identifier`: the unique ID of the data source that provides context for the conversation Optionally, you can provide: - `tokens`: a token string to set initial context for the conversation (e.g., `\"[sales],[item type],[state]\"`) If the request is successful, ThoughtSpot returns a unique `conversation_identifier` that must be passed to `sendMessage` to continue the conversation. #### Error responses | Code | Description | |------|-------------| | 401 | Unauthorized — authentication token is missing, expired, or invalid. | | 403 | Forbidden — the authenticated user does not have `CAN_USE_SPOTTER` privilege or lacks view permission on the specified metadata object. | > ###### Note: > * This endpoint is currently in Beta. Breaking changes may be introduced before the endpoint is made Generally Available. > * This endpoint requires Spotter - please contact ThoughtSpot support to enable Spotter on your cluster. + * @param param the request object + */ + public createConversation(param: AIApiCreateConversationRequest, options?: Configuration): Promise { + return this.api.createConversation(param.createConversationRequest, options).toPromise(); + } + + /** + * Version: 10.15.0.cl or later Suggests the most relevant data sources for a given natural language query, ranked by confidence with LLM-generated reasoning. Requires `CAN_USE_SPOTTER` privilege and at least view-level access to the underlying metadata entities referenced in the response. #### Usage guidelines The request must include: - `query`: the natural language question to find relevant data sources for If the request is successful, the API returns a ranked list of suggested data sources, each containing: - `confidence`: a float score indicating the model\'s confidence in the relevance of the suggestion - `details`: metadata about the data source - `data_source_identifier`: the unique ID of the data source - `data_source_name`: the display name of the data source - `description`: a description of the data source - `reasoning`: LLM-generated rationale explaining why the data source was recommended #### Error responses | Code | Description | |------|--------------------------------------------------------------------------------------------------------------------------------------------| | 401 | Unauthorized — authentication token is missing, expired, or invalid. | | 403 | Forbidden — the authenticated user does not have `CAN_USE_SPOTTER` privilege or lacks view permission on the underlying metadata entities. | > ###### Note: > * This endpoint is currently in Beta. Breaking changes may be introduced before it is made Generally Available. > * This endpoint requires Spotter — please contact ThoughtSpot Support to enable Spotter on your cluster. + * @param param the request object + */ + public getDataSourceSuggestions(param: AIApiGetDataSourceSuggestionsRequest, options?: Configuration): Promise { + return this.api.getDataSourceSuggestions(param.getDataSourceSuggestionsRequest, options).toPromise(); + } + + /** + * Version: 10.15.0.cl or later Retrieves existing natural language (NL) instructions configured for a specific data model. These instructions guide the AI system in understanding data context and generating more accurate responses. Requires `CAN_USE_SPOTTER` privilege, at least view access on the data model, and a bearer token corresponding to the org where the data model exists. #### Usage guidelines The request must include: - `data_source_identifier`: the unique ID of the data model to retrieve instructions for If the request is successful, the API returns: - `nl_instructions_info`: an array of instruction objects, each containing: - `instructions`: the configured text instructions for AI processing - `scope`: the scope of the instruction — currently only `GLOBAL` is supported #### Instructions scope - **GLOBAL**: Instructions that apply globally across the system on the given data-model (currently only global instructions are supported) #### Error responses | Code | Description | |------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| | 401 | Unauthorized — authentication token is missing, expired, or invalid. | | 403 | Forbidden — the authenticated user does not have `CAN_USE_SPOTTER` privilege, lacks view access on the data model, or the bearer token does not correspond to the org where the data model exists. | > ###### Note: > > - To use this API, the user needs at least view access on the data model, and must use the bearer token corresponding to the org where the data model exists. > - This endpoint is currently in Beta. Breaking changes may be introduced before the endpoint is made Generally Available. > - Available from version 10.15.0.cl and later. > - This endpoint requires Spotter — please contact ThoughtSpot Support to enable Spotter on your cluster. > - Use this API to review currently configured instructions before modifying them with `setNLInstructions`. + * @param param the request object + */ + public getNLInstructions(param: AIApiGetNLInstructionsRequest, options?: Configuration): Promise { + return this.api.getNLInstructions(param.getNLInstructionsRequest, options).toPromise(); + } + + /** + * Version: 10.13.0.cl or later Breaks down a natural language query into a series of smaller analytical sub-questions, each mapped to a relevant data source. Requires `CAN_USE_SPOTTER` privilege and at least view-level access to the referenced metadata objects. #### Usage guidelines The request must include: - `query`: the natural language question to decompose into analytical sub-questions - `metadata_context`: at least one of the following context identifiers to guide question generation: - `conversation_identifier` — an existing conversation session ID - `answer_identifiers` — a list of Answer GUIDs - `liveboard_identifiers` — a list of Liveboard GUIDs - `data_source_identifiers` — a list of data source GUIDs Optional parameters for refining the output: - `ai_context`: additional context to improve response quality - `content` — supplementary text or CSV data as string input - `instructions` — custom text instructions for the AI system - `limit_relevant_questions`: maximum number of questions to return (default: `5`) - `bypass_cache`: if `true`, forces fresh computation instead of returning cached results If the request is successful, the API returns a list of relevant analytical questions, each containing: - `query`: the generated sub-question - `data_source_identifier`: the unique ID of the data source the question targets - `data_source_name`: the display name of the corresponding data source #### Error responses | Code | Description | |------|---------------------------------------------------------------------------------------------------------------------------------------| | 401 | Unauthorized — authentication token is missing, expired, or invalid. | | 403 | Forbidden — the authenticated user does not have `CAN_USE_SPOTTER` privilege or lacks view access to the referenced metadata objects. | > ###### Note: > * This endpoint is currently in Beta. Breaking changes may be introduced before the endpoint is made Generally Available. > * This endpoint requires Spotter - please contact ThoughtSpot support to enable Spotter on your cluster. + * @param param the request object + */ + public getRelevantQuestions(param: AIApiGetRelevantQuestionsRequest, options?: Configuration): Promise { + return this.api.getRelevantQuestions(param.getRelevantQuestionsRequest, options).toPromise(); + } + + /** + * Version: 10.7.0.cl or later **Deprecated** — Use `getRelevantQuestions` instead (available from 10.13.0.cl). Breaks down a topical or goal-oriented natural language question into smaller, actionable analytical sub-questions, each mapped to a relevant data source for independent execution. Requires `CAN_USE_SPOTTER` privilege and at least view-level access to the referenced metadata objects. #### Usage guidelines The request accepts the following parameters: - `nlsRequest`: contains the user `query` to decompose, along with optional `instructions` and `bypassCache` flag - `worksheetIds`: list of data source identifiers to scope the decomposition - `answerIds`: list of Answer GUIDs whose data guides the response - `liveboardIds`: list of Liveboard GUIDs whose data guides the response - `conversationId`: an existing conversation session ID for context continuity - `content`: supplementary text or CSV data to improve response quality - `maxDecomposedQueries`: maximum number of sub-questions to return (default: `5`) If the request is successful, the API returns a `decomposedQueryResponse` containing a list of `decomposedQueries`, each with: - `query`: the generated analytical sub-question - `worksheetId`: the unique ID of the data source the question targets - `worksheetName`: the display name of the corresponding data source #### Error responses | Code | Description | |------|---------------------------------------------------------------------------------------------------------------------------------------| | 401 | Unauthorized — authentication token is missing, expired, or invalid. | | 403 | Forbidden — the authenticated user does not have `CAN_USE_SPOTTER` privilege or lacks view access to the referenced metadata objects. | > ###### Note: > * This endpoint is deprecated since 10.13.0.cl. Use `getRelevantQuestions` for new integrations. > * This endpoint is currently in Beta. Breaking changes may be introduced before the endpoint is made Generally Available. > * This endpoint requires Spotter — please contact ThoughtSpot support to enable Spotter on your cluster. + * @param param the request object + */ + public queryGetDecomposedQuery(param: AIApiQueryGetDecomposedQueryRequest, options?: Configuration): Promise { + return this.api.queryGetDecomposedQuery(param.queryGetDecomposedQueryRequest, options).toPromise(); + } + + /** + * Version: 26.5.0.cl or later Sends natural language messages to an existing Spotter agent conversation and returns the complete response synchronously. Requires `CAN_USE_SPOTTER` privilege and access to the metadata object associated with the conversation. The user must have access to the conversation session referenced by `conversation_identifier`. A conversation must first be created using the `createAgentConversation` API. #### Usage guidelines The request must include: - `conversation_identifier`: the unique session ID returned by `createAgentConversation`, used for context continuity and message tracking - `messages`: an array of one or more text messages to send to the agent The API returns an array of response objects, each containing: - `type`: the kind of response — `text`, `answer`, or `error` - `message`: the main content of the response - `metadata`: additional information depending on the message type (e.g., answer metadata includes analytics and visualization details) #### Error responses | Code | Description | |------|----------------------------------------------------------------------------------------------------------------------------------| | 401 | Unauthorized — authentication token is missing, expired, or invalid. | | 403 | Forbidden — the authenticated user does not have `CAN_USE_SPOTTER` privilege or lacks permission on the referenced conversation. | > ###### Note: > > - This endpoint is Generally Available from version 26.5.0.cl. > - This endpoint requires Spotter - please contact ThoughtSpot support to enable Spotter on your cluster. > - For real-time streamed responses, use `sendAgentConversationMessageStreaming` instead. + * @param param the request object + */ + public sendAgentConversationMessage(param: AIApiSendAgentConversationMessageRequest, options?: Configuration): Promise { + return this.api.sendAgentConversationMessage(param.conversationIdentifier, param.sendAgentConversationMessageRequest, options).toPromise(); + } + + /** + * Version: 26.5.0.cl or later Sends one or more natural language messages to an existing Spotter agent conversation and returns the response as a real-time Server-Sent Events stream. Requires `CAN_USE_SPOTTER` privilege and access to the metadata object associated with the conversation. The user must have access to the conversation session referenced by `conversation_identifier`. A conversation must first be created using the `createAgentConversation` API. #### Usage guidelines The request must include: - `conversation_identifier`: the unique session ID returned by `createAgentConversation`, used for context continuity and message tracking - `messages`: an array of one or more text messages to send to the agent If the request is valid, the API returns a Server-Sent Events (SSE) stream. Each line has the form `data: [{\"type\": \"...\", ...}]` — a JSON array of event objects. Event types include: - `ack`: confirms receipt of the request (`node_id`) - `conv_title`: conversation title (`title`, `conv_id`) - `notification`: status updates on operations (`group_id`, `metadata`, `code` — e.g. `TOOL_CALL_NOTIFICATION`, `nls_start`, `FINAL_RESPONSE_NOTIFICATION`) - `text-chunk`: incremental content chunks (`id`, `group_id`, `metadata` with `format` and `type` such as `thinking` or `text`, `content`) - `text`: full text block with same structure as `text-chunk` - `answer`: structured answer with metadata (`id`, `group_id`, `metadata` with `sage_query`, `session_id`, `title`, etc., `title`) - `error`: if a failure occurs #### Error responses | Code | Description | | ---- | -------------------------------------------------------------------------------------------------------------------------------- | | 401 | Unauthorized — authentication token is missing, expired, or invalid. | | 403 | Forbidden — the authenticated user does not have `CAN_USE_SPOTTER` privilege or lacks permission on the referenced conversation. | > ###### Note: > > - This endpoint is Generally Available from version 26.5.0.cl. > - This endpoint requires Spotter - please contact ThoughtSpot support to enable Spotter on your cluster. > - The streaming protocol uses Server-Sent Events (SSE). > - For the complete response in a single payload, use `sendAgentConversationMessage` instead. + * @param param the request object + */ + public sendAgentConversationMessageStreaming(param: AIApiSendAgentConversationMessageStreamingRequest, options?: Configuration): Promise { + return this.api.sendAgentConversationMessageStreaming(param.conversationIdentifier, param.sendAgentConversationMessageStreamingRequest, options).toPromise(); + } + + /** + * Version: 26.2.0.cl or later **Deprecated** — Use `sendAgentConversationMessage` instead. Send natural language messages to an existing Spotter agent conversation and returns the complete response synchronously. Requires `CAN_USE_SPOTTER` privilege and access to the metadata object associated with the conversation. The user must have access to the conversation session referenced by `conversation_identifier`. A conversation must first be created using the `createAgentConversation` API. #### Usage guidelines The request must include: - `conversation_identifier`: the unique session ID returned by `createAgentConversation`, used for context continuity and message tracking - `messages`: an array of one or more text messages to send to the agent The API returns an array of response objects, each containing: - `type`: the kind of response — `text`, `answer`, or `error` - `message`: the main content of the response - `metadata`: additional information depending on the message type (e.g., answer metadata includes analytics and visualization details) #### Error responses | Code | Description | |------|----------------------------------------------------------------------------------------------------------------------------------| | 401 | Unauthorized — authentication token is missing, expired, or invalid. | | 403 | Forbidden — the authenticated user does not have `CAN_USE_SPOTTER` privilege or lacks permission on the referenced conversation. | > ###### Note: > > - This endpoint is deprecated. Use `sendAgentConversationMessage` for new integrations. > - This endpoint is currently in Beta. Breaking changes may be introduced before the endpoint is made Generally Available. > - This endpoint requires Spotter - please contact ThoughtSpot support to enable Spotter on your cluster. + * @param param the request object + */ + public sendAgentMessage(param: AIApiSendAgentMessageRequest, options?: Configuration): Promise { + return this.api.sendAgentMessage(param.conversationIdentifier, param.sendAgentMessageRequest, options).toPromise(); + } + + /** + * Version: 26.2.0.cl or later **Deprecated** — Use `sendAgentConversationMessageStreaming` instead. Sends one or more natural language messages to an existing Spotter agent conversation and returns the response as a real-time Server-Sent Events stream. Requires `CAN_USE_SPOTTER` privilege and access to the metadata object associated with the conversation. The user must have access to the conversation session referenced by `conversation_identifier`. A conversation must first be created using the `createAgentConversation` API. #### Usage guidelines The request must include: - `conversation_identifier`: the unique session ID returned by `createAgentConversation`, used for context continuity and message tracking - `messages`: an array of one or more text messages to send to the agent If the request is valid, the API returns a Server-Sent Events (SSE) stream. Each line has the form `data: [{\"type\": \"...\", ...}]` — a JSON array of event objects. Event types include: - `ack`: confirms receipt of the request (`node_id`) - `conv_title`: conversation title (`title`, `conv_id`) - `notification`: status updates on operations (`group_id`, `metadata`, `code` — e.g. `TOOL_CALL_NOTIFICATION`, `nls_start`, `FINAL_RESPONSE_NOTIFICATION`) - `text-chunk`: incremental content chunks (`id`, `group_id`, `metadata` with `format` and `type` such as `thinking` or `text`, `content`) - `text`: full text block with same structure as `text-chunk` - `answer`: structured answer with metadata (`id`, `group_id`, `metadata` with `sage_query`, `session_id`, `title`, etc., `title`) - `error`: if a failure occurs #### Error responses | Code | Description | |------|----------------------------------------------------------------------------------------------------------------------------------| | 401 | Unauthorized — authentication token is missing, expired, or invalid. | | 403 | Forbidden — the authenticated user does not have `CAN_USE_SPOTTER` privilege or lacks permission on the referenced conversation. | > ###### Note: > > - This endpoint is deprecated. Use `sendAgentConversationMessageStreaming` for new integrations. > - This endpoint is currently in Beta. Breaking changes may be introduced before the endpoint is made Generally Available. > - This endpoint requires Spotter - please contact ThoughtSpot support to enable Spotter on your cluster. > - The streaming protocol uses Server-Sent Events (SSE). + * @param param the request object + */ + public sendAgentMessageStreaming(param: AIApiSendAgentMessageStreamingRequest, options?: Configuration): Promise { + return this.api.sendAgentMessageStreaming(param.sendAgentMessageStreamingRequest, options).toPromise(); + } + + /** + * Version: 10.4.0.cl or later Sends a follow-up message to an existing conversation within the context of a data model. Requires `CAN_USE_SPOTTER` privilege and at least view access to the metadata object specified in the request. A conversation must first be created using the `createConversation` API. #### Usage guidelines The request must include: - `conversation_identifier`: the unique session ID returned by `createConversation` - `metadata_identifier`: the unique ID of the data source used for the conversation - `message`: a natural language string with the follow-up question If the request is successful, the API returns an array of response messages, each containing: - `session_identifier`: the unique ID of the generated response - `generation_number`: the generation number of the response - `message_type`: the type of the response (e.g., `TSAnswer`) - `visualization_type`: the generated visualization type (`Chart`, `Table`, or `Undefined`) - `tokens` / `display_tokens`: the search tokens and user-friendly display tokens for the response #### Error responses | Code | Description | |------|-----------------------------------------------------------------------------------------------------------------------------------------| | 401 | Unauthorized — authentication token is missing, expired, or invalid. | | 403 | Forbidden — the authenticated user does not have `CAN_USE_SPOTTER` privilege or lacks view permission on the specified metadata object. | > ###### Note: > * This endpoint is currently in Beta. Breaking changes may be introduced before the endpoint is made Generally Available. > * This endpoint requires Spotter - please contact ThoughtSpot support to enable Spotter on your cluster. + * @param param the request object + */ + public sendMessage(param: AIApiSendMessageRequest, options?: Configuration): Promise> { + return this.api.sendMessage(param.conversationIdentifier, param.sendMessageRequest, options).toPromise(); + } + + /** + * Version: 10.15.0.cl or later This API allows users to set natural language (NL) instructions for a specific data-model to improve AI-generated answers and query processing. These instructions help guide the AI system to better understand the data context and provide more accurate responses. Requires `CAN_USE_SPOTTER` privilege, either edit access or `SPOTTER_COACHING_PRIVILEGE` on the data model, and a bearer token corresponding to the org where the data model exists. #### Usage guidelines To set NL instructions for a data-model, the request must include: - `data_source_identifier`: The unique ID of the data-model for which to set NL instructions - `nl_instructions_info`: An array of instruction objects, each containing: - `instructions`: Array of text instructions for the LLM - `scope`: The scope of the instruction (`GLOBAL`). Currently only `GLOBAL` is supported. It can be extended to data-model-user scope in future. #### Instructions scope - **GLOBAL**: instructions that apply to all users querying this data model If the request is successful, the API returns: - `success`: a boolean indicating whether the operation completed successfully #### Error responses | Code | Description | |------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| | 401 | Unauthorized — authentication token is missing, expired, or invalid. | | 403 | Forbidden — the authenticated user does not have `CAN_USE_SPOTTER` privilege, lacks edit access or `SPOTTER_COACHING_PRIVILEGE` on the data model, or the bearer token does not correspond to the org where the data model exists. | > ###### Note: > > - To use this API, the user needs either edit access or `SPOTTER_COACHING_PRIVILEGE` on the data model, and must use the bearer token corresponding to the org where the data model exists. > - This endpoint is currently in Beta. Breaking changes may be introduced before the endpoint is made Generally Available. > - Available from version 10.15.0.cl and later. > - This endpoint requires Spotter — please contact ThoughtSpot Support to enable Spotter on your cluster. > - Instructions help improve the accuracy and relevance of AI-generated responses for the specified data-model. + * @param param the request object + */ + public setNLInstructions(param: AIApiSetNLInstructionsRequest, options?: Configuration): Promise { + return this.api.setNLInstructions(param.setNLInstructionsRequest, options).toPromise(); + } + + /** + * Version: 10.4.0.cl or later Processes a natural language query against a specified data model and returns a single AI-generated answer without requiring a conversation session. Requires `CAN_USE_SPOTTER` privilege and at least view access to the metadata object specified in the request. #### Usage guidelines The request must include: - `query`: a natural language question (e.g., \"What were total sales last quarter?\") - `metadata_identifier`: the unique ID of the data source to query against If the request is successful, the API returns a response message containing: - `session_identifier`: the unique ID of the generated response - `generation_number`: the generation number of the response - `message_type`: the type of the response (e.g., `TSAnswer`) - `visualization_type`: the generated visualization type (`Chart`, `Table`, or `Undefined`) - `tokens` / `display_tokens`: the search tokens and user-friendly display tokens for the response #### Error responses | Code | Description | |------|-----------------------------------------------------------------------------------------------------------------------------------------| | 401 | Unauthorized — authentication token is missing, expired, or invalid. | | 403 | Forbidden — the authenticated user does not have `CAN_USE_SPOTTER` privilege or lacks view permission on the specified metadata object. | > ###### Note: > * This endpoint is currently in Beta. Breaking changes may be introduced before the endpoint is made Generally Available. > * This endpoint requires Spotter - please contact ThoughtSpot support to enable Spotter on your cluster. + * @param param the request object + */ + public singleAnswer(param: AIApiSingleAnswerRequest, options?: Configuration): Promise { + return this.api.singleAnswer(param.singleAnswerRequest, options).toPromise(); + } + + /** + * Stops an in-progress agent conversation response. Version: 26.6.0.cl or later Version: 26.6.0.cl or later Stops an in-progress agent response for the specified conversation. Use this endpoint to cancel a response that is actively being generated — for example, when the user navigates away, reformulates their question, or no longer needs the current result. Requires `CAN_USE_SPOTTER` privilege and access to the specified conversation. #### Usage guidelines The request must include: - `conversation_identifier` *(path parameter)*: the unique ID of the conversation whose active response should be stopped, as returned by `createAgentConversation` A successful request returns an empty `204 No Content` response. If there is no active response in progress at the time of the call, the request is still treated as successful. After stopping a response, the conversation session remains active. You can continue sending messages using `sendAgentConversationMessage` or `sendAgentConversationMessageStreaming`. #### Example request ```bash POST /api/rest/2.0/ai/agent/conversation/{conversation_identifier}/stop-response ``` #### Typical usage scenario This endpoint is useful when integrating Spotter into a chat UI where users can cancel a long-running query. For example: 1. User sends a message via `sendAgentConversationMessageStreaming`. 2. User clicks a \"Stop generating\" button while the response is streaming. 3. Your client calls `stopConversation` with the active `conversation_identifier`. 4. The stream is terminated and the user can ask a new question. #### Error responses | Code | Description | |------|-------------| | 401 | Unauthorized — authentication token is missing, expired, or invalid. | | 403 | Forbidden — the authenticated user does not have `CAN_USE_SPOTTER` privilege or lacks access to the specified conversation. | > ###### Note: > > - Calling this endpoint when no response is in progress does not return an error. > - The conversation context is preserved after stopping — previous messages and answers remain accessible. > - Available from version 26.6.0.cl and later. > - This endpoint requires Spotter — please contact ThoughtSpot Support to enable Spotter on your cluster. > - This feature is available only for **Spotter 3** (`SPOTTER3`) version. + * @param param the request object + */ + public stopConversation(param: AIApiStopConversationRequest, options?: Configuration): Promise { + return this.api.stopConversation(param.conversationIdentifier, options).toPromise(); + } + +} + +import { ObservableAuthenticationApi } from "./ObservableAPI"; +import { AuthenticationApiRequestFactory, AuthenticationApiResponseProcessor} from "../apis/AuthenticationApi"; + +export interface AuthenticationApiConfigureAuthSettingsRequest { + /** + * + * @type ConfigureAuthSettingsRequest + * @memberof AuthenticationApiconfigureAuthSettings + */ + configureAuthSettingsRequest: ConfigureAuthSettingsRequest +} + +export interface AuthenticationApiGetCurrentUserInfoRequest { +} + +export interface AuthenticationApiGetCurrentUserTokenRequest { +} + +export interface AuthenticationApiGetCustomAccessTokenRequest { + /** + * + * @type GetCustomAccessTokenRequest + * @memberof AuthenticationApigetCustomAccessToken + */ + getCustomAccessTokenRequest: GetCustomAccessTokenRequest +} + +export interface AuthenticationApiGetFullAccessTokenRequest { + /** + * + * @type GetFullAccessTokenRequest + * @memberof AuthenticationApigetFullAccessToken + */ + getFullAccessTokenRequest: GetFullAccessTokenRequest +} + +export interface AuthenticationApiGetObjectAccessTokenRequest { + /** + * + * @type GetObjectAccessTokenRequest + * @memberof AuthenticationApigetObjectAccessToken + */ + getObjectAccessTokenRequest: GetObjectAccessTokenRequest +} + +export interface AuthenticationApiLoginRequest { + /** + * + * @type LoginRequest + * @memberof AuthenticationApilogin + */ + loginRequest: LoginRequest +} + +export interface AuthenticationApiLogoutRequest { +} + +export interface AuthenticationApiRevokeTokenRequest { + /** + * + * @type RevokeTokenRequest + * @memberof AuthenticationApirevokeToken + */ + revokeTokenRequest: RevokeTokenRequest +} + +export interface AuthenticationApiSearchAuthSettingsRequest { + /** + * + * @type SearchAuthSettingsRequest + * @memberof AuthenticationApisearchAuthSettings + */ + searchAuthSettingsRequest: SearchAuthSettingsRequest +} + +export interface AuthenticationApiValidateTokenRequest { + /** + * + * @type ValidateTokenRequest + * @memberof AuthenticationApivalidateToken + */ + validateTokenRequest: ValidateTokenRequest +} + +export class ObjectAuthenticationApi { + private api: ObservableAuthenticationApi + + public constructor(configuration: Configuration, requestFactory?: AuthenticationApiRequestFactory, responseProcessor?: AuthenticationApiResponseProcessor) { + this.api = new ObservableAuthenticationApi(configuration, requestFactory, responseProcessor); + } + + /** + * Version: 26.6.0.cl or later Enables or disables authentication at cluster or org level for the specified auth type. Currently supports `TRUSTED_AUTH`. #### Required privileges Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) or `CONTROL_TRUSTED_AUTH` (**Can Enable or Disable Trusted Authentication**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled, the `CONTROL_TRUSTED_AUTH` privilege is required. #### Usage guidelines Use `cluster_preferences` to enable or disable authentication at the cluster level. Cluster-level settings can only be configured from the Primary Org. - `ENABLED` — Generates a new access token if one does not exist. An existing token is preserved. - `DISABLED` — Revokes the existing cluster-level access token. Use `org_preferences` to enable or disable authentication for one or more Orgs. Each entry must include an `org_identifier` (unique ID or name) and an `auth_status`. Org-level configuration requires the per-Org authentication feature to be enabled on your instance. - `ENABLED` — Generates a new org-level access token if one does not exist. - `DISABLED` — Revokes the existing org-level access token for that Org. Both `cluster_preferences` and `org_preferences` are optional. Omitting a field leaves the corresponding settings unchanged. If both are omitted, the API returns `204 No Content` without making any changes. **Note**: Cluster-level and org-level settings are independent of each other. Enabling or disabling one does not affect the other. + * @param param the request object + */ + public configureAuthSettings(param: AuthenticationApiConfigureAuthSettingsRequest, options?: Configuration): Promise { + return this.api.configureAuthSettings(param.configureAuthSettingsRequest, options).toPromise(); + } + + /** + * Version: 9.0.0.cl or later Retrieves details of the current user session for the token provided in the request header. Any ThoughtSpot user can access this endpoint and send an API request. The data returned in the API response varies according to user\'s privilege and object access permissions. **NOTE**: In ThoughtSpot, users with cluster administration privileges can access all Orgs by default. However, unless the administrator is explicitly added to an Org, the Orgs list in the session information returned by the API will include only the Primary Org. To include other Orgs in the API response, you must explicitly add the administrator to each Org in the Admin settings page in the UI or via user REST API. + * @param param the request object + */ + public getCurrentUserInfo(param: AuthenticationApiGetCurrentUserInfoRequest = {}, options?: Configuration): Promise { + return this.api.getCurrentUserInfo( options).toPromise(); + } + + /** + * Version: 9.4.0.cl or later Retrieves details of the current session token for the bearer token provided in the request header. This API endpoint does not create a new token. Instead, it returns details about the token, including the token string, creation time, expiration time, and the associated user. Use this endpoint to introspect your current session token, debug authentication issues, or when a frontend application needs session token details. Any ThoughtSpot user with a valid bearer token can access this endpoint and send an API request + * @param param the request object + */ + public getCurrentUserToken(param: AuthenticationApiGetCurrentUserTokenRequest = {}, options?: Configuration): Promise { + return this.api.getCurrentUserToken( options).toPromise(); + } + + /** + * Version: 10.4.0.cl or later Creates an authentication token that provides values for the formula variables in the Row Level Security (RLS) rules for a given user. Recommended for use cases that require Attribute-based access control (ABAC) via RLS. #### Required privileges To add a new user and assign privileges during auto-creation, the `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege is required. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled, the `CONTROL_TRUSTED_AUTH` (**Can Enable or Disable Trusted Authentication**) privilege and edit access to the data source are required. To configure formula variables for all Orgs on your instance or the Primary Org, cluster administration privileges are required. Org administrators can configure formula variables for their respective Orgs. If Role-Based Access Control (RBAC) is enabled, users with the `CAN_MANAGE_VARIABLES` (**Can manage variables**) role privilege can also create and manage variables for their Org context. #### Usage guidelines You can generate a token by providing a `username` and `password`, or by using a `secret_key`. To generate a `secret_key`, the administrator must enable [Trusted authentication](https://developers.thoughtspot.com/docs/trusted-auth-secret-key) in the **Develop** > **Customizations** > **Security Settings** page. **Note**: * When both `password` and `secret_key` are included in the API request, `password` takes precedence. * If [Multi-Factor Authentication (MFA)](https://docs.thoughtspot.com/cloud/latest/authentication-local-mfa) is enabled on your instance, the API login request with `username` and `password` returns an error. You can switch to token-based authentication with `secret_key` or contact ThoughtSpot Support for assistance. The token obtained from ThoughtSpot is valid for 5 minutes by default. You can configure the token expiration time as required. #### ABAC via RLS To implement ABAC via RLS and assign security entitlements to users during session creation, generate a token with custom variable values. The values set in the authentication token are applied to the formula variables referenced in RLS rules at the table level, which determines the data each user can access based on their entitlements. The variable values can be configured to persist for a specific set of Models in user sessions initiated with the token, allowing different RLS rules to be set for different data models. Once defined, the rules are added to the user\'s `variable_values` object, after which all sessions will use the persisted values. For more information, see [ABAC via tokens Documentation](https://developers.thoughtspot.com/docs/abac-via-rls-variables). ##### Formula variables Before defining variable values, ensure the variables are created and available on your instance. To create a formula variable, you can use the **Create variable** (`/api/rest/2.0/template/variables/create`) REST API endpoint, with the variable `type` set as `Formula_Variable` in the API request. The API doesn\'t support `\"persist_option\": \"RESET\"` and `\"persist_option\": \"NONE\"` when `variable_values` are defined in the request. If you are using `variable_values` for token generation, you must use other supported persist options such as `APPEND` or `REPLACE`. If you want to use `RESET` or `NONE`, do not pass any `variable_values`. In such cases, `variable_values` will remain unaffected. #### Supported objects The supported object type is `LOGICAL_TABLE`. When using `object_id` with `variable_values`, models are supported. #### Just-in-time provisioning For [just-in-time user creation and provisioning](https://developers.thoughtspot.com/docs/just-in-time-provisioning), specify the following attributes in the API request: * `auto_create` * `username` * `display_name` * `email` * `groups` Set `auto_create` to `true` if the username does not exist in ThoughtSpot. If the username already exists in ThoughtSpot and `auto_create` is set to `true`, user properties such as display name, email, Org and group entitlements will not be updated with new values. Setting `auto_create` to `true` does not create formula variables. Hence, this setting will not be applicable to `variable_values`. #### Important point to note All options in the token creation APIs that define user access to data in ThoughtSpot will take effect during token creation, not when the token is used for authentication. For example, `auto_create:true` will create the user when the authentication token is created. Persist options such as `APPEND` and `REPLACE` will persist `variable_values` on the user profile when the token is created. + * @param param the request object + */ + public getCustomAccessToken(param: AuthenticationApiGetCustomAccessTokenRequest, options?: Configuration): Promise { + return this.api.getCustomAccessToken(param.getCustomAccessTokenRequest, options).toPromise(); + } + + /** + * Version: 9.0.0.cl or later Generates an authentication token for creating a full session in ThoughtSpot for a given user. Recommended for use cases that do not require Attribute-based access control (ABAC) via Row Level Security (RLS). #### Usage guidelines You can generate a token for a user by providing a `username` and `password`, or by using the `secret_key` generated for your instance. To generate a `secret_key`, the administrator must enable [Trusted authentication](https://developers.thoughtspot.com/docs/trusted-auth-secret-key) in the **Develop** > **Customizations** > **Security Settings** page. **Note**: * When both `password` and `secret_key` are included in the API request, `password` takes precedence. * If [Multi-Factor Authentication (MFA)](https://docs.thoughtspot.com/cloud/latest/authentication-local-mfa) is enabled on your instance, the API login request with `username` and `password` returns an error. You can switch to token-based authentication with `secret_key` or contact ThoughtSpot Support for assistance. The token obtained from ThoughtSpot is valid for 5 minutes by default. You can configure the token expiration time as required. #### Just-in-time provisioning For [just-in-time user creation and provisioning](https://developers.thoughtspot.com/docs/just-in-time-provisioning), specify the following attributes in the API request: * `auto_create` * `username` * `display_name` * `email` * `group_identifiers` Set `auto_create` to `true` if the username does not exist in ThoughtSpot. If the user already exists in ThoughtSpot and `auto_create` is set to `true`, user properties such as display name, email and group assignment will be updated. To add a new user and assign privileges during auto-creation, the `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege is required. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled, the `CONTROL_TRUSTED_AUTH` (**Can Enable or Disable Trusted Authentication**) privilege is required. #### Important point to note All options in the token creation APIs that define user access to data in ThoughtSpot will take effect during token creation, not when the token is used for authentication. For example, `auto_create:true` will create the user when the authentication token is created. + * @param param the request object + */ + public getFullAccessToken(param: AuthenticationApiGetFullAccessTokenRequest, options?: Configuration): Promise { + return this.api.getFullAccessToken(param.getFullAccessTokenRequest, options).toPromise(); + } + + /** + * Version: 9.0.0.cl or later Generates an authentication token that provides access to a specific metadata object. This object list is intersected with the list of objects the user is allowed to access via group membership. For more information, see [Object security](https://docs.thoughtspot.com/cloud/latest/security-data-object#object_security). #### Usage guidelines You can generate a token for a user by providing a `username` and `password`, or by using the `secret_key` generated for your instance. To generate a `secret_key`, the administrator must enable [Trusted authentication](https://developers.thoughtspot.com/docs/trusted-auth-secret-key) in the **Develop** > **Customizations** > **Security Settings** page. **Note**: * When both `password` and `secret_key` are included in the API request, `password` takes precedence. * If [Multi-Factor Authentication (MFA)](https://docs.thoughtspot.com/cloud/latest/authentication-local-mfa) is enabled on your instance, the API login request with `username` and `password` returns an error. You can switch to token-based authentication with `secret_key` or contact ThoughtSpot Support for assistance. The token obtained from ThoughtSpot is valid for 5 minutes by default. You can configure the token expiration time as required. #### Just-in-time provisioning For [just-in-time user creation and provisioning](https://developers.thoughtspot.com/docs/just-in-time-provisioning), specify the following attributes in the API request: * `auto_create` * `username` * `display_name` * `email` * `group_identifiers` Set `auto_create` to `true` if the user is not available in ThoughtSpot. If the user already exists in ThoughtSpot and the `auto_create` parameter is set to `true`, user properties such as display name, email, and group assignment will be updated. To add a new user and assign privileges, the `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege is required. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled, the `CONTROL_TRUSTED_AUTH`(**Can Enable or Disable Trusted Authentication**) privilege is required. #### Important point to note All options in the token creation APIs that define user access to data in ThoughtSpot will take effect during token creation, not when the token is used for authentication. For example, `auto_create:true` will create the user when the authentication token is created. + * @param param the request object + */ + public getObjectAccessToken(param: AuthenticationApiGetObjectAccessTokenRequest, options?: Configuration): Promise { + return this.api.getObjectAccessToken(param.getObjectAccessTokenRequest, options).toPromise(); + } + + /** + * Version: 9.0.0.cl or later Creates a login session for a ThoughtSpot user with Basic authentication. In Basic authentication method, REST clients log in to ThoughtSpot using `username` and `password` attributes. On a multi-tenant cluster with Orgs, users can pass the ID of the Org in the API request to log in to a specific Org context. **Note**: If Multi-Factor Authentication (MFA) is enabled on your instance, the API login request with basic authentication (`username` and `password` ) returns an error. Contact ThoughtSpot Support for assistance. A successful login returns a session cookie that can be used in your subsequent API requests. + * @param param the request object + */ + public login(param: AuthenticationApiLoginRequest, options?: Configuration): Promise { + return this.api.login(param.loginRequest, options).toPromise(); + } + + /** + * Version: 9.0.0.cl or later Logs out a user from their current session. + * @param param the request object + */ + public logout(param: AuthenticationApiLogoutRequest = {}, options?: Configuration): Promise { + return this.api.logout( options).toPromise(); + } + + /** + * Version: 9.0.0.cl or later Revokes the authentication token issued for current user session. The token of your current session expires when you make a call to the `/api/rest/2.0/auth/token/revoke` endpoint. the users will not be able to access ThoughtSpot objects until a new token is obtained. To restart your session, request for a new token from ThoughtSpot. See [Get Full Access Token](#/http/api-endpoints/authentication/get-full-access-token). + * @param param the request object + */ + public revokeToken(param: AuthenticationApiRevokeTokenRequest, options?: Configuration): Promise { + return this.api.revokeToken(param.revokeTokenRequest, options).toPromise(); + } + + /** + * Version: 26.6.0.cl or later Returns the authentication configuration for the specified auth type at cluster and org level. Currently supports `TRUSTED_AUTH`. #### Required privileges Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) or `CONTROL_TRUSTED_AUTH` (**Can Enable or Disable Trusted Authentication**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled, the `CONTROL_TRUSTED_AUTH` privilege is required. #### Usage guidelines Use `scope` to control which level of settings are returned: - `CLUSTER` — Returns cluster-level authentication status and access tokens. Accessible only from the Primary Org. - `ORG` — Returns org-level authentication status and access tokens for the current Org. Requires the per-Org authentication feature to be enabled on your instance. - If `scope` is omitted, both cluster and org-level settings are returned based on the caller\'s org context and feature availability. The `access_tokens` array in `cluster_preferences` or `org_preferences` is omitted when no token is configured at that level. **Note**: Access tokens returned in the response are sensitive credentials. Treat them with the same care as passwords. + * @param param the request object + */ + public searchAuthSettings(param: AuthenticationApiSearchAuthSettingsRequest, options?: Configuration): Promise { + return this.api.searchAuthSettings(param.searchAuthSettingsRequest, options).toPromise(); + } + + /** + * Version: 9.12.0.cl or later Validates the authentication token specified in the API request. If your token is not valid, [Get a new token](#/http/api-endpoints/authentication/get-full-access-token). + * @param param the request object + */ + public validateToken(param: AuthenticationApiValidateTokenRequest, options?: Configuration): Promise { + return this.api.validateToken(param.validateTokenRequest, options).toPromise(); + } + +} + +import { ObservableCollectionsApi } from "./ObservableAPI"; +import { CollectionsApiRequestFactory, CollectionsApiResponseProcessor} from "../apis/CollectionsApi"; + +export interface CollectionsApiCreateCollectionRequest { + /** + * + * @type CreateCollectionRequest + * @memberof CollectionsApicreateCollection + */ + createCollectionRequest: CreateCollectionRequest +} + +export interface CollectionsApiDeleteCollectionRequest { + /** + * + * @type DeleteCollectionRequest + * @memberof CollectionsApideleteCollection + */ + deleteCollectionRequest: DeleteCollectionRequest +} + +export interface CollectionsApiSearchCollectionsRequest { + /** + * + * @type SearchCollectionsRequest + * @memberof CollectionsApisearchCollections + */ + searchCollectionsRequest: SearchCollectionsRequest +} + +export interface CollectionsApiUpdateCollectionRequest { + /** + * Unique GUID of the collection. Note: Collection names cannot be used as identifiers since duplicate names are allowed. + * @type string + * @memberof CollectionsApiupdateCollection + */ + collectionIdentifier: string + /** + * + * @type UpdateCollectionRequest + * @memberof CollectionsApiupdateCollection + */ + updateCollectionRequest: UpdateCollectionRequest +} + +export class ObjectCollectionsApi { + private api: ObservableCollectionsApi + + public constructor(configuration: Configuration, requestFactory?: CollectionsApiRequestFactory, responseProcessor?: CollectionsApiResponseProcessor) { + this.api = new ObservableCollectionsApi(configuration, requestFactory, responseProcessor); + } + + /** + * Version: 26.4.0.cl or later Creates a new collection in ThoughtSpot. Collections allow you to organize and group related metadata objects such as Liveboards, Answers, worksheets, and other data objects. You can also create nested collections (sub-collections) to build a hierarchical structure. #### Supported operations The API endpoint lets you perform the following operations: * Create a new collection * Add metadata objects (Liveboards, Answers, Logical Tables) to the collection * Create nested collections by adding sub-collections + * @param param the request object + */ + public createCollection(param: CollectionsApiCreateCollectionRequest, options?: Configuration): Promise { + return this.api.createCollection(param.createCollectionRequest, options).toPromise(); + } + + /** + * Version: 26.4.0.cl or later Deletes one or more collections from ThoughtSpot. #### Delete options * **delete_children**: When set to `true`, deletes the child objects (metadata items) within the collection that the user has access to. Objects that the user does not have permission to delete will be skipped. * **dry_run**: When set to `true`, performs a preview of the deletion operation without actually deleting anything. The response shows what would be deleted, allowing you to review before committing the deletion. #### Response The response includes: * **metadata_deleted**: List of metadata objects that were successfully deleted * **metadata_skipped**: List of metadata objects that were skipped due to lack of permissions or other constraints + * @param param the request object + */ + public deleteCollection(param: CollectionsApiDeleteCollectionRequest, options?: Configuration): Promise { + return this.api.deleteCollection(param.deleteCollectionRequest, options).toPromise(); + } + + /** + * Version: 26.4.0.cl or later Gets a list of collections available in ThoughtSpot. To get details of a specific collection, specify the collection GUID or name. You can also filter the API response based on the collection name pattern, author, and other criteria. #### Search options * **name_pattern**: Use \'%\' as a wildcard character to match collection names * **collection_identifiers**: Search for specific collections by their GUIDs or names * **include_metadata**: When set to `true`, includes the metadata objects within each collection in the response **NOTE**: If the API returns an empty list, consider increasing the value of the `record_size` parameter. To search across all available collections, set `record_size` to `-1`. + * @param param the request object + */ + public searchCollections(param: CollectionsApiSearchCollectionsRequest, options?: Configuration): Promise { + return this.api.searchCollections(param.searchCollectionsRequest, options).toPromise(); + } + + /** + * Version: 26.4.0.cl or later Updates an existing collection in ThoughtSpot. #### Supported operations This API endpoint lets you perform the following operations: * Update collection name and description * Change visibility settings * Add metadata objects to the collection (operation: ADD) * Remove metadata objects from the collection (operation: REMOVE) * Replace all metadata objects in the collection (operation: REPLACE) #### Operation types * **ADD**: Adds the specified metadata objects to the existing collection without removing current items * **REMOVE**: Removes only the specified metadata objects from the collection * **REPLACE**: Replaces all existing metadata objects with the specified items (default behavior) + * @param param the request object + */ + public updateCollection(param: CollectionsApiUpdateCollectionRequest, options?: Configuration): Promise { + return this.api.updateCollection(param.collectionIdentifier, param.updateCollectionRequest, options).toPromise(); + } + +} + +import { ObservableConnectionConfigurationsApi } from "./ObservableAPI"; +import { ConnectionConfigurationsApiRequestFactory, ConnectionConfigurationsApiResponseProcessor} from "../apis/ConnectionConfigurationsApi"; + +export interface ConnectionConfigurationsApiConnectionConfigurationSearchRequest { + /** + * + * @type ConnectionConfigurationSearchRequest + * @memberof ConnectionConfigurationsApiconnectionConfigurationSearch + */ + connectionConfigurationSearchRequest: ConnectionConfigurationSearchRequest +} + +export interface ConnectionConfigurationsApiCreateConnectionConfigurationRequest { + /** + * + * @type CreateConnectionConfigurationRequest + * @memberof ConnectionConfigurationsApicreateConnectionConfiguration + */ + createConnectionConfigurationRequest: CreateConnectionConfigurationRequest +} + +export interface ConnectionConfigurationsApiDeleteConnectionConfigurationRequest { + /** + * + * @type DeleteConnectionConfigurationRequest + * @memberof ConnectionConfigurationsApideleteConnectionConfiguration + */ + deleteConnectionConfigurationRequest: DeleteConnectionConfigurationRequest +} + +export interface ConnectionConfigurationsApiUpdateConnectionConfigurationRequest { + /** + * Unique ID or name of the configuration. + * @type string + * @memberof ConnectionConfigurationsApiupdateConnectionConfiguration + */ + configurationIdentifier: string + /** + * + * @type UpdateConnectionConfigurationRequest + * @memberof ConnectionConfigurationsApiupdateConnectionConfiguration + */ + updateConnectionConfigurationRequest: UpdateConnectionConfigurationRequest +} + +export class ObjectConnectionConfigurationsApi { + private api: ObservableConnectionConfigurationsApi + + public constructor(configuration: Configuration, requestFactory?: ConnectionConfigurationsApiRequestFactory, responseProcessor?: ConnectionConfigurationsApiResponseProcessor) { + this.api = new ObservableConnectionConfigurationsApi(configuration, requestFactory, responseProcessor); + } + + /** + * Version: 10.12.0.cl or later Gets connection configuration objects. Requires `DATAMANAGEMENT` (**Can manage data**) and edit permissions to the connection object, or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) privilege is required. #### Usage guidelines * To get a list of all configurations available in the ThoughtSpot system, send the API request with only the connection name or GUID in the request body. * To fetch details of a configuration object, specify the configuration object name or GUID. + * @param param the request object + */ + public connectionConfigurationSearch(param: ConnectionConfigurationsApiConnectionConfigurationSearchRequest, options?: Configuration): Promise> { + return this.api.connectionConfigurationSearch(param.connectionConfigurationSearchRequest, options).toPromise(); + } + + /** + * Version: 10.12.0.cl or later Creates an additional configuration to an existing connection to a data warehouse. Requires `DATAMANAGEMENT` (**Can manage data**) or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) privilege is required. #### Usage guidelines * A JSON map of configuration attributes in `configuration`. The following example shows the configuration attributes: ``` { \"user\":\"DEV_USER\", \"password\":\"TestConn123\", \"role\":\"DEV\", \"warehouse\":\"DEV_WH\" } ``` * If the `policy_type` is `PRINCIPALS`, then `policy_principals` is a required field. * If the `policy_type` is `PROCESSES`, then `policy_processes` is a required field. * If the `policy_type` is `NO_POLICY`, then `policy_principals` and `policy_processes` are not required fields. #### Parameterized Connection Support For parameterized connections that use OAuth authentication, only the same_as_parent and policy_process_options attributes are allowed in the API request. These attributes are not applicable to connections that are not parameterized. + * @param param the request object + */ + public createConnectionConfiguration(param: ConnectionConfigurationsApiCreateConnectionConfigurationRequest, options?: Configuration): Promise { + return this.api.createConnectionConfiguration(param.createConnectionConfigurationRequest, options).toPromise(); + } + + /** + * Version: 10.12.0.cl or later Deletes connection configuration objects. Requires `DATAMANAGEMENT` (**Can manage data**) and edit permissions to the connection object, or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) privilege is required. + * @param param the request object + */ + public deleteConnectionConfiguration(param: ConnectionConfigurationsApiDeleteConnectionConfigurationRequest, options?: Configuration): Promise { + return this.api.deleteConnectionConfiguration(param.deleteConnectionConfigurationRequest, options).toPromise(); + } + + /** + * Version: 10.12.0.cl or later Updates a connection configuration object. Requires `DATAMANAGEMENT` (**Can manage data**) and edit permissions to the connection object, or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) privilege is required. #### Supported operations This API endpoint lets you perform the following operations in a single API request: * Edit the name or description of the configuration * Edit the configuration properties * Edit the `policy_type` * Edit the type of authentication * Enable or disable a configuration #### Parameterized Connection Support For parameterized oauth based connections, only the `same_as_parent` and `policy_process_options` attributes are allowed. These attributes are not applicable to connections that are not parameterized. **NOTE**: When updating a configuration where `disabled` is `true`, you must reset `disabled` to `true` in your update request payload. If not explicitly set again, the API will default `disabled` to `false`. + * @param param the request object + */ + public updateConnectionConfiguration(param: ConnectionConfigurationsApiUpdateConnectionConfigurationRequest, options?: Configuration): Promise { + return this.api.updateConnectionConfiguration(param.configurationIdentifier, param.updateConnectionConfigurationRequest, options).toPromise(); + } + +} + +import { ObservableConnectionsApi } from "./ObservableAPI"; +import { ConnectionsApiRequestFactory, ConnectionsApiResponseProcessor} from "../apis/ConnectionsApi"; + +export interface ConnectionsApiCreateConnectionRequest { + /** + * + * @type CreateConnectionRequest + * @memberof ConnectionsApicreateConnection + */ + createConnectionRequest: CreateConnectionRequest +} + +export interface ConnectionsApiDeleteConnectionRequest { + /** + * + * @type DeleteConnectionRequest + * @memberof ConnectionsApideleteConnection + */ + deleteConnectionRequest: DeleteConnectionRequest +} + +export interface ConnectionsApiDeleteConnectionV2Request { + /** + * Unique ID or name of the connection. + * @type string + * @memberof ConnectionsApideleteConnectionV2 + */ + connectionIdentifier: string +} + +export interface ConnectionsApiDownloadConnectionMetadataChangesRequest { + /** + * GUID of the connection + * @type string + * @memberof ConnectionsApidownloadConnectionMetadataChanges + */ + connectionIdentifier: string +} + +export interface ConnectionsApiFetchConnectionDiffStatusRequest { + /** + * GUID of the connection + * @type string + * @memberof ConnectionsApifetchConnectionDiffStatus + */ + connectionIdentifier: string +} + +export interface ConnectionsApiRevokeRefreshTokensRequest { + /** + * Unique ID or name of the connection whose refresh tokens need to be revoked. All the users associated with the connection will have their refresh tokens revoked except the author. + * @type string + * @memberof ConnectionsApirevokeRefreshTokens + */ + connectionIdentifier: string + /** + * + * @type RevokeRefreshTokensRequest + * @memberof ConnectionsApirevokeRefreshTokens + */ + revokeRefreshTokensRequest: RevokeRefreshTokensRequest +} + +export interface ConnectionsApiSearchConnectionRequest { + /** + * + * @type SearchConnectionRequest + * @memberof ConnectionsApisearchConnection + */ + searchConnectionRequest: SearchConnectionRequest +} + +export interface ConnectionsApiSyncMetadataRequest { + /** + * Unique ID or name of the connection. + * @type string + * @memberof ConnectionsApisyncMetadata + */ + connectionIdentifier: string + /** + * + * @type SyncMetadataRequest + * @memberof ConnectionsApisyncMetadata + */ + syncMetadataRequest: SyncMetadataRequest +} + +export interface ConnectionsApiUpdateConnectionRequest { + /** + * + * @type UpdateConnectionRequest + * @memberof ConnectionsApiupdateConnection + */ + updateConnectionRequest: UpdateConnectionRequest +} + +export interface ConnectionsApiUpdateConnectionStatusRequest { + /** + * Unique ID or name of the connection. + * @type string + * @memberof ConnectionsApiupdateConnectionStatus + */ + connectionIdentifier: string + /** + * + * @type UpdateConnectionStatusRequest + * @memberof ConnectionsApiupdateConnectionStatus + */ + updateConnectionStatusRequest: UpdateConnectionStatusRequest +} + +export interface ConnectionsApiUpdateConnectionV2Request { + /** + * Unique ID or name of the connection. + * @type string + * @memberof ConnectionsApiupdateConnectionV2 + */ + connectionIdentifier: string + /** + * + * @type UpdateConnectionV2Request + * @memberof ConnectionsApiupdateConnectionV2 + */ + updateConnectionV2Request: UpdateConnectionV2Request +} + +export class ObjectConnectionsApi { + private api: ObservableConnectionsApi + + public constructor(configuration: Configuration, requestFactory?: ConnectionsApiRequestFactory, responseProcessor?: ConnectionsApiResponseProcessor) { + this.api = new ObservableConnectionsApi(configuration, requestFactory, responseProcessor); + } + + /** + * Version: 9.2.0.cl or later Creates a connection to a data warehouse for live query services. Requires `DATAMANAGEMENT` (**Can manage data**) or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) privilege is required. #### Create a connection without tables To create a connection without tables: 1. Pass these parameters in your API request. * Name of the connection. * Type of the data warehouse to connect to. * A JSON map of configuration attributes in `data_warehouse_config`. The following example shows the configuration attributes for a SnowFlake connection: ``` { \"configuration\":{ \"accountName\":\"thoughtspot_partner\", \"user\":\"tsadmin\", \"password\":\"TestConn123\", \"role\":\"sysadmin\", \"warehouse\":\"MEDIUM_WH\" }, \"authenticationType\": \"SERVICE_ACCOUNT\", \"externalDatabases\":[ ] } ``` 2. Set `validate` to `false`. **NOTE:** If the `authentication_type` is anything other than SERVICE_ACCOUNT, you must explicitly provide the authenticationType property in the payload. If you do not specify authenticationType, the API will default to SERVICE_ACCOUNT as the authentication type. #### Create a connection with tables If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) and `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` (**Can manage data models**) privilege is required. To create a connection with tables: 1. Pass these parameters in your API request. * Name of the connection. * Type of the data warehouse to connect to. * A JSON map of configuration attributes, database details, and table properties in `data_warehouse_config` as shown in the following example: ``` { \"configuration\":{ \"accountName\":\"thoughtspot_partner\", \"user\":\"tsadmin\", \"password\":\"TestConn123\", \"role\":\"sysadmin\", \"warehouse\":\"MEDIUM_WH\" }, \"authenticationType\": \"SERVICE_ACCOUNT\", \"externalDatabases\":[ { \"name\":\"AllDatatypes\", \"isAutoCreated\":false, \"schemas\":[ { \"name\":\"alldatatypes\", \"tables\":[ { \"name\":\"allDatatypes\", \"type\":\"TABLE\", \"description\":\"\", \"selected\":true, \"linked\":true, \"columns\":[ { \"name\":\"CNUMBER\", \"type\":\"INT64\", \"canImport\":true, \"selected\":true, \"isLinkedActive\":true, \"isImported\":false, \"tableName\":\"allDatatypes\", \"schemaName\":\"alldatatypes\", \"dbName\":\"AllDatatypes\" }, { \"name\":\"CDECIMAL\", \"type\":\"INT64\", \"canImport\":true, \"selected\":true, \"isLinkedActive\":true, \"isImported\":false, \"tableName\":\"allDatatypes\", \"schemaName\":\"alldatatypes\", \"dbName\":\"AllDatatypes\" } ] } ] } ] } ] } ``` 2. Set `validate` to `true`. **NOTE:** If the `authentication_type` is anything other than SERVICE_ACCOUNT, you must explicitly provide the authenticationType property in the payload. If you do not specify authenticationType, the API will default to SERVICE_ACCOUNT as the authentication type. + * @param param the request object + */ + public createConnection(param: ConnectionsApiCreateConnectionRequest, options?: Configuration): Promise { + return this.api.createConnection(param.createConnectionRequest, options).toPromise(); + } + + /** + * Version: 9.2.0.cl or later **Important**: This endpoint is deprecated and will be removed from ThoughtSpot in September 2025. ThoughtSpot strongly recommends using the [Delete Connection V2](#/http/api-endpoints/connections/delete-connection-v2) endpoint to delete your connection objects. #### Usage guidelines Deletes a connection object. Requires `DATAMANAGEMENT` (**Can manage data**) and edit permissions to the connection object, or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) privilege is required. **Note**: If a connection has dependent objects, make sure you remove its associations before the delete operation. + * @param param the request object + */ + public deleteConnection(param: ConnectionsApiDeleteConnectionRequest, options?: Configuration): Promise { + return this.api.deleteConnection(param.deleteConnectionRequest, options).toPromise(); + } + + /** + * Version: 10.4.0.cl or later Deletes a connection object. **Note**: If a connection has dependent objects, make sure you remove its associations before the delete operation. Requires `DATAMANAGEMENT` (**Can manage data**) and edit permissions to the connection object, or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) privilege is required. + * @param param the request object + */ + public deleteConnectionV2(param: ConnectionsApiDeleteConnectionV2Request, options?: Configuration): Promise { + return this.api.deleteConnectionV2(param.connectionIdentifier, options).toPromise(); + } + + /** + * Version: 9.9.0.cl or later Exports the difference in connection metadata between CDW and ThoughtSpot Requires `DATAMANAGEMENT` (**Can manage data**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the following Data control privileges may be required: - `CAN_MANAGE_CUSTOM_CALENDAR`(**Can manage custom calendars**) - `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) - `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` (**Can manage data models**) To download the connection metadata difference between ThoughtSpot and CDW, pass the connection GUID as `connection_identifier` in the API request. + * @param param the request object + */ + public downloadConnectionMetadataChanges(param: ConnectionsApiDownloadConnectionMetadataChangesRequest, options?: Configuration): Promise { + return this.api.downloadConnectionMetadataChanges(param.connectionIdentifier, options).toPromise(); + } + + /** + * Version: 9.9.0.cl or later Validates the difference in connection metadata between CDW and ThoughtSpot. Requires `DATAMANAGEMENT` (**Can manage data**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the following Data control privileges may be required: - `CAN_MANAGE_CUSTOM_CALENDAR`(**Can manage custom calendars**) - `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) - `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` (**Can manage data models**) Returns a boolean indicating whether there is any difference between the connection metadata at ThoughtSpot and CDW. To get the connection metadata difference status, pass the connection GUID as `connection_identifier` in the API request. + * @param param the request object + */ + public fetchConnectionDiffStatus(param: ConnectionsApiFetchConnectionDiffStatusRequest, options?: Configuration): Promise { + return this.api.fetchConnectionDiffStatus(param.connectionIdentifier, options).toPromise(); + } + + /** + * Version: 26.2.0.cl or later Revokes OAuth refresh tokens for users who no longer require access to a data warehouse connection. When a token is revoked, the affected user\'s session for that connection is terminated, and they must re-authenticate to regain access. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) or `DATAMANAGEMENT` (**Can manage data**) privileges. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on the ThoughtSpot instance, users with `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) privilege can also make API requests to revoke tokens for connection users. #### Usage guidelines You can specify different combinations of identifiers to control which refresh tokens are revoked. - **connection_identifier**: Revokes refresh tokens for all users of the connection, except the connection author. - **connection_identifier** and **user_identifiers**: Revokes refresh tokens only for the users specified in the request. If the name or ID of the connection author is included in the request, their token will also be revoked. - **connection_identifier** and **configuration_identifiers**: Revokes refresh tokens for all users on the specified configurations, except the configuration author. - **connection_identifier**, **configuration_identifiers**, and **user_identifiers**: Revokes refresh tokens for the specified users on the specified configurations. - **connection_identifier** and **org_identifiers**: Revokes refresh tokens for the specified Orgs. Applicable only for published connections. - **connection_identifier**, **org_identifiers**, and **user_identifiers**: Revokes refresh tokens for the specified users in the specified Orgs. Applicable only for published connections. **NOTE**: The `org_identifiers` parameter is only applicable for published connections. Using this parameter for unpublished connections will result in an error. Ensure that the connections are published before making the API request. + * @param param the request object + */ + public revokeRefreshTokens(param: ConnectionsApiRevokeRefreshTokensRequest, options?: Configuration): Promise { + return this.api.revokeRefreshTokens(param.connectionIdentifier, param.revokeRefreshTokensRequest, options).toPromise(); + } + + /** + * Version: 9.2.0.cl or later Gets connection objects. Requires `DATAMANAGEMENT` (**Can manage data**) or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) privilege is required. - To get a list of all connections available in the ThoughtSpot system, send the API request without any attributes in the request body. - To get the connection objects for a specific type of data warehouse, specify the type in `data_warehouse_types`. - To fetch details of a connection object, specify the connection object GUID or name. The `name_pattern` attribute allows passing partial text with `%` for a wildcard match. - To get details of the database, schemas, tables, or columns from a data connection object, specify `data_warehouse_object_type`. - To get a specific database, schema, table, or column from a connection object, define the object type in `data_warehouse_object_type` and object properties in the `data_warehouse_objects` array. For example, to search for a column, you must pass the database, schema, and table names in the API request. Note that in the following example, object properties are set in a hierarchical order (`database` > `schema` > `table` > `column`). ``` { \"connections\": [ { \"identifier\": \"b9d1f2ef-fa65-4a4b-994e-30fa2d57b0c2\", \"data_warehouse_objects\": [ { \"database\": \"NEBULADEV\", \"schema\": \"INFORMATION_SCHEMA\", \"table\": \"APPLICABLE_ROLES\", \"column\": \"ROLE_NAME\" } ] } ], \"data_warehouse_object_type\": \"COLUMN\" } ``` - To fetch data by `configuration`, specify `data_warehouse_object_type`. For example, to fetch columns from the `DEVELOPMENT` database, specify the `data_warehouse_object_type` as `DATABASE` and define the `configuration` string as `{\"database\":\"DEVELOPMENT\"}`. To get column data for a specific table, specify the table, for example,`{\"database\":\"RETAILAPPAREL\",\"table\":\"PIPES\"}`. - To query connections by `authentication_type`, specify `data_warehouse_object_type`. Supported values for `authentication_type` are: - `SERVICE_ACCOUNT`: For connections that require service account credentials to authenticate to the Cloud Data Warehouse and fetch data. - `OAUTH`: For connections that require OAuth credentials to authenticate to the Cloud Data Warehouse and fetch data. Teradata, Oracle, and Presto Cloud Data Warehouses do not support the OAuth authentication type. - `IAM`: For connections that have the IAM OAuth set up. This authentication type is supported on Amazon Redshift connections only. - `EXTOAUTH`: For connections that have External OAuth set up. ThoughtSpot supports external [OAuth with Microsoft Azure Active Directory (AD)](https://docs.thoughtspot.com/cloud/latest/ connections-snowflake-azure-ad-oauth) and [Okta for Snowflake data connections](https://docs.thoughtspot.com/cloud/latest/connections-snowflake-okta-oauth). - `KEY_PAIR`: For connections that require Key Pair account credentials to authenticate to the Cloud Data Warehouse and fetch data. This authentication type is supported on Snowflake connections only. - `OAUTH_WITH_PKCE`: For connections that require OAuth with PKCE account credentials to authenticate to the Cloud Data Warehouse and fetch data. This authentication type is supported on Snowflake, Starburst, Databricks, Denodo connections only. - `EXTOAUTH_WITH_PKCE`: For connections that require External OAuth With PKCE account credentials to authenticate to the Cloud Data Warehouse and fetch data. This authentication type is supported on Snowflake connections only. - `OAUTH_WITH_PEZ`: For connections that require OAuth With PEZ account credentials to authenticate to the Cloud Data Warehouse and fetch data. This authentication type is supported on Amazon Redshift connections only. - `OAUTH_WITH_SERVICE_PRINCIPAL`: For connections that require OAuth With Service Principal account credentials to authenticate to the Cloud Data Warehouse and fetch data. This authentication type is supported on Databricks connections only. - `PERSONAL_ACCESS_TOKEN`: For connections that require Personal Access Token account credentials to authenticate to the Cloud Data Warehouse and fetch data. This authentication type is supported on Databricks connections only. - `OAUTH_CLIENT_CREDENTIALS`: For connections that require OAuth Client Credentials to authenticate to the Cloud Data Warehouse and fetch data. This authentication type is supported on Snowflake connections only. - To include more details about connection objects in the API response, set `include_details` to `true`. - You can also sort the output by field names and filter connections by tags. **NOTE**: When filtering connection records by parameters other than `data_warehouse_types` or `tag_identifiers`, ensure that you set `record_size` to `-1` and `record_offset` to `0` for precise results. + * @param param the request object + */ + public searchConnection(param: ConnectionsApiSearchConnectionRequest, options?: Configuration): Promise> { + return this.api.searchConnection(param.searchConnectionRequest, options).toPromise(); + } + + /** + * Version: 26.5.0.cl or later Synchronizes connection metadata attributes from your Cloud Data Warehouse (CDW) with ThoughtSpot. Requires the `DATAMANAGEMENT` (**Can manage data**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` (**Can manage data models**) privilege is required. #### Usage guidelines To synchronize attributes from a CDW, specify the connection GUID or name in the `connection_identifier` path parameter and `sync_attributes` in the request body. Default attribute is `[\"DESCRIPTION\"]`. ##### Hierarchical schema * Connection: The connection object for the sync operation. * Tables: Tables for the sync operation. When no table is specified, all tables are synchronized. * Columns: If the table is specified, you can add the columns for the sync operation. If no columns are specified, all columns in the specified table are considered for the sync operation. To set the scope for the sync operation: * Connection-level: To sync all tables and columns, pass an empty request body, or only the attributes in the request body. * Table-level: To synchronize specific tables and their columns, specify the table identifiers in the `tables` array. * Column-level: To synchronize specific columns, specify the table identifier as the key and column identifiers as the value in the `tables` array. ``` { \"tables\": [ {\"table-guid-1\": [\"column-guid-1\", \"column-guid-2\"]}, \"table-guid-2\" ], \"sync_attributes\": [\"DESCRIPTION\"] } ``` ##### API response If the sync operation is successful, the API returns the following information: * Status of the sync operation. For example, `SUCCESS`, `PARTIAL_SUCCESS`, or `NO_UPDATE`. * Number of tables and columns that were updated. * Number of tables and columns with the sync failed status when the overall sync status is `PARTIAL_SUCCESS`. * Message text indicating the sync results. + * @param param the request object + */ + public syncMetadata(param: ConnectionsApiSyncMetadataRequest, options?: Configuration): Promise { + return this.api.syncMetadata(param.connectionIdentifier, param.syncMetadataRequest, options).toPromise(); + } + + /** + * Version: 9.2.0.cl or later **Important**: This endpoint is deprecated and will be removed from ThoughtSpot in September 2025. ThoughtSpot strongly recommends using the [Update connection V2](#/http/api-endpoints/connections/update-connection-v2) endpoint to update your connection objects. #### Usage guidelines Updates a connection object. Requires `DATAMANAGEMENT` (**Can manage data**) and edit permissions to the connection object, or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) privilege is required. To update a connection object, pass these parameters in your API request: 1. GUID of the connection object. 2. If you are updating tables or database schema of a connection object: a. Add the updated JSON map of metadata with database, schema, and tables in `data_warehouse_config`. b. Set `validate` to `true`. 3. If you are updating a configuration attribute, connection name, or description, you can set `validate` to `false`. + * @param param the request object + */ + public updateConnection(param: ConnectionsApiUpdateConnectionRequest, options?: Configuration): Promise { + return this.api.updateConnection(param.updateConnectionRequest, options).toPromise(); + } + + /** + * Version: 26.6.0.cl or later Activates or deactivates a connection. A deactivated connection cannot be used for queries or operations until it is activated again. Requires `DATAMANAGEMENT` (**Can manage data**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) privilege is required. Only the connection owner or an administrator can perform this operation. #### Usage guidelines To update the status of a connection, specify the connection GUID or name in the `connection_identifier` path parameter and the desired `status` in the request body. - **ACTIVATED**: Enables the connection. Queries and operations can resume on an activated connection. - **DEACTIVATED**: Disables the connection. It does not remove the connection metadata, but only makes the connection unavailable for queries and operations. You can reactivate a deactivated connection by setting \"status\": \"ACTIVATED\". + * @param param the request object + */ + public updateConnectionStatus(param: ConnectionsApiUpdateConnectionStatusRequest, options?: Configuration): Promise { + return this.api.updateConnectionStatus(param.connectionIdentifier, param.updateConnectionStatusRequest, options).toPromise(); + } + + /** + * Version: 10.4.0.cl or later Updates a connection object. Requires `DATAMANAGEMENT` (**Can manage data**) and edit permissions to the connection object, or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) privilege is required. To update a connection object, pass these parameters in your API request: 1. GUID of the connection object. 2. If you are updating tables or database schema of a connection object: a. Add the updated JSON map of metadata with database, schema, and tables in `data_warehouse_config`. b. Set `validate` to `true`. **NOTE:** If the `authentication_type` is anything other than SERVICE_ACCOUNT, you must explicitly provide the authenticationType property in the payload. If you do not specify authenticationType, the API will default to SERVICE_ACCOUNT as the authentication type. * A JSON map of configuration attributes, database details, and table properties in `data_warehouse_config` as shown in the following example: * This is an example of updating a single table in a empty connection: ``` { \"authenticationType\": \"SERVICE_ACCOUNT\", \"externalDatabases\": [ { \"name\": \"DEVELOPMENT\", \"isAutoCreated\": false, \"schemas\": [ { \"name\": \"TS_dataset\", \"tables\": [ { \"name\": \"DEMORENAME\", \"type\": \"TABLE\", \"description\": \"\", \"selected\": true, \"linked\": true, \"gid\": 0, \"datasetId\": \"-1\", \"subType\": \"\", \"reportId\": \"\", \"viewId\": \"\", \"columns\": [ { \"name\": \"Col1\", \"type\": \"VARCHAR\", \"canImport\": true, \"selected\": true, \"description\": \"\", \"isLinkedActive\": true, \"isAggregate\": false }, { \"name\": \"Col2\", \"type\": \"VARCHAR\", \"canImport\": true, \"selected\": true, \"description\": \"\", \"isLinkedActive\": true, \"isAggregate\": false }, { \"name\": \"Col3\", \"type\": \"VARCHAR\", \"canImport\": true, \"selected\": true, \"description\": \"\", \"isLinkedActive\": true, \"isAggregate\": false }, { \"name\": \"Col312\", \"type\": \"VARCHAR\", \"canImport\": true, \"selected\": true, \"description\": \"\", \"isLinkedActive\": true, \"isAggregate\": false }, { \"name\": \"Col4\", \"type\": \"VARCHAR\", \"canImport\": true, \"selected\": true, \"description\": \"\", \"isLinkedActive\": true, \"isAggregate\": false } ], \"relationships\": [] } ] } ] } ], \"configuration\": { \"password\": \"\", \"database\": \"DEVELOPMENT\", \"role\": \"DEV\", \"accountName\": \"thoughtspot_partner\", \"warehouse\": \"DEMO_WH\", \"user\": \"DEV_USER\" } } ``` * This is an example of updating a single table in an existing connection with tables: ``` { \"authenticationType\": \"SERVICE_ACCOUNT\", \"externalDatabases\": [ { \"name\": \"DEVELOPMENT\", \"isAutoCreated\": false, \"schemas\": [ { \"name\": \"TS_dataset\", \"tables\": [ { \"name\": \"CUSTOMER\", \"type\": \"TABLE\", \"description\": \"\", \"selected\": true, \"linked\": true, \"gid\": 0, \"datasetId\": \"-1\", \"subType\": \"\", \"reportId\": \"\", \"viewId\": \"\", \"columns\": [], \"relationships\": [] }, { \"name\": \"tpch5k_falcon_default_schema_users\", \"type\": \"TABLE\", \"description\": \"\", \"selected\": true, \"linked\": true, \"gid\": 0, \"datasetId\": \"-1\", \"subType\": \"\", \"reportId\": \"\", \"viewId\": \"\", \"columns\": [ { \"name\": \"user_id\", \"type\": \"INT64\", \"canImport\": true, \"selected\": true, \"description\": \"\", \"isLinkedActive\": true, \"isAggregate\": false }, { \"name\": \"product_id\", \"type\": \"INT64\", \"canImport\": true, \"selected\": true, \"description\": \"\", \"isLinkedActive\": true, \"isAggregate\": false }, { \"name\": \"user_cost\", \"type\": \"INT64\", \"canImport\": true, \"selected\": true, \"description\": \"\", \"isLinkedActive\": true, \"isAggregate\": false } ], \"relationships\": [] } ] } ] } ], \"configuration\": { \"password\": \"\", \"database\": \"DEVELOPMENT\", \"role\": \"DEV\", \"accountName\": \"thoughtspot_partner\", \"warehouse\": \"DEMO_WH\", \"user\": \"DEV_USER\" } } ``` 3. If you are updating a configuration attribute, connection name, or description, you can set `validate` to `false`. **NOTE:** If the `authentication_type` is anything other than SERVICE_ACCOUNT, you must explicitly provide the authenticationType property in the payload. If you do not specify authenticationType, the API will default to SERVICE_ACCOUNT as the authentication type. * A JSON map of configuration attributes in `data_warehouse_config`. The following example shows the configuration attributes for a Snowflake connection: ``` { \"configuration\":{ \"accountName\":\"thoughtspot_partner\", \"user\":\"tsadmin\", \"password\":\"TestConn123\", \"role\":\"sysadmin\", \"warehouse\":\"MEDIUM_WH\" }, \"externalDatabases\":[ ] } ``` + * @param param the request object + */ + public updateConnectionV2(param: ConnectionsApiUpdateConnectionV2Request, options?: Configuration): Promise { + return this.api.updateConnectionV2(param.connectionIdentifier, param.updateConnectionV2Request, options).toPromise(); + } + +} + +import { ObservableCustomActionApi } from "./ObservableAPI"; +import { CustomActionApiRequestFactory, CustomActionApiResponseProcessor} from "../apis/CustomActionApi"; + +export interface CustomActionApiCreateCustomActionRequest { + /** + * + * @type CreateCustomActionRequest + * @memberof CustomActionApicreateCustomAction + */ + createCustomActionRequest: CreateCustomActionRequest +} + +export interface CustomActionApiDeleteCustomActionRequest { + /** + * Unique ID or name of the custom action. + * @type string + * @memberof CustomActionApideleteCustomAction + */ + customActionIdentifier: string +} + +export interface CustomActionApiSearchCustomActionsRequest { + /** + * + * @type SearchCustomActionsRequest + * @memberof CustomActionApisearchCustomActions + */ + searchCustomActionsRequest: SearchCustomActionsRequest +} + +export interface CustomActionApiUpdateCustomActionRequest { + /** + * Unique ID or name of the custom action. + * @type string + * @memberof CustomActionApiupdateCustomAction + */ + customActionIdentifier: string + /** + * + * @type UpdateCustomActionRequest + * @memberof CustomActionApiupdateCustomAction + */ + updateCustomActionRequest: UpdateCustomActionRequest +} + +export class ObjectCustomActionApi { + private api: ObservableCustomActionApi + + public constructor(configuration: Configuration, requestFactory?: CustomActionApiRequestFactory, responseProcessor?: CustomActionApiResponseProcessor) { + this.api = new ObservableCustomActionApi(configuration, requestFactory, responseProcessor); + } + + /** + * Version: 9.6.0.cl or later Creates a custom action that appears as a menu action on a saved Answer or Liveboard visualization. Requires `DEVELOPER` (**Has Developer privilege**) or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `DEVELOPER` (**Has developer privilege**) privilege is required. #### Usage Guidelines The API lets you create the following types of custom actions: * URL-based action Allows pushing data to an external URL. * Callback action Triggers a callback to the host application and initiates a response payload on an embedded ThoughtSpot instance. By default, custom actions are visible to only administrator or developer users. To make a custom action available to other users, and specify the groups in `group_identifiers`. By default, the custom action is set as a _global_ action on all visualizations and saved Answers. To assign a custom action to specific Liveboard visualization, saved Answer, or Worksheet, set `visibility` to `false` in `default_action_config` property and specify the GUID or name of the object in `associate_metadata`. For more information, see [Custom actions](https://developers.thoughtspot.com/docs/custom-action-intro). + * @param param the request object + */ + public createCustomAction(param: CustomActionApiCreateCustomActionRequest, options?: Configuration): Promise { + return this.api.createCustomAction(param.createCustomActionRequest, options).toPromise(); + } + + /** + * Version: 9.6.0.cl or later Removes the custom action specified in the API request. Requires `DEVELOPER` (**Has Developer privilege**) or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `DEVELOPER` (**Has developer privilege**) privilege is required. + * @param param the request object + */ + public deleteCustomAction(param: CustomActionApiDeleteCustomActionRequest, options?: Configuration): Promise { + return this.api.deleteCustomAction(param.customActionIdentifier, options).toPromise(); + } + + /** + * Version: 9.6.0.cl or later Gets custom actions configured on the cluster. Requires `DEVELOPER` (**Has Developer privilege**) or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `DEVELOPER` (**Has developer privilege**) privilege is required. + * @param param the request object + */ + public searchCustomActions(param: CustomActionApiSearchCustomActionsRequest, options?: Configuration): Promise> { + return this.api.searchCustomActions(param.searchCustomActionsRequest, options).toPromise(); + } + + /** + * Version: 9.6.0.cl or later Updates a custom action. Requires `DEVELOPER` (**Has Developer privilege**) or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `DEVELOPER` (**Has developer privilege**) privilege is required. #### Usage Guidelines The API allows you to modify the following properties: * Name of the custom action * Action availability to groups * Association to metadata objects * Authentication settings for a URL-based action For more information, see [Custom actions](https://developers.thoughtspot.com/docs/custom-action-intro). + * @param param the request object + */ + public updateCustomAction(param: CustomActionApiUpdateCustomActionRequest, options?: Configuration): Promise { + return this.api.updateCustomAction(param.customActionIdentifier, param.updateCustomActionRequest, options).toPromise(); + } + +} + +import { ObservableCustomCalendarsApi } from "./ObservableAPI"; +import { CustomCalendarsApiRequestFactory, CustomCalendarsApiResponseProcessor} from "../apis/CustomCalendarsApi"; + +export interface CustomCalendarsApiCreateCalendarRequest { + /** + * + * @type CreateCalendarRequest + * @memberof CustomCalendarsApicreateCalendar + */ + createCalendarRequest: CreateCalendarRequest +} + +export interface CustomCalendarsApiDeleteCalendarRequest { + /** + * Unique ID or name of the Calendar. + * @type string + * @memberof CustomCalendarsApideleteCalendar + */ + calendarIdentifier: string +} + +export interface CustomCalendarsApiGenerateCSVRequest { + /** + * + * @type GenerateCSVRequest + * @memberof CustomCalendarsApigenerateCSV + */ + generateCSVRequest: GenerateCSVRequest +} + +export interface CustomCalendarsApiSearchCalendarsRequest { + /** + * + * @type SearchCalendarsRequest + * @memberof CustomCalendarsApisearchCalendars + */ + searchCalendarsRequest: SearchCalendarsRequest +} + +export interface CustomCalendarsApiUpdateCalendarRequest { + /** + * Unique Id or name of the calendar. + * @type string + * @memberof CustomCalendarsApiupdateCalendar + */ + calendarIdentifier: string + /** + * + * @type UpdateCalendarRequest + * @memberof CustomCalendarsApiupdateCalendar + */ + updateCalendarRequest: UpdateCalendarRequest +} + +export class ObjectCustomCalendarsApi { + private api: ObservableCustomCalendarsApi + + public constructor(configuration: Configuration, requestFactory?: CustomCalendarsApiRequestFactory, responseProcessor?: CustomCalendarsApiResponseProcessor) { + this.api = new ObservableCustomCalendarsApi(configuration, requestFactory, responseProcessor); + } + + /** + * Version: 10.12.0.cl or later Creates a new [custom calendar](https://docs.thoughtspot.com/cloud/latest/connections-cust-cal). Requires `DATAMANAGEMENT` (**Can manage data**) or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your ThoughtSpot instance, the `CAN_MANAGE_CUSTOM_CALENDAR` (**Can manage custom calendars**) privilege is required. #### Usage guidelines You can create a custom calendar from scratch or an existing Table in ThoughtSpot. For both methods of calendar creation, the following parameters are required: * Name of the custom calendar. * Calendar creation method. To create a calendar from an existing table, specify the method: - `FROM_EXISTING_TABLE` - Creates calendar from the table reference provided in the API request. - `FROM_INPUT_PARAMS` - Creates a calendar from the parameters defined in the API request. * Connection ID and Table name * Database and schema name attributes: For most Cloud Data Warehouse (CDW) connectors, both `database_name` and `schema_name` attributes are required. However, the attribute requirements are conditional and vary based on the connector type and its metadata structure. For example, for connectors such as Teradata, MySQL, SingleSore, Amazon Aurora MySQL, Amazon RDS MySQL, Oracle, and GCP_MYSQL, the `schema_name` is required, whereas the `database_name` attribute is not. Similarly, connectors such as ClickHouse require you to specify the `database_name` and the schema specification in such cases is optional. **NOTE**: If you are creating a calendar from an existing table, ensure that the referenced table matches the required DDL for custom calendars. If the schema does not match, the API returns an error. ##### Calendar type The API allows you to create the following types of calendars: * `MONTH_OFFSET`. The default calendar type. A `MONTH_OFFSET` calendar is offset by a few months from the standard calendar months (January to December) and the year begins with the month defined in the request. For example, if the `month_offset` value is set as `April`, the calendar year begins in April. * `4-4-5`. Each quarter in the calendar will include two 4-week months followed by one 5-week month. * `4-5-4`. Each quarter in the calendar will include two 4-week months with a 5-week month between. * `5-4-4`. Each quarter begins with a 5-week month, followed by two 4-week months. To start and end the calendar on a specific date, specify the dates in the `MM/DD/YYYY` format. For `MONTH_OFFSET` calendars, ensure that the `start_date` matches the month specified in the `month_offset` attribute. You can also set the starting day of the week and customize the prefixes for year and quarter labels. #### Examples To create a calendar from an existing table: ``` { \"name\": \"MyCustomCalendar1\", \"table_reference\": { \"connection_identifier\": \"4db8ea22-2ff4-4224-b05a-26674717e468\", \"table_name\": \"MyCalendarTable\", \"database_name\": \"RETAILAPPAREL\", \"schema_name\": \"PUBLIC\" }, \"creation_method\": \"FROM_EXISTING_TABLE\", } ``` To create a calendar from scratch: ``` { \"name\": \"MyCustomCalendar1\", \"table_reference\": { \"connection_identifier\": \"4db8ea22-2ff4-4224-b05a-26674717e468\", \"table_name\": \"MyCalendarTable\", \"database_name\": \"RETAILAPPAREL\", \"schema_name\": \"PUBLIC\" }, \"creation_method\": \"FROM_INPUT_PARAMS\", \"calendar_type\": \"MONTH_OFFSET\", \"month_offset\": \"April\", \"start_day_of_week\": \"Monday\", \"quarter_name_prefix\": \"Q\", \"year_name_prefix\": \"FY\", \"start_date\": \"04/01/2025\", \"end_date\": \"04/31/2025\" } ``` + * @param param the request object + */ + public createCalendar(param: CustomCalendarsApiCreateCalendarRequest, options?: Configuration): Promise { + return this.api.createCalendar(param.createCalendarRequest, options).toPromise(); + } + + /** + * Version: 10.12.0.cl or later Deletes a [custom calendar](https://docs.thoughtspot.com/cloud/latest/connections-cust-cal). Requires `DATAMANAGEMENT` (**Can manage data**) or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your ThoughtSpot instance, the `CAN_MANAGE_CUSTOM_CALENDAR` (**Can manage custom calendars**) privilege is required. #### Usage guidelines To delete a custom calendar, specify the calendar ID as a path parameter in the request URL. + * @param param the request object + */ + public deleteCalendar(param: CustomCalendarsApiDeleteCalendarRequest, options?: Configuration): Promise { + return this.api.deleteCalendar(param.calendarIdentifier, options).toPromise(); + } + + /** + * Version: 10.12.0.cl or later Exports a [custom calendar](https://docs.thoughtspot.com/cloud/latest/connections-cust-cal) in the CSV format. Requires `DATAMANAGEMENT` (**Can manage data**) or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your ThoughtSpot instance, the `CAN_MANAGE_CUSTOM_CALENDAR` (**Can manage custom calendars**) privilege is required. #### Usage guidelines Use this API to download a custom calendar in the CSV file format. In your API request, specify the following parameters. * Start and end date of the calendar. For \"month offset\" calendars, the start date must match the month defined in the `month_offset` attribute. You can also specify optional parameters such as the starting day of the week and prefixes for the quarter and year labels. + * @param param the request object + */ + public generateCSV(param: CustomCalendarsApiGenerateCSVRequest, options?: Configuration): Promise { + return this.api.generateCSV(param.generateCSVRequest, options).toPromise(); + } + + /** + * Version: 10.12.0.cl or later Gets a list of [custom calendars](https://docs.thoughtspot.com/cloud/latest/connections-cust-cal). Requires `DATAMANAGEMENT` (**Can manage data**) or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your ThoughtSpot instance, the `CAN_MANAGE_CUSTOM_CALENDAR` (**Can manage custom calendars**) privilege is required. #### Usage guidelines By default, the API returns a list of custom calendars for all connection objects. To retrieve custom calendar details for a particular connection, specify the connection ID. You can also use other search parameters such as `name_pattern` and `sort_options` as search filters. The `name_pattern` parameter filters and returns only those objects that match the specified pattern. Use `%` as a wildcard for pattern matching. + * @param param the request object + */ + public searchCalendars(param: CustomCalendarsApiSearchCalendarsRequest, options?: Configuration): Promise> { + return this.api.searchCalendars(param.searchCalendarsRequest, options).toPromise(); + } + + /** + * Version: 10.12.0.cl or later Updates the properties of a [custom calendar](https://docs.thoughtspot.com/cloud/latest/connections-cust-cal). Requires `DATAMANAGEMENT` (**Can manage data**) or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your ThoughtSpot instance, the `CAN_MANAGE_CUSTOM_CALENDAR` (**Can manage custom calendars**) privilege is required. #### Usage guidelines You can update the properties of a calendar using one of the following methods: * `FROM_INPUT_PARAMS` to update the calendar properties with the values defined in the API request. * `FROM_EXISTING_TABLE` Creates a calendar from the parameters defined in the API request. To update a custom calendar, specify the calendar ID as a path parameter in the request URL and the following parameters in the request body: * Connection ID and Table name * Database and schema name attributes: For most Cloud Data Warehouse (CDW) connectors, both `database_name` and `schema_name` attributes are required. However, the attribute requirements are conditional and vary based on the connector type and its metadata structure. For example, for connectors such as Teradata, MySQL, SingleSore, Amazon Aurora MySQL, Amazon RDS MySQL, Oracle, and GCP_MYSQL, the `schema_name` is required, whereas the `database_name` attribute is not. Similarly, connectors such as ClickHouse require you to specify the `database_name` and the schema specification in such cases is optional. The API allows you to modify the calendar type, month offset value, start and end date, starting day of the week, and prefixes assigned to the year and quarter labels. #### Examples Update a custom calendar using an existing Table in ThoughtSpot: ``` { \"update_method\": \"FROM_EXISTING_TABLE\", \"table_reference\": { \"connection_identifier\": \"Connection1\", \"database_name\": \"db1\", \"table_name\": \"custom_calendar_2025\", \"schame_name\": \"schemaVar\" } } ``` Update a custom calendar with the attributes defined in the API request: ``` { \"update_method\": \"FROM_INPUT_PARAMS\", \"table_reference\": { \"connection_identifier\": \"Connection1\", \"database_name\": \"db1\", \"table_name\": \"custom_calendar_2025\", \"schame_name\": \"schemaVar\" }, \"month_offset\": \"August\", \"start_day_of_week\": \"Monday\", \"start_date\": \"08/01/2025\", \"end_date\": \"07/31/2026\" } ``` + * @param param the request object + */ + public updateCalendar(param: CustomCalendarsApiUpdateCalendarRequest, options?: Configuration): Promise { + return this.api.updateCalendar(param.calendarIdentifier, param.updateCalendarRequest, options).toPromise(); + } + +} + +import { ObservableDBTApi } from "./ObservableAPI"; +import { DBTApiRequestFactory, DBTApiResponseProcessor} from "../apis/DBTApi"; + +export interface DBTApiDbtConnectionRequest { + /** + * Name of the connection. + * @type string + * @memberof DBTApidbtConnection + */ + connectionName: string + /** + * Name of the Database. + * @type string + * @memberof DBTApidbtConnection + */ + databaseName: string + /** + * Mention type of Import + * @type string + * @memberof DBTApidbtConnection + */ + importType?: string + /** + * Access token is mandatory when Import_Type is DBT_CLOUD. + * @type string + * @memberof DBTApidbtConnection + */ + accessToken?: string + /** + * DBT URL is mandatory when Import_Type is DBT_CLOUD. + * @type string + * @memberof DBTApidbtConnection + */ + dbtUrl?: string + /** + * Account ID is mandatory when Import_Type is DBT_CLOUD + * @type string + * @memberof DBTApidbtConnection + */ + accountId?: string + /** + * Project ID is mandatory when Import_Type is DBT_CLOUD + * @type string + * @memberof DBTApidbtConnection + */ + projectId?: string + /** + * DBT Environment ID\\\" + * @type string + * @memberof DBTApidbtConnection + */ + dbtEnvId?: string + /** + * Name of the project + * @type string + * @memberof DBTApidbtConnection + */ + projectName?: string + /** + * Upload DBT Manifest and Catalog artifact files as a ZIP file. This field is Mandatory when Import Type is \\\'ZIP_FILE\\\' + * @type HttpFile + * @memberof DBTApidbtConnection + */ + fileContent?: HttpFile +} + +export interface DBTApiDbtGenerateSyncTmlRequest { + /** + * Unique ID of the DBT connection. + * @type string + * @memberof DBTApidbtGenerateSyncTml + */ + dbtConnectionIdentifier: string + /** + * Upload DBT Manifest and Catalog artifact files as a ZIP file. This field is mandatory if the connection was created with import_type ‘ZIP_FILE’ + * @type HttpFile + * @memberof DBTApidbtGenerateSyncTml + */ + fileContent?: HttpFile +} + +export interface DBTApiDbtGenerateTmlRequest { + /** + * Unique ID of the DBT connection. + * @type string + * @memberof DBTApidbtGenerateTml + */ + dbtConnectionIdentifier: string + /** + * List of Models and their respective Tables Example: \\\'[{\\\"model_name\\\": \\\"model_name\\\", \\\"tables\\\": [\\\"table_name\\\"]}]\\\' + * @type string + * @memberof DBTApidbtGenerateTml + */ + modelTables: string + /** + * Mention the worksheet tmls to import + * @type string + * @memberof DBTApidbtGenerateTml + */ + importWorksheets: string + /** + * List of worksheets is mandatory when import_Worksheets is type SELECTED Example: [\\\"worksheet_name\\\"] + * @type string + * @memberof DBTApidbtGenerateTml + */ + worksheets?: string + /** + * Upload DBT Manifest and Catalog artifact files as a ZIP file. This field is mandatory if the connection was created with import_type ‘ZIP_FILE’ + * @type HttpFile + * @memberof DBTApidbtGenerateTml + */ + fileContent?: HttpFile +} + +export interface DBTApiDbtSearchRequest { +} + +export interface DBTApiDeleteDbtConnectionRequest { + /** + * Unique ID of the DBT Connection. + * @type string + * @memberof DBTApideleteDbtConnection + */ + dbtConnectionIdentifier: string +} + +export interface DBTApiUpdateDbtConnectionRequest { + /** + * Unique ID of the DBT Connection. + * @type string + * @memberof DBTApiupdateDbtConnection + */ + dbtConnectionIdentifier: string + /** + * Name of the connection. + * @type string + * @memberof DBTApiupdateDbtConnection + */ + connectionName?: string + /** + * Name of the Database. + * @type string + * @memberof DBTApiupdateDbtConnection + */ + databaseName?: string + /** + * Mention type of Import + * @type string + * @memberof DBTApiupdateDbtConnection + */ + importType?: string + /** + * Access token is mandatory when Import_Type is DBT_CLOUD. + * @type string + * @memberof DBTApiupdateDbtConnection + */ + accessToken?: string + /** + * DBT URL is mandatory when Import_Type is DBT_CLOUD. + * @type string + * @memberof DBTApiupdateDbtConnection + */ + dbtUrl?: string + /** + * Account ID is mandatory when Import_Type is DBT_CLOUD + * @type string + * @memberof DBTApiupdateDbtConnection + */ + accountId?: string + /** + * Project ID is mandatory when Import_Type is DBT_CLOUD + * @type string + * @memberof DBTApiupdateDbtConnection + */ + projectId?: string + /** + * DBT Environment ID\\\" + * @type string + * @memberof DBTApiupdateDbtConnection + */ + dbtEnvId?: string + /** + * Name of the project + * @type string + * @memberof DBTApiupdateDbtConnection + */ + projectName?: string + /** + * Upload DBT Manifest and Catalog artifact files as a ZIP file. This field is Mandatory when Import Type is \\\'ZIP_FILE\\\' + * @type HttpFile + * @memberof DBTApiupdateDbtConnection + */ + fileContent?: HttpFile +} + +export class ObjectDBTApi { + private api: ObservableDBTApi + + public constructor(configuration: Configuration, requestFactory?: DBTApiRequestFactory, responseProcessor?: DBTApiResponseProcessor) { + this.api = new ObservableDBTApi(configuration, requestFactory, responseProcessor); + } + + /** + * Version: 9.9.0.cl or later Creates a DBT connection object in ThoughtSpot. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege or `DATAMANAGEMENT` (**Can manage data**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the following Data control privileges may be required: - `CAN_MANAGE_CUSTOM_CALENDAR`(**Can manage custom calendars**) - `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) - `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` (**Can manage data models**) #### About create DBT connection DBT connection in ThoughtSpot is used by the user to define DBT credentials for cloud . The API needs embrace connection, embrace database name, DBT url, import type, DBT account identifier, DBT project identifier, DBT access token and environment details (or) embrace connection, embrace database name, import type, file_content to create a connection object. To know more about DBT, see ThoughtSpot Product Documentation. + * @param param the request object + */ + public dbtConnection(param: DBTApiDbtConnectionRequest, options?: Configuration): Promise { + return this.api.dbtConnection(param.connectionName, param.databaseName, param.importType, param.accessToken, param.dbtUrl, param.accountId, param.projectId, param.dbtEnvId, param.projectName, param.fileContent, options).toPromise(); + } + + /** + * Version: 9.9.0.cl or later Resynchronize the existing list of models, tables, worksheet tml’s and import them to Thoughtspot based on the DBT connection object. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege or `DATAMANAGEMENT` (**Can manage data**) privilege, along with an existing DBT connection. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the following data control privileges may be required: - `CAN_MANAGE_CUSTOM_CALENDAR`(**Can manage custom calendars**) - `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) - `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` (**Can manage data models**) + * @param param the request object + */ + public dbtGenerateSyncTml(param: DBTApiDbtGenerateSyncTmlRequest, options?: Configuration): Promise { + return this.api.dbtGenerateSyncTml(param.dbtConnectionIdentifier, param.fileContent, options).toPromise(); + } + + /** + * Version: 9.9.0.cl or later Generate required table and worksheet and import them. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege or `DATAMANAGEMENT` (**Can manage data**) privilege, along with an existing DBT connection. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the following data control privileges may be required: - `CAN_MANAGE_CUSTOM_CALENDAR`(**Can manage custom calendars**) - `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) - `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` (**Can manage data models**) #### About generate TML Models and Worksheets to be imported can be selected by the user as part of the API. + * @param param the request object + */ + public dbtGenerateTml(param: DBTApiDbtGenerateTmlRequest, options?: Configuration): Promise { + return this.api.dbtGenerateTml(param.dbtConnectionIdentifier, param.modelTables, param.importWorksheets, param.worksheets, param.fileContent, options).toPromise(); + } + + /** + * Version: 9.9.0.cl or later Gets a list of DBT connection objects by user and organization, available on the ThoughtSpot system. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege or `DATAMANAGEMENT` (**Can manage data**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the following Data control privileges may be required: - `CAN_MANAGE_CUSTOM_CALENDAR`(**Can manage custom calendars**) - `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) - `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` (**Can manage data models**) #### About search DBT connection To get details of a specific DBT connection identifier, database connection identifier, database connection name, database name, project name, project identifier, environment identifier , import type and author. + * @param param the request object + */ + public dbtSearch(param: DBTApiDbtSearchRequest = {}, options?: Configuration): Promise> { + return this.api.dbtSearch( options).toPromise(); + } + + /** + * Version: 9.9.0.cl or later Removes the specified DBT connection object from the ThoughtSpot system. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) or `DATAMANAGEMENT` (**Can manage data ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the following Data control privileges may be required: - `CAN_MANAGE_CUSTOM_CALENDAR`(**Can manage custom calendars**) - `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) - `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` (**Can manage data models**) + * @param param the request object + */ + public deleteDbtConnection(param: DBTApiDeleteDbtConnectionRequest, options?: Configuration): Promise { + return this.api.deleteDbtConnection(param.dbtConnectionIdentifier, options).toPromise(); + } + + /** + * Version: 9.9.0.cl or later Updates a DBT connection object. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege or `DATAMANAGEMENT` (**Can manage data ThoughtSpot**) privilege, along with an existing DBT connection. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the following data control privileges may be required: - `CAN_MANAGE_CUSTOM_CALENDAR`(**Can manage custom calendars**) - `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) - `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` (**Can manage data models**) #### About update DBT connection You can modify DBT connection object properties such as embrace connection name, embrace database name, import type, account identifier, access token, project identifier and environment (or) embrace connection, embrace database name, import type, file_content settings. + * @param param the request object + */ + public updateDbtConnection(param: DBTApiUpdateDbtConnectionRequest, options?: Configuration): Promise { + return this.api.updateDbtConnection(param.dbtConnectionIdentifier, param.connectionName, param.databaseName, param.importType, param.accessToken, param.dbtUrl, param.accountId, param.projectId, param.dbtEnvId, param.projectName, param.fileContent, options).toPromise(); + } + +} + +import { ObservableDataApi } from "./ObservableAPI"; +import { DataApiRequestFactory, DataApiResponseProcessor} from "../apis/DataApi"; + +export interface DataApiFetchAnswerDataRequest { + /** + * + * @type FetchAnswerDataRequest + * @memberof DataApifetchAnswerData + */ + fetchAnswerDataRequest: FetchAnswerDataRequest +} + +export interface DataApiFetchLiveboardDataRequest { + /** + * + * @type FetchLiveboardDataRequest + * @memberof DataApifetchLiveboardData + */ + fetchLiveboardDataRequest: FetchLiveboardDataRequest +} + +export interface DataApiSearchDataRequest { + /** + * + * @type SearchDataRequest + * @memberof DataApisearchData + */ + searchDataRequest: SearchDataRequest +} + +export class ObjectDataApi { + private api: ObservableDataApi + + public constructor(configuration: Configuration, requestFactory?: DataApiRequestFactory, responseProcessor?: DataApiResponseProcessor) { + this.api = new ObservableDataApi(configuration, requestFactory, responseProcessor); + } + + /** + * Version: 9.0.0.cl or later Fetches data from a saved Answer. Requires at least view access to the saved Answer. The `record_size` attribute determines the number of records to retrieve in an API call. For more information about pagination, record size, and maximum row limit, see [Pagination and record size settings](https://developers.thoughtspot.com/docs/fetch-data-and-report-apis#_pagination_settings_for_data_and_report_apis). + * @param param the request object + */ + public fetchAnswerData(param: DataApiFetchAnswerDataRequest, options?: Configuration): Promise { + return this.api.fetchAnswerData(param.fetchAnswerDataRequest, options).toPromise(); + } + + /** + * Version: 9.0.0.cl or later Gets data from a Liveboard object and its visualization. Requires at least view access to the Liveboard. #### Usage guidelines In the request body, specify the GUID or name of the Liveboard. To get data for specific visualizations, add the GUIDs or names of the visualizations in the API request. To include unsaved changes in the report, pass the `transient_pinboard_content` script generated from the `getExportRequestForCurrentPinboard` method in the Visual Embed SDK. Upon successful execution, the API returns the report with unsaved changes. If the new Liveboard experience mode, the transient content includes ad hoc changes to visualizations such as sorting, toggling of legends, and data drill down. For more information, and see [Liveboard data API](https://developers.thoughtspot.com/docs/fetch-data-and-report-apis#_fetch_liveboard_data_api). + * @param param the request object + */ + public fetchLiveboardData(param: DataApiFetchLiveboardDataRequest, options?: Configuration): Promise { + return this.api.fetchLiveboardData(param.fetchLiveboardDataRequest, options).toPromise(); + } + + /** + * Version: 9.0.0.cl or later Generates an Answer from a given data source. Requires at least view access to the data source object (Worksheet or View). #### Usage guidelines To search data, specify the data source GUID in `logical_table_identifier`. The data source can be a Worksheet, View, Table, or SQL view. Pass search tokens in the `query_string` attribute in the API request as shown in the following example: ``` { \"query_string\": \"[sales] by [store]\", \"logical_table_identifier\": \"cd252e5c-b552-49a8-821d-3eadaa049cca\", } ``` For more information about the `query_string` format and data source attribute, see [Search data API](https://developers.thoughtspot.com/docs/fetch-data-and-report-apis#_search_data_api). The `record_size` attribute determines the number of records to retrieve in an API call. For more information about pagination, record size, and maximum row limit, see [Pagination and record size settings](https://developers.thoughtspot.com/docs/fetch-data-and-report-apis#_pagination_settings_for_data_and_report_api). + * @param param the request object + */ + public searchData(param: DataApiSearchDataRequest, options?: Configuration): Promise { + return this.api.searchData(param.searchDataRequest, options).toPromise(); + } + +} + +import { ObservableEmailCustomizationApi } from "./ObservableAPI"; +import { EmailCustomizationApiRequestFactory, EmailCustomizationApiResponseProcessor} from "../apis/EmailCustomizationApi"; + +export interface EmailCustomizationApiCreateEmailCustomizationRequest { + /** + * + * @type CreateEmailCustomizationRequest + * @memberof EmailCustomizationApicreateEmailCustomization + */ + createEmailCustomizationRequest: CreateEmailCustomizationRequest +} + +export interface EmailCustomizationApiDeleteEmailCustomizationRequest { + /** + * Unique ID or name of the email customization. + * @type string + * @memberof EmailCustomizationApideleteEmailCustomization + */ + templateIdentifier: string +} + +export interface EmailCustomizationApiDeleteOrgEmailCustomizationRequest { + /** + * + * @type DeleteOrgEmailCustomizationRequest + * @memberof EmailCustomizationApideleteOrgEmailCustomization + */ + deleteOrgEmailCustomizationRequest: DeleteOrgEmailCustomizationRequest +} + +export interface EmailCustomizationApiSearchEmailCustomizationRequest { + /** + * + * @type SearchEmailCustomizationRequest + * @memberof EmailCustomizationApisearchEmailCustomization + */ + searchEmailCustomizationRequest: SearchEmailCustomizationRequest +} + +export interface EmailCustomizationApiUpdateEmailCustomizationRequest { + /** + * + * @type UpdateEmailCustomizationRequest + * @memberof EmailCustomizationApiupdateEmailCustomization + */ + updateEmailCustomizationRequest: UpdateEmailCustomizationRequest +} + +export interface EmailCustomizationApiValidateEmailCustomizationRequest { +} + +export class ObjectEmailCustomizationApi { + private api: ObservableEmailCustomizationApi + + public constructor(configuration: Configuration, requestFactory?: EmailCustomizationApiRequestFactory, responseProcessor?: EmailCustomizationApiResponseProcessor) { + this.api = new ObservableEmailCustomizationApi(configuration, requestFactory, responseProcessor); + } + + /** + * Version: 10.10.0.cl or later Creates a customization configuration for the notification email. #### Pre-requisites Requires `DEVELOPER` (**has developer privilege**) or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `DEVELOPER` (**Has developer privilege**) privilege is required. **NOTE**:This endpoint in currently in beta. Contact ThoughtSpot support to enable this on your instance. #### Usage guidelines To create a custom configuration pass these parameters in your API request: - A JSON map of configuration attributes `template_properties`. The following example shows a sample set of customization configuration: ``` { { \"cta_button_bg_color\": \"#444DEA\", \"cta_text_font_color\": \"#FFFFFF\", \"primary_bg_color\": \"#D3DEF0\", \"logo_url\": \"https://storage.pardot.com/710713/1642089901EbkRibJq/TS_fullworkmark_darkmode.png\", \"font_family\": \"\", \"product_name\": \"ThoughtSpot\", \"footer_address\": \"444 Castro St, Suite 1000 Mountain View, CA 94041\", \"footer_phone\": \"(800) 508-7008\", \"replacement_value_for_liveboard\": \"Dashboard\", \"replacement_value_for_answer\": \"Chart\", \"replacement_value_for_spot_iq\": \"AI Insights\", \"hide_footer_phone\": false, \"hide_footer_address\": false, \"hide_product_name\": false, \"hide_manage_notification\": false, \"hide_mobile_app_nudge\": false, \"hide_privacy_policy\": false, \"hide_ts_vocabulary_definitions\": false, \"hide_error_message\": false, \"hide_unsubscribe_link\": false, \"hide_notification_status\": false, \"hide_modify_alert\": false, \"company_website_url\": \"https://your-website.com/\", \"company_privacy_policy_url\" : \"https://link-to-privacy-policy.com/\", \"contact_support_url\": \"https://link-to-contact-support.com/\", \"hide_contact_support_url\": false, \"hide_logo_url\" : false } } ``` + * @param param the request object + */ + public createEmailCustomization(param: EmailCustomizationApiCreateEmailCustomizationRequest, options?: Configuration): Promise { + return this.api.createEmailCustomization(param.createEmailCustomizationRequest, options).toPromise(); + } + + /** + * Version: 10.10.0.cl or later Deletes the configuration for the email customization. #### Pre-requisites Requires `DEVELOPER` (**has developer privilege**) or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `DEVELOPER` (**Has developer privilege**) privilege is required. **NOTE**:This endpoint in currently in beta. Contact ThoughtSpot support to enable this on your instance. #### Usage guidelines - Call the search API endpoint to get the `template_identifier` from the response. - Use that `template_identifier` as a parameter in this API request. + * @param param the request object + */ + public deleteEmailCustomization(param: EmailCustomizationApiDeleteEmailCustomizationRequest, options?: Configuration): Promise { + return this.api.deleteEmailCustomization(param.templateIdentifier, options).toPromise(); + } + + /** + * Version: 10.12.0.cl or later Deletes the configuration for the email customization. #### Pre-requisites Requires `DEVELOPER` (**has developer privilege**) or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `DEVELOPER` (**Has developer privilege**) privilege is required. **NOTE**:This endpoint in currently in beta. Contact ThoughtSpot support to enable this on your instance. #### Usage guidelines - Call the search API endpoint to get the `org_identifier` from the response. - Use that `org_identifier` as a parameter in this API request. + * @param param the request object + */ + public deleteOrgEmailCustomization(param: EmailCustomizationApiDeleteOrgEmailCustomizationRequest, options?: Configuration): Promise { + return this.api.deleteOrgEmailCustomization(param.deleteOrgEmailCustomizationRequest, options).toPromise(); + } + + /** + * Version: 10.10.0.cl or later Search the email customization configuration if any set for the ThoughtSpot system. #### Pre-requisites Requires `DEVELOPER` (**has developer privilege**) or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `DEVELOPER` (**Has developer privilege**) privilege is required. **NOTE**:This endpoint in currently in beta. Contact ThoughtSpot support to enable this on your instance. + * @param param the request object + */ + public searchEmailCustomization(param: EmailCustomizationApiSearchEmailCustomizationRequest, options?: Configuration): Promise> { + return this.api.searchEmailCustomization(param.searchEmailCustomizationRequest, options).toPromise(); + } + + /** + * Version: 10.12.0.cl or later Updates a customization configuration for the notification email. #### Pre-requisites Requires `DEVELOPER` (**has developer privilege**) or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `DEVELOPER` (**Has developer privilege**) privilege is required. **NOTE**:This endpoint in currently in beta. Contact ThoughtSpot support to enable this on your instance. #### Usage guidelines To update a custom configuration pass these parameters in your API request: - A JSON map of configuration attributes `template_properties`. The following example shows a sample set of customization configuration: ``` { { \"cta_button_bg_color\": \"#444DEA\", \"cta_text_font_color\": \"#FFFFFF\", \"primary_bg_color\": \"#D3DEF0\", \"logo_url\": \"https://storage.pardot.com/710713/1642089901EbkRibJq/TS_fullworkmark_darkmode.png\", \"font_family\": \"\", \"product_name\": \"ThoughtSpot\", \"footer_address\": \"444 Castro St, Suite 1000 Mountain View, CA 94041\", \"footer_phone\": \"(800) 508-7008\", \"replacement_value_for_liveboard\": \"Dashboard\", \"replacement_value_for_answer\": \"Chart\", \"replacement_value_for_spot_iq\": \"AI Insights\", \"hide_footer_phone\": false, \"hide_footer_address\": false, \"hide_product_name\": false, \"hide_manage_notification\": false, \"hide_mobile_app_nudge\": false, \"hide_privacy_policy\": false, \"hide_ts_vocabulary_definitions\": false, \"hide_error_message\": false, \"hide_unsubscribe_link\": false, \"hide_notification_status\": false, \"hide_modify_alert\": false, \"company_website_url\": \"https://your-website.com/\", \"company_privacy_policy_url\" : \"https://link-to-privacy-policy.com/\", \"contact_support_url\": \"https://link-to-contact-support.com/\", \"hide_contact_support_url\": false, \"hide_logo_url\" : false } } ``` + * @param param the request object + */ + public updateEmailCustomization(param: EmailCustomizationApiUpdateEmailCustomizationRequest, options?: Configuration): Promise { + return this.api.updateEmailCustomization(param.updateEmailCustomizationRequest, options).toPromise(); + } + + /** + * Version: 10.10.0.cl or later Validates the email customization configuration if any set for the ThoughtSpot system. #### Pre-requisites Requires `DEVELOPER` (**has developer privilege**) or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `DEVELOPER` (**Has developer privilege**) privilege is required. **NOTE**:This endpoint in currently in beta. Contact ThoughtSpot support to enable this on your instance. + * @param param the request object + */ + public validateEmailCustomization(param: EmailCustomizationApiValidateEmailCustomizationRequest = {}, options?: Configuration): Promise { + return this.api.validateEmailCustomization( options).toPromise(); + } + +} + +import { ObservableGroupsApi } from "./ObservableAPI"; +import { GroupsApiRequestFactory, GroupsApiResponseProcessor} from "../apis/GroupsApi"; + +export interface GroupsApiCreateUserGroupRequest { + /** + * + * @type CreateUserGroupRequest + * @memberof GroupsApicreateUserGroup + */ + createUserGroupRequest: CreateUserGroupRequest +} + +export interface GroupsApiDeleteUserGroupRequest { + /** + * GUID or name of the group. + * @type string + * @memberof GroupsApideleteUserGroup + */ + groupIdentifier: string +} + +export interface GroupsApiImportUserGroupsRequest { + /** + * + * @type ImportUserGroupsRequest + * @memberof GroupsApiimportUserGroups + */ + importUserGroupsRequest: ImportUserGroupsRequest +} + +export interface GroupsApiSearchUserGroupsRequest { + /** + * + * @type SearchUserGroupsRequest + * @memberof GroupsApisearchUserGroups + */ + searchUserGroupsRequest: SearchUserGroupsRequest +} + +export interface GroupsApiUpdateUserGroupRequest { + /** + * GUID or name of the group. + * @type string + * @memberof GroupsApiupdateUserGroup + */ + groupIdentifier: string + /** + * + * @type UpdateUserGroupRequest + * @memberof GroupsApiupdateUserGroup + */ + updateUserGroupRequest: UpdateUserGroupRequest +} + +export class ObjectGroupsApi { + private api: ObservableGroupsApi + + public constructor(configuration: Configuration, requestFactory?: GroupsApiRequestFactory, responseProcessor?: GroupsApiResponseProcessor) { + this.api = new ObservableGroupsApi(configuration, requestFactory, responseProcessor); + } + + /** + * Version: 9.0.0.cl or later Creates a group object in ThoughtSpot. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `GROUP_ADMINISTRATION` (**Can manage groups**) privilege is required. #### About groups Groups in ThoughtSpot are used by the administrators to define privileges and organize users based on their roles and access requirements. To know more about groups and privileges, see [ThoughtSpot Product Documentation](https://docs.thoughtspot.com/cloud/latest/groups-privileges). #### Supported operations The API endpoint lets you perform the following operations: * Assign privileges * Add users * Define sharing visibility * Add sub-groups * Assign a default Liveboard + * @param param the request object + */ + public createUserGroup(param: GroupsApiCreateUserGroupRequest, options?: Configuration): Promise { + return this.api.createUserGroup(param.createUserGroupRequest, options).toPromise(); + } + + /** + * Version: 9.0.0.cl or later Removes the specified group object from the ThoughtSpot system. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `GROUP_ADMINISTRATION` (**Can manage groups**) privilege is required. + * @param param the request object + */ + public deleteUserGroup(param: GroupsApiDeleteUserGroupRequest, options?: Configuration): Promise { + return this.api.deleteUserGroup(param.groupIdentifier, options).toPromise(); + } + + /** + * Version: 9.0.0.cl or later Imports group objects from external databases into ThoughtSpot. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `GROUP_ADMINISTRATION` (**Can manage groups**) privilege is required. During the import operation: * If the specified group is not available in ThoughtSpot, it will be added to ThoughtSpot. * If `delete_unspecified_groups` is set to `true`, the groups not specified in the API request, excluding administrator and system user groups, are deleted. * If the specified groups are already available in ThoughtSpot, the object properties of these groups are modified and synchronized as per the input data in the API request. A successful API call returns the object that represents the changes made in the ThoughtSpot system. + * @param param the request object + */ + public importUserGroups(param: GroupsApiImportUserGroupsRequest, options?: Configuration): Promise { + return this.api.importUserGroups(param.importUserGroupsRequest, options).toPromise(); + } + + /** + * Version: 9.0.0.cl or later Gets a list of user group objects from the ThoughtSpot system. To get details of a specific user group, specify the user group GUID or name. You can also filter the API response based on User ID, Org ID, Role ID, type of group, sharing visibility, privileges assigned to the group, and the Liveboard IDs assigned to the users in the group. Available to all users. Users with `ADMINISTRATION` (**Can administer ThoughtSpot**) privileges can view all users properties. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `GROUP_ADMINISTRATION` (**Can manage groups**) privilege is required. **NOTE**: If you do not get precise results, try setting `record_size` to `-1` and `record_offset` to `0`. + * @param param the request object + */ + public searchUserGroups(param: GroupsApiSearchUserGroupsRequest, options?: Configuration): Promise> { + return this.api.searchUserGroups(param.searchUserGroupsRequest, options).toPromise(); + } + + /** + * Version: 9.0.0.cl or later Updates the properties of a group object in ThoughtSpot. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `GROUP_ADMINISTRATION` (**Can manage groups**) privilege is required. #### Supported operations This API endpoint lets you perform the following operations in a single API request: * Edit [privileges](https://developers.thoughtspot.com/docs/?pageid=api-user-management#group-privileges) * Add or remove users * Change sharing visibility settings * Add or remove sub-groups * Assign a default Liveboard or update the existing settings + * @param param the request object + */ + public updateUserGroup(param: GroupsApiUpdateUserGroupRequest, options?: Configuration): Promise { + return this.api.updateUserGroup(param.groupIdentifier, param.updateUserGroupRequest, options).toPromise(); + } + +} + +import { ObservableJobsApi } from "./ObservableAPI"; +import { JobsApiRequestFactory, JobsApiResponseProcessor} from "../apis/JobsApi"; + +export interface JobsApiSearchChannelHistoryRequest { + /** + * + * @type SearchChannelHistoryRequest + * @memberof JobsApisearchChannelHistory + */ + searchChannelHistoryRequest: SearchChannelHistoryRequest +} + +export class ObjectJobsApi { + private api: ObservableJobsApi + + public constructor(configuration: Configuration, requestFactory?: JobsApiRequestFactory, responseProcessor?: JobsApiResponseProcessor) { + this.api = new ObservableJobsApi(configuration, requestFactory, responseProcessor); + } + + /** + * Version: 26.4.0.cl or later Searches delivery history for communication channels such as webhooks. Returns channel-level delivery status for each job execution record. Use this to monitor channel health and delivery success rates across events. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) or `DEVELOPER` (**Has developer privilege**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, users with `CAN_MANAGE_WEBHOOKS` (**Can manage webhooks**) privilege are also authorized to perform this action. **NOTE**: When `channel_type` is `WEBHOOK`, the following constraints apply: - `job_ids`, `channel_identifiers`, and `events` each accept at most one element. - When `job_ids` is provided, it is used as the sole lookup key and other filter fields are ignored. - When `job_ids` is not provided, `channel_identifiers` and `events` are both required, each containing exactly one element. - Records older than the configured retention period are not returned. - Use `start_epoch_time_in_millis` and/or `end_epoch_time_in_millis` to narrow results to a specific time window. + * @param param the request object + */ + public searchChannelHistory(param: JobsApiSearchChannelHistoryRequest, options?: Configuration): Promise { + return this.api.searchChannelHistory(param.searchChannelHistoryRequest, options).toPromise(); + } + +} + +import { ObservableLogApi } from "./ObservableAPI"; +import { LogApiRequestFactory, LogApiResponseProcessor} from "../apis/LogApi"; + +export interface LogApiFetchLogsRequest { + /** + * + * @type FetchLogsRequest + * @memberof LogApifetchLogs + */ + fetchLogsRequest: FetchLogsRequest +} + +export class ObjectLogApi { + private api: ObservableLogApi + + public constructor(configuration: Configuration, requestFactory?: LogApiRequestFactory, responseProcessor?: LogApiResponseProcessor) { + this.api = new ObservableLogApi(configuration, requestFactory, responseProcessor); + } + + /** + * Version: 9.0.0.cl or later Fetches security audit logs. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the [Admin Control](https://developers.thoughtspot.com/docs/rbac#_admin_control) privileges are required. #### Usage guidelines By default, the API retrieves logs for the last 24 hours. You can set a custom duration in EPOCH time. Make sure the log duration specified in your API request doesn’t exceed 24 hours. If you must fetch logs for a longer time range, modify the duration and make multiple sequential API requests. Upon successful execution, the API returns logs with the following information: * timestamp of the event * event ID * event type * name and GUID of the user * IP address of ThoughtSpot instance For more information see [Audit logs Documentation](https://developers.thoughtspot.com/docs/audit-logs). + * @param param the request object + */ + public fetchLogs(param: LogApiFetchLogsRequest, options?: Configuration): Promise> { + return this.api.fetchLogs(param.fetchLogsRequest, options).toPromise(); + } + +} + +import { ObservableMetadataApi } from "./ObservableAPI"; +import { MetadataApiRequestFactory, MetadataApiResponseProcessor} from "../apis/MetadataApi"; + +export interface MetadataApiConvertWorksheetToModelRequest { + /** + * + * @type ConvertWorksheetToModelRequest + * @memberof MetadataApiconvertWorksheetToModel + */ + convertWorksheetToModelRequest: ConvertWorksheetToModelRequest +} + +export interface MetadataApiCopyObjectRequest { + /** + * + * @type CopyObjectRequest + * @memberof MetadataApicopyObject + */ + copyObjectRequest: CopyObjectRequest +} + +export interface MetadataApiDeleteMetadataRequest { + /** + * + * @type DeleteMetadataRequest + * @memberof MetadataApideleteMetadata + */ + deleteMetadataRequest: DeleteMetadataRequest +} + +export interface MetadataApiExportMetadataTMLRequest { + /** + * + * @type ExportMetadataTMLRequest + * @memberof MetadataApiexportMetadataTML + */ + exportMetadataTMLRequest: ExportMetadataTMLRequest +} + +export interface MetadataApiExportMetadataTMLBatchedRequest { + /** + * + * @type ExportMetadataTMLBatchedRequest + * @memberof MetadataApiexportMetadataTMLBatched + */ + exportMetadataTMLBatchedRequest: ExportMetadataTMLBatchedRequest +} + +export interface MetadataApiFetchAnswerSqlQueryRequest { + /** + * + * @type FetchAnswerSqlQueryRequest + * @memberof MetadataApifetchAnswerSqlQuery + */ + fetchAnswerSqlQueryRequest: FetchAnswerSqlQueryRequest +} + +export interface MetadataApiFetchAsyncImportTaskStatusRequest { + /** + * + * @type FetchAsyncImportTaskStatusRequest + * @memberof MetadataApifetchAsyncImportTaskStatus + */ + fetchAsyncImportTaskStatusRequest: FetchAsyncImportTaskStatusRequest +} + +export interface MetadataApiFetchLiveboardSqlQueryRequest { + /** + * + * @type FetchLiveboardSqlQueryRequest + * @memberof MetadataApifetchLiveboardSqlQuery + */ + fetchLiveboardSqlQueryRequest: FetchLiveboardSqlQueryRequest +} + +export interface MetadataApiImportMetadataTMLRequest { + /** + * + * @type ImportMetadataTMLRequest + * @memberof MetadataApiimportMetadataTML + */ + importMetadataTMLRequest: ImportMetadataTMLRequest +} + +export interface MetadataApiImportMetadataTMLAsyncRequest { + /** + * + * @type ImportMetadataTMLAsyncRequest + * @memberof MetadataApiimportMetadataTMLAsync + */ + importMetadataTMLAsyncRequest: ImportMetadataTMLAsyncRequest +} + +export interface MetadataApiParameterizeMetadataRequest { + /** + * + * @type ParameterizeMetadataRequest + * @memberof MetadataApiparameterizeMetadata + */ + parameterizeMetadataRequest: ParameterizeMetadataRequest +} + +export interface MetadataApiParameterizeMetadataFieldsRequest { + /** + * + * @type ParameterizeMetadataFieldsRequest + * @memberof MetadataApiparameterizeMetadataFields + */ + parameterizeMetadataFieldsRequest: ParameterizeMetadataFieldsRequest +} + +export interface MetadataApiSearchMetadataRequest { + /** + * + * @type SearchMetadataRequest + * @memberof MetadataApisearchMetadata + */ + searchMetadataRequest: SearchMetadataRequest +} + +export interface MetadataApiUnparameterizeMetadataRequest { + /** + * + * @type UnparameterizeMetadataRequest + * @memberof MetadataApiunparameterizeMetadata + */ + unparameterizeMetadataRequest: UnparameterizeMetadataRequest +} + +export interface MetadataApiUpdateMetadataHeaderRequest { + /** + * + * @type UpdateMetadataHeaderRequest + * @memberof MetadataApiupdateMetadataHeader + */ + updateMetadataHeaderRequest: UpdateMetadataHeaderRequest +} + +export interface MetadataApiUpdateMetadataObjIdRequest { + /** + * + * @type UpdateMetadataObjIdRequest + * @memberof MetadataApiupdateMetadataObjId + */ + updateMetadataObjIdRequest: UpdateMetadataObjIdRequest +} + +export class ObjectMetadataApi { + private api: ObservableMetadataApi + + public constructor(configuration: Configuration, requestFactory?: MetadataApiRequestFactory, responseProcessor?: MetadataApiResponseProcessor) { + this.api = new ObservableMetadataApi(configuration, requestFactory, responseProcessor); + } + + /** + * Convert worksheets to models Version: 10.6.0.cl or later ## Prerequisites - **Privileges Required:** - `DATAMANAGEMENT` (Can manage data) or `ADMINISTRATION` (Can administer ThoughtSpot). - **Additional Privileges (if RBAC is enabled):** - `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` (Can manage data models). --- ## Usage Guidelines ### Parameters 1. **worksheet_ids** - **Description:** A comma-separated list of GUIDs (Globally Unique Identifiers) specifying the Worksheets to be converted. - **Usage:** - Used only when `convert_all` is set to `false`. - Leave empty or omit when `convert_all` is set to `true`. 2. **exclude_worksheet_ids** - **Description:** A comma-separated list of GUIDs specifying Worksheets to be excluded from conversion. - **Usage:** - Useful when `convert_all` is set to `true` and specific Worksheets should not be converted. 3. **convert_all** - **Description:** Sets the scope of conversion. - **Options:** - `true`: Converts all Worksheets in the system, except those specified in `exclude_worksheet_ids`. - `false`: Converts only the Worksheets listed in `worksheet_ids`. 4. **apply_changes** - **Description:** Specifies whether to apply changes directly to ThoughtSpot or to generate a preview before applying any changes.Used for validation of conversion. - **Options:** - `true`: Applies conversion changes directly to ThoughtSpot. - `false`: Generates only a preview of the changes and does not apply any changes to ThoughtSpot --- ## Best Practices 1. **Backup Before Conversion:** Always export metadata as a backup before initiating the conversion process 2. **Partial Conversion for Testing:** Test the conversion process by setting `convert_all` to `false` and specifying a small number of `worksheet_ids`. 3. **Verify Dependencies:** Check for dependent objects, such as Tables and Connections, to avoid invalid references. 4. **Review Changes:** Use `apply_changes: false` to preview the impact of the conversion before applying changes. --- ## Examples ### Convert Specific Worksheets ```json { \"worksheet_ids\": [\"guid1\", \"guid2\", \"guid3\"], \"exclude_worksheet_ids\": [], \"convert_all\": false, \"apply_changes\": true } ``` ### Convert All Accessible Worksheets ```json { \"worksheet_ids\": [], \"exclude_worksheet_ids\": [], \"convert_all\": true, \"apply_changes\": true } ``` ### Exclude Specific Worksheets While Converting All Accessible Worksheets ```json { \"worksheet_ids\": [], \"exclude_worksheet_ids\": [\"abc\"], \"convert_all\": true, \"apply_changes\": true } ``` + * @param param the request object + */ + public convertWorksheetToModel(param: MetadataApiConvertWorksheetToModelRequest, options?: Configuration): Promise { + return this.api.convertWorksheetToModel(param.convertWorksheetToModelRequest, options).toPromise(); + } + + /** + * Makes a copy of an Answer or Liveboard Version: 10.3.0.cl or later Creates a copy of a metadata object. Requires at least view access to the metadata object being copied. Upon successful execution, the API creates a copy of the metadata object specified in the API request and returns the ID of the new object. + * @param param the request object + */ + public copyObject(param: MetadataApiCopyObjectRequest, options?: Configuration): Promise { + return this.api.copyObject(param.copyObjectRequest, options).toPromise(); + } + + /** + * Version: 9.0.0.cl or later Removes the specified metadata object from the ThoughtSpot system. Requires edit access to the metadata object. + * @param param the request object + */ + public deleteMetadata(param: MetadataApiDeleteMetadataRequest, options?: Configuration): Promise { + return this.api.deleteMetadata(param.deleteMetadataRequest, options).toPromise(); + } + + /** + * Version: 9.0.0.cl or later Exports the [TML](https://docs.thoughtspot.com/cloud/latest/tml) representation of metadata objects in JSON or YAML format. Requires `DATADOWNLOADING` (**Can download Data**) and at least view access to the metadata object. #### Usage guidelines * You can export one or several objects by passing metadata object GUIDs in the `metadata` array. * When exporting TML content for a Liveboard or Answer object, you can set `export_associated` to `true` to retrieve TML content for underlying Worksheets, Tables, or Views, including the GUID of each object within the headers. When `export_associated` is set to `true`, consider retrieving one metadata object at a time. * Set `export_fqns` to `true` to add FQNs of the referenced objects in the TML content. For example, if you send an API request to retrieve TML for a Liveboard and its associated objects, the API returns the TML content with FQNs of the referenced Worksheet. Exporting TML with FQNs is useful if ThoughtSpot has multiple objects with the same name and you want to eliminate ambiguity when importing TML files into ThoughtSpot. It eliminates the need for adding FQNs of the referenced objects manually during the import operation. * To export only the TML of feedbacks associated with an object, set the GUID of the object as `identifier`, and set the `type` as `FEEDBACK` in the `metadata` array. * To export the TML of an object along with the feedbacks associated with it, set the GUID of the object as `identifier`, set the `type` as `LOGIAL_TABLE` in the `metadata` array, and set `export_with_associated_feedbacks` in `export_options` to true. For more information, see [TML Documentation](https://developers.thoughtspot.com/docs/tml#_export_a_tml). For more information on feedbacks, see [Feedback Documentation](https://docs.thoughtspot.com/cloud/latest/sage-feedback). + * @param param the request object + */ + public exportMetadataTML(param: MetadataApiExportMetadataTMLRequest, options?: Configuration): Promise> { + return this.api.exportMetadataTML(param.exportMetadataTMLRequest, options).toPromise(); + } + + /** + * Version: 10.1.0.cl or later Exports the [TML](https://docs.thoughtspot.com/cloud/latest/tml) representation of metadata objects in JSON or YAML format. ### **Permissions Required** Requires `DATAMANAGEMENT` (**Can manage data**) and `USERMANAGEMENT` (**Can manage users**) privileges. #### **Usage Guidelines** This API is only applicable for `USER`, `GROUP`, and `ROLES` metadata types. - `batch_offset` Indicates the starting position within the complete dataset from which the API should begin returning objects. Useful for paginating results efficiently. - `batch_size` Specifies the number of objects or items to retrieve in a single request. Helps control response size for better performance. - `edoc_format` Defines the format of the TML content. The exported metadata can be in JSON or YAML format. - `export_dependent` Specifies whether to include dependent metadata objects in the export. Ensures related objects are also retrieved if needed. - `all_orgs_override` Indicates whether the export operation applies across all organizations. Useful for multi-tenant environments where cross-org exports are required. + * @param param the request object + */ + public exportMetadataTMLBatched(param: MetadataApiExportMetadataTMLBatchedRequest, options?: Configuration): Promise { + return this.api.exportMetadataTMLBatched(param.exportMetadataTMLBatchedRequest, options).toPromise(); + } + + /** + * Version: 9.0.0.cl or later Fetches the underlying SQL query data for an Answer object. Requires at least view access to the Answer object. Upon successful execution, the API returns the SQL queries for the specified object as shown in this example: ``` { \"metadata_id\":\"8fbe44a8-46ad-4b16-8d39-184b2fada490\", \"metadata_name\":\"Total sales\", \"metadata_type\":\"ANSWER\", \"sql_queries\":[ { \"metadata_id\":\"8fbe44a8-46ad-4b16-8d39-184b2fada490\", \"metadata_name\":\"Total sales -test\", \"sql_query\":\"SELECT \\n \\\"ta_1\\\".\\\"REGION\\\" \\\"ca_1\\\", \\n \\\"ta_2\\\".\\\"PRODUCTNAME\\\" \\\"ca_2\\\", \\n \\\"ta_1\\\".\\\"STORENAME\\\" \\\"ca_3\\\", \\n CASE\\n WHEN sum(\\\"ta_3\\\".\\\"SALES\\\") IS NOT NULL THEN sum(\\\"ta_3\\\".\\\"SALES\\\")\\n ELSE 0\\n END \\\"ca_4\\\", \\n CASE\\n WHEN sum(\\\"ta_3\\\".\\\"QUANTITYPURCHASED\\\") IS NOT NULL THEN sum(\\\"ta_3\\\".\\\"QUANTITYPURCHASED\\\")\\n ELSE 0\\n END \\\"ca_5\\\"\\nFROM \\\"RETAILAPPAREL\\\".\\\"PUBLIC\\\".\\\"FACT_RETAPP_SALES\\\" \\\"ta_3\\\"\\n JOIN \\\"RETAILAPPAREL\\\".\\\"PUBLIC\\\".\\\"DIM_RETAPP_STORES\\\" \\\"ta_1\\\"\\n ON \\\"ta_3\\\".\\\"STOREID\\\" = \\\"ta_1\\\".\\\"STOREID\\\"\\n JOIN \\\"RETAILAPPAREL\\\".\\\"PUBLIC\\\".\\\"DIM_RETAPP_PRODUCTS\\\" \\\"ta_2\\\"\\n ON \\\"ta_3\\\".\\\"PRODUCTID\\\" = \\\"ta_2\\\".\\\"PRODUCTID\\\"\\nGROUP BY \\n \\\"ca_1\\\", \\n \\\"ca_2\\\", \\n \\\"ca_3\\\"\\n\" } ] } ``` + * @param param the request object + */ + public fetchAnswerSqlQuery(param: MetadataApiFetchAnswerSqlQueryRequest, options?: Configuration): Promise { + return this.api.fetchAnswerSqlQuery(param.fetchAnswerSqlQueryRequest, options).toPromise(); + } + + /** + * Version: 10.4.0.cl or later Gets information about the status of the TML async import task scheduled using the `/api/rest/2.0/metadata/tml/async/import` API call. To fetch the task details, specify the ID of the TML async import task. Requires access to the task ID. The API allows users who initiated the asynchronous TML import via `/api/rest/2.0/metadata/tml/async/import` to view the status of their tasks. Users with administration privilege can view the status of all import tasks initiated by the users in their Org. #### Usage guidelines See [TML API Documentation](https://developers.thoughtspot.com/docs/tml#_fetch_status_of_the_tml_import_task) for usage guidelines. + * @param param the request object + */ + public fetchAsyncImportTaskStatus(param: MetadataApiFetchAsyncImportTaskStatusRequest, options?: Configuration): Promise { + return this.api.fetchAsyncImportTaskStatus(param.fetchAsyncImportTaskStatusRequest, options).toPromise(); + } + + /** + * Version: 9.0.0.cl or later Fetches the underlying SQL query data for a Liveboard object and its visualizations. Requires at least view access to the Liveboard object. To get SQL query data for a Liveboard, specify the GUID of the Liveboard. Optionally, you can add an array of visualization GUIDs to retrieve the SQL query data for visualizations in the Liveboard. Upon successful execution, the API returns the SQL queries for the specified object as shown in this example: ``` { \"metadata_id\": \"fa68ae91-7588-4136-bacd-d71fb12dda69\", \"metadata_name\": \"Total Sales\", \"metadata_type\": \"LIVEBOARD\", \"sql_queries\": [ { \"metadata_id\": \"b3b6d2b9-089a-490c-8e16-b144650b7843\", \"metadata_name\": \"Total quantity purchased, Total sales by region\", \"sql_query\": \"SELECT \\n \\\"ta_1\\\".\\\"REGION\\\" \\\"ca_1\\\", \\n CASE\\n WHEN sum(\\\"ta_2\\\".\\\"QUANTITYPURCHASED\\\") IS NOT NULL THEN sum(\\\"ta_2\\\".\\\"QUANTITYPURCHASED\\\")\\n ELSE 0\\n END \\\"ca_2\\\", \\n CASE\\n WHEN sum(\\\"ta_2\\\".\\\"SALES\\\") IS NOT NULL THEN sum(\\\"ta_2\\\".\\\"SALES\\\")\\n ELSE 0\\n END \\\"ca_3\\\"\\nFROM \\\"RETAILAPPAREL\\\".\\\"PUBLIC\\\".\\\"FACT_RETAPP_SALES\\\" \\\"ta_2\\\"\\n JOIN \\\"RETAILAPPAREL\\\".\\\"PUBLIC\\\".\\\"DIM_RETAPP_STORES\\\" \\\"ta_1\\\"\\n ON \\\"ta_2\\\".\\\"STOREID\\\" = \\\"ta_1\\\".\\\"STOREID\\\"\\nGROUP BY \\\"ca_1\\\"\" } ] } ``` + * @param param the request object + */ + public fetchLiveboardSqlQuery(param: MetadataApiFetchLiveboardSqlQueryRequest, options?: Configuration): Promise { + return this.api.fetchLiveboardSqlQuery(param.fetchLiveboardSqlQueryRequest, options).toPromise(); + } + + /** + * Version: 9.0.0.cl or later Imports [TML](https://docs.thoughtspot.com/cloud/latest/tml) files into ThoughtSpot. Requires `DATAMANAGEMENT` (**Can manage data**) or `ADMINISTRATION` (**Can administer ThoughtsSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the following Data control privileges may be required: - `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) - `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` (**Can manage data models**) #### Usage guidelines * Import all related objects in a single TML Import API call. For example, Tables that use the same Connection object and Worksheets connected to these Tables. * Include the `fqn` property to distinguish objects that have the same name. For example, if you have multiple Connections or Worksheets with the same name on ThoughtSpot and the Connection or Worksheet referenced in your TML file does not have a unique name to distinguish, it may result in invalid object references. Adding `fqn` helps ThoughtSpot differentiate a Table from another with the same name. We recommend [exporting TML with FQNs](#/http/api-endpoints/metadata/export-metadata-tml) and using these during the import operation. * You can upload multiple TML files at a time. If you import a Worksheet along with Liveboards, Answers, and other dependent objects in a single API call, the imported objects will be immediately available for use. When you import only a Worksheet object, it may take some time for the Worksheet to become available in the ThoughtSpot system. Please wait for a few minutes, and then proceed to create an Answer and Liveboard from the newly imported Worksheet. For more information, see [TML Documentation](https://developers.thoughtspot.com/docs/tml#_import_a_tml). + * @param param the request object + */ + public importMetadataTML(param: MetadataApiImportMetadataTMLRequest, options?: Configuration): Promise> { + return this.api.importMetadataTML(param.importMetadataTMLRequest, options).toPromise(); + } + + /** + * Version: 10.4.0.cl or later Schedules a task to import [TML](https://docs.thoughtspot.com/cloud/latest/tml) files into ThoughtSpot. You can use this API endpoint to process TML objects asynchronously when importing TMLs of large and complex metadata objects into ThoughtSpot. Unlike the synchronous import TML operation, the API processes TML data in the background and returns a task ID, which can be used to check the status of the import task via `/api/rest/2.0/metadata/tml/async/status` API endpoint. Requires `DATAMANAGEMENT` (**Can manage data**) or `ADMINISTRATION` (**Can administer ThoughtsSpot**) privilege, and edit access to the TML objects. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the following Data control privileges may be required: - `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) - `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` (**Can manage data models**) #### Usage guidelines See [Async TML API Documentation](https://developers.thoughtspot.com/docs/tml#_import_tml_objects_asynchronously) for usage guidelines. + * @param param the request object + */ + public importMetadataTMLAsync(param: MetadataApiImportMetadataTMLAsyncRequest, options?: Configuration): Promise { + return this.api.importMetadataTMLAsync(param.importMetadataTMLAsyncRequest, options).toPromise(); + } + + /** + * Parameterize fields in metadata objects. Version: 10.9.0.cl or later **Note:** This API endpoint is deprecated and will be removed from ThoughtSpot in a future release. Use [POST /api/rest/2.0/metadata/parameterize-fields](/api/rest/2.0/metadata/parameterize-fields) instead. Allows parameterizing fields in metadata objects in ThoughtSpot. Requires appropriate permissions to modify the metadata object. The API endpoint allows parameterizing the following types of metadata objects: * Logical Tables * Connections * Connection Configs For a Logical Table the field type must be `ATTRIBUTE` and field name can be one of: * databaseName * schemaName * tableName For a Connection or Connection Config, the field type is always `CONNECTION_PROPERTY`. In this case, field_name specifies the exact property of the Connection or Connection Config that needs to be parameterized. For Connection Config, the only supported field name is: * impersonate_user + * @param param the request object + */ + public parameterizeMetadata(param: MetadataApiParameterizeMetadataRequest, options?: Configuration): Promise { + return this.api.parameterizeMetadata(param.parameterizeMetadataRequest, options).toPromise(); + } + + /** + * Parameterize multiple fields of metadata objects. For example [schemaName, databaseName] for LOGICAL_TABLE. Version: 26.5.0.cl or later Allows parameterizing multiple fields of metadata objects in ThoughtSpot. For example, you can parameterize [schemaName, databaseName] for LOGICAL_TABLE. Requires appropriate permissions to modify the metadata object. The API endpoint allows parameterizing the following types of metadata objects: * Logical Tables * Connections * Connection Configs For a Logical Table, the field type must be `ATTRIBUTE` and field names can include: * databaseName * schemaName * tableName For a Connection or Connection Config, the field type is always `CONNECTION_PROPERTY`. In this case, field_names specifies the exact properties of the Connection or Connection Config that need to be parameterized. For Connection Config, supported field names include: * impersonate_user You can parameterize multiple fields at once by providing an array of field names. + * @param param the request object + */ + public parameterizeMetadataFields(param: MetadataApiParameterizeMetadataFieldsRequest, options?: Configuration): Promise { + return this.api.parameterizeMetadataFields(param.parameterizeMetadataFieldsRequest, options).toPromise(); + } + + /** + * Version: 9.0.0.cl or later Gets a list of metadata objects available on the ThoughtSpot system. This API endpoint is available to all users who have view access to the object. Users with `ADMINISTRATION` (**Can administer ThoughtSpot**) privileges can view data for all metadata objects, including users and groups. #### Usage guidelines - To get all metadata objects, send the API request without any attributes. - To get metadata objects of a specific type, set the `type` attribute. For example, to fetch a Worksheet, set the type as `LOGICAL_TABLE`. - To filter metadata objects within type `LOGICAL_TABLE`, set the `subtypes` attribute. For example, to fetch a Worksheet, set the type as `LOGICAL_TABLE` & subtypes as `[WORKSHEET]`. - To get a specific metadata object, specify the GUID. - To customize your search and filter the API response, you can use several parameters. You can search for objects created or modified by specific users, by tags applied to the objects, or by using the include parameters like `include_auto_created_objects`, `include_dependent_objects`, `include_headers`, `include_incomplete_objects`, and so on. You can also define sorting options to sort the data retrieved in the API response. - To get discoverable objects when linientmodel is enabled you can use `include_discoverable_objects` as true else false. Default value is true. - For liveboard metadata type, to get the newer format, set the `liveboard_response_format` as V2. Default value is V1. - To retrieve only objects that are published, set the `include_only_published_objects` as true. Default value is false. **NOTE**: The following parameters support pagination of metadata records: - `tag_identifiers` - `type` - `subtypes` - `created_by_user_identifiers` - `modified_by_user_identifiers` - `owned_by_user_identifiers` - `exclude_objects` - `include_auto_created_objects` - `favorite_object_options` - `include_only_published_objects` If you are using other parameters to search metadata, set `record_size` to `-1` and `record_offset` to `0`. + * @param param the request object + */ + public searchMetadata(param: MetadataApiSearchMetadataRequest, options?: Configuration): Promise> { + return this.api.searchMetadata(param.searchMetadataRequest, options).toPromise(); + } + + /** + * Remove parameterization from fields in metadata objects. Version: 26.5.0.cl or later Allows removing parameterization from fields in metadata objects in ThoughtSpot. Requires appropriate permissions to modify the metadata object. The API endpoint allows unparameterizing the following types of metadata objects: * Logical Tables * Connections * Connection Configs For a Logical Table the field type must be `ATTRIBUTE` and field name can be one of: * databaseName * schemaName * tableName For a Connection or Connection Config, the field type is always `CONNECTION_PROPERTY`. In this case, field_name specifies the exact property of the Connection or Connection Config that needs to be unparameterized. For Connection Config, the only supported field name is: * impersonate_user + * @param param the request object + */ + public unparameterizeMetadata(param: MetadataApiUnparameterizeMetadataRequest, options?: Configuration): Promise { + return this.api.unparameterizeMetadata(param.unparameterizeMetadataRequest, options).toPromise(); + } + + /** + * Update header attributes for a given list of header objects. Version: 10.6.0.cl or later ## Prerequisites - **Privileges Required:** - `DATAMANAGEMENT` (Can manage data) or `ADMINISTRATION` (Can administer ThoughtSpot). - **Additional Privileges (if RBAC is enabled):** - `ORG_ADMINISTRATION` (Can manage orgs). --- ## Usage Guidelines ### Parameters 1. **headers_update** - **Description:** List of header objects with their attributes to be updated. Each object contains a list of attributes to be updated in the header. - **Usage:** - You must provide either `identifier` or `obj_identifier`, but not both. Both fields cannot be empty. - When `org_identifier` is set to `-1`, only the `identifier` value is accepted; `obj_identifier` is not allowed. 2. **org_identifier** - **Description:** GUID (Globally Unique Identifier) or name of the organization. - **Usage:** - Leaving this field empty assumes that the changes should be applied to the current organization - Provide `org_guid` or `org_name` to uniquely identify the organization where changes need to be applied. . - Provide `-1` if changes have to be applied across all the org. --- ## Note Currently, this API is enabled only for updating the `obj_identifier` attribute. Only `text` will be allowed in attribute\'s value. ## Best Practices 1. **Backup Before Conversion:** Always export metadata as a backup before initiating the update process --- ## Examples ### Only `identifier` is given ```json { \"headers_update\": [ { \"identifier\": \"guid_1\", \"obj_identifier\": \"\", \"type\": \"LOGICAL_COLUMN\", \"attributes\": [ { \"name\": \"obj_id\", \"value\": \"custom_object_id\" } ] } ], \"org_identifier\": \"orgGuid\" } ``` ### Only `obj_identifier` is given ```json { \"headers_update\": [ { \"obj_identifier\": \"custom_object_id\", \"type\": \"ANSWER\", \"attributes\": [ { \"name\": \"obj_id\", \"value\": \"custom_object_id\" } ] } ], \"org_identifier\": \"orgName\" } ``` ### Executing update for all org `-1` ```json { \"headers_update\": [ { \"identifier\": \"guid_1\", \"type\": \"ANSWER\", \"attributes\": [ { \"name\": \"obj_id\", \"value\": \"custom_object_id\" } ] } ], \"org_identifier\": -1 } ``` ### Optional `type` is not provided ```json { \"headers_update\": [ { \"identifier\": \"guid_1\", \"attributes\": [ { \"name\": \"obj_id\", \"value\": \"custom_object_id\" } ] } ], \"org_identifier\": -1 } ``` + * @param param the request object + */ + public updateMetadataHeader(param: MetadataApiUpdateMetadataHeaderRequest, options?: Configuration): Promise { + return this.api.updateMetadataHeader(param.updateMetadataHeaderRequest, options).toPromise(); + } + + /** + * Update object IDs for given metadata objects. Version: 10.8.0.cl or later ## Prerequisites - **Privileges Required:** - `DATAMANAGEMENT` (Can manage data) or `ADMINISTRATION` (Can administer ThoughtSpot). - **Additional Privileges (if RBAC is enabled):** - `ORG_ADMINISTRATION` (Can manage orgs). --- ## Usage Guidelines ### Parameters 1. **metadata** - **Description:** List of metadata objects to update their object IDs. - **Usage:** - Use either `current_obj_id` alone OR use `metadata_identifier` with `type` (when needed). - When using `metadata_identifier`, the `type` field is required if using a name instead of a GUID. - The `new_obj_id` field is always required. --- ## Note This API is specifically designed for updating object IDs of metadata objects. It internally uses the header update mechanism to perform the changes. ## Best Practices 1. **Backup Before Update:** Always export metadata as a backup before initiating the update process. 2. **Validation:** - When using `current_obj_id`, ensure it matches the existing object ID exactly. - When using `metadata_identifier` with a name, ensure the `type` is specified correctly. - Verify that the `new_obj_id` follows your naming conventions and is unique within your system. --- ## Examples ### Using current_obj_id ```json { \"metadata\": [ { \"current_obj_id\": \"existing_object_id\", \"new_obj_id\": \"new_object_id\" } ] } ``` ### Using metadata_identifier with GUID ```json { \"metadata\": [ { \"metadata_identifier\": \"01234567-89ab-cdef-0123-456789abcdef\", \"new_obj_id\": \"new_object_id\" } ] } ``` ### Using metadata_identifier with name and type ```json { \"metadata\": [ { \"metadata_identifier\": \"My Answer\", \"type\": \"ANSWER\", \"new_obj_id\": \"new_object_id\" } ] } ``` ### Multiple objects update ```json { \"metadata\": [ { \"current_obj_id\": \"existing_object_id_1\", \"new_obj_id\": \"new_object_id_1\" }, { \"metadata_identifier\": \"My Worksheet\", \"type\": \"LOGICAL_TABLE\", \"new_obj_id\": \"new_object_id_2\" } ] } ``` + * @param param the request object + */ + public updateMetadataObjId(param: MetadataApiUpdateMetadataObjIdRequest, options?: Configuration): Promise { + return this.api.updateMetadataObjId(param.updateMetadataObjIdRequest, options).toPromise(); + } + +} + +import { ObservableOrgsApi } from "./ObservableAPI"; +import { OrgsApiRequestFactory, OrgsApiResponseProcessor} from "../apis/OrgsApi"; + +export interface OrgsApiCreateOrgRequest { + /** + * + * @type CreateOrgRequest + * @memberof OrgsApicreateOrg + */ + createOrgRequest: CreateOrgRequest +} + +export interface OrgsApiDeleteOrgRequest { + /** + * ID or name of the Org + * @type string + * @memberof OrgsApideleteOrg + */ + orgIdentifier: string +} + +export interface OrgsApiSearchOrgsRequest { + /** + * + * @type SearchOrgsRequest + * @memberof OrgsApisearchOrgs + */ + searchOrgsRequest: SearchOrgsRequest +} + +export interface OrgsApiUpdateOrgRequest { + /** + * ID or name of the Org + * @type string + * @memberof OrgsApiupdateOrg + */ + orgIdentifier: string + /** + * + * @type UpdateOrgRequest + * @memberof OrgsApiupdateOrg + */ + updateOrgRequest: UpdateOrgRequest +} + +export class ObjectOrgsApi { + private api: ObservableOrgsApi + + public constructor(configuration: Configuration, requestFactory?: OrgsApiRequestFactory, responseProcessor?: OrgsApiResponseProcessor) { + this.api = new ObservableOrgsApi(configuration, requestFactory, responseProcessor); + } + + /** + * Version: 9.0.0.cl or later Creates an Org object. To use this API, the [Orgs](https://docs.thoughtspot.com/cloud/latest/orgs-overview) feature must be enabled in your cluster. Requires cluster administration (**Can administer Org**) privileges. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `ORG_ADMINISTRATION` (**Can manage Orgs**) privilege is required. + * @param param the request object + */ + public createOrg(param: OrgsApiCreateOrgRequest, options?: Configuration): Promise { + return this.api.createOrg(param.createOrgRequest, options).toPromise(); + } + + /** + * Version: 9.0.0.cl or later Deletes an Org object from the ThoughtSpot system. Requires cluster administration (**Can administer Org**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `ORG_ADMINISTRATION` (**Can manage Orgs**) privilege is required. When you delete an Org, all its users and objects created in that Org context are removed. However, if the users in the deleted Org also exists in other Orgs, they are removed only from the deleted Org. + * @param param the request object + */ + public deleteOrg(param: OrgsApiDeleteOrgRequest, options?: Configuration): Promise { + return this.api.deleteOrg(param.orgIdentifier, options).toPromise(); + } + + /** + * Version: 9.0.0.cl or later Gets a list of Orgs configured on the ThoughtSpot system. To get details of a specific Org, specify the Org ID or name. You can also pass parameters such as status, visibility, and user identifiers to get a specific list of Orgs. Requires cluster administration (**Can administer Org**) privileges. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `ORG_ADMINISTRATION` (**Can manage Orgs**) privilege is required. + * @param param the request object + */ + public searchOrgs(param: OrgsApiSearchOrgsRequest, options?: Configuration): Promise> { + return this.api.searchOrgs(param.searchOrgsRequest, options).toPromise(); + } + + /** + * Version: 9.0.0.cl or later Updates an Org object. You can modify Org properties such as name, description, and user associations. Requires cluster administration (**Can administer Org**) privileges. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `ORG_ADMINISTRATION` (**Can manage Orgs**) privilege is required. + * @param param the request object + */ + public updateOrg(param: OrgsApiUpdateOrgRequest, options?: Configuration): Promise { + return this.api.updateOrg(param.orgIdentifier, param.updateOrgRequest, options).toPromise(); + } + +} + +import { ObservableReportsApi } from "./ObservableAPI"; +import { ReportsApiRequestFactory, ReportsApiResponseProcessor} from "../apis/ReportsApi"; + +export interface ReportsApiExportAnswerReportRequest { + /** + * + * @type ExportAnswerReportRequest + * @memberof ReportsApiexportAnswerReport + */ + exportAnswerReportRequest: ExportAnswerReportRequest +} + +export interface ReportsApiExportLiveboardReportRequest { + /** + * + * @type ExportLiveboardReportRequest + * @memberof ReportsApiexportLiveboardReport + */ + exportLiveboardReportRequest: ExportLiveboardReportRequest +} + +export class ObjectReportsApi { + private api: ObservableReportsApi + + public constructor(configuration: Configuration, requestFactory?: ReportsApiRequestFactory, responseProcessor?: ReportsApiResponseProcessor) { + this.api = new ObservableReportsApi(configuration, requestFactory, responseProcessor); + } + + /** + * Version: 9.0.0.cl or later Exports an Answer in the given file format. You can download the Answer data as a PDF, PNG, CSV, or XLSX file. Requires at least view access to the Answer. #### Usage guidelines In the request body, specify the GUID or name of the Answer and set `file_format`. The default file format is CSV. Use the `type` parameter to specify whether the Answer being exported is a saved Answer (`SAVED`) or a pinned Answer on a Liveboard (`PINNED`). Defaults to `SAVED`. When using `PINNED`, the `metadata_identifier` must be the container id. **NOTE**: * The downloadable file returned in API response file is extensionless. Please rename the downloaded file by typing in the relevant extension. * HTML rendering is not supported for PDF exports of Answers with tables. Optionally, you can define [runtime overrides](https://developers.thoughtspot.com/docs/fetch-data-and-report-apis#_runtime_overrides) to apply to the Answer data. + * @param param the request object + */ + public exportAnswerReport(param: ReportsApiExportAnswerReportRequest, options?: Configuration): Promise { + return this.api.exportAnswerReport(param.exportAnswerReportRequest, options).toPromise(); + } + + /** + * Version: 9.0.0.cl or later Exports a Liveboard and its visualizations in PDF, PNG, CSV, or XLSX file format. The default `file_format` is CSV. Requires at least view access to the Liveboard. #### Usage guidelines In the request body, specify the GUID or name of the Liveboard. To generate a Liveboard report with specific visualizations, add GUIDs or names of the visualizations. **NOTE**: * The downloadable file returned in API response file is extensionless. Please rename the downloaded file by typing in the relevant extension. * Optionally, you can define [runtime overrides](https://developers.thoughtspot.com/docs/fetch-data-and-report-apis#_runtime_overrides) to apply to the Answer data. * To include unsaved changes in the report, pass the `transient_pinboard_content` script generated from the `getExportRequestForCurrentPinboard` method in the Visual Embed SDK. Upon successful execution, the API returns the report with unsaved changes, including ad hoc changes to visualizations. For more information, see [Liveboard Report API](https://developers.thoughtspot.com/docs/fetch-data-and-report-apis#_liveboard_report_api). * Starting with ThoughtSpot Cloud 10.9.0.cl release, the Liveboard can be exported in the PNG format in the resolution of your choice. To enable this on your instance, contact ThoughtSpot support. When this feature is enabled, the options `include_cover_page`,`include_filter_page` within the `png_options` will not be available for PNG exports. * Starting with the ThoughtSpot Cloud 26.2.0.cl release, * Liveboards can be exported in CSV format. * All visualizations within a Liveboard can be exported as individual CSV files. * When exporting multiple visualizations or the entire Liveboard, the system returns the report as a compressed ZIP file containing the separate CSV files for each visualization. * Liveboards can also be exported in XLSX format. * All selected visualizations are consolidated into a single Excel workbook (.xlsx), with each visualization placed in its own worksheet (tab). * XLSX exports are limited to a maximum of 255 worksheets (tabs) per workbook. + * @param param the request object + */ + public exportLiveboardReport(param: ReportsApiExportLiveboardReportRequest, options?: Configuration): Promise { + return this.api.exportLiveboardReport(param.exportLiveboardReportRequest, options).toPromise(); + } + +} + +import { ObservableRolesApi } from "./ObservableAPI"; +import { RolesApiRequestFactory, RolesApiResponseProcessor} from "../apis/RolesApi"; + +export interface RolesApiCreateRoleRequest { + /** + * + * @type CreateRoleRequest + * @memberof RolesApicreateRole + */ + createRoleRequest: CreateRoleRequest +} + +export interface RolesApiDeleteRoleRequest { + /** + * Unique ID or name of the Role. ReadOnly roles cannot be deleted. + * @type string + * @memberof RolesApideleteRole + */ + roleIdentifier: string +} + +export interface RolesApiSearchRolesRequest { + /** + * + * @type SearchRolesRequest + * @memberof RolesApisearchRoles + */ + searchRolesRequest: SearchRolesRequest +} + +export interface RolesApiUpdateRoleRequest { + /** + * Unique ID or name of the Role. + * @type string + * @memberof RolesApiupdateRole + */ + roleIdentifier: string + /** + * + * @type UpdateRoleRequest + * @memberof RolesApiupdateRole + */ + updateRoleRequest: UpdateRoleRequest +} + +export class ObjectRolesApi { + private api: ObservableRolesApi + + public constructor(configuration: Configuration, requestFactory?: RolesApiRequestFactory, responseProcessor?: RolesApiResponseProcessor) { + this.api = new ObservableRolesApi(configuration, requestFactory, responseProcessor); + } + + /** + * Version: 9.5.0.cl or later Creates a Role object in ThoughtSpot. Available only if [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance. To create a Role, the `ROLE_ADMINISTRATION` (**Can manage roles**) privilege is required. + * @param param the request object + */ + public createRole(param: RolesApiCreateRoleRequest, options?: Configuration): Promise { + return this.api.createRole(param.createRoleRequest, options).toPromise(); + } + + /** + * Version: 9.5.0.cl or later Deletes a Role object from the ThoughtSpot system. Available only if [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance. To delete a Role, the `ROLE_ADMINISTRATION` (**Can manage roles**) privilege is required. + * @param param the request object + */ + public deleteRole(param: RolesApiDeleteRoleRequest, options?: Configuration): Promise { + return this.api.deleteRole(param.roleIdentifier, options).toPromise(); + } + + /** + * Version: 9.5.0.cl or later Gets a list of Role objects from the ThoughtSpot system. Available if [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance. To search for Roles, the `ROLE_ADMINISTRATION` (**Can manage roles**) privilege is required. To get details of a specific Role object, specify the GUID or name. You can also filter the API response based on user group and Org identifiers, privileges assigned to the Role, and deprecation status. + * @param param the request object + */ + public searchRoles(param: RolesApiSearchRolesRequest, options?: Configuration): Promise> { + return this.api.searchRoles(param.searchRolesRequest, options).toPromise(); + } + + /** + * Version: 9.5.0.cl or later Updates the properties of a Role object. Available only if [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance. To update a Role, the `ROLE_ADMINISTRATION` (**Can manage roles**) privilege is required. + * @param param the request object + */ + public updateRole(param: RolesApiUpdateRoleRequest, options?: Configuration): Promise { + return this.api.updateRole(param.roleIdentifier, param.updateRoleRequest, options).toPromise(); + } + +} + +import { ObservableSchedulesApi } from "./ObservableAPI"; +import { SchedulesApiRequestFactory, SchedulesApiResponseProcessor} from "../apis/SchedulesApi"; + +export interface SchedulesApiCreateScheduleRequest { + /** + * + * @type CreateScheduleRequest + * @memberof SchedulesApicreateSchedule + */ + createScheduleRequest: CreateScheduleRequest +} + +export interface SchedulesApiDeleteScheduleRequest { + /** + * Unique ID or name of the scheduled job. + * @type string + * @memberof SchedulesApideleteSchedule + */ + scheduleIdentifier: string +} + +export interface SchedulesApiSearchSchedulesRequest { + /** + * + * @type SearchSchedulesRequest + * @memberof SchedulesApisearchSchedules + */ + searchSchedulesRequest: SearchSchedulesRequest +} + +export interface SchedulesApiUpdateScheduleRequest { + /** + * Unique ID or name of the schedule. + * @type string + * @memberof SchedulesApiupdateSchedule + */ + scheduleIdentifier: string + /** + * + * @type UpdateScheduleRequest + * @memberof SchedulesApiupdateSchedule + */ + updateScheduleRequest: UpdateScheduleRequest +} + +export class ObjectSchedulesApi { + private api: ObservableSchedulesApi + + public constructor(configuration: Configuration, requestFactory?: SchedulesApiRequestFactory, responseProcessor?: SchedulesApiResponseProcessor) { + this.api = new ObservableSchedulesApi(configuration, requestFactory, responseProcessor); + } + + /** + * Create schedule. Version: 9.4.0.cl or later Creates a Liveboard schedule job. Requires at least edit access to Liveboards. To create a schedule on behalf of another user, you need `ADMINISTRATION` (**Can administer Org**) or `JOBSCHEDULING` (**Can schedule for others**) privilege and edit access to the Liveboard. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `JOBSCHEDULING` (**Can schedule for others**) privilege is required. #### Usage guidelines * The description text is mandatory. The description text appears as **Description: ** in the Liveboard schedule email notifications. * For Liveboards with both charts and tables, schedule creation is only supported in PDF and XLS formats. Schedules created in CSV formats for such Liveboards will fail to run. If `PDF` is set as the `file_format`, enable `pdf_options` to get the correct attachment. Not doing so may cause the attachment to be rendered empty. * To include only specific visualizations, specify the visualization GUIDs in the `visualization_identifiers` array. * You can schedule a Liveboard job to run periodically by setting frequency parameters. You can set the schedule to run daily, weekly, monthly or every n minutes or hours. The scheduled job can also be configured to run at a specific time of the day or on specific days of the week or month. Please ensure that when setting the schedule frequency for _minute of the object_, only values that are multiples of 5 are included. * If the `frequency` parameters are defined, you can set the time zone to a value that matches your server\'s time zone. For example, `US/Central`, `Etc/UTC`, `CET`. The default time zone is `America/Los_Angeles`. For more information about Liveboard jobs, see [ThoughtSpot Product Documentation](https://docs.thoughtspot.com/cloud/latest/liveboard-schedule). + * @param param the request object + */ + public createSchedule(param: SchedulesApiCreateScheduleRequest, options?: Configuration): Promise { + return this.api.createSchedule(param.createScheduleRequest, options).toPromise(); + } + + /** + * Deletes a scheduled job. Version: 9.4.0.cl or later Deletes a scheduled Liveboard job. Requires at least edit access to Liveboard or `ADMINISTRATION` (**Can administer Org**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `JOBSCHEDULING` (**Can schedule for others**) privilege is required. + * @param param the request object + */ + public deleteSchedule(param: SchedulesApiDeleteScheduleRequest, options?: Configuration): Promise { + return this.api.deleteSchedule(param.scheduleIdentifier, options).toPromise(); + } + + /** + * Search Schedules Version: 9.4.0.cl or later Gets a list of scheduled jobs configured for a Liveboard. To get details of a specific scheduled job, specify the name or GUID of the scheduled job. Requires at least view access to Liveboards. **NOTE**: When filtering schedules by parameters other than `metadata`, set `record_size` to `-1` and `record_offset` to `0` for accurate results. + * @param param the request object + */ + public searchSchedules(param: SchedulesApiSearchSchedulesRequest, options?: Configuration): Promise> { + return this.api.searchSchedules(param.searchSchedulesRequest, options).toPromise(); + } + + /** + * Update schedule. Version: 9.4.0.cl or later Updates a scheduled Liveboard job. Requires at least edit access to Liveboards. To update a schedule on behalf of another user, you need `ADMINISTRATION` (**Can administer Org**) or `JOBSCHEDULING` (**Can schedule for others**) privilege and edit access to the Liveboard. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `JOBSCHEDULING` (**Can schedule for others**) privilege is required. The API endpoint allows you to pause a scheduled job, change the status of a paused job. You can also edit the recipients list, frequency of the job, format of the file to send to the recipients in email notifications, PDF options, and time zone setting. + * @param param the request object + */ + public updateSchedule(param: SchedulesApiUpdateScheduleRequest, options?: Configuration): Promise { + return this.api.updateSchedule(param.scheduleIdentifier, param.updateScheduleRequest, options).toPromise(); + } + +} + +import { ObservableSecurityApi } from "./ObservableAPI"; +import { SecurityApiRequestFactory, SecurityApiResponseProcessor} from "../apis/SecurityApi"; + +export interface SecurityApiAssignChangeAuthorRequest { + /** + * + * @type AssignChangeAuthorRequest + * @memberof SecurityApiassignChangeAuthor + */ + assignChangeAuthorRequest: AssignChangeAuthorRequest +} + +export interface SecurityApiFetchColumnSecurityRulesRequest { + /** + * + * @type FetchColumnSecurityRulesRequest + * @memberof SecurityApifetchColumnSecurityRules + */ + fetchColumnSecurityRulesRequest: FetchColumnSecurityRulesRequest +} + +export interface SecurityApiFetchObjectPrivilegesRequest { + /** + * + * @type FetchObjectPrivilegesRequest + * @memberof SecurityApifetchObjectPrivileges + */ + fetchObjectPrivilegesRequest: FetchObjectPrivilegesRequest +} + +export interface SecurityApiFetchPermissionsOfPrincipalsRequest { + /** + * + * @type FetchPermissionsOfPrincipalsRequest + * @memberof SecurityApifetchPermissionsOfPrincipals + */ + fetchPermissionsOfPrincipalsRequest: FetchPermissionsOfPrincipalsRequest +} + +export interface SecurityApiFetchPermissionsOnMetadataRequest { + /** + * + * @type FetchPermissionsOnMetadataRequest + * @memberof SecurityApifetchPermissionsOnMetadata + */ + fetchPermissionsOnMetadataRequest: FetchPermissionsOnMetadataRequest +} + +export interface SecurityApiManageObjectPrivilegeRequest { + /** + * + * @type ManageObjectPrivilegeRequest + * @memberof SecurityApimanageObjectPrivilege + */ + manageObjectPrivilegeRequest: ManageObjectPrivilegeRequest +} + +export interface SecurityApiPublishMetadataRequest { + /** + * + * @type PublishMetadataRequest + * @memberof SecurityApipublishMetadata + */ + publishMetadataRequest: PublishMetadataRequest +} + +export interface SecurityApiShareMetadataRequest { + /** + * + * @type ShareMetadataRequest + * @memberof SecurityApishareMetadata + */ + shareMetadataRequest: ShareMetadataRequest +} + +export interface SecurityApiUnpublishMetadataRequest { + /** + * + * @type UnpublishMetadataRequest + * @memberof SecurityApiunpublishMetadata + */ + unpublishMetadataRequest: UnpublishMetadataRequest +} + +export interface SecurityApiUpdateColumnSecurityRulesRequest { + /** + * + * @type UpdateColumnSecurityRulesRequest + * @memberof SecurityApiupdateColumnSecurityRules + */ + updateColumnSecurityRulesRequest: UpdateColumnSecurityRulesRequest +} + +export class ObjectSecurityApi { + private api: ObservableSecurityApi + + public constructor(configuration: Configuration, requestFactory?: SecurityApiRequestFactory, responseProcessor?: SecurityApiResponseProcessor) { + this.api = new ObservableSecurityApi(configuration, requestFactory, responseProcessor); + } + + /** + * Version: 9.0.0.cl or later Transfers the ownership of one or several objects from one user to another. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `USER_ADMINISTRATION` (**Can manage users**) privilege and edit access to the objects are required. + * @param param the request object + */ + public assignChangeAuthor(param: SecurityApiAssignChangeAuthorRequest, options?: Configuration): Promise { + return this.api.assignChangeAuthor(param.assignChangeAuthorRequest, options).toPromise(); + } + + /** + * Version: 10.12.0.cl or later Fetches column security rules for specified tables. This API endpoint retrieves column-level security rules configured for tables. It returns information about which columns are secured and which groups have access to those columns. #### Usage guidelines - Provide an array of table identifiers using either `identifier` (GUID or name) or `obj_identifier` (object ID) - At least one of `identifier` or `obj_identifier` must be provided for each table - The API returns column security rules for all specified tables - Users must have appropriate permissions to access security rules for the specified tables #### Required permissions - `ADMINISTRATION` - Can administer ThoughtSpot - `DATAMANAGEMENT` - Can manage data - `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` - Can manage worksheet views and tables #### Example request ```json { \"tables\": [ { \"identifier\": \"table-guid\", \"obj_identifier\": \"table-object-id\" } ] } ``` #### Response format The API returns an array of `ColumnSecurityRuleResponse` objects wrapped in a `data` field. Each `ColumnSecurityRuleResponse` object contains: - Table information (GUID and object ID) - Array of column security rules with column details, group access, and source table information #### Example response ```json { \"data\": [ { \"guid\": \"table-guid\", \"objId\": \"table-object-id\", \"columnSecurityRules\": [ { \"column\": { \"id\": \"col_123\", \"name\": \"Salary\" }, \"groups\": [ { \"id\": \"group_1\", \"name\": \"HR Department\" } ], \"sourceTableDetails\": { \"id\": \"source-table-guid\", \"name\": \"Employee_Data\" } } ] } ] } ``` + * @param param the request object + */ + public fetchColumnSecurityRules(param: SecurityApiFetchColumnSecurityRulesRequest, options?: Configuration): Promise> { + return this.api.fetchColumnSecurityRules(param.fetchColumnSecurityRulesRequest, options).toPromise(); + } + + /** + * Version: 26.3.0.cl or later This API fetches the object privileges present for the given list of principals (user or group), on the given set of objects. It supports pagination, which can be enabled and configured using the request parameters. It provides users access to certain features based on privilege based access control. #### Usage guidelines - Specify the `type` (`USER` or `USER_GROUP`) and `identifier` (either GUID or name) of the principals for which you want to retrieve object privilege information in the `principals` array. - Specify the `type` (`LOGICAL_TABLE`) and `identifier` (either GUID or name) of the metadata objects for which you want to retrieve object privilege information in the `metadata` array. Only `LOGICAL_TABLE` metadata type is supported for now. It may be extended for other metadata types in future. - To control the offset from where principals have to be fetched, use `record_offset`. When `record_offset` is 0, information is fetched from the beginning. - To control the number of principals to be fetched, use `record_size`. Default `record_size` is 20. - Ensure `record_offset` for a subsequent request is one more than the value of `record_size` of the previous request. - Ensure using correct Authorization Bearer Token corresponding to specific user & org. #### Example request ```json { \"principals\": [ { \"type\": \"type-1\", \"identifier\": \"principal-guid-or-name-1\" }, { \"type\": \"type-2\", \"identifier\": \"principal-guid-or-name-2\" } ], \"metadata\": [ { \"type\": \"metadata-type-1\", \"identifier\": \"metadata-guid-or-name-1\" }, { \"type\": \"metadata-type-2\", \"identifier\": \"metadata-guid-or-name-2\" } ], \"record_offset\": 0, \"record_size\": 20 } ``` #### Response format The API returns an array of `metadata_object_privileges` objects wrapped in JSON. Each `metadata_object_privileges` object contains: - Metadata information (GUID, name and type) - Array of `principal_object_privilege_info`. - Each `principal_object_privilege_info` contains: - Principal type. All principals of this type are listed as described below. - Array of `principal_object_privileges`. - Each `principal_object_privileges` contains: - Principal information (GUID, name, subtype) - List of applied object level privileges. #### Example response ```json { \"metadata_object_privileges\": [ { \"metadata_id\": \"metadata-guid-1\", \"metadata_name\": \"metadata-name-1\", \"metadata_type\": \"metadata-type-1\", \"principal_object_privilege_info\": [ { \"principal_type\": \"principal-type-1\", \"principal_object_privileges\": [ { \"principal_id\": \"principal-guid-1\", \"principal_name\": \"principal-name-1\", \"principal_sub_type\": \"principal-sub-type-1\", \"object_privileges\": \"[object-privilege-1, object-privilege-2]\" }, { \"principal_id\": \"principal-guid-2\", \"principal_name\": \"principal-name-2\", \"principal_sub_type\": \"principal-sub-type-2\", \"object_privileges\": \"[object-privilege-1, object-privilege-2]\" } ] }, { \"principal_type\": \"principal-type-2\", \"principal_object_privileges\": [ { \"principal_id\": \"principal-guid-3\", \"principal_name\": \"principal-guid-4\", \"principal_sub_type\": \"principal-sub-type-4\", \"object_privileges\": \"[object-privilege-1]\" } ] } ] }, { \"metadata_id\": \"metadata-guid-2\", \"metadata_name\": \"metadata-name-2\", \"metadata_type\": \"metadata-type-2\", \"principal_object_privilege_info\": [ { \"principal_type\": \"principal-type-1\", \"principal_object_privileges\": [ { \"principal_id\": \"principal-guid-1\", \"principal_name\": \"principal-name-1\", \"principal_sub_type\": \"principal-sub-type-1\", \"object_privileges\": \"[object-privilege-3, object-privilege-4]\" }, { \"principal_id\": \"principal-guid-2\", \"principal_name\": \"principal-name-2\", \"principal_sub_type\": \"principal-sub-type-2\", \"object_privileges\": \"[object-privilege-4]\" } ] } ] } ] } ``` + * @param param the request object + */ + public fetchObjectPrivileges(param: SecurityApiFetchObjectPrivilegesRequest, options?: Configuration): Promise { + return this.api.fetchObjectPrivileges(param.fetchObjectPrivilegesRequest, options).toPromise(); + } + + /** + * Version: 9.0.0.cl or later Fetches object permission details for a given principal object such as a user and group. Requires view access to the metadata object. #### Usage guidelines * To get a list of all metadata objects that a user or group can access, specify the `type` and GUID or name of the principal. * To get permission details for a specific object, add the `type` and GUID or name of the metadata object to your API request. Upon successful execution, the API returns a list of metadata objects and permission details for each object. + * @param param the request object + */ + public fetchPermissionsOfPrincipals(param: SecurityApiFetchPermissionsOfPrincipalsRequest, options?: Configuration): Promise { + return this.api.fetchPermissionsOfPrincipals(param.fetchPermissionsOfPrincipalsRequest, options).toPromise(); + } + + /** + * Version: 9.0.0.cl or later Fetches permission details for a given metadata object. Requires view access to the metadata object. #### Usage guidelines * To fetch a list of users and groups for a metadata object, specify `type` and GUID or name of the metadata object. * To get permission details for a specific user or group, add `type` and GUID or name of the principal object to your API request. Upon successful execution, the API returns permission details and principal information for the object specified in the API request. + * @param param the request object + */ + public fetchPermissionsOnMetadata(param: SecurityApiFetchPermissionsOnMetadataRequest, options?: Configuration): Promise { + return this.api.fetchPermissionsOnMetadata(param.fetchPermissionsOnMetadataRequest, options).toPromise(); + } + + /** + * Version: 26.3.0.cl or later This API allows the addition or deletion of object level privileges for a set of users and groups, on a set of metadata objects. It provides users to access certain features based on privilege based access control. #### Usage guidelines - Specify the `operation`. The supported operations are: `ADD`, `REMOVE`. - Specify the type of the objects on which the object privileges are being provided in `metadata_type`. Only `LOGICAL_TABLE` metadata type is supported for now. It may be extended for other metadata types in future. - Specify the list of object privilege types in the `object_privilege_types` array. The supported object privilege types are: `SPOTTER_COACHING_PRIVILEGE`. - Specify the identifiers (either GUID or name) for the metadata objects in the `metadata_identifiers` array. - Specify the `type` (`USER` or `USER_GROUP`) and `identifier` (either GUID or name) of the principals to which you want to apply the given operation and given object privileges in the `principals` array. - Ensure using correct Authorization Bearer Token corresponding to specific user & org. #### Example request ```json { \"operation\": \"operation-type\", \"metadata_type\": \"metadata-type\", \"object_privilege_types\": [\"privilege-type-1\", \"privilege-type-2\"], \"metadata_identifiers\": [\"metadata-guid-or-name-1\", \"metadata-guid-or-name-1\"], \"principals\": [ { \"type\": \"type-1\", \"identifier\": \"principal-guid-or-name-1\" }, { \"type\": \"type-2\", \"identifier\": \"principal-guid-or-name-2\" } ] } ``` > ###### Note: > * Only admin users, users with edit access and users with coaching privilege on a given data-model can add or remove principals related to SPOTTER_COACHING_PRIVILEGE + * @param param the request object + */ + public manageObjectPrivilege(param: SecurityApiManageObjectPrivilegeRequest, options?: Configuration): Promise { + return this.api.manageObjectPrivilege(param.manageObjectPrivilegeRequest, options).toPromise(); + } + + /** + * Version: 26.5.0.cl or later Allows publishing metadata objects across organizations in ThoughtSpot. Requires ADMINISTRATION role and TENANT scope. The API endpoint allows publishing the following types of metadata objects: * Liveboards * Answers * Logical Tables This API will essentially share the objects along with it\'s dependencies to the org admins of the orgs to which it is being published. + * @param param the request object + */ + public publishMetadata(param: SecurityApiPublishMetadataRequest, options?: Configuration): Promise { + return this.api.publishMetadata(param.publishMetadataRequest, options).toPromise(); + } + + /** + * Version: 9.0.0.cl or later Allows sharing one or several metadata objects with users and groups in ThoughtSpot. Requires edit access to the metadata object. #### Supported metadata objects: * Liveboards * Visualizations * Answers * Models * Views * Connections * Collections #### Object permissions You can provide `READ_ONLY` or `MODIFY` access when sharing an object with another user or group. The `READ_ONLY` permission grants view access to the shared object, whereas `MODIFY` provides edit access. To prevent a user or group from accessing the shared object, specify the GUID or name of the principal and set `shareMode` to `NO_ACCESS`. #### Sharing a visualization * Sharing a visualization implicitly shares the entire Liveboard with the recipient. * Object permissions set for a shared visualization also apply to the Liveboard unless overridden by another API request or via UI. * If email notifications for object sharing are enabled, a notification with a link to the shared visualization will be sent to the recipient’s email address. Although this link opens the shared visualization, recipients can also access other visualizations in the Liveboard. #### Sharing a collection Collections support **dual permissions** that provide fine-grained control: * **Collection permissions** (`share_mode`) - controls access to the collection itself (view, edit, delete the collection) * **Content permissions** (`content_share_mode`) - controls access to objects within the collection (view, edit objects inside) **Default Behavior:** - If only `share_mode` is specified, the content permissions default to `READ_ONLY` (except when `share_mode` is `NO_ACCESS`, then content also gets `NO_ACCESS`) - To give users edit access to collection contents, explicitly set `content_share_mode: \"MODIFY\"` ## Examples The following JSON examples can be copy-pasted as request bodies for the REST v2 API endpoint: ```bash POST /callosum/v1/v2/security/metadata/share Content-Type: application/x-www-form-urlencoded ``` ### Basic collection sharing Share a collection with read-only access: ```json { \"metadata_type\": \"COLLECTION\", \"metadata_identifiers\": [\"Sales Reports Collection\"], \"permissions\": [{ \"principal\": { \"type\": \"USER\", \"identifier\": \"alice@company.com\" }, \"share_mode\": \"READ_ONLY\" }], \"notification\": { \"message\": \"I\'ve shared the Sales Reports collection with you\", \"notify_on_share\": true } } ``` ### Collection sharing with dual permissions Share a collection with different permissions for the collection vs. its contents: ```json { \"metadata_type\": \"COLLECTION\", \"metadata_identifiers\": [\"Marketing Analytics\"], \"permissions\": [{ \"principal\": { \"type\": \"USER\", \"identifier\": \"bob@company.com\" }, \"share_mode\": \"MODIFY\", \"content_share_mode\": \"READ_ONLY\" }, { \"principal\": { \"type\": \"USER_GROUP\", \"identifier\": \"Marketing Team\" }, \"share_mode\": \"READ_ONLY\", \"content_share_mode\": \"READ_ONLY\" }], \"notification\": { \"emails\": [\"bob@company.com\"], \"message\": \"You can edit the collection but content is read-only\", \"enable_custom_url\": false, \"notify_on_share\": true }, \"has_lenient_discoverability\": false } ``` ### Multiple collections sharing Share multiple collections with different users: ```json { \"metadata\": [ { \"type\": \"COLLECTION\", \"identifier\": \"Q4 Reports\" }, { \"type\": \"COLLECTION\", \"identifier\": \"Executive Dashboard Collection\" } ], \"permissions\": [{ \"principal\": { \"type\": \"USER_GROUP\", \"identifier\": \"Executives\" }, \"share_mode\": \"MODIFY\" }, { \"principal\": { \"type\": \"USER\", \"identifier\": \"manager@company.com\" }, \"share_mode\": \"READ_ONLY\", \"content_share_mode\": \"MODIFY\" }], \"notification\": { \"message\": \"Sharing quarterly collections with leadership team\", \"notify_on_share\": true } } ``` ### Remove collection access Remove access to a collection by setting share_mode to NO_ACCESS: ```json { \"metadata_type\": \"COLLECTION\", \"metadata_identifiers\": [\"Confidential Reports\"], \"permissions\": [{ \"principal\": { \"type\": \"USER\", \"identifier\": \"former-employee@company.com\" }, \"share_mode\": \"NO_ACCESS\" }], \"notification\": { \"notify_on_share\": false } } ``` ### Collection Permission Scenarios **Scenario 1: Collection Admin** - `share_mode: MODIFY` + `content_share_mode: MODIFY` = Full control over collection and its contents **Scenario 2: Collection Curator** - `share_mode: MODIFY` + `content_share_mode: READ_ONLY` = Can manage collection structure but not edit contents **Scenario 3: Content Editor** - `share_mode: READ_ONLY` + `content_share_mode: MODIFY` = Can edit objects within collection but can\'t change collection itself **Scenario 4: Viewer** - `share_mode: READ_ONLY` + `content_share_mode: READ_ONLY` = View-only access to collection and contents + * @param param the request object + */ + public shareMetadata(param: SecurityApiShareMetadataRequest, options?: Configuration): Promise { + return this.api.shareMetadata(param.shareMetadataRequest, options).toPromise(); + } + + /** + * Version: 26.5.0.cl or later Allows unpublishing metadata objects from organizations in ThoughtSpot. Requires ADMINISTRATION role and TENANT scope. The API endpoint allows unpublishing the following types of metadata objects: * Liveboards * Answers * Logical Tables When unpublishing objects, you can: * Include dependencies by setting `include_dependencies` to true - this will unpublish all dependent objects if no other published object is using them * Force unpublish by setting `force` to true - this will break all dependent objects in the unpublished organizations + * @param param the request object + */ + public unpublishMetadata(param: SecurityApiUnpublishMetadataRequest, options?: Configuration): Promise { + return this.api.unpublishMetadata(param.unpublishMetadataRequest, options).toPromise(); + } + + /** + * Version: 10.12.0.cl or later Creates, updates, or deletes column security rules for specified tables. This API endpoint allows you to create, update, or delete column-level security rules on columns of a table. The operation follows an \"all or none\" policy: if defining security rules for any of the provided columns fails, the entire operation will be rolled back, and no rules will be created. #### Usage guidelines - Provide table identifier using either `identifier` (GUID or name) or `obj_identifier` (object ID) - Use `clear_csr: true` to remove all column security rules from the table - For each column, specify the security rule using `column_security_rules` array - Use `is_unsecured: true` to mark a specific column as unprotected - Use `group_access` operations to manage group associations: - `ADD`: Add groups to the column\'s access list - `REMOVE`: Remove groups from the column\'s access list - `REPLACE`: Replace all existing groups with the specified groups #### Required permissions - `ADMINISTRATION` - Can administer ThoughtSpot - `DATAMANAGEMENT` - Can manage data (if RBAC is disabled) - `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` - Can manage worksheet views and tables (if RBAC is enabled) #### Example request ```json { \"identifier\": \"table-guid\", \"obj_identifier\": \"table-object-id\", \"clear_csr\": false, \"column_security_rules\": [ { \"column_identifier\": \"col id or col name\", \"is_unsecured\": false, \"group_access\": [ { \"operation\": \"ADD\", \"group_identifiers\": [\"hr_group_id\", \"hr_group_name\", \"finance_group_id\"] } ] }, { \"column_identifier\": \"col id or col name\", \"is_unsecured\": true }, { \"column_identifier\": \"col id or col name\", \"is_unsecured\": false, \"group_access\": [ { \"operation\": \"REPLACE\", \"group_identifiers\": [\"management_group_id\", \"management_group_name\"] } ] } ] } ``` #### Request Body Schema - `identifier` (string, optional): GUID or name of the table for which we want to create column security rules - `obj_identifier` (string, optional): The object ID of the table - `clear_csr` (boolean, optional): If true, then all the secured columns will be marked as unprotected, and all the group associations will be removed - `column_security_rules` (array of objects, required): An array where each object defines the security rule for a specific column Each column security rule object contains: - `column_identifier` (string, required): Column identifier (col_id or name) - `is_unsecured` (boolean, optional): If true, the column will be marked as unprotected and all groups associated with it will be removed - `group_access` (array of objects, optional): Array of group operation objects Each group operation object contains: - `operation` (string, required): Operation type - ADD, REMOVE, or REPLACE - `group_identifiers` (array of strings, required): Array of group identifiers (name or GUID) on which the operation will be performed #### Response This API does not return any response body. A successful operation returns HTTP 200 status code. #### Operation Types - **ADD**: Adds the specified groups to the column\'s access list - **REMOVE**: Removes the specified groups from the column\'s access list - **REPLACE**: Replaces all existing groups with the specified groups + * @param param the request object + */ + public updateColumnSecurityRules(param: SecurityApiUpdateColumnSecurityRulesRequest, options?: Configuration): Promise { + return this.api.updateColumnSecurityRules(param.updateColumnSecurityRulesRequest, options).toPromise(); + } + +} + +import { ObservableSystemApi } from "./ObservableAPI"; +import { SystemApiRequestFactory, SystemApiResponseProcessor} from "../apis/SystemApi"; + +export interface SystemApiConfigureCommunicationChannelPreferencesRequest { + /** + * + * @type ConfigureCommunicationChannelPreferencesRequest + * @memberof SystemApiconfigureCommunicationChannelPreferences + */ + configureCommunicationChannelPreferencesRequest: ConfigureCommunicationChannelPreferencesRequest +} + +export interface SystemApiConfigureSecuritySettingsRequest { + /** + * + * @type ConfigureSecuritySettingsRequest + * @memberof SystemApiconfigureSecuritySettings + */ + configureSecuritySettingsRequest: ConfigureSecuritySettingsRequest +} + +export interface SystemApiGetSystemConfigRequest { +} + +export interface SystemApiGetSystemInformationRequest { +} + +export interface SystemApiGetSystemOverrideInfoRequest { +} + +export interface SystemApiSearchCommunicationChannelPreferencesRequest { + /** + * + * @type SearchCommunicationChannelPreferencesRequest + * @memberof SystemApisearchCommunicationChannelPreferences + */ + searchCommunicationChannelPreferencesRequest: SearchCommunicationChannelPreferencesRequest +} + +export interface SystemApiSearchSecuritySettingsRequest { + /** + * + * @type SearchSecuritySettingsRequest + * @memberof SystemApisearchSecuritySettings + */ + searchSecuritySettingsRequest: SearchSecuritySettingsRequest +} + +export interface SystemApiUpdateSystemConfigRequest { + /** + * + * @type UpdateSystemConfigRequest + * @memberof SystemApiupdateSystemConfig + */ + updateSystemConfigRequest: UpdateSystemConfigRequest +} + +export interface SystemApiValidateCommunicationChannelRequest { + /** + * + * @type ValidateCommunicationChannelRequest + * @memberof SystemApivalidateCommunicationChannel + */ + validateCommunicationChannelRequest: ValidateCommunicationChannelRequest +} + +export class ObjectSystemApi { + private api: ObservableSystemApi + + public constructor(configuration: Configuration, requestFactory?: SystemApiRequestFactory, responseProcessor?: SystemApiResponseProcessor) { + this.api = new ObservableSystemApi(configuration, requestFactory, responseProcessor); + } + + /** + * Version: 10.14.0.cl or later Configure communication channel preferences. - Use `cluster_preferences` to update the default preferences for your ThoughtSpot application instance. - If your instance has [Orgs](https://docs.thoughtspot.com/cloud/latest/orgs-overview), use `org_preferences` to specify Org-specific preferences that override the defaults. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) or `DEVELOPER` (**Has developer privilege**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, users with `APPLICATION_ADMINISTRATION` (**Can manage application settings**) privilege are also authorized to perform this action. + * @param param the request object + */ + public configureCommunicationChannelPreferences(param: SystemApiConfigureCommunicationChannelPreferencesRequest, options?: Configuration): Promise { + return this.api.configureCommunicationChannelPreferences(param.configureCommunicationChannelPreferencesRequest, options).toPromise(); + } + + /** + * Version: 26.2.0.cl or later Configure security settings for your ThoughtSpot application instance. - Use `cluster_preferences` to update cluster-level security settings including CORS whitelisted URLs, CSP settings, SAML redirect URLs, partitioned cookies, and non-embed access configuration. - Use `org_preferences` to configure Org-specific security settings. If your instance has [Orgs](https://docs.thoughtspot.com/cloud/latest/orgs-overview), this allows configuring CORS and non-embed access settings specific to the Org. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) or `DEVELOPER` (**Has developer privilege**) privilege. Cluster-level SAML and script-src settings require `ADMINISTRATION` privilege. See [Security Settings](https://developers.thoughtspot.com/docs/security-settings) for more details. + * @param param the request object + */ + public configureSecuritySettings(param: SystemApiConfigureSecuritySettingsRequest, options?: Configuration): Promise { + return this.api.configureSecuritySettings(param.configureSecuritySettingsRequest, options).toPromise(); + } + + /** + * Version: 9.0.0.cl or later Retrieves the current configuration details of the cluster. If the request is successful, the API returns a list configuration settings applied on the cluster. Requires `ADMINISTRATION`(**Can administer ThoughtSpot**) privilege to view these complete configuration settings of the cluster. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `SYSTEM_INFO_ADMINISTRATION` (**Can view system activities**) privilege is required. This API does not require any parameters to be passed in the request. + * @param param the request object + */ + public getSystemConfig(param: SystemApiGetSystemConfigRequest = {}, options?: Configuration): Promise { + return this.api.getSystemConfig( options).toPromise(); + } + + /** + * Version: 9.0.0.cl or later Gets system information such as the release version, locale, time zone, deployment environment, date format, and date time format of the cluster. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privileges. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `SYSTEM_INFO_ADMINISTRATION` (**Can view system activities**) privilege is required. This API does not require any parameters to be passed in the request. + * @param param the request object + */ + public getSystemInformation(param: SystemApiGetSystemInformationRequest = {}, options?: Configuration): Promise { + return this.api.getSystemInformation( options).toPromise(); + } + + /** + * Version: 9.2.0.cl or later Gets a list of configuration overrides applied on the cluster. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `APPLICATION_ADMINISTRATION` (**Can manage application settings**) privilege is required. This API does not require any parameters to be passed in the request. + * @param param the request object + */ + public getSystemOverrideInfo(param: SystemApiGetSystemOverrideInfoRequest = {}, options?: Configuration): Promise { + return this.api.getSystemOverrideInfo( options).toPromise(); + } + + /** + * Version: 10.14.0.cl or later Fetch communication channel preferences. - Use `cluster_preferences` to fetch the default preferences for your ThoughtSpot application instance. - If your instance has [Orgs](https://docs.thoughtspot.com/cloud/latest/orgs-overview), use `org_preferences` to fetch any Org-specific preferences that override the defaults. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) or `DEVELOPER` (**Has developer privilege**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, users with `APPLICATION_ADMINISTRATION` (**Can manage application settings**) privilege are also authorized to perform this action. + * @param param the request object + */ + public searchCommunicationChannelPreferences(param: SystemApiSearchCommunicationChannelPreferencesRequest, options?: Configuration): Promise { + return this.api.searchCommunicationChannelPreferences(param.searchCommunicationChannelPreferencesRequest, options).toPromise(); + } + + /** + * Version: 26.2.0.cl or later Fetch security settings for your ThoughtSpot application instance. - Use `scope: CLUSTER` to retrieve cluster-level security settings, including CORS and CSP allowlists, SAML redirect URLs, and settings that control access to non-embedded pages. - Use `scope: ORG` to retrieve Org-level security settings. If your instance has [Orgs](https://docs.thoughtspot.com/cloud/latest/orgs-overview), this returns CORS and non-embed access settings specific to the Org. - If `scope` is not specified, returns both cluster and Org-specific settings based on user privileges. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) or `DEVELOPER` (**Has developer privilege**) privilege. See [Security Settings](https://developers.thoughtspot.com/docs/security-settings) for more details. + * @param param the request object + */ + public searchSecuritySettings(param: SystemApiSearchSecuritySettingsRequest, options?: Configuration): Promise { + return this.api.searchSecuritySettings(param.searchSecuritySettingsRequest, options).toPromise(); + } + + /** + * Version: 9.2.0.cl or later Updates the current configuration of the cluster. You must send the configuration data in JSON format. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privileges. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `APPLICATION_ADMINISTRATION` (**Can manage application settings**) privilege is required. + * @param param the request object + */ + public updateSystemConfig(param: SystemApiUpdateSystemConfigRequest, options?: Configuration): Promise { + return this.api.updateSystemConfig(param.updateSystemConfigRequest, options).toPromise(); + } + + /** + * Version: 26.4.0.cl or later Validates a communication channel configuration to ensure it is properly set up and can receive events. - Use `channel_type` to specify the type of communication channel to validate (e.g., WEBHOOK). - Use `channel_identifier` to provide the unique identifier or name for the communication channel. - Use `event_type` to specify the event type to validate for this channel. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) or `DEVELOPER` (**Has developer privilege**) privilege. For webhook channels, users with `CAN_MANAGE_WEBHOOKS` (**Can manage webhooks**) privilege are also authorized to perform this action. + * @param param the request object + */ + public validateCommunicationChannel(param: SystemApiValidateCommunicationChannelRequest, options?: Configuration): Promise { + return this.api.validateCommunicationChannel(param.validateCommunicationChannelRequest, options).toPromise(); + } + +} + +import { ObservableTagsApi } from "./ObservableAPI"; +import { TagsApiRequestFactory, TagsApiResponseProcessor} from "../apis/TagsApi"; + +export interface TagsApiAssignTagRequest { + /** + * + * @type AssignTagRequest + * @memberof TagsApiassignTag + */ + assignTagRequest: AssignTagRequest +} + +export interface TagsApiCreateTagRequest { + /** + * + * @type CreateTagRequest + * @memberof TagsApicreateTag + */ + createTagRequest: CreateTagRequest +} + +export interface TagsApiDeleteTagRequest { + /** + * Tag identifier Tag name or Tag id. + * @type string + * @memberof TagsApideleteTag + */ + tagIdentifier: string +} + +export interface TagsApiSearchTagsRequest { + /** + * + * @type SearchTagsRequest + * @memberof TagsApisearchTags + */ + searchTagsRequest: SearchTagsRequest +} + +export interface TagsApiUnassignTagRequest { + /** + * + * @type UnassignTagRequest + * @memberof TagsApiunassignTag + */ + unassignTagRequest: UnassignTagRequest +} + +export interface TagsApiUpdateTagRequest { + /** + * Name or Id of the tag. + * @type string + * @memberof TagsApiupdateTag + */ + tagIdentifier: string + /** + * + * @type UpdateTagRequest + * @memberof TagsApiupdateTag + */ + updateTagRequest: UpdateTagRequest +} + +export class ObjectTagsApi { + private api: ObservableTagsApi + + public constructor(configuration: Configuration, requestFactory?: TagsApiRequestFactory, responseProcessor?: TagsApiResponseProcessor) { + this.api = new ObservableTagsApi(configuration, requestFactory, responseProcessor); + } + + /** + * Version: 9.0.0.cl or later Assigns tags to Liveboards, Answers, Tables, and Worksheets. Requires edit access to the metadata object. + * @param param the request object + */ + public assignTag(param: TagsApiAssignTagRequest, options?: Configuration): Promise { + return this.api.assignTag(param.assignTagRequest, options).toPromise(); + } + + /** + * Version: 9.0.0.cl or later Creates a tag object. Tags are labels that identify a metadata object. For example, you can create a tag to designate subject areas, such as sales, HR, marketing, and finance. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `TAGMANAGEMENT` (**Can manage tags**) privilege is required to create, edit, and delete tags. + * @param param the request object + */ + public createTag(param: TagsApiCreateTagRequest, options?: Configuration): Promise { + return this.api.createTag(param.createTagRequest, options).toPromise(); + } + + /** + * Version: 9.0.0.cl or later Deletes a tag object from the ThoughtSpot system Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `TAGMANAGEMENT` (**Can manage tags**) privilege is required to create, edit, and delete tags. + * @param param the request object + */ + public deleteTag(param: TagsApiDeleteTagRequest, options?: Configuration): Promise { + return this.api.deleteTag(param.tagIdentifier, options).toPromise(); + } + + /** + * Version: 9.0.0.cl or later Gets a list of tag objects available on the ThoughtSpot system. To get details of a specific tag object, specify the GUID or name. Any authenticated user can search for tag objects. + * @param param the request object + */ + public searchTags(param: TagsApiSearchTagsRequest, options?: Configuration): Promise> { + return this.api.searchTags(param.searchTagsRequest, options).toPromise(); + } + + /** + * Version: 9.0.0.cl or later Removes the tags applied to a Liveboard, Answer, Table, or Worksheet. Requires edit access to the metadata object. + * @param param the request object + */ + public unassignTag(param: TagsApiUnassignTagRequest, options?: Configuration): Promise { + return this.api.unassignTag(param.unassignTagRequest, options).toPromise(); + } + + /** + * Version: 9.0.0.cl or later Updates a tag object. You can modify the `name` and `color` properties of a tag object. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `TAGMANAGEMENT` (**Can manage tags**) privilege is required to create, edit, and delete tags. + * @param param the request object + */ + public updateTag(param: TagsApiUpdateTagRequest, options?: Configuration): Promise { + return this.api.updateTag(param.tagIdentifier, param.updateTagRequest, options).toPromise(); + } + +} + +import { ObservableThoughtSpotRestApi } from "./ObservableAPI"; +import { ThoughtSpotRestApiRequestFactory, ThoughtSpotRestApiResponseProcessor} from "../apis/ThoughtSpotRestApi"; + +export interface ThoughtSpotRestApiActivateUserRequest { + /** + * + * @type ActivateUserRequest + * @memberof ThoughtSpotRestApiactivateUser + */ + activateUserRequest: ActivateUserRequest +} + +export interface ThoughtSpotRestApiAssignChangeAuthorRequest { + /** + * + * @type AssignChangeAuthorRequest + * @memberof ThoughtSpotRestApiassignChangeAuthor + */ + assignChangeAuthorRequest: AssignChangeAuthorRequest +} + +export interface ThoughtSpotRestApiAssignTagRequest { + /** + * + * @type AssignTagRequest + * @memberof ThoughtSpotRestApiassignTag + */ + assignTagRequest: AssignTagRequest +} + +export interface ThoughtSpotRestApiChangeUserPasswordRequest { + /** + * + * @type ChangeUserPasswordRequest + * @memberof ThoughtSpotRestApichangeUserPassword + */ + changeUserPasswordRequest: ChangeUserPasswordRequest +} + +export interface ThoughtSpotRestApiCommitBranchRequest { + /** + * + * @type CommitBranchRequest + * @memberof ThoughtSpotRestApicommitBranch + */ + commitBranchRequest: CommitBranchRequest +} + +export interface ThoughtSpotRestApiConfigureAuthSettingsRequest { + /** + * + * @type ConfigureAuthSettingsRequest + * @memberof ThoughtSpotRestApiconfigureAuthSettings + */ + configureAuthSettingsRequest: ConfigureAuthSettingsRequest +} + +export interface ThoughtSpotRestApiConfigureCommunicationChannelPreferencesRequest { + /** + * + * @type ConfigureCommunicationChannelPreferencesRequest + * @memberof ThoughtSpotRestApiconfigureCommunicationChannelPreferences + */ + configureCommunicationChannelPreferencesRequest: ConfigureCommunicationChannelPreferencesRequest +} + +export interface ThoughtSpotRestApiConfigureSecuritySettingsRequest { + /** + * + * @type ConfigureSecuritySettingsRequest + * @memberof ThoughtSpotRestApiconfigureSecuritySettings + */ + configureSecuritySettingsRequest: ConfigureSecuritySettingsRequest +} + +export interface ThoughtSpotRestApiConnectionConfigurationSearchRequest { + /** + * + * @type ConnectionConfigurationSearchRequest + * @memberof ThoughtSpotRestApiconnectionConfigurationSearch + */ + connectionConfigurationSearchRequest: ConnectionConfigurationSearchRequest +} + +export interface ThoughtSpotRestApiConvertWorksheetToModelRequest { + /** + * + * @type ConvertWorksheetToModelRequest + * @memberof ThoughtSpotRestApiconvertWorksheetToModel + */ + convertWorksheetToModelRequest: ConvertWorksheetToModelRequest +} + +export interface ThoughtSpotRestApiCopyObjectRequest { + /** + * + * @type CopyObjectRequest + * @memberof ThoughtSpotRestApicopyObject + */ + copyObjectRequest: CopyObjectRequest +} + +export interface ThoughtSpotRestApiCreateAgentConversationRequest { + /** + * + * @type CreateAgentConversationRequest + * @memberof ThoughtSpotRestApicreateAgentConversation + */ + createAgentConversationRequest: CreateAgentConversationRequest +} + +export interface ThoughtSpotRestApiCreateCalendarRequest { + /** + * + * @type CreateCalendarRequest + * @memberof ThoughtSpotRestApicreateCalendar + */ + createCalendarRequest: CreateCalendarRequest +} + +export interface ThoughtSpotRestApiCreateCollectionRequest { + /** + * + * @type CreateCollectionRequest + * @memberof ThoughtSpotRestApicreateCollection + */ + createCollectionRequest: CreateCollectionRequest +} + +export interface ThoughtSpotRestApiCreateConfigRequest { + /** + * + * @type CreateConfigRequest + * @memberof ThoughtSpotRestApicreateConfig + */ + createConfigRequest: CreateConfigRequest +} + +export interface ThoughtSpotRestApiCreateConnectionRequest { + /** + * + * @type CreateConnectionRequest + * @memberof ThoughtSpotRestApicreateConnection + */ + createConnectionRequest: CreateConnectionRequest +} + +export interface ThoughtSpotRestApiCreateConnectionConfigurationRequest { + /** + * + * @type CreateConnectionConfigurationRequest + * @memberof ThoughtSpotRestApicreateConnectionConfiguration + */ + createConnectionConfigurationRequest: CreateConnectionConfigurationRequest +} + +export interface ThoughtSpotRestApiCreateConversationRequest { + /** + * + * @type CreateConversationRequest + * @memberof ThoughtSpotRestApicreateConversation + */ + createConversationRequest: CreateConversationRequest +} + +export interface ThoughtSpotRestApiCreateCustomActionRequest { + /** + * + * @type CreateCustomActionRequest + * @memberof ThoughtSpotRestApicreateCustomAction + */ + createCustomActionRequest: CreateCustomActionRequest +} + +export interface ThoughtSpotRestApiCreateEmailCustomizationRequest { + /** + * + * @type CreateEmailCustomizationRequest + * @memberof ThoughtSpotRestApicreateEmailCustomization + */ + createEmailCustomizationRequest: CreateEmailCustomizationRequest +} + +export interface ThoughtSpotRestApiCreateOrgRequest { + /** + * + * @type CreateOrgRequest + * @memberof ThoughtSpotRestApicreateOrg + */ + createOrgRequest: CreateOrgRequest +} + +export interface ThoughtSpotRestApiCreateRoleRequest { + /** + * + * @type CreateRoleRequest + * @memberof ThoughtSpotRestApicreateRole + */ + createRoleRequest: CreateRoleRequest +} + +export interface ThoughtSpotRestApiCreateScheduleRequest { + /** + * + * @type CreateScheduleRequest + * @memberof ThoughtSpotRestApicreateSchedule + */ + createScheduleRequest: CreateScheduleRequest +} + +export interface ThoughtSpotRestApiCreateTagRequest { + /** + * + * @type CreateTagRequest + * @memberof ThoughtSpotRestApicreateTag + */ + createTagRequest: CreateTagRequest +} + +export interface ThoughtSpotRestApiCreateUserRequest { + /** + * + * @type CreateUserRequest + * @memberof ThoughtSpotRestApicreateUser + */ + createUserRequest: CreateUserRequest +} + +export interface ThoughtSpotRestApiCreateUserGroupRequest { + /** + * + * @type CreateUserGroupRequest + * @memberof ThoughtSpotRestApicreateUserGroup + */ + createUserGroupRequest: CreateUserGroupRequest +} + +export interface ThoughtSpotRestApiCreateVariableRequest { + /** + * + * @type CreateVariableRequest + * @memberof ThoughtSpotRestApicreateVariable + */ + createVariableRequest: CreateVariableRequest +} + +export interface ThoughtSpotRestApiCreateWebhookConfigurationRequest { + /** + * + * @type CreateWebhookConfigurationRequest + * @memberof ThoughtSpotRestApicreateWebhookConfiguration + */ + createWebhookConfigurationRequest: CreateWebhookConfigurationRequest +} + +export interface ThoughtSpotRestApiDbtConnectionRequest { + /** + * Name of the connection. + * @type string + * @memberof ThoughtSpotRestApidbtConnection + */ + connectionName: string + /** + * Name of the Database. + * @type string + * @memberof ThoughtSpotRestApidbtConnection + */ + databaseName: string + /** + * Mention type of Import + * @type string + * @memberof ThoughtSpotRestApidbtConnection + */ + importType?: string + /** + * Access token is mandatory when Import_Type is DBT_CLOUD. + * @type string + * @memberof ThoughtSpotRestApidbtConnection + */ + accessToken?: string + /** + * DBT URL is mandatory when Import_Type is DBT_CLOUD. + * @type string + * @memberof ThoughtSpotRestApidbtConnection + */ + dbtUrl?: string + /** + * Account ID is mandatory when Import_Type is DBT_CLOUD + * @type string + * @memberof ThoughtSpotRestApidbtConnection + */ + accountId?: string + /** + * Project ID is mandatory when Import_Type is DBT_CLOUD + * @type string + * @memberof ThoughtSpotRestApidbtConnection + */ + projectId?: string + /** + * DBT Environment ID\\\" + * @type string + * @memberof ThoughtSpotRestApidbtConnection + */ + dbtEnvId?: string + /** + * Name of the project + * @type string + * @memberof ThoughtSpotRestApidbtConnection + */ + projectName?: string + /** + * Upload DBT Manifest and Catalog artifact files as a ZIP file. This field is Mandatory when Import Type is \\\'ZIP_FILE\\\' + * @type HttpFile + * @memberof ThoughtSpotRestApidbtConnection + */ + fileContent?: HttpFile +} + +export interface ThoughtSpotRestApiDbtGenerateSyncTmlRequest { + /** + * Unique ID of the DBT connection. + * @type string + * @memberof ThoughtSpotRestApidbtGenerateSyncTml + */ + dbtConnectionIdentifier: string + /** + * Upload DBT Manifest and Catalog artifact files as a ZIP file. This field is mandatory if the connection was created with import_type ‘ZIP_FILE’ + * @type HttpFile + * @memberof ThoughtSpotRestApidbtGenerateSyncTml + */ + fileContent?: HttpFile +} + +export interface ThoughtSpotRestApiDbtGenerateTmlRequest { + /** + * Unique ID of the DBT connection. + * @type string + * @memberof ThoughtSpotRestApidbtGenerateTml + */ + dbtConnectionIdentifier: string + /** + * List of Models and their respective Tables Example: \\\'[{\\\"model_name\\\": \\\"model_name\\\", \\\"tables\\\": [\\\"table_name\\\"]}]\\\' + * @type string + * @memberof ThoughtSpotRestApidbtGenerateTml + */ + modelTables: string + /** + * Mention the worksheet tmls to import + * @type string + * @memberof ThoughtSpotRestApidbtGenerateTml + */ + importWorksheets: string + /** + * List of worksheets is mandatory when import_Worksheets is type SELECTED Example: [\\\"worksheet_name\\\"] + * @type string + * @memberof ThoughtSpotRestApidbtGenerateTml + */ + worksheets?: string + /** + * Upload DBT Manifest and Catalog artifact files as a ZIP file. This field is mandatory if the connection was created with import_type ‘ZIP_FILE’ + * @type HttpFile + * @memberof ThoughtSpotRestApidbtGenerateTml + */ + fileContent?: HttpFile +} + +export interface ThoughtSpotRestApiDbtSearchRequest { +} + +export interface ThoughtSpotRestApiDeactivateUserRequest { + /** + * + * @type DeactivateUserRequest + * @memberof ThoughtSpotRestApideactivateUser + */ + deactivateUserRequest: DeactivateUserRequest +} + +export interface ThoughtSpotRestApiDeleteCalendarRequest { + /** + * Unique ID or name of the Calendar. + * @type string + * @memberof ThoughtSpotRestApideleteCalendar + */ + calendarIdentifier: string +} + +export interface ThoughtSpotRestApiDeleteCollectionRequest { + /** + * + * @type DeleteCollectionRequest + * @memberof ThoughtSpotRestApideleteCollection + */ + deleteCollectionRequest: DeleteCollectionRequest +} + +export interface ThoughtSpotRestApiDeleteConfigRequest { + /** + * + * @type DeleteConfigRequest + * @memberof ThoughtSpotRestApideleteConfig + */ + deleteConfigRequest: DeleteConfigRequest +} + +export interface ThoughtSpotRestApiDeleteConnectionRequest { + /** + * + * @type DeleteConnectionRequest + * @memberof ThoughtSpotRestApideleteConnection + */ + deleteConnectionRequest: DeleteConnectionRequest +} + +export interface ThoughtSpotRestApiDeleteConnectionConfigurationRequest { + /** + * + * @type DeleteConnectionConfigurationRequest + * @memberof ThoughtSpotRestApideleteConnectionConfiguration + */ + deleteConnectionConfigurationRequest: DeleteConnectionConfigurationRequest +} + +export interface ThoughtSpotRestApiDeleteConnectionV2Request { + /** + * Unique ID or name of the connection. + * @type string + * @memberof ThoughtSpotRestApideleteConnectionV2 + */ + connectionIdentifier: string +} + +export interface ThoughtSpotRestApiDeleteCustomActionRequest { + /** + * Unique ID or name of the custom action. + * @type string + * @memberof ThoughtSpotRestApideleteCustomAction + */ + customActionIdentifier: string +} + +export interface ThoughtSpotRestApiDeleteDbtConnectionRequest { + /** + * Unique ID of the DBT Connection. + * @type string + * @memberof ThoughtSpotRestApideleteDbtConnection + */ + dbtConnectionIdentifier: string +} + +export interface ThoughtSpotRestApiDeleteEmailCustomizationRequest { + /** + * Unique ID or name of the email customization. + * @type string + * @memberof ThoughtSpotRestApideleteEmailCustomization + */ + templateIdentifier: string +} + +export interface ThoughtSpotRestApiDeleteMetadataRequest { + /** + * + * @type DeleteMetadataRequest + * @memberof ThoughtSpotRestApideleteMetadata + */ + deleteMetadataRequest: DeleteMetadataRequest +} + +export interface ThoughtSpotRestApiDeleteOrgRequest { + /** + * ID or name of the Org + * @type string + * @memberof ThoughtSpotRestApideleteOrg + */ + orgIdentifier: string +} + +export interface ThoughtSpotRestApiDeleteOrgEmailCustomizationRequest { + /** + * + * @type DeleteOrgEmailCustomizationRequest + * @memberof ThoughtSpotRestApideleteOrgEmailCustomization + */ + deleteOrgEmailCustomizationRequest: DeleteOrgEmailCustomizationRequest +} + +export interface ThoughtSpotRestApiDeleteRoleRequest { + /** + * Unique ID or name of the Role. ReadOnly roles cannot be deleted. + * @type string + * @memberof ThoughtSpotRestApideleteRole + */ + roleIdentifier: string +} + +export interface ThoughtSpotRestApiDeleteScheduleRequest { + /** + * Unique ID or name of the scheduled job. + * @type string + * @memberof ThoughtSpotRestApideleteSchedule + */ + scheduleIdentifier: string +} + +export interface ThoughtSpotRestApiDeleteTagRequest { + /** + * Tag identifier Tag name or Tag id. + * @type string + * @memberof ThoughtSpotRestApideleteTag + */ + tagIdentifier: string +} + +export interface ThoughtSpotRestApiDeleteUserRequest { + /** + * GUID / name of the user + * @type string + * @memberof ThoughtSpotRestApideleteUser + */ + userIdentifier: string +} + +export interface ThoughtSpotRestApiDeleteUserGroupRequest { + /** + * GUID or name of the group. + * @type string + * @memberof ThoughtSpotRestApideleteUserGroup + */ + groupIdentifier: string +} + +export interface ThoughtSpotRestApiDeleteVariableRequest { + /** + * Unique id or name of the variable + * @type string + * @memberof ThoughtSpotRestApideleteVariable + */ + identifier: string +} + +export interface ThoughtSpotRestApiDeleteVariablesRequest { + /** + * + * @type DeleteVariablesRequest + * @memberof ThoughtSpotRestApideleteVariables + */ + deleteVariablesRequest: DeleteVariablesRequest +} + +export interface ThoughtSpotRestApiDeleteWebhookConfigurationsRequest { + /** + * + * @type DeleteWebhookConfigurationsRequest + * @memberof ThoughtSpotRestApideleteWebhookConfigurations + */ + deleteWebhookConfigurationsRequest: DeleteWebhookConfigurationsRequest +} + +export interface ThoughtSpotRestApiDeployCommitRequest { + /** + * + * @type DeployCommitRequest + * @memberof ThoughtSpotRestApideployCommit + */ + deployCommitRequest: DeployCommitRequest +} + +export interface ThoughtSpotRestApiDownloadConnectionMetadataChangesRequest { + /** + * GUID of the connection + * @type string + * @memberof ThoughtSpotRestApidownloadConnectionMetadataChanges + */ + connectionIdentifier: string +} + +export interface ThoughtSpotRestApiExportAnswerReportRequest { + /** + * + * @type ExportAnswerReportRequest + * @memberof ThoughtSpotRestApiexportAnswerReport + */ + exportAnswerReportRequest: ExportAnswerReportRequest +} + +export interface ThoughtSpotRestApiExportLiveboardReportRequest { + /** + * + * @type ExportLiveboardReportRequest + * @memberof ThoughtSpotRestApiexportLiveboardReport + */ + exportLiveboardReportRequest: ExportLiveboardReportRequest +} + +export interface ThoughtSpotRestApiExportMetadataTMLRequest { + /** + * + * @type ExportMetadataTMLRequest + * @memberof ThoughtSpotRestApiexportMetadataTML + */ + exportMetadataTMLRequest: ExportMetadataTMLRequest +} + +export interface ThoughtSpotRestApiExportMetadataTMLBatchedRequest { + /** + * + * @type ExportMetadataTMLBatchedRequest + * @memberof ThoughtSpotRestApiexportMetadataTMLBatched + */ + exportMetadataTMLBatchedRequest: ExportMetadataTMLBatchedRequest +} + +export interface ThoughtSpotRestApiFetchAnswerDataRequest { + /** + * + * @type FetchAnswerDataRequest + * @memberof ThoughtSpotRestApifetchAnswerData + */ + fetchAnswerDataRequest: FetchAnswerDataRequest +} + +export interface ThoughtSpotRestApiFetchAnswerSqlQueryRequest { + /** + * + * @type FetchAnswerSqlQueryRequest + * @memberof ThoughtSpotRestApifetchAnswerSqlQuery + */ + fetchAnswerSqlQueryRequest: FetchAnswerSqlQueryRequest +} + +export interface ThoughtSpotRestApiFetchAsyncImportTaskStatusRequest { + /** + * + * @type FetchAsyncImportTaskStatusRequest + * @memberof ThoughtSpotRestApifetchAsyncImportTaskStatus + */ + fetchAsyncImportTaskStatusRequest: FetchAsyncImportTaskStatusRequest +} + +export interface ThoughtSpotRestApiFetchColumnSecurityRulesRequest { + /** + * + * @type FetchColumnSecurityRulesRequest + * @memberof ThoughtSpotRestApifetchColumnSecurityRules + */ + fetchColumnSecurityRulesRequest: FetchColumnSecurityRulesRequest +} + +export interface ThoughtSpotRestApiFetchConnectionDiffStatusRequest { + /** + * GUID of the connection + * @type string + * @memberof ThoughtSpotRestApifetchConnectionDiffStatus + */ + connectionIdentifier: string +} + +export interface ThoughtSpotRestApiFetchLiveboardDataRequest { + /** + * + * @type FetchLiveboardDataRequest + * @memberof ThoughtSpotRestApifetchLiveboardData + */ + fetchLiveboardDataRequest: FetchLiveboardDataRequest +} + +export interface ThoughtSpotRestApiFetchLiveboardSqlQueryRequest { + /** + * + * @type FetchLiveboardSqlQueryRequest + * @memberof ThoughtSpotRestApifetchLiveboardSqlQuery + */ + fetchLiveboardSqlQueryRequest: FetchLiveboardSqlQueryRequest +} + +export interface ThoughtSpotRestApiFetchLogsRequest { + /** + * + * @type FetchLogsRequest + * @memberof ThoughtSpotRestApifetchLogs + */ + fetchLogsRequest: FetchLogsRequest +} + +export interface ThoughtSpotRestApiFetchObjectPrivilegesRequest { + /** + * + * @type FetchObjectPrivilegesRequest + * @memberof ThoughtSpotRestApifetchObjectPrivileges + */ + fetchObjectPrivilegesRequest: FetchObjectPrivilegesRequest +} + +export interface ThoughtSpotRestApiFetchPermissionsOfPrincipalsRequest { + /** + * + * @type FetchPermissionsOfPrincipalsRequest + * @memberof ThoughtSpotRestApifetchPermissionsOfPrincipals + */ + fetchPermissionsOfPrincipalsRequest: FetchPermissionsOfPrincipalsRequest +} + +export interface ThoughtSpotRestApiFetchPermissionsOnMetadataRequest { + /** + * + * @type FetchPermissionsOnMetadataRequest + * @memberof ThoughtSpotRestApifetchPermissionsOnMetadata + */ + fetchPermissionsOnMetadataRequest: FetchPermissionsOnMetadataRequest +} + +export interface ThoughtSpotRestApiForceLogoutUsersRequest { + /** + * + * @type ForceLogoutUsersRequest + * @memberof ThoughtSpotRestApiforceLogoutUsers + */ + forceLogoutUsersRequest: ForceLogoutUsersRequest +} + +export interface ThoughtSpotRestApiGenerateCSVRequest { + /** + * + * @type GenerateCSVRequest + * @memberof ThoughtSpotRestApigenerateCSV + */ + generateCSVRequest: GenerateCSVRequest +} + +export interface ThoughtSpotRestApiGetCurrentUserInfoRequest { +} + +export interface ThoughtSpotRestApiGetCurrentUserTokenRequest { +} + +export interface ThoughtSpotRestApiGetCustomAccessTokenRequest { + /** + * + * @type GetCustomAccessTokenRequest + * @memberof ThoughtSpotRestApigetCustomAccessToken + */ + getCustomAccessTokenRequest: GetCustomAccessTokenRequest +} + +export interface ThoughtSpotRestApiGetDataSourceSuggestionsRequest { + /** + * + * @type GetDataSourceSuggestionsRequest + * @memberof ThoughtSpotRestApigetDataSourceSuggestions + */ + getDataSourceSuggestionsRequest: GetDataSourceSuggestionsRequest +} + +export interface ThoughtSpotRestApiGetFullAccessTokenRequest { + /** + * + * @type GetFullAccessTokenRequest + * @memberof ThoughtSpotRestApigetFullAccessToken + */ + getFullAccessTokenRequest: GetFullAccessTokenRequest +} + +export interface ThoughtSpotRestApiGetNLInstructionsRequest { + /** + * + * @type GetNLInstructionsRequest + * @memberof ThoughtSpotRestApigetNLInstructions + */ + getNLInstructionsRequest: GetNLInstructionsRequest +} + +export interface ThoughtSpotRestApiGetObjectAccessTokenRequest { + /** + * + * @type GetObjectAccessTokenRequest + * @memberof ThoughtSpotRestApigetObjectAccessToken + */ + getObjectAccessTokenRequest: GetObjectAccessTokenRequest +} + +export interface ThoughtSpotRestApiGetRelevantQuestionsRequest { + /** + * + * @type GetRelevantQuestionsRequest + * @memberof ThoughtSpotRestApigetRelevantQuestions + */ + getRelevantQuestionsRequest: GetRelevantQuestionsRequest +} + +export interface ThoughtSpotRestApiGetSystemConfigRequest { +} + +export interface ThoughtSpotRestApiGetSystemInformationRequest { +} + +export interface ThoughtSpotRestApiGetSystemOverrideInfoRequest { +} + +export interface ThoughtSpotRestApiImportMetadataTMLRequest { + /** + * + * @type ImportMetadataTMLRequest + * @memberof ThoughtSpotRestApiimportMetadataTML + */ + importMetadataTMLRequest: ImportMetadataTMLRequest +} + +export interface ThoughtSpotRestApiImportMetadataTMLAsyncRequest { + /** + * + * @type ImportMetadataTMLAsyncRequest + * @memberof ThoughtSpotRestApiimportMetadataTMLAsync + */ + importMetadataTMLAsyncRequest: ImportMetadataTMLAsyncRequest +} + +export interface ThoughtSpotRestApiImportUserGroupsRequest { + /** + * + * @type ImportUserGroupsRequest + * @memberof ThoughtSpotRestApiimportUserGroups + */ + importUserGroupsRequest: ImportUserGroupsRequest +} + +export interface ThoughtSpotRestApiImportUsersRequest { + /** + * + * @type ImportUsersRequest + * @memberof ThoughtSpotRestApiimportUsers + */ + importUsersRequest: ImportUsersRequest +} + +export interface ThoughtSpotRestApiLoginRequest { + /** + * + * @type LoginRequest + * @memberof ThoughtSpotRestApilogin + */ + loginRequest: LoginRequest +} + +export interface ThoughtSpotRestApiLogoutRequest { +} + +export interface ThoughtSpotRestApiManageObjectPrivilegeRequest { + /** + * + * @type ManageObjectPrivilegeRequest + * @memberof ThoughtSpotRestApimanageObjectPrivilege + */ + manageObjectPrivilegeRequest: ManageObjectPrivilegeRequest +} + +export interface ThoughtSpotRestApiParameterizeMetadataRequest { + /** + * + * @type ParameterizeMetadataRequest + * @memberof ThoughtSpotRestApiparameterizeMetadata + */ + parameterizeMetadataRequest: ParameterizeMetadataRequest +} + +export interface ThoughtSpotRestApiParameterizeMetadataFieldsRequest { + /** + * + * @type ParameterizeMetadataFieldsRequest + * @memberof ThoughtSpotRestApiparameterizeMetadataFields + */ + parameterizeMetadataFieldsRequest: ParameterizeMetadataFieldsRequest +} + +export interface ThoughtSpotRestApiPublishMetadataRequest { + /** + * + * @type PublishMetadataRequest + * @memberof ThoughtSpotRestApipublishMetadata + */ + publishMetadataRequest: PublishMetadataRequest +} + +export interface ThoughtSpotRestApiPutVariableValuesRequest { + /** + * Unique ID or name of the variable + * @type string + * @memberof ThoughtSpotRestApiputVariableValues + */ + identifier: string + /** + * + * @type PutVariableValuesRequest + * @memberof ThoughtSpotRestApiputVariableValues + */ + putVariableValuesRequest: PutVariableValuesRequest +} + +export interface ThoughtSpotRestApiQueryGetDecomposedQueryRequest { + /** + * + * @type QueryGetDecomposedQueryRequest + * @memberof ThoughtSpotRestApiqueryGetDecomposedQuery + */ + queryGetDecomposedQueryRequest: QueryGetDecomposedQueryRequest +} + +export interface ThoughtSpotRestApiResetUserPasswordRequest { + /** + * + * @type ResetUserPasswordRequest + * @memberof ThoughtSpotRestApiresetUserPassword + */ + resetUserPasswordRequest: ResetUserPasswordRequest +} + +export interface ThoughtSpotRestApiRevertCommitRequest { + /** + * Commit id to which the object should be reverted + * @type string + * @memberof ThoughtSpotRestApirevertCommit + */ + commitId: string + /** + * + * @type RevertCommitRequest + * @memberof ThoughtSpotRestApirevertCommit + */ + revertCommitRequest: RevertCommitRequest +} + +export interface ThoughtSpotRestApiRevokeRefreshTokensRequest { + /** + * Unique ID or name of the connection whose refresh tokens need to be revoked. All the users associated with the connection will have their refresh tokens revoked except the author. + * @type string + * @memberof ThoughtSpotRestApirevokeRefreshTokens + */ + connectionIdentifier: string + /** + * + * @type RevokeRefreshTokensRequest + * @memberof ThoughtSpotRestApirevokeRefreshTokens + */ + revokeRefreshTokensRequest: RevokeRefreshTokensRequest +} + +export interface ThoughtSpotRestApiRevokeTokenRequest { + /** + * + * @type RevokeTokenRequest + * @memberof ThoughtSpotRestApirevokeToken + */ + revokeTokenRequest: RevokeTokenRequest +} + +export interface ThoughtSpotRestApiSearchAuthSettingsRequest { + /** + * + * @type SearchAuthSettingsRequest + * @memberof ThoughtSpotRestApisearchAuthSettings + */ + searchAuthSettingsRequest: SearchAuthSettingsRequest +} + +export interface ThoughtSpotRestApiSearchCalendarsRequest { + /** + * + * @type SearchCalendarsRequest + * @memberof ThoughtSpotRestApisearchCalendars + */ + searchCalendarsRequest: SearchCalendarsRequest +} + +export interface ThoughtSpotRestApiSearchChannelHistoryRequest { + /** + * + * @type SearchChannelHistoryRequest + * @memberof ThoughtSpotRestApisearchChannelHistory + */ + searchChannelHistoryRequest: SearchChannelHistoryRequest +} + +export interface ThoughtSpotRestApiSearchCollectionsRequest { + /** + * + * @type SearchCollectionsRequest + * @memberof ThoughtSpotRestApisearchCollections + */ + searchCollectionsRequest: SearchCollectionsRequest +} + +export interface ThoughtSpotRestApiSearchCommitsRequest { + /** + * + * @type SearchCommitsRequest + * @memberof ThoughtSpotRestApisearchCommits + */ + searchCommitsRequest: SearchCommitsRequest +} + +export interface ThoughtSpotRestApiSearchCommunicationChannelPreferencesRequest { + /** + * + * @type SearchCommunicationChannelPreferencesRequest + * @memberof ThoughtSpotRestApisearchCommunicationChannelPreferences + */ + searchCommunicationChannelPreferencesRequest: SearchCommunicationChannelPreferencesRequest +} + +export interface ThoughtSpotRestApiSearchConfigRequest { + /** + * + * @type SearchConfigRequest + * @memberof ThoughtSpotRestApisearchConfig + */ + searchConfigRequest: SearchConfigRequest +} + +export interface ThoughtSpotRestApiSearchConnectionRequest { + /** + * + * @type SearchConnectionRequest + * @memberof ThoughtSpotRestApisearchConnection + */ + searchConnectionRequest: SearchConnectionRequest +} + +export interface ThoughtSpotRestApiSearchCustomActionsRequest { + /** + * + * @type SearchCustomActionsRequest + * @memberof ThoughtSpotRestApisearchCustomActions + */ + searchCustomActionsRequest: SearchCustomActionsRequest +} + +export interface ThoughtSpotRestApiSearchDataRequest { + /** + * + * @type SearchDataRequest + * @memberof ThoughtSpotRestApisearchData + */ + searchDataRequest: SearchDataRequest +} + +export interface ThoughtSpotRestApiSearchEmailCustomizationRequest { + /** + * + * @type SearchEmailCustomizationRequest + * @memberof ThoughtSpotRestApisearchEmailCustomization + */ + searchEmailCustomizationRequest: SearchEmailCustomizationRequest +} + +export interface ThoughtSpotRestApiSearchMetadataRequest { + /** + * + * @type SearchMetadataRequest + * @memberof ThoughtSpotRestApisearchMetadata + */ + searchMetadataRequest: SearchMetadataRequest +} + +export interface ThoughtSpotRestApiSearchOrgsRequest { + /** + * + * @type SearchOrgsRequest + * @memberof ThoughtSpotRestApisearchOrgs + */ + searchOrgsRequest: SearchOrgsRequest +} + +export interface ThoughtSpotRestApiSearchRolesRequest { + /** + * + * @type SearchRolesRequest + * @memberof ThoughtSpotRestApisearchRoles + */ + searchRolesRequest: SearchRolesRequest +} + +export interface ThoughtSpotRestApiSearchSchedulesRequest { + /** + * + * @type SearchSchedulesRequest + * @memberof ThoughtSpotRestApisearchSchedules + */ + searchSchedulesRequest: SearchSchedulesRequest +} + +export interface ThoughtSpotRestApiSearchSecuritySettingsRequest { + /** + * + * @type SearchSecuritySettingsRequest + * @memberof ThoughtSpotRestApisearchSecuritySettings + */ + searchSecuritySettingsRequest: SearchSecuritySettingsRequest +} + +export interface ThoughtSpotRestApiSearchTagsRequest { + /** + * + * @type SearchTagsRequest + * @memberof ThoughtSpotRestApisearchTags + */ + searchTagsRequest: SearchTagsRequest +} + +export interface ThoughtSpotRestApiSearchUserGroupsRequest { + /** + * + * @type SearchUserGroupsRequest + * @memberof ThoughtSpotRestApisearchUserGroups + */ + searchUserGroupsRequest: SearchUserGroupsRequest +} + +export interface ThoughtSpotRestApiSearchUsersRequest { + /** + * + * @type SearchUsersRequest + * @memberof ThoughtSpotRestApisearchUsers + */ + searchUsersRequest: SearchUsersRequest +} + +export interface ThoughtSpotRestApiSearchVariablesRequest { + /** + * + * @type SearchVariablesRequest + * @memberof ThoughtSpotRestApisearchVariables + */ + searchVariablesRequest: SearchVariablesRequest +} + +export interface ThoughtSpotRestApiSearchWebhookConfigurationsRequest { + /** + * + * @type SearchWebhookConfigurationsRequest + * @memberof ThoughtSpotRestApisearchWebhookConfigurations + */ + searchWebhookConfigurationsRequest: SearchWebhookConfigurationsRequest +} + +export interface ThoughtSpotRestApiSendAgentConversationMessageRequest { + /** + * Unique identifier for the conversation (used to track context) + * @type string + * @memberof ThoughtSpotRestApisendAgentConversationMessage + */ + conversationIdentifier: string + /** + * + * @type SendAgentConversationMessageRequest + * @memberof ThoughtSpotRestApisendAgentConversationMessage + */ + sendAgentConversationMessageRequest: SendAgentConversationMessageRequest +} + +export interface ThoughtSpotRestApiSendAgentConversationMessageStreamingRequest { + /** + * Unique identifier for the conversation (used to track context) + * @type string + * @memberof ThoughtSpotRestApisendAgentConversationMessageStreaming + */ + conversationIdentifier: string + /** + * + * @type SendAgentConversationMessageStreamingRequest + * @memberof ThoughtSpotRestApisendAgentConversationMessageStreaming + */ + sendAgentConversationMessageStreamingRequest: SendAgentConversationMessageStreamingRequest +} + +export interface ThoughtSpotRestApiSendAgentMessageRequest { + /** + * Unique identifier for the conversation (used to track context) + * @type string + * @memberof ThoughtSpotRestApisendAgentMessage + */ + conversationIdentifier: string + /** + * + * @type SendAgentMessageRequest + * @memberof ThoughtSpotRestApisendAgentMessage + */ + sendAgentMessageRequest: SendAgentMessageRequest +} + +export interface ThoughtSpotRestApiSendAgentMessageStreamingRequest { + /** + * + * @type SendAgentMessageStreamingRequest + * @memberof ThoughtSpotRestApisendAgentMessageStreaming + */ + sendAgentMessageStreamingRequest: SendAgentMessageStreamingRequest +} + +export interface ThoughtSpotRestApiSendMessageRequest { + /** + * Unique identifier of the conversation. + * @type string + * @memberof ThoughtSpotRestApisendMessage + */ + conversationIdentifier: string + /** + * + * @type SendMessageRequest + * @memberof ThoughtSpotRestApisendMessage + */ + sendMessageRequest: SendMessageRequest +} + +export interface ThoughtSpotRestApiSetNLInstructionsRequest { + /** + * + * @type SetNLInstructionsRequest + * @memberof ThoughtSpotRestApisetNLInstructions + */ + setNLInstructionsRequest: SetNLInstructionsRequest +} + +export interface ThoughtSpotRestApiShareMetadataRequest { + /** + * + * @type ShareMetadataRequest + * @memberof ThoughtSpotRestApishareMetadata + */ + shareMetadataRequest: ShareMetadataRequest +} + +export interface ThoughtSpotRestApiSingleAnswerRequest { + /** + * + * @type SingleAnswerRequest + * @memberof ThoughtSpotRestApisingleAnswer + */ + singleAnswerRequest: SingleAnswerRequest +} + +export interface ThoughtSpotRestApiStopConversationRequest { + /** + * Unique identifier of the conversation to stop. + * @type string + * @memberof ThoughtSpotRestApistopConversation + */ + conversationIdentifier: string +} + +export interface ThoughtSpotRestApiSyncMetadataRequest { + /** + * Unique ID or name of the connection. + * @type string + * @memberof ThoughtSpotRestApisyncMetadata + */ + connectionIdentifier: string + /** + * + * @type SyncMetadataRequest + * @memberof ThoughtSpotRestApisyncMetadata + */ + syncMetadataRequest: SyncMetadataRequest +} + +export interface ThoughtSpotRestApiUnassignTagRequest { + /** + * + * @type UnassignTagRequest + * @memberof ThoughtSpotRestApiunassignTag + */ + unassignTagRequest: UnassignTagRequest +} + +export interface ThoughtSpotRestApiUnparameterizeMetadataRequest { + /** + * + * @type UnparameterizeMetadataRequest + * @memberof ThoughtSpotRestApiunparameterizeMetadata + */ + unparameterizeMetadataRequest: UnparameterizeMetadataRequest +} + +export interface ThoughtSpotRestApiUnpublishMetadataRequest { + /** + * + * @type UnpublishMetadataRequest + * @memberof ThoughtSpotRestApiunpublishMetadata + */ + unpublishMetadataRequest: UnpublishMetadataRequest +} + +export interface ThoughtSpotRestApiUpdateCalendarRequest { + /** + * Unique Id or name of the calendar. + * @type string + * @memberof ThoughtSpotRestApiupdateCalendar + */ + calendarIdentifier: string + /** + * + * @type UpdateCalendarRequest + * @memberof ThoughtSpotRestApiupdateCalendar + */ + updateCalendarRequest: UpdateCalendarRequest +} + +export interface ThoughtSpotRestApiUpdateCollectionRequest { + /** + * Unique GUID of the collection. Note: Collection names cannot be used as identifiers since duplicate names are allowed. + * @type string + * @memberof ThoughtSpotRestApiupdateCollection + */ + collectionIdentifier: string + /** + * + * @type UpdateCollectionRequest + * @memberof ThoughtSpotRestApiupdateCollection + */ + updateCollectionRequest: UpdateCollectionRequest +} + +export interface ThoughtSpotRestApiUpdateColumnSecurityRulesRequest { + /** + * + * @type UpdateColumnSecurityRulesRequest + * @memberof ThoughtSpotRestApiupdateColumnSecurityRules + */ + updateColumnSecurityRulesRequest: UpdateColumnSecurityRulesRequest +} + +export interface ThoughtSpotRestApiUpdateConfigRequest { + /** + * + * @type UpdateConfigRequest + * @memberof ThoughtSpotRestApiupdateConfig + */ + updateConfigRequest: UpdateConfigRequest +} + +export interface ThoughtSpotRestApiUpdateConnectionRequest { + /** + * + * @type UpdateConnectionRequest + * @memberof ThoughtSpotRestApiupdateConnection + */ + updateConnectionRequest: UpdateConnectionRequest +} + +export interface ThoughtSpotRestApiUpdateConnectionConfigurationRequest { + /** + * Unique ID or name of the configuration. + * @type string + * @memberof ThoughtSpotRestApiupdateConnectionConfiguration + */ + configurationIdentifier: string + /** + * + * @type UpdateConnectionConfigurationRequest + * @memberof ThoughtSpotRestApiupdateConnectionConfiguration + */ + updateConnectionConfigurationRequest: UpdateConnectionConfigurationRequest +} + +export interface ThoughtSpotRestApiUpdateConnectionStatusRequest { + /** + * Unique ID or name of the connection. + * @type string + * @memberof ThoughtSpotRestApiupdateConnectionStatus + */ + connectionIdentifier: string + /** + * + * @type UpdateConnectionStatusRequest + * @memberof ThoughtSpotRestApiupdateConnectionStatus + */ + updateConnectionStatusRequest: UpdateConnectionStatusRequest +} + +export interface ThoughtSpotRestApiUpdateConnectionV2Request { + /** + * Unique ID or name of the connection. + * @type string + * @memberof ThoughtSpotRestApiupdateConnectionV2 + */ + connectionIdentifier: string + /** + * + * @type UpdateConnectionV2Request + * @memberof ThoughtSpotRestApiupdateConnectionV2 + */ + updateConnectionV2Request: UpdateConnectionV2Request +} + +export interface ThoughtSpotRestApiUpdateCustomActionRequest { + /** + * Unique ID or name of the custom action. + * @type string + * @memberof ThoughtSpotRestApiupdateCustomAction + */ + customActionIdentifier: string + /** + * + * @type UpdateCustomActionRequest + * @memberof ThoughtSpotRestApiupdateCustomAction + */ + updateCustomActionRequest: UpdateCustomActionRequest +} + +export interface ThoughtSpotRestApiUpdateDbtConnectionRequest { + /** + * Unique ID of the DBT Connection. + * @type string + * @memberof ThoughtSpotRestApiupdateDbtConnection + */ + dbtConnectionIdentifier: string + /** + * Name of the connection. + * @type string + * @memberof ThoughtSpotRestApiupdateDbtConnection + */ + connectionName?: string + /** + * Name of the Database. + * @type string + * @memberof ThoughtSpotRestApiupdateDbtConnection + */ + databaseName?: string + /** + * Mention type of Import + * @type string + * @memberof ThoughtSpotRestApiupdateDbtConnection + */ + importType?: string + /** + * Access token is mandatory when Import_Type is DBT_CLOUD. + * @type string + * @memberof ThoughtSpotRestApiupdateDbtConnection + */ + accessToken?: string + /** + * DBT URL is mandatory when Import_Type is DBT_CLOUD. + * @type string + * @memberof ThoughtSpotRestApiupdateDbtConnection + */ + dbtUrl?: string + /** + * Account ID is mandatory when Import_Type is DBT_CLOUD + * @type string + * @memberof ThoughtSpotRestApiupdateDbtConnection + */ + accountId?: string + /** + * Project ID is mandatory when Import_Type is DBT_CLOUD + * @type string + * @memberof ThoughtSpotRestApiupdateDbtConnection + */ + projectId?: string + /** + * DBT Environment ID\\\" + * @type string + * @memberof ThoughtSpotRestApiupdateDbtConnection + */ + dbtEnvId?: string + /** + * Name of the project + * @type string + * @memberof ThoughtSpotRestApiupdateDbtConnection + */ + projectName?: string + /** + * Upload DBT Manifest and Catalog artifact files as a ZIP file. This field is Mandatory when Import Type is \\\'ZIP_FILE\\\' + * @type HttpFile + * @memberof ThoughtSpotRestApiupdateDbtConnection + */ + fileContent?: HttpFile +} + +export interface ThoughtSpotRestApiUpdateEmailCustomizationRequest { + /** + * + * @type UpdateEmailCustomizationRequest + * @memberof ThoughtSpotRestApiupdateEmailCustomization + */ + updateEmailCustomizationRequest: UpdateEmailCustomizationRequest +} + +export interface ThoughtSpotRestApiUpdateMetadataHeaderRequest { + /** + * + * @type UpdateMetadataHeaderRequest + * @memberof ThoughtSpotRestApiupdateMetadataHeader + */ + updateMetadataHeaderRequest: UpdateMetadataHeaderRequest +} + +export interface ThoughtSpotRestApiUpdateMetadataObjIdRequest { + /** + * + * @type UpdateMetadataObjIdRequest + * @memberof ThoughtSpotRestApiupdateMetadataObjId + */ + updateMetadataObjIdRequest: UpdateMetadataObjIdRequest +} + +export interface ThoughtSpotRestApiUpdateOrgRequest { + /** + * ID or name of the Org + * @type string + * @memberof ThoughtSpotRestApiupdateOrg + */ + orgIdentifier: string + /** + * + * @type UpdateOrgRequest + * @memberof ThoughtSpotRestApiupdateOrg + */ + updateOrgRequest: UpdateOrgRequest +} + +export interface ThoughtSpotRestApiUpdateRoleRequest { + /** + * Unique ID or name of the Role. + * @type string + * @memberof ThoughtSpotRestApiupdateRole + */ + roleIdentifier: string + /** + * + * @type UpdateRoleRequest + * @memberof ThoughtSpotRestApiupdateRole + */ + updateRoleRequest: UpdateRoleRequest +} + +export interface ThoughtSpotRestApiUpdateScheduleRequest { + /** + * Unique ID or name of the schedule. + * @type string + * @memberof ThoughtSpotRestApiupdateSchedule + */ + scheduleIdentifier: string + /** + * + * @type UpdateScheduleRequest + * @memberof ThoughtSpotRestApiupdateSchedule + */ + updateScheduleRequest: UpdateScheduleRequest +} + +export interface ThoughtSpotRestApiUpdateSystemConfigRequest { + /** + * + * @type UpdateSystemConfigRequest + * @memberof ThoughtSpotRestApiupdateSystemConfig + */ + updateSystemConfigRequest: UpdateSystemConfigRequest +} + +export interface ThoughtSpotRestApiUpdateTagRequest { + /** + * Name or Id of the tag. + * @type string + * @memberof ThoughtSpotRestApiupdateTag + */ + tagIdentifier: string + /** + * + * @type UpdateTagRequest + * @memberof ThoughtSpotRestApiupdateTag + */ + updateTagRequest: UpdateTagRequest +} + +export interface ThoughtSpotRestApiUpdateUserRequest { + /** + * GUID / name of the user + * @type string + * @memberof ThoughtSpotRestApiupdateUser + */ + userIdentifier: string + /** + * + * @type UpdateUserRequest + * @memberof ThoughtSpotRestApiupdateUser + */ + updateUserRequest: UpdateUserRequest +} + +export interface ThoughtSpotRestApiUpdateUserGroupRequest { + /** + * GUID or name of the group. + * @type string + * @memberof ThoughtSpotRestApiupdateUserGroup + */ + groupIdentifier: string + /** + * + * @type UpdateUserGroupRequest + * @memberof ThoughtSpotRestApiupdateUserGroup + */ + updateUserGroupRequest: UpdateUserGroupRequest +} + +export interface ThoughtSpotRestApiUpdateVariableRequest { + /** + * Unique id or name of the variable to update. + * @type string + * @memberof ThoughtSpotRestApiupdateVariable + */ + identifier: string + /** + * + * @type UpdateVariableRequest + * @memberof ThoughtSpotRestApiupdateVariable + */ + updateVariableRequest: UpdateVariableRequest +} + +export interface ThoughtSpotRestApiUpdateVariableValuesRequest { + /** + * + * @type UpdateVariableValuesRequest + * @memberof ThoughtSpotRestApiupdateVariableValues + */ + updateVariableValuesRequest: UpdateVariableValuesRequest +} + +export interface ThoughtSpotRestApiUpdateWebhookConfigurationRequest { + /** + * Unique ID or name of the webhook configuration. + * @type string + * @memberof ThoughtSpotRestApiupdateWebhookConfiguration + */ + webhookIdentifier: string + /** + * + * @type UpdateWebhookConfigurationRequest + * @memberof ThoughtSpotRestApiupdateWebhookConfiguration + */ + updateWebhookConfigurationRequest: UpdateWebhookConfigurationRequest +} + +export interface ThoughtSpotRestApiValidateCommunicationChannelRequest { + /** + * + * @type ValidateCommunicationChannelRequest + * @memberof ThoughtSpotRestApivalidateCommunicationChannel + */ + validateCommunicationChannelRequest: ValidateCommunicationChannelRequest +} + +export interface ThoughtSpotRestApiValidateEmailCustomizationRequest { +} + +export interface ThoughtSpotRestApiValidateMergeRequest { + /** + * + * @type ValidateMergeRequest + * @memberof ThoughtSpotRestApivalidateMerge + */ + validateMergeRequest: ValidateMergeRequest +} + +export interface ThoughtSpotRestApiValidateTokenRequest { + /** + * + * @type ValidateTokenRequest + * @memberof ThoughtSpotRestApivalidateToken + */ + validateTokenRequest: ValidateTokenRequest +} + +export class ObjectThoughtSpotRestApi { + private api: ObservableThoughtSpotRestApi + + public constructor(configuration: Configuration, requestFactory?: ThoughtSpotRestApiRequestFactory, responseProcessor?: ThoughtSpotRestApiResponseProcessor) { + this.api = new ObservableThoughtSpotRestApi(configuration, requestFactory, responseProcessor); + } + + /** + * Version: 9.7.0.cl or later Activates a deactivated user account. Requires `ADMINISTRATION` (**Can administer Thoughtspot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `USER_ADMINISTRATION` (**Can manage users**) privilege is required. To activate an inactive user account, the API request body must include the following information: - Username or the GUID of the user account. - Auth token generated for the deactivated user. The auth token is sent in the API response when a user is deactivated. - Password for the user account. + * @param param the request object + */ + public activateUser(param: ThoughtSpotRestApiActivateUserRequest, options?: Configuration): Promise { + return this.api.activateUser(param.activateUserRequest, options).toPromise(); + } + + /** + * Version: 9.0.0.cl or later Transfers the ownership of one or several objects from one user to another. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `USER_ADMINISTRATION` (**Can manage users**) privilege and edit access to the objects are required. + * @param param the request object + */ + public assignChangeAuthor(param: ThoughtSpotRestApiAssignChangeAuthorRequest, options?: Configuration): Promise { + return this.api.assignChangeAuthor(param.assignChangeAuthorRequest, options).toPromise(); + } + + /** + * Version: 9.0.0.cl or later Assigns tags to Liveboards, Answers, Tables, and Worksheets. Requires edit access to the metadata object. + * @param param the request object + */ + public assignTag(param: ThoughtSpotRestApiAssignTagRequest, options?: Configuration): Promise { + return this.api.assignTag(param.assignTagRequest, options).toPromise(); + } + + /** + * Version: 9.0.0.cl or later Updates the current password of the user. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `USER_ADMINISTRATION` (**Can manage users**) privilege is required. + * @param param the request object + */ + public changeUserPassword(param: ThoughtSpotRestApiChangeUserPasswordRequest, options?: Configuration): Promise { + return this.api.changeUserPassword(param.changeUserPasswordRequest, options).toPromise(); + } + + /** + * Version: 9.2.0.cl or later Commits TML files of metadata objects to the Git branch configured on your instance. Requires at least edit access to objects used in the commit operation. Before using this endpoint to push your commits: * Enable Git integration on your instance. * Make sure the Git repository and branch details are configured on your instance. For more information, see [Git integration documentation](https://developers.thoughtspot.com/docs/git-integration). + * @param param the request object + */ + public commitBranch(param: ThoughtSpotRestApiCommitBranchRequest, options?: Configuration): Promise { + return this.api.commitBranch(param.commitBranchRequest, options).toPromise(); + } + + /** + * Version: 26.6.0.cl or later Enables or disables authentication at cluster or org level for the specified auth type. Currently supports `TRUSTED_AUTH`. #### Required privileges Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) or `CONTROL_TRUSTED_AUTH` (**Can Enable or Disable Trusted Authentication**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled, the `CONTROL_TRUSTED_AUTH` privilege is required. #### Usage guidelines Use `cluster_preferences` to enable or disable authentication at the cluster level. Cluster-level settings can only be configured from the Primary Org. - `ENABLED` — Generates a new access token if one does not exist. An existing token is preserved. - `DISABLED` — Revokes the existing cluster-level access token. Use `org_preferences` to enable or disable authentication for one or more Orgs. Each entry must include an `org_identifier` (unique ID or name) and an `auth_status`. Org-level configuration requires the per-Org authentication feature to be enabled on your instance. - `ENABLED` — Generates a new org-level access token if one does not exist. - `DISABLED` — Revokes the existing org-level access token for that Org. Both `cluster_preferences` and `org_preferences` are optional. Omitting a field leaves the corresponding settings unchanged. If both are omitted, the API returns `204 No Content` without making any changes. **Note**: Cluster-level and org-level settings are independent of each other. Enabling or disabling one does not affect the other. + * @param param the request object + */ + public configureAuthSettings(param: ThoughtSpotRestApiConfigureAuthSettingsRequest, options?: Configuration): Promise { + return this.api.configureAuthSettings(param.configureAuthSettingsRequest, options).toPromise(); + } + + /** + * Version: 10.14.0.cl or later Configure communication channel preferences. - Use `cluster_preferences` to update the default preferences for your ThoughtSpot application instance. - If your instance has [Orgs](https://docs.thoughtspot.com/cloud/latest/orgs-overview), use `org_preferences` to specify Org-specific preferences that override the defaults. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) or `DEVELOPER` (**Has developer privilege**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, users with `APPLICATION_ADMINISTRATION` (**Can manage application settings**) privilege are also authorized to perform this action. + * @param param the request object + */ + public configureCommunicationChannelPreferences(param: ThoughtSpotRestApiConfigureCommunicationChannelPreferencesRequest, options?: Configuration): Promise { + return this.api.configureCommunicationChannelPreferences(param.configureCommunicationChannelPreferencesRequest, options).toPromise(); + } + + /** + * Version: 26.2.0.cl or later Configure security settings for your ThoughtSpot application instance. - Use `cluster_preferences` to update cluster-level security settings including CORS whitelisted URLs, CSP settings, SAML redirect URLs, partitioned cookies, and non-embed access configuration. - Use `org_preferences` to configure Org-specific security settings. If your instance has [Orgs](https://docs.thoughtspot.com/cloud/latest/orgs-overview), this allows configuring CORS and non-embed access settings specific to the Org. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) or `DEVELOPER` (**Has developer privilege**) privilege. Cluster-level SAML and script-src settings require `ADMINISTRATION` privilege. See [Security Settings](https://developers.thoughtspot.com/docs/security-settings) for more details. + * @param param the request object + */ + public configureSecuritySettings(param: ThoughtSpotRestApiConfigureSecuritySettingsRequest, options?: Configuration): Promise { + return this.api.configureSecuritySettings(param.configureSecuritySettingsRequest, options).toPromise(); + } + + /** + * Version: 10.12.0.cl or later Gets connection configuration objects. Requires `DATAMANAGEMENT` (**Can manage data**) and edit permissions to the connection object, or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) privilege is required. #### Usage guidelines * To get a list of all configurations available in the ThoughtSpot system, send the API request with only the connection name or GUID in the request body. * To fetch details of a configuration object, specify the configuration object name or GUID. + * @param param the request object + */ + public connectionConfigurationSearch(param: ThoughtSpotRestApiConnectionConfigurationSearchRequest, options?: Configuration): Promise> { + return this.api.connectionConfigurationSearch(param.connectionConfigurationSearchRequest, options).toPromise(); + } + + /** + * Convert worksheets to models Version: 10.6.0.cl or later ## Prerequisites - **Privileges Required:** - `DATAMANAGEMENT` (Can manage data) or `ADMINISTRATION` (Can administer ThoughtSpot). - **Additional Privileges (if RBAC is enabled):** - `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` (Can manage data models). --- ## Usage Guidelines ### Parameters 1. **worksheet_ids** - **Description:** A comma-separated list of GUIDs (Globally Unique Identifiers) specifying the Worksheets to be converted. - **Usage:** - Used only when `convert_all` is set to `false`. - Leave empty or omit when `convert_all` is set to `true`. 2. **exclude_worksheet_ids** - **Description:** A comma-separated list of GUIDs specifying Worksheets to be excluded from conversion. - **Usage:** - Useful when `convert_all` is set to `true` and specific Worksheets should not be converted. 3. **convert_all** - **Description:** Sets the scope of conversion. - **Options:** - `true`: Converts all Worksheets in the system, except those specified in `exclude_worksheet_ids`. - `false`: Converts only the Worksheets listed in `worksheet_ids`. 4. **apply_changes** - **Description:** Specifies whether to apply changes directly to ThoughtSpot or to generate a preview before applying any changes.Used for validation of conversion. - **Options:** - `true`: Applies conversion changes directly to ThoughtSpot. - `false`: Generates only a preview of the changes and does not apply any changes to ThoughtSpot --- ## Best Practices 1. **Backup Before Conversion:** Always export metadata as a backup before initiating the conversion process 2. **Partial Conversion for Testing:** Test the conversion process by setting `convert_all` to `false` and specifying a small number of `worksheet_ids`. 3. **Verify Dependencies:** Check for dependent objects, such as Tables and Connections, to avoid invalid references. 4. **Review Changes:** Use `apply_changes: false` to preview the impact of the conversion before applying changes. --- ## Examples ### Convert Specific Worksheets ```json { \"worksheet_ids\": [\"guid1\", \"guid2\", \"guid3\"], \"exclude_worksheet_ids\": [], \"convert_all\": false, \"apply_changes\": true } ``` ### Convert All Accessible Worksheets ```json { \"worksheet_ids\": [], \"exclude_worksheet_ids\": [], \"convert_all\": true, \"apply_changes\": true } ``` ### Exclude Specific Worksheets While Converting All Accessible Worksheets ```json { \"worksheet_ids\": [], \"exclude_worksheet_ids\": [\"abc\"], \"convert_all\": true, \"apply_changes\": true } ``` + * @param param the request object + */ + public convertWorksheetToModel(param: ThoughtSpotRestApiConvertWorksheetToModelRequest, options?: Configuration): Promise { + return this.api.convertWorksheetToModel(param.convertWorksheetToModelRequest, options).toPromise(); + } + + /** + * Makes a copy of an Answer or Liveboard Version: 10.3.0.cl or later Creates a copy of a metadata object. Requires at least view access to the metadata object being copied. Upon successful execution, the API creates a copy of the metadata object specified in the API request and returns the ID of the new object. + * @param param the request object + */ + public copyObject(param: ThoughtSpotRestApiCopyObjectRequest, options?: Configuration): Promise { + return this.api.copyObject(param.copyObjectRequest, options).toPromise(); + } + + /** + * Version: 26.2.0.cl or later Creates a new Spotter agent conversation based on the provided context and settings. The endpoint was in Beta from 26.2.0.cl through 26.4.0.cl. Requires `CAN_USE_SPOTTER` privilege and at least view access to the metadata object specified in the request. #### Usage guidelines The request must include the `metadata_context` parameter to define the conversation context. The context type can be one of: - `DATA_SOURCE` *(available from 26.5.0.cl)*: targets a specific data source. Provide `data_source_identifier` in `data_source_context` for a single data source, or `data_source_identifiers` for multi-data-source context. The deprecated `guid` field is accepted for backwards compatibility. - `AUTO_MODE` *(available from 26.5.0.cl)*: automatically discovers and selects the most relevant datasets for the user\'s queries. > **Note for callers on versions 26.2.0.cl – 26.4.0.cl (Beta):** use the lowercase `data_source` enum value with the `guid` field instead of the above. Example: `{ \"type\": \"data_source\", \"data_source_context\": { \"guid\": \"\" } }`. The `conversation_settings` parameter controls which Spotter capabilities are enabled for the conversation: - `enable_contextual_change_analysis` (default: `true`, **deprecated from 26.2.0.cl**) — always enabled in Spotter 3; setting this to `false` has no effect on versions >= 26.2.0.cl - `enable_natural_language_answer_generation` (default: `true`, **deprecated from 26.2.0.cl**) — always enabled in Spotter 3; setting this to `false` has no effect on versions >= 26.2.0.cl - `enable_reasoning` (default: `true`, **deprecated from 26.2.0.cl**) — always enabled in Spotter 3; setting this to `false` has no effect on versions >= 26.2.0.cl - `enable_save_chat` (default: `false`, *available from 26.5.0.cl*) — enables saving the conversation for later retrieval via conversation history If the request is successful, the response includes a unique `conversation_identifier` that must be passed to `sendAgentConversationMessage` or `sendAgentConversationMessageStreaming` to send messages within this conversation. The response also includes `conversation_id` with the same value for backwards compatibility; use `conversation_identifier` for new integrations. #### Example request ```json { \"metadata_context\": { \"type\": \"DATA_SOURCE\", \"data_source_context\": { \"data_source_identifier\": \"a1b2c3d4-e5f6-7890-abcd-ef1234567890\" } }, \"conversation_settings\": {} } ``` #### Error responses | Code | Description | | ---- | --------------------------------------------------------------------------------------------------------------------------------------- | | 401 | Unauthorized — authentication token is missing, expired, or invalid. | | 403 | Forbidden — the authenticated user does not have `CAN_USE_SPOTTER` privilege or lacks view permission on the specified metadata object. | > ###### Note: > > - This endpoint was in Beta from 26.2.0.cl through 26.4.0.cl and is Generally Available from version 26.5.0.cl. > - This endpoint requires Spotter - please contact ThoughtSpot support to enable Spotter on your cluster. + * @param param the request object + */ + public createAgentConversation(param: ThoughtSpotRestApiCreateAgentConversationRequest, options?: Configuration): Promise { + return this.api.createAgentConversation(param.createAgentConversationRequest, options).toPromise(); + } + + /** + * Version: 10.12.0.cl or later Creates a new [custom calendar](https://docs.thoughtspot.com/cloud/latest/connections-cust-cal). Requires `DATAMANAGEMENT` (**Can manage data**) or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your ThoughtSpot instance, the `CAN_MANAGE_CUSTOM_CALENDAR` (**Can manage custom calendars**) privilege is required. #### Usage guidelines You can create a custom calendar from scratch or an existing Table in ThoughtSpot. For both methods of calendar creation, the following parameters are required: * Name of the custom calendar. * Calendar creation method. To create a calendar from an existing table, specify the method: - `FROM_EXISTING_TABLE` - Creates calendar from the table reference provided in the API request. - `FROM_INPUT_PARAMS` - Creates a calendar from the parameters defined in the API request. * Connection ID and Table name * Database and schema name attributes: For most Cloud Data Warehouse (CDW) connectors, both `database_name` and `schema_name` attributes are required. However, the attribute requirements are conditional and vary based on the connector type and its metadata structure. For example, for connectors such as Teradata, MySQL, SingleSore, Amazon Aurora MySQL, Amazon RDS MySQL, Oracle, and GCP_MYSQL, the `schema_name` is required, whereas the `database_name` attribute is not. Similarly, connectors such as ClickHouse require you to specify the `database_name` and the schema specification in such cases is optional. **NOTE**: If you are creating a calendar from an existing table, ensure that the referenced table matches the required DDL for custom calendars. If the schema does not match, the API returns an error. ##### Calendar type The API allows you to create the following types of calendars: * `MONTH_OFFSET`. The default calendar type. A `MONTH_OFFSET` calendar is offset by a few months from the standard calendar months (January to December) and the year begins with the month defined in the request. For example, if the `month_offset` value is set as `April`, the calendar year begins in April. * `4-4-5`. Each quarter in the calendar will include two 4-week months followed by one 5-week month. * `4-5-4`. Each quarter in the calendar will include two 4-week months with a 5-week month between. * `5-4-4`. Each quarter begins with a 5-week month, followed by two 4-week months. To start and end the calendar on a specific date, specify the dates in the `MM/DD/YYYY` format. For `MONTH_OFFSET` calendars, ensure that the `start_date` matches the month specified in the `month_offset` attribute. You can also set the starting day of the week and customize the prefixes for year and quarter labels. #### Examples To create a calendar from an existing table: ``` { \"name\": \"MyCustomCalendar1\", \"table_reference\": { \"connection_identifier\": \"4db8ea22-2ff4-4224-b05a-26674717e468\", \"table_name\": \"MyCalendarTable\", \"database_name\": \"RETAILAPPAREL\", \"schema_name\": \"PUBLIC\" }, \"creation_method\": \"FROM_EXISTING_TABLE\", } ``` To create a calendar from scratch: ``` { \"name\": \"MyCustomCalendar1\", \"table_reference\": { \"connection_identifier\": \"4db8ea22-2ff4-4224-b05a-26674717e468\", \"table_name\": \"MyCalendarTable\", \"database_name\": \"RETAILAPPAREL\", \"schema_name\": \"PUBLIC\" }, \"creation_method\": \"FROM_INPUT_PARAMS\", \"calendar_type\": \"MONTH_OFFSET\", \"month_offset\": \"April\", \"start_day_of_week\": \"Monday\", \"quarter_name_prefix\": \"Q\", \"year_name_prefix\": \"FY\", \"start_date\": \"04/01/2025\", \"end_date\": \"04/31/2025\" } ``` + * @param param the request object + */ + public createCalendar(param: ThoughtSpotRestApiCreateCalendarRequest, options?: Configuration): Promise { + return this.api.createCalendar(param.createCalendarRequest, options).toPromise(); + } + + /** + * Version: 26.4.0.cl or later Creates a new collection in ThoughtSpot. Collections allow you to organize and group related metadata objects such as Liveboards, Answers, worksheets, and other data objects. You can also create nested collections (sub-collections) to build a hierarchical structure. #### Supported operations The API endpoint lets you perform the following operations: * Create a new collection * Add metadata objects (Liveboards, Answers, Logical Tables) to the collection * Create nested collections by adding sub-collections + * @param param the request object + */ + public createCollection(param: ThoughtSpotRestApiCreateCollectionRequest, options?: Configuration): Promise { + return this.api.createCollection(param.createCollectionRequest, options).toPromise(); + } + + /** + * Version: 9.2.0.cl or later Allows you to connect a ThoughtSpot instance to a Git repository. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance on your instance, the `CAN_SETUP_VERSION_CONTROL` (**Can set up version control**) privilege. You can use this API endpoint to connect your ThoughtSpot development and production environments to the development and production branches of a Git repository. Before using this endpoint to connect your ThoughtSpot instance to a Git repository, check the following prerequisites: * You have a Git repository. If you are using GitHub, make sure you have a valid account and an access token to connect ThoughtSpot to GitHub. For information about generating a token, see [GitHub Documentation](https://docs.github.com/en/authentication/keeping-your-account-and-data-secure/managing-your-personal-access-tokens). * Your access token has `repo` scope that grants full access to public and private repositories. * Your Git repository has a branch that can be configured as a default branch in ThoughtSpot. For more information, see [Git integration documentation](https://developers.thoughtspot.com/docs/?pageid=git-integration). **Note**: ThoughtSpot supports only GitHub / itHub Enterprise for CI/CD. + * @param param the request object + */ + public createConfig(param: ThoughtSpotRestApiCreateConfigRequest, options?: Configuration): Promise { + return this.api.createConfig(param.createConfigRequest, options).toPromise(); + } + + /** + * Version: 9.2.0.cl or later Creates a connection to a data warehouse for live query services. Requires `DATAMANAGEMENT` (**Can manage data**) or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) privilege is required. #### Create a connection without tables To create a connection without tables: 1. Pass these parameters in your API request. * Name of the connection. * Type of the data warehouse to connect to. * A JSON map of configuration attributes in `data_warehouse_config`. The following example shows the configuration attributes for a SnowFlake connection: ``` { \"configuration\":{ \"accountName\":\"thoughtspot_partner\", \"user\":\"tsadmin\", \"password\":\"TestConn123\", \"role\":\"sysadmin\", \"warehouse\":\"MEDIUM_WH\" }, \"authenticationType\": \"SERVICE_ACCOUNT\", \"externalDatabases\":[ ] } ``` 2. Set `validate` to `false`. **NOTE:** If the `authentication_type` is anything other than SERVICE_ACCOUNT, you must explicitly provide the authenticationType property in the payload. If you do not specify authenticationType, the API will default to SERVICE_ACCOUNT as the authentication type. #### Create a connection with tables If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) and `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` (**Can manage data models**) privilege is required. To create a connection with tables: 1. Pass these parameters in your API request. * Name of the connection. * Type of the data warehouse to connect to. * A JSON map of configuration attributes, database details, and table properties in `data_warehouse_config` as shown in the following example: ``` { \"configuration\":{ \"accountName\":\"thoughtspot_partner\", \"user\":\"tsadmin\", \"password\":\"TestConn123\", \"role\":\"sysadmin\", \"warehouse\":\"MEDIUM_WH\" }, \"authenticationType\": \"SERVICE_ACCOUNT\", \"externalDatabases\":[ { \"name\":\"AllDatatypes\", \"isAutoCreated\":false, \"schemas\":[ { \"name\":\"alldatatypes\", \"tables\":[ { \"name\":\"allDatatypes\", \"type\":\"TABLE\", \"description\":\"\", \"selected\":true, \"linked\":true, \"columns\":[ { \"name\":\"CNUMBER\", \"type\":\"INT64\", \"canImport\":true, \"selected\":true, \"isLinkedActive\":true, \"isImported\":false, \"tableName\":\"allDatatypes\", \"schemaName\":\"alldatatypes\", \"dbName\":\"AllDatatypes\" }, { \"name\":\"CDECIMAL\", \"type\":\"INT64\", \"canImport\":true, \"selected\":true, \"isLinkedActive\":true, \"isImported\":false, \"tableName\":\"allDatatypes\", \"schemaName\":\"alldatatypes\", \"dbName\":\"AllDatatypes\" } ] } ] } ] } ] } ``` 2. Set `validate` to `true`. **NOTE:** If the `authentication_type` is anything other than SERVICE_ACCOUNT, you must explicitly provide the authenticationType property in the payload. If you do not specify authenticationType, the API will default to SERVICE_ACCOUNT as the authentication type. + * @param param the request object + */ + public createConnection(param: ThoughtSpotRestApiCreateConnectionRequest, options?: Configuration): Promise { + return this.api.createConnection(param.createConnectionRequest, options).toPromise(); + } + + /** + * Version: 10.12.0.cl or later Creates an additional configuration to an existing connection to a data warehouse. Requires `DATAMANAGEMENT` (**Can manage data**) or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) privilege is required. #### Usage guidelines * A JSON map of configuration attributes in `configuration`. The following example shows the configuration attributes: ``` { \"user\":\"DEV_USER\", \"password\":\"TestConn123\", \"role\":\"DEV\", \"warehouse\":\"DEV_WH\" } ``` * If the `policy_type` is `PRINCIPALS`, then `policy_principals` is a required field. * If the `policy_type` is `PROCESSES`, then `policy_processes` is a required field. * If the `policy_type` is `NO_POLICY`, then `policy_principals` and `policy_processes` are not required fields. #### Parameterized Connection Support For parameterized connections that use OAuth authentication, only the same_as_parent and policy_process_options attributes are allowed in the API request. These attributes are not applicable to connections that are not parameterized. + * @param param the request object + */ + public createConnectionConfiguration(param: ThoughtSpotRestApiCreateConnectionConfigurationRequest, options?: Configuration): Promise { + return this.api.createConnectionConfiguration(param.createConnectionConfigurationRequest, options).toPromise(); + } + + /** + * Version: 10.4.0.cl or later Creates a new conversation session tied to a specific data model for AI-driven natural language querying. Requires `CAN_USE_SPOTTER` privilege and at least view access to the metadata object specified in the request. #### Usage guidelines The request must include: - `metadata_identifier`: the unique ID of the data source that provides context for the conversation Optionally, you can provide: - `tokens`: a token string to set initial context for the conversation (e.g., `\"[sales],[item type],[state]\"`) If the request is successful, ThoughtSpot returns a unique `conversation_identifier` that must be passed to `sendMessage` to continue the conversation. #### Error responses | Code | Description | |------|-------------| | 401 | Unauthorized — authentication token is missing, expired, or invalid. | | 403 | Forbidden — the authenticated user does not have `CAN_USE_SPOTTER` privilege or lacks view permission on the specified metadata object. | > ###### Note: > * This endpoint is currently in Beta. Breaking changes may be introduced before the endpoint is made Generally Available. > * This endpoint requires Spotter - please contact ThoughtSpot support to enable Spotter on your cluster. + * @param param the request object + */ + public createConversation(param: ThoughtSpotRestApiCreateConversationRequest, options?: Configuration): Promise { + return this.api.createConversation(param.createConversationRequest, options).toPromise(); + } + + /** + * Version: 9.6.0.cl or later Creates a custom action that appears as a menu action on a saved Answer or Liveboard visualization. Requires `DEVELOPER` (**Has Developer privilege**) or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `DEVELOPER` (**Has developer privilege**) privilege is required. #### Usage Guidelines The API lets you create the following types of custom actions: * URL-based action Allows pushing data to an external URL. * Callback action Triggers a callback to the host application and initiates a response payload on an embedded ThoughtSpot instance. By default, custom actions are visible to only administrator or developer users. To make a custom action available to other users, and specify the groups in `group_identifiers`. By default, the custom action is set as a _global_ action on all visualizations and saved Answers. To assign a custom action to specific Liveboard visualization, saved Answer, or Worksheet, set `visibility` to `false` in `default_action_config` property and specify the GUID or name of the object in `associate_metadata`. For more information, see [Custom actions](https://developers.thoughtspot.com/docs/custom-action-intro). + * @param param the request object + */ + public createCustomAction(param: ThoughtSpotRestApiCreateCustomActionRequest, options?: Configuration): Promise { + return this.api.createCustomAction(param.createCustomActionRequest, options).toPromise(); + } + + /** + * Version: 10.10.0.cl or later Creates a customization configuration for the notification email. #### Pre-requisites Requires `DEVELOPER` (**has developer privilege**) or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `DEVELOPER` (**Has developer privilege**) privilege is required. **NOTE**:This endpoint in currently in beta. Contact ThoughtSpot support to enable this on your instance. #### Usage guidelines To create a custom configuration pass these parameters in your API request: - A JSON map of configuration attributes `template_properties`. The following example shows a sample set of customization configuration: ``` { { \"cta_button_bg_color\": \"#444DEA\", \"cta_text_font_color\": \"#FFFFFF\", \"primary_bg_color\": \"#D3DEF0\", \"logo_url\": \"https://storage.pardot.com/710713/1642089901EbkRibJq/TS_fullworkmark_darkmode.png\", \"font_family\": \"\", \"product_name\": \"ThoughtSpot\", \"footer_address\": \"444 Castro St, Suite 1000 Mountain View, CA 94041\", \"footer_phone\": \"(800) 508-7008\", \"replacement_value_for_liveboard\": \"Dashboard\", \"replacement_value_for_answer\": \"Chart\", \"replacement_value_for_spot_iq\": \"AI Insights\", \"hide_footer_phone\": false, \"hide_footer_address\": false, \"hide_product_name\": false, \"hide_manage_notification\": false, \"hide_mobile_app_nudge\": false, \"hide_privacy_policy\": false, \"hide_ts_vocabulary_definitions\": false, \"hide_error_message\": false, \"hide_unsubscribe_link\": false, \"hide_notification_status\": false, \"hide_modify_alert\": false, \"company_website_url\": \"https://your-website.com/\", \"company_privacy_policy_url\" : \"https://link-to-privacy-policy.com/\", \"contact_support_url\": \"https://link-to-contact-support.com/\", \"hide_contact_support_url\": false, \"hide_logo_url\" : false } } ``` + * @param param the request object + */ + public createEmailCustomization(param: ThoughtSpotRestApiCreateEmailCustomizationRequest, options?: Configuration): Promise { + return this.api.createEmailCustomization(param.createEmailCustomizationRequest, options).toPromise(); + } + + /** + * Version: 9.0.0.cl or later Creates an Org object. To use this API, the [Orgs](https://docs.thoughtspot.com/cloud/latest/orgs-overview) feature must be enabled in your cluster. Requires cluster administration (**Can administer Org**) privileges. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `ORG_ADMINISTRATION` (**Can manage Orgs**) privilege is required. + * @param param the request object + */ + public createOrg(param: ThoughtSpotRestApiCreateOrgRequest, options?: Configuration): Promise { + return this.api.createOrg(param.createOrgRequest, options).toPromise(); + } + + /** + * Version: 9.5.0.cl or later Creates a Role object in ThoughtSpot. Available only if [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance. To create a Role, the `ROLE_ADMINISTRATION` (**Can manage roles**) privilege is required. + * @param param the request object + */ + public createRole(param: ThoughtSpotRestApiCreateRoleRequest, options?: Configuration): Promise { + return this.api.createRole(param.createRoleRequest, options).toPromise(); + } + + /** + * Create schedule. Version: 9.4.0.cl or later Creates a Liveboard schedule job. Requires at least edit access to Liveboards. To create a schedule on behalf of another user, you need `ADMINISTRATION` (**Can administer Org**) or `JOBSCHEDULING` (**Can schedule for others**) privilege and edit access to the Liveboard. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `JOBSCHEDULING` (**Can schedule for others**) privilege is required. #### Usage guidelines * The description text is mandatory. The description text appears as **Description: ** in the Liveboard schedule email notifications. * For Liveboards with both charts and tables, schedule creation is only supported in PDF and XLS formats. Schedules created in CSV formats for such Liveboards will fail to run. If `PDF` is set as the `file_format`, enable `pdf_options` to get the correct attachment. Not doing so may cause the attachment to be rendered empty. * To include only specific visualizations, specify the visualization GUIDs in the `visualization_identifiers` array. * You can schedule a Liveboard job to run periodically by setting frequency parameters. You can set the schedule to run daily, weekly, monthly or every n minutes or hours. The scheduled job can also be configured to run at a specific time of the day or on specific days of the week or month. Please ensure that when setting the schedule frequency for _minute of the object_, only values that are multiples of 5 are included. * If the `frequency` parameters are defined, you can set the time zone to a value that matches your server\'s time zone. For example, `US/Central`, `Etc/UTC`, `CET`. The default time zone is `America/Los_Angeles`. For more information about Liveboard jobs, see [ThoughtSpot Product Documentation](https://docs.thoughtspot.com/cloud/latest/liveboard-schedule). + * @param param the request object + */ + public createSchedule(param: ThoughtSpotRestApiCreateScheduleRequest, options?: Configuration): Promise { + return this.api.createSchedule(param.createScheduleRequest, options).toPromise(); + } + + /** + * Version: 9.0.0.cl or later Creates a tag object. Tags are labels that identify a metadata object. For example, you can create a tag to designate subject areas, such as sales, HR, marketing, and finance. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `TAGMANAGEMENT` (**Can manage tags**) privilege is required to create, edit, and delete tags. + * @param param the request object + */ + public createTag(param: ThoughtSpotRestApiCreateTagRequest, options?: Configuration): Promise { + return this.api.createTag(param.createTagRequest, options).toPromise(); + } + + /** + * Version: 9.0.0.cl or later Creates a user in ThoughtSpot. The API endpoint allows you to configure several user properties such as email address, account status, share notification preferences, and sharing visibility. You can provision the user to [groups](https://docs.thoughtspot.com/cloud/latest/groups-privileges) and [Orgs](https://docs.thoughtspot.com/cloud/latest/orgs-overview). You can also add Liveboard, Answer, and Worksheet objects to the user’s favorites list, assign a default Liveboard for the user, and set user preferences. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `USER_ADMINISTRATION` (**Can manage users**) privilege is required. + * @param param the request object + */ + public createUser(param: ThoughtSpotRestApiCreateUserRequest, options?: Configuration): Promise { + return this.api.createUser(param.createUserRequest, options).toPromise(); + } + + /** + * Version: 9.0.0.cl or later Creates a group object in ThoughtSpot. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `GROUP_ADMINISTRATION` (**Can manage groups**) privilege is required. #### About groups Groups in ThoughtSpot are used by the administrators to define privileges and organize users based on their roles and access requirements. To know more about groups and privileges, see [ThoughtSpot Product Documentation](https://docs.thoughtspot.com/cloud/latest/groups-privileges). #### Supported operations The API endpoint lets you perform the following operations: * Assign privileges * Add users * Define sharing visibility * Add sub-groups * Assign a default Liveboard + * @param param the request object + */ + public createUserGroup(param: ThoughtSpotRestApiCreateUserGroupRequest, options?: Configuration): Promise { + return this.api.createUserGroup(param.createUserGroupRequest, options).toPromise(); + } + + /** + * Create a variable which can be used for parameterizing metadata objects Version: 26.4.0.cl or later Allows creating a variable which can be used for parameterizing metadata objects in ThoughtSpot. Requires ADMINISTRATION role and TENANT scope. The CAN_MANAGE_VARIABLES permission allows you to manage Formula Variables in the current organization scope. The API endpoint supports the following types of variables: * CONNECTION_PROPERTY - For connection properties * TABLE_MAPPING - For table mappings * CONNECTION_PROPERTY_PER_PRINCIPAL - For connection properties per principal. In order to use this please contact support to enable this. * FORMULA_VARIABLE - For Formula variables, introduced in 10.15.0.cl When creating a variable, you need to specify: * The variable type * A unique name for the variable * Whether the variable contains sensitive values (defaults to false) * The data type of the variable, only specify for formula variables (defaults to null) The operation will fail if: * The user lacks required permissions * The variable name already exists * The variable type is invalid + * @param param the request object + */ + public createVariable(param: ThoughtSpotRestApiCreateVariableRequest, options?: Configuration): Promise { + return this.api.createVariable(param.createVariableRequest, options).toPromise(); + } + + /** + * Version: 10.14.0.cl or later Creates a new webhook configuration to receive notifications for specified events. The webhook will be triggered when the configured events occur in the system. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) or `DEVELOPER` (**Has developer privilege**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, users with `CAN_MANAGE_WEBHOOKS` (**Can manage webhooks**) privilege are also authorized to perform this action. + * @param param the request object + */ + public createWebhookConfiguration(param: ThoughtSpotRestApiCreateWebhookConfigurationRequest, options?: Configuration): Promise { + return this.api.createWebhookConfiguration(param.createWebhookConfigurationRequest, options).toPromise(); + } + + /** + * Version: 9.9.0.cl or later Creates a DBT connection object in ThoughtSpot. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege or `DATAMANAGEMENT` (**Can manage data**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the following Data control privileges may be required: - `CAN_MANAGE_CUSTOM_CALENDAR`(**Can manage custom calendars**) - `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) - `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` (**Can manage data models**) #### About create DBT connection DBT connection in ThoughtSpot is used by the user to define DBT credentials for cloud . The API needs embrace connection, embrace database name, DBT url, import type, DBT account identifier, DBT project identifier, DBT access token and environment details (or) embrace connection, embrace database name, import type, file_content to create a connection object. To know more about DBT, see ThoughtSpot Product Documentation. + * @param param the request object + */ + public dbtConnection(param: ThoughtSpotRestApiDbtConnectionRequest, options?: Configuration): Promise { + return this.api.dbtConnection(param.connectionName, param.databaseName, param.importType, param.accessToken, param.dbtUrl, param.accountId, param.projectId, param.dbtEnvId, param.projectName, param.fileContent, options).toPromise(); + } + + /** + * Version: 9.9.0.cl or later Resynchronize the existing list of models, tables, worksheet tml’s and import them to Thoughtspot based on the DBT connection object. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege or `DATAMANAGEMENT` (**Can manage data**) privilege, along with an existing DBT connection. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the following data control privileges may be required: - `CAN_MANAGE_CUSTOM_CALENDAR`(**Can manage custom calendars**) - `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) - `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` (**Can manage data models**) + * @param param the request object + */ + public dbtGenerateSyncTml(param: ThoughtSpotRestApiDbtGenerateSyncTmlRequest, options?: Configuration): Promise { + return this.api.dbtGenerateSyncTml(param.dbtConnectionIdentifier, param.fileContent, options).toPromise(); + } + + /** + * Version: 9.9.0.cl or later Generate required table and worksheet and import them. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege or `DATAMANAGEMENT` (**Can manage data**) privilege, along with an existing DBT connection. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the following data control privileges may be required: - `CAN_MANAGE_CUSTOM_CALENDAR`(**Can manage custom calendars**) - `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) - `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` (**Can manage data models**) #### About generate TML Models and Worksheets to be imported can be selected by the user as part of the API. + * @param param the request object + */ + public dbtGenerateTml(param: ThoughtSpotRestApiDbtGenerateTmlRequest, options?: Configuration): Promise { + return this.api.dbtGenerateTml(param.dbtConnectionIdentifier, param.modelTables, param.importWorksheets, param.worksheets, param.fileContent, options).toPromise(); + } + + /** + * Version: 9.9.0.cl or later Gets a list of DBT connection objects by user and organization, available on the ThoughtSpot system. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege or `DATAMANAGEMENT` (**Can manage data**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the following Data control privileges may be required: - `CAN_MANAGE_CUSTOM_CALENDAR`(**Can manage custom calendars**) - `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) - `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` (**Can manage data models**) #### About search DBT connection To get details of a specific DBT connection identifier, database connection identifier, database connection name, database name, project name, project identifier, environment identifier , import type and author. + * @param param the request object + */ + public dbtSearch(param: ThoughtSpotRestApiDbtSearchRequest = {}, options?: Configuration): Promise> { + return this.api.dbtSearch( options).toPromise(); + } + + /** + * Version: 9.7.0.cl or later Deactivates a user account. Requires `ADMINISTRATION` (**Can administer Thoughtspot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `USER_ADMINISTRATION` (**Can manage users**) privilege is required. To deactivate a user account, the API request body must include the following information: - Username or the GUID of the user account - Base URL of the ThoughtSpot instance If the API request is successful, ThoughtSpot returns the activation URL in the response. The activation URL is valid for 14 days and can be used to re-activate the account and reset the password of the deactivated account. + * @param param the request object + */ + public deactivateUser(param: ThoughtSpotRestApiDeactivateUserRequest, options?: Configuration): Promise { + return this.api.deactivateUser(param.deactivateUserRequest, options).toPromise(); + } + + /** + * Version: 10.12.0.cl or later Deletes a [custom calendar](https://docs.thoughtspot.com/cloud/latest/connections-cust-cal). Requires `DATAMANAGEMENT` (**Can manage data**) or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your ThoughtSpot instance, the `CAN_MANAGE_CUSTOM_CALENDAR` (**Can manage custom calendars**) privilege is required. #### Usage guidelines To delete a custom calendar, specify the calendar ID as a path parameter in the request URL. + * @param param the request object + */ + public deleteCalendar(param: ThoughtSpotRestApiDeleteCalendarRequest, options?: Configuration): Promise { + return this.api.deleteCalendar(param.calendarIdentifier, options).toPromise(); + } + + /** + * Version: 26.4.0.cl or later Deletes one or more collections from ThoughtSpot. #### Delete options * **delete_children**: When set to `true`, deletes the child objects (metadata items) within the collection that the user has access to. Objects that the user does not have permission to delete will be skipped. * **dry_run**: When set to `true`, performs a preview of the deletion operation without actually deleting anything. The response shows what would be deleted, allowing you to review before committing the deletion. #### Response The response includes: * **metadata_deleted**: List of metadata objects that were successfully deleted * **metadata_skipped**: List of metadata objects that were skipped due to lack of permissions or other constraints + * @param param the request object + */ + public deleteCollection(param: ThoughtSpotRestApiDeleteCollectionRequest, options?: Configuration): Promise { + return this.api.deleteCollection(param.deleteCollectionRequest, options).toPromise(); + } + + /** + * Version: 9.2.0.cl or later Deletes Git repository configuration from your ThoughtSpot instance. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance on your instance, the `CAN_SETUP_VERSION_CONTROL` (**Can set up version control**) privilege. + * @param param the request object + */ + public deleteConfig(param: ThoughtSpotRestApiDeleteConfigRequest, options?: Configuration): Promise { + return this.api.deleteConfig(param.deleteConfigRequest, options).toPromise(); + } + + /** + * Version: 9.2.0.cl or later **Important**: This endpoint is deprecated and will be removed from ThoughtSpot in September 2025. ThoughtSpot strongly recommends using the [Delete Connection V2](#/http/api-endpoints/connections/delete-connection-v2) endpoint to delete your connection objects. #### Usage guidelines Deletes a connection object. Requires `DATAMANAGEMENT` (**Can manage data**) and edit permissions to the connection object, or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) privilege is required. **Note**: If a connection has dependent objects, make sure you remove its associations before the delete operation. + * @param param the request object + */ + public deleteConnection(param: ThoughtSpotRestApiDeleteConnectionRequest, options?: Configuration): Promise { + return this.api.deleteConnection(param.deleteConnectionRequest, options).toPromise(); + } + + /** + * Version: 10.12.0.cl or later Deletes connection configuration objects. Requires `DATAMANAGEMENT` (**Can manage data**) and edit permissions to the connection object, or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) privilege is required. + * @param param the request object + */ + public deleteConnectionConfiguration(param: ThoughtSpotRestApiDeleteConnectionConfigurationRequest, options?: Configuration): Promise { + return this.api.deleteConnectionConfiguration(param.deleteConnectionConfigurationRequest, options).toPromise(); + } + + /** + * Version: 10.4.0.cl or later Deletes a connection object. **Note**: If a connection has dependent objects, make sure you remove its associations before the delete operation. Requires `DATAMANAGEMENT` (**Can manage data**) and edit permissions to the connection object, or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) privilege is required. + * @param param the request object + */ + public deleteConnectionV2(param: ThoughtSpotRestApiDeleteConnectionV2Request, options?: Configuration): Promise { + return this.api.deleteConnectionV2(param.connectionIdentifier, options).toPromise(); + } + + /** + * Version: 9.6.0.cl or later Removes the custom action specified in the API request. Requires `DEVELOPER` (**Has Developer privilege**) or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `DEVELOPER` (**Has developer privilege**) privilege is required. + * @param param the request object + */ + public deleteCustomAction(param: ThoughtSpotRestApiDeleteCustomActionRequest, options?: Configuration): Promise { + return this.api.deleteCustomAction(param.customActionIdentifier, options).toPromise(); + } + + /** + * Version: 9.9.0.cl or later Removes the specified DBT connection object from the ThoughtSpot system. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) or `DATAMANAGEMENT` (**Can manage data ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the following Data control privileges may be required: - `CAN_MANAGE_CUSTOM_CALENDAR`(**Can manage custom calendars**) - `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) - `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` (**Can manage data models**) + * @param param the request object + */ + public deleteDbtConnection(param: ThoughtSpotRestApiDeleteDbtConnectionRequest, options?: Configuration): Promise { + return this.api.deleteDbtConnection(param.dbtConnectionIdentifier, options).toPromise(); + } + + /** + * Version: 10.10.0.cl or later Deletes the configuration for the email customization. #### Pre-requisites Requires `DEVELOPER` (**has developer privilege**) or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `DEVELOPER` (**Has developer privilege**) privilege is required. **NOTE**:This endpoint in currently in beta. Contact ThoughtSpot support to enable this on your instance. #### Usage guidelines - Call the search API endpoint to get the `template_identifier` from the response. - Use that `template_identifier` as a parameter in this API request. + * @param param the request object + */ + public deleteEmailCustomization(param: ThoughtSpotRestApiDeleteEmailCustomizationRequest, options?: Configuration): Promise { + return this.api.deleteEmailCustomization(param.templateIdentifier, options).toPromise(); + } + + /** + * Version: 9.0.0.cl or later Removes the specified metadata object from the ThoughtSpot system. Requires edit access to the metadata object. + * @param param the request object + */ + public deleteMetadata(param: ThoughtSpotRestApiDeleteMetadataRequest, options?: Configuration): Promise { + return this.api.deleteMetadata(param.deleteMetadataRequest, options).toPromise(); + } + + /** + * Version: 9.0.0.cl or later Deletes an Org object from the ThoughtSpot system. Requires cluster administration (**Can administer Org**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `ORG_ADMINISTRATION` (**Can manage Orgs**) privilege is required. When you delete an Org, all its users and objects created in that Org context are removed. However, if the users in the deleted Org also exists in other Orgs, they are removed only from the deleted Org. + * @param param the request object + */ + public deleteOrg(param: ThoughtSpotRestApiDeleteOrgRequest, options?: Configuration): Promise { + return this.api.deleteOrg(param.orgIdentifier, options).toPromise(); + } + + /** + * Version: 10.12.0.cl or later Deletes the configuration for the email customization. #### Pre-requisites Requires `DEVELOPER` (**has developer privilege**) or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `DEVELOPER` (**Has developer privilege**) privilege is required. **NOTE**:This endpoint in currently in beta. Contact ThoughtSpot support to enable this on your instance. #### Usage guidelines - Call the search API endpoint to get the `org_identifier` from the response. - Use that `org_identifier` as a parameter in this API request. + * @param param the request object + */ + public deleteOrgEmailCustomization(param: ThoughtSpotRestApiDeleteOrgEmailCustomizationRequest, options?: Configuration): Promise { + return this.api.deleteOrgEmailCustomization(param.deleteOrgEmailCustomizationRequest, options).toPromise(); + } + + /** + * Version: 9.5.0.cl or later Deletes a Role object from the ThoughtSpot system. Available only if [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance. To delete a Role, the `ROLE_ADMINISTRATION` (**Can manage roles**) privilege is required. + * @param param the request object + */ + public deleteRole(param: ThoughtSpotRestApiDeleteRoleRequest, options?: Configuration): Promise { + return this.api.deleteRole(param.roleIdentifier, options).toPromise(); + } + + /** + * Deletes a scheduled job. Version: 9.4.0.cl or later Deletes a scheduled Liveboard job. Requires at least edit access to Liveboard or `ADMINISTRATION` (**Can administer Org**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `JOBSCHEDULING` (**Can schedule for others**) privilege is required. + * @param param the request object + */ + public deleteSchedule(param: ThoughtSpotRestApiDeleteScheduleRequest, options?: Configuration): Promise { + return this.api.deleteSchedule(param.scheduleIdentifier, options).toPromise(); + } + + /** + * Version: 9.0.0.cl or later Deletes a tag object from the ThoughtSpot system Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `TAGMANAGEMENT` (**Can manage tags**) privilege is required to create, edit, and delete tags. + * @param param the request object + */ + public deleteTag(param: ThoughtSpotRestApiDeleteTagRequest, options?: Configuration): Promise { + return this.api.deleteTag(param.tagIdentifier, options).toPromise(); + } + + /** + * Version: 9.0.0.cl or later Deletes a user from the ThoughtSpot system. If you want to remove a user from a specific Org but not from ThoughtSpot, update the group and Org mapping properties of the user object via a POST API call to the [/api/rest/2.0/users/{user_identifier}/update](#/http/api-endpoints/users/update-user) endpoint. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `USER_ADMINISTRATION` (**Can manage users**) privilege is required. + * @param param the request object + */ + public deleteUser(param: ThoughtSpotRestApiDeleteUserRequest, options?: Configuration): Promise { + return this.api.deleteUser(param.userIdentifier, options).toPromise(); + } + + /** + * Version: 9.0.0.cl or later Removes the specified group object from the ThoughtSpot system. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `GROUP_ADMINISTRATION` (**Can manage groups**) privilege is required. + * @param param the request object + */ + public deleteUserGroup(param: ThoughtSpotRestApiDeleteUserGroupRequest, options?: Configuration): Promise { + return this.api.deleteUserGroup(param.groupIdentifier, options).toPromise(); + } + + /** + * Delete a variable Version: 10.14.0.cl or later **Note:** This API endpoint is deprecated and will be removed from ThoughtSpot in a future release. Use [POST /api/rest/2.0/template/variables/delete](/api/rest/2.0/template/variables/delete) instead. Allows deleting a variable from ThoughtSpot. Requires ADMINISTRATION role and TENANT scope. The CAN_MANAGE_VARIABLES permission allows you to manage Formula Variables in the current organization scope. The API endpoint requires: * The variable identifier (ID or name) The operation will fail if: * The user lacks required permissions * The variable doesn\'t exist * The variable is being used by other objects + * @param param the request object + */ + public deleteVariable(param: ThoughtSpotRestApiDeleteVariableRequest, options?: Configuration): Promise { + return this.api.deleteVariable(param.identifier, options).toPromise(); + } + + /** + * Delete variable(s) Version: 26.4.0.cl or later Allows deleting multiple variables from ThoughtSpot. Requires ADMINISTRATION role and TENANT scope. The CAN_MANAGE_VARIABLES permission allows you to manage Formula Variables in the current organization scope. The API endpoint requires: * The variable identifiers (IDs or names) The operation will fail if: * The user lacks required permissions * Any of the variables don\'t exist * Any of the variables are being used by other objects + * @param param the request object + */ + public deleteVariables(param: ThoughtSpotRestApiDeleteVariablesRequest, options?: Configuration): Promise { + return this.api.deleteVariables(param.deleteVariablesRequest, options).toPromise(); + } + + /** + * Version: 10.14.0.cl or later Deletes one or more webhook configurations by their unique id or name. Returns status of each deletion operation, including successfully deleted webhooks and any failures with error details. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) or `DEVELOPER` (**Has developer privilege**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, users with `CAN_MANAGE_WEBHOOKS` (**Can manage webhooks**) privilege are also authorized to perform this action. + * @param param the request object + */ + public deleteWebhookConfigurations(param: ThoughtSpotRestApiDeleteWebhookConfigurationsRequest, options?: Configuration): Promise { + return this.api.deleteWebhookConfigurations(param.deleteWebhookConfigurationsRequest, options).toPromise(); + } + + /** + * Version: 9.2.0.cl or later Allows you to deploy a commit and publish TML content to your ThoughtSpot instance. Requires at least edit access to the objects used in the deploy operation. The API deploys the head of the branch unless a `commit_id` is specified in the API request. If the branch name is not defined in the request, the default branch is considered for deploying commits. For more information, see [Git integration documentation](https://developers.thoughtspot.com/docs/git-integration). + * @param param the request object + */ + public deployCommit(param: ThoughtSpotRestApiDeployCommitRequest, options?: Configuration): Promise> { + return this.api.deployCommit(param.deployCommitRequest, options).toPromise(); + } + + /** + * Version: 9.9.0.cl or later Exports the difference in connection metadata between CDW and ThoughtSpot Requires `DATAMANAGEMENT` (**Can manage data**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the following Data control privileges may be required: - `CAN_MANAGE_CUSTOM_CALENDAR`(**Can manage custom calendars**) - `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) - `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` (**Can manage data models**) To download the connection metadata difference between ThoughtSpot and CDW, pass the connection GUID as `connection_identifier` in the API request. + * @param param the request object + */ + public downloadConnectionMetadataChanges(param: ThoughtSpotRestApiDownloadConnectionMetadataChangesRequest, options?: Configuration): Promise { + return this.api.downloadConnectionMetadataChanges(param.connectionIdentifier, options).toPromise(); + } + + /** + * Version: 9.0.0.cl or later Exports an Answer in the given file format. You can download the Answer data as a PDF, PNG, CSV, or XLSX file. Requires at least view access to the Answer. #### Usage guidelines In the request body, specify the GUID or name of the Answer and set `file_format`. The default file format is CSV. Use the `type` parameter to specify whether the Answer being exported is a saved Answer (`SAVED`) or a pinned Answer on a Liveboard (`PINNED`). Defaults to `SAVED`. When using `PINNED`, the `metadata_identifier` must be the container id. **NOTE**: * The downloadable file returned in API response file is extensionless. Please rename the downloaded file by typing in the relevant extension. * HTML rendering is not supported for PDF exports of Answers with tables. Optionally, you can define [runtime overrides](https://developers.thoughtspot.com/docs/fetch-data-and-report-apis#_runtime_overrides) to apply to the Answer data. + * @param param the request object + */ + public exportAnswerReport(param: ThoughtSpotRestApiExportAnswerReportRequest, options?: Configuration): Promise { + return this.api.exportAnswerReport(param.exportAnswerReportRequest, options).toPromise(); + } + + /** + * Version: 9.0.0.cl or later Exports a Liveboard and its visualizations in PDF, PNG, CSV, or XLSX file format. The default `file_format` is CSV. Requires at least view access to the Liveboard. #### Usage guidelines In the request body, specify the GUID or name of the Liveboard. To generate a Liveboard report with specific visualizations, add GUIDs or names of the visualizations. **NOTE**: * The downloadable file returned in API response file is extensionless. Please rename the downloaded file by typing in the relevant extension. * Optionally, you can define [runtime overrides](https://developers.thoughtspot.com/docs/fetch-data-and-report-apis#_runtime_overrides) to apply to the Answer data. * To include unsaved changes in the report, pass the `transient_pinboard_content` script generated from the `getExportRequestForCurrentPinboard` method in the Visual Embed SDK. Upon successful execution, the API returns the report with unsaved changes, including ad hoc changes to visualizations. For more information, see [Liveboard Report API](https://developers.thoughtspot.com/docs/fetch-data-and-report-apis#_liveboard_report_api). * Starting with ThoughtSpot Cloud 10.9.0.cl release, the Liveboard can be exported in the PNG format in the resolution of your choice. To enable this on your instance, contact ThoughtSpot support. When this feature is enabled, the options `include_cover_page`,`include_filter_page` within the `png_options` will not be available for PNG exports. * Starting with the ThoughtSpot Cloud 26.2.0.cl release, * Liveboards can be exported in CSV format. * All visualizations within a Liveboard can be exported as individual CSV files. * When exporting multiple visualizations or the entire Liveboard, the system returns the report as a compressed ZIP file containing the separate CSV files for each visualization. * Liveboards can also be exported in XLSX format. * All selected visualizations are consolidated into a single Excel workbook (.xlsx), with each visualization placed in its own worksheet (tab). * XLSX exports are limited to a maximum of 255 worksheets (tabs) per workbook. + * @param param the request object + */ + public exportLiveboardReport(param: ThoughtSpotRestApiExportLiveboardReportRequest, options?: Configuration): Promise { + return this.api.exportLiveboardReport(param.exportLiveboardReportRequest, options).toPromise(); + } + + /** + * Version: 9.0.0.cl or later Exports the [TML](https://docs.thoughtspot.com/cloud/latest/tml) representation of metadata objects in JSON or YAML format. Requires `DATADOWNLOADING` (**Can download Data**) and at least view access to the metadata object. #### Usage guidelines * You can export one or several objects by passing metadata object GUIDs in the `metadata` array. * When exporting TML content for a Liveboard or Answer object, you can set `export_associated` to `true` to retrieve TML content for underlying Worksheets, Tables, or Views, including the GUID of each object within the headers. When `export_associated` is set to `true`, consider retrieving one metadata object at a time. * Set `export_fqns` to `true` to add FQNs of the referenced objects in the TML content. For example, if you send an API request to retrieve TML for a Liveboard and its associated objects, the API returns the TML content with FQNs of the referenced Worksheet. Exporting TML with FQNs is useful if ThoughtSpot has multiple objects with the same name and you want to eliminate ambiguity when importing TML files into ThoughtSpot. It eliminates the need for adding FQNs of the referenced objects manually during the import operation. * To export only the TML of feedbacks associated with an object, set the GUID of the object as `identifier`, and set the `type` as `FEEDBACK` in the `metadata` array. * To export the TML of an object along with the feedbacks associated with it, set the GUID of the object as `identifier`, set the `type` as `LOGIAL_TABLE` in the `metadata` array, and set `export_with_associated_feedbacks` in `export_options` to true. For more information, see [TML Documentation](https://developers.thoughtspot.com/docs/tml#_export_a_tml). For more information on feedbacks, see [Feedback Documentation](https://docs.thoughtspot.com/cloud/latest/sage-feedback). + * @param param the request object + */ + public exportMetadataTML(param: ThoughtSpotRestApiExportMetadataTMLRequest, options?: Configuration): Promise> { + return this.api.exportMetadataTML(param.exportMetadataTMLRequest, options).toPromise(); + } + + /** + * Version: 10.1.0.cl or later Exports the [TML](https://docs.thoughtspot.com/cloud/latest/tml) representation of metadata objects in JSON or YAML format. ### **Permissions Required** Requires `DATAMANAGEMENT` (**Can manage data**) and `USERMANAGEMENT` (**Can manage users**) privileges. #### **Usage Guidelines** This API is only applicable for `USER`, `GROUP`, and `ROLES` metadata types. - `batch_offset` Indicates the starting position within the complete dataset from which the API should begin returning objects. Useful for paginating results efficiently. - `batch_size` Specifies the number of objects or items to retrieve in a single request. Helps control response size for better performance. - `edoc_format` Defines the format of the TML content. The exported metadata can be in JSON or YAML format. - `export_dependent` Specifies whether to include dependent metadata objects in the export. Ensures related objects are also retrieved if needed. - `all_orgs_override` Indicates whether the export operation applies across all organizations. Useful for multi-tenant environments where cross-org exports are required. + * @param param the request object + */ + public exportMetadataTMLBatched(param: ThoughtSpotRestApiExportMetadataTMLBatchedRequest, options?: Configuration): Promise { + return this.api.exportMetadataTMLBatched(param.exportMetadataTMLBatchedRequest, options).toPromise(); + } + + /** + * Version: 9.0.0.cl or later Fetches data from a saved Answer. Requires at least view access to the saved Answer. The `record_size` attribute determines the number of records to retrieve in an API call. For more information about pagination, record size, and maximum row limit, see [Pagination and record size settings](https://developers.thoughtspot.com/docs/fetch-data-and-report-apis#_pagination_settings_for_data_and_report_apis). + * @param param the request object + */ + public fetchAnswerData(param: ThoughtSpotRestApiFetchAnswerDataRequest, options?: Configuration): Promise { + return this.api.fetchAnswerData(param.fetchAnswerDataRequest, options).toPromise(); + } + + /** + * Version: 9.0.0.cl or later Fetches the underlying SQL query data for an Answer object. Requires at least view access to the Answer object. Upon successful execution, the API returns the SQL queries for the specified object as shown in this example: ``` { \"metadata_id\":\"8fbe44a8-46ad-4b16-8d39-184b2fada490\", \"metadata_name\":\"Total sales\", \"metadata_type\":\"ANSWER\", \"sql_queries\":[ { \"metadata_id\":\"8fbe44a8-46ad-4b16-8d39-184b2fada490\", \"metadata_name\":\"Total sales -test\", \"sql_query\":\"SELECT \\n \\\"ta_1\\\".\\\"REGION\\\" \\\"ca_1\\\", \\n \\\"ta_2\\\".\\\"PRODUCTNAME\\\" \\\"ca_2\\\", \\n \\\"ta_1\\\".\\\"STORENAME\\\" \\\"ca_3\\\", \\n CASE\\n WHEN sum(\\\"ta_3\\\".\\\"SALES\\\") IS NOT NULL THEN sum(\\\"ta_3\\\".\\\"SALES\\\")\\n ELSE 0\\n END \\\"ca_4\\\", \\n CASE\\n WHEN sum(\\\"ta_3\\\".\\\"QUANTITYPURCHASED\\\") IS NOT NULL THEN sum(\\\"ta_3\\\".\\\"QUANTITYPURCHASED\\\")\\n ELSE 0\\n END \\\"ca_5\\\"\\nFROM \\\"RETAILAPPAREL\\\".\\\"PUBLIC\\\".\\\"FACT_RETAPP_SALES\\\" \\\"ta_3\\\"\\n JOIN \\\"RETAILAPPAREL\\\".\\\"PUBLIC\\\".\\\"DIM_RETAPP_STORES\\\" \\\"ta_1\\\"\\n ON \\\"ta_3\\\".\\\"STOREID\\\" = \\\"ta_1\\\".\\\"STOREID\\\"\\n JOIN \\\"RETAILAPPAREL\\\".\\\"PUBLIC\\\".\\\"DIM_RETAPP_PRODUCTS\\\" \\\"ta_2\\\"\\n ON \\\"ta_3\\\".\\\"PRODUCTID\\\" = \\\"ta_2\\\".\\\"PRODUCTID\\\"\\nGROUP BY \\n \\\"ca_1\\\", \\n \\\"ca_2\\\", \\n \\\"ca_3\\\"\\n\" } ] } ``` + * @param param the request object + */ + public fetchAnswerSqlQuery(param: ThoughtSpotRestApiFetchAnswerSqlQueryRequest, options?: Configuration): Promise { + return this.api.fetchAnswerSqlQuery(param.fetchAnswerSqlQueryRequest, options).toPromise(); + } + + /** + * Version: 10.4.0.cl or later Gets information about the status of the TML async import task scheduled using the `/api/rest/2.0/metadata/tml/async/import` API call. To fetch the task details, specify the ID of the TML async import task. Requires access to the task ID. The API allows users who initiated the asynchronous TML import via `/api/rest/2.0/metadata/tml/async/import` to view the status of their tasks. Users with administration privilege can view the status of all import tasks initiated by the users in their Org. #### Usage guidelines See [TML API Documentation](https://developers.thoughtspot.com/docs/tml#_fetch_status_of_the_tml_import_task) for usage guidelines. + * @param param the request object + */ + public fetchAsyncImportTaskStatus(param: ThoughtSpotRestApiFetchAsyncImportTaskStatusRequest, options?: Configuration): Promise { + return this.api.fetchAsyncImportTaskStatus(param.fetchAsyncImportTaskStatusRequest, options).toPromise(); + } + + /** + * Version: 10.12.0.cl or later Fetches column security rules for specified tables. This API endpoint retrieves column-level security rules configured for tables. It returns information about which columns are secured and which groups have access to those columns. #### Usage guidelines - Provide an array of table identifiers using either `identifier` (GUID or name) or `obj_identifier` (object ID) - At least one of `identifier` or `obj_identifier` must be provided for each table - The API returns column security rules for all specified tables - Users must have appropriate permissions to access security rules for the specified tables #### Required permissions - `ADMINISTRATION` - Can administer ThoughtSpot - `DATAMANAGEMENT` - Can manage data - `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` - Can manage worksheet views and tables #### Example request ```json { \"tables\": [ { \"identifier\": \"table-guid\", \"obj_identifier\": \"table-object-id\" } ] } ``` #### Response format The API returns an array of `ColumnSecurityRuleResponse` objects wrapped in a `data` field. Each `ColumnSecurityRuleResponse` object contains: - Table information (GUID and object ID) - Array of column security rules with column details, group access, and source table information #### Example response ```json { \"data\": [ { \"guid\": \"table-guid\", \"objId\": \"table-object-id\", \"columnSecurityRules\": [ { \"column\": { \"id\": \"col_123\", \"name\": \"Salary\" }, \"groups\": [ { \"id\": \"group_1\", \"name\": \"HR Department\" } ], \"sourceTableDetails\": { \"id\": \"source-table-guid\", \"name\": \"Employee_Data\" } } ] } ] } ``` + * @param param the request object + */ + public fetchColumnSecurityRules(param: ThoughtSpotRestApiFetchColumnSecurityRulesRequest, options?: Configuration): Promise> { + return this.api.fetchColumnSecurityRules(param.fetchColumnSecurityRulesRequest, options).toPromise(); + } + + /** + * Version: 9.9.0.cl or later Validates the difference in connection metadata between CDW and ThoughtSpot. Requires `DATAMANAGEMENT` (**Can manage data**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the following Data control privileges may be required: - `CAN_MANAGE_CUSTOM_CALENDAR`(**Can manage custom calendars**) - `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) - `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` (**Can manage data models**) Returns a boolean indicating whether there is any difference between the connection metadata at ThoughtSpot and CDW. To get the connection metadata difference status, pass the connection GUID as `connection_identifier` in the API request. + * @param param the request object + */ + public fetchConnectionDiffStatus(param: ThoughtSpotRestApiFetchConnectionDiffStatusRequest, options?: Configuration): Promise { + return this.api.fetchConnectionDiffStatus(param.connectionIdentifier, options).toPromise(); + } + + /** + * Version: 9.0.0.cl or later Gets data from a Liveboard object and its visualization. Requires at least view access to the Liveboard. #### Usage guidelines In the request body, specify the GUID or name of the Liveboard. To get data for specific visualizations, add the GUIDs or names of the visualizations in the API request. To include unsaved changes in the report, pass the `transient_pinboard_content` script generated from the `getExportRequestForCurrentPinboard` method in the Visual Embed SDK. Upon successful execution, the API returns the report with unsaved changes. If the new Liveboard experience mode, the transient content includes ad hoc changes to visualizations such as sorting, toggling of legends, and data drill down. For more information, and see [Liveboard data API](https://developers.thoughtspot.com/docs/fetch-data-and-report-apis#_fetch_liveboard_data_api). + * @param param the request object + */ + public fetchLiveboardData(param: ThoughtSpotRestApiFetchLiveboardDataRequest, options?: Configuration): Promise { + return this.api.fetchLiveboardData(param.fetchLiveboardDataRequest, options).toPromise(); + } + + /** + * Version: 9.0.0.cl or later Fetches the underlying SQL query data for a Liveboard object and its visualizations. Requires at least view access to the Liveboard object. To get SQL query data for a Liveboard, specify the GUID of the Liveboard. Optionally, you can add an array of visualization GUIDs to retrieve the SQL query data for visualizations in the Liveboard. Upon successful execution, the API returns the SQL queries for the specified object as shown in this example: ``` { \"metadata_id\": \"fa68ae91-7588-4136-bacd-d71fb12dda69\", \"metadata_name\": \"Total Sales\", \"metadata_type\": \"LIVEBOARD\", \"sql_queries\": [ { \"metadata_id\": \"b3b6d2b9-089a-490c-8e16-b144650b7843\", \"metadata_name\": \"Total quantity purchased, Total sales by region\", \"sql_query\": \"SELECT \\n \\\"ta_1\\\".\\\"REGION\\\" \\\"ca_1\\\", \\n CASE\\n WHEN sum(\\\"ta_2\\\".\\\"QUANTITYPURCHASED\\\") IS NOT NULL THEN sum(\\\"ta_2\\\".\\\"QUANTITYPURCHASED\\\")\\n ELSE 0\\n END \\\"ca_2\\\", \\n CASE\\n WHEN sum(\\\"ta_2\\\".\\\"SALES\\\") IS NOT NULL THEN sum(\\\"ta_2\\\".\\\"SALES\\\")\\n ELSE 0\\n END \\\"ca_3\\\"\\nFROM \\\"RETAILAPPAREL\\\".\\\"PUBLIC\\\".\\\"FACT_RETAPP_SALES\\\" \\\"ta_2\\\"\\n JOIN \\\"RETAILAPPAREL\\\".\\\"PUBLIC\\\".\\\"DIM_RETAPP_STORES\\\" \\\"ta_1\\\"\\n ON \\\"ta_2\\\".\\\"STOREID\\\" = \\\"ta_1\\\".\\\"STOREID\\\"\\nGROUP BY \\\"ca_1\\\"\" } ] } ``` + * @param param the request object + */ + public fetchLiveboardSqlQuery(param: ThoughtSpotRestApiFetchLiveboardSqlQueryRequest, options?: Configuration): Promise { + return this.api.fetchLiveboardSqlQuery(param.fetchLiveboardSqlQueryRequest, options).toPromise(); + } + + /** + * Version: 9.0.0.cl or later Fetches security audit logs. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the [Admin Control](https://developers.thoughtspot.com/docs/rbac#_admin_control) privileges are required. #### Usage guidelines By default, the API retrieves logs for the last 24 hours. You can set a custom duration in EPOCH time. Make sure the log duration specified in your API request doesn’t exceed 24 hours. If you must fetch logs for a longer time range, modify the duration and make multiple sequential API requests. Upon successful execution, the API returns logs with the following information: * timestamp of the event * event ID * event type * name and GUID of the user * IP address of ThoughtSpot instance For more information see [Audit logs Documentation](https://developers.thoughtspot.com/docs/audit-logs). + * @param param the request object + */ + public fetchLogs(param: ThoughtSpotRestApiFetchLogsRequest, options?: Configuration): Promise> { + return this.api.fetchLogs(param.fetchLogsRequest, options).toPromise(); + } + + /** + * Version: 26.3.0.cl or later This API fetches the object privileges present for the given list of principals (user or group), on the given set of objects. It supports pagination, which can be enabled and configured using the request parameters. It provides users access to certain features based on privilege based access control. #### Usage guidelines - Specify the `type` (`USER` or `USER_GROUP`) and `identifier` (either GUID or name) of the principals for which you want to retrieve object privilege information in the `principals` array. - Specify the `type` (`LOGICAL_TABLE`) and `identifier` (either GUID or name) of the metadata objects for which you want to retrieve object privilege information in the `metadata` array. Only `LOGICAL_TABLE` metadata type is supported for now. It may be extended for other metadata types in future. - To control the offset from where principals have to be fetched, use `record_offset`. When `record_offset` is 0, information is fetched from the beginning. - To control the number of principals to be fetched, use `record_size`. Default `record_size` is 20. - Ensure `record_offset` for a subsequent request is one more than the value of `record_size` of the previous request. - Ensure using correct Authorization Bearer Token corresponding to specific user & org. #### Example request ```json { \"principals\": [ { \"type\": \"type-1\", \"identifier\": \"principal-guid-or-name-1\" }, { \"type\": \"type-2\", \"identifier\": \"principal-guid-or-name-2\" } ], \"metadata\": [ { \"type\": \"metadata-type-1\", \"identifier\": \"metadata-guid-or-name-1\" }, { \"type\": \"metadata-type-2\", \"identifier\": \"metadata-guid-or-name-2\" } ], \"record_offset\": 0, \"record_size\": 20 } ``` #### Response format The API returns an array of `metadata_object_privileges` objects wrapped in JSON. Each `metadata_object_privileges` object contains: - Metadata information (GUID, name and type) - Array of `principal_object_privilege_info`. - Each `principal_object_privilege_info` contains: - Principal type. All principals of this type are listed as described below. - Array of `principal_object_privileges`. - Each `principal_object_privileges` contains: - Principal information (GUID, name, subtype) - List of applied object level privileges. #### Example response ```json { \"metadata_object_privileges\": [ { \"metadata_id\": \"metadata-guid-1\", \"metadata_name\": \"metadata-name-1\", \"metadata_type\": \"metadata-type-1\", \"principal_object_privilege_info\": [ { \"principal_type\": \"principal-type-1\", \"principal_object_privileges\": [ { \"principal_id\": \"principal-guid-1\", \"principal_name\": \"principal-name-1\", \"principal_sub_type\": \"principal-sub-type-1\", \"object_privileges\": \"[object-privilege-1, object-privilege-2]\" }, { \"principal_id\": \"principal-guid-2\", \"principal_name\": \"principal-name-2\", \"principal_sub_type\": \"principal-sub-type-2\", \"object_privileges\": \"[object-privilege-1, object-privilege-2]\" } ] }, { \"principal_type\": \"principal-type-2\", \"principal_object_privileges\": [ { \"principal_id\": \"principal-guid-3\", \"principal_name\": \"principal-guid-4\", \"principal_sub_type\": \"principal-sub-type-4\", \"object_privileges\": \"[object-privilege-1]\" } ] } ] }, { \"metadata_id\": \"metadata-guid-2\", \"metadata_name\": \"metadata-name-2\", \"metadata_type\": \"metadata-type-2\", \"principal_object_privilege_info\": [ { \"principal_type\": \"principal-type-1\", \"principal_object_privileges\": [ { \"principal_id\": \"principal-guid-1\", \"principal_name\": \"principal-name-1\", \"principal_sub_type\": \"principal-sub-type-1\", \"object_privileges\": \"[object-privilege-3, object-privilege-4]\" }, { \"principal_id\": \"principal-guid-2\", \"principal_name\": \"principal-name-2\", \"principal_sub_type\": \"principal-sub-type-2\", \"object_privileges\": \"[object-privilege-4]\" } ] } ] } ] } ``` + * @param param the request object + */ + public fetchObjectPrivileges(param: ThoughtSpotRestApiFetchObjectPrivilegesRequest, options?: Configuration): Promise { + return this.api.fetchObjectPrivileges(param.fetchObjectPrivilegesRequest, options).toPromise(); + } + + /** + * Version: 9.0.0.cl or later Fetches object permission details for a given principal object such as a user and group. Requires view access to the metadata object. #### Usage guidelines * To get a list of all metadata objects that a user or group can access, specify the `type` and GUID or name of the principal. * To get permission details for a specific object, add the `type` and GUID or name of the metadata object to your API request. Upon successful execution, the API returns a list of metadata objects and permission details for each object. + * @param param the request object + */ + public fetchPermissionsOfPrincipals(param: ThoughtSpotRestApiFetchPermissionsOfPrincipalsRequest, options?: Configuration): Promise { + return this.api.fetchPermissionsOfPrincipals(param.fetchPermissionsOfPrincipalsRequest, options).toPromise(); + } + + /** + * Version: 9.0.0.cl or later Fetches permission details for a given metadata object. Requires view access to the metadata object. #### Usage guidelines * To fetch a list of users and groups for a metadata object, specify `type` and GUID or name of the metadata object. * To get permission details for a specific user or group, add `type` and GUID or name of the principal object to your API request. Upon successful execution, the API returns permission details and principal information for the object specified in the API request. + * @param param the request object + */ + public fetchPermissionsOnMetadata(param: ThoughtSpotRestApiFetchPermissionsOnMetadataRequest, options?: Configuration): Promise { + return this.api.fetchPermissionsOnMetadata(param.fetchPermissionsOnMetadataRequest, options).toPromise(); + } + + /** + * Version: 9.0.0.cl or later Enforces logout on current user sessions. Use this API with caution as it may invalidate active user sessions and force users to re-login. Make sure you specify the usernames or GUIDs. If you pass null values in the API call, all user sessions on your cluster become invalid, and the users are forced to re-login. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `USER_ADMINISTRATION` (**Can manage users**) privilege is required. + * @param param the request object + */ + public forceLogoutUsers(param: ThoughtSpotRestApiForceLogoutUsersRequest, options?: Configuration): Promise { + return this.api.forceLogoutUsers(param.forceLogoutUsersRequest, options).toPromise(); + } + + /** + * Version: 10.12.0.cl or later Exports a [custom calendar](https://docs.thoughtspot.com/cloud/latest/connections-cust-cal) in the CSV format. Requires `DATAMANAGEMENT` (**Can manage data**) or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your ThoughtSpot instance, the `CAN_MANAGE_CUSTOM_CALENDAR` (**Can manage custom calendars**) privilege is required. #### Usage guidelines Use this API to download a custom calendar in the CSV file format. In your API request, specify the following parameters. * Start and end date of the calendar. For \"month offset\" calendars, the start date must match the month defined in the `month_offset` attribute. You can also specify optional parameters such as the starting day of the week and prefixes for the quarter and year labels. + * @param param the request object + */ + public generateCSV(param: ThoughtSpotRestApiGenerateCSVRequest, options?: Configuration): Promise { + return this.api.generateCSV(param.generateCSVRequest, options).toPromise(); + } + + /** + * Version: 9.0.0.cl or later Retrieves details of the current user session for the token provided in the request header. Any ThoughtSpot user can access this endpoint and send an API request. The data returned in the API response varies according to user\'s privilege and object access permissions. **NOTE**: In ThoughtSpot, users with cluster administration privileges can access all Orgs by default. However, unless the administrator is explicitly added to an Org, the Orgs list in the session information returned by the API will include only the Primary Org. To include other Orgs in the API response, you must explicitly add the administrator to each Org in the Admin settings page in the UI or via user REST API. + * @param param the request object + */ + public getCurrentUserInfo(param: ThoughtSpotRestApiGetCurrentUserInfoRequest = {}, options?: Configuration): Promise { + return this.api.getCurrentUserInfo( options).toPromise(); + } + + /** + * Version: 9.4.0.cl or later Retrieves details of the current session token for the bearer token provided in the request header. This API endpoint does not create a new token. Instead, it returns details about the token, including the token string, creation time, expiration time, and the associated user. Use this endpoint to introspect your current session token, debug authentication issues, or when a frontend application needs session token details. Any ThoughtSpot user with a valid bearer token can access this endpoint and send an API request + * @param param the request object + */ + public getCurrentUserToken(param: ThoughtSpotRestApiGetCurrentUserTokenRequest = {}, options?: Configuration): Promise { + return this.api.getCurrentUserToken( options).toPromise(); + } + + /** + * Version: 10.4.0.cl or later Creates an authentication token that provides values for the formula variables in the Row Level Security (RLS) rules for a given user. Recommended for use cases that require Attribute-based access control (ABAC) via RLS. #### Required privileges To add a new user and assign privileges during auto-creation, the `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege is required. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled, the `CONTROL_TRUSTED_AUTH` (**Can Enable or Disable Trusted Authentication**) privilege and edit access to the data source are required. To configure formula variables for all Orgs on your instance or the Primary Org, cluster administration privileges are required. Org administrators can configure formula variables for their respective Orgs. If Role-Based Access Control (RBAC) is enabled, users with the `CAN_MANAGE_VARIABLES` (**Can manage variables**) role privilege can also create and manage variables for their Org context. #### Usage guidelines You can generate a token by providing a `username` and `password`, or by using a `secret_key`. To generate a `secret_key`, the administrator must enable [Trusted authentication](https://developers.thoughtspot.com/docs/trusted-auth-secret-key) in the **Develop** > **Customizations** > **Security Settings** page. **Note**: * When both `password` and `secret_key` are included in the API request, `password` takes precedence. * If [Multi-Factor Authentication (MFA)](https://docs.thoughtspot.com/cloud/latest/authentication-local-mfa) is enabled on your instance, the API login request with `username` and `password` returns an error. You can switch to token-based authentication with `secret_key` or contact ThoughtSpot Support for assistance. The token obtained from ThoughtSpot is valid for 5 minutes by default. You can configure the token expiration time as required. #### ABAC via RLS To implement ABAC via RLS and assign security entitlements to users during session creation, generate a token with custom variable values. The values set in the authentication token are applied to the formula variables referenced in RLS rules at the table level, which determines the data each user can access based on their entitlements. The variable values can be configured to persist for a specific set of Models in user sessions initiated with the token, allowing different RLS rules to be set for different data models. Once defined, the rules are added to the user\'s `variable_values` object, after which all sessions will use the persisted values. For more information, see [ABAC via tokens Documentation](https://developers.thoughtspot.com/docs/abac-via-rls-variables). ##### Formula variables Before defining variable values, ensure the variables are created and available on your instance. To create a formula variable, you can use the **Create variable** (`/api/rest/2.0/template/variables/create`) REST API endpoint, with the variable `type` set as `Formula_Variable` in the API request. The API doesn\'t support `\"persist_option\": \"RESET\"` and `\"persist_option\": \"NONE\"` when `variable_values` are defined in the request. If you are using `variable_values` for token generation, you must use other supported persist options such as `APPEND` or `REPLACE`. If you want to use `RESET` or `NONE`, do not pass any `variable_values`. In such cases, `variable_values` will remain unaffected. #### Supported objects The supported object type is `LOGICAL_TABLE`. When using `object_id` with `variable_values`, models are supported. #### Just-in-time provisioning For [just-in-time user creation and provisioning](https://developers.thoughtspot.com/docs/just-in-time-provisioning), specify the following attributes in the API request: * `auto_create` * `username` * `display_name` * `email` * `groups` Set `auto_create` to `true` if the username does not exist in ThoughtSpot. If the username already exists in ThoughtSpot and `auto_create` is set to `true`, user properties such as display name, email, Org and group entitlements will not be updated with new values. Setting `auto_create` to `true` does not create formula variables. Hence, this setting will not be applicable to `variable_values`. #### Important point to note All options in the token creation APIs that define user access to data in ThoughtSpot will take effect during token creation, not when the token is used for authentication. For example, `auto_create:true` will create the user when the authentication token is created. Persist options such as `APPEND` and `REPLACE` will persist `variable_values` on the user profile when the token is created. + * @param param the request object + */ + public getCustomAccessToken(param: ThoughtSpotRestApiGetCustomAccessTokenRequest, options?: Configuration): Promise { + return this.api.getCustomAccessToken(param.getCustomAccessTokenRequest, options).toPromise(); + } + + /** + * Version: 10.15.0.cl or later Suggests the most relevant data sources for a given natural language query, ranked by confidence with LLM-generated reasoning. Requires `CAN_USE_SPOTTER` privilege and at least view-level access to the underlying metadata entities referenced in the response. #### Usage guidelines The request must include: - `query`: the natural language question to find relevant data sources for If the request is successful, the API returns a ranked list of suggested data sources, each containing: - `confidence`: a float score indicating the model\'s confidence in the relevance of the suggestion - `details`: metadata about the data source - `data_source_identifier`: the unique ID of the data source - `data_source_name`: the display name of the data source - `description`: a description of the data source - `reasoning`: LLM-generated rationale explaining why the data source was recommended #### Error responses | Code | Description | |------|--------------------------------------------------------------------------------------------------------------------------------------------| | 401 | Unauthorized — authentication token is missing, expired, or invalid. | | 403 | Forbidden — the authenticated user does not have `CAN_USE_SPOTTER` privilege or lacks view permission on the underlying metadata entities. | > ###### Note: > * This endpoint is currently in Beta. Breaking changes may be introduced before it is made Generally Available. > * This endpoint requires Spotter — please contact ThoughtSpot Support to enable Spotter on your cluster. + * @param param the request object + */ + public getDataSourceSuggestions(param: ThoughtSpotRestApiGetDataSourceSuggestionsRequest, options?: Configuration): Promise { + return this.api.getDataSourceSuggestions(param.getDataSourceSuggestionsRequest, options).toPromise(); + } + + /** + * Version: 9.0.0.cl or later Generates an authentication token for creating a full session in ThoughtSpot for a given user. Recommended for use cases that do not require Attribute-based access control (ABAC) via Row Level Security (RLS). #### Usage guidelines You can generate a token for a user by providing a `username` and `password`, or by using the `secret_key` generated for your instance. To generate a `secret_key`, the administrator must enable [Trusted authentication](https://developers.thoughtspot.com/docs/trusted-auth-secret-key) in the **Develop** > **Customizations** > **Security Settings** page. **Note**: * When both `password` and `secret_key` are included in the API request, `password` takes precedence. * If [Multi-Factor Authentication (MFA)](https://docs.thoughtspot.com/cloud/latest/authentication-local-mfa) is enabled on your instance, the API login request with `username` and `password` returns an error. You can switch to token-based authentication with `secret_key` or contact ThoughtSpot Support for assistance. The token obtained from ThoughtSpot is valid for 5 minutes by default. You can configure the token expiration time as required. #### Just-in-time provisioning For [just-in-time user creation and provisioning](https://developers.thoughtspot.com/docs/just-in-time-provisioning), specify the following attributes in the API request: * `auto_create` * `username` * `display_name` * `email` * `group_identifiers` Set `auto_create` to `true` if the username does not exist in ThoughtSpot. If the user already exists in ThoughtSpot and `auto_create` is set to `true`, user properties such as display name, email and group assignment will be updated. To add a new user and assign privileges during auto-creation, the `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege is required. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled, the `CONTROL_TRUSTED_AUTH` (**Can Enable or Disable Trusted Authentication**) privilege is required. #### Important point to note All options in the token creation APIs that define user access to data in ThoughtSpot will take effect during token creation, not when the token is used for authentication. For example, `auto_create:true` will create the user when the authentication token is created. + * @param param the request object + */ + public getFullAccessToken(param: ThoughtSpotRestApiGetFullAccessTokenRequest, options?: Configuration): Promise { + return this.api.getFullAccessToken(param.getFullAccessTokenRequest, options).toPromise(); + } + + /** + * Version: 10.15.0.cl or later Retrieves existing natural language (NL) instructions configured for a specific data model. These instructions guide the AI system in understanding data context and generating more accurate responses. Requires `CAN_USE_SPOTTER` privilege, at least view access on the data model, and a bearer token corresponding to the org where the data model exists. #### Usage guidelines The request must include: - `data_source_identifier`: the unique ID of the data model to retrieve instructions for If the request is successful, the API returns: - `nl_instructions_info`: an array of instruction objects, each containing: - `instructions`: the configured text instructions for AI processing - `scope`: the scope of the instruction — currently only `GLOBAL` is supported #### Instructions scope - **GLOBAL**: Instructions that apply globally across the system on the given data-model (currently only global instructions are supported) #### Error responses | Code | Description | |------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| | 401 | Unauthorized — authentication token is missing, expired, or invalid. | | 403 | Forbidden — the authenticated user does not have `CAN_USE_SPOTTER` privilege, lacks view access on the data model, or the bearer token does not correspond to the org where the data model exists. | > ###### Note: > > - To use this API, the user needs at least view access on the data model, and must use the bearer token corresponding to the org where the data model exists. > - This endpoint is currently in Beta. Breaking changes may be introduced before the endpoint is made Generally Available. > - Available from version 10.15.0.cl and later. > - This endpoint requires Spotter — please contact ThoughtSpot Support to enable Spotter on your cluster. > - Use this API to review currently configured instructions before modifying them with `setNLInstructions`. + * @param param the request object + */ + public getNLInstructions(param: ThoughtSpotRestApiGetNLInstructionsRequest, options?: Configuration): Promise { + return this.api.getNLInstructions(param.getNLInstructionsRequest, options).toPromise(); + } + + /** + * Version: 9.0.0.cl or later Generates an authentication token that provides access to a specific metadata object. This object list is intersected with the list of objects the user is allowed to access via group membership. For more information, see [Object security](https://docs.thoughtspot.com/cloud/latest/security-data-object#object_security). #### Usage guidelines You can generate a token for a user by providing a `username` and `password`, or by using the `secret_key` generated for your instance. To generate a `secret_key`, the administrator must enable [Trusted authentication](https://developers.thoughtspot.com/docs/trusted-auth-secret-key) in the **Develop** > **Customizations** > **Security Settings** page. **Note**: * When both `password` and `secret_key` are included in the API request, `password` takes precedence. * If [Multi-Factor Authentication (MFA)](https://docs.thoughtspot.com/cloud/latest/authentication-local-mfa) is enabled on your instance, the API login request with `username` and `password` returns an error. You can switch to token-based authentication with `secret_key` or contact ThoughtSpot Support for assistance. The token obtained from ThoughtSpot is valid for 5 minutes by default. You can configure the token expiration time as required. #### Just-in-time provisioning For [just-in-time user creation and provisioning](https://developers.thoughtspot.com/docs/just-in-time-provisioning), specify the following attributes in the API request: * `auto_create` * `username` * `display_name` * `email` * `group_identifiers` Set `auto_create` to `true` if the user is not available in ThoughtSpot. If the user already exists in ThoughtSpot and the `auto_create` parameter is set to `true`, user properties such as display name, email, and group assignment will be updated. To add a new user and assign privileges, the `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege is required. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled, the `CONTROL_TRUSTED_AUTH`(**Can Enable or Disable Trusted Authentication**) privilege is required. #### Important point to note All options in the token creation APIs that define user access to data in ThoughtSpot will take effect during token creation, not when the token is used for authentication. For example, `auto_create:true` will create the user when the authentication token is created. + * @param param the request object + */ + public getObjectAccessToken(param: ThoughtSpotRestApiGetObjectAccessTokenRequest, options?: Configuration): Promise { + return this.api.getObjectAccessToken(param.getObjectAccessTokenRequest, options).toPromise(); + } + + /** + * Version: 10.13.0.cl or later Breaks down a natural language query into a series of smaller analytical sub-questions, each mapped to a relevant data source. Requires `CAN_USE_SPOTTER` privilege and at least view-level access to the referenced metadata objects. #### Usage guidelines The request must include: - `query`: the natural language question to decompose into analytical sub-questions - `metadata_context`: at least one of the following context identifiers to guide question generation: - `conversation_identifier` — an existing conversation session ID - `answer_identifiers` — a list of Answer GUIDs - `liveboard_identifiers` — a list of Liveboard GUIDs - `data_source_identifiers` — a list of data source GUIDs Optional parameters for refining the output: - `ai_context`: additional context to improve response quality - `content` — supplementary text or CSV data as string input - `instructions` — custom text instructions for the AI system - `limit_relevant_questions`: maximum number of questions to return (default: `5`) - `bypass_cache`: if `true`, forces fresh computation instead of returning cached results If the request is successful, the API returns a list of relevant analytical questions, each containing: - `query`: the generated sub-question - `data_source_identifier`: the unique ID of the data source the question targets - `data_source_name`: the display name of the corresponding data source #### Error responses | Code | Description | |------|---------------------------------------------------------------------------------------------------------------------------------------| | 401 | Unauthorized — authentication token is missing, expired, or invalid. | | 403 | Forbidden — the authenticated user does not have `CAN_USE_SPOTTER` privilege or lacks view access to the referenced metadata objects. | > ###### Note: > * This endpoint is currently in Beta. Breaking changes may be introduced before the endpoint is made Generally Available. > * This endpoint requires Spotter - please contact ThoughtSpot support to enable Spotter on your cluster. + * @param param the request object + */ + public getRelevantQuestions(param: ThoughtSpotRestApiGetRelevantQuestionsRequest, options?: Configuration): Promise { + return this.api.getRelevantQuestions(param.getRelevantQuestionsRequest, options).toPromise(); + } + + /** + * Version: 9.0.0.cl or later Retrieves the current configuration details of the cluster. If the request is successful, the API returns a list configuration settings applied on the cluster. Requires `ADMINISTRATION`(**Can administer ThoughtSpot**) privilege to view these complete configuration settings of the cluster. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `SYSTEM_INFO_ADMINISTRATION` (**Can view system activities**) privilege is required. This API does not require any parameters to be passed in the request. + * @param param the request object + */ + public getSystemConfig(param: ThoughtSpotRestApiGetSystemConfigRequest = {}, options?: Configuration): Promise { + return this.api.getSystemConfig( options).toPromise(); + } + + /** + * Version: 9.0.0.cl or later Gets system information such as the release version, locale, time zone, deployment environment, date format, and date time format of the cluster. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privileges. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `SYSTEM_INFO_ADMINISTRATION` (**Can view system activities**) privilege is required. This API does not require any parameters to be passed in the request. + * @param param the request object + */ + public getSystemInformation(param: ThoughtSpotRestApiGetSystemInformationRequest = {}, options?: Configuration): Promise { + return this.api.getSystemInformation( options).toPromise(); + } + + /** + * Version: 9.2.0.cl or later Gets a list of configuration overrides applied on the cluster. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `APPLICATION_ADMINISTRATION` (**Can manage application settings**) privilege is required. This API does not require any parameters to be passed in the request. + * @param param the request object + */ + public getSystemOverrideInfo(param: ThoughtSpotRestApiGetSystemOverrideInfoRequest = {}, options?: Configuration): Promise { + return this.api.getSystemOverrideInfo( options).toPromise(); + } + + /** + * Version: 9.0.0.cl or later Imports [TML](https://docs.thoughtspot.com/cloud/latest/tml) files into ThoughtSpot. Requires `DATAMANAGEMENT` (**Can manage data**) or `ADMINISTRATION` (**Can administer ThoughtsSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the following Data control privileges may be required: - `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) - `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` (**Can manage data models**) #### Usage guidelines * Import all related objects in a single TML Import API call. For example, Tables that use the same Connection object and Worksheets connected to these Tables. * Include the `fqn` property to distinguish objects that have the same name. For example, if you have multiple Connections or Worksheets with the same name on ThoughtSpot and the Connection or Worksheet referenced in your TML file does not have a unique name to distinguish, it may result in invalid object references. Adding `fqn` helps ThoughtSpot differentiate a Table from another with the same name. We recommend [exporting TML with FQNs](#/http/api-endpoints/metadata/export-metadata-tml) and using these during the import operation. * You can upload multiple TML files at a time. If you import a Worksheet along with Liveboards, Answers, and other dependent objects in a single API call, the imported objects will be immediately available for use. When you import only a Worksheet object, it may take some time for the Worksheet to become available in the ThoughtSpot system. Please wait for a few minutes, and then proceed to create an Answer and Liveboard from the newly imported Worksheet. For more information, see [TML Documentation](https://developers.thoughtspot.com/docs/tml#_import_a_tml). + * @param param the request object + */ + public importMetadataTML(param: ThoughtSpotRestApiImportMetadataTMLRequest, options?: Configuration): Promise> { + return this.api.importMetadataTML(param.importMetadataTMLRequest, options).toPromise(); + } + + /** + * Version: 10.4.0.cl or later Schedules a task to import [TML](https://docs.thoughtspot.com/cloud/latest/tml) files into ThoughtSpot. You can use this API endpoint to process TML objects asynchronously when importing TMLs of large and complex metadata objects into ThoughtSpot. Unlike the synchronous import TML operation, the API processes TML data in the background and returns a task ID, which can be used to check the status of the import task via `/api/rest/2.0/metadata/tml/async/status` API endpoint. Requires `DATAMANAGEMENT` (**Can manage data**) or `ADMINISTRATION` (**Can administer ThoughtsSpot**) privilege, and edit access to the TML objects. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the following Data control privileges may be required: - `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) - `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` (**Can manage data models**) #### Usage guidelines See [Async TML API Documentation](https://developers.thoughtspot.com/docs/tml#_import_tml_objects_asynchronously) for usage guidelines. + * @param param the request object + */ + public importMetadataTMLAsync(param: ThoughtSpotRestApiImportMetadataTMLAsyncRequest, options?: Configuration): Promise { + return this.api.importMetadataTMLAsync(param.importMetadataTMLAsyncRequest, options).toPromise(); + } + + /** + * Version: 9.0.0.cl or later Imports group objects from external databases into ThoughtSpot. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `GROUP_ADMINISTRATION` (**Can manage groups**) privilege is required. During the import operation: * If the specified group is not available in ThoughtSpot, it will be added to ThoughtSpot. * If `delete_unspecified_groups` is set to `true`, the groups not specified in the API request, excluding administrator and system user groups, are deleted. * If the specified groups are already available in ThoughtSpot, the object properties of these groups are modified and synchronized as per the input data in the API request. A successful API call returns the object that represents the changes made in the ThoughtSpot system. + * @param param the request object + */ + public importUserGroups(param: ThoughtSpotRestApiImportUserGroupsRequest, options?: Configuration): Promise { + return this.api.importUserGroups(param.importUserGroupsRequest, options).toPromise(); + } + + /** + * Version: 9.0.0.cl or later Imports user data from external databases into ThoughtSpot. During the user import operation: * If the specified users are not available in ThoughtSpot, the users are created and assigned a default password. Defining a `default_password` in the API request is optional. * If `delete_unspecified_users` is set to `true`, the users not specified in the API request, excluding the `tsadmin`, `guest`, `system` and `su` users, are deleted. * If the specified user objects are already available in ThoughtSpot, the object properties are updated and synchronized as per the input data in the API request. A successful API call returns the object that represents the changes made in the ThoughtSpot system. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `USER_ADMINISTRATION` (**Can manage users**) privilege is required. + * @param param the request object + */ + public importUsers(param: ThoughtSpotRestApiImportUsersRequest, options?: Configuration): Promise { + return this.api.importUsers(param.importUsersRequest, options).toPromise(); + } + + /** + * Version: 9.0.0.cl or later Creates a login session for a ThoughtSpot user with Basic authentication. In Basic authentication method, REST clients log in to ThoughtSpot using `username` and `password` attributes. On a multi-tenant cluster with Orgs, users can pass the ID of the Org in the API request to log in to a specific Org context. **Note**: If Multi-Factor Authentication (MFA) is enabled on your instance, the API login request with basic authentication (`username` and `password` ) returns an error. Contact ThoughtSpot Support for assistance. A successful login returns a session cookie that can be used in your subsequent API requests. + * @param param the request object + */ + public login(param: ThoughtSpotRestApiLoginRequest, options?: Configuration): Promise { + return this.api.login(param.loginRequest, options).toPromise(); + } + + /** + * Version: 9.0.0.cl or later Logs out a user from their current session. + * @param param the request object + */ + public logout(param: ThoughtSpotRestApiLogoutRequest = {}, options?: Configuration): Promise { + return this.api.logout( options).toPromise(); + } + + /** + * Version: 26.3.0.cl or later This API allows the addition or deletion of object level privileges for a set of users and groups, on a set of metadata objects. It provides users to access certain features based on privilege based access control. #### Usage guidelines - Specify the `operation`. The supported operations are: `ADD`, `REMOVE`. - Specify the type of the objects on which the object privileges are being provided in `metadata_type`. Only `LOGICAL_TABLE` metadata type is supported for now. It may be extended for other metadata types in future. - Specify the list of object privilege types in the `object_privilege_types` array. The supported object privilege types are: `SPOTTER_COACHING_PRIVILEGE`. - Specify the identifiers (either GUID or name) for the metadata objects in the `metadata_identifiers` array. - Specify the `type` (`USER` or `USER_GROUP`) and `identifier` (either GUID or name) of the principals to which you want to apply the given operation and given object privileges in the `principals` array. - Ensure using correct Authorization Bearer Token corresponding to specific user & org. #### Example request ```json { \"operation\": \"operation-type\", \"metadata_type\": \"metadata-type\", \"object_privilege_types\": [\"privilege-type-1\", \"privilege-type-2\"], \"metadata_identifiers\": [\"metadata-guid-or-name-1\", \"metadata-guid-or-name-1\"], \"principals\": [ { \"type\": \"type-1\", \"identifier\": \"principal-guid-or-name-1\" }, { \"type\": \"type-2\", \"identifier\": \"principal-guid-or-name-2\" } ] } ``` > ###### Note: > * Only admin users, users with edit access and users with coaching privilege on a given data-model can add or remove principals related to SPOTTER_COACHING_PRIVILEGE + * @param param the request object + */ + public manageObjectPrivilege(param: ThoughtSpotRestApiManageObjectPrivilegeRequest, options?: Configuration): Promise { + return this.api.manageObjectPrivilege(param.manageObjectPrivilegeRequest, options).toPromise(); + } + + /** + * Parameterize fields in metadata objects. Version: 10.9.0.cl or later **Note:** This API endpoint is deprecated and will be removed from ThoughtSpot in a future release. Use [POST /api/rest/2.0/metadata/parameterize-fields](/api/rest/2.0/metadata/parameterize-fields) instead. Allows parameterizing fields in metadata objects in ThoughtSpot. Requires appropriate permissions to modify the metadata object. The API endpoint allows parameterizing the following types of metadata objects: * Logical Tables * Connections * Connection Configs For a Logical Table the field type must be `ATTRIBUTE` and field name can be one of: * databaseName * schemaName * tableName For a Connection or Connection Config, the field type is always `CONNECTION_PROPERTY`. In this case, field_name specifies the exact property of the Connection or Connection Config that needs to be parameterized. For Connection Config, the only supported field name is: * impersonate_user + * @param param the request object + */ + public parameterizeMetadata(param: ThoughtSpotRestApiParameterizeMetadataRequest, options?: Configuration): Promise { + return this.api.parameterizeMetadata(param.parameterizeMetadataRequest, options).toPromise(); + } + + /** + * Parameterize multiple fields of metadata objects. For example [schemaName, databaseName] for LOGICAL_TABLE. Version: 26.5.0.cl or later Allows parameterizing multiple fields of metadata objects in ThoughtSpot. For example, you can parameterize [schemaName, databaseName] for LOGICAL_TABLE. Requires appropriate permissions to modify the metadata object. The API endpoint allows parameterizing the following types of metadata objects: * Logical Tables * Connections * Connection Configs For a Logical Table, the field type must be `ATTRIBUTE` and field names can include: * databaseName * schemaName * tableName For a Connection or Connection Config, the field type is always `CONNECTION_PROPERTY`. In this case, field_names specifies the exact properties of the Connection or Connection Config that need to be parameterized. For Connection Config, supported field names include: * impersonate_user You can parameterize multiple fields at once by providing an array of field names. + * @param param the request object + */ + public parameterizeMetadataFields(param: ThoughtSpotRestApiParameterizeMetadataFieldsRequest, options?: Configuration): Promise { + return this.api.parameterizeMetadataFields(param.parameterizeMetadataFieldsRequest, options).toPromise(); + } + + /** + * Version: 26.5.0.cl or later Allows publishing metadata objects across organizations in ThoughtSpot. Requires ADMINISTRATION role and TENANT scope. The API endpoint allows publishing the following types of metadata objects: * Liveboards * Answers * Logical Tables This API will essentially share the objects along with it\'s dependencies to the org admins of the orgs to which it is being published. + * @param param the request object + */ + public publishMetadata(param: ThoughtSpotRestApiPublishMetadataRequest, options?: Configuration): Promise { + return this.api.publishMetadata(param.publishMetadataRequest, options).toPromise(); + } + + /** + * Update values for a variable Version: 26.4.0.cl or later Allows updating values for a specific variable in ThoughtSpot. Requires ADMINISTRATION role. The CAN_MANAGE_VARIABLES permission allows you to manage Formula Variables in the current organization scope. The API endpoint allows: * Adding new values to the variable * Replacing existing values * Deleting values from the variable * Resetting all values When updating variable values, you need to specify: * The variable identifier (ID or name) * The values to add/replace/remove * The operation to perform (ADD, REPLACE, REMOVE, RESET) Behaviour based on operation type: * ADD - Adds values to the variable if this is a list type variable, else same as replace. * REPLACE - Replaces all values of a given set of constraints with the current set of values. * REMOVE - Removes any values which match the set of conditions of the variables if this is a list type variable, else clears value. * RESET - Removes all constraints for the given variable, scope is ignored + * @param param the request object + */ + public putVariableValues(param: ThoughtSpotRestApiPutVariableValuesRequest, options?: Configuration): Promise { + return this.api.putVariableValues(param.identifier, param.putVariableValuesRequest, options).toPromise(); + } + + /** + * Version: 10.7.0.cl or later **Deprecated** — Use `getRelevantQuestions` instead (available from 10.13.0.cl). Breaks down a topical or goal-oriented natural language question into smaller, actionable analytical sub-questions, each mapped to a relevant data source for independent execution. Requires `CAN_USE_SPOTTER` privilege and at least view-level access to the referenced metadata objects. #### Usage guidelines The request accepts the following parameters: - `nlsRequest`: contains the user `query` to decompose, along with optional `instructions` and `bypassCache` flag - `worksheetIds`: list of data source identifiers to scope the decomposition - `answerIds`: list of Answer GUIDs whose data guides the response - `liveboardIds`: list of Liveboard GUIDs whose data guides the response - `conversationId`: an existing conversation session ID for context continuity - `content`: supplementary text or CSV data to improve response quality - `maxDecomposedQueries`: maximum number of sub-questions to return (default: `5`) If the request is successful, the API returns a `decomposedQueryResponse` containing a list of `decomposedQueries`, each with: - `query`: the generated analytical sub-question - `worksheetId`: the unique ID of the data source the question targets - `worksheetName`: the display name of the corresponding data source #### Error responses | Code | Description | |------|---------------------------------------------------------------------------------------------------------------------------------------| | 401 | Unauthorized — authentication token is missing, expired, or invalid. | | 403 | Forbidden — the authenticated user does not have `CAN_USE_SPOTTER` privilege or lacks view access to the referenced metadata objects. | > ###### Note: > * This endpoint is deprecated since 10.13.0.cl. Use `getRelevantQuestions` for new integrations. > * This endpoint is currently in Beta. Breaking changes may be introduced before the endpoint is made Generally Available. > * This endpoint requires Spotter — please contact ThoughtSpot support to enable Spotter on your cluster. + * @param param the request object + */ + public queryGetDecomposedQuery(param: ThoughtSpotRestApiQueryGetDecomposedQueryRequest, options?: Configuration): Promise { + return this.api.queryGetDecomposedQuery(param.queryGetDecomposedQueryRequest, options).toPromise(); + } + + /** + * Version: 9.0.0.cl or later Resets the password of a user account. Administrators can reset password on behalf of a user. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `USER_ADMINISTRATION` (**Can manage users**) privilege is required. + * @param param the request object + */ + public resetUserPassword(param: ThoughtSpotRestApiResetUserPasswordRequest, options?: Configuration): Promise { + return this.api.resetUserPassword(param.resetUserPasswordRequest, options).toPromise(); + } + + /** + * Version: 9.2.0.cl or later Reverts TML objects to a previous commit specified in the API request. Requires at least edit access to objects. In the API request, specify the `commit_id`. If the branch name is not specified in the request, the API will consider the default branch configured on your instance. By default, the API reverts all objects. If the revert operation fails for one of the objects provided in the commit, the API returns an error and does not revert any object. For more information, see [Git integration documentation](https://developers.thoughtspot.com/docs/git-integration). + * @param param the request object + */ + public revertCommit(param: ThoughtSpotRestApiRevertCommitRequest, options?: Configuration): Promise { + return this.api.revertCommit(param.commitId, param.revertCommitRequest, options).toPromise(); + } + + /** + * Version: 26.2.0.cl or later Revokes OAuth refresh tokens for users who no longer require access to a data warehouse connection. When a token is revoked, the affected user\'s session for that connection is terminated, and they must re-authenticate to regain access. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) or `DATAMANAGEMENT` (**Can manage data**) privileges. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on the ThoughtSpot instance, users with `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) privilege can also make API requests to revoke tokens for connection users. #### Usage guidelines You can specify different combinations of identifiers to control which refresh tokens are revoked. - **connection_identifier**: Revokes refresh tokens for all users of the connection, except the connection author. - **connection_identifier** and **user_identifiers**: Revokes refresh tokens only for the users specified in the request. If the name or ID of the connection author is included in the request, their token will also be revoked. - **connection_identifier** and **configuration_identifiers**: Revokes refresh tokens for all users on the specified configurations, except the configuration author. - **connection_identifier**, **configuration_identifiers**, and **user_identifiers**: Revokes refresh tokens for the specified users on the specified configurations. - **connection_identifier** and **org_identifiers**: Revokes refresh tokens for the specified Orgs. Applicable only for published connections. - **connection_identifier**, **org_identifiers**, and **user_identifiers**: Revokes refresh tokens for the specified users in the specified Orgs. Applicable only for published connections. **NOTE**: The `org_identifiers` parameter is only applicable for published connections. Using this parameter for unpublished connections will result in an error. Ensure that the connections are published before making the API request. + * @param param the request object + */ + public revokeRefreshTokens(param: ThoughtSpotRestApiRevokeRefreshTokensRequest, options?: Configuration): Promise { + return this.api.revokeRefreshTokens(param.connectionIdentifier, param.revokeRefreshTokensRequest, options).toPromise(); + } + + /** + * Version: 9.0.0.cl or later Revokes the authentication token issued for current user session. The token of your current session expires when you make a call to the `/api/rest/2.0/auth/token/revoke` endpoint. the users will not be able to access ThoughtSpot objects until a new token is obtained. To restart your session, request for a new token from ThoughtSpot. See [Get Full Access Token](#/http/api-endpoints/authentication/get-full-access-token). + * @param param the request object + */ + public revokeToken(param: ThoughtSpotRestApiRevokeTokenRequest, options?: Configuration): Promise { + return this.api.revokeToken(param.revokeTokenRequest, options).toPromise(); + } + + /** + * Version: 26.6.0.cl or later Returns the authentication configuration for the specified auth type at cluster and org level. Currently supports `TRUSTED_AUTH`. #### Required privileges Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) or `CONTROL_TRUSTED_AUTH` (**Can Enable or Disable Trusted Authentication**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled, the `CONTROL_TRUSTED_AUTH` privilege is required. #### Usage guidelines Use `scope` to control which level of settings are returned: - `CLUSTER` — Returns cluster-level authentication status and access tokens. Accessible only from the Primary Org. - `ORG` — Returns org-level authentication status and access tokens for the current Org. Requires the per-Org authentication feature to be enabled on your instance. - If `scope` is omitted, both cluster and org-level settings are returned based on the caller\'s org context and feature availability. The `access_tokens` array in `cluster_preferences` or `org_preferences` is omitted when no token is configured at that level. **Note**: Access tokens returned in the response are sensitive credentials. Treat them with the same care as passwords. + * @param param the request object + */ + public searchAuthSettings(param: ThoughtSpotRestApiSearchAuthSettingsRequest, options?: Configuration): Promise { + return this.api.searchAuthSettings(param.searchAuthSettingsRequest, options).toPromise(); + } + + /** + * Version: 10.12.0.cl or later Gets a list of [custom calendars](https://docs.thoughtspot.com/cloud/latest/connections-cust-cal). Requires `DATAMANAGEMENT` (**Can manage data**) or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your ThoughtSpot instance, the `CAN_MANAGE_CUSTOM_CALENDAR` (**Can manage custom calendars**) privilege is required. #### Usage guidelines By default, the API returns a list of custom calendars for all connection objects. To retrieve custom calendar details for a particular connection, specify the connection ID. You can also use other search parameters such as `name_pattern` and `sort_options` as search filters. The `name_pattern` parameter filters and returns only those objects that match the specified pattern. Use `%` as a wildcard for pattern matching. + * @param param the request object + */ + public searchCalendars(param: ThoughtSpotRestApiSearchCalendarsRequest, options?: Configuration): Promise> { + return this.api.searchCalendars(param.searchCalendarsRequest, options).toPromise(); + } + + /** + * Version: 26.4.0.cl or later Searches delivery history for communication channels such as webhooks. Returns channel-level delivery status for each job execution record. Use this to monitor channel health and delivery success rates across events. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) or `DEVELOPER` (**Has developer privilege**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, users with `CAN_MANAGE_WEBHOOKS` (**Can manage webhooks**) privilege are also authorized to perform this action. **NOTE**: When `channel_type` is `WEBHOOK`, the following constraints apply: - `job_ids`, `channel_identifiers`, and `events` each accept at most one element. - When `job_ids` is provided, it is used as the sole lookup key and other filter fields are ignored. - When `job_ids` is not provided, `channel_identifiers` and `events` are both required, each containing exactly one element. - Records older than the configured retention period are not returned. - Use `start_epoch_time_in_millis` and/or `end_epoch_time_in_millis` to narrow results to a specific time window. + * @param param the request object + */ + public searchChannelHistory(param: ThoughtSpotRestApiSearchChannelHistoryRequest, options?: Configuration): Promise { + return this.api.searchChannelHistory(param.searchChannelHistoryRequest, options).toPromise(); + } + + /** + * Version: 26.4.0.cl or later Gets a list of collections available in ThoughtSpot. To get details of a specific collection, specify the collection GUID or name. You can also filter the API response based on the collection name pattern, author, and other criteria. #### Search options * **name_pattern**: Use \'%\' as a wildcard character to match collection names * **collection_identifiers**: Search for specific collections by their GUIDs or names * **include_metadata**: When set to `true`, includes the metadata objects within each collection in the response **NOTE**: If the API returns an empty list, consider increasing the value of the `record_size` parameter. To search across all available collections, set `record_size` to `-1`. + * @param param the request object + */ + public searchCollections(param: ThoughtSpotRestApiSearchCollectionsRequest, options?: Configuration): Promise { + return this.api.searchCollections(param.searchCollectionsRequest, options).toPromise(); + } + + /** + * Version: 9.2.0.cl or later Gets a list of commits for a given metadata object. Requires `DATAMANAGEMENT` (**Can manage data**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance on your instance, the `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` (**Can manage data models**) privilege and edit access to the metadata objects. + * @param param the request object + */ + public searchCommits(param: ThoughtSpotRestApiSearchCommitsRequest, options?: Configuration): Promise> { + return this.api.searchCommits(param.searchCommitsRequest, options).toPromise(); + } + + /** + * Version: 10.14.0.cl or later Fetch communication channel preferences. - Use `cluster_preferences` to fetch the default preferences for your ThoughtSpot application instance. - If your instance has [Orgs](https://docs.thoughtspot.com/cloud/latest/orgs-overview), use `org_preferences` to fetch any Org-specific preferences that override the defaults. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) or `DEVELOPER` (**Has developer privilege**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, users with `APPLICATION_ADMINISTRATION` (**Can manage application settings**) privilege are also authorized to perform this action. + * @param param the request object + */ + public searchCommunicationChannelPreferences(param: ThoughtSpotRestApiSearchCommunicationChannelPreferencesRequest, options?: Configuration): Promise { + return this.api.searchCommunicationChannelPreferences(param.searchCommunicationChannelPreferencesRequest, options).toPromise(); + } + + /** + * Version: 9.2.0.cl or later Gets Git repository connections configured on the ThoughtSpot instance. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance on your instance, the `CAN_SETUP_VERSION_CONTROL` (**Can set up version control**) privilege. + * @param param the request object + */ + public searchConfig(param: ThoughtSpotRestApiSearchConfigRequest, options?: Configuration): Promise> { + return this.api.searchConfig(param.searchConfigRequest, options).toPromise(); + } + + /** + * Version: 9.2.0.cl or later Gets connection objects. Requires `DATAMANAGEMENT` (**Can manage data**) or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) privilege is required. - To get a list of all connections available in the ThoughtSpot system, send the API request without any attributes in the request body. - To get the connection objects for a specific type of data warehouse, specify the type in `data_warehouse_types`. - To fetch details of a connection object, specify the connection object GUID or name. The `name_pattern` attribute allows passing partial text with `%` for a wildcard match. - To get details of the database, schemas, tables, or columns from a data connection object, specify `data_warehouse_object_type`. - To get a specific database, schema, table, or column from a connection object, define the object type in `data_warehouse_object_type` and object properties in the `data_warehouse_objects` array. For example, to search for a column, you must pass the database, schema, and table names in the API request. Note that in the following example, object properties are set in a hierarchical order (`database` > `schema` > `table` > `column`). ``` { \"connections\": [ { \"identifier\": \"b9d1f2ef-fa65-4a4b-994e-30fa2d57b0c2\", \"data_warehouse_objects\": [ { \"database\": \"NEBULADEV\", \"schema\": \"INFORMATION_SCHEMA\", \"table\": \"APPLICABLE_ROLES\", \"column\": \"ROLE_NAME\" } ] } ], \"data_warehouse_object_type\": \"COLUMN\" } ``` - To fetch data by `configuration`, specify `data_warehouse_object_type`. For example, to fetch columns from the `DEVELOPMENT` database, specify the `data_warehouse_object_type` as `DATABASE` and define the `configuration` string as `{\"database\":\"DEVELOPMENT\"}`. To get column data for a specific table, specify the table, for example,`{\"database\":\"RETAILAPPAREL\",\"table\":\"PIPES\"}`. - To query connections by `authentication_type`, specify `data_warehouse_object_type`. Supported values for `authentication_type` are: - `SERVICE_ACCOUNT`: For connections that require service account credentials to authenticate to the Cloud Data Warehouse and fetch data. - `OAUTH`: For connections that require OAuth credentials to authenticate to the Cloud Data Warehouse and fetch data. Teradata, Oracle, and Presto Cloud Data Warehouses do not support the OAuth authentication type. - `IAM`: For connections that have the IAM OAuth set up. This authentication type is supported on Amazon Redshift connections only. - `EXTOAUTH`: For connections that have External OAuth set up. ThoughtSpot supports external [OAuth with Microsoft Azure Active Directory (AD)](https://docs.thoughtspot.com/cloud/latest/ connections-snowflake-azure-ad-oauth) and [Okta for Snowflake data connections](https://docs.thoughtspot.com/cloud/latest/connections-snowflake-okta-oauth). - `KEY_PAIR`: For connections that require Key Pair account credentials to authenticate to the Cloud Data Warehouse and fetch data. This authentication type is supported on Snowflake connections only. - `OAUTH_WITH_PKCE`: For connections that require OAuth with PKCE account credentials to authenticate to the Cloud Data Warehouse and fetch data. This authentication type is supported on Snowflake, Starburst, Databricks, Denodo connections only. - `EXTOAUTH_WITH_PKCE`: For connections that require External OAuth With PKCE account credentials to authenticate to the Cloud Data Warehouse and fetch data. This authentication type is supported on Snowflake connections only. - `OAUTH_WITH_PEZ`: For connections that require OAuth With PEZ account credentials to authenticate to the Cloud Data Warehouse and fetch data. This authentication type is supported on Amazon Redshift connections only. - `OAUTH_WITH_SERVICE_PRINCIPAL`: For connections that require OAuth With Service Principal account credentials to authenticate to the Cloud Data Warehouse and fetch data. This authentication type is supported on Databricks connections only. - `PERSONAL_ACCESS_TOKEN`: For connections that require Personal Access Token account credentials to authenticate to the Cloud Data Warehouse and fetch data. This authentication type is supported on Databricks connections only. - `OAUTH_CLIENT_CREDENTIALS`: For connections that require OAuth Client Credentials to authenticate to the Cloud Data Warehouse and fetch data. This authentication type is supported on Snowflake connections only. - To include more details about connection objects in the API response, set `include_details` to `true`. - You can also sort the output by field names and filter connections by tags. **NOTE**: When filtering connection records by parameters other than `data_warehouse_types` or `tag_identifiers`, ensure that you set `record_size` to `-1` and `record_offset` to `0` for precise results. + * @param param the request object + */ + public searchConnection(param: ThoughtSpotRestApiSearchConnectionRequest, options?: Configuration): Promise> { + return this.api.searchConnection(param.searchConnectionRequest, options).toPromise(); + } + + /** + * Version: 9.6.0.cl or later Gets custom actions configured on the cluster. Requires `DEVELOPER` (**Has Developer privilege**) or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `DEVELOPER` (**Has developer privilege**) privilege is required. + * @param param the request object + */ + public searchCustomActions(param: ThoughtSpotRestApiSearchCustomActionsRequest, options?: Configuration): Promise> { + return this.api.searchCustomActions(param.searchCustomActionsRequest, options).toPromise(); + } + + /** + * Version: 9.0.0.cl or later Generates an Answer from a given data source. Requires at least view access to the data source object (Worksheet or View). #### Usage guidelines To search data, specify the data source GUID in `logical_table_identifier`. The data source can be a Worksheet, View, Table, or SQL view. Pass search tokens in the `query_string` attribute in the API request as shown in the following example: ``` { \"query_string\": \"[sales] by [store]\", \"logical_table_identifier\": \"cd252e5c-b552-49a8-821d-3eadaa049cca\", } ``` For more information about the `query_string` format and data source attribute, see [Search data API](https://developers.thoughtspot.com/docs/fetch-data-and-report-apis#_search_data_api). The `record_size` attribute determines the number of records to retrieve in an API call. For more information about pagination, record size, and maximum row limit, see [Pagination and record size settings](https://developers.thoughtspot.com/docs/fetch-data-and-report-apis#_pagination_settings_for_data_and_report_api). + * @param param the request object + */ + public searchData(param: ThoughtSpotRestApiSearchDataRequest, options?: Configuration): Promise { + return this.api.searchData(param.searchDataRequest, options).toPromise(); + } + + /** + * Version: 10.10.0.cl or later Search the email customization configuration if any set for the ThoughtSpot system. #### Pre-requisites Requires `DEVELOPER` (**has developer privilege**) or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `DEVELOPER` (**Has developer privilege**) privilege is required. **NOTE**:This endpoint in currently in beta. Contact ThoughtSpot support to enable this on your instance. + * @param param the request object + */ + public searchEmailCustomization(param: ThoughtSpotRestApiSearchEmailCustomizationRequest, options?: Configuration): Promise> { + return this.api.searchEmailCustomization(param.searchEmailCustomizationRequest, options).toPromise(); + } + + /** + * Version: 9.0.0.cl or later Gets a list of metadata objects available on the ThoughtSpot system. This API endpoint is available to all users who have view access to the object. Users with `ADMINISTRATION` (**Can administer ThoughtSpot**) privileges can view data for all metadata objects, including users and groups. #### Usage guidelines - To get all metadata objects, send the API request without any attributes. - To get metadata objects of a specific type, set the `type` attribute. For example, to fetch a Worksheet, set the type as `LOGICAL_TABLE`. - To filter metadata objects within type `LOGICAL_TABLE`, set the `subtypes` attribute. For example, to fetch a Worksheet, set the type as `LOGICAL_TABLE` & subtypes as `[WORKSHEET]`. - To get a specific metadata object, specify the GUID. - To customize your search and filter the API response, you can use several parameters. You can search for objects created or modified by specific users, by tags applied to the objects, or by using the include parameters like `include_auto_created_objects`, `include_dependent_objects`, `include_headers`, `include_incomplete_objects`, and so on. You can also define sorting options to sort the data retrieved in the API response. - To get discoverable objects when linientmodel is enabled you can use `include_discoverable_objects` as true else false. Default value is true. - For liveboard metadata type, to get the newer format, set the `liveboard_response_format` as V2. Default value is V1. - To retrieve only objects that are published, set the `include_only_published_objects` as true. Default value is false. **NOTE**: The following parameters support pagination of metadata records: - `tag_identifiers` - `type` - `subtypes` - `created_by_user_identifiers` - `modified_by_user_identifiers` - `owned_by_user_identifiers` - `exclude_objects` - `include_auto_created_objects` - `favorite_object_options` - `include_only_published_objects` If you are using other parameters to search metadata, set `record_size` to `-1` and `record_offset` to `0`. + * @param param the request object + */ + public searchMetadata(param: ThoughtSpotRestApiSearchMetadataRequest, options?: Configuration): Promise> { + return this.api.searchMetadata(param.searchMetadataRequest, options).toPromise(); + } + + /** + * Version: 9.0.0.cl or later Gets a list of Orgs configured on the ThoughtSpot system. To get details of a specific Org, specify the Org ID or name. You can also pass parameters such as status, visibility, and user identifiers to get a specific list of Orgs. Requires cluster administration (**Can administer Org**) privileges. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `ORG_ADMINISTRATION` (**Can manage Orgs**) privilege is required. + * @param param the request object + */ + public searchOrgs(param: ThoughtSpotRestApiSearchOrgsRequest, options?: Configuration): Promise> { + return this.api.searchOrgs(param.searchOrgsRequest, options).toPromise(); + } + + /** + * Version: 9.5.0.cl or later Gets a list of Role objects from the ThoughtSpot system. Available if [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance. To search for Roles, the `ROLE_ADMINISTRATION` (**Can manage roles**) privilege is required. To get details of a specific Role object, specify the GUID or name. You can also filter the API response based on user group and Org identifiers, privileges assigned to the Role, and deprecation status. + * @param param the request object + */ + public searchRoles(param: ThoughtSpotRestApiSearchRolesRequest, options?: Configuration): Promise> { + return this.api.searchRoles(param.searchRolesRequest, options).toPromise(); + } + + /** + * Search Schedules Version: 9.4.0.cl or later Gets a list of scheduled jobs configured for a Liveboard. To get details of a specific scheduled job, specify the name or GUID of the scheduled job. Requires at least view access to Liveboards. **NOTE**: When filtering schedules by parameters other than `metadata`, set `record_size` to `-1` and `record_offset` to `0` for accurate results. + * @param param the request object + */ + public searchSchedules(param: ThoughtSpotRestApiSearchSchedulesRequest, options?: Configuration): Promise> { + return this.api.searchSchedules(param.searchSchedulesRequest, options).toPromise(); + } + + /** + * Version: 26.2.0.cl or later Fetch security settings for your ThoughtSpot application instance. - Use `scope: CLUSTER` to retrieve cluster-level security settings, including CORS and CSP allowlists, SAML redirect URLs, and settings that control access to non-embedded pages. - Use `scope: ORG` to retrieve Org-level security settings. If your instance has [Orgs](https://docs.thoughtspot.com/cloud/latest/orgs-overview), this returns CORS and non-embed access settings specific to the Org. - If `scope` is not specified, returns both cluster and Org-specific settings based on user privileges. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) or `DEVELOPER` (**Has developer privilege**) privilege. See [Security Settings](https://developers.thoughtspot.com/docs/security-settings) for more details. + * @param param the request object + */ + public searchSecuritySettings(param: ThoughtSpotRestApiSearchSecuritySettingsRequest, options?: Configuration): Promise { + return this.api.searchSecuritySettings(param.searchSecuritySettingsRequest, options).toPromise(); + } + + /** + * Version: 9.0.0.cl or later Gets a list of tag objects available on the ThoughtSpot system. To get details of a specific tag object, specify the GUID or name. Any authenticated user can search for tag objects. + * @param param the request object + */ + public searchTags(param: ThoughtSpotRestApiSearchTagsRequest, options?: Configuration): Promise> { + return this.api.searchTags(param.searchTagsRequest, options).toPromise(); + } + + /** + * Version: 9.0.0.cl or later Gets a list of user group objects from the ThoughtSpot system. To get details of a specific user group, specify the user group GUID or name. You can also filter the API response based on User ID, Org ID, Role ID, type of group, sharing visibility, privileges assigned to the group, and the Liveboard IDs assigned to the users in the group. Available to all users. Users with `ADMINISTRATION` (**Can administer ThoughtSpot**) privileges can view all users properties. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `GROUP_ADMINISTRATION` (**Can manage groups**) privilege is required. **NOTE**: If you do not get precise results, try setting `record_size` to `-1` and `record_offset` to `0`. + * @param param the request object + */ + public searchUserGroups(param: ThoughtSpotRestApiSearchUserGroupsRequest, options?: Configuration): Promise> { + return this.api.searchUserGroups(param.searchUserGroupsRequest, options).toPromise(); + } + + /** + * Version: 9.0.0.cl or later Gets a list of users available on the ThoughtSpot system. To get details of a specific user, specify the user GUID or name. You can also filter the API response based on groups, Org ID, user visibility, account status, user type, and user preference settings and favorites. Available to all users. Users with `ADMINISTRATION` (**Can administer ThoughtSpot**) privileges can view all users properties. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `USER_ADMINISTRATION` (**Can manage users**) privilege is required. **NOTE**: If the API returns an empty list, consider increasing the value of the `record_size` parameter. To search across all available users, set `record_size` to `-1`. + * @param param the request object + */ + public searchUsers(param: ThoughtSpotRestApiSearchUsersRequest, options?: Configuration): Promise> { + return this.api.searchUsers(param.searchUsersRequest, options).toPromise(); + } + + /** + * Search variables Version: 26.4.0.cl or later Allows searching for variables in ThoughtSpot. Requires ADMINISTRATION role. The CAN_MANAGE_VARIABLES permission allows you to manage Formula Variables in the current organization scope. The API endpoint supports searching variables by: * Variable identifier (ID or name) * Variable type * Name pattern (case-insensitive, supports % for wildcard) The search results can be formatted in three ways: * METADATA - Returns only variable metadata (default) * METADATA_AND_VALUES - Returns variable metadata and values The values can be filtered by scope: * org_identifier * principal_identifier * model_identifier + * @param param the request object + */ + public searchVariables(param: ThoughtSpotRestApiSearchVariablesRequest, options?: Configuration): Promise> { + return this.api.searchVariables(param.searchVariablesRequest, options).toPromise(); + } + + /** + * Version: 10.14.0.cl or later Searches for webhook configurations based on various criteria such as Org, webhook identifier, event type, with support for pagination and sorting. Returns matching webhook configurations with their complete details. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) or `DEVELOPER` (**Has developer privilege**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, users with `CAN_MANAGE_WEBHOOKS` (**Can manage webhooks**) privilege are also authorized to perform this action. + * @param param the request object + */ + public searchWebhookConfigurations(param: ThoughtSpotRestApiSearchWebhookConfigurationsRequest, options?: Configuration): Promise { + return this.api.searchWebhookConfigurations(param.searchWebhookConfigurationsRequest, options).toPromise(); + } + + /** + * Version: 26.5.0.cl or later Sends natural language messages to an existing Spotter agent conversation and returns the complete response synchronously. Requires `CAN_USE_SPOTTER` privilege and access to the metadata object associated with the conversation. The user must have access to the conversation session referenced by `conversation_identifier`. A conversation must first be created using the `createAgentConversation` API. #### Usage guidelines The request must include: - `conversation_identifier`: the unique session ID returned by `createAgentConversation`, used for context continuity and message tracking - `messages`: an array of one or more text messages to send to the agent The API returns an array of response objects, each containing: - `type`: the kind of response — `text`, `answer`, or `error` - `message`: the main content of the response - `metadata`: additional information depending on the message type (e.g., answer metadata includes analytics and visualization details) #### Error responses | Code | Description | |------|----------------------------------------------------------------------------------------------------------------------------------| | 401 | Unauthorized — authentication token is missing, expired, or invalid. | | 403 | Forbidden — the authenticated user does not have `CAN_USE_SPOTTER` privilege or lacks permission on the referenced conversation. | > ###### Note: > > - This endpoint is Generally Available from version 26.5.0.cl. > - This endpoint requires Spotter - please contact ThoughtSpot support to enable Spotter on your cluster. > - For real-time streamed responses, use `sendAgentConversationMessageStreaming` instead. + * @param param the request object + */ + public sendAgentConversationMessage(param: ThoughtSpotRestApiSendAgentConversationMessageRequest, options?: Configuration): Promise { + return this.api.sendAgentConversationMessage(param.conversationIdentifier, param.sendAgentConversationMessageRequest, options).toPromise(); + } + + /** + * Version: 26.5.0.cl or later Sends one or more natural language messages to an existing Spotter agent conversation and returns the response as a real-time Server-Sent Events stream. Requires `CAN_USE_SPOTTER` privilege and access to the metadata object associated with the conversation. The user must have access to the conversation session referenced by `conversation_identifier`. A conversation must first be created using the `createAgentConversation` API. #### Usage guidelines The request must include: - `conversation_identifier`: the unique session ID returned by `createAgentConversation`, used for context continuity and message tracking - `messages`: an array of one or more text messages to send to the agent If the request is valid, the API returns a Server-Sent Events (SSE) stream. Each line has the form `data: [{\"type\": \"...\", ...}]` — a JSON array of event objects. Event types include: - `ack`: confirms receipt of the request (`node_id`) - `conv_title`: conversation title (`title`, `conv_id`) - `notification`: status updates on operations (`group_id`, `metadata`, `code` — e.g. `TOOL_CALL_NOTIFICATION`, `nls_start`, `FINAL_RESPONSE_NOTIFICATION`) - `text-chunk`: incremental content chunks (`id`, `group_id`, `metadata` with `format` and `type` such as `thinking` or `text`, `content`) - `text`: full text block with same structure as `text-chunk` - `answer`: structured answer with metadata (`id`, `group_id`, `metadata` with `sage_query`, `session_id`, `title`, etc., `title`) - `error`: if a failure occurs #### Error responses | Code | Description | | ---- | -------------------------------------------------------------------------------------------------------------------------------- | | 401 | Unauthorized — authentication token is missing, expired, or invalid. | | 403 | Forbidden — the authenticated user does not have `CAN_USE_SPOTTER` privilege or lacks permission on the referenced conversation. | > ###### Note: > > - This endpoint is Generally Available from version 26.5.0.cl. > - This endpoint requires Spotter - please contact ThoughtSpot support to enable Spotter on your cluster. > - The streaming protocol uses Server-Sent Events (SSE). > - For the complete response in a single payload, use `sendAgentConversationMessage` instead. + * @param param the request object + */ + public sendAgentConversationMessageStreaming(param: ThoughtSpotRestApiSendAgentConversationMessageStreamingRequest, options?: Configuration): Promise { + return this.api.sendAgentConversationMessageStreaming(param.conversationIdentifier, param.sendAgentConversationMessageStreamingRequest, options).toPromise(); + } + + /** + * Version: 26.2.0.cl or later **Deprecated** — Use `sendAgentConversationMessage` instead. Send natural language messages to an existing Spotter agent conversation and returns the complete response synchronously. Requires `CAN_USE_SPOTTER` privilege and access to the metadata object associated with the conversation. The user must have access to the conversation session referenced by `conversation_identifier`. A conversation must first be created using the `createAgentConversation` API. #### Usage guidelines The request must include: - `conversation_identifier`: the unique session ID returned by `createAgentConversation`, used for context continuity and message tracking - `messages`: an array of one or more text messages to send to the agent The API returns an array of response objects, each containing: - `type`: the kind of response — `text`, `answer`, or `error` - `message`: the main content of the response - `metadata`: additional information depending on the message type (e.g., answer metadata includes analytics and visualization details) #### Error responses | Code | Description | |------|----------------------------------------------------------------------------------------------------------------------------------| | 401 | Unauthorized — authentication token is missing, expired, or invalid. | | 403 | Forbidden — the authenticated user does not have `CAN_USE_SPOTTER` privilege or lacks permission on the referenced conversation. | > ###### Note: > > - This endpoint is deprecated. Use `sendAgentConversationMessage` for new integrations. > - This endpoint is currently in Beta. Breaking changes may be introduced before the endpoint is made Generally Available. > - This endpoint requires Spotter - please contact ThoughtSpot support to enable Spotter on your cluster. + * @param param the request object + */ + public sendAgentMessage(param: ThoughtSpotRestApiSendAgentMessageRequest, options?: Configuration): Promise { + return this.api.sendAgentMessage(param.conversationIdentifier, param.sendAgentMessageRequest, options).toPromise(); + } + + /** + * Version: 26.2.0.cl or later **Deprecated** — Use `sendAgentConversationMessageStreaming` instead. Sends one or more natural language messages to an existing Spotter agent conversation and returns the response as a real-time Server-Sent Events stream. Requires `CAN_USE_SPOTTER` privilege and access to the metadata object associated with the conversation. The user must have access to the conversation session referenced by `conversation_identifier`. A conversation must first be created using the `createAgentConversation` API. #### Usage guidelines The request must include: - `conversation_identifier`: the unique session ID returned by `createAgentConversation`, used for context continuity and message tracking - `messages`: an array of one or more text messages to send to the agent If the request is valid, the API returns a Server-Sent Events (SSE) stream. Each line has the form `data: [{\"type\": \"...\", ...}]` — a JSON array of event objects. Event types include: - `ack`: confirms receipt of the request (`node_id`) - `conv_title`: conversation title (`title`, `conv_id`) - `notification`: status updates on operations (`group_id`, `metadata`, `code` — e.g. `TOOL_CALL_NOTIFICATION`, `nls_start`, `FINAL_RESPONSE_NOTIFICATION`) - `text-chunk`: incremental content chunks (`id`, `group_id`, `metadata` with `format` and `type` such as `thinking` or `text`, `content`) - `text`: full text block with same structure as `text-chunk` - `answer`: structured answer with metadata (`id`, `group_id`, `metadata` with `sage_query`, `session_id`, `title`, etc., `title`) - `error`: if a failure occurs #### Error responses | Code | Description | |------|----------------------------------------------------------------------------------------------------------------------------------| | 401 | Unauthorized — authentication token is missing, expired, or invalid. | | 403 | Forbidden — the authenticated user does not have `CAN_USE_SPOTTER` privilege or lacks permission on the referenced conversation. | > ###### Note: > > - This endpoint is deprecated. Use `sendAgentConversationMessageStreaming` for new integrations. > - This endpoint is currently in Beta. Breaking changes may be introduced before the endpoint is made Generally Available. > - This endpoint requires Spotter - please contact ThoughtSpot support to enable Spotter on your cluster. > - The streaming protocol uses Server-Sent Events (SSE). + * @param param the request object + */ + public sendAgentMessageStreaming(param: ThoughtSpotRestApiSendAgentMessageStreamingRequest, options?: Configuration): Promise { + return this.api.sendAgentMessageStreaming(param.sendAgentMessageStreamingRequest, options).toPromise(); + } + + /** + * Version: 10.4.0.cl or later Sends a follow-up message to an existing conversation within the context of a data model. Requires `CAN_USE_SPOTTER` privilege and at least view access to the metadata object specified in the request. A conversation must first be created using the `createConversation` API. #### Usage guidelines The request must include: - `conversation_identifier`: the unique session ID returned by `createConversation` - `metadata_identifier`: the unique ID of the data source used for the conversation - `message`: a natural language string with the follow-up question If the request is successful, the API returns an array of response messages, each containing: - `session_identifier`: the unique ID of the generated response - `generation_number`: the generation number of the response - `message_type`: the type of the response (e.g., `TSAnswer`) - `visualization_type`: the generated visualization type (`Chart`, `Table`, or `Undefined`) - `tokens` / `display_tokens`: the search tokens and user-friendly display tokens for the response #### Error responses | Code | Description | |------|-----------------------------------------------------------------------------------------------------------------------------------------| | 401 | Unauthorized — authentication token is missing, expired, or invalid. | | 403 | Forbidden — the authenticated user does not have `CAN_USE_SPOTTER` privilege or lacks view permission on the specified metadata object. | > ###### Note: > * This endpoint is currently in Beta. Breaking changes may be introduced before the endpoint is made Generally Available. > * This endpoint requires Spotter - please contact ThoughtSpot support to enable Spotter on your cluster. + * @param param the request object + */ + public sendMessage(param: ThoughtSpotRestApiSendMessageRequest, options?: Configuration): Promise> { + return this.api.sendMessage(param.conversationIdentifier, param.sendMessageRequest, options).toPromise(); + } + + /** + * Version: 10.15.0.cl or later This API allows users to set natural language (NL) instructions for a specific data-model to improve AI-generated answers and query processing. These instructions help guide the AI system to better understand the data context and provide more accurate responses. Requires `CAN_USE_SPOTTER` privilege, either edit access or `SPOTTER_COACHING_PRIVILEGE` on the data model, and a bearer token corresponding to the org where the data model exists. #### Usage guidelines To set NL instructions for a data-model, the request must include: - `data_source_identifier`: The unique ID of the data-model for which to set NL instructions - `nl_instructions_info`: An array of instruction objects, each containing: - `instructions`: Array of text instructions for the LLM - `scope`: The scope of the instruction (`GLOBAL`). Currently only `GLOBAL` is supported. It can be extended to data-model-user scope in future. #### Instructions scope - **GLOBAL**: instructions that apply to all users querying this data model If the request is successful, the API returns: - `success`: a boolean indicating whether the operation completed successfully #### Error responses | Code | Description | |------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| | 401 | Unauthorized — authentication token is missing, expired, or invalid. | | 403 | Forbidden — the authenticated user does not have `CAN_USE_SPOTTER` privilege, lacks edit access or `SPOTTER_COACHING_PRIVILEGE` on the data model, or the bearer token does not correspond to the org where the data model exists. | > ###### Note: > > - To use this API, the user needs either edit access or `SPOTTER_COACHING_PRIVILEGE` on the data model, and must use the bearer token corresponding to the org where the data model exists. > - This endpoint is currently in Beta. Breaking changes may be introduced before the endpoint is made Generally Available. > - Available from version 10.15.0.cl and later. > - This endpoint requires Spotter — please contact ThoughtSpot Support to enable Spotter on your cluster. > - Instructions help improve the accuracy and relevance of AI-generated responses for the specified data-model. + * @param param the request object + */ + public setNLInstructions(param: ThoughtSpotRestApiSetNLInstructionsRequest, options?: Configuration): Promise { + return this.api.setNLInstructions(param.setNLInstructionsRequest, options).toPromise(); + } + + /** + * Version: 9.0.0.cl or later Allows sharing one or several metadata objects with users and groups in ThoughtSpot. Requires edit access to the metadata object. #### Supported metadata objects: * Liveboards * Visualizations * Answers * Models * Views * Connections * Collections #### Object permissions You can provide `READ_ONLY` or `MODIFY` access when sharing an object with another user or group. The `READ_ONLY` permission grants view access to the shared object, whereas `MODIFY` provides edit access. To prevent a user or group from accessing the shared object, specify the GUID or name of the principal and set `shareMode` to `NO_ACCESS`. #### Sharing a visualization * Sharing a visualization implicitly shares the entire Liveboard with the recipient. * Object permissions set for a shared visualization also apply to the Liveboard unless overridden by another API request or via UI. * If email notifications for object sharing are enabled, a notification with a link to the shared visualization will be sent to the recipient’s email address. Although this link opens the shared visualization, recipients can also access other visualizations in the Liveboard. #### Sharing a collection Collections support **dual permissions** that provide fine-grained control: * **Collection permissions** (`share_mode`) - controls access to the collection itself (view, edit, delete the collection) * **Content permissions** (`content_share_mode`) - controls access to objects within the collection (view, edit objects inside) **Default Behavior:** - If only `share_mode` is specified, the content permissions default to `READ_ONLY` (except when `share_mode` is `NO_ACCESS`, then content also gets `NO_ACCESS`) - To give users edit access to collection contents, explicitly set `content_share_mode: \"MODIFY\"` ## Examples The following JSON examples can be copy-pasted as request bodies for the REST v2 API endpoint: ```bash POST /callosum/v1/v2/security/metadata/share Content-Type: application/x-www-form-urlencoded ``` ### Basic collection sharing Share a collection with read-only access: ```json { \"metadata_type\": \"COLLECTION\", \"metadata_identifiers\": [\"Sales Reports Collection\"], \"permissions\": [{ \"principal\": { \"type\": \"USER\", \"identifier\": \"alice@company.com\" }, \"share_mode\": \"READ_ONLY\" }], \"notification\": { \"message\": \"I\'ve shared the Sales Reports collection with you\", \"notify_on_share\": true } } ``` ### Collection sharing with dual permissions Share a collection with different permissions for the collection vs. its contents: ```json { \"metadata_type\": \"COLLECTION\", \"metadata_identifiers\": [\"Marketing Analytics\"], \"permissions\": [{ \"principal\": { \"type\": \"USER\", \"identifier\": \"bob@company.com\" }, \"share_mode\": \"MODIFY\", \"content_share_mode\": \"READ_ONLY\" }, { \"principal\": { \"type\": \"USER_GROUP\", \"identifier\": \"Marketing Team\" }, \"share_mode\": \"READ_ONLY\", \"content_share_mode\": \"READ_ONLY\" }], \"notification\": { \"emails\": [\"bob@company.com\"], \"message\": \"You can edit the collection but content is read-only\", \"enable_custom_url\": false, \"notify_on_share\": true }, \"has_lenient_discoverability\": false } ``` ### Multiple collections sharing Share multiple collections with different users: ```json { \"metadata\": [ { \"type\": \"COLLECTION\", \"identifier\": \"Q4 Reports\" }, { \"type\": \"COLLECTION\", \"identifier\": \"Executive Dashboard Collection\" } ], \"permissions\": [{ \"principal\": { \"type\": \"USER_GROUP\", \"identifier\": \"Executives\" }, \"share_mode\": \"MODIFY\" }, { \"principal\": { \"type\": \"USER\", \"identifier\": \"manager@company.com\" }, \"share_mode\": \"READ_ONLY\", \"content_share_mode\": \"MODIFY\" }], \"notification\": { \"message\": \"Sharing quarterly collections with leadership team\", \"notify_on_share\": true } } ``` ### Remove collection access Remove access to a collection by setting share_mode to NO_ACCESS: ```json { \"metadata_type\": \"COLLECTION\", \"metadata_identifiers\": [\"Confidential Reports\"], \"permissions\": [{ \"principal\": { \"type\": \"USER\", \"identifier\": \"former-employee@company.com\" }, \"share_mode\": \"NO_ACCESS\" }], \"notification\": { \"notify_on_share\": false } } ``` ### Collection Permission Scenarios **Scenario 1: Collection Admin** - `share_mode: MODIFY` + `content_share_mode: MODIFY` = Full control over collection and its contents **Scenario 2: Collection Curator** - `share_mode: MODIFY` + `content_share_mode: READ_ONLY` = Can manage collection structure but not edit contents **Scenario 3: Content Editor** - `share_mode: READ_ONLY` + `content_share_mode: MODIFY` = Can edit objects within collection but can\'t change collection itself **Scenario 4: Viewer** - `share_mode: READ_ONLY` + `content_share_mode: READ_ONLY` = View-only access to collection and contents + * @param param the request object + */ + public shareMetadata(param: ThoughtSpotRestApiShareMetadataRequest, options?: Configuration): Promise { + return this.api.shareMetadata(param.shareMetadataRequest, options).toPromise(); + } + + /** + * Version: 10.4.0.cl or later Processes a natural language query against a specified data model and returns a single AI-generated answer without requiring a conversation session. Requires `CAN_USE_SPOTTER` privilege and at least view access to the metadata object specified in the request. #### Usage guidelines The request must include: - `query`: a natural language question (e.g., \"What were total sales last quarter?\") - `metadata_identifier`: the unique ID of the data source to query against If the request is successful, the API returns a response message containing: - `session_identifier`: the unique ID of the generated response - `generation_number`: the generation number of the response - `message_type`: the type of the response (e.g., `TSAnswer`) - `visualization_type`: the generated visualization type (`Chart`, `Table`, or `Undefined`) - `tokens` / `display_tokens`: the search tokens and user-friendly display tokens for the response #### Error responses | Code | Description | |------|-----------------------------------------------------------------------------------------------------------------------------------------| | 401 | Unauthorized — authentication token is missing, expired, or invalid. | | 403 | Forbidden — the authenticated user does not have `CAN_USE_SPOTTER` privilege or lacks view permission on the specified metadata object. | > ###### Note: > * This endpoint is currently in Beta. Breaking changes may be introduced before the endpoint is made Generally Available. > * This endpoint requires Spotter - please contact ThoughtSpot support to enable Spotter on your cluster. + * @param param the request object + */ + public singleAnswer(param: ThoughtSpotRestApiSingleAnswerRequest, options?: Configuration): Promise { + return this.api.singleAnswer(param.singleAnswerRequest, options).toPromise(); + } + + /** + * Stops an in-progress agent conversation response. Version: 26.6.0.cl or later Version: 26.6.0.cl or later Stops an in-progress agent response for the specified conversation. Use this endpoint to cancel a response that is actively being generated — for example, when the user navigates away, reformulates their question, or no longer needs the current result. Requires `CAN_USE_SPOTTER` privilege and access to the specified conversation. #### Usage guidelines The request must include: - `conversation_identifier` *(path parameter)*: the unique ID of the conversation whose active response should be stopped, as returned by `createAgentConversation` A successful request returns an empty `204 No Content` response. If there is no active response in progress at the time of the call, the request is still treated as successful. After stopping a response, the conversation session remains active. You can continue sending messages using `sendAgentConversationMessage` or `sendAgentConversationMessageStreaming`. #### Example request ```bash POST /api/rest/2.0/ai/agent/conversation/{conversation_identifier}/stop-response ``` #### Typical usage scenario This endpoint is useful when integrating Spotter into a chat UI where users can cancel a long-running query. For example: 1. User sends a message via `sendAgentConversationMessageStreaming`. 2. User clicks a \"Stop generating\" button while the response is streaming. 3. Your client calls `stopConversation` with the active `conversation_identifier`. 4. The stream is terminated and the user can ask a new question. #### Error responses | Code | Description | |------|-------------| | 401 | Unauthorized — authentication token is missing, expired, or invalid. | | 403 | Forbidden — the authenticated user does not have `CAN_USE_SPOTTER` privilege or lacks access to the specified conversation. | > ###### Note: > > - Calling this endpoint when no response is in progress does not return an error. > - The conversation context is preserved after stopping — previous messages and answers remain accessible. > - Available from version 26.6.0.cl and later. > - This endpoint requires Spotter — please contact ThoughtSpot Support to enable Spotter on your cluster. > - This feature is available only for **Spotter 3** (`SPOTTER3`) version. + * @param param the request object + */ + public stopConversation(param: ThoughtSpotRestApiStopConversationRequest, options?: Configuration): Promise { + return this.api.stopConversation(param.conversationIdentifier, options).toPromise(); + } + + /** + * Version: 26.5.0.cl or later Synchronizes connection metadata attributes from your Cloud Data Warehouse (CDW) with ThoughtSpot. Requires the `DATAMANAGEMENT` (**Can manage data**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` (**Can manage data models**) privilege is required. #### Usage guidelines To synchronize attributes from a CDW, specify the connection GUID or name in the `connection_identifier` path parameter and `sync_attributes` in the request body. Default attribute is `[\"DESCRIPTION\"]`. ##### Hierarchical schema * Connection: The connection object for the sync operation. * Tables: Tables for the sync operation. When no table is specified, all tables are synchronized. * Columns: If the table is specified, you can add the columns for the sync operation. If no columns are specified, all columns in the specified table are considered for the sync operation. To set the scope for the sync operation: * Connection-level: To sync all tables and columns, pass an empty request body, or only the attributes in the request body. * Table-level: To synchronize specific tables and their columns, specify the table identifiers in the `tables` array. * Column-level: To synchronize specific columns, specify the table identifier as the key and column identifiers as the value in the `tables` array. ``` { \"tables\": [ {\"table-guid-1\": [\"column-guid-1\", \"column-guid-2\"]}, \"table-guid-2\" ], \"sync_attributes\": [\"DESCRIPTION\"] } ``` ##### API response If the sync operation is successful, the API returns the following information: * Status of the sync operation. For example, `SUCCESS`, `PARTIAL_SUCCESS`, or `NO_UPDATE`. * Number of tables and columns that were updated. * Number of tables and columns with the sync failed status when the overall sync status is `PARTIAL_SUCCESS`. * Message text indicating the sync results. + * @param param the request object + */ + public syncMetadata(param: ThoughtSpotRestApiSyncMetadataRequest, options?: Configuration): Promise { + return this.api.syncMetadata(param.connectionIdentifier, param.syncMetadataRequest, options).toPromise(); + } + + /** + * Version: 9.0.0.cl or later Removes the tags applied to a Liveboard, Answer, Table, or Worksheet. Requires edit access to the metadata object. + * @param param the request object + */ + public unassignTag(param: ThoughtSpotRestApiUnassignTagRequest, options?: Configuration): Promise { + return this.api.unassignTag(param.unassignTagRequest, options).toPromise(); + } + + /** + * Remove parameterization from fields in metadata objects. Version: 26.5.0.cl or later Allows removing parameterization from fields in metadata objects in ThoughtSpot. Requires appropriate permissions to modify the metadata object. The API endpoint allows unparameterizing the following types of metadata objects: * Logical Tables * Connections * Connection Configs For a Logical Table the field type must be `ATTRIBUTE` and field name can be one of: * databaseName * schemaName * tableName For a Connection or Connection Config, the field type is always `CONNECTION_PROPERTY`. In this case, field_name specifies the exact property of the Connection or Connection Config that needs to be unparameterized. For Connection Config, the only supported field name is: * impersonate_user + * @param param the request object + */ + public unparameterizeMetadata(param: ThoughtSpotRestApiUnparameterizeMetadataRequest, options?: Configuration): Promise { + return this.api.unparameterizeMetadata(param.unparameterizeMetadataRequest, options).toPromise(); + } + + /** + * Version: 26.5.0.cl or later Allows unpublishing metadata objects from organizations in ThoughtSpot. Requires ADMINISTRATION role and TENANT scope. The API endpoint allows unpublishing the following types of metadata objects: * Liveboards * Answers * Logical Tables When unpublishing objects, you can: * Include dependencies by setting `include_dependencies` to true - this will unpublish all dependent objects if no other published object is using them * Force unpublish by setting `force` to true - this will break all dependent objects in the unpublished organizations + * @param param the request object + */ + public unpublishMetadata(param: ThoughtSpotRestApiUnpublishMetadataRequest, options?: Configuration): Promise { + return this.api.unpublishMetadata(param.unpublishMetadataRequest, options).toPromise(); + } + + /** + * Version: 10.12.0.cl or later Updates the properties of a [custom calendar](https://docs.thoughtspot.com/cloud/latest/connections-cust-cal). Requires `DATAMANAGEMENT` (**Can manage data**) or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your ThoughtSpot instance, the `CAN_MANAGE_CUSTOM_CALENDAR` (**Can manage custom calendars**) privilege is required. #### Usage guidelines You can update the properties of a calendar using one of the following methods: * `FROM_INPUT_PARAMS` to update the calendar properties with the values defined in the API request. * `FROM_EXISTING_TABLE` Creates a calendar from the parameters defined in the API request. To update a custom calendar, specify the calendar ID as a path parameter in the request URL and the following parameters in the request body: * Connection ID and Table name * Database and schema name attributes: For most Cloud Data Warehouse (CDW) connectors, both `database_name` and `schema_name` attributes are required. However, the attribute requirements are conditional and vary based on the connector type and its metadata structure. For example, for connectors such as Teradata, MySQL, SingleSore, Amazon Aurora MySQL, Amazon RDS MySQL, Oracle, and GCP_MYSQL, the `schema_name` is required, whereas the `database_name` attribute is not. Similarly, connectors such as ClickHouse require you to specify the `database_name` and the schema specification in such cases is optional. The API allows you to modify the calendar type, month offset value, start and end date, starting day of the week, and prefixes assigned to the year and quarter labels. #### Examples Update a custom calendar using an existing Table in ThoughtSpot: ``` { \"update_method\": \"FROM_EXISTING_TABLE\", \"table_reference\": { \"connection_identifier\": \"Connection1\", \"database_name\": \"db1\", \"table_name\": \"custom_calendar_2025\", \"schame_name\": \"schemaVar\" } } ``` Update a custom calendar with the attributes defined in the API request: ``` { \"update_method\": \"FROM_INPUT_PARAMS\", \"table_reference\": { \"connection_identifier\": \"Connection1\", \"database_name\": \"db1\", \"table_name\": \"custom_calendar_2025\", \"schame_name\": \"schemaVar\" }, \"month_offset\": \"August\", \"start_day_of_week\": \"Monday\", \"start_date\": \"08/01/2025\", \"end_date\": \"07/31/2026\" } ``` + * @param param the request object + */ + public updateCalendar(param: ThoughtSpotRestApiUpdateCalendarRequest, options?: Configuration): Promise { + return this.api.updateCalendar(param.calendarIdentifier, param.updateCalendarRequest, options).toPromise(); + } + + /** + * Version: 26.4.0.cl or later Updates an existing collection in ThoughtSpot. #### Supported operations This API endpoint lets you perform the following operations: * Update collection name and description * Change visibility settings * Add metadata objects to the collection (operation: ADD) * Remove metadata objects from the collection (operation: REMOVE) * Replace all metadata objects in the collection (operation: REPLACE) #### Operation types * **ADD**: Adds the specified metadata objects to the existing collection without removing current items * **REMOVE**: Removes only the specified metadata objects from the collection * **REPLACE**: Replaces all existing metadata objects with the specified items (default behavior) + * @param param the request object + */ + public updateCollection(param: ThoughtSpotRestApiUpdateCollectionRequest, options?: Configuration): Promise { + return this.api.updateCollection(param.collectionIdentifier, param.updateCollectionRequest, options).toPromise(); + } + + /** + * Version: 10.12.0.cl or later Creates, updates, or deletes column security rules for specified tables. This API endpoint allows you to create, update, or delete column-level security rules on columns of a table. The operation follows an \"all or none\" policy: if defining security rules for any of the provided columns fails, the entire operation will be rolled back, and no rules will be created. #### Usage guidelines - Provide table identifier using either `identifier` (GUID or name) or `obj_identifier` (object ID) - Use `clear_csr: true` to remove all column security rules from the table - For each column, specify the security rule using `column_security_rules` array - Use `is_unsecured: true` to mark a specific column as unprotected - Use `group_access` operations to manage group associations: - `ADD`: Add groups to the column\'s access list - `REMOVE`: Remove groups from the column\'s access list - `REPLACE`: Replace all existing groups with the specified groups #### Required permissions - `ADMINISTRATION` - Can administer ThoughtSpot - `DATAMANAGEMENT` - Can manage data (if RBAC is disabled) - `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` - Can manage worksheet views and tables (if RBAC is enabled) #### Example request ```json { \"identifier\": \"table-guid\", \"obj_identifier\": \"table-object-id\", \"clear_csr\": false, \"column_security_rules\": [ { \"column_identifier\": \"col id or col name\", \"is_unsecured\": false, \"group_access\": [ { \"operation\": \"ADD\", \"group_identifiers\": [\"hr_group_id\", \"hr_group_name\", \"finance_group_id\"] } ] }, { \"column_identifier\": \"col id or col name\", \"is_unsecured\": true }, { \"column_identifier\": \"col id or col name\", \"is_unsecured\": false, \"group_access\": [ { \"operation\": \"REPLACE\", \"group_identifiers\": [\"management_group_id\", \"management_group_name\"] } ] } ] } ``` #### Request Body Schema - `identifier` (string, optional): GUID or name of the table for which we want to create column security rules - `obj_identifier` (string, optional): The object ID of the table - `clear_csr` (boolean, optional): If true, then all the secured columns will be marked as unprotected, and all the group associations will be removed - `column_security_rules` (array of objects, required): An array where each object defines the security rule for a specific column Each column security rule object contains: - `column_identifier` (string, required): Column identifier (col_id or name) - `is_unsecured` (boolean, optional): If true, the column will be marked as unprotected and all groups associated with it will be removed - `group_access` (array of objects, optional): Array of group operation objects Each group operation object contains: - `operation` (string, required): Operation type - ADD, REMOVE, or REPLACE - `group_identifiers` (array of strings, required): Array of group identifiers (name or GUID) on which the operation will be performed #### Response This API does not return any response body. A successful operation returns HTTP 200 status code. #### Operation Types - **ADD**: Adds the specified groups to the column\'s access list - **REMOVE**: Removes the specified groups from the column\'s access list - **REPLACE**: Replaces all existing groups with the specified groups + * @param param the request object + */ + public updateColumnSecurityRules(param: ThoughtSpotRestApiUpdateColumnSecurityRulesRequest, options?: Configuration): Promise { + return this.api.updateColumnSecurityRules(param.updateColumnSecurityRulesRequest, options).toPromise(); + } + + /** + * Version: 9.2.0.cl or later Updates Git repository configuration settings. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance on your instance, the `CAN_SETUP_VERSION_CONTROL` (**Can set up version control**) privilege. + * @param param the request object + */ + public updateConfig(param: ThoughtSpotRestApiUpdateConfigRequest, options?: Configuration): Promise { + return this.api.updateConfig(param.updateConfigRequest, options).toPromise(); + } + + /** + * Version: 9.2.0.cl or later **Important**: This endpoint is deprecated and will be removed from ThoughtSpot in September 2025. ThoughtSpot strongly recommends using the [Update connection V2](#/http/api-endpoints/connections/update-connection-v2) endpoint to update your connection objects. #### Usage guidelines Updates a connection object. Requires `DATAMANAGEMENT` (**Can manage data**) and edit permissions to the connection object, or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) privilege is required. To update a connection object, pass these parameters in your API request: 1. GUID of the connection object. 2. If you are updating tables or database schema of a connection object: a. Add the updated JSON map of metadata with database, schema, and tables in `data_warehouse_config`. b. Set `validate` to `true`. 3. If you are updating a configuration attribute, connection name, or description, you can set `validate` to `false`. + * @param param the request object + */ + public updateConnection(param: ThoughtSpotRestApiUpdateConnectionRequest, options?: Configuration): Promise { + return this.api.updateConnection(param.updateConnectionRequest, options).toPromise(); + } + + /** + * Version: 10.12.0.cl or later Updates a connection configuration object. Requires `DATAMANAGEMENT` (**Can manage data**) and edit permissions to the connection object, or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) privilege is required. #### Supported operations This API endpoint lets you perform the following operations in a single API request: * Edit the name or description of the configuration * Edit the configuration properties * Edit the `policy_type` * Edit the type of authentication * Enable or disable a configuration #### Parameterized Connection Support For parameterized oauth based connections, only the `same_as_parent` and `policy_process_options` attributes are allowed. These attributes are not applicable to connections that are not parameterized. **NOTE**: When updating a configuration where `disabled` is `true`, you must reset `disabled` to `true` in your update request payload. If not explicitly set again, the API will default `disabled` to `false`. + * @param param the request object + */ + public updateConnectionConfiguration(param: ThoughtSpotRestApiUpdateConnectionConfigurationRequest, options?: Configuration): Promise { + return this.api.updateConnectionConfiguration(param.configurationIdentifier, param.updateConnectionConfigurationRequest, options).toPromise(); + } + + /** + * Version: 26.6.0.cl or later Activates or deactivates a connection. A deactivated connection cannot be used for queries or operations until it is activated again. Requires `DATAMANAGEMENT` (**Can manage data**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) privilege is required. Only the connection owner or an administrator can perform this operation. #### Usage guidelines To update the status of a connection, specify the connection GUID or name in the `connection_identifier` path parameter and the desired `status` in the request body. - **ACTIVATED**: Enables the connection. Queries and operations can resume on an activated connection. - **DEACTIVATED**: Disables the connection. It does not remove the connection metadata, but only makes the connection unavailable for queries and operations. You can reactivate a deactivated connection by setting \"status\": \"ACTIVATED\". + * @param param the request object + */ + public updateConnectionStatus(param: ThoughtSpotRestApiUpdateConnectionStatusRequest, options?: Configuration): Promise { + return this.api.updateConnectionStatus(param.connectionIdentifier, param.updateConnectionStatusRequest, options).toPromise(); + } + + /** + * Version: 10.4.0.cl or later Updates a connection object. Requires `DATAMANAGEMENT` (**Can manage data**) and edit permissions to the connection object, or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) privilege is required. To update a connection object, pass these parameters in your API request: 1. GUID of the connection object. 2. If you are updating tables or database schema of a connection object: a. Add the updated JSON map of metadata with database, schema, and tables in `data_warehouse_config`. b. Set `validate` to `true`. **NOTE:** If the `authentication_type` is anything other than SERVICE_ACCOUNT, you must explicitly provide the authenticationType property in the payload. If you do not specify authenticationType, the API will default to SERVICE_ACCOUNT as the authentication type. * A JSON map of configuration attributes, database details, and table properties in `data_warehouse_config` as shown in the following example: * This is an example of updating a single table in a empty connection: ``` { \"authenticationType\": \"SERVICE_ACCOUNT\", \"externalDatabases\": [ { \"name\": \"DEVELOPMENT\", \"isAutoCreated\": false, \"schemas\": [ { \"name\": \"TS_dataset\", \"tables\": [ { \"name\": \"DEMORENAME\", \"type\": \"TABLE\", \"description\": \"\", \"selected\": true, \"linked\": true, \"gid\": 0, \"datasetId\": \"-1\", \"subType\": \"\", \"reportId\": \"\", \"viewId\": \"\", \"columns\": [ { \"name\": \"Col1\", \"type\": \"VARCHAR\", \"canImport\": true, \"selected\": true, \"description\": \"\", \"isLinkedActive\": true, \"isAggregate\": false }, { \"name\": \"Col2\", \"type\": \"VARCHAR\", \"canImport\": true, \"selected\": true, \"description\": \"\", \"isLinkedActive\": true, \"isAggregate\": false }, { \"name\": \"Col3\", \"type\": \"VARCHAR\", \"canImport\": true, \"selected\": true, \"description\": \"\", \"isLinkedActive\": true, \"isAggregate\": false }, { \"name\": \"Col312\", \"type\": \"VARCHAR\", \"canImport\": true, \"selected\": true, \"description\": \"\", \"isLinkedActive\": true, \"isAggregate\": false }, { \"name\": \"Col4\", \"type\": \"VARCHAR\", \"canImport\": true, \"selected\": true, \"description\": \"\", \"isLinkedActive\": true, \"isAggregate\": false } ], \"relationships\": [] } ] } ] } ], \"configuration\": { \"password\": \"\", \"database\": \"DEVELOPMENT\", \"role\": \"DEV\", \"accountName\": \"thoughtspot_partner\", \"warehouse\": \"DEMO_WH\", \"user\": \"DEV_USER\" } } ``` * This is an example of updating a single table in an existing connection with tables: ``` { \"authenticationType\": \"SERVICE_ACCOUNT\", \"externalDatabases\": [ { \"name\": \"DEVELOPMENT\", \"isAutoCreated\": false, \"schemas\": [ { \"name\": \"TS_dataset\", \"tables\": [ { \"name\": \"CUSTOMER\", \"type\": \"TABLE\", \"description\": \"\", \"selected\": true, \"linked\": true, \"gid\": 0, \"datasetId\": \"-1\", \"subType\": \"\", \"reportId\": \"\", \"viewId\": \"\", \"columns\": [], \"relationships\": [] }, { \"name\": \"tpch5k_falcon_default_schema_users\", \"type\": \"TABLE\", \"description\": \"\", \"selected\": true, \"linked\": true, \"gid\": 0, \"datasetId\": \"-1\", \"subType\": \"\", \"reportId\": \"\", \"viewId\": \"\", \"columns\": [ { \"name\": \"user_id\", \"type\": \"INT64\", \"canImport\": true, \"selected\": true, \"description\": \"\", \"isLinkedActive\": true, \"isAggregate\": false }, { \"name\": \"product_id\", \"type\": \"INT64\", \"canImport\": true, \"selected\": true, \"description\": \"\", \"isLinkedActive\": true, \"isAggregate\": false }, { \"name\": \"user_cost\", \"type\": \"INT64\", \"canImport\": true, \"selected\": true, \"description\": \"\", \"isLinkedActive\": true, \"isAggregate\": false } ], \"relationships\": [] } ] } ] } ], \"configuration\": { \"password\": \"\", \"database\": \"DEVELOPMENT\", \"role\": \"DEV\", \"accountName\": \"thoughtspot_partner\", \"warehouse\": \"DEMO_WH\", \"user\": \"DEV_USER\" } } ``` 3. If you are updating a configuration attribute, connection name, or description, you can set `validate` to `false`. **NOTE:** If the `authentication_type` is anything other than SERVICE_ACCOUNT, you must explicitly provide the authenticationType property in the payload. If you do not specify authenticationType, the API will default to SERVICE_ACCOUNT as the authentication type. * A JSON map of configuration attributes in `data_warehouse_config`. The following example shows the configuration attributes for a Snowflake connection: ``` { \"configuration\":{ \"accountName\":\"thoughtspot_partner\", \"user\":\"tsadmin\", \"password\":\"TestConn123\", \"role\":\"sysadmin\", \"warehouse\":\"MEDIUM_WH\" }, \"externalDatabases\":[ ] } ``` + * @param param the request object + */ + public updateConnectionV2(param: ThoughtSpotRestApiUpdateConnectionV2Request, options?: Configuration): Promise { + return this.api.updateConnectionV2(param.connectionIdentifier, param.updateConnectionV2Request, options).toPromise(); + } + + /** + * Version: 9.6.0.cl or later Updates a custom action. Requires `DEVELOPER` (**Has Developer privilege**) or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `DEVELOPER` (**Has developer privilege**) privilege is required. #### Usage Guidelines The API allows you to modify the following properties: * Name of the custom action * Action availability to groups * Association to metadata objects * Authentication settings for a URL-based action For more information, see [Custom actions](https://developers.thoughtspot.com/docs/custom-action-intro). + * @param param the request object + */ + public updateCustomAction(param: ThoughtSpotRestApiUpdateCustomActionRequest, options?: Configuration): Promise { + return this.api.updateCustomAction(param.customActionIdentifier, param.updateCustomActionRequest, options).toPromise(); + } + + /** + * Version: 9.9.0.cl or later Updates a DBT connection object. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege or `DATAMANAGEMENT` (**Can manage data ThoughtSpot**) privilege, along with an existing DBT connection. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the following data control privileges may be required: - `CAN_MANAGE_CUSTOM_CALENDAR`(**Can manage custom calendars**) - `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) - `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` (**Can manage data models**) #### About update DBT connection You can modify DBT connection object properties such as embrace connection name, embrace database name, import type, account identifier, access token, project identifier and environment (or) embrace connection, embrace database name, import type, file_content settings. + * @param param the request object + */ + public updateDbtConnection(param: ThoughtSpotRestApiUpdateDbtConnectionRequest, options?: Configuration): Promise { + return this.api.updateDbtConnection(param.dbtConnectionIdentifier, param.connectionName, param.databaseName, param.importType, param.accessToken, param.dbtUrl, param.accountId, param.projectId, param.dbtEnvId, param.projectName, param.fileContent, options).toPromise(); + } + + /** + * Version: 10.12.0.cl or later Updates a customization configuration for the notification email. #### Pre-requisites Requires `DEVELOPER` (**has developer privilege**) or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `DEVELOPER` (**Has developer privilege**) privilege is required. **NOTE**:This endpoint in currently in beta. Contact ThoughtSpot support to enable this on your instance. #### Usage guidelines To update a custom configuration pass these parameters in your API request: - A JSON map of configuration attributes `template_properties`. The following example shows a sample set of customization configuration: ``` { { \"cta_button_bg_color\": \"#444DEA\", \"cta_text_font_color\": \"#FFFFFF\", \"primary_bg_color\": \"#D3DEF0\", \"logo_url\": \"https://storage.pardot.com/710713/1642089901EbkRibJq/TS_fullworkmark_darkmode.png\", \"font_family\": \"\", \"product_name\": \"ThoughtSpot\", \"footer_address\": \"444 Castro St, Suite 1000 Mountain View, CA 94041\", \"footer_phone\": \"(800) 508-7008\", \"replacement_value_for_liveboard\": \"Dashboard\", \"replacement_value_for_answer\": \"Chart\", \"replacement_value_for_spot_iq\": \"AI Insights\", \"hide_footer_phone\": false, \"hide_footer_address\": false, \"hide_product_name\": false, \"hide_manage_notification\": false, \"hide_mobile_app_nudge\": false, \"hide_privacy_policy\": false, \"hide_ts_vocabulary_definitions\": false, \"hide_error_message\": false, \"hide_unsubscribe_link\": false, \"hide_notification_status\": false, \"hide_modify_alert\": false, \"company_website_url\": \"https://your-website.com/\", \"company_privacy_policy_url\" : \"https://link-to-privacy-policy.com/\", \"contact_support_url\": \"https://link-to-contact-support.com/\", \"hide_contact_support_url\": false, \"hide_logo_url\" : false } } ``` + * @param param the request object + */ + public updateEmailCustomization(param: ThoughtSpotRestApiUpdateEmailCustomizationRequest, options?: Configuration): Promise { + return this.api.updateEmailCustomization(param.updateEmailCustomizationRequest, options).toPromise(); + } + + /** + * Update header attributes for a given list of header objects. Version: 10.6.0.cl or later ## Prerequisites - **Privileges Required:** - `DATAMANAGEMENT` (Can manage data) or `ADMINISTRATION` (Can administer ThoughtSpot). - **Additional Privileges (if RBAC is enabled):** - `ORG_ADMINISTRATION` (Can manage orgs). --- ## Usage Guidelines ### Parameters 1. **headers_update** - **Description:** List of header objects with their attributes to be updated. Each object contains a list of attributes to be updated in the header. - **Usage:** - You must provide either `identifier` or `obj_identifier`, but not both. Both fields cannot be empty. - When `org_identifier` is set to `-1`, only the `identifier` value is accepted; `obj_identifier` is not allowed. 2. **org_identifier** - **Description:** GUID (Globally Unique Identifier) or name of the organization. - **Usage:** - Leaving this field empty assumes that the changes should be applied to the current organization - Provide `org_guid` or `org_name` to uniquely identify the organization where changes need to be applied. . - Provide `-1` if changes have to be applied across all the org. --- ## Note Currently, this API is enabled only for updating the `obj_identifier` attribute. Only `text` will be allowed in attribute\'s value. ## Best Practices 1. **Backup Before Conversion:** Always export metadata as a backup before initiating the update process --- ## Examples ### Only `identifier` is given ```json { \"headers_update\": [ { \"identifier\": \"guid_1\", \"obj_identifier\": \"\", \"type\": \"LOGICAL_COLUMN\", \"attributes\": [ { \"name\": \"obj_id\", \"value\": \"custom_object_id\" } ] } ], \"org_identifier\": \"orgGuid\" } ``` ### Only `obj_identifier` is given ```json { \"headers_update\": [ { \"obj_identifier\": \"custom_object_id\", \"type\": \"ANSWER\", \"attributes\": [ { \"name\": \"obj_id\", \"value\": \"custom_object_id\" } ] } ], \"org_identifier\": \"orgName\" } ``` ### Executing update for all org `-1` ```json { \"headers_update\": [ { \"identifier\": \"guid_1\", \"type\": \"ANSWER\", \"attributes\": [ { \"name\": \"obj_id\", \"value\": \"custom_object_id\" } ] } ], \"org_identifier\": -1 } ``` ### Optional `type` is not provided ```json { \"headers_update\": [ { \"identifier\": \"guid_1\", \"attributes\": [ { \"name\": \"obj_id\", \"value\": \"custom_object_id\" } ] } ], \"org_identifier\": -1 } ``` + * @param param the request object + */ + public updateMetadataHeader(param: ThoughtSpotRestApiUpdateMetadataHeaderRequest, options?: Configuration): Promise { + return this.api.updateMetadataHeader(param.updateMetadataHeaderRequest, options).toPromise(); + } + + /** + * Update object IDs for given metadata objects. Version: 10.8.0.cl or later ## Prerequisites - **Privileges Required:** - `DATAMANAGEMENT` (Can manage data) or `ADMINISTRATION` (Can administer ThoughtSpot). - **Additional Privileges (if RBAC is enabled):** - `ORG_ADMINISTRATION` (Can manage orgs). --- ## Usage Guidelines ### Parameters 1. **metadata** - **Description:** List of metadata objects to update their object IDs. - **Usage:** - Use either `current_obj_id` alone OR use `metadata_identifier` with `type` (when needed). - When using `metadata_identifier`, the `type` field is required if using a name instead of a GUID. - The `new_obj_id` field is always required. --- ## Note This API is specifically designed for updating object IDs of metadata objects. It internally uses the header update mechanism to perform the changes. ## Best Practices 1. **Backup Before Update:** Always export metadata as a backup before initiating the update process. 2. **Validation:** - When using `current_obj_id`, ensure it matches the existing object ID exactly. - When using `metadata_identifier` with a name, ensure the `type` is specified correctly. - Verify that the `new_obj_id` follows your naming conventions and is unique within your system. --- ## Examples ### Using current_obj_id ```json { \"metadata\": [ { \"current_obj_id\": \"existing_object_id\", \"new_obj_id\": \"new_object_id\" } ] } ``` ### Using metadata_identifier with GUID ```json { \"metadata\": [ { \"metadata_identifier\": \"01234567-89ab-cdef-0123-456789abcdef\", \"new_obj_id\": \"new_object_id\" } ] } ``` ### Using metadata_identifier with name and type ```json { \"metadata\": [ { \"metadata_identifier\": \"My Answer\", \"type\": \"ANSWER\", \"new_obj_id\": \"new_object_id\" } ] } ``` ### Multiple objects update ```json { \"metadata\": [ { \"current_obj_id\": \"existing_object_id_1\", \"new_obj_id\": \"new_object_id_1\" }, { \"metadata_identifier\": \"My Worksheet\", \"type\": \"LOGICAL_TABLE\", \"new_obj_id\": \"new_object_id_2\" } ] } ``` + * @param param the request object + */ + public updateMetadataObjId(param: ThoughtSpotRestApiUpdateMetadataObjIdRequest, options?: Configuration): Promise { + return this.api.updateMetadataObjId(param.updateMetadataObjIdRequest, options).toPromise(); + } + + /** + * Version: 9.0.0.cl or later Updates an Org object. You can modify Org properties such as name, description, and user associations. Requires cluster administration (**Can administer Org**) privileges. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `ORG_ADMINISTRATION` (**Can manage Orgs**) privilege is required. + * @param param the request object + */ + public updateOrg(param: ThoughtSpotRestApiUpdateOrgRequest, options?: Configuration): Promise { + return this.api.updateOrg(param.orgIdentifier, param.updateOrgRequest, options).toPromise(); + } + + /** + * Version: 9.5.0.cl or later Updates the properties of a Role object. Available only if [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance. To update a Role, the `ROLE_ADMINISTRATION` (**Can manage roles**) privilege is required. + * @param param the request object + */ + public updateRole(param: ThoughtSpotRestApiUpdateRoleRequest, options?: Configuration): Promise { + return this.api.updateRole(param.roleIdentifier, param.updateRoleRequest, options).toPromise(); + } + + /** + * Update schedule. Version: 9.4.0.cl or later Updates a scheduled Liveboard job. Requires at least edit access to Liveboards. To update a schedule on behalf of another user, you need `ADMINISTRATION` (**Can administer Org**) or `JOBSCHEDULING` (**Can schedule for others**) privilege and edit access to the Liveboard. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `JOBSCHEDULING` (**Can schedule for others**) privilege is required. The API endpoint allows you to pause a scheduled job, change the status of a paused job. You can also edit the recipients list, frequency of the job, format of the file to send to the recipients in email notifications, PDF options, and time zone setting. + * @param param the request object + */ + public updateSchedule(param: ThoughtSpotRestApiUpdateScheduleRequest, options?: Configuration): Promise { + return this.api.updateSchedule(param.scheduleIdentifier, param.updateScheduleRequest, options).toPromise(); + } + + /** + * Version: 9.2.0.cl or later Updates the current configuration of the cluster. You must send the configuration data in JSON format. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privileges. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `APPLICATION_ADMINISTRATION` (**Can manage application settings**) privilege is required. + * @param param the request object + */ + public updateSystemConfig(param: ThoughtSpotRestApiUpdateSystemConfigRequest, options?: Configuration): Promise { + return this.api.updateSystemConfig(param.updateSystemConfigRequest, options).toPromise(); + } + + /** + * Version: 9.0.0.cl or later Updates a tag object. You can modify the `name` and `color` properties of a tag object. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `TAGMANAGEMENT` (**Can manage tags**) privilege is required to create, edit, and delete tags. + * @param param the request object + */ + public updateTag(param: ThoughtSpotRestApiUpdateTagRequest, options?: Configuration): Promise { + return this.api.updateTag(param.tagIdentifier, param.updateTagRequest, options).toPromise(); + } + + /** + * Version: 9.0.0.cl or later Updates the properties of a user object. You can modify user properties such as username, email, and share notification settings. You can also assign new groups and Orgs, remove the user from a group or Org, reset password, and modify user preferences. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `USER_ADMINISTRATION` (**Can manage users**) privilege is required. + * @param param the request object + */ + public updateUser(param: ThoughtSpotRestApiUpdateUserRequest, options?: Configuration): Promise { + return this.api.updateUser(param.userIdentifier, param.updateUserRequest, options).toPromise(); + } + + /** + * Version: 9.0.0.cl or later Updates the properties of a group object in ThoughtSpot. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `GROUP_ADMINISTRATION` (**Can manage groups**) privilege is required. #### Supported operations This API endpoint lets you perform the following operations in a single API request: * Edit [privileges](https://developers.thoughtspot.com/docs/?pageid=api-user-management#group-privileges) * Add or remove users * Change sharing visibility settings * Add or remove sub-groups * Assign a default Liveboard or update the existing settings + * @param param the request object + */ + public updateUserGroup(param: ThoughtSpotRestApiUpdateUserGroupRequest, options?: Configuration): Promise { + return this.api.updateUserGroup(param.groupIdentifier, param.updateUserGroupRequest, options).toPromise(); + } + + /** + * Update a variable\'s name Version: 26.4.0.cl or later Allows updating a variable\'s name in ThoughtSpot. Requires ADMINISTRATION role and TENANT scope. The CAN_MANAGE_VARIABLES permission allows you to manage Formula Variables in the current organization scope. The API endpoint allows updating: * The variable name + * @param param the request object + */ + public updateVariable(param: ThoughtSpotRestApiUpdateVariableRequest, options?: Configuration): Promise { + return this.api.updateVariable(param.identifier, param.updateVariableRequest, options).toPromise(); + } + + /** + * Update values for multiple variables Version: 10.14.0.cl or later **Note:** This API endpoint is deprecated and will be removed from ThoughtSpot in a future release. Use [POST /api/rest/2.0/template/variables/{identifier}/update-values](/api/rest/2.0/template/variables/%7Bidentifier%7D/update-values) instead. Allows updating values for multiple variables in ThoughtSpot. Requires ADMINISTRATION role. The CAN_MANAGE_VARIABLES permission allows you to manage Formula Variables in the current organization scope. The API endpoint allows: * Adding new values to variables * Replacing existing values * Deleting values from variables When updating variable values, you need to specify: * The variable identifiers * The values to add/replace/remove for each variable * The operation to perform (ADD, REPLACE, REMOVE, RESET) Behaviour based on operation type: * ADD - Adds values to the variable if this is a list type variable, else same as replace. * REPLACE - Replaces all values of a given set of constraints with the current set of values. * REMOVE - Removes any values which match the set of conditions of the variables if this is a list type variable, else clears value. * RESET - Removes all constrains for a given variable, scope is ignored + * @param param the request object + */ + public updateVariableValues(param: ThoughtSpotRestApiUpdateVariableValuesRequest, options?: Configuration): Promise { + return this.api.updateVariableValues(param.updateVariableValuesRequest, options).toPromise(); + } + + /** + * Version: 10.14.0.cl or later Updates an existing webhook configuration by its unique id or name. Only the provided fields will be updated. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) or `DEVELOPER` (**Has developer privilege**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, users with `CAN_MANAGE_WEBHOOKS` (**Can manage webhooks**) privilege are also authorized to perform this action. + * @param param the request object + */ + public updateWebhookConfiguration(param: ThoughtSpotRestApiUpdateWebhookConfigurationRequest, options?: Configuration): Promise { + return this.api.updateWebhookConfiguration(param.webhookIdentifier, param.updateWebhookConfigurationRequest, options).toPromise(); + } + + /** + * Version: 26.4.0.cl or later Validates a communication channel configuration to ensure it is properly set up and can receive events. - Use `channel_type` to specify the type of communication channel to validate (e.g., WEBHOOK). - Use `channel_identifier` to provide the unique identifier or name for the communication channel. - Use `event_type` to specify the event type to validate for this channel. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) or `DEVELOPER` (**Has developer privilege**) privilege. For webhook channels, users with `CAN_MANAGE_WEBHOOKS` (**Can manage webhooks**) privilege are also authorized to perform this action. + * @param param the request object + */ + public validateCommunicationChannel(param: ThoughtSpotRestApiValidateCommunicationChannelRequest, options?: Configuration): Promise { + return this.api.validateCommunicationChannel(param.validateCommunicationChannelRequest, options).toPromise(); + } + + /** + * Version: 10.10.0.cl or later Validates the email customization configuration if any set for the ThoughtSpot system. #### Pre-requisites Requires `DEVELOPER` (**has developer privilege**) or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `DEVELOPER` (**Has developer privilege**) privilege is required. **NOTE**:This endpoint in currently in beta. Contact ThoughtSpot support to enable this on your instance. + * @param param the request object + */ + public validateEmailCustomization(param: ThoughtSpotRestApiValidateEmailCustomizationRequest = {}, options?: Configuration): Promise { + return this.api.validateEmailCustomization( options).toPromise(); + } + + /** + * Version: 9.2.0.cl or later Validates the content of your source branch against the objects in your destination environment. Before merging content from your source branch to the destination branch, run this API operation from your destination environment and ensure that the changes from the source branch function in the destination environment. Requires `DATAMANAGEMENT` (**Can manage data**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance on your instance, the `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` (**Can manage data models**) privilege and edit access to the metadata objects. + * @param param the request object + */ + public validateMerge(param: ThoughtSpotRestApiValidateMergeRequest, options?: Configuration): Promise> { + return this.api.validateMerge(param.validateMergeRequest, options).toPromise(); + } + + /** + * Version: 9.12.0.cl or later Validates the authentication token specified in the API request. If your token is not valid, [Get a new token](#/http/api-endpoints/authentication/get-full-access-token). + * @param param the request object + */ + public validateToken(param: ThoughtSpotRestApiValidateTokenRequest, options?: Configuration): Promise { + return this.api.validateToken(param.validateTokenRequest, options).toPromise(); + } + +} + +import { ObservableUsersApi } from "./ObservableAPI"; +import { UsersApiRequestFactory, UsersApiResponseProcessor} from "../apis/UsersApi"; + +export interface UsersApiActivateUserRequest { + /** + * + * @type ActivateUserRequest + * @memberof UsersApiactivateUser + */ + activateUserRequest: ActivateUserRequest +} + +export interface UsersApiChangeUserPasswordRequest { + /** + * + * @type ChangeUserPasswordRequest + * @memberof UsersApichangeUserPassword + */ + changeUserPasswordRequest: ChangeUserPasswordRequest +} + +export interface UsersApiCreateUserRequest { + /** + * + * @type CreateUserRequest + * @memberof UsersApicreateUser + */ + createUserRequest: CreateUserRequest +} + +export interface UsersApiDeactivateUserRequest { + /** + * + * @type DeactivateUserRequest + * @memberof UsersApideactivateUser + */ + deactivateUserRequest: DeactivateUserRequest +} + +export interface UsersApiDeleteUserRequest { + /** + * GUID / name of the user + * @type string + * @memberof UsersApideleteUser + */ + userIdentifier: string +} + +export interface UsersApiForceLogoutUsersRequest { + /** + * + * @type ForceLogoutUsersRequest + * @memberof UsersApiforceLogoutUsers + */ + forceLogoutUsersRequest: ForceLogoutUsersRequest +} + +export interface UsersApiImportUsersRequest { + /** + * + * @type ImportUsersRequest + * @memberof UsersApiimportUsers + */ + importUsersRequest: ImportUsersRequest +} + +export interface UsersApiResetUserPasswordRequest { + /** + * + * @type ResetUserPasswordRequest + * @memberof UsersApiresetUserPassword + */ + resetUserPasswordRequest: ResetUserPasswordRequest +} + +export interface UsersApiSearchUsersRequest { + /** + * + * @type SearchUsersRequest + * @memberof UsersApisearchUsers + */ + searchUsersRequest: SearchUsersRequest +} + +export interface UsersApiUpdateUserRequest { + /** + * GUID / name of the user + * @type string + * @memberof UsersApiupdateUser + */ + userIdentifier: string + /** + * + * @type UpdateUserRequest + * @memberof UsersApiupdateUser + */ + updateUserRequest: UpdateUserRequest +} + +export class ObjectUsersApi { + private api: ObservableUsersApi + + public constructor(configuration: Configuration, requestFactory?: UsersApiRequestFactory, responseProcessor?: UsersApiResponseProcessor) { + this.api = new ObservableUsersApi(configuration, requestFactory, responseProcessor); + } + + /** + * Version: 9.7.0.cl or later Activates a deactivated user account. Requires `ADMINISTRATION` (**Can administer Thoughtspot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `USER_ADMINISTRATION` (**Can manage users**) privilege is required. To activate an inactive user account, the API request body must include the following information: - Username or the GUID of the user account. - Auth token generated for the deactivated user. The auth token is sent in the API response when a user is deactivated. - Password for the user account. + * @param param the request object + */ + public activateUser(param: UsersApiActivateUserRequest, options?: Configuration): Promise { + return this.api.activateUser(param.activateUserRequest, options).toPromise(); + } + + /** + * Version: 9.0.0.cl or later Updates the current password of the user. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `USER_ADMINISTRATION` (**Can manage users**) privilege is required. + * @param param the request object + */ + public changeUserPassword(param: UsersApiChangeUserPasswordRequest, options?: Configuration): Promise { + return this.api.changeUserPassword(param.changeUserPasswordRequest, options).toPromise(); + } + + /** + * Version: 9.0.0.cl or later Creates a user in ThoughtSpot. The API endpoint allows you to configure several user properties such as email address, account status, share notification preferences, and sharing visibility. You can provision the user to [groups](https://docs.thoughtspot.com/cloud/latest/groups-privileges) and [Orgs](https://docs.thoughtspot.com/cloud/latest/orgs-overview). You can also add Liveboard, Answer, and Worksheet objects to the user’s favorites list, assign a default Liveboard for the user, and set user preferences. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `USER_ADMINISTRATION` (**Can manage users**) privilege is required. + * @param param the request object + */ + public createUser(param: UsersApiCreateUserRequest, options?: Configuration): Promise { + return this.api.createUser(param.createUserRequest, options).toPromise(); + } + + /** + * Version: 9.7.0.cl or later Deactivates a user account. Requires `ADMINISTRATION` (**Can administer Thoughtspot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `USER_ADMINISTRATION` (**Can manage users**) privilege is required. To deactivate a user account, the API request body must include the following information: - Username or the GUID of the user account - Base URL of the ThoughtSpot instance If the API request is successful, ThoughtSpot returns the activation URL in the response. The activation URL is valid for 14 days and can be used to re-activate the account and reset the password of the deactivated account. + * @param param the request object + */ + public deactivateUser(param: UsersApiDeactivateUserRequest, options?: Configuration): Promise { + return this.api.deactivateUser(param.deactivateUserRequest, options).toPromise(); + } + + /** + * Version: 9.0.0.cl or later Deletes a user from the ThoughtSpot system. If you want to remove a user from a specific Org but not from ThoughtSpot, update the group and Org mapping properties of the user object via a POST API call to the [/api/rest/2.0/users/{user_identifier}/update](#/http/api-endpoints/users/update-user) endpoint. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `USER_ADMINISTRATION` (**Can manage users**) privilege is required. + * @param param the request object + */ + public deleteUser(param: UsersApiDeleteUserRequest, options?: Configuration): Promise { + return this.api.deleteUser(param.userIdentifier, options).toPromise(); + } + + /** + * Version: 9.0.0.cl or later Enforces logout on current user sessions. Use this API with caution as it may invalidate active user sessions and force users to re-login. Make sure you specify the usernames or GUIDs. If you pass null values in the API call, all user sessions on your cluster become invalid, and the users are forced to re-login. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `USER_ADMINISTRATION` (**Can manage users**) privilege is required. + * @param param the request object + */ + public forceLogoutUsers(param: UsersApiForceLogoutUsersRequest, options?: Configuration): Promise { + return this.api.forceLogoutUsers(param.forceLogoutUsersRequest, options).toPromise(); + } + + /** + * Version: 9.0.0.cl or later Imports user data from external databases into ThoughtSpot. During the user import operation: * If the specified users are not available in ThoughtSpot, the users are created and assigned a default password. Defining a `default_password` in the API request is optional. * If `delete_unspecified_users` is set to `true`, the users not specified in the API request, excluding the `tsadmin`, `guest`, `system` and `su` users, are deleted. * If the specified user objects are already available in ThoughtSpot, the object properties are updated and synchronized as per the input data in the API request. A successful API call returns the object that represents the changes made in the ThoughtSpot system. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `USER_ADMINISTRATION` (**Can manage users**) privilege is required. + * @param param the request object + */ + public importUsers(param: UsersApiImportUsersRequest, options?: Configuration): Promise { + return this.api.importUsers(param.importUsersRequest, options).toPromise(); + } + + /** + * Version: 9.0.0.cl or later Resets the password of a user account. Administrators can reset password on behalf of a user. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `USER_ADMINISTRATION` (**Can manage users**) privilege is required. + * @param param the request object + */ + public resetUserPassword(param: UsersApiResetUserPasswordRequest, options?: Configuration): Promise { + return this.api.resetUserPassword(param.resetUserPasswordRequest, options).toPromise(); + } + + /** + * Version: 9.0.0.cl or later Gets a list of users available on the ThoughtSpot system. To get details of a specific user, specify the user GUID or name. You can also filter the API response based on groups, Org ID, user visibility, account status, user type, and user preference settings and favorites. Available to all users. Users with `ADMINISTRATION` (**Can administer ThoughtSpot**) privileges can view all users properties. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `USER_ADMINISTRATION` (**Can manage users**) privilege is required. **NOTE**: If the API returns an empty list, consider increasing the value of the `record_size` parameter. To search across all available users, set `record_size` to `-1`. + * @param param the request object + */ + public searchUsers(param: UsersApiSearchUsersRequest, options?: Configuration): Promise> { + return this.api.searchUsers(param.searchUsersRequest, options).toPromise(); + } + + /** + * Version: 9.0.0.cl or later Updates the properties of a user object. You can modify user properties such as username, email, and share notification settings. You can also assign new groups and Orgs, remove the user from a group or Org, reset password, and modify user preferences. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `USER_ADMINISTRATION` (**Can manage users**) privilege is required. + * @param param the request object + */ + public updateUser(param: UsersApiUpdateUserRequest, options?: Configuration): Promise { + return this.api.updateUser(param.userIdentifier, param.updateUserRequest, options).toPromise(); + } + +} + +import { ObservableVariableApi } from "./ObservableAPI"; +import { VariableApiRequestFactory, VariableApiResponseProcessor} from "../apis/VariableApi"; + +export interface VariableApiCreateVariableRequest { + /** + * + * @type CreateVariableRequest + * @memberof VariableApicreateVariable + */ + createVariableRequest: CreateVariableRequest +} + +export interface VariableApiDeleteVariableRequest { + /** + * Unique id or name of the variable + * @type string + * @memberof VariableApideleteVariable + */ + identifier: string +} + +export interface VariableApiDeleteVariablesRequest { + /** + * + * @type DeleteVariablesRequest + * @memberof VariableApideleteVariables + */ + deleteVariablesRequest: DeleteVariablesRequest +} + +export interface VariableApiPutVariableValuesRequest { + /** + * Unique ID or name of the variable + * @type string + * @memberof VariableApiputVariableValues + */ + identifier: string + /** + * + * @type PutVariableValuesRequest + * @memberof VariableApiputVariableValues + */ + putVariableValuesRequest: PutVariableValuesRequest +} + +export interface VariableApiSearchVariablesRequest { + /** + * + * @type SearchVariablesRequest + * @memberof VariableApisearchVariables + */ + searchVariablesRequest: SearchVariablesRequest +} + +export interface VariableApiUpdateVariableRequest { + /** + * Unique id or name of the variable to update. + * @type string + * @memberof VariableApiupdateVariable + */ + identifier: string + /** + * + * @type UpdateVariableRequest + * @memberof VariableApiupdateVariable + */ + updateVariableRequest: UpdateVariableRequest +} + +export interface VariableApiUpdateVariableValuesRequest { + /** + * + * @type UpdateVariableValuesRequest + * @memberof VariableApiupdateVariableValues + */ + updateVariableValuesRequest: UpdateVariableValuesRequest +} + +export class ObjectVariableApi { + private api: ObservableVariableApi + + public constructor(configuration: Configuration, requestFactory?: VariableApiRequestFactory, responseProcessor?: VariableApiResponseProcessor) { + this.api = new ObservableVariableApi(configuration, requestFactory, responseProcessor); + } + + /** + * Create a variable which can be used for parameterizing metadata objects Version: 26.4.0.cl or later Allows creating a variable which can be used for parameterizing metadata objects in ThoughtSpot. Requires ADMINISTRATION role and TENANT scope. The CAN_MANAGE_VARIABLES permission allows you to manage Formula Variables in the current organization scope. The API endpoint supports the following types of variables: * CONNECTION_PROPERTY - For connection properties * TABLE_MAPPING - For table mappings * CONNECTION_PROPERTY_PER_PRINCIPAL - For connection properties per principal. In order to use this please contact support to enable this. * FORMULA_VARIABLE - For Formula variables, introduced in 10.15.0.cl When creating a variable, you need to specify: * The variable type * A unique name for the variable * Whether the variable contains sensitive values (defaults to false) * The data type of the variable, only specify for formula variables (defaults to null) The operation will fail if: * The user lacks required permissions * The variable name already exists * The variable type is invalid + * @param param the request object + */ + public createVariable(param: VariableApiCreateVariableRequest, options?: Configuration): Promise { + return this.api.createVariable(param.createVariableRequest, options).toPromise(); + } + + /** + * Delete a variable Version: 10.14.0.cl or later **Note:** This API endpoint is deprecated and will be removed from ThoughtSpot in a future release. Use [POST /api/rest/2.0/template/variables/delete](/api/rest/2.0/template/variables/delete) instead. Allows deleting a variable from ThoughtSpot. Requires ADMINISTRATION role and TENANT scope. The CAN_MANAGE_VARIABLES permission allows you to manage Formula Variables in the current organization scope. The API endpoint requires: * The variable identifier (ID or name) The operation will fail if: * The user lacks required permissions * The variable doesn\'t exist * The variable is being used by other objects + * @param param the request object + */ + public deleteVariable(param: VariableApiDeleteVariableRequest, options?: Configuration): Promise { + return this.api.deleteVariable(param.identifier, options).toPromise(); + } + + /** + * Delete variable(s) Version: 26.4.0.cl or later Allows deleting multiple variables from ThoughtSpot. Requires ADMINISTRATION role and TENANT scope. The CAN_MANAGE_VARIABLES permission allows you to manage Formula Variables in the current organization scope. The API endpoint requires: * The variable identifiers (IDs or names) The operation will fail if: * The user lacks required permissions * Any of the variables don\'t exist * Any of the variables are being used by other objects + * @param param the request object + */ + public deleteVariables(param: VariableApiDeleteVariablesRequest, options?: Configuration): Promise { + return this.api.deleteVariables(param.deleteVariablesRequest, options).toPromise(); + } + + /** + * Update values for a variable Version: 26.4.0.cl or later Allows updating values for a specific variable in ThoughtSpot. Requires ADMINISTRATION role. The CAN_MANAGE_VARIABLES permission allows you to manage Formula Variables in the current organization scope. The API endpoint allows: * Adding new values to the variable * Replacing existing values * Deleting values from the variable * Resetting all values When updating variable values, you need to specify: * The variable identifier (ID or name) * The values to add/replace/remove * The operation to perform (ADD, REPLACE, REMOVE, RESET) Behaviour based on operation type: * ADD - Adds values to the variable if this is a list type variable, else same as replace. * REPLACE - Replaces all values of a given set of constraints with the current set of values. * REMOVE - Removes any values which match the set of conditions of the variables if this is a list type variable, else clears value. * RESET - Removes all constraints for the given variable, scope is ignored + * @param param the request object + */ + public putVariableValues(param: VariableApiPutVariableValuesRequest, options?: Configuration): Promise { + return this.api.putVariableValues(param.identifier, param.putVariableValuesRequest, options).toPromise(); + } + + /** + * Search variables Version: 26.4.0.cl or later Allows searching for variables in ThoughtSpot. Requires ADMINISTRATION role. The CAN_MANAGE_VARIABLES permission allows you to manage Formula Variables in the current organization scope. The API endpoint supports searching variables by: * Variable identifier (ID or name) * Variable type * Name pattern (case-insensitive, supports % for wildcard) The search results can be formatted in three ways: * METADATA - Returns only variable metadata (default) * METADATA_AND_VALUES - Returns variable metadata and values The values can be filtered by scope: * org_identifier * principal_identifier * model_identifier + * @param param the request object + */ + public searchVariables(param: VariableApiSearchVariablesRequest, options?: Configuration): Promise> { + return this.api.searchVariables(param.searchVariablesRequest, options).toPromise(); + } + + /** + * Update a variable\'s name Version: 26.4.0.cl or later Allows updating a variable\'s name in ThoughtSpot. Requires ADMINISTRATION role and TENANT scope. The CAN_MANAGE_VARIABLES permission allows you to manage Formula Variables in the current organization scope. The API endpoint allows updating: * The variable name + * @param param the request object + */ + public updateVariable(param: VariableApiUpdateVariableRequest, options?: Configuration): Promise { + return this.api.updateVariable(param.identifier, param.updateVariableRequest, options).toPromise(); + } + + /** + * Update values for multiple variables Version: 10.14.0.cl or later **Note:** This API endpoint is deprecated and will be removed from ThoughtSpot in a future release. Use [POST /api/rest/2.0/template/variables/{identifier}/update-values](/api/rest/2.0/template/variables/%7Bidentifier%7D/update-values) instead. Allows updating values for multiple variables in ThoughtSpot. Requires ADMINISTRATION role. The CAN_MANAGE_VARIABLES permission allows you to manage Formula Variables in the current organization scope. The API endpoint allows: * Adding new values to variables * Replacing existing values * Deleting values from variables When updating variable values, you need to specify: * The variable identifiers * The values to add/replace/remove for each variable * The operation to perform (ADD, REPLACE, REMOVE, RESET) Behaviour based on operation type: * ADD - Adds values to the variable if this is a list type variable, else same as replace. * REPLACE - Replaces all values of a given set of constraints with the current set of values. * REMOVE - Removes any values which match the set of conditions of the variables if this is a list type variable, else clears value. * RESET - Removes all constrains for a given variable, scope is ignored + * @param param the request object + */ + public updateVariableValues(param: VariableApiUpdateVariableValuesRequest, options?: Configuration): Promise { + return this.api.updateVariableValues(param.updateVariableValuesRequest, options).toPromise(); + } + +} + +import { ObservableVersionControlApi } from "./ObservableAPI"; +import { VersionControlApiRequestFactory, VersionControlApiResponseProcessor} from "../apis/VersionControlApi"; + +export interface VersionControlApiCommitBranchRequest { + /** + * + * @type CommitBranchRequest + * @memberof VersionControlApicommitBranch + */ + commitBranchRequest: CommitBranchRequest +} + +export interface VersionControlApiCreateConfigRequest { + /** + * + * @type CreateConfigRequest + * @memberof VersionControlApicreateConfig + */ + createConfigRequest: CreateConfigRequest +} + +export interface VersionControlApiDeleteConfigRequest { + /** + * + * @type DeleteConfigRequest + * @memberof VersionControlApideleteConfig + */ + deleteConfigRequest: DeleteConfigRequest +} + +export interface VersionControlApiDeployCommitRequest { + /** + * + * @type DeployCommitRequest + * @memberof VersionControlApideployCommit + */ + deployCommitRequest: DeployCommitRequest +} + +export interface VersionControlApiRevertCommitRequest { + /** + * Commit id to which the object should be reverted + * @type string + * @memberof VersionControlApirevertCommit + */ + commitId: string + /** + * + * @type RevertCommitRequest + * @memberof VersionControlApirevertCommit + */ + revertCommitRequest: RevertCommitRequest +} + +export interface VersionControlApiSearchCommitsRequest { + /** + * + * @type SearchCommitsRequest + * @memberof VersionControlApisearchCommits + */ + searchCommitsRequest: SearchCommitsRequest +} + +export interface VersionControlApiSearchConfigRequest { + /** + * + * @type SearchConfigRequest + * @memberof VersionControlApisearchConfig + */ + searchConfigRequest: SearchConfigRequest +} + +export interface VersionControlApiUpdateConfigRequest { + /** + * + * @type UpdateConfigRequest + * @memberof VersionControlApiupdateConfig + */ + updateConfigRequest: UpdateConfigRequest +} + +export interface VersionControlApiValidateMergeRequest { + /** + * + * @type ValidateMergeRequest + * @memberof VersionControlApivalidateMerge + */ + validateMergeRequest: ValidateMergeRequest +} + +export class ObjectVersionControlApi { + private api: ObservableVersionControlApi + + public constructor(configuration: Configuration, requestFactory?: VersionControlApiRequestFactory, responseProcessor?: VersionControlApiResponseProcessor) { + this.api = new ObservableVersionControlApi(configuration, requestFactory, responseProcessor); + } + + /** + * Version: 9.2.0.cl or later Commits TML files of metadata objects to the Git branch configured on your instance. Requires at least edit access to objects used in the commit operation. Before using this endpoint to push your commits: * Enable Git integration on your instance. * Make sure the Git repository and branch details are configured on your instance. For more information, see [Git integration documentation](https://developers.thoughtspot.com/docs/git-integration). + * @param param the request object + */ + public commitBranch(param: VersionControlApiCommitBranchRequest, options?: Configuration): Promise { + return this.api.commitBranch(param.commitBranchRequest, options).toPromise(); + } + + /** + * Version: 9.2.0.cl or later Allows you to connect a ThoughtSpot instance to a Git repository. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance on your instance, the `CAN_SETUP_VERSION_CONTROL` (**Can set up version control**) privilege. You can use this API endpoint to connect your ThoughtSpot development and production environments to the development and production branches of a Git repository. Before using this endpoint to connect your ThoughtSpot instance to a Git repository, check the following prerequisites: * You have a Git repository. If you are using GitHub, make sure you have a valid account and an access token to connect ThoughtSpot to GitHub. For information about generating a token, see [GitHub Documentation](https://docs.github.com/en/authentication/keeping-your-account-and-data-secure/managing-your-personal-access-tokens). * Your access token has `repo` scope that grants full access to public and private repositories. * Your Git repository has a branch that can be configured as a default branch in ThoughtSpot. For more information, see [Git integration documentation](https://developers.thoughtspot.com/docs/?pageid=git-integration). **Note**: ThoughtSpot supports only GitHub / itHub Enterprise for CI/CD. + * @param param the request object + */ + public createConfig(param: VersionControlApiCreateConfigRequest, options?: Configuration): Promise { + return this.api.createConfig(param.createConfigRequest, options).toPromise(); + } + + /** + * Version: 9.2.0.cl or later Deletes Git repository configuration from your ThoughtSpot instance. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance on your instance, the `CAN_SETUP_VERSION_CONTROL` (**Can set up version control**) privilege. + * @param param the request object + */ + public deleteConfig(param: VersionControlApiDeleteConfigRequest, options?: Configuration): Promise { + return this.api.deleteConfig(param.deleteConfigRequest, options).toPromise(); + } + + /** + * Version: 9.2.0.cl or later Allows you to deploy a commit and publish TML content to your ThoughtSpot instance. Requires at least edit access to the objects used in the deploy operation. The API deploys the head of the branch unless a `commit_id` is specified in the API request. If the branch name is not defined in the request, the default branch is considered for deploying commits. For more information, see [Git integration documentation](https://developers.thoughtspot.com/docs/git-integration). + * @param param the request object + */ + public deployCommit(param: VersionControlApiDeployCommitRequest, options?: Configuration): Promise> { + return this.api.deployCommit(param.deployCommitRequest, options).toPromise(); + } + + /** + * Version: 9.2.0.cl or later Reverts TML objects to a previous commit specified in the API request. Requires at least edit access to objects. In the API request, specify the `commit_id`. If the branch name is not specified in the request, the API will consider the default branch configured on your instance. By default, the API reverts all objects. If the revert operation fails for one of the objects provided in the commit, the API returns an error and does not revert any object. For more information, see [Git integration documentation](https://developers.thoughtspot.com/docs/git-integration). + * @param param the request object + */ + public revertCommit(param: VersionControlApiRevertCommitRequest, options?: Configuration): Promise { + return this.api.revertCommit(param.commitId, param.revertCommitRequest, options).toPromise(); + } + + /** + * Version: 9.2.0.cl or later Gets a list of commits for a given metadata object. Requires `DATAMANAGEMENT` (**Can manage data**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance on your instance, the `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` (**Can manage data models**) privilege and edit access to the metadata objects. + * @param param the request object + */ + public searchCommits(param: VersionControlApiSearchCommitsRequest, options?: Configuration): Promise> { + return this.api.searchCommits(param.searchCommitsRequest, options).toPromise(); + } + + /** + * Version: 9.2.0.cl or later Gets Git repository connections configured on the ThoughtSpot instance. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance on your instance, the `CAN_SETUP_VERSION_CONTROL` (**Can set up version control**) privilege. + * @param param the request object + */ + public searchConfig(param: VersionControlApiSearchConfigRequest, options?: Configuration): Promise> { + return this.api.searchConfig(param.searchConfigRequest, options).toPromise(); + } + + /** + * Version: 9.2.0.cl or later Updates Git repository configuration settings. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance on your instance, the `CAN_SETUP_VERSION_CONTROL` (**Can set up version control**) privilege. + * @param param the request object + */ + public updateConfig(param: VersionControlApiUpdateConfigRequest, options?: Configuration): Promise { + return this.api.updateConfig(param.updateConfigRequest, options).toPromise(); + } + + /** + * Version: 9.2.0.cl or later Validates the content of your source branch against the objects in your destination environment. Before merging content from your source branch to the destination branch, run this API operation from your destination environment and ensure that the changes from the source branch function in the destination environment. Requires `DATAMANAGEMENT` (**Can manage data**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance on your instance, the `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` (**Can manage data models**) privilege and edit access to the metadata objects. + * @param param the request object + */ + public validateMerge(param: VersionControlApiValidateMergeRequest, options?: Configuration): Promise> { + return this.api.validateMerge(param.validateMergeRequest, options).toPromise(); + } + +} + +import { ObservableWebhooksApi } from "./ObservableAPI"; +import { WebhooksApiRequestFactory, WebhooksApiResponseProcessor} from "../apis/WebhooksApi"; + +export interface WebhooksApiCreateWebhookConfigurationRequest { + /** + * + * @type CreateWebhookConfigurationRequest + * @memberof WebhooksApicreateWebhookConfiguration + */ + createWebhookConfigurationRequest: CreateWebhookConfigurationRequest +} + +export interface WebhooksApiDeleteWebhookConfigurationsRequest { + /** + * + * @type DeleteWebhookConfigurationsRequest + * @memberof WebhooksApideleteWebhookConfigurations + */ + deleteWebhookConfigurationsRequest: DeleteWebhookConfigurationsRequest +} + +export interface WebhooksApiSearchWebhookConfigurationsRequest { + /** + * + * @type SearchWebhookConfigurationsRequest + * @memberof WebhooksApisearchWebhookConfigurations + */ + searchWebhookConfigurationsRequest: SearchWebhookConfigurationsRequest +} + +export interface WebhooksApiUpdateWebhookConfigurationRequest { + /** + * Unique ID or name of the webhook configuration. + * @type string + * @memberof WebhooksApiupdateWebhookConfiguration + */ + webhookIdentifier: string + /** + * + * @type UpdateWebhookConfigurationRequest + * @memberof WebhooksApiupdateWebhookConfiguration + */ + updateWebhookConfigurationRequest: UpdateWebhookConfigurationRequest +} + +export class ObjectWebhooksApi { + private api: ObservableWebhooksApi + + public constructor(configuration: Configuration, requestFactory?: WebhooksApiRequestFactory, responseProcessor?: WebhooksApiResponseProcessor) { + this.api = new ObservableWebhooksApi(configuration, requestFactory, responseProcessor); + } + + /** + * Version: 10.14.0.cl or later Creates a new webhook configuration to receive notifications for specified events. The webhook will be triggered when the configured events occur in the system. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) or `DEVELOPER` (**Has developer privilege**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, users with `CAN_MANAGE_WEBHOOKS` (**Can manage webhooks**) privilege are also authorized to perform this action. + * @param param the request object + */ + public createWebhookConfiguration(param: WebhooksApiCreateWebhookConfigurationRequest, options?: Configuration): Promise { + return this.api.createWebhookConfiguration(param.createWebhookConfigurationRequest, options).toPromise(); + } + + /** + * Version: 10.14.0.cl or later Deletes one or more webhook configurations by their unique id or name. Returns status of each deletion operation, including successfully deleted webhooks and any failures with error details. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) or `DEVELOPER` (**Has developer privilege**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, users with `CAN_MANAGE_WEBHOOKS` (**Can manage webhooks**) privilege are also authorized to perform this action. + * @param param the request object + */ + public deleteWebhookConfigurations(param: WebhooksApiDeleteWebhookConfigurationsRequest, options?: Configuration): Promise { + return this.api.deleteWebhookConfigurations(param.deleteWebhookConfigurationsRequest, options).toPromise(); + } + + /** + * Version: 10.14.0.cl or later Searches for webhook configurations based on various criteria such as Org, webhook identifier, event type, with support for pagination and sorting. Returns matching webhook configurations with their complete details. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) or `DEVELOPER` (**Has developer privilege**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, users with `CAN_MANAGE_WEBHOOKS` (**Can manage webhooks**) privilege are also authorized to perform this action. + * @param param the request object + */ + public searchWebhookConfigurations(param: WebhooksApiSearchWebhookConfigurationsRequest, options?: Configuration): Promise { + return this.api.searchWebhookConfigurations(param.searchWebhookConfigurationsRequest, options).toPromise(); + } + + /** + * Version: 10.14.0.cl or later Updates an existing webhook configuration by its unique id or name. Only the provided fields will be updated. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) or `DEVELOPER` (**Has developer privilege**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, users with `CAN_MANAGE_WEBHOOKS` (**Can manage webhooks**) privilege are also authorized to perform this action. + * @param param the request object + */ + public updateWebhookConfiguration(param: WebhooksApiUpdateWebhookConfigurationRequest, options?: Configuration): Promise { + return this.api.updateWebhookConfiguration(param.webhookIdentifier, param.updateWebhookConfigurationRequest, options).toPromise(); + } + +} diff --git a/sdks/typescript/types/ObservableAPI.ts b/sdks/typescript/types/ObservableAPI.ts new file mode 100644 index 000000000..d4f2bec90 --- /dev/null +++ b/sdks/typescript/types/ObservableAPI.ts @@ -0,0 +1,8371 @@ +import { ResponseContext, RequestContext, HttpFile } from '../http/http'; +import { Configuration} from '../configuration' +import { Observable, of, from } from '../rxjsStub'; +import {mergeMap, map} from '../rxjsStub'; +import { AIContext } from '../models/AIContext'; +import { APIKey } from '../models/APIKey'; +import { APIKeyInput } from '../models/APIKeyInput'; +import { AccessToken } from '../models/AccessToken'; +import { ActionConfig } from '../models/ActionConfig'; +import { ActionConfigInput } from '../models/ActionConfigInput'; +import { ActionConfigInputCreate } from '../models/ActionConfigInputCreate'; +import { ActionDetails } from '../models/ActionDetails'; +import { ActionDetailsInput } from '../models/ActionDetailsInput'; +import { ActionDetailsInputCreate } from '../models/ActionDetailsInputCreate'; +import { ActivateUserRequest } from '../models/ActivateUserRequest'; +import { AgentConversation } from '../models/AgentConversation'; +import { AnswerContent } from '../models/AnswerContent'; +import { AnswerDataResponse } from '../models/AnswerDataResponse'; +import { AnswerPngOptionsInput } from '../models/AnswerPngOptionsInput'; +import { AssignChangeAuthorRequest } from '../models/AssignChangeAuthorRequest'; +import { AssignTagRequest } from '../models/AssignTagRequest'; +import { AssociateMetadataInput } from '../models/AssociateMetadataInput'; +import { AssociateMetadataInputCreate } from '../models/AssociateMetadataInputCreate'; +import { AuthClusterPreferences } from '../models/AuthClusterPreferences'; +import { AuthClusterPreferencesInput } from '../models/AuthClusterPreferencesInput'; +import { AuthOrgInfo } from '../models/AuthOrgInfo'; +import { AuthOrgPreference } from '../models/AuthOrgPreference'; +import { AuthOrgPreferenceInput } from '../models/AuthOrgPreferenceInput'; +import { AuthSettingsAccessToken } from '../models/AuthSettingsAccessToken'; +import { Authentication } from '../models/Authentication'; +import { AuthenticationInput } from '../models/AuthenticationInput'; +import { Author } from '../models/Author'; +import { AuthorMetadataTypeInput } from '../models/AuthorMetadataTypeInput'; +import { AuthorType } from '../models/AuthorType'; +import { AwsS3Config } from '../models/AwsS3Config'; +import { AwsS3ConfigInput } from '../models/AwsS3ConfigInput'; +import { BasicAuth } from '../models/BasicAuth'; +import { BasicAuthInput } from '../models/BasicAuthInput'; +import { CALLBACK } from '../models/CALLBACK'; +import { CALLBACKInput } from '../models/CALLBACKInput'; +import { CALLBACKInputMandatory } from '../models/CALLBACKInputMandatory'; +import { CalendarResponse } from '../models/CalendarResponse'; +import { ChangeUserPasswordRequest } from '../models/ChangeUserPasswordRequest'; +import { ChannelHistoryEventInfo } from '../models/ChannelHistoryEventInfo'; +import { ChannelHistoryEventInput } from '../models/ChannelHistoryEventInput'; +import { ChannelHistoryJob } from '../models/ChannelHistoryJob'; +import { ChannelValidationAwsS3Info } from '../models/ChannelValidationAwsS3Info'; +import { ChannelValidationDetail } from '../models/ChannelValidationDetail'; +import { ClusterNonEmbedAccess } from '../models/ClusterNonEmbedAccess'; +import { ClusterNonEmbedAccessInput } from '../models/ClusterNonEmbedAccessInput'; +import { Collection } from '../models/Collection'; +import { CollectionDeleteResponse } from '../models/CollectionDeleteResponse'; +import { CollectionDeleteTypeIdentifiers } from '../models/CollectionDeleteTypeIdentifiers'; +import { CollectionEntityIdentifier } from '../models/CollectionEntityIdentifier'; +import { CollectionMetadataInput } from '../models/CollectionMetadataInput'; +import { CollectionMetadataItem } from '../models/CollectionMetadataItem'; +import { CollectionSearchResponse } from '../models/CollectionSearchResponse'; +import { Column } from '../models/Column'; +import { ColumnSecurityRule } from '../models/ColumnSecurityRule'; +import { ColumnSecurityRuleColumn } from '../models/ColumnSecurityRuleColumn'; +import { ColumnSecurityRuleGroup } from '../models/ColumnSecurityRuleGroup'; +import { ColumnSecurityRuleGroupOperation } from '../models/ColumnSecurityRuleGroupOperation'; +import { ColumnSecurityRuleResponse } from '../models/ColumnSecurityRuleResponse'; +import { ColumnSecurityRuleSourceTable } from '../models/ColumnSecurityRuleSourceTable'; +import { ColumnSecurityRuleTableInput } from '../models/ColumnSecurityRuleTableInput'; +import { ColumnSecurityRuleUpdate } from '../models/ColumnSecurityRuleUpdate'; +import { CommitBranchRequest } from '../models/CommitBranchRequest'; +import { CommitFileType } from '../models/CommitFileType'; +import { CommitHistoryResponse } from '../models/CommitHistoryResponse'; +import { CommitResponse } from '../models/CommitResponse'; +import { CommiterType } from '../models/CommiterType'; +import { CommunicationChannelPreferencesResponse } from '../models/CommunicationChannelPreferencesResponse'; +import { CommunicationChannelValidateResponse } from '../models/CommunicationChannelValidateResponse'; +import { ConfigureAuthSettingsRequest } from '../models/ConfigureAuthSettingsRequest'; +import { ConfigureAuthSettingsRequestClusterPreferences } from '../models/ConfigureAuthSettingsRequestClusterPreferences'; +import { ConfigureCommunicationChannelPreferencesRequest } from '../models/ConfigureCommunicationChannelPreferencesRequest'; +import { ConfigureSecuritySettingsRequest } from '../models/ConfigureSecuritySettingsRequest'; +import { ConfigureSecuritySettingsRequestClusterPreferences } from '../models/ConfigureSecuritySettingsRequestClusterPreferences'; +import { ConnectionConfigurationResponse } from '../models/ConnectionConfigurationResponse'; +import { ConnectionConfigurationSearchRequest } from '../models/ConnectionConfigurationSearchRequest'; +import { ConnectionInput } from '../models/ConnectionInput'; +import { ContextPayloadV2Input } from '../models/ContextPayloadV2Input'; +import { Conversation } from '../models/Conversation'; +import { ConversationSettingsInput } from '../models/ConversationSettingsInput'; +import { ConvertWorksheetToModelRequest } from '../models/ConvertWorksheetToModelRequest'; +import { CopyObjectRequest } from '../models/CopyObjectRequest'; +import { CreateAgentConversationRequest } from '../models/CreateAgentConversationRequest'; +import { CreateAgentConversationRequestConversationSettings } from '../models/CreateAgentConversationRequestConversationSettings'; +import { CreateAgentConversationRequestMetadataContext } from '../models/CreateAgentConversationRequestMetadataContext'; +import { CreateCalendarRequest } from '../models/CreateCalendarRequest'; +import { CreateCalendarRequestTableReference } from '../models/CreateCalendarRequestTableReference'; +import { CreateCollectionRequest } from '../models/CreateCollectionRequest'; +import { CreateConfigRequest } from '../models/CreateConfigRequest'; +import { CreateConnectionConfigurationRequest } from '../models/CreateConnectionConfigurationRequest'; +import { CreateConnectionConfigurationRequestPolicyProcessOptions } from '../models/CreateConnectionConfigurationRequestPolicyProcessOptions'; +import { CreateConnectionRequest } from '../models/CreateConnectionRequest'; +import { CreateConnectionResponse } from '../models/CreateConnectionResponse'; +import { CreateConversationRequest } from '../models/CreateConversationRequest'; +import { CreateCustomActionRequest } from '../models/CreateCustomActionRequest'; +import { CreateCustomActionRequestActionDetails } from '../models/CreateCustomActionRequestActionDetails'; +import { CreateCustomActionRequestDefaultActionConfig } from '../models/CreateCustomActionRequestDefaultActionConfig'; +import { CreateEmailCustomizationRequest } from '../models/CreateEmailCustomizationRequest'; +import { CreateEmailCustomizationRequestTemplateProperties } from '../models/CreateEmailCustomizationRequestTemplateProperties'; +import { CreateEmailCustomizationResponse } from '../models/CreateEmailCustomizationResponse'; +import { CreateOrgRequest } from '../models/CreateOrgRequest'; +import { CreateRoleRequest } from '../models/CreateRoleRequest'; +import { CreateScheduleRequest } from '../models/CreateScheduleRequest'; +import { CreateScheduleRequestFrequency } from '../models/CreateScheduleRequestFrequency'; +import { CreateScheduleRequestLiveboardOptions } from '../models/CreateScheduleRequestLiveboardOptions'; +import { CreateScheduleRequestPdfOptions } from '../models/CreateScheduleRequestPdfOptions'; +import { CreateScheduleRequestRecipientDetails } from '../models/CreateScheduleRequestRecipientDetails'; +import { CreateTagRequest } from '../models/CreateTagRequest'; +import { CreateUserGroupRequest } from '../models/CreateUserGroupRequest'; +import { CreateUserRequest } from '../models/CreateUserRequest'; +import { CreateVariableRequest } from '../models/CreateVariableRequest'; +import { CreateWebhookConfigurationRequest } from '../models/CreateWebhookConfigurationRequest'; +import { CreateWebhookConfigurationRequestAuthentication } from '../models/CreateWebhookConfigurationRequestAuthentication'; +import { CreateWebhookConfigurationRequestSignatureVerification } from '../models/CreateWebhookConfigurationRequestSignatureVerification'; +import { CreateWebhookConfigurationRequestStorageDestination } from '../models/CreateWebhookConfigurationRequestStorageDestination'; +import { CronExpression } from '../models/CronExpression'; +import { CronExpressionInput } from '../models/CronExpressionInput'; +import { CspSettings } from '../models/CspSettings'; +import { CspSettingsInput } from '../models/CspSettingsInput'; +import { CustomActionMetadataTypeInput } from '../models/CustomActionMetadataTypeInput'; +import { DataSource } from '../models/DataSource'; +import { DataSourceContextInput } from '../models/DataSourceContextInput'; +import { DataWarehouseObjectInput } from '../models/DataWarehouseObjectInput'; +import { DataWarehouseObjects } from '../models/DataWarehouseObjects'; +import { Database } from '../models/Database'; +import { DbtSearchResponse } from '../models/DbtSearchResponse'; +import { DeactivateUserRequest } from '../models/DeactivateUserRequest'; +import { DefaultActionConfig } from '../models/DefaultActionConfig'; +import { DefaultActionConfigInput } from '../models/DefaultActionConfigInput'; +import { DefaultActionConfigInputCreate } from '../models/DefaultActionConfigInputCreate'; +import { DefaultActionConfigSearchInput } from '../models/DefaultActionConfigSearchInput'; +import { DeleteCollectionRequest } from '../models/DeleteCollectionRequest'; +import { DeleteConfigRequest } from '../models/DeleteConfigRequest'; +import { DeleteConnectionConfigurationRequest } from '../models/DeleteConnectionConfigurationRequest'; +import { DeleteConnectionRequest } from '../models/DeleteConnectionRequest'; +import { DeleteMetadataRequest } from '../models/DeleteMetadataRequest'; +import { DeleteMetadataTypeInput } from '../models/DeleteMetadataTypeInput'; +import { DeleteOrgEmailCustomizationRequest } from '../models/DeleteOrgEmailCustomizationRequest'; +import { DeleteVariablesRequest } from '../models/DeleteVariablesRequest'; +import { DeleteWebhookConfigurationsRequest } from '../models/DeleteWebhookConfigurationsRequest'; +import { DeployCommitRequest } from '../models/DeployCommitRequest'; +import { DeployResponse } from '../models/DeployResponse'; +import { EntityHeader } from '../models/EntityHeader'; +import { ErrorResponse } from '../models/ErrorResponse'; +import { EurekaDataSourceSuggestionResponse } from '../models/EurekaDataSourceSuggestionResponse'; +import { EurekaDecomposeQueryResponse } from '../models/EurekaDecomposeQueryResponse'; +import { EurekaGetNLInstructionsResponse } from '../models/EurekaGetNLInstructionsResponse'; +import { EurekaGetRelevantQuestionsResponse } from '../models/EurekaGetRelevantQuestionsResponse'; +import { EurekaLLMDecomposeQueryResponse } from '../models/EurekaLLMDecomposeQueryResponse'; +import { EurekaLLMSuggestedQuery } from '../models/EurekaLLMSuggestedQuery'; +import { EurekaRelevantQuestion } from '../models/EurekaRelevantQuestion'; +import { EurekaSetNLInstructionsResponse } from '../models/EurekaSetNLInstructionsResponse'; +import { EventChannelConfig } from '../models/EventChannelConfig'; +import { EventChannelConfigInput } from '../models/EventChannelConfigInput'; +import { ExcludeMetadataListItemInput } from '../models/ExcludeMetadataListItemInput'; +import { ExportAnswerReportRequest } from '../models/ExportAnswerReportRequest'; +import { ExportAnswerReportRequestPngOptions } from '../models/ExportAnswerReportRequestPngOptions'; +import { ExportAnswerReportRequestRegionalSettings } from '../models/ExportAnswerReportRequestRegionalSettings'; +import { ExportLiveboardReportRequest } from '../models/ExportLiveboardReportRequest'; +import { ExportLiveboardReportRequestPdfOptions } from '../models/ExportLiveboardReportRequestPdfOptions'; +import { ExportLiveboardReportRequestPngOptions } from '../models/ExportLiveboardReportRequestPngOptions'; +import { ExportMetadataTMLBatchedRequest } from '../models/ExportMetadataTMLBatchedRequest'; +import { ExportMetadataTMLRequest } from '../models/ExportMetadataTMLRequest'; +import { ExportMetadataTMLRequestExportOptions } from '../models/ExportMetadataTMLRequestExportOptions'; +import { ExportMetadataTypeInput } from '../models/ExportMetadataTypeInput'; +import { ExportOptions } from '../models/ExportOptions'; +import { ExternalTableInput } from '../models/ExternalTableInput'; +import { FavoriteMetadataInput } from '../models/FavoriteMetadataInput'; +import { FavoriteMetadataItem } from '../models/FavoriteMetadataItem'; +import { FavoriteObjectOptionsInput } from '../models/FavoriteObjectOptionsInput'; +import { FetchAnswerDataRequest } from '../models/FetchAnswerDataRequest'; +import { FetchAnswerSqlQueryRequest } from '../models/FetchAnswerSqlQueryRequest'; +import { FetchAsyncImportTaskStatusRequest } from '../models/FetchAsyncImportTaskStatusRequest'; +import { FetchColumnSecurityRulesRequest } from '../models/FetchColumnSecurityRulesRequest'; +import { FetchConnectionDiffStatusResponse } from '../models/FetchConnectionDiffStatusResponse'; +import { FetchLiveboardDataRequest } from '../models/FetchLiveboardDataRequest'; +import { FetchLiveboardSqlQueryRequest } from '../models/FetchLiveboardSqlQueryRequest'; +import { FetchLogsRequest } from '../models/FetchLogsRequest'; +import { FetchObjectPrivilegesRequest } from '../models/FetchObjectPrivilegesRequest'; +import { FetchPermissionsOfPrincipalsRequest } from '../models/FetchPermissionsOfPrincipalsRequest'; +import { FetchPermissionsOnMetadataRequest } from '../models/FetchPermissionsOnMetadataRequest'; +import { FilterRules } from '../models/FilterRules'; +import { ForceLogoutUsersRequest } from '../models/ForceLogoutUsersRequest'; +import { Frequency } from '../models/Frequency'; +import { FrequencyInput } from '../models/FrequencyInput'; +import { GenerateCSVRequest } from '../models/GenerateCSVRequest'; +import { GenericInfo } from '../models/GenericInfo'; +import { GetAsyncImportStatusResponse } from '../models/GetAsyncImportStatusResponse'; +import { GetCustomAccessTokenRequest } from '../models/GetCustomAccessTokenRequest'; +import { GetDataSourceSuggestionsRequest } from '../models/GetDataSourceSuggestionsRequest'; +import { GetFullAccessTokenRequest } from '../models/GetFullAccessTokenRequest'; +import { GetFullAccessTokenRequestUserParameters } from '../models/GetFullAccessTokenRequestUserParameters'; +import { GetNLInstructionsRequest } from '../models/GetNLInstructionsRequest'; +import { GetObjectAccessTokenRequest } from '../models/GetObjectAccessTokenRequest'; +import { GetRelevantQuestionsRequest } from '../models/GetRelevantQuestionsRequest'; +import { GetRelevantQuestionsRequestAiContext } from '../models/GetRelevantQuestionsRequestAiContext'; +import { GetRelevantQuestionsRequestMetadataContext } from '../models/GetRelevantQuestionsRequestMetadataContext'; +import { GetTokenResponse } from '../models/GetTokenResponse'; +import { GroupInfo } from '../models/GroupInfo'; +import { GroupObject } from '../models/GroupObject'; +import { GroupsImportListInput } from '../models/GroupsImportListInput'; +import { HeaderAttributeInput } from '../models/HeaderAttributeInput'; +import { HeaderUpdateInput } from '../models/HeaderUpdateInput'; +import { ImportEPackAsyncTaskStatus } from '../models/ImportEPackAsyncTaskStatus'; +import { ImportMetadataTMLAsyncRequest } from '../models/ImportMetadataTMLAsyncRequest'; +import { ImportMetadataTMLRequest } from '../models/ImportMetadataTMLRequest'; +import { ImportUser } from '../models/ImportUser'; +import { ImportUserGroupsRequest } from '../models/ImportUserGroupsRequest'; +import { ImportUserGroupsResponse } from '../models/ImportUserGroupsResponse'; +import { ImportUserType } from '../models/ImportUserType'; +import { ImportUsersRequest } from '../models/ImportUsersRequest'; +import { ImportUsersResponse } from '../models/ImportUsersResponse'; +import { InputEurekaNLSRequest } from '../models/InputEurekaNLSRequest'; +import { JWTMetadataObject } from '../models/JWTMetadataObject'; +import { JWTParameter } from '../models/JWTParameter'; +import { JWTUserOptions } from '../models/JWTUserOptions'; +import { JWTUserOptionsFull } from '../models/JWTUserOptionsFull'; +import { JobRecipient } from '../models/JobRecipient'; +import { LiveboardContent } from '../models/LiveboardContent'; +import { LiveboardDataResponse } from '../models/LiveboardDataResponse'; +import { LiveboardOptions } from '../models/LiveboardOptions'; +import { LiveboardOptionsInput } from '../models/LiveboardOptionsInput'; +import { LogResponse } from '../models/LogResponse'; +import { LoginRequest } from '../models/LoginRequest'; +import { ManageObjectPrivilegeRequest } from '../models/ManageObjectPrivilegeRequest'; +import { MetadataAssociationItem } from '../models/MetadataAssociationItem'; +import { MetadataContext } from '../models/MetadataContext'; +import { MetadataInput } from '../models/MetadataInput'; +import { MetadataListItemInput } from '../models/MetadataListItemInput'; +import { MetadataObject } from '../models/MetadataObject'; +import { MetadataResponse } from '../models/MetadataResponse'; +import { MetadataSearchResponse } from '../models/MetadataSearchResponse'; +import { MetadataSearchSortOptions } from '../models/MetadataSearchSortOptions'; +import { ModelTableList } from '../models/ModelTableList'; +import { NLInstructionsInfo } from '../models/NLInstructionsInfo'; +import { NLInstructionsInfoInput } from '../models/NLInstructionsInfoInput'; +import { ObjectIDAndName } from '../models/ObjectIDAndName'; +import { ObjectPrivilegesMetadataInput } from '../models/ObjectPrivilegesMetadataInput'; +import { ObjectPrivilegesOfMetadataResponse } from '../models/ObjectPrivilegesOfMetadataResponse'; +import { Org } from '../models/Org'; +import { OrgChannelConfigInput } from '../models/OrgChannelConfigInput'; +import { OrgChannelConfigResponse } from '../models/OrgChannelConfigResponse'; +import { OrgDetails } from '../models/OrgDetails'; +import { OrgInfo } from '../models/OrgInfo'; +import { OrgNonEmbedAccess } from '../models/OrgNonEmbedAccess'; +import { OrgNonEmbedAccessInput } from '../models/OrgNonEmbedAccessInput'; +import { OrgPreferenceSearchCriteriaInput } from '../models/OrgPreferenceSearchCriteriaInput'; +import { OrgResponse } from '../models/OrgResponse'; +import { OrgType } from '../models/OrgType'; +import { ParameterValues } from '../models/ParameterValues'; +import { ParameterizeMetadataFieldsRequest } from '../models/ParameterizeMetadataFieldsRequest'; +import { ParameterizeMetadataRequest } from '../models/ParameterizeMetadataRequest'; +import { ParametersListItem } from '../models/ParametersListItem'; +import { ParametersListItemInput } from '../models/ParametersListItemInput'; +import { PdfOptions } from '../models/PdfOptions'; +import { PdfOptionsInput } from '../models/PdfOptionsInput'; +import { PermissionInput } from '../models/PermissionInput'; +import { PermissionOfMetadataResponse } from '../models/PermissionOfMetadataResponse'; +import { PermissionOfPrincipalsResponse } from '../models/PermissionOfPrincipalsResponse'; +import { PermissionsMetadataTypeInput } from '../models/PermissionsMetadataTypeInput'; +import { PngOptionsInput } from '../models/PngOptionsInput'; +import { PolicyProcessOptions } from '../models/PolicyProcessOptions'; +import { PolicyProcessOptionsInput } from '../models/PolicyProcessOptionsInput'; +import { PrincipalsInput } from '../models/PrincipalsInput'; +import { PrincipalsListItem } from '../models/PrincipalsListItem'; +import { PrincipalsListItemInput } from '../models/PrincipalsListItemInput'; +import { PublishMetadataListItem } from '../models/PublishMetadataListItem'; +import { PublishMetadataRequest } from '../models/PublishMetadataRequest'; +import { PutVariableValuesRequest } from '../models/PutVariableValuesRequest'; +import { QueryGetDecomposedQueryRequest } from '../models/QueryGetDecomposedQueryRequest'; +import { QueryGetDecomposedQueryRequestNlsRequest } from '../models/QueryGetDecomposedQueryRequestNlsRequest'; +import { RecipientDetails } from '../models/RecipientDetails'; +import { RecipientDetailsInput } from '../models/RecipientDetailsInput'; +import { RegionalSettingsInput } from '../models/RegionalSettingsInput'; +import { RepoConfigObject } from '../models/RepoConfigObject'; +import { ResetUserPasswordRequest } from '../models/ResetUserPasswordRequest'; +import { ResponseActivationURL } from '../models/ResponseActivationURL'; +import { ResponseCopyObject } from '../models/ResponseCopyObject'; +import { ResponseCustomAction } from '../models/ResponseCustomAction'; +import { ResponseFailedEntities } from '../models/ResponseFailedEntities'; +import { ResponseFailedEntity } from '../models/ResponseFailedEntity'; +import { ResponseIncompleteEntities } from '../models/ResponseIncompleteEntities'; +import { ResponseIncompleteEntity } from '../models/ResponseIncompleteEntity'; +import { ResponseMessage } from '../models/ResponseMessage'; +import { ResponsePostUpgradeFailedEntities } from '../models/ResponsePostUpgradeFailedEntities'; +import { ResponsePostUpgradeFailedEntity } from '../models/ResponsePostUpgradeFailedEntity'; +import { ResponseSchedule } from '../models/ResponseSchedule'; +import { ResponseScheduleRun } from '../models/ResponseScheduleRun'; +import { ResponseSuccessfulEntities } from '../models/ResponseSuccessfulEntities'; +import { ResponseSuccessfulEntity } from '../models/ResponseSuccessfulEntity'; +import { ResponseWorksheetToModelConversion } from '../models/ResponseWorksheetToModelConversion'; +import { RevertCommitRequest } from '../models/RevertCommitRequest'; +import { RevertResponse } from '../models/RevertResponse'; +import { RevertedMetadata } from '../models/RevertedMetadata'; +import { RevokeRefreshTokensRequest } from '../models/RevokeRefreshTokensRequest'; +import { RevokeRefreshTokensResponse } from '../models/RevokeRefreshTokensResponse'; +import { RevokeTokenRequest } from '../models/RevokeTokenRequest'; +import { RiseGQLArgWrapper } from '../models/RiseGQLArgWrapper'; +import { RiseSetter } from '../models/RiseSetter'; +import { Role } from '../models/Role'; +import { RoleResponse } from '../models/RoleResponse'; +import { RuntimeFilter } from '../models/RuntimeFilter'; +import { RuntimeFilters } from '../models/RuntimeFilters'; +import { RuntimeParamOverride } from '../models/RuntimeParamOverride'; +import { RuntimeParameters } from '../models/RuntimeParameters'; +import { RuntimeSort } from '../models/RuntimeSort'; +import { RuntimeSorts } from '../models/RuntimeSorts'; +import { ScheduleHistoryRunsOptionsInput } from '../models/ScheduleHistoryRunsOptionsInput'; +import { SchedulesPdfOptionsInput } from '../models/SchedulesPdfOptionsInput'; +import { SchemaObject } from '../models/SchemaObject'; +import { Scope } from '../models/Scope'; +import { ScriptSrcUrls } from '../models/ScriptSrcUrls'; +import { ScriptSrcUrlsInput } from '../models/ScriptSrcUrlsInput'; +import { SearchAuthSettingsRequest } from '../models/SearchAuthSettingsRequest'; +import { SearchAuthSettingsResponse } from '../models/SearchAuthSettingsResponse'; +import { SearchCalendarsRequest } from '../models/SearchCalendarsRequest'; +import { SearchCalendarsRequestSortOptions } from '../models/SearchCalendarsRequestSortOptions'; +import { SearchChannelHistoryRequest } from '../models/SearchChannelHistoryRequest'; +import { SearchChannelHistoryResponse } from '../models/SearchChannelHistoryResponse'; +import { SearchCollectionsRequest } from '../models/SearchCollectionsRequest'; +import { SearchCollectionsRequestSortOptions } from '../models/SearchCollectionsRequestSortOptions'; +import { SearchCommitsRequest } from '../models/SearchCommitsRequest'; +import { SearchCommunicationChannelPreferencesRequest } from '../models/SearchCommunicationChannelPreferencesRequest'; +import { SearchConfigRequest } from '../models/SearchConfigRequest'; +import { SearchConnectionRequest } from '../models/SearchConnectionRequest'; +import { SearchConnectionRequestSortOptions } from '../models/SearchConnectionRequestSortOptions'; +import { SearchConnectionResponse } from '../models/SearchConnectionResponse'; +import { SearchCustomActionsRequest } from '../models/SearchCustomActionsRequest'; +import { SearchCustomActionsRequestDefaultActionConfig } from '../models/SearchCustomActionsRequestDefaultActionConfig'; +import { SearchDataRequest } from '../models/SearchDataRequest'; +import { SearchDataResponse } from '../models/SearchDataResponse'; +import { SearchEmailCustomizationRequest } from '../models/SearchEmailCustomizationRequest'; +import { SearchMetadataRequest } from '../models/SearchMetadataRequest'; +import { SearchMetadataRequestFavoriteObjectOptions } from '../models/SearchMetadataRequestFavoriteObjectOptions'; +import { SearchMetadataRequestSortOptions } from '../models/SearchMetadataRequestSortOptions'; +import { SearchOrgsRequest } from '../models/SearchOrgsRequest'; +import { SearchRoleResponse } from '../models/SearchRoleResponse'; +import { SearchRolesRequest } from '../models/SearchRolesRequest'; +import { SearchSchedulesRequest } from '../models/SearchSchedulesRequest'; +import { SearchSchedulesRequestHistoryRunsOptions } from '../models/SearchSchedulesRequestHistoryRunsOptions'; +import { SearchSchedulesRequestSortOptions } from '../models/SearchSchedulesRequestSortOptions'; +import { SearchSecuritySettingsRequest } from '../models/SearchSecuritySettingsRequest'; +import { SearchTagsRequest } from '../models/SearchTagsRequest'; +import { SearchUserGroupsRequest } from '../models/SearchUserGroupsRequest'; +import { SearchUserGroupsRequestSortOptions } from '../models/SearchUserGroupsRequestSortOptions'; +import { SearchUsersRequest } from '../models/SearchUsersRequest'; +import { SearchVariablesRequest } from '../models/SearchVariablesRequest'; +import { SearchWebhookConfigurationsRequest } from '../models/SearchWebhookConfigurationsRequest'; +import { SearchWebhookConfigurationsRequestSortOptions } from '../models/SearchWebhookConfigurationsRequestSortOptions'; +import { SecuritySettingsClusterPreferences } from '../models/SecuritySettingsClusterPreferences'; +import { SecuritySettingsClusterPreferencesInput } from '../models/SecuritySettingsClusterPreferencesInput'; +import { SecuritySettingsOrgDetails } from '../models/SecuritySettingsOrgDetails'; +import { SecuritySettingsOrgPreferences } from '../models/SecuritySettingsOrgPreferences'; +import { SecuritySettingsOrgPreferencesInput } from '../models/SecuritySettingsOrgPreferencesInput'; +import { SecuritySettingsResponse } from '../models/SecuritySettingsResponse'; +import { SendAgentConversationMessageRequest } from '../models/SendAgentConversationMessageRequest'; +import { SendAgentConversationMessageStreamingRequest } from '../models/SendAgentConversationMessageStreamingRequest'; +import { SendAgentMessageRequest } from '../models/SendAgentMessageRequest'; +import { SendAgentMessageResponse } from '../models/SendAgentMessageResponse'; +import { SendAgentMessageStreamingRequest } from '../models/SendAgentMessageStreamingRequest'; +import { SendMessageRequest } from '../models/SendMessageRequest'; +import { SetNLInstructionsRequest } from '../models/SetNLInstructionsRequest'; +import { ShareMetadataRequest } from '../models/ShareMetadataRequest'; +import { ShareMetadataTypeInput } from '../models/ShareMetadataTypeInput'; +import { SharePermissionsInput } from '../models/SharePermissionsInput'; +import { SingleAnswerRequest } from '../models/SingleAnswerRequest'; +import { SortOption } from '../models/SortOption'; +import { SortOptionInput } from '../models/SortOptionInput'; +import { SortOptions } from '../models/SortOptions'; +import { SortingOptions } from '../models/SortingOptions'; +import { SqlQuery } from '../models/SqlQuery'; +import { SqlQueryResponse } from '../models/SqlQueryResponse'; +import { StorageConfig } from '../models/StorageConfig'; +import { StorageConfigInput } from '../models/StorageConfigInput'; +import { StorageDestination } from '../models/StorageDestination'; +import { StorageDestinationInput } from '../models/StorageDestinationInput'; +import { SyncMetadataRequest } from '../models/SyncMetadataRequest'; +import { SyncMetadataResponse } from '../models/SyncMetadataResponse'; +import { SystemConfig } from '../models/SystemConfig'; +import { SystemInfo } from '../models/SystemInfo'; +import { SystemOverrideInfo } from '../models/SystemOverrideInfo'; +import { Table } from '../models/Table'; +import { Tag } from '../models/Tag'; +import { TagMetadataTypeInput } from '../models/TagMetadataTypeInput'; +import { TemplatePropertiesInputCreate } from '../models/TemplatePropertiesInputCreate'; +import { Token } from '../models/Token'; +import { TokenAccessScopeObject } from '../models/TokenAccessScopeObject'; +import { TokenValidationResponse } from '../models/TokenValidationResponse'; +import { URL } from '../models/URL'; +import { URLInput } from '../models/URLInput'; +import { URLInputMandatory } from '../models/URLInputMandatory'; +import { UnassignTagRequest } from '../models/UnassignTagRequest'; +import { UnparameterizeMetadataRequest } from '../models/UnparameterizeMetadataRequest'; +import { UnpublishMetadataRequest } from '../models/UnpublishMetadataRequest'; +import { UpdateCalendarRequest } from '../models/UpdateCalendarRequest'; +import { UpdateCalendarRequestTableReference } from '../models/UpdateCalendarRequestTableReference'; +import { UpdateCollectionRequest } from '../models/UpdateCollectionRequest'; +import { UpdateColumnSecurityRulesRequest } from '../models/UpdateColumnSecurityRulesRequest'; +import { UpdateConfigRequest } from '../models/UpdateConfigRequest'; +import { UpdateConnectionConfigurationRequest } from '../models/UpdateConnectionConfigurationRequest'; +import { UpdateConnectionRequest } from '../models/UpdateConnectionRequest'; +import { UpdateConnectionStatusRequest } from '../models/UpdateConnectionStatusRequest'; +import { UpdateConnectionV2Request } from '../models/UpdateConnectionV2Request'; +import { UpdateCustomActionRequest } from '../models/UpdateCustomActionRequest'; +import { UpdateCustomActionRequestActionDetails } from '../models/UpdateCustomActionRequestActionDetails'; +import { UpdateCustomActionRequestDefaultActionConfig } from '../models/UpdateCustomActionRequestDefaultActionConfig'; +import { UpdateEmailCustomizationRequest } from '../models/UpdateEmailCustomizationRequest'; +import { UpdateMetadataHeaderRequest } from '../models/UpdateMetadataHeaderRequest'; +import { UpdateMetadataObjIdRequest } from '../models/UpdateMetadataObjIdRequest'; +import { UpdateObjIdInput } from '../models/UpdateObjIdInput'; +import { UpdateOrgRequest } from '../models/UpdateOrgRequest'; +import { UpdateRoleRequest } from '../models/UpdateRoleRequest'; +import { UpdateScheduleRequest } from '../models/UpdateScheduleRequest'; +import { UpdateScheduleRequestFrequency } from '../models/UpdateScheduleRequestFrequency'; +import { UpdateScheduleRequestLiveboardOptions } from '../models/UpdateScheduleRequestLiveboardOptions'; +import { UpdateScheduleRequestPdfOptions } from '../models/UpdateScheduleRequestPdfOptions'; +import { UpdateScheduleRequestRecipientDetails } from '../models/UpdateScheduleRequestRecipientDetails'; +import { UpdateSystemConfigRequest } from '../models/UpdateSystemConfigRequest'; +import { UpdateTagRequest } from '../models/UpdateTagRequest'; +import { UpdateUserGroupRequest } from '../models/UpdateUserGroupRequest'; +import { UpdateUserRequest } from '../models/UpdateUserRequest'; +import { UpdateVariableRequest } from '../models/UpdateVariableRequest'; +import { UpdateVariableValuesRequest } from '../models/UpdateVariableValuesRequest'; +import { UpdateWebhookConfigurationRequest } from '../models/UpdateWebhookConfigurationRequest'; +import { User } from '../models/User'; +import { UserGroup } from '../models/UserGroup'; +import { UserGroupResponse } from '../models/UserGroupResponse'; +import { UserInfo } from '../models/UserInfo'; +import { UserObject } from '../models/UserObject'; +import { UserParameterOptions } from '../models/UserParameterOptions'; +import { UserPrincipal } from '../models/UserPrincipal'; +import { ValidateCommunicationChannelRequest } from '../models/ValidateCommunicationChannelRequest'; +import { ValidateMergeRequest } from '../models/ValidateMergeRequest'; +import { ValidateTokenRequest } from '../models/ValidateTokenRequest'; +import { ValueScopeInput } from '../models/ValueScopeInput'; +import { Variable } from '../models/Variable'; +import { VariableDetailInput } from '../models/VariableDetailInput'; +import { VariableOrgInfo } from '../models/VariableOrgInfo'; +import { VariablePutAssignmentInput } from '../models/VariablePutAssignmentInput'; +import { VariableUpdateAssignmentInput } from '../models/VariableUpdateAssignmentInput'; +import { VariableUpdateScopeInput } from '../models/VariableUpdateScopeInput'; +import { VariableValue } from '../models/VariableValue'; +import { VariableValues } from '../models/VariableValues'; +import { WebhookAuthApiKey } from '../models/WebhookAuthApiKey'; +import { WebhookAuthApiKeyInput } from '../models/WebhookAuthApiKeyInput'; +import { WebhookAuthBasicAuth } from '../models/WebhookAuthBasicAuth'; +import { WebhookAuthBasicAuthInput } from '../models/WebhookAuthBasicAuthInput'; +import { WebhookAuthOAuth2 } from '../models/WebhookAuthOAuth2'; +import { WebhookAuthOAuth2Input } from '../models/WebhookAuthOAuth2Input'; +import { WebhookAuthentication } from '../models/WebhookAuthentication'; +import { WebhookAuthenticationInput } from '../models/WebhookAuthenticationInput'; +import { WebhookDeleteFailure } from '../models/WebhookDeleteFailure'; +import { WebhookDeleteResponse } from '../models/WebhookDeleteResponse'; +import { WebhookKeyValuePair } from '../models/WebhookKeyValuePair'; +import { WebhookKeyValuePairInput } from '../models/WebhookKeyValuePairInput'; +import { WebhookOrg } from '../models/WebhookOrg'; +import { WebhookPagination } from '../models/WebhookPagination'; +import { WebhookResponse } from '../models/WebhookResponse'; +import { WebhookSearchResponse } from '../models/WebhookSearchResponse'; +import { WebhookSignatureVerification } from '../models/WebhookSignatureVerification'; +import { WebhookSignatureVerificationInput } from '../models/WebhookSignatureVerificationInput'; +import { WebhookSortOptionsInput } from '../models/WebhookSortOptionsInput'; +import { WebhookUser } from '../models/WebhookUser'; + +import { AIApiRequestFactory, AIApiResponseProcessor} from "../apis/AIApi"; +export class ObservableAIApi { + private requestFactory: AIApiRequestFactory; + private responseProcessor: AIApiResponseProcessor; + private configuration: Configuration; + + public constructor( + configuration: Configuration, + requestFactory?: AIApiRequestFactory, + responseProcessor?: AIApiResponseProcessor + ) { + this.configuration = configuration; + this.requestFactory = requestFactory || new AIApiRequestFactory(configuration); + this.responseProcessor = responseProcessor || new AIApiResponseProcessor(); + } + + /** + * Version: 26.2.0.cl or later Creates a new Spotter agent conversation based on the provided context and settings. The endpoint was in Beta from 26.2.0.cl through 26.4.0.cl. Requires `CAN_USE_SPOTTER` privilege and at least view access to the metadata object specified in the request. #### Usage guidelines The request must include the `metadata_context` parameter to define the conversation context. The context type can be one of: - `DATA_SOURCE` *(available from 26.5.0.cl)*: targets a specific data source. Provide `data_source_identifier` in `data_source_context` for a single data source, or `data_source_identifiers` for multi-data-source context. The deprecated `guid` field is accepted for backwards compatibility. - `AUTO_MODE` *(available from 26.5.0.cl)*: automatically discovers and selects the most relevant datasets for the user\'s queries. > **Note for callers on versions 26.2.0.cl – 26.4.0.cl (Beta):** use the lowercase `data_source` enum value with the `guid` field instead of the above. Example: `{ \"type\": \"data_source\", \"data_source_context\": { \"guid\": \"\" } }`. The `conversation_settings` parameter controls which Spotter capabilities are enabled for the conversation: - `enable_contextual_change_analysis` (default: `true`, **deprecated from 26.2.0.cl**) — always enabled in Spotter 3; setting this to `false` has no effect on versions >= 26.2.0.cl - `enable_natural_language_answer_generation` (default: `true`, **deprecated from 26.2.0.cl**) — always enabled in Spotter 3; setting this to `false` has no effect on versions >= 26.2.0.cl - `enable_reasoning` (default: `true`, **deprecated from 26.2.0.cl**) — always enabled in Spotter 3; setting this to `false` has no effect on versions >= 26.2.0.cl - `enable_save_chat` (default: `false`, *available from 26.5.0.cl*) — enables saving the conversation for later retrieval via conversation history If the request is successful, the response includes a unique `conversation_identifier` that must be passed to `sendAgentConversationMessage` or `sendAgentConversationMessageStreaming` to send messages within this conversation. The response also includes `conversation_id` with the same value for backwards compatibility; use `conversation_identifier` for new integrations. #### Example request ```json { \"metadata_context\": { \"type\": \"DATA_SOURCE\", \"data_source_context\": { \"data_source_identifier\": \"a1b2c3d4-e5f6-7890-abcd-ef1234567890\" } }, \"conversation_settings\": {} } ``` #### Error responses | Code | Description | | ---- | --------------------------------------------------------------------------------------------------------------------------------------- | | 401 | Unauthorized — authentication token is missing, expired, or invalid. | | 403 | Forbidden — the authenticated user does not have `CAN_USE_SPOTTER` privilege or lacks view permission on the specified metadata object. | > ###### Note: > > - This endpoint was in Beta from 26.2.0.cl through 26.4.0.cl and is Generally Available from version 26.5.0.cl. > - This endpoint requires Spotter - please contact ThoughtSpot support to enable Spotter on your cluster. + * @param createAgentConversationRequest + */ + public createAgentConversation(createAgentConversationRequest: CreateAgentConversationRequest, _options?: Configuration): Observable { + const requestContextPromise = this.requestFactory.createAgentConversation(createAgentConversationRequest, _options); + + // build promise chain + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); + } + + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + pipe(mergeMap((response: ResponseContext) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.createAgentConversation(rsp))); + })); + } + + /** + * Version: 10.4.0.cl or later Creates a new conversation session tied to a specific data model for AI-driven natural language querying. Requires `CAN_USE_SPOTTER` privilege and at least view access to the metadata object specified in the request. #### Usage guidelines The request must include: - `metadata_identifier`: the unique ID of the data source that provides context for the conversation Optionally, you can provide: - `tokens`: a token string to set initial context for the conversation (e.g., `\"[sales],[item type],[state]\"`) If the request is successful, ThoughtSpot returns a unique `conversation_identifier` that must be passed to `sendMessage` to continue the conversation. #### Error responses | Code | Description | |------|-------------| | 401 | Unauthorized — authentication token is missing, expired, or invalid. | | 403 | Forbidden — the authenticated user does not have `CAN_USE_SPOTTER` privilege or lacks view permission on the specified metadata object. | > ###### Note: > * This endpoint is currently in Beta. Breaking changes may be introduced before the endpoint is made Generally Available. > * This endpoint requires Spotter - please contact ThoughtSpot support to enable Spotter on your cluster. + * @param createConversationRequest + */ + public createConversation(createConversationRequest: CreateConversationRequest, _options?: Configuration): Observable { + const requestContextPromise = this.requestFactory.createConversation(createConversationRequest, _options); + + // build promise chain + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); + } + + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + pipe(mergeMap((response: ResponseContext) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.createConversation(rsp))); + })); + } + + /** + * Version: 10.15.0.cl or later Suggests the most relevant data sources for a given natural language query, ranked by confidence with LLM-generated reasoning. Requires `CAN_USE_SPOTTER` privilege and at least view-level access to the underlying metadata entities referenced in the response. #### Usage guidelines The request must include: - `query`: the natural language question to find relevant data sources for If the request is successful, the API returns a ranked list of suggested data sources, each containing: - `confidence`: a float score indicating the model\'s confidence in the relevance of the suggestion - `details`: metadata about the data source - `data_source_identifier`: the unique ID of the data source - `data_source_name`: the display name of the data source - `description`: a description of the data source - `reasoning`: LLM-generated rationale explaining why the data source was recommended #### Error responses | Code | Description | |------|--------------------------------------------------------------------------------------------------------------------------------------------| | 401 | Unauthorized — authentication token is missing, expired, or invalid. | | 403 | Forbidden — the authenticated user does not have `CAN_USE_SPOTTER` privilege or lacks view permission on the underlying metadata entities. | > ###### Note: > * This endpoint is currently in Beta. Breaking changes may be introduced before it is made Generally Available. > * This endpoint requires Spotter — please contact ThoughtSpot Support to enable Spotter on your cluster. + * @param getDataSourceSuggestionsRequest + */ + public getDataSourceSuggestions(getDataSourceSuggestionsRequest: GetDataSourceSuggestionsRequest, _options?: Configuration): Observable { + const requestContextPromise = this.requestFactory.getDataSourceSuggestions(getDataSourceSuggestionsRequest, _options); + + // build promise chain + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); + } + + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + pipe(mergeMap((response: ResponseContext) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.getDataSourceSuggestions(rsp))); + })); + } + + /** + * Version: 10.15.0.cl or later Retrieves existing natural language (NL) instructions configured for a specific data model. These instructions guide the AI system in understanding data context and generating more accurate responses. Requires `CAN_USE_SPOTTER` privilege, at least view access on the data model, and a bearer token corresponding to the org where the data model exists. #### Usage guidelines The request must include: - `data_source_identifier`: the unique ID of the data model to retrieve instructions for If the request is successful, the API returns: - `nl_instructions_info`: an array of instruction objects, each containing: - `instructions`: the configured text instructions for AI processing - `scope`: the scope of the instruction — currently only `GLOBAL` is supported #### Instructions scope - **GLOBAL**: Instructions that apply globally across the system on the given data-model (currently only global instructions are supported) #### Error responses | Code | Description | |------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| | 401 | Unauthorized — authentication token is missing, expired, or invalid. | | 403 | Forbidden — the authenticated user does not have `CAN_USE_SPOTTER` privilege, lacks view access on the data model, or the bearer token does not correspond to the org where the data model exists. | > ###### Note: > > - To use this API, the user needs at least view access on the data model, and must use the bearer token corresponding to the org where the data model exists. > - This endpoint is currently in Beta. Breaking changes may be introduced before the endpoint is made Generally Available. > - Available from version 10.15.0.cl and later. > - This endpoint requires Spotter — please contact ThoughtSpot Support to enable Spotter on your cluster. > - Use this API to review currently configured instructions before modifying them with `setNLInstructions`. + * @param getNLInstructionsRequest + */ + public getNLInstructions(getNLInstructionsRequest: GetNLInstructionsRequest, _options?: Configuration): Observable { + const requestContextPromise = this.requestFactory.getNLInstructions(getNLInstructionsRequest, _options); + + // build promise chain + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); + } + + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + pipe(mergeMap((response: ResponseContext) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.getNLInstructions(rsp))); + })); + } + + /** + * Version: 10.13.0.cl or later Breaks down a natural language query into a series of smaller analytical sub-questions, each mapped to a relevant data source. Requires `CAN_USE_SPOTTER` privilege and at least view-level access to the referenced metadata objects. #### Usage guidelines The request must include: - `query`: the natural language question to decompose into analytical sub-questions - `metadata_context`: at least one of the following context identifiers to guide question generation: - `conversation_identifier` — an existing conversation session ID - `answer_identifiers` — a list of Answer GUIDs - `liveboard_identifiers` — a list of Liveboard GUIDs - `data_source_identifiers` — a list of data source GUIDs Optional parameters for refining the output: - `ai_context`: additional context to improve response quality - `content` — supplementary text or CSV data as string input - `instructions` — custom text instructions for the AI system - `limit_relevant_questions`: maximum number of questions to return (default: `5`) - `bypass_cache`: if `true`, forces fresh computation instead of returning cached results If the request is successful, the API returns a list of relevant analytical questions, each containing: - `query`: the generated sub-question - `data_source_identifier`: the unique ID of the data source the question targets - `data_source_name`: the display name of the corresponding data source #### Error responses | Code | Description | |------|---------------------------------------------------------------------------------------------------------------------------------------| | 401 | Unauthorized — authentication token is missing, expired, or invalid. | | 403 | Forbidden — the authenticated user does not have `CAN_USE_SPOTTER` privilege or lacks view access to the referenced metadata objects. | > ###### Note: > * This endpoint is currently in Beta. Breaking changes may be introduced before the endpoint is made Generally Available. > * This endpoint requires Spotter - please contact ThoughtSpot support to enable Spotter on your cluster. + * @param getRelevantQuestionsRequest + */ + public getRelevantQuestions(getRelevantQuestionsRequest: GetRelevantQuestionsRequest, _options?: Configuration): Observable { + const requestContextPromise = this.requestFactory.getRelevantQuestions(getRelevantQuestionsRequest, _options); + + // build promise chain + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); + } + + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + pipe(mergeMap((response: ResponseContext) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.getRelevantQuestions(rsp))); + })); + } + + /** + * Version: 10.7.0.cl or later **Deprecated** — Use `getRelevantQuestions` instead (available from 10.13.0.cl). Breaks down a topical or goal-oriented natural language question into smaller, actionable analytical sub-questions, each mapped to a relevant data source for independent execution. Requires `CAN_USE_SPOTTER` privilege and at least view-level access to the referenced metadata objects. #### Usage guidelines The request accepts the following parameters: - `nlsRequest`: contains the user `query` to decompose, along with optional `instructions` and `bypassCache` flag - `worksheetIds`: list of data source identifiers to scope the decomposition - `answerIds`: list of Answer GUIDs whose data guides the response - `liveboardIds`: list of Liveboard GUIDs whose data guides the response - `conversationId`: an existing conversation session ID for context continuity - `content`: supplementary text or CSV data to improve response quality - `maxDecomposedQueries`: maximum number of sub-questions to return (default: `5`) If the request is successful, the API returns a `decomposedQueryResponse` containing a list of `decomposedQueries`, each with: - `query`: the generated analytical sub-question - `worksheetId`: the unique ID of the data source the question targets - `worksheetName`: the display name of the corresponding data source #### Error responses | Code | Description | |------|---------------------------------------------------------------------------------------------------------------------------------------| | 401 | Unauthorized — authentication token is missing, expired, or invalid. | | 403 | Forbidden — the authenticated user does not have `CAN_USE_SPOTTER` privilege or lacks view access to the referenced metadata objects. | > ###### Note: > * This endpoint is deprecated since 10.13.0.cl. Use `getRelevantQuestions` for new integrations. > * This endpoint is currently in Beta. Breaking changes may be introduced before the endpoint is made Generally Available. > * This endpoint requires Spotter — please contact ThoughtSpot support to enable Spotter on your cluster. + * @param queryGetDecomposedQueryRequest + */ + public queryGetDecomposedQuery(queryGetDecomposedQueryRequest: QueryGetDecomposedQueryRequest, _options?: Configuration): Observable { + const requestContextPromise = this.requestFactory.queryGetDecomposedQuery(queryGetDecomposedQueryRequest, _options); + + // build promise chain + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); + } + + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + pipe(mergeMap((response: ResponseContext) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.queryGetDecomposedQuery(rsp))); + })); + } + + /** + * Version: 26.5.0.cl or later Sends natural language messages to an existing Spotter agent conversation and returns the complete response synchronously. Requires `CAN_USE_SPOTTER` privilege and access to the metadata object associated with the conversation. The user must have access to the conversation session referenced by `conversation_identifier`. A conversation must first be created using the `createAgentConversation` API. #### Usage guidelines The request must include: - `conversation_identifier`: the unique session ID returned by `createAgentConversation`, used for context continuity and message tracking - `messages`: an array of one or more text messages to send to the agent The API returns an array of response objects, each containing: - `type`: the kind of response — `text`, `answer`, or `error` - `message`: the main content of the response - `metadata`: additional information depending on the message type (e.g., answer metadata includes analytics and visualization details) #### Error responses | Code | Description | |------|----------------------------------------------------------------------------------------------------------------------------------| | 401 | Unauthorized — authentication token is missing, expired, or invalid. | | 403 | Forbidden — the authenticated user does not have `CAN_USE_SPOTTER` privilege or lacks permission on the referenced conversation. | > ###### Note: > > - This endpoint is Generally Available from version 26.5.0.cl. > - This endpoint requires Spotter - please contact ThoughtSpot support to enable Spotter on your cluster. > - For real-time streamed responses, use `sendAgentConversationMessageStreaming` instead. + * @param conversationIdentifier Unique identifier for the conversation (used to track context) + * @param sendAgentConversationMessageRequest + */ + public sendAgentConversationMessage(conversationIdentifier: string, sendAgentConversationMessageRequest: SendAgentConversationMessageRequest, _options?: Configuration): Observable { + const requestContextPromise = this.requestFactory.sendAgentConversationMessage(conversationIdentifier, sendAgentConversationMessageRequest, _options); + + // build promise chain + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); + } + + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + pipe(mergeMap((response: ResponseContext) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.sendAgentConversationMessage(rsp))); + })); + } + + /** + * Version: 26.5.0.cl or later Sends one or more natural language messages to an existing Spotter agent conversation and returns the response as a real-time Server-Sent Events stream. Requires `CAN_USE_SPOTTER` privilege and access to the metadata object associated with the conversation. The user must have access to the conversation session referenced by `conversation_identifier`. A conversation must first be created using the `createAgentConversation` API. #### Usage guidelines The request must include: - `conversation_identifier`: the unique session ID returned by `createAgentConversation`, used for context continuity and message tracking - `messages`: an array of one or more text messages to send to the agent If the request is valid, the API returns a Server-Sent Events (SSE) stream. Each line has the form `data: [{\"type\": \"...\", ...}]` — a JSON array of event objects. Event types include: - `ack`: confirms receipt of the request (`node_id`) - `conv_title`: conversation title (`title`, `conv_id`) - `notification`: status updates on operations (`group_id`, `metadata`, `code` — e.g. `TOOL_CALL_NOTIFICATION`, `nls_start`, `FINAL_RESPONSE_NOTIFICATION`) - `text-chunk`: incremental content chunks (`id`, `group_id`, `metadata` with `format` and `type` such as `thinking` or `text`, `content`) - `text`: full text block with same structure as `text-chunk` - `answer`: structured answer with metadata (`id`, `group_id`, `metadata` with `sage_query`, `session_id`, `title`, etc., `title`) - `error`: if a failure occurs #### Error responses | Code | Description | | ---- | -------------------------------------------------------------------------------------------------------------------------------- | | 401 | Unauthorized — authentication token is missing, expired, or invalid. | | 403 | Forbidden — the authenticated user does not have `CAN_USE_SPOTTER` privilege or lacks permission on the referenced conversation. | > ###### Note: > > - This endpoint is Generally Available from version 26.5.0.cl. > - This endpoint requires Spotter - please contact ThoughtSpot support to enable Spotter on your cluster. > - The streaming protocol uses Server-Sent Events (SSE). > - For the complete response in a single payload, use `sendAgentConversationMessage` instead. + * @param conversationIdentifier Unique identifier for the conversation (used to track context) + * @param sendAgentConversationMessageStreamingRequest + */ + public sendAgentConversationMessageStreaming(conversationIdentifier: string, sendAgentConversationMessageStreamingRequest: SendAgentConversationMessageStreamingRequest, _options?: Configuration): Observable { + const requestContextPromise = this.requestFactory.sendAgentConversationMessageStreaming(conversationIdentifier, sendAgentConversationMessageStreamingRequest, _options); + + // build promise chain + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); + } + + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + pipe(mergeMap((response: ResponseContext) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.sendAgentConversationMessageStreaming(rsp))); + })); + } + + /** + * Version: 26.2.0.cl or later **Deprecated** — Use `sendAgentConversationMessage` instead. Send natural language messages to an existing Spotter agent conversation and returns the complete response synchronously. Requires `CAN_USE_SPOTTER` privilege and access to the metadata object associated with the conversation. The user must have access to the conversation session referenced by `conversation_identifier`. A conversation must first be created using the `createAgentConversation` API. #### Usage guidelines The request must include: - `conversation_identifier`: the unique session ID returned by `createAgentConversation`, used for context continuity and message tracking - `messages`: an array of one or more text messages to send to the agent The API returns an array of response objects, each containing: - `type`: the kind of response — `text`, `answer`, or `error` - `message`: the main content of the response - `metadata`: additional information depending on the message type (e.g., answer metadata includes analytics and visualization details) #### Error responses | Code | Description | |------|----------------------------------------------------------------------------------------------------------------------------------| | 401 | Unauthorized — authentication token is missing, expired, or invalid. | | 403 | Forbidden — the authenticated user does not have `CAN_USE_SPOTTER` privilege or lacks permission on the referenced conversation. | > ###### Note: > > - This endpoint is deprecated. Use `sendAgentConversationMessage` for new integrations. > - This endpoint is currently in Beta. Breaking changes may be introduced before the endpoint is made Generally Available. > - This endpoint requires Spotter - please contact ThoughtSpot support to enable Spotter on your cluster. + * @param conversationIdentifier Unique identifier for the conversation (used to track context) + * @param sendAgentMessageRequest + */ + public sendAgentMessage(conversationIdentifier: string, sendAgentMessageRequest: SendAgentMessageRequest, _options?: Configuration): Observable { + const requestContextPromise = this.requestFactory.sendAgentMessage(conversationIdentifier, sendAgentMessageRequest, _options); + + // build promise chain + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); + } + + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + pipe(mergeMap((response: ResponseContext) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.sendAgentMessage(rsp))); + })); + } + + /** + * Version: 26.2.0.cl or later **Deprecated** — Use `sendAgentConversationMessageStreaming` instead. Sends one or more natural language messages to an existing Spotter agent conversation and returns the response as a real-time Server-Sent Events stream. Requires `CAN_USE_SPOTTER` privilege and access to the metadata object associated with the conversation. The user must have access to the conversation session referenced by `conversation_identifier`. A conversation must first be created using the `createAgentConversation` API. #### Usage guidelines The request must include: - `conversation_identifier`: the unique session ID returned by `createAgentConversation`, used for context continuity and message tracking - `messages`: an array of one or more text messages to send to the agent If the request is valid, the API returns a Server-Sent Events (SSE) stream. Each line has the form `data: [{\"type\": \"...\", ...}]` — a JSON array of event objects. Event types include: - `ack`: confirms receipt of the request (`node_id`) - `conv_title`: conversation title (`title`, `conv_id`) - `notification`: status updates on operations (`group_id`, `metadata`, `code` — e.g. `TOOL_CALL_NOTIFICATION`, `nls_start`, `FINAL_RESPONSE_NOTIFICATION`) - `text-chunk`: incremental content chunks (`id`, `group_id`, `metadata` with `format` and `type` such as `thinking` or `text`, `content`) - `text`: full text block with same structure as `text-chunk` - `answer`: structured answer with metadata (`id`, `group_id`, `metadata` with `sage_query`, `session_id`, `title`, etc., `title`) - `error`: if a failure occurs #### Error responses | Code | Description | |------|----------------------------------------------------------------------------------------------------------------------------------| | 401 | Unauthorized — authentication token is missing, expired, or invalid. | | 403 | Forbidden — the authenticated user does not have `CAN_USE_SPOTTER` privilege or lacks permission on the referenced conversation. | > ###### Note: > > - This endpoint is deprecated. Use `sendAgentConversationMessageStreaming` for new integrations. > - This endpoint is currently in Beta. Breaking changes may be introduced before the endpoint is made Generally Available. > - This endpoint requires Spotter - please contact ThoughtSpot support to enable Spotter on your cluster. > - The streaming protocol uses Server-Sent Events (SSE). + * @param sendAgentMessageStreamingRequest + */ + public sendAgentMessageStreaming(sendAgentMessageStreamingRequest: SendAgentMessageStreamingRequest, _options?: Configuration): Observable { + const requestContextPromise = this.requestFactory.sendAgentMessageStreaming(sendAgentMessageStreamingRequest, _options); + + // build promise chain + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); + } + + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + pipe(mergeMap((response: ResponseContext) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.sendAgentMessageStreaming(rsp))); + })); + } + + /** + * Version: 10.4.0.cl or later Sends a follow-up message to an existing conversation within the context of a data model. Requires `CAN_USE_SPOTTER` privilege and at least view access to the metadata object specified in the request. A conversation must first be created using the `createConversation` API. #### Usage guidelines The request must include: - `conversation_identifier`: the unique session ID returned by `createConversation` - `metadata_identifier`: the unique ID of the data source used for the conversation - `message`: a natural language string with the follow-up question If the request is successful, the API returns an array of response messages, each containing: - `session_identifier`: the unique ID of the generated response - `generation_number`: the generation number of the response - `message_type`: the type of the response (e.g., `TSAnswer`) - `visualization_type`: the generated visualization type (`Chart`, `Table`, or `Undefined`) - `tokens` / `display_tokens`: the search tokens and user-friendly display tokens for the response #### Error responses | Code | Description | |------|-----------------------------------------------------------------------------------------------------------------------------------------| | 401 | Unauthorized — authentication token is missing, expired, or invalid. | | 403 | Forbidden — the authenticated user does not have `CAN_USE_SPOTTER` privilege or lacks view permission on the specified metadata object. | > ###### Note: > * This endpoint is currently in Beta. Breaking changes may be introduced before the endpoint is made Generally Available. > * This endpoint requires Spotter - please contact ThoughtSpot support to enable Spotter on your cluster. + * @param conversationIdentifier Unique identifier of the conversation. + * @param sendMessageRequest + */ + public sendMessage(conversationIdentifier: string, sendMessageRequest: SendMessageRequest, _options?: Configuration): Observable> { + const requestContextPromise = this.requestFactory.sendMessage(conversationIdentifier, sendMessageRequest, _options); + + // build promise chain + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); + } + + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + pipe(mergeMap((response: ResponseContext) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.sendMessage(rsp))); + })); + } + + /** + * Version: 10.15.0.cl or later This API allows users to set natural language (NL) instructions for a specific data-model to improve AI-generated answers and query processing. These instructions help guide the AI system to better understand the data context and provide more accurate responses. Requires `CAN_USE_SPOTTER` privilege, either edit access or `SPOTTER_COACHING_PRIVILEGE` on the data model, and a bearer token corresponding to the org where the data model exists. #### Usage guidelines To set NL instructions for a data-model, the request must include: - `data_source_identifier`: The unique ID of the data-model for which to set NL instructions - `nl_instructions_info`: An array of instruction objects, each containing: - `instructions`: Array of text instructions for the LLM - `scope`: The scope of the instruction (`GLOBAL`). Currently only `GLOBAL` is supported. It can be extended to data-model-user scope in future. #### Instructions scope - **GLOBAL**: instructions that apply to all users querying this data model If the request is successful, the API returns: - `success`: a boolean indicating whether the operation completed successfully #### Error responses | Code | Description | |------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| | 401 | Unauthorized — authentication token is missing, expired, or invalid. | | 403 | Forbidden — the authenticated user does not have `CAN_USE_SPOTTER` privilege, lacks edit access or `SPOTTER_COACHING_PRIVILEGE` on the data model, or the bearer token does not correspond to the org where the data model exists. | > ###### Note: > > - To use this API, the user needs either edit access or `SPOTTER_COACHING_PRIVILEGE` on the data model, and must use the bearer token corresponding to the org where the data model exists. > - This endpoint is currently in Beta. Breaking changes may be introduced before the endpoint is made Generally Available. > - Available from version 10.15.0.cl and later. > - This endpoint requires Spotter — please contact ThoughtSpot Support to enable Spotter on your cluster. > - Instructions help improve the accuracy and relevance of AI-generated responses for the specified data-model. + * @param setNLInstructionsRequest + */ + public setNLInstructions(setNLInstructionsRequest: SetNLInstructionsRequest, _options?: Configuration): Observable { + const requestContextPromise = this.requestFactory.setNLInstructions(setNLInstructionsRequest, _options); + + // build promise chain + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); + } + + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + pipe(mergeMap((response: ResponseContext) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.setNLInstructions(rsp))); + })); + } + + /** + * Version: 10.4.0.cl or later Processes a natural language query against a specified data model and returns a single AI-generated answer without requiring a conversation session. Requires `CAN_USE_SPOTTER` privilege and at least view access to the metadata object specified in the request. #### Usage guidelines The request must include: - `query`: a natural language question (e.g., \"What were total sales last quarter?\") - `metadata_identifier`: the unique ID of the data source to query against If the request is successful, the API returns a response message containing: - `session_identifier`: the unique ID of the generated response - `generation_number`: the generation number of the response - `message_type`: the type of the response (e.g., `TSAnswer`) - `visualization_type`: the generated visualization type (`Chart`, `Table`, or `Undefined`) - `tokens` / `display_tokens`: the search tokens and user-friendly display tokens for the response #### Error responses | Code | Description | |------|-----------------------------------------------------------------------------------------------------------------------------------------| | 401 | Unauthorized — authentication token is missing, expired, or invalid. | | 403 | Forbidden — the authenticated user does not have `CAN_USE_SPOTTER` privilege or lacks view permission on the specified metadata object. | > ###### Note: > * This endpoint is currently in Beta. Breaking changes may be introduced before the endpoint is made Generally Available. > * This endpoint requires Spotter - please contact ThoughtSpot support to enable Spotter on your cluster. + * @param singleAnswerRequest + */ + public singleAnswer(singleAnswerRequest: SingleAnswerRequest, _options?: Configuration): Observable { + const requestContextPromise = this.requestFactory.singleAnswer(singleAnswerRequest, _options); + + // build promise chain + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); + } + + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + pipe(mergeMap((response: ResponseContext) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.singleAnswer(rsp))); + })); + } + + /** + * Stops an in-progress agent conversation response. Version: 26.6.0.cl or later Version: 26.6.0.cl or later Stops an in-progress agent response for the specified conversation. Use this endpoint to cancel a response that is actively being generated — for example, when the user navigates away, reformulates their question, or no longer needs the current result. Requires `CAN_USE_SPOTTER` privilege and access to the specified conversation. #### Usage guidelines The request must include: - `conversation_identifier` *(path parameter)*: the unique ID of the conversation whose active response should be stopped, as returned by `createAgentConversation` A successful request returns an empty `204 No Content` response. If there is no active response in progress at the time of the call, the request is still treated as successful. After stopping a response, the conversation session remains active. You can continue sending messages using `sendAgentConversationMessage` or `sendAgentConversationMessageStreaming`. #### Example request ```bash POST /api/rest/2.0/ai/agent/conversation/{conversation_identifier}/stop-response ``` #### Typical usage scenario This endpoint is useful when integrating Spotter into a chat UI where users can cancel a long-running query. For example: 1. User sends a message via `sendAgentConversationMessageStreaming`. 2. User clicks a \"Stop generating\" button while the response is streaming. 3. Your client calls `stopConversation` with the active `conversation_identifier`. 4. The stream is terminated and the user can ask a new question. #### Error responses | Code | Description | |------|-------------| | 401 | Unauthorized — authentication token is missing, expired, or invalid. | | 403 | Forbidden — the authenticated user does not have `CAN_USE_SPOTTER` privilege or lacks access to the specified conversation. | > ###### Note: > > - Calling this endpoint when no response is in progress does not return an error. > - The conversation context is preserved after stopping — previous messages and answers remain accessible. > - Available from version 26.6.0.cl and later. > - This endpoint requires Spotter — please contact ThoughtSpot Support to enable Spotter on your cluster. > - This feature is available only for **Spotter 3** (`SPOTTER3`) version. + * @param conversationIdentifier Unique identifier of the conversation to stop. + */ + public stopConversation(conversationIdentifier: string, _options?: Configuration): Observable { + const requestContextPromise = this.requestFactory.stopConversation(conversationIdentifier, _options); + + // build promise chain + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); + } + + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + pipe(mergeMap((response: ResponseContext) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.stopConversation(rsp))); + })); + } + +} + +import { AuthenticationApiRequestFactory, AuthenticationApiResponseProcessor} from "../apis/AuthenticationApi"; +export class ObservableAuthenticationApi { + private requestFactory: AuthenticationApiRequestFactory; + private responseProcessor: AuthenticationApiResponseProcessor; + private configuration: Configuration; + + public constructor( + configuration: Configuration, + requestFactory?: AuthenticationApiRequestFactory, + responseProcessor?: AuthenticationApiResponseProcessor + ) { + this.configuration = configuration; + this.requestFactory = requestFactory || new AuthenticationApiRequestFactory(configuration); + this.responseProcessor = responseProcessor || new AuthenticationApiResponseProcessor(); + } + + /** + * Version: 26.6.0.cl or later Enables or disables authentication at cluster or org level for the specified auth type. Currently supports `TRUSTED_AUTH`. #### Required privileges Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) or `CONTROL_TRUSTED_AUTH` (**Can Enable or Disable Trusted Authentication**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled, the `CONTROL_TRUSTED_AUTH` privilege is required. #### Usage guidelines Use `cluster_preferences` to enable or disable authentication at the cluster level. Cluster-level settings can only be configured from the Primary Org. - `ENABLED` — Generates a new access token if one does not exist. An existing token is preserved. - `DISABLED` — Revokes the existing cluster-level access token. Use `org_preferences` to enable or disable authentication for one or more Orgs. Each entry must include an `org_identifier` (unique ID or name) and an `auth_status`. Org-level configuration requires the per-Org authentication feature to be enabled on your instance. - `ENABLED` — Generates a new org-level access token if one does not exist. - `DISABLED` — Revokes the existing org-level access token for that Org. Both `cluster_preferences` and `org_preferences` are optional. Omitting a field leaves the corresponding settings unchanged. If both are omitted, the API returns `204 No Content` without making any changes. **Note**: Cluster-level and org-level settings are independent of each other. Enabling or disabling one does not affect the other. + * @param configureAuthSettingsRequest + */ + public configureAuthSettings(configureAuthSettingsRequest: ConfigureAuthSettingsRequest, _options?: Configuration): Observable { + const requestContextPromise = this.requestFactory.configureAuthSettings(configureAuthSettingsRequest, _options); + + // build promise chain + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); + } + + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + pipe(mergeMap((response: ResponseContext) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.configureAuthSettings(rsp))); + })); + } + + /** + * Version: 9.0.0.cl or later Retrieves details of the current user session for the token provided in the request header. Any ThoughtSpot user can access this endpoint and send an API request. The data returned in the API response varies according to user\'s privilege and object access permissions. **NOTE**: In ThoughtSpot, users with cluster administration privileges can access all Orgs by default. However, unless the administrator is explicitly added to an Org, the Orgs list in the session information returned by the API will include only the Primary Org. To include other Orgs in the API response, you must explicitly add the administrator to each Org in the Admin settings page in the UI or via user REST API. + */ + public getCurrentUserInfo(_options?: Configuration): Observable { + const requestContextPromise = this.requestFactory.getCurrentUserInfo(_options); + + // build promise chain + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); + } + + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + pipe(mergeMap((response: ResponseContext) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.getCurrentUserInfo(rsp))); + })); + } + + /** + * Version: 9.4.0.cl or later Retrieves details of the current session token for the bearer token provided in the request header. This API endpoint does not create a new token. Instead, it returns details about the token, including the token string, creation time, expiration time, and the associated user. Use this endpoint to introspect your current session token, debug authentication issues, or when a frontend application needs session token details. Any ThoughtSpot user with a valid bearer token can access this endpoint and send an API request + */ + public getCurrentUserToken(_options?: Configuration): Observable { + const requestContextPromise = this.requestFactory.getCurrentUserToken(_options); + + // build promise chain + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); + } + + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + pipe(mergeMap((response: ResponseContext) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.getCurrentUserToken(rsp))); + })); + } + + /** + * Version: 10.4.0.cl or later Creates an authentication token that provides values for the formula variables in the Row Level Security (RLS) rules for a given user. Recommended for use cases that require Attribute-based access control (ABAC) via RLS. #### Required privileges To add a new user and assign privileges during auto-creation, the `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege is required. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled, the `CONTROL_TRUSTED_AUTH` (**Can Enable or Disable Trusted Authentication**) privilege and edit access to the data source are required. To configure formula variables for all Orgs on your instance or the Primary Org, cluster administration privileges are required. Org administrators can configure formula variables for their respective Orgs. If Role-Based Access Control (RBAC) is enabled, users with the `CAN_MANAGE_VARIABLES` (**Can manage variables**) role privilege can also create and manage variables for their Org context. #### Usage guidelines You can generate a token by providing a `username` and `password`, or by using a `secret_key`. To generate a `secret_key`, the administrator must enable [Trusted authentication](https://developers.thoughtspot.com/docs/trusted-auth-secret-key) in the **Develop** > **Customizations** > **Security Settings** page. **Note**: * When both `password` and `secret_key` are included in the API request, `password` takes precedence. * If [Multi-Factor Authentication (MFA)](https://docs.thoughtspot.com/cloud/latest/authentication-local-mfa) is enabled on your instance, the API login request with `username` and `password` returns an error. You can switch to token-based authentication with `secret_key` or contact ThoughtSpot Support for assistance. The token obtained from ThoughtSpot is valid for 5 minutes by default. You can configure the token expiration time as required. #### ABAC via RLS To implement ABAC via RLS and assign security entitlements to users during session creation, generate a token with custom variable values. The values set in the authentication token are applied to the formula variables referenced in RLS rules at the table level, which determines the data each user can access based on their entitlements. The variable values can be configured to persist for a specific set of Models in user sessions initiated with the token, allowing different RLS rules to be set for different data models. Once defined, the rules are added to the user\'s `variable_values` object, after which all sessions will use the persisted values. For more information, see [ABAC via tokens Documentation](https://developers.thoughtspot.com/docs/abac-via-rls-variables). ##### Formula variables Before defining variable values, ensure the variables are created and available on your instance. To create a formula variable, you can use the **Create variable** (`/api/rest/2.0/template/variables/create`) REST API endpoint, with the variable `type` set as `Formula_Variable` in the API request. The API doesn\'t support `\"persist_option\": \"RESET\"` and `\"persist_option\": \"NONE\"` when `variable_values` are defined in the request. If you are using `variable_values` for token generation, you must use other supported persist options such as `APPEND` or `REPLACE`. If you want to use `RESET` or `NONE`, do not pass any `variable_values`. In such cases, `variable_values` will remain unaffected. #### Supported objects The supported object type is `LOGICAL_TABLE`. When using `object_id` with `variable_values`, models are supported. #### Just-in-time provisioning For [just-in-time user creation and provisioning](https://developers.thoughtspot.com/docs/just-in-time-provisioning), specify the following attributes in the API request: * `auto_create` * `username` * `display_name` * `email` * `groups` Set `auto_create` to `true` if the username does not exist in ThoughtSpot. If the username already exists in ThoughtSpot and `auto_create` is set to `true`, user properties such as display name, email, Org and group entitlements will not be updated with new values. Setting `auto_create` to `true` does not create formula variables. Hence, this setting will not be applicable to `variable_values`. #### Important point to note All options in the token creation APIs that define user access to data in ThoughtSpot will take effect during token creation, not when the token is used for authentication. For example, `auto_create:true` will create the user when the authentication token is created. Persist options such as `APPEND` and `REPLACE` will persist `variable_values` on the user profile when the token is created. + * @param getCustomAccessTokenRequest + */ + public getCustomAccessToken(getCustomAccessTokenRequest: GetCustomAccessTokenRequest, _options?: Configuration): Observable { + const requestContextPromise = this.requestFactory.getCustomAccessToken(getCustomAccessTokenRequest, _options); + + // build promise chain + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); + } + + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + pipe(mergeMap((response: ResponseContext) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.getCustomAccessToken(rsp))); + })); + } + + /** + * Version: 9.0.0.cl or later Generates an authentication token for creating a full session in ThoughtSpot for a given user. Recommended for use cases that do not require Attribute-based access control (ABAC) via Row Level Security (RLS). #### Usage guidelines You can generate a token for a user by providing a `username` and `password`, or by using the `secret_key` generated for your instance. To generate a `secret_key`, the administrator must enable [Trusted authentication](https://developers.thoughtspot.com/docs/trusted-auth-secret-key) in the **Develop** > **Customizations** > **Security Settings** page. **Note**: * When both `password` and `secret_key` are included in the API request, `password` takes precedence. * If [Multi-Factor Authentication (MFA)](https://docs.thoughtspot.com/cloud/latest/authentication-local-mfa) is enabled on your instance, the API login request with `username` and `password` returns an error. You can switch to token-based authentication with `secret_key` or contact ThoughtSpot Support for assistance. The token obtained from ThoughtSpot is valid for 5 minutes by default. You can configure the token expiration time as required. #### Just-in-time provisioning For [just-in-time user creation and provisioning](https://developers.thoughtspot.com/docs/just-in-time-provisioning), specify the following attributes in the API request: * `auto_create` * `username` * `display_name` * `email` * `group_identifiers` Set `auto_create` to `true` if the username does not exist in ThoughtSpot. If the user already exists in ThoughtSpot and `auto_create` is set to `true`, user properties such as display name, email and group assignment will be updated. To add a new user and assign privileges during auto-creation, the `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege is required. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled, the `CONTROL_TRUSTED_AUTH` (**Can Enable or Disable Trusted Authentication**) privilege is required. #### Important point to note All options in the token creation APIs that define user access to data in ThoughtSpot will take effect during token creation, not when the token is used for authentication. For example, `auto_create:true` will create the user when the authentication token is created. + * @param getFullAccessTokenRequest + */ + public getFullAccessToken(getFullAccessTokenRequest: GetFullAccessTokenRequest, _options?: Configuration): Observable { + const requestContextPromise = this.requestFactory.getFullAccessToken(getFullAccessTokenRequest, _options); + + // build promise chain + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); + } + + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + pipe(mergeMap((response: ResponseContext) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.getFullAccessToken(rsp))); + })); + } + + /** + * Version: 9.0.0.cl or later Generates an authentication token that provides access to a specific metadata object. This object list is intersected with the list of objects the user is allowed to access via group membership. For more information, see [Object security](https://docs.thoughtspot.com/cloud/latest/security-data-object#object_security). #### Usage guidelines You can generate a token for a user by providing a `username` and `password`, or by using the `secret_key` generated for your instance. To generate a `secret_key`, the administrator must enable [Trusted authentication](https://developers.thoughtspot.com/docs/trusted-auth-secret-key) in the **Develop** > **Customizations** > **Security Settings** page. **Note**: * When both `password` and `secret_key` are included in the API request, `password` takes precedence. * If [Multi-Factor Authentication (MFA)](https://docs.thoughtspot.com/cloud/latest/authentication-local-mfa) is enabled on your instance, the API login request with `username` and `password` returns an error. You can switch to token-based authentication with `secret_key` or contact ThoughtSpot Support for assistance. The token obtained from ThoughtSpot is valid for 5 minutes by default. You can configure the token expiration time as required. #### Just-in-time provisioning For [just-in-time user creation and provisioning](https://developers.thoughtspot.com/docs/just-in-time-provisioning), specify the following attributes in the API request: * `auto_create` * `username` * `display_name` * `email` * `group_identifiers` Set `auto_create` to `true` if the user is not available in ThoughtSpot. If the user already exists in ThoughtSpot and the `auto_create` parameter is set to `true`, user properties such as display name, email, and group assignment will be updated. To add a new user and assign privileges, the `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege is required. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled, the `CONTROL_TRUSTED_AUTH`(**Can Enable or Disable Trusted Authentication**) privilege is required. #### Important point to note All options in the token creation APIs that define user access to data in ThoughtSpot will take effect during token creation, not when the token is used for authentication. For example, `auto_create:true` will create the user when the authentication token is created. + * @param getObjectAccessTokenRequest + */ + public getObjectAccessToken(getObjectAccessTokenRequest: GetObjectAccessTokenRequest, _options?: Configuration): Observable { + const requestContextPromise = this.requestFactory.getObjectAccessToken(getObjectAccessTokenRequest, _options); + + // build promise chain + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); + } + + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + pipe(mergeMap((response: ResponseContext) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.getObjectAccessToken(rsp))); + })); + } + + /** + * Version: 9.0.0.cl or later Creates a login session for a ThoughtSpot user with Basic authentication. In Basic authentication method, REST clients log in to ThoughtSpot using `username` and `password` attributes. On a multi-tenant cluster with Orgs, users can pass the ID of the Org in the API request to log in to a specific Org context. **Note**: If Multi-Factor Authentication (MFA) is enabled on your instance, the API login request with basic authentication (`username` and `password` ) returns an error. Contact ThoughtSpot Support for assistance. A successful login returns a session cookie that can be used in your subsequent API requests. + * @param loginRequest + */ + public login(loginRequest: LoginRequest, _options?: Configuration): Observable { + const requestContextPromise = this.requestFactory.login(loginRequest, _options); + + // build promise chain + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); + } + + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + pipe(mergeMap((response: ResponseContext) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.login(rsp))); + })); + } + + /** + * Version: 9.0.0.cl or later Logs out a user from their current session. + */ + public logout(_options?: Configuration): Observable { + const requestContextPromise = this.requestFactory.logout(_options); + + // build promise chain + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); + } + + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + pipe(mergeMap((response: ResponseContext) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.logout(rsp))); + })); + } + + /** + * Version: 9.0.0.cl or later Revokes the authentication token issued for current user session. The token of your current session expires when you make a call to the `/api/rest/2.0/auth/token/revoke` endpoint. the users will not be able to access ThoughtSpot objects until a new token is obtained. To restart your session, request for a new token from ThoughtSpot. See [Get Full Access Token](#/http/api-endpoints/authentication/get-full-access-token). + * @param revokeTokenRequest + */ + public revokeToken(revokeTokenRequest: RevokeTokenRequest, _options?: Configuration): Observable { + const requestContextPromise = this.requestFactory.revokeToken(revokeTokenRequest, _options); + + // build promise chain + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); + } + + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + pipe(mergeMap((response: ResponseContext) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.revokeToken(rsp))); + })); + } + + /** + * Version: 26.6.0.cl or later Returns the authentication configuration for the specified auth type at cluster and org level. Currently supports `TRUSTED_AUTH`. #### Required privileges Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) or `CONTROL_TRUSTED_AUTH` (**Can Enable or Disable Trusted Authentication**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled, the `CONTROL_TRUSTED_AUTH` privilege is required. #### Usage guidelines Use `scope` to control which level of settings are returned: - `CLUSTER` — Returns cluster-level authentication status and access tokens. Accessible only from the Primary Org. - `ORG` — Returns org-level authentication status and access tokens for the current Org. Requires the per-Org authentication feature to be enabled on your instance. - If `scope` is omitted, both cluster and org-level settings are returned based on the caller\'s org context and feature availability. The `access_tokens` array in `cluster_preferences` or `org_preferences` is omitted when no token is configured at that level. **Note**: Access tokens returned in the response are sensitive credentials. Treat them with the same care as passwords. + * @param searchAuthSettingsRequest + */ + public searchAuthSettings(searchAuthSettingsRequest: SearchAuthSettingsRequest, _options?: Configuration): Observable { + const requestContextPromise = this.requestFactory.searchAuthSettings(searchAuthSettingsRequest, _options); + + // build promise chain + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); + } + + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + pipe(mergeMap((response: ResponseContext) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.searchAuthSettings(rsp))); + })); + } + + /** + * Version: 9.12.0.cl or later Validates the authentication token specified in the API request. If your token is not valid, [Get a new token](#/http/api-endpoints/authentication/get-full-access-token). + * @param validateTokenRequest + */ + public validateToken(validateTokenRequest: ValidateTokenRequest, _options?: Configuration): Observable { + const requestContextPromise = this.requestFactory.validateToken(validateTokenRequest, _options); + + // build promise chain + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); + } + + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + pipe(mergeMap((response: ResponseContext) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.validateToken(rsp))); + })); + } + +} + +import { CollectionsApiRequestFactory, CollectionsApiResponseProcessor} from "../apis/CollectionsApi"; +export class ObservableCollectionsApi { + private requestFactory: CollectionsApiRequestFactory; + private responseProcessor: CollectionsApiResponseProcessor; + private configuration: Configuration; + + public constructor( + configuration: Configuration, + requestFactory?: CollectionsApiRequestFactory, + responseProcessor?: CollectionsApiResponseProcessor + ) { + this.configuration = configuration; + this.requestFactory = requestFactory || new CollectionsApiRequestFactory(configuration); + this.responseProcessor = responseProcessor || new CollectionsApiResponseProcessor(); + } + + /** + * Version: 26.4.0.cl or later Creates a new collection in ThoughtSpot. Collections allow you to organize and group related metadata objects such as Liveboards, Answers, worksheets, and other data objects. You can also create nested collections (sub-collections) to build a hierarchical structure. #### Supported operations The API endpoint lets you perform the following operations: * Create a new collection * Add metadata objects (Liveboards, Answers, Logical Tables) to the collection * Create nested collections by adding sub-collections + * @param createCollectionRequest + */ + public createCollection(createCollectionRequest: CreateCollectionRequest, _options?: Configuration): Observable { + const requestContextPromise = this.requestFactory.createCollection(createCollectionRequest, _options); + + // build promise chain + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); + } + + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + pipe(mergeMap((response: ResponseContext) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.createCollection(rsp))); + })); + } + + /** + * Version: 26.4.0.cl or later Deletes one or more collections from ThoughtSpot. #### Delete options * **delete_children**: When set to `true`, deletes the child objects (metadata items) within the collection that the user has access to. Objects that the user does not have permission to delete will be skipped. * **dry_run**: When set to `true`, performs a preview of the deletion operation without actually deleting anything. The response shows what would be deleted, allowing you to review before committing the deletion. #### Response The response includes: * **metadata_deleted**: List of metadata objects that were successfully deleted * **metadata_skipped**: List of metadata objects that were skipped due to lack of permissions or other constraints + * @param deleteCollectionRequest + */ + public deleteCollection(deleteCollectionRequest: DeleteCollectionRequest, _options?: Configuration): Observable { + const requestContextPromise = this.requestFactory.deleteCollection(deleteCollectionRequest, _options); + + // build promise chain + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); + } + + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + pipe(mergeMap((response: ResponseContext) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.deleteCollection(rsp))); + })); + } + + /** + * Version: 26.4.0.cl or later Gets a list of collections available in ThoughtSpot. To get details of a specific collection, specify the collection GUID or name. You can also filter the API response based on the collection name pattern, author, and other criteria. #### Search options * **name_pattern**: Use \'%\' as a wildcard character to match collection names * **collection_identifiers**: Search for specific collections by their GUIDs or names * **include_metadata**: When set to `true`, includes the metadata objects within each collection in the response **NOTE**: If the API returns an empty list, consider increasing the value of the `record_size` parameter. To search across all available collections, set `record_size` to `-1`. + * @param searchCollectionsRequest + */ + public searchCollections(searchCollectionsRequest: SearchCollectionsRequest, _options?: Configuration): Observable { + const requestContextPromise = this.requestFactory.searchCollections(searchCollectionsRequest, _options); + + // build promise chain + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); + } + + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + pipe(mergeMap((response: ResponseContext) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.searchCollections(rsp))); + })); + } + + /** + * Version: 26.4.0.cl or later Updates an existing collection in ThoughtSpot. #### Supported operations This API endpoint lets you perform the following operations: * Update collection name and description * Change visibility settings * Add metadata objects to the collection (operation: ADD) * Remove metadata objects from the collection (operation: REMOVE) * Replace all metadata objects in the collection (operation: REPLACE) #### Operation types * **ADD**: Adds the specified metadata objects to the existing collection without removing current items * **REMOVE**: Removes only the specified metadata objects from the collection * **REPLACE**: Replaces all existing metadata objects with the specified items (default behavior) + * @param collectionIdentifier Unique GUID of the collection. Note: Collection names cannot be used as identifiers since duplicate names are allowed. + * @param updateCollectionRequest + */ + public updateCollection(collectionIdentifier: string, updateCollectionRequest: UpdateCollectionRequest, _options?: Configuration): Observable { + const requestContextPromise = this.requestFactory.updateCollection(collectionIdentifier, updateCollectionRequest, _options); + + // build promise chain + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); + } + + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + pipe(mergeMap((response: ResponseContext) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.updateCollection(rsp))); + })); + } + +} + +import { ConnectionConfigurationsApiRequestFactory, ConnectionConfigurationsApiResponseProcessor} from "../apis/ConnectionConfigurationsApi"; +export class ObservableConnectionConfigurationsApi { + private requestFactory: ConnectionConfigurationsApiRequestFactory; + private responseProcessor: ConnectionConfigurationsApiResponseProcessor; + private configuration: Configuration; + + public constructor( + configuration: Configuration, + requestFactory?: ConnectionConfigurationsApiRequestFactory, + responseProcessor?: ConnectionConfigurationsApiResponseProcessor + ) { + this.configuration = configuration; + this.requestFactory = requestFactory || new ConnectionConfigurationsApiRequestFactory(configuration); + this.responseProcessor = responseProcessor || new ConnectionConfigurationsApiResponseProcessor(); + } + + /** + * Version: 10.12.0.cl or later Gets connection configuration objects. Requires `DATAMANAGEMENT` (**Can manage data**) and edit permissions to the connection object, or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) privilege is required. #### Usage guidelines * To get a list of all configurations available in the ThoughtSpot system, send the API request with only the connection name or GUID in the request body. * To fetch details of a configuration object, specify the configuration object name or GUID. + * @param connectionConfigurationSearchRequest + */ + public connectionConfigurationSearch(connectionConfigurationSearchRequest: ConnectionConfigurationSearchRequest, _options?: Configuration): Observable> { + const requestContextPromise = this.requestFactory.connectionConfigurationSearch(connectionConfigurationSearchRequest, _options); + + // build promise chain + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); + } + + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + pipe(mergeMap((response: ResponseContext) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.connectionConfigurationSearch(rsp))); + })); + } + + /** + * Version: 10.12.0.cl or later Creates an additional configuration to an existing connection to a data warehouse. Requires `DATAMANAGEMENT` (**Can manage data**) or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) privilege is required. #### Usage guidelines * A JSON map of configuration attributes in `configuration`. The following example shows the configuration attributes: ``` { \"user\":\"DEV_USER\", \"password\":\"TestConn123\", \"role\":\"DEV\", \"warehouse\":\"DEV_WH\" } ``` * If the `policy_type` is `PRINCIPALS`, then `policy_principals` is a required field. * If the `policy_type` is `PROCESSES`, then `policy_processes` is a required field. * If the `policy_type` is `NO_POLICY`, then `policy_principals` and `policy_processes` are not required fields. #### Parameterized Connection Support For parameterized connections that use OAuth authentication, only the same_as_parent and policy_process_options attributes are allowed in the API request. These attributes are not applicable to connections that are not parameterized. + * @param createConnectionConfigurationRequest + */ + public createConnectionConfiguration(createConnectionConfigurationRequest: CreateConnectionConfigurationRequest, _options?: Configuration): Observable { + const requestContextPromise = this.requestFactory.createConnectionConfiguration(createConnectionConfigurationRequest, _options); + + // build promise chain + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); + } + + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + pipe(mergeMap((response: ResponseContext) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.createConnectionConfiguration(rsp))); + })); + } + + /** + * Version: 10.12.0.cl or later Deletes connection configuration objects. Requires `DATAMANAGEMENT` (**Can manage data**) and edit permissions to the connection object, or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) privilege is required. + * @param deleteConnectionConfigurationRequest + */ + public deleteConnectionConfiguration(deleteConnectionConfigurationRequest: DeleteConnectionConfigurationRequest, _options?: Configuration): Observable { + const requestContextPromise = this.requestFactory.deleteConnectionConfiguration(deleteConnectionConfigurationRequest, _options); + + // build promise chain + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); + } + + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + pipe(mergeMap((response: ResponseContext) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.deleteConnectionConfiguration(rsp))); + })); + } + + /** + * Version: 10.12.0.cl or later Updates a connection configuration object. Requires `DATAMANAGEMENT` (**Can manage data**) and edit permissions to the connection object, or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) privilege is required. #### Supported operations This API endpoint lets you perform the following operations in a single API request: * Edit the name or description of the configuration * Edit the configuration properties * Edit the `policy_type` * Edit the type of authentication * Enable or disable a configuration #### Parameterized Connection Support For parameterized oauth based connections, only the `same_as_parent` and `policy_process_options` attributes are allowed. These attributes are not applicable to connections that are not parameterized. **NOTE**: When updating a configuration where `disabled` is `true`, you must reset `disabled` to `true` in your update request payload. If not explicitly set again, the API will default `disabled` to `false`. + * @param configurationIdentifier Unique ID or name of the configuration. + * @param updateConnectionConfigurationRequest + */ + public updateConnectionConfiguration(configurationIdentifier: string, updateConnectionConfigurationRequest: UpdateConnectionConfigurationRequest, _options?: Configuration): Observable { + const requestContextPromise = this.requestFactory.updateConnectionConfiguration(configurationIdentifier, updateConnectionConfigurationRequest, _options); + + // build promise chain + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); + } + + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + pipe(mergeMap((response: ResponseContext) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.updateConnectionConfiguration(rsp))); + })); + } + +} + +import { ConnectionsApiRequestFactory, ConnectionsApiResponseProcessor} from "../apis/ConnectionsApi"; +export class ObservableConnectionsApi { + private requestFactory: ConnectionsApiRequestFactory; + private responseProcessor: ConnectionsApiResponseProcessor; + private configuration: Configuration; + + public constructor( + configuration: Configuration, + requestFactory?: ConnectionsApiRequestFactory, + responseProcessor?: ConnectionsApiResponseProcessor + ) { + this.configuration = configuration; + this.requestFactory = requestFactory || new ConnectionsApiRequestFactory(configuration); + this.responseProcessor = responseProcessor || new ConnectionsApiResponseProcessor(); + } + + /** + * Version: 9.2.0.cl or later Creates a connection to a data warehouse for live query services. Requires `DATAMANAGEMENT` (**Can manage data**) or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) privilege is required. #### Create a connection without tables To create a connection without tables: 1. Pass these parameters in your API request. * Name of the connection. * Type of the data warehouse to connect to. * A JSON map of configuration attributes in `data_warehouse_config`. The following example shows the configuration attributes for a SnowFlake connection: ``` { \"configuration\":{ \"accountName\":\"thoughtspot_partner\", \"user\":\"tsadmin\", \"password\":\"TestConn123\", \"role\":\"sysadmin\", \"warehouse\":\"MEDIUM_WH\" }, \"authenticationType\": \"SERVICE_ACCOUNT\", \"externalDatabases\":[ ] } ``` 2. Set `validate` to `false`. **NOTE:** If the `authentication_type` is anything other than SERVICE_ACCOUNT, you must explicitly provide the authenticationType property in the payload. If you do not specify authenticationType, the API will default to SERVICE_ACCOUNT as the authentication type. #### Create a connection with tables If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) and `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` (**Can manage data models**) privilege is required. To create a connection with tables: 1. Pass these parameters in your API request. * Name of the connection. * Type of the data warehouse to connect to. * A JSON map of configuration attributes, database details, and table properties in `data_warehouse_config` as shown in the following example: ``` { \"configuration\":{ \"accountName\":\"thoughtspot_partner\", \"user\":\"tsadmin\", \"password\":\"TestConn123\", \"role\":\"sysadmin\", \"warehouse\":\"MEDIUM_WH\" }, \"authenticationType\": \"SERVICE_ACCOUNT\", \"externalDatabases\":[ { \"name\":\"AllDatatypes\", \"isAutoCreated\":false, \"schemas\":[ { \"name\":\"alldatatypes\", \"tables\":[ { \"name\":\"allDatatypes\", \"type\":\"TABLE\", \"description\":\"\", \"selected\":true, \"linked\":true, \"columns\":[ { \"name\":\"CNUMBER\", \"type\":\"INT64\", \"canImport\":true, \"selected\":true, \"isLinkedActive\":true, \"isImported\":false, \"tableName\":\"allDatatypes\", \"schemaName\":\"alldatatypes\", \"dbName\":\"AllDatatypes\" }, { \"name\":\"CDECIMAL\", \"type\":\"INT64\", \"canImport\":true, \"selected\":true, \"isLinkedActive\":true, \"isImported\":false, \"tableName\":\"allDatatypes\", \"schemaName\":\"alldatatypes\", \"dbName\":\"AllDatatypes\" } ] } ] } ] } ] } ``` 2. Set `validate` to `true`. **NOTE:** If the `authentication_type` is anything other than SERVICE_ACCOUNT, you must explicitly provide the authenticationType property in the payload. If you do not specify authenticationType, the API will default to SERVICE_ACCOUNT as the authentication type. + * @param createConnectionRequest + */ + public createConnection(createConnectionRequest: CreateConnectionRequest, _options?: Configuration): Observable { + const requestContextPromise = this.requestFactory.createConnection(createConnectionRequest, _options); + + // build promise chain + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); + } + + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + pipe(mergeMap((response: ResponseContext) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.createConnection(rsp))); + })); + } + + /** + * Version: 9.2.0.cl or later **Important**: This endpoint is deprecated and will be removed from ThoughtSpot in September 2025. ThoughtSpot strongly recommends using the [Delete Connection V2](#/http/api-endpoints/connections/delete-connection-v2) endpoint to delete your connection objects. #### Usage guidelines Deletes a connection object. Requires `DATAMANAGEMENT` (**Can manage data**) and edit permissions to the connection object, or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) privilege is required. **Note**: If a connection has dependent objects, make sure you remove its associations before the delete operation. + * @param deleteConnectionRequest + */ + public deleteConnection(deleteConnectionRequest: DeleteConnectionRequest, _options?: Configuration): Observable { + const requestContextPromise = this.requestFactory.deleteConnection(deleteConnectionRequest, _options); + + // build promise chain + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); + } + + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + pipe(mergeMap((response: ResponseContext) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.deleteConnection(rsp))); + })); + } + + /** + * Version: 10.4.0.cl or later Deletes a connection object. **Note**: If a connection has dependent objects, make sure you remove its associations before the delete operation. Requires `DATAMANAGEMENT` (**Can manage data**) and edit permissions to the connection object, or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) privilege is required. + * @param connectionIdentifier Unique ID or name of the connection. + */ + public deleteConnectionV2(connectionIdentifier: string, _options?: Configuration): Observable { + const requestContextPromise = this.requestFactory.deleteConnectionV2(connectionIdentifier, _options); + + // build promise chain + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); + } + + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + pipe(mergeMap((response: ResponseContext) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.deleteConnectionV2(rsp))); + })); + } + + /** + * Version: 9.9.0.cl or later Exports the difference in connection metadata between CDW and ThoughtSpot Requires `DATAMANAGEMENT` (**Can manage data**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the following Data control privileges may be required: - `CAN_MANAGE_CUSTOM_CALENDAR`(**Can manage custom calendars**) - `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) - `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` (**Can manage data models**) To download the connection metadata difference between ThoughtSpot and CDW, pass the connection GUID as `connection_identifier` in the API request. + * @param connectionIdentifier GUID of the connection + */ + public downloadConnectionMetadataChanges(connectionIdentifier: string, _options?: Configuration): Observable { + const requestContextPromise = this.requestFactory.downloadConnectionMetadataChanges(connectionIdentifier, _options); + + // build promise chain + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); + } + + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + pipe(mergeMap((response: ResponseContext) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.downloadConnectionMetadataChanges(rsp))); + })); + } + + /** + * Version: 9.9.0.cl or later Validates the difference in connection metadata between CDW and ThoughtSpot. Requires `DATAMANAGEMENT` (**Can manage data**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the following Data control privileges may be required: - `CAN_MANAGE_CUSTOM_CALENDAR`(**Can manage custom calendars**) - `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) - `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` (**Can manage data models**) Returns a boolean indicating whether there is any difference between the connection metadata at ThoughtSpot and CDW. To get the connection metadata difference status, pass the connection GUID as `connection_identifier` in the API request. + * @param connectionIdentifier GUID of the connection + */ + public fetchConnectionDiffStatus(connectionIdentifier: string, _options?: Configuration): Observable { + const requestContextPromise = this.requestFactory.fetchConnectionDiffStatus(connectionIdentifier, _options); + + // build promise chain + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); + } + + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + pipe(mergeMap((response: ResponseContext) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.fetchConnectionDiffStatus(rsp))); + })); + } + + /** + * Version: 26.2.0.cl or later Revokes OAuth refresh tokens for users who no longer require access to a data warehouse connection. When a token is revoked, the affected user\'s session for that connection is terminated, and they must re-authenticate to regain access. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) or `DATAMANAGEMENT` (**Can manage data**) privileges. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on the ThoughtSpot instance, users with `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) privilege can also make API requests to revoke tokens for connection users. #### Usage guidelines You can specify different combinations of identifiers to control which refresh tokens are revoked. - **connection_identifier**: Revokes refresh tokens for all users of the connection, except the connection author. - **connection_identifier** and **user_identifiers**: Revokes refresh tokens only for the users specified in the request. If the name or ID of the connection author is included in the request, their token will also be revoked. - **connection_identifier** and **configuration_identifiers**: Revokes refresh tokens for all users on the specified configurations, except the configuration author. - **connection_identifier**, **configuration_identifiers**, and **user_identifiers**: Revokes refresh tokens for the specified users on the specified configurations. - **connection_identifier** and **org_identifiers**: Revokes refresh tokens for the specified Orgs. Applicable only for published connections. - **connection_identifier**, **org_identifiers**, and **user_identifiers**: Revokes refresh tokens for the specified users in the specified Orgs. Applicable only for published connections. **NOTE**: The `org_identifiers` parameter is only applicable for published connections. Using this parameter for unpublished connections will result in an error. Ensure that the connections are published before making the API request. + * @param connectionIdentifier Unique ID or name of the connection whose refresh tokens need to be revoked. All the users associated with the connection will have their refresh tokens revoked except the author. + * @param revokeRefreshTokensRequest + */ + public revokeRefreshTokens(connectionIdentifier: string, revokeRefreshTokensRequest: RevokeRefreshTokensRequest, _options?: Configuration): Observable { + const requestContextPromise = this.requestFactory.revokeRefreshTokens(connectionIdentifier, revokeRefreshTokensRequest, _options); + + // build promise chain + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); + } + + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + pipe(mergeMap((response: ResponseContext) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.revokeRefreshTokens(rsp))); + })); + } + + /** + * Version: 9.2.0.cl or later Gets connection objects. Requires `DATAMANAGEMENT` (**Can manage data**) or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) privilege is required. - To get a list of all connections available in the ThoughtSpot system, send the API request without any attributes in the request body. - To get the connection objects for a specific type of data warehouse, specify the type in `data_warehouse_types`. - To fetch details of a connection object, specify the connection object GUID or name. The `name_pattern` attribute allows passing partial text with `%` for a wildcard match. - To get details of the database, schemas, tables, or columns from a data connection object, specify `data_warehouse_object_type`. - To get a specific database, schema, table, or column from a connection object, define the object type in `data_warehouse_object_type` and object properties in the `data_warehouse_objects` array. For example, to search for a column, you must pass the database, schema, and table names in the API request. Note that in the following example, object properties are set in a hierarchical order (`database` > `schema` > `table` > `column`). ``` { \"connections\": [ { \"identifier\": \"b9d1f2ef-fa65-4a4b-994e-30fa2d57b0c2\", \"data_warehouse_objects\": [ { \"database\": \"NEBULADEV\", \"schema\": \"INFORMATION_SCHEMA\", \"table\": \"APPLICABLE_ROLES\", \"column\": \"ROLE_NAME\" } ] } ], \"data_warehouse_object_type\": \"COLUMN\" } ``` - To fetch data by `configuration`, specify `data_warehouse_object_type`. For example, to fetch columns from the `DEVELOPMENT` database, specify the `data_warehouse_object_type` as `DATABASE` and define the `configuration` string as `{\"database\":\"DEVELOPMENT\"}`. To get column data for a specific table, specify the table, for example,`{\"database\":\"RETAILAPPAREL\",\"table\":\"PIPES\"}`. - To query connections by `authentication_type`, specify `data_warehouse_object_type`. Supported values for `authentication_type` are: - `SERVICE_ACCOUNT`: For connections that require service account credentials to authenticate to the Cloud Data Warehouse and fetch data. - `OAUTH`: For connections that require OAuth credentials to authenticate to the Cloud Data Warehouse and fetch data. Teradata, Oracle, and Presto Cloud Data Warehouses do not support the OAuth authentication type. - `IAM`: For connections that have the IAM OAuth set up. This authentication type is supported on Amazon Redshift connections only. - `EXTOAUTH`: For connections that have External OAuth set up. ThoughtSpot supports external [OAuth with Microsoft Azure Active Directory (AD)](https://docs.thoughtspot.com/cloud/latest/ connections-snowflake-azure-ad-oauth) and [Okta for Snowflake data connections](https://docs.thoughtspot.com/cloud/latest/connections-snowflake-okta-oauth). - `KEY_PAIR`: For connections that require Key Pair account credentials to authenticate to the Cloud Data Warehouse and fetch data. This authentication type is supported on Snowflake connections only. - `OAUTH_WITH_PKCE`: For connections that require OAuth with PKCE account credentials to authenticate to the Cloud Data Warehouse and fetch data. This authentication type is supported on Snowflake, Starburst, Databricks, Denodo connections only. - `EXTOAUTH_WITH_PKCE`: For connections that require External OAuth With PKCE account credentials to authenticate to the Cloud Data Warehouse and fetch data. This authentication type is supported on Snowflake connections only. - `OAUTH_WITH_PEZ`: For connections that require OAuth With PEZ account credentials to authenticate to the Cloud Data Warehouse and fetch data. This authentication type is supported on Amazon Redshift connections only. - `OAUTH_WITH_SERVICE_PRINCIPAL`: For connections that require OAuth With Service Principal account credentials to authenticate to the Cloud Data Warehouse and fetch data. This authentication type is supported on Databricks connections only. - `PERSONAL_ACCESS_TOKEN`: For connections that require Personal Access Token account credentials to authenticate to the Cloud Data Warehouse and fetch data. This authentication type is supported on Databricks connections only. - `OAUTH_CLIENT_CREDENTIALS`: For connections that require OAuth Client Credentials to authenticate to the Cloud Data Warehouse and fetch data. This authentication type is supported on Snowflake connections only. - To include more details about connection objects in the API response, set `include_details` to `true`. - You can also sort the output by field names and filter connections by tags. **NOTE**: When filtering connection records by parameters other than `data_warehouse_types` or `tag_identifiers`, ensure that you set `record_size` to `-1` and `record_offset` to `0` for precise results. + * @param searchConnectionRequest + */ + public searchConnection(searchConnectionRequest: SearchConnectionRequest, _options?: Configuration): Observable> { + const requestContextPromise = this.requestFactory.searchConnection(searchConnectionRequest, _options); + + // build promise chain + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); + } + + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + pipe(mergeMap((response: ResponseContext) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.searchConnection(rsp))); + })); + } + + /** + * Version: 26.5.0.cl or later Synchronizes connection metadata attributes from your Cloud Data Warehouse (CDW) with ThoughtSpot. Requires the `DATAMANAGEMENT` (**Can manage data**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` (**Can manage data models**) privilege is required. #### Usage guidelines To synchronize attributes from a CDW, specify the connection GUID or name in the `connection_identifier` path parameter and `sync_attributes` in the request body. Default attribute is `[\"DESCRIPTION\"]`. ##### Hierarchical schema * Connection: The connection object for the sync operation. * Tables: Tables for the sync operation. When no table is specified, all tables are synchronized. * Columns: If the table is specified, you can add the columns for the sync operation. If no columns are specified, all columns in the specified table are considered for the sync operation. To set the scope for the sync operation: * Connection-level: To sync all tables and columns, pass an empty request body, or only the attributes in the request body. * Table-level: To synchronize specific tables and their columns, specify the table identifiers in the `tables` array. * Column-level: To synchronize specific columns, specify the table identifier as the key and column identifiers as the value in the `tables` array. ``` { \"tables\": [ {\"table-guid-1\": [\"column-guid-1\", \"column-guid-2\"]}, \"table-guid-2\" ], \"sync_attributes\": [\"DESCRIPTION\"] } ``` ##### API response If the sync operation is successful, the API returns the following information: * Status of the sync operation. For example, `SUCCESS`, `PARTIAL_SUCCESS`, or `NO_UPDATE`. * Number of tables and columns that were updated. * Number of tables and columns with the sync failed status when the overall sync status is `PARTIAL_SUCCESS`. * Message text indicating the sync results. + * @param connectionIdentifier Unique ID or name of the connection. + * @param syncMetadataRequest + */ + public syncMetadata(connectionIdentifier: string, syncMetadataRequest: SyncMetadataRequest, _options?: Configuration): Observable { + const requestContextPromise = this.requestFactory.syncMetadata(connectionIdentifier, syncMetadataRequest, _options); + + // build promise chain + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); + } + + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + pipe(mergeMap((response: ResponseContext) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.syncMetadata(rsp))); + })); + } + + /** + * Version: 9.2.0.cl or later **Important**: This endpoint is deprecated and will be removed from ThoughtSpot in September 2025. ThoughtSpot strongly recommends using the [Update connection V2](#/http/api-endpoints/connections/update-connection-v2) endpoint to update your connection objects. #### Usage guidelines Updates a connection object. Requires `DATAMANAGEMENT` (**Can manage data**) and edit permissions to the connection object, or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) privilege is required. To update a connection object, pass these parameters in your API request: 1. GUID of the connection object. 2. If you are updating tables or database schema of a connection object: a. Add the updated JSON map of metadata with database, schema, and tables in `data_warehouse_config`. b. Set `validate` to `true`. 3. If you are updating a configuration attribute, connection name, or description, you can set `validate` to `false`. + * @param updateConnectionRequest + */ + public updateConnection(updateConnectionRequest: UpdateConnectionRequest, _options?: Configuration): Observable { + const requestContextPromise = this.requestFactory.updateConnection(updateConnectionRequest, _options); + + // build promise chain + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); + } + + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + pipe(mergeMap((response: ResponseContext) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.updateConnection(rsp))); + })); + } + + /** + * Version: 26.6.0.cl or later Activates or deactivates a connection. A deactivated connection cannot be used for queries or operations until it is activated again. Requires `DATAMANAGEMENT` (**Can manage data**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) privilege is required. Only the connection owner or an administrator can perform this operation. #### Usage guidelines To update the status of a connection, specify the connection GUID or name in the `connection_identifier` path parameter and the desired `status` in the request body. - **ACTIVATED**: Enables the connection. Queries and operations can resume on an activated connection. - **DEACTIVATED**: Disables the connection. It does not remove the connection metadata, but only makes the connection unavailable for queries and operations. You can reactivate a deactivated connection by setting \"status\": \"ACTIVATED\". + * @param connectionIdentifier Unique ID or name of the connection. + * @param updateConnectionStatusRequest + */ + public updateConnectionStatus(connectionIdentifier: string, updateConnectionStatusRequest: UpdateConnectionStatusRequest, _options?: Configuration): Observable { + const requestContextPromise = this.requestFactory.updateConnectionStatus(connectionIdentifier, updateConnectionStatusRequest, _options); + + // build promise chain + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); + } + + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + pipe(mergeMap((response: ResponseContext) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.updateConnectionStatus(rsp))); + })); + } + + /** + * Version: 10.4.0.cl or later Updates a connection object. Requires `DATAMANAGEMENT` (**Can manage data**) and edit permissions to the connection object, or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) privilege is required. To update a connection object, pass these parameters in your API request: 1. GUID of the connection object. 2. If you are updating tables or database schema of a connection object: a. Add the updated JSON map of metadata with database, schema, and tables in `data_warehouse_config`. b. Set `validate` to `true`. **NOTE:** If the `authentication_type` is anything other than SERVICE_ACCOUNT, you must explicitly provide the authenticationType property in the payload. If you do not specify authenticationType, the API will default to SERVICE_ACCOUNT as the authentication type. * A JSON map of configuration attributes, database details, and table properties in `data_warehouse_config` as shown in the following example: * This is an example of updating a single table in a empty connection: ``` { \"authenticationType\": \"SERVICE_ACCOUNT\", \"externalDatabases\": [ { \"name\": \"DEVELOPMENT\", \"isAutoCreated\": false, \"schemas\": [ { \"name\": \"TS_dataset\", \"tables\": [ { \"name\": \"DEMORENAME\", \"type\": \"TABLE\", \"description\": \"\", \"selected\": true, \"linked\": true, \"gid\": 0, \"datasetId\": \"-1\", \"subType\": \"\", \"reportId\": \"\", \"viewId\": \"\", \"columns\": [ { \"name\": \"Col1\", \"type\": \"VARCHAR\", \"canImport\": true, \"selected\": true, \"description\": \"\", \"isLinkedActive\": true, \"isAggregate\": false }, { \"name\": \"Col2\", \"type\": \"VARCHAR\", \"canImport\": true, \"selected\": true, \"description\": \"\", \"isLinkedActive\": true, \"isAggregate\": false }, { \"name\": \"Col3\", \"type\": \"VARCHAR\", \"canImport\": true, \"selected\": true, \"description\": \"\", \"isLinkedActive\": true, \"isAggregate\": false }, { \"name\": \"Col312\", \"type\": \"VARCHAR\", \"canImport\": true, \"selected\": true, \"description\": \"\", \"isLinkedActive\": true, \"isAggregate\": false }, { \"name\": \"Col4\", \"type\": \"VARCHAR\", \"canImport\": true, \"selected\": true, \"description\": \"\", \"isLinkedActive\": true, \"isAggregate\": false } ], \"relationships\": [] } ] } ] } ], \"configuration\": { \"password\": \"\", \"database\": \"DEVELOPMENT\", \"role\": \"DEV\", \"accountName\": \"thoughtspot_partner\", \"warehouse\": \"DEMO_WH\", \"user\": \"DEV_USER\" } } ``` * This is an example of updating a single table in an existing connection with tables: ``` { \"authenticationType\": \"SERVICE_ACCOUNT\", \"externalDatabases\": [ { \"name\": \"DEVELOPMENT\", \"isAutoCreated\": false, \"schemas\": [ { \"name\": \"TS_dataset\", \"tables\": [ { \"name\": \"CUSTOMER\", \"type\": \"TABLE\", \"description\": \"\", \"selected\": true, \"linked\": true, \"gid\": 0, \"datasetId\": \"-1\", \"subType\": \"\", \"reportId\": \"\", \"viewId\": \"\", \"columns\": [], \"relationships\": [] }, { \"name\": \"tpch5k_falcon_default_schema_users\", \"type\": \"TABLE\", \"description\": \"\", \"selected\": true, \"linked\": true, \"gid\": 0, \"datasetId\": \"-1\", \"subType\": \"\", \"reportId\": \"\", \"viewId\": \"\", \"columns\": [ { \"name\": \"user_id\", \"type\": \"INT64\", \"canImport\": true, \"selected\": true, \"description\": \"\", \"isLinkedActive\": true, \"isAggregate\": false }, { \"name\": \"product_id\", \"type\": \"INT64\", \"canImport\": true, \"selected\": true, \"description\": \"\", \"isLinkedActive\": true, \"isAggregate\": false }, { \"name\": \"user_cost\", \"type\": \"INT64\", \"canImport\": true, \"selected\": true, \"description\": \"\", \"isLinkedActive\": true, \"isAggregate\": false } ], \"relationships\": [] } ] } ] } ], \"configuration\": { \"password\": \"\", \"database\": \"DEVELOPMENT\", \"role\": \"DEV\", \"accountName\": \"thoughtspot_partner\", \"warehouse\": \"DEMO_WH\", \"user\": \"DEV_USER\" } } ``` 3. If you are updating a configuration attribute, connection name, or description, you can set `validate` to `false`. **NOTE:** If the `authentication_type` is anything other than SERVICE_ACCOUNT, you must explicitly provide the authenticationType property in the payload. If you do not specify authenticationType, the API will default to SERVICE_ACCOUNT as the authentication type. * A JSON map of configuration attributes in `data_warehouse_config`. The following example shows the configuration attributes for a Snowflake connection: ``` { \"configuration\":{ \"accountName\":\"thoughtspot_partner\", \"user\":\"tsadmin\", \"password\":\"TestConn123\", \"role\":\"sysadmin\", \"warehouse\":\"MEDIUM_WH\" }, \"externalDatabases\":[ ] } ``` + * @param connectionIdentifier Unique ID or name of the connection. + * @param updateConnectionV2Request + */ + public updateConnectionV2(connectionIdentifier: string, updateConnectionV2Request: UpdateConnectionV2Request, _options?: Configuration): Observable { + const requestContextPromise = this.requestFactory.updateConnectionV2(connectionIdentifier, updateConnectionV2Request, _options); + + // build promise chain + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); + } + + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + pipe(mergeMap((response: ResponseContext) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.updateConnectionV2(rsp))); + })); + } + +} + +import { CustomActionApiRequestFactory, CustomActionApiResponseProcessor} from "../apis/CustomActionApi"; +export class ObservableCustomActionApi { + private requestFactory: CustomActionApiRequestFactory; + private responseProcessor: CustomActionApiResponseProcessor; + private configuration: Configuration; + + public constructor( + configuration: Configuration, + requestFactory?: CustomActionApiRequestFactory, + responseProcessor?: CustomActionApiResponseProcessor + ) { + this.configuration = configuration; + this.requestFactory = requestFactory || new CustomActionApiRequestFactory(configuration); + this.responseProcessor = responseProcessor || new CustomActionApiResponseProcessor(); + } + + /** + * Version: 9.6.0.cl or later Creates a custom action that appears as a menu action on a saved Answer or Liveboard visualization. Requires `DEVELOPER` (**Has Developer privilege**) or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `DEVELOPER` (**Has developer privilege**) privilege is required. #### Usage Guidelines The API lets you create the following types of custom actions: * URL-based action Allows pushing data to an external URL. * Callback action Triggers a callback to the host application and initiates a response payload on an embedded ThoughtSpot instance. By default, custom actions are visible to only administrator or developer users. To make a custom action available to other users, and specify the groups in `group_identifiers`. By default, the custom action is set as a _global_ action on all visualizations and saved Answers. To assign a custom action to specific Liveboard visualization, saved Answer, or Worksheet, set `visibility` to `false` in `default_action_config` property and specify the GUID or name of the object in `associate_metadata`. For more information, see [Custom actions](https://developers.thoughtspot.com/docs/custom-action-intro). + * @param createCustomActionRequest + */ + public createCustomAction(createCustomActionRequest: CreateCustomActionRequest, _options?: Configuration): Observable { + const requestContextPromise = this.requestFactory.createCustomAction(createCustomActionRequest, _options); + + // build promise chain + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); + } + + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + pipe(mergeMap((response: ResponseContext) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.createCustomAction(rsp))); + })); + } + + /** + * Version: 9.6.0.cl or later Removes the custom action specified in the API request. Requires `DEVELOPER` (**Has Developer privilege**) or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `DEVELOPER` (**Has developer privilege**) privilege is required. + * @param customActionIdentifier Unique ID or name of the custom action. + */ + public deleteCustomAction(customActionIdentifier: string, _options?: Configuration): Observable { + const requestContextPromise = this.requestFactory.deleteCustomAction(customActionIdentifier, _options); + + // build promise chain + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); + } + + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + pipe(mergeMap((response: ResponseContext) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.deleteCustomAction(rsp))); + })); + } + + /** + * Version: 9.6.0.cl or later Gets custom actions configured on the cluster. Requires `DEVELOPER` (**Has Developer privilege**) or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `DEVELOPER` (**Has developer privilege**) privilege is required. + * @param searchCustomActionsRequest + */ + public searchCustomActions(searchCustomActionsRequest: SearchCustomActionsRequest, _options?: Configuration): Observable> { + const requestContextPromise = this.requestFactory.searchCustomActions(searchCustomActionsRequest, _options); + + // build promise chain + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); + } + + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + pipe(mergeMap((response: ResponseContext) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.searchCustomActions(rsp))); + })); + } + + /** + * Version: 9.6.0.cl or later Updates a custom action. Requires `DEVELOPER` (**Has Developer privilege**) or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `DEVELOPER` (**Has developer privilege**) privilege is required. #### Usage Guidelines The API allows you to modify the following properties: * Name of the custom action * Action availability to groups * Association to metadata objects * Authentication settings for a URL-based action For more information, see [Custom actions](https://developers.thoughtspot.com/docs/custom-action-intro). + * @param customActionIdentifier Unique ID or name of the custom action. + * @param updateCustomActionRequest + */ + public updateCustomAction(customActionIdentifier: string, updateCustomActionRequest: UpdateCustomActionRequest, _options?: Configuration): Observable { + const requestContextPromise = this.requestFactory.updateCustomAction(customActionIdentifier, updateCustomActionRequest, _options); + + // build promise chain + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); + } + + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + pipe(mergeMap((response: ResponseContext) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.updateCustomAction(rsp))); + })); + } + +} + +import { CustomCalendarsApiRequestFactory, CustomCalendarsApiResponseProcessor} from "../apis/CustomCalendarsApi"; +export class ObservableCustomCalendarsApi { + private requestFactory: CustomCalendarsApiRequestFactory; + private responseProcessor: CustomCalendarsApiResponseProcessor; + private configuration: Configuration; + + public constructor( + configuration: Configuration, + requestFactory?: CustomCalendarsApiRequestFactory, + responseProcessor?: CustomCalendarsApiResponseProcessor + ) { + this.configuration = configuration; + this.requestFactory = requestFactory || new CustomCalendarsApiRequestFactory(configuration); + this.responseProcessor = responseProcessor || new CustomCalendarsApiResponseProcessor(); + } + + /** + * Version: 10.12.0.cl or later Creates a new [custom calendar](https://docs.thoughtspot.com/cloud/latest/connections-cust-cal). Requires `DATAMANAGEMENT` (**Can manage data**) or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your ThoughtSpot instance, the `CAN_MANAGE_CUSTOM_CALENDAR` (**Can manage custom calendars**) privilege is required. #### Usage guidelines You can create a custom calendar from scratch or an existing Table in ThoughtSpot. For both methods of calendar creation, the following parameters are required: * Name of the custom calendar. * Calendar creation method. To create a calendar from an existing table, specify the method: - `FROM_EXISTING_TABLE` - Creates calendar from the table reference provided in the API request. - `FROM_INPUT_PARAMS` - Creates a calendar from the parameters defined in the API request. * Connection ID and Table name * Database and schema name attributes: For most Cloud Data Warehouse (CDW) connectors, both `database_name` and `schema_name` attributes are required. However, the attribute requirements are conditional and vary based on the connector type and its metadata structure. For example, for connectors such as Teradata, MySQL, SingleSore, Amazon Aurora MySQL, Amazon RDS MySQL, Oracle, and GCP_MYSQL, the `schema_name` is required, whereas the `database_name` attribute is not. Similarly, connectors such as ClickHouse require you to specify the `database_name` and the schema specification in such cases is optional. **NOTE**: If you are creating a calendar from an existing table, ensure that the referenced table matches the required DDL for custom calendars. If the schema does not match, the API returns an error. ##### Calendar type The API allows you to create the following types of calendars: * `MONTH_OFFSET`. The default calendar type. A `MONTH_OFFSET` calendar is offset by a few months from the standard calendar months (January to December) and the year begins with the month defined in the request. For example, if the `month_offset` value is set as `April`, the calendar year begins in April. * `4-4-5`. Each quarter in the calendar will include two 4-week months followed by one 5-week month. * `4-5-4`. Each quarter in the calendar will include two 4-week months with a 5-week month between. * `5-4-4`. Each quarter begins with a 5-week month, followed by two 4-week months. To start and end the calendar on a specific date, specify the dates in the `MM/DD/YYYY` format. For `MONTH_OFFSET` calendars, ensure that the `start_date` matches the month specified in the `month_offset` attribute. You can also set the starting day of the week and customize the prefixes for year and quarter labels. #### Examples To create a calendar from an existing table: ``` { \"name\": \"MyCustomCalendar1\", \"table_reference\": { \"connection_identifier\": \"4db8ea22-2ff4-4224-b05a-26674717e468\", \"table_name\": \"MyCalendarTable\", \"database_name\": \"RETAILAPPAREL\", \"schema_name\": \"PUBLIC\" }, \"creation_method\": \"FROM_EXISTING_TABLE\", } ``` To create a calendar from scratch: ``` { \"name\": \"MyCustomCalendar1\", \"table_reference\": { \"connection_identifier\": \"4db8ea22-2ff4-4224-b05a-26674717e468\", \"table_name\": \"MyCalendarTable\", \"database_name\": \"RETAILAPPAREL\", \"schema_name\": \"PUBLIC\" }, \"creation_method\": \"FROM_INPUT_PARAMS\", \"calendar_type\": \"MONTH_OFFSET\", \"month_offset\": \"April\", \"start_day_of_week\": \"Monday\", \"quarter_name_prefix\": \"Q\", \"year_name_prefix\": \"FY\", \"start_date\": \"04/01/2025\", \"end_date\": \"04/31/2025\" } ``` + * @param createCalendarRequest + */ + public createCalendar(createCalendarRequest: CreateCalendarRequest, _options?: Configuration): Observable { + const requestContextPromise = this.requestFactory.createCalendar(createCalendarRequest, _options); + + // build promise chain + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); + } + + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + pipe(mergeMap((response: ResponseContext) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.createCalendar(rsp))); + })); + } + + /** + * Version: 10.12.0.cl or later Deletes a [custom calendar](https://docs.thoughtspot.com/cloud/latest/connections-cust-cal). Requires `DATAMANAGEMENT` (**Can manage data**) or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your ThoughtSpot instance, the `CAN_MANAGE_CUSTOM_CALENDAR` (**Can manage custom calendars**) privilege is required. #### Usage guidelines To delete a custom calendar, specify the calendar ID as a path parameter in the request URL. + * @param calendarIdentifier Unique ID or name of the Calendar. + */ + public deleteCalendar(calendarIdentifier: string, _options?: Configuration): Observable { + const requestContextPromise = this.requestFactory.deleteCalendar(calendarIdentifier, _options); + + // build promise chain + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); + } + + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + pipe(mergeMap((response: ResponseContext) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.deleteCalendar(rsp))); + })); + } + + /** + * Version: 10.12.0.cl or later Exports a [custom calendar](https://docs.thoughtspot.com/cloud/latest/connections-cust-cal) in the CSV format. Requires `DATAMANAGEMENT` (**Can manage data**) or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your ThoughtSpot instance, the `CAN_MANAGE_CUSTOM_CALENDAR` (**Can manage custom calendars**) privilege is required. #### Usage guidelines Use this API to download a custom calendar in the CSV file format. In your API request, specify the following parameters. * Start and end date of the calendar. For \"month offset\" calendars, the start date must match the month defined in the `month_offset` attribute. You can also specify optional parameters such as the starting day of the week and prefixes for the quarter and year labels. + * @param generateCSVRequest + */ + public generateCSV(generateCSVRequest: GenerateCSVRequest, _options?: Configuration): Observable { + const requestContextPromise = this.requestFactory.generateCSV(generateCSVRequest, _options); + + // build promise chain + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); + } + + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + pipe(mergeMap((response: ResponseContext) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.generateCSV(rsp))); + })); + } + + /** + * Version: 10.12.0.cl or later Gets a list of [custom calendars](https://docs.thoughtspot.com/cloud/latest/connections-cust-cal). Requires `DATAMANAGEMENT` (**Can manage data**) or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your ThoughtSpot instance, the `CAN_MANAGE_CUSTOM_CALENDAR` (**Can manage custom calendars**) privilege is required. #### Usage guidelines By default, the API returns a list of custom calendars for all connection objects. To retrieve custom calendar details for a particular connection, specify the connection ID. You can also use other search parameters such as `name_pattern` and `sort_options` as search filters. The `name_pattern` parameter filters and returns only those objects that match the specified pattern. Use `%` as a wildcard for pattern matching. + * @param searchCalendarsRequest + */ + public searchCalendars(searchCalendarsRequest: SearchCalendarsRequest, _options?: Configuration): Observable> { + const requestContextPromise = this.requestFactory.searchCalendars(searchCalendarsRequest, _options); + + // build promise chain + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); + } + + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + pipe(mergeMap((response: ResponseContext) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.searchCalendars(rsp))); + })); + } + + /** + * Version: 10.12.0.cl or later Updates the properties of a [custom calendar](https://docs.thoughtspot.com/cloud/latest/connections-cust-cal). Requires `DATAMANAGEMENT` (**Can manage data**) or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your ThoughtSpot instance, the `CAN_MANAGE_CUSTOM_CALENDAR` (**Can manage custom calendars**) privilege is required. #### Usage guidelines You can update the properties of a calendar using one of the following methods: * `FROM_INPUT_PARAMS` to update the calendar properties with the values defined in the API request. * `FROM_EXISTING_TABLE` Creates a calendar from the parameters defined in the API request. To update a custom calendar, specify the calendar ID as a path parameter in the request URL and the following parameters in the request body: * Connection ID and Table name * Database and schema name attributes: For most Cloud Data Warehouse (CDW) connectors, both `database_name` and `schema_name` attributes are required. However, the attribute requirements are conditional and vary based on the connector type and its metadata structure. For example, for connectors such as Teradata, MySQL, SingleSore, Amazon Aurora MySQL, Amazon RDS MySQL, Oracle, and GCP_MYSQL, the `schema_name` is required, whereas the `database_name` attribute is not. Similarly, connectors such as ClickHouse require you to specify the `database_name` and the schema specification in such cases is optional. The API allows you to modify the calendar type, month offset value, start and end date, starting day of the week, and prefixes assigned to the year and quarter labels. #### Examples Update a custom calendar using an existing Table in ThoughtSpot: ``` { \"update_method\": \"FROM_EXISTING_TABLE\", \"table_reference\": { \"connection_identifier\": \"Connection1\", \"database_name\": \"db1\", \"table_name\": \"custom_calendar_2025\", \"schame_name\": \"schemaVar\" } } ``` Update a custom calendar with the attributes defined in the API request: ``` { \"update_method\": \"FROM_INPUT_PARAMS\", \"table_reference\": { \"connection_identifier\": \"Connection1\", \"database_name\": \"db1\", \"table_name\": \"custom_calendar_2025\", \"schame_name\": \"schemaVar\" }, \"month_offset\": \"August\", \"start_day_of_week\": \"Monday\", \"start_date\": \"08/01/2025\", \"end_date\": \"07/31/2026\" } ``` + * @param calendarIdentifier Unique Id or name of the calendar. + * @param updateCalendarRequest + */ + public updateCalendar(calendarIdentifier: string, updateCalendarRequest: UpdateCalendarRequest, _options?: Configuration): Observable { + const requestContextPromise = this.requestFactory.updateCalendar(calendarIdentifier, updateCalendarRequest, _options); + + // build promise chain + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); + } + + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + pipe(mergeMap((response: ResponseContext) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.updateCalendar(rsp))); + })); + } + +} + +import { DBTApiRequestFactory, DBTApiResponseProcessor} from "../apis/DBTApi"; +export class ObservableDBTApi { + private requestFactory: DBTApiRequestFactory; + private responseProcessor: DBTApiResponseProcessor; + private configuration: Configuration; + + public constructor( + configuration: Configuration, + requestFactory?: DBTApiRequestFactory, + responseProcessor?: DBTApiResponseProcessor + ) { + this.configuration = configuration; + this.requestFactory = requestFactory || new DBTApiRequestFactory(configuration); + this.responseProcessor = responseProcessor || new DBTApiResponseProcessor(); + } + + /** + * Version: 9.9.0.cl or later Creates a DBT connection object in ThoughtSpot. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege or `DATAMANAGEMENT` (**Can manage data**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the following Data control privileges may be required: - `CAN_MANAGE_CUSTOM_CALENDAR`(**Can manage custom calendars**) - `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) - `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` (**Can manage data models**) #### About create DBT connection DBT connection in ThoughtSpot is used by the user to define DBT credentials for cloud . The API needs embrace connection, embrace database name, DBT url, import type, DBT account identifier, DBT project identifier, DBT access token and environment details (or) embrace connection, embrace database name, import type, file_content to create a connection object. To know more about DBT, see ThoughtSpot Product Documentation. + * @param connectionName Name of the connection. + * @param databaseName Name of the Database. + * @param importType Mention type of Import + * @param accessToken Access token is mandatory when Import_Type is DBT_CLOUD. + * @param dbtUrl DBT URL is mandatory when Import_Type is DBT_CLOUD. + * @param accountId Account ID is mandatory when Import_Type is DBT_CLOUD + * @param projectId Project ID is mandatory when Import_Type is DBT_CLOUD + * @param dbtEnvId DBT Environment ID\\\" + * @param projectName Name of the project + * @param fileContent Upload DBT Manifest and Catalog artifact files as a ZIP file. This field is Mandatory when Import Type is \\\'ZIP_FILE\\\' + */ + public dbtConnection(connectionName: string, databaseName: string, importType?: string, accessToken?: string, dbtUrl?: string, accountId?: string, projectId?: string, dbtEnvId?: string, projectName?: string, fileContent?: HttpFile, _options?: Configuration): Observable { + const requestContextPromise = this.requestFactory.dbtConnection(connectionName, databaseName, importType, accessToken, dbtUrl, accountId, projectId, dbtEnvId, projectName, fileContent, _options); + + // build promise chain + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); + } + + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + pipe(mergeMap((response: ResponseContext) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.dbtConnection(rsp))); + })); + } + + /** + * Version: 9.9.0.cl or later Resynchronize the existing list of models, tables, worksheet tml’s and import them to Thoughtspot based on the DBT connection object. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege or `DATAMANAGEMENT` (**Can manage data**) privilege, along with an existing DBT connection. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the following data control privileges may be required: - `CAN_MANAGE_CUSTOM_CALENDAR`(**Can manage custom calendars**) - `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) - `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` (**Can manage data models**) + * @param dbtConnectionIdentifier Unique ID of the DBT connection. + * @param fileContent Upload DBT Manifest and Catalog artifact files as a ZIP file. This field is mandatory if the connection was created with import_type ‘ZIP_FILE’ + */ + public dbtGenerateSyncTml(dbtConnectionIdentifier: string, fileContent?: HttpFile, _options?: Configuration): Observable { + const requestContextPromise = this.requestFactory.dbtGenerateSyncTml(dbtConnectionIdentifier, fileContent, _options); + + // build promise chain + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); + } + + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + pipe(mergeMap((response: ResponseContext) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.dbtGenerateSyncTml(rsp))); + })); + } + + /** + * Version: 9.9.0.cl or later Generate required table and worksheet and import them. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege or `DATAMANAGEMENT` (**Can manage data**) privilege, along with an existing DBT connection. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the following data control privileges may be required: - `CAN_MANAGE_CUSTOM_CALENDAR`(**Can manage custom calendars**) - `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) - `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` (**Can manage data models**) #### About generate TML Models and Worksheets to be imported can be selected by the user as part of the API. + * @param dbtConnectionIdentifier Unique ID of the DBT connection. + * @param modelTables List of Models and their respective Tables Example: \\\'[{\\\"model_name\\\": \\\"model_name\\\", \\\"tables\\\": [\\\"table_name\\\"]}]\\\' + * @param importWorksheets Mention the worksheet tmls to import + * @param worksheets List of worksheets is mandatory when import_Worksheets is type SELECTED Example: [\\\"worksheet_name\\\"] + * @param fileContent Upload DBT Manifest and Catalog artifact files as a ZIP file. This field is mandatory if the connection was created with import_type ‘ZIP_FILE’ + */ + public dbtGenerateTml(dbtConnectionIdentifier: string, modelTables: string, importWorksheets: string, worksheets?: string, fileContent?: HttpFile, _options?: Configuration): Observable { + const requestContextPromise = this.requestFactory.dbtGenerateTml(dbtConnectionIdentifier, modelTables, importWorksheets, worksheets, fileContent, _options); + + // build promise chain + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); + } + + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + pipe(mergeMap((response: ResponseContext) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.dbtGenerateTml(rsp))); + })); + } + + /** + * Version: 9.9.0.cl or later Gets a list of DBT connection objects by user and organization, available on the ThoughtSpot system. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege or `DATAMANAGEMENT` (**Can manage data**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the following Data control privileges may be required: - `CAN_MANAGE_CUSTOM_CALENDAR`(**Can manage custom calendars**) - `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) - `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` (**Can manage data models**) #### About search DBT connection To get details of a specific DBT connection identifier, database connection identifier, database connection name, database name, project name, project identifier, environment identifier , import type and author. + */ + public dbtSearch(_options?: Configuration): Observable> { + const requestContextPromise = this.requestFactory.dbtSearch(_options); + + // build promise chain + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); + } + + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + pipe(mergeMap((response: ResponseContext) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.dbtSearch(rsp))); + })); + } + + /** + * Version: 9.9.0.cl or later Removes the specified DBT connection object from the ThoughtSpot system. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) or `DATAMANAGEMENT` (**Can manage data ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the following Data control privileges may be required: - `CAN_MANAGE_CUSTOM_CALENDAR`(**Can manage custom calendars**) - `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) - `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` (**Can manage data models**) + * @param dbtConnectionIdentifier Unique ID of the DBT Connection. + */ + public deleteDbtConnection(dbtConnectionIdentifier: string, _options?: Configuration): Observable { + const requestContextPromise = this.requestFactory.deleteDbtConnection(dbtConnectionIdentifier, _options); + + // build promise chain + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); + } + + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + pipe(mergeMap((response: ResponseContext) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.deleteDbtConnection(rsp))); + })); + } + + /** + * Version: 9.9.0.cl or later Updates a DBT connection object. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege or `DATAMANAGEMENT` (**Can manage data ThoughtSpot**) privilege, along with an existing DBT connection. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the following data control privileges may be required: - `CAN_MANAGE_CUSTOM_CALENDAR`(**Can manage custom calendars**) - `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) - `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` (**Can manage data models**) #### About update DBT connection You can modify DBT connection object properties such as embrace connection name, embrace database name, import type, account identifier, access token, project identifier and environment (or) embrace connection, embrace database name, import type, file_content settings. + * @param dbtConnectionIdentifier Unique ID of the DBT Connection. + * @param connectionName Name of the connection. + * @param databaseName Name of the Database. + * @param importType Mention type of Import + * @param accessToken Access token is mandatory when Import_Type is DBT_CLOUD. + * @param dbtUrl DBT URL is mandatory when Import_Type is DBT_CLOUD. + * @param accountId Account ID is mandatory when Import_Type is DBT_CLOUD + * @param projectId Project ID is mandatory when Import_Type is DBT_CLOUD + * @param dbtEnvId DBT Environment ID\\\" + * @param projectName Name of the project + * @param fileContent Upload DBT Manifest and Catalog artifact files as a ZIP file. This field is Mandatory when Import Type is \\\'ZIP_FILE\\\' + */ + public updateDbtConnection(dbtConnectionIdentifier: string, connectionName?: string, databaseName?: string, importType?: string, accessToken?: string, dbtUrl?: string, accountId?: string, projectId?: string, dbtEnvId?: string, projectName?: string, fileContent?: HttpFile, _options?: Configuration): Observable { + const requestContextPromise = this.requestFactory.updateDbtConnection(dbtConnectionIdentifier, connectionName, databaseName, importType, accessToken, dbtUrl, accountId, projectId, dbtEnvId, projectName, fileContent, _options); + + // build promise chain + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); + } + + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + pipe(mergeMap((response: ResponseContext) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.updateDbtConnection(rsp))); + })); + } + +} + +import { DataApiRequestFactory, DataApiResponseProcessor} from "../apis/DataApi"; +export class ObservableDataApi { + private requestFactory: DataApiRequestFactory; + private responseProcessor: DataApiResponseProcessor; + private configuration: Configuration; + + public constructor( + configuration: Configuration, + requestFactory?: DataApiRequestFactory, + responseProcessor?: DataApiResponseProcessor + ) { + this.configuration = configuration; + this.requestFactory = requestFactory || new DataApiRequestFactory(configuration); + this.responseProcessor = responseProcessor || new DataApiResponseProcessor(); + } + + /** + * Version: 9.0.0.cl or later Fetches data from a saved Answer. Requires at least view access to the saved Answer. The `record_size` attribute determines the number of records to retrieve in an API call. For more information about pagination, record size, and maximum row limit, see [Pagination and record size settings](https://developers.thoughtspot.com/docs/fetch-data-and-report-apis#_pagination_settings_for_data_and_report_apis). + * @param fetchAnswerDataRequest + */ + public fetchAnswerData(fetchAnswerDataRequest: FetchAnswerDataRequest, _options?: Configuration): Observable { + const requestContextPromise = this.requestFactory.fetchAnswerData(fetchAnswerDataRequest, _options); + + // build promise chain + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); + } + + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + pipe(mergeMap((response: ResponseContext) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.fetchAnswerData(rsp))); + })); + } + + /** + * Version: 9.0.0.cl or later Gets data from a Liveboard object and its visualization. Requires at least view access to the Liveboard. #### Usage guidelines In the request body, specify the GUID or name of the Liveboard. To get data for specific visualizations, add the GUIDs or names of the visualizations in the API request. To include unsaved changes in the report, pass the `transient_pinboard_content` script generated from the `getExportRequestForCurrentPinboard` method in the Visual Embed SDK. Upon successful execution, the API returns the report with unsaved changes. If the new Liveboard experience mode, the transient content includes ad hoc changes to visualizations such as sorting, toggling of legends, and data drill down. For more information, and see [Liveboard data API](https://developers.thoughtspot.com/docs/fetch-data-and-report-apis#_fetch_liveboard_data_api). + * @param fetchLiveboardDataRequest + */ + public fetchLiveboardData(fetchLiveboardDataRequest: FetchLiveboardDataRequest, _options?: Configuration): Observable { + const requestContextPromise = this.requestFactory.fetchLiveboardData(fetchLiveboardDataRequest, _options); + + // build promise chain + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); + } + + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + pipe(mergeMap((response: ResponseContext) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.fetchLiveboardData(rsp))); + })); + } + + /** + * Version: 9.0.0.cl or later Generates an Answer from a given data source. Requires at least view access to the data source object (Worksheet or View). #### Usage guidelines To search data, specify the data source GUID in `logical_table_identifier`. The data source can be a Worksheet, View, Table, or SQL view. Pass search tokens in the `query_string` attribute in the API request as shown in the following example: ``` { \"query_string\": \"[sales] by [store]\", \"logical_table_identifier\": \"cd252e5c-b552-49a8-821d-3eadaa049cca\", } ``` For more information about the `query_string` format and data source attribute, see [Search data API](https://developers.thoughtspot.com/docs/fetch-data-and-report-apis#_search_data_api). The `record_size` attribute determines the number of records to retrieve in an API call. For more information about pagination, record size, and maximum row limit, see [Pagination and record size settings](https://developers.thoughtspot.com/docs/fetch-data-and-report-apis#_pagination_settings_for_data_and_report_api). + * @param searchDataRequest + */ + public searchData(searchDataRequest: SearchDataRequest, _options?: Configuration): Observable { + const requestContextPromise = this.requestFactory.searchData(searchDataRequest, _options); + + // build promise chain + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); + } + + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + pipe(mergeMap((response: ResponseContext) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.searchData(rsp))); + })); + } + +} + +import { EmailCustomizationApiRequestFactory, EmailCustomizationApiResponseProcessor} from "../apis/EmailCustomizationApi"; +export class ObservableEmailCustomizationApi { + private requestFactory: EmailCustomizationApiRequestFactory; + private responseProcessor: EmailCustomizationApiResponseProcessor; + private configuration: Configuration; + + public constructor( + configuration: Configuration, + requestFactory?: EmailCustomizationApiRequestFactory, + responseProcessor?: EmailCustomizationApiResponseProcessor + ) { + this.configuration = configuration; + this.requestFactory = requestFactory || new EmailCustomizationApiRequestFactory(configuration); + this.responseProcessor = responseProcessor || new EmailCustomizationApiResponseProcessor(); + } + + /** + * Version: 10.10.0.cl or later Creates a customization configuration for the notification email. #### Pre-requisites Requires `DEVELOPER` (**has developer privilege**) or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `DEVELOPER` (**Has developer privilege**) privilege is required. **NOTE**:This endpoint in currently in beta. Contact ThoughtSpot support to enable this on your instance. #### Usage guidelines To create a custom configuration pass these parameters in your API request: - A JSON map of configuration attributes `template_properties`. The following example shows a sample set of customization configuration: ``` { { \"cta_button_bg_color\": \"#444DEA\", \"cta_text_font_color\": \"#FFFFFF\", \"primary_bg_color\": \"#D3DEF0\", \"logo_url\": \"https://storage.pardot.com/710713/1642089901EbkRibJq/TS_fullworkmark_darkmode.png\", \"font_family\": \"\", \"product_name\": \"ThoughtSpot\", \"footer_address\": \"444 Castro St, Suite 1000 Mountain View, CA 94041\", \"footer_phone\": \"(800) 508-7008\", \"replacement_value_for_liveboard\": \"Dashboard\", \"replacement_value_for_answer\": \"Chart\", \"replacement_value_for_spot_iq\": \"AI Insights\", \"hide_footer_phone\": false, \"hide_footer_address\": false, \"hide_product_name\": false, \"hide_manage_notification\": false, \"hide_mobile_app_nudge\": false, \"hide_privacy_policy\": false, \"hide_ts_vocabulary_definitions\": false, \"hide_error_message\": false, \"hide_unsubscribe_link\": false, \"hide_notification_status\": false, \"hide_modify_alert\": false, \"company_website_url\": \"https://your-website.com/\", \"company_privacy_policy_url\" : \"https://link-to-privacy-policy.com/\", \"contact_support_url\": \"https://link-to-contact-support.com/\", \"hide_contact_support_url\": false, \"hide_logo_url\" : false } } ``` + * @param createEmailCustomizationRequest + */ + public createEmailCustomization(createEmailCustomizationRequest: CreateEmailCustomizationRequest, _options?: Configuration): Observable { + const requestContextPromise = this.requestFactory.createEmailCustomization(createEmailCustomizationRequest, _options); + + // build promise chain + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); + } + + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + pipe(mergeMap((response: ResponseContext) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.createEmailCustomization(rsp))); + })); + } + + /** + * Version: 10.10.0.cl or later Deletes the configuration for the email customization. #### Pre-requisites Requires `DEVELOPER` (**has developer privilege**) or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `DEVELOPER` (**Has developer privilege**) privilege is required. **NOTE**:This endpoint in currently in beta. Contact ThoughtSpot support to enable this on your instance. #### Usage guidelines - Call the search API endpoint to get the `template_identifier` from the response. - Use that `template_identifier` as a parameter in this API request. + * @param templateIdentifier Unique ID or name of the email customization. + */ + public deleteEmailCustomization(templateIdentifier: string, _options?: Configuration): Observable { + const requestContextPromise = this.requestFactory.deleteEmailCustomization(templateIdentifier, _options); + + // build promise chain + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); + } + + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + pipe(mergeMap((response: ResponseContext) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.deleteEmailCustomization(rsp))); + })); + } + + /** + * Version: 10.12.0.cl or later Deletes the configuration for the email customization. #### Pre-requisites Requires `DEVELOPER` (**has developer privilege**) or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `DEVELOPER` (**Has developer privilege**) privilege is required. **NOTE**:This endpoint in currently in beta. Contact ThoughtSpot support to enable this on your instance. #### Usage guidelines - Call the search API endpoint to get the `org_identifier` from the response. - Use that `org_identifier` as a parameter in this API request. + * @param deleteOrgEmailCustomizationRequest + */ + public deleteOrgEmailCustomization(deleteOrgEmailCustomizationRequest: DeleteOrgEmailCustomizationRequest, _options?: Configuration): Observable { + const requestContextPromise = this.requestFactory.deleteOrgEmailCustomization(deleteOrgEmailCustomizationRequest, _options); + + // build promise chain + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); + } + + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + pipe(mergeMap((response: ResponseContext) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.deleteOrgEmailCustomization(rsp))); + })); + } + + /** + * Version: 10.10.0.cl or later Search the email customization configuration if any set for the ThoughtSpot system. #### Pre-requisites Requires `DEVELOPER` (**has developer privilege**) or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `DEVELOPER` (**Has developer privilege**) privilege is required. **NOTE**:This endpoint in currently in beta. Contact ThoughtSpot support to enable this on your instance. + * @param searchEmailCustomizationRequest + */ + public searchEmailCustomization(searchEmailCustomizationRequest: SearchEmailCustomizationRequest, _options?: Configuration): Observable> { + const requestContextPromise = this.requestFactory.searchEmailCustomization(searchEmailCustomizationRequest, _options); + + // build promise chain + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); + } + + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + pipe(mergeMap((response: ResponseContext) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.searchEmailCustomization(rsp))); + })); + } + + /** + * Version: 10.12.0.cl or later Updates a customization configuration for the notification email. #### Pre-requisites Requires `DEVELOPER` (**has developer privilege**) or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `DEVELOPER` (**Has developer privilege**) privilege is required. **NOTE**:This endpoint in currently in beta. Contact ThoughtSpot support to enable this on your instance. #### Usage guidelines To update a custom configuration pass these parameters in your API request: - A JSON map of configuration attributes `template_properties`. The following example shows a sample set of customization configuration: ``` { { \"cta_button_bg_color\": \"#444DEA\", \"cta_text_font_color\": \"#FFFFFF\", \"primary_bg_color\": \"#D3DEF0\", \"logo_url\": \"https://storage.pardot.com/710713/1642089901EbkRibJq/TS_fullworkmark_darkmode.png\", \"font_family\": \"\", \"product_name\": \"ThoughtSpot\", \"footer_address\": \"444 Castro St, Suite 1000 Mountain View, CA 94041\", \"footer_phone\": \"(800) 508-7008\", \"replacement_value_for_liveboard\": \"Dashboard\", \"replacement_value_for_answer\": \"Chart\", \"replacement_value_for_spot_iq\": \"AI Insights\", \"hide_footer_phone\": false, \"hide_footer_address\": false, \"hide_product_name\": false, \"hide_manage_notification\": false, \"hide_mobile_app_nudge\": false, \"hide_privacy_policy\": false, \"hide_ts_vocabulary_definitions\": false, \"hide_error_message\": false, \"hide_unsubscribe_link\": false, \"hide_notification_status\": false, \"hide_modify_alert\": false, \"company_website_url\": \"https://your-website.com/\", \"company_privacy_policy_url\" : \"https://link-to-privacy-policy.com/\", \"contact_support_url\": \"https://link-to-contact-support.com/\", \"hide_contact_support_url\": false, \"hide_logo_url\" : false } } ``` + * @param updateEmailCustomizationRequest + */ + public updateEmailCustomization(updateEmailCustomizationRequest: UpdateEmailCustomizationRequest, _options?: Configuration): Observable { + const requestContextPromise = this.requestFactory.updateEmailCustomization(updateEmailCustomizationRequest, _options); + + // build promise chain + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); + } + + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + pipe(mergeMap((response: ResponseContext) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.updateEmailCustomization(rsp))); + })); + } + + /** + * Version: 10.10.0.cl or later Validates the email customization configuration if any set for the ThoughtSpot system. #### Pre-requisites Requires `DEVELOPER` (**has developer privilege**) or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `DEVELOPER` (**Has developer privilege**) privilege is required. **NOTE**:This endpoint in currently in beta. Contact ThoughtSpot support to enable this on your instance. + */ + public validateEmailCustomization(_options?: Configuration): Observable { + const requestContextPromise = this.requestFactory.validateEmailCustomization(_options); + + // build promise chain + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); + } + + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + pipe(mergeMap((response: ResponseContext) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.validateEmailCustomization(rsp))); + })); + } + +} + +import { GroupsApiRequestFactory, GroupsApiResponseProcessor} from "../apis/GroupsApi"; +export class ObservableGroupsApi { + private requestFactory: GroupsApiRequestFactory; + private responseProcessor: GroupsApiResponseProcessor; + private configuration: Configuration; + + public constructor( + configuration: Configuration, + requestFactory?: GroupsApiRequestFactory, + responseProcessor?: GroupsApiResponseProcessor + ) { + this.configuration = configuration; + this.requestFactory = requestFactory || new GroupsApiRequestFactory(configuration); + this.responseProcessor = responseProcessor || new GroupsApiResponseProcessor(); + } + + /** + * Version: 9.0.0.cl or later Creates a group object in ThoughtSpot. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `GROUP_ADMINISTRATION` (**Can manage groups**) privilege is required. #### About groups Groups in ThoughtSpot are used by the administrators to define privileges and organize users based on their roles and access requirements. To know more about groups and privileges, see [ThoughtSpot Product Documentation](https://docs.thoughtspot.com/cloud/latest/groups-privileges). #### Supported operations The API endpoint lets you perform the following operations: * Assign privileges * Add users * Define sharing visibility * Add sub-groups * Assign a default Liveboard + * @param createUserGroupRequest + */ + public createUserGroup(createUserGroupRequest: CreateUserGroupRequest, _options?: Configuration): Observable { + const requestContextPromise = this.requestFactory.createUserGroup(createUserGroupRequest, _options); + + // build promise chain + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); + } + + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + pipe(mergeMap((response: ResponseContext) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.createUserGroup(rsp))); + })); + } + + /** + * Version: 9.0.0.cl or later Removes the specified group object from the ThoughtSpot system. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `GROUP_ADMINISTRATION` (**Can manage groups**) privilege is required. + * @param groupIdentifier GUID or name of the group. + */ + public deleteUserGroup(groupIdentifier: string, _options?: Configuration): Observable { + const requestContextPromise = this.requestFactory.deleteUserGroup(groupIdentifier, _options); + + // build promise chain + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); + } + + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + pipe(mergeMap((response: ResponseContext) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.deleteUserGroup(rsp))); + })); + } + + /** + * Version: 9.0.0.cl or later Imports group objects from external databases into ThoughtSpot. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `GROUP_ADMINISTRATION` (**Can manage groups**) privilege is required. During the import operation: * If the specified group is not available in ThoughtSpot, it will be added to ThoughtSpot. * If `delete_unspecified_groups` is set to `true`, the groups not specified in the API request, excluding administrator and system user groups, are deleted. * If the specified groups are already available in ThoughtSpot, the object properties of these groups are modified and synchronized as per the input data in the API request. A successful API call returns the object that represents the changes made in the ThoughtSpot system. + * @param importUserGroupsRequest + */ + public importUserGroups(importUserGroupsRequest: ImportUserGroupsRequest, _options?: Configuration): Observable { + const requestContextPromise = this.requestFactory.importUserGroups(importUserGroupsRequest, _options); + + // build promise chain + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); + } + + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + pipe(mergeMap((response: ResponseContext) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.importUserGroups(rsp))); + })); + } + + /** + * Version: 9.0.0.cl or later Gets a list of user group objects from the ThoughtSpot system. To get details of a specific user group, specify the user group GUID or name. You can also filter the API response based on User ID, Org ID, Role ID, type of group, sharing visibility, privileges assigned to the group, and the Liveboard IDs assigned to the users in the group. Available to all users. Users with `ADMINISTRATION` (**Can administer ThoughtSpot**) privileges can view all users properties. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `GROUP_ADMINISTRATION` (**Can manage groups**) privilege is required. **NOTE**: If you do not get precise results, try setting `record_size` to `-1` and `record_offset` to `0`. + * @param searchUserGroupsRequest + */ + public searchUserGroups(searchUserGroupsRequest: SearchUserGroupsRequest, _options?: Configuration): Observable> { + const requestContextPromise = this.requestFactory.searchUserGroups(searchUserGroupsRequest, _options); + + // build promise chain + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); + } + + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + pipe(mergeMap((response: ResponseContext) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.searchUserGroups(rsp))); + })); + } + + /** + * Version: 9.0.0.cl or later Updates the properties of a group object in ThoughtSpot. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `GROUP_ADMINISTRATION` (**Can manage groups**) privilege is required. #### Supported operations This API endpoint lets you perform the following operations in a single API request: * Edit [privileges](https://developers.thoughtspot.com/docs/?pageid=api-user-management#group-privileges) * Add or remove users * Change sharing visibility settings * Add or remove sub-groups * Assign a default Liveboard or update the existing settings + * @param groupIdentifier GUID or name of the group. + * @param updateUserGroupRequest + */ + public updateUserGroup(groupIdentifier: string, updateUserGroupRequest: UpdateUserGroupRequest, _options?: Configuration): Observable { + const requestContextPromise = this.requestFactory.updateUserGroup(groupIdentifier, updateUserGroupRequest, _options); + + // build promise chain + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); + } + + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + pipe(mergeMap((response: ResponseContext) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.updateUserGroup(rsp))); + })); + } + +} + +import { JobsApiRequestFactory, JobsApiResponseProcessor} from "../apis/JobsApi"; +export class ObservableJobsApi { + private requestFactory: JobsApiRequestFactory; + private responseProcessor: JobsApiResponseProcessor; + private configuration: Configuration; + + public constructor( + configuration: Configuration, + requestFactory?: JobsApiRequestFactory, + responseProcessor?: JobsApiResponseProcessor + ) { + this.configuration = configuration; + this.requestFactory = requestFactory || new JobsApiRequestFactory(configuration); + this.responseProcessor = responseProcessor || new JobsApiResponseProcessor(); + } + + /** + * Version: 26.4.0.cl or later Searches delivery history for communication channels such as webhooks. Returns channel-level delivery status for each job execution record. Use this to monitor channel health and delivery success rates across events. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) or `DEVELOPER` (**Has developer privilege**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, users with `CAN_MANAGE_WEBHOOKS` (**Can manage webhooks**) privilege are also authorized to perform this action. **NOTE**: When `channel_type` is `WEBHOOK`, the following constraints apply: - `job_ids`, `channel_identifiers`, and `events` each accept at most one element. - When `job_ids` is provided, it is used as the sole lookup key and other filter fields are ignored. - When `job_ids` is not provided, `channel_identifiers` and `events` are both required, each containing exactly one element. - Records older than the configured retention period are not returned. - Use `start_epoch_time_in_millis` and/or `end_epoch_time_in_millis` to narrow results to a specific time window. + * @param searchChannelHistoryRequest + */ + public searchChannelHistory(searchChannelHistoryRequest: SearchChannelHistoryRequest, _options?: Configuration): Observable { + const requestContextPromise = this.requestFactory.searchChannelHistory(searchChannelHistoryRequest, _options); + + // build promise chain + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); + } + + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + pipe(mergeMap((response: ResponseContext) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.searchChannelHistory(rsp))); + })); + } + +} + +import { LogApiRequestFactory, LogApiResponseProcessor} from "../apis/LogApi"; +export class ObservableLogApi { + private requestFactory: LogApiRequestFactory; + private responseProcessor: LogApiResponseProcessor; + private configuration: Configuration; + + public constructor( + configuration: Configuration, + requestFactory?: LogApiRequestFactory, + responseProcessor?: LogApiResponseProcessor + ) { + this.configuration = configuration; + this.requestFactory = requestFactory || new LogApiRequestFactory(configuration); + this.responseProcessor = responseProcessor || new LogApiResponseProcessor(); + } + + /** + * Version: 9.0.0.cl or later Fetches security audit logs. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the [Admin Control](https://developers.thoughtspot.com/docs/rbac#_admin_control) privileges are required. #### Usage guidelines By default, the API retrieves logs for the last 24 hours. You can set a custom duration in EPOCH time. Make sure the log duration specified in your API request doesn’t exceed 24 hours. If you must fetch logs for a longer time range, modify the duration and make multiple sequential API requests. Upon successful execution, the API returns logs with the following information: * timestamp of the event * event ID * event type * name and GUID of the user * IP address of ThoughtSpot instance For more information see [Audit logs Documentation](https://developers.thoughtspot.com/docs/audit-logs). + * @param fetchLogsRequest + */ + public fetchLogs(fetchLogsRequest: FetchLogsRequest, _options?: Configuration): Observable> { + const requestContextPromise = this.requestFactory.fetchLogs(fetchLogsRequest, _options); + + // build promise chain + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); + } + + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + pipe(mergeMap((response: ResponseContext) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.fetchLogs(rsp))); + })); + } + +} + +import { MetadataApiRequestFactory, MetadataApiResponseProcessor} from "../apis/MetadataApi"; +export class ObservableMetadataApi { + private requestFactory: MetadataApiRequestFactory; + private responseProcessor: MetadataApiResponseProcessor; + private configuration: Configuration; + + public constructor( + configuration: Configuration, + requestFactory?: MetadataApiRequestFactory, + responseProcessor?: MetadataApiResponseProcessor + ) { + this.configuration = configuration; + this.requestFactory = requestFactory || new MetadataApiRequestFactory(configuration); + this.responseProcessor = responseProcessor || new MetadataApiResponseProcessor(); + } + + /** + * Convert worksheets to models Version: 10.6.0.cl or later ## Prerequisites - **Privileges Required:** - `DATAMANAGEMENT` (Can manage data) or `ADMINISTRATION` (Can administer ThoughtSpot). - **Additional Privileges (if RBAC is enabled):** - `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` (Can manage data models). --- ## Usage Guidelines ### Parameters 1. **worksheet_ids** - **Description:** A comma-separated list of GUIDs (Globally Unique Identifiers) specifying the Worksheets to be converted. - **Usage:** - Used only when `convert_all` is set to `false`. - Leave empty or omit when `convert_all` is set to `true`. 2. **exclude_worksheet_ids** - **Description:** A comma-separated list of GUIDs specifying Worksheets to be excluded from conversion. - **Usage:** - Useful when `convert_all` is set to `true` and specific Worksheets should not be converted. 3. **convert_all** - **Description:** Sets the scope of conversion. - **Options:** - `true`: Converts all Worksheets in the system, except those specified in `exclude_worksheet_ids`. - `false`: Converts only the Worksheets listed in `worksheet_ids`. 4. **apply_changes** - **Description:** Specifies whether to apply changes directly to ThoughtSpot or to generate a preview before applying any changes.Used for validation of conversion. - **Options:** - `true`: Applies conversion changes directly to ThoughtSpot. - `false`: Generates only a preview of the changes and does not apply any changes to ThoughtSpot --- ## Best Practices 1. **Backup Before Conversion:** Always export metadata as a backup before initiating the conversion process 2. **Partial Conversion for Testing:** Test the conversion process by setting `convert_all` to `false` and specifying a small number of `worksheet_ids`. 3. **Verify Dependencies:** Check for dependent objects, such as Tables and Connections, to avoid invalid references. 4. **Review Changes:** Use `apply_changes: false` to preview the impact of the conversion before applying changes. --- ## Examples ### Convert Specific Worksheets ```json { \"worksheet_ids\": [\"guid1\", \"guid2\", \"guid3\"], \"exclude_worksheet_ids\": [], \"convert_all\": false, \"apply_changes\": true } ``` ### Convert All Accessible Worksheets ```json { \"worksheet_ids\": [], \"exclude_worksheet_ids\": [], \"convert_all\": true, \"apply_changes\": true } ``` ### Exclude Specific Worksheets While Converting All Accessible Worksheets ```json { \"worksheet_ids\": [], \"exclude_worksheet_ids\": [\"abc\"], \"convert_all\": true, \"apply_changes\": true } ``` + * @param convertWorksheetToModelRequest + */ + public convertWorksheetToModel(convertWorksheetToModelRequest: ConvertWorksheetToModelRequest, _options?: Configuration): Observable { + const requestContextPromise = this.requestFactory.convertWorksheetToModel(convertWorksheetToModelRequest, _options); + + // build promise chain + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); + } + + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + pipe(mergeMap((response: ResponseContext) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.convertWorksheetToModel(rsp))); + })); + } + + /** + * Makes a copy of an Answer or Liveboard Version: 10.3.0.cl or later Creates a copy of a metadata object. Requires at least view access to the metadata object being copied. Upon successful execution, the API creates a copy of the metadata object specified in the API request and returns the ID of the new object. + * @param copyObjectRequest + */ + public copyObject(copyObjectRequest: CopyObjectRequest, _options?: Configuration): Observable { + const requestContextPromise = this.requestFactory.copyObject(copyObjectRequest, _options); + + // build promise chain + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); + } + + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + pipe(mergeMap((response: ResponseContext) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.copyObject(rsp))); + })); + } + + /** + * Version: 9.0.0.cl or later Removes the specified metadata object from the ThoughtSpot system. Requires edit access to the metadata object. + * @param deleteMetadataRequest + */ + public deleteMetadata(deleteMetadataRequest: DeleteMetadataRequest, _options?: Configuration): Observable { + const requestContextPromise = this.requestFactory.deleteMetadata(deleteMetadataRequest, _options); + + // build promise chain + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); + } + + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + pipe(mergeMap((response: ResponseContext) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.deleteMetadata(rsp))); + })); + } + + /** + * Version: 9.0.0.cl or later Exports the [TML](https://docs.thoughtspot.com/cloud/latest/tml) representation of metadata objects in JSON or YAML format. Requires `DATADOWNLOADING` (**Can download Data**) and at least view access to the metadata object. #### Usage guidelines * You can export one or several objects by passing metadata object GUIDs in the `metadata` array. * When exporting TML content for a Liveboard or Answer object, you can set `export_associated` to `true` to retrieve TML content for underlying Worksheets, Tables, or Views, including the GUID of each object within the headers. When `export_associated` is set to `true`, consider retrieving one metadata object at a time. * Set `export_fqns` to `true` to add FQNs of the referenced objects in the TML content. For example, if you send an API request to retrieve TML for a Liveboard and its associated objects, the API returns the TML content with FQNs of the referenced Worksheet. Exporting TML with FQNs is useful if ThoughtSpot has multiple objects with the same name and you want to eliminate ambiguity when importing TML files into ThoughtSpot. It eliminates the need for adding FQNs of the referenced objects manually during the import operation. * To export only the TML of feedbacks associated with an object, set the GUID of the object as `identifier`, and set the `type` as `FEEDBACK` in the `metadata` array. * To export the TML of an object along with the feedbacks associated with it, set the GUID of the object as `identifier`, set the `type` as `LOGIAL_TABLE` in the `metadata` array, and set `export_with_associated_feedbacks` in `export_options` to true. For more information, see [TML Documentation](https://developers.thoughtspot.com/docs/tml#_export_a_tml). For more information on feedbacks, see [Feedback Documentation](https://docs.thoughtspot.com/cloud/latest/sage-feedback). + * @param exportMetadataTMLRequest + */ + public exportMetadataTML(exportMetadataTMLRequest: ExportMetadataTMLRequest, _options?: Configuration): Observable> { + const requestContextPromise = this.requestFactory.exportMetadataTML(exportMetadataTMLRequest, _options); + + // build promise chain + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); + } + + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + pipe(mergeMap((response: ResponseContext) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.exportMetadataTML(rsp))); + })); + } + + /** + * Version: 10.1.0.cl or later Exports the [TML](https://docs.thoughtspot.com/cloud/latest/tml) representation of metadata objects in JSON or YAML format. ### **Permissions Required** Requires `DATAMANAGEMENT` (**Can manage data**) and `USERMANAGEMENT` (**Can manage users**) privileges. #### **Usage Guidelines** This API is only applicable for `USER`, `GROUP`, and `ROLES` metadata types. - `batch_offset` Indicates the starting position within the complete dataset from which the API should begin returning objects. Useful for paginating results efficiently. - `batch_size` Specifies the number of objects or items to retrieve in a single request. Helps control response size for better performance. - `edoc_format` Defines the format of the TML content. The exported metadata can be in JSON or YAML format. - `export_dependent` Specifies whether to include dependent metadata objects in the export. Ensures related objects are also retrieved if needed. - `all_orgs_override` Indicates whether the export operation applies across all organizations. Useful for multi-tenant environments where cross-org exports are required. + * @param exportMetadataTMLBatchedRequest + */ + public exportMetadataTMLBatched(exportMetadataTMLBatchedRequest: ExportMetadataTMLBatchedRequest, _options?: Configuration): Observable { + const requestContextPromise = this.requestFactory.exportMetadataTMLBatched(exportMetadataTMLBatchedRequest, _options); + + // build promise chain + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); + } + + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + pipe(mergeMap((response: ResponseContext) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.exportMetadataTMLBatched(rsp))); + })); + } + + /** + * Version: 9.0.0.cl or later Fetches the underlying SQL query data for an Answer object. Requires at least view access to the Answer object. Upon successful execution, the API returns the SQL queries for the specified object as shown in this example: ``` { \"metadata_id\":\"8fbe44a8-46ad-4b16-8d39-184b2fada490\", \"metadata_name\":\"Total sales\", \"metadata_type\":\"ANSWER\", \"sql_queries\":[ { \"metadata_id\":\"8fbe44a8-46ad-4b16-8d39-184b2fada490\", \"metadata_name\":\"Total sales -test\", \"sql_query\":\"SELECT \\n \\\"ta_1\\\".\\\"REGION\\\" \\\"ca_1\\\", \\n \\\"ta_2\\\".\\\"PRODUCTNAME\\\" \\\"ca_2\\\", \\n \\\"ta_1\\\".\\\"STORENAME\\\" \\\"ca_3\\\", \\n CASE\\n WHEN sum(\\\"ta_3\\\".\\\"SALES\\\") IS NOT NULL THEN sum(\\\"ta_3\\\".\\\"SALES\\\")\\n ELSE 0\\n END \\\"ca_4\\\", \\n CASE\\n WHEN sum(\\\"ta_3\\\".\\\"QUANTITYPURCHASED\\\") IS NOT NULL THEN sum(\\\"ta_3\\\".\\\"QUANTITYPURCHASED\\\")\\n ELSE 0\\n END \\\"ca_5\\\"\\nFROM \\\"RETAILAPPAREL\\\".\\\"PUBLIC\\\".\\\"FACT_RETAPP_SALES\\\" \\\"ta_3\\\"\\n JOIN \\\"RETAILAPPAREL\\\".\\\"PUBLIC\\\".\\\"DIM_RETAPP_STORES\\\" \\\"ta_1\\\"\\n ON \\\"ta_3\\\".\\\"STOREID\\\" = \\\"ta_1\\\".\\\"STOREID\\\"\\n JOIN \\\"RETAILAPPAREL\\\".\\\"PUBLIC\\\".\\\"DIM_RETAPP_PRODUCTS\\\" \\\"ta_2\\\"\\n ON \\\"ta_3\\\".\\\"PRODUCTID\\\" = \\\"ta_2\\\".\\\"PRODUCTID\\\"\\nGROUP BY \\n \\\"ca_1\\\", \\n \\\"ca_2\\\", \\n \\\"ca_3\\\"\\n\" } ] } ``` + * @param fetchAnswerSqlQueryRequest + */ + public fetchAnswerSqlQuery(fetchAnswerSqlQueryRequest: FetchAnswerSqlQueryRequest, _options?: Configuration): Observable { + const requestContextPromise = this.requestFactory.fetchAnswerSqlQuery(fetchAnswerSqlQueryRequest, _options); + + // build promise chain + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); + } + + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + pipe(mergeMap((response: ResponseContext) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.fetchAnswerSqlQuery(rsp))); + })); + } + + /** + * Version: 10.4.0.cl or later Gets information about the status of the TML async import task scheduled using the `/api/rest/2.0/metadata/tml/async/import` API call. To fetch the task details, specify the ID of the TML async import task. Requires access to the task ID. The API allows users who initiated the asynchronous TML import via `/api/rest/2.0/metadata/tml/async/import` to view the status of their tasks. Users with administration privilege can view the status of all import tasks initiated by the users in their Org. #### Usage guidelines See [TML API Documentation](https://developers.thoughtspot.com/docs/tml#_fetch_status_of_the_tml_import_task) for usage guidelines. + * @param fetchAsyncImportTaskStatusRequest + */ + public fetchAsyncImportTaskStatus(fetchAsyncImportTaskStatusRequest: FetchAsyncImportTaskStatusRequest, _options?: Configuration): Observable { + const requestContextPromise = this.requestFactory.fetchAsyncImportTaskStatus(fetchAsyncImportTaskStatusRequest, _options); + + // build promise chain + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); + } + + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + pipe(mergeMap((response: ResponseContext) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.fetchAsyncImportTaskStatus(rsp))); + })); + } + + /** + * Version: 9.0.0.cl or later Fetches the underlying SQL query data for a Liveboard object and its visualizations. Requires at least view access to the Liveboard object. To get SQL query data for a Liveboard, specify the GUID of the Liveboard. Optionally, you can add an array of visualization GUIDs to retrieve the SQL query data for visualizations in the Liveboard. Upon successful execution, the API returns the SQL queries for the specified object as shown in this example: ``` { \"metadata_id\": \"fa68ae91-7588-4136-bacd-d71fb12dda69\", \"metadata_name\": \"Total Sales\", \"metadata_type\": \"LIVEBOARD\", \"sql_queries\": [ { \"metadata_id\": \"b3b6d2b9-089a-490c-8e16-b144650b7843\", \"metadata_name\": \"Total quantity purchased, Total sales by region\", \"sql_query\": \"SELECT \\n \\\"ta_1\\\".\\\"REGION\\\" \\\"ca_1\\\", \\n CASE\\n WHEN sum(\\\"ta_2\\\".\\\"QUANTITYPURCHASED\\\") IS NOT NULL THEN sum(\\\"ta_2\\\".\\\"QUANTITYPURCHASED\\\")\\n ELSE 0\\n END \\\"ca_2\\\", \\n CASE\\n WHEN sum(\\\"ta_2\\\".\\\"SALES\\\") IS NOT NULL THEN sum(\\\"ta_2\\\".\\\"SALES\\\")\\n ELSE 0\\n END \\\"ca_3\\\"\\nFROM \\\"RETAILAPPAREL\\\".\\\"PUBLIC\\\".\\\"FACT_RETAPP_SALES\\\" \\\"ta_2\\\"\\n JOIN \\\"RETAILAPPAREL\\\".\\\"PUBLIC\\\".\\\"DIM_RETAPP_STORES\\\" \\\"ta_1\\\"\\n ON \\\"ta_2\\\".\\\"STOREID\\\" = \\\"ta_1\\\".\\\"STOREID\\\"\\nGROUP BY \\\"ca_1\\\"\" } ] } ``` + * @param fetchLiveboardSqlQueryRequest + */ + public fetchLiveboardSqlQuery(fetchLiveboardSqlQueryRequest: FetchLiveboardSqlQueryRequest, _options?: Configuration): Observable { + const requestContextPromise = this.requestFactory.fetchLiveboardSqlQuery(fetchLiveboardSqlQueryRequest, _options); + + // build promise chain + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); + } + + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + pipe(mergeMap((response: ResponseContext) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.fetchLiveboardSqlQuery(rsp))); + })); + } + + /** + * Version: 9.0.0.cl or later Imports [TML](https://docs.thoughtspot.com/cloud/latest/tml) files into ThoughtSpot. Requires `DATAMANAGEMENT` (**Can manage data**) or `ADMINISTRATION` (**Can administer ThoughtsSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the following Data control privileges may be required: - `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) - `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` (**Can manage data models**) #### Usage guidelines * Import all related objects in a single TML Import API call. For example, Tables that use the same Connection object and Worksheets connected to these Tables. * Include the `fqn` property to distinguish objects that have the same name. For example, if you have multiple Connections or Worksheets with the same name on ThoughtSpot and the Connection or Worksheet referenced in your TML file does not have a unique name to distinguish, it may result in invalid object references. Adding `fqn` helps ThoughtSpot differentiate a Table from another with the same name. We recommend [exporting TML with FQNs](#/http/api-endpoints/metadata/export-metadata-tml) and using these during the import operation. * You can upload multiple TML files at a time. If you import a Worksheet along with Liveboards, Answers, and other dependent objects in a single API call, the imported objects will be immediately available for use. When you import only a Worksheet object, it may take some time for the Worksheet to become available in the ThoughtSpot system. Please wait for a few minutes, and then proceed to create an Answer and Liveboard from the newly imported Worksheet. For more information, see [TML Documentation](https://developers.thoughtspot.com/docs/tml#_import_a_tml). + * @param importMetadataTMLRequest + */ + public importMetadataTML(importMetadataTMLRequest: ImportMetadataTMLRequest, _options?: Configuration): Observable> { + const requestContextPromise = this.requestFactory.importMetadataTML(importMetadataTMLRequest, _options); + + // build promise chain + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); + } + + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + pipe(mergeMap((response: ResponseContext) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.importMetadataTML(rsp))); + })); + } + + /** + * Version: 10.4.0.cl or later Schedules a task to import [TML](https://docs.thoughtspot.com/cloud/latest/tml) files into ThoughtSpot. You can use this API endpoint to process TML objects asynchronously when importing TMLs of large and complex metadata objects into ThoughtSpot. Unlike the synchronous import TML operation, the API processes TML data in the background and returns a task ID, which can be used to check the status of the import task via `/api/rest/2.0/metadata/tml/async/status` API endpoint. Requires `DATAMANAGEMENT` (**Can manage data**) or `ADMINISTRATION` (**Can administer ThoughtsSpot**) privilege, and edit access to the TML objects. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the following Data control privileges may be required: - `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) - `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` (**Can manage data models**) #### Usage guidelines See [Async TML API Documentation](https://developers.thoughtspot.com/docs/tml#_import_tml_objects_asynchronously) for usage guidelines. + * @param importMetadataTMLAsyncRequest + */ + public importMetadataTMLAsync(importMetadataTMLAsyncRequest: ImportMetadataTMLAsyncRequest, _options?: Configuration): Observable { + const requestContextPromise = this.requestFactory.importMetadataTMLAsync(importMetadataTMLAsyncRequest, _options); + + // build promise chain + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); + } + + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + pipe(mergeMap((response: ResponseContext) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.importMetadataTMLAsync(rsp))); + })); + } + + /** + * Parameterize fields in metadata objects. Version: 10.9.0.cl or later **Note:** This API endpoint is deprecated and will be removed from ThoughtSpot in a future release. Use [POST /api/rest/2.0/metadata/parameterize-fields](/api/rest/2.0/metadata/parameterize-fields) instead. Allows parameterizing fields in metadata objects in ThoughtSpot. Requires appropriate permissions to modify the metadata object. The API endpoint allows parameterizing the following types of metadata objects: * Logical Tables * Connections * Connection Configs For a Logical Table the field type must be `ATTRIBUTE` and field name can be one of: * databaseName * schemaName * tableName For a Connection or Connection Config, the field type is always `CONNECTION_PROPERTY`. In this case, field_name specifies the exact property of the Connection or Connection Config that needs to be parameterized. For Connection Config, the only supported field name is: * impersonate_user + * @param parameterizeMetadataRequest + */ + public parameterizeMetadata(parameterizeMetadataRequest: ParameterizeMetadataRequest, _options?: Configuration): Observable { + const requestContextPromise = this.requestFactory.parameterizeMetadata(parameterizeMetadataRequest, _options); + + // build promise chain + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); + } + + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + pipe(mergeMap((response: ResponseContext) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.parameterizeMetadata(rsp))); + })); + } + + /** + * Parameterize multiple fields of metadata objects. For example [schemaName, databaseName] for LOGICAL_TABLE. Version: 26.5.0.cl or later Allows parameterizing multiple fields of metadata objects in ThoughtSpot. For example, you can parameterize [schemaName, databaseName] for LOGICAL_TABLE. Requires appropriate permissions to modify the metadata object. The API endpoint allows parameterizing the following types of metadata objects: * Logical Tables * Connections * Connection Configs For a Logical Table, the field type must be `ATTRIBUTE` and field names can include: * databaseName * schemaName * tableName For a Connection or Connection Config, the field type is always `CONNECTION_PROPERTY`. In this case, field_names specifies the exact properties of the Connection or Connection Config that need to be parameterized. For Connection Config, supported field names include: * impersonate_user You can parameterize multiple fields at once by providing an array of field names. + * @param parameterizeMetadataFieldsRequest + */ + public parameterizeMetadataFields(parameterizeMetadataFieldsRequest: ParameterizeMetadataFieldsRequest, _options?: Configuration): Observable { + const requestContextPromise = this.requestFactory.parameterizeMetadataFields(parameterizeMetadataFieldsRequest, _options); + + // build promise chain + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); + } + + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + pipe(mergeMap((response: ResponseContext) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.parameterizeMetadataFields(rsp))); + })); + } + + /** + * Version: 9.0.0.cl or later Gets a list of metadata objects available on the ThoughtSpot system. This API endpoint is available to all users who have view access to the object. Users with `ADMINISTRATION` (**Can administer ThoughtSpot**) privileges can view data for all metadata objects, including users and groups. #### Usage guidelines - To get all metadata objects, send the API request without any attributes. - To get metadata objects of a specific type, set the `type` attribute. For example, to fetch a Worksheet, set the type as `LOGICAL_TABLE`. - To filter metadata objects within type `LOGICAL_TABLE`, set the `subtypes` attribute. For example, to fetch a Worksheet, set the type as `LOGICAL_TABLE` & subtypes as `[WORKSHEET]`. - To get a specific metadata object, specify the GUID. - To customize your search and filter the API response, you can use several parameters. You can search for objects created or modified by specific users, by tags applied to the objects, or by using the include parameters like `include_auto_created_objects`, `include_dependent_objects`, `include_headers`, `include_incomplete_objects`, and so on. You can also define sorting options to sort the data retrieved in the API response. - To get discoverable objects when linientmodel is enabled you can use `include_discoverable_objects` as true else false. Default value is true. - For liveboard metadata type, to get the newer format, set the `liveboard_response_format` as V2. Default value is V1. - To retrieve only objects that are published, set the `include_only_published_objects` as true. Default value is false. **NOTE**: The following parameters support pagination of metadata records: - `tag_identifiers` - `type` - `subtypes` - `created_by_user_identifiers` - `modified_by_user_identifiers` - `owned_by_user_identifiers` - `exclude_objects` - `include_auto_created_objects` - `favorite_object_options` - `include_only_published_objects` If you are using other parameters to search metadata, set `record_size` to `-1` and `record_offset` to `0`. + * @param searchMetadataRequest + */ + public searchMetadata(searchMetadataRequest: SearchMetadataRequest, _options?: Configuration): Observable> { + const requestContextPromise = this.requestFactory.searchMetadata(searchMetadataRequest, _options); + + // build promise chain + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); + } + + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + pipe(mergeMap((response: ResponseContext) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.searchMetadata(rsp))); + })); + } + + /** + * Remove parameterization from fields in metadata objects. Version: 26.5.0.cl or later Allows removing parameterization from fields in metadata objects in ThoughtSpot. Requires appropriate permissions to modify the metadata object. The API endpoint allows unparameterizing the following types of metadata objects: * Logical Tables * Connections * Connection Configs For a Logical Table the field type must be `ATTRIBUTE` and field name can be one of: * databaseName * schemaName * tableName For a Connection or Connection Config, the field type is always `CONNECTION_PROPERTY`. In this case, field_name specifies the exact property of the Connection or Connection Config that needs to be unparameterized. For Connection Config, the only supported field name is: * impersonate_user + * @param unparameterizeMetadataRequest + */ + public unparameterizeMetadata(unparameterizeMetadataRequest: UnparameterizeMetadataRequest, _options?: Configuration): Observable { + const requestContextPromise = this.requestFactory.unparameterizeMetadata(unparameterizeMetadataRequest, _options); + + // build promise chain + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); + } + + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + pipe(mergeMap((response: ResponseContext) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.unparameterizeMetadata(rsp))); + })); + } + + /** + * Update header attributes for a given list of header objects. Version: 10.6.0.cl or later ## Prerequisites - **Privileges Required:** - `DATAMANAGEMENT` (Can manage data) or `ADMINISTRATION` (Can administer ThoughtSpot). - **Additional Privileges (if RBAC is enabled):** - `ORG_ADMINISTRATION` (Can manage orgs). --- ## Usage Guidelines ### Parameters 1. **headers_update** - **Description:** List of header objects with their attributes to be updated. Each object contains a list of attributes to be updated in the header. - **Usage:** - You must provide either `identifier` or `obj_identifier`, but not both. Both fields cannot be empty. - When `org_identifier` is set to `-1`, only the `identifier` value is accepted; `obj_identifier` is not allowed. 2. **org_identifier** - **Description:** GUID (Globally Unique Identifier) or name of the organization. - **Usage:** - Leaving this field empty assumes that the changes should be applied to the current organization - Provide `org_guid` or `org_name` to uniquely identify the organization where changes need to be applied. . - Provide `-1` if changes have to be applied across all the org. --- ## Note Currently, this API is enabled only for updating the `obj_identifier` attribute. Only `text` will be allowed in attribute\'s value. ## Best Practices 1. **Backup Before Conversion:** Always export metadata as a backup before initiating the update process --- ## Examples ### Only `identifier` is given ```json { \"headers_update\": [ { \"identifier\": \"guid_1\", \"obj_identifier\": \"\", \"type\": \"LOGICAL_COLUMN\", \"attributes\": [ { \"name\": \"obj_id\", \"value\": \"custom_object_id\" } ] } ], \"org_identifier\": \"orgGuid\" } ``` ### Only `obj_identifier` is given ```json { \"headers_update\": [ { \"obj_identifier\": \"custom_object_id\", \"type\": \"ANSWER\", \"attributes\": [ { \"name\": \"obj_id\", \"value\": \"custom_object_id\" } ] } ], \"org_identifier\": \"orgName\" } ``` ### Executing update for all org `-1` ```json { \"headers_update\": [ { \"identifier\": \"guid_1\", \"type\": \"ANSWER\", \"attributes\": [ { \"name\": \"obj_id\", \"value\": \"custom_object_id\" } ] } ], \"org_identifier\": -1 } ``` ### Optional `type` is not provided ```json { \"headers_update\": [ { \"identifier\": \"guid_1\", \"attributes\": [ { \"name\": \"obj_id\", \"value\": \"custom_object_id\" } ] } ], \"org_identifier\": -1 } ``` + * @param updateMetadataHeaderRequest + */ + public updateMetadataHeader(updateMetadataHeaderRequest: UpdateMetadataHeaderRequest, _options?: Configuration): Observable { + const requestContextPromise = this.requestFactory.updateMetadataHeader(updateMetadataHeaderRequest, _options); + + // build promise chain + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); + } + + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + pipe(mergeMap((response: ResponseContext) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.updateMetadataHeader(rsp))); + })); + } + + /** + * Update object IDs for given metadata objects. Version: 10.8.0.cl or later ## Prerequisites - **Privileges Required:** - `DATAMANAGEMENT` (Can manage data) or `ADMINISTRATION` (Can administer ThoughtSpot). - **Additional Privileges (if RBAC is enabled):** - `ORG_ADMINISTRATION` (Can manage orgs). --- ## Usage Guidelines ### Parameters 1. **metadata** - **Description:** List of metadata objects to update their object IDs. - **Usage:** - Use either `current_obj_id` alone OR use `metadata_identifier` with `type` (when needed). - When using `metadata_identifier`, the `type` field is required if using a name instead of a GUID. - The `new_obj_id` field is always required. --- ## Note This API is specifically designed for updating object IDs of metadata objects. It internally uses the header update mechanism to perform the changes. ## Best Practices 1. **Backup Before Update:** Always export metadata as a backup before initiating the update process. 2. **Validation:** - When using `current_obj_id`, ensure it matches the existing object ID exactly. - When using `metadata_identifier` with a name, ensure the `type` is specified correctly. - Verify that the `new_obj_id` follows your naming conventions and is unique within your system. --- ## Examples ### Using current_obj_id ```json { \"metadata\": [ { \"current_obj_id\": \"existing_object_id\", \"new_obj_id\": \"new_object_id\" } ] } ``` ### Using metadata_identifier with GUID ```json { \"metadata\": [ { \"metadata_identifier\": \"01234567-89ab-cdef-0123-456789abcdef\", \"new_obj_id\": \"new_object_id\" } ] } ``` ### Using metadata_identifier with name and type ```json { \"metadata\": [ { \"metadata_identifier\": \"My Answer\", \"type\": \"ANSWER\", \"new_obj_id\": \"new_object_id\" } ] } ``` ### Multiple objects update ```json { \"metadata\": [ { \"current_obj_id\": \"existing_object_id_1\", \"new_obj_id\": \"new_object_id_1\" }, { \"metadata_identifier\": \"My Worksheet\", \"type\": \"LOGICAL_TABLE\", \"new_obj_id\": \"new_object_id_2\" } ] } ``` + * @param updateMetadataObjIdRequest + */ + public updateMetadataObjId(updateMetadataObjIdRequest: UpdateMetadataObjIdRequest, _options?: Configuration): Observable { + const requestContextPromise = this.requestFactory.updateMetadataObjId(updateMetadataObjIdRequest, _options); + + // build promise chain + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); + } + + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + pipe(mergeMap((response: ResponseContext) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.updateMetadataObjId(rsp))); + })); + } + +} + +import { OrgsApiRequestFactory, OrgsApiResponseProcessor} from "../apis/OrgsApi"; +export class ObservableOrgsApi { + private requestFactory: OrgsApiRequestFactory; + private responseProcessor: OrgsApiResponseProcessor; + private configuration: Configuration; + + public constructor( + configuration: Configuration, + requestFactory?: OrgsApiRequestFactory, + responseProcessor?: OrgsApiResponseProcessor + ) { + this.configuration = configuration; + this.requestFactory = requestFactory || new OrgsApiRequestFactory(configuration); + this.responseProcessor = responseProcessor || new OrgsApiResponseProcessor(); + } + + /** + * Version: 9.0.0.cl or later Creates an Org object. To use this API, the [Orgs](https://docs.thoughtspot.com/cloud/latest/orgs-overview) feature must be enabled in your cluster. Requires cluster administration (**Can administer Org**) privileges. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `ORG_ADMINISTRATION` (**Can manage Orgs**) privilege is required. + * @param createOrgRequest + */ + public createOrg(createOrgRequest: CreateOrgRequest, _options?: Configuration): Observable { + const requestContextPromise = this.requestFactory.createOrg(createOrgRequest, _options); + + // build promise chain + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); + } + + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + pipe(mergeMap((response: ResponseContext) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.createOrg(rsp))); + })); + } + + /** + * Version: 9.0.0.cl or later Deletes an Org object from the ThoughtSpot system. Requires cluster administration (**Can administer Org**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `ORG_ADMINISTRATION` (**Can manage Orgs**) privilege is required. When you delete an Org, all its users and objects created in that Org context are removed. However, if the users in the deleted Org also exists in other Orgs, they are removed only from the deleted Org. + * @param orgIdentifier ID or name of the Org + */ + public deleteOrg(orgIdentifier: string, _options?: Configuration): Observable { + const requestContextPromise = this.requestFactory.deleteOrg(orgIdentifier, _options); + + // build promise chain + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); + } + + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + pipe(mergeMap((response: ResponseContext) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.deleteOrg(rsp))); + })); + } + + /** + * Version: 9.0.0.cl or later Gets a list of Orgs configured on the ThoughtSpot system. To get details of a specific Org, specify the Org ID or name. You can also pass parameters such as status, visibility, and user identifiers to get a specific list of Orgs. Requires cluster administration (**Can administer Org**) privileges. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `ORG_ADMINISTRATION` (**Can manage Orgs**) privilege is required. + * @param searchOrgsRequest + */ + public searchOrgs(searchOrgsRequest: SearchOrgsRequest, _options?: Configuration): Observable> { + const requestContextPromise = this.requestFactory.searchOrgs(searchOrgsRequest, _options); + + // build promise chain + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); + } + + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + pipe(mergeMap((response: ResponseContext) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.searchOrgs(rsp))); + })); + } + + /** + * Version: 9.0.0.cl or later Updates an Org object. You can modify Org properties such as name, description, and user associations. Requires cluster administration (**Can administer Org**) privileges. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `ORG_ADMINISTRATION` (**Can manage Orgs**) privilege is required. + * @param orgIdentifier ID or name of the Org + * @param updateOrgRequest + */ + public updateOrg(orgIdentifier: string, updateOrgRequest: UpdateOrgRequest, _options?: Configuration): Observable { + const requestContextPromise = this.requestFactory.updateOrg(orgIdentifier, updateOrgRequest, _options); + + // build promise chain + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); + } + + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + pipe(mergeMap((response: ResponseContext) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.updateOrg(rsp))); + })); + } + +} + +import { ReportsApiRequestFactory, ReportsApiResponseProcessor} from "../apis/ReportsApi"; +export class ObservableReportsApi { + private requestFactory: ReportsApiRequestFactory; + private responseProcessor: ReportsApiResponseProcessor; + private configuration: Configuration; + + public constructor( + configuration: Configuration, + requestFactory?: ReportsApiRequestFactory, + responseProcessor?: ReportsApiResponseProcessor + ) { + this.configuration = configuration; + this.requestFactory = requestFactory || new ReportsApiRequestFactory(configuration); + this.responseProcessor = responseProcessor || new ReportsApiResponseProcessor(); + } + + /** + * Version: 9.0.0.cl or later Exports an Answer in the given file format. You can download the Answer data as a PDF, PNG, CSV, or XLSX file. Requires at least view access to the Answer. #### Usage guidelines In the request body, specify the GUID or name of the Answer and set `file_format`. The default file format is CSV. Use the `type` parameter to specify whether the Answer being exported is a saved Answer (`SAVED`) or a pinned Answer on a Liveboard (`PINNED`). Defaults to `SAVED`. When using `PINNED`, the `metadata_identifier` must be the container id. **NOTE**: * The downloadable file returned in API response file is extensionless. Please rename the downloaded file by typing in the relevant extension. * HTML rendering is not supported for PDF exports of Answers with tables. Optionally, you can define [runtime overrides](https://developers.thoughtspot.com/docs/fetch-data-and-report-apis#_runtime_overrides) to apply to the Answer data. + * @param exportAnswerReportRequest + */ + public exportAnswerReport(exportAnswerReportRequest: ExportAnswerReportRequest, _options?: Configuration): Observable { + const requestContextPromise = this.requestFactory.exportAnswerReport(exportAnswerReportRequest, _options); + + // build promise chain + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); + } + + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + pipe(mergeMap((response: ResponseContext) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.exportAnswerReport(rsp))); + })); + } + + /** + * Version: 9.0.0.cl or later Exports a Liveboard and its visualizations in PDF, PNG, CSV, or XLSX file format. The default `file_format` is CSV. Requires at least view access to the Liveboard. #### Usage guidelines In the request body, specify the GUID or name of the Liveboard. To generate a Liveboard report with specific visualizations, add GUIDs or names of the visualizations. **NOTE**: * The downloadable file returned in API response file is extensionless. Please rename the downloaded file by typing in the relevant extension. * Optionally, you can define [runtime overrides](https://developers.thoughtspot.com/docs/fetch-data-and-report-apis#_runtime_overrides) to apply to the Answer data. * To include unsaved changes in the report, pass the `transient_pinboard_content` script generated from the `getExportRequestForCurrentPinboard` method in the Visual Embed SDK. Upon successful execution, the API returns the report with unsaved changes, including ad hoc changes to visualizations. For more information, see [Liveboard Report API](https://developers.thoughtspot.com/docs/fetch-data-and-report-apis#_liveboard_report_api). * Starting with ThoughtSpot Cloud 10.9.0.cl release, the Liveboard can be exported in the PNG format in the resolution of your choice. To enable this on your instance, contact ThoughtSpot support. When this feature is enabled, the options `include_cover_page`,`include_filter_page` within the `png_options` will not be available for PNG exports. * Starting with the ThoughtSpot Cloud 26.2.0.cl release, * Liveboards can be exported in CSV format. * All visualizations within a Liveboard can be exported as individual CSV files. * When exporting multiple visualizations or the entire Liveboard, the system returns the report as a compressed ZIP file containing the separate CSV files for each visualization. * Liveboards can also be exported in XLSX format. * All selected visualizations are consolidated into a single Excel workbook (.xlsx), with each visualization placed in its own worksheet (tab). * XLSX exports are limited to a maximum of 255 worksheets (tabs) per workbook. + * @param exportLiveboardReportRequest + */ + public exportLiveboardReport(exportLiveboardReportRequest: ExportLiveboardReportRequest, _options?: Configuration): Observable { + const requestContextPromise = this.requestFactory.exportLiveboardReport(exportLiveboardReportRequest, _options); + + // build promise chain + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); + } + + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + pipe(mergeMap((response: ResponseContext) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.exportLiveboardReport(rsp))); + })); + } + +} + +import { RolesApiRequestFactory, RolesApiResponseProcessor} from "../apis/RolesApi"; +export class ObservableRolesApi { + private requestFactory: RolesApiRequestFactory; + private responseProcessor: RolesApiResponseProcessor; + private configuration: Configuration; + + public constructor( + configuration: Configuration, + requestFactory?: RolesApiRequestFactory, + responseProcessor?: RolesApiResponseProcessor + ) { + this.configuration = configuration; + this.requestFactory = requestFactory || new RolesApiRequestFactory(configuration); + this.responseProcessor = responseProcessor || new RolesApiResponseProcessor(); + } + + /** + * Version: 9.5.0.cl or later Creates a Role object in ThoughtSpot. Available only if [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance. To create a Role, the `ROLE_ADMINISTRATION` (**Can manage roles**) privilege is required. + * @param createRoleRequest + */ + public createRole(createRoleRequest: CreateRoleRequest, _options?: Configuration): Observable { + const requestContextPromise = this.requestFactory.createRole(createRoleRequest, _options); + + // build promise chain + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); + } + + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + pipe(mergeMap((response: ResponseContext) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.createRole(rsp))); + })); + } + + /** + * Version: 9.5.0.cl or later Deletes a Role object from the ThoughtSpot system. Available only if [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance. To delete a Role, the `ROLE_ADMINISTRATION` (**Can manage roles**) privilege is required. + * @param roleIdentifier Unique ID or name of the Role. ReadOnly roles cannot be deleted. + */ + public deleteRole(roleIdentifier: string, _options?: Configuration): Observable { + const requestContextPromise = this.requestFactory.deleteRole(roleIdentifier, _options); + + // build promise chain + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); + } + + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + pipe(mergeMap((response: ResponseContext) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.deleteRole(rsp))); + })); + } + + /** + * Version: 9.5.0.cl or later Gets a list of Role objects from the ThoughtSpot system. Available if [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance. To search for Roles, the `ROLE_ADMINISTRATION` (**Can manage roles**) privilege is required. To get details of a specific Role object, specify the GUID or name. You can also filter the API response based on user group and Org identifiers, privileges assigned to the Role, and deprecation status. + * @param searchRolesRequest + */ + public searchRoles(searchRolesRequest: SearchRolesRequest, _options?: Configuration): Observable> { + const requestContextPromise = this.requestFactory.searchRoles(searchRolesRequest, _options); + + // build promise chain + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); + } + + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + pipe(mergeMap((response: ResponseContext) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.searchRoles(rsp))); + })); + } + + /** + * Version: 9.5.0.cl or later Updates the properties of a Role object. Available only if [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance. To update a Role, the `ROLE_ADMINISTRATION` (**Can manage roles**) privilege is required. + * @param roleIdentifier Unique ID or name of the Role. + * @param updateRoleRequest + */ + public updateRole(roleIdentifier: string, updateRoleRequest: UpdateRoleRequest, _options?: Configuration): Observable { + const requestContextPromise = this.requestFactory.updateRole(roleIdentifier, updateRoleRequest, _options); + + // build promise chain + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); + } + + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + pipe(mergeMap((response: ResponseContext) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.updateRole(rsp))); + })); + } + +} + +import { SchedulesApiRequestFactory, SchedulesApiResponseProcessor} from "../apis/SchedulesApi"; +export class ObservableSchedulesApi { + private requestFactory: SchedulesApiRequestFactory; + private responseProcessor: SchedulesApiResponseProcessor; + private configuration: Configuration; + + public constructor( + configuration: Configuration, + requestFactory?: SchedulesApiRequestFactory, + responseProcessor?: SchedulesApiResponseProcessor + ) { + this.configuration = configuration; + this.requestFactory = requestFactory || new SchedulesApiRequestFactory(configuration); + this.responseProcessor = responseProcessor || new SchedulesApiResponseProcessor(); + } + + /** + * Create schedule. Version: 9.4.0.cl or later Creates a Liveboard schedule job. Requires at least edit access to Liveboards. To create a schedule on behalf of another user, you need `ADMINISTRATION` (**Can administer Org**) or `JOBSCHEDULING` (**Can schedule for others**) privilege and edit access to the Liveboard. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `JOBSCHEDULING` (**Can schedule for others**) privilege is required. #### Usage guidelines * The description text is mandatory. The description text appears as **Description: ** in the Liveboard schedule email notifications. * For Liveboards with both charts and tables, schedule creation is only supported in PDF and XLS formats. Schedules created in CSV formats for such Liveboards will fail to run. If `PDF` is set as the `file_format`, enable `pdf_options` to get the correct attachment. Not doing so may cause the attachment to be rendered empty. * To include only specific visualizations, specify the visualization GUIDs in the `visualization_identifiers` array. * You can schedule a Liveboard job to run periodically by setting frequency parameters. You can set the schedule to run daily, weekly, monthly or every n minutes or hours. The scheduled job can also be configured to run at a specific time of the day or on specific days of the week or month. Please ensure that when setting the schedule frequency for _minute of the object_, only values that are multiples of 5 are included. * If the `frequency` parameters are defined, you can set the time zone to a value that matches your server\'s time zone. For example, `US/Central`, `Etc/UTC`, `CET`. The default time zone is `America/Los_Angeles`. For more information about Liveboard jobs, see [ThoughtSpot Product Documentation](https://docs.thoughtspot.com/cloud/latest/liveboard-schedule). + * @param createScheduleRequest + */ + public createSchedule(createScheduleRequest: CreateScheduleRequest, _options?: Configuration): Observable { + const requestContextPromise = this.requestFactory.createSchedule(createScheduleRequest, _options); + + // build promise chain + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); + } + + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + pipe(mergeMap((response: ResponseContext) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.createSchedule(rsp))); + })); + } + + /** + * Deletes a scheduled job. Version: 9.4.0.cl or later Deletes a scheduled Liveboard job. Requires at least edit access to Liveboard or `ADMINISTRATION` (**Can administer Org**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `JOBSCHEDULING` (**Can schedule for others**) privilege is required. + * @param scheduleIdentifier Unique ID or name of the scheduled job. + */ + public deleteSchedule(scheduleIdentifier: string, _options?: Configuration): Observable { + const requestContextPromise = this.requestFactory.deleteSchedule(scheduleIdentifier, _options); + + // build promise chain + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); + } + + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + pipe(mergeMap((response: ResponseContext) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.deleteSchedule(rsp))); + })); + } + + /** + * Search Schedules Version: 9.4.0.cl or later Gets a list of scheduled jobs configured for a Liveboard. To get details of a specific scheduled job, specify the name or GUID of the scheduled job. Requires at least view access to Liveboards. **NOTE**: When filtering schedules by parameters other than `metadata`, set `record_size` to `-1` and `record_offset` to `0` for accurate results. + * @param searchSchedulesRequest + */ + public searchSchedules(searchSchedulesRequest: SearchSchedulesRequest, _options?: Configuration): Observable> { + const requestContextPromise = this.requestFactory.searchSchedules(searchSchedulesRequest, _options); + + // build promise chain + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); + } + + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + pipe(mergeMap((response: ResponseContext) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.searchSchedules(rsp))); + })); + } + + /** + * Update schedule. Version: 9.4.0.cl or later Updates a scheduled Liveboard job. Requires at least edit access to Liveboards. To update a schedule on behalf of another user, you need `ADMINISTRATION` (**Can administer Org**) or `JOBSCHEDULING` (**Can schedule for others**) privilege and edit access to the Liveboard. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `JOBSCHEDULING` (**Can schedule for others**) privilege is required. The API endpoint allows you to pause a scheduled job, change the status of a paused job. You can also edit the recipients list, frequency of the job, format of the file to send to the recipients in email notifications, PDF options, and time zone setting. + * @param scheduleIdentifier Unique ID or name of the schedule. + * @param updateScheduleRequest + */ + public updateSchedule(scheduleIdentifier: string, updateScheduleRequest: UpdateScheduleRequest, _options?: Configuration): Observable { + const requestContextPromise = this.requestFactory.updateSchedule(scheduleIdentifier, updateScheduleRequest, _options); + + // build promise chain + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); + } + + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + pipe(mergeMap((response: ResponseContext) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.updateSchedule(rsp))); + })); + } + +} + +import { SecurityApiRequestFactory, SecurityApiResponseProcessor} from "../apis/SecurityApi"; +export class ObservableSecurityApi { + private requestFactory: SecurityApiRequestFactory; + private responseProcessor: SecurityApiResponseProcessor; + private configuration: Configuration; + + public constructor( + configuration: Configuration, + requestFactory?: SecurityApiRequestFactory, + responseProcessor?: SecurityApiResponseProcessor + ) { + this.configuration = configuration; + this.requestFactory = requestFactory || new SecurityApiRequestFactory(configuration); + this.responseProcessor = responseProcessor || new SecurityApiResponseProcessor(); + } + + /** + * Version: 9.0.0.cl or later Transfers the ownership of one or several objects from one user to another. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `USER_ADMINISTRATION` (**Can manage users**) privilege and edit access to the objects are required. + * @param assignChangeAuthorRequest + */ + public assignChangeAuthor(assignChangeAuthorRequest: AssignChangeAuthorRequest, _options?: Configuration): Observable { + const requestContextPromise = this.requestFactory.assignChangeAuthor(assignChangeAuthorRequest, _options); + + // build promise chain + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); + } + + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + pipe(mergeMap((response: ResponseContext) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.assignChangeAuthor(rsp))); + })); + } + + /** + * Version: 10.12.0.cl or later Fetches column security rules for specified tables. This API endpoint retrieves column-level security rules configured for tables. It returns information about which columns are secured and which groups have access to those columns. #### Usage guidelines - Provide an array of table identifiers using either `identifier` (GUID or name) or `obj_identifier` (object ID) - At least one of `identifier` or `obj_identifier` must be provided for each table - The API returns column security rules for all specified tables - Users must have appropriate permissions to access security rules for the specified tables #### Required permissions - `ADMINISTRATION` - Can administer ThoughtSpot - `DATAMANAGEMENT` - Can manage data - `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` - Can manage worksheet views and tables #### Example request ```json { \"tables\": [ { \"identifier\": \"table-guid\", \"obj_identifier\": \"table-object-id\" } ] } ``` #### Response format The API returns an array of `ColumnSecurityRuleResponse` objects wrapped in a `data` field. Each `ColumnSecurityRuleResponse` object contains: - Table information (GUID and object ID) - Array of column security rules with column details, group access, and source table information #### Example response ```json { \"data\": [ { \"guid\": \"table-guid\", \"objId\": \"table-object-id\", \"columnSecurityRules\": [ { \"column\": { \"id\": \"col_123\", \"name\": \"Salary\" }, \"groups\": [ { \"id\": \"group_1\", \"name\": \"HR Department\" } ], \"sourceTableDetails\": { \"id\": \"source-table-guid\", \"name\": \"Employee_Data\" } } ] } ] } ``` + * @param fetchColumnSecurityRulesRequest + */ + public fetchColumnSecurityRules(fetchColumnSecurityRulesRequest: FetchColumnSecurityRulesRequest, _options?: Configuration): Observable> { + const requestContextPromise = this.requestFactory.fetchColumnSecurityRules(fetchColumnSecurityRulesRequest, _options); + + // build promise chain + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); + } + + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + pipe(mergeMap((response: ResponseContext) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.fetchColumnSecurityRules(rsp))); + })); + } + + /** + * Version: 26.3.0.cl or later This API fetches the object privileges present for the given list of principals (user or group), on the given set of objects. It supports pagination, which can be enabled and configured using the request parameters. It provides users access to certain features based on privilege based access control. #### Usage guidelines - Specify the `type` (`USER` or `USER_GROUP`) and `identifier` (either GUID or name) of the principals for which you want to retrieve object privilege information in the `principals` array. - Specify the `type` (`LOGICAL_TABLE`) and `identifier` (either GUID or name) of the metadata objects for which you want to retrieve object privilege information in the `metadata` array. Only `LOGICAL_TABLE` metadata type is supported for now. It may be extended for other metadata types in future. - To control the offset from where principals have to be fetched, use `record_offset`. When `record_offset` is 0, information is fetched from the beginning. - To control the number of principals to be fetched, use `record_size`. Default `record_size` is 20. - Ensure `record_offset` for a subsequent request is one more than the value of `record_size` of the previous request. - Ensure using correct Authorization Bearer Token corresponding to specific user & org. #### Example request ```json { \"principals\": [ { \"type\": \"type-1\", \"identifier\": \"principal-guid-or-name-1\" }, { \"type\": \"type-2\", \"identifier\": \"principal-guid-or-name-2\" } ], \"metadata\": [ { \"type\": \"metadata-type-1\", \"identifier\": \"metadata-guid-or-name-1\" }, { \"type\": \"metadata-type-2\", \"identifier\": \"metadata-guid-or-name-2\" } ], \"record_offset\": 0, \"record_size\": 20 } ``` #### Response format The API returns an array of `metadata_object_privileges` objects wrapped in JSON. Each `metadata_object_privileges` object contains: - Metadata information (GUID, name and type) - Array of `principal_object_privilege_info`. - Each `principal_object_privilege_info` contains: - Principal type. All principals of this type are listed as described below. - Array of `principal_object_privileges`. - Each `principal_object_privileges` contains: - Principal information (GUID, name, subtype) - List of applied object level privileges. #### Example response ```json { \"metadata_object_privileges\": [ { \"metadata_id\": \"metadata-guid-1\", \"metadata_name\": \"metadata-name-1\", \"metadata_type\": \"metadata-type-1\", \"principal_object_privilege_info\": [ { \"principal_type\": \"principal-type-1\", \"principal_object_privileges\": [ { \"principal_id\": \"principal-guid-1\", \"principal_name\": \"principal-name-1\", \"principal_sub_type\": \"principal-sub-type-1\", \"object_privileges\": \"[object-privilege-1, object-privilege-2]\" }, { \"principal_id\": \"principal-guid-2\", \"principal_name\": \"principal-name-2\", \"principal_sub_type\": \"principal-sub-type-2\", \"object_privileges\": \"[object-privilege-1, object-privilege-2]\" } ] }, { \"principal_type\": \"principal-type-2\", \"principal_object_privileges\": [ { \"principal_id\": \"principal-guid-3\", \"principal_name\": \"principal-guid-4\", \"principal_sub_type\": \"principal-sub-type-4\", \"object_privileges\": \"[object-privilege-1]\" } ] } ] }, { \"metadata_id\": \"metadata-guid-2\", \"metadata_name\": \"metadata-name-2\", \"metadata_type\": \"metadata-type-2\", \"principal_object_privilege_info\": [ { \"principal_type\": \"principal-type-1\", \"principal_object_privileges\": [ { \"principal_id\": \"principal-guid-1\", \"principal_name\": \"principal-name-1\", \"principal_sub_type\": \"principal-sub-type-1\", \"object_privileges\": \"[object-privilege-3, object-privilege-4]\" }, { \"principal_id\": \"principal-guid-2\", \"principal_name\": \"principal-name-2\", \"principal_sub_type\": \"principal-sub-type-2\", \"object_privileges\": \"[object-privilege-4]\" } ] } ] } ] } ``` + * @param fetchObjectPrivilegesRequest + */ + public fetchObjectPrivileges(fetchObjectPrivilegesRequest: FetchObjectPrivilegesRequest, _options?: Configuration): Observable { + const requestContextPromise = this.requestFactory.fetchObjectPrivileges(fetchObjectPrivilegesRequest, _options); + + // build promise chain + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); + } + + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + pipe(mergeMap((response: ResponseContext) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.fetchObjectPrivileges(rsp))); + })); + } + + /** + * Version: 9.0.0.cl or later Fetches object permission details for a given principal object such as a user and group. Requires view access to the metadata object. #### Usage guidelines * To get a list of all metadata objects that a user or group can access, specify the `type` and GUID or name of the principal. * To get permission details for a specific object, add the `type` and GUID or name of the metadata object to your API request. Upon successful execution, the API returns a list of metadata objects and permission details for each object. + * @param fetchPermissionsOfPrincipalsRequest + */ + public fetchPermissionsOfPrincipals(fetchPermissionsOfPrincipalsRequest: FetchPermissionsOfPrincipalsRequest, _options?: Configuration): Observable { + const requestContextPromise = this.requestFactory.fetchPermissionsOfPrincipals(fetchPermissionsOfPrincipalsRequest, _options); + + // build promise chain + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); + } + + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + pipe(mergeMap((response: ResponseContext) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.fetchPermissionsOfPrincipals(rsp))); + })); + } + + /** + * Version: 9.0.0.cl or later Fetches permission details for a given metadata object. Requires view access to the metadata object. #### Usage guidelines * To fetch a list of users and groups for a metadata object, specify `type` and GUID or name of the metadata object. * To get permission details for a specific user or group, add `type` and GUID or name of the principal object to your API request. Upon successful execution, the API returns permission details and principal information for the object specified in the API request. + * @param fetchPermissionsOnMetadataRequest + */ + public fetchPermissionsOnMetadata(fetchPermissionsOnMetadataRequest: FetchPermissionsOnMetadataRequest, _options?: Configuration): Observable { + const requestContextPromise = this.requestFactory.fetchPermissionsOnMetadata(fetchPermissionsOnMetadataRequest, _options); + + // build promise chain + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); + } + + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + pipe(mergeMap((response: ResponseContext) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.fetchPermissionsOnMetadata(rsp))); + })); + } + + /** + * Version: 26.3.0.cl or later This API allows the addition or deletion of object level privileges for a set of users and groups, on a set of metadata objects. It provides users to access certain features based on privilege based access control. #### Usage guidelines - Specify the `operation`. The supported operations are: `ADD`, `REMOVE`. - Specify the type of the objects on which the object privileges are being provided in `metadata_type`. Only `LOGICAL_TABLE` metadata type is supported for now. It may be extended for other metadata types in future. - Specify the list of object privilege types in the `object_privilege_types` array. The supported object privilege types are: `SPOTTER_COACHING_PRIVILEGE`. - Specify the identifiers (either GUID or name) for the metadata objects in the `metadata_identifiers` array. - Specify the `type` (`USER` or `USER_GROUP`) and `identifier` (either GUID or name) of the principals to which you want to apply the given operation and given object privileges in the `principals` array. - Ensure using correct Authorization Bearer Token corresponding to specific user & org. #### Example request ```json { \"operation\": \"operation-type\", \"metadata_type\": \"metadata-type\", \"object_privilege_types\": [\"privilege-type-1\", \"privilege-type-2\"], \"metadata_identifiers\": [\"metadata-guid-or-name-1\", \"metadata-guid-or-name-1\"], \"principals\": [ { \"type\": \"type-1\", \"identifier\": \"principal-guid-or-name-1\" }, { \"type\": \"type-2\", \"identifier\": \"principal-guid-or-name-2\" } ] } ``` > ###### Note: > * Only admin users, users with edit access and users with coaching privilege on a given data-model can add or remove principals related to SPOTTER_COACHING_PRIVILEGE + * @param manageObjectPrivilegeRequest + */ + public manageObjectPrivilege(manageObjectPrivilegeRequest: ManageObjectPrivilegeRequest, _options?: Configuration): Observable { + const requestContextPromise = this.requestFactory.manageObjectPrivilege(manageObjectPrivilegeRequest, _options); + + // build promise chain + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); + } + + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + pipe(mergeMap((response: ResponseContext) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.manageObjectPrivilege(rsp))); + })); + } + + /** + * Version: 26.5.0.cl or later Allows publishing metadata objects across organizations in ThoughtSpot. Requires ADMINISTRATION role and TENANT scope. The API endpoint allows publishing the following types of metadata objects: * Liveboards * Answers * Logical Tables This API will essentially share the objects along with it\'s dependencies to the org admins of the orgs to which it is being published. + * @param publishMetadataRequest + */ + public publishMetadata(publishMetadataRequest: PublishMetadataRequest, _options?: Configuration): Observable { + const requestContextPromise = this.requestFactory.publishMetadata(publishMetadataRequest, _options); + + // build promise chain + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); + } + + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + pipe(mergeMap((response: ResponseContext) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.publishMetadata(rsp))); + })); + } + + /** + * Version: 9.0.0.cl or later Allows sharing one or several metadata objects with users and groups in ThoughtSpot. Requires edit access to the metadata object. #### Supported metadata objects: * Liveboards * Visualizations * Answers * Models * Views * Connections * Collections #### Object permissions You can provide `READ_ONLY` or `MODIFY` access when sharing an object with another user or group. The `READ_ONLY` permission grants view access to the shared object, whereas `MODIFY` provides edit access. To prevent a user or group from accessing the shared object, specify the GUID or name of the principal and set `shareMode` to `NO_ACCESS`. #### Sharing a visualization * Sharing a visualization implicitly shares the entire Liveboard with the recipient. * Object permissions set for a shared visualization also apply to the Liveboard unless overridden by another API request or via UI. * If email notifications for object sharing are enabled, a notification with a link to the shared visualization will be sent to the recipient’s email address. Although this link opens the shared visualization, recipients can also access other visualizations in the Liveboard. #### Sharing a collection Collections support **dual permissions** that provide fine-grained control: * **Collection permissions** (`share_mode`) - controls access to the collection itself (view, edit, delete the collection) * **Content permissions** (`content_share_mode`) - controls access to objects within the collection (view, edit objects inside) **Default Behavior:** - If only `share_mode` is specified, the content permissions default to `READ_ONLY` (except when `share_mode` is `NO_ACCESS`, then content also gets `NO_ACCESS`) - To give users edit access to collection contents, explicitly set `content_share_mode: \"MODIFY\"` ## Examples The following JSON examples can be copy-pasted as request bodies for the REST v2 API endpoint: ```bash POST /callosum/v1/v2/security/metadata/share Content-Type: application/x-www-form-urlencoded ``` ### Basic collection sharing Share a collection with read-only access: ```json { \"metadata_type\": \"COLLECTION\", \"metadata_identifiers\": [\"Sales Reports Collection\"], \"permissions\": [{ \"principal\": { \"type\": \"USER\", \"identifier\": \"alice@company.com\" }, \"share_mode\": \"READ_ONLY\" }], \"notification\": { \"message\": \"I\'ve shared the Sales Reports collection with you\", \"notify_on_share\": true } } ``` ### Collection sharing with dual permissions Share a collection with different permissions for the collection vs. its contents: ```json { \"metadata_type\": \"COLLECTION\", \"metadata_identifiers\": [\"Marketing Analytics\"], \"permissions\": [{ \"principal\": { \"type\": \"USER\", \"identifier\": \"bob@company.com\" }, \"share_mode\": \"MODIFY\", \"content_share_mode\": \"READ_ONLY\" }, { \"principal\": { \"type\": \"USER_GROUP\", \"identifier\": \"Marketing Team\" }, \"share_mode\": \"READ_ONLY\", \"content_share_mode\": \"READ_ONLY\" }], \"notification\": { \"emails\": [\"bob@company.com\"], \"message\": \"You can edit the collection but content is read-only\", \"enable_custom_url\": false, \"notify_on_share\": true }, \"has_lenient_discoverability\": false } ``` ### Multiple collections sharing Share multiple collections with different users: ```json { \"metadata\": [ { \"type\": \"COLLECTION\", \"identifier\": \"Q4 Reports\" }, { \"type\": \"COLLECTION\", \"identifier\": \"Executive Dashboard Collection\" } ], \"permissions\": [{ \"principal\": { \"type\": \"USER_GROUP\", \"identifier\": \"Executives\" }, \"share_mode\": \"MODIFY\" }, { \"principal\": { \"type\": \"USER\", \"identifier\": \"manager@company.com\" }, \"share_mode\": \"READ_ONLY\", \"content_share_mode\": \"MODIFY\" }], \"notification\": { \"message\": \"Sharing quarterly collections with leadership team\", \"notify_on_share\": true } } ``` ### Remove collection access Remove access to a collection by setting share_mode to NO_ACCESS: ```json { \"metadata_type\": \"COLLECTION\", \"metadata_identifiers\": [\"Confidential Reports\"], \"permissions\": [{ \"principal\": { \"type\": \"USER\", \"identifier\": \"former-employee@company.com\" }, \"share_mode\": \"NO_ACCESS\" }], \"notification\": { \"notify_on_share\": false } } ``` ### Collection Permission Scenarios **Scenario 1: Collection Admin** - `share_mode: MODIFY` + `content_share_mode: MODIFY` = Full control over collection and its contents **Scenario 2: Collection Curator** - `share_mode: MODIFY` + `content_share_mode: READ_ONLY` = Can manage collection structure but not edit contents **Scenario 3: Content Editor** - `share_mode: READ_ONLY` + `content_share_mode: MODIFY` = Can edit objects within collection but can\'t change collection itself **Scenario 4: Viewer** - `share_mode: READ_ONLY` + `content_share_mode: READ_ONLY` = View-only access to collection and contents + * @param shareMetadataRequest + */ + public shareMetadata(shareMetadataRequest: ShareMetadataRequest, _options?: Configuration): Observable { + const requestContextPromise = this.requestFactory.shareMetadata(shareMetadataRequest, _options); + + // build promise chain + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); + } + + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + pipe(mergeMap((response: ResponseContext) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.shareMetadata(rsp))); + })); + } + + /** + * Version: 26.5.0.cl or later Allows unpublishing metadata objects from organizations in ThoughtSpot. Requires ADMINISTRATION role and TENANT scope. The API endpoint allows unpublishing the following types of metadata objects: * Liveboards * Answers * Logical Tables When unpublishing objects, you can: * Include dependencies by setting `include_dependencies` to true - this will unpublish all dependent objects if no other published object is using them * Force unpublish by setting `force` to true - this will break all dependent objects in the unpublished organizations + * @param unpublishMetadataRequest + */ + public unpublishMetadata(unpublishMetadataRequest: UnpublishMetadataRequest, _options?: Configuration): Observable { + const requestContextPromise = this.requestFactory.unpublishMetadata(unpublishMetadataRequest, _options); + + // build promise chain + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); + } + + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + pipe(mergeMap((response: ResponseContext) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.unpublishMetadata(rsp))); + })); + } + + /** + * Version: 10.12.0.cl or later Creates, updates, or deletes column security rules for specified tables. This API endpoint allows you to create, update, or delete column-level security rules on columns of a table. The operation follows an \"all or none\" policy: if defining security rules for any of the provided columns fails, the entire operation will be rolled back, and no rules will be created. #### Usage guidelines - Provide table identifier using either `identifier` (GUID or name) or `obj_identifier` (object ID) - Use `clear_csr: true` to remove all column security rules from the table - For each column, specify the security rule using `column_security_rules` array - Use `is_unsecured: true` to mark a specific column as unprotected - Use `group_access` operations to manage group associations: - `ADD`: Add groups to the column\'s access list - `REMOVE`: Remove groups from the column\'s access list - `REPLACE`: Replace all existing groups with the specified groups #### Required permissions - `ADMINISTRATION` - Can administer ThoughtSpot - `DATAMANAGEMENT` - Can manage data (if RBAC is disabled) - `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` - Can manage worksheet views and tables (if RBAC is enabled) #### Example request ```json { \"identifier\": \"table-guid\", \"obj_identifier\": \"table-object-id\", \"clear_csr\": false, \"column_security_rules\": [ { \"column_identifier\": \"col id or col name\", \"is_unsecured\": false, \"group_access\": [ { \"operation\": \"ADD\", \"group_identifiers\": [\"hr_group_id\", \"hr_group_name\", \"finance_group_id\"] } ] }, { \"column_identifier\": \"col id or col name\", \"is_unsecured\": true }, { \"column_identifier\": \"col id or col name\", \"is_unsecured\": false, \"group_access\": [ { \"operation\": \"REPLACE\", \"group_identifiers\": [\"management_group_id\", \"management_group_name\"] } ] } ] } ``` #### Request Body Schema - `identifier` (string, optional): GUID or name of the table for which we want to create column security rules - `obj_identifier` (string, optional): The object ID of the table - `clear_csr` (boolean, optional): If true, then all the secured columns will be marked as unprotected, and all the group associations will be removed - `column_security_rules` (array of objects, required): An array where each object defines the security rule for a specific column Each column security rule object contains: - `column_identifier` (string, required): Column identifier (col_id or name) - `is_unsecured` (boolean, optional): If true, the column will be marked as unprotected and all groups associated with it will be removed - `group_access` (array of objects, optional): Array of group operation objects Each group operation object contains: - `operation` (string, required): Operation type - ADD, REMOVE, or REPLACE - `group_identifiers` (array of strings, required): Array of group identifiers (name or GUID) on which the operation will be performed #### Response This API does not return any response body. A successful operation returns HTTP 200 status code. #### Operation Types - **ADD**: Adds the specified groups to the column\'s access list - **REMOVE**: Removes the specified groups from the column\'s access list - **REPLACE**: Replaces all existing groups with the specified groups + * @param updateColumnSecurityRulesRequest + */ + public updateColumnSecurityRules(updateColumnSecurityRulesRequest: UpdateColumnSecurityRulesRequest, _options?: Configuration): Observable { + const requestContextPromise = this.requestFactory.updateColumnSecurityRules(updateColumnSecurityRulesRequest, _options); + + // build promise chain + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); + } + + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + pipe(mergeMap((response: ResponseContext) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.updateColumnSecurityRules(rsp))); + })); + } + +} + +import { SystemApiRequestFactory, SystemApiResponseProcessor} from "../apis/SystemApi"; +export class ObservableSystemApi { + private requestFactory: SystemApiRequestFactory; + private responseProcessor: SystemApiResponseProcessor; + private configuration: Configuration; + + public constructor( + configuration: Configuration, + requestFactory?: SystemApiRequestFactory, + responseProcessor?: SystemApiResponseProcessor + ) { + this.configuration = configuration; + this.requestFactory = requestFactory || new SystemApiRequestFactory(configuration); + this.responseProcessor = responseProcessor || new SystemApiResponseProcessor(); + } + + /** + * Version: 10.14.0.cl or later Configure communication channel preferences. - Use `cluster_preferences` to update the default preferences for your ThoughtSpot application instance. - If your instance has [Orgs](https://docs.thoughtspot.com/cloud/latest/orgs-overview), use `org_preferences` to specify Org-specific preferences that override the defaults. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) or `DEVELOPER` (**Has developer privilege**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, users with `APPLICATION_ADMINISTRATION` (**Can manage application settings**) privilege are also authorized to perform this action. + * @param configureCommunicationChannelPreferencesRequest + */ + public configureCommunicationChannelPreferences(configureCommunicationChannelPreferencesRequest: ConfigureCommunicationChannelPreferencesRequest, _options?: Configuration): Observable { + const requestContextPromise = this.requestFactory.configureCommunicationChannelPreferences(configureCommunicationChannelPreferencesRequest, _options); + + // build promise chain + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); + } + + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + pipe(mergeMap((response: ResponseContext) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.configureCommunicationChannelPreferences(rsp))); + })); + } + + /** + * Version: 26.2.0.cl or later Configure security settings for your ThoughtSpot application instance. - Use `cluster_preferences` to update cluster-level security settings including CORS whitelisted URLs, CSP settings, SAML redirect URLs, partitioned cookies, and non-embed access configuration. - Use `org_preferences` to configure Org-specific security settings. If your instance has [Orgs](https://docs.thoughtspot.com/cloud/latest/orgs-overview), this allows configuring CORS and non-embed access settings specific to the Org. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) or `DEVELOPER` (**Has developer privilege**) privilege. Cluster-level SAML and script-src settings require `ADMINISTRATION` privilege. See [Security Settings](https://developers.thoughtspot.com/docs/security-settings) for more details. + * @param configureSecuritySettingsRequest + */ + public configureSecuritySettings(configureSecuritySettingsRequest: ConfigureSecuritySettingsRequest, _options?: Configuration): Observable { + const requestContextPromise = this.requestFactory.configureSecuritySettings(configureSecuritySettingsRequest, _options); + + // build promise chain + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); + } + + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + pipe(mergeMap((response: ResponseContext) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.configureSecuritySettings(rsp))); + })); + } + + /** + * Version: 9.0.0.cl or later Retrieves the current configuration details of the cluster. If the request is successful, the API returns a list configuration settings applied on the cluster. Requires `ADMINISTRATION`(**Can administer ThoughtSpot**) privilege to view these complete configuration settings of the cluster. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `SYSTEM_INFO_ADMINISTRATION` (**Can view system activities**) privilege is required. This API does not require any parameters to be passed in the request. + */ + public getSystemConfig(_options?: Configuration): Observable { + const requestContextPromise = this.requestFactory.getSystemConfig(_options); + + // build promise chain + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); + } + + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + pipe(mergeMap((response: ResponseContext) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.getSystemConfig(rsp))); + })); + } + + /** + * Version: 9.0.0.cl or later Gets system information such as the release version, locale, time zone, deployment environment, date format, and date time format of the cluster. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privileges. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `SYSTEM_INFO_ADMINISTRATION` (**Can view system activities**) privilege is required. This API does not require any parameters to be passed in the request. + */ + public getSystemInformation(_options?: Configuration): Observable { + const requestContextPromise = this.requestFactory.getSystemInformation(_options); + + // build promise chain + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); + } + + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + pipe(mergeMap((response: ResponseContext) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.getSystemInformation(rsp))); + })); + } + + /** + * Version: 9.2.0.cl or later Gets a list of configuration overrides applied on the cluster. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `APPLICATION_ADMINISTRATION` (**Can manage application settings**) privilege is required. This API does not require any parameters to be passed in the request. + */ + public getSystemOverrideInfo(_options?: Configuration): Observable { + const requestContextPromise = this.requestFactory.getSystemOverrideInfo(_options); + + // build promise chain + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); + } + + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + pipe(mergeMap((response: ResponseContext) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.getSystemOverrideInfo(rsp))); + })); + } + + /** + * Version: 10.14.0.cl or later Fetch communication channel preferences. - Use `cluster_preferences` to fetch the default preferences for your ThoughtSpot application instance. - If your instance has [Orgs](https://docs.thoughtspot.com/cloud/latest/orgs-overview), use `org_preferences` to fetch any Org-specific preferences that override the defaults. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) or `DEVELOPER` (**Has developer privilege**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, users with `APPLICATION_ADMINISTRATION` (**Can manage application settings**) privilege are also authorized to perform this action. + * @param searchCommunicationChannelPreferencesRequest + */ + public searchCommunicationChannelPreferences(searchCommunicationChannelPreferencesRequest: SearchCommunicationChannelPreferencesRequest, _options?: Configuration): Observable { + const requestContextPromise = this.requestFactory.searchCommunicationChannelPreferences(searchCommunicationChannelPreferencesRequest, _options); + + // build promise chain + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); + } + + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + pipe(mergeMap((response: ResponseContext) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.searchCommunicationChannelPreferences(rsp))); + })); + } + + /** + * Version: 26.2.0.cl or later Fetch security settings for your ThoughtSpot application instance. - Use `scope: CLUSTER` to retrieve cluster-level security settings, including CORS and CSP allowlists, SAML redirect URLs, and settings that control access to non-embedded pages. - Use `scope: ORG` to retrieve Org-level security settings. If your instance has [Orgs](https://docs.thoughtspot.com/cloud/latest/orgs-overview), this returns CORS and non-embed access settings specific to the Org. - If `scope` is not specified, returns both cluster and Org-specific settings based on user privileges. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) or `DEVELOPER` (**Has developer privilege**) privilege. See [Security Settings](https://developers.thoughtspot.com/docs/security-settings) for more details. + * @param searchSecuritySettingsRequest + */ + public searchSecuritySettings(searchSecuritySettingsRequest: SearchSecuritySettingsRequest, _options?: Configuration): Observable { + const requestContextPromise = this.requestFactory.searchSecuritySettings(searchSecuritySettingsRequest, _options); + + // build promise chain + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); + } + + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + pipe(mergeMap((response: ResponseContext) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.searchSecuritySettings(rsp))); + })); + } + + /** + * Version: 9.2.0.cl or later Updates the current configuration of the cluster. You must send the configuration data in JSON format. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privileges. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `APPLICATION_ADMINISTRATION` (**Can manage application settings**) privilege is required. + * @param updateSystemConfigRequest + */ + public updateSystemConfig(updateSystemConfigRequest: UpdateSystemConfigRequest, _options?: Configuration): Observable { + const requestContextPromise = this.requestFactory.updateSystemConfig(updateSystemConfigRequest, _options); + + // build promise chain + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); + } + + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + pipe(mergeMap((response: ResponseContext) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.updateSystemConfig(rsp))); + })); + } + + /** + * Version: 26.4.0.cl or later Validates a communication channel configuration to ensure it is properly set up and can receive events. - Use `channel_type` to specify the type of communication channel to validate (e.g., WEBHOOK). - Use `channel_identifier` to provide the unique identifier or name for the communication channel. - Use `event_type` to specify the event type to validate for this channel. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) or `DEVELOPER` (**Has developer privilege**) privilege. For webhook channels, users with `CAN_MANAGE_WEBHOOKS` (**Can manage webhooks**) privilege are also authorized to perform this action. + * @param validateCommunicationChannelRequest + */ + public validateCommunicationChannel(validateCommunicationChannelRequest: ValidateCommunicationChannelRequest, _options?: Configuration): Observable { + const requestContextPromise = this.requestFactory.validateCommunicationChannel(validateCommunicationChannelRequest, _options); + + // build promise chain + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); + } + + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + pipe(mergeMap((response: ResponseContext) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.validateCommunicationChannel(rsp))); + })); + } + +} + +import { TagsApiRequestFactory, TagsApiResponseProcessor} from "../apis/TagsApi"; +export class ObservableTagsApi { + private requestFactory: TagsApiRequestFactory; + private responseProcessor: TagsApiResponseProcessor; + private configuration: Configuration; + + public constructor( + configuration: Configuration, + requestFactory?: TagsApiRequestFactory, + responseProcessor?: TagsApiResponseProcessor + ) { + this.configuration = configuration; + this.requestFactory = requestFactory || new TagsApiRequestFactory(configuration); + this.responseProcessor = responseProcessor || new TagsApiResponseProcessor(); + } + + /** + * Version: 9.0.0.cl or later Assigns tags to Liveboards, Answers, Tables, and Worksheets. Requires edit access to the metadata object. + * @param assignTagRequest + */ + public assignTag(assignTagRequest: AssignTagRequest, _options?: Configuration): Observable { + const requestContextPromise = this.requestFactory.assignTag(assignTagRequest, _options); + + // build promise chain + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); + } + + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + pipe(mergeMap((response: ResponseContext) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.assignTag(rsp))); + })); + } + + /** + * Version: 9.0.0.cl or later Creates a tag object. Tags are labels that identify a metadata object. For example, you can create a tag to designate subject areas, such as sales, HR, marketing, and finance. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `TAGMANAGEMENT` (**Can manage tags**) privilege is required to create, edit, and delete tags. + * @param createTagRequest + */ + public createTag(createTagRequest: CreateTagRequest, _options?: Configuration): Observable { + const requestContextPromise = this.requestFactory.createTag(createTagRequest, _options); + + // build promise chain + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); + } + + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + pipe(mergeMap((response: ResponseContext) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.createTag(rsp))); + })); + } + + /** + * Version: 9.0.0.cl or later Deletes a tag object from the ThoughtSpot system Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `TAGMANAGEMENT` (**Can manage tags**) privilege is required to create, edit, and delete tags. + * @param tagIdentifier Tag identifier Tag name or Tag id. + */ + public deleteTag(tagIdentifier: string, _options?: Configuration): Observable { + const requestContextPromise = this.requestFactory.deleteTag(tagIdentifier, _options); + + // build promise chain + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); + } + + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + pipe(mergeMap((response: ResponseContext) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.deleteTag(rsp))); + })); + } + + /** + * Version: 9.0.0.cl or later Gets a list of tag objects available on the ThoughtSpot system. To get details of a specific tag object, specify the GUID or name. Any authenticated user can search for tag objects. + * @param searchTagsRequest + */ + public searchTags(searchTagsRequest: SearchTagsRequest, _options?: Configuration): Observable> { + const requestContextPromise = this.requestFactory.searchTags(searchTagsRequest, _options); + + // build promise chain + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); + } + + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + pipe(mergeMap((response: ResponseContext) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.searchTags(rsp))); + })); + } + + /** + * Version: 9.0.0.cl or later Removes the tags applied to a Liveboard, Answer, Table, or Worksheet. Requires edit access to the metadata object. + * @param unassignTagRequest + */ + public unassignTag(unassignTagRequest: UnassignTagRequest, _options?: Configuration): Observable { + const requestContextPromise = this.requestFactory.unassignTag(unassignTagRequest, _options); + + // build promise chain + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); + } + + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + pipe(mergeMap((response: ResponseContext) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.unassignTag(rsp))); + })); + } + + /** + * Version: 9.0.0.cl or later Updates a tag object. You can modify the `name` and `color` properties of a tag object. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `TAGMANAGEMENT` (**Can manage tags**) privilege is required to create, edit, and delete tags. + * @param tagIdentifier Name or Id of the tag. + * @param updateTagRequest + */ + public updateTag(tagIdentifier: string, updateTagRequest: UpdateTagRequest, _options?: Configuration): Observable { + const requestContextPromise = this.requestFactory.updateTag(tagIdentifier, updateTagRequest, _options); + + // build promise chain + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); + } + + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + pipe(mergeMap((response: ResponseContext) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.updateTag(rsp))); + })); + } + +} + +import { ThoughtSpotRestApiRequestFactory, ThoughtSpotRestApiResponseProcessor} from "../apis/ThoughtSpotRestApi"; +export class ObservableThoughtSpotRestApi { + private requestFactory: ThoughtSpotRestApiRequestFactory; + private responseProcessor: ThoughtSpotRestApiResponseProcessor; + private configuration: Configuration; + + public constructor( + configuration: Configuration, + requestFactory?: ThoughtSpotRestApiRequestFactory, + responseProcessor?: ThoughtSpotRestApiResponseProcessor + ) { + this.configuration = configuration; + this.requestFactory = requestFactory || new ThoughtSpotRestApiRequestFactory(configuration); + this.responseProcessor = responseProcessor || new ThoughtSpotRestApiResponseProcessor(); + } + + /** + * Version: 9.7.0.cl or later Activates a deactivated user account. Requires `ADMINISTRATION` (**Can administer Thoughtspot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `USER_ADMINISTRATION` (**Can manage users**) privilege is required. To activate an inactive user account, the API request body must include the following information: - Username or the GUID of the user account. - Auth token generated for the deactivated user. The auth token is sent in the API response when a user is deactivated. - Password for the user account. + * @param activateUserRequest + */ + public activateUser(activateUserRequest: ActivateUserRequest, _options?: Configuration): Observable { + const requestContextPromise = this.requestFactory.activateUser(activateUserRequest, _options); + + // build promise chain + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); + } + + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + pipe(mergeMap((response: ResponseContext) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.activateUser(rsp))); + })); + } + + /** + * Version: 9.0.0.cl or later Transfers the ownership of one or several objects from one user to another. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `USER_ADMINISTRATION` (**Can manage users**) privilege and edit access to the objects are required. + * @param assignChangeAuthorRequest + */ + public assignChangeAuthor(assignChangeAuthorRequest: AssignChangeAuthorRequest, _options?: Configuration): Observable { + const requestContextPromise = this.requestFactory.assignChangeAuthor(assignChangeAuthorRequest, _options); + + // build promise chain + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); + } + + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + pipe(mergeMap((response: ResponseContext) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.assignChangeAuthor(rsp))); + })); + } + + /** + * Version: 9.0.0.cl or later Assigns tags to Liveboards, Answers, Tables, and Worksheets. Requires edit access to the metadata object. + * @param assignTagRequest + */ + public assignTag(assignTagRequest: AssignTagRequest, _options?: Configuration): Observable { + const requestContextPromise = this.requestFactory.assignTag(assignTagRequest, _options); + + // build promise chain + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); + } + + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + pipe(mergeMap((response: ResponseContext) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.assignTag(rsp))); + })); + } + + /** + * Version: 9.0.0.cl or later Updates the current password of the user. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `USER_ADMINISTRATION` (**Can manage users**) privilege is required. + * @param changeUserPasswordRequest + */ + public changeUserPassword(changeUserPasswordRequest: ChangeUserPasswordRequest, _options?: Configuration): Observable { + const requestContextPromise = this.requestFactory.changeUserPassword(changeUserPasswordRequest, _options); + + // build promise chain + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); + } + + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + pipe(mergeMap((response: ResponseContext) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.changeUserPassword(rsp))); + })); + } + + /** + * Version: 9.2.0.cl or later Commits TML files of metadata objects to the Git branch configured on your instance. Requires at least edit access to objects used in the commit operation. Before using this endpoint to push your commits: * Enable Git integration on your instance. * Make sure the Git repository and branch details are configured on your instance. For more information, see [Git integration documentation](https://developers.thoughtspot.com/docs/git-integration). + * @param commitBranchRequest + */ + public commitBranch(commitBranchRequest: CommitBranchRequest, _options?: Configuration): Observable { + const requestContextPromise = this.requestFactory.commitBranch(commitBranchRequest, _options); + + // build promise chain + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); + } + + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + pipe(mergeMap((response: ResponseContext) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.commitBranch(rsp))); + })); + } + + /** + * Version: 26.6.0.cl or later Enables or disables authentication at cluster or org level for the specified auth type. Currently supports `TRUSTED_AUTH`. #### Required privileges Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) or `CONTROL_TRUSTED_AUTH` (**Can Enable or Disable Trusted Authentication**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled, the `CONTROL_TRUSTED_AUTH` privilege is required. #### Usage guidelines Use `cluster_preferences` to enable or disable authentication at the cluster level. Cluster-level settings can only be configured from the Primary Org. - `ENABLED` — Generates a new access token if one does not exist. An existing token is preserved. - `DISABLED` — Revokes the existing cluster-level access token. Use `org_preferences` to enable or disable authentication for one or more Orgs. Each entry must include an `org_identifier` (unique ID or name) and an `auth_status`. Org-level configuration requires the per-Org authentication feature to be enabled on your instance. - `ENABLED` — Generates a new org-level access token if one does not exist. - `DISABLED` — Revokes the existing org-level access token for that Org. Both `cluster_preferences` and `org_preferences` are optional. Omitting a field leaves the corresponding settings unchanged. If both are omitted, the API returns `204 No Content` without making any changes. **Note**: Cluster-level and org-level settings are independent of each other. Enabling or disabling one does not affect the other. + * @param configureAuthSettingsRequest + */ + public configureAuthSettings(configureAuthSettingsRequest: ConfigureAuthSettingsRequest, _options?: Configuration): Observable { + const requestContextPromise = this.requestFactory.configureAuthSettings(configureAuthSettingsRequest, _options); + + // build promise chain + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); + } + + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + pipe(mergeMap((response: ResponseContext) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.configureAuthSettings(rsp))); + })); + } + + /** + * Version: 10.14.0.cl or later Configure communication channel preferences. - Use `cluster_preferences` to update the default preferences for your ThoughtSpot application instance. - If your instance has [Orgs](https://docs.thoughtspot.com/cloud/latest/orgs-overview), use `org_preferences` to specify Org-specific preferences that override the defaults. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) or `DEVELOPER` (**Has developer privilege**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, users with `APPLICATION_ADMINISTRATION` (**Can manage application settings**) privilege are also authorized to perform this action. + * @param configureCommunicationChannelPreferencesRequest + */ + public configureCommunicationChannelPreferences(configureCommunicationChannelPreferencesRequest: ConfigureCommunicationChannelPreferencesRequest, _options?: Configuration): Observable { + const requestContextPromise = this.requestFactory.configureCommunicationChannelPreferences(configureCommunicationChannelPreferencesRequest, _options); + + // build promise chain + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); + } + + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + pipe(mergeMap((response: ResponseContext) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.configureCommunicationChannelPreferences(rsp))); + })); + } + + /** + * Version: 26.2.0.cl or later Configure security settings for your ThoughtSpot application instance. - Use `cluster_preferences` to update cluster-level security settings including CORS whitelisted URLs, CSP settings, SAML redirect URLs, partitioned cookies, and non-embed access configuration. - Use `org_preferences` to configure Org-specific security settings. If your instance has [Orgs](https://docs.thoughtspot.com/cloud/latest/orgs-overview), this allows configuring CORS and non-embed access settings specific to the Org. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) or `DEVELOPER` (**Has developer privilege**) privilege. Cluster-level SAML and script-src settings require `ADMINISTRATION` privilege. See [Security Settings](https://developers.thoughtspot.com/docs/security-settings) for more details. + * @param configureSecuritySettingsRequest + */ + public configureSecuritySettings(configureSecuritySettingsRequest: ConfigureSecuritySettingsRequest, _options?: Configuration): Observable { + const requestContextPromise = this.requestFactory.configureSecuritySettings(configureSecuritySettingsRequest, _options); + + // build promise chain + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); + } + + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + pipe(mergeMap((response: ResponseContext) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.configureSecuritySettings(rsp))); + })); + } + + /** + * Version: 10.12.0.cl or later Gets connection configuration objects. Requires `DATAMANAGEMENT` (**Can manage data**) and edit permissions to the connection object, or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) privilege is required. #### Usage guidelines * To get a list of all configurations available in the ThoughtSpot system, send the API request with only the connection name or GUID in the request body. * To fetch details of a configuration object, specify the configuration object name or GUID. + * @param connectionConfigurationSearchRequest + */ + public connectionConfigurationSearch(connectionConfigurationSearchRequest: ConnectionConfigurationSearchRequest, _options?: Configuration): Observable> { + const requestContextPromise = this.requestFactory.connectionConfigurationSearch(connectionConfigurationSearchRequest, _options); + + // build promise chain + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); + } + + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + pipe(mergeMap((response: ResponseContext) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.connectionConfigurationSearch(rsp))); + })); + } + + /** + * Convert worksheets to models Version: 10.6.0.cl or later ## Prerequisites - **Privileges Required:** - `DATAMANAGEMENT` (Can manage data) or `ADMINISTRATION` (Can administer ThoughtSpot). - **Additional Privileges (if RBAC is enabled):** - `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` (Can manage data models). --- ## Usage Guidelines ### Parameters 1. **worksheet_ids** - **Description:** A comma-separated list of GUIDs (Globally Unique Identifiers) specifying the Worksheets to be converted. - **Usage:** - Used only when `convert_all` is set to `false`. - Leave empty or omit when `convert_all` is set to `true`. 2. **exclude_worksheet_ids** - **Description:** A comma-separated list of GUIDs specifying Worksheets to be excluded from conversion. - **Usage:** - Useful when `convert_all` is set to `true` and specific Worksheets should not be converted. 3. **convert_all** - **Description:** Sets the scope of conversion. - **Options:** - `true`: Converts all Worksheets in the system, except those specified in `exclude_worksheet_ids`. - `false`: Converts only the Worksheets listed in `worksheet_ids`. 4. **apply_changes** - **Description:** Specifies whether to apply changes directly to ThoughtSpot or to generate a preview before applying any changes.Used for validation of conversion. - **Options:** - `true`: Applies conversion changes directly to ThoughtSpot. - `false`: Generates only a preview of the changes and does not apply any changes to ThoughtSpot --- ## Best Practices 1. **Backup Before Conversion:** Always export metadata as a backup before initiating the conversion process 2. **Partial Conversion for Testing:** Test the conversion process by setting `convert_all` to `false` and specifying a small number of `worksheet_ids`. 3. **Verify Dependencies:** Check for dependent objects, such as Tables and Connections, to avoid invalid references. 4. **Review Changes:** Use `apply_changes: false` to preview the impact of the conversion before applying changes. --- ## Examples ### Convert Specific Worksheets ```json { \"worksheet_ids\": [\"guid1\", \"guid2\", \"guid3\"], \"exclude_worksheet_ids\": [], \"convert_all\": false, \"apply_changes\": true } ``` ### Convert All Accessible Worksheets ```json { \"worksheet_ids\": [], \"exclude_worksheet_ids\": [], \"convert_all\": true, \"apply_changes\": true } ``` ### Exclude Specific Worksheets While Converting All Accessible Worksheets ```json { \"worksheet_ids\": [], \"exclude_worksheet_ids\": [\"abc\"], \"convert_all\": true, \"apply_changes\": true } ``` + * @param convertWorksheetToModelRequest + */ + public convertWorksheetToModel(convertWorksheetToModelRequest: ConvertWorksheetToModelRequest, _options?: Configuration): Observable { + const requestContextPromise = this.requestFactory.convertWorksheetToModel(convertWorksheetToModelRequest, _options); + + // build promise chain + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); + } + + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + pipe(mergeMap((response: ResponseContext) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.convertWorksheetToModel(rsp))); + })); + } + + /** + * Makes a copy of an Answer or Liveboard Version: 10.3.0.cl or later Creates a copy of a metadata object. Requires at least view access to the metadata object being copied. Upon successful execution, the API creates a copy of the metadata object specified in the API request and returns the ID of the new object. + * @param copyObjectRequest + */ + public copyObject(copyObjectRequest: CopyObjectRequest, _options?: Configuration): Observable { + const requestContextPromise = this.requestFactory.copyObject(copyObjectRequest, _options); + + // build promise chain + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); + } + + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + pipe(mergeMap((response: ResponseContext) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.copyObject(rsp))); + })); + } + + /** + * Version: 26.2.0.cl or later Creates a new Spotter agent conversation based on the provided context and settings. The endpoint was in Beta from 26.2.0.cl through 26.4.0.cl. Requires `CAN_USE_SPOTTER` privilege and at least view access to the metadata object specified in the request. #### Usage guidelines The request must include the `metadata_context` parameter to define the conversation context. The context type can be one of: - `DATA_SOURCE` *(available from 26.5.0.cl)*: targets a specific data source. Provide `data_source_identifier` in `data_source_context` for a single data source, or `data_source_identifiers` for multi-data-source context. The deprecated `guid` field is accepted for backwards compatibility. - `AUTO_MODE` *(available from 26.5.0.cl)*: automatically discovers and selects the most relevant datasets for the user\'s queries. > **Note for callers on versions 26.2.0.cl – 26.4.0.cl (Beta):** use the lowercase `data_source` enum value with the `guid` field instead of the above. Example: `{ \"type\": \"data_source\", \"data_source_context\": { \"guid\": \"\" } }`. The `conversation_settings` parameter controls which Spotter capabilities are enabled for the conversation: - `enable_contextual_change_analysis` (default: `true`, **deprecated from 26.2.0.cl**) — always enabled in Spotter 3; setting this to `false` has no effect on versions >= 26.2.0.cl - `enable_natural_language_answer_generation` (default: `true`, **deprecated from 26.2.0.cl**) — always enabled in Spotter 3; setting this to `false` has no effect on versions >= 26.2.0.cl - `enable_reasoning` (default: `true`, **deprecated from 26.2.0.cl**) — always enabled in Spotter 3; setting this to `false` has no effect on versions >= 26.2.0.cl - `enable_save_chat` (default: `false`, *available from 26.5.0.cl*) — enables saving the conversation for later retrieval via conversation history If the request is successful, the response includes a unique `conversation_identifier` that must be passed to `sendAgentConversationMessage` or `sendAgentConversationMessageStreaming` to send messages within this conversation. The response also includes `conversation_id` with the same value for backwards compatibility; use `conversation_identifier` for new integrations. #### Example request ```json { \"metadata_context\": { \"type\": \"DATA_SOURCE\", \"data_source_context\": { \"data_source_identifier\": \"a1b2c3d4-e5f6-7890-abcd-ef1234567890\" } }, \"conversation_settings\": {} } ``` #### Error responses | Code | Description | | ---- | --------------------------------------------------------------------------------------------------------------------------------------- | | 401 | Unauthorized — authentication token is missing, expired, or invalid. | | 403 | Forbidden — the authenticated user does not have `CAN_USE_SPOTTER` privilege or lacks view permission on the specified metadata object. | > ###### Note: > > - This endpoint was in Beta from 26.2.0.cl through 26.4.0.cl and is Generally Available from version 26.5.0.cl. > - This endpoint requires Spotter - please contact ThoughtSpot support to enable Spotter on your cluster. + * @param createAgentConversationRequest + */ + public createAgentConversation(createAgentConversationRequest: CreateAgentConversationRequest, _options?: Configuration): Observable { + const requestContextPromise = this.requestFactory.createAgentConversation(createAgentConversationRequest, _options); + + // build promise chain + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); + } + + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + pipe(mergeMap((response: ResponseContext) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.createAgentConversation(rsp))); + })); + } + + /** + * Version: 10.12.0.cl or later Creates a new [custom calendar](https://docs.thoughtspot.com/cloud/latest/connections-cust-cal). Requires `DATAMANAGEMENT` (**Can manage data**) or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your ThoughtSpot instance, the `CAN_MANAGE_CUSTOM_CALENDAR` (**Can manage custom calendars**) privilege is required. #### Usage guidelines You can create a custom calendar from scratch or an existing Table in ThoughtSpot. For both methods of calendar creation, the following parameters are required: * Name of the custom calendar. * Calendar creation method. To create a calendar from an existing table, specify the method: - `FROM_EXISTING_TABLE` - Creates calendar from the table reference provided in the API request. - `FROM_INPUT_PARAMS` - Creates a calendar from the parameters defined in the API request. * Connection ID and Table name * Database and schema name attributes: For most Cloud Data Warehouse (CDW) connectors, both `database_name` and `schema_name` attributes are required. However, the attribute requirements are conditional and vary based on the connector type and its metadata structure. For example, for connectors such as Teradata, MySQL, SingleSore, Amazon Aurora MySQL, Amazon RDS MySQL, Oracle, and GCP_MYSQL, the `schema_name` is required, whereas the `database_name` attribute is not. Similarly, connectors such as ClickHouse require you to specify the `database_name` and the schema specification in such cases is optional. **NOTE**: If you are creating a calendar from an existing table, ensure that the referenced table matches the required DDL for custom calendars. If the schema does not match, the API returns an error. ##### Calendar type The API allows you to create the following types of calendars: * `MONTH_OFFSET`. The default calendar type. A `MONTH_OFFSET` calendar is offset by a few months from the standard calendar months (January to December) and the year begins with the month defined in the request. For example, if the `month_offset` value is set as `April`, the calendar year begins in April. * `4-4-5`. Each quarter in the calendar will include two 4-week months followed by one 5-week month. * `4-5-4`. Each quarter in the calendar will include two 4-week months with a 5-week month between. * `5-4-4`. Each quarter begins with a 5-week month, followed by two 4-week months. To start and end the calendar on a specific date, specify the dates in the `MM/DD/YYYY` format. For `MONTH_OFFSET` calendars, ensure that the `start_date` matches the month specified in the `month_offset` attribute. You can also set the starting day of the week and customize the prefixes for year and quarter labels. #### Examples To create a calendar from an existing table: ``` { \"name\": \"MyCustomCalendar1\", \"table_reference\": { \"connection_identifier\": \"4db8ea22-2ff4-4224-b05a-26674717e468\", \"table_name\": \"MyCalendarTable\", \"database_name\": \"RETAILAPPAREL\", \"schema_name\": \"PUBLIC\" }, \"creation_method\": \"FROM_EXISTING_TABLE\", } ``` To create a calendar from scratch: ``` { \"name\": \"MyCustomCalendar1\", \"table_reference\": { \"connection_identifier\": \"4db8ea22-2ff4-4224-b05a-26674717e468\", \"table_name\": \"MyCalendarTable\", \"database_name\": \"RETAILAPPAREL\", \"schema_name\": \"PUBLIC\" }, \"creation_method\": \"FROM_INPUT_PARAMS\", \"calendar_type\": \"MONTH_OFFSET\", \"month_offset\": \"April\", \"start_day_of_week\": \"Monday\", \"quarter_name_prefix\": \"Q\", \"year_name_prefix\": \"FY\", \"start_date\": \"04/01/2025\", \"end_date\": \"04/31/2025\" } ``` + * @param createCalendarRequest + */ + public createCalendar(createCalendarRequest: CreateCalendarRequest, _options?: Configuration): Observable { + const requestContextPromise = this.requestFactory.createCalendar(createCalendarRequest, _options); + + // build promise chain + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); + } + + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + pipe(mergeMap((response: ResponseContext) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.createCalendar(rsp))); + })); + } + + /** + * Version: 26.4.0.cl or later Creates a new collection in ThoughtSpot. Collections allow you to organize and group related metadata objects such as Liveboards, Answers, worksheets, and other data objects. You can also create nested collections (sub-collections) to build a hierarchical structure. #### Supported operations The API endpoint lets you perform the following operations: * Create a new collection * Add metadata objects (Liveboards, Answers, Logical Tables) to the collection * Create nested collections by adding sub-collections + * @param createCollectionRequest + */ + public createCollection(createCollectionRequest: CreateCollectionRequest, _options?: Configuration): Observable { + const requestContextPromise = this.requestFactory.createCollection(createCollectionRequest, _options); + + // build promise chain + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); + } + + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + pipe(mergeMap((response: ResponseContext) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.createCollection(rsp))); + })); + } + + /** + * Version: 9.2.0.cl or later Allows you to connect a ThoughtSpot instance to a Git repository. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance on your instance, the `CAN_SETUP_VERSION_CONTROL` (**Can set up version control**) privilege. You can use this API endpoint to connect your ThoughtSpot development and production environments to the development and production branches of a Git repository. Before using this endpoint to connect your ThoughtSpot instance to a Git repository, check the following prerequisites: * You have a Git repository. If you are using GitHub, make sure you have a valid account and an access token to connect ThoughtSpot to GitHub. For information about generating a token, see [GitHub Documentation](https://docs.github.com/en/authentication/keeping-your-account-and-data-secure/managing-your-personal-access-tokens). * Your access token has `repo` scope that grants full access to public and private repositories. * Your Git repository has a branch that can be configured as a default branch in ThoughtSpot. For more information, see [Git integration documentation](https://developers.thoughtspot.com/docs/?pageid=git-integration). **Note**: ThoughtSpot supports only GitHub / itHub Enterprise for CI/CD. + * @param createConfigRequest + */ + public createConfig(createConfigRequest: CreateConfigRequest, _options?: Configuration): Observable { + const requestContextPromise = this.requestFactory.createConfig(createConfigRequest, _options); + + // build promise chain + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); + } + + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + pipe(mergeMap((response: ResponseContext) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.createConfig(rsp))); + })); + } + + /** + * Version: 9.2.0.cl or later Creates a connection to a data warehouse for live query services. Requires `DATAMANAGEMENT` (**Can manage data**) or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) privilege is required. #### Create a connection without tables To create a connection without tables: 1. Pass these parameters in your API request. * Name of the connection. * Type of the data warehouse to connect to. * A JSON map of configuration attributes in `data_warehouse_config`. The following example shows the configuration attributes for a SnowFlake connection: ``` { \"configuration\":{ \"accountName\":\"thoughtspot_partner\", \"user\":\"tsadmin\", \"password\":\"TestConn123\", \"role\":\"sysadmin\", \"warehouse\":\"MEDIUM_WH\" }, \"authenticationType\": \"SERVICE_ACCOUNT\", \"externalDatabases\":[ ] } ``` 2. Set `validate` to `false`. **NOTE:** If the `authentication_type` is anything other than SERVICE_ACCOUNT, you must explicitly provide the authenticationType property in the payload. If you do not specify authenticationType, the API will default to SERVICE_ACCOUNT as the authentication type. #### Create a connection with tables If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) and `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` (**Can manage data models**) privilege is required. To create a connection with tables: 1. Pass these parameters in your API request. * Name of the connection. * Type of the data warehouse to connect to. * A JSON map of configuration attributes, database details, and table properties in `data_warehouse_config` as shown in the following example: ``` { \"configuration\":{ \"accountName\":\"thoughtspot_partner\", \"user\":\"tsadmin\", \"password\":\"TestConn123\", \"role\":\"sysadmin\", \"warehouse\":\"MEDIUM_WH\" }, \"authenticationType\": \"SERVICE_ACCOUNT\", \"externalDatabases\":[ { \"name\":\"AllDatatypes\", \"isAutoCreated\":false, \"schemas\":[ { \"name\":\"alldatatypes\", \"tables\":[ { \"name\":\"allDatatypes\", \"type\":\"TABLE\", \"description\":\"\", \"selected\":true, \"linked\":true, \"columns\":[ { \"name\":\"CNUMBER\", \"type\":\"INT64\", \"canImport\":true, \"selected\":true, \"isLinkedActive\":true, \"isImported\":false, \"tableName\":\"allDatatypes\", \"schemaName\":\"alldatatypes\", \"dbName\":\"AllDatatypes\" }, { \"name\":\"CDECIMAL\", \"type\":\"INT64\", \"canImport\":true, \"selected\":true, \"isLinkedActive\":true, \"isImported\":false, \"tableName\":\"allDatatypes\", \"schemaName\":\"alldatatypes\", \"dbName\":\"AllDatatypes\" } ] } ] } ] } ] } ``` 2. Set `validate` to `true`. **NOTE:** If the `authentication_type` is anything other than SERVICE_ACCOUNT, you must explicitly provide the authenticationType property in the payload. If you do not specify authenticationType, the API will default to SERVICE_ACCOUNT as the authentication type. + * @param createConnectionRequest + */ + public createConnection(createConnectionRequest: CreateConnectionRequest, _options?: Configuration): Observable { + const requestContextPromise = this.requestFactory.createConnection(createConnectionRequest, _options); + + // build promise chain + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); + } + + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + pipe(mergeMap((response: ResponseContext) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.createConnection(rsp))); + })); + } + + /** + * Version: 10.12.0.cl or later Creates an additional configuration to an existing connection to a data warehouse. Requires `DATAMANAGEMENT` (**Can manage data**) or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) privilege is required. #### Usage guidelines * A JSON map of configuration attributes in `configuration`. The following example shows the configuration attributes: ``` { \"user\":\"DEV_USER\", \"password\":\"TestConn123\", \"role\":\"DEV\", \"warehouse\":\"DEV_WH\" } ``` * If the `policy_type` is `PRINCIPALS`, then `policy_principals` is a required field. * If the `policy_type` is `PROCESSES`, then `policy_processes` is a required field. * If the `policy_type` is `NO_POLICY`, then `policy_principals` and `policy_processes` are not required fields. #### Parameterized Connection Support For parameterized connections that use OAuth authentication, only the same_as_parent and policy_process_options attributes are allowed in the API request. These attributes are not applicable to connections that are not parameterized. + * @param createConnectionConfigurationRequest + */ + public createConnectionConfiguration(createConnectionConfigurationRequest: CreateConnectionConfigurationRequest, _options?: Configuration): Observable { + const requestContextPromise = this.requestFactory.createConnectionConfiguration(createConnectionConfigurationRequest, _options); + + // build promise chain + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); + } + + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + pipe(mergeMap((response: ResponseContext) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.createConnectionConfiguration(rsp))); + })); + } + + /** + * Version: 10.4.0.cl or later Creates a new conversation session tied to a specific data model for AI-driven natural language querying. Requires `CAN_USE_SPOTTER` privilege and at least view access to the metadata object specified in the request. #### Usage guidelines The request must include: - `metadata_identifier`: the unique ID of the data source that provides context for the conversation Optionally, you can provide: - `tokens`: a token string to set initial context for the conversation (e.g., `\"[sales],[item type],[state]\"`) If the request is successful, ThoughtSpot returns a unique `conversation_identifier` that must be passed to `sendMessage` to continue the conversation. #### Error responses | Code | Description | |------|-------------| | 401 | Unauthorized — authentication token is missing, expired, or invalid. | | 403 | Forbidden — the authenticated user does not have `CAN_USE_SPOTTER` privilege or lacks view permission on the specified metadata object. | > ###### Note: > * This endpoint is currently in Beta. Breaking changes may be introduced before the endpoint is made Generally Available. > * This endpoint requires Spotter - please contact ThoughtSpot support to enable Spotter on your cluster. + * @param createConversationRequest + */ + public createConversation(createConversationRequest: CreateConversationRequest, _options?: Configuration): Observable { + const requestContextPromise = this.requestFactory.createConversation(createConversationRequest, _options); + + // build promise chain + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); + } + + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + pipe(mergeMap((response: ResponseContext) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.createConversation(rsp))); + })); + } + + /** + * Version: 9.6.0.cl or later Creates a custom action that appears as a menu action on a saved Answer or Liveboard visualization. Requires `DEVELOPER` (**Has Developer privilege**) or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `DEVELOPER` (**Has developer privilege**) privilege is required. #### Usage Guidelines The API lets you create the following types of custom actions: * URL-based action Allows pushing data to an external URL. * Callback action Triggers a callback to the host application and initiates a response payload on an embedded ThoughtSpot instance. By default, custom actions are visible to only administrator or developer users. To make a custom action available to other users, and specify the groups in `group_identifiers`. By default, the custom action is set as a _global_ action on all visualizations and saved Answers. To assign a custom action to specific Liveboard visualization, saved Answer, or Worksheet, set `visibility` to `false` in `default_action_config` property and specify the GUID or name of the object in `associate_metadata`. For more information, see [Custom actions](https://developers.thoughtspot.com/docs/custom-action-intro). + * @param createCustomActionRequest + */ + public createCustomAction(createCustomActionRequest: CreateCustomActionRequest, _options?: Configuration): Observable { + const requestContextPromise = this.requestFactory.createCustomAction(createCustomActionRequest, _options); + + // build promise chain + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); + } + + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + pipe(mergeMap((response: ResponseContext) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.createCustomAction(rsp))); + })); + } + + /** + * Version: 10.10.0.cl or later Creates a customization configuration for the notification email. #### Pre-requisites Requires `DEVELOPER` (**has developer privilege**) or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `DEVELOPER` (**Has developer privilege**) privilege is required. **NOTE**:This endpoint in currently in beta. Contact ThoughtSpot support to enable this on your instance. #### Usage guidelines To create a custom configuration pass these parameters in your API request: - A JSON map of configuration attributes `template_properties`. The following example shows a sample set of customization configuration: ``` { { \"cta_button_bg_color\": \"#444DEA\", \"cta_text_font_color\": \"#FFFFFF\", \"primary_bg_color\": \"#D3DEF0\", \"logo_url\": \"https://storage.pardot.com/710713/1642089901EbkRibJq/TS_fullworkmark_darkmode.png\", \"font_family\": \"\", \"product_name\": \"ThoughtSpot\", \"footer_address\": \"444 Castro St, Suite 1000 Mountain View, CA 94041\", \"footer_phone\": \"(800) 508-7008\", \"replacement_value_for_liveboard\": \"Dashboard\", \"replacement_value_for_answer\": \"Chart\", \"replacement_value_for_spot_iq\": \"AI Insights\", \"hide_footer_phone\": false, \"hide_footer_address\": false, \"hide_product_name\": false, \"hide_manage_notification\": false, \"hide_mobile_app_nudge\": false, \"hide_privacy_policy\": false, \"hide_ts_vocabulary_definitions\": false, \"hide_error_message\": false, \"hide_unsubscribe_link\": false, \"hide_notification_status\": false, \"hide_modify_alert\": false, \"company_website_url\": \"https://your-website.com/\", \"company_privacy_policy_url\" : \"https://link-to-privacy-policy.com/\", \"contact_support_url\": \"https://link-to-contact-support.com/\", \"hide_contact_support_url\": false, \"hide_logo_url\" : false } } ``` + * @param createEmailCustomizationRequest + */ + public createEmailCustomization(createEmailCustomizationRequest: CreateEmailCustomizationRequest, _options?: Configuration): Observable { + const requestContextPromise = this.requestFactory.createEmailCustomization(createEmailCustomizationRequest, _options); + + // build promise chain + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); + } + + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + pipe(mergeMap((response: ResponseContext) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.createEmailCustomization(rsp))); + })); + } + + /** + * Version: 9.0.0.cl or later Creates an Org object. To use this API, the [Orgs](https://docs.thoughtspot.com/cloud/latest/orgs-overview) feature must be enabled in your cluster. Requires cluster administration (**Can administer Org**) privileges. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `ORG_ADMINISTRATION` (**Can manage Orgs**) privilege is required. + * @param createOrgRequest + */ + public createOrg(createOrgRequest: CreateOrgRequest, _options?: Configuration): Observable { + const requestContextPromise = this.requestFactory.createOrg(createOrgRequest, _options); + + // build promise chain + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); + } + + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + pipe(mergeMap((response: ResponseContext) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.createOrg(rsp))); + })); + } + + /** + * Version: 9.5.0.cl or later Creates a Role object in ThoughtSpot. Available only if [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance. To create a Role, the `ROLE_ADMINISTRATION` (**Can manage roles**) privilege is required. + * @param createRoleRequest + */ + public createRole(createRoleRequest: CreateRoleRequest, _options?: Configuration): Observable { + const requestContextPromise = this.requestFactory.createRole(createRoleRequest, _options); + + // build promise chain + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); + } + + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + pipe(mergeMap((response: ResponseContext) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.createRole(rsp))); + })); + } + + /** + * Create schedule. Version: 9.4.0.cl or later Creates a Liveboard schedule job. Requires at least edit access to Liveboards. To create a schedule on behalf of another user, you need `ADMINISTRATION` (**Can administer Org**) or `JOBSCHEDULING` (**Can schedule for others**) privilege and edit access to the Liveboard. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `JOBSCHEDULING` (**Can schedule for others**) privilege is required. #### Usage guidelines * The description text is mandatory. The description text appears as **Description: ** in the Liveboard schedule email notifications. * For Liveboards with both charts and tables, schedule creation is only supported in PDF and XLS formats. Schedules created in CSV formats for such Liveboards will fail to run. If `PDF` is set as the `file_format`, enable `pdf_options` to get the correct attachment. Not doing so may cause the attachment to be rendered empty. * To include only specific visualizations, specify the visualization GUIDs in the `visualization_identifiers` array. * You can schedule a Liveboard job to run periodically by setting frequency parameters. You can set the schedule to run daily, weekly, monthly or every n minutes or hours. The scheduled job can also be configured to run at a specific time of the day or on specific days of the week or month. Please ensure that when setting the schedule frequency for _minute of the object_, only values that are multiples of 5 are included. * If the `frequency` parameters are defined, you can set the time zone to a value that matches your server\'s time zone. For example, `US/Central`, `Etc/UTC`, `CET`. The default time zone is `America/Los_Angeles`. For more information about Liveboard jobs, see [ThoughtSpot Product Documentation](https://docs.thoughtspot.com/cloud/latest/liveboard-schedule). + * @param createScheduleRequest + */ + public createSchedule(createScheduleRequest: CreateScheduleRequest, _options?: Configuration): Observable { + const requestContextPromise = this.requestFactory.createSchedule(createScheduleRequest, _options); + + // build promise chain + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); + } + + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + pipe(mergeMap((response: ResponseContext) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.createSchedule(rsp))); + })); + } + + /** + * Version: 9.0.0.cl or later Creates a tag object. Tags are labels that identify a metadata object. For example, you can create a tag to designate subject areas, such as sales, HR, marketing, and finance. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `TAGMANAGEMENT` (**Can manage tags**) privilege is required to create, edit, and delete tags. + * @param createTagRequest + */ + public createTag(createTagRequest: CreateTagRequest, _options?: Configuration): Observable { + const requestContextPromise = this.requestFactory.createTag(createTagRequest, _options); + + // build promise chain + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); + } + + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + pipe(mergeMap((response: ResponseContext) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.createTag(rsp))); + })); + } + + /** + * Version: 9.0.0.cl or later Creates a user in ThoughtSpot. The API endpoint allows you to configure several user properties such as email address, account status, share notification preferences, and sharing visibility. You can provision the user to [groups](https://docs.thoughtspot.com/cloud/latest/groups-privileges) and [Orgs](https://docs.thoughtspot.com/cloud/latest/orgs-overview). You can also add Liveboard, Answer, and Worksheet objects to the user’s favorites list, assign a default Liveboard for the user, and set user preferences. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `USER_ADMINISTRATION` (**Can manage users**) privilege is required. + * @param createUserRequest + */ + public createUser(createUserRequest: CreateUserRequest, _options?: Configuration): Observable { + const requestContextPromise = this.requestFactory.createUser(createUserRequest, _options); + + // build promise chain + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); + } + + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + pipe(mergeMap((response: ResponseContext) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.createUser(rsp))); + })); + } + + /** + * Version: 9.0.0.cl or later Creates a group object in ThoughtSpot. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `GROUP_ADMINISTRATION` (**Can manage groups**) privilege is required. #### About groups Groups in ThoughtSpot are used by the administrators to define privileges and organize users based on their roles and access requirements. To know more about groups and privileges, see [ThoughtSpot Product Documentation](https://docs.thoughtspot.com/cloud/latest/groups-privileges). #### Supported operations The API endpoint lets you perform the following operations: * Assign privileges * Add users * Define sharing visibility * Add sub-groups * Assign a default Liveboard + * @param createUserGroupRequest + */ + public createUserGroup(createUserGroupRequest: CreateUserGroupRequest, _options?: Configuration): Observable { + const requestContextPromise = this.requestFactory.createUserGroup(createUserGroupRequest, _options); + + // build promise chain + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); + } + + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + pipe(mergeMap((response: ResponseContext) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.createUserGroup(rsp))); + })); + } + + /** + * Create a variable which can be used for parameterizing metadata objects Version: 26.4.0.cl or later Allows creating a variable which can be used for parameterizing metadata objects in ThoughtSpot. Requires ADMINISTRATION role and TENANT scope. The CAN_MANAGE_VARIABLES permission allows you to manage Formula Variables in the current organization scope. The API endpoint supports the following types of variables: * CONNECTION_PROPERTY - For connection properties * TABLE_MAPPING - For table mappings * CONNECTION_PROPERTY_PER_PRINCIPAL - For connection properties per principal. In order to use this please contact support to enable this. * FORMULA_VARIABLE - For Formula variables, introduced in 10.15.0.cl When creating a variable, you need to specify: * The variable type * A unique name for the variable * Whether the variable contains sensitive values (defaults to false) * The data type of the variable, only specify for formula variables (defaults to null) The operation will fail if: * The user lacks required permissions * The variable name already exists * The variable type is invalid + * @param createVariableRequest + */ + public createVariable(createVariableRequest: CreateVariableRequest, _options?: Configuration): Observable { + const requestContextPromise = this.requestFactory.createVariable(createVariableRequest, _options); + + // build promise chain + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); + } + + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + pipe(mergeMap((response: ResponseContext) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.createVariable(rsp))); + })); + } + + /** + * Version: 10.14.0.cl or later Creates a new webhook configuration to receive notifications for specified events. The webhook will be triggered when the configured events occur in the system. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) or `DEVELOPER` (**Has developer privilege**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, users with `CAN_MANAGE_WEBHOOKS` (**Can manage webhooks**) privilege are also authorized to perform this action. + * @param createWebhookConfigurationRequest + */ + public createWebhookConfiguration(createWebhookConfigurationRequest: CreateWebhookConfigurationRequest, _options?: Configuration): Observable { + const requestContextPromise = this.requestFactory.createWebhookConfiguration(createWebhookConfigurationRequest, _options); + + // build promise chain + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); + } + + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + pipe(mergeMap((response: ResponseContext) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.createWebhookConfiguration(rsp))); + })); + } + + /** + * Version: 9.9.0.cl or later Creates a DBT connection object in ThoughtSpot. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege or `DATAMANAGEMENT` (**Can manage data**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the following Data control privileges may be required: - `CAN_MANAGE_CUSTOM_CALENDAR`(**Can manage custom calendars**) - `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) - `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` (**Can manage data models**) #### About create DBT connection DBT connection in ThoughtSpot is used by the user to define DBT credentials for cloud . The API needs embrace connection, embrace database name, DBT url, import type, DBT account identifier, DBT project identifier, DBT access token and environment details (or) embrace connection, embrace database name, import type, file_content to create a connection object. To know more about DBT, see ThoughtSpot Product Documentation. + * @param connectionName Name of the connection. + * @param databaseName Name of the Database. + * @param importType Mention type of Import + * @param accessToken Access token is mandatory when Import_Type is DBT_CLOUD. + * @param dbtUrl DBT URL is mandatory when Import_Type is DBT_CLOUD. + * @param accountId Account ID is mandatory when Import_Type is DBT_CLOUD + * @param projectId Project ID is mandatory when Import_Type is DBT_CLOUD + * @param dbtEnvId DBT Environment ID\\\" + * @param projectName Name of the project + * @param fileContent Upload DBT Manifest and Catalog artifact files as a ZIP file. This field is Mandatory when Import Type is \\\'ZIP_FILE\\\' + */ + public dbtConnection(connectionName: string, databaseName: string, importType?: string, accessToken?: string, dbtUrl?: string, accountId?: string, projectId?: string, dbtEnvId?: string, projectName?: string, fileContent?: HttpFile, _options?: Configuration): Observable { + const requestContextPromise = this.requestFactory.dbtConnection(connectionName, databaseName, importType, accessToken, dbtUrl, accountId, projectId, dbtEnvId, projectName, fileContent, _options); + + // build promise chain + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); + } + + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + pipe(mergeMap((response: ResponseContext) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.dbtConnection(rsp))); + })); + } + + /** + * Version: 9.9.0.cl or later Resynchronize the existing list of models, tables, worksheet tml’s and import them to Thoughtspot based on the DBT connection object. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege or `DATAMANAGEMENT` (**Can manage data**) privilege, along with an existing DBT connection. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the following data control privileges may be required: - `CAN_MANAGE_CUSTOM_CALENDAR`(**Can manage custom calendars**) - `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) - `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` (**Can manage data models**) + * @param dbtConnectionIdentifier Unique ID of the DBT connection. + * @param fileContent Upload DBT Manifest and Catalog artifact files as a ZIP file. This field is mandatory if the connection was created with import_type ‘ZIP_FILE’ + */ + public dbtGenerateSyncTml(dbtConnectionIdentifier: string, fileContent?: HttpFile, _options?: Configuration): Observable { + const requestContextPromise = this.requestFactory.dbtGenerateSyncTml(dbtConnectionIdentifier, fileContent, _options); + + // build promise chain + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); + } + + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + pipe(mergeMap((response: ResponseContext) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.dbtGenerateSyncTml(rsp))); + })); + } + + /** + * Version: 9.9.0.cl or later Generate required table and worksheet and import them. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege or `DATAMANAGEMENT` (**Can manage data**) privilege, along with an existing DBT connection. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the following data control privileges may be required: - `CAN_MANAGE_CUSTOM_CALENDAR`(**Can manage custom calendars**) - `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) - `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` (**Can manage data models**) #### About generate TML Models and Worksheets to be imported can be selected by the user as part of the API. + * @param dbtConnectionIdentifier Unique ID of the DBT connection. + * @param modelTables List of Models and their respective Tables Example: \\\'[{\\\"model_name\\\": \\\"model_name\\\", \\\"tables\\\": [\\\"table_name\\\"]}]\\\' + * @param importWorksheets Mention the worksheet tmls to import + * @param worksheets List of worksheets is mandatory when import_Worksheets is type SELECTED Example: [\\\"worksheet_name\\\"] + * @param fileContent Upload DBT Manifest and Catalog artifact files as a ZIP file. This field is mandatory if the connection was created with import_type ‘ZIP_FILE’ + */ + public dbtGenerateTml(dbtConnectionIdentifier: string, modelTables: string, importWorksheets: string, worksheets?: string, fileContent?: HttpFile, _options?: Configuration): Observable { + const requestContextPromise = this.requestFactory.dbtGenerateTml(dbtConnectionIdentifier, modelTables, importWorksheets, worksheets, fileContent, _options); + + // build promise chain + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); + } + + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + pipe(mergeMap((response: ResponseContext) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.dbtGenerateTml(rsp))); + })); + } + + /** + * Version: 9.9.0.cl or later Gets a list of DBT connection objects by user and organization, available on the ThoughtSpot system. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege or `DATAMANAGEMENT` (**Can manage data**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the following Data control privileges may be required: - `CAN_MANAGE_CUSTOM_CALENDAR`(**Can manage custom calendars**) - `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) - `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` (**Can manage data models**) #### About search DBT connection To get details of a specific DBT connection identifier, database connection identifier, database connection name, database name, project name, project identifier, environment identifier , import type and author. + */ + public dbtSearch(_options?: Configuration): Observable> { + const requestContextPromise = this.requestFactory.dbtSearch(_options); + + // build promise chain + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); + } + + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + pipe(mergeMap((response: ResponseContext) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.dbtSearch(rsp))); + })); + } + + /** + * Version: 9.7.0.cl or later Deactivates a user account. Requires `ADMINISTRATION` (**Can administer Thoughtspot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `USER_ADMINISTRATION` (**Can manage users**) privilege is required. To deactivate a user account, the API request body must include the following information: - Username or the GUID of the user account - Base URL of the ThoughtSpot instance If the API request is successful, ThoughtSpot returns the activation URL in the response. The activation URL is valid for 14 days and can be used to re-activate the account and reset the password of the deactivated account. + * @param deactivateUserRequest + */ + public deactivateUser(deactivateUserRequest: DeactivateUserRequest, _options?: Configuration): Observable { + const requestContextPromise = this.requestFactory.deactivateUser(deactivateUserRequest, _options); + + // build promise chain + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); + } + + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + pipe(mergeMap((response: ResponseContext) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.deactivateUser(rsp))); + })); + } + + /** + * Version: 10.12.0.cl or later Deletes a [custom calendar](https://docs.thoughtspot.com/cloud/latest/connections-cust-cal). Requires `DATAMANAGEMENT` (**Can manage data**) or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your ThoughtSpot instance, the `CAN_MANAGE_CUSTOM_CALENDAR` (**Can manage custom calendars**) privilege is required. #### Usage guidelines To delete a custom calendar, specify the calendar ID as a path parameter in the request URL. + * @param calendarIdentifier Unique ID or name of the Calendar. + */ + public deleteCalendar(calendarIdentifier: string, _options?: Configuration): Observable { + const requestContextPromise = this.requestFactory.deleteCalendar(calendarIdentifier, _options); + + // build promise chain + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); + } + + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + pipe(mergeMap((response: ResponseContext) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.deleteCalendar(rsp))); + })); + } + + /** + * Version: 26.4.0.cl or later Deletes one or more collections from ThoughtSpot. #### Delete options * **delete_children**: When set to `true`, deletes the child objects (metadata items) within the collection that the user has access to. Objects that the user does not have permission to delete will be skipped. * **dry_run**: When set to `true`, performs a preview of the deletion operation without actually deleting anything. The response shows what would be deleted, allowing you to review before committing the deletion. #### Response The response includes: * **metadata_deleted**: List of metadata objects that were successfully deleted * **metadata_skipped**: List of metadata objects that were skipped due to lack of permissions or other constraints + * @param deleteCollectionRequest + */ + public deleteCollection(deleteCollectionRequest: DeleteCollectionRequest, _options?: Configuration): Observable { + const requestContextPromise = this.requestFactory.deleteCollection(deleteCollectionRequest, _options); + + // build promise chain + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); + } + + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + pipe(mergeMap((response: ResponseContext) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.deleteCollection(rsp))); + })); + } + + /** + * Version: 9.2.0.cl or later Deletes Git repository configuration from your ThoughtSpot instance. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance on your instance, the `CAN_SETUP_VERSION_CONTROL` (**Can set up version control**) privilege. + * @param deleteConfigRequest + */ + public deleteConfig(deleteConfigRequest: DeleteConfigRequest, _options?: Configuration): Observable { + const requestContextPromise = this.requestFactory.deleteConfig(deleteConfigRequest, _options); + + // build promise chain + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); + } + + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + pipe(mergeMap((response: ResponseContext) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.deleteConfig(rsp))); + })); + } + + /** + * Version: 9.2.0.cl or later **Important**: This endpoint is deprecated and will be removed from ThoughtSpot in September 2025. ThoughtSpot strongly recommends using the [Delete Connection V2](#/http/api-endpoints/connections/delete-connection-v2) endpoint to delete your connection objects. #### Usage guidelines Deletes a connection object. Requires `DATAMANAGEMENT` (**Can manage data**) and edit permissions to the connection object, or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) privilege is required. **Note**: If a connection has dependent objects, make sure you remove its associations before the delete operation. + * @param deleteConnectionRequest + */ + public deleteConnection(deleteConnectionRequest: DeleteConnectionRequest, _options?: Configuration): Observable { + const requestContextPromise = this.requestFactory.deleteConnection(deleteConnectionRequest, _options); + + // build promise chain + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); + } + + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + pipe(mergeMap((response: ResponseContext) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.deleteConnection(rsp))); + })); + } + + /** + * Version: 10.12.0.cl or later Deletes connection configuration objects. Requires `DATAMANAGEMENT` (**Can manage data**) and edit permissions to the connection object, or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) privilege is required. + * @param deleteConnectionConfigurationRequest + */ + public deleteConnectionConfiguration(deleteConnectionConfigurationRequest: DeleteConnectionConfigurationRequest, _options?: Configuration): Observable { + const requestContextPromise = this.requestFactory.deleteConnectionConfiguration(deleteConnectionConfigurationRequest, _options); + + // build promise chain + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); + } + + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + pipe(mergeMap((response: ResponseContext) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.deleteConnectionConfiguration(rsp))); + })); + } + + /** + * Version: 10.4.0.cl or later Deletes a connection object. **Note**: If a connection has dependent objects, make sure you remove its associations before the delete operation. Requires `DATAMANAGEMENT` (**Can manage data**) and edit permissions to the connection object, or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) privilege is required. + * @param connectionIdentifier Unique ID or name of the connection. + */ + public deleteConnectionV2(connectionIdentifier: string, _options?: Configuration): Observable { + const requestContextPromise = this.requestFactory.deleteConnectionV2(connectionIdentifier, _options); + + // build promise chain + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); + } + + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + pipe(mergeMap((response: ResponseContext) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.deleteConnectionV2(rsp))); + })); + } + + /** + * Version: 9.6.0.cl or later Removes the custom action specified in the API request. Requires `DEVELOPER` (**Has Developer privilege**) or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `DEVELOPER` (**Has developer privilege**) privilege is required. + * @param customActionIdentifier Unique ID or name of the custom action. + */ + public deleteCustomAction(customActionIdentifier: string, _options?: Configuration): Observable { + const requestContextPromise = this.requestFactory.deleteCustomAction(customActionIdentifier, _options); + + // build promise chain + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); + } + + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + pipe(mergeMap((response: ResponseContext) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.deleteCustomAction(rsp))); + })); + } + + /** + * Version: 9.9.0.cl or later Removes the specified DBT connection object from the ThoughtSpot system. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) or `DATAMANAGEMENT` (**Can manage data ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the following Data control privileges may be required: - `CAN_MANAGE_CUSTOM_CALENDAR`(**Can manage custom calendars**) - `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) - `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` (**Can manage data models**) + * @param dbtConnectionIdentifier Unique ID of the DBT Connection. + */ + public deleteDbtConnection(dbtConnectionIdentifier: string, _options?: Configuration): Observable { + const requestContextPromise = this.requestFactory.deleteDbtConnection(dbtConnectionIdentifier, _options); + + // build promise chain + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); + } + + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + pipe(mergeMap((response: ResponseContext) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.deleteDbtConnection(rsp))); + })); + } + + /** + * Version: 10.10.0.cl or later Deletes the configuration for the email customization. #### Pre-requisites Requires `DEVELOPER` (**has developer privilege**) or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `DEVELOPER` (**Has developer privilege**) privilege is required. **NOTE**:This endpoint in currently in beta. Contact ThoughtSpot support to enable this on your instance. #### Usage guidelines - Call the search API endpoint to get the `template_identifier` from the response. - Use that `template_identifier` as a parameter in this API request. + * @param templateIdentifier Unique ID or name of the email customization. + */ + public deleteEmailCustomization(templateIdentifier: string, _options?: Configuration): Observable { + const requestContextPromise = this.requestFactory.deleteEmailCustomization(templateIdentifier, _options); + + // build promise chain + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); + } + + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + pipe(mergeMap((response: ResponseContext) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.deleteEmailCustomization(rsp))); + })); + } + + /** + * Version: 9.0.0.cl or later Removes the specified metadata object from the ThoughtSpot system. Requires edit access to the metadata object. + * @param deleteMetadataRequest + */ + public deleteMetadata(deleteMetadataRequest: DeleteMetadataRequest, _options?: Configuration): Observable { + const requestContextPromise = this.requestFactory.deleteMetadata(deleteMetadataRequest, _options); + + // build promise chain + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); + } + + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + pipe(mergeMap((response: ResponseContext) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.deleteMetadata(rsp))); + })); + } + + /** + * Version: 9.0.0.cl or later Deletes an Org object from the ThoughtSpot system. Requires cluster administration (**Can administer Org**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `ORG_ADMINISTRATION` (**Can manage Orgs**) privilege is required. When you delete an Org, all its users and objects created in that Org context are removed. However, if the users in the deleted Org also exists in other Orgs, they are removed only from the deleted Org. + * @param orgIdentifier ID or name of the Org + */ + public deleteOrg(orgIdentifier: string, _options?: Configuration): Observable { + const requestContextPromise = this.requestFactory.deleteOrg(orgIdentifier, _options); + + // build promise chain + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); + } + + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + pipe(mergeMap((response: ResponseContext) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.deleteOrg(rsp))); + })); + } + + /** + * Version: 10.12.0.cl or later Deletes the configuration for the email customization. #### Pre-requisites Requires `DEVELOPER` (**has developer privilege**) or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `DEVELOPER` (**Has developer privilege**) privilege is required. **NOTE**:This endpoint in currently in beta. Contact ThoughtSpot support to enable this on your instance. #### Usage guidelines - Call the search API endpoint to get the `org_identifier` from the response. - Use that `org_identifier` as a parameter in this API request. + * @param deleteOrgEmailCustomizationRequest + */ + public deleteOrgEmailCustomization(deleteOrgEmailCustomizationRequest: DeleteOrgEmailCustomizationRequest, _options?: Configuration): Observable { + const requestContextPromise = this.requestFactory.deleteOrgEmailCustomization(deleteOrgEmailCustomizationRequest, _options); + + // build promise chain + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); + } + + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + pipe(mergeMap((response: ResponseContext) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.deleteOrgEmailCustomization(rsp))); + })); + } + + /** + * Version: 9.5.0.cl or later Deletes a Role object from the ThoughtSpot system. Available only if [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance. To delete a Role, the `ROLE_ADMINISTRATION` (**Can manage roles**) privilege is required. + * @param roleIdentifier Unique ID or name of the Role. ReadOnly roles cannot be deleted. + */ + public deleteRole(roleIdentifier: string, _options?: Configuration): Observable { + const requestContextPromise = this.requestFactory.deleteRole(roleIdentifier, _options); + + // build promise chain + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); + } + + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + pipe(mergeMap((response: ResponseContext) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.deleteRole(rsp))); + })); + } + + /** + * Deletes a scheduled job. Version: 9.4.0.cl or later Deletes a scheduled Liveboard job. Requires at least edit access to Liveboard or `ADMINISTRATION` (**Can administer Org**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `JOBSCHEDULING` (**Can schedule for others**) privilege is required. + * @param scheduleIdentifier Unique ID or name of the scheduled job. + */ + public deleteSchedule(scheduleIdentifier: string, _options?: Configuration): Observable { + const requestContextPromise = this.requestFactory.deleteSchedule(scheduleIdentifier, _options); + + // build promise chain + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); + } + + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + pipe(mergeMap((response: ResponseContext) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.deleteSchedule(rsp))); + })); + } + + /** + * Version: 9.0.0.cl or later Deletes a tag object from the ThoughtSpot system Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `TAGMANAGEMENT` (**Can manage tags**) privilege is required to create, edit, and delete tags. + * @param tagIdentifier Tag identifier Tag name or Tag id. + */ + public deleteTag(tagIdentifier: string, _options?: Configuration): Observable { + const requestContextPromise = this.requestFactory.deleteTag(tagIdentifier, _options); + + // build promise chain + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); + } + + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + pipe(mergeMap((response: ResponseContext) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.deleteTag(rsp))); + })); + } + + /** + * Version: 9.0.0.cl or later Deletes a user from the ThoughtSpot system. If you want to remove a user from a specific Org but not from ThoughtSpot, update the group and Org mapping properties of the user object via a POST API call to the [/api/rest/2.0/users/{user_identifier}/update](#/http/api-endpoints/users/update-user) endpoint. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `USER_ADMINISTRATION` (**Can manage users**) privilege is required. + * @param userIdentifier GUID / name of the user + */ + public deleteUser(userIdentifier: string, _options?: Configuration): Observable { + const requestContextPromise = this.requestFactory.deleteUser(userIdentifier, _options); + + // build promise chain + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); + } + + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + pipe(mergeMap((response: ResponseContext) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.deleteUser(rsp))); + })); + } + + /** + * Version: 9.0.0.cl or later Removes the specified group object from the ThoughtSpot system. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `GROUP_ADMINISTRATION` (**Can manage groups**) privilege is required. + * @param groupIdentifier GUID or name of the group. + */ + public deleteUserGroup(groupIdentifier: string, _options?: Configuration): Observable { + const requestContextPromise = this.requestFactory.deleteUserGroup(groupIdentifier, _options); + + // build promise chain + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); + } + + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + pipe(mergeMap((response: ResponseContext) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.deleteUserGroup(rsp))); + })); + } + + /** + * Delete a variable Version: 10.14.0.cl or later **Note:** This API endpoint is deprecated and will be removed from ThoughtSpot in a future release. Use [POST /api/rest/2.0/template/variables/delete](/api/rest/2.0/template/variables/delete) instead. Allows deleting a variable from ThoughtSpot. Requires ADMINISTRATION role and TENANT scope. The CAN_MANAGE_VARIABLES permission allows you to manage Formula Variables in the current organization scope. The API endpoint requires: * The variable identifier (ID or name) The operation will fail if: * The user lacks required permissions * The variable doesn\'t exist * The variable is being used by other objects + * @param identifier Unique id or name of the variable + */ + public deleteVariable(identifier: string, _options?: Configuration): Observable { + const requestContextPromise = this.requestFactory.deleteVariable(identifier, _options); + + // build promise chain + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); + } + + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + pipe(mergeMap((response: ResponseContext) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.deleteVariable(rsp))); + })); + } + + /** + * Delete variable(s) Version: 26.4.0.cl or later Allows deleting multiple variables from ThoughtSpot. Requires ADMINISTRATION role and TENANT scope. The CAN_MANAGE_VARIABLES permission allows you to manage Formula Variables in the current organization scope. The API endpoint requires: * The variable identifiers (IDs or names) The operation will fail if: * The user lacks required permissions * Any of the variables don\'t exist * Any of the variables are being used by other objects + * @param deleteVariablesRequest + */ + public deleteVariables(deleteVariablesRequest: DeleteVariablesRequest, _options?: Configuration): Observable { + const requestContextPromise = this.requestFactory.deleteVariables(deleteVariablesRequest, _options); + + // build promise chain + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); + } + + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + pipe(mergeMap((response: ResponseContext) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.deleteVariables(rsp))); + })); + } + + /** + * Version: 10.14.0.cl or later Deletes one or more webhook configurations by their unique id or name. Returns status of each deletion operation, including successfully deleted webhooks and any failures with error details. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) or `DEVELOPER` (**Has developer privilege**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, users with `CAN_MANAGE_WEBHOOKS` (**Can manage webhooks**) privilege are also authorized to perform this action. + * @param deleteWebhookConfigurationsRequest + */ + public deleteWebhookConfigurations(deleteWebhookConfigurationsRequest: DeleteWebhookConfigurationsRequest, _options?: Configuration): Observable { + const requestContextPromise = this.requestFactory.deleteWebhookConfigurations(deleteWebhookConfigurationsRequest, _options); + + // build promise chain + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); + } + + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + pipe(mergeMap((response: ResponseContext) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.deleteWebhookConfigurations(rsp))); + })); + } + + /** + * Version: 9.2.0.cl or later Allows you to deploy a commit and publish TML content to your ThoughtSpot instance. Requires at least edit access to the objects used in the deploy operation. The API deploys the head of the branch unless a `commit_id` is specified in the API request. If the branch name is not defined in the request, the default branch is considered for deploying commits. For more information, see [Git integration documentation](https://developers.thoughtspot.com/docs/git-integration). + * @param deployCommitRequest + */ + public deployCommit(deployCommitRequest: DeployCommitRequest, _options?: Configuration): Observable> { + const requestContextPromise = this.requestFactory.deployCommit(deployCommitRequest, _options); + + // build promise chain + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); + } + + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + pipe(mergeMap((response: ResponseContext) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.deployCommit(rsp))); + })); + } + + /** + * Version: 9.9.0.cl or later Exports the difference in connection metadata between CDW and ThoughtSpot Requires `DATAMANAGEMENT` (**Can manage data**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the following Data control privileges may be required: - `CAN_MANAGE_CUSTOM_CALENDAR`(**Can manage custom calendars**) - `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) - `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` (**Can manage data models**) To download the connection metadata difference between ThoughtSpot and CDW, pass the connection GUID as `connection_identifier` in the API request. + * @param connectionIdentifier GUID of the connection + */ + public downloadConnectionMetadataChanges(connectionIdentifier: string, _options?: Configuration): Observable { + const requestContextPromise = this.requestFactory.downloadConnectionMetadataChanges(connectionIdentifier, _options); + + // build promise chain + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); + } + + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + pipe(mergeMap((response: ResponseContext) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.downloadConnectionMetadataChanges(rsp))); + })); + } + + /** + * Version: 9.0.0.cl or later Exports an Answer in the given file format. You can download the Answer data as a PDF, PNG, CSV, or XLSX file. Requires at least view access to the Answer. #### Usage guidelines In the request body, specify the GUID or name of the Answer and set `file_format`. The default file format is CSV. Use the `type` parameter to specify whether the Answer being exported is a saved Answer (`SAVED`) or a pinned Answer on a Liveboard (`PINNED`). Defaults to `SAVED`. When using `PINNED`, the `metadata_identifier` must be the container id. **NOTE**: * The downloadable file returned in API response file is extensionless. Please rename the downloaded file by typing in the relevant extension. * HTML rendering is not supported for PDF exports of Answers with tables. Optionally, you can define [runtime overrides](https://developers.thoughtspot.com/docs/fetch-data-and-report-apis#_runtime_overrides) to apply to the Answer data. + * @param exportAnswerReportRequest + */ + public exportAnswerReport(exportAnswerReportRequest: ExportAnswerReportRequest, _options?: Configuration): Observable { + const requestContextPromise = this.requestFactory.exportAnswerReport(exportAnswerReportRequest, _options); + + // build promise chain + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); + } + + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + pipe(mergeMap((response: ResponseContext) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.exportAnswerReport(rsp))); + })); + } + + /** + * Version: 9.0.0.cl or later Exports a Liveboard and its visualizations in PDF, PNG, CSV, or XLSX file format. The default `file_format` is CSV. Requires at least view access to the Liveboard. #### Usage guidelines In the request body, specify the GUID or name of the Liveboard. To generate a Liveboard report with specific visualizations, add GUIDs or names of the visualizations. **NOTE**: * The downloadable file returned in API response file is extensionless. Please rename the downloaded file by typing in the relevant extension. * Optionally, you can define [runtime overrides](https://developers.thoughtspot.com/docs/fetch-data-and-report-apis#_runtime_overrides) to apply to the Answer data. * To include unsaved changes in the report, pass the `transient_pinboard_content` script generated from the `getExportRequestForCurrentPinboard` method in the Visual Embed SDK. Upon successful execution, the API returns the report with unsaved changes, including ad hoc changes to visualizations. For more information, see [Liveboard Report API](https://developers.thoughtspot.com/docs/fetch-data-and-report-apis#_liveboard_report_api). * Starting with ThoughtSpot Cloud 10.9.0.cl release, the Liveboard can be exported in the PNG format in the resolution of your choice. To enable this on your instance, contact ThoughtSpot support. When this feature is enabled, the options `include_cover_page`,`include_filter_page` within the `png_options` will not be available for PNG exports. * Starting with the ThoughtSpot Cloud 26.2.0.cl release, * Liveboards can be exported in CSV format. * All visualizations within a Liveboard can be exported as individual CSV files. * When exporting multiple visualizations or the entire Liveboard, the system returns the report as a compressed ZIP file containing the separate CSV files for each visualization. * Liveboards can also be exported in XLSX format. * All selected visualizations are consolidated into a single Excel workbook (.xlsx), with each visualization placed in its own worksheet (tab). * XLSX exports are limited to a maximum of 255 worksheets (tabs) per workbook. + * @param exportLiveboardReportRequest + */ + public exportLiveboardReport(exportLiveboardReportRequest: ExportLiveboardReportRequest, _options?: Configuration): Observable { + const requestContextPromise = this.requestFactory.exportLiveboardReport(exportLiveboardReportRequest, _options); + + // build promise chain + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); + } + + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + pipe(mergeMap((response: ResponseContext) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.exportLiveboardReport(rsp))); + })); + } + + /** + * Version: 9.0.0.cl or later Exports the [TML](https://docs.thoughtspot.com/cloud/latest/tml) representation of metadata objects in JSON or YAML format. Requires `DATADOWNLOADING` (**Can download Data**) and at least view access to the metadata object. #### Usage guidelines * You can export one or several objects by passing metadata object GUIDs in the `metadata` array. * When exporting TML content for a Liveboard or Answer object, you can set `export_associated` to `true` to retrieve TML content for underlying Worksheets, Tables, or Views, including the GUID of each object within the headers. When `export_associated` is set to `true`, consider retrieving one metadata object at a time. * Set `export_fqns` to `true` to add FQNs of the referenced objects in the TML content. For example, if you send an API request to retrieve TML for a Liveboard and its associated objects, the API returns the TML content with FQNs of the referenced Worksheet. Exporting TML with FQNs is useful if ThoughtSpot has multiple objects with the same name and you want to eliminate ambiguity when importing TML files into ThoughtSpot. It eliminates the need for adding FQNs of the referenced objects manually during the import operation. * To export only the TML of feedbacks associated with an object, set the GUID of the object as `identifier`, and set the `type` as `FEEDBACK` in the `metadata` array. * To export the TML of an object along with the feedbacks associated with it, set the GUID of the object as `identifier`, set the `type` as `LOGIAL_TABLE` in the `metadata` array, and set `export_with_associated_feedbacks` in `export_options` to true. For more information, see [TML Documentation](https://developers.thoughtspot.com/docs/tml#_export_a_tml). For more information on feedbacks, see [Feedback Documentation](https://docs.thoughtspot.com/cloud/latest/sage-feedback). + * @param exportMetadataTMLRequest + */ + public exportMetadataTML(exportMetadataTMLRequest: ExportMetadataTMLRequest, _options?: Configuration): Observable> { + const requestContextPromise = this.requestFactory.exportMetadataTML(exportMetadataTMLRequest, _options); + + // build promise chain + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); + } + + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + pipe(mergeMap((response: ResponseContext) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.exportMetadataTML(rsp))); + })); + } + + /** + * Version: 10.1.0.cl or later Exports the [TML](https://docs.thoughtspot.com/cloud/latest/tml) representation of metadata objects in JSON or YAML format. ### **Permissions Required** Requires `DATAMANAGEMENT` (**Can manage data**) and `USERMANAGEMENT` (**Can manage users**) privileges. #### **Usage Guidelines** This API is only applicable for `USER`, `GROUP`, and `ROLES` metadata types. - `batch_offset` Indicates the starting position within the complete dataset from which the API should begin returning objects. Useful for paginating results efficiently. - `batch_size` Specifies the number of objects or items to retrieve in a single request. Helps control response size for better performance. - `edoc_format` Defines the format of the TML content. The exported metadata can be in JSON or YAML format. - `export_dependent` Specifies whether to include dependent metadata objects in the export. Ensures related objects are also retrieved if needed. - `all_orgs_override` Indicates whether the export operation applies across all organizations. Useful for multi-tenant environments where cross-org exports are required. + * @param exportMetadataTMLBatchedRequest + */ + public exportMetadataTMLBatched(exportMetadataTMLBatchedRequest: ExportMetadataTMLBatchedRequest, _options?: Configuration): Observable { + const requestContextPromise = this.requestFactory.exportMetadataTMLBatched(exportMetadataTMLBatchedRequest, _options); + + // build promise chain + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); + } + + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + pipe(mergeMap((response: ResponseContext) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.exportMetadataTMLBatched(rsp))); + })); + } + + /** + * Version: 9.0.0.cl or later Fetches data from a saved Answer. Requires at least view access to the saved Answer. The `record_size` attribute determines the number of records to retrieve in an API call. For more information about pagination, record size, and maximum row limit, see [Pagination and record size settings](https://developers.thoughtspot.com/docs/fetch-data-and-report-apis#_pagination_settings_for_data_and_report_apis). + * @param fetchAnswerDataRequest + */ + public fetchAnswerData(fetchAnswerDataRequest: FetchAnswerDataRequest, _options?: Configuration): Observable { + const requestContextPromise = this.requestFactory.fetchAnswerData(fetchAnswerDataRequest, _options); + + // build promise chain + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); + } + + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + pipe(mergeMap((response: ResponseContext) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.fetchAnswerData(rsp))); + })); + } + + /** + * Version: 9.0.0.cl or later Fetches the underlying SQL query data for an Answer object. Requires at least view access to the Answer object. Upon successful execution, the API returns the SQL queries for the specified object as shown in this example: ``` { \"metadata_id\":\"8fbe44a8-46ad-4b16-8d39-184b2fada490\", \"metadata_name\":\"Total sales\", \"metadata_type\":\"ANSWER\", \"sql_queries\":[ { \"metadata_id\":\"8fbe44a8-46ad-4b16-8d39-184b2fada490\", \"metadata_name\":\"Total sales -test\", \"sql_query\":\"SELECT \\n \\\"ta_1\\\".\\\"REGION\\\" \\\"ca_1\\\", \\n \\\"ta_2\\\".\\\"PRODUCTNAME\\\" \\\"ca_2\\\", \\n \\\"ta_1\\\".\\\"STORENAME\\\" \\\"ca_3\\\", \\n CASE\\n WHEN sum(\\\"ta_3\\\".\\\"SALES\\\") IS NOT NULL THEN sum(\\\"ta_3\\\".\\\"SALES\\\")\\n ELSE 0\\n END \\\"ca_4\\\", \\n CASE\\n WHEN sum(\\\"ta_3\\\".\\\"QUANTITYPURCHASED\\\") IS NOT NULL THEN sum(\\\"ta_3\\\".\\\"QUANTITYPURCHASED\\\")\\n ELSE 0\\n END \\\"ca_5\\\"\\nFROM \\\"RETAILAPPAREL\\\".\\\"PUBLIC\\\".\\\"FACT_RETAPP_SALES\\\" \\\"ta_3\\\"\\n JOIN \\\"RETAILAPPAREL\\\".\\\"PUBLIC\\\".\\\"DIM_RETAPP_STORES\\\" \\\"ta_1\\\"\\n ON \\\"ta_3\\\".\\\"STOREID\\\" = \\\"ta_1\\\".\\\"STOREID\\\"\\n JOIN \\\"RETAILAPPAREL\\\".\\\"PUBLIC\\\".\\\"DIM_RETAPP_PRODUCTS\\\" \\\"ta_2\\\"\\n ON \\\"ta_3\\\".\\\"PRODUCTID\\\" = \\\"ta_2\\\".\\\"PRODUCTID\\\"\\nGROUP BY \\n \\\"ca_1\\\", \\n \\\"ca_2\\\", \\n \\\"ca_3\\\"\\n\" } ] } ``` + * @param fetchAnswerSqlQueryRequest + */ + public fetchAnswerSqlQuery(fetchAnswerSqlQueryRequest: FetchAnswerSqlQueryRequest, _options?: Configuration): Observable { + const requestContextPromise = this.requestFactory.fetchAnswerSqlQuery(fetchAnswerSqlQueryRequest, _options); + + // build promise chain + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); + } + + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + pipe(mergeMap((response: ResponseContext) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.fetchAnswerSqlQuery(rsp))); + })); + } + + /** + * Version: 10.4.0.cl or later Gets information about the status of the TML async import task scheduled using the `/api/rest/2.0/metadata/tml/async/import` API call. To fetch the task details, specify the ID of the TML async import task. Requires access to the task ID. The API allows users who initiated the asynchronous TML import via `/api/rest/2.0/metadata/tml/async/import` to view the status of their tasks. Users with administration privilege can view the status of all import tasks initiated by the users in their Org. #### Usage guidelines See [TML API Documentation](https://developers.thoughtspot.com/docs/tml#_fetch_status_of_the_tml_import_task) for usage guidelines. + * @param fetchAsyncImportTaskStatusRequest + */ + public fetchAsyncImportTaskStatus(fetchAsyncImportTaskStatusRequest: FetchAsyncImportTaskStatusRequest, _options?: Configuration): Observable { + const requestContextPromise = this.requestFactory.fetchAsyncImportTaskStatus(fetchAsyncImportTaskStatusRequest, _options); + + // build promise chain + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); + } + + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + pipe(mergeMap((response: ResponseContext) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.fetchAsyncImportTaskStatus(rsp))); + })); + } + + /** + * Version: 10.12.0.cl or later Fetches column security rules for specified tables. This API endpoint retrieves column-level security rules configured for tables. It returns information about which columns are secured and which groups have access to those columns. #### Usage guidelines - Provide an array of table identifiers using either `identifier` (GUID or name) or `obj_identifier` (object ID) - At least one of `identifier` or `obj_identifier` must be provided for each table - The API returns column security rules for all specified tables - Users must have appropriate permissions to access security rules for the specified tables #### Required permissions - `ADMINISTRATION` - Can administer ThoughtSpot - `DATAMANAGEMENT` - Can manage data - `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` - Can manage worksheet views and tables #### Example request ```json { \"tables\": [ { \"identifier\": \"table-guid\", \"obj_identifier\": \"table-object-id\" } ] } ``` #### Response format The API returns an array of `ColumnSecurityRuleResponse` objects wrapped in a `data` field. Each `ColumnSecurityRuleResponse` object contains: - Table information (GUID and object ID) - Array of column security rules with column details, group access, and source table information #### Example response ```json { \"data\": [ { \"guid\": \"table-guid\", \"objId\": \"table-object-id\", \"columnSecurityRules\": [ { \"column\": { \"id\": \"col_123\", \"name\": \"Salary\" }, \"groups\": [ { \"id\": \"group_1\", \"name\": \"HR Department\" } ], \"sourceTableDetails\": { \"id\": \"source-table-guid\", \"name\": \"Employee_Data\" } } ] } ] } ``` + * @param fetchColumnSecurityRulesRequest + */ + public fetchColumnSecurityRules(fetchColumnSecurityRulesRequest: FetchColumnSecurityRulesRequest, _options?: Configuration): Observable> { + const requestContextPromise = this.requestFactory.fetchColumnSecurityRules(fetchColumnSecurityRulesRequest, _options); + + // build promise chain + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); + } + + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + pipe(mergeMap((response: ResponseContext) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.fetchColumnSecurityRules(rsp))); + })); + } + + /** + * Version: 9.9.0.cl or later Validates the difference in connection metadata between CDW and ThoughtSpot. Requires `DATAMANAGEMENT` (**Can manage data**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the following Data control privileges may be required: - `CAN_MANAGE_CUSTOM_CALENDAR`(**Can manage custom calendars**) - `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) - `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` (**Can manage data models**) Returns a boolean indicating whether there is any difference between the connection metadata at ThoughtSpot and CDW. To get the connection metadata difference status, pass the connection GUID as `connection_identifier` in the API request. + * @param connectionIdentifier GUID of the connection + */ + public fetchConnectionDiffStatus(connectionIdentifier: string, _options?: Configuration): Observable { + const requestContextPromise = this.requestFactory.fetchConnectionDiffStatus(connectionIdentifier, _options); + + // build promise chain + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); + } + + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + pipe(mergeMap((response: ResponseContext) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.fetchConnectionDiffStatus(rsp))); + })); + } + + /** + * Version: 9.0.0.cl or later Gets data from a Liveboard object and its visualization. Requires at least view access to the Liveboard. #### Usage guidelines In the request body, specify the GUID or name of the Liveboard. To get data for specific visualizations, add the GUIDs or names of the visualizations in the API request. To include unsaved changes in the report, pass the `transient_pinboard_content` script generated from the `getExportRequestForCurrentPinboard` method in the Visual Embed SDK. Upon successful execution, the API returns the report with unsaved changes. If the new Liveboard experience mode, the transient content includes ad hoc changes to visualizations such as sorting, toggling of legends, and data drill down. For more information, and see [Liveboard data API](https://developers.thoughtspot.com/docs/fetch-data-and-report-apis#_fetch_liveboard_data_api). + * @param fetchLiveboardDataRequest + */ + public fetchLiveboardData(fetchLiveboardDataRequest: FetchLiveboardDataRequest, _options?: Configuration): Observable { + const requestContextPromise = this.requestFactory.fetchLiveboardData(fetchLiveboardDataRequest, _options); + + // build promise chain + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); + } + + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + pipe(mergeMap((response: ResponseContext) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.fetchLiveboardData(rsp))); + })); + } + + /** + * Version: 9.0.0.cl or later Fetches the underlying SQL query data for a Liveboard object and its visualizations. Requires at least view access to the Liveboard object. To get SQL query data for a Liveboard, specify the GUID of the Liveboard. Optionally, you can add an array of visualization GUIDs to retrieve the SQL query data for visualizations in the Liveboard. Upon successful execution, the API returns the SQL queries for the specified object as shown in this example: ``` { \"metadata_id\": \"fa68ae91-7588-4136-bacd-d71fb12dda69\", \"metadata_name\": \"Total Sales\", \"metadata_type\": \"LIVEBOARD\", \"sql_queries\": [ { \"metadata_id\": \"b3b6d2b9-089a-490c-8e16-b144650b7843\", \"metadata_name\": \"Total quantity purchased, Total sales by region\", \"sql_query\": \"SELECT \\n \\\"ta_1\\\".\\\"REGION\\\" \\\"ca_1\\\", \\n CASE\\n WHEN sum(\\\"ta_2\\\".\\\"QUANTITYPURCHASED\\\") IS NOT NULL THEN sum(\\\"ta_2\\\".\\\"QUANTITYPURCHASED\\\")\\n ELSE 0\\n END \\\"ca_2\\\", \\n CASE\\n WHEN sum(\\\"ta_2\\\".\\\"SALES\\\") IS NOT NULL THEN sum(\\\"ta_2\\\".\\\"SALES\\\")\\n ELSE 0\\n END \\\"ca_3\\\"\\nFROM \\\"RETAILAPPAREL\\\".\\\"PUBLIC\\\".\\\"FACT_RETAPP_SALES\\\" \\\"ta_2\\\"\\n JOIN \\\"RETAILAPPAREL\\\".\\\"PUBLIC\\\".\\\"DIM_RETAPP_STORES\\\" \\\"ta_1\\\"\\n ON \\\"ta_2\\\".\\\"STOREID\\\" = \\\"ta_1\\\".\\\"STOREID\\\"\\nGROUP BY \\\"ca_1\\\"\" } ] } ``` + * @param fetchLiveboardSqlQueryRequest + */ + public fetchLiveboardSqlQuery(fetchLiveboardSqlQueryRequest: FetchLiveboardSqlQueryRequest, _options?: Configuration): Observable { + const requestContextPromise = this.requestFactory.fetchLiveboardSqlQuery(fetchLiveboardSqlQueryRequest, _options); + + // build promise chain + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); + } + + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + pipe(mergeMap((response: ResponseContext) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.fetchLiveboardSqlQuery(rsp))); + })); + } + + /** + * Version: 9.0.0.cl or later Fetches security audit logs. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the [Admin Control](https://developers.thoughtspot.com/docs/rbac#_admin_control) privileges are required. #### Usage guidelines By default, the API retrieves logs for the last 24 hours. You can set a custom duration in EPOCH time. Make sure the log duration specified in your API request doesn’t exceed 24 hours. If you must fetch logs for a longer time range, modify the duration and make multiple sequential API requests. Upon successful execution, the API returns logs with the following information: * timestamp of the event * event ID * event type * name and GUID of the user * IP address of ThoughtSpot instance For more information see [Audit logs Documentation](https://developers.thoughtspot.com/docs/audit-logs). + * @param fetchLogsRequest + */ + public fetchLogs(fetchLogsRequest: FetchLogsRequest, _options?: Configuration): Observable> { + const requestContextPromise = this.requestFactory.fetchLogs(fetchLogsRequest, _options); + + // build promise chain + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); + } + + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + pipe(mergeMap((response: ResponseContext) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.fetchLogs(rsp))); + })); + } + + /** + * Version: 26.3.0.cl or later This API fetches the object privileges present for the given list of principals (user or group), on the given set of objects. It supports pagination, which can be enabled and configured using the request parameters. It provides users access to certain features based on privilege based access control. #### Usage guidelines - Specify the `type` (`USER` or `USER_GROUP`) and `identifier` (either GUID or name) of the principals for which you want to retrieve object privilege information in the `principals` array. - Specify the `type` (`LOGICAL_TABLE`) and `identifier` (either GUID or name) of the metadata objects for which you want to retrieve object privilege information in the `metadata` array. Only `LOGICAL_TABLE` metadata type is supported for now. It may be extended for other metadata types in future. - To control the offset from where principals have to be fetched, use `record_offset`. When `record_offset` is 0, information is fetched from the beginning. - To control the number of principals to be fetched, use `record_size`. Default `record_size` is 20. - Ensure `record_offset` for a subsequent request is one more than the value of `record_size` of the previous request. - Ensure using correct Authorization Bearer Token corresponding to specific user & org. #### Example request ```json { \"principals\": [ { \"type\": \"type-1\", \"identifier\": \"principal-guid-or-name-1\" }, { \"type\": \"type-2\", \"identifier\": \"principal-guid-or-name-2\" } ], \"metadata\": [ { \"type\": \"metadata-type-1\", \"identifier\": \"metadata-guid-or-name-1\" }, { \"type\": \"metadata-type-2\", \"identifier\": \"metadata-guid-or-name-2\" } ], \"record_offset\": 0, \"record_size\": 20 } ``` #### Response format The API returns an array of `metadata_object_privileges` objects wrapped in JSON. Each `metadata_object_privileges` object contains: - Metadata information (GUID, name and type) - Array of `principal_object_privilege_info`. - Each `principal_object_privilege_info` contains: - Principal type. All principals of this type are listed as described below. - Array of `principal_object_privileges`. - Each `principal_object_privileges` contains: - Principal information (GUID, name, subtype) - List of applied object level privileges. #### Example response ```json { \"metadata_object_privileges\": [ { \"metadata_id\": \"metadata-guid-1\", \"metadata_name\": \"metadata-name-1\", \"metadata_type\": \"metadata-type-1\", \"principal_object_privilege_info\": [ { \"principal_type\": \"principal-type-1\", \"principal_object_privileges\": [ { \"principal_id\": \"principal-guid-1\", \"principal_name\": \"principal-name-1\", \"principal_sub_type\": \"principal-sub-type-1\", \"object_privileges\": \"[object-privilege-1, object-privilege-2]\" }, { \"principal_id\": \"principal-guid-2\", \"principal_name\": \"principal-name-2\", \"principal_sub_type\": \"principal-sub-type-2\", \"object_privileges\": \"[object-privilege-1, object-privilege-2]\" } ] }, { \"principal_type\": \"principal-type-2\", \"principal_object_privileges\": [ { \"principal_id\": \"principal-guid-3\", \"principal_name\": \"principal-guid-4\", \"principal_sub_type\": \"principal-sub-type-4\", \"object_privileges\": \"[object-privilege-1]\" } ] } ] }, { \"metadata_id\": \"metadata-guid-2\", \"metadata_name\": \"metadata-name-2\", \"metadata_type\": \"metadata-type-2\", \"principal_object_privilege_info\": [ { \"principal_type\": \"principal-type-1\", \"principal_object_privileges\": [ { \"principal_id\": \"principal-guid-1\", \"principal_name\": \"principal-name-1\", \"principal_sub_type\": \"principal-sub-type-1\", \"object_privileges\": \"[object-privilege-3, object-privilege-4]\" }, { \"principal_id\": \"principal-guid-2\", \"principal_name\": \"principal-name-2\", \"principal_sub_type\": \"principal-sub-type-2\", \"object_privileges\": \"[object-privilege-4]\" } ] } ] } ] } ``` + * @param fetchObjectPrivilegesRequest + */ + public fetchObjectPrivileges(fetchObjectPrivilegesRequest: FetchObjectPrivilegesRequest, _options?: Configuration): Observable { + const requestContextPromise = this.requestFactory.fetchObjectPrivileges(fetchObjectPrivilegesRequest, _options); + + // build promise chain + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); + } + + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + pipe(mergeMap((response: ResponseContext) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.fetchObjectPrivileges(rsp))); + })); + } + + /** + * Version: 9.0.0.cl or later Fetches object permission details for a given principal object such as a user and group. Requires view access to the metadata object. #### Usage guidelines * To get a list of all metadata objects that a user or group can access, specify the `type` and GUID or name of the principal. * To get permission details for a specific object, add the `type` and GUID or name of the metadata object to your API request. Upon successful execution, the API returns a list of metadata objects and permission details for each object. + * @param fetchPermissionsOfPrincipalsRequest + */ + public fetchPermissionsOfPrincipals(fetchPermissionsOfPrincipalsRequest: FetchPermissionsOfPrincipalsRequest, _options?: Configuration): Observable { + const requestContextPromise = this.requestFactory.fetchPermissionsOfPrincipals(fetchPermissionsOfPrincipalsRequest, _options); + + // build promise chain + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); + } + + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + pipe(mergeMap((response: ResponseContext) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.fetchPermissionsOfPrincipals(rsp))); + })); + } + + /** + * Version: 9.0.0.cl or later Fetches permission details for a given metadata object. Requires view access to the metadata object. #### Usage guidelines * To fetch a list of users and groups for a metadata object, specify `type` and GUID or name of the metadata object. * To get permission details for a specific user or group, add `type` and GUID or name of the principal object to your API request. Upon successful execution, the API returns permission details and principal information for the object specified in the API request. + * @param fetchPermissionsOnMetadataRequest + */ + public fetchPermissionsOnMetadata(fetchPermissionsOnMetadataRequest: FetchPermissionsOnMetadataRequest, _options?: Configuration): Observable { + const requestContextPromise = this.requestFactory.fetchPermissionsOnMetadata(fetchPermissionsOnMetadataRequest, _options); + + // build promise chain + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); + } + + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + pipe(mergeMap((response: ResponseContext) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.fetchPermissionsOnMetadata(rsp))); + })); + } + + /** + * Version: 9.0.0.cl or later Enforces logout on current user sessions. Use this API with caution as it may invalidate active user sessions and force users to re-login. Make sure you specify the usernames or GUIDs. If you pass null values in the API call, all user sessions on your cluster become invalid, and the users are forced to re-login. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `USER_ADMINISTRATION` (**Can manage users**) privilege is required. + * @param forceLogoutUsersRequest + */ + public forceLogoutUsers(forceLogoutUsersRequest: ForceLogoutUsersRequest, _options?: Configuration): Observable { + const requestContextPromise = this.requestFactory.forceLogoutUsers(forceLogoutUsersRequest, _options); + + // build promise chain + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); + } + + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + pipe(mergeMap((response: ResponseContext) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.forceLogoutUsers(rsp))); + })); + } + + /** + * Version: 10.12.0.cl or later Exports a [custom calendar](https://docs.thoughtspot.com/cloud/latest/connections-cust-cal) in the CSV format. Requires `DATAMANAGEMENT` (**Can manage data**) or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your ThoughtSpot instance, the `CAN_MANAGE_CUSTOM_CALENDAR` (**Can manage custom calendars**) privilege is required. #### Usage guidelines Use this API to download a custom calendar in the CSV file format. In your API request, specify the following parameters. * Start and end date of the calendar. For \"month offset\" calendars, the start date must match the month defined in the `month_offset` attribute. You can also specify optional parameters such as the starting day of the week and prefixes for the quarter and year labels. + * @param generateCSVRequest + */ + public generateCSV(generateCSVRequest: GenerateCSVRequest, _options?: Configuration): Observable { + const requestContextPromise = this.requestFactory.generateCSV(generateCSVRequest, _options); + + // build promise chain + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); + } + + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + pipe(mergeMap((response: ResponseContext) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.generateCSV(rsp))); + })); + } + + /** + * Version: 9.0.0.cl or later Retrieves details of the current user session for the token provided in the request header. Any ThoughtSpot user can access this endpoint and send an API request. The data returned in the API response varies according to user\'s privilege and object access permissions. **NOTE**: In ThoughtSpot, users with cluster administration privileges can access all Orgs by default. However, unless the administrator is explicitly added to an Org, the Orgs list in the session information returned by the API will include only the Primary Org. To include other Orgs in the API response, you must explicitly add the administrator to each Org in the Admin settings page in the UI or via user REST API. + */ + public getCurrentUserInfo(_options?: Configuration): Observable { + const requestContextPromise = this.requestFactory.getCurrentUserInfo(_options); + + // build promise chain + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); + } + + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + pipe(mergeMap((response: ResponseContext) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.getCurrentUserInfo(rsp))); + })); + } + + /** + * Version: 9.4.0.cl or later Retrieves details of the current session token for the bearer token provided in the request header. This API endpoint does not create a new token. Instead, it returns details about the token, including the token string, creation time, expiration time, and the associated user. Use this endpoint to introspect your current session token, debug authentication issues, or when a frontend application needs session token details. Any ThoughtSpot user with a valid bearer token can access this endpoint and send an API request + */ + public getCurrentUserToken(_options?: Configuration): Observable { + const requestContextPromise = this.requestFactory.getCurrentUserToken(_options); + + // build promise chain + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); + } + + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + pipe(mergeMap((response: ResponseContext) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.getCurrentUserToken(rsp))); + })); + } + + /** + * Version: 10.4.0.cl or later Creates an authentication token that provides values for the formula variables in the Row Level Security (RLS) rules for a given user. Recommended for use cases that require Attribute-based access control (ABAC) via RLS. #### Required privileges To add a new user and assign privileges during auto-creation, the `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege is required. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled, the `CONTROL_TRUSTED_AUTH` (**Can Enable or Disable Trusted Authentication**) privilege and edit access to the data source are required. To configure formula variables for all Orgs on your instance or the Primary Org, cluster administration privileges are required. Org administrators can configure formula variables for their respective Orgs. If Role-Based Access Control (RBAC) is enabled, users with the `CAN_MANAGE_VARIABLES` (**Can manage variables**) role privilege can also create and manage variables for their Org context. #### Usage guidelines You can generate a token by providing a `username` and `password`, or by using a `secret_key`. To generate a `secret_key`, the administrator must enable [Trusted authentication](https://developers.thoughtspot.com/docs/trusted-auth-secret-key) in the **Develop** > **Customizations** > **Security Settings** page. **Note**: * When both `password` and `secret_key` are included in the API request, `password` takes precedence. * If [Multi-Factor Authentication (MFA)](https://docs.thoughtspot.com/cloud/latest/authentication-local-mfa) is enabled on your instance, the API login request with `username` and `password` returns an error. You can switch to token-based authentication with `secret_key` or contact ThoughtSpot Support for assistance. The token obtained from ThoughtSpot is valid for 5 minutes by default. You can configure the token expiration time as required. #### ABAC via RLS To implement ABAC via RLS and assign security entitlements to users during session creation, generate a token with custom variable values. The values set in the authentication token are applied to the formula variables referenced in RLS rules at the table level, which determines the data each user can access based on their entitlements. The variable values can be configured to persist for a specific set of Models in user sessions initiated with the token, allowing different RLS rules to be set for different data models. Once defined, the rules are added to the user\'s `variable_values` object, after which all sessions will use the persisted values. For more information, see [ABAC via tokens Documentation](https://developers.thoughtspot.com/docs/abac-via-rls-variables). ##### Formula variables Before defining variable values, ensure the variables are created and available on your instance. To create a formula variable, you can use the **Create variable** (`/api/rest/2.0/template/variables/create`) REST API endpoint, with the variable `type` set as `Formula_Variable` in the API request. The API doesn\'t support `\"persist_option\": \"RESET\"` and `\"persist_option\": \"NONE\"` when `variable_values` are defined in the request. If you are using `variable_values` for token generation, you must use other supported persist options such as `APPEND` or `REPLACE`. If you want to use `RESET` or `NONE`, do not pass any `variable_values`. In such cases, `variable_values` will remain unaffected. #### Supported objects The supported object type is `LOGICAL_TABLE`. When using `object_id` with `variable_values`, models are supported. #### Just-in-time provisioning For [just-in-time user creation and provisioning](https://developers.thoughtspot.com/docs/just-in-time-provisioning), specify the following attributes in the API request: * `auto_create` * `username` * `display_name` * `email` * `groups` Set `auto_create` to `true` if the username does not exist in ThoughtSpot. If the username already exists in ThoughtSpot and `auto_create` is set to `true`, user properties such as display name, email, Org and group entitlements will not be updated with new values. Setting `auto_create` to `true` does not create formula variables. Hence, this setting will not be applicable to `variable_values`. #### Important point to note All options in the token creation APIs that define user access to data in ThoughtSpot will take effect during token creation, not when the token is used for authentication. For example, `auto_create:true` will create the user when the authentication token is created. Persist options such as `APPEND` and `REPLACE` will persist `variable_values` on the user profile when the token is created. + * @param getCustomAccessTokenRequest + */ + public getCustomAccessToken(getCustomAccessTokenRequest: GetCustomAccessTokenRequest, _options?: Configuration): Observable { + const requestContextPromise = this.requestFactory.getCustomAccessToken(getCustomAccessTokenRequest, _options); + + // build promise chain + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); + } + + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + pipe(mergeMap((response: ResponseContext) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.getCustomAccessToken(rsp))); + })); + } + + /** + * Version: 10.15.0.cl or later Suggests the most relevant data sources for a given natural language query, ranked by confidence with LLM-generated reasoning. Requires `CAN_USE_SPOTTER` privilege and at least view-level access to the underlying metadata entities referenced in the response. #### Usage guidelines The request must include: - `query`: the natural language question to find relevant data sources for If the request is successful, the API returns a ranked list of suggested data sources, each containing: - `confidence`: a float score indicating the model\'s confidence in the relevance of the suggestion - `details`: metadata about the data source - `data_source_identifier`: the unique ID of the data source - `data_source_name`: the display name of the data source - `description`: a description of the data source - `reasoning`: LLM-generated rationale explaining why the data source was recommended #### Error responses | Code | Description | |------|--------------------------------------------------------------------------------------------------------------------------------------------| | 401 | Unauthorized — authentication token is missing, expired, or invalid. | | 403 | Forbidden — the authenticated user does not have `CAN_USE_SPOTTER` privilege or lacks view permission on the underlying metadata entities. | > ###### Note: > * This endpoint is currently in Beta. Breaking changes may be introduced before it is made Generally Available. > * This endpoint requires Spotter — please contact ThoughtSpot Support to enable Spotter on your cluster. + * @param getDataSourceSuggestionsRequest + */ + public getDataSourceSuggestions(getDataSourceSuggestionsRequest: GetDataSourceSuggestionsRequest, _options?: Configuration): Observable { + const requestContextPromise = this.requestFactory.getDataSourceSuggestions(getDataSourceSuggestionsRequest, _options); + + // build promise chain + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); + } + + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + pipe(mergeMap((response: ResponseContext) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.getDataSourceSuggestions(rsp))); + })); + } + + /** + * Version: 9.0.0.cl or later Generates an authentication token for creating a full session in ThoughtSpot for a given user. Recommended for use cases that do not require Attribute-based access control (ABAC) via Row Level Security (RLS). #### Usage guidelines You can generate a token for a user by providing a `username` and `password`, or by using the `secret_key` generated for your instance. To generate a `secret_key`, the administrator must enable [Trusted authentication](https://developers.thoughtspot.com/docs/trusted-auth-secret-key) in the **Develop** > **Customizations** > **Security Settings** page. **Note**: * When both `password` and `secret_key` are included in the API request, `password` takes precedence. * If [Multi-Factor Authentication (MFA)](https://docs.thoughtspot.com/cloud/latest/authentication-local-mfa) is enabled on your instance, the API login request with `username` and `password` returns an error. You can switch to token-based authentication with `secret_key` or contact ThoughtSpot Support for assistance. The token obtained from ThoughtSpot is valid for 5 minutes by default. You can configure the token expiration time as required. #### Just-in-time provisioning For [just-in-time user creation and provisioning](https://developers.thoughtspot.com/docs/just-in-time-provisioning), specify the following attributes in the API request: * `auto_create` * `username` * `display_name` * `email` * `group_identifiers` Set `auto_create` to `true` if the username does not exist in ThoughtSpot. If the user already exists in ThoughtSpot and `auto_create` is set to `true`, user properties such as display name, email and group assignment will be updated. To add a new user and assign privileges during auto-creation, the `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege is required. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled, the `CONTROL_TRUSTED_AUTH` (**Can Enable or Disable Trusted Authentication**) privilege is required. #### Important point to note All options in the token creation APIs that define user access to data in ThoughtSpot will take effect during token creation, not when the token is used for authentication. For example, `auto_create:true` will create the user when the authentication token is created. + * @param getFullAccessTokenRequest + */ + public getFullAccessToken(getFullAccessTokenRequest: GetFullAccessTokenRequest, _options?: Configuration): Observable { + const requestContextPromise = this.requestFactory.getFullAccessToken(getFullAccessTokenRequest, _options); + + // build promise chain + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); + } + + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + pipe(mergeMap((response: ResponseContext) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.getFullAccessToken(rsp))); + })); + } + + /** + * Version: 10.15.0.cl or later Retrieves existing natural language (NL) instructions configured for a specific data model. These instructions guide the AI system in understanding data context and generating more accurate responses. Requires `CAN_USE_SPOTTER` privilege, at least view access on the data model, and a bearer token corresponding to the org where the data model exists. #### Usage guidelines The request must include: - `data_source_identifier`: the unique ID of the data model to retrieve instructions for If the request is successful, the API returns: - `nl_instructions_info`: an array of instruction objects, each containing: - `instructions`: the configured text instructions for AI processing - `scope`: the scope of the instruction — currently only `GLOBAL` is supported #### Instructions scope - **GLOBAL**: Instructions that apply globally across the system on the given data-model (currently only global instructions are supported) #### Error responses | Code | Description | |------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| | 401 | Unauthorized — authentication token is missing, expired, or invalid. | | 403 | Forbidden — the authenticated user does not have `CAN_USE_SPOTTER` privilege, lacks view access on the data model, or the bearer token does not correspond to the org where the data model exists. | > ###### Note: > > - To use this API, the user needs at least view access on the data model, and must use the bearer token corresponding to the org where the data model exists. > - This endpoint is currently in Beta. Breaking changes may be introduced before the endpoint is made Generally Available. > - Available from version 10.15.0.cl and later. > - This endpoint requires Spotter — please contact ThoughtSpot Support to enable Spotter on your cluster. > - Use this API to review currently configured instructions before modifying them with `setNLInstructions`. + * @param getNLInstructionsRequest + */ + public getNLInstructions(getNLInstructionsRequest: GetNLInstructionsRequest, _options?: Configuration): Observable { + const requestContextPromise = this.requestFactory.getNLInstructions(getNLInstructionsRequest, _options); + + // build promise chain + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); + } + + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + pipe(mergeMap((response: ResponseContext) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.getNLInstructions(rsp))); + })); + } + + /** + * Version: 9.0.0.cl or later Generates an authentication token that provides access to a specific metadata object. This object list is intersected with the list of objects the user is allowed to access via group membership. For more information, see [Object security](https://docs.thoughtspot.com/cloud/latest/security-data-object#object_security). #### Usage guidelines You can generate a token for a user by providing a `username` and `password`, or by using the `secret_key` generated for your instance. To generate a `secret_key`, the administrator must enable [Trusted authentication](https://developers.thoughtspot.com/docs/trusted-auth-secret-key) in the **Develop** > **Customizations** > **Security Settings** page. **Note**: * When both `password` and `secret_key` are included in the API request, `password` takes precedence. * If [Multi-Factor Authentication (MFA)](https://docs.thoughtspot.com/cloud/latest/authentication-local-mfa) is enabled on your instance, the API login request with `username` and `password` returns an error. You can switch to token-based authentication with `secret_key` or contact ThoughtSpot Support for assistance. The token obtained from ThoughtSpot is valid for 5 minutes by default. You can configure the token expiration time as required. #### Just-in-time provisioning For [just-in-time user creation and provisioning](https://developers.thoughtspot.com/docs/just-in-time-provisioning), specify the following attributes in the API request: * `auto_create` * `username` * `display_name` * `email` * `group_identifiers` Set `auto_create` to `true` if the user is not available in ThoughtSpot. If the user already exists in ThoughtSpot and the `auto_create` parameter is set to `true`, user properties such as display name, email, and group assignment will be updated. To add a new user and assign privileges, the `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege is required. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled, the `CONTROL_TRUSTED_AUTH`(**Can Enable or Disable Trusted Authentication**) privilege is required. #### Important point to note All options in the token creation APIs that define user access to data in ThoughtSpot will take effect during token creation, not when the token is used for authentication. For example, `auto_create:true` will create the user when the authentication token is created. + * @param getObjectAccessTokenRequest + */ + public getObjectAccessToken(getObjectAccessTokenRequest: GetObjectAccessTokenRequest, _options?: Configuration): Observable { + const requestContextPromise = this.requestFactory.getObjectAccessToken(getObjectAccessTokenRequest, _options); + + // build promise chain + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); + } + + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + pipe(mergeMap((response: ResponseContext) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.getObjectAccessToken(rsp))); + })); + } + + /** + * Version: 10.13.0.cl or later Breaks down a natural language query into a series of smaller analytical sub-questions, each mapped to a relevant data source. Requires `CAN_USE_SPOTTER` privilege and at least view-level access to the referenced metadata objects. #### Usage guidelines The request must include: - `query`: the natural language question to decompose into analytical sub-questions - `metadata_context`: at least one of the following context identifiers to guide question generation: - `conversation_identifier` — an existing conversation session ID - `answer_identifiers` — a list of Answer GUIDs - `liveboard_identifiers` — a list of Liveboard GUIDs - `data_source_identifiers` — a list of data source GUIDs Optional parameters for refining the output: - `ai_context`: additional context to improve response quality - `content` — supplementary text or CSV data as string input - `instructions` — custom text instructions for the AI system - `limit_relevant_questions`: maximum number of questions to return (default: `5`) - `bypass_cache`: if `true`, forces fresh computation instead of returning cached results If the request is successful, the API returns a list of relevant analytical questions, each containing: - `query`: the generated sub-question - `data_source_identifier`: the unique ID of the data source the question targets - `data_source_name`: the display name of the corresponding data source #### Error responses | Code | Description | |------|---------------------------------------------------------------------------------------------------------------------------------------| | 401 | Unauthorized — authentication token is missing, expired, or invalid. | | 403 | Forbidden — the authenticated user does not have `CAN_USE_SPOTTER` privilege or lacks view access to the referenced metadata objects. | > ###### Note: > * This endpoint is currently in Beta. Breaking changes may be introduced before the endpoint is made Generally Available. > * This endpoint requires Spotter - please contact ThoughtSpot support to enable Spotter on your cluster. + * @param getRelevantQuestionsRequest + */ + public getRelevantQuestions(getRelevantQuestionsRequest: GetRelevantQuestionsRequest, _options?: Configuration): Observable { + const requestContextPromise = this.requestFactory.getRelevantQuestions(getRelevantQuestionsRequest, _options); + + // build promise chain + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); + } + + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + pipe(mergeMap((response: ResponseContext) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.getRelevantQuestions(rsp))); + })); + } + + /** + * Version: 9.0.0.cl or later Retrieves the current configuration details of the cluster. If the request is successful, the API returns a list configuration settings applied on the cluster. Requires `ADMINISTRATION`(**Can administer ThoughtSpot**) privilege to view these complete configuration settings of the cluster. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `SYSTEM_INFO_ADMINISTRATION` (**Can view system activities**) privilege is required. This API does not require any parameters to be passed in the request. + */ + public getSystemConfig(_options?: Configuration): Observable { + const requestContextPromise = this.requestFactory.getSystemConfig(_options); + + // build promise chain + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); + } + + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + pipe(mergeMap((response: ResponseContext) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.getSystemConfig(rsp))); + })); + } + + /** + * Version: 9.0.0.cl or later Gets system information such as the release version, locale, time zone, deployment environment, date format, and date time format of the cluster. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privileges. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `SYSTEM_INFO_ADMINISTRATION` (**Can view system activities**) privilege is required. This API does not require any parameters to be passed in the request. + */ + public getSystemInformation(_options?: Configuration): Observable { + const requestContextPromise = this.requestFactory.getSystemInformation(_options); + + // build promise chain + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); + } + + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + pipe(mergeMap((response: ResponseContext) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.getSystemInformation(rsp))); + })); + } + + /** + * Version: 9.2.0.cl or later Gets a list of configuration overrides applied on the cluster. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `APPLICATION_ADMINISTRATION` (**Can manage application settings**) privilege is required. This API does not require any parameters to be passed in the request. + */ + public getSystemOverrideInfo(_options?: Configuration): Observable { + const requestContextPromise = this.requestFactory.getSystemOverrideInfo(_options); + + // build promise chain + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); + } + + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + pipe(mergeMap((response: ResponseContext) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.getSystemOverrideInfo(rsp))); + })); + } + + /** + * Version: 9.0.0.cl or later Imports [TML](https://docs.thoughtspot.com/cloud/latest/tml) files into ThoughtSpot. Requires `DATAMANAGEMENT` (**Can manage data**) or `ADMINISTRATION` (**Can administer ThoughtsSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the following Data control privileges may be required: - `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) - `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` (**Can manage data models**) #### Usage guidelines * Import all related objects in a single TML Import API call. For example, Tables that use the same Connection object and Worksheets connected to these Tables. * Include the `fqn` property to distinguish objects that have the same name. For example, if you have multiple Connections or Worksheets with the same name on ThoughtSpot and the Connection or Worksheet referenced in your TML file does not have a unique name to distinguish, it may result in invalid object references. Adding `fqn` helps ThoughtSpot differentiate a Table from another with the same name. We recommend [exporting TML with FQNs](#/http/api-endpoints/metadata/export-metadata-tml) and using these during the import operation. * You can upload multiple TML files at a time. If you import a Worksheet along with Liveboards, Answers, and other dependent objects in a single API call, the imported objects will be immediately available for use. When you import only a Worksheet object, it may take some time for the Worksheet to become available in the ThoughtSpot system. Please wait for a few minutes, and then proceed to create an Answer and Liveboard from the newly imported Worksheet. For more information, see [TML Documentation](https://developers.thoughtspot.com/docs/tml#_import_a_tml). + * @param importMetadataTMLRequest + */ + public importMetadataTML(importMetadataTMLRequest: ImportMetadataTMLRequest, _options?: Configuration): Observable> { + const requestContextPromise = this.requestFactory.importMetadataTML(importMetadataTMLRequest, _options); + + // build promise chain + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); + } + + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + pipe(mergeMap((response: ResponseContext) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.importMetadataTML(rsp))); + })); + } + + /** + * Version: 10.4.0.cl or later Schedules a task to import [TML](https://docs.thoughtspot.com/cloud/latest/tml) files into ThoughtSpot. You can use this API endpoint to process TML objects asynchronously when importing TMLs of large and complex metadata objects into ThoughtSpot. Unlike the synchronous import TML operation, the API processes TML data in the background and returns a task ID, which can be used to check the status of the import task via `/api/rest/2.0/metadata/tml/async/status` API endpoint. Requires `DATAMANAGEMENT` (**Can manage data**) or `ADMINISTRATION` (**Can administer ThoughtsSpot**) privilege, and edit access to the TML objects. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the following Data control privileges may be required: - `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) - `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` (**Can manage data models**) #### Usage guidelines See [Async TML API Documentation](https://developers.thoughtspot.com/docs/tml#_import_tml_objects_asynchronously) for usage guidelines. + * @param importMetadataTMLAsyncRequest + */ + public importMetadataTMLAsync(importMetadataTMLAsyncRequest: ImportMetadataTMLAsyncRequest, _options?: Configuration): Observable { + const requestContextPromise = this.requestFactory.importMetadataTMLAsync(importMetadataTMLAsyncRequest, _options); + + // build promise chain + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); + } + + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + pipe(mergeMap((response: ResponseContext) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.importMetadataTMLAsync(rsp))); + })); + } + + /** + * Version: 9.0.0.cl or later Imports group objects from external databases into ThoughtSpot. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `GROUP_ADMINISTRATION` (**Can manage groups**) privilege is required. During the import operation: * If the specified group is not available in ThoughtSpot, it will be added to ThoughtSpot. * If `delete_unspecified_groups` is set to `true`, the groups not specified in the API request, excluding administrator and system user groups, are deleted. * If the specified groups are already available in ThoughtSpot, the object properties of these groups are modified and synchronized as per the input data in the API request. A successful API call returns the object that represents the changes made in the ThoughtSpot system. + * @param importUserGroupsRequest + */ + public importUserGroups(importUserGroupsRequest: ImportUserGroupsRequest, _options?: Configuration): Observable { + const requestContextPromise = this.requestFactory.importUserGroups(importUserGroupsRequest, _options); + + // build promise chain + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); + } + + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + pipe(mergeMap((response: ResponseContext) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.importUserGroups(rsp))); + })); + } + + /** + * Version: 9.0.0.cl or later Imports user data from external databases into ThoughtSpot. During the user import operation: * If the specified users are not available in ThoughtSpot, the users are created and assigned a default password. Defining a `default_password` in the API request is optional. * If `delete_unspecified_users` is set to `true`, the users not specified in the API request, excluding the `tsadmin`, `guest`, `system` and `su` users, are deleted. * If the specified user objects are already available in ThoughtSpot, the object properties are updated and synchronized as per the input data in the API request. A successful API call returns the object that represents the changes made in the ThoughtSpot system. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `USER_ADMINISTRATION` (**Can manage users**) privilege is required. + * @param importUsersRequest + */ + public importUsers(importUsersRequest: ImportUsersRequest, _options?: Configuration): Observable { + const requestContextPromise = this.requestFactory.importUsers(importUsersRequest, _options); + + // build promise chain + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); + } + + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + pipe(mergeMap((response: ResponseContext) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.importUsers(rsp))); + })); + } + + /** + * Version: 9.0.0.cl or later Creates a login session for a ThoughtSpot user with Basic authentication. In Basic authentication method, REST clients log in to ThoughtSpot using `username` and `password` attributes. On a multi-tenant cluster with Orgs, users can pass the ID of the Org in the API request to log in to a specific Org context. **Note**: If Multi-Factor Authentication (MFA) is enabled on your instance, the API login request with basic authentication (`username` and `password` ) returns an error. Contact ThoughtSpot Support for assistance. A successful login returns a session cookie that can be used in your subsequent API requests. + * @param loginRequest + */ + public login(loginRequest: LoginRequest, _options?: Configuration): Observable { + const requestContextPromise = this.requestFactory.login(loginRequest, _options); + + // build promise chain + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); + } + + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + pipe(mergeMap((response: ResponseContext) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.login(rsp))); + })); + } + + /** + * Version: 9.0.0.cl or later Logs out a user from their current session. + */ + public logout(_options?: Configuration): Observable { + const requestContextPromise = this.requestFactory.logout(_options); + + // build promise chain + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); + } + + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + pipe(mergeMap((response: ResponseContext) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.logout(rsp))); + })); + } + + /** + * Version: 26.3.0.cl or later This API allows the addition or deletion of object level privileges for a set of users and groups, on a set of metadata objects. It provides users to access certain features based on privilege based access control. #### Usage guidelines - Specify the `operation`. The supported operations are: `ADD`, `REMOVE`. - Specify the type of the objects on which the object privileges are being provided in `metadata_type`. Only `LOGICAL_TABLE` metadata type is supported for now. It may be extended for other metadata types in future. - Specify the list of object privilege types in the `object_privilege_types` array. The supported object privilege types are: `SPOTTER_COACHING_PRIVILEGE`. - Specify the identifiers (either GUID or name) for the metadata objects in the `metadata_identifiers` array. - Specify the `type` (`USER` or `USER_GROUP`) and `identifier` (either GUID or name) of the principals to which you want to apply the given operation and given object privileges in the `principals` array. - Ensure using correct Authorization Bearer Token corresponding to specific user & org. #### Example request ```json { \"operation\": \"operation-type\", \"metadata_type\": \"metadata-type\", \"object_privilege_types\": [\"privilege-type-1\", \"privilege-type-2\"], \"metadata_identifiers\": [\"metadata-guid-or-name-1\", \"metadata-guid-or-name-1\"], \"principals\": [ { \"type\": \"type-1\", \"identifier\": \"principal-guid-or-name-1\" }, { \"type\": \"type-2\", \"identifier\": \"principal-guid-or-name-2\" } ] } ``` > ###### Note: > * Only admin users, users with edit access and users with coaching privilege on a given data-model can add or remove principals related to SPOTTER_COACHING_PRIVILEGE + * @param manageObjectPrivilegeRequest + */ + public manageObjectPrivilege(manageObjectPrivilegeRequest: ManageObjectPrivilegeRequest, _options?: Configuration): Observable { + const requestContextPromise = this.requestFactory.manageObjectPrivilege(manageObjectPrivilegeRequest, _options); + + // build promise chain + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); + } + + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + pipe(mergeMap((response: ResponseContext) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.manageObjectPrivilege(rsp))); + })); + } + + /** + * Parameterize fields in metadata objects. Version: 10.9.0.cl or later **Note:** This API endpoint is deprecated and will be removed from ThoughtSpot in a future release. Use [POST /api/rest/2.0/metadata/parameterize-fields](/api/rest/2.0/metadata/parameterize-fields) instead. Allows parameterizing fields in metadata objects in ThoughtSpot. Requires appropriate permissions to modify the metadata object. The API endpoint allows parameterizing the following types of metadata objects: * Logical Tables * Connections * Connection Configs For a Logical Table the field type must be `ATTRIBUTE` and field name can be one of: * databaseName * schemaName * tableName For a Connection or Connection Config, the field type is always `CONNECTION_PROPERTY`. In this case, field_name specifies the exact property of the Connection or Connection Config that needs to be parameterized. For Connection Config, the only supported field name is: * impersonate_user + * @param parameterizeMetadataRequest + */ + public parameterizeMetadata(parameterizeMetadataRequest: ParameterizeMetadataRequest, _options?: Configuration): Observable { + const requestContextPromise = this.requestFactory.parameterizeMetadata(parameterizeMetadataRequest, _options); + + // build promise chain + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); + } + + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + pipe(mergeMap((response: ResponseContext) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.parameterizeMetadata(rsp))); + })); + } + + /** + * Parameterize multiple fields of metadata objects. For example [schemaName, databaseName] for LOGICAL_TABLE. Version: 26.5.0.cl or later Allows parameterizing multiple fields of metadata objects in ThoughtSpot. For example, you can parameterize [schemaName, databaseName] for LOGICAL_TABLE. Requires appropriate permissions to modify the metadata object. The API endpoint allows parameterizing the following types of metadata objects: * Logical Tables * Connections * Connection Configs For a Logical Table, the field type must be `ATTRIBUTE` and field names can include: * databaseName * schemaName * tableName For a Connection or Connection Config, the field type is always `CONNECTION_PROPERTY`. In this case, field_names specifies the exact properties of the Connection or Connection Config that need to be parameterized. For Connection Config, supported field names include: * impersonate_user You can parameterize multiple fields at once by providing an array of field names. + * @param parameterizeMetadataFieldsRequest + */ + public parameterizeMetadataFields(parameterizeMetadataFieldsRequest: ParameterizeMetadataFieldsRequest, _options?: Configuration): Observable { + const requestContextPromise = this.requestFactory.parameterizeMetadataFields(parameterizeMetadataFieldsRequest, _options); + + // build promise chain + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); + } + + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + pipe(mergeMap((response: ResponseContext) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.parameterizeMetadataFields(rsp))); + })); + } + + /** + * Version: 26.5.0.cl or later Allows publishing metadata objects across organizations in ThoughtSpot. Requires ADMINISTRATION role and TENANT scope. The API endpoint allows publishing the following types of metadata objects: * Liveboards * Answers * Logical Tables This API will essentially share the objects along with it\'s dependencies to the org admins of the orgs to which it is being published. + * @param publishMetadataRequest + */ + public publishMetadata(publishMetadataRequest: PublishMetadataRequest, _options?: Configuration): Observable { + const requestContextPromise = this.requestFactory.publishMetadata(publishMetadataRequest, _options); + + // build promise chain + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); + } + + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + pipe(mergeMap((response: ResponseContext) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.publishMetadata(rsp))); + })); + } + + /** + * Update values for a variable Version: 26.4.0.cl or later Allows updating values for a specific variable in ThoughtSpot. Requires ADMINISTRATION role. The CAN_MANAGE_VARIABLES permission allows you to manage Formula Variables in the current organization scope. The API endpoint allows: * Adding new values to the variable * Replacing existing values * Deleting values from the variable * Resetting all values When updating variable values, you need to specify: * The variable identifier (ID or name) * The values to add/replace/remove * The operation to perform (ADD, REPLACE, REMOVE, RESET) Behaviour based on operation type: * ADD - Adds values to the variable if this is a list type variable, else same as replace. * REPLACE - Replaces all values of a given set of constraints with the current set of values. * REMOVE - Removes any values which match the set of conditions of the variables if this is a list type variable, else clears value. * RESET - Removes all constraints for the given variable, scope is ignored + * @param identifier Unique ID or name of the variable + * @param putVariableValuesRequest + */ + public putVariableValues(identifier: string, putVariableValuesRequest: PutVariableValuesRequest, _options?: Configuration): Observable { + const requestContextPromise = this.requestFactory.putVariableValues(identifier, putVariableValuesRequest, _options); + + // build promise chain + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); + } + + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + pipe(mergeMap((response: ResponseContext) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.putVariableValues(rsp))); + })); + } + + /** + * Version: 10.7.0.cl or later **Deprecated** — Use `getRelevantQuestions` instead (available from 10.13.0.cl). Breaks down a topical or goal-oriented natural language question into smaller, actionable analytical sub-questions, each mapped to a relevant data source for independent execution. Requires `CAN_USE_SPOTTER` privilege and at least view-level access to the referenced metadata objects. #### Usage guidelines The request accepts the following parameters: - `nlsRequest`: contains the user `query` to decompose, along with optional `instructions` and `bypassCache` flag - `worksheetIds`: list of data source identifiers to scope the decomposition - `answerIds`: list of Answer GUIDs whose data guides the response - `liveboardIds`: list of Liveboard GUIDs whose data guides the response - `conversationId`: an existing conversation session ID for context continuity - `content`: supplementary text or CSV data to improve response quality - `maxDecomposedQueries`: maximum number of sub-questions to return (default: `5`) If the request is successful, the API returns a `decomposedQueryResponse` containing a list of `decomposedQueries`, each with: - `query`: the generated analytical sub-question - `worksheetId`: the unique ID of the data source the question targets - `worksheetName`: the display name of the corresponding data source #### Error responses | Code | Description | |------|---------------------------------------------------------------------------------------------------------------------------------------| | 401 | Unauthorized — authentication token is missing, expired, or invalid. | | 403 | Forbidden — the authenticated user does not have `CAN_USE_SPOTTER` privilege or lacks view access to the referenced metadata objects. | > ###### Note: > * This endpoint is deprecated since 10.13.0.cl. Use `getRelevantQuestions` for new integrations. > * This endpoint is currently in Beta. Breaking changes may be introduced before the endpoint is made Generally Available. > * This endpoint requires Spotter — please contact ThoughtSpot support to enable Spotter on your cluster. + * @param queryGetDecomposedQueryRequest + */ + public queryGetDecomposedQuery(queryGetDecomposedQueryRequest: QueryGetDecomposedQueryRequest, _options?: Configuration): Observable { + const requestContextPromise = this.requestFactory.queryGetDecomposedQuery(queryGetDecomposedQueryRequest, _options); + + // build promise chain + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); + } + + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + pipe(mergeMap((response: ResponseContext) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.queryGetDecomposedQuery(rsp))); + })); + } + + /** + * Version: 9.0.0.cl or later Resets the password of a user account. Administrators can reset password on behalf of a user. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `USER_ADMINISTRATION` (**Can manage users**) privilege is required. + * @param resetUserPasswordRequest + */ + public resetUserPassword(resetUserPasswordRequest: ResetUserPasswordRequest, _options?: Configuration): Observable { + const requestContextPromise = this.requestFactory.resetUserPassword(resetUserPasswordRequest, _options); + + // build promise chain + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); + } + + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + pipe(mergeMap((response: ResponseContext) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.resetUserPassword(rsp))); + })); + } + + /** + * Version: 9.2.0.cl or later Reverts TML objects to a previous commit specified in the API request. Requires at least edit access to objects. In the API request, specify the `commit_id`. If the branch name is not specified in the request, the API will consider the default branch configured on your instance. By default, the API reverts all objects. If the revert operation fails for one of the objects provided in the commit, the API returns an error and does not revert any object. For more information, see [Git integration documentation](https://developers.thoughtspot.com/docs/git-integration). + * @param commitId Commit id to which the object should be reverted + * @param revertCommitRequest + */ + public revertCommit(commitId: string, revertCommitRequest: RevertCommitRequest, _options?: Configuration): Observable { + const requestContextPromise = this.requestFactory.revertCommit(commitId, revertCommitRequest, _options); + + // build promise chain + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); + } + + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + pipe(mergeMap((response: ResponseContext) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.revertCommit(rsp))); + })); + } + + /** + * Version: 26.2.0.cl or later Revokes OAuth refresh tokens for users who no longer require access to a data warehouse connection. When a token is revoked, the affected user\'s session for that connection is terminated, and they must re-authenticate to regain access. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) or `DATAMANAGEMENT` (**Can manage data**) privileges. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on the ThoughtSpot instance, users with `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) privilege can also make API requests to revoke tokens for connection users. #### Usage guidelines You can specify different combinations of identifiers to control which refresh tokens are revoked. - **connection_identifier**: Revokes refresh tokens for all users of the connection, except the connection author. - **connection_identifier** and **user_identifiers**: Revokes refresh tokens only for the users specified in the request. If the name or ID of the connection author is included in the request, their token will also be revoked. - **connection_identifier** and **configuration_identifiers**: Revokes refresh tokens for all users on the specified configurations, except the configuration author. - **connection_identifier**, **configuration_identifiers**, and **user_identifiers**: Revokes refresh tokens for the specified users on the specified configurations. - **connection_identifier** and **org_identifiers**: Revokes refresh tokens for the specified Orgs. Applicable only for published connections. - **connection_identifier**, **org_identifiers**, and **user_identifiers**: Revokes refresh tokens for the specified users in the specified Orgs. Applicable only for published connections. **NOTE**: The `org_identifiers` parameter is only applicable for published connections. Using this parameter for unpublished connections will result in an error. Ensure that the connections are published before making the API request. + * @param connectionIdentifier Unique ID or name of the connection whose refresh tokens need to be revoked. All the users associated with the connection will have their refresh tokens revoked except the author. + * @param revokeRefreshTokensRequest + */ + public revokeRefreshTokens(connectionIdentifier: string, revokeRefreshTokensRequest: RevokeRefreshTokensRequest, _options?: Configuration): Observable { + const requestContextPromise = this.requestFactory.revokeRefreshTokens(connectionIdentifier, revokeRefreshTokensRequest, _options); + + // build promise chain + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); + } + + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + pipe(mergeMap((response: ResponseContext) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.revokeRefreshTokens(rsp))); + })); + } + + /** + * Version: 9.0.0.cl or later Revokes the authentication token issued for current user session. The token of your current session expires when you make a call to the `/api/rest/2.0/auth/token/revoke` endpoint. the users will not be able to access ThoughtSpot objects until a new token is obtained. To restart your session, request for a new token from ThoughtSpot. See [Get Full Access Token](#/http/api-endpoints/authentication/get-full-access-token). + * @param revokeTokenRequest + */ + public revokeToken(revokeTokenRequest: RevokeTokenRequest, _options?: Configuration): Observable { + const requestContextPromise = this.requestFactory.revokeToken(revokeTokenRequest, _options); + + // build promise chain + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); + } + + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + pipe(mergeMap((response: ResponseContext) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.revokeToken(rsp))); + })); + } + + /** + * Version: 26.6.0.cl or later Returns the authentication configuration for the specified auth type at cluster and org level. Currently supports `TRUSTED_AUTH`. #### Required privileges Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) or `CONTROL_TRUSTED_AUTH` (**Can Enable or Disable Trusted Authentication**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled, the `CONTROL_TRUSTED_AUTH` privilege is required. #### Usage guidelines Use `scope` to control which level of settings are returned: - `CLUSTER` — Returns cluster-level authentication status and access tokens. Accessible only from the Primary Org. - `ORG` — Returns org-level authentication status and access tokens for the current Org. Requires the per-Org authentication feature to be enabled on your instance. - If `scope` is omitted, both cluster and org-level settings are returned based on the caller\'s org context and feature availability. The `access_tokens` array in `cluster_preferences` or `org_preferences` is omitted when no token is configured at that level. **Note**: Access tokens returned in the response are sensitive credentials. Treat them with the same care as passwords. + * @param searchAuthSettingsRequest + */ + public searchAuthSettings(searchAuthSettingsRequest: SearchAuthSettingsRequest, _options?: Configuration): Observable { + const requestContextPromise = this.requestFactory.searchAuthSettings(searchAuthSettingsRequest, _options); + + // build promise chain + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); + } + + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + pipe(mergeMap((response: ResponseContext) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.searchAuthSettings(rsp))); + })); + } + + /** + * Version: 10.12.0.cl or later Gets a list of [custom calendars](https://docs.thoughtspot.com/cloud/latest/connections-cust-cal). Requires `DATAMANAGEMENT` (**Can manage data**) or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your ThoughtSpot instance, the `CAN_MANAGE_CUSTOM_CALENDAR` (**Can manage custom calendars**) privilege is required. #### Usage guidelines By default, the API returns a list of custom calendars for all connection objects. To retrieve custom calendar details for a particular connection, specify the connection ID. You can also use other search parameters such as `name_pattern` and `sort_options` as search filters. The `name_pattern` parameter filters and returns only those objects that match the specified pattern. Use `%` as a wildcard for pattern matching. + * @param searchCalendarsRequest + */ + public searchCalendars(searchCalendarsRequest: SearchCalendarsRequest, _options?: Configuration): Observable> { + const requestContextPromise = this.requestFactory.searchCalendars(searchCalendarsRequest, _options); + + // build promise chain + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); + } + + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + pipe(mergeMap((response: ResponseContext) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.searchCalendars(rsp))); + })); + } + + /** + * Version: 26.4.0.cl or later Searches delivery history for communication channels such as webhooks. Returns channel-level delivery status for each job execution record. Use this to monitor channel health and delivery success rates across events. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) or `DEVELOPER` (**Has developer privilege**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, users with `CAN_MANAGE_WEBHOOKS` (**Can manage webhooks**) privilege are also authorized to perform this action. **NOTE**: When `channel_type` is `WEBHOOK`, the following constraints apply: - `job_ids`, `channel_identifiers`, and `events` each accept at most one element. - When `job_ids` is provided, it is used as the sole lookup key and other filter fields are ignored. - When `job_ids` is not provided, `channel_identifiers` and `events` are both required, each containing exactly one element. - Records older than the configured retention period are not returned. - Use `start_epoch_time_in_millis` and/or `end_epoch_time_in_millis` to narrow results to a specific time window. + * @param searchChannelHistoryRequest + */ + public searchChannelHistory(searchChannelHistoryRequest: SearchChannelHistoryRequest, _options?: Configuration): Observable { + const requestContextPromise = this.requestFactory.searchChannelHistory(searchChannelHistoryRequest, _options); + + // build promise chain + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); + } + + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + pipe(mergeMap((response: ResponseContext) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.searchChannelHistory(rsp))); + })); + } + + /** + * Version: 26.4.0.cl or later Gets a list of collections available in ThoughtSpot. To get details of a specific collection, specify the collection GUID or name. You can also filter the API response based on the collection name pattern, author, and other criteria. #### Search options * **name_pattern**: Use \'%\' as a wildcard character to match collection names * **collection_identifiers**: Search for specific collections by their GUIDs or names * **include_metadata**: When set to `true`, includes the metadata objects within each collection in the response **NOTE**: If the API returns an empty list, consider increasing the value of the `record_size` parameter. To search across all available collections, set `record_size` to `-1`. + * @param searchCollectionsRequest + */ + public searchCollections(searchCollectionsRequest: SearchCollectionsRequest, _options?: Configuration): Observable { + const requestContextPromise = this.requestFactory.searchCollections(searchCollectionsRequest, _options); + + // build promise chain + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); + } + + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + pipe(mergeMap((response: ResponseContext) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.searchCollections(rsp))); + })); + } + + /** + * Version: 9.2.0.cl or later Gets a list of commits for a given metadata object. Requires `DATAMANAGEMENT` (**Can manage data**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance on your instance, the `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` (**Can manage data models**) privilege and edit access to the metadata objects. + * @param searchCommitsRequest + */ + public searchCommits(searchCommitsRequest: SearchCommitsRequest, _options?: Configuration): Observable> { + const requestContextPromise = this.requestFactory.searchCommits(searchCommitsRequest, _options); + + // build promise chain + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); + } + + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + pipe(mergeMap((response: ResponseContext) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.searchCommits(rsp))); + })); + } + + /** + * Version: 10.14.0.cl or later Fetch communication channel preferences. - Use `cluster_preferences` to fetch the default preferences for your ThoughtSpot application instance. - If your instance has [Orgs](https://docs.thoughtspot.com/cloud/latest/orgs-overview), use `org_preferences` to fetch any Org-specific preferences that override the defaults. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) or `DEVELOPER` (**Has developer privilege**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, users with `APPLICATION_ADMINISTRATION` (**Can manage application settings**) privilege are also authorized to perform this action. + * @param searchCommunicationChannelPreferencesRequest + */ + public searchCommunicationChannelPreferences(searchCommunicationChannelPreferencesRequest: SearchCommunicationChannelPreferencesRequest, _options?: Configuration): Observable { + const requestContextPromise = this.requestFactory.searchCommunicationChannelPreferences(searchCommunicationChannelPreferencesRequest, _options); + + // build promise chain + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); + } + + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + pipe(mergeMap((response: ResponseContext) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.searchCommunicationChannelPreferences(rsp))); + })); + } + + /** + * Version: 9.2.0.cl or later Gets Git repository connections configured on the ThoughtSpot instance. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance on your instance, the `CAN_SETUP_VERSION_CONTROL` (**Can set up version control**) privilege. + * @param searchConfigRequest + */ + public searchConfig(searchConfigRequest: SearchConfigRequest, _options?: Configuration): Observable> { + const requestContextPromise = this.requestFactory.searchConfig(searchConfigRequest, _options); + + // build promise chain + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); + } + + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + pipe(mergeMap((response: ResponseContext) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.searchConfig(rsp))); + })); + } + + /** + * Version: 9.2.0.cl or later Gets connection objects. Requires `DATAMANAGEMENT` (**Can manage data**) or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) privilege is required. - To get a list of all connections available in the ThoughtSpot system, send the API request without any attributes in the request body. - To get the connection objects for a specific type of data warehouse, specify the type in `data_warehouse_types`. - To fetch details of a connection object, specify the connection object GUID or name. The `name_pattern` attribute allows passing partial text with `%` for a wildcard match. - To get details of the database, schemas, tables, or columns from a data connection object, specify `data_warehouse_object_type`. - To get a specific database, schema, table, or column from a connection object, define the object type in `data_warehouse_object_type` and object properties in the `data_warehouse_objects` array. For example, to search for a column, you must pass the database, schema, and table names in the API request. Note that in the following example, object properties are set in a hierarchical order (`database` > `schema` > `table` > `column`). ``` { \"connections\": [ { \"identifier\": \"b9d1f2ef-fa65-4a4b-994e-30fa2d57b0c2\", \"data_warehouse_objects\": [ { \"database\": \"NEBULADEV\", \"schema\": \"INFORMATION_SCHEMA\", \"table\": \"APPLICABLE_ROLES\", \"column\": \"ROLE_NAME\" } ] } ], \"data_warehouse_object_type\": \"COLUMN\" } ``` - To fetch data by `configuration`, specify `data_warehouse_object_type`. For example, to fetch columns from the `DEVELOPMENT` database, specify the `data_warehouse_object_type` as `DATABASE` and define the `configuration` string as `{\"database\":\"DEVELOPMENT\"}`. To get column data for a specific table, specify the table, for example,`{\"database\":\"RETAILAPPAREL\",\"table\":\"PIPES\"}`. - To query connections by `authentication_type`, specify `data_warehouse_object_type`. Supported values for `authentication_type` are: - `SERVICE_ACCOUNT`: For connections that require service account credentials to authenticate to the Cloud Data Warehouse and fetch data. - `OAUTH`: For connections that require OAuth credentials to authenticate to the Cloud Data Warehouse and fetch data. Teradata, Oracle, and Presto Cloud Data Warehouses do not support the OAuth authentication type. - `IAM`: For connections that have the IAM OAuth set up. This authentication type is supported on Amazon Redshift connections only. - `EXTOAUTH`: For connections that have External OAuth set up. ThoughtSpot supports external [OAuth with Microsoft Azure Active Directory (AD)](https://docs.thoughtspot.com/cloud/latest/ connections-snowflake-azure-ad-oauth) and [Okta for Snowflake data connections](https://docs.thoughtspot.com/cloud/latest/connections-snowflake-okta-oauth). - `KEY_PAIR`: For connections that require Key Pair account credentials to authenticate to the Cloud Data Warehouse and fetch data. This authentication type is supported on Snowflake connections only. - `OAUTH_WITH_PKCE`: For connections that require OAuth with PKCE account credentials to authenticate to the Cloud Data Warehouse and fetch data. This authentication type is supported on Snowflake, Starburst, Databricks, Denodo connections only. - `EXTOAUTH_WITH_PKCE`: For connections that require External OAuth With PKCE account credentials to authenticate to the Cloud Data Warehouse and fetch data. This authentication type is supported on Snowflake connections only. - `OAUTH_WITH_PEZ`: For connections that require OAuth With PEZ account credentials to authenticate to the Cloud Data Warehouse and fetch data. This authentication type is supported on Amazon Redshift connections only. - `OAUTH_WITH_SERVICE_PRINCIPAL`: For connections that require OAuth With Service Principal account credentials to authenticate to the Cloud Data Warehouse and fetch data. This authentication type is supported on Databricks connections only. - `PERSONAL_ACCESS_TOKEN`: For connections that require Personal Access Token account credentials to authenticate to the Cloud Data Warehouse and fetch data. This authentication type is supported on Databricks connections only. - `OAUTH_CLIENT_CREDENTIALS`: For connections that require OAuth Client Credentials to authenticate to the Cloud Data Warehouse and fetch data. This authentication type is supported on Snowflake connections only. - To include more details about connection objects in the API response, set `include_details` to `true`. - You can also sort the output by field names and filter connections by tags. **NOTE**: When filtering connection records by parameters other than `data_warehouse_types` or `tag_identifiers`, ensure that you set `record_size` to `-1` and `record_offset` to `0` for precise results. + * @param searchConnectionRequest + */ + public searchConnection(searchConnectionRequest: SearchConnectionRequest, _options?: Configuration): Observable> { + const requestContextPromise = this.requestFactory.searchConnection(searchConnectionRequest, _options); + + // build promise chain + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); + } + + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + pipe(mergeMap((response: ResponseContext) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.searchConnection(rsp))); + })); + } + + /** + * Version: 9.6.0.cl or later Gets custom actions configured on the cluster. Requires `DEVELOPER` (**Has Developer privilege**) or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `DEVELOPER` (**Has developer privilege**) privilege is required. + * @param searchCustomActionsRequest + */ + public searchCustomActions(searchCustomActionsRequest: SearchCustomActionsRequest, _options?: Configuration): Observable> { + const requestContextPromise = this.requestFactory.searchCustomActions(searchCustomActionsRequest, _options); + + // build promise chain + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); + } + + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + pipe(mergeMap((response: ResponseContext) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.searchCustomActions(rsp))); + })); + } + + /** + * Version: 9.0.0.cl or later Generates an Answer from a given data source. Requires at least view access to the data source object (Worksheet or View). #### Usage guidelines To search data, specify the data source GUID in `logical_table_identifier`. The data source can be a Worksheet, View, Table, or SQL view. Pass search tokens in the `query_string` attribute in the API request as shown in the following example: ``` { \"query_string\": \"[sales] by [store]\", \"logical_table_identifier\": \"cd252e5c-b552-49a8-821d-3eadaa049cca\", } ``` For more information about the `query_string` format and data source attribute, see [Search data API](https://developers.thoughtspot.com/docs/fetch-data-and-report-apis#_search_data_api). The `record_size` attribute determines the number of records to retrieve in an API call. For more information about pagination, record size, and maximum row limit, see [Pagination and record size settings](https://developers.thoughtspot.com/docs/fetch-data-and-report-apis#_pagination_settings_for_data_and_report_api). + * @param searchDataRequest + */ + public searchData(searchDataRequest: SearchDataRequest, _options?: Configuration): Observable { + const requestContextPromise = this.requestFactory.searchData(searchDataRequest, _options); + + // build promise chain + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); + } + + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + pipe(mergeMap((response: ResponseContext) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.searchData(rsp))); + })); + } + + /** + * Version: 10.10.0.cl or later Search the email customization configuration if any set for the ThoughtSpot system. #### Pre-requisites Requires `DEVELOPER` (**has developer privilege**) or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `DEVELOPER` (**Has developer privilege**) privilege is required. **NOTE**:This endpoint in currently in beta. Contact ThoughtSpot support to enable this on your instance. + * @param searchEmailCustomizationRequest + */ + public searchEmailCustomization(searchEmailCustomizationRequest: SearchEmailCustomizationRequest, _options?: Configuration): Observable> { + const requestContextPromise = this.requestFactory.searchEmailCustomization(searchEmailCustomizationRequest, _options); + + // build promise chain + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); + } + + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + pipe(mergeMap((response: ResponseContext) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.searchEmailCustomization(rsp))); + })); + } + + /** + * Version: 9.0.0.cl or later Gets a list of metadata objects available on the ThoughtSpot system. This API endpoint is available to all users who have view access to the object. Users with `ADMINISTRATION` (**Can administer ThoughtSpot**) privileges can view data for all metadata objects, including users and groups. #### Usage guidelines - To get all metadata objects, send the API request without any attributes. - To get metadata objects of a specific type, set the `type` attribute. For example, to fetch a Worksheet, set the type as `LOGICAL_TABLE`. - To filter metadata objects within type `LOGICAL_TABLE`, set the `subtypes` attribute. For example, to fetch a Worksheet, set the type as `LOGICAL_TABLE` & subtypes as `[WORKSHEET]`. - To get a specific metadata object, specify the GUID. - To customize your search and filter the API response, you can use several parameters. You can search for objects created or modified by specific users, by tags applied to the objects, or by using the include parameters like `include_auto_created_objects`, `include_dependent_objects`, `include_headers`, `include_incomplete_objects`, and so on. You can also define sorting options to sort the data retrieved in the API response. - To get discoverable objects when linientmodel is enabled you can use `include_discoverable_objects` as true else false. Default value is true. - For liveboard metadata type, to get the newer format, set the `liveboard_response_format` as V2. Default value is V1. - To retrieve only objects that are published, set the `include_only_published_objects` as true. Default value is false. **NOTE**: The following parameters support pagination of metadata records: - `tag_identifiers` - `type` - `subtypes` - `created_by_user_identifiers` - `modified_by_user_identifiers` - `owned_by_user_identifiers` - `exclude_objects` - `include_auto_created_objects` - `favorite_object_options` - `include_only_published_objects` If you are using other parameters to search metadata, set `record_size` to `-1` and `record_offset` to `0`. + * @param searchMetadataRequest + */ + public searchMetadata(searchMetadataRequest: SearchMetadataRequest, _options?: Configuration): Observable> { + const requestContextPromise = this.requestFactory.searchMetadata(searchMetadataRequest, _options); + + // build promise chain + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); + } + + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + pipe(mergeMap((response: ResponseContext) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.searchMetadata(rsp))); + })); + } + + /** + * Version: 9.0.0.cl or later Gets a list of Orgs configured on the ThoughtSpot system. To get details of a specific Org, specify the Org ID or name. You can also pass parameters such as status, visibility, and user identifiers to get a specific list of Orgs. Requires cluster administration (**Can administer Org**) privileges. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `ORG_ADMINISTRATION` (**Can manage Orgs**) privilege is required. + * @param searchOrgsRequest + */ + public searchOrgs(searchOrgsRequest: SearchOrgsRequest, _options?: Configuration): Observable> { + const requestContextPromise = this.requestFactory.searchOrgs(searchOrgsRequest, _options); + + // build promise chain + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); + } + + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + pipe(mergeMap((response: ResponseContext) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.searchOrgs(rsp))); + })); + } + + /** + * Version: 9.5.0.cl or later Gets a list of Role objects from the ThoughtSpot system. Available if [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance. To search for Roles, the `ROLE_ADMINISTRATION` (**Can manage roles**) privilege is required. To get details of a specific Role object, specify the GUID or name. You can also filter the API response based on user group and Org identifiers, privileges assigned to the Role, and deprecation status. + * @param searchRolesRequest + */ + public searchRoles(searchRolesRequest: SearchRolesRequest, _options?: Configuration): Observable> { + const requestContextPromise = this.requestFactory.searchRoles(searchRolesRequest, _options); + + // build promise chain + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); + } + + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + pipe(mergeMap((response: ResponseContext) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.searchRoles(rsp))); + })); + } + + /** + * Search Schedules Version: 9.4.0.cl or later Gets a list of scheduled jobs configured for a Liveboard. To get details of a specific scheduled job, specify the name or GUID of the scheduled job. Requires at least view access to Liveboards. **NOTE**: When filtering schedules by parameters other than `metadata`, set `record_size` to `-1` and `record_offset` to `0` for accurate results. + * @param searchSchedulesRequest + */ + public searchSchedules(searchSchedulesRequest: SearchSchedulesRequest, _options?: Configuration): Observable> { + const requestContextPromise = this.requestFactory.searchSchedules(searchSchedulesRequest, _options); + + // build promise chain + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); + } + + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + pipe(mergeMap((response: ResponseContext) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.searchSchedules(rsp))); + })); + } + + /** + * Version: 26.2.0.cl or later Fetch security settings for your ThoughtSpot application instance. - Use `scope: CLUSTER` to retrieve cluster-level security settings, including CORS and CSP allowlists, SAML redirect URLs, and settings that control access to non-embedded pages. - Use `scope: ORG` to retrieve Org-level security settings. If your instance has [Orgs](https://docs.thoughtspot.com/cloud/latest/orgs-overview), this returns CORS and non-embed access settings specific to the Org. - If `scope` is not specified, returns both cluster and Org-specific settings based on user privileges. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) or `DEVELOPER` (**Has developer privilege**) privilege. See [Security Settings](https://developers.thoughtspot.com/docs/security-settings) for more details. + * @param searchSecuritySettingsRequest + */ + public searchSecuritySettings(searchSecuritySettingsRequest: SearchSecuritySettingsRequest, _options?: Configuration): Observable { + const requestContextPromise = this.requestFactory.searchSecuritySettings(searchSecuritySettingsRequest, _options); + + // build promise chain + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); + } + + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + pipe(mergeMap((response: ResponseContext) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.searchSecuritySettings(rsp))); + })); + } + + /** + * Version: 9.0.0.cl or later Gets a list of tag objects available on the ThoughtSpot system. To get details of a specific tag object, specify the GUID or name. Any authenticated user can search for tag objects. + * @param searchTagsRequest + */ + public searchTags(searchTagsRequest: SearchTagsRequest, _options?: Configuration): Observable> { + const requestContextPromise = this.requestFactory.searchTags(searchTagsRequest, _options); + + // build promise chain + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); + } + + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + pipe(mergeMap((response: ResponseContext) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.searchTags(rsp))); + })); + } + + /** + * Version: 9.0.0.cl or later Gets a list of user group objects from the ThoughtSpot system. To get details of a specific user group, specify the user group GUID or name. You can also filter the API response based on User ID, Org ID, Role ID, type of group, sharing visibility, privileges assigned to the group, and the Liveboard IDs assigned to the users in the group. Available to all users. Users with `ADMINISTRATION` (**Can administer ThoughtSpot**) privileges can view all users properties. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `GROUP_ADMINISTRATION` (**Can manage groups**) privilege is required. **NOTE**: If you do not get precise results, try setting `record_size` to `-1` and `record_offset` to `0`. + * @param searchUserGroupsRequest + */ + public searchUserGroups(searchUserGroupsRequest: SearchUserGroupsRequest, _options?: Configuration): Observable> { + const requestContextPromise = this.requestFactory.searchUserGroups(searchUserGroupsRequest, _options); + + // build promise chain + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); + } + + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + pipe(mergeMap((response: ResponseContext) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.searchUserGroups(rsp))); + })); + } + + /** + * Version: 9.0.0.cl or later Gets a list of users available on the ThoughtSpot system. To get details of a specific user, specify the user GUID or name. You can also filter the API response based on groups, Org ID, user visibility, account status, user type, and user preference settings and favorites. Available to all users. Users with `ADMINISTRATION` (**Can administer ThoughtSpot**) privileges can view all users properties. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `USER_ADMINISTRATION` (**Can manage users**) privilege is required. **NOTE**: If the API returns an empty list, consider increasing the value of the `record_size` parameter. To search across all available users, set `record_size` to `-1`. + * @param searchUsersRequest + */ + public searchUsers(searchUsersRequest: SearchUsersRequest, _options?: Configuration): Observable> { + const requestContextPromise = this.requestFactory.searchUsers(searchUsersRequest, _options); + + // build promise chain + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); + } + + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + pipe(mergeMap((response: ResponseContext) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.searchUsers(rsp))); + })); + } + + /** + * Search variables Version: 26.4.0.cl or later Allows searching for variables in ThoughtSpot. Requires ADMINISTRATION role. The CAN_MANAGE_VARIABLES permission allows you to manage Formula Variables in the current organization scope. The API endpoint supports searching variables by: * Variable identifier (ID or name) * Variable type * Name pattern (case-insensitive, supports % for wildcard) The search results can be formatted in three ways: * METADATA - Returns only variable metadata (default) * METADATA_AND_VALUES - Returns variable metadata and values The values can be filtered by scope: * org_identifier * principal_identifier * model_identifier + * @param searchVariablesRequest + */ + public searchVariables(searchVariablesRequest: SearchVariablesRequest, _options?: Configuration): Observable> { + const requestContextPromise = this.requestFactory.searchVariables(searchVariablesRequest, _options); + + // build promise chain + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); + } + + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + pipe(mergeMap((response: ResponseContext) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.searchVariables(rsp))); + })); + } + + /** + * Version: 10.14.0.cl or later Searches for webhook configurations based on various criteria such as Org, webhook identifier, event type, with support for pagination and sorting. Returns matching webhook configurations with their complete details. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) or `DEVELOPER` (**Has developer privilege**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, users with `CAN_MANAGE_WEBHOOKS` (**Can manage webhooks**) privilege are also authorized to perform this action. + * @param searchWebhookConfigurationsRequest + */ + public searchWebhookConfigurations(searchWebhookConfigurationsRequest: SearchWebhookConfigurationsRequest, _options?: Configuration): Observable { + const requestContextPromise = this.requestFactory.searchWebhookConfigurations(searchWebhookConfigurationsRequest, _options); + + // build promise chain + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); + } + + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + pipe(mergeMap((response: ResponseContext) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.searchWebhookConfigurations(rsp))); + })); + } + + /** + * Version: 26.5.0.cl or later Sends natural language messages to an existing Spotter agent conversation and returns the complete response synchronously. Requires `CAN_USE_SPOTTER` privilege and access to the metadata object associated with the conversation. The user must have access to the conversation session referenced by `conversation_identifier`. A conversation must first be created using the `createAgentConversation` API. #### Usage guidelines The request must include: - `conversation_identifier`: the unique session ID returned by `createAgentConversation`, used for context continuity and message tracking - `messages`: an array of one or more text messages to send to the agent The API returns an array of response objects, each containing: - `type`: the kind of response — `text`, `answer`, or `error` - `message`: the main content of the response - `metadata`: additional information depending on the message type (e.g., answer metadata includes analytics and visualization details) #### Error responses | Code | Description | |------|----------------------------------------------------------------------------------------------------------------------------------| | 401 | Unauthorized — authentication token is missing, expired, or invalid. | | 403 | Forbidden — the authenticated user does not have `CAN_USE_SPOTTER` privilege or lacks permission on the referenced conversation. | > ###### Note: > > - This endpoint is Generally Available from version 26.5.0.cl. > - This endpoint requires Spotter - please contact ThoughtSpot support to enable Spotter on your cluster. > - For real-time streamed responses, use `sendAgentConversationMessageStreaming` instead. + * @param conversationIdentifier Unique identifier for the conversation (used to track context) + * @param sendAgentConversationMessageRequest + */ + public sendAgentConversationMessage(conversationIdentifier: string, sendAgentConversationMessageRequest: SendAgentConversationMessageRequest, _options?: Configuration): Observable { + const requestContextPromise = this.requestFactory.sendAgentConversationMessage(conversationIdentifier, sendAgentConversationMessageRequest, _options); + + // build promise chain + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); + } + + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + pipe(mergeMap((response: ResponseContext) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.sendAgentConversationMessage(rsp))); + })); + } + + /** + * Version: 26.5.0.cl or later Sends one or more natural language messages to an existing Spotter agent conversation and returns the response as a real-time Server-Sent Events stream. Requires `CAN_USE_SPOTTER` privilege and access to the metadata object associated with the conversation. The user must have access to the conversation session referenced by `conversation_identifier`. A conversation must first be created using the `createAgentConversation` API. #### Usage guidelines The request must include: - `conversation_identifier`: the unique session ID returned by `createAgentConversation`, used for context continuity and message tracking - `messages`: an array of one or more text messages to send to the agent If the request is valid, the API returns a Server-Sent Events (SSE) stream. Each line has the form `data: [{\"type\": \"...\", ...}]` — a JSON array of event objects. Event types include: - `ack`: confirms receipt of the request (`node_id`) - `conv_title`: conversation title (`title`, `conv_id`) - `notification`: status updates on operations (`group_id`, `metadata`, `code` — e.g. `TOOL_CALL_NOTIFICATION`, `nls_start`, `FINAL_RESPONSE_NOTIFICATION`) - `text-chunk`: incremental content chunks (`id`, `group_id`, `metadata` with `format` and `type` such as `thinking` or `text`, `content`) - `text`: full text block with same structure as `text-chunk` - `answer`: structured answer with metadata (`id`, `group_id`, `metadata` with `sage_query`, `session_id`, `title`, etc., `title`) - `error`: if a failure occurs #### Error responses | Code | Description | | ---- | -------------------------------------------------------------------------------------------------------------------------------- | | 401 | Unauthorized — authentication token is missing, expired, or invalid. | | 403 | Forbidden — the authenticated user does not have `CAN_USE_SPOTTER` privilege or lacks permission on the referenced conversation. | > ###### Note: > > - This endpoint is Generally Available from version 26.5.0.cl. > - This endpoint requires Spotter - please contact ThoughtSpot support to enable Spotter on your cluster. > - The streaming protocol uses Server-Sent Events (SSE). > - For the complete response in a single payload, use `sendAgentConversationMessage` instead. + * @param conversationIdentifier Unique identifier for the conversation (used to track context) + * @param sendAgentConversationMessageStreamingRequest + */ + public sendAgentConversationMessageStreaming(conversationIdentifier: string, sendAgentConversationMessageStreamingRequest: SendAgentConversationMessageStreamingRequest, _options?: Configuration): Observable { + const requestContextPromise = this.requestFactory.sendAgentConversationMessageStreaming(conversationIdentifier, sendAgentConversationMessageStreamingRequest, _options); + + // build promise chain + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); + } + + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + pipe(mergeMap((response: ResponseContext) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.sendAgentConversationMessageStreaming(rsp))); + })); + } + + /** + * Version: 26.2.0.cl or later **Deprecated** — Use `sendAgentConversationMessage` instead. Send natural language messages to an existing Spotter agent conversation and returns the complete response synchronously. Requires `CAN_USE_SPOTTER` privilege and access to the metadata object associated with the conversation. The user must have access to the conversation session referenced by `conversation_identifier`. A conversation must first be created using the `createAgentConversation` API. #### Usage guidelines The request must include: - `conversation_identifier`: the unique session ID returned by `createAgentConversation`, used for context continuity and message tracking - `messages`: an array of one or more text messages to send to the agent The API returns an array of response objects, each containing: - `type`: the kind of response — `text`, `answer`, or `error` - `message`: the main content of the response - `metadata`: additional information depending on the message type (e.g., answer metadata includes analytics and visualization details) #### Error responses | Code | Description | |------|----------------------------------------------------------------------------------------------------------------------------------| | 401 | Unauthorized — authentication token is missing, expired, or invalid. | | 403 | Forbidden — the authenticated user does not have `CAN_USE_SPOTTER` privilege or lacks permission on the referenced conversation. | > ###### Note: > > - This endpoint is deprecated. Use `sendAgentConversationMessage` for new integrations. > - This endpoint is currently in Beta. Breaking changes may be introduced before the endpoint is made Generally Available. > - This endpoint requires Spotter - please contact ThoughtSpot support to enable Spotter on your cluster. + * @param conversationIdentifier Unique identifier for the conversation (used to track context) + * @param sendAgentMessageRequest + */ + public sendAgentMessage(conversationIdentifier: string, sendAgentMessageRequest: SendAgentMessageRequest, _options?: Configuration): Observable { + const requestContextPromise = this.requestFactory.sendAgentMessage(conversationIdentifier, sendAgentMessageRequest, _options); + + // build promise chain + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); + } + + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + pipe(mergeMap((response: ResponseContext) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.sendAgentMessage(rsp))); + })); + } + + /** + * Version: 26.2.0.cl or later **Deprecated** — Use `sendAgentConversationMessageStreaming` instead. Sends one or more natural language messages to an existing Spotter agent conversation and returns the response as a real-time Server-Sent Events stream. Requires `CAN_USE_SPOTTER` privilege and access to the metadata object associated with the conversation. The user must have access to the conversation session referenced by `conversation_identifier`. A conversation must first be created using the `createAgentConversation` API. #### Usage guidelines The request must include: - `conversation_identifier`: the unique session ID returned by `createAgentConversation`, used for context continuity and message tracking - `messages`: an array of one or more text messages to send to the agent If the request is valid, the API returns a Server-Sent Events (SSE) stream. Each line has the form `data: [{\"type\": \"...\", ...}]` — a JSON array of event objects. Event types include: - `ack`: confirms receipt of the request (`node_id`) - `conv_title`: conversation title (`title`, `conv_id`) - `notification`: status updates on operations (`group_id`, `metadata`, `code` — e.g. `TOOL_CALL_NOTIFICATION`, `nls_start`, `FINAL_RESPONSE_NOTIFICATION`) - `text-chunk`: incremental content chunks (`id`, `group_id`, `metadata` with `format` and `type` such as `thinking` or `text`, `content`) - `text`: full text block with same structure as `text-chunk` - `answer`: structured answer with metadata (`id`, `group_id`, `metadata` with `sage_query`, `session_id`, `title`, etc., `title`) - `error`: if a failure occurs #### Error responses | Code | Description | |------|----------------------------------------------------------------------------------------------------------------------------------| | 401 | Unauthorized — authentication token is missing, expired, or invalid. | | 403 | Forbidden — the authenticated user does not have `CAN_USE_SPOTTER` privilege or lacks permission on the referenced conversation. | > ###### Note: > > - This endpoint is deprecated. Use `sendAgentConversationMessageStreaming` for new integrations. > - This endpoint is currently in Beta. Breaking changes may be introduced before the endpoint is made Generally Available. > - This endpoint requires Spotter - please contact ThoughtSpot support to enable Spotter on your cluster. > - The streaming protocol uses Server-Sent Events (SSE). + * @param sendAgentMessageStreamingRequest + */ + public sendAgentMessageStreaming(sendAgentMessageStreamingRequest: SendAgentMessageStreamingRequest, _options?: Configuration): Observable { + const requestContextPromise = this.requestFactory.sendAgentMessageStreaming(sendAgentMessageStreamingRequest, _options); + + // build promise chain + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); + } + + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + pipe(mergeMap((response: ResponseContext) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.sendAgentMessageStreaming(rsp))); + })); + } + + /** + * Version: 10.4.0.cl or later Sends a follow-up message to an existing conversation within the context of a data model. Requires `CAN_USE_SPOTTER` privilege and at least view access to the metadata object specified in the request. A conversation must first be created using the `createConversation` API. #### Usage guidelines The request must include: - `conversation_identifier`: the unique session ID returned by `createConversation` - `metadata_identifier`: the unique ID of the data source used for the conversation - `message`: a natural language string with the follow-up question If the request is successful, the API returns an array of response messages, each containing: - `session_identifier`: the unique ID of the generated response - `generation_number`: the generation number of the response - `message_type`: the type of the response (e.g., `TSAnswer`) - `visualization_type`: the generated visualization type (`Chart`, `Table`, or `Undefined`) - `tokens` / `display_tokens`: the search tokens and user-friendly display tokens for the response #### Error responses | Code | Description | |------|-----------------------------------------------------------------------------------------------------------------------------------------| | 401 | Unauthorized — authentication token is missing, expired, or invalid. | | 403 | Forbidden — the authenticated user does not have `CAN_USE_SPOTTER` privilege or lacks view permission on the specified metadata object. | > ###### Note: > * This endpoint is currently in Beta. Breaking changes may be introduced before the endpoint is made Generally Available. > * This endpoint requires Spotter - please contact ThoughtSpot support to enable Spotter on your cluster. + * @param conversationIdentifier Unique identifier of the conversation. + * @param sendMessageRequest + */ + public sendMessage(conversationIdentifier: string, sendMessageRequest: SendMessageRequest, _options?: Configuration): Observable> { + const requestContextPromise = this.requestFactory.sendMessage(conversationIdentifier, sendMessageRequest, _options); + + // build promise chain + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); + } + + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + pipe(mergeMap((response: ResponseContext) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.sendMessage(rsp))); + })); + } + + /** + * Version: 10.15.0.cl or later This API allows users to set natural language (NL) instructions for a specific data-model to improve AI-generated answers and query processing. These instructions help guide the AI system to better understand the data context and provide more accurate responses. Requires `CAN_USE_SPOTTER` privilege, either edit access or `SPOTTER_COACHING_PRIVILEGE` on the data model, and a bearer token corresponding to the org where the data model exists. #### Usage guidelines To set NL instructions for a data-model, the request must include: - `data_source_identifier`: The unique ID of the data-model for which to set NL instructions - `nl_instructions_info`: An array of instruction objects, each containing: - `instructions`: Array of text instructions for the LLM - `scope`: The scope of the instruction (`GLOBAL`). Currently only `GLOBAL` is supported. It can be extended to data-model-user scope in future. #### Instructions scope - **GLOBAL**: instructions that apply to all users querying this data model If the request is successful, the API returns: - `success`: a boolean indicating whether the operation completed successfully #### Error responses | Code | Description | |------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| | 401 | Unauthorized — authentication token is missing, expired, or invalid. | | 403 | Forbidden — the authenticated user does not have `CAN_USE_SPOTTER` privilege, lacks edit access or `SPOTTER_COACHING_PRIVILEGE` on the data model, or the bearer token does not correspond to the org where the data model exists. | > ###### Note: > > - To use this API, the user needs either edit access or `SPOTTER_COACHING_PRIVILEGE` on the data model, and must use the bearer token corresponding to the org where the data model exists. > - This endpoint is currently in Beta. Breaking changes may be introduced before the endpoint is made Generally Available. > - Available from version 10.15.0.cl and later. > - This endpoint requires Spotter — please contact ThoughtSpot Support to enable Spotter on your cluster. > - Instructions help improve the accuracy and relevance of AI-generated responses for the specified data-model. + * @param setNLInstructionsRequest + */ + public setNLInstructions(setNLInstructionsRequest: SetNLInstructionsRequest, _options?: Configuration): Observable { + const requestContextPromise = this.requestFactory.setNLInstructions(setNLInstructionsRequest, _options); + + // build promise chain + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); + } + + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + pipe(mergeMap((response: ResponseContext) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.setNLInstructions(rsp))); + })); + } + + /** + * Version: 9.0.0.cl or later Allows sharing one or several metadata objects with users and groups in ThoughtSpot. Requires edit access to the metadata object. #### Supported metadata objects: * Liveboards * Visualizations * Answers * Models * Views * Connections * Collections #### Object permissions You can provide `READ_ONLY` or `MODIFY` access when sharing an object with another user or group. The `READ_ONLY` permission grants view access to the shared object, whereas `MODIFY` provides edit access. To prevent a user or group from accessing the shared object, specify the GUID or name of the principal and set `shareMode` to `NO_ACCESS`. #### Sharing a visualization * Sharing a visualization implicitly shares the entire Liveboard with the recipient. * Object permissions set for a shared visualization also apply to the Liveboard unless overridden by another API request or via UI. * If email notifications for object sharing are enabled, a notification with a link to the shared visualization will be sent to the recipient’s email address. Although this link opens the shared visualization, recipients can also access other visualizations in the Liveboard. #### Sharing a collection Collections support **dual permissions** that provide fine-grained control: * **Collection permissions** (`share_mode`) - controls access to the collection itself (view, edit, delete the collection) * **Content permissions** (`content_share_mode`) - controls access to objects within the collection (view, edit objects inside) **Default Behavior:** - If only `share_mode` is specified, the content permissions default to `READ_ONLY` (except when `share_mode` is `NO_ACCESS`, then content also gets `NO_ACCESS`) - To give users edit access to collection contents, explicitly set `content_share_mode: \"MODIFY\"` ## Examples The following JSON examples can be copy-pasted as request bodies for the REST v2 API endpoint: ```bash POST /callosum/v1/v2/security/metadata/share Content-Type: application/x-www-form-urlencoded ``` ### Basic collection sharing Share a collection with read-only access: ```json { \"metadata_type\": \"COLLECTION\", \"metadata_identifiers\": [\"Sales Reports Collection\"], \"permissions\": [{ \"principal\": { \"type\": \"USER\", \"identifier\": \"alice@company.com\" }, \"share_mode\": \"READ_ONLY\" }], \"notification\": { \"message\": \"I\'ve shared the Sales Reports collection with you\", \"notify_on_share\": true } } ``` ### Collection sharing with dual permissions Share a collection with different permissions for the collection vs. its contents: ```json { \"metadata_type\": \"COLLECTION\", \"metadata_identifiers\": [\"Marketing Analytics\"], \"permissions\": [{ \"principal\": { \"type\": \"USER\", \"identifier\": \"bob@company.com\" }, \"share_mode\": \"MODIFY\", \"content_share_mode\": \"READ_ONLY\" }, { \"principal\": { \"type\": \"USER_GROUP\", \"identifier\": \"Marketing Team\" }, \"share_mode\": \"READ_ONLY\", \"content_share_mode\": \"READ_ONLY\" }], \"notification\": { \"emails\": [\"bob@company.com\"], \"message\": \"You can edit the collection but content is read-only\", \"enable_custom_url\": false, \"notify_on_share\": true }, \"has_lenient_discoverability\": false } ``` ### Multiple collections sharing Share multiple collections with different users: ```json { \"metadata\": [ { \"type\": \"COLLECTION\", \"identifier\": \"Q4 Reports\" }, { \"type\": \"COLLECTION\", \"identifier\": \"Executive Dashboard Collection\" } ], \"permissions\": [{ \"principal\": { \"type\": \"USER_GROUP\", \"identifier\": \"Executives\" }, \"share_mode\": \"MODIFY\" }, { \"principal\": { \"type\": \"USER\", \"identifier\": \"manager@company.com\" }, \"share_mode\": \"READ_ONLY\", \"content_share_mode\": \"MODIFY\" }], \"notification\": { \"message\": \"Sharing quarterly collections with leadership team\", \"notify_on_share\": true } } ``` ### Remove collection access Remove access to a collection by setting share_mode to NO_ACCESS: ```json { \"metadata_type\": \"COLLECTION\", \"metadata_identifiers\": [\"Confidential Reports\"], \"permissions\": [{ \"principal\": { \"type\": \"USER\", \"identifier\": \"former-employee@company.com\" }, \"share_mode\": \"NO_ACCESS\" }], \"notification\": { \"notify_on_share\": false } } ``` ### Collection Permission Scenarios **Scenario 1: Collection Admin** - `share_mode: MODIFY` + `content_share_mode: MODIFY` = Full control over collection and its contents **Scenario 2: Collection Curator** - `share_mode: MODIFY` + `content_share_mode: READ_ONLY` = Can manage collection structure but not edit contents **Scenario 3: Content Editor** - `share_mode: READ_ONLY` + `content_share_mode: MODIFY` = Can edit objects within collection but can\'t change collection itself **Scenario 4: Viewer** - `share_mode: READ_ONLY` + `content_share_mode: READ_ONLY` = View-only access to collection and contents + * @param shareMetadataRequest + */ + public shareMetadata(shareMetadataRequest: ShareMetadataRequest, _options?: Configuration): Observable { + const requestContextPromise = this.requestFactory.shareMetadata(shareMetadataRequest, _options); + + // build promise chain + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); + } + + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + pipe(mergeMap((response: ResponseContext) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.shareMetadata(rsp))); + })); + } + + /** + * Version: 10.4.0.cl or later Processes a natural language query against a specified data model and returns a single AI-generated answer without requiring a conversation session. Requires `CAN_USE_SPOTTER` privilege and at least view access to the metadata object specified in the request. #### Usage guidelines The request must include: - `query`: a natural language question (e.g., \"What were total sales last quarter?\") - `metadata_identifier`: the unique ID of the data source to query against If the request is successful, the API returns a response message containing: - `session_identifier`: the unique ID of the generated response - `generation_number`: the generation number of the response - `message_type`: the type of the response (e.g., `TSAnswer`) - `visualization_type`: the generated visualization type (`Chart`, `Table`, or `Undefined`) - `tokens` / `display_tokens`: the search tokens and user-friendly display tokens for the response #### Error responses | Code | Description | |------|-----------------------------------------------------------------------------------------------------------------------------------------| | 401 | Unauthorized — authentication token is missing, expired, or invalid. | | 403 | Forbidden — the authenticated user does not have `CAN_USE_SPOTTER` privilege or lacks view permission on the specified metadata object. | > ###### Note: > * This endpoint is currently in Beta. Breaking changes may be introduced before the endpoint is made Generally Available. > * This endpoint requires Spotter - please contact ThoughtSpot support to enable Spotter on your cluster. + * @param singleAnswerRequest + */ + public singleAnswer(singleAnswerRequest: SingleAnswerRequest, _options?: Configuration): Observable { + const requestContextPromise = this.requestFactory.singleAnswer(singleAnswerRequest, _options); + + // build promise chain + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); + } + + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + pipe(mergeMap((response: ResponseContext) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.singleAnswer(rsp))); + })); + } + + /** + * Stops an in-progress agent conversation response. Version: 26.6.0.cl or later Version: 26.6.0.cl or later Stops an in-progress agent response for the specified conversation. Use this endpoint to cancel a response that is actively being generated — for example, when the user navigates away, reformulates their question, or no longer needs the current result. Requires `CAN_USE_SPOTTER` privilege and access to the specified conversation. #### Usage guidelines The request must include: - `conversation_identifier` *(path parameter)*: the unique ID of the conversation whose active response should be stopped, as returned by `createAgentConversation` A successful request returns an empty `204 No Content` response. If there is no active response in progress at the time of the call, the request is still treated as successful. After stopping a response, the conversation session remains active. You can continue sending messages using `sendAgentConversationMessage` or `sendAgentConversationMessageStreaming`. #### Example request ```bash POST /api/rest/2.0/ai/agent/conversation/{conversation_identifier}/stop-response ``` #### Typical usage scenario This endpoint is useful when integrating Spotter into a chat UI where users can cancel a long-running query. For example: 1. User sends a message via `sendAgentConversationMessageStreaming`. 2. User clicks a \"Stop generating\" button while the response is streaming. 3. Your client calls `stopConversation` with the active `conversation_identifier`. 4. The stream is terminated and the user can ask a new question. #### Error responses | Code | Description | |------|-------------| | 401 | Unauthorized — authentication token is missing, expired, or invalid. | | 403 | Forbidden — the authenticated user does not have `CAN_USE_SPOTTER` privilege or lacks access to the specified conversation. | > ###### Note: > > - Calling this endpoint when no response is in progress does not return an error. > - The conversation context is preserved after stopping — previous messages and answers remain accessible. > - Available from version 26.6.0.cl and later. > - This endpoint requires Spotter — please contact ThoughtSpot Support to enable Spotter on your cluster. > - This feature is available only for **Spotter 3** (`SPOTTER3`) version. + * @param conversationIdentifier Unique identifier of the conversation to stop. + */ + public stopConversation(conversationIdentifier: string, _options?: Configuration): Observable { + const requestContextPromise = this.requestFactory.stopConversation(conversationIdentifier, _options); + + // build promise chain + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); + } + + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + pipe(mergeMap((response: ResponseContext) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.stopConversation(rsp))); + })); + } + + /** + * Version: 26.5.0.cl or later Synchronizes connection metadata attributes from your Cloud Data Warehouse (CDW) with ThoughtSpot. Requires the `DATAMANAGEMENT` (**Can manage data**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` (**Can manage data models**) privilege is required. #### Usage guidelines To synchronize attributes from a CDW, specify the connection GUID or name in the `connection_identifier` path parameter and `sync_attributes` in the request body. Default attribute is `[\"DESCRIPTION\"]`. ##### Hierarchical schema * Connection: The connection object for the sync operation. * Tables: Tables for the sync operation. When no table is specified, all tables are synchronized. * Columns: If the table is specified, you can add the columns for the sync operation. If no columns are specified, all columns in the specified table are considered for the sync operation. To set the scope for the sync operation: * Connection-level: To sync all tables and columns, pass an empty request body, or only the attributes in the request body. * Table-level: To synchronize specific tables and their columns, specify the table identifiers in the `tables` array. * Column-level: To synchronize specific columns, specify the table identifier as the key and column identifiers as the value in the `tables` array. ``` { \"tables\": [ {\"table-guid-1\": [\"column-guid-1\", \"column-guid-2\"]}, \"table-guid-2\" ], \"sync_attributes\": [\"DESCRIPTION\"] } ``` ##### API response If the sync operation is successful, the API returns the following information: * Status of the sync operation. For example, `SUCCESS`, `PARTIAL_SUCCESS`, or `NO_UPDATE`. * Number of tables and columns that were updated. * Number of tables and columns with the sync failed status when the overall sync status is `PARTIAL_SUCCESS`. * Message text indicating the sync results. + * @param connectionIdentifier Unique ID or name of the connection. + * @param syncMetadataRequest + */ + public syncMetadata(connectionIdentifier: string, syncMetadataRequest: SyncMetadataRequest, _options?: Configuration): Observable { + const requestContextPromise = this.requestFactory.syncMetadata(connectionIdentifier, syncMetadataRequest, _options); + + // build promise chain + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); + } + + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + pipe(mergeMap((response: ResponseContext) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.syncMetadata(rsp))); + })); + } + + /** + * Version: 9.0.0.cl or later Removes the tags applied to a Liveboard, Answer, Table, or Worksheet. Requires edit access to the metadata object. + * @param unassignTagRequest + */ + public unassignTag(unassignTagRequest: UnassignTagRequest, _options?: Configuration): Observable { + const requestContextPromise = this.requestFactory.unassignTag(unassignTagRequest, _options); + + // build promise chain + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); + } + + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + pipe(mergeMap((response: ResponseContext) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.unassignTag(rsp))); + })); + } + + /** + * Remove parameterization from fields in metadata objects. Version: 26.5.0.cl or later Allows removing parameterization from fields in metadata objects in ThoughtSpot. Requires appropriate permissions to modify the metadata object. The API endpoint allows unparameterizing the following types of metadata objects: * Logical Tables * Connections * Connection Configs For a Logical Table the field type must be `ATTRIBUTE` and field name can be one of: * databaseName * schemaName * tableName For a Connection or Connection Config, the field type is always `CONNECTION_PROPERTY`. In this case, field_name specifies the exact property of the Connection or Connection Config that needs to be unparameterized. For Connection Config, the only supported field name is: * impersonate_user + * @param unparameterizeMetadataRequest + */ + public unparameterizeMetadata(unparameterizeMetadataRequest: UnparameterizeMetadataRequest, _options?: Configuration): Observable { + const requestContextPromise = this.requestFactory.unparameterizeMetadata(unparameterizeMetadataRequest, _options); + + // build promise chain + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); + } + + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + pipe(mergeMap((response: ResponseContext) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.unparameterizeMetadata(rsp))); + })); + } + + /** + * Version: 26.5.0.cl or later Allows unpublishing metadata objects from organizations in ThoughtSpot. Requires ADMINISTRATION role and TENANT scope. The API endpoint allows unpublishing the following types of metadata objects: * Liveboards * Answers * Logical Tables When unpublishing objects, you can: * Include dependencies by setting `include_dependencies` to true - this will unpublish all dependent objects if no other published object is using them * Force unpublish by setting `force` to true - this will break all dependent objects in the unpublished organizations + * @param unpublishMetadataRequest + */ + public unpublishMetadata(unpublishMetadataRequest: UnpublishMetadataRequest, _options?: Configuration): Observable { + const requestContextPromise = this.requestFactory.unpublishMetadata(unpublishMetadataRequest, _options); + + // build promise chain + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); + } + + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + pipe(mergeMap((response: ResponseContext) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.unpublishMetadata(rsp))); + })); + } + + /** + * Version: 10.12.0.cl or later Updates the properties of a [custom calendar](https://docs.thoughtspot.com/cloud/latest/connections-cust-cal). Requires `DATAMANAGEMENT` (**Can manage data**) or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your ThoughtSpot instance, the `CAN_MANAGE_CUSTOM_CALENDAR` (**Can manage custom calendars**) privilege is required. #### Usage guidelines You can update the properties of a calendar using one of the following methods: * `FROM_INPUT_PARAMS` to update the calendar properties with the values defined in the API request. * `FROM_EXISTING_TABLE` Creates a calendar from the parameters defined in the API request. To update a custom calendar, specify the calendar ID as a path parameter in the request URL and the following parameters in the request body: * Connection ID and Table name * Database and schema name attributes: For most Cloud Data Warehouse (CDW) connectors, both `database_name` and `schema_name` attributes are required. However, the attribute requirements are conditional and vary based on the connector type and its metadata structure. For example, for connectors such as Teradata, MySQL, SingleSore, Amazon Aurora MySQL, Amazon RDS MySQL, Oracle, and GCP_MYSQL, the `schema_name` is required, whereas the `database_name` attribute is not. Similarly, connectors such as ClickHouse require you to specify the `database_name` and the schema specification in such cases is optional. The API allows you to modify the calendar type, month offset value, start and end date, starting day of the week, and prefixes assigned to the year and quarter labels. #### Examples Update a custom calendar using an existing Table in ThoughtSpot: ``` { \"update_method\": \"FROM_EXISTING_TABLE\", \"table_reference\": { \"connection_identifier\": \"Connection1\", \"database_name\": \"db1\", \"table_name\": \"custom_calendar_2025\", \"schame_name\": \"schemaVar\" } } ``` Update a custom calendar with the attributes defined in the API request: ``` { \"update_method\": \"FROM_INPUT_PARAMS\", \"table_reference\": { \"connection_identifier\": \"Connection1\", \"database_name\": \"db1\", \"table_name\": \"custom_calendar_2025\", \"schame_name\": \"schemaVar\" }, \"month_offset\": \"August\", \"start_day_of_week\": \"Monday\", \"start_date\": \"08/01/2025\", \"end_date\": \"07/31/2026\" } ``` + * @param calendarIdentifier Unique Id or name of the calendar. + * @param updateCalendarRequest + */ + public updateCalendar(calendarIdentifier: string, updateCalendarRequest: UpdateCalendarRequest, _options?: Configuration): Observable { + const requestContextPromise = this.requestFactory.updateCalendar(calendarIdentifier, updateCalendarRequest, _options); + + // build promise chain + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); + } + + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + pipe(mergeMap((response: ResponseContext) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.updateCalendar(rsp))); + })); + } + + /** + * Version: 26.4.0.cl or later Updates an existing collection in ThoughtSpot. #### Supported operations This API endpoint lets you perform the following operations: * Update collection name and description * Change visibility settings * Add metadata objects to the collection (operation: ADD) * Remove metadata objects from the collection (operation: REMOVE) * Replace all metadata objects in the collection (operation: REPLACE) #### Operation types * **ADD**: Adds the specified metadata objects to the existing collection without removing current items * **REMOVE**: Removes only the specified metadata objects from the collection * **REPLACE**: Replaces all existing metadata objects with the specified items (default behavior) + * @param collectionIdentifier Unique GUID of the collection. Note: Collection names cannot be used as identifiers since duplicate names are allowed. + * @param updateCollectionRequest + */ + public updateCollection(collectionIdentifier: string, updateCollectionRequest: UpdateCollectionRequest, _options?: Configuration): Observable { + const requestContextPromise = this.requestFactory.updateCollection(collectionIdentifier, updateCollectionRequest, _options); + + // build promise chain + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); + } + + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + pipe(mergeMap((response: ResponseContext) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.updateCollection(rsp))); + })); + } + + /** + * Version: 10.12.0.cl or later Creates, updates, or deletes column security rules for specified tables. This API endpoint allows you to create, update, or delete column-level security rules on columns of a table. The operation follows an \"all or none\" policy: if defining security rules for any of the provided columns fails, the entire operation will be rolled back, and no rules will be created. #### Usage guidelines - Provide table identifier using either `identifier` (GUID or name) or `obj_identifier` (object ID) - Use `clear_csr: true` to remove all column security rules from the table - For each column, specify the security rule using `column_security_rules` array - Use `is_unsecured: true` to mark a specific column as unprotected - Use `group_access` operations to manage group associations: - `ADD`: Add groups to the column\'s access list - `REMOVE`: Remove groups from the column\'s access list - `REPLACE`: Replace all existing groups with the specified groups #### Required permissions - `ADMINISTRATION` - Can administer ThoughtSpot - `DATAMANAGEMENT` - Can manage data (if RBAC is disabled) - `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` - Can manage worksheet views and tables (if RBAC is enabled) #### Example request ```json { \"identifier\": \"table-guid\", \"obj_identifier\": \"table-object-id\", \"clear_csr\": false, \"column_security_rules\": [ { \"column_identifier\": \"col id or col name\", \"is_unsecured\": false, \"group_access\": [ { \"operation\": \"ADD\", \"group_identifiers\": [\"hr_group_id\", \"hr_group_name\", \"finance_group_id\"] } ] }, { \"column_identifier\": \"col id or col name\", \"is_unsecured\": true }, { \"column_identifier\": \"col id or col name\", \"is_unsecured\": false, \"group_access\": [ { \"operation\": \"REPLACE\", \"group_identifiers\": [\"management_group_id\", \"management_group_name\"] } ] } ] } ``` #### Request Body Schema - `identifier` (string, optional): GUID or name of the table for which we want to create column security rules - `obj_identifier` (string, optional): The object ID of the table - `clear_csr` (boolean, optional): If true, then all the secured columns will be marked as unprotected, and all the group associations will be removed - `column_security_rules` (array of objects, required): An array where each object defines the security rule for a specific column Each column security rule object contains: - `column_identifier` (string, required): Column identifier (col_id or name) - `is_unsecured` (boolean, optional): If true, the column will be marked as unprotected and all groups associated with it will be removed - `group_access` (array of objects, optional): Array of group operation objects Each group operation object contains: - `operation` (string, required): Operation type - ADD, REMOVE, or REPLACE - `group_identifiers` (array of strings, required): Array of group identifiers (name or GUID) on which the operation will be performed #### Response This API does not return any response body. A successful operation returns HTTP 200 status code. #### Operation Types - **ADD**: Adds the specified groups to the column\'s access list - **REMOVE**: Removes the specified groups from the column\'s access list - **REPLACE**: Replaces all existing groups with the specified groups + * @param updateColumnSecurityRulesRequest + */ + public updateColumnSecurityRules(updateColumnSecurityRulesRequest: UpdateColumnSecurityRulesRequest, _options?: Configuration): Observable { + const requestContextPromise = this.requestFactory.updateColumnSecurityRules(updateColumnSecurityRulesRequest, _options); + + // build promise chain + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); + } + + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + pipe(mergeMap((response: ResponseContext) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.updateColumnSecurityRules(rsp))); + })); + } + + /** + * Version: 9.2.0.cl or later Updates Git repository configuration settings. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance on your instance, the `CAN_SETUP_VERSION_CONTROL` (**Can set up version control**) privilege. + * @param updateConfigRequest + */ + public updateConfig(updateConfigRequest: UpdateConfigRequest, _options?: Configuration): Observable { + const requestContextPromise = this.requestFactory.updateConfig(updateConfigRequest, _options); + + // build promise chain + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); + } + + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + pipe(mergeMap((response: ResponseContext) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.updateConfig(rsp))); + })); + } + + /** + * Version: 9.2.0.cl or later **Important**: This endpoint is deprecated and will be removed from ThoughtSpot in September 2025. ThoughtSpot strongly recommends using the [Update connection V2](#/http/api-endpoints/connections/update-connection-v2) endpoint to update your connection objects. #### Usage guidelines Updates a connection object. Requires `DATAMANAGEMENT` (**Can manage data**) and edit permissions to the connection object, or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) privilege is required. To update a connection object, pass these parameters in your API request: 1. GUID of the connection object. 2. If you are updating tables or database schema of a connection object: a. Add the updated JSON map of metadata with database, schema, and tables in `data_warehouse_config`. b. Set `validate` to `true`. 3. If you are updating a configuration attribute, connection name, or description, you can set `validate` to `false`. + * @param updateConnectionRequest + */ + public updateConnection(updateConnectionRequest: UpdateConnectionRequest, _options?: Configuration): Observable { + const requestContextPromise = this.requestFactory.updateConnection(updateConnectionRequest, _options); + + // build promise chain + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); + } + + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + pipe(mergeMap((response: ResponseContext) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.updateConnection(rsp))); + })); + } + + /** + * Version: 10.12.0.cl or later Updates a connection configuration object. Requires `DATAMANAGEMENT` (**Can manage data**) and edit permissions to the connection object, or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) privilege is required. #### Supported operations This API endpoint lets you perform the following operations in a single API request: * Edit the name or description of the configuration * Edit the configuration properties * Edit the `policy_type` * Edit the type of authentication * Enable or disable a configuration #### Parameterized Connection Support For parameterized oauth based connections, only the `same_as_parent` and `policy_process_options` attributes are allowed. These attributes are not applicable to connections that are not parameterized. **NOTE**: When updating a configuration where `disabled` is `true`, you must reset `disabled` to `true` in your update request payload. If not explicitly set again, the API will default `disabled` to `false`. + * @param configurationIdentifier Unique ID or name of the configuration. + * @param updateConnectionConfigurationRequest + */ + public updateConnectionConfiguration(configurationIdentifier: string, updateConnectionConfigurationRequest: UpdateConnectionConfigurationRequest, _options?: Configuration): Observable { + const requestContextPromise = this.requestFactory.updateConnectionConfiguration(configurationIdentifier, updateConnectionConfigurationRequest, _options); + + // build promise chain + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); + } + + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + pipe(mergeMap((response: ResponseContext) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.updateConnectionConfiguration(rsp))); + })); + } + + /** + * Version: 26.6.0.cl or later Activates or deactivates a connection. A deactivated connection cannot be used for queries or operations until it is activated again. Requires `DATAMANAGEMENT` (**Can manage data**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) privilege is required. Only the connection owner or an administrator can perform this operation. #### Usage guidelines To update the status of a connection, specify the connection GUID or name in the `connection_identifier` path parameter and the desired `status` in the request body. - **ACTIVATED**: Enables the connection. Queries and operations can resume on an activated connection. - **DEACTIVATED**: Disables the connection. It does not remove the connection metadata, but only makes the connection unavailable for queries and operations. You can reactivate a deactivated connection by setting \"status\": \"ACTIVATED\". + * @param connectionIdentifier Unique ID or name of the connection. + * @param updateConnectionStatusRequest + */ + public updateConnectionStatus(connectionIdentifier: string, updateConnectionStatusRequest: UpdateConnectionStatusRequest, _options?: Configuration): Observable { + const requestContextPromise = this.requestFactory.updateConnectionStatus(connectionIdentifier, updateConnectionStatusRequest, _options); + + // build promise chain + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); + } + + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + pipe(mergeMap((response: ResponseContext) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.updateConnectionStatus(rsp))); + })); + } + + /** + * Version: 10.4.0.cl or later Updates a connection object. Requires `DATAMANAGEMENT` (**Can manage data**) and edit permissions to the connection object, or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) privilege is required. To update a connection object, pass these parameters in your API request: 1. GUID of the connection object. 2. If you are updating tables or database schema of a connection object: a. Add the updated JSON map of metadata with database, schema, and tables in `data_warehouse_config`. b. Set `validate` to `true`. **NOTE:** If the `authentication_type` is anything other than SERVICE_ACCOUNT, you must explicitly provide the authenticationType property in the payload. If you do not specify authenticationType, the API will default to SERVICE_ACCOUNT as the authentication type. * A JSON map of configuration attributes, database details, and table properties in `data_warehouse_config` as shown in the following example: * This is an example of updating a single table in a empty connection: ``` { \"authenticationType\": \"SERVICE_ACCOUNT\", \"externalDatabases\": [ { \"name\": \"DEVELOPMENT\", \"isAutoCreated\": false, \"schemas\": [ { \"name\": \"TS_dataset\", \"tables\": [ { \"name\": \"DEMORENAME\", \"type\": \"TABLE\", \"description\": \"\", \"selected\": true, \"linked\": true, \"gid\": 0, \"datasetId\": \"-1\", \"subType\": \"\", \"reportId\": \"\", \"viewId\": \"\", \"columns\": [ { \"name\": \"Col1\", \"type\": \"VARCHAR\", \"canImport\": true, \"selected\": true, \"description\": \"\", \"isLinkedActive\": true, \"isAggregate\": false }, { \"name\": \"Col2\", \"type\": \"VARCHAR\", \"canImport\": true, \"selected\": true, \"description\": \"\", \"isLinkedActive\": true, \"isAggregate\": false }, { \"name\": \"Col3\", \"type\": \"VARCHAR\", \"canImport\": true, \"selected\": true, \"description\": \"\", \"isLinkedActive\": true, \"isAggregate\": false }, { \"name\": \"Col312\", \"type\": \"VARCHAR\", \"canImport\": true, \"selected\": true, \"description\": \"\", \"isLinkedActive\": true, \"isAggregate\": false }, { \"name\": \"Col4\", \"type\": \"VARCHAR\", \"canImport\": true, \"selected\": true, \"description\": \"\", \"isLinkedActive\": true, \"isAggregate\": false } ], \"relationships\": [] } ] } ] } ], \"configuration\": { \"password\": \"\", \"database\": \"DEVELOPMENT\", \"role\": \"DEV\", \"accountName\": \"thoughtspot_partner\", \"warehouse\": \"DEMO_WH\", \"user\": \"DEV_USER\" } } ``` * This is an example of updating a single table in an existing connection with tables: ``` { \"authenticationType\": \"SERVICE_ACCOUNT\", \"externalDatabases\": [ { \"name\": \"DEVELOPMENT\", \"isAutoCreated\": false, \"schemas\": [ { \"name\": \"TS_dataset\", \"tables\": [ { \"name\": \"CUSTOMER\", \"type\": \"TABLE\", \"description\": \"\", \"selected\": true, \"linked\": true, \"gid\": 0, \"datasetId\": \"-1\", \"subType\": \"\", \"reportId\": \"\", \"viewId\": \"\", \"columns\": [], \"relationships\": [] }, { \"name\": \"tpch5k_falcon_default_schema_users\", \"type\": \"TABLE\", \"description\": \"\", \"selected\": true, \"linked\": true, \"gid\": 0, \"datasetId\": \"-1\", \"subType\": \"\", \"reportId\": \"\", \"viewId\": \"\", \"columns\": [ { \"name\": \"user_id\", \"type\": \"INT64\", \"canImport\": true, \"selected\": true, \"description\": \"\", \"isLinkedActive\": true, \"isAggregate\": false }, { \"name\": \"product_id\", \"type\": \"INT64\", \"canImport\": true, \"selected\": true, \"description\": \"\", \"isLinkedActive\": true, \"isAggregate\": false }, { \"name\": \"user_cost\", \"type\": \"INT64\", \"canImport\": true, \"selected\": true, \"description\": \"\", \"isLinkedActive\": true, \"isAggregate\": false } ], \"relationships\": [] } ] } ] } ], \"configuration\": { \"password\": \"\", \"database\": \"DEVELOPMENT\", \"role\": \"DEV\", \"accountName\": \"thoughtspot_partner\", \"warehouse\": \"DEMO_WH\", \"user\": \"DEV_USER\" } } ``` 3. If you are updating a configuration attribute, connection name, or description, you can set `validate` to `false`. **NOTE:** If the `authentication_type` is anything other than SERVICE_ACCOUNT, you must explicitly provide the authenticationType property in the payload. If you do not specify authenticationType, the API will default to SERVICE_ACCOUNT as the authentication type. * A JSON map of configuration attributes in `data_warehouse_config`. The following example shows the configuration attributes for a Snowflake connection: ``` { \"configuration\":{ \"accountName\":\"thoughtspot_partner\", \"user\":\"tsadmin\", \"password\":\"TestConn123\", \"role\":\"sysadmin\", \"warehouse\":\"MEDIUM_WH\" }, \"externalDatabases\":[ ] } ``` + * @param connectionIdentifier Unique ID or name of the connection. + * @param updateConnectionV2Request + */ + public updateConnectionV2(connectionIdentifier: string, updateConnectionV2Request: UpdateConnectionV2Request, _options?: Configuration): Observable { + const requestContextPromise = this.requestFactory.updateConnectionV2(connectionIdentifier, updateConnectionV2Request, _options); + + // build promise chain + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); + } + + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + pipe(mergeMap((response: ResponseContext) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.updateConnectionV2(rsp))); + })); + } + + /** + * Version: 9.6.0.cl or later Updates a custom action. Requires `DEVELOPER` (**Has Developer privilege**) or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `DEVELOPER` (**Has developer privilege**) privilege is required. #### Usage Guidelines The API allows you to modify the following properties: * Name of the custom action * Action availability to groups * Association to metadata objects * Authentication settings for a URL-based action For more information, see [Custom actions](https://developers.thoughtspot.com/docs/custom-action-intro). + * @param customActionIdentifier Unique ID or name of the custom action. + * @param updateCustomActionRequest + */ + public updateCustomAction(customActionIdentifier: string, updateCustomActionRequest: UpdateCustomActionRequest, _options?: Configuration): Observable { + const requestContextPromise = this.requestFactory.updateCustomAction(customActionIdentifier, updateCustomActionRequest, _options); + + // build promise chain + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); + } + + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + pipe(mergeMap((response: ResponseContext) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.updateCustomAction(rsp))); + })); + } + + /** + * Version: 9.9.0.cl or later Updates a DBT connection object. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege or `DATAMANAGEMENT` (**Can manage data ThoughtSpot**) privilege, along with an existing DBT connection. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the following data control privileges may be required: - `CAN_MANAGE_CUSTOM_CALENDAR`(**Can manage custom calendars**) - `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) - `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` (**Can manage data models**) #### About update DBT connection You can modify DBT connection object properties such as embrace connection name, embrace database name, import type, account identifier, access token, project identifier and environment (or) embrace connection, embrace database name, import type, file_content settings. + * @param dbtConnectionIdentifier Unique ID of the DBT Connection. + * @param connectionName Name of the connection. + * @param databaseName Name of the Database. + * @param importType Mention type of Import + * @param accessToken Access token is mandatory when Import_Type is DBT_CLOUD. + * @param dbtUrl DBT URL is mandatory when Import_Type is DBT_CLOUD. + * @param accountId Account ID is mandatory when Import_Type is DBT_CLOUD + * @param projectId Project ID is mandatory when Import_Type is DBT_CLOUD + * @param dbtEnvId DBT Environment ID\\\" + * @param projectName Name of the project + * @param fileContent Upload DBT Manifest and Catalog artifact files as a ZIP file. This field is Mandatory when Import Type is \\\'ZIP_FILE\\\' + */ + public updateDbtConnection(dbtConnectionIdentifier: string, connectionName?: string, databaseName?: string, importType?: string, accessToken?: string, dbtUrl?: string, accountId?: string, projectId?: string, dbtEnvId?: string, projectName?: string, fileContent?: HttpFile, _options?: Configuration): Observable { + const requestContextPromise = this.requestFactory.updateDbtConnection(dbtConnectionIdentifier, connectionName, databaseName, importType, accessToken, dbtUrl, accountId, projectId, dbtEnvId, projectName, fileContent, _options); + + // build promise chain + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); + } + + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + pipe(mergeMap((response: ResponseContext) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.updateDbtConnection(rsp))); + })); + } + + /** + * Version: 10.12.0.cl or later Updates a customization configuration for the notification email. #### Pre-requisites Requires `DEVELOPER` (**has developer privilege**) or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `DEVELOPER` (**Has developer privilege**) privilege is required. **NOTE**:This endpoint in currently in beta. Contact ThoughtSpot support to enable this on your instance. #### Usage guidelines To update a custom configuration pass these parameters in your API request: - A JSON map of configuration attributes `template_properties`. The following example shows a sample set of customization configuration: ``` { { \"cta_button_bg_color\": \"#444DEA\", \"cta_text_font_color\": \"#FFFFFF\", \"primary_bg_color\": \"#D3DEF0\", \"logo_url\": \"https://storage.pardot.com/710713/1642089901EbkRibJq/TS_fullworkmark_darkmode.png\", \"font_family\": \"\", \"product_name\": \"ThoughtSpot\", \"footer_address\": \"444 Castro St, Suite 1000 Mountain View, CA 94041\", \"footer_phone\": \"(800) 508-7008\", \"replacement_value_for_liveboard\": \"Dashboard\", \"replacement_value_for_answer\": \"Chart\", \"replacement_value_for_spot_iq\": \"AI Insights\", \"hide_footer_phone\": false, \"hide_footer_address\": false, \"hide_product_name\": false, \"hide_manage_notification\": false, \"hide_mobile_app_nudge\": false, \"hide_privacy_policy\": false, \"hide_ts_vocabulary_definitions\": false, \"hide_error_message\": false, \"hide_unsubscribe_link\": false, \"hide_notification_status\": false, \"hide_modify_alert\": false, \"company_website_url\": \"https://your-website.com/\", \"company_privacy_policy_url\" : \"https://link-to-privacy-policy.com/\", \"contact_support_url\": \"https://link-to-contact-support.com/\", \"hide_contact_support_url\": false, \"hide_logo_url\" : false } } ``` + * @param updateEmailCustomizationRequest + */ + public updateEmailCustomization(updateEmailCustomizationRequest: UpdateEmailCustomizationRequest, _options?: Configuration): Observable { + const requestContextPromise = this.requestFactory.updateEmailCustomization(updateEmailCustomizationRequest, _options); + + // build promise chain + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); + } + + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + pipe(mergeMap((response: ResponseContext) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.updateEmailCustomization(rsp))); + })); + } + + /** + * Update header attributes for a given list of header objects. Version: 10.6.0.cl or later ## Prerequisites - **Privileges Required:** - `DATAMANAGEMENT` (Can manage data) or `ADMINISTRATION` (Can administer ThoughtSpot). - **Additional Privileges (if RBAC is enabled):** - `ORG_ADMINISTRATION` (Can manage orgs). --- ## Usage Guidelines ### Parameters 1. **headers_update** - **Description:** List of header objects with their attributes to be updated. Each object contains a list of attributes to be updated in the header. - **Usage:** - You must provide either `identifier` or `obj_identifier`, but not both. Both fields cannot be empty. - When `org_identifier` is set to `-1`, only the `identifier` value is accepted; `obj_identifier` is not allowed. 2. **org_identifier** - **Description:** GUID (Globally Unique Identifier) or name of the organization. - **Usage:** - Leaving this field empty assumes that the changes should be applied to the current organization - Provide `org_guid` or `org_name` to uniquely identify the organization where changes need to be applied. . - Provide `-1` if changes have to be applied across all the org. --- ## Note Currently, this API is enabled only for updating the `obj_identifier` attribute. Only `text` will be allowed in attribute\'s value. ## Best Practices 1. **Backup Before Conversion:** Always export metadata as a backup before initiating the update process --- ## Examples ### Only `identifier` is given ```json { \"headers_update\": [ { \"identifier\": \"guid_1\", \"obj_identifier\": \"\", \"type\": \"LOGICAL_COLUMN\", \"attributes\": [ { \"name\": \"obj_id\", \"value\": \"custom_object_id\" } ] } ], \"org_identifier\": \"orgGuid\" } ``` ### Only `obj_identifier` is given ```json { \"headers_update\": [ { \"obj_identifier\": \"custom_object_id\", \"type\": \"ANSWER\", \"attributes\": [ { \"name\": \"obj_id\", \"value\": \"custom_object_id\" } ] } ], \"org_identifier\": \"orgName\" } ``` ### Executing update for all org `-1` ```json { \"headers_update\": [ { \"identifier\": \"guid_1\", \"type\": \"ANSWER\", \"attributes\": [ { \"name\": \"obj_id\", \"value\": \"custom_object_id\" } ] } ], \"org_identifier\": -1 } ``` ### Optional `type` is not provided ```json { \"headers_update\": [ { \"identifier\": \"guid_1\", \"attributes\": [ { \"name\": \"obj_id\", \"value\": \"custom_object_id\" } ] } ], \"org_identifier\": -1 } ``` + * @param updateMetadataHeaderRequest + */ + public updateMetadataHeader(updateMetadataHeaderRequest: UpdateMetadataHeaderRequest, _options?: Configuration): Observable { + const requestContextPromise = this.requestFactory.updateMetadataHeader(updateMetadataHeaderRequest, _options); + + // build promise chain + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); + } + + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + pipe(mergeMap((response: ResponseContext) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.updateMetadataHeader(rsp))); + })); + } + + /** + * Update object IDs for given metadata objects. Version: 10.8.0.cl or later ## Prerequisites - **Privileges Required:** - `DATAMANAGEMENT` (Can manage data) or `ADMINISTRATION` (Can administer ThoughtSpot). - **Additional Privileges (if RBAC is enabled):** - `ORG_ADMINISTRATION` (Can manage orgs). --- ## Usage Guidelines ### Parameters 1. **metadata** - **Description:** List of metadata objects to update their object IDs. - **Usage:** - Use either `current_obj_id` alone OR use `metadata_identifier` with `type` (when needed). - When using `metadata_identifier`, the `type` field is required if using a name instead of a GUID. - The `new_obj_id` field is always required. --- ## Note This API is specifically designed for updating object IDs of metadata objects. It internally uses the header update mechanism to perform the changes. ## Best Practices 1. **Backup Before Update:** Always export metadata as a backup before initiating the update process. 2. **Validation:** - When using `current_obj_id`, ensure it matches the existing object ID exactly. - When using `metadata_identifier` with a name, ensure the `type` is specified correctly. - Verify that the `new_obj_id` follows your naming conventions and is unique within your system. --- ## Examples ### Using current_obj_id ```json { \"metadata\": [ { \"current_obj_id\": \"existing_object_id\", \"new_obj_id\": \"new_object_id\" } ] } ``` ### Using metadata_identifier with GUID ```json { \"metadata\": [ { \"metadata_identifier\": \"01234567-89ab-cdef-0123-456789abcdef\", \"new_obj_id\": \"new_object_id\" } ] } ``` ### Using metadata_identifier with name and type ```json { \"metadata\": [ { \"metadata_identifier\": \"My Answer\", \"type\": \"ANSWER\", \"new_obj_id\": \"new_object_id\" } ] } ``` ### Multiple objects update ```json { \"metadata\": [ { \"current_obj_id\": \"existing_object_id_1\", \"new_obj_id\": \"new_object_id_1\" }, { \"metadata_identifier\": \"My Worksheet\", \"type\": \"LOGICAL_TABLE\", \"new_obj_id\": \"new_object_id_2\" } ] } ``` + * @param updateMetadataObjIdRequest + */ + public updateMetadataObjId(updateMetadataObjIdRequest: UpdateMetadataObjIdRequest, _options?: Configuration): Observable { + const requestContextPromise = this.requestFactory.updateMetadataObjId(updateMetadataObjIdRequest, _options); + + // build promise chain + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); + } + + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + pipe(mergeMap((response: ResponseContext) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.updateMetadataObjId(rsp))); + })); + } + + /** + * Version: 9.0.0.cl or later Updates an Org object. You can modify Org properties such as name, description, and user associations. Requires cluster administration (**Can administer Org**) privileges. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `ORG_ADMINISTRATION` (**Can manage Orgs**) privilege is required. + * @param orgIdentifier ID or name of the Org + * @param updateOrgRequest + */ + public updateOrg(orgIdentifier: string, updateOrgRequest: UpdateOrgRequest, _options?: Configuration): Observable { + const requestContextPromise = this.requestFactory.updateOrg(orgIdentifier, updateOrgRequest, _options); + + // build promise chain + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); + } + + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + pipe(mergeMap((response: ResponseContext) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.updateOrg(rsp))); + })); + } + + /** + * Version: 9.5.0.cl or later Updates the properties of a Role object. Available only if [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance. To update a Role, the `ROLE_ADMINISTRATION` (**Can manage roles**) privilege is required. + * @param roleIdentifier Unique ID or name of the Role. + * @param updateRoleRequest + */ + public updateRole(roleIdentifier: string, updateRoleRequest: UpdateRoleRequest, _options?: Configuration): Observable { + const requestContextPromise = this.requestFactory.updateRole(roleIdentifier, updateRoleRequest, _options); + + // build promise chain + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); + } + + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + pipe(mergeMap((response: ResponseContext) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.updateRole(rsp))); + })); + } + + /** + * Update schedule. Version: 9.4.0.cl or later Updates a scheduled Liveboard job. Requires at least edit access to Liveboards. To update a schedule on behalf of another user, you need `ADMINISTRATION` (**Can administer Org**) or `JOBSCHEDULING` (**Can schedule for others**) privilege and edit access to the Liveboard. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `JOBSCHEDULING` (**Can schedule for others**) privilege is required. The API endpoint allows you to pause a scheduled job, change the status of a paused job. You can also edit the recipients list, frequency of the job, format of the file to send to the recipients in email notifications, PDF options, and time zone setting. + * @param scheduleIdentifier Unique ID or name of the schedule. + * @param updateScheduleRequest + */ + public updateSchedule(scheduleIdentifier: string, updateScheduleRequest: UpdateScheduleRequest, _options?: Configuration): Observable { + const requestContextPromise = this.requestFactory.updateSchedule(scheduleIdentifier, updateScheduleRequest, _options); + + // build promise chain + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); + } + + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + pipe(mergeMap((response: ResponseContext) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.updateSchedule(rsp))); + })); + } + + /** + * Version: 9.2.0.cl or later Updates the current configuration of the cluster. You must send the configuration data in JSON format. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privileges. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `APPLICATION_ADMINISTRATION` (**Can manage application settings**) privilege is required. + * @param updateSystemConfigRequest + */ + public updateSystemConfig(updateSystemConfigRequest: UpdateSystemConfigRequest, _options?: Configuration): Observable { + const requestContextPromise = this.requestFactory.updateSystemConfig(updateSystemConfigRequest, _options); + + // build promise chain + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); + } + + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + pipe(mergeMap((response: ResponseContext) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.updateSystemConfig(rsp))); + })); + } + + /** + * Version: 9.0.0.cl or later Updates a tag object. You can modify the `name` and `color` properties of a tag object. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `TAGMANAGEMENT` (**Can manage tags**) privilege is required to create, edit, and delete tags. + * @param tagIdentifier Name or Id of the tag. + * @param updateTagRequest + */ + public updateTag(tagIdentifier: string, updateTagRequest: UpdateTagRequest, _options?: Configuration): Observable { + const requestContextPromise = this.requestFactory.updateTag(tagIdentifier, updateTagRequest, _options); + + // build promise chain + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); + } + + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + pipe(mergeMap((response: ResponseContext) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.updateTag(rsp))); + })); + } + + /** + * Version: 9.0.0.cl or later Updates the properties of a user object. You can modify user properties such as username, email, and share notification settings. You can also assign new groups and Orgs, remove the user from a group or Org, reset password, and modify user preferences. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `USER_ADMINISTRATION` (**Can manage users**) privilege is required. + * @param userIdentifier GUID / name of the user + * @param updateUserRequest + */ + public updateUser(userIdentifier: string, updateUserRequest: UpdateUserRequest, _options?: Configuration): Observable { + const requestContextPromise = this.requestFactory.updateUser(userIdentifier, updateUserRequest, _options); + + // build promise chain + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); + } + + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + pipe(mergeMap((response: ResponseContext) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.updateUser(rsp))); + })); + } + + /** + * Version: 9.0.0.cl or later Updates the properties of a group object in ThoughtSpot. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `GROUP_ADMINISTRATION` (**Can manage groups**) privilege is required. #### Supported operations This API endpoint lets you perform the following operations in a single API request: * Edit [privileges](https://developers.thoughtspot.com/docs/?pageid=api-user-management#group-privileges) * Add or remove users * Change sharing visibility settings * Add or remove sub-groups * Assign a default Liveboard or update the existing settings + * @param groupIdentifier GUID or name of the group. + * @param updateUserGroupRequest + */ + public updateUserGroup(groupIdentifier: string, updateUserGroupRequest: UpdateUserGroupRequest, _options?: Configuration): Observable { + const requestContextPromise = this.requestFactory.updateUserGroup(groupIdentifier, updateUserGroupRequest, _options); + + // build promise chain + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); + } + + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + pipe(mergeMap((response: ResponseContext) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.updateUserGroup(rsp))); + })); + } + + /** + * Update a variable\'s name Version: 26.4.0.cl or later Allows updating a variable\'s name in ThoughtSpot. Requires ADMINISTRATION role and TENANT scope. The CAN_MANAGE_VARIABLES permission allows you to manage Formula Variables in the current organization scope. The API endpoint allows updating: * The variable name + * @param identifier Unique id or name of the variable to update. + * @param updateVariableRequest + */ + public updateVariable(identifier: string, updateVariableRequest: UpdateVariableRequest, _options?: Configuration): Observable { + const requestContextPromise = this.requestFactory.updateVariable(identifier, updateVariableRequest, _options); + + // build promise chain + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); + } + + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + pipe(mergeMap((response: ResponseContext) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.updateVariable(rsp))); + })); + } + + /** + * Update values for multiple variables Version: 10.14.0.cl or later **Note:** This API endpoint is deprecated and will be removed from ThoughtSpot in a future release. Use [POST /api/rest/2.0/template/variables/{identifier}/update-values](/api/rest/2.0/template/variables/%7Bidentifier%7D/update-values) instead. Allows updating values for multiple variables in ThoughtSpot. Requires ADMINISTRATION role. The CAN_MANAGE_VARIABLES permission allows you to manage Formula Variables in the current organization scope. The API endpoint allows: * Adding new values to variables * Replacing existing values * Deleting values from variables When updating variable values, you need to specify: * The variable identifiers * The values to add/replace/remove for each variable * The operation to perform (ADD, REPLACE, REMOVE, RESET) Behaviour based on operation type: * ADD - Adds values to the variable if this is a list type variable, else same as replace. * REPLACE - Replaces all values of a given set of constraints with the current set of values. * REMOVE - Removes any values which match the set of conditions of the variables if this is a list type variable, else clears value. * RESET - Removes all constrains for a given variable, scope is ignored + * @param updateVariableValuesRequest + */ + public updateVariableValues(updateVariableValuesRequest: UpdateVariableValuesRequest, _options?: Configuration): Observable { + const requestContextPromise = this.requestFactory.updateVariableValues(updateVariableValuesRequest, _options); + + // build promise chain + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); + } + + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + pipe(mergeMap((response: ResponseContext) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.updateVariableValues(rsp))); + })); + } + + /** + * Version: 10.14.0.cl or later Updates an existing webhook configuration by its unique id or name. Only the provided fields will be updated. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) or `DEVELOPER` (**Has developer privilege**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, users with `CAN_MANAGE_WEBHOOKS` (**Can manage webhooks**) privilege are also authorized to perform this action. + * @param webhookIdentifier Unique ID or name of the webhook configuration. + * @param updateWebhookConfigurationRequest + */ + public updateWebhookConfiguration(webhookIdentifier: string, updateWebhookConfigurationRequest: UpdateWebhookConfigurationRequest, _options?: Configuration): Observable { + const requestContextPromise = this.requestFactory.updateWebhookConfiguration(webhookIdentifier, updateWebhookConfigurationRequest, _options); + + // build promise chain + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); + } + + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + pipe(mergeMap((response: ResponseContext) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.updateWebhookConfiguration(rsp))); + })); + } + + /** + * Version: 26.4.0.cl or later Validates a communication channel configuration to ensure it is properly set up and can receive events. - Use `channel_type` to specify the type of communication channel to validate (e.g., WEBHOOK). - Use `channel_identifier` to provide the unique identifier or name for the communication channel. - Use `event_type` to specify the event type to validate for this channel. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) or `DEVELOPER` (**Has developer privilege**) privilege. For webhook channels, users with `CAN_MANAGE_WEBHOOKS` (**Can manage webhooks**) privilege are also authorized to perform this action. + * @param validateCommunicationChannelRequest + */ + public validateCommunicationChannel(validateCommunicationChannelRequest: ValidateCommunicationChannelRequest, _options?: Configuration): Observable { + const requestContextPromise = this.requestFactory.validateCommunicationChannel(validateCommunicationChannelRequest, _options); + + // build promise chain + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); + } + + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + pipe(mergeMap((response: ResponseContext) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.validateCommunicationChannel(rsp))); + })); + } + + /** + * Version: 10.10.0.cl or later Validates the email customization configuration if any set for the ThoughtSpot system. #### Pre-requisites Requires `DEVELOPER` (**has developer privilege**) or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `DEVELOPER` (**Has developer privilege**) privilege is required. **NOTE**:This endpoint in currently in beta. Contact ThoughtSpot support to enable this on your instance. + */ + public validateEmailCustomization(_options?: Configuration): Observable { + const requestContextPromise = this.requestFactory.validateEmailCustomization(_options); + + // build promise chain + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); + } + + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + pipe(mergeMap((response: ResponseContext) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.validateEmailCustomization(rsp))); + })); + } + + /** + * Version: 9.2.0.cl or later Validates the content of your source branch against the objects in your destination environment. Before merging content from your source branch to the destination branch, run this API operation from your destination environment and ensure that the changes from the source branch function in the destination environment. Requires `DATAMANAGEMENT` (**Can manage data**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance on your instance, the `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` (**Can manage data models**) privilege and edit access to the metadata objects. + * @param validateMergeRequest + */ + public validateMerge(validateMergeRequest: ValidateMergeRequest, _options?: Configuration): Observable> { + const requestContextPromise = this.requestFactory.validateMerge(validateMergeRequest, _options); + + // build promise chain + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); + } + + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + pipe(mergeMap((response: ResponseContext) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.validateMerge(rsp))); + })); + } + + /** + * Version: 9.12.0.cl or later Validates the authentication token specified in the API request. If your token is not valid, [Get a new token](#/http/api-endpoints/authentication/get-full-access-token). + * @param validateTokenRequest + */ + public validateToken(validateTokenRequest: ValidateTokenRequest, _options?: Configuration): Observable { + const requestContextPromise = this.requestFactory.validateToken(validateTokenRequest, _options); + + // build promise chain + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); + } + + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + pipe(mergeMap((response: ResponseContext) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.validateToken(rsp))); + })); + } + +} + +import { UsersApiRequestFactory, UsersApiResponseProcessor} from "../apis/UsersApi"; +export class ObservableUsersApi { + private requestFactory: UsersApiRequestFactory; + private responseProcessor: UsersApiResponseProcessor; + private configuration: Configuration; + + public constructor( + configuration: Configuration, + requestFactory?: UsersApiRequestFactory, + responseProcessor?: UsersApiResponseProcessor + ) { + this.configuration = configuration; + this.requestFactory = requestFactory || new UsersApiRequestFactory(configuration); + this.responseProcessor = responseProcessor || new UsersApiResponseProcessor(); + } + + /** + * Version: 9.7.0.cl or later Activates a deactivated user account. Requires `ADMINISTRATION` (**Can administer Thoughtspot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `USER_ADMINISTRATION` (**Can manage users**) privilege is required. To activate an inactive user account, the API request body must include the following information: - Username or the GUID of the user account. - Auth token generated for the deactivated user. The auth token is sent in the API response when a user is deactivated. - Password for the user account. + * @param activateUserRequest + */ + public activateUser(activateUserRequest: ActivateUserRequest, _options?: Configuration): Observable { + const requestContextPromise = this.requestFactory.activateUser(activateUserRequest, _options); + + // build promise chain + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); + } + + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + pipe(mergeMap((response: ResponseContext) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.activateUser(rsp))); + })); + } + + /** + * Version: 9.0.0.cl or later Updates the current password of the user. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `USER_ADMINISTRATION` (**Can manage users**) privilege is required. + * @param changeUserPasswordRequest + */ + public changeUserPassword(changeUserPasswordRequest: ChangeUserPasswordRequest, _options?: Configuration): Observable { + const requestContextPromise = this.requestFactory.changeUserPassword(changeUserPasswordRequest, _options); + + // build promise chain + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); + } + + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + pipe(mergeMap((response: ResponseContext) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.changeUserPassword(rsp))); + })); + } + + /** + * Version: 9.0.0.cl or later Creates a user in ThoughtSpot. The API endpoint allows you to configure several user properties such as email address, account status, share notification preferences, and sharing visibility. You can provision the user to [groups](https://docs.thoughtspot.com/cloud/latest/groups-privileges) and [Orgs](https://docs.thoughtspot.com/cloud/latest/orgs-overview). You can also add Liveboard, Answer, and Worksheet objects to the user’s favorites list, assign a default Liveboard for the user, and set user preferences. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `USER_ADMINISTRATION` (**Can manage users**) privilege is required. + * @param createUserRequest + */ + public createUser(createUserRequest: CreateUserRequest, _options?: Configuration): Observable { + const requestContextPromise = this.requestFactory.createUser(createUserRequest, _options); + + // build promise chain + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); + } + + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + pipe(mergeMap((response: ResponseContext) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.createUser(rsp))); + })); + } + + /** + * Version: 9.7.0.cl or later Deactivates a user account. Requires `ADMINISTRATION` (**Can administer Thoughtspot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `USER_ADMINISTRATION` (**Can manage users**) privilege is required. To deactivate a user account, the API request body must include the following information: - Username or the GUID of the user account - Base URL of the ThoughtSpot instance If the API request is successful, ThoughtSpot returns the activation URL in the response. The activation URL is valid for 14 days and can be used to re-activate the account and reset the password of the deactivated account. + * @param deactivateUserRequest + */ + public deactivateUser(deactivateUserRequest: DeactivateUserRequest, _options?: Configuration): Observable { + const requestContextPromise = this.requestFactory.deactivateUser(deactivateUserRequest, _options); + + // build promise chain + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); + } + + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + pipe(mergeMap((response: ResponseContext) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.deactivateUser(rsp))); + })); + } + + /** + * Version: 9.0.0.cl or later Deletes a user from the ThoughtSpot system. If you want to remove a user from a specific Org but not from ThoughtSpot, update the group and Org mapping properties of the user object via a POST API call to the [/api/rest/2.0/users/{user_identifier}/update](#/http/api-endpoints/users/update-user) endpoint. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `USER_ADMINISTRATION` (**Can manage users**) privilege is required. + * @param userIdentifier GUID / name of the user + */ + public deleteUser(userIdentifier: string, _options?: Configuration): Observable { + const requestContextPromise = this.requestFactory.deleteUser(userIdentifier, _options); + + // build promise chain + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); + } + + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + pipe(mergeMap((response: ResponseContext) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.deleteUser(rsp))); + })); + } + + /** + * Version: 9.0.0.cl or later Enforces logout on current user sessions. Use this API with caution as it may invalidate active user sessions and force users to re-login. Make sure you specify the usernames or GUIDs. If you pass null values in the API call, all user sessions on your cluster become invalid, and the users are forced to re-login. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `USER_ADMINISTRATION` (**Can manage users**) privilege is required. + * @param forceLogoutUsersRequest + */ + public forceLogoutUsers(forceLogoutUsersRequest: ForceLogoutUsersRequest, _options?: Configuration): Observable { + const requestContextPromise = this.requestFactory.forceLogoutUsers(forceLogoutUsersRequest, _options); + + // build promise chain + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); + } + + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + pipe(mergeMap((response: ResponseContext) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.forceLogoutUsers(rsp))); + })); + } + + /** + * Version: 9.0.0.cl or later Imports user data from external databases into ThoughtSpot. During the user import operation: * If the specified users are not available in ThoughtSpot, the users are created and assigned a default password. Defining a `default_password` in the API request is optional. * If `delete_unspecified_users` is set to `true`, the users not specified in the API request, excluding the `tsadmin`, `guest`, `system` and `su` users, are deleted. * If the specified user objects are already available in ThoughtSpot, the object properties are updated and synchronized as per the input data in the API request. A successful API call returns the object that represents the changes made in the ThoughtSpot system. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `USER_ADMINISTRATION` (**Can manage users**) privilege is required. + * @param importUsersRequest + */ + public importUsers(importUsersRequest: ImportUsersRequest, _options?: Configuration): Observable { + const requestContextPromise = this.requestFactory.importUsers(importUsersRequest, _options); + + // build promise chain + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); + } + + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + pipe(mergeMap((response: ResponseContext) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.importUsers(rsp))); + })); + } + + /** + * Version: 9.0.0.cl or later Resets the password of a user account. Administrators can reset password on behalf of a user. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `USER_ADMINISTRATION` (**Can manage users**) privilege is required. + * @param resetUserPasswordRequest + */ + public resetUserPassword(resetUserPasswordRequest: ResetUserPasswordRequest, _options?: Configuration): Observable { + const requestContextPromise = this.requestFactory.resetUserPassword(resetUserPasswordRequest, _options); + + // build promise chain + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); + } + + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + pipe(mergeMap((response: ResponseContext) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.resetUserPassword(rsp))); + })); + } + + /** + * Version: 9.0.0.cl or later Gets a list of users available on the ThoughtSpot system. To get details of a specific user, specify the user GUID or name. You can also filter the API response based on groups, Org ID, user visibility, account status, user type, and user preference settings and favorites. Available to all users. Users with `ADMINISTRATION` (**Can administer ThoughtSpot**) privileges can view all users properties. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `USER_ADMINISTRATION` (**Can manage users**) privilege is required. **NOTE**: If the API returns an empty list, consider increasing the value of the `record_size` parameter. To search across all available users, set `record_size` to `-1`. + * @param searchUsersRequest + */ + public searchUsers(searchUsersRequest: SearchUsersRequest, _options?: Configuration): Observable> { + const requestContextPromise = this.requestFactory.searchUsers(searchUsersRequest, _options); + + // build promise chain + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); + } + + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + pipe(mergeMap((response: ResponseContext) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.searchUsers(rsp))); + })); + } + + /** + * Version: 9.0.0.cl or later Updates the properties of a user object. You can modify user properties such as username, email, and share notification settings. You can also assign new groups and Orgs, remove the user from a group or Org, reset password, and modify user preferences. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `USER_ADMINISTRATION` (**Can manage users**) privilege is required. + * @param userIdentifier GUID / name of the user + * @param updateUserRequest + */ + public updateUser(userIdentifier: string, updateUserRequest: UpdateUserRequest, _options?: Configuration): Observable { + const requestContextPromise = this.requestFactory.updateUser(userIdentifier, updateUserRequest, _options); + + // build promise chain + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); + } + + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + pipe(mergeMap((response: ResponseContext) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.updateUser(rsp))); + })); + } + +} + +import { VariableApiRequestFactory, VariableApiResponseProcessor} from "../apis/VariableApi"; +export class ObservableVariableApi { + private requestFactory: VariableApiRequestFactory; + private responseProcessor: VariableApiResponseProcessor; + private configuration: Configuration; + + public constructor( + configuration: Configuration, + requestFactory?: VariableApiRequestFactory, + responseProcessor?: VariableApiResponseProcessor + ) { + this.configuration = configuration; + this.requestFactory = requestFactory || new VariableApiRequestFactory(configuration); + this.responseProcessor = responseProcessor || new VariableApiResponseProcessor(); + } + + /** + * Create a variable which can be used for parameterizing metadata objects Version: 26.4.0.cl or later Allows creating a variable which can be used for parameterizing metadata objects in ThoughtSpot. Requires ADMINISTRATION role and TENANT scope. The CAN_MANAGE_VARIABLES permission allows you to manage Formula Variables in the current organization scope. The API endpoint supports the following types of variables: * CONNECTION_PROPERTY - For connection properties * TABLE_MAPPING - For table mappings * CONNECTION_PROPERTY_PER_PRINCIPAL - For connection properties per principal. In order to use this please contact support to enable this. * FORMULA_VARIABLE - For Formula variables, introduced in 10.15.0.cl When creating a variable, you need to specify: * The variable type * A unique name for the variable * Whether the variable contains sensitive values (defaults to false) * The data type of the variable, only specify for formula variables (defaults to null) The operation will fail if: * The user lacks required permissions * The variable name already exists * The variable type is invalid + * @param createVariableRequest + */ + public createVariable(createVariableRequest: CreateVariableRequest, _options?: Configuration): Observable { + const requestContextPromise = this.requestFactory.createVariable(createVariableRequest, _options); + + // build promise chain + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); + } + + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + pipe(mergeMap((response: ResponseContext) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.createVariable(rsp))); + })); + } + + /** + * Delete a variable Version: 10.14.0.cl or later **Note:** This API endpoint is deprecated and will be removed from ThoughtSpot in a future release. Use [POST /api/rest/2.0/template/variables/delete](/api/rest/2.0/template/variables/delete) instead. Allows deleting a variable from ThoughtSpot. Requires ADMINISTRATION role and TENANT scope. The CAN_MANAGE_VARIABLES permission allows you to manage Formula Variables in the current organization scope. The API endpoint requires: * The variable identifier (ID or name) The operation will fail if: * The user lacks required permissions * The variable doesn\'t exist * The variable is being used by other objects + * @param identifier Unique id or name of the variable + */ + public deleteVariable(identifier: string, _options?: Configuration): Observable { + const requestContextPromise = this.requestFactory.deleteVariable(identifier, _options); + + // build promise chain + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); + } + + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + pipe(mergeMap((response: ResponseContext) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.deleteVariable(rsp))); + })); + } + + /** + * Delete variable(s) Version: 26.4.0.cl or later Allows deleting multiple variables from ThoughtSpot. Requires ADMINISTRATION role and TENANT scope. The CAN_MANAGE_VARIABLES permission allows you to manage Formula Variables in the current organization scope. The API endpoint requires: * The variable identifiers (IDs or names) The operation will fail if: * The user lacks required permissions * Any of the variables don\'t exist * Any of the variables are being used by other objects + * @param deleteVariablesRequest + */ + public deleteVariables(deleteVariablesRequest: DeleteVariablesRequest, _options?: Configuration): Observable { + const requestContextPromise = this.requestFactory.deleteVariables(deleteVariablesRequest, _options); + + // build promise chain + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); + } + + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + pipe(mergeMap((response: ResponseContext) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.deleteVariables(rsp))); + })); + } + + /** + * Update values for a variable Version: 26.4.0.cl or later Allows updating values for a specific variable in ThoughtSpot. Requires ADMINISTRATION role. The CAN_MANAGE_VARIABLES permission allows you to manage Formula Variables in the current organization scope. The API endpoint allows: * Adding new values to the variable * Replacing existing values * Deleting values from the variable * Resetting all values When updating variable values, you need to specify: * The variable identifier (ID or name) * The values to add/replace/remove * The operation to perform (ADD, REPLACE, REMOVE, RESET) Behaviour based on operation type: * ADD - Adds values to the variable if this is a list type variable, else same as replace. * REPLACE - Replaces all values of a given set of constraints with the current set of values. * REMOVE - Removes any values which match the set of conditions of the variables if this is a list type variable, else clears value. * RESET - Removes all constraints for the given variable, scope is ignored + * @param identifier Unique ID or name of the variable + * @param putVariableValuesRequest + */ + public putVariableValues(identifier: string, putVariableValuesRequest: PutVariableValuesRequest, _options?: Configuration): Observable { + const requestContextPromise = this.requestFactory.putVariableValues(identifier, putVariableValuesRequest, _options); + + // build promise chain + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); + } + + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + pipe(mergeMap((response: ResponseContext) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.putVariableValues(rsp))); + })); + } + + /** + * Search variables Version: 26.4.0.cl or later Allows searching for variables in ThoughtSpot. Requires ADMINISTRATION role. The CAN_MANAGE_VARIABLES permission allows you to manage Formula Variables in the current organization scope. The API endpoint supports searching variables by: * Variable identifier (ID or name) * Variable type * Name pattern (case-insensitive, supports % for wildcard) The search results can be formatted in three ways: * METADATA - Returns only variable metadata (default) * METADATA_AND_VALUES - Returns variable metadata and values The values can be filtered by scope: * org_identifier * principal_identifier * model_identifier + * @param searchVariablesRequest + */ + public searchVariables(searchVariablesRequest: SearchVariablesRequest, _options?: Configuration): Observable> { + const requestContextPromise = this.requestFactory.searchVariables(searchVariablesRequest, _options); + + // build promise chain + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); + } + + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + pipe(mergeMap((response: ResponseContext) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.searchVariables(rsp))); + })); + } + + /** + * Update a variable\'s name Version: 26.4.0.cl or later Allows updating a variable\'s name in ThoughtSpot. Requires ADMINISTRATION role and TENANT scope. The CAN_MANAGE_VARIABLES permission allows you to manage Formula Variables in the current organization scope. The API endpoint allows updating: * The variable name + * @param identifier Unique id or name of the variable to update. + * @param updateVariableRequest + */ + public updateVariable(identifier: string, updateVariableRequest: UpdateVariableRequest, _options?: Configuration): Observable { + const requestContextPromise = this.requestFactory.updateVariable(identifier, updateVariableRequest, _options); + + // build promise chain + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); + } + + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + pipe(mergeMap((response: ResponseContext) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.updateVariable(rsp))); + })); + } + + /** + * Update values for multiple variables Version: 10.14.0.cl or later **Note:** This API endpoint is deprecated and will be removed from ThoughtSpot in a future release. Use [POST /api/rest/2.0/template/variables/{identifier}/update-values](/api/rest/2.0/template/variables/%7Bidentifier%7D/update-values) instead. Allows updating values for multiple variables in ThoughtSpot. Requires ADMINISTRATION role. The CAN_MANAGE_VARIABLES permission allows you to manage Formula Variables in the current organization scope. The API endpoint allows: * Adding new values to variables * Replacing existing values * Deleting values from variables When updating variable values, you need to specify: * The variable identifiers * The values to add/replace/remove for each variable * The operation to perform (ADD, REPLACE, REMOVE, RESET) Behaviour based on operation type: * ADD - Adds values to the variable if this is a list type variable, else same as replace. * REPLACE - Replaces all values of a given set of constraints with the current set of values. * REMOVE - Removes any values which match the set of conditions of the variables if this is a list type variable, else clears value. * RESET - Removes all constrains for a given variable, scope is ignored + * @param updateVariableValuesRequest + */ + public updateVariableValues(updateVariableValuesRequest: UpdateVariableValuesRequest, _options?: Configuration): Observable { + const requestContextPromise = this.requestFactory.updateVariableValues(updateVariableValuesRequest, _options); + + // build promise chain + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); + } + + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + pipe(mergeMap((response: ResponseContext) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.updateVariableValues(rsp))); + })); + } + +} + +import { VersionControlApiRequestFactory, VersionControlApiResponseProcessor} from "../apis/VersionControlApi"; +export class ObservableVersionControlApi { + private requestFactory: VersionControlApiRequestFactory; + private responseProcessor: VersionControlApiResponseProcessor; + private configuration: Configuration; + + public constructor( + configuration: Configuration, + requestFactory?: VersionControlApiRequestFactory, + responseProcessor?: VersionControlApiResponseProcessor + ) { + this.configuration = configuration; + this.requestFactory = requestFactory || new VersionControlApiRequestFactory(configuration); + this.responseProcessor = responseProcessor || new VersionControlApiResponseProcessor(); + } + + /** + * Version: 9.2.0.cl or later Commits TML files of metadata objects to the Git branch configured on your instance. Requires at least edit access to objects used in the commit operation. Before using this endpoint to push your commits: * Enable Git integration on your instance. * Make sure the Git repository and branch details are configured on your instance. For more information, see [Git integration documentation](https://developers.thoughtspot.com/docs/git-integration). + * @param commitBranchRequest + */ + public commitBranch(commitBranchRequest: CommitBranchRequest, _options?: Configuration): Observable { + const requestContextPromise = this.requestFactory.commitBranch(commitBranchRequest, _options); + + // build promise chain + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); + } + + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + pipe(mergeMap((response: ResponseContext) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.commitBranch(rsp))); + })); + } + + /** + * Version: 9.2.0.cl or later Allows you to connect a ThoughtSpot instance to a Git repository. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance on your instance, the `CAN_SETUP_VERSION_CONTROL` (**Can set up version control**) privilege. You can use this API endpoint to connect your ThoughtSpot development and production environments to the development and production branches of a Git repository. Before using this endpoint to connect your ThoughtSpot instance to a Git repository, check the following prerequisites: * You have a Git repository. If you are using GitHub, make sure you have a valid account and an access token to connect ThoughtSpot to GitHub. For information about generating a token, see [GitHub Documentation](https://docs.github.com/en/authentication/keeping-your-account-and-data-secure/managing-your-personal-access-tokens). * Your access token has `repo` scope that grants full access to public and private repositories. * Your Git repository has a branch that can be configured as a default branch in ThoughtSpot. For more information, see [Git integration documentation](https://developers.thoughtspot.com/docs/?pageid=git-integration). **Note**: ThoughtSpot supports only GitHub / itHub Enterprise for CI/CD. + * @param createConfigRequest + */ + public createConfig(createConfigRequest: CreateConfigRequest, _options?: Configuration): Observable { + const requestContextPromise = this.requestFactory.createConfig(createConfigRequest, _options); + + // build promise chain + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); + } + + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + pipe(mergeMap((response: ResponseContext) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.createConfig(rsp))); + })); + } + + /** + * Version: 9.2.0.cl or later Deletes Git repository configuration from your ThoughtSpot instance. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance on your instance, the `CAN_SETUP_VERSION_CONTROL` (**Can set up version control**) privilege. + * @param deleteConfigRequest + */ + public deleteConfig(deleteConfigRequest: DeleteConfigRequest, _options?: Configuration): Observable { + const requestContextPromise = this.requestFactory.deleteConfig(deleteConfigRequest, _options); + + // build promise chain + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); + } + + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + pipe(mergeMap((response: ResponseContext) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.deleteConfig(rsp))); + })); + } + + /** + * Version: 9.2.0.cl or later Allows you to deploy a commit and publish TML content to your ThoughtSpot instance. Requires at least edit access to the objects used in the deploy operation. The API deploys the head of the branch unless a `commit_id` is specified in the API request. If the branch name is not defined in the request, the default branch is considered for deploying commits. For more information, see [Git integration documentation](https://developers.thoughtspot.com/docs/git-integration). + * @param deployCommitRequest + */ + public deployCommit(deployCommitRequest: DeployCommitRequest, _options?: Configuration): Observable> { + const requestContextPromise = this.requestFactory.deployCommit(deployCommitRequest, _options); + + // build promise chain + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); + } + + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + pipe(mergeMap((response: ResponseContext) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.deployCommit(rsp))); + })); + } + + /** + * Version: 9.2.0.cl or later Reverts TML objects to a previous commit specified in the API request. Requires at least edit access to objects. In the API request, specify the `commit_id`. If the branch name is not specified in the request, the API will consider the default branch configured on your instance. By default, the API reverts all objects. If the revert operation fails for one of the objects provided in the commit, the API returns an error and does not revert any object. For more information, see [Git integration documentation](https://developers.thoughtspot.com/docs/git-integration). + * @param commitId Commit id to which the object should be reverted + * @param revertCommitRequest + */ + public revertCommit(commitId: string, revertCommitRequest: RevertCommitRequest, _options?: Configuration): Observable { + const requestContextPromise = this.requestFactory.revertCommit(commitId, revertCommitRequest, _options); + + // build promise chain + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); + } + + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + pipe(mergeMap((response: ResponseContext) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.revertCommit(rsp))); + })); + } + + /** + * Version: 9.2.0.cl or later Gets a list of commits for a given metadata object. Requires `DATAMANAGEMENT` (**Can manage data**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance on your instance, the `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` (**Can manage data models**) privilege and edit access to the metadata objects. + * @param searchCommitsRequest + */ + public searchCommits(searchCommitsRequest: SearchCommitsRequest, _options?: Configuration): Observable> { + const requestContextPromise = this.requestFactory.searchCommits(searchCommitsRequest, _options); + + // build promise chain + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); + } + + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + pipe(mergeMap((response: ResponseContext) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.searchCommits(rsp))); + })); + } + + /** + * Version: 9.2.0.cl or later Gets Git repository connections configured on the ThoughtSpot instance. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance on your instance, the `CAN_SETUP_VERSION_CONTROL` (**Can set up version control**) privilege. + * @param searchConfigRequest + */ + public searchConfig(searchConfigRequest: SearchConfigRequest, _options?: Configuration): Observable> { + const requestContextPromise = this.requestFactory.searchConfig(searchConfigRequest, _options); + + // build promise chain + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); + } + + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + pipe(mergeMap((response: ResponseContext) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.searchConfig(rsp))); + })); + } + + /** + * Version: 9.2.0.cl or later Updates Git repository configuration settings. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance on your instance, the `CAN_SETUP_VERSION_CONTROL` (**Can set up version control**) privilege. + * @param updateConfigRequest + */ + public updateConfig(updateConfigRequest: UpdateConfigRequest, _options?: Configuration): Observable { + const requestContextPromise = this.requestFactory.updateConfig(updateConfigRequest, _options); + + // build promise chain + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); + } + + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + pipe(mergeMap((response: ResponseContext) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.updateConfig(rsp))); + })); + } + + /** + * Version: 9.2.0.cl or later Validates the content of your source branch against the objects in your destination environment. Before merging content from your source branch to the destination branch, run this API operation from your destination environment and ensure that the changes from the source branch function in the destination environment. Requires `DATAMANAGEMENT` (**Can manage data**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance on your instance, the `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` (**Can manage data models**) privilege and edit access to the metadata objects. + * @param validateMergeRequest + */ + public validateMerge(validateMergeRequest: ValidateMergeRequest, _options?: Configuration): Observable> { + const requestContextPromise = this.requestFactory.validateMerge(validateMergeRequest, _options); + + // build promise chain + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); + } + + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + pipe(mergeMap((response: ResponseContext) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.validateMerge(rsp))); + })); + } + +} + +import { WebhooksApiRequestFactory, WebhooksApiResponseProcessor} from "../apis/WebhooksApi"; +export class ObservableWebhooksApi { + private requestFactory: WebhooksApiRequestFactory; + private responseProcessor: WebhooksApiResponseProcessor; + private configuration: Configuration; + + public constructor( + configuration: Configuration, + requestFactory?: WebhooksApiRequestFactory, + responseProcessor?: WebhooksApiResponseProcessor + ) { + this.configuration = configuration; + this.requestFactory = requestFactory || new WebhooksApiRequestFactory(configuration); + this.responseProcessor = responseProcessor || new WebhooksApiResponseProcessor(); + } + + /** + * Version: 10.14.0.cl or later Creates a new webhook configuration to receive notifications for specified events. The webhook will be triggered when the configured events occur in the system. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) or `DEVELOPER` (**Has developer privilege**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, users with `CAN_MANAGE_WEBHOOKS` (**Can manage webhooks**) privilege are also authorized to perform this action. + * @param createWebhookConfigurationRequest + */ + public createWebhookConfiguration(createWebhookConfigurationRequest: CreateWebhookConfigurationRequest, _options?: Configuration): Observable { + const requestContextPromise = this.requestFactory.createWebhookConfiguration(createWebhookConfigurationRequest, _options); + + // build promise chain + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); + } + + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + pipe(mergeMap((response: ResponseContext) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.createWebhookConfiguration(rsp))); + })); + } + + /** + * Version: 10.14.0.cl or later Deletes one or more webhook configurations by their unique id or name. Returns status of each deletion operation, including successfully deleted webhooks and any failures with error details. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) or `DEVELOPER` (**Has developer privilege**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, users with `CAN_MANAGE_WEBHOOKS` (**Can manage webhooks**) privilege are also authorized to perform this action. + * @param deleteWebhookConfigurationsRequest + */ + public deleteWebhookConfigurations(deleteWebhookConfigurationsRequest: DeleteWebhookConfigurationsRequest, _options?: Configuration): Observable { + const requestContextPromise = this.requestFactory.deleteWebhookConfigurations(deleteWebhookConfigurationsRequest, _options); + + // build promise chain + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); + } + + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + pipe(mergeMap((response: ResponseContext) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.deleteWebhookConfigurations(rsp))); + })); + } + + /** + * Version: 10.14.0.cl or later Searches for webhook configurations based on various criteria such as Org, webhook identifier, event type, with support for pagination and sorting. Returns matching webhook configurations with their complete details. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) or `DEVELOPER` (**Has developer privilege**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, users with `CAN_MANAGE_WEBHOOKS` (**Can manage webhooks**) privilege are also authorized to perform this action. + * @param searchWebhookConfigurationsRequest + */ + public searchWebhookConfigurations(searchWebhookConfigurationsRequest: SearchWebhookConfigurationsRequest, _options?: Configuration): Observable { + const requestContextPromise = this.requestFactory.searchWebhookConfigurations(searchWebhookConfigurationsRequest, _options); + + // build promise chain + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); + } + + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + pipe(mergeMap((response: ResponseContext) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.searchWebhookConfigurations(rsp))); + })); + } + + /** + * Version: 10.14.0.cl or later Updates an existing webhook configuration by its unique id or name. Only the provided fields will be updated. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) or `DEVELOPER` (**Has developer privilege**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, users with `CAN_MANAGE_WEBHOOKS` (**Can manage webhooks**) privilege are also authorized to perform this action. + * @param webhookIdentifier Unique ID or name of the webhook configuration. + * @param updateWebhookConfigurationRequest + */ + public updateWebhookConfiguration(webhookIdentifier: string, updateWebhookConfigurationRequest: UpdateWebhookConfigurationRequest, _options?: Configuration): Observable { + const requestContextPromise = this.requestFactory.updateWebhookConfiguration(webhookIdentifier, updateWebhookConfigurationRequest, _options); + + // build promise chain + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); + } + + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + pipe(mergeMap((response: ResponseContext) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.updateWebhookConfiguration(rsp))); + })); + } + +} diff --git a/sdks/typescript/types/PromiseAPI.ts b/sdks/typescript/types/PromiseAPI.ts new file mode 100644 index 000000000..6a2da2cba --- /dev/null +++ b/sdks/typescript/types/PromiseAPI.ts @@ -0,0 +1,3916 @@ +import { ResponseContext, RequestContext, HttpFile } from '../http/http'; +import { Configuration} from '../configuration' + +import { AIContext } from '../models/AIContext'; +import { APIKey } from '../models/APIKey'; +import { APIKeyInput } from '../models/APIKeyInput'; +import { AccessToken } from '../models/AccessToken'; +import { ActionConfig } from '../models/ActionConfig'; +import { ActionConfigInput } from '../models/ActionConfigInput'; +import { ActionConfigInputCreate } from '../models/ActionConfigInputCreate'; +import { ActionDetails } from '../models/ActionDetails'; +import { ActionDetailsInput } from '../models/ActionDetailsInput'; +import { ActionDetailsInputCreate } from '../models/ActionDetailsInputCreate'; +import { ActivateUserRequest } from '../models/ActivateUserRequest'; +import { AgentConversation } from '../models/AgentConversation'; +import { AnswerContent } from '../models/AnswerContent'; +import { AnswerDataResponse } from '../models/AnswerDataResponse'; +import { AnswerPngOptionsInput } from '../models/AnswerPngOptionsInput'; +import { AssignChangeAuthorRequest } from '../models/AssignChangeAuthorRequest'; +import { AssignTagRequest } from '../models/AssignTagRequest'; +import { AssociateMetadataInput } from '../models/AssociateMetadataInput'; +import { AssociateMetadataInputCreate } from '../models/AssociateMetadataInputCreate'; +import { AuthClusterPreferences } from '../models/AuthClusterPreferences'; +import { AuthClusterPreferencesInput } from '../models/AuthClusterPreferencesInput'; +import { AuthOrgInfo } from '../models/AuthOrgInfo'; +import { AuthOrgPreference } from '../models/AuthOrgPreference'; +import { AuthOrgPreferenceInput } from '../models/AuthOrgPreferenceInput'; +import { AuthSettingsAccessToken } from '../models/AuthSettingsAccessToken'; +import { Authentication } from '../models/Authentication'; +import { AuthenticationInput } from '../models/AuthenticationInput'; +import { Author } from '../models/Author'; +import { AuthorMetadataTypeInput } from '../models/AuthorMetadataTypeInput'; +import { AuthorType } from '../models/AuthorType'; +import { AwsS3Config } from '../models/AwsS3Config'; +import { AwsS3ConfigInput } from '../models/AwsS3ConfigInput'; +import { BasicAuth } from '../models/BasicAuth'; +import { BasicAuthInput } from '../models/BasicAuthInput'; +import { CALLBACK } from '../models/CALLBACK'; +import { CALLBACKInput } from '../models/CALLBACKInput'; +import { CALLBACKInputMandatory } from '../models/CALLBACKInputMandatory'; +import { CalendarResponse } from '../models/CalendarResponse'; +import { ChangeUserPasswordRequest } from '../models/ChangeUserPasswordRequest'; +import { ChannelHistoryEventInfo } from '../models/ChannelHistoryEventInfo'; +import { ChannelHistoryEventInput } from '../models/ChannelHistoryEventInput'; +import { ChannelHistoryJob } from '../models/ChannelHistoryJob'; +import { ChannelValidationAwsS3Info } from '../models/ChannelValidationAwsS3Info'; +import { ChannelValidationDetail } from '../models/ChannelValidationDetail'; +import { ClusterNonEmbedAccess } from '../models/ClusterNonEmbedAccess'; +import { ClusterNonEmbedAccessInput } from '../models/ClusterNonEmbedAccessInput'; +import { Collection } from '../models/Collection'; +import { CollectionDeleteResponse } from '../models/CollectionDeleteResponse'; +import { CollectionDeleteTypeIdentifiers } from '../models/CollectionDeleteTypeIdentifiers'; +import { CollectionEntityIdentifier } from '../models/CollectionEntityIdentifier'; +import { CollectionMetadataInput } from '../models/CollectionMetadataInput'; +import { CollectionMetadataItem } from '../models/CollectionMetadataItem'; +import { CollectionSearchResponse } from '../models/CollectionSearchResponse'; +import { Column } from '../models/Column'; +import { ColumnSecurityRule } from '../models/ColumnSecurityRule'; +import { ColumnSecurityRuleColumn } from '../models/ColumnSecurityRuleColumn'; +import { ColumnSecurityRuleGroup } from '../models/ColumnSecurityRuleGroup'; +import { ColumnSecurityRuleGroupOperation } from '../models/ColumnSecurityRuleGroupOperation'; +import { ColumnSecurityRuleResponse } from '../models/ColumnSecurityRuleResponse'; +import { ColumnSecurityRuleSourceTable } from '../models/ColumnSecurityRuleSourceTable'; +import { ColumnSecurityRuleTableInput } from '../models/ColumnSecurityRuleTableInput'; +import { ColumnSecurityRuleUpdate } from '../models/ColumnSecurityRuleUpdate'; +import { CommitBranchRequest } from '../models/CommitBranchRequest'; +import { CommitFileType } from '../models/CommitFileType'; +import { CommitHistoryResponse } from '../models/CommitHistoryResponse'; +import { CommitResponse } from '../models/CommitResponse'; +import { CommiterType } from '../models/CommiterType'; +import { CommunicationChannelPreferencesResponse } from '../models/CommunicationChannelPreferencesResponse'; +import { CommunicationChannelValidateResponse } from '../models/CommunicationChannelValidateResponse'; +import { ConfigureAuthSettingsRequest } from '../models/ConfigureAuthSettingsRequest'; +import { ConfigureAuthSettingsRequestClusterPreferences } from '../models/ConfigureAuthSettingsRequestClusterPreferences'; +import { ConfigureCommunicationChannelPreferencesRequest } from '../models/ConfigureCommunicationChannelPreferencesRequest'; +import { ConfigureSecuritySettingsRequest } from '../models/ConfigureSecuritySettingsRequest'; +import { ConfigureSecuritySettingsRequestClusterPreferences } from '../models/ConfigureSecuritySettingsRequestClusterPreferences'; +import { ConnectionConfigurationResponse } from '../models/ConnectionConfigurationResponse'; +import { ConnectionConfigurationSearchRequest } from '../models/ConnectionConfigurationSearchRequest'; +import { ConnectionInput } from '../models/ConnectionInput'; +import { ContextPayloadV2Input } from '../models/ContextPayloadV2Input'; +import { Conversation } from '../models/Conversation'; +import { ConversationSettingsInput } from '../models/ConversationSettingsInput'; +import { ConvertWorksheetToModelRequest } from '../models/ConvertWorksheetToModelRequest'; +import { CopyObjectRequest } from '../models/CopyObjectRequest'; +import { CreateAgentConversationRequest } from '../models/CreateAgentConversationRequest'; +import { CreateAgentConversationRequestConversationSettings } from '../models/CreateAgentConversationRequestConversationSettings'; +import { CreateAgentConversationRequestMetadataContext } from '../models/CreateAgentConversationRequestMetadataContext'; +import { CreateCalendarRequest } from '../models/CreateCalendarRequest'; +import { CreateCalendarRequestTableReference } from '../models/CreateCalendarRequestTableReference'; +import { CreateCollectionRequest } from '../models/CreateCollectionRequest'; +import { CreateConfigRequest } from '../models/CreateConfigRequest'; +import { CreateConnectionConfigurationRequest } from '../models/CreateConnectionConfigurationRequest'; +import { CreateConnectionConfigurationRequestPolicyProcessOptions } from '../models/CreateConnectionConfigurationRequestPolicyProcessOptions'; +import { CreateConnectionRequest } from '../models/CreateConnectionRequest'; +import { CreateConnectionResponse } from '../models/CreateConnectionResponse'; +import { CreateConversationRequest } from '../models/CreateConversationRequest'; +import { CreateCustomActionRequest } from '../models/CreateCustomActionRequest'; +import { CreateCustomActionRequestActionDetails } from '../models/CreateCustomActionRequestActionDetails'; +import { CreateCustomActionRequestDefaultActionConfig } from '../models/CreateCustomActionRequestDefaultActionConfig'; +import { CreateEmailCustomizationRequest } from '../models/CreateEmailCustomizationRequest'; +import { CreateEmailCustomizationRequestTemplateProperties } from '../models/CreateEmailCustomizationRequestTemplateProperties'; +import { CreateEmailCustomizationResponse } from '../models/CreateEmailCustomizationResponse'; +import { CreateOrgRequest } from '../models/CreateOrgRequest'; +import { CreateRoleRequest } from '../models/CreateRoleRequest'; +import { CreateScheduleRequest } from '../models/CreateScheduleRequest'; +import { CreateScheduleRequestFrequency } from '../models/CreateScheduleRequestFrequency'; +import { CreateScheduleRequestLiveboardOptions } from '../models/CreateScheduleRequestLiveboardOptions'; +import { CreateScheduleRequestPdfOptions } from '../models/CreateScheduleRequestPdfOptions'; +import { CreateScheduleRequestRecipientDetails } from '../models/CreateScheduleRequestRecipientDetails'; +import { CreateTagRequest } from '../models/CreateTagRequest'; +import { CreateUserGroupRequest } from '../models/CreateUserGroupRequest'; +import { CreateUserRequest } from '../models/CreateUserRequest'; +import { CreateVariableRequest } from '../models/CreateVariableRequest'; +import { CreateWebhookConfigurationRequest } from '../models/CreateWebhookConfigurationRequest'; +import { CreateWebhookConfigurationRequestAuthentication } from '../models/CreateWebhookConfigurationRequestAuthentication'; +import { CreateWebhookConfigurationRequestSignatureVerification } from '../models/CreateWebhookConfigurationRequestSignatureVerification'; +import { CreateWebhookConfigurationRequestStorageDestination } from '../models/CreateWebhookConfigurationRequestStorageDestination'; +import { CronExpression } from '../models/CronExpression'; +import { CronExpressionInput } from '../models/CronExpressionInput'; +import { CspSettings } from '../models/CspSettings'; +import { CspSettingsInput } from '../models/CspSettingsInput'; +import { CustomActionMetadataTypeInput } from '../models/CustomActionMetadataTypeInput'; +import { DataSource } from '../models/DataSource'; +import { DataSourceContextInput } from '../models/DataSourceContextInput'; +import { DataWarehouseObjectInput } from '../models/DataWarehouseObjectInput'; +import { DataWarehouseObjects } from '../models/DataWarehouseObjects'; +import { Database } from '../models/Database'; +import { DbtSearchResponse } from '../models/DbtSearchResponse'; +import { DeactivateUserRequest } from '../models/DeactivateUserRequest'; +import { DefaultActionConfig } from '../models/DefaultActionConfig'; +import { DefaultActionConfigInput } from '../models/DefaultActionConfigInput'; +import { DefaultActionConfigInputCreate } from '../models/DefaultActionConfigInputCreate'; +import { DefaultActionConfigSearchInput } from '../models/DefaultActionConfigSearchInput'; +import { DeleteCollectionRequest } from '../models/DeleteCollectionRequest'; +import { DeleteConfigRequest } from '../models/DeleteConfigRequest'; +import { DeleteConnectionConfigurationRequest } from '../models/DeleteConnectionConfigurationRequest'; +import { DeleteConnectionRequest } from '../models/DeleteConnectionRequest'; +import { DeleteMetadataRequest } from '../models/DeleteMetadataRequest'; +import { DeleteMetadataTypeInput } from '../models/DeleteMetadataTypeInput'; +import { DeleteOrgEmailCustomizationRequest } from '../models/DeleteOrgEmailCustomizationRequest'; +import { DeleteVariablesRequest } from '../models/DeleteVariablesRequest'; +import { DeleteWebhookConfigurationsRequest } from '../models/DeleteWebhookConfigurationsRequest'; +import { DeployCommitRequest } from '../models/DeployCommitRequest'; +import { DeployResponse } from '../models/DeployResponse'; +import { EntityHeader } from '../models/EntityHeader'; +import { ErrorResponse } from '../models/ErrorResponse'; +import { EurekaDataSourceSuggestionResponse } from '../models/EurekaDataSourceSuggestionResponse'; +import { EurekaDecomposeQueryResponse } from '../models/EurekaDecomposeQueryResponse'; +import { EurekaGetNLInstructionsResponse } from '../models/EurekaGetNLInstructionsResponse'; +import { EurekaGetRelevantQuestionsResponse } from '../models/EurekaGetRelevantQuestionsResponse'; +import { EurekaLLMDecomposeQueryResponse } from '../models/EurekaLLMDecomposeQueryResponse'; +import { EurekaLLMSuggestedQuery } from '../models/EurekaLLMSuggestedQuery'; +import { EurekaRelevantQuestion } from '../models/EurekaRelevantQuestion'; +import { EurekaSetNLInstructionsResponse } from '../models/EurekaSetNLInstructionsResponse'; +import { EventChannelConfig } from '../models/EventChannelConfig'; +import { EventChannelConfigInput } from '../models/EventChannelConfigInput'; +import { ExcludeMetadataListItemInput } from '../models/ExcludeMetadataListItemInput'; +import { ExportAnswerReportRequest } from '../models/ExportAnswerReportRequest'; +import { ExportAnswerReportRequestPngOptions } from '../models/ExportAnswerReportRequestPngOptions'; +import { ExportAnswerReportRequestRegionalSettings } from '../models/ExportAnswerReportRequestRegionalSettings'; +import { ExportLiveboardReportRequest } from '../models/ExportLiveboardReportRequest'; +import { ExportLiveboardReportRequestPdfOptions } from '../models/ExportLiveboardReportRequestPdfOptions'; +import { ExportLiveboardReportRequestPngOptions } from '../models/ExportLiveboardReportRequestPngOptions'; +import { ExportMetadataTMLBatchedRequest } from '../models/ExportMetadataTMLBatchedRequest'; +import { ExportMetadataTMLRequest } from '../models/ExportMetadataTMLRequest'; +import { ExportMetadataTMLRequestExportOptions } from '../models/ExportMetadataTMLRequestExportOptions'; +import { ExportMetadataTypeInput } from '../models/ExportMetadataTypeInput'; +import { ExportOptions } from '../models/ExportOptions'; +import { ExternalTableInput } from '../models/ExternalTableInput'; +import { FavoriteMetadataInput } from '../models/FavoriteMetadataInput'; +import { FavoriteMetadataItem } from '../models/FavoriteMetadataItem'; +import { FavoriteObjectOptionsInput } from '../models/FavoriteObjectOptionsInput'; +import { FetchAnswerDataRequest } from '../models/FetchAnswerDataRequest'; +import { FetchAnswerSqlQueryRequest } from '../models/FetchAnswerSqlQueryRequest'; +import { FetchAsyncImportTaskStatusRequest } from '../models/FetchAsyncImportTaskStatusRequest'; +import { FetchColumnSecurityRulesRequest } from '../models/FetchColumnSecurityRulesRequest'; +import { FetchConnectionDiffStatusResponse } from '../models/FetchConnectionDiffStatusResponse'; +import { FetchLiveboardDataRequest } from '../models/FetchLiveboardDataRequest'; +import { FetchLiveboardSqlQueryRequest } from '../models/FetchLiveboardSqlQueryRequest'; +import { FetchLogsRequest } from '../models/FetchLogsRequest'; +import { FetchObjectPrivilegesRequest } from '../models/FetchObjectPrivilegesRequest'; +import { FetchPermissionsOfPrincipalsRequest } from '../models/FetchPermissionsOfPrincipalsRequest'; +import { FetchPermissionsOnMetadataRequest } from '../models/FetchPermissionsOnMetadataRequest'; +import { FilterRules } from '../models/FilterRules'; +import { ForceLogoutUsersRequest } from '../models/ForceLogoutUsersRequest'; +import { Frequency } from '../models/Frequency'; +import { FrequencyInput } from '../models/FrequencyInput'; +import { GenerateCSVRequest } from '../models/GenerateCSVRequest'; +import { GenericInfo } from '../models/GenericInfo'; +import { GetAsyncImportStatusResponse } from '../models/GetAsyncImportStatusResponse'; +import { GetCustomAccessTokenRequest } from '../models/GetCustomAccessTokenRequest'; +import { GetDataSourceSuggestionsRequest } from '../models/GetDataSourceSuggestionsRequest'; +import { GetFullAccessTokenRequest } from '../models/GetFullAccessTokenRequest'; +import { GetFullAccessTokenRequestUserParameters } from '../models/GetFullAccessTokenRequestUserParameters'; +import { GetNLInstructionsRequest } from '../models/GetNLInstructionsRequest'; +import { GetObjectAccessTokenRequest } from '../models/GetObjectAccessTokenRequest'; +import { GetRelevantQuestionsRequest } from '../models/GetRelevantQuestionsRequest'; +import { GetRelevantQuestionsRequestAiContext } from '../models/GetRelevantQuestionsRequestAiContext'; +import { GetRelevantQuestionsRequestMetadataContext } from '../models/GetRelevantQuestionsRequestMetadataContext'; +import { GetTokenResponse } from '../models/GetTokenResponse'; +import { GroupInfo } from '../models/GroupInfo'; +import { GroupObject } from '../models/GroupObject'; +import { GroupsImportListInput } from '../models/GroupsImportListInput'; +import { HeaderAttributeInput } from '../models/HeaderAttributeInput'; +import { HeaderUpdateInput } from '../models/HeaderUpdateInput'; +import { ImportEPackAsyncTaskStatus } from '../models/ImportEPackAsyncTaskStatus'; +import { ImportMetadataTMLAsyncRequest } from '../models/ImportMetadataTMLAsyncRequest'; +import { ImportMetadataTMLRequest } from '../models/ImportMetadataTMLRequest'; +import { ImportUser } from '../models/ImportUser'; +import { ImportUserGroupsRequest } from '../models/ImportUserGroupsRequest'; +import { ImportUserGroupsResponse } from '../models/ImportUserGroupsResponse'; +import { ImportUserType } from '../models/ImportUserType'; +import { ImportUsersRequest } from '../models/ImportUsersRequest'; +import { ImportUsersResponse } from '../models/ImportUsersResponse'; +import { InputEurekaNLSRequest } from '../models/InputEurekaNLSRequest'; +import { JWTMetadataObject } from '../models/JWTMetadataObject'; +import { JWTParameter } from '../models/JWTParameter'; +import { JWTUserOptions } from '../models/JWTUserOptions'; +import { JWTUserOptionsFull } from '../models/JWTUserOptionsFull'; +import { JobRecipient } from '../models/JobRecipient'; +import { LiveboardContent } from '../models/LiveboardContent'; +import { LiveboardDataResponse } from '../models/LiveboardDataResponse'; +import { LiveboardOptions } from '../models/LiveboardOptions'; +import { LiveboardOptionsInput } from '../models/LiveboardOptionsInput'; +import { LogResponse } from '../models/LogResponse'; +import { LoginRequest } from '../models/LoginRequest'; +import { ManageObjectPrivilegeRequest } from '../models/ManageObjectPrivilegeRequest'; +import { MetadataAssociationItem } from '../models/MetadataAssociationItem'; +import { MetadataContext } from '../models/MetadataContext'; +import { MetadataInput } from '../models/MetadataInput'; +import { MetadataListItemInput } from '../models/MetadataListItemInput'; +import { MetadataObject } from '../models/MetadataObject'; +import { MetadataResponse } from '../models/MetadataResponse'; +import { MetadataSearchResponse } from '../models/MetadataSearchResponse'; +import { MetadataSearchSortOptions } from '../models/MetadataSearchSortOptions'; +import { ModelTableList } from '../models/ModelTableList'; +import { NLInstructionsInfo } from '../models/NLInstructionsInfo'; +import { NLInstructionsInfoInput } from '../models/NLInstructionsInfoInput'; +import { ObjectIDAndName } from '../models/ObjectIDAndName'; +import { ObjectPrivilegesMetadataInput } from '../models/ObjectPrivilegesMetadataInput'; +import { ObjectPrivilegesOfMetadataResponse } from '../models/ObjectPrivilegesOfMetadataResponse'; +import { Org } from '../models/Org'; +import { OrgChannelConfigInput } from '../models/OrgChannelConfigInput'; +import { OrgChannelConfigResponse } from '../models/OrgChannelConfigResponse'; +import { OrgDetails } from '../models/OrgDetails'; +import { OrgInfo } from '../models/OrgInfo'; +import { OrgNonEmbedAccess } from '../models/OrgNonEmbedAccess'; +import { OrgNonEmbedAccessInput } from '../models/OrgNonEmbedAccessInput'; +import { OrgPreferenceSearchCriteriaInput } from '../models/OrgPreferenceSearchCriteriaInput'; +import { OrgResponse } from '../models/OrgResponse'; +import { OrgType } from '../models/OrgType'; +import { ParameterValues } from '../models/ParameterValues'; +import { ParameterizeMetadataFieldsRequest } from '../models/ParameterizeMetadataFieldsRequest'; +import { ParameterizeMetadataRequest } from '../models/ParameterizeMetadataRequest'; +import { ParametersListItem } from '../models/ParametersListItem'; +import { ParametersListItemInput } from '../models/ParametersListItemInput'; +import { PdfOptions } from '../models/PdfOptions'; +import { PdfOptionsInput } from '../models/PdfOptionsInput'; +import { PermissionInput } from '../models/PermissionInput'; +import { PermissionOfMetadataResponse } from '../models/PermissionOfMetadataResponse'; +import { PermissionOfPrincipalsResponse } from '../models/PermissionOfPrincipalsResponse'; +import { PermissionsMetadataTypeInput } from '../models/PermissionsMetadataTypeInput'; +import { PngOptionsInput } from '../models/PngOptionsInput'; +import { PolicyProcessOptions } from '../models/PolicyProcessOptions'; +import { PolicyProcessOptionsInput } from '../models/PolicyProcessOptionsInput'; +import { PrincipalsInput } from '../models/PrincipalsInput'; +import { PrincipalsListItem } from '../models/PrincipalsListItem'; +import { PrincipalsListItemInput } from '../models/PrincipalsListItemInput'; +import { PublishMetadataListItem } from '../models/PublishMetadataListItem'; +import { PublishMetadataRequest } from '../models/PublishMetadataRequest'; +import { PutVariableValuesRequest } from '../models/PutVariableValuesRequest'; +import { QueryGetDecomposedQueryRequest } from '../models/QueryGetDecomposedQueryRequest'; +import { QueryGetDecomposedQueryRequestNlsRequest } from '../models/QueryGetDecomposedQueryRequestNlsRequest'; +import { RecipientDetails } from '../models/RecipientDetails'; +import { RecipientDetailsInput } from '../models/RecipientDetailsInput'; +import { RegionalSettingsInput } from '../models/RegionalSettingsInput'; +import { RepoConfigObject } from '../models/RepoConfigObject'; +import { ResetUserPasswordRequest } from '../models/ResetUserPasswordRequest'; +import { ResponseActivationURL } from '../models/ResponseActivationURL'; +import { ResponseCopyObject } from '../models/ResponseCopyObject'; +import { ResponseCustomAction } from '../models/ResponseCustomAction'; +import { ResponseFailedEntities } from '../models/ResponseFailedEntities'; +import { ResponseFailedEntity } from '../models/ResponseFailedEntity'; +import { ResponseIncompleteEntities } from '../models/ResponseIncompleteEntities'; +import { ResponseIncompleteEntity } from '../models/ResponseIncompleteEntity'; +import { ResponseMessage } from '../models/ResponseMessage'; +import { ResponsePostUpgradeFailedEntities } from '../models/ResponsePostUpgradeFailedEntities'; +import { ResponsePostUpgradeFailedEntity } from '../models/ResponsePostUpgradeFailedEntity'; +import { ResponseSchedule } from '../models/ResponseSchedule'; +import { ResponseScheduleRun } from '../models/ResponseScheduleRun'; +import { ResponseSuccessfulEntities } from '../models/ResponseSuccessfulEntities'; +import { ResponseSuccessfulEntity } from '../models/ResponseSuccessfulEntity'; +import { ResponseWorksheetToModelConversion } from '../models/ResponseWorksheetToModelConversion'; +import { RevertCommitRequest } from '../models/RevertCommitRequest'; +import { RevertResponse } from '../models/RevertResponse'; +import { RevertedMetadata } from '../models/RevertedMetadata'; +import { RevokeRefreshTokensRequest } from '../models/RevokeRefreshTokensRequest'; +import { RevokeRefreshTokensResponse } from '../models/RevokeRefreshTokensResponse'; +import { RevokeTokenRequest } from '../models/RevokeTokenRequest'; +import { RiseGQLArgWrapper } from '../models/RiseGQLArgWrapper'; +import { RiseSetter } from '../models/RiseSetter'; +import { Role } from '../models/Role'; +import { RoleResponse } from '../models/RoleResponse'; +import { RuntimeFilter } from '../models/RuntimeFilter'; +import { RuntimeFilters } from '../models/RuntimeFilters'; +import { RuntimeParamOverride } from '../models/RuntimeParamOverride'; +import { RuntimeParameters } from '../models/RuntimeParameters'; +import { RuntimeSort } from '../models/RuntimeSort'; +import { RuntimeSorts } from '../models/RuntimeSorts'; +import { ScheduleHistoryRunsOptionsInput } from '../models/ScheduleHistoryRunsOptionsInput'; +import { SchedulesPdfOptionsInput } from '../models/SchedulesPdfOptionsInput'; +import { SchemaObject } from '../models/SchemaObject'; +import { Scope } from '../models/Scope'; +import { ScriptSrcUrls } from '../models/ScriptSrcUrls'; +import { ScriptSrcUrlsInput } from '../models/ScriptSrcUrlsInput'; +import { SearchAuthSettingsRequest } from '../models/SearchAuthSettingsRequest'; +import { SearchAuthSettingsResponse } from '../models/SearchAuthSettingsResponse'; +import { SearchCalendarsRequest } from '../models/SearchCalendarsRequest'; +import { SearchCalendarsRequestSortOptions } from '../models/SearchCalendarsRequestSortOptions'; +import { SearchChannelHistoryRequest } from '../models/SearchChannelHistoryRequest'; +import { SearchChannelHistoryResponse } from '../models/SearchChannelHistoryResponse'; +import { SearchCollectionsRequest } from '../models/SearchCollectionsRequest'; +import { SearchCollectionsRequestSortOptions } from '../models/SearchCollectionsRequestSortOptions'; +import { SearchCommitsRequest } from '../models/SearchCommitsRequest'; +import { SearchCommunicationChannelPreferencesRequest } from '../models/SearchCommunicationChannelPreferencesRequest'; +import { SearchConfigRequest } from '../models/SearchConfigRequest'; +import { SearchConnectionRequest } from '../models/SearchConnectionRequest'; +import { SearchConnectionRequestSortOptions } from '../models/SearchConnectionRequestSortOptions'; +import { SearchConnectionResponse } from '../models/SearchConnectionResponse'; +import { SearchCustomActionsRequest } from '../models/SearchCustomActionsRequest'; +import { SearchCustomActionsRequestDefaultActionConfig } from '../models/SearchCustomActionsRequestDefaultActionConfig'; +import { SearchDataRequest } from '../models/SearchDataRequest'; +import { SearchDataResponse } from '../models/SearchDataResponse'; +import { SearchEmailCustomizationRequest } from '../models/SearchEmailCustomizationRequest'; +import { SearchMetadataRequest } from '../models/SearchMetadataRequest'; +import { SearchMetadataRequestFavoriteObjectOptions } from '../models/SearchMetadataRequestFavoriteObjectOptions'; +import { SearchMetadataRequestSortOptions } from '../models/SearchMetadataRequestSortOptions'; +import { SearchOrgsRequest } from '../models/SearchOrgsRequest'; +import { SearchRoleResponse } from '../models/SearchRoleResponse'; +import { SearchRolesRequest } from '../models/SearchRolesRequest'; +import { SearchSchedulesRequest } from '../models/SearchSchedulesRequest'; +import { SearchSchedulesRequestHistoryRunsOptions } from '../models/SearchSchedulesRequestHistoryRunsOptions'; +import { SearchSchedulesRequestSortOptions } from '../models/SearchSchedulesRequestSortOptions'; +import { SearchSecuritySettingsRequest } from '../models/SearchSecuritySettingsRequest'; +import { SearchTagsRequest } from '../models/SearchTagsRequest'; +import { SearchUserGroupsRequest } from '../models/SearchUserGroupsRequest'; +import { SearchUserGroupsRequestSortOptions } from '../models/SearchUserGroupsRequestSortOptions'; +import { SearchUsersRequest } from '../models/SearchUsersRequest'; +import { SearchVariablesRequest } from '../models/SearchVariablesRequest'; +import { SearchWebhookConfigurationsRequest } from '../models/SearchWebhookConfigurationsRequest'; +import { SearchWebhookConfigurationsRequestSortOptions } from '../models/SearchWebhookConfigurationsRequestSortOptions'; +import { SecuritySettingsClusterPreferences } from '../models/SecuritySettingsClusterPreferences'; +import { SecuritySettingsClusterPreferencesInput } from '../models/SecuritySettingsClusterPreferencesInput'; +import { SecuritySettingsOrgDetails } from '../models/SecuritySettingsOrgDetails'; +import { SecuritySettingsOrgPreferences } from '../models/SecuritySettingsOrgPreferences'; +import { SecuritySettingsOrgPreferencesInput } from '../models/SecuritySettingsOrgPreferencesInput'; +import { SecuritySettingsResponse } from '../models/SecuritySettingsResponse'; +import { SendAgentConversationMessageRequest } from '../models/SendAgentConversationMessageRequest'; +import { SendAgentConversationMessageStreamingRequest } from '../models/SendAgentConversationMessageStreamingRequest'; +import { SendAgentMessageRequest } from '../models/SendAgentMessageRequest'; +import { SendAgentMessageResponse } from '../models/SendAgentMessageResponse'; +import { SendAgentMessageStreamingRequest } from '../models/SendAgentMessageStreamingRequest'; +import { SendMessageRequest } from '../models/SendMessageRequest'; +import { SetNLInstructionsRequest } from '../models/SetNLInstructionsRequest'; +import { ShareMetadataRequest } from '../models/ShareMetadataRequest'; +import { ShareMetadataTypeInput } from '../models/ShareMetadataTypeInput'; +import { SharePermissionsInput } from '../models/SharePermissionsInput'; +import { SingleAnswerRequest } from '../models/SingleAnswerRequest'; +import { SortOption } from '../models/SortOption'; +import { SortOptionInput } from '../models/SortOptionInput'; +import { SortOptions } from '../models/SortOptions'; +import { SortingOptions } from '../models/SortingOptions'; +import { SqlQuery } from '../models/SqlQuery'; +import { SqlQueryResponse } from '../models/SqlQueryResponse'; +import { StorageConfig } from '../models/StorageConfig'; +import { StorageConfigInput } from '../models/StorageConfigInput'; +import { StorageDestination } from '../models/StorageDestination'; +import { StorageDestinationInput } from '../models/StorageDestinationInput'; +import { SyncMetadataRequest } from '../models/SyncMetadataRequest'; +import { SyncMetadataResponse } from '../models/SyncMetadataResponse'; +import { SystemConfig } from '../models/SystemConfig'; +import { SystemInfo } from '../models/SystemInfo'; +import { SystemOverrideInfo } from '../models/SystemOverrideInfo'; +import { Table } from '../models/Table'; +import { Tag } from '../models/Tag'; +import { TagMetadataTypeInput } from '../models/TagMetadataTypeInput'; +import { TemplatePropertiesInputCreate } from '../models/TemplatePropertiesInputCreate'; +import { Token } from '../models/Token'; +import { TokenAccessScopeObject } from '../models/TokenAccessScopeObject'; +import { TokenValidationResponse } from '../models/TokenValidationResponse'; +import { URL } from '../models/URL'; +import { URLInput } from '../models/URLInput'; +import { URLInputMandatory } from '../models/URLInputMandatory'; +import { UnassignTagRequest } from '../models/UnassignTagRequest'; +import { UnparameterizeMetadataRequest } from '../models/UnparameterizeMetadataRequest'; +import { UnpublishMetadataRequest } from '../models/UnpublishMetadataRequest'; +import { UpdateCalendarRequest } from '../models/UpdateCalendarRequest'; +import { UpdateCalendarRequestTableReference } from '../models/UpdateCalendarRequestTableReference'; +import { UpdateCollectionRequest } from '../models/UpdateCollectionRequest'; +import { UpdateColumnSecurityRulesRequest } from '../models/UpdateColumnSecurityRulesRequest'; +import { UpdateConfigRequest } from '../models/UpdateConfigRequest'; +import { UpdateConnectionConfigurationRequest } from '../models/UpdateConnectionConfigurationRequest'; +import { UpdateConnectionRequest } from '../models/UpdateConnectionRequest'; +import { UpdateConnectionStatusRequest } from '../models/UpdateConnectionStatusRequest'; +import { UpdateConnectionV2Request } from '../models/UpdateConnectionV2Request'; +import { UpdateCustomActionRequest } from '../models/UpdateCustomActionRequest'; +import { UpdateCustomActionRequestActionDetails } from '../models/UpdateCustomActionRequestActionDetails'; +import { UpdateCustomActionRequestDefaultActionConfig } from '../models/UpdateCustomActionRequestDefaultActionConfig'; +import { UpdateEmailCustomizationRequest } from '../models/UpdateEmailCustomizationRequest'; +import { UpdateMetadataHeaderRequest } from '../models/UpdateMetadataHeaderRequest'; +import { UpdateMetadataObjIdRequest } from '../models/UpdateMetadataObjIdRequest'; +import { UpdateObjIdInput } from '../models/UpdateObjIdInput'; +import { UpdateOrgRequest } from '../models/UpdateOrgRequest'; +import { UpdateRoleRequest } from '../models/UpdateRoleRequest'; +import { UpdateScheduleRequest } from '../models/UpdateScheduleRequest'; +import { UpdateScheduleRequestFrequency } from '../models/UpdateScheduleRequestFrequency'; +import { UpdateScheduleRequestLiveboardOptions } from '../models/UpdateScheduleRequestLiveboardOptions'; +import { UpdateScheduleRequestPdfOptions } from '../models/UpdateScheduleRequestPdfOptions'; +import { UpdateScheduleRequestRecipientDetails } from '../models/UpdateScheduleRequestRecipientDetails'; +import { UpdateSystemConfigRequest } from '../models/UpdateSystemConfigRequest'; +import { UpdateTagRequest } from '../models/UpdateTagRequest'; +import { UpdateUserGroupRequest } from '../models/UpdateUserGroupRequest'; +import { UpdateUserRequest } from '../models/UpdateUserRequest'; +import { UpdateVariableRequest } from '../models/UpdateVariableRequest'; +import { UpdateVariableValuesRequest } from '../models/UpdateVariableValuesRequest'; +import { UpdateWebhookConfigurationRequest } from '../models/UpdateWebhookConfigurationRequest'; +import { User } from '../models/User'; +import { UserGroup } from '../models/UserGroup'; +import { UserGroupResponse } from '../models/UserGroupResponse'; +import { UserInfo } from '../models/UserInfo'; +import { UserObject } from '../models/UserObject'; +import { UserParameterOptions } from '../models/UserParameterOptions'; +import { UserPrincipal } from '../models/UserPrincipal'; +import { ValidateCommunicationChannelRequest } from '../models/ValidateCommunicationChannelRequest'; +import { ValidateMergeRequest } from '../models/ValidateMergeRequest'; +import { ValidateTokenRequest } from '../models/ValidateTokenRequest'; +import { ValueScopeInput } from '../models/ValueScopeInput'; +import { Variable } from '../models/Variable'; +import { VariableDetailInput } from '../models/VariableDetailInput'; +import { VariableOrgInfo } from '../models/VariableOrgInfo'; +import { VariablePutAssignmentInput } from '../models/VariablePutAssignmentInput'; +import { VariableUpdateAssignmentInput } from '../models/VariableUpdateAssignmentInput'; +import { VariableUpdateScopeInput } from '../models/VariableUpdateScopeInput'; +import { VariableValue } from '../models/VariableValue'; +import { VariableValues } from '../models/VariableValues'; +import { WebhookAuthApiKey } from '../models/WebhookAuthApiKey'; +import { WebhookAuthApiKeyInput } from '../models/WebhookAuthApiKeyInput'; +import { WebhookAuthBasicAuth } from '../models/WebhookAuthBasicAuth'; +import { WebhookAuthBasicAuthInput } from '../models/WebhookAuthBasicAuthInput'; +import { WebhookAuthOAuth2 } from '../models/WebhookAuthOAuth2'; +import { WebhookAuthOAuth2Input } from '../models/WebhookAuthOAuth2Input'; +import { WebhookAuthentication } from '../models/WebhookAuthentication'; +import { WebhookAuthenticationInput } from '../models/WebhookAuthenticationInput'; +import { WebhookDeleteFailure } from '../models/WebhookDeleteFailure'; +import { WebhookDeleteResponse } from '../models/WebhookDeleteResponse'; +import { WebhookKeyValuePair } from '../models/WebhookKeyValuePair'; +import { WebhookKeyValuePairInput } from '../models/WebhookKeyValuePairInput'; +import { WebhookOrg } from '../models/WebhookOrg'; +import { WebhookPagination } from '../models/WebhookPagination'; +import { WebhookResponse } from '../models/WebhookResponse'; +import { WebhookSearchResponse } from '../models/WebhookSearchResponse'; +import { WebhookSignatureVerification } from '../models/WebhookSignatureVerification'; +import { WebhookSignatureVerificationInput } from '../models/WebhookSignatureVerificationInput'; +import { WebhookSortOptionsInput } from '../models/WebhookSortOptionsInput'; +import { WebhookUser } from '../models/WebhookUser'; +import { ObservableAIApi } from './ObservableAPI'; + +import { AIApiRequestFactory, AIApiResponseProcessor} from "../apis/AIApi"; +export class PromiseAIApi { + private api: ObservableAIApi + + public constructor( + configuration: Configuration, + requestFactory?: AIApiRequestFactory, + responseProcessor?: AIApiResponseProcessor + ) { + this.api = new ObservableAIApi(configuration, requestFactory, responseProcessor); + } + + /** + * Version: 26.2.0.cl or later Creates a new Spotter agent conversation based on the provided context and settings. The endpoint was in Beta from 26.2.0.cl through 26.4.0.cl. Requires `CAN_USE_SPOTTER` privilege and at least view access to the metadata object specified in the request. #### Usage guidelines The request must include the `metadata_context` parameter to define the conversation context. The context type can be one of: - `DATA_SOURCE` *(available from 26.5.0.cl)*: targets a specific data source. Provide `data_source_identifier` in `data_source_context` for a single data source, or `data_source_identifiers` for multi-data-source context. The deprecated `guid` field is accepted for backwards compatibility. - `AUTO_MODE` *(available from 26.5.0.cl)*: automatically discovers and selects the most relevant datasets for the user\'s queries. > **Note for callers on versions 26.2.0.cl – 26.4.0.cl (Beta):** use the lowercase `data_source` enum value with the `guid` field instead of the above. Example: `{ \"type\": \"data_source\", \"data_source_context\": { \"guid\": \"\" } }`. The `conversation_settings` parameter controls which Spotter capabilities are enabled for the conversation: - `enable_contextual_change_analysis` (default: `true`, **deprecated from 26.2.0.cl**) — always enabled in Spotter 3; setting this to `false` has no effect on versions >= 26.2.0.cl - `enable_natural_language_answer_generation` (default: `true`, **deprecated from 26.2.0.cl**) — always enabled in Spotter 3; setting this to `false` has no effect on versions >= 26.2.0.cl - `enable_reasoning` (default: `true`, **deprecated from 26.2.0.cl**) — always enabled in Spotter 3; setting this to `false` has no effect on versions >= 26.2.0.cl - `enable_save_chat` (default: `false`, *available from 26.5.0.cl*) — enables saving the conversation for later retrieval via conversation history If the request is successful, the response includes a unique `conversation_identifier` that must be passed to `sendAgentConversationMessage` or `sendAgentConversationMessageStreaming` to send messages within this conversation. The response also includes `conversation_id` with the same value for backwards compatibility; use `conversation_identifier` for new integrations. #### Example request ```json { \"metadata_context\": { \"type\": \"DATA_SOURCE\", \"data_source_context\": { \"data_source_identifier\": \"a1b2c3d4-e5f6-7890-abcd-ef1234567890\" } }, \"conversation_settings\": {} } ``` #### Error responses | Code | Description | | ---- | --------------------------------------------------------------------------------------------------------------------------------------- | | 401 | Unauthorized — authentication token is missing, expired, or invalid. | | 403 | Forbidden — the authenticated user does not have `CAN_USE_SPOTTER` privilege or lacks view permission on the specified metadata object. | > ###### Note: > > - This endpoint was in Beta from 26.2.0.cl through 26.4.0.cl and is Generally Available from version 26.5.0.cl. > - This endpoint requires Spotter - please contact ThoughtSpot support to enable Spotter on your cluster. + * @param createAgentConversationRequest + */ + public createAgentConversation(createAgentConversationRequest: CreateAgentConversationRequest, _options?: Configuration): Promise { + const result = this.api.createAgentConversation(createAgentConversationRequest, _options); + return result.toPromise(); + } + + /** + * Version: 10.4.0.cl or later Creates a new conversation session tied to a specific data model for AI-driven natural language querying. Requires `CAN_USE_SPOTTER` privilege and at least view access to the metadata object specified in the request. #### Usage guidelines The request must include: - `metadata_identifier`: the unique ID of the data source that provides context for the conversation Optionally, you can provide: - `tokens`: a token string to set initial context for the conversation (e.g., `\"[sales],[item type],[state]\"`) If the request is successful, ThoughtSpot returns a unique `conversation_identifier` that must be passed to `sendMessage` to continue the conversation. #### Error responses | Code | Description | |------|-------------| | 401 | Unauthorized — authentication token is missing, expired, or invalid. | | 403 | Forbidden — the authenticated user does not have `CAN_USE_SPOTTER` privilege or lacks view permission on the specified metadata object. | > ###### Note: > * This endpoint is currently in Beta. Breaking changes may be introduced before the endpoint is made Generally Available. > * This endpoint requires Spotter - please contact ThoughtSpot support to enable Spotter on your cluster. + * @param createConversationRequest + */ + public createConversation(createConversationRequest: CreateConversationRequest, _options?: Configuration): Promise { + const result = this.api.createConversation(createConversationRequest, _options); + return result.toPromise(); + } + + /** + * Version: 10.15.0.cl or later Suggests the most relevant data sources for a given natural language query, ranked by confidence with LLM-generated reasoning. Requires `CAN_USE_SPOTTER` privilege and at least view-level access to the underlying metadata entities referenced in the response. #### Usage guidelines The request must include: - `query`: the natural language question to find relevant data sources for If the request is successful, the API returns a ranked list of suggested data sources, each containing: - `confidence`: a float score indicating the model\'s confidence in the relevance of the suggestion - `details`: metadata about the data source - `data_source_identifier`: the unique ID of the data source - `data_source_name`: the display name of the data source - `description`: a description of the data source - `reasoning`: LLM-generated rationale explaining why the data source was recommended #### Error responses | Code | Description | |------|--------------------------------------------------------------------------------------------------------------------------------------------| | 401 | Unauthorized — authentication token is missing, expired, or invalid. | | 403 | Forbidden — the authenticated user does not have `CAN_USE_SPOTTER` privilege or lacks view permission on the underlying metadata entities. | > ###### Note: > * This endpoint is currently in Beta. Breaking changes may be introduced before it is made Generally Available. > * This endpoint requires Spotter — please contact ThoughtSpot Support to enable Spotter on your cluster. + * @param getDataSourceSuggestionsRequest + */ + public getDataSourceSuggestions(getDataSourceSuggestionsRequest: GetDataSourceSuggestionsRequest, _options?: Configuration): Promise { + const result = this.api.getDataSourceSuggestions(getDataSourceSuggestionsRequest, _options); + return result.toPromise(); + } + + /** + * Version: 10.15.0.cl or later Retrieves existing natural language (NL) instructions configured for a specific data model. These instructions guide the AI system in understanding data context and generating more accurate responses. Requires `CAN_USE_SPOTTER` privilege, at least view access on the data model, and a bearer token corresponding to the org where the data model exists. #### Usage guidelines The request must include: - `data_source_identifier`: the unique ID of the data model to retrieve instructions for If the request is successful, the API returns: - `nl_instructions_info`: an array of instruction objects, each containing: - `instructions`: the configured text instructions for AI processing - `scope`: the scope of the instruction — currently only `GLOBAL` is supported #### Instructions scope - **GLOBAL**: Instructions that apply globally across the system on the given data-model (currently only global instructions are supported) #### Error responses | Code | Description | |------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| | 401 | Unauthorized — authentication token is missing, expired, or invalid. | | 403 | Forbidden — the authenticated user does not have `CAN_USE_SPOTTER` privilege, lacks view access on the data model, or the bearer token does not correspond to the org where the data model exists. | > ###### Note: > > - To use this API, the user needs at least view access on the data model, and must use the bearer token corresponding to the org where the data model exists. > - This endpoint is currently in Beta. Breaking changes may be introduced before the endpoint is made Generally Available. > - Available from version 10.15.0.cl and later. > - This endpoint requires Spotter — please contact ThoughtSpot Support to enable Spotter on your cluster. > - Use this API to review currently configured instructions before modifying them with `setNLInstructions`. + * @param getNLInstructionsRequest + */ + public getNLInstructions(getNLInstructionsRequest: GetNLInstructionsRequest, _options?: Configuration): Promise { + const result = this.api.getNLInstructions(getNLInstructionsRequest, _options); + return result.toPromise(); + } + + /** + * Version: 10.13.0.cl or later Breaks down a natural language query into a series of smaller analytical sub-questions, each mapped to a relevant data source. Requires `CAN_USE_SPOTTER` privilege and at least view-level access to the referenced metadata objects. #### Usage guidelines The request must include: - `query`: the natural language question to decompose into analytical sub-questions - `metadata_context`: at least one of the following context identifiers to guide question generation: - `conversation_identifier` — an existing conversation session ID - `answer_identifiers` — a list of Answer GUIDs - `liveboard_identifiers` — a list of Liveboard GUIDs - `data_source_identifiers` — a list of data source GUIDs Optional parameters for refining the output: - `ai_context`: additional context to improve response quality - `content` — supplementary text or CSV data as string input - `instructions` — custom text instructions for the AI system - `limit_relevant_questions`: maximum number of questions to return (default: `5`) - `bypass_cache`: if `true`, forces fresh computation instead of returning cached results If the request is successful, the API returns a list of relevant analytical questions, each containing: - `query`: the generated sub-question - `data_source_identifier`: the unique ID of the data source the question targets - `data_source_name`: the display name of the corresponding data source #### Error responses | Code | Description | |------|---------------------------------------------------------------------------------------------------------------------------------------| | 401 | Unauthorized — authentication token is missing, expired, or invalid. | | 403 | Forbidden — the authenticated user does not have `CAN_USE_SPOTTER` privilege or lacks view access to the referenced metadata objects. | > ###### Note: > * This endpoint is currently in Beta. Breaking changes may be introduced before the endpoint is made Generally Available. > * This endpoint requires Spotter - please contact ThoughtSpot support to enable Spotter on your cluster. + * @param getRelevantQuestionsRequest + */ + public getRelevantQuestions(getRelevantQuestionsRequest: GetRelevantQuestionsRequest, _options?: Configuration): Promise { + const result = this.api.getRelevantQuestions(getRelevantQuestionsRequest, _options); + return result.toPromise(); + } + + /** + * Version: 10.7.0.cl or later **Deprecated** — Use `getRelevantQuestions` instead (available from 10.13.0.cl). Breaks down a topical or goal-oriented natural language question into smaller, actionable analytical sub-questions, each mapped to a relevant data source for independent execution. Requires `CAN_USE_SPOTTER` privilege and at least view-level access to the referenced metadata objects. #### Usage guidelines The request accepts the following parameters: - `nlsRequest`: contains the user `query` to decompose, along with optional `instructions` and `bypassCache` flag - `worksheetIds`: list of data source identifiers to scope the decomposition - `answerIds`: list of Answer GUIDs whose data guides the response - `liveboardIds`: list of Liveboard GUIDs whose data guides the response - `conversationId`: an existing conversation session ID for context continuity - `content`: supplementary text or CSV data to improve response quality - `maxDecomposedQueries`: maximum number of sub-questions to return (default: `5`) If the request is successful, the API returns a `decomposedQueryResponse` containing a list of `decomposedQueries`, each with: - `query`: the generated analytical sub-question - `worksheetId`: the unique ID of the data source the question targets - `worksheetName`: the display name of the corresponding data source #### Error responses | Code | Description | |------|---------------------------------------------------------------------------------------------------------------------------------------| | 401 | Unauthorized — authentication token is missing, expired, or invalid. | | 403 | Forbidden — the authenticated user does not have `CAN_USE_SPOTTER` privilege or lacks view access to the referenced metadata objects. | > ###### Note: > * This endpoint is deprecated since 10.13.0.cl. Use `getRelevantQuestions` for new integrations. > * This endpoint is currently in Beta. Breaking changes may be introduced before the endpoint is made Generally Available. > * This endpoint requires Spotter — please contact ThoughtSpot support to enable Spotter on your cluster. + * @param queryGetDecomposedQueryRequest + */ + public queryGetDecomposedQuery(queryGetDecomposedQueryRequest: QueryGetDecomposedQueryRequest, _options?: Configuration): Promise { + const result = this.api.queryGetDecomposedQuery(queryGetDecomposedQueryRequest, _options); + return result.toPromise(); + } + + /** + * Version: 26.5.0.cl or later Sends natural language messages to an existing Spotter agent conversation and returns the complete response synchronously. Requires `CAN_USE_SPOTTER` privilege and access to the metadata object associated with the conversation. The user must have access to the conversation session referenced by `conversation_identifier`. A conversation must first be created using the `createAgentConversation` API. #### Usage guidelines The request must include: - `conversation_identifier`: the unique session ID returned by `createAgentConversation`, used for context continuity and message tracking - `messages`: an array of one or more text messages to send to the agent The API returns an array of response objects, each containing: - `type`: the kind of response — `text`, `answer`, or `error` - `message`: the main content of the response - `metadata`: additional information depending on the message type (e.g., answer metadata includes analytics and visualization details) #### Error responses | Code | Description | |------|----------------------------------------------------------------------------------------------------------------------------------| | 401 | Unauthorized — authentication token is missing, expired, or invalid. | | 403 | Forbidden — the authenticated user does not have `CAN_USE_SPOTTER` privilege or lacks permission on the referenced conversation. | > ###### Note: > > - This endpoint is Generally Available from version 26.5.0.cl. > - This endpoint requires Spotter - please contact ThoughtSpot support to enable Spotter on your cluster. > - For real-time streamed responses, use `sendAgentConversationMessageStreaming` instead. + * @param conversationIdentifier Unique identifier for the conversation (used to track context) + * @param sendAgentConversationMessageRequest + */ + public sendAgentConversationMessage(conversationIdentifier: string, sendAgentConversationMessageRequest: SendAgentConversationMessageRequest, _options?: Configuration): Promise { + const result = this.api.sendAgentConversationMessage(conversationIdentifier, sendAgentConversationMessageRequest, _options); + return result.toPromise(); + } + + /** + * Version: 26.5.0.cl or later Sends one or more natural language messages to an existing Spotter agent conversation and returns the response as a real-time Server-Sent Events stream. Requires `CAN_USE_SPOTTER` privilege and access to the metadata object associated with the conversation. The user must have access to the conversation session referenced by `conversation_identifier`. A conversation must first be created using the `createAgentConversation` API. #### Usage guidelines The request must include: - `conversation_identifier`: the unique session ID returned by `createAgentConversation`, used for context continuity and message tracking - `messages`: an array of one or more text messages to send to the agent If the request is valid, the API returns a Server-Sent Events (SSE) stream. Each line has the form `data: [{\"type\": \"...\", ...}]` — a JSON array of event objects. Event types include: - `ack`: confirms receipt of the request (`node_id`) - `conv_title`: conversation title (`title`, `conv_id`) - `notification`: status updates on operations (`group_id`, `metadata`, `code` — e.g. `TOOL_CALL_NOTIFICATION`, `nls_start`, `FINAL_RESPONSE_NOTIFICATION`) - `text-chunk`: incremental content chunks (`id`, `group_id`, `metadata` with `format` and `type` such as `thinking` or `text`, `content`) - `text`: full text block with same structure as `text-chunk` - `answer`: structured answer with metadata (`id`, `group_id`, `metadata` with `sage_query`, `session_id`, `title`, etc., `title`) - `error`: if a failure occurs #### Error responses | Code | Description | | ---- | -------------------------------------------------------------------------------------------------------------------------------- | | 401 | Unauthorized — authentication token is missing, expired, or invalid. | | 403 | Forbidden — the authenticated user does not have `CAN_USE_SPOTTER` privilege or lacks permission on the referenced conversation. | > ###### Note: > > - This endpoint is Generally Available from version 26.5.0.cl. > - This endpoint requires Spotter - please contact ThoughtSpot support to enable Spotter on your cluster. > - The streaming protocol uses Server-Sent Events (SSE). > - For the complete response in a single payload, use `sendAgentConversationMessage` instead. + * @param conversationIdentifier Unique identifier for the conversation (used to track context) + * @param sendAgentConversationMessageStreamingRequest + */ + public sendAgentConversationMessageStreaming(conversationIdentifier: string, sendAgentConversationMessageStreamingRequest: SendAgentConversationMessageStreamingRequest, _options?: Configuration): Promise { + const result = this.api.sendAgentConversationMessageStreaming(conversationIdentifier, sendAgentConversationMessageStreamingRequest, _options); + return result.toPromise(); + } + + /** + * Version: 26.2.0.cl or later **Deprecated** — Use `sendAgentConversationMessage` instead. Send natural language messages to an existing Spotter agent conversation and returns the complete response synchronously. Requires `CAN_USE_SPOTTER` privilege and access to the metadata object associated with the conversation. The user must have access to the conversation session referenced by `conversation_identifier`. A conversation must first be created using the `createAgentConversation` API. #### Usage guidelines The request must include: - `conversation_identifier`: the unique session ID returned by `createAgentConversation`, used for context continuity and message tracking - `messages`: an array of one or more text messages to send to the agent The API returns an array of response objects, each containing: - `type`: the kind of response — `text`, `answer`, or `error` - `message`: the main content of the response - `metadata`: additional information depending on the message type (e.g., answer metadata includes analytics and visualization details) #### Error responses | Code | Description | |------|----------------------------------------------------------------------------------------------------------------------------------| | 401 | Unauthorized — authentication token is missing, expired, or invalid. | | 403 | Forbidden — the authenticated user does not have `CAN_USE_SPOTTER` privilege or lacks permission on the referenced conversation. | > ###### Note: > > - This endpoint is deprecated. Use `sendAgentConversationMessage` for new integrations. > - This endpoint is currently in Beta. Breaking changes may be introduced before the endpoint is made Generally Available. > - This endpoint requires Spotter - please contact ThoughtSpot support to enable Spotter on your cluster. + * @param conversationIdentifier Unique identifier for the conversation (used to track context) + * @param sendAgentMessageRequest + */ + public sendAgentMessage(conversationIdentifier: string, sendAgentMessageRequest: SendAgentMessageRequest, _options?: Configuration): Promise { + const result = this.api.sendAgentMessage(conversationIdentifier, sendAgentMessageRequest, _options); + return result.toPromise(); + } + + /** + * Version: 26.2.0.cl or later **Deprecated** — Use `sendAgentConversationMessageStreaming` instead. Sends one or more natural language messages to an existing Spotter agent conversation and returns the response as a real-time Server-Sent Events stream. Requires `CAN_USE_SPOTTER` privilege and access to the metadata object associated with the conversation. The user must have access to the conversation session referenced by `conversation_identifier`. A conversation must first be created using the `createAgentConversation` API. #### Usage guidelines The request must include: - `conversation_identifier`: the unique session ID returned by `createAgentConversation`, used for context continuity and message tracking - `messages`: an array of one or more text messages to send to the agent If the request is valid, the API returns a Server-Sent Events (SSE) stream. Each line has the form `data: [{\"type\": \"...\", ...}]` — a JSON array of event objects. Event types include: - `ack`: confirms receipt of the request (`node_id`) - `conv_title`: conversation title (`title`, `conv_id`) - `notification`: status updates on operations (`group_id`, `metadata`, `code` — e.g. `TOOL_CALL_NOTIFICATION`, `nls_start`, `FINAL_RESPONSE_NOTIFICATION`) - `text-chunk`: incremental content chunks (`id`, `group_id`, `metadata` with `format` and `type` such as `thinking` or `text`, `content`) - `text`: full text block with same structure as `text-chunk` - `answer`: structured answer with metadata (`id`, `group_id`, `metadata` with `sage_query`, `session_id`, `title`, etc., `title`) - `error`: if a failure occurs #### Error responses | Code | Description | |------|----------------------------------------------------------------------------------------------------------------------------------| | 401 | Unauthorized — authentication token is missing, expired, or invalid. | | 403 | Forbidden — the authenticated user does not have `CAN_USE_SPOTTER` privilege or lacks permission on the referenced conversation. | > ###### Note: > > - This endpoint is deprecated. Use `sendAgentConversationMessageStreaming` for new integrations. > - This endpoint is currently in Beta. Breaking changes may be introduced before the endpoint is made Generally Available. > - This endpoint requires Spotter - please contact ThoughtSpot support to enable Spotter on your cluster. > - The streaming protocol uses Server-Sent Events (SSE). + * @param sendAgentMessageStreamingRequest + */ + public sendAgentMessageStreaming(sendAgentMessageStreamingRequest: SendAgentMessageStreamingRequest, _options?: Configuration): Promise { + const result = this.api.sendAgentMessageStreaming(sendAgentMessageStreamingRequest, _options); + return result.toPromise(); + } + + /** + * Version: 10.4.0.cl or later Sends a follow-up message to an existing conversation within the context of a data model. Requires `CAN_USE_SPOTTER` privilege and at least view access to the metadata object specified in the request. A conversation must first be created using the `createConversation` API. #### Usage guidelines The request must include: - `conversation_identifier`: the unique session ID returned by `createConversation` - `metadata_identifier`: the unique ID of the data source used for the conversation - `message`: a natural language string with the follow-up question If the request is successful, the API returns an array of response messages, each containing: - `session_identifier`: the unique ID of the generated response - `generation_number`: the generation number of the response - `message_type`: the type of the response (e.g., `TSAnswer`) - `visualization_type`: the generated visualization type (`Chart`, `Table`, or `Undefined`) - `tokens` / `display_tokens`: the search tokens and user-friendly display tokens for the response #### Error responses | Code | Description | |------|-----------------------------------------------------------------------------------------------------------------------------------------| | 401 | Unauthorized — authentication token is missing, expired, or invalid. | | 403 | Forbidden — the authenticated user does not have `CAN_USE_SPOTTER` privilege or lacks view permission on the specified metadata object. | > ###### Note: > * This endpoint is currently in Beta. Breaking changes may be introduced before the endpoint is made Generally Available. > * This endpoint requires Spotter - please contact ThoughtSpot support to enable Spotter on your cluster. + * @param conversationIdentifier Unique identifier of the conversation. + * @param sendMessageRequest + */ + public sendMessage(conversationIdentifier: string, sendMessageRequest: SendMessageRequest, _options?: Configuration): Promise> { + const result = this.api.sendMessage(conversationIdentifier, sendMessageRequest, _options); + return result.toPromise(); + } + + /** + * Version: 10.15.0.cl or later This API allows users to set natural language (NL) instructions for a specific data-model to improve AI-generated answers and query processing. These instructions help guide the AI system to better understand the data context and provide more accurate responses. Requires `CAN_USE_SPOTTER` privilege, either edit access or `SPOTTER_COACHING_PRIVILEGE` on the data model, and a bearer token corresponding to the org where the data model exists. #### Usage guidelines To set NL instructions for a data-model, the request must include: - `data_source_identifier`: The unique ID of the data-model for which to set NL instructions - `nl_instructions_info`: An array of instruction objects, each containing: - `instructions`: Array of text instructions for the LLM - `scope`: The scope of the instruction (`GLOBAL`). Currently only `GLOBAL` is supported. It can be extended to data-model-user scope in future. #### Instructions scope - **GLOBAL**: instructions that apply to all users querying this data model If the request is successful, the API returns: - `success`: a boolean indicating whether the operation completed successfully #### Error responses | Code | Description | |------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| | 401 | Unauthorized — authentication token is missing, expired, or invalid. | | 403 | Forbidden — the authenticated user does not have `CAN_USE_SPOTTER` privilege, lacks edit access or `SPOTTER_COACHING_PRIVILEGE` on the data model, or the bearer token does not correspond to the org where the data model exists. | > ###### Note: > > - To use this API, the user needs either edit access or `SPOTTER_COACHING_PRIVILEGE` on the data model, and must use the bearer token corresponding to the org where the data model exists. > - This endpoint is currently in Beta. Breaking changes may be introduced before the endpoint is made Generally Available. > - Available from version 10.15.0.cl and later. > - This endpoint requires Spotter — please contact ThoughtSpot Support to enable Spotter on your cluster. > - Instructions help improve the accuracy and relevance of AI-generated responses for the specified data-model. + * @param setNLInstructionsRequest + */ + public setNLInstructions(setNLInstructionsRequest: SetNLInstructionsRequest, _options?: Configuration): Promise { + const result = this.api.setNLInstructions(setNLInstructionsRequest, _options); + return result.toPromise(); + } + + /** + * Version: 10.4.0.cl or later Processes a natural language query against a specified data model and returns a single AI-generated answer without requiring a conversation session. Requires `CAN_USE_SPOTTER` privilege and at least view access to the metadata object specified in the request. #### Usage guidelines The request must include: - `query`: a natural language question (e.g., \"What were total sales last quarter?\") - `metadata_identifier`: the unique ID of the data source to query against If the request is successful, the API returns a response message containing: - `session_identifier`: the unique ID of the generated response - `generation_number`: the generation number of the response - `message_type`: the type of the response (e.g., `TSAnswer`) - `visualization_type`: the generated visualization type (`Chart`, `Table`, or `Undefined`) - `tokens` / `display_tokens`: the search tokens and user-friendly display tokens for the response #### Error responses | Code | Description | |------|-----------------------------------------------------------------------------------------------------------------------------------------| | 401 | Unauthorized — authentication token is missing, expired, or invalid. | | 403 | Forbidden — the authenticated user does not have `CAN_USE_SPOTTER` privilege or lacks view permission on the specified metadata object. | > ###### Note: > * This endpoint is currently in Beta. Breaking changes may be introduced before the endpoint is made Generally Available. > * This endpoint requires Spotter - please contact ThoughtSpot support to enable Spotter on your cluster. + * @param singleAnswerRequest + */ + public singleAnswer(singleAnswerRequest: SingleAnswerRequest, _options?: Configuration): Promise { + const result = this.api.singleAnswer(singleAnswerRequest, _options); + return result.toPromise(); + } + + /** + * Stops an in-progress agent conversation response. Version: 26.6.0.cl or later Version: 26.6.0.cl or later Stops an in-progress agent response for the specified conversation. Use this endpoint to cancel a response that is actively being generated — for example, when the user navigates away, reformulates their question, or no longer needs the current result. Requires `CAN_USE_SPOTTER` privilege and access to the specified conversation. #### Usage guidelines The request must include: - `conversation_identifier` *(path parameter)*: the unique ID of the conversation whose active response should be stopped, as returned by `createAgentConversation` A successful request returns an empty `204 No Content` response. If there is no active response in progress at the time of the call, the request is still treated as successful. After stopping a response, the conversation session remains active. You can continue sending messages using `sendAgentConversationMessage` or `sendAgentConversationMessageStreaming`. #### Example request ```bash POST /api/rest/2.0/ai/agent/conversation/{conversation_identifier}/stop-response ``` #### Typical usage scenario This endpoint is useful when integrating Spotter into a chat UI where users can cancel a long-running query. For example: 1. User sends a message via `sendAgentConversationMessageStreaming`. 2. User clicks a \"Stop generating\" button while the response is streaming. 3. Your client calls `stopConversation` with the active `conversation_identifier`. 4. The stream is terminated and the user can ask a new question. #### Error responses | Code | Description | |------|-------------| | 401 | Unauthorized — authentication token is missing, expired, or invalid. | | 403 | Forbidden — the authenticated user does not have `CAN_USE_SPOTTER` privilege or lacks access to the specified conversation. | > ###### Note: > > - Calling this endpoint when no response is in progress does not return an error. > - The conversation context is preserved after stopping — previous messages and answers remain accessible. > - Available from version 26.6.0.cl and later. > - This endpoint requires Spotter — please contact ThoughtSpot Support to enable Spotter on your cluster. > - This feature is available only for **Spotter 3** (`SPOTTER3`) version. + * @param conversationIdentifier Unique identifier of the conversation to stop. + */ + public stopConversation(conversationIdentifier: string, _options?: Configuration): Promise { + const result = this.api.stopConversation(conversationIdentifier, _options); + return result.toPromise(); + } + + +} + + + +import { ObservableAuthenticationApi } from './ObservableAPI'; + +import { AuthenticationApiRequestFactory, AuthenticationApiResponseProcessor} from "../apis/AuthenticationApi"; +export class PromiseAuthenticationApi { + private api: ObservableAuthenticationApi + + public constructor( + configuration: Configuration, + requestFactory?: AuthenticationApiRequestFactory, + responseProcessor?: AuthenticationApiResponseProcessor + ) { + this.api = new ObservableAuthenticationApi(configuration, requestFactory, responseProcessor); + } + + /** + * Version: 26.6.0.cl or later Enables or disables authentication at cluster or org level for the specified auth type. Currently supports `TRUSTED_AUTH`. #### Required privileges Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) or `CONTROL_TRUSTED_AUTH` (**Can Enable or Disable Trusted Authentication**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled, the `CONTROL_TRUSTED_AUTH` privilege is required. #### Usage guidelines Use `cluster_preferences` to enable or disable authentication at the cluster level. Cluster-level settings can only be configured from the Primary Org. - `ENABLED` — Generates a new access token if one does not exist. An existing token is preserved. - `DISABLED` — Revokes the existing cluster-level access token. Use `org_preferences` to enable or disable authentication for one or more Orgs. Each entry must include an `org_identifier` (unique ID or name) and an `auth_status`. Org-level configuration requires the per-Org authentication feature to be enabled on your instance. - `ENABLED` — Generates a new org-level access token if one does not exist. - `DISABLED` — Revokes the existing org-level access token for that Org. Both `cluster_preferences` and `org_preferences` are optional. Omitting a field leaves the corresponding settings unchanged. If both are omitted, the API returns `204 No Content` without making any changes. **Note**: Cluster-level and org-level settings are independent of each other. Enabling or disabling one does not affect the other. + * @param configureAuthSettingsRequest + */ + public configureAuthSettings(configureAuthSettingsRequest: ConfigureAuthSettingsRequest, _options?: Configuration): Promise { + const result = this.api.configureAuthSettings(configureAuthSettingsRequest, _options); + return result.toPromise(); + } + + /** + * Version: 9.0.0.cl or later Retrieves details of the current user session for the token provided in the request header. Any ThoughtSpot user can access this endpoint and send an API request. The data returned in the API response varies according to user\'s privilege and object access permissions. **NOTE**: In ThoughtSpot, users with cluster administration privileges can access all Orgs by default. However, unless the administrator is explicitly added to an Org, the Orgs list in the session information returned by the API will include only the Primary Org. To include other Orgs in the API response, you must explicitly add the administrator to each Org in the Admin settings page in the UI or via user REST API. + */ + public getCurrentUserInfo(_options?: Configuration): Promise { + const result = this.api.getCurrentUserInfo(_options); + return result.toPromise(); + } + + /** + * Version: 9.4.0.cl or later Retrieves details of the current session token for the bearer token provided in the request header. This API endpoint does not create a new token. Instead, it returns details about the token, including the token string, creation time, expiration time, and the associated user. Use this endpoint to introspect your current session token, debug authentication issues, or when a frontend application needs session token details. Any ThoughtSpot user with a valid bearer token can access this endpoint and send an API request + */ + public getCurrentUserToken(_options?: Configuration): Promise { + const result = this.api.getCurrentUserToken(_options); + return result.toPromise(); + } + + /** + * Version: 10.4.0.cl or later Creates an authentication token that provides values for the formula variables in the Row Level Security (RLS) rules for a given user. Recommended for use cases that require Attribute-based access control (ABAC) via RLS. #### Required privileges To add a new user and assign privileges during auto-creation, the `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege is required. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled, the `CONTROL_TRUSTED_AUTH` (**Can Enable or Disable Trusted Authentication**) privilege and edit access to the data source are required. To configure formula variables for all Orgs on your instance or the Primary Org, cluster administration privileges are required. Org administrators can configure formula variables for their respective Orgs. If Role-Based Access Control (RBAC) is enabled, users with the `CAN_MANAGE_VARIABLES` (**Can manage variables**) role privilege can also create and manage variables for their Org context. #### Usage guidelines You can generate a token by providing a `username` and `password`, or by using a `secret_key`. To generate a `secret_key`, the administrator must enable [Trusted authentication](https://developers.thoughtspot.com/docs/trusted-auth-secret-key) in the **Develop** > **Customizations** > **Security Settings** page. **Note**: * When both `password` and `secret_key` are included in the API request, `password` takes precedence. * If [Multi-Factor Authentication (MFA)](https://docs.thoughtspot.com/cloud/latest/authentication-local-mfa) is enabled on your instance, the API login request with `username` and `password` returns an error. You can switch to token-based authentication with `secret_key` or contact ThoughtSpot Support for assistance. The token obtained from ThoughtSpot is valid for 5 minutes by default. You can configure the token expiration time as required. #### ABAC via RLS To implement ABAC via RLS and assign security entitlements to users during session creation, generate a token with custom variable values. The values set in the authentication token are applied to the formula variables referenced in RLS rules at the table level, which determines the data each user can access based on their entitlements. The variable values can be configured to persist for a specific set of Models in user sessions initiated with the token, allowing different RLS rules to be set for different data models. Once defined, the rules are added to the user\'s `variable_values` object, after which all sessions will use the persisted values. For more information, see [ABAC via tokens Documentation](https://developers.thoughtspot.com/docs/abac-via-rls-variables). ##### Formula variables Before defining variable values, ensure the variables are created and available on your instance. To create a formula variable, you can use the **Create variable** (`/api/rest/2.0/template/variables/create`) REST API endpoint, with the variable `type` set as `Formula_Variable` in the API request. The API doesn\'t support `\"persist_option\": \"RESET\"` and `\"persist_option\": \"NONE\"` when `variable_values` are defined in the request. If you are using `variable_values` for token generation, you must use other supported persist options such as `APPEND` or `REPLACE`. If you want to use `RESET` or `NONE`, do not pass any `variable_values`. In such cases, `variable_values` will remain unaffected. #### Supported objects The supported object type is `LOGICAL_TABLE`. When using `object_id` with `variable_values`, models are supported. #### Just-in-time provisioning For [just-in-time user creation and provisioning](https://developers.thoughtspot.com/docs/just-in-time-provisioning), specify the following attributes in the API request: * `auto_create` * `username` * `display_name` * `email` * `groups` Set `auto_create` to `true` if the username does not exist in ThoughtSpot. If the username already exists in ThoughtSpot and `auto_create` is set to `true`, user properties such as display name, email, Org and group entitlements will not be updated with new values. Setting `auto_create` to `true` does not create formula variables. Hence, this setting will not be applicable to `variable_values`. #### Important point to note All options in the token creation APIs that define user access to data in ThoughtSpot will take effect during token creation, not when the token is used for authentication. For example, `auto_create:true` will create the user when the authentication token is created. Persist options such as `APPEND` and `REPLACE` will persist `variable_values` on the user profile when the token is created. + * @param getCustomAccessTokenRequest + */ + public getCustomAccessToken(getCustomAccessTokenRequest: GetCustomAccessTokenRequest, _options?: Configuration): Promise { + const result = this.api.getCustomAccessToken(getCustomAccessTokenRequest, _options); + return result.toPromise(); + } + + /** + * Version: 9.0.0.cl or later Generates an authentication token for creating a full session in ThoughtSpot for a given user. Recommended for use cases that do not require Attribute-based access control (ABAC) via Row Level Security (RLS). #### Usage guidelines You can generate a token for a user by providing a `username` and `password`, or by using the `secret_key` generated for your instance. To generate a `secret_key`, the administrator must enable [Trusted authentication](https://developers.thoughtspot.com/docs/trusted-auth-secret-key) in the **Develop** > **Customizations** > **Security Settings** page. **Note**: * When both `password` and `secret_key` are included in the API request, `password` takes precedence. * If [Multi-Factor Authentication (MFA)](https://docs.thoughtspot.com/cloud/latest/authentication-local-mfa) is enabled on your instance, the API login request with `username` and `password` returns an error. You can switch to token-based authentication with `secret_key` or contact ThoughtSpot Support for assistance. The token obtained from ThoughtSpot is valid for 5 minutes by default. You can configure the token expiration time as required. #### Just-in-time provisioning For [just-in-time user creation and provisioning](https://developers.thoughtspot.com/docs/just-in-time-provisioning), specify the following attributes in the API request: * `auto_create` * `username` * `display_name` * `email` * `group_identifiers` Set `auto_create` to `true` if the username does not exist in ThoughtSpot. If the user already exists in ThoughtSpot and `auto_create` is set to `true`, user properties such as display name, email and group assignment will be updated. To add a new user and assign privileges during auto-creation, the `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege is required. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled, the `CONTROL_TRUSTED_AUTH` (**Can Enable or Disable Trusted Authentication**) privilege is required. #### Important point to note All options in the token creation APIs that define user access to data in ThoughtSpot will take effect during token creation, not when the token is used for authentication. For example, `auto_create:true` will create the user when the authentication token is created. + * @param getFullAccessTokenRequest + */ + public getFullAccessToken(getFullAccessTokenRequest: GetFullAccessTokenRequest, _options?: Configuration): Promise { + const result = this.api.getFullAccessToken(getFullAccessTokenRequest, _options); + return result.toPromise(); + } + + /** + * Version: 9.0.0.cl or later Generates an authentication token that provides access to a specific metadata object. This object list is intersected with the list of objects the user is allowed to access via group membership. For more information, see [Object security](https://docs.thoughtspot.com/cloud/latest/security-data-object#object_security). #### Usage guidelines You can generate a token for a user by providing a `username` and `password`, or by using the `secret_key` generated for your instance. To generate a `secret_key`, the administrator must enable [Trusted authentication](https://developers.thoughtspot.com/docs/trusted-auth-secret-key) in the **Develop** > **Customizations** > **Security Settings** page. **Note**: * When both `password` and `secret_key` are included in the API request, `password` takes precedence. * If [Multi-Factor Authentication (MFA)](https://docs.thoughtspot.com/cloud/latest/authentication-local-mfa) is enabled on your instance, the API login request with `username` and `password` returns an error. You can switch to token-based authentication with `secret_key` or contact ThoughtSpot Support for assistance. The token obtained from ThoughtSpot is valid for 5 minutes by default. You can configure the token expiration time as required. #### Just-in-time provisioning For [just-in-time user creation and provisioning](https://developers.thoughtspot.com/docs/just-in-time-provisioning), specify the following attributes in the API request: * `auto_create` * `username` * `display_name` * `email` * `group_identifiers` Set `auto_create` to `true` if the user is not available in ThoughtSpot. If the user already exists in ThoughtSpot and the `auto_create` parameter is set to `true`, user properties such as display name, email, and group assignment will be updated. To add a new user and assign privileges, the `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege is required. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled, the `CONTROL_TRUSTED_AUTH`(**Can Enable or Disable Trusted Authentication**) privilege is required. #### Important point to note All options in the token creation APIs that define user access to data in ThoughtSpot will take effect during token creation, not when the token is used for authentication. For example, `auto_create:true` will create the user when the authentication token is created. + * @param getObjectAccessTokenRequest + */ + public getObjectAccessToken(getObjectAccessTokenRequest: GetObjectAccessTokenRequest, _options?: Configuration): Promise { + const result = this.api.getObjectAccessToken(getObjectAccessTokenRequest, _options); + return result.toPromise(); + } + + /** + * Version: 9.0.0.cl or later Creates a login session for a ThoughtSpot user with Basic authentication. In Basic authentication method, REST clients log in to ThoughtSpot using `username` and `password` attributes. On a multi-tenant cluster with Orgs, users can pass the ID of the Org in the API request to log in to a specific Org context. **Note**: If Multi-Factor Authentication (MFA) is enabled on your instance, the API login request with basic authentication (`username` and `password` ) returns an error. Contact ThoughtSpot Support for assistance. A successful login returns a session cookie that can be used in your subsequent API requests. + * @param loginRequest + */ + public login(loginRequest: LoginRequest, _options?: Configuration): Promise { + const result = this.api.login(loginRequest, _options); + return result.toPromise(); + } + + /** + * Version: 9.0.0.cl or later Logs out a user from their current session. + */ + public logout(_options?: Configuration): Promise { + const result = this.api.logout(_options); + return result.toPromise(); + } + + /** + * Version: 9.0.0.cl or later Revokes the authentication token issued for current user session. The token of your current session expires when you make a call to the `/api/rest/2.0/auth/token/revoke` endpoint. the users will not be able to access ThoughtSpot objects until a new token is obtained. To restart your session, request for a new token from ThoughtSpot. See [Get Full Access Token](#/http/api-endpoints/authentication/get-full-access-token). + * @param revokeTokenRequest + */ + public revokeToken(revokeTokenRequest: RevokeTokenRequest, _options?: Configuration): Promise { + const result = this.api.revokeToken(revokeTokenRequest, _options); + return result.toPromise(); + } + + /** + * Version: 26.6.0.cl or later Returns the authentication configuration for the specified auth type at cluster and org level. Currently supports `TRUSTED_AUTH`. #### Required privileges Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) or `CONTROL_TRUSTED_AUTH` (**Can Enable or Disable Trusted Authentication**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled, the `CONTROL_TRUSTED_AUTH` privilege is required. #### Usage guidelines Use `scope` to control which level of settings are returned: - `CLUSTER` — Returns cluster-level authentication status and access tokens. Accessible only from the Primary Org. - `ORG` — Returns org-level authentication status and access tokens for the current Org. Requires the per-Org authentication feature to be enabled on your instance. - If `scope` is omitted, both cluster and org-level settings are returned based on the caller\'s org context and feature availability. The `access_tokens` array in `cluster_preferences` or `org_preferences` is omitted when no token is configured at that level. **Note**: Access tokens returned in the response are sensitive credentials. Treat them with the same care as passwords. + * @param searchAuthSettingsRequest + */ + public searchAuthSettings(searchAuthSettingsRequest: SearchAuthSettingsRequest, _options?: Configuration): Promise { + const result = this.api.searchAuthSettings(searchAuthSettingsRequest, _options); + return result.toPromise(); + } + + /** + * Version: 9.12.0.cl or later Validates the authentication token specified in the API request. If your token is not valid, [Get a new token](#/http/api-endpoints/authentication/get-full-access-token). + * @param validateTokenRequest + */ + public validateToken(validateTokenRequest: ValidateTokenRequest, _options?: Configuration): Promise { + const result = this.api.validateToken(validateTokenRequest, _options); + return result.toPromise(); + } + + +} + + + +import { ObservableCollectionsApi } from './ObservableAPI'; + +import { CollectionsApiRequestFactory, CollectionsApiResponseProcessor} from "../apis/CollectionsApi"; +export class PromiseCollectionsApi { + private api: ObservableCollectionsApi + + public constructor( + configuration: Configuration, + requestFactory?: CollectionsApiRequestFactory, + responseProcessor?: CollectionsApiResponseProcessor + ) { + this.api = new ObservableCollectionsApi(configuration, requestFactory, responseProcessor); + } + + /** + * Version: 26.4.0.cl or later Creates a new collection in ThoughtSpot. Collections allow you to organize and group related metadata objects such as Liveboards, Answers, worksheets, and other data objects. You can also create nested collections (sub-collections) to build a hierarchical structure. #### Supported operations The API endpoint lets you perform the following operations: * Create a new collection * Add metadata objects (Liveboards, Answers, Logical Tables) to the collection * Create nested collections by adding sub-collections + * @param createCollectionRequest + */ + public createCollection(createCollectionRequest: CreateCollectionRequest, _options?: Configuration): Promise { + const result = this.api.createCollection(createCollectionRequest, _options); + return result.toPromise(); + } + + /** + * Version: 26.4.0.cl or later Deletes one or more collections from ThoughtSpot. #### Delete options * **delete_children**: When set to `true`, deletes the child objects (metadata items) within the collection that the user has access to. Objects that the user does not have permission to delete will be skipped. * **dry_run**: When set to `true`, performs a preview of the deletion operation without actually deleting anything. The response shows what would be deleted, allowing you to review before committing the deletion. #### Response The response includes: * **metadata_deleted**: List of metadata objects that were successfully deleted * **metadata_skipped**: List of metadata objects that were skipped due to lack of permissions or other constraints + * @param deleteCollectionRequest + */ + public deleteCollection(deleteCollectionRequest: DeleteCollectionRequest, _options?: Configuration): Promise { + const result = this.api.deleteCollection(deleteCollectionRequest, _options); + return result.toPromise(); + } + + /** + * Version: 26.4.0.cl or later Gets a list of collections available in ThoughtSpot. To get details of a specific collection, specify the collection GUID or name. You can also filter the API response based on the collection name pattern, author, and other criteria. #### Search options * **name_pattern**: Use \'%\' as a wildcard character to match collection names * **collection_identifiers**: Search for specific collections by their GUIDs or names * **include_metadata**: When set to `true`, includes the metadata objects within each collection in the response **NOTE**: If the API returns an empty list, consider increasing the value of the `record_size` parameter. To search across all available collections, set `record_size` to `-1`. + * @param searchCollectionsRequest + */ + public searchCollections(searchCollectionsRequest: SearchCollectionsRequest, _options?: Configuration): Promise { + const result = this.api.searchCollections(searchCollectionsRequest, _options); + return result.toPromise(); + } + + /** + * Version: 26.4.0.cl or later Updates an existing collection in ThoughtSpot. #### Supported operations This API endpoint lets you perform the following operations: * Update collection name and description * Change visibility settings * Add metadata objects to the collection (operation: ADD) * Remove metadata objects from the collection (operation: REMOVE) * Replace all metadata objects in the collection (operation: REPLACE) #### Operation types * **ADD**: Adds the specified metadata objects to the existing collection without removing current items * **REMOVE**: Removes only the specified metadata objects from the collection * **REPLACE**: Replaces all existing metadata objects with the specified items (default behavior) + * @param collectionIdentifier Unique GUID of the collection. Note: Collection names cannot be used as identifiers since duplicate names are allowed. + * @param updateCollectionRequest + */ + public updateCollection(collectionIdentifier: string, updateCollectionRequest: UpdateCollectionRequest, _options?: Configuration): Promise { + const result = this.api.updateCollection(collectionIdentifier, updateCollectionRequest, _options); + return result.toPromise(); + } + + +} + + + +import { ObservableConnectionConfigurationsApi } from './ObservableAPI'; + +import { ConnectionConfigurationsApiRequestFactory, ConnectionConfigurationsApiResponseProcessor} from "../apis/ConnectionConfigurationsApi"; +export class PromiseConnectionConfigurationsApi { + private api: ObservableConnectionConfigurationsApi + + public constructor( + configuration: Configuration, + requestFactory?: ConnectionConfigurationsApiRequestFactory, + responseProcessor?: ConnectionConfigurationsApiResponseProcessor + ) { + this.api = new ObservableConnectionConfigurationsApi(configuration, requestFactory, responseProcessor); + } + + /** + * Version: 10.12.0.cl or later Gets connection configuration objects. Requires `DATAMANAGEMENT` (**Can manage data**) and edit permissions to the connection object, or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) privilege is required. #### Usage guidelines * To get a list of all configurations available in the ThoughtSpot system, send the API request with only the connection name or GUID in the request body. * To fetch details of a configuration object, specify the configuration object name or GUID. + * @param connectionConfigurationSearchRequest + */ + public connectionConfigurationSearch(connectionConfigurationSearchRequest: ConnectionConfigurationSearchRequest, _options?: Configuration): Promise> { + const result = this.api.connectionConfigurationSearch(connectionConfigurationSearchRequest, _options); + return result.toPromise(); + } + + /** + * Version: 10.12.0.cl or later Creates an additional configuration to an existing connection to a data warehouse. Requires `DATAMANAGEMENT` (**Can manage data**) or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) privilege is required. #### Usage guidelines * A JSON map of configuration attributes in `configuration`. The following example shows the configuration attributes: ``` { \"user\":\"DEV_USER\", \"password\":\"TestConn123\", \"role\":\"DEV\", \"warehouse\":\"DEV_WH\" } ``` * If the `policy_type` is `PRINCIPALS`, then `policy_principals` is a required field. * If the `policy_type` is `PROCESSES`, then `policy_processes` is a required field. * If the `policy_type` is `NO_POLICY`, then `policy_principals` and `policy_processes` are not required fields. #### Parameterized Connection Support For parameterized connections that use OAuth authentication, only the same_as_parent and policy_process_options attributes are allowed in the API request. These attributes are not applicable to connections that are not parameterized. + * @param createConnectionConfigurationRequest + */ + public createConnectionConfiguration(createConnectionConfigurationRequest: CreateConnectionConfigurationRequest, _options?: Configuration): Promise { + const result = this.api.createConnectionConfiguration(createConnectionConfigurationRequest, _options); + return result.toPromise(); + } + + /** + * Version: 10.12.0.cl or later Deletes connection configuration objects. Requires `DATAMANAGEMENT` (**Can manage data**) and edit permissions to the connection object, or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) privilege is required. + * @param deleteConnectionConfigurationRequest + */ + public deleteConnectionConfiguration(deleteConnectionConfigurationRequest: DeleteConnectionConfigurationRequest, _options?: Configuration): Promise { + const result = this.api.deleteConnectionConfiguration(deleteConnectionConfigurationRequest, _options); + return result.toPromise(); + } + + /** + * Version: 10.12.0.cl or later Updates a connection configuration object. Requires `DATAMANAGEMENT` (**Can manage data**) and edit permissions to the connection object, or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) privilege is required. #### Supported operations This API endpoint lets you perform the following operations in a single API request: * Edit the name or description of the configuration * Edit the configuration properties * Edit the `policy_type` * Edit the type of authentication * Enable or disable a configuration #### Parameterized Connection Support For parameterized oauth based connections, only the `same_as_parent` and `policy_process_options` attributes are allowed. These attributes are not applicable to connections that are not parameterized. **NOTE**: When updating a configuration where `disabled` is `true`, you must reset `disabled` to `true` in your update request payload. If not explicitly set again, the API will default `disabled` to `false`. + * @param configurationIdentifier Unique ID or name of the configuration. + * @param updateConnectionConfigurationRequest + */ + public updateConnectionConfiguration(configurationIdentifier: string, updateConnectionConfigurationRequest: UpdateConnectionConfigurationRequest, _options?: Configuration): Promise { + const result = this.api.updateConnectionConfiguration(configurationIdentifier, updateConnectionConfigurationRequest, _options); + return result.toPromise(); + } + + +} + + + +import { ObservableConnectionsApi } from './ObservableAPI'; + +import { ConnectionsApiRequestFactory, ConnectionsApiResponseProcessor} from "../apis/ConnectionsApi"; +export class PromiseConnectionsApi { + private api: ObservableConnectionsApi + + public constructor( + configuration: Configuration, + requestFactory?: ConnectionsApiRequestFactory, + responseProcessor?: ConnectionsApiResponseProcessor + ) { + this.api = new ObservableConnectionsApi(configuration, requestFactory, responseProcessor); + } + + /** + * Version: 9.2.0.cl or later Creates a connection to a data warehouse for live query services. Requires `DATAMANAGEMENT` (**Can manage data**) or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) privilege is required. #### Create a connection without tables To create a connection without tables: 1. Pass these parameters in your API request. * Name of the connection. * Type of the data warehouse to connect to. * A JSON map of configuration attributes in `data_warehouse_config`. The following example shows the configuration attributes for a SnowFlake connection: ``` { \"configuration\":{ \"accountName\":\"thoughtspot_partner\", \"user\":\"tsadmin\", \"password\":\"TestConn123\", \"role\":\"sysadmin\", \"warehouse\":\"MEDIUM_WH\" }, \"authenticationType\": \"SERVICE_ACCOUNT\", \"externalDatabases\":[ ] } ``` 2. Set `validate` to `false`. **NOTE:** If the `authentication_type` is anything other than SERVICE_ACCOUNT, you must explicitly provide the authenticationType property in the payload. If you do not specify authenticationType, the API will default to SERVICE_ACCOUNT as the authentication type. #### Create a connection with tables If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) and `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` (**Can manage data models**) privilege is required. To create a connection with tables: 1. Pass these parameters in your API request. * Name of the connection. * Type of the data warehouse to connect to. * A JSON map of configuration attributes, database details, and table properties in `data_warehouse_config` as shown in the following example: ``` { \"configuration\":{ \"accountName\":\"thoughtspot_partner\", \"user\":\"tsadmin\", \"password\":\"TestConn123\", \"role\":\"sysadmin\", \"warehouse\":\"MEDIUM_WH\" }, \"authenticationType\": \"SERVICE_ACCOUNT\", \"externalDatabases\":[ { \"name\":\"AllDatatypes\", \"isAutoCreated\":false, \"schemas\":[ { \"name\":\"alldatatypes\", \"tables\":[ { \"name\":\"allDatatypes\", \"type\":\"TABLE\", \"description\":\"\", \"selected\":true, \"linked\":true, \"columns\":[ { \"name\":\"CNUMBER\", \"type\":\"INT64\", \"canImport\":true, \"selected\":true, \"isLinkedActive\":true, \"isImported\":false, \"tableName\":\"allDatatypes\", \"schemaName\":\"alldatatypes\", \"dbName\":\"AllDatatypes\" }, { \"name\":\"CDECIMAL\", \"type\":\"INT64\", \"canImport\":true, \"selected\":true, \"isLinkedActive\":true, \"isImported\":false, \"tableName\":\"allDatatypes\", \"schemaName\":\"alldatatypes\", \"dbName\":\"AllDatatypes\" } ] } ] } ] } ] } ``` 2. Set `validate` to `true`. **NOTE:** If the `authentication_type` is anything other than SERVICE_ACCOUNT, you must explicitly provide the authenticationType property in the payload. If you do not specify authenticationType, the API will default to SERVICE_ACCOUNT as the authentication type. + * @param createConnectionRequest + */ + public createConnection(createConnectionRequest: CreateConnectionRequest, _options?: Configuration): Promise { + const result = this.api.createConnection(createConnectionRequest, _options); + return result.toPromise(); + } + + /** + * Version: 9.2.0.cl or later **Important**: This endpoint is deprecated and will be removed from ThoughtSpot in September 2025. ThoughtSpot strongly recommends using the [Delete Connection V2](#/http/api-endpoints/connections/delete-connection-v2) endpoint to delete your connection objects. #### Usage guidelines Deletes a connection object. Requires `DATAMANAGEMENT` (**Can manage data**) and edit permissions to the connection object, or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) privilege is required. **Note**: If a connection has dependent objects, make sure you remove its associations before the delete operation. + * @param deleteConnectionRequest + */ + public deleteConnection(deleteConnectionRequest: DeleteConnectionRequest, _options?: Configuration): Promise { + const result = this.api.deleteConnection(deleteConnectionRequest, _options); + return result.toPromise(); + } + + /** + * Version: 10.4.0.cl or later Deletes a connection object. **Note**: If a connection has dependent objects, make sure you remove its associations before the delete operation. Requires `DATAMANAGEMENT` (**Can manage data**) and edit permissions to the connection object, or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) privilege is required. + * @param connectionIdentifier Unique ID or name of the connection. + */ + public deleteConnectionV2(connectionIdentifier: string, _options?: Configuration): Promise { + const result = this.api.deleteConnectionV2(connectionIdentifier, _options); + return result.toPromise(); + } + + /** + * Version: 9.9.0.cl or later Exports the difference in connection metadata between CDW and ThoughtSpot Requires `DATAMANAGEMENT` (**Can manage data**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the following Data control privileges may be required: - `CAN_MANAGE_CUSTOM_CALENDAR`(**Can manage custom calendars**) - `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) - `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` (**Can manage data models**) To download the connection metadata difference between ThoughtSpot and CDW, pass the connection GUID as `connection_identifier` in the API request. + * @param connectionIdentifier GUID of the connection + */ + public downloadConnectionMetadataChanges(connectionIdentifier: string, _options?: Configuration): Promise { + const result = this.api.downloadConnectionMetadataChanges(connectionIdentifier, _options); + return result.toPromise(); + } + + /** + * Version: 9.9.0.cl or later Validates the difference in connection metadata between CDW and ThoughtSpot. Requires `DATAMANAGEMENT` (**Can manage data**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the following Data control privileges may be required: - `CAN_MANAGE_CUSTOM_CALENDAR`(**Can manage custom calendars**) - `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) - `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` (**Can manage data models**) Returns a boolean indicating whether there is any difference between the connection metadata at ThoughtSpot and CDW. To get the connection metadata difference status, pass the connection GUID as `connection_identifier` in the API request. + * @param connectionIdentifier GUID of the connection + */ + public fetchConnectionDiffStatus(connectionIdentifier: string, _options?: Configuration): Promise { + const result = this.api.fetchConnectionDiffStatus(connectionIdentifier, _options); + return result.toPromise(); + } + + /** + * Version: 26.2.0.cl or later Revokes OAuth refresh tokens for users who no longer require access to a data warehouse connection. When a token is revoked, the affected user\'s session for that connection is terminated, and they must re-authenticate to regain access. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) or `DATAMANAGEMENT` (**Can manage data**) privileges. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on the ThoughtSpot instance, users with `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) privilege can also make API requests to revoke tokens for connection users. #### Usage guidelines You can specify different combinations of identifiers to control which refresh tokens are revoked. - **connection_identifier**: Revokes refresh tokens for all users of the connection, except the connection author. - **connection_identifier** and **user_identifiers**: Revokes refresh tokens only for the users specified in the request. If the name or ID of the connection author is included in the request, their token will also be revoked. - **connection_identifier** and **configuration_identifiers**: Revokes refresh tokens for all users on the specified configurations, except the configuration author. - **connection_identifier**, **configuration_identifiers**, and **user_identifiers**: Revokes refresh tokens for the specified users on the specified configurations. - **connection_identifier** and **org_identifiers**: Revokes refresh tokens for the specified Orgs. Applicable only for published connections. - **connection_identifier**, **org_identifiers**, and **user_identifiers**: Revokes refresh tokens for the specified users in the specified Orgs. Applicable only for published connections. **NOTE**: The `org_identifiers` parameter is only applicable for published connections. Using this parameter for unpublished connections will result in an error. Ensure that the connections are published before making the API request. + * @param connectionIdentifier Unique ID or name of the connection whose refresh tokens need to be revoked. All the users associated with the connection will have their refresh tokens revoked except the author. + * @param revokeRefreshTokensRequest + */ + public revokeRefreshTokens(connectionIdentifier: string, revokeRefreshTokensRequest: RevokeRefreshTokensRequest, _options?: Configuration): Promise { + const result = this.api.revokeRefreshTokens(connectionIdentifier, revokeRefreshTokensRequest, _options); + return result.toPromise(); + } + + /** + * Version: 9.2.0.cl or later Gets connection objects. Requires `DATAMANAGEMENT` (**Can manage data**) or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) privilege is required. - To get a list of all connections available in the ThoughtSpot system, send the API request without any attributes in the request body. - To get the connection objects for a specific type of data warehouse, specify the type in `data_warehouse_types`. - To fetch details of a connection object, specify the connection object GUID or name. The `name_pattern` attribute allows passing partial text with `%` for a wildcard match. - To get details of the database, schemas, tables, or columns from a data connection object, specify `data_warehouse_object_type`. - To get a specific database, schema, table, or column from a connection object, define the object type in `data_warehouse_object_type` and object properties in the `data_warehouse_objects` array. For example, to search for a column, you must pass the database, schema, and table names in the API request. Note that in the following example, object properties are set in a hierarchical order (`database` > `schema` > `table` > `column`). ``` { \"connections\": [ { \"identifier\": \"b9d1f2ef-fa65-4a4b-994e-30fa2d57b0c2\", \"data_warehouse_objects\": [ { \"database\": \"NEBULADEV\", \"schema\": \"INFORMATION_SCHEMA\", \"table\": \"APPLICABLE_ROLES\", \"column\": \"ROLE_NAME\" } ] } ], \"data_warehouse_object_type\": \"COLUMN\" } ``` - To fetch data by `configuration`, specify `data_warehouse_object_type`. For example, to fetch columns from the `DEVELOPMENT` database, specify the `data_warehouse_object_type` as `DATABASE` and define the `configuration` string as `{\"database\":\"DEVELOPMENT\"}`. To get column data for a specific table, specify the table, for example,`{\"database\":\"RETAILAPPAREL\",\"table\":\"PIPES\"}`. - To query connections by `authentication_type`, specify `data_warehouse_object_type`. Supported values for `authentication_type` are: - `SERVICE_ACCOUNT`: For connections that require service account credentials to authenticate to the Cloud Data Warehouse and fetch data. - `OAUTH`: For connections that require OAuth credentials to authenticate to the Cloud Data Warehouse and fetch data. Teradata, Oracle, and Presto Cloud Data Warehouses do not support the OAuth authentication type. - `IAM`: For connections that have the IAM OAuth set up. This authentication type is supported on Amazon Redshift connections only. - `EXTOAUTH`: For connections that have External OAuth set up. ThoughtSpot supports external [OAuth with Microsoft Azure Active Directory (AD)](https://docs.thoughtspot.com/cloud/latest/ connections-snowflake-azure-ad-oauth) and [Okta for Snowflake data connections](https://docs.thoughtspot.com/cloud/latest/connections-snowflake-okta-oauth). - `KEY_PAIR`: For connections that require Key Pair account credentials to authenticate to the Cloud Data Warehouse and fetch data. This authentication type is supported on Snowflake connections only. - `OAUTH_WITH_PKCE`: For connections that require OAuth with PKCE account credentials to authenticate to the Cloud Data Warehouse and fetch data. This authentication type is supported on Snowflake, Starburst, Databricks, Denodo connections only. - `EXTOAUTH_WITH_PKCE`: For connections that require External OAuth With PKCE account credentials to authenticate to the Cloud Data Warehouse and fetch data. This authentication type is supported on Snowflake connections only. - `OAUTH_WITH_PEZ`: For connections that require OAuth With PEZ account credentials to authenticate to the Cloud Data Warehouse and fetch data. This authentication type is supported on Amazon Redshift connections only. - `OAUTH_WITH_SERVICE_PRINCIPAL`: For connections that require OAuth With Service Principal account credentials to authenticate to the Cloud Data Warehouse and fetch data. This authentication type is supported on Databricks connections only. - `PERSONAL_ACCESS_TOKEN`: For connections that require Personal Access Token account credentials to authenticate to the Cloud Data Warehouse and fetch data. This authentication type is supported on Databricks connections only. - `OAUTH_CLIENT_CREDENTIALS`: For connections that require OAuth Client Credentials to authenticate to the Cloud Data Warehouse and fetch data. This authentication type is supported on Snowflake connections only. - To include more details about connection objects in the API response, set `include_details` to `true`. - You can also sort the output by field names and filter connections by tags. **NOTE**: When filtering connection records by parameters other than `data_warehouse_types` or `tag_identifiers`, ensure that you set `record_size` to `-1` and `record_offset` to `0` for precise results. + * @param searchConnectionRequest + */ + public searchConnection(searchConnectionRequest: SearchConnectionRequest, _options?: Configuration): Promise> { + const result = this.api.searchConnection(searchConnectionRequest, _options); + return result.toPromise(); + } + + /** + * Version: 26.5.0.cl or later Synchronizes connection metadata attributes from your Cloud Data Warehouse (CDW) with ThoughtSpot. Requires the `DATAMANAGEMENT` (**Can manage data**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` (**Can manage data models**) privilege is required. #### Usage guidelines To synchronize attributes from a CDW, specify the connection GUID or name in the `connection_identifier` path parameter and `sync_attributes` in the request body. Default attribute is `[\"DESCRIPTION\"]`. ##### Hierarchical schema * Connection: The connection object for the sync operation. * Tables: Tables for the sync operation. When no table is specified, all tables are synchronized. * Columns: If the table is specified, you can add the columns for the sync operation. If no columns are specified, all columns in the specified table are considered for the sync operation. To set the scope for the sync operation: * Connection-level: To sync all tables and columns, pass an empty request body, or only the attributes in the request body. * Table-level: To synchronize specific tables and their columns, specify the table identifiers in the `tables` array. * Column-level: To synchronize specific columns, specify the table identifier as the key and column identifiers as the value in the `tables` array. ``` { \"tables\": [ {\"table-guid-1\": [\"column-guid-1\", \"column-guid-2\"]}, \"table-guid-2\" ], \"sync_attributes\": [\"DESCRIPTION\"] } ``` ##### API response If the sync operation is successful, the API returns the following information: * Status of the sync operation. For example, `SUCCESS`, `PARTIAL_SUCCESS`, or `NO_UPDATE`. * Number of tables and columns that were updated. * Number of tables and columns with the sync failed status when the overall sync status is `PARTIAL_SUCCESS`. * Message text indicating the sync results. + * @param connectionIdentifier Unique ID or name of the connection. + * @param syncMetadataRequest + */ + public syncMetadata(connectionIdentifier: string, syncMetadataRequest: SyncMetadataRequest, _options?: Configuration): Promise { + const result = this.api.syncMetadata(connectionIdentifier, syncMetadataRequest, _options); + return result.toPromise(); + } + + /** + * Version: 9.2.0.cl or later **Important**: This endpoint is deprecated and will be removed from ThoughtSpot in September 2025. ThoughtSpot strongly recommends using the [Update connection V2](#/http/api-endpoints/connections/update-connection-v2) endpoint to update your connection objects. #### Usage guidelines Updates a connection object. Requires `DATAMANAGEMENT` (**Can manage data**) and edit permissions to the connection object, or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) privilege is required. To update a connection object, pass these parameters in your API request: 1. GUID of the connection object. 2. If you are updating tables or database schema of a connection object: a. Add the updated JSON map of metadata with database, schema, and tables in `data_warehouse_config`. b. Set `validate` to `true`. 3. If you are updating a configuration attribute, connection name, or description, you can set `validate` to `false`. + * @param updateConnectionRequest + */ + public updateConnection(updateConnectionRequest: UpdateConnectionRequest, _options?: Configuration): Promise { + const result = this.api.updateConnection(updateConnectionRequest, _options); + return result.toPromise(); + } + + /** + * Version: 26.6.0.cl or later Activates or deactivates a connection. A deactivated connection cannot be used for queries or operations until it is activated again. Requires `DATAMANAGEMENT` (**Can manage data**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) privilege is required. Only the connection owner or an administrator can perform this operation. #### Usage guidelines To update the status of a connection, specify the connection GUID or name in the `connection_identifier` path parameter and the desired `status` in the request body. - **ACTIVATED**: Enables the connection. Queries and operations can resume on an activated connection. - **DEACTIVATED**: Disables the connection. It does not remove the connection metadata, but only makes the connection unavailable for queries and operations. You can reactivate a deactivated connection by setting \"status\": \"ACTIVATED\". + * @param connectionIdentifier Unique ID or name of the connection. + * @param updateConnectionStatusRequest + */ + public updateConnectionStatus(connectionIdentifier: string, updateConnectionStatusRequest: UpdateConnectionStatusRequest, _options?: Configuration): Promise { + const result = this.api.updateConnectionStatus(connectionIdentifier, updateConnectionStatusRequest, _options); + return result.toPromise(); + } + + /** + * Version: 10.4.0.cl or later Updates a connection object. Requires `DATAMANAGEMENT` (**Can manage data**) and edit permissions to the connection object, or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) privilege is required. To update a connection object, pass these parameters in your API request: 1. GUID of the connection object. 2. If you are updating tables or database schema of a connection object: a. Add the updated JSON map of metadata with database, schema, and tables in `data_warehouse_config`. b. Set `validate` to `true`. **NOTE:** If the `authentication_type` is anything other than SERVICE_ACCOUNT, you must explicitly provide the authenticationType property in the payload. If you do not specify authenticationType, the API will default to SERVICE_ACCOUNT as the authentication type. * A JSON map of configuration attributes, database details, and table properties in `data_warehouse_config` as shown in the following example: * This is an example of updating a single table in a empty connection: ``` { \"authenticationType\": \"SERVICE_ACCOUNT\", \"externalDatabases\": [ { \"name\": \"DEVELOPMENT\", \"isAutoCreated\": false, \"schemas\": [ { \"name\": \"TS_dataset\", \"tables\": [ { \"name\": \"DEMORENAME\", \"type\": \"TABLE\", \"description\": \"\", \"selected\": true, \"linked\": true, \"gid\": 0, \"datasetId\": \"-1\", \"subType\": \"\", \"reportId\": \"\", \"viewId\": \"\", \"columns\": [ { \"name\": \"Col1\", \"type\": \"VARCHAR\", \"canImport\": true, \"selected\": true, \"description\": \"\", \"isLinkedActive\": true, \"isAggregate\": false }, { \"name\": \"Col2\", \"type\": \"VARCHAR\", \"canImport\": true, \"selected\": true, \"description\": \"\", \"isLinkedActive\": true, \"isAggregate\": false }, { \"name\": \"Col3\", \"type\": \"VARCHAR\", \"canImport\": true, \"selected\": true, \"description\": \"\", \"isLinkedActive\": true, \"isAggregate\": false }, { \"name\": \"Col312\", \"type\": \"VARCHAR\", \"canImport\": true, \"selected\": true, \"description\": \"\", \"isLinkedActive\": true, \"isAggregate\": false }, { \"name\": \"Col4\", \"type\": \"VARCHAR\", \"canImport\": true, \"selected\": true, \"description\": \"\", \"isLinkedActive\": true, \"isAggregate\": false } ], \"relationships\": [] } ] } ] } ], \"configuration\": { \"password\": \"\", \"database\": \"DEVELOPMENT\", \"role\": \"DEV\", \"accountName\": \"thoughtspot_partner\", \"warehouse\": \"DEMO_WH\", \"user\": \"DEV_USER\" } } ``` * This is an example of updating a single table in an existing connection with tables: ``` { \"authenticationType\": \"SERVICE_ACCOUNT\", \"externalDatabases\": [ { \"name\": \"DEVELOPMENT\", \"isAutoCreated\": false, \"schemas\": [ { \"name\": \"TS_dataset\", \"tables\": [ { \"name\": \"CUSTOMER\", \"type\": \"TABLE\", \"description\": \"\", \"selected\": true, \"linked\": true, \"gid\": 0, \"datasetId\": \"-1\", \"subType\": \"\", \"reportId\": \"\", \"viewId\": \"\", \"columns\": [], \"relationships\": [] }, { \"name\": \"tpch5k_falcon_default_schema_users\", \"type\": \"TABLE\", \"description\": \"\", \"selected\": true, \"linked\": true, \"gid\": 0, \"datasetId\": \"-1\", \"subType\": \"\", \"reportId\": \"\", \"viewId\": \"\", \"columns\": [ { \"name\": \"user_id\", \"type\": \"INT64\", \"canImport\": true, \"selected\": true, \"description\": \"\", \"isLinkedActive\": true, \"isAggregate\": false }, { \"name\": \"product_id\", \"type\": \"INT64\", \"canImport\": true, \"selected\": true, \"description\": \"\", \"isLinkedActive\": true, \"isAggregate\": false }, { \"name\": \"user_cost\", \"type\": \"INT64\", \"canImport\": true, \"selected\": true, \"description\": \"\", \"isLinkedActive\": true, \"isAggregate\": false } ], \"relationships\": [] } ] } ] } ], \"configuration\": { \"password\": \"\", \"database\": \"DEVELOPMENT\", \"role\": \"DEV\", \"accountName\": \"thoughtspot_partner\", \"warehouse\": \"DEMO_WH\", \"user\": \"DEV_USER\" } } ``` 3. If you are updating a configuration attribute, connection name, or description, you can set `validate` to `false`. **NOTE:** If the `authentication_type` is anything other than SERVICE_ACCOUNT, you must explicitly provide the authenticationType property in the payload. If you do not specify authenticationType, the API will default to SERVICE_ACCOUNT as the authentication type. * A JSON map of configuration attributes in `data_warehouse_config`. The following example shows the configuration attributes for a Snowflake connection: ``` { \"configuration\":{ \"accountName\":\"thoughtspot_partner\", \"user\":\"tsadmin\", \"password\":\"TestConn123\", \"role\":\"sysadmin\", \"warehouse\":\"MEDIUM_WH\" }, \"externalDatabases\":[ ] } ``` + * @param connectionIdentifier Unique ID or name of the connection. + * @param updateConnectionV2Request + */ + public updateConnectionV2(connectionIdentifier: string, updateConnectionV2Request: UpdateConnectionV2Request, _options?: Configuration): Promise { + const result = this.api.updateConnectionV2(connectionIdentifier, updateConnectionV2Request, _options); + return result.toPromise(); + } + + +} + + + +import { ObservableCustomActionApi } from './ObservableAPI'; + +import { CustomActionApiRequestFactory, CustomActionApiResponseProcessor} from "../apis/CustomActionApi"; +export class PromiseCustomActionApi { + private api: ObservableCustomActionApi + + public constructor( + configuration: Configuration, + requestFactory?: CustomActionApiRequestFactory, + responseProcessor?: CustomActionApiResponseProcessor + ) { + this.api = new ObservableCustomActionApi(configuration, requestFactory, responseProcessor); + } + + /** + * Version: 9.6.0.cl or later Creates a custom action that appears as a menu action on a saved Answer or Liveboard visualization. Requires `DEVELOPER` (**Has Developer privilege**) or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `DEVELOPER` (**Has developer privilege**) privilege is required. #### Usage Guidelines The API lets you create the following types of custom actions: * URL-based action Allows pushing data to an external URL. * Callback action Triggers a callback to the host application and initiates a response payload on an embedded ThoughtSpot instance. By default, custom actions are visible to only administrator or developer users. To make a custom action available to other users, and specify the groups in `group_identifiers`. By default, the custom action is set as a _global_ action on all visualizations and saved Answers. To assign a custom action to specific Liveboard visualization, saved Answer, or Worksheet, set `visibility` to `false` in `default_action_config` property and specify the GUID or name of the object in `associate_metadata`. For more information, see [Custom actions](https://developers.thoughtspot.com/docs/custom-action-intro). + * @param createCustomActionRequest + */ + public createCustomAction(createCustomActionRequest: CreateCustomActionRequest, _options?: Configuration): Promise { + const result = this.api.createCustomAction(createCustomActionRequest, _options); + return result.toPromise(); + } + + /** + * Version: 9.6.0.cl or later Removes the custom action specified in the API request. Requires `DEVELOPER` (**Has Developer privilege**) or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `DEVELOPER` (**Has developer privilege**) privilege is required. + * @param customActionIdentifier Unique ID or name of the custom action. + */ + public deleteCustomAction(customActionIdentifier: string, _options?: Configuration): Promise { + const result = this.api.deleteCustomAction(customActionIdentifier, _options); + return result.toPromise(); + } + + /** + * Version: 9.6.0.cl or later Gets custom actions configured on the cluster. Requires `DEVELOPER` (**Has Developer privilege**) or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `DEVELOPER` (**Has developer privilege**) privilege is required. + * @param searchCustomActionsRequest + */ + public searchCustomActions(searchCustomActionsRequest: SearchCustomActionsRequest, _options?: Configuration): Promise> { + const result = this.api.searchCustomActions(searchCustomActionsRequest, _options); + return result.toPromise(); + } + + /** + * Version: 9.6.0.cl or later Updates a custom action. Requires `DEVELOPER` (**Has Developer privilege**) or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `DEVELOPER` (**Has developer privilege**) privilege is required. #### Usage Guidelines The API allows you to modify the following properties: * Name of the custom action * Action availability to groups * Association to metadata objects * Authentication settings for a URL-based action For more information, see [Custom actions](https://developers.thoughtspot.com/docs/custom-action-intro). + * @param customActionIdentifier Unique ID or name of the custom action. + * @param updateCustomActionRequest + */ + public updateCustomAction(customActionIdentifier: string, updateCustomActionRequest: UpdateCustomActionRequest, _options?: Configuration): Promise { + const result = this.api.updateCustomAction(customActionIdentifier, updateCustomActionRequest, _options); + return result.toPromise(); + } + + +} + + + +import { ObservableCustomCalendarsApi } from './ObservableAPI'; + +import { CustomCalendarsApiRequestFactory, CustomCalendarsApiResponseProcessor} from "../apis/CustomCalendarsApi"; +export class PromiseCustomCalendarsApi { + private api: ObservableCustomCalendarsApi + + public constructor( + configuration: Configuration, + requestFactory?: CustomCalendarsApiRequestFactory, + responseProcessor?: CustomCalendarsApiResponseProcessor + ) { + this.api = new ObservableCustomCalendarsApi(configuration, requestFactory, responseProcessor); + } + + /** + * Version: 10.12.0.cl or later Creates a new [custom calendar](https://docs.thoughtspot.com/cloud/latest/connections-cust-cal). Requires `DATAMANAGEMENT` (**Can manage data**) or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your ThoughtSpot instance, the `CAN_MANAGE_CUSTOM_CALENDAR` (**Can manage custom calendars**) privilege is required. #### Usage guidelines You can create a custom calendar from scratch or an existing Table in ThoughtSpot. For both methods of calendar creation, the following parameters are required: * Name of the custom calendar. * Calendar creation method. To create a calendar from an existing table, specify the method: - `FROM_EXISTING_TABLE` - Creates calendar from the table reference provided in the API request. - `FROM_INPUT_PARAMS` - Creates a calendar from the parameters defined in the API request. * Connection ID and Table name * Database and schema name attributes: For most Cloud Data Warehouse (CDW) connectors, both `database_name` and `schema_name` attributes are required. However, the attribute requirements are conditional and vary based on the connector type and its metadata structure. For example, for connectors such as Teradata, MySQL, SingleSore, Amazon Aurora MySQL, Amazon RDS MySQL, Oracle, and GCP_MYSQL, the `schema_name` is required, whereas the `database_name` attribute is not. Similarly, connectors such as ClickHouse require you to specify the `database_name` and the schema specification in such cases is optional. **NOTE**: If you are creating a calendar from an existing table, ensure that the referenced table matches the required DDL for custom calendars. If the schema does not match, the API returns an error. ##### Calendar type The API allows you to create the following types of calendars: * `MONTH_OFFSET`. The default calendar type. A `MONTH_OFFSET` calendar is offset by a few months from the standard calendar months (January to December) and the year begins with the month defined in the request. For example, if the `month_offset` value is set as `April`, the calendar year begins in April. * `4-4-5`. Each quarter in the calendar will include two 4-week months followed by one 5-week month. * `4-5-4`. Each quarter in the calendar will include two 4-week months with a 5-week month between. * `5-4-4`. Each quarter begins with a 5-week month, followed by two 4-week months. To start and end the calendar on a specific date, specify the dates in the `MM/DD/YYYY` format. For `MONTH_OFFSET` calendars, ensure that the `start_date` matches the month specified in the `month_offset` attribute. You can also set the starting day of the week and customize the prefixes for year and quarter labels. #### Examples To create a calendar from an existing table: ``` { \"name\": \"MyCustomCalendar1\", \"table_reference\": { \"connection_identifier\": \"4db8ea22-2ff4-4224-b05a-26674717e468\", \"table_name\": \"MyCalendarTable\", \"database_name\": \"RETAILAPPAREL\", \"schema_name\": \"PUBLIC\" }, \"creation_method\": \"FROM_EXISTING_TABLE\", } ``` To create a calendar from scratch: ``` { \"name\": \"MyCustomCalendar1\", \"table_reference\": { \"connection_identifier\": \"4db8ea22-2ff4-4224-b05a-26674717e468\", \"table_name\": \"MyCalendarTable\", \"database_name\": \"RETAILAPPAREL\", \"schema_name\": \"PUBLIC\" }, \"creation_method\": \"FROM_INPUT_PARAMS\", \"calendar_type\": \"MONTH_OFFSET\", \"month_offset\": \"April\", \"start_day_of_week\": \"Monday\", \"quarter_name_prefix\": \"Q\", \"year_name_prefix\": \"FY\", \"start_date\": \"04/01/2025\", \"end_date\": \"04/31/2025\" } ``` + * @param createCalendarRequest + */ + public createCalendar(createCalendarRequest: CreateCalendarRequest, _options?: Configuration): Promise { + const result = this.api.createCalendar(createCalendarRequest, _options); + return result.toPromise(); + } + + /** + * Version: 10.12.0.cl or later Deletes a [custom calendar](https://docs.thoughtspot.com/cloud/latest/connections-cust-cal). Requires `DATAMANAGEMENT` (**Can manage data**) or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your ThoughtSpot instance, the `CAN_MANAGE_CUSTOM_CALENDAR` (**Can manage custom calendars**) privilege is required. #### Usage guidelines To delete a custom calendar, specify the calendar ID as a path parameter in the request URL. + * @param calendarIdentifier Unique ID or name of the Calendar. + */ + public deleteCalendar(calendarIdentifier: string, _options?: Configuration): Promise { + const result = this.api.deleteCalendar(calendarIdentifier, _options); + return result.toPromise(); + } + + /** + * Version: 10.12.0.cl or later Exports a [custom calendar](https://docs.thoughtspot.com/cloud/latest/connections-cust-cal) in the CSV format. Requires `DATAMANAGEMENT` (**Can manage data**) or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your ThoughtSpot instance, the `CAN_MANAGE_CUSTOM_CALENDAR` (**Can manage custom calendars**) privilege is required. #### Usage guidelines Use this API to download a custom calendar in the CSV file format. In your API request, specify the following parameters. * Start and end date of the calendar. For \"month offset\" calendars, the start date must match the month defined in the `month_offset` attribute. You can also specify optional parameters such as the starting day of the week and prefixes for the quarter and year labels. + * @param generateCSVRequest + */ + public generateCSV(generateCSVRequest: GenerateCSVRequest, _options?: Configuration): Promise { + const result = this.api.generateCSV(generateCSVRequest, _options); + return result.toPromise(); + } + + /** + * Version: 10.12.0.cl or later Gets a list of [custom calendars](https://docs.thoughtspot.com/cloud/latest/connections-cust-cal). Requires `DATAMANAGEMENT` (**Can manage data**) or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your ThoughtSpot instance, the `CAN_MANAGE_CUSTOM_CALENDAR` (**Can manage custom calendars**) privilege is required. #### Usage guidelines By default, the API returns a list of custom calendars for all connection objects. To retrieve custom calendar details for a particular connection, specify the connection ID. You can also use other search parameters such as `name_pattern` and `sort_options` as search filters. The `name_pattern` parameter filters and returns only those objects that match the specified pattern. Use `%` as a wildcard for pattern matching. + * @param searchCalendarsRequest + */ + public searchCalendars(searchCalendarsRequest: SearchCalendarsRequest, _options?: Configuration): Promise> { + const result = this.api.searchCalendars(searchCalendarsRequest, _options); + return result.toPromise(); + } + + /** + * Version: 10.12.0.cl or later Updates the properties of a [custom calendar](https://docs.thoughtspot.com/cloud/latest/connections-cust-cal). Requires `DATAMANAGEMENT` (**Can manage data**) or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your ThoughtSpot instance, the `CAN_MANAGE_CUSTOM_CALENDAR` (**Can manage custom calendars**) privilege is required. #### Usage guidelines You can update the properties of a calendar using one of the following methods: * `FROM_INPUT_PARAMS` to update the calendar properties with the values defined in the API request. * `FROM_EXISTING_TABLE` Creates a calendar from the parameters defined in the API request. To update a custom calendar, specify the calendar ID as a path parameter in the request URL and the following parameters in the request body: * Connection ID and Table name * Database and schema name attributes: For most Cloud Data Warehouse (CDW) connectors, both `database_name` and `schema_name` attributes are required. However, the attribute requirements are conditional and vary based on the connector type and its metadata structure. For example, for connectors such as Teradata, MySQL, SingleSore, Amazon Aurora MySQL, Amazon RDS MySQL, Oracle, and GCP_MYSQL, the `schema_name` is required, whereas the `database_name` attribute is not. Similarly, connectors such as ClickHouse require you to specify the `database_name` and the schema specification in such cases is optional. The API allows you to modify the calendar type, month offset value, start and end date, starting day of the week, and prefixes assigned to the year and quarter labels. #### Examples Update a custom calendar using an existing Table in ThoughtSpot: ``` { \"update_method\": \"FROM_EXISTING_TABLE\", \"table_reference\": { \"connection_identifier\": \"Connection1\", \"database_name\": \"db1\", \"table_name\": \"custom_calendar_2025\", \"schame_name\": \"schemaVar\" } } ``` Update a custom calendar with the attributes defined in the API request: ``` { \"update_method\": \"FROM_INPUT_PARAMS\", \"table_reference\": { \"connection_identifier\": \"Connection1\", \"database_name\": \"db1\", \"table_name\": \"custom_calendar_2025\", \"schame_name\": \"schemaVar\" }, \"month_offset\": \"August\", \"start_day_of_week\": \"Monday\", \"start_date\": \"08/01/2025\", \"end_date\": \"07/31/2026\" } ``` + * @param calendarIdentifier Unique Id or name of the calendar. + * @param updateCalendarRequest + */ + public updateCalendar(calendarIdentifier: string, updateCalendarRequest: UpdateCalendarRequest, _options?: Configuration): Promise { + const result = this.api.updateCalendar(calendarIdentifier, updateCalendarRequest, _options); + return result.toPromise(); + } + + +} + + + +import { ObservableDBTApi } from './ObservableAPI'; + +import { DBTApiRequestFactory, DBTApiResponseProcessor} from "../apis/DBTApi"; +export class PromiseDBTApi { + private api: ObservableDBTApi + + public constructor( + configuration: Configuration, + requestFactory?: DBTApiRequestFactory, + responseProcessor?: DBTApiResponseProcessor + ) { + this.api = new ObservableDBTApi(configuration, requestFactory, responseProcessor); + } + + /** + * Version: 9.9.0.cl or later Creates a DBT connection object in ThoughtSpot. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege or `DATAMANAGEMENT` (**Can manage data**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the following Data control privileges may be required: - `CAN_MANAGE_CUSTOM_CALENDAR`(**Can manage custom calendars**) - `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) - `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` (**Can manage data models**) #### About create DBT connection DBT connection in ThoughtSpot is used by the user to define DBT credentials for cloud . The API needs embrace connection, embrace database name, DBT url, import type, DBT account identifier, DBT project identifier, DBT access token and environment details (or) embrace connection, embrace database name, import type, file_content to create a connection object. To know more about DBT, see ThoughtSpot Product Documentation. + * @param connectionName Name of the connection. + * @param databaseName Name of the Database. + * @param importType Mention type of Import + * @param accessToken Access token is mandatory when Import_Type is DBT_CLOUD. + * @param dbtUrl DBT URL is mandatory when Import_Type is DBT_CLOUD. + * @param accountId Account ID is mandatory when Import_Type is DBT_CLOUD + * @param projectId Project ID is mandatory when Import_Type is DBT_CLOUD + * @param dbtEnvId DBT Environment ID\\\" + * @param projectName Name of the project + * @param fileContent Upload DBT Manifest and Catalog artifact files as a ZIP file. This field is Mandatory when Import Type is \\\'ZIP_FILE\\\' + */ + public dbtConnection(connectionName: string, databaseName: string, importType?: string, accessToken?: string, dbtUrl?: string, accountId?: string, projectId?: string, dbtEnvId?: string, projectName?: string, fileContent?: HttpFile, _options?: Configuration): Promise { + const result = this.api.dbtConnection(connectionName, databaseName, importType, accessToken, dbtUrl, accountId, projectId, dbtEnvId, projectName, fileContent, _options); + return result.toPromise(); + } + + /** + * Version: 9.9.0.cl or later Resynchronize the existing list of models, tables, worksheet tml’s and import them to Thoughtspot based on the DBT connection object. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege or `DATAMANAGEMENT` (**Can manage data**) privilege, along with an existing DBT connection. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the following data control privileges may be required: - `CAN_MANAGE_CUSTOM_CALENDAR`(**Can manage custom calendars**) - `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) - `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` (**Can manage data models**) + * @param dbtConnectionIdentifier Unique ID of the DBT connection. + * @param fileContent Upload DBT Manifest and Catalog artifact files as a ZIP file. This field is mandatory if the connection was created with import_type ‘ZIP_FILE’ + */ + public dbtGenerateSyncTml(dbtConnectionIdentifier: string, fileContent?: HttpFile, _options?: Configuration): Promise { + const result = this.api.dbtGenerateSyncTml(dbtConnectionIdentifier, fileContent, _options); + return result.toPromise(); + } + + /** + * Version: 9.9.0.cl or later Generate required table and worksheet and import them. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege or `DATAMANAGEMENT` (**Can manage data**) privilege, along with an existing DBT connection. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the following data control privileges may be required: - `CAN_MANAGE_CUSTOM_CALENDAR`(**Can manage custom calendars**) - `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) - `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` (**Can manage data models**) #### About generate TML Models and Worksheets to be imported can be selected by the user as part of the API. + * @param dbtConnectionIdentifier Unique ID of the DBT connection. + * @param modelTables List of Models and their respective Tables Example: \\\'[{\\\"model_name\\\": \\\"model_name\\\", \\\"tables\\\": [\\\"table_name\\\"]}]\\\' + * @param importWorksheets Mention the worksheet tmls to import + * @param worksheets List of worksheets is mandatory when import_Worksheets is type SELECTED Example: [\\\"worksheet_name\\\"] + * @param fileContent Upload DBT Manifest and Catalog artifact files as a ZIP file. This field is mandatory if the connection was created with import_type ‘ZIP_FILE’ + */ + public dbtGenerateTml(dbtConnectionIdentifier: string, modelTables: string, importWorksheets: string, worksheets?: string, fileContent?: HttpFile, _options?: Configuration): Promise { + const result = this.api.dbtGenerateTml(dbtConnectionIdentifier, modelTables, importWorksheets, worksheets, fileContent, _options); + return result.toPromise(); + } + + /** + * Version: 9.9.0.cl or later Gets a list of DBT connection objects by user and organization, available on the ThoughtSpot system. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege or `DATAMANAGEMENT` (**Can manage data**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the following Data control privileges may be required: - `CAN_MANAGE_CUSTOM_CALENDAR`(**Can manage custom calendars**) - `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) - `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` (**Can manage data models**) #### About search DBT connection To get details of a specific DBT connection identifier, database connection identifier, database connection name, database name, project name, project identifier, environment identifier , import type and author. + */ + public dbtSearch(_options?: Configuration): Promise> { + const result = this.api.dbtSearch(_options); + return result.toPromise(); + } + + /** + * Version: 9.9.0.cl or later Removes the specified DBT connection object from the ThoughtSpot system. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) or `DATAMANAGEMENT` (**Can manage data ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the following Data control privileges may be required: - `CAN_MANAGE_CUSTOM_CALENDAR`(**Can manage custom calendars**) - `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) - `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` (**Can manage data models**) + * @param dbtConnectionIdentifier Unique ID of the DBT Connection. + */ + public deleteDbtConnection(dbtConnectionIdentifier: string, _options?: Configuration): Promise { + const result = this.api.deleteDbtConnection(dbtConnectionIdentifier, _options); + return result.toPromise(); + } + + /** + * Version: 9.9.0.cl or later Updates a DBT connection object. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege or `DATAMANAGEMENT` (**Can manage data ThoughtSpot**) privilege, along with an existing DBT connection. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the following data control privileges may be required: - `CAN_MANAGE_CUSTOM_CALENDAR`(**Can manage custom calendars**) - `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) - `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` (**Can manage data models**) #### About update DBT connection You can modify DBT connection object properties such as embrace connection name, embrace database name, import type, account identifier, access token, project identifier and environment (or) embrace connection, embrace database name, import type, file_content settings. + * @param dbtConnectionIdentifier Unique ID of the DBT Connection. + * @param connectionName Name of the connection. + * @param databaseName Name of the Database. + * @param importType Mention type of Import + * @param accessToken Access token is mandatory when Import_Type is DBT_CLOUD. + * @param dbtUrl DBT URL is mandatory when Import_Type is DBT_CLOUD. + * @param accountId Account ID is mandatory when Import_Type is DBT_CLOUD + * @param projectId Project ID is mandatory when Import_Type is DBT_CLOUD + * @param dbtEnvId DBT Environment ID\\\" + * @param projectName Name of the project + * @param fileContent Upload DBT Manifest and Catalog artifact files as a ZIP file. This field is Mandatory when Import Type is \\\'ZIP_FILE\\\' + */ + public updateDbtConnection(dbtConnectionIdentifier: string, connectionName?: string, databaseName?: string, importType?: string, accessToken?: string, dbtUrl?: string, accountId?: string, projectId?: string, dbtEnvId?: string, projectName?: string, fileContent?: HttpFile, _options?: Configuration): Promise { + const result = this.api.updateDbtConnection(dbtConnectionIdentifier, connectionName, databaseName, importType, accessToken, dbtUrl, accountId, projectId, dbtEnvId, projectName, fileContent, _options); + return result.toPromise(); + } + + +} + + + +import { ObservableDataApi } from './ObservableAPI'; + +import { DataApiRequestFactory, DataApiResponseProcessor} from "../apis/DataApi"; +export class PromiseDataApi { + private api: ObservableDataApi + + public constructor( + configuration: Configuration, + requestFactory?: DataApiRequestFactory, + responseProcessor?: DataApiResponseProcessor + ) { + this.api = new ObservableDataApi(configuration, requestFactory, responseProcessor); + } + + /** + * Version: 9.0.0.cl or later Fetches data from a saved Answer. Requires at least view access to the saved Answer. The `record_size` attribute determines the number of records to retrieve in an API call. For more information about pagination, record size, and maximum row limit, see [Pagination and record size settings](https://developers.thoughtspot.com/docs/fetch-data-and-report-apis#_pagination_settings_for_data_and_report_apis). + * @param fetchAnswerDataRequest + */ + public fetchAnswerData(fetchAnswerDataRequest: FetchAnswerDataRequest, _options?: Configuration): Promise { + const result = this.api.fetchAnswerData(fetchAnswerDataRequest, _options); + return result.toPromise(); + } + + /** + * Version: 9.0.0.cl or later Gets data from a Liveboard object and its visualization. Requires at least view access to the Liveboard. #### Usage guidelines In the request body, specify the GUID or name of the Liveboard. To get data for specific visualizations, add the GUIDs or names of the visualizations in the API request. To include unsaved changes in the report, pass the `transient_pinboard_content` script generated from the `getExportRequestForCurrentPinboard` method in the Visual Embed SDK. Upon successful execution, the API returns the report with unsaved changes. If the new Liveboard experience mode, the transient content includes ad hoc changes to visualizations such as sorting, toggling of legends, and data drill down. For more information, and see [Liveboard data API](https://developers.thoughtspot.com/docs/fetch-data-and-report-apis#_fetch_liveboard_data_api). + * @param fetchLiveboardDataRequest + */ + public fetchLiveboardData(fetchLiveboardDataRequest: FetchLiveboardDataRequest, _options?: Configuration): Promise { + const result = this.api.fetchLiveboardData(fetchLiveboardDataRequest, _options); + return result.toPromise(); + } + + /** + * Version: 9.0.0.cl or later Generates an Answer from a given data source. Requires at least view access to the data source object (Worksheet or View). #### Usage guidelines To search data, specify the data source GUID in `logical_table_identifier`. The data source can be a Worksheet, View, Table, or SQL view. Pass search tokens in the `query_string` attribute in the API request as shown in the following example: ``` { \"query_string\": \"[sales] by [store]\", \"logical_table_identifier\": \"cd252e5c-b552-49a8-821d-3eadaa049cca\", } ``` For more information about the `query_string` format and data source attribute, see [Search data API](https://developers.thoughtspot.com/docs/fetch-data-and-report-apis#_search_data_api). The `record_size` attribute determines the number of records to retrieve in an API call. For more information about pagination, record size, and maximum row limit, see [Pagination and record size settings](https://developers.thoughtspot.com/docs/fetch-data-and-report-apis#_pagination_settings_for_data_and_report_api). + * @param searchDataRequest + */ + public searchData(searchDataRequest: SearchDataRequest, _options?: Configuration): Promise { + const result = this.api.searchData(searchDataRequest, _options); + return result.toPromise(); + } + + +} + + + +import { ObservableEmailCustomizationApi } from './ObservableAPI'; + +import { EmailCustomizationApiRequestFactory, EmailCustomizationApiResponseProcessor} from "../apis/EmailCustomizationApi"; +export class PromiseEmailCustomizationApi { + private api: ObservableEmailCustomizationApi + + public constructor( + configuration: Configuration, + requestFactory?: EmailCustomizationApiRequestFactory, + responseProcessor?: EmailCustomizationApiResponseProcessor + ) { + this.api = new ObservableEmailCustomizationApi(configuration, requestFactory, responseProcessor); + } + + /** + * Version: 10.10.0.cl or later Creates a customization configuration for the notification email. #### Pre-requisites Requires `DEVELOPER` (**has developer privilege**) or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `DEVELOPER` (**Has developer privilege**) privilege is required. **NOTE**:This endpoint in currently in beta. Contact ThoughtSpot support to enable this on your instance. #### Usage guidelines To create a custom configuration pass these parameters in your API request: - A JSON map of configuration attributes `template_properties`. The following example shows a sample set of customization configuration: ``` { { \"cta_button_bg_color\": \"#444DEA\", \"cta_text_font_color\": \"#FFFFFF\", \"primary_bg_color\": \"#D3DEF0\", \"logo_url\": \"https://storage.pardot.com/710713/1642089901EbkRibJq/TS_fullworkmark_darkmode.png\", \"font_family\": \"\", \"product_name\": \"ThoughtSpot\", \"footer_address\": \"444 Castro St, Suite 1000 Mountain View, CA 94041\", \"footer_phone\": \"(800) 508-7008\", \"replacement_value_for_liveboard\": \"Dashboard\", \"replacement_value_for_answer\": \"Chart\", \"replacement_value_for_spot_iq\": \"AI Insights\", \"hide_footer_phone\": false, \"hide_footer_address\": false, \"hide_product_name\": false, \"hide_manage_notification\": false, \"hide_mobile_app_nudge\": false, \"hide_privacy_policy\": false, \"hide_ts_vocabulary_definitions\": false, \"hide_error_message\": false, \"hide_unsubscribe_link\": false, \"hide_notification_status\": false, \"hide_modify_alert\": false, \"company_website_url\": \"https://your-website.com/\", \"company_privacy_policy_url\" : \"https://link-to-privacy-policy.com/\", \"contact_support_url\": \"https://link-to-contact-support.com/\", \"hide_contact_support_url\": false, \"hide_logo_url\" : false } } ``` + * @param createEmailCustomizationRequest + */ + public createEmailCustomization(createEmailCustomizationRequest: CreateEmailCustomizationRequest, _options?: Configuration): Promise { + const result = this.api.createEmailCustomization(createEmailCustomizationRequest, _options); + return result.toPromise(); + } + + /** + * Version: 10.10.0.cl or later Deletes the configuration for the email customization. #### Pre-requisites Requires `DEVELOPER` (**has developer privilege**) or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `DEVELOPER` (**Has developer privilege**) privilege is required. **NOTE**:This endpoint in currently in beta. Contact ThoughtSpot support to enable this on your instance. #### Usage guidelines - Call the search API endpoint to get the `template_identifier` from the response. - Use that `template_identifier` as a parameter in this API request. + * @param templateIdentifier Unique ID or name of the email customization. + */ + public deleteEmailCustomization(templateIdentifier: string, _options?: Configuration): Promise { + const result = this.api.deleteEmailCustomization(templateIdentifier, _options); + return result.toPromise(); + } + + /** + * Version: 10.12.0.cl or later Deletes the configuration for the email customization. #### Pre-requisites Requires `DEVELOPER` (**has developer privilege**) or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `DEVELOPER` (**Has developer privilege**) privilege is required. **NOTE**:This endpoint in currently in beta. Contact ThoughtSpot support to enable this on your instance. #### Usage guidelines - Call the search API endpoint to get the `org_identifier` from the response. - Use that `org_identifier` as a parameter in this API request. + * @param deleteOrgEmailCustomizationRequest + */ + public deleteOrgEmailCustomization(deleteOrgEmailCustomizationRequest: DeleteOrgEmailCustomizationRequest, _options?: Configuration): Promise { + const result = this.api.deleteOrgEmailCustomization(deleteOrgEmailCustomizationRequest, _options); + return result.toPromise(); + } + + /** + * Version: 10.10.0.cl or later Search the email customization configuration if any set for the ThoughtSpot system. #### Pre-requisites Requires `DEVELOPER` (**has developer privilege**) or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `DEVELOPER` (**Has developer privilege**) privilege is required. **NOTE**:This endpoint in currently in beta. Contact ThoughtSpot support to enable this on your instance. + * @param searchEmailCustomizationRequest + */ + public searchEmailCustomization(searchEmailCustomizationRequest: SearchEmailCustomizationRequest, _options?: Configuration): Promise> { + const result = this.api.searchEmailCustomization(searchEmailCustomizationRequest, _options); + return result.toPromise(); + } + + /** + * Version: 10.12.0.cl or later Updates a customization configuration for the notification email. #### Pre-requisites Requires `DEVELOPER` (**has developer privilege**) or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `DEVELOPER` (**Has developer privilege**) privilege is required. **NOTE**:This endpoint in currently in beta. Contact ThoughtSpot support to enable this on your instance. #### Usage guidelines To update a custom configuration pass these parameters in your API request: - A JSON map of configuration attributes `template_properties`. The following example shows a sample set of customization configuration: ``` { { \"cta_button_bg_color\": \"#444DEA\", \"cta_text_font_color\": \"#FFFFFF\", \"primary_bg_color\": \"#D3DEF0\", \"logo_url\": \"https://storage.pardot.com/710713/1642089901EbkRibJq/TS_fullworkmark_darkmode.png\", \"font_family\": \"\", \"product_name\": \"ThoughtSpot\", \"footer_address\": \"444 Castro St, Suite 1000 Mountain View, CA 94041\", \"footer_phone\": \"(800) 508-7008\", \"replacement_value_for_liveboard\": \"Dashboard\", \"replacement_value_for_answer\": \"Chart\", \"replacement_value_for_spot_iq\": \"AI Insights\", \"hide_footer_phone\": false, \"hide_footer_address\": false, \"hide_product_name\": false, \"hide_manage_notification\": false, \"hide_mobile_app_nudge\": false, \"hide_privacy_policy\": false, \"hide_ts_vocabulary_definitions\": false, \"hide_error_message\": false, \"hide_unsubscribe_link\": false, \"hide_notification_status\": false, \"hide_modify_alert\": false, \"company_website_url\": \"https://your-website.com/\", \"company_privacy_policy_url\" : \"https://link-to-privacy-policy.com/\", \"contact_support_url\": \"https://link-to-contact-support.com/\", \"hide_contact_support_url\": false, \"hide_logo_url\" : false } } ``` + * @param updateEmailCustomizationRequest + */ + public updateEmailCustomization(updateEmailCustomizationRequest: UpdateEmailCustomizationRequest, _options?: Configuration): Promise { + const result = this.api.updateEmailCustomization(updateEmailCustomizationRequest, _options); + return result.toPromise(); + } + + /** + * Version: 10.10.0.cl or later Validates the email customization configuration if any set for the ThoughtSpot system. #### Pre-requisites Requires `DEVELOPER` (**has developer privilege**) or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `DEVELOPER` (**Has developer privilege**) privilege is required. **NOTE**:This endpoint in currently in beta. Contact ThoughtSpot support to enable this on your instance. + */ + public validateEmailCustomization(_options?: Configuration): Promise { + const result = this.api.validateEmailCustomization(_options); + return result.toPromise(); + } + + +} + + + +import { ObservableGroupsApi } from './ObservableAPI'; + +import { GroupsApiRequestFactory, GroupsApiResponseProcessor} from "../apis/GroupsApi"; +export class PromiseGroupsApi { + private api: ObservableGroupsApi + + public constructor( + configuration: Configuration, + requestFactory?: GroupsApiRequestFactory, + responseProcessor?: GroupsApiResponseProcessor + ) { + this.api = new ObservableGroupsApi(configuration, requestFactory, responseProcessor); + } + + /** + * Version: 9.0.0.cl or later Creates a group object in ThoughtSpot. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `GROUP_ADMINISTRATION` (**Can manage groups**) privilege is required. #### About groups Groups in ThoughtSpot are used by the administrators to define privileges and organize users based on their roles and access requirements. To know more about groups and privileges, see [ThoughtSpot Product Documentation](https://docs.thoughtspot.com/cloud/latest/groups-privileges). #### Supported operations The API endpoint lets you perform the following operations: * Assign privileges * Add users * Define sharing visibility * Add sub-groups * Assign a default Liveboard + * @param createUserGroupRequest + */ + public createUserGroup(createUserGroupRequest: CreateUserGroupRequest, _options?: Configuration): Promise { + const result = this.api.createUserGroup(createUserGroupRequest, _options); + return result.toPromise(); + } + + /** + * Version: 9.0.0.cl or later Removes the specified group object from the ThoughtSpot system. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `GROUP_ADMINISTRATION` (**Can manage groups**) privilege is required. + * @param groupIdentifier GUID or name of the group. + */ + public deleteUserGroup(groupIdentifier: string, _options?: Configuration): Promise { + const result = this.api.deleteUserGroup(groupIdentifier, _options); + return result.toPromise(); + } + + /** + * Version: 9.0.0.cl or later Imports group objects from external databases into ThoughtSpot. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `GROUP_ADMINISTRATION` (**Can manage groups**) privilege is required. During the import operation: * If the specified group is not available in ThoughtSpot, it will be added to ThoughtSpot. * If `delete_unspecified_groups` is set to `true`, the groups not specified in the API request, excluding administrator and system user groups, are deleted. * If the specified groups are already available in ThoughtSpot, the object properties of these groups are modified and synchronized as per the input data in the API request. A successful API call returns the object that represents the changes made in the ThoughtSpot system. + * @param importUserGroupsRequest + */ + public importUserGroups(importUserGroupsRequest: ImportUserGroupsRequest, _options?: Configuration): Promise { + const result = this.api.importUserGroups(importUserGroupsRequest, _options); + return result.toPromise(); + } + + /** + * Version: 9.0.0.cl or later Gets a list of user group objects from the ThoughtSpot system. To get details of a specific user group, specify the user group GUID or name. You can also filter the API response based on User ID, Org ID, Role ID, type of group, sharing visibility, privileges assigned to the group, and the Liveboard IDs assigned to the users in the group. Available to all users. Users with `ADMINISTRATION` (**Can administer ThoughtSpot**) privileges can view all users properties. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `GROUP_ADMINISTRATION` (**Can manage groups**) privilege is required. **NOTE**: If you do not get precise results, try setting `record_size` to `-1` and `record_offset` to `0`. + * @param searchUserGroupsRequest + */ + public searchUserGroups(searchUserGroupsRequest: SearchUserGroupsRequest, _options?: Configuration): Promise> { + const result = this.api.searchUserGroups(searchUserGroupsRequest, _options); + return result.toPromise(); + } + + /** + * Version: 9.0.0.cl or later Updates the properties of a group object in ThoughtSpot. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `GROUP_ADMINISTRATION` (**Can manage groups**) privilege is required. #### Supported operations This API endpoint lets you perform the following operations in a single API request: * Edit [privileges](https://developers.thoughtspot.com/docs/?pageid=api-user-management#group-privileges) * Add or remove users * Change sharing visibility settings * Add or remove sub-groups * Assign a default Liveboard or update the existing settings + * @param groupIdentifier GUID or name of the group. + * @param updateUserGroupRequest + */ + public updateUserGroup(groupIdentifier: string, updateUserGroupRequest: UpdateUserGroupRequest, _options?: Configuration): Promise { + const result = this.api.updateUserGroup(groupIdentifier, updateUserGroupRequest, _options); + return result.toPromise(); + } + + +} + + + +import { ObservableJobsApi } from './ObservableAPI'; + +import { JobsApiRequestFactory, JobsApiResponseProcessor} from "../apis/JobsApi"; +export class PromiseJobsApi { + private api: ObservableJobsApi + + public constructor( + configuration: Configuration, + requestFactory?: JobsApiRequestFactory, + responseProcessor?: JobsApiResponseProcessor + ) { + this.api = new ObservableJobsApi(configuration, requestFactory, responseProcessor); + } + + /** + * Version: 26.4.0.cl or later Searches delivery history for communication channels such as webhooks. Returns channel-level delivery status for each job execution record. Use this to monitor channel health and delivery success rates across events. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) or `DEVELOPER` (**Has developer privilege**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, users with `CAN_MANAGE_WEBHOOKS` (**Can manage webhooks**) privilege are also authorized to perform this action. **NOTE**: When `channel_type` is `WEBHOOK`, the following constraints apply: - `job_ids`, `channel_identifiers`, and `events` each accept at most one element. - When `job_ids` is provided, it is used as the sole lookup key and other filter fields are ignored. - When `job_ids` is not provided, `channel_identifiers` and `events` are both required, each containing exactly one element. - Records older than the configured retention period are not returned. - Use `start_epoch_time_in_millis` and/or `end_epoch_time_in_millis` to narrow results to a specific time window. + * @param searchChannelHistoryRequest + */ + public searchChannelHistory(searchChannelHistoryRequest: SearchChannelHistoryRequest, _options?: Configuration): Promise { + const result = this.api.searchChannelHistory(searchChannelHistoryRequest, _options); + return result.toPromise(); + } + + +} + + + +import { ObservableLogApi } from './ObservableAPI'; + +import { LogApiRequestFactory, LogApiResponseProcessor} from "../apis/LogApi"; +export class PromiseLogApi { + private api: ObservableLogApi + + public constructor( + configuration: Configuration, + requestFactory?: LogApiRequestFactory, + responseProcessor?: LogApiResponseProcessor + ) { + this.api = new ObservableLogApi(configuration, requestFactory, responseProcessor); + } + + /** + * Version: 9.0.0.cl or later Fetches security audit logs. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the [Admin Control](https://developers.thoughtspot.com/docs/rbac#_admin_control) privileges are required. #### Usage guidelines By default, the API retrieves logs for the last 24 hours. You can set a custom duration in EPOCH time. Make sure the log duration specified in your API request doesn’t exceed 24 hours. If you must fetch logs for a longer time range, modify the duration and make multiple sequential API requests. Upon successful execution, the API returns logs with the following information: * timestamp of the event * event ID * event type * name and GUID of the user * IP address of ThoughtSpot instance For more information see [Audit logs Documentation](https://developers.thoughtspot.com/docs/audit-logs). + * @param fetchLogsRequest + */ + public fetchLogs(fetchLogsRequest: FetchLogsRequest, _options?: Configuration): Promise> { + const result = this.api.fetchLogs(fetchLogsRequest, _options); + return result.toPromise(); + } + + +} + + + +import { ObservableMetadataApi } from './ObservableAPI'; + +import { MetadataApiRequestFactory, MetadataApiResponseProcessor} from "../apis/MetadataApi"; +export class PromiseMetadataApi { + private api: ObservableMetadataApi + + public constructor( + configuration: Configuration, + requestFactory?: MetadataApiRequestFactory, + responseProcessor?: MetadataApiResponseProcessor + ) { + this.api = new ObservableMetadataApi(configuration, requestFactory, responseProcessor); + } + + /** + * Convert worksheets to models Version: 10.6.0.cl or later ## Prerequisites - **Privileges Required:** - `DATAMANAGEMENT` (Can manage data) or `ADMINISTRATION` (Can administer ThoughtSpot). - **Additional Privileges (if RBAC is enabled):** - `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` (Can manage data models). --- ## Usage Guidelines ### Parameters 1. **worksheet_ids** - **Description:** A comma-separated list of GUIDs (Globally Unique Identifiers) specifying the Worksheets to be converted. - **Usage:** - Used only when `convert_all` is set to `false`. - Leave empty or omit when `convert_all` is set to `true`. 2. **exclude_worksheet_ids** - **Description:** A comma-separated list of GUIDs specifying Worksheets to be excluded from conversion. - **Usage:** - Useful when `convert_all` is set to `true` and specific Worksheets should not be converted. 3. **convert_all** - **Description:** Sets the scope of conversion. - **Options:** - `true`: Converts all Worksheets in the system, except those specified in `exclude_worksheet_ids`. - `false`: Converts only the Worksheets listed in `worksheet_ids`. 4. **apply_changes** - **Description:** Specifies whether to apply changes directly to ThoughtSpot or to generate a preview before applying any changes.Used for validation of conversion. - **Options:** - `true`: Applies conversion changes directly to ThoughtSpot. - `false`: Generates only a preview of the changes and does not apply any changes to ThoughtSpot --- ## Best Practices 1. **Backup Before Conversion:** Always export metadata as a backup before initiating the conversion process 2. **Partial Conversion for Testing:** Test the conversion process by setting `convert_all` to `false` and specifying a small number of `worksheet_ids`. 3. **Verify Dependencies:** Check for dependent objects, such as Tables and Connections, to avoid invalid references. 4. **Review Changes:** Use `apply_changes: false` to preview the impact of the conversion before applying changes. --- ## Examples ### Convert Specific Worksheets ```json { \"worksheet_ids\": [\"guid1\", \"guid2\", \"guid3\"], \"exclude_worksheet_ids\": [], \"convert_all\": false, \"apply_changes\": true } ``` ### Convert All Accessible Worksheets ```json { \"worksheet_ids\": [], \"exclude_worksheet_ids\": [], \"convert_all\": true, \"apply_changes\": true } ``` ### Exclude Specific Worksheets While Converting All Accessible Worksheets ```json { \"worksheet_ids\": [], \"exclude_worksheet_ids\": [\"abc\"], \"convert_all\": true, \"apply_changes\": true } ``` + * @param convertWorksheetToModelRequest + */ + public convertWorksheetToModel(convertWorksheetToModelRequest: ConvertWorksheetToModelRequest, _options?: Configuration): Promise { + const result = this.api.convertWorksheetToModel(convertWorksheetToModelRequest, _options); + return result.toPromise(); + } + + /** + * Makes a copy of an Answer or Liveboard Version: 10.3.0.cl or later Creates a copy of a metadata object. Requires at least view access to the metadata object being copied. Upon successful execution, the API creates a copy of the metadata object specified in the API request and returns the ID of the new object. + * @param copyObjectRequest + */ + public copyObject(copyObjectRequest: CopyObjectRequest, _options?: Configuration): Promise { + const result = this.api.copyObject(copyObjectRequest, _options); + return result.toPromise(); + } + + /** + * Version: 9.0.0.cl or later Removes the specified metadata object from the ThoughtSpot system. Requires edit access to the metadata object. + * @param deleteMetadataRequest + */ + public deleteMetadata(deleteMetadataRequest: DeleteMetadataRequest, _options?: Configuration): Promise { + const result = this.api.deleteMetadata(deleteMetadataRequest, _options); + return result.toPromise(); + } + + /** + * Version: 9.0.0.cl or later Exports the [TML](https://docs.thoughtspot.com/cloud/latest/tml) representation of metadata objects in JSON or YAML format. Requires `DATADOWNLOADING` (**Can download Data**) and at least view access to the metadata object. #### Usage guidelines * You can export one or several objects by passing metadata object GUIDs in the `metadata` array. * When exporting TML content for a Liveboard or Answer object, you can set `export_associated` to `true` to retrieve TML content for underlying Worksheets, Tables, or Views, including the GUID of each object within the headers. When `export_associated` is set to `true`, consider retrieving one metadata object at a time. * Set `export_fqns` to `true` to add FQNs of the referenced objects in the TML content. For example, if you send an API request to retrieve TML for a Liveboard and its associated objects, the API returns the TML content with FQNs of the referenced Worksheet. Exporting TML with FQNs is useful if ThoughtSpot has multiple objects with the same name and you want to eliminate ambiguity when importing TML files into ThoughtSpot. It eliminates the need for adding FQNs of the referenced objects manually during the import operation. * To export only the TML of feedbacks associated with an object, set the GUID of the object as `identifier`, and set the `type` as `FEEDBACK` in the `metadata` array. * To export the TML of an object along with the feedbacks associated with it, set the GUID of the object as `identifier`, set the `type` as `LOGIAL_TABLE` in the `metadata` array, and set `export_with_associated_feedbacks` in `export_options` to true. For more information, see [TML Documentation](https://developers.thoughtspot.com/docs/tml#_export_a_tml). For more information on feedbacks, see [Feedback Documentation](https://docs.thoughtspot.com/cloud/latest/sage-feedback). + * @param exportMetadataTMLRequest + */ + public exportMetadataTML(exportMetadataTMLRequest: ExportMetadataTMLRequest, _options?: Configuration): Promise> { + const result = this.api.exportMetadataTML(exportMetadataTMLRequest, _options); + return result.toPromise(); + } + + /** + * Version: 10.1.0.cl or later Exports the [TML](https://docs.thoughtspot.com/cloud/latest/tml) representation of metadata objects in JSON or YAML format. ### **Permissions Required** Requires `DATAMANAGEMENT` (**Can manage data**) and `USERMANAGEMENT` (**Can manage users**) privileges. #### **Usage Guidelines** This API is only applicable for `USER`, `GROUP`, and `ROLES` metadata types. - `batch_offset` Indicates the starting position within the complete dataset from which the API should begin returning objects. Useful for paginating results efficiently. - `batch_size` Specifies the number of objects or items to retrieve in a single request. Helps control response size for better performance. - `edoc_format` Defines the format of the TML content. The exported metadata can be in JSON or YAML format. - `export_dependent` Specifies whether to include dependent metadata objects in the export. Ensures related objects are also retrieved if needed. - `all_orgs_override` Indicates whether the export operation applies across all organizations. Useful for multi-tenant environments where cross-org exports are required. + * @param exportMetadataTMLBatchedRequest + */ + public exportMetadataTMLBatched(exportMetadataTMLBatchedRequest: ExportMetadataTMLBatchedRequest, _options?: Configuration): Promise { + const result = this.api.exportMetadataTMLBatched(exportMetadataTMLBatchedRequest, _options); + return result.toPromise(); + } + + /** + * Version: 9.0.0.cl or later Fetches the underlying SQL query data for an Answer object. Requires at least view access to the Answer object. Upon successful execution, the API returns the SQL queries for the specified object as shown in this example: ``` { \"metadata_id\":\"8fbe44a8-46ad-4b16-8d39-184b2fada490\", \"metadata_name\":\"Total sales\", \"metadata_type\":\"ANSWER\", \"sql_queries\":[ { \"metadata_id\":\"8fbe44a8-46ad-4b16-8d39-184b2fada490\", \"metadata_name\":\"Total sales -test\", \"sql_query\":\"SELECT \\n \\\"ta_1\\\".\\\"REGION\\\" \\\"ca_1\\\", \\n \\\"ta_2\\\".\\\"PRODUCTNAME\\\" \\\"ca_2\\\", \\n \\\"ta_1\\\".\\\"STORENAME\\\" \\\"ca_3\\\", \\n CASE\\n WHEN sum(\\\"ta_3\\\".\\\"SALES\\\") IS NOT NULL THEN sum(\\\"ta_3\\\".\\\"SALES\\\")\\n ELSE 0\\n END \\\"ca_4\\\", \\n CASE\\n WHEN sum(\\\"ta_3\\\".\\\"QUANTITYPURCHASED\\\") IS NOT NULL THEN sum(\\\"ta_3\\\".\\\"QUANTITYPURCHASED\\\")\\n ELSE 0\\n END \\\"ca_5\\\"\\nFROM \\\"RETAILAPPAREL\\\".\\\"PUBLIC\\\".\\\"FACT_RETAPP_SALES\\\" \\\"ta_3\\\"\\n JOIN \\\"RETAILAPPAREL\\\".\\\"PUBLIC\\\".\\\"DIM_RETAPP_STORES\\\" \\\"ta_1\\\"\\n ON \\\"ta_3\\\".\\\"STOREID\\\" = \\\"ta_1\\\".\\\"STOREID\\\"\\n JOIN \\\"RETAILAPPAREL\\\".\\\"PUBLIC\\\".\\\"DIM_RETAPP_PRODUCTS\\\" \\\"ta_2\\\"\\n ON \\\"ta_3\\\".\\\"PRODUCTID\\\" = \\\"ta_2\\\".\\\"PRODUCTID\\\"\\nGROUP BY \\n \\\"ca_1\\\", \\n \\\"ca_2\\\", \\n \\\"ca_3\\\"\\n\" } ] } ``` + * @param fetchAnswerSqlQueryRequest + */ + public fetchAnswerSqlQuery(fetchAnswerSqlQueryRequest: FetchAnswerSqlQueryRequest, _options?: Configuration): Promise { + const result = this.api.fetchAnswerSqlQuery(fetchAnswerSqlQueryRequest, _options); + return result.toPromise(); + } + + /** + * Version: 10.4.0.cl or later Gets information about the status of the TML async import task scheduled using the `/api/rest/2.0/metadata/tml/async/import` API call. To fetch the task details, specify the ID of the TML async import task. Requires access to the task ID. The API allows users who initiated the asynchronous TML import via `/api/rest/2.0/metadata/tml/async/import` to view the status of their tasks. Users with administration privilege can view the status of all import tasks initiated by the users in their Org. #### Usage guidelines See [TML API Documentation](https://developers.thoughtspot.com/docs/tml#_fetch_status_of_the_tml_import_task) for usage guidelines. + * @param fetchAsyncImportTaskStatusRequest + */ + public fetchAsyncImportTaskStatus(fetchAsyncImportTaskStatusRequest: FetchAsyncImportTaskStatusRequest, _options?: Configuration): Promise { + const result = this.api.fetchAsyncImportTaskStatus(fetchAsyncImportTaskStatusRequest, _options); + return result.toPromise(); + } + + /** + * Version: 9.0.0.cl or later Fetches the underlying SQL query data for a Liveboard object and its visualizations. Requires at least view access to the Liveboard object. To get SQL query data for a Liveboard, specify the GUID of the Liveboard. Optionally, you can add an array of visualization GUIDs to retrieve the SQL query data for visualizations in the Liveboard. Upon successful execution, the API returns the SQL queries for the specified object as shown in this example: ``` { \"metadata_id\": \"fa68ae91-7588-4136-bacd-d71fb12dda69\", \"metadata_name\": \"Total Sales\", \"metadata_type\": \"LIVEBOARD\", \"sql_queries\": [ { \"metadata_id\": \"b3b6d2b9-089a-490c-8e16-b144650b7843\", \"metadata_name\": \"Total quantity purchased, Total sales by region\", \"sql_query\": \"SELECT \\n \\\"ta_1\\\".\\\"REGION\\\" \\\"ca_1\\\", \\n CASE\\n WHEN sum(\\\"ta_2\\\".\\\"QUANTITYPURCHASED\\\") IS NOT NULL THEN sum(\\\"ta_2\\\".\\\"QUANTITYPURCHASED\\\")\\n ELSE 0\\n END \\\"ca_2\\\", \\n CASE\\n WHEN sum(\\\"ta_2\\\".\\\"SALES\\\") IS NOT NULL THEN sum(\\\"ta_2\\\".\\\"SALES\\\")\\n ELSE 0\\n END \\\"ca_3\\\"\\nFROM \\\"RETAILAPPAREL\\\".\\\"PUBLIC\\\".\\\"FACT_RETAPP_SALES\\\" \\\"ta_2\\\"\\n JOIN \\\"RETAILAPPAREL\\\".\\\"PUBLIC\\\".\\\"DIM_RETAPP_STORES\\\" \\\"ta_1\\\"\\n ON \\\"ta_2\\\".\\\"STOREID\\\" = \\\"ta_1\\\".\\\"STOREID\\\"\\nGROUP BY \\\"ca_1\\\"\" } ] } ``` + * @param fetchLiveboardSqlQueryRequest + */ + public fetchLiveboardSqlQuery(fetchLiveboardSqlQueryRequest: FetchLiveboardSqlQueryRequest, _options?: Configuration): Promise { + const result = this.api.fetchLiveboardSqlQuery(fetchLiveboardSqlQueryRequest, _options); + return result.toPromise(); + } + + /** + * Version: 9.0.0.cl or later Imports [TML](https://docs.thoughtspot.com/cloud/latest/tml) files into ThoughtSpot. Requires `DATAMANAGEMENT` (**Can manage data**) or `ADMINISTRATION` (**Can administer ThoughtsSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the following Data control privileges may be required: - `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) - `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` (**Can manage data models**) #### Usage guidelines * Import all related objects in a single TML Import API call. For example, Tables that use the same Connection object and Worksheets connected to these Tables. * Include the `fqn` property to distinguish objects that have the same name. For example, if you have multiple Connections or Worksheets with the same name on ThoughtSpot and the Connection or Worksheet referenced in your TML file does not have a unique name to distinguish, it may result in invalid object references. Adding `fqn` helps ThoughtSpot differentiate a Table from another with the same name. We recommend [exporting TML with FQNs](#/http/api-endpoints/metadata/export-metadata-tml) and using these during the import operation. * You can upload multiple TML files at a time. If you import a Worksheet along with Liveboards, Answers, and other dependent objects in a single API call, the imported objects will be immediately available for use. When you import only a Worksheet object, it may take some time for the Worksheet to become available in the ThoughtSpot system. Please wait for a few minutes, and then proceed to create an Answer and Liveboard from the newly imported Worksheet. For more information, see [TML Documentation](https://developers.thoughtspot.com/docs/tml#_import_a_tml). + * @param importMetadataTMLRequest + */ + public importMetadataTML(importMetadataTMLRequest: ImportMetadataTMLRequest, _options?: Configuration): Promise> { + const result = this.api.importMetadataTML(importMetadataTMLRequest, _options); + return result.toPromise(); + } + + /** + * Version: 10.4.0.cl or later Schedules a task to import [TML](https://docs.thoughtspot.com/cloud/latest/tml) files into ThoughtSpot. You can use this API endpoint to process TML objects asynchronously when importing TMLs of large and complex metadata objects into ThoughtSpot. Unlike the synchronous import TML operation, the API processes TML data in the background and returns a task ID, which can be used to check the status of the import task via `/api/rest/2.0/metadata/tml/async/status` API endpoint. Requires `DATAMANAGEMENT` (**Can manage data**) or `ADMINISTRATION` (**Can administer ThoughtsSpot**) privilege, and edit access to the TML objects. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the following Data control privileges may be required: - `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) - `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` (**Can manage data models**) #### Usage guidelines See [Async TML API Documentation](https://developers.thoughtspot.com/docs/tml#_import_tml_objects_asynchronously) for usage guidelines. + * @param importMetadataTMLAsyncRequest + */ + public importMetadataTMLAsync(importMetadataTMLAsyncRequest: ImportMetadataTMLAsyncRequest, _options?: Configuration): Promise { + const result = this.api.importMetadataTMLAsync(importMetadataTMLAsyncRequest, _options); + return result.toPromise(); + } + + /** + * Parameterize fields in metadata objects. Version: 10.9.0.cl or later **Note:** This API endpoint is deprecated and will be removed from ThoughtSpot in a future release. Use [POST /api/rest/2.0/metadata/parameterize-fields](/api/rest/2.0/metadata/parameterize-fields) instead. Allows parameterizing fields in metadata objects in ThoughtSpot. Requires appropriate permissions to modify the metadata object. The API endpoint allows parameterizing the following types of metadata objects: * Logical Tables * Connections * Connection Configs For a Logical Table the field type must be `ATTRIBUTE` and field name can be one of: * databaseName * schemaName * tableName For a Connection or Connection Config, the field type is always `CONNECTION_PROPERTY`. In this case, field_name specifies the exact property of the Connection or Connection Config that needs to be parameterized. For Connection Config, the only supported field name is: * impersonate_user + * @param parameterizeMetadataRequest + */ + public parameterizeMetadata(parameterizeMetadataRequest: ParameterizeMetadataRequest, _options?: Configuration): Promise { + const result = this.api.parameterizeMetadata(parameterizeMetadataRequest, _options); + return result.toPromise(); + } + + /** + * Parameterize multiple fields of metadata objects. For example [schemaName, databaseName] for LOGICAL_TABLE. Version: 26.5.0.cl or later Allows parameterizing multiple fields of metadata objects in ThoughtSpot. For example, you can parameterize [schemaName, databaseName] for LOGICAL_TABLE. Requires appropriate permissions to modify the metadata object. The API endpoint allows parameterizing the following types of metadata objects: * Logical Tables * Connections * Connection Configs For a Logical Table, the field type must be `ATTRIBUTE` and field names can include: * databaseName * schemaName * tableName For a Connection or Connection Config, the field type is always `CONNECTION_PROPERTY`. In this case, field_names specifies the exact properties of the Connection or Connection Config that need to be parameterized. For Connection Config, supported field names include: * impersonate_user You can parameterize multiple fields at once by providing an array of field names. + * @param parameterizeMetadataFieldsRequest + */ + public parameterizeMetadataFields(parameterizeMetadataFieldsRequest: ParameterizeMetadataFieldsRequest, _options?: Configuration): Promise { + const result = this.api.parameterizeMetadataFields(parameterizeMetadataFieldsRequest, _options); + return result.toPromise(); + } + + /** + * Version: 9.0.0.cl or later Gets a list of metadata objects available on the ThoughtSpot system. This API endpoint is available to all users who have view access to the object. Users with `ADMINISTRATION` (**Can administer ThoughtSpot**) privileges can view data for all metadata objects, including users and groups. #### Usage guidelines - To get all metadata objects, send the API request without any attributes. - To get metadata objects of a specific type, set the `type` attribute. For example, to fetch a Worksheet, set the type as `LOGICAL_TABLE`. - To filter metadata objects within type `LOGICAL_TABLE`, set the `subtypes` attribute. For example, to fetch a Worksheet, set the type as `LOGICAL_TABLE` & subtypes as `[WORKSHEET]`. - To get a specific metadata object, specify the GUID. - To customize your search and filter the API response, you can use several parameters. You can search for objects created or modified by specific users, by tags applied to the objects, or by using the include parameters like `include_auto_created_objects`, `include_dependent_objects`, `include_headers`, `include_incomplete_objects`, and so on. You can also define sorting options to sort the data retrieved in the API response. - To get discoverable objects when linientmodel is enabled you can use `include_discoverable_objects` as true else false. Default value is true. - For liveboard metadata type, to get the newer format, set the `liveboard_response_format` as V2. Default value is V1. - To retrieve only objects that are published, set the `include_only_published_objects` as true. Default value is false. **NOTE**: The following parameters support pagination of metadata records: - `tag_identifiers` - `type` - `subtypes` - `created_by_user_identifiers` - `modified_by_user_identifiers` - `owned_by_user_identifiers` - `exclude_objects` - `include_auto_created_objects` - `favorite_object_options` - `include_only_published_objects` If you are using other parameters to search metadata, set `record_size` to `-1` and `record_offset` to `0`. + * @param searchMetadataRequest + */ + public searchMetadata(searchMetadataRequest: SearchMetadataRequest, _options?: Configuration): Promise> { + const result = this.api.searchMetadata(searchMetadataRequest, _options); + return result.toPromise(); + } + + /** + * Remove parameterization from fields in metadata objects. Version: 26.5.0.cl or later Allows removing parameterization from fields in metadata objects in ThoughtSpot. Requires appropriate permissions to modify the metadata object. The API endpoint allows unparameterizing the following types of metadata objects: * Logical Tables * Connections * Connection Configs For a Logical Table the field type must be `ATTRIBUTE` and field name can be one of: * databaseName * schemaName * tableName For a Connection or Connection Config, the field type is always `CONNECTION_PROPERTY`. In this case, field_name specifies the exact property of the Connection or Connection Config that needs to be unparameterized. For Connection Config, the only supported field name is: * impersonate_user + * @param unparameterizeMetadataRequest + */ + public unparameterizeMetadata(unparameterizeMetadataRequest: UnparameterizeMetadataRequest, _options?: Configuration): Promise { + const result = this.api.unparameterizeMetadata(unparameterizeMetadataRequest, _options); + return result.toPromise(); + } + + /** + * Update header attributes for a given list of header objects. Version: 10.6.0.cl or later ## Prerequisites - **Privileges Required:** - `DATAMANAGEMENT` (Can manage data) or `ADMINISTRATION` (Can administer ThoughtSpot). - **Additional Privileges (if RBAC is enabled):** - `ORG_ADMINISTRATION` (Can manage orgs). --- ## Usage Guidelines ### Parameters 1. **headers_update** - **Description:** List of header objects with their attributes to be updated. Each object contains a list of attributes to be updated in the header. - **Usage:** - You must provide either `identifier` or `obj_identifier`, but not both. Both fields cannot be empty. - When `org_identifier` is set to `-1`, only the `identifier` value is accepted; `obj_identifier` is not allowed. 2. **org_identifier** - **Description:** GUID (Globally Unique Identifier) or name of the organization. - **Usage:** - Leaving this field empty assumes that the changes should be applied to the current organization - Provide `org_guid` or `org_name` to uniquely identify the organization where changes need to be applied. . - Provide `-1` if changes have to be applied across all the org. --- ## Note Currently, this API is enabled only for updating the `obj_identifier` attribute. Only `text` will be allowed in attribute\'s value. ## Best Practices 1. **Backup Before Conversion:** Always export metadata as a backup before initiating the update process --- ## Examples ### Only `identifier` is given ```json { \"headers_update\": [ { \"identifier\": \"guid_1\", \"obj_identifier\": \"\", \"type\": \"LOGICAL_COLUMN\", \"attributes\": [ { \"name\": \"obj_id\", \"value\": \"custom_object_id\" } ] } ], \"org_identifier\": \"orgGuid\" } ``` ### Only `obj_identifier` is given ```json { \"headers_update\": [ { \"obj_identifier\": \"custom_object_id\", \"type\": \"ANSWER\", \"attributes\": [ { \"name\": \"obj_id\", \"value\": \"custom_object_id\" } ] } ], \"org_identifier\": \"orgName\" } ``` ### Executing update for all org `-1` ```json { \"headers_update\": [ { \"identifier\": \"guid_1\", \"type\": \"ANSWER\", \"attributes\": [ { \"name\": \"obj_id\", \"value\": \"custom_object_id\" } ] } ], \"org_identifier\": -1 } ``` ### Optional `type` is not provided ```json { \"headers_update\": [ { \"identifier\": \"guid_1\", \"attributes\": [ { \"name\": \"obj_id\", \"value\": \"custom_object_id\" } ] } ], \"org_identifier\": -1 } ``` + * @param updateMetadataHeaderRequest + */ + public updateMetadataHeader(updateMetadataHeaderRequest: UpdateMetadataHeaderRequest, _options?: Configuration): Promise { + const result = this.api.updateMetadataHeader(updateMetadataHeaderRequest, _options); + return result.toPromise(); + } + + /** + * Update object IDs for given metadata objects. Version: 10.8.0.cl or later ## Prerequisites - **Privileges Required:** - `DATAMANAGEMENT` (Can manage data) or `ADMINISTRATION` (Can administer ThoughtSpot). - **Additional Privileges (if RBAC is enabled):** - `ORG_ADMINISTRATION` (Can manage orgs). --- ## Usage Guidelines ### Parameters 1. **metadata** - **Description:** List of metadata objects to update their object IDs. - **Usage:** - Use either `current_obj_id` alone OR use `metadata_identifier` with `type` (when needed). - When using `metadata_identifier`, the `type` field is required if using a name instead of a GUID. - The `new_obj_id` field is always required. --- ## Note This API is specifically designed for updating object IDs of metadata objects. It internally uses the header update mechanism to perform the changes. ## Best Practices 1. **Backup Before Update:** Always export metadata as a backup before initiating the update process. 2. **Validation:** - When using `current_obj_id`, ensure it matches the existing object ID exactly. - When using `metadata_identifier` with a name, ensure the `type` is specified correctly. - Verify that the `new_obj_id` follows your naming conventions and is unique within your system. --- ## Examples ### Using current_obj_id ```json { \"metadata\": [ { \"current_obj_id\": \"existing_object_id\", \"new_obj_id\": \"new_object_id\" } ] } ``` ### Using metadata_identifier with GUID ```json { \"metadata\": [ { \"metadata_identifier\": \"01234567-89ab-cdef-0123-456789abcdef\", \"new_obj_id\": \"new_object_id\" } ] } ``` ### Using metadata_identifier with name and type ```json { \"metadata\": [ { \"metadata_identifier\": \"My Answer\", \"type\": \"ANSWER\", \"new_obj_id\": \"new_object_id\" } ] } ``` ### Multiple objects update ```json { \"metadata\": [ { \"current_obj_id\": \"existing_object_id_1\", \"new_obj_id\": \"new_object_id_1\" }, { \"metadata_identifier\": \"My Worksheet\", \"type\": \"LOGICAL_TABLE\", \"new_obj_id\": \"new_object_id_2\" } ] } ``` + * @param updateMetadataObjIdRequest + */ + public updateMetadataObjId(updateMetadataObjIdRequest: UpdateMetadataObjIdRequest, _options?: Configuration): Promise { + const result = this.api.updateMetadataObjId(updateMetadataObjIdRequest, _options); + return result.toPromise(); + } + + +} + + + +import { ObservableOrgsApi } from './ObservableAPI'; + +import { OrgsApiRequestFactory, OrgsApiResponseProcessor} from "../apis/OrgsApi"; +export class PromiseOrgsApi { + private api: ObservableOrgsApi + + public constructor( + configuration: Configuration, + requestFactory?: OrgsApiRequestFactory, + responseProcessor?: OrgsApiResponseProcessor + ) { + this.api = new ObservableOrgsApi(configuration, requestFactory, responseProcessor); + } + + /** + * Version: 9.0.0.cl or later Creates an Org object. To use this API, the [Orgs](https://docs.thoughtspot.com/cloud/latest/orgs-overview) feature must be enabled in your cluster. Requires cluster administration (**Can administer Org**) privileges. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `ORG_ADMINISTRATION` (**Can manage Orgs**) privilege is required. + * @param createOrgRequest + */ + public createOrg(createOrgRequest: CreateOrgRequest, _options?: Configuration): Promise { + const result = this.api.createOrg(createOrgRequest, _options); + return result.toPromise(); + } + + /** + * Version: 9.0.0.cl or later Deletes an Org object from the ThoughtSpot system. Requires cluster administration (**Can administer Org**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `ORG_ADMINISTRATION` (**Can manage Orgs**) privilege is required. When you delete an Org, all its users and objects created in that Org context are removed. However, if the users in the deleted Org also exists in other Orgs, they are removed only from the deleted Org. + * @param orgIdentifier ID or name of the Org + */ + public deleteOrg(orgIdentifier: string, _options?: Configuration): Promise { + const result = this.api.deleteOrg(orgIdentifier, _options); + return result.toPromise(); + } + + /** + * Version: 9.0.0.cl or later Gets a list of Orgs configured on the ThoughtSpot system. To get details of a specific Org, specify the Org ID or name. You can also pass parameters such as status, visibility, and user identifiers to get a specific list of Orgs. Requires cluster administration (**Can administer Org**) privileges. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `ORG_ADMINISTRATION` (**Can manage Orgs**) privilege is required. + * @param searchOrgsRequest + */ + public searchOrgs(searchOrgsRequest: SearchOrgsRequest, _options?: Configuration): Promise> { + const result = this.api.searchOrgs(searchOrgsRequest, _options); + return result.toPromise(); + } + + /** + * Version: 9.0.0.cl or later Updates an Org object. You can modify Org properties such as name, description, and user associations. Requires cluster administration (**Can administer Org**) privileges. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `ORG_ADMINISTRATION` (**Can manage Orgs**) privilege is required. + * @param orgIdentifier ID or name of the Org + * @param updateOrgRequest + */ + public updateOrg(orgIdentifier: string, updateOrgRequest: UpdateOrgRequest, _options?: Configuration): Promise { + const result = this.api.updateOrg(orgIdentifier, updateOrgRequest, _options); + return result.toPromise(); + } + + +} + + + +import { ObservableReportsApi } from './ObservableAPI'; + +import { ReportsApiRequestFactory, ReportsApiResponseProcessor} from "../apis/ReportsApi"; +export class PromiseReportsApi { + private api: ObservableReportsApi + + public constructor( + configuration: Configuration, + requestFactory?: ReportsApiRequestFactory, + responseProcessor?: ReportsApiResponseProcessor + ) { + this.api = new ObservableReportsApi(configuration, requestFactory, responseProcessor); + } + + /** + * Version: 9.0.0.cl or later Exports an Answer in the given file format. You can download the Answer data as a PDF, PNG, CSV, or XLSX file. Requires at least view access to the Answer. #### Usage guidelines In the request body, specify the GUID or name of the Answer and set `file_format`. The default file format is CSV. Use the `type` parameter to specify whether the Answer being exported is a saved Answer (`SAVED`) or a pinned Answer on a Liveboard (`PINNED`). Defaults to `SAVED`. When using `PINNED`, the `metadata_identifier` must be the container id. **NOTE**: * The downloadable file returned in API response file is extensionless. Please rename the downloaded file by typing in the relevant extension. * HTML rendering is not supported for PDF exports of Answers with tables. Optionally, you can define [runtime overrides](https://developers.thoughtspot.com/docs/fetch-data-and-report-apis#_runtime_overrides) to apply to the Answer data. + * @param exportAnswerReportRequest + */ + public exportAnswerReport(exportAnswerReportRequest: ExportAnswerReportRequest, _options?: Configuration): Promise { + const result = this.api.exportAnswerReport(exportAnswerReportRequest, _options); + return result.toPromise(); + } + + /** + * Version: 9.0.0.cl or later Exports a Liveboard and its visualizations in PDF, PNG, CSV, or XLSX file format. The default `file_format` is CSV. Requires at least view access to the Liveboard. #### Usage guidelines In the request body, specify the GUID or name of the Liveboard. To generate a Liveboard report with specific visualizations, add GUIDs or names of the visualizations. **NOTE**: * The downloadable file returned in API response file is extensionless. Please rename the downloaded file by typing in the relevant extension. * Optionally, you can define [runtime overrides](https://developers.thoughtspot.com/docs/fetch-data-and-report-apis#_runtime_overrides) to apply to the Answer data. * To include unsaved changes in the report, pass the `transient_pinboard_content` script generated from the `getExportRequestForCurrentPinboard` method in the Visual Embed SDK. Upon successful execution, the API returns the report with unsaved changes, including ad hoc changes to visualizations. For more information, see [Liveboard Report API](https://developers.thoughtspot.com/docs/fetch-data-and-report-apis#_liveboard_report_api). * Starting with ThoughtSpot Cloud 10.9.0.cl release, the Liveboard can be exported in the PNG format in the resolution of your choice. To enable this on your instance, contact ThoughtSpot support. When this feature is enabled, the options `include_cover_page`,`include_filter_page` within the `png_options` will not be available for PNG exports. * Starting with the ThoughtSpot Cloud 26.2.0.cl release, * Liveboards can be exported in CSV format. * All visualizations within a Liveboard can be exported as individual CSV files. * When exporting multiple visualizations or the entire Liveboard, the system returns the report as a compressed ZIP file containing the separate CSV files for each visualization. * Liveboards can also be exported in XLSX format. * All selected visualizations are consolidated into a single Excel workbook (.xlsx), with each visualization placed in its own worksheet (tab). * XLSX exports are limited to a maximum of 255 worksheets (tabs) per workbook. + * @param exportLiveboardReportRequest + */ + public exportLiveboardReport(exportLiveboardReportRequest: ExportLiveboardReportRequest, _options?: Configuration): Promise { + const result = this.api.exportLiveboardReport(exportLiveboardReportRequest, _options); + return result.toPromise(); + } + + +} + + + +import { ObservableRolesApi } from './ObservableAPI'; + +import { RolesApiRequestFactory, RolesApiResponseProcessor} from "../apis/RolesApi"; +export class PromiseRolesApi { + private api: ObservableRolesApi + + public constructor( + configuration: Configuration, + requestFactory?: RolesApiRequestFactory, + responseProcessor?: RolesApiResponseProcessor + ) { + this.api = new ObservableRolesApi(configuration, requestFactory, responseProcessor); + } + + /** + * Version: 9.5.0.cl or later Creates a Role object in ThoughtSpot. Available only if [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance. To create a Role, the `ROLE_ADMINISTRATION` (**Can manage roles**) privilege is required. + * @param createRoleRequest + */ + public createRole(createRoleRequest: CreateRoleRequest, _options?: Configuration): Promise { + const result = this.api.createRole(createRoleRequest, _options); + return result.toPromise(); + } + + /** + * Version: 9.5.0.cl or later Deletes a Role object from the ThoughtSpot system. Available only if [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance. To delete a Role, the `ROLE_ADMINISTRATION` (**Can manage roles**) privilege is required. + * @param roleIdentifier Unique ID or name of the Role. ReadOnly roles cannot be deleted. + */ + public deleteRole(roleIdentifier: string, _options?: Configuration): Promise { + const result = this.api.deleteRole(roleIdentifier, _options); + return result.toPromise(); + } + + /** + * Version: 9.5.0.cl or later Gets a list of Role objects from the ThoughtSpot system. Available if [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance. To search for Roles, the `ROLE_ADMINISTRATION` (**Can manage roles**) privilege is required. To get details of a specific Role object, specify the GUID or name. You can also filter the API response based on user group and Org identifiers, privileges assigned to the Role, and deprecation status. + * @param searchRolesRequest + */ + public searchRoles(searchRolesRequest: SearchRolesRequest, _options?: Configuration): Promise> { + const result = this.api.searchRoles(searchRolesRequest, _options); + return result.toPromise(); + } + + /** + * Version: 9.5.0.cl or later Updates the properties of a Role object. Available only if [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance. To update a Role, the `ROLE_ADMINISTRATION` (**Can manage roles**) privilege is required. + * @param roleIdentifier Unique ID or name of the Role. + * @param updateRoleRequest + */ + public updateRole(roleIdentifier: string, updateRoleRequest: UpdateRoleRequest, _options?: Configuration): Promise { + const result = this.api.updateRole(roleIdentifier, updateRoleRequest, _options); + return result.toPromise(); + } + + +} + + + +import { ObservableSchedulesApi } from './ObservableAPI'; + +import { SchedulesApiRequestFactory, SchedulesApiResponseProcessor} from "../apis/SchedulesApi"; +export class PromiseSchedulesApi { + private api: ObservableSchedulesApi + + public constructor( + configuration: Configuration, + requestFactory?: SchedulesApiRequestFactory, + responseProcessor?: SchedulesApiResponseProcessor + ) { + this.api = new ObservableSchedulesApi(configuration, requestFactory, responseProcessor); + } + + /** + * Create schedule. Version: 9.4.0.cl or later Creates a Liveboard schedule job. Requires at least edit access to Liveboards. To create a schedule on behalf of another user, you need `ADMINISTRATION` (**Can administer Org**) or `JOBSCHEDULING` (**Can schedule for others**) privilege and edit access to the Liveboard. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `JOBSCHEDULING` (**Can schedule for others**) privilege is required. #### Usage guidelines * The description text is mandatory. The description text appears as **Description: ** in the Liveboard schedule email notifications. * For Liveboards with both charts and tables, schedule creation is only supported in PDF and XLS formats. Schedules created in CSV formats for such Liveboards will fail to run. If `PDF` is set as the `file_format`, enable `pdf_options` to get the correct attachment. Not doing so may cause the attachment to be rendered empty. * To include only specific visualizations, specify the visualization GUIDs in the `visualization_identifiers` array. * You can schedule a Liveboard job to run periodically by setting frequency parameters. You can set the schedule to run daily, weekly, monthly or every n minutes or hours. The scheduled job can also be configured to run at a specific time of the day or on specific days of the week or month. Please ensure that when setting the schedule frequency for _minute of the object_, only values that are multiples of 5 are included. * If the `frequency` parameters are defined, you can set the time zone to a value that matches your server\'s time zone. For example, `US/Central`, `Etc/UTC`, `CET`. The default time zone is `America/Los_Angeles`. For more information about Liveboard jobs, see [ThoughtSpot Product Documentation](https://docs.thoughtspot.com/cloud/latest/liveboard-schedule). + * @param createScheduleRequest + */ + public createSchedule(createScheduleRequest: CreateScheduleRequest, _options?: Configuration): Promise { + const result = this.api.createSchedule(createScheduleRequest, _options); + return result.toPromise(); + } + + /** + * Deletes a scheduled job. Version: 9.4.0.cl or later Deletes a scheduled Liveboard job. Requires at least edit access to Liveboard or `ADMINISTRATION` (**Can administer Org**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `JOBSCHEDULING` (**Can schedule for others**) privilege is required. + * @param scheduleIdentifier Unique ID or name of the scheduled job. + */ + public deleteSchedule(scheduleIdentifier: string, _options?: Configuration): Promise { + const result = this.api.deleteSchedule(scheduleIdentifier, _options); + return result.toPromise(); + } + + /** + * Search Schedules Version: 9.4.0.cl or later Gets a list of scheduled jobs configured for a Liveboard. To get details of a specific scheduled job, specify the name or GUID of the scheduled job. Requires at least view access to Liveboards. **NOTE**: When filtering schedules by parameters other than `metadata`, set `record_size` to `-1` and `record_offset` to `0` for accurate results. + * @param searchSchedulesRequest + */ + public searchSchedules(searchSchedulesRequest: SearchSchedulesRequest, _options?: Configuration): Promise> { + const result = this.api.searchSchedules(searchSchedulesRequest, _options); + return result.toPromise(); + } + + /** + * Update schedule. Version: 9.4.0.cl or later Updates a scheduled Liveboard job. Requires at least edit access to Liveboards. To update a schedule on behalf of another user, you need `ADMINISTRATION` (**Can administer Org**) or `JOBSCHEDULING` (**Can schedule for others**) privilege and edit access to the Liveboard. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `JOBSCHEDULING` (**Can schedule for others**) privilege is required. The API endpoint allows you to pause a scheduled job, change the status of a paused job. You can also edit the recipients list, frequency of the job, format of the file to send to the recipients in email notifications, PDF options, and time zone setting. + * @param scheduleIdentifier Unique ID or name of the schedule. + * @param updateScheduleRequest + */ + public updateSchedule(scheduleIdentifier: string, updateScheduleRequest: UpdateScheduleRequest, _options?: Configuration): Promise { + const result = this.api.updateSchedule(scheduleIdentifier, updateScheduleRequest, _options); + return result.toPromise(); + } + + +} + + + +import { ObservableSecurityApi } from './ObservableAPI'; + +import { SecurityApiRequestFactory, SecurityApiResponseProcessor} from "../apis/SecurityApi"; +export class PromiseSecurityApi { + private api: ObservableSecurityApi + + public constructor( + configuration: Configuration, + requestFactory?: SecurityApiRequestFactory, + responseProcessor?: SecurityApiResponseProcessor + ) { + this.api = new ObservableSecurityApi(configuration, requestFactory, responseProcessor); + } + + /** + * Version: 9.0.0.cl or later Transfers the ownership of one or several objects from one user to another. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `USER_ADMINISTRATION` (**Can manage users**) privilege and edit access to the objects are required. + * @param assignChangeAuthorRequest + */ + public assignChangeAuthor(assignChangeAuthorRequest: AssignChangeAuthorRequest, _options?: Configuration): Promise { + const result = this.api.assignChangeAuthor(assignChangeAuthorRequest, _options); + return result.toPromise(); + } + + /** + * Version: 10.12.0.cl or later Fetches column security rules for specified tables. This API endpoint retrieves column-level security rules configured for tables. It returns information about which columns are secured and which groups have access to those columns. #### Usage guidelines - Provide an array of table identifiers using either `identifier` (GUID or name) or `obj_identifier` (object ID) - At least one of `identifier` or `obj_identifier` must be provided for each table - The API returns column security rules for all specified tables - Users must have appropriate permissions to access security rules for the specified tables #### Required permissions - `ADMINISTRATION` - Can administer ThoughtSpot - `DATAMANAGEMENT` - Can manage data - `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` - Can manage worksheet views and tables #### Example request ```json { \"tables\": [ { \"identifier\": \"table-guid\", \"obj_identifier\": \"table-object-id\" } ] } ``` #### Response format The API returns an array of `ColumnSecurityRuleResponse` objects wrapped in a `data` field. Each `ColumnSecurityRuleResponse` object contains: - Table information (GUID and object ID) - Array of column security rules with column details, group access, and source table information #### Example response ```json { \"data\": [ { \"guid\": \"table-guid\", \"objId\": \"table-object-id\", \"columnSecurityRules\": [ { \"column\": { \"id\": \"col_123\", \"name\": \"Salary\" }, \"groups\": [ { \"id\": \"group_1\", \"name\": \"HR Department\" } ], \"sourceTableDetails\": { \"id\": \"source-table-guid\", \"name\": \"Employee_Data\" } } ] } ] } ``` + * @param fetchColumnSecurityRulesRequest + */ + public fetchColumnSecurityRules(fetchColumnSecurityRulesRequest: FetchColumnSecurityRulesRequest, _options?: Configuration): Promise> { + const result = this.api.fetchColumnSecurityRules(fetchColumnSecurityRulesRequest, _options); + return result.toPromise(); + } + + /** + * Version: 26.3.0.cl or later This API fetches the object privileges present for the given list of principals (user or group), on the given set of objects. It supports pagination, which can be enabled and configured using the request parameters. It provides users access to certain features based on privilege based access control. #### Usage guidelines - Specify the `type` (`USER` or `USER_GROUP`) and `identifier` (either GUID or name) of the principals for which you want to retrieve object privilege information in the `principals` array. - Specify the `type` (`LOGICAL_TABLE`) and `identifier` (either GUID or name) of the metadata objects for which you want to retrieve object privilege information in the `metadata` array. Only `LOGICAL_TABLE` metadata type is supported for now. It may be extended for other metadata types in future. - To control the offset from where principals have to be fetched, use `record_offset`. When `record_offset` is 0, information is fetched from the beginning. - To control the number of principals to be fetched, use `record_size`. Default `record_size` is 20. - Ensure `record_offset` for a subsequent request is one more than the value of `record_size` of the previous request. - Ensure using correct Authorization Bearer Token corresponding to specific user & org. #### Example request ```json { \"principals\": [ { \"type\": \"type-1\", \"identifier\": \"principal-guid-or-name-1\" }, { \"type\": \"type-2\", \"identifier\": \"principal-guid-or-name-2\" } ], \"metadata\": [ { \"type\": \"metadata-type-1\", \"identifier\": \"metadata-guid-or-name-1\" }, { \"type\": \"metadata-type-2\", \"identifier\": \"metadata-guid-or-name-2\" } ], \"record_offset\": 0, \"record_size\": 20 } ``` #### Response format The API returns an array of `metadata_object_privileges` objects wrapped in JSON. Each `metadata_object_privileges` object contains: - Metadata information (GUID, name and type) - Array of `principal_object_privilege_info`. - Each `principal_object_privilege_info` contains: - Principal type. All principals of this type are listed as described below. - Array of `principal_object_privileges`. - Each `principal_object_privileges` contains: - Principal information (GUID, name, subtype) - List of applied object level privileges. #### Example response ```json { \"metadata_object_privileges\": [ { \"metadata_id\": \"metadata-guid-1\", \"metadata_name\": \"metadata-name-1\", \"metadata_type\": \"metadata-type-1\", \"principal_object_privilege_info\": [ { \"principal_type\": \"principal-type-1\", \"principal_object_privileges\": [ { \"principal_id\": \"principal-guid-1\", \"principal_name\": \"principal-name-1\", \"principal_sub_type\": \"principal-sub-type-1\", \"object_privileges\": \"[object-privilege-1, object-privilege-2]\" }, { \"principal_id\": \"principal-guid-2\", \"principal_name\": \"principal-name-2\", \"principal_sub_type\": \"principal-sub-type-2\", \"object_privileges\": \"[object-privilege-1, object-privilege-2]\" } ] }, { \"principal_type\": \"principal-type-2\", \"principal_object_privileges\": [ { \"principal_id\": \"principal-guid-3\", \"principal_name\": \"principal-guid-4\", \"principal_sub_type\": \"principal-sub-type-4\", \"object_privileges\": \"[object-privilege-1]\" } ] } ] }, { \"metadata_id\": \"metadata-guid-2\", \"metadata_name\": \"metadata-name-2\", \"metadata_type\": \"metadata-type-2\", \"principal_object_privilege_info\": [ { \"principal_type\": \"principal-type-1\", \"principal_object_privileges\": [ { \"principal_id\": \"principal-guid-1\", \"principal_name\": \"principal-name-1\", \"principal_sub_type\": \"principal-sub-type-1\", \"object_privileges\": \"[object-privilege-3, object-privilege-4]\" }, { \"principal_id\": \"principal-guid-2\", \"principal_name\": \"principal-name-2\", \"principal_sub_type\": \"principal-sub-type-2\", \"object_privileges\": \"[object-privilege-4]\" } ] } ] } ] } ``` + * @param fetchObjectPrivilegesRequest + */ + public fetchObjectPrivileges(fetchObjectPrivilegesRequest: FetchObjectPrivilegesRequest, _options?: Configuration): Promise { + const result = this.api.fetchObjectPrivileges(fetchObjectPrivilegesRequest, _options); + return result.toPromise(); + } + + /** + * Version: 9.0.0.cl or later Fetches object permission details for a given principal object such as a user and group. Requires view access to the metadata object. #### Usage guidelines * To get a list of all metadata objects that a user or group can access, specify the `type` and GUID or name of the principal. * To get permission details for a specific object, add the `type` and GUID or name of the metadata object to your API request. Upon successful execution, the API returns a list of metadata objects and permission details for each object. + * @param fetchPermissionsOfPrincipalsRequest + */ + public fetchPermissionsOfPrincipals(fetchPermissionsOfPrincipalsRequest: FetchPermissionsOfPrincipalsRequest, _options?: Configuration): Promise { + const result = this.api.fetchPermissionsOfPrincipals(fetchPermissionsOfPrincipalsRequest, _options); + return result.toPromise(); + } + + /** + * Version: 9.0.0.cl or later Fetches permission details for a given metadata object. Requires view access to the metadata object. #### Usage guidelines * To fetch a list of users and groups for a metadata object, specify `type` and GUID or name of the metadata object. * To get permission details for a specific user or group, add `type` and GUID or name of the principal object to your API request. Upon successful execution, the API returns permission details and principal information for the object specified in the API request. + * @param fetchPermissionsOnMetadataRequest + */ + public fetchPermissionsOnMetadata(fetchPermissionsOnMetadataRequest: FetchPermissionsOnMetadataRequest, _options?: Configuration): Promise { + const result = this.api.fetchPermissionsOnMetadata(fetchPermissionsOnMetadataRequest, _options); + return result.toPromise(); + } + + /** + * Version: 26.3.0.cl or later This API allows the addition or deletion of object level privileges for a set of users and groups, on a set of metadata objects. It provides users to access certain features based on privilege based access control. #### Usage guidelines - Specify the `operation`. The supported operations are: `ADD`, `REMOVE`. - Specify the type of the objects on which the object privileges are being provided in `metadata_type`. Only `LOGICAL_TABLE` metadata type is supported for now. It may be extended for other metadata types in future. - Specify the list of object privilege types in the `object_privilege_types` array. The supported object privilege types are: `SPOTTER_COACHING_PRIVILEGE`. - Specify the identifiers (either GUID or name) for the metadata objects in the `metadata_identifiers` array. - Specify the `type` (`USER` or `USER_GROUP`) and `identifier` (either GUID or name) of the principals to which you want to apply the given operation and given object privileges in the `principals` array. - Ensure using correct Authorization Bearer Token corresponding to specific user & org. #### Example request ```json { \"operation\": \"operation-type\", \"metadata_type\": \"metadata-type\", \"object_privilege_types\": [\"privilege-type-1\", \"privilege-type-2\"], \"metadata_identifiers\": [\"metadata-guid-or-name-1\", \"metadata-guid-or-name-1\"], \"principals\": [ { \"type\": \"type-1\", \"identifier\": \"principal-guid-or-name-1\" }, { \"type\": \"type-2\", \"identifier\": \"principal-guid-or-name-2\" } ] } ``` > ###### Note: > * Only admin users, users with edit access and users with coaching privilege on a given data-model can add or remove principals related to SPOTTER_COACHING_PRIVILEGE + * @param manageObjectPrivilegeRequest + */ + public manageObjectPrivilege(manageObjectPrivilegeRequest: ManageObjectPrivilegeRequest, _options?: Configuration): Promise { + const result = this.api.manageObjectPrivilege(manageObjectPrivilegeRequest, _options); + return result.toPromise(); + } + + /** + * Version: 26.5.0.cl or later Allows publishing metadata objects across organizations in ThoughtSpot. Requires ADMINISTRATION role and TENANT scope. The API endpoint allows publishing the following types of metadata objects: * Liveboards * Answers * Logical Tables This API will essentially share the objects along with it\'s dependencies to the org admins of the orgs to which it is being published. + * @param publishMetadataRequest + */ + public publishMetadata(publishMetadataRequest: PublishMetadataRequest, _options?: Configuration): Promise { + const result = this.api.publishMetadata(publishMetadataRequest, _options); + return result.toPromise(); + } + + /** + * Version: 9.0.0.cl or later Allows sharing one or several metadata objects with users and groups in ThoughtSpot. Requires edit access to the metadata object. #### Supported metadata objects: * Liveboards * Visualizations * Answers * Models * Views * Connections * Collections #### Object permissions You can provide `READ_ONLY` or `MODIFY` access when sharing an object with another user or group. The `READ_ONLY` permission grants view access to the shared object, whereas `MODIFY` provides edit access. To prevent a user or group from accessing the shared object, specify the GUID or name of the principal and set `shareMode` to `NO_ACCESS`. #### Sharing a visualization * Sharing a visualization implicitly shares the entire Liveboard with the recipient. * Object permissions set for a shared visualization also apply to the Liveboard unless overridden by another API request or via UI. * If email notifications for object sharing are enabled, a notification with a link to the shared visualization will be sent to the recipient’s email address. Although this link opens the shared visualization, recipients can also access other visualizations in the Liveboard. #### Sharing a collection Collections support **dual permissions** that provide fine-grained control: * **Collection permissions** (`share_mode`) - controls access to the collection itself (view, edit, delete the collection) * **Content permissions** (`content_share_mode`) - controls access to objects within the collection (view, edit objects inside) **Default Behavior:** - If only `share_mode` is specified, the content permissions default to `READ_ONLY` (except when `share_mode` is `NO_ACCESS`, then content also gets `NO_ACCESS`) - To give users edit access to collection contents, explicitly set `content_share_mode: \"MODIFY\"` ## Examples The following JSON examples can be copy-pasted as request bodies for the REST v2 API endpoint: ```bash POST /callosum/v1/v2/security/metadata/share Content-Type: application/x-www-form-urlencoded ``` ### Basic collection sharing Share a collection with read-only access: ```json { \"metadata_type\": \"COLLECTION\", \"metadata_identifiers\": [\"Sales Reports Collection\"], \"permissions\": [{ \"principal\": { \"type\": \"USER\", \"identifier\": \"alice@company.com\" }, \"share_mode\": \"READ_ONLY\" }], \"notification\": { \"message\": \"I\'ve shared the Sales Reports collection with you\", \"notify_on_share\": true } } ``` ### Collection sharing with dual permissions Share a collection with different permissions for the collection vs. its contents: ```json { \"metadata_type\": \"COLLECTION\", \"metadata_identifiers\": [\"Marketing Analytics\"], \"permissions\": [{ \"principal\": { \"type\": \"USER\", \"identifier\": \"bob@company.com\" }, \"share_mode\": \"MODIFY\", \"content_share_mode\": \"READ_ONLY\" }, { \"principal\": { \"type\": \"USER_GROUP\", \"identifier\": \"Marketing Team\" }, \"share_mode\": \"READ_ONLY\", \"content_share_mode\": \"READ_ONLY\" }], \"notification\": { \"emails\": [\"bob@company.com\"], \"message\": \"You can edit the collection but content is read-only\", \"enable_custom_url\": false, \"notify_on_share\": true }, \"has_lenient_discoverability\": false } ``` ### Multiple collections sharing Share multiple collections with different users: ```json { \"metadata\": [ { \"type\": \"COLLECTION\", \"identifier\": \"Q4 Reports\" }, { \"type\": \"COLLECTION\", \"identifier\": \"Executive Dashboard Collection\" } ], \"permissions\": [{ \"principal\": { \"type\": \"USER_GROUP\", \"identifier\": \"Executives\" }, \"share_mode\": \"MODIFY\" }, { \"principal\": { \"type\": \"USER\", \"identifier\": \"manager@company.com\" }, \"share_mode\": \"READ_ONLY\", \"content_share_mode\": \"MODIFY\" }], \"notification\": { \"message\": \"Sharing quarterly collections with leadership team\", \"notify_on_share\": true } } ``` ### Remove collection access Remove access to a collection by setting share_mode to NO_ACCESS: ```json { \"metadata_type\": \"COLLECTION\", \"metadata_identifiers\": [\"Confidential Reports\"], \"permissions\": [{ \"principal\": { \"type\": \"USER\", \"identifier\": \"former-employee@company.com\" }, \"share_mode\": \"NO_ACCESS\" }], \"notification\": { \"notify_on_share\": false } } ``` ### Collection Permission Scenarios **Scenario 1: Collection Admin** - `share_mode: MODIFY` + `content_share_mode: MODIFY` = Full control over collection and its contents **Scenario 2: Collection Curator** - `share_mode: MODIFY` + `content_share_mode: READ_ONLY` = Can manage collection structure but not edit contents **Scenario 3: Content Editor** - `share_mode: READ_ONLY` + `content_share_mode: MODIFY` = Can edit objects within collection but can\'t change collection itself **Scenario 4: Viewer** - `share_mode: READ_ONLY` + `content_share_mode: READ_ONLY` = View-only access to collection and contents + * @param shareMetadataRequest + */ + public shareMetadata(shareMetadataRequest: ShareMetadataRequest, _options?: Configuration): Promise { + const result = this.api.shareMetadata(shareMetadataRequest, _options); + return result.toPromise(); + } + + /** + * Version: 26.5.0.cl or later Allows unpublishing metadata objects from organizations in ThoughtSpot. Requires ADMINISTRATION role and TENANT scope. The API endpoint allows unpublishing the following types of metadata objects: * Liveboards * Answers * Logical Tables When unpublishing objects, you can: * Include dependencies by setting `include_dependencies` to true - this will unpublish all dependent objects if no other published object is using them * Force unpublish by setting `force` to true - this will break all dependent objects in the unpublished organizations + * @param unpublishMetadataRequest + */ + public unpublishMetadata(unpublishMetadataRequest: UnpublishMetadataRequest, _options?: Configuration): Promise { + const result = this.api.unpublishMetadata(unpublishMetadataRequest, _options); + return result.toPromise(); + } + + /** + * Version: 10.12.0.cl or later Creates, updates, or deletes column security rules for specified tables. This API endpoint allows you to create, update, or delete column-level security rules on columns of a table. The operation follows an \"all or none\" policy: if defining security rules for any of the provided columns fails, the entire operation will be rolled back, and no rules will be created. #### Usage guidelines - Provide table identifier using either `identifier` (GUID or name) or `obj_identifier` (object ID) - Use `clear_csr: true` to remove all column security rules from the table - For each column, specify the security rule using `column_security_rules` array - Use `is_unsecured: true` to mark a specific column as unprotected - Use `group_access` operations to manage group associations: - `ADD`: Add groups to the column\'s access list - `REMOVE`: Remove groups from the column\'s access list - `REPLACE`: Replace all existing groups with the specified groups #### Required permissions - `ADMINISTRATION` - Can administer ThoughtSpot - `DATAMANAGEMENT` - Can manage data (if RBAC is disabled) - `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` - Can manage worksheet views and tables (if RBAC is enabled) #### Example request ```json { \"identifier\": \"table-guid\", \"obj_identifier\": \"table-object-id\", \"clear_csr\": false, \"column_security_rules\": [ { \"column_identifier\": \"col id or col name\", \"is_unsecured\": false, \"group_access\": [ { \"operation\": \"ADD\", \"group_identifiers\": [\"hr_group_id\", \"hr_group_name\", \"finance_group_id\"] } ] }, { \"column_identifier\": \"col id or col name\", \"is_unsecured\": true }, { \"column_identifier\": \"col id or col name\", \"is_unsecured\": false, \"group_access\": [ { \"operation\": \"REPLACE\", \"group_identifiers\": [\"management_group_id\", \"management_group_name\"] } ] } ] } ``` #### Request Body Schema - `identifier` (string, optional): GUID or name of the table for which we want to create column security rules - `obj_identifier` (string, optional): The object ID of the table - `clear_csr` (boolean, optional): If true, then all the secured columns will be marked as unprotected, and all the group associations will be removed - `column_security_rules` (array of objects, required): An array where each object defines the security rule for a specific column Each column security rule object contains: - `column_identifier` (string, required): Column identifier (col_id or name) - `is_unsecured` (boolean, optional): If true, the column will be marked as unprotected and all groups associated with it will be removed - `group_access` (array of objects, optional): Array of group operation objects Each group operation object contains: - `operation` (string, required): Operation type - ADD, REMOVE, or REPLACE - `group_identifiers` (array of strings, required): Array of group identifiers (name or GUID) on which the operation will be performed #### Response This API does not return any response body. A successful operation returns HTTP 200 status code. #### Operation Types - **ADD**: Adds the specified groups to the column\'s access list - **REMOVE**: Removes the specified groups from the column\'s access list - **REPLACE**: Replaces all existing groups with the specified groups + * @param updateColumnSecurityRulesRequest + */ + public updateColumnSecurityRules(updateColumnSecurityRulesRequest: UpdateColumnSecurityRulesRequest, _options?: Configuration): Promise { + const result = this.api.updateColumnSecurityRules(updateColumnSecurityRulesRequest, _options); + return result.toPromise(); + } + + +} + + + +import { ObservableSystemApi } from './ObservableAPI'; + +import { SystemApiRequestFactory, SystemApiResponseProcessor} from "../apis/SystemApi"; +export class PromiseSystemApi { + private api: ObservableSystemApi + + public constructor( + configuration: Configuration, + requestFactory?: SystemApiRequestFactory, + responseProcessor?: SystemApiResponseProcessor + ) { + this.api = new ObservableSystemApi(configuration, requestFactory, responseProcessor); + } + + /** + * Version: 10.14.0.cl or later Configure communication channel preferences. - Use `cluster_preferences` to update the default preferences for your ThoughtSpot application instance. - If your instance has [Orgs](https://docs.thoughtspot.com/cloud/latest/orgs-overview), use `org_preferences` to specify Org-specific preferences that override the defaults. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) or `DEVELOPER` (**Has developer privilege**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, users with `APPLICATION_ADMINISTRATION` (**Can manage application settings**) privilege are also authorized to perform this action. + * @param configureCommunicationChannelPreferencesRequest + */ + public configureCommunicationChannelPreferences(configureCommunicationChannelPreferencesRequest: ConfigureCommunicationChannelPreferencesRequest, _options?: Configuration): Promise { + const result = this.api.configureCommunicationChannelPreferences(configureCommunicationChannelPreferencesRequest, _options); + return result.toPromise(); + } + + /** + * Version: 26.2.0.cl or later Configure security settings for your ThoughtSpot application instance. - Use `cluster_preferences` to update cluster-level security settings including CORS whitelisted URLs, CSP settings, SAML redirect URLs, partitioned cookies, and non-embed access configuration. - Use `org_preferences` to configure Org-specific security settings. If your instance has [Orgs](https://docs.thoughtspot.com/cloud/latest/orgs-overview), this allows configuring CORS and non-embed access settings specific to the Org. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) or `DEVELOPER` (**Has developer privilege**) privilege. Cluster-level SAML and script-src settings require `ADMINISTRATION` privilege. See [Security Settings](https://developers.thoughtspot.com/docs/security-settings) for more details. + * @param configureSecuritySettingsRequest + */ + public configureSecuritySettings(configureSecuritySettingsRequest: ConfigureSecuritySettingsRequest, _options?: Configuration): Promise { + const result = this.api.configureSecuritySettings(configureSecuritySettingsRequest, _options); + return result.toPromise(); + } + + /** + * Version: 9.0.0.cl or later Retrieves the current configuration details of the cluster. If the request is successful, the API returns a list configuration settings applied on the cluster. Requires `ADMINISTRATION`(**Can administer ThoughtSpot**) privilege to view these complete configuration settings of the cluster. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `SYSTEM_INFO_ADMINISTRATION` (**Can view system activities**) privilege is required. This API does not require any parameters to be passed in the request. + */ + public getSystemConfig(_options?: Configuration): Promise { + const result = this.api.getSystemConfig(_options); + return result.toPromise(); + } + + /** + * Version: 9.0.0.cl or later Gets system information such as the release version, locale, time zone, deployment environment, date format, and date time format of the cluster. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privileges. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `SYSTEM_INFO_ADMINISTRATION` (**Can view system activities**) privilege is required. This API does not require any parameters to be passed in the request. + */ + public getSystemInformation(_options?: Configuration): Promise { + const result = this.api.getSystemInformation(_options); + return result.toPromise(); + } + + /** + * Version: 9.2.0.cl or later Gets a list of configuration overrides applied on the cluster. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `APPLICATION_ADMINISTRATION` (**Can manage application settings**) privilege is required. This API does not require any parameters to be passed in the request. + */ + public getSystemOverrideInfo(_options?: Configuration): Promise { + const result = this.api.getSystemOverrideInfo(_options); + return result.toPromise(); + } + + /** + * Version: 10.14.0.cl or later Fetch communication channel preferences. - Use `cluster_preferences` to fetch the default preferences for your ThoughtSpot application instance. - If your instance has [Orgs](https://docs.thoughtspot.com/cloud/latest/orgs-overview), use `org_preferences` to fetch any Org-specific preferences that override the defaults. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) or `DEVELOPER` (**Has developer privilege**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, users with `APPLICATION_ADMINISTRATION` (**Can manage application settings**) privilege are also authorized to perform this action. + * @param searchCommunicationChannelPreferencesRequest + */ + public searchCommunicationChannelPreferences(searchCommunicationChannelPreferencesRequest: SearchCommunicationChannelPreferencesRequest, _options?: Configuration): Promise { + const result = this.api.searchCommunicationChannelPreferences(searchCommunicationChannelPreferencesRequest, _options); + return result.toPromise(); + } + + /** + * Version: 26.2.0.cl or later Fetch security settings for your ThoughtSpot application instance. - Use `scope: CLUSTER` to retrieve cluster-level security settings, including CORS and CSP allowlists, SAML redirect URLs, and settings that control access to non-embedded pages. - Use `scope: ORG` to retrieve Org-level security settings. If your instance has [Orgs](https://docs.thoughtspot.com/cloud/latest/orgs-overview), this returns CORS and non-embed access settings specific to the Org. - If `scope` is not specified, returns both cluster and Org-specific settings based on user privileges. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) or `DEVELOPER` (**Has developer privilege**) privilege. See [Security Settings](https://developers.thoughtspot.com/docs/security-settings) for more details. + * @param searchSecuritySettingsRequest + */ + public searchSecuritySettings(searchSecuritySettingsRequest: SearchSecuritySettingsRequest, _options?: Configuration): Promise { + const result = this.api.searchSecuritySettings(searchSecuritySettingsRequest, _options); + return result.toPromise(); + } + + /** + * Version: 9.2.0.cl or later Updates the current configuration of the cluster. You must send the configuration data in JSON format. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privileges. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `APPLICATION_ADMINISTRATION` (**Can manage application settings**) privilege is required. + * @param updateSystemConfigRequest + */ + public updateSystemConfig(updateSystemConfigRequest: UpdateSystemConfigRequest, _options?: Configuration): Promise { + const result = this.api.updateSystemConfig(updateSystemConfigRequest, _options); + return result.toPromise(); + } + + /** + * Version: 26.4.0.cl or later Validates a communication channel configuration to ensure it is properly set up and can receive events. - Use `channel_type` to specify the type of communication channel to validate (e.g., WEBHOOK). - Use `channel_identifier` to provide the unique identifier or name for the communication channel. - Use `event_type` to specify the event type to validate for this channel. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) or `DEVELOPER` (**Has developer privilege**) privilege. For webhook channels, users with `CAN_MANAGE_WEBHOOKS` (**Can manage webhooks**) privilege are also authorized to perform this action. + * @param validateCommunicationChannelRequest + */ + public validateCommunicationChannel(validateCommunicationChannelRequest: ValidateCommunicationChannelRequest, _options?: Configuration): Promise { + const result = this.api.validateCommunicationChannel(validateCommunicationChannelRequest, _options); + return result.toPromise(); + } + + +} + + + +import { ObservableTagsApi } from './ObservableAPI'; + +import { TagsApiRequestFactory, TagsApiResponseProcessor} from "../apis/TagsApi"; +export class PromiseTagsApi { + private api: ObservableTagsApi + + public constructor( + configuration: Configuration, + requestFactory?: TagsApiRequestFactory, + responseProcessor?: TagsApiResponseProcessor + ) { + this.api = new ObservableTagsApi(configuration, requestFactory, responseProcessor); + } + + /** + * Version: 9.0.0.cl or later Assigns tags to Liveboards, Answers, Tables, and Worksheets. Requires edit access to the metadata object. + * @param assignTagRequest + */ + public assignTag(assignTagRequest: AssignTagRequest, _options?: Configuration): Promise { + const result = this.api.assignTag(assignTagRequest, _options); + return result.toPromise(); + } + + /** + * Version: 9.0.0.cl or later Creates a tag object. Tags are labels that identify a metadata object. For example, you can create a tag to designate subject areas, such as sales, HR, marketing, and finance. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `TAGMANAGEMENT` (**Can manage tags**) privilege is required to create, edit, and delete tags. + * @param createTagRequest + */ + public createTag(createTagRequest: CreateTagRequest, _options?: Configuration): Promise { + const result = this.api.createTag(createTagRequest, _options); + return result.toPromise(); + } + + /** + * Version: 9.0.0.cl or later Deletes a tag object from the ThoughtSpot system Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `TAGMANAGEMENT` (**Can manage tags**) privilege is required to create, edit, and delete tags. + * @param tagIdentifier Tag identifier Tag name or Tag id. + */ + public deleteTag(tagIdentifier: string, _options?: Configuration): Promise { + const result = this.api.deleteTag(tagIdentifier, _options); + return result.toPromise(); + } + + /** + * Version: 9.0.0.cl or later Gets a list of tag objects available on the ThoughtSpot system. To get details of a specific tag object, specify the GUID or name. Any authenticated user can search for tag objects. + * @param searchTagsRequest + */ + public searchTags(searchTagsRequest: SearchTagsRequest, _options?: Configuration): Promise> { + const result = this.api.searchTags(searchTagsRequest, _options); + return result.toPromise(); + } + + /** + * Version: 9.0.0.cl or later Removes the tags applied to a Liveboard, Answer, Table, or Worksheet. Requires edit access to the metadata object. + * @param unassignTagRequest + */ + public unassignTag(unassignTagRequest: UnassignTagRequest, _options?: Configuration): Promise { + const result = this.api.unassignTag(unassignTagRequest, _options); + return result.toPromise(); + } + + /** + * Version: 9.0.0.cl or later Updates a tag object. You can modify the `name` and `color` properties of a tag object. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `TAGMANAGEMENT` (**Can manage tags**) privilege is required to create, edit, and delete tags. + * @param tagIdentifier Name or Id of the tag. + * @param updateTagRequest + */ + public updateTag(tagIdentifier: string, updateTagRequest: UpdateTagRequest, _options?: Configuration): Promise { + const result = this.api.updateTag(tagIdentifier, updateTagRequest, _options); + return result.toPromise(); + } + + +} + + + +import { ObservableThoughtSpotRestApi } from './ObservableAPI'; + +import { ThoughtSpotRestApiRequestFactory, ThoughtSpotRestApiResponseProcessor} from "../apis/ThoughtSpotRestApi"; +export class PromiseThoughtSpotRestApi { + private api: ObservableThoughtSpotRestApi + + public constructor( + configuration: Configuration, + requestFactory?: ThoughtSpotRestApiRequestFactory, + responseProcessor?: ThoughtSpotRestApiResponseProcessor + ) { + this.api = new ObservableThoughtSpotRestApi(configuration, requestFactory, responseProcessor); + } + + /** + * Version: 9.7.0.cl or later Activates a deactivated user account. Requires `ADMINISTRATION` (**Can administer Thoughtspot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `USER_ADMINISTRATION` (**Can manage users**) privilege is required. To activate an inactive user account, the API request body must include the following information: - Username or the GUID of the user account. - Auth token generated for the deactivated user. The auth token is sent in the API response when a user is deactivated. - Password for the user account. + * @param activateUserRequest + */ + public activateUser(activateUserRequest: ActivateUserRequest, _options?: Configuration): Promise { + const result = this.api.activateUser(activateUserRequest, _options); + return result.toPromise(); + } + + /** + * Version: 9.0.0.cl or later Transfers the ownership of one or several objects from one user to another. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `USER_ADMINISTRATION` (**Can manage users**) privilege and edit access to the objects are required. + * @param assignChangeAuthorRequest + */ + public assignChangeAuthor(assignChangeAuthorRequest: AssignChangeAuthorRequest, _options?: Configuration): Promise { + const result = this.api.assignChangeAuthor(assignChangeAuthorRequest, _options); + return result.toPromise(); + } + + /** + * Version: 9.0.0.cl or later Assigns tags to Liveboards, Answers, Tables, and Worksheets. Requires edit access to the metadata object. + * @param assignTagRequest + */ + public assignTag(assignTagRequest: AssignTagRequest, _options?: Configuration): Promise { + const result = this.api.assignTag(assignTagRequest, _options); + return result.toPromise(); + } + + /** + * Version: 9.0.0.cl or later Updates the current password of the user. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `USER_ADMINISTRATION` (**Can manage users**) privilege is required. + * @param changeUserPasswordRequest + */ + public changeUserPassword(changeUserPasswordRequest: ChangeUserPasswordRequest, _options?: Configuration): Promise { + const result = this.api.changeUserPassword(changeUserPasswordRequest, _options); + return result.toPromise(); + } + + /** + * Version: 9.2.0.cl or later Commits TML files of metadata objects to the Git branch configured on your instance. Requires at least edit access to objects used in the commit operation. Before using this endpoint to push your commits: * Enable Git integration on your instance. * Make sure the Git repository and branch details are configured on your instance. For more information, see [Git integration documentation](https://developers.thoughtspot.com/docs/git-integration). + * @param commitBranchRequest + */ + public commitBranch(commitBranchRequest: CommitBranchRequest, _options?: Configuration): Promise { + const result = this.api.commitBranch(commitBranchRequest, _options); + return result.toPromise(); + } + + /** + * Version: 26.6.0.cl or later Enables or disables authentication at cluster or org level for the specified auth type. Currently supports `TRUSTED_AUTH`. #### Required privileges Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) or `CONTROL_TRUSTED_AUTH` (**Can Enable or Disable Trusted Authentication**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled, the `CONTROL_TRUSTED_AUTH` privilege is required. #### Usage guidelines Use `cluster_preferences` to enable or disable authentication at the cluster level. Cluster-level settings can only be configured from the Primary Org. - `ENABLED` — Generates a new access token if one does not exist. An existing token is preserved. - `DISABLED` — Revokes the existing cluster-level access token. Use `org_preferences` to enable or disable authentication for one or more Orgs. Each entry must include an `org_identifier` (unique ID or name) and an `auth_status`. Org-level configuration requires the per-Org authentication feature to be enabled on your instance. - `ENABLED` — Generates a new org-level access token if one does not exist. - `DISABLED` — Revokes the existing org-level access token for that Org. Both `cluster_preferences` and `org_preferences` are optional. Omitting a field leaves the corresponding settings unchanged. If both are omitted, the API returns `204 No Content` without making any changes. **Note**: Cluster-level and org-level settings are independent of each other. Enabling or disabling one does not affect the other. + * @param configureAuthSettingsRequest + */ + public configureAuthSettings(configureAuthSettingsRequest: ConfigureAuthSettingsRequest, _options?: Configuration): Promise { + const result = this.api.configureAuthSettings(configureAuthSettingsRequest, _options); + return result.toPromise(); + } + + /** + * Version: 10.14.0.cl or later Configure communication channel preferences. - Use `cluster_preferences` to update the default preferences for your ThoughtSpot application instance. - If your instance has [Orgs](https://docs.thoughtspot.com/cloud/latest/orgs-overview), use `org_preferences` to specify Org-specific preferences that override the defaults. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) or `DEVELOPER` (**Has developer privilege**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, users with `APPLICATION_ADMINISTRATION` (**Can manage application settings**) privilege are also authorized to perform this action. + * @param configureCommunicationChannelPreferencesRequest + */ + public configureCommunicationChannelPreferences(configureCommunicationChannelPreferencesRequest: ConfigureCommunicationChannelPreferencesRequest, _options?: Configuration): Promise { + const result = this.api.configureCommunicationChannelPreferences(configureCommunicationChannelPreferencesRequest, _options); + return result.toPromise(); + } + + /** + * Version: 26.2.0.cl or later Configure security settings for your ThoughtSpot application instance. - Use `cluster_preferences` to update cluster-level security settings including CORS whitelisted URLs, CSP settings, SAML redirect URLs, partitioned cookies, and non-embed access configuration. - Use `org_preferences` to configure Org-specific security settings. If your instance has [Orgs](https://docs.thoughtspot.com/cloud/latest/orgs-overview), this allows configuring CORS and non-embed access settings specific to the Org. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) or `DEVELOPER` (**Has developer privilege**) privilege. Cluster-level SAML and script-src settings require `ADMINISTRATION` privilege. See [Security Settings](https://developers.thoughtspot.com/docs/security-settings) for more details. + * @param configureSecuritySettingsRequest + */ + public configureSecuritySettings(configureSecuritySettingsRequest: ConfigureSecuritySettingsRequest, _options?: Configuration): Promise { + const result = this.api.configureSecuritySettings(configureSecuritySettingsRequest, _options); + return result.toPromise(); + } + + /** + * Version: 10.12.0.cl or later Gets connection configuration objects. Requires `DATAMANAGEMENT` (**Can manage data**) and edit permissions to the connection object, or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) privilege is required. #### Usage guidelines * To get a list of all configurations available in the ThoughtSpot system, send the API request with only the connection name or GUID in the request body. * To fetch details of a configuration object, specify the configuration object name or GUID. + * @param connectionConfigurationSearchRequest + */ + public connectionConfigurationSearch(connectionConfigurationSearchRequest: ConnectionConfigurationSearchRequest, _options?: Configuration): Promise> { + const result = this.api.connectionConfigurationSearch(connectionConfigurationSearchRequest, _options); + return result.toPromise(); + } + + /** + * Convert worksheets to models Version: 10.6.0.cl or later ## Prerequisites - **Privileges Required:** - `DATAMANAGEMENT` (Can manage data) or `ADMINISTRATION` (Can administer ThoughtSpot). - **Additional Privileges (if RBAC is enabled):** - `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` (Can manage data models). --- ## Usage Guidelines ### Parameters 1. **worksheet_ids** - **Description:** A comma-separated list of GUIDs (Globally Unique Identifiers) specifying the Worksheets to be converted. - **Usage:** - Used only when `convert_all` is set to `false`. - Leave empty or omit when `convert_all` is set to `true`. 2. **exclude_worksheet_ids** - **Description:** A comma-separated list of GUIDs specifying Worksheets to be excluded from conversion. - **Usage:** - Useful when `convert_all` is set to `true` and specific Worksheets should not be converted. 3. **convert_all** - **Description:** Sets the scope of conversion. - **Options:** - `true`: Converts all Worksheets in the system, except those specified in `exclude_worksheet_ids`. - `false`: Converts only the Worksheets listed in `worksheet_ids`. 4. **apply_changes** - **Description:** Specifies whether to apply changes directly to ThoughtSpot or to generate a preview before applying any changes.Used for validation of conversion. - **Options:** - `true`: Applies conversion changes directly to ThoughtSpot. - `false`: Generates only a preview of the changes and does not apply any changes to ThoughtSpot --- ## Best Practices 1. **Backup Before Conversion:** Always export metadata as a backup before initiating the conversion process 2. **Partial Conversion for Testing:** Test the conversion process by setting `convert_all` to `false` and specifying a small number of `worksheet_ids`. 3. **Verify Dependencies:** Check for dependent objects, such as Tables and Connections, to avoid invalid references. 4. **Review Changes:** Use `apply_changes: false` to preview the impact of the conversion before applying changes. --- ## Examples ### Convert Specific Worksheets ```json { \"worksheet_ids\": [\"guid1\", \"guid2\", \"guid3\"], \"exclude_worksheet_ids\": [], \"convert_all\": false, \"apply_changes\": true } ``` ### Convert All Accessible Worksheets ```json { \"worksheet_ids\": [], \"exclude_worksheet_ids\": [], \"convert_all\": true, \"apply_changes\": true } ``` ### Exclude Specific Worksheets While Converting All Accessible Worksheets ```json { \"worksheet_ids\": [], \"exclude_worksheet_ids\": [\"abc\"], \"convert_all\": true, \"apply_changes\": true } ``` + * @param convertWorksheetToModelRequest + */ + public convertWorksheetToModel(convertWorksheetToModelRequest: ConvertWorksheetToModelRequest, _options?: Configuration): Promise { + const result = this.api.convertWorksheetToModel(convertWorksheetToModelRequest, _options); + return result.toPromise(); + } + + /** + * Makes a copy of an Answer or Liveboard Version: 10.3.0.cl or later Creates a copy of a metadata object. Requires at least view access to the metadata object being copied. Upon successful execution, the API creates a copy of the metadata object specified in the API request and returns the ID of the new object. + * @param copyObjectRequest + */ + public copyObject(copyObjectRequest: CopyObjectRequest, _options?: Configuration): Promise { + const result = this.api.copyObject(copyObjectRequest, _options); + return result.toPromise(); + } + + /** + * Version: 26.2.0.cl or later Creates a new Spotter agent conversation based on the provided context and settings. The endpoint was in Beta from 26.2.0.cl through 26.4.0.cl. Requires `CAN_USE_SPOTTER` privilege and at least view access to the metadata object specified in the request. #### Usage guidelines The request must include the `metadata_context` parameter to define the conversation context. The context type can be one of: - `DATA_SOURCE` *(available from 26.5.0.cl)*: targets a specific data source. Provide `data_source_identifier` in `data_source_context` for a single data source, or `data_source_identifiers` for multi-data-source context. The deprecated `guid` field is accepted for backwards compatibility. - `AUTO_MODE` *(available from 26.5.0.cl)*: automatically discovers and selects the most relevant datasets for the user\'s queries. > **Note for callers on versions 26.2.0.cl – 26.4.0.cl (Beta):** use the lowercase `data_source` enum value with the `guid` field instead of the above. Example: `{ \"type\": \"data_source\", \"data_source_context\": { \"guid\": \"\" } }`. The `conversation_settings` parameter controls which Spotter capabilities are enabled for the conversation: - `enable_contextual_change_analysis` (default: `true`, **deprecated from 26.2.0.cl**) — always enabled in Spotter 3; setting this to `false` has no effect on versions >= 26.2.0.cl - `enable_natural_language_answer_generation` (default: `true`, **deprecated from 26.2.0.cl**) — always enabled in Spotter 3; setting this to `false` has no effect on versions >= 26.2.0.cl - `enable_reasoning` (default: `true`, **deprecated from 26.2.0.cl**) — always enabled in Spotter 3; setting this to `false` has no effect on versions >= 26.2.0.cl - `enable_save_chat` (default: `false`, *available from 26.5.0.cl*) — enables saving the conversation for later retrieval via conversation history If the request is successful, the response includes a unique `conversation_identifier` that must be passed to `sendAgentConversationMessage` or `sendAgentConversationMessageStreaming` to send messages within this conversation. The response also includes `conversation_id` with the same value for backwards compatibility; use `conversation_identifier` for new integrations. #### Example request ```json { \"metadata_context\": { \"type\": \"DATA_SOURCE\", \"data_source_context\": { \"data_source_identifier\": \"a1b2c3d4-e5f6-7890-abcd-ef1234567890\" } }, \"conversation_settings\": {} } ``` #### Error responses | Code | Description | | ---- | --------------------------------------------------------------------------------------------------------------------------------------- | | 401 | Unauthorized — authentication token is missing, expired, or invalid. | | 403 | Forbidden — the authenticated user does not have `CAN_USE_SPOTTER` privilege or lacks view permission on the specified metadata object. | > ###### Note: > > - This endpoint was in Beta from 26.2.0.cl through 26.4.0.cl and is Generally Available from version 26.5.0.cl. > - This endpoint requires Spotter - please contact ThoughtSpot support to enable Spotter on your cluster. + * @param createAgentConversationRequest + */ + public createAgentConversation(createAgentConversationRequest: CreateAgentConversationRequest, _options?: Configuration): Promise { + const result = this.api.createAgentConversation(createAgentConversationRequest, _options); + return result.toPromise(); + } + + /** + * Version: 10.12.0.cl or later Creates a new [custom calendar](https://docs.thoughtspot.com/cloud/latest/connections-cust-cal). Requires `DATAMANAGEMENT` (**Can manage data**) or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your ThoughtSpot instance, the `CAN_MANAGE_CUSTOM_CALENDAR` (**Can manage custom calendars**) privilege is required. #### Usage guidelines You can create a custom calendar from scratch or an existing Table in ThoughtSpot. For both methods of calendar creation, the following parameters are required: * Name of the custom calendar. * Calendar creation method. To create a calendar from an existing table, specify the method: - `FROM_EXISTING_TABLE` - Creates calendar from the table reference provided in the API request. - `FROM_INPUT_PARAMS` - Creates a calendar from the parameters defined in the API request. * Connection ID and Table name * Database and schema name attributes: For most Cloud Data Warehouse (CDW) connectors, both `database_name` and `schema_name` attributes are required. However, the attribute requirements are conditional and vary based on the connector type and its metadata structure. For example, for connectors such as Teradata, MySQL, SingleSore, Amazon Aurora MySQL, Amazon RDS MySQL, Oracle, and GCP_MYSQL, the `schema_name` is required, whereas the `database_name` attribute is not. Similarly, connectors such as ClickHouse require you to specify the `database_name` and the schema specification in such cases is optional. **NOTE**: If you are creating a calendar from an existing table, ensure that the referenced table matches the required DDL for custom calendars. If the schema does not match, the API returns an error. ##### Calendar type The API allows you to create the following types of calendars: * `MONTH_OFFSET`. The default calendar type. A `MONTH_OFFSET` calendar is offset by a few months from the standard calendar months (January to December) and the year begins with the month defined in the request. For example, if the `month_offset` value is set as `April`, the calendar year begins in April. * `4-4-5`. Each quarter in the calendar will include two 4-week months followed by one 5-week month. * `4-5-4`. Each quarter in the calendar will include two 4-week months with a 5-week month between. * `5-4-4`. Each quarter begins with a 5-week month, followed by two 4-week months. To start and end the calendar on a specific date, specify the dates in the `MM/DD/YYYY` format. For `MONTH_OFFSET` calendars, ensure that the `start_date` matches the month specified in the `month_offset` attribute. You can also set the starting day of the week and customize the prefixes for year and quarter labels. #### Examples To create a calendar from an existing table: ``` { \"name\": \"MyCustomCalendar1\", \"table_reference\": { \"connection_identifier\": \"4db8ea22-2ff4-4224-b05a-26674717e468\", \"table_name\": \"MyCalendarTable\", \"database_name\": \"RETAILAPPAREL\", \"schema_name\": \"PUBLIC\" }, \"creation_method\": \"FROM_EXISTING_TABLE\", } ``` To create a calendar from scratch: ``` { \"name\": \"MyCustomCalendar1\", \"table_reference\": { \"connection_identifier\": \"4db8ea22-2ff4-4224-b05a-26674717e468\", \"table_name\": \"MyCalendarTable\", \"database_name\": \"RETAILAPPAREL\", \"schema_name\": \"PUBLIC\" }, \"creation_method\": \"FROM_INPUT_PARAMS\", \"calendar_type\": \"MONTH_OFFSET\", \"month_offset\": \"April\", \"start_day_of_week\": \"Monday\", \"quarter_name_prefix\": \"Q\", \"year_name_prefix\": \"FY\", \"start_date\": \"04/01/2025\", \"end_date\": \"04/31/2025\" } ``` + * @param createCalendarRequest + */ + public createCalendar(createCalendarRequest: CreateCalendarRequest, _options?: Configuration): Promise { + const result = this.api.createCalendar(createCalendarRequest, _options); + return result.toPromise(); + } + + /** + * Version: 26.4.0.cl or later Creates a new collection in ThoughtSpot. Collections allow you to organize and group related metadata objects such as Liveboards, Answers, worksheets, and other data objects. You can also create nested collections (sub-collections) to build a hierarchical structure. #### Supported operations The API endpoint lets you perform the following operations: * Create a new collection * Add metadata objects (Liveboards, Answers, Logical Tables) to the collection * Create nested collections by adding sub-collections + * @param createCollectionRequest + */ + public createCollection(createCollectionRequest: CreateCollectionRequest, _options?: Configuration): Promise { + const result = this.api.createCollection(createCollectionRequest, _options); + return result.toPromise(); + } + + /** + * Version: 9.2.0.cl or later Allows you to connect a ThoughtSpot instance to a Git repository. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance on your instance, the `CAN_SETUP_VERSION_CONTROL` (**Can set up version control**) privilege. You can use this API endpoint to connect your ThoughtSpot development and production environments to the development and production branches of a Git repository. Before using this endpoint to connect your ThoughtSpot instance to a Git repository, check the following prerequisites: * You have a Git repository. If you are using GitHub, make sure you have a valid account and an access token to connect ThoughtSpot to GitHub. For information about generating a token, see [GitHub Documentation](https://docs.github.com/en/authentication/keeping-your-account-and-data-secure/managing-your-personal-access-tokens). * Your access token has `repo` scope that grants full access to public and private repositories. * Your Git repository has a branch that can be configured as a default branch in ThoughtSpot. For more information, see [Git integration documentation](https://developers.thoughtspot.com/docs/?pageid=git-integration). **Note**: ThoughtSpot supports only GitHub / itHub Enterprise for CI/CD. + * @param createConfigRequest + */ + public createConfig(createConfigRequest: CreateConfigRequest, _options?: Configuration): Promise { + const result = this.api.createConfig(createConfigRequest, _options); + return result.toPromise(); + } + + /** + * Version: 9.2.0.cl or later Creates a connection to a data warehouse for live query services. Requires `DATAMANAGEMENT` (**Can manage data**) or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) privilege is required. #### Create a connection without tables To create a connection without tables: 1. Pass these parameters in your API request. * Name of the connection. * Type of the data warehouse to connect to. * A JSON map of configuration attributes in `data_warehouse_config`. The following example shows the configuration attributes for a SnowFlake connection: ``` { \"configuration\":{ \"accountName\":\"thoughtspot_partner\", \"user\":\"tsadmin\", \"password\":\"TestConn123\", \"role\":\"sysadmin\", \"warehouse\":\"MEDIUM_WH\" }, \"authenticationType\": \"SERVICE_ACCOUNT\", \"externalDatabases\":[ ] } ``` 2. Set `validate` to `false`. **NOTE:** If the `authentication_type` is anything other than SERVICE_ACCOUNT, you must explicitly provide the authenticationType property in the payload. If you do not specify authenticationType, the API will default to SERVICE_ACCOUNT as the authentication type. #### Create a connection with tables If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) and `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` (**Can manage data models**) privilege is required. To create a connection with tables: 1. Pass these parameters in your API request. * Name of the connection. * Type of the data warehouse to connect to. * A JSON map of configuration attributes, database details, and table properties in `data_warehouse_config` as shown in the following example: ``` { \"configuration\":{ \"accountName\":\"thoughtspot_partner\", \"user\":\"tsadmin\", \"password\":\"TestConn123\", \"role\":\"sysadmin\", \"warehouse\":\"MEDIUM_WH\" }, \"authenticationType\": \"SERVICE_ACCOUNT\", \"externalDatabases\":[ { \"name\":\"AllDatatypes\", \"isAutoCreated\":false, \"schemas\":[ { \"name\":\"alldatatypes\", \"tables\":[ { \"name\":\"allDatatypes\", \"type\":\"TABLE\", \"description\":\"\", \"selected\":true, \"linked\":true, \"columns\":[ { \"name\":\"CNUMBER\", \"type\":\"INT64\", \"canImport\":true, \"selected\":true, \"isLinkedActive\":true, \"isImported\":false, \"tableName\":\"allDatatypes\", \"schemaName\":\"alldatatypes\", \"dbName\":\"AllDatatypes\" }, { \"name\":\"CDECIMAL\", \"type\":\"INT64\", \"canImport\":true, \"selected\":true, \"isLinkedActive\":true, \"isImported\":false, \"tableName\":\"allDatatypes\", \"schemaName\":\"alldatatypes\", \"dbName\":\"AllDatatypes\" } ] } ] } ] } ] } ``` 2. Set `validate` to `true`. **NOTE:** If the `authentication_type` is anything other than SERVICE_ACCOUNT, you must explicitly provide the authenticationType property in the payload. If you do not specify authenticationType, the API will default to SERVICE_ACCOUNT as the authentication type. + * @param createConnectionRequest + */ + public createConnection(createConnectionRequest: CreateConnectionRequest, _options?: Configuration): Promise { + const result = this.api.createConnection(createConnectionRequest, _options); + return result.toPromise(); + } + + /** + * Version: 10.12.0.cl or later Creates an additional configuration to an existing connection to a data warehouse. Requires `DATAMANAGEMENT` (**Can manage data**) or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) privilege is required. #### Usage guidelines * A JSON map of configuration attributes in `configuration`. The following example shows the configuration attributes: ``` { \"user\":\"DEV_USER\", \"password\":\"TestConn123\", \"role\":\"DEV\", \"warehouse\":\"DEV_WH\" } ``` * If the `policy_type` is `PRINCIPALS`, then `policy_principals` is a required field. * If the `policy_type` is `PROCESSES`, then `policy_processes` is a required field. * If the `policy_type` is `NO_POLICY`, then `policy_principals` and `policy_processes` are not required fields. #### Parameterized Connection Support For parameterized connections that use OAuth authentication, only the same_as_parent and policy_process_options attributes are allowed in the API request. These attributes are not applicable to connections that are not parameterized. + * @param createConnectionConfigurationRequest + */ + public createConnectionConfiguration(createConnectionConfigurationRequest: CreateConnectionConfigurationRequest, _options?: Configuration): Promise { + const result = this.api.createConnectionConfiguration(createConnectionConfigurationRequest, _options); + return result.toPromise(); + } + + /** + * Version: 10.4.0.cl or later Creates a new conversation session tied to a specific data model for AI-driven natural language querying. Requires `CAN_USE_SPOTTER` privilege and at least view access to the metadata object specified in the request. #### Usage guidelines The request must include: - `metadata_identifier`: the unique ID of the data source that provides context for the conversation Optionally, you can provide: - `tokens`: a token string to set initial context for the conversation (e.g., `\"[sales],[item type],[state]\"`) If the request is successful, ThoughtSpot returns a unique `conversation_identifier` that must be passed to `sendMessage` to continue the conversation. #### Error responses | Code | Description | |------|-------------| | 401 | Unauthorized — authentication token is missing, expired, or invalid. | | 403 | Forbidden — the authenticated user does not have `CAN_USE_SPOTTER` privilege or lacks view permission on the specified metadata object. | > ###### Note: > * This endpoint is currently in Beta. Breaking changes may be introduced before the endpoint is made Generally Available. > * This endpoint requires Spotter - please contact ThoughtSpot support to enable Spotter on your cluster. + * @param createConversationRequest + */ + public createConversation(createConversationRequest: CreateConversationRequest, _options?: Configuration): Promise { + const result = this.api.createConversation(createConversationRequest, _options); + return result.toPromise(); + } + + /** + * Version: 9.6.0.cl or later Creates a custom action that appears as a menu action on a saved Answer or Liveboard visualization. Requires `DEVELOPER` (**Has Developer privilege**) or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `DEVELOPER` (**Has developer privilege**) privilege is required. #### Usage Guidelines The API lets you create the following types of custom actions: * URL-based action Allows pushing data to an external URL. * Callback action Triggers a callback to the host application and initiates a response payload on an embedded ThoughtSpot instance. By default, custom actions are visible to only administrator or developer users. To make a custom action available to other users, and specify the groups in `group_identifiers`. By default, the custom action is set as a _global_ action on all visualizations and saved Answers. To assign a custom action to specific Liveboard visualization, saved Answer, or Worksheet, set `visibility` to `false` in `default_action_config` property and specify the GUID or name of the object in `associate_metadata`. For more information, see [Custom actions](https://developers.thoughtspot.com/docs/custom-action-intro). + * @param createCustomActionRequest + */ + public createCustomAction(createCustomActionRequest: CreateCustomActionRequest, _options?: Configuration): Promise { + const result = this.api.createCustomAction(createCustomActionRequest, _options); + return result.toPromise(); + } + + /** + * Version: 10.10.0.cl or later Creates a customization configuration for the notification email. #### Pre-requisites Requires `DEVELOPER` (**has developer privilege**) or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `DEVELOPER` (**Has developer privilege**) privilege is required. **NOTE**:This endpoint in currently in beta. Contact ThoughtSpot support to enable this on your instance. #### Usage guidelines To create a custom configuration pass these parameters in your API request: - A JSON map of configuration attributes `template_properties`. The following example shows a sample set of customization configuration: ``` { { \"cta_button_bg_color\": \"#444DEA\", \"cta_text_font_color\": \"#FFFFFF\", \"primary_bg_color\": \"#D3DEF0\", \"logo_url\": \"https://storage.pardot.com/710713/1642089901EbkRibJq/TS_fullworkmark_darkmode.png\", \"font_family\": \"\", \"product_name\": \"ThoughtSpot\", \"footer_address\": \"444 Castro St, Suite 1000 Mountain View, CA 94041\", \"footer_phone\": \"(800) 508-7008\", \"replacement_value_for_liveboard\": \"Dashboard\", \"replacement_value_for_answer\": \"Chart\", \"replacement_value_for_spot_iq\": \"AI Insights\", \"hide_footer_phone\": false, \"hide_footer_address\": false, \"hide_product_name\": false, \"hide_manage_notification\": false, \"hide_mobile_app_nudge\": false, \"hide_privacy_policy\": false, \"hide_ts_vocabulary_definitions\": false, \"hide_error_message\": false, \"hide_unsubscribe_link\": false, \"hide_notification_status\": false, \"hide_modify_alert\": false, \"company_website_url\": \"https://your-website.com/\", \"company_privacy_policy_url\" : \"https://link-to-privacy-policy.com/\", \"contact_support_url\": \"https://link-to-contact-support.com/\", \"hide_contact_support_url\": false, \"hide_logo_url\" : false } } ``` + * @param createEmailCustomizationRequest + */ + public createEmailCustomization(createEmailCustomizationRequest: CreateEmailCustomizationRequest, _options?: Configuration): Promise { + const result = this.api.createEmailCustomization(createEmailCustomizationRequest, _options); + return result.toPromise(); + } + + /** + * Version: 9.0.0.cl or later Creates an Org object. To use this API, the [Orgs](https://docs.thoughtspot.com/cloud/latest/orgs-overview) feature must be enabled in your cluster. Requires cluster administration (**Can administer Org**) privileges. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `ORG_ADMINISTRATION` (**Can manage Orgs**) privilege is required. + * @param createOrgRequest + */ + public createOrg(createOrgRequest: CreateOrgRequest, _options?: Configuration): Promise { + const result = this.api.createOrg(createOrgRequest, _options); + return result.toPromise(); + } + + /** + * Version: 9.5.0.cl or later Creates a Role object in ThoughtSpot. Available only if [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance. To create a Role, the `ROLE_ADMINISTRATION` (**Can manage roles**) privilege is required. + * @param createRoleRequest + */ + public createRole(createRoleRequest: CreateRoleRequest, _options?: Configuration): Promise { + const result = this.api.createRole(createRoleRequest, _options); + return result.toPromise(); + } + + /** + * Create schedule. Version: 9.4.0.cl or later Creates a Liveboard schedule job. Requires at least edit access to Liveboards. To create a schedule on behalf of another user, you need `ADMINISTRATION` (**Can administer Org**) or `JOBSCHEDULING` (**Can schedule for others**) privilege and edit access to the Liveboard. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `JOBSCHEDULING` (**Can schedule for others**) privilege is required. #### Usage guidelines * The description text is mandatory. The description text appears as **Description: ** in the Liveboard schedule email notifications. * For Liveboards with both charts and tables, schedule creation is only supported in PDF and XLS formats. Schedules created in CSV formats for such Liveboards will fail to run. If `PDF` is set as the `file_format`, enable `pdf_options` to get the correct attachment. Not doing so may cause the attachment to be rendered empty. * To include only specific visualizations, specify the visualization GUIDs in the `visualization_identifiers` array. * You can schedule a Liveboard job to run periodically by setting frequency parameters. You can set the schedule to run daily, weekly, monthly or every n minutes or hours. The scheduled job can also be configured to run at a specific time of the day or on specific days of the week or month. Please ensure that when setting the schedule frequency for _minute of the object_, only values that are multiples of 5 are included. * If the `frequency` parameters are defined, you can set the time zone to a value that matches your server\'s time zone. For example, `US/Central`, `Etc/UTC`, `CET`. The default time zone is `America/Los_Angeles`. For more information about Liveboard jobs, see [ThoughtSpot Product Documentation](https://docs.thoughtspot.com/cloud/latest/liveboard-schedule). + * @param createScheduleRequest + */ + public createSchedule(createScheduleRequest: CreateScheduleRequest, _options?: Configuration): Promise { + const result = this.api.createSchedule(createScheduleRequest, _options); + return result.toPromise(); + } + + /** + * Version: 9.0.0.cl or later Creates a tag object. Tags are labels that identify a metadata object. For example, you can create a tag to designate subject areas, such as sales, HR, marketing, and finance. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `TAGMANAGEMENT` (**Can manage tags**) privilege is required to create, edit, and delete tags. + * @param createTagRequest + */ + public createTag(createTagRequest: CreateTagRequest, _options?: Configuration): Promise { + const result = this.api.createTag(createTagRequest, _options); + return result.toPromise(); + } + + /** + * Version: 9.0.0.cl or later Creates a user in ThoughtSpot. The API endpoint allows you to configure several user properties such as email address, account status, share notification preferences, and sharing visibility. You can provision the user to [groups](https://docs.thoughtspot.com/cloud/latest/groups-privileges) and [Orgs](https://docs.thoughtspot.com/cloud/latest/orgs-overview). You can also add Liveboard, Answer, and Worksheet objects to the user’s favorites list, assign a default Liveboard for the user, and set user preferences. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `USER_ADMINISTRATION` (**Can manage users**) privilege is required. + * @param createUserRequest + */ + public createUser(createUserRequest: CreateUserRequest, _options?: Configuration): Promise { + const result = this.api.createUser(createUserRequest, _options); + return result.toPromise(); + } + + /** + * Version: 9.0.0.cl or later Creates a group object in ThoughtSpot. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `GROUP_ADMINISTRATION` (**Can manage groups**) privilege is required. #### About groups Groups in ThoughtSpot are used by the administrators to define privileges and organize users based on their roles and access requirements. To know more about groups and privileges, see [ThoughtSpot Product Documentation](https://docs.thoughtspot.com/cloud/latest/groups-privileges). #### Supported operations The API endpoint lets you perform the following operations: * Assign privileges * Add users * Define sharing visibility * Add sub-groups * Assign a default Liveboard + * @param createUserGroupRequest + */ + public createUserGroup(createUserGroupRequest: CreateUserGroupRequest, _options?: Configuration): Promise { + const result = this.api.createUserGroup(createUserGroupRequest, _options); + return result.toPromise(); + } + + /** + * Create a variable which can be used for parameterizing metadata objects Version: 26.4.0.cl or later Allows creating a variable which can be used for parameterizing metadata objects in ThoughtSpot. Requires ADMINISTRATION role and TENANT scope. The CAN_MANAGE_VARIABLES permission allows you to manage Formula Variables in the current organization scope. The API endpoint supports the following types of variables: * CONNECTION_PROPERTY - For connection properties * TABLE_MAPPING - For table mappings * CONNECTION_PROPERTY_PER_PRINCIPAL - For connection properties per principal. In order to use this please contact support to enable this. * FORMULA_VARIABLE - For Formula variables, introduced in 10.15.0.cl When creating a variable, you need to specify: * The variable type * A unique name for the variable * Whether the variable contains sensitive values (defaults to false) * The data type of the variable, only specify for formula variables (defaults to null) The operation will fail if: * The user lacks required permissions * The variable name already exists * The variable type is invalid + * @param createVariableRequest + */ + public createVariable(createVariableRequest: CreateVariableRequest, _options?: Configuration): Promise { + const result = this.api.createVariable(createVariableRequest, _options); + return result.toPromise(); + } + + /** + * Version: 10.14.0.cl or later Creates a new webhook configuration to receive notifications for specified events. The webhook will be triggered when the configured events occur in the system. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) or `DEVELOPER` (**Has developer privilege**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, users with `CAN_MANAGE_WEBHOOKS` (**Can manage webhooks**) privilege are also authorized to perform this action. + * @param createWebhookConfigurationRequest + */ + public createWebhookConfiguration(createWebhookConfigurationRequest: CreateWebhookConfigurationRequest, _options?: Configuration): Promise { + const result = this.api.createWebhookConfiguration(createWebhookConfigurationRequest, _options); + return result.toPromise(); + } + + /** + * Version: 9.9.0.cl or later Creates a DBT connection object in ThoughtSpot. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege or `DATAMANAGEMENT` (**Can manage data**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the following Data control privileges may be required: - `CAN_MANAGE_CUSTOM_CALENDAR`(**Can manage custom calendars**) - `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) - `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` (**Can manage data models**) #### About create DBT connection DBT connection in ThoughtSpot is used by the user to define DBT credentials for cloud . The API needs embrace connection, embrace database name, DBT url, import type, DBT account identifier, DBT project identifier, DBT access token and environment details (or) embrace connection, embrace database name, import type, file_content to create a connection object. To know more about DBT, see ThoughtSpot Product Documentation. + * @param connectionName Name of the connection. + * @param databaseName Name of the Database. + * @param importType Mention type of Import + * @param accessToken Access token is mandatory when Import_Type is DBT_CLOUD. + * @param dbtUrl DBT URL is mandatory when Import_Type is DBT_CLOUD. + * @param accountId Account ID is mandatory when Import_Type is DBT_CLOUD + * @param projectId Project ID is mandatory when Import_Type is DBT_CLOUD + * @param dbtEnvId DBT Environment ID\\\" + * @param projectName Name of the project + * @param fileContent Upload DBT Manifest and Catalog artifact files as a ZIP file. This field is Mandatory when Import Type is \\\'ZIP_FILE\\\' + */ + public dbtConnection(connectionName: string, databaseName: string, importType?: string, accessToken?: string, dbtUrl?: string, accountId?: string, projectId?: string, dbtEnvId?: string, projectName?: string, fileContent?: HttpFile, _options?: Configuration): Promise { + const result = this.api.dbtConnection(connectionName, databaseName, importType, accessToken, dbtUrl, accountId, projectId, dbtEnvId, projectName, fileContent, _options); + return result.toPromise(); + } + + /** + * Version: 9.9.0.cl or later Resynchronize the existing list of models, tables, worksheet tml’s and import them to Thoughtspot based on the DBT connection object. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege or `DATAMANAGEMENT` (**Can manage data**) privilege, along with an existing DBT connection. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the following data control privileges may be required: - `CAN_MANAGE_CUSTOM_CALENDAR`(**Can manage custom calendars**) - `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) - `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` (**Can manage data models**) + * @param dbtConnectionIdentifier Unique ID of the DBT connection. + * @param fileContent Upload DBT Manifest and Catalog artifact files as a ZIP file. This field is mandatory if the connection was created with import_type ‘ZIP_FILE’ + */ + public dbtGenerateSyncTml(dbtConnectionIdentifier: string, fileContent?: HttpFile, _options?: Configuration): Promise { + const result = this.api.dbtGenerateSyncTml(dbtConnectionIdentifier, fileContent, _options); + return result.toPromise(); + } + + /** + * Version: 9.9.0.cl or later Generate required table and worksheet and import them. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege or `DATAMANAGEMENT` (**Can manage data**) privilege, along with an existing DBT connection. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the following data control privileges may be required: - `CAN_MANAGE_CUSTOM_CALENDAR`(**Can manage custom calendars**) - `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) - `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` (**Can manage data models**) #### About generate TML Models and Worksheets to be imported can be selected by the user as part of the API. + * @param dbtConnectionIdentifier Unique ID of the DBT connection. + * @param modelTables List of Models and their respective Tables Example: \\\'[{\\\"model_name\\\": \\\"model_name\\\", \\\"tables\\\": [\\\"table_name\\\"]}]\\\' + * @param importWorksheets Mention the worksheet tmls to import + * @param worksheets List of worksheets is mandatory when import_Worksheets is type SELECTED Example: [\\\"worksheet_name\\\"] + * @param fileContent Upload DBT Manifest and Catalog artifact files as a ZIP file. This field is mandatory if the connection was created with import_type ‘ZIP_FILE’ + */ + public dbtGenerateTml(dbtConnectionIdentifier: string, modelTables: string, importWorksheets: string, worksheets?: string, fileContent?: HttpFile, _options?: Configuration): Promise { + const result = this.api.dbtGenerateTml(dbtConnectionIdentifier, modelTables, importWorksheets, worksheets, fileContent, _options); + return result.toPromise(); + } + + /** + * Version: 9.9.0.cl or later Gets a list of DBT connection objects by user and organization, available on the ThoughtSpot system. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege or `DATAMANAGEMENT` (**Can manage data**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the following Data control privileges may be required: - `CAN_MANAGE_CUSTOM_CALENDAR`(**Can manage custom calendars**) - `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) - `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` (**Can manage data models**) #### About search DBT connection To get details of a specific DBT connection identifier, database connection identifier, database connection name, database name, project name, project identifier, environment identifier , import type and author. + */ + public dbtSearch(_options?: Configuration): Promise> { + const result = this.api.dbtSearch(_options); + return result.toPromise(); + } + + /** + * Version: 9.7.0.cl or later Deactivates a user account. Requires `ADMINISTRATION` (**Can administer Thoughtspot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `USER_ADMINISTRATION` (**Can manage users**) privilege is required. To deactivate a user account, the API request body must include the following information: - Username or the GUID of the user account - Base URL of the ThoughtSpot instance If the API request is successful, ThoughtSpot returns the activation URL in the response. The activation URL is valid for 14 days and can be used to re-activate the account and reset the password of the deactivated account. + * @param deactivateUserRequest + */ + public deactivateUser(deactivateUserRequest: DeactivateUserRequest, _options?: Configuration): Promise { + const result = this.api.deactivateUser(deactivateUserRequest, _options); + return result.toPromise(); + } + + /** + * Version: 10.12.0.cl or later Deletes a [custom calendar](https://docs.thoughtspot.com/cloud/latest/connections-cust-cal). Requires `DATAMANAGEMENT` (**Can manage data**) or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your ThoughtSpot instance, the `CAN_MANAGE_CUSTOM_CALENDAR` (**Can manage custom calendars**) privilege is required. #### Usage guidelines To delete a custom calendar, specify the calendar ID as a path parameter in the request URL. + * @param calendarIdentifier Unique ID or name of the Calendar. + */ + public deleteCalendar(calendarIdentifier: string, _options?: Configuration): Promise { + const result = this.api.deleteCalendar(calendarIdentifier, _options); + return result.toPromise(); + } + + /** + * Version: 26.4.0.cl or later Deletes one or more collections from ThoughtSpot. #### Delete options * **delete_children**: When set to `true`, deletes the child objects (metadata items) within the collection that the user has access to. Objects that the user does not have permission to delete will be skipped. * **dry_run**: When set to `true`, performs a preview of the deletion operation without actually deleting anything. The response shows what would be deleted, allowing you to review before committing the deletion. #### Response The response includes: * **metadata_deleted**: List of metadata objects that were successfully deleted * **metadata_skipped**: List of metadata objects that were skipped due to lack of permissions or other constraints + * @param deleteCollectionRequest + */ + public deleteCollection(deleteCollectionRequest: DeleteCollectionRequest, _options?: Configuration): Promise { + const result = this.api.deleteCollection(deleteCollectionRequest, _options); + return result.toPromise(); + } + + /** + * Version: 9.2.0.cl or later Deletes Git repository configuration from your ThoughtSpot instance. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance on your instance, the `CAN_SETUP_VERSION_CONTROL` (**Can set up version control**) privilege. + * @param deleteConfigRequest + */ + public deleteConfig(deleteConfigRequest: DeleteConfigRequest, _options?: Configuration): Promise { + const result = this.api.deleteConfig(deleteConfigRequest, _options); + return result.toPromise(); + } + + /** + * Version: 9.2.0.cl or later **Important**: This endpoint is deprecated and will be removed from ThoughtSpot in September 2025. ThoughtSpot strongly recommends using the [Delete Connection V2](#/http/api-endpoints/connections/delete-connection-v2) endpoint to delete your connection objects. #### Usage guidelines Deletes a connection object. Requires `DATAMANAGEMENT` (**Can manage data**) and edit permissions to the connection object, or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) privilege is required. **Note**: If a connection has dependent objects, make sure you remove its associations before the delete operation. + * @param deleteConnectionRequest + */ + public deleteConnection(deleteConnectionRequest: DeleteConnectionRequest, _options?: Configuration): Promise { + const result = this.api.deleteConnection(deleteConnectionRequest, _options); + return result.toPromise(); + } + + /** + * Version: 10.12.0.cl or later Deletes connection configuration objects. Requires `DATAMANAGEMENT` (**Can manage data**) and edit permissions to the connection object, or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) privilege is required. + * @param deleteConnectionConfigurationRequest + */ + public deleteConnectionConfiguration(deleteConnectionConfigurationRequest: DeleteConnectionConfigurationRequest, _options?: Configuration): Promise { + const result = this.api.deleteConnectionConfiguration(deleteConnectionConfigurationRequest, _options); + return result.toPromise(); + } + + /** + * Version: 10.4.0.cl or later Deletes a connection object. **Note**: If a connection has dependent objects, make sure you remove its associations before the delete operation. Requires `DATAMANAGEMENT` (**Can manage data**) and edit permissions to the connection object, or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) privilege is required. + * @param connectionIdentifier Unique ID or name of the connection. + */ + public deleteConnectionV2(connectionIdentifier: string, _options?: Configuration): Promise { + const result = this.api.deleteConnectionV2(connectionIdentifier, _options); + return result.toPromise(); + } + + /** + * Version: 9.6.0.cl or later Removes the custom action specified in the API request. Requires `DEVELOPER` (**Has Developer privilege**) or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `DEVELOPER` (**Has developer privilege**) privilege is required. + * @param customActionIdentifier Unique ID or name of the custom action. + */ + public deleteCustomAction(customActionIdentifier: string, _options?: Configuration): Promise { + const result = this.api.deleteCustomAction(customActionIdentifier, _options); + return result.toPromise(); + } + + /** + * Version: 9.9.0.cl or later Removes the specified DBT connection object from the ThoughtSpot system. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) or `DATAMANAGEMENT` (**Can manage data ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the following Data control privileges may be required: - `CAN_MANAGE_CUSTOM_CALENDAR`(**Can manage custom calendars**) - `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) - `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` (**Can manage data models**) + * @param dbtConnectionIdentifier Unique ID of the DBT Connection. + */ + public deleteDbtConnection(dbtConnectionIdentifier: string, _options?: Configuration): Promise { + const result = this.api.deleteDbtConnection(dbtConnectionIdentifier, _options); + return result.toPromise(); + } + + /** + * Version: 10.10.0.cl or later Deletes the configuration for the email customization. #### Pre-requisites Requires `DEVELOPER` (**has developer privilege**) or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `DEVELOPER` (**Has developer privilege**) privilege is required. **NOTE**:This endpoint in currently in beta. Contact ThoughtSpot support to enable this on your instance. #### Usage guidelines - Call the search API endpoint to get the `template_identifier` from the response. - Use that `template_identifier` as a parameter in this API request. + * @param templateIdentifier Unique ID or name of the email customization. + */ + public deleteEmailCustomization(templateIdentifier: string, _options?: Configuration): Promise { + const result = this.api.deleteEmailCustomization(templateIdentifier, _options); + return result.toPromise(); + } + + /** + * Version: 9.0.0.cl or later Removes the specified metadata object from the ThoughtSpot system. Requires edit access to the metadata object. + * @param deleteMetadataRequest + */ + public deleteMetadata(deleteMetadataRequest: DeleteMetadataRequest, _options?: Configuration): Promise { + const result = this.api.deleteMetadata(deleteMetadataRequest, _options); + return result.toPromise(); + } + + /** + * Version: 9.0.0.cl or later Deletes an Org object from the ThoughtSpot system. Requires cluster administration (**Can administer Org**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `ORG_ADMINISTRATION` (**Can manage Orgs**) privilege is required. When you delete an Org, all its users and objects created in that Org context are removed. However, if the users in the deleted Org also exists in other Orgs, they are removed only from the deleted Org. + * @param orgIdentifier ID or name of the Org + */ + public deleteOrg(orgIdentifier: string, _options?: Configuration): Promise { + const result = this.api.deleteOrg(orgIdentifier, _options); + return result.toPromise(); + } + + /** + * Version: 10.12.0.cl or later Deletes the configuration for the email customization. #### Pre-requisites Requires `DEVELOPER` (**has developer privilege**) or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `DEVELOPER` (**Has developer privilege**) privilege is required. **NOTE**:This endpoint in currently in beta. Contact ThoughtSpot support to enable this on your instance. #### Usage guidelines - Call the search API endpoint to get the `org_identifier` from the response. - Use that `org_identifier` as a parameter in this API request. + * @param deleteOrgEmailCustomizationRequest + */ + public deleteOrgEmailCustomization(deleteOrgEmailCustomizationRequest: DeleteOrgEmailCustomizationRequest, _options?: Configuration): Promise { + const result = this.api.deleteOrgEmailCustomization(deleteOrgEmailCustomizationRequest, _options); + return result.toPromise(); + } + + /** + * Version: 9.5.0.cl or later Deletes a Role object from the ThoughtSpot system. Available only if [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance. To delete a Role, the `ROLE_ADMINISTRATION` (**Can manage roles**) privilege is required. + * @param roleIdentifier Unique ID or name of the Role. ReadOnly roles cannot be deleted. + */ + public deleteRole(roleIdentifier: string, _options?: Configuration): Promise { + const result = this.api.deleteRole(roleIdentifier, _options); + return result.toPromise(); + } + + /** + * Deletes a scheduled job. Version: 9.4.0.cl or later Deletes a scheduled Liveboard job. Requires at least edit access to Liveboard or `ADMINISTRATION` (**Can administer Org**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `JOBSCHEDULING` (**Can schedule for others**) privilege is required. + * @param scheduleIdentifier Unique ID or name of the scheduled job. + */ + public deleteSchedule(scheduleIdentifier: string, _options?: Configuration): Promise { + const result = this.api.deleteSchedule(scheduleIdentifier, _options); + return result.toPromise(); + } + + /** + * Version: 9.0.0.cl or later Deletes a tag object from the ThoughtSpot system Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `TAGMANAGEMENT` (**Can manage tags**) privilege is required to create, edit, and delete tags. + * @param tagIdentifier Tag identifier Tag name or Tag id. + */ + public deleteTag(tagIdentifier: string, _options?: Configuration): Promise { + const result = this.api.deleteTag(tagIdentifier, _options); + return result.toPromise(); + } + + /** + * Version: 9.0.0.cl or later Deletes a user from the ThoughtSpot system. If you want to remove a user from a specific Org but not from ThoughtSpot, update the group and Org mapping properties of the user object via a POST API call to the [/api/rest/2.0/users/{user_identifier}/update](#/http/api-endpoints/users/update-user) endpoint. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `USER_ADMINISTRATION` (**Can manage users**) privilege is required. + * @param userIdentifier GUID / name of the user + */ + public deleteUser(userIdentifier: string, _options?: Configuration): Promise { + const result = this.api.deleteUser(userIdentifier, _options); + return result.toPromise(); + } + + /** + * Version: 9.0.0.cl or later Removes the specified group object from the ThoughtSpot system. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `GROUP_ADMINISTRATION` (**Can manage groups**) privilege is required. + * @param groupIdentifier GUID or name of the group. + */ + public deleteUserGroup(groupIdentifier: string, _options?: Configuration): Promise { + const result = this.api.deleteUserGroup(groupIdentifier, _options); + return result.toPromise(); + } + + /** + * Delete a variable Version: 10.14.0.cl or later **Note:** This API endpoint is deprecated and will be removed from ThoughtSpot in a future release. Use [POST /api/rest/2.0/template/variables/delete](/api/rest/2.0/template/variables/delete) instead. Allows deleting a variable from ThoughtSpot. Requires ADMINISTRATION role and TENANT scope. The CAN_MANAGE_VARIABLES permission allows you to manage Formula Variables in the current organization scope. The API endpoint requires: * The variable identifier (ID or name) The operation will fail if: * The user lacks required permissions * The variable doesn\'t exist * The variable is being used by other objects + * @param identifier Unique id or name of the variable + */ + public deleteVariable(identifier: string, _options?: Configuration): Promise { + const result = this.api.deleteVariable(identifier, _options); + return result.toPromise(); + } + + /** + * Delete variable(s) Version: 26.4.0.cl or later Allows deleting multiple variables from ThoughtSpot. Requires ADMINISTRATION role and TENANT scope. The CAN_MANAGE_VARIABLES permission allows you to manage Formula Variables in the current organization scope. The API endpoint requires: * The variable identifiers (IDs or names) The operation will fail if: * The user lacks required permissions * Any of the variables don\'t exist * Any of the variables are being used by other objects + * @param deleteVariablesRequest + */ + public deleteVariables(deleteVariablesRequest: DeleteVariablesRequest, _options?: Configuration): Promise { + const result = this.api.deleteVariables(deleteVariablesRequest, _options); + return result.toPromise(); + } + + /** + * Version: 10.14.0.cl or later Deletes one or more webhook configurations by their unique id or name. Returns status of each deletion operation, including successfully deleted webhooks and any failures with error details. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) or `DEVELOPER` (**Has developer privilege**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, users with `CAN_MANAGE_WEBHOOKS` (**Can manage webhooks**) privilege are also authorized to perform this action. + * @param deleteWebhookConfigurationsRequest + */ + public deleteWebhookConfigurations(deleteWebhookConfigurationsRequest: DeleteWebhookConfigurationsRequest, _options?: Configuration): Promise { + const result = this.api.deleteWebhookConfigurations(deleteWebhookConfigurationsRequest, _options); + return result.toPromise(); + } + + /** + * Version: 9.2.0.cl or later Allows you to deploy a commit and publish TML content to your ThoughtSpot instance. Requires at least edit access to the objects used in the deploy operation. The API deploys the head of the branch unless a `commit_id` is specified in the API request. If the branch name is not defined in the request, the default branch is considered for deploying commits. For more information, see [Git integration documentation](https://developers.thoughtspot.com/docs/git-integration). + * @param deployCommitRequest + */ + public deployCommit(deployCommitRequest: DeployCommitRequest, _options?: Configuration): Promise> { + const result = this.api.deployCommit(deployCommitRequest, _options); + return result.toPromise(); + } + + /** + * Version: 9.9.0.cl or later Exports the difference in connection metadata between CDW and ThoughtSpot Requires `DATAMANAGEMENT` (**Can manage data**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the following Data control privileges may be required: - `CAN_MANAGE_CUSTOM_CALENDAR`(**Can manage custom calendars**) - `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) - `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` (**Can manage data models**) To download the connection metadata difference between ThoughtSpot and CDW, pass the connection GUID as `connection_identifier` in the API request. + * @param connectionIdentifier GUID of the connection + */ + public downloadConnectionMetadataChanges(connectionIdentifier: string, _options?: Configuration): Promise { + const result = this.api.downloadConnectionMetadataChanges(connectionIdentifier, _options); + return result.toPromise(); + } + + /** + * Version: 9.0.0.cl or later Exports an Answer in the given file format. You can download the Answer data as a PDF, PNG, CSV, or XLSX file. Requires at least view access to the Answer. #### Usage guidelines In the request body, specify the GUID or name of the Answer and set `file_format`. The default file format is CSV. Use the `type` parameter to specify whether the Answer being exported is a saved Answer (`SAVED`) or a pinned Answer on a Liveboard (`PINNED`). Defaults to `SAVED`. When using `PINNED`, the `metadata_identifier` must be the container id. **NOTE**: * The downloadable file returned in API response file is extensionless. Please rename the downloaded file by typing in the relevant extension. * HTML rendering is not supported for PDF exports of Answers with tables. Optionally, you can define [runtime overrides](https://developers.thoughtspot.com/docs/fetch-data-and-report-apis#_runtime_overrides) to apply to the Answer data. + * @param exportAnswerReportRequest + */ + public exportAnswerReport(exportAnswerReportRequest: ExportAnswerReportRequest, _options?: Configuration): Promise { + const result = this.api.exportAnswerReport(exportAnswerReportRequest, _options); + return result.toPromise(); + } + + /** + * Version: 9.0.0.cl or later Exports a Liveboard and its visualizations in PDF, PNG, CSV, or XLSX file format. The default `file_format` is CSV. Requires at least view access to the Liveboard. #### Usage guidelines In the request body, specify the GUID or name of the Liveboard. To generate a Liveboard report with specific visualizations, add GUIDs or names of the visualizations. **NOTE**: * The downloadable file returned in API response file is extensionless. Please rename the downloaded file by typing in the relevant extension. * Optionally, you can define [runtime overrides](https://developers.thoughtspot.com/docs/fetch-data-and-report-apis#_runtime_overrides) to apply to the Answer data. * To include unsaved changes in the report, pass the `transient_pinboard_content` script generated from the `getExportRequestForCurrentPinboard` method in the Visual Embed SDK. Upon successful execution, the API returns the report with unsaved changes, including ad hoc changes to visualizations. For more information, see [Liveboard Report API](https://developers.thoughtspot.com/docs/fetch-data-and-report-apis#_liveboard_report_api). * Starting with ThoughtSpot Cloud 10.9.0.cl release, the Liveboard can be exported in the PNG format in the resolution of your choice. To enable this on your instance, contact ThoughtSpot support. When this feature is enabled, the options `include_cover_page`,`include_filter_page` within the `png_options` will not be available for PNG exports. * Starting with the ThoughtSpot Cloud 26.2.0.cl release, * Liveboards can be exported in CSV format. * All visualizations within a Liveboard can be exported as individual CSV files. * When exporting multiple visualizations or the entire Liveboard, the system returns the report as a compressed ZIP file containing the separate CSV files for each visualization. * Liveboards can also be exported in XLSX format. * All selected visualizations are consolidated into a single Excel workbook (.xlsx), with each visualization placed in its own worksheet (tab). * XLSX exports are limited to a maximum of 255 worksheets (tabs) per workbook. + * @param exportLiveboardReportRequest + */ + public exportLiveboardReport(exportLiveboardReportRequest: ExportLiveboardReportRequest, _options?: Configuration): Promise { + const result = this.api.exportLiveboardReport(exportLiveboardReportRequest, _options); + return result.toPromise(); + } + + /** + * Version: 9.0.0.cl or later Exports the [TML](https://docs.thoughtspot.com/cloud/latest/tml) representation of metadata objects in JSON or YAML format. Requires `DATADOWNLOADING` (**Can download Data**) and at least view access to the metadata object. #### Usage guidelines * You can export one or several objects by passing metadata object GUIDs in the `metadata` array. * When exporting TML content for a Liveboard or Answer object, you can set `export_associated` to `true` to retrieve TML content for underlying Worksheets, Tables, or Views, including the GUID of each object within the headers. When `export_associated` is set to `true`, consider retrieving one metadata object at a time. * Set `export_fqns` to `true` to add FQNs of the referenced objects in the TML content. For example, if you send an API request to retrieve TML for a Liveboard and its associated objects, the API returns the TML content with FQNs of the referenced Worksheet. Exporting TML with FQNs is useful if ThoughtSpot has multiple objects with the same name and you want to eliminate ambiguity when importing TML files into ThoughtSpot. It eliminates the need for adding FQNs of the referenced objects manually during the import operation. * To export only the TML of feedbacks associated with an object, set the GUID of the object as `identifier`, and set the `type` as `FEEDBACK` in the `metadata` array. * To export the TML of an object along with the feedbacks associated with it, set the GUID of the object as `identifier`, set the `type` as `LOGIAL_TABLE` in the `metadata` array, and set `export_with_associated_feedbacks` in `export_options` to true. For more information, see [TML Documentation](https://developers.thoughtspot.com/docs/tml#_export_a_tml). For more information on feedbacks, see [Feedback Documentation](https://docs.thoughtspot.com/cloud/latest/sage-feedback). + * @param exportMetadataTMLRequest + */ + public exportMetadataTML(exportMetadataTMLRequest: ExportMetadataTMLRequest, _options?: Configuration): Promise> { + const result = this.api.exportMetadataTML(exportMetadataTMLRequest, _options); + return result.toPromise(); + } + + /** + * Version: 10.1.0.cl or later Exports the [TML](https://docs.thoughtspot.com/cloud/latest/tml) representation of metadata objects in JSON or YAML format. ### **Permissions Required** Requires `DATAMANAGEMENT` (**Can manage data**) and `USERMANAGEMENT` (**Can manage users**) privileges. #### **Usage Guidelines** This API is only applicable for `USER`, `GROUP`, and `ROLES` metadata types. - `batch_offset` Indicates the starting position within the complete dataset from which the API should begin returning objects. Useful for paginating results efficiently. - `batch_size` Specifies the number of objects or items to retrieve in a single request. Helps control response size for better performance. - `edoc_format` Defines the format of the TML content. The exported metadata can be in JSON or YAML format. - `export_dependent` Specifies whether to include dependent metadata objects in the export. Ensures related objects are also retrieved if needed. - `all_orgs_override` Indicates whether the export operation applies across all organizations. Useful for multi-tenant environments where cross-org exports are required. + * @param exportMetadataTMLBatchedRequest + */ + public exportMetadataTMLBatched(exportMetadataTMLBatchedRequest: ExportMetadataTMLBatchedRequest, _options?: Configuration): Promise { + const result = this.api.exportMetadataTMLBatched(exportMetadataTMLBatchedRequest, _options); + return result.toPromise(); + } + + /** + * Version: 9.0.0.cl or later Fetches data from a saved Answer. Requires at least view access to the saved Answer. The `record_size` attribute determines the number of records to retrieve in an API call. For more information about pagination, record size, and maximum row limit, see [Pagination and record size settings](https://developers.thoughtspot.com/docs/fetch-data-and-report-apis#_pagination_settings_for_data_and_report_apis). + * @param fetchAnswerDataRequest + */ + public fetchAnswerData(fetchAnswerDataRequest: FetchAnswerDataRequest, _options?: Configuration): Promise { + const result = this.api.fetchAnswerData(fetchAnswerDataRequest, _options); + return result.toPromise(); + } + + /** + * Version: 9.0.0.cl or later Fetches the underlying SQL query data for an Answer object. Requires at least view access to the Answer object. Upon successful execution, the API returns the SQL queries for the specified object as shown in this example: ``` { \"metadata_id\":\"8fbe44a8-46ad-4b16-8d39-184b2fada490\", \"metadata_name\":\"Total sales\", \"metadata_type\":\"ANSWER\", \"sql_queries\":[ { \"metadata_id\":\"8fbe44a8-46ad-4b16-8d39-184b2fada490\", \"metadata_name\":\"Total sales -test\", \"sql_query\":\"SELECT \\n \\\"ta_1\\\".\\\"REGION\\\" \\\"ca_1\\\", \\n \\\"ta_2\\\".\\\"PRODUCTNAME\\\" \\\"ca_2\\\", \\n \\\"ta_1\\\".\\\"STORENAME\\\" \\\"ca_3\\\", \\n CASE\\n WHEN sum(\\\"ta_3\\\".\\\"SALES\\\") IS NOT NULL THEN sum(\\\"ta_3\\\".\\\"SALES\\\")\\n ELSE 0\\n END \\\"ca_4\\\", \\n CASE\\n WHEN sum(\\\"ta_3\\\".\\\"QUANTITYPURCHASED\\\") IS NOT NULL THEN sum(\\\"ta_3\\\".\\\"QUANTITYPURCHASED\\\")\\n ELSE 0\\n END \\\"ca_5\\\"\\nFROM \\\"RETAILAPPAREL\\\".\\\"PUBLIC\\\".\\\"FACT_RETAPP_SALES\\\" \\\"ta_3\\\"\\n JOIN \\\"RETAILAPPAREL\\\".\\\"PUBLIC\\\".\\\"DIM_RETAPP_STORES\\\" \\\"ta_1\\\"\\n ON \\\"ta_3\\\".\\\"STOREID\\\" = \\\"ta_1\\\".\\\"STOREID\\\"\\n JOIN \\\"RETAILAPPAREL\\\".\\\"PUBLIC\\\".\\\"DIM_RETAPP_PRODUCTS\\\" \\\"ta_2\\\"\\n ON \\\"ta_3\\\".\\\"PRODUCTID\\\" = \\\"ta_2\\\".\\\"PRODUCTID\\\"\\nGROUP BY \\n \\\"ca_1\\\", \\n \\\"ca_2\\\", \\n \\\"ca_3\\\"\\n\" } ] } ``` + * @param fetchAnswerSqlQueryRequest + */ + public fetchAnswerSqlQuery(fetchAnswerSqlQueryRequest: FetchAnswerSqlQueryRequest, _options?: Configuration): Promise { + const result = this.api.fetchAnswerSqlQuery(fetchAnswerSqlQueryRequest, _options); + return result.toPromise(); + } + + /** + * Version: 10.4.0.cl or later Gets information about the status of the TML async import task scheduled using the `/api/rest/2.0/metadata/tml/async/import` API call. To fetch the task details, specify the ID of the TML async import task. Requires access to the task ID. The API allows users who initiated the asynchronous TML import via `/api/rest/2.0/metadata/tml/async/import` to view the status of their tasks. Users with administration privilege can view the status of all import tasks initiated by the users in their Org. #### Usage guidelines See [TML API Documentation](https://developers.thoughtspot.com/docs/tml#_fetch_status_of_the_tml_import_task) for usage guidelines. + * @param fetchAsyncImportTaskStatusRequest + */ + public fetchAsyncImportTaskStatus(fetchAsyncImportTaskStatusRequest: FetchAsyncImportTaskStatusRequest, _options?: Configuration): Promise { + const result = this.api.fetchAsyncImportTaskStatus(fetchAsyncImportTaskStatusRequest, _options); + return result.toPromise(); + } + + /** + * Version: 10.12.0.cl or later Fetches column security rules for specified tables. This API endpoint retrieves column-level security rules configured for tables. It returns information about which columns are secured and which groups have access to those columns. #### Usage guidelines - Provide an array of table identifiers using either `identifier` (GUID or name) or `obj_identifier` (object ID) - At least one of `identifier` or `obj_identifier` must be provided for each table - The API returns column security rules for all specified tables - Users must have appropriate permissions to access security rules for the specified tables #### Required permissions - `ADMINISTRATION` - Can administer ThoughtSpot - `DATAMANAGEMENT` - Can manage data - `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` - Can manage worksheet views and tables #### Example request ```json { \"tables\": [ { \"identifier\": \"table-guid\", \"obj_identifier\": \"table-object-id\" } ] } ``` #### Response format The API returns an array of `ColumnSecurityRuleResponse` objects wrapped in a `data` field. Each `ColumnSecurityRuleResponse` object contains: - Table information (GUID and object ID) - Array of column security rules with column details, group access, and source table information #### Example response ```json { \"data\": [ { \"guid\": \"table-guid\", \"objId\": \"table-object-id\", \"columnSecurityRules\": [ { \"column\": { \"id\": \"col_123\", \"name\": \"Salary\" }, \"groups\": [ { \"id\": \"group_1\", \"name\": \"HR Department\" } ], \"sourceTableDetails\": { \"id\": \"source-table-guid\", \"name\": \"Employee_Data\" } } ] } ] } ``` + * @param fetchColumnSecurityRulesRequest + */ + public fetchColumnSecurityRules(fetchColumnSecurityRulesRequest: FetchColumnSecurityRulesRequest, _options?: Configuration): Promise> { + const result = this.api.fetchColumnSecurityRules(fetchColumnSecurityRulesRequest, _options); + return result.toPromise(); + } + + /** + * Version: 9.9.0.cl or later Validates the difference in connection metadata between CDW and ThoughtSpot. Requires `DATAMANAGEMENT` (**Can manage data**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the following Data control privileges may be required: - `CAN_MANAGE_CUSTOM_CALENDAR`(**Can manage custom calendars**) - `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) - `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` (**Can manage data models**) Returns a boolean indicating whether there is any difference between the connection metadata at ThoughtSpot and CDW. To get the connection metadata difference status, pass the connection GUID as `connection_identifier` in the API request. + * @param connectionIdentifier GUID of the connection + */ + public fetchConnectionDiffStatus(connectionIdentifier: string, _options?: Configuration): Promise { + const result = this.api.fetchConnectionDiffStatus(connectionIdentifier, _options); + return result.toPromise(); + } + + /** + * Version: 9.0.0.cl or later Gets data from a Liveboard object and its visualization. Requires at least view access to the Liveboard. #### Usage guidelines In the request body, specify the GUID or name of the Liveboard. To get data for specific visualizations, add the GUIDs or names of the visualizations in the API request. To include unsaved changes in the report, pass the `transient_pinboard_content` script generated from the `getExportRequestForCurrentPinboard` method in the Visual Embed SDK. Upon successful execution, the API returns the report with unsaved changes. If the new Liveboard experience mode, the transient content includes ad hoc changes to visualizations such as sorting, toggling of legends, and data drill down. For more information, and see [Liveboard data API](https://developers.thoughtspot.com/docs/fetch-data-and-report-apis#_fetch_liveboard_data_api). + * @param fetchLiveboardDataRequest + */ + public fetchLiveboardData(fetchLiveboardDataRequest: FetchLiveboardDataRequest, _options?: Configuration): Promise { + const result = this.api.fetchLiveboardData(fetchLiveboardDataRequest, _options); + return result.toPromise(); + } + + /** + * Version: 9.0.0.cl or later Fetches the underlying SQL query data for a Liveboard object and its visualizations. Requires at least view access to the Liveboard object. To get SQL query data for a Liveboard, specify the GUID of the Liveboard. Optionally, you can add an array of visualization GUIDs to retrieve the SQL query data for visualizations in the Liveboard. Upon successful execution, the API returns the SQL queries for the specified object as shown in this example: ``` { \"metadata_id\": \"fa68ae91-7588-4136-bacd-d71fb12dda69\", \"metadata_name\": \"Total Sales\", \"metadata_type\": \"LIVEBOARD\", \"sql_queries\": [ { \"metadata_id\": \"b3b6d2b9-089a-490c-8e16-b144650b7843\", \"metadata_name\": \"Total quantity purchased, Total sales by region\", \"sql_query\": \"SELECT \\n \\\"ta_1\\\".\\\"REGION\\\" \\\"ca_1\\\", \\n CASE\\n WHEN sum(\\\"ta_2\\\".\\\"QUANTITYPURCHASED\\\") IS NOT NULL THEN sum(\\\"ta_2\\\".\\\"QUANTITYPURCHASED\\\")\\n ELSE 0\\n END \\\"ca_2\\\", \\n CASE\\n WHEN sum(\\\"ta_2\\\".\\\"SALES\\\") IS NOT NULL THEN sum(\\\"ta_2\\\".\\\"SALES\\\")\\n ELSE 0\\n END \\\"ca_3\\\"\\nFROM \\\"RETAILAPPAREL\\\".\\\"PUBLIC\\\".\\\"FACT_RETAPP_SALES\\\" \\\"ta_2\\\"\\n JOIN \\\"RETAILAPPAREL\\\".\\\"PUBLIC\\\".\\\"DIM_RETAPP_STORES\\\" \\\"ta_1\\\"\\n ON \\\"ta_2\\\".\\\"STOREID\\\" = \\\"ta_1\\\".\\\"STOREID\\\"\\nGROUP BY \\\"ca_1\\\"\" } ] } ``` + * @param fetchLiveboardSqlQueryRequest + */ + public fetchLiveboardSqlQuery(fetchLiveboardSqlQueryRequest: FetchLiveboardSqlQueryRequest, _options?: Configuration): Promise { + const result = this.api.fetchLiveboardSqlQuery(fetchLiveboardSqlQueryRequest, _options); + return result.toPromise(); + } + + /** + * Version: 9.0.0.cl or later Fetches security audit logs. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the [Admin Control](https://developers.thoughtspot.com/docs/rbac#_admin_control) privileges are required. #### Usage guidelines By default, the API retrieves logs for the last 24 hours. You can set a custom duration in EPOCH time. Make sure the log duration specified in your API request doesn’t exceed 24 hours. If you must fetch logs for a longer time range, modify the duration and make multiple sequential API requests. Upon successful execution, the API returns logs with the following information: * timestamp of the event * event ID * event type * name and GUID of the user * IP address of ThoughtSpot instance For more information see [Audit logs Documentation](https://developers.thoughtspot.com/docs/audit-logs). + * @param fetchLogsRequest + */ + public fetchLogs(fetchLogsRequest: FetchLogsRequest, _options?: Configuration): Promise> { + const result = this.api.fetchLogs(fetchLogsRequest, _options); + return result.toPromise(); + } + + /** + * Version: 26.3.0.cl or later This API fetches the object privileges present for the given list of principals (user or group), on the given set of objects. It supports pagination, which can be enabled and configured using the request parameters. It provides users access to certain features based on privilege based access control. #### Usage guidelines - Specify the `type` (`USER` or `USER_GROUP`) and `identifier` (either GUID or name) of the principals for which you want to retrieve object privilege information in the `principals` array. - Specify the `type` (`LOGICAL_TABLE`) and `identifier` (either GUID or name) of the metadata objects for which you want to retrieve object privilege information in the `metadata` array. Only `LOGICAL_TABLE` metadata type is supported for now. It may be extended for other metadata types in future. - To control the offset from where principals have to be fetched, use `record_offset`. When `record_offset` is 0, information is fetched from the beginning. - To control the number of principals to be fetched, use `record_size`. Default `record_size` is 20. - Ensure `record_offset` for a subsequent request is one more than the value of `record_size` of the previous request. - Ensure using correct Authorization Bearer Token corresponding to specific user & org. #### Example request ```json { \"principals\": [ { \"type\": \"type-1\", \"identifier\": \"principal-guid-or-name-1\" }, { \"type\": \"type-2\", \"identifier\": \"principal-guid-or-name-2\" } ], \"metadata\": [ { \"type\": \"metadata-type-1\", \"identifier\": \"metadata-guid-or-name-1\" }, { \"type\": \"metadata-type-2\", \"identifier\": \"metadata-guid-or-name-2\" } ], \"record_offset\": 0, \"record_size\": 20 } ``` #### Response format The API returns an array of `metadata_object_privileges` objects wrapped in JSON. Each `metadata_object_privileges` object contains: - Metadata information (GUID, name and type) - Array of `principal_object_privilege_info`. - Each `principal_object_privilege_info` contains: - Principal type. All principals of this type are listed as described below. - Array of `principal_object_privileges`. - Each `principal_object_privileges` contains: - Principal information (GUID, name, subtype) - List of applied object level privileges. #### Example response ```json { \"metadata_object_privileges\": [ { \"metadata_id\": \"metadata-guid-1\", \"metadata_name\": \"metadata-name-1\", \"metadata_type\": \"metadata-type-1\", \"principal_object_privilege_info\": [ { \"principal_type\": \"principal-type-1\", \"principal_object_privileges\": [ { \"principal_id\": \"principal-guid-1\", \"principal_name\": \"principal-name-1\", \"principal_sub_type\": \"principal-sub-type-1\", \"object_privileges\": \"[object-privilege-1, object-privilege-2]\" }, { \"principal_id\": \"principal-guid-2\", \"principal_name\": \"principal-name-2\", \"principal_sub_type\": \"principal-sub-type-2\", \"object_privileges\": \"[object-privilege-1, object-privilege-2]\" } ] }, { \"principal_type\": \"principal-type-2\", \"principal_object_privileges\": [ { \"principal_id\": \"principal-guid-3\", \"principal_name\": \"principal-guid-4\", \"principal_sub_type\": \"principal-sub-type-4\", \"object_privileges\": \"[object-privilege-1]\" } ] } ] }, { \"metadata_id\": \"metadata-guid-2\", \"metadata_name\": \"metadata-name-2\", \"metadata_type\": \"metadata-type-2\", \"principal_object_privilege_info\": [ { \"principal_type\": \"principal-type-1\", \"principal_object_privileges\": [ { \"principal_id\": \"principal-guid-1\", \"principal_name\": \"principal-name-1\", \"principal_sub_type\": \"principal-sub-type-1\", \"object_privileges\": \"[object-privilege-3, object-privilege-4]\" }, { \"principal_id\": \"principal-guid-2\", \"principal_name\": \"principal-name-2\", \"principal_sub_type\": \"principal-sub-type-2\", \"object_privileges\": \"[object-privilege-4]\" } ] } ] } ] } ``` + * @param fetchObjectPrivilegesRequest + */ + public fetchObjectPrivileges(fetchObjectPrivilegesRequest: FetchObjectPrivilegesRequest, _options?: Configuration): Promise { + const result = this.api.fetchObjectPrivileges(fetchObjectPrivilegesRequest, _options); + return result.toPromise(); + } + + /** + * Version: 9.0.0.cl or later Fetches object permission details for a given principal object such as a user and group. Requires view access to the metadata object. #### Usage guidelines * To get a list of all metadata objects that a user or group can access, specify the `type` and GUID or name of the principal. * To get permission details for a specific object, add the `type` and GUID or name of the metadata object to your API request. Upon successful execution, the API returns a list of metadata objects and permission details for each object. + * @param fetchPermissionsOfPrincipalsRequest + */ + public fetchPermissionsOfPrincipals(fetchPermissionsOfPrincipalsRequest: FetchPermissionsOfPrincipalsRequest, _options?: Configuration): Promise { + const result = this.api.fetchPermissionsOfPrincipals(fetchPermissionsOfPrincipalsRequest, _options); + return result.toPromise(); + } + + /** + * Version: 9.0.0.cl or later Fetches permission details for a given metadata object. Requires view access to the metadata object. #### Usage guidelines * To fetch a list of users and groups for a metadata object, specify `type` and GUID or name of the metadata object. * To get permission details for a specific user or group, add `type` and GUID or name of the principal object to your API request. Upon successful execution, the API returns permission details and principal information for the object specified in the API request. + * @param fetchPermissionsOnMetadataRequest + */ + public fetchPermissionsOnMetadata(fetchPermissionsOnMetadataRequest: FetchPermissionsOnMetadataRequest, _options?: Configuration): Promise { + const result = this.api.fetchPermissionsOnMetadata(fetchPermissionsOnMetadataRequest, _options); + return result.toPromise(); + } + + /** + * Version: 9.0.0.cl or later Enforces logout on current user sessions. Use this API with caution as it may invalidate active user sessions and force users to re-login. Make sure you specify the usernames or GUIDs. If you pass null values in the API call, all user sessions on your cluster become invalid, and the users are forced to re-login. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `USER_ADMINISTRATION` (**Can manage users**) privilege is required. + * @param forceLogoutUsersRequest + */ + public forceLogoutUsers(forceLogoutUsersRequest: ForceLogoutUsersRequest, _options?: Configuration): Promise { + const result = this.api.forceLogoutUsers(forceLogoutUsersRequest, _options); + return result.toPromise(); + } + + /** + * Version: 10.12.0.cl or later Exports a [custom calendar](https://docs.thoughtspot.com/cloud/latest/connections-cust-cal) in the CSV format. Requires `DATAMANAGEMENT` (**Can manage data**) or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your ThoughtSpot instance, the `CAN_MANAGE_CUSTOM_CALENDAR` (**Can manage custom calendars**) privilege is required. #### Usage guidelines Use this API to download a custom calendar in the CSV file format. In your API request, specify the following parameters. * Start and end date of the calendar. For \"month offset\" calendars, the start date must match the month defined in the `month_offset` attribute. You can also specify optional parameters such as the starting day of the week and prefixes for the quarter and year labels. + * @param generateCSVRequest + */ + public generateCSV(generateCSVRequest: GenerateCSVRequest, _options?: Configuration): Promise { + const result = this.api.generateCSV(generateCSVRequest, _options); + return result.toPromise(); + } + + /** + * Version: 9.0.0.cl or later Retrieves details of the current user session for the token provided in the request header. Any ThoughtSpot user can access this endpoint and send an API request. The data returned in the API response varies according to user\'s privilege and object access permissions. **NOTE**: In ThoughtSpot, users with cluster administration privileges can access all Orgs by default. However, unless the administrator is explicitly added to an Org, the Orgs list in the session information returned by the API will include only the Primary Org. To include other Orgs in the API response, you must explicitly add the administrator to each Org in the Admin settings page in the UI or via user REST API. + */ + public getCurrentUserInfo(_options?: Configuration): Promise { + const result = this.api.getCurrentUserInfo(_options); + return result.toPromise(); + } + + /** + * Version: 9.4.0.cl or later Retrieves details of the current session token for the bearer token provided in the request header. This API endpoint does not create a new token. Instead, it returns details about the token, including the token string, creation time, expiration time, and the associated user. Use this endpoint to introspect your current session token, debug authentication issues, or when a frontend application needs session token details. Any ThoughtSpot user with a valid bearer token can access this endpoint and send an API request + */ + public getCurrentUserToken(_options?: Configuration): Promise { + const result = this.api.getCurrentUserToken(_options); + return result.toPromise(); + } + + /** + * Version: 10.4.0.cl or later Creates an authentication token that provides values for the formula variables in the Row Level Security (RLS) rules for a given user. Recommended for use cases that require Attribute-based access control (ABAC) via RLS. #### Required privileges To add a new user and assign privileges during auto-creation, the `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege is required. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled, the `CONTROL_TRUSTED_AUTH` (**Can Enable or Disable Trusted Authentication**) privilege and edit access to the data source are required. To configure formula variables for all Orgs on your instance or the Primary Org, cluster administration privileges are required. Org administrators can configure formula variables for their respective Orgs. If Role-Based Access Control (RBAC) is enabled, users with the `CAN_MANAGE_VARIABLES` (**Can manage variables**) role privilege can also create and manage variables for their Org context. #### Usage guidelines You can generate a token by providing a `username` and `password`, or by using a `secret_key`. To generate a `secret_key`, the administrator must enable [Trusted authentication](https://developers.thoughtspot.com/docs/trusted-auth-secret-key) in the **Develop** > **Customizations** > **Security Settings** page. **Note**: * When both `password` and `secret_key` are included in the API request, `password` takes precedence. * If [Multi-Factor Authentication (MFA)](https://docs.thoughtspot.com/cloud/latest/authentication-local-mfa) is enabled on your instance, the API login request with `username` and `password` returns an error. You can switch to token-based authentication with `secret_key` or contact ThoughtSpot Support for assistance. The token obtained from ThoughtSpot is valid for 5 minutes by default. You can configure the token expiration time as required. #### ABAC via RLS To implement ABAC via RLS and assign security entitlements to users during session creation, generate a token with custom variable values. The values set in the authentication token are applied to the formula variables referenced in RLS rules at the table level, which determines the data each user can access based on their entitlements. The variable values can be configured to persist for a specific set of Models in user sessions initiated with the token, allowing different RLS rules to be set for different data models. Once defined, the rules are added to the user\'s `variable_values` object, after which all sessions will use the persisted values. For more information, see [ABAC via tokens Documentation](https://developers.thoughtspot.com/docs/abac-via-rls-variables). ##### Formula variables Before defining variable values, ensure the variables are created and available on your instance. To create a formula variable, you can use the **Create variable** (`/api/rest/2.0/template/variables/create`) REST API endpoint, with the variable `type` set as `Formula_Variable` in the API request. The API doesn\'t support `\"persist_option\": \"RESET\"` and `\"persist_option\": \"NONE\"` when `variable_values` are defined in the request. If you are using `variable_values` for token generation, you must use other supported persist options such as `APPEND` or `REPLACE`. If you want to use `RESET` or `NONE`, do not pass any `variable_values`. In such cases, `variable_values` will remain unaffected. #### Supported objects The supported object type is `LOGICAL_TABLE`. When using `object_id` with `variable_values`, models are supported. #### Just-in-time provisioning For [just-in-time user creation and provisioning](https://developers.thoughtspot.com/docs/just-in-time-provisioning), specify the following attributes in the API request: * `auto_create` * `username` * `display_name` * `email` * `groups` Set `auto_create` to `true` if the username does not exist in ThoughtSpot. If the username already exists in ThoughtSpot and `auto_create` is set to `true`, user properties such as display name, email, Org and group entitlements will not be updated with new values. Setting `auto_create` to `true` does not create formula variables. Hence, this setting will not be applicable to `variable_values`. #### Important point to note All options in the token creation APIs that define user access to data in ThoughtSpot will take effect during token creation, not when the token is used for authentication. For example, `auto_create:true` will create the user when the authentication token is created. Persist options such as `APPEND` and `REPLACE` will persist `variable_values` on the user profile when the token is created. + * @param getCustomAccessTokenRequest + */ + public getCustomAccessToken(getCustomAccessTokenRequest: GetCustomAccessTokenRequest, _options?: Configuration): Promise { + const result = this.api.getCustomAccessToken(getCustomAccessTokenRequest, _options); + return result.toPromise(); + } + + /** + * Version: 10.15.0.cl or later Suggests the most relevant data sources for a given natural language query, ranked by confidence with LLM-generated reasoning. Requires `CAN_USE_SPOTTER` privilege and at least view-level access to the underlying metadata entities referenced in the response. #### Usage guidelines The request must include: - `query`: the natural language question to find relevant data sources for If the request is successful, the API returns a ranked list of suggested data sources, each containing: - `confidence`: a float score indicating the model\'s confidence in the relevance of the suggestion - `details`: metadata about the data source - `data_source_identifier`: the unique ID of the data source - `data_source_name`: the display name of the data source - `description`: a description of the data source - `reasoning`: LLM-generated rationale explaining why the data source was recommended #### Error responses | Code | Description | |------|--------------------------------------------------------------------------------------------------------------------------------------------| | 401 | Unauthorized — authentication token is missing, expired, or invalid. | | 403 | Forbidden — the authenticated user does not have `CAN_USE_SPOTTER` privilege or lacks view permission on the underlying metadata entities. | > ###### Note: > * This endpoint is currently in Beta. Breaking changes may be introduced before it is made Generally Available. > * This endpoint requires Spotter — please contact ThoughtSpot Support to enable Spotter on your cluster. + * @param getDataSourceSuggestionsRequest + */ + public getDataSourceSuggestions(getDataSourceSuggestionsRequest: GetDataSourceSuggestionsRequest, _options?: Configuration): Promise { + const result = this.api.getDataSourceSuggestions(getDataSourceSuggestionsRequest, _options); + return result.toPromise(); + } + + /** + * Version: 9.0.0.cl or later Generates an authentication token for creating a full session in ThoughtSpot for a given user. Recommended for use cases that do not require Attribute-based access control (ABAC) via Row Level Security (RLS). #### Usage guidelines You can generate a token for a user by providing a `username` and `password`, or by using the `secret_key` generated for your instance. To generate a `secret_key`, the administrator must enable [Trusted authentication](https://developers.thoughtspot.com/docs/trusted-auth-secret-key) in the **Develop** > **Customizations** > **Security Settings** page. **Note**: * When both `password` and `secret_key` are included in the API request, `password` takes precedence. * If [Multi-Factor Authentication (MFA)](https://docs.thoughtspot.com/cloud/latest/authentication-local-mfa) is enabled on your instance, the API login request with `username` and `password` returns an error. You can switch to token-based authentication with `secret_key` or contact ThoughtSpot Support for assistance. The token obtained from ThoughtSpot is valid for 5 minutes by default. You can configure the token expiration time as required. #### Just-in-time provisioning For [just-in-time user creation and provisioning](https://developers.thoughtspot.com/docs/just-in-time-provisioning), specify the following attributes in the API request: * `auto_create` * `username` * `display_name` * `email` * `group_identifiers` Set `auto_create` to `true` if the username does not exist in ThoughtSpot. If the user already exists in ThoughtSpot and `auto_create` is set to `true`, user properties such as display name, email and group assignment will be updated. To add a new user and assign privileges during auto-creation, the `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege is required. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled, the `CONTROL_TRUSTED_AUTH` (**Can Enable or Disable Trusted Authentication**) privilege is required. #### Important point to note All options in the token creation APIs that define user access to data in ThoughtSpot will take effect during token creation, not when the token is used for authentication. For example, `auto_create:true` will create the user when the authentication token is created. + * @param getFullAccessTokenRequest + */ + public getFullAccessToken(getFullAccessTokenRequest: GetFullAccessTokenRequest, _options?: Configuration): Promise { + const result = this.api.getFullAccessToken(getFullAccessTokenRequest, _options); + return result.toPromise(); + } + + /** + * Version: 10.15.0.cl or later Retrieves existing natural language (NL) instructions configured for a specific data model. These instructions guide the AI system in understanding data context and generating more accurate responses. Requires `CAN_USE_SPOTTER` privilege, at least view access on the data model, and a bearer token corresponding to the org where the data model exists. #### Usage guidelines The request must include: - `data_source_identifier`: the unique ID of the data model to retrieve instructions for If the request is successful, the API returns: - `nl_instructions_info`: an array of instruction objects, each containing: - `instructions`: the configured text instructions for AI processing - `scope`: the scope of the instruction — currently only `GLOBAL` is supported #### Instructions scope - **GLOBAL**: Instructions that apply globally across the system on the given data-model (currently only global instructions are supported) #### Error responses | Code | Description | |------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| | 401 | Unauthorized — authentication token is missing, expired, or invalid. | | 403 | Forbidden — the authenticated user does not have `CAN_USE_SPOTTER` privilege, lacks view access on the data model, or the bearer token does not correspond to the org where the data model exists. | > ###### Note: > > - To use this API, the user needs at least view access on the data model, and must use the bearer token corresponding to the org where the data model exists. > - This endpoint is currently in Beta. Breaking changes may be introduced before the endpoint is made Generally Available. > - Available from version 10.15.0.cl and later. > - This endpoint requires Spotter — please contact ThoughtSpot Support to enable Spotter on your cluster. > - Use this API to review currently configured instructions before modifying them with `setNLInstructions`. + * @param getNLInstructionsRequest + */ + public getNLInstructions(getNLInstructionsRequest: GetNLInstructionsRequest, _options?: Configuration): Promise { + const result = this.api.getNLInstructions(getNLInstructionsRequest, _options); + return result.toPromise(); + } + + /** + * Version: 9.0.0.cl or later Generates an authentication token that provides access to a specific metadata object. This object list is intersected with the list of objects the user is allowed to access via group membership. For more information, see [Object security](https://docs.thoughtspot.com/cloud/latest/security-data-object#object_security). #### Usage guidelines You can generate a token for a user by providing a `username` and `password`, or by using the `secret_key` generated for your instance. To generate a `secret_key`, the administrator must enable [Trusted authentication](https://developers.thoughtspot.com/docs/trusted-auth-secret-key) in the **Develop** > **Customizations** > **Security Settings** page. **Note**: * When both `password` and `secret_key` are included in the API request, `password` takes precedence. * If [Multi-Factor Authentication (MFA)](https://docs.thoughtspot.com/cloud/latest/authentication-local-mfa) is enabled on your instance, the API login request with `username` and `password` returns an error. You can switch to token-based authentication with `secret_key` or contact ThoughtSpot Support for assistance. The token obtained from ThoughtSpot is valid for 5 minutes by default. You can configure the token expiration time as required. #### Just-in-time provisioning For [just-in-time user creation and provisioning](https://developers.thoughtspot.com/docs/just-in-time-provisioning), specify the following attributes in the API request: * `auto_create` * `username` * `display_name` * `email` * `group_identifiers` Set `auto_create` to `true` if the user is not available in ThoughtSpot. If the user already exists in ThoughtSpot and the `auto_create` parameter is set to `true`, user properties such as display name, email, and group assignment will be updated. To add a new user and assign privileges, the `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege is required. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled, the `CONTROL_TRUSTED_AUTH`(**Can Enable or Disable Trusted Authentication**) privilege is required. #### Important point to note All options in the token creation APIs that define user access to data in ThoughtSpot will take effect during token creation, not when the token is used for authentication. For example, `auto_create:true` will create the user when the authentication token is created. + * @param getObjectAccessTokenRequest + */ + public getObjectAccessToken(getObjectAccessTokenRequest: GetObjectAccessTokenRequest, _options?: Configuration): Promise { + const result = this.api.getObjectAccessToken(getObjectAccessTokenRequest, _options); + return result.toPromise(); + } + + /** + * Version: 10.13.0.cl or later Breaks down a natural language query into a series of smaller analytical sub-questions, each mapped to a relevant data source. Requires `CAN_USE_SPOTTER` privilege and at least view-level access to the referenced metadata objects. #### Usage guidelines The request must include: - `query`: the natural language question to decompose into analytical sub-questions - `metadata_context`: at least one of the following context identifiers to guide question generation: - `conversation_identifier` — an existing conversation session ID - `answer_identifiers` — a list of Answer GUIDs - `liveboard_identifiers` — a list of Liveboard GUIDs - `data_source_identifiers` — a list of data source GUIDs Optional parameters for refining the output: - `ai_context`: additional context to improve response quality - `content` — supplementary text or CSV data as string input - `instructions` — custom text instructions for the AI system - `limit_relevant_questions`: maximum number of questions to return (default: `5`) - `bypass_cache`: if `true`, forces fresh computation instead of returning cached results If the request is successful, the API returns a list of relevant analytical questions, each containing: - `query`: the generated sub-question - `data_source_identifier`: the unique ID of the data source the question targets - `data_source_name`: the display name of the corresponding data source #### Error responses | Code | Description | |------|---------------------------------------------------------------------------------------------------------------------------------------| | 401 | Unauthorized — authentication token is missing, expired, or invalid. | | 403 | Forbidden — the authenticated user does not have `CAN_USE_SPOTTER` privilege or lacks view access to the referenced metadata objects. | > ###### Note: > * This endpoint is currently in Beta. Breaking changes may be introduced before the endpoint is made Generally Available. > * This endpoint requires Spotter - please contact ThoughtSpot support to enable Spotter on your cluster. + * @param getRelevantQuestionsRequest + */ + public getRelevantQuestions(getRelevantQuestionsRequest: GetRelevantQuestionsRequest, _options?: Configuration): Promise { + const result = this.api.getRelevantQuestions(getRelevantQuestionsRequest, _options); + return result.toPromise(); + } + + /** + * Version: 9.0.0.cl or later Retrieves the current configuration details of the cluster. If the request is successful, the API returns a list configuration settings applied on the cluster. Requires `ADMINISTRATION`(**Can administer ThoughtSpot**) privilege to view these complete configuration settings of the cluster. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `SYSTEM_INFO_ADMINISTRATION` (**Can view system activities**) privilege is required. This API does not require any parameters to be passed in the request. + */ + public getSystemConfig(_options?: Configuration): Promise { + const result = this.api.getSystemConfig(_options); + return result.toPromise(); + } + + /** + * Version: 9.0.0.cl or later Gets system information such as the release version, locale, time zone, deployment environment, date format, and date time format of the cluster. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privileges. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `SYSTEM_INFO_ADMINISTRATION` (**Can view system activities**) privilege is required. This API does not require any parameters to be passed in the request. + */ + public getSystemInformation(_options?: Configuration): Promise { + const result = this.api.getSystemInformation(_options); + return result.toPromise(); + } + + /** + * Version: 9.2.0.cl or later Gets a list of configuration overrides applied on the cluster. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `APPLICATION_ADMINISTRATION` (**Can manage application settings**) privilege is required. This API does not require any parameters to be passed in the request. + */ + public getSystemOverrideInfo(_options?: Configuration): Promise { + const result = this.api.getSystemOverrideInfo(_options); + return result.toPromise(); + } + + /** + * Version: 9.0.0.cl or later Imports [TML](https://docs.thoughtspot.com/cloud/latest/tml) files into ThoughtSpot. Requires `DATAMANAGEMENT` (**Can manage data**) or `ADMINISTRATION` (**Can administer ThoughtsSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the following Data control privileges may be required: - `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) - `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` (**Can manage data models**) #### Usage guidelines * Import all related objects in a single TML Import API call. For example, Tables that use the same Connection object and Worksheets connected to these Tables. * Include the `fqn` property to distinguish objects that have the same name. For example, if you have multiple Connections or Worksheets with the same name on ThoughtSpot and the Connection or Worksheet referenced in your TML file does not have a unique name to distinguish, it may result in invalid object references. Adding `fqn` helps ThoughtSpot differentiate a Table from another with the same name. We recommend [exporting TML with FQNs](#/http/api-endpoints/metadata/export-metadata-tml) and using these during the import operation. * You can upload multiple TML files at a time. If you import a Worksheet along with Liveboards, Answers, and other dependent objects in a single API call, the imported objects will be immediately available for use. When you import only a Worksheet object, it may take some time for the Worksheet to become available in the ThoughtSpot system. Please wait for a few minutes, and then proceed to create an Answer and Liveboard from the newly imported Worksheet. For more information, see [TML Documentation](https://developers.thoughtspot.com/docs/tml#_import_a_tml). + * @param importMetadataTMLRequest + */ + public importMetadataTML(importMetadataTMLRequest: ImportMetadataTMLRequest, _options?: Configuration): Promise> { + const result = this.api.importMetadataTML(importMetadataTMLRequest, _options); + return result.toPromise(); + } + + /** + * Version: 10.4.0.cl or later Schedules a task to import [TML](https://docs.thoughtspot.com/cloud/latest/tml) files into ThoughtSpot. You can use this API endpoint to process TML objects asynchronously when importing TMLs of large and complex metadata objects into ThoughtSpot. Unlike the synchronous import TML operation, the API processes TML data in the background and returns a task ID, which can be used to check the status of the import task via `/api/rest/2.0/metadata/tml/async/status` API endpoint. Requires `DATAMANAGEMENT` (**Can manage data**) or `ADMINISTRATION` (**Can administer ThoughtsSpot**) privilege, and edit access to the TML objects. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the following Data control privileges may be required: - `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) - `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` (**Can manage data models**) #### Usage guidelines See [Async TML API Documentation](https://developers.thoughtspot.com/docs/tml#_import_tml_objects_asynchronously) for usage guidelines. + * @param importMetadataTMLAsyncRequest + */ + public importMetadataTMLAsync(importMetadataTMLAsyncRequest: ImportMetadataTMLAsyncRequest, _options?: Configuration): Promise { + const result = this.api.importMetadataTMLAsync(importMetadataTMLAsyncRequest, _options); + return result.toPromise(); + } + + /** + * Version: 9.0.0.cl or later Imports group objects from external databases into ThoughtSpot. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `GROUP_ADMINISTRATION` (**Can manage groups**) privilege is required. During the import operation: * If the specified group is not available in ThoughtSpot, it will be added to ThoughtSpot. * If `delete_unspecified_groups` is set to `true`, the groups not specified in the API request, excluding administrator and system user groups, are deleted. * If the specified groups are already available in ThoughtSpot, the object properties of these groups are modified and synchronized as per the input data in the API request. A successful API call returns the object that represents the changes made in the ThoughtSpot system. + * @param importUserGroupsRequest + */ + public importUserGroups(importUserGroupsRequest: ImportUserGroupsRequest, _options?: Configuration): Promise { + const result = this.api.importUserGroups(importUserGroupsRequest, _options); + return result.toPromise(); + } + + /** + * Version: 9.0.0.cl or later Imports user data from external databases into ThoughtSpot. During the user import operation: * If the specified users are not available in ThoughtSpot, the users are created and assigned a default password. Defining a `default_password` in the API request is optional. * If `delete_unspecified_users` is set to `true`, the users not specified in the API request, excluding the `tsadmin`, `guest`, `system` and `su` users, are deleted. * If the specified user objects are already available in ThoughtSpot, the object properties are updated and synchronized as per the input data in the API request. A successful API call returns the object that represents the changes made in the ThoughtSpot system. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `USER_ADMINISTRATION` (**Can manage users**) privilege is required. + * @param importUsersRequest + */ + public importUsers(importUsersRequest: ImportUsersRequest, _options?: Configuration): Promise { + const result = this.api.importUsers(importUsersRequest, _options); + return result.toPromise(); + } + + /** + * Version: 9.0.0.cl or later Creates a login session for a ThoughtSpot user with Basic authentication. In Basic authentication method, REST clients log in to ThoughtSpot using `username` and `password` attributes. On a multi-tenant cluster with Orgs, users can pass the ID of the Org in the API request to log in to a specific Org context. **Note**: If Multi-Factor Authentication (MFA) is enabled on your instance, the API login request with basic authentication (`username` and `password` ) returns an error. Contact ThoughtSpot Support for assistance. A successful login returns a session cookie that can be used in your subsequent API requests. + * @param loginRequest + */ + public login(loginRequest: LoginRequest, _options?: Configuration): Promise { + const result = this.api.login(loginRequest, _options); + return result.toPromise(); + } + + /** + * Version: 9.0.0.cl or later Logs out a user from their current session. + */ + public logout(_options?: Configuration): Promise { + const result = this.api.logout(_options); + return result.toPromise(); + } + + /** + * Version: 26.3.0.cl or later This API allows the addition or deletion of object level privileges for a set of users and groups, on a set of metadata objects. It provides users to access certain features based on privilege based access control. #### Usage guidelines - Specify the `operation`. The supported operations are: `ADD`, `REMOVE`. - Specify the type of the objects on which the object privileges are being provided in `metadata_type`. Only `LOGICAL_TABLE` metadata type is supported for now. It may be extended for other metadata types in future. - Specify the list of object privilege types in the `object_privilege_types` array. The supported object privilege types are: `SPOTTER_COACHING_PRIVILEGE`. - Specify the identifiers (either GUID or name) for the metadata objects in the `metadata_identifiers` array. - Specify the `type` (`USER` or `USER_GROUP`) and `identifier` (either GUID or name) of the principals to which you want to apply the given operation and given object privileges in the `principals` array. - Ensure using correct Authorization Bearer Token corresponding to specific user & org. #### Example request ```json { \"operation\": \"operation-type\", \"metadata_type\": \"metadata-type\", \"object_privilege_types\": [\"privilege-type-1\", \"privilege-type-2\"], \"metadata_identifiers\": [\"metadata-guid-or-name-1\", \"metadata-guid-or-name-1\"], \"principals\": [ { \"type\": \"type-1\", \"identifier\": \"principal-guid-or-name-1\" }, { \"type\": \"type-2\", \"identifier\": \"principal-guid-or-name-2\" } ] } ``` > ###### Note: > * Only admin users, users with edit access and users with coaching privilege on a given data-model can add or remove principals related to SPOTTER_COACHING_PRIVILEGE + * @param manageObjectPrivilegeRequest + */ + public manageObjectPrivilege(manageObjectPrivilegeRequest: ManageObjectPrivilegeRequest, _options?: Configuration): Promise { + const result = this.api.manageObjectPrivilege(manageObjectPrivilegeRequest, _options); + return result.toPromise(); + } + + /** + * Parameterize fields in metadata objects. Version: 10.9.0.cl or later **Note:** This API endpoint is deprecated and will be removed from ThoughtSpot in a future release. Use [POST /api/rest/2.0/metadata/parameterize-fields](/api/rest/2.0/metadata/parameterize-fields) instead. Allows parameterizing fields in metadata objects in ThoughtSpot. Requires appropriate permissions to modify the metadata object. The API endpoint allows parameterizing the following types of metadata objects: * Logical Tables * Connections * Connection Configs For a Logical Table the field type must be `ATTRIBUTE` and field name can be one of: * databaseName * schemaName * tableName For a Connection or Connection Config, the field type is always `CONNECTION_PROPERTY`. In this case, field_name specifies the exact property of the Connection or Connection Config that needs to be parameterized. For Connection Config, the only supported field name is: * impersonate_user + * @param parameterizeMetadataRequest + */ + public parameterizeMetadata(parameterizeMetadataRequest: ParameterizeMetadataRequest, _options?: Configuration): Promise { + const result = this.api.parameterizeMetadata(parameterizeMetadataRequest, _options); + return result.toPromise(); + } + + /** + * Parameterize multiple fields of metadata objects. For example [schemaName, databaseName] for LOGICAL_TABLE. Version: 26.5.0.cl or later Allows parameterizing multiple fields of metadata objects in ThoughtSpot. For example, you can parameterize [schemaName, databaseName] for LOGICAL_TABLE. Requires appropriate permissions to modify the metadata object. The API endpoint allows parameterizing the following types of metadata objects: * Logical Tables * Connections * Connection Configs For a Logical Table, the field type must be `ATTRIBUTE` and field names can include: * databaseName * schemaName * tableName For a Connection or Connection Config, the field type is always `CONNECTION_PROPERTY`. In this case, field_names specifies the exact properties of the Connection or Connection Config that need to be parameterized. For Connection Config, supported field names include: * impersonate_user You can parameterize multiple fields at once by providing an array of field names. + * @param parameterizeMetadataFieldsRequest + */ + public parameterizeMetadataFields(parameterizeMetadataFieldsRequest: ParameterizeMetadataFieldsRequest, _options?: Configuration): Promise { + const result = this.api.parameterizeMetadataFields(parameterizeMetadataFieldsRequest, _options); + return result.toPromise(); + } + + /** + * Version: 26.5.0.cl or later Allows publishing metadata objects across organizations in ThoughtSpot. Requires ADMINISTRATION role and TENANT scope. The API endpoint allows publishing the following types of metadata objects: * Liveboards * Answers * Logical Tables This API will essentially share the objects along with it\'s dependencies to the org admins of the orgs to which it is being published. + * @param publishMetadataRequest + */ + public publishMetadata(publishMetadataRequest: PublishMetadataRequest, _options?: Configuration): Promise { + const result = this.api.publishMetadata(publishMetadataRequest, _options); + return result.toPromise(); + } + + /** + * Update values for a variable Version: 26.4.0.cl or later Allows updating values for a specific variable in ThoughtSpot. Requires ADMINISTRATION role. The CAN_MANAGE_VARIABLES permission allows you to manage Formula Variables in the current organization scope. The API endpoint allows: * Adding new values to the variable * Replacing existing values * Deleting values from the variable * Resetting all values When updating variable values, you need to specify: * The variable identifier (ID or name) * The values to add/replace/remove * The operation to perform (ADD, REPLACE, REMOVE, RESET) Behaviour based on operation type: * ADD - Adds values to the variable if this is a list type variable, else same as replace. * REPLACE - Replaces all values of a given set of constraints with the current set of values. * REMOVE - Removes any values which match the set of conditions of the variables if this is a list type variable, else clears value. * RESET - Removes all constraints for the given variable, scope is ignored + * @param identifier Unique ID or name of the variable + * @param putVariableValuesRequest + */ + public putVariableValues(identifier: string, putVariableValuesRequest: PutVariableValuesRequest, _options?: Configuration): Promise { + const result = this.api.putVariableValues(identifier, putVariableValuesRequest, _options); + return result.toPromise(); + } + + /** + * Version: 10.7.0.cl or later **Deprecated** — Use `getRelevantQuestions` instead (available from 10.13.0.cl). Breaks down a topical or goal-oriented natural language question into smaller, actionable analytical sub-questions, each mapped to a relevant data source for independent execution. Requires `CAN_USE_SPOTTER` privilege and at least view-level access to the referenced metadata objects. #### Usage guidelines The request accepts the following parameters: - `nlsRequest`: contains the user `query` to decompose, along with optional `instructions` and `bypassCache` flag - `worksheetIds`: list of data source identifiers to scope the decomposition - `answerIds`: list of Answer GUIDs whose data guides the response - `liveboardIds`: list of Liveboard GUIDs whose data guides the response - `conversationId`: an existing conversation session ID for context continuity - `content`: supplementary text or CSV data to improve response quality - `maxDecomposedQueries`: maximum number of sub-questions to return (default: `5`) If the request is successful, the API returns a `decomposedQueryResponse` containing a list of `decomposedQueries`, each with: - `query`: the generated analytical sub-question - `worksheetId`: the unique ID of the data source the question targets - `worksheetName`: the display name of the corresponding data source #### Error responses | Code | Description | |------|---------------------------------------------------------------------------------------------------------------------------------------| | 401 | Unauthorized — authentication token is missing, expired, or invalid. | | 403 | Forbidden — the authenticated user does not have `CAN_USE_SPOTTER` privilege or lacks view access to the referenced metadata objects. | > ###### Note: > * This endpoint is deprecated since 10.13.0.cl. Use `getRelevantQuestions` for new integrations. > * This endpoint is currently in Beta. Breaking changes may be introduced before the endpoint is made Generally Available. > * This endpoint requires Spotter — please contact ThoughtSpot support to enable Spotter on your cluster. + * @param queryGetDecomposedQueryRequest + */ + public queryGetDecomposedQuery(queryGetDecomposedQueryRequest: QueryGetDecomposedQueryRequest, _options?: Configuration): Promise { + const result = this.api.queryGetDecomposedQuery(queryGetDecomposedQueryRequest, _options); + return result.toPromise(); + } + + /** + * Version: 9.0.0.cl or later Resets the password of a user account. Administrators can reset password on behalf of a user. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `USER_ADMINISTRATION` (**Can manage users**) privilege is required. + * @param resetUserPasswordRequest + */ + public resetUserPassword(resetUserPasswordRequest: ResetUserPasswordRequest, _options?: Configuration): Promise { + const result = this.api.resetUserPassword(resetUserPasswordRequest, _options); + return result.toPromise(); + } + + /** + * Version: 9.2.0.cl or later Reverts TML objects to a previous commit specified in the API request. Requires at least edit access to objects. In the API request, specify the `commit_id`. If the branch name is not specified in the request, the API will consider the default branch configured on your instance. By default, the API reverts all objects. If the revert operation fails for one of the objects provided in the commit, the API returns an error and does not revert any object. For more information, see [Git integration documentation](https://developers.thoughtspot.com/docs/git-integration). + * @param commitId Commit id to which the object should be reverted + * @param revertCommitRequest + */ + public revertCommit(commitId: string, revertCommitRequest: RevertCommitRequest, _options?: Configuration): Promise { + const result = this.api.revertCommit(commitId, revertCommitRequest, _options); + return result.toPromise(); + } + + /** + * Version: 26.2.0.cl or later Revokes OAuth refresh tokens for users who no longer require access to a data warehouse connection. When a token is revoked, the affected user\'s session for that connection is terminated, and they must re-authenticate to regain access. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) or `DATAMANAGEMENT` (**Can manage data**) privileges. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on the ThoughtSpot instance, users with `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) privilege can also make API requests to revoke tokens for connection users. #### Usage guidelines You can specify different combinations of identifiers to control which refresh tokens are revoked. - **connection_identifier**: Revokes refresh tokens for all users of the connection, except the connection author. - **connection_identifier** and **user_identifiers**: Revokes refresh tokens only for the users specified in the request. If the name or ID of the connection author is included in the request, their token will also be revoked. - **connection_identifier** and **configuration_identifiers**: Revokes refresh tokens for all users on the specified configurations, except the configuration author. - **connection_identifier**, **configuration_identifiers**, and **user_identifiers**: Revokes refresh tokens for the specified users on the specified configurations. - **connection_identifier** and **org_identifiers**: Revokes refresh tokens for the specified Orgs. Applicable only for published connections. - **connection_identifier**, **org_identifiers**, and **user_identifiers**: Revokes refresh tokens for the specified users in the specified Orgs. Applicable only for published connections. **NOTE**: The `org_identifiers` parameter is only applicable for published connections. Using this parameter for unpublished connections will result in an error. Ensure that the connections are published before making the API request. + * @param connectionIdentifier Unique ID or name of the connection whose refresh tokens need to be revoked. All the users associated with the connection will have their refresh tokens revoked except the author. + * @param revokeRefreshTokensRequest + */ + public revokeRefreshTokens(connectionIdentifier: string, revokeRefreshTokensRequest: RevokeRefreshTokensRequest, _options?: Configuration): Promise { + const result = this.api.revokeRefreshTokens(connectionIdentifier, revokeRefreshTokensRequest, _options); + return result.toPromise(); + } + + /** + * Version: 9.0.0.cl or later Revokes the authentication token issued for current user session. The token of your current session expires when you make a call to the `/api/rest/2.0/auth/token/revoke` endpoint. the users will not be able to access ThoughtSpot objects until a new token is obtained. To restart your session, request for a new token from ThoughtSpot. See [Get Full Access Token](#/http/api-endpoints/authentication/get-full-access-token). + * @param revokeTokenRequest + */ + public revokeToken(revokeTokenRequest: RevokeTokenRequest, _options?: Configuration): Promise { + const result = this.api.revokeToken(revokeTokenRequest, _options); + return result.toPromise(); + } + + /** + * Version: 26.6.0.cl or later Returns the authentication configuration for the specified auth type at cluster and org level. Currently supports `TRUSTED_AUTH`. #### Required privileges Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) or `CONTROL_TRUSTED_AUTH` (**Can Enable or Disable Trusted Authentication**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled, the `CONTROL_TRUSTED_AUTH` privilege is required. #### Usage guidelines Use `scope` to control which level of settings are returned: - `CLUSTER` — Returns cluster-level authentication status and access tokens. Accessible only from the Primary Org. - `ORG` — Returns org-level authentication status and access tokens for the current Org. Requires the per-Org authentication feature to be enabled on your instance. - If `scope` is omitted, both cluster and org-level settings are returned based on the caller\'s org context and feature availability. The `access_tokens` array in `cluster_preferences` or `org_preferences` is omitted when no token is configured at that level. **Note**: Access tokens returned in the response are sensitive credentials. Treat them with the same care as passwords. + * @param searchAuthSettingsRequest + */ + public searchAuthSettings(searchAuthSettingsRequest: SearchAuthSettingsRequest, _options?: Configuration): Promise { + const result = this.api.searchAuthSettings(searchAuthSettingsRequest, _options); + return result.toPromise(); + } + + /** + * Version: 10.12.0.cl or later Gets a list of [custom calendars](https://docs.thoughtspot.com/cloud/latest/connections-cust-cal). Requires `DATAMANAGEMENT` (**Can manage data**) or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your ThoughtSpot instance, the `CAN_MANAGE_CUSTOM_CALENDAR` (**Can manage custom calendars**) privilege is required. #### Usage guidelines By default, the API returns a list of custom calendars for all connection objects. To retrieve custom calendar details for a particular connection, specify the connection ID. You can also use other search parameters such as `name_pattern` and `sort_options` as search filters. The `name_pattern` parameter filters and returns only those objects that match the specified pattern. Use `%` as a wildcard for pattern matching. + * @param searchCalendarsRequest + */ + public searchCalendars(searchCalendarsRequest: SearchCalendarsRequest, _options?: Configuration): Promise> { + const result = this.api.searchCalendars(searchCalendarsRequest, _options); + return result.toPromise(); + } + + /** + * Version: 26.4.0.cl or later Searches delivery history for communication channels such as webhooks. Returns channel-level delivery status for each job execution record. Use this to monitor channel health and delivery success rates across events. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) or `DEVELOPER` (**Has developer privilege**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, users with `CAN_MANAGE_WEBHOOKS` (**Can manage webhooks**) privilege are also authorized to perform this action. **NOTE**: When `channel_type` is `WEBHOOK`, the following constraints apply: - `job_ids`, `channel_identifiers`, and `events` each accept at most one element. - When `job_ids` is provided, it is used as the sole lookup key and other filter fields are ignored. - When `job_ids` is not provided, `channel_identifiers` and `events` are both required, each containing exactly one element. - Records older than the configured retention period are not returned. - Use `start_epoch_time_in_millis` and/or `end_epoch_time_in_millis` to narrow results to a specific time window. + * @param searchChannelHistoryRequest + */ + public searchChannelHistory(searchChannelHistoryRequest: SearchChannelHistoryRequest, _options?: Configuration): Promise { + const result = this.api.searchChannelHistory(searchChannelHistoryRequest, _options); + return result.toPromise(); + } + + /** + * Version: 26.4.0.cl or later Gets a list of collections available in ThoughtSpot. To get details of a specific collection, specify the collection GUID or name. You can also filter the API response based on the collection name pattern, author, and other criteria. #### Search options * **name_pattern**: Use \'%\' as a wildcard character to match collection names * **collection_identifiers**: Search for specific collections by their GUIDs or names * **include_metadata**: When set to `true`, includes the metadata objects within each collection in the response **NOTE**: If the API returns an empty list, consider increasing the value of the `record_size` parameter. To search across all available collections, set `record_size` to `-1`. + * @param searchCollectionsRequest + */ + public searchCollections(searchCollectionsRequest: SearchCollectionsRequest, _options?: Configuration): Promise { + const result = this.api.searchCollections(searchCollectionsRequest, _options); + return result.toPromise(); + } + + /** + * Version: 9.2.0.cl or later Gets a list of commits for a given metadata object. Requires `DATAMANAGEMENT` (**Can manage data**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance on your instance, the `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` (**Can manage data models**) privilege and edit access to the metadata objects. + * @param searchCommitsRequest + */ + public searchCommits(searchCommitsRequest: SearchCommitsRequest, _options?: Configuration): Promise> { + const result = this.api.searchCommits(searchCommitsRequest, _options); + return result.toPromise(); + } + + /** + * Version: 10.14.0.cl or later Fetch communication channel preferences. - Use `cluster_preferences` to fetch the default preferences for your ThoughtSpot application instance. - If your instance has [Orgs](https://docs.thoughtspot.com/cloud/latest/orgs-overview), use `org_preferences` to fetch any Org-specific preferences that override the defaults. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) or `DEVELOPER` (**Has developer privilege**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, users with `APPLICATION_ADMINISTRATION` (**Can manage application settings**) privilege are also authorized to perform this action. + * @param searchCommunicationChannelPreferencesRequest + */ + public searchCommunicationChannelPreferences(searchCommunicationChannelPreferencesRequest: SearchCommunicationChannelPreferencesRequest, _options?: Configuration): Promise { + const result = this.api.searchCommunicationChannelPreferences(searchCommunicationChannelPreferencesRequest, _options); + return result.toPromise(); + } + + /** + * Version: 9.2.0.cl or later Gets Git repository connections configured on the ThoughtSpot instance. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance on your instance, the `CAN_SETUP_VERSION_CONTROL` (**Can set up version control**) privilege. + * @param searchConfigRequest + */ + public searchConfig(searchConfigRequest: SearchConfigRequest, _options?: Configuration): Promise> { + const result = this.api.searchConfig(searchConfigRequest, _options); + return result.toPromise(); + } + + /** + * Version: 9.2.0.cl or later Gets connection objects. Requires `DATAMANAGEMENT` (**Can manage data**) or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) privilege is required. - To get a list of all connections available in the ThoughtSpot system, send the API request without any attributes in the request body. - To get the connection objects for a specific type of data warehouse, specify the type in `data_warehouse_types`. - To fetch details of a connection object, specify the connection object GUID or name. The `name_pattern` attribute allows passing partial text with `%` for a wildcard match. - To get details of the database, schemas, tables, or columns from a data connection object, specify `data_warehouse_object_type`. - To get a specific database, schema, table, or column from a connection object, define the object type in `data_warehouse_object_type` and object properties in the `data_warehouse_objects` array. For example, to search for a column, you must pass the database, schema, and table names in the API request. Note that in the following example, object properties are set in a hierarchical order (`database` > `schema` > `table` > `column`). ``` { \"connections\": [ { \"identifier\": \"b9d1f2ef-fa65-4a4b-994e-30fa2d57b0c2\", \"data_warehouse_objects\": [ { \"database\": \"NEBULADEV\", \"schema\": \"INFORMATION_SCHEMA\", \"table\": \"APPLICABLE_ROLES\", \"column\": \"ROLE_NAME\" } ] } ], \"data_warehouse_object_type\": \"COLUMN\" } ``` - To fetch data by `configuration`, specify `data_warehouse_object_type`. For example, to fetch columns from the `DEVELOPMENT` database, specify the `data_warehouse_object_type` as `DATABASE` and define the `configuration` string as `{\"database\":\"DEVELOPMENT\"}`. To get column data for a specific table, specify the table, for example,`{\"database\":\"RETAILAPPAREL\",\"table\":\"PIPES\"}`. - To query connections by `authentication_type`, specify `data_warehouse_object_type`. Supported values for `authentication_type` are: - `SERVICE_ACCOUNT`: For connections that require service account credentials to authenticate to the Cloud Data Warehouse and fetch data. - `OAUTH`: For connections that require OAuth credentials to authenticate to the Cloud Data Warehouse and fetch data. Teradata, Oracle, and Presto Cloud Data Warehouses do not support the OAuth authentication type. - `IAM`: For connections that have the IAM OAuth set up. This authentication type is supported on Amazon Redshift connections only. - `EXTOAUTH`: For connections that have External OAuth set up. ThoughtSpot supports external [OAuth with Microsoft Azure Active Directory (AD)](https://docs.thoughtspot.com/cloud/latest/ connections-snowflake-azure-ad-oauth) and [Okta for Snowflake data connections](https://docs.thoughtspot.com/cloud/latest/connections-snowflake-okta-oauth). - `KEY_PAIR`: For connections that require Key Pair account credentials to authenticate to the Cloud Data Warehouse and fetch data. This authentication type is supported on Snowflake connections only. - `OAUTH_WITH_PKCE`: For connections that require OAuth with PKCE account credentials to authenticate to the Cloud Data Warehouse and fetch data. This authentication type is supported on Snowflake, Starburst, Databricks, Denodo connections only. - `EXTOAUTH_WITH_PKCE`: For connections that require External OAuth With PKCE account credentials to authenticate to the Cloud Data Warehouse and fetch data. This authentication type is supported on Snowflake connections only. - `OAUTH_WITH_PEZ`: For connections that require OAuth With PEZ account credentials to authenticate to the Cloud Data Warehouse and fetch data. This authentication type is supported on Amazon Redshift connections only. - `OAUTH_WITH_SERVICE_PRINCIPAL`: For connections that require OAuth With Service Principal account credentials to authenticate to the Cloud Data Warehouse and fetch data. This authentication type is supported on Databricks connections only. - `PERSONAL_ACCESS_TOKEN`: For connections that require Personal Access Token account credentials to authenticate to the Cloud Data Warehouse and fetch data. This authentication type is supported on Databricks connections only. - `OAUTH_CLIENT_CREDENTIALS`: For connections that require OAuth Client Credentials to authenticate to the Cloud Data Warehouse and fetch data. This authentication type is supported on Snowflake connections only. - To include more details about connection objects in the API response, set `include_details` to `true`. - You can also sort the output by field names and filter connections by tags. **NOTE**: When filtering connection records by parameters other than `data_warehouse_types` or `tag_identifiers`, ensure that you set `record_size` to `-1` and `record_offset` to `0` for precise results. + * @param searchConnectionRequest + */ + public searchConnection(searchConnectionRequest: SearchConnectionRequest, _options?: Configuration): Promise> { + const result = this.api.searchConnection(searchConnectionRequest, _options); + return result.toPromise(); + } + + /** + * Version: 9.6.0.cl or later Gets custom actions configured on the cluster. Requires `DEVELOPER` (**Has Developer privilege**) or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `DEVELOPER` (**Has developer privilege**) privilege is required. + * @param searchCustomActionsRequest + */ + public searchCustomActions(searchCustomActionsRequest: SearchCustomActionsRequest, _options?: Configuration): Promise> { + const result = this.api.searchCustomActions(searchCustomActionsRequest, _options); + return result.toPromise(); + } + + /** + * Version: 9.0.0.cl or later Generates an Answer from a given data source. Requires at least view access to the data source object (Worksheet or View). #### Usage guidelines To search data, specify the data source GUID in `logical_table_identifier`. The data source can be a Worksheet, View, Table, or SQL view. Pass search tokens in the `query_string` attribute in the API request as shown in the following example: ``` { \"query_string\": \"[sales] by [store]\", \"logical_table_identifier\": \"cd252e5c-b552-49a8-821d-3eadaa049cca\", } ``` For more information about the `query_string` format and data source attribute, see [Search data API](https://developers.thoughtspot.com/docs/fetch-data-and-report-apis#_search_data_api). The `record_size` attribute determines the number of records to retrieve in an API call. For more information about pagination, record size, and maximum row limit, see [Pagination and record size settings](https://developers.thoughtspot.com/docs/fetch-data-and-report-apis#_pagination_settings_for_data_and_report_api). + * @param searchDataRequest + */ + public searchData(searchDataRequest: SearchDataRequest, _options?: Configuration): Promise { + const result = this.api.searchData(searchDataRequest, _options); + return result.toPromise(); + } + + /** + * Version: 10.10.0.cl or later Search the email customization configuration if any set for the ThoughtSpot system. #### Pre-requisites Requires `DEVELOPER` (**has developer privilege**) or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `DEVELOPER` (**Has developer privilege**) privilege is required. **NOTE**:This endpoint in currently in beta. Contact ThoughtSpot support to enable this on your instance. + * @param searchEmailCustomizationRequest + */ + public searchEmailCustomization(searchEmailCustomizationRequest: SearchEmailCustomizationRequest, _options?: Configuration): Promise> { + const result = this.api.searchEmailCustomization(searchEmailCustomizationRequest, _options); + return result.toPromise(); + } + + /** + * Version: 9.0.0.cl or later Gets a list of metadata objects available on the ThoughtSpot system. This API endpoint is available to all users who have view access to the object. Users with `ADMINISTRATION` (**Can administer ThoughtSpot**) privileges can view data for all metadata objects, including users and groups. #### Usage guidelines - To get all metadata objects, send the API request without any attributes. - To get metadata objects of a specific type, set the `type` attribute. For example, to fetch a Worksheet, set the type as `LOGICAL_TABLE`. - To filter metadata objects within type `LOGICAL_TABLE`, set the `subtypes` attribute. For example, to fetch a Worksheet, set the type as `LOGICAL_TABLE` & subtypes as `[WORKSHEET]`. - To get a specific metadata object, specify the GUID. - To customize your search and filter the API response, you can use several parameters. You can search for objects created or modified by specific users, by tags applied to the objects, or by using the include parameters like `include_auto_created_objects`, `include_dependent_objects`, `include_headers`, `include_incomplete_objects`, and so on. You can also define sorting options to sort the data retrieved in the API response. - To get discoverable objects when linientmodel is enabled you can use `include_discoverable_objects` as true else false. Default value is true. - For liveboard metadata type, to get the newer format, set the `liveboard_response_format` as V2. Default value is V1. - To retrieve only objects that are published, set the `include_only_published_objects` as true. Default value is false. **NOTE**: The following parameters support pagination of metadata records: - `tag_identifiers` - `type` - `subtypes` - `created_by_user_identifiers` - `modified_by_user_identifiers` - `owned_by_user_identifiers` - `exclude_objects` - `include_auto_created_objects` - `favorite_object_options` - `include_only_published_objects` If you are using other parameters to search metadata, set `record_size` to `-1` and `record_offset` to `0`. + * @param searchMetadataRequest + */ + public searchMetadata(searchMetadataRequest: SearchMetadataRequest, _options?: Configuration): Promise> { + const result = this.api.searchMetadata(searchMetadataRequest, _options); + return result.toPromise(); + } + + /** + * Version: 9.0.0.cl or later Gets a list of Orgs configured on the ThoughtSpot system. To get details of a specific Org, specify the Org ID or name. You can also pass parameters such as status, visibility, and user identifiers to get a specific list of Orgs. Requires cluster administration (**Can administer Org**) privileges. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `ORG_ADMINISTRATION` (**Can manage Orgs**) privilege is required. + * @param searchOrgsRequest + */ + public searchOrgs(searchOrgsRequest: SearchOrgsRequest, _options?: Configuration): Promise> { + const result = this.api.searchOrgs(searchOrgsRequest, _options); + return result.toPromise(); + } + + /** + * Version: 9.5.0.cl or later Gets a list of Role objects from the ThoughtSpot system. Available if [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance. To search for Roles, the `ROLE_ADMINISTRATION` (**Can manage roles**) privilege is required. To get details of a specific Role object, specify the GUID or name. You can also filter the API response based on user group and Org identifiers, privileges assigned to the Role, and deprecation status. + * @param searchRolesRequest + */ + public searchRoles(searchRolesRequest: SearchRolesRequest, _options?: Configuration): Promise> { + const result = this.api.searchRoles(searchRolesRequest, _options); + return result.toPromise(); + } + + /** + * Search Schedules Version: 9.4.0.cl or later Gets a list of scheduled jobs configured for a Liveboard. To get details of a specific scheduled job, specify the name or GUID of the scheduled job. Requires at least view access to Liveboards. **NOTE**: When filtering schedules by parameters other than `metadata`, set `record_size` to `-1` and `record_offset` to `0` for accurate results. + * @param searchSchedulesRequest + */ + public searchSchedules(searchSchedulesRequest: SearchSchedulesRequest, _options?: Configuration): Promise> { + const result = this.api.searchSchedules(searchSchedulesRequest, _options); + return result.toPromise(); + } + + /** + * Version: 26.2.0.cl or later Fetch security settings for your ThoughtSpot application instance. - Use `scope: CLUSTER` to retrieve cluster-level security settings, including CORS and CSP allowlists, SAML redirect URLs, and settings that control access to non-embedded pages. - Use `scope: ORG` to retrieve Org-level security settings. If your instance has [Orgs](https://docs.thoughtspot.com/cloud/latest/orgs-overview), this returns CORS and non-embed access settings specific to the Org. - If `scope` is not specified, returns both cluster and Org-specific settings based on user privileges. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) or `DEVELOPER` (**Has developer privilege**) privilege. See [Security Settings](https://developers.thoughtspot.com/docs/security-settings) for more details. + * @param searchSecuritySettingsRequest + */ + public searchSecuritySettings(searchSecuritySettingsRequest: SearchSecuritySettingsRequest, _options?: Configuration): Promise { + const result = this.api.searchSecuritySettings(searchSecuritySettingsRequest, _options); + return result.toPromise(); + } + + /** + * Version: 9.0.0.cl or later Gets a list of tag objects available on the ThoughtSpot system. To get details of a specific tag object, specify the GUID or name. Any authenticated user can search for tag objects. + * @param searchTagsRequest + */ + public searchTags(searchTagsRequest: SearchTagsRequest, _options?: Configuration): Promise> { + const result = this.api.searchTags(searchTagsRequest, _options); + return result.toPromise(); + } + + /** + * Version: 9.0.0.cl or later Gets a list of user group objects from the ThoughtSpot system. To get details of a specific user group, specify the user group GUID or name. You can also filter the API response based on User ID, Org ID, Role ID, type of group, sharing visibility, privileges assigned to the group, and the Liveboard IDs assigned to the users in the group. Available to all users. Users with `ADMINISTRATION` (**Can administer ThoughtSpot**) privileges can view all users properties. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `GROUP_ADMINISTRATION` (**Can manage groups**) privilege is required. **NOTE**: If you do not get precise results, try setting `record_size` to `-1` and `record_offset` to `0`. + * @param searchUserGroupsRequest + */ + public searchUserGroups(searchUserGroupsRequest: SearchUserGroupsRequest, _options?: Configuration): Promise> { + const result = this.api.searchUserGroups(searchUserGroupsRequest, _options); + return result.toPromise(); + } + + /** + * Version: 9.0.0.cl or later Gets a list of users available on the ThoughtSpot system. To get details of a specific user, specify the user GUID or name. You can also filter the API response based on groups, Org ID, user visibility, account status, user type, and user preference settings and favorites. Available to all users. Users with `ADMINISTRATION` (**Can administer ThoughtSpot**) privileges can view all users properties. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `USER_ADMINISTRATION` (**Can manage users**) privilege is required. **NOTE**: If the API returns an empty list, consider increasing the value of the `record_size` parameter. To search across all available users, set `record_size` to `-1`. + * @param searchUsersRequest + */ + public searchUsers(searchUsersRequest: SearchUsersRequest, _options?: Configuration): Promise> { + const result = this.api.searchUsers(searchUsersRequest, _options); + return result.toPromise(); + } + + /** + * Search variables Version: 26.4.0.cl or later Allows searching for variables in ThoughtSpot. Requires ADMINISTRATION role. The CAN_MANAGE_VARIABLES permission allows you to manage Formula Variables in the current organization scope. The API endpoint supports searching variables by: * Variable identifier (ID or name) * Variable type * Name pattern (case-insensitive, supports % for wildcard) The search results can be formatted in three ways: * METADATA - Returns only variable metadata (default) * METADATA_AND_VALUES - Returns variable metadata and values The values can be filtered by scope: * org_identifier * principal_identifier * model_identifier + * @param searchVariablesRequest + */ + public searchVariables(searchVariablesRequest: SearchVariablesRequest, _options?: Configuration): Promise> { + const result = this.api.searchVariables(searchVariablesRequest, _options); + return result.toPromise(); + } + + /** + * Version: 10.14.0.cl or later Searches for webhook configurations based on various criteria such as Org, webhook identifier, event type, with support for pagination and sorting. Returns matching webhook configurations with their complete details. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) or `DEVELOPER` (**Has developer privilege**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, users with `CAN_MANAGE_WEBHOOKS` (**Can manage webhooks**) privilege are also authorized to perform this action. + * @param searchWebhookConfigurationsRequest + */ + public searchWebhookConfigurations(searchWebhookConfigurationsRequest: SearchWebhookConfigurationsRequest, _options?: Configuration): Promise { + const result = this.api.searchWebhookConfigurations(searchWebhookConfigurationsRequest, _options); + return result.toPromise(); + } + + /** + * Version: 26.5.0.cl or later Sends natural language messages to an existing Spotter agent conversation and returns the complete response synchronously. Requires `CAN_USE_SPOTTER` privilege and access to the metadata object associated with the conversation. The user must have access to the conversation session referenced by `conversation_identifier`. A conversation must first be created using the `createAgentConversation` API. #### Usage guidelines The request must include: - `conversation_identifier`: the unique session ID returned by `createAgentConversation`, used for context continuity and message tracking - `messages`: an array of one or more text messages to send to the agent The API returns an array of response objects, each containing: - `type`: the kind of response — `text`, `answer`, or `error` - `message`: the main content of the response - `metadata`: additional information depending on the message type (e.g., answer metadata includes analytics and visualization details) #### Error responses | Code | Description | |------|----------------------------------------------------------------------------------------------------------------------------------| | 401 | Unauthorized — authentication token is missing, expired, or invalid. | | 403 | Forbidden — the authenticated user does not have `CAN_USE_SPOTTER` privilege or lacks permission on the referenced conversation. | > ###### Note: > > - This endpoint is Generally Available from version 26.5.0.cl. > - This endpoint requires Spotter - please contact ThoughtSpot support to enable Spotter on your cluster. > - For real-time streamed responses, use `sendAgentConversationMessageStreaming` instead. + * @param conversationIdentifier Unique identifier for the conversation (used to track context) + * @param sendAgentConversationMessageRequest + */ + public sendAgentConversationMessage(conversationIdentifier: string, sendAgentConversationMessageRequest: SendAgentConversationMessageRequest, _options?: Configuration): Promise { + const result = this.api.sendAgentConversationMessage(conversationIdentifier, sendAgentConversationMessageRequest, _options); + return result.toPromise(); + } + + /** + * Version: 26.5.0.cl or later Sends one or more natural language messages to an existing Spotter agent conversation and returns the response as a real-time Server-Sent Events stream. Requires `CAN_USE_SPOTTER` privilege and access to the metadata object associated with the conversation. The user must have access to the conversation session referenced by `conversation_identifier`. A conversation must first be created using the `createAgentConversation` API. #### Usage guidelines The request must include: - `conversation_identifier`: the unique session ID returned by `createAgentConversation`, used for context continuity and message tracking - `messages`: an array of one or more text messages to send to the agent If the request is valid, the API returns a Server-Sent Events (SSE) stream. Each line has the form `data: [{\"type\": \"...\", ...}]` — a JSON array of event objects. Event types include: - `ack`: confirms receipt of the request (`node_id`) - `conv_title`: conversation title (`title`, `conv_id`) - `notification`: status updates on operations (`group_id`, `metadata`, `code` — e.g. `TOOL_CALL_NOTIFICATION`, `nls_start`, `FINAL_RESPONSE_NOTIFICATION`) - `text-chunk`: incremental content chunks (`id`, `group_id`, `metadata` with `format` and `type` such as `thinking` or `text`, `content`) - `text`: full text block with same structure as `text-chunk` - `answer`: structured answer with metadata (`id`, `group_id`, `metadata` with `sage_query`, `session_id`, `title`, etc., `title`) - `error`: if a failure occurs #### Error responses | Code | Description | | ---- | -------------------------------------------------------------------------------------------------------------------------------- | | 401 | Unauthorized — authentication token is missing, expired, or invalid. | | 403 | Forbidden — the authenticated user does not have `CAN_USE_SPOTTER` privilege or lacks permission on the referenced conversation. | > ###### Note: > > - This endpoint is Generally Available from version 26.5.0.cl. > - This endpoint requires Spotter - please contact ThoughtSpot support to enable Spotter on your cluster. > - The streaming protocol uses Server-Sent Events (SSE). > - For the complete response in a single payload, use `sendAgentConversationMessage` instead. + * @param conversationIdentifier Unique identifier for the conversation (used to track context) + * @param sendAgentConversationMessageStreamingRequest + */ + public sendAgentConversationMessageStreaming(conversationIdentifier: string, sendAgentConversationMessageStreamingRequest: SendAgentConversationMessageStreamingRequest, _options?: Configuration): Promise { + const result = this.api.sendAgentConversationMessageStreaming(conversationIdentifier, sendAgentConversationMessageStreamingRequest, _options); + return result.toPromise(); + } + + /** + * Version: 26.2.0.cl or later **Deprecated** — Use `sendAgentConversationMessage` instead. Send natural language messages to an existing Spotter agent conversation and returns the complete response synchronously. Requires `CAN_USE_SPOTTER` privilege and access to the metadata object associated with the conversation. The user must have access to the conversation session referenced by `conversation_identifier`. A conversation must first be created using the `createAgentConversation` API. #### Usage guidelines The request must include: - `conversation_identifier`: the unique session ID returned by `createAgentConversation`, used for context continuity and message tracking - `messages`: an array of one or more text messages to send to the agent The API returns an array of response objects, each containing: - `type`: the kind of response — `text`, `answer`, or `error` - `message`: the main content of the response - `metadata`: additional information depending on the message type (e.g., answer metadata includes analytics and visualization details) #### Error responses | Code | Description | |------|----------------------------------------------------------------------------------------------------------------------------------| | 401 | Unauthorized — authentication token is missing, expired, or invalid. | | 403 | Forbidden — the authenticated user does not have `CAN_USE_SPOTTER` privilege or lacks permission on the referenced conversation. | > ###### Note: > > - This endpoint is deprecated. Use `sendAgentConversationMessage` for new integrations. > - This endpoint is currently in Beta. Breaking changes may be introduced before the endpoint is made Generally Available. > - This endpoint requires Spotter - please contact ThoughtSpot support to enable Spotter on your cluster. + * @param conversationIdentifier Unique identifier for the conversation (used to track context) + * @param sendAgentMessageRequest + */ + public sendAgentMessage(conversationIdentifier: string, sendAgentMessageRequest: SendAgentMessageRequest, _options?: Configuration): Promise { + const result = this.api.sendAgentMessage(conversationIdentifier, sendAgentMessageRequest, _options); + return result.toPromise(); + } + + /** + * Version: 26.2.0.cl or later **Deprecated** — Use `sendAgentConversationMessageStreaming` instead. Sends one or more natural language messages to an existing Spotter agent conversation and returns the response as a real-time Server-Sent Events stream. Requires `CAN_USE_SPOTTER` privilege and access to the metadata object associated with the conversation. The user must have access to the conversation session referenced by `conversation_identifier`. A conversation must first be created using the `createAgentConversation` API. #### Usage guidelines The request must include: - `conversation_identifier`: the unique session ID returned by `createAgentConversation`, used for context continuity and message tracking - `messages`: an array of one or more text messages to send to the agent If the request is valid, the API returns a Server-Sent Events (SSE) stream. Each line has the form `data: [{\"type\": \"...\", ...}]` — a JSON array of event objects. Event types include: - `ack`: confirms receipt of the request (`node_id`) - `conv_title`: conversation title (`title`, `conv_id`) - `notification`: status updates on operations (`group_id`, `metadata`, `code` — e.g. `TOOL_CALL_NOTIFICATION`, `nls_start`, `FINAL_RESPONSE_NOTIFICATION`) - `text-chunk`: incremental content chunks (`id`, `group_id`, `metadata` with `format` and `type` such as `thinking` or `text`, `content`) - `text`: full text block with same structure as `text-chunk` - `answer`: structured answer with metadata (`id`, `group_id`, `metadata` with `sage_query`, `session_id`, `title`, etc., `title`) - `error`: if a failure occurs #### Error responses | Code | Description | |------|----------------------------------------------------------------------------------------------------------------------------------| | 401 | Unauthorized — authentication token is missing, expired, or invalid. | | 403 | Forbidden — the authenticated user does not have `CAN_USE_SPOTTER` privilege or lacks permission on the referenced conversation. | > ###### Note: > > - This endpoint is deprecated. Use `sendAgentConversationMessageStreaming` for new integrations. > - This endpoint is currently in Beta. Breaking changes may be introduced before the endpoint is made Generally Available. > - This endpoint requires Spotter - please contact ThoughtSpot support to enable Spotter on your cluster. > - The streaming protocol uses Server-Sent Events (SSE). + * @param sendAgentMessageStreamingRequest + */ + public sendAgentMessageStreaming(sendAgentMessageStreamingRequest: SendAgentMessageStreamingRequest, _options?: Configuration): Promise { + const result = this.api.sendAgentMessageStreaming(sendAgentMessageStreamingRequest, _options); + return result.toPromise(); + } + + /** + * Version: 10.4.0.cl or later Sends a follow-up message to an existing conversation within the context of a data model. Requires `CAN_USE_SPOTTER` privilege and at least view access to the metadata object specified in the request. A conversation must first be created using the `createConversation` API. #### Usage guidelines The request must include: - `conversation_identifier`: the unique session ID returned by `createConversation` - `metadata_identifier`: the unique ID of the data source used for the conversation - `message`: a natural language string with the follow-up question If the request is successful, the API returns an array of response messages, each containing: - `session_identifier`: the unique ID of the generated response - `generation_number`: the generation number of the response - `message_type`: the type of the response (e.g., `TSAnswer`) - `visualization_type`: the generated visualization type (`Chart`, `Table`, or `Undefined`) - `tokens` / `display_tokens`: the search tokens and user-friendly display tokens for the response #### Error responses | Code | Description | |------|-----------------------------------------------------------------------------------------------------------------------------------------| | 401 | Unauthorized — authentication token is missing, expired, or invalid. | | 403 | Forbidden — the authenticated user does not have `CAN_USE_SPOTTER` privilege or lacks view permission on the specified metadata object. | > ###### Note: > * This endpoint is currently in Beta. Breaking changes may be introduced before the endpoint is made Generally Available. > * This endpoint requires Spotter - please contact ThoughtSpot support to enable Spotter on your cluster. + * @param conversationIdentifier Unique identifier of the conversation. + * @param sendMessageRequest + */ + public sendMessage(conversationIdentifier: string, sendMessageRequest: SendMessageRequest, _options?: Configuration): Promise> { + const result = this.api.sendMessage(conversationIdentifier, sendMessageRequest, _options); + return result.toPromise(); + } + + /** + * Version: 10.15.0.cl or later This API allows users to set natural language (NL) instructions for a specific data-model to improve AI-generated answers and query processing. These instructions help guide the AI system to better understand the data context and provide more accurate responses. Requires `CAN_USE_SPOTTER` privilege, either edit access or `SPOTTER_COACHING_PRIVILEGE` on the data model, and a bearer token corresponding to the org where the data model exists. #### Usage guidelines To set NL instructions for a data-model, the request must include: - `data_source_identifier`: The unique ID of the data-model for which to set NL instructions - `nl_instructions_info`: An array of instruction objects, each containing: - `instructions`: Array of text instructions for the LLM - `scope`: The scope of the instruction (`GLOBAL`). Currently only `GLOBAL` is supported. It can be extended to data-model-user scope in future. #### Instructions scope - **GLOBAL**: instructions that apply to all users querying this data model If the request is successful, the API returns: - `success`: a boolean indicating whether the operation completed successfully #### Error responses | Code | Description | |------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| | 401 | Unauthorized — authentication token is missing, expired, or invalid. | | 403 | Forbidden — the authenticated user does not have `CAN_USE_SPOTTER` privilege, lacks edit access or `SPOTTER_COACHING_PRIVILEGE` on the data model, or the bearer token does not correspond to the org where the data model exists. | > ###### Note: > > - To use this API, the user needs either edit access or `SPOTTER_COACHING_PRIVILEGE` on the data model, and must use the bearer token corresponding to the org where the data model exists. > - This endpoint is currently in Beta. Breaking changes may be introduced before the endpoint is made Generally Available. > - Available from version 10.15.0.cl and later. > - This endpoint requires Spotter — please contact ThoughtSpot Support to enable Spotter on your cluster. > - Instructions help improve the accuracy and relevance of AI-generated responses for the specified data-model. + * @param setNLInstructionsRequest + */ + public setNLInstructions(setNLInstructionsRequest: SetNLInstructionsRequest, _options?: Configuration): Promise { + const result = this.api.setNLInstructions(setNLInstructionsRequest, _options); + return result.toPromise(); + } + + /** + * Version: 9.0.0.cl or later Allows sharing one or several metadata objects with users and groups in ThoughtSpot. Requires edit access to the metadata object. #### Supported metadata objects: * Liveboards * Visualizations * Answers * Models * Views * Connections * Collections #### Object permissions You can provide `READ_ONLY` or `MODIFY` access when sharing an object with another user or group. The `READ_ONLY` permission grants view access to the shared object, whereas `MODIFY` provides edit access. To prevent a user or group from accessing the shared object, specify the GUID or name of the principal and set `shareMode` to `NO_ACCESS`. #### Sharing a visualization * Sharing a visualization implicitly shares the entire Liveboard with the recipient. * Object permissions set for a shared visualization also apply to the Liveboard unless overridden by another API request or via UI. * If email notifications for object sharing are enabled, a notification with a link to the shared visualization will be sent to the recipient’s email address. Although this link opens the shared visualization, recipients can also access other visualizations in the Liveboard. #### Sharing a collection Collections support **dual permissions** that provide fine-grained control: * **Collection permissions** (`share_mode`) - controls access to the collection itself (view, edit, delete the collection) * **Content permissions** (`content_share_mode`) - controls access to objects within the collection (view, edit objects inside) **Default Behavior:** - If only `share_mode` is specified, the content permissions default to `READ_ONLY` (except when `share_mode` is `NO_ACCESS`, then content also gets `NO_ACCESS`) - To give users edit access to collection contents, explicitly set `content_share_mode: \"MODIFY\"` ## Examples The following JSON examples can be copy-pasted as request bodies for the REST v2 API endpoint: ```bash POST /callosum/v1/v2/security/metadata/share Content-Type: application/x-www-form-urlencoded ``` ### Basic collection sharing Share a collection with read-only access: ```json { \"metadata_type\": \"COLLECTION\", \"metadata_identifiers\": [\"Sales Reports Collection\"], \"permissions\": [{ \"principal\": { \"type\": \"USER\", \"identifier\": \"alice@company.com\" }, \"share_mode\": \"READ_ONLY\" }], \"notification\": { \"message\": \"I\'ve shared the Sales Reports collection with you\", \"notify_on_share\": true } } ``` ### Collection sharing with dual permissions Share a collection with different permissions for the collection vs. its contents: ```json { \"metadata_type\": \"COLLECTION\", \"metadata_identifiers\": [\"Marketing Analytics\"], \"permissions\": [{ \"principal\": { \"type\": \"USER\", \"identifier\": \"bob@company.com\" }, \"share_mode\": \"MODIFY\", \"content_share_mode\": \"READ_ONLY\" }, { \"principal\": { \"type\": \"USER_GROUP\", \"identifier\": \"Marketing Team\" }, \"share_mode\": \"READ_ONLY\", \"content_share_mode\": \"READ_ONLY\" }], \"notification\": { \"emails\": [\"bob@company.com\"], \"message\": \"You can edit the collection but content is read-only\", \"enable_custom_url\": false, \"notify_on_share\": true }, \"has_lenient_discoverability\": false } ``` ### Multiple collections sharing Share multiple collections with different users: ```json { \"metadata\": [ { \"type\": \"COLLECTION\", \"identifier\": \"Q4 Reports\" }, { \"type\": \"COLLECTION\", \"identifier\": \"Executive Dashboard Collection\" } ], \"permissions\": [{ \"principal\": { \"type\": \"USER_GROUP\", \"identifier\": \"Executives\" }, \"share_mode\": \"MODIFY\" }, { \"principal\": { \"type\": \"USER\", \"identifier\": \"manager@company.com\" }, \"share_mode\": \"READ_ONLY\", \"content_share_mode\": \"MODIFY\" }], \"notification\": { \"message\": \"Sharing quarterly collections with leadership team\", \"notify_on_share\": true } } ``` ### Remove collection access Remove access to a collection by setting share_mode to NO_ACCESS: ```json { \"metadata_type\": \"COLLECTION\", \"metadata_identifiers\": [\"Confidential Reports\"], \"permissions\": [{ \"principal\": { \"type\": \"USER\", \"identifier\": \"former-employee@company.com\" }, \"share_mode\": \"NO_ACCESS\" }], \"notification\": { \"notify_on_share\": false } } ``` ### Collection Permission Scenarios **Scenario 1: Collection Admin** - `share_mode: MODIFY` + `content_share_mode: MODIFY` = Full control over collection and its contents **Scenario 2: Collection Curator** - `share_mode: MODIFY` + `content_share_mode: READ_ONLY` = Can manage collection structure but not edit contents **Scenario 3: Content Editor** - `share_mode: READ_ONLY` + `content_share_mode: MODIFY` = Can edit objects within collection but can\'t change collection itself **Scenario 4: Viewer** - `share_mode: READ_ONLY` + `content_share_mode: READ_ONLY` = View-only access to collection and contents + * @param shareMetadataRequest + */ + public shareMetadata(shareMetadataRequest: ShareMetadataRequest, _options?: Configuration): Promise { + const result = this.api.shareMetadata(shareMetadataRequest, _options); + return result.toPromise(); + } + + /** + * Version: 10.4.0.cl or later Processes a natural language query against a specified data model and returns a single AI-generated answer without requiring a conversation session. Requires `CAN_USE_SPOTTER` privilege and at least view access to the metadata object specified in the request. #### Usage guidelines The request must include: - `query`: a natural language question (e.g., \"What were total sales last quarter?\") - `metadata_identifier`: the unique ID of the data source to query against If the request is successful, the API returns a response message containing: - `session_identifier`: the unique ID of the generated response - `generation_number`: the generation number of the response - `message_type`: the type of the response (e.g., `TSAnswer`) - `visualization_type`: the generated visualization type (`Chart`, `Table`, or `Undefined`) - `tokens` / `display_tokens`: the search tokens and user-friendly display tokens for the response #### Error responses | Code | Description | |------|-----------------------------------------------------------------------------------------------------------------------------------------| | 401 | Unauthorized — authentication token is missing, expired, or invalid. | | 403 | Forbidden — the authenticated user does not have `CAN_USE_SPOTTER` privilege or lacks view permission on the specified metadata object. | > ###### Note: > * This endpoint is currently in Beta. Breaking changes may be introduced before the endpoint is made Generally Available. > * This endpoint requires Spotter - please contact ThoughtSpot support to enable Spotter on your cluster. + * @param singleAnswerRequest + */ + public singleAnswer(singleAnswerRequest: SingleAnswerRequest, _options?: Configuration): Promise { + const result = this.api.singleAnswer(singleAnswerRequest, _options); + return result.toPromise(); + } + + /** + * Stops an in-progress agent conversation response. Version: 26.6.0.cl or later Version: 26.6.0.cl or later Stops an in-progress agent response for the specified conversation. Use this endpoint to cancel a response that is actively being generated — for example, when the user navigates away, reformulates their question, or no longer needs the current result. Requires `CAN_USE_SPOTTER` privilege and access to the specified conversation. #### Usage guidelines The request must include: - `conversation_identifier` *(path parameter)*: the unique ID of the conversation whose active response should be stopped, as returned by `createAgentConversation` A successful request returns an empty `204 No Content` response. If there is no active response in progress at the time of the call, the request is still treated as successful. After stopping a response, the conversation session remains active. You can continue sending messages using `sendAgentConversationMessage` or `sendAgentConversationMessageStreaming`. #### Example request ```bash POST /api/rest/2.0/ai/agent/conversation/{conversation_identifier}/stop-response ``` #### Typical usage scenario This endpoint is useful when integrating Spotter into a chat UI where users can cancel a long-running query. For example: 1. User sends a message via `sendAgentConversationMessageStreaming`. 2. User clicks a \"Stop generating\" button while the response is streaming. 3. Your client calls `stopConversation` with the active `conversation_identifier`. 4. The stream is terminated and the user can ask a new question. #### Error responses | Code | Description | |------|-------------| | 401 | Unauthorized — authentication token is missing, expired, or invalid. | | 403 | Forbidden — the authenticated user does not have `CAN_USE_SPOTTER` privilege or lacks access to the specified conversation. | > ###### Note: > > - Calling this endpoint when no response is in progress does not return an error. > - The conversation context is preserved after stopping — previous messages and answers remain accessible. > - Available from version 26.6.0.cl and later. > - This endpoint requires Spotter — please contact ThoughtSpot Support to enable Spotter on your cluster. > - This feature is available only for **Spotter 3** (`SPOTTER3`) version. + * @param conversationIdentifier Unique identifier of the conversation to stop. + */ + public stopConversation(conversationIdentifier: string, _options?: Configuration): Promise { + const result = this.api.stopConversation(conversationIdentifier, _options); + return result.toPromise(); + } + + /** + * Version: 26.5.0.cl or later Synchronizes connection metadata attributes from your Cloud Data Warehouse (CDW) with ThoughtSpot. Requires the `DATAMANAGEMENT` (**Can manage data**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` (**Can manage data models**) privilege is required. #### Usage guidelines To synchronize attributes from a CDW, specify the connection GUID or name in the `connection_identifier` path parameter and `sync_attributes` in the request body. Default attribute is `[\"DESCRIPTION\"]`. ##### Hierarchical schema * Connection: The connection object for the sync operation. * Tables: Tables for the sync operation. When no table is specified, all tables are synchronized. * Columns: If the table is specified, you can add the columns for the sync operation. If no columns are specified, all columns in the specified table are considered for the sync operation. To set the scope for the sync operation: * Connection-level: To sync all tables and columns, pass an empty request body, or only the attributes in the request body. * Table-level: To synchronize specific tables and their columns, specify the table identifiers in the `tables` array. * Column-level: To synchronize specific columns, specify the table identifier as the key and column identifiers as the value in the `tables` array. ``` { \"tables\": [ {\"table-guid-1\": [\"column-guid-1\", \"column-guid-2\"]}, \"table-guid-2\" ], \"sync_attributes\": [\"DESCRIPTION\"] } ``` ##### API response If the sync operation is successful, the API returns the following information: * Status of the sync operation. For example, `SUCCESS`, `PARTIAL_SUCCESS`, or `NO_UPDATE`. * Number of tables and columns that were updated. * Number of tables and columns with the sync failed status when the overall sync status is `PARTIAL_SUCCESS`. * Message text indicating the sync results. + * @param connectionIdentifier Unique ID or name of the connection. + * @param syncMetadataRequest + */ + public syncMetadata(connectionIdentifier: string, syncMetadataRequest: SyncMetadataRequest, _options?: Configuration): Promise { + const result = this.api.syncMetadata(connectionIdentifier, syncMetadataRequest, _options); + return result.toPromise(); + } + + /** + * Version: 9.0.0.cl or later Removes the tags applied to a Liveboard, Answer, Table, or Worksheet. Requires edit access to the metadata object. + * @param unassignTagRequest + */ + public unassignTag(unassignTagRequest: UnassignTagRequest, _options?: Configuration): Promise { + const result = this.api.unassignTag(unassignTagRequest, _options); + return result.toPromise(); + } + + /** + * Remove parameterization from fields in metadata objects. Version: 26.5.0.cl or later Allows removing parameterization from fields in metadata objects in ThoughtSpot. Requires appropriate permissions to modify the metadata object. The API endpoint allows unparameterizing the following types of metadata objects: * Logical Tables * Connections * Connection Configs For a Logical Table the field type must be `ATTRIBUTE` and field name can be one of: * databaseName * schemaName * tableName For a Connection or Connection Config, the field type is always `CONNECTION_PROPERTY`. In this case, field_name specifies the exact property of the Connection or Connection Config that needs to be unparameterized. For Connection Config, the only supported field name is: * impersonate_user + * @param unparameterizeMetadataRequest + */ + public unparameterizeMetadata(unparameterizeMetadataRequest: UnparameterizeMetadataRequest, _options?: Configuration): Promise { + const result = this.api.unparameterizeMetadata(unparameterizeMetadataRequest, _options); + return result.toPromise(); + } + + /** + * Version: 26.5.0.cl or later Allows unpublishing metadata objects from organizations in ThoughtSpot. Requires ADMINISTRATION role and TENANT scope. The API endpoint allows unpublishing the following types of metadata objects: * Liveboards * Answers * Logical Tables When unpublishing objects, you can: * Include dependencies by setting `include_dependencies` to true - this will unpublish all dependent objects if no other published object is using them * Force unpublish by setting `force` to true - this will break all dependent objects in the unpublished organizations + * @param unpublishMetadataRequest + */ + public unpublishMetadata(unpublishMetadataRequest: UnpublishMetadataRequest, _options?: Configuration): Promise { + const result = this.api.unpublishMetadata(unpublishMetadataRequest, _options); + return result.toPromise(); + } + + /** + * Version: 10.12.0.cl or later Updates the properties of a [custom calendar](https://docs.thoughtspot.com/cloud/latest/connections-cust-cal). Requires `DATAMANAGEMENT` (**Can manage data**) or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your ThoughtSpot instance, the `CAN_MANAGE_CUSTOM_CALENDAR` (**Can manage custom calendars**) privilege is required. #### Usage guidelines You can update the properties of a calendar using one of the following methods: * `FROM_INPUT_PARAMS` to update the calendar properties with the values defined in the API request. * `FROM_EXISTING_TABLE` Creates a calendar from the parameters defined in the API request. To update a custom calendar, specify the calendar ID as a path parameter in the request URL and the following parameters in the request body: * Connection ID and Table name * Database and schema name attributes: For most Cloud Data Warehouse (CDW) connectors, both `database_name` and `schema_name` attributes are required. However, the attribute requirements are conditional and vary based on the connector type and its metadata structure. For example, for connectors such as Teradata, MySQL, SingleSore, Amazon Aurora MySQL, Amazon RDS MySQL, Oracle, and GCP_MYSQL, the `schema_name` is required, whereas the `database_name` attribute is not. Similarly, connectors such as ClickHouse require you to specify the `database_name` and the schema specification in such cases is optional. The API allows you to modify the calendar type, month offset value, start and end date, starting day of the week, and prefixes assigned to the year and quarter labels. #### Examples Update a custom calendar using an existing Table in ThoughtSpot: ``` { \"update_method\": \"FROM_EXISTING_TABLE\", \"table_reference\": { \"connection_identifier\": \"Connection1\", \"database_name\": \"db1\", \"table_name\": \"custom_calendar_2025\", \"schame_name\": \"schemaVar\" } } ``` Update a custom calendar with the attributes defined in the API request: ``` { \"update_method\": \"FROM_INPUT_PARAMS\", \"table_reference\": { \"connection_identifier\": \"Connection1\", \"database_name\": \"db1\", \"table_name\": \"custom_calendar_2025\", \"schame_name\": \"schemaVar\" }, \"month_offset\": \"August\", \"start_day_of_week\": \"Monday\", \"start_date\": \"08/01/2025\", \"end_date\": \"07/31/2026\" } ``` + * @param calendarIdentifier Unique Id or name of the calendar. + * @param updateCalendarRequest + */ + public updateCalendar(calendarIdentifier: string, updateCalendarRequest: UpdateCalendarRequest, _options?: Configuration): Promise { + const result = this.api.updateCalendar(calendarIdentifier, updateCalendarRequest, _options); + return result.toPromise(); + } + + /** + * Version: 26.4.0.cl or later Updates an existing collection in ThoughtSpot. #### Supported operations This API endpoint lets you perform the following operations: * Update collection name and description * Change visibility settings * Add metadata objects to the collection (operation: ADD) * Remove metadata objects from the collection (operation: REMOVE) * Replace all metadata objects in the collection (operation: REPLACE) #### Operation types * **ADD**: Adds the specified metadata objects to the existing collection without removing current items * **REMOVE**: Removes only the specified metadata objects from the collection * **REPLACE**: Replaces all existing metadata objects with the specified items (default behavior) + * @param collectionIdentifier Unique GUID of the collection. Note: Collection names cannot be used as identifiers since duplicate names are allowed. + * @param updateCollectionRequest + */ + public updateCollection(collectionIdentifier: string, updateCollectionRequest: UpdateCollectionRequest, _options?: Configuration): Promise { + const result = this.api.updateCollection(collectionIdentifier, updateCollectionRequest, _options); + return result.toPromise(); + } + + /** + * Version: 10.12.0.cl or later Creates, updates, or deletes column security rules for specified tables. This API endpoint allows you to create, update, or delete column-level security rules on columns of a table. The operation follows an \"all or none\" policy: if defining security rules for any of the provided columns fails, the entire operation will be rolled back, and no rules will be created. #### Usage guidelines - Provide table identifier using either `identifier` (GUID or name) or `obj_identifier` (object ID) - Use `clear_csr: true` to remove all column security rules from the table - For each column, specify the security rule using `column_security_rules` array - Use `is_unsecured: true` to mark a specific column as unprotected - Use `group_access` operations to manage group associations: - `ADD`: Add groups to the column\'s access list - `REMOVE`: Remove groups from the column\'s access list - `REPLACE`: Replace all existing groups with the specified groups #### Required permissions - `ADMINISTRATION` - Can administer ThoughtSpot - `DATAMANAGEMENT` - Can manage data (if RBAC is disabled) - `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` - Can manage worksheet views and tables (if RBAC is enabled) #### Example request ```json { \"identifier\": \"table-guid\", \"obj_identifier\": \"table-object-id\", \"clear_csr\": false, \"column_security_rules\": [ { \"column_identifier\": \"col id or col name\", \"is_unsecured\": false, \"group_access\": [ { \"operation\": \"ADD\", \"group_identifiers\": [\"hr_group_id\", \"hr_group_name\", \"finance_group_id\"] } ] }, { \"column_identifier\": \"col id or col name\", \"is_unsecured\": true }, { \"column_identifier\": \"col id or col name\", \"is_unsecured\": false, \"group_access\": [ { \"operation\": \"REPLACE\", \"group_identifiers\": [\"management_group_id\", \"management_group_name\"] } ] } ] } ``` #### Request Body Schema - `identifier` (string, optional): GUID or name of the table for which we want to create column security rules - `obj_identifier` (string, optional): The object ID of the table - `clear_csr` (boolean, optional): If true, then all the secured columns will be marked as unprotected, and all the group associations will be removed - `column_security_rules` (array of objects, required): An array where each object defines the security rule for a specific column Each column security rule object contains: - `column_identifier` (string, required): Column identifier (col_id or name) - `is_unsecured` (boolean, optional): If true, the column will be marked as unprotected and all groups associated with it will be removed - `group_access` (array of objects, optional): Array of group operation objects Each group operation object contains: - `operation` (string, required): Operation type - ADD, REMOVE, or REPLACE - `group_identifiers` (array of strings, required): Array of group identifiers (name or GUID) on which the operation will be performed #### Response This API does not return any response body. A successful operation returns HTTP 200 status code. #### Operation Types - **ADD**: Adds the specified groups to the column\'s access list - **REMOVE**: Removes the specified groups from the column\'s access list - **REPLACE**: Replaces all existing groups with the specified groups + * @param updateColumnSecurityRulesRequest + */ + public updateColumnSecurityRules(updateColumnSecurityRulesRequest: UpdateColumnSecurityRulesRequest, _options?: Configuration): Promise { + const result = this.api.updateColumnSecurityRules(updateColumnSecurityRulesRequest, _options); + return result.toPromise(); + } + + /** + * Version: 9.2.0.cl or later Updates Git repository configuration settings. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance on your instance, the `CAN_SETUP_VERSION_CONTROL` (**Can set up version control**) privilege. + * @param updateConfigRequest + */ + public updateConfig(updateConfigRequest: UpdateConfigRequest, _options?: Configuration): Promise { + const result = this.api.updateConfig(updateConfigRequest, _options); + return result.toPromise(); + } + + /** + * Version: 9.2.0.cl or later **Important**: This endpoint is deprecated and will be removed from ThoughtSpot in September 2025. ThoughtSpot strongly recommends using the [Update connection V2](#/http/api-endpoints/connections/update-connection-v2) endpoint to update your connection objects. #### Usage guidelines Updates a connection object. Requires `DATAMANAGEMENT` (**Can manage data**) and edit permissions to the connection object, or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) privilege is required. To update a connection object, pass these parameters in your API request: 1. GUID of the connection object. 2. If you are updating tables or database schema of a connection object: a. Add the updated JSON map of metadata with database, schema, and tables in `data_warehouse_config`. b. Set `validate` to `true`. 3. If you are updating a configuration attribute, connection name, or description, you can set `validate` to `false`. + * @param updateConnectionRequest + */ + public updateConnection(updateConnectionRequest: UpdateConnectionRequest, _options?: Configuration): Promise { + const result = this.api.updateConnection(updateConnectionRequest, _options); + return result.toPromise(); + } + + /** + * Version: 10.12.0.cl or later Updates a connection configuration object. Requires `DATAMANAGEMENT` (**Can manage data**) and edit permissions to the connection object, or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) privilege is required. #### Supported operations This API endpoint lets you perform the following operations in a single API request: * Edit the name or description of the configuration * Edit the configuration properties * Edit the `policy_type` * Edit the type of authentication * Enable or disable a configuration #### Parameterized Connection Support For parameterized oauth based connections, only the `same_as_parent` and `policy_process_options` attributes are allowed. These attributes are not applicable to connections that are not parameterized. **NOTE**: When updating a configuration where `disabled` is `true`, you must reset `disabled` to `true` in your update request payload. If not explicitly set again, the API will default `disabled` to `false`. + * @param configurationIdentifier Unique ID or name of the configuration. + * @param updateConnectionConfigurationRequest + */ + public updateConnectionConfiguration(configurationIdentifier: string, updateConnectionConfigurationRequest: UpdateConnectionConfigurationRequest, _options?: Configuration): Promise { + const result = this.api.updateConnectionConfiguration(configurationIdentifier, updateConnectionConfigurationRequest, _options); + return result.toPromise(); + } + + /** + * Version: 26.6.0.cl or later Activates or deactivates a connection. A deactivated connection cannot be used for queries or operations until it is activated again. Requires `DATAMANAGEMENT` (**Can manage data**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) privilege is required. Only the connection owner or an administrator can perform this operation. #### Usage guidelines To update the status of a connection, specify the connection GUID or name in the `connection_identifier` path parameter and the desired `status` in the request body. - **ACTIVATED**: Enables the connection. Queries and operations can resume on an activated connection. - **DEACTIVATED**: Disables the connection. It does not remove the connection metadata, but only makes the connection unavailable for queries and operations. You can reactivate a deactivated connection by setting \"status\": \"ACTIVATED\". + * @param connectionIdentifier Unique ID or name of the connection. + * @param updateConnectionStatusRequest + */ + public updateConnectionStatus(connectionIdentifier: string, updateConnectionStatusRequest: UpdateConnectionStatusRequest, _options?: Configuration): Promise { + const result = this.api.updateConnectionStatus(connectionIdentifier, updateConnectionStatusRequest, _options); + return result.toPromise(); + } + + /** + * Version: 10.4.0.cl or later Updates a connection object. Requires `DATAMANAGEMENT` (**Can manage data**) and edit permissions to the connection object, or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) privilege is required. To update a connection object, pass these parameters in your API request: 1. GUID of the connection object. 2. If you are updating tables or database schema of a connection object: a. Add the updated JSON map of metadata with database, schema, and tables in `data_warehouse_config`. b. Set `validate` to `true`. **NOTE:** If the `authentication_type` is anything other than SERVICE_ACCOUNT, you must explicitly provide the authenticationType property in the payload. If you do not specify authenticationType, the API will default to SERVICE_ACCOUNT as the authentication type. * A JSON map of configuration attributes, database details, and table properties in `data_warehouse_config` as shown in the following example: * This is an example of updating a single table in a empty connection: ``` { \"authenticationType\": \"SERVICE_ACCOUNT\", \"externalDatabases\": [ { \"name\": \"DEVELOPMENT\", \"isAutoCreated\": false, \"schemas\": [ { \"name\": \"TS_dataset\", \"tables\": [ { \"name\": \"DEMORENAME\", \"type\": \"TABLE\", \"description\": \"\", \"selected\": true, \"linked\": true, \"gid\": 0, \"datasetId\": \"-1\", \"subType\": \"\", \"reportId\": \"\", \"viewId\": \"\", \"columns\": [ { \"name\": \"Col1\", \"type\": \"VARCHAR\", \"canImport\": true, \"selected\": true, \"description\": \"\", \"isLinkedActive\": true, \"isAggregate\": false }, { \"name\": \"Col2\", \"type\": \"VARCHAR\", \"canImport\": true, \"selected\": true, \"description\": \"\", \"isLinkedActive\": true, \"isAggregate\": false }, { \"name\": \"Col3\", \"type\": \"VARCHAR\", \"canImport\": true, \"selected\": true, \"description\": \"\", \"isLinkedActive\": true, \"isAggregate\": false }, { \"name\": \"Col312\", \"type\": \"VARCHAR\", \"canImport\": true, \"selected\": true, \"description\": \"\", \"isLinkedActive\": true, \"isAggregate\": false }, { \"name\": \"Col4\", \"type\": \"VARCHAR\", \"canImport\": true, \"selected\": true, \"description\": \"\", \"isLinkedActive\": true, \"isAggregate\": false } ], \"relationships\": [] } ] } ] } ], \"configuration\": { \"password\": \"\", \"database\": \"DEVELOPMENT\", \"role\": \"DEV\", \"accountName\": \"thoughtspot_partner\", \"warehouse\": \"DEMO_WH\", \"user\": \"DEV_USER\" } } ``` * This is an example of updating a single table in an existing connection with tables: ``` { \"authenticationType\": \"SERVICE_ACCOUNT\", \"externalDatabases\": [ { \"name\": \"DEVELOPMENT\", \"isAutoCreated\": false, \"schemas\": [ { \"name\": \"TS_dataset\", \"tables\": [ { \"name\": \"CUSTOMER\", \"type\": \"TABLE\", \"description\": \"\", \"selected\": true, \"linked\": true, \"gid\": 0, \"datasetId\": \"-1\", \"subType\": \"\", \"reportId\": \"\", \"viewId\": \"\", \"columns\": [], \"relationships\": [] }, { \"name\": \"tpch5k_falcon_default_schema_users\", \"type\": \"TABLE\", \"description\": \"\", \"selected\": true, \"linked\": true, \"gid\": 0, \"datasetId\": \"-1\", \"subType\": \"\", \"reportId\": \"\", \"viewId\": \"\", \"columns\": [ { \"name\": \"user_id\", \"type\": \"INT64\", \"canImport\": true, \"selected\": true, \"description\": \"\", \"isLinkedActive\": true, \"isAggregate\": false }, { \"name\": \"product_id\", \"type\": \"INT64\", \"canImport\": true, \"selected\": true, \"description\": \"\", \"isLinkedActive\": true, \"isAggregate\": false }, { \"name\": \"user_cost\", \"type\": \"INT64\", \"canImport\": true, \"selected\": true, \"description\": \"\", \"isLinkedActive\": true, \"isAggregate\": false } ], \"relationships\": [] } ] } ] } ], \"configuration\": { \"password\": \"\", \"database\": \"DEVELOPMENT\", \"role\": \"DEV\", \"accountName\": \"thoughtspot_partner\", \"warehouse\": \"DEMO_WH\", \"user\": \"DEV_USER\" } } ``` 3. If you are updating a configuration attribute, connection name, or description, you can set `validate` to `false`. **NOTE:** If the `authentication_type` is anything other than SERVICE_ACCOUNT, you must explicitly provide the authenticationType property in the payload. If you do not specify authenticationType, the API will default to SERVICE_ACCOUNT as the authentication type. * A JSON map of configuration attributes in `data_warehouse_config`. The following example shows the configuration attributes for a Snowflake connection: ``` { \"configuration\":{ \"accountName\":\"thoughtspot_partner\", \"user\":\"tsadmin\", \"password\":\"TestConn123\", \"role\":\"sysadmin\", \"warehouse\":\"MEDIUM_WH\" }, \"externalDatabases\":[ ] } ``` + * @param connectionIdentifier Unique ID or name of the connection. + * @param updateConnectionV2Request + */ + public updateConnectionV2(connectionIdentifier: string, updateConnectionV2Request: UpdateConnectionV2Request, _options?: Configuration): Promise { + const result = this.api.updateConnectionV2(connectionIdentifier, updateConnectionV2Request, _options); + return result.toPromise(); + } + + /** + * Version: 9.6.0.cl or later Updates a custom action. Requires `DEVELOPER` (**Has Developer privilege**) or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `DEVELOPER` (**Has developer privilege**) privilege is required. #### Usage Guidelines The API allows you to modify the following properties: * Name of the custom action * Action availability to groups * Association to metadata objects * Authentication settings for a URL-based action For more information, see [Custom actions](https://developers.thoughtspot.com/docs/custom-action-intro). + * @param customActionIdentifier Unique ID or name of the custom action. + * @param updateCustomActionRequest + */ + public updateCustomAction(customActionIdentifier: string, updateCustomActionRequest: UpdateCustomActionRequest, _options?: Configuration): Promise { + const result = this.api.updateCustomAction(customActionIdentifier, updateCustomActionRequest, _options); + return result.toPromise(); + } + + /** + * Version: 9.9.0.cl or later Updates a DBT connection object. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege or `DATAMANAGEMENT` (**Can manage data ThoughtSpot**) privilege, along with an existing DBT connection. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the following data control privileges may be required: - `CAN_MANAGE_CUSTOM_CALENDAR`(**Can manage custom calendars**) - `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) - `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` (**Can manage data models**) #### About update DBT connection You can modify DBT connection object properties such as embrace connection name, embrace database name, import type, account identifier, access token, project identifier and environment (or) embrace connection, embrace database name, import type, file_content settings. + * @param dbtConnectionIdentifier Unique ID of the DBT Connection. + * @param connectionName Name of the connection. + * @param databaseName Name of the Database. + * @param importType Mention type of Import + * @param accessToken Access token is mandatory when Import_Type is DBT_CLOUD. + * @param dbtUrl DBT URL is mandatory when Import_Type is DBT_CLOUD. + * @param accountId Account ID is mandatory when Import_Type is DBT_CLOUD + * @param projectId Project ID is mandatory when Import_Type is DBT_CLOUD + * @param dbtEnvId DBT Environment ID\\\" + * @param projectName Name of the project + * @param fileContent Upload DBT Manifest and Catalog artifact files as a ZIP file. This field is Mandatory when Import Type is \\\'ZIP_FILE\\\' + */ + public updateDbtConnection(dbtConnectionIdentifier: string, connectionName?: string, databaseName?: string, importType?: string, accessToken?: string, dbtUrl?: string, accountId?: string, projectId?: string, dbtEnvId?: string, projectName?: string, fileContent?: HttpFile, _options?: Configuration): Promise { + const result = this.api.updateDbtConnection(dbtConnectionIdentifier, connectionName, databaseName, importType, accessToken, dbtUrl, accountId, projectId, dbtEnvId, projectName, fileContent, _options); + return result.toPromise(); + } + + /** + * Version: 10.12.0.cl or later Updates a customization configuration for the notification email. #### Pre-requisites Requires `DEVELOPER` (**has developer privilege**) or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `DEVELOPER` (**Has developer privilege**) privilege is required. **NOTE**:This endpoint in currently in beta. Contact ThoughtSpot support to enable this on your instance. #### Usage guidelines To update a custom configuration pass these parameters in your API request: - A JSON map of configuration attributes `template_properties`. The following example shows a sample set of customization configuration: ``` { { \"cta_button_bg_color\": \"#444DEA\", \"cta_text_font_color\": \"#FFFFFF\", \"primary_bg_color\": \"#D3DEF0\", \"logo_url\": \"https://storage.pardot.com/710713/1642089901EbkRibJq/TS_fullworkmark_darkmode.png\", \"font_family\": \"\", \"product_name\": \"ThoughtSpot\", \"footer_address\": \"444 Castro St, Suite 1000 Mountain View, CA 94041\", \"footer_phone\": \"(800) 508-7008\", \"replacement_value_for_liveboard\": \"Dashboard\", \"replacement_value_for_answer\": \"Chart\", \"replacement_value_for_spot_iq\": \"AI Insights\", \"hide_footer_phone\": false, \"hide_footer_address\": false, \"hide_product_name\": false, \"hide_manage_notification\": false, \"hide_mobile_app_nudge\": false, \"hide_privacy_policy\": false, \"hide_ts_vocabulary_definitions\": false, \"hide_error_message\": false, \"hide_unsubscribe_link\": false, \"hide_notification_status\": false, \"hide_modify_alert\": false, \"company_website_url\": \"https://your-website.com/\", \"company_privacy_policy_url\" : \"https://link-to-privacy-policy.com/\", \"contact_support_url\": \"https://link-to-contact-support.com/\", \"hide_contact_support_url\": false, \"hide_logo_url\" : false } } ``` + * @param updateEmailCustomizationRequest + */ + public updateEmailCustomization(updateEmailCustomizationRequest: UpdateEmailCustomizationRequest, _options?: Configuration): Promise { + const result = this.api.updateEmailCustomization(updateEmailCustomizationRequest, _options); + return result.toPromise(); + } + + /** + * Update header attributes for a given list of header objects. Version: 10.6.0.cl or later ## Prerequisites - **Privileges Required:** - `DATAMANAGEMENT` (Can manage data) or `ADMINISTRATION` (Can administer ThoughtSpot). - **Additional Privileges (if RBAC is enabled):** - `ORG_ADMINISTRATION` (Can manage orgs). --- ## Usage Guidelines ### Parameters 1. **headers_update** - **Description:** List of header objects with their attributes to be updated. Each object contains a list of attributes to be updated in the header. - **Usage:** - You must provide either `identifier` or `obj_identifier`, but not both. Both fields cannot be empty. - When `org_identifier` is set to `-1`, only the `identifier` value is accepted; `obj_identifier` is not allowed. 2. **org_identifier** - **Description:** GUID (Globally Unique Identifier) or name of the organization. - **Usage:** - Leaving this field empty assumes that the changes should be applied to the current organization - Provide `org_guid` or `org_name` to uniquely identify the organization where changes need to be applied. . - Provide `-1` if changes have to be applied across all the org. --- ## Note Currently, this API is enabled only for updating the `obj_identifier` attribute. Only `text` will be allowed in attribute\'s value. ## Best Practices 1. **Backup Before Conversion:** Always export metadata as a backup before initiating the update process --- ## Examples ### Only `identifier` is given ```json { \"headers_update\": [ { \"identifier\": \"guid_1\", \"obj_identifier\": \"\", \"type\": \"LOGICAL_COLUMN\", \"attributes\": [ { \"name\": \"obj_id\", \"value\": \"custom_object_id\" } ] } ], \"org_identifier\": \"orgGuid\" } ``` ### Only `obj_identifier` is given ```json { \"headers_update\": [ { \"obj_identifier\": \"custom_object_id\", \"type\": \"ANSWER\", \"attributes\": [ { \"name\": \"obj_id\", \"value\": \"custom_object_id\" } ] } ], \"org_identifier\": \"orgName\" } ``` ### Executing update for all org `-1` ```json { \"headers_update\": [ { \"identifier\": \"guid_1\", \"type\": \"ANSWER\", \"attributes\": [ { \"name\": \"obj_id\", \"value\": \"custom_object_id\" } ] } ], \"org_identifier\": -1 } ``` ### Optional `type` is not provided ```json { \"headers_update\": [ { \"identifier\": \"guid_1\", \"attributes\": [ { \"name\": \"obj_id\", \"value\": \"custom_object_id\" } ] } ], \"org_identifier\": -1 } ``` + * @param updateMetadataHeaderRequest + */ + public updateMetadataHeader(updateMetadataHeaderRequest: UpdateMetadataHeaderRequest, _options?: Configuration): Promise { + const result = this.api.updateMetadataHeader(updateMetadataHeaderRequest, _options); + return result.toPromise(); + } + + /** + * Update object IDs for given metadata objects. Version: 10.8.0.cl or later ## Prerequisites - **Privileges Required:** - `DATAMANAGEMENT` (Can manage data) or `ADMINISTRATION` (Can administer ThoughtSpot). - **Additional Privileges (if RBAC is enabled):** - `ORG_ADMINISTRATION` (Can manage orgs). --- ## Usage Guidelines ### Parameters 1. **metadata** - **Description:** List of metadata objects to update their object IDs. - **Usage:** - Use either `current_obj_id` alone OR use `metadata_identifier` with `type` (when needed). - When using `metadata_identifier`, the `type` field is required if using a name instead of a GUID. - The `new_obj_id` field is always required. --- ## Note This API is specifically designed for updating object IDs of metadata objects. It internally uses the header update mechanism to perform the changes. ## Best Practices 1. **Backup Before Update:** Always export metadata as a backup before initiating the update process. 2. **Validation:** - When using `current_obj_id`, ensure it matches the existing object ID exactly. - When using `metadata_identifier` with a name, ensure the `type` is specified correctly. - Verify that the `new_obj_id` follows your naming conventions and is unique within your system. --- ## Examples ### Using current_obj_id ```json { \"metadata\": [ { \"current_obj_id\": \"existing_object_id\", \"new_obj_id\": \"new_object_id\" } ] } ``` ### Using metadata_identifier with GUID ```json { \"metadata\": [ { \"metadata_identifier\": \"01234567-89ab-cdef-0123-456789abcdef\", \"new_obj_id\": \"new_object_id\" } ] } ``` ### Using metadata_identifier with name and type ```json { \"metadata\": [ { \"metadata_identifier\": \"My Answer\", \"type\": \"ANSWER\", \"new_obj_id\": \"new_object_id\" } ] } ``` ### Multiple objects update ```json { \"metadata\": [ { \"current_obj_id\": \"existing_object_id_1\", \"new_obj_id\": \"new_object_id_1\" }, { \"metadata_identifier\": \"My Worksheet\", \"type\": \"LOGICAL_TABLE\", \"new_obj_id\": \"new_object_id_2\" } ] } ``` + * @param updateMetadataObjIdRequest + */ + public updateMetadataObjId(updateMetadataObjIdRequest: UpdateMetadataObjIdRequest, _options?: Configuration): Promise { + const result = this.api.updateMetadataObjId(updateMetadataObjIdRequest, _options); + return result.toPromise(); + } + + /** + * Version: 9.0.0.cl or later Updates an Org object. You can modify Org properties such as name, description, and user associations. Requires cluster administration (**Can administer Org**) privileges. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `ORG_ADMINISTRATION` (**Can manage Orgs**) privilege is required. + * @param orgIdentifier ID or name of the Org + * @param updateOrgRequest + */ + public updateOrg(orgIdentifier: string, updateOrgRequest: UpdateOrgRequest, _options?: Configuration): Promise { + const result = this.api.updateOrg(orgIdentifier, updateOrgRequest, _options); + return result.toPromise(); + } + + /** + * Version: 9.5.0.cl or later Updates the properties of a Role object. Available only if [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance. To update a Role, the `ROLE_ADMINISTRATION` (**Can manage roles**) privilege is required. + * @param roleIdentifier Unique ID or name of the Role. + * @param updateRoleRequest + */ + public updateRole(roleIdentifier: string, updateRoleRequest: UpdateRoleRequest, _options?: Configuration): Promise { + const result = this.api.updateRole(roleIdentifier, updateRoleRequest, _options); + return result.toPromise(); + } + + /** + * Update schedule. Version: 9.4.0.cl or later Updates a scheduled Liveboard job. Requires at least edit access to Liveboards. To update a schedule on behalf of another user, you need `ADMINISTRATION` (**Can administer Org**) or `JOBSCHEDULING` (**Can schedule for others**) privilege and edit access to the Liveboard. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `JOBSCHEDULING` (**Can schedule for others**) privilege is required. The API endpoint allows you to pause a scheduled job, change the status of a paused job. You can also edit the recipients list, frequency of the job, format of the file to send to the recipients in email notifications, PDF options, and time zone setting. + * @param scheduleIdentifier Unique ID or name of the schedule. + * @param updateScheduleRequest + */ + public updateSchedule(scheduleIdentifier: string, updateScheduleRequest: UpdateScheduleRequest, _options?: Configuration): Promise { + const result = this.api.updateSchedule(scheduleIdentifier, updateScheduleRequest, _options); + return result.toPromise(); + } + + /** + * Version: 9.2.0.cl or later Updates the current configuration of the cluster. You must send the configuration data in JSON format. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privileges. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `APPLICATION_ADMINISTRATION` (**Can manage application settings**) privilege is required. + * @param updateSystemConfigRequest + */ + public updateSystemConfig(updateSystemConfigRequest: UpdateSystemConfigRequest, _options?: Configuration): Promise { + const result = this.api.updateSystemConfig(updateSystemConfigRequest, _options); + return result.toPromise(); + } + + /** + * Version: 9.0.0.cl or later Updates a tag object. You can modify the `name` and `color` properties of a tag object. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `TAGMANAGEMENT` (**Can manage tags**) privilege is required to create, edit, and delete tags. + * @param tagIdentifier Name or Id of the tag. + * @param updateTagRequest + */ + public updateTag(tagIdentifier: string, updateTagRequest: UpdateTagRequest, _options?: Configuration): Promise { + const result = this.api.updateTag(tagIdentifier, updateTagRequest, _options); + return result.toPromise(); + } + + /** + * Version: 9.0.0.cl or later Updates the properties of a user object. You can modify user properties such as username, email, and share notification settings. You can also assign new groups and Orgs, remove the user from a group or Org, reset password, and modify user preferences. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `USER_ADMINISTRATION` (**Can manage users**) privilege is required. + * @param userIdentifier GUID / name of the user + * @param updateUserRequest + */ + public updateUser(userIdentifier: string, updateUserRequest: UpdateUserRequest, _options?: Configuration): Promise { + const result = this.api.updateUser(userIdentifier, updateUserRequest, _options); + return result.toPromise(); + } + + /** + * Version: 9.0.0.cl or later Updates the properties of a group object in ThoughtSpot. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `GROUP_ADMINISTRATION` (**Can manage groups**) privilege is required. #### Supported operations This API endpoint lets you perform the following operations in a single API request: * Edit [privileges](https://developers.thoughtspot.com/docs/?pageid=api-user-management#group-privileges) * Add or remove users * Change sharing visibility settings * Add or remove sub-groups * Assign a default Liveboard or update the existing settings + * @param groupIdentifier GUID or name of the group. + * @param updateUserGroupRequest + */ + public updateUserGroup(groupIdentifier: string, updateUserGroupRequest: UpdateUserGroupRequest, _options?: Configuration): Promise { + const result = this.api.updateUserGroup(groupIdentifier, updateUserGroupRequest, _options); + return result.toPromise(); + } + + /** + * Update a variable\'s name Version: 26.4.0.cl or later Allows updating a variable\'s name in ThoughtSpot. Requires ADMINISTRATION role and TENANT scope. The CAN_MANAGE_VARIABLES permission allows you to manage Formula Variables in the current organization scope. The API endpoint allows updating: * The variable name + * @param identifier Unique id or name of the variable to update. + * @param updateVariableRequest + */ + public updateVariable(identifier: string, updateVariableRequest: UpdateVariableRequest, _options?: Configuration): Promise { + const result = this.api.updateVariable(identifier, updateVariableRequest, _options); + return result.toPromise(); + } + + /** + * Update values for multiple variables Version: 10.14.0.cl or later **Note:** This API endpoint is deprecated and will be removed from ThoughtSpot in a future release. Use [POST /api/rest/2.0/template/variables/{identifier}/update-values](/api/rest/2.0/template/variables/%7Bidentifier%7D/update-values) instead. Allows updating values for multiple variables in ThoughtSpot. Requires ADMINISTRATION role. The CAN_MANAGE_VARIABLES permission allows you to manage Formula Variables in the current organization scope. The API endpoint allows: * Adding new values to variables * Replacing existing values * Deleting values from variables When updating variable values, you need to specify: * The variable identifiers * The values to add/replace/remove for each variable * The operation to perform (ADD, REPLACE, REMOVE, RESET) Behaviour based on operation type: * ADD - Adds values to the variable if this is a list type variable, else same as replace. * REPLACE - Replaces all values of a given set of constraints with the current set of values. * REMOVE - Removes any values which match the set of conditions of the variables if this is a list type variable, else clears value. * RESET - Removes all constrains for a given variable, scope is ignored + * @param updateVariableValuesRequest + */ + public updateVariableValues(updateVariableValuesRequest: UpdateVariableValuesRequest, _options?: Configuration): Promise { + const result = this.api.updateVariableValues(updateVariableValuesRequest, _options); + return result.toPromise(); + } + + /** + * Version: 10.14.0.cl or later Updates an existing webhook configuration by its unique id or name. Only the provided fields will be updated. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) or `DEVELOPER` (**Has developer privilege**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, users with `CAN_MANAGE_WEBHOOKS` (**Can manage webhooks**) privilege are also authorized to perform this action. + * @param webhookIdentifier Unique ID or name of the webhook configuration. + * @param updateWebhookConfigurationRequest + */ + public updateWebhookConfiguration(webhookIdentifier: string, updateWebhookConfigurationRequest: UpdateWebhookConfigurationRequest, _options?: Configuration): Promise { + const result = this.api.updateWebhookConfiguration(webhookIdentifier, updateWebhookConfigurationRequest, _options); + return result.toPromise(); + } + + /** + * Version: 26.4.0.cl or later Validates a communication channel configuration to ensure it is properly set up and can receive events. - Use `channel_type` to specify the type of communication channel to validate (e.g., WEBHOOK). - Use `channel_identifier` to provide the unique identifier or name for the communication channel. - Use `event_type` to specify the event type to validate for this channel. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) or `DEVELOPER` (**Has developer privilege**) privilege. For webhook channels, users with `CAN_MANAGE_WEBHOOKS` (**Can manage webhooks**) privilege are also authorized to perform this action. + * @param validateCommunicationChannelRequest + */ + public validateCommunicationChannel(validateCommunicationChannelRequest: ValidateCommunicationChannelRequest, _options?: Configuration): Promise { + const result = this.api.validateCommunicationChannel(validateCommunicationChannelRequest, _options); + return result.toPromise(); + } + + /** + * Version: 10.10.0.cl or later Validates the email customization configuration if any set for the ThoughtSpot system. #### Pre-requisites Requires `DEVELOPER` (**has developer privilege**) or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `DEVELOPER` (**Has developer privilege**) privilege is required. **NOTE**:This endpoint in currently in beta. Contact ThoughtSpot support to enable this on your instance. + */ + public validateEmailCustomization(_options?: Configuration): Promise { + const result = this.api.validateEmailCustomization(_options); + return result.toPromise(); + } + + /** + * Version: 9.2.0.cl or later Validates the content of your source branch against the objects in your destination environment. Before merging content from your source branch to the destination branch, run this API operation from your destination environment and ensure that the changes from the source branch function in the destination environment. Requires `DATAMANAGEMENT` (**Can manage data**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance on your instance, the `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` (**Can manage data models**) privilege and edit access to the metadata objects. + * @param validateMergeRequest + */ + public validateMerge(validateMergeRequest: ValidateMergeRequest, _options?: Configuration): Promise> { + const result = this.api.validateMerge(validateMergeRequest, _options); + return result.toPromise(); + } + + /** + * Version: 9.12.0.cl or later Validates the authentication token specified in the API request. If your token is not valid, [Get a new token](#/http/api-endpoints/authentication/get-full-access-token). + * @param validateTokenRequest + */ + public validateToken(validateTokenRequest: ValidateTokenRequest, _options?: Configuration): Promise { + const result = this.api.validateToken(validateTokenRequest, _options); + return result.toPromise(); + } + + +} + + + +import { ObservableUsersApi } from './ObservableAPI'; + +import { UsersApiRequestFactory, UsersApiResponseProcessor} from "../apis/UsersApi"; +export class PromiseUsersApi { + private api: ObservableUsersApi + + public constructor( + configuration: Configuration, + requestFactory?: UsersApiRequestFactory, + responseProcessor?: UsersApiResponseProcessor + ) { + this.api = new ObservableUsersApi(configuration, requestFactory, responseProcessor); + } + + /** + * Version: 9.7.0.cl or later Activates a deactivated user account. Requires `ADMINISTRATION` (**Can administer Thoughtspot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `USER_ADMINISTRATION` (**Can manage users**) privilege is required. To activate an inactive user account, the API request body must include the following information: - Username or the GUID of the user account. - Auth token generated for the deactivated user. The auth token is sent in the API response when a user is deactivated. - Password for the user account. + * @param activateUserRequest + */ + public activateUser(activateUserRequest: ActivateUserRequest, _options?: Configuration): Promise { + const result = this.api.activateUser(activateUserRequest, _options); + return result.toPromise(); + } + + /** + * Version: 9.0.0.cl or later Updates the current password of the user. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `USER_ADMINISTRATION` (**Can manage users**) privilege is required. + * @param changeUserPasswordRequest + */ + public changeUserPassword(changeUserPasswordRequest: ChangeUserPasswordRequest, _options?: Configuration): Promise { + const result = this.api.changeUserPassword(changeUserPasswordRequest, _options); + return result.toPromise(); + } + + /** + * Version: 9.0.0.cl or later Creates a user in ThoughtSpot. The API endpoint allows you to configure several user properties such as email address, account status, share notification preferences, and sharing visibility. You can provision the user to [groups](https://docs.thoughtspot.com/cloud/latest/groups-privileges) and [Orgs](https://docs.thoughtspot.com/cloud/latest/orgs-overview). You can also add Liveboard, Answer, and Worksheet objects to the user’s favorites list, assign a default Liveboard for the user, and set user preferences. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `USER_ADMINISTRATION` (**Can manage users**) privilege is required. + * @param createUserRequest + */ + public createUser(createUserRequest: CreateUserRequest, _options?: Configuration): Promise { + const result = this.api.createUser(createUserRequest, _options); + return result.toPromise(); + } + + /** + * Version: 9.7.0.cl or later Deactivates a user account. Requires `ADMINISTRATION` (**Can administer Thoughtspot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `USER_ADMINISTRATION` (**Can manage users**) privilege is required. To deactivate a user account, the API request body must include the following information: - Username or the GUID of the user account - Base URL of the ThoughtSpot instance If the API request is successful, ThoughtSpot returns the activation URL in the response. The activation URL is valid for 14 days and can be used to re-activate the account and reset the password of the deactivated account. + * @param deactivateUserRequest + */ + public deactivateUser(deactivateUserRequest: DeactivateUserRequest, _options?: Configuration): Promise { + const result = this.api.deactivateUser(deactivateUserRequest, _options); + return result.toPromise(); + } + + /** + * Version: 9.0.0.cl or later Deletes a user from the ThoughtSpot system. If you want to remove a user from a specific Org but not from ThoughtSpot, update the group and Org mapping properties of the user object via a POST API call to the [/api/rest/2.0/users/{user_identifier}/update](#/http/api-endpoints/users/update-user) endpoint. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `USER_ADMINISTRATION` (**Can manage users**) privilege is required. + * @param userIdentifier GUID / name of the user + */ + public deleteUser(userIdentifier: string, _options?: Configuration): Promise { + const result = this.api.deleteUser(userIdentifier, _options); + return result.toPromise(); + } + + /** + * Version: 9.0.0.cl or later Enforces logout on current user sessions. Use this API with caution as it may invalidate active user sessions and force users to re-login. Make sure you specify the usernames or GUIDs. If you pass null values in the API call, all user sessions on your cluster become invalid, and the users are forced to re-login. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `USER_ADMINISTRATION` (**Can manage users**) privilege is required. + * @param forceLogoutUsersRequest + */ + public forceLogoutUsers(forceLogoutUsersRequest: ForceLogoutUsersRequest, _options?: Configuration): Promise { + const result = this.api.forceLogoutUsers(forceLogoutUsersRequest, _options); + return result.toPromise(); + } + + /** + * Version: 9.0.0.cl or later Imports user data from external databases into ThoughtSpot. During the user import operation: * If the specified users are not available in ThoughtSpot, the users are created and assigned a default password. Defining a `default_password` in the API request is optional. * If `delete_unspecified_users` is set to `true`, the users not specified in the API request, excluding the `tsadmin`, `guest`, `system` and `su` users, are deleted. * If the specified user objects are already available in ThoughtSpot, the object properties are updated and synchronized as per the input data in the API request. A successful API call returns the object that represents the changes made in the ThoughtSpot system. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `USER_ADMINISTRATION` (**Can manage users**) privilege is required. + * @param importUsersRequest + */ + public importUsers(importUsersRequest: ImportUsersRequest, _options?: Configuration): Promise { + const result = this.api.importUsers(importUsersRequest, _options); + return result.toPromise(); + } + + /** + * Version: 9.0.0.cl or later Resets the password of a user account. Administrators can reset password on behalf of a user. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `USER_ADMINISTRATION` (**Can manage users**) privilege is required. + * @param resetUserPasswordRequest + */ + public resetUserPassword(resetUserPasswordRequest: ResetUserPasswordRequest, _options?: Configuration): Promise { + const result = this.api.resetUserPassword(resetUserPasswordRequest, _options); + return result.toPromise(); + } + + /** + * Version: 9.0.0.cl or later Gets a list of users available on the ThoughtSpot system. To get details of a specific user, specify the user GUID or name. You can also filter the API response based on groups, Org ID, user visibility, account status, user type, and user preference settings and favorites. Available to all users. Users with `ADMINISTRATION` (**Can administer ThoughtSpot**) privileges can view all users properties. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `USER_ADMINISTRATION` (**Can manage users**) privilege is required. **NOTE**: If the API returns an empty list, consider increasing the value of the `record_size` parameter. To search across all available users, set `record_size` to `-1`. + * @param searchUsersRequest + */ + public searchUsers(searchUsersRequest: SearchUsersRequest, _options?: Configuration): Promise> { + const result = this.api.searchUsers(searchUsersRequest, _options); + return result.toPromise(); + } + + /** + * Version: 9.0.0.cl or later Updates the properties of a user object. You can modify user properties such as username, email, and share notification settings. You can also assign new groups and Orgs, remove the user from a group or Org, reset password, and modify user preferences. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `USER_ADMINISTRATION` (**Can manage users**) privilege is required. + * @param userIdentifier GUID / name of the user + * @param updateUserRequest + */ + public updateUser(userIdentifier: string, updateUserRequest: UpdateUserRequest, _options?: Configuration): Promise { + const result = this.api.updateUser(userIdentifier, updateUserRequest, _options); + return result.toPromise(); + } + + +} + + + +import { ObservableVariableApi } from './ObservableAPI'; + +import { VariableApiRequestFactory, VariableApiResponseProcessor} from "../apis/VariableApi"; +export class PromiseVariableApi { + private api: ObservableVariableApi + + public constructor( + configuration: Configuration, + requestFactory?: VariableApiRequestFactory, + responseProcessor?: VariableApiResponseProcessor + ) { + this.api = new ObservableVariableApi(configuration, requestFactory, responseProcessor); + } + + /** + * Create a variable which can be used for parameterizing metadata objects Version: 26.4.0.cl or later Allows creating a variable which can be used for parameterizing metadata objects in ThoughtSpot. Requires ADMINISTRATION role and TENANT scope. The CAN_MANAGE_VARIABLES permission allows you to manage Formula Variables in the current organization scope. The API endpoint supports the following types of variables: * CONNECTION_PROPERTY - For connection properties * TABLE_MAPPING - For table mappings * CONNECTION_PROPERTY_PER_PRINCIPAL - For connection properties per principal. In order to use this please contact support to enable this. * FORMULA_VARIABLE - For Formula variables, introduced in 10.15.0.cl When creating a variable, you need to specify: * The variable type * A unique name for the variable * Whether the variable contains sensitive values (defaults to false) * The data type of the variable, only specify for formula variables (defaults to null) The operation will fail if: * The user lacks required permissions * The variable name already exists * The variable type is invalid + * @param createVariableRequest + */ + public createVariable(createVariableRequest: CreateVariableRequest, _options?: Configuration): Promise { + const result = this.api.createVariable(createVariableRequest, _options); + return result.toPromise(); + } + + /** + * Delete a variable Version: 10.14.0.cl or later **Note:** This API endpoint is deprecated and will be removed from ThoughtSpot in a future release. Use [POST /api/rest/2.0/template/variables/delete](/api/rest/2.0/template/variables/delete) instead. Allows deleting a variable from ThoughtSpot. Requires ADMINISTRATION role and TENANT scope. The CAN_MANAGE_VARIABLES permission allows you to manage Formula Variables in the current organization scope. The API endpoint requires: * The variable identifier (ID or name) The operation will fail if: * The user lacks required permissions * The variable doesn\'t exist * The variable is being used by other objects + * @param identifier Unique id or name of the variable + */ + public deleteVariable(identifier: string, _options?: Configuration): Promise { + const result = this.api.deleteVariable(identifier, _options); + return result.toPromise(); + } + + /** + * Delete variable(s) Version: 26.4.0.cl or later Allows deleting multiple variables from ThoughtSpot. Requires ADMINISTRATION role and TENANT scope. The CAN_MANAGE_VARIABLES permission allows you to manage Formula Variables in the current organization scope. The API endpoint requires: * The variable identifiers (IDs or names) The operation will fail if: * The user lacks required permissions * Any of the variables don\'t exist * Any of the variables are being used by other objects + * @param deleteVariablesRequest + */ + public deleteVariables(deleteVariablesRequest: DeleteVariablesRequest, _options?: Configuration): Promise { + const result = this.api.deleteVariables(deleteVariablesRequest, _options); + return result.toPromise(); + } + + /** + * Update values for a variable Version: 26.4.0.cl or later Allows updating values for a specific variable in ThoughtSpot. Requires ADMINISTRATION role. The CAN_MANAGE_VARIABLES permission allows you to manage Formula Variables in the current organization scope. The API endpoint allows: * Adding new values to the variable * Replacing existing values * Deleting values from the variable * Resetting all values When updating variable values, you need to specify: * The variable identifier (ID or name) * The values to add/replace/remove * The operation to perform (ADD, REPLACE, REMOVE, RESET) Behaviour based on operation type: * ADD - Adds values to the variable if this is a list type variable, else same as replace. * REPLACE - Replaces all values of a given set of constraints with the current set of values. * REMOVE - Removes any values which match the set of conditions of the variables if this is a list type variable, else clears value. * RESET - Removes all constraints for the given variable, scope is ignored + * @param identifier Unique ID or name of the variable + * @param putVariableValuesRequest + */ + public putVariableValues(identifier: string, putVariableValuesRequest: PutVariableValuesRequest, _options?: Configuration): Promise { + const result = this.api.putVariableValues(identifier, putVariableValuesRequest, _options); + return result.toPromise(); + } + + /** + * Search variables Version: 26.4.0.cl or later Allows searching for variables in ThoughtSpot. Requires ADMINISTRATION role. The CAN_MANAGE_VARIABLES permission allows you to manage Formula Variables in the current organization scope. The API endpoint supports searching variables by: * Variable identifier (ID or name) * Variable type * Name pattern (case-insensitive, supports % for wildcard) The search results can be formatted in three ways: * METADATA - Returns only variable metadata (default) * METADATA_AND_VALUES - Returns variable metadata and values The values can be filtered by scope: * org_identifier * principal_identifier * model_identifier + * @param searchVariablesRequest + */ + public searchVariables(searchVariablesRequest: SearchVariablesRequest, _options?: Configuration): Promise> { + const result = this.api.searchVariables(searchVariablesRequest, _options); + return result.toPromise(); + } + + /** + * Update a variable\'s name Version: 26.4.0.cl or later Allows updating a variable\'s name in ThoughtSpot. Requires ADMINISTRATION role and TENANT scope. The CAN_MANAGE_VARIABLES permission allows you to manage Formula Variables in the current organization scope. The API endpoint allows updating: * The variable name + * @param identifier Unique id or name of the variable to update. + * @param updateVariableRequest + */ + public updateVariable(identifier: string, updateVariableRequest: UpdateVariableRequest, _options?: Configuration): Promise { + const result = this.api.updateVariable(identifier, updateVariableRequest, _options); + return result.toPromise(); + } + + /** + * Update values for multiple variables Version: 10.14.0.cl or later **Note:** This API endpoint is deprecated and will be removed from ThoughtSpot in a future release. Use [POST /api/rest/2.0/template/variables/{identifier}/update-values](/api/rest/2.0/template/variables/%7Bidentifier%7D/update-values) instead. Allows updating values for multiple variables in ThoughtSpot. Requires ADMINISTRATION role. The CAN_MANAGE_VARIABLES permission allows you to manage Formula Variables in the current organization scope. The API endpoint allows: * Adding new values to variables * Replacing existing values * Deleting values from variables When updating variable values, you need to specify: * The variable identifiers * The values to add/replace/remove for each variable * The operation to perform (ADD, REPLACE, REMOVE, RESET) Behaviour based on operation type: * ADD - Adds values to the variable if this is a list type variable, else same as replace. * REPLACE - Replaces all values of a given set of constraints with the current set of values. * REMOVE - Removes any values which match the set of conditions of the variables if this is a list type variable, else clears value. * RESET - Removes all constrains for a given variable, scope is ignored + * @param updateVariableValuesRequest + */ + public updateVariableValues(updateVariableValuesRequest: UpdateVariableValuesRequest, _options?: Configuration): Promise { + const result = this.api.updateVariableValues(updateVariableValuesRequest, _options); + return result.toPromise(); + } + + +} + + + +import { ObservableVersionControlApi } from './ObservableAPI'; + +import { VersionControlApiRequestFactory, VersionControlApiResponseProcessor} from "../apis/VersionControlApi"; +export class PromiseVersionControlApi { + private api: ObservableVersionControlApi + + public constructor( + configuration: Configuration, + requestFactory?: VersionControlApiRequestFactory, + responseProcessor?: VersionControlApiResponseProcessor + ) { + this.api = new ObservableVersionControlApi(configuration, requestFactory, responseProcessor); + } + + /** + * Version: 9.2.0.cl or later Commits TML files of metadata objects to the Git branch configured on your instance. Requires at least edit access to objects used in the commit operation. Before using this endpoint to push your commits: * Enable Git integration on your instance. * Make sure the Git repository and branch details are configured on your instance. For more information, see [Git integration documentation](https://developers.thoughtspot.com/docs/git-integration). + * @param commitBranchRequest + */ + public commitBranch(commitBranchRequest: CommitBranchRequest, _options?: Configuration): Promise { + const result = this.api.commitBranch(commitBranchRequest, _options); + return result.toPromise(); + } + + /** + * Version: 9.2.0.cl or later Allows you to connect a ThoughtSpot instance to a Git repository. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance on your instance, the `CAN_SETUP_VERSION_CONTROL` (**Can set up version control**) privilege. You can use this API endpoint to connect your ThoughtSpot development and production environments to the development and production branches of a Git repository. Before using this endpoint to connect your ThoughtSpot instance to a Git repository, check the following prerequisites: * You have a Git repository. If you are using GitHub, make sure you have a valid account and an access token to connect ThoughtSpot to GitHub. For information about generating a token, see [GitHub Documentation](https://docs.github.com/en/authentication/keeping-your-account-and-data-secure/managing-your-personal-access-tokens). * Your access token has `repo` scope that grants full access to public and private repositories. * Your Git repository has a branch that can be configured as a default branch in ThoughtSpot. For more information, see [Git integration documentation](https://developers.thoughtspot.com/docs/?pageid=git-integration). **Note**: ThoughtSpot supports only GitHub / itHub Enterprise for CI/CD. + * @param createConfigRequest + */ + public createConfig(createConfigRequest: CreateConfigRequest, _options?: Configuration): Promise { + const result = this.api.createConfig(createConfigRequest, _options); + return result.toPromise(); + } + + /** + * Version: 9.2.0.cl or later Deletes Git repository configuration from your ThoughtSpot instance. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance on your instance, the `CAN_SETUP_VERSION_CONTROL` (**Can set up version control**) privilege. + * @param deleteConfigRequest + */ + public deleteConfig(deleteConfigRequest: DeleteConfigRequest, _options?: Configuration): Promise { + const result = this.api.deleteConfig(deleteConfigRequest, _options); + return result.toPromise(); + } + + /** + * Version: 9.2.0.cl or later Allows you to deploy a commit and publish TML content to your ThoughtSpot instance. Requires at least edit access to the objects used in the deploy operation. The API deploys the head of the branch unless a `commit_id` is specified in the API request. If the branch name is not defined in the request, the default branch is considered for deploying commits. For more information, see [Git integration documentation](https://developers.thoughtspot.com/docs/git-integration). + * @param deployCommitRequest + */ + public deployCommit(deployCommitRequest: DeployCommitRequest, _options?: Configuration): Promise> { + const result = this.api.deployCommit(deployCommitRequest, _options); + return result.toPromise(); + } + + /** + * Version: 9.2.0.cl or later Reverts TML objects to a previous commit specified in the API request. Requires at least edit access to objects. In the API request, specify the `commit_id`. If the branch name is not specified in the request, the API will consider the default branch configured on your instance. By default, the API reverts all objects. If the revert operation fails for one of the objects provided in the commit, the API returns an error and does not revert any object. For more information, see [Git integration documentation](https://developers.thoughtspot.com/docs/git-integration). + * @param commitId Commit id to which the object should be reverted + * @param revertCommitRequest + */ + public revertCommit(commitId: string, revertCommitRequest: RevertCommitRequest, _options?: Configuration): Promise { + const result = this.api.revertCommit(commitId, revertCommitRequest, _options); + return result.toPromise(); + } + + /** + * Version: 9.2.0.cl or later Gets a list of commits for a given metadata object. Requires `DATAMANAGEMENT` (**Can manage data**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance on your instance, the `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` (**Can manage data models**) privilege and edit access to the metadata objects. + * @param searchCommitsRequest + */ + public searchCommits(searchCommitsRequest: SearchCommitsRequest, _options?: Configuration): Promise> { + const result = this.api.searchCommits(searchCommitsRequest, _options); + return result.toPromise(); + } + + /** + * Version: 9.2.0.cl or later Gets Git repository connections configured on the ThoughtSpot instance. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance on your instance, the `CAN_SETUP_VERSION_CONTROL` (**Can set up version control**) privilege. + * @param searchConfigRequest + */ + public searchConfig(searchConfigRequest: SearchConfigRequest, _options?: Configuration): Promise> { + const result = this.api.searchConfig(searchConfigRequest, _options); + return result.toPromise(); + } + + /** + * Version: 9.2.0.cl or later Updates Git repository configuration settings. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance on your instance, the `CAN_SETUP_VERSION_CONTROL` (**Can set up version control**) privilege. + * @param updateConfigRequest + */ + public updateConfig(updateConfigRequest: UpdateConfigRequest, _options?: Configuration): Promise { + const result = this.api.updateConfig(updateConfigRequest, _options); + return result.toPromise(); + } + + /** + * Version: 9.2.0.cl or later Validates the content of your source branch against the objects in your destination environment. Before merging content from your source branch to the destination branch, run this API operation from your destination environment and ensure that the changes from the source branch function in the destination environment. Requires `DATAMANAGEMENT` (**Can manage data**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance on your instance, the `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` (**Can manage data models**) privilege and edit access to the metadata objects. + * @param validateMergeRequest + */ + public validateMerge(validateMergeRequest: ValidateMergeRequest, _options?: Configuration): Promise> { + const result = this.api.validateMerge(validateMergeRequest, _options); + return result.toPromise(); + } + + +} + + + +import { ObservableWebhooksApi } from './ObservableAPI'; + +import { WebhooksApiRequestFactory, WebhooksApiResponseProcessor} from "../apis/WebhooksApi"; +export class PromiseWebhooksApi { + private api: ObservableWebhooksApi + + public constructor( + configuration: Configuration, + requestFactory?: WebhooksApiRequestFactory, + responseProcessor?: WebhooksApiResponseProcessor + ) { + this.api = new ObservableWebhooksApi(configuration, requestFactory, responseProcessor); + } + + /** + * Version: 10.14.0.cl or later Creates a new webhook configuration to receive notifications for specified events. The webhook will be triggered when the configured events occur in the system. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) or `DEVELOPER` (**Has developer privilege**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, users with `CAN_MANAGE_WEBHOOKS` (**Can manage webhooks**) privilege are also authorized to perform this action. + * @param createWebhookConfigurationRequest + */ + public createWebhookConfiguration(createWebhookConfigurationRequest: CreateWebhookConfigurationRequest, _options?: Configuration): Promise { + const result = this.api.createWebhookConfiguration(createWebhookConfigurationRequest, _options); + return result.toPromise(); + } + + /** + * Version: 10.14.0.cl or later Deletes one or more webhook configurations by their unique id or name. Returns status of each deletion operation, including successfully deleted webhooks and any failures with error details. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) or `DEVELOPER` (**Has developer privilege**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, users with `CAN_MANAGE_WEBHOOKS` (**Can manage webhooks**) privilege are also authorized to perform this action. + * @param deleteWebhookConfigurationsRequest + */ + public deleteWebhookConfigurations(deleteWebhookConfigurationsRequest: DeleteWebhookConfigurationsRequest, _options?: Configuration): Promise { + const result = this.api.deleteWebhookConfigurations(deleteWebhookConfigurationsRequest, _options); + return result.toPromise(); + } + + /** + * Version: 10.14.0.cl or later Searches for webhook configurations based on various criteria such as Org, webhook identifier, event type, with support for pagination and sorting. Returns matching webhook configurations with their complete details. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) or `DEVELOPER` (**Has developer privilege**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, users with `CAN_MANAGE_WEBHOOKS` (**Can manage webhooks**) privilege are also authorized to perform this action. + * @param searchWebhookConfigurationsRequest + */ + public searchWebhookConfigurations(searchWebhookConfigurationsRequest: SearchWebhookConfigurationsRequest, _options?: Configuration): Promise { + const result = this.api.searchWebhookConfigurations(searchWebhookConfigurationsRequest, _options); + return result.toPromise(); + } + + /** + * Version: 10.14.0.cl or later Updates an existing webhook configuration by its unique id or name. Only the provided fields will be updated. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) or `DEVELOPER` (**Has developer privilege**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, users with `CAN_MANAGE_WEBHOOKS` (**Can manage webhooks**) privilege are also authorized to perform this action. + * @param webhookIdentifier Unique ID or name of the webhook configuration. + * @param updateWebhookConfigurationRequest + */ + public updateWebhookConfiguration(webhookIdentifier: string, updateWebhookConfigurationRequest: UpdateWebhookConfigurationRequest, _options?: Configuration): Promise { + const result = this.api.updateWebhookConfiguration(webhookIdentifier, updateWebhookConfigurationRequest, _options); + return result.toPromise(); + } + + +} + + + diff --git a/sdks/typescript/util.ts b/sdks/typescript/util.ts new file mode 100644 index 000000000..96ea3dfdc --- /dev/null +++ b/sdks/typescript/util.ts @@ -0,0 +1,37 @@ +/** + * Returns if a specific http code is in a given code range + * where the code range is defined as a combination of digits + * and "X" (the letter X) with a length of 3 + * + * @param codeRange string with length 3 consisting of digits and "X" (the letter X) + * @param code the http status code to be checked against the code range + */ +export function isCodeInRange(codeRange: string, code: number): boolean { + // This is how the default value is encoded in OAG + if (codeRange === "0") { + return true; + } + if (codeRange == code.toString()) { + return true; + } else { + const codeString = code.toString(); + if (codeString.length != codeRange.length) { + return false; + } + for (let i = 0; i < codeString.length; i++) { + if (codeRange.charAt(i) != "X" && codeRange.charAt(i) != codeString.charAt(i)) { + return false; + } + } + return true; + } +} + +/** +* Returns if it can consume form +* +* @param consumes array +*/ +export function canConsumeForm(contentTypes: string[]): boolean { + return contentTypes.indexOf('multipart/form-data') !== -1 +} diff --git a/sdks/typescript/utils/config.ts b/sdks/typescript/utils/config.ts new file mode 100644 index 000000000..8dea49d25 --- /dev/null +++ b/sdks/typescript/utils/config.ts @@ -0,0 +1,151 @@ +import { AuthMethodsConfiguration, TokenProvider } from "../auth/auth"; +import { createConfiguration } from "../configuration"; +import { GetFullAccessTokenRequest } from "../models/GetFullAccessTokenRequest"; +import { BaseServerConfiguration, ServerConfiguration } from "../servers"; +import { PromiseAuthenticationApi } from "../types/PromiseAPI"; + +/** + * Options for additional configuration settings + */ +export interface ConfigurationOptions { + /** + * Additional headers to be included in every request + * @example + * ```typescript + * { + * additionalHeaders: { + * "Accept-Language": "en-US", + * } + * } + * ``` + */ + additionalHeaders?: Record; +} + +/** + * Creates promise middleware for adding custom headers to requests + * @param additionalHeaders - Optional headers to add to every request + * @returns Middleware object for handling custom headers + */ +const createAdditionalHeadersMiddleware = (additionalHeaders: Record) => { + return { + /** + * Pre-request middleware to add custom headers to every API call + * @param requestContext - The request context to modify + */ + pre: (requestContext: any) => { + Object.entries(additionalHeaders).forEach(([headerName, headerValue]) => { + requestContext.setHeaderParam(headerName, headerValue); + }); + return Promise.resolve(requestContext); + }, + /** + * Post-request middleware for response processing + * @param responseContext - The response context + */ + post: (responseContext: any) => Promise.resolve(responseContext), + }; +}; + +/** + * creates a bearer authentication configuration using params or a token provider + * @param thoughtSpotHost thoughtSpotHost URL + * @param paramOrTokenProvider either a GetFullAccessTokenRequest or a TokenProvider , + * Pass a GetFullAccessTokenRequest which contains the object body required to get a full access token , or + * function which returns a promise of a string which is the full access token + * @param options - Optional configuration for custom headers and other settings + * @returns Configuration object ready for authenticated API calls + * @example + * ```typescript + * const configWithTokenProvider = createBearerAuthenticationConfig( + * "CLUSTER_SERVER_URL", + * YOUR_TOKEN_PROVIDER, + * { + * additionalHeaders: { + * "Accept-Language": "en-US", + * } + * } + * ); + */ +export const createBearerAuthenticationConfig = ( + thoughtSpotHost: string, + paramOrTokenProvider: GetFullAccessTokenRequest | (() => Promise), + options?: ConfigurationOptions +) => { + const serverConfig: BaseServerConfiguration = new ServerConfiguration<{}>( + thoughtSpotHost, + {} + ); + + const additionalHeaders = options?.additionalHeaders; + let middleware = []; + if (additionalHeaders && Object.keys(additionalHeaders).length > 0) { + middleware.push(createAdditionalHeadersMiddleware(additionalHeaders)); + } + + const config = createConfiguration({ + baseServer: serverConfig, + promiseMiddleware: middleware, + }); + + const authApiClient = new PromiseAuthenticationApi(config); + + let configTokenProvider; + + if (paramOrTokenProvider.hasOwnProperty("username")) { + // user passed a GetFullAccessTokenRequest + configTokenProvider = { + getToken: async () => { + const token = (await authApiClient.getFullAccessToken(paramOrTokenProvider as GetFullAccessTokenRequest)).token; + return token; + }, + } + } else if (typeof paramOrTokenProvider === "function") { + // user passed a function which returns a token + configTokenProvider = { + getToken: paramOrTokenProvider, + } + } + else { + throw new Error("Pass a proper GetFullAccessTokenRequest or a function which returns a token"); + } + + const authConfig: AuthMethodsConfiguration = { + bearerAuth: { + tokenProvider: configTokenProvider as TokenProvider, + }, + }; + + const globalConfig = createConfiguration({ + authMethods: authConfig, + baseServer: serverConfig, + promiseMiddleware: middleware, + }); + + return globalConfig; +}; + +/** + * creates a basic configuration using params which does not require authentication + * @param thoughtSpotHost : the base url of the server + * @param options - Optional configuration for additional headers and other settings + * @returns Basic client configuration for unauthenticated API calls + */ +export const createBasicConfig = ( + thoughtSpotHost: string, + options?: ConfigurationOptions +) => { + const thoughtSpotServer = new ServerConfiguration(thoughtSpotHost, {}); + + const additionalHeaders = options?.additionalHeaders; + let middleware = []; + if (additionalHeaders && Object.keys(additionalHeaders).length > 0) { + middleware.push(createAdditionalHeadersMiddleware(additionalHeaders)); + } + + const basicClientConfig = createConfiguration({ + baseServer: thoughtSpotServer, + promiseMiddleware: middleware, + }); + return basicClientConfig; +} \ No newline at end of file diff --git a/sonar-project.properties b/sonar-project.properties new file mode 100644 index 000000000..46a424e11 --- /dev/null +++ b/sonar-project.properties @@ -0,0 +1 @@ +sonar.exclusions=**/*.java